1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3588],{567:function(e,t,n){"use strict";var i,r=this&&this.__extends||(i=function(e,t){return(i=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])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__assign||function(){return(o=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.ListSelector=void 0;var s=n(86051),a=n(85704),u=n(53623),l=n(24379);t.ListSelector=function(e){function t(t){void 0===t&&(t={});var n=e.call(this,t)||this;return n.selectedItem=null,n.listSelectorEvents={onItemAdded:new a.EventDispatcher,onItemRemoved:new a.EventDispatcher,onItemsChanged:new a.EventDispatcher,onItemSelected:new a.EventDispatcher,onItemSelectionChanged:new a.EventDispatcher},n.config=n.mergeConfig(t,{items:[],cssClass:"ui-listselector"},n.config),n.items=n.config.items,n}return r(t,e),t.prototype.normalizeItem=function(e){var t=o({},e);return this.config.filter&&!this.config.filter(t)?null:(this.config.translator&&(t.label=this.config.translator(t)),t)},t.prototype.getItemIndex=function(e){for(var t=0;t<this.items.length;t++)if(this.items[t].key===e)return t;return -1},t.prototype.haveItemsChanged=function(e,t){if(e.length!==t.length)return!0;for(var n=0;n<e.length;n++){var i=e[n],r=t[n];if(i.key!==r.key||l.i18n.performLocalization(i.label)!==l.i18n.performLocalization(r.label)||i.ariaLabel!==r.ariaLabel)return!0}return!1},t.prototype.insertItem=function(e,t){if(this.config.comparator){this.items.push(e),this.items.sort(this.config.comparator);return}if(t){var n=this.items.findIndex(function(t){return t.key>e.key});n<0?this.items.push(e):this.items.splice(n,0,e);return}this.items.push(e)},t.prototype.getItems=function(){return this.items},t.prototype.hasItem=function(e){return this.getItemIndex(e)>-1},t.prototype.addItem=function(e,t,n,i){void 0===n&&(n=!1),void 0===i&&(i="");var r=this.normalizeItem(o({key:e,label:t},i&&{ariaLabel:i}));if(r){var s=this.getItemIndex(e);s>-1&&(u.ArrayUtils.remove(this.items,this.items[s]),this.onItemRemovedEvent(e)),this.insertItem(r,n),this.onItemAddedEvent(e),this.onItemsChangedEvent()}},t.prototype.removeItem=function(e){var t=this.getItemIndex(e);return t>-1&&(u.ArrayUtils.remove(this.items,this.items[t]),this.onItemRemovedEvent(e),this.onItemsChangedEvent(),!0)},t.prototype.selectItem=function(e){return e===this.selectedItem||this.getItemIndex(e)>-1&&(this.selectedItem=e,this.onItemSelectedEvent(e),!0)},t.prototype.getSelectedItem=function(){return this.selectedItem},t.prototype.getItemForKey=function(e){return this.items.find(function(t){return t.key===e})},t.prototype.synchronizeItems=function(e){var t=this,n=e.map(function(e){return t.normalizeItem(e)}).filter(function(e){return null!==e});this.config.comparator&&n.sort(this.config.comparator);var i=this.haveItemsChanged(this.items,n),r=new Set(this.items.map(function(e){return e.key})),o=new Set(n.map(function(e){return e.key})),s=this.items.filter(function(e){return!o.has(e.key)}).map(function(e){return e.key}),a=n.filter(function(e){return!r.has(e.key)}).map(function(e){return e.key});this.items=n,null===this.selectedItem||o.has(this.selectedItem)||(this.selectedItem=null);for(var u=0;u<s.length;u++){var l=s[u];this.onItemRemovedEvent(l)}for(var c=0;c<a.length;c++){var l=a[c];this.onItemAddedEvent(l)}i&&this.onItemsChangedEvent()},t.prototype.clearItems=function(){if(0!==this.items.length){var e=this.items;this.items=[],this.selectedItem=null;for(var t=0;t<e.length;t++){var n=e[t];this.onItemRemovedEvent(n.key)}this.onItemsChangedEvent()}},t.prototype.itemCount=function(){return Object.keys(this.items).length},t.prototype.onItemAddedEvent=function(e){this.listSelectorEvents.onItemAdded.dispatch(this,e)},t.prototype.onItemRemovedEvent=function(e){this.listSelectorEvents.onItemRemoved.dispatch(this,e)},t.prototype.onItemsChangedEvent=function(){this.listSelectorEvents.onItemsChanged.dispatch(this)},t.prototype.onItemSelectedEvent=function(e){this.listSelectorEvents.onItemSelected.dispatch(this,e)},t.prototype.onItemSelectionChangedEvent=function(e){this.listSelectorEvents.onItemSelectionChanged.dispatch(this,e)},t.prototype.dispatchItemSelectionChanged=function(e,t){void 0===t&&(t=!0),t&&this.selectItem(e),this.onItemSelectionChangedEvent(e)},Object.defineProperty(t.prototype,"onItemAdded",{get:function(){return this.listSelectorEvents.onItemAdded.getEvent()}
1,enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onItemRemoved",{get:function(){return this.listSelectorEvents.onItemRemoved.getEvent()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onItemsChanged",{get:function(){return this.listSelectorEvents.onItemsChanged.getEvent()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onItemSelected",{get:function(){return this.listSelectorEvents.onItemSelected.getEvent()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onItemSelectionChanged",{get:function(){return this.listSelectorEvents.onItemSelectionChanged.getEvent()},enumerable:!1,configurable:!0}),t}(s.Component)},803:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getComponentInDirection=function(e,t,n){if(e){var u=a((0,o.toHtmlElement)(e)),l=t.map(function(e){return e instanceof r.FocusableContainer?{component:e,element:(0,o.toHtmlElement)(e.container)}:{component:e,element:(0,o.toHtmlElement)(e)}}).filter(function(t){return t.component!==e}).map(function(e){var t,r,o,l,c=e.element,d=e.component,p=a(c),h=s({x:p.x-u.x,y:p.y-u.y});return{angle:(t={x:n===i.Direction.LEFT?-1:+(n===i.Direction.RIGHT),y:n===i.Direction.UP?-1:+(n===i.Direction.DOWN)},o=s(r={x:p.x-u.x,y:p.y-u.y}),180*Math.acos((l={x:r.x/o,y:r.y/o},(t.x*l.x+t.y*l.y)/(s(t)*s(l))))/Math.PI),dist:h,element:c,component:d}}).filter(function(e){return e.angle<89}),c=l.filter(function(e){return 0===e.angle});return(c.length>0?c.sort(function(e,t){return e.dist-t.dist}).map(function(e){return e.component}):l.filter(function(e){return 0!==e.angle}).sort(function(e,t){return e.dist-t.dist}).map(function(e){return e.component})).shift()}},t.getBoundingRectFromElement=u;var i=n(90753),r=n(49015),o=n(14459);function s(e){return Math.sqrt(Math.pow(e.x,2)+Math.pow(e.y,2))}function a(e){var t=u(e);return{x:t.x+t.width/2,y:t.y+t.height/2}}function u(e){var t=e.getBoundingClientRect();return"number"!=typeof t.x&&"number"!=typeof t.y&&(t.x=t.left,t.y=t.top),t}},1108:function(e,t,n){"use strict";var i,r=this&&this.__extends||(i=function(e,t){return(i=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])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.EcoModeToggleButton=void 0;var o=n(67598),s=n(24379);t.EcoModeToggleButton=function(e){function t(t){void 0===t&&(t={});var n=e.call(this,t)||this,i={text:s.i18n.getLocalizer("ecoMode"),cssClass:"ui-ecomodetogglebutton",onClass:"on",offClass:"off",ariaLabel:s.i18n.getLocalizer("ecoMode")};return n.config=n.mergeConfig(t,i,n.config),n}return r(t,e),t.prototype.configure=function(t,n){var i=this;e.prototype.configure.call(this,t,n),this.areAdaptationApisAvailable(t)?(this.onClick.subscribe(function(){i.toggle()}),this.onToggleOn.subscribe(function(){i.enableEcoMode(t),t.setVideoQuality("auto")}),this.onToggleOff.subscribe(function(){i.disableEcoMode(t)}),t.on(t.exports.PlayerEvent.VideoQualityChanged,function(e){"auto"!==e.targetQuality.id&&(i.off(),i.disableEcoMode(t))})):e.prototype.disable.call(this)},t.prototype.areAdaptationApisAvailable=function(e){var t=!!(e.adaptation.getConfig&&"function"==typeof e.adaptation.getConfig),n=!!(e.adaptation.setConfig&&"function"==typeof e.adaptation.setConfig);return!!(e.adaptation&&t&&n)},t.prototype.enableEcoMode=function(e){this.adaptationConfig=e.adaptation.getConfig();var t=e.getAvailableVideoQualities()[0].codec;t.includes("avc")&&e.adaptation.setConfig({resolution:{maxSelectableVideoHeight:720},limitToPlayerSize:!0}),(t.includes("hvc")||t.includes("hev"))&&e.adaptation.setConfig({resolution:{maxSelectableVideoHeight:1080},limitToPlayerSize:!0}),(t.includes("av1")||t.includes("av01"))&&e.adaptation.setConfig({resolution:{maxSelectableVideoHeight:1440},limitToPlayerSize:!0})}
1,t.prototype.disableEcoMode=function(e){e.adaptation.setConfig(this.adaptationConfig)},t}(o.ToggleButton)},1389:function(e,t,n){"use strict";var i,r=this&&this.__extends||(i=function(e,t){return(i=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])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.AdMessageLabel=void 0;var o=n(30194),s=n(24379),a=n(27717);t.AdMessageLabel=function(e){function t(t){void 0===t&&(t={});var n=e.call(this,t)||this;return n.config=n.mergeConfig(t,{cssClass:"ui-ad-message-label"},n.config),n}return r(t,e),t.prototype.configure=function(t,n){var i,r=this;e.prototype.configure.call(this,t,n);var o=function(){r.setText(r.getAdMessage(t,i))},s=function(){t.off(t.exports.PlayerEvent.TimeChanged,o)};t.on(t.exports.PlayerEvent.AdStarted,function(e){i=e.ad,o(),t.on(t.exports.PlayerEvent.TimeChanged,o)}),t.on(t.exports.PlayerEvent.AdSkipped,s),t.on(t.exports.PlayerEvent.AdError,s),t.on(t.exports.PlayerEvent.AdFinished,s),t.on(t.exports.PlayerEvent.SourceUnloaded,s)},t.prototype.getAdMessage=function(e,t){var n,i=(null==(n=null==t?void 0:t.uiConfig)?void 0:n.message)||this.config.text||"";return a.StringUtils.replaceAdMessagePlaceholders(s.i18n.performLocalization(i),e)},t}(o.Label)},2652:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BrowserUtils=void 0,t.BrowserUtils=function(){function e(){}return Object.defineProperty(e,"isMobile",{get:function(){return!!this.windowExists()&&navigator&&navigator.userAgent&&/Mobi/.test(navigator.userAgent)},enumerable:!1,configurable:!0}),Object.defineProperty(e,"isChrome",{get:function(){return!!this.windowExists()&&navigator&&navigator.userAgent&&/Chrome/.test(navigator.userAgent)},enumerable:!1,configurable:!0}),Object.defineProperty(e,"isAndroid",{get:function(){return!!this.windowExists()&&navigator&&navigator.userAgent&&/Android/.test(navigator.userAgent)&&!this.isHisense},enumerable:!1,configurable:!0}),Object.defineProperty(e,"isIOS",{get:function(){return!!this.windowExists()&&navigator&&navigator.userAgent&&/iPad|iPhone|iPod/.test(navigator.userAgent)},enumerable:!1,configurable:!0}),Object.defineProperty(e,"isMacIntel",{get:function(){return!!this.windowExists()&&navigator&&navigator.userAgent&&"MacIntel"===navigator.platform},enumerable:!1,configurable:!0}),Object.defineProperty(e,"isTv",{get:function(){return this.isHisense||this.isPlayStation||this.isWebOs||this.isTizen||this.isVizio||this.isXumo||this.isXbox||this.isVidaa},enumerable:!1,configurable:!0}),Object.defineProperty(e,"isHisense",{get:function(){return!!this.windowExists()&&navigator&&navigator.userAgent&&/Hisense/.test(navigator.userAgent)},enumerable:!1,configurable:!0}),Object.defineProperty(e,"isPlayStation",{get:function(){return!!this.windowExists()&&navigator&&navigator.userAgent&&/PlayStation/i.test(navigator.userAgent)},enumerable:!1,configurable:!0}),Object.defineProperty(e,"isWebOs",{get:function(){return!!this.windowExists()&&navigator&&navigator.userAgent&&(navigator.userAgent.includes("Web0S")||navigator.userAgent.includes("NetCast"))},enumerable:!1,configurable:!0}),Object.defineProperty(e,"isTizen",{get:function(){return!!this.windowExists()&&navigator&&navigator.userAgent&&/Tizen/.test(navigator.userAgent)},enumerable:!1,configurable:!0}),Object.defineProperty(e,"isVizio",{get:function(){return!!this.windowExists()&&navigator&&navigator.userAgent&&/vizio/.test(navigator.userAgent.toLowerCase())},enumerable:!1,configurable:!0}),Object.defineProperty(e,"isXumo",{get:function(){return!!this.windowExists()&&(navigator&&navigator.userAgent&&/sky_ott/.test(navigator.userAgent.toLowerCase())||navigator&&navigator.userAgent&&/xglobal/.test(navigator.userAgent.toLowerCase())||navigator&&navigator.userAgent&&/xfinity/.test(navigator.userAgent.toLowerCase()))}
1,enumerable:!1,configurable:!0}),Object.defineProperty(e,"isXbox",{get:function(){return!!this.windowExists()&&navigator&&navigator.userAgent&&/Xbox/.test(navigator.userAgent)},enumerable:!1,configurable:!0}),Object.defineProperty(e,"isVidaa",{get:function(){return!!this.windowExists()&&navigator&&navigator.userAgent&&/vidaa/.test(navigator.userAgent.toLowerCase())},enumerable:!1,configurable:!0}),Object.defineProperty(e,"isTouchSupported",{get:function(){return!!this.windowExists()&&("ontouchstart"in window||navigator&&navigator.userAgent&&(navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0))},enumerable:!1,configurable:!0}),e.windowExists=function(){return"u">typeof window},e}()},3255:function(e,t,n){"use strict";var i,r=this&&this.__extends||(i=function(e,t){return(i=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])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.PlayerInsightsPanelItem=void 0;var o=n(30194);t.PlayerInsightsPanelItem=function(e){function t(t){var n=e.call(this,t)||this,i=new o.Label({text:t.leadingLabel,cssClasses:["ui-player-insights-panel-item-leading-label"]}),r=new o.Label({text:"-",cssClasses:["ui-player-insights-panel-item-trailing-label"]});return n.config=n.mergeConfig(t,{cssClasses:["ui-player-insights-panel-item"],isSetting:!1,role:"group",tabIndex:-1},n.config),n.trailingLabel=r,n.addComponent(i),n.addComponent(r),n}return r(t,e),t.prototype.setTrailingLabel=function(e){this.trailingLabel.setText(e)},t}(n(21616).SettingsPanelItem)},3312:function(e,t,n){"use strict";var i,r=this&&this.__extends||(i=function(e,t){return(i=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])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.WindowColorSelectBox=void 0;var o=n(72177),s=n(24379);t.WindowColorSelectBox=function(e){function t(t){var n=e.call(this,t)||this;return n.config=n.mergeConfig(t,{cssClasses:["ui-subtitlesettingswindowcolorselectbox"]},n.config),n}return r(t,e),t.prototype.configure=function(t,n){var i=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")),this.onItemSelectionChanged.subscribe(function(e,t){i.settingsManager.windowColor.value=t}),this.settingsManager.windowColor.onChanged.subscribe(function(e,t){i.settingsManager.windowColor.isSet()?i.settingsManager.windowOpacity.isSet()||(i.settingsManager.windowOpacity.value="100"):i.settingsManager.windowOpacity.clear(),i.selectItem(t.value),i.setColorAndOpacity()}),this.settingsManager.windowOpacity.onChanged.subscribe(function(){i.setColorAndOpacity()}),this.initFromSettings()},t.prototype.initFromSettings=function(){this.settingsManager.windowColor.isSet()&&(this.selectItem(this.settingsManager.windowColor.value),this.setColorAndOpacity())},t.prototype.setColorAndOpacity=function(){this.settingsManager.windowColor.isSet()&&this.settingsManager.windowOpacity.isSet()?this.toggleOverlayClass("windowcolor-"+this.settingsManager.windowColor.value+this.settingsManager.windowOpacity.value):this.toggleOverlayClass(null)},t}(o.SubtitleSettingSelectBox)},3414:function(e,t,n){"use strict";
1var i,r=this&&this.__extends||(i=function(e,t){return(i=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])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(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 o=n(8675),s=n(30194),a=n(65492),u=n(4638),l=n(8007);t.ErrorMessageOverlay=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 r(t,e),t.prototype.configure=function(t,n){var i=this;e.prototype.configure.call(this,t,n);var r=this.getConfig(),o=function(e,t){var o=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||r.messages,e);o&&(t=o),i.display(t)};if((0,l.isMobileV3PlayerAPI)(t)){var s=function(e){var t=u.ErrorUtils.defaultMobileV3ErrorMessageTranslator(e);o(e,t)};t.on(l.MobileV3PlayerEvent.PlayerError,s),t.on(l.MobileV3PlayerEvent.SourceError,s)}else t.on(t.exports.PlayerEvent.Error,function(e){var t=u.ErrorUtils.defaultWebErrorMessageTranslator(e);o(e,t)});t.on(t.exports.PlayerEvent.SourceLoaded,function(e){i.isShown()&&i.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}(o.Container)},4437:function(e,t){"use strict";var n=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))(function(r,o){function s(e){try{u(i.next(e))}catch(e){o(e)}}function a(e){try{u(i.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?r(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(s,a)}u((i=i.apply(e,t||[])).next())})},i=this&&this.__generator||function(e,t){var n,i,r,o={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(u){var l=[a,u];if(n)throw TypeError("Generator is already executing.");for(;s&&(s=0,l[0]&&(o=0)),o;)try{if(n=1,i&&(r=2&l[0]?i.return:l[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,l[1])).done)return r;switch(i=0,r&&(l=[2&l[0],r.value]),l[0]){case 0:case 1:r=l;break;case 4:return o.label++,{value:l[1],done:!1};case 5:o.label++,i=l[1],l=[0];continue;case 7:l=o.ops.pop(),o.trys.pop();continue;default:if(!(r=(r=o.trys).length>0&&r[r.length-1])&&(6===l[0]||2===l[0])){o=0;continue}if(3===l[0]&&(!r||l[1]>r[0]&&l[1]<r[3])){o.label=l[1];break}if(6===l[0]&&o.label<r[1]){o.label=r[1],r=l;break}if(r&&o.label<r[2]){o.label=r[2],o.ops.push(l);break}r[2]&&o.ops.pop(),o.trys.pop();continue}l=t.call(e,o)}catch(e){l=[6,e],i=0}finally{n=r=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}};Object.defineProperty(t,"__esModule",{value:!0}),t.DOM=void 0,t.DOM=function(){function e(e,t,n){if(e instanceof Array)e.length>0&&e[0]instanceof HTMLElement&&(this.elements=e);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 i=document.createElement(e);for(var r in t){var o=t[r];null!=o&&i.setAttribute(r,o)}n&&(i.component=n),this.elements=[i]}else this.elements=this.findChildElements(e)}return Object.defineProperty(e.prototype,"length",{get:function(){return this.elements?this.elements.length:0}
1,enumerable:!1,configurable:!0}),e.prototype.get=function(e){if(void 0===e)return this.elements;if(!(!this.elements||e>=this.elements.length||e<-this.elements.length))if(e<0)return this.elements[this.elements.length-e];else return 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(i){n=n.concat(t.findChildElementsOfElement(i,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 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,i){t.appendChild(e.elements[i])})})};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,i){t.insertBefore(e.elements[i],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 i=this;return e.split(" ").forEach(function(e){null==i.elements?i.documentOrShadowRoot.addEventListener(e,t,n):i.forEach(function(i){i.addEventListener(e,t,n)})}),this},e.prototype.off=function(e,t,n){var i=this;return e.split(" ").forEach(function(e){null==i.elements?i.documentOrShadowRoot.removeEventListener(e,t,n):i.forEach(function(i){i.removeEventListener(e,t,n)})}),this},e.prototype.waitForTransitionEnd=function(e){return n(this,void 0,void 0,function(){var t,n=this;return i(this,function(i){return(t=this.get(0))&&"none"!==getComputedStyle(t).transitionProperty?[2,new Promise(function(i){var r=function(o){o.target!==t||o.propertyName===e&&(n.off("transitionend",r),n.off("transitioncancel",r),i())};n.on("transitionend",r),n.on("transitioncancel",r)})]:[2]})})},e.prototype.addClass=function(e){return this.forEach(function(t){var n;if(t.classList){var i=e.split(" ").filter(function(e){return e.length>0});i.length>0&&(n=t.classList).add.apply(n,i)}else t.className+=" "+e}),this},e.prototype.removeClass=function(e){return this.forEach(function(t){var n;if(t.classList){var i=e.split(" ").filter(function(e){return e.length>0});i.length>0&&(n=t.classList).remove.apply(n,i)}else t.className=t.className.replace(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):RegExp("(^| )"+e+"( |$)","gi").test(n.className)&&(t=!0)}),t},e.prototype.css=function(e,t){return"string"!=typeof e?this.setCssCollection(e):2==arguments.length?this.setCss(e,t):this.getCss(e)},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}()},4638:(e,t)=>
1{"use strict";var n,i;Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorUtils=void 0,(i=n||(t.ErrorUtils=n={})).defaultErrorMessages={1e3:"Error is unknown",1001:"The player API is not available after a call to PlayerAPI.destroy.",1100:"General setup error",1101:"There was an error when inserting the HTML video element",1102:"No configuration was provided",1103:"The license is not valid",1104:"The the domain-locked player is not authorized to playback on this domain",1105:"The domain is not allowlisted",1106:"The license server URL is invalid",1107:"The impression server URL is invalid",1108:"Could not initialize a rendering engine",1109:"The used flash version does not support playback",1110:"Native Flash is not authorized by a valid Adobe token",1111:"Flash doesn't have sufficient resources",1112:"Flash container API not available",1113:'Protocol not supported. This site has been loaded using "file" protocol, but unfortunately this is not supported. Please load the page using a web server (using http or https)',1200:"General source error",1201:"No valid source was provided",1202:"The downloaded manifest is invalid",1203:"There was no technology detected to playback the provided source",1204:"The stream type is not supported",1205:"The forced technology is not supported",1206:"No stream found for supported technologies.",1207:"The downloaded segment is empty",1208:"The manifest could not be loaded",1209:"Progressive stream type not supported or the stream has an error",1210:"HLS stream has an error",1211:"The encryption method is not supported",1300:"General playback error",1301:"Video decoder or demuxer had an error with the content",1302:"General error if Flash renderer has an error",1303:"Flash doesn't have sufficient resources",1304:"The transmuxer could not be initialized",1400:"Network error while downloading",1401:"The manifest download timed out",1402:"The segment download timed out",1403:"The progressive stream download timed out",1404:"The Certificate could not be loaded",2e3:"General DRM error",2001:"Required DRM configuration is missing",2002:"The licensing server URL is missing",2003:"License request failed",2004:"Key or KeyId is missing",2005:"Key size is not supported",2006:"Unable to instantiate a key system supporting the required combinations",2007:"Unable to create or initialize key session",2008:"The MediaKey object could not be created/initialized",2009:"Key error",2010:"The key system is not supported",2011:"The certificate is not valid",2012:"Invalid header key/value pair for PlayReady license request",2013:"Content cannot be played back because the output is restricted on this machine",2014:"DRM error for the Flash renderer",2100:"General VR error",2101:"Player technology not compatible with VR playback",3e3:"General module error",3001:"The definition of the module is invalid (e.g. incomplete).",3002:"The module definition specifies dependencies but the module is not provided via a function for deferred loading.",3003:"A module cannot be loaded because it has not been added to the player core.",3004:"A module cannot be loaded because one or more dependencies are missing.",3100:"An Advertising module error has occurred. Refer to the attached AdvertisingError."},i.defaultMobileV3ErrorMessageTranslator=function(e){return e.message},i.defaultWebErrorMessageTranslator=function(e){var t=i.defaultErrorMessages[e.code];return t?"".concat(t,"\n(").concat(e.name,")"):"".concat(e.code," ").concat(e.name)}},5401:e=>{!function(){"use strict";self,e.exports=(self.webpackChunkbitmovin_player=self.webpackChunkbitmovin_player||[]).push([[744],{98154:function(e,t,n){var i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.AdaptationApiFactory=void 0;var r=n(23068);function o(e){return(0,r.isNumber)(e)&&e>=0}t.AdaptationApiFactory=function(){function e(){}return e.create=function(e){var t=e.getLogger(),n=function(e){t.debug("[ABR] ".concat(e))};return{setConfig:function(t){var i,s,a,u,l,c,d,p;n("Updating adaptation config with ".concat(JSON.stringify(t))),(0,r.isNumber)(t.qualityStabilityBalance)&&function(t){if(t<0||t>1)n("Failed to set qualityStabilityBalance to ".concat(t,", valid range is 0 to 1"));else{var i=e.getConfig(!0).adaptation;i&&(i.qualityStabilityBalance=t,n("Updated qualityStabilityBalance to ".concat(t)))}}(t.qualityStabilityBalance),t.resolution&&(s=(i=t.resolution).maxSelectableVideoHeight,a=i.maxSelectableVideoWidth,u=i.minSelectableVideoHeight,l=i.minSelectableVideoWidth,c=e.getConfig(!0).adaptation.resolution,o(s)&&(c.maxSelectableVideoHeight=s),o(a)&&(c.maxSelectableVideoWidth=a),o(u)&&(c.minSelectableVideoHeight=u),o(l)&&(c.minSelectableVideoWidth=l),n("Updated resolution boundaries to ".concat(JSON.stringify(c)))),(0,r.isBoolean)(t.limitToPlayerSize)&&(
1d=t.limitToPlayerSize,(p=e.getConfig(!0).adaptation)&&(p.limitToPlayerSize=d,n("Updated limitToPlayerSize to ".concat(d))))},getConfig:function(){var t=e.getConfig(!0).adaptation,n=t.qualityStabilityBalance,r=t.resolution,o=t.limitToPlayerSize;return{qualityStabilityBalance:n,resolution:i({},r),limitToPlayerSize:o}}}},e}()},89498:function(e,t,n){var i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.AdaptationHandler=void 0;var r=n(80813),o=n(98714),s=n(49859),a=n(91678),u=n(33436),l=n(86897),c=n(93204),d=n(79721),p=n(85434),h=n(70850),f=n(46057),g=n(47151),v=n(79505),y=n(49024),m=n(19119),b=n(43008),S=n(59113),E=n(7676),_=1/0;t.AdaptationHandler=function(){function e(e,t,n){var i,r,o=this;this.context=e,this.mimeType=t,this.constraints=n,this.qN=!1,this.sN=function(e){var t;return void 0===e&&(e=null==(t=o.oN)?void 0:t.getState()),e?(0,s.getPreferredBitrate)((0,s.getAdaptationState)(e),o.mimeType):null},this.hN=(0,y.createAdaptationLogic)(this.context,this.mimeType,{minBitrate:this.constraints.minBitrate,maxBitrate:this.constraints.maxBitrate},null==(r=null==(i=this.context.config)?void 0:i.adaptation)?void 0:r.logic),this.lN=this.SO(this.mN),this.zN()}return Object.defineProperty(e.prototype,"oN",{get:function(){var e=this.context.sourceContext.sourceIdentifier;return this.context.serviceManager.get(r.ServiceName.SourceStoreService,e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"rN",{get:function(){var e=this.context.sourceContext.sourceIdentifier;return this.context.serviceManager.get(r.ServiceName.ManifestService,e)},enumerable:!1,configurable:!0}),e.prototype.tN=function(e,t,n){var i,r;return e?this.lN:t&&null!=(r=null==(i=this.hN.findRepresentationForBitrate(t,n))?void 0:i._internalId)?r:null},e.prototype.uN=function(e,t){var n,i=this.vN(),r=this.sN();return i||r?this.tN(i,r,t):null!=(n=this.hN.selectRepresentationID(e,t))?n:null},e.prototype.vN=function(){return!this.isAuto()&&!!this.KO(this.lN,this.xN())},e.prototype.wN=function(e){this.iN=e},e.prototype.xN=function(){var e,t,n;return null!=(n=null==(t=null==(e=this.rN)?void 0:e.getAdaptationSet(this.mN))?void 0:t.Representation)?n:[]},e.prototype.selectRepresentationID=function(e,t){void 0===e&&(e={});var n=this.LO(null!=t?t:this.xN()),i=this.uN(e,n);return i&&this.wN(i),this.iN},e.prototype.yN=function(){var e=this,t=!!this.kN;this.oN&&!t&&(this.kN=(0,c.subscribe)(this.oN)(l.getBufferStateMap,function(t){var n,i,r=null==t?void 0:t[e.mimeType];if(r){var s=r.rendererRanges;s&&s.length>0&&(null==(n=e.oN)||n.dispatch((0,o.clearPreferredBitrateForMimeTypeAction)(e.mimeType)),null==(i=e.kN)||i.call(e),e.kN=void 0)}}))},e.prototype.zN=function(){var e=this;this.oN&&(this.sN()&&this.yN(),this.jN=(0,c.subscribe)(this.oN)(this.sN,function(){return e.yN()},function(e){return!!e}))},e.prototype.KO=function(e,t){var n;return t?t.find(function(t){return t._internalId.equals(e)}):null==(n=this.rN)?void 0:n.getRepresentationById(e)},e.prototype.LO=function(e){this.PO();var t=e.map(function(e){return{representation:e,bitrate:e._bandwidth,width:e._width,height:e._height}});return this.MO(t).map(function(e){return e.representation})},e.prototype.MO=function(e){var t=this,n=this.context.config.adaptation.resolution,i=n.minSelectableVideoHeight,r=n.maxSelectableVideoHeight,o=n.minSelectableVideoWidth,s=n.maxSelectableVideoWidth,a=e.filter(function(e){var n,a,u,l,c,d,p,h,f;return!((0,b.hasBitrate)(e)&&(n=e.bitrate,a=t.constraints.minBitrate,u=t.constraints.maxBitrate,!(n>=a)||!(n<=u)))&&(!(0,b.hasResolution)(e)||(l=e.width,c=o,d=s,l>=c&&l<=d&&(p=e.height,h=i,f=r,p>=h&&p<=f)))});if(a.length>0)return a;this.context.logger.debug("No selectable qualities found for mimeType ".concat(this.mimeType," within the given bitrate/resolution constraints! Falling back to alternative selection."));var u=this.NO(e);return u?[u]:e},e.prototype.NO=function(e){var t=0!==this.constraints.minBitrate,n=this.constraints.maxBitrate!==_,i=e.filter(b.hasBitrate);return t?(0,E.findMaximum)(i,function(e){return e.bitrate}):n?(0,E.findMinimum)(i,function(e){return e.bitrate}):p.MimeTypeHelper.isVideo(this.mimeType)?this.OO(e):void 0},e.prototype.OO=function(e){var t=this.context.config.adaptation.resolution,n=t.minSelectableVideoHeight,i=t.maxSelectableVideoHeight,r=t.minSelectableVideoWidth,o=t.maxSelectableVideoWidth,s=e.filter(b.hasResolution);return 0!==n?(0,E.findMaximum)(s,function(e){return e.height}):i!==1/0?(0,E.findMinimum)(s,function(e){return e.height}):0!==r?(0,E.findMaximum)(s,function(e){return e.width}):o!==1/0?(0,E.findMinimum)(s,function(e){return e.width}):void 0},e.prototype.PO=function(){p.MimeTypeHelper.isVideo(this.mimeType)&&(this.context.config.adaptation.limitToPlayerSize&&!this.qN?this.RO():!this.context.config.adaptation.limitToPlayerSize&&this.qN&&this.QO())},e.prototype.QO=function(){this.qN=!1,this.context.config.adaptation.onVideoAdaptation=this.pN},e.prototype.RO=function(){var e=this;this.qN=!0;var t=this.context.config.adaptation.onVideoAdaptation;this.pN=t,this.context.config.adaptation.onVideoAdaptation=t&&"function"==typeof t?function(n){var i,r,o;
1return n.suggested=(0,m.AdaptToPlayerResolution)(e.context.internalPlayer,n.suggested,null!=(r=null==(i=e.nN)?void 0:i.isFullscreen())&&r)||n.suggested,null!=(o=(0,h.safeUserCallback)(function(){return t(n)},e.context.logger))?o:n.suggested}:function(t){var n,i;return(0,m.AdaptToPlayerResolution)(e.context.internalPlayer,t.suggested,null!=(i=null==(n=e.nN)?void 0:n.isFullscreen())&&i)||t.suggested}},e.prototype.SO=function(e){return e?new v.RepresentationId(e,"auto"):new v.RepresentationId(new g.AdaptationSetId(d.DEFAULT_PERIOD_ID,this.mimeType),"auto")},e.prototype.TO=function(e){var t,n={id:e._id,bitrate:e._bandwidth,width:e._width,height:e._height};null==(t=this.context.store)||t.dispatch((0,a.addMetricsValue)(this.mimeType,u.MetricType.DownloadedAdaptationSet,n))},e.prototype.UO=function(){var e,t,n=this;if(this.rN){var r=this.rN.getAdaptationSet(this.mN);if(r){var o=i(i({},r),{Representation:this.LO(r.Representation),_minBandwidth:Math.max(null!=(e=r._minBandwidth)?e:0,this.constraints.minBitrate),_maxBandwidth:Math.min(null!=(t=r._maxBandwidth)?t:_,this.constraints.maxBitrate)});this.hN.setAdaptationSet(o),(0,f.yieldToMain)().then(function(){return n.TO(o)})}}else this.context.logger.debug("Could not update adaptation set in AdaptationHandler!")},e.prototype.VO=function(e){return this.mN&&e&&this.rN?this.rN.getRepresentation(this.mN,e):null},e.prototype.WO=function(){if(this.lN){var e=this.lN.representationId;this.lN=this.SO(this.mN);var t=this.VO(e);t&&(this.lN=t._internalId)}else this.lN=this.SO(this.mN)},e.prototype.setAdaptationSetId=function(e){e||this.context.logger.debug("newAdaptationSetId is ".concat(e)),this.mN=e,this.WO(),this.UO()},e.prototype.setFixedRepresentation=function(e){var t;if("auto"===e)this.lN=new v.RepresentationId(this.mN,"auto");else if(this.mN){var n=null==(t=this.rN)?void 0:t.getRepresentation(this.mN,e);n&&(this.lN=n._internalId,this.selectRepresentationID())}},e.prototype.getFixedRepresentation=function(){return this.iN},e.prototype.getLowestRepresentationId=function(){var e;return this.isAuto()?null==(e=this.hN.getLowestRepresentation())?void 0:e._internalId.representationId:this.lN.representationId},e.prototype.isAuto=function(){return"auto"===this.lN.representationId},e.prototype.shouldDownloadBeCancelled=function(e,t){var n,i,r,o,s,a,u,l=null!=(i=null==(n=this.context.config.adaptation)?void 0:n.disableDownloadCancelling)&&i,c=null!=(s=null==(o=null==(r=this.rN)?void 0:r.getAdaptationSet(this.mN))?void 0:o.Representation)?s:[],d=1===c.length,p=c.some(function(e){return!!e._bandwidth});if(!this.isAuto()||l||d||!p)return!1;var h=function(e){if(!(0,E.hasTotalBytes)(e))return 1/0;var t,n,i=(n=null!=(t=e.elapsedTime)?t:0,e.loadedBytes>0&&n>0?8*e.loadedBytes/1024/n:0);return i>0?8*e.totalBytes/1024/i:1/0}(e),f=(null!=(u=null==(a=e.responseTiming)?void 0:a.doneTimestamp)?u:0)>0,g=!!e.segmentDuration&&h>1.5*e.segmentDuration;return!(f||!g)&&(!(0,E.hasTotalBytes)(e)||!(e.loadedBytes>=.9*e.totalBytes))&&this.hN.shouldDownloadBeCancelled(e,t)},e.prototype.setStartupPhase=function(){this.hN.setStartupPhase()},e.prototype.addSample=function(e){this.hN.addSample(i({timestamp:Date.now()},e))},e.prototype.shutdown=function(){this.hN.shutdown()},e.prototype.dispose=function(){var e,t;this.shutdown(),this.hN.dispose(),null==(e=this.jN)||e.call(this),null==(t=this.kN)||t.call(this)},e.prototype.selectQualityBasedOnBitrateMeasurement=function(e){var t=this.MO(e),n=this.sN();if(n)return(0,S.findQualityForBitrate)(n,t);if(this.vN()){var i=this.LO(this.xN()),r=this.KO(this.iN,i);if(r)return(0,S.findQualityForBitrate)(r._bandwidth,t)}return(0,S.findQualityForBitrate)(this.hN.getCurrentBitrateMeasurement(),t)},e}()},49024:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.createAdaptationLogic=function(e,t,n,l){var c=n.minBitrate,d=n.maxBitrate;return void 0===l&&(l=i.AdaptationLogicType.DOWNLOAD_PREDICTION),e.logger.debug("Using adaptation logic ".concat(l)),l===i.AdaptationLogicType.LOW_LATENCY?new a.LowLatencyAbr(e,t):l===i.AdaptationLogicType.WISH?new u.WishLogic(e,t):l===i.AdaptationLogicType.DOWNLOAD_PREDICTION?new s.DownloadPredictionLogic(e,t):l===i.AdaptationLogicType.BUFFER_FILL_RATE?new r.BufferFillRateLogic(e,t):new o.BufferLogic(e,t,c||0,d||1/0)};var i=n(21281),r=n(48968),o=n(39201),s=n(85696),a=n(24296),u=n(7290)},49541:function(e,t,n){t.X=void 0;var i=n(85434),r=n(89498),o=n(83429);t.X=function(){function e(e){this.context=e,this.mi=new Map}return e.prototype.ni=function(e){if(e){if(!this.mi.has(e)){var t,n,o=(t=this.context.settings,n={minBitrate:0,maxBitrate:1/0},i.MimeTypeHelper.isVideo(e)?(n.minBitrate=Number(t.MIN_SELECTABLE_VIDEO_BITRATE)||n.minBitrate,n.maxBitrate=Number(t.MAX_SELECTABLE_VIDEO_BITRATE)||n.maxBitrate):i.MimeTypeHelper.isAudio(e)&&(n.minBitrate=Number(t.MIN_SELECTABLE_AUDIO_BITRATE)||n.minBitrate,n.maxBitrate=Number(t.MAX_SELECTABLE_AUDIO_BITRATE)||n.maxBitrate),n);this.mi.set(e,new r.AdaptationHandler(this.context,e,o))}return this.mi.get(e)}},e.prototype.selectRepresentation=function(e,t,n){var i,r;return void 0===t&&(t={}),null!=(r=null==(i=this.ni(e))?void 0:i.selectRepresentationID(t,n))?r:void 0},e.prototype.isAuto=function(e){var t,n;return null==(n=null==(t=this.ni(e))?void 0:t.isAuto())||n},e.prototype.shouldDownloadBeCancelled=function(e,t,n){var i,r;return null!=(r=null==(i=this.ni(e))?void 0:i.shouldDownloadBeCancelled(t,n))&&r},e.prototype.selectQualityBasedOnBitrateMeasurement=function(e,t){var n=t?this.mi.get(t):this.oi(),r=null;n||(r=null!=t?t:i.MimeType.VideoMp4,n=this.ni(r));var o=null==n?void 0:n.selectQualityBasedOnBitrateMeasurement(e);return r&&this.release(r),null!=o?o:e[0]},e.prototype.oi=function(){var e=void 0;
1return this.mi.forEach(function(t,n){e&&!i.MimeTypeHelper.isVideo(n)||(e=t)}),e},e.prototype.setAdaptationSetId=function(e,t){var n;null==(n=this.ni(e))||n.setAdaptationSetId(t)},e.prototype.setFixedRepresentation=function(e,t){var n;null==(n=this.ni(e))||n.setFixedRepresentation(t)},e.prototype.getCurrentRepresentationId=function(e){var t,n;return null!=(n=null==(t=this.ni(e))?void 0:t.getFixedRepresentation())?n:null},e.prototype.getLowestRepresentationId=function(e){var t;return null==(t=this.ni(e))?void 0:t.getLowestRepresentationId()},e.prototype.setStartupPhase=function(e){var t;null==(t=this.ni(e))||t.setStartupPhase()},e.prototype.shutdown=function(e){var t;null==(t=this.ni(e))||t.shutdown()},e.prototype.addSample=function(e,t){var n;null==(n=this.ni(e))||n.addSample(t)},e.prototype.getUserSelectedRepresentation=function(e,t,n){return(0,o.getUserSelectedRepresentation)(this.context,e,t,n)},e.prototype.release=function(e){var t;null==(t=this.mi.get(e))||t.dispose(),this.mi.delete(e)},e.prototype.dispose=function(){this.mi.forEach(function(e){return e.dispose()}),this.mi.clear()},e}()},81723:function(e,t,n){var i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.BaseAdaptationLogic=void 0;var r=n(46151),o=n(15971),s=n(85434),a=n(89927),u=n(88844),l=n(59113),c=n(59406),d=n(70238),p=n(7676);t.BaseAdaptationLogic=function(){function e(e,t){this.context=e,this.mimeType=t,this.lastRateMeasurement=0,this.availableRepresentations=[],this.startupPhase=!0,this.lastDownloadCancelled=!1,this.monitoringMimeType=this.getMonitoringMimeType()}return e.prototype.getMonitoringMimeType=function(){var e,t=null,n=null==(e=this.context.store)?void 0:e.getState();return n&&(t=Object.keys((0,r.getMetricsState)(n)).find(s.MimeTypeHelper.isVideo)),null!=t?t:this.mimeType},e.prototype.updateAvailableRepresentations=function(e){e&&(this.availableRepresentations=e.map(function(e,t){return i(i({},e),{arrayIndex:t})}))},e.prototype.getAvailableRepresentations=function(){var e,t=this;return this.lastDownloadCancelled&&(null==(e=this.lastRepresentation)?void 0:e._bandwidth)?this.availableRepresentations.filter(function(e){var n=e._bandwidth;return t.lastRepresentation&&n<t.lastRepresentation._bandwidth}):this.availableRepresentations},e.prototype.setAdaptationSet=function(e){var t,n,i;if(this.updateAvailableRepresentations(e.Representation),this.lastRepresentation)this.lastRepresentation=this.findRepresentationForBitrate(this.lastRepresentation._bandwidth,e.Representation);else{var r=null==(i=null==(n=null==(t=(0,o.getSourceState)(this.context))?void 0:t.activeTracks)?void 0:n[e._internalId.adaptationSetId])?void 0:i.selectedRepresentationId;this.lastRepresentation=r?this.availableRepresentations.find(function(e){return e._internalId.equals(r)}):void 0}},e.prototype.findRepresentationForBitrate=function(e,t){var n,i;return this.updateAvailableRepresentations(t),null!=(i=null==(n=(0,l.findQualityForBitrate)(e,this.getAvailableRepresentations().map(function(e){return{rep:e,bitrate:Number(e._bandwidth)}})))?void 0:n.rep)?i:this.getLowestRepresentation()},e.prototype.checkStartupPhase=function(e){this.startupPhase&&this.Dib(e)},e.prototype.getLowestRepresentation=function(){return(0,p.getLowestRepresentation)(this.availableRepresentations)},e.prototype.Dib=function(e){var t=this,n=this.context.bufferSettings.getForwardTargetLevel();this.startupPhaseTimerID||(this.startupPhaseTimerID=window.setTimeout(function(){t.context.logger.insane("startup phase timed out... moving to normal adaptation"),t.startupPhase=!1,t.startupPhaseTimerID=void 0},(0,a.toMilliSeconds)(n))),e.value>=.5*n&&(this.context.logger.insane("startup is over as steady phase has been reached... moving to normal adaptation"),(0,u.clearTimeoutIfDefined)(this.startupPhaseTimerID),this.startupPhase=!1,this.startupPhaseTimerID=void 0)},e.prototype.getRepresentationForNormalChange=function(e,t,n){return this.startupPhase||!n?this.getRepresentationForRateMeasurement(d.SwitchingAggressiveness.Mid):this.getRepresentationToSwitchTo(t.result,e.result)},e.prototype.getCurrentBitrate=function(e){return this.lastDownloadCancelled?this.lastRateMeasurement:e.value},e.prototype.getRepresentationToSwitchTo=function(e,t){if(this.lastDownloadCancelled)return this.switchDown(d.SwitchingAggressiveness.VeryHigh);switch(e){case c.Rules.SHOULD_SWITCH_UP:return this.ifFillStateHigh(t);case c.Rules.SHOULD_STAY:return this.ifFillStateMid(t);case c.Rules.SHOULD_SWITCH_DOWN:return this.ifFillStateLow(t);default:return this.context.logger.insane("unknown fill state result, keep the current representation"),this.useLastRepresentation()}},e.prototype.switchUp=function(e){if(void 0===e&&(e=d.SwitchingAggressiveness.Conservative),void 0!==(null==(t=this.lastRepresentation)?void 0:t.arrayIndex)&&this.lastRepresentation.arrayIndex>=this.availableRepresentations.length-1)return this.lastRepresentation;var t,n=this.getRepresentationForRateMeasurement(e);return this.lastRepresentation&&Number(n._bandwidth)<=Number(this.lastRepresentation._bandwidth)?this.lastRepresentation:(this.context.logger.insane("switching up to "+n._id),n)},e.prototype.switchDown=function(e){if(void 0===e&&(e=d.SwitchingAggressiveness.VeryHigh),void 0!==(null==(t=this.lastRepresentation)?void 0:t.arrayIndex)&&(null==(n=this.lastRepresentation)?void 0:n.arrayIndex)<1&&null!==(null==(i=this.lastRepresentation)?void 0:i._id))return this.context.logger.insane(this.mimeType+" is already on the lowest quality, can not switch to lower quality."),this.lastRepresentation;var t,n,i,r,o=this.getRepresentationForRateMeasurement(e);return this.lastRepresentation&&(!o||o._bandwidth>=(null==(r=this.lastRepresentation)?void 0:r._bandwidth))?(o=this.getOneRepresentationLower(),this.context.logger.insane("step-wise switch down to "+o._id)):this.context.logger.insane("switching down to "+o._id),o},e.prototype.stay=function(){var e;return null!=(e=this.lastRepresentation)?e:this.getLowestRepresentation()},e.prototype.ifFillStateHigh=function(e){switch(e){case c.Rules.SHOULD_SWITCH_UP:return this.switchUp(d.SwitchingAggressiveness.VeryHigh);case c.Rules.SHOULD_STAY:return this.switchUp(d.SwitchingAggressiveness.High);case c.Rules.SHOULD_SWITCH_DOWN:return this.stay();default:return this.context.logger.insane("unknown fill rate result, keep the current representation"),this.stay()}},e.prototype.ifFillStateMid=function(e){switch(e){case c.Rules.SHOULD_SWITCH_UP:return this.switchUp(d.SwitchingAggressiveness.Mid);case c.Rules.SHOULD_STAY:return this.stay();case c.Rules.SHOULD_SWITCH_DOWN:return this.switchDown(d.SwitchingAggressiveness.High);default:return this.context.logger.insane("unknown fill rate result, keep the current representation"),this.stay()}},e.prototype.ifFillStateLow=function(e){switch(e){case c.Rules.SHOULD_SWITCH_UP:return this.stay();case c.Rules.SHOULD_STAY:return this.switchDown(d.SwitchingAggressiveness.High);case c.Rules.SHOULD_SWITCH_DOWN:return this.switchDown(d.SwitchingAggressiveness.VeryHigh);default:return this.context.logger.insane("unknown fill rate result, keep the current representation"),this.stay()}},e.prototype.useLastRepresentation=function(){var e;return(null==(e=this.lastRepresentation)?void 0:e._id)?this.lastRepresentation:this.getLowestRepresentation()},e.prototype.getOneRepresentationLower=function(){var e,t,n=Math.max(0,(null!=(t=null==(e=this.lastRepresentation)?void 0:e.arrayIndex)?t
1:0)-1);return this.availableRepresentations[n]},e}()},48968:function(e,t,n){var i,r=this&&this.__extends||(i=function(e,t){return(i=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])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.BufferFillRateLogic=void 0;var o=n(46151),s=n(33436),a=n(88844),u=n(81723),l=n(4865),c=n(20066),d=n(64463),p=n(70238);t.BufferFillRateLogic=function(e){function t(t,n){var i=e.call(this,t,n)||this;return i.Mfb=0,i.shouldDownloadBeCancelled=function(e,t){var n,r;return 0!==(null==(n=i.lastRepresentation)?void 0:n.arrayIndex)&&i.Rfb()._id!==(null==(r=i.lastRepresentation)?void 0:r._id)&&(i.lastDownloadCancelled=!0,!0)},i.Lfb={bufferFillRate:new c.BufferFillRateRule(i.context,i.monitoringMimeType),bufferFillState:(0,d.BufferFillStateRule)(i.context,i.monitoringMimeType),rateMeasurement:new l.BlockBasedRateMeasurementRule(i.context,i.monitoringMimeType)},i}return r(t,e),t.prototype.getRepresentationForRateMeasurement=function(e){void 0===e&&(e=p.SwitchingAggressiveness.Mid);var t=this.Lfb.rateMeasurement.getStatus(e),n=this.context.settings.RATE_SAFETY_MARGIN_PERCENTAGE/100,i=t.value*(1-n);return this.findRepresentationForBitrate(i)},t.prototype.addSample=function(e){Object.values(this.Lfb).forEach(function(t){return t.addSample(e)})},t.prototype.Nfb=function(e){var t=this.switchDown(p.SwitchingAggressiveness.VeryHigh);return this.context.logger.insane("connection dropped more than half, use aggressive adaptation [last="+this.lastRateMeasurement/1024+"kbps, current="+e/1024+"], using "+t._id),t},t.calcEstimatedDownloadDuration=function(e,t,n,i){var r=parseFloat((n*e/t).toFixed(2));return i&&(r*=2),1.1*r},t.prototype.Ofb=function(e,n,i,r,o){var s=t.calcEstimatedDownloadDuration(i,e,n,o);return s<r||s<=i},t.prototype.Pfb=function(e,t,n,i){var r,o,s,a,u=null==e?void 0:e.hlsDependentSegments;if(u&&null!==(null==(r=this.lastRepresentation)?void 0:r._id)&&(null==(o=this.lastRepresentation)?void 0:o.arrayIndex)!==t.arrayIndex){var l=Math.min.apply(null,this.availableRepresentations.map(function(e){return Number(e._bandwidth)})),c=Number(t._bandwidth);if(!(isFinite(c)&&c===l||this.Ofb(n,t._bandwidth,e.segmentDuration,i,u))){for(var d=!1,p=null!=(s=t.arrayIndex)?s:-1;p>=0;p--){var h=this.availableRepresentations[p];if(this.Ofb(n,h._bandwidth,e.segmentDuration,i,u)){this.context.logger.insane("fall back to "+h.arrayIndex),t=h,d=!0;break}}d||(this.context.logger.insane("keep old rep for now, not switching from "+(null==(a=this.lastRepresentation)?void 0:a.arrayIndex)+" to "+t.arrayIndex),t=this.useLastRepresentation())}}return t},t.prototype.Qfb=function(e){var t,n=this.lastRateMeasurement>0&&2*e<=this.lastRateMeasurement;return n&&(null==(t=this.lastRepresentation)?void 0:t._id)?1.5*e<this.lastRepresentation._bandwidth:n},t.prototype.Rfb=function(e){var t,n,i=this.context.store.getState();i&&(n=(0,o.getMetricsState)(i));var r,a=this.Lfb.bufferFillState.getStatus(),u=this.Lfb.bufferFillRate.getStatus(),l=this.Lfb.rateMeasurement.getStatus(1).value,c=null!=n&&this.context.bufferSettings.getForwardTargetLevel()>n.default.bufferLogicActivationThreshold,d=this.Qfb(l);this.checkStartupPhase(a),r=d?this.Nfb(l):this.getRepresentationForNormalChange(u,a,c);var h=(0,o.getMetricsLastEntry)(null!=n?n:{},this.mimeType,s.MetricType.StalledSeconds).value;return h>this.Mfb?(this.Mfb=h,this.switchDown(p.SwitchingAggressiveness.MidHigh)):(r=this.Pfb(e,r,l,a.value),this.lastRateMeasurement=l,this.lastDownloadCancelled&&void 0!==r.arrayIndex&&void 0!==(null==(t=this.lastRepresentation)?void 0:t.arrayIndex)&&r.arrayIndex>=this.lastRepresentation.arrayIndex&&(r=this.getOneRepresentationLower(),this.lastDownloadCancelled=!1),r)},t.prototype.selectRepresentationID=function(e,t){return this.updateAvailableRepresentations(t),this.lastRepresentation=this.Rfb(e),this.lastRepresentation._internalId},t.prototype.setAdaptationSet=function(t){e.prototype.setAdaptationSet.call(this,t),null!=this.lastRepresentation||(this.lastRepresentation={_id:null,_bandwidth:0,arrayIndex:-1})},t.prototype.getCurrentBitrateMeasurement=function(){return this.getCurrentBitrate(this.Lfb.rateMeasurement.getStatus())},t.prototype.getAvailableRepresentations=function(){return this.availableRepresentations},t.prototype.setStartupPhase=function(){this.startupPhase=!0,(0,a.clearTimeoutIfDefined)(this.startupPhaseTimerID),this.startupPhaseTimerID=void 0,Object.values(this.Lfb).forEach(function(e){return e.setStartupPhase()})},t.prototype.shutdown=function(){(0,a.clearTimeoutIfDefined)(this.startupPhaseTimerID),this.startupPhaseTimerID=void 0,this.lastDownloadCancelled=!1,Object.values(this.Lfb).forEach(function(e){return e.shutdown()})},t.prototype.dispose=function(){this.shutdown(),Object.values(this.Lfb).forEach(function(e){return e.dispose()}),this.Lfb={},this.lastRepresentation=void 0,this.availableRepresentations=[]},t}(u.BaseAdaptationLogic)}
1,39201:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.BufferLogic=void 0;var i=n(85434),r=n(96533),o=n(7676);t.BufferLogic=function(){function e(e,t,n,r){this.context=e,this.mimeType=t,this.minSelectableBitrate=n,this.maxSelectableBitrate=r,this.ggb=[],this.Sfb=i.MimeTypeHelper.getMediaType(this.mimeType),this.fgb={timestamp:Date.now(),bufferLevel:0,bufferTargetLevel:0}}return e.prototype.hgb=function(e){e&&(this.ggb=e)},e.prototype.igb=function(){return(0,r.findLowestPossibleBandwidthFromRepresentations)(this.ggb,this.minSelectableBitrate)},e.prototype.jgb=function(){var e;return null==(e=this.findRepresentationForBitrate(this.maxSelectableBitrate))?void 0:e._bandwidth},e.prototype.kgb=function(){return this.context.bufferSettings.getForwardTargetLevel(this.Sfb)},e.prototype.lgb=function(){var e=this.igb(),t=this.jgb();return this.egb=this.kgb(),function(e,t,n){var i=[];0===t&&(t=e);var r=2*Math.floor(.1*n),o=8*Math.floor(.1*n);o<=r&&(o=Math.floor(.9*n)),r<=1&&(r=1);for(var s=(t-e)/(o-r),a=e-s*r,u=0;u<r;u++)i[u]=e;for(u=r;u<o;u++)i[u]=Math.floor(s*u+a);for(u=o;u<=n;u++)i[u]=t;return i}(e,t||e,this.egb)},e.prototype.mgb=function(){var e=this.kgb();this.egb!==e&&(this.Tfb=this.lgb())},e.prototype.findRepresentationForBitrate=function(e,t){return this.hgb(t),(0,r.getMatchingRepresentationByBandwidth)(this.ggb,e)},e.prototype.ngb=function(){var e,t=this.kgb(),n=this.fgb.bufferLevel;return(n=Math.floor(n))>t&&(n=t),e=this.Tfb.hasOwnProperty(n)?this.Tfb[n]:this.Tfb[0],this.findRepresentationForBitrate(e)},e.prototype.selectRepresentationID=function(e,t){this.hgb(t);var n=this.ngb();return this.mgb(),n._internalId},e.prototype.setAdaptationSet=function(e){this.hgb(e.Representation),this.Tfb=this.lgb()},e.prototype.shouldDownloadBeCancelled=function(){return!1},e.prototype.setStartupPhase=function(){},e.prototype.shutdown=function(){},e.prototype.addSample=function(e){this.fgb=e},e.prototype.dispose=function(){this.Tfb=[]},e.prototype.getCurrentBitrateMeasurement=function(){return 0},e.prototype.getLowestRepresentation=function(){return(0,o.getLowestRepresentation)(this.ggb)},e}()},11958:function(e,t,n){var i,r=this&&this.__extends||(i=function(e,t){return(i=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])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.CancellableAdaptationLogic=void 0;var o=n(80813),s=n(4131),a=n(21281),u=n(46151),l=n(33436),c=n(81199),d=n(81723),p=n(39185),h=n(45199),f=n(17006),g=n(70238),v=n(7676);function y(e){var t,n,i,r,o=null!=(n=null==(t=e.responseTiming)?void 0:t.openedTimestamp)?n:-1,s=null!=(r=null==(i=e.responseTiming)?void 0:i.headersReceivedTimestamp)?r:-1;return o<0||s<0?0:s-o}function m(e,t){var n=e.filter(function(e){return e.value.representationId.equals(t)}).slice(-3).map(function(e){return e.value.time});return(0,f.calculateExponentialWeightedAverage)(n,.8)}t.CancellableAdaptationLogic=function(e){function t(t,n){var i=e.call(this,t,n)||this;return i.shouldDownloadBeCancelled=function(e,t){var n,r,o,a,u=null!=(o=e.elapsedTime)?o:-1,l=null==(a=i.Fib)?void 0:a.isPaused(),c=i.isStartupBitrateInEffect(),d=(r=null!=(n=e.elapsedTime)?n:-1)<0?0:r-y(e),p=i.Gib(t),h=(0,s.hasLoadedData)(e),f=h?d>i.context.settings.MIN_EFFECTIVE_SEGMENT_DOWNLOAD_TIME:u>i.context.settings.MIN_EFFECTIVE_SEGMENT_DOWNLOAD_TIME;return!(l||c||p||!f)&&i.Tib(e,d,h,u)},i.timeToFirstByteMeasurementRule=new h.TimeToFirstByteMeasurementRule(i.context,i.monitoringMimeType),i.rateMeasurementRule=new p.SegmentBasedRateMeasurementRule(i.context,i.monitoringMimeType),i}return r(t,e),Object.defineProperty(t.prototype,"Eib",{get:function(){return this.context.serviceManager.get(o.ServiceName.ManifestService,this.context.sourceContext.sourceIdentifier)}
1,enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"Fib",{get:function(){return this.context.serviceManager.get(o.ServiceName.PlayerStateService)},enumerable:!1,configurable:!0}),t.prototype.setAdaptationSet=function(t){e.prototype.setAdaptationSet.call(this,t),this.previousRequestProgress=void 0},t.prototype.isStartupBitrateInEffect=function(){var e,t=this.context.store.getState(),n=t?(0,u.getMetricsHistoryFromInstanceState)(t,this.mimeType,l.MetricType.DownloadInformation):[],i=!!(null==(e=this.context.config.adaptation)?void 0:e.startupBitrate),r=n.filter(function(e){return!!e.value}).length>0;return i&&!r},t.prototype.Gib=function(e){return!!e&&this.getLowestRepresentation()._internalId.equals(e)},t.prototype.Hib=function(){return(0,c.getPlayableBufferLevel)(this.context.internalPlayer)},t.prototype.estimateTimeToFirstByte=function(e){var t,n,i;switch(void 0===e&&(e=0),t=0!==e?this.timeToFirstByteMeasurementRule.estimateStatus(e,5,.2).value:this.timeToFirstByteMeasurementRule.getStatus(5,.2).value,null!=(i=null==(n=this.context.config.adaptation)?void 0:n.rttEstimationMethod)?i:a.RttEstimationMethod.WeightedAverage){case a.RttEstimationMethod.Median:return t.median;case a.RttEstimationMethod.WeightedAverage:default:return t.standardDeviation>t.mean?t.mean+t.standardDeviation:t.weightedAverage}},t.prototype.Iib=function(e,t,n,i,r,o){var s,a,c,d,p,h,g,v,y,b,S,E,_,T=null!=(v=null==(g=this.Eib)?void 0:g.isManifestFetchRequired(e))&&v,P=!this.Kib(e),C=null!=(y=null==o?void 0:o.hlsDependentSegments)&&y,A=null!=(S=null==(b=this.Eib)?void 0:b.getRepresentationById(e))?S:null,w=!!this.lastRepresentation&&null!==(null==(E=this.lastRepresentation)?void 0:E._id)&&(null==(_=this.lastRepresentation)?void 0:_.arrayIndex)!==(null==A?void 0:A.arrayIndex),k=this.context.store.getState(),O=i*t/n+r;return O+=(s=this.mimeType,a=k?(0,u.getMetricsState)(k):{},m((0,u.getMetricsHistory)(a,s,l.MetricType.DecryptionTime),e)+m((0,u.getMetricsHistory)(a,s,l.MetricType.TransmuxingTime),e)),C&&w&&(O*=2),P&&(O+=r),T&&(O+=Math.max((d=c=k?(0,u.getMetricsState)(k):{},p=(0,u.getMetricsHistory)(d,"default",l.MetricType.DownloadInformation).slice(-3).map(function(e){return e.value.time}),(0,f.calculateExponentialWeightedAverage)(p,.8)+(h=(0,u.getMetricsHistory)(c,"default",l.MetricType.ProcessingTime).slice(-3).map(function(e){return e.value}),(0,f.calculateExponentialWeightedAverage)(h,.8))),r)),O},t.prototype.Jib=function(e,t,n,i){var r=1-this.context.settings.DOWNLOAD_DURATION_SAFETY_MARGIN,o=(i?this.context.settings.MAXIMUM_DOWNLOAD_DURATION_MULTIPLIER_SAME_QUALITY:this.context.settings.MAXIMUM_DOWNLOAD_DURATION_MULTIPLIER)-r;return Math.min(e*(r+Math.min(t,n)*o/n),n)},t.prototype.isDownloadFeasible=function(e,t,n,i,r,o,s){var a,u=e.arrayIndex===(null==(a=this.lastRepresentation)?void 0:a.arrayIndex),l=this.Jib(n,o,s,u);return this.Iib(e._internalId,n,t,e._bandwidth,r,{hlsDependentSegments:i})<=l},t.prototype.Kib=function(e){var t,n,i=this.context.store.getState(),r=i?(0,u.getMetricsHistoryFromInstanceState)(i,this.mimeType,l.MetricType.CachedInitSegments):[];return 0===r.length?null!=(n=null==(t=this.Eib)?void 0:t.hasSelfInitialisingSegments())&&n:r.some(function(t){var n=t.hasOwnProperty("value")&&t.value.hasOwnProperty("internalRepId")?t.value.internalRepId:null;return null!==n&&n.equals(e)})},t.prototype.Lib=function(e,t,n){var i=this;void 0===n&&(n=this.estimateTimeToFirstByte());var r=this.availableRepresentations.filter(function(e){var t;return i.lastRepresentation&&!e._internalId.equals(null==(t=i.lastRepresentation)?void 0:t._internalId)});return Math.min.apply(Math,r.map(function(r){var o;return i.Iib(r._internalId,null!=(o=i.lastSegmentInfo?i.lastSegmentInfo.segmentDuration:t)?o:0,e,r._bandwidth,n,i.lastSegmentInfo)}))},t.prototype.Mib=function(e){var t,n,i,r,o,s,a=null!=(t=e.elapsedTime)?t:0,u=(null==(n=this.previousRequestProgress)?void 0:n.url)===e.url?(e.loadedBytes-(null!=(r=null==(i=this.previousRequestProgress)?void 0:i.loadedBytes)?r:0))/(a-(null!=(s=null==(o=this.previousRequestProgress)?void 0:o.elapsedTime)?s:0)):-1;return this.previousRequestProgress=e,u},t.prototype.Nib=function(e,t){var n,i=t?y(e):null!=(n=e.elapsedTime)?n:0;return this.estimateTimeToFirstByte(i)},t.prototype.Oib=function(e){return void 0===e&&(e=4),this.lastRepresentation?this.lastRepresentation._bandwidth/8*e*1.2:0},t.prototype.Pib=function(e,t){var n=(0,s.hasLoadedData)(e),i=n?this.Mib(e):0,r=n&&(0,v.hasTotalBytes)(e)?e.totalBytes-e.loadedBytes:this.Oib(e.segmentDuration);return Math.min(r/(t/8),i>0?r/i:1/0)},t.prototype.Qib=function(e,t,n){if((0,s.hasLoadedData)(e))return e.loadedBytes/t*8;var i=this.context.bufferSettings.getForwardTargetLevel(),r=this.rateMeasurementRule.getStatus(g.SwitchingAggressiveness.Mid,n/i);return this.getCurrentBitrate(r)},t.prototype.Rib=function(e,t,n,i,r){var o=this.Pib(i,n);return o>t&&o>r&&t<=r+e},t.prototype.Sib=function(e,t,n,i){var r,o;return(null==(o=null==(r=this.Fib)?void 0:r.isPlay())||!o)&&i>Math.max(e,3*this.timeToFirstByteMeasurementRule.getStatus(5,.2).value.mean)&&t<=n+e},t.prototype.Tib=function(e,t,n,i){var r,o,s,a=this.Hib(),u=this.Qib(e,t,a),l=this.Nib(e,n),c=null!=(s=null!=(r=e.segmentDuration)?r:null==(o=this.lastSegmentInfo)?void 0:o.segmentDuration)?s:0,d=this.Lib(u,c,l);if(n?this.Rib(c,a,u,e,d):this.Sib(c,a,d,i)){var p=(0,v.hasTotalBytes)(e)?(e.loadedBytes/e.totalBytes*100).toFixed(1):void 0;return this.context.logger.debug("Cancelling download after ".concat(i.toFixed(2),"s, bw: ").concat((0,v.toKbps)(u).toFixed(2),"kbps, buffer: ").concat(a.toFixed(2),"s, ").concat(n?"".concat(p,"% progress"):"headers not received")),this.lastDownloadCancelled=!0,this.lastRateMeasurement=u,!0}return!1},t}(d.BaseAdaptationLogic)},85696:function(e,t,n){var i,r=this&&this.__extends||(i=function(e,t){return(i=Object.
1setPrototypeOf||({__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])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.DownloadPredictionLogic=void 0;var o=n(13531),s=n(70962),a=n(46151),u=n(88844),l=n(11958),c=n(64463),d=n(43829),p=n(70238),h=n(7676);t.DownloadPredictionLogic=function(e){function t(t,n){var i=e.call(this,t,n)||this;return i.ogb=new d.DownloadRateRule(i.context,i.monitoringMimeType),i.pgb=(0,c.BufferFillStateRule)(i.context,i.monitoringMimeType),i}return r(t,e),t.prototype.getRepresentationForRateMeasurement=function(e){void 0===e&&(e=p.SwitchingAggressiveness.Mid);var t=this.context.bufferSettings.getForwardTargetLevel(),n=this.pgb.getStatus().value,i=this.rateMeasurementRule.getStatus(e,n/t),r=this.getCurrentBitrate(i),o=(0,h.adjustRateToSafetyMargin)(r,this.context.settings.RATE_SAFETY_MARGIN_PERCENTAGE);return this.findRepresentationForBitrate(o)},t.prototype.getCurrentBitrateMeasurement=function(){var e=this.getCurrentBitrate(this.rateMeasurementRule.getStatus());return(0,h.adjustRateToSafetyMargin)(e,this.context.settings.RATE_SAFETY_MARGIN_PERCENTAGE)},t.prototype.addSample=function(e){this.ogb.addSample(e),this.pgb.addSample(e),this.rateMeasurementRule.addSample(),this.timeToFirstByteMeasurementRule.addSample()},t.prototype.qgb=function(e,t,n,i,r){var o=this;if(!e.segmentDuration||this.isStartupBitrateInEffect())return t;this.lastSegmentInfo=e;var s=this.availableRepresentations.filter(function(e){return e._bandwidth<=t._bandwidth});if(0===s.length)return this.availableRepresentations[0];var a=r.value||0,u=this.context.bufferSettings.getForwardTargetLevel(),l=(0,h.adjustRateToSafetyMargin)(n,this.context.settings.RATE_SAFETY_MARGIN_PERCENTAGE),c=s.filter(function(t){var n;return o.isDownloadFeasible(t,l,null!=(n=e.segmentDuration)?n:0,!1,i,a,u)});return 0===c.length?s[0]:c[c.length-1]},t.prototype.rgb=function(e,t,n,i){this.checkStartupPhase(t);var r,o,u=this.context.store.getState(),l=null!=(o=null==(r=(u?(0,a.getMetricsState)(u):{}).default)?void 0:r.bufferLogicActivationThreshold)?o:s.DefaultSettings.BUFFER_LOGIC_ACTIVATION_THRESHOLD,c=this.context.bufferSettings.getForwardTargetLevel()>l,d=this.getRepresentationForNormalChange(n,t,c);if(i){var p=this.estimateTimeToFirstByte();d=this.qgb(i,d,e,p,t)}return d},t.prototype.selectRepresentationID=function(e,t){this.updateAvailableRepresentations(t);var n,i,r,s,a=this.rateMeasurementRule.getStatus(),u=this.getCurrentBitrate(a),l=this.pgb.getStatus(),c=this.ogb.getStatus(),d=this.rgb(u,l,c,e);return this.lastRepresentation&&!(null==(i=null==(n=this.lastRepresentation)?void 0:n._internalId)?void 0:i.equals(null==d?void 0:d._internalId))&&this.context.logger.isLevelEnabled(o.LogLevel.DEBUG)&&this.context.logger.debug("Switching from ".concat(null==(r=this.lastRepresentation)?void 0:r._internalId.representationId," to ").concat(null==d?void 0:d._internalId.representationId," (currentRate: ").concat((0,h.toMbps)(u).toFixed(2)+"mbps",", fillState: ").concat(l.value.toFixed(2),", fillRate: ").concat(c.value.toFixed(2),")")),this.lastRepresentation=d,this.lastRateMeasurement=u,this.lastDownloadCancelled=!1,this.previousRequestProgress=void 0,null==(s=this.lastRepresentation)?void 0:s._internalId},t.prototype.setStartupPhase=function(){var e,t,n,i;this.startupPhase=!0,(0,u.clearTimeoutIfDefined)(this.startupPhaseTimerID),this.startupPhaseTimerID=void 0,null==(e=this.ogb)||e.setStartupPhase(),null==(t=this.pgb)||t.setStartupPhase(),null==(n=this.rateMeasurementRule)||n.setStartupPhase(),null==(i=this.timeToFirstByteMeasurementRule)||i.setStartupPhase()},t.prototype.shutdown=function(){var e,t,n,i;(0,u.clearTimeoutIfDefined)(this.startupPhaseTimerID),this.startupPhaseTimerID=void 0,this.lastDownloadCancelled=!1,this.previousRequestProgress=void 0,null==(e=this.ogb)||e.shutdown(),null==(t=this.pgb)||t.shutdown(),null==(n=this.rateMeasurementRule)||n.shutdown(),null==(i=this.timeToFirstByteMeasurementRule)||i.shutdown()},t.prototype.dispose=function(){var e,t,n,i;this.shutdown(),null==(e=this.ogb)||e.dispose(),null==(t=this.pgb)||t.dispose(),null==(n=this.rateMeasurementRule)||n.dispose(),null==(i=this.timeToFirstByteMeasurementRule)||i.dispose(),this.lastRepresentation=void 0,this.availableRepresentations=[]},t}(l.CancellableAdaptationLogic)}
1,76344:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.AdaptationModuleDefinition=void 0;var i=n(62756),r=n(98154),o=n(7676);t.AdaptationModuleDefinition={name:i.ModuleName.ABR,module:function(){return{AdaptationService:n(49541).X,AdaptToPlayerResolution:n(19119).AdaptToPlayerResolution,AdaptationUtils:o,AdaptationApiFactory:r.AdaptationApiFactory}},dependencies:[i.ModuleName.EngineBitmovin]},t.default=t.AdaptationModuleDefinition},19119:function(e,t){function n(e){return e&&e.clientWidth&&e.clientHeight?{width:e.clientWidth*devicePixelRatio,height:e.clientHeight*devicePixelRatio}:null}Object.defineProperty(t,"__esModule",{value:!0}),t.AdaptToPlayerResolution=function(e,t,i){var r,o,s=function(e,t){var i=t.getVideoElement();if(!i)return null;var r=i.parentElement,o=r&&r.querySelector("#bitmovinplayer-vr-canvas");return e?{width:screen.width*devicePixelRatio,height:screen.height*devicePixelRatio}:n(i)||o&&n(o)||r&&n(r)}(i,e);if(!s)return t;var a=null!=(o=e.getAvailableVideoQualities())?o:[],u=a.find(function(e){return e.id===t});if(!u)return t;var l=(r=u.bitrate,a.filter(function(e){var t,n=e.bitrate<=r,i=(t=e.width/e.height,s.width/s.height<t?e.width>=s.width:e.height>=s.height);return n&&i}));return 0===l.length?t:l[Math.max(0,l.findIndex(function(e){return e.width>l[0].width&&e.height>l[0].height})-1)].id}},43008:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.hasBitrate=function(e){return null!=e.bitrate},t.hasBitrateBounds=function(e){return null!=e.minBitrate&&null!=e.maxBitrate},t.hasResolution=function(e){return null!=e.height&&null!=e.width}},59113:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.findQualityForBitrate=function(e,t){if(t&&0!==t.length)return t.reduce(function(t,n){var i=r(n),o={entry:n,bitrate:i};return t.bitrate>e||i>e?i>t.bitrate?t:o:i>t.bitrate?o:t},{entry:t[0],bitrate:r(t[0])}).entry};var i=n(43008);function r(e){return(0,i.hasBitrate)(e)&&e.bitrate>0?e.bitrate:(0,i.hasBitrateBounds)(e)?(e.maxBitrate+e.minBitrate)/2:0}},17006:function(e,t){function n(e){return e.length>0?e.reduce(function(e,t){return e+t},0)/e.length:0}Object.defineProperty(t,"__esModule",{value:!0}),t.calculateExponentialWeightedAverage=void 0,t.calculateMean=n,t.calculateStandardDeviation=function(e,t){if(void 0===t&&(t=n(e)),e.length<2)return 0;var i=e.reduce(function(e,n){return e+Math.pow(n-t,2)},0);return Math.sqrt(1/(e.length-1)*i)},t.calculateMedian=function(e){var t=e.slice(0).sort(function(e,t){return e-t});return 0===t.length?0:t.length%2==1?t[Math.floor(t.length/2)]:.5*(t[t.length/2-1]+t[t.length/2])},t.calculateExponentialWeightedAverage=function(e,n,i){return void 0===i&&(i=e.length-1),0===e.length||i<0?0:0===i||0===n?e[i]:n*e[i]+(1-n)*(0,t.calculateExponentialWeightedAverage)(e,n,i-1)}},70238:function(e,t){var n,i;Object.defineProperty(t,"__esModule",{value:!0}),t.SwitchingAggressiveness=void 0,(i=n||(t.SwitchingAggressiveness=n={}))[i.Conservative=10]="Conservative",i[i.VeryLow=8]="VeryLow",i[i.Low=7]="Low",i[i.LowMid=6]="LowMid",i[i.Mid=5]="Mid",i[i.MidHigh=4]="MidHigh",i[i.High=3]="High",i[i.VeryHigh=2]="VeryHigh",i[i.Extreme=1]="Extreme"},7676:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.toMbps=t.toKbps=t.findMaximum=t.findMinimum=void 0,t.getMaxStartupBitrateFromConfig=function(e){var t,n=null==(t=e.config)?void 0:t.adaptation;if(!n)return 0;var r=n.maxStartupBitrate?i.Util.extractBitrateFromString("max",n.maxStartupBitrate):1/0;return!isNaN(r)&&isFinite(r)?r:0},t.getStartupBitrateFromConfig=function(e){var t,n,r=null==(n=e.config)?void 0:n.adaptation,o=e.settings;if(!r||!o)return 0;var s=r.startupBitrate||0;if(!s)return 0;var a=(t=o.RATE_SAFETY_MARGIN_PERCENTAGE,i.Util.extractBitrateFromString("min",s)*(1+t/100)+8);return!isNaN(a)&&isFinite(a)?a:0},t.findExtremum=r,t.hasTotalBytes=function(e){return void 0!==e.totalBytes},t.adjustRateToSafetyMargin=function(e,t){return e*(1-t/100)},t.getLowestRepresentation=function(e){return(0,t.findMinimum)(e,function(e){return e._bandwidth})};var i=n(70850);function r(e,t){return e[e.reduce(function(n,i,r){return t(e[n],e[r])?n:r},0)]}var o=function(e){return e};t.findMinimum=function(e,t){return void 0===t&&(t=o),r(e,function(e,n){return t(e)<t(n)})},t.findMaximum=function(e,t){return void 0===t&&(t=o),r(e,function(e,n){return t(e)>t(n)})},t.toKbps=function(e){return e/1024},t.toMbps=function(e){return e/1048576}},7290:function(e,t,n){var i,r=this&&this.__extends||(i=function(e,t){return(i=Object.
1setPrototypeOf||({__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])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.WishLogic=void 0;var o=n(44468),s=n(70962),a=n(46151),u=n(33436),l=n(85434),c=n(88844),d=n(11958),p=n(59113),h=n(59406),f=n(70238),g=n(7676),v=n(47577);t.WishLogic=function(e){function t(t,n){var i=e.call(this,t,n)||this;return i.context=t,i.mimeType=n,i.tgb=[],i.ugb=[],i.vgb=0,i.Agb(),i.sgb=t.settings.WISH_ABR_PARAMS,i}return r(t,e),Object.defineProperty(t.prototype,"wgb",{get:function(){var e,t=l.MimeTypeHelper.isVideo(this.mimeType)?o.MediaType.Video:o.MediaType.Audio,n=null!=(e=this.context.internalPlayer.bufferApi.getLevel(o.BufferType.ForwardDuration,t).level)?e:0;return n>this.context.bufferSettings.getTargetLevel(o.BufferType.ForwardDuration,t)+this.vgb?0:n},enumerable:!1,configurable:!0}),t.prototype.Agb=function(){var e=this.context.settings.WISH_ABR_PARAMS.BITRATE_MODIFIER_FUNCTION_TYPE,t=this.context.settings.WISH_ABR_PARAMS.TARGET_BUFFER_FACTOR,n=this.context.settings.WISH_ABR_PARAMS.TARGET_BITRATE_FACTOR;if(!["log","linear"].includes(e)){var i=s.WishDefaultConfig.BITRATE_MODIFIER_FUNCTION_TYPE;this.context.logger.warn("WISH: invalid bitrate function type: ".concat(e,", falling back to default (").concat(i,")")),this.context.settings.WISH_ABR_PARAMS.BITRATE_MODIFIER_FUNCTION_TYPE=i}if(t>1||t<1e-4){var r=Math.min(Math.max(t,1e-4),1);this.context.logger.warn("WISH: invalid xi value: ".concat(t,", falling back to closest valid value: ").concat(r)),this.context.settings.WISH_ABR_PARAMS.TARGET_BUFFER_FACTOR=r}if(n<1e-4){var o=Math.max(n,1e-4);this.context.logger.warn("WISH: invalid delta value: ".concat(n,", falling back to closest valid value: ").concat(o)),this.context.settings.WISH_ABR_PARAMS.TARGET_BITRATE_FACTOR=o}},t.prototype.getRepresentationForRateMeasurement=function(e){void 0===e&&(e=f.SwitchingAggressiveness.Mid);var t=this.context.bufferSettings.getForwardTargetLevel(),n=this.rateMeasurementRule.getStatus(e,this.wgb/t),i=this.getCurrentBitrate(n),r=(0,g.adjustRateToSafetyMargin)(i,this.context.settings.RATE_SAFETY_MARGIN_PERCENTAGE);return this.findRepresentationForBitrate(r)},t.prototype.Bgb=function(){var e=this.context.store.getState();return(e?(0,a.getMetricsHistoryFromInstanceState)(e,this.mimeType,u.MetricType.DownloadInformation):[]).filter(function(e){return!!e.value}).length>2},t.prototype.addSample=function(e){null!=e.segmentDuration&&(this.rateMeasurementRule.addSample(),this.timeToFirstByteMeasurementRule.addSample(),e.segmentDuration!==this.vgb&&(this.vgb=e.segmentDuration,this.Cgb()))},t.prototype.selectRepresentationID=function(e,t){this.updateAvailableRepresentations(t),this.checkStartupPhase({value:this.wgb,result:h.Rules.SHOULD_STAY});var n,i=this.Egb(),r=null==(n=i.rep)?void 0:n._internalId,o=i.index;return this.ugb.push(this.tgb[o]),this.ugb.length>20&&(this.ugb=this.ugb.slice(-10)),this.lastSegmentInfo=e,this.lastRepresentation=i.rep,this.lastRateMeasurement=this.getCurrentBitrate(this.rateMeasurementRule.getStatus()),this.lastDownloadCancelled=!1,this.previousRequestProgress=void 0,r},t.prototype.getCurrentBitrateMeasurement=function(){return this.rateMeasurementRule.getStatus().value},t.prototype.setAdaptationSet=function(t){e.prototype.setAdaptationSet.call(this,t);var n=this.getAvailableRepresentations().map(function(e){return(0,g.toKbps)(e._bandwidth)});this.tgb=(0,v.applyQualityFunction)(n,this.sgb.BITRATE_MODIFIER_FUNCTION_TYPE),this.Cgb()},t.prototype.findRepresentationForBitrate=function(e,t){var n,i=(0,p.findQualityForBitrate)(e,this.getAvailableRepresentations().map(function(e){return{rep:e,bitrate:e._bandwidth}}));return null!=(n=null==i?void 0:i.rep)?n:this.getLowestRepresentation()},t.prototype.setStartupPhase=function(){this.startupPhase=!0,(0,c.clearTimeoutIfDefined)(this.startupPhaseTimerID),this.startupPhaseTimerID=void 0},t.prototype.shutdown=function(){var e,t;this.lastRateMeasurement=0,this.lastDownloadCancelled=!1,this.previousRequestProgress=void 0,null==(e=this.rateMeasurementRule)||e.shutdown(),null==(t=this.timeToFirstByteMeasurementRule)||t.shutdown()},t.prototype.dispose=function(){var e,t;this.shutdown(),null==(e=this.rateMeasurementRule)||e.dispose(),null==(t=this.timeToFirstByteMeasurementRule)||t.dispose(),this.lastRepresentation=void 0,this.availableRepresentations=[],this.tgb=[],this.vgb=0,this.ugb=[]},t.prototype.Cgb=function(){if((0,v.canUseWishAlgorithm)(this.tgb,this.vgb)){var e=this.getAvailableRepresentations().map(function(e){return(0,g.toKbps)(e._bandwidth)}),t=l.MimeTypeHelper.isVideo(this.mimeType)?o.MediaType.Video:o.MediaType.Audio,n=this.context.bufferSettings.getTargetLevel(o.BufferType.ForwardDuration,t);this.xgb=(0,v.computeAlpha)(this.sgb,e,this.tgb,this.vgb,n),this.ygb=(0,v.computeBeta)(this.sgb,this.xgb,n,this.vgb),this.zgb=(0,v.computeGamma)(this.xgb,this.ygb)}},t.prototype.Dgb=function(e,t,n,i){var r=(0,v.determineBandwidthCost)(e._bandwidth,i),o=(0,v.determineBufferCost)(r,this.vgb,this.wgb),s=(0,v.determineQualityCost)(this.tgb,t,n
1);return this.xgb*r+this.ygb*o+this.zgb*s},t.prototype.isStartupBitrateInEffect=function(){var e,t,n=!!(null==(e=this.context.config.adaptation)?void 0:e.startupBitrate),i=!!(null==(t=this.context.config.adaptation)?void 0:t.maxStartupBitrate);return(n||i)&&!this.Bgb()},t.prototype.Egb=function(){var e=this;if(this.startupPhase&&(this.isStartupBitrateInEffect()||this.sgb.USE_RATE_BASED_SELECTION_ON_SEEKING)){var t=this.getRepresentationForRateMeasurement(),n=this.getAvailableRepresentations().indexOf(t);return{rep:t,index:-1!==n?n:0}}if(this.wgb<this.vgb||!(0,v.canUseWishAlgorithm)(this.tgb,this.vgb))return{rep:this.getAvailableRepresentations()[0],index:0};var i=(0,v.getAverageSelectedQuality)(this.ugb,10),r=this.rateMeasurementRule.getStatus(5,.325).value,o=Math.min(r,this.getCurrentBitrate(this.rateMeasurementRule.getStatus())),s=Math.max(1.1*r,this.getAvailableRepresentations()[0]._bandwidth),a=this.getAvailableRepresentations().filter(function(e){return e._bandwidth<=s}).map(function(t,n){return{rep:t,index:n,cost:e.Dgb(t,n,i,o)}}).sort(function(e,t){return e.cost-t.cost});return{rep:a[0].rep,index:a[0].index}},t}(d.CancellableAdaptationLogic)},47577:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.applyQualityFunction=function(e,t){switch(t){case"linear":var n=e[e.length-1];return e.map(function(e){return e/n});case"log":var i=e[0];return e.map(function(e){return Math.log(e/i)})}},t.computeAlpha=function(e,t,n,i,r){var o,s,a,u,l;switch(e.BITRATE_MODIFIER_FUNCTION_TYPE){case"linear":return o=e.TARGET_BITRATE_FACTOR,1/(1+(e.TARGET_BUFFER_FACTOR*r-i)/i+Math.exp(3-2*n[0]-n[n.length-2])/o);case"log":return s=e.TARGET_BITRATE_FACTOR,a=e.TARGET_BUFFER_FACTOR,u=t[0],1/(1+(a*r-i)/i+2*(l=t[t.length-1])*l/(s*u*t[t.length-2]))}},t.computeBeta=function(e,t,n,i){return t*((e.TARGET_BUFFER_FACTOR*n-i)/i)},t.computeGamma=function(e,t){return 1-e-t},t.determineBandwidthCost=function(e,t){return t?e/t:1},t.determineBufferCost=function(e,t,n){return n<=t?1/0:t/(n-t)*e},t.determineQualityCost=function(e,t,n){var i=e[e.length-1],r=e[0];return Math.exp(i+n-2*e[t])/Math.exp(2*i-2*r)},t.getAverageSelectedQuality=function(e,t){if(0===e.length)return 0;var n=e.slice(-t);return n.reduce(function(e,t){return e+t})/n.length},t.canUseWishAlgorithm=function(e,t){return!(e.length<=1||!t)}},82873:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.BandwidthValueType=void 0,t.getBandwidth=function(e){if(0!==e.length){for(var t=e.length,n=t-1;n>=0;n--){var o=e[n].value,s=o.downloadRate,a=o.segmentBitrate;if(void 0===a||s<a*r)return{rateBps:s,type:i.Accurate}}return{rateBps:e[t-1].value.downloadRate,type:i.Estimated}}};var n,i,r=.9;(n=i||(t.BandwidthValueType=i={})).Accurate="accurate",n.Estimated="estimated"},24296:function(e,t,n){var i=this&&this.__spreadArray||function(e,t,n){if(n||2==arguments.length)for(var i,r=0,o=t.length;r<o;r++)!i&&r in t||(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.LowLatencyAbr=void 0;var r=n(80813),o=n(46151),s=n(33436),a=n(59113),u=n(28922),l=n(7676),c=n(82873),d=n(50265),p=n(52902);t.LowLatencyAbr=function(){function e(e,t){this.context=e,this.mimeType=t,this.Jgb=new d.RateLimitedCancelCheck}return Object.defineProperty(e.prototype,"Kgb",{get:function(){return this.context.serviceManager.get(r.ServiceName.ManifestService,this.context.sourceContext.sourceIdentifier)},enumerable:!1,configurable:!0}),e.prototype.Lgb=function(e){for(var t,n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];this.context.logger&&(t=this.context.logger).debug.apply(t,i(["[".concat("LL-ABR","][").concat(this.mimeType,"] ").concat(e)],n,!1))},e.prototype.Mgb=function(){var e=(0,o.getMetricsHistoryFromInstanceState)(this.context.store.getState(),this.mimeType,s.MetricType.ChunkedDownloadInformation),t=this.Ngb();return(0,c.getBandwidth)(e.slice(-t))},e.prototype.Ngb=function(){var e;return Math.max(1,Math.ceil(20*(null==(e=this.context.config.adaptation)?void 0:e.qualityStabilityBalance)))},e.prototype.Ogb=function(e){var t,n,i,r,o=null!=(i=null==(n=null==(t=this.Kgb)?void 0:t.getAdaptationSet(e))?void 0:n.Representation)?i:[],s=(0,l.getLowestRepresentation)(o);return null!=(r=null==s?void 0:s._internalId.equals(e))&&r},e.prototype.getCurrentBitrateMeasurement=function(){var e,t;return null!=(t=null==(e=this.Mgb())?void 0:e.rateBps)?t:0},e.prototype.getLowestRepresentation=function(){var e,t,n;if(this.Igb){var i=null!=(n=null==(t=null==(e=this.Kgb)?void 0:e.getAdaptationSet(this.Igb._internalId))?void 0:t.Representation)?n:[];return(0,l.getLowestRepresentation)(i)}},e.prototype.selectRepresentationID=function(e,t){var n,i,r,a;if(t&&0!==t.length){var d,p=this.Mgb();if(this.Lgb("current bandwidth",p),!p)return null==(n=(0,l.getLowestRepresentation)(t))?void 0:n._internalId;if(p.type===c.BandwidthValueType.Accurate&&(d=null!=(i=this.findRepresentationForBitrate(p.rateBps,t))?i:void 0,this.Lgb("accurate value, selecting ",null==d?void 0:d._bandwidth)),p.type===c.BandwidthValueType.Estimated){var h=null==(r=(0,o.getMetricsLastEntry
1)((0,o.getMetricsState)(this.context.store.getState()),this.mimeType,s.MetricType.ChunkedDownloadInformation).value)?void 0:r.representationBitrate;void 0!==h&&(d=(0,u.findNextHigherBitrateRepresentation)(t,h),this.Lgb("estimated value, currently on ".concat(h,", selecting ").concat(null==d?void 0:d._bandwidth)))}return d?d._internalId:null==(a=(0,l.getLowestRepresentation)(t))?void 0:a._internalId}},e.prototype.findRepresentationForBitrate=function(e,t){if(!t||t.length<1)return null;var n,i,r=null==(n=(0,a.findQualityForBitrate)(e,t.map(function(e){return{rep:e,bitrate:e._bandwidth}})))?void 0:n.rep;return null!=(i=null!=r?r:(0,l.getLowestRepresentation)(t))?i:null},e.prototype.shouldDownloadBeCancelled=function(e,t){if(this.Jgb.shouldExecuteCancelCheck(e)){if(this.Ogb(t))return!1;var n=(0,p.shouldCancelDownload)(e);return n&&this.Lgb("Cancelling segment download, current download rate is significantly lower than segment bitrate"),n}return!1},e.prototype.addSample=function(e){},e.prototype.setAdaptationSet=function(e){this.Igb=e},e.prototype.setStartupPhase=function(){},e.prototype.shutdown=function(){},e.prototype.dispose=function(){this.shutdown()},e}()},50265:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.RateLimitedCancelCheck=void 0,t.RateLimitedCancelCheck=function(){function e(){this.rib=0}return e.prototype.shouldExecuteCancelCheck=function(e){if(void 0===e.segmentDuration||void 0===e.elapsedTime)return!1;this.sib(e)&&(this.rib=0);var t=this.rib+.2;if(e.elapsedTime>=e.segmentDuration*t){var n=e.elapsedTime/e.segmentDuration;return this.rib=.2*Math.floor(n/.2),!0}return!1},e.prototype.sib=function(e){return e.elapsedTime<this.rib*e.segmentDuration},e}()},52902:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.shouldCancelDownload=function(e){var t=e.responseTiming;if(!t)return!1;var n=t.progressTimestamp,o=t.headersReceivedTimestamp;if(!((0,i.isNumber)(o)&&o>-1&&(0,i.isNumber)(n)&&n>-1))return!1;var s=n-o,a=(0,r.bytesToBits)(e.loadedBytes)/s,u=1-(0,r.bytesToBits)(e.loadedBytes)/(e.representationBitrate*e.segmentDuration);return a<e.representationBitrate*u};var i=n(23068),r=n(33004)},4865:function(e,t,n){var i,r=this&&this.__extends||(i=function(e,t){return(i=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])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.BlockBasedRateMeasurementRule=void 0;var o=n(46151),s=n(33436),a=n(70850),u=n(59406);t.BlockBasedRateMeasurementRule=function(e){function t(t,n){var i,r,o,s,u=e.call(this,t,n)||this;return u.bib=t.settings,u.aib=n,u.gib=!0,u.eib=16e5,null!=(null==(r=null==(i=t.config)?void 0:i.adaptation)?void 0:r.maxStartupBitrate)&&(u.eib=a.Util.extractBitrateFromString("max",t.config.adaptation.maxStartupBitrate)),null!=(null==(s=null==(o=t.config)?void 0:o.adaptation)?void 0:s.startupBitrate)&&(u.cib=a.Util.extractBitrateFromString("min",t.config.adaptation.startupBitrate)),u.fib={bytes:0,time:0},u.dib=[],u}return r(t,e),t.calcRateInBps=function(e,t){return 8*e/t},t.prototype.hib=function(e){var n=this.dib.pop();if((null==n?void 0:n.bytes)===1e6&&(this.dib.push(n),n=void 0),n||(n={bytes:0,time:0,rateInBps:0}),n.bytes+e.bytes<=1e6){var i=n.bytes+e.bytes,r=n.time+e.time;this.dib.push({bytes:i,time:r,rateInBps:t.calcRateInBps(i,r)})}else{var o=(1e6-n.bytes)/e.bytes;n.bytes+=e.bytes*o,n.time+=e.time*o,n.rateInBps=t.calcRateInBps(n.bytes,n.time),this.dib.push(n);for(var s=e.bytes*(1-o),a=e.time*(1-o);s>1e6;){var u=a/(s/1e6);this.dib.push({bytes:1e6,time:u,rateInBps:t.calcRateInBps(1e6,u)}),s-=1e6,a-=u}this.dib.push({bytes:s,time:a,rateInBps:t.calcRateInBps(s,a)})}},t.prototype.iib=function(e){if(e&&!isNaN(e.bytes)){var t=this.fib;(t.bytes!==e.bytes||t.time!==e.time)&&(this.fib=e,this.hib(e),this.dib.length>40&&this.dib.shift(),this.lib())}},t.prototype.jib=function(e,n){var i,r=-e;null!=n&&(r=-e-n,i=-n);var o=this.dib.slice(r,i);if(0===o.length)return 0;var s=o.reduce(function(e,t){return{bytes:e.bytes+t.bytes,time:e.time+t.time,rateInBps:e.rateInBps+t.rateInBps}});return s.rateInBps=t.calcRateInBps(s.bytes,s.time),s.rateInBps},t.prototype.kib=function(){if(null==this.cib)return null;var e=this.cib;return e*=1+this.bib.RATE_SAFETY_MARGIN_PERCENTAGE/100,isNaN(e+=8)?null:(this.context.logger.insane("use startup bitrate from configuration ".concat(e)),{bytes:e/8,time:1})},t.prototype.addSample=function(){if(this.instanceState){var e=(0,o.getMetricsState)(this.instanceState),t=(0,o.getMetricsLastEntry
vendor: 4,006 bytes, line 1
1)(e,this.aib,s.MetricType.DownloadInformation);if(this.gib){this.gib=!1;var n=this.kib();n&&(t={value:n})}if(!t||!t.value||!t.value.bytes){t=t||{};var i=this.mib();i>0&&(t.value={bytes:i/8,time:1}),t&&t.value||(t=(0,o.getMetricsLastEntry)(e,"default",s.MetricType.DownloadInformation));var r=1/0;t&&t.value&&!isNaN(t.value.bytes)&&!isNaN(t.value.time)&&(r=t.value.bytes/t.value.time),r>this.eib&&(t.value=t.value||{},t.value.bytes=this.eib/8,t.value.time=1)}this.iib(t.value)}},t.prototype.getStatus=function(e){0===this.dib.length&&this.addSample();var t=this.jib(e),n=this.jib(e,1);return{value:t,result:t>1.1*n?u.Rules.SHOULD_SWITCH_UP:t<.9*n?u.Rules.SHOULD_SWITCH_DOWN:u.Rules.SHOULD_STAY}},t.prototype.lib=function(){if(this.instanceState){var e=(0,o.getMetricsHistoryFromInstanceState)(this.instanceState,this.aib,s.MetricType.DownloadInformation).slice(-3).map(function(e){return Math.round(8*e.value.bytes/e.value.time)});this.context.storedConfig.set("b",e),this.context.storedConfig.set("b_t",Date.now())}},t.prototype.mib=function(){var e=this.context.storedConfig.get("b")||[];return Math.round(e.reduce(function(e,t){return e+t},0)/e.length)||-1},t.prototype.shutdown=function(){},t.prototype.setStartupPhase=function(){},t.prototype.dispose=function(){},t}(u.AdaptationRule)},20066:function(e,t,n){var i,r=this&&this.__extends||(i=function(e,t){return(i=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])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.BufferFillRateRule=void 0;var o=n(89927),s=n(88844),a=n(59406);t.BufferFillRateRule=function(e){function t(t,n){var i=e.call(this,t,n)||this;return i.Uib=t.bufferSettings,i.Vib=!0,i.Xib=[],i}return r(t,e),t.prototype.Yib=function(){if(0===this.Xib.length)return NaN;var e=this.Xib[this.Xib.length-1],t=e.bufferTargetLevel;if(this.Vib){var n=e.bufferLevel,i=this.Xib[this.Xib.length-2],r=0;i&&(r=i.bufferLevel),n>=e.bufferTargetLevel||r>n?(this.logger.insane("startup phase is over"),this.Vib=!1):t=n}return t},t.prototype.Zib=function(e){isNaN(e)&&(e=this.Uib.getForwardTargetLevel());for(var t,n=Date.now()-(0,o.toMilliSeconds)(e),i=0,r=0,s=0;s<this.Xib.length;s++)(t=this.Xib[s]).timestamp>=n&&(i+=t.bufferLevel-r),r=t.bufferLevel;return((i/=this.Yib())<-1||i>1)&&this.logger.insane("buffer is changing too fast, fill rate should be between -1 and 1, but is "+i),isNaN(i)?1:i},t.prototype.addSample=function(e){var t=this;this.Wib||(this.Wib=window.setTimeout(function(){t.logger.insane("buffer fill rate startup phase is over (timeout)"),t.Vib=!1},(0,o.toMilliSeconds)(this.Uib.getForwardTargetLevel()))),this.Xib.push(e),e.timestamp-this.Xib[0].timestamp>6e4&&this.Xib.shift()},t.prototype.getStatus=function(e){var t=this.Zib(e),n=a.Rules.SHOULD_STAY;return t>.7?n=a.Rules.SHOULD_SWITCH_UP:t<-.5&&(n=a.Rules.SHOULD_SWITCH_DOWN),{value:t,result:n}},t.prototype.setStartupPhase=function(){this.Vib=!0},t.prototype.shutdown=function(){(0,s.clearTimeoutIfDefined)(this.Wib),this.Wib=void 0},t.prototype.dispose=function(){this.shutdown(),this.Xib=[]},t}(a.AdaptationRule)},64463:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.BufferFillStateRule=function(e,t){var n,a,u=!0,l={timestamp:Date.now(),bufferTargetLevel:(null==(n=i.DefaultSettings.TARGET_BUFFER_LEVEL.video)?void 0:n.forwardduration)||0,bufferLevel:0},c=function(){(0,o.clearTimeoutIfDefined)(a),a=void 0};return{addSample:function(t){a||(a=window.setTimeout(function(){u=!1},(0,r.toMilliSeconds)(e.bufferSettings.getForwardTargetLevel()))),l=t},getStatus:function(){var e;return l.bufferLevel>.8*l.bufferTargetLevel?(e=s.Rules.SHOULD_SWITCH_UP,u&&(u=!1,(0,o.clearTimeoutIfDefined)(a)
1)):e=l.bufferLevel<.4*l.bufferTargetLevel?s.Rules.SHOULD_SWITCH_DOWN:s.Rules.SHOULD_STAY,u&&(e=s.Rules.SHOULD_STAY),{value:l.bufferLevel,result:e}},setStartupPhase:function(){u=!0},shutdown:c,dispose:function(){c()}}};var i=n(70962),r=n(89927),o=n(88844),s=n(59406)},43829:function(e,t,n){var i,r=this&&this.__extends||(i=function(e,t){return(i=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])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.DownloadRateRule=void 0;var o=n(89927),s=n(59406);t.DownloadRateRule=function(e){function t(t,n){var i=e.call(this,t,n)||this;return i.nib=[],i}return r(t,e),t.prototype.oib=function(e){void 0===e&&(e=this.context.bufferSettings.getForwardTargetLevel());var t=Date.now()-(0,o.toMilliSeconds)(e),n=this.nib.filter(function(e){return e.timestamp>=t});if(0===n.length)return 1;var i=0;return n.forEach(function(e,t){var r=n[t-1],s=e.segmentDuration,a=s/8,u=Math.min(e.bufferLevel/e.bufferTargetLevel,1),l=Math.max(e.segmentDownloadDuration,a),c=s/l*u+s/(r?Math.max(e.timestamp-r.timestamp,a):(0,o.toMilliSeconds)(Math.max(s,l)))*(1-u);i=e.downloadCancelled?i-c:i+c}),i/n.length},t.prototype.addSample=function(e){null!=e.segmentDuration&&null!=e.segmentDownloadDuration&&(this.nib.push(e),e.timestamp-this.nib[0].timestamp>6e4&&this.nib.shift())},t.prototype.getStatus=function(e,t){var n=this.oib(e),i=s.Rules.SHOULD_STAY;return n>1.7?i=s.Rules.SHOULD_SWITCH_UP:n<.5&&(i=s.Rules.SHOULD_SWITCH_DOWN),{value:n,result:i}},t.prototype.setStartupPhase=function(){},t.prototype.shutdown=function(){},t.prototype.dispose=function(){this.shutdown(),this.nib=[]},t}(s.AdaptationRule)},59406:function(e,t){var n,i;Object.defineProperty(t,"__esModule",{value:!0}),t.AdaptationRule=t.Rules=void 0,(n=i||(t.Rules=i={})).SHOULD_SWITCH_UP="SWITCH_UP",n.SHOULD_STAY="STAY",n.SHOULD_SWITCH_DOWN="SWITCH_DOWN",t.AdaptationRule=function(){function e(e,t){this.context=e,this.samples=[],this.mimeType=t,this.logger=e.logger,this.Settings=e.settings,this.maxHistorySize=this.Settings.DEFAULT_ADAPTATION_RULE_HISTORY_SIZE}return Object.defineProperty(e.prototype,"instanceState",{get:function(){var e;return null==(e=this.context.store)?void 0:e.getState()},enumerable:!1,configurable:!0}),e.prototype.estimateStatus=function(e,t,n){return this.getStatus(t,n)},e}()},39185:function(e,t,n){var i,r=this&&this.__extends||(i=function(e,t){return(i=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])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.SegmentBasedRateMeasurementRule=void 0;var o=n(46151),s=n(33436),a=n(89927),u=n(70850),l=n(17006),c=n(7676),d=n(59406);function p(e){return e.transferSize>0&&!/^https?:\/\/localhost(:\d+)?(\/|$)/.test(e.name)}function h(e,t){void 0===t&&(t=1/0);var n,i=e.value.time-(null!=(n=e.value.timeToFirstByte)?n:0);return f(8*e.value.bytes/i,t)}function f(e,t){return Math.min(e,u.Util.extractBitrateFromString("max",t))}t.SegmentBasedRateMeasurementRule=function(e){function t(t,n){var i=e.call(this,t,n)||this;return i.Ijb=-1,i.Jjb=.1,i.Kjb=!0,i}return r(t,e),t.getBitrateFromPerformanceAPI=function(){if(!performance||"function"!=typeof performance.getEntriesByName)return 0;var e=0,t=0;return performance.getEntriesByType("resource").filter(p).forEach(function(n){e+=8*n.transferSize,t+=(0,a.toSeconds)(n.duration-(n.responseStart-n.requestStart))}),e>0&&t>0?e/t:0},t.prototype.Ljb=function(e,t,n){void 0===t&&(t=1),void 0===n&&(n=0);var i,r=-e-n;return i=0!==n?this.samples.slice(r,-n):this.samples.slice(r),(0,l.calculateExponentialWeightedAverage)(i,1-t)},t.validateDownloadInfo=function(e){if(e&&e.value){var t=!!e.value.bytes,n=!isNaN(e.value.time),i=void 0!==e.value.timeToFirstByte&&!isNaN(e.value.timeToFirstByte);return t&&n&&i}return!1},t.prototype.Mjb=function(e){if(!this.instanceState)return 0;
1var n=(0,o.getMetricsLastEntry)((0,o.getMetricsState)(this.instanceState),e,s.MetricType.DownloadInformation),i=t.validateDownloadInfo(n),r=i&&this.Ijb<n.time;return r&&isFinite(n.time)&&(this.Ijb=n.time),i&&r?h(n,this.context.settings.MAX_ALLOWED_BANDWIDTH_ESTIMATION):i&&!r?-1:0},t.prototype.Njb=function(){var e=[],n=this.Pjb();n>0&&e.push(n);var i=this.Mjb("default");i>0&&e.push(i);var r=Math.min.apply(Math,e);return r>0&&isFinite(r)?r:t.getBitrateFromPerformanceAPI()},t.prototype.addSample=function(){var e,t,n,i=this.Mjb(this.mimeType),r=0;this.Kjb&&(e=this.context,t=(0,c.getStartupBitrateFromConfig)(e),n=(0,c.getMaxStartupBitrateFromConfig)(e),n=i>0?Math.min(n,i):n,r=t||n||0,this.Kjb=!1),0===(r=r||i||0)&&(r=this.Njb()),r>0&&(this.samples.push(r),this.samples.length>this.maxHistorySize&&this.samples.splice(0,this.samples.length-this.maxHistorySize)),i>0&&this.Ojb()},t.prototype.getStatus=function(e,t){void 0===e&&(e=1),void 0===t&&(t=1),0===this.samples.length&&this.addSample();var n=this.Ljb(e,t),i=this.Ljb(e,t,1);return{value:n,result:n>i*(1+this.Jjb)?d.Rules.SHOULD_SWITCH_UP:n<i*(1-this.Jjb)?d.Rules.SHOULD_SWITCH_DOWN:d.Rules.SHOULD_STAY}},t.prototype.Ojb=function(){if(this.instanceState){var e=(0,o.getMetricsHistoryFromInstanceState)(this.instanceState,this.mimeType,s.MetricType.DownloadInformation).filter(t.validateDownloadInfo).slice(-3).map(function(e){return h(e)});this.context.storedConfig.set("b",e),this.context.storedConfig.set("b_t",Date.now())}},t.prototype.Pjb=function(){var e=this,t=(this.context.storedConfig.get("b")||[]).map(function(t){return f(t,e.context.settings.MAX_ALLOWED_BANDWIDTH_ESTIMATION)});return Math.round(t.reduce(function(e,t){return e+t},0)/t.length)||0},t.prototype.shutdown=function(){},t.prototype.setStartupPhase=function(){},t.prototype.dispose=function(){},t}(d.AdaptationRule)},45199:function(e,t,n){var i,r=this&&this.__extends||(i=function(e,t){return(i=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])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__spreadArray||function(e,t,n){if(n||2==arguments.length)for(var i,r=0,o=t.length;r<o;r++)!i&&r in t||(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.TimeToFirstByteMeasurementRule=void 0;var s=n(46151),a=n(33436),u=n(17006),l=n(59406);t.TimeToFirstByteMeasurementRule=function(e){function t(t,n){var i=e.call(this,t,n)||this;return i.Qjb=-1,i}return r(t,e),t.prototype.Rjb=function(e){if(!this.instanceState)return 0;var t=(0,s.getMetricsLastEntry)((0,s.getMetricsState)(this.instanceState),e,a.MetricType.DownloadInformation),n=!!t&&!!t.value,i=n&&void 0!==t.value.timeToFirstByte&&!isNaN(t.value.timeToFirstByte),r=n&&this.Qjb<t.time;return r&&isFinite(t.time)&&(this.Qjb=t.time),i&&r?t.value.timeToFirstByte:i&&!r?-1:0},t.prototype.addSample=function(){var e=this.Rjb(this.mimeType),t=this.Rjb("default"),n=e||t||0;if(n>0)for(this.samples.push(n);this.samples.length>this.maxHistorySize;)this.samples.shift()},t.prototype.Sjb=function(e){return e>0?this.samples.slice(-e):[]},t.prototype.Tjb=function(e,t){var n=(0,u.calculateMean)(e),i=(0,u.calculateExponentialWeightedAverage)(e,t),r=(0,u.calculateStandardDeviation)(e,n);return{value:{median:(0,u.calculateMedian)(e),mean:n,weightedAverage:i,standardDeviation:r},result:l.Rules.SHOULD_STAY}},t.prototype.getStatus=function(e,t){return void 0===e&&(e=1),void 0===t&&(t=1),this.Tjb(this.Sjb(e),t)},t.prototype.estimateStatus=function(e,t,n){void 0===t&&(t=1),void 0===n&&(n=1);var i=o(o([],this.Sjb(t-1),!0),[e],!1);return this.Tjb(i,n)},t.prototype.setStartupPhase=function(){},t.prototype.shutdown=function(){},t.prototype.dispose=function(){},t}(l.AdaptationRule)}
1,28922:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.findNextHigherBitrateRepresentation=function(e,t){for(var n,i,r=0;r<e.length;r++){var o=e[r];o._bandwidth>t&&(void 0===n||o._bandwidth<n._bandwidth)&&(n=o),(void 0===i||o._bandwidth>i._bandwidth)&&(i=o)}return null!=n?n:i}},83429:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.getUserSelectedRepresentation=function(e,t,n,s){var a,u,l,c,d=(a=e.config.adaptation,r.MimeTypeHelper.isAudio(t)?null==a?void 0:a.onAudioAdaptation:r.MimeTypeHelper.isVideo(t)?null==a?void 0:a.onVideoAdaptation:void 0);if(d){var p=e.serviceManager.maybeCall(i.ServiceName.ManifestService,function(e){return e.getAdaptationSet(n)},null,e.sourceContext.sourceIdentifier),h=null!=(u=null==p?void 0:p.Representation.map(function(e){return{bandwidth:e._bandwidth,id:e._id}}))?u:[],f={suggested:s.representationId,isAd:e.sourceContext.isAd,representations:h},g=null!=(l=(0,o.safeUserCallback)(function(){return d(f)},e.logger))?l:void 0;return g&&(null==(c=e.logger)||c.debug("[".concat(t,"] user has overridden adaptation suggestion! suggested: ").concat(s.representationId,", user: ")+"".concat(g))),e.serviceManager.maybeCall(i.ServiceName.ManifestService,function(e){return n&&e.getRepresentation(n,g)},void 0,e.sourceContext.sourceIdentifier)||void 0}};var i=n(80813),r=n(85434),o=n(70850)}},function(e){return e(e.s=76344)}])}()},6291:function(e,t,n){"use strict";var i,r=this&&this.__extends||(i=function(e,t){return(i=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])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.FullscreenToggleButton=void 0;var o=n(67598),s=n(24379);t.FullscreenToggleButton=function(e){function t(t){void 0===t&&(t={});var n=e.call(this,t)||this;return n.config=n.mergeConfig(t,{cssClass:"ui-fullscreentogglebutton",text:s.i18n.getLocalizer("fullscreen")},n.config),n}return r(t,e),t.prototype.configure=function(t,n){var i=this;e.prototype.configure.call(this,t,n);var r=function(){return t.isViewModeAvailable(t.exports.ViewMode.Fullscreen)},o=function(){t.getViewMode()===t.exports.ViewMode.Fullscreen?i.on():i.off()},s=function(){r()?i.show():i.hide()};t.on(t.exports.PlayerEvent.ViewModeChanged,o),t.exports.PlayerEvent.ViewModeAvailabilityChanged&&t.on(t.exports.PlayerEvent.ViewModeAvailabilityChanged,s),n.getConfig().events.onUpdated.subscribe(s),this.onClick.subscribe(function(){if(!r()){console&&console.log("Fullscreen unavailable");return}var e=t.getViewMode()===t.exports.ViewMode.Fullscreen?t.exports.ViewMode.Inline:t.exports.ViewMode.Fullscreen;t.setViewMode(e)}),s(),o()},t}(o.ToggleButton)},6635:function(e,t,n){"use strict";var i,r=this&&this.__extends||(i=function(e,t){return(i=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])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.prefixCss=function(e){return o.instance().prefixCss(e)};var o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.instance=function(){return t._instance||(t._instance=new t),t._instance},t.prototype.prefixCss=function(t){return e.prototype.prefixCss.call(this,t)},t}(n(86051).Component)},6917:function(e,t,n){"use strict";var i=this&&this.__spreadArray||function(e,t,n){if(n||2==arguments.length)for(var i,r=0,o=t.length;r<o;r++)!i&&r in t||(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))};
1Object.defineProperty(t,"__esModule",{value:!0}),t.AudioTrackSwitchHandler=void 0;var r=n(24379);t.AudioTrackSwitchHandler=function(){function e(e,t,n){var o=this;this.addAudioTrack=function(e){var t=e.track;if(!o.hasComparator()){o.listElement.hasItem(t.id)||o.listElement.addItem(t.id,r.i18n.getLocalizer(t.label),!0);return}var n=o.player.getAvailableAudio(),s=n.some(function(e){return e.id===t.id})?n:i(i([],n,!0),[t],!1);o.listElement.synchronizeItems(s.map(function(e){return o.audioTrackToListItem(e)})),o.selectCurrentAudioTrack()},this.removeAudioTrack=function(e){var t=e.track;o.listElement.hasItem(t.id)&&o.listElement.removeItem(t.id)},this.selectCurrentAudioTrack=function(){var e=o.player.getAudio();e&&o.listElement.selectItem(e.id)},this.refreshAudioTracks=function(){var e=o.listElement.getSelectedItem();o.listElement.synchronizeItems(o.player.getAvailableAudio().map(function(e){return o.audioTrackToListItem(e)})),o.player.getAudio()?o.selectCurrentAudioTrack():e&&o.listElement.hasItem(e)&&o.listElement.selectItem(e)},this.player=e,this.listElement=t,this.uimanager=n,this.bindSelectionEvent(),this.bindPlayerEvents(),this.refreshAudioTracks()}return e.prototype.bindSelectionEvent=function(){var e=this;this.listElement.onItemSelectionChanged.subscribe(function(t,n){e.player.setAudio(n)})},e.prototype.bindPlayerEvents=function(){this.player.on(this.player.exports.PlayerEvent.AudioChanged,this.selectCurrentAudioTrack),this.player.on(this.player.exports.PlayerEvent.SourceUnloaded,this.refreshAudioTracks),this.player.on(this.player.exports.PlayerEvent.PeriodSwitched,this.refreshAudioTracks),this.player.on(this.player.exports.PlayerEvent.AudioAdded,this.addAudioTrack),this.player.on(this.player.exports.PlayerEvent.AudioRemoved,this.removeAudioTrack),this.uimanager.getConfig().events.onUpdated.subscribe(this.refreshAudioTracks)},e.prototype.hasComparator=function(){return null!=this.listElement.getConfig().comparator},e.prototype.audioTrackToListItem=function(e){return{key:e.id,label:e.label}},e}()},8007:(e,t)=>{"use strict";var n,i;Object.defineProperty(t,"__esModule",{value:!0}),t.MobileV3PlayerEvent=void 0,t.isMobileV3PlayerAPI=function(e){for(var t in n)if(n.hasOwnProperty(t)&&!e.exports.PlayerEvent.hasOwnProperty(t))return!1;return!0},(i=n||(t.MobileV3PlayerEvent=n={})).SourceError="sourceerror",i.PlayerError="playererror",i.PlaylistTransition="playlisttransition"},8183:function(e,t,n){"use strict";var i,r=this&&this.__extends||(i=function(e,t){return(i=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])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.CharacterEdgeSelectBox=void 0;var o=n(72177),s=n(24379);t.CharacterEdgeSelectBox=function(e){function t(t){var n=e.call(this,t)||this;return n.config=n.mergeConfig(t,{cssClasses:["ui-subtitlesettingscharacteredgeselectbox"]},n.config),n}return r(t,e),t.prototype.configure=function(t,n){var i=this;e.prototype.configure.call(this,t,n),this.addItem(null,s.i18n.getLocalizer("default")),this.addItem("raised",s.i18n.getLocalizer("settings.subtitles.characterEdge.raised")),this.addItem("depressed",s.i18n.getLocalizer("settings.subtitles.characterEdge.depressed")),this.addItem("uniform",s.i18n.getLocalizer("settings.subtitles.characterEdge.uniform")),this.addItem("dropshadowed",s.i18n.getLocalizer("settings.subtitles.characterEdge.dropshadowed")),this.onItemSelectionChanged.subscribe(function(e,t){i.settingsManager.characterEdge.value=t}),this.settingsManager.characterEdge.onChanged.subscribe(function(e,t){i.settingsManager.characterEdge.isSet()?i.settingsManager.characterEdgeColor.isSet()||(i.settingsManager.characterEdgeColor.value="black"):i.settingsManager.characterEdgeColor.clear(),i.selectItem(t.value),i.setColorAndEdgeType()}),this.settingsManager.characterEdgeColor.onChanged.subscribe(function(){i.setColorAndEdgeType()}),this.initFromSettings()},t.prototype.initFromSettings=function(){this.settingsManager.characterEdge.isSet()&&(this.selectItem(this.settingsManager.characterEdge.value),this.setColorAndEdgeType())},t.prototype.setColorAndEdgeType=function(){this.settingsManager.characterEdge.isSet()&&this.settingsManager.characterEdgeColor.isSet()?this.toggleOverlayClass("characteredge-"+this.settingsManager.characterEdge.value+"-"+this.settingsManager.characterEdgeColor.value):this.toggleOverlayClass(null)},t}(o.SubtitleSettingSelectBox)},8675:function(e,t,n){"use strict";
1var i,r=this&&this.__extends||(i=function(e,t){return(i=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])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.Container=void 0;var o=n(86051),s=n(4437),a=n(53623),u=n(24379);t.Container=function(e){function t(t){var n=e.call(this,t)||this;return n.config=n.mergeConfig(t,{cssClass:"ui-container",components:[]},n.config),n.componentsToAppend=[],n.componentsToPrepend=[],n.componentsToRemove=[],n.componentsInPersistentViewMode=0,n}return r(t,e),t.prototype.addComponent=function(e){this.config.components.push(e),this.componentsToAppend.push(e)},t.prototype.prependComponent=function(e){this.config.components.unshift(e),this.componentsToPrepend.push(e)},t.prototype.removeComponent=function(e){return null!=a.ArrayUtils.remove(this.config.components,e)&&(this.componentsToRemove.push(e),!0)},t.prototype.getComponents=function(){return this.config.components},t.prototype.removeComponents=function(){for(var e=0,t=this.getComponents().slice();e<t.length;e++){var n=t[e];this.removeComponent(n)}},t.prototype.updateComponents=function(){for(var e;void 0!==(e=this.componentsToRemove.shift());)e.getDomElement().remove();for(;void 0!==(e=this.componentsToAppend.shift());)this.innerContainerElement.append(e.getDomElement());for(;void 0!==(e=this.componentsToPrepend.shift());)this.innerContainerElement.prepend(e.getDomElement())},t.prototype.toDomElement=function(){var e=new s.DOM(this.config.tag,{id:this.config.id,class:this.getCssClasses(),role:this.config.role,"aria-label":u.i18n.performLocalization(this.config.ariaLabel)},this);"number"==typeof this.config.tabIndex&&e.attr("tabindex",this.config.tabIndex.toString());var t=new s.DOM(this.config.tag,{class:this.prefixCss("container-wrapper")});this.innerContainerElement=t;for(var n=0,i=this.config.components;n<i.length;n++){var r=i[n];this.componentsToAppend.push(r)}return this.updateComponents(),e.append(t),e},t.prototype.suspendHideTimeout=function(){},t.prototype.resumeHideTimeout=function(){},t.prototype.trackComponentViewMode=function(e){e===o.ViewMode.Persistent?this.componentsInPersistentViewMode++:e===o.ViewMode.Temporary&&(this.componentsInPersistentViewMode=Math.max(this.componentsInPersistentViewMode-1,0)),this.componentsInPersistentViewMode>0?this.suspendHideTimeout():this.resumeHideTimeout()},t}(o.Component)},11455:e=>{!function(){"use strict";self,e.exports=(self.webpackChunkbitmovin_player=self.webpackChunkbitmovin_player||[]).push([[962],{54663:function(e,t,n){n.r(t),n.d(t,{SaxXMLParserWrapper:function(){return v},decode:function(){return u}});var i=String.fromCharCode,r=Object.prototype.hasOwnProperty,o=/&#(\d+);|&#x([0-9a-f]+);|&(\w+);/gi,s={amp:"&",apos:"'",gt:">",lt:"<",quot:'"'};function a(e,t,n,o){return o?r.call(s,o)?s[o]:"&"+o+";":i(t||parseInt(n,16))}function u(e){return e.length>3&&-1!==e.indexOf("&")?e.replace(o,a):e}Object.keys(s).forEach(function(e){s[e.toUpperCase()]=s[e]});var l="xsi:type",c="non-whitespace outside of root node";function d(e){return Error(e)}function p(e){return"missing namespace for prefix <"+e+">"}function h(e){return{get:e,enumerable:!0}}function f(){return{line:0,column:0}}function g(e){throw e}function v(e){if(!this)return new v(e);var t,n,i,r,o,s,a,y,m,b=e&&e.proxy,S=e&&e.attributeNamePrefix||"",E=g,_=f,T=!1,P=!1,C=null,A=!1;function w(e){e instanceof Error||(e=d(e)),C=e,E(e,_)}function k(e){o&&(e instanceof Error||(e=d(e)),o(e,_))}this.on=function(e,u){if("function"!=typeof u)throw d("required args <name, cb>");switch(e){case"openTag":n=u;break;case"text":t=u;break;case"closeTag":i=u;break;case"error":E=u;break;case"warn":o=u;break;case"cdata":r=u;break;case"attention":y=u;break;case"question":a=u;break;case"comment":s=u;break;default:throw d("unsupported event: "+e)}return this},this.ns=function(e){if(void 0===e&&(e={}),"object"!=typeof e)throw d("required args <nsMap={}>");var t,n={};for(t in e)n[t]=e[t];return n["http://www.w3.org/2001/XMLSchema-instance"]="xsi",P=!0,m=n,this},this.parse=function(e){if("string"!=typeof e)throw d("required args <xml=string>");return C=null,function(e){var o,d,f,g,v,E,C,O,M,I,x,R=P?[]:null,
1L=P?function(e){var t,n,i={};for(t in e)i[n=e[t]]=n,i[n+"$uri"]=t;return i}(m):null,D=[],U=0,B=!1,N=!1,F=0,j=0,H="",V=0;function W(){if(null!==x)return x;var e,t,n,i,r,o,s,a,c,d,h,f=P&&L.xmlns,g=P&&T?[]:null,v=V,y=H,b=y.length,E={},_={},C=function(e,t){return E[S+e]=t};e:for(;v<b;v++)if(c=!1,!(32===(d=y.charCodeAt(v))||d<14&&d>8)){for((d<65||d>122||d>90&&d<97)&&95!==d&&58!==d&&(k("illegal first char attribute name"),c=!0),h=v+1;h<b;h++)if(!((d=y.charCodeAt(h))>96&&d<123||d>64&&d<91||d>47&&d<59||46===d||45===d||95===d)){if(32===d||d<14&&d>8){k("missing attribute value"),v=h;continue e}if(61===d)break;k("illegal attribute name char"),c=!0}if("xmlns:xmlns"===(a=y.substring(v,h))&&(k("illegal declaration of xmlns"),c=!0),34===(d=y.charCodeAt(h+1)))-1===(h=y.indexOf('"',v=h+2))&&-1!==(h=y.indexOf("'",v))&&(k("attribute value quote missmatch"),c=!0);else if(39===d)-1===(h=y.indexOf("'",v=h+2))&&-1!==(h=y.indexOf('"',v))&&(k("attribute value quote missmatch"),c=!0);else for(k("missing attribute value quotes"),c=!0,h+=1;h<b&&!(32===(d=y.charCodeAt(h+1))||d<14&&d>8);h++);for(-1===h&&(k("missing closing quotes"),h=b,c=!0),c||(o=y.substring(v,h)),v=h;h+1<b&&!(32===(d=y.charCodeAt(h+1))||d<14&&d>8);h++)v===h&&(k("illegal character after attribute end"),c=!0);if(v=h+1,!c)if(a in _)k("attribute <"+a+"> already defined");else if(_[a]=!0,P)if(T){if(null!==(r="xmlns"===a?"xmlns":120===a.charCodeAt(0)&&"xmlns:"===a.substr(0,6)?a.substr(6):null)){if(e=u(o),t=r+"$uri",!(s=m[e])){if("xmlns"===r||t in L&&L[t]!==e)do s="ns"+U++;while(void 0!==L[s]);else s=r;m[e]=s}L[r]!==s&&(i||(L=function(e){var t,n={};for(t in e)n[t]=e[t];return n}(L),i=!0),L[r]=s,"xmlns"===r&&(L[s+"$uri"]=e,f=s),L[t]=e),C(a,o);continue}g.push(a,o)}else -1!==(d=a.indexOf(":"))?(n=L[a.substring(0,d)])?((a=f===n?a.substr(d+1):n+a.substr(d))===l&&(o=-1!==(d=o.indexOf(":"))?(n=L[n=o.substring(0,d)]||n)+o.substring(d):f+":"+o),C(a,o)):k(p(a.substring(0,d))):C(a,o);else C(a,o)}if(T)for(v=0,b=g.length;v<b;v++){if(a=g[v++],o=g[v],-1!==(d=a.indexOf(":"))){if(!(n=L[a.substring(0,d)])){k(p(a.substring(0,d)));continue}(a=f===n?a.substr(d+1):n+a.substr(d))===l&&(o=-1!==(d=o.indexOf(":"))?(n=L[n=o.substring(0,d)]||n)+o.substring(d):f+":"+o)}C(a,o)}return x=E}for(_=function(){for(var t,n,i=/(\r\n|\r|\n)/g,r=0,o=0,s=0,a=j;F>=s&&(t=i.exec(e))&&!((a=t[0].length+t.index)>F);)r+=1,s=a;return -1==F?(o=a,n=e.substring(j)):0===j?n=e.substring(j,F):(o=F-s,n=-1==j?e.substring(F):e.substring(F,j+1)),{data:n,line:r,column:o}},b&&(I=Object.create({},{name:h(function(){return O}),originalName:h(function(){return M}),attrs:h(W),ns:h(function(){return L})}));-1!==j;){if(-1===(F=60===e.charCodeAt(j)?j:e.indexOf("<",j)))return D.length?w("unexpected end of file"):0===j?w("missing start tag"):void(j<e.length&&e.substring(j).trim()&&k(c));if(j!==F){if(D.length){if(t&&(t(e.substring(j,F),u,_),A))return}else if(e.substring(j,F).trim()&&(k(c),A))return}if(33===(v=e.charCodeAt(F+1))){if(91===(g=e.charCodeAt(F+2))&&"CDATA["===e.substr(F+3,6)){if(-1===(j=e.indexOf("]]>",F)))return w("unclosed cdata");if(r&&(r(e.substring(F+9,j),_),A))return;j+=3;continue}if(45===g&&45===e.charCodeAt(F+3)){if(-1===(j=e.indexOf("--\x3e",F)))return w("unclosed comment");
1if(s&&(s(e.substring(F+4,j),u,_),A))return;j+=3;continue}}if(63!==v){for(d=F+1;;d++){if(isNaN(E=e.charCodeAt(d)))return j=-1,w("unclosed tag");if(34===E)d=-1!==(g=e.indexOf('"',d+1))?g:d;else if(39===E)d=-1!==(g=e.indexOf("'",d+1))?g:d;else if(62===E){j=d;break}}if(33!==v){if(x={},47===v){if(B=!1,N=!0,!D.length)return w("missing open tag");if(d=O=D.pop(),g=F+2+d.length,e.substring(F+2,g)!==d)return w("closing tag mismatch");for(;g<j;g++)if(!(32===(v=e.charCodeAt(g))||v>8&&v<14))return w("close tag")}else{if(47===e.charCodeAt(j-1)?(d=O=e.substring(F+1,j-1),B=!0,N=!0):(d=O=e.substring(F+1,j),B=!0,N=!1),!(v>96&&v<123||v>64&&v<91||95===v||58===v))return w("illegal first char nodeName");for(g=1,f=d.length;g<f;g++)if(!((v=d.charCodeAt(g))>96&&v<123||v>64&&v<91||v>47&&v<59||45===v||95===v||46==v)){if(32===v||v<14&&v>8){O=d.substring(0,g),x=null;break}return w("invalid nodeName")}N||D.push(O)}if(P){if(o=L,B&&(N||R.push(o),null===x&&(T=-1!==d.indexOf("xmlns",g))&&(V=g,H=d,W(),T=!1)),M=O,-1!==(v=O.indexOf(":"))){if(!(C=L[O.substring(0,v)]))return w("missing namespace on <"+M+">");O=O.substr(v+1)}else C=L.xmlns;C&&(O=C+":"+O)}if(B&&(V=g,H=d,n&&(b?n(I,u,N,_):n(O,W,u,N,_),A)))return;if(N){if(i&&(i(b?I:O,u,B,_),A))return;P&&(L=B?o:R.pop())}j+=1}else{if(y&&(y(e.substring(F,j+1),u,_),A))return;j+=1}}else{if(-1===(j=e.indexOf("?>",F)))return w("unclosed question");if(a&&(a(e.substring(F,j+2),_),A))return;j+=2}}}(e),_=f,A=!1,C},this.stop=function(){A=!0}}},78442:function(e,t){var n=this&&this.__spreadArray||function(e,t,n){if(n||2==arguments.length)for(var i,r=0,o=t.length;r<o;r++)!i&&r in t||(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.parseJSONtoXML=function e(t,i){var o=function(e){for(var t=Object.keys(e).filter(r),n=null,i=[],o=0;o<t.length;o++){var s=t[o];"__prefix"===s&&(n=e[s]),"__text"===s&&i.push(e[s]),"__cdata"===s&&e[s].forEach(function(e){i.push("<![CDATA[".concat(e,"]]>"))})}return[n,i]}(t),a=o[0],u=o[1],l=function(t){for(var n=Object.keys(t).filter(function(e){return!e.startsWith("_")}),i=[],r=0;r<n.length;r++){var o=n[r],a=t[o];"string"!=typeof a?a instanceof Array?i.push.apply(i,function(t,n){return n.map(function(n){return"string"==typeof n?s(""!==n?[n]:[],[],t):e(n,t)})}(o,a)):"object"==typeof a&&i.push(e(a,o)):i.push("<".concat(o,">").concat(a,"</").concat(o,">"))}return i}(t),c=Object.keys(t).filter(function(e){return e.startsWith("_")&&!r(e)}).map(function(e){return"".concat(e.replace("_",""),'="').concat(t[e],'"')}),d=i;return d&&a&&(d="".concat(a,":").concat(i)),s(n(n([],u,!0),l,!0),c,d)};var i=["__prefix","__text","__cdata"];function r(e){return i.includes(e)}function o(e){return e.length>
10&&""!==e.join("")}function s(e,t,n){var i,r,s;return i=o(e),r="",(n?(r+="<".concat(n),r+=t.length>0?" ".concat(t.join(" ")):"",r+=i?">":"/>"):r)+(s="",o(e)&&(s+=e.join(""),s+=n?"</".concat(n,">"):""),s)}},15872:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.XMLModuleDefinition=void 0;var i=n(62756),r=n(78442),o=n(89214),s=n(89214);t.XMLModuleDefinition={name:i.ModuleName.XML,module:{parseXML:s.parseXML,parseJSONtoXML:r.parseJSONtoXML,setLogger:o.setLogger}},t.default=t.XMLModuleDefinition},89214:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.sanitizeXML=h,t.setLogger=function(e){l=e},t.parseXML=function(e,t){u=u||new r.SaxXMLParserWrapper({attributeNamePrefix:"_"});var n,s=h(e),a={},f=t.useArrayRepresentationForChildren?c:d;u.on(i.TagOpened,function(e,n,i,r){var o=function(e,t){var n=t();if(!e.includes(":"))return[e,n];var i=e.split(":"),r=i[0],o=i[1];return n.__prefix=r,[o,n]}(e,n),s=o[0],u=o[1];t.decodeEntities&&(u._media&&(u._media=i(u._media)),u._initialization&&(u._initialization=i(u._initialization))),a=f(a,s,u,r)}),u.on(i.TagClosed,function(e){var t,n;n=(t=a).parent,delete t.parent,function(e,t){if(p(t)&&null!=t.key)if(e[t.key]!==t){if(e[t.key].constructor===Array){var n=e[t.key].indexOf(t);e[t.key][n]=t.__text}}else e[t.key]=t.__text}(n,t),delete t.key,a=n}),u.on(i.Text,function(e,n){var i;(i=a).__text=(t.decodeEntities?n(e):e).trim(),o(i)}),u.on(i.CData,function(e){null==a.__cdata?a.__cdata=[e]:a.__cdata.push(e),o(a)}),u.on(i.Error,function(e){n=Error("XML parsing failed: ".concat(e instanceof Error?e.message:String(e))),l&&l.debug(n.message),u.stop(),a={}}),u.parse(s);var g=a;return a={},n?{success:!1,error:n}:{success:!0,parsed:g}};var i,r=n(54663);function o(e){e.toString=function(){return(this.__text?this.__text:"")+(this.__cdata?this.__cdata:"")}}function s(e,t){t&&2===Object.keys(e).length&&(e.__text="",o(e))}(a=i||(i={})).TagOpened="openTag",a.TagClosed="closeTag",a.Text="text",a.Error="error",a.Warning="warn",a.CData="cdata",a.Attention="attention",a.Question="question",a.Comment="comment";var a,u,l,c=function(e,t,n,i){return n.parent=e,n.key=t,e.parent||e.key||e[t]?e[t]?e[t].push(n):(s(n,i),e[t]=[n]):e[t]=n,n},d=function(e,t,n,i){return n.parent=e,n.key=t,e[t]?e[t].constructor===Array?e[t].push(n):e[t]=[e[t],n]:(s(n,i),e[t]=n),n},p=function(e){return null!=e.__text&&3===Object.keys(e).length};function h(e){return e.replace(/>\s+</g,"><").replace(/[\n|\r]+/g," ").trim()}}},function(e){return e(e.s=15872)}])}()},12485:function(e,t,n){"use strict";var i,r=this&&this.__extends||(i=function(e,t){return(i=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])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.UIContainer=void 0;var o=n(8675),s=n(4437),a=n(80432),u=n(41113),l=n(85704),c=n(24379),d=n(94474),p=n(80582),h=n(52023);t.UIContainer=function(e){function t(t){var n=e.call(this,t)||this;return n.hideUi=function(){},n.showUi=function(){},n.toggleUiShown=function(){},n.config=n.mergeConfig(t,{cssClass:"ui-uicontainer",role:"region",ariaLabel:c.i18n.getLocalizer("player"),hideDelay:2e3,hideImmediatelyOnMouseLeave:!0,deferUiHideWhileSettingsOpen:!0},n.config),n.playerStateChange=new l.EventDispatcher,n.hidingPrevented=function(){return!1},n}return r(t,e),t.prototype.configure=function(t,n){var i=this.getConfig();i.userInteractionEventSource?this.userInteractionEventSource=new s.DOM(i.userInteractionEventSource):this.userInteractionEventSource=this.getDomElement(),e.prototype.configure.call(this,t,n),this.configureUIShowHide(t,n),this.configurePlayerStates(t,n)},t.prototype.configureUIShowHide=function(e,n){var i,r=this,o=this.getConfig(),s=!1,u=!1,l=!1;if(n.onConfigured.subscribe(function(){s?n.onControlsShow.dispatch(r):n.onControlsHide.dispatch(r)}),-1===o.hideDelay){s=!0;return}var c=!1,f=!0;o.deferUiHideWhileSettingsOpen&&(n.onComponentShow.subscribe(function(e){e instanceof h.SettingsPanel&&(u=!0)}),n.onComponentHide.subscribe(function(e){e instanceof h.SettingsPanel&&(u=!1,l&&(r.hideUi(!0),l=!1))})),this.hidingPrevented=function(){return o.hidePlayerStateExceptions&&o.hidePlayerStateExceptions.indexOf(i)>-1},this.showUi=function(){l=!1,s||(n.onControlsShow.dispatch(r),s=!0),c||e.isCasting()||r.hidingPrevented()||r.uiHideTimeout.start()},this.hideUi=function(t){if(void 0===t&&(t=!1),s&&!e.isCasting()){if(t){n.onControlsHide.dispatch(r),s=!1;return}if(o.deferUiHideWhileSettingsOpen&&u){l=!0;return}var i={};
1n.onPreviewControlsHide.dispatch(r,i),i.cancel?r.showUi():(n.onControlsHide.dispatch(r),s=!1)}},this.toggleUiShown=function(){s?r.hideUi():r.showUi()},this.uiHideTimeout=new a.Timeout(o.hideDelay,this.hideUi);var g=function(e){return!(e.target.component instanceof p.TouchControlOverlay)};this.userInteractionEvents=[{name:"touchend",handler:function(n){if(g(n)&&!s){if(f&&!e.isPlaying())f=!1;else{var i,o;(o=(i=function(e){return!e||e===r.userInteractionEventSource.get(0)||e.component instanceof t?null:e.component&&e.component instanceof d.Button||e.component instanceof p.TouchControlOverlay?e.component:i(e.parentElement)})(n.target))&&o.getConfig().acceptsTouchWithUiHidden||n.preventDefault()}r.showUi()}}},{name:"mouseenter",handler:function(e){g(e)&&r.showUi()}},{name:"mousemove",handler:function(e){g(e)&&r.showUi()}},{name:"focusin",handler:function(e){g(e)&&r.showUi()}},{name:"keydown",handler:function(e){g(e)&&r.showUi()}},{name:"mouseleave",handler:function(){c||r.hidingPrevented()||(r.config.hideImmediatelyOnMouseLeave?r.hideUi(!0):r.uiHideTimeout.start())}},{name:"wheel",handler:function(e){g(e)&&r.showUi()}}],this.userInteractionEvents.forEach(function(e){return r.userInteractionEventSource.on(e.name,e.handler)}),this.userInteractionEventSource.on("click",function(e){g(e)&&r.showUi()},{capture:!0}),n.onSeek.subscribe(function(){r.uiHideTimeout.clear(),c=!0}),n.onSeeked.subscribe(function(){c=!1,r.hidingPrevented()||r.uiHideTimeout.start()}),n.onComponentViewModeChanged.subscribe(function(e,t){var n=t.mode;return r.trackComponentViewMode(n)}),e.on(e.exports.PlayerEvent.CastStarted,function(){r.showUi()}),this.playerStateChange.subscribe(function(e,t){i=t,r.hidingPrevented()?(r.uiHideTimeout.clear(),r.showUi()):r.uiHideTimeout.start()})},t.prototype.configurePlayerStates=function(e,n){var i=this,r=this.getDomElement(),o=[];for(var a in u.PlayerUtils.PlayerState)if(isNaN(Number(a))){var l=u.PlayerUtils.PlayerState[u.PlayerUtils.PlayerState[a]];o[u.PlayerUtils.PlayerState[a]]=this.prefixCss(t.STATE_PREFIX+l.toLowerCase())}var c=function(){r.removeClass(o[u.PlayerUtils.PlayerState.Idle]),r.removeClass(o[u.PlayerUtils.PlayerState.Prepared]),r.removeClass(o[u.PlayerUtils.PlayerState.Playing]),r.removeClass(o[u.PlayerUtils.PlayerState.Paused]),r.removeClass(o[u.PlayerUtils.PlayerState.Finished])},d=function(e){c(),r.addClass(o[e]),i.playerStateChange.dispatch(i,e)};e.on(e.exports.PlayerEvent.SourceLoaded,function(){d(u.PlayerUtils.PlayerState.Prepared)}),e.on(e.exports.PlayerEvent.Play,function(){d(u.PlayerUtils.PlayerState.Playing)}),e.on(e.exports.PlayerEvent.Playing,function(){d(u.PlayerUtils.PlayerState.Playing)}),e.on(e.exports.PlayerEvent.Paused,function(){d(u.PlayerUtils.PlayerState.Paused)}),e.on(e.exports.PlayerEvent.PlaybackFinished,function(){d(u.PlayerUtils.PlayerState.Finished)}),e.on(e.exports.PlayerEvent.SourceUnloaded,function(){d(u.PlayerUtils.PlayerState.Idle)}),n.getConfig().events.onUpdated.subscribe(function(){d(u.PlayerUtils.getState(e))}),e.on(e.exports.PlayerEvent.ViewModeChanged,function(){e.getViewMode()===e.exports.ViewMode.Fullscreen?r.addClass(i.prefixCss(t.FULLSCREEN)):r.removeClass(i.prefixCss(t.FULLSCREEN))}),e.getViewMode()===e.exports.ViewMode.Fullscreen&&r.addClass(this.prefixCss(t.FULLSCREEN)),e.on(e.exports.PlayerEvent.StallStarted,function(){r.addClass(i.prefixCss(t.BUFFERING))}),e.on(e.exports.PlayerEvent.StallEnded,function(){r.removeClass(i.prefixCss(t.BUFFERING))}),e.isStalled()&&r.addClass(this.prefixCss(t.BUFFERING)),e.on(e.exports.PlayerEvent.CastStarted,function(){r.addClass(i.prefixCss(t.REMOTE_CONTROL))}),e.on(e.exports.PlayerEvent.CastStopped,function(){r.removeClass(i.prefixCss(t.REMOTE_CONTROL))}),e.isCasting()&&r.addClass(this.prefixCss(t.REMOTE_CONTROL)),n.onControlsShow.subscribe(function(){r.removeClass(i.prefixCss(t.CONTROLS_HIDDEN)),r.addClass(i.prefixCss(t.CONTROLS_SHOWN))}),n.onControlsHide.subscribe(function(){r.removeClass(i.prefixCss(t.CONTROLS_SHOWN)),r.addClass(i.prefixCss(t.CONTROLS_HIDDEN))});var p=function(e,t){r.removeClass(i.prefixCss("layout-max-width-400")),r.removeClass(i.prefixCss("layout-max-width-600")),r.removeClass(i.prefixCss("layout-max-width-800")),r.removeClass(i.prefixCss("layout-max-width-1200")),e<=400?r.addClass(i.prefixCss("layout-max-width-400")):e<=600?r.addClass(i.prefixCss("layout-max-width-600")):e<=800?r.addClass(i.prefixCss("layout-max-width-800")):e<=1200&&r.addClass(i.prefixCss("layout-max-width-1200"))};e.on(e.exports.PlayerEvent.PlayerResized,function(e){p(Math.round(Number(e.width.substring(0,e.width.length-2))),Math.round(Number(e.height.substring(0,e.height.length-2))))}),p(new s.DOM(e.getContainer()).width(),new s.DOM(e.getContainer()).height())},t.prototype.release=function(){var t=this;this.hideUi(!0),this.userInteractionEvents&&this.userInteractionEvents.forEac
1h(function(e){return t.userInteractionEventSource.off(e.name,e.handler)}),e.prototype.release.call(this),this.uiHideTimeout&&this.uiHideTimeout.clear()},t.prototype.onPlayerStateChange=function(){return this.playerStateChange.getEvent()},t.prototype.suspendHideTimeout=function(){this.uiHideTimeout.suspend()},t.prototype.resumeHideTimeout=function(){this.uiHideTimeout.resume(!this.hidingPrevented())},t.prototype.toDomElement=function(){var t=e.prototype.toDomElement.call(this);return document&&void 0!==document.createElement("p").style.flex?t.addClass(this.prefixCss("flexbox")):t.addClass(this.prefixCss("no-flexbox")),t},t.STATE_PREFIX="player-state-",t.FULLSCREEN="fullscreen",t.BUFFERING="buffering",t.REMOTE_CONTROL="remote-control",t.CONTROLS_SHOWN="controls-shown",t.CONTROLS_HIDDEN="controls-hidden",t}(o.Container)},14307:function(e,t,n){"use strict";var i,r=this&&this.__extends||(i=function(e,t){return(i=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])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.ListBox=void 0;var o=n(52023),s=n(57640),a=n(39062),u=n(21616),l=n(30194);t.ListBox=function(e){function t(t){var n=e.call(this,t)||this;if(n.settingsPanelPage=new s.SettingsPanelPage({}),n.listSelector=t.listSelector,n.config=n.mergeConfig(t,{hidden:!0,cssClasses:["ui-listbox"]},n.config),n.addComponent(n.settingsPanelPage),t.title){var i=new l.Label({text:t.title,cssClasses:["title-label"]});n.settingsPanelPage.addComponent(new u.SettingsPanelItem({label:i,cssClasses:["title-item"],isSetting:!1}))}return n}return r(t,e),t.prototype.configure=function(t,n){var i=this;e.prototype.configure.call(this,t,n);var r=function(e){var r=i.listSelector.getItemForKey(e);if(!r)return null;var o=new a.SettingsPanelSelectOption({label:r.label,labelStyle:l.LabelStyle.TextWithLeadingIcon,settingComponent:i.listSelector,settingsValue:r.key,addSettingAsComponent:!1});return o.configure(t,n),o},o=function(){for(var e=i.settingsPanelPage.getComponents().filter(function(e){return e instanceof a.SettingsPanelSelectOption}),t=0;t<e.length;t++){var n=e[t];i.settingsPanelPage.removeSettingsPanelItem(n)}for(var o=0,s=i.listSelector.getItems();o<s.length;o++){var u=r(s[o].key);u&&i.settingsPanelPage.addSettingsPanelItem(u)}i.onSettingsStateChangedEvent()},s=!1;this.listSelector.onItemsChanged.subscribe(function(){s=!0,o()}),this.settingsPanelPage.configure(t,n),this.listSelector.configure(t,n),s||o()},t}(o.SettingsPanel)},14459:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toHtmlElement=function(e){return e.getDomElement().get(0)}},14621:e=>{self,e.exports=(self.webpackChunkbitmovin_player=self.webpackChunkbitmovin_player||[]).push([[858],{72387:function(e,t,n){e.exports=function(){return n(90040)('!function(){var t={48:function(t){!function(){t.exports=function(){"use strict";var t,e,i,n,a,r,s,o,d,p,h,l,c,u,f,m,g,y,_,S,b,v,T,w,k,C,P,A,E,x,U,M,R,I,D,O,L,B,G,W,F=Math.pow(2,32),N=F;(function(){var t;if(C={avc1:[],avcC:[],hvc1:[],hvcC:[],btrt:[],dec3:[],dinf:[],dref:[],"ec-3":[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],pasp:[],sdtp:[],smhd:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],styp:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[]},"undefined"!=typeof Uint8Array){for(t in C)C.hasOwnProperty(t)&&(C[t]=[t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2),t.charCodeAt(3)]);P=new Uint8Array(["i".charCodeAt(0),"s".charCodeAt(0),"o".charCodeAt(0),"m".charCodeAt(0)]),E=new Uint8Array(["a".charCodeAt(0),"v".charCodeAt(0),"c".charCodeAt(0),"1".charCodeAt(0)]),x=new Uint8Array(["h".charCodeAt(0),"v".charCodeAt(0),"c".charCodeAt(0),"1".charCodeAt(0)]),A=new Uint8Array([0,0,0,1]),U=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),M=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),R={video:U,audio:M}
1,O=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),D=new Uint8Array([0,0,0,0,0,0,0,0]),L=new Uint8Array([0,0,0,0,0,0,0,0]),B=L,G=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),W=L,I=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}})(),t=function(t){var e,i,n=[],a=0;for(e=1;e<arguments.length;e++)n.push(arguments[e]);for(e=n.length;e--;)a+=n[e].byteLength;for(i=new Uint8Array(a+8),new DataView(i.buffer,i.byteOffset,i.byteLength).setUint32(0,i.byteLength),i.set(t,4),e=0,a=8;e<n.length;e++)i.set(n[e],a),a+=n[e].byteLength;return i},n=function(){return t(C.dinf,t(C.dref,O))},a=function(e){return t(C.esds,new Uint8Array([0,0,0,0,3,25,0,0,0,4,17,64,21,0,6,0,0,0,218,192,0,0,218,192,5,2,e.audioobjecttype<<3|e.samplingfrequencyindex>>>1,e.samplingfrequencyindex<<7|e.channelcount<<3,6,1,2]))},i=function(e){var i=e.fscod||0,n=e.bsid||16,a=e.acmod||0,r=e.lfeon||0;return t(C.dec3,new Uint8Array([0,0,i<<6|n<<1,a<<1|r,0]))},r=function(e){var i,n,a;for(a=0;a<e.length;a++)if("video"===(n=e[a]).type){i={avc:E,hevc:x}[n.codec];break}return t(C.ftyp,P,A,P,i||E)},_=function(e){return t(C.hdlr,R[e])},s=function(e){return t(C.mdat,e)},y=function(e){var i=new Uint8Array([0,0,0,0,0,0,0,2,0,0,0,3,0,1,95,144,e.duration>>>24&255,e.duration>>>16&255,e.duration>>>8&255,255&e.duration,85,196,0,0]);return e.samplerate&&(i[12]=e.samplerate>>>24&255,i[13]=e.samplerate>>>16&255,i[14]=e.samplerate>>>8&255,i[15]=255&e.samplerate),t(C.mdhd,i)},g=function(e){return t(C.mdia,y(e),_(e.type),d(e))},o=function(e){return t(C.mfhd,new Uint8Array([0,0,0,0,(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e]))},d=function(e){return t(C.minf,"video"===e.type?t(C.vmhd,I):t(C.smhd,D),n(),b(e))},p=function(e,i){for(var n=[],a=i.length;a--;)n[a]=T(i[a]);return t.apply(null,[C.moof,o(e)].concat(n))},h=function(e){for(var i=e.length,n=[];i--;)n[i]=f(e[i]);return t.apply(null,[C.moov,c(4294967295)].concat(n).concat(l(e)))},l=function(e){for(var i=e.length,n=[];i--;)n[i]=w(e[i]);return t.apply(null,[C.mvex].concat(n))},c=function(e){var i=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,2,0,1,95,144,(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return t(C.mvhd,i)},S=function(e){var i,n,a=e.samples||[],r=new Uint8Array(4+a.length);for(n=0;n<a.length;n++)i=a[n].flags,r[n+4]=i.dependsOn<<4|i.isDependedOn<<2|i.hasRedundancy;return t(C.sdtp,r)},b=function(e){return t(C.stbl,v(e),t(C.stts,W),t(C.stsc,B),t(C.stsz,G),t(C.stco,L))},e=function(){return t(C.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192]))},u=function(e,i){return t(C.pasp,new Uint8Array([(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e,(4278190080&i)>>24,(16711680&i)>>16,(65280&i)>>8,255&i]))},function(){var n,r;v=function(e){return t(C.stsd,new Uint8Array([0,0,0,0,0,0,0,1]),"video"===e.type?n(e):r(e))},n=function(i){var n,a,r=i.sps||[],s=i.parsedSps||{},o=i.pps||[],d=i.vps||[],p=[],h=[],l=[];for(n=0;n<r.length;n++)p.push((65280&r[n].byteLength)>>>8),p.push(255&r[n].byteLength),p=p.concat(Array.prototype.slice.call(r[n]));for(n=0;n<o.length;n++)h.push((65280&o[n].byteLength)>>>8),h.push(255&o[n].byteLength),h=h.concat(Array.prototype.slice.call(o[n]));for(n=0;n<d.length;n++)l.push(d[n].byteLength>>>8&255),l.push(255&d[n].byteLength),l=l.concat(Array.prototype.slice.call(d[n]));var c=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,(65280&s.width)>>8,255&s.width,(65280&s.height)>>8,255&s.height,0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,255,255]);if("avc"===i.codec)return a=[C.avc1,c,t(C.avcC,new Uint8Array([1,s.profileIdc,s.profileCompatibility,s.levelIdc,255].concat([r.length],p,[o.length],h))),e()],i.sarRatio&&a.push(u(i.sarRatio[0],i.sarRatio[1])),t.apply(null,a);if("hevc"===i.codec){var f,m=s.sps_max_sub_layers_minus1+1,g=s.sps_temporal_id_nesting_flag,y=61440|s.min_spatial_segmentation_idc,_=new DataView(new ArrayBuffer(2)),S=new DataView(new ArrayBuffer(2)),b=new DataView(new ArrayBuffer(2));return _.setUint16(0,d.length),S.setUint16(0,r.length),b.setUint16(0,o.length),f=new Uint8Array([1,s.general_profile_space<<6|s.general_tier_flag<<5|s.general_profile_idc,s.general_profile_compatibility_flags>>>24&255,s.general_profile_compatibility_flags>>>16&255,s.general_profile_compatibility_flags>>>8&255,255&s.general_profile_compatibility_flags,s.general_constraint_indicator_flags_bytes[0],s.general_constraint_indicator_flags_bytes[1],s.general_constraint_indicator_flags_bytes[2],s.general_constraint_indicator_flags_bytes[3],s.general_constraint_indicator_flags_bytes[4],s.general_constraint_indicator_flags_bytes[5],s.general_level_idc,y>>>8&255,255&y,252,252|s.chroma_format_idc,248|s.bit_depth_luma_minus8,248|s.bit_depth_chroma_minus8,0,0,m<<3|g<<2|3,3].concat([160,_.getUint8(0),_.getUint8(1)],l).concat([161,S.getUint8(0),S.getUint8(1)],p).concat([162,b.getUint8(0),b.getUint8(1)],h)),t(C.hvc1,c,t(C.hvcC,f),e())}},r=function(e){var n=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,(65280&e.channelcount)>>8,255&e.channelcount,(65280&e.samplesize)>>8,255&e.samplesize,0,0,0,0,(65280&e.samplerate)>>8,255&e.samplerate,0,0]);return"ec-3"===e.codec?t(C["ec-3"],n,i(e)):t(C.mp4a,n,a(e))}}(),m=function(e){var i=new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,0,(4278190080&e.duration)>>24,(16711680&e.duration)>>16,(65280&e.duration)>>8,255&e.duration,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,(65280&e.width)>>8,255&e.width,0,0,(65280&e.height)>>8,255&e.height,0,0]);return t(C.tkhd,i)},T=function(e){var i,n,a,r,s,o;return i=t(C.tfhd,new Uint8Array([0,0,0,58,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])),s=Math.floor(e.baseMediaDecodeTime/N),o=Math.floor(e.baseMediaDecodeTime%N),n=t(C.tfdt,new Uint8Array([1,0,0,0,s>>>24&255,s>>>16&255,s>>>8&255,255&s,o>>>24&255,o>>>16&255,o>>>8&255,255&o])),"audio"===e.type?(a=k(e,92),t(C.traf,i,n,a)):(r=S(e),a=k(e,r.length+92),t(C.traf,i,n,a,r))},f=function(e){return e.duration=e.duration||4294967295,t(C.trak,m(e),g(e))},w=function(e){var i=new Uint8Array([0,0,0,0,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return"video"!==e.type&&(i[i.length-1]=0),t(C.trex,i)},function(){var e,i,n;n=function(t,e){var i=0,n=0,a=0,r=0;return t.length&&(void 0!==t[0].duration&&(i=1),void 0!==t[0].size&&(n=2),void 0!==t[0].flags&&(a=4),void 0!==t[0].compositionTimeOffset&&(r=8)),[0,0,i|n|a|r,1,(4278190080&t.length)>>>24,(16711680&t.length)>>>16,(65280&t.length)>>>8,255&t.length,(4278190080&e)>>>24,(16711680&e)>>>16,(65280&e)>>>8,255&e]},i=function(e,i){var a,r,s,o,d,p;i+=20+16*(o=e.samples||[]).length,s=n(o,i),(r=new Uint8Array(s.length+16*o.length)).set(s),a=s.length;var h=0;for(p=0;p<o.length;p++)h+=(d=o[p]).duration,r[a++]=(4278190080&d.duration)>>>24,r[a++]=(16711680&d.duration)>>>16,r[a++]=(65280&d.duration)>>>8,r[a++]=255&d.duration,r[a++]=(4278190080&d.size)>>>24,r[a++]=(16711680&d.size)>>>16,r[a++]=(65280&d.size)>>>8,r[a++]=255&d.size,r[a++]=d.flags.isLeading<<2|d.flags.dependsOn,r[a++]=d.flags.isDependedOn<<6|d.flags.hasRedundancy<<4|d.flags.paddingValue<<1|d.flags.isNonSyncSample,r[a++]=61440&d.flags.degradationPriority,r[a++]=15&d.flags.degradationPriority,r[a++]=(4278190080&d.compositionTimeOffset)>>>24,r[a++]=(16711680&d.compositionTimeOffset)>>>16,r[a++]=(65280&d.compositionTimeOffset)>>>8,r[a++]=255&d.compositionTimeOffset;return e.segmentDuration=h,t(C.trun,r)},e=function(e,i){var a,r,s,o,d,p;i+=20+8*(o=e.samples||[]).length,s=n(o,i),(a=new Uint8Array(s.length+8*o.length)).set(s),r=s.length;var h=0;for(p=0;p<o.length;p++)h+=(d=o[p]).duration,a[r++]=(4278190080&d.duration)>>>24,a[r++]=(16711680&d.duration)>>>16,a[r++]=(65280&d.duration)>>>8,a[r++]=255&d.duration,a[r++]=(4278190080&d.size)>>>24,a[r++]=(16711680&d.size)>>>16,a[r++]=(65280&d.size)>>>8,a[r++]=255&d.size;return e.segmentDuration=h,t(C.trun,a)},k=function(t,n){return"audio"===t.type?e(t,n):i(t,n)}}();var z={ftyp:r,mdat:s,moof:p,moov:h,initSegment:function(t){var e,i=r(t),n=h(t);
vendor: 5,020 bytes, line 1
1return(e=new Uint8Array(i.byteLength+n.byteLength)).set(i),e.set(n,i.byteLength),e}};var Y=function(t,e,i){return t(i={path:e,exports:{},require:function(t,e){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==e&&i.path)}},i.exports),i.exports}((function(t){function e(){return t.exports=e=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])}return t},t.exports.__esModule=!0,t.exports.default=t.exports,e.apply(this,arguments)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports})),j=function(){this.init=function(){var t={};this.on=function(e,i){t[e]||(t[e]=[]),t[e]=t[e].concat(i)},this.off=function(e,i){var n;return!!t[e]&&(n=t[e].indexOf(i),t[e]=t[e].slice(),t[e].splice(n,1),n>-1)},this.trigger=function(e){var i,n,a,r;if(i=t[e])if(2===arguments.length)for(a=i.length,n=0;n<a;++n)i[n].call(this,arguments[1]);else{for(r=[],n=arguments.length,n=1;n<arguments.length;++n)r.push(arguments[n]);for(a=i.length,n=0;n<a;++n)i[n].apply(this,r)}},this.dispose=function(){t={}}}};j.prototype.pipe=function(t){return this.on("data",(function(e){t.push(e)})),this.on("done",(function(e){t.flush(e)})),this.on("partialdone",(function(e){t.partialFlush(e)})),this.on("endedtimeline",(function(e){t.endTimeline(e)})),this.on("reset",(function(e){t.reset(e)})),t},j.prototype.push=function(t){this.trigger("data",t)},j.prototype.flush=function(t){this.trigger("done",t)},j.prototype.partialFlush=function(t){this.trigger("partialdone",t)},j.prototype.endTimeline=function(t){this.trigger("endedtimeline",t)},j.prototype.reset=function(t){this.trigger("reset",t)};var V,H,X,q,K,Z,$,J,Q=j,tt=function(t,e){var i=function(){return{size:0,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0,degradationPriority:0,isNonSyncSample:1}}}();return i.dataOffset=e,i.compositionTimeOffset=t.pts-t.dts,i.duration=t.duration,i.size=4*t.length,i.size+=t.byteLength,t.keyFrame&&(i.flags.dependsOn=2,i.flags.isNonSyncSample=0),i},et=function(t){var e,i,n=[],a=[];for(a.byteLength=0,a.nalCount=0,a.duration=0,n.byteLength=0,e=0;e<t.length;e++)"access_unit_delimiter_rbsp"===(i=t[e]).nalUnitType?(n.length&&(n.duration=i.dts-n.dts,a.byteLength+=n.byteLength,a.nalCount+=n.length,a.duration+=n.duration,a.push(n)),(n=[i]).byteLength=i.data.byteLength,n.pts=i.pts,n.dts=i.dts):("slice_layer_without_partitioning_rbsp_idr"===i.nalUnitType&&(n.keyFrame=!0),n.duration=i.dts-n.dts,n.byteLength+=i.data.byteLength,n.push(i));return a.length&&(!n.duration||n.duration<=0)&&(n.duration=a[a.length-1].duration),a.byteLength+=n.byteLength,a.nalCount+=n.length,a.duration+=n.duration,a.push(n),a},it=function(t){var e,i,n=[],a=[];for(n.byteLength=0,n.nalCount=0,n.duration=0,n.pts=t[0].pts,n.dts=t[0].dts,a.byteLength=0,a.nalCount=0,a.duration=0,a.pts=t[0].pts,a.dts=t[0].dts,e=0;e<t.length;e++)(i=t[e]).keyFrame?(n.length&&(a.push(n),a.byteLength+=n.byteLength,a.nalCount+=n.nalCount,a.duration+=n.duration),(n=[i]).nalCount=i.length,n.byteLength=i.byteLength,n.pts=i.pts,n.dts=i.dts,n.duration=i.duration):(n.duration+=i.duration,n.nalCount+=i.length,n.byteLength+=i.byteLength,n.push(i));return a.length&&n.duration<=0&&(n.duration=a[a.length-1].duration),a.byteLength+=n.byteLength,a.nalCount+=n.nalCount,a.duration+=n.duration,a.push(n),a},nt=function(t){var e;return!t[0][0].keyFrame&&t.length>1&&(e=t.shift(),t.byteLength-=e.byteLength,t.nalCount-=e.nalCount,t[0][0].dts=e.dts,t[0][0].pts=e.pts,t[0][0].duration+=e.duration),t},at=function(t,e){var i,n,a,r,s,o=e||0,d=[];for(i=0;i<t.length;i++)for(r=t[i],n=0;n<r.length;n++)s=r[n],o+=(a=tt(s,o)).size,d.push(a);return d},rt=function(t){var e,i,n,a,r,s,o=0,d=t.byteLength,p=t.nalCount,h=new Uint8Array(d+4*p),l=new DataView(h.buffer);for(e=0;e<t.length;e++)for(a=t[e],i=0;i<a.length;i++)for(r=a[i],n=0;n<r.length;n++)s=r[n],l.setUint32(o,s.data.byteLength),o+=4,h.set(s.data,o),o+=s.data.byteLength;return h},st=[33,16,5,32,164,27],ot=[33,65,108,84,1,2,4,8,168,2,4,8,17,191,252],dt=function(t){for(var e=[];t--;)e.push(0);return e},pt=function(){if(!V){var t={96e3:[st,[227,64],dt(154),[56]],88200:[st,[231],dt(170),[56]],64e3:[st,[248,192],dt(240),[56]],48e3:[st,[255,192],dt(268),[55,148,128],dt(54),[112]],44100:[st,[255,192],dt(268),[55,163,128],dt(84),[112]],32e3:[st,[255,192],dt(268),[55,234],dt(226),[112]],24e3:[st,[255,192],dt(268),[55,255,128],dt(268),[111,112],dt(126),[224]],16e3:[st,[255,192],dt(268),[55,255,128],dt(268),[111,255],dt(269),[223,108],dt(195),[1,192]],12e3:[ot,dt(268),[3,127,248],dt(268),[6,255,240],dt(268),[13,255,224],dt(268),[27,253,128],dt(259),[56]],11025:[ot,dt(268),[3,127,248],dt(268),[6,255,240],dt(268),[13,255,224],dt(268),[27,255,192],dt(268),[55,175,128],dt(108),[112]],8e3:[ot,dt(268),[3,121,16],dt(47),[7]]};V=function(t){return Object.keys(t).reduce((function(e,i){return e[i]=new Uint8Array(t[i].reduce((function(t,e){return t.concat(e)}),[])),e})
vendor: 10,187 bytes, line 1
1,{})}(t)}return V},ht={"48000_2":new Uint8Array([11,119,0,255,52,135,192,0,32,0,0,0,68,64,22,4,4,4,4,4,4,4,1,1,1,1,1,1,1,0,199,207,159,62,124,249,243,231,207,159,62,124,249,243,231,207,159,62,124,249,243,231,207,159,62,124,249,243,239,249,213,243,231,207,159,62,124,249,243,231,207,159,62,63,231,87,207,159,62,124,249,243,231,207,159,62,124,248,0,0,0,0,1,227,109,182,219,109,227,199,143,29,221,221,220,0,0,0,0,0,0,0,0,0,0,0,107,90,214,181,173,107,90,214,181,173,107,90,214,181,173,0,0,0,0,219,109,182,219,120,241,227,199,119,119,119,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,120,219,109,182,219,120,241,227,199,119,119,119,0,0,0,0,0,0,0,0,0,0,0,26,214,181,173,107,90,214,181,173,107,90,214,181,173,107,64,0,0,0,54,219,109,182,222,60,120,241,221,221,221,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,30,54,219,109,182,222,60,120,241,221,221,221,192,0,0,0,0,0,0,0,0,0,0,6,181,173,107,90,214,181,173,107,90,214,181,173,107,90,208,0,0,0,13,182,219,109,183,143,30,60,119,119,119,112,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,141,182,219,109,183,143,30,60,119,119,119,112,0,0,0,0,0,0,0,0,0,0,1,173,107,90,214,181,173,107,90,214,181,173,107,90,214,180,0,0,0,3,109,182,219,109,227,199,143,29,221,221,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,227,109,182,219,109,227,199,143,29,221,221,220,0,0,0,0,0,0,0,0,0,0,0,107,90,214,181,173,107,90,214,181,173,107,90,214,181,173,0,0,0,0,219,109,182,219,120,241,227,199,119,119,119,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,120,219,109,182,219,120,241,227,199,119,119,119,0,0,0,0,0,0,0,0,0,0,0,26,214,181,173,107,90,214,181,173,107,90,214,181,173,107,64,0,0,0,54,219,109,182,222,60,120,241,221,221,221,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,76,11]),"48000_6":new Uint8Array([11,119,2,255,63,135,192,0,32,0,0,0,2,0,0,0,4,16,31,186,4,4,1,1,0,64,64,16,16,4,4,24,249,243,231,207,159,62,125,255,58,190,124,249,243,231,207,159,62,124,249,243,231,207,159,62,124,249,243,231,207,159,62,124,249,243,231,207,159,62,124,249,243,231,207,159,62,124,249,243,231,207,159,62,124,249,243,231,199,252,234,249,243,231,207,159,62,124,249,243,231,207,159,62,124,249,243,231,207,159,62,124,249,243,231,207,159,62,124,249,243,231,207,159,62,124,249,243,231,207,159,62,124,249,243,231,207,159,31,243,171,231,207,159,62,124,249,243,231,207,159,62,124,249,243,231,207,159,62,124,249,243,231,207,159,62,124,249,243,231,207,159,62,124,249,243,231,207,159,62,124,249,243,231,207,159,62,124,127,206,175,159,62,124,249,243,231,207,159,62,124,249,243,231,207,159,62,124,249,243,231,207,159,62,124,249,243,231,207,159,62,124,249,243,231,207,159,62,124,249,243,231,207,159,62,124,249,241,255,58,190,124,249,243,231,207,159,62,124,249,243,231,207,159,62,124,249,243,231,207,159,62,124,249,243,231,207,159,62,124,249,243,231,207,159,62,124,249,243,231,207,159,62,124,249,243,231,199,252,234,0,0,0,0,54,190,124,249,243,109,182,219,111,30,60,120,241,227,199,143,30,60,120,241,227,109,182,249,243,90,214,181,173,107,90,214,181,173,104,0,0,0,111,159,62,124,219,109,182,219,199,143,30,60,120,241,227,199,143,30,60,109,182,223,62,107,90,214,181,173,107,90,214,181,173,0,0,0,13,243,231,207,155,109,182,219,120,241,227,199,143,30,60,120,241,227,199,143,27,109,183,207,154,214,181,173,107,90,214,181,173,107,64,0,0,3,107,231,207,159,54,219,109,182,241,227,199,143,30,60,120,241,227,199,143,27,109,183,207,154,214,181,173,107,90,214,181,173,107,64,0,0,3,124,249,243,230,219,109,182,222,60,120,241,227,199,143,30,60,120,241,227,118,219,109,243,230,181,173,107,90,214,181,173,107,90,208,0,0,0,217,0,0,0,0,3,107,231,207,159,54,219,109,182,241,227,199,143,30,60,120,241,227,199,143,30,54,219,111,159,53,173,107,90,214,181,173,107,90,214,128,0,0,6,249,243,231,205,182,219,109,188,120,241,227,199,143,30,60,120,241,227,198,219,109,243,230,181,173,107,90,214,181,173,107,90,208,0,0,0,223,62,124,249,182,219,109,183,143,30,60,120,241,227,199,143,30,60,120,241,182,219,124,249,173,107,90,214,181,173,107,90,214,180,0,0,0,54,190,124,249,243,109,182,219,111,30,60,120,241,227,199,143,30,60,120,241,182,219,124,249,173,107,90,214,181,173,107,90,214,180,0,0,0,55,207,159,62,109,182,219,109,227,199,143,30,60,120,241,227,199,143,30,55,109,182,223,62,107,90,214,181,173,107,90,214,181,173,0,0,0,13,144,0,0,0,0,54,190,124,249,243,109,182,219,111,30,60,120,241,227,199,143,30,60,120,241,227,109,182,249,243,90,214,181,173,107,90,214,181,173,104,0,0,0,111,159,62,124,219,109,182,219,199,143,30,60,120,241,227,199,143,30,60,109,182,223,62,107,90,214,181,173,107,90,214,181,173,0,0,0,13,243,231,207,155,109,182,219,120,241,227,199,143,30,60,120,241,227,199,143,27,109,183,207,154,214,181,173,107,90,214,181,173,107,64,0,0,3,107,231,207,159,54,219,109,182,241,227,199,143,30,60,120,241,227,199,143,27,109,183,207,154,214,181,173,107,90,214,181,173,107,64,0,0,3,124,249,243,230,219,109,182,222,60,120,241,227,199,143,30,60,120,241,227,118,219,109,243,230,181,173,107,90,214,181,173,107,90,208,0,0,0,217,0,0,0,0,3,107,231,207,159,54,219,109,182,241,227,199,143,30,60,120,241,227,199,143,30,54,219,111,159,53,173,107,90,214,181,173,107,90,214,128,0,0,6,249,243,231,205,182,219,109,188,120,241,227,199,143,30,60,120,241,227,198,219,109,243,230,181,173,107,90,214,181,173,107,90,208,0,0,0,223,62,124,249,182,219,109,183,143,30,60,120,241,227,199,143,30,60,120,241,182,219,124,249,173,107,90,214,181,173,107,90,214,180,0,0,0,54,190,124,249,243,109,182,219,111,30,60,120,241,227,199,143,30,60,120,241,182,219,124,249,173,107,90,214,181,173,107,90,214,180,0,0,0,55,207,159,62,109,182,219,109,227,199,143,30,60,120,241,227,199,143,30,55,109,182,223,62,107,90,214,181,173,107,90,214,181,173,0,0,0,13,144,0,0,0,0,54,190,124,249,243,109,182,219,111,30,60,120,241,227,199,143,30,60,120,241,227,109,182,249,243,90,214,181,173,107,90,214,181,173,104,0,0,0,111,159,62,124,219,109,182,219,199,143,30,60,120,241,227,199,143,30,60,109,182,223,62,107,90,214,181,173,107,90,214,181,173,0,0,0,13,243,231,207,155,109,182,219,120,241,227,199,143,30,60,120,241,227,199,143,27,109,183,207,154,214,181,173,107,90,214,181,173,107,64,0,0,3,107,231,207,159,54,219,109,182,241,227,199,143,30,60,120,241,227,199,143,27,109,183,207,154,214,181,173,107,90,214,181,173,107,64,0,0,3,124,249,243,230,219,109,182,222,60,120,241,227,199,143,30,60,120,241,227,118,219,109,243,230,181,173,107,90,214,181,173,107,90,208,0,0,0,217,0,0,0,0,3,107,231,207,159,54,219,109,182,241,227,199,143,30,60,120,241,227,199,143,30,54,219,111,159,53,173,107,90,214,181,173,107,90,214,128,0,0,6,249,243,231,205,182,219,109,188,120,241,227,199,143,30,60,120,241,227,198,219,109,243,230,181,173,107,90,214,181,173,107,90,208,0,0,0,223,62,124,249,182,219,109,183,143,30,60,120,241,227,199,143,30,60,120,241,182,219,124,249,173,107,90,214,181,173,107,90,214,180,0,0,0,54,190,124,249,243,109,182,219,111,30,60,120,241,227,199,143,30,60,120,241,182,219,124,249,173,107,90,214,181,173,107,90,214,180,0,0,0,55,207,159,62,109,182,219,109,227,199,143,30,60,120,241,227,199,143,30,55,109,182,223,62,107,90,214,181,173,107,90,214,181,173,0,0,0,13,144,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,88,6])},lt=9e4;Z=function(t,e){return H(K(t,e))},$=function(t,e){return X(q(t),e)},J=function(t,e,i){return q(i?t:t-e)};var ct=lt,ut=(H=function(t){return t*lt},X=function(t,e){return t*e},q=function(t){return t/lt},K=function(t,e){return t/e},Z),ft=$,mt=J,gt=function(t,e,i,n){var a,r,s,o,d=0,p=0,h=0,l=0;if(e.length){a=ut(t.baseMediaDecodeTime,t.samplerate);var c=e[0]&&e[0].sampleCount||1024;if(d=Math.ceil(ct/(t.samplerate/c)),i&&n&&(p=a-Math.max(i,n),l=(h=Math.floor(p/d))*d),!(h<1||l>ct/2)){var u;for("ec-3"===t.codec?(r=ht[t.samplerate+"_"+t.channelcount],u=1536):(r=pt()[t.samplerate],u=1024),r||(r=e[0].data,u=c),s=0;s<h;s++)o=e[0],e.splice(0,0,{data:r,dts:o.dts-d,pts:o.pts-d,sampleCount:u});return t.baseMediaDecodeTime-=Math.floor(ft(l,t.samplerate)),l}}},yt=function(t){var e,i,n=[];for(e=0;e<t.length;e++)i=t[e],n.push({size:i.data.byteLength,duration:i.sampleCount||1024});return n},_t=function(t){var e,i,n=0,a=new Uint8Array(function(t){var e,i=0;for(e=0;e<t.length;e++)i+=t[e].data.byteLength;return i}(t));for(e=0;e<t.length;e++)i=t[e],a.set(i.data,n),n+=i.data.byteLength;return a},St=ct,bt=function(t){delete t.minSegmentDts,delete t.maxSegmentDts,delete t.minSegmentPts,delete t.maxSegmentPts},vt=function(t,e){var i,n=t.minSegmentDts;return e||(n-=t.timelineStartInfo.dts),i=t.timelineStartInfo.baseMediaDecodeTime,i+=n,i=Math.max(0,i),"audio"===t.type&&(i*=t.samplerate/St,i=Math.floor(i)),i},Tt=function(t,e){"number"==typeof e.pts&&(void 0===t.timelineStartInfo.pts&&(t.timelineStartInfo.pts=e.pts),void 0===t.minSegmentPts?t.minSegmentPts=e.pts:t.minSegmentPts=Math.min(t.minSegmentPts,e.pts),t.timelineStartInfo.minSegmentPts=t.minSegmentPts,void 0===t.maxSegmentPts?t.maxSegmentPts=e.pts:t.maxSegmentPts=Math.max(t.maxSegmentPts,e.pts)),"number"==typeof e.dts&&(void 0===t.timelineStartInfo.dts&&(t.timelineStartInfo.dts=e.dts),void 0===t.minSegmentDts?t.minSegmentDts=e.dts:t.minSegmentDts=Math.min(t.minSegmentDts,e.dts),void 0===t.maxSegmentDts?t.maxSegmentDts=e.dts:t.maxSegmentDts=Math.max(t.maxSegmentDts,e.dts))},wt=function(t){for(var e=0,i=[],n=0,a=0;e<t.byteLength&&128!==t[e];){for(;255===t[e];)n+=255,e++;for(n+=t[e++];255===t[e];)a+=255,e++;a+=t[e++];var r=String.fromCharCode(t[e+3],t[e+4],t[e+5],t[e+6]);4===n&&"GA94"===r&&i.push({payloadType:n,payloadSize:a,payload:t.subarray(e,e+a)}),e+=a,n=0,a=0}return i},kt=function(t){return 181!==t.payload[0]||49!=(t.payload[1]<<8|t.payload[2])||"GA94"!==String.fromCharCode(t.payload[3],t.payload[4],t.payload[5],t.payload[6])||3!==t.payload[7]?null:t.payload.subarray(8,t.payload.length-1)},Ct=function(t,e){var i,n,a,r,s=[];if(!(64&e[0]))return s;for(n=31&e[0],i=0;i<n;i++)r={type:3&e[2+(a=3*i)],pts:t},4&e[a+2]&&(r.ccData=e[a+3]<<8|e[a+4],s.push(r));return s},Pt=4,At=function t(e){e=e||{},t.prototype.init.call(this),this.parse708captions_="boolean"!=typeof e.parse708captions||e.parse708captions,this.captionPackets_=[],this.ccStreams_=[new Gt(0,0),new Gt(0,1),new Gt(1,0),new Gt(1,1)],this.parse708captions_&&(this.cc708Stream_=new Rt({captionServices:e.captionServices})),this.reset(),this.ccStreams_.forEach(
vendor: 6,749 bytes, line 1
1(function(t){t.on("data",this.trigger.bind(this,"data")),t.on("partialdone",this.trigger.bind(this,"partialdone")),t.on("done",this.trigger.bind(this,"done"))}),this),this.parse708captions_&&(this.cc708Stream_.on("data",this.trigger.bind(this,"data")),this.cc708Stream_.on("partialdone",this.trigger.bind(this,"partialdone")),this.cc708Stream_.on("done",this.trigger.bind(this,"done")))};(At.prototype=new Q).push=function(t){var e=this;"sei_rbsp"===t.nalUnitType&&wt(t.escapedRBSP).filter((function(t){return t.payloadType===Pt})).map(kt).forEach((function(i){i&&(e.captionPackets_=e.captionPackets_.concat(Ct(t.pts,i)))}))},At.prototype.flushCCStreams=function(t){this.ccStreams_.forEach((function(e){return"flush"===t?e.flush():e.partialFlush()}),this)},At.prototype.flushStream=function(t){this.captionPackets_.length?(this.captionPackets_.forEach((function(t,e){t.presortIndex=e})),this.captionPackets_.sort((function(t,e){return t.pts===e.pts?t.presortIndex-e.presortIndex:t.pts-e.pts})),this.captionPackets_.forEach((function(t){t.type<2?this.dispatchCea608Packet(t):this.dispatchCea708Packet(t)}),this),this.captionPackets_.length=0,this.flushCCStreams(t)):this.flushCCStreams(t)},At.prototype.flush=function(){return this.flushStream("flush")},At.prototype.partialFlush=function(){return this.flushStream("partialFlush")},At.prototype.reset=function(){this.latestDts_=null,this.ignoreNextEqualDts_=!1,this.numSameDts_=0,this.activeCea608Channel_=[null,null],this.ccStreams_.forEach((function(t){t.reset()}))},At.prototype.dispatchCea608Packet=function(t){this.setsTextOrXDSActive(t)?this.activeCea608Channel_[t.type]=null:this.setsChannel1Active(t)?this.activeCea608Channel_[t.type]=0:this.setsChannel2Active(t)&&(this.activeCea608Channel_[t.type]=1),null!==this.activeCea608Channel_[t.type]&&this.ccStreams_[(t.type<<1)+this.activeCea608Channel_[t.type]].push(t)},At.prototype.setsChannel1Active=function(t){return 4096==(30720&t.ccData)},At.prototype.setsChannel2Active=function(t){return 6144==(30720&t.ccData)},At.prototype.setsTextOrXDSActive=function(t){return 256==(28928&t.ccData)||4138==(30974&t.ccData)||6186==(30974&t.ccData)},At.prototype.dispatchCea708Packet=function(t){this.parse708captions_&&this.cc708Stream_.push(t)};var Et={127:9834,4128:32,4129:160,4133:8230,4138:352,4140:338,4144:9608,4145:8216,4146:8217,4147:8220,4148:8221,4149:8226,4153:8482,4154:353,4156:339,4157:8480,4159:376,4214:8539,4215:8540,4216:8541,4217:8542,4218:9168,4219:9124,4220:9123,4221:9135,4222:9126,4223:9121,4256:12600},xt=function(t){return 32<=t&&t<=127||160<=t&&t<=255},Ut=function(t){this.windowNum=t,this.reset()};Ut.prototype.reset=function(){this.clearText(),this.pendingNewLine=!1,this.winAttr={},this.penAttr={},this.penLoc={},this.penColor={},this.visible=0,this.rowLock=0,this.columnLock=0,this.priority=0,this.relativePositioning=0,this.anchorVertical=0,this.anchorHorizontal=0,this.anchorPoint=0,this.rowCount=1,this.virtualRowCount=this.rowCount+1,this.columnCount=41,this.windowStyle=0,this.penStyle=0},Ut.prototype.getText=function(){return this.rows.join("\\n")},Ut.prototype.clearText=function(){this.rows=[""],this.rowIdx=0},Ut.prototype.newLine=function(t){for(this.rows.length>=this.virtualRowCount&&"function"==typeof this.beforeRowOverflow&&this.beforeRowOverflow(t),this.rows.length>0&&(this.rows.push(""),this.rowIdx++);this.rows.length>this.virtualRowCount;)this.rows.shift(),this.rowIdx--},Ut.prototype.isEmpty=function(){return 0===this.rows.length||1===this.rows.length&&""===this.rows[0]},Ut.prototype.addText=function(t){this.rows[this.rowIdx]+=t},Ut.prototype.backspace=function(){if(!this.isEmpty()){var t=this.rows[this.rowIdx];this.rows[this.rowIdx]=t.substr(0,t.length-1)}};var Mt=function(t,e,i){this.serviceNum=t,this.text="",this.currentWindow=new Ut(-1),this.windows=[],this.stream=i,"string"==typeof e&&this.createTextDecoder(e)};Mt.prototype.init=function(t,e){this.startPts=t;for(var i=0;i<8;i++)this.windows[i]=new Ut(i),"function"==typeof e&&(this.windows[i].beforeRowOverflow=e)},Mt.prototype.setCurrentWindow=function(t){this.currentWindow=this.windows[t]},Mt.prototype.createTextDecoder=function(t){if("undefined"==typeof TextDecoder)this.stream.trigger("log",{level:"warn",message:"The `encoding` option is unsupported without TextDecoder support"});else try{this.textDecoder_=new TextDecoder(t)}catch(e){this.stream.trigger("log",{level:"warn",message:"TextDecoder could not be created with "+t+" encoding. "+e})}};var Rt=function t(e){e=e||{},t.prototype.init.call(this);var i,n=this,a=e.captionServices||{},r={};Object.keys(a).forEach((function(t){i=a[t],/^SERVICE/.test(t)&&(r[t]=i.encoding)})),this.serviceEncodings=r,this.current708Packet=null,this.services={},this.push=function(t){3===t.type?(n.new708Packet(),n.add708Bytes(t)):(null===n.current708Packet&&n.new708Packet(),n.add708Bytes(t))}};Rt.prototype=new Q,Rt.prototype.new708Packet=function(){null!==this.current708Packet&&this.push708Packet(),this.current708Packet={data:[],ptsVals:[]}},Rt.prototype.add708Bytes=function(t){var e=t.ccData,i=e>>>8,n=255&e;this.current708Packet.ptsVals.push(t.pts),this.current708Packet.data.push(i),this.current708Packet.data.push(n)},Rt.prototype.push708Packet=function(){var t=this.current708Packet,e=t.data,i=null,n=null,a=0,r=e[a++];for(t.seq=r>>6,t.sizeCode=63&r;a<e.length;a++)n=31&(r=e[a++]),7==(i=r>>5)&&n>0&&(i=r=e[a++]),this.pushServiceBlock(i,a,n),n>0&&(a+=n-1)},Rt.prototype.pushServiceBlock=function(t,e,i){var n,a=e,r=this.current708Packet.data,s=this.services[t];for(s||(s=this.initService(t,a));a<e+i&&a<r.length;a++)n=r[a],xt(n)?a=this.handleText(a,s):24===n?a=this.multiByteCharacter(a,s):16===n?a=this.extendedCommands(a,s):128<=n&&n<=135?a=this.setCurrentWindow(a,s):152<=n&&n<=159?a=this.defineWindow(a,s):136===n?a=this.clearWindows(a,s):140===n?a=this.deleteWindows(a,s):137===n?a=this.displayWindows(a,s):138===n?a=this.hideWindows(a,s):139===n?a=this.toggleWindows(a,s):151===n?a=this.setWindowAttributes(a,s):144===n?a=this.setPenAttributes(a,s):145===n?a=this.setPenColor(a,s):146===n?a=this.setPenLocation(a,s):143===n?s=this.reset(a,s):8===n?s.currentWindow.backspace():12===n?s.currentWindow.clearText():13===n?s.currentWindow.pendingNewLine=!0:14===n?s.currentWindow.clearText():141===n&&a++},Rt.prototype.extendedCommands=function(t,e){var i=this.current708Packet.data[++t];return xt(i)&&(t=this.handleText(t,e,{isExtended:!0})),t},Rt.prototype.getPts=function(t){return this.current708Packet.ptsVals[Math.floor(t/2)]},Rt.prototype.initService=function(t,e){var i,n,a=this;return(i="SERVICE"+t)in this.serviceEncodings&&(n=this.serviceEncodings[i]),this.services[t]=new Mt(t,n,a),this.services[t].init(this.getPts(e),(function(e){a.flushDisplayed(e,a.services[t])})
vendor: 10,372 bytes, line 1
1),this.services[t]},Rt.prototype.handleText=function(t,e,i){var n,a,r=i&&i.isExtended,s=i&&i.isMultiByte,o=this.current708Packet.data,d=r?4096:0,p=o[t],h=o[t+1],l=e.currentWindow;return e.textDecoder_&&!r?(s?(a=[p,h],t++):a=[p],n=e.textDecoder_.decode(new Uint8Array(a))):n=function(t){var e=Et[t]||t;return 4096&t&&t===e?"":String.fromCharCode(e)}(d|p),l.pendingNewLine&&!l.isEmpty()&&l.newLine(this.getPts(t)),l.pendingNewLine=!1,l.addText(n),t},Rt.prototype.multiByteCharacter=function(t,e){var i=this.current708Packet.data,n=i[t+1],a=i[t+2];return xt(n)&&xt(a)&&(t=this.handleText(++t,e,{isMultiByte:!0})),t},Rt.prototype.setCurrentWindow=function(t,e){var i=7&this.current708Packet.data[t];return e.setCurrentWindow(i),t},Rt.prototype.defineWindow=function(t,e){var i=this.current708Packet.data,n=i[t],a=7&n;e.setCurrentWindow(a);var r=e.currentWindow;return n=i[++t],r.visible=(32&n)>>5,r.rowLock=(16&n)>>4,r.columnLock=(8&n)>>3,r.priority=7&n,n=i[++t],r.relativePositioning=(128&n)>>7,r.anchorVertical=127&n,n=i[++t],r.anchorHorizontal=n,n=i[++t],r.anchorPoint=(240&n)>>4,r.rowCount=15&n,n=i[++t],r.columnCount=63&n,n=i[++t],r.windowStyle=(56&n)>>3,r.penStyle=7&n,r.virtualRowCount=r.rowCount+1,t},Rt.prototype.setWindowAttributes=function(t,e){var i=this.current708Packet.data,n=i[t],a=e.currentWindow.winAttr;return n=i[++t],a.fillOpacity=(192&n)>>6,a.fillRed=(48&n)>>4,a.fillGreen=(12&n)>>2,a.fillBlue=3&n,n=i[++t],a.borderType=(192&n)>>6,a.borderRed=(48&n)>>4,a.borderGreen=(12&n)>>2,a.borderBlue=3&n,n=i[++t],a.borderType+=(128&n)>>5,a.wordWrap=(64&n)>>6,a.printDirection=(48&n)>>4,a.scrollDirection=(12&n)>>2,a.justify=3&n,n=i[++t],a.effectSpeed=(240&n)>>4,a.effectDirection=(12&n)>>2,a.displayEffect=3&n,t},Rt.prototype.flushDisplayed=function(t,e){for(var i=[],n=0;n<8;n++)e.windows[n].visible&&!e.windows[n].isEmpty()&&i.push(e.windows[n].getText());e.endPts=t,e.text=i.join("\\n\\n"),this.pushCaption(e),e.startPts=t},Rt.prototype.pushCaption=function(t){""!==t.text&&(this.trigger("data",{startPts:t.startPts,endPts:t.endPts,text:t.text,stream:"cc708_"+t.serviceNum}),t.text="",t.startPts=t.endPts)},Rt.prototype.displayWindows=function(t,e){var i=this.current708Packet.data[++t],n=this.getPts(t);this.flushDisplayed(n,e);for(var a=0;a<8;a++)i&1<<a&&(e.windows[a].visible=1);return t},Rt.prototype.hideWindows=function(t,e){var i=this.current708Packet.data[++t],n=this.getPts(t);this.flushDisplayed(n,e);for(var a=0;a<8;a++)i&1<<a&&(e.windows[a].visible=0);return t},Rt.prototype.toggleWindows=function(t,e){var i=this.current708Packet.data[++t],n=this.getPts(t);this.flushDisplayed(n,e);for(var a=0;a<8;a++)i&1<<a&&(e.windows[a].visible^=1);return t},Rt.prototype.clearWindows=function(t,e){var i=this.current708Packet.data[++t],n=this.getPts(t);this.flushDisplayed(n,e);for(var a=0;a<8;a++)i&1<<a&&e.windows[a].clearText();return t},Rt.prototype.deleteWindows=function(t,e){var i=this.current708Packet.data[++t],n=this.getPts(t);this.flushDisplayed(n,e);for(var a=0;a<8;a++)i&1<<a&&e.windows[a].reset();return t},Rt.prototype.setPenAttributes=function(t,e){var i=this.current708Packet.data,n=i[t],a=e.currentWindow.penAttr;return n=i[++t],a.textTag=(240&n)>>4,a.offset=(12&n)>>2,a.penSize=3&n,n=i[++t],a.italics=(128&n)>>7,a.underline=(64&n)>>6,a.edgeType=(56&n)>>3,a.fontStyle=7&n,t},Rt.prototype.setPenColor=function(t,e){var i=this.current708Packet.data,n=i[t],a=e.currentWindow.penColor;return n=i[++t],a.fgOpacity=(192&n)>>6,a.fgRed=(48&n)>>4,a.fgGreen=(12&n)>>2,a.fgBlue=3&n,n=i[++t],a.bgOpacity=(192&n)>>6,a.bgRed=(48&n)>>4,a.bgGreen=(12&n)>>2,a.bgBlue=3&n,n=i[++t],a.edgeRed=(48&n)>>4,a.edgeGreen=(12&n)>>2,a.edgeBlue=3&n,t},Rt.prototype.setPenLocation=function(t,e){var i=this.current708Packet.data,n=i[t],a=e.currentWindow.penLoc;return e.currentWindow.pendingNewLine=!0,n=i[++t],a.row=15&n,n=i[++t],a.column=63&n,t},Rt.prototype.reset=function(t,e){var i=this.getPts(t);return this.flushDisplayed(i,e),this.initService(e.serviceNum,t)};var It={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,304:174,305:176,306:189,307:191,308:8482,309:162,310:163,311:9834,312:224,313:160,314:232,315:226,316:234,317:238,318:244,319:251,544:193,545:201,546:211,547:218,548:220,549:252,550:8216,551:161,552:42,553:39,554:8212,555:169,556:8480,557:8226,558:8220,559:8221,560:192,561:194,562:199,563:200,564:202,565:203,566:235,567:206,568:207,569:239,570:212,571:217,572:249,573:219,574:171,575:187,800:195,801:227,802:205,803:204,804:236,805:210,806:242,807:213,808:245,809:123,810:125,811:92,812:94,813:95,814:124,815:126,816:196,817:228,818:214,819:246,820:223,821:165,822:164,823:9474,824:197,825:229,826:216,827:248,828:9484,829:9488,830:9492,831:9496},Dt=function(t){return t=It[t]||t,String.fromCharCode(t).replace(/[\\x00]/g,"")},Ot=[4352,4384,4608,4640,5376,5408,5632,5664,5888,5920,4096,4864,4896,5120,5152],Lt=function(){for(var t=[],e=15;e--;)t.push("");return t},Bt=function(){for(var t=[],e=15;e--;)t[e]=0;return t},Gt=function t(e,i,n){t.prototype.init.call(this),this.field_=e||0,this.dataChannel_=i||0,this.name_="CC"+(1+(this.field_<<1|this.dataChannel_)),this.setConstants(),this.reset(),this.push=function(t){var e,i,n,a,r;if((e=32639&t.ccData)!==this.lastControlCode_){if(4096==(61440&e)?this.lastControlCode_=e:e!==this.PADDING_&&(this.lastControlCode_=null),n=e>>>8,a=255&e,e!==this.PADDING_)if(e===this.RESUME_CAPTION_LOADING_)this.mode_="popOn";else if(e===this.END_OF_CAPTION_)this.mode_="popOn",this.clearFormatting(t.pts),this.flushDisplayed(t.pts),i=this.displayed_,this.displayed_=this.nonDisplayed_,this.nonDisplayed_=i,i=this.displayedIndent_,this.displayedIndent_=this.nonDisplayedIndent_,this.nonDisplayedIndent_=i,this.startPts_=t.pts;else if(e===this.ROLL_UP_2_ROWS_)this.rollUpRows_=2,this.setRollUp(t.pts);else if(e===this.ROLL_UP_3_ROWS_)this.rollUpRows_=3,this.setRollUp(t.pts);else if(e===this.ROLL_UP_4_ROWS_)this.rollUpRows_=4,this.setRollUp(t.pts);else if(e===this.CARRIAGE_RETURN_)this.clearFormatting(t.pts),this.flushDisplayed(t.pts),this.shiftRowsUp_(),this.startPts_=t.pts;else if(e===this.BACKSPACE_)"popOn"===this.mode_?this.nonDisplayed_[this.row_]=this.nonDisplayed_[this.row_].slice(0,-1):this.displayed_[this.row_]=this.displayed_[this.row_].slice(0,-1);else if(e===this.ERASE_DISPLAYED_MEMORY_)this.flushDisplayed(t.pts),this.displayed_=Lt(),this.displayedIndent_=Bt();else if(e===this.ERASE_NON_DISPLAYED_MEMORY_)this.nonDisplayed_=Lt(),this.nonDisplayedIndent_=Bt();else if(e===this.RESUME_DIRECT_CAPTIONING_)"paintOn"!==this.mode_&&(this.flushDisplayed(t.pts),this.displayed_=Lt(),this.displayedIndent_=Bt()),this.mode_="paintOn",this.startPts_=t.pts;else{if(!Boolean(this.mode_))return;if(this.isSpecialCharacter(n,a))r=Dt((n=(3&n)<<8)|a),this[this.mode_](t.pts,r),this.column_++;else if(this.isExtCharacter(n,a))"popOn"===this.mode_?this.nonDisplayed_[this.row_]=this.nonDisplayed_[this.row_].slice(0,-1):this.displayed_[this.row_]=this.displayed_[this.row_].slice(0,-1),r=Dt((n=(3&n)<<8)|a),this[this.mode_](t.pts,r),this.column_++;else if(this.isMidRowCode(n,a))this.clearFormatting(t.pts),this[this.mode_](t.pts," "),this.column_++,14&~a||this.addFormatting(t.pts,["i"]),1&~a||this.addFormatting(t.pts,["u"]);else if(this.isOffsetControlCode(n,a)){var s=3&a;this.column_+=s,this.incrementIdentation(s)}else if(this.isPAC(n,a)){var o=Ot.indexOf(7968&e);"rollUp"===this.mode_&&(o-this.rollUpRows_+1<0&&(o=this.rollUpRows_-1),this.setRollUp(t.pts,o)),o!==this.row_&&(this.clearFormatting(t.pts),this.changeRow(o)),1&a&&-1===this.formatting_.indexOf("u")&&this.addFormatting(t.pts,["u"]),16&~e||(this.column_=4*((14&e)>>1),"popOn"===this.mode_?this.nonDisplayedIndent_[this.row_]=this.column_:"rollUp"===this.mode_&&(this.displayedIndent_[this.row_]=this.column_)),this.isColorPAC(a)&&(14&~a||this.addFormatting(t.pts,["i"]))}else this.isNormalChar(n)&&(r=Dt(n),0!==a&&(r+=Dt(a)),this[this.mode_](t.pts,r),this.column_+=r.length)}}else this.lastControlCode_=null}};Gt.prototype=new Q,Gt.prototype.flushDisplayed=function(t){for(var e=0;e<this.displayed_.length;e++){var i=this.displayed_[e];i&&i.length&&this.trigger("data",{startPts:this.startPts_,endPts:t,text:i,stream:this.name_,position:{row:e,column:this.displayedIndent_[e]}})}},Gt.prototype.reset=function(){this.mode_="popOn",this.topRow_=0,this.startPts_=0,this.displayed_=Lt(),this.nonDisplayed_=Lt(),this.displayedIndent_=Bt(),this.nonDisplayedIndent_=Bt(),this.lastControlCode_=null,this.column_=0,this.row_=14,this.rollUpRows_=2,this.formatting_=[]},Gt.prototype.setConstants=function(){0===this.dataChannel_?(this.BASE_=16,this.EXT_=17,this.CONTROL_=(20|this.field_)<<8,this.OFFSET_=23):1===this.dataChannel_&&(this.BASE_=24,this.EXT_=25,this.CONTROL_=(28|this.field_)<<8,this.OFFSET_=31),this.PADDING_=0,this.RESUME_CAPTION_LOADING_=32|this.CONTROL_,this.END_OF_CAPTION_=47|this.CONTROL_,this.ROLL_UP_2_ROWS_=37|this.CONTROL_,this.ROLL_UP_3_ROWS_=38|this.CONTROL_,this.ROLL_UP_4_ROWS_=39|this.CONTROL_,this.CARRIAGE_RETURN_=45|this.CONTROL_,this.RESUME_DIRECT_CAPTIONING_=41|this.CONTROL_,this.BACKSPACE_=33|this.CONTROL_,this.ERASE_DISPLAYED_MEMORY_=44|this.CONTROL_,this.ERASE_NON_DISPLAYED_MEMORY_=46|this.CONTROL_,this.TAB_OFFSET_1_=33,this.TAB_OFFSET_2_=34,this.TAB_OFFSET_3_=35},Gt.prototype.isSpecialCharacter=function(t,e){return t===this.EXT_&&e>=48&&e<=63},Gt.prototype.isExtCharacter=function(t,e){return(t===this.EXT_+1||t===this.EXT_+2)&&e>=32&&e<=63},Gt.prototype.isMidRowCode=function(t,e){return t===this.EXT_&&e>=32&&e<=47},Gt.prototype.isOffsetControlCode=function(t,e){return t===this.OFFSET_&&e>=this.TAB_OFFSET_1_&&e<=this.TAB_OFFSET_3_},Gt.prototype.isPAC=function(t,e){return t>=this.BASE_&&t<this.BASE_+8&&e>=64&&e<=127},Gt.prototype.isColorPAC=function(t){return t>=64&&t<=79||t>=96&&t<=127},Gt.prototype.isNormalChar=function(t){return t>=32&&t<=127},Gt.prototype.setRollUp=function(t,e){if("rollUp"!==this.mode_&&(this.row_=14,this.mode_="rollUp",this.flushDisplayed(t),this.nonDisplayed_=Lt(),this.displayed_=Lt(),this.displayedIndent_=Bt(),this.nonDisplayedIndent_=Bt()),void 0!==e&&e!==this.row_)for(var i=0;i<this.rollUpRows_;i++)this.displayed_[e-i]=this.displayed_[this.row_-i],this.displayed_[this.row_-i]="";void 0===e&&(e=this.row_),this.topRow_=e-this.rollUpRows_+1},Gt.prototype.addFormatting=function(t,e){this.formatting_=this.formatting_.concat(e);var i=e.reduce(
1(function(t,e){return t+"<"+e+">"}),"");this[this.mode_](t,i)},Gt.prototype.clearFormatting=function(t){if(this.formatting_.length){var e=this.formatting_.reverse().reduce((function(t,e){return t+"<
vendor: 6,458 bytes, line 1
1/"+e+">"}),"");this.formatting_=[],this[this.mode_](t,e)}},Gt.prototype.popOn=function(t,e){var i=this.nonDisplayed_[this.row_];i+=e,this.nonDisplayed_[this.row_]=i},Gt.prototype.rollUp=function(t,e){var i=this.displayed_[this.row_];i+=e,this.displayed_[this.row_]=i},Gt.prototype.shiftRowsUp_=function(){var t;for(t=0;t<this.topRow_;t++)this.displayed_[t]="";for(t=this.row_+1;t<15;t++)this.displayed_[t]="";for(t=this.topRow_;t<this.row_;t++)this.displayed_[t]=this.displayed_[t+1];this.displayed_[this.row_]=""},Gt.prototype.paintOn=function(t,e){var i=this.displayed_[this.row_];i+=e,this.displayed_[this.row_]=i},Gt.prototype.changeRow=function(t){if("rollUp"===this.mode_){var e=this.row_-this.topRow_+1;this.topRow_=t-e+1;var i=this.displayed_,n=this.displayedIndent_;this.displayed_=Lt(),this.displayedIndent_=Bt();for(var a=0;a<e;a++)t-a>=0&&(this.displayed_[t-a]=i[this.row_-a],this.displayedIndent_[t-a]=n[this.row_-a])}this.row_=t},Gt.prototype.incrementIdentation=function(t){"popOn"===this.mode_?this.nonDisplayedIndent_[this.row_]+=t:"rollUp"===this.mode_&&(this.displayedIndent_[this.row_]+=t)};var Wt={CaptionStream:At,Cea608Stream:Gt,Cea708Stream:Rt},Ft={H264_STREAM_TYPE:27,H265_STREAM_TYPE:36,ADTS_STREAM_TYPE:15,AC3_STREAM_TYPE:129,EC3_STREAM_TYPE:135,METADATA_STREAM_TYPE:21},Nt=4294967296,zt="shared",Yt=function(t,e){var i=1;for(t>e&&(i=-1);Math.abs(e-t)>Nt;)t+=8589934592*i;return t},jt=function t(e){var i,n;t.prototype.init.call(this),this.type_=e||zt,this.push=function(t){this.type_!==zt&&t.type!==this.type_||(void 0===t.dts&&void 0===t.pts||(void 0===n&&(n=t.dts),t.dts=Yt(t.dts,n),t.pts=Yt(t.pts,n),i=t.dts),this.trigger("data",t))},this.flush=function(){n=i,this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")},this.discontinuity=function(){n=void 0,i=void 0},this.reset=function(){this.discontinuity(),this.trigger("reset")}};jt.prototype=new Q;var Vt,Ht=jt,Xt=Nt,qt=function(t,e,i){if(!t)return-1;for(var n=i;n<t.length;n++)if(t[n]===e)return n;return-1},Kt=0,Zt=3,$t=function(t,e,i){var n,a="";for(n=e;n<i;n++)a+="%"+("00"+t[n].toString(16)).slice(-2);return a},Jt=function(t,e,i){var n=decodeURIComponent($t(t,e,i));return"\\0"===n[n.length-1]&&(n=n.slice(0,-1)),n},Qt=function(t,e,i){return unescape($t(t,e,i))},te=function(t){return t[0]<<21|t[1]<<14|t[2]<<7|t[3]},ee=function(t){return t.data[0]===Zt?Jt:t.data[0]===Kt?Qt:void 0},ie={APIC:function(t){var e,i,n=1;t.data[0]===Zt&&((e=qt(t.data,0,n))<0||(t.mimeType=Qt(t.data,n,e),n=e+1,t.pictureType=t.data[n],n++,(i=qt(t.data,0,n))<0||(t.description=Jt(t.data,n,i),n=i+1,"--\\x3e"===t.mimeType?t.url=Qt(t.data,n,t.data.length):t.pictureData=t.data.subarray(n,t.data.length))))},"T*":function(t){var e=ee(t);e&&(t.value=e(t.data,1,t.data.length).replace(/\\0*$/,""),t.data=t.value,t.values=t.value.split("\\0"))},TXXX:function(t){var e,i=ee(t);i&&-1!==(e=qt(t.data,0,1))&&(t.description=i(t.data,1,e),t.value=i(t.data,e+1,t.data.length).replace(/\\0*$/,""),t.data=t.value)},"W*":function(t){t.url=Qt(t.data,0,t.data.length).replace(/\\0.*$/,"")},WXXX:function(t){var e;t.data[0]===Zt&&-1!==(e=qt(t.data,0,1))&&(t.description=Jt(t.data,1,e),t.url=Qt(t.data,e+1,t.data.length).replace(/\\0.*$/,""))},PRIV:function(t){var e;for(e=0;e<t.data.length;e++)if(0===t.data[e]){t.owner=Qt(t.data,0,e);break}t.privateData=t.data.subarray(e+1),t.data=t.privateData}},ne={parseId3Frames:function(t){var e,i=10,n=0,a=[];if(!(t.length<10||t[0]!=="I".charCodeAt(0)||t[1]!=="D".charCodeAt(0)||t[2]!=="3".charCodeAt(0))){n=te(t.subarray(6,10)),n+=10,64&t[5]&&(i+=4,i+=te(t.subarray(10,14)),n-=te(t.subarray(16,20)));do{if((e=te(t.subarray(i+4,i+8)))<1)break;var r={id:String.fromCharCode(t[i],t[i+1],t[i+2],t[i+3]),data:t.subarray(i+10,i+e+10)};r.key=r.id,ie[r.id]?ie[r.id](r):"T"===r.id[0]?ie["T*"](r):"W"===r.id[0]&&ie["W*"](r),a.push(r),i+=10,i+=e}while(i<n);return a}},parseSyncSafeInteger:te,frameParsers:ie};(Vt=function(t){var e,i={descriptor:t&&t.descriptor},n=0,a=[],r=0;if(Vt.prototype.init.call(this),this.dispatchType=Ft.METADATA_STREAM_TYPE.toString(16),i.descriptor)for(e=0;e<i.descriptor.length;e++)this.dispatchType+=("00"+i.descriptor[e].toString(16)).slice(-2);this.push=function(t){var e,i,s,o,d;if("timed-metadata"===t.type)if(t.dataAlignmentIndicator&&(r=0,a.length=0),0===a.length&&(t.data.length<10||t.data[0]!=="I".charCodeAt(0)||t.data[1]!=="D".charCodeAt(0)||t.data[2]!=="3".charCodeAt(0)))this.trigger("log",{level:"warn",message:"Skipping unrecognized metadata packet"});else if(a.push(t),r+=t.data.byteLength,1===a.length&&(n=ne.parseSyncSafeInteger(t.data.subarray(6,10)),n+=10),!(r<n)){for(e={data:new Uint8Array(n),frames:[],pts:a[0].pts,dts:a[0].dts},d=0;d<n;)e.data.set(a[0].data.subarray(0,n-d),d),d+=a[0].data.byteLength,r-=a[0].data.byteLength,a.shift();i=10,64&e.data[5]&&(i+=4,i+=ne.parseSyncSafeInteger(e.data.subarray(10,14)),n-=ne.parseSyncSafeInteger(e.data.subarray(16,20)));do{if((s=ne.parseSyncSafeInteger(e.data.subarray(i+4,i+8)))<1){this.trigger("log",{level:"warn",message:"Malformed ID3 frame encountered. Skipping remaining metadata parsing."});break}if((o={id:String.fromCharCode(e.data[i],e.data[i+1],e.data[i+2],e.data[i+3]),data:e.data.subarray(i+10,i+s+10)}).key=o.id,ne.frameParsers[o.id]?ne.frameParsers[o.id](o):"T"===o.id[0]?ne.frameParsers["T*"](o):"W"===o.id[0]&&ne.frameParsers["W*"](o),"com.apple.streaming.transportStreamTimestamp"===o.owner){var p=o.data,h=(1&p[3])<<30|p[4]<<22|p[5]<<14|p[6]<<6|p[7]>>>2;h*=4,h+=3&p[7],o.timeStamp=h,void 0===e.pts&&void 0===e.dts&&(e.pts=o.timeStamp,e.dts=o.timeStamp),this.trigger("timestamp",o)}e.frames.push(o),i+=10,i+=s}while(i<n);this.trigger("data",e)}}}).prototype=new Q;var ae,re,se,oe,de=Vt,pe=Xt,he=Ht,le=188;(re=function(){var t=new Uint8Array(le),e=0;re.prototype.init.call(this),this.push=function(i){var n,a=0,r=le;for(e?((n=new Uint8Array(i.byteLength+e)).set(t.subarray(0,e)),n.set(i,e),e=0):n=i;r<n.byteLength;)71!==n[a]||71!==n[r]?(a++,r++):(this.trigger("data",n.subarray(a,r)),a+=le,r+=le);a<n.byteLength&&(t.set(n.subarray(a),0),e=n.byteLength-a)},this.flush=function(){e===le&&71===t[0]&&(this.trigger("data",t),e=0),this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")},this.reset=function(){e=0,this.trigger("reset")}}).prototype=new Q,(se=function(){var t,e,i,n;se.prototype.init.call(this),n=this,this.packetsWaitingForPmt=[],this.programMapTable=void 0,t=function(t,n){var a=0;
1n.payloadUnitStartIndicator&&(a+=t[a]+1),"pat"===n.type?e(t.subarray(a),n):i(t.subarray(a),n)},e=function(t,e){e.section_number=t[7],e.last_section_number=t[8],n.pmtPid=(31&t[10])<<8|t[11],e.pmtPid=n.pmtPid},i=function(t,e){var i,a;if(1&t[5]){for(n.programMapTable={video:null,audio:null,"timed-metadata":{}},i=3+((15&t[1])<<8|t[2])-4,a=12+((15&t[10])<<8|t[11]);a<i;){var r=t[a],s=(31&t[a+1])<<8|t[a+2];[Ft.H264_STREAM_TYPE,Ft.H265_STREAM_TYPE].indexOf(r)>-1&&null===n.programMapTable.video?n.programMapTable.video={pid:s,streamType:r,codec:ce[r]}:r!==Ft.ADTS_STREAM_TYPE&&r!==Ft.AC3_STREAM_TYPE&&r!==Ft.EC3_STREAM_TYPE||null!==n.programMapTable.audio?r===Ft.METADATA_STREAM_TYPE&&(n.programMapTable["timed-metadata"][s]=r):n.programMapTable.audio={pid:s,streamType:r,codec:ce[r]},a+=5+((15&t[a+3])<<8|t[a+4])}e.programMapTable=n.programMapTable}},this.push=function(e){var i={},n=4;if(i.payloadUnitStartIndicator=!!(64&e[1]),i.pid=31&e[1],i.pid<<=8,i.pid|=e[2],(48&e[3])>>>4>1&&(n+=e[n]+1),0===i.pid)i.type="pat",t(e.subarray(n),i),this.trigger("data",i);else if(i.pid===this.pmtPid)for(i.type="pmt",t(e.subarray(n),i),this.trigger("data",i);this.packetsWaitingForPmt.length;)this.processPes_.apply(this,this.packetsWaitingForPmt.shift());else void 0===this.programMapTable?this.packetsWaitingForPmt.push([e,n,i]):this.processPes_(e,n,i)},this.processPes_=function(t,e,i){this.programMapTable.video&&i.pid===this.programMapTable.video.pid?i.streamType=this.programMapTable.video.streamType:this.programMapTable.audio&&i.pid===this.programMapTable.audio.pid?i.streamType=this.programMapTable.audio.streamType:i.streamType=this.programMapTable["timed-metadata"][i.pid],i.type="pes",i.data=t.subarray(e),i.data.length>0&&this.trigger("data",i)}}).prototype=new Q,se.STREAM_TYPES={h264:27,adts:15},(oe=function(){var t,e=this,i=!1,n={data:[],size:0},a={data:[],size:0},r={data:[],size:0},s={video:!1,audio:!1,metadata:!1},o={video:[],audio:[],"timed-metadata":[]},d=!0,p=function(t,e,i){var n,a=new Uint8Array(t.size),r={type:e,codec:t.codec},d=0,p=0,h=!1;if(t.data.length&&!(t.size<9)){for(r.trackId=t.data[0].pid,d=0;d<t.data.length;d++)n=t.data[d],a.set(n.data,p),p+=n.data.byteLength;if(function(t,e){var i,n=t[0]<<16|t[1]<<8|t[2];e.data=new Uint8Array,1===n&&(e.packetLength=6+(t[4]<<8|t[5]),e.dataAlignmentIndicator=!!(4&t[6]),192&(i=t[7])&&(e.pts=(14&t[9])<<27|(255&t[10])<<20|(254&t[11])<<12|(255&t[12])<<5|(254&t[13])>>>3,e.pts*=4,e.pts+=(6&t[13])>>>1,e.dts=e.pts,64&i&&(e.dts=(14&t[14])<<27|(255&t[15])<<20|(254&t[16])<<12|(255&t[17])<<5|(254&t[18])>>>3,e.dts*=4,e.dts+=(6&t[18])>>>1)),s[e.type]||(e.dts>e.pts?e.dts=0:s[e.type]=!0),e.data=t.subarray(9+t[8]))}(a,r),h="video"===e||r.packetLength<=t.size,(i||h)&&(t.size=0,t.data.length=0),h)o[e].push(r);else{var l=new ArrayBuffer(t.size),c=0;t.data.forEach((function(t){var e=t.data;t.data=new Uint8Array(l,c,e.length),t.data.set(e),c+=t.data.length}))}}};oe.prototype.init.call(this),this.push=function(s){({pat:function(){},pes:function(){var t,e;switch(s.streamType){case Ft.H264_STREAM_TYPE:case Ft.H265_STREAM_TYPE:(t=n).codec=ce[s.streamType],e="video";break;case Ft.ADTS_STREAM_TYPE:case Ft.AC3_STREAM_TYPE:case Ft.EC3_STREAM_TYPE:e="audio",(t=a).codec=ce[s.streamType];break;case Ft.METADATA_STREAM_TYPE:t=r,e="timed-metadata";break;default:return}s.payloadUnitStartIndicator&&p(t,e,!0),t.data.push(s),t.size+=s.data.byteLength},pmt:function(){var n={type:"metadata",tracks:[]};null!==(t=s.programMapTable).video&&n.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+t.video.pid,codec:t.video.codec,type:"video"}),null!==t.audio&&n.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+t.audio.pid,codec:t.audio.codec,type:"audio"}),i=!0,e.trigger("data",n)}})[s.type]()},this.reset=function(){n.size=0,n.data.length=0,a.size=0,a.data.length=0,this.trigger("reset")},this.flushStreams_=function(){p(n,"video"),p(a,"audio"),p(r,"timed-metadata"),d&&o.video.length>0&&o.audio.length>0&&(d=!1,this.handleInitialRollover_()),o.video.forEach((function(t){e.trigger("data",t)})),o.audio.forEach((function(t){e.trigger("data",t)})),o["timed-metadata"].forEach((function(t){e.trigger("data",t)})
vendor: 10,495 bytes, line 1
1),o.video=[],o.audio=[],o["timed-metadata"]=[]},this.handleInitialRollover_=function(){var t=o.video[0].dts>o.video[o.video.length-1].dts,e=o.audio[0].dts>o.audio[o.audio.length-1].dts;if(e&&!t)for(;0<o.audio.length&&o.audio[0].dts>pe;)o.audio[0].dts=o.audio[0].pts=0;else if(!e&&t)for(;0<o.video.length&&o.video[0].dts>pe;)o.video[0].dts=o.video[0].pts=0},this.flush=function(){if(!i&&t){var n={type:"metadata",tracks:[]};null!==t.video&&n.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+t.video.pid,codec:t.video.codec,type:"video"}),null!==t.audio&&n.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+t.audio.pid,codec:t.audio.codec,type:"audio"}),e.trigger("data",n)}i=!1,this.flushStreams_(),this.trigger("done")}}).prototype=new Q;var ce=((ae={})[Ft.H264_STREAM_TYPE]="avc",ae[Ft.H265_STREAM_TYPE]="hevc",ae[Ft.ADTS_STREAM_TYPE]="adts",ae[Ft.AC3_STREAM_TYPE]="ac3-family",ae[Ft.EC3_STREAM_TYPE]="ec-3",ae),ue={PAT_PID:0,MP2T_PACKET_LENGTH:le,TransportPacketStream:re,TransportParseStream:se,ElementaryStream:oe,TimestampRolloverStream:he,CaptionStream:Wt.CaptionStream,Cea608Stream:Wt.Cea608Stream,Cea708Stream:Wt.Cea708Stream,MetadataStream:de};for(var fe in Ft)Ft.hasOwnProperty(fe)&&(ue[fe]=Ft[fe]);var me,ge=ue,ye=ct,_e=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];(me=function(t){var e,i=0;me.prototype.init.call(this),this.skipWarn_=function(t,e){this.trigger("log",{level:"warn",message:"adts skiping bytes "+t+" to "+e+" in frame "+i+" outside syncword"})},this.push=function(n){var a,r,s,o,d,p=0,h=!n.codec||"adts"===n.codec;if(t||(i=0),"audio"===n.type&&h){var l;for(e&&e.length?(s=e,(e=new Uint8Array(s.byteLength+n.data.byteLength)).set(s),e.set(n.data,s.byteLength)):e=n.data;p+7<e.length;)if(255===e[p]&&240==(246&e[p+1])){if("number"==typeof l&&(this.skipWarn_(l,p),l=null),r=2*(1&~e[p+1]),a=(3&e[p+3])<<11|e[p+4]<<3|(224&e[p+5])>>5,d=(o=1024*(1+(3&e[p+6])))*ye/_e[(60&e[p+2])>>>2],e.byteLength-p<a)break;this.trigger("data",{pts:n.pts+i*d,dts:n.dts+i*d,sampleCount:o,audioobjecttype:1+(e[p+2]>>>6&3),channelcount:(1&e[p+2])<<2|(192&e[p+3])>>>6,samplerate:_e[(60&e[p+2])>>>2],samplingfrequencyindex:(60&e[p+2])>>>2,samplesize:16,data:e.subarray(p+7+r,p+a)}),i++,p+=a}else"number"!=typeof l&&(l=p),p++;"number"==typeof l&&(this.skipWarn_(l,p),l=null),e=e.subarray(p)}},this.flush=function(){i=0,this.trigger("done")},this.reset=function(){e=void 0,this.trigger("reset")},this.endTimeline=function(){e=void 0,this.trigger("endedtimeline")}}).prototype=new Q;var Se=me,be=[48e3,44100,32e3],ve=[24e3,22050,16e3],Te=[1,2,3,6],we=[2,1,2,3,3,4,4,5],ke=function(t,e){if(e+8>t.length)return null;if(2935!=(t[e]<<8|t[e+1]))return null;var i=1+((7&t[e+2])<<8|t[e+3])<<1;if(e+i>t.length)return null;var n,a,r=t[e+4],s=t[e+5],o=r>>6&3;3===o?(n=ve[r>>4&3],a=3):(n=be[o],a=r>>4&3);var d=(14&r)>>1,p=1&r,h=Te[a];return{frameLength:i,sampleRate:n,channelCount:we[d]+p,sampleCount:256*h,numBlocks:h,acmod:d,lfeon:p,bsid:s>>3&31,fscod:o}},Ce=function t(){var e;t.prototype.init.call(this),this.push=function(t){var i,n,a=0,r=0,s=!t.codec||"ac3-family"===t.codec||"ec-3"===t.codec;if("audio"===t.type&&s){if(e){var o=e;(e=new Uint8Array(o.byteLength+t.data.byteLength)).set(o),e.set(t.data,o.byteLength)}else e=t.data;for(;a+8<e.length;)if(2935==(e[a]<<8|e[a+1])){if(!(i=ke(e,a)))break;n=9e4*i.sampleCount/i.sampleRate,this.trigger("data",{pts:t.pts+r*n,dts:t.dts+r*n,sampleCount:i.sampleCount,channelcount:i.channelCount,samplerate:i.sampleRate,samplesize:16,codec:i.bsid>10?"ec-3":"ac-3",acmod:i.acmod,lfeon:i.lfeon,bsid:i.bsid,fscod:i.fscod,data:e.subarray(a,a+i.frameLength)}),r++,a+=i.frameLength}else a++;e=a<e.length?e.subarray(a):void 0}},this.flush=function(){this.trigger("done")}};Ce.prototype=new Q;var Pe,Ae,Ee,xe=Ce,Ue=function(t){var e=t.byteLength,i=0,n=0;this.length=function(){return 8*e},this.bitsAvailable=function(){return 8*e+n},this.loadWord=function(){var a=t.byteLength-e,r=new Uint8Array(4),s=Math.min(4,e);if(0===s)throw new Error("no bytes available");r.set(t.subarray(a,a+s)),i=new DataView(r.buffer).getUint32(0),n=8*s,e-=s},this.skipBits=function(t){var a;n>t?(i<<=t,n-=t):(t-=n,t-=8*(a=Math.floor(t/8)),e-=a,this.loadWord(),i<<=t,n-=t)},this.readBits=function(t){var a=Math.min(n,t),r=i>>>32-a;return(n-=a)>0?i<<=a:e>0&&this.loadWord(),(a=t-a)>0?r<<a|this.readBits(a):r},this.skipLeadingZeros=function(){var t;for(t=0;t<n;++t)if(i&2147483648>>>t)return i<<=t,n-=t,t;return this.loadWord(),t+this.skipLeadingZeros()},this.skipUnsignedExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.skipExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.readUnsignedExpGolomb=function(){var t=this.skipLeadingZeros();return this.readBits(t+1)-1},this.readExpGolomb=function(){var t=this.readUnsignedExpGolomb();return 1&t?1+t>>>1:-1*(t>>>1)},this.readBoolean=function(){return 1===this.readBits(1)},this.readUnsignedByte=function(){return this.readBits(8)},this.loadWord()},Me=[{chroma_format_idc:0,separate_colour_plane_flag:0,SubWidthC:1,SubHeightC:1},{chroma_format_idc:1,separate_colour_plane_flag:0,SubWidthC:2,SubHeightC:2},{chroma_format_idc:2,separate_colour_plane_flag:0,SubWidthC:2,SubHeightC:1},{chroma_format_idc:3,separate_colour_plane_flag:0,SubWidthC:1,SubHeightC:1},{chroma_format_idc:4,separate_colour_plane_flag:1,SubWidthC:1,SubHeightC:1}],Re=function(t,e,i,n){var a,r=0;if(i[e]=0,0!==e&&(r=t.readBits(1)),r)for(e===n&&t.skipUnsignedExpGolomb(),t.skipBits(1),t.skipUnsignedExpGolomb(),a=0;a<=i[e-1];a++)t.readBits(1)||t.skipBits(1);else{var s=t.readUnsignedExpGolomb(),o=t.readUnsignedExpGolomb();for(a=0;a<s;a++)t.skipUnsignedExpGolomb(),t.skipBits(1);for(a=0;a<o;a++)t.skipUnsignedExpGolomb(),t.skipBits(1)}},Ie=function(t,e,i,n){for(var a=0;a<i;a++)t.skipUnsignedExpGolomb(),t.skipUnsignedExpGolomb(),n&&(t.skipUnsignedExpGolomb(),t.skipUnsignedExpGolomb()),t.skipBits(1)},De=function(t,e){var i=0;return t.readBits(1)&&255===t.readUnsignedByte()&&t.skipBits(32),t.readBits(1)&&t.skipBits(1),t.readBits(1)&&(t.skipBits(4),t.readBits(1)&&t.skipBits(24)),t.readBits(1)&&(t.skipUnsignedExpGolomb(),t.skipUnsignedExpGolomb()),t.skipBits(3),t.readBits(1)&&(t.skipUnsignedExpGolomb(),t.skipUnsignedExpGolomb(),t.skipUnsignedExpGolomb(),t.skipUnsignedExpGolomb()),t.readBits(1)&&(t.skipBits(64),t.readBits(1)&&t.skipUnsignedExpGolomb(),t.readBits(1)&&function(t,e,i){var n=0,a=0,r=0;e&&(a=t.readBits(1),r=t.readBits(1),(a||r)&&((n=t.readBits(1))&&t.skipBits(19),t.skipBits(8),n&&t.skipBits(4),t.skipBits(15)));for(var s=0;s<=i;s++){var o=1,d=0,p=0;t.readBits(1)||(o=t.readBits(1)),o?t.skipUnsignedExpGolomb():d=t.readBits(1),d||(p=t.readUnsignedExpGolomb()),a&&Ie(t,0,p+1,n),r&&Ie(t,0,p+1,n)}}(t,1,e)),t.readBits(1)&&(t.skipBits(3),i=t.readUnsignedExpGolomb(),t.skipUnsignedExpGolomb(),t.skipUnsignedExpGolomb(),t.skipUnsignedExpGolomb(),t.skipUnsignedExpGolomb()),{min_spatial_segmentation_idc:i}},Oe=function(t){var e,i,n=new Ue(t),a=[],r=0,s=0,o=0,d=0,p=0,h=0,l=(i=n.readUnsignedByte())>>>1&7,c=1&i,u=function(t,e,i){var n,a,r,s,o,d,p,h=[],l=0,c=0;if(e)for(r=(a=t.readUnsignedByte())>>>6&3,s=a>>>5&1,o=31&a,d=t.readBits(32),n=0;n<6;n++)h.push(t.readUnsignedByte());for(p=t.readUnsignedByte(),n=0;n<i;n++)l|=t.readBits(1)<<n,c|=t.readBits(1)<<n;if(i>0)for(n=i;n<8;n++)t.skipBits(2);for(n=0;n<i;n++)l&1<<n&&t.skipBits(88),c&1<<n&&t.skipBits(8);return{general_profile_space:r,general_tier_flag:s,general_profile_idc:o,general_profile_compatibility_flags:d,general_constraint_indicator_flags_bytes:h,general_level_idc:p}}(n,1,l);n.skipUnsignedExpGolomb();var f=n.readUnsignedExpGolomb();3===f&&(r=n.readBits(1));var m=n.readUnsignedExpGolomb(),g=n.readUnsignedExpGolomb();n.readBits(1)&&(s=n.readUnsignedExpGolomb(),o=n.readUnsignedExpGolomb(),d=n.readUnsignedExpGolomb(),p=n.readUnsignedExpGolomb());var y=n.readUnsignedExpGolomb(),_=n.readUnsignedExpGolomb(),S=n.readUnsignedExpGolomb();for(e=n.readBits(1)?0:l;e<=l;e++)n.skipUnsignedExpGolomb(),n.skipUnsignedExpGolomb(),n.skipUnsignedExpGolomb();n.skipUnsignedExpGolomb(),n.skipUnsignedExpGolomb(),n.skipUnsignedExpGolomb(),n.skipUnsignedExpGolomb(),n.skipUnsignedExpGolomb(),n.skipUnsignedExpGolomb(),n.readBits(1)&&n.readBits(1)&&function(t){for(var e=0;e<4;e++)for(var i=3===e?3:1,n=0;n<6;n+=i)if(t.readBits(1))t.skipUnsignedExpGolomb();else{e>1&&t.readExpGolomb();for(var a=Math.min(64,1<<4+(e<<1)),r=0;r<a;r++)t.readExpGolomb()}}(n),n.skipBits(1),n.skipBits(1),n.readBits(1)&&(n.skipBits(8),n.skipUnsignedExpGolomb(),n.skipUnsignedExpGolomb(),n.skipBits(1));var b,v=n.readUnsignedExpGolomb();for(e=0;e<v;e++)Re(n,e,a,v);if(n.readBits(1)){var T=n.readUnsignedExpGolomb();for(e=0;e<T;e++)n.skipBits(S+4),n.skipBits(1)}for(n.skipBits(2),n.readBits(1)&&(h=De(n,l).min_spatial_segmentation_idc),e=0;e<Me.length;e++){var w=Me[e];w.chroma_format_idc===f&&w.separate_colour_plane_flag===r&&(b=w)}return{width:m-b.SubWidthC*(o+s),height:g-b.SubHeightC*(p+d),general_profile_space:u.general_profile_space,general_tier_flag:u.general_tier_flag,general_profile_idc:u.general_profile_idc,general_profile_compatibility_flags:u.general_profile_compatibility_flags,general_constraint_indicator_flags_bytes:u.general_constraint_indicator_flags_bytes,general_level_idc:u.general_level_idc,min_spatial_segmentation_idc:h,chroma_format_idc:f,bit_depth_luma_minus8:y,bit_depth_chroma_minus8:_,sps_max_sub_layers_minus1:l,sps_temporal_id_nesting_flag:c}};(Ae=function(){var t,e,i=0;Ae.prototype.init.call(this),this.push=function(n){var a;e?((a=new Uint8Array(e.byteLength+n.data.byteLength)).set(e),a.set(n.data,e.byteLength),e=a):e=n.data;for(var r=e.byteLength;i<r-3;i++)if(1===e[i+2]){t=i+5;break}for(;t<r;)switch(e[t]){case 0:if(0!==e[t-1]){t+=2;break}if(0!==e[t-2]){t++;break}i+3!==t-2&&this.trigger("data",e.subarray(i+3,t-2));do{t++}while(1!==e[t]&&t<r);i=t-2,t+=3;break;case 1:if(0!==e[t-1]||0!==e[t-2]){t+=3;break}this.trigger("data",e.subarray(i+3,t-2)),i=t-2,t+=3;break;default:t+=3}e=e.subarray(i),t-=i,i=0},this.reset=function(){e=null,i=0,this.trigger("reset")},this.flush=function(){e&&e.byteLength>3&&this.trigger("data",e.subarray(i+3)),e=null,i=0,this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")}}).prototype=new Q,Ee={100:!0,110:!0,122:!0,244:!0,44:!0,83:!0,86:!0,118:!0,128:!0,138:!0,139:!0,134:!0},(Pe=function(){var t,e,i,n,a,r,s,o,d=new Ae;Pe.prototype.init.call(this),t=this,this.push=function(t){"video"===t.type&&(e=t.trackId,i=t.codec,n=t.pts,a=t.dts,d.push(t))},d.on("data",
1(function(o){var d={trackId:e,pts:n,dts:a,data:o,nalUnitTypeCode:"avc"===i?31&o[0]:o[0]>>>1&63};if("avc"===i){switch(d.nalUnitTypeCode){case 5:d.nalUnitType="slice_layer_without_partitioning_rbsp_idr";break;case 6:d.nalUnitType="sei_rbsp",d.escapedRBSP=r(o.subarray(1));break;case 7:d.nalUnitType="seq_parameter_set_rbsp",d.escapedRBSP=r(o.subarray(1)),d.config=s(d.escapedRBSP);break;case 8:d.nalUnitType="pic_parameter_set_rbsp";break;case 9:d.nalUnitType="access_unit_delimiter_rbsp"}0!==d.nalUnitTypeCode&&t.trigger("data",d)}else if("hevc"===i){switch(d.nalUnitTypeCode){case 19:case 20:d.nalUnitType="slice_layer_without_partitioning_rbsp_idr";break;case 39:d.nalUnitType="sei_rbsp",d.escapedRBSP=r(o.subarray(2));break;case 32:d.nalUnitType="vid_parameter_set_rbsp";break;case 33:d.nalUnitType="seq_parameter_set_rbsp",d.escapedRBSP=r(o.subarray(2)),d.config=Oe(d.escapedRBSP);break;case 34:d.nalUnitType="pic_parameter_set_rbsp";break;case 35:d.nalUnitType="access_unit_delimiter_rbsp"}t.trigger("data",d)}})),d.on("done",(function(){t.trigger("done")})),d.on("partialdone",(function(){t.trigger("partialdone")})),d.on("reset",(function(){t.trigger("reset")})),d.on("endedtimeline",(function(){t.trigger("endedtimeline")})),this.flush=function(){d.flush()},this.partialFlush=function(){d.partialFlush()},this.reset=function(){d.reset()},this.endTimeline=function(){d.endTimeline()},o=function(t,e){var i,n=8,a=8;for(i=0;i<t;i++)0!==a&&(a=(n+e.readExpGolomb()+256)%256),n=0===a?n:a},r=function(t){for(var e,i,n=t.byteLength,a=[],r=1;r<n-2;)0===t[r]&&0===t[r+1]&&3===t[r+2]?(a.push(r+2),r+=2):r++;if(0===a.length)return t;e=n-a.length,i=new Uint8Array(e);var s=0;for(r=0;r<e;s++,r++)s===a[0]&&(s++,a.shift()),i[r]=t[s];return i},s=function(t){var e,i,n,a,r,s,d,p,h,l,c,u,f=0,m=0,g=0,y=0,_=[1,1];if(i=(e=new Ue(t)).readUnsignedByte(),a=e.readUnsignedByte(),n=e.readUnsignedByte(),e.skipUnsignedExpGolomb(),Ee[i]&&(3===(r=e.readUnsignedExpGolomb())&&e.skipBits(1),e.skipUnsignedExpGolomb(),e.skipUnsignedExpGolomb(),e.skipBits(1),e.readBoolean()))for(c=3!==r?8:12,u=0;u<c;u++)e.readBoolean()&&o(u<6?16:64,e);if(e.skipUnsignedExpGolomb(),0===(s=e.readUnsignedExpGolomb()))e.readUnsignedExpGolomb();else if(1===s)for(e.skipBits(1),e.skipExpGolomb(),e.skipExpGolomb(),d=e.readUnsignedExpGolomb(),u=0;u<d;u++)e.skipExpGolomb();if(e.skipUnsignedExpGolomb(),e.skipBits(1),p=e.readUnsignedExpGolomb(),h=e.readUnsignedExpGolomb(),0===(l=e.readBits(1))&&e.skipBits(1),e.skipBits(1),e.readBoolean()&&(f=e.readUnsignedExpGolomb(),m=e.readUnsignedExpGolomb(),g=e.readUnsignedExpGolomb(),y=e.readUnsignedExpGolomb()),e.readBoolean()&&e.readBoolean()){switch(e.readUnsignedByte()){case 1:_=[1,1];break;case 2:_=[12,11];break;case 3:_=[10,11];break;case 4:_=[16,11];break;case 5:_=[40,33];break;case 6:_=[24,11];break;case 7:_=[20,11];break;case 8:_=[32,11];break;case 9:_=[80,33];break;case 10:_=[18,11];break;case 11:_=[15,11];break;case 12:_=[64,33];break;case 13:_=[160,99];break;case 14:_=[4,3];break;case 15:_=[3,2];break;case 16:_=[2,1];break;case 255:_=[e.readUnsignedByte()<<8|e.readUnsignedByte(),e.readUnsignedByte()<<8|e.readUnsignedByte()]}_&&(_[0],_[1])}return{profileIdc:i,levelIdc:n,profileCompatibility:a,width:16*(p+1)-2*f-2*m,height:(2-l)*(h+1)*16-2*g-2*y,sarRatio:_}}}).prototype=new Q;
1var Le,Be={H26XStream:Pe,NalByteStream:Ae},Ge=function(t,e){var i=t[e+6]<<21|t[e+7]<<14|t[e+8]<<7|t[e+9];return i=i>=0?i:0,(16&t[e+5])>>4?i+20:i+10},We=function t(e,i){return e.length-i<10||e[i]!=="I".charCodeAt(0)||e[i+1]!=="D".charCodeAt(0)||e[i+2]!=="3".charCodeAt(0)?i:t(e,i+=Ge(e,i))},Fe=function(t){var e=We(t,0);return t.length>=e+2&&!(255&~t[e])&&!(240&~t[e+1])&&16==(22&t[e+1])},Ne=Ge,ze=function(t,e){var i=(224&t[e+5])>>5,n=t[e+4]<<3;return 6144&t[e+3]|n|i};(Le=function(){var t=new Uint8Array,e=0;Le.prototype.init.call(this),this.setTimestamp=function(t){e=t},this.push=function(i){var n,a,r,s,o=0,d=0;for(t.length?(s=t.length,(t=new Uint8Array(i.byteLength+s)).set(t.subarray(0,s)),t.set(i,s)):t=i;t.length-d>=3;)if(t[d]!=="I".charCodeAt(0)||t[d+1]!=="D".charCodeAt(0)||t[d+2]!=="3".charCodeAt(0))if(255&~t[d]||240&~t[d+1])d++;else{if(t.length-d<7)break;if(d+(o=ze(t,d))>t.length)break;r={type:"audio",data:t.subarray(d,d+o),pts:e,dts:e,trackId:9999},this.trigger("data",r),d+=o}else{if(t.length-d<10)break;if(d+(o=Ne(t,d))>t.length)break;a={type:"timed-metadata",data:t.subarray(d,d+o)},this.trigger("data",a),d+=o}n=t.length-d,t=n>0?t.subarray(d):new Uint8Array},this.reset=function(){t=new Uint8Array,this.trigger("reset")},this.endTimeline=function(){t=new Uint8Array,this.trigger("endedtimeline")}}).prototype=new Q;var Ye,je=Le,Ve=Ne,He=function t(e,i){return e.length-i<10||e[i]!=="I".charCodeAt(0)||e[i+1]!=="D".charCodeAt(0)||e[i+2]!=="3".charCodeAt(0)?i:t(e,i+=Ve(e,i))},Xe={isLikelyEc3Data:function(t){var e=He(t,0);return t.length>=e+2&&11===t[e]&&119===t[e+1]},parseEc3FrameSize:function(t,e){return e+4>t.length?null:1+((7&t[e+2])<<8|t[e+3])<<1},parseId3TagSize:Ve};(Ye=function(){var t=new Uint8Array,e=0;Ye.prototype.init.call(this),this.setTimestamp=function(t){e=t},this.push=function(i){var n,a,r,s=0,o=0;if(t.length){var d=t;(t=new Uint8Array(i.byteLength+d.length)).set(d),t.set(i,d.length)}else t=i;for(;t.length-o>=3;)if(t[o]!=="I".charCodeAt(0)||t[o+1]!=="D".charCodeAt(0)||t[o+2]!=="3".charCodeAt(0))if(t.length-o>=2&&2935==(t[o]<<8|t[o+1])){for(var p=o;o<t.length-1&&2935==(t[o]<<8|t[o+1])&&(s=Xe.parseEc3FrameSize(t,o))&&!(o+s>t.length);)o+=s;if(o===p)break;r={type:"audio",data:t.subarray(p,o),pts:e,dts:e,trackId:9998},this.trigger("data",r)}else o++;else{if(t.length-o<10)break;if(o+(s=Xe.parseId3TagSize(t,o))>t.length)break;a={type:"timed-metadata",data:t.subarray(o,o+s)},this.trigger("data",a),o+=s}n=t.length-o,t=n>0?t.subarray(o):new Uint8Array},this.reset=function(){t=new Uint8Array,this.trigger("reset")},this.endTimeline=function(){t=new Uint8Array,this.trigger("endedtimeline")}}).prototype=new Q;var qe,Ke,Ze,$e,Je=Ye,Qe=["audioobjecttype","channelcount","samplerate","samplingfrequencyindex","samplesize","baseMediaDecodeTime","segmentDuration"],ti=["codec","channelcount","samplerate","samplesize","acmod","lfeon","bsid","fscod","baseMediaDecodeTime","segmentDuration"],ei=["width","height","sarRatio","baseMediaDecodeTime","segmentDuration"],ii=xe,ni=Be.H26XStream,ai=Fe,ri=Xe.isLikelyEc3Data,si=ct,oi=function(t){return"ec-3"===t||"ac-3"===t||"ac3-family"===t},di=function(t,e){e.stream=t,this.trigger("log",e)},pi=function(t,e){for(var i=Object.keys(e),n=0;n<i.length;n++){var a=i[n];"headOfPipeline"!==a&&e[a].on&&e[a].on("log",di.bind(t,a))}},hi=function(t,e){var i;if(t.length!==e.length)return!1;for(i=0;i<t.length;i++)if(t[i]!==e[i])return!1;return!0},li=function(t,e,i,n,a,r){return{start:{dts:t,pts:t+(i-e)},end:{dts:t+(n-e),pts:t+(a-i)},prependedContentDuration:r,baseMediaDecodeTime:t}};(Ke=function(t,e){var i,n=[],a=0,r=1/0;i=(e=e||{}).firstSequenceNumber||0,Ke.prototype.init.call(this),this.push=function(e){Tt(t,e),t&&(oi(t.codec)?ti:Qe).forEach((function(i){t[i]=e[i]})),n.push(e)},this.setVideoBaseMediaDecodeTime=function(t){r=t},this.setAudioAppendStart=function(t){a=t},this.flush=function(){var s,o,d,p,h;if(0!==n.length){if(t.baseMediaDecodeTime=vt(t,e.keepOriginalTimestamps),h=gt(t,n,a,r),t.samples=yt(n),o=z.mdat(_t(n)),s=z.moof(i,[t]),d=new Uint8Array(s.byteLength+o.byteLength),i++,d.set(s),d.set(o,s.byteLength),bt(t),n.length){p=0;for(var l=0;l<n.length;l++){var c=n[l].sampleCount||1024;p+=Math.ceil(si*c/t.samplerate)}this.trigger("segmentTimingInfo",li(ut(t.baseMediaDecodeTime,t.samplerate),n[0].dts,n[0].pts,n[0].dts+p,n[0].pts+p,h||0)),this.trigger("timingInfo",{start:n[0].pts,end:n[0].pts+p})}n=[],this.trigger("data",{track:t,boxes:d}),this.trigger("done","AudioSegmentStream")}else this.trigger("done","AudioSegmentStream")},this.reset=function(){bt(t),n=[],this.trigger("reset")}}).prototype=new Q,(qe=function(t,e){var i,n,a,r,s=[],o=[];i=(e=e||{}).firstSequenceNumber||0,qe.prototype.init.call(this),delete t.minPTS,this.gopCache_=[],this.push=function(e){Tt(t,e),"seq_parameter_set_rbsp"!==e.nal
vendor: 4,250 bytes, line 1
1UnitType||n||(n=e.config,t.sps=[e.data],t.parsedSps=n,ei.forEach((function(e){t[e]=n[e]}),this)),"pic_parameter_set_rbsp"!==e.nalUnitType||a||(a=e.data,t.pps=[e.data]),"vid_parameter_set_rbsp"!==e.nalUnitType||r||(r=e.data,t.vps=[e.data]),s.push(e)},this.flush=function(){for(var n,a,r,d,p,h,l,c,u=0;s.length&&"access_unit_delimiter_rbsp"!==s[0].nalUnitType;)s.shift();if(0===s.length)return this.resetStream_(),void this.trigger("done","VideoSegmentStream");if(n=et(s),(r=it(n))[0][0].keyFrame?t.isCurrentSegmentStartingWithKeyframe=!0:(a=this.getGopForFusion_(s[0],t),t.isCurrentSegmentStartingWithKeyframe=!1,a?(u=a.duration,r.unshift(a),r.byteLength+=a.byteLength,r.nalCount+=a.nalCount,r.pts=a.pts,r.dts=a.dts,r.duration+=a.duration):r=nt(r)),o.length){var f;if(!(f=e.alignGopsAtEnd?this.alignGopsAtEnd_(r):this.alignGopsAtStart_(r)))return this.gopCache_.unshift({gop:r.pop(),pps:t.pps,sps:t.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),s=[],this.resetStream_(),void this.trigger("done","VideoSegmentStream");bt(t),r=f}Tt(t,r),t.samples=at(r),p=z.mdat(rt(r)),t.baseMediaDecodeTime=vt(t,e.keepOriginalTimestamps),this.trigger("processedGopsInfo",r.map((function(t){return{pts:t.pts,dts:t.dts,byteLength:t.byteLength}}))),l=r[0],c=r[r.length-1],this.trigger("segmentTimingInfo",li(t.baseMediaDecodeTime,l.dts,l.pts,c.dts+c.duration,c.pts+c.duration,u)),this.trigger("timingInfo",{start:r[0].pts,end:r[r.length-1].pts+r[r.length-1].duration}),this.gopCache_.unshift({gop:r.pop(),pps:t.pps,sps:t.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),s=[],this.trigger("baseMediaDecodeTime",t.baseMediaDecodeTime),this.trigger("timelineStartInfo",t.timelineStartInfo),d=z.moof(i,[t]),h=new Uint8Array(d.byteLength+p.byteLength),i++,h.set(d),h.set(p,d.byteLength),this.trigger("data",{track:t,boxes:h}),this.resetStream_(),this.trigger("done","VideoSegmentStream")},this.reset=function(){this.resetStream_(),s=[],this.gopCache_.length=0,o.length=0,this.trigger("reset")},this.resetStream_=function(){bt(t),n=void 0,a=void 0},this.getGopForFusion_=function(e){var i,n,a,r,s,o,d=1/0;for(o=0;o<this.gopCache_.length;o++)r=(s=this.gopCache_[o]).gop,t.pps&&s.pps&&hi(t.pps[0],s.pps[0])&&t.sps&&s.sps&&hi(t.sps[0],s.sps[0])&&(r.dts<t.timelineStartInfo.dts&&(a=t.timelineStartInfo.dts-t.timelineStartInfo.baseMediaDecodeTime,r.dts<a)||(i=e.dts-r.dts-r.duration)>=-1e4&&i<=45e3&&(!n||d>i)&&(n=s,d=i));return n?n.gop:null},this.alignGopsAtStart_=function(t){var e,i,n,a,r,s,d,p;for(r=t.byteLength,s=t.nalCount,d=t.duration,e=i=0;e<o.length&&i<t.length&&(n=o[e],a=t[i],n.pts!==a.pts);)a.pts>n.pts?e++:(i++,r-=a.byteLength,s-=a.nalCount,d-=a.duration);return 0===i?t:i===t.length?null:((p=t.slice(i)).byteLength=r,p.duration=d,p.nalCount=s,p.pts=p[0].pts,p.dts=p[0].dts,p)},this.alignGopsAtEnd_=function(t){var e,i,n,a,r,s,d;for(e=o.length-1,i=t.length-1,r=null,s=!1;e>=0&&i>=0;){if(n=o[e],a=t[i],n.pts===a.pts){s=!0;break}n.pts>a.pts?e--:(e===o.length-1&&(r=i),i--)}if(!s&&null===r)return null;if(0===(d=s?i:r))return t;var p=t.slice(d),h=p.reduce((function(t,e){return t.byteLength+=e.byteLength,t.duration+=e.duration,t.nalCount+=e.nalCount,t}),{byteLength:0,duration:0,nalCount:0});return p.byteLength=h.byteLength,p.duration=h.duration,p.nalCount=h.nalCount,p.pts=p[0].pts,p.dts=p[0].dts,p},this.alignGopsWith=function(t){o=t}}).prototype=new Q,($e=function(t,e){this.numberOfTracks=0,this.metadataStream=e,void 0!==(t=t||{}).remux?this.remuxTracks=!!t.remux:this.remuxTracks=!0,"boolean"==typeof t.keepOriginalTimestamps?this.keepOriginalTimestamps=t.keepOriginalTimestamps:this.keepOriginalTimestamps=!1,this.pendingTracks=[],this.videoTrack=null,this.pendingBoxes=[],this.pendingCaptions=[],this.pendingMetadata=[],this.pendingBytes=0,this.emittedTracks=0,$e.prototype.init.call(this),this.push=function(t){return t.text?this.pendingCaptions.push(t):t.frames?this.pendingMetadata.push(t):(this.pendingTracks.push(t.track),this.pendingBytes+=t.boxes.byteLength,"video"===t.track.type&&(this.videoTrack=t.track,this.pendingBoxes.push(t.boxes)),void("audio"===t.track.type&&(this.audioTrack=t.track,this.pendingBoxes.unshift(t.boxes))))}}).prototype=new Q,$e.prototype.flush=function(t){var e,i,n,a,r=0,s={captions:[],captionStream
1s:{},metadata:[],info:{}},o=0,d=0;if(this.pendingTracks.length<this.numberOfTracks){if("VideoSegmentStream"!==t&&"AudioSegmentStream"!==t)return;if(this.remuxTracks)return;if(0===this.pendingTracks.length)return this.emittedTracks++,void(this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0))}if(this.videoTrack?(o=this.videoTrack.timelineStartInfo.pts,d=this.videoTrack.timelineStartInfo.baseMediaDecodeTime,ei.forEach((function(t){s.info[t]=this.videoTrack[t]}),this),s.info.codec=this.videoTrack.codec,s.info.sps=this.videoTrack.parsedSps?Y({},this.videoTrack.parsedSps):null,s.info.startsWithKeyframe=this.videoTrack.isCurrentSegmentStartingWithKeyframe,s.info.trackId=this.videoTrack.id,s.info.timelineStartInfo=this.videoTrack.timelineStartInfo):this.audioTrack&&(o=this.audioTrack.timelineStartInfo.pts,d=this.audioTrack.timelineStartInfo.baseMediaDecodeTime,(oi(this.audioTrack.codec)?ti:Qe).forEach((function(t){s.info[t]=this.audioTrack[t]}),this),s.info.trackId=this.audioTrack.id,s.info.timelineStartInfo=this.audioTrack.timelineStartInfo,s.info.startsWithKeyframe=!0),this.videoTrack||this.audioTrack){for(1===this.pendingTracks.length?s.type=this.pendingTracks[0].type:s.type="combined",this.emittedTracks+=this.pendingTracks.length,n=z.initSegment(this.pendingTracks),s.initSegment=new Uint8Array(n.byteLength),s.initSegment.set(n),s.data=new Uint8Array(this.pendingBytes),a=0;a<this.pendingBoxes.length;a++)s.data.set(this.pendingBoxes[a],r),r+=this.pendingBoxes[a].byteLength;for(a=0;a<this.pendingCaptions.length;a++)(e=this.pendingCaptions[a]).startTime=mt(e.startPts+d,o,this.keepOriginalTimestamps),e.endTime=mt(e.endPts+d,o,this.keepOriginalTimestamps),s.captionStreams[e.stream]=!0,s.captions.push(e);for(a=0;a<this.pendingMetadata.length;a++)(i=this.pendingMetadata[a]).cueTime=mt(i.pts+d,o,this.keepOriginalTimestamps),s.metadata.push(i);for(s.metadata.dispatchType=this.metadataStream.dispatchType,this.pendingTracks.length=0,this.videoTrack=null,this.pendingBoxes.length=0,this.pendingCaptions.length=0,this.pendingBytes=0,this.pendingMetadata.length=0,this.trigger("data",s),a=0;a<s.captions.length;a++)e=s.captions[a],this.trigger("caption",e);for(a=0;a<s.metadata.length;a++)i=s.metadata[a],this.trigger("id3Frame",i)}this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0)},$e.prototype.setRemux=function(t){this.remuxTracks=t},(Ze=function(t){var e,i,n=this;Ze.prototype.init.call(this),t=t||{},this.baseMediaDecodeTime=t.baseMediaDecodeTime||0,this.activeCaptionStream=null,this.setupAacPipeline=function(){var a={};return this.aacTransmuxPipeline=a,a.type="aac",a.hasFlushed=!0,a.metadataStream=new ge.MetadataStream,a.aacStream=new je,a.audioTimestampRolloverStream=new ge.TimestampRolloverStream("audio"),a.timedMetadataTimestampRolloverStream=new ge.TimestampRolloverStream("timed-metadata"),a.adtsStream=new Se,a.coalesceStream=new $e(t,a.metadataStream),a.headOfPipeline=a.aacStream,a.aacStream.pipe(a.audioTimestampRolloverStream).pipe(a.adtsStream),a.aacStream.pipe(a.timedMetadataTimestampRolloverStream).pipe(a.metadataStream).pipe(a.coalesceStream),a.metadataStream.on("timestamp",(function(t){a.aacStream.setTimestamp(t.timeStamp)})),a.aacStream.on("data",(function(r){"timed-metadata"!==r.type&&"audio"!==r.type||a.audioSegmentStream||(i=i||{timelineStartInfo:{baseMediaDecodeTime:n.baseMediaDecodeTime},codec:"adts",type:"audio",id:9999},a.coalesceStream.numberOfTracks++,a.audioSegmentStream=new Ke(i,t),a.audioSegmentStream.on("log",n.getLogTrigger_("audioSegmentStream")),a.audioSegmentStream.on("timingInfo",n.trigger.bind(n,"audioTimingInfo")),a.adtsStream.pipe(a.audioSegmentStream).pipe(a.coalesceStream),n.trigger("trackinfo",{hasAudio:!!i,hasVideo:!!e}))})),a.coalesceStream.on("data",this.trigger.bind(this,"data")),a.coalesceStream.on("done",this.trigger.bind(this,"done")),pi(this,a),a},this.setupEc3Pipeline=function(){var a={};return this.ec3TransmuxPipeline=a,a.type="ec3",a.hasFlushed=!0,a.metadataStream=new ge.MetadataStream,a.ec3RawStream=new Je,a.audioTimestampRolloverStream=new ge.TimestampRolloverStream("audio"),a.timedMetadataTimestampRolloverStream=new ge.TimestampRolloverStream("timed-metadata"),a.ac3Stream=new ii,a.coalesceStream=new $e(t,a.metadataStream),a.headOfPipeline=a.ec3RawStream,a.ec3RawStream.pipe(a.audioTimestampRolloverStream).pipe(a.ac3Stream),a.ec3RawStream.pipe(a.timedMetadataTimestampRolloverStream).pipe(a.metadataStream).pipe(a.coalesceStream),a.metadataStream.on("timestamp",(function(t){a.ec3RawStream.setTimestamp(t.timeStamp)})),a.ec3RawStream.on("data",(function(r){"timed-metadata"!==r.type&&"audio"!==r.type||a.audioSegmentStream||(i=i||{timelineStartInfo:{baseMediaDecodeTime:n.baseMediaDecodeTime},codec:"ec-3",type:"audio",id:9998},a.coalesceStream.numberOfTracks++,a.audioSegmentStream=new Ke(i,t),a.audioSegmentStream.on("log",n.getLogTrigger_("audioSegmentStream")),a.audioSegmentStream.on("timingInfo",n.trigger.bind(n,"audioTimingInfo")),a.ac3Stream.pipe(a.audioSegmentStream).pipe(a.coalesceStream),n.trigger("trackinfo",{hasAudio:!!i,hasVideo:!!e}))})),a.coalesceStream.on("data",this.trigger.bind(this,"data")),a.coalesceStream.on("done",this.trigger.bind(this,"done")),pi(this,a),a},this.setupTsPipeline=function(){var a={};return this.tsTransmuxPipeline=a,a.type="ts",a.hasFlushed=!0,a.metadataStream=new ge.MetadataStream,a.packetStream=new ge.TransportPacketStream,a.parseStream=new ge.TransportParseStream,a.elementaryStream=new ge.ElementaryStream,a.timestampRolloverStream=new ge.TimestampRolloverStream,a.adtsStream=new Se,a.ac3Stream=new ii,a.h26xStream=new ni,a.captionStream=new ge.CaptionStream(t),a.coalesceStream=new $e(t,a.metadataStream),a.headOfPipeline=a.packetStream,this.activeCaptionStream=a.captionStream,a.packetStream.pipe(a.parseStream).pipe(a.elementaryStream).pipe(a.timestampRolloverStream),a.timestampRolloverStream.pipe(a.h26xStream),a.timestampRolloverStream.pipe(a.adtsStream),a.timestampRolloverStream.pipe(a.ac3Stream),a.timestampRolloverStream.pipe(a.metadataStream).pipe(a.coalesceStream),a.h26xStream.pipe(a.captionStream).pipe(a.coalesceStream),a.elementaryStream.on("data",(function(r){var s;if("metadata"===r.type){for(s=r.tracks.length;s--;)e||"video"!==r.tracks[s].type?i||"audio"!==r.tracks[s].type||(i=r.tracks[s],e&&!t.keepOriginalTimestamps?i.timelineStartInfo=e.timelineStartInfo:i.timelineStartInfo.baseMediaDecodeTime=n.baseMediaDecodeTime):(e=r.tracks[s]).timelineStartInfo.baseMediaDecodeTime=n.baseMediaDecodeTime;e&&!a.videoSegmentStream&&(a.coalesceStream.numberOfTracks++,a.videoSegmentStream=new qe(e,t),a.videoSegmentStream.on("log",n.getLogTrigger_("videoSegmentStream")),a.videoSegmentStream.on("timelineStartInfo",(function(e){i&&a.audioSegmentStream&&!t.keepOriginalTimestamps&&(i.timelineStartInfo=e)})),a.videoSegmentStream.on("processedGopsInfo",n.trigger.bind(n,"gopInfo")),a.videoSegmentStream.on("segmentTimingInfo",n.trigger.bind(n,"videoSegmentTimingInfo")),a.videoSegmentStream.on("baseMediaDecodeTime",(function(t){i&&a.audioSegmentStream&&a.audioSegmentStream.setVideoBaseMediaDecodeTime(t)})),a.videoSegmentStream.on("timingInfo",n.trigger.bind(n,"videoTimingInfo")),a.h26xStream.pipe(a.videoSegmentStream).pipe(a.coalesceStream)),i&&!a.audioSegmentStream&&(a.coalesceStream.numberOfTracks++,a.audioSegmentStream=new Ke(i,t),a.audioSegmentStream.on("log",n.getLogTrigger_("audioSegmentStream")),a.audioSegmentStream.on("timingInfo",n.trigger.bind(n,"audioTimingInfo")),a.audioSegmentStream.on("segmentTimingInfo",n.trigger.bind(n,"audioSegmentTimingInfo")),(oi(i.codec)?a.ac3Stream:a.adtsStream).pipe(a.audioSegmentStream).pipe(a.coalesceStream)),n.trigger("trackinfo",{hasAudio:!!i,hasVideo:!!e})}})),a.coalesceStream.on("data",this.trigger.bind(this,"data")),a.coalesceStream.on("id3Frame",(function(t){t.dispatchType=a.metadataStream.dispatchType,n.trigger("id3Frame",t)})),a.coalesceStream.on("caption",this.trigger.bind(this,"caption")),a.coalesceStream.on("done",this.trigger.bind(this,"done")),pi(this,a),a},this.setBaseMediaDecodeTime=function(n){t.keepOriginalTimestamps||(this.baseMediaDecodeTime=n),this.getAllPipelines().forEac
1h((function(a){i&&(i.timelineStartInfo.dts=void 0,i.timelineStartInfo.pts=void 0,t.keepOriginalTimestamps||(i.timelineStartInfo.baseMediaDecodeTime=n),bt(i),a.audioTimestampRolloverStream&&a.audioTimestampRolloverStream.discontinuity()),e&&(a.videoSegmentStream&&(a.videoSegmentStream.gopCache_=[]),e.timelineStartInfo.dts=void 0,e.timelineStartInfo.pts=void 0,t.keepOriginalTimestamps||(e.timelineStartInfo.baseMediaDecodeTime=n),bt(e),a.captionStream&&a.captionStream.reset()),a.timestampRolloverStream&&a.timestampRolloverStream.discontinuity()}))},this.setAudioAppendStart=function(t){this.getAllPipelines().forEach((function(e){i&&e.audioSegmentStream&&e.audioSegmentStream.setAudioAppendStart(t)}))},this.setRemux=function(e){t.remux=e,this.getAllPipelines().forEach((function(t){t.coalesceStream&&t.coalesceStream.setRemux(e)}))},this.alignGopsWith=function(t){e&&this.tsTransmuxPipeline.videoSegmentStream&&this.tsTransmuxPipeline.videoSegmentStream.alignGopsWith(t)},this.getLogTrigger_=function(t){var e=this;return function(i){i.stream=t,e.trigger("log",i)}},this.push=function(t){var e;ai(t)?(this.aacTransmuxPipeline=this.aacTransmuxPipeline||this.setupAacPipeline(),e=this.aacTransmuxPipeline):ri(t)?(this.ec3TransmuxPipeline=this.ec3TransmuxPipeline||this.setupEc3Pipeline(),e=this.ec3TransmuxPipeline):(this.tsTransmuxPipeline=this.tsTransmuxPipeline||this.setupTsPipeline(),e=this.tsTransmuxPipeline),e.hasFlushed=!1,e.headOfPipeline.push(t)},this.flush=function(){this.getAllPipelines().filter((function(t){return!t.hasFlushed})).forEach((function(t){t.hasFlushed=!0,t.headOfPipeline.flush()}))},this.endTimeline=function(){this.getAllPipelines().forEach((function(t){t.headOfPipeline&&t.headOfPipeline.endTimeline()}))},this.reset=function(){this.getAllPipelines().forEach((function(t){t.headOfPipeline&&t.headOfPipeline.reset()}))},this.resetCaptions=function(){this.tsTransmuxPipeline&&this.tsTransmuxPipeline.captionStream.reset()},this.getAllPipelines=function(){return[this.tsTransmuxPipeline,this.aacTransmuxPipeline,this.ec3TransmuxPipeline].filter((function(t){return Boolean(t)}))}}).prototype=new Q;var ci={Transmuxer:Ze,VideoSegmentStream:qe,AudioSegmentStream:Ke,AAC_AUDIO_PROPERTIES:Qe,AC3_AUDIO_PROPERTIES:ti,VIDEO_PROPERTIES:ei,CaptionStream:ge.CaptionStream,generateSegmentTimingInfo:li};return{generator:z,Transmuxer:ci.Transmuxer,AudioSegmentStream:ci.AudioSegmentStream,VideoSegmentStream:ci.VideoSegmentStream,CaptionStream:ci.CaptionStream}}()}()},499:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ArrayIncludesPolyfill=void 0,e.ArrayIncludesPolyfill=function(){return{polyfill:function(){Object.defineProperty(Array.prototype,"includes",{value:function(t,e){if(null==this)throw new TypeError(\'"this" is null or not defined\');var i=Object(this),n=i.length>>>0;if(0===n)return!1;var a=0|e,r=Math.max(a>=0?a:n-Math.abs(a),0);function s(t,e){return t===e||"number"==typeof t&&"number"==typeof e&&isNaN(t)&&isNaN(e)}for(;r<n;){if(s(i[r],t))return!0;r++}return!1}})}}}()},878:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StringEndsWithPolyfill=void 0,e.StringEndsWithPolyfill=function(){return{polyfill:function(){String.prototype.endsWith=function(t,e){if(null==t)return!1;var i=this.length;return null!=e&&(i=Math.min(e,this.length)),this.substring(i-t.length,i)===t}}}}()},205:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StringIncludesPolyfill=void 0,e.StringIncludesPolyfill=function(){return{polyfill:function(){String.prototype.includes=function(t,e){return"number"!=typeof e&&(e=0),!(e+t.length>this.length)&&-1!==this.indexOf(t,e)}}}}()},829:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StringStartsWithPolyfill=void 0,e.StringStartsWithPolyfill=function(){return{polyfill:function(){String.prototype.startsWith=function(t,e){var i=e>0?0|e:0;return this.substring(i,i+t.length)===t}}}}()},956:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.assembleCaption=function(t){return{start:a(t)?t.startTime:t.startPts/n.MP2TS_TIMESCALE,end:a(t)?t.endTime:t.endPts/n.MP2TS_TIMESCALE,text:t.text,channel:t.stream,position:t.position}};var n=i(226);function a(t){return"startTime"in t}}
1,226:function(t,e,i){"use strict";var n=this&&this.__extends||function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(e,"__esModule",{value:!0}),e.TransmuxerMessageHandler=e.MP2TS_TIMESCALE=void 0,e.getContext=function(){return a||p()};var a,r=i(48),s=i(599),o=i(741),d=i(956);function p(){var t=new o.WebWorkerContext(h);return onmessage=t.onMessageCallback,t}e.MP2TS_TIMESCALE=9e4;var h=function(t){function i(i,n){var a=t.call(this,i,n)||this;return a.b=!1,a.push=function(t){a.c=t.data,a.a.push(new Uint8Array(t.data))},a.flush=function(){a.a.flush()},a.initCaptionParser=function(){a.a.setupTsPipeline(),a.g()},a.pushCaptions=function(t){a.e((function(e){a.b=!1,t.data.forEach((function(t){return e.push(t)}))}))},a.flushCaptions=function(){a.e((function(t){return t.flush()}))},a.resetCaptions=function(){a.e((function(t){return t.reset()}))},a.setTimestampOffset=function(t){var i=t.offset;a.a.setBaseMediaDecodeTime(Math.round(i*e.MP2TS_TIMESCALE))},a.setAudioAppendStart=function(t){a.a.setAudioAppendStart(t.appendStart*e.MP2TS_TIMESCALE,t.trackId)},a.reset=function(){a.d()},a.dispose=function(){a.a&&a.a.dispose()},a.f=function(t){t.on("data",(function(t){var e=t.data;a.runsInWebWorker?t.data=e.buffer:t.data=e.buffer.slice(0),t.captions=t.captions.map(d.assembleCaption),a.postMessageFunction({action:"data",segment:t,byteOffset:e.byteOffset,byteLength:e.byteLength},[t.data])})),t.on("done",(function(){a.c&&a.postMessageFunction({action:"done",what:"transmuxing",originalSegment:a.c},[a.c])}))},a.g=function(){a.e((function(t){t.on("data",(function(t){a.postMessageFunction({action:"caption",caption:(0,d.assembleCaption)(t)})})),t.on("done",(function(){a.b||(a.b=!0,a.postMessageFunction({action:"done",what:"captions"}))}))}))},a.d(),a}return n(i,t),i.prototype.d=function(){this.dispose(),this.a=new r.Transmuxer({remux:!1}),this.f(this.a)},i.prototype.e=function(t){var e,i=null===(e=this.a)||void 0===e?void 0:e.activeCaptionStream;i&&t(i)},i}(s.MessageHandler);e.TransmuxerMessageHandler=h,"undefined"==typeof window&&(a=p())},599:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MessageHandler=void 0;var i=function(){return function(t,e){this.runsInWebWorker=t,this.postMessageFunction=e}}();e.MessageHandler=i},741:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WebWorkerContext=void 0;var n=i(41),a=function(){return function(t){var e=this;this.i="undefined"==typeof window,this.onmessage=null,this.j=function(t,i){e.i?postMessage(t,i):"function"==typeof e.onmessage&&setTimeout((function(){e.onmessage({data:t})}),0)},this.postMessage=function(t){setTimeout((function(){e.onMessageCallback({data:t})}),0)},this.terminate=function(){},this.onMessageCallback=function(t){t.data.action&&t.data&&e.h[t.data.action]&&e.h[t.data.action](t.data)},this.i&&(0,n.installWorkerPolyfills)(),this.h=new t(this.i,this.j)}}();e.WebWorkerContext=a},41:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.installWorkerPolyfills=function(){Array.prototype.includes||n.ArrayIncludesPolyfill.polyfill(),String.prototype.includes||r.StringIncludesPolyfill.polyfill(),String.prototype.startsWith||s.StringStartsWithPolyfill.polyfill(),String.prototype.endsWith||a.StringEndsWithPolyfill.polyfill()};var n=i(499),a=i(878),r=i(205),s=i(829)}},e={};!function i(n){var a=e[n];if(void 0!==a)return a.exports;var r=e[n]={exports:{}};return t[n].call(r.exports,r,r.exports,i),r.exports}(226)}();',n.p+"bb069b084e7f71fcbf28.worker.js")}},21332:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ContainerTsModuleDefinition=void 0;var i=n(62756),r=n(67889);t.ContainerTsModuleDefinition={name:i.ModuleName.ContainerTS,module:function(){return{WebWorkerTransmuxer:n(77869).WebWorkerTransmuxer,TransmuxerWorker:r.TransmuxerWorkerClass}}},t.default=t.ContainerTsModuleDefinition},67889:function(e,t,n){"use strict";
1Object.defineProperty(t,"__esModule",{value:!0}),t.TransmuxerWorkerClass=void 0,t.TransmuxerWorkerClass=n(72387)},77869:function(e,t,n){"use strict";var i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.WebWorkerTransmuxer=void 0,t.isRawAAC=m;var r=n(66790),o=n(40306),s=n(3336),a=n(80813),u=n(15971),l=n(74853),c=n(34047),d=n(34841),p=n(70233),h=n(85434),f=n(88052),g=n(62756),v=n(87187),y=n(67889);t.WebWorkerTransmuxer=function(){function e(t,n){var i=this;this.rt=[],this.vt={},this.wt={},this.zt=!1,this.Bt=function(){i.resetCaptionParser()},this.Su=function(t){t.data=e.makeSegmentSelfInitializing(t.initSegment,t.data);var n={id3:e.getId3Metadata(t),closedCaptions:t.captions};i.ut.push({segment:t,metadata:n})},this.Zu=function(e){var t,n=i.rt.shift();if(n){if(n.mp2tsSegment.setData(e),i.pt.logger.debug("Transmuxed",n.mp2tsSegment.getUrl()),i.ut.length<1||0===Object.keys(i.ut[0].segment.info).length)return n.rejectFn(r.TransmuxingRejectionReason.INVALID_TS_SEGMENT),void i.Yu();if(n.mp2tsSegment.getSegmentInfo().discardData||n.discard)i.Yu();else{i.au(n),i.ut.sort(function(e,t){return e.segment.info.trackId-t.segment.info.trackId});var o=i.ut.map(function(e){return e.metadata}),s=null==(t=i.pt.config.tweaks)?void 0:t.parse_cea_708_caption;o.forEach(function(e){e.closedCaptions=e.closedCaptions.filter(function(e){return s?e.channel.includes("708"):!e.channel.includes("708")})});var a=i.Vu(i.ut,n.mp2tsSegment);i.zt&&a.length>1&&(i.pt.logger.debug("Discarding muxed audio from video segment since there is a separate audio playlist."),a=a.filter(function(e){var t=e[0];return e[1],h.MimeTypeHelper.isVideo(t.getMimeType())})),a.forEach(function(e){var t,n=e[0],r=e[1];h.MimeTypeHelper.isAudio(n.getMimeType())&&(null==(t=i.st)||t.postMessage({action:"setAudioAppendStart",appendStart:function(e,t){var n=t.getTimescale();if(void 0===n)return NaN;var i=e&&e.segment.info,r=i&&i.segmentDuration>0?i.segmentDuration/n:t.getDuration();return t.getBaseMediaDecodeTime()/n+r}(r,n),trackId:r.segment.info.trackId}))}),n.resolveFn({originalSegment:n.mp2tsSegment,transmuxedSegments:a.map(function(e){var t=e[0];return e[1],t}),metadata:o}),i.Yu()}}},this.iu=function(t){if("done"!==t.data.action||"transmuxing"===t.data.what){var n=i.tt[t.data.action];for(var r in n)if(n.hasOwnProperty(r))if("data"===t.data.action){var o=e.postProcessSegment(t.data.segment);n[r].call(i.st,o)}else"done"===t.data.action&&n[r].call(i.st,t.data.originalSegment)}},this.pt=t,this.qt=!1,this.zt=n;try{this.st=new y.TransmuxerWorkerClass,this.st&&(this.st.onmessage=this.iu)}catch(e){this.pt.eventHandler.fireError(new s.PlayerError(o.ErrorCode.PLAYBACK_HLS_COULD_NOT_LOAD_TRANSMUXER,{error:e},"There was an error during the transmuxer initialization.",this.pt.sourceContext.sourceIdentifier))}this.tt={},this.ut=[],this.hu("data",this.Su),this.hu("done",this.Zu)}return e.prototype.setShouldExpectSeparateAvSegments=function(e){this.zt=e},e.prototype.waitForInitializationForDiscontinuity=function(e){return this.bu(e).promise},e.prototype.isSetupForDiscontinuity=function(e){return this.yt===e},e.prototype.transmuxSegment=function(e){var t=this;return this.At(e).then(function(){return t.Ft(e)})},e.prototype.At=function(e){var t,n,i=e.getSegmentInfo().discontinuitySequenceNumber;if(null==i||null==e.getCodec()||h.MimeTypeHelper.isVideo(e.getMimeType())||!this.zt||this.isSetupForDiscontinuity(i))return Promise.resolve();var r=null==(t=(0,u.getSourceState)(this.pt))?void 0:t.hls,o=Object.keys(null!=(n=null==r?void 0:r.discontinuitySequenceTiming)?n:{}).filter(function(e){return h.MimeTypeHelper.isAV(e)}),s=f.ModuleManager.get(g.ModuleName.HLS).selectors.areDiscontinuitiesMisaligned;return r&&s(r,o,e.getDuration())?(this.pt.logger.debug("[Transmuxer] Skipping delayed transmuxer initialization for disco ".concat(i," as discontinuities are misaligned")),Promise.resolve()):(this.pt.logger.debug("[Transmuxer] Awaiting video segment to complete initialization for discontinuity ".concat(i)),this.waitForInitializationForDiscontinuity(i))},e.prototype.Ct=function(){var e=f.ModuleManager.get(g.ModuleName.HLS);this.xt=new e.DiscontinuitySequenceNumberTracker(h.MimeTypeHelper.isVideo),this.xt.subscribe(this.Bt)},e.prototype.Dt=function(e){this.xt||this.Ct(),this.xt.trackSegment(e)},e.prototype.Et=function(){var e=this.pt.sourceContext.sourceIdentifier,t=!1;return this.pt.serviceManager.maybeCall(a.ServiceName.ManifestService,function(e){t=!!(e.getManifest()&&e.isHlsManifest()&&f.ModuleManager.has(g.ModuleName.HLS))},null,e),t},e.prototype.Ft=function(e){var t=this;return new Promise(function(n,i){var r={resolveFn:n,rejectFn:i,mp2tsSegment:e,discard:!1};t.rt.push(r),t.qt||(t.qt=!0,t.Ht(r))})},e.prototype.Gt=function(e){return!(!h.MimeTypeHelper.isAudio(e.getMimeType())||this.zt)&&m(e.getData())},e.prototype.Ht=function(e){this.pt.logger.debug("Transmuxing "+e.mp2tsSegment.getUrl()),this.Et()&&this.Dt(e.mp2tsSegment);var t=e.mp2tsSegment.getSegmentInfo(),n=this.Gt(e.mp2tsSegment),i=t.discontinuitySequenceNumber;if((n||!this.isSetupForDiscontinuity(i))&&null!=t.startTime){var r=t.startTime;n?this.pt.logger.debug("[Transmuxer] Applying startTime offset to raw AAC, BMDT: ".concat(r," (").concat(9e4*r,")")):this.pt.logger.debug("[Transmuxer] Initializing disco ".concat(i,", BMDT: ").concat(r," (").concat(9e4*r,")")),this.yt=i,this.eu(r)}this.fu(e.mp2tsSegment.getData()),this.gu()},e.makeSegmentSelfInitializing=function(e,t){return l.ArrayHelper.append(e,t)},e.prototype.Tu=function(e){return e.sps?"avc"===e.codec?"avc1.".concat(p.FormatHelper.intToHex(e.sps.profileIdc)).concat(p.FormatHelper.intToHex(e.sps.profileCompatibility)).concat(p.FormatHelper.intToHex(e.sps.levelIdc)):"hevc"===e.codec?(0,c.assembleHvcCodecString)("hvc1",i(i({},e.sps),{general_profile_compatibility_flags:function(e){for(var t=[],n=0;n<32;n++)t.push(e>>>n&1);return parseInt(t.join(""),2)}(e.sps.general_profile_compatibility_flags)})):null:null},e.prototype.Uu=function(e){return"audioobjecttype"in e?"mp4a.40.".concat(e.audioobjecttype):"bsid"in e?e.codec:""},e.prototype.Vu=function(e,t){var n=this;return e.map(function(e){n.pt.logger.debug("Got transmuxed "+e.segment.type,t.getUrl());var r,o=e.segment.type,s=e.segment.info,a="video"===o?9e4:s.samplerate,u=t.getSegmentInfo().presentationTimeOffset;r="video"===o?n.Tu(s):n.Uu(s),n.Wu(e,t);var l=new v.Segment(e.segment.data.buffer,o+"/mp4",r,t.getPeriodId(),t.getDuration(),v.SegmentInitType.SELF_INIT,e.segment.info.startsWithKeyframe,t.getNetworkRequestSize(),t.getRepresentationId());return l.setTimescale(a),l.setUrl(t.getUrl()),l.setSegmentInfo(i(i({},t.getSegmentInfo()),{mimeType:l.getMimeType()})),l.setBaseMediaDecodeTime(s.baseMediaDecodeTime),void 0!==u?(l.setPresentationTimeOffset(u),l.setPlaybackTime(s.baseMediaDecodeTime/a-u)):l.setPlaybackTime(NaN),l.setDuration(n.Xu(s,a,t.getDuration())),[l,e]})},e.prototype.Wu=function(e,t){var n=this.pt.serviceManager.get(a.ServiceName.SourceStoreService,this.pt.sourceContext.sourceIdentifier),i=f.ModuleManager.get(g.ModuleName.HLS,!1);if(n&&i){var r=e.segment.info.timelineStartInfo.minSegmentPts%0x200000000,o=t.getPlaybackTime()-r/9e4;n.dispatch(i.actions.setTimestampRolloverPositions(o+95443.7176888889,o))}},e.prototype.Xu=function(e,t,n){var i=e.segmentDuration/t;if(i){var r=Math.abs(n-i);return r>.1&&this.pt.logger.debug("Segment duration is off by ".concat(r,", corrected from ").concat(n," to ").concat(i)),i}return n},e.prototype.Yu=function(){if(this.ut=[],this.rt.length>0){var e=this.rt[0];this.Ht(e)}else this.qt=!1},e.prototype.au=function(e){var t=e.mp2tsSegment.getSegmentInfo().discontinuitySequenceNumber;if(void 0!==t){if(void 0===this.vt[t]){var n=this.ut[0].segment.info.timelineStartInfo;this.vt[t]=(n.baseMediaDecodeTime-n.pts)/9e4}this.cu(t),this.cu(-1),this.du(function(e){return e<t})}},e.prototype.bu=function(e){return this.wt[e]||(this.wt[e]=new d.Deferred),this.wt[e]},e.prototype.cu=function(e){void 0!==e&&this.bu(e).resolve()},e.prototype.du=function(e){var t=this;void 0===e&&(e=function(){return!0}),Object.entries(this.wt).forEach(function(n){var i=n[0],o=n[1];!o.hasSettled&&e(Number(i))&&(t.pt.logger.debug("[Transmuxer] Rejecting unresolved disco initialization ".concat(i)),o.reject(r.TransmuxingRejectionReason.TRANSMUXING_ABORTED),delete t.wt[Number(i)])})},e.prototype.getTimestampMappingOffset=function(e){var t,n=null==(t=e.getSegmentInfo())?void 0:t.discontinuitySequenceNumber,i=this.vt[n];if(void 0!==n&&void 0!==i)return i+95443.7176888889*Math.floor((e.getPlaybackTime()-i)/95443.7176888889)},e.prototype.discardCurrentJobs=function(e){return h.MimeTypeHelper.isVideo(e)&&(this.du(),this.wt={}),this.isTransmuxing()?this.rt.filter(function(t){return t.mp2tsSegment.getMimeType()===e}).map(function(e){return e.discard=!0,{mp2tsSegment:e.mp2tsSegment}}):[]},e.prototype.eu=function(e){var t;null==(t=this.st)||t.postMessage({action:"setTimestampOffset",offset:e})},e.prototype.fu=function(e){var t;null==(t=this.st)||t.postMessage({action:"push",data:e},[e])},e.prototype.gu=function(){var e;null==(e=this.st)||e.postMessage({action:"flush"})},e.prototype.resetCaptionParser=function(){var e;this.pt.logger.debug("Resetting caption parser..."),null==(e=this.st)||e.postMessage({action:"resetCaptions"})},e.prototype.hasActiveJobs=function(){return this.qt&&this.rt.some(function(e){return!1===e.discard})},e.prototype.hasDelayedAudioSegments=function(){return Object.values(this.wt).some(function(e){return!e.hasSettled})},e.prototype.isTransmuxing=function(){return this.qt},e.prototype.isTransmuxingSegmentsForPeriod=function(e){return this.rt.some(function(t){return e===t.mp2tsSegment.getPeriodId()})},e.prototype.reset=function(){this.pt.logger.debug("Resetting transmuxer..."),this.yt=void 0,this.xt&&this.xt.reset()},e.prototype.dispose=function(){var e;this.st&&(this.tt={},this.rt=[],this.ut=[],this.st.postMessage({action:"dispose"}),this.st.terminate(),this.st=null),this.reset(),this.du(),null==(e=this.xt)||e.dispose(),this.wt={},this.vt={}},e.prototype.hu=function(e,t){this.tt.hasOwnProperty(e)||(this.tt[e]=[]),this.tt[e].push(t)},e.getId3Frame=function(e){if(e&&e.key&&e.data){var t={key:e.key,data:""};return"TXXX"===e.key&&"string"==typeof e.data?(t.info=e.description,t.data=e.data):"PRIV"===e.key?(t.info=e.owner,t.data=e.data):"WXXX"===e.key&&"string"==typeof e.data?(t.info=e.description,e.url&&(t.data=e.url)):t.data=e.data,t.data instanceof Uint8Array&&(t.data=l.ArrayHelper.getArray(t.data)),t}},e.getId3Metadata=function(t){if(!t.hasOwnProperty("metadata")||!Array.isArray(t.metadata))return[];for(var n=[],i=0;i<t.metadata.length;i++){for(var r={frames:[]},o=0;o<t.metadata[i].frames.length;o++){var s=e.getId3Frame(t.metadata[i].frames[o]);s&&(r.frames.push(s),r[s.key]=s.data)}n.push({presentationTime:t.metadata[i].cueTime,data:r})}return n},e.postProcessSegment=function(e){if(e)return e.data=new Uint8Array(e.data),e},e}();function m(e){var t=new Uint8Array(e);return!(t.length<4||73===t[0]&&68===t[1]&&51===t[2]||255!==t[0]||(240&t[1])!=240)}}},function(e){return e(e.s=21332)}])},15621:function(e,t,n){"use strict";
1var i,r=this&&this.__extends||(i=function(e,t){return(i=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])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.VolumeControlButton=void 0;var o=n(8675),s=n(93797),a=n(94944),u=n(80432);t.VolumeControlButton=function(e){function t(t){void 0===t&&(t={});var n=e.call(this,t)||this;return n.volumeToggleButton=new a.VolumeToggleButton,n.volumeSlider=new s.VolumeSlider({vertical:null==t.vertical||t.vertical,hidden:!0}),n.config=n.mergeConfig(t,{cssClass:"ui-volumecontrolbutton",components:[n.volumeToggleButton,n.volumeSlider],hideDelay:500},n.config),n}return r(t,e),t.prototype.configure=function(t,n){var i=this;e.prototype.configure.call(this,t,n);var r=this.getVolumeToggleButton(),o=this.getVolumeSlider();this.volumeSliderHideTimeout=new u.Timeout(this.getConfig().hideDelay,function(){o.hide()});var s=!1;r.getDomElement().on("mouseenter",function(){o.isHidden()&&o.show(),i.volumeSliderHideTimeout.clear()}),r.getDomElement().on("mouseleave",function(){i.volumeSliderHideTimeout.reset()}),o.getDomElement().on("mouseenter",function(){i.volumeSliderHideTimeout.clear(),s=!0}),o.getDomElement().on("mouseleave",function(){o.isSeeking()?i.volumeSliderHideTimeout.clear():i.volumeSliderHideTimeout.reset(),s=!1}),o.onSeeked.subscribe(function(){s||i.volumeSliderHideTimeout.reset()})},t.prototype.release=function(){var t;e.prototype.release.call(this),null==(t=this.volumeSliderHideTimeout)||t.clear()},t.prototype.getVolumeToggleButton=function(){return this.volumeToggleButton},t.prototype.getVolumeSlider=function(){return this.volumeSlider},t}(o.Container)},16347:e=>{!function(){"use strict";self,e.exports=(self.webpackChunkbitmovin_player=self.webpackChunkbitmovin_player||[]).push([[314],{89462:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.baselineCss=void 0,t.baselineCss="\n.bitmovinplayer-poster {\n position : absolute;\n top : 0;\n bottom : 0;\n left : 0;\n right : 0;\n display : none;\n background-size : contain;\n background-position : center;\n background-repeat : no-repeat;\n}\n\n.bitmovinplayer-container {\n padding: 0;\n margin: 0;\n position : relative;\n /* overflow:hidden will be needed in the future to allow fit/stretch/etc the video */\n overflow : hidden;\n min-height: 150px;\n min-width: 260px;\n box-sizing: content-box;\n background-color: transparent;\n width: 100%;\n height: 100%;\n}\n.bitmovinplayer-container:before {\n display: block;\n content: '';\n width: 100%;\n}\n.bitmovinplayer-container video, .bitmovinplayer-container object, .bitmovinplayer-container > canvas {\n position: absolute;\n top: 0;\n left:0;\n bottom:0;\n right:0;\n width: 100%;\n height: 100%;\n}\n\n.bitmovinplayer-container > * {\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n padding: 0;\n}\n\n.bitmovinplayer-container.aspect-16x9:before {\n padding-bottom: 56.25%;\n}\n.bitmovinplayer-container.aspect-16x10:before {\n padding-bottom: 62.5%;\n}\n.bitmovinplayer-container.aspect-4x3:before {\n padding-bottom: 75%;\n}\n.bitmovinplayer-container.aspect-3x2:before {\n padding-bottom: 66.66%;\n}\n\n/* e.g. wordpress sets the height for these elements to 'auto' which leads to problems for example on Windows 7 in IE11 (with Flash) */\n.bitmovinplayer-container object, .bitmovinplayer-container embed, .bitmovinplayer-container img {\n height: 100%;\n}\n\n.bitmovinplayer-container, .bitmovinplayer-ad-container {\n width:100%;\n height:100%;\n background-color: black;\n color: #ffffff;\n /* make text (like subtitles etc.) unselectable */\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -khtml-user-select: none;\n -moz-user-select: none;
1\n -ms-user-select: none;\n user-select: none;\n -webkit-tap-highlight-color: transparent;\n}\n.bitmovinplayer-container video, .bitmovinplayer-ad-container video {\n object-fit: contain;\n -o-object-fit: contain;\n}\n/* fullscreen */\nhtml:-ms-fullscreen {\n width:100%;\n height:100%;\n}\n:-webkit-full-screen {\n background-color:transparent;\n width: 100% !important;\n height: 100% !important;\n}\nvideo:-webkit-full-screen + .bitmovinplayer-ctrl {\n background:#ccc; /* required for Chrome which doesn't heed the transparent value set above */\n}\n/* hide controls on fullscreen with WebKit */\n*[data-fullscreen=true], *[data-legacy-fullscreen=true] {\n max-width:100%;\n max-height:100%;\n width:100% !important;\n height:100% !important;\n background-color: black !important;\n margin:0;\n padding:0;\n position: fixed !important;\n top: 0 !important;\n left: 0 !important;\n}\n*[data-legacy-fullscreen=true] {\n z-index: 99999;\n}\n\n.bitmovinplayer-error-message ul {\n text-align: left;\n}\n\n.bitmovinplayer-error-message a {\n color: #31c5c7;\n}\n/* from http://stackoverflow.com/a/37553385 */\n.bitmovinplayer-container video::-webkit-media-controls-panel {\n display: none!important;\n -webkit-appearance: none;\n}\n.bitmovinplayer-container video::-webkit-media-controls-play-button {\n display: none!important;\n -webkit-appearance: none;\n}\n.bitmovinplayer-container video::-webkit-media-controls-start-playback-button {\n display: none!important;\n -webkit-appearance: none;\n}\n"},17432:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.ImagePreloader=void 0,t.ImagePreloader=function(){function e(e,t,n){var i=this;this.e9=e,this.g9=t,this.h9=n,this.i9=!1,this.f9=new Image,this.f9.onload=function(){i.i9=!0,i.g9&&i.g9(i.e9)},this.f9.onerror=function(){i.h9&&i.h9(i.e9)},this.f9.src=e}return e.prototype.abort=function(){null!==this.f9&&(this.f9.src="",this.f9.onload=null,this.f9.onerror=null),this.f9=null,this.g9=null,this.h9=null},e.prototype.isLoaded=function(){return this.i9},e.prototype.getUrl=function(){return this.e9},e}()},920:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.StyleModuleDefinition=void 0;var i=n(62756),r=n(76133);t.StyleModuleDefinition={name:i.ModuleName.Style,module:{StyleManager:r.StyleManager}},t.default=t.StyleModuleDefinition},80285:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.PosterManager=void 0;var i=n(45202),r=n(3714),o=n(17432);t.PosterManager=function(){function e(t,n,o){var s=this;this.qU=function(e){(e.type===r.PlayerEvent.TimeChanged&&e.time>0||e.type===r.PlayerEvent.AdStarted)&&(s.nU.off(r.PlayerEvent.TimeChanged,s.qU),s.nU.off(r.PlayerEvent.AdStarted,s.qU),s.sU())},this.lU=t,this.mU=n,this.nU=o,this.oU=document.createElement("div"),this.oU.setAttribute("class",i.Environment.idPrefix+e.POSTER_CLASS),this.lU.appendChild(this.oU)}return e.prototype.getPosterElement=function(){return this.oU},e.prototype.setPosterImage=function(e,t){var n=this;"string"==typeof e&&""!==e&&(this.pU&&this.pU.abort(),this.sU(),this.pU=new o.ImagePreloader(e,function(e){n.oU.style.backgroundImage="url("+e+")",n.rU(t)}),t||(this.nU.on(r.PlayerEvent.TimeChanged,this.qU),this.nU.on(r.PlayerEvent.AdStarted,this.qU)))},e.prototype.removePosterImage=function(){this.pU&&this.pU.abort(),this.oU.style.backgroundImage="none",this.sU()},e.prototype.rU=function(e){this.mU.isPlaying()&&!e||(this.oU.style.display="block")},e.prototype.sU=function(){this.oU.style.display="none"},e.prototype.dispose=function(){this.pU&&this.pU.abort(),this.nU.off(r.PlayerEvent.TimeChanged,this.qU),this.nU.off(r.PlayerEvent.AdStarted,this.qU),this.lU.removeChild(this.oU)},e.POSTER_CLASS="poster",e}()},76133:function(e,t,n){var i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.StyleManager=void 0;var r=n(45202),o=n(3714),s=n(70850),a=n(89462),u=n(80285),l=n(16334),c=n(3865),d=16/9,p="video-player-style";
1function h(e){var t=e.configuration.style(),n=t.width,i=t.height,r=t.aspectratio;return null==n&&null==i&&null==r?{width:n,height:i,aspectratio:d}:{width:n,height:i,aspectratio:r}}t.StyleManager=function(){function e(e,t){var n=this;this.Kr=function(e,t){n.zr.eventHandler.dispatchEvent(o.PlayerEvent.VisibilityChanged,{isVisible:e,percentVisible:t})},this.zr=t,this.Ar=t.container,this.Br=this.Ar.id||String(Math.round(1e7*Math.random())),this.Cr=[];var i=r.Environment.idPrefix+""+t.playerConfig.prefix+"container";this.Ir(i),this.Dr=new u.PosterManager(t.container,e,t.eventHandler),this.Fr=d,this.Lr(),this.Gr()}return e.prototype.Gr=function(){var e=this.Hr();if(e&&!(e.getElementsByClassName(p).length>0)){var t=document.createElement("style");t.className=p,t.setAttribute("type","text/css"),t.innerHTML=a.baselineCss,e.appendChild(t)}},e.prototype.Hr=function(){var e=this.zr.configuration.style();return e.container&&(0,s.safeUserCallback)(function(){return e.container()},this.zr.logger)||document.getElementsByTagName("head")[0]||document.head},e.prototype.Ir=function(e){this.Cr.push(e),this.Ar.classList.add(e)},e.prototype.Jr=function(e){this.Ar.classList.remove(e);var t=this.Cr.indexOf(e);t>-1&&this.Cr.splice(t,1)},e.prototype.setAspectRatio=function(e){var t=this.Fr,n=(0,s.parseAspectRatio)(e),r=h(this.zr),a=r.width,u=r.height;if(!(a&&u||t===n))if(n){this.Fr=n;var l=i(i({},h(this.zr)),{aspectratio:this.Fr});this.Mr(l),this.zr.eventHandler.dispatchEvent(o.PlayerEvent.AspectRatioChanged,{from:t,to:n})}else this.zr.logger.debug("Invalid aspect ratio provided (".concat(e,")"))},e.prototype.getAspectRatio=function(){return this.Fr},e.prototype.getVisibility=function(){var e,t,n,i;return{isVisible:null!=(t=null==(e=this.Er)?void 0:e.getVisibility())&&t,percentVisible:null!=(i=null==(n=this.Er)?void 0:n.getPercentVisibility())?i:0}},e.prototype.stopVisibilityTracking=function(){var e;null==(e=this.Er)||e.dispose(),this.Er=void 0},e.prototype.maybeStartTrackingVisibility=function(e){var t=this.zr.configuration.style().visibility,n=t.enableTracking,i=t.visibilityThreshold;n&&(this.Er&&this.stopVisibilityTracking(),this.Er=new c.VisibilityTracker(e,i,this.Kr))},e.prototype.setPosterImage=function(e,t){this.Dr.setPosterImage(e,t)},e.prototype.removePosterImage=function(){this.Dr.removePosterImage()},e.prototype.initializeInternalPlayer=function(e){l.StyleUtility.addHtmlStructure(this.Ar,this.zr,this.Dr,e)},e.prototype.Lr=function(){var e=h(this.zr);this.Mr(e)},e.prototype.Mr=function(e){var t=this.zr.container;if(t){if(e.width&&(t.style.width=e.width),e.height&&(t.style.height=e.height),this.Fr=e.width&&e.height?t.clientWidth/t.clientHeight:parseFloat(e.aspectratio),e.height&&!e.width&&this.Fr){var n=t.clientHeight*this.Fr;t.style.width="".concat(n,"px"),t.style.removeProperty("height")}e.width&&e.height||this.Nr(this.Fr)}},e.prototype.Nr=function(e){var t,n=this;e&&(e===16/9?t="aspect-16x9":1.6===e?t="aspect-16x10":e===4/3||1.3===e?t="aspect-4x3":1.5===e?t="aspect-3x2":(t="custom-aspect-ratio-"+this.Br,l.StyleUtility.createCustomCssRule(".bitmovinplayer-container.".concat(t,"::before"),"padding-bottom: ".concat(100/e,"%"),this.Hr())),["aspect-16x9","aspect-4x3","aspect-3x2","aspect-16x10","custom-aspect-ratio-"+this.Br].forEach(function(e){return n.Jr(e)}),this.Ir(t))},e.prototype.dispose=function(){var e,t=this;this.Dr.dispose(),null==(e=this.Er)||e.dispose(),this.Cr.slice().forEach(function(e){return t.Jr(e)})},e}()},16334:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.StyleUtility=void 0;var i=n(45202),r=n(70850);t.StyleUtility=function(){function e(){}return e.addHtmlStructure=function(e,t,n,o){t.source.hasOwnProperty("vr")&&!r.Util.vrAudioElement&&r.Util.getVRAudioElement();var s=null;o&&o.hasAttribute("id")&&(s=o.getAttribute("id"));var a=s||i.Environment.idPrefix+""+t.playerConfig.prefix+"video-"+e.getAttribute("id");if(o.setAttribute("id",a),o.hasAttribute("src")&&o.removeAttribute("src"),!o.parentNode||o.parentNode!==e){var u,l=n.getPosterElement(),c=e.getElementsByClassName("bitmovinplayer-vr-canvas"),d=e.getElementsByClassName("bitmovinplayer-vr-helper-canvas");(u=d&&d.length>0?d[0]:c&&c.length>0?c[0]:l||null)?e.insertBefore(o,u):e.appendChild(o)}"hidden"===t.playerConfig.visibility&&(e.style.display="none")},e.createCustomCssRule=function(e,t,n){var i,r="bitmovin-style-module",o=n.getElementsByClassName(r)[0];o||((o=document.createElement("style")).setAttribute("class",r),o.setAttribute("type","text/css"),n.insertBefore(o,n.firstChild));var s=o.sheet||o.styleSheet;-1!==(i=function(e,t){for(var n=0;n<e.length;n++)if((e.item?e.item(n):e[n]).selectorText===t)return n;return -1}(s.cssRules,e))&&(s.removeRule?s.removeRule(i):s.deleteRule&&s.deleteRule(i)),s.addRule?s.addRule(e,t):s.insertRule&&s.insertRule("".concat(e," {").concat(t,"}"),0)},e}()}
1,3865:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.VisibilityTracker=void 0;var n={passive:!0};function i(e){return Math.max(0,Math.min(100,100*e))}t.VisibilityTracker=function(){function e(e,t,r){var o=this;this.element=e,this.visibilityThreshold=t,this.onVisibilityChanged=r,this.tU=null,this.uU=!1,this.vU=0,this.wU=!1,this.xU=!1,this.yU=null,this.zU=function(e){if(!o.wU){var t=e[0];t&&(o.vU=i(t.intersectionRatio),o.BU())}},this.AU=function(){"u">typeof window&&(window.addEventListener("scroll",o.EU,n),window.addEventListener("resize",o.EU,n),window.addEventListener("orientationchange",o.EU,n))},this.DU=function(){"u">typeof window&&(window.removeEventListener("scroll",o.EU),window.removeEventListener("resize",o.EU),window.removeEventListener("orientationchange",o.EU),o.FU())},this.EU=function(){o.wU||null===o.yU&&(o.yU=window.requestAnimationFrame(function(){o.yU=null,o.GU()}))},this.GU=function(){var e=o.element.getBoundingClientRect(),t=e.width*e.height;if(t<=0)return o.vU=0,void o.BU();var n=window.innerWidth||document.documentElement.clientWidth||0,r=window.innerHeight||document.documentElement.clientHeight||0;n<=0||r<=0?o.vU=0:o.vU=i(Math.max(0,Math.min(e.right,n)-Math.max(e.left,0))*Math.max(0,Math.min(e.bottom,r)-Math.max(e.top,0))/t),o.BU()},"u">typeof window&&"u">typeof document&&("IntersectionObserver"in window?(this.tU=new IntersectionObserver(this.zU,{threshold:Array.from({length:101},function(e,t){return t/100})}),requestAnimationFrame(function(){requestAnimationFrame(function(){var e;null==(e=o.tU)||e.observe(o.element)})})):(this.GU(),this.AU()))}return e.prototype.BU=function(){var e=this.uU;this.uU=this.vU>=this.visibilityThreshold,this.xU?e!==this.uU&&this.onVisibilityChanged(this.uU,this.vU):this.xU=!0},e.prototype.getVisibility=function(){return this.uU},e.prototype.getPercentVisibility=function(){return this.vU},e.prototype.dispose=function(){this.wU||(this.wU=!0,this.CU())},e.prototype.CU=function(){this.tU?(this.tU.disconnect(),this.tU=null):this.DU()},e.prototype.FU=function(){null!==this.yU&&(window.cancelAnimationFrame(this.yU),this.yU=null)},e}()}},function(e){return e(e.s=920)}])}()},16998:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NavigationGroup=void 0;var i=n(8675),r=n(803),o=n(94198),s=n(32354),a=n(55358),u=n(90753),l=n(49015),c=n(14459);t.NavigationGroup=function(){function e(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];this.container=e,this.removeElementHoverEventListeners=function(){},this._components=t,this.eventSubscriber=new s.NodeEventSubscriber}return e.prototype.getComponents=function(){var e=[],t=this._components.filter(function(e){return e instanceof l.FocusableContainer}).map(function(e){return e});if(this.activeComponent){var n=this.getActiveFocusableContainer();n?e.push.apply(e,n.components):e.push.apply(e,t)}return this._components.filter(function(e){return!(e instanceof l.FocusableContainer)}).forEach(function(t){t instanceof i.Container?e.push.apply(e,(0,o.resolveAllComponents)(t)):e.push(t)}),e.filter(function(e){return(0,a.isFocusable)(e)})},e.prototype.getActiveComponent=function(){return this.activeComponent},e.prototype.focusComponent=function(e){var t;t=e instanceof l.FocusableContainer?e.primaryComponent:e,this.blurActiveComponent(),this.activeComponent=t,(0,c.toHtmlElement)(this.activeComponent).focus()},e.prototype.blurActiveComponent=function(){this.activeComponent&&(0,c.toHtmlElement)(this.activeComponent).blur()},e.prototype.focusFirstComponent=function(){var e=this.getComponents()[0];e&&this.focusComponent(e)},e.prototype.defaultNavigationHandler=function(e){var t=this;if(!this.activeComponent)return!1;var n=function(n){var i=n instanceof l.FocusableContainer?n.primaryComponent:n;t.afterNavigation&&t.afterNavigation(e,i)},i=this.getActiveFocusableContainer();if(i){var o=(0,r.getComponentInDirection)(this.activeComponent,i.components,e);if(o)return this.focusComponent(o),n(o),!0}var s=(0,r.getComponentInDirection)(this.activeComponent,this.getComponents(),e);return s?(this.focusComponent(s),n(s),!0):(n(s),!1)},e.prototype.defaultActionHandler=function(e){switch(e){case u.Action.SELECT:return this.activeComponent&&(0,c.toHtmlElement)(this.activeComponent).click(),!!this.activeComponent;case u.Action.BACK:return this.container.hide(),!0}return!1},e.prototype.handleInput=function(e,t,n){var i=!0,r=!1;if(n&&this.activeComponent&&(r=!!n(e,this.activeComponent,function(){return i=!1})),i){var o=t.call(this,e);r=r||o}return r},e.prototype.handleNavigation=function(e){return this.activeComponent?this.handleInput(e,this.defaultNavigationHandler,this.onNavigation):(this.activeComponentBeforeDisable?this.focusComponent(this.activeComponentBeforeDisable):this.focusFirstC
1omponent(),!!this.activeComponent)},e.prototype.handleAction=function(e){return this.handleInput(e,this.defaultActionHandler,this.onAction)},e.prototype.disable=function(){this.activeComponent&&(this.activeComponentBeforeDisable=this.activeComponent,this.blurActiveComponent(),this.activeComponent=void 0)},e.prototype.enable=function(){this.activeComponentBeforeDisable&&!(0,a.isSettingsPanel)(this.container)?(this.focusComponent(this.activeComponentBeforeDisable),this.activeComponentBeforeDisable=void 0):this.focusFirstComponent(),this.trackElementHover()},e.prototype.trackElementHover=function(){var e=this;this.removeElementHoverEventListeners();var t=[];this.getComponents().forEach(function(e){(e instanceof i.Container?(0,o.resolveAllComponents)(e):e instanceof l.FocusableContainer?(0,o.resolveAllComponents)(e.container):[e]).forEach(function(e){t.push(e)})});var n=t.map(function(e){return{component:e,element:(0,c.toHtmlElement)(e)}}).map(function(t){var n=t.element,i=t.component,r=e.focusComponent.bind(e,i),o=function(){return e.disable()};return e.eventSubscriber.on(n,"mouseenter",r),e.eventSubscriber.on(n,"mouseleave",o),function(){e.eventSubscriber.off(n,"mouseenter",r),e.eventSubscriber.off(n,"mouseleave",o)}});this.removeElementHoverEventListeners=function(){return n.forEach(function(e){return e()})}},e.prototype.release=function(){this.eventSubscriber.release(),this.activeComponent=void 0,this._components.splice(0,this._components.length),this.removeElementHoverEventListeners()},e.prototype.getActiveFocusableContainer=function(){var e=this;if(this.activeComponent)return this._components.filter(function(e){return e instanceof l.FocusableContainer}).map(function(e){return e}).find(function(t){return t.components.includes(e.activeComponent)})},e}()},18297:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ComponentConfigManager=void 0;var i=n(92668);t.ComponentConfigManager=function(){function e(){}return e.run=function(t,n,i){e.componentConfig=t,e.variantIdentifier=n;try{return i()}finally{e.componentConfig=void 0,e.variantIdentifier=void 0}},e.getConfigFor=function(t){if(!e.componentConfig)return{};var n={};return e.applyConfig(n,e.componentConfig,t),e.applyConfig(n,e.componentConfig[e.variantIdentifier],t),n},e.applyConfig=function(e,t,n){if(t)for(var r=0,o=(0,i.getConstructorNames)(n);r<o.length;r++)Object.assign(e,t[o[r]])},e}()},20875:function(e,t,n){"use strict";var i,r=this&&this.__extends||(i=function(e,t){return(i=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])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(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 o=n(67598),s=n(52023),a=n(53623),u=n(24379);t.SettingsToggleButton=function(e){function t(t){var n=e.call(this,t)||this;if(n.visibleSettingsPanels=[],!t.settingsPanel)throw Error("Required SettingsPanel is missing");var i=u.i18n.getLocalizer("settings");return n.config=n.mergeConfig(t,{cssClass:"ui-settingstogglebutton",text:i,onAriaLabel:i,offAriaLabel:i,settingsPanel:null,autoHideWhenNoActiveSettings:!0},n.config),n.getDomElement().attr("aria-haspopup","menu"),n.updateAriaPanelIdRefs(),n.getDomElement().attr("aria-expanded","false"),n}return r(t,e),t.prototype.updateAriaPanelIdRefs=function(){var e=this.getConfig().settingsPanel;if(e){var t=e.getActivePage().getConfig().id;this.getDomElement().attr("aria-controls",t)}},t.prototype.configure=function(t,n){var i=this;e.prototype.configure.call(this,t,n);var r=this.getConfig(),o=r.settingsPanel;if(this.onClick.subscribe(function(){o.isShown()||i.visibleSettingsPanels.slice().filter(function(e){return e.getConfig().hideOnOtherSettingsPanelOpening}
vendor: 5,494 bytes, line 1
1).forEach(function(e){return e.hide()}),o.toggleHidden()}),o.onShow.subscribe(function(){i.on(),i.getDomElement().attr("aria-expanded","true")}),o.onHide.subscribe(function(){i.off(),i.getDomElement().attr("aria-expanded","false")}),o.onActivePageChanged.subscribe(function(){return i.updateAriaPanelIdRefs()}),this.getDomElement().attr("aria-expanded",o.isShown()?"true":"false"),n.onComponentShow.subscribe(function(e){e instanceof s.SettingsPanel&&e.getConfig().hideOnOtherSettingsPanelOpening&&(i.visibleSettingsPanels.push(e),e.onHide.subscribeOnce(function(){return a.ArrayUtils.remove(i.visibleSettingsPanels,e)}))}),r.autoHideWhenNoActiveSettings){var u=function(){o.rootPageHasActiveSettings()?i.isHidden()&&i.show():i.isShown()&&i.hide()};o.onSettingsStateChanged.subscribe(u),u()}},t}(o.ToggleButton)},20949:function(e,t,n){"use strict";var i,r=this&&this.__extends||(i=function(e,t){return(i=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])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.CastStatusOverlay=void 0;var o=n(8675),s=n(30194),a=n(24379);t.CastStatusOverlay=function(e){function t(t){void 0===t&&(t={});var n=e.call(this,t)||this;return n.statusLabel=new s.Label({cssClass:"ui-cast-status-label"}),n.config=n.mergeConfig(t,{cssClass:"ui-cast-status-overlay",components:[n.statusLabel],hidden:!0},n.config),n}return r(t,e),t.prototype.configure=function(t,n){var i=this;e.prototype.configure.call(this,t,n),t.on(t.exports.PlayerEvent.CastWaitingForDevice,function(e){i.show();var t=e.castPayload.deviceName;i.statusLabel.setText(a.i18n.getLocalizer("connectingTo",{castDeviceName:t}))}),t.on(t.exports.PlayerEvent.CastStarted,function(e){i.show();var t=e.deviceName;i.statusLabel.setText(a.i18n.getLocalizer("playingOn",{castDeviceName:t}))}),t.on(t.exports.PlayerEvent.CastStopped,function(e){i.hide()})},t}(o.Container)},21382:function(e,t,n){"use strict";var i,r=this&&this.__extends||(i=function(e,t){return(i=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])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.CloseButton=void 0;var o=n(94474),s=n(24379);t.CloseButton=function(e){function t(t){var n=e.call(this,t)||this;return n.config=n.mergeConfig(t,{cssClass:"ui-closebutton",text:s.i18n.getLocalizer("close")},n.config),n}return r(t,e),t.prototype.configure=function(t,n){e.prototype.configure.call(this,t,n);var i=this.getConfig();this.onClick.subscribe(function(){i.target.hide()})},t}(o.Button)},21616:function(e,t,n){"use strict";var i,r=this&&this.__extends||(i=function(e,t){return(i=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])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(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 o=n(8675),s=n(86051),a=n(85704),u=n(30194),l=n(29155),c=n(47426),d=n(567);t.SettingsPanelItem=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:u.LabelStyle.Text},n.config);var i=t.label;return null!=i&&(i instanceof s.Component?n.label=i:n.label=new u.Label({text:i,labelStyle:t.labelStyle}),n.addComponent(n.label)),n}return r(t,e),t.prototype.configure=function(t,n){var i=this;if(e.prototype.configure.call(this,t,n),null!=this.settingComponent&&this.config.addSettingAsComponent&&(this.addComponent(this.settingComponent),this.updateComponents()),this.settingComponent instanceof d.ListSelector){var r=function(){if(i.settingComponent instanceof d.ListSelector){var e=2;(i.settingComponent instanceof l.VideoQualitySelectBox&&i.settingComponent.hasAutoItem()||i.settingComponent instanceof c.AudioQualitySelectBox)&&(e=3),i.settingComponent.itemCount()<e?i.hide():i.show(),i.onActiveChangedEvent(),i.getDomElement().attr("aria-haspopup","true")}};this.settingComponent.onItemAdded.subscribe(r),this.settingComponent.onItemRemoved.subscribe(r),r()}},t.prototype.onLanguageChanged=function(){this.label instanceof u.Label&&"function"==typeof this.config.label&&this.label.setText(this.config.label)},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()}
1,enumerable:!1,configurable:!0}),t}(o.Container)},21619:e=>{"use strict";e.exports=JSON.parse('{"settings.video.quality":"Qualit\xe9 vid\xe9o","settings.audio.quality":"Qualit\xe9 audio","settings.audio.track":"Piste audio","settings.audio.mute":"Couper le son","settings.audio.volume":"Volume","settings.subtitles.window.color":"Couleur de la fen\xeatre","settings.subtitles.window.opacity":"Opacit\xe9 de la fen\xeatre","settings.subtitles":"Sous-titres","settings.subtitles.font.color":"Couleur de la police","settings.subtitles.font.opacity":"Opacit\xe9 de la police","settings.subtitles.background.color":"Couleur de fond","settings.subtitles.background.opacity":"Opacit\xe9 du fond","settings.subtitles.options":"Options","playerInsights.show":"Afficher Player Insights","playerInsights.hide":"Masquer Player Insights","colors.white":"blanc","colors.black":"noir","colors.red":"rouge","colors.green":"vert","colors.blue":"bleu","colors.cyan":"cyan","colors.yellow":"jaune","colors.magenta":"magenta","percent":"{value}%","settings.subtitles.font.size":"Taille de la police","settings.subtitles.font.style":"Style de la police","settings.subtitles.font.style.bold":"gras","settings.subtitles.font.style.italic":"italique","settings.subtitles.characterEdge":"Bordure du caract\xe8re","settings.subtitles.characterEdge.raised":"en relief","settings.subtitles.characterEdge.depressed":"en creux","settings.subtitles.characterEdge.uniform":"uniforme","settings.subtitles.characterEdge.dropshadowed":"ombre port\xe9e","settings.subtitles.characterEdge.color":"Couleur de la bordure du caract\xe8re","settings.subtitles.font.family":"Police de caract\xe8res","settings.subtitles.font.family.monospacedserif":"empattement \xe0 chasse fixe","settings.subtitles.font.family.proportionalserif":"empattement proportionnel","settings.subtitles.font.family.monospacedsansserif":"sans empattement \xe0 chasse fixe","settings.subtitles.font.family.proportionalsansserif":"sans empattement proportionnel","settings.subtitles.font.family.casual":"d\xe9contract\xe9","settings.subtitles.font.family.cursive":"cursive","settings.subtitles.font.family.smallcapital":"petites majuscules","settings.time.hours":"Heures","settings.time.minutes":"Minutes","settings.time.seconds":"Secondes","ads.remainingTime":"Votre contenu reprendra dans {remainingTime} secondes.","ads.skip":"Passer","ads.skippableIn":"Passer l\'annonce dans {remainingTime}","ads.adNumberOfTotal":"Annonce {activeAdIndex} sur {totalAdsCount}","ad":"Annonce","settings":"R\xe9glages","fullscreen":"Plein \xe9cran","speed":"Vitesse","playPause":"Lecture/Pause","play":"Lecture","pause":"Pause","open":"ouvrir","close":"Fermer","pictureInPicture":"Picture-in-Picture","appleAirplay":"Apple AirPlay","googleCast":"Google Cast","vr":"VR","off":"d\xe9sactiv\xe9","auto":"auto","ecoMode":"Mode \xe9co","ecoMode.title":"Mode \xc9co","persistentPreferences":"M\xe9moriser les pr\xe9f\xe9rences","back":"Retour","reset":"R\xe9initialiser","replay":"Rejouer","normal":"normale","default":"d\xe9faut","live":"En direct","live.jumpToLiveEdge":"{liveLabel}, aller au direct","subtitle.example":"exemple de sous-titre","subtitle.select":"S\xe9lectionner un sous-titre","playingOn":"Lecture sur <strong>{castDeviceName}</strong>","connectingTo":"Connexion \xe0 <strong>{castDeviceName}</strong>...","watermarkLink":"Lien vers la page d\'accueil","controlBar":"Barre de contr\xf4le","player":"Lecteur vid\xe9o","seekBar":"Barre de progression","seekBar.value":"Valeur","seekBar.timeshift":"D\xe9calage temporel","seekBar.durationText":"de","quickseek.forward":"Avance rapide de {seekSeconds} secondes","quickseek.rewind":"Retour rapide de {seekSeconds} secondes","contextMenu.title":"Bitmovin Player","contextMenu.subtitle":"Streaming adaptatif pour le web","contextMenu.copyTimestampLink":"Copier le lien \xe0 l\'instant actuel","captions.enable":"Activer les sous-titres","captions.disable":"D\xe9sactiver les sous-titres"}')},22505:function(e,t,n){"use strict";var i,r=this&&this.__extends||(i=function(e,t){return(i=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])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});
1Object.defineProperty(t,"__esModule",{value:!0}),t.SettingsPanelPageNavigatorButton=void 0;var o=n(94474);t.SettingsPanelPageNavigatorButton=function(e){function t(t){var n=e.call(this,t)||this;return n.config=n.mergeConfig(t,{buttonStyle:o.ButtonStyle.Text},n.config),n.container=n.config.container,n.targetPage=n.config.targetPage,n}return r(t,e),t.prototype.popPage=function(){this.container.popSettingsPanelPage()},t.prototype.pushTargetPage=function(){this.container.setActivePage(this.targetPage)},t}(o.Button)},23160:function(e,t,n){"use strict";var i,r=this&&this.__extends||(i=function(e,t){return(i=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])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(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 o=n(51555),s=n(24379);t.HugePlaybackToggleButton=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 r(t,e),t.prototype.configure=function(t,n){var i=this;e.prototype.configure.call(this,t,n,!1),"boolean"==typeof n.getConfig().enterFullscreenOnInitialPlayback&&(this.config.enterFullscreenOnInitialPlayback=n.getConfig().enterFullscreenOnInitialPlayback);var r=function(){t.isPlaying()||i.isPlayInitiated?t.pause("ui"):t.play("ui")},o=function(){t.getViewMode()===t.exports.ViewMode.Fullscreen?t.setViewMode(t.exports.ViewMode.Inline):t.setViewMode(t.exports.ViewMode.Fullscreen)},s=!0,a=0,u=0;this.onClick.subscribe(function(){if(s){r(),i.config.enterFullscreenOnInitialPlayback&&t.setViewMode(t.exports.ViewMode.Fullscreen);return}var e=Date.now();if(e-a<200){o(),u=e;return}if(e-a<500){o(),r(),u=e;return}a=e,setTimeout(function(){Date.now()-u>200&&r()},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 l=function(){i.setTransitionAnimationsEnabled(!1),i.onToggle.subscribeOnce(function(){i.setTransitionAnimationsEnabled(!0)})};l();var c=t.getConfig().playback&&!!t.getConfig().playback.autoplay,d=!t.getSource()&&c;(t.isPlaying()||d)&&(this.on(),l(),t.on(t.exports.PlayerEvent.Warning,function(e){e.code===t.exports.WarningCode.PLAYBACK_COULD_NOT_BE_STARTED&&l()}))},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}(o.PlaybackToggleButton)},23871:e=>{"use strict";e.exports=JSON.parse('{"settings.video.quality":"Qualidade de v\xeddeo","settings.audio.quality":"Qualidade de \xe1udio","settings.audio.track":"Faixa de \xc1udio","settings.audio.mute":"Silenciar","settings.audio.volume":"Volume","settings.subtitles.window.color":"Cor da janela","settings.subtitles.window.opacity":"Opacidade da janela","settings.subtitles":"Legendas","settings.subtitles.font.color":"Cor do texto","settings.subtitles.font.opacity":"Opacidade do texto","settings.subtitles.background.color":"Cor do fundo","settings.subtitles.background.opacity":"Opacidade do fundo","settings.subtitles.options":"Op\xe7\xf5es","playerInsights.show":"Mostrar Player Insights","playerInsights.hide":"Ocultar Player Insights","colors.white":"branco","colors.black":"preto","colors.red":"vermelho","colors.green":"verde","colors.blue":"azul","colors.cyan":"ciano","colors.yellow":"amarelo","colors.magenta":"magenta","percent":"{value}%","settings.subtitles.font.size":"Tamanho do texto","settings.subtitles.font.style":"Estilo do texto","settings.subtitles.font.style.bold":"negrito","settings.subtitles.font.style.italic":"it\xe1lico","settings.subtitles.characterEdge":"Borda do texto","settings.subtitles.characterEdge.raised":"levantada","settings.subtitles.characterEdge.depressed":"deprimida","settings.subtitles.characterEdge.uniform":"uniforme","settings.subtitles.characterEdge.dropshadowed":"com sombra","settings.subtitles.characterEdge.color":"Cor da borda do texto","settings.subtitles.font.family":"Fam\xedlia de fontes","settings.subtitles.font.family.monospacedserif":"serifado monoespa\xe7ado","settings.subtitles.font.family.proportionalserif":"serifado proporcional","settings.subtitles.font.family.monospacedsansserif":"monoespa\xe7ado sem serifa","settings.subtitles.font.family.proportionalsansserif":"proporcional sem serifa","settings.subtitles.font.family.casual":"casual","settings.subtitles.font.family.cursive":"cursivo","settings.subtitles.font.family.smallcapital":"letras min\xfasculas","settings.time.hours":"Horas","settings.time.minutes":"Minutos","settings.time.seconds":"Segundos","ads.remainingTime":"Este an\xfancio vai terminar em {remainingTime} segundos.","ads.skip":"Ignorar","ads.skippableIn":"Ignorar an\xfancio em {remainingTime}","ads.adNumberOfTotal":"An\xfancio {activeAdIndex} de {totalAdsCount}","ad":"An\xfancio","settings":"Defini\xe7\xf5es","fullscreen":"Ecr\xe3 inteiro","speed":"Velocidade","playPause":"Reproduzir/Pausar","play":"Reproduzir","pause":"Pausar","o
1pen":"abrir","close":"Fechar","pictureInPicture":"Imagem em imagem","appleAirplay":"Apple AirPlay","googleCast":"Google Cast","vr":"Realidade Virtual","off":"desligado","auto":"autom\xe1tico","ecoMode":"ecoMode","ecoMode.title":"Modo Econ\xf3mico","persistentPreferences":"Lembrar prefer\xeancias","back":"Voltar atr\xe1s","reset":"Reiniciar","replay":"Repetir","normal":"normal","default":"predefini\xe7\xe3o","live":"Ao Vivo","live.jumpToLiveEdge":"{liveLabel}, ir para a transmiss\xe3o ao vivo","subtitle.example":"exemplo de legenda","subtitle.select":"Selecionar legenda","playingOn":"A reproduzir em <strong>{castDeviceName}</strong>","connectingTo":"A conectar a <strong>{castDeviceName}</strong>...","watermarkLink":"Link para a p\xe1gina inicial","controlBar":"Controlos do reprodutor de v\xeddeo","player":"Reprodutor de v\xeddeo","seekBar":"Linha do tempo do v\xeddeo","seekBar.value":"Valor","seekBar.timeshift":"Diferido","seekBar.durationText":"de","quickseek.forward":"Avan\xe7ar {seekSeconds} segundos","quickseek.rewind":"Retroceder {seekSeconds} segundos","contextMenu.title":"Bitmovin Player","contextMenu.subtitle":"Streaming adaptativo para a web","contextMenu.copyTimestampLink":"Copiar liga\xe7\xe3o no momento atual","captions.enable":"Ativar legendas","captions.disable":"Desativar legendas"}')},24379:function(e,t,n){"use strict";var i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.i18n=t.I18n=t.defaultVocabularies=void 0;var r=n(93244),o=n(97768),s=n(40235),a=n(21619),u=n(58089),l=n(23871),c=n(85704);t.defaultVocabularies={de:r,en:o,es:s,fr:a,nl:u,pt:l};var d={language:"en",vocabularies:t.defaultVocabularies,events:{onLanguageChanged:new c.EventDispatcher}},p=function(){function e(e){this.setConfig(e)}return e.prototype.setConfig=function(t){this.config=i(i({},d),t);var n="auto"===this.config.language;this.vocabularies=this.mergeVocabulariesWithDefaultVocabularies(this.config.vocabularies),this.initializeLanguage(this.config.language,n,this.vocabularies),this.defaultLanguage=this.resolveDefaultLanguage(this.language),e.containsLanguage(this.vocabularies,this.language)||(this.language=this.defaultLanguage),this.initializeVocabulary(this.vocabularies)},e.prototype.getConfig=function(){return this.config},e.prototype.setLanguage=function(t){var n=this.language;e.containsLanguage(this.vocabularies,t)?this.language=t:e.containsLanguage(this.vocabularies,t.slice(0,2))?this.language=t.slice(0,2):this.language=this.defaultLanguage,this.initializeVocabulary(this.vocabularies),this.language!==n&&this.config.events.onLanguageChanged.dispatch(this,{newLanguage:this.language,oldLanguage:n})},e.containsLanguage=function(e,t){return e.hasOwnProperty(t)},e.prototype.resolveDefaultLanguage=function(t){if(e.containsLanguage(this.vocabularies,t))return t;if(e.containsLanguage(this.vocabularies,"en"))return"en";var n=Object.keys(this.vocabularies);return n.length>0?n[0]:"en"},e.prototype.mergeVocabulariesWithDefaultVocabularies=function(n){void 0===n&&(n={});var r=i(i({},t.defaultVocabularies),n);return Object.keys(r).reduce(function(o,s){var a,u=r[s];return e.containsLanguage(t.defaultVocabularies,s)&&e.containsLanguage(n,s)&&(u=i(i({},t.defaultVocabularies[s]),n[s])),i(i({},o),((a={})[s]=u,a))},{})},e.prototype.initializeLanguage=function(t,n,i){if(n){var r=window.navigator.language;if(e.containsLanguage(i,r)){this.language=r;return}var o=r.slice(0,2);if(e.containsLanguage(i,o)){this.language=o;return}}this.language=t},e.prototype.initializeVocabulary=function(e){this.vocabulary=["en",this.language].reduce(function(t,n){return i(i({},t),e[n]||{})},{})},e.prototype.replaceVariableWithPlaceholderIfExists=function(e,t){var n=e.match(/{[a-zA-Z0-9]+}/g);return 0===n.length?e:n.map(function(e){return{match:e,key:e.slice(1,-1)}}).reduce(function(e,n){var i=n.key,r=n.match;return t.hasOwnProperty(i)?e.replace(r,t[i]):e},e)},e.prototype.getLocalizer=function(e,t){var n=this;return function(){if(null!=e){var i=n.vocabulary[e];return null==i&&(i=e),null!=t&&(i=n.replaceVariableWithPlaceholderIfExists(i,t)),i}}},e.prototype.performLocalization=function(e){return"function"==typeof e?e():e},e}();t.I18n=p,t.i18n=new p(d)},24834:function(e,t,n){"use strict";
1var i,r=this&&this.__extends||(i=function(e,t){return(i=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])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.WindowOpacitySelectBox=void 0;var o=n(72177),s=n(24379);t.WindowOpacitySelectBox=function(e){function t(t){var n=e.call(this,t)||this;return n.config=n.mergeConfig(t,{cssClasses:["ui-subtitlesettingswindowopacityselectbox"]},n.config),n}return r(t,e),t.prototype.configure=function(t,n){var i=this;e.prototype.configure.call(this,t,n),this.addItem(null,s.i18n.getLocalizer("default")),this.addItem("100",s.i18n.getLocalizer("percent",{value:100})),this.addItem("75",s.i18n.getLocalizer("percent",{value:75})),this.addItem("50",s.i18n.getLocalizer("percent",{value:50})),this.addItem("25",s.i18n.getLocalizer("percent",{value:25})),this.addItem("0",s.i18n.getLocalizer("percent",{value:0})),this.onItemSelectionChanged.subscribe(function(e,t){i.settingsManager.windowOpacity.value=t,i.settingsManager.windowOpacity.isSet()?i.settingsManager.windowColor.isSet()||(i.settingsManager.windowColor.value="black"):i.settingsManager.windowColor.clear()}),this.settingsManager.windowOpacity.onChanged.subscribe(function(e,t){i.selectItem(t.value)}),this.initFromSettings()},t.prototype.initFromSettings=function(){this.settingsManager.windowOpacity.isSet()&&this.selectItem(this.settingsManager.windowOpacity.value)},t}(o.SubtitleSettingSelectBox)},25227:(e,t)=>{"use strict";var n,i;Object.defineProperty(t,"__esModule",{value:!0}),t.UIComponentLayoutOverride=void 0,(i=n||(t.UIComponentLayoutOverride=n={})).Include="include",i.Exclude="exclude"},27082:function(e,t,n){"use strict";var i,r=this&&this.__extends||(i=function(e,t){return(i=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])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.ControlBar=void 0;var o=n(8675),s=n(54959),a=n(92372),u=n(24379),l=n(2652),c=n(52023);t.ControlBar=function(e){function t(t){var n=e.call(this,t)||this;return n.config=n.mergeConfig(t,{cssClass:"ui-controlbar",hidden:!0,role:"region",ariaLabel:u.i18n.getLocalizer("controlBar")},n.config),n}return r(t,e),t.prototype.configure=function(t,n){var i=this;e.prototype.configure.call(this,t,n);var r=0,u=!1;n.getConfig().disableAutoHideWhenHovered&&!l.BrowserUtils.isTouchSupported&&s.UIUtils.traverseTree(this,function(e){e instanceof o.Container||e instanceof a.Spacer||e.onHoverChanged.subscribe(function(e,t){t.hovered?r++:r--})}),l.BrowserUtils.isMobile&&(n.onComponentShow.subscribe(function(e){e instanceof c.SettingsPanel&&(u=!0)}),n.onComponentHide.subscribe(function(e){e instanceof c.SettingsPanel&&(u=!1)})),n.onControlsShow.subscribe(function(){i.show()}),n.onPreviewControlsHide.subscribe(function(e,t){t.cancel=t.cancel||r>0||u}),n.onControlsHide.subscribe(function(){i.hide()})},t}(o.Container)},27172:function(e,t,n){"use strict";var i,r=this&&this.__extends||(i=function(e,t){return(i=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])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__assign||function(){return(o=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};
1Object.defineProperty(t,"__esModule",{value:!0}),t.AudioTrackListBox=void 0;var s=n(14307),a=n(6917),u=n(97440);t.AudioTrackListBox=function(e){function t(t){void 0===t&&(t={});var n="string"==typeof t||"function"==typeof t?{title:t}:t;return e.call(this,o(o({},n),{listSelector:new u.AudioTrackSelectBox(n)}))||this}return r(t,e),t.prototype.configure=function(t,n){e.prototype.configure.call(this,t,n),new a.AudioTrackSwitchHandler(t,this.config.listSelector,n)},t}(s.ListBox)},27717:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StringUtils=void 0;var i,r=n(24379);!function(e){function t(t,i){void 0===i&&(i=e.FORMAT_HHMMSS);var r=t<0;r&&(t=-t);var o=Math.floor(t/3600),s=Math.floor(t/60)-60*o,a=Math.floor(t)%60;return(r?"-":"")+i.replace("hh",n(o,2)).replace("mm",n(s,2)).replace("ss",n(a,2))}function n(e,t){var n=e+"";return"0000000000".substr(0,t-n.length)+n}function i(e,i){/%((0[1-9]\d*(\.\d+(d|f)|d|f)|\.\d+f|d|f)|hh:mm:ss|mm:ss)/.test(i)||(i="%d");var r=0,o=i.match(/(%0[1-9]\d*)(?=(\.\d+f|f|d))/);o&&(r=parseInt(o[0].substring(2)));var s=null,a=i.match(/\.\d*(?=f)/);if(a&&!isNaN(parseInt(a[0].substring(1)))&&(s=parseInt(a[0].substring(1)))>20&&(s=20),i.indexOf("f")>-1){var u="";return(u=null!==s?e.toFixed(s):""+e).indexOf(".")>-1?n(u,u.length+(r-u.indexOf("."))):n(u,r)}if(!(i.indexOf(":")>-1))return n(Math.ceil(e),r);var l=Math.ceil(e);return i.indexOf("hh")>-1?t(l):n(Math.floor(l/60),2)+":"+n(l%60,2)}e.FORMAT_HHMMSS="hh:mm:ss",e.FORMAT_MMSS="mm:ss",e.secondsToTime=t,e.secondsToText=function(e){var t=e<0;t&&(e=-e);var n=Math.floor(e/3600),i=Math.floor(e/60)-60*n,o=Math.floor(e)%60;return(t?"-":"")+(0!==n?"".concat(n," ").concat(r.i18n.performLocalization(r.i18n.getLocalizer("settings.time.hours"))," "):"")+(0!==i?"".concat(i," ").concat(r.i18n.performLocalization(r.i18n.getLocalizer("settings.time.minutes"))," "):"")+"".concat(o," ").concat(r.i18n.performLocalization(r.i18n.getLocalizer("settings.time.seconds")))},e.replaceAdMessagePlaceholders=function(e,t,n,r,o){var s=RegExp("\\{(remainingTime|playedTime|adDuration|adBreakRemainingTime|activeAdIndex|totalAdsCount)(}|%((0[1-9]\\d*(\\.\\d+(d|f)|d|f)|\\.\\d+f|d|f)|hh:mm:ss|mm:ss)})","g");return e.replace(s,function(e){var s,a,u,l,c,d,p,h,f=0;if(e.indexOf("remainingTime")>-1)f="number"==typeof n?Math.ceil(n-t.getCurrentTime()):t.getDuration()-t.getCurrentTime();else if(e.indexOf("playedTime")>-1)f=t.getCurrentTime();else if(e.indexOf("adDuration")>-1)f=t.getDuration();else if(e.indexOf("adBreakRemainingTime")>-1){if(f=0,null==(a=null==(s=t.ads)?void 0:s.isLinearAdActive)?void 0:a.call(s)){var g=t.ads.getActiveAdBreak().ads.findIndex(function(e){return t.ads.getActiveAd().id===e.id});f=t.ads.getActiveAdBreak().ads.slice(g).reduce(function(e,t){return e+(t.isLinear?t.duration:0)},0)-t.getCurrentTime()}}else if(e.indexOf("activeAdIndex")>-1||e.indexOf("totalAdsCount")>-1){if(e.includes("activeAdIndex")){if(null!=r)return i(r,e);var v=null==(l=null==(u=t.ads)?void 0:u.getActiveAdBreak)?void 0:l.call(u),y=null==(d=null==(c=t.ads)?void 0:c.getActiveAd)?void 0:d.call(c),m=null==v?void 0:v.ads;return v&&y&&Array.isArray(m)&&0!==m.length?i(m.findIndex(function(e){return null!=y.id&&null!=e.id?e.id===y.id:e===y})+1,e):i(0,e)}if(null!=o)return i(o,e);var b=null==(h=null==(p=t.ads)?void 0:p.getActiveAdBreak)?void 0:h.call(p),S=null==b?void 0:b.ads;return i(Array.isArray(S)?S.length:0,e)}return i(Math.round(f),e)})}}(i||(t.StringUtils=i={}))},29155:function(e,t,n){"use strict";var i,r=this&&this.__extends||(i=function(e,t){return(i=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])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.VideoQualitySelectBox=void 0;var o=n(46419),s=n(24379);t.VideoQualitySelectBox=function(e){function t(t){void 0===t&&(t={});var n=e.call(this,t)||this;
1return n.config=n.mergeConfig(t,{cssClasses:["ui-videoqualityselectbox"]},n.config),n}return r(t,e),t.prototype.configure=function(t,n){var i=this;e.prototype.configure.call(this,t,n);var r=function(){i.selectItem(t.getVideoQuality().id)},o=function(){var e=t.getAvailableVideoQualities();i.clearItems(),i.hasAuto="progressive"!==t.getStreamType(),i.hasAuto&&i.addItem("auto",s.i18n.getLocalizer("auto"));for(var n=0;n<e.length;n++){var o=e[n];i.addItem(o.id,o.label)}r()};this.onItemSelectionChanged.subscribe(function(e,n){t.setVideoQuality(n)}),t.on(t.exports.PlayerEvent.SourceUnloaded,o),t.on(t.exports.PlayerEvent.PeriodSwitched,o),t.on(t.exports.PlayerEvent.VideoQualityChanged,r),t.exports.PlayerEvent.VideoQualityAdded&&(t.on(t.exports.PlayerEvent.VideoQualityAdded,o),t.on(t.exports.PlayerEvent.VideoQualityRemoved,o)),n.getConfig().events.onUpdated.subscribe(o)},t.prototype.hasAutoItem=function(){return this.hasAuto},t}(o.SelectBox)},30194:function(e,t,n){"use strict";var i,r,o,s=this&&this.__extends||(r=function(e,t){return(r=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])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.Label=t.LabelStyle=void 0;var a=n(86051),u=n(4437),l=n(85704),c=n(24379),d=n(47857);(i=o||(t.LabelStyle=o={})).Text="text",i.TextWithLeadingIcon="text-icon-leading",i.TextWithTrailingIcon="text-icon-trailing",t.Label=function(e){function t(t){void 0===t&&(t={});var n=e.call(this,t)||this;return n.textElement=null,n.labelEvents={onClick:new l.EventDispatcher,onTextChanged:new l.EventDispatcher},n.config=n.mergeConfig(t,{cssClass:"ui-label",labelStyle:o.Text},n.config),n.text=n.config.text,n}return s(t,e),t.prototype.onLanguageChanged=function(){"function"==typeof this.config.text&&this.setText(this.config.text)},t.prototype.toDomElement=function(){var e=this,t=null!=this.config.for?"label":"span",n=new u.DOM("span",{class:this.prefixCss("ui-label-text")},this).html(c.i18n.performLocalization(this.text));this.textElement=n;var i=new u.DOM(t,{id:this.config.id,for:this.config.for,class:this.getCssClasses(),tabindex:this.config.tabIndex.toString()},this);if(i.append(n),i.on("click",function(){e.onClickEvent()}),this.config.labelStyle!==o.Text){var r=new d.Icon;switch(this.config.labelStyle){case o.TextWithTrailingIcon:i.append(r.getDomElement());break;case o.TextWithLeadingIcon:i.prepend(r.getDomElement())}}return i},t.prototype.setText=function(e){if(e!==this.text||"function"==typeof e){this.text=e;var t,n=c.i18n.performLocalization(e);null==(t=this.textElement)||t.html(c.i18n.performLocalization(e)),this.onTextChangedEvent(n)}},t.prototype.getText=function(){return c.i18n.performLocalization(this.text)},t.prototype.clearText=function(){var e;null==(e=this.textElement)||e.html(""),this.onTextChangedEvent(null)},t.prototype.isEmpty=function(){return!this.text},t.prototype.onClickEvent=function(){this.labelEvents.onClick.dispatch(this)},t.prototype.onTextChangedEvent=function(e){this.labelEvents.onTextChanged.dispatch(this,e)},Object.defineProperty(t.prototype,"onClick",{get:function(){return this.labelEvents.onClick.getEvent()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onTextChanged",{get:function(){return this.labelEvents.onTextChanged.getEvent()},enumerable:!1,configurable:!0}),t}(a.Component)},32354:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NodeEventSubscriber=void 0,t.NodeEventSubscriber=function(){function e(){this.attachedListeners=new Map}return e.prototype.getEventListenersOfType=function(e){return this.attachedListeners.has(e)||this.attachedListeners.set(e,[]),this.attachedListeners.get(e)},e.prototype.on=function(e,t,n,i){e.addEventListener(t,n,i),this.getEventListenersOfType(t).push([e,n,i])},e.prototype.off=function(e,t,n,i){var r=this.getEventListenersOfType(t),o=r.findIndex(function(t){var r=t[0],o=t[1],s=t[2];return r===e&&o===n&&s===i});e.removeEventListener(t,n,i),o>-1&&r.splice(o,1)},e.prototype.release=function(){var e=this;
1this.attachedListeners.forEach(function(t,n){t.forEach(function(t){var i=t[0],r=t[1],o=t[2];e.off(i,n,r,o)})}),this.attachedListeners.clear()},e}()},32400:function(e,t,n){"use strict";var i,r=this&&this.__extends||(i=function(e,t){return(i=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])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.AdStatusOverlay=void 0;var o=n(8675),s=n(57221),a=n(92372);t.AdStatusOverlay=function(e){function t(t){void 0===t&&(t={});var n=e.call(this,t)||this;return n.adSkipButton=new s.AdSkipButton,n.config=n.mergeConfig(t,{components:[new o.Container({components:[new a.Spacer,n.adSkipButton],cssClasses:["bar"]})],cssClass:"ui-ad-status-overlay"},n.config),n}return r(t,e),t.prototype.configure=function(t,n){e.prototype.configure.call(this,t,n)},t}(o.Container)},33278:function(e,t,n){"use strict";var i,r=this&&this.__extends||(i=function(e,t){return(i=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])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.VRToggleButton=void 0;var o=n(67598),s=n(24379);t.VRToggleButton=function(e){function t(t){void 0===t&&(t={});var n=e.call(this,t)||this;return n.config=n.mergeConfig(t,{cssClass:"ui-vrtogglebutton",text:s.i18n.getLocalizer("vr")},n.config),n}return r(t,e),t.prototype.configure=function(t,n){var i=this;e.prototype.configure.call(this,t,n);var r=function(){var e=t.getSource();return e&&!!e.vr},o=function(){var e=t.getSource();return t.vr&&!!e.vr},s=function(e){(e.type!==t.exports.PlayerEvent.Warning||e.code===t.exports.WarningCode.VR_RENDERING_ERROR)&&(r()&&o()?(i.show(),t.vr&&t.vr.getStereo()?i.on():i.off()):i.hide())},a=function(){r()?i.show():i.hide()};t.on(t.exports.PlayerEvent.VRStereoChanged,s),t.on(t.exports.PlayerEvent.Warning,s),t.on(t.exports.PlayerEvent.SourceUnloaded,a),n.getConfig().events.onUpdated.subscribe(a),this.onClick.subscribe(function(){o()?t.vr&&t.vr.getStereo()?t.vr.setStereo(!1):t.vr.setStereo(!0):console&&console.log("No VR content")}),a()},t}(o.ToggleButton)},33624:function(e,t,n){"use strict";var i,r=this&&this.__extends||(i=function(e,t){return(i=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])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.SettingsPanelPageOpenButton=void 0;var o=n(22505),s=n(24379);t.SettingsPanelPageOpenButton=function(e){function t(t){var n=e.call(this,t)||this;return n.config=n.mergeConfig(t,{cssClass:"ui-settings-panel-navigation-text-button",text:s.i18n.getLocalizer("settings.subtitles.options"),role:"menuitem"},n.config),n}return r(t,e),t.prototype.configure=function(t,n){var i=this;e.prototype.configure.call(this,t,n),this.getDomElement().attr("aria-haspopup","true"),this.getDomElement().attr("aria-owns",this.config.targetPage.getConfig().id),this.onClick.subscribe(function(){i.pushTargetPage()})},t}(o.SettingsPanelPageNavigatorButton)},34164:function(e,t,n){"use strict";var i,r=this&&this.__extends||(i=function(e,t){return(i=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])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});
1Object.defineProperty(t,"__esModule",{value:!0}),t.BackgroundColorSelectBox=void 0;var o=n(72177),s=n(24379);t.BackgroundColorSelectBox=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 r(t,e),t.prototype.configure=function(t,n){var i=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")),this.onItemSelectionChanged.subscribe(function(e,t){i.settingsManager.backgroundColor.value=t}),this.settingsManager.backgroundColor.onChanged.subscribe(function(e,t){i.settingsManager.backgroundColor.isSet()?i.settingsManager.backgroundOpacity.isSet()||(i.settingsManager.backgroundOpacity.value="100"):i.settingsManager.backgroundOpacity.clear(),i.selectItem(t.value),i.setColorAndOpacity()}),this.settingsManager.backgroundOpacity.onChanged.subscribe(function(){i.setColorAndOpacity()}),this.initFromSettings()},t.prototype.initFromSettings=function(){this.settingsManager.backgroundColor.isSet()&&(this.selectItem(this.settingsManager.backgroundColor.value),this.setColorAndOpacity())},t.prototype.setColorAndOpacity=function(){this.settingsManager.backgroundColor.isSet()&&this.settingsManager.backgroundOpacity.isSet()?this.toggleOverlayClass("bgcolor-"+this.settingsManager.backgroundColor.value+this.settingsManager.backgroundOpacity.value):this.toggleOverlayClass(null)},t}(o.SubtitleSettingSelectBox)},34594:function(e,t,n){"use strict";var i,r=this&&this.__extends||(i=function(e,t){return(i=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])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.InteractiveContextMenuItem=void 0,t.InteractiveContextMenuItem=function(e){function t(t){var n=e.call(this,t)||this;return n.contextMenu=null,n.config=n.mergeConfig(t,{cssClass:"ui-interactive-context-menu-item",role:"menuitem",tabIndex:0,closeContextMenuOnAction:!1,addSettingAsComponent:!1,isSetting:!1},n.config),n}return r(t,e),t.prototype.setContextMenu=function(e){this.contextMenu=e},t.prototype.onClickEvent=function(){this.closeContextMenuForAction(),e.prototype.onClickEvent.call(this)},t.prototype.closeContextMenuForAction=function(){var e;this.config.closeContextMenuOnAction&&(null==(e=this.contextMenu)||e.hide())},t}(n(78196).InteractiveSettingsPanelItem)},34664:(e,t)=>{"use strict";var n,i,r;Object.defineProperty(t,"__esModule",{value:!0}),t.Guid=void 0,i=n||(t.Guid=n={}),r=1,i.next=function(){return r++}},37090:e=>{!function(){"use strict";self,e.exports=(self.webpackChunkbitmovin_player=self.webpackChunkbitmovin_player||[]).push([[737],{1765:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.BufferMimeCodecMap=void 0;var i=n(77753),r=n(91678),o=n(46151),s=n(33436),a=n(94685),u=n(85434);t.BufferMimeCodecMap=function(){function e(e,t){this.gV={},this.hV=e,this.iV=t}return e.prototype.jV=function(e){var t,n,s=null==(t=this.hV)?void 0:t.getState();(0,i.isInstanceState)(s)&&l(this.iV)&&((0,o.getMetricsState)(s)[e]||null==(n=this.hV)||n.dispatch((0,r.initializeMetricsForMimeType)(e,this.iV)))},e.prototype.kV=function(e){var t;null==(t=this.hV)||t.dispatch((0,r.removeMetricsForMimeType)(e))},e.prototype.add=function(e,t){var n;this.gV[e]=t,this.jV(e),null==(n=this.hV)||n.dispatch((0,r.addMetricsValue)(e,s.MetricType.StalledSeconds,0))},e.prototype.remove=function(e){var t=this,n=u.MimeTypeHelper.getMediaType(e);
vendor: 14,216 bytes, line 1
1Object.keys(this.gV).forEach(function(e){u.MimeTypeHelper.getMediaType(e)===n&&(t.kV(e),delete t.gV[e])})},e.prototype.has=function(e,t){var n=this,i=u.MimeTypeHelper.getMediaType(e),r=u.MimeTypeHelper.extractContainerType(e);return Object.keys(this.gV).some(function(o){var s=u.MimeTypeHelper.getMediaType(o),a=u.MimeTypeHelper.extractContainerType(o);return s===i&&a===r&&t===n.gV[e]})},e.prototype.update=function(e,t){this.remove(e),this.add(e,t)},e.prototype.forEach=function(e){var t=this;Object.keys(this.entries()).forEach(function(n){return e(n,t.entries()[n])})},e.prototype.entries=function(){return this.gV},e.prototype.dispose=function(){this.gV={},this.hV=void 0,this.iV=void 0},e}();var l=function(e){return(0,a.isObject)(e)}},98331:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.GapHandler=void 0;var i=n(3714),r=n(77753),o=n(87827),s=n(86897),a=n(15971),u=n(21513),l=n(85434),c=n(15487),d=n(60877),p=n(88844),h=n(19274),f=n(80354),g=n(82889),v=[h.MediaElementEvent.seeking,h.MediaElementEvent.seeked,h.MediaElementEvent.pause,h.MediaElementEvent.playing,h.MediaElementEvent.error];function y(e,t){return e.find(function(e){return e.start-g.Ranges.TIME_FUDGE_FACTOR>=t})}t.GapHandler=function(){function e(e){var t,n,u=this;this.vV=!1,this.play=function(){u.wV=Date.now()},this.AV=function(){if(!u.lV.isDisposed&&void 0!==u.mV){var e=u.mV.paused,t=u.mV.seeking,n=u.RV(u.mV.currentTime),i=u.zV(),r=u.yV();e||t&&!n||i||(u.oV++,r||u.BV())}},this.BV=function(){var e,t=u.lV.store.getState();if((0,r.isInstanceState)(t)&&u.mV){var n=(0,o.getPlayerState)(t);((0,o.getIsSeeking)(n)||(null==(e=u.mV)?void 0:e.seeking))&&!u.RV(u.mV.currentTime)||u.OV()}},this.CV=function(){var e=(0,a.getSourceState)(u.lV);e&&!(0,s.getIsTimestampRollingOver)(e)&&u.OV()},this.DV=function(){u.uV=void 0},this.HV=function(){if(u.rV=Date.now(),u.mV&&!u.mV.paused&&!u.mV.seeking){u.tV||(u.xV(),u.tV=!0);var e=u.lV.renderer.getCurrentTime(!0);if(u.EV(e))u.GV();else{var t=u.lV.renderer.getVideoElementBufferedRanges();if(t.length>1&&!u.uV){var n=u.lV.settings.MIN_SIZE_FOR_GAP_SKIPPING;u.uV=function(e,t,n){for(var i=0;i<e.length-1;i++){var r=e[i].end,o=e[i+1].start;if(r>t&&o>r&&o-r>=n)return{start:r,end:o}}}(t,e,n)}else u.FV(e)?(u.nV++,u.BV()):e===u.pV?u.nV++:(u.nV=0,u.oV=0,u.pV=e)}}},this.IV=function(){u.nV=0,u.oV=0,(0,p.clearTimeoutIfDefined)(u.qV),u.qV=-1},this.JV=function(e){if(u.mV&&!u.vV){var t=u.lV.renderer.getVideoElementBufferedRanges().sort(function(e,t){return e.start-t.start}),n=u.lV.renderer.getCurrentTime(!0),i=y(t,n);if(u.nV=0,u.oV=0,u.qV=-1,void 0!==i&&n===e){var r=i.start;u.lV.logger.debug("Skipping gap from ".concat(n," to ").concat(r)),u.KV(n,r)}}},this.lV=e,this.mV=e.videoElement,this.rV=0,this.nV=0,this.oV=0,this.wV=0,this.tV=!1,this.uV=void 0,null==(t=this.mV)||t.addEventListener(h.MediaElementEvent.timeupdate,this.HV),null==(n=this.mV)||n.addEventListener(h.MediaElementEvent.play,this.play),this.lV.eventHandler.on(i.PlayerEvent.Seek,this.DV)}return e.prototype.xV=function(){var e,t,n;null==(e=this.mV)||e.addEventListener(h.MediaElementEvent.waiting,this.BV),null==(t=this.mV)||t.addEventListener(h.MediaElementEvent.stalled,this.CV);for(var i=0;i<v.length;i++){var r=v[i];null==(n=this.mV)||n.addEventListener(r,this.IV)}this.sV=window.setInterval(this.AV,250)},e.prototype.yV=function(){return Date.now()-this.wV<500},e.prototype.zV=function(){return Date.now()-this.rV<=1e3},e.prototype.EV=function(e){var t,n,i;return!(!this.uV||this.vV)&&(e>(t=this.uV).start&&e<t.end||(n=this.lV.settings.PROACTIVE_GAP_SKIP_DISTANCE_SECONDS,i=this.uV,!(n<=0)&&i.start>e&&i.start-n<=e)||e>this.uV.end&&(0,d.shouldResetCurrentTimeAfterBufferUnderrun)())},e.prototype.FV=function(e){return 5===this.nV&&e===this.pV},e.prototype.GV=function(){if(this.mV&&this.uV){var e=this.lV.renderer.getCurrentTime(!0),t=Math.max(e+.01,this.uV.end);this.lV.logger.debug("Skipping gap proactively from ".concat(e," to ").concat(t)),this.KV(e,t)}},e.prototype.KV=function(e,t){var n=this;this.vV=!0,this.uV=void 0,this.LV(e,t).then(function(){return n.lV.renderer.setCurrentTime(t+g.Ranges.TIME_FUDGE_FACTOR)}).then(function(t){return n.lV.logger.debug("Jumped buffer gap from ".concat(e," to ").concat(t))}).catch(function(i){return n.lV.logger.debug("Failed to skip buffer gap from ".concat(e," to ").concat(t),i)}).finally(function(){n.vV=!1,n.uV=void 0})},e.prototype.LV=function(e,t){if(!(0,u.getCapabilities)().isTizen)return Promise.resolve();var n=this.MV();if(void 0===n)return Promise.resolve();var i=y(this.lV.renderer.getBufferedRanges(n).sort(function(e,t){return e.start-t.start}),e);return t!==(null==i?void 0:i.start)?(this.lV.logger.debug("Clearing video data from ".concat(e," to ").concat(t," to ensure gap can be skipped")),this.lV.renderer.removeData(n,e,t)):Promise.resolve()},e.prototype.MV=function(){var e;return null==(e=this.lV.segmentInfoService)?void 0:e.getSegmentControllerMimeTypes().find(function(e){return l.MimeTypeHelper.isVideo(e)})},e.prototype.NV=function(e,t,n){for(var i=g.Ranges.findGaps(e,n),r=0;r<i.length;r++){var o=i.start(r),s=i.end(r);if(t-o<4&&t-o>2)return{start:o,end:s}}},e.prototype.OV=function(){if(!(this.qV>-1)&&this.tV&&this.mV){var e=this.mV.buffered,t=this.mV.currentTime,n=g.Ranges.findNextRange(e,t),i=this.lV.settings.MIN_SIZE_FOR_GAP_SKIPPING;if(0===n.length){var r=this.NV(e,t,i);if(r)return this.lV.logger.debug("Encountered a gap in video from ".concat(r.start," to ").concat(r.end,". Seeking to ").concat(t,"...")),this.oV=0,void this.SV(t);var o=(0,f.findNextRangeForGap)(t,e),s=o.isNearEndOfBufferedRange,a=o.nextRangeStart;return s&&isFinite(a)?(this.lV.logger.debug("Playback stalled because of a very small gap. Seeking to ".concat(a,"...")),this.oV=0,void this.SV(a)):void(this.oV>10&&(this.oV=0,this.PV(t,this.mV)))}if(!function(e,t,n){if(0===n)return!1;var i=g.Ranges.findNextRange(e,t);if(0===i.length)return!1;var r=g.Ranges.findRangeForTime(e,t),o=r.length?r.end(0):t;return i.start(0)-o<n}(e,t,i)){var u=n.start(0)-t;this.lV.logger.debug("setTimer: stopped at: ".concat(t,", setting timer for: ").concat(u,", seeking to: ").concat(n.start(0))),this.qV=window.setTimeout(this.JV.bind(this),u,this.lV.renderer.getCurrentTime(!0))}}},e.prototype.PV=function(e,t){this.lV.logger.debug("currentTime not advancing from ".concat(e," although the video element is neither paused nor seeking")),this.QV(e,t),t.eventHandler.triggerEvent(h.MediaElementEvent.currenttimenotadvancing)},e.prototype.QV=function(e,t){var n=(0,u.getCapabilities)(),i=n.isSafari,r=n.isTizen,o=n.isWpeWebKit;e>t.duration&&!i?this.SV(t.duration):this.lV.settings.QJY_BROWSER_WORKAROUND||r||(0,c.isWebOs2016)()||(0,c.isWebOs2018Or2019)()||(0,c.isWebOs2022OrNewer)()||o?this.SV(e+.01):this.SV(e)},e.prototype.RV=function(e){if(!this.mV)return!1;for(var t=this.mV.buffered,n=0;n<t.length;n++)if(t.end(n)===e)return!0;return!1},e.prototype.shutdown=function(){var e,t,n,r,o;null==(e=this.mV)||e.removeEventListener(h.MediaElementEvent.waiting,this.BV),null==(t=this.mV)||t.removeEventListener(h.MediaElementEvent.stalled,this.CV),null==(n=this.mV)||n.removeEventListener(h.MediaElementEvent.timeupdate,this.HV),null==(r=this.mV)||r.removeEventListener(h.MediaElementEvent.play,this.play),this.lV.eventHandler.off(i.PlayerEvent.Seek,this.DV);for(var s=0;s<v.length;s++){var a=v[s];null==(o=this.mV)||o.removeEventListener(a,this.IV)}(0,p.clearIntervalIfDefined)(this.sV),this.IV()},e.prototype.SV=function(e){if(this.mV&&this.mV.currentTime!==e)try{this.mV.currentTime=e}catch(t){this.lV.logger.debug("GapHandler failed to set currentTime on video element to ".concat(e),t)}},e}()},80354:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.findNextRangeForGap=function(e,t){for(var n=!1,r=1/0,o=0;o<t.length;o++){var s=t.start(o),a=t.end(o),u=e+2*i.Ranges.TIME_FUDGE_FACTOR;if(n&&!isFinite(r)){r=s;break}s<e&&a>e&&u>a&&(n=!0)}return{isNearEndOfBufferedRange:n,nextRangeStart:r}};var i=n(82889)},79323:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.MSERenderer=void 0;var i=n(4524),r=n(66790),o=n(40306),s=n(3336),a=n(80813),u=n(3714),l=n(44468),c=n(33468),d=n(7387),p=n(23690),h=n(15971),f=n(21513),g=n(93204),v=n(94685),y=n(34841),m=n(78877),b=n(87244),S=n(84568),E=n(85434),_=n(23068),T=n(19274),P=n(68925),C=n(86897),A=n(1765),w=n(98331),k=n(48873),O=n(65940),M=n(10344);t.MSERenderer=function(){function e(e){var t=this;this.context=e,this.Ms=0,this.waitingForSeekedPromise=null,this.Xs=function(e){t.setCurrentTimeDelayedContext&&t.setCurrentTimeDelayedContext.time!==e.seekTarget&&Math.abs(t.setCurrentTimeDelayedContext.time-e.seekTarget)>=t.context.settings.GAP_TOLERANCE&&t.cancelSetCurrentTimeDelayed()},this.reOpenMse=function(){var e=t.segmentQueueMimeTypes;if(e.length<1)return Promise.resolve();var n=e.find(function(e){return t.Ns.hasOwnProperty(e)});return n?t.setTimestampOffset(n,t.Ns[n]):t.setTimestampOffset(e[0],0)},this.Ys=function(){if(t.video){var e=t.video.isPictureInPicture()?l.ViewMode.PictureInPicture:l.ViewMode.Inline;t.context.store.dispatch((0,p.setPlayerViewMode)(e))}},this.Zs=function(e){e.time&&e.time>0&&(t.Ms=0)},this.postBufferRemoval=function(e,n,i){t.logger.debug("successfully removed buffer for ".concat(e," (from ").concat(n," to ").concat(i,")"))},this.gs=(0,S.memoize)(this.hs.bind(this)),this.logger=e.logger,this.video=e.videoElement,this.settings=e.settings,this.Gs=Promise.resolve(),this.eventHandler=void 0,this.Ns={},this.Hs=new A.BufferMimeCodecMap(e.store,e.settings),this.savedCurrentTime=void 0,this.playerEventHandler=e.eventHandler,this.shutdownPromise=Promise.resolve(),this.init(!0)}return e.prototype.createMSEWrapper=function(){return new k.MSEWrapper(this.context)},e.prototype.Us=function(e){return e?this.Ws():this.Vs()},e.prototype.Vs=function(){var e=this;return function(){var t;return null==(t=e.mse)?void 0:t.createNewMSE()}},e.prototype.Ws=function(){var e,t=null==(e=this.mse)?void 0:e.createNewMSE();return function(){return t}},e.prototype.init=function(e){var t=this;this.Ps=Promise.resolve(),this.mse=this.createMSEWrapper(),this.Gs=this.Gs.catch(function(e){return t.context.logger.debug("Caught error during MSE recreation",e)}).then(this.Us(e)),this.Js=!0,this.segmentQueues={},this.setCurrentTimeContext=void 0,this.setCurrentTimeDelayedContext=void 0,this.Qs=new Map,this.Rs=new Map,this.Ls=new w.GapHandler(this.context),null==this.eventHandler&&this.video&&(this.eventHandler=new M.VideoEventHandler(this.video),this.eventHandler.on(T.MediaElementEvent.timeupdate,this.Zs)),this.on(T.MediaElementEvent.webkitpresentationmodechanged,this.Ys),this.playerEventHandler.on(u.PlayerEvent.Seek,this.Xs)},e.prototype.trackRendererError=function(e){this.Ms++,this.Ms>=this.settings.MAX_CONSECUTIVE_RENDERER_ERRORS&&this.context.eventHandler.fireError(new s.PlayerError(o.ErrorCode.PLAYBACK_VIDEO_DECODING_ERROR,{codec:e.getCodec(),mimeType:e.getMimeType(),segmentUrl:e.getUrl()},"Failed to append the segment to the buffer. The MSE has thrown an error.",this.context.sourceContext.sourceIdentifier))},e.prototype.hasSourceBuffers=function(){return this.segmentQueueMimeTypes.length>0},e.prototype.hasDataInSourceBuffers=function(){var e=this.mse;return!(!e||!this.hasSourceBuffers())&&this.segmentQueueMimeTypes.every(function(t){return e.getBufferedRanges(t).length>0})},e.prototype.updateRendererRangesInStore=function(e){var t;null==(t=(0,h.getSourceStore)(this.context))||t.dispatch((0,P.setRendererRanges)(e,this.getOverallBufferedRanges(e)))},e.prototype.addBuffer=function(e,t){var n,i=this;if(!this.mse)return!1;this.Hs.add(e,t);var r=!!this.mse.addBuffer(e,t,function(){return i.updateRendererRangesInStore(e)});return r&&(this.mse.addUpdateEndCallback(e,function(){var t;return null==(t=i.setCurrentTimeDelayedContext)||t.reevaluateDataInBuffer(),i.Qs.set(e,!1)}),this.segmentQueues[e]=[],null==(n=(0,h.getSourceStore)(this.context))||n.dispatch((0,P.setRendererRanges)(e,[]))),r},e.prototype.addDrmInitData=function(e){if(null==e?void 0:e.length){var t=this.drmService;t?e.forEach(function(e){return t.addInitData(e)}):this.context.logger.debug("PSSH data found but DRM is not configured")}},e.prototype.storeDrmInitDataFromManifest=function(e){var t=this;e&&this.context.serviceManager.maybeCall(a.ServiceName.ManifestService,function(n){var i=n.getContentProtectionForAdaptationSet(e).flatMap(function(e){var n=c.KeySystemKind[e.name.toUpperCase()],i=e.schemeIdUri.replace("urn:uuid:","").replace(/-/g,"");return(e.pssh||[]).map(function(r,o){return t.logger.insane("adding pssh for ".concat(e.name," : ").concat(r)),{initData:e.psshData[o],initDataStr:r,systemID:e.schemeIdUri,systemIDraw:i,systemName:n,kid:[]}})});t.addDrmInitData(i)},void 0,this.context.sourceContext.sourceIdentifier)},e.prototype.appendData=function(e){var t=this;return this.addDrmInitData(e.getDrmInitData()),this.addSegmentToSegmentQueue(e),this.Ps=this.Ps.catch(function(){}).then(function(){return t.processSegmentQueues()}),this.Ps},e.prototype.addSegmentToSegmentQueue=function(e){var t=e.getMimeType();this.segmentQueues[t]?(this.segmentQueues[t].push(e),this.updateRendererRangesInStore(t)):this.logger.debug("Renderer missing segment queue for mimeType(".concat(t,") but trying to push segment.(url=").concat(e.getUrl(),")"))},e.prototype.getBufferedRanges=function(e){var t,n;return null!=(n=null==(t=this.mse)?void 0:t.getBufferedRanges(e))?n:[]},e.prototype.getVideoElementBufferedRanges=function(){return(0,i.getBufferedRanges)(this.video)},e.prototype.getOverallBufferedRanges=function(e){if(!this.mse||!this.segmentQueues.hasOwnProperty(e))return[];var t=i.BufferRangeHelper.getRangesFromQueue(this.segmentQueues[e],this.settings.GAP_TOLERANCE);return t=t.concat(this.getBufferedRanges(e)),i.BufferRangeHelper.mergeRanges(t,this.settings.GAP_TOLERANCE)},e.prototype.isDataBeingAppended=function(e){return!!this.mse&&(this.segmentQueues&&this.segmentQueues[e]&&this.segmentQueues[e].length>0||this.mse.isAnyBufferUpdating())},e.prototype.bs=function(e){var t=(0,h.getSourceState)(this.context);if(!t)return[];var n=(0,C.getBufferStateMap)(t);return n?(0,C.getRendererBufferedRanges)(n,e):[]},e.prototype.getEndOfBufferTime=function(){var e=this,t=[];
1if(this.segmentQueueMimeTypes.forEach(function(n){var i=e.bs(n);if(i.length>0){var r=i[i.length-1].end;t.push(r)}}),0!==t.length)return Math.min.apply(Math,t)},e.prototype.removeDataFromSegmentQueues=function(e,t,n){var i=this;void 0===t&&(t=-1/0),void 0===n&&(n=1/0),this.segmentQueues.hasOwnProperty(e)&&(this.segmentQueues[e]=this.segmentQueues[e].filter(function(r){var o=r.getDuration(),s=r.getPlaybackTime(),a=r.getRepresentationId().representationId,u=r.isInit()||s<t||s+o>n;return i.logger.debug("[MSERenderer][".concat(e,"][").concat(a,"] Removing segment from queue [").concat(!u,"]. ")+"Clearing from ".concat(t," to ").concat(n,". Segment: [playbackTime=").concat(r.getPlaybackTime(),", ")+"duration=".concat(r.getDuration(),", url=").concat(r.getUrl(),"]")),u}),this.updateRendererRangesInStore(e))},e.prototype.removeData=function(e,t,n,i){return void 0===i&&(i=!1),this.mse?(void 0!==t||void 0!==n||i||this.saveCurrentTime(),this.removeDataFromSegmentQueues(e,t,n),this.mse.removeFromBuffer(e,t,n,this.postBufferRemoval)):Promise.reject()},e.prototype.getDroppedVideoFrames=function(){var e,t,n,i,r;return null!=(r=null!=(n=null==(t=null==(e=this.video)?void 0:e.getVideoPlaybackQuality())?void 0:t.droppedVideoFrames)?n:null==(i=this.video)?void 0:i.droppedVideoFrames)?r:0},e.prototype.setPlaybackSpeed=function(e){this.video&&!isNaN(e)&&e>0&&e!==this.video.playbackRate&&(this.video.playbackRate=e)},e.prototype.getPlaybackSpeed=function(){var e,t;return null!=(t=null==(e=this.video)?void 0:e.playbackRate)?t:1},e.prototype.setVolume=function(e){this.video&&!isNaN(e)&&(this.video.volume=Math.min(e/100,1))},e.prototype.getVolume=function(){var e,t;return 100*(null!=(t=null==(e=this.video)?void 0:e.volume)?t:1)},e.prototype.mute=function(){this.video&&(this.video.muted=!0)},e.prototype.unmute=function(){this.video&&(this.video.muted=!1)},e.prototype.isMuted=function(){var e,t;return null!=(t=null==(e=this.video)?void 0:e.muted)&&t},e.prototype.play=function(){var e=this;return this.video?this.video.play().catch(function(t){if((0,b.isSwitchingBufferBlocks)((0,h.getSourceStore)(e.context)))return e.ready().then(function(){return e.ds()});throw t}):Promise.resolve()},e.prototype.cs=function(){return!!this.video&&!this.video.paused&&!this.video.seeking&&this.video.readyState>=HTMLMediaElement.HAVE_FUTURE_DATA},e.prototype.ds=function(){var e,t=this;if(!this.video||!this.eventHandler)return Promise.resolve();if(this.Ss){var n=this.Ss;return this.cs()&&(null==(e=this.Ts)||e.call(this)),n}return this.cs()?Promise.resolve():(this.Ss=new Promise(function(e){var n=function(){t.off(T.MediaElementEvent.playing,n),t.off(T.MediaElementEvent.pause,n),t.Ss=void 0,t.Ts=void 0,e()};t.Ts=n,t.on(T.MediaElementEvent.playing,n),t.on(T.MediaElementEvent.pause,n)}),this.Ss)},e.prototype.pause=function(){this.video&&this.video.pause()},e.prototype.end=function(){this.pause(),this.cancelSetCurrentTimeDelayed()},e.prototype.isPaused=function(){var e,t;return null==(t=null==(e=this.video)?void 0:e.paused)||t},e.prototype.setDuration=function(e){this.mse&&(e=Math.floor(1e4*e)/1e4,this.Ks=e,this.mse.setDuration(e))},e.prototype.getDuration=function(){var e,t;return null!=(t=null==(e=this.video)?void 0:e.duration)?t:NaN},e.prototype.setCurrentTime=function(e){var t=this;if(!this.mse)return Promise.reject("MSE is not open");if(e=Math.ceil(100*e)/100,this.setCurrentTimeContext){if(this.setCurrentTimeContext.time===e)return this.setCurrentTimeContext.promise;this.cancelSetCurrentTimeDelayed()}var n=Promise.resolve();this.isMSEOpen()||this.ls(e)||(this.logger.debug("reopen MSE on setCurrentTime"),n=this.reOpenMse());var i=n.then(function(){return t.setCurrentTimeInternal(e).catch(function(n){return t.logger.debug("could not set time ".concat(e," on video element"),n),t.getCurrentTime()}).finally(function(){return t.Js=!1})});return this.setCurrentTimeContext={time:e,isInitialSeek:this.Js,promise:i},i},e.prototype.getCurrentVideoTime=function(){var e,t;return null!=(t=null==(e=this.video)?void 0:e.currentTime)?t:0},e.prototype.getCurrentFallbackTime=function(){var e=this.setCurrentTimeContext;return e&&e.isInitialSeek&&-1!==e.time?e.time:void 0!==this.savedCurrentTime&&this.es()?this.savedCurrentTime:(this.savedCurrentTime=void 0,this.getCurrentVideoTime())},e.prototype.es=function(){var e;return!this.hasDataInSourceBuffers()&&!(null==(e=this.mse)?void 0:e.isBufferRemovalPending())||!(!(0,b.isSwitchingBufferBlocks)((0,h.getSourceStore)(this.context))&&this.ls(this.getCurrentVideoTime()))},e.prototype.getCurrentTime=function(e){return void 0===e&&(e=!1),e?this.getCurrentVideoTime():this.getCurrentFallbackTime()},e.prototype.getSnapshotData=function(e,t){void 0===t&&(t=1);try{if(!this.video)return;var n=this.video.videoWidth,i=this.video.videoHeight;this.Os||(this.Os=document.createElement("canvas"),this.Os.id="snapshotHiddenCanvas"),this.Os.width=n,this.Os.height=i;var r=this.Os.getContext("2d");null==r||r.drawImage(this.video.getWrappedElement(),0,0,n,i);var o=void 0;return("image/jpeg"===e||"image/webp"===e)&&(t=Math.max(t,0),t=Math.min(t,1)),o=this.Os.toDataURL(e,t),{height:i,width:n,data:o}}catch(e){return void(e&&e.message?this.logger.debug("Snapshot acquisition failed: "+e.message):this.logger.debug("Snapshot acquisition failed"))}},e.prototype.fs=function(){return this.drmService?this.drmService.shutdownPromise:Promise.resolve()},e.prototype.ready=function(){var e=this;return this.shutdownPromise.then(function(){return e.fs()}).then(function(){return e.mse||e.init(!1),e.Gs})},e.prototype.setTimestampOffset=function(e,t){var n=this;return this.mse?this.mse.setTimestampOffset(e,t).then(function(){n.Ns[e]=t}):Promise.resolve()},e.prototype.shutdown=function(e){var t,n,i=this;if(e||null==(t=this.Ts)||t.call(this),!this.mse)return this.shutdownPromise;
1for(var r in this.waitingForSeekedPromise=null,e&&this.saveCurrentTime(),this.segmentQueues)this.segmentQueues.hasOwnProperty(r)&&(delete this.segmentQueues[r],null==(n=(0,h.getSourceStore)(this.context))||n.dispatch((0,P.setRendererRanges)(r,[])));var o=this.mse;return this.shutdownPromise=this.shutdownPromise.then(function(){return o.tearDownMediaSource()}).catch(function(e){i.logger.debug("Could not tear down media source",{err:e,message:e.message})}),this.mse=void 0,this.cancelSetCurrentTimeDelayed(),this.Ls&&(this.Ls.shutdown(),this.Ls=void 0),this.eventHandler&&!e&&(this.eventHandler.dispose(),this.eventHandler=void 0),this.Qs.clear(),this.Rs.clear(),this.shutdownPromise},e.prototype.canReuseMse=function(){var e,t;return null!=(t=null==(e=this.mse)?void 0:e.isReusable())&&t},e.prototype.clearSegmentQueues=function(){var e;for(var t in this.segmentQueues)this.segmentQueues.hasOwnProperty(t)&&(this.segmentQueues[t]=[],null==(e=(0,h.getSourceStore)(this.context))||e.dispatch((0,P.setRendererRanges)(t,[])))},e.prototype.resetSeekState=function(){this.waitingForSeekedPromise=null,this.cancelSetCurrentTimeDelayed(),this.setCurrentTimeContext=void 0,this.savedCurrentTime=0},e.prototype.release=function(){var e,t;for(var n in this.segmentQueues)this.segmentQueues.hasOwnProperty(n)&&null!==this.mse&&(delete this.segmentQueues[n],null==(e=(0,h.getSourceStore)(this.context))||e.dispatch((0,P.setRendererRanges)(n,[])));return this.Hs.dispose(),this.mse&&this.mse.dispose(),this.Gs=Promise.resolve(),this.Ns={},this.cancelSetCurrentTimeDelayed(),this.Ls&&(this.Ls.shutdown(),this.Ls=void 0),this.off(T.MediaElementEvent.webkitpresentationmodechanged,this.Ys),null==(t=this.Ts)||t.call(this),this.eventHandler&&(this.eventHandler.off(T.MediaElementEvent.timeupdate,this.Zs),this.eventHandler.dispose(),this.eventHandler=void 0),this.waitingForSeekedPromise=null,this.playerEventHandler.off(u.PlayerEvent.Seek,this.Xs),this.gs.invalidate(),this.fs()},e.prototype.on=function(e,t){var n;null==(n=this.eventHandler)||n.on(e,t)},e.prototype.off=function(e,t){this.eventHandler&&this.eventHandler.off(e,t)},Object.defineProperty(e.prototype,"drmService",{get:function(){var e;return null==(e=this.context.serviceManager)?void 0:e.get(a.ServiceName.DrmService)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"segmentQueueMimeTypes",{get:function(){return Object.keys(this.segmentQueues)},enumerable:!1,configurable:!0}),e.prototype.setDrmConfig=function(e,t){return this.drmService?this.drmService.updateDrmConfig(e,t):Promise.reject(r.DrmSetupError.MISSING_CONFIGURATION)},e.prototype.isMediaTypeSupported=function(e,t){return this.gs("".concat(e,'; codecs="').concat(t,'"'))},e.prototype.hs=function(e){return(0,O.shouldUseManagedMediaSource)(this.context.settings.PREFER_MANAGED_MEDIA_SOURCE)?window.ManagedMediaSource.isTypeSupported(e):"MediaSource"in window&&MediaSource.isTypeSupported(e)},e.prototype.is=function(){this.Is&&(this.Is.reject(Error("Cancelled pending end of stream.")),this.Is=void 0)},e.prototype.js=function(){var e=this;return this.Is=this.Is||new y.Deferred,this.Is.promise.then(function(){var t;return null==(t=e.mse)?void 0:t.endOfStream()}).catch(function(t){(0,v.isContextAvailable)(e.context)&&e.context.logger.debug("Failed to set end of stream",t)})},e.prototype.setEndOfStream=function(e){if(void 0===e&&(e=!0),!e)return this.is(),this.isMSEOpen()?Promise.resolve():this.reOpenMse();if(!this.hasSourceBuffers()||!this.mse)return this.logger.debug("Cannot signal EOS as no buffers have been added yet"),Promise.resolve();var t=this.getEndOfBufferTime();return this.setCurrentTimeDelayedContext&&this.setCurrentTimeDelayedContext.time>=this.Ks&&t&&!isNaN(t)&&this.cancelSetCurrentTimeDelayed(),this.setCurrentTimeDelayedContext?this.js():this.mse.endOfStream()},e.prototype.ks=function(e){var t=this.ns();for(var n in t){var i=t[n];if(i.start<=e&&i.end>=e)return!0}return!1},e.prototype.ls=function(e,t){if(void 0===t&&(t=0),this.ks(e))return!1;var n=this.getRangesInSourceBuffers();return!!n&&Object.keys(n).every(function(r){return(0,i.isInTimeRanges)(n[r],e,t)})},e.prototype.ms=function(e,t){var n,r=null!=(n=this.getRangesInSourceBuffers())?n:{},o=Object.keys(r),s=Object.keys(r).map(function(t){return r[t].find(function(t){return(0,i.isInTimeRanges)([t],e)})}).filter(_.isDefined);if(0===o.length||s.length<o.length)return NaN;var a=Math.min.apply(Math,s.map(function(e){var t;return null!=(t=null==e?void 0:e.end)?t:1/0}))-e;return a>=t?e:e-(t-a)}
1,e.prototype.adjustTimeToNextCommonBufferStart=function(e){var t,n,i,r=this,o=null==(t=(0,h.getSourceState)(this.context))?void 0:t.drm,s=(0,m.getBufferEndSafetyMargin)(o);if(this.ls(e,s))return e;var a=this.ls(e),u=this.getFutureBufferStarts(e).filter(function(t){return t>=e}),l=0===u.length,c=null==(i=null==(n=(0,h.getSourceState)(this.context))?void 0:n.buffer.isLoadingRangeFinished)||i;if(a&&l){var d=this.ms(e,s);return d===e||c?!isNaN(d)&&this.ls(d)?(this.logger.debug("Adjusting current time from target ".concat(e," away from end of buffer: ").concat(d)),d):e:(this.logger.debug("Not adjusting seek target from ".concat(e,", because there will be future data")),NaN)}if(!a&&l)return NaN;var p=u.find(function(e){return r.ls(e,s)}),f=null!=p?p:Math.min.apply(Math,u);return p||c?(this.logger.debug("Adjusting current time from target ".concat(e," to next safe buffer start: ").concat(f)),f):(this.logger.debug("Not adjusting seek target from ".concat(e,", as it is not safe across media types and there will be future data")),NaN)},e.prototype.getFutureBufferStarts=function(e){var t,n=this.getRangesInSourceBuffers();if(!n)return[];if(this.mse){var r=this.ns();t=Object.keys(r).map(function(e){return r[e]})}else t=[];return i.BufferRangeHelper.getCommonBufferedRanges(n).filter(function(t){return t.getEnd()>=e&&!isNaN(t.getStart())}).filter(function(e){return t.every(function(t){return(0,i.areDisjoint)(t,{start:e.getStart(),end:e.getEnd()})})}).map(function(e){return e.getStart()})},e.prototype.getRangesInSourceBuffers=function(){if(!this.mse)return null;var e={};for(var t in this.segmentQueues)if(this.segmentQueues.hasOwnProperty(t)&&(e[t]=this.mse.getBufferedRanges(t),e[t].length<1))return null;return Object.keys(e).length?e:null},e.prototype.ns=function(){if(!this.mse||!this.mse.isBufferRemovalPending())return{};var e={};for(var t in this.segmentQueues){var n=this.mse.getRangePendingRemoval(t);this.segmentQueues.hasOwnProperty(t)&&n&&(e[t]=n)}return e},e.prototype.processSegmentQueues=function(){var e=this,t=this.segmentQueueMimeTypes.filter(function(t){return e.segmentQueues[t].length>0}).map(function(t){return e.addSegmentFromQueueToMse(t)});return 0===t.length?Promise.resolve():Promise.all(t).then(function(){return e.processSegmentQueues()}).catch(function(e){if(e!==r.SOURCE_BUFFER_APPEND_STATUS.SUSPENDED)throw e})},e.prototype.getHeadOfQueue=function(e){return this.segmentQueues[e][0]},e.prototype.isMSEOpen=function(){var e;return(null==(e=this.mse)?void 0:e.readyState)===k.MediaSourceReadyState.o
1pen},e.prototype.os=function(e){var t,n=null==(t=(0,h.getSourceState)(this.context))?void 0:t.drm;return this.context.serviceManager.maybeCall(a.ServiceName.DrmService,function(t){return t.maybeWaitForDrmLicense(e,n)},Promise.resolve())},e.prototype.addSegmentFromQueueToMse=function(e){var t=this;if(!this.mse)return Promise.resolve();var n=Promise.resolve();this.isMSEOpen()||(n=this.reOpenMse());var i=this.getHeadOfQueue(e);if(!i)return Promise.resolve();var o=i.getRepresentationId().representationId,s=i.getUrl();return this.context.logger.debug("[MSERenderer][".concat(e,"][").concat(o,"] Scheduling appendage to buffer [url=").concat(s,"], DRM key ID (").concat(i.getDrmKid(),")")),n.then(function(){return t.os(i)}).then(function(){return t.mse?t.segmentQueues[e].includes(i)?t.mse.addToBuffer(i).then(function(){var n=t.getHeadOfQueue(e)!==i;if(t.logger.debug("[MSERenderer][".concat(e,"][").concat(o,"] Appended segment to buffer [url=").concat(s,"]")),n){var r=t.segmentQueues[e][0],a=r?r.getUrl():"none";t.logger.debug("[MSERenderer][".concat(e,"][").concat(o,"] Skipping removal of [url=").concat(s,"] ")+"from segment queue as the queue head has unexpectedly changed to [url=".concat(a,"]"))}else t.segmentQueues[e].shift();t.drmService&&t.hasDataInSourceBuffers()&&!(0,b.isSwitchingBufferBlocks)((0,h.getSourceStore)(t.context))&&t.drmService.signalInitDataShouldBeAvailable()}):(t.logger.debug("[MSERenderer][".concat(e,"][").concat(o,"] Segment ").concat(i.getUrl()," no longer part of the queue - skipping appendage")),Promise.resolve()):Promise.reject(r.SOURCE_BUFFER_APPEND_STATUS.FAILURE)}).catch(function(n){if(t.logger.debug("[MSERenderer][".concat(e,"][").concat(o,"] Adding segment from queue to buffer failed"),n),n===r.SOURCE_BUFFER_APPEND_STATUS.FAILURE&&t.trackRendererError(i),t.mse&&n===r.SOURCE_BUFFER_APPEND_STATUS.QUOTA_EXCEEDED){t.Qs.set(e,!0);var s=t.Rs.get(e);return s||(s=new y.Deferred,t.Rs.set(e,s)),t.mse.addOneUpdateEndCallback(e,s.resolve).then(function(){t.Rs.delete(e),t.context.logger.debug("Appending segment after quota has been exceeded...")}),s.promise.then(function(){return t.processSegmentQueues()})}return t.mse?t.mse.queueActionOnBuffer(e,function(){return t.processSegmentQueues()}):Promise.reject(n)})},e.prototype.cancelSetCurrentTimeDelayed=function(){this.setCurrentTimeDelayedContext&&(this.context.logger.debug("Cancelling delayed set currentTime to ".concat(this.setCurrentTimeDelayedContext.time)),this.setCurrentTimeDelayedContext.unsubscribeFromSourceStore(),this.setCurrentTimeDelayedContext.deferred.reject("cancelled seek"),this.setCurrentTimeDelayedContext=void 0)},e.prototype.ps=function(e){var t=this;this.segmentQueueMimeTypes.forEach(function(n){t.segmentQueues[n]=t.segmentQueues[n].filter(function(t){return t.getPlaybackTime()+t.getDuration()>=e}),t.updateRendererRangesInStore(n),t.Qs.set(n,!1)}),this.Rs.forEach(function(e){return e.reject()}),this.Rs.clear()},e.prototype.resolvePendingEndOfStream=function(){this.Is&&(this.Is.resolve(),this.Is=void 0)},e.prototype.setCurrentTimeInternal=function(e){var t,n,i=this;if(!this.mse)return Promise.reject("Couldn't set current time, MSE is not open");t=this.Qs,n=!1,t.forEach(function(e){return n=n||e}),n&&this.ps(e);var r=this.mse.waitForBuffers().then(function(){return i.waitingForSeekedPromise}).then(function(){if(i.setCurrentTimeContext){if(i.setCurrentTimeContext.time!==e)return Promise.reject("A newer setting of change time has been scheduled.")}else i.setCurrentTimeContext={time:e,isInitialSeek:!1,promise:r};var t=i.adjustTimeToNextCommonBufferStart(e);return isNaN(t)?i.qs(e):t}).then(function(e){var t,n,r,o,s=null!=(n=null==(t=i.video)?void 0:t.currentTime)?n:0,a=!i.isPaused();return(null==(r=i.setCurrentTimeContext)?void 0:r.isInitialSeek)&&a&&s>e?(i.logger.debug("Skip initial seek to ".concat(e," as playback has started and is already at ").concat(s)),o=Promise.resolve(s)):(i.logger.debug("set time on video element to ".concat(e)),o=i.seekOnVideoElement(e)),o.then(function(e){return i.resolvePendingEndOfStream(),e}).catch(function(t){return i.handleVideoSetCurrentTimeError(e,t)}
1).finally(function(){i.waitingForSeekedPromise=null,i.setCurrentTimeContext=void 0,i.savedCurrentTime=void 0})});return r},e.prototype.qs=function(e){var t=this;this.context.logger.debug("Delaying seek, waiting for data in buffer for time ".concat(e));var n=(0,h.getSourceStore)(this.context);if(!n)return Promise.reject(Error("No source store available"));var i=new y.Deferred,r=(0,g.subscribe)(n)(function(e){return(0,C.getBufferState)(e)},function(){var e;null==(e=t.setCurrentTimeDelayedContext)||e.reevaluateDataInBuffer()},function(e,t){return!!((null==e?void 0:e.isLoadingRangeFinished)&&!(null==t?void 0:t.isLoadingRangeFinished))});return this.setCurrentTimeDelayedContext={time:e,reevaluateDataInBuffer:function(){var n=t.adjustTimeToNextCommonBufferStart(e);isNaN(n)?t.context.logger.debug("Re-evaluated delayed seek to ".concat(e,": Cannot yet resolve, waiting for data in buffer"),{video:t.getBufferedRanges("video/mp4"),audio:t.getBufferedRanges("audio/mp4"),adjustedTime:n}):(r(),t.context.logger.debug("Re-evaluated delayed seek to ".concat(e,": Resolving with seek target ").concat(n)),t.setCurrentTimeDelayedContext=void 0,i.resolve(n))},deferred:i,unsubscribeFromSourceStore:r},i.promise},e.prototype.handleVideoSetCurrentTimeError=function(e,t){return this.logger.debug("failed to set current time",t),this.waitingForSeekedPromise=null,this.setCurrentTimeInternal(e)},e.prototype.seekOnVideoElement=function(e){var t=this;return this.waitingForSeekedPromise=new Promise(function(n,i){t.video?(t.video.currentTime=e,n(t.video.currentTime)):i("No video reference")}),this.waitingForSeekedPromise},e.prototype.saveCurrentTime=function(){this.setCurrentTimeContext?this.savedCurrentTime=this.setCurrentTimeContext.time:this.savedCurrentTime=this.getCurrentVideoTime()},e.prototype.rs=function(e){var t=this;return void 0===e&&(e=this.getCurrentTime()),this.shutdown(!1).then(function(){return t.ready()}).then(function(){t.Hs.forEach(function(e,n){t.addBuffer(e,n)||(t.context.logger.debug("Failed to create source buffer ".concat(e)),t.Hs.remove(e))})}).then(function(){t.setCurrentTime(e).then(function(){var e,n;return(null==(n=null==(e=t.context.serviceManager)?void 0:e.get(a.ServiceName.PlayerStateService))?void 0:n.isPlaying())?t.play():Promise.resolve()})})},e.prototype.ss=function(e){var t,n=this,i=E.MimeTypeHelper.getMediaType(e);this.segmentQueueMimeTypes.forEach(function(e){var t;E.MimeTypeHelper.getMediaType(e)===i&&(delete n.segmentQueues[e],null==(t=(0,h.getSourceStore)(n.context))||t.dispatch((0,P.setRendererRanges)(e,[])))}),this.segmentQueues[e]=[],null==(t=(0,h.getSourceStore)(this.context))||t.dispatch((0,P.setRendererRanges)(e,[]))},e.prototype.changeBufferType=function(e,t,n){var i=this;if(this.Hs.update(e,t),this.ss(e),this.mse&&this.mse.isChangeTypeSupported()){var r=!(n&&(0,f.getCapabilities)()[d.CapabilityKey.isEdgeChromium]);return this.mse.changeBufferType(e,t,r).then(function(){var n;return(n={})[e]=t,n}).catch(function(n){return i.logger.debug("Failed to change buffer type to ".concat(e," ").concat(t,":"),n),i.rs().then(function(){return i.Hs.entries()})})}return this.rs().then(function(){return i.Hs.entries()})},e.prototype.shouldContinueBuffering=function(){var e,t;return null!=(t=null==(e=this.mse)?void 0:e.shouldContinueBuffering)&&t},e}()},48873:function(e,t,n){var i,r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.MSEWrapper=t.MediaSourceReadyState=void 0;var o,s=n(66790),a=n(40306),u=n(3336),l=n(25926),c=n(4224),d=n(80813),p=n(3714),h=n(13531),f=n(75108),g=n(7387),v=n(68925),y=n(63879),m=n(15971),b=n(21513),S=n(34841),E=n(85434),_=n(15487),T=n(23068),P=n(41138),C=n(76340),A=n(60321),w=n(65940);function k(e){for(var t=[],n=0;n<(null==e?void 0:e.length);n++){var i="[".concat(e.start(n)," - ").concat(e.end(n),"]");t.push(i)}return t.toString()}(i=o||(t.MediaSourceReadyState=o={})).closed="closed",i.open="open",i.ended="ended",t.MSEWrapper=function(){function e(e){var t=this;this.Kt=function(e,n,i){t.logger.debug("successfully removed buffer for ".concat(e," (from ").concat(n," to ").concat(i,")"))},this.waitForBuffer=function(e){return t.sourceBuffers.hasOwnProperty(e)?t.Wt().then(function(){return t.sourceBuffers[e].ready()}):Promise.reject("No SourceBuffer for '".concat(e,"' available"))},this.Xt=function(){t.logger.debug("[MSEWrapper][ManagedMediaSource] Start Streaming received, resuming loading"),t.xs=!0},this.Yt=function(){t.logger.debug("[MSEWrapper][ManagedMediaSource] Stop Streaming received, stopping loading"),t.xs=!1}
vendor: 4,447 bytes, line 1
1,this.Zt=function(e){t.logger.isLevelEnabled(h.LogLevel.DEBUG)&&t.logger.debug("Received bufferedChange event, Added Ranges: ".concat(k(e.addedRanges),", Removed Ranges: ").concat(k(e.removedRanges)))},e.videoElement&&(this.context=e,this.logger=e.logger,this.video=e.videoElement,this.sourceBuffers={},this.vs=!1,this.It=Promise.resolve(),this.xs=!0)}return e.prototype.getBufferedRanges=function(e){return this.sourceBuffers.hasOwnProperty(e)?this.sourceBuffers[e].bufferedRanges:[]},e.prototype.printDetailedBufferRange=function(e,t){var n;try{n=e.buffered}catch(e){return void this.logger.debug("".concat(t," buffer range: Error accessing buffered ranges"))}if(0!==n.length)for(var i=0;i<n.length;i++)this.logger.debug("".concat(t," buffer range [").concat(i,"]: ").concat(n.start(i)," - ").concat(n.end(i)));else this.logger.debug("".concat(t," buffer range: empty"))},e.prototype.getBufferStartTime=function(){var e=this,t=Object.keys(this.sourceBuffers).map(function(t){return 0===e.sourceBuffers[t].bufferedRanges.length?0:e.sourceBuffers[t].bufferedRanges[0].start});return Math.max.apply(null,t)},e.prototype.addBuffer=function(e,t,n){var i=this;if(this.mediaSource){if(this.vs&&!this.sourceBuffers.hasOwnProperty(e))try{var r=this.mediaSource.addSourceBuffer(e+"; codecs="+t);this.logger.debug("Creating new SourceBuffer for ".concat(e," with codec ").concat(t)),this.sourceBuffers[e]=new A.SourceBufferWrapper(r,{mimeType:e,codec:t},function(t){n(t),i.context.logger.isLevelEnabled(h.LogLevel.DEBUG)&&i.printDetailedBufferRange(r,e)})}catch(n){return this.logger.debug("Could not add SourceBuffer for "+e+" with codecs "+t+":"+n),void this.context.eventHandler.dispatchEvent(p.PlayerEvent.Warning,new l.PlayerWarning(c.WarningCode.SOURCE_CODEC_OR_FILE_FORMAT_NOT_SUPPORTED))}return this.logger.debug("Added SourceBuffer for "+e+" with codecs "+t),isNaN(this.mediaSource.duration)||(this.sourceBuffers[e].appendWindowEnd=this.mediaSource.duration),this.sourceBuffers[e].buffer}},e.prototype.updateTimestampOffset=function(e,t){var n=this.sourceBuffers[e];n&&(this.logger.debug("setting new source buffer [".concat(e,"] offset from ").concat(n.buffer.timestampOffset," to ").concat(t)),n.buffer.timestampOffset=t)},e.prototype.setTimestampOffset=function(e,t){return this.sourceBuffers.hasOwnProperty(e)?((0,T.isDefined)(t)&&!isNaN(t)||(this.logger.debug("source buffer [".concat(e,"] offset is ").concat(t,", setting it to 0")),t=0),this.queueTimestampOffsetUpdate(e,t)):(this.logger.debug("no such source buffer found (mime type=".concat(e,")")),Promise.resolve())},e.prototype.queueTimestampOffsetUpdate=function(e,t){var n=this;return this.queueActionOnBuffer(e,function(){return n.updateTimestampOffset(e,t)}).catch(function(t){n.logger.debug("Failed to set timestamp offset for",e,":",t)})},e.prototype.getBufferRangeStart=function(e,t){return t||e.start(0)},e.prototype.getBufferRangeEnd=function(e,t){return t||e.end(e.length-1)},e.prototype.Jt=function(e,t,n){var i=this.sourceBuffers[e].buffer.buffered;return{start:this.getBufferRangeStart(i,t),end:this.getBufferRangeEnd(i,n)}},e.prototype.preBufferRemoval=function(e,t,n){this.logger.debug("removing buffer for ".concat(e," (from ").concat(t," to ").concat(n,")"))},e.prototype.removeBufferRange=function(e,t,n){this.preBufferRemoval(e,t,n),this.sourceBuffers[e].buffer.remove(t,n)},e.prototype.removeFromBuffer=function(e,t,n,i){var r=this;return void 0===i&&(i=this.Kt),this.queueActionOnBuffer(e,function(){var s,a,u;try{if(r.video&&r.video.currentTime>=0&&(null==(u=null==(a=null==(s=r.sourceBuffers[e])?void 0:s.buffer)?void 0:a.buffered)?void 0:u.length)>0){var d=r.Jt(e,t,n),h=d.start,f=d.end;if(h>=0&&f>h){if(r.sourceBuffers[e].removalPending=!0,r.sourceBuffers[e].rangePendingRemoval={start:h,end:f},!r.mediaSource||r.mediaSource.readyState===o.open){var g=r.sourceBuffers[e].onUpdateEnded().then(function(){r.sourceBuffers[e]&&(r.sourceBuffers[e].rangePendingRemoval=null,r.sourceBuffers[e].removalPending=!1,i(e,h,f))});return r.removeBufferRange(e,h,f),g}r.logger.debug("cannot remove buffer for ".concat(e," (from ").concat(h," to ").concat(f,"): MediaSource is not open")),r.addOneSourceOpenCallback(function(){r.removeFromBuffer(e,h,f,i).catch(function(t){r.logger.debug("Couldn't remove buffer from ".concat(h," to ").concat(f," for ").concat(e),t)})})}else r.logger.debug("Ignoring buffer clearing request for ".concat(e,", as the passed-in range is not val
1id: ").concat(h," to ").concat(f))}else r.logger.debug("Ignoring buffer clearing request for ".concat(e,", as there are no buffered ranges."))}catch(t){var v="".concat(c.WarningCode[c.WarningCode.PLAYBACK_WARNING],": Buffer clearing failed for ").concat(e,". Exception: ").concat(JSON.stringify(t));r.context.eventHandler.dispatchEvent(p.PlayerEvent.Warning,new l.PlayerWarning(c.WarningCode.PLAYBACK_WARNING,v))}return Promise.resolve()})},e.prototype.removeBuffer=function(e){var t=this,n=Promise.resolve(),i=this.sourceBuffers[e];if(!i||!this.mediaSource)return n;if(this.isMediaSourceOpen())try{null==i||i.buffer.abort()}catch(e){return this.logger.debug("Could not abort last action on buffer",r({},e)),Promise.resolve()}if(E.MimeTypeHelper.isSubtitle(e))n=n.then(function(){return t.removeFromBuffer(e).catch(function(e){t.logger.debug("Error removing buffer data",e)})});else try{this.mediaSource&&this.mediaSource.removeSourceBuffer(i.buffer)}catch(t){this.logger.debug("Error while trying to remove ".concat(e," source buffer."),t)}return this.Lt(e),n},e.prototype.Lt=function(e){this.sourceBuffers[e]?(this.sourceBuffers[e].dispose(),delete this.sourceBuffers[e],this.logger.debug("Removed SourceBuffer for ".concat(e))):this.logger.debug("No source buffer to remove for mimeType=".concat(e))},e.prototype.isMediaSourceOpen=function(){var e;return(null==(e=this.mediaSource)?void 0:e.readyState)===o.open},e.prototype.Mt=function(){var e=this;if(!this.mediaSource)return this.logger.debug("Media source is removed. Can not reset buffers."),Promise.resolve();var t=[];for(var n in this.sourceBuffers)this.sourceBuffers.hasOwnProperty(n)&&t.push(this.removeBuffer(n));return Promise.all(t).then(function(){e.sourceBuffers={},e.logger.debug("Removed all SourceBuffers")})},e.prototype.tearDownMediaSource=function(){var e=this;return this.It=this.It.then(function(){return e.Mt()}).then(function(){e.mediaSource?e.Nt():e.logger.debug("Media source has already been removed.")}),this.It},e.prototype.isReusable=function(){return!this.vs||this.readyState!==o.closed},e.prototype.Nt=function(){var e;if(this.video)if(null!==this.video.getWrappedElement()){var t=(0,C.getMseObjectUrl)((0,m.getSourceState)(this.context));if("function"==typeof(null==(e=null==window?void 0:window.URL)?void 0:e.revokeObjectURL)&&""!==t)try{window.URL.revokeObjectURL(t)}catch(e){this.logger.debug("Could not revoke MSE object URL")}this.mediaSource&&(this.mediaSource.removeEventListener("startstreaming",this.Xt),this.mediaSource.removeEventListener("endstreaming",this.Yt),this.mediaSource.removeEventListener("bufferedchange",this.Zt)),this.ts&&this.ts.reject("MediaSource is being destroyed."),this.ts=void 0,this.us=void 0,t===this.video.src&&(P.VideoElementUtil.removeSource(this.video),this.video.load()),this.mediaSource=void 0,this.vs=!1,this.logger.debug("Detached video element and MSE")}else this.logger.debug("No video element to teardown.");else this.logger.debug("No video wrapper to teardown.")},e.prototype.removeUpdateEndCallback=function(e,t){this.sourceBuffers.hasOwnProperty(e)&&this.sourceBuffers[e].buffer.removeEventListener("updateend",t)},e.prototype.addUpdateEndCallback=function(e,t){this.sourceBuffers.hasOwnProperty(e)&&this.sourceBuffers[e].buffer.addEventListener("updateend",t)},e.prototype.addOneUpdateEndCallback=function(e,t){return this.sourceBuffers[e].onUpdateEnded().catch(function(){}).then(t)},e.prototype.addSourceOpenCallback=function(e){this.mediaSource&&this.mediaSource.addEventListener("sourceopen",e)},e.prototype.removeSourceOpenCallback=function(e){this.mediaSource&&this.mediaSource.removeEventListener("sourceopen",e)},e.prototype.addOneSourceOpenCallback=function(e){var t=this,n=function(i){t.removeSourceOpenCallback(n),e(i)};this.addSourceOpenCallback(n)},e.prototype.isAnyBufferUpdating=function(){var e=this;return 0!==Object.keys(this.sourceBuffers).filter(function(t){return e.sourceBuffers[t].buffer.updating}).length},e.prototype.setDuration=function(e){var t=this;this.queueActionOnBuffers(function(){if(t.mediaSource){var n=(0,T.isNumber)(e)&&e>0?e:1/0;n===1/0&&t.context.settings.MAX_SAFE_MSE_DURATION!==1/0&&(0,T.isNumber)(t.context.settings.MAX_SAFE_MSE_DURATION)&&t.context.settings.MAX_SAFE_MSE_DURATION>0&&(n=t.context.settings.MAX_SAFE_MSE_DURATION),t.mediaSource.duration!==n&&(t.isMediaSourceOpen()?(t.logger.debug("Setting video duration on MSE: ".concat(t.mediaSource.duration," -> ").concat(n)),t.mediaSource.duration=n):t.logger.debug("Skipping setDuration (".concat(t.mediaSource.duration," -> ").concat(n,"), MSE is not open")))}else t.logger.debug("Skipping setDuration (".concat(e,"), MSE is gone"))}).catch(function(e){t.logger.debug("Could not set the duration of the MSE!",e)})},e.prototype.getDuration=function(){return this.mediaSource&&!isNaN(this.mediaSource.duration)?this.mediaSource.duration:0},e.prototype.isInitialized=function(){return this.vs},Object.defineProperty(e.prototype,"readyState",{get:function(){return this.mediaSource?this.mediaSource.readyState:void 0}
1,enumerable:!1,configurable:!0}),e.prototype.isBufferRemovalPending=function(){var e=this;return Object.keys(this.sourceBuffers).some(function(t){return e.sourceBuffers[t].removalPending})},e.prototype.getRangePendingRemoval=function(e){var t,n,i;return null!=(i=null==(n=null==(t=this.sourceBuffers)?void 0:t[e])?void 0:n.rangePendingRemoval)?i:void 0},e.prototype.Ot=function(e){return this.getBufferedRanges(e).reduce(function(e,t){return e+(t.end-t.start)},0)},e.prototype.addToBuffer=function(e){var t=this,n=e.getMimeType();return this.queueActionOnBuffer(n,function(){return t.mediaSource?t.mediaSource.readyState!==o.open?(t.logger.warn("MediaSource is not open (readyState="+t.mediaSource.readyState+")"),Promise.reject(s.SOURCE_BUFFER_APPEND_STATUS.FAILURE)):t.sourceBuffers.hasOwnProperty(n)?t.Pt(e,n):(t.logger.log("sourceBuffers has no entry for "+n),Promise.reject(s.SOURCE_BUFFER_APPEND_STATUS.FAILURE)):(t.logger.debug("Could not queue action on SourceBuffer: MediaSource has been destroyed"),Promise.reject(s.SOURCE_BUFFER_APPEND_STATUS.FAILURE))})},e.prototype.Pt=function(e,t){var n=e.getRepresentationId().representationId;try{this.logger.debug("[MSEWrapper][".concat(t,"][").concat(n,"] Adding segment to SourceBuffer [").concat(e.getUrl(),"]"));var i=this.sourceBuffers[t];return i.buffer.appendBuffer(e.getData()),i.onUpdateEnded()}catch(i){return this.Qt(i,e,t,n)}},e.prototype.Qt=function(e,t,n,i){var r;return this.logger.debug("[MSEWrapper][".concat(n,"][").concat(i,"] appendBuffer() failed"),e),"QuotaExceededError"===e.name?this.Rt(n):((null==(r=this.video)?void 0:r.error)?this.St(e,t,n,i):this.Ut(e,t,n,i),this.logger.debug("[MSEWrapper][".concat(n,"][").concat(i,"] Failed appending segment to SourceBuffer"),e),Promise.reject(s.SOURCE_BUFFER_APPEND_STATUS.FAILURE))},e.prototype.Rt=function(e){return this.logger.debug("QuotaExceededError, trying to remove old data from buffers..."),this.context.store.dispatch((0,v.setBufferMaxSize)(e,this.Ot(e))),Promise.reject(s.SOURCE_BUFFER_APPEND_STATUS.QUOTA_EXCEEDED)},e.prototype.St=function(e,t,n,i){var r;if(null==(r=this.video)?void 0:r.error){var o={mediaError:this.video.error,appendBufferError:e,mimeType:n,segmentUrl:t.getUrl(),codec:t.getCodec(),networkState:this.video.networkState,readyState:this.video.readyState};if(this.logger.warn("[MSEWrapper][".concat(n,"][").concat(i,"] appendBuffer() failed due to HTMLMediaElement.error: ").concat(this.video.error.code," - ").concat(this.video.error.message),o),this.Tt(this.video.error.code)){var s=new u.PlayerError(a.ErrorCode.PLAYBACK_ERROR,o,"Fatal media error detected: ".concat(this.video.error.message,". Player reload may be required."),this.context.sourceContext.sourceIdentifier),h=this.context.serviceManager.get(d.ServiceName.RecoveryService);h?h.handleError(s):this.context.eventHandler.fireError(s)}else this.context.eventHandler.dispatchEvent(p.PlayerEvent.Warning,new l.PlayerWarning(c.WarningCode.PLAYBACK_WARNING,"appendBuffer failed due to HTMLMediaElement.error: ".concat(this.video.error.code," - ").concat(this.video.error.message),o))}},e.prototype.Tt=function(e){return[f.MediaErrorCode.MEDIA_ERR_DECODE,f.MediaErrorCode.MEDIA_ERR_SRC_NOT_SUPPORTED].includes(e)},e.prototype.Ut=function(e,t,n,i){var r,o,s={appendBufferError:e,mimeType:n,segmentUrl:t.getUrl(),codec:t.getCodec(),networkState:null==(r=this.video)?void 0:r.networkState,readyState:null==(o=this.video)?void 0:o.readyState};this.logger.warn("[MSEWrapper][".concat(n,"][").concat(i,"] appendBuffer() failed without HTMLMediaElement.error - treating as non-fatal"),s),this.context.eventHandler.dispatchEvent(p.PlayerEvent.Warning,new l.PlayerWarning(c.WarningCode.PLAYBACK_WARNING,"appendBuffer failed without HTMLMediaElement.error: ".concat(e.message||e.name||"Unknown error"),s))},e.prototype.endOfStream=function(){var e=this;return this.queueActionOnBuffers(function(){var t;e.isMediaSourceOpen()?(e.logger.debug("Signaled mse end of stream"),null==(t=e.mediaSource)||t.endOfStream()):e.logger.debug("Skipped signaling EOS as the mse is not open")}).catch(function(t){e.logger.debug("Unable to signal EOS on media s
1ource",t)})},e.prototype.waitForBuffers=function(){var e=Object.keys(this.sourceBuffers).map(this.waitForBuffer);return this.Wt().then(function(){return Promise.all(e).then(function(){})})},e.prototype.queueActionOnBuffers=function(e){var t=this,n=new Promise(function(e,i){Promise.all(Object.keys(t.sourceBuffers).map(function(e){var i=t.queueActionOnBuffer(e,function(){});return t.queueActionOnBuffer(e,function(){return n}).catch(function(){}),i})).then(function(){return e()},i)}).then(function(){return e()}).then(function(){return Promise.all(Object.keys(t.sourceBuffers).map(function(e){return t.sourceBuffers[e].ready()})).then(function(){})});return n},e.prototype.queueActionOnBuffer=function(e,t){return this.sourceBuffers.hasOwnProperty(e)?this.sourceBuffers[e].queueAction(t):Promise.reject("No SourceBuffer for '".concat(e,"' available"))},e.prototype.Vt=function(e){var t,n=this;return null==(t=this.ts)||t.reject(e),this.us?this.us.then(function(){n.ts=void 0}):Promise.reject(e)},e.prototype.Wt=function(){var e,t=this;if(this.us)return this.us;this.ts=new S.Deferred,this.us=this.ts.promise;var n=function(e){var n;r(),null==(n=t.ts)||n.reject(e)},i=function(){var e;r(),t.vs=!0,t.ws||(t.xs=!0),null==(e=t.ts)||e.resolve()},r=function(){t.mediaSource&&(t.mediaSource.removeEventListener("error",n),t.mediaSource.removeEventListener("sourceopen",i),t.mediaSource.removeEventListener("webkitsourceopen",i))};if(!this.video)return this.Vt("Could not set source to video element");if(!this.mediaSource)return this.Vt("mediaSource must not be null or undefined");if(this.mediaSource.addEventListener("error",n),this.mediaSource.addEventListener("sourceopen",i,!1),this.mediaSource.addEventListener("webkitsourceopen",i,!1),this.ws&&(this.video.disableRemotePlayback=!0,this.mediaSource.addEventListener("startstreaming",this.Xt),this.mediaSource.addEventListener("endstreaming",this.Yt),this.mediaSource.addEventListener("bufferedchange",this.Zt)),window&&window.URL&&"function"==typeof window.URL.createObjectURL){var o=window.URL.createObjectURL(this.mediaSource);this.video.src=o,null==(e=(0,m.getSourceStore)(this.context))||e.dispatch((0,y.setMseObjectUrl)(o))}else this.logger.debug("Could not use window.URL.createObjectURL(mediaSource) as the browser claims the function does not exist."),this.ts.reject("Could not create Object URL");return this.us.then(function(){t.ts=void 0})},Object.defineProperty(e.prototype,"shouldContinueBuffering",{get:function(){return this.xs},enumerable:!1,configurable:!0}),e.prototype.createNewMSE=function(){var e=this;return this.mediaSource?this.tearDownMediaSource().then(function(){return e.at()}):this.It.then(function(){return e.at()})},e.prototype.at=function(){return this.ws=(0,w.shouldUseManagedMediaSource)(this.context.settings.PREFER_MANAGED_MEDIA_SOURCE),this.ws?(this.logger.debug("[MSEWrapper] Using ManagedMediaSource"),this.mediaSource=new window.ManagedMediaSource):(this.logger.debug("[MSEWrapper] Using MediaSource"),this.mediaSource=new window.MediaSource),this.Wt()},e.prototype.isChangeTypeSupported=function(){var e,t,n=(0,b.getCapabilities)(),i=n.isWebOS&&n[g.CapabilityKey.webOSChromiumVersion]>=_.WEBOS_2021_CHROMIUM_VERSION;return!!(null==(t=null==(e=window.SourceBuffer)?void 0:e.prototype)?void 0:t.changeType)&&!(0,b.getCapabilities)().isTizen&&!i},e.prototype.bt=function(e){var t=this,n=E.MimeTypeHelper.getMediaType(e),i=Object.keys(this.sourceBuffers).find(function(i){var r=E.MimeTypeHelper.getMediaType(i);return t.sourceBuffers.hasOwnProperty(i)&&r===n&&i!==e});i&&(this.sourceBuffers[e]=this.sourceBuffers[i],delete this.sourceBuffers[i])},e.prototype.changeBufferType=function(e,t,n){var i=this;this.bt(e);var r=this.sourceBuffers[e];return r?n&&r.getMimeType()===e&&r.getCodec()===t?(this.context.logger.debug("Skipping buffer type change for ".concat(e," - mimeType and codec unchanged: ").concat(t)),Promise.resolve()):this.queueActionOnBuffer(e,function(){r.changeType(e,t),i.context.logger.debug("Changed ".concat(e," SourceBuffer type with codec=").concat(t))}):(this.context.logger.error("SourceBuffer not found for ".concat(e)),Promise.reject(Error("SourceBuffer not found for ".concat(e))))},e.prototype.dispose=function(){var e=this;this.tearDownMediaSource().then(function(){e.video=void 0})},e}()}
vendor: 4,258 bytes, line 1
1,21586:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.MSERendererModuleDefinition=void 0;var i=n(62756),r=n(79323),o=n(48873),s=n(82889),a=n(44914);t.MSERendererModuleDefinition={name:i.ModuleName.RendererMse,module:{MSEWrapper:o.MSEWrapper,MSERenderer:r.MSERenderer,Ranges:s.Ranges,technologyChecker:new a.TechnologyChecker}},t.default=t.MSERendererModuleDefinition},69200:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.LinkedListQueue=void 0;var n=function(e){this.value=e};t.LinkedListQueue=function(){function e(){this.j9=0}return Object.defineProperty(e.prototype,"length",{get:function(){return this.j9},enumerable:!1,configurable:!0}),e.prototype.dequeue=function(){if(0!==this.j9){var e=this.l9;return this.l9=null==e?void 0:e.previous,e&&(e.previous=void 0,e.next=void 0),this.j9--,null==e?void 0:e.value}},e.prototype.enqueue=function(e){if(0===this.j9){var t=new n(e);this.k9=t,this.l9=t}else{var i=this.k9;this.k9=new n(e),this.k9.next=i,i&&(i.previous=this.k9)}this.j9++},e.prototype.isEmpty=function(){return 0===this.length},e}()},82889:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.Ranges=void 0,t.Ranges=function(){function e(){}return e.filterRanges=function(t,n){var i=[];if(t&&t.length)for(var r=0;r<t.length;r++)n(t.start(r),t.end(r))&&i.push([t.start(r),t.end(r)]);return e.createTimeRanges(i)},e.createTimeRangesObj=function(e){return void 0===e||0===e.length?{length:0,start:function(){return 0},end:function(){return 0}}:{length:e.length,start:function(t){return e[t][0]},end:function(t){return e[t][1]}}},e.createTimeRanges=function(t,n){return Array.isArray(t)?e.createTimeRangesObj(t):void 0===t||void 0===n?e.createTimeRangesObj():e.createTimeRangesObj([[t,n]])},e.findNextRange=function(t,n){return e.filterRanges(t,function(t,i){return t-e.TIME_FUDGE_FACTOR>=n&&i-t>e.MIN_RANGE_DURATION})},e.findGaps=function(t,n){if(t.length<2)return e.createTimeRanges();for(var i=[],r=1;r<t.length;r++){var o=t.end(r-1),s=t.start(r);s-o>n&&i.push([o,s])}return e.createTimeRanges(i)},e.findRangeForTime=function(t,n){return e.filterRanges(t,function(e,t){return e<=n&&t>=n})},e.TIME_FUDGE_FACTOR=1/30,e.MIN_RANGE_DURATION=.2,e}()},76340:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.getMseObjectUrl=void 0,t.getMseObjectUrl=function(e){var t,n;return null!=(n=null==(t=null==e?void 0:e.renderer)?void 0:t.mseObjectUrl)?n:""}},60321:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.SourceBufferWrapper=void 0;var i=n(34841),r=n(69200);t.SourceBufferWrapper=function(){function e(e,t,n){var i=this;this.onBufferedRangesChanged=n,this.XV=function(){i.aV(),i.onBufferedRangesChanged(i.bufferedRanges),i.ZV(function(e){return e.resolve()})},this.YV=function(e){i.ZV(function(t){return t.reject(e)})},this.ready=function(){return i.buffer.updating?i.onUpdateEnded():Promise.resolve()},this.buffer=e,this.VV=t,this.bufferedRanges=[],this.queuePromise=Promise.resolve(),this.WV=new r.LinkedListQueue,["error","abort","sourceended","sourceclose"].forEach(function(e){i.buffer.addEventListener(e,i.YV)}),this.buffer.addEventListener("updateend",this.XV)}return e.prototype.ZV=function(e){for(var t;null!=(t=this.WV.dequeue());)e(t)},e.prototype.aV=function(){try{this.bufferedRanges=function(e){for(var t=[],n=0;n<e.length;n++)t.push({start:e.start(n),end:e.end(n)});return t}(this.buffer.buffered)}catch(e){}},e.prototype.onUpdateEnded=function(){var e=new i.Deferred;return this.WV.enqueue(e),e.promise},e.prototype.queueAction=function(e){var t=this,n=this.queuePromise.then(function(){return t.ready()}).then(function(){return Promise.resolve(e()).then(function(){return t.ready()})});return this.queuePromise=n.catch(function(){}),n},e.prototype.changeType=function(e,t){this.buffer.changeType("".concat(e,"; codecs=").concat(t)),this.VV.mimeType=e,this.VV.codec=t},e.prototype.getCodec=function(){return this.VV.codec},e.prototype.getMimeType=function(){return this.VV.mimeType},e.prototype.dispose=function(){var e=this;["error","abort","sourceended","sourceclose"].forEach(function(t){e.buffer.removeEventListener(t,e.YV)}),this.ZV(function(e){return e.reject("disposing source buffer")}),this.buffer.removeEventListener("updateend",this.XV)},e}()}
1,44914:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.TechnologyChecker=void 0;var i=n(44468);t.TechnologyChecker=function(){function e(){}return e.prototype.getSupportedTechnologies=function(){return[{player:i.PlayerType.Html5,streaming:i.StreamType.Dash},{player:i.PlayerType.Html5,streaming:i.StreamType.Hls},{player:i.PlayerType.Html5,streaming:i.StreamType.Smooth}]},e}()},10344:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.VideoEventHandler=void 0,t.VideoEventHandler=function(){function e(e){var t=this;this.UV=function(e){return e.time=t.TV&&t.TV.currentTime||0,e},this.TV=e}return e.prototype.on=function(e,t){this.TV&&this.TV.addEventListener(e,t,this.UV)},e.prototype.off=function(e,t){this.TV&&this.TV.removeEventListener(e,t)},e.prototype.fire=function(e,t){this.TV&&this.TV.eventHandler.triggerEvent(e,t)},e.prototype.dispose=function(){},e}()},65940:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.shouldUseManagedMediaSource=function(e){return"ManagedMediaSource"in window&&(e||!("MediaSource"in window))}}},function(e){return e(e.s=21586)}])}()},37444:e=>{!function(){"use strict";self,e.exports=(self.webpackChunkbitmovin_player=self.webpackChunkbitmovin_player||[]).push([[561],{28610:function(e,t){var n,i;Object.defineProperty(t,"__esModule",{value:!0}),t.VmapTrackingEventType=void 0,(i=n||(t.VmapTrackingEventType=n={})).BreakStart="breakstart",i.BreakEnd="breakend",i.Error="error"},76713:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.PAUSE_AD_POSITION=t.DEFAULT_AD_BREAK_POSITION=void 0,t.isPauseAdBreak=function(e){return(null==e?void 0:e.position)===t.PAUSE_AD_POSITION},t.DEFAULT_AD_BREAK_POSITION="pre",t.PAUSE_AD_POSITION="pause"},45392:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.AdManifestHelper=void 0,t.xmlToString=function(e){return(new XMLSerializer).serializeToString(e.documentElement)},t.toDataUri=function(e){return"data:text/xml,"+encodeURIComponent(e)},t.pingVmapTrackingUrls=function(e,t){void 0===e&&(e=[]),e.filter(function(e){return e.type===t}).forEach(function(e){return(0,r.pingUrl)(e.url)})};var i=n(70850),r=n(95217),o=n(88457),s=n(60326),a=n(47091);t.AdManifestHelper=function(){function e(e,t,n,i){this.loader=e,this.videoLoadTimeout=t,this.withCredentials=n,this.disableStorage=i}return e.prototype.downloadVastManifest=function(e){var t=this;return null!=this.wI||(this.wI=new DOMParser),this.loader.load(e,void 0,void 0,void 0,void 0,this.withCredentials).catch(function(){return Promise.reject({code:o.AdvertisingModuleErrorCode.COULD_NOT_LOAD_AD_MANIFEST})}).then(function(e){if(!e.body)return Promise.reject({code:a.VastErrorCode.XML_PARSING_ERROR});
1var n,i=t.wI.parseFromString(e.body,"text/xml"),r=null==(n=i.childNodes[0].childNodes[0])?void 0:n.nodeName.includes("Error"),s=i.childNodes[0].nodeName.includes("error");return i.childNodes[0].nodeName.includes("VMAP")?Promise.reject({code:o.AdvertisingModuleErrorCode.AD_TAG_TYPE_NOT_MATCHING}):void 0===r||r?Promise.reject({code:a.VastErrorCode.NO_ADS_VAST_RESPONSE}):s?Promise.reject({code:a.VastErrorCode.XML_PARSING_ERROR}):Promise.resolve({manifest:i,downloadTiming:{downloadTime:e.elapsedTime,timeToFirstByte:e.timeToFirstByte}})})},e.prototype.downloadVmapManifest=function(e){return this.loader.load(e,void 0,void 0,void 0,void 0,this.withCredentials)},e.prototype.parseAdVerifications=function(e){return null!=this.xI||(this.xI=new s.VastClientWrapper(this.videoLoadTimeout,this.withCredentials,this.disableStorage)),this.xI.parseManifest(e,!1).then(function(e){return e.ads.length<1?Promise.resolve([]):Promise.resolve(e.ads.map(function(e){return{id:e.id||"adVerification-"+i.Util.generateUniqueId(),verifications:e.verifications}}))}).catch(function(e){return Promise.resolve([])})},e}()},63524:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.AdPlaybackFactory=void 0;var i=n(60937),r=n(52448);t.AdPlaybackFactory=function(){function e(){}return e.create=function(e,t){var n=!1,o=function(){n=!1},s=function(e){return Promise.reject("The current ad playback has to be finished by calling ".concat(e,".done(), before a new one can be requested."))};return new(function(){function a(){}return a.prototype.requestPlayer=function(){return n?s("AdPlayerAPI"):(n=!0,Promise.resolve(r.AdPlayerFactory.createAdPlayer(e,o)))},a.prototype.requestReporter=function(){return n?s("AdPlaybackReportingAPI"):(n=!0,Promise.resolve(new i.AdPlaybackReporter(e,o)))},a.prototype.done=function(e){return void 0===e&&(e=!0),t(e)},a}())},e}()},60937:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.AdPlaybackReporter=void 0;var i=n(9768),r=n(3714),o=n(19483);t.AdPlaybackReporter=function(e,t){var n=this,s=new o.ArrayMap;this.videoElement=e.getVideoElement();var a=!1,u=function(){if(a)throw"AdPlaybackReporter is no longer usable. Request a new one."},l=this.videoElement.addEventListener;this.videoElement.addEventListener=function(e,t,i){s.add(e,t),l.apply(n.videoElement,[e,t,i])},this.started=function(t){if(u(),n.p4)throw"Ad playback is already in progress. A new one can not be started.";n.p4=t,n.q4=!1,e.hasCurrentSourcePlayedOnce()||e.fireEvent(r.PlayerEvent.Playing,{time:e.getCurrentTime(),issuer:i.ADVERTISING_ISSUER_NAME}),e.fireEvent(r.PlayerEvent.AdStarted,{ad:t})},this.paused=function(t){u(),e.fireEvent(r.PlayerEvent.Paused,{time:t,issuer:i.ADVERTISING_ISSUER_NAME})},this.resumed=function(t){u(),e.fireEvent(r.PlayerEvent.Play,{time:t,issuer:i.ADVERTISING_ISSUER_NAME}),e.fireEvent(r.PlayerEvent.Playing,{time:t,issuer:i.ADVERTISING_ISSUER_NAME})},this.timeupdate=function(t){u(),e.fireEvent(r.PlayerEvent.TimeChanged,{time:t,issuer:i.ADVERTISING_ISSUER_NAME})},this.skipped=function(){n.q4||(u(),e.fireEvent(r.PlayerEvent.AdSkipped,{ad:n.p4}),n.q4=!0,n.p4=null)},this.done=function(){return u(),s.forAll(function(e,t){n.videoElement.removeEventListener(e,t),n.videoElement.addEventListener=l}),!n.q4&&n.p4&&e.fireEvent(r.PlayerEvent.AdFinished,{ad:n.p4}),n.p4=null,t(),a=!0,Promise.resolve()}}},43255:function(e,t,n){var i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.AdPlayerDelegate=void 0;var r=n(40306),o=n(80813),s=n(9768),a=n(3714),u=n(51289),l=n(90408),c=n(20213),d=n(18192),p=n(94685),h=n(41138),f=n(63524),g=n(44202),v=n(65185),y=n(47091);t.AdPlayerDelegate=function(){function e(t){var n,p=t.internalPlayer,h=new g.AdPlayerStateStore(t.context,p),m=Promise.resolve(),E=!1,_=!1,T=!1,P={width:0,height:0},C=[],A=function(e){e.code===c.WarningCode.PLAYBACK_COULD_NOT_BE_STARTED&&(_=!0)};p.onInternal(a.PlayerEvent.PlayerResized,function(e){P={width:b(e.width),height:b(e.height)}});var w=function(){_=!1};this.getVideoElement=function(){return p.getVideoElement()},this.getVolume=function(){return p.isMuted()?0:p.getVolume()},this.parsePosition=function(t){var n;return n=h.hasStoredState()?h.getStoredState().contentDuration:p.getDuration(),e.parsePosition(t,n)},this.selectMediaFile=function(e){var n,i=e.every(function(e){return e.bitrate||e.minBitrate&&e.maxBitrate}),r=p.getDownloadedVideoData(),s=p.getDownloadedAudioData(),a=!!(s&&r&&r.bitrate>0),u=t.context.serviceManager.get(o.ServiceName.AdaptationService);return i&&(u||a)?k(e,[r,s],u):(n=P,r&&r.width>0?(0,v.findMediaFileByResolution)(r.width,r.height,e):(0,v.findMediaFileByResolution)(n.width,n.height,e))};var k=function(e,t,n){var i=t[0],r=t[1];return n?n.selectQualityBasedOnBitrateMeasurement(e):(0,v.findMediaFileByBitrate)(i.bitrate+r.bitrate,e)};this.metadataLoaded=function(e,t){var n={adBreak:null,downloadTiming:t};e.hasOwnProperty("scheduleTime")&&(n.adBreak=e),n.adConfig=e,p.fireEvent(a.PlayerEvent.AdManifestLoaded,n)};
1var O=function(){C.forEach(function(e){return p.fireEvent(a.PlayerEvent.Error,{type:a.PlayerEvent.Error,code:e.code,name:e.name,message:e.message,data:e.data,troubleShootLink:(0,u.generateTroubleshootUrl)(e.code)})})},M=function(e){if(!h.hasStoredState())return Promise.resolve();var i=h.getStoredState().contentDuration,u=Promise.resolve();return E=!e,e&&(u=m=(C.length?(p.removeExternalEventFilter(x),h.clear(),p.off(a.PlayerEvent.Warning,A),p.off(a.PlayerEvent.Playing,w),p.unload().then(O)):(p.fireEvent(a.PlayerEvent.RestoringContent),p.addExternalEventFilter(L),h.restore(s.ADVERTISING_RESTORE_ISSUER_NAME).then(function(e){if(p.removeExternalEventFilter(x),C.length)throw Error("Background errors occurred during ad break");if(_)_=!1;else{if(e)return p.play(s.ADVERTISING_ISSUER_NAME).catch(function(e){T=!0,t.context.logger.debug("Unable to start playback after restoring the content after an ad break:",e)});var n=t.context.serviceManager.get(o.ServiceName.PlayerStateService);null==n||n.transitionToStoppedState()}}).catch(function(){C.length?O():p.fireEvent(a.PlayerEvent.Error,{code:r.ErrorCode.UNKNOWN})}).finally(function(){h.clear(),p.removeExternalEventFilter(L),p.off(a.PlayerEvent.Warning,A),p.off(a.PlayerEvent.Playing,w)}))).then(function(){t.restoreContentDeferred&&t.restoreContentDeferred.resolve()})),u.then(function(){var r=n?{adBreak:n}:void 0;p.fireEvent(a.PlayerEvent.AdBreakFinished,r),n=null,e&&(0,l.maybeFireDurationChangedEvent)(i,p.getDuration(),t.context.eventHandler),p.hasCurrentSourcePlayedOnce()||T||p.fireEvent(a.PlayerEvent.Playing,{time:p.getCurrentTime(),issuer:s.ADVERTISING_ISSUER_NAME}),T=!1})},I=[a.PlayerEvent.Error,a.PlayerEvent.SourceLoaded,a.PlayerEvent.SourceUnloaded,a.PlayerEvent.PlaybackFinished,a.PlayerEvent.Ready],x=function(e,n){var i,r=(null==(i=t.context.store.getState())?void 0:i.sources)&&Object.keys(i.sources).find(function(e){var t;return i.sources&&i.sources[e]&&(null==(t=i.sources[e].playback)?void 0:t.kind)===d.PlaybackKind.Backgroun
vendor: 5,095 bytes, line 1
1d});return S(e,n)&&r&&n.sourceIdentifier===r&&C.push(n),!I.includes(e)},R=[a.PlayerEvent.Play,a.PlayerEvent.Playing,a.PlayerEvent.Seek,a.PlayerEvent.Seeked,a.PlayerEvent.TimeShift,a.PlayerEvent.TimeShifted],L=function(e){return!R.includes(e)};this.requestAdPlayback=function(e){return n?Promise.reject("Ad break already in progress"):(n=e,m.then(function(){var t=E?Promise.resolve():D(e),n={adBreak:i(i({},JSON.parse(JSON.stringify(e))),{scheduleTime:e.scheduleTime})};return p.fireEvent(a.PlayerEvent.AdBreakStarted,n),p.onInternal(a.PlayerEvent.Warning,A),p.onInternal(a.PlayerEvent.Playing,w),t.then(function(){return p.unload(s.ADVERTISING_ISSUER_NAME)}).then(function(){return f.AdPlaybackFactory.create(p,M)})}))},this.updateAdRestoreState=function(e){n&&h.setAdRestoreState(e)};var D=function(n){var i=t.context,r=i.sourceContext.sourceIdentifier,a=i.adRestorationOptimizationService,u=i.serviceManager.get(o.ServiceName.ManifestService,r),l=a&&i.settings.OPTIMIZE_AD_RESTORATION,c=e.getAdBreakDuration(n),d=n.replaceContentDuration;return h.capture(s.ADVERTISING_ISSUER_NAME),h.setAdRestoreState({adBreakDuration:c,replaceContentDuration:d}),p.addExternalEventFilter(x),l&&u&&!u.isLive()?a.optimizeRestorationAfterUpcomingAdBreak():Promise.resolve()};this.overlayAdStarted=function(e){p.fireEvent(a.PlayerEvent.OverlayAdStarted,{ad:e})},this.adClicked=function(e){p.fireEvent(a.PlayerEvent.AdClicked,{clickThroughUrl:e})},this.adInteraction=function(e,t){p.fireEvent(a.PlayerEvent.AdInteraction,{interactionType:e,id:t})},this.onQuartile=function(e){p.fireEvent(a.PlayerEvent.AdQuartile,{quartile:e})},this.onError=function(e,t,n){var i={code:e||y.VastErrorCode.UNDEFINED_ERROR};t&&(i.message=t),n&&(i.adConfig=n),p.fireEvent(a.PlayerEvent.AdError,{code:r.ErrorCode.MODULE_ADVERTISING_ERROR,data:i,name:r.ErrorCode[r.ErrorCode.MODULE_ADVERTISING_ERROR],message:t,troubleShootLink:(0,u.generateTroubleshootUrl)(r.ErrorCode.MODULE_ADVERTISING_ERROR)})},this.onWarning=function(e,t,n){p.fireEvent(a.PlayerEvent.Warning,new c.PlayerWarning(e,t,n))},this.reset=function(){var t=p.getVideoElement();E=!1,_=!1,h.clear(),p.removeExternalEventFilter(x),p.removeExternalEventFilter(L),n&&t instanceof HTMLVideoElement&&e.clearVideoElement(t),n=null}}return e.getAdBreakDuration=function(e){var t,n,i=e.totalPlannedDuration;return null!=i?i:null!=(n=null==(t=e.ads)?void 0:t.reduce(function(e,t){var n;return e+(t.isLinear&&null!=(n=t.duration)?n:0)},0))?n:0},e.parsePosition=function(e,t){var n=Number(e);return!isNaN(n)&&n<=0&&(e="pre"),e.includes("pre")||"0%"===e?0:e.includes("post")?1/0:this.parseNumericalPosition(e,t)},e.parseNumericalPosition=function(e,t){var n;if(/%/.test(e)){if(!t)return NaN;n=parseFloat(e=e.replace(/%/gi,""))/100*t}else if(e.indexOf(":")>-1){var i=e.split(":");n=3600*parseFloat(i[0])+60*parseFloat(i[1])+parseFloat(i[2])}else n=parseFloat(e);return n>=0?n:NaN},e.clearVideoElement=function(e){h.VideoElementUtil.removeSource(e),e.load()},e}();var m=/(\d+)/;function b(e){return Number(e.match(m)?e.match(m)[0]:0)}var S=function(e,t){return e===a.PlayerEvent.Error&&(0,p.isObject)(t)}},52448:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.AdPlayerFactory=t.DEFAULT_AD_PLAYBACK_RATE=void 0,t.createSourceConfig=d;var i=n(40306),r=n(9768),o=n(3714),s=n(19483),a=n(85434),u=n(6365),l=n(7581);t.DEFAULT_AD_PLAYBACK_RATE=1;var c=function(){function e(){}return e.createAdPlayer=function(e,n){var a,u=new s.ArrayMap,c=!1,p=!1,h=[o.PlayerEvent.Play,o.PlayerEvent.Playing],f=function(){if(p)throw"AdPlayer is no longer usable. Request a new one."};return new(function(){function s(){this.adPlaybackStartEventFilter=function(t){return!e.hasCurrentSourcePlayedOnce()||!h.includes(t)}}return s.prototype.done=function(t){void 0===t&&(t=!1),f();var i,s,l=Promise.resolve();return c?l=e.unload(r.ADVERTISING_ISSUER_NAME):t||e.hasEnded()?(i=a,e.fireEvent(o.PlayerEvent.AdFinished,{ad:i})):(s=a,e.fireEvent(o.PlayerEvent.AdSkipped,{ad:s})),a=null,u.forAll(function(t,n){e.off(t,n)}),n(),p=!0,c=!1,l},s.prototype.on=function(t,n){f(),u.add(t,n),e.onInternal(t,n)},s.prototype.pause=function(){f(),e.pause(r.ADVERTISING_ISSUER_NAME)},s.prototype.play=function(){return f(),e.play(r.ADVERTISING_ISSUER_NAME)},s.prototype.load=function(n,s){var u=this;return f(),a=n,e.addExternalEventFilter(this.adPlaybackStartEventFilter),c=!0,e.load(d(n),void 0,null!=s?s:{seeking:!0},r.ADVERTISING_ISSUER_NAME).then(function(){return e.setPlaybackSpeed(t.DEFAULT_AD_PLAYBACK_RATE)}).then(function(){return e.play(r.ADVERTISING_ISSUER_NAME).catch(function(){})}).then(function(){c&&e.fireEvent(o.PlayerEvent.AdStarted,{ad:n})}).catch(function(t){if(t&&t.code===i.ErrorCode.MODULE_MISSING)throw{code:l.AdvertisingModuleErrorCode.REQUIRED_PLAYER_MODULE_MISSING,message:t.data.name};throw e.getLogger().debug("Failed to load Ad due to error: ".concat(null==t?void 0:t.message),t),t}).finally(function(){e.removeExternalEventFilter(u.adPlaybackStartEventFilter),c=!1})},Object.defineProperty(s.prototype,"duration",{get:function(){return f(),e.getDuration(r.ADVERTISING_ISSUER_NAME)}
1,enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"currentTime",{get:function(){return f(),e.getCurrentTime(r.ADVERTISING_ISSUER_NAME)},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"volume",{get:function(){return f(),e.getVolume()},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"muted",{get:function(){return f(),e.isMuted()},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"paused",{get:function(){f();var t=e.isContentPaused(),n=e.isContentPlaying();return!1===t&&!1===n||t},enumerable:!1,configurable:!0}),s}())},e}();function d(e){return e.data.delivery===u.MediaFileDeliveryType.Streaming?a.MimeTypeHelper.isDash(e.data.mimeType)?{dash:e.mediaFileUrl}:{hls:e.mediaFileUrl}:{progressive:e.mediaFileUrl}}t.AdPlayerFactory=c},44202:function(e,t,n){var i,r=this&&this.__extends||(i=function(e,t){return(i=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])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))(function(r,o){function s(e){try{u(i.next(e))}catch(e){o(e)}}function a(e){try{u(i.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?r(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(s,a)}u((i=i.apply(e,t||[])).next())})},s=this&&this.__generator||function(e,t){var n,i,r,o={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(u){var l=[a,u];if(n)throw TypeError("Generator is already executing.");for(;s&&(s=0,l[0]&&(o=0)),o;)try{if(n=1,i&&(r=2&l[0]?i.return:l[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,l[1])).done)return r;switch(i=0,r&&(l=[2&l[0],r.value]),l[0]){case 0:case 1:r=l;break;case 4:return o.label++,{value:l[1],done:!1};case 5:o.label++,i=l[1],l=[0];continue;case 7:l=o.ops.pop(),o.trys.pop();continue;default:if(!((r=(r=o.trys).length>0&&r[r.length-1])||6!==l[0]&&2!==l[0])){o=0;continue}if(3===l[0]&&(!r||l[1]>r[0]&&l[1]<r[3])){o.label=l[1];break}if(6===l[0]&&o.label<r[1]){o.label=r[1],r=l;break}if(r&&o.label<r[2]){o.label=r[2],o.ops.push(l);break}r[2]&&o.ops.pop(),o.trys.pop();continue}l=t.call(e,o)}catch(e){l=[6,e],i=0}finally{n=r=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}};Object.defineProperty(t,"__esModule",{value:!0}),t.AdPlayerStateStore=void 0;var a=n(80813),u=n(3714),l=n(44468),c=n(29488),d=n(46922),p=n(81524),h=n(18192),f=n(15487),g=n(88844),v=n(93531);t.AdPlayerStateStore=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.TH=null,t}return r(t,e),t.prototype.setAdRestoreState=function(e){this.hasStoredState()&&(this.TH=e,this.WH())},t.prototype.UH=function(){var e,t,n=null!=(t=null==(e=this.storedState)?void 0:e.sourceIdentifier)?t:this.context.sourceContext.sourceIdentifier;return this.context.serviceManager.get(a.ServiceName.SourceStoreService,n)},t.prototype.VH=function(){if(!this.storedState)return NaN;if(!this.TH)return this.storedState.playbackPosition;var e={adBreakDuration:this.TH.adBreakDuration,isLive:this.storedState.isLive,replaceContentDuration:this.TH.replaceContentDuration,playbackPosition:this.storedState.playbackPosition,resumeLiveContentAtPreviousPosition:this.context.settings.RESUME_LIVE_CONTENT_AT_PREVIOUS_POSITION_AFTER_AD_BREAK};return this.storedState.useTimeshiftForRestore?(0,v.calculateTimeshiftRestorationPosition)(e):(0,v.calculatePlaybackRestorationPosition)(e)},t.prototype.WH=function(){var e;if(this.storedState){var t=this.VH();this.context.logger.debug("Saving content restore position: ".concat(t)),null==(e=this.UH())||e.dispatch((0,d.setBackgroun
1dPlaybackState)({kind:h.PlaybackKind.Background,position:t}))}},t.prototype.XH=function(e){var t,n,i,r,o=this,s=this.storedState;if(!s)return Promise.reject(Error("no stored state to restore playback position"));if(s.isStartup)return Promise.resolve(!0);var a=null==(n=null==(t=this.UH())?void 0:t.getState())?void 0:n.playback;if(!a)return Promise.reject(Error("no playback state available to restore playback position"));var c=(0,p.getPlaybackPosition)(a);if(s.useTimeshiftForRestore)return this.internalPlayer.timeShift(c,e),Promise.resolve(!0);if(this.internalPlayer.getPlayerType()===l.PlayerType.Native&&(0,f.isSafari)()&&c<.5)return Promise.resolve(!0);var d=(null==(i=this.context.renderer)?void 0:i.getDuration())||(null==(r=this.context.videoElement)?void 0:r.duration)||s.contentDuration||c;return c>=d?Promise.resolve(!1):new Promise(function(t,n){var i,r=function(){(0,g.clearTimeoutIfDefined)(i),o.internalPlayer.off(u.PlayerEvent.Seeked,s),o.internalPlayer.off(u.PlayerEvent.Error,a)},s=function(){r(),t(!0)},a=function(){r(),n(Error("Error during playback restoration"))};o.internalPlayer.onInternal(u.PlayerEvent.Seeked,s),o.internalPlayer.onInternal(u.PlayerEvent.Error,a),o.internalPlayer.getPlayerType()===l.PlayerType.Native&&((0,f.isWebOS)()||(0,f.isPlayStation4)())&&(i=window.setTimeout(s,5e3)),o.internalPlayer.seek(c,e)||s()})},t.prototype.restore=function(e){return o(this,void 0,void 0,function(){var t,n,i;return s(this,function(r){switch(r.label){case 0:if(!(t=this.storedState))throw Error("no stored state to restore");if(!t.source)throw Error("stored state has no source to restore");return[4,this.loadSource(e)];case 1:return r.sent(),this.restoreBaseState(t),[4,this.XH(e)];case 2:return n=r.sent(),this.restoreSubtitles(t.subtitles),null==(i=this.UH())||i.dispatch((0,d.setMainContentPlaybackState)({kind:h.PlaybackKind.MainContent})),this.clear(),[2,n]}})})},t.prototype.clear=function(){e.prototype.clear.call(this),this.TH=null},t}(c.PlayerStateStore)},67680:function(e,t,n){var i,r,o=this&&this.__assign||function(){return(o=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.AdPreloadSequencerService=t.AdPlaybackPhase=t.AdPreloadState=void 0;var s,a,u=n(80813),l=n(9768),c=n(69251),d=n(23068),p=n(52448);(i=s||(t.AdPreloadState=s={})).None="none",i.Pending="pending",i.Done="done",i.Failed="failed",(r=a||(t.AdPlaybackPhase=a={})).Upcoming="upcoming",r.Playing="playing",r.Retired="retired",t.AdPreloadSequencerService=function(){function e(e){this.context=e,this.Nf=[],this.Pf=!1}return e.prototype.hasTrackedAds=function(){return this.Nf.length>0},e.prototype.preloadAds=function(e){return!!this.trackAds(e)&&(this.Sf(),!0)},e.prototype.trackAds=function(e){var t=this,n=e.map(function(e){return{id:String(e.id),sourceConfig:(0,p.createSourceConfig)(e)}}).filter(function(e){return(0,d.isDefined)(e.sourceConfig.hls)||(0,d.isDefined)(e.sourceConfig.dash)});return!this.Pf&&0!==n.length&&(this.hasTrackedAds()?(this.context.logger.debug("[AdPreloading] Hand-over ignored while ads are tracked; cancel() first"),!1):(this.context.logger.debug("[AdPreloading] Tracking ".concat(n.length," ads for preloading: ").concat(n.map(function(e){return e.id}))),this.Nf=this.Nf.concat(n.map(function(e){return o(o({},e),{sourceIdentifier:(0,c.deriveSourceIdentifier)(e.sourceConfig,t.context.internalPlayerID),preload:s.None,phase:a.Upcoming})})),!0))},e.prototype.notifyAdPlaybackStarted=function(e){if(!this.Pf){var t=this.Nf.find(function(t){return t.id===e&&t.phase!==a.Retired});if(t){this.Qf(t);var n=this.Nf.filter(function(e){return e.phase===a.Upcoming}).length;this.context.logger.debug("[AdPreloading] Ad ".concat(e," started playback (").concat(n," ads upcoming)")),this.Vf(t)}else this.context.logger.debug("[AdPreloading] Ad ".concat(e," started playback but is not tracked"))}},e.prototype.notifyAdFullyBuffered=function(e){var t;this.Pf||(null==(t=this.Rf(a.Playing))?void 0:t.id)!==e||(this.Wf(function(e){return e.phase===a.Retired}),this.Sf())},e.prototype.cancel=function(){this.Pf||(this.Nf.length>0&&this.context.logger.debug("[AdPreloading] Dropping ".concat(this.Nf.length," tracked ads")),this.Wf(function(){return!0}))},e.prototype.dispose=function(){this.Pf||(this.cancel(),this.Pf=!0)},e.prototype.Qf=function(e){if(e.phase!==a.Playing){var t=this.Rf(a.Playing);t&&(this.Wf(function(e){return e.phase===a.Retired}),t.phase=a.Retired),e.phase=a.Playing,this.Of===e&&(this.Of=void 0)}},e.prototype.Rf=function(e){return this.Nf.find(function(t){return t.phase===e})},e.prototype.Sf=function(){var e=this.Nf.find(function(e){return e.phase===a.Upcoming&&e.preload===s.None});!this.Of&&e&&(e.preload=s.Pending,this.Of=e,this.context.logger.debug("[AdPreloading] Preloading ad ".concat(e.id)),this.Tf(e))},e.prototype.Tf=function(e){var t,n=this,i=null==(t=this.context.serviceManager)?void 0:t.get(u.ServiceName.PreloadingService);i?i.preloadSource(e.sourceConfig,l.ADVERTISING_ISSUER_NAME).then(function(){n.Of===e&&(n.Of=void 0),e.preload=s.Done,!n.Pf&&n.Nf.includes(e)&&(n.context.logger.debug("[AdPreloading] Initial segment prefetch queued for ad ".concat(e.id)),e.phase!==a.Upcoming&&n.Vf(e))}).catch(function(t){var i;n.context.logger.debug("[AdPreloading] Failed to preload ad ".concat(e.id,": ").concat(null!=(i=null==t?void 0:t.message)?i:t)),n.Uf(e)}):this.Uf(e)},e.prototype.Uf=function(e){e.preload=s.Failed,this.Of===e&&(this.Of=void 0),this.Nf.includes(e)&&e.phase===a.Upcoming&&(this.Xf(e),this.Pf||this.Sf())},e.prototype.Vf=function(e){var t,n;null==(n=null==(t=this.context.serviceManager)?void 0:t.get(u.ServiceName.PreloadingService))||n.cancelQueuedPrefetches(e.sourceIdentifier)},e.prototype.Wf=function(e){var t=this.Nf.filter(e);this.Nf=this.Nf.filter(function(t){return!e(t)}),this.Of&&t.includes(this.Of)&&(this.Of=void 0);for(var n={},i=0;i<t.length;i++){var r=t[i];n[r.sourceIdentifier]||(n[r.sourceIdentifier]=!0,this.Xf(r))}},e.prototype.Xf=function(e){var t,n,i;this.Nf.some(function(t){return t!==e&&t.sourceIdentifier===e.sourceIdentifier&&(t.phase!==a.Upcoming||t.preload===s.Pending||t.preload===s.Done)})||(e.sourceIdentifier!==(null==(t=this.context.sourceContext)?void 0:t.sourceIdentifier)?(this.context.logger.debug(e.preload===s.Pending?"[AdPreloading] Cancelling the in-flight preload of ad ".concat(e.id):"[AdPreloading] Disposing the preload artifacts of ad ".concat(e.id)),null==(i=null==(n=this.context.serviceManager)?void 0:n.get(u.ServiceName.PreloadingService))||i.cancelPreload(e.sourceIdentifier)):this.Vf(e))},e}()},95217:function(e,t){var n,i;
1Object.defineProperty(t,"__esModule",{value:!0}),t.AdTrackingEvent=void 0,t.pingUrl=function(e){(new Image).src=e},(i=n||(t.AdTrackingEvent=n={})).FirstQuartile="firstQuartile",i.Midpoint="midpoint",i.ThirdQuartile="thirdQuartile"},90176:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.AdvertisingController=t.adTagPlaceholderDefaults=void 0,t.applyModuleSpecificConfig=b,t.createPlayerAdvertisingApi=S;var i=n(4224),r=n(9768),o=n(3714),s=n(4129),a=n(29669),u=n(44468),l=n(87827),c=n(93204),d=n(94685),p=n(34841),h=n(88844),f=n(70850),g=n(88052),v=n(62756),y=n(45392),m={videoLoadTimeout:n(6365).DEFAULT_VIDEO_LOAD_TIMEOUT,strategy:{shouldLoadAdBreak:function(){return!0},shouldPlayAdBreak:function(){return!0},shouldPlaySkippedAdBreaks:function(e){var t=Math.max.apply(Math,e.map(function(e){return e.scheduleTime}));return[e.find(function(e){return e.scheduleTime===t})]}}};function b(e,t,n){g.ModuleManager.get(v.ModuleName.Advertising).bitmovinMarker?(n.debug("Using Bitmovin Advertising Module"),e.playback&&Array.isArray(e.playback.preferredTech)?t.preferredTechnology=e.playback.preferredTech:t.preferredTechnology=[]):g.ModuleManager.get(v.ModuleName.Advert
1ising).imaMarker&&(n.debug("Using IMA Advertising Module"),t.sdkUrl||(t.sdkUrl=e.location.google_ima))}function S(e,t){return new(function(){function n(){}return n.prototype.schedule=function(t){return e.scheduleAd(t)},n.prototype.skip=function(){return t.skip()},n.prototype.list=function(){return t.list()},n.prototype.getActiveAdBreak=function(){return t.getActiveAdBreak()},n.prototype.getActiveAd=function(){return t.getActiveAd()},n.prototype.discardAdBreak=function(e){t.discardAdBreak(e)},n.prototype.isLinearAdActive=function(){return t.isLinearAdActive()},n.prototype.getModuleInfo=function(){return t.getModuleInfo()},n}())}function E(e){return!!e.position}t.adTagPlaceholderDefaults={playbackTime:["[CONTENTPLAYHEAD]"],height:["[HEIGHT]"],width:["[WIDTH]"],domain:["[DOMAIN]"],page:["[SITE]"],referrer:["[REFERRER]"],random:["[random]","[CACHEBUSTING]"],timestamp:["[TIMESTAMP]"]},t.AdvertisingController=function(){function e(e,t){var n,s,a,l,c,d=this;this.context=t,this.sg=function(e){d.ig.isCastingToCAF()||d.og.onTimeChanged(e.time)},this.tg=function(e){return d.og.onSeek(e.position,e.seekTarget)},this.ug=function(e){var t,n;(0,r.isUserInitiatedPause)(e.issuer)&&(null==(n=(t=d.og).onContentPaused)||n.call(t))},this.vg=function(e){return d.rg=e.position},this.wg=function(){return d.tg({position:d.rg,seekTarget:d.ig.getCurrentTime()})},this.xg=function(e){d.ng&&e.code===i.WarningCode.PLAYBACK_COULD_NOT_BE_STARTED&&(d.ng=!1)},this.onVolumeChanged=function(e){return d.og.onVolumeChanged(e)},this.yg=function(){d.kg.length>0&&d.Ag(d.kg.splice(0,d.kg.length)),d.ig.off(o.PlayerEvent.SourceLoaded,d.yg)},this.onPlayerResize=function(e,t){d.og.onResize(e,t,d.ig.getViewMode()===u.ViewMode.Fullscreen)};var p=e.getConfig(!0);this.jg=p.advertising||{},this.ig=e,this.kg=[],this.lg=null,this.mg=!0,this.ng=!1;var h=(n=this.jg,l={},c={},f.Util.deepCopy(c,n),delete c.adBreaks,f.Util.deepCopyMulti(l,m,c),l.hasOwnProperty("withCredentials")||(l.withCredentials=!0),l.hasOwnProperty("disableStorageApi")||(l.disableStorageApi=null!=(a=null==(s=p.storage)?void 0:s.disableStorageApi)&&a),l);b(p,h,t.logger),this.createAdvertisingModule(h),this.jg.adBreaks&&this.jg.adBreaks.length>0&&this.jg.adBreaks.splice(0).forEach(function(e){return d.scheduleAd(e).catch(function(e){return d.context.logger.warn("Failed to schedule ad break",e)})}),this.ig.on(o.PlayerEvent.TimeChanged,this.sg),this.ig.on(o.PlayerEvent.Seek,this.tg),this.ig.on(o.PlayerEvent.Paused,this.ug),this.ig.on(o.PlayerEvent.Warning,this.xg),this.ig.on(o.PlayerEvent.TimeShift,this.vg),this.ig.on(o.PlayerEvent.TimeShifted,this.wg),this.playerAdvertisingApi=S(this,this.og)}return e.prototype.createAdvertisingModule=function(e){var t,n,i=new y.AdManifestHelper(new s.DefaultContentLoader(this.context,{requestType:a.HttpRequestType.MANIFEST_ADS}),e.videoLoadTimeout,null==(t=e.withCredentials)||t,null!=(n=e.disableStorageApi)&&n);this.qg={internalPlayer:this.ig,context:this.context,restoreContentDeferred:null};
1var r=g.ModuleManager.get(v.ModuleName.AdvertisingCore),o=g.ModuleManager.get(v.ModuleName.Advertising),u=new r.AdPlayerDelegate(this.qg);this.og=new o(u,e,i),this.pg=u},e.prototype.updatePlayerContext=function(e){this.context=e,this.qg.context=e},e.prototype.initializeAdModule=function(){this.og.initialize()},e.prototype.scheduleAd=function(e){return E(e)&&(e.discardAfterPlayback=!1!==e.discardAfterPlayback,this.zg(e)&&!this.Cg())?(this.kg.push(e),this.lg||(this.lg=new p.Deferred,this.ig.on(o.PlayerEvent.SourceLoaded,this.yg)),this.lg.promise):this.Bg(e)},e.prototype.zg=function(e){return e.position.includes("%")&&"0%"!==e.position},e.prototype.Ag=function(e){var t=this,n=e.map(function(e){return t.Bg(e)});this.lg&&Promise.all(n).then(function(e){var n=[].concat.apply([],e);t.lg.resolve(n),t.lg=null}).catch(function(e){return t.context.logger.warn("Failed to schedule delayed ad breaks",e)})},e.prototype.Bg=function(e){return E(e)&&this.ig.isLive()&&this.zg(e)?Promise.reject("percentage based ad break positions can not be used for live streams"):this.og.schedule(e)},e.prototype.playPreRollAds=function(){var e,t,n=this,i=Promise.resolve();return this.ng=!0,this.mg&&(null==(t=null==(e=this.context)?void 0:e.videoElement)?void 0:t.prime)&&(i=this.context.videoElement.prime()),Promise.resolve(this.og.beforeContent()).catch(function(e){(0,d.isContextAvailable)(n.context)&&n.context.logger.debug("Failed to trigger preroll ad playback: ",e)}).then(function(){return i}).catch(function(e){(0,d.isContextAvailable)(n.context)&&n.context.logger.debug("Failed to prime video element: ",e)})},e.prototype.playPostRollAds=function(){var e=this,t=!1,n=function(){t=!0,e.ig.off(o.PlayerEvent.AdBreakStarted,n)};return this.ig.on(o.PlayerEvent.AdBreakStarted,n),this.qg.restoreContentDeferred=new p.Deferred,Promise.resolve(this.og.afterContent()).then(function(){return new Promise(function(n,i){if(t){var r,o=function(){e.qg.restoreContentDeferred.promise.then(n).catch(i),s(),(0,h.clearTimeoutIfDefined)(r)},s=(0,c.subscribe)(e.context.store)(function(e){return(0,l.getIsStopped)((0,l.getPlayerState)(e))},o,function(e){return e});r=window.setTimeout(o,1e3)}else n()})}).then(function(){return e.qg.restoreContentDeferred=null}).catch(function(t){e.qg.restoreContentDeferred=null,e.context.logger.debug("Failed to restore content after ad playback",t)})},e.prototype.hasAlreadyRequestedPreRollAds=function(){return this.ng},e.prototype.play=function(){return this.og.resume(),Promise.resolve()},e.prototype.pause=function(){this.og.pause()},e.prototype.getCurrentTime=function(){var e,t=null==(e=this.og)?void 0:e.currentTime();return isNaN(t)?0:null!=t?t:0},e.prototype.getDuration=function(){return this.og.duration()},e.prototype.isLinearAdActive=function(){return this.og.isLinearAdActive()},e.prototype.isPauseAdActive=function(){var e,t;return!!(null==(t=(e=this.og).isPauseAdActive)?void 0:t.call(e))},e.prototype.isPlaying=function(){return this.og.isLinearAdActive(!0)},e.prototype.isPaused=function(){return this.isLinearAdActive()&&!this.isPlaying()},e.prototype.Cg=function(){return this.ig.getDuration()>0},e.prototype.reset=function(){return this.kg=[],this.ng=!1,this.pg.reset(),this.og.reset()},e.prototype.dispose=function(){this.ig.off(o.PlayerEvent.TimeChanged,this.sg),this.ig.off(o.PlayerEvent.Seek,this.tg),this.ig.off(o.PlayerEvent.Paused,this.ug),this.ig.off(o.PlayerEvent.Warning,this.xg),this.ig.off(o.PlayerEvent.TimeShift,this.vg),this.ig.off(o.PlayerEvent.TimeShifted,this.wg),this.ig=null,this.jg=null,this.og.dispose(),this.og=null,this.pg=null},e}()},28412:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.AdvertisingModule=void 0,t.AdvertisingModule=function(e,t,n){this.player=e,this.config=t,this.adManifestHelper=n}},88457:function(e,t){var n,i;Object.defineProperty(t,"__esModule",{value:!0}),t.AdvertisingModuleErrorCode=void 0,(i=n||(t.AdvertisingModuleErrorCode=n={}))[i.AD_TAG_TYPE_NOT_MATCHING=110]="AD_TAG_TYPE_NOT_MATCHING",i[i.COULD_NOT_LOAD_AD_MANIFEST=404]="COULD_NOT_LOAD_AD_MANIFEST",i[i.REQUIRED_PLAYER_MODULE_MISSING=2e3]="REQUIRED_PLAYER_MODULE_MISSING"},23912:function(e,t){var n,i;
1Object.defineProperty(t,"__esModule",{value:!0}),t.AdTagType=void 0,(i=n||(t.AdTagType=n={})).VAST="vast",i.VMAP="vmap",i.VPAID="vpaid"},93531:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.calculatePlaybackRestorationPosition=function(e){var t=e.adBreakDuration,n=e.isLive,i=e.playbackPosition,r=e.replaceContentDuration,o=e.resumeLiveContentAtPreviousPosition;return i+(null!=r?r:!n||o?0:t)},t.calculateTimeshiftRestorationPosition=function(e){var t=e.adBreakDuration,n=e.playbackPosition,r=e.replaceContentDuration,o=e.resumeLiveContentAtPreviousPosition?t:0;return Math.min(n-((0,i.isDefined)(r)?t-r:o),0)};var i=n(23068)},6365:function(e,t){var n,i,r;Object.defineProperty(t,"__esModule",{value:!0}),t.VastApiFramework=t.MediaFileDeliveryType=t.DEFAULT_OVERLAY_AD_BOTTOM_POSITION=t.DEFAULT_VIDEO_LOAD_TIMEOUT=t.NON_SKIPPABLE_IDENTIFIER=t.DEFAULT_PRELOAD_OFFSET=void 0,t.DEFAULT_PRELOAD_OFFSET=0,t.NON_SKIPPABLE_IDENTIFIER=-1,t.DEFAULT_VIDEO_LOAD_TIMEOUT=8e3,t.DEFAULT_OVERLAY_AD_BOTTOM_POSITION="4.5em",(r=n||(t.MediaFileDeliveryType=n={})).Progressive="progressive",r.Streaming="streaming",(i||(t.VastApiFramework=i={})).Vpaid="vpaid"},65185:function(e,t){function n(e){return e.bitrate||(e.maxBitrate+e.minBitrate)/2}Object.defineProperty(t,"__esModule",{value:!0}),t.findMediaFileByResolution=function(e,t,n){return n.reduce(function(n,i){var r=Math.abs(e-n.width)+Math.abs(t-n.height);return Math.abs(e-i.width)+Math.abs(t-i.height)<r?i:n})},t.findMediaFileByBitrate=function(e,t){return t.reduce(function(t,i){var r=n(t),o=n(i),s=Math.abs(r-e);return Math.abs(o-e)<s?i:t})}},7581:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}
1),t.VastErrorCode=t.AdvertisingModuleErrorCode=t.AdTagType=t.AdvertisingCoreModuleDefinition=void 0;var i=n(62756),r=n(43255),o=n(67680),s=n(90176),a=n(88457);Object.defineProperty(t,"AdvertisingModuleErrorCode",{enumerable:!0,get:function(){return a.AdvertisingModuleErrorCode}});var u=n(23912);Object.defineProperty(t,"AdTagType",{enumerable:!0,get:function(){return u.AdTagType}});var l=n(47091);Object.defineProperty(t,"VastErrorCode",{enumerable:!0,get:function(){return l.VastErrorCode}}),t.AdvertisingCoreModuleDefinition={name:i.ModuleName.AdvertisingCore,module:function(){return{AdvertisingController:s.AdvertisingController,AdPlayerDelegate:r.AdPlayerDelegate,AdPreloadSequencerService:o.AdPreloadSequencerService}},dependencies:[i.ModuleName.XML],exports:{AdTagType:u.AdTagType,AdvertisingModuleErrorCode:a.AdvertisingModuleErrorCode,VastErrorCode:l.VastErrorCode}},t.default=t.AdvertisingCoreModuleDefinition},60326:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.VastClientWrapper=void 0;var i=n(6036),r=n(6365),o=n(47091);t.VastClientWrapper=function(){function e(e,t,n){this.cX=new i.VASTClient({allowUsingBrowserStorageApi:!n}),this.cX.vastParser.initParsingStatus(),this.dX=e||r.DEFAULT_VIDEO_LOAD_TIMEOUT,this.eX=t}return e.prototype.parseManifest=function(e,t){var n=this,i=[],r=function(e){i.push({code:e.ERRORCODE})};return this.cX.vastParser.addListener("VAST-error",r),this.cX.vastParser.parseVAST(e,{timeout:this.dX,withCredentials:this.eX,replaceUnavailableAdPodAds:!t}).catch(function(e){return n.cX.vastParser.removeListener("VAST-error",r),Promise.reject({code:e&&e.ERRORCODE||o.VastErrorCode.UNDEFINED_ERROR})}).then(function(e){var t;return n.cX.vastParser.removeListener("VAST-error",r),(null==(t=e.ads)?void 0:t.length)>0?e:i.length>0?Promise.reject(i[0]):Promise.reject({code:o.VastErrorCode.UNDEFINED_ERROR})})},e}()},47091:function(e,t){var n,i;Object.defineProperty(t,"__esModule",{value:!0}),t.VastErrorCode=void 0,(i=n||(t.VastErrorCode=n={}))[i.XML_PARSING_ERROR=100]="XML_PARSING_ERROR",i[i.VAST_SCHEMA_VALIDATION_ERROR=101]="VAST_SCHEMA_VALIDATION_ERROR",i[i.VERSION_NOT_SUPPORTED=102]="VERSION_NOT_SUPPORTED",i[i.TRAFFICKING_ERROR=200]="TRAFFICKING_ERROR",i[i.EXPECTING_DIFFERENT_LINEARITY=201]="EXPECTING_DIFFERENT_LINEARITY",i[i.EXPECTING_DIFFERENT_DURATION=202]="EXPECTING_DIFFERENT_DURATION",i[i.EXPECTING_DIFFERENT_SIZE=203]="EXPECTING_DIFFERENT_SIZE",i[i.GENERAL_WRAPPER_ERROR=300]="GENERAL_WRAPPER_ERROR",i[i.WRAPPER_VAST_URI_TIMEOUT=301]="WRAPPER_VAST_URI_TIMEOUT",i[i.WRAPPER_LIMIT_REACHED=302]="WRAPPER_LIMIT_REACHED",i[i.NO_ADS_VAST_RESPONSE=303]="NO_ADS_VAST_RESPONSE",i[i.GENERAL_LINEAR_ERROR=400]="GENERAL_LINEAR_ERROR",i[i.FILE_NOT_FOUND=401]="FILE_NOT_FOUND",i[i.MEDIAFILE_URI_TIMEOUT=402]="MEDIAFILE_URI_TIMEOUT",i[i.NO_SUPPORTED_MEDIAFILE=403]="NO_SUPPORTED_MEDIAFILE",i[i.PROBLEM_DISPLAYING_MEDIAFILE=405]="PROBLEM_DISPLAYING_MEDIAFILE",i[i.GENERAL_NONLINEARADS_ERROR=500]="GENERAL_NONLINEARADS_ERROR",i[i.NONLINEAR_AD_INVALID_DIMENSIONS=501]="NONLINEAR_AD_INVALID_DIMENSIONS",i[i.UNABLE_TO_FETCH_NONLINEAR_RESOURCE=502]="UNABLE_TO_FETCH_NONLINEAR_RESOURCE",i[i.NO_SUPPORTED_NONLINEAR_RESOURCE_TYPE=503]="NO_SUPPORTED_NONLINEAR_RESOURCE_TYPE",i[i.GENERAL_COMPANIONADS_ERROR=600]="GENERAL_COMPANIONADS_ERROR",i[i.COMPANION_AD_INVALID_DIMENSIONS=601]="COMPANION_AD_INVALID_DIMENSIONS",i[i.UNABLE_TO_DISPLAY_REQUIRED_COMPANION=602]="UNABLE_TO_DISPLAY_REQUIRED_COMPANION",i[i.UNABLE_TO_FETCH_COMPANION_RESOURCE=603]="UNABLE_TO_FETCH_COMPANION_RESOURCE",i[i.NO_SUPPORTED_COMPANION_RESOURCE_TYPE=604]="NO_SUPPORTED_COMPANION_RESOURCE_TYPE",i[i.UNDEFINED_ERROR=900]="UNDEFINED_ERROR",i[i.GENERAL_VPAID_ERROR=901]="GENERAL_VPAID_ERROR"},5838:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.VmapExtractor=void 0;var i=n(70850),r=n(88052),o=n(62756),s=n(45392),a=n(88457),u=n(23912),l=n(6365),c=n(47091);t.VmapExtractor=function(){function e(){}return e.xml2js=function(e){return(0,r.ModuleManager.get(o.ModuleName.XML).parseXML)(e,{decodeEntities:!1,useArrayRepresentationForChildren:!0})},e.js2xml=function(e){return(0,r.ModuleManager.get(o.ModuleName.XML).parseJSONtoXML)(e)},e.extractAdBreakConfigs=function(t,n){return e.getParsedManifest(t.tag.url,n).then(function(n){return n.manifest.VMAP?Promise.resolve({adBreakConfigs:e.parseVmapAdBreaks(n.manifest,t),downloadTiming:n.downloadTiming}):Promise.reject({code:a.AdvertisingModuleErrorCode.AD_TAG_TYPE_NOT_MATCHING})})},e.getParsedManifest=function(t,n){return n.downloadVmapManifest(t).catch(function(){return Promise.reject({code:a.AdvertisingModuleErrorCode.COULD_NOT_LOAD_AD_MANIFEST})}).then(function(t){if(!t.body)return Promise.reject({code:c.VastErrorCode.XML_PARSING_ERROR});try{var n=e.xml2js(t.body),i=n.success?n.parsed:{},r={downloadTime:t.elapsedTime,timeToFirstByte:t.timeToFirstByte};return Promise.resolve({manifest:i,downloadTiming:r})}catch(e){return Promise.reject({code:c.VastErrorCode.XML_PARSING_ERROR})}})},e.parseVmapAdBreaks=function(t,n){return e.extractAdBreaks(t).map(function(e){var t,r={id:e.id||i.Util.generateUniqueId(),tag:{url:e.tag,type:u.AdTagType.VAST},position:e.offset,preloadOffset:null!=(t=n.preloadOffset)?t:l.DEFAULT_PRELOAD_OFFSET};n.hasOwnProperty("replaceContentDuration")&&(r.replaceContentDuration=n.replaceContentDuration),n.passthroughMode&&(r.passthroughMode=n.passthroughMode);var o={publicAdBreakConfig:r};return e.trackingEvents&&Object.keys(e.trackingEvents).length>0&&(o.trackingEvents=e.trackingEvents),o})||[]},e.extractAdBreaks=function(t){return t.VMAP?t.VMAP.AdBreak.map(function(t){var n=t._breakId,i=t._timeOffset;switch(i){case"start":i="pre";break;case"end":i="post"}var r=e.getAdBreakUri(t),o=[];return t.TrackingEvents&&t.TrackingEvents[0]&&t.TrackingEvents[0].Tracking&&t.TrackingEvents[0].Tracking.forEach(function(e){var t=e._event.toLocaleLowerCase();o.push({type:t,url:e.toString()})}),{id:n,offset:i,tag:r,trackingEvents:o}}):[]},e.getAdBreakUri=function(t){var n,i,r,o=null==(n=t.AdSource)?void 0:n[0],a=null==(i=null==o?void 0:o.AdTagURI)?void 0:i[0],u=null==(r=null==o?void 0:o.VASTAdData)?void 0:r[0];return(null==a?void 0:a.toString)?a.toString():u?(0,s.toDataUri)(e.js2xml(u)):""},e}()}
1,63207:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.Ad=void 0,t.Ad=function(){this.id=null,this.wrapperAdIds=[],this.sequence=null,this.system=null,this.title=null,this.description=null,this.advertiser=null,this.pricing=null,this.survey=null,this.errorURLTemplates=[],this.impressionURLTemplates=[],this.creatives=[],this.extensions=[],this.verifications=[]}},19637:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.AdExtension=void 0,t.AdExtension=function(){function e(){this.name=null,this.value=null,this.attributes={},this.children=[]}return e.prototype.isEmpty=function(){return null===this.value&&0===Object.keys(this.attributes).length&&0===this.children.length},e}()},31472:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.CompanionAd=void 0,t.CompanionAd=function(){this.id=null,this.width=0,this.height=0,this.type=null,this.staticResource=null,this.htmlResource=null,this.iframeResource=null,this.altText=null,this.companionClickThroughURLTemplate=null,this.companionClickTrackingURLTemplates=[],this.trackingEvents={}}},36828:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.Creative=void 0,t.Creative=function(e){void 0===e&&(e={}),this.id=e.id||null,this.adId=e.adId||null,this.universalAdId=e.universalAdId||null,this.sequence=e.sequence||null,this.apiFramework=e.apiFramework||null,this.trackingEvents={}}},81214:function(e,t,n){var i,r=this&&this.__extends||(i=function(e,t){return(i=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])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.CreativeCompanion=void 0,t.CreativeCompanion=function(e){function t(t){void 0===t&&(t={});var n=e.call(this,t)||this;return n.type="companion",n.variations=[],n}return r(t,e),t}(n(36828).Creative)},77615:function(e,t,n){var i,r=this&&this.__extends||(i=function(e,t){return(i=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])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.CreativeLinear=void 0,t.CreativeLinear=function(e){function t(t){void 0===t&&(t={});var n=e.call(this,t)||this;return n.type="linear",n.duration=0,n.skipDelay=null,n.mediaFiles=[],n.videoClickThroughURLTemplate=null,n.videoClickTrackingURLTemplates=[],n.videoCustomClickURLTemplates=[],n.adParameters=null,n.icons=[],n}return r(t,e),t}(n(36828).Creative)},35475:function(e,t,n){var i,r=this&&this.__extends||(i=function(e,t){return(i=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])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.CreativeNonLinear=void 0,t.CreativeNonLinear=function(e){function t(t){void 0===t&&(t={});var n=e.call(this,t)||this;return n.type="nonlinear",n.variations=[],n}return r(t,e),t}(n(36828).Creative)},50199:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.Icon=void 0,t.Icon=function(){this.program=null,this.height=0,this.width=0,this.xPosition=0,this.yPosition=0,this.apiFramework=null,this.offset=null,this.duration=0,this.type=null,this.staticResource=null,this.htmlResource=null,this.iframeResource=null,this.iconClickThroughURLTemplate=null,this.iconClickTrackingURLTemplates=[],this.iconViewTrackingURLTemplate=null}}
vendor: 1,970 bytes, line 1
1,36629:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.MediaFile=void 0,t.MediaFile=function(){this.id=null,this.fileURL=null,this.deliveryType="progressive",this.mimeType=null,this.codec=null,this.bitrate=0,this.minBitrate=0,this.maxBitrate=0,this.width=0,this.height=0,this.apiFramework=null,this.scalable=null,this.maintainAspectRatio=null}},57219:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.NonLinearAd=void 0,t.NonLinearAd=function(){this.id=null,this.width=0,this.height=0,this.expandedWidth=0,this.expandedHeight=0,this.scalable=!0,this.maintainAspectRatio=!0,this.minSuggestedDuration=0,this.apiFramework="static",this.type=null,this.staticResource=null,this.htmlResource=null,this.iframeResource=null,this.nonlinearClickThroughURLTemplate=null,this.nonlinearClickTrackingURLTemplates=[],this.adParameters=null}},71119:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.parseAd=function(e){var t=e.childNodes;for(var n in t){var i=t[n];if(-1!==["Wrapper","InLine"].indexOf(i.nodeName)){if(u.parserUtils.copyNodeAttribute("id",e,i),u.parserUtils.copyNodeAttribute("sequence",e,i),"Wrapper"===i.nodeName)return function(e){var t=l(e),n=u.parserUtils.childByName(e,"VASTAdTagURI");if(n?t.nextWrapperURL=u.parserUtils.parseNodeText(n):(n=u.parserUtils.childByName(e,"VASTAdTagURL"))&&(t.nextWrapperURL=u.parserUtils.parseNodeText(u.parserUtils.childByName(n,"URL"))),t.creatives.forEach(function(e){if(-1!==["linear","nonlinear"].indexOf(e.type)){if(e.trackingEvents){t.trackingEvents||(t.trackingEvents={}),t.trackingEvents[e.type]||(t.trackingEvents[e.type]={});var n=function(n){var i=e.trackingEvents[n];t.trackingEvents[e.type][n]||(t.trackingEvents[e.type][n]=[]),i.forEach(function(i){t.trackingEvents[e.type][n].push(i)})};for(var i in e.trackingEvents)n(i)}e.videoClickTrackingURLTemplates&&(t.videoClickTrackingURLTemplates||(t.videoClickTrackingURLTemplates=[]),e.videoClickTrackingURLTemplates.forEac
1h(function(e){t.videoClickTrackingURLTemplates.push(e)})),e.videoClickThroughURLTemplate&&(t.videoClickThroughURLTemplate=e.videoClickThroughURLTemplate),e.videoCustomClickURLTemplates&&(t.videoCustomClickURLTemplates||(t.videoCustomClickURLTemplates=[]),e.videoCustomClickURLTemplates.forEach(function(e){t.videoCustomClickURLTemplates.push(e)}))}}),t.nextWrapperURL)return t}(i);if("InLine"===i.nodeName)return l(i)}}},t.parseExtensions=c;var i=n(63207),r=n(19637),o=n(93088),s=n(2035),a=n(64815),u=n(75065);function l(e){var t=e.childNodes,n=new i.Ad;for(var r in n.id=e.getAttribute("id")||null,n.sequence=e.getAttribute("sequence")||null,t){var l=t[r];switch(l.nodeName){case"Error":n.errorURLTemplates.push(u.parserUtils.parseNodeText(l));break;case"Impression":n.impressionURLTemplates.push(u.parserUtils.parseNodeText(l));break;case"Creatives":u.parserUtils.childrenByName(l,"Creative").forEach(function(e){var t={id:e.getAttribute("id")||null,adId:(r=e).getAttribute("AdID")||r.getAttribute("adID")||r.getAttribute("adId")||null,sequence:e.getAttribute("sequence")||null,apiFramework:e.getAttribute("apiFramework")||null};for(var i in e.childNodes){var r,l,c=e.childNodes[i];switch(c.nodeName){case"UniversalAdId":t.universalAdId={idRegistry:(l=c).getAttribute("idRegistry")||"unknown",value:u.parserUtils.parseNodeText(l)||"unknown"};break;case"Linear":var d=(0,s.parseCreativeLinear)(c,t);d&&n.creatives.push(d);break;case"NonLinearAds":var p=(0,a.parseCreativeNonLinear)(c,t);p&&n.creatives.push(p);break;case"CompanionAds":var h=(0,o.parseCreativeCompanion)(c,t);h&&n.creatives.push(h)}}});break;case"Extensions":n.extensions=c(u.parserUtils.childrenByName(l,"Extension"),n);break;case"AdSystem":n.system={value:u.parserUtils.parseNodeText(l),version:l.getAttribute("version")||null};break;case"AdTitle":n.title=u.parserUtils.parseNodeText(l);break;case"Description":n.description=u.parserUtils.parseNodeText(l);break;
vendor: 24,900 bytes, line 1
1case"Advertiser":n.advertiser={name:u.parserUtils.parseNodeText(l),id:l.getAttribute("id")||null};break;case"Pricing":n.pricing={value:u.parserUtils.parseNodeText(l),model:l.getAttribute("model")||null,currency:l.getAttribute("currency")||null};break;case"Survey":n.survey={uri:u.parserUtils.parseNodeText(l),type:l.getAttribute("type")||null};break;case"AdVerifications":d(n.verifications,u.parserUtils.childrenByName(l,"Verification"))}}return n}function c(e,t){var n=[];return e.forEach(function(e){var i=function e(t,n){if("#comment"===t.nodeName)return null;var i=new r.AdExtension,o=t.attributes,s=t.childNodes;if(i.name=t.nodeName,t.attributes){for(var a in o)if(o.hasOwnProperty(a)){var l=o[a];l.nodeName&&l.nodeValue&&(i.attributes[l.nodeName]=l.nodeValue)}}for(var c in s)if(s.hasOwnProperty(c)){if("AdVerifications"===s[c].nodeName){d(n.verifications,u.parserUtils.childrenByName(s[c],"Verification"));continue}var p=e(s[c],n);p&&i.children.push(p)}if(0===i.children.length||1===i.children.length&&["#cdata-section","#text"].indexOf(i.children[0].name)>=0){var h=u.parserUtils.parseNodeText(t);""!==h&&(i.value=h),i.children=[]}return i.isEmpty()?null:i}(e,t);i&&n.push(i)}),n}function d(e,t){var n=["Verification","JavaScriptResource","ExecutableResource","TrackingEvents","Tracking","VerificationParameters"],i=function(e){var t={},r=u.parserUtils.parseNodeText(e);return Object.keys(e.attributes).forEach(function(n){var i=e.attributes[n].nodeName,r=e.attributes[n].nodeValue;i&&r&&(t[i]=r)}),"#comment"!==e.nodeName&&""!==r&&(e.children&&e.children.length>0?e.childNodes.forEach(function(e){n.includes(e.nodeName)&&(t[e.nodeName]||(t[e.nodeName]=[]),t[e.nodeName].push(i(e)))}):t.content=r),t};t.forEach(function(t){var n=i(t);e.push(n)})}},93088:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.parseCreativeCompanion=function(e,t){var n=new r.CreativeCompanion(t);return o.parserUtils.childrenByName(e,"Companion").forEach(function(e){var t=new i.CompanionAd;t.id=e.getAttribute("id")||null,t.width=e.getAttribute("width"),t.height=e.getAttribute("height"),t.companionClickTrackingURLTemplates=[],o.parserUtils.childrenByName(e,"HTMLResource").forEach(function(e){t.type=e.getAttribute("creativeType")||"text/html",t.htmlResource=o.parserUtils.parseNodeText(e)}),o.parserUtils.childrenByName(e,"IFrameResource").forEach(function(e){t.type=e.getAttribute("creativeType")||0,t.iframeResource=o.parserUtils.parseNodeText(e)}),o.parserUtils.childrenByName(e,"StaticResource").forEach(function(n){t.type=n.getAttribute("creativeType")||0,o.parserUtils.childrenByName(e,"AltText").forEach(function(e){t.altText=o.parserUtils.parseNodeText(e)}),t.staticResource=o.parserUtils.parseNodeText(n)}),o.parserUtils.childrenByName(e,"TrackingEvents").forEach(function(e){o.parserUtils.childrenByName(e,"Tracking").forEach(function(e){var n=e.getAttribute("event"),i=o.parserUtils.parseNodeText(e);n&&i&&(null==t.trackingEvents[n]&&(t.trackingEvents[n]=[]),t.trackingEvents[n].push(i))})}),o.parserUtils.childrenByName(e,"CompanionClickTracking").forEach(function(e){t.companionClickTrackingURLTemplates.push(o.parserUtils.parseNodeText(e))}),t.companionClickThroughURLTemplate=o.parserUtils.parseNodeText(o.parserUtils.childByName(e,"CompanionClickThrough")),t.companionClickTrackingURLTemplate=o.parserUtils.parseNodeText(o.parserUtils.childByName(e,"CompanionClickTracking")),n.variations.push(t)}),n};var i=n(31472),r=n(81214),o=n(75065)},2035:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.parseCreativeLinear=function(e,t){var n,a=new i.CreativeLinear(t);a.duration=s.parserUtils.parseDuration(s.parserUtils.parseNodeText(s.parserUtils.childByName(e,"Duration")));var u=e.getAttribute("skipoffset");if(null==u)a.skipDelay=null;else if("%"===u.charAt(u.length-1)&&-1!==a.duration){var l=parseInt(u,10);a.skipDelay=a.duration*(l/100)}else a.skipDelay=s.parserUtils.parseDuration(u);var c=s.parserUtils.childByName(e,"VideoClicks");c&&(a.videoClickThroughURLTemplate=s.parserUtils.parseNodeText(s.parserUtils.childByName(c,"ClickThrough")),s.parserUtils.childrenByName(c,"ClickTracking").forEach(function(e){a.videoClickTrackingURLTemplates.push(s.parserUtils.parseNodeText(e))}),s.parserUtils.childrenByName(c,"CustomClick").forEach(function(e){a.videoCustomClickURLTemplates.push(s.parserUtils.parseNodeText(e))}));var d=s.parserUtils.childByName(e,"AdParameters");d&&(a.adParameters=s.parserUtils.parseNodeText(d)),s.parserUtils.childrenByName(e,"TrackingEvents").forEach(function(e){s.parserUtils.childrenByName(e,"Tracking").forEach(function(e){var t=e.getAttribute("event"),i=s.parserUtils.parseNodeText(e);if(t&&i){if("progress"===t){if(!(n=e.getAttribute("offset")))return;t="%"===n.charAt(n.length-1)?"progress-".concat(n):"progress-".concat(Math.round(s.parserUtils.parseDuration(n)))}null==a.trackingEvents[t]&&(a.trackingEvents[t]=[]),a.trackingEvents[t].push(i)}})}),s.parserUtils.childrenByName(e,"MediaFiles").forEach(function(e){s.parserUtils.childrenByName(e,"MediaFile").forEach(function(e){var t=new o.MediaFile;t.id=e.getAttribute("id"),t.fileURL=s.parserUtils.parseNodeText(e),t.deliveryType=e.getAttribute("delivery"),t.codec=e.getAttribute("codec"),t.mimeType=e.getAttribute("type"),t.apiFramework=e.getAttribute("apiFramework"),t.bitrate=parseInt(e.getAttribute("bitrate")||0),t.minBitrate=parseInt(e.getAttribute("minBitrate")||0),t.maxBitrate=parseInt(e.getAttribute("maxBitrate")||0),t.width=parseInt(e.getAttribute("width")||0),t.height=parseInt(e.getAttribute("height")||0);var n=e.getAttribute("scalable");n&&"string"==typeof n&&("true"===(n=n.toLowerCase())?t.scalable=!0:"false"===n&&(t.scalable=!1));var i=e.getAttribute("maintainAspectRatio");i&&"string"==typeof i&&("true"===(i=i.toLowerCase())?t.maintainAspectRatio=!0:"false"===i&&(t.maintainAspectRatio=!1)),a.mediaFiles.push(t)})});var p=s.parserUtils.childByName(e,"Icons");return p&&s.parserUtils.childrenByName(p,"Icon").forEach(function(e){var t,n,i=new r.Icon;i.program=e.getAttribute("program"),i.height=parseInt(e.getAttribute("height")||0),i.width=parseInt(e.getAttribute("width")||0),i.xPosition=-1!==["left","right"].indexOf(t=e.getAttribute("xPosition"))?t:parseInt(t||0),i.yPosition=-1!==["top","bottom"].indexOf(n=e.getAttribute("yPosition"))?n:parseInt(n||0),i.apiFramework=e.getAttribute("apiFramework"),i.offset=s.parserUtils.parseDuration(e.getAttribute("offset")),i.duration=s.parserUtils.parseDuration(e.getAttribute("duration")),s.parserUtils.childrenByName(e,"HTMLResource").forEach(function(e){i.type=e.getAttribute("creativeType")||"text/html",i.htmlResource=s.parserUtils.parseNodeText(e)}),s.parserUtils.childrenByName(e,"IFrameResource").forEach(function(e){i.type=e.getAttribute("creativeType")||0,i.iframeResource=s.parserUtils.parseNodeText(e)}),s.parserUtils.childrenByName(e,"StaticResource").forEach(function(e){i.type=e.getAttribute("creativeType")||0,i.staticResource=s.parserUtils.parseNodeText(e)});var o=s.parserUtils.childByName(e,"IconClicks");o&&(i.iconClickThroughURLTemplate=s.parserUtils.parseNodeText(s.parserUtils.childByName(o,"IconClickThrough")),s.parserUtils.childrenByName(o,"IconClickTracking").forEach(function(e){i.iconClickTrackingURLTemplates.push(s.parserUtils.parseNodeText(e))})),i.iconViewTrackingURLTemplate=s.parserUtils.parseNodeText(s.parserUtils.childByName(e,"IconViewTracking")),a.icons.push(i)}),a};var i=n(77615),r=n(50199),o=n(36629),s=n(75065)},64815:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.parseCreativeNonLinear=function(e,t){var n=new i.CreativeNonLinear(t);return o.parserUtils.childrenByName(e,"TrackingEvents").forEach(function(e){var t,i;o.parserUtils.childrenByName(e,"Tracking").forEach(function(e){t=e.getAttribute("event"),i=o.parserUtils.parseNodeText(e),t&&i&&(null==n.trackingEvents[t]&&(n.trackingEvents[t]=[]),n.trackingEvents[t].push(i))})}),o.parserUtils.childrenByName(e,"NonLinear").forEach(function(e){var t=new r.NonLinearAd;t.id=e.getAttribute("id")||null,t.width=e.getAttribute("width"),t.height=e.getAttribute("height"),t.expandedWidth=e.getAttribute("expandedWidth"),t.expandedHeight=e.getAttribute("expandedHeight"),t.scalable=o.parserUtils.parseBoolean(e.getAttribute("scalable")),t.maintainAspectRatio=o.parserUtils.parseBoolean(e.getAttribute("maintainAspectRatio")),t.minSuggestedDuration=o.parserUtils.parseDuration(e.getAttribute("minSuggestedDuration")),t.apiFramework=e.getAttribute("apiFramework"),o.parserUtils.childrenByName(e,"HTMLResource").forEach(function(e){t.type=e.getAttribute("creativeType")||"text/html",t.htmlResource=o.parserUtils.parseNodeText(e)}),o.parserUtils.childrenByName(e,"IFrameResource").forEach(function(e){t.type=e.getAttribute("creativeType")||0,t.iframeResource=o.parserUtils.parseNodeText(e)}),o.parserUtils.childrenByName(e,"StaticResource").forEach(function(e){t.type=e.getAttribute("creativeType")||0,t.staticResource=o.parserUtils.parseNodeText(e)});var i=o.parserUtils.childByName(e,"AdParameters");i&&(t.adParameters=o.parserUtils.parseNodeText(i)),t.nonlinearClickThroughURLTemplate=o.parserUtils.parseNodeText(o.parserUtils.childByName(e,"NonLinearClickThrough")),o.parserUtils.childrenByName(e,"NonLinearClickTracking").forEach(function(e){t.nonlinearClickTrackingURLTemplates.push(o.parserUtils.parseNodeText(e))}),n.variations.push(t)}),n};var i=n(35475),r=n(57219),o=n(75065)},75065:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.parserUtils=void 0;var i=n(11417);t.parserUtils={childByName:function(e,t){var n=e.childNodes;for(var i in n){var r=n[i];if(r.nodeName===t)return r}},childrenByName:function(e,t){var n=[],i=e.childNodes;for(var r in i){var o=i[r];o.nodeName===t&&n.push(o)}return n},resolveVastAdTagURI:function(e,t){if(!t)return e;if(0===e.indexOf("//")){var n=location.protocol;return"".concat(n).concat(e)}if(-1===e.indexOf("://")){var i=t.slice(0,t.lastIndexOf("/"));return"".concat(i,"/").concat(e)}return e},parseBoolean:function(e){return -1!==["true","TRUE","1"].indexOf(e)},parseNodeText:function(e){return e&&(e.textContent||e.text||"").trim()},copyNodeAttribute:function(e,t,n){var i=t.getAttribute(e);i&&n.setAttribute(e,i)},parseDuration:function(e){if(null==e)return -1;if(i.util.isNumeric(e))return parseInt(e);var t=e.split(":");if(3!==t.length)return -1;var n=t[2].split("."),r=parseInt(n[0]);2===n.length&&(r+=parseFloat("0.".concat(n[1])));var o=parseInt(60*t[1]),s=parseInt(60*t[0]*60);return isNaN(s)||isNaN(o)||isNaN(r)||o>3600||r>60?-1:s+o+r},splitVAST:function(e){var t=[],n=null;return e.forEach(function(i,r){if(i.sequence&&(i.sequence=parseInt(i.sequence,10)),i.sequence>1){var o=e[r-1];if(o&&o.sequence===i.sequence-1)return void(n&&n.push(i));delete i.sequence}n=[i],t.push(n)}),t},mergeWrapperAdData:function(e,t){if(e.errorURLTemplates=t.errorURLTemplates.concat(e.errorURLTemplates),e.impressionURLTemplates=t.impressionURLTemplates.concat(e.impressionURLTemplates),e.extensions=t.extensions.concat(e.extensions),e.verifications=t.verifications.concat(e.verifications),e.wrapperAdIds.push(t.id),e.creatives.forEach(function(e){if(t.trackingEvents&&t.trackingEvents[e.type])for(var n in t.trackingEvents[e.type]){var i=t.trackingEvents[e.type][n];e.trackingEvents[n]||(e.trackingEvents[n]=[]),e.trackingEvents[n]=e.trackingEvents[n].concat(i)}}),t.videoClickTrackingURLTemplates&&t.videoClickTrackingURLTemplates.length&&e.creatives.forEach(function(e){"linear"===e.type&&(e.videoClickTrackingURLTemplates=e.videoClickTrackingURLTemplates.concat(t.videoClickTrackingURLTemplates))}),t.videoCustomClickURLTemplates&&t.videoCustomClickURLTemplates.length&&e.creatives.forEach(function(e){"linear"===e.type&&(e.videoCustomClickURLTemplates=e.videoCustomClickURLTemplates.concat(t.videoCustomClickURLTemplates))}),t.videoClickThroughURLTemplate&&e.creatives.forEach(function(e){"linear"===e.type&&null==e.videoClickThroughURLTemplate&&(e.videoClickThroughURLTemplate=t.videoClickThroughURLTemplate)}),e.fallbackAdSequence&&e.sequence!==e.fallbackAdSequence)(t.sequence||t.fallbackAdSequence)&&(e.sequence=null,e.fallbackAdSequence=t.fallbackAdSequence||t.sequence);else if(t.fallbackAdSequence)e.sequence=null,e.fallbackAdSequence=t.fallbackAdSequence||t.sequence;else{if(!t.sequence&&!t.fallbackAdSequence)return;e.sequence=t.sequence}}}},29902:function(e,t,n){var i,r=this&&this.__extends||(i=function(e,t){return(i=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])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__spreadArray||function(e,t,n){if(n||2==arguments.length)for(var i,r=0,o=t.length;r<o;r++)!i&&r in t||(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.VASTParser=void 0;var s=n(71119),a=n(37007),u=n(75065),l=n(27294),c=n(11417),d=n(71076),p={ERRORCODE:900,extensions:[]};t.VASTParser=function(e){function t(){var t=e.call(this)||this;return t.remainingAds=[],t.parentURLs=[],t.errorURLTemplates=[],t.rootErrorURLTemplates=[],t.maxWrapperDepth=null,t.URLTemplateFilters=[],t.fetchingOptions={},t.currentAdSequence=null,t}return r(t,e),t.prototype.addURLTemplateFilter=function(e){"function"==typeof e&&this.URLTemplateFilters.push(e)},t.prototype.removeURLTemplateFilter=function(){this.URLTemplateFilters.pop()},t.prototype.countURLTemplateFilters=function(){return this.URLTemplateFilters.length},t.prototype.clearURLTemplateFilters=function(){this.URLTemplateFilters=[]},t.prototype.trackVastError=function(e,t){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];this.emit("VAST-error",Object.assign.apply(Object,o([p,t],n,!1))),c.util.track(e,t)},t.prototype.getErrorURLTemplates=function(){return this.rootErrorURLTemplates.concat(this.errorURLTemplates)},t.prototype.fetchVAST=function(e,t,n){var i=this;return new Promise(function(r,o){i.URLTemplateFilters.forEach(function(t){e=t(e)}),i.parentURLs.push(e),i.emit("VAST-resolving",{url:e,wrapperDepth:t,originalUrl:n}),i.urlHandler.get(e,i.fetchingOptions,function(t,n){i.emit("VAST-resolved",{url:e,error:t}),t?o(t):r(n)})})},t.prototype.initParsingStatus=function(e){void 0===e&&(e={}),this.rootURL="",this.remainingAds=[],this.parentURLs=[],this.errorURLTemplates=[],this.rootErrorURLTemplates=[],this.maxWrapperDepth=e.wrapperLimit||10,this.fetchingOptions={timeout:e.timeout,withCredentials:e.withCredentials},this.urlHandler=e.urlhandler||l.urlHandler},t.prototype.getRemainingAds=function(e){var t=this;if(0===this.remainingAds.length)return Promise.reject(Error("No more ads are available for the given VAST"));var n=e?c.util.flatten(this.remainingAds):this.remainingAds.shift();return this.errorURLTemplates=[],this.parentURLs=[],this.resolveAds(n,{wrapperDepth:0,originalUrl:this.rootURL}).then(function(e){return t.buildVASTResponse(e)})},t.prototype.getAndParseVAST=function(e,t){var n=this;return void 0===t&&(t={}),this.initParsingStatus(t),this.rootURL=e,this.fetchVAST(e).then(function(i){return t.originalUrl=e,t.isRootVAST=!0,n.parse(i,t).then(function(e){return n.buildVASTResponse(e,t)})})},t.prototype.parseVAST=function(e,t){var n=this;return void 0===t&&(t={}),this.initParsingStatus(t),t.isRootVAST=!0,this.parse(e,t).then(function(e){return n.buildVASTResponse(e,t)})},t.prototype.getPodAds=function(e){return e.filter(function(e){return null!=e.sequence})},t.prototype.getStandaloneAds=function(e){return e.filter(function(e){return null==e.sequence})},t.prototype.hasMediaFiles=function(e){return!(!e||null!=e.errorCode)&&(Array.isArray(e.creatives)?e.creatives:[]).some(function(e){return e.mediaFiles&&e.mediaFiles.length>0})},t.prototype.replaceUnavailableAdPodAds=function(e){var t=this,n=this.getPodAds(e),i=this.getStandaloneAds(e).filter(this.hasMediaFiles);return 0===n.length||0===i.length?e:(n=n.map(function(e){return t.hasMediaFiles(e)?e:i.shift()}).filter(Boolean),i.forEach(function(e){return e.isFallback=!0}),n.concat(i))},t.prototype.markFallbackAds=function(e){return this.getPodAds(e).length>0&&this.getStandaloneAds(e).forEach(function(e){return e.isFallback=!0}),e},t.prototype.buildVASTResponse=function(e,t){void 0===t&&(t={});var n=new d.VASTResponse;return n.errorURLTemplates=this.getErrorURLTemplates(),e.forEach(function(e){return e.isFallback=!1}),n.ads=t.replaceUnavailableAdPodAds?this.replaceUnavailableAdPodAds(e):this.markFallbackAds(e),this.completeWrapperResolving(n),n},t.prototype.parse=function(e,t){var n=this,i=t.resolveAll,r=t.wrapperSequence,o=void 0===r?null:r,a=t.originalUrl,l=t.wrapperDepth,c=t.isRootVAST,d=void 0!==c&&c,p=t.parentAdSequence,h=void 0===p?null:p;if(!e||!e.documentElement||"VAST"!==e.documentElement.nodeName)return Promise.reject(Error("Invalid VAST XMLDocument"));var f=[],g=e.documentElement.childNodes;for(var v in g){var y=g[v];if("Error"===y.nodeName){var m=u.parserUtils.parseNodeText(y);d?this.rootErrorURLTemplates.push(m):this.errorURLTemplates.push(m)}if("Ad"===y.nodeName){var b=(0,s.parseAd)(y);b?f.push(b):this.trackVastError(this.getErrorURLTemplates(),{ERRORCODE:101})}}var S=f.length,E=f[S-1];return 1===S&&null!=o&&E&&!E.sequence&&(E.sequence=o),f.forEach(function(e){return n.handleFallbackAdSequence(e,h)}),!1===(void 0===i||i)&&(this.remainingAds=u.parserUtils.splitVAST(f),f=this.remainingAds.shift()),this.resolveAds(f,{wrapperDepth:void 0===l?0:l,originalUrl:void 0===a?null:a})},t.prototype.handleFallbackAdSequence=function(e,t){null==e.sequence?e.fallbackAdSequence=t||this.currentAdSequence:this.currentAdSequence=e.sequence},t.prototype.resolveAds=function(e,t){var n=this;void 0===e&&(e=[]);var i=t.wrapperDepth,r=t.originalUrl,o=[];return e.forEach(function(e){var t=n.resolveWrappers(e,i,r);o.push(t)}),Promise.all(o).then(function(e){var t=c.util.flatten(e);if(!t&&n.remainingAds.length>0){var o=n.remainingAds.shift();return n.resolveAds(o,{wrapperDepth:i,originalUrl:r})}return t})},t.prototype.resolveWrappers=function(e,t,n){var i=this;return new Promise(function(r){if(t++,!e.nextWrapperURL)return delete e.nextWrapperURL,r(e);if(t>=i.maxWrapperDepth||-1!==i.parentURLs.indexOf(e.nextWrapperURL))return e.errorCode=302,delete e.nextWrapperURL,r(e);e.nextWrapperURL=u.parserUtils.resolveVastAdTagURI(e.nextWrapperURL,n);var o=e.sequence;n=e.nextWrapperURL,i.fetchVAST(e.nextWrapperURL,t,n).then(function(s){return i.parse(s,{originalUrl:n,wrapperSequence:o,wrapperDepth:t,parentAdSequence:e.sequence||e.fallbackAdSequence}).then(function(t){if(delete e.nextWrapperURL,0===t.length)return e.creatives=[],r(e);t.forEach(function(t){t&&u.parserUtils.mergeWrapperAdData(t,e)}),r(t)})}).catch(function(t){e.errorCode=301,e.errorMessage=t.message,r(e)})})},t.prototype.completeWrapperResolving=function(e){if(0===e.ads.length)this.trackVastError(e.errorURLTemplates,{ERRORCODE:303});else for(var t=e.ads.length-1;t>=0;t--){var n=e.ads[t];(n.errorCode||0===n.creatives.length)&&(this.trackVastError(n.errorURLTemplates.concat(e.errorURLTemplates),{ERRORCODE:n.errorCode||303},{ERRORMESSAGE:n.errorMessage||""},{extensions:n.extensions},{system:n.system}),e.ads.splice(t,1))}},t}(a.EventEmitter)},27294:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.urlHandler=void 0;var i=n(82664),r=n(13769),o=n(2860);t.urlHandler={get:function(e,t,n){return n||("function"==typeof t&&(n=t),t={}),"u"<typeof window||null===window?r.nodeURLHandler.get(e,t,n):o.XHRURLHandler.supported()?o.XHRURLHandler.get(e,t,n):i.flashURLHandler.supported()?i.flashURLHandler.get(e,t,n):n(Error("Current context is not supported by any of the default URLHandlers. Please provide a custom URLHandler"))}}},82664:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.flashURLHandler=void 0,t.flashURLHandler={get:function(e,t,n){var i="function"==typeof window.ActiveXObject?new window.ActiveXObject("Microsoft.XMLDOM"):void 0;if(!i)return n(Error("FlashURLHandler: Microsoft.XMLDOM format not supported"));i.async=!1;var r=r();request.open("GET",e),request.timeout=t.timeout||0,request.withCredentials=t.withCredentials||!1,request.send(),request.onprogress=function(){},request.onload=function(){i.loadXML(request.responseText),n(null,i)}},supported:function(){var e;return window.XDomainRequest&&(e=new XDomainRequest),!!e}}},13769:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.nodeURLHandler=void 0,t.nodeURLHandler={get:function(e,t,n){n(Error("Please bundle the library for node to use the node urlHandler"))}}},2860:function(e,t){function n(){try{var e=new window.XMLHttpRequest;return"withCredentials"in e?e:null}catch(e){return console.log("Error in XHRURLHandler support check:",e),null}}Object.defineProperty(t,"__esModule",{value:!0}),t.XHRURLHandler=void 0,t.XHRURLHandler={get:function(e,t,i){if("https:"===window.location.protocol&&0===e.indexOf("http://"))return i(Error("XHRURLHandler: Cannot go from HTTPS to HTTP."));try{var r=n();r.open("GET",e),r.timeout=t.timeout||0,r.withCredentials=t.withCredentials||!1,r.overrideMimeType&&r.overrideMimeType("text/xml"),r.onreadystatechange=function(){4===r.readyState&&(200===r.status?i(null,r.responseXML):i(Error("XHRURLHandler: ".concat(r.statusText))))},r.send()}catch(e){i(Error("XHRURLHandler: Unexpected error"))}},supported:function(){return!!n()}}},1100:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.Storage=void 0;var n=null,i={data:{},length:0,getItem:function(e){return this.data[e]},setItem:function(e,t){this.data[e]=t,this.length=Object.keys(this.data).length},removeItem:function(e){delete data[e],this.length=Object.keys(this.data).length},clear:function(){this.data={},this.length=0}};t.Storage=function(){function e(e){this.storage=this.initStorage(e)}return e.prototype.initStorage=function(e){if(n&&("u"<typeof window||null===window||Object.getPrototypeOf(n)!==window.Storage.prototype||e))return n;try{n="u">typeof window&&null!==window?window.localStorage||window.sessionStorage:null}catch(e){n=null}return n&&e&&!this.isStorageDisabled(n)||(n=i).clear(),n},e.prototype.isStorageDisabled=function(e){var t="__VASTStorage__";try{if(e.setItem(t,t),e.getItem(t)!==t)return e.removeItem(t),!0}catch(e){return!0}return e.removeItem(t),!1},e.prototype.getItem=function(e){return this.storage.getItem(e)},e.prototype.setItem=function(e,t){return this.storage.setItem(e,t)},e.prototype.removeItem=function(e){return this.storage.removeItem(e)},e.prototype.clear=function(){return this.storage.clear()},e}()},11417:function(e,t){function n(e,t){void 0===t&&(t={});var n=[];t.ASSETURI&&(t.ASSETURI=i(t.ASSETURI)),t.CONTENTPLAYHEAD&&(t.CONTENTPLAYHEAD=i(t.CONTENTPLAYHEAD)),t.ERRORCODE&&!/^[0-9]{3}$/.test(t.ERRORCODE)&&(t.ERRORCODE=900),t.CACHEBUSTING=r(Math.round(1e8*Math.random()).toString()),t.TIMESTAMP=i((new Date).toISOString()),t.RANDOM=t.random=t.CACHEBUSTING;for(var o=0;o<e.length;o++){var s=e[o];if("string"==typeof s){for(var a in t){var u=t[a],l="[".concat(a,"]"),c="%%".concat(a,"%%");s=(s=s.replace(l,u)).replace(c,u)}n.push(s)}}return n}function i(e){return encodeURIComponent(e).replace(/[!'()*]/g,function(e){return"%".concat(e.charCodeAt(0).toString(16))})}function r(e){return e.length<8?o(0,8-e.length,!1).map(function(e){return"0"}).join("")+e:e}function o(e,t,n){for(var i=[],r=e<t,o=n?r?t+1:t-1:t,s=e;r?s<o:s>o;r?s++:s--)i.push(s);return i}Object.defineProperty(t,"__esModule",{value:!0}),t.util=void 0,t.util={track:function(e,t){n(e,t).forEach(function(e){"u">typeof window&&null!==window&&((new Image).src=e)})},resolveURLTemplates:n,encodeURIComponentRFC3986:i,leftpad:r,range:o,isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},flatten:function e(t){return t.reduce(function(t,n){return t.concat(Array.isArray(n)?e(n):n)},[])}}},6036:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.VASTClient=void 0;var i=n(1100),r=n(29902);t.VASTClient=function(){function e(e){e=e||{},this.cappingFreeLunch=e.cappingFreeLunch||0,this.cappingMinimumTimeInterval=e.cappingMinimumTimeInterval||0,this.defaultOptions={withCredentials:!1,timeout:0},this.vastParser=new r.VASTParser;var t=null==e.allowUsingBrowserStorageApi||e.allowUsingBrowserStorageApi;this.storage=e.customStorage||new i.Storage(t),void 0===this.lastSuccessfulAd&&(this.lastSuccessfulAd=0),void 0===this.totalCalls&&(this.totalCalls=0),void 0===this.totalCallsTimeout&&(this.totalCallsTimeout=0)}return e.prototype.getParser=function(){return this.vastParser},Object.defineProperty(e.prototype,"lastSuccessfulAd",{get:function(){return this.storage.getItem("vast-client-last-successful-ad")},set:function(e){this.storage.setItem("vast-client-last-successful-ad",e)}
1,enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"totalCalls",{get:function(){return this.storage.getItem("vast-client-total-calls")},set:function(e){this.storage.setItem("vast-client-total-calls",e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"totalCallsTimeout",{get:function(){return this.storage.getItem("vast-client-total-calls-timeout")},set:function(e){this.storage.setItem("vast-client-total-calls-timeout",e)},enumerable:!1,configurable:!0}),e.prototype.hasRemainingAds=function(){return this.vastParser.remainingAds.length>0},e.prototype.getNextAds=function(e){return this.vastParser.getRemainingAds(e)},e.prototype.get=function(e,t){var n=this;void 0===t&&(t={});var i=Date.now();return(t=Object.assign(this.defaultOptions,t)).hasOwnProperty("resolveAll")||(t.resolveAll=!1),this.totalCallsTimeout<i?(this.totalCalls=1,this.totalCallsTimeout=i+36e5):this.totalCalls++,new Promise(function(r,o){if(n.cappingFreeLunch>=n.totalCalls)return o(Error("VAST call canceled â FreeLunch capping not reached yet ".concat(n.totalCalls,"/").concat(n.cappingFreeLunch)));var s=i-n.lastSuccessfulAd;if(s<0)n.lastSuccessfulAd=0;else if(s<n.cappingMinimumTimeInterval)return o(Error("VAST call canceled â (".concat(n.cappingMinimumTimeInterval,")ms minimum interval reached")));n.vastParser.getAndParseVAST(e,t).then(function(e){return r(e)}).catch(function(e){return o(e)})})},e}()},71076:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.VASTResponse=void 0,t.VASTResponse=function(){this.ads=[],this.errorURLTemplates=[]}}},function(e){return e(e.s=7581)}])}()},38509:function(e,t,n){"use strict";var i,r=this&&this.__extends||(i=function(e,t){return(i=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])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.PlaybackToggleOverlay=void 0;var o=n(8675),s=n(23160);t.PlaybackToggleOverlay=function(e){function t(t){void 0===t&&(t={});var n=e.call(this,t)||this;return n.playbackToggleButton=new s.HugePlaybackToggleButton({enterFullscreenOnInitialPlayback:!!t.enterFullscreenOnInitialPlayback}),n.config=n.mergeConfig(t,{cssClass:"ui-playbacktoggle-overlay",components:[n.playbackToggleButton]},n.config),n}return r(t,e),t}(o.Container)},38543:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TimelineMarkersHandler=void 0;var i=n(4437),r=n(41113),o=n(80432),s=n(6635);t.TimelineMarkersHandler=function(){function e(e,t,n){this.markerPositionUpdater=null,this.isTimeShifting=!1,this.seekableRangeSnapshot=null,this.config=e,this.getSeekBarWidth=t,this.markersContainer=n,this.timelineMarkers=[]}return e.prototype.initialize=function(e,t){this.player=e,this.uimanager=t,this.configureMarkers()},e.prototype.configureMarkers=function(){var e=this,t=function(){return e.updateMarkers(!1)},n=function(){return e.clearMarkers()},i=function(){e.isTimeShifting=!0},o=function(){e.isTimeShifting=!1},s=function(e,t){t.scrubbing&&i()}
1,a=function(){e.stopLiveMarkerUpdater(),e.isTimeShifting=!1,e.seekableRangeSnapshot=null,e.player.off(e.player.exports.PlayerEvent.TimeShift,i),e.player.off(e.player.exports.PlayerEvent.TimeShifted,o),e.uimanager.onSeekPreview.unsubscribe(s)},u=function(){a(),e.clearMarkers()};this.player.on(this.player.exports.PlayerEvent.SourceUnloaded,u),this.player.on(this.player.exports.PlayerEvent.Destroy,u),this.player.on(this.player.exports.PlayerEvent.AdBreakStarted,n),this.player.on(this.player.exports.PlayerEvent.AdBreakFinished,t);var l=new r.PlayerUtils.LiveStreamDetector(this.player,this.uimanager),c=function(t,n){n.live?(e.player.on(e.player.exports.PlayerEvent.TimeShift,i),e.player.on(e.player.exports.PlayerEvent.TimeShifted,o),e.uimanager.onSeekPreview.subscribe(s),e.startLiveMarkerUpdater()):a()};l.onLiveChanged.subscribe(c),l.detect(),this.uimanager.getConfig().events.onUpdated.subscribe(t),this.player.on(this.player.exports.PlayerEvent.PlayerResized,t),this.uimanager.onConfigured.subscribe(t),this.player.on(this.player.exports.PlayerEvent.SourceLoaded,t),this.uimanager.onRelease.subscribe(function(){e.uimanager.getConfig().events.onUpdated.unsubscribe(t),e.uimanager.onConfigured.unsubscribe(t),l.onLiveChanged.unsubscribe(c),u(),e.player.off(e.player.exports.PlayerEvent.SourceUnloaded,u),e.player.off(e.player.exports.PlayerEvent.Destroy,u),e.player.off(e.player.exports.PlayerEvent.AdBreakStarted,n),e.player.off(e.player.exports.PlayerEvent.AdBreakFinished,t),e.player.off(e.player.exports.PlayerEvent.PlayerResized,t),e.player.off(e.player.exports.PlayerEvent.SourceLoaded,t)}),this.updateMarkers(!1)},e.prototype.getMarkerAtPosition=function(e){var t=this.config.snappingRange;return this.timelineMarkers.find(function(n){var i=n.duration>0&&e>=n.position-t&&e<=n.position+n.duration+t,r=e>=n.position-t&&e<=n.position+t;return i||r})||null},e.prototype.clearMarkers=function(){this.timelineMarkers=[],this.markersContainer.empty()},e.prototype.removeMarkerFromConfig=function(e){this.uimanager.getConfig().metadata.markers=this.uimanager.getConfig().metadata.markers.filter(function(t){return e!==t})},e.prototype.filterRemovedMarkers=function(){var e=this;this.timelineMarkers=this.timelineMarkers.filter(function(t){var n=e.uimanager.getConfig().metadata.markers.find(function(e){return t.marker===e});return n||e.removeMarkerFromDOM(t),n})},e.prototype.removeMarkerFromDOM=function(e){e.element&&e.element.remove()},e.prototype.updateMarkers=function(e){var t,n,i,r,o=this;if(0!==this.getSeekBarWidth()){if(t=this.player,n=this.uimanager,i=t.getDuration()!==1/0||t.isLive(),r=n.getConfig().metadata.markers.length>0,!i||!r)return void this.clearMarkers();this.filterRemovedMarkers(),this.uimanager.getConfig().metadata.markers.forEach(function(t){var n,i,r,s,a,u,l,c,d,p,h,f,g=(n=o.player,i=o.getSeekableRangeRespectingSnapshot(),r=t,d=100/(c=function(e,t){if(!e.isLive())return e.getDuration();var n=t.start;return t.end-n}(n,i))*(s=r,a=n,u=c,l=i,a.isLive()?u-(l.end-s.time):s.time),p=100/c*r.duration,d<0&&!isNaN(p)&&(p+=d),100-d<p&&(p=100-d),{markerDuration:p,markerPosition:d}),v=g.markerPosition,y=g.markerDuration;if(h=v,((f=y)<0||isNaN(f))&&h<0)o.removeMarkerFromConfig(t);else if(v<=100){var m=o.timelineMarkers.find(function(e){return e.marker===t});if(m)m.position=v,m.duration=y,o.updateMarkerDOM(m,e);else{var b={marker:t,position:v,duration:y};o.timelineMarkers.push(b),o.createMarkerDOM(b)}}})}},e.prototype.getMarkerCssProperties=function(e,t){void 0===t&&(t=!0);var n=this.getSeekBarWidth(),i=n/100*(e.position<0?0:e.position),r={transform:"translateX(".concat(i,"px)")};if(t){var o=this.config.markerUpdateIntervalMs||1e3;r["transition-duration"]="".concat(o,"ms")}else r.transition="none";if(e.duration>0){var s=Math.round(n/100*e.duration);r.width="".concat(s,"px")}return r},e.prototype.updateMarkerDOM=function(e,t){e.element.removeCss("transition"),e.element.css(this.getMarkerCssProperties(e,t))},e.prototype.createMarkerDOM=function(e){var t=["seekbar-marker"].concat(e.marker.cssClasses||[]).map(function(e){return(0,s.prefixCss)(e)}),n=new i.DOM("div",{class:(0,s.prefixCss)("seekbar-marker-indicator")}
1),r=new i.DOM("div",{class:(0,s.prefixCss)("seekbar-marker-indicator")}),o=new i.DOM("div",{class:t.join(" "),"data-marker-time":String(e.marker.time),"data-marker-title":String(e.marker.title)}).css(this.getMarkerCssProperties(e,!1));if(e.marker.imageUrl){var a=new i.DOM("img",{class:(0,s.prefixCss)("seekbar-marker-image"),src:e.marker.imageUrl}).on("error",function(){a.remove()});o.append(a)}o.append(n),e.duration>0&&o.append(r),e.element=o,this.markersContainer.append(o)},e.prototype.startLiveMarkerUpdater=function(){var e=this,t=this.config.markerUpdateIntervalMs||1e3;this.stopLiveMarkerUpdater(),this.captureSeekableRangeSnapshot(),this.markerPositionUpdater=new o.Timeout(t,function(){e.isTimeShifting||e.captureSeekableRangeSnapshot(),e.updateMarkers(!0)},!0),this.markerPositionUpdater.start()},e.prototype.stopLiveMarkerUpdater=function(){this.markerPositionUpdater&&(this.markerPositionUpdater.clear(),this.markerPositionUpdater=null)},e.prototype.captureSeekableRangeSnapshot=function(){var e=r.PlayerUtils.getSeekableRangeRespectingLive(this.player);this.seekableRangeSnapshot={start:e.start,end:e.end,timestampMs:Date.now()}},e.prototype.getSeekableRangeRespectingSnapshot=function(){var e=r.PlayerUtils.getSeekableRangeRespectingLive(this.player);if(!this.player.isLive())return e;if(this.isTimeShifting&&this.seekableRangeSnapshot){var t=(Date.now()-this.seekableRangeSnapshot.timestampMs)/1e3;return{start:this.seekableRangeSnapshot.start+t,end:this.seekableRangeSnapshot.end+t}}return e},e}()},38661:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getKeyMapForPlatform=function(){var e=[s,o,a,l,u,c].find(function(e){return e.isApplicable()});return e?e.keyCodes:d};var i=n(90753),r=n(2652),o={isApplicable:function(){return r.BrowserUtils.isTizen},keyCodes:{38:i.Direction.UP,40:i.Direction.DOWN,37:i.Direction.LEFT,39:i.Direction.RIGHT,13:i.Action.SELECT,10009:i.Action.BACK}},s={isApplicable:function(){return r.BrowserUtils.isWebOs},keyCodes:{38:i.Direction.UP,40:i.Direction.DOWN,37:i.Direction.LEFT,39:i.Direction.RIGHT,13:i.Action.SELECT,461:i.Action.BACK}},a={isApplicable:function(){return r.BrowserUtils.isPlayStation},keyCodes:{38:i.Direction.UP,40:i.Direction.DOWN,37:i.Direction.LEFT,39:i.Direction.RIGHT,13:i.Action.SELECT,27:i.Action.BACK}},u={isApplicable:function(){return r.BrowserUtils.isAndroid},keyCodes:{38:i.Direction.UP,40:i.Direction.DOWN,37:i.Direction.LEFT,39:i.Direction.RIGHT,13:i.Action.SELECT,27:i.Action.BACK}},l={isApplicable:function(){return r.BrowserUtils.isHisense},keyCodes:{38:i.Direction.UP,40:i.Direction.DOWN,37:i.Direction.LEFT,39:i.Direction.RIGHT,13:i.Action.SELECT,8:i.Action.BACK}},c={isApplicable:function(){return r.BrowserUtils.isXbox},keyCodes:{203:i.Direction.UP,211:i.Direction.UP,204:i.Direction.DOWN,212:i.Direction.DOWN,205:i.Direction.LEFT,214:i.Direction.LEFT,206:i.Direction.RIGHT,213:i.Direction.RIGHT,195:i.Action.SELECT}},d={38:i.Direction.UP,40:i.Direction.DOWN,37:i.Direction.LEFT,39:i.Direction.RIGHT,13:i.Action.SELECT,27:i.Action.BACK}},39062:function(e,t,n){"use strict";var i,r=this&&this.__extends||(i=function(e,t){return(i=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])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.SettingsPanelSelectOption=void 0,t.SettingsPanelSelectOption=function(e){function t(t){var n=e.call(this,t)||this;return n.settingsValue=t.settingsValue,n.config=n.mergeConfig(t,{cssClasses:["ui-settings-panel-item-select-option"],role:"menuitem",tabIndex:0},n.config),n}return r(t,e),t.prototype.configure=function(t,n){var i=this;e.prototype.configure.call(this,t,n);var r=function(){var e=i.settingComponent.getSelectedItem();i.settingsValue===e?i.getDomElement().addClass(i.prefixCss("selected")):i.getDomElement().removeClass(i.prefixCss("selected"))};this.settingComponent.onItemSelected.subscribe(r),this.onClick.subscribe(function(){i.settingComponent.dispatchItemSelectionChanged(i.settingsValue)}),r()},t}(n(78196).InteractiveSettingsPanelItem)},39263:function(e,t,n){"use strict";
1var i,r=this&&this.__extends||(i=function(e,t){return(i=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])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.RecommendationOverlay=void 0;var o=n(8675),s=n(90210),a=n(78976);t.RecommendationOverlay=function(e){function t(t){void 0===t&&(t={});var n=e.call(this,t)||this;return n.replayButton=new s.HugeReplayButton,n.recommendationContainer=new o.Container({components:[],cssClasses:["recommendation-overlay-row","recommendations-section"]}),n.config=n.mergeConfig(t,{cssClass:"ui-recommendation-overlay",hidden:!0,components:[new o.Container({components:[n.replayButton,n.recommendationContainer],cssClasses:["recommendation-overlay-row","replay-section"]})]},n.config),n}return r(t,e),t.prototype.configure=function(n,i){var r=this;e.prototype.configure.call(this,n,i);var o=function(){r.recommendationContainer.removeComponents(),r.recommendationContainer.updateComponents(),r.getDomElement().removeClass(r.prefixCss(t.CLASS_HAS_RECOMMENDATIONS))},s=function(){o();var e=i.getConfig().metadata.recommendations;if(0!=e.length){var s=1;e.forEach(function(e){var t=new a.RecommendationItem({recommendationConfig:e,cssClasses:["recommendation-item-"+s++]});t.configure(n,i),r.recommendationContainer.addComponent(t)}),r.recommendationContainer.updateComponents(),r.getDomElement().addClass(r.prefixCss(t.CLASS_HAS_RECOMMENDATIONS))}};i.getConfig().events.onUpdated.subscribe(s),n.on(n.exports.PlayerEvent.SourceUnloaded,function(){o(),r.hide()}),n.on(n.exports.PlayerEvent.PlaybackFinished,function(){r.show()}),n.on(n.exports.PlayerEvent.Play,function(){r.hide()}),s()},t.CLASS_HAS_RECOMMENDATIONS="recommendations",t}(o.Container)},40235:e=>{"use strict";e.exports=JSON.parse('{"settings.video.quality":"Calidad de Video","settings.audio.quality":"Calidad de Audio","settings.audio.track":"Pista de Audio","settings.audio.mute":"Silencio","settings.audio.volume":"Volumen","settings.subtitles.window.color":"color de Ventana","settings.subtitles.window.opacity":"opacidad de Ventana","settings.subtitles":"Subt\xedtulos","settings.subtitles.font.color":"color de Fuente","settings.subtitles.font.opacity":"opacidad de Fuente","settings.subtitles.background.color":"color de Fondo","settings.subtitles.background.opacity":"opacidad de Fondo","settings.subtitles.options":"Opciones","playerInsights.show":"Mostrar Player Insights","playerInsights.hide":"Ocultar Player Insights","colors.white":"blanco","colors.black":"negro","colors.red":"rojo","colors.green":"verde","colors.blue":"azul","colors.cyan":"cian","colors.yellow":"amarillo","colors.magenta":"magenta","percent":"{value}%","settings.subtitles.font.size":"tama\xf1o de Fuente","settings.subtitles.font.style":"Estilo de Fuente","settings.subtitles.font.style.bold":"negrita","settings.subtitles.font.style.italic":"cursiva","settings.subtitles.characterEdge":"borde del Caracter","settings.subtitles.characterEdge.raised":"alzado","settings.subtitles.characterEdge.depressed":"discreto","settings.subtitles.characterEdge.uniform":"uniforme","settings.subtitles.characterEdge.dropshadowed":"sombreado","settings.subtitles.characterEdge.color":"color de contorno de texto","settings.subtitles.font.family":"tipo de Fuente","settings.subtitles.font.family.monospacedserif":"monospaced serif","settings.subtitles.font.family.proportionalserif":"proportional serif","settings.subtitles.font.family.monospacedsansserif":"monospaced sans serif","settings.subtitles.font.family.proportionalsansserif":"proportional sans serif","settings.subtitles.font.family.casual":"casual","settings.subtitles.font.family.cursive":"cursiva","settings.subtitles.font.family.smallcapital":"small capital","settings.time.hours":"Horas","settings.time.minutes":"Minutos","settings.time.seconds":"Segundos","ads.remainingTime":"Este anuncio acabar\xe1 en {remainingTime} segundos.","ads.skip":"Saltar","ads.skippableIn":"Saltar anuncio en {remainingTime}","ads.adNumberOfTotal":"Anuncio {activeAdIndex} de {totalAdsCount}","ad":"Anuncio","settings":"Configuraci\xf3n","fullscreen":"Pantalla Completa","speed":"Velocidad","playPause":"Reproducir/Pausa","play":"Reproducir","pause":"Pausa","open":"Abrir","close"
1:"Cerrar","pictureInPicture":"Imagen en Imagen","appleAirplay":"Apple AirPlay","googleCast":"Google Cast","vr":"VR","off":"off","auto":"auto","ecoMode":"ecoMode","ecoMode.title":"Eco Mode","persistentPreferences":"Recordar preferencias","back":"Atr\xe1s","reset":"Reiniciar","replay":"Rebobinar","normal":"normal","default":"predeterminado","live":"Directo","live.jumpToLiveEdge":"{liveLabel}, saltar al punto en directo","subtitle.example":"Ejemplo de Subt\xedtulo","subtitle.select":"Seleccionar subt\xedtulo","playingOn":"Reproduciendo en <strong>{castDeviceName}</strong>","connectingTo":"Conectando a <strong>{castDeviceName}</strong>...","watermarkLink":"Enlace al inicio","controlBar":"Controles del Reproductor","player":"Reproductor de Video","seekBar":"L\xednea de Tiempo","seekBar.value":"posici\xf3n","seekBar.timeshift":"cambio de posici\xf3n","seekBar.durationText":"de","quickseek.forward":"Adelantar {seekSeconds} segundos","quickseek.rewind":"Rebobinar {seekSeconds} segundos","contextMenu.title":"Bitmovin Player","contextMenu.subtitle":"Streaming adaptativo para la web","contextMenu.copyTimestampLink":"Copiar enlace en el momento actual","captions.enable":"Activar subt\xedtulos","captions.disable":"Desactivar subt\xedtulos"}')},40525:function(e,t,n){"use strict";var i,r=this&&this.__extends||(i=function(e,t){return(i=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])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__spreadArray||function(e,t,n){if(n||2==arguments.length)for(var i,r=0,o=t.length;r<o;r++)!i&&r in t||(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.RootNavigationGroup=void 0;var s=n(16998),a=n(90753);t.RootNavigationGroup=function(e){function t(t){for(var n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];var r=e.apply(this,o([t],n,!1))||this;return r.container=t,r}return r(t,e),t.prototype.handleAction=function(t){return t!==a.Action.BACK&&this.container.showUi(),e.prototype.handleAction.call(this,t)},t.prototype.handleNavigation=function(t){return this.container.showUi(),e.prototype.handleNavigation.call(this,t)},t.prototype.defaultActionHandler=function(t){return t!==a.Action.BACK?e.prototype.defaultActionHandler.call(this,t):!!this.isUiShown()&&(this.container.hideUi(),!0)},t.prototype.isUiShown=function(){var e,t=null==(e=this.container.getDomElement().get(0))?void 0:e.classList;return!!t&&Array.from(t).some(function(e){return/-controls-shown$/.test(e)})},t.prototype.release=function(){e.prototype.release.call(this)},t}(s.NavigationGroup)},40800:e=>{!function(){"use strict";self,e.exports=(self.webpackChunkbitmovin_player=self.webpackChunkbitmovin_player||[]).push([[831],{48519:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.WebVttSubtitlesModuleDefinition=void 0;var i=n(62756),r=n(69041),o=n(1757);t.WebVttSubtitlesModuleDefinition={name:i.ModuleName.SubtitlesWebVTT,module:function(){return{WebVttParser:o.WebVttParser,extractVttProperties:r.extractVttProperties}},dependencies:[i.ModuleName.Subtitles]},t.default=t.WebVttSubtitlesModuleDefinition},1757:function(e,t,n){var i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.WebVttParser=void 0;var r=n(730),o=/(<\d+:\d{2}:\d{2}[.,]\d{3}>)/g,s=function(){function e(){}return e.prototype.parse=function(e,t){return void 0===t&&(t=0),(e=e.replace(/\r\n/gm,"\n")).startsWith("[EMBEDDEDWEBVTT]")?this.cp(e):this.dp(e,t)},e.prototype.cp=function(e){var t,n,i=e.split("\n"),o=i[1],s=i[2],u=i[3],l=i[4],c=i.slice(5).join("\n"),d=a();d.start=Number(o),d.end=Number(s),d.i=Number(u);var p=r.parseContents(c,0,r.getPlaceholderVttStyleProperties());return d.text=null!=(n=null!=(t=null==p?void 0:p.textContent)?t:null==p?void 0:p.innerText)?n:"",d.html=r.stringifyCueHtml(p),l&&(d.vtt=r.parseOptions(l,[])),d.vtt.id=u,[d]},e.prototype.dp=function(e,t){var n=e.split(/\n{2,}
1|^[WEBVTT\n+]?X-TIMESTAMP-MAP=.*\n+|^WEBVTT\n+/m).filter(function(e){return null!=e&&""!==e}).map(function(e){return e.split("\n")}),i=this.ep(e),r=this.fp(n);return this.mp(n,r,{vtt:i,base:t})},e.prototype.ep=function(e){var t=/X-TIMESTAMP-MAP=(.*)\n/.exec(e);if(null==(null==t?void 0:t[1]))return 0;var n=t[0],i=/LOCAL:((?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3}))/m.exec(n),o=/MPEGTS:(\d+)/m.exec(n),s=0;if(null==i?void 0:i[1]){var a=r.parseTime(i[1]);null!=a&&(s=a)}var u=0;return null!=o&&(u=Number(o[1])),u/9e4-s},e.prototype.fp=function(e){for(var t=[],n=[],i=0;i<e.length;i++){var o=e[i],s=o[0];/^STYLE/.test(s.trim())&&n.push.apply(n,r.parseStyles(o)),/^region:?/i.test(s.trim())&&t.push.apply(t,r.parseRegions(o))}return{regions:t,styles:n}},e.prototype.gp=function(e){var t=/^NOTE/.test(e),n=/^STYLE/.test(e),i=/^region:?/i.test(e);return!t&&!n&&!i},e.prototype.hp=function(e){return null!=e&&""!==e&&!!e.includes("--\x3e")},e.prototype.ip=function(e){var t={},n=[];return e.forEach(function(e){null==e.identifier&&(t=i(i({},t),e.style));var r=n.findIndex(function(t){return t.identifier===e.identifier});-1!==r?n[r]={identifier:e.identifier,style:i(i({},n[r].style),e.style)}:n.push(e)}),r.getPlaceholderVttStyleProperties().forEach(function(e){n.find(function(t){return t.identifier===e.identifier})||n.push(e)}),{globalStyle:t,contentStyles:n}},e.prototype.jp=function(e,t){var n=r.stringifyCssProperties(t);n&&(e.html.setAttribute("style",n),e.subCues.forEach(function(e){e.html.setAttribute("style",n)}))},e.prototype.kp=function(e,t,n,i){var s=(d=(c=e[t]).indexOf("--\x3e"))<0?{start:null,end:null}:{start:r.parseTime(c.substring(0,d).trim()),end:r.parseTime(c.substring(d+3).trim())},a=s.start,l=s.end;if(null!==a&&null!==l){for(var c,d,p,h,f=(p=t+1,e.slice(p).join("\n").trim()),g=f.split(o),v="",y=f.replace(o,""),m=a,b=[],S=0;S<g.length;S+=2){var E=g[S],_=g[S+1],T=_?r.parseTime(_):l,P=null!=T?T:l;if(m!==P){var C,A,w,k=(C=E,A=v,w=y=y.substring(E.length),(A?u(A,"cue-past"):"")+C+(w?u(w,"cue-future"):""));v+=E;var O=r.parseContents(k,i,n);null==h?h=O:b.push({updateTime:m,html:O}),m=P}}if(null!=h)return{start:a,end:l,html:h,subCues:b}}},e.prototype.lp=function(e,t,n){var r=i({},t);if(n)for(var o="#"+n,s=0;s<e.length;s++){var a=e[s];a.identifier===o&&Object.assign(r,a.style)}return r},e.prototype.mp=function(e,t,n){for(var o=[],s=0,u=t.regions,l=t.styles,c=this.ip(l),d=c.globalStyle,p=c.contentStyles,h=0;h<e.length;h++){var f=e[h];if(this.gp(f[0])){var g=void 0,v=0;f[0].includes("--\x3e")||(g=f[0].trim(),v=1);var y=this.np(g,s);if(s=y,this.hp(f[v])){var m=r.parseOptions(f[v],u);m.id=g;var b=this.kp(f,v,p,n.base);if(void 0!==b){var S=this.lp(p,d,g);this.jp(b,S);var E=function(e,t,n,o){var s,u,l=a();return l.i=t,l.start=e.start+n.base,l.end=e.end+n.base,l.text=(null==(s=e.html)?void 0:s.textContent)||(null==(u=e.html)?void 0:u.innerText)||"",l.html=r.stringifyCueHtml(e.html),l.vtt=i({},o),0!==n.vtt&&(l.offset=n.vtt),l.updates=e.subCues.map(function(e){return{updateTime:e.updateTime+n.base,html:r.stringifyCueHtml(e.html)}}),l}(b,y,n,m);o.push(E)}}}}return o},e.prototype.np=function(e,t){var n=Number(e);return null==e||isNaN(n)?t+1:n},e}();function a(){return{i:null,start:null,end:null,text:null,html:null,vtt:r.getDefaultVttProperties(),offset:null,updates:[]}}function u(e,t){return"<c.".concat(t,">").concat(e,"</c>")}t.WebVttParser=s,t.default=s},39157:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.parseContents=function(e,t,n){var o=i.ModuleManager.get(r.ModuleName.Subtitles).createHtmlElement("span");return function e(t){var n=function(e){if(!e)return null;var t=/^([^<]*)(<[^>]+>?)?/.exec(e);if(!t)return null;var n=t[1],i=t[2];return n||i}(t.input);return null==n?t.root:(t.input=t.input.substring(n.length),function(t,n){if("<"!==t[0]){var i,r,o,h,f,g,v=n.current.ownerDocument.createTextNode(function(e){for(var t=0;t<a.length;t++){var n=a[t],i=n[0],r=n[1];e=e.replace(i,r)}return e}(t));return n.current.appendChild(v),e(n)}if("/"===t[1])return(i=n.tagStack).length>0&&i[i.length-1]===t.substring(2).replace(">","")&&(n.tagStack.pop(),n.current=n.current.parentNode),e(n);var y=(0,s.parseTime)(t.substring(1,t.length-1));if(null!=y){var m=n.current.ownerDocument.createComment("time: ".concat(y+n.offset));return n.current.appendChild(m),e(n)}var b=/^<([^.\s/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/.exec(t);if(!b)return e(n);var S=b[0],E=b[1],_=b[2],T=b[3],P=function(e,t,n){var i=u[e];
1if(!i)return null;var r=n.createElement(i),o=l[e];return o&&t&&(r[o]=t.trim()),r}(E,T,n.current.ownerDocument);return P&&(r=n.current,!c[P.localName]||c[P.localName]===r.localName)&&(h=(o=function(e,t){var n,i,r,o="",a="",u={};if(t.type&&"v"!==t.type&&(u=null!=(n=p(e,t.type))?n:u),t.contents){u={};for(var l=t.contents.substring(1).split("."),c=0;c<l.length;c++){var h=l[c],f=p(e,d[h]||".".concat(h));f&&Object.assign(u,f)}o=l.join(" ").trim()}return"v"===t.type&&t.annotation&&(a=t.annotation.substring(1),u=null!=(i=p(e,"".concat(t.type,'[voice="').concat(a,'"]')))?i:u),{className:o,title:a,styleString:null!=(r=(0,s.stringifyCssProperties)(u))?r:""}}(n.styles,{type:E,contents:_,annotation:T})).className,f=o.title,g=o.styleString,f&&(P.title=f),h&&(P.className=h),g&&P.setAttribute("style",g),n.tagStack.push(S[1]),n.current.appendChild(P),n.current=P),e(n)}(n,t))}({input:e,root:o,current:o,tagStack:[],offset:t,styles:n})};var i=n(88052),r=n(62756),o=n(99735),s=n(69041),a=[[/&/g,"&"],[/</g,"<"],[/>/g,">"],[/‎/g,"â"],[/‏/g,"â"],[/ /g,"\xa0"]],u={c:"span",i:"i",b:"b",u:"u",ruby:"ruby",rt:"rt",v:"span",lang:"span"},l={v:"title",lang:"lang"},c={rt:"ruby"},d={"cue-future":":future","cue-past":":past"};function p(e,t){for(var n,i=0;i<e.length;i++)if((n=e[i]).identifier===t)return n.style;for(var r=0,s=o.webVttDefaultClassStyles;r<s.length;r++)if((n=s[r]).identifier===t)return n.style}},99735:function(e,t){var n=this&&this.__spreadArray||function(e,t,n){if(n||2==arguments.length)for(var i,r=0,o=t.length;r<o;r++)!i&&r in t||(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.webVttDefaultClassStyles=void 0;var i=["white","lime","cyan","red","yellow","magenta","blue","black"];t.webVttDefaultClassStyles=n(n([],i.map(function(e){return{identifier:".".concat(e),style:{color:e}}}),!0),i.map(function(e){return{identifier:".bg_".concat(e),style:{background:e}}}),!0)},76171:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.parseOptions=function(e,t){for(var n,i=e.split(/\s/),s=(0,r.getDefaultVttProperties)(),a=0;a<i.length;a++){var u=i[a],l=u.indexOf(":");-1!==l&&o(u.substring(0,l),u.substring(l+1),t,s)}return n=(0,r.getDefaultVttProperties)(),null!=s.region&&(s.vertical!==n.vertical||s.size!==n.size||s.line!==n.line)&&delete s.region,s},t.setOptionProperty=o;var i=n(23068),r=n(69041);function o(e,t,n,o){var a,u,l,c,d,p,h,f,g,v,y;switch(e){case"region":null!=(a=n.find(function(e){return e.id===t}))&&(o.region=a);break;case"vertical":null!=(u=(0,r.ensureArray)(/^(lr|rl)$/.exec(t))[1])&&(o.vertical=u);break;case"align":null!=(l=(0,r.ensureArray)(/^(start|middle|center|end|left|right)$/.exec(t))[1])&&(o.align=l),o.positionAlign=s(void 0,o);break;case"size":null!=(c=(0,r.ensureArray)(/^([\d.]+)%$/.exec(t))[1])&&(o.size=Number(c));break;case"position":p=(d=(0,r.ensureArray)(/^([\d.]+|auto)%?(?:,(line-left|line-right|center))?$/.exec(t)))[1],h=d[2],"auto"===p?o.position="auto":void 0!==p&&(o.position=Number(p)),o.positionAlign=s(h,o);break;case"line":g=(f=(0,r.ensureArray)(/^(-?[\d.]+|auto)(%)?(?:,(start|end|center|auto))?$/.exec(t)))[1],v=f[2],y=f[3],"auto"===g?o.line="auto":"%"===v?o.line="".concat(g,"%"):null!=t&&(o.line=Number(g)),null!=y&&(o.lineAlign=y),o.snapToLines=(0,i.isNumber)(o.line)}}function s(e,t){if(null!=e)return e;switch(t.align){case"start":case"left":return"line-left";case"end":case"right":return"line-right";default:return"center"}}},69041:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.getDefaultVttProperties=a,t.extractVttProperties=function(e){var t=a(),n=u();return Object.keys(t).forEach(function(r){var o,a,u,l=(o=e[r],a=t[r],u=String(o||a),("position"===r&&(0,i.isNumber)(o)||"line"===r&&!1===e.snapToLines)&&(u+="%"),u);(0,s.setOptionProperty)(r,l,[n],t)}),t},t.getDefaultVttRegionProperties=u,t.parseTime=function(e){var t=/(?:(\d{1,}):)?(\d{2}):(\d{2})[.,](\d{3})/g.exec(e);if(null==t)return null;var n=t[1],i=t[2],r=t[3];return Number(t[4])/1e3+Number(r)+60*Number(i)+3600*(Number(n)||0)},t.ensureArray=function(e){return Array.isArray(e)?e:[]},t.stringifyCssProperties=function(e){return e?Object.entries(e).map(function(e){return"".concat(e[0],":").concat(e[1],";")}
1).join(""):null},t.stringifyCueHtml=function(e){return(0,r.ModuleManager.get(o.ModuleName.Subtitles).HtmlTransformer.prepareHtml)((null==e?void 0:e.outerHTML)||"")};var i=n(23068),r=n(88052),o=n(62756),s=n(76171);function a(){return{vertical:"",align:"center",size:100,line:"auto",lineAlign:"start",position:"auto",positionAlign:"center",snapToLines:!1}}function u(){return{id:null,width:100,lines:3,regionAnchorX:0,regionAnchorY:100,viewportAnchorX:0,viewportAnchorY:100,scroll:""}}},79347:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.parseRegions=function(e){for(var t=[],n=0;n<e.length;n++){var i=e[n];if(i=i.trim(),/^REGION$/i.test(i)){t.push(r(e.slice(1),":"));break}/^Region:/i.test(i)&&t.push(r(i.split(/[ \t]+/).slice(1),"="))}return t};var i=n(69041);function r(e,t){var n=(0,i.getDefaultVttRegionProperties)();return e.forEach(function(e){!function(e,t){var n,r,o,s,a,u,l,c,d,p=e[0],h=e[1];switch(p){case"id":null!=h&&(t.id=h);break;case"width":null!=(n=(0,i.ensureArray)(/^(\d{1,2}|100)%$/.exec(h))[1])&&(t.width=Number(n));break;case"lines":null!=(r=(0,i.ensureArray)(/^(\d+)$/.exec(h))[1])&&(t.lines=Number(r));break;case"regionanchor":s=(o=(0,i.ensureArray)(/^(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(h)))[1],a=o[2],null!=s&&(t.regionAnchorX=Number(s)),null!=a&&(t.regionAnchorY=Number(a));break;case"viewportanchor":l=(u=(0,i.ensureArray)(/^(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(h)))[1],c=u[2],null!=l&&(t.viewportAnchorX=Number(l)),null!=c&&(t.viewportAnchorY=Number(c));break;case"scroll":null!=(d=(0,i.ensureArray)(/^(up)$/.exec(h))[1])&&(t.scroll=d)}}(e.split(t),n)}),n}},22649:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.parseStyles=function(e){var t=[],n=/::cue(\((.+)\))?(?= |{)/,i=/([a-zA-Z0-9-]+):(.+?(?=;|}|$))/g,r=n.exec(e[1]);if(!r)return t;for(var o=1;o<e.length;o++){for(var s=n.exec(e[o]),a=null!==s,u=(r=a?s:r)[2],l={},c=i.exec(e[o]);null!==c;){var d=c[1],p=c[2];l[d]=p.trim(),c=i.exec(e[o])}(a||Object.keys(l).length>0)&&t.push({identifier:u,style:l})}return t},t.getPlaceholderVttStyleProperties=function(){return[{identifier:":future",style:{visibility:"hidden"}}]}},730:function(e,t,n){var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);
1r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||i(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),r(n(79347),t),r(n(39157),t),r(n(76171),t),r(n(69041),t),r(n(22649),t)}},function(e){return e(e.s=48519)}])}()},41113:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PlayerUtils=void 0;var i,r,o,s,a,u=n(85704),l=n(2652);(r=o=(i=a||(t.PlayerUtils=a={})).PlayerState||(i.PlayerState={}))[r.Idle=0]="Idle",r[r.Prepared=1]="Prepared",r[r.Playing=2]="Playing",r[r.Paused=3]="Paused",r[r.Finished=4]="Finished",i.isTimeShiftAvailable=function(e){return e.isLive()&&0!==e.getMaxTimeShift()},i.getState=function(e){return e.hasEnded()?o.Finished:e.isPlaying()?o.Playing:e.isPaused()?o.Paused:null!=e.getSource()?o.Prepared:o.Idle},i.getCurrentTimeRelativeToSeekableRange=function(e){var t=e.getCurrentTime();return e.isLive()?t:t-i.getSeekableRangeStart(e,0)},i.getSeekableRangeStart=function(e,t){return void 0===t&&(t=0),e.getSeekableRange()&&e.getSeekableRange().start||t},i.getSeekableRangeRespectingLive=function(e){if(!e.isLive())return e.getSeekableRange();var t=-e.getTimeShift(),n=-e.getMaxTimeShift(),i=e.getCurrentTime();return{start:i-(n-t),end:i+t}},s=function(){function e(e){var t=this;this.timeShiftAvailabilityChangedEvent=new u.EventDispatcher,this.player=e,this.timeShiftAvailable=void 0;var n=function(){t.detect()};e.on(e.exports.PlayerEvent.SourceLoaded,n),e.on(e.exports.PlayerEvent.TimeChanged,n)}return e.prototype.detect=function(){if(this.player.isLive()){var e=i.isTimeShiftAvailable(this.player);e!==this.timeShiftAvailable&&(this.timeShiftAvailabilityChangedEvent.dispatch(this.player,{timeShiftAvailable:e}),this.timeShiftAvailable=e)}},Object.defineProperty(e.prototype,"onTimeShiftAvailabilityChanged",{get:function(){return this.timeShiftAvailabilityChangedEvent.getEvent()},enumerable:!1,configurable:!0}),e}(),i.TimeShiftAvailabilityDetector=s,i.LiveStreamDetector=function(){function e(e,t){var n=this;this.liveChangedEvent=new u.EventDispatcher,this.player=e,this.uimanager=t,this.live=void 0;var i=function(){n.detect()};this.uimanager.getConfig().events.onUpdated.subscribe(i),e.on(e.exports.PlayerEvent.Play,i),l.BrowserUtils.isAndroid&&l.BrowserUtils.isChrome&&e.on(e.exports.PlayerEvent.TimeChanged,i),e.exports.PlayerEvent.DurationChanged&&e.on(e.exports.PlayerEvent.DurationChanged,i),e.on(e.exports.PlayerEvent.AdBreakStarted,i),e.on(e.exports.PlayerEvent.AdBreakFinished,i)}return e.prototype.detect=function(){var e=this.player.isLive();e!==this.live&&(this.liveChangedEvent.dispatch(this.player,{live:e}),this.live=e)},Object.defineProperty(e.prototype,"onLiveChanged",{get:function(){return this.liveChangedEvent.getEvent()},enumerable:!1,configurable:!0}),e}(),i.clampValueToRange=function(e,t,n){return Math.min(Math.max(e,Math.min(t,n)),Math.max(t,n))}},41505:function(e,t,n){"use strict";var i,r=this&&this.__extends||(i=function(e,t){return(i=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])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(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 o=n(72177),s=n(24379);t.FontSizeSelectBox=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 r(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 i=this;e.prototype.configure.call(this,t,n),this.settingsManager.fontSize.onChanged.subscribe(function(e,t){t.isSet()?i.toggleOverlayClass("fontsize-"+t.value):i.toggleOverlayClass(null),i.selectItem(t.value)}),this.onItemSelectionChanged.subscribe(function(e,t){i.settingsManager.fontSize.value=t}),this.onShow.subscribe(function(){i.populateItemsWithFilter()}),this.populateItemsWithFilter(),this.initFromSettings()},t.prototype.initFromSettings=function(){this.settingsManager.fontSize.isSet()&&this.toggleOverlayClass("fontsize-"+this.settingsManager.fontSize.value)},t}(o.SubtitleSettingSelectBox)},41627:(e,t)=>{"use strict";
1Object.defineProperty(t,"__esModule",{value:!0})},41940:function(e,t,n){"use strict";var i,r=this&&this.__extends||(i=function(e,t){return(i=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])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.AirPlayToggleButton=void 0;var o=n(67598),s=n(24379);t.AirPlayToggleButton=function(e){function t(t){void 0===t&&(t={});var n=e.call(this,t)||this;return n.config=n.mergeConfig(t,{cssClass:"ui-airplaytogglebutton",text:s.i18n.getLocalizer("appleAirplay")},n.config),n}return r(t,e),t.prototype.configure=function(t,n){var i=this;if(e.prototype.configure.call(this,t,n),!t.isAirplayAvailable)return void this.hide();this.onClick.subscribe(function(){t.isAirplayAvailable()?t.showAirplayTargetPicker():console&&console.log("AirPlay unavailable")});var r=function(){t.isAirplayAvailable()?i.show():i.hide()},o=function(){t.isAirplayActive()?i.on():i.off()};t.on(t.exports.PlayerEvent.AirplayAvailable,r),t.on(t.exports.PlayerEvent.AirplayChanged,o),r(),o()},t}(o.ToggleButton)},42059:function(e,t,n){"use strict";var i,r=this&&this.__extends||(i=function(e,t){return(i=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])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.SeekBarLabel=void 0;var o=n(8675),s=n(30194),a=n(86051),u=n(27717),l=n(85421),c=n(41113);t.SeekBarLabel=function(e){function t(t){void 0===t&&(t={});var n=e.call(this,t)||this;return n.appliedMarkerCssClasses=[],n.initializeTimeFormat=function(){var e=n.player;null!=e&&(n.timeFormat=Math.abs(e.isLive()?e.getMaxTimeShift():e.getDuration())>=3600?u.StringUtils.FORMAT_HHMMSS:u.StringUtils.FORMAT_MMSS,n.setTitleText(null),n.setThumbnail(null))},n.handleSeekPreview=function(e,t){if(n.player.isLive()){var i,r=n.player.getMaxTimeShift(),o=r-r*(t.position/100);n.setTime(o);var s=(i=n.player.getTimeShift(),n.player.getCurrentTime()-i+o);n.setThumbnail(n.player.getThumbnail(s))}else{var a=n.player.getDuration()*(t.position/100);n.setTime(a);var u=c.PlayerUtils.getSeekableRangeStart(n.player,0);n.setThumbnail(n.player.getThumbnail(a+u))}if(t.marker?n.setTitleText(t.marker.marker.title):n.setTitleText(null),n.appliedMarkerCssClasses.length>0&&(n.getDomElement().removeClass(n.appliedMarkerCssClasses.join(" ")),n.appliedMarkerCssClasses=[]),t.marker){var l=(t.marker.marker.cssClasses||[]).map(function(e){return n.prefixCss(e)});n.getDomElement().addClass(l.join(" ")),n.appliedMarkerCssClasses=l}},n.timeLabel=new s.Label({cssClasses:["seekbar-label-metadata","seekbar-label-time"]}),n.titleLabel=new s.Label({cssClasses:["seekbar-label-metadata","seekbar-label-title"]}),n.thumbnail=new a.Component({cssClasses:["seekbar-thumbnail"],role:"img"}),n.thumbnailImageLoader=new l.ImageLoader,n.container=new o.Container({components:[n.titleLabel,n.thumbnail,n.timeLabel],cssClass:"seekbar-label-inner"}),n.config=n.mergeConfig(t,{cssClass:"ui-seekbar-label",components:[n.container],hidden:!0},n.config),n}return r(t,e),t.prototype.configure=function(t,n){e.prototype.configure.call(this,t,n),this.player=t,this.uiManager=n,n.onSeekPreview.subscribeRateLimited(this.handleSeekPreview,100),n.getConfig().events.onUpdated.subscribe(this.initializeTimeFormat),t.on(this.player.exports.PlayerEvent.DurationChanged,this.initializeTimeFormat),this.initializeTimeFormat()},t.prototype.setPositionInBounds=function(e,t){this.getDomElement().css("left",e+"px");var n=this.container.getDomElement().get(0).parentElement.getBoundingClientRect(),i=0;n.right>t.right?i=n.right-t.right:n.left<t.left&&(i=n.left-t.left),0!==i&&this.getDomElement().css("left",e-i+"px")},t.prototype.setText=function(e){this.timeLabel.setText(e)},t.prototype.setTime=function(e){this.setText(u.StringUtils.secondsToTime(e,this.timeFormat))},t.prototype.setTitleText=function(e){this.titleLabel.setText(e),null==e?this.titleLabel.hide():this.titleLabel.show()},t.prototype.setThumbnail=function(e){var t=this;void 0===e&&(e=null);var n=this.thumbnail.getDomElement();null==e?n.css({"background-image":null,display:"none",width:null,height:null}):this.thumbnailImageLoader.load(e.url,function(i,r,o){void 0!==e.x?n.css(t.thumbnailCssSprite(e,r,o)):n.css(t.thumbnailCssSingleImage(e,r,o))})},t.prototype.thumbnailCssSprite=function(e,t,n){var i=t/e.width,r=n/e.height,o=e.x/e.width,s=e.y/e.height,a=1/e.width*e.height;return{display:"inherit","background-image":'url("'.concat(e.url,'")'),"padding-bottom":"".concat(100*a,"%"),"background-size":"".concat(100*i,"% ").concat(100*r,"%"),"background-position":"-".concat(100*o,"% -").concat(100*s,"%")}},t.prototype.thumbnailCssSingleImage=function(e,t,n){return{display:"inherit","background-image":'url("'.concat(e.url,'")'),"padding-bottom":"".concat(1/t*n*100,"%"),"background-size":"100% 100%","background-position":"0 0"}},t.prototype.release=function(){e.prototype.release.call(this),null==(t=this.ui
1Manager)||t.onSeekPreview.unsubscribe(this.handleSeekPreview);var t,n=this.player;null==n||n.off(n.exports.PlayerEvent.DurationChanged,this.initializeTimeFormat)},t}(o.Container)},42963:function(e,t,n){"use strict";var i,r=this&&this.__extends||(i=function(e,t){return(i=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])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.FontOpacitySelectBox=void 0;var o=n(72177),s=n(24379);t.FontOpacitySelectBox=function(e){function t(t){var n=e.call(this,t)||this;return n.config=n.mergeConfig(t,{cssClasses:["ui-subtitlesettingsfontopacityselectbox"]},n.config),n}return r(t,e),t.prototype.configure=function(t,n){var i=this;e.prototype.configure.call(this,t,n),this.addItem(null,s.i18n.getLocalizer("default")),this.addItem("100",s.i18n.getLocalizer("percent",{value:100})),this.addItem("75",s.i18n.getLocalizer("percent",{value:75})),this.addItem("50",s.i18n.getLocalizer("percent",{value:50})),this.addItem("25",s.i18n.getLocalizer("percent",{value:25})),this.onItemSelectionChanged.subscribe(function(e,t){i.settingsManager.fontOpacity.value=t,i.settingsManager.fontOpacity.isSet()?i.settingsManager.fontColor.isSet()||(i.settingsManager.fontColor.value="white"):i.settingsManager.fontColor.clear()}),this.settingsManager.fontOpacity.onChanged.subscribe(function(e,t){i.selectItem(t.value)}),this.initFromSettings()},t.prototype.initFromSettings=function(){this.settingsManager.fontOpacity.isSet()&&this.selectItem(this.settingsManager.fontOpacity.value)},t}(o.SubtitleSettingSelectBox)},44617:function(e,t,n){"use strict";var i,r=this&&this.__extends||(i=function(e,t){return(i=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])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.FontColorSelectBox=void 0;var o=n(72177),s=n(24379);t.FontColorSelectBox=function(e){function t(t){var n=e.call(this,t)||this;return n.config=n.mergeConfig(t,{cssClasses:["ui-subtitlesettingsfontcolorselectbox"]},n.config),n}return r(t,e),t.prototype.configure=function(t,n){var i=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")),this.onItemSelectionChanged.subscribe(function(e,t){i.settingsManager.fontColor.value=t}),this.settingsManager.fontColor.onChanged.subscribe(function(e,t){i.settingsManager.fontColor.isSet()?i.settingsManager.fontOpacity.isSet()||(i.settingsManager.fontOpacity.value="100"):i.settingsManager.fontOpacity.clear(),i.selectItem(t.value),i.setColorAndOpacity()}),this.settingsManager.fontOpacity.onChanged.subscribe(function(){i.setColorAndOpacity()}),this.initFromSettings()},t.prototype.initFromSettings=function(){this.settingsManager.fontColor.isSet()&&(this.selectItem(this.settingsManager.fontColor.value),this.setColorAndOpacity())},t.prototype.setColorAndOpacity=function(){this.settingsManager.fontColor.isSet()&&this.settingsManager.fontOpacity.isSet()?this.toggleOverlayClass("fontcolor-"+this.settingsManager.fontColor.value+this.settingsManager.fontOpacity.value):this.toggleOverlayClass(null)},t}(o.SubtitleSettingSelectBox)},45242:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);
vendor: 5,543 bytes, line 1
1(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||i(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.RecommendationOverlay=t.ErrorMessageOverlay=t.ViewMode=t.Component=t.CastToggleButton=t.CastStatusOverlay=t.AudioTrackSelectBox=t.AudioQualitySelectBox=t.LabelStyle=t.Label=t.Container=t.UIContainer=t.Watermark=t.VRToggleButton=t.VolumeToggleButton=t.VideoQualitySelectBox=t.ToggleButton=t.SettingsToggleButton=t.NavigationDirection=t.SettingsPanel=t.ItemSelectionList=t.SelectBox=t.SeekBar=t.PlaybackToggleButton=t.PlaybackTimeLabelMode=t.PlaybackTimeLabel=t.HugePlaybackToggleButton=t.FullscreenToggleButton=t.ControlBar=t.ButtonStyle=t.Button=t.SettingsPanelNavigationGroupConfig=t.SettingsPanelNavigationGroup=t.RootNavigationGroup=t.NavigationGroup=t.SpatialNavigation=t.I18n=t.i18n=t.ShadowDomManager=t.ErrorUtils=t.UIPreferencesManager=t.StorageUtils=t.BrowserUtils=t.UIUtils=t.PlayerUtils=t.StringUtils=t.ArrayUtils=t.UIFactory=t.UIComponentLayoutOverride=t.version=void 0,t.ReplayButton=t.ToggleSettingsPanelItem=t.DynamicSettingsPanelItem=t.SettingsPanelItem=t.SubtitleSettingsPanelPage=t.SettingsPanelPageOpenButton=t.SettingsPanelPageBackButton=t.SettingsPanelPage=t.AudioTrackListBox=t.SubtitleListBox=t.ListBox=t.SubtitleSettingsResetButton=t.WindowOpacitySelectBox=t.WindowColorSelectBox=t.SubtitleSettingSelectBox=t.FontSizeSelectBox=t.FontOpacitySelectBox=t.FontFamilySelectBox=t.FontColorSelectBox=t.CharacterEdgeSelectBox=t.BackgroundOpacitySelectBox=t.BackgroundColorSelectBox=t.Spacer=t.CaptionToggleButton=t.PictureInPictureToggleButton=t.VolumeSlider=t.AirPlayToggleButton=t.MetadataLabelContent=t.MetadataLabel=t.CloseButton=t.PlaybackToggleOverlay=t.CastUIContainer=t.PlayerContextMenu=t.InteractiveContextMenuItem=t.ContextMenu=t.BufferingOverlay=t.HugeReplayButton=t.PlaybackSpeedSelectBox=t.AdCounterLabel=t.AdClickOverlay=t.AdMessageLabel=t.AdControlBar=t.AdSkipButton=t.ClickOverlay=t.VolumeControlButton=t.TitleBar=t.SubtitleSelectBox=t.SubtitleOverlay=t.SeekBarLabel=t.RecommendationItem=void 0,t.FontStyleSelectBox=t.CharacterEdgeColorSelectBox=t.TouchControlOverlay=t.InteractiveSettingsPanelItem=t.PlayerInsightsPanel=t.SettingsPanelSeparator=t.SettingsPanelPageNavigatorButton=t.SettingsPanelSelectOption=t.SmallCenteredPlaybackToggleButton=t.TvNoiseCanvas=t.PersistentPreferencesToggleButton=t.EcoModeToggleButton=t.EcoModeContainer=t.DismissClickOverlay=t.Icon=t.AdStatusOverlay=t.ListSelector=t.QuickSeekButton=void 0;var o=n(84745);Object.defineProperty(t,"version",{enumerable:!0,get:function(){return o.version}}),r(n(69239),t),r(n(41627),t);var s=n(25227);Object.defineProperty(t,"UIComponentLayoutOverride",{enumerable:!0,get:function(){return s.UIComponentLayoutOverride}});var a=n(63993);Object.defineProperty(t,"UIFactory",{enumerable:!0,get:function(){return a.UIFactory}});var u=n(53623);Object.defineProperty(t,"ArrayUtils",{enumerable:!0,get:function(){return u.ArrayUtils}});var l=n(27717);Object.defineProperty(t,"StringUtils",{enumerable:!0,get:function(){return l.StringUtils}});var c=n(41113);Object.defineProperty(t,"PlayerUtils",{enumerable:!0,get:function(){return c.PlayerUtils}});var d=n(54959);Object.defineProperty(t,"UIUtils",{enumerable:!0,get:function(){return d.UIUtils}});var p=n(2652);Object.defineProperty(t,"BrowserUtils",{enumerable:!0,get:function(){return p.BrowserUtils}});var h=n(53135);Object.defineProperty(t,"StorageUtils",{enumerable:!0,get:function(){return h.StorageUtils}});var f=n(48794);Object.defineProperty(t,"UIPreferencesManager",{enumerable:!0,get:function(){return f.UIPreferencesManager}});var g=n(4638);Object.defineProperty(t,"ErrorUtils",{enumerable:!0,get:function(){return g.ErrorUtils}});var v=n(88682);Object.defineProperty(t,"ShadowDomManager",{enumerable:!0,get:function(){return v.ShadowDomManager}});var y=n(24379);Object.defineProperty(t,"i18n",{enumerable:!0,get:function(){return y.i18n}}),Object.defineProperty(t,"I18n",{enumerable:!0,get:function(){return y.I18n}});var m=n(45318);Object.defineProperty(t,"SpatialNavigation",{enumerable:!0,get:function(){return m.SpatialNavigation}});var b=n(16998);Object.defineProperty(t,"NavigationGroup",{enumerable:!0,get:function(){return b.NavigationGroup}});var S=n(40525);Object.defineProperty(t,"RootNavigationGroup",{enumerable:!0,get:function(){return S.RootNavigationGroup}});var E=n(59182);Object.defineProperty(t,"SettingsPanelNavigationGroup",{enumerable:!0,get:function(){return E.SettingsPanelNavigationGroup}}),Object.defineProperty(t,"SettingsPanelNavigationGroupConfig",{enumerable:!0,get:function(){return E.SettingsPanelNavigationGroupConfig}});var _=n(94474);Object.defineProperty(t,"Button",{enumerable:!0,get:function(){return _.Button}}),Object.defineProperty(t,"ButtonStyle",{enumerable:!0,get:function(){return _.ButtonStyle}});var T=n(27082);Object.defineProperty(t,"ControlBar",{enumerable:!0,get:function(){return T.ControlBar}});var P=n(6291);Object.defineProperty(t,"FullscreenToggleButton",{enumerable:!0,get:function(){return P.FullscreenToggleButton}});var C=n(23160);Object.defineProperty(t,"HugePlaybackToggleButton",{enumerable:!0,get:function(){return C.HugePlaybackToggleButton}});var A=n(66598);Object.defineProperty(t,"PlaybackTimeLabel",{enumerable:!0,get:function(){return A.PlaybackTimeLabel}}
1),Object.defineProperty(t,"PlaybackTimeLabelMode",{enumerable:!0,get:function(){return A.PlaybackTimeLabelMode}});var w=n(51555);Object.defineProperty(t,"PlaybackToggleButton",{enumerable:!0,get:function(){return w.PlaybackToggleButton}});var k=n(51571);Object.defineProperty(t,"SeekBar",{enumerable:!0,get:function(){return k.SeekBar}});var O=n(46419);Object.defineProperty(t,"SelectBox",{enumerable:!0,get:function(){return O.SelectBox}});var M=n(58597);Object.defineProperty(t,"ItemSelectionList",{enumerable:!0,get:function(){return M.ItemSelectionList}});var I=n(52023);Object.defineProperty(t,"SettingsPanel",{enumerable:!0,get:function(){return I.SettingsPanel}}),Object.defineProperty(t,"NavigationDirection",{enumerable:!0,get:function(){return I.NavigationDirection}});var x=n(20875);Object.defineProperty(t,"SettingsToggleButton",{enumerable:!0,get:function(){return x.SettingsToggleButton}});var R=n(67598);Object.defineProperty(t,"ToggleButton",{enumerable:!0,get:function(){return R.ToggleButton}});var L=n(29155);Object.defineProperty(t,"VideoQualitySelectBox",{enumerable:!0,get:function(){return L.VideoQualitySelectBox}});var D=n(94944);Object.defineProperty(t,"VolumeToggleButton",{enumerable:!0,get:function(){return D.VolumeToggleButton}});var U=n(33278);Object.defineProperty(t,"VRToggleButton",{enumerable:!0,get:function(){return U.VRToggleButton}});var B=n(49226);Object.defineProperty(t,"Watermark",{enumerable:!0,get:function(){return B.Watermark}});var N=n(12485);Object.defineProperty(t,"UIContainer",{enumerable:!0,get:function(){return N.UIContainer}});var F=n(8675);Object.defineProperty(t,"Container",{enumerable:!0,get:function(){return F.Container}});var j=n(30194);Object.defineProperty(t,"Label",{enumerable:!0,get:function(){return j.Label}}),Object.defineProperty(t,"LabelStyle",{enumerable:!0,get:function(){return j.LabelStyle}});var H=n(47426);Object.defineProperty(t,"AudioQualitySelectBox",{enumerable:!0,get:function(){return H.AudioQualitySelectBox}});var V=n(97440);Object.defineProperty(t,"AudioTrackSelectBox",{enumerable:!0,get:function(){return V.AudioTrackSelectBox}});var W=n(20949);Object.defineProperty(t,"CastStatusOverlay",{enumerable:!0,get:function(){return W.CastStatusOverlay}});var z=n(94297);Object.defineProperty(t,"CastToggleButton",{enumerable:!0,get:function(){return z.CastToggleButton}});var K=n(86051);Object.defineProperty(t,"Component",{enumerable:!0,get:function(){return K.Component}}),Object.defineProperty(t,"ViewMode",{enumerable:!0,get:function(){return K.ViewMode}});var G=n(3414);Object.defineProperty(t,"ErrorMessageOverlay",{enumerable:!0,get:function(){return G.ErrorMessageOverlay}});var q=n(39263);Object.defineProperty(t,"RecommendationOverlay",{enumerable:!0,get:function(){return q.RecommendationOverlay}});var Q=n(78976);Object.defineProperty(t,"RecommendationItem",{enumerable:!0,get:function(){return Q.RecommendationItem}});var X=n(42059);Object.defineProperty(t,"SeekBarLabel",{enumerable:!0,get:function(){return X.SeekBarLabel}});var Y=n(54362);Object.defineProperty(t,"SubtitleOverlay",{enumerable:!0,get:function(){return Y.SubtitleOverlay}});var J=n(72319);Object.defineProperty(t,"SubtitleSelectBox",{enumerable:!0,get:function(){return J.SubtitleSelectBox}});var Z=n(56211);Object.defineProperty(t,"TitleBar",{enumerable:!0,get:function(){return Z.TitleBar}});var $=n(15621);Object.defineProperty(t,"VolumeControlButton",{enumerable:!0,get:function(){return $.VolumeControlButton}});var ee=n(51350);Object.defineProperty(t,"ClickOverlay",{enumerable:!0,get:function(){return ee.ClickOverlay}});var et=n(57221);Object.defineProperty(t,"AdSkipButton",{enumerable:!0,get:function(){return et.AdSkipButton}});var en=n(83288);Object.defineProperty(t,"AdControlBar",{enumerable:!0,get:function(){return en.AdControlBar}});var ei=n(1389);Object.defineProperty(t,"AdMessageLabel",{enumerable:!0,get:function(){return ei.AdMessageLabel}});var er=n(63934);Object.defineProperty(t,"AdClickOverlay",{enumerable:!0,get:function(){return er.AdClickOverlay}});var eo=n(67216);Object.defineProperty(t,"AdCounterLabel",{enumerable:!0,get:function(){return eo.AdCounterLabel}});var es=n(87319);Object.defineProperty(t,"PlaybackSpeedSelectBox",{enumerable:!0,get:function(){return es.PlaybackSpeedSelectBox}});var ea=n(90210);Object.defineProperty(t,"HugeReplayButton",{enumerable:!0,get:function(){return ea.HugeReplayButton}});var eu=n(68948);Object.defineProperty(t,"BufferingOverlay",{enumerable:!0,get:function(){return eu.BufferingOverlay}});var el=n(95715);Object.defineProperty(t,"ContextMenu",{enumerable:!0,get:function(){return el.ContextMenu}});var ec=n(34594);Object.defineProperty(t,"InteractiveContextMenuItem",{enumerable:!0,get:function(){return ec.InteractiveContextMenuItem}});var ed=n(94104);Object.defineProperty(t,"PlayerContextMenu",{enumerable:!0,get:function(){return ed.PlayerContextMenu}});var ep=n(46060);Object.defineProperty(t,"CastUIContainer",{enumerable:!0,get:function(){return ep.CastUIContainer}}
1);var eh=n(38509);Object.defineProperty(t,"PlaybackToggleOverlay",{enumerable:!0,get:function(){return eh.PlaybackToggleOverlay}});var ef=n(21382);Object.defineProperty(t,"CloseButton",{enumerable:!0,get:function(){return ef.CloseButton}});var eg=n(54953);Object.defineProperty(t,"MetadataLabel",{enumerable:!0,get:function(){return eg.MetadataLabel}}),Object.defineProperty(t,"MetadataLabelContent",{enumerable:!0,get:function(){return eg.MetadataLabelContent}});var ev=n(41940);Object.defineProperty(t,"AirPlayToggleButton",{enumerable:!0,get:function(){return ev.AirPlayToggleButton}});var ey=n(93797);Object.defineProperty(t,"VolumeSlider",{enumerable:!0,get:function(){return ey.VolumeSlider}});var em=n(87427);Object.defineProperty(t,"PictureInPictureToggleButton",{enumerable:!0,get:function(){return em.PictureInPictureToggleButton}});var eb=n(96544);Object.defineProperty(t,"CaptionToggleButton",{enumerable:!0,get:function(){return eb.CaptionToggleButton}});var eS=n(92372);Object.defineProperty(t,"Spacer",{enumerable:!0,get:function(){return eS.Spacer}});var eE=n(34164);Object.defineProperty(t,"BackgroundColorSelectBox",{enumerable:!0,get:function(){return eE.Backgroun
1dColorSelectBox}});var e_=n(56558);Object.defineProperty(t,"BackgroundOpacitySelectBox",{enumerable:!0,get:function(){return e_.BackgroundOpacitySelectBox}});var eT=n(8183);Object.defineProperty(t,"CharacterEdgeSelectBox",{enumerable:!0,get:function(){return eT.CharacterEdgeSelectBox}});var eP=n(44617);Object.defineProperty(t,"FontColorSelectBox",{enumerable:!0,get:function(){return eP.FontColorSelectBox}});var eC=n(81942);Object.defineProperty(t,"FontFamilySelectBox",{enumerable:!0,get:function(){return eC.FontFamilySelectBox}});var eA=n(42963);Object.defineProperty(t,"FontOpacitySelectBox",{enumerable:!0,get:function(){return eA.FontOpacitySelectBox}});var ew=n(41505);Object.defineProperty(t,"FontSizeSelectBox",{enumerable:!0,get:function(){return ew.FontSizeSelectBox}});var ek=n(72177);Object.defineProperty(t,"SubtitleSettingSelectBox",{enumerable:!0,get:function(){return ek.SubtitleSettingSelectBox}});var eO=n(3312);Object.defineProperty(t,"WindowColorSelectBox",{enumerable:!0,get:function(){return eO.WindowColorSelectBox}});var eM=n(24834);Object.defineProperty(t,"WindowOpacitySelectBox",{enumerable:!0,get:function(){return eM.WindowOpacitySelectBox}});var eI=n(51492);Object.defineProperty(t,"SubtitleSettingsResetButton",{enumerable:!0,get:function(){return eI.SubtitleSettingsResetButton}});var ex=n(14307);Object.defineProperty(t,"ListBox",{enumerable:!0,get:function(){return ex.ListBox}});var eR=n(94399);Object.defineProperty(t,"SubtitleListBox",{enumerable:!0,get:function(){return eR.SubtitleListBox}});var eL=n(27172);Object.defineProperty(t,"AudioTrackListBox",{enumerable:!0,get:function(){return eL.AudioTrackListBox}});var eD=n(57640);Object.defineProperty(t,"SettingsPanelPage",{enumerable:!0,get:function(){return eD.SettingsPanelPage}});var eU=n(75387);Object.defineProperty(t,"SettingsPanelPageBackButton",{enumerable:!0,get:function(){return eU.SettingsPanelPageBackButton}});var eB=n(33624);Object.defineProperty(t,"SettingsPanelPageOpenButton",{enumerable:!0,get:function(){return eB.SettingsPanelPageOpenButton}});var eN=n(89578);Object.defineProperty(t,"SubtitleSettingsPanelPage",{enumerable:!0,get:function(){return eN.SubtitleSettingsPanelPage}});var eF=n(21616);Object.defineProperty(t,"SettingsPanelItem",{enumerable:!0,get:function(){return eF.SettingsPanelItem}});var ej=n(85251);Object.defineProperty(t,"DynamicSettingsPanelItem",{enumerable:!0,get:function(){return ej.DynamicSettingsPanelItem}});var eH=n(98908);Object.defineProperty(t,"ToggleSettingsPanelItem",{enumerable:!0,get:function(){return eH.ToggleSettingsPanelItem}});var eV=n(53709);Object.defineProperty(t,"ReplayButton",{enumerable:!0,get:function(){return eV.ReplayButton}});var eW=n(77017);Object.defineProperty(t,"QuickSeekButton",{enumerable:!0,get:function(){return eW.QuickSeekButton}});var ez=n(567);Object.defineProperty(t,"ListSelector",{enumerable:!0,get:function(){return ez.ListSelector}});var eK=n(32400);Object.defineProperty(t,"AdStatusOverlay",{enumerable:!0,get:function(){return eK.AdStatusOverlay}});var eG=n(47857);Object.defineProperty(t,"Icon",{enumerable:!0,get:function(){return eG.Icon}});var eq=n(68146);Object.defineProperty(t,"DismissClickOverlay",{enumerable:!0,get:function(){return eq.DismissClickOverlay}});var eQ=n(51601);Object.defineProperty(t,"EcoModeContainer",{enumerable:!0,get:function(){return eQ.EcoModeContainer}});var eX=n(1108);Object.defineProperty(t,"EcoModeToggleButton",{enumerable:!0,get:function(){return eX.EcoModeToggleButton}});var eY=n(74519);Object.defineProperty(t,"PersistentPreferencesToggleButton",{enumerable:!0,get:function(){return eY.PersistentPreferencesToggleButton}});var eJ=n(65492);Object.defineProperty(t,"TvNoiseCanvas",{enumerable:!0,get:function(){return eJ.TvNoiseCanvas}});var eZ=n(54852);Object.defineProperty(t,"SmallCenteredPlaybackToggleButton",{enumerable:!0,get:function(){return eZ.SmallCenteredPlaybackToggleButton}});var e$=n(39062);Object.defineProperty(t,"SettingsPanelSelectOption",{enumerable:!0,get:function(){return e$.SettingsPanelSelectOption}});var e0=n(22505);Object.defineProperty(t,"SettingsPanelPageNavigatorButton",{enumerable:!0,get:function(){return e0.SettingsPanelPageNavigatorButton}});var e1=n(58038);Object.defineProperty(t,"SettingsPanelSeparator",{enumerable:!0,get:function(){return e1.SettingsPanelSeparator}});var e2=n(84416);Object.defineProperty(t,"PlayerInsightsPanel",{enumerable:!0,get:function(){return e2.PlayerInsightsPanel}});var e4=n(78196);Object.defineProperty(t,"InteractiveSettingsPanelItem",{enumerable:!0,get:function(){return e4.InteractiveSettingsPanelItem}});var e8=n(80582);Object.defineProperty(t,"TouchControlOverlay",{enumerable:!0,get:function(){return e8.TouchControlOverlay}});var e3=n(52406);Object.defineProperty(t,"CharacterEdgeColorSelectBox",{enumerable:!0,get:function(){return e3.CharacterEdgeColorSelectBox}});var e6=n(64695);Object.defineProperty(t,"FontStyleSelectBox",{enumerable:!0,get:function(){return e6.FontStyleSelectBox}}),"function"!=typeof Object.assign&&(Object.assign=function(e){if(null==e)throw TypeError("Cannot convert undefined or null to object");e=Object(e);for(var t=1;t<arguments.length;t++){var n=arguments[t];if(null!=n)for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e})},45318:function(e,t,n){"use strict";var i=this&&this.__spreadArray||function(e,t,n){if(n||2==arguments.length)for(var i,r=0,o=t.length;r<o;r++)!i&&r in t||(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))};
1Object.defineProperty(t,"__esModule",{value:!0}),t.SpatialNavigation=void 0;var r=n(32354),o=n(93931),s=n(38661),a=n(55358);t.SpatialNavigation=function(){function e(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var u=this;this.navigationGroups=[],this.onShow=function(e){u.activeNavigationGroups.push(e),u.updateEnabledNavigationGroup()},this.onHide=function(e){var t=u.activeNavigationGroups.findIndex(function(t){return t===e});t>-1&&(e.disable(),u.activeNavigationGroups.splice(t,1),u.updateEnabledNavigationGroup())},this.handleKeyEvent=function(e){var t=u.keyMap[e.keyCode],n=u.getActiveNavigationGroup();!(!n||!n.container||n.container.isHidden()||n.container.isDisabled())&&((0,a.isDirection)(t)?(n.handleNavigation(t),e.preventDefault(),e.stopPropagation()):(0,a.isAction)(t)&&n.handleAction(t)&&(e.preventDefault(),e.stopPropagation()))},this.seekBarHandler=new o.SeekBarHandler(e),this.activeNavigationGroups=[],this.unsubscribeVisibilityChangesFns=[],this.eventSubscriber=new r.NodeEventSubscriber,this.navigationGroups=i([e],t,!0),this.keyMap=(0,s.getKeyMapForPlatform)(),this.subscribeToNavigationGroupVisibilityChanges(),this.attachKeyEventHandler(),this.enableDefaultNavigationGroup()}return e.prototype.attachKeyEventHandler=function(){this.eventSubscriber.on(document,"keydown",this.handleKeyEvent,!0)},e.prototype.subscribeToNavigationGroupVisibilityChanges=function(){var e=this;this.navigationGroups.forEach(function(t){var n=function(){return e.onShow(t)},i=function(){return e.onHide(t)};t.container.onShow.subscribe(n),t.container.onHide.subscribe(i),e.unsubscribeVisibilityChangesFns.push(function(){return t.container.onShow.unsubscribe(n)},function(){return t.container.onHide.unsubscribe(i)})})},e.prototype.unsubscribeFromNavigationGroupVisibilityChanges=function(){this.unsubscribeVisibilityChangesFns.forEach(function(e){return e()}),this.unsubscribeVisibilityChangesFns=[]},e.prototype.enableDefaultNavigationGroup=function(){var e,t=null!=(e=this.navigationGroups.find(function(e){return e.container.isShown()}))?e:this.navigationGroups[0];t&&(this.activeNavigationGroups.push(t),this.updateEnabledNavigationGroup())},e.prototype.updateEnabledNavigationGroup=function(){var e=this;this.activeNavigationGroups.forEach(function(t,n){n<e.activeNavigationGroups.length-1?t.disable():t.enable()})},e.prototype.getActiveNavigationGroup=function(){return this.activeNavigationGroups[this.activeNavigationGroups.length-1]},e.prototype.release=function(){this.unsubscribeFromNavigationGroupVisibilityChanges(),this.eventSubscriber.release(),this.navigationGroups.forEach(function(e){return e.release()}),this.seekBarHandler.release()},e}()},45872:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PlayerInsightProperty=t.PlayerInsightsProvider=void 0;var i=n(85704),r=n(80432),o=n(50002);t.PlayerInsightsProvider=function(){function e(){var e=this;this.properties={video:new s("Video",function(e){return o.PlayerInsightsUtils.formatVideoQualityInsight(e)}),viewportFrames:new s("Viewport / Frames",function(e){return o.PlayerInsightsUtils.formatViewportFramesInsight(e)}),audio:new s("Audio",function(e){return o.PlayerInsightsUtils.formatAudioQualityInsight(e)}),bufferVideoAudio:new s("Buffer Video / Audio",function(e){return o.PlayerInsightsUtils.formatBufferInsight(e)}),time:new s("Time",function(e){return o.PlayerInsightsUtils.formatTimeInsight(e)}),stream:new s("Stream",function(e){return o.PlayerInsightsUtils.formatStreamInsight(e)}),player:new s("Player version",function(e){return e.version})},this.events={onChanged:new i.EventDispatcher},this.playerApi=null,this.uimanager=null,this.refreshTimer=null,this.refreshIntervalMs=1e3,this.active=!1,this.updateAndStartTimer=function(){e.dispatchChanged(),e.startTimer()},this.dispatchChanged=function(){e.active&&e.playerApi&&e.events.onChanged.dispatch(e,e.getSnapshots(e.playerApi))},this.stopTimer=function(){e.refreshTimer&&(e.refreshTimer.clear(),e.refreshTimer=null)}}return e.prototype.getInsights=function(){var e=[];for(var t in this.properties)e.push(this.properties[t]);return e},e.prototype.initialize=function(e,t,n){this.playerApi=e,this.uimanager=t,this.refreshIntervalMs=n,e.on(e.exports.PlayerEvent.Play,this.updateAndStartTimer),e.on(e.exports.PlayerEvent.Playing,this.updateAndStartTimer),e.on(e.exports.PlayerEvent.Paused,this.dispatchChanged),e.on(e.exports.PlayerEvent.Seeked,this.dispatchChanged),e.on(e.exports.PlayerEvent.SourceLoaded,this.dispatchChanged),e.on(e.exports.PlayerEvent.SourceUnloaded,this.dispatchChanged),e.on(e.exports.PlayerEvent.VideoQualityChanged,this.dispatchChanged),e.on(e.exports.PlayerEvent.AudioQualityChanged,this.dispatchChanged),e.on(e.exports.PlayerEvent.PlayerResized,this.dispatchChanged),e.on(e.exports.PlayerEvent.StallStarted,this.dispatchChanged),e.on(e.exports.PlayerEvent.StallEnded,this.dispatchChanged),e.on(e.exports.PlayerEvent.PlaybackFinished,this.stopTimer),e.on(e.exports.PlayerEvent.Destroy,this.stopTimer),t.getConfig().events.onUp
1dated.subscribe(this.dispatchChanged)},e.prototype.activate=function(){this.active=!0,this.dispatchChanged(),this.startTimer()},e.prototype.deactivate=function(){this.active=!1,this.stopTimer()},e.prototype.release=function(){var e;this.active=!1,this.stopTimer(),this.playerApi&&(this.playerApi.off(this.playerApi.exports.PlayerEvent.Play,this.updateAndStartTimer),this.playerApi.off(this.playerApi.exports.PlayerEvent.Playing,this.updateAndStartTimer),this.playerApi.off(this.playerApi.exports.PlayerEvent.Paused,this.dispatchChanged),this.playerApi.off(this.playerApi.exports.PlayerEvent.Seeked,this.dispatchChanged),this.playerApi.off(this.playerApi.exports.PlayerEvent.SourceLoaded,this.dispatchChanged),this.playerApi.off(this.playerApi.exports.PlayerEvent.SourceUnloaded,this.dispatchChanged),this.playerApi.off(this.playerApi.exports.PlayerEvent.VideoQualityChanged,this.dispatchChanged),this.playerApi.off(this.playerApi.exports.PlayerEvent.AudioQualityChanged,this.dispatchChanged),this.playerApi.off(this.playerApi.exports.PlayerEvent.PlayerResized,this.dispatchChanged),this.playerApi.off(this.playerApi.exports.PlayerEvent.StallStarted,this.dispatchChanged),this.playerApi.off(this.playerApi.exports.PlayerEvent.StallEnded,this.dispatchChanged),this.playerApi.off(this.playerApi.exports.PlayerEvent.PlaybackFinished,this.stopTimer),this.playerApi.off(this.playerApi.exports.PlayerEvent.Destroy,this.stopTimer)),null==(e=this.uimanager)||e.getConfig().events.onUpdated.unsubscribe(this.dispatchChanged),this.events.onChanged.unsubscribeAll(),this.playerApi=null,this.uimanager=null},Object.defineProperty(e.prototype,"onChanged",{get:function(){return this.events.onChanged.getEvent()},enumerable:!1,configurable:!0}),e.prototype.getSnapshots=function(e){var t=[];for(var n in this.properties)t.push(this.properties[n].getSnapshot(e));return t},e.prototype.startTimer=function(){this.stopTimer(),this.playerApi&&this.active&&-1!==this.refreshIntervalMs&&(this.refreshTimer=new r.Timeout(this.refreshIntervalMs,this.dispatchChanged,!0).start())},e}();var s=function(){function e(e,t){this.label=e,this.valueProvider=t}return Object.defineProperty(e.prototype,"leadingLabel",{get:function(){return this.label},enumerable:!1,configurable:!0}),e.prototype.getSnapshot=function(e){var t=this.valueProvider(e);return{value:t,visible:null!=t&&""!==t}},e}();t.PlayerInsightProperty=s},46060:function(e,t,n){"use strict";var i,r=this&&this.__extends||(i=function(e,t){return(i=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])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.CastUIContainer=void 0;var o=n(12485),s=n(80432);t.CastUIContainer=function(e){function t(t){return e.call(this,t)||this}return r(t,e),t.prototype.configure=function(t,n){var i=this;e.prototype.configure.call(this,t,n);var r=this.getConfig(),o=!1;this.castUiHideTimeout=new s.Timeout(r.hideDelay,function(){n.onControlsHide.dispatch(i),o=!1});var a=function(){o||(n.onControlsShow.dispatch(i),o=!0)},u=function(){a(),i.castUiHideTimeout.clear()},l=function(){a(),i.castUiHideTimeout.start()};t.on(t.exports.PlayerEvent.Play,l),t.on(t.exports.PlayerEvent.Paused,u),t.on(t.exports.PlayerEvent.Seek,u),t.on(t.exports.PlayerEvent.Seeked,function(){t.isPlaying()?l():u()}),n.getConfig().events.onUpdated.subscribe(l)},t.prototype.release=function(){var t;e.prototype.release.call(this),null==(t=this.castUiHideTimeout)||t.clear()},t}(o.UIContainer)},46419:function(e,t,n){"use strict";var i,r=this&&this.__extends||(i=function(e,t){return(i=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])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});
1Object.defineProperty(t,"__esModule",{value:!0}),t.SelectBox=void 0;var o=n(567),s=n(4437),a=n(24379),u=n(41113),l=n(86051),c=["mousemove","mouseenter","mouseleave","touchstart","touchmove","touchend","pointermove","click","keydown","keypress","keyup","blur"],d=["change","keyup","mouseup"],p=[["click",function(){return!0}],["keydown",function(e){return[" ","ArrowUp","ArrowDown"].includes(e.key)}],["mousedown",function(){return!0}]];t.SelectBox=function(e){function t(t){void 0===t&&(t={});var n=e.call(this,t)||this;return n.dropdownCloseListenerTimeoutId=0,n.removeDropdownCloseListeners=function(){},n.removeDropdownOpenedListeners=function(){},n.onChange=function(){var e=n.selectElement.val();n.onItemSelectedEvent(e,!1)},n.closeDropdown=function(){var e=n.getSelectElement();void 0!==e&&e.blur()},n.onPlayerStateChange=function(e,t){[u.PlayerUtils.PlayerState.Idle,u.PlayerUtils.PlayerState.Finished].includes(t)&&n.closeDropdown()},n.onDropdownOpened=function(){clearTimeout(n.dropdownCloseListenerTimeoutId),n.dropdownCloseListenerTimeoutId=window.setTimeout(function(){return n.addDropdownCloseListeners()},100),n.onViewModeChangedEvent(l.ViewMode.Persistent)},n.onDropdownClosed=function(){clearTimeout(n.dropdownCloseListenerTimeoutId),n.removeDropdownCloseListeners(),n.onViewModeChangedEvent(l.ViewMode.Temporary)},n.config=n.mergeConfig(t,{cssClass:"ui-selectbox"},n.config),n}return r(t,e),t.prototype.toDomElement=function(){return this.selectElement=new s.DOM("select",{id:this.config.id,class:this.getCssClasses(),"aria-label":a.i18n.performLocalization(this.config.ariaLabel)},this),this.onDisabled.subscribe(this.closeDropdown),this.onHide.subscribe(this.closeDropdown),this.addDropdownOpenedListeners(),this.updateDomItems(),this.selectElement.on("change",this.onChange),this.selectElement},t.prototype.configure=function(t,n){var i;e.prototype.configure.call(this,t,n),this.uiContainer=n.getUI(),null==(i=this.uiContainer)||i.onPlayerStateChange().subscribe(this.onPlayerStateChange),this.uiWrapperElement=n.uiWrapperElement},t.prototype.getSelectElement=function(){var e,t;return null==(t=null==(e=this.selectElement)?void 0:e.get())?void 0:t[0]},t.prototype.updateDomItems=function(e){if(void 0===e&&(e=null),void 0!==this.selectElement){this.selectElement.empty();for(var t=0,n=this.items;t<n.length;t++){var i=n[t],r=new s.DOM("option",{value:String(i.key)}).html(a.i18n.performLocalization(i.label));i.key===String(e)&&r.attr("selected","selected"),this.selectElement.append(r)}}},t.prototype.onItemsChangedEvent=function(){e.prototype.onItemsChangedEvent.call(this),this.updateDomItems(this.selectedItem)},t.prototype.onItemSelectedEvent=function(t,n){void 0===n&&(n=!0),e.prototype.onItemSelectedEvent.call(this,t),n&&this.updateDomItems(t)},t.prototype.addDropdownCloseListeners=function(){var e=this;this.removeDropdownCloseListeners(),clearTimeout(this.dropdownCloseListenerTimeoutId),c.forEach(function(t){return e.uiWrapperElement.on(t,e.onDropdownClosed,!0)}),d.forEach(function(t){return e.selectElement.on(t,e.onDropdownClosed,!0)}),this.removeDropdownCloseListeners=function(){c.forEach(function(t){return e.uiWrapperElement.off(t,e.onDropdownClosed,!0)}),d.forEach(function(t){return e.selectElement.off(t,e.onDropdownClosed,!0)})}},t.prototype.addDropdownOpenedListeners=function(){var e=this,t=[];this.removeDropdownOpenedListeners();for(var n=function(n,r){var o=function(t){r(t)&&e.onDropdownOpened()};t.push(function(){return e.selectElement.off(n,o,!0)}),i.selectElement.on(n,o,!0)},i=this,r=0;r<p.length;r++){var o=p[r];n(o[0],o[1])}this.removeDropdownOpenedListeners=function(){for(var e=0;e<t.length;e++)(0,t[e])()}},t.prototype.release=function(){e.prototype.release.call(this),this.removeDropdownCloseListeners(),this.removeDropdownOpenedListeners(),clearTimeout(this.dropdownCloseListenerTimeoutId)},t}(o.ListSelector)},47389:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SeekBarController=t.SeekBarType=void 0;var i,r,o=n(54959);(i=r||(t.SeekBarType=r={}))[i.Vod=0]="Vod",i[i.Live=1]="Live",i[i.Volume=2]="Volume";var s=function(e,t,n){n(e<t.min?t.min:e>t.max?t.max:e)};t.SeekBarController=function(){function e(e,t,n){this.keyStepIncrements=e,this.player=t,this.volumeController=n}
1return e.prototype.arrowKeyControls=function(e,t,n){var i=this,r=Math.floor(e);return{left:function(){return s(r-i.keyStepIncrements.leftRight,t,n)},right:function(){return s(r+i.keyStepIncrements.leftRight,t,n)},up:function(){return s(r+i.keyStepIncrements.upDown,t,n)},down:function(){return s(r-i.keyStepIncrements.upDown,t,n)},home:function(){return s(t.min,t,n)},end:function(){return s(t.max,t,n)}}},e.prototype.seekBarControls=function(e){var t=this;if(e===r.Live)return this.arrowKeyControls(this.player.getTimeShift(),{min:this.player.getMaxTimeShift(),max:0},function(e){return t.player.timeShift(e)});if(e===r.Vod)return this.arrowKeyControls(this.player.getCurrentTime(),{min:0,max:this.player.getDuration()},function(e){return t.player.seek(e)});if(e===r.Volume&&null!=this.volumeController){var n=this.volumeController.startTransition();return this.arrowKeyControls(this.player.getVolume(),{min:0,max:100},n.finish.bind(n))}},e.prototype.setSeekBarControls=function(e,t){var n=this;e.on("keydown",function(e){var i=t(),s=n.seekBarControls(i);switch(e.keyCode){case o.UIUtils.KeyCode.LeftArrow:s.left(),e.preventDefault();break;case o.UIUtils.KeyCode.RightArrow:s.right(),e.preventDefault();break;case o.UIUtils.KeyCode.UpArrow:s.up(),e.preventDefault();break;case o.UIUtils.KeyCode.DownArrow:s.down(),e.preventDefault();break;case o.UIUtils.KeyCode.Home:s.home(),e.preventDefault();break;case o.UIUtils.KeyCode.End:s.end(),e.preventDefault();break;case o.UIUtils.KeyCode.Space:n.player.isPlaying()?n.player.pause():n.player.play(),e.preventDefault();break;case o.UIUtils.KeyCode.Comma:i!==r.Volume&&(n.stepFrame(-1),e.preventDefault());break;case o.UIUtils.KeyCode.Period:i!==r.Volume&&(n.stepFrame(1),e.preventDefault())}})},e.prototype.stepFrame=function(e){if(!this.player.isLive()){this.player.isPaused()||this.player.pause("ui");var t=Math.max(0,this.player.getCurrentTime()+e/this.getFrameRate());this.player.seek(t)}},e.prototype.getFrameRate=function(){var e,t=null==(e=this.player.getPlaybackVideoData())?void 0:e.frameRate;return"number"==typeof t&&t>0?t:30},e}()},47426:function(e,t,n){"use strict";var i,r=this&&this.__extends||(i=function(e,t){return(i=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])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.AudioQualitySelectBox=void 0;var o=n(46419),s=n(24379);t.AudioQualitySelectBox=function(e){function t(t){void 0===t&&(t={});var n=e.call(this,t)||this;return n.config=n.mergeConfig(t,{cssClasses:["ui-audioqualityselectbox"]},n.config),n}return r(t,e),t.prototype.configure=function(t,n){var i=this;e.prototype.configure.call(this,t,n);var r=function(){i.selectItem(t.getAudioQuality().id)},o=function(){var e=t.getAvailableAudioQualities();i.clearItems(),i.addItem("auto",s.i18n.getLocalizer("auto"));for(var n=0;n<e.length;n++){var o=e[n];i.addItem(o.id,o.label)}r()};this.onItemSelectionChanged.subscribe(function(e,n){t.setAudioQuality(n)}),t.on(t.exports.PlayerEvent.AudioChanged,o),t.on(t.exports.PlayerEvent.SourceUnloaded,o),t.on(t.exports.PlayerEvent.PeriodSwitched,o),t.on(t.exports.PlayerEvent.AudioQualityChanged,r),t.exports.PlayerEvent.AudioQualityAdded&&(t.on(t.exports.PlayerEvent.AudioQualityAdded,o),t.on(t.exports.PlayerEvent.AudioQualityRemoved,o)),n.getConfig().events.onUpdated.subscribe(o)},t}(o.SelectBox)},47857:function(e,t,n){"use strict";var i,r=this&&this.__extends||(i=function(e,t){return(i=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])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});
1Object.defineProperty(t,"__esModule",{value:!0}),t.Icon=void 0;var o=n(86051),s=n(4437);t.Icon=function(e){function t(t){void 0===t&&(t={});var n=e.call(this,t)||this;return n.config=n.mergeConfig(t,{cssClass:"ui-icon"},n.config),n}return r(t,e),t.prototype.toDomElement=function(){return new s.DOM("div",{class:this.getCssClasses()})},t}(o.Component)},48331:e=>{!function(){"use strict";self,e.exports=(self.webpackChunkbitmovin_player=self.webpackChunkbitmovin_player||[]).push([[482],{82657:function(e,t){Object.defineProperty(t,"__esModule",{value:!0})},37723:function(e,t){var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};function i(e,t){return Object.keys(t).find(function(n){var i=t[n].getSubtitle(),r=i.id,o=i.lang,s=i.isFragmented,a=i.kind,u=r===e.id,l=!e.isFragmented||s===e.isFragmented,c=o===e.lang;e.isPreferred&&e.lang&&(c=o.includes(e.lang)||e.lang.includes(o));var d=a===e.kind&&c&&l;return u||d})}Object.defineProperty(t,"__esModule",{value:!0}),t.EnabledSubtitlesTracker=void 0,t.EnabledSubtitlesTracker=function(){function e(){this.CS={},this.DS=0}return e.prototype.addSubtitle=function(e){this.removeSubtitle(e.id),this.CS[this.FS()]=n({isFragmented:!1},e)},e.prototype.removeSubtitle=function(e){var t=this;Object.keys(this.CS).forEach(function(n){t.CS[n].id===e&&delete t.CS[n]})},e.prototype.shouldEnableSubtitle=function(e,t){var n=this;return!!Object.keys(this.CS).find(function(i){return n.ES(n.CS[i],t)===e.id})},e.prototype.ES=function(e,t){var n=e.id,r=e.kind,o=e.lang,s=e.isFragmented;return i({lang:o,kind:r,isFragmented:s,id:n},t)||i({lang:o,kind:r,isFragmented:s},t)||i({lang:o,kind:r},t)},e.prototype.FS=function(){return this.DS++,this.DS},e.prototype.dispose=function(){this.CS={},this.DS=0},e}()},53396:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.ForcedSubtitleController=void 0;var i=n(55552);t.ForcedSubtitleController=function(){function e(){this.zS={}}return e.prototype.addSubtitleHandler=function(e){this.zS[e.getSubtitle().id]=e},e.prototype.deactivate=function(){return this.BS()?Promise.all(Object.values(this.zS).map(function(e){return e.deactivate()})).then(function(){}):Promise.resolve()},e.prototype.activate=function(e){var t=this;return void 0===e&&(e=this.AS),this.BS()?(this.AS=e,this.deactivate().then(function(){var e=Object.values(t.zS).find(function(e){return(0,i.isEqualIsoLanguage)(e.getSubtitle().lang,t.AS)});if((e=null!=e?e:Object.values(t.zS)[0])&&!e.isActive())return e.activate().catch(function(){})})):Promise.resolve()},e.prototype.onSeek=function(e,t){Object.values(this.zS).forEach(function(n){return n.onSeek(e,t)})},e.prototype.onSeeked=function(e,t){Object.values(this.zS).forEach(function(n){return n.onSeeked(e,t)})},e.prototype.dispose=function(){Object.values(this.zS).forEach(function(e){return e.dispose()}),this.zS=null},e.prototype.BS=function(){return Object.keys(this.zS).length>0},e.prototype.getForcedSubtitleHandler=function(e){if(this.zS)return Object.values(this.zS).find(function(t){return e(t)})},e}()},42009:function(e,t){function n(e){return e.replace(/<[^>]*>?/g,"")}function i(e){return e.replace(/<br\s*\/?>/g,"\n")}Object.defineProperty(t,"__esModule",{value:!0}),t.htmlToText=function(e){return n(i(e))},t.stripHtmlTags=n,t.prepareHtml=function(e){return e.replace(/(\r\n|\r|\n)/g,"<br />")},t.replaceHtmlBreakPointsWithNewLine=i,t.stripAwayHtmlBreakPoints=function(e){return e.replace(/<br\s*\/?>/g,"")}},55552:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.isEqualIsoLanguage=function(e,t){var n;if(void 0===t)return!1;if(null==(n=window.Intl)?void 0:n.DisplayNames){var i=new window.Intl.DisplayNames(["en"],{type:"language"});try{return i.of(e.split("-")[0])===i.of(t.split("-")[0])}catch(e){}}return e===t}},86058:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.parseMP4WrappedSubtitles=function(e,t){var n,l,c,d,p=e.getTimescale();if(void 0===p||!s.ModuleManager.has(a.ModuleName.ContainerMP4))return[];var h=s.ModuleManager.get(a.ModuleName.ContainerMP4);return n=h.getMp4Fragments(e).flatMap(function(n){return h.getTrackSamples(n.moof,n.mdat,e,t)}
1),l=0,c=[],d=0,n.forEach(function(t){var n,s,a=r.CodecStringHelper.extractCodec(e.getCodec()),h=t.duration/p,f=e.getPlaybackTime()+l,g=f+h;if(l+=h,"wvtt"===a||"vtt"===a){var v=function(e,t,n,r){for(var o=e.data.buffer,s=e.data.byteOffset,a=0,l=[],c="",d="";a<e.data.byteLength;){var p=e.data.getUint32(a),h=s+a,f=i.ArrayHelper.convertBufferSourceToUTF8(new Uint8Array(o,h+4,4));if("vttc"===f){if(c){var g=u(t,n,r,d,c);l.push(g),r+=1,c="",d=""}a+=8}else"payl"===f?c=i.ArrayHelper.convertBufferSourceToUTF8(new Uint8Array(o,h+8,p-8)):"sttg"===f&&(d=i.ArrayHelper.convertBufferSourceToUTF8(new Uint8Array(o,h+8,p-8))),a+=p}return c&&(g=u(t,n,r,d,c),l.push(g)),l}(t,f,g,d);d+=v.length,v.forEach(function(e){c.push({start:f,end:g,text:e})})}else{"stpp"===a&&c.push({start:f,end:g,text:(s=new Uint8Array((n=t).data.buffer,n.data.byteOffset,n.data.byteLength),i.ArrayHelper.convertBufferSourceToUTF8(s,o.TextSegmentAnalyzer.detectEncoding(n.data)))})}}),c};var i=n(74853),r=n(34047),o=n(66502),s=n(88052),a=n(62756);function u(e,t,n,i,r){return["[EMBEDDEDWEBVTT]",e,t,n,i,r].join("\n")}},52112:function(e,t,n){var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);
1r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||i(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.SubtitleModuleDefinition=void 0;var o=n(62756),s=n(71340),a=n(42009),u=n(55552),l=n(78717),c=n(26438),d=n(606),p=n(85224);t.SubtitleModuleDefinition={name:o.ModuleName.Subtitles,module:function(){return{SubtitleService:d.SubtitleService,SubtitleParserFactory:c.SubtitleParserFactory,PlayerSubtitlesApiFactory:l.PlayerSubtitlesApiFactory,HtmlTransformer:a,LanguageComparer:u,hashCode:s.hashCode,createHtmlElement:p.createHtmlElement}},dependencies:[o.ModuleName.EngineBitmovin]},t.default=t.SubtitleModuleDefinition,r(n(82657),t)},15569:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.parsePlainTextSubtitles=function(e){var t,n,o=r.TextSegmentAnalyzer.detectEncoding(e.getData()),s=i.ArrayHelper.convertBufferSourceToUTF8(e.getData(),o),a=null!=(t=e.getPlaybackTime())?t:0;return[{start:a,end:a+(null!=(n=e.getDuration())?n:0),text:s}]};var i=n(74853),r=n(66502)},78717:function(e,t,n){var i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.PlayerSubtitlesApiFactory=void 0;var r=n(3714);t.PlayerSubtitlesApiFactory=function(){function e(){}return e.build=function(e){return new(function(){function t(){}return t.prototype.add=function(t){e.addSubtitle(t)},t.prototype.remove=function(t){e.removeSubtitle(t)},t.prototype.list=function(){return e.listSubtitles()},t.prototype.enable=function(t,n){void 0===n&&(n=!0),e.enableSubtitle(t,n)},t.prototype.disable=function(t){e.disableSubtitle(t)},t.prototype.cueEnter=function(t){e.fireEvent(r.PlayerEvent.CueEnter,i(i({},t),{type:r.PlayerEvent.CueEnter}))},t.prototype.cueExit=function(t){e.fireEvent(r.PlayerEvent.CueExit,i(i({},t),{type:r.PlayerEvent.CueExit}))},t}())},e}()},26438:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.SubtitleParserFactory=void 0;var i=n(3714),r=n(88052),o=n(62756),s=n(22374);t.SubtitleParserFactory=function(){function e(){}return e.createInstance=function(e,t){var n;return t.indexOf("<?")>-1||t.indexOf("<tt")>-1?r.ModuleManager.has(o.ModuleName.SubtitlesTTML)?n=new(0,r.ModuleManager.get(o.ModuleName.SubtitlesTTML).TTMLParser)(e):e.eventHandler.dispatchEvent(i.PlayerEvent.Warning,new s.PlayerModuleMissingWarning(o.ModuleName.SubtitlesTTML,"The ".concat(o.ModuleName.SubtitlesTTML," module is required to parse TTML subtitles."))):r.ModuleManager.has(o.ModuleName.SubtitlesWebVTT)?n=new(r.ModuleManager.get(o.ModuleName.SubtitlesWebVTT)).WebVttParser:e.eventHandler.dispatchEvent(i.PlayerEvent.Warning,new s.PlayerModuleMissingWarning(o.ModuleName.SubtitlesWebVTT,"The ".concat(o.ModuleName.SubtitlesWebVTT," module is required to parse WebVTT subtitles."))),n},e}()},606:function(e,t,n){var i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.SubtitleService=void 0;var r=n(80813),o=n(56481),s=n(3714),a=n(91678),u=n(93204),l=n(34047),c=n(85434),d=n(70850),p=n(88052),h=n(62756),f=n(22374),g=n(37723),v=n(53396),y=n(39310),m=n(60672),b=n(88788),S=n(69363),E=n(74715);t.SubtitleService=function(){function e(e){var t=this;this.context=e,this.getTransmuxer=function(){return t.lo},this.Do=function(){t.Co()},this.Jo=function(e){t.Co(),t.qo=e.position;var n,i=null!=(n=t.qo)?n:0,r="seekTarget"in e?e.seekTarget:e.target;Object.values(t.io).forEach(function(e){return e.onSeek(i,r)}),t.oo.onSeek(i,r)},this.Up=function(){var e,n=null!=(e=t.qo)?e:0,i=t.context.internalPlayer.getCurrentTime();
1Object.values(t.io).forEach(function(e){return e.onSeeked(n,i)}),t.oo.onSeeked(n,i)},this.Yp=function(e,n){t.context.logger.debug("Switching periods in subtitleService");var i=t.ko.findPeriod(e);i?(t.Xp(e,n),t.setupControllersForNextPeriod(i),t.Zp()):t.context.logger.log("Can not find period with id = ".concat(e," in Manifest. Skipping period update"))},this.bp=function(){Object.keys(t.io).forEach(function(e){return t.io[e].dispose()}),t.io={},t.jo&&(t.jo.dispose(),t.jo=void 0),t.po&&t.po.reset()},this.io={},this.mo=e.eventHandler,this.ko=e.serviceManager.get(r.ServiceName.ManifestService,e.sourceContext.sourceIdentifier),this.no=new g.EnabledSubtitlesTracker,this.oo=new v.ForcedSubtitleController,this.mo.on(s.PlayerEvent.Seek,this.Jo),this.mo.on(s.PlayerEvent.TimeShift,this.Jo),this.mo.on(s.PlayerEvent.Seeked,this.Up),this.mo.on(s.PlayerEvent.TimeShifted,this.Up),this.mo.on(s.PlayerEvent.SourceUnloaded,this.bp),this.so=p.ModuleManager.has(h.ModuleName.SubtitlesCEA608)?p.ModuleManager.get(h.ModuleName.SubtitlesCEA608):void 0,this.uo()}return e.prototype.to=function(e,t){var n=this.ko.isHlsManifest()&&!(t||!e);return e!==t||n},e.prototype.uo=function(){var e=this,t=this.context.serviceManager.get(r.ServiceName.SourceStoreService,this.context.sourceContext.sourceIdentifier);this.ro=(0,u.subscribe)(t)(p.ModuleManager.get(h.ModuleName.EngineBitmovin).selectors.getPlayingPeriodId,this.Yp,function(t,n){return e.to(t,n)})},e.prototype.setupControllersForNextPeriod=function(e){var t=this;e.AdaptationSet.forEach(function(e){var n=e._mimeType;(0,E.isSubtitleTrack)(n,t.ko.isHlsManifest())&&t.vo(e,n)})},e.prototype.vo=function(e,t){(0,E.isFragmentedAdaptationSet)(e)?(this.context.store.dispatch((0,a.initializeMetricsForMimeType)(t,this.context.settings)),this.wo(e,t)):this.xo(e,t)},e.prototype.wo=function(e,t){var n=this.context.sourceContext.sourceIdentifier,i=this.context.serviceManager.get(r.ServiceName.SourceStoreService,this.context.sourceContext.sourceIdentifier);if(i){var o={mimeType:t,codec:p.ModuleManager.get(h.ModuleName.EngineBitmovin).getCodecsFromAdaptationSet(e),isHls:this.ko.isHlsManifest(),manifestLoader:this.context.serviceManager.get(r.ServiceName.ManifestLoadingService,n),periodId:e._internalId.periodId,sourceStore:i};this.addFragmentSubtitle(o,e)}},e.prototype.xo=function(e,t){if(p.ModuleManager.has(h.ModuleName.DASH)){var n=new(p.ModuleManager.get(h.ModuleName.DASH)).SegmentTemplateMPDHandler(this.context,this.context.sourceContext),i=this.ko.toSubtitleTrack(e,t);n.setAdaptationSetId(e._internalId),i.url=n.getSubtitleUrl().toString(),this.addExternalSubtitle(i,e)}},e.prototype.setTransmuxer=function(e){this.lo=e},e.prototype.hasSubtitle=function(e){return!!this.io[e]},e.prototype.enableSubtitle=function(e){var t=this,n=this.io[e];return n&&!n.isActive()?n.activate().then(function(){n.refresh(),t.oo.deactivate()}).then(function(){return t.no.addSubtitle(n.getSubtitle()),!0}).catch(function(e){return t.context.logger.debug("Error during subtitle activation",e),!1}):Promise.resolve(!1)},e.prototype.addExternalSubtitle=function(e,t){if(void 0===t&&(t=null),e.id||(e.id=e.url),this.yo(e,t))return e;var n=new m.ExternalFileSubtitleHandler(this.context,e,t);return this.zo(n),e},e.prototype.yo=function(e,t){var n,i,r=this.io[e.id],o=null!=(n=null==r?void 0:r.periodId)?n:null,s=null!=(i=null==t?void 0:t._internalId.periodId)?i:null;return r&&o===s?r:this.oo.getForcedSubtitleHandler(function(t){var n,i=t.getSubtitle().id===e.id,r=(null!=(n=t.periodId)?n:null)===s;return i&&r})},e.prototype.zo=function(e){var t=e.getSubtitle(),n=this.context.config.playback.isForcedSubtitle;if("function"==typeof n?(0,d.safeUserCallback)(function(){return n(t)},this.context.logger):t.forced)this.oo.addSubtitleHandler(e);else{var i=!1,r=t.id;this.io[r]&&(i=this.io[r].isActive(),this.ap(r)),this.Ao(e),i&&e.activate()}},e.prototype.Ao=function(e){var t=e.getSubtitle();this.Bo(t),this.io[t.id]=e,this.Vp(t)},e.prototype.Bo=function(e){var t,n,i=this.context.sourceContext.source.labeling,r=this.ko.isHlsManifest()?null==(t=null==i?void 0:i.hls)?void 0:t.subtitles:null==(n=null==i?void 0:i.dash)?void 0:n.subtitles;"function"==typeof r&&(e.label=(0,d.safeUserCallback)(function(){return r(e)},this.context.logger))},e.prototype.addFragmentSubtitle=function(e,t){if(!p.ModuleManager.has(h.ModuleName.EngineBitmovin))return this.context.logger.warn("Unable to add fragmented subtitles because MSE Module is missing"),null;var n=this.ko.toSubtitleTrack(t,e.mimeType);n.isFragmented=!0,n.url=null;var i=new b.FragmentedSubtitleHandler(this.context,e,n,this.getTransmuxer);return this.zo(i),n},e.prototype.setupCea608CaptionExtractor=function(e){if(!this.so)return this.mo.dispatchEvent(s.PlayerEvent.Warning,new f.PlayerModuleMissingWarning(h.ModuleName.SubtitlesCEA608,"The ".concat(h.ModuleName.SubtitlesCEA608," module is required to parse CEA captions."))),this.context.logger.log("CEA Caption parsing is disabled, because the Cea680 module is not loaded"),null;if(!p.ModuleManager.has(h.ModuleName.ContainerMP4))return this.mo.dispatchEvent(s.PlayerEvent.Warning,new f.PlayerModuleMissingWarning(h.ModuleName.ContainerMP4,"The ".concat(h.ModuleName.ContainerMP4," module is required to parse CEA captions."))),this.context.logger.log("CEA Caption parsing is disabled, because the ContainerMP4 module is not loaded"),null;this.jo&&this.jo.dispose();var t,n=p.ModuleManager.get(h.ModuleName.ContainerMP4),i=this.so.Cea608Extractor;return this.jo=new i(e,n,null==(t=this.context.config.tweaks)?void 0:t.parse_cea_708_caption),this.jo},e.prototype.Co=function(){this.jo&&(this.context.logger.debug("Resetting CEA caption extractor..."),this.jo.reset())},e.prototype.Eo=function(){var e=p.ModuleManager.get(h.ModuleName.HLS);this.po=new e.DiscontinuitySequenceNumberTracker(c.MimeTypeHelper.isVideo),this.po.subscribe(this.Do)},e.prototype.Fo=function(e){this.po||this.Eo(),this.po.trackSegment(e)},e.prototype.Go=function(){return this.ko.getManifest()&&this.ko.isHlsManifest()&&p.ModuleManager.has(h.ModuleName.HLS)},e.prototype.handleClosedCaptions=function(e,t,n,i){var r;return!i&&c.MimeTypeHelper.isVideo(t.getMimeType())&&(null==(r=this.so)?void 0:r.CEA_EXTRACTOR_SUPPORTED_CODEC_TAGS.includes((0,l.getCodecTag)(t)))?this.Ho(t,e.getTimestampOffset()):(this.Io(n,t.getPeriodId()),Promise.resolve())},e.prototype.Ho=function(e,t){var n=this;return this.jo?(this.Go()&&this.Fo(e),this.jo.extract(e).then(function(i){i.forEac
1h(function(e){e.start-=t,e.end-=t}),i.length>0&&(n.context.logger.insane("Extracted Closed Captions from fMP4: "+JSON.stringify(i)),n.Io(i,e.getPeriodId()))}).catch(function(e){var t;e instanceof f.PlayerModuleMissingWarning?(null==(t=n.jo)||t.dispose(),n.jo=void 0,n.mo.dispatchEvent(s.PlayerEvent.Warning,e)):n.context.logger.debug("Error parsing CEA-608 Captions from fMP4: "+e)})):Promise.resolve()},e.prototype.Io=function(e,t){if(e&&Array.isArray(e)&&0!==e.length)for(var n=this.ko.getClosedCaptionLabels(t),i=this,r=0;r<e.length;r++)!function(e){var r=e.channel;if(!i.io[r]){var o=n.find(function(e){return e.id===r})||{id:r,kind:"captions",lang:"unknown",label:"Captions (".concat(e.channel,")")};i.Ao(new y.Cea608Handler(i.context,o))}i.io[r].addCaption(e,t)}(e[r])},e.prototype.Vp=function(e){this.mo.dispatchEvent(s.PlayerEvent.SubtitleAdded,{subtitle:i({},e)})},e.prototype.disableSubtitle=function(e){var t=this,n=this.io[e];return n?n.deactivate().then(function(){return t.no.removeSubtitle(e),0===t.getActiveSubtitles().length&&t.oo.activate().catch(function(){}),!0}).catch(function(){return!1}):Promise.resolve(!1)},e.prototype.disableAllSubtitles=function(){var e=this;
vendor: 4,375 bytes, line 1
1this.getActiveSubtitles().forEach(function(t){return e.disableSubtitle(t.id)})},e.prototype.removeSubtitle=function(e){this.ap(e),this.no.removeSubtitle(e)},e.prototype.getActiveSubtitles=function(){var e=this;return Object.keys(this.io).filter(function(t){return e.io[t].isActive()}).map(function(t){return e.io[t].getSubtitle()})},e.prototype.hasSubtitles=function(){return Object.keys(this.io).length>0},e.prototype.getAvailableSubtitles=function(e){return Object.values(this.io).filter(function(t){var n=t.periodId;return!n||e===n}).map(function(e){return e.getSubtitle()})},e.prototype.enableForcedSubtitle=function(e){this.oo.activate(e).catch(function(){})},e.prototype.Wp=function(e,t,n){var i=e.getSubtitleType()===S.SubtitleType.FRAGMENTED&&e.periodId===n,r=e.getSubtitleType()===S.SubtitleType.EXTERNAL_FILE&&e.periodId&&e.periodId!==t;return i||r},e.prototype.Xp=function(e,t){var n=this;Object.keys(this.io).forEach(function(i){var r=n.io[i];n.Wp(r,e,t)&&n.ap(i)})},e.prototype.Zp=function(){var e=this;Object.keys(this.io).forEach(function(t){var n,i=e.io[t];if(!i.isActive()&&e.no.shouldEnableSubtitle(i.getSubtitle(),e.io)){var r={subtitle:i.getSubtitle()};null==(n=e.mo)||n.dispatchEvent(s.PlayerEvent.SubtitleEnable,r),i.activate().then(function(){var t;null==(t=e.mo)||t.dispatchEvent(s.PlayerEvent.SubtitleEnabled,r)})}})},e.prototype.ap=function(e){if(this.io[e]){var t=this.io[e].getSubtitle();this.io[e].dispose(),delete this.io[e],this.mo&&this.mo.dispatchEvent(s.PlayerEvent.SubtitleRemoved,{subtitle:t})}},e.prototype.clearBuffersUntil=function(e){var t=this;Object.keys(this.io).forEach(function(n){return t.io[n].clearBuffersUntil(e)})},e.prototype.dispose=function(){this.bp(),this.no=(0,o.dispose)(this.no),this.oo=(0,o.dispose)(this.oo),this.po=(0,o.dispose)(this.po),this.lo=void 0,this.ko=null,this.mo.off(s.PlayerEvent.Seek,this.Jo),this.mo.off(s.PlayerEvent.TimeShift,this.Jo),this.mo.off(s.PlayerEvent.Seeked,this.Up),this.mo.off(s.PlayerEvent.TimeShifted,this.Up),this.mo.off(s.PlayerEvent.SourceUnloaded,this.bp),this.ro(),this.io={},this.mo=null},e}()},74715:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.isSubtitleTrack=function(e,t){return(i.MimeTypeHelper.isText(e)||i.MimeTypeHelper.isTtmlXml(e))&&!t||i.MimeTypeHelper.isApplication(e)},t.isFragmentedAdaptationSet=function(e){var t=[e];return e.Representation&&e.Representation.length>0&&t.push(e.Representation[0]),t.some(function(e){return e.SegmentList||e.SegmentTemplate||e.SegmentBase})};var i=n(85434)},74437:function(e,t,n){var i,r,o,s=this&&this.__assign||function(){return(s=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},a=this&&this.__runInitializers||function(e,t,n){for(var i=arguments.length>2,r=0;r<t.length;r++)n=i?t[r].call(e,n):t[r].call(e);return i?n:void 0},u=this&&this.__esDecorate||function(e,t,n,i,r,o){function s(e){if(void 0!==e&&"function"!=typeof e)throw TypeError("Function expected");return e}for(var a,u=i.kind,l="getter"===u?"get":"setter"===u?"set":"value",c=!t&&e?i.static?e:e.prototype:null,d=t||(c?Object.getOwnPropertyDescriptor(c,i.name):{}),p=!1,h=n.length-1;h>=0;h--){var f={};for(var g in i)f[g]="access"===g?{}:i[g];for(var g in i.access)f.access[g]=i.access[g];f.addInitializer=function(e){if(p)throw TypeError("Cannot add initializers after decoration has completed");o.push(s(e||null))};var v=(0,n[h])("accessor"===u?{get:d.get,set:d.set}:d[l],f);if("accessor"===u){if(void 0===v)continue;if(null===v||"object"!=typeof v)throw TypeError("Object expected");(a=s(v.get))&&(d.get=a),(a=s(v.set))&&(d.set=a),(a=s(v.init))&&r.unshift(a)}else(a=s(v))&&("field"===u?r.unshift(a):d[l]=a)}c&&Object.defineProperty(c,i.name,d),p=!0};Object.defineProperty(t,"__esModule",{value:!0}),t.AbstractSubtitleHandler=void 0;var l=n(80813),c=n(3714),d=n(80438),p=n(69957),h=n(44468),f=n(88052),g=n(62756);function v(e,t){return s({subtitleId:t,start:e.start,end:e.end},e.content)}r=[],i=function(){function e(e,t,n){void 0===n&&(n=null);var i=this;this.timeline=a(this,r),this.onCueEnter=function(e){i.context.eventHandler.dispatchEvent(c.PlayerEvent.CueEnter,v(e,i.getSubtitle().id))},this.onCueExit=function(e){i.context.eventHandler&&i.context.eventHandler.dispatchEvent(c.PlayerEvent.CueExit,v
1(e,i.getSubtitle().id))},this.onCueUpdate=function(e){i.context.eventHandler.dispatchEvent(c.PlayerEvent.CueUpdate,v(e,i.getSubtitle().id))},this.context=e,this.W9=t,this.W9.enabled=this.W9.enabled||!1,this.timeline=new d.Timeline(e,{onCueEnter:this.onCueEnter,onCueExit:this.onCueExit,onCueUpdate:this.onCueUpdate}),this.timeline.stopListening(),this.periodId=n,this.X9=e.serviceManager.get(l.ServiceName.SourceStoreService,e.sourceContext.sourceIdentifier)}return e.prototype.fireOnCueParsedEvents=function(e,t){var n=this;e&&this.context.eventHandler&&e.forEach(function(e){n.context.eventHandler.dispatchEvent(c.PlayerEvent.CueParsed,s(s({subtitleId:n.getSubtitle().id},e),{periodId:t}))})},e.prototype.isActive=function(){return this.W9.enabled},e.prototype.activate=function(){return this.W9.enabled=!0,this.timeline.startListening(),this.timeline.show(),Promise.resolve()},e.prototype.deactivate=function(){return this.W9.enabled=!1,this.timeline.stopListening(),this.timeline.hide(),Promise.resolve()},e.prototype.refresh=function(){this.timeline.show()},e.prototype.getSubtitle=function(){return this.W9},e.prototype.clearBuffersUntil=function(e){this.timeline.removeCuesUntil(e)},e.prototype.dispose=function(){this.X9=null,this.deactivate(),this.timeline.dispose()},e.prototype.isTsContainer=function(){var e,t=f.ModuleManager.get(g.ModuleName.EngineBitmovin),n=t.selectors,i=t.mseModuleTypes;return(null==(e=n.getContainerFormat(this.X9.getState(),h.MediaType.Video))?void 0:e.source)===i.containerFormat.TS},e.prototype.applyVttOffset=function(e){return this.isTsContainer()?e.map(function(e){return null!=e.offset?s(s({},e),{start:e.start+e.offset,end:e.end+e.offset,updates:e.updates.map(function(t){return s(s({},t),{updateTime:t.updateTime+e.offset})})}):e}):e},e}(),o="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0,u(i,null,[(0,p.trackPerformance)("SubtitleHandler.activate")],{kind:"method",name:"activate",static:!1,private:!1,access:{has:function(e){return"activate"in e},get:function(e){return e.activate}},metadata:o},null,r),o&&Object.defineProperty(i,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:o}),t.AbstractSubtitleHandler=i},39310:function(e,t,n){var i,r=this&&this.__extends||(i=function(e,t){return(i=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])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.Cea608Handler=void 0;var o=n(74437),s=n(69363);t.Cea608Handler=function(e){function t(t,n,i){return void 0===i&&(i=null),e.call(this,t,n,i)||this}return r(t,e),t.prototype.onSeek=function(){},t.prototype.onSeeked=function(e,t){var n=this.context.settings.CLEAR_BUFFERS_ON_SEEKING_BACKWARDS;t<e&&n&&this.clearBuffersUntil(this.context.renderer.getDuration())},t.prototype.addCaption=function(e,t){e&&(this.fireOnCueParsedEvents([e],t),this.timeline.addCues([e],0))},t.prototype.getSubtitleType=function(){return s.SubtitleType.IN_STREAM},t}(o.AbstractSubtitleHandler)},60672:function(e,t,n){var i,r=this&&this.__extends||(i=function(e,t){return(i=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])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.ExternalFileSubtitleHandler=void 0;var o=n(25926),s=n(4224),a=n(56481),u=n(3714),l=n(4129),c=n(29669),d=n(26438),p=n(74437),h=n(69363);t.ExternalFileSubtitleHandler=function(e){function t(n,i,r){var o=e.call(this,n,i,r&&r._internalId.periodId)||this;return o.tS=function(e){if(o.timeline.removeCues(),null==e?void 0:e.body){o.sS=!0;var t=o.uS(e.body.trim()),n=o.applyVttOffset(t);o.fireOnCueParsedEvents(n,null),o.timeline.addCues(n)}},r&&(i.id=r.Representation[0]._id),i.url?(o.rS=t.enforceHTTPSForSecureOrigins(i.url.trim()),o.sS=!1,o.pS=new l.DefaultContentLoader(o.context,{maxRetries:o.context.settings.MAX_RETRIES,retryDelay:o.context.settings.RETRY_DELAY,requestType:c.HttpRequestType.MEDIA_SUBTITLES})):(o.context.logger.log("No url was provided for an external subtitle, nothing will be loaded."),o.sS=!0,o.qS=Promise.resolve()),o}return r(t,e),t.prototype.activate=function(){var t=this;return this.context.logger.debug("loading "+this.rS),e.prototype.activate.call(this).then(function(){return t.qS?t.qS:t.sS?Promise.resolve():(t.qS=t.pS.load(t.rS).then(t.tS).catch(function(e){var n,i;if(t.qS=void 0,!t.isActive())return Promise.resolve();throw t.context.eventHandler&&t.context.eventHandler.dispatchEvent(u.PlayerEvent.Warning,new o.PlayerWarning(s.WarningCode.NETWORK_COULD_NOT_LOAD_SUBTITLE)),t.context.logger.debug("Could not load subtitles/captions, got HTTP status code ".concat(null!=(i=null==(n=null==e?void 0:e.status)?void 0:n.toString())?i:""),e),t.deactivate(),"loading failed"}),t.qS)})},t.prototype.uS=function(e){return d.SubtitleParserFactory.createInstance(this.context,e).parse(e)},t.enforceHTTPSForSecureOrigins=function(e){var t=RegExp("^(?:[a-z]+:)?//","i");return"https:"===location.protocol?e.replace(t,"//"):e},t.prototype.getSubtitleType=function(){return h.SubtitleType.EXTERNAL_FILE},t.prototype.clearBuffersUntil=function(){},t.prototype.onSeek=function(){},t.prototype.onSeeked=function(){},t.prototype.dispose=function(){e.prototype.dispose.call(this),this.pS=(0,a.dispose)(this.pS)},t}(p.AbstractSubtitleHandler)},88788:function(e,t,n){var i,r=this&&this.__extends||(i=function(e,t){return(i=Object.
1setPrototypeOf||({__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])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__assign||function(){return(o=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.FragmentedSubtitleHandler=void 0;var s=n(4524),a=n(80813),u=n(3714),l=n(44468),c=n(87827),d=n(86897),p=n(93204),h=n(81199),f=n(34047),g=n(79721),v=n(85434),y=n(66502),m=n(23068),b=n(88052),S=n(62756),E=n(86058),_=n(15569),T=n(26438),P=n(74437),C=n(69363);function A(e){return y.TextSegmentAnalyzer.isPlainTextPayload(e.getData())}function w(e){var t=e.getCodec();return("wvtt"===t||"vtt"===t||""===t&&e.getMimeType().includes("vtt"))&&A(e)}function k(e,t){var n=b.ModuleManager.get(S.ModuleName.EngineBitmovin,!1);if(void 0!==t&&void 0!==n)return n.selectors.getContainerFormat(t,e)}function O(e){return"discontinuitySequenceNumber"in e}t.FragmentedSubtitleHandler=function(e){function t(t,n,i,r){var o=e.call(this,t,i,n.periodId)||this;return o.eS=function(e){var t,n,i,r,s,u=void 0!==(n=null==(t=o.context.serviceManager.get(a.ServiceName.SourceStoreService,o.context.sourceContext.sourceIdentifier))?void 0:t.getState())&&void 0!==t?Promise.race(Object.keys(r=null!=(i=n.activeTracks)?i:{}).flatMap(function(e){var t;return null!=(t=r[e].mediaTypes)?t:[]}).filter(function(e){return e===l.MediaType.Video||e===l.MediaType.Audio}).map(function(e){var i;return void 0!==(i=k(e,n))?Promise.resolve(i):(0,p.waitForStateChangeThen)(t)(function(t){return k(e,t)},function(e){return void 0!==e})})):Promise.reject("SourceState unavailable"),c=null==(s=e.getSegmentInfo())?void 0:s.discontinuitySequenceNumber;return void 0!==c&&(u=u.then(function(){return o.VS(c)}).then(function(){return o.WS(c)}).then(function(){return o.isActive()}).catch(function(){return!1})),u.then(function(t){o.fS(e),t&&o.cS(e)})},o.mS=function(e){var t;if(e&&void 0!==e.time){var n=e.time;o.clearBuffersUntil(n);var i=(null==(t=o.NS)?void 0:t.getTimeForNextSegment(o.GS))||n,r=i-n,s=(0,h.getPlayableBufferLevel)(o.context.internalPlayer);isNaN(i)||r>=s||o.HS.hasNext(i)&&(o.HS.getMPDHandler().resolvePendingSegmentInfoRequests(),o.HS.getNext(i))}},o.oS=function(){o.HS.updateMpd()},o.eventHandler=t.eventHandler,o.LS=n.sourceStore,o.NS=t.serviceManager.get(a.ServiceName.StreamTimeService),o.MS=t.serviceManager.get(a.ServiceName.ManifestUpdateSchedulingService,t.sourceContext.sourceIdentifier),o.JS=r,o.IS=n.isHls,o.KS=t.bufferSettings,o.HS=new(b.ModuleManager.get(S.ModuleName.EngineBitmovin)).SegmentController(t,o.eS,n.mimeType,n.codec,n.isHls,n.manifestLoader,n.periodId,n.sourceStore),o.HS.setCurrentLangObj(i),o.GS="".concat(n.mimeType,"/").concat(i.id),o.OS=b.ModuleManager.get(S.ModuleName.HLS,!1),o.QS(),o}return r(t,e),t.prototype.QS=function(){!this.PS&&this.LS&&(this.PS=(0,p.subscribe)(this.LS)(function(e){return null==e?void 0:e.manifest},this.oS,function(e,t){return!!((null==e?void 0:e.isInitialized)&&!(null==t?void 0:t.isInitialized))}))},t.prototype.RS=function(){this.PS&&(this.PS(),this.PS=void 0)},t.prototype.SS=function(e){return w(e)?(0,_.parsePlainTextSubtitles)(e):v.MimeTypeHelper.isApplication(e.getMimeType())&&!A(e)?(0,E.parseMP4WrappedSubtitles)(e,this.context.logger):e.getMetadata().subtitles},t.prototype.TS=function(e){var t=e.getMetadata();t.subtitles=this.SS(e),e.setMetadata(t)},t.prototype.US=function(e){var t,n=null!=(t=e.getPlaybackTime())?t:e.getSegmentInfo().startTime;e.setPlaybackTime(n)},t.prototype.VS=function(e){var t=this.JS();return this.IS&&t?(void 0!==e&&this.bS()||(e=-1),t.waitForInitializationForDiscontinuity(e)):Promise.resolve()},t.prototype.WS=function(e){if(!this.bS()||void 0!==this.dS(e))return Promise.resolve();if(!this.OS)return Promise.reject(Error("HLS Module missing"));var t=this.OS.selectors,n=t.getHlsState,i=t.getPresentationTimeOffset;return(0,p.waitForStateChangeThen)(this.LS)(function(t){return i(n(t),String(e))},function(e){return void 0!==e}).then()},t.prototype.XS=function(e){var t,n,i=null==(t=this.context.serviceManager.get(a.ServiceName.SourceStoreService,e))?void 0:t.getState(),r=null==(n=this.HS.getCurrentAdaptationSet())?void 0:n.Representation[0];return r&&i?(0,b.ModuleManager.get(S.ModuleName.EngineBitmovin).selectors.getSegmentInfos)(i,r._internalId.key()):[]},t.prototype.YS=function(e,t){var n,i,r,o,s=b.ModuleManager.get(S.ModuleName.EngineBitmovin).AdaptationSetId,u=this.context.serviceManager.get(a.ServiceName.ManifestService,e),l=new s(g.DEFAULT_PERIOD_ID,t),c=null==u?void 0:u.getAdaptationSet(l);return null!=(o=null==(r=null==(i=null==(n=null==c?void 0:c.Representation[0])?void 0:n.SegmentList)?void 0:i[0])?void 0:r.SegmentURL)?o:[]},t.prototype.ZS=function(){var e=this.context.sourceContext.sourceIdentifier;return this.context.settings.ENABLE_SEGMENT_INFO_PROVIDER_FROM_STORE?this.XS(e):this.YS(e,this.get
1Subtitle().id)},t.prototype.aS=function(){var e=this.ZS();if(e&&0!==e.length)return e.reduce(function(e,t){var n=O(t)?t.startTime:t._playbackTime,i=O(t)?t.discontinuitySequenceNumber:t._discontinuitySequenceNumber;return(0,m.isNumber)(n)&&(0,m.isNumber)(i)&&void 0===e[i]&&(e[i]=n),e},{})},t.prototype.bS=function(){var e,t=b.ModuleManager.get(S.ModuleName.HLS,!1),n=null==(e=this.LS)?void 0:e.getState();if(!t||!n)return!1;var i=t.selectors,r=i.getHlsState,o=i.getMergedDiscontinuityTimings,s=r(n);if(!s)return!1;var a=this.aS();if(!a)return!1;var u=o(s),l=Object.keys(a).find(function(e){return!u[e]||Math.abs(u[e].startTime-a[e])>1}),c=Object.keys(u).find(function(e){return null==a[e]});return null==l&&null==c},t.prototype.cS=function(e){this.gS(e),this.TS(e),this.US(e),this.iS(e),this.isActive()&&this.timeline.show()},t.prototype.dS=function(e){var t;if(this.OS){var n=this.OS.selectors,i=n.getHlsState,r=n.getPresentationTimeOffset,o=null==(t=this.LS)?void 0:t.getState(),s=o?i(o):void 0;if(s)return r(s,String(e))}},t.prototype.fS=function(e){var t,n=e.getPlaybackTimeRange();if(n){var i=b.ModuleManager.get(S.ModuleName.EngineBitmovin),r=i.actions.removeStreamTimeRange,o=i.mseModuleTypes.streamTimeRangeType;null==(t=this.LS)||t.dispatch(r(this.GS,n,o.Loading))}},t.prototype.gS=function(e){var t,n=e.getPlaybackTimeRange();if(!e.isInit()&&n){var i=b.ModuleManager.get(S.ModuleName.EngineBitmovin).actions.addLoadedRange,r=o(o({},n),{bufferBlockId:-1});null==(t=this.LS)||t.dispatch(i(this.GS,r))}},t.prototype.hS=function(e){var t,n,i=-this.HS.getMPDHandler().getTimestampOffset();if(this.IS){var r=e.getSegmentInfo().discontinuitySequenceNumber,o=this.dS(r);void 0!==o?i=-o:this.context.logger.warn("FragmentedSubtitleHandler: Failed to get PTO for disco sequence ".concat(r," from store, falling back to MPDHandler value of ").concat(-i),e.getSegmentInfo())}return i+(null!=(n=null==(t=this.JS())?void 0:t.getTimestampMappingOffset(e))?n:0)},t.prototype.iS=function(e){var n=e.getMetadata().subtitles;if(Array.isArray(n)&&0!==n.length){var i=w(e),r=this.hS(e),o=i||"stpp"===f.CodecStringHelper.extractCodec(e.getCodec())||"application/mp4"===e.getMimeType()&&"wvtt"===e.getCodec()&&!A(e)?this.jS(n,r):n,s=i?this.applyVttOffset(o):o,a=t.ensureCueInSegmentRange(s,e.getPlaybackTime(),e.getDuration(),r,this.isTsContainer());this.fireOnCueParsedEvents(a,this.periodId),this.timeline.addCues(a)}},t.prototype.jS=function(e,t){var n=this;return e.flatMap(function(e){return n.kS(e.text,t)})},t.ensureCueInSegmentRange=function(e,t,n,i,r){if(void 0===r&&(r=!1),!t&&0!==t||t<0||!n)return e;if(e.length>0){var s=n+i;if(e.every(function(e){return e.end<=s}))return e.map(function(e){return r&&null!=e.offset?o(o({},e),{start:e.start+t-i-e.offset,end:e.end+t-i-e.offset}):o(o({},e),{start:e.start+t-i,end:e.end+t-i})})}return e},t.prototype.kS=function(e,t){var n=T.SubtitleParserFactory.createInstance(this.context,e);return t?n.parse(e,t):n.parse(e)},t.prototype.activate=function(){var t=this;return e.prototype.activate.call(this),this.lS().then(function(){if(t.isActive()){var e,n,i,r=(e=t.context.renderer,n=t.context.store,i=(0,c.getPlayerState)(n.getState()),(0,c.getIsSeekingOrTimeshifting)(i)?i.targetPlaybackTime:e.getCurrentTime(!0));t.HS.activateSubtitleSegmentController(r),t.HS.hasNext(r)&&t.HS.getNext(r),t.eventHandler.on(u.PlayerEvent.TimeChanged,t.mS)}})},t.prototype.lS=function(){var e=this.HS.getCurrentAdaptationSet().Representation[0],t=e._internalId,n=e._mimeType,i=b.ModuleManager.get(S.ModuleName.EngineBitmovin).actions,r=i.setRepresentationIdAction,o=i.setMediaTypeAction;return this.LS.dispatch(r(t)),this.LS.dispatch(o(t,v.MimeTypeHelper.getMediaType(n))),this.MS.waitForRepUpdate(t)},t.prototype.deactivate=function(){this.timeline.removeCues();var t,n=b.ModuleManager.get(S.ModuleName.EngineBitmovin).actions,i=n.resetStreamTimeline,r=n.resetLoadedRanges;this.eventHandler.off(u.PlayerEvent.TimeChanged,this.mS),this.LS.dispatch(i(this.GS)),this.LS.dispatch(r(this.GS));var o=null==(t=this.HS.getCurrentAdaptationSet())?void 0:t._internalId;return o&&this.LS.dispatch(b.ModuleManager.get(S.ModuleName.EngineBitmovin).actions.removeActiveTrackAction(o)),e.prototype.deactivate.call(this)},t.prototype.getSubtitleType=function(){return C.SubtitleType.FRAGMENTED},t.prototype.clearBuffersUntil=function(t){e.prototype.clearBuffersUntil.call(this,t);var n=b.ModuleManager.get(S.ModuleName.EngineBitmovin).actions.removeLoadedRange;this.LS.dispatch(n(this.GS,{start:0,end:t,bufferBlockId:-1}))},t.prototype.nS=function(e){var t,n=null==(t=this.LS)?void 0:t.getState(),i=(0,d.getBufferState)(n),r=i?(0,d.getL
1oadedRangesForMimeType)(i,this.GS):[];return(0,s.isInTimeRanges)(r,e)},t.prototype.onSeek=function(e,t){this.isActive()&&(this.nS(t)||this.HS.cancelLoading())},t.prototype.onSeeked=function(e,t){if(this.isActive()&&!this.nS(t)){this.timeline.removeCues();var n=b.ModuleManager.get(S.ModuleName.EngineBitmovin).actions.resetLoadedRanges;this.LS.dispatch(n(this.GS)),this.HS.seekTo(t),this.HS.hasNext(t)&&this.HS.getNext(t)}},t.prototype.dispose=function(){e.prototype.dispose.call(this),this.RS(),this.HS.dispose()},t}(P.AbstractSubtitleHandler)},69363:function(e,t){var n,i;Object.defineProperty(t,"__esModule",{value:!0}),t.SubtitleType=void 0,(i=n||(t.SubtitleType=n={}))[i.EXTERNAL_FILE=0]="EXTERNAL_FILE",i[i.FRAGMENTED=1]="FRAGMENTED",i[i.IN_STREAM=2]="IN_STREAM"},71340:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.hashCode=function(e){var t=0;if(0===e.length)return t;for(var n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n)|0;return t}},85224:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.createHtmlElement=function(e){var t;if(function(){if(void 0===o){var e=(0,r.getCapabilities)().isReactNative;o=!(window&&window.document&&"function"==typeof window.document.createElement)||e}return o}()){var n=(null!=i||(i=new DOMParser),i).parseFromString("<".concat(e,"></").concat(e,">"),"text/html");return(null==(t=n.body)?void 0:t.firstChild)||n.firstChild}return document.createElement(e)};var i,r=n(21513),o=void 0}},function(e){return e(e.s=52112)}])}()},48794:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UIPreferencesManager=void 0;var i=n(53135),r=n(6635),o="".concat((0,r.prefixCss)("preferences"),"."),s=o+"enabled",a=o+"volume",u=o+"muted",l=o+"playbackSpeed",c="ui-preferences";function d(e,t){"number"==typeof t&&isFinite(t)&&i.StorageUtils.setItem(e,String(t))}function p(e){var t=i.StorageUtils.getItem(e);if(null===t)return null;var n=parseFloat(t);return isFinite(n)?n:null}function h(e,t){i.StorageUtils.setItem(e,t?"1":"0")}function f(e){var t=i.StorageUtils.getItem(e);return null===t?null:"1"===t}t.UIPreferencesManager=function(){function e(){this.player=null,this.enabled=!1,this.unsubscribeHandlers=[]}return e.prototype.configure=function(e,t,n){this.player=e;var i=n?f(s):null;this.enabled=null!==i?i:t,this.enabled&&(this.startTracking(),this.apply())},e.prototype.isEnabled=function(){return this.enabled},e.prototype.setEnabled=function(e){this.enabled=e,h(s,e),this.stopTracking(),e?(this.capture(),this.startTracking(),this.apply()):this.clear()},e.prototype.release=function(){this.stopTracking(),this.player=null},e.prototype.startTracking=function(){var e=this;if(null!=this.player){var t=this.player.exports.PlayerEvent;this.track(t.VolumeChanged,function(){return d(a,e.player.getVolume())}),this.track(t.Muted,function(){return h(u,!0)}),this.track(t.Unmuted,function(){return h(u,!1)}),this.track(t.PlaybackSpeedChanged,function(){return d(l,e.player.getPlaybackSpeed())}),this.track(t.Ready,function(){return e.apply()})}},e.prototype.track=function(e,t){var n=this;this.player.on(e,t),this.unsubscribeHandlers.push(function(){return n.player.off(e,t)})},e.prototype.stopTracking=function(){for(var e=0,t=this.unsubscribeHandlers;e<t.length;e++)(0,t[e])();this.unsubscribeHandlers=[]},e.prototype.capture=function(){d(a,this.player.getVolume()),h(u,this.player.isMuted()),d(l,this.player.getPlaybackSpeed())},e.prototype.clear=function(){i.StorageUtils.removeItem(a),i.StorageUtils.removeItem(u),i.StorageUtils.removeItem(l)},e.prototype.apply=function(){if(null!=this.player){var e=p(a);null!==e&&e>=0&&e<=100&&this.player.setVolume(e,c);var t=f(u);null!==t&&(t?this.player.mute(c):this.player.unmute(c));var n=p(l);null!==n&&n>0&&this.player.setPlaybackSpeed(n)}},e}()},49015:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FocusableContainer=void 0;var i=n(94198),r=n(55358);t.FocusableContainer=function(){function e(e,t){if(void 0===t&&(t=void 0),this.container=e,this._primaryComponent=t,t&&!this.components.includes(t))throw Error("The primary component must be part of the container.")}return Object.defineProperty(e.prototype,"primaryComponent",{get:function(){var e;return null!=(e=this._primaryComponent)?e:this.components[0]}
1,enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"components",{get:function(){return(0,i.resolveAllComponents)(this.container).filter(function(e){return(0,r.isFocusable)(e)})},enumerable:!1,configurable:!0}),e}()},49226:function(e,t,n){"use strict";var i,r=this&&this.__extends||(i=function(e,t){return(i=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])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.Watermark=void 0;var o=n(51350),s=n(24379);t.Watermark=function(e){function t(t){void 0===t&&(t={});var n=e.call(this,t)||this;return n.config=n.mergeConfig(t,{cssClass:"ui-watermark",url:"http://bitmovin.com",role:"link",text:"logo",ariaLabel:s.i18n.getLocalizer("watermarkLink")},n.config),n}return r(t,e),t}(o.ClickOverlay)},50002:function(e,t){"use strict";var n,i,r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.PlayerInsightsUtils=void 0;function o(e,t){if(e){var n=t.find(function(t){return t.id===e.id});return r(r({},e),{codec:null==n?void 0:n.codec,frameRate:null==n?void 0:n.frameRate})}}function s(e,t){var n=a(e),i=a(t);return n?i&&(null==e?void 0:e.id)!==(null==t?void 0:t.id)&&n!==i?"".concat(n," / ").concat("â").concat(i):n:i||null}function a(e){if(!e)return"";var t,n,i=[],r=(t=e).width&&t.height?"".concat(t.width,"x").concat(t.height).concat(t.frameRate?"@".concat(t.frameRate):""):null,o=(n=e.bitrate)&&isFinite(n)?n>=1e6?"".concat((n/1e6).toFixed(2),"Mbps"):"".concat(Math.round(n/1e3),"kbps"):"";return r&&i.push(r),o&&i.push(o),e.codec&&i.push(e.codec),i.length>0?i.join(","):""}function u(e){if(!isFinite(e))return"Infinity";var t=Math.floor(Math.abs(e)),n=Math.floor(t/3600),i=Math.floor(t%3600/60),r=t%60,o=function(e){return e<10?"0".concat(e):e.toString()};return n>0?"".concat(n,":").concat(o(i),":").concat(o(r)):"".concat(i,":").concat(o(r))}(n=i||(t.PlayerInsightsUtils=i={})).formatVideoQualityInsight=function(e){var t=e.getAvailableVideoQualities();return s(e.getPlaybackVideoData(),o(e.getDownloadedVideoData(),t))},n.formatAudioQualityInsight=function(e){var t=e.getAvailableAudioQualities();return s(e.getPlaybackAudioData(),o(e.getDownloadedAudioData(),t))},n.formatViewportFramesInsight=function(e){var t=e.getVideoElement(),n=t.clientWidth>0&&t.clientHeight>0?"".concat(t.clientWidth,"x").concat(t.clientHeight):null,i="".concat(e.getDroppedVideoFrames()," dropped");return n?"".concat(n," / ").concat(i):i},n.formatBufferInsight=function(e){var t=e.buffer.getLevel(e.exports.BufferType.ForwardDuration,e.exports.MediaType.Video).level,n=e.buffer.getLevel(e.exports.BufferType.ForwardDuration,e.exports.MediaType.Audio).level;return null==t&&null==n?null:[null!=t?"".concat(t.toFixed(2),"s"):"-",null!=n?"".concat(n.toFixed(2),"s"):"-"].join(" / ")},n.formatTimeInsight=function(e){if(e.isLive()){var t,n,i,r=e.getTimeShift(),o=e.getCurrentTime();return"".concat((t=o)>=Date.UTC(2e3,0,1)/1e3?(n=new Date(1e3*t),i=function(e){return e<10?"0".concat(e):e.toString()},"".concat(i(n.getHours()),":").concat(i(n.getMinutes()),":").concat(i(n.getSeconds()))):u(t)," / TimeShift: ").concat(r.toFixed(2),"s")}var s=e.getCurrentTime(),a=e.getDuration();return"".concat(u(s)," / ").concat(u(a))},n.formatStreamInsight=function(e){var t=e.getStreamType(),n=e.getPlayerType();return t||n?[t,n?"(".concat(n,")"):null].filter(Boolean).join(" "):null}},50938:e=>{!function(){"use strict";self,e.exports=(self.webpackChunkbitmovin_player=self.webpackChunkbitmovin_player||[]).push([[898],{5214:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.BitmovinThumbnailService=void 0;var i=n(56481),r=n(94685),o=n(2758),s=n(93617);t.BitmovinThumbnailService=function(){function e(e){this.context=e,this.uy=new s.ThumbnailTimelineStore(e)}return e.prototype.addThumbnails=function(e){var t=this;if(!this.uy||!(0,r.isContextAvailable)(this.context))return Promise.resolve();this.uy.clear();var n=(0,o.createThumbnailParser)(this.context,e);return n.parse(e).then(function(e){var n;return null==(n=t.uy)?void 0:n.addTracks(e)}).finally(function(){return n.dispose()})},e.prototype.getThumbnail=function(e,t){var n,i;return null!=(i=null==(n=this.uy)?void 0:n.getThumbnail(e,t))?i:null},e.prototype.dispose=function(){this.uy=(0,i.dispose)(this.uy)},e}()}
1,78270:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.DashThumbnailParser=void 0,t.isDashThumbnailSet=u,t.getSegmentTemplate=l;var i=n(94685),r=n(85434),o=n(23068),s=n(15827),a=n(59462);function u(e){if(!e)return!1;var t=r.MimeTypeHelper.isImage(e._mimeType)&&"image"===e._contentType,n=Array.isArray(e.Representation)&&null!=l(e);return!!(t&&n)}function l(e){return c(null==e?void 0:e.Representation[0])||c(e)}function c(e){var t,n;return null!=(n=null==(t=null==e?void 0:e.SegmentTemplate)?void 0:t[0])?n:null}t.DashThumbnailParser=function(){function e(e){this.context=e}return e.prototype.parse=function(e){var t=this,n=e.filter(function(e){return u(e.adaptationSet)&&(0,o.isNumber)(e.timing.startTime)});return 0===n.length?Promise.resolve([]):Promise.resolve(n.flatMap(function(e){try{return t.wbb(e)}catch(e){return(0,i.isContextAvailable)(t.context)&&t.context.logger.warn("Error parsing DASH thumbnails: ".concat(e)),[]}}))},e.prototype.wbb=function(e){var t=this;return e.adaptationSet.Representation.reduce(function(n,i){var r=(0,s.parseThumbnailRepresentation)(i,e,t.context),o=(0,a.mapToThumbnailTrack)(r);return null!=o&&n.push(o),n},[])},e.prototype.dispose=function(){},e}()},15827:function(e,t,n){var i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.parseThumbnailRepresentation=function(e,t,n){return new l(e,t,n).parseRepresentation()};var r=n(80813),o=n(89927),s=n(88052),a=n(62756),u=n(78270),l=function(){function e(e,t,n){this.representation=e,this.source=t,this.context=n,this.hasValidData=!!(e&&t&&n)&&this.validate()}return e.prototype.validate=function(){this.uhb=this.source.timing;var e=(0,u.getSegmentTemplate)(this.source.adaptationSet);return!(!e||!this.representation||(this.vhb=e,!(this.vhb._media&&this.representation.BaseURL&&this.representation.BaseURL[0].url)||(this.yhb=this.vhb._media,this.whb=this.representation.BaseURL[0].url,!this.representation.EssentialProperty||!this.representation.EssentialProperty[0]||(this.zhb=this.representation.EssentialProperty[0],this.vhb.SegmentTimeline&&this.vhb.SegmentTimeline[0]&&(this.xhb=this.vhb.SegmentTimeline[0]),0))))},e.prototype.parseRepresentation=function(){return this.hasValidData?this.xhb?this.Bhb():this.Ahb():[]},e.prototype.Ahb=function(){var e,t=this.Ehb(),n=Number(this.vhb._timescale)||1,i=Number(null!=(e=this.vhb._startNumber)?e:1),r=Number(this.vhb._duration)/n,o=(this.vhb._presentationTimeOffset||0)/n,u=this.Fhb(),l=r/u.ttiles,c=Math.ceil(this.uhb.duration/l),d=i-1+Math.ceil(this.uhb.duration/r),p=[],h=s.ModuleManager.get(a.ModuleName.DASH).replaceAllPlaceholders;t>0&&(i+=Math.floor(t/r),this.uhb.startTime=Math.ceil(this.uhb.startTime+t));for(var f=i;f<=d;f++){var g=p[p.length-1]||{start:0,end:this.uhb.startTime},v=h(this.yhb,this.representation,f),y={start:g.end,end:r-o,url:this.whb+v,text:v};p=p.concat(this.Dhb(u,y,l,this.representation))}return p.slice(0,c)},e.prototype.Bhb=function(){for(var e=parseInt(this.vhb._timescale)||1,t=s.ModuleManager.get(a.ModuleName.DASH).replaceAllPlaceholders,n=Number(this.vhb._startNumber)||0,i=this.Fhb(),r=this.vhb._presentationTimeOffset||0,o=this.uhb.startTime,u=[],l=0,c=0,d=0;d<this.xhb.S.length;d++){var p=this.xhb.S[d],h=(Number(p._r)||0)+1,f=Number(p._d),g=this.xhb.S[d+1];isNaN(f)&&null!=g&&(f=(Number(g._t)-Number(p._t))/h);for(var v=f/e/i.ttiles,y=0;y<h;y++){var m=null==p._t?c:Number(p._t)+y*f;c=m+f;var b=t(this.yhb,this.representation,n+l,m);l++;var S={start:(m-r)/e+o,end:(c-r)/e+o,url:this.whb+b,text:b};u=u.concat(this.Dhb(i,S,v,this.representation))}}return u},e.prototype.Chb=function(){var e,t=this.context.sourceContext.sourceIdentifier,n=this.context.serviceManager.get(r.ServiceName.ManifestService,t);return null!=(e=null==n?void 0:n.isLive())&&e},e.prototype.Dhb=function(e,t,n,r){for(var o,s,a=[],u=null!=(o=r._width)?o:this.source.adaptationSet._width,l=null!=(s=r._height)?s:this.source.adaptationSet._height,c={width:u/e.htiles,height:l/e.vtiles},d=0,p=0;p<e.vtiles;p++)for(var h=0;h<e.htiles;h++){var f=t.start+d;a.push(i(i({},t),{start:f,end:f+n,x:h*c.width,y:p*c.height,width:c.width,height:c.height})),d+=n}return a},e.prototype.Ehb=function(){if(isFinite(this.uhb.duration))return 0;var e,t=this.context.serviceManager.get(r.ServiceName.ManifestService,this.context.sourceContext.sourceIdentifier);if(!t)return 0;this.uhb.startTime=(0,o.toSeconds)(t.getAvailabilityStartTime());var n=null==(e=t.findPeriod(this.representation._internalId.periodId))?void 0:e.start;return isFinite(n)&&(this.uhb.startTime=n),this.uhb.duration=(0,o.toSeconds)(Date.now())-this.uhb.startTime,this.uhb.startTime+this.uhb.duration+t.getTimeShiftBufferDepthSeconds()-this.uhb.startTime},e.prototype.Fhb=function(){var e,t=1,n=1;return["http://dashif.org/thumbnail_tile","http://dashif.org/guidelines/thumbnail_tile"].includes(this.zhb._schemeIdUri)&&(t=(e=this.zhb._value.split("x").map(function(e){return parseInt(e)}))[0],n=e[1]),{vtiles:n,htiles:t,ttiles:n*t}},e}()}
1,86200:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.BitmovinThumbnailModuleDefinition=void 0;var i=n(62756),r=n(5214);t.BitmovinThumbnailModuleDefinition={name:i.ModuleName.Thumbnail,module:{createThumbnailService:function(e){return new r.BitmovinThumbnailService(e)},extendAdaptationSets:function(e,t,n){return e}}},t.default=t.BitmovinThumbnailModuleDefinition},2758:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.createThumbnailParser=function(e,t){return"string"==typeof t?new r.WebVttThumbnailParser(e):Array.isArray(t)&&t.some(function(e){return(0,i.isDashThumbnailSet)(e.adaptationSet)})?new i.DashThumbnailParser(e):{parse:function(){return Promise.resolve([])},dispose:function(){}}};var i=n(78270),r=n(75042)},41358:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.ThumbnailTimeline=void 0,t.ThumbnailTimeline=function(){function e(e){this.xbb=[],this.ybb=e.width,this.zbb=e.height}return e.prototype.addThumbnails=function(e){this.xbb=this.xbb.concat(e)},e.prototype.getThumbnail=function(e){var t=this.xbb.length;return 0===t||e<this.xbb[0].start||e>this.xbb[t-1].end?null:function e(t,n,i){var r=i.start,o=void 0===r?0:r,s=i.end,a=void 0===s?n.length:s,u=o+Math.floor((a-o)/2),l=n[u];return t>=l.start&&t<=l.end?l:u===o?null:l.start>t?e(t,n,{start:o,end:u}):e(t,n,{start:u,end:a})}(e,this.xbb,{start:0,end:t})||null},e.prototype.getThumbnailWidth=function(){return this.ybb},e.prototype.getThumbnailHeight=function(){return this.zbb},e.prototype.clearThumbnails=function(){this.xbb=[]},e.prototype.isMatchingTimeline=function(e){return this.getThumbnailWidth()===e.width&&this.getThumbnailHeight()===e.height},e.prototype.dispose=function(){this.clearThumbnails()},e}()},93617:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.ThumbnailTimelineStore=void 0;var i=n(41358);function r(e,t,n){return Math.abs(t-e.getThumbnailWidth())+Math.abs(n-e.getThumbnailHeight())}t.ThumbnailTimelineStore=function(){function e(e){this.context=e,this.PW=[]}return e.prototype.addTracks=function(e){var t=this;0!==e.length&&e.forEach(function(e){return t.QW(e).addThumbnails(e.thumbnails)})},e.prototype.getThumbnail=function(e,t){if(0===this.PW.length)return null;var n,i,o,s,a=null!=(s=null==(o=this.context.settings)?void 0:o.THUMBNAIL_TO_PLAYER_SIZE_RATIO)?s:1;return(n=t.width*a,i=t.height*a,this.PW.reduce(function(e,t){var o=r(e,n,i);return r(t,n,i)<o?t:e})).getThumbnail(e)},e.prototype.QW=function(e){var t=this.PW.find(function(t){return t.isMatchingTimeline(e)});return t||(t=new i.ThumbnailTimeline(e),this.PW.push(t),t)},e.prototype.clear=function(){this.PW.forEach(function(e){return e.dispose()}),this.PW=[]},e.prototype.dispose=function(){this.clear()},e}()},75042:function(e,t,n){var i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.WebVttThumbnailParser=void 0;var r=n(4129),o=n(29669),s=n(94685),a=n(58313),u=n(88052),l=n(62756),c=n(59462);t.WebVttThumbnailParser=function(){function e(e){this.context=e}return e.prototype.parse=function(e){var t=this;if(!(0,s.isContextAvailable)(this.context))return Promise.resolve([]);var n=e.slice(0,e.lastIndexOf("/")+1);return this.tbb(e,this.context).then(function(e){if(!e)return[];var r=t.vbb().parse(e).map(function(e){return function(e,t){var n="#xywh=",r=e.text;if(-1===r.indexOf(n))return i(i({},e),{url:a.URLHelper.concatUrlParts(t,r)});var o=r.indexOf(n)+6,s=r.substring(o);r=r.slice(0,o-6);var u=s.split(","),l=u[0],c=u[1],d=u[2],p=u[3];return i(i({},e),{url:a.URLHelper.concatUrlParts(t,r),x:parseFloat(l),y:parseFloat(c),w:parseFloat(d),h:parseFloat(p)})}(e,n)}).map(function(e){return{start:e.start,end:e.end,width:e.w,height:e.h,x:e.x,y:e.y,url:e.url,text:e.text}}),o=(0,c.mapToThumbnailTrack)(r);return null!=o?[o]:[]}).catch(function(e){return(0,s.isContextAvailable)(t.context)&&t.context.logger.warn("Error trying to get WebVtt thumbnails: ".concat(e)),[]})},e.prototype.tbb=function(e,t){if(a.URLHelper.isDataUri(e))return Promise.resolve(this.ubb(e,t.logger));var n=new r.DefaultContentLoader(t,{requestType:o.HttpRequestType.MEDIA_THUMBNAILS});return n.load(e).then(function(e){return e.body}).finally(function(){return n.dispose()})},e.prototype.ubb=function(e,t){try{return a.URLHelper.parseDataUri(e).data}catch(e){throw t.warn("Error decoding WebVtt thumbnail data URI: ".concat(e)),e}},e.prototype.vbb=function(){return new(u.ModuleManager.get(l.ModuleName.SubtitlesWebVTT)).WebVttParser},e.prototype.dispose=function(){},e}()}
1,59462:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.mapToThumbnailTrack=function(e){return 0===e.length?null:{thumbnails:e,width:e[0].width,height:e[0].height}}}},function(e){return e(e.s=86200)}])}()},51350:function(e,t,n){"use strict";var i,r=this&&this.__extends||(i=function(e,t){return(i=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])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.ClickOverlay=void 0,t.ClickOverlay=function(e){function t(t){void 0===t&&(t={});var n=e.call(this,t)||this;return n.config=n.mergeConfig(t,{cssClass:"ui-clickoverlay",role:n.config.role},n.config),n}return r(t,e),t.prototype.initialize=function(){e.prototype.initialize.call(this),this.setUrl(this.config.url);var t=this.getDomElement();t.on("click",function(){t.data("url")&&window.open(t.data("url"),"_blank")})},t.prototype.getUrl=function(){return this.getDomElement().data("url")},t.prototype.setUrl=function(e){(void 0===e||null==e)&&(e=""),this.getDomElement().data("url",e)},t}(n(94474).Button)},51492:function(e,t,n){"use strict";var i,r=this&&this.__extends||(i=function(e,t){return(i=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])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.SubtitleSettingsResetButton=void 0;var o=n(94474),s=n(24379);t.SubtitleSettingsResetButton=function(e){function t(t){var n=e.call(this,t)||this;return n.config=n.mergeConfig(t,{cssClass:"ui-settings-panel-navigation-text-button",text:s.i18n.getLocalizer("reset"),buttonStyle:o.ButtonStyle.Text},n.config),n}return r(t,e),t.prototype.configure=function(t,n){var i=this;e.prototype.configure.call(this,t,n),this.settingsManager=n.getSubtitleSettingsManager(),this.onClick.subscribe(function(){i.settingsManager.reset()})},t}(o.Button)},51555:function(e,t,n){"use strict";var i,r=this&&this.__extends||(i=function(e,t){return(i=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])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.PlaybackToggleButton=void 0;var o=n(67598),s=n(41113),a=n(24379);t.PlaybackToggleButton=function(e){function t(t){void 0===t&&(t={});var n=e.call(this,t)||this;return n.config=n.mergeConfig(t,{cssClass:"ui-playbacktogglebutton",text:a.i18n.getLocalizer("play"),onAriaLabel:a.i18n.getLocalizer("pause"),offAriaLabel:a.i18n.getLocalizer("play")},n.config),n.isPlayInitiated=!1,n}return r(t,e),t.prototype.configure=function(n,i,r){var o=this;void 0===r&&(r=!0),e.prototype.configure.call(this,n,i),"boolean"==typeof i.getConfig().enterFullscreenOnInitialPlayback&&(this.config.enterFullscreenOnInitialPlayback=i.getConfig().enterFullscreenOnInitialPlayback);var a=!1,u=!0,l=function(){a||(n.isPlaying()||o.isPlayInitiated?o.on():o.off())};n.on(n.exports.PlayerEvent.Play,function(e){o.isPlayInitiated=!0,u=!1,l()}),n.on(n.exports.PlayerEvent.Paused,function(e){o.isPlayInitiated=!1,l()}),n.on(n.exports.PlayerEvent.Playing,function(e){o.isPlayInitiated=!1,l()}),n.on(n.exports.PlayerEvent.SourceLoaded,l),i.getConfig().events.onUpdated.subscribe(l),n.on(n.exports.PlayerEvent.SourceUnloaded,l),n.on(n.exports.PlayerEvent.PlaybackFinished,l),n.on(n.exports.PlayerEvent.CastStarted,l),n.on(n.exports.PlayerEvent.Warning,function(e){e.code===n.exports.WarningCode.PLAYBACK_COULD_NOT_BE_STARTED&&(o.isPlayInitiated=!1,u=!0,o.off())});
vendor: 4,914 bytes, line 1
1var c=function(){n.isLive()&&!s.PlayerUtils.isTimeShiftAvailable(n)?o.getDomElement().addClass(o.prefixCss(t.CLASS_STOPTOGGLE)):o.getDomElement().removeClass(o.prefixCss(t.CLASS_STOPTOGGLE))},d=new s.PlayerUtils.TimeShiftAvailabilityDetector(n),p=new s.PlayerUtils.LiveStreamDetector(n,i);d.onTimeShiftAvailabilityChanged.subscribe(function(){return c()}),p.onLiveChanged.subscribe(function(){return c()}),d.detect(),p.detect(),r&&this.onClick.subscribe(function(){n.isPlaying()||o.isPlayInitiated?n.pause("ui"):(n.play("ui"),u&&o.config.enterFullscreenOnInitialPlayback&&n.setViewMode(n.exports.ViewMode.Fullscreen))}),i.onSeek.subscribe(function(){a=!0}),i.onSeeked.subscribe(function(){a=!1}),l()},t.CLASS_STOPTOGGLE="stoptoggle",t}(o.ToggleButton)},51571:function(e,t,n){"use strict";var i,r=this&&this.__extends||(i=function(e,t){return(i=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])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.SeekBar=void 0;var o=n(75343),s=n(86051),a=n(4437),u=n(85704),l=n(80432),c=n(41113),d=n(27717),p=n(47389),h=n(24379),f=n(2652),g=n(38543),v=n(65135);t.SeekBar=function(e){function t(t){void 0===t&&(t={});var n=e.call(this,t)||this;n.playbackPositionPercentage=0,n.isUserSeeking=!1,n.isAdPlaying=!1,n.seekBarEvents={onSeek:new u.EventDispatcher,onSeekPreview:new u.EventDispatcher,onSeeked:new u.EventDispatcher},n.seekWhileScrubbing=function(e,t){t.scrubbing&&n.seek(t.position)},n.getTargetSeekPosition=function(e){var t;if(n.player.isLive()){var i=n.player.getMaxTimeShift();t=i-e/100*i}else{var r=c.PlayerUtils.getSeekableRangeStart(n.player,0);t=n.player.getDuration()*(e/100)+r}return t},n.seek=function(e){var t=n.getTargetSeekPosition(e);n.player.isLive()?n.player.timeShift(t,"ui"):n.player.seek(t,"ui")},n.updateLabelPosition=function(e){n.uiBoundingRect||(n.uiBoundingRect=n.uiManager.getUI().getDomElement().get(0).getBoundingClientRect()),n.label.setPositionInBounds(e,n.uiBoundingRect)};var i=n.config.keyStepIncrements||{leftRight:1,upDown:5};return n.config=n.mergeConfig(t,{cssClass:"ui-seekbar",vertical:!1,smoothPlaybackPositionUpdateIntervalMs:50,keyStepIncrements:i,ariaLabel:h.i18n.getLocalizer("seekBar"),tabIndex:0,snappingRange:1,enableSeekPreview:!0,snappingEnabled:!0},n.config),n.label=n.config.label,n}return r(t,e),t.prototype.initialize=function(){e.prototype.initialize.call(this),this.hasLabel()&&this.getLabel().initialize()},t.prototype.setAriaSliderMinMax=function(e,t){this.getDomElement().attr("aria-valuemin",e),this.getDomElement().attr("aria-valuemax",t)},t.prototype.setAriaSliderValues=function(){if(this.seekBarType===p.SeekBarType.Live){var e=Math.ceil(this.player.getTimeShift()).toString(),t="".concat(h.i18n.performLocalization(h.i18n.getLocalizer("seekBar.timeshift"))," ").concat(h.i18n.performLocalization(h.i18n.getLocalizer("seekBar.value")),": ").concat(e);this.getDomElement().attr("aria-valuenow",e),this.getDomElement().attr("aria-valuetext",t),this.config.addCurrentTimeToAriaLabel&&this.getDomElement().attr("aria-label","".concat(h.i18n.performLocalization(this.config.ariaLabel),": ").concat(t))}else if(this.seekBarType===p.SeekBarType.Vod){var n="".concat(d.StringUtils.secondsToText(this.player.getCurrentTime())," ").concat(h.i18n.performLocalization(h.i18n.getLocalizer("seekBar.durationText"))," ").concat(d.StringUtils.secondsToText(this.player.getDuration()));this.getDomElement().attr("aria-valuenow",Math.floor(this.player.getCurrentTime()).toString()),this.getDomElement().attr("aria-valuetext",n),this.config.addCurrentTimeToAriaLabel&&this.getDomElement().attr("aria-label","".concat(h.i18n.performLocalization(this.config.ariaLabel),": ").concat(d.StringUtils.secondsToText(this.player.getCurrentTime())))}},t.prototype.getPlaybackPositionPercentage=function(){return this.player.isLive()?100-100/this.player.getMaxTimeShift()*this.player.getTimeShift():100/this.player.getDuration()*this.getRelativeCurrentTime()},t.prototype.updateBufferLevel=function(e){var t;t=this.player.isLive()?100:e+(0,v.getMinBufferLevel)(this.player),this.setBufferPosition(t)},t.prototype.configure=function(n,i,r){var s,a=this;if(void 0===r&&(r=!0),e.prototype.configure.call(this,n,i),this.player=n,this.uiManager=i,this.setPosition(this.seekBarBackdrop,100),new p.SeekBarController(this.config.keyStepIncrements,n,i.getConfig().volumeController).setSeekBarControls(this.getDomElement(),function(){return a.seekBarType}),!r){this.seekBarType=p.SeekBarType.Volume;return}var u=function(){a.isUiShown=!0,!a.smoothPlaybackPositionUpdater||n.isLive
1()||a.smoothPlaybackPositionUpdater.isActive()||(f(null,!0),a.smoothPlaybackPositionUpdater.start())};n.on(n.exports.PlayerEvent.AdStarted,function(){a.isAdPlaying=!0,u()}),n.on(n.exports.PlayerEvent.AdBreakFinished,function(){a.isAdPlaying=!1}),n.on(n.exports.PlayerEvent.SourceUnloaded,function(){a.isAdPlaying=!1}),i.onControlsShow.subscribe(u),i.onControlsHide.subscribe(function(){!a.isAdPlaying&&(a.isUiShown=!1,a.smoothPlaybackPositionUpdater&&a.smoothPlaybackPositionUpdater.isActive()&&a.smoothPlaybackPositionUpdater.clear())});var l=!1,d=!1,h=!1,f=function(e,i){if(void 0===e&&(e=null),void 0===i&&(i=!1),!a.isUserSeeking){var r=a.getPlaybackPositionPercentage();if(a.updateBufferLevel(r),d&&e&&e.type===n.exports.PlayerEvent.SegmentRequestFinished&&r!==a.playbackPositionPercentage&&(r=a.playbackPositionPercentage),n.isLive())0===n.getMaxTimeShift()?a.setPlaybackPosition(100):(a.isSeeking()||a.setPlaybackPosition(r),a.setAriaSliderMinMax(n.getMaxTimeShift().toString(),"0"));else{var o=a.config.smoothPlaybackPositionUpdateIntervalMs===t.SMOOTH_PLAYBACK_POSITION_UPDATE_DISABLED||i||n.isPaused(),s=n.isPaused()===n.isPlaying();(o||s)&&!a.isSeeking()&&a.setPlaybackPosition(r),a.setAriaSliderMinMax("0",n.getDuration().toString())}a.isUiShown&&a.setAriaSliderValues()}};n.on(n.exports.PlayerEvent.Ready,f),n.on(n.exports.PlayerEvent.TimeChanged,f),n.on(n.exports.PlayerEvent.StallEnded,f),n.on(n.exports.PlayerEvent.TimeShifted,f),n.on(n.exports.PlayerEvent.SegmentRequestFinished,f),this.configureLivePausedTimeshiftUpdater(n,i,f);var g=function(){h=!0,a.setSeeking(!0),d=!1},v=function(e){void 0===e&&(e=null),h=!1,a.setSeeking(!1),f(e,!0)},y=function(){l&&n.play("ui-seek")};n.on(n.exports.PlayerEvent.Seek,g),n.on(n.exports.PlayerEvent.Seeked,v),n.on(n.exports.PlayerEvent.TimeShift,g),n.on(n.exports.PlayerEvent.TimeShifted,v);var m=function(e){return!!e.groupPlayback};this.onSeek.subscribe(function(e){a.isUserSeeking=!0,i.onSeek.dispatch(e),m(n)&&n.groupPlayback.hasJoined()&&!s&&(s=n.groupPlayback.beginSuspension(o.GroupPlaybackSuspensionReason.UserIsScrubbing)),!h&&(l=n.isPlaying())&&n.pause("ui-seek")}),this.onSeekPreview.subscribe(function(e,t){i.onSeekPreview.dispatch(e,t),d=t.scrubbing}),"boolean"==typeof i.getConfig().enableSeekPreview&&(this.config.enableSeekPreview=i.getConfig().enableSeekPreview),this.config.enableSeekPreview&&this.onSeekPreview.subscribeRateLimited(this.seekWhileScrubbing,200),this.onSeeked.subscribe(function(e,t){if(a.isUserSeeking=!1,a.seek(t),i.onSeeked.dispatch(e),y(),m(n)&&n.groupPlayback.hasJoined()&&s){var r=a.getTargetSeekPosition(t);n.groupPlayback.endSuspension(s,{proposedPlaybackTime:r}),s=void 0}}),this.hasLabel()&&this.getLabel().configure(n,i);var b=!1,S=!1,E=function(e,t){e&&!t?a.hide():a.show(),f(null,!0),a.refreshPlaybackPosition()},_=new c.PlayerUtils.LiveStreamDetector(n,i);_.onLiveChanged.subscribe(function(e,t){(b=t.live)&&null!=a.smoothPlaybackPositionUpdater?(a.smoothPlaybackPositionUpdater.clear(),a.seekBarType=p.SeekBarType.Live):a.seekBarType=p.SeekBarType.Vod,E(b,S)});var T=new c.PlayerUtils.TimeShiftAvailabilityDetector(n);T.onTimeShiftAvailabilityChanged.subscribe(function(e,t){S=t.timeShiftAvailable,E(b,S)}),_.detect(),T.detect(),n.on(n.exports.PlayerEvent.PlayerResized,function(){a.refreshPlaybackPosition(),a.uiBoundingRect=a.uiManager.getUI().getDomElement().get(0).getBoundingClientRect()}),i.onConfigured.subscribe(function(){a.refreshPlaybackPosition()}),n.on(n.exports.PlayerEvent.SourceLoaded,function(){a.refreshPlaybackPosition()}),i.getConfig().events.onUpdated.subscribe(function(){f()}),"number"==typeof i.getConfig().seekbarSnappingRange&&(this.config.snappingRange=i.getConfig().seekbarSnappingRange),"boolean"==typeof i.getConfig().seekbarSnappingEnabled&&(this.config.snappingEnabled=i.getConfig().seekbarSnappingEnabled),f(),this.setBufferPosition(0),this.setSeekPosition(0),this.config.smoothPlaybackPositionUpdateIntervalMs!==t.SMOOTH_PLAYBACK_POSITION_UPDATE_DISABLED&&this.configureSmoothPlaybackPositionUpdater(n,i),this.initializeTimelineMarkers(n,i)},t.prototype.initializeTimelineMarkers=function(e,t){var n=this,i={cssPrefix:this.config.cssPrefix,snappingRange:this.config.snappingRange};this.timelineMarkersHandler=new g.TimelineMarkersHandler(i,function(){return n.seekBar.width()},this.seekBarMarkersContainer),this.timelineMarkersHandler.initialize(e,t)},t.prototype.configureLivePausedTimeshiftUpdater=function(e,t,n){var i=this;this.pausedTimeshiftUpdater=new l.Timeout(1e3,n,!0),e.on(e.exports.PlayerEvent.Paused,function(){e.isLive()&&0>e.getMaxTimeShift()&&i.pausedTimeshiftUpdater.start()}),e.on(e.exports.PlayerEvent.Play,function(){return i.pausedTimeshiftUpdater.clear()})},t.prototype.configureSmoothPlaybackPositionUpdater=function(e,t){var n=this,i=0,r=0;this.smoothPlaybackPositionUpdater=new l.Timeout(50,function(){if(!n.isSeeking()){try{if(0===n.player.getDuration()){n.setPlaybackPosition(0),i=0;return}i+=.05,r=n.getRelativeCurrentTime()}catch(t){t instanceof e.exports.PlayerAPINotAvailableError&&n.smoothPlaybackPositionUpdater.clear();return}var t=i-r;Math.abs(t)>
12?i=r:t<=-.05?i+=.05:t>=.05&&(i-=.05);var o=100/e.getDuration()*i;n.setPlaybackPosition(o)}},!0);var o=function(){e.isLive()||(i=n.getRelativeCurrentTime(),n.smoothPlaybackPositionUpdater.start())},s=function(){n.smoothPlaybackPositionUpdater.clear()};e.on(e.exports.PlayerEvent.Play,o),e.on(e.exports.PlayerEvent.Playing,o),e.on(e.exports.PlayerEvent.Paused,s),e.on(e.exports.PlayerEvent.PlaybackFinished,s),e.on(e.exports.PlayerEvent.Seeked,function(){i=n.getRelativeCurrentTime()}),e.on(e.exports.PlayerEvent.SourceUnloaded,s),e.isPlaying()&&o()},t.prototype.getRelativeCurrentTime=function(){return c.PlayerUtils.getCurrentTimeRelativeToSeekableRange(this.player)},t.prototype.release=function(){e.prototype.release.call(this),this.smoothPlaybackPositionUpdater&&this.smoothPlaybackPositionUpdater.clear(),this.pausedTimeshiftUpdater&&this.pausedTimeshiftUpdater.clear(),this.config.enableSeekPreview&&this.onSeekPreview.unsubscribe(this.seekWhileScrubbing)},t.prototype.toDomElement=function(){var e=this;this.config.vertical&&this.config.cssClasses.push("vertical");var t=new a.DOM("div",{id:this.config.id,class:this.getCssClasses(),role:"slider","aria-label":h.i18n.performLocalization(this.config.ariaLabel),tabindex:this.config.tabIndex.toString()},this),n=new a.DOM("div",{class:this.prefixCss("seekbar")});this.seekBar=n;var i=new a.DOM("div",{class:this.prefixCss("seekbar-bars")}),r=new a.DOM("div",{class:this.prefixCss("seekbar-bufferlevel")});this.seekBarBufferPosition=r;var o=new a.DOM("div",{class:this.prefixCss("seekbar-playbackposition")});this.seekBarPlaybackPosition=o;var s=new a.DOM("div",{class:this.prefixCss("seekbar-playbackposition-marker")});this.seekBarPlaybackPositionMarker=s;var u=new a.DOM("div",{class:this.prefixCss("seekbar-seekposition")});this.seekBarSeekPosition=u;var l=new a.DOM("div",{class:this.prefixCss("seekbar-backdrop")});this.seekBarBackdrop=l;var c=new a.DOM("div",{class:this.prefixCss("seekbar-markers")});this.seekBarMarkersContainer=c,i.append(this.seekBarBackdrop,this.seekBarBufferPosition,this.seekBarSeekPosition,this.seekBarPlaybackPosition),n.append(i,this.seekBarMarkersContainer,this.seekBarPlaybackPositionMarker);var d=!1,p=function(t){t.preventDefault(),null!=e.player.vr&&t.stopPropagation();var n=e.getOffset(t),i=100*n,r=n*e.seekBar.width();e.setSeekPosition(i),e.setPlaybackPosition(i),e.onSeekPreviewEvent(i,r,!0)},g=function(t){t.preventDefault(),new a.DOM(document).off("touchmove mousemove",p),new a.DOM(document).off("touchend mouseup",g);var n,i=100*e.getOffset(t);if(e.config.snappingEnabled){var r=null==(n=e.timelineMarkersHandler)?void 0:n.getMarkerAtPosition(i);i=r?r.position:i}e.setSeeking(!1),d=!1,e.setSeekPosition(i),e.setPlaybackPosition(i),e.onSeekedEvent(i)};return n.on("touchstart mousedown",function(t){var n=f.BrowserUtils.isTouchSupported&&e.isTouchEvent(t);t.preventDefault(),null!=e.player.vr&&t.stopPropagation(),e.setSeeking(!0),d=!0,e.onSeekEvent(),new a.DOM(document).on(n?"touchmove":"mousemove",p),new a.DOM(document).on(n?"touchend":"mouseup",g)}),n.on("touchmove mousemove",function(t){t.preventDefault(),d&&p(t);var n=e.getOffset(t),i=100*n,r=n*e.seekBar.width();e.setSeekPosition(i),e.onSeekPreviewEvent(i,r,!1),e.hasLabel()&&e.getLabel().isHidden()&&e.getLabel().show()}),n.on("touchend mouseleave",function(t){t.preventDefault(),e.setSeekPosition(0),e.hasLabel()&&e.getLabel().hide()}),t.append(n),this.label&&t.append(this.label.getDomElement()),t},t.prototype.getHorizontalOffset=function(e){var t=this.seekBar.offset().left,n=this.seekBar.width();return this.sanitizeOffset(1/n*(e-t))},t.prototype.getVerticalOffset=function(e){var t=this.seekBar.offset().top,n=this.seekBar.height();return 1-this.sanitizeOffset(1/n*(e-t))},t.prototype.getOffset=function(e){if(f.BrowserUtils.isTouchSupported&&this.isTouchEvent(e))if(this.config.vertical)return this.getVerticalOffset("touchend"===e.type?e.changedTouches[0].pageY:e.touches[0].pageY);else return this.getHorizontalOffset("touchend"===e.type?e.changedTouches[0].pageX:e.touches[0].pageX);return e instanceof MouseEvent?this.config.vertical?this.getVerticalOffset(e.pageY):this.getHorizontalOffset(e.pageX):(console&&console.warn("invalid event"),0)},t.prototype.sanitizeOffset=function(e){return e<0?e=0:e>1&&(e=1),e},t.prototype.setPlaybackPosition=function(e){this.playbackPositionPercentage=e,this.setPosition(this.seekBarPlaybackPosition,e);var t=(this.config.vertical?this.seekBar.height()-this.seekBarPlaybackPositionMarker.height():this.seekBar.width())/100*e;this.config.vertical&&(t=this.seekBar.height()-t-this.seekBarPlaybackPositionMarker.height());var n=this.config.vertical?{transform:"translateY("+t+"px)","-ms-transform":"translateY("+t+"px)","-webkit-transform":"translateY("+t+"px)"}:{transform:"translateX("+t+"px)","-ms-transform":"translateX("+t+"px)","-webkit-transform":"translateX("+t+"px)"};this.seekBarPlaybackPositionMarker.css(n)},t.prototype.refreshPlaybackPosition=function(){this.setPlaybackPosition(this.playbackPositionPercentage)},t.prototype.setBufferPosition=function(e){this.setPosition(this.seekBarBufferPosition,e)},t.prototype.setSeekPosition=function(e){this.setPosition(this.seekBarSeekPosition,e)},t.prototype.setPosition=function(e,t){var n=t/100;n>=.99999&&n<=1.00001&&(n=.99999);var i=this.config.vertical?{transform:"scaleY("+n+")","-ms-transform":"scaleY("+n+")","-webkit-transform":"scaleY("+n+")"}:{transform:"scaleX("+n+")","-ms-transform":"scaleX("+n+")","-webkit-transform":"scaleX("+n+")"};e.css(i)},t.prototype.setSeeking=function(e){e?this.getDomElement().addClass(this.prefixCss(t.CLASS_SEEKING)):this.getDomElement().removeClass(this.prefixCss(t.CLASS_SEEKING))},t.prototype.isSeeking=function(){return this.getDomElement().hasClass(this.prefixCss(t.CLASS_SEEKING))},t.prototype.hasLabel=function(){return null!=this.label},t.prototype.getLabel=function(){return this.label},t.prototype.onSeekEvent=function(){this.seekBarEvents.onSeek.dispatch(this)},t.prototype.clearAllThickenedMarkers=function(){var e;null==(e=this.seekBarMarkersContainer.find(".".concat(this.prefixCss("seekbar-marker"))))||e.removeClass(this.prefixCss(t.CLASS_CHAPTER_HOVERED))},t.prototype.thickenMarker=function(e){(null==e?void 0:e.element)&&e.element.addClass(this.prefixCss(t.CLASS_CHAPTER_HOVERED))},t.prototype.onSeekPreviewEvent=function(e,t,n){var i=this.timelineMarkersHandler&&this.timelineMarkersHandler.getMarkerAtPosition(e),r=e;i&&(i.duration>0?e<i.position?r=i.position:e>i.position+i.duration&&(r=i.position+i.duration):r=i.position),this.label&&this.updateLabelPosition(t),n&&(this.clearAllThickenedMarkers(),this.thickenMarker(i)),this.seekBarEvents.onSeekPreview.dispatch(this,{scrubbing:n,position:r,marker:i})},t.prototype.onSeekedEvent=function(e){this.clearAllThickenedMarkers(),this.seekBarEvents.onSeeked.dispatch(this,e)},Object.defineProperty(t.prototype,"onSeek",{get:function(){return this.seekBarEvents.onSeek.getEvent()}
1,enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onSeekPreview",{get:function(){return this.seekBarEvents.onSeekPreview.getEvent()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onSeeked",{get:function(){return this.seekBarEvents.onSeeked.getEvent()},enumerable:!1,configurable:!0}),t.prototype.onShowEvent=function(){e.prototype.onShowEvent.call(this),this.refreshPlaybackPosition()},t.prototype.isTouchEvent=function(e){return window.TouchEvent&&e instanceof TouchEvent},t.SMOOTH_PLAYBACK_POSITION_UPDATE_DISABLED=-1,t.CLASS_SEEKING="seeking",t.CLASS_CHAPTER_HOVERED="hovered",t}(s.Component)},51601:function(e,t,n){"use strict";var i,r=this&&this.__extends||(i=function(e,t){return(i=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])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.EcoModeContainer=void 0;var o=n(24379),s=n(8675),a=n(1108),u=n(30194),l=n(21616),c=n(98908);t.EcoModeContainer=function(e){function t(t){void 0===t&&(t={});var n=e.call(this,t)||this;n.savedEmissons=0;var i=new a.EcoModeToggleButton,r=new u.Label({text:o.i18n.getLocalizer("ecoMode.title"),for:i.getConfig().id,id:"ecomodelabel"});return n.emissionsSavedLabel=new u.Label({text:"".concat(n.savedEmissons.toFixed(4)," gCO2"),cssClass:"ui-label-savedEnergy"}),n.ecoModeToggleButtonItem=new c.ToggleSettingsPanelItem({label:r,settingComponent:i}),n.ecoModeSavedEmissionsItem=new l.SettingsPanelItem({label:"Saved Emissions",settingComponent:n.emissionsSavedLabel,hidden:!0}),n.addComponent(n.ecoModeToggleButtonItem),n.addComponent(n.ecoModeSavedEmissionsItem),i.onToggleOn.subscribe(function(){n.ecoModeSavedEmissionsItem.show(),n.onToggleCallback()}),i.onToggleOff.subscribe(function(){n.ecoModeSavedEmissionsItem.hide(),n.onToggleCallback()}),n}return r(t,e),t.prototype.setOnToggleCallback=function(e){this.onToggleCallback=e},t.prototype.configure=function(e){var t=this;e.on(e.exports.PlayerEvent.SegmentPlayback,function(n){if(n.mimeType.includes("video")){var i=n.mediaInfo,r=i.height,o=i.width,s=i.bitrate,a=i.frameRate,u=t.getMaxQualityAvailable(e.getAvailableVideoQualities()),l=u.height,c=u.bitrate,d=u.width,p=t.calculateEnergyConsumption(a,r,o,s,n.duration),h=t.calculateEnergyConsumption(a,l,d,c,n.duration);t.ecoModeSavedEmissionsItem.isShown()&&t.updateSavedEmissions(p,h,t.emissionsSavedLabel)}})},t.prototype.updateSavedEmissions=function(e,t,n){this.currentEnergyEmission=475*e,this.savedEmissons+=475*t-this.currentEnergyEmission,n.setText(this.savedEmissons.toFixed(4)+" gCO2")},t.prototype.calculateEnergyConsumption=function(e,t,n,i,r){return(.035*e+576e-11*t*n+i/1e3*(697e-8+324e-7)+4.16+8.52+1.15)*r/36e5},t.prototype.getMaxQualityAvailable=function(e){var t=e.sort(function(e,t){return e.bitrate-t.bitrate});return t[t.length-1]},t}(s.Container)},52023:function(e,t,n){"use strict";var i,r,o,s=this&&this.__extends||(r=function(e,t){return(r=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])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.SettingsPanel=t.NavigationDirection=void 0;var a=n(8675),u=n(46419),l=n(80432),c=n(85704),d=n(57640),p=n(38661),h=n(90753);(i=o||(t.NavigationDirection=o={}))[i.Forwards=0]="Forwards",i[i.Backwards=1]="Backwards",t.SettingsPanel=function(e){function t(t){var n=e.call(this,t)||this;return n.navigationStack=[],n.currentState=null,n.resetStateTimerId=null,n.shouldResetStateImmediately=!1,n.settingsPanelEvents={onSettingsStateChanged:new c.EventDispatcher,onActivePageChanged:new c.EventDispatcher},n.config=n.mergeConfig(t,{cssClass:"ui-settings-panel",hideDelay:5e3,pageTransitionAnimation:!0,stateResetDelay:5e3,hideOnControl
1sHide:!0,hideOnOtherSettingsPanelOpening:!0},n.config),n.activePage=n.getRootPage(),n.onActivePageChangedEvent(),n}return s(t,e),t.prototype.configure=function(t,n){var i=this;e.prototype.configure.call(this,t,n);var r=this.getConfig();n.onControlsHide.subscribe(function(){return i.hideHoveredSelectBoxes()}),n.onComponentViewModeChanged.subscribe(function(e,t){var n=t.mode;return i.trackComponentViewMode(n)}),r.hideDelay>-1&&(this.hideTimeout=new l.Timeout(r.hideDelay,function(){i.hide(),i.hideHoveredSelectBoxes()}),this.getDomElement().on("mouseenter mousemove",function(){i.hideTimeout.reset()}),this.getDomElement().on("mouseleave",function(){i.hideTimeout.reset()}),this.getDomElement().on("focusin",function(){i.hideTimeout.clear()}),this.getDomElement().on("focusout",function(){i.hideTimeout.reset()})),r.pageTransitionAnimation&&t.on(t.exports.PlayerEvent.PlayerResized,function(){i.getDomElement().css({width:"",height:""})});var o=function(e){(0,p.getKeyMapForPlatform)()[e.keyCode]===h.Action.BACK&&(i.hide(),i.resetState())},s=function(){null!==i.resetStateTimerId&&(clearTimeout(i.resetStateTimerId),i.resetStateTimerId=null),r.stateResetDelay>-1&&(i.resetStateTimerId=window.setTimeout(function(){return i.resetState()},r.stateResetDelay))};this.onHide.subscribe(function(){i.shouldResetStateImmediately?(i.currentState=null,i.shouldResetStateImmediately=!1):(i.currentState=i.maybeSaveCurrentState(),s()),r.hideDelay>-1&&i.hideTimeout.clear(),i.activePage.onInactiveEvent(),document.removeEventListener("keyup",o)}),this.onShow.subscribe(function(){null!==i.resetStateTimerId&&(clearTimeout(i.resetStateTimerId),i.resetStateTimerId=null),null!==i.currentState?i.restoreNavigationState(i.currentState):i.updateActivePageClass(),i.activePage.onActiveEvent(),r.hideDelay>-1&&i.hideTimeout.start(),document.addEventListener("keyup",o)}),this.getRootPage().onSettingsStateChanged.subscribe(function(){i.onSettingsStateChangedEvent()}),r.hideOnControlsHide&&n.onControlsHide.subscribe(function(){i.hide()}),n.onControlsShow.subscribe(function(){null!==i.currentState&&i.show()}),this.updateActivePageClass()},t.prototype.getActivePage=function(){return this.activePage},t.prototype.setActivePageIndex=function(e){this.setActivePage(this.getPages()[e])},t.prototype.setActivePage=function(e){e===this.getActivePage()?console.warn("Page is already the current one ... skipping navigation"):this.navigateToPage(e,this.getActivePage(),o.Forwards,!this.config.pageTransitionAnimation)},t.prototype.popToRootSettingsPanelPage=function(){this.resetNavigation(this.config.pageTransitionAnimation)},t.prototype.popSettingsPanelPage=function(){if(0===this.navigationStack.length)return void console.warn("Already on the root page ... skipping navigation");var e=this.navigationStack[this.navigationStack.length-2];e||(e=this.getRootPage());var t=this.activePage;this.navigateToPage(e,this.activePage,o.Backwards,!this.config.pageTransitionAnimation),t.getConfig().removeOnPop&&(this.removeComponent(t),this.updateComponents())},t.prototype.rootPageHasActiveSettings=function(){return this.getRootPage().hasActiveSettings()},t.prototype.getPages=function(){return this.config.components.filter(function(e){return e instanceof d.SettingsPanelPage})},t.prototype.getRootPage=function(){return this.getPages()[0]},Object.defineProperty(t.prototype,"onSettingsStateChanged",{get:function(){return this.settingsPanelEvents.onSettingsStateChanged.getEvent()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onActivePageChanged",{get:function(){return this.settingsPanelEvents.onActivePageChanged.getEvent()},enumerable:!1,configurable:!0}),t.prototype.hideAndReset=function(){this.shouldResetStateImmediately=!0,this.hide(),this.resetState()},t.prototype.release=function(){e.prototype.release.call(this),this.hideTimeout&&this.hideTimeout.clear()},t.prototype.addComponent=function(t){0===this.getPages().length&&t instanceof d.SettingsPanelPage&&(this.activePage=t,this.onActivePageChangedEvent()),e.prototype.addComponent.call(this,t)},t.prototype.addPage=function(e){this.addComponent(e),this.updateComponents()},t.prototype.suspendHideTimeout=function(){var e;null==(e=this.hideTimeout)||e.suspend()},t.prototype.resumeHideTimeout=function(){var e;null==(e=this.hideTimeout)||e.resume(!0)},t.prototype.updateActivePageClass=function(){var e=this;
1this.getPages().forEach(function(n){n===e.activePage?n.getDomElement().addClass(e.prefixCss(t.CLASS_ACTIVE_PAGE)):n.getDomElement().removeClass(e.prefixCss(t.CLASS_ACTIVE_PAGE))})},t.prototype.resetNavigation=function(e){var t=this.getActivePage(),n=this.getRootPage();t&&!e&&t.onInactiveEvent(),this.navigationStack=[],this.animateNavigation(n,t,e),this.activePage=n,this.updateActivePageClass(),this.onActivePageChangedEvent()},Object.defineProperty(t.prototype,"wrapperScrollTop",{get:function(){var e,t;return null!=(t=null==(e=this.innerContainerElement.get(0))?void 0:e.scrollTop)?t:0},set:function(e){var t=this.innerContainerElement.get(0);t&&(t.scrollTop=e)},enumerable:!1,configurable:!0}),t.prototype.resetState=function(){this.activePage=this.getRootPage(),this.navigationStack=[],this.currentState=null,this.resetStateTimerId=null,this.isHidden()&&this.getDomElement().css({width:"",height:""})},t.prototype.buildCurrentState=function(){var e=this.getPages();return{activePageIndex:e.indexOf(this.getActivePage()),navigationStackIndices:this.navigationStack.map(function(t){return e.indexOf(t)}),scrollTop:this.getDomElement().get(0).scrollTop,wrapperScrollTop:this.wrapperScrollTop}},t.prototype.isDefaultPanelState=function(){var e,t=this.getDomElement().get(0),n=this.getActivePage()===this.getRootPage(),i=0===this.navigationStack.length,r=(null!=(e=null==t?void 0:t.scrollTop)?e:0)===0&&0===this.wrapperScrollTop;return n&&i&&r},t.prototype.maybeSaveCurrentState=function(){return this.isDefaultPanelState()?null:this.buildCurrentState()},t.prototype.restoreNavigationState=function(e){var t,n=this.getPages();this.activePage=null!=(t=n[e.activePageIndex])?t:this.getRootPage(),this.navigationStack=e.navigationStackIndices.map(function(e){return n[e]}).filter(Boolean),this.updateActivePageClass(),this.onActivePageChangedEvent(),this.activePage.onActiveEvent(),this.getDomElement().get(0).scrollTop=e.scrollTop,this.wrapperScrollTop=e.wrapperScrollTop},t.prototype.navigateToPage=function(e,t,n,i){this.activePage=e,n===o.Forwards?this.navigationStack.push(e):this.navigationStack.pop(),this.animateNavigation(e,t,i),this.updateActivePageClass(),t.onInactiveEvent(),e.onActiveEvent(),this.onActivePageChangedEvent()},t.prototype.animateNavigation=function(e,t,n){if(this.config.pageTransitionAnimation){var i=this.getDomElement(),r=this.getDomElement().get(0),o=r.scrollWidth,s=r.scrollHeight;t.getDomElement().css("display","none"),this.getDomElement().css({width:"",height:""});var a=e.getDomElement().get(0),u=a.cloneNode(!0);a.parentNode.appendChild(u),u.style.display="block";var l=r.scrollWidth,c=r.scrollHeight;u.parentElement.removeChild(u),t.getDomElement().css("display",""),i.css({width:o+"px",height:s+"px"}),n||this.forceBrowserReflow(),i.css({width:l+"px",height:c+"px"})}},t.prototype.forceBrowserReflow=function(){this.getDomElement().get(0).offsetLeft},t.prototype.hideHoveredSelectBoxes=function(){this.getComputedItems().map(function(e){return e.settingComponent}).filter(function(e){return e instanceof u.SelectBox}).forEach(function(e){return e.closeDropdown()})},t.prototype.getComputedItems=function(){for(var e=[],t=0,n=this.getPages();t<n.length;t++){var i=n[t];e.push.apply(e,i.getItems())}return e},t.prototype.onSettingsStateChangedEvent=function(){this.settingsPanelEvents.onSettingsStateChanged.dispatch(this)},t.prototype.onActivePageChangedEvent=function(){this.settingsPanelEvents.onActivePageChanged.dispatch(this)},t.CLASS_ACTIVE_PAGE="active",t}(a.Container)},52406:function(e,t,n){"use strict";var i,r=this&&this.__extends||(i=function(e,t){return(i=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])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.CharacterEdgeColorSelectBox=void 0;var o=n(72177),s=n(24379);t.CharacterEdgeColorSelectBox=function(e){function t(t){var n=e.call(this,t)||this;
1return n.config=n.mergeConfig(t,{cssClasses:["ui-subtitle-settings-character-edge-color-select-box"]},n.config),n}return r(t,e),t.prototype.configure=function(t,n){var i=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")),this.onItemSelectionChanged.subscribe(function(e,t){i.settingsManager.characterEdgeColor.value=t,i.settingsManager.characterEdgeColor.isSet()?i.settingsManager.characterEdge.isSet()||(i.settingsManager.characterEdge.value="uniform"):i.settingsManager.characterEdge.clear()}),this.settingsManager.characterEdgeColor.onChanged.subscribe(function(e,t){i.selectItem(t.value)}),this.initFromSettings()},t.prototype.initFromSettings=function(){this.settingsManager.characterEdgeColor.isSet()&&this.selectItem(this.settingsManager.characterEdgeColor.value)},t}(o.SubtitleSettingSelectBox)},53135:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.StorageUtils=void 0,function(e){var t;function n(){try{return!t&&window.localStorage&&"function"==typeof localStorage.getItem&&"function"==typeof localStorage.setItem&&"function"==typeof localStorage.removeItem}catch(e){return!1}}function i(e,t){if(n())try{window.localStorage.setItem(e,t)}catch(t){console.debug("Failed to set storage item ".concat(e),t)}}function r(e){if(n())try{return window.localStorage.getItem(e)}catch(t){console.debug("Failed to get storage item ".concat(e),t)}return null}e.setStorageApiDisabled=function(e){t=e.disableStorageApi},e.setItem=i,e.getItem=r,e.removeItem=function(e){if(n())try{window.localStorage.removeItem(e)}catch(t){console.debug("Failed to remove storage item ".concat(e),t)}},e.setObject=function(e,t){i(e,JSON.stringify(t))},e.getObject=function(e){var t=r(e);return t?JSON.parse(t):null}}(n||(t.StorageUtils=n={}))},53623:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.ArrayUtils=void 0,(n||(t.ArrayUtils=n={})).remove=function(e,t){var n=e.indexOf(t);return n>-1?e.splice(n,1)[0]:null}},53709:function(e,t,n){"use strict";var i,r=this&&this.__extends||(i=function(e,t){return(i=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])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.ReplayButton=void 0;var o=n(94474),s=n(24379),a=n(41113);t.ReplayButton=function(e){function t(t){void 0===t&&(t={});var n=e.call(this,t)||this;return n.config=n.mergeConfig(t,{cssClass:"ui-replaybutton",text:s.i18n.getLocalizer("replay"),ariaLabel:s.i18n.getLocalizer("replay")},n.config),n}return r(t,e),t.prototype.configure=function(t,n){var i=this;e.prototype.configure.call(this,t,n),t.isLive()&&this.hide(),new a.PlayerUtils.LiveStreamDetector(t,n).onLiveChanged.subscribe(function(e,t){t.live?i.hide():i.show()}),this.onClick.subscribe(function(){t.hasEnded()?t.play("ui"):t.seek(0)})},t}(o.Button)},54362:function(e,t,n){"use strict";var i,r=this&&this.__extends||(i=function(e,t){return(i=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])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});
vendor: 4,239 bytes, line 1
1Object.defineProperty(t,"__esModule",{value:!0}),t.SubtitleRegionContainer=t.SubtitleRegionContainerManager=t.SubtitleLabel=t.SubtitleOverlay=void 0;var o=n(8675),s=n(30194),a=n(27082),u=n(85704),l=n(4437),c=n(24379),d=n(77146);t.SubtitleOverlay=function(e){function t(n){void 0===n&&(n={});var i=e.call(this,n)||this;return i.preprocessLabelEventCallback=new u.EventDispatcher,i.cea608Enabled=!1,i.cea608FontSizeFactor=1,i.cea608SmallPlayerHeightThreshold=t.DEFAULT_CEA608_SMALL_PLAYER_HEIGHT_THRESHOLD,i.filterFontSizeOptions=function(e){if(i.cea608Enabled&&null!==e.key){var t=parseInt(e.key,10);return!isNaN(t)&&t<=200}return!0},i.previewSubtitleActive=!1,i.previewSubtitle=new p({text:c.i18n.getLocalizer("subtitle.example")}),i.config=i.mergeConfig(n,{cssClass:"ui-subtitle-overlay",enableCea608CaptionFormatting:!0,enableCea608CaptionPositioning:!0},i.config),i}return r(t,e),t.prototype.configure=function(n,i){var r=this;e.prototype.configure.call(this,n,i);var o=i.getConfig();void 0!==o.cea608SmallPlayerHeightThreshold&&(this.cea608SmallPlayerHeightThreshold=o.cea608SmallPlayerHeightThreshold);var s=new h;this.subtitleManager=s,this.subtitleContainerManager=new f(this),n.on(n.exports.PlayerEvent.CueEnter,function(e){var t=r.generateLabel(e);s.cueEnter(e,t),r.preprocessLabelEventCallback.dispatch(e,t),r.previewSubtitleActive&&r.subtitleContainerManager.removeLabel(r.previewSubtitle),r.show(),r.subtitleContainerManager.addLabel(t,r.getDomElement().size()),r.updateComponents(),i.getConfig().forceSubtitlesIntoViewContainer&&r.handleSubtitleCropping(t)}),n.on(n.exports.PlayerEvent.CueUpdate,function(e){var t=r.generateLabel(e),n=s.cueUpdate(e,t);r.preprocessLabelEventCallback.dispatch(e,t),n&&(r.subtitleContainerManager.replaceLabel(n,t,r.getDomElement().size()),r.updateComponents()),i.getConfig().forceSubtitlesIntoViewContainer&&r.handleSubtitleCropping(t)}),n.on(n.exports.PlayerEvent.CueExit,function(e){var t=s.cueExit(e);t&&(r.subtitleContainerManager.removeLabel(t),r.updateComponents()),s.hasCues||(r.previewSubtitleActive?(r.subtitleContainerManager.addLabel(r.previewSubtitle),r.updateComponents()):r.hide())});var u=function(){r.hide(),r.subtitleContainerManager.clear(),s.clear(),r.removeComponents(),r.updateComponents()},c=function(){s.clearInactiveCues(n.getCurrentTime()).forEach(function(e){r.subtitleContainerManager.removeLabel(e.label)}),r.updateComponents()};n.on(n.exports.PlayerEvent.AudioChanged,u),n.on(n.exports.PlayerEvent.SubtitleDisabled,u),n.on(n.exports.PlayerEvent.Seeked,c),n.on(n.exports.PlayerEvent.TimeShifted,c),n.on(n.exports.PlayerEvent.PlaybackFinished,u),n.on(n.exports.PlayerEvent.SourceUnloaded,u),i.onComponentShow.subscribe(function(e){if(e instanceof a.ControlBar){r.getDomElement().addClass(r.prefixCss(t.CLASS_CONTROLBAR_VISIBLE));var n=!r.getDomElement().hasClass(r.prefixCss(t.CLASS_CEA608_PUSHUP_DISABLED));r.cea608Enabled&&r.ensureCea608GridSizeUpdated&&n&&r.getDomElement().waitForTransitionEnd("bottom").then(r.ensureCea608GridSizeUpdated)}}),i.onComponentHide.subscribe(function(e){if(e instanceof a.ControlBar){r.getDomElement().removeClass(r.prefixCss(t.CLASS_CONTROLBAR_VISIBLE));var n=!r.getDomElement().hasClass(r.prefixCss(t.CLASS_CEA608_PUSHUP_DISABLED));r.cea608Enabled&&r.ensureCea608GridSizeUpdated&&n&&r.getDomElement().waitForTransitionEnd("bottom").then(r.ensureCea608GridSizeUpdated)}}),this.configureCea608Captions(n,i),u(),this.updateCea608PushupFromPlayerHeight(new l.DOM(n.getContainer()).height())},t.prototype.updateCea608PushupFromPlayerHeight=function(e){this.cea608SmallPlayerHeightThreshold>0&&e<=this.cea608SmallPlayerHeightThreshold?this.getDomElement().addClass(this.prefixCss(t.CLASS_CEA608_PUSHUP_DISABLED)):this.getDomElement().removeClass(this.prefixCss(t.CLASS_CEA608_PUSHUP_DISABLED))},t.prototype.setFontSizeFactor=function(e){this.cea608FontSizeFactor=Math.max(.5,Math.min(2,e))},t.prototype.detectCroppedSubtitleLabel=function(e){var t=this.getDomElement().get(0),n=e.getBoundingClientRect(),i=t.getBoundingClientRect();return{top:n.top<i.top,right:n.right>i.right,bottom:n.bottom>i.bottom,left:n.left<i.left}},t.prototype.handleSubtitleCropping=function(e){var t=e.getDomElement(),n=this.detectCroppedSubtitleLabel(t.get(0));
1n.top&&(t.css("top","0"),t.removeCss("bottom")),n.right&&(t.css("right","0"),t.removeCss("left")),n.bottom&&(t.css("bottom","0"),t.removeCss("top")),n.left&&(t.css("left","0"),t.removeCss("right"))},t.prototype.generateLabel=function(e){var t,n=e.region,i=(null==(t=e.position)?void 0:t.row)||0;return v(e)&&(e.position.row=e.position.row||0,e.position.column=e.position.column||0,this.isCea608PositioningEnabled()&&(n=n||"cea608-row-".concat(e.position.row))),new p({text:e.html||h.generateImageTagText(e.image)||e.text,cssClasses:e.vtt&&!e.vtt.region?["subtitle-vtt-cue"]:[],vtt:e.vtt,region:n,regionStyle:e.regionStyle,originalRowPosition:i})},t.prototype.resolveFontSizeFactor=function(e){return parseInt(e)/100},t.prototype.configureCea608Captions=function(e,n){var i,r,o=this,s=0,a=0,u=0;this.cea608Enabled=!1;var l=!1,c={overlayWidth:0,overlayHeight:0,fontSizeFactor:0},d=n.getSubtitleSettingsManager();if(null!=d.fontSize.value){var h=this.resolveFontSizeFactor(d.fontSize.value);this.setFontSizeFactor(h)}d.fontSize.onChanged.subscribe(function(e,t){if(t.isSet()){var n=o.resolveFontSizeFactor(t.value);o.setFontSizeFactor(n)}else o.setFontSizeFactor(1);o.cea608Enabled&&o.ensureCea608GridSizeUpdated()}),null==(i=this.onShow)||i.subscribe(function(){o.cea608Enabled&&o.ensureCea608GridSizeUpdated()}),this.ensureCea608GridSizeUpdated=function(){var e=o.getDomElement(),n=e.width(),i=e.height(),l=n!==c.overlayWidth||i!==c.overlayHeight,d=o.cea608FontSizeFactor!==c.fontSizeFactor;if(l||d){c={overlayWidth:n,overlayHeight:i,fontSizeFactor:o.cea608FontSizeFactor};var h=new p({text:"X"});h.getDomElement().css({"font-size":"200px","line-height":"200px",visibility:"hidden"}),o.addComponent(h),o.updateComponents(),o.show();var f=h.getDomElement().width(),v=h.getDomElement().height(),y=f/v;o.removeComponent(h),o.updateComponents(),o.subtitleManager.hasCues||o.hide();var m=Math.floor((1-parseFloat(t.DEFAULT_CAPTION_LEFT_OFFSET)/100)*n)-10;if(m/i>f*t.CEA608_NUM_COLUMNS/(v*t.CEA608_NUM_ROWS)){var b=.8*(s=i/t.CEA608_NUM_ROWS)*.75;a=b*o.cea608FontSizeFactor,u=Math.max(m/t.CEA608_NUM_COLUMNS-a*y,0)}else{var b=.8*(s=m/t.CEA608_NUM_COLUMNS/y)*.75;a=b*o.cea608FontSizeFactor,u=0}r=.2*s,e.get().forEach(function(e){e.style.setProperty("--cea608-row-height","".concat(s,"px"))});for(var S=function(e){var t={"font-size":"".concat(a,"px"),"line-height":"".concat(s-r,"px")};o.isCea608FormattingEnabled()&&(t["letter-spacing"]="".concat(u,"px")),e.getDomElement().css(t),e.regionStyle="margin: ".concat(r/2,"px; height: ").concat(s,"px")},E=0,_=o.getComponents();E<_.length;E++){var T=_[E];T instanceof g&&(T.getDomElement().css({margin:"".concat(r/2,"px"),height:"".concat(s,"px")}),T.getComponents().forEach(function(e){S(e)})),T instanceof p&&S(T)}}},e.on(e.exports.PlayerEvent.PlayerResized,function(e){o.updateCea608PushupFromPlayerHeight(parseFloat(e.height)),o.cea608Enabled&&o.ensureCea608GridSizeUpdated()}),this.preprocessLabelEventCallback.subscribe(function(e,n){if(v(e))if(o.isCea608PositioningEnabled()){!o.cea608Enabled&&(o.cea608Enabled=!0,o.getDomElement().addClass(o.prefixCss(t.CLASS_CEA_608)),o.isCea608FormattingEnabled()&&o.getDomElement().addClass(o.prefixCss(t.CLASS_CEA_608_FORMATTING)));var i=e.position.column*t.CEA608_COLUMN_OFFSET+"%";"0%"===i&&(i=t.DEFAULT_CAPTION_LEFT_OFFSET);var c={left:i,"font-size":"".concat(a,"px"),"line-height":"".concat(s-r,"px")};o.isCea608FormattingEnabled()&&(c["letter-spacing"]="".concat(u,"px")),n.getDomElement().css(c),n.regionStyle="margin: ".concat(r/2,"px; height: ").concat(s,"px")}else o.isCea608FormattingEnabled()&&!l&&(l=!0,o.getDomElement().addClass(o.prefixCss(t.CLASS_CEA_608_FORMATTING)))});var f=function(){o.getDomElement().removeClass(o.prefixCss(t.CLASS_CEA_608)),o.getDomElement().removeClass(o.prefixCss(t.CLASS_CEA_608_FORMATTING)),o.cea608Enabled&&(c={overlayWidth:0,overlayHeight:0,fontSizeFactor:0}),o.cea608Enabled=!1,l=!1};e.on(e.exports.PlayerEvent.CueExit,function(){o.subtitleManager.hasCues||f()}),e.on(e.exports.PlayerEvent.SourceUnloaded,f),e.on(e.exports.PlayerEvent.SubtitleEnabled,f),e.on(e.exports.PlayerEvent.SubtitleDisabled,f)},t.prototype.enablePreviewSubtitleLabel=function(){this.subtitleManager.hasCues||(this.previewSubtitleActive=!0,this.subtitleContainerManager.addLabel(this.previewSubtitle),this.updateComponents(),this.show())},t.prototype.removePreviewSubtitleLabel=function(){this.previewSubtitleActive&&(this.previewSubtitleActive=!1,this.subtitleContainerManager.removeLabel(this.previewSubtitle),this.updateComponents())},t.prototype.isCea608FormattingEnabled=function(){var e;return(null==(e=this.config)?void 0:e.enableCea608CaptionFormatting)!==!1},t.prototype.isCea608PositioningEnabled=function(){var e;return(null==(e=this.config)?void 0:e.enableCea608CaptionPositioning)!==!1},t.CLASS_CONTROLBAR_VISIBLE="controlbar-visible",t.CLASS_CEA_608="cea608",t.CLASS_CEA608_PUSHUP_DISABLED="cea608-pushup-disabled",t.DEFAULT_CEA608_SMALL_PLAYER_HEIGHT_THRESHOLD=360,t.CLASS_CEA_608_FORMATTING="cea608-formatting",t.CEA608_NUM_ROWS=15,t.CEA608_NUM_COLUMNS=32,t.CEA608_COLUMN_OFFSET=100/t.CEA608_NUM_COLUMNS,t.DEFAULT_CAPTION_LEFT_OFFSET="0.5%",t}(o.Container);var p=function(e){function t(t){void 0===t&&(t={});var n=e.call(this,t)||this;return n.config=n.mergeConfig(t,{cssClass:"ui-subtitle-label"},n.config),n}return r(t,e),Object.defineProperty(t.prototype,"vtt",{get:function(){return this.config.vtt}
vendor: 4,187 bytes, line 1
1,enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"region",{get:function(){return this.config.region},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"regionStyle",{get:function(){return this.config.regionStyle},set:function(e){this.config.regionStyle=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"originalRowPosition",{get:function(){return this.config.originalRowPosition},set:function(e){this.config.originalRowPosition=e},enumerable:!1,configurable:!0}),t}(s.Label);t.SubtitleLabel=p;var h=function(){function e(){this.activeSubtitleCueMap={},this.activeSubtitleCueCount=0}return e.calculateId=function(e){var t=e.start+"-"+e.text;return e.position&&(t+="-"+e.position.row+"-"+e.position.column),t},e.prototype.cueEnter=function(e,t){this.addCueToMap(e,t)},e.prototype.cueUpdate=function(e,t){var n=this.popCueFromMap(e);if(n)return this.addCueToMap(e,t),n},e.prototype.addCueToMap=function(t,n){var i=e.calculateId(t);this.activeSubtitleCueMap[i]=this.activeSubtitleCueMap[i]||[],this.activeSubtitleCueMap[i].push({event:t,label:n}),this.activeSubtitleCueCount++},e.prototype.popCueFromMap=function(t){var n=e.calculateId(t),i=this.activeSubtitleCueMap[n];if(i&&i.length>0){var r=i.shift();return this.activeSubtitleCueCount--,r.label}},e.prototype.clearInactiveCues=function(e){var t=this,n=[];return Object.keys(this.activeSubtitleCueMap).forEach(function(i){t.activeSubtitleCueMap[i].forEach(function(i){(e<i.event.start||e>i.event.end)&&(t.popCueFromMap(i.event),n.push(i))})}),n},e.generateImageTagText=function(e){if(e){var t=new l.DOM("img",{src:e});return t.css("width","100%"),t.get(0).outerHTML}},e.prototype.getCues=function(t){var n=e.calculateId(t),i=this.activeSubtitleCueMap[n];if(i&&i.length>0)return i.map(function(e){return e.label})},e.prototype.cueExit=function(e){return this.popCueFromMap(e)},Object.defineProperty(e.prototype,"cueCount",{get:function(){return this.activeSubtitleCueCount},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"hasCues",{get:function(){return this.cueCount>0},enumerable:!1,configurable:!0}),e.prototype.clear=function(){this.activeSubtitleCueMap={},this.activeSubtitleCueCount=0},e}(),f=function(){function e(e){this.subtitleOverlay=e,this.subtitleRegionContainers={},this.subtitleOverlay=e}return e.prototype.getRegion=function(e){return e.vtt?{regionContainerId:e.vtt.region&&e.vtt.region.id?e.vtt.region.id:"vtt",regionName:"vtt"}:{regionContainerId:e.region||"default",regionName:e.region||"default"}},e.prototype.addLabel=function(e,t){var n=this.getRegion(e),i=n.regionContainerId,r=n.regionName,o=["subtitle-position-".concat(r)];if(e.vtt&&e.vtt.region?(o.push("subtitle-vtt-region-container"),o.push("vtt-region-".concat(e.vtt.region.id))):e.vtt&&o.push("subtitle-vtt-cue-container"),!this.subtitleRegionContainers[i]){var s=new g({cssClasses:o});for(var a in this.subtitleRegionContainers[i]=s,e.regionStyle&&s.getDomElement().attr("style",e.regionStyle),e.vtt&&s.getDomElement().css("position","static"),s.getDomElement(),this.subtitleRegionContainers)this.subtitleOverlay.addComponent(this.subtitleRegionContainers[a])}this.subtitleRegionContainers[i].addLabel(e,t)},e.prototype.replaceLabel=function(e,t,n){var i=this.getRegion(e),r=this.getRegion(t);if(i.regionContainerId===r.regionContainerId){var o=this.subtitleRegionContainers[i.regionContainerId];o.removeLabel(e),o.addLabel(t,n);return}this.removeLabel(e),this.addLabel(t,n)},e.prototype.removeLabel=function(e){var t;t=e.vtt?e.vtt.region&&e.vtt.region.id?e.vtt.region.id:"vtt":e.region||"default",this.subtitleRegionContainers[t].removeLabel(e),this.subtitleRegionContainers[t].isEmpty()&&(this.subtitleOverlay.removeComponent(this.subtitleRegionContainers[t]),delete this.subtitleRegionContainers[t])},e.prototype.clear=function(){for(var e in this.subtitleRegionContainers)this.subtitleOverlay.removeComponent(this.subtitleRegionContainers[e]);this.subtitleRegionContainers={}},e}();t.SubtitleRegionContainerManager=f;var g=function(e){function t(t){void 0===t&&(t={});var n=e.call(this,t)||this;return n.labelCount=0,n.config=n.mergeConfig(t,{cssClass:"subtitle-region-container"}
1,n.config),n}return r(t,e),t.prototype.addLabel=function(e,t){this.labelCount++,e.vtt&&(e.vtt.region&&t&&d.VttUtils.setVttRegionStyles(this,e.vtt.region,t),d.VttUtils.setVttCueBoxStyles(e,t)),this.addComponent(e),this.updateComponents()},t.prototype.removeLabel=function(e){this.labelCount--,this.removeComponent(e),this.updateComponents()},t.prototype.isEmpty=function(){return 0===this.labelCount},t}(o.Container);function v(e){return null!=e.position}t.SubtitleRegionContainer=g},54852:function(e,t,n){"use strict";var i,r=this&&this.__extends||(i=function(e,t){return(i=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])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.SmallCenteredPlaybackToggleButton=void 0;var o=n(51555),s=n(24379);t.SmallCenteredPlaybackToggleButton=function(e){function t(t){void 0===t&&(t={});var n=e.call(this,t)||this;return n.config=n.mergeConfig(t,{cssClass:"ui-smallcenteredplaybacktogglebutton",text:s.i18n.getLocalizer("playPause"),role:"button"},n.config),n}return r(t,e),t.prototype.configure=function(t,n){var i,r=this;e.prototype.configure.call(this,t,n,!1),"boolean"==typeof n.getConfig().enterFullscreenOnInitialPlayback&&(this.config.enterFullscreenOnInitialPlayback=n.getConfig().enterFullscreenOnInitialPlayback);var o=function(){t.isPlaying()||r.isPlayInitiated?t.pause("ui"):t.play("ui")},s=!0;this.onClick.subscribe(function(){o(),s&&r.config.enterFullscreenOnInitialPlayback&&t.setViewMode(t.exports.ViewMode.Fullscreen)}),t.on(t.exports.PlayerEvent.Playing,function(){s=!1});var a=function(){r.setTransitionAnimationsEnabled(!1),r.onToggle.subscribeOnce(function(){r.setTransitionAnimationsEnabled(!0)})};a();var u=!!(null==(i=t.getConfig().playback)?void 0:i.autoplay),l=!t.getSource()&&u;(t.isPlaying()||l)&&(this.on(),a(),t.on(t.exports.PlayerEvent.Warning,function(e){e.code===t.exports.WarningCode.PLAYBACK_COULD_NOT_BE_STARTED&&a()}))},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}(o.PlaybackToggleButton)},54953:function(e,t,n){"use strict";var i,r,o,s=this&&this.__extends||(r=function(e,t){return(r=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])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.MetadataLabel=t.MetadataLabelContent=void 0;var a=n(30194);(i=o||(t.MetadataLabelContent=o={}))[i.Title=0]="Title",i[i.Description=1]="Description",t.MetadataLabel=function(e){function t(t){var n=e.call(this,t)||this;return n.config=n.mergeConfig(t,{cssClasses:["label-metadata","label-metadata-"+o[t.content].toLowerCase()]},n.config),n}return s(t,e),t.prototype.configure=function(t,n){var i=this;e.prototype.configure.call(this,t,n);var r=this.getConfig(),s=n.getConfig(),a=function(){switch(r.content){case o.Title:i.setText(s.metadata.title);break;case o.Description:i.setText(s.metadata.description)}};a(),t.on(t.exports.PlayerEvent.SourceUnloaded,function(){i.setText(null)}),n.getConfig().events.onUpdated.subscribe(a)},t}(a.Label)},54959:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UIUtils=void 0;var i,r,o,s=n(8675);(i=o||(t.UIUtils=o={})).traverseTree=function(e,t){var n=function(e,i){if(t(e,i),e instanceof s.Container)for(var r=0,o=e.getComponents();r<o.length;r++)n(o[r],e)};n(e)},(r=i.KeyCode||(i.KeyCode={}))[r.LeftArrow=37]="LeftArrow",r[r.UpArrow=38]="UpArrow",r[r.RightArrow=39]="RightArrow",r[r.DownArrow=40]="DownArrow",r[r.Space=32]="Space",r[r.End=35]="End",r[r.Home=36]="Home",r[r.Comma=188]="Comma",r[r.Period=190]="Period"},55358:(e,t,n)=>{"use strict";
1Object.defineProperty(t,"__esModule",{value:!0}),t.isSettingsPanel=function(e){return e instanceof r.SettingsPanel},t.isComponent=function(e){return null!=e&&e instanceof i.Component},t.isContainer=function(e){return null!=e&&e instanceof o.Container},t.isDirection=function(e){return"string"==typeof e&&Object.values(s.Direction).includes(e)},t.isAction=function(e){return"string"==typeof e&&Object.values(s.Action).includes(e)},t.isFocusable=function(e){return e instanceof a.FocusableContainer||e.isShown()&&e.getConfig().tabIndex>=0};var i=n(86051),r=n(52023),o=n(8675),s=n(90753),a=n(49015)},56211:function(e,t,n){"use strict";var i,r=this&&this.__extends||(i=function(e,t){return(i=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])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.TitleBar=void 0;var o=n(8675),s=n(54953),a=n(30194);t.TitleBar=function(e){function t(t){void 0===t&&(t={});var n=e.call(this,t)||this;return n.config=n.mergeConfig(t,{cssClass:"ui-titlebar",hidden:!0,keepHiddenWithoutMetadata:!1,components:[new o.Container({components:[new s.MetadataLabel({content:s.MetadataLabelContent.Title})],cssClasses:["titlebar-row"]}),new o.Container({components:[new s.MetadataLabel({content:s.MetadataLabelContent.Description})],cssClasses:["titlebar-row"]})]},n.config),n}return r(t,e),t.prototype.configure=function(t,n){var i=this;e.prototype.configure.call(this,t,n);var r=this.getConfig(),o=!this.isHidden(),s=!0,a=function(){s=i.hasNonEmptyComponents(i.getComponents()),i.isShown()?r.keepHiddenWithoutMetadata&&!s&&i.hide():o&&(!r.keepHiddenWithoutMetadata||s)&&i.show()};this.subscribeToTextChanges(this.getComponents(),a),n.onControlsShow.subscribe(function(){o=!0,(!r.keepHiddenWithoutMetadata||s)&&i.show()}),n.onControlsHide.subscribe(function(){o=!1,i.hide()}),a()},t.prototype.hasNonEmptyComponents=function(e){for(var t=0;t<e.length;t++){var n,i=e[t];if("object"==typeof(n=i)&&null!==n&&"function"==typeof n.isEmpty&&!i.isEmpty()||i instanceof o.Container&&this.hasNonEmptyComponents(i.getComponents()))return!0}return!1},t.prototype.subscribeToTextChanges=function(e,t){for(var n=0;n<e.length;n++){var i=e[n];i instanceof a.Label&&i.onTextChanged.subscribe(t),i instanceof o.Container&&this.subscribeToTextChanges(i.getComponents(),t)}},t}(o.Container)},56558:function(e,t,n){"use strict";var i,r=this&&this.__extends||(i=function(e,t){return(i=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])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.BackgroundOpacitySelectBox=void 0;var o=n(72177),s=n(24379);t.BackgroundOpacitySelectBox=function(e){function t(t){var n=e.call(this,t)||this;return n.config=n.mergeConfig(t,{cssClasses:["ui-subtitlesettingsbackgroundopacityselectbox"]},n.config),n}return r(t,e),t.prototype.configure=function(t,n){var i=this;e.prototype.configure.call(this,t,n),this.addItem(null,s.i18n.getLocalizer("default")),this.addItem("100",s.i18n.getLocalizer("percent",{value:100})),this.addItem("75",s.i18n.getLocalizer("percent",{value:75})),this.addItem("50",s.i18n.getLocalizer("percent",{value:50})),this.addItem("25",s.i18n.getLocalizer("percent",{value:25})),this.addItem("0",s.i18n.getLocalizer("percent",{value:0})),this.onItemSelectionChanged.subscribe(function(e,t){i.settingsManager.backgroundOpacity.value=t,i.settingsManager.backgroundOpacity.isSet()?i.settingsManager.backgroundColor.isSet()||(i.settingsManager.backgroundColor.value="black"):i.settingsManager.backgroundColor.clear()}),this.settingsManager.backgroundOpacity.onChanged.subscribe(function(e,t){i.selectItem(t.value)}),this.initFromSettings()},t.prototype.initFromSettings=function(){this.settingsManager.backgroundOpacity.isSet()&&this.selectItem(this.settingsManager.backgroundOpacity.value)},t}(o.SubtitleSettingSelectBox)},57221:function(e,t,n){"use strict";
1var i,r=this&&this.__extends||(i=function(e,t){return(i=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])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.AdSkipButton=void 0;var o=n(94474),s=n(27717),a=n(24379);t.AdSkipButton=function(e){function t(t){void 0===t&&(t={});var n=e.call(this,t)||this;return n.skipOffset=-1,n.config=n.mergeConfig(t,{cssClass:"ui-button-ad-skip",untilSkippableMessage:a.i18n.getLocalizer("ads.skippableIn"),skippableMessage:a.i18n.getLocalizer("ads.skip"),acceptsTouchWithUiHidden:!0,buttonStyle:o.ButtonStyle.TextWithTrailingIcon},n.config),n}return r(t,e),t.prototype.configure=function(t,n){var i=this;e.prototype.configure.call(this,t,n),this.player=t;var r=this.getConfig();this.untilSkippableMessage=r.untilSkippableMessage,this.skippableMessage=r.skippableMessage,this.skipOffset=-1,this.updateSkipMessageHandler=function(){i.show(),t.getCurrentTime()<i.skipOffset?(i.setText(s.StringUtils.replaceAdMessagePlaceholders(a.i18n.performLocalization(i.untilSkippableMessage),t,i.skipOffset)),i.disable()):(i.setText(s.StringUtils.replaceAdMessagePlaceholders(a.i18n.performLocalization(i.skippableMessage),t)),i.enable())};var o=function(){i.updateSkipMessageHandler&&t.off(t.exports.PlayerEvent.TimeChanged,i.updateSkipMessageHandler)};t.on(t.exports.PlayerEvent.AdStarted,function(e){var n=e.ad;i.skipOffset=n.skippableAfter,i.untilSkippableMessage=n.uiConfig&&n.uiConfig.untilSkippableMessage||r.untilSkippableMessage,i.skippableMessage=n.uiConfig&&n.uiConfig.skippableMessage||r.skippableMessage,"number"==typeof i.skipOffset&&i.skipOffset>=0?(i.updateSkipMessageHandler(),t.on(t.exports.PlayerEvent.TimeChanged,i.updateSkipMessageHandler)):i.hide()}),t.on(t.exports.PlayerEvent.AdSkipped,o),t.on(t.exports.PlayerEvent.AdError,o),t.on(t.exports.PlayerEvent.AdFinished,o),this.onClick.subscribe(function(){t.ads.skip()})},t.prototype.onLanguageChanged=function(){this.updateSkipMessageHandler&&"number"==typeof this.skipOffset&&this.skipOffset>=0&&this.updateSkipMessageHandler()},t.prototype.release=function(){this.player&&this.updateSkipMessageHandler&&this.player.off(this.player.exports.PlayerEvent.TimeChanged,this.updateSkipMessageHandler),e.prototype.release.call(this)},t}(o.Button)},57279:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ResumePositionTracker=void 0;var i=n(53135),r=n(6635),o="".concat((0,r.prefixCss)("resume"),".");function s(e){var t,n,i=(t=e)?t.title?"title:"+t.title:t.dash?"dash:"+t.dash:t.hls?"hls:"+t.hls:t.smooth?"smooth:"+t.smooth:"string"==typeof t.progressive?"progressive:"+t.progressive:Array.isArray(t.progressive)&&(null==(n=t.progressive[0])?void 0:n.url)?"progressive:"+t.progressive[0].url:null:null;return i?o+function(e){for(var t=0,n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n)|0;return(t>>>0).toString(36)}(i):null}t.ResumePositionTracker=function(){function e(e){var t=this;this.player=e,this.activeSourceKey=null,this.lastPosition=null,this.updatePosition=function(e){var n,i;(null==(i=null==(n=t.player.ads)?void 0:n.isLinearAdActive)?void 0:i.call(n))!==!0&&isFinite(e.time)&&(t.lastPosition=e.time)},this.savePosition=function(e){if(t.activeSourceKey&&null!==e){if(!isFinite(e)||e<5)return void i.StorageUtils.removeItem(t.activeSourceKey);i.StorageUtils.setItem(t.activeSourceKey,String(e))}},this.pausePositionTracking=function(){if((null==(n=null==(e=t.player.ads)?void 0:e.isLinearAdActive)?void 0:n.call(e))!==!0){var e,n,i=t.player.getCurrentTime();isFinite(i)&&(t.lastPosition=i),t.savePosition(t.lastPosition)}},this.storeCurrentPosition=function(){t.savePosition(t.lastPosition)},this.storeCurrentPositionWhenHidden=function(){"hidden"===document.visibilityState&&t.storeCurrentPosition()},this.startPositionTracking=function(){if(t.stopPositionTracking(),t.activeSourceKey=null,t.lastPosition=null,!t.player.isLive()){var e=s(t.player.getSource());e&&(t.activeSourceKey=e,t.player.on(t.player.exports.PlayerEvent.TimeChanged,t.updatePosition),t.player.on(t.player.exports.PlayerEvent.Paused,t.pausePositionTracking),t.player.on(t.player.exports.PlayerEvent.PlaybackFinished,t.finishPositionTracking),document.addEventListener("visibilitychange",t.storeCurrentPositionWhenHidden))}},this.restartPositionTracking=function(){t.activeSourceKey||null===t.player.getSource()||t.startPositionTracking()},this.unloadSource=function(){t.savePosition(t.lastPosition),t.stopPositionTracking(),t.activeSourceKey=null,t.lastPosition=null},this.finishPositionTracking=function(){t.activeSourceKey&&i.StorageUtils.removeItem(t.activeSourceKey),t.stopPositionTracking(),t.activeSourceKey=null,t.lastPosition=null},e.on(e.exports.PlayerEvent.SourceLoaded,this.startPositionTracking),e.on(e.exports.PlayerEvent.SourceUnloaded,this.unloadSource),e.on(e.exports.PlayerEvent.Play,this.restartPositionTracking),null!==e.getSource()&&this.startPositionTracking()}return e.prototype.release=function(){this.storeCurrentPosition(),document.removeEventListener("visibilitychange",this.storeCurrentPositionWhenHidden),this.activeSourceKey=null,this.lastPosition=null},e.prototype.getStoredPosition=function(){if(this.player.isLive())return null;var e=s(this.player.getSource());if(!e)return null;var t=Number(i.StorageUtils.getItem(e));return isFinite(t)&&t>=5?t:null},e.prototype.stopPositionTracking=function(){this.player.off(this.player.exports.PlayerEvent.TimeChanged,this.updatePosition),this.player.off(this.player.exports.PlayerEvent.Paused,this.pausePositionTracking),this.player.off(this.player.exports.PlayerEvent.PlaybackFinished,this.finishPositionTracking),document.removeEventListener("visibilitychange",this.storeCurrentPositionWhenHidden)},e}()},57640:function(e,t,n){"use strict";
1var i,r=this&&this.__extends||(i=function(e,t){return(i=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])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.SettingsPanelPage=void 0;var o=n(8675),s=n(21616),a=n(85704),u=n(2652),l=n(78196);t.SettingsPanelPage=function(e){function t(t){var n=e.call(this,t)||this;return n.settingsPanelPageEvents={onSettingsStateChanged:new a.EventDispatcher,onActive:new a.EventDispatcher,onInactive:new a.EventDispatcher},n.config=n.mergeConfig(t,{cssClass:"ui-settings-panel-page",role:"menu",removeOnPop:!1},n.config),n}return r(t,e),t.prototype.configure=function(n,i){var r=this;e.prototype.configure.call(this,n,i);for(var o=function(){r.onSettingsStateChangedEvent();for(var e=null,n=0,i=r.getItems();n<i.length;n++){var o=i[n];o.getDomElement().removeClass(r.prefixCss(t.CLASS_LAST)),o.isShown()&&(e=o)}e&&e.getDomElement().addClass(r.prefixCss(t.CLASS_LAST))},s=0,a=this.getItems();s<a.length;s++)a[s].onActiveChanged.subscribe(o)},t.prototype.hasActiveSettings=function(){for(var e=0,t=this.getItems();e<t.length;e++){var n=t[e];if(n.getConfig().isSetting&&n.isActive())return!0}return!1},t.prototype.getItems=function(){return this.config.components.filter(function(e){return e instanceof s.SettingsPanelItem})},t.prototype.onSettingsStateChangedEvent=function(){this.settingsPanelPageEvents.onSettingsStateChanged.dispatch(this)},Object.defineProperty(t.prototype,"onSettingsStateChanged",{get:function(){return this.settingsPanelPageEvents.onSettingsStateChanged.getEvent()},enumerable:!1,configurable:!0}),t.prototype.onActiveEvent=function(){var e=this.getItems().filter(function(e){return e.isActive()&&e.getConfig().isSetting});this.settingsPanelPageEvents.onActive.dispatch(this),!(e.length>0)||u.BrowserUtils.isIOS||u.BrowserUtils.isMacIntel&&u.BrowserUtils.isTouchSupported||(e[0]instanceof l.InteractiveSettingsPanelItem?e[0].getDomElement().get(0).focus():e[0].getDomElement().focusToFirstInput())},Object.defineProperty(t.prototype,"onActive",{get:function(){return this.settingsPanelPageEvents.onActive.getEvent()},enumerable:!1,configurable:!0}),t.prototype.onInactiveEvent=function(){this.settingsPanelPageEvents.onInactive.dispatch(this)},Object.defineProperty(t.prototype,"onInactive",{get:function(){return this.settingsPanelPageEvents.onInactive.getEvent()},enumerable:!1,configurable:!0}),t.prototype.addSettingsPanelItem=function(e){this.addComponent(e),this.updateComponents()},t.prototype.removeSettingsPanelItem=function(e){this.removeComponent(e),this.updateComponents()},t.CLASS_LAST="last",t}(o.Container)},58038:function(e,t,n){"use strict";var i,r=this&&this.__extends||(i=function(e,t){return(i=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])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.SettingsPanelSeparator=void 0,t.SettingsPanelSeparator=function(e){function t(t){void 0===t&&(t={});var n=e.call(this,t)||this;return n.config=n.mergeConfig(t,{cssClass:"ui-settings-panel-separator",role:"separator"},n.config),n}return r(t,e),t}(n(8675).Container)},58089:e=>{"use strict";e.exports=JSON.parse('{"settings.video.quality":"Videokwaliteit","settings.audio.quality":"Audiokwaliteit","settings.audio.track":"Audiospoor","settings.audio.mute":"Dempen","settings.audio.volume":"Volume","settings.subtitles.window.color":"Vensterkleur","settings.subtitles.window.opacity":"Venster doorzichtigheid","settings.subtitles":"Ondertiteling","settings.subtitles.font.color":"Lettertype kleur","settings.subtitles.font.opacity":"Lettertype doorzichtigheid","settings.subtitles.background.color":"Achtergrondkleur","settings.subtitles.background.opacity":"Achtergrond doorzichtigheid","settings.subtitles.options":"Opties","playerInsights.show":"Player Insights tonen","playerInsights.hide":"Player Insights verbergen","colors.white":"wit","colors.black":"zwart","colors.red":"rood","colors.green":"groen","colors.blue":"blauw","colors.cyan":"cyaan","colors.yellow":"geel","colors.magenta":"magenta","percent":"{value}%","settings.subtitles.font.size":"Lettertype grootte","settings.subtitles.font.style":"Letterstijl","settings.subtitles.font.style.bold":"vet","settings.subtitles.font.style.italic":"cursief","settings.subtitles.characterEdge":"Lettertype rand","settings.subtitles.characterEdge.raised":"verhoogd","settings.subtitles.characterEdge.depressed":"verlaagd","settings.subtitles.characterEdge.uniform":"uniform","settings.subtitles.characterEdge.dropshadowed":"schaduw","settings.subtitles.characterEdge.color":"Letterrandkleur","settings.subtitles.font.family":"Standaard lettertype","settings.subtitles.font.family.monospacedserif":"monospace serif","settings.subtitles.font.family.proportionalserif":"proportioneel serif","settings.subtitles.font.family.monospacedsansserif":"monospace sans-serif","settings.subtitles.font.family.proportionalsansserif":"proportioneel sans-serif","settings.subtitles.font.family.casual":"casual","settings.subtitles.font.family.cursive":"cursief","settings.subtitles.font.family.smallcapital":"kleine hoofdletters","settings.time.hours":"Uren","settings.time.minutes":"Minuten","settings.time.seconds":"Seconden","ads.remainingTime":"Deze advertentie eindigt in {remainingTime}
1 seconden.","ads.skip":"Overslaan","ads.skippableIn":"Advertentie overslaan over {remainingTime}","ads.adNumberOfTotal":"Advertentie {activeAdIndex} van {totalAdsCount}","ad":"Advertentie","settings":"Instellingen","fullscreen":"Volledig scherm","speed":"Snelheid","playPause":"Afspelen/Pauzeren","play":"Afspelen","pause":"Pauzeren","open":"Openen","close":"Sluiten","pictureInPicture":"Picture-in-Picture","appleAirplay":"Apple AirPlay","googleCast":"Google Cast","vr":"VR","off":"uit","auto":"automatisch","ecoMode":"Eco-modus","ecoMode.title":"Eco-modus","persistentPreferences":"Voorkeuren onthouden","back":"Terug","reset":"Reset","replay":"Opnieuw afspelen","normal":"normaal","default":"standaard","live":"Live","live.jumpToLiveEdge":"{liveLabel}, naar live springen","subtitle.example":"voorbeeld ondertiteling","subtitle.select":"Selecteer ondertiteling","playingOn":"Speelt af op <strong>{castDeviceName}</strong>","connectingTo":"Verbinden met <strong>{castDeviceName}</strong>...","watermarkLink":"Link naar homepage","controlBar":"Videospeler bediening","player":"Videospeler","seekBar":"Video tijdlijn","seekBar.value":"Waarde","seekBar.timeshift":"Tijdverschuiving","seekBar.durationText":"van","quickseek.forward":"{seekSeconds} seconden vooruitspoelen","quickseek.rewind":"{seekSeconds} seconden terugspoelen","contextMenu.title":"Bitmovin Player","contextMenu.subtitle":"Adaptive streaming voor het web","contextMenu.copyTimestampLink":"Link naar huidig tijdstip kopi\xebren","captions.enable":"Ondertiteling aanzetten","captions.disable":"Ondertiteling uitzetten"}')},58597:function(e,t,n){"use strict";var i,r=this&&this.__extends||(i=function(e,t){return(i=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])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.ItemSelectionList=void 0;var o=n(567),s=n(4437),a=n(24379);t.ItemSelectionList=function(e){function t(t){void 0===t&&(t={});var n=e.call(this,t)||this;return n.config=n.mergeConfig(t,{tag:"ul",cssClass:"ui-itemselectionlist"},n.config),n}return r(t,e),t.prototype.isActive=function(){return this.items.length>1},t.prototype.toDomElement=function(){var e=new s.DOM("ul",{id:this.config.id,class:this.getCssClasses()},this);return this.listElement=e,this.updateDomItems(),e},t.prototype.updateDomItems=function(e){var n=this;void 0===e&&(e=null),this.listElement.empty();for(var i=null,r=function(e){e.addClass(n.prefixCss(t.CLASS_SELECTED))},o=function(e){e.removeClass(n.prefixCss(t.CLASS_SELECTED))},u=function(t){var u=new s.DOM("li",{type:"li",class:l.prefixCss("ui-selectionlistitem")}).append(new s.DOM("a",{}).html(a.i18n.performLocalization(t.label)));i||(null==e?i=u:String(e)===t.key&&(i=u)),u.on("click",function(){i&&o(i),i=u,r(u),n.onItemSelectedEvent(t.key,!1)}),i&&r(i),l.listElement.append(u)},l=this,c=0,d=this.items;c<d.length;c++)u(d[c])},t.prototype.onItemsChangedEvent=function(){e.prototype.onItemsChangedEvent.call(this),this.updateDomItems(this.selectedItem)},t.prototype.onItemSelectedEvent=function(t,n){void 0===n&&(n=!0),e.prototype.onItemSelectedEvent.call(this,t),n&&this.updateDomItems(t)},t.CLASS_SELECTED="selected",t}(o.ListSelector)},58822:e=>{!function(){"use strict";self,e.exports=(self.webpackChunkbitmovin_player=self.webpackChunkbitmovin_player||[]).push([[283],{70600:function(e,t){var n,i=this&&this.__extends||(n=function(e,t){return(n=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])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)});
1Object.defineProperty(t,"__esModule",{value:!0}),t.AssetListError=void 0,t.isAssetListError=function(e){return e instanceof Error&&"number"==typeof e.sgaiErrorCode},t.AssetListError=function(e){function t(t,n){var i=e.call(this,n)||this;return i.sgaiErrorCode=t,i.message=null!=n?n:"",i}return i(t,e),t}(Error)},41906:function(e,t,n){var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))(function(r,o){function s(e){try{u(i.next(e))}catch(e){o(e)}}function a(e){try{u(i.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?r(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(s,a)}u((i=i.apply(e,t||[])).next())})},r=this&&this.__generator||function(e,t){var n,i,r,o={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(u){var l=[a,u];if(n)throw TypeError("Generator is already executing.");for(;s&&(s=0,l[0]&&(o=0)),o;)try{if(n=1,i&&(r=2&l[0]?i.return:l[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,l[1])).done)return r;switch(i=0,r&&(l=[2&l[0],r.value]),l[0]){case 0:case 1:r=l;break;case 4:return o.label++,{value:l[1],done:!1};case 5:o.label++,i=l[1],l=[0];continue;case 7:l=o.ops.pop(),o.trys.pop();continue;default:if(!((r=(r=o.trys).length>0&&r[r.length-1])||6!==l[0]&&2!==l[0])){o=0;continue}if(3===l[0]&&(!r||l[1]>r[0]&&l[1]<r[3])){o.label=l[1];break}if(6===l[0]&&o.label<r[1]){o.label=r[1],r=l;break}if(r&&o.label<r[2]){o.label=r[2],o.ops.push(l);break}r[2]&&o.ops.pop(),o.trys.pop();continue}l=t.call(e,o)}catch(e){l=[6,e],i=0}finally{n=r=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}};Object.defineProperty(t,"__esModule",{value:!0}),t.HlsAssetListLoader=void 0;var o=n(20213),s=n(4129),a=n(77401),u=n(70600),l=n(6505),c=n(10619);t.HlsAssetListLoader=function(){function e(e){this.H4=new s.DefaultContentLoader(e,{maxRetries:e.settings.MAX_RETRIES,retryDelay:e.settings.RETRY_DELAY,requestType:o.HttpRequestType.HLS_INTERSTITIALS_ASSET_LIST})}return e.prototype.load=function(e){return i(this,void 0,void 0,function(){var t;return r(this,function(n){switch(n.label){case 0:this.I4=e,t=this.K4(e),this.J4=t,n.label=1;case 1:return n.trys.push([1,,3,4]),[4,t];case 2:return[2,n.sent()];case 3:return this.J4===t&&(this.J4=void 0,this.I4=void 0),[7];case 4:return[2]}})})},e.prototype.K4=function(e){return i(this,void 0,void 0,function(){var t;return r(this,function(n){switch(n.label){case 0:return[4,this.L4(e)];case 1:return null===(t=n.sent())?[2,{assets:[]}]:[2,function(e,t){var n,i;try{i=JSON.parse(t)}catch(t){throw new u.AssetListError(c.SgaiErrorCode.INTERSTITIAL_ASSET_LIST_INVALID,"Invalid asset list from ".concat(e,": malformed JSON (").concat(null!=(n=null==t?void 0:t.message)?n:"unknown reason",")"))}if(!i||!Array.isArray(i.ASSETS))throw new u.AssetListError(c.SgaiErrorCode.INTERSTITIAL_ASSET_LIST_INVALID,"Invalid asset list from ".concat(e,": missing or invalid ASSETS array"));return{assets:i.ASSETS.map(function(e){return{uri:e.URI,duration:e.DURATION,customAttributes:(0,l.extractUnknownAttributes)(e,["URI","DURATION"])}}),customAttributes:(0,l.extractUnknownAttributes)(i,["ASSETS"])}}(e,t)]}})})},e.prototype.L4=function(e){return i(this,void 0,void 0,function(){var t,n,i,o;return r(this,function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,this.H4.load(e)];case 1:return t=r.sent(),[3,3];case 2:if((null==(n=r.sent())?void 0:n.message)===a.RequestError.Canceled)throw n;throw new u.AssetListError(c.SgaiErrorCode.INTERSTITIAL_ASSET_LIST_LOAD_FAILED,"Failed to load asset list from ".concat(e,": ").concat(function(e){var t;if("number"==typeof(null==e?void 0:e.status)){var n=e.statusText?" ".concat(e.statusText):"";return"HTTP ".concat(e.status).concat(n)}return null!=(t=null==e?void 0:e.message)?t:"network or HTTP error"}(n)));case 3:if(null==(i=t.body))return[2,null];
1if("string"!=typeof i)throw new u.AssetListError(c.SgaiErrorCode.INTERSTITIAL_ASSET_LIST_INVALID,"Invalid asset list from ".concat(e,": unexpected response body of type ").concat(typeof i));return[2,(o=i.trim()).length>0?o:null]}})})},e.prototype.isLoading=function(){return void 0!==this.J4||this.H4.isLoading()},e.prototype.getCurrentLoadingUrl=function(){return this.I4},e.prototype.getCurrentLoadingPromise=function(){return this.J4},e.prototype.cancel=function(){this.H4.cancel(),this.I4=void 0},e.prototype.dispose=function(){this.J4=void 0,this.I4=void 0,this.H4.dispose()},e}()},57562:function(e,t,n){var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))(function(r,o){function s(e){try{u(i.next(e))}catch(e){o(e)}}function a(e){try{u(i.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?r(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(s,a)}u((i=i.apply(e,t||[])).next())})},r=this&&this.__generator||function(e,t){var n,i,r,o={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(u){var l=[a,u];if(n)throw TypeError("Generator is already executing.");for(;s&&(s=0,l[0]&&(o=0)),o;)try{if(n=1,i&&(r=2&l[0]?i.return:l[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,l[1])).done)return r;switch(i=0,r&&(l=[2&l[0],r.value]),l[0]){case 0:case 1:r=l;break;case 4:return o.label++,{value:l[1],done:!1};case 5:o.label++,i=l[1],l=[0];continue;case 7:l=o.ops.pop(),o.trys.pop();continue;default:if(!((r=(r=o.trys).length>0&&r[r.length-1])||6!==l[0]&&2!==l[0])){o=0;continue}if(3===l[0]&&(!r||l[1]>r[0]&&l[1]<r[3])){o.label=l[1];break}if(6===l[0]&&o.label<r[1]){o.label=r[1],r=l;break}if(r&&o.label<r[2]){o.label=r[2],o.ops.push(l);break}r[2]&&o.ops.pop(),o.trys.pop();continue}l=t.call(e,o)}catch(e){l=[6,e],i=0}finally{n=r=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}};Object.defineProperty(t,"__esModule",{value:!0}),t.HlsAssetLoader=void 0;var o=n(80813),s=n(20213),a=n(4129);t.HlsAssetLoader=function(){function e(e){this.context=e,this.M4=new a.DefaultContentLoader(e,{maxRetries:e.settings.MAX_MPD_RETRIES,retryDelay:e.settings.MPD_RETRY_DELAY,requestType:s.HttpRequestType.MANIFEST_HLS_MASTER})}return e.prototype.load=function(e){return i(this,void 0,void 0,function(){var t,n;return r(this,function(i){switch(i.label){case 0:return(t=this.context.serviceManager.maybeCall(o.ServiceName.ManifestCachingService,function(t){return t.getHttpResponse(e)}))?[2,t]:[4,this.M4.load(e)];case 1:return n=i.sent(),this.context.serviceManager.maybeCall(o.ServiceName.ManifestCachingService,function(t){return t.cacheHttpResponse(n,e)}),[2,n]}})})},e.prototype.isLoading=function(){return this.M4.isLoading()},e.prototype.dispose=function(){this.M4.dispose()},e}()},62843:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.HlsInterstitialCustomAttributesMappingRegistry=void 0,t.HlsInterstitialCustomAttributesMappingRegistry=function(){function e(e){this.trackingRegistry=e}return Object.defineProperty(e.prototype,"tracking",{get:function(){return this.trackingRegistry},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"clickThroughUrl",{get:function(){return this.afb},set:function(e){this.afb=e},enumerable:!1,configurable:!0}),e}()},59990:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.HlsInterstitialMappingRegistry=void 0,t.HlsInterstitialMappingRegistry=function(){function e(){this.bfb=new Map}return e.prototype.register=function(e,t){var n=this.bfb.has(e)?this.bfb.get(e):[];n.push.apply(n,t),this.bfb.set(e,n)},e.prototype.getTrackingEventsForTrigger=function(e){var t;return null!=(t=this.bfb.get(e))?t:[]},e.prototype.removeTrackingEventForTrigger=function(e,t){var n=this.bfb.get(e);n&&this.bfb.set(e,n.filter(function(e){return e!==t}))},e.prototype.clearTrackingEventsForTrigger=function(e){this.bfb.delete(e)},e.prototype.clear=function(){this.bfb.clear()},e}()},10603:function(e,t,n){var i,r=this&&this.__extends||(i=function(e,t){return(i=Object.
1setPrototypeOf||({__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])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.HlsInterstitialsAdTracker=void 0;var o=n(89927),s=n(70850),a=n(62843),u=n(59990),l=n(39521),c=n(1951),d=n(28038),p=n(13117),h=1/0;function f(e,t){var n="number"==typeof e&&Number.isFinite(e)?e:t;return(0,o.toMilliSeconds)(Math.max(0,n))}t.HlsInterstitialsAdTracker=function(e){function t(t,n){var i=e.call(this,n)||this;return i.context=t,i.playerDelegate=n,i.registry=new u.HlsInterstitialMappingRegistry,i.C4=new a.HlsInterstitialCustomAttributesMappingRegistry(i.registry),i}return r(t,e),t.prototype.getClickThroughUrl=function(){return this.C4.clickThroughUrl},t.prototype.startTrackingAd=function(t,n){var i=this;e.prototype.startTrackingAd.call(this,t,n),this.C4.clickThroughUrl=void 0;var r=(0,l.getHlsCustomAttributesMappingFunction)(this.context);if(r){var o=(0,l.prepareInterstitialDataForMapping)(t);o&&(0,s.safeUserCallback)(function(){return r(o,i.C4)},this.context.logger);var a=(0,l.prepareInterstitialAssetDataForMapping)(n);a&&(0,s.safeUserCallback)(function(){return r(a,i.C4)},this.context.logger)}this.E4(n.duration)},t.prototype.started=function(){var t;e.prototype.started.call(this),null==(t=this.D4)||t.start()},t.prototype.reset=function(){var t;null==(t=this.D4)||t.reset(),this.D4=void 0,e.prototype.reset.call(this)},t.prototype.dispose=function(){var t;null==(t=this.D4)||t.dispose(),this.D4=void 0,e.prototype.dispose.call(this)},t.prototype.E4=function(e){var t,n,i=this;if(this.F4()&&this.G4()){var r=null==(n=null==(t=this.context.config.hls)?void 0:t.interstitials)?void 0:n.viewability;this.D4=new p.ViewabilityTracker(this.context,{viewableDurationMs:f(null==r?void 0:r.viewableDuration,2),decisionTimeoutMs:f(null==r?void 0:r.decisionTimeout,e||h)},function(e){i.pingTrackingUrls(e)})}},t.prototype.F4=function(){var e,t;return!!(null==(t=null==(e=this.context.config.style)?void 0:e.visibility)?void 0:t.enableTracking)},t.prototype.G4=function(){var e=this;return[d.AdTrackingEventTrigger.VIEWABLE,d.AdTrackingEventTrigger.NOT_VIEWABLE,d.AdTrackingEventTrigger.VIEW_UNDETERMINED].some(function(t){return e.registry.getTrackingEventsForTrigger(t).length>0})},t}(c.SgaiAdTracker)},39521:function(e,t,n){var i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.shouldEnableHlsAdTracking=function(e){var t,n,i,o,a=null==(n=null==(t=e.config.hls)?void 0:t.interstitials)?void 0:n.customAttributesMapping;if((0,r.isDefined)(a))return!0;var u=null==(o=null==(i=e.config.hls)?void 0:i.interstitials)?void 0:o.customAttributesMappingPreset;return!!(0,r.isDefined)(u)&&u!==s.CustomAttributesMappingPresets.NONE},t.getHlsCustomAttributesMappingFunction=function(e){var t,n=null==(t=e.config.hls)?void 0:t.interstitials;return(null==n?void 0:n.customAttributesMapping)&&"function"==typeof n.customAttributesMapping?n.customAttributesMapping:(null==n?void 0:n.customAttributesMappingPreset)===s.CustomAttributesMappingPresets.AD_CREATIVE_SIGNALING?o.defaultCustomAttributesMapping:null},t.prepareInterstitialDataForMapping=function(e){if((0,r.isDefined)(e.adCreativeSignaling)||(0,r.isDefined)(e.customAdTrackingInfo)){var t={id:e.id,customAttributes:i({},e.customAdTrackingInfo)};return e.adCreativeSignaling&&(t.customAttributes[a.AD_CREATIVE_SIGNALING_KEY]=e.adCreativeSignaling),t}},t.prepareInterstitialAssetDataForMapping=function(e){var t;if((0,r.isDefined)(e.adCreativeSignaling)||(0,r.isDefined)(e.customAdTrackingInfo)){var n={duration:e.duration,uri:null!=(t=e.mediaFileUrl)?t:"",customAttributes:i({},e.customAdTrackingInfo)};return e.adCreativeSignaling&&(n.customAttributes[a.AD_CREATIVE_SIGNALING_KEY]=e.adCreativeSignaling),n}};var r=n(23068),o=n(22705),s=n(6742),a=n(61933)},6742:function(e,t){var n,i;
1Object.defineProperty(t,"__esModule",{value:!0}),t.CustomAttributesMappingPresets=void 0,(i=n||(t.CustomAttributesMappingPresets=n={})).NONE="NONE",i.AD_CREATIVE_SIGNALING="AD-CREATIVE-SIGNALING"},2423:function(e,t,n){var i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},r=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))(function(r,o){function s(e){try{u(i.next(e))}catch(e){o(e)}}function a(e){try{u(i.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?r(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(s,a)}u((i=i.apply(e,t||[])).next())})},o=this&&this.__generator||function(e,t){var n,i,r,o={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(u){var l=[a,u];if(n)throw TypeError("Generator is already executing.");for(;s&&(s=0,l[0]&&(o=0)),o;)try{if(n=1,i&&(r=2&l[0]?i.return:l[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,l[1])).done)return r;switch(i=0,r&&(l=[2&l[0],r.value]),l[0]){case 0:case 1:r=l;break;case 4:return o.label++,{value:l[1],done:!1};case 5:o.label++,i=l[1],l=[0];continue;case 7:l=o.ops.pop(),o.trys.pop();continue;default:if(!((r=(r=o.trys).length>0&&r[r.length-1])||6!==l[0]&&2!==l[0])){o=0;continue}if(3===l[0]&&(!r||l[1]>r[0]&&l[1]<r[3])){o.label=l[1];break}if(6===l[0]&&o.label<r[1]){o.label=r[1],r=l;break}if(r&&o.label<r[2]){o.label=r[2],o.ops.push(l);break}r[2]&&o.ops.pop(),o.trys.pop();continue}l=t.call(e,o)}catch(e){l=[6,e],i=0}finally{n=r=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}},s=this&&this.__rest||function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&0>t.indexOf(i)&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)0>t.indexOf(i[r])&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(n[i[r]]=e[i[r]])}return n};Object.defineProperty(t,"__esModule",{value:!0}),t.HlsInterstitialsProvider=void 0;var a=n(6365),u=n(4224),l=n(80813),c=n(9768),d=n(3714),p=n(58735),h=n(85625),f=n(44468),g=n(81199),v=n(85434),y=n(23068),m=n(70850),b=n(70600),S=n(3093),E=n(68856),_=n(41906),T=n(57562),P=n(65007),C=n(61933),A=n(6505),w=n(43661);function k(e,t,n){var r;return!(null==n?void 0:n.shouldPlayInterstitial)||null==(r=(0,m.safeUserCallback)(function(){return n.shouldPlayInterstitial(i({},e))},t))||r}function O(e){return(0,y.isDefined)(e.assetList)?e.assetList.assets.map(function(t,n){var i;return M("".concat(e.id,"-").concat(n),t.uri,t.duration,null==(i=t.customAttributes)?void 0:i[C.AD_CREATIVE_SIGNALING_KEY])}):(0,y.isDefined)(e.assetUri)?[M("".concat(e.id,"-0"),e.assetUri,e.end-e.start)]:[]}function M(e,t,n,i){var r=t.toLowerCase(),o=(0,w.isProgressiveMediaUrl)(r);return{id:e,isLinear:!0,width:0,height:0,duration:n,mediaFileUrl:t,adCreativeSignaling:i,data:{delivery:o?a.MediaFileDeliveryType.Progressive:a.MediaFileDeliveryType.Streaming,mimeType:o?v.MimeType.VideoMp4:h.ManifestMimeType.Hls}}}function I(e){return e.isLoadAllowed,e.hasBeenPlayed,s(e,["isLoadAllowed","hasBeenPlayed"])}t.HlsInterstitialsProvider=function(){function e(e){var t,n,i=this;this.context=e,this.BI=new Map([["ASSET-LIST",new Map],["ASSET",new Map]]),this.YJ=function(e){if(i.ZJ(e)){var t,n,r,o=(n=(0,A.resolveRestrictValue)(e.metadata.clientAttributes.restrict),r=(0,A.resolveTriggerPolicy)(e.metadata.cue),{id:e.metadata.id,start:e.start,end:null!=(t=e.end)?t:e.start+1,duration:e.metadata.duration,plannedDuration:e.metadata.plannedDuration,assetUri:e.metadata.clientAttributes.assetUri,assetListUri:e.metadata.clientAttributes.assetList,playoutLimit:e.metadata.clientAttributes.playoutLimit,resumeOffset:e.metadata.clientAttributes.resumeOffset,restrict:n,hasBeenPlayed:!1,jumpPolicy:(0,A.convertRestrictionToJumpPolicy)(n),seekingRestriction:(0,A.convertRestrictionToSeekingRestriction)(n),triggerPolicy:r,customAttributes:function(e){for(var t={},n=0,i=Object.entries(e.metadata.clientAttributes);n<i.length;n++){var r=i[n],o=r[0],s=r[1];C.KNOWN_CLIENT_ATTRIBUTES.includes(o)||(t[o]=s)}return t}(e)});i.zI.add(o)}},this.zI=new P.HlsInterstitialsQueue(e),this.AI=null==(n=null==(t=e.config)?void 0:t.hls)?void 0:n.interstitials,this.context.eventHandler.on(d.PlayerEvent.MetadataParsed,this.YJ)}return e.prototype.getDueAds=function(e){return this.zI.getForTime(e)},e.prototype.getPreRollAds=function(){return this.zI.getUnplayedInterstitials().filter(function(e){var t;return null==(t=e.triggerPolicy)?void 0:t.includes(C.TriggerPolicy.PRE)})},e.prototype.getPostRollAds=function(){return this.zI.getUnplayedInterstitials().filter(function(e){var t;return null==(t=e.triggerPolicy)?void 0:t.includes(C.TriggerPolicy.POST)})},e.prototype.handleSkippedAds=function(e,t){var n=this.zI.getAdsInRange(e,t);if(0===n.length)return[];var i=(0,A.shouldPlayJumpedOverInterstitials)(n,e,t,this.context);i.length>0&&this.context.logger.debug("Playing ".concat(i.length," jump-restricted ads"));for(var r=0;r<n.length;r++){var o=n[r];i.includes(o)||this.markAdAsPlayed(o)}return i},e.prototype.listUnplayedAds=function(){return this.zI.getUnplayedInterstitials().map(I)},e.prototype.markAdAsPlayed=function(e){e.hasBeenPlayed=!0},e.prototype.markPastAdsAsPlayed=function(e){var t=this.zI.getAdsInRange(0,e-2);if(0!==t.length){this.context.logger.debug("Marking ".concat(t.length," past interstitials as played on playback start"));for(var n=0;n<t.length;n++){var i=t[n];i.hasBeenPlayed||this.markAdAsPlayed(i)}}},e.prototype.reinsertAds=function(e){for(var t,n,i=0,r=this.zI.getAll();i<r.length;i++){var o=r[i];o.hasBeenPlayed&&o.start>e&&!(null==(t=o.triggerPolicy)?void 0:t.includes(C.TriggerPolicy.ONCE))&&(o.hasBeenPlayed=!1,o.assetList=void 0,o.isLoadAllowed=void 0,null==(n=this.BI.get("ASSET-LIST"))||n.delete(o.id),this.context.logger.debug("Reinserting interstitial ".concat(o.id," at ").concat(o.start," after backward seek to ").concat(e)))}},e.prototype.resolveRestrictions=function(e){return(0,A.isHlsInterstitialAd)(e)&&e.seekingRestriction===C.SeekingRestriction.NO_SEEKING?{seeking:!0,playbackRate:!0}:{}},e.prototype.clearDroppedOutAds=function(){var e=this,t=(0,w.getDvrWindowStart)(this.context.
1internalPlayer);isFinite(t)&&this.zI.clearUntil(t).forEach(function(t){e.context.logger.debug("Interstitial with id ".concat(t.id," dropped out of the DVR window"))})},e.prototype.resolveAdCreativeSignaling=function(e){var t;return(0,y.isDefined)(e.assetList)?(0,A.extractUnknownAttributes)(e.assetList,["assets"])[C.AD_CREATIVE_SIGNALING_KEY]:(null==(t=e.customAttributes)?void 0:t.adCreativeSignaling)?JSON.parse(atob(e.customAttributes.adCreativeSignaling)):void 0},e.prototype.OJ=function(e){var t;return(0,y.isDefined)(e.assetListUri)&&!e.assetList&&!1!==e.isLoadAllowed&&!(null==(t=this.BI.get("ASSET-LIST"))?void 0:t.get(e.id))},e.prototype.PJ=function(e){var t;return(0,y.isDefined)(e)&&(0,w.isHlsManifestUri)(e)&&!(null==(t=this.BI.get("ASSET"))?void 0:t.get(e))},e.prototype.preloadUpcomingAds=function(e){var t,n;if(!(null==(t=this.MJ)?void 0:t.isLoading())&&!(null==(n=this.NJ)?void 0:n.isLoading()))for(var i=(0,g.getPlayableBufferLevel)(this.context.internalPlayer),r=this.zI.getAdsInRange(e,e+i),o=!1,s=0;!o&&s<r.length;)o=this.QJ(r[s]),s++},e.prototype.QJ=function(e){if(this.OJ(e))return this.RJ(e);if(this.context.internalPlayer.getPlayerType()===f.PlayerType.Native)return!1;var t=this.context.serviceManager.get(l.ServiceName.AdPreloadSequencerService);return t?this.TJ(e,t):this.SJ(e)},e.prototype.RJ=function(e){var t,n=this;return this.context.logger.debug("Preloading ASSET-LIST for upcoming interstitial for time ".concat(e.start,", id ").concat(e.id,", uri ").concat(e.assetListUri)),null==(t=this.BI.get("ASSET-LIST"))||t.set(e.id,!0),this.WJ(e).then(function(){return n.context.logger.debug("Preloaded asset list ".concat(e.assetListUri))}).catch(function(t){var i;n.context.logger.debug("Could not preload asset list ".concat(e.assetListUri,": ").concat(null!=(i=null==t?void 0:t.message)?i:"Unknown reason"))}),!0},e.prototype.SJ=function(e){var t,n,i,r=this;return(0,y.isDefined)(e.assetList)?i=null==(t=e.assetList.assets.find(function(e){return r.PJ(e.uri)}))?void 0:t.uri:this.PJ(e.assetUri)&&(i=e.assetUri),!!(0,y.isDefined)(i)&&(this.context.logger.debug("Preloading ASSET for upcoming interstitial for time ".concat(e.start,", id ").concat(e.id,", uri ").concat(i)),null==(n=this.BI.get("ASSET"))||n.set(i,!0),this.UJ(i).then(function(){return r.context.logger.debug("Preloaded asset URI ".concat(i))}).catch(function(e){var t;r.context.logger.debug("Could not preload asset URI ".concat(i,": ").concat(null!=(t=null==e?void 0:e.message)?t:"Unknown reason"))}),!0)},e.prototype.TJ=function(e,t){return!t.hasTrackedAds()&&t.preloadAds(O(e))},e.prototype.UJ=function(e){var t=this.context.serviceManager.get(l.ServiceName.PreloadingService);return t?t.preloadSource({hls:e},c.ADVERTISING_ISSUER_NAME).then(function(){}):this.VJ(e)},e.prototype.VJ=function(e){return r(this,void 0,void 0,function(){return o(this,function(t){switch(t.label){case 0:return null!=this.NJ||(this.NJ=new T.HlsAssetLoader(this.context)),[4,this.NJ.load(e)];case 1:return t.sent(),[2]}})})},e.prototype.WJ=function(e){return r(this,void 0,void 0,function(){var t,n,r,s,a,u;return o(this,function(o){switch(o.label){case 0:var l,c,d;if(!(0,y.isDefined)(e.assetListUri))throw Error("Cannot load asset list without assetListUri");if((0,y.isDefined)(e.isLoadAllowed)||(l=this.context.logger,e.isLoadAllowed=!(null==(c=this.AI)?void 0:c.shouldLoadInterstitial)||null==(d=(0,m.safeUserCallback)(function(){return c.shouldLoadInterstitial(i({},e))},l))||d),!e.isLoadAllowed)throw Error("Not allowed to load based on user feedback");return null!=this.MJ||(this.MJ=new _.HlsAssetListLoader(this.context)),t=this.MJ.getCurrentLoadingUrl(),r=void 0!==(n=this.MJ.getCurrentLoadingPromise()),s=t===e.assetListUri,r&&s?(this.context.logger.debug("The asset list for the interstitial with id ".concat(e.id," was already preloading")),a=e,[4,n]):[3,2];case 1:return a.assetList=o.sent(),[2,e.assetList];case 2:return!r||s?[3,4]:(this.context.logger.debug("Interrupting preloading of outdated asset list ".concat(t)),this.MJ.cancel(),[4,null==n?void 0:n.catch(function(){})]);case 3:o.sent(),o.label=4;case 4:return u=e,[4,this.MJ.load(e.assetListUri)];case 5:return u.assetList=o.sent(),[2,e.assetList]}})})},e.prototype.resolveNestedAds=function(e){return r(this,void 0,void 0,function(){var t,n;return o(this,function(i){switch(i.label){case 0:if(!(0,y.isDefined)(e.assetListUri))return[3,7];t=void 0,i.label=1;case 1:return i.trys.push([1,5,,6]),(0,y.isDefined)(e.assetList)?(t=e.assetList,[3,4]):[3,2];case 2:return this.context.logger.debug("Loading asset list with id ".concat(e.id," from URI ").concat(e.assetListUri)),[4,this.WJ
1(e)];case 3:t=i.sent(),this.context.logger.debug("Asset list loaded for ".concat(e.id)),i.label=4;case 4:return[3,6];case 5:return n=i.sent(),this.XJ(e,n),[2,[]];case 6:return 0===t.assets.length?(this.context.logger.debug("Asset list for interstitial with id ".concat(e.id," contained no ads (no-fill)")),(0,E.fireSgaiWarning)(this.context,u.WarningCode.MODULE_SGAI_WARNING,"Asset list for interstitial ".concat(e.id," contained no ads")),[2,[]]):k(e,this.context.logger,this.AI)?[2,O(e)]:(this.context.logger.debug("Skipping playing interstitial with id ".concat(e.id," based on user feedback")),[2,[]]);case 7:return(0,y.isDefined)(e.assetUri)?k(e,this.context.logger,this.AI)?[2,O(e)]:(this.context.logger.debug("Skipping interstitial with id ".concat(e.id,", uri ").concat(e.assetUri," based on user feedback")),[2,[]]):(this.context.logger.debug("No assetUri or assetListUri found for interstitial with id ".concat(e.id)),[2,[]]);case 8:return[2]}})})},e.prototype.XJ=function(e,t){var n;(0,b.isAssetListError)(t)?(this.context.logger.debug("Failed to resolve asset list for interstitial with id ".concat(e.id),t),(0,S.fireSgaiAdError)(this.context,t.sgaiErrorCode,t.message)):this.context.logger.debug("Could not resolve asset list with id ".concat(e.id,", uri ").concat(e.assetListUri,": ").concat(null!=(n=null==t?void 0:t.message)?n:"Unknown reason"))},e.prototype.getReplaceContentDuration=function(e,t){return(0,y.isDefined)(e.resumeOffset)?e.resumeOffset:this.getTotalPlannedDuration(e,t)},e.prototype.getTotalPlannedDuration=function(e,t){return(0,y.isDefined)(e.playoutLimit)?e.playoutLimit:(0,A.calculateInterstitialDuration)(e,t)},e.prototype.getTotalPlayoutLimit=function(e){if((0,y.isDefined)(e.playoutLimit))return e.playoutLimit},e.prototype.ZJ=function(e){return(0,p.isDateRangeMetadata)(e)&&"com.apple.hls.interstitial"===e.metadata.class},e.prototype.getQueuedInterstitials=function(){return this.zI.getAll()},e.prototype.dispose=function(){var e,t,n,i;this.context.eventHandler.off(d.PlayerEvent.MetadataParsed,this.YJ),null==(e=this.MJ)||e.dispose(),null==(t=this.NJ)||t.dispose(),null==(n=this.BI.get("ASSET-LIST"))||n.clear(),null==(i=this.BI.get("ASSET"))||i.clear()},e}()},65007:function(e,t,n){var i=this&&this.__rest||function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&0>t.indexOf(i)&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)0>t.indexOf(i[r])&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(n[i[r]]=e[i[r]])}return n},r=this&&this.__spreadArray||function(e,t,n){if(n||2==arguments.length)for(var i,r=0,o=t.length;r<o;r++)!i&&r in t||(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.HlsInterstitialsQueue=void 0;var o=n(74853),s=n(61933);t.HlsInterstitialsQueue=function(){function e(e){this.context=e,this.N4=[]}return e.prototype.add=function(e){this.Z5(e)?this.Y5(e):(this.context.logger.debug("Adding HLS interstitial to queue at start time ".concat(e.start),e),o.ArrayHelper.insertInSortedArray(this.N4,e,function(t){return t.start>e.start}))},e.prototype.Y5=function(e){var t=this.N4.findIndex(function(t){return t.id===e.id});-1!==t?(this.context.logger.debug("Updating HLS interstitial with id at start time ".concat(e.start),e),Object.assign(this.N4[t],(e.id,e.start,e.hasBeenPlayed,e.isLoadAllowed,i(e,["id","start","hasBeenPlayed","isLoadAllowed"])))):this.context.logger.debug("Interstitial to update was not found")},e.prototype.clearUntil=function(e){return o.ArrayHelper.removeUntilInSortedArray(this.N4,function(t){return t.end>e})},e.prototype.hasDueAds=function(e){var t=this.getUnplayedInterstitials();return t.length>0&&t[0].start<=e},e.prototype.getForTime=function(e){for(var t=[],n=function(n){return n.start>e?"break":[s.TriggerPolicy.PRE,s.TriggerPolicy.POST].some(function(e){var t;return null==(t=n.triggerPolicy)?void 0:t.includes(e)})?"continue":void(e>=n.start&&e<=n.end&&t.push(n))},i=0,r=this.getUnplayedInterstitials();i<r.length&&"break"!==n(r[i]);i++);return t},e.prototype.getAdsInRange=function(e,t){for(var n=[],i=function(i){return i.start>t?"break":[s.TriggerPolicy.PRE,s.TriggerPolicy.POST].some(function(e){var t;return null==(t=i.triggerPolicy)?void 0:t.includes(e)})?"continue":void(i.start>=e&&i.start<=t&&n.push(i))},r=0,o=this.getUnplayedInterstitials();r<o.length&&"break"!==i(o[r]);r++);return n},e.prototype.getAll=function(){return r([],this.N4,!0)},e.prototype.getUnplayedInterstitials=function(){return this.N4.filter(function(e){return!e.hasBeenPlayed})},e.prototype.Z5=function(e){return this.N4.some(function(t){return t.id===e.id})},e}()},61933:function(e,t){var n,i,r,o,s,a,u;
1Object.defineProperty(t,"__esModule",{value:!0}),t.TriggerPolicy=t.JumpPolicy=t.SeekingRestriction=t.RestrictValue=t.KNOWN_CLIENT_ATTRIBUTES=t.AD_CREATIVE_SIGNALING_KEY=void 0,t.AD_CREATIVE_SIGNALING_KEY="X-AD-CREATIVE-SIGNALING",t.KNOWN_CLIENT_ATTRIBUTES=["assetUri","assetList","playoutLimit","resumeOffset","restrict"],(s=n||(t.RestrictValue=n={})).SKIP="SKIP",s.JUMP="JUMP",(i||(t.SeekingRestriction=i={})).NO_SEEKING="NO_SEEKING",(a=r||(t.JumpPolicy=r={})).ALLOW="ALLOW",a.RESTRICT="RESTRICT",(u=o||(t.TriggerPolicy=o={})).PRE="PRE",u.POST="POST",u.ONCE="ONCE"},6505:function(e,t,n){var i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.extractUnknownAttributes=void 0,t.calculateInterstitialDuration=function(e,t){if(e.duration&&e.duration>0)return e.duration;if(e.plannedDuration&&e.plannedDuration>0)return e.plannedDuration;var n=t.reduce(function(e,t){return e+t.duration},0);return n>0?n:Math.max(e.end-e.start,0)},t.resolveRestrictValue=function(e){if(e){var t=(Array.isArray(e)?e.map(function(e){return e.trim().toUpperCase()}):e.split(",").map(function(e){return e.trim().toUpperCase()})).map(function(e){return Object.values(o.RestrictValue).find(function(t){return t===e})}).filter(function(e){return void 0!==e});return t.length>0?t:void 0}},t.convertRestrictionToSeekingRestriction=function(e){if(null==e?void 0:e.includes(o.RestrictValue.SKIP))return o.SeekingRestriction.NO_SEEKING},t.convertRestrictionToJumpPolicy=function(e){return(null==e?void 0:e.includes(o.RestrictValue.JUMP))?o.JumpPolicy.RESTRICT:o.JumpPolicy.ALLOW},t.resolveTriggerPolicy=function(e){if(!e)return[];var t=e.split(","),n=[];return t.includes("PRE")&&n.push(o.TriggerPolicy.PRE),t.includes("POST")&&n.push(o.TriggerPolicy.POST),t.includes("ONCE")&&n.push(o.TriggerPolicy.ONCE),n},t.isHlsInterstitialAd=s,t.getJumpRestrictedHlsInterstitials=a,t.shouldPlayJumpedOverInterstitials=function(e,t,n,o){var s,u,l,c=null==(l=null==(u=o.config)?void 0:u.hls)?void 0:l.interstitials;if(null==c?void 0:c.shouldPlayJumpedOverInterstitials){var d=e.map(function(e){return i({},e)}),p=(0,r.safeUserCallback)(function(){return c.shouldPlayJumpedOverInterstitials(d,t,n)},o.logger);if(p){var h=p.map(function(e){return e.id});return o.logger.debug("Playing interstitials selected by shouldPlayJumpedOverInterstitials: ".concat(h)),e.filter(function(e){return h.includes(e.id)})}}var f=(s=a(e))[s.length-1];return f?[f]:[]};var r=n(70850),o=n(61933);function s(e){return"object"==typeof e&&null!==e&&"id"in e&&("scheduleTime"in e||"start"in e)}function a(e){return e.filter(s).filter(function(e){return e.jumpPolicy===o.JumpPolicy.RESTRICT})}t.extractUnknownAttributes=function(e,t){return Object.keys(e).reduce(function(n,i){return t.includes(i)||(n[i]=e[i]),n},{})}},60047:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.SGAIModuleDefinition=void 0;var i=n(62756),r=n(91135);t.SGAIModuleDefinition={name:i.ModuleName.SGAI,module:function(){return{SgaiService:r.SgaiService}}
1,dependencies:[i.ModuleName.AdvertisingCore]},t.default=t.SGAIModuleDefinition},84770:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.PausableTimeout=void 0,t.PausableTimeout=function(){function e(e,t){var n=this;this.durationMs=e,this.callback=t,this.Khb=null,this.Lhb=null,this.Nhb=!1,this.Ohb=function(){n.Nhb||(n.Khb=null,n.Lhb=null,n.Mhb=0,n.callback())},this.Mhb=Math.max(0,e)}return e.prototype.start=function(){this.Nhb||null!==this.Khb||(this.Mhb<=0?this.Ohb():(this.Lhb=Date.now(),this.Khb=window.setTimeout(this.Ohb,this.Mhb)))},e.prototype.pause=function(){if(null!==this.Khb&&null!==this.Lhb){var e=Date.now()-this.Lhb;this.Mhb=Math.max(0,this.Mhb-e),window.clearTimeout(this.Khb),this.Khb=null,this.Lhb=null}},e.prototype.resume=function(){this.start()},e.prototype.reset=function(e){void 0===e&&(e=this.durationMs),null!==this.Khb&&window.clearTimeout(this.Khb),this.Khb=null,this.Lhb=null,this.Mhb=Math.max(0,e)},e.prototype.dispose=function(){this.reset(),this.Nhb=!0},e}()},71734:function(e,t,n){var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))(function(r,o){function s(e){try{u(i.next(e))}catch(e){o(e)}}function a(e){try{u(i.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?r(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(s,a)}u((i=i.apply(e,t||[])).next())})},r=this&&this.__generator||function(e,t){var n,i,r,o={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(u){var l=[a,u];if(n)throw TypeError("Generator is already executing.");for(;s&&(s=0,l[0]&&(o=0)),o;)try{if(n=1,i&&(r=2&l[0]?i.return:l[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,l[1])).done)return r;switch(i=0,r&&(l=[2&l[0],r.value]),l[0]){case 0:case 1:r=l;break;case 4:return o.label++,{value:l[1],done:!1};case 5:o.label++,i=l[1],l=[0];continue;case 7:l=o.ops.pop(),o.trys.pop();continue;default:if(!((r=(r=o.trys).length>0&&r[r.length-1])||6!==l[0]&&2!==l[0])){o=0;continue}if(3===l[0]&&(!r||l[1]>r[0]&&l[1]<r[3])){o.label=l[1];break}if(6===l[0]&&o.label<r[1]){o.label=r[1],r=l;break}if(r&&o.label<r[2]){o.label=r[2],o.ops.push(l);break}r[2]&&o.ops.pop(),o.trys.pop();continue}l=t.call(e,o)}catch(e){l=[6,e],i=0}finally{n=r=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}};Object.defineProperty(t,"__esModule",{value:!0}),t.SgaiAdPlayer=void 0;var o=n(43255),s=n(80813),a=n(86969),u=n(3714),l=n(90408),c=n(15971),d=n(34841),p=n(23068),h=n(3093),f=n(10603),g=n(39521),v=n(10619),y=n(43661);t.SgaiAdPlayer=function(){function e(e){var t=this;this.context=e,this.cJ=null,this.dJ=null,this.eJ=null,this.fJ=null,this.gJ=null,this.hJ=0,this.iJ=null,this.jJ=null,this.kJ=!1,this.lJ=!1,this.qJ=function(e){return i(t,void 0,void 0,function(){var t;return r(this,function(n){return null==(t=this.bJ)||t.progress(e.time),this.rJ(),this.sJ(e.time)&&this.pJ(!0),[2]})})},this.wJ=function(){return i(t,void 0,void 0,function(){var e;return r(this,function(t){switch(t.label){case 0:return this.context.logger.debug("Finished SGAI ad playback"),null==(e=this.bJ)||e.complete(),[4,this.pJ()];case 1:return t.sent(),[2]}})})},this.xJ=function(e){t.context.logger.debug("SGAI ad player error",e);var n,i,r=t.fJ;if(r){t.eJ=null,t.fJ=null;var o=null!=(n=null==e?void 0:e.message)?n:"string"==typeof e?e:void 0;(0,h.fireSgaiAdError)(t.context,v.SgaiErrorCode.INTERSTITIAL_ASSET_PLAYBACK_FAILED,o,e),null==(i=t.bJ)||i.errorWithCode(String(v.SgaiErrorCode.INTERSTITIAL_ASSET_PLAYBACK_FAILED)),t.oJ(),r(e instanceof a.PlayerError||e instanceof Error?e:Error("AdPlayer failed: ".concat(JSON.stringify(e))))}},this.aJ=new o.AdPlayerDelegate({context:e,internalPlayer:e.internalPlayer,restoreContentDeferred:new d.Deferred}),(0,y.isPlayingHls)(e)&&(0,g.shouldEnableHlsAdTracking)(e)&&(this.bJ=new f.HlsInterstitialsAdTracker(this.context,this.aJ))}return e.prototype.playAdBreak=function(e,t){return i(this,void 0,void 0,function(){var n,i,o,s,a,u,l,c;return r(this,function(r){switch(r.label){case 0:return[4,this.nJ(!1,this.dJ)];case 1:r.sent(),this.iJ=e,this.gJ=t,r.label=2;case 2:return r.trys.push([2,10,11,13]),n=this,[4,this.aJ.requestAdPlayback(e)];case 3:n.dJ=r.sent(),i=0,o=null!=(l=e.ads)?l:[],r.label=4;case 4:if(!(i<o.length)||(s=o[i],this.lJ))return[3,9];if(null==s.id)return this.context.logger.debug("SGAI ad without id detected - skipping playback",s),[3,8];if(this.sJ())return[3,8];null==(c=this.bJ)||c.startTrackingAd(e,s),this.context.logger.debug("Triggering playback of SGAI ad ".concat(s.id," at time ").concat(e.scheduleTime),s),r.label=5;case 5:return r.trys.push([5,7,,8]),[4,this.mJ(s,e.restrictions)];case 6:return r.sent(),this.hJ+=s.duration,[3,8];case 7:return a=r.sent(),this.context.logger.debug("Failed to play SGAI ad ".concat(s.id),a),[3,8];case 8:return i++,[3,4];case 9:return[3,13];case 10:return u=r.sent(),this.context.logger.debug("Failed to play SGAI ad break with id ".concat(e.id),u),[3,13];case 11:return[4,this.nJ(t.isLastAdBreak,this.dJ)];case 12:return r.sent(),[7];case 13:return[2]}})})},e.prototype.skipActiveAd=function(){return this.cJ?(this.context.logger.debug("Skipping currently active SGAI ad"),this.pJ()):(this.context.logger.debug("No active SGAI ad to skip"),Promise.resolve())},e.prototype.getActiveAd=function(){return this.jJ},e.prototype.mJ=function(e,t){return i(this,void 0,void 0,function(){var n,i,o,a=this;return r(this,function(r){switch(r.label){case 0:if(!this.dJ||this.lJ)throw Error("No active AdPlaybackAPI available for playback");this.kJ=!1,r.label=1;case 1:return r.trys.push([1,4,5,6]),[4,this.dJ.requestPlayer()];case 2:return n=r.sent(),this.cJ=n,[4,new Promise(function(i,r){a.eJ=i,a.fJ=r;var o,l,c,d=null==(o=a.bJ)?void 0:o.getClickThroughUrl();return e.clickThroughUrl=d,e.clickThroughUrlOpened=d?function(){var e;return null==(e=a.bJ)?void 0:e.click()}:void 0,n.on(u.PlayerEvent.TimeChanged,a.qJ),n.on(u.PlayerEvent.Playing,function(){var e;return null==(e=a.bJ)?void 0:e.setPaused(!1)}),n.on(u.PlayerEvent.Paused,function(){var e;return null==(e=a.bJ)?void 0:e.setPaused(!0)}),n.on(u.PlayerEvent.Muted,function(){var e;return null==(e=a.bJ)?void 0:e.setMuted(!0)}),n.on(u.PlayerEvent.Unmuted,function(){var e;return null==(e=a.bJ)?void 0:e.setMuted(!1)}),n.on(u.PlayerEvent.PlaybackFinished,a.wJ),n.on(u.PlayerEvent.Error,a.xJ),a.context.logger.debug("Loading ad ".concat(e.id)),a.jJ=e,null==(c=null==(l=a.context.serviceManager)?void 0:l.get(s.ServiceName.AdPreloadSequencerService))||c.notifyAdPlaybackStarted(String(e.id)),n.load(e,t).then(function(){a.bJ&&(a.bJ.loaded(),a.bJ.trackImpression(),a.bJ.started())}).catch(a.xJ)})];case 3:return r.sent(),[3,6];case 4:throw i=r.sent(),o="Error during SGAI ad playback for ".concat(e.id,": ").concat(null==i?void 0:i.message),this.context.logger.debug(o,i),i;case 5:return this.cJ=null,this.jJ=null,[7];case 6:return[2]}})})},e.prototype.nJ=function(e,t){return i(this,void 0,void 0,function(){var n;return r(this,function(i){switch(i.label){case 0:if(!t)return[3,6];i.label=1;case 1:return i.trys.push([1,4,5,6]),this.lJ?[3,3]:[4,t.done(e)];case 2:i.sent(),i.label=3;case 3:return[3,6];case 4:return n=i.sent(),this.context.logger.debug("Error finishing current ad playback",n),[3,6];case 5:return this.cJ=null,this.jJ=null,this.dJ=null,this.eJ=null,this.fJ=null,[7];case 6:return this.vJ(),[2]}})})},e.prototype.oJ=function(){return i(this,arguments,void 0,function(e){var t,n;return void 0===e&&(e=!1),r(this,function(i){switch(i.label){case 0:if(!this.cJ)return[3,5];i.label=1;case 1:return i.trys.push([1,3,,4]),[4,this.cJ.done(e)];case 2:return i.sent(),[3,4];case 3:return t=i.sent(),this.context.logger.debug("Error calling adPlayer.done()",t),[3,4];case 4:this.cJ=null,this.jJ=null,i.label=5;case 5:return null==(n=this.bJ)||n.reset(),[2]}})})},e.prototype.pJ=function(){return i(this,arguments,void 0,function(e){var t;return void 0===e&&(e=!1),r(this,function(n){switch(n.label){case 0:return[4,this.oJ(e)];case 1:return n.sent(),t=this.eJ,this.eJ=null,this.fJ=null,null==t||t(),[2]}})})},e.prototype.rJ=function(){var e,t,n,i,r;!this.kJ&&this.jJ&&null!=(n=null==(t=null==(e=(0,c.getSourceState)(this.context))?void 0:e.buffer)?void 0:t.isLoadingRangeFinished)&&n&&(this.kJ=!0,null==(r=null==(i=this.context.serviceManager)?void 0:i.get(s.ServiceName.AdPreloadSequencerService))||r.notifyAdFullyBuffered(String(this.jJ.id)))},e.prototype.sJ=function(e){void 0===e&&(e=0);var t,n=null==(t=this.gJ)?void 0:t.getPlayoutLimit();if(!(0,p.isDefined)(n))return!1;this.uJ(n),this.tJ(n);var i=this.hJ+e>=n;return i&&this.context.logger.debug("Playout limit (".concat(n,"s
1) reached for current SGAI ad break")),i},e.prototype.tJ=function(e){var t,n=null==(t=this.gJ)?void 0:t.getReplaceContentDuration();if(this.iJ&&(0,p.isDefined)(n)){var i=this.iJ.totalPlannedDuration!==e,r=this.iJ.replaceContentDuration!==n;(i||r)&&(this.iJ.replaceContentDuration=n,this.iJ.totalPlannedDuration=e,this.aJ.updateAdRestoreState({adBreakDuration:e,replaceContentDuration:n}))}},e.prototype.uJ=function(e){var t,n,i=null!=(n=null==(t=this.jJ)?void 0:t.duration)?n:0,r=e-this.hJ,o=r>0&&r<i;this.jJ&&o&&(this.context.logger.debug("Current Ad duration changed from (".concat(i,"s) to (").concat(r,"s) due to playout limit")),(0,l.maybeFireDurationChangedEvent)(i,r,this.context.eventHandler),this.jJ.duration=r)},e.prototype.vJ=function(){this.iJ=null,this.gJ=null,this.hJ=0},e.prototype.dispose=function(){return i(this,void 0,void 0,function(){var e;return r(this,function(t){switch(t.label){case 0:return this.lJ=!0,this.cJ?(this.context.logger.debug("Source was unloaded while SGAI ad was playing"),[4,this.pJ()]):[3,2];case 1:t.sent(),t.label=2;case 2:return this.aJ.reset(),null==(e=this.bJ)||e.dispose(),this.vJ(),[2]}})})},e}()},1951:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.SgaiAdTracker=void 0;var i=n(95217),r=n(3714),o=n(23068),s=n(28038);t.SgaiAdTracker=function(){function e(e){this.playerDelegate=e,this.cfb=0,this.dfb=[]}return e.prototype.click=function(){var e=this.getClickThroughUrl();e&&this.playerDelegate.adClicked(e),this.pingTrackingUrls(s.AdTrackingEventTrigger.CLICKED)},e.prototype.close=function(){},e.prototype.complete=function(){this.efb(100),this.pingTrackingUrls(s.AdTrackingEventTrigger.COMPLETE)},e.prototype.errorWithCode=function(e){this.pingTrackingUrls(s.AdTrackingEventTrigger.ERROR)},e.prototype.loaded=function(){this.pingTrackingUrls(s.AdTrackingEventTrigger.LOADED)},e.prototype.progress=function(e){var t=Math.round(100*e)/this.cfb;this.efb(t),this.pingTrackingUrls(s.AdTrackingEventTrigger.PROGRESS,e)},e.prototype.setDuration=function(e){this.cfb=e},e.prototype.setFullscreen=function(e){},e.prototype.setMuted=function(e){this.pingTrackingUrls(e?s.AdTrackingEventTrigger.MUTE:s.AdTrackingEventTrigger.UNMUTE)},e.prototype.setPaused=function(e){this.pingTrackingUrls(e?s.AdTrackingEventTrigger.PAUSE:s.AdTrackingEventTrigger.RESUME)},e.prototype.skip=function(){this.pingTrackingUrls(s.AdTrackingEventTrigger.SKIP)},e.prototype.started=function(){this.pingTrackingUrls(s.AdTrackingEventTrigger.START)},e.prototype.trackImpression=function(){this.pingTrackingUrls(s.AdTrackingEventTrigger.IMPRESSION)},e.prototype.volumeChanged=function(e){},e.prototype.efb=function(e){var t=this;[r.AdQuartile.FIRST_QUARTILE,r.AdQuartile.MIDPOINT,r.AdQuartile.THIRD_QUARTILE].forEach(function(n){!t.dfb.includes(n)&&e>=function(e){switch(e){case r.AdQuartile.FIRST_QUARTILE:return 25;case r.AdQuartile.MIDPOINT:return 50;case r.AdQuartile.THIRD_QUARTILE:return 75;default:return 100}}(n)&&(t.playerDelegate.onQuartile(n),t.dfb.push(n),t.pingTrackingUrls(n))})},e.prototype.pingTrackingUrls=function(e,t){var n=this;this.registry.getTrackingEventsForTrigger(e).filter(function(e){return!(0,o.isDefined)(t)||!(0,o.isDefined)(e.offset)||Math.round(e.offset)===Math.round(t)}).forEach(function(r){r.urls.forEach(function(e){return(0,i.pingUrl)(e)}),(0,o.isDefined)(t)&&n.registry.removeTrackingEventForTrigger(e,r)})},e.prototype.startTrackingAd=function(e,t){this.cfb=t.duration,this.registry.clear(),this.dfb=[]},e.prototype.getClickThroughUrl=function(){},e.prototype.setupWasSuccessful=function(){return(0,o.isDefined)(this.registry)},e.prototype.reset=function(){this.cfb=0,this.registry.clear(),this.dfb=[]},e.prototype.dispose=function(){this.reset()},e}()},28038:function(e,t){var n,i,r;Object.defineProperty(t,"__esModule",{value:!0}),t.AdTrackingEventTrigger=t.SgaiAdType=void 0,(n||(t.SgaiAdType=n={})).LINEAR="linear",(r=i||(t.AdTrackingEventTrigger=i={})).IMPRESSION="impression",r.PAUSE="pause",r.MUTE="mute",r.UNMUTE="unmute",r.RESUME="resume",r.LOADED="loaded",r.START="start",r.PROGRESS="progress",r.FIRST_QUARTILE="firstQuartile",r.MIDPOINT="midpoint",r.THIRD_QUARTILE="thirdQuartile",r.COMPLETE="complete",r.ERROR="error",r.CLICKED="clickTracking",r.SKIP="skip",r.VIEWABLE="viewable",r.NOT_VIEWABLE="notViewable",r.VIEW_UNDETERMINED="viewUndetermined"},10619:function(e,t){var n,i;
1Object.defineProperty(t,"__esModule",{value:!0}),t.SgaiErrorCode=void 0,(i=n||(t.SgaiErrorCode=n={}))[i.INTERSTITIAL_ASSET_LIST_INVALID=111]="INTERSTITIAL_ASSET_LIST_INVALID",i[i.INTERSTITIAL_ASSET_LIST_LOAD_FAILED=406]="INTERSTITIAL_ASSET_LIST_LOAD_FAILED",i[i.INTERSTITIAL_ASSET_PLAYBACK_FAILED=407]="INTERSTITIAL_ASSET_PLAYBACK_FAILED"},91135:function(e,t,n){var i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},r=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))(function(r,o){function s(e){try{u(i.next(e))}catch(e){o(e)}}function a(e){try{u(i.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?r(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(s,a)}u((i=i.apply(e,t||[])).next())})},o=this&&this.__generator||function(e,t){var n,i,r,o={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(u){var l=[a,u];if(n)throw TypeError("Generator is already executing.");for(;s&&(s=0,l[0]&&(o=0)),o;)try{if(n=1,i&&(r=2&l[0]?i.return:l[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,l[1])).done)return r;switch(i=0,r&&(l=[2&l[0],r.value]),l[0]){case 0:case 1:r=l;break;case 4:return o.label++,{value:l[1],done:!1};case 5:o.label++,i=l[1],l=[0];continue;case 7:l=o.ops.pop(),o.trys.pop();continue;default:if(!((r=(r=o.trys).length>0&&r[r.length-1])||6!==l[0]&&2!==l[0])){o=0;continue}if(3===l[0]&&(!r||l[1]>r[0]&&l[1]<r[3])){o.label=l[1];break}if(6===l[0]&&o.label<r[1]){o.label=r[1],r=l;break}if(r&&o.label<r[2]){o.label=r[2],o.ops.push(l);break}r[2]&&o.ops.pop(),o.trys.pop();continue}l=t.call(e,o)}catch(e){l=[6,e],i=0}finally{n=r=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}};Object.defineProperty(t,"__esModule",{value:!0}),t.SgaiService=void 0;var s=n(80813),a=n(56481),u=n(3714),l=n(34841),c=n(23068),d=n(2423),p=n(71734),h=n(43661);t.SgaiService=function(){function e(e){var t=this;this.context=e,this.Mi=!1,this.Ni=!1,this.Oi=void 0,this.Pi=!1,this.Ri=function(){null!=t.Qi||(t.Qi=new l.Deferred),t.Qi.resolve()},this.Si=function(){!t.Ki||t.Mi||t.Oi||t.Ki.markPastAdsAsPlayed(t.context.internalPlayer.getCurrentTime())},this.Ti=function(e){if(t.Ki&&!t.Mi){t.Ki.clearDroppedOutAds();var n=t.context.settings.SGAI_TRIGGER_DELAY_COMPENSATION,i=t.Ki.getDueAds(e.time+n);0!==i.length?(t.context.logger.debug("Scheduling playback of SGAI ads at time ".concat(e.time),i),t.Yi(i)):t.Ki.preloadUpcomingAds(e.time)}},this.Ui=function(e){var n=i(i({},e),{seekTarget:e.target});t.Wi(n)},this.Vi=function(e){t.Xi(e)},this.Wi=function(e){var n,r,o,a;t.Ki&&!t.Mi&&(null==(r=null==(n=t.context.serviceManager)?void 0:n.get(s.ServiceName.AdPreloadSequencerService))||r.cancel(),t.Oi=i(i(i({},t.Oi),e),{position:null!=(a=null==(o=t.Oi)?void 0:o.position)?a:e.position}),e.seekTarget>=e.position||t.Ki.reinsertAds(e.seekTarget))},this.Xi=function(e){if(t.Ki&&!t.Mi&&t.Oi){var n=t.Oi,i=n.position,r=n.seekTarget;if(t.Oi=void 0,!(r<=i)){var o=t.Ki.handleSkippedAds(i,r);if(0!==o.length){t.context.logger.debug("Scheduling playback of ".concat(o.length," SGAI ads on seeking"),o);var s=e.type===u.PlayerEvent.Seeked?0:void 0;t.Yi(o,s)}}}},this.context.logger.debug("Creating SGAI service")}return e.prototype.initialize=function(){this.Ni=!1,this.context.logger.debug("Initializing SGAI service"),(0,h.isPlayingHls)(this.context)&&(this.Ki=new d.HlsInterstitialsProvider(this.context),this.context.eventHandler.on(u.PlayerEvent.SourceLoaded,this.Ri),this.context.eventHandler.on(u.PlayerEvent.Playing,this.Si),this.context.eventHandler.on(u.PlayerEvent.TimeChanged,this.Ti),this.context.eventHandler.on(u.PlayerEvent.Seek,this.Wi),this.context.eventHandler.on(u.PlayerEvent.Seeked,this.Xi),this.context.eventHandler.on(u.PlayerEvent.TimeShift,this.Ui),this.context.eventHandler.on(u.PlayerEvent.TimeShifted,this.Vi))},e.prototype.getSgaiPlayerAPI=function(){var e=this;return{list:function(){var t,n;return null!=(n=null==(t=e.Ki)?void 0:t.listUnplayedAds())?n:[]},skip:function(){var t,n;return null!=(n=null==(t=e.Li)?void 0:t.skipActiveAd())?n:Promise.resolve()},getActiveAd:function(){var t,n;return null!=(n=null==(t=e.Li)?void 0:t.getActiveAd())?n:void 0}}},e.prototype.shouldPlayPreRollAds=function(){return!!this.Ki&&!this.Pi},e.prototype.playPreRollAds=function(){return r(this,void 0,void 0,function(){var e,t=this;return o(this,function(n){switch(n.label){case 0:return this.Ki?(null!=this.Qi||(this.Qi=new l.Deferred),[4,this.Qi.promise.catch(function(){})]):[2];case 1:return n.sent(),this.Ni?(this.context.logger.debug("Source loading failed or was aborted, skipping SGAI pre-roll playback"),[2]):(this.Pi=!0,0===(e=this.Ki.getPreRollAds()).length?(this.context.logger.debug("No SGAI pre-rolls found"),[2]):(this.context.logger.debug("Scheduling playback of ".concat(e.length," SGAI pre-roll ads"),e),[2,this.Yi(e).finally(function(){return t.Si()})]))}})})},e.prototype.Yi=function(e,t){return r(this,void 0,void 0,function(){var n,i,r,a,u,l,d,h=this;return o(this,function(f){switch(f.label){case 0:return this.Mi=!0,[4,Promise.all(e.map(function(e){return h.Zi(e)}))];case 1:i=(n=f.sent()).reduce(function(e,t){var n;return e+(null!=(n=t.replaceContentDuration)?n:0)},0)+this.context.settings.SGAI_TRIGGER_DELAY_COMPENSATION,r=null==(d=this.context.serviceManager)?void 0:d.get(s.ServiceName.AdPreloadSequencerService),a=function(s){var a,l;return o(this,function(o){switch(o.label){case 0:if(!(a=n[s]).ads||0===a.ads.length)return u.context.logger.debug("No ads found for SGAI with id ".concat(a.id,", skipping playback")),null==r||r.cancel(),[2,"continue"];if(u.Ni||!u.Ki)return[2,"break"];a.replaceContentDuration=null!=t?t:i,u.context.logger.debug("Scheduling playback of SGAI ad break with ".concat(a.ads.length," ads"),a),r&&!r.hasTrackedAds()&&r.trackAds(a.ads),o.label=1;case 1:return o.trys.push([1,3,4,5]),null!=u.Li||(u.Li=new p.SgaiAdPlayer(u.context)),[4,u.Li.playAdBreak(a,{isLastAdBreak:s===n.length-1,getPlayoutLimit:function(){var t;return null==(t=h.Ki)?void 0:t.getTotalPlayoutLimit(e[s])},getReplaceContentDuration:function(){if((0,c.isDefined)(t))return t;var n,i,r=null==(n=h.Ki)?void 0:n.getReplaceContentDuration(e[s],null!=(i=a.ads)?i:[]);return(0,c.isDefined)(r)?r+h.context.settings.SGAI_TRIGGER_DELAY_COMPENSATION:void 0}})];case 2:return o.sent(),[3,5];case 3:return l=o.sent(),u.context.logger.debug("Failed to play SGAI ad break with id ".concat(a.id),l),[3,5];case 4:return null==r||r.cancel(),[7];case 5:return[2]}})},u=this,l=0,f.label=2;case 2:return l<n.length?[5,a(l)]:[3,5];case 3:if("break"===f.sent())return[3,5];f.label=4;case 4:return l++,[3,2];case 5:return this.Mi=!1,this.Oi=void 0,[2]}})})},e.prototype.Zi=function(e){return r(this,void 0,void 0,function(){var t,n,i,r,s,a,u,l,c,d;return o(this,function(o){switch(o.label){case 0:return this.Ki?[4,this.Ki.resolveNestedAds(e)]:[3,2];case 1:return n=o.sent(),[3,3];case 2:n=[],o.label=3;case 3:return t=n,i=null==(a=this.Ki)?void 0:a.getReplaceContentDuration(e,t),r=null==(u=this.Ki)?void 0:u.getTotalPlannedDuration(e,t),s=t.length>0,null==(l=this.Ki)||l.markAdAsPlayed(e),[2,{id:e.id,scheduleTime:e.start,replaceContentDuration:s?i:void 0,totalPlannedDuration:s?r:void 0,ads:t,adCreativeSignaling:null==(c=this.Ki)?void 0:c.resolveAdCreativeSignaling(e),restrictions:null==(d=this.Ki)?void 0:d.resolveRestrictions(e)}]}})})},e.prototype.playPostRollAds=function(){if(!this.Ki)return Promise.resolve();var e=this.Ki.getPostRollAds();return 0===e.length?Promise.resolve():(this.context.logger.debug("Scheduling playback of post-roll SGAI ads
1with id ".concat(e.map(function(e){return e.id}).join(", ")),e),this.Yi(e))},e.prototype.reset=function(){return r(this,void 0,void 0,function(){var e,t,n,i;return o(this,function(r){switch(r.label){case 0:return this.context.logger.debug("Resetting SGAI service"),this.Ni=!0,this.Pi=!1,this.Oi=void 0,this.context.eventHandler.off(u.PlayerEvent.Playing,this.Si),this.context.eventHandler.off(u.PlayerEvent.TimeChanged,this.Ti),this.context.eventHandler.off(u.PlayerEvent.TimeShift,this.Ui),this.context.eventHandler.off(u.PlayerEvent.TimeShifted,this.Vi),this.context.eventHandler.off(u.PlayerEvent.Seek,this.Wi),this.context.eventHandler.off(u.PlayerEvent.Seeked,this.Xi),this.context.eventHandler.off(u.PlayerEvent.SourceLoaded,this.Ri),null==(e=this.Qi)||e.reject(),this.Qi=void 0,this.Ki=(0,a.dispose)(this.Ki),null==(n=null==(t=this.context.serviceManager)?void 0:t.get(s.ServiceName.AdPreloadSequencerService))||n.cancel(),[4,null==(i=this.Li)?void 0:i.dispose()];case 1:return r.sent(),this.Li=void 0,this.Mi=!1,[2]}})})},e.prototype.dispose=function(){},e}()},43661:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.getDvrWindowStart=function(e){return e.isLive()?e.getCurrentTime()-e.getTimeShift()+e.getMaxTimeShift():-1/0},t.isPlayingHls=function(e){return e.sourceContext.technology.streaming===i.StreamType.Hls},t.isHlsManifestUri=r,t.isProgressiveMediaUrl=function(e){return!r(e)&&e.toLowerCase().includes(".mp4")};var i=n(20213);function r(e){return e.toLowerCase().includes(".m3u8")}},13117:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.ViewabilityTracker=void 0;var i=n(3714),r=n(84770),o=n(28038);t.ViewabilityTracker=function(){function e(e,t,n){var i=this;this.context=e,this.config=t,this.onDecision=n,this.ffb=!1,this.gfb=!1,this.hfb=!0,this.ifb=0,this.jfb=null,this.lfb={paused:!1,stalled:!1},this.mfb=null,this.nfb=function(e){i.gfb=!!e.isVisible,i.wfb()},this.ofb=function(){i.hfb=i.xfb(),i.wfb()},this.pfb=function(){i.ffb||i.Bfb(o.AdTrackingEventTrigger.NOT_VIEWABLE)},this.qfb=function(){i.zfb("paused")},this.rfb=function(){i.Afb("paused")},this.sfb=function(){i.zfb("stalled")},this.tfb=function(){i.Afb("stalled")},this.vfb=function(){var e,t=Date.now();i.ffb||!i.ufb()||i.Dfb()?i.mfb=t:(i.ifb+=t-(null!=(e=i.mfb)?e:t),i.mfb=t,i.ifb>=i.config.viewableDurationMs&&i.Bfb(o.AdTrackingEventTrigger.VIEWABLE))},this.kfb=new r.PausableTimeout(this.config.decisionTimeoutMs,this.pfb)}return e.prototype.start=function(){this.ffb||(this.yfb()?(this.hfb=this.xfb(),this.gfb=!!this.context.internalPlayer.getVisibility().isVisible,this.wfb(),this.context.eventHandler.on(i.PlayerEvent.VisibilityChanged,this.nfb),this.context.eventHandler.on(i.PlayerEvent.Paused,this.qfb),this.context.eventHandler.on(i.PlayerEvent.Playing,this.rfb),this.context.eventHandler.on(i.PlayerEvent.StallStarted,this.sfb),this.context.eventHandler.on(i.PlayerEvent.StallEnded,this.tfb),document.addEventListener("visibilitychange",this.ofb,{passive:!0}),this.kfb.start(),this.mfb=Date.now(),this.ifb=0,this.jfb=window.setInterval(this.vfb,250)):this.Bfb(o.AdTrackingEventTrigger.VIEW_UNDETERMINED))},e.prototype.ufb=function(){return this.gfb&&this.hfb},e.prototype.wfb=function(){this.gfb&&this.hfb||(this.ifb=0)},e.prototype.xfb=function(){return"string"==typeof document.visibilityState?"visible"===document.visibilityState:"boolean"==typeof document.hidden&&!document.hidden},e.prototype.yfb=function(){var e,t;return"u">typeof window&&"u">typeof document&&"function"==typeof document.addEventListener&&"function"==typeof document.removeEventListener&&("string"==typeof document.visibilityState||"boolean"==typeof document.hidden)&&!!(null==(e=this.context.eventHandler)?void 0:e.on)&&!!(null==(t=this.context.eventHandler)?void 0:t.off)},e.prototype.zfb=function(e){if(!this.lfb[e]){var t=!this.Dfb();this.lfb[e]=!0,t&&this.kfb.pause()}},e.prototype.Afb=function(e){this.lfb[e]&&(this.lfb[e]=!1,this.Dfb()||this.kfb.resume())},e.prototype.Bfb=function(e){this.ffb||(this.ffb=!0,this.Cfb(),this.onDecision(e))},e.prototype.Cfb=function(){this.context.eventHandler.off(i.PlayerEvent.VisibilityChanged,this.nfb),this.context.eventHandler.off(i.PlayerEvent.Paused,this.qfb),this.context.eventHandler.off(i.PlayerEvent.Playing,this.rfb),this.context.eventHandler.off(i.PlayerEvent.StallStarted,this.sfb),this.context.eventHandler.off(i.PlayerEvent.StallEnded,this.tfb),document.removeEventListener("visibilitychange",this.ofb),null!==this.jfb&&(window.clearInterval(this.jfb),this.jfb=null,this.mfb=null),this.kfb.pause()},e.prototype.reset=function(){this.Cfb(),this.ffb=!1,this.ifb=0,this.lfb.paused=!1,this.lfb.stalled=!1,this.kfb.reset()},e.prototype.Dfb=function(){return this.lfb.paused||this.lfb.stalled},e.prototype.dispose=function(){this.Cfb(),this.kfb.dispose()},e}()}
1,22705:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.defaultCustomAttributesMapping=void 0;var i=n(61933),r=n(28038),o=function(e,t){if(t&&0!==t.length)for(var n=function(t,n){n.urls&&n.urls.length>0&&e.tracking.register(t,[{urls:n.urls,offset:n.offset}])},i=0;i<t.length;i++){var o=t[i];switch(o.type){case r.AdTrackingEventTrigger.CLICKED:n(r.AdTrackingEventTrigger.CLICKED,o);break;case r.AdTrackingEventTrigger.IMPRESSION:n(r.AdTrackingEventTrigger.IMPRESSION,o);break;case r.AdTrackingEventTrigger.COMPLETE:n(r.AdTrackingEventTrigger.COMPLETE,o);break;case r.AdTrackingEventTrigger.START:n(r.AdTrackingEventTrigger.START,o);break;case r.AdTrackingEventTrigger.FIRST_QUARTILE:n(r.AdTrackingEventTrigger.FIRST_QUARTILE,o);break;case r.AdTrackingEventTrigger.MIDPOINT:n(r.AdTrackingEventTrigger.MIDPOINT,o);break;case r.AdTrackingEventTrigger.THIRD_QUARTILE:n(r.AdTrackingEventTrigger.THIRD_QUARTILE,o);break;case r.AdTrackingEventTrigger.PAUSE:n(r.AdTrackingEventTrigger.PAUSE,o);break;case r.AdTrackingEventTrigger.RESUME:n(r.AdTrackingEventTrigger.RESUME,o);break;case r.AdTrackingEventTrigger.MUTE:n(r.AdTrackingEventTrigger.MUTE,o);break;case r.AdTrackingEventTrigger.UNMUTE:n(r.AdTrackingEventTrigger.UNMUTE,o);break;case r.AdTrackingEventTrigger.ERROR:n(r.AdTrackingEventTrigger.ERROR,o);break;case r.AdTrackingEventTrigger.LOADED:n(r.AdTrackingEventTrigger.LOADED,o);break;case r.AdTrackingEventTrigger.PROGRESS:n(r.AdTrackingEventTrigger.PROGRESS,o);break;case r.AdTrackingEventTrigger.SKIP:n(r.AdTrackingEventTrigger.SKIP,o);break;case r.AdTrackingEventTrigger.VIEWABLE:n(r.AdTrackingEventTrigger.VIEWABLE,o);break;case r.AdTrackingEventTrigger.NOT_VIEWABLE:n(r.AdTrackingEventTrigger.NOT_VIEWABLE,o);break;case r.AdTrackingEventTrigger.VIEW_UNDETERMINED:n(r.AdTrackingEventTrigger.VIEW_UNDETERMINED,o)}}};t.defaultCustomAttributesMapping=function(e,t){var n,r,s=null==(r=e.customAttributes)?void 0:r[i.AD_CREATIVE_SIGNALING_KEY];if(s){o(t,s.tracking);for(var a=0,u=(n=s.payload)?Array.isArray(n)?n:[n]:[];a<u.length;a++){var l=u[a];l.clickThrough&&!t.clickThroughUrl&&(t.clickThroughUrl=l.clickThrough),o(t,l.tracking)}}}},3093:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.fireSgaiAdError=function(e,t,n,a){var u={code:t};n&&(u.message=n);var l=function(e){if(e instanceof r.PlayerError||(null==e?void 0:e.type)===o.PlayerEvent.Error)return{code:e.code,name:e.name,message:e.message,data:e.data}}(a);l&&(u.deficiencyData=l),e.internalPlayer.fireEvent(o.PlayerEvent.AdError,{code:i.ErrorCode.MODULE_SGAI_ERROR,name:i.ErrorCode[i.ErrorCode.MODULE_SGAI_ERROR],data:u,message:n,troubleShootLink:(0,s.generateTroubleshootUrl)(i.ErrorCode.MODULE_SGAI_ERROR)})};var i=n(40306),r=n(3336),o=n(3714),s=n(51289)},68856:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.fireSgaiWarning=function(e,t,n){e.internalPlayer.fireEvent(r.PlayerEvent.Warning,new i.PlayerWarning(t,n))};var i=n(25926),r=n(3714)}},function(e){return e(e.s=60047)}])}()},59182:function(e,t,n){"use strict";var i,r=this&&this.__extends||(i=function(e,t){return(i=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])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__spreadArray||function(e,t,n){if(n||2==arguments.length)for(var i,r=0,o=t.length;r<o;r++)!i&&r in t||(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.SettingsPanelNavigationGroup=t.SettingsPanelNavigationGroupConfig=void 0;var s=n(16998),a=n(90753),u=n(94198),l=n(78196);t.SettingsPanelNavigationGroupConfig=function(){},t.SettingsPanelNavigationGroup=function(e){function t(t,n){void 0===n&&(n=void 0);var i=this,r=t.getRootPage().getItems();return(i=e.apply(this,o([t],r,!1))||this).settingsPanel=t,i.config=Object.assign({},i.config,{closeOnSelect:!0},n),t.onActivePageChanged.subscribe(function(){i.activeComponent=void 0,i.focusFirstC
1omponent()}),i}return r(t,e),t.prototype.getComponents=function(){var e=this.settingsPanel.getActivePage().getItems(),t=[];return e.forEach(function(e){e instanceof l.InteractiveSettingsPanelItem?t.push(e):t.push.apply(t,(0,u.resolveAllComponents)(e))}),t},t.prototype.defaultActionHandler=function(t){return t===a.Action.BACK?(this.settingsPanel.popSettingsPanelPage(),!0):t===a.Action.SELECT?(e.prototype.defaultActionHandler.call(this,t),this.config.closeOnSelect&&(this.settingsPanel.hide(),e.prototype.defaultActionHandler.call(this,a.Action.BACK)),!0):e.prototype.defaultActionHandler.call(this,t)},t}(s.NavigationGroup)},59579:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SubtitleSettingsProperty=t.SubtitleSettingsManager=void 0;var i=n(53135),r=n(85704),o=n(6635);t.SubtitleSettingsManager=function(){function e(){this._properties={fontColor:new s(this),fontOpacity:new s(this),fontFamily:new s(this),fontSize:new s(this),fontStyle:new s(this),characterEdge:new s(this),characterEdgeColor:new s(this),backgroundColor:new s(this),backgroundOpacity:new s(this),windowColor:new s(this),windowOpacity:new s(this)},this.userSettings={},this.localStorageKey=(0,o.prefixCss)("subtitlesettings")}return e.prototype.reset=function(){for(var e in this._properties)this._properties[e].clear()},Object.defineProperty(e.prototype,"fontColor",{get:function(){return this._properties.fontColor},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"fontOpacity",{get:function(){return this._properties.fontOpacity},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"fontFamily",{get:function(){return this._properties.fontFamily},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"fontSize",{get:function(){return this._properties.fontSize},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"fontStyle",{get:function(){return this._properties.fontStyle},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"characterEdge",{get:function(){return this._properties.characterEdge},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"characterEdgeColor",{get:function(){return this._properties.characterEdgeColor},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"backgroundColor",{get:function(){return this._properties.backgroundColor},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"backgroundOpacity",{get:function(){return this._properties.backgroundOpacity},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"windowColor",{get:function(){return this._properties.windowColor},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"windowOpacity",{get:function(){return this._properties.windowOpacity},enumerable:!1,configurable:!0}),e.prototype.initialize=function(){var e=this,t=function(t){n._properties[t].onChanged.subscribe(function(n,i){i.isSet()?e.userSettings[t]=i.value:delete e.userSettings[t],e.save()})},n=this;for(var i in this._properties)t(i);this.load()},e.prototype.save=function(){i.StorageUtils.setObject(this.localStorageKey,this.userSettings)},e.prototype.load=function(){for(var e in this.userSettings=i.StorageUtils.getObject(this.localStorageKey)||{},this.userSettings)this._properties[e].value=this.userSettings[e]},e}();var s=function(){function e(e){this._manager=e,this._onChanged=new r.EventDispatcher}return e.prototype.isSet=function(){return null!=this._value},e.prototype.clear=function(){this._value=null,this.onChangedEvent(null)},Object.defineProperty(e.prototype,"value",{get:function(){return this._value},set:function(e){"string"==typeof e&&"null"===e&&(e=null),this._value=e,this.onChangedEvent(e)},enumerable:!1,configurable:!0}),e.prototype.onChangedEvent=function(e){this._onChanged.dispatch(this._manager,this)},Object.defineProperty(e.prototype,"onChanged",{get:function(){return this._onChanged.getEvent()},enumerable:!1,configurable:!0}),e}();t.SubtitleSettingsProperty=s},60845:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AdBreakTracker=void 0;var i=n(85704);t.AdBreakTracker=function(){function e(e){var t=this;this.player=e,this.groupBreaks=[],this.groupScheduleTime=void 0,this.events={onAdCountChanged:new i.EventDispatcher},this.handleAdStarted=function(){var e,n,i,r,o,s=null==(n=null==(e=t.player.ads)?void 0:e.getActiveAdBreak)?void 0:n.call(e);
1if(!s){t.reset(),t.dispatchChanged();return}var a=(null!=(o=null==(r=null==(i=t.player.ads)?void 0:i.list)?void 0:r.call(i))?o:[]).some(function(e){return e.scheduleTime===s.scheduleTime}),u=t.groupBreaks.length>0&&s.scheduleTime===t.groupScheduleTime;u||a?(!u&&t.groupBreaks.length>0&&(t.groupBreaks=[]),t.groupScheduleTime=s.scheduleTime,t.groupBreaks.includes(s)||t.groupBreaks.push(s)):(t.groupBreaks=[s],t.groupScheduleTime=void 0),t.dispatchChanged()},this.handleAdBreakFinished=function(e){if(e.adBreak.scheduleTime!==t.groupScheduleTime){void 0===t.groupScheduleTime&&(t.reset(),t.dispatchChanged());return}var n,i,r,o,s,a=(null!=(r=null==(i=null==(n=t.player.ads)?void 0:n.list)?void 0:i.call(n))?r:[]).filter(function(e){return e.scheduleTime===t.groupScheduleTime}),u=null==(s=null==(o=t.player.ads)?void 0:o.getActiveAdBreak)?void 0:s.call(o),l=(null==u?void 0:u.scheduleTime)===t.groupScheduleTime&&void 0!==t.groupScheduleTime;0!==a.length||l||(t.reset(),t.dispatchChanged())},e.on(e.exports.PlayerEvent.AdStarted,this.handleAdStarted),e.on(e.exports.PlayerEvent.AdBreakFinished,this.handleAdBreakFinished)}return Object.defineProperty(e.prototype,"onAdCountChanged",{get:function(){return this.events.onAdCountChanged.getEvent()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"currentAdIndex",{get:function(){var e,t,n,i,r,o=null==(t=null==(e=this.player.ads)?void 0:e.getActiveAd)?void 0:t.call(e);if(!o||0===this.groupBreaks.length)return 0;for(var s=0,a=0,u=this.groupBreaks;a<u.length;a++){var l=u[a],c=null!=(n=l.ads)?n:[];if(c.length>0){var d=c.findIndex(function(e){return null!=o.id&&null!=e.id?e.id===o.id:e===o});if(d>=0)return s+d+1;s+=c.length}else{var p=null==(r=null==(i=this.player.ads)?void 0:i.getActiveAdBreak)?void 0:r.call(i);if(p===l||(null==p?void 0:p.id)!=null&&p.id===l.id)return s+1;s+=1}}return s+1},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"totalNumberOfAds",{get:function(){var e,t,n,i=this;return 0===this.groupBreaks.length?0:this.groupBreaks.reduce(function(e,t){var n;return e+((null==(n=t.ads)?void 0:n.length)>0?t.ads.length:1)},0)+(null!=(n=null==(t=null==(e=this.player.ads)?void 0:e.list)?void 0:t.call(e))?n:[]).filter(function(e){return e.scheduleTime===i.groupScheduleTime}).reduce(function(e,t){var n;return e+((null==(n=t.ads)?void 0:n.length)>0?t.ads.length:1)},0)},enumerable:!1,configurable:!0}),e.prototype.release=function(){this.player.off(this.player.exports.PlayerEvent.AdStarted,this.handleAdStarted),this.player.off(this.player.exports.PlayerEvent.AdBreakFinished,this.handleAdBreakFinished),this.reset(),this.events.onAdCountChanged.unsubscribeAll()},e.prototype.dispatchChanged=function(){this.events.onAdCountChanged.dispatch(this,{currentAdIndex:this.currentAdIndex,totalNumberOfAds:this.totalNumberOfAds})},e.prototype.reset=function(){this.groupBreaks=[],this.groupScheduleTime=void 0},e}()},61401:()=>{},63934:function(e,t,n){"use strict";var i,r=this&&this.__extends||(i=function(e,t){return(i=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])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.AdClickOverlay=void 0,t.AdClickOverlay=function(e){function t(t){void 0===t&&(t={});var n=e.call(this,t)||this;return n.config=n.mergeConfig(t,{acceptsTouchWithUiHidden:!0},n.config),n}return r(t,e),t.prototype.configure=function(t,n){var i=this;e.prototype.configure.call(this,t,n);var r=null;t.on(t.exports.PlayerEvent.AdStarted,function(e){var t=e.ad;i.setUrl(t.clickThroughUrl),r=t.clickThroughUrlOpened});var o=function(){i.setUrl(null)};t.on(t.exports.PlayerEvent.AdFinished,o),t.on(t.exports.PlayerEvent.AdSkipped,o),t.on(t.exports.PlayerEvent.AdError,o),this.onClick.subscribe(function(){t.pause("ui-ad-click-overlay"),r&&r()})},t}(n(51350).ClickOverlay)},63993:function(e,t,n){"use strict";var i,r,o=this&&this.__spreadArray||function(e,t,n){if(n||2==arguments.length)for(var i,r=0,o=t.length;r<o;r++)!i&&r in t||(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))};
vendor: 12,028 bytes, line 1
1Object.defineProperty(t,"__esModule",{value:!0}),t.UIFactory=void 0;var s=n(54362),a=n(57640),u=n(29155),l=n(87319),c=n(97440),d=n(47426),p=n(52023),h=n(89578),f=n(33624),g=n(72319),v=n(27082),y=n(8675),m=n(67216),b=n(66598),S=n(51571),E=n(42059),_=n(51555),T=n(77017),P=n(94944),C=n(93797),A=n(92372),w=n(87427),k=n(41940),O=n(94297),M=n(33278),I=n(20875),x=n(6291),R=n(12485),L=n(68948),D=n(94104),U=n(38509),B=n(20949),N=n(56211),F=n(39263),j=n(49226),H=n(3414),V=n(63934),W=n(83288),z=n(54953),K=n(41113),G=n(46060),q=n(69239),Q=n(24379),X=n(94399),Y=n(27172),J=n(45318),Z=n(40525),$=n(59182),ee=n(51601),et=n(74519),en=n(85251),ei=n(98908),er=n(30194),eo=n(80582),es=n(32400),ea=n(68146),eu=n(1389),el=n(49015),ec=n(2652),ed=n(65746),ep=n(84416),eh=n(96544),ef=r||(t.UIFactory=r={});function eg(e,t,n){void 0===t&&(t=void 0),void 0===n&&(n=!1);var i={components:[],hidden:!0,pageTransitionAnimation:!0};void 0!=t&&(i.hideDelay=t);var r=new p.SettingsPanel(i),o=[new en.DynamicSettingsPanelItem({label:Q.i18n.getLocalizer("settings.video.quality"),settingComponent:new u.VideoQualitySelectBox,container:r}),new en.DynamicSettingsPanelItem({label:Q.i18n.getLocalizer("speed"),settingComponent:new l.PlaybackSpeedSelectBox,container:r}),new en.DynamicSettingsPanelItem({label:Q.i18n.getLocalizer("settings.audio.track"),settingComponent:new c.AudioTrackSelectBox,container:r}),new en.DynamicSettingsPanelItem({label:Q.i18n.getLocalizer("settings.audio.quality"),settingComponent:new d.AudioQualitySelectBox,container:r})],s=new ee.EcoModeContainer;s.setOnToggleCallback(function(){r.getDomElement().css({width:"",height:""})}),o.unshift(s);var v=new a.SettingsPanelPage({components:o});r.addComponent(v);var y=new h.SubtitleSettingsPanelPage({settingsPanel:r,overlay:e,useDynamicSettingsPanelItem:!0}),m=new f.SettingsPanelPageOpenButton({targetPage:y,container:r,ariaLabel:Q.i18n.getLocalizer("settings.subtitles"),text:Q.i18n.getLocalizer("settings.subtitles.options")}),b=new g.SubtitleSelectBox,S=new en.DynamicSettingsPanelItem({label:Q.i18n.getLocalizer("settings.subtitles"),backNavigationRightComponent:m,settingComponent:b,container:r});if(v.addComponent(S),r.addComponent(y),n){var E=new et.PersistentPreferencesToggleButton,_=new er.Label({text:Q.i18n.getLocalizer("persistentPreferences"),for:E.getConfig().id});v.addComponent(new ei.ToggleSettingsPanelItem({label:_,settingComponent:E}))}return r}ef.buildUI=function(e,t){return void 0===t&&(t={}),new q.UIManager(e,[{ui:ef.defaultLayouts.emptyState,condition:function(e){return!e.isSourceLoaded},identifier:q.UIVariantIdentifier.empty},{ui:ef.defaultLayouts.smallScreenAds,condition:function(e){return e.documentWidth<800&&e.isAd&&e.adRequiresUi},identifier:q.UIVariantIdentifier.smallScreenAds},{ui:ef.defaultLayouts.smallScreen,condition:function(e){return!e.isAd&&!e.adRequiresUi&&e.documentWidth<800},identifier:q.UIVariantIdentifier.smallScreen},{ui:ef.defaultLayouts.tvAds,condition:function(e){return e.isTv&&e.isAd&&e.adRequiresUi},identifier:q.UIVariantIdentifier.tvAds},{ui:ef.defaultLayouts.tv,condition:function(e){return e.isTv&&!e.isAd&&!e.adRequiresUi},identifier:q.UIVariantIdentifier.tv},{ui:ef.defaultLayouts.ads,condition:function(e){return e.isAd&&e.adRequiresUi},identifier:q.UIVariantIdentifier.ads},{ui:function(){return ef.defaultLayouts.main(t)},condition:function(e){return!e.isAd&&!e.adRequiresUi},identifier:q.UIVariantIdentifier.main}],t)},ef.buildSmallScreenUI=function(e,t){return void 0===t&&(t={}),new q.UIManager(e,[{ui:ef.defaultLayouts.smallScreenAds,condition:function(e){return e.isAd&&e.adRequiresUi},identifier:q.UIVariantIdentifier.smallScreenAds},{ui:ef.defaultLayouts.smallScreen,condition:function(e){return!e.isAd&&!e.adRequiresUi},identifier:q.UIVariantIdentifier.smallScreen}],t)},ef.buildCastReceiverUI=function(e,t){return void 0===t&&(t={}),new q.UIManager(e,[{ui:ef.defaultLayouts.castReceiver,identifier:q.UIVariantIdentifier.castReceiver}],t)},ef.buildTvUI=function(e,t){return void 0===t&&(t={}),new q.UIManager(e,[{ui:ef.defaultLayouts.tvAds,condition:function(e){return e.isAd&&e.adRequiresUi},identifier:q.UIVariantIdentifier.tvAds},{ui:ef.defaultLayouts.tv,condition:function(e){return!e.isAd&&!e.adRequiresUi},identifier:q.UIVariantIdentifier.tv}],t)},ef.buildSubtitleUI=function(e,t){return void 0===t&&(t={}),new q.UIManager(e,[{ui:ef.defaultLayouts.subtitle,identifier:q.UIVariantIdentifier.subtitle}],t)},(i=ef.defaultLayouts||(ef.defaultLayouts={})).subtitle=function(){var e=new s.SubtitleOverlay,t=new p.SettingsPanel({components:[],hidden:!0}),n=new h.SubtitleSettingsPanelPage({settingsPanel:t,overlay:e});return t.addComponent(n),new R.UIContainer({components:[e,t]})},i.main=function(e){void 0===e&&(e={});var t=new s.SubtitleOverlay,n=ec.BrowserUtils.isMobile?null:new ep.PlayerInsightsPanel({hidden:!0}),i=n?new D.PlayerContextMenu({playerInsightsPanel:n}):null,r=eg(t,void 0,!0===e.showPersistentPreferencesToggle&&!0!==e.disableStorageApi),a=new v.ControlBar({components:[new y.Container({components:[new b.PlaybackTimeLabel({timeLabelMode:b.PlaybackTimeLabelMode.CurrentTime,hideInLivePlayback:!0}),new S.SeekBar({label:new E.SeekBarLabel}),new b.PlaybackTimeLabel({timeLabelMode:b.PlaybackTimeLabelMode.TotalTime,cssClasses:["text-right"]})],cssClasses:["controlbar-top"]}),new y.Container({components:[new T.QuickSeekButton({seekSeconds:-10}),new _.PlaybackToggleButton,new T.QuickSeekButton({seekSeconds:10}),new P.VolumeToggleButton,new C.VolumeSlider,new A.Spacer,new eh.CaptionToggleButton,new w.PictureInPictureToggleButton,new k.AirPlayToggleButton,new O.CastToggleButton,new M.VRToggleButton,new I.SettingsToggleButton({settingsPanel:r}),new x.FullscreenToggleButton],cssClasses:["controlbar-bottom"]})]});return new R.UIContainer({components:o(o(o([t,new L.BufferingOverlay,new U.PlaybackToggleOverlay,new B.CastStatusOverlay,a,new N.TitleBar,new F.RecommendationOverlay,new j.Watermark],n?[n]:[],!0),i?[new ea.DismissClickOverlay({target:i}),i]:[],!0),[new ea.DismissClickOverlay({target:r}),r,new H.ErrorMessageOverlay],!1),hidePlayerStateExceptions:[K.PlayerUtils.PlayerState.Prepared,K.PlayerUtils.PlayerState.Paused,K.PlayerUtils.PlayerState.Finished]})},i.ads=function(){var e=new W.AdControlBar({components:[new y.Container({components:[new m.AdCounterLabel,new S.SeekBar({label:new E.SeekBarLabel}),new b.PlaybackTimeLabel({timeLabelMode:b.PlaybackTimeLabelMode.RemainingTime,cssClasses:["text-right"]})],cssClasses:["ad-controlbar-top"]}),new y.Container({components:[new _.PlaybackToggleButton,new P.VolumeToggleButton,new A.Spacer,new x.FullscreenToggleButton],cssClasses:["ad-controlbar-bottom"]})]});return new R.UIContainer({components:[new L.BufferingOverlay,new V.AdClickOverlay,new U.PlaybackToggleOverlay,new es.AdStatusOverlay,e,new N.TitleBar({components:[new y.Container({components:[new eu.AdMessageLabel],cssClasses:["ui-titlebar-top"]})],keepHiddenWithoutMetadata:!0}),new H.ErrorMessageOverlay],hidePlayerStateExceptions:[K.PlayerUtils.PlayerState.Prepared,K.PlayerUtils.PlayerState.Paused,K.PlayerUtils.PlayerState.Finished],cssClasses:["ui-ads"]})},i.smallScreen=function(){var e=new s.SubtitleOverlay,t=ec.BrowserUtils.isMobile?null:new ep.PlayerInsightsPanel({hidden:!0}),n=t?new D.PlayerContextMenu({playerInsightsPanel:t}):null,i=eg(e,-1),r=new v.ControlBar({components:[new y.Container({components:[new b.PlaybackTimeLabel({timeLabelMode:b.PlaybackTimeLabelMode.CurrentTime,hideInLivePlayback:!0}),new S.SeekBar({label:new E.SeekBarLabel}),new b.PlaybackTimeLabel({timeLabelMode:b.PlaybackTimeLabelMode.TotalTime,cssClasses:["text-right"]})],cssClasses:["controlbar-top"]}),new y.Container({components:[new T.QuickSeekButton({seekSeconds:-10}),new _.PlaybackToggleButton,new T.QuickSeekButton({seekSeconds:10}),new P.VolumeToggleButton,new C.VolumeSlider,new A.Spacer,new eh.CaptionToggleButton,new w.PictureInPictureToggleButton,new I.SettingsToggleButton({settingsPanel:i}),new x.FullscreenToggleButton],cssClasses:["controlbar-bottom"]})]});return new R.UIContainer({components:o(o(o(o([e,new L.BufferingOverlay,new B.CastStatusOverlay,ec.BrowserUtils.isMobile?new eo.TouchControlOverlay:new U.PlaybackToggleOverlay,new F.RecommendationOverlay,r,new N.TitleBar({components:[new y.Container({components:[new z.MetadataLabel({content:z.MetadataLabelContent.Title}),new A.Spacer,new O.CastToggleButton,new k.AirPlayToggleButton,new M.VRToggleButton],cssClasses:["titlebar-row"]})]})],t?[t]:[],!0),[new ea.DismissClickOverlay({target:i}),i],!1),n?[new ea.DismissClickOverlay({target:n}),n]:[],!0),[new H.ErrorMessageOverlay],!1),cssClasses:["ui-smallscreen"],hidePlayerStateExceptions:[K.PlayerUtils.PlayerState.Prepared,K.PlayerUtils.PlayerState.Paused,K.PlayerUtils.PlayerState.Finished]})},i.smallScreenAds=function(){var e=new W.AdControlBar({components:[new y.Container({components:[new m.AdCounterLabel,new S.SeekBar({label:new E.SeekBarLabel}),new b.PlaybackTimeLabel({timeLabelMode:b.PlaybackTimeLabelMode.RemainingTime,cssClasses:["text-right"]})],cssClasses:["ad-controlbar-top"]}),new y.Container({components:[new _.PlaybackToggleButton,new P.VolumeToggleButton,new A.Spacer,new x.FullscreenToggleButton],cssClasses:["ad-controlbar-bottom"]})]});return new R.UIContainer({components:[new L.BufferingOverlay,new V.AdClickOverlay,new U.PlaybackToggleOverlay,e,new N.TitleBar({components:[new y.Container({components:[new eu.AdMessageLabel],cssClasses:["ui-titlebar-top"]})],keepHiddenWithoutMetadata:!0}),new es.AdStatusOverlay,new H.ErrorMessageOverlay],hidePlayerStateExceptions:[K.PlayerUtils.PlayerState.Prepared,K.PlayerUtils.PlayerState.Paused,K.PlayerUtils.PlayerState.Finished],cssClasses:["ui-smallscreen","ui-ads"]})},i.castReceiver=function(){var e=new v.ControlBar({components:[new y.Container({components:[new b.PlaybackTimeLabel({timeLabelMode:b.PlaybackTimeLabelMode.CurrentTime,hideInLivePlayback:!0}),new S.SeekBar({smoothPlaybackPositionUpdateIntervalMs:-1}),new b.PlaybackTimeLabel({timeLabelMode:b.PlaybackTimeLabelMode.TotalTime,cssClasses:["text-right"]})],cssClasses:["controlbar-top"]})]});return new G.CastUIContainer({components:[new s.SubtitleOverlay,new L.BufferingOverlay,new U.PlaybackToggleOverlay,e,new N.TitleBar({keepHiddenWithoutMetadata:!0}),new j.Watermark,new H.ErrorMessageOverlay],cssClasses:["ui-cast-receiver"],hidePlayerStateExceptions:[K.PlayerUtils.PlayerState.Prepared,K.PlayerUtils.PlayerState.Paused,K.PlayerUtils.PlayerState.Finished]})},i.tv=function(){var e=new S.SeekBar({label:new E.SeekBarLabel}),t=new s.SubtitleOverlay,n=eg(t,5e3),i=new X.SubtitleListBox({title:Q.i18n.getLocalizer("settings.subtitles")}),r=new I.SettingsToggleButton({settingsPanel:i,autoHideWhenNoActiveSettings:!0,cssClass:"ui-subtitle-list-box-toggle-button",text:Q.i18n.getLocalizer("settings.subtitles")}),o=new Y.AudioTrackListBox({title:Q.i18n.getLocalizer("settings.audio.track")}),a=new I.SettingsToggleButton({settingsPanel:o,autoHideWhenNoActiveSettings:!0,cssClass:"ui-audio-track-list-box-toggle-button",text:Q.i18n.getLocalizer("settings.audio.track")}),u=new N.TitleBar({components:[new y.Container({components:[new z.MetadataLabel({content:z.MetadataLabelContent.Title})],cssClasses:["ui-titlebar-top"]}),new y.Container({components:[new z.MetadataLabel({content:z.MetadataLabelContent.Description})],cssClasses:["ui-titlebar-bottom"]})]}),l=new _.PlaybackToggleButton,c=new y.Container({components:[l,new A.Spacer,new eh.CaptionToggleButton,r,a,new I.SettingsToggleButton({settingsPanel:n})],cssClasses:["controlbar-bottom"]}),d=new v.ControlBar({components:[new y.Container({components:[new b.PlaybackTimeLabel({timeLabelMode:b.PlaybackTimeLabelMode.CurrentTime,hideInLivePlayback:!0}),e,new b.PlaybackTimeLabel({timeLabelMode:b.PlaybackTimeLabelMode.TotalTime,cssClasses:["text-right"]})],cssClasses:["controlbar-top"]}),c]}),p=new U.PlaybackToggleOverlay,h=new F.RecommendationOverlay,f=new R.UIContainer({components:[t,new L.BufferingOverlay,p,d,u,n,i,o,h,new H.ErrorMessageOverlay],cssClasse
1s:["ui-tv"],hidePlayerStateExceptions:[K.PlayerUtils.PlayerState.Prepared,K.PlayerUtils.PlayerState.Paused,K.PlayerUtils.PlayerState.Finished]}),g=new J.SpatialNavigation(new Z.RootNavigationGroup(f,p,e,new el.FocusableContainer(c,l)),new $.SettingsPanelNavigationGroup(n,{closeOnSelect:!1}),new $.SettingsPanelNavigationGroup(i),new $.SettingsPanelNavigationGroup(o),new ed.RecommendationOverlayNavigationGroup(h));return{ui:f,spatialNavigation:g}},i.tvAds=function(){var e=new U.PlaybackToggleOverlay,t=new es.AdStatusOverlay,n=new R.UIContainer({components:[new L.BufferingOverlay,new V.AdClickOverlay,e,t,new W.AdControlBar({components:[new y.Container({components:[new m.AdCounterLabel,new S.SeekBar({label:new E.SeekBarLabel}),new b.PlaybackTimeLabel({timeLabelMode:b.PlaybackTimeLabelMode.RemainingTime,cssClasses:["text-right"]})],cssClasses:["ad-controlbar-top"]})]}),new N.TitleBar({components:[new y.Container({components:[new eu.AdMessageLabel],cssClasses:["ui-titlebar-top"]})],keepHiddenWithoutMetadata:!0}),new H.ErrorMessageOverlay],cssClasse
1s:["ui-tv","ui-ads"],hidePlayerStateExceptions:[K.PlayerUtils.PlayerState.Prepared,K.PlayerUtils.PlayerState.Paused,K.PlayerUtils.PlayerState.Finished]}),i=new J.SpatialNavigation(new Z.RootNavigationGroup(n,e,t.adSkipButton));return{ui:n,spatialNavigation:i}},i.emptyState=function(){return new R.UIContainer({components:[new L.BufferingOverlay,new U.PlaybackToggleOverlay,new H.ErrorMessageOverlay],cssClasses:["ui","ui-empty-state"]})}},64693:function(e,t,n){"use strict";var i,r=this&&this.__extends||(i=function(e,t){return(i=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])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.PlayerInsightsContextMenuItem=void 0;var o=n(24379),s=n(34594),a=n(30194);t.PlayerInsightsContextMenuItem=function(e){function t(t){var n=e.call(this,t)||this,i=new a.Label({text:o.i18n.getLocalizer("playerInsights.show")});return n.config=n.mergeConfig(t,{ariaLabel:o.i18n.getLocalizer("playerInsights.show"),closeContextMenuOnAction:!0},n.config),n.itemLabel=i,n.playerInsightsPanel=t.playerInsightsPanel,n.addComponent(i),n}return r(t,e),t.prototype.configure=function(t,n){var i=this;e.prototype.configure.call(this,t,n);var r=function(){var e=i.playerInsightsPanel.isShown()?o.i18n.getLocalizer("playerInsights.hide"):o.i18n.getLocalizer("playerInsights.show");i.itemLabel.setText(e),i.setAriaLabel(e)};this.playerInsightsPanel.onShow.subscribe(r),this.playerInsightsPanel.onHide.subscribe(r),this.onClick.subscribe(function(){return i.playerInsightsPanel.toggleHidden()}),r()},t}(s.InteractiveContextMenuItem)},64695:function(e,t,n){"use strict";var i,r=this&&this.__extends||(i=function(e,t){return(i=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])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(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 o=n(72177),s=n(24379);t.FontStyleSelectBox=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 r(t,e),t.prototype.configure=function(t,n){var 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==(i=this.settingsManager)||i.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)}),this.initFromSettings()},t.prototype.initFromSettings=function(){var e;(null==(e=this.settingsManager)?void 0:e.fontStyle.isSet())&&(this.selectItem(this.settingsManager.fontStyle.value),this.toggleOverlayClass("fontstyle-"+this.settingsManager.fontStyle.value))},t}(o.SubtitleSettingSelectBox)},65135:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getMinBufferLevel=function(e){var t=e.getDuration(),n=e.getVideoBufferLength(),i=e.getAudioBufferLength(),r=Math.min(null!=n?n:Number.MAX_VALUE,null!=i?i:Number.MAX_VALUE);return r===Number.MAX_VALUE&&(r=0),100/t*r}},65492:function(e,t,n){"use strict";var i,r=this&&this.__extends||(i=function(e,t){return(i=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])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});
1Object.defineProperty(t,"__esModule",{value:!0}),t.TvNoiseCanvas=void 0;var o=n(86051),s=n(4437);t.TvNoiseCanvas=function(e){function t(t){void 0===t&&(t={});var n=e.call(this,t)||this;return n.canvasWidth=160,n.canvasHeight=90,n.interferenceHeight=50,n.lastFrameUpdate=0,n.frameInterval=60,n.useAnimationFrame=!!window.requestAnimationFrame,n.config=n.mergeConfig(t,{cssClass:"ui-tvnoisecanvas"},n.config),n}return r(t,e),t.prototype.toDomElement=function(){return this.canvas=new s.DOM("canvas",{class:this.getCssClasses()},this)},t.prototype.start=function(){this.canvasElement=this.canvas.get(0),this.canvasContext=this.canvasElement.getContext("2d"),this.noiseAnimationWindowPos=-this.canvasHeight,this.lastFrameUpdate=0,this.canvasElement.width=this.canvasWidth,this.canvasElement.height=this.canvasHeight,this.renderFrame()},t.prototype.stop=function(){this.useAnimationFrame?cancelAnimationFrame(this.frameUpdateHandlerId):clearTimeout(this.frameUpdateHandlerId)},t.prototype.renderFrame=function(){if(this.lastFrameUpdate+this.frameInterval>new Date().getTime())return void this.scheduleNextRender();for(var e,t=this.canvasWidth,n=this.canvasHeight,i=this.canvasContext.createImageData(t,n),r=0;r<n;r++)for(var o=0;o<t;o++)e=t*r*4+4*o,i.data[e]=255*Math.random(),(r<this.noiseAnimationWindowPos||r>this.noiseAnimationWindowPos+this.interferenceHeight)&&(i.data[e]*=.85),i.data[e+1]=i.data[e],i.data[e+2]=i.data[e],i.data[e+3]=50;this.canvasContext.putImageData(i,0,0),this.lastFrameUpdate=new Date().getTime(),this.noiseAnimationWindowPos+=7,this.noiseAnimationWindowPos>n&&(this.noiseAnimationWindowPos=-n),this.scheduleNextRender()},t.prototype.scheduleNextRender=function(){this.useAnimationFrame?this.frameUpdateHandlerId=window.requestAnimationFrame(this.renderFrame.bind(this)):this.frameUpdateHandlerId=window.setTimeout(this.renderFrame.bind(this),this.frameInterval)},t}(o.Component)},65746:function(e,t,n){"use strict";var i,r=this&&this.__extends||(i=function(e,t){return(i=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])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.RecommendationOverlayNavigationGroup=void 0;var o=n(16998),s=n(49015);t.RecommendationOverlayNavigationGroup=function(e){function t(t){var n=e.call(this,t,t.replayButton,new s.FocusableContainer(t.recommendationContainer))||this;return n.recommendationOverlay=t,n}return r(t,e),t.prototype.getComponents=function(){return this.recommendationOverlay.recommendationContainer.getComponents().length>0?e.prototype.getComponents.call(this):[this.recommendationOverlay.replayButton]},t}(o.NavigationGroup)},66598:function(e,t,n){"use strict";var i,r,o,s=this&&this.__extends||(r=function(e,t){return(r=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])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.PlaybackTimeLabel=t.PlaybackTimeLabelMode=void 0;var a=n(30194),u=n(41113),l=n(27717),c=n(24379);(i=o||(t.PlaybackTimeLabelMode=o={}))[i.CurrentTime=0]="CurrentTime",i[i.TotalTime=1]="TotalTime",i[i.CurrentAndTotalTime=2]="CurrentAndTotalTime",i[i.RemainingTime=3]="RemainingTime",t.PlaybackTimeLabel=function(e){function t(t){void 0===t&&(t={});var n=e.call(this,t)||this;return n.config=n.mergeConfig(t,{cssClass:"ui-playbacktimelabel",timeLabelMode:o.CurrentAndTotalTime,hideInLivePlayback:!1},n.config),n}return s(t,e),t.prototype.configure=function(t,n){var i=this;e.prototype.configure.call(this,t,n);var r=this.getConfig(),o=!1,s=this.prefixCss("ui-playbacktimelabel-live"),a=this.prefixCss("ui-playbacktimelabel-live-edge"),d=0,p=function(){t.timeShift(0)},h=function(e){("Enter"===e.key||" "===e.key||"Space"===e.code)&&(e.preventDefault(),e.repeat||p())},f=function(){var e=i.getDomElement();e.attr("tabindex","0"),e.attr("role","button");var t=c.i18n.performLocalization(c.i18n.getLocalizer("live"));i.setAriaLabel(c.i18n.getLocalizer("live.jumpToLiveEdge",{liveLabel:t}
1)),i.onClick.subscribe(p),e.on("keydown",h)},g=function(){var e=i.getDomElement();e.attr("tabindex",r.tabIndex.toString()),e.removeAttr("role"),e.removeAttr("aria-label"),i.onClick.unsubscribe(p),e.off("keydown",h)},v=function(){(o=t.isLive())?(i.getDomElement().addClass(s),i.setText(c.i18n.getLocalizer("live")),r.hideInLivePlayback?i.hide():f(),y()):(i.getDomElement().removeClass(s),i.getDomElement().removeClass(a),i.show(),g())},y=function(){if(o){var e=0>t.getTimeShift(),n=0>t.getMaxTimeShift();e||t.isPaused()&&n?i.getDomElement().removeClass(a):i.getDomElement().addClass(a)}},m=function(){o||t.getDuration()===1/0||i.setTime(u.PlayerUtils.getCurrentTimeRelativeToSeekableRange(t),t.getDuration());var e=i.getDomElement().width();e>d&&(d=e,i.getDomElement().css({"min-width":d+"px"}))},b=function(){i.timeFormat=Math.abs(t.isLive()?t.getMaxTimeShift():t.getDuration())>=3600?l.StringUtils.FORMAT_HHMMSS:l.StringUtils.FORMAT_MMSS,m()},S=new u.PlayerUtils.LiveStreamDetector(t,n);S.onLiveChanged.subscribe(function(e,t){o=t.live,m(),b(),v()}),S.detect();var E=function(){d=0,i.getDomElement().css({"min-width":null}),b()};t.on(t.exports.PlayerEvent.TimeChanged,m),t.on(t.exports.PlayerEvent.Ready,b),t.on(t.exports.PlayerEvent.Seeked,m),t.on(t.exports.PlayerEvent.TimeShift,y),t.on(t.exports.PlayerEvent.TimeShifted,y),t.on(t.exports.PlayerEvent.Playing,y),t.on(t.exports.PlayerEvent.Paused,y),t.on(t.exports.PlayerEvent.StallStarted,y),t.on(t.exports.PlayerEvent.StallEnded,y),t.on(t.exports.PlayerEvent.DurationChanged,E),n.getConfig().events.onUpdated.subscribe(E),E()},t.prototype.setTime=function(e,t){var n=l.StringUtils.secondsToTime(e,this.timeFormat),i=l.StringUtils.secondsToTime(t,this.timeFormat);switch(this.config.timeLabelMode){case o.CurrentTime:this.setText("".concat(n));break;case o.TotalTime:this.setText("".concat(i));break;case o.CurrentAndTotalTime:this.setText("".concat(n," / ").concat(i));break;case o.RemainingTime:this.setText("".concat(l.StringUtils.secondsToTime(t-e,this.timeFormat)))}},t.prototype.setTimeFormat=function(e){this.timeFormat=e},t}(a.Label)},67216:function(e,t,n){"use strict";var i,r=this&&this.__extends||(i=function(e,t){return(i=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])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.AdCounterLabel=void 0;var o=n(24379),s=n(27717);t.AdCounterLabel=function(e){function t(t){void 0===t&&(t={});var n=e.call(this,t)||this;return n.adBreakTrackerAdCountChangedHandler=function(e,t){n.setAdCounterFromAdBreakTracker(t.currentAdIndex,t.totalNumberOfAds)},n.config=n.mergeConfig(t,{cssClass:"ui-label-ad-counter",text:o.i18n.getLocalizer("ad"),adCountOutOfTotal:o.i18n.getLocalizer("ads.adNumberOfTotal")},n.config),n}return r(t,e),t.prototype.configure=function(t,n){e.prototype.configure.call(this,t,n),this.player=t,this.adBreakTracker=n.getConfig().adBreakTracker,this.adBreakTracker.onAdCountChanged.subscribe(this.adBreakTrackerAdCountChangedHandler),this.adBreakTracker.currentAdIndex>0&&this.adBreakTracker.totalNumberOfAds>0&&this.setAdCounterFromAdBreakTracker(this.adBreakTracker.currentAdIndex,this.adBreakTracker.totalNumberOfAds)},t.prototype.release=function(){var t;null==(t=this.adBreakTracker)||t.onAdCountChanged.unsubscribe(this.adBreakTrackerAdCountChangedHandler),this.adBreakTracker=void 0,this.player=void 0,e.prototype.release.call(this)},t.prototype.onLanguageChanged=function(){var e,t,n,i,r,o;((null==(e=this.adBreakTracker)?void 0:e.currentAdIndex)>0||(null==(i=null==(n=null==(t=this.player)?void 0:t.ads)?void 0:n.isLinearAdActive)?void 0:i.call(n)))&&this.setAdCounterFromAdBreakTracker(null==(r=this.adBreakTracker)?void 0:r.currentAdIndex,null==(o=this.adBreakTracker)?void 0:o.totalNumberOfAds)},t.prototype.getAdMessage=function(t,n,i,r){var o,s,a=null!=i?i:null==(o=this.adBreakTracker)?void 0:o.currentAdIndex,u=null!=r?r:null==(s=this.adBreakTracker)?void 0:s.totalNumberOfAds;return a>0&&u>1?this.getAdCounterMessage(t,a,u):e.prototype.getAdMessage.call(this,t,n)},t.prototype.setAdCounterFromAdBreakTracker=function(e,t){var n,i;0===e&&0===t?this.setText(""):this.setText(this.getAdMessage(this.player,null==(i=null==(n=this.player.ads)?void 0:n.getActiveAd)?void 0:i.call(n),e,t))},t.prototype.getAdCounterMessage=function(e,t,n){return s.StringUtils.replaceAdMessagePlaceholders(o.i18n.performLocalization(this.config.adCountOutOfTotal),e,void 0,t,n)},t}(n(1389).AdMessageLabel)},67598:function(e,t,n){"use strict";
1var i,r=this&&this.__extends||(i=function(e,t){return(i=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])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.ToggleButton=void 0;var o=n(94474),s=n(85704);t.ToggleButton=function(e){function t(t){var n=e.call(this,t)||this;return n.toggleButtonEvents={onToggle:new s.EventDispatcher,onToggleOn:new s.EventDispatcher,onToggleOff:new s.EventDispatcher},t.onAriaLabel&&(t.ariaLabel=t.onAriaLabel),n.config=n.mergeConfig(t,{cssClass:"ui-togglebutton",onClass:"on",offClass:"off"},n.config),n.useAriaPressedAttributeAsToggleIndicator=!n.config.onAriaLabel||!n.config.offAriaLabel,n}return r(t,e),t.prototype.configure=function(t,n){e.prototype.configure.call(this,t,n);var i=this.getConfig();this.getDomElement().addClass(this.prefixCss(i.offClass)),this.useAriaPressedAttributeAsToggleIndicator=!this.config.onAriaLabel||!this.config.offAriaLabel,this.useAriaPressedAttributeAsToggleIndicator?this.setAriaAttr("pressed","false"):this.setAriaLabel(this.config.offAriaLabel)},t.prototype.on=function(){if(this.isOff()){var e=this.getConfig();this.onState=!0,this.getDomElement().removeClass(this.prefixCss(e.offClass)),this.getDomElement().addClass(this.prefixCss(e.onClass)),this.onToggleEvent(),this.onToggleOnEvent(),this.useAriaPressedAttributeAsToggleIndicator?this.setAriaAttr("pressed","true"):this.setAriaLabel(this.config.onAriaLabel)}},t.prototype.off=function(){if(this.isOn()){var e=this.getConfig();this.onState=!1,this.getDomElement().removeClass(this.prefixCss(e.onClass)),this.getDomElement().addClass(this.prefixCss(e.offClass)),this.onToggleEvent(),this.onToggleOffEvent(),this.useAriaPressedAttributeAsToggleIndicator?this.setAriaAttr("pressed","false"):this.setAriaLabel(this.config.offAriaLabel)}},t.prototype.toggle=function(){this.isOn()?this.off():this.on()},t.prototype.isOn=function(){return this.onState},t.prototype.isOff=function(){return!this.isOn()},t.prototype.onClickEvent=function(){e.prototype.onClickEvent.call(this),this.onToggleEvent()},t.prototype.onToggleEvent=function(){this.toggleButtonEvents.onToggle.dispatch(this)},t.prototype.onToggleOnEvent=function(){this.toggleButtonEvents.onToggleOn.dispatch(this)},t.prototype.onToggleOffEvent=function(){this.toggleButtonEvents.onToggleOff.dispatch(this)},Object.defineProperty(t.prototype,"onToggle",{get:function(){return this.toggleButtonEvents.onToggle.getEvent()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onToggleOn",{get:function(){return this.toggleButtonEvents.onToggleOn.getEvent()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onToggleOff",{get:function(){return this.toggleButtonEvents.onToggleOff.getEvent()},enumerable:!1,configurable:!0}),t}(o.Button)},68146:function(e,t,n){"use strict";var i,r=this&&this.__extends||(i=function(e,t){return(i=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])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.DismissClickOverlay=void 0;var o=n(8675),s=n(52023);t.DismissClickOverlay=function(e){function t(t){var n=e.call(this,t)||this;return n.config=n.mergeConfig(t,{cssClass:"ui-dismiss-click-overlay",role:n.config.role},n.config),n}return r(t,e),t.prototype.configure=function(t,n){var i=this;e.prototype.configure.call(this,t,n),this.config.target.onShow.subscribe(function(){i.show()}),this.config.target.onHide.subscribe(function(){i.hide()}),this.getDomElement().on("click",function(){i.config.target instanceof s.SettingsPanel?i.config.target.hideAndReset():i.config.target.hide()})},t}(o.Container)},68948:function(e,t,n){"use strict";
1var i,r=this&&this.__extends||(i=function(e,t){return(i=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])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.BufferingOverlay=void 0;var o=n(8675),s=n(86051),a=n(80432);t.BufferingOverlay=function(e){function t(t){void 0===t&&(t={});var n=e.call(this,t)||this;return n.indicators=[new s.Component({tag:"div",cssClass:"ui-buffering-overlay-indicator",role:"img"}),new s.Component({tag:"div",cssClass:"ui-buffering-overlay-indicator",role:"img"}),new s.Component({tag:"div",cssClass:"ui-buffering-overlay-indicator",role:"img"})],n.config=n.mergeConfig(t,{cssClass:"ui-buffering-overlay",hidden:!0,components:n.indicators,showDelayMs:1e3},n.config),n}return r(t,e),t.prototype.configure=function(t,n){var i=this;e.prototype.configure.call(this,t,n);var r=this.getConfig(),o=new a.Timeout(r.showDelayMs,function(){n.onBufferingShow.dispatch(i),i.show()}),s=function(){o.start()},u=function(){t.isPlaying()&&s()},l=function(){o.clear(),n.onBufferingHide.dispatch(i),i.hide()};t.on(t.exports.PlayerEvent.StallStarted,s),t.on(t.exports.PlayerEvent.StallEnded,l),t.on(t.exports.PlayerEvent.Play,s),t.on(t.exports.PlayerEvent.Playing,l),t.on(t.exports.PlayerEvent.Paused,l),t.on(t.exports.PlayerEvent.Seek,u),t.on(t.exports.PlayerEvent.Seeked,l),t.on(t.exports.PlayerEvent.TimeShift,u),t.on(t.exports.PlayerEvent.TimeShifted,l),t.on(t.exports.PlayerEvent.SourceUnloaded,l),t.isStalled()&&this.show()},t}(o.Container)},69239:function(e,t,n){"use strict";var i,r,o,s=this&&this.__extends||(r=function(e,t){return(r=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])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),a=this&&this.__assign||function(){return(a=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},u=this&&this.__spreadArray||function(e,t,n){if(n||2==arguments.length)for(var i,r=0,o=t.length;r<o;r++)!i&&r in t||(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.PlayerWrapper=t.UIInstanceManager=t.UIManager=t.UIVariantIdentifier=void 0;var l=n(12485),c=n(4437),d=n(8675),p=n(85704),h=n(54959),f=n(41113),g=n(53623),v=n(2652),y=n(94427),m=n(24379),b=n(98213),S=n(8007),E=n(59579),_=n(53135),T=n(48794),P=n(73400),C=n(88682),A=n(60845),w=n(57279),k=n(18297),O=n(86894),M=n(25227);(i=o||(t.UIVariantIdentifier=o={})).main="main",i.ads="ads",i.smallScreen="smallScreen",i.smallScreenAds="smallScreenAds",i.tv="tv",i.tvAds="tvAds",i.subtitle="subtitle",i.castReceiver="castReceiver",i.empty="empty",t.UIManager=function(){function e(e,t,n){void 0===n&&(n={});var i=this;if(this.events={onUiVariantResolve:new p.EventDispatcher,onActiveUiChanged:new p.EventDispatcher},t instanceof l.UIContainer){var r=[];r.push({ui:t}),this.uiVariants=r}else this.uiVariants=t;this.subtitleSettingsManager=new E.SubtitleSettingsManager,this.uiPreferencesManager=new T.UIPreferencesManager,this.shadowDomManager=new C.ShadowDomManager,this.player=e,this.managerPlayerWrapper=new R(e),n.metadata=n.metadata?n.metadata:{},this.config=a(a({playbackSpeedSelectionEnabled:!0,autoUiVariantResolve:!0,disableAutoHideWhenHovered:!1,enableSeekPreview:!0,enableResumeFromLastPosition:!1,enableTimestampDeepLink:!0,shadowDom:!1},n),{componentLayoutOverrides:a(a(a(a({CaptionToggleButton:M.UIComponentLayoutOverride.Exclude,EcoModeContainer:M.UIComponentLayoutOverride.Exclude,QuickSeekButton:M.UIComponentLayoutOverride.Exclude,Watermark:M.UIComponentLayoutOverride.Exclude},null!=n.ecoMode&&{EcoModeContainer:n.ecoMode?M.UIComponentLayoutOverride.Include:M.UIComponentLayoutOverride.Exclude}),null!=n.includeWatermark&&{Watermark:n.includeWatermark?M.UIComponentLayoutOverride.Include:M.UIComponentLayoutOverride.Exclude}),null!=n.playbackSpeedSelectionEnabled&&{PlaybackSpeedSelectBox:n.playbackSpeedSelectionEnabled?M.UIComponentLayoutOverride.Include:M.UIComponentLayoutOverride.Exclude}),n.componentLayoutOverrides),events:{onUpdated:new p.EventDispatcher}
vendor: 5,069 bytes, line 1
1,volumeController:new y.VolumeController(this.managerPlayerWrapper.getPlayer()),adBreakTracker:new A.AdBreakTracker(this.managerPlayerWrapper.getPlayer())}),this.componentLayoutOverrideProcessor=new O.ComponentLayoutOverrideProcessor(this.config),this.recommendationsApi={add:function(e){i.config.metadata.recommendations.push(e),i.config.events.onUpdated.dispatch(i)},remove:function(e){return g.ArrayUtils.remove(i.config.metadata.recommendations,e)===e&&(i.config.events.onUpdated.dispatch(i),!0)},list:function(){return u([],i.config.metadata.recommendations,!0)}},this.timelineMarkersApi={add:function(e){i.config.metadata.markers.push(e),i.config.events.onUpdated.dispatch(i)},remove:function(e){return g.ArrayUtils.remove(i.config.metadata.markers,e)===e&&(i.config.events.onUpdated.dispatch(i),!0)},list:function(){return u([],i.config.metadata.markers,!0)}};var o=function(){var t=e.getSource()||{};i.config.metadata=a({},n.metadata);var r={metadata:{title:t.title,description:t.description,markers:t.markers,recommendations:t.recommendations}};i.config.metadata.title=r.metadata.title||n.metadata.title,i.config.metadata.description=r.metadata.description||n.metadata.description,i.config.metadata.markers=u([],r.metadata.markers||n.metadata.markers||[],!0),i.config.metadata.recommendations=u([],r.metadata.recommendations||n.metadata.recommendations||[],!0),_.StorageUtils.setStorageApiDisabled(n)};o(),this.config.localization&&m.i18n.setConfig(this.config.localization),this.subtitleSettingsManager.initialize(),!0!==n.disableStorageApi&&this.uiPreferencesManager.configure(this.player,!0===n.enablePersistentPreferences,!0===n.showPersistentPreferencesToggle);var s=this.managerPlayerWrapper.getPlayer(),d=!0===this.config.enableTimestampDeepLink?P.TimestampLinkUtils.parseTimestampFromUrl():null;if(!0===this.config.enableResumeFromLastPosition&&(this.resumePositionTracker=new w.ResumePositionTracker(s)),null!==d||void 0!==this.resumePositionTracker){var h=!1,v=function(){var e,t;if(s.isLive()){null!==d&&(h=!0);return}if(null===d||h){var n=null!=(t=null==(e=i.resumePositionTracker)?void 0:e.getStoredPosition())?t:null;null!==n&&s.seek(n,"ui")}else h=!0,d>0&&s.seek(d,"ui")};s.on(this.player.exports.PlayerEvent.SourceLoaded,v),f.PlayerUtils.getState(s)===f.PlayerUtils.PlayerState.Prepared&&v()}var k=function(){o(),i.config.events.onUpdated.dispatch(i)};s.on(this.player.exports.PlayerEvent.SourceLoaded,k),(0,S.isMobileV3PlayerAPI)(s)&&s.on(S.MobileV3PlayerEvent.PlaylistTransition,k),n.container?this.uiContainerElement=(n.container instanceof HTMLElement,new c.DOM(n.container)):this.uiContainerElement=new c.DOM(e.getContainer()),(!0==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 I=[],L=0,D=this.uiVariants;L<D.length;L++){var U=D[L];null==U.condition&&I.push(U),this.uiInstanceManagers.push(new x(e,U,this.config,this.subtitleSettingsManager,this.uiPreferencesManager,this.uiWrapperElement))}if(I.length>1)throw Error("Too many UIs without a condition: You cannot have more than one default UI");if(I.length>0&&I[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 B=null,N=null!=e.getSource();e.on(e.exports.PlayerEvent.SourceLoaded,function(){N=!0}),e.on(e.exports.PlayerEvent.SourceUnloaded,function(){N=!1});var F=function(t){if(null!=t)switch(t.type){case e.exports.PlayerEvent.AdStarted:B=t;break;case e.exports.PlayerEvent.AdBreakFinished:B=null,i.config.events.onUpdated.dispatch(i);break;case e.exports.PlayerEvent.SourceLoaded:break;case e.exports.PlayerEvent.SourceUnloaded:B=null}var n=null!=B,r=!1;if(n){var o=B.ad;o.isLinear&&(r=o.uiConfig&&o.uiConfig.requestsUi||!1)}r&&i.config.events.onUpdated.dispatch(i),i.resolveUiVariant({isAd:n,adRequiresUi:r,isSourceLoaded:N},function(e){e.isAd&&i.currentUi.getWrappedPlayer().fireEventInUI(i.player.exports.PlayerEvent.AdStarted,B)})};this.config.autoUiVariantResolve&&(this.managerPlayerWrapper.getPlayer().on(this.player.exports.PlayerEvent.SourceLoaded,F),this.managerPlayerWrapper.getPlayer().on(this.player.exports.PlayerEvent.SourceUnloaded,F),this.managerPlayerWrapper.getPlayer().on(this.player.exports.PlayerEvent.Play,F),this.managerPlayerWrapper.getPlayer().on(this.player.exports.PlayerEvent.Paused,F),this.managerPlayerWrapper.getPlayer().on(this.player.exports.PlayerEvent.Playing,F),this.managerPlayerWrapper.getPlayer().on(this.player.exports.PlayerEvent.AdStarted,F),this.managerPlayerWrapper.getPlayer().on(this.player.exports.PlayerEvent.AdBreakFinished,F),this.managerPlayerWrapper.getPlayer().on(this.player.exports.PlayerEvent.PlayerResized,F),this.managerPlayerWrapper.getPlayer().on(this.player.exports.PlayerEvent.Vie
1wModeChanged,F)),this.focusVisibilityTracker=new b.FocusVisibilityTracker("bmpui",this.uiWrapperElement),F(null)}return e.localize=function(e){return m.i18n.getLocalizer(e)},e.setLocalizationConfig=function(e){m.i18n.setConfig(e)},e.prototype.getSubtitleSettingsManager=function(){return this.subtitleSettingsManager},e.prototype.getUIPreferencesManager=function(){return this.uiPreferencesManager},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),i=this.uiInstanceManagers[n];this.switchToUiInstance(i,t)},e.prototype.switchToUiInstance=function(e,t){var n=this.currentUi;if(e!==this.currentUi){if(this.currentUi){var i=this.currentUi.resolveUI();this.currentUi.onInactive.dispatch(i),i.hide()}if(this.currentUi=e,null!=this.currentUi){var r=this.currentUi.resolveUI();!this.currentUi.isConfigured()&&(this.addUi(this.currentUi),r.isHidden()||r.hide()),t&&t(),r.show(),this.currentUi.onActive.dispatch(r),this.events.onActiveUiChanged.dispatch(this,{previousUi:n,currentUi:e})}}},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:v.BrowserUtils.isMobile,isTv:v.BrowserUtils.isTv,isPlaying:this.player.isPlaying(),isSourceLoaded:!1,width:this.uiContainerElement.width(),documentWidth:document.body.clientWidth},i=a(a({},n),e);this.events.onUiVariantResolve.dispatch(this,i);for(var r=null,o=0,s=this.uiInstanceManagers;o<s.length;o++){var u=s[o],l=null==u.conditionResolver||!0===u.conditionResolver(i);null==r&&l?r=u:u.isUIResolved()&&u.getUI().hide()}this.switchToUiInstance(r,function(){t&&t(i)})},Object.defineProperty(e.prototype,"uiWrapperElement",{get:function(){var e=this.shadowDomManager.getShadowRoot();return void 0!=e?new c.DOM(e):this.uiContainerElement},enumerable:!1,configurable:!0}),e.prototype.addUi=function(e){var t=e.resolveUI();void 0!==e.variantIdentifier&&this.componentLayoutOverrideProcessor.process(t,e.variantIdentifier);var n=t.getDomElement(),i=e.getWrappedPlayer();e.configureControls(),this.uiWrapperElement.append(n),i.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){if(e.releaseControls(),e.isUIResolved()){var t=e.getUI();t.hasDomElement()&&t.getDomElement().remove(),e.clearEventHandlers()}},e.prototype.release=function(){var e;null==(e=this.resumePositionTracker)||e.release(),this.config.adBreakTracker.release(),this.currentUi&&(this.currentUi.onInactive.dispatch(this.currentUi.getUI()),this.currentUi=null);for(var t=0,n=this.uiInstanceManagers;t<n.length;t++){var i=n[t];this.releaseUi(i)}this.managerPlayerWrapper.clearEventHandlers(),this.uiPreferencesManager.release(),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}),Object.defineProperty(e.prototype,"recommendations",{get:function(){return this.recommendationsApi},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"timelineMarkers",{get:function(){return this.timelineMarkersApi},enumerable:!1,configurable:!0}),e.prototype.getTimelineMarkers=function(){return this.timelineMarkers.list()},e.prototype.addTimelineMarker=function(e){this.timelineMarkers.add(e)},e.prototype.removeTimelineMarker=function(e){return this.timelineMarkers.remove(e)},e}();var I=function(){function e(e,t,n,i,r,o){if(this.events={onConfigured:new p.EventDispatcher,onActive:new p.EventDispatcher,onInactive:new p.EventDispatcher,onSeek:new p.EventDispatcher,onSeekPreview:new p.EventDispatcher,onSeeked:new p.EventDispatcher,onComponentShow:new p.EventDispatcher,onComponentHide:new p.EventDispatcher,onComponentViewModeChanged:new p.EventDispatcher,onControlsShow:new p.EventDispatcher,onPreviewControl
vendor: 1,639 bytes, line 1
1sHide:new p.EventDispatcher,onControlsHide:new p.EventDispatcher,onRelease:new p.EventDispatcher,onBufferingShow:new p.EventDispatcher,onBufferingHide:new p.EventDispatcher},"function"==typeof t.ui&&t.spatialNavigation)throw Error("Lazy UI variants must return spatialNavigation from the ui factory");this.playerWrapper=new R(e),this.uiVariant=t,this.config=n,this.subtitleSettingsManager=i,this.uiPreferencesManager=r,this.uiWrapperElement=o,"function"!=typeof t.ui&&(this.uiContainer=t.ui,this.spatialNavigation=t.spatialNavigation)}return e.prototype.getSubtitleSettingsManager=function(){return this.subtitleSettingsManager},e.prototype.getUIPreferencesManager=function(){return this.uiPreferencesManager},e.prototype.getConfig=function(){return this.config},Object.defineProperty(e.prototype,"conditionResolver",{get:function(){return this.uiVariant.condition},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"variantIdentifier",{get:function(){return this.uiVariant.identifier},enumerable:!1,configurable:!0}),e.prototype.resolveUI=function(){if(this.uiContainer)return this.uiContainer;if("function"==typeof this.uiVariant.ui){var e=k.ComponentConfigManager.run(this.config.componentConfigOverrides,this.uiVariant.identifier,this.uiVariant.ui);e instanceof l.UIContainer?this.uiContainer=e:(this.uiContainer=e.ui,this.spatialNavigation=e.spatialNavigation)}else this.uiContainer=this.uiVariant.ui;return this.uiContainer},e.prototype.getUI=function(){return this.resolveUI()},e.prototype.isUIResolved=function(){return null!=this.uiContainer},e.prototype.getPlayer=function(){return this.playerWrapper.getPlayer()}
1,Object.defineProperty(e.prototype,"onConfigured",{get:function(){return this.events.onConfigured},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onActive",{get:function(){return this.events.onActive},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onInactive",{get:function(){return this.events.onInactive},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}
1,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=I;var x=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return s(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=[];h.UIUtils.traverseTree(e,function(e){for(var i=0;i<n.length;i++)if(n[i]===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)||e.release(),this.released=!0},t.prototype.isReleased=function(){return this.released},t.prototype.releaseControlsTree=function(e){if(e.release(),e instanceof d.Container)for(var t=0,n=e.getComponents();t<n.length;t++){var i=n[t];this.releaseControlsTree(i)}},t.prototype.clearEventHandlers=function(){e.prototype.clearEventHandlers.call(this)},t}(I),R=function(){function e(e){var t=this;this.eventHandlers={},this.player=e;for(var n=u(["constructor"],Object.getOwnPropertyNames(Object.getPrototypeOf({})),!0),i=(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===n.indexOf(e)}),r=[],o=[],s=0;s<i.length;s++){var a=i[s];"function"==typeof e[a]?r.push(a):o.push(a)}for(var l={},c=function(t){l[t]=function(){return e[t].apply(e,arguments)}},d=0;d<r.length;d++)c(r[d]);for(var p=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(l,t,{get:function(){return n.get.call(e)},set:function(t){return n.set.call(e,t)}}):l[t]=e[t]},h=0;h<o.length;h++)p(o[h]);l.on=function(n,i){return e.on(n,i),t.eventHandlers[n]||(t.eventHandlers[n]=[]),t.eventHandlers[n].push(i),l},l.off=function(n,i){return e.off(n,i),t.eventHandlers[n]&&g.ArrayUtils.remove(t.eventHandlers[n],i),l},l.fireEventInUI=function(e,n){if(t.eventHandlers[e])for(var i=Object.assign({},{timestamp:Date.now(),type:e,uiSourced:!0},n),r=0,o=t.eventHandlers[e];r<o.length;r++)(0,o[r])(i)},this.wrapper=l}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 i=n[t];this.player.off(e,i)}},e}();t.PlayerWrapper=R},69256:e=>{!function(){"use strict";self,e.exports=(self.webpackChunkbitmovin_player=self.webpackChunkbitmovin_player||[]).push([[855],{48297:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.AbstractHlsManifestController=void 0;var i,r,o=n(80813),s=n(3714),a=n(32703),u=n(59225),l=n(32485),c=n(79721),d=n(89927),p=n(70850),h=n(88052),f=n(62756);(i=r||(r={})).CueTag="cueTag",i.Scte35="scte35",i.DateRange="dateRange",i.CustomTags="customTags",t.AbstractHlsManifestController=function(){function e(e){var t,n=this;this.context=e,this.tab=function(e){if(e.hasOwnProperty("metadata")){var t={metadataType:e.metadataType.toUpperCase(),metadata:e.metadata};(e.start||0===e.start)&&(t.start=e.start),e.end&&(t.end=e.end),n.context.eventHandler.dispatchEvent(s.PlayerEvent.Metadata,t)}},this.uab=function(e){var t=n.segmentTimelineController.getPlayingSegment(e.relativeTime||e.time);t&&!t.consumed&&(t.consumed=!0,n.wab(t),n.vab(t))},this.xab=function(){n.segmentTimelineController.reset()},this.yab=function(){n.segmentTimelineController.reset()},this.settings=e.settings,this.rab=e.eventHandler,this.rab.on(s.PlayerEvent.TimeChanged,this.uab),this.rab.on(s.PlayerEvent.TimeShifted,this.xab),this.rab.on(s.PlayerEvent.Seeked,this.yab),this.sab=new u.MetadataService(this.context,((t={})[l.TimedMetadataType.Manifest]=this.tab,t[l.TimedMetadataType.DateRange]=this.tab,t))}return e.prototype.vab=function(e){var t={url:e.uri,uid:null,mimeType:"video/mp4",playbackTime:e.playbackTime,duration:e.duration,mediaInfo:{},dateTime:null};e.dateTime&&(t.dateTime=e.dateTime.toISOString()),e.customTags&&e.customTags.length>0&&(t.EXPERIMENTAL=t.EXPERIMENTAL||{},t.EXPERIMENTAL.hlsAttributes=e.customTags.map(function(e){return e.attributes})),this.context.eventHandler.dispatchEvent(s.PlayerEvent.SegmentPlayback,t)},e.prototype.wab=function(e){var t=this,n=e.dateTime?(0,d.toSeconds)(e.dateTime.getTime()):e.playbackTime,i=n+e.duration;e.metadata&&e.metadata.forEach(function(e){e.type.includes("CUE")?t.context.eventHandler.dispatchEvent(s.PlayerEvent.Metadata,{metadataType:s.MetadataType.CUETAG,metadata:e}):t.context.eventHandler.dispatchEvent(s.PlayerEvent.Metadata,{metadataType:e.type,metadata:e})}),e.customTags&&this.context.eventHandler.dispatchEvent(s.PlayerEvent.Metadata,{metadataType:s.MetadataType.CUSTOM,metadata:e.customTags,start:n,end:i})},e.prototype.isValidMasterPlaylist=function(e){return h.ModuleManager.get(f.ModuleName.HLS).NativeHlsManifestParserUtils.isValidMasterPlaylist(e)},e.prototype.zab=function(e){return h.ModuleManager.get(f.ModuleName.HLS).NativeHlsManifestParserUtils.parsePlaylist(e)},e.prototype.dispatchDateRangeToParsedService=function(e){var t,n={metadataType:s.MetadataType.DATERANGE,metadata:e.data,data:e.data,start:e.startTime,end:e.endTime};null==(t=this.context.serviceManager.get(o.ServiceName.MetadataParsedService))||t.addMetadata(c.DEFAULT_PERIOD_ID,n)},e.prototype.Aab=function(e){return{metadataType:e.metadataType,metadata:e.metadata,data:e.metadata,start:e.start,end:e.end}},e.prototype.Bab=function(e){var t=e.metadataType===s.MetadataType.DATERANGE?l.TimedMetadataType.DateRange:l.TimedMetadataType.Manifest;this.sab.addToMetadataParsedService(e.start,this.Aab(e),c.DEFAULT_PERIOD_ID),e.metadataType!==s.MetadataType.CUSTOM&&this.sab.addToTimeline(t,e.start,e)},e.prototype.onPlaylistUpdated=function(e){var t,n,i=this,r=e.playlist,u=e.variant,c=e.segments;this.segmentTimelineController.switchTimeline(u.id);var d=this.segmentTimelineController.updateTimeline(u.id,c),h=this.context.serviceManager.get(o.ServiceName.MetadataParsedService);h&&(h.expirationTimeInSeconds=d);var f=null==(t=c[0])?void 0:t.dateTime;f&&this.sab.removeUntil(p.Util.timeInSeconds(f)),(0,a.extractDateRangeMetadata)(null!=(n=r.dateRange)?n:[],r.endList?r.programDateTime:void 0,function(e){var t={metadataType:s.MetadataType.DATERANGE,metadata:e.data,start:e.startTime,end:e.endTime};i.sab.addToTimeline(l.TimedMetadataType.DateRange,e.startTime,t)});var g=this.segmentTimelineController.getCurrentTimeline();this.extractMetadataFromTimeline(g,!r.endList)},e.prototype.extractMetadataFromTimeline=function(e,t){var n=this;e.forEach(function(e){Object.values(r).forEach(function(i){e.hasOwnProperty(i)&&(function(e,t,n){var i=n&&t.dateTime?(0,d.toSeconds)(t.dateTime.getTime()):t.playbackTime;switch(e){case r.CueTag:return[{metadataType:s.MetadataType.CUETAG,metadata:t[r.CueTag],start:i}];case r.Scte35:return[{metadataType:s.MetadataType.SCTE,metadata:t[r.Scte35],start:i}];case r.CustomTags:return[{metadataType:s.MetadataType.CUSTOM,metadata:t[r.CustomTags],start:i,end:i+t.duration}];default:return[]}})(i,e,t).forEach(function(e){return n.Bab(e)})})})},e.prototype.parseTimelineEntries=function(e){var t=this.zab(e);return h.ModuleManager.get(f.ModuleName.HLS).NativeHlsManifestParserUtils.isValidVariantPlaylist(t)?t.segments.map(function(e){var t;
1return{uri:e.uri,duration:e.duration,discontinuity:null!=(t=e.discontinuity)&&t,dateTime:null,metadata:[],consumed:!1,playbackTime:-1,keys:[]}}):[]},e.prototype.getPlaybackTimeOfFirstSegmentInTimeline=function(e){for(var t=0;t<e.length;t++)for(var n=e[t],i=0,r=0;r<n.timeline.length;r++){for(var o=n.timeline[r],s=this.segmentTimelineController.getCurrentTimeline(),a=0;a<s.length;a++){var u=s[a];if(u.uri===o.uri)return u.playbackTime-i}i+=o.duration}return -1},e.prototype.Cab=function(){this.rab&&(this.rab.off(s.PlayerEvent.TimeChanged,this.uab),this.rab.off(s.PlayerEvent.TimeShifted,this.xab),this.rab.off(s.PlayerEvent.Seeked,this.yab))},e.prototype.dispose=function(){this.Cab(),this.segmentTimelineController&&(this.segmentTimelineController.dispose(),this.segmentTimelineController=null),this.sab&&(this.sab.dispose(),this.sab=null),this.settings=null,this.rab=null},e}()},32418:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.AppleAirplayService=t.isAirplaySupported=void 0;var i,r,o=n(3714),s=n(19274);(i=r||(r={})).Available="available",i.NotAvailable="not-available",t.isAirplaySupported=function(){return!!window.WebKitPlaybackTargetAvailabilityEvent},t.AppleAirplayService=function(){function e(e,t){var n=this;this.videoElement=e,this.eventHandler=t,this.RW=!1,this.SW=function(e){switch(e.availability){case r.Available:n.RW=!0,n.eventHandler.dispatchEvent(o.PlayerEvent.AirplayAvailable);break;case r.NotAvailable:n.RW=!1}},this.TW=function(){n.eventHandler.dispatchEvent(o.PlayerEvent.AirplayChanged,{airplayEnabled:n.isAirplayActive(),time:n.videoElement.currentTime})},this.initAirplay()}return e.prototype.initAirplay=function(){this.videoElement.setAttribute("x-webkit-airplay","allow"),this.videoElement.addEventListener(s.MediaElementEvent.webkitplaybacktargetavailabilitychanged,this.SW),this.videoElement.addEventListener(s.MediaElementEvent.webkitcurrentplaybacktargetiswirelesschanged,this.TW)},e.prototype.isAirplayAvailable=function(){return this.RW},e.prototype.isAirplayActive=function(){return this.videoElement.isAirplayActive()},e.prototype.showAirplayTargetPicker=function(){this.isAirplayAvailable()&&(this.videoElement.webkitShowPlaybackTargetPicker(),this.eventHandler.dispatchEvent(o.PlayerEvent.ShowAirplayTargetPicker))},e.prototype.dispose=function(){this.videoElement.removeEventListener(s.MediaElementEvent.webkitplaybacktargetavailabilitychanged,this.SW),this.videoElement.removeEventListener(s.MediaElementEvent.webkitcurrentplaybacktargetiswirelesschanged,this.TW)},e}()},99373:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.AssetAvailabilityChecker=void 0;var i=n(4129),r=n(29669),o=n(89927),s=n(88844),a=n(19274);t.AssetAvailabilityChecker=function(){function e(e,t,n){var s=this;this.context=e,this.source=t,this.mediaElement=n,this.WW=function(){s.mediaElement.removeEventListener(a.MediaElementEvent.loadstart,s.WW);var e=(0,o.toMilliSeconds)(s.context.settings.XHR_TIMEOUT)/2;s.UW=window.setTimeout(function(){s.context.logger.debug("Asset loading has not resolved after ".concat((0,o.toSeconds)(e),"s. Checking accessibility."));var t=!1;s.VW=new i.DefaultContentLoader(s.context,{onProgress:function(e){var n;e.loadedBytes>0&&(t=!0,null==(n=s.VW)||n.cancel())},requestType:r.HttpRequestType.INTERNAL}),s.VW.load(s.source.src).catch(function(e){if(!t){s.context.logger.debug("Forcing error event as the asset was not accessible.",e);var n=new Event(a.MediaElementEvent.error,{bubbles:!1,cancelable:!1});s.source.dispatchEvent(n)}})},e)},n.addEventListener(a.MediaElementEvent.loadstart,this.WW)}return e.prototype.dispose=function(){(0,s.clearTimeoutIfDefined)(this.UW),this.mediaElement.removeEventListener(a.MediaElementEvent.loadstart,this.WW),this.VW&&(this.VW.cancel(),this.VW.dispose())},e}()},95945:function(e,t,n){var i=this&&this.__extends||(r=function(e,t){return(r=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])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});
vendor: 9,154 bytes, line 1
1Object.defineProperty(t,"__esModule",{value:!0}),t.FallbackHlsManifestController=void 0;var r,o,s=n(25926),a=n(4224),u=n(3714),l=n(29669),c=n(88052),d=n(62756),p=n(48297),h=n(56191),f=n(59043),g=n(77374);t.FallbackHlsManifestController=function(e){function t(t,n){var i=e.call(this,t)||this;return i.Fab=function(e){i.onPlaylistUpdated(e)},i.Mab=function(e){return i.context.logger.debug("Error while loading the playlist ",e),null},o=c.ModuleManager.get(d.ModuleName.HLS).PlaylistUtils,i.Dab=n,i.Eab=new f.HlsDownloadService(i.context),i.segmentTimelineController=new h.FallbackSegmentTimelineController(t.videoElement),i.context.logger.debug("Initializing controller for native HLS parsing"),i.Dab.setOnPlaylistUpdated(i.Fab),i}return i(t,e),t.prototype.init=function(){return Promise.resolve()},t.prototype.getDownloadedVideoData=function(){return{id:"not available",bitrate:0,height:0,width:0,isAuto:!0}},t.prototype.getPlayingVideoData=function(){return null},t.prototype.resolveMasterManifest=function(e){var t=this;return this.Dab.resolveMasterManifest(e).then(function(e){var n=e.masterManifest,i=e.firstVariantPlaylist,r=e.resolvedMasterUrl;return t.overrideManifestUrl(n,r,i)})},t.prototype.getParsedManifest=function(){return this.Dab.getParsedManifest()},t.prototype.getManifest=function(){return this.Dab.getManifest()},t.prototype.overrideManifestUrl=function(e,t,n){return"createObjectURL"in window.URL?this.Gab(e,n):(this.context.eventHandler.dispatchEvent(u.PlayerEvent.Warning,new s.PlayerWarning(a.WarningCode.SETUP_CREATE_OBJECT_URL_MISSING)),Promise.resolve(t))},t.prototype.Gab=function(e,t){var n=this;return o.isLive(t)?Promise.resolve(this.Lab(e)):Promise.all(this.Hab(e)).then(function(t){return t.filter(function(e){return!!e}).forEach(function(t){e=e.replace(t.mediaUrl,t.blobUrl)}),n.Lab(e)})},t.prototype.Hab=function(e){var t=this;return e.split("\n").map(function(e){return g.parseUrlFromLine(e)}).filter(function(e){return null!==e}).map(function(e){return t.Iab(e)})},t.prototype.Iab=function(e){var t=this;return this.Eab.downloadPlaylist(e,l.HttpRequestType.MANIFEST_HLS_VARIANT).then(function(n){var i=g.replaceManifestUrls(e,n.body,t.settings.QUERY_PARAMETERS);return{blobUrl:t.Kab(i),mediaUrl:e}}).catch(this.Mab)},t.prototype.Jab=function(e){var t=this;return this.Eab.downloadPlaylist(e.uri,l.HttpRequestType.MANIFEST_HLS_VARIANT).then(function(n){return{width:e.width,height:e.height,timeline:t.parseTimelineEntries(n.body)}}).catch(this.Mab)},t.prototype.Kab=function(e){var t=new Blob([e],{type:"application/x-mpegURL"});return window.URL.createObjectURL(t)},t.prototype.Lab=function(e){return"data:application/x-mpegURL,"+encodeURIComponent(e)},t.prototype.Nab=function(){var e=this.Dab.getParsedManifest();return e?e.playlists.map(function(e){return{uri:e.uri,width:e.attributes&&e.attributes.RESOLUTION?e.attributes.RESOLUTION.width:-1,height:e.attributes&&e.attributes.RESOLUTION?e.attributes.RESOLUTION.height:-1}}):[]},t.prototype.Oab=function(){var e=this,t=this.Nab();return t.reverse(),Promise.all(t.map(function(t){return e.Jab(t)})).then(function(t){var n=e.getPlaybackTimeOfFirstSegmentInTimeline(t);return n>=0&&t.forEach(function(e){e.timeline.reduce(function(e,t){return t.playbackTime=e,e+t.duration},n)}),t})},t.prototype.getCurrentSegments=function(e,t,n,i){return void 0===i&&(i=1),this.Oab().then(function(r){var o=r.find(function(e){return e.width===t&&e.height===n});return function(e,t,n){for(var i,r=[],o=0;o<e.length;o++){var s=e[o];i=0;for(var a=0;a<s.timeline.length;a++){var u=s.timeline[a];if(u.playbackTime+u.duration>=n&&(r.push(u.uri),i++),i>t)break}}return r}(o?[o]:r,i,e)})},t.prototype.dispose=function(){var t;null==(t=this.Dab)||t.setOnPlaylistUpdated(void 0),e.prototype.dispose.call(this)},t}(p.AbstractHlsManifestController)},56191:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.FallbackSegmentTimelineController=void 0;var i=n(25541);t.FallbackSegmentTimelineController=function(){function e(e){this.rhb=e,this.shb=!0,this.phb={}}return e.prototype.thb=function(){return this.rhb.duration===1/0},e.prototype.switchTimeline=function(e){this.phb[e]||(this.qhb=e,this.phb[e]=[])},e.prototype.updateTimeline=function(e,t){var n=this,r=this.phb[e],o=i.updateTimeline(r,t),s=o.findIndex(function(e){return e.hasOwnProperty("playbackTime")});-1!==s&&i.populateCurrentTimelineWithPlaybackTime(o,s,o[s].playbackTime),this.phb[e]=o;var a=o.reduce(function(e,t){return n.thb()&&!n.shb||(t.playbackTime=e),e+t.duration},0);return this.shb&&(this.shb=!1),a},e.prototype.getPlayingSegment=function(e){for(var t=this.getCurrentTimeline(),n=0;n<t.length;n++){var i=t[n];if(e>=i.playbackTime&&e<=i.playbackTime+i.duration)return t[n]}return null},e.prototype.addDownloadedSegments=function(e){},e.prototype.getCurrentTimeline=function(){return this.phb[this.qhb]},e.prototype.getAllTimelines=function(){return this.phb},e.prototype.reset=function(){this.phb[this.qhb].forEach(function(e){return e.consumed=!1})},e.prototype.dispose=function(){this.phb={},this.rhb=null},e}()},30712:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.HlsDownloadErrorHandler=void 0;var i=n(40306),r=n(3336),o=n(4129),s=n(43446),a=n(29669),u=n(21513),l=n(88844),c=n(19274);t.HlsDownloadErrorHandler=function(){function e(e,t){var n=this;this.iW=function(){for(var e=n.YW.buffered,t="",i=0;i<e.length;i++)t+="".concat(e.start(i)," - ").concat(e.end(i),", ");t===n.fW?n.gW++:n.gW=0,n.gW>=10&&n.kW(),n.fW=t},this.jW=function(){var e=s.TimingUtil.getHiResTimestamp(),t=!n.YW.paused&&!n.YW.seeking&&!n.YW.ended;e-n.hW>5&&t&&n.wX()},this.kW=function(){n.dW=s.TimingUtil.getHiResTimestamp(),n.yX()},this.lW=function(){n.dW=-1/0,(0,l.clearTimeoutIfDefined)(n.cW)},this.wX=function(){n.bW=s.TimingUtil.getHiResTimestamp(),n.yX()},this.xX=function(){n.bW=-1/0,n.hW=s.TimingUtil.getHiResTimestamp(),(0,l.clearTimeoutIfDefined)(n.cW)},this.zX=function(){if(0!==n.YW.buffered.length){var e=n.YW.currentTime,t=n.YW.buffered.end(n.YW.buffered.length-1),s=e<=t&&e+.5>t,u=n.YW.paused,l=n.YW.networkState===HTMLMediaElement.NETWORK_LOADING,c=n.YW.videoWidth,d=n.YW.videoHeight;!u&&s&&l&&n.ZW.getCurrentSegments(t,c,d,2).then(function(e){var t=new o.DefaultContentLoader(n.XW),s=function(n,i){return void 0===n&&(n=!0),e.length>0&&n?t.load(e.pop(),a.HttpRequestMethod.HEAD).then(function(e){return s(e.status>=200&&e.status<300,e)}):n?Promise.resolve():Promise.reject(i)};s().catch(function(e){var t=e.url,o=e.status,s=e.statusText;n.XW.eventHandler.fireError(new r.PlayerError(i.ErrorCode.NETWORK_ERROR,{url:t,statusCode:o,statusText:s},"Failed to load segment ".concat(t,", statusCode: ").concat(o,", statusText: ").concat(s),n.XW.sourceContext.sourceIdentifier))})})}},this.XW=e,this.YW=e.videoElement,this.ZW=t,this.aW=!1,this.dW=-1/0,this.bW=-1/0,this.cW=-1,this.fW="",this.gW=0,this.hW=-1/0,this.YW.addEventListener(c.MediaElementEvent.waiting,this.wX),this.YW.addEventListener(c.MediaElementEvent.stalled,this.kW),this.YW.addEventListener(c.MediaElementEvent.progress,this.lW),this.YW.addEventListener(c.MediaElementEvent.timeupdate,this.xX),(0,u.getCapabilities)().isIOS&&(this.eW=window.setInterval(function(){n.iW(),n.jW()},500))}return e.prototype.yX=function(){var e=Math.abs(this.bW-this.dW);(0,l.clearTimeoutIfDefined)(this.cW),isFinite(e)&&(this.cW=window.setTimeout(this.zX,1e3*(5-Math.min(5,e))))},e.prototype.dispose=function(){(0,l.clearTimeoutIfDefined)(this.eW),(0,l.clearTimeoutIfDefined)(this.cW),this.YW.removeEventListener(c.MediaElementEvent.waiting,this.wX),this.YW.removeEventListener(c.MediaElementEvent.stalled,this.kW),this.YW.removeEventListener(c.MediaElementEvent.progress,this.lW),this.YW.removeEventListener(c.MediaElementEvent.timeupdate,this.xX),this.YW=null,this.ZW=null},e}()},59043:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.HlsDownloadService=void 0;var i=n(25926),r=n(4224),o=n(3714),s=n(4129),a=n(29669);t.HlsDownloadService=function(){function e(e){var t=this;this.Ygb=!1,this.ohb=function(e){t.Wgb.eventHandler.dispatchEvent(o.PlayerEvent.Warning,new i.PlayerWarning(r.WarningCode.NETWORK_COULD_NOT_LOAD_MANIFEST)),t.Wgb.logger.debug("Could not load manifest, got HTTP status code "+e.status)},this.Wgb=e,this.Zgb()}return e.prototype.Zgb=function(){this.agb(),this.bgb()},e.prototype.agb=function(){this.Xgb={}},e.prototype.bgb=function(){var e=this.Wgb.sourceContext.source&&this.Wgb.sourceContext.source.options||{};this.Ygb="boolean"==typeof e.hlsManifestWithCredentials?e.hlsManifestWithCredentials:!0===e.manifestWithCredentials},e.prototype.downloadPlaylist=function(e,t,n){return void 0===n&&(n=!0),n&&this.Xgb.hasOwnProperty(e)?Promise.resolve(this.Xgb[e]):this.cgb(t,e)},e.prototype.cgb=function(e,t){var n=this,i=this.dgb(e);return i.load(t,a.HttpRequestMethod.GET,a.HttpResponseType.TEXT,null,{},this.Ygb).then(function(e){return i.dispose(),n.Xgb[t]=e,e}).catch(function(e){return i.dispose(),Promise.reject(e)})},e.prototype.dgb=function(e){return new s.DefaultContentLoader(this.Wgb,{onFailure:this.ohb,maxRetries:this.Wgb.settings.MAX_MPD_RETRIES,requestType:e})},e.prototype.dispose=function(){},e}()}
1,81152:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.HlsLiveNativeTimeTracker=void 0;var i=n(9768),r=n(89927),o=n(88844),s=n(19274);t.HlsLiveNativeTimeTracker=function(){function e(e,t){this.nativePlayer=e,this.context=t,this.AX=0,this.BX=null,this.CX=null}return e.prototype.onUnload=function(e){e===i.ADVERTISING_ISSUER_NAME?null==this.BX?this.nativePlayer.isLive()?(this.BX=Date.now(),this.AX=this.nativePlayer.getSeekableRange().start,this.CX=this.nativePlayer.getStartDate(),this.context.logger.debug("Captured ad-restore state: seekableRangeStart=".concat(this.AX,", startDate=").concat(this.CX))):this.DX():this.context.logger.debug("Skipping ad-restore capture, state already captured (unloadTimestamp: ".concat(this.BX,")")):e!==i.ADVERTISING_RESTORE_ISSUER_NAME&&null!=this.BX&&(this.context.logger.debug("Discarding stale ad-restore state on '".concat(e,"' unload")),this.DX())},e.prototype.DX=function(){this.BX=null,this.AX=0,this.CX=null},e.prototype.adjustTargetTime=function(e,t){var n=this;return t!==i.ADVERTISING_RESTORE_ISSUER_NAME||null==this.BX?(this.context.logger.debug("No ad-restore adjustment (issuer: ".concat(t,", unloadTimestamp: ").concat(this.BX,")")),Promise.resolve(e)):(null!=this.CX?this.EX():Promise.resolve(null)).then(function(t){if(null!=t)return n.context.logger.debug("Ad restore using startDate: keeping absolute target ".concat(e)),n.DX(),e;var i=(0,r.toSeconds)(Date.now()-n.BX);n.AX+=i;var o=e-n.AX;return n.context.logger.debug("Adjusting target time from ".concat(e," by ").concat(n.AX," to ").concat(o)),n.DX(),o})},e.prototype.EX=function(){var e=this,t=this.FX();if(t)return Promise.resolve(t);var n=this.context.videoElement;return new Promise(function(t){var i=void 0,r=void 0,a=function(a){var l=e.FX();e.context.logger.debug("startDate wait ended: reason=".concat(a,", valid=").concat(null!=l)),t(l),null==n||n.removeEventListener(s.MediaElementEvent.error,u),(0,o.clearIntervalIfDefined)(i),(0,o.clearTimeoutIfDefined)(r)},u=function(){return a("error")};e.context.logger.debug("Waiting for video.startDate to be valid"),null==n||n.addEventListener(s.MediaElementEvent.error,u),i=window.setInterval(function(){null!=e.FX()&&a("poll")},250),r=window.setTimeout(function(){return a("timeout")},5e3)})},e.prototype.FX=function(){var e=this.nativePlayer.getStartDate();return e&&!isNaN(e.getTime())?e:null},e}()},81929:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.createHlsManifestController=function(e){if(l(e)){var t=new(r.ModuleManager.get(o.ModuleName.ServiceWorkerClient).createServiceWorkerHlsManifestController(s.AbstractHlsManifestController))(e);return t.init().then(function(){return t}).catch(function(){return c(e)})}return c(e)},t.shouldUseServiceWorker=l;var i=n(80813),r=n(88052),o=n(62756),s=n(48297),a=n(95945),u=n(690);function l(e){var t=e.config.location&&e.config.location.serviceworker;return"serviceWorker"in navigator&&t&&r.ModuleManager.has(o.ModuleName.ServiceWorkerClient)}function c(e){var t=function(e){var t=e.sourceContext.sourceIdentifier,n=e.serviceManager.get(i.ServiceName.NativeManifestService,t);if(n)return n.isSuspended()&&n.restore(),n;var r=new u.NativeManifestService(e);return e.serviceManager.set(i.ServiceName.NativeManifestService,r,t),r}(e),n=new a.FallbackHlsManifestController(e,t);return n.init().then(function(){return n})}},77374:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.replaceManifestUrls=function(e,t,n){var i=t.split(/\r?\n/);return i.forEach(function(t,a){var u=o(t);if(u&&t.match(r)){var l=s(e,u,n);i[a]=t.replace(r,function(){return'URI="'.concat(l,'"')})}else u&&(i[a]=s(e,u,n))}),i.join("\n")},t.parseUrlFromLine=o,t.replaceUrlAndAddUriParams=s;var i=n(58313),r=/URI="([^"]+)"/;function o(e){if("#"!==e[0]&&e.trim().length>0)return e;if(e.indexOf("URI")>-1){var t=e.match(r);if(t&&0>t[1].indexOf("skd://")&&0>t[1].indexOf("skds://"))return t[1]}return null}function s(e,t,n){var r=i.URLHelper.concatBaseUrlWithPartial(e,t);return i.URLHelper.appendQueryParametersToUrl(r,n)}}
1,27530:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.NativeModuleDefinition=void 0;var i=n(62756),r=n(925),o=n(49706);t.NativeModuleDefinition={name:i.ModuleName.EngineNative,module:{NativePlayer:r.NativePlayer,technologyChecker:new o.TechnologyChecker}},t.default=t.NativeModuleDefinition},690:function(e,t,n){var i=this&&this.__extends||(r=function(e,t){return(r=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])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.NativeManifestService=void 0;var r,o,s=n(80813),a=n(3714),u=n(32703),l=n(29669),c=n(88847),d=n(79721),p=n(89927),h=n(88844),f=n(70850),g=n(88052),v=n(62756),y=n(59043),m=n(77374);t.NativeManifestService=function(e){function t(t){var n=e.call(this)||this;return n.Tab=null,n.Uab=null,n.Vab=null,n.gbb=null,n.ibb=[],o=g.ModuleManager.get(v.ModuleName.HLS).PlaylistUtils,n.Pab=t,n.Qab=t.settings,n.Rab=t.config,n.Sab=new y.HlsDownloadService(t),n}return i(t,e),t.prototype.resolveMasterManifest=function(e){var t=this;return this.Tab&&this.Vab&&this.lbb?Promise.resolve({masterManifest:this.Vab,firstVariantPlaylist:this.lbb.playlist,resolvedMasterUrl:this.gbb}):this.Sab.downloadPlaylist(e,l.HttpRequestType.MANIFEST_HLS_MASTER).then(function(e){t.gbb=e.url;var n,i,r,o=t.mbb(e,e.url);if(!t.Tab)throw Error("Manifest parsing failed");t.Vab=o;var s=g.ModuleManager.get(v.ModuleName.HLS).NativeHlsManifestParserUtils.isVideoVariant,a=null!=(i=null==(n=t.Tab.playlists.find(function(e){return s(e,t.Tab)}))?void 0:n.uri)?i:null==(r=t.Tab.playlists[0])?void 0:r.uri;return t.hbb=a,t.sbb(a,!0).then(function(t){return{masterManifest:o,firstVariantPlaylist:t,resolvedMasterUrl:e.url}})})},t.prototype.getParsedManifest=function(){return this.Tab},t.prototype.getManifest=function(){return this.Uab},t.prototype.getVariantUrl=function(){return this.hbb},t.prototype.getLastPlaylistData=function(){return this.lbb},t.prototype.setOnPlaylistUpdated=function(e){this.kbb=e,this.obb()},t.prototype.restore=function(){e.prototype.restore.call(this),this.obb()},t.prototype.dispose=function(){(0,h.clearTimeoutIfDefined)(this.jbb),this.jbb=void 0,this.Sab.dispose(),this.Tab=null,this.Uab=null,this.Vab=null,this.gbb=null,this.hbb=void 0,this.ibb=[],this.kbb=void 0,this.lbb=void 0,this.Rab=null,e.prototype.dispose.call(this)},t.prototype.mbb=function(e,t){var n,i,r=g.ModuleManager.get(v.ModuleName.HLS).NativeHlsManifestParserUtils;this.Uab=null!=(n=e.body)?n:null;var o=(0,m.replaceManifestUrls)(t,null!=(i=e.body)?i:"",this.Qab.QUERY_PARAMETERS);if(this.Tab=r.parsePlaylist(o),r.isValidMasterPlaylist(this.Tab))return o;if(r.isValidVariantPlaylist(this.Tab)){var s="#EXTM3U\n#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=100000\n$VARIANT$\n".replace("$VARIANT$",t);o=(0,m.replaceManifestUrls)(t,s,this.Qab.QUERY_PARAMETERS),this.Uab=s,this.Tab=r.parsePlaylist(o)}else this.Tab=null;return o},t.prototype.nbb=function(e){var t,n=this,i=g.ModuleManager.get(v.ModuleName.HLS).NativeHlsManifestParserUtils.parseAndPrepareVariantPlaylist(this.Tab,e,this.ibb,this.Rab),r=i.playlist,o=i.variant,s=i.segments,a=i.discontinuitySequences;this.ibb=a;var l=null==(t=s[0])?void 0:t.dateTime;return l&&(r.programDateTime=f.Util.timeInSeconds(l)),(0,u.extractDateRangeMetadata)(r.dateRange,r.endList?r.programDateTime:void 0,function(e){return n.pbb(e)}),this.lbb={playlist:r,variant:o,segments:s},this.obb(),r},t.prototype.obb=function(){this.lbb&&this.kbb&&!this.isSuspended()&&this.kbb(this.lbb)},t.prototype.pbb=function(e){var t,n={metadataType:a.MetadataType.DATERANGE,metadata:e.data,data:e.data,start:e.startTime,end:e.endTime};null==(t=this.Pab.serviceManager.get(s.ServiceName.MetadataParsedService))||t.addMetadata(d.DEFAULT_PERIOD_ID,n)},t.prototype.qbb=function(e,t){var n=this;(0,h.clearTimeoutIfDefined)(this.jbb),this.jbb=setTimeout(function(){return n.rbb(t)},(0,p.toMilliSeconds)(e.targetDuration))},t.prototype.rbb=function(e){var t=this;this.sbb(e,!1).catch(function(e){t.Pab.logger.debug("Error while reloading the playlist ",e)})},t.prototype.sbb=function(e,t){var n=this;return this.Sab.downloadPlaylist(e,l.HttpRequestType.MANIFEST_HLS_VARIANT,t).then(function(t){var i=n.nbb(t);return o.isLive(i)&&n.qbb(i,e),i})},t}(c.Suspendable)},925:function(e,t,n){var i,r,o,s,a,u=this&&this.__assign||function(){return(u=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)}
vendor: 16,077 bytes, line 1
1,l=this&&this.__runInitializers||function(e,t,n){for(var i=arguments.length>2,r=0;r<t.length;r++)n=i?t[r].call(e,n):t[r].call(e);return i?n:void 0},c=this&&this.__esDecorate||function(e,t,n,i,r,o){function s(e){if(void 0!==e&&"function"!=typeof e)throw TypeError("Function expected");return e}for(var a,u=i.kind,l="getter"===u?"get":"setter"===u?"set":"value",c=!t&&e?i.static?e:e.prototype:null,d=t||(c?Object.getOwnPropertyDescriptor(c,i.name):{}),p=!1,h=n.length-1;h>=0;h--){var f={};for(var g in i)f[g]="access"===g?{}:i[g];for(var g in i.access)f.access[g]=i.access[g];f.addInitializer=function(e){if(p)throw TypeError("Cannot add initializers after decoration has completed");o.push(s(e||null))};var v=(0,n[h])("accessor"===u?{get:d.get,set:d.set}:d[l],f);if("accessor"===u){if(void 0===v)continue;if(null===v||"object"!=typeof v)throw TypeError("Object expected");(a=s(v.get))&&(d.get=a),(a=s(v.set))&&(d.set=a),(a=s(v.init))&&r.unshift(a)}else(a=s(v))&&("field"===u?r.unshift(a):d[l]=a)}c&&Object.defineProperty(c,i.name,d),p=!0};Object.defineProperty(t,"__esModule",{value:!0}),t.NativePlayer=void 0;var d,p=n(4524),h=n(40306),f=n(3336),g=n(25926),v=n(4224),y=n(48143),m=n(80813),b=n(56481),S=n(9768),E=n(3714),_=n(90408),T=n(4129),P=n(69957),C=n(44468),A=n(23690),w=n(87827),k=n(21513),O=n(93204),M=n(74853),I=n(34841),x=n(85434),R=n(15487),L=n(89927),D=n(88844),U=n(23068),B=n(58313),N=n(70850),F=n(41138),j=n(19274),H=n(88052),V=n(62756),W=n(29669),z=n(32418),K=n(99373),G=n(30712),q=n(81152),Q=n(81929),X=n(56678);(i=d||(d={})).None="none",i.Metadata="metadata",i.Auto="auto";var Y="not available";function J(e,t){return(e<t.start||e>t.end)&&(e=Math.min(e=Math.max(e,t.start),t.end)),e}function Z(e){return e.length>0&&e.end(e.length-1)!==1/0}s=[],r=function(){function e(e){var t=this;this.Kv=l(this,s),this.Qv=0,this.Vv=!1,this.Wv=null,this.Xv=!1,this.Yv=!1,this.Zv=!0,this.av=-1,this.bv=!1,this.mw=!1,this.nw=!1,this.ow=0,this.rw=-1,this.uw=-1,this.vw=null,this.ww=S.API_ISSUER_NAME,this.xw=S.API_ISSUER_NAME,this.yw=S.API_ISSUER_NAME,this.Aw=0,this.Cw=-1,this.Dw=0,this.Ew=-1,this.Fw=!1,this.Ow=0,this.Pw=[],this.Rw=new Map,this.Sw=1,this.Uw=!0,this.Vw=!1,this.Ww=!1,this.Yw=[],this.Zw=!1,this.aw=!1,this.cw={},this.gw=!1,this.kw=!1,this.lw=!1,this.wx=function(e){if(t.Uy()){var n=e.track;t.Gx(E.PlayerEvent.AudioAdded,{track:t.Vy(n)}),n.enabled&&t.Vv&&t.ix(null,n)}},this.xx=function(e){var n=e.track;t.Uy()&&t.Gx(E.PlayerEvent.AudioRemoved,{track:t.Vy(n)}),t.Rw.delete(n)},this.yx=function(){var e,n,i=t.Mv.getViewModeFromPresentationMode();i===C.ViewMode.PictureInPicture||i===C.ViewMode.Fullscreen&&(0,k.getCapabilities)().isIOS?null==(e=t.vw)||e.enableNative():null==(n=t.vw)||n.disableNative(),t.Kv.store.dispatch((0,A.setPlayerViewMode)(i))},this.zx=function(){(0,_.maybeFireDurationChangedEvent)(t.Nw,t.getDuration(),t.Ov),t.Nw=t.getDuration(),t.Ww&&t.Ex()},this.Ax=function(){t.Bw.stallExit(),t.Fw&&t.Wv&&t.Lx(),t.Xv=!1,t.Bw.transitionToPlayState(!0,t.ww)},this.Bx=function(){t.Bw.isStalled?(t.Bw.stallExit(),t.Bw.transitionToPlayingState(t.ww)):t.Bw.isStopped()?t.Ox():t.Bw.isPlaying()||(t.Bw.transitionToPlayState(!0,t.ww),t.Bw.transitionToPlayingState(t.ww))},this.Fx=function(){var e;(0,D.clearTimeoutIfDefined)(t.Lw),null==(e=t.Mw)||e.dispose(),t.Vw||(0,D.clearTimeoutIfDefined)(t.Kw),t.Vw=!0,t.gw=!1,t.Uw=!0,t.Ww=!0,t.Ex()},this.Gx=function(e,n,i,r){void 0===n&&(n={}),void 0===i&&(i=!1),void 0===r&&(r=!1),t.Ov&&(t.Uw||i)&&t.Ov.dispatchEvent(e,n,r)},this.Hx=function(e){var n=t.Kx(),i=n.currentTime;(-1!==t.Cw||i!==t.Cw)&&!t.mw&&(t.Jx(i)?(Promise.resolve(t.Mv.play()).catch(function(e){t.Lv.insane("Play promise rejected:",e)}),t.nw=!0,n.currentTime=t.Dw):t.Ix(n,i),t.bv=!1,t.Qw&&(t.Qw.width=t.Mv.videoWidth,t.Qw.height=t.Mv.videoHeight))},this.Ox=function(){t.isPlaying()||(t.Xv=!1,t.kx(),t.Bw.transitionToPlayingState(t.ww))},this.Px=function(){t.Xv=!0},this.getCurrentTime=function(e){void 0===e&&(e=C.TimeMode.AbsoluteTime);var n=t.getStartDate();return e===C.TimeMode.AbsoluteTime&&n?N.Util.timeInSeconds(n)+t.Kx().currentTime:t.Kx().currentTime},this.getAudioQuality=this.getPlaybackAudioData,this.getVideoQuality=this.getPlaybackVideoData,this.fy=function(){var e,n=t.Kx(),i=Math.abs(n.currentTime-t.Dw),r=t.Pv.GLOBAL_DISABLE_SEEKING,o=null!=(e=t.pw)?e:n.duration;r&&(i>.75||n.currentTime<o-.75)?(Promise.resolve(t.Mv.play()).catch(function(e){t.Lv.insane("Play promise rejected:"+e)}),t.nw=!0,t.Mv.currentTime=t.Dw):(t.Dw=0,t.Bw.isPlaying()&&t.Bw.transitionToPausedState(!0,t.xw),t.Bw.transitionToStoppedState())},this.ky=function(){t.gy(),t.ow=0,!t.Pv.GLOBAL_DISABLE_SEEKING||t.Zw||t.bw?(t.Cw=t.Kx().currentTime,t.bw=!1,t.Bw.isSeeking()&&(t.vw&&t.vw.seek(),t.jy())):t.mw=!1,t.ly()},this.my=function(){if(t.Ew=-1,t.Pv.GLOBAL_DISABLE_SEEKING&&!t.bw)t.mw=!t.Zw,t.ow++,t.ow>1&&(t.nw=!1);else if(!t.Bw.isTimeShifting()){var e=t.Kx().currentTime;t.Bw.isSeeking()?(0,k.getCapabilities)().isIOS&&t.lw&&(t.Bw.transitionToSeekingIOSState(e,S.INTERNAL_ISSUER_NAME,!0,t.Dw),t.Cw=e):t.Bw.transitionToSeekingIOSState(e,S.INTERNAL_ISSUER_NAME)}},this.qy=function(){void 0===t.qw&&(t.qw=t.Kx().currentTime)},this.ry=function(){t.Qv++,t.Qv<t.Pv.IOS_MIN_TIMEUPDATES_AFTER_AD||(t.Ov.off(E.PlayerEvent.TimeChanged,t.ry),t.Zw=!0,t.Ux({time:t.Rv,issuer:S.API_ISSUER_NAME,force:!0}))},this.Kv=e,this.sw=!1,this.Lv=e.logger,this.Mv=e.videoElement,this.Nv=e.config,this.Ov=e.eventHandler,this.Pv=e.settings,this.ew=[],this.Jw=null,this.Uv=this.Mv.volume,this.hw=this.Mv.getAttribute("crossOrigin"),this.tw=-1/0,(0,z.isAirplaySupported)()&&(this.Gw=new z.AppleAirplayService(this.Mv,this.Ov)),this.iw=new q.HlsLiveNativeTimeTracker(this,e),this.fw=[{event:j.MediaElementEvent.pause,handler:function(){t.gy(),t.Xv||t.Bw.transitionToPausedState(!0,t.xw,!0)}},{event:j.MediaElementEvent.ended,handler:function(){t.fy()}},{event:j.MediaElementEvent.play,handler:this.Ax},{event:j.MediaElementEvent.canplay,handler:function(){t.Bw.stallExit()}},{event:j.MediaElementEvent.seeking,handler:function(){t.bv=!0,t.my(),t.getCurrentTime()>=t.getDuration()&&(t.ky(),t.fy())}},{event:j.MediaElementEvent.seeked,handler:function(){t.ky(),t.Fw&&t.Wv&&t.Lx()}},{event:j.MediaElementEvent.durationchange,handler:this.zx},{event:j.MediaElementEvent.loadeddata,handler:this.Fx},{event:j.MediaElementEvent.loadedmetadata,handler:function(){t.Lw=window.setTimeout(t.Fx,200)}},{event:j.MediaElementEvent.playing,handler:this.Bx},{event:j.MediaElementEvent.waiting,handler:function(){t.gy(),t.Bw.stallEnter()}},{event:j.MediaElementEvent.timeupdate,handler:this.Hx},{event:j.MediaElementEvent.error,handler:function(e){var n;t.Vw||1!==t.Pw.length||t.type!==C.StreamType.Progressive?(t.Xw.reject(),t.Yv?(t.Lv.debug("Ignoring video element error",e.errorObject),t.Yv=!1):(t.Lv.debug("video element has thrown an error",e.errorObject),(0,D.clearTimeoutIfDefined)(t.Kw),null==(n=t.Ov)||n.fireError((0,_.createPlayerErrorFromMediaError)(e,t.Kv.sourceContext.sourceIdentifier,!0)))):t.Iy(h.ErrorCode.SOURCE_PROGRESSIVE_STREAM_ERROR,t.Mv.getWrappedElement().src,e)}},{event:j.MediaElementEvent.webkitpresentationmodechanged,handler:this.yx},{elementSelector:function(e){return e.audioTracks},event:"addtrack",handler:this.wx},{elementSelector:function(e){return e.audioTracks},event:"removetrack",handler:this.xx}]}return e.prototype.Cx=function(){var e,t;return!((0,R.isWebOS)()||(0,R.isTizenOs7OrNewer)()||(0,R.isEdgeAndroid)()||(null==(t=null==(e=this.Nv)?void 0:e.tweaks)?void 0:t.prevent_video_element_preloading)||this.getDuration())},e.prototype.Dx=function(){if(!this.ay()||(null==(t=null==(e=this.Nv)?void 0:e.tweaks)?void 0:t.prevent_video_element_preloading)||(0,R.isWebOS)()||this.kw)return!1;var e,t,n=this.Mv.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA;return!Z(this.Kx().seekable)&&!n},e.prototype.Ex=function(){this.Cx()||this.Dx()?this.Lv.debug("Cannot resolve deferred loading yet, waiting for required data to be loaded ",{duration:String(this.getDuration()),seekableRangeAvailable:Z(this.Kx().seekable),videoElementReadyState:this.Kx().readyState}):this.Xw.resolve()},e.prototype.Ix=function(e,t){if(this.nw=!1,this.pw=e.duration,t>this.pw+2)return this.Kv.logger.debug("CurrentTime ".concat(t," exceeds video duration (").concat(this.pw,"), reverting current time")),void(e.currentTime=this.pw-.1);this.Bw.isSeeking()?this.Lv.debug("Detected timeupdate during seeking. Time: ".concat(t)):this.Dw=t;var n=t>this.Ew;this.Ew=Math.max(t,this.Ew),n&&this.Bw.stallExit(),this.Bw.isSeeking()||this.Bw.isTimeShifting()||!this.isPlaying()||(null!=this.getStartDate()?this.Gx(E.PlayerEvent.TimeChanged,{time:this.getCurrentTime(),relativeTime:t}):this.Gx(E.PlayerEvent.TimeChanged,{time:this.getCurrentTime()}))},e.prototype.Jx=function(e){if(!this.Pv.GLOBAL_DISABLE_SEEKING||!this.bv)return!1;var t=-1!==this.Cw&&e>this.Cw+.75,n=Math.abs(e-this.Dw);return(!this.nw||t)&&n>.75},e.prototype.Kx=function(){return this.Fw&&this.Wv?this.Wv:this.Mv},e.prototype.Lx=function(){var e=Date.now();(0,L.toSeconds)(e-this.Ow)>=1/30&&(this.Mv.currentTime=this.Wv.currentTime,this.Ow=e),this.isPlaying()&&window.requestAnimationFrame(this.Lx)},e.prototype.Mx=function(){if(this.isLive()&&!this.Tx()){var e=this.ty();e.end>=0&&this.Rx(e.end,S.STARTUP_ISSUER_NAME)}},e.prototype.Nx=function(){void 0!==this.jw&&(this.gx(),this.seek(this.jw,"api-play"))},e.prototype.play=function(e){return this.Zv?(this.ww=e,this.Nx(),this.Mx(),this.Kx().play()):Promise.reject("Play control not permitted")},e.prototype.getStartDate=function(){if(!this.isLive())return null;var e=this.Kx().getWrappedElement(),t="function"==typeof e.getStartDate?e.getStartDate():null;return t&&!isNaN(t.getTime())?t:null},e.prototype.preload=function(){this.Kx().preload=this.mx()},e.prototype.pause=function(e){this.xw=e;var t=this.Kx();this.Zv&&this.Vv&&(this.Bw.transitionToPausedState(!1,this.xw),t.pause())},e.prototype.mute=function(e){this.Kx().muted||(this.Kx().muted=!0,this.Gx(E.PlayerEvent.Muted,{issuer:e||S.API_ISSUER_NAME}))},e.prototype.unmute=function(e){this.Kx().muted&&(this.Kx().muted=!1,this.Gx(E.PlayerEvent.Unmuted,{issuer:e||S.API_ISSUER_NAME}))},e.prototype.Qx=function(e){var t=this.getStartDate();if(!t)return this.isLive()&&this.Lv.debug("No startDate on live stream, using seek target as relative time: ".concat(e)),e;var n=e-(0,L.toSeconds)(t.getTime());return this.Lv.debug("Converting absolute seek target ".concat(e," to relative ").concat(n," (startDate: ").concat(t,")")),n},e.prototype.seek=function(e,t){var n=this,i=this.Sx(e),r=this.getCurrentTime();return this.Lv.debug("Seek to ".concat(e," requested (issuer: ").concat(t,", currentTime: ").concat(r,")")),i&&r!==e?(this.iw.adjustTargetTime(e,t).then(function(e){n.yw=t,n.bx(e,t);var i=n.Qx(e);return n.Ux({time:i,issuer:t})}),this.Ww&&this.getDuration()>0):(this.Lv.debug("Seek to ".concat(e," not performed (seekingAllowed: ").concat(i,", currentTime: ").concat(r,")")),!1)},e.prototype.Rx=function(e,t){this.rw=this.getCurrentTime(),this.yw=t,this.cx(e,t),this.Vx({time:e,issuer:t})},e.prototype.Sx=function(e){this.bw=this.aw&&this.ax(e);var t=!this.Pv.GLOBAL_DISABLE_SEEKING&&this.Zx();return(this.bw||t)&&this.Zv},e.prototype.Tx=function(){var e=!(this.Nv.playback&&this.Nv.playback.hasOwnProperty("timeShift"))||!!this.Nv.playback.timeShift;return this.isLive()&&e},e.prototype.Ux=function(e){return!this.Wx(e)&&(this.Bw.transitionToSeekingState(e.time,e.issuer,!1),this.Xx(e),!0)},e.prototype.Vx=function(e){this.Wx(e,!0)||(this.Bw.transitionToTimeShiftingState(this.getCurrentTime(),e.time,e.issuer,!1),e.time<0&&(e.time=this.ty().end+e.time,this.gy()),this.Xx(e))},e.prototype.Wx=function(e,t){return void 0===t&&(t=!1),this.Bw.isSeeking()&&"api-play"!==e.issuer?(this.Lv.debug("Seeking already in progress, delaying seek for time",e.time),this.hx(e,t,[j.MediaElementEvent.seeked]),!0):this.Ww?0===this.getDuration()?(this.Lv.debug("Delaying the seek until stream duration is known"),this.hx(e,t,[j.MediaElementEvent.durationchange]),!0):this.Mv.seekable.length<1&&(this.Lv.debug("Delaying the seek as the seekable range is not yet known"),this.hx(e,t,[j.MediaElementEvent.timeupdate,j.MediaElementEvent.canplay]),!0):(this.Lv.debug("Delaying the seek until data is loaded"),this.hx(e,t,[j.MediaElementEvent.loadeddata]),!0)},e.prototype.Xx=function(e){var t=e.issuer===S.ADVERTISING_ISSUER_NAME,n=this.ty(),i=this.Yx(e.time,n,t);this.aw=!1,this.nw=this.nw||this.bw||e.force;var r=parseFloat(i.toFixed(2));this.uw=r,this.Lv.debug("Setting time on video element from ".concat(this.Kx().currentTime," to ").concat(r)),this.Kx().currentTime=r},e.prototype.Yx=function(e,t,n){void 0===n&&(n=!1),this.Lv.debug("Adjusting seek target ".concat(e," to seekable range [").concat(t.start,", ").concat(t.end,"] ")+"(isAd: ".concat(n,", isLive: ").concat(this.isLive(),")"));var i=J(e,t);return n?e>=t.end&&(i=t.end-.1):this.isLive()||(i=Math.min(i,t.end-this.Pv.SEEK_TO_END_OFFSET)),i!==e&&this.Lv.debug("Adjusted seek target from ".concat(e," to ").concat(i)),i},e.prototype.Zx=function(){var e=this.Nv&&this.Nv.hasOwnProperty("playback")?this.Nv.playback:{};return!e.hasOwnProperty("seeking")||e.seeking},e.prototype.ax=function(e){var t=this.Kv.sourceContext.source?this.Kv.sourceContext.source:{};return t.hasOwnProperty("options")&&t.options.hasOwnProperty("startTime")&&e===t.options.startTime},e.prototype.bx=function(e,t){t!==S.STARTUP_ISSUER_NAME&&this.Gx(E.PlayerEvent.Seek,{position:this.getCurrentTime(),seekTarget:e,issuer:t||S.API_ISSUER_NAME})},e.prototype.cx=function(e,t){t!==S.STARTUP_ISSUER_NAME&&this.Gx(E.PlayerEvent.TimeShift,{target:e<0?this.rw+e:e,position:this.rw,issuer:t||S.API_ISSUER_NAME})},e.prototype.dx=function(e){var t=this;return new Promise(function(n){var i=function(){e.removeEventListener(j.MediaElementEvent.seeked,i),n()};t.ew.push({el:e,ev:j.MediaElementEvent.seeked,fn:i}),e.addEventListener(j.MediaElementEvent.seeked,i)})},e.prototype.ex=function(e,t){var n=this;return new Promise(function(i,r){var o=0,s=function(){var a=e.buffered,u=a.length>0?a.end(a.length-1):-1/0;(o+=+!!isFinite(u))>n.Pv.SAFARI_NUM_PROGRESS_EVENTS_AFTER_SEEK_GLITCH&&u<t?(e.removeEventListener(j.MediaElementEvent.progress,s),r(null)):u>=t&&(e.removeEventListener(j.MediaElementEvent.progress,s),i())};n.ew.push({el:e,ev:j.MediaElementEvent.progress,fn:s}),e.addEventListener(j.MediaElementEvent.progress,s)})},e.prototype.fx=function(e,t){var n=this;return this.type!==C.StreamType.Hls?Promise.resolve():this.dx(e).then(function(){return n.ex(e,t)}).catch(function(){throw n.Lv.debug("seek to target time (".concat(t,") failed - trying to recover by seeking to ").concat(t+1)),null})},e.prototype.gx=function(){var e=this;Object.keys(this.cw).forEach(function(t){e.Kx().removeEventListener(t,e.cw[t])}),this.cw={}},e.prototype.hx=function(e,t,n){var i=this,r=this.Kx();this.gx(),this.jw=e.time;var o=function(n){if(i.gx(),(0,U.isNumber)(n))s=n;else if(t&&e.time>=0){var s,a=i.ty().end;s=a>0?a:e.time}else s=e.time;var u={time:s,issuer:e.issuer,force:e.force};i.fx(r,s).catch(function(){return o(s+1)}),i.jw=void 0,t?i.Vx(u):i.Ux(u)};n.forEach(function(e){r.addEventListener(e,o),i.cw[e]=o})},e.prototype.setAudio=function(e){var t=this,n=M.ArrayHelper.toArray(this.Mv.audioTracks).find(function(n){return t.Wy(n)===e});n&&this.jx(n)},e.prototype.ix=function(e,t){this.Gx(E.PlayerEvent.AudioChanged,{targetAudio:this.Vy(t),sourceAudio:e,time:this.Mv.currentTime})},e.prototype.jx=function(e){if(!e.enabled){var t=M.ArrayHelper.toArray(this.Mv.audioTracks).find(function(e){return e.enabled}),n=null;t&&(t.enabled=!1,n=this.Vy(t)),e.enabled=!0,this.ix(n,e)}},e.prototype.setVolume=function(e,t){var n=this.Kx(),i=this.Uv,r=Math.min(e/100,1);i!==r&&(this.Uv=r,n.volume=r,this.Gx(E.PlayerEvent.VolumeChanged,{targetVolume:100*r,sourceVolume:100*i,issuer:t||S.API_ISSUER_NAME}))},e.prototype.kx=function(){var e=this;(0,D.clearTimeoutIfDefined)(this.Kw),this.Vw||(this.Kw=window.setTimeout(function(){e.Kw=void 0,!e.Vw&&e.Ov&&(e.type===C.StreamType.Hls?e.Ov.fireError(new f.PlayerError(h.ErrorCode.NETWORK_MANIFEST_DOW
1NLOAD_TIMEOUT,{sourceUrl:e.Tw.url},"Failed to load the HLS playlist: the request timed out.",e.Kv.sourceContext.sourceIdentifier)):e.type===C.StreamType.Progressive&&e.Ov.fireError(new f.PlayerError(h.ErrorCode.NETWORK_PROGRESSIVE_STREAM_DOWNLOAD_TIMEOUT,{sourceUrl:e.Tw.url},"Failed to load the progressive source: the request timed out.",e.Kv.sourceContext.sourceIdentifier)))},(0,L.toMilliSeconds)(this.Pv.XHR_TIMEOUT/2)))},e.getContentDomain=function(e){var t=document.createElement("a");return t.href=e,""===t.host&&(t.href=t.href),t.hostname},e.prototype.lx=function(e){var t;(0,R.isTizen)()&&(null==(t=this.Mw)||t.dispose(),this.Mw=new K.AssetAvailabilityChecker(this.Kv,e,this.Mv))},e.prototype.prepareLoad=function(){return Promise.resolve()},e.prototype.prepareSource=function(e,t){return Promise.resolve()},e.prototype.mx=function(){var e,t,n,i;return(null==(t=null==(e=this.Nv)?void 0:e.tweaks)?void 0:t.prevent_video_element_preloading)?d.None:!1===(null==(i=null==(n=this.Nv)?void 0:n.adaptation)?void 0:i.preload)?d.Metadata:d.Auto},e.prototype.load=function(e,t,n){var i,o=this,s=null!=(i=null==t?void 0:t.seeking)&&i;this.Bw=this.Kv.serviceManager.get(m.ServiceName.PlayerStateService),this.Bw.transitionToSeekedState(!1);var a=this.mx();a!==d.Auto&&this.Mv.setAttribute("preload",a),this.type=this.Kv.sourceContext.technology.streaming,this.Tw=e,e.type&&(this.type=e.type),!0===this.Vv&&this.unload().catch(function(){}),this.Vw=!1,this.Ww=!1,this.Kx().nativeMediaEventListener.reset(),this.aw=!0,this.Yv=!1,this.Aw=0,this.jw=void 0,this.kw=!1,this.Sw=1,this.Rw=new Map,e.hasOwnProperty("vr")&&e.vr&&e.vr.restrictedInlinePlayback?(this.Fw=!0,this.Wv=N.Util.getVRAudioElement(),this.ny(this.Wv)):(this.Wv=null,this.Fw=!1,this.ny(this.Mv)),this.Ov.on(E.PlayerEvent.TimeChanged,this.qy),this.dw=(0,O.subscribe)(this.Kv.store)(function(e){return(0,w.getIsStopped)((0,w.getPlayerState)(e))},this.Px,function(e){return!0===e}),this.Pv.GLOBAL_DISABLE_SEEKING=s||!1,this.av>-1&&((0,D.clearTimeoutIfDefined)(this.av),this.av=-1);var u="";e&&e.url&&("string"==typeof e.url?u=e.url:e.url.length>0&&(u=e.url[0].url));var l=window.location.hostname===r.getContentDomain(u);e.hasOwnProperty("vr")&&e.vr&&!l&&(this.hw=this.Mv.getAttribute("crossOrigin"),this.Mv.setAttribute("crossOrigin","anonymous")),this.Mv.eventHandler.reset(),this.gw||(this.vw=this.py()),this.Xw=new I.Deferred;
1var c=this.ox(e,n);return this.Xw.promise.then(function(){o.Kv.sourceContext.source=e.config}).then(function(){return c}).then(function(){return o.px(e)})},e.prototype.nx=function(e){var t=this;(0,R.isSafari17orIOS17)()&&fetch(e.url,{method:W.HttpRequestMethod.GET,headers:{Range:"bytes=0-0"}}).then(function(e){e.redirected&&(t.Lv.debug("Detected source redirection."),t.Ww&&t.Xw.resolve(),t.kw=!0)}).catch(function(){})},e.prototype.ox=function(e,t){var n=this;return this.type===C.StreamType.Hls?(this.nx(e),this.vx(e)):this.type===C.StreamType.Progressive?this.Gy(e,t).then(function(){return n.qx()}):Promise.resolve()},e.prototype.px=function(e){this.zw=e,this.Vv=!0,this.Dw=0,this.Ew=-1,this.nw=!1},e.prototype.qx=function(){var e,t;(null==(t=null==(e=this.Nv)?void 0:e.tweaks)?void 0:t.prevent_video_element_preloading)?this.Ex():this.Mv.load()},e.prototype.rx=function(e,t){var n=this;if(e.config.drm&&e.config.drm.fairplay){var i=H.ModuleManager.get(V.ModuleName.DRM).FairplayHandler;this.Hw=new i(this.Kv,this.Mv,e.config.drm.fairplay)}var o=r.createSourceElement(t,null);this.Ly(o,"0",e),this.lx(o);var s={element:o,handler:function(e){return n.Iy(h.ErrorCode.SOURCE_HLS_STREAM_ERROR,o.src,e)}};this.Yw.push(s),s.element.addEventListener(j.MediaElementEvent.error,s.handler)},e.prototype.sx=function(e,t){this.rx(e,t),this.qx()},e.prototype.tx=function(e,t){var n=this,i=B.URLHelper.appendQueryParametersToUrl(t,{"bitmovin-player-id":this.Kv.internalPlayerID});return this.sx(e,i),this.Iw.resolveMasterManifest(e.url).then(function(){}).catch(function(e){n.Lv.debug("Couldn't access master playlist with ServiceWorker: ".concat(e))})},e.prototype.ux=function(e,t){var n=this;return Q.createHlsManifestController(this.Kv).then(function(i){return n.Iw=i,n.Pv.NATIVE_HLS_DOWNLOAD_ERROR_HANDLING&&(n.Jw=new G.HlsDownloadErrorHandler(n.Kv,i)),Q.shouldUseServiceWorker(n.Kv)?n.tx(e,t):n.Iw.resolveMasterManifest(e.url).then(function(t){0!==t.indexOf("data")&&0!==t.indexOf("blob")||n.sx(e,t)}).catch(function(e){n.Lv.debug("Couldn't access master playlist for native HLS parsing: ".concat(e))})})},e.prototype.vx=function(e){if("string"!=typeof e.url){var t,n=new f.PlayerError(h.ErrorCode.SOURCE_INVALID,{given:e.url},"Cannot load the HLS playlist: the source URL should be a string.",this.Kv.sourceContext.sourceIdentifier);return null==(t=this.Ov)||t.fireError(n),this.Xw.reject(n),Promise.resolve()}var i=this.adjustToFullUrlWithQueryParams(e.url);return this.Pv.NATIVE_HLS_PARSING?this.ux(e,i):(this.sx(e,i),Promise.resolve())},e.prototype.Gy=function(e,t){if(this.Pw=[],Array.isArray(e.url))this.Hy(e.url,t);else{var n={url:e.url,bitrate:0};this.Mv.src=this.adjustToFullUrlWithQueryParams(n.url),this.Ny("0",n),this.Oy("0",n),this.lx(this.Mv.getWrappedElement())}return Promise.resolve()},e.prototype.Hy=function(e,t){var n,i=this;t=t||((n=e.findIndex(function(e){return!0===e.preferred}))>-1?String(n):"0");var r=this.Jy(e,t,!0);if(r){var o={element:r,handler:function(e){return i.Iy(h.ErrorCode.SOURCE_PROGRESSIVE_STREAM_ERROR,r.src,e)}};this.Yw.push(o),o.element.addEventListener(j.MediaElementEvent.error,o.handler),this.Fw&&this.Wv&&this.Wv.load(),this.lx(r)}},e.prototype.Iy=function(e,t,n){var i,r=this;(0,D.clearTimeoutIfDefined)(this.Kw),null==(i=this.Mw)||i.dispose(),this.Vv=!0,this.Lv.debug("Caught a stream error event (".concat(e,", ").concat(t,")"),n),new T.DefaultContentLoader(this.Kv).load(t).then(function(e){return{status:e.status,statusText:e.statusText,error:void 0}}).catch(function(e){return{error:e,status:(null==e?void 0:e.status)||0,statusText:(null==e?void 0:e.statusText)||""}}).then(function(i){var o,s=i.error,a=i.status,u=i.statusText,l=(null==n?void 0:n.message)||n,c=function(e,t){r.Xw.reject(new f.PlayerError(e,t,"The video element has thrown an error while loading the stream.",r.Kv.sourceContext.sourceIdentifier))};200!==a?(o={event:n,error:s,status:a,statusText:u,src:t,extraMessage:l},r.Lv.debug("last/only source has thrown an error ".concat(a," - ").concat(u),o),c(e,o)):(o={event:n,error:s,src:t,extraMessage:l},r.Lv.debug("last/only source has thrown an error, but we are able to download the asset during the error handling.",o),r.Tw&&r.Aw<r.Pv.MAX_RETRIES?(r.Aw++,r.Lv.debug("Reloading the source: attempt ".concat(r.Aw," of ").concat(r.Pv.MAX_RETRIES,".")),r.ox(r.Tw).catch(function(){return c(e,o)})):c(e,o))})},e.prototype.Jy=function(e,t,n){for(var i,o=[],s=-1,a=null,u=null,l=0;l<e.length;l++){var c=e[l];
vendor: 15,448 bytes, line 1
1if(!this.Ky(c,u,n)){if(i=r.createSourceElement(this.adjustToFullUrlWithQueryParams(c.url),c.type),u=u||c.type,this.Ny(String(l),c),n){if(o.indexOf(c.type)>-1){this.Lv.debug("Stream of mime type ".concat(c.type," already added.. continuing"));continue}t===String(l)?(a=i,s=c.bitrate,this.Ly(i,String(l),c),o.push(c.type)):s===c.bitrate&&(a=i,this.My(i),o.push(c.type))}else a=i,this.Ly(i,String(l),c);this.Fw&&this.Wv&&(this.Wv.innerHTML=this.Mv.innerHTML)}}return a},e.prototype.Ky=function(e,t,n){return!r.isValidProgressiveSourceObject(e)||!!n&&(!this.Py(e.type)||!!t&&t!==e.type)},e.isValidProgressiveSourceObject=function(e){return"object"==typeof e&&e&&e.url&&""!==e.url},e.prototype.Ly=function(e,t,n){this.Mv.appendChild(e),this.Oy(t,n)},e.prototype.My=function(e){this.Mv.appendChild(e)},e.prototype.Ny=function(e,t){var n={id:e};t.bitrate&&(n.bitrate=t.bitrate),n.label=String(t.label||t.bitrate||"unknown"),this.Pw.push(n)},e.prototype.Oy=function(e,t){this.Qw={id:e},t.bitrate&&(this.Qw.bitrate=t.bitrate),this.Qw.label=""+(t.label||t.bitrate||"unknown")},e.prototype.Py=function(e){return!(this.Mv.canPlayType(e).length<=0&&(this.Lv.debug("Mime type"+e+" not supported.. continuing"),1))},e.createSourceElement=function(e,t){var n=document.createElement("source");return n.src=e,t&&(0>t.indexOf("/")&&(t="video/"+t),n.type=t),n},e.prototype.unload=function(e,t){var n,i;return void 0===e&&(e=S.API_ISSUER_NAME),void 0===t&&(t=!1),this.iw.onUnload(e),this.gx(),this.Xw&&!t&&this.Xw.reject(),(0,D.clearTimeoutIfDefined)(this.Lw),(0,D.clearTimeoutIfDefined)(this.Kw),null==(n=this.Mw)||n.dispose(),this.Xv=!1,this.Ew=-1,this.Hw=(0,b.dispose)(this.Hw),this.Jw=(0,b.dispose)(this.Jw),this.Iw=(0,b.dispose)(this.Iw),this.Qy(e),this.ew.forEach(function(e){return e.el.removeEventListener(e.ev,e.fn)}),this.ew=[],this.gw||(null==(i=this.vw)||i.signalSourceChange(),this.vw=(0,b.dispose)(this.vw)),this.Ty(),this.Ry(),this.pause(),this.Yv=!0,this.Sy(),this.Rw.clear(),this.dw&&this.dw(),this.Uw&&(this.Qw=null),this.Vv&&(this.Vv=!1,t||(this.Gx(E.PlayerEvent.SourceUnloaded,{oldSource:this.zw}),this.Nw=null)),Promise.resolve()},e.prototype.Qy=function(e){var t,n,i,r=null==(t=this.Kv.sourceContext)?void 0:t.sourceIdentifier;if(r){var o=this.Kv.serviceManager,s=!(null==(n=this.Kv.sourceContext)?void 0:n.isAd);e===S.ADVERTISING_ISSUER_NAME&&s?null==(i=o.get(m.ServiceName.NativeManifestService,r))||i.suspend():(0,y.disposeService)(o,m.ServiceName.NativeManifestService,r)}},e.prototype.Ry=function(){if(this.Fw&&this.Wv){for(this.Wv.removeAttribute("src");this.Wv.firstChild;)this.Wv.removeChild(this.Wv.firstChild);this.Wv.load()}},e.prototype.Sy=function(){var e=this;this.Fw?this.Wv&&this.oy(this.Wv):this.oy(this.Mv),this.gx(),this.Ov.off(E.PlayerEvent.TimeChanged,this.qy),this.Ov.off(E.PlayerEvent.TimeChanged,this.ry),this.Yw.forEach(function(t){try{t.element.removeEventListener(j.MediaElementEvent.error,t.handler)}catch(t){e.Lv.debug("Error while removing event listener",t)}})},e.prototype.Ty=function(){F.VideoElementUtil.removeSource(this.Mv),null!=this.hw?this.Mv.setAttribute("crossOrigin",this.hw):this.Mv.removeAttribute("crossOrigin"),this.Mv.load()},e.prototype.Uy=function(){return this.Fw&&this.Wv&&"readyState"in this.Wv?this.Wv.readyState!==HTMLMediaElement.HAVE_NOTHING:!("readyState"in this.Mv)||this.Mv.readyState!==HTMLMediaElement.HAVE_NOTHING},e.prototype.isLive=function(){return this.Kx().duration===1/0},e.prototype.isPlaying=function(){return this.Bw.isPlaying()},e.prototype.isPaused=function(){return this.Bw.isPaused()},e.prototype.hasEnded=function(){return this.Xv},e.prototype.isMuted=function(){return this.Kx().muted},e.prototype.isStalled=function(){return this.Bw.isStalled},e.prototype.getVolume=function(){return 100*this.Kx().volume},e.prototype.getDuration=function(){return this.Kx().duration},e.prototype.Vy=function(e){var t={id:this.Wy(e),label:e.label,lang:e.language,getQualities:null},n=this.Xy(t);return n&&"string"==typeof n&&(t.label=n),t},e.prototype.getAudio=function(){var e=M.ArrayHelper.toArray(this.Mv.audioTracks).findIndex(function(e){return e.enabled});return -1===e?null:this.getAvailableAudio()[e]},e.prototype.getAvailableAudio=function(){var e=this;return M.ArrayHelper.toArray(this.Mv.audioTracks).map(function(t){return e.Vy(t)})},e.prototype.Wy=function(e){return this.Rw.has(e)||this.Rw.set(e,String(this.Sw++)),this.Rw.get(e)},e.prototype.Xy=function(e){var t={id:e.id,lang:e.lang,mimeType:x.MimeType.AudioMp4};return this.Yy()(t)},e.prototype.Yy=function(){var e=this.Kv.sourceContext,t=e&&e.source&&e.source.labeling;return t&&t[this.type]&&t[this.type].tracks?"function"!=typeof t[this.type].tracks?r.getDefaultLabelForAudio:t[this.type].tracks:r.getDefaultLabelForAudio},e.getDefaultLabelForAudio=function(){return null},e.prototype.getDownloadedVideoData=function(){return this.type===C.StreamType.Progressive?this.Qw:this.Iw?this.Iw.getDownloadedVideoData():{id:Y,bitrate:0,height:0,width:0,isAuto:!0}},e.prototype.getDownloadedAudioData=function(){return{id:Y,bitrate:0,isAuto:this.type===C.StreamType.Progressive}},e.prototype.Zy=function(e){var t={};return t.id=e.id,t.label=e.label,e.width>1?t.width=e.width:this.Qw&&this.Qw.id===e.id&&(this.Qw.width>1?t.width=this.Qw.width:!isNaN(this.Mv.videoWidth)&&this.Mv.videoWidth>1&&(t.width=this.Mv.videoWidth)),e.height>1?t.height=e.height:this.Qw&&this.Qw.id===e.id&&(this.Qw.height>1?t.height=this.Qw.height:!isNaN(this.Mv.videoHeight)&&this.Mv.videoHeight>1&&(t.height=this.Mv.videoHeight)),void 0!==e.bitrate&&"unknown"!==e.bitrate&&(t.bitrate=e.bitrate),t},e.prototype.getPlaybackVideoData=function(){if(this.Iw){var e=this.Iw.getPlayingVideoData();if(e)return e}if(this.Qw){var t=this.Zy(this.Qw);return"progressive"!==this.type&&(t.id=Y),t}return{id:Y,bitrate:0,height:this.Mv.videoHeight,width:this.Mv.videoWidth}},e.prototype.getPlaybackAudioData=function(){return{id:Y,bitrate:0}},e.prototype.getMaxTimeShift=function(){if(!this.Tx())return 0;var e=this.ty();return this.ay()&&e.start>=0?e.start-e.end:0},e.prototype.ay=function(){return this.type===C.StreamType.Hls&&this.isLive()},e.prototype.timeShift=function(e,t){if(this.Tx()&&this.by(e,t))if(0===e){var n=this.ty();n.end>=0&&this.Rx(n.end)}else this.Rx(e,t)},e.prototype.by=function(e,t){if(t===S.STARTUP_ISSUER_NAME&&null==(null==(n=this.Kv.sourceContext.source.options)?void 0:n.startTime)&&null==(null==n?void 0:n.startOffset))return!1;var n,i=Math.abs(Math.abs(e)-Math.abs(this.getTimeShift())),r=this.hy(e);return i>.25&&!(this.sw&&r)},e.prototype.getTimeShift=function(){if(this.cy())return 0;var e=this.ty();if(e.start>=0&&this.ey()){var t=J(this.Kx().currentTime-e.end,this.sy());this.sw=this.hy(t)&&!this.dy(),this.tw=this.sw?0:t}return isFinite(this.tw)?this.tw:0},e.prototype.cy=function(){return!this.isLive()||!this.Bw.hasBeenPlaying&&!this.Bw.seekedOrTimeshifted||this.sw},e.prototype.dy=function(){return this.isStalled()||this.isPaused()},e.prototype.ey=function(){return!isFinite(this.tw)||this.dy()},e.prototype.getManifest=function(){return this.Iw?this.Iw.getManifest():null},e.prototype.getSnapshot=function(e,t){if(this.isPlaying()||this.isPaused()){var n=this.Mv.videoWidth,i=this.Mv.videoHeight;if(this.Sv||(this.Sv=document.createElement("canvas"),this.Sv.id="snapshotHiddenCanvas"),this.Sv&&this.Sv.getContext&&this.Sv.getContext("2d")){this.Sv.height=i,this.Sv.width=n,this.Tv=this.Sv.getContext("2d"),this.Tv.drawImage(this.Mv.getWrappedElement(),0,0,n,i);var r=void 0;try{("image/jpeg"===e||"image/webp"===e)&&(Number(t)===t?(t<0||t>1)&&(t=1):t=1),r=this.Sv.toDataURL(e,t)}catch(e){return void(e&&e.message?this.Lv.debug("Snapshot acquisition failed: "+e.message):this.Lv.debug("Snapshot acquisition failed"))}return{height:i,width:n,data:r}}}},e.prototype.setPlaybackSpeed=function(e){this.Kx().playbackRate=e},e.prototype.getPlaybackSpeed=function(){return this.Kx().playbackRate},e.prototype.permitControl=function(e){this.Zv=e},e.prototype.gy=function(){this.tw=-1/0,this.Tx()&&(this.sw=!1)},e.prototype.hy=function(e){return Math.abs(e)<2*this.Pv.SEEK_TO_END_OFFSET},e.prototype.iy=function(){return this.uw!==this.Cw&&this.yw===S.STARTUP_ISSUER_NAME},e.prototype.jy=function(){this.iy()&&(this.Kv.logger.debug("Seek target changed during startup..."),this.bx(this.uw),this.yw=S.API_ISSUER_NAME,this.uw=-1)},e.prototype.ly=function(){this.Bw.isSeeking()&&(this.Bw.transitionToSeekedState(this.yw!==S.STARTUP_ISSUER_NAME),this.yw=S.API_ISSUER_NAME),this.Bw.isTimeShifting()&&this.Bw.transitionToTimeShiftedState(this.yw!==S.STARTUP_ISSUER_NAME)},e.prototype.ny=function(e){for(var t=0;t<this.fw.length;t++){var n=this.fw[t].elementSelector?this.fw[t].elementSelector(e):e;n&&n.addEventListener(this.fw[t].event,this.fw[t].handler)}},e.prototype.oy=function(e){for(var t=0;t<this.fw.length;t++){var n=this.fw[t].elementSelector?this.fw[t].elementSelector(e):e;n&&n.removeEventListener&&n.removeEventListener(this.fw[t].event,this.fw[t].handler)}},e.prototype.getBufferLevel=function(e){var t={level:null,targetLevel:null,type:e,media:C.MediaType.Video},n=this.Kx();if(!n.buffered||n.buffered.length<1)return t;var i=function(i){for(var r=0;r<n.buffered.length;r++){var o=n.buffered.start(r),s=n.buffered.end(r);o>i||s<=i||(t.level=s-i,e===C.BufferType.BackwardDuration&&(t.level=i-o))}},r=n.currentTime;if(i(r),null==t.level){var o=function(e,t){for(var n=e.buffered.start(0),i=Math.abs(n-t),r=1;r<e.buffered.length;r++){var o=Math.abs(e.buffered.start(r)-t);o<i&&(i=o,n=e.buffered.start(r))}return{distanceToCurrentTime:i,closestBufferStart:n}}(n,r),s=o.distanceToCurrentTime,a=o.closestBufferStart;s<1&&(this.Kv.logger.debug("Adjusting buffer level to closest buffer range ",a),i(a))}return t},e.prototype.py=function(){if(H.ModuleManager.has(V.ModuleName.SubtitlesNative))return new(0,H.ModuleManager.get(V.ModuleName.SubtitlesNative).TextTrackController)(this.Kv,this.Mv,this.Nv,this.type);this.Lv.log("Unable to create native SubtitleController because the ".concat(V.ModuleName.SubtitlesNative," module is missing"))},e.prototype.removeSubtitle=function(e){e&&this.vw&&this.vw.removeSubtitle(e)},e.prototype.addSubtitle=function(e){return this.vw?(this.removeSubtitle(e.id),e.kind="subtitles",this.vw.addSubtitle(e)):Promise.reject()},e.prototype.listSubtitles=function(){return this.vw?this.vw.getAvailableSubtitles():[]},e.prototype.enableSubtitle=function(e){return this.vw?this.vw.enableSubtitle(e):Promise.resolve(!1)},e.prototype.disableSubtitle=function(e){return this.vw?Promise.resolve(this.vw.disableSubtitle(e)):Promise.resolve(!1)},e.prototype.adjustToFullUrlWithQueryParams=function(e){var t=B.URLHelper.toFullUrl(e);return B.URLHelper.appendQueryParametersToUrl(t,this.Pv.QUERY_PARAMETERS)},e.prototype.onFullscreenEnter=function(){this.lw=this.Mv.webkitDisplayingFullscreen,this.vw&&this.lw&&this.vw.enableNative()},e.prototype.onFullscreenExit=function(){this.vw&&this.lw&&this.vw.disableNative(),this.lw=!1},e.prototype.getAvailableVideoQualities=function(){var e=this;return"progressive"!==this.type?[]:this.Pw.map(function(t){return e.Zy(t)})},e.prototype.getBufferedRanges=function(){var e=this;return(0,p.getBufferedRanges)(this.Kx()).map(function(t){return(0,p.convertRangeToTimeMode)(t,e.getStartDate(),C.TimeMode.AbsoluteTime)})},e.prototype.setVideoQuality=function(e){var t,n=this,i=this.getPlaybackSpeed(),r=this.Pw.find(function(t){return t.id===e});if("progressive"===this.type&&r&&(!this.Qw||this.Qw.id!==e)){this.gw=!0,this.Rv=this.getCurrentTime(),this.Pw=[],this.Uw=!1;var o=this.Bw.isPlaying()||this.Bw.isPlay();this.Bw.stallEnter(),this.unload(S.API_ISSUER_NAME,!0).catch(function(){});var s=this.Zy(r),a={sourceQuality:this.Qw,sourceQualityId:this.Qw?this.Qw.id:null,targetQuality:s,targetQualityId:s.id};this.Ov.one(E.PlayerEvent.StallEnded,function(){n.Uw=!0,(0,k.getCapabilities)().isIOS||(0,k.getCapabilities)().isSafari?(n.Qv=0,n.Ov.on(E.PlayerEvent.TimeChanged,n.ry)):(n.Qv=1/0,n.ry()),o&&(n.play(S.INTERNAL_ISSUER_NAME).catch(function(){n.Gx(E.PlayerEvent.Warning,new g.PlayerWarning(v.WarningCode.PLAYBACK_COULD_NOT_BE_STARTED))}),n.Bw.transitionToPlayingState(S.INTERNAL_ISSUER_NAME,!1))}),this.Gx(E.PlayerEvent.VideoQualityChanged,u({},a),!0),null==(t=this.Gw)||t.initAirplay(),this.load(this.Tw,{seeking:this.Pv.GLOBAL_DISABLE_SEEKING},e).then(function(){n.setPlaybackSpeed(i),n.Gx(E.PlayerEvent.VideoDownloadQualityChange,u({},a),!0),n.Gx(E.PlayerEvent.VideoDownloadQualityChanged,u({},a),!0),n.Gx(E.PlayerEvent.VideoPlaybackQualityChanged,{sourceQuality:a.sourceQuality,targetQuality:a.targetQuality},!0)})}},e.prototype.isAirplayAvailable=function(){var e,t;return null!=(t=null==(e=this.Gw)?void 0:e.isAirplayAvailable())&&t},e.prototype.isAirplayActive=function(){var e,t;return null!=(t=null==(e=this.Gw)?void 0:e.isAirplayActive())&&t},e.prototype.showAirplayTargetPicker=function(){var e;null==(e=this.Gw)||e.showAirplayTargetPicker()},e.prototype.sy=function(){return this.isLive()?{start:this.getMaxTimeShift(),end:0}:{start:-1,end:-1}},e.prototype.ty=function(){var e=this.Mv.seekable;if(e.length>0){var t={start:e.start(0),end:e.end(0)};return t.start=Math.max(0,t.start),t}return{start:-1,end:-1}},e.prototype.getSeekableRange=function(){if(!this.isLive()||this.Pv.ENABLE_SEEK_FOR_LIVE){var e=this.getStartDate(),t=this.ty();return e?(0,p.convertRangeToTimeMode)(t,e,C.TimeMode.AbsoluteTime):t}return{start:-1,end:-1}},e.prototype.createManifestApi=function(){return this.Iw?X.NativePlayerManifestApiFactory.create(this.Iw):null},e.prototype.release=function(){var e,t=this,n=this.unload(S.API_ISSUER_NAME).catch(function(){});return(0,D.clearTimeoutIfDefined)(this.Kw),n=n.then(function(){t.type=null,t.Nv=null,t.Ov=null,t.Pv=null,t.Rv=null,t.Sv=null,t.Tv=null,t.Wv=null,t.Mv=null,t.ww=null,t.xw=null,t.yw=null,t.zw=null,t.Tw=null,t.Qw=null,t.Pw=null,t.Yw=null,t.jw=void 0}),null==(e=this.Gw)||e.dispose(),this.vw&&this.vw.dispose(),this.vw=null,this.Hw&&this.Hw.dispose(),this.Hw=null,this.Jw&&this.Jw.dispose(),this.Jw=null,this.Iw&&this.Iw.dispose(),this.Iw=null,n},e.prototype.setQueryParameters=function(e){this.Pv.QUERY_PARAMETERS=e},e.prototype.clearQueryParameters=function(){this.Pv.QUERY_PARAMETERS=void 0},e.prototype.setAudioQuality=function(e){},e.prototype.setTargetBufferLevel=function(){},e.prototype.getAvailableAudioQualities=function(){return[]},e.prototype.getDroppedVideoFrames=function(){return 0},e.prototype.getTotalStalledTime=function(){return 0},e.prototype.updateCallback=function(e){},e.prototype.getAvailableSegments=function(){return{}},e.prototype.getLatency=function(){var e=this.Mv.getWrappedElement();if(!e.getStartDate)return 1/0;var t=e.getStartDate().getTime();if(isNaN(t))return 1/0;var n=(new Date).getTime();return(0,L.toSeconds)(n-t)-this.Mv.currentTime},e.prototype.setTargetLatency=function(e){},e.prototype.getTargetLatency=function(){},e.prototype.setCatchupConfig=function(e){},e.prototype.getCatchupConfig=function(){},e.prototype.setFallbackConfig=function(e){},e.prototype.getFallbackConfig=function(){},e}(),a="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0,o=[(0,P.trackPerformance)("NativePlayer.load",!0)],c(r,null,o,{kind:"method",name:"load",static:!1,private:!1,access:{has:function(e){return"load"in e},get:function(e){return e.load}},metadata:a},null,s),a&&Object.defineProperty(r,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:a}),t.NativePlayer=r}
1,56678:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.NativePlayerManifestApiFactory=void 0;var i=n(34047),r=n(21216);t.NativePlayerManifestApiFactory=function(){function e(){}return e.create=function(t){var n=t.getParsedManifest();return t.isValidMasterPlaylist(n)?new function(){this.hls=e.createHlsApi(t)}:null},e.createHlsApi=function(t){var n=t.getParsedManifest(),i=n.media.filter(function(e){return"AUDIO"===e.attributes.TYPE}),r=n.media.filter(function(e){return"SUBTITLES"===e.attributes.TYPE||"CLOSED-CAPTIONS"===e.attributes.TYPE});return new(function(){function o(){this.properties=t.getParsedManifest().tags}return o.prototype.getVideoTracks=function(){return e.getVideoTracks(n.playlists)},o.prototype.getAudioTracks=function(){return e.getAudioTracks(i,n.playlists)},o.prototype.getTextTracks=function(){return e.getTextTracks(r)},o}())},e.getAudioTracks=function(e,t){var n=e.reduce(function(e,t){return e[t.attributes.LANGUAGE]||(e[t.attributes.LANGUAGE]=t.attributes.NAME),e},{}),r=Object.keys(n).map(function(t,i){return{id:"audio-".concat(i),label:n[t],lang:t,getQualities:function(){return e.filter(function(e){return e.attributes.LANGUAGE===t}).map(function(e,t){return{id:t+"",bitrate:0,label:e.attributes.NAME}})}}}),o=function(e){return e.attributes.CODECS&&i.CodecStringHelper.getMimeTypeForCodecString(e.attributes.CODECS).includes("audio")};return t.some(o)&&r.push({id:"audio-".concat(r.length),label:"und",lang:"",getQualities:function(){return t.filter(o).map(function(e,t){return{id:t+"",bitrate:e.attributes.BANDWIDTH,codec:i.CodecStringHelper.getExtractedCodecStrings(e.attributes.CODECS).audio}})}}),r},e.getVideoTracks=function(t){var n=t.filter(function(e){return!e.attributes.CODECS||i.CodecStringHelper.getMimeTypeForCodecString(e.attributes.CODECS).includes("video")});return[{id:"video-0",label:"und",getQualities:function(){return e.getVideoQualities(n)}}]},e.getTextTracks=function(e){return e.map(function(e,t){return{id:"text-".concat(t),label:e.attributes.NAME,lang:e.attributes.LANGUAGE,isFragmented:!0,kind:"CLOSED-CAPTIONS"===e.attributes.TYPE?"caption":"subtitle",url:e.attributes.URI}})},e.getVideoQualities=function(e){return e.map(function(e){var t=e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width,n=e.attributes.RESOLUTION&&e.attributes.RESOLUTION.height,o=i.CodecStringHelper.getExtractedCodecStrings(e.attributes.CODECS).video,s={id:n?"".concat(n,"_").concat(e.attributes.BANDWIDTH):"".concat(e.attributes.BANDWIDTH),bitrate:e.attributes.BANDWIDTH,width:t||0,height:n||0,colorInfo:{dynamicRange:(0,r.getDynamicRangeForHlsVariant)(e.attributes["VIDEO-RANGE"],o)}};return o&&(s.codec=o),s})},e}()},49706:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.TechnologyChecker=void 0;var i=n(44468);t.TechnologyChecker=function(){function e(){}return e.prototype.getSupportedTechnologies=function(){return[{player:i.PlayerType.Native,streaming:i.StreamType.Progressive},{player:i.PlayerType.Native,streaming:i.StreamType.Hls},{player:i.PlayerType.Native,streaming:i.StreamType.Dash}]},e}()}},function(e){return e(e.s=27530)}])}()},69330:function(e,t,n){"use strict";var i=this&&this.__spreadArray||function(e,t,n){if(n||2==arguments.length)for(var i,r=0,o=t.length;r<o;r++)!i&&r in t||(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.SubtitleSwitchHandler=void 0;var r=n(24379);t.SubtitleSwitchHandler=function(){function e(t,n,o){var s=this;this.onSubtitleEnabled=function(e){var t;if(s.selectCurrentSubtitle(),r.i18n.getConfig().adaptLocalizationToSubtitleLanguage){var n="string"==typeof(null==(t=e.subtitle)?void 0:t.lang)?e.subtitle.lang.trim():"";n&&r.i18n.setLanguage(n)}},this.addSubtitle=function(t){var n=t.subtitle;if(!s.hasComparator()){s.listElement.hasItem(n.id)||s.listElement.addItem(n.id,n.label);return}var o=s.player.subtitles.list(),a=o.some(function(e){return e.id===n.id})?o:i(i([],o,!0),[n],!1),u={key:e.SUBTITLES_OFF_KEY,label:r.i18n.getLocalizer("off")};s.listElement.synchronizeItems(i([u],a.map(function(e){return s.subtitleToListItem(e)}),!0)),s.selectCurrentSubtitle()},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:r.i18n.getLocalizer("off")};s.listElement.synchronizeItems(i([t],s.player.subtitles.list().map(function(e){return s.subtitleToListItem(e)}),!0)),s.selectCurrentSubtitle()}},this.player=t,this.listElement=n,this.uimanager=o,this.bindSelectionEvent(),this.bindPlayerEvents(),this.refreshSubtitles()}return e.prototype.bindSelectionEvent=function(){var t=this;this.listElement.onItemSelectionChanged.subscribe(function(n,i){if
1(i===e.SUBTITLES_OFF_KEY){var r=t.player.subtitles.list().filter(function(e){return e.enabled}).pop();r&&t.player.subtitles.disable(r.id)}else t.player.subtitles.enable(i,!0)})},e.prototype.bindPlayerEvents=function(){this.player.on(this.player.exports.PlayerEvent.SubtitleAdded,this.addSubtitle),this.player.on(this.player.exports.PlayerEvent.SubtitleEnabled,this.onSubtitleEnabled),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.prototype.hasComparator=function(){return null!=this.listElement.getConfig().comparator},e.prototype.subtitleToListItem=function(e){return{key:e.id,label:e.label}},e.SUBTITLES_OFF_KEY="null",e}()},72139:e=>{!function(){"use strict";self,e.exports=(self.webpackChunkbitmovin_player=self.webpackChunkbitmovin_player||[]).push([[766],{67579:function(e,t){var n,i,r,o,s;Object.defineProperty(t,"__esModule",{value:!0}),t.MediaKeySystemConfig=void 0,(r=(i=n||(t.MediaKeySystemConfig=n={})).PersistentState||(i.PersistentState={})).Required="required",r.Optional="optional",(o=i.DistinctiveIdentifier||(i.DistinctiveIdentifier={})).Optional="optional",o.NotAllowed="not-allowed",(s=i.SessionType||(i.SessionType={})).Temporary="temporary",s.PersistentLicense="persistent-license"},88559:function(e,t,n){var i=this&&this.__spreadArray||function(e,t,n){if(n||2==arguments.length)for(var i,r=0,o=t.length;r<o;r++)!i&&r in t||(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.ContentProtectionHelper=void 0;var r=n(25811),o=n(51682),s=n(33468),a=n(74853),u=n(70233),l=n(92656),c="_cenc:default_KID",d=function(){function e(){}return e.extractUint32FromString=function(e,t){return(e.charCodeAt(t)<<24)+(e.charCodeAt(t+1)<<16)+(e.charCodeAt(t+2)<<8)+e.charCodeAt(t+3)},e.parseKeyIds=function(e){var t=l.PlayReady.parseWrmHeader(e,4);
1if(!t||!t.length)return[];var n=l.PlayReady.extractKeyIdsFromPlayReadyHeaders(t);return n&&n.length?n.map(function(e){var t;return t=a.ArrayHelper.stringToArrayWithoutEncoding(atob(e)),l.PlayReady.kidToCENC(t),a.ArrayHelper.arrayBufferToAsciiString(t.buffer)}):[]},e.getFirstKeyId=function(e){if(!e||!e.length)return null;for(var t=0;t<e.length;t++){var n=function(e){var t,n,i=e._schemeIdUri.toLowerCase(),o=r.DRMSchemeIDURIs[i];return"cenc"===o&&"string"==typeof e[c]?[e[c].toLowerCase()]:"playready"===o&&e.pro&&e.pro.length?(t=f(e,"pro"),d.parseKeyIds(t).map(function(e){return u.FormatHelper.bytesToUUID(a.ArrayHelper.stringToArrayWithoutEncoding(e))})):(n=f(e,"pssh"),d.extractKidsFromPSSHBox(n.buffer))}(e[t]);if(n&&n.length)return n[0]}return null},e.writeKeySystemId=function(e,t,n){return e.setUint32(t,parseInt(n.substring(0,8),16)),t+=4,e.setUint32(t,parseInt(n.substring(8,16),16)),t+=4,e.setUint32(t,parseInt(n.substring(16,24),16)),t+=4,e.setUint32(t,parseInt(n.substring(24,32),16)),t+4},e.writeKeyIds=function(t,n,i){return t.setUint32(n,i.length),n+=4,i.forEach(function(i){t.setUint32(n,e.extractUint32FromString(i,0)),n+=4,t.setUint32(n,e.extractUint32FromString(i,4)),n+=4,t.setUint32(n,e.extractUint32FromString(i,8)),n+=4,t.setUint32(n,e.extractUint32FromString(i,12)),n+=4}),n},e.extractKeySystemIdFromUri=function(e){return e.replace(/-/g,"").split(":")[2]},e.wrapInPsshBox=function(e,t){var n=a.ArrayHelper.stringToArrayWithoutEncoding(atob(e)),i=this.parseKeyIds(n),r=i.length>0,s=o.ISOBMFFConstants.BOX_SIZE_LENGTH+o.ISOBMFFConstants.BOX_TYPE_LENGTH+o.ISOBMFFConstants.FULL_BOX_VERSION_LENGTH+o.ISOBMFFConstants.FULL_BOX_FLAGS_LENGTH+o.ISOBMFFConstants.PSSH_SYSTEM_ID_LENGTH+o.ISOBMFFConstants.PSSH_DATA_SIZE;r&&(s+=o.ISOBMFFConstants.PSSH_KID_COUNT_LENGTH+i.length*o.ISOBMFFConstants.PSSH_KID_LEN);var u=this.extractKeySystemIdFromUri(t),l=s+n.byteLength,c=new Uint8Array(l),d=new DataView(c.buffer),p=0;if(d.setUint32(p,l),p+=4,d.setUint32(p,0x70737368),p+=4,d.setUint8(p,+!!r),p+=1,p+=3,!u||32!==u.length)return a.ArrayHelper.arrayBufferToAsciiString(n.buffer);p=this.writeKeySystemId(d,p,u),r&&(p=this.writeKeyIds(d,p,i)),d.setUint32(p,n.length),p+=4;for(var h=0;h<n.byteLength;h++)d.setUint8(p+h,n[h]);return btoa(a.ArrayHelper.arrayBufferToAsciiString(c.buffer))},e.parseBoxSize=function(e){return new DataView(e.buffer,0).getUint32(0)},e.parseBoxType=function(e){var t=new DataView(e.buffer,4);return String.fromCharCode(t.getUint8(0))+String.fromCharCode(t.getUint8(1))+String.fromCharCode(t.getUint8(2))+String.fromCharCode(t.getUint8(3))},e.isValidPsshBox=function(e){var t=a.ArrayHelper.stringToArrayWithoutEncoding(atob(e)),n=this.parseBoxSize(t),i=this.parseBoxType(t);return n===t.byteLength&&"pssh"===i},e.extractKidsFromPSSHBox=function(e){if(!e||e.byteLength<3)return[];var t=8,n=[],i=new DataView(e);if(0>=i.getUint8(t))return[];t+=20;var r=i.getUint32(t);t+=4;for(var o=0;o<r;o++){for(var s="",a=t;a<t+16;a++)s+=("00"+i.getUint8(a).toString(16)).slice(-2);t+=16,n.push(u.FormatHelper.beautifyUUID(s))}return n},e.parseContentProtection=function(t,n){var i=function(e){if(r.DRMSchemeIDURIs[e])return e;var t=(0,s.keySystemUidToKind)(e);return(0,r.keySystemNameToSchemeUri)(t)}(t.keyformat);if(!i)return null;e.isValidPsshBox(n)||(n=e.wrapInPsshBox(n,i));var o={schemeIdUri:i,pssh:n};return t.keyid&&(o.defaultKid=t.keyid),o},e.parseContentProtectionDescriptors=function(e){return e.filter(p).map(h)},e}();function p(e){var t;return r.DRMSchemeIDURIs.hasOwnProperty(null==(t=null==e?void 0:e._schemeIdUri)?void 0:t.toLowerCase())}function h(e){var t,n,o,s={schemeIdUri:e._schemeIdUri.toLowerCase(),name:r.DRMSchemeIDURIs[e._schemeIdUri.toLowerCase()]};"cenc"===s.name&&"string"==typeof e[c]&&(s.defaultKid=e[c].toLowerCase());var u=(null==(o=e.pssh)?void 0:o.length)>0?e.pssh:(t=e.pro,n=e._schemeIdUri,(null==t?void 0:t.length)>0?t.map(function(e){return{__text:d.wrapInPsshBox(e.__text,n)}}):[]);return u.length>0&&(s.pssh=[],s.kids=[],s.psshData=[]),u.forEach(function(e){var t=atob(e.__text),n=a.ArrayHelper.stringToArrayWithoutEncoding(t).buffer,r=d.extractKidsFromPSSHBox(n);s.pssh.push(t),s.psshData.push(n),s.kids=i(i([],s.kids,!0),r,!0)}),s}function f(e,t){var n=function(e,t){var n,i,r=null!=(n=e[t])?n:null;if(!r)return"";var o=null!=(i=r[0])?i:null;return o?o.__text:""}(e,t);return a.ArrayHelper.stringToArrayWithoutEncoding(atob(n))}t.ContentProtectionHelper=d},29173:function(e,t,n){var i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};
1Object.defineProperty(t,"__esModule",{value:!0}),t.DRMManager=void 0;var r=n(66790),o=n(40306),s=n(3336),a=n(20213),u=n(33468),l=n(48488),c=n(15971),d=n(74853),p=n(34841),h=n(49867),f=n(70581),g=n(92656),v=n(58857),y=n(84344);t.DRMManager=function(){function e(e){var t=this;this.Zl=function(){return Promise.all([t.Vl.promise,t.Wl.promise]).then(t.qm).then(function(){var e,n,i,r=t.usedKeySystem.kind===u.KeySystemKind.PLAYREADY,o=null!=(i=null==(n=null==(e=(0,c.getSourceState)(t.context))?void 0:e.drm)?void 0:n.keyIdsWithErrors)?i:[];r&&o.length>0&&t.Yl.maybeScheduleRecovery(o)}).catch(function(){})},this.al=function(e){return t.addInitData(e)},this.isLicenseRequestOngoing=function(){return!(!t.emeHandler||"function"!=typeof t.emeHandler.isLicenseRequestOngoing)&&t.emeHandler.isLicenseRequestOngoing()},this.el=function(e,n){var i;if(t.context.logger.debug("DRM license request failed",JSON.stringify(e)),e.response!==g.EMPTY_KEY_MESSAGE){if(e.hasOwnProperty("statusCode")&&"postponed"===e.statusCode)return t.context.logger.debug("postponed license acquisition ("+e.licenseRequestId+") as there is currently a license being requested"),void t.licenseStorage.resetLicense(t.usedKeySystem.kind,e.initDataStr);if(t.usedKeySystem.kind){var r="object"==typeof e.response?e.response:null,o=(null==(i=null==r?void 0:r.failedKeyIds)?void 0:i.length)?r.failedKeyIds:n;t.context.logger.debug("Marking the following KIDs as failed:",o),o.forEach(function(e){t.context.store.dispatch((0,l.trackDrmKidError)(e))}),t.licenseStorage.addLicense(t.usedKeySystem.kind,{initDataStr:e.initDataStr})}else t.context.logger.debug("key system info not available, probably has already been shut down due to an error")}},this.fl=function(e){t.usedKeySystem.kind&&t.licenseStorage.addLicense(t.usedKeySystem.kind,e)},this.qm=function(){t.usedKeySystem.kind&&!t.Ul&&t.context.eventHandler.fireError(new s.PlayerError(o.ErrorCode.DRM_INIT_DATA_MISSING,{drmKeySystem:t.usedKeySystem.kind},"No init data was found in the manifest or the segments for the used key system.",t.context.sourceContext.sourceIdentifier))},this.context=e,this.emeHandler=null,this.Tl=!1,this.licenseStorage=new v.LicenseStorage(this.context),this.context.videoElement.drmHandler=this,this.Ul=!1,this.Vl=new p.Deferred,this.Vl.promise.catch(function(){}),this.Wl=new p.Deferred,this.usedKeySystem={kind:null,uid:null},this.Yl=new h.DrmStallRecovery(this.context)}return e.prototype.shutdown=function(){var e;return this.Xl=!0,this.Yl.dispose(),this.licenseStorage.dispose(),this.context.videoElement.drmHandler=null,this.Tl=!1,this.usedKeySystem={kind:null,uid:null},this.Ul=!1,this.Vl.reject(),null==(e=(0,c.getSourceStore)(this.context))||e.dispatch((0,l.resetUsedKeySystem)()),null===this.emeHandler?Promise.resolve():(this.emeHandler.setWaitingForKeyListener(null),this.emeHandler.unload())},e.prototype.bl=function(){var e=this;this.licenseStorage.getEntriesWithoutLicense().filter(function(t){return t.systemName!==e.usedKeySystem.kind}).forEach(function(t){return e.licenseStorage.remove(t.initDataStr)})},e.prototype.cl=function(){this.licenseStorage.getEntriesWithoutLicense().some(function(e){return e.initData})&&(this.Ul=!0)},e.prototype.dl=function(){var e=this;this.licenseStorage.getEntriesWithoutLicense().filter(function(e){return e.initData&&!e.initDataStr}).forEach(function(t){var n=e.emeHandler.getIdentifierFromInitData(d.ArrayHelper.arrayBufferToAsciiString(t.initData));e.licenseStorage.updateInitData(i(i({},t),{initDataStr:n}))})},e.prototype.setConfig=function(e,t){var n=this,i=(0,u.getRelevantKeySystemMap)(e);return(0,y.resolveDRMSystem)(i,e,this.context).then(function(e){if(n.Xl)return n.context.logger.debug("Shutdown in progress - prevented resolving DRM system!"),Promise.reject(Error(r.DrmSetupError.CANCELLED));n.usedKeySystem=e.keySystem,n.Tl=!0,null==(i=(0,c.getSourceStore)(n.context))||i.dispatch((0,l.setUsedKeySystem)(n.usedKeySystem)),n.emeHandler=e.emeHandler.instance,n.emeHandler.setEncryptedListener(n.al),n.emeHandler.setWaitingForKeyListener(n.Zl);var i,o=n.emeHandler.load(e.keySystem.instance,e.keySystem.uid,e.config,t);return n.bl(),n.cl(),n.dl(),n.requestMissingLicenses(),n.Vl.resolve(),o.then(function(){return e.emeHandler.kind})}).catch(function(e){return n.context.logger.debug("Error while loading EME handler: ".concat(null==e?void 0:e.message),e),null!==n.emeHandler&&n.emeHandler.unload(),n.Vl.reject(),Promise.reject(e)})},e.prototype.requestMissingLicenses=function(){var e,t,n,i=this;if(this.Tl&&this.usedKeySystem.kind){var r=this.licenseStorage.getEntriesWithoutLicense(),o=null!=(n=null==(t=null==(e=(0,c.getSourceState)(this.context))?void 0:e.drm)?void 0:t.keyIdsWithErrors)?n:[];r.forEach(function(e){var t=e.initData,n=e.initDataStr,r=e.sessionId,s=e.systemName,a=e.wasRequested,u=e.isPending;s===i.usedKeySystem.kind?t?a||(e.keyIds.length>0&&e.keyIds.every(function(e){return o.includes(e)})?i.context.logger.debug("Skipping license request for ".concat(n," â all key IDs failed")):(i.licenseStorage.setRequested(n,s),i.emeHandler.requestLicense(t,n,r).then(i.fl).catch(function(t){return i.el(t,e.keyIds)}))):u||i.licenseStorage.setPending(n,s):i.licenseStorage.remove(n)})}},e.prototype.preprocessInitDataStr=function(e){var t;return e.initDataStr?null==(t=this.emeHandler)?void 0:t.getIdentifierFromInitData(e.initDataStr):void 0},e.prototype.hasOngoingLicenseRequests=function(e){return this.licenseStorage.hasOngoingLicenseRequests(e)},e.prototype.hasUsableMediaKey=function(e){return this.emeHandler instanceof f.UnprefixedEMEHandler?this.licenseStorage.hasUsableOrPendingMediaKey(e,this.usedKeySystem.kind):this.licenseStorage.hasLicense(e,this.usedKeySystem.kind)},e.prototype.addInitData=function(e){var t,n;if(e&&(!this.usedKeySystem.kind||e.systemName===this.usedKeySystem.kind)){var r=this.preprocessInitDataStr(e),o=this.usedKeySystem.kind||e.systemName,s=r?this.licenseStorage.getLicense(r,o):void 0;(null==s?void 0:s.initData)||(e.initDataStr=r,e.kid=null!=(n=null==(t=this.emeHandler)?void 0:t.getKeyUuidsFromInitData(e.initData))?n:[],s?this.licenseStorage.updateInitData(i(i({},s),{systemName:o,initData:e.initData,initDataStr:e.initDataStr,keyIds:e.kid})):this.licenseStorage.add(e),this.Ul=this.Ul||!!(this.usedKeySystem.kind&&e.initData)),this.requestMissingLicenses()}},e.prototype.getUsedKeySystemKind=function(){return this.usedKeySystem.kind},e.prototype.getUsedKeySystemUid=function(){return this.usedKeySystem.uid},e.prototype.reInitializeEmeHandler=function(){var e;null==(e=this.emeHandler)||e.reInitialize()},e.prototype.signalInitDataShouldBeAvailable=function(){this.Wl.resolve()},e.prototype.prepareForMseShutdown=function(){var e,t,n;return null!=(n=null==(t=null==(e=this.emeHandler)?void 0:e.prepareForMseShutdown)?void 0:t.call(e))?n:Promise.resolve()},e.prototype.suspend=function(){var e,t;return null!=(t=null==(e=this.emeHandler)?void 0:e.suspend())?t:Promise.resolve()},e.prototype.renewLicense=function(e){if((null==(t=this.usedKeySystem)?void 0:t.kind)!==u.KeySystemKind.PLAYREADY)return this.context.logger.debug("RenewLicense is only supported for playready."),Promise.reject(a.WarningCode.DRM_LICENSE_RENEWAL_FAILED);if(!(null==(n=this.emeHandler)?void 0:n.disposeSessionForInitData))return this.context.logger.debug("RenewLicense is not supported for the current EME."),Promise.reject(a.WarningCode.DRM_LICENSE_RENEWAL_FAILED);var t,n,i=this.licenseStorage.findLicenseForPublicId(e,this.usedKeySystem.kind);return i?this.rm(i.initDataStr):(this.context.logger.debug("Could not find active drm session for "+e),Promise.reject(a.WarningCode.DRM_LICENSE_RENEWAL_FAILED))},e.prototype.isUsingUnprefixedEmeHandler=function(){return!!this.emeHandler&&this.emeHandler instanceof f.UnprefixedEMEHandler},e.prototype.rm=function(e){var t=this;return this.licenseStorage.resetLicense(this.usedKeySystem.kind,e),this.emeHandler.disposeSessionForInitData(e).then(function(){return t.requestMissingLicenses()}).catch(function(n){return t.context.eventHandler.dispatchEvent(a.PlayerEvent.Warning,new a.PlayerWarning(a.WarningCode.DRM_LICENSE_RENEWAL_FAILED,null,{keyIds:e.split(";"),error:n})),Promise.reject(n)})},e}()}
1,34079:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.createDrmApi=function(e,t){return new(function(){function n(){}return n.prototype.renewLicense=function(n){var r=e();if(!r)return t.debug("Unable to renew license, since there is no source loaded."),Promise.reject("NoSourceLoaded");var o=r.get(i.ServiceName.DrmService);return o?o.renewLicense(n):(t.debug("No DRM source loaded, ignoring renewLicense call"),Promise.reject("NoDrmSource"))},n}())};var i=n(80813)},97115:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.createDrmManager=function(e){return(0,r.getCapabilities)()[i.CapabilityKey.isTizen]&&o.ModuleManager.has(s.ModuleName.Tizen)?o.ModuleManager.get(s.ModuleName.Tizen).createTizenDRMManager(e):(0,r.getCapabilities)()[i.CapabilityKey.isWebOS]&&o.ModuleManager.has(s.ModuleName.Webos)?new(o.ModuleManager.get(s.ModuleName.Webos).getWebosDrmManagerConstructor())(e):new a.DRMManager(e)};var i=n(7387),r=n(21513),o=n(88052),s=n(62756),a=n(29173)},93101:function(e,t,n){var i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.DrmService=void 0;var r=n(66790),o=n(33468),s=n(7387),a=n(15971),u=n(21513),l=n(93204),c=n(34841),d=n(46057),p=n(97115),h=n(55327),f=n(84344),g=n(99921);t.DrmService=function(){function e(e){this.context=e,this.um=new c.Deferred,this.vm=!1,this.ym=Promise.resolve()}return e.prototype.zm=function(){var e=this;this.Cm().then(function(){return e.tm=(0,p.createDrmManager)(e.context)})},e.prototype.canReuseEmeHandler=function(){var e=this.wm;return e===g.EMEHandlerKind.UNPREFIXED||e===g.EMEHandlerKind.MS_PREFIXED},e.prototype.reInitializeEmeHandler=function(){return this.tm.reInitializeEmeHandler()},e.prototype.resolveDrmSystemFromSourceConfig=function(e){var t=this;if(!this.xm){var n=(0,o.getRelevantKeySystemMap)(e);this.xm=(0,d.yieldToMain)().then(function(){return(0,f.resolveUsedDRMSystem)(n,e,t.context)}).then(function(n){return t.context.logger.debug("Early DRM key system resolved",n),i(i({},n),{config:e})}).catch(function(e){return t.context.logger.debug("Early DRM key system resolving failed:",e),null})}},e.prototype.setDrmConfig=function(e){this.sm=e,this.um=new c.Deferred,this.vm=!1,this.zm()},e.prototype.updateDrmConfig=function(e,t){var n=this;return this.vm?this.um.promise:(this.sm=i(i({},this.sm),e),this.vm=!0,this.tm.setConfig(this.sm,t).then(function(e){n.wm=e,n.um.resolve()}).catch(function(e){n.vm=!1,n.um.reject(e)}).finally(function(){return n.um.promise}))},e.prototype.addInitData=function(e){var t=this;this.tm&&this.um.promise.then(function(){var n;return null==(n=t.tm)?void 0:n.addInitData(e)}).catch(function(e){(null==e?void 0:e.message)!==r.DrmSetupError.CANCELLED&&t.context.logger.debug("Adding DRM init data failed: ".concat(null==e?void 0:e.message),e)})},e.prototype.renewLicense=function(e){var t,n;return null!=(n=null==(t=this.tm)?void 0:t.renewLicense(e))?n:Promise.reject("No active drm manager")},e.prototype.getUsedKeySystemKind=function(){var e;return(null==(e=this.tm)?void 0:e.getUsedKeySystemKind())||null},e.prototype.getUsedKeySystemUid=function(){var e;return(null==(e=this.tm)?void 0:e.getUsedKeySystemUid())||null},e.prototype.getUsedOrEarlyResolvedKeySystemUid=function(){var e=this.getUsedKeySystemUid();return e?Promise.resolve(e):this.xm?this.xm.then(function(e){var t;return null!=(t=null==e?void 0:e.keySystem.uid)?t:null}):Promise.resolve(null)},e.prototype.getResolvedKeySystemFromSourceConfig=function(){return this.xm||Promise.resolve(null)},e.prototype.waitForPendingLicenseRequests=function(e){var t=this,n=function(){var n,i;return null!=(i=null==(n=t.tm)?void 0:n.hasOngoingLicenseRequests(e))&&i};if(!n())return Promise.resolve();this.context.logger.debug("Waiting for pending DRM license requests to complete");var i=new c.Deferred,r=(0,l.subscribe)(this.context.store)(function(e){return h.getLicenseState(e)},function(){n()||(r(),i.resolve())});return i.promise},e.prototype.Am=function(e){var t,n=this;if(null==(t=this.tm)?void 0:t.hasUsableMediaKey(e))return Promise.resolve();var i=new c.Deferred,r=(0,l.subscribe)(this.context.store)(function(e){return h.getLicenseState(e)},function(){var t,o,s,u;(null==(t=n.tm)?void 0:t.hasUsableMediaKey(e))?(n.context.logger.debug("DRM license added for key ID ".concat(e)),r(),i.resolve()):(null!=(u=null==(s=null==(o=(0,a.getSourceState)(n.context))?void 0:o.drm)?void 0:s.keyIdsWithErrors)?u:[]).includes(e)&&(n.context.logger.debug("Key ID ".concat(e," permanently failed, stopping license wait")),r(),i.reject(Error("DRM key ID ".concat(e," failed"))))});return this.tm&&this.tm.requestMissingLicenses(),i.promise},e.prototype.Bm=function(e){var t,n,i,r=this.getUsedKeySystemKind()===o.KeySystemKind.PLAYREADY,a=(0,u.getCapabilities)()[s.CapabilityKey.isEdge],l=null!=(n=null==(t=this.tm)?void 0:t.isUsingUnprefixedEmeHandler())&&n,c=e.hasDrmKid()?e.getDrmKid():void 0;return!(!this.vm||void 0===c||!(r&&a&&l)||(null==(i=this.tm)?void 0:i.hasUsableMediaKey(c)))},e.prototype.maybeWaitForDrmLicense=function(e,t){var n=this,i=!e.isInit()||e.isSelfInit(),r=this.Bm(e),o=void 0!==t&&Object.keys(t).length>0,s=e.hasDrmKid()?e.getDrmKid():void 0;return o&&r&&i&&void 0!==s?(null==t?void 0:t.keyIdsWithErrors.includes(s))?(this.context.logger.debug("Skipping deferred a
1ppendage of ".concat(e.getUrl()," as DRM key ID ").concat(s," failed")),Promise.reject(Error("DRM key ID ".concat(s," failed")))):(this.context.logger.debug("Deferring appendage of ".concat(e.getUrl()," as DRM license for key ID ").concat(s," has not yet been requested")),e.getDrmInitData().forEach(function(e){return n.addInitData(e)}),this.Am(s)):Promise.resolve()},e.prototype.preprocessInitDataStr=function(e){return this.tm.preprocessInitDataStr(e)},e.prototype.signalInitDataShouldBeAvailable=function(){this.tm.signalInitDataShouldBeAvailable()},Object.defineProperty(e.prototype,"shutdownPromise",{get:function(){return this.ym},enumerable:!1,configurable:!0}),e.prototype.Cm=function(){var e=this;return this.tm&&(this.ym=this.ym.then(function(){var t;return null==(t=e.tm)?void 0:t.shutdown().catch(function(t){e.context.logger.debug("Couldn't shut down DRMManager ".concat(t))})})),this.ym},e.prototype.shutdownIfNeeded=function(e){return e&&this.canReuseEmeHandler()?Promise.resolve():this.release()},e.prototype.release=function(){var e=this;return this.sm=null,this.Cm().then(function(){e.tm=void 0})},e.prototype.prepareForMseShutdown=function(){var e,t;return null!=(t=null==(e=this.tm)?void 0:e.prepareForMseShutdown())?t:Promise.resolve()},e.prototype.suspend=function(){var e,t;return null!=(t=null==(e=this.tm)?void 0:e.suspend())?t:Promise.resolve()},e.prototype.dispose=function(){this.release()}
vendor: 7,653 bytes, line 1
1,e.prototype.isDrmConfigSet=function(){return!!this.sm},e}()},49867:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.DrmStallRecovery=void 0;var i=n(80813),r=n(93204),o=n(55327);t.DrmStallRecovery=function(){function e(t){var n=this;this.context=t,this.wQ=null,this.xQ=null,this.yQ=0,this.zQ=0,this.AQ=[],this.BQ=null,this.CQ=null,this.GQ=function(){var t=n.context.videoElement;if(t){var i=n.xQ,r=t.currentTime>n.yQ+e.PROGRESS_EPSILON_S,o=n.zQ-n.EQ,s=null!==n.BQ&&n.BQ>=o;if(n.wQ=null,n.xQ=null,!r)return"initial"===i&&s?(n.context.logger.debug("[DrmStallRecovery] Recent DRM activity observed but decoder did not advance â extending settle"),void n.FQ("extended")):void n.HQ()}},this.DQ=this.context.settings.DRM_STALL_RECOVERY_SETTLE_TIMEOUT_MS,this.EQ=this.context.settings.DRM_STALL_RECOVERY_LICENSE_ACTIVITY_LOOKBACK_MS,this.CQ=(0,r.subscribe)(this.context.store)(o.getLicenseState,function(){n.BQ=Date.now()})}return e.prototype.maybeScheduleRecovery=function(e){this.xQ?this.context.logger.debug("[DrmStallRecovery] Skipping recovery schedule â ".concat(this.xQ," settle already in progress"),{currentFailedKeyIds:this.AQ,newFailedKeyIds:e}):(this.AQ=e,this.FQ("initial"))},e.prototype.dispose=function(){null!==this.wQ&&(clearTimeout(this.wQ),this.wQ=null),null!==this.CQ&&(this.CQ(),this.CQ=null),this.xQ=null},e.prototype.FQ=function(e){var t=this.context.videoElement;t&&(this.xQ=e,this.yQ=t.currentTime,this.zQ=Date.now(),this.context.logger.debug("[DrmStallRecovery] Scheduling ".concat(e," settle of ").concat(this.DQ,"ms for waitingforkey with failed KIDs"),this.AQ),this.wQ=setTimeout(this.GQ,this.DQ))},e.prototype.HQ=function(){var e=this,t=this.context.serviceManager.get(i.ServiceName.RecoveryService);t&&(this.context.logger.debug("[DrmStallRecovery] waitingforkey settle expired with no decoder progress â triggering recovery",this.AQ),t.recover("DRM stall: waitingforkey persisted with permanently-failed KIDs").catch(function(t){e.context.logger.debug("[DrmStallRecovery] DRM-stall recovery skipped or failed",t)}))},e.PROGRESS_EPSILON_S=.05,e}()},24109:function(e,t,n){var i,r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.FairplayHandler=t.SupportedFairplayKeySystems=void 0;var o,s,a=n(40306),u=n(3336),l=n(4129),c=n(91523),d=n(57456),p=n(29669),h=n(74853),f=n(88844),g=n(19274);(i=o||(o={}))[i.MEDIA_KEYERR_DOMAIN=6]="MEDIA_KEYERR_DOMAIN",(s||(t.SupportedFairplayKeySystems=s={})).FPS_1="com.apple.fps.1_0",t.FairplayHandler=function(){function e(t,n,i){var r=this;this.Wm=function(e){if(r.Hm){r.Im=!0;var t=e.initData,n=r.bm(t);if(r.Sm(t),r.Nm)r.Zm(n,t);else{var i=r.Hm.serverCertificate;if(i)return i instanceof ArrayBuffer==0?void r.Dm.eventHandler.fireError(new u.PlayerError(a.ErrorCode.DRM_CERTIFICATE_ERROR,void 0,"The provided `AppleFairplayDRMConfig.serverCertificate` is not of type `ArrayBuffer`.",r.Dm.sourceContext.sourceIdentifier)):(r.Nm=r.Ym(i),void r.Zm(n,t));r.Vm().then(function(e){r.Nm=r.Ym(e.body),r.Zm(n,t)}).catch(function(e){r.Dm.logger.debug("Error while loading the certificate ",e)}),r.Qm()}}else r.Dm.eventHandler.fireError(new u.PlayerError(a.ErrorCode.DRM_MISSING_CONFIGURATION,void 0,"A FairPlay DRM config is required to play this source, but none was provided.",r.Dm.sourceContext.sourceIdentifier))},this.am=function(e,t){r.Dm.eventHandler.fireError(new u.PlayerError(a.ErrorCode.NETWORK_FAILED_CERTIFICATE_REQUEST,{responseCode:e.status,responseText:e.statusText,serverResponse:e.body,reason:t.message},"Failed to load the FairPlay certificate: ".concat(e.status," ").concat(e.statusText,"."),r.Dm.sourceContext.sourceIdentifier))},this.em=function(){(0,f.clearTimeoutIfDefined)(r.Om)},this.fm=function(t,n){r.Im=!0;var i=t.message,o=t.target,s=r.Hm,c=s.withCredentials,h=s.licenseResponseType,f=void 0===h?p.HttpResponseType.TEXT:h,g=s.maxLicenseRequestRetries,v=s.headers,y=s.prepareMessage,m=d.XhrHelper.mergeHeaders({"Content-Type":"application/x-www-form-urlencoded"},v),b=r.Tm(g),S=new l.DefaultContentLoader(r.Dm,{maxRetries:b,requestType:p.HttpRequestType.DRM_LICENSE_FAIRPLAY});t.messageBase64Encoded=e.base64EncodeUint8Array(i);var E="function"==typeof y?y(t,o):"spc=".concat(encodeURIComponent(t.messageBase64Encoded),"&assetId=").concat(o.contentId),_=r.Xm(n);_&&"string"==typeof _?S.load(_,p.HttpRequestMethod.POST,f,E,m,void 0!==c&&c).then(function(e){r.gm(e,o)}).catch(r.hm):(r.Im=!1,r.Dm.eventHandler.fireError(new u.PlayerError(a.ErrorCode.DRM_NO_LICENSE_SERVER_URL_PROVIDED,{licenseServer:_},"No valid license server URL was provided through the FairPlay DRM config.",r.Dm.sourceContext.sourceIdentifier)))},this.gm=function(t,n){if(r.Im=!1,"function"!=typeof r.Hm.prepareLicenseAsync){var i=t.body;"function"==typeof r.Hm.prepareLicense?i=r.Hm.prepareLicense(i):(i=i.trim()).startsWith("<ckc>")&&i.endsWith("</ckc>")&&(i=i.slice(5,-6));var o=i;"string"==typeof i&&(o=e.base64DecodeUint8Array(i)),n.update(o)}else r.Hm.prepareLicenseAsync(t.body).then(function(e){n.update(e)}).catch(function(e){r.Dm.logger.log("`AppleFairplayDRMConfig.prepareLicenseAsync` failed",e),r.Dm.eventHandler.fireError(new u.PlayerError(a.ErrorCode.DRM_CERTIFICATE_ERROR,{reason:e},"Unable to parse the certificate: `AppleFairplayDRMConfig.prepareLicenseAsync` failed.",r.Dm.sourceContext.sourceIdentifier))})},this.hm=function(e){r.Im=!1,r.Dm.logger.debug("The license request failed."),r.Dm.eventHandler.fireError(new u.PlayerError(a.ErrorCode.DRM_FAILED_LICENSE_REQUEST,{responseCode:e.status,responseText:e.statusText,serverResponse:e.body},void 0,r.Em))},this.im=function(e){r.Im=!1,r.Dm.logger.debug("A decryption key error was encountered",e);var t=e.target,n=t?t.error:{},i=n.code,s=n.systemCode,l=r.Km&&r.Dm.settings.FAIRPLAY_IGNORE_DUPLICATE_INIT_DATA_KEY_ERRORS;i===o.MEDIA_KEYERR_DOMAIN&&0x48444350===s?r.Dm.eventHandler.fireError(new u.PlayerError(a.ErrorCode.DRM_RESTRICTED_OUTPUT,void 0,void 0,r.Em)):l?r.Dm.logger.debug("Ignoring key error as duplicate needkey events have been tracked"):r.Dm.eventHandler.fireError(new u.PlayerError(a.ErrorCode.DRM_KEY_ERROR,{code:i,systemCode:s},void 0,r.Em))},this.jm=function(){r.Dm.logger.debug("Decryption key was added to session.")},this.isLicenseRequestOngoing=function(){return r.Im},this.Dm=t,this.Em=t.sourceContext.sourceIdentifier,this.Fm=t.settings,this.Gm=n,this.Hm=i,this.Im=!1,this.Jm=[],this.Km=!1,this.Mm=null,this.Lm=null,i&&i.hasOwnProperty("certificateURL")&&(this.Pm=i.certificateURL),this.Gm.drmHandler=this,this.Gm.addEventListener(g.MediaElementEvent.webkitneedkey,this.Wm),this.Gm.addEventListener(g.MediaElementEvent.error,this.em)}return e.prototype.Qm=function(){var e=this;(0,f.clearTimeoutIfDefined)(this.Om);var t=(0,c.getRequestTimeout)(this.Dm,p.HttpRequestType.DRM_CERTIFICATE_FAIRPLAY);this.Om=window.setTimeout(function(){e.Dm.eventHandler.fireError(new u.PlayerError(a.ErrorCode.DRM_CERTIFICATE_ERROR,void 0,"The FairPlay certificate request was not completed within the timeout of ".concat(t," ms."),e.Dm.sourceContext.sourceIdentifier))},t)},e.stringToArray=function(e){for(var t=new ArrayBuffer(2*e.length),n=new Uint16Array(t),i=0,r=e.length;i<r;i++)n[i]=e.charCodeAt(i);return n},e.base64DecodeUint8Array=function(e){for(var t=window.atob(e),n=t.length,i=new Uint8Array(new ArrayBuffer(n)),r=0;r<n;r++)i[r]=t.charCodeAt(r);return i},e.base64EncodeUint8Array=function(e){for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
1+/=",n="",i=0;i<e.length;){var r=e[i++],o=i<e.length?e[i++]:NaN,s=i<e.length?e[i++]:NaN,a=r>>2,u=(3&r)<<4|o>>4,l=(15&o)<<2|s>>6,c=63&s;isNaN(o)?l=c=64:isNaN(s)&&(c=64),n+=t.charAt(a)+t.charAt(u)+t.charAt(l)+t.charAt(c)}return n},e.prototype.Rm=function(e,t,n,i){void 0===i&&(i=null),n.addEventListener(e,function(e){return t(e,i)},!1)},e.prototype.Sm=function(e){var t=h.ArrayHelper.arrayBufferToAsciiString(e.buffer,!1);this.Jm.includes(t)?(this.Dm.logger.debug("Observed duplicate need key event with initData",t),this.Km=!0):this.Jm.push(t)},e.prototype.Tm=function(e){var t=parseInt("".concat(e));return isFinite(t)?t:3},e.prototype.Um=function(){var e=this.Hm.maxCertificateRequestRetries;return new l.DefaultContentLoader(this.Dm,{onFailure:this.am,maxRetries:this.Tm(e),requestType:p.HttpRequestType.DRM_CERTIFICATE_FAIRPLAY})},e.prototype.Vm=function(){var e=this,t=this.Hm,n=t.withCredentials,i=void 0!==n&&n,o=t.certificateHeaders,s=r({},o);return this.Lm=this.Um(),new Promise(function(t,n){e.Lm.load(e.Pm,p.HttpRequestMethod.GET,p.HttpResponseType.ARRAYBUFFER,null,s,i).then(function(e){return t(e)}).catch(function(e){return n(e)}).finally(function(){e.Lm=null})})},e.prototype.Xm=function(e){var t=h.ArrayHelper.arrayBufferToAsciiString(e.buffer,!1);if(this.Hm&&this.Hm.hasOwnProperty("LA_URL"))return this.Dm.logger.debug("licenseServerUrl (config param): "+this.Hm.LA_URL),this.Hm.LA_URL;if(/skd:\/\//.test(t)){var n="function"==typeof this.Hm.getLicenseServerUrl?this.Hm.getLicenseServerUrl(t.substring(t.indexOf("skd:"))):t.substring(t.indexOf("skd:")+4);return this.Dm.logger.debug("licenseServerUrl: "+n),n}return null},e.prototype.Ym=function(e){var t="function"==typeof this.Hm.prepareCertificate;try{return new Uint8Array(t?this.Hm.prepareCertificate(e):e)}catch(e){return void this.Dm.eventHandler.fireError(new u.PlayerError(a.ErrorCode.DRM_CERTIFICATE_ERROR,{reason:e},"There was an error during the processing of the certificate: ".concat(t?"`AppleFairplayDRMConfig.prepareCertificate` failed":"the obtained certificate is invalid","."),this.Dm.sourceContext.sourceIdentifier))}},e.prototype.Zm=function(e,t){(0,f.clearTimeoutIfDefined)(this.Om);var n=this.cm(t,e,this.Nm);if(this.Mm||this.dm(),this.Gm.webkitKeys||this.Gm.webkitSetMediaKeys(new WebKitMediaKeys(this.Mm)),this.Gm.webkitKeys){var i=this.Gm.webkitKeys.createSession("video/mp4",n);i?(i.contentId=e,this.Rm("webkitkeymessage",this.fm,i,t),this.Rm("webkitkeyadded",this.jm,i),this.Rm("webkitkeyerror",this.im,i)):this.Dm.eventHandler.fireError(new u.PlayerError(a.ErrorCode.DRM_KEY_SESSION_INITIALIZATION_FAILED,void 0,"Unable to initialize DRM key session: `webkitKeys.createSession` failed.",this.Dm.sourceContext.sourceIdentifier))}else this.Dm.eventHandler.fireError(new u.PlayerError(a.ErrorCode.DRM_MEDIA_KEY_INITIALIZATION_FAILED,void 0,"Unable to initialize the DRM media keys: the video element does not support WebKit keys.",this.Dm.sourceContext.sourceIdentifier))},e.prototype.bm=function(e){var t=h.ArrayHelper.arrayBufferToAsciiString(e.buffer,!1);if("function"==typeof this.Hm.prepareContentId)t=this.Hm.prepareContentId(t);else{var n=t.indexOf("?");t=n<0?"":t.substring(n+1)}return this.Dm.logger.debug("contentId: "+t),t},e.prototype.cm=function(t,n,i){var r="string"==typeof n?e.stringToArray(n):n,o=0,s=new ArrayBuffer(t.byteLength+4+r.byteLength+4+i.byteLength),a=new DataView(s);new Uint8Array(s,o,t.byteLength).set(t),o+=t.byteLength,a.setUint32(o,r.byteLength,!0),o+=4;var u=this.Hm.useUint16InitData?new Uint16Array(s,o,r.length):new Uint8Array(s,o,r.byteLength);return u.set(r),o+=u.byteLength,a.setUint32(o,i.byteLength,!0),new Uint8Array(s,o+=4,i.byteLength).set(i),new Uint8Array(s,0,s.byteLength)},e.prototype.dm=function(){var e=Object.keys(s).map(function(e){return s[e]});this.Mm=e.find(function(e){return WebKitMediaKeys.isTypeSupported(e,"video/mp4")})||null,this.Mm||this.Dm.eventHandler.fireError(new u.PlayerError(a.ErrorCode.DRM_KEY_SYSTEM_NOT_SUPPORTED,{supportedKeySystem:e},"FairPlay DRM is not supported on this platform.",this.Dm.sourceContext.sourceIdentifier))},e.prototype.destroy=function(){this.Gm.drmHandler=null,this.Gm.removeEventListener(g.MediaElementEvent.webkitneedkey,this.Wm),this.Gm.removeEventListener(g.MediaElementEvent.error,this.em),this.Mm=null,this.Nm=null,this.Jm=[],this.Pm=null,this.Km=!1},e.prototype.dispose=function(){var e;this.destroy(),(0,f.clearTimeoutIfDefined)(this.Om),null==(e=this.Lm)||e.cancel(),this.Fm=null,this.Mm=null,this.Nm=null,this.Pm=null},e}()},58857:function(e,t,n){var i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};
vendor: 6,347 bytes, line 1
1Object.defineProperty(t,"__esModule",{value:!0}),t.hasMatchingLicenseInfoForKeySystem=t.LicenseStorage=void 0,t.isMediaKeyStatusUnknownOrPendingOrUsable=function(e){return e.mediaKeyStatus===l.MediaKeyStatus.Usable||e.mediaKeyStatus===l.MediaKeyStatus.Pending||e.mediaKeyStatus===l.MediaKeyStatus.Unknown},t.getKeySystemMap=h,t.getAllLicensesForKeySystem=f;var r=n(3714),o=n(93204),s=n(4358),a=n(91921),u=n(55327),l=n(56068),c=function(){function e(e){var t=this;this.KQ=1,this.LQ=function(e){t.IQ.store.dispatch((0,s.resetLicenses)())},this.OQ=function(){return u.getLicenseState(t.IQ.store.getState())},this.PQ=function(e){t.IQ.store.dispatch(e)},this.IQ=e,this.IQ.store.hasReducer("drmLicenses")||(this.IQ.store.addReducer("drmLicenses",a.LicenseReducer),this.IQ.store.dispatch((0,s.initializeLicenseStorage)(e.storedConfig))),this.MQ(),this.LQ=this.LQ.bind(this),window.addEventListener("beforeunload",this.LQ)}return e.prototype.MQ=function(){var e=this;this.JQ=(0,o.subscribe)(this.IQ.store)(function(e){return u.getLicenseState(e)},function(t){return e.NQ(t)})},e.prototype.NQ=function(e){(0,s.maybeStoreLicences)(e,this.IQ.storedConfig)},e.prototype.add=function(e){var t=e.systemName,n=e.initData,i=e.initDataStr;if(!t||!i||this.getLicense(i,t))return!1;var r={hasLicense:!1,initData:n,initDataStr:i,license:null,isPending:!1,systemName:t,wasRequested:!1,keyIds:e.kid,mediaKeyStatus:l.MediaKeyStatus.Unknown,usedByPlayerId:this.IQ.internalPlayerID};return this.PQ((0,s.addLicense)({systemName:t,licenseInfo:r,initDataStr:i})),!0},e.prototype.addLicense=function(e,t){var n=t.initDataStr,o=t.license,a=t.response,u=t.sessionInfo;if(o||a||t.restoredFromPersistentLicense){var l=this.getLicense(n,e),c=i(i(i({},l||{}),void 0===u?{}:u),{isPending:!1,hasLicense:!0,license:o||null,usedByPlayerId:this.IQ.internalPlayerID});c.publicId||(c.publicId=String(this.KQ++)),this.IQ.eventHandler.dispatchEvent(r.PlayerEvent.DrmLicenseAdded,{license:{id:c.publicId,keyIds:c.initDataStr.split(";"),keySystemString:e}});var d={licenseInfo:c,initDataStr:n,systemName:e};return this.PQ(l?(0,s.updateLicense)(d):(0,s.addLicense)(d))}this.PQ((0,s.removeLicense)({initDataStr:n,systemName:e}))},e.prototype.findLicenseForPublicId=function(e,t){var n,i=this.OQ().drmData[t];return Object.keys(i).forEach(function(t){i[t].publicId===e&&(n=i[t])}),n},e.prototype.getEntriesWithoutLicense=function(){return Object.values(this.OQ().drmData).flatMap(function(e){return Object.values(e)}).filter(function(e){return!e.hasLicense&&!e.wasRequested})},e.prototype.getLicense=function(e,t){var n=this.OQ(),i=(0,s.getLicenseInfoKey)(e);return n.drmData[t]&&n.drmData[t][i]},e.prototype.getAllLicensesForKeySystem=function(e){return f(e,this.OQ())},e.prototype.QQ=function(e,t,n){var r=this.getLicense(e,t);r&&this.PQ((0,s.updateLicense)({initDataStr:e,licenseInfo:n(i({},r)),systemName:t}))},e.prototype.setRequested=function(e,t){this.QQ(e,t,function(e){return i(i({},e),{wasRequested:!0})})},e.prototype.hasLicense=function(e,n){return(0,t.hasMatchingLicenseInfoForKeySystem)(e,h(this.OQ(),n),d)},e.prototype.hasUsableOrPendingMediaKey=function(e,n){return(0,t.hasMatchingLicenseInfoForKeySystem)(e,h(this.OQ(),n),p)},e.prototype.hasOngoingLicenseRequests=function(e){return this.getAllLicensesForKeySystem(e).some(function(e){return!e.hasLicense&&e.wasRequested})},e.prototype.setKeyIds=function(e,t,n){this.QQ(e,t,function(e){return i(i({},e),{keyIds:n})})},e.prototype.setPending=function(e,t){this.QQ(e,t,function(e){return i(i({},e),{isPending:!0})})},e.prototype.resetLicense=function(e,t){var n=this.getLicense(t,e)||{},r=i(i({},n),{keyIds:[],isPending:!1,hasLicense:!1,license:null,expiration:null,sessionId:null,wasRequested:!1});this.PQ((0,s.resetLicense)({systemName:e,initDataStr:t,licenseInfo:r}))},e.prototype.remove=function(e){this.PQ((0,s.removeLicense)({initDataStr:e}))},e.prototype.updateInitData=function(e){var t=e.initDataStr,n=e.systemName;this.PQ((0,s.updateLicense)({initDataStr:t,licenseInfo:e,systemName:n}))},e.prototype.dispose=function(){this.IQ.store.getState().drmLicenses&&!this.IQ.store.getState().drmLicenses.inPersistentState?this.IQ.store.dispatch((0,s.clearLicenseStorage)()):this.IQ.store.dispatch((0,s.resetLicenses)()),this.JQ&&this.JQ(),window.removeEventListener("beforeunload",this.LQ)},e}();function d(e){return e.hasLicense}function p(e){return e.mediaKeyStatus===l.MediaKeyStatus.Usable||e.mediaKeyStatus===l.MediaKeyStatus.Pending}function h(e,t){var n;return null!=(n=null==e?void 0:e.drmData[t])?n:{}}function f(e,t){var n=t.drmData[e];return n?Object.values(n):[]}t.LicenseStorage=c,t.hasMatchingLicenseInfoForKeySystem=function(e,t,n){return Object.values(t).some(function(t){return t.keyIds.includes(e)&&n(t)})}},47272:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.DRMModuleDefinition=void 0;var i=n(62756),r=n(67579),o=n(88559),s=n(34079),a=n(29173),u=n(93101),l=n(70581),c=n(80680),d=n(24109),p=n(92656),h=n(4358),f=n(55327),g=n(78763),v=n(6234);t.DRMModuleDefinition={name:i.ModuleName.DRM,module:{DrmService:u.DrmService,DRMManager:a.DRMManager,FairplayHandler:d.FairplayHandler,PlayReady:p.PlayReady,DRMDetectorService:g.DRMDetectorService,WebKitPrefixedEMEHandler:c.WebKitPrefixedEMEHandler,UnprefixedEMEHandler:l.UnprefixedEMEHandler,parseInitData:v.parseInitData,getLicenseState:f.getLicenseState,getLicenseInfoKey:h.getLicenseInfoKey,createDrmApi:s.createDrmApi,ContentProtectionHelper:o.ContentProtectionHelper},exports:{MediaKeySystemConfig:r.MediaKeySystemConfig}},t.default=t.DRMModuleDefinition},46658:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.ParallelContentLoader=void 0;var i=n(4129);t.ParallelContentLoader=function(){function e(e,t){this.TQ=[],this.RQ=e,this.SQ=t}return e.prototype.load=function(e,t,n,r,o,s,a,u){var l=this,c=new i.DefaultContentLoader(this.RQ,this.SQ);return this.TQ.push(c),c.load(e,t,n,r,o,s,a,u).finally(function(){l.TQ=l.TQ.filter(function(e){return e!==c}),c.dispose()})},e.prototype.cancel=function(){this.TQ.forEach(function(e){return e.cancel()})},e.prototype.isLoading=function(){return this.TQ.some(function(e){return e.isLoading()})},e.prototype.isRetrying=function(){return this.TQ.some(function(e){return e.isRetrying()})},e.prototype.dispose=function(){this.TQ.forEach(function(e){return e.dispose()}),this.TQ=[]},e}()}
1,86558:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.MSPrefixedEMEHandler=void 0,t.isMsPrefixedEmeHandlerSupported=function(e){return window.MSMediaKeys&&"function"==typeof MSMediaKeys.isTypeSupported&&MSMediaKeys.isTypeSupported(e)?Promise.resolve({keySystem:e}):Promise.reject("DOMException: Unsupported keySystem")};var i,r,o=n(40306),s=n(3336),a=n(34841),u=n(70850),l=n(19274),c=n(6234);(i=r||(r={})).KeyMessage="mskeymessage",i.KeyAdded="mskeyadded",i.KeyError="mskeyerror",t.MSPrefixedEMEHandler=function(){function e(e){var t=this;this.i8=function(){if(t.U8)return Promise.reject("EME handler destroyed");if(t.g8.readyState===HTMLMediaElement.HAVE_NOTHING)return u.Util.delay(250,t.i8);if(t.g8.msKeys)return t.V8.logger.debug("session already created"),Promise.resolve();try{t.f8=new MSMediaKeys(t.W8),t.g8.msSetMediaKeys(t.f8)}catch(e){return t.X8.fireError(new s.PlayerError(o.ErrorCode.DRM_MEDIA_KEY_INITIALIZATION_FAILED,{keySystem:t.W8,eme:"msPrefixed",error:e},"Unable to initialize the DRM media keys: `msSetMediaKeys` failed.",t.V8.sourceContext.sourceIdentifier)),Promise.reject(e)}return Promise.resolve()},this.j8=function(e){if(t.V8.logger.debug("onKeyNeeded"),t.Z8&&t.Z8(),e){var n=(0,c.parseInitData)(e.initData);
vendor: 11,996 bytes, line 1
1n&&n.length&&t.c8&&n.forEach(function(e){return t.c8(e)})}},this.V8=e,this.U8=!1,this.b8=[],this.Y8=!1,this.X8=this.V8.eventHandler}return Object.defineProperty(e.prototype,"g8",{get:function(){return this.V8.videoElement},enumerable:!1,configurable:!0}),e.getVideoErrorNameFromError=function(e,t){for(var n in e)if((n.indexOf("MEDIA_ERR_")>-1||n.indexOf("MEDIA_KEYERR_")>-1)&&e[n]===t)return n;return"UNKNOWN"},e.getHexFromCode=function(e){return isFinite(e)?(e<0&&(e=0xffffffff+e+1),"0x"+e.toString(16).toUpperCase()):null},e.prototype.h8=function(t,n){if(this.Y8=!1,null!==t&&t.deferred.reject(),n&&n.target&&n.target.error){this.g8.removeEventListener(l.MediaElementEvent.error,this.d8);var i=n.target.error,r=Number(i.code),a=Number(i.systemCode),u=Number(i.msExtendedCode),c=e.getVideoErrorNameFromError(i,r),d=e.getHexFromCode(a),p=e.getHexFromCode(u)||d,h=o.ErrorCode[o.ErrorCode.DRM_KEY_ERROR]+" - "+c+" (code: "+r+"), "+p;this.X8.fireError(new s.PlayerError(o.ErrorCode.DRM_KEY_ERROR,{code:r,systemCode:a},h,this.V8.sourceContext.sourceIdentifier))}},e.prototype.k8=function(e,t){var n=this,i=t.target.sessionId;this.e8[i]=t.target,this.Y8=!0,this.V8.logger.debug("("+e.id+") onKeyMessage",JSON.stringify(t)),this.T8.handleLicenseRequest(t).then(function(t){n.V8.logger.debug("license available ("+e.id+")"),n.o8(t.body,i,e.id),e.license=t,n.Y8=!1}).catch(function(t){n.V8.logger.debug("license request failed ("+e.id+")"),e.deferred.reject(t),n.Y8=!1})},e.prototype.l8=function(e,t){this.V8.logger.debug("key added for request ID ".concat(e.id)),e&&e.license?(this.V8.logger.debug("license request successful ("+e.id+")"),e.deferred.resolve(e.license)):e.deferred.resolve({response:"automatically added by EME",licenseRequestId:e.id}),this.Y8=!1},e.prototype.m8=function(e){var t=this.T8.getCDMData();return t?this.g8.msKeys.createSession("video/mp4",e,new Uint8Array(t)):this.g8.msKeys.createSession("video/mp4",e)},e.prototype.n8=function(e){var t=this,n={deferred:new a.Deferred,id:u.Util.generateUniqueId()};return e?(this.a8.then(function(){t.g8.msKeys?t.Y8?n.deferred.reject({status:"postponed",licenseRequestId:n.id}):(0===e.byteLength&&t.V8.logger.log("no init data"),t.Y8=!0,t.V8.logger.debug("create key session ("+n.id+") ..."),n.onKeyError=t.h8.bind(t,n),n.onKeyAdded=t.l8.bind(t,n),n.onKeyMessage=t.k8.bind(t,n),n.session=t.m8(new Uint8Array(e)),n.session.addEventListener(r.KeyError,n.onKeyError,!1),n.session.addEventListener(r.KeyAdded,n.onKeyAdded,!1),n.session.addEventListener(r.KeyMessage,n.onKeyMessage,!1),t.b8.push(n)):t.V8.logger.debug("video.keys not available.")}),n.deferred.promise):Promise.reject("no init data ("+n.id+")")},e.prototype.o8=function(e,t,n){this.Y8=!1,e&&(this.V8.logger.debug("updating keySession ("+n+")"),this.e8[t].update(this.T8.prepareLicense(e)))},e.prototype.setWaitingForKeyListener=function(e){this.Z8=e},e.prototype.setEncryptedListener=function(e){this.c8=e},e.prototype.load=function(e,t){var n=this;return this.T8=e,this.W8=t,this.U8=!1,this.e8={},this.a8=this.i8(),this.a8.then(function(){n.d8&&n.g8.removeEventListener(l.MediaElementEvent.error,n.d8),n.d8=n.h8.bind(n,null),n.g8.addEventListener(l.MediaElementEvent.error,n.d8)}).catch(function(){}),this.g8.addEventListener(l.MediaElementEvent.msneedkey,this.j8),this.a8},e.prototype.reInitialize=function(){this.g8.eventHandler.hasEventHandler(l.MediaElementEvent.msneedkey,this.j8)||this.g8.addEventListener(l.MediaElementEvent.msneedkey,this.j8),null==this.g8.msKeys?this.g8.msSetMediaKeys(this.f8):this.V8.logger.debug("Unable to reuse msKeys object as there already is an existing one on the video.")},e.prototype.p8=function(e){var t=e.getElementsByTagName("KID");if(!t)return null;for(var n="",i=0;i<t.length;i++){var r=t[i];r&&r.childNodes&&r.childNodes.length>0?n+=r.childNodes[0].nodeValue+";":r&&r.hasAttribute("value")?n+=r.getAttribute("value")+";":r&&r.hasAttribute("VALUE")?n+=r.getAttribute("VALUE")+";":this.V8.logger.debug("could not parse PlayReady KID",r)}return n.split(";")[0]||null},e.prototype.q8=function(e){var t=RegExp("p[\0]+l[\0]+a[\0]+y[\0]+r[\0]+e[\0]+a[\0]+d[\0]+y","gi"),n=RegExp("w[\0]+r[\0]+m[\0]+h[\0]+e[\0]+a[\0]+d[\0]+e[\0]+r","gi"),i=t.test(e)||n.test(e);if(!e.includes("<")||!i)return e;for(var r=e.slice(e.indexOf("<")),o="",s=0;s<r.length;s+=2)o+=r[s];try{var a=new DOMParser;return this.p8(a.parseFromString(o,"application/xml"))||e}catch(t){return this.V8.logger.debug("could not parse PlayReady PSSH XML, could be another cdm..."),e}},e.prototype.getKeyUuidsFromInitData=function(e){var t,n;return null!=(n=null==(t=this.T8)?void 0:t.getKeyUuidsFromInitData(e))?n:[]},e.prototype.getIdentifierFromInitData=function(e){return this.T8?this.T8.getIdentifierFromInitData(e):this.q8(e)},e.prototype.requestLicense=function(e,t){var n=this;return this.V8.logger.debug("request a new license for "+t+"..."),this.a8.then(function(){return n.V8.logger.debug("keySystem is ready, sending license request..."),n.n8(e).then(function(e){return{initDataStr:t,license:e.body,response:e.response,licenseRequestId:e.licenseRequestId}}).catch(function(e){return Promise.reject({initDataStr:t,statusCode:e.status,licenseRequestId:e.licenseRequestId,response:e})})}).catch(function(e){return Promise.reject(e)})},e.prototype.isLicenseRequestOngoing=function(){return this.Y8},e.prototype.unload=function(){var e=this;this.U8=!0,this.g8.removeEventListener(l.MediaElementEvent.msneedkey,this.j8),this.g8.removeEventListener(l.MediaElementEvent.error,this.d8),this.b8.forEach(function(t){try{var n=t.session;n.removeEventListener(r.KeyError,t.onKeyError),n.removeEventListener(r.KeyAdded,t.onKeyAdded),n.removeEventListener(r.KeyMessage,t.onKeyMessage)}catch(t){e.V8.logger.debug("Could not destroy license request context",t)}});var t=Object.keys(this.e8||{}).map(function(t){return Promise.resolve(e.e8[t].close())});return this.e8={},this.T8=null,this.W8=null,this.b8=[],this.a8=null,this.Z8=null,this.f8=null,Promise.all(t).catch(function(t){return e.V8.logger.debug("couldn't close key session!",t),Promise.resolve(null)})},e.prototype.suspend=function(){return Promise.resolve()},e}()},70581:function(e,t,n){var i,r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},o=this&&this.__spreadArray||function(e,t,n){if(n||2==arguments.length)for(var i,r=0,o=t.length;r<o;r++)!i&&r in t||(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.UnprefixedEMEHandler=void 0,t.isUnprefixedEmeHandlerSupported=function(e){return window.navigator.requestMediaKeySystemAccess?window.navigator.requestMediaKeySystemAccess(e,[{initDataTypes:["cenc"],audioCapabilities:[{contentType:'audio/mp4;codecs="mp4a.40.2"'}],videoCapabilities:[{contentType:'video/mp4;codecs="avc1.4d401e"'}]},{initDataTypes:["cenc"],videoCapabilities:void 0,audioCapabilities:void 0}]):Promise.reject("no requestMediaKeySystemAccess call available")};var s,a=n(66790),u=n(40306),l=n(3336),c=n(25926),d=n(4224),p=n(3714),h=n(33468),f=n(48488),g=n(21513),v=n(74853),y=n(34841),m=n(70233),b=n(15487),S=n(19274),E=n(67579),_=n(92656),T=n(4358),P=n(55327),C=n(56068),A=n(6234);(i=s||(s={})).KeyMessage="message",i.KeyStatusChange="keystatuseschange",t.UnprefixedEMEHandler=function(){function e(e){var t=this;this.Jn=function(e,n){if(!t.Cn)return t.closeSession(e),Promise.resolve(n);var i=t.om.get(e);return i&&(i.loaded=!0),t.context.logger.debug("drm license response base64:",btoa(v.ArrayHelper.arrayBufferToAsciiString(n.body,!0))),t.Rn(n.body,e).then(function(){return t.context.logger.debug("keySession updated successfully"),n}).catch(function(e){return t.context.logger.warn("update() failed. reason: "+e),Promise.reject(e)})},this.encryptedEventHandler=function(e){e&&t.processMediaEncryptedEvent(e)},this.Sn=function(e){t.context.logger.debug("waiting for key..."),t.Bn&&t.Bn()},this.Wn=function(e,n){switch(e){case C.MediaKeyStatus.Usable:t.context.logger.debug("key ".concat(n," is now usable"));break;case C.MediaKeyStatus.Expired:t.context.logger.debug("key ".concat(n," has expired."));break;case C.MediaKeyStatus.Pending:t.context.logger.debug("key ".concat(n," does not have a status yet, still pending"));break;case C.MediaKeyStatus.OutputRestricted:t.context.logger.debug("key ".concat(n," has restricted the output"));break;default:t.context.logger.debug("Status of key ".concat(n," changed to ").concat(e))}},this.Xn=function(e){t.context.logger.debug("key status change...");var n,i=e.target,r=t.om.get(i),o=t.Vn(i.keyStatuses),s=Object.values(o),a=Object.keys(o);if(r){var u=r.initDataStr;t.context.logger.debug("key session init data",u),t.Zn(o,btoa(u)),t.hasExpiredKeys(s)&&(t.closeSession(i),t.om.delete(i),null==(n=t.context.store)||n.dispatch((0,T.removeLicense)({initDataStr:u})),t.context.logger.debug("Session key expired. Closing session ".concat(i.sessionId)));var l=!(!t.context.settings.CHECK_ALL_DRM_LICENSES_FOR_KID||!t.Fn)&&(0,P.verifyKeysAreUsableOrPendingOnAnyLicense)(a,(0,h.keySystemUidToKind)(t.nm),(0,P.getLicenseState)(t.Fn));if(a.length>0&&l)t.context.logger.debug("all known keys of session either pending or still usable");else if(s.includes(C.MediaKeyStatus.OutputRestricted)){var c=Object.keys(o).filter(function(e){return o[e]===C.MediaKeyStatus.OutputRestricted});t.Yn(c,i,u)}}else t.context.logger.debug("failed to handle key status change, key session was removed",i)},this.context=e,this.lm=e.sourceContext.sourceIdentifier,this.om=new Map,this.pm=[],this.An=!1,this.mm=null}return Object.defineProperty(e.prototype,"video",{get:function(){return this.context.videoElement},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"Fn",{get:function(){return this.context.store.getState()},enumerable:!1,configurable:!0}),e.prototype.Gn=function(e,t){var n=this,i=[],r=[];return t&&2===t.length&&(i=t[0]||[],r=t[1]||[]),e.hasOwnProperty("initDataTypes")||(e.initDataTypes=["cenc"]),e.hasOwnProperty("distinctiveIdentifier")||(e.distinctiveIdentifier="optional"),e.videoCapabilities&&e.videoCapabilities.length<1&&delete e.videoCapabilities,e.audioCapabilities&&e.audioCapabilities.length<1&&delete e.audioCapabilities,i&&i.length>0&&(e.audioCapabilities=e.audioCapabilities||[],e.audioCapabilities=e.audioCapabilities.concat(i),(this.Dn.audioRobustness||""===this.Dn.audioRobustness)&&e.audioCapabilities.forEach(function(e){e.robustness=n.Dn.audioRobustness})),r&&r.length>0&&(e.videoCapabilities=e.videoCapabilities||[],e.videoCapabilities=e.videoCapabilities.concat(r),(this.Dn.videoRobustness||""===this.Dn.videoRobustness)&&e.videoCapabilities.forEach(function(e){e.robustness=n.Dn.videoRobustness})),this.context.logger.debug("Prepared the MediaKeySystemConfig:",e),e},e.prototype.Hn=function(e,t){void 0===t&&(t=!1);var n=r({},this.Gn(this.km.getMediaKeySystemConfiguration(),e));return(t||(0,g.default)().getState().capabilities.isTizen)&&(n.sessionTypes=[E.MediaKeySystemConfig.SessionType.Temporary]),[n,{initDataTypes:["cenc"],videoCapabilities:void 0,audioCapabilities:void 0,distinctiveIdentifier:n.distinctiveIdentifier,persistentState:n.persistentState,sessionTypes:n.sessionTypes}]},e.prototype.In=function(e){var t=this,n=this.Hn(e);return window.navigator.requestMediaKeySystemAccess(this.nm,n).catch(function(){var n=t.Hn(e,!0);return window.navigator.requestMediaKeySystemAccess(t.nm,n)}).then(function(e){var n=e.getConfiguration();return t.context.store.dispatch((0,T.setPersistentState)(t.Ln(n))),t.mm=n,e.createMediaKeys()})},e.prototype.Kn=function(e,t){var n=this;if(this.km){this.An=!0;var i=t.message,o=t.target,s=this.om.get(o);s&&(s.expiration=o.expiration);var a=2===i.byteLength,u=btoa(v.ArrayHelper.arrayBufferToAsciiString(i,!0));this.context.logger.debug("drm license request base64:",u),this.km.handleLicenseRequest
1(t).then(this.Jn.bind(this,o)).then(function(t){a||e.resolve(r(r({},t),{session:o,wasLicenseRestored:!1}))}).catch(function(t){n.context.logger.debug("license request failed, destroying keySession:"),n.closeSession(o),n.om.delete(o),e.reject(t)})}else e.reject("session destroyed")},e.prototype.Ln=function(e){var t=e||this.mm||{},n=t.persistentState,i=t.sessionTypes;return n===E.MediaKeySystemConfig.PersistentState.Required&&(void 0===i?[]:i).includes(E.MediaKeySystemConfig.SessionType.PersistentLicense)},e.prototype.Mn=function(e,t,n){var i=this.video.mediaKeysObject,r=this.Ln()?i.createSession(E.MediaKeySystemConfig.SessionType.PersistentLicense):i.createSession();return this.om.set(r,{expiration:null,initData:e,initDataStr:t,loaded:!1,onKeyMessage:n}),r},e.prototype.Nn=function(e,t,n,i){var r=this;this.context.logger.debug("load stored session with sessionId: ".concat(n));var o=this.Kn.bind(this,i),a=this.Mn(e,t,o);return a.addEventListener(s.KeyStatusChange,this.Xn),a.addEventListener(s.KeyMessage,o),a.load(n).then(function(e){e?(r.context.logger.debug("stored session: ".concat(a.sessionId," succesfully loaded")),i.resolve({session:a,wasLicenseRestored:!0})):(r.context.logger.debug("stored session: ".concat(a.sessionId," not loaded")),r.om.delete(a))}).catch(function(e){r.context.logger.debug("stored session: ".concat(a.sessionId," not loaded"),e),i.reject(e),r.om.delete(a)}),i.promise},e.prototype.On=function(e,t,n){var i=this,r=this.Kn.bind(this,n),o=this.Mn(e,t,r);return o.addEventListener(s.KeyStatusChange,this.Xn),o.addEventListener(s.KeyMessage,r),o.generateRequest("cenc",e).catch(function(e){i.om.delete(o),n.reject(e),i.context.eventHandler.fireError(new l.PlayerError(u.ErrorCode.DRM_KEY_SESSION_INITIALIZATION_FAILED,{reason:e,licenseInitDataString:t},"Unable to initialize DRM key session: `MediaKeySession.generateRequest` failed.",i.lm))}),n.promise},e.prototype.setMediaKeys=function(e){var t=this,n=new y.Deferred;return this.video.mediaKeysPromise=(this.video.mediaKeysPromise||Promise.resolve()).then(function(){var i=t.video.setMediaKeys(e)||Promise.resolve();return n.resolve(i),i.then(function(){return t.context.logger.debug("MediaKeys ".concat(null===e?"reset":"set"," successfully"))}).catch(function(e){return t.context.logger.debug("Could not set MediaKeys:",e),Promise.reject(e)})}),n.promise},e.prototype.Pn=function(e){e||this.context.eventHandler.dispatchEvent(p.PlayerEvent.Warning,new c.PlayerWarning(d.WarningCode.DRM_SERVER_CERTIFICATE_NOT_SUPPORTED))},e.prototype.onServerCertificateSetFailed=function(e,t,n){n.reason=t instanceof Error?t.message:"unknown error",this.context.eventHandler.fireError(new l.PlayerError(u.ErrorCode.DRM_CERTIFICATE_ERROR,n,"Unable to setup the key system: `MediaKeys.setServerCertificate` failed.",this.lm))},e.prototype.Qn=function(e,t){var n=this;this.Dn.serverCertificate&&e&&e.setServerCertificate(this.Dn.serverCertificate).then(function(e){return n.Pn(e)}).catch(function(i){return n.onServerCertificateSetFailed(e,i,t)})},e.prototype.setupKeySystem=function(e){var t=this,n={drmCapabilities:e,keySystem:this.nm,eme:"unprefixed"};return this.In(e).then(function(e){return n.createdMediaKeys=e,null===t.nm?(t.context.logger.debug("EMEHandler was unloaded during key-system creation"),Promise.reject(Error(a.DrmSetupError.CANCELLED))):(t.video.mediaKeysObject=e,t.Qn(e,n),t.setMediaKeys(e))}).catch(function(e){var i;return(null==e?void 0:e.message)!==a.DrmSetupError.CANCELLED&&(n.reason=null!=(i=null==e?void 0:e.message)?i:e,t.context.eventHandler.fireError(new l.PlayerError(u.ErrorCode.DRM_MEDIA_KEY_INITIALIZATION_FAILED,n,"Unable to initialize the DRM key system with the specified combinations.",t.lm))),Promise.reject(e)})},e.prototype.Rn=function(e,t){return this.An=!1,e&&this.km?(this.pm.includes(t)||this.pm.push(t),t.update(this.km.prepareLicense(e))):Promise.reject()},e.prototype.processMediaEncryptedEvent=function(e){var t=this;this.context.logger.debug("encrypted event for initData: "+String.fromCharCode.apply(null,new Uint8Array(e.initData)));var n=(0,A.parseInitData)(e.initData);
1n&&n.length&&this.En&&n.forEach(function(e){return t.En(e)})},e.prototype.hasExpiredKeys=function(e){return e.some(function(e){return e===C.MediaKeyStatus.Expired})},e.prototype.Tn=function(e){var t=new Uint8Array(e instanceof ArrayBuffer?e:e.buffer);return(0,h.keySystemUidToKind)(this.nm)===h.KeySystemKind.PLAYREADY&&(0,b.isEdge)()&&_.PlayReady.kidToCENC(t),m.FormatHelper.bytesToUUID(t)},e.prototype.Un=function(e,t){var n="",i="";return"string"==typeof e?(n=this.Tn(t),i=String(e)):"string"==typeof t?(n=this.Tn(e),i=String(t)):this.context.logger.debug("could not parse key id and status",typeof e,typeof t),[n,i]},e.prototype.Vn=function(e){var t=this,n={};return e.forEach(function(e,i){var r=t.Un(e,i),o=r[0],s=r[1];n[o]=s}),n},e.prototype.Yn=function(e,t,n){var i,r=this;this.context.eventHandler.dispatchEvent(p.PlayerEvent.Warning,new c.PlayerWarning(d.WarningCode.DRM_RESTRICTED_OUTPUT,"Output restricted for "+e.join(", "))),e.forEach(function(e){var t;return null==(t=r.context.store)?void 0:t.dispatch((0,f.trackDrmKidError)(e))}),this.closeSession(t),this.om.delete(t),null==(i=this.context.store)||i.dispatch((0,T.removeLicense)({initDataStr:n}))},e.prototype.Zn=function(e,t){var n=this;Object.keys(e).forEach(function(i){var r,o,s=e[i];null==(r=n.context.store)||r.dispatch((0,T.setMediaKeyStatus)((0,h.keySystemUidToKind)(n.nm),i,s,t)),s===C.MediaKeyStatus.InternalError&&(null==(o=n.context.store)||o.dispatch((0,f.trackDrmKidError)(i))),n.Wn(s,i)})},e.prototype.unload=function(){var e,t=this,n=[];this.om.forEach(function(e,t){return n.push(t)}),this.video.removeEventListener(S.MediaElementEvent.waitingforkey,this.Sn),this.video.removeEventListener(S.MediaElementEvent.encrypted,this.encryptedEventHandler);var i=n.map(function(e){var n=t.closeSession(e);return t.pm.includes(e)?n:Promise.resolve()});this.km=null,this.om=new Map,this.pm=[],this.nm=null,this.Bn=null,this.video.mediaKeysObject=null;var r=null==(e=this.Cn)?void 0:e.catch(function(e){return t.context.logger.debug("Caught key system promise rejection:",e)}).finally(function(){return t.Cn=void 0});return Promise.all(o(o([],i,!0),[r],!1)).then(function(){return t.setMediaKeys(null).catch(function(e){t.context.logger.debug("couldn't remove media keys!",e)})}).catch(function(e){t.context.logger.debug("couldn't close key session!",e)})},e.prototype.closeSession=function(e){var t=this,n=this.om.get(e);return n&&(e.removeEventListener(s.KeyStatusChange,this.Xn),e.removeEventListener(s.KeyMessage,n.onKeyMessage)),Promise.race([e.closed,e.close()]).catch(function(e){t.context.logger.debug("couldn't close session on unload",e)})},e.prototype.load=function(e,t,n,i){return this.km=e,this.nm=t,this.Dn=n[(0,h.keySystemUidToKind)(t)],this.video.addEventListener(S.MediaElementEvent.encrypted,this.encryptedEventHandler),this.video.addEventListener(S.MediaElementEvent.waitingforkey,this.Sn),this.Cn=this.setupKeySystem(i),this.Cn},e.prototype.an=function(e){var t=!1;return this.om.forEach(function(n){return t=t||n.initData===e}),t},e.prototype.reInitialize=function(){this.video.eventHandler.hasEventHandler(S.MediaElementEvent.encrypted,this.encryptedEventHandler)||this.video.addEventListener(S.MediaElementEvent.encrypted,this.encryptedEventHandler),this.video.eventHandler.hasEventHandler(S.MediaElementEvent.waitingforkey,this.Sn)||this.video.addEventListener(S.MediaElementEvent.waitingforkey,this.Sn)},e.prototype.bn=function(e){if(!this.Fn)return!1;for(var t=(0,h.keySystemUidToKind)(this.nm),n=(0,P.getLicenseState)(this.Fn).drmData[t],i=0,r=Object.keys(n);i<r.length;i++){var o=n[r[i]];if(o.sessionId===e)return void 0===o.usedByPlayerId||o.usedByPlayerId===this.context.internalPlayerID}return!1},e.prototype.cn=function(e,t,n,i){return e?this.an(e)?(i.reject({message:"session for requested initData already present"}),i.promise):n&&this.Ln()&&this.bn(n)?this.Nn(e,t,n,i):this.On(e,t,i):(i.reject({message:"no initData provided for license request"}),i.promise)},e.prototype.dn=function(){return new y.Deferred},e.prototype.requestLicense=function(e,t,n){var i=this;this.An=!0,this.context.logger.debug("request a new license for ".concat(t," ..."));var r=this.dn();return this.Cn.then(function(){return null===i.video.mediaKeysObject?Promise.reject(Error(a.DrmSetupError.CANCELLED)):i.cn(e,t,n,r)}).then(function(e){i.An=!1;var n=e.session,r=void 0===n?{}:n;return{initDataStr:t,license:e.wasLicenseRestored?null:e.body,sessionInfo:{sessionId:r.sessionId,expiration:r.expiration},restoredFromPersistentLicense:e.wasLicenseRestored}}).catch(function(e){return i.An=!1,Promise.reject({response:e,initDataStr:t})})},e.prototype.getKeyUuidsFromInitData=function(e){var t,n;return null!=(n=null==(t=this.km)?void 0:t.getKeyUuidsFromInitData(e))?n:[]},e.prototype.getIdentifierFromInitData=function(e){return this.km?this.km.getIdentifierFromInitData(e):e},e.prototype.isLicenseRequestOngoing=function(){return this.An},e.prototype.setWaitingForKeyListener=function(e){this.Bn=e},e.prototype.setEncryptedListener=function(e){this.En=e},e.prototype.suspend=function(){return Promise.resolve()},e.prototype.disposeSessionForInitData=function(e){var t=this,n=[];return this.om.forEach(function(i,r){i.initDataStr===e&&(n.push(t.closeSession(r).then(function(){t.context.logger.debug("Closed session "+r.sessionId)})),t.pm=t.pm.filter(function(e){return e.sessionId!==r.sessionId}),t.om.delete(r))}),n.length<1?Promise.reject("Unable to find an existing drm session for "+e):Promise.all(n)},e}()}
1,80680:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.WebKitPrefixedEMEHandler=void 0,t.isWebkitPrefixedEmeHandlerSupported=function(e,t){return"function"==typeof e.getWrappedElement().webkitGenerateKeyRequest&&"function"==typeof e.canPlayType&&e.canPlayType("video/mp4",t)?Promise.resolve({keySystem:t}):Promise.reject("DOMException: Unsupported keySystem")};var i,r,o,s,a=n(40306),u=n(3336),l=n(34841),c=n(19274),d=n(6234);(i=o||(o={}))[i.Domain=6]="Domain",(r=s||(s={}))[r.HDCP=0x48444350]="HDCP",t.WebKitPrefixedEMEHandler=function(){function e(e){var t=this;this.mn=function(e){if(t.context.logger.debug("key needed..."),t.fn&&t.fn(),e){var n=(0,d.parseInitData)(e.initData);n&&n.length&&t.jn&&t.invokeEncryptedListener(e.initData,n)}},this.context=e,this.gn=e.sourceContext.sourceIdentifier,this.video=e.videoElement,this.hn=[],this.ln=[]}return e.prototype.invokeEncryptedListener=function(e,t){var n=this;t.forEach(function(e){return n.jn(e)})},e.prototype.nn=function(e,t,n){this.hn.includes(n)&&this.hn.splice(this.hn.indexOf(n)),this.context.logger.debug("keySystem: "+this.selectedKeySystem+", license: "+e+", KID: "+t+", sessionId: "+n),this.video.webkitAddKey(this.selectedKeySystem,e,t,n)},e.prototype.on=function(e,t,n){this.en=!1,null!==e?this.nn(this.keySystem.prepareLicense(e),t,n):this.context.logger.debug("Empty license response")},e.prototype.pn=function(e,t){null!==e&&e.deferred.reject();var n=t.target||{},i=n.error||n.errorCode||{},r=i.code,l=i.systemCode;this.context.logger.debug("A decryption key error was encountered:",{error:i,code:r,systemCode:l}),r===o.Domain&&l===s.HDCP?this.context.eventHandler.fireError(new u.PlayerError(a.ErrorCode.DRM_RESTRICTED_OUTPUT,void 0,void 0,this.gn)):this.context.eventHandler.fireError(new u.PlayerError(a.ErrorCode.DRM_KEY_ERROR,{code:r,systemCode:l},void 0,this.gn))},e.prototype.qn=function(e,t){this.context.logger.debug("key added for kid ".concat(e.kid)),e&&e.license&&e.deferred.resolve(e.license),e&&e.onKeyError&&this.video.removeEventListener(c.MediaElementEvent.webkitkeyerror,e.onKeyError)},e.prototype.rn=function(e,t){var n=this,i=t.sessionId;t.kid=e.kid,this.hn.includes(i)?this.context.logger.debug("Session ".concat(i," already handled, ignoring...")):(this.hn.push(i),this.en=!0,this.keySystem.handleLicenseRequest
1(t).then(function(t){n.on(t.body,t.kid||e.initData,i),e.license=t}).catch(function(t){return e.deferred.reject(t)}))},e.prototype.sn=function(e,t){var n=this,i={kid:t,initData:e,deferred:new l.Deferred};return this.ln.push(i.deferred),i.onKeyError=this.pn.bind(this,i),i.onKeyAdded=this.qn.bind(this,i),i.onKeyMessage=this.rn.bind(this,i),this.video.addEventListener(c.MediaElementEvent.webkitkeyerror,i.onKeyError),this.video.addEventListener(c.MediaElementEvent.webkitkeyadded,i.onKeyAdded),this.video.addEventListener(c.MediaElementEvent.webkitkeymessage,i.onKeyMessage),this.video.webkitGenerateKeyRequest(this.selectedKeySystem,new Uint8Array(e)),i.deferred.promise.finally(function(){n.video.removeEventListener(c.MediaElementEvent.webkitkeyerror,i.onKeyError),n.video.removeEventListener(c.MediaElementEvent.webkitkeyadded,i.onKeyAdded),n.video.removeEventListener(c.MediaElementEvent.webkitkeymessage,i.onKeyMessage),n.tn(i.deferred)}),i.deferred.promise},e.prototype.tn=function(e){var t=this.ln.findIndex(function(t){return t===e});this.ln.splice(t,1)},e.prototype.unload=function(){var e;return this.kn&&this.video.removeEventListener(c.MediaElementEvent.webkitkeyerror,this.kn),this.ln.forEach(function(e){e.reject("unloading the WebKITPrefixedEMEHandler")}),this.ln=[],this.video.removeEventListener(c.MediaElementEvent.webkitneedkey,this.mn),this.selectedKeySystem=null,null==(e=this.keySystem)||e.dispose(),this.keySystem=null,this.fn=null,Promise.resolve()},e.prototype.load=function(e,t){return this.keySystem=e,this.selectedKeySystem=t,this.kn&&this.video.removeEventListener(c.MediaElementEvent.webkitkeyerror,this.kn),this.kn=this.pn.bind(this,null),this.video.addEventListener(c.MediaElementEvent.webkitneedkey,this.mn),this.video.addEventListener(c.MediaElementEvent.webkitkeyerror,this.kn),Promise.resolve()},e.prototype.reInitialize=function(){},e.prototype.requestLicense=function(e,t){var n=this;return this.en=!0,this.context.logger.debug("request a new license for "+t+"..."),this.sn(e).then(function(e){return n.en=!1,{initDataStr:t,license:e.body}}).catch(function(e){return n.en=!1,Promise.reject({initDataStr:t,statusCode:e.status,response:e})})},e.prototype.getKeyUuidsFromInitData=function(e){var t,n;return null!=(n=null==(t=this.keySystem)?void 0:t.getKeyUuidsFromInitData(e))?n:[]},e.prototype.getIdentifierFromInitData=function(e){return this.keySystem?this.keySystem.getIdentifierFromInitData(e):e},e.prototype.isLicenseRequestOngoing=function(){return this.en},e.prototype.setWaitingForKeyListener=function(e){this.fn=e},e.prototype.setEncryptedListener=function(e){this.jn=e},e.prototype.suspend=function(){return Promise.resolve()},e}()},92656:function(e,t,n){var i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.PlayReady=t.EMPTY_KEY_MESSAGE=void 0;var r=n(40306),o=n(3336),s=n(25926),a=n(4224),u=n(3714),l=n(57456),c=n(29669),d=n(51682),p=n(74853),h=n(70233),f=n(67579),g=n(46658),v="<WRMHEADER";function y(e){var t="string"==typeof e?(new DOMParser).parseFromString(e,"application/xml"):e;if(!t)return null;var n=t.getElementsByTagName("LA_URL");return n.length>0?n.item(0).textContent:null}t.EMPTY_KEY_MESSAGE="KeyMessageWasEmpty";var m=function(){function e(e,t){var n=this;this.context=e,this.zn=function(e,t){(n.context.logger.debug("PlayReady license request failed: ".concat(null==t?void 0:t.name,". Response:"),null==e?void 0:e.body),null!==e)?n.xn(null==e?void 0:e.status)?(n.context.logger.debug("Retrying other KIDs",e),n.context.eventHandler.dispatchEvent(u.PlayerEvent.Warning,new s.PlayerWarning(a.WarningCode.DRM_FAILED_LICENSE_REQUEST,"License request failed, retrying with other keys.",{responseCode:null==e?void 0:e.status,responseText:null==e?void 0:e.statusText,serverResponse:null==e?void 0:e.body}))):n.context.eventHandler.fireError(new o.PlayerError(r.ErrorCode.DRM_FAILED_LICENSE_REQUEST,{statusCode:null==e?void 0:e.status,statusText:null==e?void 0:e.statusText,serverResponse:null==e?void 0:e.body},"Failed to load the PlayReady DRM license: ".concat(null==e?void 0:e.status," ").concat(null==e?void 0:e.statusText,"."),n.un)):n.context.logger.debug("Playready license failed without specific reason",e,t)},this.un=e.sourceContext.sourceIdentifier,this.vn=t,e.logger.debug("Using DRM key system: PlayReady"),this.wn=new g.ParallelContentLoader(e,{onFailure:this.zn,maxRetries:t.maxLicenseRequestRetries,retryDelay:t.licenseRequestRetryDelay,requestType:c.HttpRequestType.DRM_LICENSE_PLAYREADY})}return e.getPlaintextChallengeText=function(e,t){var n=e.getElementsByTagName("Challenge")[0];if(n.hasOwnProperty("innerHTML"))return'<Challenge xmlns="http://schemas.microsoft.com/DRM/2007/03/
1protocols/messages">'+n.innerHTML+"</Challenge>";var i=t.indexOf("<Challenge"),r=t.indexOf("</Challenge>")+12;return t.substring(i,r)},e.prototype.xn=function(e){return!!this.vn.retryOtherKeysOnHttpStatusCode&&this.vn.retryOtherKeysOnHttpStatusCode.includes(e)},e.prototype.yn=function(t){var n=(new DOMParser).parseFromString(t,"application/xml");return n.getElementsByTagName("parsererror").length>0?[]:e.extractKeyIdsFromPlayReadyHeaders([n],this.context).map(e.base64KidToUuid)},e.prototype.Ko=function(n){var i,s=n.message.buffer||n.message,a=this.vn.hasOwnProperty("utf8message")&&this.vn.utf8message,u=p.ArrayHelper.arrayBufferToAsciiString(s,a);if(0===u.length)return this.context.logger.debug("MediaKeyMessageEvent contained an empty message, skipping"),t.EMPTY_KEY_MESSAGE;this.context.logger.debug(u);var l=(new DOMParser).parseFromString(u,"application/xml");if(l.getElementsByTagName("Challenge")[0])if(this.vn.hasOwnProperty("plaintextChallenge")&&this.vn.plaintextChallenge)i='<?xml version="1.0" encoding="UTF-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soap:Body><AcquireLicense xmlns="http://schemas.microsoft.com/DRM/2007/03/protocols"><challenge>'+e.getPlaintextChallengeText(l,u)+"</challenge></AcquireLicense></soap:Body></soap:Envelope>";else{var c=l.getElementsByTagName("Challenge")[0].childNodes[0].nodeValue;c&&(i=window.atob(c))}else this.context.logger.log("TODO: playready update needed, not implemented yet");var d={},h=u.match(/<HttpHeaders>.*<\/HttpHeaders>/);if(h&&1===h.length){var f=h[0].match(/<name>([^<]+?)<\/name>/g),g=h[0].match(/<value>([^<]+?)<\/value>/g);if(null===f||null===g||f.length!==g.length)return this.context.eventHandler.fireError(new o.PlayerError(r.ErrorCode.DRM_PLAYREADY_INVALID_HEADER_KEY_VALUE_PAIR,{headerNameListEmpty:null===f,headerValueListEmpty:null===g,headerPairLengthMismatch:(null==f?void 0:f.length)!==(null==g?void 0:g.length)},"An invalid key/value pair was encountered while parsing the PlayReady license request headers.",this.un)),null;for(var v=0;v<f.length;v++)d[f[v].replace(/<\/?name>/g,"")]=g[v].replace(/<\/?value>/g,"")}return{challenge:i,laURL:this.vn.LA_URL||n.destinationURL||n.defaultURL||y(l)||y(i),headers:d}},e.prototype.handleLicenseRequest=function(e){var n=this,i=this.Ko(e);if(i===t.EMPTY_KEY_MESSAGE)return Promise.reject(t.EMPTY_KEY_MESSAGE);if(!i||!i.laURL)return Promise.reject("no LA URL given");if(!("forceSSL"in this.vn)||this.vn.forceSSL){var r=document.createElement("a");r.href=i.laURL,r.protocol="https:",i.laURL=r.href}return i.headers=l.XhrHelper.mergeHeaders(i.headers,this.vn.headers||{}),this.wn.load(i.laURL,c.HttpRequestMethod.POST,c.HttpResponseType.ARRAYBUFFER,i.challenge,i.headers,this.vn.withCredentials).catch(function(e){if(n.xn(null==e?void 0:e.status)){var t=n.yn(i.challenge);n.context.logger.debug("License request failed with retryable status code",{failedKeyIds:t,error:e}),e.failedKeyIds=t}throw e})},e.prototype.prepareLicense=function(e){try{return new Uint8Array(e)}catch(e){return this.context.eventHandler.fireError(new o.PlayerError(r.ErrorCode.DRM_KEY_ERROR,{reason:"Unable to construct a Uint8Array from the license response"},void 0,this.un)),null}},e.prototype.getCDMData=function(){if(this.vn&&this.vn.customData){for(var t=[],n=0;n<this.vn.customData.length;++n)t.push(this.vn.customData.charCodeAt(n)),t.push(0);var i=String.fromCharCode.apply(null,t);i=btoa(i);var r=e.PRCDMData.replace("%PROACTIVE%",!!this.vn.proactiveLicense+"").replace("%CUSTOMDATA%",i),o=[];for(n=0;n<r.length;++n)o.push(r.charCodeAt(n)),o.push(0);return new Uint8Array(o).buffer}return null},e.getPlayreadyRecordsFromWrmHeader=function(e,t){for(var n=0,i=[],r=p.ArrayHelper.sparseArrayBufferToAsciiString(e.buffer,2,t);n<r.length;){var o=r.indexOf(v,n),s=r.indexOf("WRMHEADER>",o);if(o>=0&&s>o&&n<s){var a=t+2*o,u=t+2*s+20;i.push({type:1,value:e.buffer.slice(a,u)}),n=s}else n=r.length}return i},e.getPlayReadyRecordsFromPlayreadyObject=function(e,t){var n=t+4,i=[],r=new DataView(e.buffer),o=r.getUint16(n,!0);n+=2;for(var s=0;s<o;s++){var a=r.getUint16(n,!0);n+=2;var u=r.getUint16(n,!0);n+=2;var l={type:a,value:e.buffer.slice(n,n+u)};i.push(l),n+=u}return i},e.isValidPlayReadyObject=function(e,t){var n=new DataView(e.buffer,t);return!(n.getUint32(0,!0)>n.byteLength)&&v.split("").map(function(e){return e.charCodeAt(0)}).some(function(e,t){return n.getUint16(t,!0)!==e})},e.getPlayReadyRecords=function(e,t){return this.isValidPlayReadyObject(e,t)?this.getPlayReadyRecordsFromPlayreadyObject(e,t):this.getPlayreadyRecordsFromWrmHeader(e,t)},e.parsePlayReadyRecord=function(e,t){if(1!==e.type)return null;try{return(new DOMParser).parseFromString(p.ArrayHelper.sparseArrayBufferToAsciiString(e.value),"application/xml")}catch(n){return null!==t&&t.logger.debug("could not parse PlayReady PSSH XML",n,e),null}},e.parseWrmHeader=function(e,t,n){var i=this;return void 0===n&&(n=null),this.getPlayReadyRecords(e,t).map(function(e){return i.parsePlayReadyRecord(e,n)}).filter(function(e){return null!==e})},e.prototype.Lo=function(e){var t=p.ArrayHelper.stringToArrayWithoutEncoding(e);return this.parsePlayReadyInitDataBuffer(t.buffer)},e.prototype.parsePlayReadyInitDataBuffer=function(t){for(var n=new DataView(t),i="",r=d.ISOBMFFConstants.BOX_SIZE_LENGTH,o=0;o<d.ISOBMFFConstants.BOX_TYPE_LENGTH;o++)i+=String.fromCharCode(n.getInt8(r+o));if("pssh"===i){r+=d.ISOBMFFConstants.BOX_TYPE_LENGTH;var s=n.getUint8(r);r+=d.ISOBMFFConstants.FULL_BOX_VERSION_LENGTH+d.ISOBMFFConstants.FULL_BOX_FLAGS_LENGTH+d.ISOBMFFConstants.PSSH_SYSTEM_ID_LENGTH,s>0&&(r+=4+n.getUint32(r)*d.ISOBMFFConstants.PSSH_KID_LEN),r+=4}return e.parseWrmHeader(new Uint8Array(t),r,this.context)},e.extractKeyIdsFromPlayReadyHeaders=function(e,t){for(var n,i,r,o=[],s=0;s<e.length;s++){var a=e[s].getElementsByTagName("KID");if(a&&a.length>0)for(var u=0;u<a.length;u++){var l=a[u],c=null==(n=l.textContent)?void 0:n.trim(),d=(null==(i=l.getAttribute("VALUE"))?void 0:i.trim())||(null==(r=l.getAttribute("value"))?void 0:r.trim()),p=c||d;p?o.push(p):t&&t.logger.debug("could not parse PlayReady KID",l)}}return o},e.prototype.getKeyUuidsFromInitData=function(t){return e.extractKeyIdsFromPlayReadyHeaders(this.parsePlayReadyInitDataBuffer(t),this.context).map(e.base64KidToUuid)},e.base64KidToUuid=function(t){var n=new Uint8Array(p.ArrayHelper.stringToArrayWithoutEncoding(atob(t)));return e.kidToCENC(n),h.FormatHelper.bytesToUUID(n)},e.prototype.getIdentifierFromInitData=function(t){if(!t.includes("<"))return t;var n=this.Lo(t),i=e.extractKeyIdsFromPlayReadyHeaders(n,this.context);return i&&i.length>0?i.join(";"):t},e.prototype.getMediaKeySystemConfiguration=function(){var e=this.vn.mediaKeySystemConfig,t={persistentState:f.MediaKeySystemConfig.PersistentState.Optional,sessionTypes:[f.MediaKeySystemConfig.SessionType.Temporary]};return"object"==typeof e?i(i({},t),e):t},e.swapBytes=function(e,t,n){var i=e[n];e[n]=e[t],e[t]=i},e.kidToCENC=function(t){e.swapBytes(t,0,3),e.swapBytes(t,1,2),e.swapBytes(t,4,5),e.swapBytes(t,6,7)},e.prototype.dispose=function(){this.vn=null,this.wn.dispose()},e.PRCDMData='<PlayReadyCDMData type="LicenseAcquisition"><LicenseAcquisition version="1.0" Proactive="%PROACTIVE%"><CustomData encoding="base64encoded">%CUSTOMDATA%</CustomData></LicenseAcquisition></PlayReadyCDMData>',e}();t.PlayReady=m}
vendor: 4,944 bytes, line 1
1,25271:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.PrimeTime=void 0;var i=n(40306),r=n(3336),o=n(4129),s=n(29669);t.PrimeTime=function(){function e(e,t){var n=this;this.context=e,this.u8=function(e,t){n.context.logger.debug("PrimeTime license request failed: ".concat(t.name,". Response:"),e.body),n.context.eventHandler.fireError(new r.PlayerError(i.ErrorCode.DRM_FAILED_LICENSE_REQUEST,{statusCode:e.status,statusText:e.statusText,serverResponse:e.body},"Failed to load the PrimeTime DRM license: ".concat(e.status," ").concat(e.statusText,"."),n.r8))},this.r8=e.sourceContext.sourceIdentifier,this.s8=t,e.logger.debug("Using DRM key system: PrimeTime"),this.t8=new o.DefaultContentLoader(e,{onFailure:this.u8,maxRetries:t.maxLicenseRequestRetries,retryDelay:t.licenseRequestRetryDelay,requestType:s.HttpRequestType.DRM_LICENSE_PRIMETIME})}return e.prototype.handleLicenseRequest=function(t){var n,i,r=t.message;switch(this.s8.headers&&Object.keys(this.s8.headers).length>0&&(n=this.s8.headers),t.messageType){case e.INDIVIDUALIZATION_REQUEST:i=this.s8.indivURL||this.s8.LA_URL;break;case e.LICENSE_REQUEST:case e.LICENSE_RELEASE:i=this.s8.LA_URL;break;default:this.context.logger.debug("unknown license request type, assuming license-request"),i=this.s8.LA_URL}return this.t8.load(i,s.HttpRequestMethod.POST,s.HttpResponseType.ARRAYBUFFER,r,n,this.s8.withCredentials,"application/json")},e.prototype.prepareLicense=function(e){return new Uint8Array(e)},e.prototype.getCDMData=function(){return null},e.prototype.getKeyUuidsFromInitData=function(e){return[]},e.prototype.getIdentifierFromInitData=function(e){return e},e.prototype.getMediaKeySystemConfiguration=function(){var e=this.s8.mediaKeySystemConfig;return"object"==typeof e?e:{}},e.prototype.dispose=function(){this.s8=null,this.t8.dispose(),this.t8=null},e.INDIVIDUALIZATION_REQUEST="individualization-request",e.LICENSE_REQUEST="license-request",e.LICENSE_RELEASE="license-release",e}()},31884:function(e,t,n){var i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.TVKey=void 0;var r=n(40306),o=n(3336),s=n(4129),a=n(29669),u=n(74853),l=n(67579),c=n(92378);t.TVKey=function(){function e(e,t){var n=this;this.context=e,this.tvkeyConfig=t,this.w8=function(e,t){n.context.logger.debug("TVKey license request failed: ".concat(t.name,". Response:"),e.body),n.context.eventHandler.fireError(new o.PlayerError(r.ErrorCode.DRM_FAILED_LICENSE_REQUEST,{responseCode:e.status,responseText:e.statusText,serverResponse:e.body},"Failed to load the TVKey DRM license: ".concat(e.status," ").concat(e.statusText,"."),n.context.sourceContext.sourceIdentifier))},e.logger.debug("Using DRM key system: TVKey"),this.v8=new s.DefaultContentLoader(e,{onFailure:this.w8,maxRetries:t.maxLicenseRequestRetries,requestType:a.HttpRequestType.DRM_LICENSE_TVKEY})}return e.prototype.x8=function(e){if("function"==typeof this.tvkeyConfig.prepareMessage)return this.tvkeyConfig.prepareMessage(e);var t=new Uint8Array(e.message),n=u.ArrayHelper.convertBufferSourceToUTF8(t);return'{"OttLicenseRequestMessage":'.concat(n,"}")},e.prototype.y8=function(){var e=this.tvkeyConfig.headers||{};return i({"Content-Type":"application/json"},e)},e.prototype.handleLicenseRequest=function(e){if(!this.tvkeyConfig.LA_URL)return Promise.reject(Error("No LA URL given"));var t=this.x8(e),n=this.y8();return this.v8.load(this.tvkeyConfig.LA_URL,a.HttpRequestMethod.POST,a.HttpResponseType.TEXT,t,n,this.tvkeyConfig.withCredentials,"application/json")},e.prototype.prepareLicense=function(e){return"function"==typeof this.tvkeyConfig.prepareLicense?this.tvkeyConfig.prepareLicense(e):"string"==typeof e?u.ArrayHelper.stringToArrayWithoutEncoding(e):new Uint8Array(e)},e.prototype.getCDMData=function(){return null},e.prototype.getKeyUuidsFromInitData=function(e){return(0,c.parseKidsFromTVKeyPssh)(e,this.context.logger)},e.prototype.getIdentifierFromInitData=function(e){try{var t=u.ArrayHelper.stringToArrayWithoutEncoding(e),n=(0,c.parseKidsFromTVKeyPssh)(t.buffer,this.context.logger);return n.length?n.join(";"):e}catch(t){return this.context.logger.debug("Failed to extract key IDs for TVKey identifier:",t),e}},e.prototype.getMediaKeySystemConfiguration=function(){var e;return i({persistentState:l.MediaKeySystemConfig.PersistentState.Optional,sessionTypes:[l.MediaKeySystemConfig.SessionType.Temporary]},null!=(e=this.tvkeyConfig.mediaKeySystemConfig)?e:{})},e.prototype.dispose=function(){this.v8.dispose()},e}()},81982:function(e,t,n){var i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};
1Object.defineProperty(t,"__esModule",{value:!0}),t.Widevine=void 0;var r=n(40306),o=n(3336),s=n(25926),a=n(4224),u=n(3714),l=n(29669),c=n(48488),d=n(67579),p=n(46658),h=n(51063);t.Widevine=function(){function e(e,t){var n=this;this.context=e,this.O9=function(e,t){n.context.logger.debug("Widevine license request failed: ".concat(t.name,". Response:"),e.body),n.N9(e.status)?n.context.eventHandler.dispatchEvent(u.PlayerEvent.Warning,new s.PlayerWarning(a.WarningCode.DRM_FAILED_LICENSE_REQUEST,"License request failed, retrying with other keys.",{responseCode:e.status,responseText:e.statusText,serverResponse:e.body})):n.context.eventHandler.fireError(new o.PlayerError(r.ErrorCode.DRM_FAILED_LICENSE_REQUEST,{responseCode:e.status,responseText:e.statusText,serverResponse:e.body},"Failed to load the Widevine DRM license: ".concat(e.status," ").concat(e.statusText,"."),n.z8))},this.z8=e.sourceContext.sourceIdentifier,this.A8=t,this.M9=new Map,e.logger.debug("Using DRM key system: Widevine"),this.B8=new p.ParallelContentLoader(e,{onFailure:this.O9,maxRetries:t.maxLicenseRequestRetries,retryDelay:t.licenseRequestRetryDelay,requestType:l.HttpRequestType.DRM_LICENSE_WIDEVINE})}return e.prototype.N9=function(e){return this.A8.retryOtherKeysOnHttpStatusCode?this.A8.retryOtherKeysOnHttpStatusCode.includes(e):!(!this.A8.retryOtherKeysOnForbiddenLicense||403!==e)},e.prototype.P9=function(e){return"function"==typeof this.A8.prepareMessage?this.A8.prepareMessage(e):e.message},e.prototype.Q9=function(){return this.A8.headers&&Object.keys(this.A8.headers).length>0?this.A8.headers:void 0},e.prototype.R9=function(e){var t=(0,h.parseWidevineLicenseRequestProtoBuf)(e);void 0!==t&&this.M9.set(t.requestId,t.requestedKeyIds)},e.prototype.handleLicenseRequest=function(e){if(!this.A8.LA_URL)return Promise.reject("no LA URL given");var t=this.P9(e),n=this.Q9();return this.R9(t),this.B8.load(this.A8.LA_URL,l.HttpRequestMethod.POST,l.HttpResponseType.ARRAYBUFFER,t,n,this.A8.withCredentials,"application/json")},e.prototype.S9=function(e){var t;if("function"==typeof this.A8.prepareLicense){var n=this.A8.prepareLicense({license:e});return null!=(t=null==n?void 0:n.license)?t:void 0}},e.prototype.T9=function(e){var t=new Uint8Array(e),n=this.S9(t);return null!=n?n:t},e.prototype.U9=function(e){this.context.logger.debug("No DRM license received for key ID ".concat(e)),this.context.store.dispatch((0,c.trackDrmKidError)(e))},e.prototype.V9=function(e){var t,n=this,i=(0,h.parseWidevineLicenseResponseProtoBuf)(e);void 0!==i&&(null!=(t=this.M9.get(i.requestId))?t:[]).filter(function(e){return!i.returnedKeyIds.includes(e)}).forEach(function(e){return n.U9(e)})},e.prototype.prepareLicense=function(e){return this.V9(e),this.T9(e)},e.prototype.getCDMData=function(){return null},e.prototype.getKeyUuidsFromInitData=function(e){return(0,h.parseKidsFromWidevinePssh)(e)},e.prototype.getIdentifierFromInitData=function(e){return e},e.prototype.getMediaKeySystemConfiguration=function(){var e,t=this.A8.mediaKeySystemConfig,n=null==(e=null==t?void 0:t.sessionTypes)?void 0:e.includes(d.MediaKeySystemConfig.SessionType.PersistentLicense),r={persistentState:d.MediaKeySystemConfig.PersistentState.Optional,sessionTypes:n?[d.MediaKeySystemConfig.SessionType.PersistentLicense]:[d.MediaKeySystemConfig.SessionType.Temporary]};return"object"==typeof t?i(i({},r),t):r},e.prototype.dispose=function(){this.A8=null,this.B8.dispose(),this.M9.clear()},e}()},4358:function(e,t,n){var i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},r=this&&this.__rest||function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&0>t.indexOf(i)&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)0>t.indexOf(i[r])&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(n[i[r]]=e[i[r]])}return n};Object.defineProperty(t,"__esModule",{value:!0}),t.getInitialLicenseState=void 0,t.addLicense=function(e){return(0,o.createAction)(a.LicenseActionType.AddLicense,e)},t.updateLicense=function(e){return(0,o.createAction)(a.LicenseActionType.UpdateLicense,e)},t.removeLicense=function(e){return(0,o.createAction)(a.LicenseActionType.RemoveLicense,e)},t.resetLicense=function(e){return(0,o.createAction)(a.LicenseActionType.ResetLicense,e)},t.resetLicenses=function(){return(0,o.createAction)(a.LicenseActionType.ResetLicenses)},t.clearLicenseStorage=function(){return(0,o.createAction)(a.LicenseActionType.ClearLicenseStorage)},t.initializeLicenseStorage=function(e){return(0,o.createAction)(a.LicenseActionType.InitializeLicenseStorage,{storageHandler:e})},t.setPersistentState=function(e){return(0,o.createAction)(a.LicenseActionType.SetPersistentState,e)},t.setMediaKeyStatus=function(e,t,n,i){return(0,o.createAction)(a.LicenseActionType.SetMediaKeyStatus,{keySystemKind:e,keyUuid:t,status:n,initDataStr:i})},t.loadLicences=c,t.maybeStoreLicences=function(e,t){e&&((0,s.clearTimeoutIfDefined)(l),l=window.setTimeout(function(){try{var n=e.drmData,o={};
1Object.keys(n).forEach(function(e){o[e]={},Object.entries(n[e]).forEach(function(t){var n=t[0],s=t[1],u=void 0===s?{}:s,l=(u.license,u.initData,r(u,["license","initData"]));delete l.publicId,o[e][n]=i(i({},l),{hasLicense:!1,isPending:!1,wasRequested:!1,mediaKeyStatus:a.MediaKeyStatus.Unknown})})});var s=JSON.stringify(i(i({},e),{drmData:o}));t.set(u,s)}catch(e){}}))},t.getLicenseInfoKey=function(e){return btoa(e)};var o=n(35267),s=n(88844),a=n(56068),u="bitmovinplayer_licenseStorage",l=-1;function c(e){try{var t=e.get(u);return JSON.parse(t)||{}}catch(e){return{}}}t.getInitialLicenseState=function(e){var t=c(e);return i({inPersistentState:!1,drmData:{}},t)}},91921:function(e,t,n){var i,r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.LicenseReducer=void 0;var o=n(33468),s=n(3793),a=n(4358),u=n(56068),l={drmData:{},inPersistentState:!1};function c(e,t,n){var i,o=(0,a.getLicenseInfoKey)(t),s=r(r({},e),{drmData:r({},e.drmData)});return n&&(e.drmData[n]?s.drmData[n]=r(r({},e.drmData[n]),((i={})[o]=r({},e.drmData[n][o]),i)):s.drmData[n]={}),s}function d(e,t){var n,i=t.initDataStr,o=t.licenseInfo,s=t.systemName,u=c(e,i,s),l=(0,a.getLicenseInfoKey)(i),d=e.drmData[s]&&e.drmData[s][l]||{};return u.drmData[s]=r(r({},e.drmData[s]),((n={})[l]=r(r({},d),o),n)),u}t.LicenseReducer=(0,s.default)(l,((i={})[u.LicenseActionType.AddLicense]=function(e,t){return d(e,t.payload)},i[u.LicenseActionType.UpdateLicense]=function(e,t){return d(e,t.payload)},i[u.LicenseActionType.RemoveLicense]=function(e,t){var n,i,r;return n=t.payload.initDataStr,i=null,r=(0,a.getLicenseInfoKey)(n),Ob
1ject.keys(e.drmData).forEach(function(t){if(t){var s=(i=c(i||e,n,o.KeySystemKind[t])).drmData[t];i.drmData[t]=s?Object.keys(s).filter(function(e){return r!==e}).reduce(function(e,t){return e[t]=s[t],e},{}):{}}}),i||e},i[u.LicenseActionType.ResetLicense]=function(e,t){return d(e,t.payload)},i[u.LicenseActionType.ResetLicenses]=function(e){var t;return t={},Object.keys(e.drmData).forEach(function(n){n&&(t[n]={},Object.entries(e.drmData[n]).forEach(function(e){var i=e[0],o=e[1];t[n][i]=r(r({},o),{keyIds:[],license:null,hasLicense:!1,isPending:!1,wasRequested:!1,initData:null,usedByPlayerId:void 0})}))}),{inPersistentState:e.inPersistentState,drmData:t}},i[u.LicenseActionType.SetPersistentState]=function(e,t){var n=t.payload;return r(r({},e),{inPersistentState:n})},i[u.LicenseActionType.ClearLicenseStorage]=function(){return l},i[u.LicenseActionType.InitializeLicenseStorage]=function(e,t){var n=t.payload;return(0,a.getInitialLicenseState)(n.storageHandler)},i[u.LicenseActionType.SetMediaKeyStatus]=function(e,t){var n,i=t.payload,o=i.keySystemKind,s=i.keyUuid,a=i.status,u=i.initDataStr,l=e.drmData[o];if(!(null==l?void 0:l[u]))return e;var c=r({},l),d=c[u];return d.keyIds.includes(s)&&(c[u]=r(r({},d),{mediaKeyStatus:a})),r(r({},e),{drmData:r(r({},e.drmData),((n={})[o]=c,n))})},i))},55327:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.getLicenseState=void 0,t.verifyKeysAreUsableOrPendingOnAnyLicense=function(e,t,n){var r=(0,i.getAllLicensesForKeySystem)(t,n).flatMap(function(e){return e.keyIds});return e.filter(function(e){return r.includes(e)}).map(function(e){return(0,i.hasMatchingLicenseInfoForKeySystem)(e,(0,i.getKeySystemMap)(n,t),i.isMediaKeyStatusUnknownOrPendingOrUsable)}).every(function(e){return!0===e})};var i=n(58857);t.getLicenseState=function(e){return e.drmLicenses}},56068:function(e,t){var n,i,r,o;Object.defineProperty(t,"__esModule",{value:!0}),t.MediaKeyStatus=t.LicenseActionType=void 0,(r=n||(t.LicenseActionType=n={})).AddLicense="@instance/license/add",r.UpdateLicense="@instance/license/update",r.RemoveLicense="@instance/license/remove",r.ResetLicense="@instance/license/reset",r.ResetLicenses="@instance/license/reset-all",r.SetMediaKeyStatus="@instance/license/setMediaKeyStatus",r.SetPersistentState="@instance/license/setPersistentState",r.ClearLicenseStorage="@instance/license/clearLicenseStorage",r.InitializeLicenseStorage="@instance/license/initializeLicenseStorage",(o=i||(t.MediaKeyStatus=i={})).Unknown="unknown",o.Usable="usable",o.Expired="expired",o.Released="released",o.Pending="status-pending",o.OutputRestricted="output-restricted",o.OutputDownscaled="output-downscaled",o.InternalError="internal-error"},78763:function(e,t,n){var i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},r=this&&this.__spreadArray||function(e,t,n){if(n||2==arguments.length)for(var i,r=0,o=t.length;r<o;r++)!i&&r in t||(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.DRMDetectorService=void 0;var o=n(33468),s=n(74853),a=n(15487),u=n(35987),l=n(24273);function c(e){return e.filter(function(e){var t;return null==(t=e.contentType)?void 0:t.includes("ac-3")})}function d(e){return c(e).length>0&&(0,a.isTizen)()&&(0,a.getTizenVersion)().major>=a.TIZEN_2018_MAJOR_VERSION}t.DRMDetectorService=function(){function e(){this.ao=new l.EMEWrapper}return e.prototype.isSupported=function(e){return this.ao?this.ao.isSupported(e):Promise.reject("No supported EME available")},e.prototype.getSupported=function(){var e=this,t=Object.keys(o.KeySystemMap).flatMap(function(e){return o.KeySystemMap[e]});return(0,u.allSettledPromises)(t.map(function(t){return e.isSupported(t).catch(function(){return""})})).then(function(e){return e.filter(function(e){return e})})},e.prototype.getSupportedCapabilities=function(e,t,n){var o;if(d(t)){var a=c(t).map(function(e){return i(i({},e),{contentType:e.contentType.replace("ac-3","ec-3")})});a=a.filter(function(e){return!(0,s.contains)(t,e)}),o=r(r([],t,!0),a,!0)}else o=t;return this.ao.getSupportedCapabilities(e,o,n).then(function(e){if(d(t)){var n,o;o=(n=e.audioCapabilities).filter(function(e){var t;return null==(t=e.contentType)?void 0:t.includes("ec-3")}).map(function(e){return i(i({},e),{contentType:e.contentType.replace("ec-3","ac-3")})}).filter(function(e){return!(0,s.contains)(n,e)}),e.audioCapabilities=r(r([],n,!0),o,!0),e.audioCapabilities=e.audioCapabilities.filter(function(e){return(0,s.contains)(t,e,function(e,t){return e.contentType===t.contentType})})}return e})},e.prototype.dispose=function(){this.ao.dispose()},e}()}
1,24273:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.EMEWrapper=void 0;var i=n(57387),r=n(84568),o="DOMException: Unsupported keySystem",s=[{initDataTypes:["cenc"],audioCapabilities:[{contentType:'audio/mp4;codecs="mp4a.40.2"'}],videoCapabilities:[{contentType:'video/mp4;codecs="avc1.4d401e"'}]},{initDataTypes:["cenc"],videoCapabilities:void 0,audioCapabilities:void 0}];t.EMEWrapper=function(){function e(){this.UQ=document.createElement("video"),this.VQ=(0,r.memoize)(this.aQ.bind(this),function(e,t,n){return String((0,i.calcHash)(JSON.stringify({keySystem:e,audioCapabilities:t,videoCapabilities:n})))})}return e.prototype.isSupported=function(e){var t;return"function"==typeof window.WebKitMediaKeys?this.WQ(e):"function"==typeof window.navigator.requestMediaKeySystemAccess?this.XQ(e).then(function(e){return e.keySystem}):"function"==typeof window.MSMediaKeys?this.YQ(e):"function"==typeof(null==(t=this.UQ)?void 0:t.webkitGenerateKeyRequest)?this.ZQ(e):Promise.reject(o)},e.prototype.WQ=function(e){var t,n;return(null==(n=(t=window.WebKitMediaKeys).isTypeSupported)?void 0:n.call(t,e))?Promise.resolve(e):Promise.reject(o)},e.prototype.XQ=function(e,t){void 0===t&&(t=s);try{return window.navigator.requestMediaKeySystemAccess(e,t)}catch(e){return Promise.reject(e)}},e.prototype.YQ=function(e){var t,n;return(null==(n=(t=window.MSMediaKeys).isTypeSupported)?void 0:n.call(t,e))?Promise.resolve(e):Promise.reject(o)},e.prototype.ZQ=function(e){var t;return(null==(t=this.UQ)?void 0:t.canPlayType("video/mp4",e))?Promise.resolve(e):Promise.reject(o)},e.prototype.getSupportedCapabilities=function(e,t,n){return this.VQ(e,t,n)},e.prototype.aQ=function(e,t,n){return"function"==typeof window.navigator.requestMediaKeySystemAccess?window.navigator.requestMediaKeySystemAccess(e,[{initDataTypes:["cenc"],audioCapabilities:t,videoCapabilities:n},{initDataTypes:["cenc"],videoCapabilities:void 0,audioCapabilities:void 0}]).then(function(e){var i,r,o=e.getConfiguration();return{audioCapabilities:null!=(i=null==o?void 0:o.audioCapabilities)?i:t,videoCapabilities:null!=(r=null==o?void 0:o.videoCapabilities)?r:n}}).catch(function(){return{audioCapabilities:t,videoCapabilities:n}}):Promise.resolve({audioCapabilities:t,videoCapabilities:n})},e.prototype.dispose=function(){this.UQ=null,this.VQ.invalidate()},e}()},84344:function(e,t,n){var i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},r=this&&this.__spreadArray||function(e,t,n){if(n||2==arguments.length)for(var i,r=0,o=t.length;r<o;r++)!i&&r in t||(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.mergeKeySystemPriorities=t.resolveDRMSystem=t.instantiateDRMSystem=void 0,t.resolveUsedDRMSystem=S;var o=n(80813),s=n(33468),a=n(70962),u=n(67579),l=n(92656),c=n(25271),d=n(31884),p=n(81982),h=n(99921),f=n(30665),g=function(e,t){var n,o,u,l,c=function(e){return"number"==typeof e&&e!==1/0&&e!==-1/0&&!isNaN(e)},d=Object.keys(t).filter(function(n){return!!t[n]&&n in e}).reduce(function(e,n){return e[n]=i(i({},t[n]),{licenseRequestRetryDelay:c(t[n].licenseRequestRetryDelay)?Math.max(0,t[n].licenseRequestRetryDelay):a.DefaultSettings.DRM_RETRY_DELAY,maxLicenseRequestRetries:c(t[n].maxLicenseRequestRetries)?Math.floor(Math.max(0,t[n].maxLicenseRequestRetries)):a.DefaultSettings.DRM_MAX_RETRIES,withCredentials:"boolean"==typeof t[n].withCredentials?t[n].withCredentials:a.DefaultSettings.DRM_WITH_CREDENTIALS}),e},Object.create(null)),p=(n=t.preferredKeySystems,o=[s.KeySystemKind.FAIRPLAY,s.KeySystemKind.PLAYREADY,s.KeySystemKind.PRIMETIME,s.KeySystemKind.WIDEVINE,s.KeySystemKind.TVKEY],u=(Array.isArray(n)?n.filter(function(e){return o.includes(e)}):[]).reduce(function(e,t){return e.includes(t)||e.push(t),e},[]),l=[s.KeySystemKind.PLAYREADY,s.KeySystemKind.FAIRPLAY,s.KeySystemKind.TVKEY,s.KeySystemKind.WIDEVINE,s.KeySystemKind.PRIMETIME].filter(function(e){return!u.includes(e)}),r(r([],u,!0),l,!0));return i(i({},d),{preferredKeySystems:p})},v=function(e,t){var n=Object.keys(e).flatMap(function(t){return e[t].map(function(e){return{kind:t,uid:e}})});return t.flatMap(function(e){var t=e.kind;return n.map(function(e){return{emeHandler:{kind:t},keySystem:e}})})},y=function(e,t){var n,i,r,o=(0,f.or)(function(e){return e.keySystem.kind===s.KeySystemKind.FAIRPLAY},function(e){return!!t.playready&&!!t.playready.customData&&e.keySystem.kind===s.KeySystemKind.PLAYREADY&&e.emeHandler.kind===h.EMEHandlerKind.UNPREFIXED}),a=(0,f.or)(function(e){return!!t.playready&&e.keySystem.kind===s.KeySystemKind.PLAYREADY},function(e){return!!t.primetime&&e.keySystem.kind===s.KeySystemKind.PRIMETIME}
1,function(e){return!!t.widevine&&e.keySystem.kind===s.KeySystemKind.WIDEVINE},function(e){return!!t.tvkey&&e.keySystem.kind===s.KeySystemKind.TVKEY}),l=e.filter((0,f.and)((0,f.not)(o),a));return(null==(r=null==(i=null==(n=t.playready)?void 0:n.mediaKeySystemConfig)?void 0:i.sessionTypes)?void 0:r.includes(u.MediaKeySystemConfig.SessionType.PersistentLicense))?l.filter(function(e){return e.keySystem.uid!==s.KeySystemMap[s.KeySystemKind.PLAYREADY][1]}):l},m=function(e,t){var n=function(e,t){return t.weight-e.weight},i=function(e){return e.wrapped},r=function(e,t){return function(n){var i=t(n),r=e.findIndex(function(e){return e===i});return{weight:-1!==r?e.length-r:r,wrapped:n}}},o=r([h.EMEHandlerKind.WEBOS_2017_UNPREFIXED,h.EMEHandlerKind.WEBOS_UNPREFIXED,h.EMEHandlerKind.WEBOS_WEBKIT_PREFIXED,h.EMEHandlerKind.PLAYSTATION_4,h.EMEHandlerKind.UNPREFIXED,h.EMEHandlerKind.TIZEN,h.EMEHandlerKind.WEBKIT_PREFIXED,h.EMEHandlerKind.MS_PREFIXED],function(e){return e.emeHandler.kind}),s=r(e,function(e){return e.keySystem.kind});return t.map(s).sort(n).map(i).reduce(function(e,t){var n=e[e.length-1];return void 0!==n&&n[n.length-1].keySystem.kind===t.keySystem.kind?n.push(t):e.push([t]),e},[]).flatMap(function(e){return e.map(o).sort(n).map(i)})},b=function(e,t,n){switch(e){case s.KeySystemKind.FAIRPLAY:throw Error("Can not create Fairplay instance");case s.KeySystemKind.PLAYREADY:return new l.PlayReady(n,t.playready);case s.KeySystemKind.PRIMETIME:return new c.PrimeTime(n,t.primetime);case s.KeySystemKind.WIDEVINE:return new p.Widevine(n,t.widevine);case s.KeySystemKind.TVKEY:return new d.TVKey(n,t.tvkey);default:throw Error("Could not create KeySystem ".concat(e))}};function S(e,n,i){i.logger.debug("Resolving DRM key system...",{keySystemMap:e,config:n});var r=g(e,n),o=(0,h.allEMEHandlers)(i).filter(function(e){return e.isAvailable}),a=y(v((0,t.mergeKeySystemPriorities)(e,n),o),r),u=m(r.preferredKeySystems,a),l=function(e){if(0===e.length){var t=Object.keys(n).filter(function(e){return Object.values(s.KeySystemKind).includes(e)}).join(", ");return Promise.reject("Unable to find a valid DRM key system! The provided DRM key system configurations [".concat(t,"] are not supported."))}var r=e[0],a=e.slice(1);i.logger.debug("Checking support for DRM key system",JSON.stringify(r));var u=o.find(function(e){return e.kind===r.emeHandler.kind});return u?u.isSupported(r.keySystem.uid).then(function(){return r}).catch(function(){return l(a)}):l(a)};return l(u)}t.instantiateDRMSystem=function(e,t,n){return i(i({},e),{config:t,emeHandler:i(i({},e.emeHandler),{instance:(0,h.createEMEHandlerInstance)(e.emeHandler.kind,n)}),keySystem:i(i({},e.keySystem),{instance:b(e.keySystem.kind,t,n)})})},t.resolveDRMSystem=function(e,n,i){var r=g(e,n),a=i.serviceManager.get(o.ServiceName.DrmService);return(a?a.getResolvedKeySystemFromSourceConfig():Promise.resolve(null)).then(function(o){return o&&0===Object.values(s.KeySystemKind).filter(function(e){return!(e in o.config)&&e in r}).length?(0,t.instantiateDRMSystem)(o,r,i):S(e,n,i).then(function(e){return(0,t.instantiateDRMSystem)(e,r,i)})})},t.mergeKeySystemPriorities=function(e,t){for(var n,i,r={fairplay:[],playready:[],primetime:[],widevine:[],tvkey:[]},o=function(e,o){if(!e||!Object.values(s.KeySystemKind).some(function(t){return t===e}))return"continue";var a=null!=(i=null==(n=null==t?void 0:t[e])?void 0:n.keySystemPriority)?i:[];r[e]=a;var u=o.filter(function(e){return!a.includes(e)});r[e]=r[e].concat(u)},a=0,u=Object.entries(e);a<u.length;a++){var l=u[a];o(l[0],l[1])}return r}},99921:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.createEMEHandlerInstance=t.allEMEHandlers=t.EMEHandlerKind=void 0;var i,r,o=n(21513),s=n(15487),a=n(88052),u=n(62756),l=n(86558),c=n(70581),d=n(80680);(i=r||(t.EMEHandlerKind=r={})).MS_PREFIXED="MS_PREFIXED",i.WEBOS_UNPREFIXED="WEBOS_UNPREFIXED",i.WEBOS_WEBKIT_PREFIXED="WEBOS_WEBKIT_PREFIXED",i.WEBOS_2017_UNPREFIXED="WEBOS_2017_UNPREFIXED",i.UNPREFIXED="UNPREFIXED",i.PLAYSTATION_4="PLAYSTATION_4",i.TIZEN="TIZEN",i.WEBKIT_PREFIXED="WEBKIT_PREFIXED";var p=function(e){return(0,c.isUnprefixedEmeHandlerSupported)(e)},h=function(e){return(0,l.isMsPrefixedEmeHandlerSupported)(e)},f=function(e){return function(t){return(0,d.isWebkitPrefixedEmeHandlerSupported)(e.videoElement,t)}};t.allEMEHandlers=function(e){return[{kind:r.UNPREFIXED,isAvailable:!0,isSupported:p},{kind:r.WEBOS_UNPREFIXED,isAvailable:(0,o.getCapabilities)().isWebOS&&a.ModuleManager.has(u.ModuleName.Webos),isSupported:p},{kind:r.WEBOS_2017_UNPREFIXED,isAvailable:(0,o.getCapabilities)().isWebOS&&(0,s.isWebOs2017)()&&a.ModuleManager.has(u.ModuleName.Webos),isSupported:p},{kind:r.WEBOS_WEBKIT_PREFIXED,isAvailable:(0,o.getCapabilities)().isWebOS&&a.ModuleManager.has(u.ModuleName.Webos),isSupported:f(e)},{kind:r.MS_PREFIXED,isAvailable:!0,isSupported:h},{kind:r.PLAYSTATION_4,isAvailable:(0,o.getCapabilities)().isPlayStation4&&a.ModuleManager.has(u.ModuleName.PlayStation4),isSupported:p},{kind:r.TIZEN,isAvailable:(0,o.getCapabilities)().isTizen&&a.ModuleManager.has(u.ModuleName.Tizen),isSupported:f(e)},{kind:r.WEBKIT_PREFIXED,isAvailable:!0,isSupported:f(e)}]},t.createEMEHandlerInstance=function(e,t){switch(e){case r.MS_PREFIXED:return new l.MSPrefixedEMEHandler(t);case r.WEBOS_UNPREFIXED:return new(a.ModuleManager.get(u.ModuleName.Webos).getWebosUnprefixedEmeHandlerConstructor())(t);case r.WEBOS_2017_UNPREFIXED:return new(a.ModuleManager.get(u.ModuleName.Webos).getWebos2017UnprefixedEmeHandlerConstructor())(t);case r.WEBOS_WEBKIT_PREFIXED:return new(a.ModuleManager.get(u.ModuleName.Webos).getWebosWebkitPrefixedEmeHandlerConstructor())(t);case r.TIZEN:return new(a.ModuleManager.get(u.ModuleName.Tizen).getTizenEMEHandlerConstructor())(t);case r.PLAYSTATION_4:return new(a.ModuleManager.get(u.ModuleName.PlayStation4).getPlayStation4EMEHandlerConstructor())(t);case r.UNPREFIXED:return new c.UnprefixedEMEHandler(t);
1case r.WEBKIT_PREFIXED:return new d.WebKitPrefixedEMEHandler(t);default:throw Error("Could not create EMEHandler")}}},30665:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.removeFromObject=t.memoOne=t.not=t.or=t.and=void 0,t.and=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return e.reduce(function(e,n){return e&&n.apply(void 0,t)},!0)}},t.or=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return e.reduce(function(e,n){return e||n.apply(void 0,t)},!1)}},t.not=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return!e.apply(void 0,t)}};var n=function(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0};t.memoOne=function(e,t){var i,r=null,o=void 0!==t?t:n;return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return null!==r&&o(t,r)||(i=e.apply(void 0,t),r=t),i}},t.removeFromObject=function(e,t){return Object.keys(e).filter(function(e){return!t.includes(e)}).reduce(function(t,n){return t[n]=e[n],t},Object.create(null))}},6234:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.parseInitData=function(e){if(!e||e.byteLength<r.ISOBMFFConstants.BOX_SIZE_LENGTH+r.ISOBMFFConstants.BOX_TYPE_LENGTH)return[];var t=0,n=e instanceof Uint8Array?e.buffer:e,a=new DataView(n),u=[];do{var l=a.getUint32(t),c=n.slice(t,t+l);t+=l;var d=function(e){var t={},n=new DataView(e),a=r.ISOBMFFConstants.BOX_SIZE_LENGTH,u=o.ArrayHelper.extractAsciiString(n,a,r.ISOBMFFConstants.BOX_TYPE_LENGTH);if(a+=r.ISOBMFFConstants.BOX_TYPE_LENGTH,"pssh"!==u)return null;var l=n.getUint8(a);a+=r.ISOBMFFConstants.FULL_BOX_VERSION_LENGTH+r.ISOBMFFConstants.FULL_BOX_FLAGS_LENGTH;var c=o.ArrayHelper.extractHexString(n,a,r.ISOBMFFConstants.PSSH_SYSTEM_ID_LENGTH);if(a+=r.ISOBMFFConstants.PSSH_SYSTEM_ID_LENGTH,t.systemIDraw=c,t.systemID="urn:uuid:".concat(s.FormatHelper.beautifyUUID(c)),i.DRMSchemeIDURIs.hasOwnProperty(t.systemID)&&(t.systemName=i.DRMSchemeIDURIs[t.systemID]),l>0){var d=n.getUint32(a);a+=r.ISOBMFFConstants.PSSH_KID_COUNT_LENGTH,t.kid=[];for(var p=0;p<d;p++)t.kid.push(o.ArrayHelper.extractHexString(n,a,r.ISOBMFFConstants.PSSH_KID_LEN)),a+=r.ISOBMFFConstants.PSSH_KID_LEN}return t.initData=e,t.initDataStr=o.ArrayHelper.arrayBufferToAsciiString(e,!0),t}(c);d&&u.push(d)}while(t<e.byteLength);return u};var i=n(25811),r=n(51682),o=n(74853),s=n(70233)},35987:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.allSettledPromises=function(e){if(!e||!Array.isArray(e))return Promise.reject("The passed argument is not an array");var t=[],n=e.length>0,i=Promise.resolve(null);return e.forEach(function(e,r){i=i.then(function(){return e}).then(function(e){t[r]=e,n=!1}).catch(function(){t[r]=void 0})}),i.then(function(){return n?Promise.reject(t):t})}},49988:function(e,t){var n,i,r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.ProtoBufWireType=void 0,t.parseProtoBufMessage=function(e){for(var t=u(e)?new Uint8Array(e).buffer:e,i=[],l=new o(t);l.hasNext();){var c=function(e){var t=s(e);if(void 0!==t)return{wireType:7&t,fieldNumber:t>>3}}(l);if(!c)break;var d=function(e,t){switch(e.wireType){case n.VarInt:return r(r({},e),{value:s(t)});case n.Bit64:return r(r({},e),{value:a(t,8)});case n.LengthLimited:var i=s(t);if(!i)return;return r(r({},e),{value:a(t,i)});case n.Bit32:return r(r({},e),{value:a(t,4)});case n.StartGroup:case n.EndGroup:default:return}}(c,l);d&&i.push(d)}return i},t.getFieldsByFieldNumber=function(e,t){return e.filter(function(e){return e.fieldNumber===t})},t.findFieldByFieldNumber=function(e,t){return e.find(function(e){return e.fieldNumber===t})},t.isLengthLimitedProtoBufField=function(e){return void 0!==e&&e.wireType===n.LengthLimited&&u(e.value)},(i=n||(t.ProtoBufWireType=n={}))[i.VarInt=0]="VarInt",i[i.Bit64=1]="Bit64",i[i.LengthLimited=2]="LengthLimited",i[i.StartGroup=3]="StartGroup",i[i.EndGroup=4]="EndGroup",i[i.Bit32=5]="Bit32";var o=function(){function e(e){this.pib=0,this.qib=new Uint8Array(e)}return e.prototype.hasNext=function(){return this.pib<this.qib.byteLength},e.prototype.getNext=function(){if(this.hasNext()){var e=this.qib[this.pib];return this.pib++,e}},e.prototype.reset=function(){this.pib=0},e}();function s(e){var t,n=[];do{if(void 0===(t=e.getNext()))break;n.push(127&t)}while(128&t);return n.reduce(function(e,t,n){return e+(t<<7*n)},0)}function a(e,t){for(var n=[],i=0;i<t;i++){var r=e.getNext();if(void 0===r)break;n.push(r)}return n}function u(e){return Array.isArray(e)&&e.every(function(e){return"number"==typeof e})}},92378:function(e,t,n){var i=this&&this.__spreadArray||function(e,t,n){if(n||2==arguments.length)for(var i,r=0,o=t.length;r<o;r++)!i&&r in t||(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))};
1Object.defineProperty(t,"__esModule",{value:!0}),t.parseKidsFromTVKeyPssh=function(e,t){try{var n=(0,u.parseInitData)(e).flatMap(function(e){var n,s,a;return s=null!=(n=e.kid)?n:[],a=function(e,t){var n=e.initData,i=new DataView(n),s=function(e){var t=new DataView(e),n=r.ISOBMFFConstants.BOX_SIZE_LENGTH+r.ISOBMFFConstants.BOX_TYPE_LENGTH+r.ISOBMFFConstants.FULL_BOX_VERSION_LENGTH+r.ISOBMFFConstants.FULL_BOX_FLAGS_LENGTH+r.ISOBMFFConstants.PSSH_SYSTEM_ID_LENGTH;if(t.getUint8(r.ISOBMFFConstants.BOX_SIZE_LENGTH+r.ISOBMFFConstants.BOX_TYPE_LENGTH)>0){var i=t.getUint32(n);n+=r.ISOBMFFConstants.PSSH_KID_COUNT_LENGTH+i*r.ISOBMFFConstants.PSSH_KID_LEN}return n}(n),a=i.getUint32(s),u=s+r.ISOBMFFConstants.PSSH_DATA_SIZE;if(a<=0||u+a>n.byteLength)return t.debug("Invalid Nagra data size"),[];var l=new Uint8Array(n,u,a),c=o.ArrayHelper.convertBufferSourceToUTF8(l),d=JSON.parse(atob(c));return"string"==typeof d.keyId?[d.keyId]:[]}(e,t),i(i([],s,!0),a,!0)}).map(l);return(0,a.removeDuplicates)(n)}catch(e){return t.debug("Failed to parse key IDs from TVKey PSSH data:",e),[]}};var r=n(51682),o=n(74853),s=n(70233),a=n(70850),u=n(6234),l=function(e){return e.includes("-")?e:s.FormatHelper.beautifyUUID(e)}},51063:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.parseWidevineLicenseRequestProtoBuf=function(e){var t=_(e,o.LicenseRequest);if(t){var n=(0,l.findFieldByFieldNumber)(t,c);if((0,l.isLengthLimitedProtoBufField)(n)){var i=(0,l.parseProtoBufMessage)(n.value),r=(0,l.findFieldByFieldNumber)(i,d);if((0,l.isLengthLimitedProtoBufField)(r)){var s=(0,l.parseProtoBufMessage)(r.value),u=(0,l.findFieldByFieldNumber)(s,p),f=(0,l.findFieldByFieldNumber)(s,h);if((0,l.isLengthLimitedProtoBufField)(f)&&(0,l.isLengthLimitedProtoBufField)(u)){var g=a.ArrayHelper.arrayBufferToBase64(new Uint8Array(f.value).buffer),v=T((0,l.parseProtoBufMessage)(u.value));if(v)return{requestId:g,requestedKeyIds:v}}}}}},t.parseWidevineLicenseResponseProtoBuf=function(e){var t=_(e,o.License);if(t){var n=(0,l.findFieldByFieldNumber)(t,f);if((0,l.isLengthLimitedProtoBufField)(n)){var i=(0,l.parseProtoBufMessage)(n.value),r=(0,l.findFieldByFieldNumber)(i,g);if((0,l.isLengthLimitedProtoBufField)(r)){var s=a.ArrayHelper.arrayBufferToBase64(new Uint8Array(r.value).buffer),c=(0,l.getFieldsByFieldNumber)(t,v).filter(l.isLengthLimitedProtoBufField).map(function(e){return(0,l.parseProtoBufMessage)(e.value)}).filter(E);if(0!==c.length){var d=function(e){for(var t=[],n=0;n<e.length;n++){var i=e[n],r=(0,l.findFieldByFieldNumber)(i,y);if(!(0,l.isLengthLimitedProtoBufField)(r))return;t.push(u.FormatHelper.bytesToUUID(new Uint8Array(r.value).buffer))}return t}(c);if(d&&d.every(function(e){return"string"==typeof e}))return{requestId:s,returnedKeyIds:d}}}}}},t.parseKidsFromWidevinePssh=function(e){var t=function(e){var t=new DataView(e.buffer);if(!(t.byteLength<=b)){if(1===t.getUint8(b)&&t.byteLength>m){var n=t.getUint32(m);return e.buffer.slice(28+n*S)}return e.buffer.slice(28)}}(new Uint8Array(e));if(!t)return[];var n=T((0,l.parseProtoBufMessage)(t));return null!=n?n:[]};var i,r,o,s,a=n(74853),u=n(70233),l=n(49988),c=2,d=1,p=1,h=3,f=1,g=1,v=3,y=1,m=27,b=8,S=16;function E(e){var t=(0,l.findFieldByFieldNumber)(e,4);return(null==t?void 0:t.value)===s.Content}function _(e,t){var n=(0,l.parseProtoBufMessage)(e);if(function(e){var t=(0,l.findFieldByFieldNumber)(e,1);if("number"==typeof(null==t?void 0:t.value))return null==t?void 0:t.value}(n)===t){var i=(0,l.findFieldByFieldNumber)(n,2);return(0,l.isLengthLimitedProtoBufField)(i)?(0,l.parseProtoBufMessage)(i.value):void 0}}function T(e){var t=(0,l.getFieldsByFieldNumber)(e,2).filter(l.isLengthLimitedProtoBufField).filter(function(e){return e.value.length===S||32===e.value.length}).map(function(e){return 32===e.value.length?u.FormatHelper.beautifyUUID(String.fromCodePoint.apply(null,e.value)):u.FormatHelper.bytesToUUID(new Uint8Array(e.value).buffer)});return t.length>0?t:void 0}(i=o||(o={}))[i.LicenseRequest=1]="LicenseRequest",i[i.License=2]="License",(r=s||(s={}))[r.Content=2]="Content"}},function(e){return e(e.s=47272)}])}()},72177:function(e,t,n){"use strict";
1var i,r=this&&this.__extends||(i=function(e,t){return(i=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])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.SubtitleSettingSelectBox=void 0,t.SubtitleSettingSelectBox=function(e){function t(t){var n=e.call(this,t)||this;return n.overlay=t.overlay,n}return r(t,e),t.prototype.toggleOverlayClass=function(e){this.currentCssClass&&(this.overlay.getDomElement().removeClass(this.currentCssClass),this.currentCssClass=null),e&&(this.currentCssClass=this.prefixCss(e),this.overlay.getDomElement().addClass(this.currentCssClass))},t.prototype.configure=function(e,t){this.settingsManager=t.getSubtitleSettingsManager()},t}(n(46419).SelectBox)},72319:function(e,t,n){"use strict";var i,r=this&&this.__extends||(i=function(e,t){return(i=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])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__assign||function(){return(o=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.SubtitleSelectBox=void 0;var s=n(46419),a=n(69330),u=n(24379);t.SubtitleSelectBox=function(e){function t(t){void 0===t&&(t={});var n=e.call(this,t)||this,i=t.comparator?function(e,n){return e.key===a.SubtitleSwitchHandler.SUBTITLES_OFF_KEY&&n.key===a.SubtitleSwitchHandler.SUBTITLES_OFF_KEY?0:e.key===a.SubtitleSwitchHandler.SUBTITLES_OFF_KEY?-1:n.key===a.SubtitleSwitchHandler.SUBTITLES_OFF_KEY?1:t.comparator(e,n)}:void 0;return n.config=n.mergeConfig(o(o({},t),{comparator:i}),{cssClasses:["ui-subtitleselectbox"],ariaLabel:u.i18n.getLocalizer("subtitle.select")},n.config),n}return r(t,e),t.prototype.configure=function(t,n){e.prototype.configure.call(this,t,n),new a.SubtitleSwitchHandler(t,this,n)},t}(s.SelectBox)},73400:(e,t)=>{"use strict";var n,i;Object.defineProperty(t,"__esModule",{value:!0}),t.TimestampLinkUtils=void 0,(i=n||(t.TimestampLinkUtils=n={})).parseTimestampFromUrl=function(e){void 0===e&&(e=window.location.href);var t,n=new URL(e),i=null!=(t=n.searchParams.get("t"))?t:new URLSearchParams(n.hash.substring(1)).get("t"),r=null==i?void 0:i.match(/^([0-9]+(?:\.[0-9]+)?)s?$/);if(!r)return null;var o=parseFloat(r[1]);return isFinite(o)&&o>=0?o:null},i.buildTimestampLink=function(e,t){void 0===t&&(t=window.location.href);var n=new URL(t),i=Math.max(0,Math.floor(e||0));return n.searchParams.delete("t"),n.searchParams.set("t","".concat(i,"s")),n.toString()}},74519:function(e,t,n){"use strict";var i,r=this&&this.__extends||(i=function(e,t){return(i=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])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.PersistentPreferencesToggleButton=void 0;var o=n(67598),s=n(24379);t.PersistentPreferencesToggleButton=function(e){function t(t){void 0===t&&(t={});var n=e.call(this,t)||this;return n.config=n.mergeConfig(t,{text:s.i18n.getLocalizer("persistentPreferences"),cssClass:"ui-persistentpreferencestogglebutton",ariaLabel:s.i18n.getLocalizer("persistentPreferences")},n.config),n}return r(t,e),t.prototype.configure=function(t,n){var i=this;e.prototype.configure.call(this,t,n);var r=n.getUIPreferencesManager();r.isEnabled()&&this.on(),this.onClick.subscribe(function(){i.toggle()}),this.onToggleOn.subscribe(function(){r.setEnabled(!0)}),this.onToggleOff.subscribe(function(){r.setEnabled(!1)})},t}(o.ToggleButton)},75343:(e,t)=>
1{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.GroupPlaybackSuspensionReason=void 0,(n||(t.GroupPlaybackSuspensionReason=n={})).UserIsScrubbing="userIsScrubbing"},75387:function(e,t,n){"use strict";var i,r=this&&this.__extends||(i=function(e,t){return(i=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])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.SettingsPanelPageBackButton=void 0;var o=n(22505),s=n(24379),a=n(94474);t.SettingsPanelPageBackButton=function(e){function t(t){var n=e.call(this,t)||this;return n.config=n.mergeConfig(t,{cssClass:"ui-settingspanelpagebackbutton",text:s.i18n.getLocalizer("back"),buttonStyle:a.ButtonStyle.TextWithLeadingIcon},n.config),n}return r(t,e),t.prototype.configure=function(t,n){var i=this;e.prototype.configure.call(this,t,n),this.onClick.subscribe(function(){i.popPage()})},t}(o.SettingsPanelPageNavigatorButton)},76490:e=>{!function(){"use strict";self,e.exports=(self.webpackChunkbitmovin_player=self.webpackChunkbitmovin_player||[]).push([[367],{96693:function(e,t,n){var i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.isInitializationStringNode=function(e){return(0,r.isObject)(e)&&null!=e._initialization},t.isInitializationNode=function(e){return(0,r.isObject)(e)&&Array.isArray(e.Initialization)&&e.Initialization.length>0},t.isIndexRangeNode=function(e){return(0,r.isObject)(e)&&null!=e._indexRange},t.provideSegmentInfoFromInitializationProperty=function(e,t){var n=(0,a.default)(e._initialization,t),r=o.URLHelper.concatBaseUrlWithPartial(u(t),n);return i(i({},(0,s.createInitSegmentInfoBase)(t)),{url:r,mediaURL:n})},t.extractBaseUrlFromRepresentation=u,t.provideSegmentInfoFromInitializationNodeProperty=function(e,t){var n,r,a,l=e.Initialization[0],c=l._sourceURL?l._sourceURL:u(t),d=o.URLHelper.concatBaseUrlWithPartial(u(t),c),p=(a=null!=(r=null==(n=l._range)?void 0:n.split("-").map(function(e){return parseInt(e)}))?r:[]).length>1?{start:a[0],end:a[1]}:null;return i(i({},(0,s.createInitSegmentInfoBase)(t)),{url:d,mediaURL:c,byteRange:p})},t.provideSegmentInfoFromIndexRangeProperty=function(e,t){var n=u(t),r={start:0,end:parseInt(e._indexRange.split("-")[0])-1};return i(i({},(0,s.createInitSegmentInfoBase)(t)),{url:n,mediaURL:n,byteRange:r})};var r=n(94685),o=n(58313),s=n(65439),a=n(4771);function u(e){return e.BaseURL?o.URLHelper.urlObjectToString(e.BaseURL[0]):""}},44908:function(e,t,n){var i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},r=this&&this.__spreadArray||function(e,t,n){if(n||2==arguments.length)for(var i,r=0,o=t.length;r<o;r++)!i&&r in t||(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.MPDLoader=void 0;var o=n(40306),s=n(3336),a=n(80813),u=n(3714),l=n(4129),c=n(85625),d=n(77401),p=n(57456),h=n(29669),f=n(91678),g=n(33436),v=n(89927),y=n(58313),m=n(78340);function b(e){return{url:e.url,statusCode:e.status,statusText:e.statusText}}function S(e){return"dynamic"===(null==e?void 0:e._type)}t.MPDLoader=function(){function e(e,t){var n=this;this.kk=0,this.sk=function(e){return e.body?n.tk(e):(n.ik.load(null,null).catch(function(){}),null)},this.uk=function(e,t){n.lk=function(e,t,n){if((null==t?void 0:t.name)===d.RequestError.Canceled)return null;if((null==t?void 0:t.name)===d.RequestError.TimedOut)return new s.PlayerError(o.ErrorCode.NETWORK_MANIFEST_DOW
1NLOAD_TIMEOUT,b(e),"Failed to load DASH manifest: the request timed out.",n);var i=(null==e?void 0:e.status)===XMLHttpRequest.UNSENT?"Failed to load the DASH manifest due to CORS restrictions or because the client is offline.":"Failed to load DASH manifest: ".concat(e.status," ").concat(e.statusText,".");return new s.PlayerError(o.ErrorCode.SOURCE_COULD_NOT_LOAD_MANIFEST,b(e),i,n)}(e,t,n.dk.sourceIdentifier)},this.ck=e,this.dk=t,this.jk=e.settings,this.fk=new m.MPDParser(e,t),this.ek=!1,this.mk=e.eventHandler,this.hk=[];var i={onFailure:this.uk,maxRetries:this.jk.MAX_MPD_RETRIES,requestType:h.HttpRequestType.MANIFEST_DASH,resetRetriesWhenOffline:!1};this.ik=new l.DefaultContentLoader(e,i)}return e.prototype.nk=function(e,t){if(this.ek)return null;var n=e.trim();return this.ok(n,t)},e.prototype.ok=function(e,t){var n,i=this.ck.serviceManager.get(a.ServiceName.ManifestCachingService),o=null!=(n=null==i?void 0:i.getParsedManifest(this.gk))?n:this.pk(e,t);return o?(S(o)||null==i||i.cacheParsedManifest(o,this.gk),this.hk=o.BaseURL?r(r([],o.Location,!0),o.BaseURL.map(function(e){return e.url}),!0):o.Location,this.gk=this.hk[0],o):null},e.prototype.pk=function(e,t){return this.fk.parse(e,this.gk,t)},e.prototype.qk=function(){this.ik&&this.ik.cancel(),this.ek=!0,this.gk=null},e.prototype.dispose=function(){this.qk(),this.ik.dispose(),this.fk&&(this.fk.dispose(),this.fk=null),this.jk=null},e.prototype.load=function(e){var t=this;this.gk=null!=e?e:this.gk;var n=this.gk;return this.lk=null,e&&(this.ek=!1),n?this.rk(n).then(function(e){return t.sk(e)}).then(function(e){return t.gk!==n&&t.hk.includes(t.gk)&&(t.ck.logger.debug("Switched manifest location to ".concat(t.gk)),t.ck.eventHandler.dispatchEvent(u.PlayerEvent.ContentLocationChanged,{sourceLocationId:n,targetLocationId:t.gk,reason:u.ContentLocationChangedReason.Failover})),e}).catch(function(e){return t.ek||(null==e?void 0:e.message)===d.RequestError.Canceled?Promise.reject():(t.ck.logger.debug("Error during loading: "+t.gk+": ",e),Promise.reject(e))}):(this.ck.eventHandler.fireError(new s.PlayerError(o.ErrorCode.SOURCE_INVALID,void 0,"Cannot load the manifest: no URL was provided.",this.dk.sourceIdentifier)),Promise.reject("No manifest url provided"))},e.prototype.rk=function(e){var t,n=this,i=this.ck.serviceManager.maybeCall(a.ServiceName.ManifestCachingService,function(t){return t.getHttpResponse(e)});if(i)return Promise.resolve(i);var r=null==(t=this.dk.source.options)?void 0:t.manifestWithCredentials;return this.ik.load(e,h.HttpRequestMethod.GET,null,null,null,r,c.ManifestMimeType.Dash).catch(function(e){return n.kk++,n.kk<n.hk.length?(n.gk=y.URLHelper.replaceCdn(n.gk,n.hk[n.kk]),n.rk(n.gk)):(n.ck.logger.debug("no base url left, all tried"),n.lk&&n.mk.fireError(n.lk),n.lk=null,Promise.reject(e))})},e.prototype.updateRepresentation=function(e){return Promise.resolve(e)},e.prototype.stopRepresentationUpdate=function(e){return Promise.resolve()},e.prototype.tk=function(e){var t,n,r,o,s=null!=(t=e.elapsedTime)?t:0;(0,p.isDownloadTimeInformationValid)(e)&&(this.ck.logger.debug("Downloaded manifest in: ".concat(s.toFixed(2),", TTFB: ").concat(null==(n=e.timeToFirstByte)?void 0:n.toFixed(2))),this.ck.store.dispatch((0,f.addMetricsValue)("default",g.MetricType.DownloadInformation,{bytes:e.length,time:s,timeToFirstByte:e.timeToFirstByte}))),this.gk=e.url;var u=i({},this.nk(e.body,(0,v.toSeconds)(Math.round(s))));return u._currentLoadingUrl=this.gk,S(u)?!0===(null==(o=null==(r=this.ck)?void 0:r.settings)?void 0:o.INFINITE_RETRIES_FOR_LIVE)&&this.ik.setResetRetriesWhenOffline(!0):this.ck.serviceManager.maybeCall(a.ServiceName.ManifestCachingService,function(t){return t.cacheHttpResponse(e,e.url)}),u},e}()},78340:function(e,t,n){var i,r,o,s,a=this&&this.__assign||function(){return(a=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},u=this&&this.__runInitializers||function(e,t,n){for(var i=arguments.length>2,r=0;r<t.length;r++)n=i?t[r].call(e,n):t[r].call(e);return i?n:void 0},l=this&&this.__esDecorate||function(e,t,n,i,r,o){function s(e){if(void 0!==e&&"function"!=typeof e)throw TypeError("Function expected");return e}for(var a,u=i.kind,l="getter"===u?"get":"setter"===u?"set":"value",c=!t&&e?i.static?e:e.prototype:null,d=t||(c?Object.getOwnPropertyDescriptor(c,i.name):{}),p=!1,h=n.length-1;h>=0;h--){var f={};for(var g in i)f[g]="access"===g?{}:i[g];for(var g in i.access)f.access[g]=i.access[g];f.addInitializer=function(e){if(p)throw TypeError("Cannot add initializer
1s after decoration has completed");o.push(s(e||null))};var v=(0,n[h])("accessor"===u?{get:d.get,set:d.set}:d[l],f);if("accessor"===u){if(void 0===v)continue;if(null===v||"object"!=typeof v)throw TypeError("Object expected");(a=s(v.get))&&(d.get=a),(a=s(v.set))&&(d.set=a),(a=s(v.init))&&r.unshift(a)}else(a=s(v))&&("field"===u?r.unshift(a):d[l]=a)}c&&Object.defineProperty(c,i.name,d),p=!0},c=this&&this.__spreadArray||function(e,t,n){if(n||2==arguments.length)for(var i,r=0,o=t.length;r<o;r++)!i&&r in t||(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.BaseURL=t.MPDParser=void 0,t.mergeCommonAttributes=k,t.parseFraction=O;var d=n(25926),p=n(4224),h=n(3714),f=n(20213),g=n(69957),v=n(44468),y=n(34047),m=n(52424),b=n(21216),S=n(68922),E=n(85434),_=n(58313),T=n(88052),P=n(62756),C=n(92778),A=RegExp("_(.*:)?label","i"),w=["__text","_byteRange","_serviceLocation","_availabilityTimeOffset","_availabilityTimeComplete"];function k(e,t){if(e&&t)for(var n=["SegmentBase","SegmentList","SegmentTemplate"],i=0;i<n.length;i++){var r=n[i],o=Array.isArray(e[r])&&e[r][0],s=Array.isArray(t[r])&&t[r][0],u=n.find(function(t){return e[t]});s&&o?e[r]=[a(a({},t[r][0]),e[r][0])]:s&&!u&&(e[r]=t[r])}}function O(e){var t=e.split("/");return parseInt(t[0])/(parseInt(t[1])||1)}function M(e,t){return e.S.reduce(function(e,t){var n;return e+Number(t._d)*(Number(null!=(n=t._r)?n:"0")+1)},0)/t}function I(e){return"string"==typeof e?[{value:e}]:Array.isArray(e)?e.map(function(e){return{id:e._id,lang:e._lang,value:e.toString()}}):[]}t.MPDParser=(o=[],i=function(){function e(e,t){this.OP=u(this,o),this.OP=e,this.PP=t,this.QP=e.renderer;var n=T.ModuleManager.get(P.ModuleName.XML);this.RP=n.parseXML,this.SP=n.parseJSONtoXML}return e.prototype.TP=function(e,t){return(0,S.applyLabeling)({source:this.PP.source,context:this.OP,streamType:v.StreamType.Dash,labelingType:e},t)},e.prototype.eQ=function(e){var t,n,i,r=null!=(i=null==(n=null==(t=e.Label)?void 0:t[0])?void 0:n.value)?i:e._label,o={mimeType:e._mimeType,lang:e._lang};return this.TP(S.LabelingType.Tracks,o)||r},e.prototype.fQ=function(e,t){var n,i,r,o=null!=(r=null==(i=null==(n=t.Label)?void 0:n[0])?void 0:i.value)?r:t._label,s={id:t._id,mimeType:e,bitrate:t._bandwidth,qualityRanking:t._qualityRanking,width:t._width,height:t._height,frameRate:t._framerate};return this.TP(S.LabelingType.Qualities,s)||o},e.prototype.gQ=function(e){var t,n=this,i=0;for(var r in e)if(e.hasOwnProperty(r)){if("Accessibility"===r&&this.hQ(e,e[r]),"EssentialProperty"===r&&function(e){var t;return"http://dashif.org/guidelines/trickmode"===(null==(t=null==e?void 0:e[0])?void 0:t._schemeIdUri)}(e[r]))return this.OP.logger.debug("Ignoring trickplay track ".concat(e._id," from Period ").concat(e._periodId)),null;"Label"===r&&(e.Label=I(e[r])),"SegmentTemplate"===r&&this.iQ(e[r]),"SegmentList"===r&&this.jQ(e[r]),"SegmentTemplate"===r||0===r.indexOf("_")||Array.isArray(e[r])||(e[r]=[e[r]]),"Representation"===r&&(e[r]=e[r].filter(function(t){var r,o,s,a=t._mimeType||e._mimeType;if(t._mimeType=t._mimeType||e._mimeType,a&&(a=a.toLowerCase()),"AudioChannelConfiguration"in e){var u=e.AudioChannelConfiguration;null!=t.AudioChannelConfiguration||(t.AudioChannelConfiguration=u)}k(t,e),"string"==typeof(r=t)._audioSamplingRate&&(r._audioSamplingRate=parseFloat(r._audioSamplingRate)),o=t,s=e,"string"==typeof o._height&&(o._height=parseFloat(o._height)),"string"==typeof o._width&&(o._width=parseFloat(o._width)),"string"==typeof o._frameRate&&(o._frameRate=O(o._frameRate)),o._dynamicRange=function(e,t){var n,i,r,o,s=c(c(c(c([],null!=(n=e.EssentialProperty)?n:[],!0),null!=(i=e.SupplementalProperty)?i:[],!0),null!=(r=t.EssentialProperty)?r:[],!0),null!=(o=t.SupplementalProperty)?o:[],!0).filter(function(e){return e._schemeIdUri===C.DashSchemeUri.TransferCharacteristics}).map(function(e){var t=e._value;return(0,b.getDynamicRangeFromTransferCharacteristics)(parseInt(null!=t?t:"",10))}).find(function(e){return e!==v.VideoDynamicRange.Unknown});if(void 0!==s)return s;var a=y.CodecStringHelper.getExtractedCodecStrings(e._codecs||t._codecs);return(0,b.getDynamicRangeFromVideoCodec)(a.video)}(o,s),"string"==typeof t._bandwidth&&(t._bandwidth=parseFloat(t._bandwidth)),t.Label&&(t.Label=I(t.Label)),t.SegmentTemplate&&n.iQ(t.SegmentTemplate),t.SegmentList&&n.jQ(t.SegmentList);var l=t._codecs||e._codecs;
vendor: 7,466 bytes, line 1
1if(a&&(0===a.indexOf("application")||0===a.indexOf("text")||0===a.indexOf("image")||a.indexOf("mp2t")>=0))i++,t._label=n.fQ(a,t);else if(a&&l){if(t._codecs=l,!y.CodecStringHelper.isSupportedByRenderer(n.QP,a,l))return n.OP.logger.debug("Representation not supported ("+a+'; codecs="'+l+'")'),!1;i++,t._label=n.fQ(a,t)}return!0}))}if(i>0){if(!e._mimeType){var o=null==(t=e.Representation.find(function(e){return e._mimeType}))?void 0:t._mimeType;o&&(e._mimeType=o)}return e._label=this.eQ(e),e.Representation.sort(function(e,t){return e._bandwidth-t._bandwidth}),e}return this.OP.logger.debug("AdaptationSet ".concat(e._id," from Period ").concat(e._periodId," has no supported representations")),null},e.prototype.hQ=function(e,t){e.ClosedCaptionLabels={};for(var n=i.filterAccessibilityTagsByScheme(t,"urn:scte:dash:cc:cea-608:2015"),r=i.extractLabelGroups(n),o=0;o<r.length;o++){var s=r[o],a=s.split("="),u=2===a.length?[a[0],a[1]]:["CC"+o,s],l=u[0],c=u[1];e.ClosedCaptionLabels[l]={label:c,lang:c}}},e.prototype.iQ=function(e){for(var t,n,i=0;i<e.length;i++){var r=e[i];if(r.hasOwnProperty("SegmentTimeline"))for(var o=Number(null!=(t=r._timescale)?t:"1"),s=0,a=null!=(n=r.SegmentTimeline)?n:[];s<a.length;s++){var u=a[s];u.totalDuration=M(u,o)}}},e.prototype.jQ=function(e){for(var t,n,i,r,o,s,a=0;a<e.length;a++){var u=e[a];if(u.hasOwnProperty("SegmentTimeline")){for(var l=Number(null!=(t=u._timescale)?t:"1"),c=0,d=null!=(n=u.SegmentTimeline)?n:[];c<d.length;c++){var p=d[c];p.totalDuration=M(p,l)}u.totalDuration=null!=(o=null==(r=null==(i=u.SegmentTimeline)?void 0:i[0])?void 0:r.totalDuration)?o:0}else if(u.hasOwnProperty("_duration")&&u.hasOwnProperty("SegmentURL")){l=Number(null!=(s=u._timescale)?s:"1");var h=Number(u._duration)/l;u.totalDuration=h*u.SegmentURL.length}}},e.filterAccessibilityTagsByScheme=function(e,t){return e&&e.length>0?e.filter(function(e){return e._schemeIdUri===t}):[]},e.extractLabelGroups=function(e){for(var t=[],n=0;n<e.length;n++){var i=e[n];if(i._value){var r=i._value.split(";");t.push.apply(t,r)}}return t},e.prototype.kQ=function(e,t){for(var n=0;n<e.length;n++)if("string"==typeof t&&e[n].url===t||"object"==typeof t&&e[n].url===t.url)return!0;return!1},e.prototype.lQ=function(e,t,n,i){var r;Array.isArray(e.BaseURL)||(e.BaseURL=[e.BaseURL]);for(var o=[],s=0;s<e.BaseURL.length;s++){if((r=new x).customAttributes=[],null!=t&&(r.parentIds={},void 0!==t[0]&&null!==t[0]&&(r.parentIds.PeriodID=t[0]),void 0!==t[1]&&null!==t[1]&&(r.parentIds.AdaptationSetID=t[1]),void 0!==t[2]&&null!==t[2]&&(r.parentIds.RepresentationID=t[2])),"string"==typeof e.BaseURL[s])r.url=e.BaseURL[s];else if("object"==typeof e.BaseURL[s]){for(var a in e.BaseURL[s].hasOwnProperty("__text")&&(r.url=e.BaseURL[s].__text),e.BaseURL[s].hasOwnProperty("_serviceLocation")&&(r.serviceLocation=e.BaseURL[s]._serviceLocation),e.BaseURL[s].hasOwnProperty("_byteRange")&&(r.serviceLocation=e.BaseURL[s]._byteRange),e.BaseURL[s].hasOwnProperty("_availabilityTimeOffset")&&(r.serviceLocation=e.BaseURL[s]._availabilityTimeOffset),e.BaseURL[s].hasOwnProperty("_availabilityTimeComplete")&&(r.serviceLocation=e.BaseURL[s]._availabilityTimeComplete),e.BaseURL[s])if(e.BaseURL[s].hasOwnProperty(a)&&0===a.indexOf("_")&&-1===w.indexOf(a)){var u={};u[a.substring(1)]=e.BaseURL[s][a],r.customAttributes.push(u)}}o.push(r)}for(e.BaseURL=[],s=0;s<o.length;s++){var l=o[s];if(_.URLHelper.isUrlAbsolute(l))this.kQ(e.BaseURL,l)||(l.isAbsolute=!0,i.push(l),e.BaseURL.push(l));else for(var c=0;c<n.length;c++){var d=n[c].toString();"/"!==n[c].url[n[c].url.length-1]&&(d+="/");var p=_.URLHelper.concatUrlParts(d,l);this.kQ(e.BaseURL,p)||((r=new x).url=p,r.parentIds={},void 0!==t[0]&&null!==t[0]&&(r.parentIds.PeriodID=t[0]),void 0!==t[1]&&null!==t[1]&&(r.parentIds.AdaptationSetID=t[1]),void 0!==t[2]&&null!==t[2]&&(r.parentIds.RepresentationID=t[2]),r.serviceLocation=l.serviceLocation||n[c].serviceLocation,r.byteRange=l.byteRange||n[c].byteRange,r.availabilityTimeOffset=l.availabilityTimeOffset||n[c].availabilityTimeOffset,r.availabilityTimeComplete=l.availabilityTimeComplete||n[c].availabilityTimeComplete,e.BaseURL.push(r),i.push(r))}}return i},e.prototype.mQ=function(e,t,n){var i=[];if(t=t||[],n=n||[],"object"!=typeof e)return e;for(var r in e.hasOwnProperty("BaseURL")&&(i=this.lQ(e,n,t,i)),i.length<1&&(i=t),e)if(e.hasOwnProperty(r))if("object"==typeof e[r]&&0!==r.indexOf("_")){Array.isArray(e[r])||(e[r]=[e[r]]);for(var o=0;o<e[r].length;o++)if("BaseURL"!==r){var s=e[r][o]._id||o+"";e[r][o]=this.mQ(e[r][o],i,n.concat([s])),"Representation"!==r||e[r][o].hasOwnProperty("BaseURL")||(e[r][o].BaseURL=i)}}else 0===r.indexOf("_")&&(A.test(r)||"_streamName"===r)&&(e._label=e[r],"_label"!==r&&delete e[r]);return e},e.prototype.nQ=function(e){var t=m.DurationConverter.getDurationInSec(e._timeShiftBufferDepth);return(t=isNaN(t)?-1/0:-t)>0&&t<this.OP.bufferSettings.getForwardTargetLevel()&&(t=this.OP.bufferSettings.getForwardTargetLevel()),t},e.fillInMissingIds=function(e){Array.isArray(e.Period)||(e.Period=[e.Period]);for(var t=[],n=[],i=[],r=[],o=[],s=[],a=e.Period,u=0;u<a.length;u++){a[u].hasOwnProperty("_id")&&a[u]._id?t.push(a[u]._id):r.push(a[u]),Array.isArray(a[u].AdaptationSet)||(a[u].AdaptationSet=[a[u].AdaptationSet]);for(var l=a[u].AdaptationSet,c=0;c<l.length;c++){l[c].hasOwnProperty("_id")&&l[c]._id?n.push(l[c]._id):o.push(l[c]),l[c]._periodId=a[u]._id,Array.isArray(l[c].Representation)||(l[c].Representation=[l[c].Representation]);for(var d=l[c].Representation,p=0;p<d.length;p++)d[p].hasOwnProperty("_id")&&d[p]._id?i.push(d[p]._id):s.push(d[p])}}for(var h=0,f=0;f<r.length;f++){var g=r[f];do h++;while(t.includes(""+h));g._id=""+h;for(var v=0,y=g.AdaptationSet;v<y.length;v++)y[v]._periodId=g._id;t.push(""+h)}h=0;for(var m=0;m<o.length;m++){var b=o[m];do h++;while(n.includes(""+h));b._id=""+h,n.push(""+h)}h=0;for(var S=0;S<s.length;S++){var E=s[S];do h++;while(i.includes(""+h));E._id=""+h,i.push(""+h)}},e.prototype.oQ=function(e){return"dynamic"===e._type&&(e._timeShiftBufferDepth=this.nQ(e)),e},e.prototype.pQ=function(e){return e._publishTime&&(e._publishTime=new Date(e._publishTime).getTime()),e},e.prototype.qQ=function(e,t){return e.hasOwnProperty("Location")?Array.isArray(e.Location)||(e.Location=[e.Location]):e.Location=[t],e},e.prototype.rQ=function(e){e.hasOwnProperty("BaseURL")&&!Array.isArray(e.BaseURL)&&(e.BaseURL=[e.BaseURL]);for(var t=[],n=0;n<e.Location.length;n++){var i=e.Location[n],r=new x;r.url=_.URLHelper.removeLastPathPart(i),t.push(r)}return this.mQ(e,t,null)},e.prototype.sQ=function(e,t){t._start?t.start=m.DurationConverter.getDurationInSec(t._start):(t.start=e.start+e.duration,t._start="PT"+t.start+"S")},e.prototype.tQ=function(e){for(var t={start:0,duration:0,_start:"PT0S",_duration:"PT0S"},n=0;n<e.Period.length;n++){var i=e.Period[n];this.sQ(t,i),i._duration?i.duration=m.DurationConverter.getDurationInSec(i._duration):(e.Period[n+1]?i.duration=(m.DurationConverter.getDurationInSec(e.Period[n+1]._start)||0)-i.start:e._mediaPresentationDuration?i.duration=(m.DurationConverter.getDurationInSec(e._mediaPresentationDuration)||0)-i.start:i.duration=1/0,i._duration="PT"+i.duration+"S"),this.OP.logger.debug("period ".concat(n," (id=").concat(i._id,"): ").concat(i.start,"-").concat(i.start+i.duration)),e.Period[n]=i,t=i}return e},e.prototype.uQ=function(e){for(var t,n,i=this,r=[],o=[],s=m.DurationConverter.getDurationInSec(e._mediaPresentationDuration),a=this,u=0;u<e.Period.length;
1u++)!function(u){var l=e.Period[u];for(var c in t=m.DurationConverter.getDurationInSec(l._start),n=m.DurationConverter.getDurationInSec(l._duration),isNaN(t)&&0===o.length&&"static"===e._type&&(t=0),isNaN(t)&&o.length>0&&!isNaN(parseFloat(o[o.length-1].start))&&!isNaN(parseFloat(o[o.length-1].duration))&&(t=o[o.length-1].start+o[o.length-1].duration),isNaN(t)&&u===e.Period.length-1&&!isNaN(s)&&(n=s-t),o.length>0&&isNaN(parseFloat(o[o.length-1].duration))&&!isNaN(t)&&(o[o.length-1].duration=t-o[o.length-1].start),o.push({start:t,duration:n}),l)if(l.hasOwnProperty(c)&&["BaseURL","AdaptationSet","EventStream"].includes(c)){if(Array.isArray(l[c])||(l[c]=[l[c]]),"AdaptationSet"===c){var f=l[c].map(function(e){var t,n=e._mimeType||(null==(t=e.Representation.find(function(e){return e._mimeType}))?void 0:t._mimeType);return n?E.MimeTypeHelper.extractContentType(n):""}).filter(function(e,t,n){return e&&n.indexOf(e)===t});l[c]=l[c].map(function(e){k(e,l);var t=i.gQ(e);return null!==t&&!t.hasOwnProperty("ContentProtection")&&t.Representation[0].hasOwnProperty("ContentProtection")&&(t.ContentProtection=t.Representation[0].ContentProtection),t}).filter(function(e){return!!e});for(var g=function(e){l[c].some(function(t){return t._mimeType.includes(e)})||a.OP.eventHandler.dispatchEvent(h.PlayerEvent.Warning,new d.PlayerWarning(p.WarningCode.SOURCE_CODEC_OR_FILE_FORMAT_NOT_SUPPORTED))},v=0,y=f.filter(function(e){return"audio"===e||"video"===e});v<y.length;v++)g(y[v]);l[c].length<1&&r.push(u)}else if("EventStream"===c)for(var b=0,S=l[c].filter(function(e){return e.Event});b<S.length;b++)for(var _=0,T=S[b].Event;_<T.length;_++){var P=T[_];P.rawXmlRepresentation=a.SP({event:P})}}}(u);return r.length>0&&"static"===e._type&&this.vQ(r,o,s,e),e=this.tQ(e)},e.prototype.vQ=function(e,t,n,i){for(var r,o,s;!isNaN(parseInt(r=e.pop()));){if(o=t[r].start,s=t[r].duration,!isNaN(o)&&!isNaN(s)){isNaN(n)||(i._mediaPresentationDuration="PT"+(n-=s)+"S");for(var a=r+1;a<t.length;a++)isNaN(parseFloat(t[a].start))||(t[a].start=t[a].start-s,i.Period[a]._start="PT"+t[a].start+"S")}t.splice(r,1),i.Period.splice(r,1)}},e.parseUTCTimingInformation=function(e,t){var n,i,r,o;e.hasOwnProperty("UTCTiming")&&!Array.isArray(e.UTCTiming)&&(e.UTCTiming=[e.UTCTiming]);for(var s=[],a=0,u=(e.UTCTiming||[]).filter(function(e){return e.hasOwnProperty("_schemeIdUri")&&"string"==typeof e._schemeIdUri});a<u.length;a++)!function(a){var u={schemeIdUri:a._schemeIdUri,value:""};if("string"==typeof a._value)if(u.schemeIdUri.startsWith("urn:mpeg:dash:utc:http")){var l=null!=(r=null==(i=null==(n=e.BaseURL)?void 0:n[0])?void 0:i.url)?r:_.URLHelper.removeLastPathPart(t);u.value=(null!=(o=a._value.match(/\S+/g))?o:[a._value]).map(function(e){return _.URLHelper.concatBaseUrlWithPartial(l,e)}).join(" ")}else u.value=a._value;s.push(u)}(u[a]);return s.length>0?e.UTCTiming=s:delete e.UTCTiming,e},e.prototype.parse=function(e,t,n){var r,o=this.RP(e,{decodeEntities:!0});if(!1===o.success)throw new f.PlayerError(f.ErrorCode.SOURCE_MANIFEST_INVALID,{errorMessage:o.error.message},"DASH manifest is not a valid XML",this.PP.sourceIdentifier);var s=o.parsed.MPD;return s._requestTimestamp=Date.now(),s._downloadTime=n,s._type=null!=(r=s._type)?r:"static",i.fillInMissingIds(s),s=this.oQ(s),s=this.pQ(s),s=this.qQ(s,t),s=this.rQ(s),s=this.uQ(s),(s=i.parseUTCTimingInformation(s,t))&&s.Period&&0!==s.Period.length?(s.originalDashManifest=e,s):(this.OP.eventHandler.fireError(new f.PlayerError(f.ErrorCode.SOURCE_MANIFEST_INVALID,void 0,"DASH manifest contains no usable periods",this.PP.sourceIdentifier)),null)},e.prototype.dispose=function(){this.QP=null},e}(),s="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0,r=[(0,g.trackPerformance)("MPDParser.parse")],l(i,null,r,{kind:"method",name:"parse",static:!1,private:!1,access:{has:function(e){return"parse"in e},get:function(e){return e.parse}},metadata:s},null,o),s&&Object.defineProperty(i,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:s}),i);var x=function(){function e(){this.url=null,this.parentIds=null,this.serviceLocation=null,this.byteRange=null,this.availabilityTimeOffset=null,this.availabilityTimeComplete=null,this.isAbsolute=!1,this.customAttributes=null}return e.prototype.toString=function(){return this.url?""+this.url:""},e}();t.BaseURL=x}
vendor: 8,862 bytes, line 1
1,66759:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.DASHModuleDefinition=void 0;var i=n(62756),r=n(96693),o=n(44908),s=n(4771),a=n(63889),u=n(12054),l=n(31439),c={isIndexRangeNode:r.isIndexRangeNode,isInitializationNode:r.isInitializationNode,isInitializationStringNode:r.isInitializationStringNode},d={provideSegmentInfoFromInitializationProperty:r.provideSegmentInfoFromInitializationProperty,provideSegmentInfoFromInitializationNodeProperty:r.provideSegmentInfoFromInitializationNodeProperty,provideSegmentInfoFromIndexRangeProperty:r.provideSegmentInfoFromIndexRangeProperty};t.DASHModuleDefinition={name:i.ModuleName.DASH,module:function(){return{MPDLoader:o.MPDLoader,SegmentBaseMPDHandler:a.SegmentBaseMPDHandler,SegmentTemplateMPDHandler:u.SegmentTemplateMPDHandler,SegmentTimelineMPDHandler:l.SegmentTimelineMPDHandler,replaceAllPlaceholders:s.default,initSegmentInfoSourceDetectors:c,initSegmentInfoProviders:d}},dependencies:[i.ModuleName.EngineBitmovin,i.ModuleName.XML]},t.default=t.DASHModuleDefinition},63889:function(e,t,n){var i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.SegmentBaseMPDHandler=void 0;var r=n(40306),o=n(3336),s=n(80813),a=n(56481),u=n(4129),l=n(77401),c=n(29669),d=n(79721),p=n(84568),h=n(58313),f=n(88052),g=n(62756),v=n(13422),y=n(59707),m=n(96693);t.SegmentBaseMPDHandler=function(){function e(e,t){var n=this;this.context=e,this.xk=0,this.zk=-1,this.Kk=null,this.Lk=(0,p.memoize)(this.jl.bind(this),function(e,t){return t._internalId.representationId}),this.Mk=function(e){var t=i({},n.Gk.getRepresentationById(n.Ck));return n.Lk(e,t).then(function(e){var i;if(n.Ik.dispatch((0,y.setRepresentationSegmentIndexAction)(t._internalId,e)),n.Ik.dispatch((0,y.setRepresentationIsLoadingAction)(t._internalId,!1)),e||(n.Ik.dispatch((0,y.setRepresentationSegmentIndexParsingErrorAction)(t._internalId,!0)),n.context.logger.warn("Error parsing SegmentIndex for representation with id ".concat(null==(i=n.Ck)?void 0:i.key()))),n.zk>=0){var r=n.zk;n.zk=-1,n.seekTo(r)}return n.Fk=null,n.Ck}).catch(function(e){throw n.Lk.invalidate(),e})},this.Nk=function(e){n.Fk=null,n.context.logger.debug("Getting segment index failed for representation with id ".concat(n.Ck.key()," (Error: ").concat(JSON.stringify(e),")"));var t=n.Ok(e);return n.Ek&&(n.Ek.reject(t),n.Ek=null),Promise.reject(t)},this.Sk=function(e){return n.Ek?Promise.reject("fail"):new Promise(function(t,r){n.Ek=i(i({},e),{resolve:t,reject:r})})},this.vk=e.settings;var r=t.sourceIdentifier;this.Jk=r,this.Gk=e.serviceManager.get(s.ServiceName.ManifestService,r);var o=this.Gk.getFirstPeriod()||{_id:d.DEFAULT_PERIOD_ID};this.wk=o._id;var a=this.vk.MAX_RETRIES;this.Dk=new u.DefaultContentLoader(e,{maxRetries:a,retryDelay:this.vk.RETRY_DELAY,requestType:c.HttpRequestType.MEDIA_SEGMENTINDEX,onSuccess:function(){n.Kk=null},onFailure:function(e,t){var i;n.Kk=null!=(i=null==t?void 0:t.name)?i:null}}),this.Ik=e.serviceManager.get(s.ServiceName.SourceStoreService,r)}return e.prototype.Ok=function(e){if(this.Kk===l.RequestError.Canceled)return l.RequestError.Canceled;var t=this.Kk===l.RequestError.TimedOut?r.ErrorCode.NETWORK_SEGMENT_DOWNLOAD_TIMEOUT:r.ErrorCode.NETWORK_ERROR;return new o.PlayerError(t,{url:null==e?void 0:e.url,statusCode:null==e?void 0:e.status},"Failed to load the segment index",this.Jk)},e.prototype.Pk=function(e){var t,n,i=this.Gk.getRepresentationById(e);if(i&&i.segmentIndex){var r=this.Gk.getPeriodDuration(this.wk);isFinite(r)&&(n=r/i.segmentIndex.references.length);var o=this.Gk.getMediaPresentationDuration();0!==o&&(isFinite(o)&&(t=o/i.segmentIndex.references.length),n||(n=t)),i.segmentIndex&&(t=i.segmentIndex.references[0].duration/i.segmentIndex.timescale,n||(n=t))}return n},e.prototype.Qk=function(){var e,t,n=this.Gk.getRepresentationById(this.Ak);if(null==(t=null==(e=null==n?void 0:n.segmentIndex)?void 0:e.references)?void 0:t.length){var i=n.segmentIndex.timescale||1,r=n.segmentIndex.references[this.xk].time/i,o=this.getTimestampOffset(),s={url:"",byteRange:n.segmentIndex.references[this.xk].byteRange,periodId:n._internalId.periodId,presentationTimeOffset:o,startTime:r-o};return this.xk++,this.yk=Math.floor(this.xk*this.getSegmentDuration())+this.gl(),s}},e.prototype.getInitSegmentInfo=function(e){var t=this.Gk.getRepresentationById(e);return t&&t.SegmentBase&&t.BaseURL?i(i({},this.Rk(t)),{codecs:(0,v.getCodecsFromAdaptationSet)(this.Gk.getAdaptationSet(e))}):null},e.prototype.Rk=function(e){var t,n=e.SegmentBase[0];return(0,m.isInitializationNode)(n)?(0,m.provideSegmentInfoFromInitializationNodeProperty)(n,e):e.segmentIndex?(0,m.isIndexRangeNode)(n)?(0,m.provideSegmentInfoFromIndexRangeProperty)(n,e):null:(this.context.logger.debug("SegmentIndex for representation ".concat(null==(t=e._internalId)?void 0:t.key()," not parsed yet!")),null)},e.prototype.resolvePendingSegmentInfoRequests=function(){if(this.Ek){var e=this.Qk();e&&(this.Ek.resolve(e),this.Ek=null)}},e.prototype.setAdaptationSetId=function(e){this.Bk=e,this.Hk=e.adaptationSetId.split("-")[0],this.Tk(),this.resolvePendingSegmentInfoRequests()},e.prototype.Tk=function(){var e,t=this,n=this.Gk.getRepresentationById(this.Ak);n&&(e=n._bandwidth);var i=this.Gk.getMatchingRepresentationsByBandwidth(this.Bk,e),r=this.Ak?i.find(function(e){return e._internalId===t.Ak}):null,o=null!=r?r:i[0];this.Ak=o._internalId,this.wk=this.Ak.periodId,o.hasOwnProperty("SegmentBase")&&o.SegmentBase.length>1&&this.context.logger.debug("Representation ".concat(o._id," has more than one SegmentBase! Taking the first one."))},e.prototype.setRepresentationId=function(e){return!!this.Gk.getRepresentationById(e)&&(this.Ak=e,this.seekTo(this.yk),!0)},e.prototype.getSegmentInfos=function(){var e=this.getSeekableRange();return this.Uk(e)},e.prototype.Uk=function(e){var t=this,n={};return this.Gk.getAdaptationSet(this.Bk).Representation.forEach(function(i){var r=i._id;if(n[r]=[],1===i.BaseURL.length){var o=i.BaseURL[0].url;n[r].push({url:h.URLHelper.appendQueryParametersToUrl(o,t.vk.QUERY_PARAMETERS)})}else for(var s=0;s<i.BaseURL.length;s++)o=h.URLHelper.appendQueryParametersToUrl(i.BaseURL[s].url,t.vk.QUERY_PARAMETERS),n[r].push({url:o});n[r].forEach(function(t){t.duration=e.end-e.start,t.startTime=e.start})}),n},e.prototype.getNextSegmentInfo=function(e){var t=this.Qk();return t?Promise.resolve(t):this.Sk({time:e})},e.prototype.getSubtitleUrl=function(){var e=this.Gk.getAvailableBaseURLsForRepresentation(this.Ak);return e?e[0]:null},e.prototype.getStartNumber=function(){},e.prototype.getLiveEdgeTime=function(){return -1},e.prototype.getActualTimeShiftBufferDepth=function(){return this.Gk.getTimeShiftBufferDepthSeconds()},e.prototype.Vk=function(){var e,t=this;return this.Gk.getRepresentationById(this.Ak)&&(e=this.Pk(this.Ak)),e<0&&(e=this.Gk.getAdaptationSet(this.Bk).Representation.map(function(e){return t.Pk(e._internalId)}).find(function(e){return e>0})),isFinite(e)?[e,!0]:[1,!1]},e.prototype.getSegmentDuration=function(){return this.Vk()[0]},e.prototype.hasNext=function(){this.resolvePendingSegmentInfoRequests();var e=this.Gk.getRepresentationById(this.Ak);if(e){if(e.segmentIndex)return this.xk<e.segmentIndex.references.length;if(!this.isSegmentInfoLoaded(this.Ak))return!0}return!1},e.prototype.gl=function(){var e,t,n;return null!=(n=null==(t=null==(e=this.Gk)?void 0:e.findPeriod(this.wk))?void 0:t.start)?n:0},e.prototype.seekTo=function(e){this.yk=e;var t,n,i=this.Vk(),r=i[0],o=i[1];if((r<0||!o)&&(this.zk=e),r>0&&o&&e>-1){var s=Math.max(e-this.gl(),0),a=null==(t=this.Gk)?void 0:t.getRepresentationById(this.Ak);this.Ak&&a&&(this.setIndex(Math.floor(s/r)),this.context.logger.debug("seekTo: ".concat(e,", new index: ").concat(this.xk," (representationId: ").concat(null==(n=this.Ak)?void 0:n.key(),", ").concat(a._mimeType,")")))}},e.prototype.getTimestampOffset=function(){var e=this.Gk.findPeriod(this.wk),t=this.Gk.getRepresentationById(this.Ak),n=t&&t.SegmentBase?t.SegmentBase[0]:null,i=0;if(n&&n.hasOwnProperty("_presentationTimeOffset")&&n.hasOwnProperty("_timescale")){var r=n.hasOwnProperty("_timescale")?parseInt(n._timescale):1;i=parseInt(n._presentationTimeOffset)/r}return e&&(i-=e.start),i},e.prototype.getIndex=function(){return this.xk},e.prototype.setIndex=function(e){this.xk=e},e.prototype.timeShift=function(e){},e.prototype.updateRepresentation=function(e){var t=this;if(this.isSegmentInfoLoaded(e))return this.context.logger.debug("Skipping updateRepresentation, SIDX info already loaded"),Promise.resolve(e);if(this.Fk)return this.Fk;var n=this.Gk.getRepresentationById(e);if(!n)return this.context.logger.log("Getting segment index failed (Invali
1d Representation Id: ".concat(null==e?void 0:e.key(),")")),Promise.reject(null);this.context.logger.debug("Going to load segment index (Representation Id: ".concat(null==e?void 0:e.key(),")"));var i=(0,m.extractBaseUrlFromRepresentation)(n),r=n.SegmentBase[0]._indexRange,o=parseInt(r.split("-")[1])+1;return this.Ik.dispatch((0,y.setRepresentationAnchorPointAction)(n._internalId,o)),this.Ck=e,this.Fk=this.Dk.load(i,c.HttpRequestMethod.GET,c.HttpResponseType.ARRAYBUFFER,void 0,{Range:"bytes="+r}).then(function(e){return t.Mk(e.body)}).catch(this.Nk),this.Fk},e.prototype.isSegmentInfoLoaded=function(e){return this.Gk.isSegmentInfoLoaded(e)},e.prototype.rewindOneSegment=function(){return this.xk--,!(this.xk<0&&(this.context.logger.debug("SegmentBase array index is smaller than 0, probably a discontinuity. Using 0."),this.setIndex(0),1))},e.prototype.getSeekableRange=function(){return{start:0,end:this.Gk.getMediaPresentationDuration()}},e.prototype.getPendingSegmentInfoRequest=function(){return this.Ek},e.prototype.setPendingSegmentInfoRequest=function(e){this.Ek=e},e.prototype.canSwitchRepresentation=function(e){return!0},e.prototype.getLatestTimeForPossibleSwitch=function(e){return e},e.prototype.adjustTimeToNextSegmentStart=function(e){return e},e.prototype.dispose=function(){this.vk=null,this.Gk=null,this.Ak=null,this.Ik=null,this.Dk=(0,a.dispose)(this.Dk),this.Ek=null,this.Lk=null},e.prototype.setTimestampOffset=function(e,t){},e.prototype.hl=function(){return this.context.serviceManager.get(s.ServiceName.SegmentService).get(this.Hk).getSegment(this.getInitSegmentInfo(this.Ck)).then(function(e){return e.read()}).then(function(e){return e.value})},e.prototype.il=function(e,t){return this.hl().then(function(n){var i=f.ModuleManager.get(g.ModuleName.ContainerWebM).WebMSegmentIndex,r=f.ModuleManager.get(g.ModuleName.ContainerWebM).WebMInitFile,o=new i(e),s=new r(n.getData()).segment.segmentInfo,a=function(e,t,n){for(var i,r,o,s=e.cues.flatMap(function(e){return e.cuePoints}),a=Array(s.length),u=t-((o=(r=(i=e.cues&&e.cues[0])&&i.cuePoints&&i.cuePoints[0])&&r.trackPositions&&r.trackPositions[0])&&o.clusterPosition||0),l=s.length-1;l>=0;l--)a[l]={time:s[l].time,byteRange:{start:u+s[l].trackPositions[0].clusterPosition}},l===s.length-1?a[l].duration=n-a[l].time:(a[l].byteRange.end=a[l+1].byteRange.start-1,a[l].duration=a[l+1].time-a[l].time);return a}(o,parseInt(t.SegmentBase[0]._indexRange.split("-")[1])+1,s.getDuration()/s.getTimecodeScale());return{timescale:s.getTimecodeScale(),references:a}})},e.prototype.jl=function(e,t){return"webm"===this.Hk.split("/")[1]?this.il(e,t):Promise.resolve(this.kl(e,t.anchorPoint))},e.prototype.kl=function(e,t){if(!e||!t)return this.context.logger.debug("Error parsing SegmentIndex: Wrong Parameters"),null;var n=f.ModuleManager.get(g.ModuleName.ContainerMP4).parseBuffer(e).boxes.find(function(e){return"sidx"===e.type});return n?{timescale:n.timescale,references:function(e,t,n){for(var i=[],r=0;r<e.length;r++){var o=e[r],s=o.referenced_size,a=o.subsegment_duration,u=t,l=u+s-1;i.push({byteRange:{start:u,end:l},time:n,duration:a}),t+=s,n+=a}return i}(n.references,n.first_offset+t,n.earliest_presentation_time)}:(this.context.logger.debug("Error parsing SegmentIndex: No sidx box found"),null)},e}()},12054:function(e,t,n){var i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.SegmentTemplateMPDHandler=void 0,t.getTimescaleFromTemplate=h;var r=n(80813),o=n(77179),s=n(89927),a=n(23068),u=n(58313),l=n(16197),c=n(54053),d=n(96693),p=n(4771);function h(e){return e&&null!=e._timescale&&parseInt(e._timescale)||1}t.SegmentTemplateMPDHandler=function(){function e(e,t){this.context=e,this.sourceContext=t,this.settings=e.settings,this.manifestService=e.serviceManager.get(r.ServiceName.ManifestService,t.sourceIdentifier),this.time=0}return e.prototype.getStartNumber=function(){var e=this.getTemplate(this.currentRepresentationId);return e&&e.hasOwnProperty("_startNumber")?parseInt(e._startNumber):1},e.prototype.ml=function(){var e=this.getTemplate(this.currentRepresentationId);return e&&e._endNumber?parseInt(e._endNumber):NaN},e.prototype.setAdaptationSetId=function(e,t,n){void 0===t&&(t=null),void 0===n&&(n={isManifestUpdate:!1}),this.currentAdaptationSetId=e,this.currentRepresentationId=t;var i=!this.currentRepresentationId||!!this.manifestService.getRepresentationById(this.currentRepresentationId),r=this.manifestService.getAdaptationSet(this.currentAdaptationSetId);this.currentRepresentationId&&i||(this.currentRepresentationId=r.Representation[0]._internalId),this.getTemplate(this.currentRepresentationId)?this.ll||this.setIndex(this.getStartNumber()):this.context.logger.debug("No template found in SegmentTemplateMPDHandler."),this.resolvePendingSegmentInfoRequests()},e.prototype.getCurrentPeriod=function(){return this.manifestService.getPeriod(this.currentRepresentationId||this.currentAdaptationSetId)},e.prototype.setRepresentationId=function(e){return!!this.manifestService.getRepresentationById(e)&&(this.currentRepresentationId=e,!0)},e.prototype.getInitSegmentInfo=function(e){var t=this.getTemplate(e),n=this.manifestService.getRepresentationById(e);return(0,d.isInitializationStringNode)(t)?(0,d.provideSegmentInfoFromInitializationProperty)(t,n):null},e.prototype.nl=function(){return parseFloat(this.getTemplate(this.currentRepresentationId)._availabilityTimeOffset)||0},e.prototype.ol=function(e){var t=this.getExpectedPresentationTime(e);return t-=this.nl(),(0,s.toMilliSeconds)(t+this.getSegmentDuration()+this.settings.LIVE_EDGE_DISTANCE)},e.prototype.getTemplate=function(e){var t=this.manifestService.getRepresentationById(e);if(null==t?void 0:t.SegmentTemplate)return t.SegmentTemplate[0]},e.prototype.pl=function(){var e;return(null==(e=this.getCurrentPeriod())?void 0:e.start)||0}
vendor: 4,792 bytes, line 1
1,e.prototype.isExpectedSegmentPlaybackTimeExceedingPeriodDuration=function(e){var t=this.ml();if(isFinite(t))return e>t;var n=this.getCurrentPeriod(),i=(null==n?void 0:n._duration)?n.start+n.duration:1/0;return this.getExpectedPresentationTime(e)>=i},e.prototype.checkIfSegmentAvailable=function(e){return this.ol(e)<=Date.now()},e.prototype.getNextSegmentInfo_=function(){var e={isInitSegment:!1,presentationTimeOffset:this.getTimestampOffset()},t=this.getTemplate(this.currentRepresentationId);if(!t||!t._media||!this.manifestService.representationExists(this.currentRepresentationId))return null;if(this.manifestService.isLive()){var n=this.checkIfSegmentAvailable(this.ll),i=this.isExpectedSegmentPlaybackTimeExceedingPeriodDuration(this.ll);if(!n||i)return null;e.wallClockTime=this.ol(this.ll)-(0,s.toMilliSeconds)(this.getSegmentDuration())}var r=this.manifestService.getRepresentationById(this.currentRepresentationId);return e.periodId=null==r?void 0:r._internalId.periodId,e.url=(0,p.default)(t._media,r,this.ll,this.time),e.segmentNumber=this.ll,e.startTime=this.getExpectedPresentationTime(this.ll),this.setIndex(this.ll+1),e},e.prototype.getNextSegmentInfo=function(e){var t=this.getNextSegmentInfo_();return t?Promise.resolve(t):this.queueSegmentInfoRequest({time:e})},e.prototype.queueSegmentInfoRequest=function(e){var t=this;return this.pendingSegmentInfoRequest?Promise.reject("fail"):new Promise(function(n,r){t.pendingSegmentInfoRequest=i(i({},e),{resolve:n,reject:r})})},e.prototype.resolvePendingSegmentInfoRequests=function(){if(this.pendingSegmentInfoRequest){var e=this.getNextSegmentInfo_(),t=this.isExpectedSegmentPlaybackTimeExceedingPeriodDuration(this.ll);e?(this.pendingSegmentInfoRequest.resolve(e),this.pendingSegmentInfoRequest=null):t&&(this.pendingSegmentInfoRequest.reject(c.SegmentInfoError.SEGMENT_EXCEEDING_PERIOD_DURATION),this.pendingSegmentInfoRequest=null)}},e.prototype.getSegmentInfos=function(e){var t=this,n={};return this.manifestService.getAdaptationSet(this.currentRepresentationId).Representation.forEach(function(i){var r,o,s,a=i._internalId,l=t.getTemplate(a),c=[],d=t.getSeekableRange().end-t.getSeekableRange().start,h=0,f=t.manifestService.isLive();f?(s=t.time-d,r=t.ll-d/t.getSegmentDuration(),o=t.ll):(s=l._presentationTimeOffset||0,o=parseInt((r=0)+d/t.getSegmentDuration()));for(var g=r;g<=o;g++){var v={};v.duration=t.getSegmentDuration(),v.startTime=f?t.getExpectedPresentationTime(g):h*t.getSegmentDuration();var y=(0,p.default)(l._media,i,r+h,s+h*t.getSegmentDuration());v.url=e?u.URLHelper.concatBaseUrlWithPartial(e,y):y,v.url=u.URLHelper.appendQueryParametersToUrl(v.url,t.settings.QUERY_PARAMETERS),c.push(v),h++}n[a.representationId]=c}),n},e.prototype.getSubtitleUrl=function(){var e=this.manifestService.getRepresentationById(this.currentRepresentationId).BaseURL[0];return e.url||e},e.prototype.ql=function(){var e=this.getTemplate(this.currentRepresentationId);return e&&e.hasOwnProperty("_liveEdgeNumber")},e.prototype.rl=function(){if(this.ql())return parseInt(this.getTemplate(this.currentRepresentationId)._liveEdgeNumber)},e.prototype.getSegmentDuration=function(){var e=this.getTemplate(this.currentRepresentationId),t=Number(null==e?void 0:e._duration),n=Number(null==e?void 0:e._timescale);return isNaN(t)?1:isNaN(n)?t:t/n},e.prototype.seekTo=function(e){e>-1&&this.setIndex(this.sl(e))},e.prototype.getTimescale=function(){return h(this.getTemplate(this.currentRepresentationId))},e.prototype.getExpectedPresentationTime=function(e){var t=this.pl();return(e-this.getStartNumber())*this.getSegmentDuration()+t},e.prototype.sl=function(e){var t=this.getSegmentDuration();return Math.floor(Math.max(e-this.pl()-t/2,0)/t)+this.getStartNumber()},e.prototype.getActualTimeShiftBufferDepth=function(){var e=this.tl();return e.end-e.start},e.prototype.tl=function(){var e=(0,o.getStartTimeOffset)(this.ul().getState()),t=this.manifestService.getMediaPresentationDuration()||1/0;return this.manifestService.isLive()?this.wl(t):this.vl(e,t)},e.prototype.ul=function(){return this.context.serviceManager.get(r.ServiceName.SourceStoreService,this.sourceContext.sourceIdentifier)},e.prototype.vl=function(e,t){return{start:e,end:isFinite(t)?e+t:0}},e.prototype.wl=function(e){var t=(this.manifestService.getFirstPeriod()||{start:0}).start,n=Math.min(-1*this.manifestService.getTimeShiftBufferDepthSeconds(),(0,s.toSeconds)(Date.now()-this.manifestService.getAvailabilityStartTime())),i=this.getLiveEdgeTime();return{start:Math.max(t,i-n),end:i}},e.prototype.getSeekableRange=function(){var e=this.tl();if(this.manifestService.isLive()){var t=this.manifestService.getDesiredDistanceToLiveEdge();e.end=Math.max(e.end-t,e.start)}return e},e.prototype.hasNext=function(e){var t=this.isExpectedSegmentPlaybackTimeExceedingPerio
1dDuration(this.ll),n=Math.ceil(e/this.getSegmentDuration())+this.getStartNumber()-1;return!t&&this.ll<=n},e.prototype.getTimestampOffset=function(){var e=this.getCurrentPeriod(),t=0,n=this.getTemplate(this.currentRepresentationId);return n&&n._presentationTimeOffset&&(t=n._presentationTimeOffset/this.getTimescale()),e&&(t-=e.start),t},e.prototype.xl=function(e,t){var n=this.manifestService.getPeriod(e)||this.getCurrentPeriod();return this.manifestService.isLastPeriod(e.periodId)?n&&(0,a.isNumber)(n.duration)&&isFinite(n.duration)?n.duration:n&&n.start?(0,s.toSeconds)(t)-n.start:this.manifestService.calculateCumulativePeriodDuration(e.periodId):this.manifestService.getPeriodDuration(e.periodId)},e.prototype.yl=function(e){var t=Date.now(),n=(0,s.toSeconds)(t-this.manifestService.getRequestTimestamp());return this.ql()?this.rl()+Math.floor(n/this.getSegmentDuration()):this.manifestService.isLive()&&this.manifestService.getManifest()._availabilityStartTime?Math.floor(this.xl(e,t)/this.getSegmentDuration()+this.getStartNumber()):this.getStartNumber()},e.prototype.zl=function(e){return Math.max(this.yl(e),this.getStartNumber())},e.prototype.getIndex=function(){return this.ll},e.prototype.setIndex=function(e){this.ll=e},e.prototype.getLiveEdgeTime=function(){return(0,s.toSeconds)(Date.now())},e.prototype.timeShift=function(e,t){if(void 0===t&&(t=this.currentRepresentationId.periodId),this.manifestService.isLive()){var n=this.ll,i=this.zl(new l.PeriodId(t));0===e?(this.setIndex(i),this.context.logger.debug("timeShift changes index from "+n+" to "+this.ll+" [back to live edge]")):(this.setIndex(i+Math.floor(e/this.getSegmentDuration())),this.ll<this.getStartNumber()&&this.setIndex(this.getStartNumber()),this.context.logger.debug("timeShift changes index from "+n+" to "+this.ll))}},e.prototype.updateRepresentation=function(e){return this.currentRepresentationId=e,Promise.resolve(e)},e.prototype.isSegmentInfoLoaded=function(e){return!0},e.prototype.rewindOneSegment=function(){return this.setIndex(this.ll-1),this.ll<this.getStartNumber()&&(this.context.logger.debug("Template number is smaller than start number, probably a discontinuity. Using start number."),this.setIndex(this.getStartNumber())),!0},e.prototype.getPendingSegmentInfoRequest=function(){return this.pendingSegmentInfoRequest},e.prototype.setPendingSegmentInfoRequest=function(e){this.pendingSegmentInfoRequest=e},e.prototype.canSwitchRepresentation=function(e){return!0},e.prototype.getLatestTimeForPossibleSwitch=function(e){return e},e.prototype.adjustTimeToNextSegmentStart=function(e){return e},e.prototype.dispose=function(){this.settings=null,this.manifestService=null,this.currentRepresentationId=null,this.currentAdaptationSetId=null,this.pendingSegmentInfoRequest=null},e.prototype.setTimestampOffset=function(e,t){},e}()},31439:function(e,t,n){var i,r=this&&this.__extends||(i=function(e,t){return(i=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])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__assign||function(){return(o=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.SegmentTimelineMPDHandler=void 0;var s=n(74853),a=n(89927),u=n(58313),l=n(54053),c=n(4771),d=n(12054),p=n(39761);function h(e,t,n){var i;(i=e.entries).push.apply(i,t),e.latestTime+=n*t.length,e.latestOriginalTime+=n*t.length,e.index+=t.length}function f(e){return Math.round(1e8*e)/1e8}t.SegmentTimelineMPDHandler=function(e){function t(t,n){var i=e.call(this,t,n)||this;return i.Al=0,i.Bl=null,i.Cl=[],i.Dl=!0,i.Hl=!1,i.El=1,i.Fl=0,i.Gl=0,i}return r(t,e),t.prototype.setAdaptationSetId=function(t,n,i){void 0===n&&(n=null),void 0===i&&(i={isPeriodSwitch:!1,isManifestUpdate:!1}),this.currentAdaptationSetId=t,this.currentRepresentationId=n;var r=!this.currentRepresentationId||!!this.manifestService.getRepresentationById(this.currentRepresentationId),o=this.manifestService.getAdaptationSet(this.currentAdaptationSetId);this.currentRepresentationId&&r||(this.currentRepresentationId=o.Representation[0]._internalId);var s=this.getTemplate(this.currentRepresentationId);s?(this.setTimeline(s,i.isPeriodSwitch),this.getIndex()||e.prototype.setIndex.call(this,this.get
vendor: 8,706 bytes, line 1
1StartNumber())):this.context.logger.debug("No template found in SegmentTemplateMPDHandler."),this.resolvePendingSegmentInfoRequests()},t.prototype.setRepresentationId=function(e){if(this.manifestService.getRepresentationById(e)){this.currentRepresentationId=e;var t=this.getTemplate(this.currentRepresentationId);return t&&this.setTimeline(t),!0}return!1},t.prototype.Il=function(e){return null!=(null==e?void 0:e.start)&&isFinite(e.start)?e.start:0},t.prototype.Jl=function(){this.manifestService.isLive()&&this.Dl&&(this.Hl||this.timeShift(0),this.Dl=!1)},t.prototype.Kl=function(e){return!(null==e?void 0:e._media)||!this.manifestService.representationExists(this.currentRepresentationId)},t.prototype.Ll=function(e){var t=this.Cl[this.Al];t&&(e.wallClockTime=(0,a.toMilliSeconds)(t.ot/this.El-this.getTimestampOffset()))},t.prototype.getNextSegmentInfo_=function(){var t,n,i={isInitSegment:!1,presentationTimeOffset:this.getTimestampOffset()},r=this.getTemplate(this.currentRepresentationId);if(this.Kl(r)||(this.Jl(),!(this.Cl.length>0&&this.Al<this.Cl.length)))return null;var o=this.Cl[this.Al];e.prototype.setIndex.call(this,o.i),this.time=o.ot,i.duration=o.duration,i.mediaPresentationTime=o.t,i.segmentNumber=o.i;var s=null!=(n=null==(t=this.getCurrentPeriod())?void 0:t.start)?n:0;if(i.startTime=o.playbackTime+s,this.manifestService.isLive()){if(this.isExpectedSegmentPlaybackTimeExceedingPeriodDuration(this.Al))return null;this.Ll(i)}var a=this.manifestService.getRepresentationById(this.currentRepresentationId);return a?(i.periodId=null==a?void 0:a._internalId.periodId,i.url=(0,c.default)(r._media,a,this.getIndex(),this.time),e.prototype.setIndex.call(this,this.getIndex()+1),this.Al++,i):null},t.prototype.getNextSegmentInfo=function(e){var t=this.getNextSegmentInfo_();return t?Promise.resolve(t):this.queueSegmentInfoRequest({time:e})},t.prototype.queueSegmentInfoRequest=function(e){var t=this;return this.pendingSegmentInfoRequest?Promise.reject("fail"):new Promise(function(n,i){t.pendingSegmentInfoRequest=o(o({},e),{resolve:n,reject:i})})},t.prototype.resolvePendingSegmentInfoRequests=function(){if(this.pendingSegmentInfoRequest){var e=this.getNextSegmentInfo_();if(e)this.pendingSegmentInfoRequest.resolve(e),this.pendingSegmentInfoRequest=null;else if(!this.manifestService.isSmoothManifest()){var t=this.getCurrentPeriod();if(isFinite(t.duration)){var n=this.getTimelineDuration(),i=n/this.getTimelineLength(),r=t.start+n,o=t.duration-i/2;isFinite(o)&&r>=o&&(this.pendingSegmentInfoRequest.reject(l.SegmentInfoError.PERIOD_COMPLETE),this.pendingSegmentInfoRequest=null)}}}},t.prototype.getSegmentInfos=function(e){var t=this,n={};return this.manifestService.getAdaptationSet(this.currentRepresentationId).Representation.forEach(function(i){for(var r=i._internalId,o=t.getTemplate(r),s=[],a=t.manifestService.isLive(),l=t.getTimelineLength(),d=0,p=0;p<l;p++){var h=t.Cl[p],f={};f.duration=h.duration,a?f.startTime=t.getExpectedPresentationTime(p):(f.startTime=d,d+=h.duration);var g=(0,c.default)(o._media,i,h.i,h.ot);f.url=e?u.URLHelper.concatBaseUrlWithPartial(e,g):g,f.url=u.URLHelper.appendQueryParametersToUrl(f.url,t.settings.QUERY_PARAMETERS),s.push(f)}n[r.representationId]=s}),n},t.prototype.getSubtitleUrl=function(){var e=this.manifestService.getRepresentationById(this.currentRepresentationId).BaseURL[0];return e.url||e},t.prototype.getSegmentDuration=function(){return this.getSegmentDurationCurrentElement()},t.prototype.seekTo=function(t){if(t>-1){var n=this.Il(this.getCurrentPeriod());this.Hl=!1,isFinite(n)&&(t-=n);for(var i=1;i<this.Cl.length;i++)if(this.Cl[i].playbackTime>t)return this.Al=i-1,e.prototype.setIndex.call(this,this.Cl[this.Al].i),this.Dl=!1,this.getIndex();this.Al=Math.max(this.Cl.length-1,0)}return e.prototype.setIndex.call(this,this.Cl[this.Al].i),this.getIndex()},t.prototype.getExpectedPresentationTime=function(e){var t,n;return(null!=(n=null==(t=this.getCurrentPeriod())?void 0:t.start)?n:0)+this.Cl[e].playbackTime},t.prototype.hasNext=function(e){if(this.Al<this.Cl.length){var t=this.Cl[0].t,n=this.Cl[this.Al];if(this.isExpectedSegmentPlaybackTimeExceedingPeriodDuration(this.Al))return!1;if(n)return n.t-t<=e*this.El}return!1},t.prototype.getTimestampOffset=function(){var e=this.getCurrentPeriod(),t=this.Fl/this.El;return e&&(t-=e.start),t},t.prototype.setIndex=function(t){if(e.prototype.setIndex.call(this,t),this.Cl&&this.Cl.length>0)for(var n=0;n<this.Cl.length;n++)this.Cl[n].i===t&&(this.Al=n)},t.prototype.getLiveEdgeTime=function(){if(!this.manifestService.isLive())return -1;var t=this.manifestService.getLastPeriod(),n=this.getCurrentPeriod();if(null==t||(null==n?void 0:n._id)===t._id)return this.Il(n)+this.Ml()/this.El;var i=(0,p.getFirstAvSegmentTemplateFromPeriod)(t);return(null==i?void 0:i.SegmentTimeline)?this.Il(t)+(0,p.calculateTimelineEnd)(i):e.prototype.getLiveEdgeTime.call(this)},t.prototype.Ml=function(){if(!this.Cl.length)return 0;var e=this.Cl[this.Cl.length-1];return e.t+e.d},t.prototype.timeShift=function(t,n){if(this.manifestService.isLive()&&!(this.Cl.length<1)){this.Hl=!1;for(var i=this.Cl[0].t,r=this.Ml(),o=t*this.El,s=Math.max(this.Gl,this.settings.MIN_TIMELINE_LIVE_OFFSET)*this.El,a=Math.max(i+s,r+o),u=this.Cl.length-1;u>=0;u--)if(this.Cl[u].t<=a){this.Al=u;break}(this.Al>=this.Cl.length||this.Al<=0)&&(this.context.logger.debug("timeline index ran out of bounds on timeShift, falling back to 0"),this.Al=0),this.context.logger.debug("timeShift changes index to "+this.Al),this.Dl=!1,e.prototype.setIndex.call(this,this.Cl[this.Al].i)}},t.prototype.updateRepresentation=function(e){return this.currentRepresentationId=e,Promise.resolve(e)},t.prototype.isSegmentInfoLoaded=function(e){return!0},t.prototype.rewindOneSegment=function(){return this.Al--,this.Al<0&&(this.context.logger.debug("Timeline array index is smaller than 0, probably a discontinuity. Using 0."),this.Al=0),!0},t.prototype.Nl=function(e,t){for(var n,i={entries:[],latestTime:0,latestOriginalTime:0,lastPreviousTimelineEntryIndex:0,index:this.getStartNumber()},r=0,o=0,s=0;s<e.length;s++)for(var a=0,u=null!=(n=e[s].S)?n:[];a<u.length;a++){var l=u[a],c=(0,p.parseStringToNumber)(l._r),d=parseInt(l._d);if(l.hasOwnProperty("_t")){var f=(0,p.parseStringToNumber)(l._t);i.latestOriginalTime=f,i.latestTime=f-this.Fl}for(;i.latestTime+d<=0&&c>=0;)this.context.logger.debug("Negative timeline entry detected, discarding segment. Time: ".concat(i.latestTime,", presentationTimeOffset: ").concat(this.Fl,".")),i.latestTime+=d,i.latestOriginalTime+=d,c--;for(var g=this.Ql(i,t,d,c),v=0;v<g.length;v++)g[v].i=i.index+v;r+=g.length,h(i,g,d);var y=c-g.length+1;o+=y,h(i,this.Pl(i,y,d),d)}return this.Ol(r,o),i.entries},t.prototype.Ol=function(e,t){var n;this.context.logger.debug("[SegmentTimeline][".concat(null==(n=this.currentRepresentationId)?void 0:n.representationId,"] Re-using ").concat(e," entries, adding ").concat(t," new entries"))},t.prototype.Pl=function(e,t,n){for(var i=[],r=0;r<t;r++){var o=e.latestTime+n*r,s={d:n,t:o,ot:e.latestOriginalTime+n*r,i:e.index+r,playbackTime:o/this.El,duration:n/this.El};i.push(s)}return i},t.prototype.Ql=function(e,t,n,i){var r=(0,s.findIndexWithin)(t,e.lastPreviousTimelineEntryIndex,t.length,function(t){return t.t===e.latestTime&&t.d===n});if(-1===r)return[];var o=function(e,t,n,i){for(var r=e[t].t,o=i;o>0;o--){var s=t+o,a=e[s],u=r+n*o;if(a&&a.t===u&&a.d===n)return s}return t}(t,r,n,i);return e.lastPreviousTimelineEntryIndex=o,t.slice(r,o+1)},t.prototype.getTimelineDuration=function(){var e=this;return this.Cl&&this.Cl.length>0&&isFinite(this.El)?this.Cl.reduce(function(t,n){return t+n.d/e.El},0):0},t.prototype.getTimelineLength=function(){return this.Cl?this.Cl.length:0},t.prototype.setTimeline=function(e,t){void 0===t&&(t=!1);var n=e.SegmentTimeline;if(this.Hl=this.Hl||!!t,n&&this.Bl!==n){this.Bl=n;var i=this.Rl(),r=this.getTimescale();this.El=r,this.Fl=parseFloat(String(e._presentationTimeOffset))||0;var o=this.Nl(n,this.Cl);o.length>0&&(this.Gl=o[0].d/r),this.Sl(o,r,i),this.Cl=o}},t.prototype.Rl=function(){return this.Cl&&this.Cl.length>0?this.El:this.getTimescale()},t.prototype.Sl=function(t,n,i){var r,o=!1;if(this.Cl&&this.Cl.length>0?r=(o=this.Al>=this.Cl.length)?this.Cl[this.Cl.length-1]:this.Cl[this.Al]:(this.Al=0,e.prototype.setIndex.call(this,0)),r){for(var s=t.length-1;s>=0;s--)if(function(e,t,n,i){var r=f(e.t/t),o=f(r+e.d/t),s=f(n.t/i);return r<=s&&s<o}(t[s],n,r,i)){this.Al=s+ +!!o,e.prototype.setIndex.call(this,t[s].i+ +!!o);break}}},t.prototype.getSegmentDurationCurrentElement=function(){var e=this.Cl[this.Al];return e?e.d/this.El:1},t.prototype.dispose=function(){this.settings=null,this.Cl=[]},t}(d.SegmentTemplateMPDHandler)}
1,4771:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n,r){var o=e.match(/(\$((RepresentationID)|(Bandwidth)|(Time)|(Number(%([\d]*[A-Za-z]))?)|())\$)/g),s=null!=n,a=t.hasOwnProperty("_bandwidth"),u=null!=r,l=[].concat(o).filter(function(e){return e}).map(function(e){return e.substring(1,e.length-1)}).map(function(e){return[e,function(e){if(0===e.indexOf("Number")&&s){if(e.indexOf("%")>-1){for(var i,o,l,c,d,p=(o=parseInt((i=e.substring(e.indexOf("%")+1)).substring(0,i.length-1)),l=i[i.length-1].toLowerCase(),c=0!==i[i.length-1].indexOf(l),[0===l.indexOf("o")?8:0===l.indexOf("x")?16:(l.indexOf("d"),10),o,c]),h=p[0],f=p[1],g=p[2],v=(d=n.toString(h),g?d.toUpperCase():d.toLowerCase());v.length<f;)v="0"+v;return v}return String(n)}return 0===e.indexOf("RepresentationID")?t._internalId.representationId:0===e.indexOf("Bandwidth")&&a?String(t._bandwidth):0===e.indexOf("Time")&&u?String(r):""===e?"$":void 0}(e)]}).filter(function(e){return e[1].length>0}).reduce(function(e,t){var n=t[0],i=t[1];return e.replace("$".concat(n,"$"),i)},e);return(0,i.forceReallocation)(l)};var i=n(20649)},39761:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.getFirstAvSegmentTemplateFromPeriod=function(e){var t,n=e.AdaptationSet.find(function(e){return i.MimeTypeHelper.isAV(e._mimeType)}),r=null==(t=null==n?void 0:n.Representation[0])?void 0:t.SegmentTemplate;return null==r?void 0:r[0]},t.calculateTimelineEnd=function(e){for(var t,n,i=parseFloat(String(e._presentationTimeOffset))||0,s=(0,r.getTimescaleFromTemplate)(e),a=0,u=0,l=null!=(t=e.SegmentTimeline)?t:[];u<l.length;u++)for(var c=0,d=null!=(n=l[u].S)?n:[];c<d.length;c++){var p=d[c],h=o(p._r),f=parseInt(p._d);p.hasOwnProperty("_t")&&(a=Math.max(0,o(p._t)-i)),a+=f*(h+1)}return a/s},t.parseStringToNumber=o;var i=n(85434),r=n(12054);function o(e,t){return void 0===t&&(t=0),e?parseInt(e):t}}},function(e){return e(e.s=66759)}])}()},77017:function(e,t,n){"use strict";var i,r=this&&this.__extends||(i=function(e,t){return(i=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])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.QuickSeekButton=void 0;var o=n(94474),s=n(24379),a=n(41113);t.QuickSeekButton=function(e){function t(t){void 0===t&&(t={});var n=e.call(this,t)||this;n.onSeek=function(e){n.currentSeekTarget=e.seekTarget},n.onSeekedOrTimeShifted=function(){n.currentSeekTarget=null},n.onTimeShift=function(e){n.currentSeekTarget=n.player.getTimeShift()+(e.target-e.position)},n.currentSeekTarget=null,n.config=n.mergeConfig(t,{seekSeconds:-10,cssClass:"ui-quickseekbutton"},n.config);var i=n.config.seekSeconds<0?"rewind":"forward";return n.config.text=n.config.text||s.i18n.getLocalizer("quickseek.".concat(i)),n.config.ariaLabel=n.config.ariaLabel||s.i18n.getLocalizer("quickseek.".concat(i),{seekSeconds:Math.abs(n.config.seekSeconds)}),n.getDomElement().data(n.prefixCss("seek-direction"),i).data(n.prefixCss("seek-seconds"),Math.abs(n.config.seekSeconds).toString()),n}return r(t,e),t.prototype.configure=function(t,n){var i,r,o=this;e.prototype.configure.call(this,t,n),this.player=t;var s=function(e,t){e&&!t?o.hide():o.show()},u=new a.PlayerUtils.TimeShiftAvailabilityDetector(t);u.onTimeShiftAvailabilityChanged.subscribe(function(e,t){r=t.timeShiftAvailable,s(i,r)});var l=new a.PlayerUtils.LiveStreamDetector(t,n);l.onLiveChanged.subscribe(function(e,t){s(i=t.live,r)}),u.detect(),l.detect(),this.onClick.subscribe(function(){if((!i||r)&&(!i||!(o.config.seekSeconds>0)||0!==t.getTimeShift())){var e=(null!==o.currentSeekTarget?o.currentSeekTarget:i?t.getTimeShift():t.getCurrentTime())+o.config.seekSeconds;if(i){var n=a.PlayerUtils.clampValueToRange(e,t.getMaxTimeShift(),0);t.timeShift(n)}else{var n=a.PlayerUtils.clampValueToRange(e,0,t.getDuration());t.seek(n)}}}),this.player.on(this.player.exports.PlayerEvent.Seek,this.onSeek),this.player.on(this.player.exports.PlayerEvent.Seeked,this.onSeekedOrTimeShifted),this.player.on(this.player.exports.PlayerEvent.TimeShift,this.onTimeShift),this.player.on(this.player.exports.PlayerEvent.TimeShifted,this.onSeekedOrTimeShifted)},t.prototype.release=function(){e.prototype.release.call(this);var t=this.player;null==t||t.off(t.exports.PlayerEvent.Seek,this.onSeek),null==t||t.off(t.exports.PlayerEvent.Seeked,this.onSeekedOrTimeShifted),null==t||t.off(t.exports.PlayerEvent.TimeShift,this.onTimeShift),null==t||t.off(t.exports.PlayerEvent.TimeShifted,this.onSeekedOrTimeShifted),this.currentSeekTarget=null,this.player=null},t}(o.Button)}
1,77146:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VttUtils=void 0,(o=n||(n={})).Top="top",o.Bottom="bottom",o.Left="left",o.Right="right",(s=i||(i={})).GrowingRight="lr",s.GrowingLeft="rl";var n,i,r,o,s,a,u=new Map([[n.Top,n.Bottom],[n.Bottom,n.Top],[n.Left,n.Right],[n.Right,n.Left]]),l=function(e,t){t.region?(e.css("position","relative"),e.css("unicode-bidi","plaintext")):(e.css("position","absolute"),e.css("overflow-wrap","break-word"),e.css("overflow","hidden"),e.css("flex-flow","column")),e.css("display","inline-flex")},c=function(e,t,n,i){switch(t.lineAlign){case"center":g(e,n,i);break;case"end":v(e,n,i)}},d=function(e,t,n,i){var r=u.get(n);if("auto"===t.line&&t.vertical)return void e.css(r,"0");if("auto"!==t.line||t.vertical){var o=parseFloat(t.line);if(t.snapToLines){var s=Number(t.line);s<0&&(s=21+s),o=100*(i.height/21*s)/i.height}"end"!==t.lineAlign&&e.css(r,"".concat(o,"%")),c(e,t,n,o)}},p=function(e,t,r){switch(t.vertical){case"":e.css("writing-mode","horizontal-tb"),e.css(n.Bottom,"0"),d(e,t,n.Bottom,r);break;case i.GrowingRight:h(e,n.Right,t,r);break;case i.GrowingLeft:h(e,n.Left,t,r)}},h=function(e,t,i,r){var o=t===n.Right?"vertical-lr":"vertical-rl";e.css("writing-mode",o),e.css(n.Top,"0"),d(e,i,t,r)},f=function(e,t,n){if("auto"===t.position)e.css(n,"0");else switch(t.positionAlign){case"line-left":e.css(n,"".concat(t.position,"%")),e.css(u.get(n),"auto"),e.css("justify-content","flex-start");break;case"center":e.css(n,"".concat(t.position-t.size/2,"%")),e.css(u.get(n),"auto"),e.css("justify-content","center");break;case"line-right":e.css(n,"auto"),e.css(u.get(n),"".concat(100-t.position,"%")),e.css("justify-content","flex-end");break;default:e.css(n,"".concat(t.position,"%")),e.css("justify-content","flex-start")}},g=function(e,t,i){switch(t){case n.Bottom:e.css("transform","translateY(-50%)");break;case n.Left:e.css("transform","translateX(50%)");break;case n.Right:e.css("transform","translateX(-50%)")}},v=function(e,t,n){e.css(t,"".concat(100-n,"%"))};(a=r||(t.VttUtils=r={})).setVttCueBoxStyles=function(e,t){var i=e.vtt,r=e.getDomElement();l(r,i),e.getText().split("<br />").length,p(r,i,t);var o="middle"===i.align?"center":i.align;r.css("text-align",o);var s=i.size;""===i.vertical?(r.css("width","".concat(s,"%")),f(r,i,n.Left)):(r.css("height","".concat(s,"%")),f(r,i,n.Top))},a.setVttRegionStyles=function(e,t,i){var r=e.getDomElement(),o=i.width*t.viewportAnchorX/100-i.width*t.width/100*t.regionAnchorX/100,s=i.height*t.viewportAnchorY/100-28*t.lines*t.regionAnchorY/100;r.css("position","absolute"),r.css("overflow","hidden"),r.css("width","".concat(t.width,"%")),r.css(n.Left,"".concat(o,"px")),r.css(n.Right,"unset"),r.css(n.Top,"".concat(s,"px")),r.css(n.Bottom,"unset"),r.css("height","".concat(28*t.lines,"px"))}},78196:function(e,t,n){"use strict";var i,r=this&&this.__extends||(i=function(e,t){return(i=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])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.InteractiveSettingsPanelItem=void 0;var o=n(21616),s=n(85704),a=n(38661),u=n(90753);t.InteractiveSettingsPanelItem=function(e){function t(t){var n=e.call(this,t)||this;return n.events={onClick:new s.EventDispatcher},n}return r(t,e),t.prototype.configure=function(t,n){var i=this;e.prototype.configure.call(this,t,n);var r=function(e){e.preventDefault(),e.stopPropagation(),i.onClickEvent()};this.getDomElement().on("click",r);var o=function(e){((0,a.getKeyMapForPlatform)()[e.keyCode]===u.Action.SELECT||["Enter"," "].includes(e.key)||["Enter","Space"].includes(e.code))&&r(e)};this.onFocusedChanged.subscribe(function(e,t){t.focused?i.getDomElement().on("keydown",o):i.getDomElement().off("keydown",o)})},t.prototype.onClickEvent=function(){this.events.onClick.dispatch(this)},Object.defineProperty(t.prototype,"onClick",{get:function(){return this.events.onClick.getEvent()}
vendor: 7,852 bytes, line 1
1,enumerable:!1,configurable:!0}),t}(o.SettingsPanelItem)},78976:function(e,t,n){"use strict";var i,r=this&&this.__extends||(i=function(e,t){return(i=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])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__assign||function(){return(o=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.RecommendationItem=void 0;var s=n(86051),a=n(85704),u=n(4437),l=n(30194),c=n(27717);function d(e){return"url"in e}t.RecommendationItem=function(e){function t(t){var n=e.call(this,t)||this;return n.events={onClick:new a.EventDispatcher},n.config=n.mergeConfig(t,{cssClass:"ui-recommendation-item",recommendationConfig:null,tabIndex:0},n.config),n}return r(t,e),t.prototype.configure=function(t,n){var i=this;e.prototype.configure.call(this,t,n),d(this.config.recommendationConfig.resource)||this.onClick.subscribe(function(){t.load(i.config.recommendationConfig.resource),t.play()})},t.prototype.toDomElement=function(){var e,t,n=this,i=this.config.recommendationConfig,r=i.resource,s={};d(r)?(e="a",s={href:r.url},t=r.thumbnail):(e="button",t=r.poster);var a=new u.DOM(e,o(o({id:this.config.id,class:this.getCssClasses()},s),{tabindex:this.config.tabIndex.toString()}),this);t&&a.css({"background-image":'url("'.concat(t,'")')});var p=new u.DOM("div",{class:this.prefixCss("title-container")},this),h=new l.Label({text:i.title,cssClass:"title"});if(p.append(h.getDomElement()),a.append(p),null!=i.duration){var f=new l.Label({text:i.duration?c.StringUtils.secondsToTime(i.duration):"",cssClass:"duration"});a.append(f.getDomElement())}return d(r)||a.on("click",function(e){e.preventDefault(),e.stopPropagation(),n.onClickEvent()}),a},t.prototype.onClickEvent=function(){this.events.onClick.dispatch(this)},Object.defineProperty(t.prototype,"onClick",{get:function(){return this.events.onClick.getEvent()},enumerable:!1,configurable:!0}),t}(s.Component)},80432:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Timeout=void 0,t.Timeout=function(){function e(e,t,n){void 0===n&&(n=!1),this.delay=e,this.callback=t,this.repeat=n,this.timeoutOrIntervalId=0,this.active=!1,this.suspended=!1}return e.prototype.start=function(){return this.reset(),this},e.prototype.clear=function(){this.clearInternal()},e.prototype.suspend=function(){return this.suspended=!0,this.clearInternal(),this},e.prototype.resume=function(e){return this.suspended=!1,e&&this.reset(),this},e.prototype.reset=function(){var e=this;this.clearInternal(),this.suspended||(this.repeat?this.timeoutOrIntervalId=setInterval(this.callback,this.delay):this.timeoutOrIntervalId=setTimeout(function(){e.active=!1,e.callback()},this.delay),this.active=!0)},e.prototype.isActive=function(){return this.active},e.prototype.clearInternal=function(){this.repeat?clearInterval(this.timeoutOrIntervalId):clearTimeout(this.timeoutOrIntervalId),this.active=!1},e}()},80582:function(e,t,n){"use strict";var i,r=this&&this.__extends||(i=function(e,t){return(i=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])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(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 o=n(8675),s=n(54852),a=n(85704),u=n(80432),l=n(30194),c=n(24379);t.TouchControlOverlay=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:!!t.enterFullscreenOnInitialPlayback}),n.seekForwardLabel=new l.Label({text:"",for:n.getConfig().id,cssClass:"seek-forward-label",hidden:!0}),n.seekBackwardLabel=new l.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 r(t,e),t.prototype.configure=function(n,i){var r=this;e.prototype.configure.call(this,n,i);var o=0,s=0;this.doubleTapTimeout=new u.Timeout(this.config.seekDoubleTapTimeout,function(){r.couldBeDoubleTapping=!1,s=0,setTimeout(function(){return r.hideSeekAnimationElements()},150)});var a=!1,l=!1,d=function(){r.playbackToggleButton.show()},p=function(){r.playbackToggleButton.hide()};i.onBufferingShow.subscribe(function(){a=!0,p()}),i.onBufferingHide.subscribe(function(){a=!1,l&&d()}),i.onControlsHide.subscribe(function(){l=!1,p()}),i.onControlsShow.subscribe(function(){l=!0,a||d()}),this.touchControlEvents.onSeekBackward.subscribe(function(){o-=r.config.seekTime,n.seek(o),r.seekBackwardLabel.setText(Math.abs(Math.round(o-s))+" "+c.i18n.performLocalization(c.i18n.getLocalizer("settings.time.seconds"))),r.seekBackwardLabel.show(),r.getDomElement().addClass(r.prefixCss(r.SEEK_BACKWARD_CLASS)),r.seekForwardLabel.hide(),r.getDomElement().removeClass(r.prefixCss(r.SEEK_FORWARD_CLASS))}),this.touchControlEvents.onSeekForward.subscribe(function(){o+=r.config.seekTime,n.seek(o),r.seekForwardLabel.setText(Math.abs(Math.round(o-s))+" "+c.i18n.performLocalization(c.i18n.getLocalizer("settings.time.seconds"))),r.seekForwardLabel.show(),r.getDomElement().addClass(r.prefixCss(r.SEEK_FORWARD_CLASS)),r.seekBackwardLabel.hide(),r.getDomElement().removeClass(r.prefixCss(r.SEEK_BACKWARD_CLASS))}),this.touchControlEvents.onSingleClick.subscribe(function(e,t){i.getUI().toggleUiShown(),s=o=n.getCurrentTime();var a=t.target.getBoundingClientRect();r.latestTapPosition={x:t.clientX-a.left,y:t.clientY-a.top}}),this.touchControlEvents.onDoubleClick.subscribe(function(e,n){i.getUI().hideUi();var o=n.target;if(o&&o.component instanceof t){var s=o.clientWidth,a=.4*s,u=o.getBoundingClientRect(),l=n.clientX-u.left,c=n.clientY-u.top,d=r.config.seekDoubleTapMargin;Math.abs(r.latestTapPosition.x-l)<=d&&Math.abs(r.latestTapPosition.y-c)<=d&&(l<a?r.touchControlEvents.onSeekBackward.dispatch(r):l>s-a&&r.touchControlEvents.onSeekForward.dispatch(r)),r.latestTapPosition={x:l,y:c}}}),this.getDomElement().on("click",function(e){e.target.component instanceof t&&h(e)});var h=function(e){r.couldBeDoubleTapping?r.onDoubleClickEvent(e):r.onSingleClickEvent(e),r.couldBeDoubleTapping=!0,r.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()}
vendor: 22,026 bytes, line 1
1,enumerable:!1,configurable:!0}),t}(o.Container)},81315:e=>{!function(){"use strict";self,e.exports=(self.webpackChunkbitmovin_player=self.webpackChunkbitmovin_player||[]).push([[270],{97441:function(e,t){var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};function i(e){return void 0===e&&(e=0),{offset:e}}function r(e){return 0===e.length?null:e[0]}function o(e,t){var n=t.indexOf("."),i=[];if(-1===n)for(var r=0;r<e.length;r++)e[r].type===t&&i.push(e[r]);else{var o=t.substring(0,n),s=t.substring(n+1);for(r=0;r<e.length;r++)e[r].type===o&&(i=i.concat(e[r].list(s)))}return i}function s(e,n){e.forEach(function(e){t.ISOBox.prototype._boxParsers[e]=n})}function a(e,t){return e._cursor.offset-e._raw.byteOffset+t<=e.size}Object.defineProperty(t,"__esModule",{value:!0}),t.ISOBox=t.ISOFile=t.ISOBoxer=void 0,t.ISOBoxer={parseBuffer:function(e,n){return void 0===n&&(n={}),new t.ISOFile(e,n).parse()}},t.ISOFile=function(e,t){void 0===t&&(t={}),this.options=n({},t),this.options.iv_size=t.iv_size||8,e&&(this._raw=new DataView(e)),this._cursor=i(),this.boxes=[]},t.ISOFile.prototype.fetch=function(e){var t=this.fetchAll(e,!0);return t.length?t[0]:null},t.ISOFile.prototype.fetchAll=function(e,n){var i=[];return t.ISOFile._sweep.call(this,e,i,n),i},t.ISOFile.prototype.parse=function(){for(this._cursor.offset=0,this.boxes=[];this._cursor.offset<this._raw.byteLength;){var e=t.ISOBox.parse(this);if(void 0===e.type)break;this.boxes.push(e)}return this},t.ISOFile._sweep=function(e,n,i){for(var r in this.type&&this.type===e&&n.push(this),this.boxes){if(n.length&&i)return;t.ISOFile._sweep.call(this.boxes[r],e,n,i)}},t.ISOFile.prototype.get=function(e){return r(this.list(e))},t.ISOFile.prototype.list=function(e){return o(this.boxes,e)},t.ISOBox=function(){this._cursor=i()},t.ISOBox.parse=function(e){var n=new t.ISOBox;return n._offset=e._cursor.offset,n._root=e._root?e._root:e,n._raw=e._raw,n._parent=e,n._parseBox(),e._cursor.offset=n._raw.byteOffset+n._raw.byteLength,n},t.ISOBox.prototype.list=function(e){return o(this.boxes||this.entries||[],e)},t.ISOBox.prototype.get=function(e){return r(this.list(e))},t.ISOBox.prototype._readUint64=function(){return 0x100000000*this._raw.getUint32(this._cursor.offset-this._raw.byteOffset)+this._raw.getUint32(this._cursor.offset-this._raw.byteOffset+4)},t.ISOBox.prototype._readInt64=function(){return 0x100000000*this._raw.getInt32(this._cursor.offset-this._raw.byteOffset)+this._raw.getInt32(this._cursor.offset-this._raw.byteOffset+4)},t.ISOBox.prototype._readInt=function(e){var t=null;switch(e){case 8:t=this._raw.getInt8(this._cursor.offset-this._raw.byteOffset);break;case 16:t=this._raw.getInt16(this._cursor.offset-this._raw.byteOffset);break;case 32:t=this._raw.getInt32(this._cursor.offset-this._raw.byteOffset);break;case 64:t=this._readInt64()}return this._cursor.offset+=e>>3,t},t.ISOBox.prototype._readUint=function(e){var t=null;switch(e){case 8:t=this._raw.getUint8(this._cursor.offset-this._raw.byteOffset);break;case 16:t=this._raw.getUint16(this._cursor.offset-this._raw.byteOffset);break;case 24:t=(this._raw.getUint16(this._cursor.offset-this._raw.byteOffset)<<8)+this._raw.getUint8(this._cursor.offset-this._raw.byteOffset+2);break;case 32:t=this._raw.getUint32(this._cursor.offset-this._raw.byteOffset);break;case 64:t=this._readUint64()}return this._cursor.offset+=e>>3,t},t.ISOBox.prototype._readUintArray=function(e,t){for(var n=Array(t),i=0;i<t;++i)n[i]=this._readUint(e);return n},t.ISOBox.prototype._readFP=function(e){return this._readInt(2*e)/Math.pow(2,e)},t.ISOBox.prototype._readString=function(e){for(var t="",n=0;n<e;n++)t+=String.fromCharCode(this._readUint(8));return t},t.ISOBox.prototype._readHex=function(e){for(var t=[],n=0;n<e;n++){var i=this._readUint(8);t.push((i>>>4).toString(16)),t.push((15&i).toString(16))}return t.join("")},t.ISOBox.prototype._readUUID=function(){return this._readUintArray(8,16)},t.ISOBox.prototype._readTerminatedString=function(){for(var e="";;){var t=this._readUint(8);if(0==t)break;e+=String.fromCharCode(t)}return e},t.ISOBox.prototype._readTemplate=function(e){return this._readUint(e/2)+this._readUint(e/2)/Math.pow(2,e/2)},t.ISOBox.prototype._parseBox=function(){if(this._cursor.offset=this._offset,this._offset+8>this._raw.buffer.byteLength)this._root._incomplete=!0;else{switch(this.size=this._readUint(32),this.type=this._readString(4),1===this.size&&(this.largesize=this._readUint(64)),"uuid"===this.type&&(this.usertype=this._readUUID()),this.size){case 0:this._raw=new DataView(this._raw.buffer,this._offset,this._raw.byteLength-this._cursor.offset);break;case 1:this._offset+this.size>this._raw.buffer.byteLength?(this._incomplete=!0,this._root._incomplete=!0):this._raw=new DataView(this._raw.buffer,this._offset,this.largesize);break;default:this._offset+this.size>this._raw.buffer.byteLength?(this._incomplete=!0,this._root._incomplete=!0):this._raw=new DataView(this._raw.buffer,this._offset,this.size)}!this._incomplete&&this._boxParsers[this.type]&&this._boxParsers[this.type].call(this)}},t.ISOBox.prototype._parseFullBox=function(){this.version=this._readUint(8),this.flags=this._readUint(24)},t.ISOBox.prototype._createDataView=function(){return new DataView(this._raw.buffer,this._cursor.offset,this._raw.byteLength-(this._cursor.offset-this._offset))},t.ISOBox.prototype._boxParsers={},s(["moov","trak","tref","mdia","minf","stbl","edts","dinf","sinf","mvex","moof","traf","mfra","udta","meco","strk","vttc","schi"],function(){for(this.boxes=[];this._cursor.offset-this._raw.byteOffset<this._raw.byteLength;)this.boxes.push(t.ISOBox.parse(this))}),t.ISOBox.prototype._boxParsers.elst=function(){this._parseFullBox(),this.entry_count=this._readUint(32),this.entries=[];for(var e=1;e<=this.entry_count;e++){var n=new t.ISOBox;1===this.version?(n.segment_duration=this._readUint(64),n.media_time=this._readInt(64)):(n.segment_duration=this._readUint(32),n.media_time=this._readInt(32)),n.media_rate_integer=this._readInt(16),n.media_rate_fraction=this._readInt(16),this.entries.push(n)}},t.ISOBox.prototype._boxParsers.emsg=function(){this._parseFullBox(),0===this.version?(this.scheme_id_uri=this._readTerminatedString(),this.value=this._readTerminatedString(),this.timescale=this._readUint(32),this.presentation_time_delta=this._readUint(32),this.event_duration=this._readUint(32),this.id=this._readUint(32)):(this.timescale=this._readUint(32),this.presentation_time=this._readUint(64),this.event_duration=this._readUint(32),this.id=this._readUint(32),this.scheme_id_uri=this._readTerminatedString(),this.value=this._readTerminatedString()),this.message_data=this._createDataView()},s(["free","mdat"],function(){this.data=this._createDataView()}),s(["ftyp","styp"],function(){for(this.major_brand=this._readString(4),this.minor_versions=this._readUint(32),this.compatible_brands=[];this._cursor.offset-this._raw.byteOffset<this._raw.byteLength;)this.compatible_brands.push(this._readString(4))}),t.ISOBox.prototype._boxParsers.hdlr=function(){this._parseFullBox(),this.pre_defined=this._readUint(32),this.handler_type=this._readString(4),this.reserved=[this._readUint(32),this._readUint(32),this._readUint(32)],this.name=this._readTerminatedString()},t.ISOBox.prototype._boxParsers.mdhd=function(){this._parseFullBox(),1==this.version?(this.creation_time=this._readUint(64),this.modification_time=this._readUint(64),this.timescale=this._readUint(32),this.duration=this._readUint(64)):(this.creation_time=this._readUint(32),this.modification_time=this._readUint(32),this.timescale=this._readUint(32),this.duration=this._readUint(32));var e=this._readUint(16);this.pad=e>>15,this.language=String.fromCharCode(96+(e>>10&31),96+(e>>5&31),96+(31&e)),this.pre_defined=this._readUint(16)},t.ISOBox.prototype._boxParsers.mfhd=function(){this._parseFullBox(),this.sequence_number=this._readUint(32)},t.ISOBox.prototype._boxParsers.mvhd=function(){this._parseFullBox(),1===this.version?(this.creation_time=this._readUint(64),this.modification_time=this._readUint(64),this.timescale=this._readUint(32),this.duration=this._readUint(64)):(this.creation_time=this._readUint(32),this.modification_time=this._readUint(32),this.timescale=this._readUint(32),this.duration=this._readUint(32)),this.rate=this._readTemplate(32),this.volume=this._readTemplate(16),this.reserved1=this._readUint(16),this.reserved2=[this._readUint(32),this._readUint(32)],this.matrix=[];for(var e=0;e<9;e++)this.matrix.push(this._readTemplate(32));for(this.pre_defined=[],e=0;e<6;e++)this.pre_defined.push(this._readUint(32));this.next_track_ID=this._readUint(32)},t.ISOBox.prototype._boxParsers.sidx=function(){this._parseFullBox(),this.reference_ID=this._readUint(32),this.timescale=this._readUint(32),0===this.version?(this.earliest_presentation_time=this._readUint(32),this.first_offset=this._readUint(32)):(this.earliest_presentation_time=this._readUint(64),this.first_offset=this._readUint(64)),this.reserved=this._readUint(16),this.reference_count=this._readUint(16),this.references=[];for(var e=0;e<this.reference_count;e++){var t={},n=this._readUint(32);t.reference_type=n>>31&1,t.referenced_size=0x7fffffff&n,t.subsegment_duration=this._readUint(32);var i=this._readUint(32);t.starts_with_SAP=i>>31&1,t.SAP_type=i>>28&7,t.SAP_delta_time=0xfffffff&i,this.references.push(t)}},t.ISOBox.prototype._boxParsers.ssix=function(){this._parseFullBox(),this.subsegment_count=this._readUint(32),this.subsegments=[];for(var e=0;e<this.subsegment_count;e++){var t={};t.ranges_count=this._readUint(32),t.ranges=[];for(var n=0;n<t.ranges_count;n++){var i={};i.level=this._readUint(8),i.range_size=this._readUint(24),t.ranges.push(i)}this.subsegments.push(t)}},t.ISOBox.prototype._boxParsers.tfdt=function(){this._parseFullBox(),1===this.version?this.baseMediaDecodeTime=this._readUint(64):this.baseMediaDecodeTime=this._readUint(32)},t.ISOBox.prototype._boxParsers.tfhd=function(){this._parseFullBox(),this.track_ID=this._readUint(32),1&this.flags?(this.base_data_offset_present=!0,this.base_data_offset=this._readUint(64)):131072&this.flags&&(this.default_base_is_moof=!0),2&this.flags&&(this.sample_description_offset=this._readUint(32)),8&this.flags&&(this.default_sample_duration=this._readUint(32)),16&this.flags&&(this.default_sample_size=this._readUint(32)),32&this.flags&&(this.default_sample_flags=this._readUint(32))},t.ISOBox.prototype._boxParsers.tkhd=function(){this._parseFullBox(),1===this.version?(this.creation_time=this._readUint(64),this.modification_time=this._readUint(64),this.track_ID=this._readUint(32),this.reserved1=this._readUint(32),this.duration=this._readUint(64)):(this.creation_time=this._readUint(32),this.modification_time=this._readUint(32),this.track_ID=this._readUint(32),this.reserved1=this._readUint(32),this.duration=this._readUint(32)),this.reserved2=[this._readUint(32),this._readUint(32)],this.layer=this._readUint(16),this.alternate_group=this._readUint(16),this.volume=this._readTemplate(16),this.reserved3=this._readUint(16),this.matrix=[];for(var e=0;e<9;e++)this.matrix.push(this._readTemplate(32));this.width=this._readTemplate(32),this.height=this._readTemplate(32)},t.ISOBox.prototype._boxParsers.trun=function(){this._parseFullBox(),this.sample_count=this._readUint(32),1&this.flags&&(this.data_offset_present=!0,this.data_offset=this._readInt(32)),4&this.flags&&(this.first_sample_flags=this._readUint(32)),this.samples=[];for(var e=0;e<this.sample_count;e++){var t={};256&this.flags&&(t.sample_duration=this._readUint(32)),512&this.flags&&(t.sample_size=this._readUint(32)),1024&this.flags&&(t.sample_flags=this._readUint(32)),2048&this.flags&&(0==this.version?t.sample_composition_time_offset=this._readUint(32):t.sample_composition_time_offset=this._readInt(32)),this.samples.push(t)}},t.ISOBox.prototype._boxParsers.trex=function(){this._parseFullBox(),this.track_ID=this._readUint(32),this.default_sample_description_index=this._readUint(32),this.default_sample_duration=this._readUint(32),this.default_sample_size=this._readUint(32),this.default_sample_flags=this._readUint(32)},t.ISOBox.prototype._boxParsers.stsd=function(){for(this._parseFullBox(),this.entry_count=this._readUint(32),this.entries=[];this._cursor.offset-this._raw.byteOffset<this._raw.byteLength;)this.entries.push(t.ISOBox.parse(this))},t.ISOBox.prototype._boxParsers.encv=function(){for(this._readHex(6),this.data_reference_index=this._readUint(16),this._readUint(16),this._readUint(16),this._readUint(32),this._readUint(32),this._readUint(32),this.width=this._readUint(16),this.height=this._readUint(16),this.horizresolution=this._readTemplate(32),this.vertresolution=this._readTemplate(32),this._readUint(32),this.frame_count=this._readUint(16),this._readUint(8),this.compressor_name=this._readString(4),this.depth=this._readUint(16),this._readUint(16),this._readHex(27),this.boxes=[];this._cursor.offset-this._raw.byteOffset<this._raw.byteLength;)this.boxes.push(t.ISOBox.parse(this))},s(["enca","mp4a"],function(){for(this._readHex(6),this.data_reference_index=this._readUint(16),this._readUint(32),this._readUint(32),this.channel_count=this._readUint(16),this.sample_size=this._readUint(16),this._readUint(16),this._readUint(16),this.sample_rate=this._readUint(32)>>>16,this.boxes=[];this._cursor.offset-this._raw.byteOffset<this._raw.byteLength;)this.boxes.push(t.ISOBox.parse(this))}),s(["avc1","hvc1","hev1"],function(){this._readUint(32),this._readUint(16),this.data_reference_index=this._readUint(16),this.version=this._readUint(16),this.revision_level=this._readUint(16),this.vendor=this._readUint(32),this.temporal_quality=this._readUint(32),this.spatial_quality=this._readUint(32),this.width=this._readUint(16),this.height=this._readUint(16),this.horizontal_resolution=this._readTemplate(32),this.vertical_resolution=this._readTemplate(32),this.data_size=this._readUint(32),this.frame_count=this._readUint(16);var e=this._readUint(8);this.compressor_name="";for(var n=0;n<31;n++){var i=this._readUint(8);n<e&&(this.compressor_name+=String.fromCharCode(i))}for(this.depth=this._readUint(16),this._readInt(16),this.boxes=[];this._cursor.offset-this._raw.byteOffset<this._raw.byteLength;)this.boxes.push(t.ISOBox.parse(this))}),t.ISOBox.prototype._boxParsers.avcC=function(){this.configuration_version=this._readUint(8),this.avc_profile_indication=this._readUint(8),this.profile_compatibility=this._readUint(8),this.avc_level_indication=this._readUint(8);var e=this._readUint(8);this.complete_representation=e>>>7&1,this.length_size_minus_one=3&e,this.num_sps=31&this._readUint(8),this.sps=[];for(var t=0;t<this.num_sps;++t)this.sps.push(this._readUintArray(8,this._readUint(16)));for(this.num_pps=31&this._readUint(8),this.pps=[],t=0;t<this.num_pps;++t)this.pps.push(this._readUintArray(8,this._readUint(16)))},t.ISOBox.prototype._boxParsers.hvcC=function(){var e;this.configurationVersion=this._readUint(8),e=this._readUint(8),this.general_profile_space=e>>>6,this.general_tier_flag=e>>>5&1,this.general_profile_idc=31&e,this.general_profile_compatibility_flags=this._readUint(32),this.general_constraint_indicator_flags_bytes=[];for(var t=0;t<6;t++)this.general_constraint_indicator_flags_bytes[t]=this._readUint(8);this.general_level_idc=this._readUint(8),this.min_spatial_segmentation_idc=4095&this._readUint(16),this.parallelismType=3&this._readUint(8),this.chroma_format_idc=3&this._readUint(8),this.bit_depth_luma_minus8=7&this._readUint(8),this.bit_depth_chroma_minus8=7&this._readUint(8),this.avgFrameRate=this._readUint(16),e=this._readUint(8),this.constantFrameRate=e>>>6,this.numTemporalLayers=e>>>3&7,this.temporalIdNested=e>>>2&1,this.lengthSizeMinusOne=3&e,this.numOfArrays=this._readUint(8)},t.ISOBox.prototype._boxParsers.esds=function(){this._parseFullBox(),this._readUint(16),this.esId=this._readUint(16),this.streamPriority=31&this._readUint(8),this._readUint(16),this.decoderConfig={},this.decoderConfig.objectProfileIndication=this._readUint(8),this.decoderConfig.streamType=this._readUint(8)>>>2&63,this.decoderConfig.bufferSize=this._readUint(24),this.decoderConfig.maxBitrate=this._readUint(32),this.decoderConfig.avgBitrate=this._readUint(32),this.decoderConfig.decoderConfigDescriptor={},this.decoderConfig.decoderConfigDescriptor.tag=this._readUint(8),this.decoderConfig.decoderConfigDescriptor.length=this._readUint(8);var e=this._readUint(8),t=this._readUint(8),n=this.decoderConfig.decoderConfigDescriptor;n.audioObjectType=e>>>3&31,n.samplingFrequencyIndex=(7&e)<<1|t>>>7&1,n.channelConfiguration=t>>>3&15},t.ISOBox.prototype._boxParsers.tenc=function(){this._parseFullBox(),this.default_is_encrypted=1===this._readUint(24),this.default_iv_size=this._readUint(8),this.default_kid=this._readHex(16)},t.ISOBox.prototype._boxParsers.senc=function(){var e=this;this._parseFullBox(),this.sample_count=this._readUint(32),this.samples=Array.apply(null,Array(this.sample_count)).map(function(t){if(a(e,e._root.options.iv_size)){var i,r={iv:e._readHex(e._root.options.iv_size)};return e.flags&&(i=r,r=a(e,2)?(i.subsample_count=e._readUint(16),i.subsamples=Array.apply(null,Array(i.subsample_count)).map(function(t){return a(e,6)?{bytes_of_clear_data:e._readUint(16),bytes_of_encrypted_data:e._readUint(32)}:{bytes_of_clear_data:0,bytes_of_encrypted_data:0}}),i):n(n({},i),{subsample_count:0,subsamples:[]})),r}e.samples=[]})},t.ISOBox.prototype._boxParsers.frma=function(){this.codingname=this._readString(4)},t.ISOBox.prototype._boxParsers.schm=function(){this._parseFullBox(),this.scheme_type=this._readString(4),this.scheme_version=this._readUint(32),1&this.flags&&(this.scheme_uri=this._readUint(8))},t.ISOBox.prototype._boxParsers.saiz=function(){if(this._parseFullBox(),1&this.flags&&(this.aux_info_type=this._readUint(32),this.aux_info_type_parameter=this._readUint(32)),this.default_sample_info_size=this._readUint(8),this.sample_count=this._readUint(32),0===this.default_sample_info_size){this.sample_info_size=[];for(var e=0;e<this.sample_count;++e)this.sample_info_size.push(this._readUint(8))}},t.ISOBox.prototype._boxParsers.pssh=function(){if(this._parseFullBox(),this.system_id=this._readUUID(),this.version>0){this.kid_count=this._readUint(32),this.kids=[];for(var e=0;e<this.kid_count;++e)this.kids.push(this._readString(16))}this.data_size=this._readUint(32),this.data=new DataView(this._raw.buffer,this._cursor.offset,this.data_size)},t.ISOBox.prototype._boxParsers.prft=function(){this._parseFullBox(),this.reference_track_ID=this._readUint(32),this.ntp_timestamp_seconds=this._readUint(32),this.ntp_timestamp_seconds_fraction=this._readUint(32),0===this.version?this.media_time=this._readUint(32):this.media_time=this._readUint(64)}},51700:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.CmafChunkParser=void 0;var i=n(74853);t.CmafChunkParser=function(){function e(e){this.ju=e,this.ku=new ArrayBuffer(0)}return e.parseIsoBoxType=function(e,t){return String.fromCharCode(e[t])+String.fromCharCode(e[t+1])+String.fromCharCode(e[t+2])+String.fromCharCode(e[t+3])},e.prototype.appendData=function(e){this.ku=i.ArrayHelper.concatBuffers(this.ku,e)},e.prototype.getCompleteChunks=function(){var t=e.findCompleteCmafChunks(this.ku);if(0===t.length)return null;this.ju.logger.insane("Found ".concat(t.length," CMAF chunks"));var n=t[t.length-1].end,i=this.ku.slice(0,n);return this.ku=this.ku.slice(n),i},e.findCompleteCmafChunks=function(t){if(!t||t.byteLength<8)return[];for(var n=new DataView(t),i=[],r=["moof","mdat"],o=0,s=[],a=0;a+8<t.byteLength;){var u=n.getUint32(a),l=e.parseIsoBoxType(new Uint8Array(t),a+4);if(0===u)break;a+u<=t.byteLength&&(s.push(l),l===r[0]&&r.shift(),0===r.length&&(i.push({start:o,end:a+u,boxes:s}),r=["moof","mdat"],o=a+u+1,s=[])),a+=u}return i},e.prototype.reset=function(){this.ku.byteLength>0&&this.ju.logger.debug("CMAF chunk parser discarded ".concat(this.ku.byteLength," bytes")),this.ku=new ArrayBuffer(0)},e}()},12392:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.MP4Decrypter=void 0;var i=n(97441),r=n(74853),o=n(70233),s=n(2992),a=n(88052),u=n(62756);t.MP4Decrypter=function(){function e(e,t,n){this.lu=e,this.mu=t,this.ou=!1,this.tu=n,this.nu=[]}return e.prototype.parseInitSegment=function(e){var t=this;this.ou=!1;for(var n=i.ISOBoxer.parseBuffer(e),a=n._raw.buffer,u=function(e){var t=[],n=[];n.push.apply(n,e.list("moov.pssh")),n.push.apply(n,e.list("moof.pssh"));for(var i=0;i<n.length;i++){var r=n[i];r.kids&&r.kids.length>0&&t.push.apply(t,r.kids)}return t}(n),l=0;l<u.length;l++){var c=u[l];this.uu(c)}var d=n.get("moov.trak.mdia.minf.stbl.stsd").entries[0];return d.list("sinf").forEach(function(e){var i=e.get("frma"),a=e.get("schm"),u=e.get("schi.tenc");if(i&&u&&a){for(var l=0;l<4;++l)n._raw.setUint8(d._offset+4+l,i.codingname.charCodeAt(l));t.ru=u.default_is_encrypted,t.su=u.default_iv_size,t.qu=u.default_kid,t.ou=!0;var c=r.ArrayHelper.arrayBufferToAsciiString(o.FormatHelper.hexToBytes(t.qu).buffer,!0);t.uu(c)}(0,s.rewriteMp4BoxType)(e,"free")}),Promise.resolve(a)},e.prototype.uu=function(e){this.nu.includes(e)||this.nu.push(e)},e.prototype.getKeyIds=function(){return this.nu},e.prototype.addKeys=function(e){for(var t=function(e){var t=n.mu.find(function(t){return t.kid===e.kid});t?t.key=e.key:n.mu.push(e)},n=this,i=0;i<e.length;i++)t(e[i])},e.prototype.getKey=function(){var e;if(this.pu)return this.pu;for(var t in this.mu)if(this.mu.hasOwnProperty(t)&&this.mu[t].hasOwnProperty("key")&&this.mu[t].hasOwnProperty("kid")&&this.mu[t].kid===this.qu){e=this.mu[t].key;break}return void 0===e&&(e=this.mu[0].key),"string"==typeof e?this.pu=o.FormatHelper.hexToBytes(e).buffer:e instanceof Uint8Array?this.pu=e.buffer:this.pu=e,this.pu},e.prototype.decryptDataSegment=function(e){if(!this.getKey())return this.lu.logger.debug("MP4Decrypter.decryptSegment: Error decrypting AES-128 encrypted content"),Promise.reject("Error decrypting AES-128 encrypted content");
1if(!1===this.isEncrypted())return this.lu.logger.debug("MP4Decrypter.decryptSegment: NO ENCRYPTED CONTENT"),Promise.reject("NO ENCRYPTED CONTENT");for(var t=i.ISOBoxer.parseBuffer(e,{iv_size:this.su}),n=new l(t),r=[],o=0;o<n.getSampleCount();++o)r.push(this.vu(e,n,o));return Promise.all(r).then(function(){return[n.uuidBox,n.sencBox,n.saioBox,n.saizBox,n.seigBox,n.sbgpBox].forEach(function(e){e&&(0,s.rewriteMp4BoxType)(e,"free")}),e})},e.prototype.vu=function(e,t,n){var i=t.sampleToOffset(n),r=t.sampleToSize(n,1),o=t.getSampleEncodeInfo(n);return o.iv?function(e,t,n,i,r){if(!((null!=(a=r.subsample_count)?a:0)>0&&r.subsamples))return s=t.slice(n,n+i),e.decrypt(s).then(function(e){new Uint8Array(t).set(new Uint8Array(e),n)});var o,s,a,u=function(e,t,n){if(!n.subsamples)return[];for(var i=[],r=0,o=n.subsamples;r<o.length;r++){var s=o[r];t+=s.bytes_of_clear_data;var a=s.bytes_of_encrypted_data;if(a>0){var u=new Uint8Array(e,t,a);i.push(u),t+=a}}return i}(t,n,r);return o=function(e){for(var t=e.reduce(function(e,t){return e+t.byteLength},0),n=new Uint8Array(t),i=0,r=0;r<e.length;r++){var o=e[r];n.set(o,i),i+=o.byteLength}return n.buffer}(u),e.decrypt(o).then(function(e){for(var t=0,n=0;n<u.length;n++){var i=u[n],r=new Uint8Array(e,t,i.byteLength);i.set(r),t+=i.byteLength}})}(new(0,a.ModuleManager.get(u.ModuleName.Crypto).CryptoApi)(this.lu,"AES-CTR",this.getKey(),o.iv,this.tu),e,i,r,o):(this.lu.logger.debug("MP4Decrypter.decryptSegment: NO INITIAL VECTOR PROVIDED"),Promise.reject("NO INITIAL VECTOR PROVIDED"))},e.prototype.isEncrypted=function(){return this.ou},e}();var l=function(){function e(e){var t=e.get("moof.traf");this.trunBox=t.get("trun"),this.sencBox=t.get("senc"),this.uuidBox=t.get("uuid"),this.saizBox=t.get("saiz"),this.saioBox=t.get("saio"),this.seigBox=t.get("seig"),this.sbgpBox=t.get("sbgp"),this.mdatOffset=e.get("mdat")._offset+8}return e.prototype.getSampleSizeTable=function(){return this.trunBox.samples},e.prototype.getSampleCount=function(){return this.getSampleSizeTable().length},e.prototype.getSampleEncodeInfo=function(e){return this.sencBox.samples[e]},e.prototype.sampleToOffset=function(e){return this.mdatOffset+this.sampleToSize(0,e)},e.prototype.sampleToSize=function(e,t){for(var n,i=this.getSampleSizeTable(),r=0,o=e;o<e+t;o++)r+=null!=(n=i[o].sample_size)?n:0;return r},e}()},24014:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.MP4EncryptionParser=void 0;var i=n(40306),r=n(3336),o=n(13531),s=n(25811),a=n(51682),u=n(74853),l=n(70233),c=n(85434),d=n(15487);t.MP4EncryptionParser=function(){function e(e){var t=this;this.yu={stsd:function(e){var n;switch(e+=a.ISOBMFFConstants.FULL_BOX_VERSION_LENGTH+a.ISOBMFFConstants.FULL_BOX_FLAGS_LENGTH,t.wu[0]){case"vide":n=t.yu.encv;break;case"soun":n=t.yu.enca;break;case"hint":case"meta":case"auxv":t.xu.logger.debug("handler type "+t.wu[0]+" not yet supported");break;default:t.xu.logger.debug("invalid handler type "+t.wu[0])}return n?e+=4:(t.xu.logger.debug("unsupported handler type "+t.wu[0]),-1)},encv:function(e){return e+78},enca:function(e){return e+28}},this.xu=e}return e.prototype.zu=function(e,t){var n=e.getUint32(t);return n<=0?null:n},e.prototype.Au=function(e,t){for(var n="",i=0;i<a.ISOBMFFConstants.BOX_TYPE_LENGTH;i++)n+=String.fromCharCode(e.getInt8(t+i));return n},e.prototype.Bu=function(e,t){for(var n,i,r=0,o=[],s=new DataView(e);r+3<s.byteLength;){if(i=this.zu(s,r),n=this.Au(s,r+a.ISOBMFFConstants.BOX_SIZE_LENGTH),null===i)return this.xu.logger.debug("size is 0, maybe an error, or the largesize should be parsed. Returning with null."),[];if(n!==t[0])r+=i;else{if(t.length<=1)o.push(e.slice(r,r+i));else{var u=r;if(r+=a.ISOBMFFConstants.BOX_SIZE_LENGTH+a.ISOBMFFConstants.BOX_TYPE_LENGTH,this.yu.hasOwnProperty(n)){var l=this.yu[n](r);-1!==l&&(r=l)}var c=r-u;c=i-c;var d=e.slice(r,r+c),p=this.Bu(d,t.slice(1));p&&(o=o.concat(p)),r=u}r+=i}}return o.length>0?o:[]},e.prototype.Cu=function(e){for(var t=this.Bu(e,["moov","trak","mdia","hdlr"]),n=[],i=0;i<t.length;i++){var r=new DataView(t[i]),o=a.ISOBMFFConstants.BOX_SIZE_LENGTH+a.ISOBMFFConstants.BOX_TYPE_LENGTH;o+=a.ISOBMFFConstants.FULL_BOX_VERSION_LENGTH+a.ISOBMFFConstants.FULL_BOX_FLAGS_LENGTH,o+=4,n.push(this.Au(r,o))}return n},e.prototype.Du=function(e){if(!e||!(e instanceof ArrayBuffer)||e.byteLength<1)return null;var t=new DataView(e),n=a.ISOBMFFConstants.BOX_SIZE_LENGTH+a.ISOBMFFConstants.BOX_TYPE_LENGTH;n+=a.ISOBMFFConstants.FULL_BOX_VERSION_LENGTH+a.ISOBMFFConstants.FULL_BOX_FLAGS_LENGTH+3+1;for(var i="",r=0;r<16;r++)i+=l.FormatHelper.intToHex(t.getUint8(n+r));return i},e.prototype.parseDefaultKIDFromBuffer=function(e,t){this.wu=this.Cu(e),n=c.MimeTypeHelper.isVideo(t)?["moov","trak","mdia","minf","stbl","stsd","encv","sinf","schi","tenc"]:["moov","trak","mdia","minf","stbl","stsd","enca","sinf","schi","tenc"];var n,i=this.Bu(e,n);if(!i||i.length<1)return null;for(var r=[],o=0;o<i.length;o++){var s=this.Du(i[o]);null!==s&&r.push(s)}return this.xu.logger.debug("default KID extracted: "+r),r},e.prototype.Eu=function(e){return u.ArrayHelper.arrayBufferToAsciiString(e,!0)},e.prototype.Fu=function(e){if(!e||!(e instanceof ArrayBuffer)||e.byteLength<3)return this.xu.logger.debug("could not parse pssh data from box"),null;this.xu.logger.isLevelEnabled(o.LogLevel.DEBUG)&&this.xu.logger.debug(this.Eu(e));var t,n={},i=new DataView(e);t=0+(a.ISOBMFFConstants.BOX_SIZE_LENGTH+a.ISOBMFFConstants.BOX_TYPE_LENGTH);var r=i.getUint8(t);t+=a.ISOBMFFConstants.FULL_BOX_VERSION_LENGTH+a.ISOBMFFConstants.FULL_BOX_FLAGS_LENGTH;for(var c="",d=0;d<a.ISOBMFFConstants.PSSH_SYSTEM_ID_LENGTH;d++)c+=l.FormatHelper.intToHex(i.getUint8(t)),t++;
1if(n.systemIDraw=c,n.systemID="urn:uuid:".concat(l.FormatHelper.beautifyUUID(c)),s.DRMSchemeIDURIs.hasOwnProperty(n.systemID)&&(n.systemName=s.DRMSchemeIDURIs[n.systemID]),r>0){var p=i.getUint32(t);for(t+=4,n.kid=[],d=0;d<p;d++){var h=u.ArrayHelper.extractHexString(i,t,a.ISOBMFFConstants.PSSH_KID_LEN);t+=a.ISOBMFFConstants.PSSH_KID_LEN,n.kid.push(h)}}return n.initData=e.slice(0),n.initDataStr=this.Eu(n.initData),n},e.prototype.parsePsshBox=function(e){if(0>e.getMimeType().indexOf("mp4"))return null;var t=e.getData();if(!(t&&t instanceof ArrayBuffer))return null;var n=[];if(n=(n=n.concat(this.Bu(t,["moov","pssh"]))).concat(this.Bu(t,["moof","pssh"])),e.isEncrypted()&&!n.length&&e.isInit()&&(0,d.isTizen2016)())return this.xu.eventHandler.fireError(new r.PlayerError(i.ErrorCode.SEGMENT_PSSH_DATA_MISSING,void 0,void 0,this.xu.sourceContext.sourceIdentifier)),[];var o=[];if(Array.isArray(n))for(var s=0;s<n.length;s++){var a=this.Fu(n[s]);null!==a&&o.push(a)}return o},e}()},32951:function(e,t,n){var i=this&&this.__spreadArray||function(e,t,n){if(n||2==arguments.length)for(var i,r=0,o=t.length;r<o;r++)!i&&r in t||(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.MP4Parser=void 0,t.getVideoSamples=function(e,t,n,i){var r=(0,d.getCodecTag)(t);return b(e.moof,e.mdat,t,i).map(function(e){return e.nalus=function(e,t,n){void 0===n&&(n=[]);for(var i=d.AVC_CODEC_TAGS.includes(t)?E:_,r=S+i,o=[],s=0;s+r<e.byteLength;){var a=Math.min(e.getUint32(s),e.byteLength-s-r);if(s+=4,0!==a){var u=d.AVC_CODEC_TAGS.includes(t)?31&e.getUint8(s):e.getUint8(s)>>1&63;if(s+=i,0===n.length||n.includes(u)){var l={type:u,data:new DataView(e.buffer,e.byteOffset+s,a-i)};T(l),o.push(l)}s+=a-i}}return o}(e.data,r,n),e})},t.getTrackSamples=b,t.removeEmulationPreventionThreeBytes=T,t.getMp4Fragments=function(e){var t=e.getParsedData().fetchAll("moof"),n=e.getParsedData().fetchAll("mdat");return t.length===n.length?t.map(function(e,t){return{moof:e,mdat:n[t]}}):[]},t.parseTfdtBoxOffsets=function(e){var t=P(e.getData()).fetchAll("tfdt");return t?t.map(function(e){return e._raw.byteOffset}):[]},t.getTrackId=function(e,t){var n=t.get("moof.traf.tfhd");return n?n.track_ID?n.track_ID:(e.log("Track fragment header has no track_ID field. This does not look like a valid mp4."),-1):(e.log("Cannot extract trackID from data fragment."),-1)},t.parseBuffer=P,t.parsePlaybackTime=function(e,t){var n=w(e).get("moof.traf.tfdt");k(e,t);var i=e.getTimescale();return n&&void 0!==i?n.baseMediaDecodeTime/i:void 0===i?NaN:void 0},t.parseSegmentData=C,t.isValidMp4=function(e){var t=w(e),n=(e.isInit()?["ftyp","moov"]:["moof","mdat"]).every(function(e){return!!t.fetch(e)}),i=t.boxes[t.boxes.length-1],r=(i?i.size+i._offset:0)===e.getData().byteLength,o=!t._incomplete;return n&&r&&o},t.getCodecFromSegment=function(e){var t=C(e);return function(e){var t,n=A(e);if(!n)return null;var r=n.entries.find(function(e){return i(i([],u.VisualSampleEntryTypes.Avc,!0),u.VisualSampleEntryTypes.Hvc,!0).includes(e.type)});return r?u.VisualSampleEntryTypes.Avc.includes(r.type)?(t=r.get("avcC"))&&0!==t.sps.length?r.type+"."+p.FormatHelper.bytesToHex(new Uint8Array(t.sps[0].splice(1,3))):null:u.VisualSampleEntryTypes.Hvc.includes(r.type)?(0,d.assembleHvcCodecString)(r.type,r.get("hvcC")):null:null}(t)||function(e){var t=A(e);if(!t)return null;var n=t.entries[0],i=(n.get("esds")||{}).decoderConfig;return i?n.type+"."+i.objectProfileIndication.toString(16)+"."+i.decoderConfigDescriptor.audioObjectType:null}(t)};var r=n(97441),o=n(40306),s=n(3336),a=n(13531),u=n(1001),l=n(51682),c=n(74853),d=n(34047),p=n(70233),h=n(85434),f=n(2992),g=n(23068),v=n(88052),y=n(62756),m=n(78246);function b(e,t,n,i){var r,o,s,a=e.get("traf"),u=a.get("tfhd"),c=a.get("trun"),d=null!=(r=u.base_data_offset)?r:e._offset,p=null!=(o=c.data_offset)?o:0;return(null==(s=null==c?void 0:c.samples)?void 0:s.length)?c.samples.map(function(e){var r=e.sample_size||u.default_sample_size||n.getDefaultSampleSize();r>c._raw.buffer.byteLength&&(r=c._raw.buffer.byteLength-(d+p),i.warn("trun.samples.sample_size (".concat(e.sample_size,") is bigger than the available buffer length:").concat(c._raw.buffer.byteLength,". Adjusting to remaining bytes:").concat(r))),1!==c.sample_count||e.sample_size||(r=t.size-(t.hasOwnProperty("largesize")?l.ISOBMFFConstants.BOX_HEADER_LENGTH_LARGE:l.ISOBMFFConstants.BOX_HEADER_LENGTH_REGULAR));var o={duration:e.sample_duration||u.default_sample_duration||n.getDefaultSampleDuration(),size:r,compositionTimeOffset:e.sample_composition_time_offset||0,data:new DataView(c._raw.buffer,d+p,r)};return p+=r,o}):[]}t.MP4Parser=function(){function e(e,t,n){void 0===n&&(n=r.ISOBoxer),this.context=e,this.mp4EncryptionParser=t,this.isoBoxer=n,this.Gu=v.ModuleManager.get(y.ModuleName.Crypto,!1)}return e.prototype.parseSegment=function(e){"mp4"===h.MimeTypeHelper.extractContainerType(e.getMimeType())?(e.isInit()?this.Mu(e):this.Ou(e),e.setDrmInitData(this.Hu(e))):this.context.logger.debug("Skipping parsing of a non MP4 segment")},e.prototype.Hu=function(e){var t=this,n=this.mp4EncryptionParser.parsePsshBox(e);return this.context.logger.isLevelEnabled(a.LogLevel.DEBUG)&&(null==n||n.forEac
1h(function(e){return t.context.logger.debug("initData found: ".concat(e.initDataStr))})),Array.isArray(n)&&n.length>0?n:[]},e.prototype.Iu=function(e){var t=e.getParsedData().get("moov.mvex.trex");if(t){var n={defaultSampleSize:t.default_sample_size,defaultSampleDuration:t.default_sample_duration};e.updateParserMetadata(n),this.context.logger.debug("default sample duration for "+e.getMimeType()+" : "+n.defaultSampleDuration)}},e.prototype.Ju=function(e){var t=e.getParsedData().get("moof.traf.sgpd");if(t&&"seig"===String.fromCharCode(t._raw.getUint8(12),t._raw.getUint8(13),t._raw.getUint8(14),t._raw.getUint8(15))){var n=(i=1===O(t)?20:16,t._raw.getUint32(i));if(!(n<1)){var i,r,o,s,a,u,l,c,d=(r=O(t),o=M(t),1===r&&0===o?t._raw.getUint32(1===r?24:20):o),h=(s=O(t),a=M(t),u=1===s&&0===a?28:24,(t._raw.getUint16(u)<<16)+t._raw.getUint8(u+2)),f=(l=O(t),c=M(t),t._raw.getUint8(1===l&&0===c?31:27)),g=function(e){for(var t=O(e),n=M(e),i=1===t&&0===n?32:28,r=new Uint8Array(16),o=0;o<16;o++)r[o]=e._raw.getUint8(i+o);return p.FormatHelper.bytesToUUID(r)}(t);this.context.logger.debug("Parsed SGPD/SEIG, entries(".concat(n,"), key ID(").concat(g,"), IV size(").concat(f,"), isEncrypted(").concat(!!h,"), descriptor length(").concat(d,")")),e.setDrmKid(g)}}},e.prototype.Ku=function(e){var t=this.mp4EncryptionParser.parseDefaultKIDFromBuffer(e.getData(),e.getMimeType()),n=(null==t?void 0:t.length)?t.pop():void 0,i=e.getParsedData().get("moov.trak.mdia.minf.stbl.stsd.encv.sinf.schi.tenc")||e.getParsedData().get("moov.trak.mdia.minf.stbl.stsd.enca.sinf.schi.tenc");i&&(e.updateParserMetadata({ivSize:i.default_iv_size}),e.setEncrypted(!0)),n&&e.setDrmKid(p.FormatHelper.beautifyUUID(n))},e.prototype.Lu=function(e){var t=e.get("elst");return!(t&&t.entries.length>0&&t.entries[0].media_time<0)},e.prototype.Mu=function(e){var t=C(e,{},this.isoBoxer);t?(this.Ku(e),k(e,this.context.logger),this.Iu(e),this.context.settings.IGNORE_MP4_EDTS_BOX&&this.Nu(t)):this.context.eventHandler.fireError(new s.PlayerError(o.ErrorCode.SOURCE_EMPTY_SEGMENT,{mimeType:e.getMimeType(),segmentUrl:e.getUrl()},"The player has encountered an init segment that is unexpectedly empty.",this.context.sourceContext.sourceIdentifier))},e.prototype.Nu=function(e){var t=e.get("moov.trak.edts");t&&!this.Lu(t)&&(this.context.logger.debug("Found unsupported edts box, dropping it!"),(0,f.rewriteMp4BoxType)(t,"free"))},e.prototype.Ou=function(t){var n,i,r=0,o=t.getSegmentInfo();(null==o?void 0:o.presentationTimeOffset)&&(r=o.presentationTimeOffset);var s=this.Ru(t);t.isSelfInit()&&this.Iu(t),this.Ju(t),this.Ku(t),t.setEncrypted(null!=(i=null==(n=t.getInitSegment())?void 0:n.isEncrypted())&&i),t.getParsedData().fetch("senc")&&t.setEncrypted(!0),k(t,this.context.logger),this.Qu(t,r,s),this.Pu(t),this.context.settings.PARSE_EMSG_BOXES&&t.setInbandEvents(this.ev(t,r)),t.setLastSegment(this.fv(t));var a=e.getProducerReferenceTime(t);a&&(o.wallClockTime=a)},e.prototype.Pu=function(e){var t=this.cv(e);if(t){var n=Math.abs(e.getDuration()-t);n>.5&&this.context.logger.debug("Segment duration is off by "+n+", corrected from "+e.getDuration()+" to "+t),e.setDuration(t)}},e.prototype.Qu=function(e,t,n){var i=n.fetchAll("tfdt"),r=i[0],o=i.map(function(e){return e._offset});if(r){var s=e.getTimescale();e.setTFDTBoxOffsets(o),e.setBaseMediaDecodeTime(r.baseMediaDecodeTime),e.setPresentationTimeOffset(t),void 0===s?this.context.logger.debug("Could not set playback time - segment is missing timescale."):e.setPlaybackTime(r.baseMediaDecodeTime/s-t)}},e.prototype.Ru=function(e){return C(e,{iv_size:e.getIvSize()||8},this.isoBoxer)},e.prototype.cv=function(e){var t=this,n=e.getTimescale();return h.MimeTypeHelper.isAV(e.getMimeType())?void 0===n?(this.context.logger.debug("Could not parse segment duration - segment is missing timescale."),null):e.getParsedData().list("moof.traf").reduce(function(n,i){return n+t.dv(i,e.getDefaultSampleDuration())},0)/n:null},e.prototype.dv=function(e,t){var n,i=e.get("trun");if(!i)return this.context.logger.insane("Media segment is missing trun box!"),0;var r=e.get("tfhd"),o=r?r.default_sample_duration:null,s=null==(n=i.samples)?void 0:n.reduce(function(e,n){return e+(n.sample_duration||o||t||0)},0);return null!=s?s:0},e.prototype.ev=function(e,t){var n=this.Ru(e),i=function(e,t,n){var i=t.fetch("sidx"),r=0,o=e.getTimescale();if(void 0===o)return 0;if(i&&i.earliest_presentation_time)r=i.earliest_presentation_time/o;else{var s=t.fetch("tfdt");s&&s.baseMediaDecodeTime&&(r=s.baseMediaDecodeTime/o)}return(0,g.isNumber)(r)?r-=n:r=0,r}(e,n,t);return n.fetchAll("emsg").map(function(e){var n,r,o;
1return{schemeIdUri:e.scheme_id_uri,value:e.value,presentationTime:(n=e,r=i,o=t,1===n.version?n.presentation_time/n.timescale-o:r+n.presentation_time_delta/n.timescale),eventDuration:e.event_duration/e.timescale,id:String(e.id),messageData:c.ArrayHelper.convertBufferSourceToUTF8(e.message_data)}})},e.parseFourCharsText=function(e,t){for(var n="",i=0;i<4;i++)n+=String.fromCharCode(e.getInt8(t+i));return n},e.prototype.fv=function(t){var n=t.getData();if(!n||n.byteLength<4)return!1;for(var i=new DataView(n),r=0;r+3<i.byteLength;){var o=i.getUint32(r);if(o<=0)break;if("styp"===e.parseFourCharsText(i,r+4)){r+=8,r+=8;for(var s=void 0;r<o;)if(s=e.parseFourCharsText(i,r),r+=4,"lmsg"===s)return this.context.logger.debug("lmsg found, this should be the last segment in this stream"),!0;break}r+=o}return!1},e.getProducerReferenceTime=function(e){var t=e.getParsedData().fetch("prft");if(!t)return null;var n=1e3*t.ntp_timestamp_seconds;return n+=Math.round(t.ntp_timestamp_seconds_fraction/0x100000000*1e3),(0,m.ntpToUnix)(n)},e}();var S=4,E=1,_=2;function T(e){for(var t=[],n=1;n<e.data.byteLength-2;)0===e.data.getUint8(n)&&0===e.data.getUint8(n+1)&&3===e.data.getUint8(n+2)?(t.push(n+2),n+=3):n++;if(0!==t.length){for(var i=new DataView(new ArrayBuffer(e.data.byteLength-t.length)),r=0,o=0;r<i.byteLength;r++,o++)t[0]===o&&(t.shift(),o++),i.setUint8(r,e.data.getInt8(o));e.data=i}}function P(e,t,n){return void 0===t&&(t={}),void 0===n&&(n=r.ISOBoxer),n.parseBuffer(e,t)}function C(e,t,n){if(void 0===t&&(t={}),void 0===n&&(n=r.ISOBoxer),!e.getParsedData()){var i=P(e.getData(),t,n);e.setParsedData(i)}return e.getParsedData()}function A(e){return e.get("moov.trak.mdia.minf.stbl.stsd")}function w(e,t){return void 0===t&&(t=r.ISOBoxer),C(e,{iv_size:e.getIvSize()||8},t)}function k(e,t){var n=e.getParsedData().get("moov.trak.mdia.mdhd");if(n){var i=n.timescale;e.setTimescale(i),t.debug("timescale for ".concat(e.getMimeType()," is ").concat(i))}}function O(e){return e._raw.getUint8(8)}function M(e){return 1===O(e)?e._raw.getUint32(16):0}},37910:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.ContainerMp4ModuleDefinition=void 0;var i=n(62756),r=n(51700),o=n(12392),s=n(24014),a=n(32951);t.ContainerMp4ModuleDefinition={name:i.ModuleName.ContainerMP4,module:{MP4Parser:a.MP4Parser,MP4Decrypter:o.MP4Decrypter,MP4EncryptionParser:s.MP4EncryptionParser,CmafChunkParser:r.CmafChunkParser,getMp4Fragments:a.getMp4Fragments,getVideoSamples:a.getVideoSamples,parseTfdtBoxOffsets:a.parseTfdtBoxOffsets,getTrackId:a.getTrackId,parseBuffer:a.parseBuffer,parsePlaybackTime:a.parsePlaybackTime,isValidMp4:a.isValidMp4,getCodecFromSegment:a.getCodecFromSegment,getTrackSamples:a.getTrackSamples}},t.default=t.ContainerMp4ModuleDefinition},78246:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.ntpToUnix=function(e){return e+n};var n=new Date(Date.UTC(1900,0,1)).getTime()}},function(e){return e(e.s=37910)}])}()},81942:function(e,t,n){"use strict";var i,r=this&&this.__extends||(i=function(e,t){return(i=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])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.FontFamilySelectBox=void 0;var o=n(72177),s=n(24379);t.FontFamilySelectBox=function(e){function t(t){var n=e.call(this,t)||this;return n.config=n.mergeConfig(t,{cssClasses:["ui-subtitlesettingsfontfamilyselectbox"]},n.config),n}return r(t,e),t.prototype.configure=function(t,n){var i=this;e.prototype.configure.call(this,t,n),this.addItem(null,s.i18n.getLocalizer("default")),this.addItem("monospacedserif",s.i18n.getLocalizer("settings.subtitles.font.family.monospacedserif")),this.addItem("proportionalserif",s.i18n.getLocalizer("settings.subtitles.font.family.proportionalserif")),this.addItem("monospacedsansserif",s.i18n.getLocalizer("settings.subtitles.font.family.monospacedsansserif")),this.addItem("proportionalsansserif",s.i18n.getLocalizer("settings.subtitles.font.family.proportionalsansserif")),this.addItem("casual",s.i18n.getLocalizer("settings.subtitles.font.family.casual")),this.addItem("cursive",s.i18n.getLocalizer("settings.subtitles.font.family.cursive")),this.addItem("smallcapital",s.i18n.getLocalizer("settings.subtitles.font.family.smallcapital")),this.settingsManager.fontFamily.onChanged.subscribe(function(e,t){t.isSet()?i.toggleOverlayClass("fontfamily-"+t.value):i.toggleOverlayClass(null),i.selectItem(t.value)}),this.onItemSelectionChanged.subscribe(function(e,t){i.settingsManager.fontFamily.value=t}),this.initFromSettings()},t.prototype.initFromSettings=function(){this.settingsManager.fontFamily.isSet()&&(this.selectItem(this.settingsManager.fontFamily.value),this.toggleOverlayClass("fontfamily-"+this.settingsManager.fontFamily.value))},t}(o.SubtitleSettingSelectBox)},83288:function(e,t,n){"use strict";
1var i,r=this&&this.__extends||(i=function(e,t){return(i=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])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__spreadArray||function(e,t,n){if(n||2==arguments.length)for(var i,r=0,o=t.length;r<o;r++)!i&&r in t||(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.AdControlBar=void 0;var s=n(27082),a=n(8675),u=n(24379),l=n(51571);t.AdControlBar=function(e){function t(t){var n=e.call(this,t)||this;return n.containersToHide=[],n.containersToKeepVisible=[],n.config=n.mergeConfig(t,{cssClasses:["ad-controlbar"],hidden:!1,role:"region",ariaLabel:u.i18n.getLocalizer("controlBar")},n.config),n.config.components.forEach(function(e){e instanceof a.Container&&(n.containsSeekBar(e)?n.containersToKeepVisible.push(e):n.containersToHide.push(e))}),n}return r(t,e),t.prototype.hide=function(){this.containersToHide.forEach(function(e){e.hide()})},t.prototype.show=function(){o(o([],this.containersToHide,!0),this.containersToKeepVisible,!0).forEach(function(e){e.show()})},t.prototype.configure=function(t,n){var i=this;e.prototype.configure.call(this,t,n),n.onControlsShow.subscribe(function(){i.show()}),n.onControlsHide.subscribe(function(){i.hide()})},t.prototype.containsSeekBar=function(e){for(var t=e.getComponents(),n=0;n<t.length;n++){var i=t[n];if(i instanceof l.SeekBar||i instanceof a.Container&&this.containsSeekBar(i))return!0}return!1},t}(s.ControlBar)},84416:function(e,t,n){"use strict";var i,r=this&&this.__extends||(i=function(e,t){return(i=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])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__spreadArray||function(e,t,n){if(n||2==arguments.length)for(var i,r=0,o=t.length;r<o;r++)!i&&r in t||(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.PlayerInsightsPanel=void 0;var s=n(45872),a=n(52023),u=n(57640),l=n(3255),c=n(90201);t.PlayerInsightsPanel=function(e){function t(t){void 0===t&&(t={});var n=e.call(this,t)||this;n.playerInsightsChangedHandler=function(e,t){t.forEach(function(e,t){var i=n.insightItems[t];i&&(e.visible?i.show():i.hide(),null!=e.value&&""!==e.value&&i.setTrailingLabel(e.value))})};var i=new s.PlayerInsightsProvider,r=i.getInsights().map(function(e){return new l.PlayerInsightsPanelItem({leadingLabel:e.leadingLabel})}),a=new c.PlayerInsightsPanelTitleItem,d=new u.SettingsPanelPage({components:o([a],r,!0)});return a.setTarget(n),n.insightsProvider=i,n.insightItems=r,n.config=n.mergeConfig(t,{cssClasses:["ui-player-insights-panel"],hidden:!0,hideDelay:-1,hideOnControlsHide:!1,hideOnOtherSettingsPanelOpening:!1,refreshIntervalMs:1e3},n.config),n.addComponent(d),n}return r(t,e),t.prototype.configure=function(t,n){var i=this;e.prototype.configure.call(this,t,n),this.insightsProvider.onChanged.subscribe(this.playerInsightsChangedHandler),this.insightsProvider.initialize(t,n,this.config.refreshIntervalMs),this.onShow.subscribe(function(){return i.insightsProvider.activate()}),this.onHide.subscribe(function(){return i.insightsProvider.deactivate()})},t.prototype.release=function(){this.insightsProvider.release(),e.prototype.release.call(this)},t}(a.SettingsPanel)},84745:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.version=void 0,t.version="{{VERSION}}"},85251:function(e,t,n){"use strict";
1var i,r=this&&this.__extends||(i=function(e,t){return(i=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])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.DynamicSettingsPanelItem=void 0;var o=n(30194),s=n(24379),a=n(72319),u=n(21616),l=n(39062),c=n(57640),d=n(75387),p=n(72177);t.DynamicSettingsPanelItem=function(e){function t(t){var n=e.call(this,t)||this;return n.handleSelectedItemChanged=function(){var e=n.settingComponent.getItemForKey(n.settingComponent.getSelectedItem());if(null==e)return void n.selectedOptionLabel.setText("-");var t=e.label;if(n.settingComponent instanceof a.SubtitleSelectBox){var i=n.settingComponent.getItems().length;t=s.i18n.performLocalization(t)+" ("+(i-1)+")"}n.selectedOptionLabel.setText(t)},n.backNavigationRightComponent=t.backNavigationRightComponent,n.settingComponent=t.settingComponent,n.selectedOptionLabel=new o.Label({text:"-",for:n.getConfig().id,cssClasse
1s:["ui-label-setting-selected-option"],labelStyle:o.LabelStyle.TextWithTrailingIcon}),n.config=n.mergeConfig(t,{components:[n.selectedOptionLabel],cssClass:"ui-settings-panel-item",role:"menuitem",addSettingAsComponent:!1,tabIndex:0},n.config),n}return r(t,e),t.prototype.configure=function(t,n){var i=this;e.prototype.configure.call(this,t,n),this.player=t,this.uimanager=n,null!=this.backNavigationRightComponent&&this.backNavigationRightComponent.configure(this.player,this.uimanager),null!=this.settingComponent&&this.settingComponent.configure(this.player,this.uimanager),this.settingComponent.onItemSelected.subscribe(this.handleSelectedItemChanged),this.handleSelectedItemChanged(),this.onClick.subscribe(function(){i.displayItemsSubPage()})},t.prototype.onLanguageChanged=function(){this.handleSelectedItemChanged()},t.prototype.buildSubPanelPage=function(){var e=this,t=this.settingComponent.getItems(),n=new c.SettingsPanelPage({removeOnPop:!0}),i=this.config.label,r=new d.SettingsPanelPageBackButton({text:i,container:this.config.container});r.configure(this.player,this.uimanager);var s=new u.SettingsPanelItem({label:r,settingComponent:this.backNavigationRightComponent,cssClasses:["title-item"],isSetting:!1});s.configure(this.player,this.uimanager),n.addComponent(s),t.map(function(t){return new l.SettingsPanelSelectOption({label:t.label,labelStyle:o.LabelStyle.TextWithLeadingIcon,settingComponent:e.settingComponent,settingsValue:t.key,addSettingAsComponent:!1})}).forEach(function(t){t.configure(e.player,e.uimanager),n.addComponent(t)}),n.configure(this.player,this.uimanager);var a=this.settingComponent;return a instanceof p.SubtitleSettingSelectBox&&(n.onActive.subscribe(function(){return a.overlay.enablePreviewSubtitleLabel()}),n.onInactive.subscribe(function(){return a.overlay.removePreviewSubtitleLabel()})),n},t.prototype.displayItemsSubPage=function(){var e=this.buildSubPanelPage();this.config.container.addPage(e),this.config.container.setActivePage(e)},t}(n(78196).InteractiveSettingsPanelItem)},85421:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ImageLoader=void 0;var i=n(4437);t.ImageLoader=function(){function e(){this.state={}}return e.prototype.load=function(e,t){var n=this;if(this.state[e]){var r=this.state[e];r.loadedCallback=t,r.loaded&&this.callLoadedCallback(r)}else{var o={url:e,image:new i.DOM("img",{}),loadedCallback:t,loaded:!1,width:0,height:0};this.state[e]=o,o.image.on("load",function(e){o.loaded=!0,o.width=o.image.get(0).width,o.height=o.image.get(0).height,n.callLoadedCallback(o)}),o.image.attr("src",o.url)}},e.prototype.callLoadedCallback=function(e){e.loadedCallback(e.url,e.width,e.height)},e}()},85704:function(e,t,n){"use strict";var i,r=this&&this.__extends||(i=function(e,t){return(i=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])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(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 o=n(53623),s=n(80432);t.EventDispatcher=function(){function e(){this.listeners=[]}return e.prototype.subscribe=function(e){this.listeners.push(new a(e))},e.prototype.subscribeOnce=function(e){this.listeners.push(new a(e,!0))},e.prototype.subscribeRateLimited=function(e,t){this.listeners.push(new u(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(),o.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=[],i=this.listeners.slice(0),r=0;r<i.length;r++){var s=i[r];s.fire(e,t),s.isOnce()&&n.push(s)}for(var a=0;a<n.length;a++){var u=n[a];o.ArrayUtils.remove(this.listeners,u)}},e.prototype.getEvent=function(){return this},e}();var a=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}
1,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}(),u=function(e){function t(t,n){var i=e.call(this,t)||this;i.rateMs=n;var r=function(){i.rateLimitTimout.start()};return i.rateLimitTimout=new s.Timeout(i.rateMs,function(){i.lastSeenEvent&&(i.fireSuper(i.lastSeenEvent.sender,i.lastSeenEvent.args),r(),i.lastSeenEvent=null)}),i.rateLimitingEventListener=function(e,t){if(i.shouldFireEvent()){i.fireSuper(e,t),r();return}i.lastSeenEvent={sender:e,args:t}},i}return r(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}(a)},86051:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Component=t.ViewMode=void 0;var i,r,o=n(34664),s=n(4437),a=n(85704),u=n(24379),l=n(18297);(i=r||(t.ViewMode=r={})).Persistent="persistent",i.Temporary="temporary",t.Component=function(){function e(e){void 0===e&&(e={});var t=this;this.languageChangedHandler=function(){return t.onLanguageChanged()},this.componentEvents={onShow:new a.EventDispatcher,onHide:new a.EventDispatcher,onViewModeChanged:new a.EventDispatcher,onHoverChanged:new a.EventDispatcher,onEnabled:new a.EventDispatcher,onDisabled:new a.EventDispatcher,onFocusChanged:new a.EventDispatcher},Object.assign(e,l.ComponentConfigManager.getConfigFor(this.constructor)),this.config=this.mergeConfig(e,{tag:"div",id:"bmpui-id-"+o.Guid.next(),cssPrefix:"bmpui",cssClass:"ui-component",cssClasses:[],hidden:!1,disabled:!1,tabIndex:-1},{}),this.viewMode=r.Temporary,u.i18n.getConfig().events.onLanguageChanged.subscribe(this.languageChangedHandler)}return e.prototype.initialize=function(){this.hidden=this.config.hidden,this.disabled=this.config.disabled,this.isHidden()&&(this.hidden=!1,this.hide()),this.isDisabled()&&(this.disabled=!1,this.disable())},e.prototype.configure=function(e,t){var n=this;this.onShow.subscribe(function(){return t.onComponentShow.dispatch(n)}),this.onHide.subscribe(function(){return t.onComponentHide.dispatch(n)}),this.onViewModeChanged.subscribe(function(e,i){return t.onComponentViewModeChanged.dispatch(n,i)}),this.getDomElement().on("mouseenter",function(){return n.onHoverChangedEvent(!0)}),this.getDomElement().on("mouseleave",function(){return n.onHoverChangedEvent(!1)}),this.getDomElement().on("focusin",function(){return n.onFocusChangedEvent(!0)}),this.getDomElement().on("focusout",function(){return n.onFocusChangedEvent(!1)})},e.prototype.release=function(){u.i18n.getConfig().events.onLanguageChanged.unsubscribe(this.languageChangedHandler)},e.prototype.onLanguageChanged=function(){},e.prototype.toDomElement=function(){var e=new s.DOM(this.config.tag,{id:this.config.id,class:this.getCssClasses(),role:this.config.role},this);return"number"==typeof this.config.tabIndex&&e.attr("tabindex",this.config.tabIndex.toString()),e},e.prototype.getDomElement=function(){return this.element||(this.element=this.toDomElement()),this.element},e.prototype.hasDomElement=function(){return!!this.element},e.prototype.setAriaLabel=function(e){this.setAriaAttr("label",u.i18n.performLocalization(e))},e.prototype.setAriaAttr=function(e,t){this.getDomElement().attr("aria-".concat(e),t)},e.prototype.mergeConfig=function(e,t,n){return Object.assign({},n,t,e)},e.prototype.getCssClasses=function(){var e=this,t=[this.config.cssClass].concat(this.config.cssClasses);return(t=t.map(function(t){return e.prefixCss(t)})).join(" ").trim()},e.prototype.prefixCss=function(e){return this.config.cssPrefix+"-"+e},e.prototype.getConfig=function(){return this.config},e.prototype.hide=function(){this.hidden||(this.hidden=!0,this.getDomElement().addClass(this.prefixCss(e.CLASS_HIDDEN)),this.onHideEvent())},e.prototype.show=function(){this.hidden&&(this.getDomElement().removeClass(this.prefixCss(e.CLASS_HIDDEN)),this.hidden=!1,this.onShowEvent())},e.prototype.isHidden=function(){return this.hidden},e.prototype.isShown=function(){return!this.isHidden()},e.prototype.toggleHidden=function(){this.isHidden()?this.show():this.hide()},e.prototype.disable=function(){this.disabled||(this.disabled=!0,this.getDomElement().addClass(this.prefixCss(e.CLASS_DISABLED)),this.onDisabledEvent())},e.prototype.enable=function(){this.disabled&&(this.getDomElement().removeClass(this.prefixCss(e.CLASS_DISABLED)),this.disabled=!1,this.onEnabledEvent())},e.prototype.isDisabled=function(){return this.disabled},e.prototype.isEnabled=function(){return!this.isDisabled()},e.prototype.isHovered=function(){return this.hovered},e.prototype.onShowEvent=function(){this.componentEvents.onShow.dispatch(this)},e.prototype.onHideEvent=function(){this.componentEvents.onHide.dispatch(this)},e.prototype.onEnabledEvent=function(){this.componentEvents.onEnabled.dispatch(this)},e.prototype.onDisabledEvent=function(){this.componentEvents.onDisabled.dispatch(this)},e.prototype.onViewModeChangedEvent=function(e){this.viewMode!==e&&(this.viewMode=e,this.componentEvents.onViewModeChanged.dispatch(this,{mode:e}))},e.prototype.onHoverChangedEvent=function(e){this.hovered=e,this.componentEvents.onHoverChanged.dispatch(this,{hovered:e})},e.prototype.onFocusChangedEvent=function(e){this.componentEvents.onFocusChanged.dispatch(this,{focused:e})},Object.defineProperty(e.prototype,"onShow",{get:function(){return this.componentEvents.onShow.getEvent()}
1,enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onHide",{get:function(){return this.componentEvents.onHide.getEvent()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onEnabled",{get:function(){return this.componentEvents.onEnabled.getEvent()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onDisabled",{get:function(){return this.componentEvents.onDisabled.getEvent()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onHoverChanged",{get:function(){return this.componentEvents.onHoverChanged.getEvent()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onViewModeChanged",{get:function(){return this.componentEvents.onViewModeChanged.getEvent()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onFocusedChanged",{get:function(){return this.componentEvents.onFocusChanged.getEvent()},enumerable:!1,configurable:!0}),e.CLASS_HIDDEN="hidden",e.CLASS_DISABLED="disabled",e}()},86894:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ComponentLayoutOverrideProcessor=void 0;var i=n(25227),r=n(8675),o=n(21616),s=n(92668);t.ComponentLayoutOverrideProcessor=function(){function e(e){this.config=e}return e.prototype.process=function(e,t){void 0!==this.config.componentLayoutOverrides&&this.removeExcludedComponents(e,t)},e.prototype.removeExcludedComponents=function(e,t){var n=this;e.getComponents().slice().forEach(function(i){n.shouldExclude(i,t)?(e.removeComponent(i),n.releaseComponentTree(i)):i instanceof r.Container&&n.removeExcludedComponents(i,t)})},e.prototype.shouldExclude=function(e,t){if(this.resolveComponentLayoutOverride(e,t)===i.UIComponentLayoutOverride.Exclude)return!0;if(e instanceof o.SettingsPanelItem){var n=e.getConfig().settingComponent;return null!=n&&this.resolveComponentLayoutOverride(n,t)===i.UIComponentLayoutOverride.Exclude}return!1},e.prototype.resolveComponentLayoutOverride=function(e,t){var n=this.config.componentLayoutOverrides,r=(0,s.getConstructorNames)(e.constructor),o=i.UIComponentLayoutOverride.Include,a=function(e){for(var t,n=0;n<r.length;n++)o=null!=(t=e[r[n]])?t:o};return a(n),null!=n[t]&&a(n[t]),o},e.prototype.releaseComponentTree=function(e,t){if(void 0===t&&(t=[]),-1===t.indexOf(e)){if(t.push(e),e instanceof o.SettingsPanelItem){var n=e.getConfig().settingComponent;null!=n&&this.releaseComponentTree(n,t)}if(e instanceof r.Container)for(var i=e.getComponents().slice(),s=0;s<i.length;s++){var a=i[s];this.releaseComponentTree(a,t)}e.release()}},e}()},87319:function(e,t,n){"use strict";var i,r=this&&this.__extends||(i=function(e,t){return(i=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])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.PlaybackSpeedSelectBox=void 0;var o=n(46419),s=n(24379);t.PlaybackSpeedSelectBox=function(e){function t(t){void 0===t&&(t={});var n=e.call(this,t)||this;return n.defaultPlaybackSpeeds=[.25,.5,1,1.5,2],n.config=n.mergeConfig(t,{cssClasses:["ui-playbackspeedselectbox"]},n.config),n}return r(t,e),t.prototype.configure=function(t,n){var i=this;e.prototype.configure.call(this,t,n),this.addDefaultItems(),this.onItemSelectionChanged.subscribe(function(e,n){t.setPlaybackSpeed(parseFloat(n))});var r=function(){var e=t.getPlaybackSpeed();i.setSpeed(e)};t.on(t.exports.PlayerEvent.PlaybackSpeedChanged,r),n.getConfig().events.onUpdated.subscribe(r)},t.prototype.setSpeed=function(e){this.selectItem(String(e))||(this.clearItems(),this.addDefaultItems([e]),this.selectItem(String(e)))},t.prototype.addDefaultItems=function(e){var t=this;void 0===e&&(e=[]),this.defaultPlaybackSpeeds.concat(e).sort().forEach(function(e){1!==e?t.addItem(String(e),"".concat(e,"x")):t.addItem(String(e),s.i18n.getLocalizer("normal"))})},t.prototype.clearItems=function(){this.items=[],this.selectedItem=null},t}(o.SelectBox)},87427:function(e,t,n){"use strict";
1var i,r=this&&this.__extends||(i=function(e,t){return(i=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])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.PictureInPictureToggleButton=void 0;var o=n(67598),s=n(24379);t.PictureInPictureToggleButton=function(e){function t(t){void 0===t&&(t={});var n=e.call(this,t)||this;return n.config=n.mergeConfig(t,{cssClass:"ui-piptogglebutton",text:s.i18n.getLocalizer("pictureInPicture")},n.config),n}return r(t,e),t.prototype.configure=function(t,n){var i=this;e.prototype.configure.call(this,t,n);var r=function(){return t.isViewModeAvailable(t.exports.ViewMode.PictureInPicture)},o=function(){t.getViewMode()===t.exports.ViewMode.PictureInPicture?i.on():i.off()},s=function(){r()?i.show():i.hide()};t.on(t.exports.PlayerEvent.ViewModeChanged,o),t.exports.PlayerEvent.ViewModeAvailabilityChanged&&t.on(t.exports.PlayerEvent.ViewModeAvailabilityChanged,s),n.getConfig().events.onUpdated.subscribe(s),this.onClick.subscribe(function(){if(!r()){console&&console.log("PIP unavailable");return}var e=t.getViewMode()===t.exports.ViewMode.PictureInPicture?t.exports.ViewMode.Inline:t.exports.ViewMode.PictureInPicture;t.setViewMode(e)}),s(),o()},t}(o.ToggleButton)},88315:e=>{!function(){"use strict";self,e.exports=(self.webpackChunkbitmovin_player=self.webpackChunkbitmovin_player||[]).push([[860],{6341:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.AbstractOverlayAdManager=void 0;var i=n(6365);t.AbstractOverlayAdManager=function(){function e(e,t){this.adContainer=e,this.isCustomAdContainer=t}return e.prototype.adjustAdContainer=function(e,t){this.adContainer.style.display="block",this.isCustomAdContainer||(this.adContainer.style.width=e+"px",this.adContainer.style.height=t+"px",this.adContainer.style.top="",this.adContainer.style.bottom=i.DEFAULT_OVERLAY_AD_BOTTOM_POSITION,this.adContainer.style.left="0",this.adContainer.style.right="0",this.adContainer.style.marginLeft="auto",this.adContainer.style.marginRight="auto")},e}()},77800:function(e,t,n){var i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},r=this&&this.__spreadArray||function(e,t,n){if(n||2==arguments.length)for(var i,r=0,o=t.length;r<o;r++)!i&&r in t||(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.AdBreakService=void 0,t.preprocessAdBreak=function(e,t,n){var r=[];return e.ads.forEach(function(e){var o,s;if((0,g.isInternalLinearAd)(e)){var a,u=(0,y.selectLinearMediaFile)(e.supportedMediaFiles,n.technology);u||(u=t(e.supportedMediaFiles.filter(f.isProgressiveMediaFile))),r.push((a=u,e.publicAd.data=i(i({},e.publicAd.data),(0,f.getAdDataForLinear)(a)),e.publicAd.mediaFileUrl=a.fileURL,e.publicAd.height=a.height,e.publicAd.width=a.width,e.isVpaid=(0,f.isVpaid)(a),null==e.publicAd.uiConfig.requestsUi&&(e.publicAd.uiConfig.requestsUi=!e.isVpaid),e))}else if((0,g.isInternalOverlayAd)(e)){var l,c,d=(0,y.selectNonLinearMediaFile)(e.supportedVariations,n.resolution,null!=(o=n.nonLinearTargetResolution)?o:{width:(l=n.resolution).width*b,height:l.height*S},null!=(s=n.allowScaledNonLinearAds)&&s);d&&r.push(((c=i(i({},e),{isVpaid:(0,f.isVpaid)(d),type:d.mimeType,htmlResource:d.htmlResource,iframeResource:d.iframeResource,staticResource:d.staticResource,adParameters:d.adParameters})).publicAd.data=i(i({},c.publicAd.data),(0,f.getAdDataForNonLinear)(d)),c.publicAd.mediaFileUrl=d.staticResource||d.htmlResource||d.iframeResource,c.publicAd.clickThroughUrl=d.nonlinearClickThroughURLTemplate,c.publicAd.height=d.height,c.publicAd.width=d.width,c))}}),i(i({},e),{ads:r})};var o=n(49075),s=n(76713),a=n(45392),u=n(90176),l=n(28610),c=n(23912),d=n(6365),p=n(47091),h=n(5838),f=n(45980),g=n(64092),v=n(88944),y=n(85320),m=n(58656);t.AdBreakService=function(){function e(e,t,n,r){this.fX=e,this.iX=[],this.jX=[],this.kX=[],this.lX=[],this.mX=[],this.gX=t,this.hX=t.strategy,this.nX=0,this.oX=0,this.pX=n,this.qX=this.fX.getVideoElement().parentElement,this.rX=r,this.gX.placeholders=i(i({},u.adTagPlaceholderDefaults),this.gX.placeholders)}return e.prototype.schedule=function(e){var t=this.QY(e);return this.PY(t)?this.sX(t,this.tX()):Promise.reject("can not schedule invalid AdConfig")},e.prototype.sX=function(e,t){var n=this;return this.GY(e).then(function(i){return 0===i.length&&e.fallbackTags&&e.fallbackTags.length>0?(e.tag=e.fallbackTags.shift(),n.sX(e,t)):Promise.resolve(n.uX(i.map(function(i){return n.vX(e,i,t)})))})},e.prototype.tX=function(){return this.oX+=100,this.oX},e.prototype.uX=function(e){var t=this,n=[],i=[],r=[];e.forEach(function(e,o){var a=t.fX.parsePosition(e.publicAdBreak.position);e.orderingIndex=e.orderingIndex+o,(0,s.isPauseAdBreak)(e.publicAdBreak)?(e.publicAdBreak.scheduleTime=NaN,r.push(e),n.push(e)):isNaN(a)?t.jX.push(e):(e.publicAdBreak.scheduleTime=a,n.push(e),i.push(e))});var o=n.filter(function(e){return e.publicAdBreak.persistent});return this.iX=this.iX.concat(i),this.lX=this.lX.concat(o),this.kX=this.kX.concat(r),this.iX.sort(m.adBreakPreloadComparator),n},e.prototype.vX=function(e,t,n){var r=i({},t.publicAdBreakConfig),o=i(i({publicAdBreak:r,orderingIndex:n},t),{isScheduled:!1,discardAfterPlayback:e.discardAfterPlayback});return delete o.publicAdBreakConfig,o},e.prototype.GY=function(e){var t=this;return new Promise(function(n){if(e.tag.type===c.AdTagType.VMAP){var i=e.tag.url;e.tag.url=t.KY(e.tag.url),h.VmapExtractor.extractAdBreakConfigs(e,t.rX).then(function(r){var o=r.adBreakConfigs.filter(function(e){var n=t.fX.parsePosition(e.publicAdBreakConfig.position);return isNaN(n)||n>=t.nX});e.tag.url=i,t.fX.metadataLoaded(e,r.downloadTiming),n(o)}).catch(function(r){e.tag.url=i,r?t.fX.onError(r.code,null,e):t.fX.onError(p.VastErrorCode.UNDEFINED_ERROR,null,e),n([])})}else n([{publicAdBreakConfig:e}])})},e.prototype.list=function(){return this.iX.concat(this.mX)},e.prototype.discardAdBreak=function(e){var t=function(t){return t.publicAdBreak.id!==e};this.iX=this.iX.filter(t),this.mX=this.mX.filter(t)},e.prototype.setCurrentScheduleTime=function(e){this.nX=e}
1,e.prototype.resetPlayedAdBreaks=function(e){this.list().forEach(function(t){t.publicAdBreak.scheduleTime>=e&&(t.loading=!1,t.isScheduled=!1)})},e.prototype.getPauseAdBreaks=function(){return this.kX.slice()},e.prototype.preloadAdBreaks=function(e){this.jX.length>0&&this.uX(this.jX.splice(0,this.jX.length));var t=this.iX[0];return!t||e<t.publicAdBreak.scheduleTime-t.publicAdBreak.preloadOffset?Promise.resolve():Promise.all(this.HY(e)).then(function(){})},e.prototype.HY=function(e){var t=this;return this.iX.filter(function(t){return e>=t.publicAdBreak.scheduleTime-t.publicAdBreak.preloadOffset&&!t.isScheduled&&!t.loading}).filter(function(e){var n=t.hX.shouldLoadAdBreak(e.publicAdBreak);return n||(e.discardAfterPlayback?t.discardAdBreak(e.publicAdBreak.id):e.isScheduled=!0),n}).map(function(e){return e.loading=!0,t.IY(e)})},e.prototype.IY=function(e,t){var n=this,i=t&&t.url||e.publicAdBreak.tag.url;return i=this.KY(i),this.rX.downloadVastManifest(i).then(function(t){return n.fX.metadataLoaded(e.publicAdBreak,t.downloadTiming),n.OY(t.manifest,e.publicAdBreak).then(function(t){e.ads=t;var i,o=t.filter(g.isInternalLinearAd),s=t.filter(function(e){return!(0,g.isInternalLinearAd)(e)}),a=(0,v.splitAdsBySequence)(o,null!=(i=n.gX.freewheelVastFallbackHandling)&&i).mainAds;e.publicAdBreak.ads=r(r([],a.map(function(e){return e.publicAd}),!0),s.map(function(e){return e.publicAd}),!0),e.discardAfterPlayback&&n.LY(e),e.isScheduled=!0,n.mX.push(e),n.mX.sort(m.adBreakScheduleComparator)})}).catch(function(t){return n.JY(e).then(function(){delete e.currentFallbackIndex}).catch(function(){e.discardAfterPlayback&&n.LY(e),n.MY(e),delete e.currentFallbackIndex,n.fX.onError(t.code,null,e.publicAdBreak),(0,a.pingVmapTrackingUrls)(e.trackingEvents,l.VmapTrackingEventType.BreakStart),
1(0,a.pingVmapTrackingUrls)(e.trackingEvents,l.VmapTrackingEventType.Error),(0,a.pingVmapTrackingUrls)(e.trackingEvents,l.VmapTrackingEventType.BreakEnd)})})},e.prototype.JY=function(e){return"number"!=typeof e.currentFallbackIndex?e.currentFallbackIndex=0:e.currentFallbackIndex++,e.publicAdBreak.fallbackTags&&e.publicAdBreak.fallbackTags[e.currentFallbackIndex]?this.IY(e,e.publicAdBreak.fallbackTags[e.currentFallbackIndex]):Promise.reject()},e.prototype.KY=function(e){var t=this,n={playbackTime:this.nX,height:String(this.qX.clientHeight),width:String(this.qX.clientWidth),domain:encodeURIComponent(document.location.hostname),page:encodeURIComponent(document.location.href),referrer:encodeURIComponent(document.referrer),random:Math.floor(1e7+9e7*Math.random()).toString(),timestamp:String(Date.now())};return Object.keys(this.gX.placeholders).forEach(function(i){t.gX.placeholders[i].forEach(function(t){e=e.replace(t,n[i])})}),e},e.prototype.LY=function(e){var t=this.iX.indexOf(e);t>=0&&this.iX.splice(t,1)},e.prototype.MY=function(e){var t=this.mX.indexOf(e);t>=0&&this.mX.splice(t,1)},e.prototype.NY=function(){return{id:"",adId:"",universalAdId:{idRegistry:"",value:""},trackingEvents:{complete:[],firstQuartile:[],midpoint:[],thirdQuartile:[]},apiFramework:null,sequence:null,type:"",adParameters:null,duration:-1,icons:[],mediaFiles:[],skipDelay:-1,videoClickThroughURLTemplate:"",videoClickTrackingURLTemplates:[],videoCustomClickURLTemplates:[]}},e.prototype.OY=function(e,t){var n,i=this;return this.pX.parseManifest(e,null!=(n=this.gX.freewheelVastFallbackHandling)&&n).then(function(e){var n=e.ads.flatMap(function(e){var n,r,s=f.AdTranslator.fromVastAd(e,t);if(0===s.length){var a=null!=(r=null==(n=e.creatives)?void 0:n[0])?r:i.NY();new o.VASTTracker(void 0,e,a).errorWithCode(String(p.VastErrorCode.NO_SUPPORTED_MEDIAFILE))}return s});if(0===n.length)throw{code:p.VastErrorCode.NO_SUPPORTED_MEDIAFILE};return n})},e.prototype.getPlayableAdBreaks=function(e){var t=this,n=this.mX[0];if(!n||e<n.publicAdBreak.scheduleTime)return[];var i=this.mX.filter(function(t){return e>=t.publicAdBreak.scheduleTime});return this.mX=this.mX.filter(function(e){return!i.includes(e)}),i.filter(function(e){return t.hX.shouldPlayAdBreak(e.publicAdBreak)})},e.prototype.PY=function(e){return[e.tag].concat(e.fallbackTags||[]).every(function(e){return e&&e.url&&Object.keys(c.AdTagType).some(function(t){return e.type===c.AdTagType[t]})})},e.prototype.reset=function(){this.kX=this.lX.filter(function(e){return(0,s.isPauseAdBreak)(e.publicAdBreak)}),this.iX=this.lX.filter(function(e){return!(0,s.isPauseAdBreak)(e.publicAdBreak)}).sort(m.adBreakPreloadComparator),this.mX=[],this.nX=0},e.prototype.QY=function(e){var t=i({},e);return t.position||(t.position=s.DEFAULT_AD_BREAK_POSITION),"number"!=typeof t.preloadOffset&&(t.preloadOffset=d.DEFAULT_PRELOAD_OFFSET),t},e.prototype.getPlayerContainerResolution=function(){return{width:this.qX.clientWidth,height:this.qX.clientHeight}},e}();var b=.85,S=.15},56528:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.AdPlayerWrapperFactory=void 0;var i=n(63589),r=n(72756);t.AdPlayerWrapperFactory=function(){function e(){}return e.create=function(e,t,n,o){return t.isVpaid?e.requestReporter().then(function(e){return new r.VpaidAdPlayer(e,n,o)}):e.requestPlayer().then(function(e){return new i.VideoAdPlayer(e,o)})},e}()},45980:function(e,t,n){var i,r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.AdTranslator=void 0,t.getSupportedMediaFiles=d,t.isStreamingMediaFile=p,t.isProgressiveMediaFile=function(e){return!p(e)},t.isVpaid=h,t.getAdDataForLinear=function(e){var t={};return e.mimeType&&(t.mimeType=e.mimeType),e.id&&(t.mediaFileId=e.id),e.deliveryType&&(t.delivery=e.deliveryType),e.codec&&(t.codec=e.codec),e.bitrate>0&&(t.bitrate=e.bitrate),e.minBitrate>0&&(t.minBitrate=e.minBitrate),e.maxBitrate>
10&&(t.maxBitrate=e.maxBitrate),e.apiFramework&&(t.apiFramework=e.apiFramework),t},t.getAdDataForNonLinear=function(e){var t={};return e.minSuggestedDuration&&e.minSuggestedDuration!==c.NON_SKIPPABLE_IDENTIFIER&&(t.minSuggestedDuration=e.minSuggestedDuration),e.apiFramework&&(t.apiFramework=e.apiFramework),t};var o,s=n(85434),a=n(23068),u=n(58313),l=n(70850),c=n(6365);function d(e){var t=e.filter(function(e){return e.deliveryType&&e.mimeType&&e.fileURL}),n=document.createElement("video");return t.filter(function(e){return p(e)?s.MimeTypeHelper.isDash(e.mimeType)||s.MimeTypeHelper.isHls(e.mimeType)||h(e):["maybe","probably"].includes(n.canPlayType(e.mimeType))||h(e)})}function p(e){return e.deliveryType===c.MediaFileDeliveryType.Streaming}function h(e){return e.apiFramework&&e.apiFramework.toLowerCase()===c.VastApiFramework.Vpaid}function f(e){return r(r({},e),{width:parseInt(e.width),height:parseInt(e.height),mimeType:e.type})}function g(e,t){var n={};return t.filter(function(t){return null!=e[t]}).forEach(function(t){return n[t]=e[t]}),n}(i=o||(o={})).Linear="linear",i.Companion="companion",i.NonLinear="nonlinear",t.AdTranslator=function(){function e(){}return e.fromVastAd=function(e,t){var n=this.extractMainAds(e,t),i=this.extractCompanionAds(e);return i.length>0&&n.forEach(function(e){e.companionAds=i,e.publicAd.companionAds=i.map(function(e){return e.publicAd})}),n},e.extractMainAds=function(e,t){var n=this;return this.sortCreatives(e),this.addCachebustingPlaceholder(e),e.creatives.filter(function(e){return e.type!==o.Companion}).map(function(i){return n.translateVastCreativeToAd(i,e,t)}).filter(function(e){return!!(null==e?void 0:e.publicAd)})},e.sortCreatives=function(e){return e.creatives.sort(function(e,t){return Number(e.sequence||0)-Number(t.sequence||0)})},e.translateVastCreativeToAd=function(e,t,n){var i,r,s=e.type===o.Linear?this.mapToLinearAd(t,e,n):this.mapToOverlayAd(t,e);return s&&(t.id&&(s.publicAd.id=t.id),(null==(i=t.verifications)?void 0:i.length)>0&&(s.publicAd.id=s.publicAd.id||"adVerification-"+l.Util.generateUniqueId(),s.publicAd.verifications=t.verifications),(null==(r=t.extensions)?void 0:r.length)>0&&(s.publicAd.extensions=t.extensions),s.originalVastAd=t,s.originalVastCreative=e),s},e.extractCompanionAds=function(e){var t=this;return e.creatives.filter(function(e){return e.type===o.Companion}).flatMap(function(e){return t.mapToCompanionAds(e)})},e.mapToCompanionAds=function(e){return e.variations.map(function(e){return{publicAd:{width:Number(e.width),height:Number(e.height)},id:e.id,clickThroughUrl:e.companionClickThroughURLTemplate,type:e.type,htmlResource:e.htmlResource,iframeResource:e.iframeResource,staticResource:e.staticResource}})},e.mapToLinearAd=function(e,t,n){var i=d(t.mediaFiles);if(!i.length)return null;var r=(0,a.isNumber)(n.skippableAfter)?n.skippableAfter:t.skipDelay,o=null!=r&&r!==c.NON_SKIPPABLE_IDENTIFIER,s={publicAd:{duration:t.duration,skippable:o,isLinear:!0,clickThroughUrl:t.videoClickThroughURLTemplate,width:0,height:0,data:this.collectVastAdData(e,t),uiConfig:this.getUiConfig(n)},adParameters:t.adParameters,supportedMediaFiles:i,fallback:!!e.isFallback};return o&&(s.publicAd.skippableAfter=r),s},e.getUiConfig=function(e){var t={};return e.linearAdUiConfig&&(t.message=e.linearAdUiConfig.message,t.skippableMessage=e.linearAdUiConfig.skippableMessage,t.untilSkippableMessage=e.linearAdUiConfig.untilSkippableMessage,null!=e.linearAdUiConfig.requestsUi&&(t.requestsUi=e.linearAdUiConfig.requestsUi)),t},e.mapToOverlayAd=function(e,t){var n=t.variations.map(f);return n.length?{publicAd:{isLinear:!1,width:0,height:0,data:this.collectVastAdData(e,t)},type:"",supportedVariations:n}:null},e.collectVastAdData=function(e,t){var n,i,r,o,s,a,u={adTitle:e.title,adDescription:e.description,wrapperAdIds:e.wrapperAdIds};return Object.keys(t).length&&(i={},t.id&&(i.id=t.id),t.adId&&(i.adId=t.adId),(null==(n=t.universalAdId)?void 0:n.value)&&t.universalAdId.idRegistry&&(i.universalAdId={value:t.universalAdId.value,idRegistry:t.universalAdId.idRegistry}),u.creative=i),(null==(r=e.system)?void 0:r.value)&&(u.adSystem=e.system.version?{name:e.system.value,version:e.system.version}:{name:e.system.value}),(null==(o=e.advertiser)?void 0:o.name)&&(u.advertiser=g(e.advertiser,["name","id"])),(null==(s=e.survey)?void 0:s.uri)&&(u.survey=g(e.survey,["uri","type"])),(null==(a=e.pricing)?void 0:a.value)&&e.pricing.model&&e.pricing.currency&&(u.pricing={value:Number(e.pricing.value),model:e.pricing.model,currency:e.pricing.currency}),u}
1,e.addCachebustingPlaceholder=function(e){e.creatives.forEach(function(e){var t=e.trackingEvents;t&&Object.keys(t).forEach(function(e){var n=t[e];n.forEach(function(e,t){e.includes("CACHEBUSTING")||(n[t]=u.URLHelper.appendQueryParametersToUrl(e,{"[CACHEBUSTING]":null}))})})})},e}()},60814:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.splitArray=function(e,t){var n=e.filter(t),i=e.filter(function(e){return!n.includes(e)});return[n,i]}},27319:function(e,t,n){var i,r=this&&this.__extends||(i=function(e,t){return(i=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])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__assign||function(){return(o=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},s=this&&this.__spreadArray||function(e,t,n){if(n||2==arguments.length)for(var i,r=0,o=t.length;r<o;r++)!i&&r in t||(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.BitmovinModule=void 0,t.getAdLoadingError=C;var a=n(4224),u=n(45202),l=n(3714),c=n(34841),d=n(65348),p=n(88052),h=n(62756),f=n(76713),g=n(45392),v=n(28412),y=n(28610),m=n(60326),b=n(47091),S=n(77800),E=n(56528),_=n(88944),T=n(59409),P=n(76955);function C(e,t){return(null==t?void 0:t.code)?t:e.publicAd.isLinear?{code:b.VastErrorCode.MEDIAFILE_URI_TIMEOUT}:{code:b.VastErrorCode.UNABLE_TO_FETCH_NONLINEAR_RESOURCE}}function A(e){return e.publicAd.isLinear}t.BitmovinModule=function(e){function t(t,n,i){var r=e.call(this,t,n,i)||this;return r.iz=[],r.xz=Promise.resolve(),r.Pz=function(){r.iz.forEach(function(e){return e.complete()}),r.bA()},r.bA=function(){return r.xz.then(function(){return r.jz&&(r.xz=r.jz.done().catch(function(e){}).finally(function(){return r.aA()}),r.jz=null),r.xz})},r.cA=function(){r.dA({code:b.VastErrorCode.GENERAL_LINEAR_ERROR}),r.bA()},r.Az(n,t),r.ez=new S.AdBreakService(t,n,new m.VastClientWrapper(n.videoLoadTimeout,n.withCredentials,n.disableStorageApi),i),r.hz=[],r.mz=!1,r.nz=!1,r.tz=!1,r.uz=!1,r.qz=-1/0,r.zz(),r.vz=Promise.resolve([]),r}return r(t,e),t.prototype.initialize=function(){},t.prototype.zz=function(){"function"==typeof this.config.adContainer&&(this.sz=this.config.adContainer(),this.sz instanceof HTMLElement?this.tz=!0:this.player.onError(b.VastErrorCode.UNDEFINED_ERROR,"AdvertisingConfig.adContainer was defined but did not provide a valid HTMLElement.")),this.tz||(this.sz=d.DOMHelper.createTag("div",{class:u.Environment.idPrefix+"overlay-container"},{height:"100%",width:"100%",display:"none",border:"none",overflow:"hidden",position:"absolute",top:"0"}),this.rz=this.player.getVideoElement().parentElement,this.rz.appendChild(this.sz))},t.prototype.Az=function(e,t){var n,i=p.ModuleManager.get(h.ModuleName.Advert
1isingOmSdk,!1);if(null==(n=e.trackers)?void 0:n.omSdk){if(!i)return void t.onWarning(a.WarningCode.MODULE_ADVERTISING_OM_SDK_MODULE_MISSING);try{this.yz=new i.BitmovinOpenMeasurementAdVerification(t.getVideoElement(),t.onWarning,e.trackers.omSdk)}catch(e){t.onWarning(a.WarningCode.MODULE_ADVERTISING_OM_SDK_INIT_FAILURE,e.message,e)}}},t.prototype.afterContent=function(){var e=this;return this.Bz(1/0).then(function(){return e.ez.resetPlayedAdBreaks(0)})},t.prototype.beforeContent=function(){var e=this;return this.vz.then(function(){return e.Bz(0)})},t.prototype.currentTime=function(){return this.jz.currentTime},t.prototype.duration=function(){return this.jz.duration},t.prototype.discardAdBreak=function(e){this.ez.discardAdBreak(e),this.hz=this.hz.filter(function(t){return t.publicAdBreak.id!==e}),this.wz&&this.wz.done()},t.prototype.getActiveAdBreak=function(){return this.fz&&this.fz.publicAdBreak},t.prototype.getActiveAd=function(){return this.gz},t.prototype.isLinearAdActive=function(e){return e?!!(this.lz&&!this.jz.paused):!!this.lz},t.prototype.isPauseAdActive=function(){var e=this.getActiveAd();return!!(e&&!e.isLinear&&(0,f.isPauseAdBreak)(this.getActiveAdBreak()))},t.prototype.list=function(){return s(s([],this.hz,!0),this.ez.list(),!0).map(function(e){return e.publicAdBreak})},t.prototype.onResize=function(e,t,n){this.oz&&n!==this.oz.isFullscreen&&this.iz.forEach(function(e){return e.setFullscreen(n)}),this.oz={width:e,height:t,isFullscreen:n},this.jz&&(this.jz.playerResolution=this.oz)},t.prototype.onSeek=function(e,t){var n=this;this.ez.resetPlayedAdBreaks(t),this.uz=!0,this.ez.preloadAdBreaks(t).then(function(){var i=n.hz.concat(n.ez.getPlayableAdBreaks(t)),r=i.map(function(e){return e.publicAdBreak}),o=n.config.strategy.shouldPlaySkippedAdBreaks(r,e,t);n.hz=i.filter(function(e){return o.find(function(t){return t===e.publicAdBreak})})}).finally(function(){n.uz=!1})},t.prototype.onTimeChanged=function(e){var t=this;if(this.isLinearAdActive()){var n=this.jz.duration;return(!isFinite(this.qz)||n!==this.qz&&n>0)&&(this.qz=n,this.iz.forEach(function(e){return e.setDuration(t.qz)})),void this.iz.forEach(function(t){return t.progress(e)})}this.uz||this.Bz(e).then(function(){}).catch(function(){})},t.prototype.Bz=function(e){var t=this;return this.ez.setCurrentScheduleTime(e),this.uz=!0,this.ez.preloadAdBreaks(e).then(function(){var n=t.ez.getPlayableAdBreaks(e);return t.Dz(n)}).finally(function(){t.uz=!1})},t.prototype.onVolumeChanged=function(e){this.iz.forEach(function(t){return t.volumeChanged(e)})},t.prototype.pause=function(){this.jz&&!this.jz.paused&&(this.jz.pause(),this.iz.forEach(function(e){return e.setPaused(!0)}))},t.prototype.reset=function(){var e,t,n,i=this;this.nz=this.mz,this.hz=[],this.ez.reset(),this.vz=Promise.resolve([]),this.iz.forEach(function(e){return e.dispose()}),this.iz=[];var r=null!=(t=null==(e=this.jz)?void 0:e.reset())?t:Promise.resolve();return null==(n=this.kz)||n.stop(),this.kz=null,this.lz=!1,this.gz=null,this.fz=null,this.qz=-1/0,r.then(function(){i.jz=null})},t.prototype.resume=function(){var e=this;this.jz&&this.jz.paused&&this.jz.play().then(function(){return e.iz.forEach(function(e){return e.setPaused(!1)})})},t.prototype.schedule=function(e){return e.discardAfterPlayback=!1!==e.discardAfterPlayback,this.vz=this.ez.schedule(e),this.vz.then(function(e){return e.map(function(e){return e.publicAdBreak})})},t.prototype.skip=function(){return this.hA(),this.isLinearAdActive()&&this.jz.skippable?(this.jz.skip(),this.Cz()):Promise.resolve()},t.prototype.Cz=function(){return this.iz.forEach(function(e){return e.skip()}),this.bA()},t.prototype.Dz=function(e){var t=this;this.hz=this.hz.concat(e);var n=this.hz.shift();if(!n)return Promise.resolve();var i=(0,S.preprocessAdBreak)(n,function(e){return t.Ez(e)},{technology:this.config.preferredTechnology,resolution:this.ez.getPlayerContainerResolution()});return this.Fz(i).then(function(){return t.Dz([])})},t.prototype.Ez=function(e){var t=this.player.selectMediaFile(e),n=e.map(function(e){return o({},e)});return(this.config.onSelectAdQuality?this.config.onSelectAdQuality(t,n):null)||t},t.prototype.Fz=function(e){var t=this;return(0,g.pingVmapTrackingUrls)(e.trackingEvents,y.VmapTrackingEventType.BreakStart),e.ads&&0!==e.ads.length?(this.hA(),this.Gz(e).then(function(){return t.eA(e)}).then(function(){(0,g.pingVmapTrackingUrls)(e.trackingEvents,y.VmapTrackingEventType.BreakEnd),t.fz=null})):((0,g.pingVmapTrackingUrls)(e.trackingEvents,y.VmapTrackingEventType.BreakEnd),Promise.resolve())},t.prototype.Gz=function(e){var t=this,n=e.ads.filter(A);return 0===n.length?Promise.resolve():(this.fz=e,this.player.requestAdPlayback(e.publicAdBreak).then(function(e){t.wz||(t.wz=e);var i=(0,_.splitAdsBySequence)(n,t.config.freewheelVastFallbackHandling),r=Promise.resolve();i.mainAds.forEach(function(n){r=r.then(function(){return t.Jz(n,e,i.getBackupAds(n))})});var o=!!(t.hz.length>0&&t.hz[0].ads.find(function(e){return e.publicAd.isLinear}));return r.then(function(){return e.done(!o)})}))},t.prototype.Hz=function(e){var t=this,n={width:this.rz.clientWidth,height:this.rz.clientHeight,is
1Fullscreen:this.oz&&this.oz.isFullscreen};return this.mz=!0,this.jz.load(e,n).then(function(){return t.Oz(e.publicAd)}).catch(function(n){return t.nz||t.dA(C(e,n)),t.bA().finally(function(){return Promise.reject(n)})}).finally(function(){t.mz=!1,t.nz=!1})},t.prototype.Iz=function(e,t){var n=this,i=new c.Deferred;return this.pz=i,E.AdPlayerWrapperFactory.create(t,e,this.sz,this.config.videoLoadTimeout).then(function(t){var i,r;if(n.jz=t,n.Kz(e),n.iz.push(new P.VastAdTracker(e,n.player)),n.yz){var o=null==(r=null==(i=n.fz)?void 0:i.publicAdBreak)?void 0:r.scheduleTime,s=p.ModuleManager.get(h.ModuleName.AdvertisingOmSdk).OmSdkAdTracker;n.iz.push(new s(e,n.player,n.yz,o))}return n.iz=n.iz.filter(function(e){return e.setupWasSuccessful()}),e.publicAd.clickThroughUrlOpened=n.Lz(e),n.Hz(e)}).then(function(){return i.promise})},t.prototype.Jz=function(e,t,n){var i=this;return this.Iz(e,t).catch(function(){if(n.length)return i.Jz(n.shift(),t,n)})},t.prototype.Kz=function(e){var t=this;this.jz.on(l.PlayerEvent.PlaybackFinished,this.Pz),this.jz.on(l.PlayerEvent.Error,function(){t.nz=t.mz,t.Nz().then(t.bA)}),this.jz.on(l.PlayerEvent.AdSkipped,function(){return t.Cz()}),this.jz.on(l.PlayerEvent.AdClicked,this.Lz(e)),this.jz.on(l.PlayerEvent.AdInteraction,function(e){return t.Mz(e,l.AdInteractionType.Vpaid)})},t.prototype.Lz=function(e){var t=this;return function(){t.iz.forEach(function(e){return e.click()}),t.player.adClicked(e.publicAd.clickThroughUrl)}},t.prototype.Mz=function(e,t){var n=e[0][0];this.player.adInteraction(t,n)},t.prototype.Nz=function(){return this.lz=!1,this.dA({code:b.VastErrorCode.GENERAL_LINEAR_ERROR}),Promise.resolve()},t.prototype.Oz=function(e){this.jz.on(l.PlayerEvent.Error,this.cA),this.iz.forEach(function(e){return e.trackImpression()}),this.lz=!0,this.gz=e},t.prototype.aA=function(){this.lz=!1,this.gz=null,this.qz=-1/0,this.iz.forEach(function(e){return e.dispose()}),this.iz=[],this.pz&&(this.pz.resolve(),this.pz=null)},t.prototype.dA=function(e,t){void 0===t&&(t=this.getActiveAdBreak()),this.player.onError(e.code,e.message,t),b.VastErrorCode[e.code]&&this.iz.forEach(function(t){return t.errorWithCode(String(e.code))})},t.prototype.eA=function(e){var t=this,n=e.ads.filter(function(e){return!e.publicAd.isLinear});if(0===n.length)return Promise.resolve();var i=n[n.length-1];return this.fA(i,e).catch(function(n){n&&t.dA({code:n},e.publicAdBreak),t.kz=null,t.iz.forEach(function(e){return e.dispose()}),t.iz=[]})},t.prototype.fA=function(e,t){var n=this;this.kz=T.OverlayAdManagerFactory.create(e,this.sz,this.tz,this.config.videoLoadTimeout),this.iz.push(new P.VastAdTracker(e,this.player)),e.publicAd.clickThroughUrlOpened=function(){n.iz.forEach(function(e){return e.click()}),n.player.adClicked(e.publicAd.clickThroughUrl)},this.kz.on(l.PlayerEvent.AdClicked,this.Lz(e)),this.kz.on(l.PlayerEvent.Error,function(){return n.gA(t.publicAdBreak)});var i={width:this.rz.clientWidth,height:this.rz.clientHeight,isFullscreen:this.oz&&this.oz.isFullscreen};return this.kz.display(e,i).then(function(){n.gz=e.publicAd,n.player.overlayAdStarted(e.publicAd),n.iz.forEach(function(e){return e.trackImpression()})})},t.prototype.gA=function(e){this.dA({code:b.VastErrorCode.GENERAL_NONLINEARADS_ERROR},e),this.hA()},t.prototype.hA=function(){this.getActiveAd()&&!this.getActiveAd().isLinear&&(this.gz=null,this.kz&&(this.kz.stop(),this.kz=null),this.iz.forEach(function(e){e.close(),e.dispose()}),this.iz=[])},t.prototype.dispose=function(){this.kz&&(this.kz.stop(),this.kz=null),this.iz.forEach(function(e){return e.dispose()}),this.iz=[],this.vz=null,this.fz=null,this.gz=null,this.hz=[],this.rz.removeChild(this.sz),this.sz=null},t.prototype.getModuleInfo=function(){return{name:t.MODULE_NAME,version:t.MODULE_VERSION}},t.bitmovinMarker=function(){},t.MODULE_NAME="advertising-bitmovin",t.MODULE_VERSION=u.Environment.VERSION_NUMBER,t}(v.AdvertisingModule)},92996:function(e,t){var n;Object.defineProperty(t,"__esModule",{value:!0}),t.BitmovinModuleErrorCode=void 0,n||(t.BitmovinModuleErrorCode=n={})}
1,64092:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.isInternalLinearAd=function(e){return(0,i.isObject)(e)&&!!e.supportedMediaFiles},t.isInternalOverlayAd=function(e){return(0,i.isObject)(e)&&!!e.supportedVariations};var i=n(94685)},88944:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.splitAdsBySequence=function(e,t){var n,o,s,a,u;return t?{mainAds:Object.keys((n={},e.forEach(function(e){var t;t=Number(e.originalVastAd&&(e.originalVastAd.sequence||e.originalVastAd.fallbackAdSequence))||1/0,n[t]?n[t].fallback.push(e):n[t]={main:e,fallback:[]}}),o=n)).sort(r).map(function(e){return o[e].main}),getBackupAds:function(e){var t=Object.values(o).find(function(t){return t.main===e});return null==t?[]:t.fallback}}:(a=(s=(0,i.splitArray)(e,function(e){return!e.fallback}))[0],u=s[1],{mainAds:a,getBackupAds:function(e){return u}})};var i=n(60814);function r(e,t){return(Number(e)||999)-(Number(t)||999)}},85320:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.selectLinearMediaFile=function(e,t){var n=(0,r.getBestTech)(t,e.reduce(function(e,t){var n;return e[n=t.mimeType,o.MimeTypeHelper.isDash(n)?i.StreamType.Dash:o.MimeTypeHelper.isHls(n)?i.StreamType.Hls:i.StreamType.Progressive]=t.fileURL,e},{})).streaming;return n===i.StreamType.Dash||n===i.StreamType.Hls?e.find(function(e){return n===i.StreamType.Dash?o.MimeTypeHelper.isDash(e.mimeType):n===i.StreamType.Hls&&o.MimeTypeHelper.isHls(e.mimeType)}):null},t.selectNonLinearMediaFile=function(e,t,n,i){var r=e.filter(function(e){return e.width<=t.width&&e.height<=t.height||i&&e.scalable});return r.length?(0,s.findMediaFileByResolution)(n.width,n.height,r):null};var i=n(44468),r=n(47993),o=n(85434),s=n(65185)},17614:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}
1),t.BitmovinModuleErrorCode=t.AdvertisingBitmovinModuleDefinition=void 0;var i=n(62756),r=n(27319),o=n(92996);Object.defineProperty(t,"BitmovinModuleErrorCode",{enumerable:!0,get:function(){return o.BitmovinModuleErrorCode}}),t.AdvertisingBitmovinModuleDefinition={name:i.ModuleName.Advertising,module:function(){return r.BitmovinModule},dependencies:[i.ModuleName.AdvertisingCore],exports:{BitmovinModuleErrorCode:o.BitmovinModuleErrorCode}},t.default=t.AdvertisingBitmovinModuleDefinition},59409:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.OverlayAdManagerFactory=void 0;var i=n(36396),r=n(10332);t.OverlayAdManagerFactory=function(){function e(){}return e.create=function(e,t,n,o){return e.isVpaid?new r.VpaidOverlayAdManager(t,n,o):new i.OverlayAdManager(t,n)},e}()},58656:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.adBreakPreloadComparator=t.adBreakScheduleComparator=void 0;var i=n(6365);t.adBreakScheduleComparator=function(e,t){if(e.publicAdBreak.scheduleTime>t.publicAdBreak.scheduleTime)return 1;if(t.publicAdBreak.scheduleTime>e.publicAdBreak.scheduleTime)return -1;var n=e.orderingIndex,i=t.orderingIndex;return n>i?1:n<i?-1:0},t.adBreakPreloadComparator=function(e,t){var n,r,o=e.publicAdBreak.scheduleTime-(null!=(n=e.publicAdBreak.preloadOffset)?n:i.DEFAULT_PRELOAD_OFFSET)-(t.publicAdBreak.scheduleTime-(null!=(r=t.publicAdBreak.preloadOffset)?r:i.DEFAULT_PRELOAD_OFFSET));return 0!==o?o:e.orderingIndex-t.orderingIndex}},36396:function(e,t,n){var i,r=this&&this.__extends||(i=function(e,t){return(i=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])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.OverlayAdManager=void 0;var o=n(65348),s=n(7581);t.OverlayAdManager=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.display=function(e){return e.staticResource?(this.Dbb=this.Ebb(e),this.Dbb.onclick=e.publicAd.clickThroughUrlOpened,this.adjustAdContainer(e.publicAd.width,e.publicAd.height),this.adContainer.appendChild(this.Dbb),Promise.resolve()):Promise.reject(s.VastErrorCode.NO_SUPPORTED_NONLINEAR_RESOURCE_TYPE)},t.prototype.Ebb=function(e){var t=o.DOMHelper.createTag("a",{href:e.publicAd.clickThroughUrl,target:"_blank"},{width:e.publicAd.width+"px",height:e.publicAd.height+"px"}),n=o.DOMHelper.createTag("img",{src:e.publicAd.mediaFileUrl},{width:e.publicAd.width+"px",height:e.publicAd.height+"px"});return t.appendChild(n),t},t.prototype.on=function(){},t.prototype.stop=function(){this.adContainer.style.display="none",this.Dbb&&(this.adContainer.removeChild(this.Dbb),this.Dbb=null)},t}(n(6341).AbstractOverlayAdManager)},76955:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.VastAdTracker=void 0;var i=n(49075),r=n(3714),o=n(95217);t.VastAdTracker=function(){function e(t,n){this.player=n,this.SY=[],this.RY=e.createVastTracker(t),this.UY(this.RY,n)}return e.createVastTracker=function(e){return new i.VASTTracker(null,e.originalVastAd,e.originalVastCreative)},e.prototype.setupWasSuccessful=function(){return null!=this.RY},e.prototype.setFullscreen=function(e){this.RY.setFullscreen(e)},e.prototype.volumeChanged=function(e){this.RY.setMuted(0===e)},e.prototype.setMuted=function(e){this.RY.setMuted(e)},e.prototype.setPaused=function(e){this.RY.setPaused(e)},e.prototype.skip=function(){this.TY(),this.RY.skip()},e.prototype.click=function(){this.RY.click()},e.prototype.complete=function(){this.TY(),this.VY(),this.RY.complete()},e.prototype.close=function(){this.RY.close()},e.prototype.progress=function(e){this.RY.setProgress(e)},e.prototype.loaded=function(){},e.prototype.started=function(){},e.prototype.setDuration=function(e){this.RY.setDuration(e)},e.prototype.trackImpression=function(){this.RY.trackImpression()},e.prototype.errorWithCode=function(e){this.RY.errorWithCode(e)},e.prototype.TY=function(){this.RY.removeAllListeners(r.AdQuartile.FIRST_QUARTILE),this.RY.removeAllListeners(r.AdQuartile.MIDPOINT),this.RY.removeAllListeners(r.AdQuartile.THIRD_QUARTILE)},e.prototype.UY=function(e,t){var n=this;e.on(o.AdTrackingEvent.FirstQuartile,function(){t.onQuartile(r.AdQuartile.FIRST_QUARTILE),n.SY.push(r.AdQuartile.FIRST_QUARTILE)}),e.on(o.AdTrackingEvent.Midpoint,function(){t.onQuartile(r.AdQuartile.MIDPOINT),n.SY.push(r.AdQuartile.MIDPOINT)}),e.on(o.AdTrackingEvent.ThirdQuartile,function(){t.onQuartile(r.AdQuartile.THIRD_QUARTILE),n.SY.push(r.AdQuartile.THIRD_QUARTILE)})},e.prototype.VY=function(){var e=this;[r.AdQuartile.FIRST_QUARTILE,r.AdQuartile.MIDPOINT,r.AdQuartile.THIRD_QUARTILE].forEac
1h(function(t){e.SY.includes(t)||e.player.onQuartile(t)})},e.prototype.dispose=function(){this.TY()},e}()},63589:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.VideoAdPlayer=void 0;var i=n(3714),r=n(19483),o=n(88844),s=n(6365);t.VideoAdPlayer=function(){function e(e,t){this.adPlayer=e,this.loadTimeout=t,this.Cbb=[i.PlayerEvent.AdSkipped,i.PlayerEvent.AdClicked,i.PlayerEvent.AdInteraction],this.Bbb=new r.ArrayMap}return e.prototype.done=function(){var e=this;return this.adPlayer?this.adPlayer.done().then(function(){return e.adPlayer=null}):Promise.resolve()},e.prototype.load=function(e){var t=this,n=window.setTimeout(function(){return t.done()},this.loadTimeout);return this.Abb=e,this.adPlayer.load(e.publicAd).finally(function(){return(0,o.clearTimeoutIfDefined)(n)})},e.prototype.on=function(e,t){this.Cbb.includes(e)||(this.Bbb.add(e,t),this.adPlayer.on(e,t))},e.prototype.pause=function(){this.adPlayer.pause()},e.prototype.play=function(){return this.adPlayer.play()},e.prototype.skip=function(){},Object.defineProperty(e.prototype,"currentTime",{get:function(){return this.adPlayer.currentTime},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"paused",{get:function(){return this.adPlayer.paused},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"duration",{get:function(){return this.adPlayer.duration},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"muted",{get:function(){return this.adPlayer.muted},set:function(e){this.adPlayer.muted=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"volume",{get:function(){return this.adPlayer.volume},set:function(e){this.adPlayer.volume=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"playerResolution",{set:function(e){},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"skippable",{get:function(){var e=this.Abb.publicAd.skippableAfter!==s.NON_SKIPPABLE_IDENTIFIER,t=this.Abb.publicAd.skippableAfter<=this.currentTime;return e&&t},enumerable:!1,configurable:!0}),e.prototype.reset=function(){return Promise.resolve()},e}()},72756:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.VpaidAdPlayer=void 0;var i=n(3714),r=n(34841),o=n(88844),s=n(25534),a=n(61411),u=n(41680);t.VpaidAdPlayer=function(){function e(e,t,n){var a=this;this.Jbb=new Map,this.cbb=function(){a.done().catch(function(){}),a.Qbb.reject()},this.dbb=function(){(0,o.clearTimeoutIfDefined)(a.Sbb),a.Sbb=void 0,(0,o.clearTimeoutIfDefined)(a.Ubb),a.Hbb.style.display="block",a.Kbb.videoElement.style.setProperty("display","block","important"),a.Ubb=window.setTimeout(a.fbb,a.Tbb),a.Gbb.startAd()},this.fbb=function(){a.Gbb.stopAd(),a.ebb(),a.Qbb.reject()},this.qcb=function(){(0,o.clearTimeoutIfDefined)(a.Ubb),a.Ubb=void 0,a.Nbb=!0,a.Qbb.resolve(),a.Kbb.started(a.Fbb.publicAd)},this.rcb=function(){},this.scb=function(e){a.Qbb.reject(e),a.reset()},this.tcb=function(){return a.Nbb=!1,a.Pbb&&(a.Pbb.reject(),a.Pbb=null),a.Kbb.paused(a.currentTime),a.Gbb&&a.duration>0&&a.Gbb.getAdLinear()&&0===a.Gbb.getAdRemainingTime()?a.done():Promise.resolve()},this.ucb=function(){a.Pbb&&(a.Pbb.resolve(),a.Pbb=null),a.Nbb||(a.Nbb=!0,a.Kbb.resumed(a.currentTime))},this.vcb=function(){a.bbb=!1,a.Kbb.skipped(),a.reset()},this.wcb=function(e){var t=e[0],n=t[0],i=t[2],r=n||a.Fbb.publicAd.clickThroughUrl;i&&null!=r&&window.open(r)},this.xcb=function(){a.duration<=0&&!isFinite(a.Rbb)&&(a.Rbb=4*a.currentTime)},this.ycb=function(){if(a.Gbb){var e=a.Gbb.getAdRemainingTime();if(-1!==e&&-2!==e){var t=a.Gbb.getAdDuration()-e;if(isFinite(t)&&t>=0&&t!==a.Mbb){if(a.Mbb=t,!a.Nbb)return;a.Kbb.timeupdate(a.Mbb)}}}},this.Ccb=function(){a.Bcb(),a.ebb(),a.Xbb.resolve()},this.Dcb=function(){a.Ybb=!0,(0,o.clearTimeoutIfDefined)(a.Vbb),a.Ubb=void 0,a.Xbb.resolve()},this.done=function(){return(0,o.clearIntervalIfDefined)(a.Obb),a.Obb=void 0,a.Ecb().then(function(){return a.Xbb.promise}).then(function(){return a.Wbb=[],a.Bcb(),a.Fcb(),a.Kbb.done()}).then(function(){a.bbb&&a.Kbb.skipped()})},this.Hbb=t,this.Kbb=e,this.Jbb=new Map,this.Mbb=-1/0,this.Nbb=!1,this.Qbb=new r.Deferred,this.Rbb=-1/0,this.Tbb=n,this.Wbb=[],this.Xbb=new r.Deferred,this.Ybb=!1,this.Zbb=new u.VpaidEventHandler,this.Jbb.set(i.PlayerEvent.PlaybackFinished,s.VpaidEvent.AdStopped),this.Jbb.set(i.PlayerEvent.Error,s.VpaidEvent.AdError),this.Jbb.set(i.PlayerEvent.AdClicked,s.VpaidEvent.AdClickThru),this.Jbb.set(i.PlayerEvent.AdSkipped,s.VpaidEvent.AdSkipped),this.Jbb.set(i.PlayerEvent.AdInteraction,s.VpaidEvent.AdInteraction),this.Acb()}return e.prototype.load=function(e,t){var n=this,i=this.Kbb.videoElement;
1return this.Fbb=e,this.Ibb=t,this.abb={autoplay:i.autoplay,crossOrigin:i.crossOrigin,preload:i.preload,style:i.getAttribute("style")},a.VpaidContextFactory.createVpaidContext(this.Fbb.publicAd.mediaFileUrl,this.Hbb,this.Tbb).then(function(t){var i,r=n.Ibb.isFullscreen?s.VpaidViewMode.Fullscreen:s.VpaidViewMode.Normal;(0,o.clearTimeoutIfDefined)(n.Sbb),n.Sbb=window.setTimeout(n.cbb,n.Tbb),n.Gbb=t.api,n.Zbb.attach(n.Gbb),n.Obb=window.setInterval(n.ycb,250),n.Gbb.initAd(n.Ibb.width,n.Ibb.height,r,1e5,{AdParameters:e.adParameters},{videoSlotCanAutoPlay:!0,videoSlot:n.Kbb.videoElement,slot:null==(i=t.container.contentDocument)?void 0:i.body})}).catch(function(){return n.done().then(function(){n.Qbb.reject()})}),this.Qbb.promise.catch(function(e){return n.Xbb.resolve(),Promise.reject(e)})},e.prototype.ebb=function(){this.Wbb.forEach(function(e){return e()})},e.prototype.zcb=function(e,t){this.Zbb.on(e,t)},e.prototype.on=function(e,t){e===i.PlayerEvent.Error&&this.Wbb.push(t),this.Zbb.on(this.Jbb.get(e)||e,t)},e.prototype.off=function(e,t){this.Zbb.off(e,t)},e.prototype.Acb=function(){this.zcb(s.VpaidEvent.AdLoaded,this.dbb),this.Zbb.on(s.VpaidEvent.AdError,this.scb),this.Zbb.on(s.VpaidEvent.AdPaused,this.tcb),this.Zbb.on(s.VpaidEvent.AdPlaying,this.ucb),this.Zbb.on(s.VpaidEvent.AdStarted,this.qcb),this.Zbb.on(s.VpaidEvent.AdStopped,this.Dcb),this.Zbb.on(s.VpaidEvent.AdSkipped,this.vcb),this.Zbb.on(s.VpaidEvent.AdClickThru,this.wcb),this.Zbb.on(s.VpaidEvent.AdImpression,this.rcb),this.Zbb.on(s.VpaidEvent.AdVideoFirstQuartile,this.xcb)},e.prototype.Bcb=function(){this.Gbb&&(this.Zbb.detach(this.Gbb),this.Gbb.done(),this.Gbb=null,this.abb&&(this.Kbb.videoElement.preload=this.abb.preload,this.Kbb.videoElement.autoplay=this.abb.autoplay,this.Kbb.videoElement.crossOrigin=this.abb.crossOrigin,this.abb.style&&this.Kbb.videoElement.setAttribute("style",this.abb.style),this.abb=null)),this.Hbb.style.setProperty("display","none")},e.prototype.Ecb=function(){return this.Ybb?Promise.resolve():((0,o.clearTimeoutIfDefined)(this.Vbb),this.Ubb=void 0,this.Gbb?(this.Vbb=window.setTimeout(this.Ccb,this.Tbb),this.Gbb.stopAd()):this.Xbb.resolve(),this.Xbb.promise)},e.prototype.pause=function(){this.Gbb.pauseAd(),this.Pbb&&this.Pbb.reject()},e.prototype.play=function(){if(this.Nbb)return Promise.resolve();this.Pbb=this.Pbb||new r.Deferred;var e=this.Pbb.promise;return this.Gbb.resumeAd(),e},e.prototype.skip=function(){this.Gbb&&this.Gbb.skipAd(),this.bbb=!0},Object.defineProperty(e.prototype,"currentTime",{get:function(){return isFinite(this.Mbb)?this.Mbb:0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"paused",{get:function(){return!this.Nbb},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"duration",{get:function(){var e=this.Gbb.getAdDuration();return e<=0&&isFinite(this.Rbb)?this.Rbb:e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"muted",{get:function(){return 0===this.Gbb.getAdVolume()},set:function(e){e&&this.Gbb.getAdVolume()>0?(this.Lbb=this.Gbb.getAdVolume(),this.Gbb.setAdVolume(0)):e||this.Gbb.setAdVolume(this.Lbb)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"volume",{get:function(){return this.Gbb.getAdVolume()},set:function(e){this.Gbb.setAdVolume(e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"playerResolution",{set:function(e){e&&(this.Ibb=e),this.Gbb&&this.Gbb.resizeAd(this.Ibb.width,this.Ibb.height,this.Ibb.isFullscreen?s.VpaidViewMode.Fullscreen:s.VpaidViewMode.Normal)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"skippable",{get:function(){return!!this.Gbb&&this.Gbb.getAdSkippableState()},enumerable:!1,configurable:!0}),e.prototype.reset=function(){var e=this;return this.Gbb?(this.Zbb.detach(this.Gbb),this.Ecb().then(function(){e.Bcb()})):(this.Fcb(),Promise.resolve())},e.prototype.Fcb=function(){(0,o.clearIntervalIfDefined)(this.Obb),(0,o.clearTimeoutIfDefined)(this.Sbb),(0,o.clearTimeoutIfDefined)(this.Ubb),(0,o.clearTimeoutIfDefined)(this.Vbb),this.Obb=void 0,this.Sbb=void 0,this.Ubb=void 0,this.Vbb=void 0},e}()},25534:function(e,t){var n,i,r,o;
1Object.defineProperty(t,"__esModule",{value:!0}),t.VpaidViewMode=t.VpaidEvent=void 0,(r=n||(t.VpaidEvent=n={})).AdError="AdError",r.AdLoaded="AdLoaded",r.AdPaused="AdPaused",r.AdPlaying="AdPlaying",r.AdSkipped="AdSkipped",r.AdStarted="AdStarted",r.AdStopped="AdStopped",r.AdClickThru="AdClickThru",r.AdInteraction="AdInteraction",r.AdImpression="AdImpression",r.AdVideoStart="AdVideoStart",r.AdVideoMidpoint="AdVideoMidpoint",r.AdVideoComplete="AdVideoComplete",r.AdVideoThirdQuartile="AdVideoThirdQuartile",r.AdVideoFirstQuartile="AdVideoFirstQuartile",(o=i||(t.VpaidViewMode=i={})).Normal="normal",o.Thumbnail="thumbnail",o.Fullscreen="fullscreen"},61411:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.VpaidContextFactory=t.VpaidContextFactoryError=void 0;var i,r,o=n(34841),s=n(65348),a=n(88844);(i=r||(t.VpaidContextFactoryError=r={})).Timeout="timeout",i.ScriptError="scripterror",t.VpaidContextFactory=function(){function e(){}return e.onContainerIframeLoaded=function(e,t,n,i,r){n.contentDocument.body.style.margin="0",n.contentDocument.body.style.padding="0",i.onerror=this.onVpaidScriptError.bind(this,e),i.onload=this.onVpaidScriptLoaded.bind(this,e,n,t,window.setTimeout(this.onScriptLoadTimeout.bind(this,e,i),r)),n.contentWindow.document.head.appendChild(i)},e.onScriptLoadTimeout=function(e,t){t.src="",t.parentElement.removeChild(t),e.reject(r.Timeout)},e.onVpaidScriptError=function(e){e.reject(r.ScriptError)},e.onVpaidScriptLoaded=function(e,t,n,i){var r=t.contentWindow.getVPAIDAd;if(r&&"function"==typeof r){var o=r();(0,a.clearTimeoutIfDefined)(i),o.done=n.removeChild.bind(n,t),e.resolve({api:o,container:t})}else e.reject()},e.createVpaidContext=function(e,t,n){var i=this,r=new o.Deferred,a=s.DOMHelper.createTag("iframe",{allow:"autoplay",src:"about:blank"},{width:"100%",height:"100%",border:"none"}),u=s.DOMHelper.createTag("script",{src:e});return a.onload=function(){return i.onContainerIframeLoaded(r,t,a,u,n)},t.appendChild(a),r.promise},e}()},41680:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.VpaidEventHandler=void 0;var i=n(19483),r=n(25534);t.VpaidEventHandler=function(){function e(){this.Hhb=new Map,this.Ghb=new i.ArrayMap}return e.prototype.Ihb=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];(this.Ghb.get(e)||[]).slice().forEach(function(e){return e(t)})},e.prototype.attach=function(e){var t=this,n=function(n){var r=function(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];return t.Ihb(n,e)};e.subscribe(r,n),i.Hhb.set(n,r)},i=this;for(var o in r.VpaidEvent)n(o)},e.prototype.detach=function(e){for(var t in r.VpaidEvent)e.unsubscribe(this.Hhb.get(t),t)},e.isAlreadyRegistered=function(e,t,n){var i=e.get(t);return i&&i.includes(n)},e.prototype.on=function(t,n){e.isAlreadyRegistered(this.Ghb,t,n)||this.Ghb.add(t,n)},e.prototype.off=function(e,t){this.Ghb.deleteValue(e,t)},e.prototype.dispose=function(){this.Hhb.clear(),this.Ghb.clear()},e}()},10332:function(e,t,n){var i,r=this&&this.__extends||(i=function(e,t){return(i=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])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.VpaidOverlayAdManager=void 0;var o=n(3714),s=n(34841),a=n(88844),u=n(7581),l=n(6341),c=n(25534),d=n(61411),p=n(41680);t.VpaidOverlayAdManager=function(e){function t(t,n,i){var r=e.call(this,t,n)||this;return r.Tcb=function(){r.stop(),r.Kcb.reject(u.VastErrorCode.UNABLE_TO_FETCH_NONLINEAR_RESOURCE)},r.Ucb=function(){(0,a.clearTimeoutIfDefined)(r.Lcb),r.Lcb=void 0,(0,a.clearTimeoutIfDefined)(r.Ncb),r.Ncb=window.setTimeout(r.Wcb,r.Mcb),r.adjustAdContainer(r.Gcb.publicAd.width,r.Gcb.publicAd.height),r.Hcb.startAd()},r.Wcb=function(){r.Hcb.stopAd(),r.Vcb(),r.Kcb.reject(u.VastErrorCode.UNABLE_TO_FETCH_NONLINEAR_RESOURCE)},r.Xcb=function(){(0,a.clearTimeoutIfDefined)(r.Ncb),r.Ncb=void 0,r.Kcb.resolve()},r.bcb=function(){r.acb(),r.Qcb.resolve()},r.ccb=function(){r.Rcb=!0,(0,a.clearTimeoutIfDefined)(r.Ocb),r.Ocb=void 0,r.Qcb.resolve()},r.Mcb=i,r.Jcb=new Map,r.Kcb=new s.Deferred,r.Pcb=[],r.Qcb=new s.Deferred,r.Rcb=!1,r.Scb=new p.VpaidEventHandler,r.Jcb.set(o.PlayerEvent.PlaybackFinished,c.VpaidEvent.AdStopped),r.Jcb.set(o.PlayerEvent.Error,c.VpaidEvent.AdError),r.Jcb.set(o.PlayerEvent.AdClicked,c.VpaidEvent.AdClickThru),r.Zcb(),r}return r(t,e),t.prototype.display=function(e,t){var n=this;return this.Gcb=e,this.Icb=t,d.VpaidContextFactory.createVpaidContext(this.Gcb.publicAd.mediaFileUrl,this.adContainer,this.Mcb).then(function(t){var i=n.Icb.isFullscreen?c.VpaidViewMode.Fullscreen:c.VpaidViewMode.Normal;(0,a.clearTimeoutIfDefined)(n.Lcb),n.Lcb=window.setTimeout(n.Tcb,n.Mcb),n.Hcb=t.api,n.Scb.attach(n.Hcb),n.Hcb.initAd(n.Icb.width,n.Icb.height,i,1e5,{AdParameters:e.adParameters},{slot:t.container.contentDocument.body})}).catch(function(){n.stop(),n.Kcb.reject(u.VastErrorCode.UNABLE_TO_FETCH_NONLINEAR_RESOURCE)}),this.Kcb.promise},t.prototype.Vcb=function(){this.Pcb.forEach(function(e){return e()})},t.prototype.Ycb=function(e,t){this.Scb.on(e,t)},t.prototype.on=function(e,t){e===o.PlayerEvent.Error&&this.Pcb.push(t),this.Scb.on(this.Jcb.get(e)||e,t)},t.prototype.off=function(e,t){this.Scb.off(e,t)},t.prototype.Zcb=function(){this.Ycb(c.VpaidEvent.AdLoaded,this.Ucb),this.Scb.on(c.VpaidEvent.AdStarted,this.Xcb),this.Scb.on(c.VpaidEvent.AdStopped,this.ccb)},t.prototype.acb=function(){this.Hcb&&(this.Scb.detach(this.Hcb),this.Hcb.done(),this.Hcb=null),this.adContainer.style.display="none"},t.prototype.dcb=function(){this.Rcb||((0,a.clearTimeoutIfDefined)(this.Ocb),this.Hcb?(this.Ocb=window.setTimeout(this.bcb,this.Mcb),this.Hcb.stopAd()):(this.Ocb=void 0,this.Qcb.resolve()))},t.prototype.stop=function(){var e=this;
1this.Qcb.promise.then(function(){e.Pcb=[],e.acb(),e.ecb()}),this.dcb()},t.prototype.ecb=function(){(0,a.clearTimeoutIfDefined)(this.Lcb),(0,a.clearTimeoutIfDefined)(this.Ncb),(0,a.clearTimeoutIfDefined)(this.Ocb),this.Lcb=void 0,this.Ncb=void 0,this.Ocb=void 0},t}(l.AbstractOverlayAdManager)},49075:function(e,t,n){var i,r=this&&this.__extends||(i=function(e,t){return(i=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])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.VASTTracker=void 0;var o=n(31472),s=n(77615),a=n(37007),u=n(57219),l=n(11417);t.VASTTracker=function(e){function t(t,n,i,r){void 0===r&&(r=null);var o=e.call(this)||this;for(var a in o.ad=n,o.creative=i,o.variation=r,o.muted=!1,o.impressed=!1,o.skippable=!1,o.trackingEvents={},o._alreadyTriggeredQuartiles={},o.emitAlwaysEvents=["creativeView","start","firstQuartile","midpoint","thirdQuartile","complete","resume","pause","rewind","skip","closeLinear","close"],o.creative.trackingEvents){var u=o.creative.trackingEvents[a];o.trackingEvents[a]=u.slice(0)}return o.creative instanceof s.CreativeLinear?o._initLinearTracking():o._initVariationTracking(),t&&o.on("start",function(){t.lastSuccessfulAd=Date.now()}),o}return r(t,e),t.prototype._initLinearTracking=function(){this.linear=!0,this.skipDelay=this.creative.skipDelay,this.setDuration(this.creative.duration),this.clickThroughURLTemplate=this.creative.videoClickThroughURLTemplate,this.clickTrackingURLTemplates=this.creative.videoClickTrackingURLTemplates},t.prototype._initVariationTracking=function(){this.linear=!1,this.skipDelay=-1;var e=this.variation||this.creative&&this.creative.variations&&this.creative.variations[0]||null;if(e){for(var t in e.trackingEvents){var n=e.trackingEvents[t];this.trackingEvents[t]?this.trackingEvents[t]=this.trackingEvents[t].concat(n.slice(0)):this.trackingEvents[t]=n.slice(0)}e instanceof u.NonLinearAd?(this.clickThroughURLTemplate=e.nonlinearClickThroughURLTemplate,this.clickTrackingURLTemplates=e.nonlinearClickTrackingURLTemplates,this.setDuration(e.minSuggestedDuration)):e instanceof o.CompanionAd&&(this.clickThroughURLTemplate=e.companionClickThroughURLTemplate,this.clickTrackingURLTemplates=e.companionClickTrackingURLTemplates)}},t.prototype.setDuration=function(e){this.assetDuration=e,this.quartiles={firstQuartile:Math.round(25*this.assetDuration)/100,midpoint:Math.round(50*this.assetDuration)/100,thirdQuartile:Math.round(75*this.assetDuration)/100}},t.prototype.setProgress=function(e){var t=this,n=this.skipDelay||-1;if(-1===n||this.skippable||(n>e?this.emit("skip-countdown",n-e):(this.skippable=!0,this.emit("skip-countdown",0))),this.assetDuration>0){var i=[];if(e>0){var r=Math.round(e/this.assetDuration*100);for(var o in i.push("start"),i.push("progress-".concat(r,"%")),i.push("progress-".concat(Math.round(e))),this.quartiles)this.isQuartileReached(o,this.quartiles[o],e)&&(i.push(o),this._alreadyTriggeredQuartiles[o]=!0)}i.forEach(function(e){t.track(e,!0)}),e<this.progress&&this.track("rewind")}this.progress=e},t.prototype.isQuartileReached=function(e,t,n){var i=!1;return t<=n&&!this._alreadyTriggeredQuartiles[e]&&(i=!0),i},t.prototype.setMuted=function(e){this.muted!==e&&this.track(e?"mute":"unmute"),this.muted=e},t.prototype.setPaused=function(e){this.paused!==e&&this.track(e?"pause":"resume"),this.paused=e},t.prototype.setFullscreen=function(e){this.fullscreen!==e&&this.track(e?"fullscreen":"exitFullscreen"),this.fullscreen=e},t.prototype.setExpand=function(e){this.expanded!==e&&this.track(e?"expand":"collapse"),this.expanded=e},t.prototype.setSkipDelay=function(e){"number"==typeof e&&(this.skipDelay=e)},t.prototype.trackImpression=function(){this.impressed||(this.impressed=!0,this.trackURLs(this.ad.impressionURLTemplates),this.track("creativeView"))},t.prototype.errorWithCode=function(e){this.trackURLs(this.ad.errorURLTemplates,{ERRORCODE:e})},t.prototype.complete=function(){this.track("complete")},t.prototype.close=function(){this.track(this.linear?"closeLinear":"close")},t.prototype.skip=function(){this.track("skip"),this.trackingEvents=[]},t.prototype.click=function(e){void 0===e&&(e=null),this.clickTrackingURLTemplates&&this.clickTrackingURLTemplates.length&&this.trackURLs(this.clickTrackingURLTemplates);var t=this.clickThroughURLTemplate||e;if(t){var n=this.linear?{CONTENTPLAYHEAD:this.progressFormatted()}:{},i=l.util.resolveURLTemplates([t],n)[0];
1this.emit("clickthrough",i)}},t.prototype.track=function(e,t){void 0===t&&(t=!1),"closeLinear"===e&&!this.trackingEvents[e]&&this.trackingEvents.close&&(e="close");var n=this.trackingEvents[e],i=this.emitAlwaysEvents.indexOf(e)>-1;n?(this.emit(e,""),this.trackURLs(n)):i&&this.emit(e,""),t&&(delete this.trackingEvents[e],i&&this.emitAlwaysEvents.splice(this.emitAlwaysEvents.indexOf(e),1))},t.prototype.trackURLs=function(e,t){void 0===t&&(t={}),this.linear&&(this.creative&&this.creative.mediaFiles&&this.creative.mediaFiles[0]&&this.creative.mediaFiles[0].fileURL&&(t.ASSETURI=this.creative.mediaFiles[0].fileURL),t.CONTENTPLAYHEAD=this.progressFormatted()),l.util.track(e,t)},t.prototype.progressFormatted=function(){var e=parseInt(this.progress),t=e/3600;t.length<2&&(t="0".concat(t));var n=e/60%60;n.length<2&&(n="0".concat(n));var i=e%60;i.length<2&&(i="0".concat(n));var r=parseInt(100*(this.progress-e));return"".concat(t,":").concat(n,":").concat(i,".").concat(r)},t}(a.EventEmitter)}},function(e){return e(e.s=17614)}])}()},88682:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ShadowDomManager=void 0;var i=n(4437),r=n(6635);function o(e){if(/^https?:\/\//.test(e)||e.startsWith("/")||e.startsWith("./")||e.startsWith("../"))return e;var t=Array.from(document.querySelectorAll('link[rel~="stylesheet"]')).find(function(t){return t.href&&-1!==t.href.indexOf(e)});return(null==t?void 0:t.href)||null}function s(e,t){var n=document.createElement("link");n.rel="stylesheet",n.href=t,e.appendChild(n)}t.ShadowDomManager=function(){function e(){}return e.isShadowDomSupported=function(){return"u">typeof ShadowRoot&&"u">typeof HTMLElement&&"function"==typeof HTMLElement.prototype.attachShadow},e.prototype.initialize=function(t,n){if(e.isShadowDomSupported()){var o=new i.DOM("div",{class:(0,r.prefixCss)("shadow-dom-container")});o.css({position:"absolute",top:"0",left:"0",width:"100%",height:"100%"}),t.append(o),this.shadowHost=o,this.shadowRoot=o.get(0).attachShadow({mode:"open"}),this.injectStyles(n)}},e.prototype.getShadowRoot=function(){return this.shadowRoot},e.prototype.release=function(){this.shadowHost&&(this.shadowHost.remove(),this.shadowHost=void 0,this.shadowRoot=void 0)},e.prototype.injectStyles=function(t){var n=this;if(this.shadowRoot){var i=o(t.uiStylesheet||e.DEFAULT_SHADOW_STYLESHEET_NAME);i?s(this.shadowRoot,i):console.warn("Shadow DOM is enabled but no stylesheet was found. Provide `uiStylesheet` (URL or filename) or include {{FILENAME}} on the page."),t.additionalStylesheets&&t.additionalStylesheets.length>0&&t.additionalStylesheets.forEach(function(e){var t=o(e);t?s(n.shadowRoot,t):console.warn("Shadow DOM: Could not resolve additional stylesheet '".concat(e,"'. ")+"Check the URL or ensure the stylesheet is linked on the page.")})}},e.DEFAULT_SHADOW_STYLESHEET_NAME="{{FILENAME}}",e}()},89578:function(e,t,n){"use strict";var i,r=this&&this.__extends||(i=function(e,t){return(i=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])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.SubtitleSettingsPanelPage=void 0;var o=n(57640),s=n(41505),a=n(81942),u=n(44617),l=n(42963),c=n(8183),d=n(34164),p=n(56558),h=n(3312),f=n(24834),g=n(51492),v=n(75387),y=n(21616),m=n(24379),b=n(85251),S=n(64695),E=n(52406);t.SubtitleSettingsPanelPage=function(e){function t(t){var n=e.call(this,t)||this;n.overlay=t.overlay,n.settingsPanel=t.settingsPanel;var i=[n.buildSettingsPanelItem(m.i18n.getLocalizer("settings.subtitles.font.size"),new s.FontSizeSelectBox({overlay:n.overlay,filter:function(e){return n.overlay.filterFontSizeOptions(e)}}),t.useDynamicSettingsPanelItem),n.buildSettingsPanelItem(m.i18n.getLocalizer("settings.subtitles.font.style"),new S.FontStyleSelectBox({overlay:n.overlay}),t.useDynamicSettingsPanelItem),n.buildSettingsPanelItem(m.i18n.getLocalizer("settings.subtitles.font.family"),new a.FontFamilySelectBox({overlay:n.overlay}),t.useDynamicSettingsPanelItem),n.buildSettingsPanelItem(m.i18n.getLocalizer("settings.subtitles.font.color"),new u.FontColorSelectBox({overlay:n.overlay}),t.useDynamicSettingsPanelItem),n.buildSettingsPanelItem(m.i18n.getLocalizer("settings.subtitles.font.opacity"),new l.FontOpacitySelectBox({overlay:n.overlay}),t.useDynamicSettingsPanelItem),n.buildSettingsPanelItem(m.i18n.getLocalizer("settings.subtitles.characterEdge"),new c.CharacterEdgeSelectBox({overlay:n.overlay}),t.useDynamicSettingsPanelItem),n.buildSettingsPanelItem(m.i18n.getLocalizer("settings.subtitles.characterEdge.color"),new E.CharacterEdgeColorSelectBox({overlay:n.overlay}),t.useDynamicSettingsPanelItem),n.buildSettingsPanelItem(m.i18n.getLocalizer("settings.subtitles.background.color"),new d.Backgroun
1dColorSelectBox({overlay:n.overlay}),t.useDynamicSettingsPanelItem),n.buildSettingsPanelItem(m.i18n.getLocalizer("settings.subtitles.background.opacity"),new p.BackgroundOpacitySelectBox({overlay:n.overlay}),t.useDynamicSettingsPanelItem),n.buildSettingsPanelItem(m.i18n.getLocalizer("settings.subtitles.window.color"),new h.WindowColorSelectBox({overlay:n.overlay}),t.useDynamicSettingsPanelItem),n.buildSettingsPanelItem(m.i18n.getLocalizer("settings.subtitles.window.opacity"),new f.WindowOpacitySelectBox({overlay:n.overlay}),t.useDynamicSettingsPanelItem)],r=new y.SettingsPanelItem({label:new v.SettingsPanelPageBackButton({container:n.settingsPanel}),settingComponent:new g.SubtitleSettingsResetButton({}),cssClasses:["title-item"],isSetting:!1});return t.useDynamicSettingsPanelItem?i.unshift(r):i.push(r),n.config=n.mergeConfig(t,{components:i},n.config),n}return r(t,e),t.prototype.configure=function(t,n){var i=this;e.prototype.configure.call(this,t,n),this.onActive.subscribe(function(){i.overlay.enablePreviewSubtitleLabel();var e=i.getComponents().find(function(e){return e instanceof y.SettingsPanelItem&&e.getComponents().some(function(e){return e instanceof s.FontSizeSelectBox})});if(e){var t=e.getComponents().find(function(e){return e instanceof s.FontSizeSelectBox});null==t||t.reapplyFilterAndReload()}}),this.onInactive.subscribe(function(){i.overlay.removePreviewSubtitleLabel()})},t.prototype.buildSettingsPanelItem=function(e,t,n){return(void 0===n&&(n=!1),n)?new b.DynamicSettingsPanelItem({label:e,settingComponent:t,container:this.settingsPanel}):new y.SettingsPanelItem({label:e,settingComponent:t})},t}(o.SettingsPanelPage)},90201:function(e,t,n){"use strict";var i,r=this&&this.__extends||(i=function(e,t){return(i=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])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.PlayerInsightsPanelTitleItem=void 0;var o=n(24379),s=n(94474),a=n(30194);t.PlayerInsightsPanelTitleItem=function(e){function t(t){void 0===t&&(t={});var n=e.call(this,t)||this;n.target=null;var i=new a.Label({text:"Player Insights",cssClasses:["ui-player-insights-panel-title-label"]}),r=new s.Button({cssClass:"ui-closebutton",cssClasses:["ui-player-insights-panel-close-button"],text:o.i18n.getLocalizer("close")});return n.config=n.mergeConfig(t,{cssClasses:["title-item","ui-player-insights-panel-title-item"],isSetting:!1,role:"group",tabIndex:-1},n.config),n.closeButton=r,n.addComponent(i),n.addComponent(r),n}return r(t,e),t.prototype.setTarget=function(e){this.target=e},t.prototype.configure=function(t,n){var i=this;e.prototype.configure.call(this,t,n),this.closeButton.onClick.subscribe(function(){var e;null==(e=i.target)||e.hide()})},t}(n(21616).SettingsPanelItem)},90210:function(e,t,n){"use strict";var i,r=this&&this.__extends||(i=function(e,t){return(i=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])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(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 o=n(94474),s=n(24379);t.HugeReplayButton=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 r(t,e),t.prototype.configure=function(t,n){e.prototype.configure.call(this,t,n),this.onClick.subscribe(function(){t.play("ui")})},t}(o.Button)},90753:(e,t)=>{"use strict";var n,i,r,o;
1Object.defineProperty(t,"__esModule",{value:!0}),t.Action=t.Direction=void 0,(r=n||(t.Direction=n={})).UP="up",r.DOWN="down",r.LEFT="left",r.RIGHT="right",(o=i||(t.Action=i={})).SELECT="select",o.BACK="back"},92372:function(e,t,n){"use strict";var i,r=this&&this.__extends||(i=function(e,t){return(i=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])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.Spacer=void 0,t.Spacer=function(e){function t(t){void 0===t&&(t={});var n=e.call(this,t)||this;return n.config=n.mergeConfig(t,{cssClass:"ui-spacer"},n.config),n}return r(t,e),t.prototype.onShowEvent=function(){},t.prototype.onHideEvent=function(){},t.prototype.onHoverChangedEvent=function(e){},t}(n(86051).Component)},92668:(e,t,n)=>{"use strict";var i;Object.defineProperty(t,"__esModule",{value:!0}),t.getConstructorNames=function(e){for(var t,r=[],o=e.prototype;o&&o.constructor;){var s=null!=(t=function(e){if(null==i){i=new Map;for(var t=n(45242),r=0,o=Object.keys(t);r<o.length;r++){var s=o[r],a=t[s];"function"!=typeof a||i.has(a)||i.set(a,s)}}return i.get(e)}(o.constructor))?t:o.constructor.name;if(!s)break;r.unshift(s),o=Object.getPrototypeOf(o)}return r}},93244:e=>{"use strict";e.exports=JSON.parse('{"settings.video.quality":"Videoqualit\xe4t","settings.audio.quality":"Audioqualit\xe4t","settings.audio.track":"Audiospur","settings.audio.mute":"Stummschaltung","settings.audio.volume":"Lautst\xe4rke","settings.subtitles.window.color":"Hintergrundfarbe","settings.subtitles.window.opacity":"Hintergrunddeckkraft","settings.subtitles":"Untertitel","settings.subtitles.font.color":"Farbe","settings.subtitles.font.opacity":"Deckkraft","settings.subtitles.background.color":"Hintergrundfarbe","settings.subtitles.background.opacity":"Hintergrunddeckkraft","settings.subtitles.options":"Optionen","playerInsights.show":"Player Insights anzeigen","playerInsights.hide":"Player Insights ausblenden","colors.white":"wei\xdf","colors.black":"schwarz","colors.red":"rot","colors.green":"gr\xfcn","colors.blue":"blau","colors.cyan":"cyan","colors.yellow":"gelb","colors.magenta":"magenta","percent":"{value}%","settings.subtitles.font.size":"Gr\xf6\xdfe","settings.subtitles.font.style":"Schriftstil","settings.subtitles.font.style.bold":"Fett","settings.subtitles.font.style.italic":"Kursiv","settings.subtitles.characterEdge":"R\xe4nder","settings.subtitles.characterEdge.raised":"erh\xf6ht","settings.subtitles.characterEdge.depressed":"vertieft","settings.subtitles.characterEdge.uniform":"einheitlich","settings.subtitles.characterEdge.dropshadowed":"Schlagschatten","settings.subtitles.characterEdge.color":"Buchstabenrandfarbe","settings.subtitles.font.family":"Schriftart","settings.subtitles.font.family.monospacedserif":"Monospace Serif","settings.subtitles.font.family.proportionalserif":"Proportional Serif","settings.subtitles.font.family.monospacedsansserif":"Monospace Sans-Serif","settings.subtitles.font.family.proportionalsansserif":"Proportional Sans-Serif","settings.subtitles.font.family.casual":"L\xe4ssig","settings.subtitles.font.family.cursive":"Kursiv","settings.subtitles.font.family.smallcapital":"Kapit\xe4lchen","settings.time.hours":"Stunden","settings.time.minutes":"Minuten","settings.time.seconds":"Sekunden","ads.remainingTime":"Diese Anzeige endet in {remainingTime} Sekunden.","ads.skip":"\xdcberspringen","ads.skippableIn":"\xdcberspringen in {remainingTime}","ads.adNumberOfTotal":"Anzeige {activeAdIndex} von {totalAdsCount}","ad":"Anzeige","settings":"Einstellungen","fullscreen":"Vollbild","speed":"Geschwindigkeit","playPause":"Abspielen/Pause","play":"Abspielen","pause":"Pause","open":"\xf6ffnen","close":"Schlie\xdfen","pictureInPicture":"Bild im Bild","appleAirplay":"Apple AirPlay","googleCast":"Google Cast","vr":"VR","off":"aus","auto":"automatisch","ecoMode":"ec
1oMode","ecoMode.title":"Eco Mode","persistentPreferences":"Einstellungen merken","back":"Zur\xfcck","reset":"Zur\xfccksetzen","replay":"Wiederholen","normal":"normal","default":"standard","live":"Live","live.jumpToLiveEdge":"{liveLabel}, zum Live-Punkt springen","subtitle.example":"Beispiel Untertitel","subtitle.select":"Untertitel ausw\xe4hlen","playingOn":"Spielt auf <strong>{castDeviceName}</strong>","connectingTo":"Verbindung mit <strong>{castDeviceName}</strong> wird hergestellt...","watermarkLink":"Link zum Homepage","controlBar":"Videoplayer Kontrollen","player":"Video player","seekBar":"Video-Timeline","seekBar.value":"Wert","seekBar.timeshift":"Timeshift","seekBar.durationText":"aus","quickseek.forward":"{seekSeconds} Sekunden Vor","quickseek.rewind":"{seekSeconds} Sekunden Zur\xfcck","contextMenu.title":"Bitmovin Player","contextMenu.subtitle":"Adaptive Streaming f\xfcr das Web","contextMenu.copyTimestampLink":"Link zur aktuellen Zeit kopieren","captions.enable":"Untertitel einschalten","captions.disable":"Untertitel ausschalten"}')},93797:function(e,t,n){"use strict";var i,r=this&&this.__extends||(i=function(e,t){return(i=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])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.VolumeSlider=void 0;var o=n(51571),s=n(24379),a=n(2652);t.VolumeSlider=function(e){function t(t){void 0===t&&(t={});var n=e.call(this,t)||this;return n.updateVolumeWhileScrubbing=function(e,t){t.scrubbing&&n.volumeTransition&&n.volumeTransition.update(t.position)},n.config=n.mergeConfig(t,{cssClass:"ui-volumeslider",hideIfVolumeControlProhibited:!0,hideOnMobile:!0,ariaLabel:s.i18n.getLocalizer("settings.audio.volume"),tabIndex:0},n.config),n}return r(t,e),t.prototype.setVolumeAriaSliderValues=function(e){this.getDomElement().attr("aria-valuenow",Math.ceil(e).toString()),this.getDomElement().attr("aria-valuetext","".concat(s.i18n.performLocalization(s.i18n.getLocalizer("seekBar.value")),": ").concat(Math.ceil(e)))},t.prototype.configure=function(t,n){var i=this;e.prototype.configure.call(this,t,n,!1),this.setAriaSliderMinMax("0","100");var r=this.getConfig(),o=n.getConfig().volumeController;r.hideOnMobile&&a.BrowserUtils.isMobile||r.hideIfVolumeControlProhibited&&!this.detectVolumeControlAvailability()?this.hide():(o.onChanged.subscribe(function(e,t){t.muted?(i.setVolumeAriaSliderValues(0),i.setPlaybackPosition(0)):(i.setPlaybackPosition(t.volume),i.setVolumeAriaSliderValues(t.volume))}),this.onSeek.subscribe(function(){i.volumeTransition=o.startTransition()}),this.onSeekPreview.subscribeRateLimited(this.updateVolumeWhileScrubbing,50),this.onSeeked.subscribe(function(e,t){i.volumeTransition&&i.volumeTransition.finish(t)}),t.on(t.exports.PlayerEvent.PlayerResized,function(){i.refreshPlaybackPosition()}),n.onConfigured.subscribe(function(){i.refreshPlaybackPosition()}),n.getConfig().events.onUpdated.subscribe(function(){i.refreshPlaybackPosition()}),n.onComponentShow.subscribe(function(){i.refreshPlaybackPosition()}),n.onComponentHide.subscribe(function(){i.refreshPlaybackPosition()}),o.onChangedEvent())},t.prototype.detectVolumeControlAvailability=function(){var e=document.createElement("video");return e.volume=.7,1!==e.volume},t.prototype.release=function(){e.prototype.release.call(this),this.onSeekPreview.unsubscribe(this.updateVolumeWhileScrubbing)},t}(o.SeekBar)},93931:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SeekBarHandler=void 0;var i=n(32354),r=n(90753),o=n(803),s=n(14459);function a(e){return Array.from(e.classList).findIndex(function(e){return/-ui-seekbar$/.test(e)})>-1}function u(e){return e.children.item(0)}t.SeekBarHandler=function(){function e(e){var t=this;this.rootNavigationGroup=e,this.cursorPosition={x:0,y:0},this.isScrubbing=!1,this.scrubSpeedPercentage=.005,this.onNavigation=function(e,n,i){var o=(0,s.toHtmlElement)(n);return!!a(o)&&(e===r.Direction.UP||e===r.Direction.DOWN?t.stopSeeking(u(o)):(t.
1initializeOrUpdateCursorPosition(o,e),t.dispatchMouseMoveEvent(u(o)),i()),!0)},this.onAction=function(e,n,i){var o=(0,s.toHtmlElement)(n);if(!a(o))return!1;var l=u(o);return e===r.Action.SELECT&&t.isScrubbing?(t.dispatchMouseClickEvent(l),i(),!0):e===r.Action.BACK&&!!t.isScrubbing&&(t.stopSeeking(l),i(),!0)},this.rootNavigationGroup.onAction=this.onAction,this.eventSubscriber=new i.NodeEventSubscriber,this.rootNavigationGroup.onNavigation=this.onNavigation}return e.prototype.updateScrubSpeedPercentage=function(){var e=this;clearTimeout(this.scrubSpeedResetTimeout),this.scrubSpeedPercentage*=1.1,this.scrubSpeedResetTimeout=window.setTimeout(function(){return e.scrubSpeedPercentage=.005},100)},e.prototype.getIncrement=function(e,t){this.updateScrubSpeedPercentage();var n=t*this.scrubSpeedPercentage;return e===r.Direction.RIGHT?n:-n},e.prototype.resetCursorPosition=function(){this.cursorPosition.x=0,this.cursorPosition.y=0},e.prototype.updateCursorPosition=function(e,t){var n=(0,o.getBoundingRectFromElement)(t),i=this.getIncrement(e,n.width),r=n.x,s=n.x+n.width;this.cursorPosition.x=Math.min(Math.max(this.cursorPosition.x+i,r),s)},e.prototype.initializeCursorPosition=function(e){var t=e.querySelector('[class*="seekbar-playbackposition-marker"]'),n=(0,o.getBoundingRectFromElement)(t),i=n.x+n.width/2,r=n.y;this.cursorPosition.x=i,this.cursorPosition.y=r},e.prototype.initializeOrUpdateCursorPosition=function(e,t){this.isScrubbing?this.updateCursorPosition(t,e):this.initializeCursorPosition(e),this.isScrubbing=!0},e.prototype.getCursorPositionMouseEventInit=function(){return{clientX:this.cursorPosition.x,clientY:this.cursorPosition.y}},e.prototype.dispatchMouseMoveEvent=function(e){e.dispatchEvent(new MouseEvent("mousemove",this.getCursorPositionMouseEventInit()))},e.prototype.dispatchMouseClickEvent=function(e){var t=this,n=function(){var i=t.getCursorPositionMouseEventInit();document.dispatchEvent(new MouseEvent("mouseup",i)),t.eventSubscriber.off(e,"mousedown",n),t.stopSeeking(e)};this.eventSubscriber.on(e,"mousedown",n),e.dispatchEvent(new MouseEvent("mousedown"))},e.prototype.stopSeeking=function(e){this.resetCursorPosition(),this.isScrubbing=!1,this.dispatchMouseLeaveEvent(e)},e.prototype.dispatchMouseLeaveEvent=function(e){e.dispatchEvent(new MouseEvent("mouseleave"))},e.prototype.release=function(){this.eventSubscriber.release(),this.rootNavigationGroup.onAction=void 0,this.rootNavigationGroup.onNavigation=void 0},e}()},94104:function(e,t,n){"use strict";var i,r=this&&this.__extends||(i=function(e,t){return(i=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])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.PlayerContextMenu=void 0;var o=n(24379),s=n(84745),a=n(30194),u=n(41113),l=n(73400),c=n(95715),d=n(64693),p=n(34594),h=n(21616),f=n(57640),g=n(58038);t.PlayerContextMenu=function(e){function t(t){var n=e.call(this,t)||this;n.config=n.mergeConfig(t,{cssClasses:["ui-player-context-menu"]},n.config);var i=new p.InteractiveContextMenuItem({label:new a.Label({text:o.i18n.getLocalizer("contextMenu.copyTimestampLink")}),ariaLabel:o.i18n.getLocalizer("contextMenu.copyTimestampLink"),closeContextMenuOnAction:!0});return n.copyTimestampLinkItem=i,n.addComponent(new f.SettingsPanelPage({components:[new v,new g.SettingsPanelSeparator,new d.PlayerInsightsContextMenuItem({playerInsightsPanel:t.playerInsightsPanel}),i]})),n}return r(t,e),t.prototype.configure=function(t,n){var i=this;e.prototype.configure.call(this,t,n),this.copyTimestampLinkItem.onClick.subscribe(function(){var e,n=l.TimestampLinkUtils.buildTimestampLink(t.getCurrentTime());(null==(e=navigator.clipboard)?void 0:e.writeText)?navigator.clipboard.writeText(n).catch(function(){return console.warn("Failed to copy timestamp link to clipboard.")}
1):console.warn("Clipboard API is not available. Timestamp link was not copied.")});var r=new u.PlayerUtils.LiveStreamDetector(t,n);r.onLiveChanged.subscribe(function(e,t){!n.getConfig().enableTimestampDeepLink||t.live?i.copyTimestampLinkItem.hide():i.copyTimestampLinkItem.show()}),r.detect()},t}(c.ContextMenu);var v=function(e){function t(t){void 0===t&&(t={});var n=e.call(this,t)||this,i=new a.Label({text:"Player: -",cssClasses:["ui-player-context-menu-info"]});return n.config=n.mergeConfig(t,{label:null,cssClasses:["ui-player-context-menu-info-item"],isSetting:!1,role:"group",tabIndex:-1},n.config),n.playerVersionLabel=i,n.addComponent(new a.Label({text:o.i18n.getLocalizer("contextMenu.title"),cssClasses:["ui-player-context-menu-header"]})),n.addComponent(new a.Label({text:o.i18n.getLocalizer("contextMenu.subtitle"),cssClasses:["ui-player-context-menu-subtitle"]})),n.addComponent(i),n.addComponent(new a.Label({text:"UI: ".concat(s.version),cssClasses:["ui-player-context-menu-info"]})),n}return r(t,e),t.prototype.configure=function(t,n){e.prototype.configure.call(this,t,n),this.playerVersionLabel.setText("Player: ".concat(t.version))},t}(h.SettingsPanelItem)},94198:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resolveAllComponents=function e(t){var n=[];return t.getComponents().forEach(function(t){(0,i.isContainer)(t)?n.push.apply(n,e(t)):(0,i.isComponent)(t)&&n.push(t)}),n};var i=n(55358)},94297:function(e,t,n){"use strict";var i,r=this&&this.__extends||(i=function(e,t){return(i=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])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(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 o=n(67598),s=n(24379);t.CastToggleButton=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 r(t,e),t.prototype.configure=function(t,n){var i=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 r=function(){t.isCastAvailable()?i.show():i.hide()};t.on(t.exports.PlayerEvent.CastAvailable,r),t.on(t.exports.PlayerEvent.CastWaitingForDevice,function(){i.on()}),t.on(t.exports.PlayerEvent.CastStarted,function(){i.on()}),t.on(t.exports.PlayerEvent.CastStopped,function(){i.off()}),r(),t.isCasting()&&this.on()},t}(o.ToggleButton)},94399:function(e,t,n){"use strict";var i,r=this&&this.__extends||(i=function(e,t){return(i=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])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__assign||function(){return(o=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.SubtitleListBox=void 0;var s=n(14307),a=n(69330),u=n(72319);t.SubtitleListBox=function(e){function t(t){void 0===t&&(t={});var n="string"==typeof t||"function"==typeof t?{title:t}:t;return e.call(this,o(o({},n),{listSelector:new u.SubtitleSelectBox(n)}))||this}return r(t,e),t.prototype.configure=function(t,n){e.prototype.configure.call(this,t,n),new a.SubtitleSwitchHandler(t,this.config.listSelector,n)},t}(s.ListBox)},94427:(e,t,n)=>{"use strict";
1Object.defineProperty(t,"__esModule",{value:!0}),t.VolumeTransition=t.VolumeController=void 0;var i=n(85704);t.VolumeController=function(){function e(t){var n=this;this.player=t,this.events={onChanged:new i.EventDispatcher},this.transitionActive=!1,this.storedVolume=e.defaultVolume,this.storeVolume();var r=function(){n.onChangedEvent()};t.on(t.exports.PlayerEvent.SourceLoaded,r),t.on(t.exports.PlayerEvent.VolumeChanged,r),t.on(t.exports.PlayerEvent.Muted,r),t.on(t.exports.PlayerEvent.Unmuted,r)}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.storeVolume=function(){var e=this.getVolume();e>0&&(this.storedVolume=e)},e.prototype.recallVolume=function(){var t=this.storedVolume>0?this.storedVolume:e.defaultVolume;this.setMuted(!1),this.setVolume(t)},e.prototype.startTransition=function(){return this.transitionActive=!0,new r(this)},e.prototype.endTransition=function(){this.transitionActive=!1},e.prototype.onChangedEvent=function(){var e=this.isMuted(),t=this.getVolume();this.transitionActive||this.storeVolume(),this.events.onChanged.dispatch(this,{volume:e?0:t,muted:e||0===t})},Object.defineProperty(e.prototype,"onChanged",{get:function(){return this.events.onChanged.getEvent()},enumerable:!1,configurable:!0}),e.issuerName="ui-volumecontroller",e.defaultVolume=100,e}();var r=function(){function e(e){this.controller=e,e.storeVolume()}return e.prototype.update=function(e){this.controller.setMuted(!1),this.controller.setVolume(e)},e.prototype.finish=function(e){0===e?(this.controller.recallVolume(),this.controller.setMuted(!0)):(this.controller.setMuted(!1),this.controller.setVolume(e),this.controller.storeVolume()),this.controller.endTransition()},e}();t.VolumeTransition=r},94474:function(e,t,n){"use strict";var i,r,o,s=this&&this.__extends||(r=function(e,t){return(r=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])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.Button=t.ButtonStyle=void 0;var a=n(86051),u=n(4437),l=n(85704),c=n(24379),d=n(47857);(i=o||(t.ButtonStyle=o={})).Icon="icon",i.Text="text",i.TextWithLeadingIcon="text-icon-leading",i.TextWithTrailingIcon="text-icon-trailing",t.Button=function(e){function t(t){var n=e.call(this,t)||this;return n.buttonEvents={onClick:new l.EventDispatcher},n.config=n.mergeConfig(t,{cssClass:"ui-button",role:"button",tabIndex:0,acceptsTouchWithUiHidden:!1,buttonStyle:o.Icon},n.config),n}return s(t,e),t.prototype.onLanguageChanged=function(){"function"==typeof this.config.text&&this.setText(this.config.text)},t.prototype.toDomElement=function(){var e=this,n={id:this.config.id,"aria-label":c.i18n.performLocalization(this.config.ariaLabel||this.config.text),class:this.getCssClasses(),type:"button",tabindex:this.config.tabIndex.toString()};null!=this.config.role&&(n.role=this.config.role);var i=new u.DOM("button",n,this),r=function(){var e=new d.Icon;i.append(e.getDomElement())},s=function(){i.append(new u.DOM("span",{class:e.prefixCss("label")}).html(c.i18n.performLocalization(e.config.text)))};switch(this.config.buttonStyle){case o.Icon:r();break;case o.Text:s();break;case o.TextWithLeadingIcon:r(),s();break;case o.TextWithTrailingIcon:s(),r()}return i.on("click",function(t){t.preventDefault(),e.onClickEvent()}),i.on("touchstart",function(n){e.getDomElement().addClass(t.CLASS_TOUCHED)}),i.on("touchend",function(n){e.getDomElement().removeClass(t.CLASS_TOUCHED)}),i},t.prototype.setText=function(e){this.getDomElement().find("."+this.prefixCss("label")).html(c.i18n.performLocalization(e))},t.prototype.onClickEvent=function(){this.buttonEvents.onClick.dispatch(this)},Object.defineProperty(t.prototype,"onClick",{get:function(){return this.buttonEvents.onClick.getEvent()}
1,enumerable:!1,configurable:!0}),t.CLASS_TOUCHED="touched",t}(a.Component)},94944:function(e,t,n){"use strict";var i,r=this&&this.__extends||(i=function(e,t){return(i=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])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.VolumeToggleButton=void 0;var o=n(67598),s=n(24379);t.VolumeToggleButton=function(e){function t(t){void 0===t&&(t={});var n=e.call(this,t)||this,i={cssClass:"ui-volumetogglebutton",text:s.i18n.getLocalizer("settings.audio.mute"),onClass:"muted",offClass:"unmuted",ariaLabel:s.i18n.getLocalizer("settings.audio.mute")};return n.config=n.mergeConfig(t,i,n.config),n}return r(t,e),t.prototype.configure=function(t,n){var i=this;e.prototype.configure.call(this,t,n);var r=n.getConfig().volumeController;r.onChanged.subscribe(function(e,t){t.muted?i.on():i.off();var n=Math.ceil(t.volume/10);i.getDomElement().data(i.prefixCss("volume-level-tens"),String(n))}),this.onClick.subscribe(function(){r.toggleMuted()}),r.onChangedEvent()},t}(o.ToggleButton)},95715:function(e,t,n){"use strict";var i,r=this&&this.__extends||(i=function(e,t){return(i=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])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.ContextMenu=void 0;var o=n(52023),s=n(8675),a=n(34594);t.ContextMenu=function(e){function t(t){void 0===t&&(t={});var n=e.call(this,t)||this;return n.config=n.mergeConfig(t,{cssClass:"ui-context-menu",hideDelay:-1,hideOnControlsHide:!1,hidden:!0,role:"menu"},n.config),n.getComponents().forEach(function(e){return n.setContextMenuForComponent(e)}),n}return r(t,e),t.prototype.configure=function(t,n){var i=this;e.prototype.configure.call(this,t,n);var r=n.getUI();this.contextMenuHost=r.getDomElement().get(0),this.onHide.subscribe(function(){var e=i.getDomElement();e.waitForTransitionEnd("opacity").then(function(){i.isHidden()&&e.remove()})});var o=function(e){if(!e.defaultPrevented){if(i.isShown()){i.isEventTargetInsideContextMenu(e)||i.hideAndReset();return}i.isEventTargetInsideElement(e,r.getDomElement().get(0))&&(e.preventDefault(),i.showAt(e.clientX,e.clientY))}},s=function(e){"Escape"===e.key&&i.isShown()&&i.hideAndReset()},a=function(e){i.isShown()&&!i.isEventTargetInsideContextMenu(e)&&i.hideAndReset()},u=function(){document.removeEventListener("contextmenu",o),document.removeEventListener("keydown",s),document.removeEventListener("click",a)};n.onActive.subscribe(function(){document.addEventListener("contextmenu",o),document.addEventListener("keydown",s),document.addEventListener("click",a)}),n.onInactive.subscribe(function(){u(),i.hideAndReset()})},t.prototype.release=function(){var t=this;this.getComponents().forEach(function(e){return t.unsetContextMenuForComponent(e)}),e.prototype.release.call(this),this.hasDomElement()&&this.getDomElement().remove()},t.prototype.addComponent=function(t){e.prototype.addComponent.call(this,t),this.setContextMenuForComponent(t)},t.prototype.prependComponent=function(t){e.prototype.prependComponent.call(this,t),this.setContextMenuForComponent(t)},t.prototype.removeComponent=function(t){var n=e.prototype.removeComponent.call(this,t);return n&&this.unsetContextMenuForComponent(t),n},t.prototype.showAt=function(e,t){var n=this.getDomElement(),i=n.get(0);this.attachContextMenuElement();var r=i.offsetWidth,o=i.offsetHeight,s=this.contextMenuHost.getBoundingClientRect(),a=Math.max(0,s.width-r-4),u=Math.max(0,s.height-o-4),l=Math.max(0,Math.min(e-s.left,a)),c=Math.max(0,Math.min(t-s.top,u));n.css({left:"".concat(l,"px"),top:"".concat(c,"px")}
1),this.show()},t.prototype.isEventTargetInsideContextMenu=function(e){return this.isEventTargetInsideElement(e,this.getDomElement().get(0))},t.prototype.isEventTargetInsideElement=function(e,t){var n,i=null==(n=e.composedPath)?void 0:n.call(e);return i?i.includes(t):e.target instanceof Node&&t.contains(e.target)},t.prototype.attachContextMenuElement=function(){this.contextMenuHost.appendChild(this.getDomElement().get(0))},t.prototype.setContextMenuForComponent=function(e){var t=this;e instanceof a.InteractiveContextMenuItem&&e.setContextMenu(this),e instanceof s.Container&&e.getComponents().forEach(function(e){return t.setContextMenuForComponent(e)})},t.prototype.unsetContextMenuForComponent=function(e){var t=this;e instanceof a.InteractiveContextMenuItem&&e.setContextMenu(null),e instanceof s.Container&&e.getComponents().forEach(function(e){return t.unsetContextMenuForComponent(e)})},t}(o.SettingsPanel)},96544:function(e,t,n){"use strict";var i,r=this&&this.__extends||(i=function(e,t){return(i=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])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.CaptionToggleButton=void 0;var o=n(67598),s=n(24379);t.CaptionToggleButton=function(e){function t(t){void 0===t&&(t={});var n=e.call(this,t)||this;return n.config=n.mergeConfig(t,{cssClass:"ui-captiontogglebutton",text:s.i18n.getLocalizer("settings.subtitles"),onAriaLabel:s.i18n.getLocalizer("captions.disable"),offAr
1iaLabel:s.i18n.getLocalizer("captions.enable")},n.config),n}return r(t,e),t.prototype.configure=function(t,n){var i,r,o=this;e.prototype.configure.call(this,t,n);var s=function(){var e,n;return null!=(n=null==(e=t.subtitles)?void 0:e.list())?n:[]},a=function(){return s().filter(function(e){return e.enabled})},u=function(){var e,n,i,o=s(),a=null==(e=t.getAudio())?void 0:e.lang;return null!=(i=null!=(n=o.find(function(e){return e.id===r}))?n:o.find(function(e){return e.lang===a}))?i:o[0]},l=function(){0===s().length?o.hide():(o.show(),a().length>0?o.on():o.off())};t.on(t.exports.PlayerEvent.SourceLoaded,l),t.on(t.exports.PlayerEvent.SourceUnloaded,function(){r=void 0,l()}),t.on(t.exports.PlayerEvent.SubtitleAdded,l),t.on(t.exports.PlayerEvent.SubtitleRemoved,l),t.on(t.exports.PlayerEvent.SubtitleEnabled,function(e){e.subtitle&&(r=e.subtitle.id),l()}),t.on(t.exports.PlayerEvent.SubtitleDisabled,l),t.on(t.exports.PlayerEvent.PeriodSwitched,l),n.getConfig().events.onUpdated.subscribe(l),this.onClick.subscribe(function(){var e=a();if(e.length>0)e.forEach(function(e){return t.subtitles.disable(e.id)});else{var n=u();n&&t.subtitles.enable(n.id,!0)}}),r=null==(i=a().pop())?void 0:i.id,l()},t}(o.ToggleButton)},97440:function(e,t,n){"use strict";var i,r=this&&this.__extends||(i=function(e,t){return(i=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])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.AudioTrackSelectBox=void 0;var o=n(46419),s=n(6917);t.AudioTrackSelectBox=function(e){function t(t){void 0===t&&(t={});var n=e.call(this,t)||this;return n.config=n.mergeConfig(t,{cssClasses:["ui-audiotrackselectbox"]},n.config),n}return r(t,e),t.prototype.configure=function(t,n){e.prototype.configure.call(this,t,n),new s.AudioTrackSwitchHandler(t,this,n)},t}(o.SelectBox)},97768:e=>{"use strict";e.exports=JSON.parse('{"settings.video.quality":"Video Quality","settings.audio.quality":"Audio Quality","settings.audio.track":"Audio Track","settings.audio.mute":"Mute","settings.audio.volume":"Volume","settings.subtitles.window.color":"Window color","settings.subtitles.window.opacity":"Window opacity","settings.subtitles":"Subtitles","settings.subtitles.font.color":"Font color","settings.subtitles.font.opacity":"Font opacity","settings.subtitles.background.color":"Background color","settings.subtitles.background.opacity":"Background opacity","settings.subtitles.options":"Options","playerInsights.show":"Show Player Insights","playerInsights.hide":"Hide Player Insights","colors.white":"white","colors.black":"black","colors.red":"red","colors.green":"green","colors.blue":"blue","colors.cyan":"cyan","colors.yellow":"yellow","colors.magenta":"magenta","percent":"{value}%","settings.subtitles.font.size":"Font size","settings.subtitles.font.style":"Font style","settings.subtitles.font.style.bold":"bold","settings.subtitles.font.style.italic":"italic","settings.subtitles.characterEdge":"Character edge","settings.subtitles.characterEdge.raised":"raised","settings.subtitles.characterEdge.depressed":"depressed","settings.subtitles.characterEdge.uniform":"uniform","settings.subtitles.characterEdge.dropshadowed":"drop shadowed","settings.subtitles.characterEdge.color":"Character edge color","settings.subtitles.font.family":"Font family","settings.subtitles.font.family.monospacedserif":"monospaced serif","settings.subtitles.font.family.proportionalserif":"proportional serif","settings.subtitles.font.family.monospacedsansserif":"monospaced sans serif","settings.subtitles.font.family.proportionalsansserif":"proportional sans serif","settings.subtitles.font.family.casual":"casual","settings.subtitles.font.family.cursive":"cursive","settings.subtitles.font.family.smallcapital":"small capital","settings.time.hours":"Hours","settings.time.minutes":"Minutes","settings.time.seconds":"Seconds","ads.remainingTime":"This ad will end in {remainingTime} seconds.","ads.skip":"Skip","ads.skippableIn":"Skip ad in {remainingTime}","ads.adNumberOfTotal":"Ad {activeAdIndex} of {totalAdsCount}","ad":"Ad","settings":"Settings","fullscreen":"Fullscreen","speed":"Speed","playPause":"Play/Pause","play":"Play","pause":"Pause","open":"open","close"
1:"Close","pictureInPicture":"Picture-in-Picture","appleAirplay":"Apple AirPlay","googleCast":"Google Cast","vr":"VR","off":"off","auto":"auto","ecoMode":"ecoMode","ecoMode.title":"Eco Mode","persistentPreferences":"Remember preferences","back":"Back","reset":"Reset","replay":"Replay","normal":"normal","default":"default","live":"Live","live.jumpToLiveEdge":"{liveLabel}, jump to live edge","subtitle.example":"example subtitle","subtitle.select":"Select subtitle","playingOn":"Playing on <strong>{castDeviceName}</strong>","connectingTo":"Connecting to <strong>{castDeviceName}</strong>...","watermarkLink":"Link to Homepage","controlBar":"Video player controls","player":"Video player","seekBar":"Video timeline","seekBar.value":"Value","seekBar.timeshift":"Timeshift","seekBar.durationText":"out of","quickseek.forward":"Fast Forward {seekSeconds} seconds","quickseek.rewind":"Rewind {seekSeconds} seconds","contextMenu.title":"Bitmovin Player","contextMenu.subtitle":"Adaptive Streaming for the Web","contextMenu.copyTimestampLink":"Copy link at current time","captions.enable":"Enable captions","captions.disable":"Disable captions"}')},98213:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FocusVisibilityTracker=void 0;var n="bmpui-focus-visible";function i(e){return e instanceof HTMLElement&&e.classList instanceof DOMTokenList}t.FocusVisibilityTracker=function(){function e(e,t){var r=this;this.bitmovinUiPrefix=e,this.lastInteractionWasKeyboard=!0,this.onKeyDown=function(e){e.metaKey||e.altKey||e.ctrlKey||(r.lastInteractionWasKeyboard=!0)},this.onMouseOrPointerOrTouch=function(){return r.lastInteractionWasKeyboard=!1},this.onFocus=function(e){var t,o,s=e.target;r.lastInteractionWasKeyboard&&i(s)&&(t=s,o=r.bitmovinUiPrefix,0===t.id.indexOf(o))&&!s.classList.contains(n)&&s.classList.add(n)},this.onBlur=function(e){var t=e.target;i(t)&&t.classList.remove(n)},this.uiWrapperElement=t,this.eventHandlerMap={mousedown:this.onMouseOrPointerOrTouch,pointerdown:this.onMouseOrPointerOrTouch,touchstart:this.onMouseOrPointerOrTouch,keydown:this.onKeyDown,focus:this.onFocus,blur:this.onBlur},this.registerEventListeners()}return e.prototype.registerEventListeners=function(){for(var e in this.eventHandlerMap)this.uiWrapperElement.on(e,this.eventHandlerMap[e],!0)},e.prototype.unregisterEventListeners=function(){for(var e in this.eventHandlerMap)this.uiWrapperElement.off(e,this.eventHandlerMap[e],!0)},e.prototype.release=function(){this.unregisterEventListeners()},e}()},98908:function(e,t,n){"use strict";var i,r=this&&this.__extends||(i=function(e,t){return(i=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])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.ToggleSettingsPanelItem=void 0,t.ToggleSettingsPanelItem=function(e){function t(t){var n=e.call(this,t)||this;return n.config=n.mergeConfig(t,{cssClasses:["ui-toggle-settings-panel-item"],role:"menuitemcheckbox",tabIndex:0},n.config),n}return r(t,e),t.prototype.configure=function(t,n){var i=this;e.prototype.configure.call(this,t,n),this.settingComponent.getDomElement().attr("tabindex","-1"),this.settingComponent.setAriaAttr("hidden","true"),this.settingComponent.getDomElement().on("click",function(e){e.preventDefault(),e.stopImmediatePropagation(),i.onClickEvent()},!0);var r=function(){i.setAriaAttr("disabled",i.settingComponent.isDisabled()?"true":"false")};this.onClick.subscribe(function(){i.settingComponent.isDisabled()||i.settingComponent.toggle()}),this.settingComponent.onToggle.subscribe(function(){return i.updateAriaChecked()}),this.settingComponent.onDisabled.subscribe(r),this.settingComponent.onEnabled.subscribe(r),this.updateAriaChecked(),r()},t.prototype.updateAriaChecked=function(){this.getDomElement().attr("aria-checked",this.settingComponent.isOn()?"true":"false")},t}(n(78196).InteractiveSettingsPanelItem)}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.