PageSourceSearch

https://www.tvlplay.no/_next/static/chunks/53bae957.db667c8eed6a3a27.js

js tvlplay.no collected 2026-10-03 18:53:35 UTC 2,261,001 bytes, 1 lines download raw bytes

vendor: 5,475 bytes, line 1
1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5874],{691:module=>{!function(){!function(e,t){module.exports=t()}(self,function(){return function(){var __webpack_modules__={319:function(e,t,i){var n,r=this&&this.__assign||Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},o=i(736),a=o.default,s=o;(n=i(324).default).name,n.exports&&(s=r({},s,n.exports)),a.addModule(n),function(){var e=i(58).default;e.name,e.exports&&(s=r({},s,e.exports)),a.addModule(e)}(),function(){var e=i(643).default;e.name,e.exports&&(s=r({},s,e.exports)),a.addModule(e)}(),function(){var e=i(966).default;e.name,e.exports&&(s=r({},s,e.exports)),a.addModule(e)}(),function(){var e=i(869).default;e.name,e.exports&&(s=r({},s,e.exports)),a.addModule(e)}(),function(){var e=i(221).default;e.name,e.exports&&(s=r({},s,e.exports)),a.addModule(e)}(),function(){var e=i(187).default;e.name,e.exports&&(s=r({},s,e.exports)),a.addModule(e)}(),function(){var e=i(141).default;e.name,e.exports&&(s=r({},s,e.exports)),a.addModule(e)}(),function(){var e=i(748).default;e.name,e.exports&&(s=r({},s,e.exports)),a.addModule(e)}(),function(){var e=i(815).default;e.name,e.exports&&(s=r({},s,e.exports)),a.addModule(e)}(),function(){var e=i(313).default;e.name,e.exports&&(s=r({},s,e.exports)),a.addModule(e)}(),function(){var e=i(87).default;e.name,e.exports&&(s=r({},s,e.exports)),a.addModule(e)}(),function(){var e=i(708).default;e.name,e.exports&&(s=r({},s,e.exports)),a.addModule(e)}(),function(){var e=i(550).default;e.name,e.exports&&(s=r({},s,e.exports)),a.addModule(e)}(),function(){var e=i(146).default;e.name,e.exports&&(s=r({},s,e.exports)),a.addModule(e)}(),function(){var e=i(882).default;e.name,e.exports&&(s=r({},s,e.exports)),a.addModule(e)}(),function(){var e=i(375).default;e.name,e.exports&&(s=r({},s,e.exports)),a.addModule(e)}(),function(){var e=i(429).default;e.name,e.exports&&(s=r({},s,e.exports)),a.addModule(e)}(),function(){var e=i(72).default;e.name,e.exports&&(s=r({},s,e.exports)),a.addModule(e)}(),function(){var e=i(304).default;e.name,e.exports&&(s=r({},s,e.exports)),a.addModule(e)}(),function(){var e=i(538).default;e.name,e.exports&&(s=r({},s,e.exports)),a.addModule(e)}(),function(){var e=i(242).default;e.name,e.exports&&(s=r({},s,e.exports)),a.addModule(e)}(),function(){var e=i(70).default;e.name,e.exports&&(s=r({},s,e.exports)),a.addModule(e)}(),function(){var e=i(913).default;e.name,e.exports&&(s=r({},s,e.exports)),a.addModule(e)}(),function(){var e=i(924).default;e.name,e.exports&&(s=r({},s,e.exports)),a.addModule(e)}(),function(){var e=i(60).default;e.name,e.exports&&(s=r({},s,e.exports)),a.addModule(e)}(),function(){var e=i(322).default;e.name,e.exports&&(s=r({},s,e.exports)),a.addModule(e)}(),function(){var e=i(607).default;e.name,e.exports&&(s=r({},s,e.exports)),a.addModule(e)}(),function(){var e=i(883).default;e.name,e.exports&&(s=r({},s,e.exports)),a.addModule(e)}(),function(){var e=i(310).default;e.name,e.exports&&(s=r({},s,e.exports)),a.addModule(e)}(),function(){var e=i(465).default;e.name,e.exports&&(s=r({},s,e.exports)),a.addModule(e)}(),function(){var e=i(195).default;e.name,e.exports&&(s=r({},s,e.exports)),a.addModule(e)}(),function(){var e=i(532).default;e.name,e.exports&&(s=r({},s,e.exports)),a.addModule(e)}(),e.exports=s},708:function(e){"use strict";self,e.exports=(self.webpackChunkbitmovin_player=self.webpackChunkbitmovin_player||[]).push([[744],{98154:function(e,t,i){var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])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=i(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(),i=function(e){t.debug("[ABR] ".concat(e))};return{setConfig:function(t){i("Updating adaptation config with ".concat(JSON.stringify(t))),(0,r.isNumber)(t.qualityStabilityBalance)&&function(t){if(t<0||t>1)i("Failed to set qualityStabilityBalance to ".concat(t,", valid range is 0 to 1"));else{var n=e.getConfig(!0).adaptation;n&&(n.qualityStabilityBalance=t,i("Updated qualityStabilityBalance to ".concat(t)))}}(t.qualityStabilityBalance),t.resolution&&function(t){var n=t.maxSelectableVideoHeight,r=t.maxSelectableVideoWidth,a=t.minSelectableVideoHeight,s=t.minSelectableVideoWidth,u=e.getConfig(!0).adaptation.resolution;o(n)&&(u.maxSelectableVideoHeight=n),o(r)&&(u.maxSelectableVideoWidth=r),o(a)&&(u.minSelectableVideoHeight=a),o(s)&&(u.minSelectableVideoWidth=s),i("Updated resolution boundaries to ".concat(JSON.stringify(u)))}(t.resolution),(0,r.isBoolean)(t.limitToPlayerSize)&&function(t){var n=e.getConfig(!0).adaptation;n&&(n.limitToPlayerSize=t,i("Updated limitToPlayerSize to ".concat(t)))}(t.limitToPlayerSize)},getConfig:function(){var t=e.getConfig(!0).adaptation,i=t.qualityStabilityBalance,r=t.resolution,o=t.limitToPlayerSize;return{qualityStabilityBalance:i,resolution:n({},r),limitToPlayerSize:o}}}},e}()},89498:function(e,t,i){var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};
1Object.defineProperty(t,"__esModule",{value:!0}),t.AdaptationHandler=void 0;var r=i(80813),o=i(98714),a=i(49859),s=i(91678),u=i(33436),c=i(86897),l=i(93204),d=i(79721),h=i(85434),p=i(23068),f=i(70850),g=i(46057),m=i(47151),y=i(79505),v=i(49024),S=i(19119),b=i(59113),E=i(7676),T=1/0;function _(e,t,i){return e>=t&&e<=i}t.AdaptationHandler=function(){function e(e,t,i){var n,r,o=this;this.context=e,this.mimeType=t,this.constraints=i,this.PP=!1,this.RP=function(e){var t;return void 0===e&&(e=null==(t=o.NP)?void 0:t.getState()),e?(0,a.getPreferredBitrate)((0,a.getAdaptationState)(e),o.mimeType):null},this.GP=(0,v.createAdaptationLogic)(this.context,this.mimeType,{minBitrate:this.constraints.minBitrate,maxBitrate:this.constraints.maxBitrate},null==(r=null==(n=this.context.config)?void 0:n.adaptation)?void 0:r.logic),this.KP=this.qQ(this.LP),this.iQ()}return Object.defineProperty(e.prototype,"NP",{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,"QP",{get:function(){var e=this.context.sourceContext.sourceIdentifier;return this.context.serviceManager.get(r.ServiceName.ManifestService,e)},enumerable:!1,configurable:!0}),e.prototype.SP=function(e,t,i){var n,r;return e?this.KP:t&&null!=(r=null==(n=this.GP.findRepresentationForBitrate(t,i))?void 0:n._internalId)?r:null},e.prototype.TP=function(e,t){var i,n=this.eQ(),r=this.RP();return n||r?this.SP(n,r,t):null!=(i=this.GP.selectRepresentationID(e,t))?i:null},e.prototype.eQ=function(){return!this.isAuto()&&!!this.jQ(this.KP,this.gQ())},e.prototype.fQ=function(e){this.HP=e},e.prototype.gQ=function(){var e,t,i;return null!=(i=null==(t=null==(e=this.QP)?void 0:e.getAdaptationSet(this.LP))?void 0:t.Representation)?i:[]},e.prototype.selectRepresentationID=function(e,t){void 0===e&&(e={});var i=this.kQ(null!=t?t:this.gQ()),n=this.TP(e,i);return n&&this.fQ(n),this.HP},e.prototype.hQ=function(){var e=this,t=!!this.JP;this.NP&&!t&&(this.JP=(0,l.subscribe)(this.NP)(c.getBufferStateMap,function(t){var i,n,r=null==t?void 0:t[e.mimeType];if(r){var a=r.rendererRanges;a&&a.length>0&&(null==(i=e.NP)||i.dispatch((0,o.clearPreferredBitrateForMimeTypeAction)(e.mimeType)),null==(n=e.JP)||n.call(e),e.JP=void 0)}}))},e.prototype.iQ=function(){var e=this;this.NP&&(this.RP()&&this.hQ(),this.IP=(0,l.subscribe)(this.NP)(this.RP,function(){return e.hQ()},function(e){return!!e}))},e.prototype.jQ=function(e,t){var i;return t?t.find(function(t){return t._internalId.equals(e)}):null==(i=this.QP)?void 0:i.getRepresentationById(e)},e.prototype.kQ=function(e){var t=this;this.nQ();var i=this.context.config.adaptation.resolution,n=i.minSelectableVideoHeight,r=i.maxSelectableVideoHeight,o=i.minSelectableVideoWidth,a=i.maxSelectableVideoWidth,s=e.filter(function(e){return!!_(e._bandwidth,t.constraints.minBitrate,t.constraints.maxBitrate)&&(!(0,p.isVideoRepresentation)(e)||_(e._width,o,a)&&_(e._height,n,r))});if(s.length>0)return s;this.context.logger.debug("No selectable representations found for mimeType ".concat(this.mimeType," within the given bitrate/resolution constraints! Falling back to alternative selection."));var u=this.lQ(e);return u?[u]:e},e.prototype.lQ=function(e){var t=0!==this.constraints.minBitrate,i=this.constraints.maxBitrate!==T;return t?(0,E.findMaximum)(e,function(e){return e._bandwidth}):i?(0,E.findMinimum)(e,function(e){return e._bandwidth}):h.MimeTypeHelper.isVideo(this.mimeType)?this.mQ(e):void 0},e.prototype.mQ=function(e){var t=this.context.config.adaptation.resolution,i=t.minSelectableVideoHeight,n=t.maxSelectableVideoHeight,r=t.minSelectableVideoWidth,o=t.maxSelectableVideoWidth,a=e.filter(p.isVideoRepresentation);return 0!==i?(0,E.findMaximum)(a,function(e){return e._height}):n!==1/0?(0,E.findMinimum)(a,function(e){return e._height}):0!==r?(0,E.findMaximum)(a,function(e){return e._width}):o!==1/0?(0,E.findMinimum)(a,function(e){return e._width}):void 0},e.prototype.nQ=function(){h.MimeTypeHelper.isVideo(this.mimeType)&&(this.context.config.adaptation.limitToPlayerSize&&!this.PP?this.pQ():!this.context.config.adaptation.limitToPlayerSize&&this.PP&&this.oQ())},e.prototype.oQ=function(){this.PP=!1,this.context.config.adaptation.onVideoAdaptation=this.OP},e.prototype.pQ=function(){var e=this;this.PP=!0;var t=this.context.config.adaptation.onVideoAdaptation;this.OP=t,this.context.config.adaptation.onVideoAdaptation=t&&"function"==typeof t?function(i){var n,r,o;
1return i.suggested=(0,S.AdaptToPlayerResolution)(e.context.internalPlayer,i.suggested,null!=(r=null==(n=e.MP)?void 0:n.isFullscreen())&&r)||i.suggested,null!=(o=(0,f.safeUserCallback)(function(){return t(i)},e.context.logger))?o:i.suggested}:function(t){var i,n;return(0,S.AdaptToPlayerResolution)(e.context.internalPlayer,t.suggested,null!=(n=null==(i=e.MP)?void 0:i.isFullscreen())&&n)||t.suggested}},e.prototype.qQ=function(e){return e?new y.RepresentationId(e,"auto"):new y.RepresentationId(new m.AdaptationSetId(d.DEFAULT_PERIOD_ID,this.mimeType),"auto")},e.prototype.rQ=function(e){var t,i={id:e._id,bitrate:e._bandwidth,width:e._width,height:e._height};null==(t=this.context.store)||t.dispatch((0,s.addMetricsValue)(this.mimeType,u.MetricType.DownloadedAdaptationSet,i))},e.prototype.sQ=function(){var e,t,i=this;if(this.QP){var r=this.QP.getAdaptationSet(this.LP);if(r){var o=n(n({},r),{Representation:this.kQ(r.Representation),_minBandwidth:Math.max(null!=(e=r._minBandwidth)?e:0,this.constraints.minBitrate),_maxBandwidth:Math.min(null!=(t=r._maxBandwidth)?t:T,this.constraints.maxBitrate)});this.GP.setAdaptationSet(o),(0,g.yieldToMain)().then(function(){return i.rQ(o)})}}else this.context.logger.debug("Could not update adaptation set in AdaptationHandler!")},e.prototype.tQ=function(e){return this.LP&&e&&this.QP?this.QP.getRepresentation(this.LP,e):null},e.prototype.uQ=function(){if(this.KP){var e=this.KP.representationId;this.KP=this.qQ(this.LP);var t=this.tQ(e);t&&(this.KP=t._internalId)}else this.KP=this.qQ(this.LP)},e.prototype.setAdaptationSetId=function(e){e||this.context.logger.debug("newAdaptationSetId is ".concat(e)),this.LP=e,this.uQ(),this.sQ()},e.prototype.setFixedRepresentation=function(e){var t;if("auto"===e)this.KP=new y.RepresentationId(this.LP,"auto");else if(this.LP){var i=null==(t=this.QP)?void 0:t.getRepresentation(this.LP,e);i&&(this.KP=i._internalId,this.selectRepresentationID())}},e.prototype.getFixedRepresentation=function(){return this.HP},e.prototype.getLowestRepresentationId=function(){var e;return this.isAuto()?null==(e=this.GP.getLowestRepresentation())?void 0:e._internalId.representationId:this.KP.representationId},e.prototype.isAuto=function(){return"auto"===this.KP.representationId},e.prototype.shouldDownloadBeCancelled=function(e,t){var i,n,r,o,a,s,u,c=null!=(n=null==(i=this.context.config.adaptation)?void 0:i.disableDownloadCancelling)&&n,l=null!=(a=null==(o=null==(r=this.QP)?void 0:r.getAdaptationSet(this.LP))?void 0:o.Representation)?a:[],d=1===l.length,h=l.some(function(e){return!!e._bandwidth});if(!this.isAuto()||c||d||!h)return!1;var p=function(e){if(!(0,E.hasTotalBytes)(e))return 1/0;var t=function(e){var t,i=null!=(t=e.elapsedTime)?t:0;return e.loadedBytes>0&&i>0?8*e.loadedBytes/1024/i:0}(e);return t>0?8*e.totalBytes/1024/t:1/0}(e),f=(null!=(u=null==(s=e.responseTiming)?void 0:s.doneTimestamp)?u:0)>0,g=!!e.segmentDuration&&p>1.5*e.segmentDuration;return!(f||!g)&&!function(e){return!!(0,E.hasTotalBytes)(e)&&e.loadedBytes>=.9*e.totalBytes}(e)&&this.GP.shouldDownloadBeCancelled(e,t)},e.prototype.setStartupPhase=function(){this.GP.setStartupPhase()},e.prototype.addSample=function(e){this.GP.addSample(n({timestamp:Date.now()},e))},e.prototype.shutdown=function(){this.GP.shutdown()},e.prototype.dispose=function(){var e,t;this.shutdown(),this.GP.dispose(),null==(e=this.IP)||e.call(this),null==(t=this.JP)||t.call(this)},e.prototype.selectQualityBasedOnBitrateMeasurement=function(e,t){if(t)return(0,b.findQualityForBitrate)(t,e);var i=this.RP();if(i)return(0,b.findQualityForBitrate)(i,e);var n=this.kQ(this.gQ());if(this.eQ()){var r=this.jQ(this.HP,n);if(r)return(0,b.findQualityForBitrate)(r._bandwidth,e)}return(0,b.findQualityForBitrate)(this.GP.getCurrentBitrateMeasurement(),e)},e}()},49024:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.createAdaptationLogic=function(e,t,i,c){var l=i.minBitrate,d=i.maxBitrate;return void 0===c&&(c=n.AdaptationLogicType.DOWNLOAD_PREDICTION),e.logger.debug("Using adaptation logic ".concat(c)),c===n.AdaptationLogicType.LOW_LATENCY?new s.LowLatencyAbr(e,t):c===n.AdaptationLogicType.WISH?new u.WishLogic(e,t):c===n.AdaptationLogicType.DOWNLOAD_PREDICTION?new a.DownloadPredictionLogic(e,t):c===n.AdaptationLogicType.BUFFER_FILL_RATE?new r.BufferFillRateLogic(e,t):new o.BufferLogic(e,t,l||0,d||
11/0)};var n=i(21281),r=i(48968),o=i(39201),a=i(85696),s=i(24296),u=i(7290)},49541:function(e,t,i){t.X=void 0;var n=i(85434),r=i(70850),o=i(89498),a=i(83429);t.X=function(){function e(e){this.context=e,this.Ko=new Map}return e.prototype.Lo=function(e){if(e){if(!this.Ko.has(e)){var t=function(e,t){var i={minBitrate:0,maxBitrate:1/0};return n.MimeTypeHelper.isVideo(e)?(i.minBitrate=Number(t.MIN_SELECTABLE_VIDEO_BITRATE)||i.minBitrate,i.maxBitrate=Number(t.MAX_SELECTABLE_VIDEO_BITRATE)||i.maxBitrate):n.MimeTypeHelper.isAudio(e)&&(i.minBitrate=Number(t.MIN_SELECTABLE_AUDIO_BITRATE)||i.minBitrate,i.maxBitrate=Number(t.MAX_SELECTABLE_AUDIO_BITRATE)||i.maxBitrate),i}(e,this.context.settings);this.Ko.set(e,new o.AdaptationHandler(this.context,e,t))}return this.Ko.get(e)}},e.prototype.selectRepresentation=function(e,t,i){var n,r;return void 0===t&&(t={}),null!=(r=null==(n=this.Lo(e))?void 0:n.selectRepresentationID(t,i))?r:void 0},e.prototype.isAuto=function(e){var t,i;return null==(i=null==(t=this.Lo(e))?void 0:t.isAuto())||i},e.prototype.shouldDownloadBeCancelled=function(e,t,i){var n,r;return null!=(r=null==(n=this.Lo(e))?void 0:n.shouldDownloadBeCancelled(t,i))&&r},e.prototype.selectQualityBasedOnBitrateMeasurement=function(e,t){var i=this.Mo(),n=null;i||(n=r.Util.generateUniqueId(),i=this.Lo(n));var o=null==i?void 0:i.selectQualityBasedOnBitrateMeasurement(e,t);return n&&this.release(n),o||e[0]},e.prototype.Mo=function(){var e=void 0;return this.Ko.forEach(function(t,i){e&&!n.MimeTypeHelper.isVideo(i)||(e=t)}),e},e.prototype.setAdaptationSetId=function(e,t){var i;null==(i=this.Lo(e))||i.setAdaptationSetId(t)},e.prototype.setFixedRepresentation=function(e,t){var i;null==(i=this.Lo(e))||i.setFixedRepresentation(t)},e.prototype.getCurrentRepresentationId=function(e){var t,i;return null!=(i=null==(t=this.Lo(e))?void 0:t.getFixedRepresentation())?i:null},e.prototype.getLowestRepresentationId=function(e){var t;return null==(t=this.Lo(e))?void 0:t.getLowestRepresentationId()},e.prototype.setStartupPhase=function(e){var t;null==(t=this.Lo(e))||t.setStartupPhase()},e.prototype.shutdown=function(e){var t;null==(t=this.Lo(e))||t.shutdown()},e.prototype.addSample=function(e,t){var i;null==(i=this.Lo(e))||i.addSample(t)},e.prototype.getUserSelectedRepresentation=function(e,t,i){return(0,a.getUserSelectedRepresentation)(this.context,e,t,i)},e.prototype.release=function(e){var t;null==(t=this.Ko.get(e))||t.dispose(),this.Ko.delete(e)},e.prototype.dispose=function(){this.Ko.forEach(function(e){return e.dispose()}),this.Ko.clear()},e}()},81723:function(e,t,i){var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])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=i(46151),o=i(85434),a=i(89927),s=i(88844),u=i(59113),c=i(59406),l=i(70238),d=i(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}return e.prototype.getMonitoringMimeType=function(){var e=null,t=this.context.store.getState();return t&&(e=Object.keys((0,r.getMetricsState)(t)).find(o.MimeTypeHelper.isVideo)),null!=e?e:this.mimeType},e.prototype.updateAvailableRepresentations=function(e){e&&(this.availableRepresentations=e.map(function(e,t){return n(n({},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 i=e._bandwidth;return t.lastRepresentation&&i<t.lastRepresentation._bandwidth}):this.availableRepresentations},e.prototype.findRepresentationForBitrate=function(e,t){var i,n;return this.updateAvailableRepresentations(t),null!=(n=null==(i=(0,u.findQualityForBitrate)(e,this.getAvailableRepresentations().map(function(e){return{rep:e,bitrate:Number(e._bandwidth)}})))?void 0:i.rep)?n:this.getLowestRepresentation()},e.prototype.checkStartupPhase=function(e){this.startupPhase&&this.Gfb(e)}
1,e.prototype.getLowestRepresentation=function(){return(0,d.getLowestRepresentation)(this.availableRepresentations)},e.prototype.Gfb=function(e){var t=this,i=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)(i))),e.value>=.5*i&&(this.context.logger.insane("startup is over as steady phase has been reached... moving to normal adaptation"),(0,s.clearTimeoutIfDefined)(this.startupPhaseTimerID),this.startupPhase=!1,this.startupPhaseTimerID=void 0)},e.prototype.getRepresentationForNormalChange=function(e,t,i){return this.startupPhase||!i?this.getRepresentationForRateMeasurement(l.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(l.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=l.SwitchingAggressiveness.Conservative),void 0!==(null==(t=this.lastRepresentation)?void 0:t.arrayIndex)&&this.lastRepresentation.arrayIndex>=this.availableRepresentations.length-1)return this.lastRepresentation;var t,i=this.getRepresentationForRateMeasurement(e);return this.lastRepresentation&&Number(i._bandwidth)<=Number(this.lastRepresentation._bandwidth)?this.lastRepresentation:(this.context.logger.insane("switching up to "+i._id),i)},e.prototype.switchDown=function(e){if(void 0===e&&(e=l.SwitchingAggressiveness.VeryHigh),void 0!==(null==(t=this.lastRepresentation)?void 0:t.arrayIndex)&&(null==(i=this.lastRepresentation)?void 0:i.arrayIndex)<1&&null!==(null==(n=this.lastRepresentation)?void 0:n._id))return this.context.logger.insane(this.mimeType+" is already on the lowest quality, can not switch to lower quality."),this.lastRepresentation;var t,i,n,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(l.SwitchingAggressiveness.VeryHigh);case c.Rules.SHOULD_STAY:return this.switchUp(l.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(l.SwitchingAggressiveness.Mid);case c.Rules.SHOULD_STAY:return this.stay();case c.Rules.SHOULD_SWITCH_DOWN:return this.switchDown(l.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(l.SwitchingAggressiveness.High);case c.Rules.SHOULD_SWITCH_DOWN:return this.switchDown(l.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,i=Math.max(0,(null!=(t=null==(e=this.lastRepresentation)?void 0:e.arrayIndex)?t
1:0)-1);return this.availableRepresentations[i]},e}()},48968:function(e,t,i){var n=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(t,i)};return function(t,i){if("function"!=typeof i&&null!==i)throw TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.BufferFillRateLogic=void 0;var r=i(46151),o=i(33436),a=i(88844),s=i(81723),u=i(4865),c=i(20066),l=i(64463),d=i(70238);t.BufferFillRateLogic=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.udb={},t.vdb=0,t.shouldDownloadBeCancelled=function(e,i){var n,r;return 0!==(null==(n=t.lastRepresentation)?void 0:n.arrayIndex)&&t.Leb()._id!==(null==(r=t.lastRepresentation)?void 0:r._id)&&(t.lastDownloadCancelled=!0,!0)},t}return n(t,e),t.prototype.getRepresentationForRateMeasurement=function(e){void 0===e&&(e=d.SwitchingAggressiveness.Mid);var t=this.udb.rateMeasurement.getStatus(e),i=this.context.settings.RATE_SAFETY_MARGIN_PERCENTAGE/100,n=t.value*(1-i);return this.findRepresentationForBitrate(n)},t.prototype.addSample=function(e){Object.values(this.udb).forEach(function(t){return t.addSample(e)})},t.prototype.xdb=function(e){var t=this.switchDown(d.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,i,n){var r=parseFloat((i*e/t).toFixed(2));return n&&(r*=2),1.1*r},t.prototype.ydb=function(e,i,n,r,o){var a=t.calcEstimatedDownloadDuration(n,e,i,o);return a<r||a<=n},t.prototype.zdb=function(e,t,i,n){var r,o,a,s,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 c=Math.min.apply(null,this.availableRepresentations.map(function(e){return Number(e._bandwidth)})),l=Number(t._bandwidth);if(!(isFinite(l)&&l===c||this.ydb(i,t._bandwidth,e.segmentDuration,n,u))){for(var d=!1,h=null!=(a=t.arrayIndex)?a:-1;h>=0;h--){var p=this.availableRepresentations[h];if(this.ydb(i,p._bandwidth,e.segmentDuration,n,u)){this.context.logger.insane("fall back to "+p.arrayIndex),t=p,d=!0;break}}d||(this.context.logger.insane("keep old rep for now, not switching from "+(null==(s=this.lastRepresentation)?void 0:s.arrayIndex)+" to "+t.arrayIndex),t=this.useLastRepresentation())}}return t},t.prototype.Keb=function(e){var t,i=this.lastRateMeasurement>0&&2*e<=this.lastRateMeasurement;return i&&(null==(t=this.lastRepresentation)?void 0:t._id)?1.5*e<this.lastRepresentation._bandwidth:i},t.prototype.Leb=function(e){var t,i,n=this.context.store.getState();n&&(i=(0,r.getMetricsState)(n));var a,s=this.udb.bufferFillState.getStatus(),u=this.udb.bufferFillRate.getStatus(),c=this.udb.rateMeasurement.getStatus(1).value,l=null!=i&&this.context.bufferSettings.getForwardTargetLevel()>i.default.bufferLogicActivationThreshold,h=this.Keb(c);this.checkStartupPhase(s),a=h?this.xdb(c):this.getRepresentationForNormalChange(u,s,l);var p=(0,r.getMetricsLastEntry)(null!=i?i:{},this.mimeType,o.MetricType.StalledSeconds).value;return p>this.vdb?(this.vdb=p,this.switchDown(d.SwitchingAggressiveness.MidHigh)):(a=this.zdb(e,a,c,s.value),this.lastRateMeasurement=c,this.lastDownloadCancelled&&void 0!==a.arrayIndex&&void 0!==(null==(t=this.lastRepresentation)?void 0:t.arrayIndex)&&a.arrayIndex>=this.lastRepresentation.arrayIndex&&(a=this.getOneRepresentationLower(),this.lastDownloadCancelled=!1),a)},t.prototype.selectRepresentationID=function(e,t){return this.updateAvailableRepresentations(t),this.lastRepresentation=this.Leb(e),this.lastRepresentation._internalId},t.prototype.setAdaptationSet=function(e){this.updateAvailableRepresentations(e.Representation),this.lastRepresentation?this.lastRepresentation=this.findRepresentationForBitrate(this.lastRepresentation._bandwidth):this.lastRepresentation={_id:null,_bandwidth:0,arrayIndex:-1},this.wdb=this.getMonitoringMimeType(),this.udb.bufferFillRate=this.udb.bufferFillRate||new c.BufferFillRateRule(this.context,this.wdb),this.udb.bufferFillState=this.udb.bufferFillState||(0,l.BufferFillStateRule)(this.context,this.wdb),this.udb.rateMeasurement=this.udb.rateMeasurement||new u.BlockBasedRateMeasurementRule(this.context,this.wdb)},t.prototype.getCurrentBitrateMeasurement=function(){return this.getCurrentBitrate(this.udb.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.udb).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.udb).forEach(function(e){return e.shutdown()})},t.prototype.dispose=function(){this.shutdown(),Object.values(this.udb).forEach(function(e){return e.dispose()}),this.udb={},this.lastRepresentation=void 0,this.availableRepresentations=[],this.wdb=""},t}(s.BaseAdaptationLogic)}
1,39201:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.BufferLogic=void 0;var n=i(85434),r=i(96533),o=i(7676);t.BufferLogic=function(){function e(e,t,i,r){this.context=e,this.mimeType=t,this.minSelectableBitrate=i,this.maxSelectableBitrate=r,this.Qeb=[],this.Meb=n.MimeTypeHelper.getMediaType(this.mimeType),this.Peb={timestamp:Date.now(),bufferLevel:0,bufferTargetLevel:0}}return e.prototype.Reb=function(e){e&&(this.Qeb=e)},e.prototype.Seb=function(){return(0,r.findLowestPossibleBandwidthFromRepresentations)(this.Qeb,this.minSelectableBitrate)},e.prototype.Teb=function(){var e;return null==(e=this.findRepresentationForBitrate(this.maxSelectableBitrate))?void 0:e._bandwidth},e.prototype.Ueb=function(){return this.context.bufferSettings.getForwardTargetLevel(this.Meb)},e.prototype.Veb=function(){var e=this.Seb(),t=this.Teb();return this.Oeb=this.Ueb(),function(e,t,i){var n=[];0===t&&(t=e);var r=2*Math.floor(.1*i),o=8*Math.floor(.1*i);o<=r&&(o=Math.floor(.9*i)),r<=1&&(r=1);for(var a=(t-e)/(o-r),s=e-a*r,u=0;u<r;u++)n[u]=e;for(u=r;u<o;u++)n[u]=Math.floor(a*u+s);for(u=o;u<=i;u++)n[u]=t;return n}(e,t||e,this.Oeb)},e.prototype.Web=function(){var e=this.Ueb();this.Oeb!==e&&(this.Neb=this.Veb())},e.prototype.findRepresentationForBitrate=function(e,t){return this.Reb(t),(0,r.getMatchingRepresentationByBandwidth)(this.Qeb,e)},e.prototype.Xeb=function(){var e,t=this.Ueb(),i=this.Peb.bufferLevel;return(i=Math.floor(i))>t&&(i=t),e=this.Neb.hasOwnProperty(i)?this.Neb[i]:this.Neb[0],this.findRepresentationForBitrate(e)},e.prototype.selectRepresentationID=function(e,t){this.Reb(t);var i=this.Xeb();return this.Web(),i._internalId},e.prototype.setAdaptationSet=function(e){this.Reb(e.Representation),this.Neb=this.Veb()},e.prototype.shouldDownloadBeCancelled=function(){return!1},e.prototype.setStartupPhase=function(){},e.prototype.shutdown=function(){},e.prototype.addSample=function(e){this.Peb=e},e.prototype.dispose=function(){this.Neb=[]},e.prototype.getCurrentBitrateMeasurement=function(){return 0},e.prototype.getLowestRepresentation=function(){return(0,o.getLowestRepresentation)(this.Qeb)},e}()},11958:function(e,t,i){var n=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(t,i)};return function(t,i){if("function"!=typeof i&&null!==i)throw TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.CancellableAdaptationLogic=void 0;var r=i(80813),o=i(4131),a=i(21281),s=i(46151),u=i(33436),c=i(81199),l=i(81723),d=i(39185),h=i(45199),p=i(17006),f=i(70238),g=i(7676);function m(e){var t,i,n,r,o=null!=(i=null==(t=e.responseTiming)?void 0:t.openedTimestamp)?i:-1,a=null!=(r=null==(n=e.responseTiming)?void 0:n.headersReceivedTimestamp)?r:-1;return o<0||a<0?0:a-o}function y(e,t){var i=e.filter(function(e){return e.value.representationId.equals(t)}).slice(-3).map(function(e){return e.value.time});return(0,p.calculateExponentialWeightedAverage)(i,.8)}t.CancellableAdaptationLogic=function(e){function t(t,i){var n=e.call(this,t,i)||this;return n.shouldDownloadBeCancelled=function(e,t){var i,r,a=null!=(i=e.elapsedTime)?i:-1,s=null==(r=n.Ifb)?void 0:r.isPaused(),u=n.isStartupBitrateInEffect(),c=function(e){var t,i=null!=(t=e.elapsedTime)?t:-1;return i<0?0:i-m(e)}(e),l=n.Jfb(t),d=(0,o.hasLoadedData)(e),h=d?c>n.context.settings.MIN_EFFECTIVE_SEGMENT_DOWNLOAD_TIME:a>n.context.settings.MIN_EFFECTIVE_SEGMENT_DOWNLOAD_TIME;return!(s||u||l||!h)&&n.ggb(e,c,d,a)},n.monitoringMimeType=n.getMonitoringMimeType(),n.timeToFirstByteMeasurementRule=new h.TimeToFirstByteMeasurementRule(n.context,n.monitoringMimeType),n.rateMeasurementRule=new d.SegmentBasedRateMeasurementRule(n.context,n.monitoringMimeType),n}return n(t,e),Object.defineProperty(t.prototype,"Hfb",{get:function(){return this.context.serviceManager.get(r.ServiceName.ManifestService,this.context.sourceContext.sourceIdentifier)}
1,enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"Ifb",{get:function(){return this.context.serviceManager.get(r.ServiceName.PlayerStateService)},enumerable:!1,configurable:!0}),t.prototype.isStartupBitrateInEffect=function(){var e,t=this.context.store.getState(),i=t?(0,s.getMetricsHistoryFromInstanceState)(t,this.mimeType,u.MetricType.DownloadInformation):[],n=!!(null==(e=this.context.config.adaptation)?void 0:e.startupBitrate),r=i.filter(function(e){return!!e.value}).length>0;return n&&!r},t.prototype.Jfb=function(e){return!!e&&this.getLowestRepresentation()._internalId.equals(e)},t.prototype.Kfb=function(){return(0,c.getPlayableBufferLevel)(this.context.internalPlayer)},t.prototype.estimateTimeToFirstByte=function(e){var t;switch(void 0===e&&(e=0),t=0!==e?this.timeToFirstByteMeasurementRule.estimateStatus(e,5,.2).value:this.timeToFirstByteMeasurementRule.getStatus(5,.2).value,function(e){var t,i;return null!=(i=null==(t=e.adaptation)?void 0:t.rttEstimationMethod)?i:a.RttEstimationMethod.WeightedAverage}(this.context.config)){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.Lfb=function(e,t,i,n,r,o){var a,c,l,d,h,f,g,m=n*t/i+r,v=null!=(c=null==(a=this.Hfb)?void 0:a.isManifestFetchRequired(e))&&c,S=!this.Nfb(e),b=null!=(l=null==o?void 0:o.hlsDependentSegments)&&l,E=null!=(h=null==(d=this.Hfb)?void 0:d.getRepresentationById(e))?h:null,T=!!this.lastRepresentation&&null!==(null==(f=this.lastRepresentation)?void 0:f._id)&&(null==(g=this.lastRepresentation)?void 0:g.arrayIndex)!==(null==E?void 0:E.arrayIndex),_=this.context.store.getState(),A=m;return A+=function(e,t,i){var n=e?(0,s.getMetricsState)(e):{};return y((0,s.getMetricsHistory)(n,t,u.MetricType.DecryptionTime),i)+y((0,s.getMetricsHistory)(n,t,u.MetricType.TransmuxingTime),i)}(_,this.mimeType,e),b&&T&&(A*=2),S&&(A+=r),v&&(A+=Math.max(function(e){var t=e?(0,s.getMetricsState)(e):{};return function(e){var t=(0,s.getMetricsHistory)(e,"default",u.MetricType.DownloadInformation).slice(-3).map(function(e){return e.value.time});return(0,p.calculateExponentialWeightedAverage)(t,.8)}(t)+function(e){var t=(0,s.getMetricsHistory)(e,"default",u.MetricType.ProcessingTime).slice(-3).map(function(e){return e.value});return(0,p.calculateExponentialWeightedAverage)(t,.8)}(t)}(_),r)),A},t.prototype.Mfb=function(e,t,i,n){var r=1-this.context.settings.DOWNLOAD_DURATION_SAFETY_MARGIN,o=(n?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,i)*o/i),i)},t.prototype.isDownloadFeasible=function(e,t,i,n,r,o,a){var s,u=e.arrayIndex===(null==(s=this.lastRepresentation)?void 0:s.arrayIndex),c=this.Mfb(i,o,a,u);return this.Lfb(e._internalId,i,t,e._bandwidth,r,{hlsDependentSegments:n})<=c},t.prototype.Nfb=function(e){var t,i,n=this.context.store.getState(),r=n?(0,s.getMetricsHistoryFromInstanceState)(n,this.mimeType,u.MetricType.CachedInitSegments):[];return 0===r.length?null!=(i=null==(t=this.Hfb)?void 0:t.hasSelfInitialisingSegments())&&i:r.some(function(t){var i=t.hasOwnProperty("value")&&t.value.hasOwnProperty("internalRepId")?t.value.internalRepId:null;return null!==i&&i.equals(e)})},t.prototype.Ofb=function(e,t,i){var n=this;void 0===i&&(i=this.estimateTimeToFirstByte());var r=this.availableRepresentations.filter(function(e){var t;return n.lastRepresentation&&!e._internalId.equals(null==(t=n.lastRepresentation)?void 0:t._internalId)});return Math.min.apply(Math,r.map(function(r){var o;return n.Lfb(r._internalId,null!=(o=n.lastSegmentInfo?n.lastSegmentInfo.segmentDuration:t)?o:0,e,r._bandwidth,i,n.lastSegmentInfo)}))},t.prototype.Pfb=function(e){var t,i,n,r,o,a,s=null!=(t=e.elapsedTime)?t:0,u=(null==(i=this.previousRequestProgress)?void 0:i.url)===e.url?(e.loadedBytes-(null!=(r=null==(n=this.previousRequestProgress)?void 0:n.loadedBytes)?r:0))/(s-(null!=(a=null==(o=this.previousRequestProgress)?void 0:o.elapsedTime)?a:0)):-1;return this.previousRequestProgress=e,u},t.prototype.Qfb=function(e,t){var i,n=t?m(e):null!=(i=e.elapsedTime)?i:0;return this.estimateTimeToFirstByte(n)},t.prototype.Rfb=function(e){return void 0===e&&(e=4),this.lastRepresentation?this.lastRepresentation._bandwidth/8*e*1.2:0},t.prototype.Sfb=function(e,t){var i=(0,o.hasLoadedData)(e),n=i?this.Pfb(e):0,r=i&&(0,g.hasTotalBytes)(e)?e.totalBytes-e.loadedBytes:this.Rfb(e.segmentDuration);return Math.min(r/(t/8),n>0?r/n:1/0)},t.prototype.Tfb=function(e,t,i){if((0,o.hasLoadedData)(e))return e.loadedBytes/t*8;var n=this.context.bufferSettings.getForwardTargetLevel(),r=this.rateMeasurementRule.getStatus(f.SwitchingAggressiveness.Mid,i/n);return this.getCurrentBitrate(r)},t.prototype.egb=function(e,t,i,n,r){var o=this.Sfb(n,i);return o>t&&o>r&&t<=r+e},t.prototype.fgb=function(e,t,i,n){var r,o;return(null==(o=null==(r=this.Ifb)?void 0:r.isPlay())||!o)&&n>
1Math.max(e,3*function(e){return e.getStatus(5,.2).value.mean}(this.timeToFirstByteMeasurementRule))&&t<=i+e},t.prototype.ggb=function(e,t,i,n){var r,o,a,s=this.Kfb(),u=this.Tfb(e,t,s),c=this.Qfb(e,i),l=null!=(a=null!=(r=e.segmentDuration)?r:null==(o=this.lastSegmentInfo)?void 0:o.segmentDuration)?a:0,d=this.Ofb(u,l,c);if(i?this.egb(l,s,u,e,d):this.fgb(l,s,d,n)){var h=(0,g.hasTotalBytes)(e)?(e.loadedBytes/e.totalBytes*100).toFixed(1):void 0;return this.context.logger.debug("Cancelling download after ".concat(n.toFixed(2),"s, bw: ").concat((0,g.toKbps)(u).toFixed(2),"kbps, buffer: ").concat(s.toFixed(2),"s, ").concat(i?"".concat(h,"% progress"):"headers not received")),this.lastDownloadCancelled=!0,this.lastRateMeasurement=u,!0}return!1},t}(l.BaseAdaptationLogic)},85696:function(e,t,i){var n=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(t,i)};return function(t,i){if("function"!=typeof i&&null!==i)throw TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.DownloadPredictionLogic=void 0;var o=i(13531),a=i(70962),s=i(46151),u=i(88844),c=i(11958),l=i(64463),d=i(43829),h=i(70238),p=i(7676);t.DownloadPredictionLogic=function(e){function t(t,i){var n=e.call(this,t,i)||this;return n.Yeb=new d.DownloadRateRule(n.context,n.monitoringMimeType),n.Zeb=(0,l.BufferFillStateRule)(n.context,n.monitoringMimeType),n}return n(t,e),t.prototype.getRepresentationForRateMeasurement=function(e){void 0===e&&(e=h.SwitchingAggressiveness.Mid);var t=this.context.bufferSettings.getForwardTargetLevel(),i=this.Zeb.getStatus().value,n=this.rateMeasurementRule.getStatus(e,i/t),r=this.getCurrentBitrate(n),o=(0,p.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,p.adjustRateToSafetyMargin)(e,this.context.settings.RATE_SAFETY_MARGIN_PERCENTAGE)},t.prototype.addSample=function(e){this.Yeb.addSample(e),this.Zeb.addSample(e),this.rateMeasurementRule.addSample(),this.timeToFirstByteMeasurementRule.addSample()},t.prototype.aeb=function(e,t,i,n,r){var o=this;if(!e.segmentDuration||this.isStartupBitrateInEffect())return t;this.lastSegmentInfo=e;var a=this.availableRepresentations.filter(function(e){return e._bandwidth<=t._bandwidth});if(0===a.length)return this.availableRepresentations[0];var s=r.value||0,u=this.context.bufferSettings.getForwardTargetLevel(),c=(0,p.adjustRateToSafetyMargin)(i,this.context.settings.RATE_SAFETY_MARGIN_PERCENTAGE),l=a.filter(function(t){var i;return o.isDownloadFeasible(t,c,null!=(i=e.segmentDuration)?i:0,!1,n,s,u)});return 0===l.length?a[0]:l[l.length-1]},t.prototype.beb=function(e,t,i,n){this.checkStartupPhase(t);var r,o,u=this.context.store.getState(),c=null!=(o=null==(r=(u?(0,s.getMetricsState)(u):{}).default)?void 0:r.bufferLogicActivationThreshold)?o:a.DefaultSettings.BUFFER_LOGIC_ACTIVATION_THRESHOLD,l=this.context.bufferSettings.getForwardTargetLevel()>c,d=this.getRepresentationForNormalChange(i,t,l);if(n){var h=this.estimateTimeToFirstByte();d=this.aeb(n,d,e,h,t)}return d},t.prototype.selectRepresentationID=function(e,t){this.updateAvailableRepresentations(t);var i,n,r,a,s=this.rateMeasurementRule.getStatus(),u=this.getCurrentBitrate(s),c=this.Zeb.getStatus(),l=this.Yeb.getStatus(),d=this.beb(u,c,l,e);return this.lastRepresentation&&!(null==(n=null==(i=this.lastRepresentation)?void 0:i._internalId)?void 0:n.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,p.toMbps)(u).toFixed(2)+"mbps",", fillState: ").concat(c.value.toFixed(2),", fillRate: ").concat(l.value.toFixed(2),")")),this.lastRepresentation=d,this.lastRateMeasurement=u,this.lastDownloadCancelled=!1,this.previousRequestProgress=void 0,null==(a=this.lastRepresentation)?void 0:a._internalId},t.prototype.setAdaptationSet=function(e){this.updateAvailableRepresentations(e.Representation),this.lastRepresentation=this.lastRepresentation?r({},this.findRepresentationForBitrate(this.lastRepresentation._bandwidth)):void 0,this.monitoringMimeType=this.getMonitoringMimeType(),this.previousRequestProgress=void 0},t.prototype.setStartupPhase=function(){var e,t,i,n;this.startupPhase=!0,(0,u.clearTimeoutIfDefined)(this.startupPhaseTimerID),this.startupPhaseTimerID=void 0,null==(e=this.Yeb)||e.setStartupPhase(),null==(t=this.Zeb)||t.setStartupPhase(),null==(i=this.rateMeasurementRule)||i.setStartupPhase(),null==(n=this.timeToFirstByteMeasurementRule)||n.setStartupPhase()},t.prototype.shutdown=function(){var e,t,i,n;(0,u.clearTimeoutIfDefined)(this.startupPhaseTimerID),this.startupPhaseTimerID=void 0,this.lastDownloadCancelled=!1,this.previousRequestProgress=void 0,null==(e=this.Yeb)||e.shutdown(),null==(t=this.Zeb)||t.shutdown(),null==(i=this.rateMeasurementRule)||i.shutdown(),null==(n=this.timeToFirstByteMeasurementRule)||n.shutdown()},t.prototype.dispose=function(){var e,t,i,n;this.shutdown(),null==(e=this.Yeb)||e.dispose(),null==(t=this.Zeb)||t.dispose(),null==(i=this.rateMeasurementRule)||i.dispose(),null==(n=this.timeToFirstByteMeasurementRule)||n.dispose(),this.lastRepresentation=void 0,this.availableRepresentations=[],this.monitoringMimeType=""},t}(c.CancellableAdaptationLogic)}
vendor: 4,576 bytes, line 1
1,76344:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.AdaptationModuleDefinition=void 0;var n=i(62756),r=i(98154),o=i(7676);t.AdaptationModuleDefinition={name:n.ModuleName.ABR,module:function(){return{AdaptationService:i(49541).X,AdaptToPlayerResolution:i(19119).AdaptToPlayerResolution,AdaptationUtils:o,AdaptationApiFactory:r.AdaptationApiFactory}},dependencies:[n.ModuleName.EngineBitmovin]},t.default=t.AdaptationModuleDefinition},19119:function(e,t){function i(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,n){var r,o=function(e,t){var n=t.getVideoElement();if(!n)return null;var r=n.parentElement,o=r&&r.querySelector("#bitmovinplayer-vr-canvas");return e?{width:screen.width*devicePixelRatio,height:screen.height*devicePixelRatio}:i(n)||o&&i(o)||r&&i(r)}(n,e);if(!o)return t;var a=null!=(r=e.getAvailableVideoQualities())?r:[],s=a.find(function(e){return e.id===t});if(!s)return t;var u=function(e,t,i){return e.filter(function(e){var n=e.bitrate<=t,r=function(e,t){var i=t.width/t.height;return e.width/e.height<i?t.width>=e.width:t.height>=e.height}(i,e);return n&&r})}(a,s.bitrate,o);return 0===u.length?t:u[function(e){return Math.max(0,e.findIndex(function(t){return t.width>e[0].width&&t.height>e[0].height})-1)}(u)].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}},59113:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.findQualityForBitrate=function(e,t){if(t&&0!==t.length)return o.invalidate(),t.reduce(function(t,i){var n=o(i),r=o(t);return r>e||n>e?n>r?t:i:n>r?i:t})};var n=i(84568),r=i(43008),o=(0,n.memoize)(function(e){return(0,r.hasBitrate)(e)&&e.bitrate>0?e.bitrate:(0,r.hasBitrateBounds)(e)?(e.maxBitrate+e.minBitrate)/2:0})},17006:function(e,t){function i(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=i,t.calculateStandardDeviation=function(e,t){if(void 0===t&&(t=i(e)),e.length<2)return 0;var n=e.reduce(function(e,i){return e+Math.pow(i-t,2)},0);return Math.sqrt(1/(e.length-1)*n)},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,i,n){return void 0===n&&(n=e.length-1),0===e.length||n<0?0:0===n||0===i?e[n]:i*e[n]+(1-i)*(0,t.calculateExponentialWeightedAverage)(e,i,n-1)}},70238:function(e,t){var i;Object.defineProperty(t,"__esModule",{value:!0}),t.SwitchingAggressiveness=void 0,function(e){e[e.Conservative=10]="Conservative",e[e.VeryLow=8]="VeryLow",e[e.Low=7]="Low",e[e.LowMid=6]="LowMid",e[e.Mid=5]="Mid",e[e.MidHigh=4]="MidHigh",e[e.High=3]="High",e[e.VeryHigh=2]="VeryHigh",e[e.Extreme=1]="Extreme"}(i||(t.SwitchingAggressiveness=i={}))},7676:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.toMbps=t.toKbps=t.findMaximum=t.findMinimum=void 0,t.getMaxStartupBitrateFromConfig=function(e){var t,i=null==(t=e.config)?void 0:t.adaptation;if(!i)return 0;var r=function(e){return e.maxStartupBitrate?n.Util.extractBitrateFromString("max",e.maxStartupBitrate):1/0}(i);return!isNaN(r)&&isFinite(r)?r:0},t.getStartupBitrateFromConfig=function(e){var t,i=null==(t=e.config)?void 0:t.adaptation,r=e.settings;if(!i||!r)return 0;var o=i.startupBitrate||0;if(!o)return 0;var a=function(e,t){return 8+n.Util.extractBitrateFromString("min",e)*(1+t/100)}(o,r.RATE_SAFETY_MARGIN_PERCENTAGE);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 n=i(70850);function r(e,t){return e[e.reduce(function(i,n,r){return t(e[i],e[r])?i:r},0)]}var o=function(e){return e};t.findMinimum=function(e,t){return void 0===t&&(t=o),r(e,function(e,i){return t(e)<t(i)})},t.findMaximum=function(e,t){return void 0===t&&(t=o),r(e,function(e,i){return t(e)>t(i)})},t.toKbps=function(e){return e/1024},t.toMbps=function(e){return e/1048576}},7290:function(e,t,i){var n=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||({__proto__:[]}
1)instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(t,i)};return function(t,i){if("function"!=typeof i&&null!==i)throw TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.WishLogic=void 0;var r=i(44468),o=i(70962),a=i(46151),s=i(33436),u=i(85434),c=i(88844),l=i(11958),d=i(59113),h=i(59406),p=i(70238),f=i(7676),g=i(47577),m=1e-4,y=1e-4;t.WishLogic=function(e){function t(t,i){var n=e.call(this,t,i)||this;return n.context=t,n.mimeType=i,n.deb=[],n.eeb=[],n.feb=0,n.keb(),n.ceb=t.settings.WISH_ABR_PARAMS,n}return n(t,e),Object.defineProperty(t.prototype,"geb",{get:function(){var e,t=u.MimeTypeHelper.isVideo(this.mimeType)?r.MediaType.Video:r.MediaType.Audio,i=null!=(e=this.context.internalPlayer.bufferApi.getLevel(r.BufferType.ForwardDuration,t).level)?e:0;return i>this.context.bufferSettings.getTargetLevel(r.BufferType.ForwardDuration,t)+this.feb?0:i},enumerable:!1,configurable:!0}),t.prototype.keb=function(){var e=this.context.settings.WISH_ABR_PARAMS.BITRATE_MODIFIER_FUNCTION_TYPE,t=this.context.settings.WISH_ABR_PARAMS.TARGET_BUFFER_FACTOR,i=this.context.settings.WISH_ABR_PARAMS.TARGET_BITRATE_FACTOR;if(!["log","linear"].includes(e)){var n=o.WishDefaultConfig.BITRATE_MODIFIER_FUNCTION_TYPE;this.context.logger.warn("WISH: invalid bitrate function type: ".concat(e,", falling back to default (").concat(n,")")),this.context.settings.WISH_ABR_PARAMS.BITRATE_MODIFIER_FUNCTION_TYPE=n}if(t>1||t<m){var r=Math.min(Math.max(t,m),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(i<y){var a=Math.max(i,y);this.context.logger.warn("WISH: invalid delta value: ".concat(i,", falling back to closest valid value: ").concat(a)),this.context.settings.WISH_ABR_PARAMS.TARGET_BITRATE_FACTOR=a}},t.prototype.getRepresentationForRateMeasurement=function(e){void 0===e&&(e=p.SwitchingAggressiveness.Mid);var t=this.context.bufferSettings.getForwardTargetLevel(),i=this.rateMeasurementRule.getStatus(e,this.geb/t),n=this.getCurrentBitrate(i),r=(0,f.adjustRateToSafetyMargin)(n,this.context.settings.RATE_SAFETY_MARGIN_PERCENTAGE);return this.findRepresentationForBitrate(r)},t.prototype.leb=function(){var e=this.context.store.getState();return(e?(0,a.getMetricsHistoryFromInstanceState)(e,this.mimeType,s.MetricType.DownloadInformation):[]).filter(function(e){return!!e.value}).length>2},t.prototype.addSample=function(e){(function(e){return null!=e.segmentDuration})(e)&&(this.rateMeasurementRule.addSample(),this.timeToFirstByteMeasurementRule.addSample(),e.segmentDuration!==this.feb&&(this.feb=e.segmentDuration,this.meb()))},t.prototype.selectRepresentationID=function(e,t){this.updateAvailableRepresentations(t),this.checkStartupPhase({value:this.geb,result:h.Rules.SHOULD_STAY});var i,n=this.oeb(),r=null==(i=n.rep)?void 0:i._internalId,o=n.index;return this.eeb.push(this.deb[o]),this.eeb.length>20&&(this.eeb=this.eeb.slice(-10)),this.lastSegmentInfo=e,this.lastRepresentation=n.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(e){this.availableRepresentations=e.Representation,this.monitoringMimeType=this.getMonitoringMimeType(),this.lastDownloadCancelled=!1,this.previousRequestProgress=void 0;var t=this.getAvailableRepresentations().map(function(e){return(0,f.toKbps)(e._bandwidth)});this.deb=(0,g.applyQualityFunction)(t,this.ceb.BITRATE_MODIFIER_FUNCTION_TYPE),this.meb()},t.prototype.findRepresentationForBitrate=function(e,t){var i,n=(0,d.findQualityForBitrate)(e,this.getAvailableRepresentations().map(function(e){return{rep:e,bitrate:e._bandwidth}}));return null!=(i=null==n?void 0:n.rep)?i: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.monitoringMimeType="",this.deb=[],this.feb=0,this.eeb=[]},t.prototype.meb=function(){if((0,g.canUseWishAlgorithm)(this.deb,this.feb)){var e=this.getAvailableRepresentations().map(function(e){return(0,f.toKbps)(e._bandwidth)}),t=u.MimeTypeHelper.isVideo(this.mimeType)?r.MediaType.Video:r.MediaType.Audio,i=this.context.bufferSettings.getTargetLevel(r.BufferType.ForwardDuration,t);
1this.heb=(0,g.computeAlpha)(this.ceb,e,this.deb,this.feb,i),this.ieb=(0,g.computeBeta)(this.ceb,this.heb,i,this.feb),this.jeb=(0,g.computeGamma)(this.heb,this.ieb)}},t.prototype.neb=function(e,t,i,n){var r=(0,g.determineBandwidthCost)(e._bandwidth,n),o=(0,g.determineBufferCost)(r,this.feb,this.geb),a=(0,g.determineQualityCost)(this.deb,t,i);return this.heb*r+this.ieb*o+this.jeb*a},t.prototype.isStartupBitrateInEffect=function(){var e,t,i=!!(null==(e=this.context.config.adaptation)?void 0:e.startupBitrate),n=!!(null==(t=this.context.config.adaptation)?void 0:t.maxStartupBitrate);return(i||n)&&!this.leb()},t.prototype.oeb=function(){var e=this;if(this.startupPhase&&(this.isStartupBitrateInEffect()||this.ceb.USE_RATE_BASED_SELECTION_ON_SEEKING)){var t=this.getRepresentationForRateMeasurement(),i=this.getAvailableRepresentations().indexOf(t);return{rep:t,index:-1!==i?i:0}}if(this.geb<this.feb||!(0,g.canUseWishAlgorithm)(this.deb,this.feb))return{rep:this.getAvailableRepresentations()[0],index:0};var n=(0,g.getAverageSelectedQuality)(this.eeb,10),r=this.rateMeasurementRule.getStatus(5,.325).value,o=Math.min(r,this.getCurrentBitrate(this.rateMeasurementRule.getStatus())),a=Math.max(1.1*r,this.getAvailableRepresentations()[0]._bandwidth),s=this.getAvailableRepresentations().filter(function(e){return e._bandwidth<=a}).map(function(t,i){return{rep:t,index:i,cost:e.neb(t,i,n,o)}}).sort(function(e,t){return e.cost-t.cost});return{rep:s[0].rep,index:s[0].index}},t}(l.CancellableAdaptationLogic)},47577:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.applyQualityFunction=function(e,t){switch(t){case"linear":var i=e[e.length-1];return e.map(function(e){return e/i});case"log":var n=e[0];return e.map(function(e){return function(e,t){return Math.log(e/t)}(e,n)})}},t.computeAlpha=function(e,t,i,n,r){switch(e.BITRATE_MODIFIER_FUNCTION_TYPE){case"linear":return function(e,t,i,n){var r=e.TARGET_BITRATE_FACTOR;return 1/(1+(e.TARGET_BUFFER_FACTOR*n-i)/i+Math.exp(3-2*t[0]-t[t.length-2])/r)}(e,i,n,r);case"log":return function(e,t,i,n){var r=e.TARGET_BITRATE_FACTOR,o=e.TARGET_BUFFER_FACTOR,a=i,s=t[0],u=t[t.length-1];return 1/(1+(o*n-a)/i+2*u*u/(r*s*t[t.length-2]))}(e,t,n,r)}},t.computeBeta=function(e,t,i,n){return t*((e.TARGET_BUFFER_FACTOR*i-n)/n)},t.computeGamma=function(e,t){return 1-e-t},t.determineBandwidthCost=function(e,t){return t?e/t:1},t.determineBufferCost=function(e,t,i){return i<=t?1/0:t/(i-t)*e},t.determineQualityCost=function(e,t,i){var n=e[e.length-1],r=e[0];return Math.exp(n+i-2*e[t])/Math.exp(2*n-2*r)},t.getAverageSelectedQuality=function(e,t){if(0===e.length)return 0;var i=e.slice(-t);return i.reduce(function(e,t){return e+t})/i.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,r=t-1;r>=0;r--){var o=e[r].value,a=o.downloadRate,s=o.segmentBitrate;if(void 0===s||a<s*n)return{rateBps:a,type:i.Accurate}}return{rateBps:e[t-1].value.downloadRate,type:i.Estimated}}};var i,n=.9;!function(e){e.Accurate="accurate",e.Estimated="estimated"}(i||(t.BandwidthValueType=i={}))},24296:function(e,t,i){var n=this&&this.__spreadArray||function(e,t,i){if(i||2==arguments.length)for(var n,r=0,o=t.length;r<o;r++)!n&&r in t||(n||(n=Array.prototype.slice.call(t,0,r)),n[r]=t[r]);return e.concat(n||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.LowLatencyAbr=void 0;var r=i(80813),o=i(46151),a=i(33436),s=i(59113),u=i(28922),c=i(7676),l=i(82873),d=i(50265),h=i(52902);t.LowLatencyAbr=function(){function e(e,t){this.context=e,this.mimeType=t,this.xeb=new d.RateLimitedCancelCheck}return Object.defineProperty(e.prototype,"yeb",{get:function(){return this.context.serviceManager.get(r.ServiceName.ManifestService,this.context.sourceContext.sourceIdentifier)},enumerable:!1,configurable:!0}),e.prototype.zeb=function(e){for(var t,i=[],r=1;r<arguments.length;r++)i[r-1]=arguments[r];this.context.logger&&(t=this.context.logger).debug.apply(t,n(["[".concat("LL-ABR","][").concat(this.mimeType,"] ").concat(e)
1],i,!1))},e.prototype.Aeb=function(){var e=(0,o.getMetricsHistoryFromInstanceState)(this.context.store.getState(),this.mimeType,a.MetricType.ChunkedDownloadInformation),t=this.Beb();return(0,l.getBandwidth)(e.slice(-t))},e.prototype.Beb=function(){var e;return Math.max(1,Math.ceil(20*(null==(e=this.context.config.adaptation)?void 0:e.qualityStabilityBalance)))},e.prototype.Ceb=function(e){var t,i,n,r,o=null!=(n=null==(i=null==(t=this.yeb)?void 0:t.getAdaptationSet(e))?void 0:i.Representation)?n:[],a=(0,c.getLowestRepresentation)(o);return null!=(r=null==a?void 0:a._internalId.equals(e))&&r},e.prototype.getCurrentBitrateMeasurement=function(){var e,t;return null!=(t=null==(e=this.Aeb())?void 0:e.rateBps)?t:0},e.prototype.getLowestRepresentation=function(){var e,t,i;if(this.web){var n=null!=(i=null==(t=null==(e=this.yeb)?void 0:e.getAdaptationSet(this.web._internalId))?void 0:t.Representation)?i:[];return(0,c.getLowestRepresentation)(n)}},e.prototype.selectRepresentationID=function(e,t){var i,n,r,s;if(t&&0!==t.length){var d,h=this.Aeb();if(this.zeb("current bandwidth",h),!h)return null==(i=(0,c.getLowestRepresentation)(t))?void 0:i._internalId;if(h.type===l.BandwidthValueType.Accurate&&(d=null!=(n=this.findRepresentationForBitrate(h.rateBps,t))?n:void 0,this.zeb("accurate value, selecting ",null==d?void 0:d._bandwidth)),h.type===l.BandwidthValueType.Estimated){var p=null==(r=(0,o.getMetricsLastEntry)((0,o.getMetricsState)(this.context.store.getState()),this.mimeType,a.MetricType.ChunkedDownloadInformation).value)?void 0:r.representationBitrate;void 0!==p&&(d=(0,u.findNextHigherBitrateRepresentation)(t,p),this.zeb("estimated value, currently on ".concat(p,", selecting ").concat(null==d?void 0:d._bandwidth)))}return d?d._internalId:null==(s=(0,c.getLowestRepresentation)(t))?void 0:s._internalId}},e.prototype.findRepresentationForBitrate=function(e,t){if(!t||t.length<1)return null;var i,n,r=null==(i=(0,s.findQualityForBitrate)(e,t.map(function(e){return{rep:e,bitrate:e._bandwidth}})))?void 0:i.rep;return null!=(n=null!=r?r:(0,c.getLowestRepresentation)(t))?n:null},e.prototype.shouldDownloadBeCancelled=function(e,t){if(this.xeb.shouldExecuteCancelCheck(e)){if(this.Ceb(t))return!1;var i=(0,h.shouldCancelDownload)(e);return i&&this.zeb("Cancelling segment download, current download rate is significantly lower than segment bitrate"),i}return!1},e.prototype.addSample=function(e){},e.prototype.setAdaptationSet=function(e){this.web=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.Dgb=0}return e.prototype.shouldExecuteCancelCheck=function(e){if(void 0===e.segmentDuration||void 0===e.elapsedTime)return!1;this.Egb(e)&&(this.Dgb=0);var t=this.Dgb+.2;if(e.elapsedTime>=e.segmentDuration*t){var i=e.elapsedTime/e.segmentDuration;return this.Dgb=.2*Math.floor(i/.2),!0}return!1},e.prototype.Egb=function(e){return e.elapsedTime<this.Dgb*e.segmentDuration},e}()},52902:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.shouldCancelDownload=function(e){var t=e.responseTiming;if(!t)return!1;var i=t.progressTimestamp-t.headersReceivedTimestamp,r=(0,n.bytesToBits)(e.loadedBytes)/i,o=1-(0,n.bytesToBits)(e.loadedBytes)/(e.representationBitrate*e.segmentDuration);return r<e.representationBitrate*o};var n=i(33004)},4865:function(e,t,i){var n=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(t,i)};return function(t,i){if("function"!=typeof i&&null!==i)throw TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.BlockBasedRateMeasurementRule=void 0;var r=i(46151),o=i(33436),a=i(70850),s=i(59406),u=1e6;function c(e){return e/8}t.BlockBasedRateMeasurementRule=function(e){function t(t,i){var n,r,o=e.call(this,t,i)||this,s=t.config;return o.igb=t.settings,o.hgb=i,o.lgb=16e5,null!=(null==(n=s.adaptation)?void 0:n.maxStartupBitrate)&&(o.lgb=a.Util.extractBitrateFromString("max",s.adaptation.maxStartupBitrate)),null!=(null==(r=s.adaptation)?void 0:r.startupBitrate)&&(o.jgb=a.Util.extractBitrateFromString("min",s.adaptation.startupBitrate)),o.mgb={bytes:0,time:0},o.kgb=[],o}return n(t,e),t.calcRateInBps=function(e,t){return 8*e/t},t.prototype.ngb=function(e){var i=this.kgb.pop();if((null==i?void 0:i.bytes)===u&&(this.kgb.push(i),i=void 0),i||(i={bytes:0,time:0,rateInBps:0}),i.bytes+e.bytes<=u){var n=i.bytes+e.bytes,r=i.time+e.time;this.kgb.push({bytes:n,time:r,rateInBps:t.calcRateInBps(n,r)})}else{var o=(u-i.bytes)/e.bytes;i.bytes+=e.bytes*o,i.time+=e.time*o,i.rateInBps=t.calcRateInBps(i.bytes,i.time),this.kgb.push(i);for(var a=e.bytes*(1-o),s=e.time*(1-o);a>u;){var c=s/(a/u);this.kgb.push({bytes:u,time:c,rateInBps:t.calcRateInBps(u,c)}),a-=u,s-=c}this.kgb.push({bytes:a,time:s,rateInBps:t.calcRateInBps(a,s)})}},t.prototype.ogb=function(e){if(e&&!isNaN(e.bytes)){var t=this.mgb;(t.bytes!==e.bytes||t.time!==e.time)&&(this.mgb=e,this.ngb(e),this.kgb.length>40&&this.kgb.shift(),this.rgb())}},t.prototype.pgb=function(e,i){var n,r=-e;null!=i&&(r=-e-i,n=-i);var o=this.kgb.slice(r,n);if(0===o.length)return 0;var a=o.reduce(function(e,t){return{bytes:e.bytes+t.bytes,time:e.time+t.time,rateInBps:e.rateInBps+t.rateInBps}});return a.rateInBps=t.calcRateInBps(a.bytes,a.time),a.rateInBps},t.prototype.qgb=function(){if(null==this.jgb)return null;this.lgb=Number.MAX_VALUE;var e=this.jgb;return e*=1+this.igb.RATE_SAFETY_MARGIN_PERCENTAGE/100,isNaN(e+=8)?null:(this.context.logger.insane("use startup bitrate from configuration ".concat(e)),{bytes:c(e),time:1})},t.prototype.addSample=function(){if(this.instanceState){var e=(0,r.getMetricsState)(this.instanceState),t=(0,r.getMetricsLastEntry
vendor: 4,432 bytes, line 1
1)(e,this.hgb,o.MetricType.DownloadInformation);if(!t||!t.value||!t.value.bytes){var i=this.qgb();if(i&&(t={value:i}),!t||!t.value||!t.value.bytes){t=t||{};var n=this.sgb();n>0&&(t.value={bytes:c(n),time:1})}t&&t.value||(t=(0,r.getMetricsLastEntry)(e,"default",o.MetricType.DownloadInformation));var a=1/0;t&&t.value&&!isNaN(t.value.bytes)&&!isNaN(t.value.time)&&(a=t.value.bytes/t.value.time),a>this.lgb&&(t.value=t.value||{},t.value.bytes=c(this.lgb),t.value.time=1)}this.ogb(t.value)}},t.prototype.getStatus=function(e){0===this.kgb.length&&this.addSample();var t=this.pgb(e),i=this.pgb(e,1);return{value:t,result:t>1.1*i?s.Rules.SHOULD_SWITCH_UP:t<.9*i?s.Rules.SHOULD_SWITCH_DOWN:s.Rules.SHOULD_STAY}},t.prototype.rgb=function(){if(this.instanceState){var e=(0,r.getMetricsHistoryFromInstanceState)(this.instanceState,this.hgb,o.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.sgb=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}(s.AdaptationRule)},20066:function(e,t,i){var n=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(t,i)};return function(t,i){if("function"!=typeof i&&null!==i)throw TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.BufferFillRateRule=void 0;var r=i(89927),o=i(88844),a=i(59406);t.BufferFillRateRule=function(e){function t(t,i){var n=e.call(this,t,i)||this;return n.tgb=t.bufferSettings,n.ugb=!0,n.wgb=[],n}return n(t,e),t.prototype.xgb=function(){if(0===this.wgb.length)return NaN;var e=this.wgb[this.wgb.length-1],t=e.bufferTargetLevel;if(this.ugb){var i=e.bufferLevel,n=this.wgb[this.wgb.length-2],r=0;n&&(r=n.bufferLevel),i>=e.bufferTargetLevel||r>i?(this.logger.insane("startup phase is over"),this.ugb=!1):t=i}return t},t.prototype.ygb=function(e){isNaN(e)&&(e=this.tgb.getForwardTargetLevel());for(var t,i=Date.now()-(0,r.toMilliSeconds)(e),n=0,o=0,a=0;a<this.wgb.length;a++)(t=this.wgb[a]).timestamp>=i&&(n+=t.bufferLevel-o),o=t.bufferLevel;return((n/=this.xgb())<-1||n>1)&&this.logger.insane("buffer is changing too fast, fill rate should be between -1 and 1, but is "+n),isNaN(n)?1:n},t.prototype.addSample=function(e){var t=this;this.vgb||(this.vgb=window.setTimeout(function(){t.logger.insane("buffer fill rate startup phase is over (timeout)"),t.ugb=!1},(0,r.toMilliSeconds)(this.tgb.getForwardTargetLevel()))),this.wgb.push(e),e.timestamp-this.wgb[0].timestamp>6e4&&this.wgb.shift()},t.prototype.getStatus=function(e){var t=this.ygb(e),i=a.Rules.SHOULD_STAY;return t>.7?i=a.Rules.SHOULD_SWITCH_UP:t<-.5&&(i=a.Rules.SHOULD_SWITCH_DOWN),{value:t,result:i}},t.prototype.setStartupPhase=function(){this.ugb=!0},t.prototype.shutdown=function(){(0,o.clearTimeoutIfDefined)(this.vgb),this.vgb=void 0},t.prototype.dispose=function(){this.shutdown(),this.wgb=[]},t}(a.AdaptationRule)},64463:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.BufferFillStateRule=function(e,t){var i,s,u=!0,c={timestamp:Date.now(),bufferTargetLevel:(null==(i=n.DefaultSettings.TARGET_BUFFER_LEVEL.video)?void 0:i.forwardduration)||0,bufferLevel:0},l=function(){(0,o.clearTimeoutIfDefined)(s),s=void 0};return{addSample:function(t){s||(s=window.setTimeout(function(){u=!1},(0,r.toMilliSeconds)(e.bufferSettings.getForwardTargetLevel()))),c=t},getStatus:function(){var e;return c.bufferLevel>.8*c.bufferTargetLevel?(e=a.Rules.SHOULD_SWITCH_UP,u&&(u=!1,(0,o.clearTimeoutIfDefined)(s))):e=c.bufferLevel<.4*c.bufferTargetLevel?a.Rules.SHOULD_SWITCH_DOWN:a.Rules.SHOULD_STAY,u&&(e=a.Rules.SHOULD_STAY),{value:c.bufferLevel,result:e}},setStartupPhase:function(){u=!0},shutdown:l,dispose:function(){l()}}};var n=i(70962),r=i(89927),o=i(88844),a=i(59406)},43829:function(e,t,i){var n=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||({__proto__:[]}
1)instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(t,i)};return function(t,i){if("function"!=typeof i&&null!==i)throw TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.DownloadRateRule=void 0;var r=i(89927),o=i(59406);t.DownloadRateRule=function(e){function t(t,i){var n=e.call(this,t,i)||this;return n.zgb=[],n}return n(t,e),t.prototype.Agb=function(e){void 0===e&&(e=this.context.bufferSettings.getForwardTargetLevel());var t=Date.now()-(0,r.toMilliSeconds)(e),i=this.zgb.filter(function(e){return e.timestamp>=t});if(0===i.length)return 1;var n=0;return i.forEach(function(e,t){var o=i[t-1],a=e.segmentDuration,s=a/8,u=Math.min(e.bufferLevel/e.bufferTargetLevel,1),c=Math.max(e.segmentDownloadDuration,s),l=a/c*u+a/(o?Math.max(e.timestamp-o.timestamp,s):(0,r.toMilliSeconds)(Math.max(a,c)))*(1-u);n=e.downloadCancelled?n-l:n+l}),n/i.length},t.prototype.addSample=function(e){(function(e){return null!=e.segmentDuration&&null!=e.segmentDownloadDuration})(e)&&(this.zgb.push(e),e.timestamp-this.zgb[0].timestamp>6e4&&this.zgb.shift())},t.prototype.getStatus=function(e,t){var i=this.Agb(e),n=o.Rules.SHOULD_STAY;return i>1.7?n=o.Rules.SHOULD_SWITCH_UP:i<.5&&(n=o.Rules.SHOULD_SWITCH_DOWN),{value:i,result:n}},t.prototype.setStartupPhase=function(){},t.prototype.shutdown=function(){},t.prototype.dispose=function(){this.shutdown(),this.zgb=[]},t}(o.AdaptationRule)},59406:function(e,t){var i;Object.defineProperty(t,"__esModule",{value:!0}),t.AdaptationRule=t.Rules=void 0,function(e){e.SHOULD_SWITCH_UP="SWITCH_UP",e.SHOULD_STAY="STAY",e.SHOULD_SWITCH_DOWN="SWITCH_DOWN"}(i||(t.Rules=i={})),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,i){return this.getStatus(t,i)},e}()},39185:function(e,t,i){var n=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(t,i)};return function(t,i){if("function"!=typeof i&&null!==i)throw TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.SegmentBasedRateMeasurementRule=void 0;var r=i(46151),o=i(33436),a=i(89927),s=i(70850),u=i(17006),c=i(7676),l=i(59406);function d(e){return e.transferSize>0&&!/^https?:\/\/localhost(:\d+)?(\/|$)/.test(e.name)}function h(e,t){void 0===t&&(t=1/0);var i,n=e.value.time-(null!=(i=e.value.timeToFirstByte)?i:0);return p(8*e.value.bytes/n,t)}function p(e,t){return Math.min(e,s.Util.extractBitrateFromString("max",t))}t.SegmentBasedRateMeasurementRule=function(e){function t(t,i){var n=e.call(this,t,i)||this;return n.Xgb=-1,n.Ygb=.1,n.Zgb=!0,n}return n(t,e),t.getBitrateFromPerformanceAPI=function(){if(!performance||"function"!=typeof performance.getEntriesByName)return 0;var e=0,t=0;return performance.getEntriesByType("resource").filter(d).forEach(function(i){e+=8*i.transferSize,t+=(0,a.toSeconds)(i.duration-(i.responseStart-i.requestStart))}),e>0&&t>0?e/t:0},t.prototype.agb=function(e,t,i){void 0===t&&(t=1),void 0===i&&(i=0);var n,r=-e-i;return n=0!==i?this.samples.slice(r,-i):this.samples.slice(r),(0,u.calculateExponentialWeightedAverage)(n,1-t)},t.validateDownloadInfo=function(e){if(e&&e.value){var t=!!e.value.bytes,i=!isNaN(e.value.time),n=void 0!==e.value.timeToFirstByte&&!isNaN(e.value.timeToFirstByte);return t&&i&&n}return!1},t.prototype.bgb=function(e){if(!this.instanceState)return 0;
vendor: 4,139 bytes, line 1
1var i=(0,r.getMetricsLastEntry)((0,r.getMetricsState)(this.instanceState),e,o.MetricType.DownloadInformation),n=t.validateDownloadInfo(i),a=n&&this.Xgb<i.time;return a&&isFinite(i.time)&&(this.Xgb=i.time),n&&a?h(i,this.context.settings.MAX_ALLOWED_BANDWIDTH_ESTIMATION):n&&!a?-1:0},t.prototype.cgb=function(){var e=[],i=this.ohb();i>0&&e.push(i);var n=this.bgb("default");n>0&&e.push(n);var r=Math.min.apply(Math,e);return r>0&&isFinite(r)?r:t.getBitrateFromPerformanceAPI()},t.prototype.addSample=function(){var e=this.bgb(this.mimeType),t=0;this.Zgb&&(t=function(e,t){var i=(0,c.getStartupBitrateFromConfig)(e),n=(0,c.getMaxStartupBitrateFromConfig)(e);return n=t>0?Math.min(n,t):n,i||n||0}(this.context,e),this.Zgb=!1),0===(t=t||e||0)&&(t=this.cgb()),t>0&&(this.samples.push(t),this.samples.length>this.maxHistorySize&&this.samples.splice(0,this.samples.length-this.maxHistorySize)),e>0&&this.dgb()},t.prototype.getStatus=function(e,t){void 0===e&&(e=1),void 0===t&&(t=1),0===this.samples.length&&this.addSample();var i=this.agb(e,t),n=this.agb(e,t,1);return{value:i,result:i>n*(1+this.Ygb)?l.Rules.SHOULD_SWITCH_UP:i<n*(1-this.Ygb)?l.Rules.SHOULD_SWITCH_DOWN:l.Rules.SHOULD_STAY}},t.prototype.dgb=function(){if(this.instanceState){var e=(0,r.getMetricsHistoryFromInstanceState)(this.instanceState,this.mimeType,o.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.ohb=function(){var e=this,t=(this.context.storedConfig.get("b")||[]).map(function(t){return p(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}(l.AdaptationRule)},45199:function(e,t,i){var n=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(t,i)};return function(t,i){if("function"!=typeof i&&null!==i)throw TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),r=this&&this.__spreadArray||function(e,t,i){if(i||2==arguments.length)for(var n,r=0,o=t.length;r<o;r++)!n&&r in t||(n||(n=Array.prototype.slice.call(t,0,r)),n[r]=t[r]);return e.concat(n||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.TimeToFirstByteMeasurementRule=void 0;var o=i(46151),a=i(33436),s=i(17006),u=i(59406);t.TimeToFirstByteMeasurementRule=function(e){function t(t,i){var n=e.call(this,t,i)||this;return n.phb=-1,n}return n(t,e),t.prototype.qhb=function(e){if(!this.instanceState)return 0;var t=(0,o.getMetricsLastEntry)((0,o.getMetricsState)(this.instanceState),e,a.MetricType.DownloadInformation),i=!!t&&!!t.value,n=i&&void 0!==t.value.timeToFirstByte&&!isNaN(t.value.timeToFirstByte),r=i&&this.phb<t.time;return r&&isFinite(t.time)&&(this.phb=t.time),n&&r?t.value.timeToFirstByte:n&&!r?-1:0},t.prototype.addSample=function(){var e=this.qhb(this.mimeType),t=this.qhb("default"),i=e||t||0;if(i>0)for(this.samples.push(i);this.samples.length>this.maxHistorySize;)this.samples.shift()},t.prototype.rhb=function(e){var t=-e;return e>0?this.samples.slice(t):[]},t.prototype.shb=function(e,t){var i=(0,s.calculateMean)(e),n=(0,s.calculateExponentialWeightedAverage)(e,t),r=(0,s.calculateStandardDeviation)(e,i);return{value:{median:(0,s.calculateMedian)(e),mean:i,weightedAverage:n,standardDeviation:r},result:u.Rules.SHOULD_STAY}},t.prototype.getStatus=function(e,t){return void 0===e&&(e=1),void 0===t&&(t=1),this.shb(this.rhb(e),t)},t.prototype.estimateStatus=function(e,t,i){void 0===t&&(t=1),void 0===i&&(i=1);var n=r(r([],this.rhb(t-1),!0),[e],!1);return this.shb(n,i)},t.prototype.setStartupPhase=function(){},t.prototype.shutdown=function(){},t.prototype.dispose=function(){},t}(u.AdaptationRule)}
1,28922:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.findNextHigherBitrateRepresentation=function(e,t){for(var i,n,r=0,o=e;r<o.length;r++){var a=o[r];a._bandwidth>t&&(void 0===i||a._bandwidth<i._bandwidth)&&(i=a),(void 0===n||a._bandwidth>n._bandwidth)&&(n=a)}return null!=i?i:n}},83429:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.getUserSelectedRepresentation=function(e,t,i,a){var s,u,c,l=function(e,t){return r.MimeTypeHelper.isAudio(e)?null==t?void 0:t.onAudioAdaptation:r.MimeTypeHelper.isVideo(e)?null==t?void 0:t.onVideoAdaptation:void 0}(t,e.config.adaptation);if(l){var d=e.serviceManager.maybeCall(n.ServiceName.ManifestService,function(e){return e.getAdaptationSet(i)},null,e.sourceContext.sourceIdentifier),h=null!=(s=null==d?void 0:d.Representation.map(function(e){return{bandwidth:e._bandwidth,id:e._id}}))?s:[],p={suggested:a.representationId,isAd:e.sourceContext.isAd,representations:h},f=null!=(u=(0,o.safeUserCallback)(function(){return l(p)},e.logger))?u:void 0;return f&&(null==(c=e.logger)||c.debug("[".concat(t,"] user has overridden adaptation suggestion! suggested: ").concat(a.representationId,", user: ")+"".concat(f))),function(e,t,i){return e.serviceManager.maybeCall(n.ServiceName.ManifestService,function(e){return t&&e.getRepresentation(t,i)},void 0,e.sourceContext.sourceIdentifier)||void 0}(e,i,f)}};var n=i(80813),r=i(85434),o=i(70850)}},function(e){return e(e.s=76344)}])},869:function(e){"use strict";self,e.exports=(self.webpackChunkbitmovin_player=self.webpackChunkbitmovin_player||[]).push([[561],{28610:function(e,t){var i;Object.defineProperty(t,"__esModule",{value:!0}),t.VmapTrackingEventType=void 0,function(e){e.BreakStart="breakstart",e.BreakEnd="breakend",e.Error="error"}(i||(t.VmapTrackingEventType=i={}))},45392:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.AdManifestHelper=void 0,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 n=i(70850),r=i(95217),o=i(88457),a=i(60326),s=i(47091);t.AdManifestHelper=function(){function e(){}return e.setLoader=function(t){e.loader=t},e.setVideoLoadTimeout=function(t){e.videoLoadTimeout=t},e.setWithCredentials=function(t){e.withCredentials=t},e.setDisableStorage=function(t){e.disableStorage=t},e.downloadVastManifest=function(t){return e.domParser||(e.domParser=new DOMParser),e.loader.load(t,void 0,void 0,void 0,void 0,e.withCredentials).catch(function(){return Promise.reject({code:o.AdvertisingModuleErrorCode.COULD_NOT_LOAD_AD_MANIFEST})}).then(function(t){if(!t.body)return Promise.reject({code:s.VastErrorCode.XML_PARSING_ERROR});var i,n=e.domParser.parseFromString(t.body,"text/xml"),r=null==(i=n.childNodes[0].childNodes[0])?void 0:i.nodeName.includes("Error"),a=void 0===r||r,u=n.childNodes[0].nodeName.includes("error");return n.childNodes[0].nodeName.includes("VMAP")?Promise.reject({code:o.AdvertisingModuleErrorCode.AD_TAG_TYPE_NOT_MATCHING}):a?Promise.reject({code:s.VastErrorCode.NO_ADS_VAST_RESPONSE}):u?Promise.reject({code:s.VastErrorCode.XML_PARSING_ERROR}):Promise.resolve({manifest:n,downloadTiming:{downloadTime:t.elapsedTime,timeToFirstByte:t.timeToFirstByte}})})},e.downloadVmapManifest=function(t){return e.loader.load(t,void 0,void 0,void 0,void 0,e.withCredentials)},e.parseAdVerifications=function(t){return e.vastClientWrapper||(e.vastClientWrapper=new a.VastClientWrapper(e.videoLoadTimeout,e.withCredentials,e.disableStorage)),e.vastClientWrapper.parseManifest(t,!1).then(function(e){return e.ads.length<1?Promise.resolve([]):Promise.resolve(e.ads.map(function(e){return{id:e.id||"adVerification-"+n.Util.generateUniqueId(),verifications:e.verifications}}))}).catch(function(e){return Promise.resolve([])})},e.xmlToString=function(e){return(new XMLSerializer).serializeToString(e.documentElement)},e.toDataUri=function(e){return"data:text/xml,"+encodeURIComponent(e)},e}()},63524:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.AdPlaybackFactory=void 0;var n=i(60937),r=i(52448);t.AdPlaybackFactory=function(){function e(){}return e.create=function(e,t){var i=!1,o=function(){i=!1},a=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 s(){}return s.prototype.requestPlayer=function(){return i?a("AdPlayerAPI"):(i=!0,Promise.resolve(r.AdPlayerFactory.createAdPlayer(e,o)))},s.prototype.requestReporter=function(){return i?a("AdPlaybackReportingAPI"):(i=!0,Promise.resolve(new n.AdPlaybackReporter(e,o)))},s.prototype.done=function(e){return void 0===e&&(e=!0),t(e)},s}())},e}()}
vendor: 12,190 bytes, line 1
1,60937:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.AdPlaybackReporter=void 0;var n=i(3714),r=i(75375),o=i(19483);t.AdPlaybackReporter=function(e,t){var i=this,a=new o.ArrayMap;this.videoElement=e.getVideoElement();var s=!1,u=function(){if(s)throw"AdPlaybackReporter is no longer usable. Request a new one."},c=this.videoElement.addEventListener;this.videoElement.addEventListener=function(e,t,n){a.add(e,t),c.apply(i.videoElement,[e,t,n])},this.started=function(t){if(u(),i.d2)throw"Ad playback is already in progress. A new one can not be started.";i.d2=t,i.e2=!1,e.hasCurrentSourcePlayedOnce()||e.fireEvent(n.PlayerEvent.Playing,{time:e.getCurrentTime(),issuer:r.ADVERTISING_ISSUER_NAME}),e.fireEvent(n.PlayerEvent.AdStarted,{ad:t})},this.paused=function(t){u(),e.fireEvent(n.PlayerEvent.Paused,{time:t,issuer:r.ADVERTISING_ISSUER_NAME})},this.resumed=function(t){u(),e.fireEvent(n.PlayerEvent.Play,{time:t,issuer:r.ADVERTISING_ISSUER_NAME}),e.fireEvent(n.PlayerEvent.Playing,{time:t,issuer:r.ADVERTISING_ISSUER_NAME})},this.timeupdate=function(t){u(),e.fireEvent(n.PlayerEvent.TimeChanged,{time:t,issuer:r.ADVERTISING_ISSUER_NAME})},this.skipped=function(){i.e2||(u(),e.fireEvent(n.PlayerEvent.AdSkipped,{ad:i.d2}),i.e2=!0,i.d2=null)},this.done=function(){return u(),a.forAll(function(e,t){i.videoElement.removeEventListener(e,t),i.videoElement.addEventListener=c}),!i.e2&&i.d2&&e.fireEvent(n.PlayerEvent.AdFinished,{ad:i.d2}),i.d2=null,t(),s=!0,Promise.resolve()}}},43255:function(e,t,i){var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])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=i(40306),o=i(80813),a=i(3714),s=i(51289),u=i(90408),c=i(20213),l=i(75375),d=i(18192),h=i(94685),p=i(41138),f=i(63524),g=i(65185),m=i(85939),y=i(47091);t.AdPlayerDelegate=function(){function e(t){var i,h=t.internalPlayer,p=new m.PlayerStateStore(t.context,h),v=Promise.resolve(),E=!1,T=!1,_=!1,A={width:0,height:0},P=[],M=function(e){e.code===c.WarningCode.PLAYBACK_COULD_NOT_BE_STARTED&&(T=!0)};h.onInternal(a.PlayerEvent.PlayerResized,function(e){A={width:S(e.width),height:S(e.height)}});var I=function(){T=!1};this.getVideoElement=function(){return h.getVideoElement()},this.getVolume=function(){return h.isMuted()?0:h.getVolume()},this.parsePosition=function(t){var i;return i=p.hasStoredState()?p.getStoredState().contentDuration:h.getDuration(),e.parsePosition(t,i)},this.selectMediaFile=function(e){var i=e.every(function(e){return e.bitrate||e.minBitrate&&e.maxBitrate}),n=h.getDownloadedVideoData(),r=h.getDownloadedAudioData(),a=!!(r&&n&&n.bitrate>0),s=t.context.serviceManager.get(o.ServiceName.AdaptationService);return i&&(s||a)?R(e,[n,r],s):function(e,t,i){return i&&i.width>0?(0,g.findMediaFileByResolution)(i.width,i.height,e):(0,g.findMediaFileByResolution)(t.width,t.height,e)}(e,A,n)};var R=function(e,t,i){var n=t[0],r=t[1];return i?i.selectQualityBasedOnBitrateMeasurement(e):(0,g.findMediaFileByBitrate)(n.bitrate+r.bitrate,e)};this.metadataLoaded=function(e,t){var i={adBreak:null,downloadTiming:t};e.hasOwnProperty("scheduleTime")&&(i.adBreak=e),i.adConfig=e,h.fireEvent(a.PlayerEvent.AdManifestLoaded,i)};var C=function(){P.forEach(function(e){return h.fireEvent(a.PlayerEvent.Error,{type:a.PlayerEvent.Error,code:e.code,name:e.name,message:e.message,data:e.data,troubleShootLink:(0,s.generateTroubleshootUrl)(e.code)})})},O=function(e){if(!p.hasStoredState())return Promise.resolve();var n=p.getStoredState().contentDuration,s=Promise.resolve();return E=!e,e&&(s=v=(P.length?(h.removeExternalEventFilter(w),p.clear(),h.off(a.PlayerEvent.Warning,M),h.off(a.PlayerEvent.Playing,I),h.unload().then(C)):(h.fireEvent(a.PlayerEvent.RestoringContent),h.addExternalEventFilter(L),p.restore(l.ADVERTISING_RESTORE_ISSUER_NAME).then(function(e){if(h.removeExternalEventFilter(w),P.length)throw Error("Background errors occurred during ad break");if(T)T=!1;else{if(e)return h.play(l.ADVERTISING_ISSUER_NAME).catch(function(e){_=!0,t.context.logger.debug("Unable to start playback after restoring the content after an ad break:",e)});var i=t.context.serviceManager.get(o.ServiceName.PlayerStateService);null==i||i.transitionToStoppedState()}}).catch(function(){P.length?C():h.fireEvent(a.PlayerEvent.Error,{code:r.ErrorCode.UNKNOWN})}).finally(function(){p.clear(),h.removeExternalEventFilter(L),h.off(a.PlayerEvent.Warning,M),h.off(a.PlayerEvent.Playing,I)}))).then(function(){t.restoreContentDeferred&&t.restoreContentDeferred.resolve()})),s.then(function(){var r=i?{adBreak:i}:void 0;h.fireEvent(a.PlayerEvent.AdBreakFinished,r),i=null,e&&(0,u.maybeFireDurationChangedEvent)(n,h.getDuration(),t.context.eventHandler),h.hasCurrentSourcePlayedOnce()||_||h.fireEvent(a.PlayerEvent.Playing,{time:h.getCurrentTime(),issuer:l.ADVERTISING_ISSUER_NAME}),_=!1})},D=[a.PlayerEvent.Error,a.PlayerEvent.SourceLoaded,a.PlayerEvent.SourceUnloaded,a.PlayerEvent.PlaybackFinished,a.PlayerEvent.Ready],w=function(e,i){var n=function(){var e=t.context.store.getState();return(null==e?void 0:e.sources)&&Object.keys(e.sources).find(function(t){var i;return e.sources&&e.sources[t]&&(null==(i=e.sources[t].playback)?void 0:i.kind)===d.PlaybackKind.Background})}();return b(e,i)&&n&&i.sourceIdentifier===n&&P.push(i),!D.includes(e)},N=[a.PlayerEvent.Play,a.PlayerEvent.Playing,a.PlayerEvent.Seek,a.PlayerEvent.Seeked,a.PlayerEvent.TimeShift,a.PlayerEvent.TimeShifted],L=function(e){return!N.includes(e)};this.requestAdPlayback=function(e){return i?Promise.reject("Ad break already in progress"):(i=e,v.then(function(){var t=E?Promise.resolve():k(e),i={adBreak:n(n({},JSON.parse(JSON.stringify(e))),{scheduleTime:e.scheduleTime})};return h.fireEvent(a.PlayerEvent.AdBreakStarted,i),h.onInternal(a.PlayerEvent.Warning,M),h.onInternal(a.PlayerEvent.Playing,I),t.then(function(){return h.unload(l.ADVERTISING_ISSUER_NAME)}).then(function(){return f.AdPlaybackFactory.create(h,O)})}))},this.updateAdRestoreState=function(e){i&&p.setAdRestoreState(e)};var k=function(i){var n=t.context,r=n.sourceContext.sourceIdentifier,a=n.adRestorationOptimizationService,s=n.serviceManager.get(o.ServiceName.ManifestService,r),u=a&&n.settings.OPTIMIZE_AD_RESTORATION,c=e.getAdBreakDuration(i),d=i.replaceContentDuration;return p.capturePlayerState(l.ADVERTISING_ISSUER_NAME),p.setAdRestoreState({adBreakDuration:c,replaceContentDuration:d}),h.addExternalEventFilter(w),u&&s&&!s.isLive()?a.optimizeRestorationAfterUpcomingAdBreak():Promise.resolve()};this.overlayAdStarted=function(e){h.fireEvent(a.PlayerEvent.OverlayAdStarted,{ad:e})},this.adClicked=function(e){h.fireEvent(a.PlayerEvent.AdClicked,{clickThroughUrl:e})},this.adInteraction=function(e,t){h.fireEvent(a.PlayerEvent.AdInteraction,{interactionType:e,id:t})},this.onQuartile=function(e){h.fireEvent(a.PlayerEvent.AdQuartile,{quartile:e})},this.onError=function(e,t,i){var n={code:e||y.VastErrorCode.UNDEFINED_ERROR};t&&(n.message=t),i&&(n.adConfig=i),h.fireEvent(a.PlayerEvent.AdError,{code:r.ErrorCode.MODULE_ADVERTISING_ERROR,data:n,name:r.ErrorCode[r.ErrorCode.MODULE_ADVERTISING_ERROR],message:t,troubleShootLink:(0,s.generateTroubleshootUrl)(r.ErrorCode.MODULE_ADVERTISING_ERROR)})},this.onWarning=function(e,t,i){h.fireEvent(a.PlayerEvent.Warning,new c.PlayerWarning(e,t,i))},this.reset=function(){var t=h.getVideoElement();E=!1,T=!1,p.clear(),h.removeExternalEventFilter(w),h.removeExternalEventFilter(L),i=null,t instanceof HTMLVideoElement&&e.clearVideoElement(t)}}return e.getAdBreakDuration=function(e){var t,i,n=e.totalPlannedDuration;return null!=n?n:null!=(i=null==(t=e.ads)?void 0:t.reduce(function(e,t){var i;return e+(t.isLinear&&null!=(i=t.duration)?i:0)},0))?i:0},e.parsePosition=function(e,t){var i=Number(e);return!isNaN(i)&&i<=0&&(e="pre"),e.includes("pre")||"0%"===e?0:e.includes("post")?1/0:this.parseNumericalPosition(e,t)},e.parseNumericalPosition=function(e,t){var i;if(/%/.test(e)){if(!t)return NaN;i=parseFloat(e=e.replace(/%/gi,""))/100*t}else if(e.indexOf(":")>-1){var n=e.split(":");i=3600*parseFloat(n[0])+60*parseFloat(n[1])+parseFloat(n[2])}else i=parseFloat(e);return i>=0?i:NaN},e.clearVideoElement=function(e){p.VideoElementUtil.removeSource(e),e.load()},e}();var v=/(\d+)/;function S(e){return Number(e.match(v)?e.match(v)[0]:0)}var b=function(e,t){return e===a.PlayerEvent.Error&&(0,h.isObject)(t)}},52448:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.AdPlayerFactory=t.DEFAULT_AD_PLAYBACK_RATE=void 0;var n=i(40306),r=i(3714),o=i(75375),a=i(19483),s=i(85434),u=i(6365),c=i(7581);t.DEFAULT_AD_PLAYBACK_RATE=1;var l=function(){function e(){}return e.createAdPlayer=function(e,i){var l,d=new a.ArrayMap,h=!1,p=!1,f=[r.PlayerEvent.Play,r.PlayerEvent.Playing],g=function(){if(p)throw"AdPlayer is no longer usable. Request a new one."};return new(function(){function a(){this.adPlaybackStartEventFilter=function(t){return!e.hasCurrentSourcePlayedOnce()||!f.includes(t)}}return a.prototype.done=function(){g();var t=Promise.resolve();return h?t=e.unload(o.ADVERTISING_ISSUER_NAME):e.hasEnded()?function(e,t){e.fireEvent(r.PlayerEvent.AdFinished,{ad:t})}(e,l):function(e,t){e.fireEvent(r.PlayerEvent.AdSkipped,{ad:t})}(e,l),l=null,d.forAll(function(t,i){e.off(t,i)}),i(),p=!0,h=!1,t},a.prototype.on=function(t,i){g(),d.add(t,i),e.onInternal(t,i)},a.prototype.pause=function(){g(),e.pause(o.ADVERTISING_ISSUER_NAME)},a.prototype.play=function(){return g(),e.play(o.ADVERTISING_ISSUER_NAME)},a.prototype.load=function(i,a){var d=this;return g(),l=i,e.addExternalEventFilter(this.adPlaybackStartEventFilter),h=!0,e.load(function(e){return e.data.delivery===u.MediaFileDeliveryType.Streaming?s.MimeTypeHelper.isDash(e.data.mimeType)?{dash:e.mediaFileUrl}:{hls:e.mediaFileUrl}:{progressive:e.mediaFileUrl}}(i),void 0,null!=a?a:{seeking:!0},o.ADVERTISING_ISSUER_NAME).then(function(){return e.setPlaybackSpeed(t.DEFAULT_AD_PLAYBACK_RATE)}).then(function(){return e.play(o.ADVERTISING_ISSUER_NAME).catch(function(){})}).then(function(){h&&e.fireEvent(r.PlayerEvent.AdStarted,{ad:i})}).catch(function(t){if(t&&t.code===n.ErrorCode.MODULE_MISSING)throw{code:c.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(d.adPlaybackStartEventFilter),h=!1})},Object.defineProperty(a.prototype,"duration",{get:function(){return g(),e.getDuration(o.ADVERTISING_ISSUER_NAME)},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"currentTime",{get:function(){return g(),e.getCurrentTime(o.ADVERTISING_ISSUER_NAME)},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"volume",{get:function(){return g(),e.getVolume()},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"muted",{get:function(){return g(),e.isMuted()},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"paused",{get:function(){g();var t=e.isContentPaused(),i=e.isContentPlaying();return!1===t&&!1===i||t},enumerable:!1,configurable:!0}),a}())},e}();t.AdPlayerFactory=l},95217:function(e,t){var i;Object.defineProperty(t,"__esModule",{value:!0}),t.AdTrackingEvent=void 0,t.pingUrl=function(e){(new Image).src=e},function(e){e.FirstQuartile="firstQuartile",e.Midpoint="midpoint",e.ThirdQuartile="thirdQuartile"}(i||(t.AdTrackingEvent=i={}))},90176:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.AdvertisingController=t.adTagPlaceholderDefaults=void 0,t.applyModuleSpecificConfig=v,t.createPlayerAdvertisingApi=S;var n=i(4224),r=i(3714),o=i(4129),a=i(29669),s=i(44468),u=i(87827),c=i(93204),l=i(94685),d=i(34841),h=i(88844),p=i(70850),f=i(88052),g=i(62756),m=i(45392),y={videoLoadTimeout:i(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})]}}};
1function v(e,t,i){if(f.ModuleManager.get(g.ModuleName.Advertising).bitmovinMarker)return i.debug("Using Bitmovin Advertising Module"),void function(e,t){var i=t;e.playback&&Array.isArray(e.playback.preferredTech)?i.preferredTechnology=e.playback.preferredTech:i.preferredTechnology=[]}(e,t);f.ModuleManager.get(g.ModuleName.Advertising).imaMarker&&(i.debug("Using IMA Advertising Module"),function(e,t){var i=t;i.sdkUrl||(i.sdkUrl=e.location.google_ima)}(e,t))}function S(e,t){return new(function(){function i(){}return i.prototype.schedule=function(t){return e.scheduleAd(t)},i.prototype.skip=function(){return t.skip()},i.prototype.list=function(){return t.list()},i.prototype.getActiveAdBreak=function(){return t.getActiveAdBreak()},i.prototype.getActiveAd=function(){return t.getActiveAd()},i.prototype.discardAdBreak=function(e){t.discardAdBreak(e)},i.prototype.isLinearAdActive=function(){return t.isLinearAdActive()},i.prototype.getModuleInfo=function(){return t.getModuleInfo()},i}())}function b(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 i=this;this.context=t,this.Mf=function(e){i.Cf.isCastingToCAF()||i.If.onTimeChanged(e.time)},this.Nf=function(e){return i.If.onSeek(e.position,e.seekTarget)},this.Of=function(e){return i.Lf=e.position},this.Pf=function(){return i.Nf({position:i.Lf,seekTarget:i.Cf.getCurrentTime()})},this.Qf=function(e){i.Hf&&e.code===n.WarningCode.PLAYBACK_COULD_NOT_BE_STARTED&&(i.Hf=!1)},this.onVolumeChanged=function(e){return i.If.onVolumeChanged(e)},this.Rf=function(){i.Ef.length>0&&i.Tf(i.Ef.splice(0,i.Ef.length)),i.Cf.off(r.PlayerEvent.SourceLoaded,i.Rf)},this.onPlayerResize=function(e,t){i.If.onResize(e,t,i.Cf.getViewMode()===s.ViewMode.Fullscreen)};var u=e.getConfig(!0);this.Df=u.advertising||{},this.Cf=e,this.Ef=[],this.Ff=null,this.Gf=!0,this.Hf=!1;var c=function(e,t){var i,n,r={},o={};return p.Util.deepCopy(o,e),delete o.adBreaks,p.Util.deepCopyMulti(r,y,o),r.hasOwnProperty("withCredentials")||(r.withCredentials=!0),r.hasOwnProperty("disableStorageApi")||(r.disableStorageApi=null!=(n=null==(i=t.storage)?void 0:i.disableStorageApi)&&n),r}(this.Df,u);!function(e,t){m.AdManifestHelper.setLoader(new o.DefaultContentLoader(t,{requestType:a.HttpRequestType.MANIFEST_ADS})),m.AdManifestHelper.setVideoLoadTimeout(e.videoLoadTimeout),m.AdManifestHelper.setWithCredentials(e.withCredentials),m.AdManifestHelper.setDisableStorage(e.disableStorageApi)}(c,t),v(u,c,t.logger),this.createAdvertisingModule(c),this.Df.adBreaks&&this.Df.adBreaks.length>0&&this.Df.adBreaks.splice(0).forEach(function(e){return i.scheduleAd(e).catch(function(e){return i.context.logger.warn(e)})}),this.Cf.on(r.PlayerEvent.TimeChanged,this.Mf),this.Cf.on(r.PlayerEvent.Seek,this.Nf),this.Cf.on(r.PlayerEvent.Warning,this.Qf),this.Cf.on(r.PlayerEvent.TimeShift,this.Of),this.Cf.on(r.PlayerEvent.TimeShifted,this.Pf),this.playerAdvertisingApi=S(this,this.If)}return e.prototype.createAdvertisingModule=function(e){this.Kf={internalPlayer:this.Cf,context:this.context,restoreContentDeferred:null};
vendor: 5,673 bytes, line 1
1var t=f.ModuleManager.get(g.ModuleName.AdvertisingCore),i=f.ModuleManager.get(g.ModuleName.Advertising),n=new t.AdPlayerDelegate(this.Kf);this.If=new i(n,e),this.Jf=n},e.prototype.updatePlayerContext=function(e){this.context=e,this.Kf.context=e},e.prototype.initializeAdModule=function(){this.If.initialize()},e.prototype.scheduleAd=function(e){return b(e)&&(e.discardAfterPlayback=!1!==e.discardAfterPlayback,this.Sf(e)&&!this.Vf())?(this.Ef.push(e),this.Ff||(this.Ff=new d.Deferred,this.Cf.on(r.PlayerEvent.SourceLoaded,this.Rf)),this.Ff.promise):this.Uf(e)},e.prototype.Sf=function(e){return e.position.includes("%")&&"0%"!==e.position},e.prototype.Tf=function(e){var t=this,i=e.map(function(e){return t.Uf(e)});this.Ff&&Promise.all(i).then(function(e){var i=[].concat.apply([],e);t.Ff.resolve(i),t.Ff=null}).catch(function(e){return t.context.logger.warn(e)})},e.prototype.Uf=function(e){return b(e)&&this.Cf.isLive()&&this.Sf(e)?Promise.reject("percentage based ad break positions can not be used for live streams"):this.If.schedule(e)},e.prototype.playPreRollAds=function(){var e,t,i=this,n=Promise.resolve();return this.Hf=!0,this.Gf&&(null==(t=null==(e=this.context)?void 0:e.videoElement)?void 0:t.prime)&&(n=this.context.videoElement.prime()),Promise.resolve(this.If.beforeContent()).catch(function(e){(0,l.isContextAvailable)(i.context)&&i.context.logger.debug("Failed to trigger preroll ad playback: ",e)}).then(function(){return n}).catch(function(e){(0,l.isContextAvailable)(i.context)&&i.context.logger.debug("Failed to prime video element: ",e)})},e.prototype.playPostRollAds=function(){var e=this,t=!1,i=function(){t=!0,e.Cf.off(r.PlayerEvent.AdBreakStarted,i)};return this.Cf.on(r.PlayerEvent.AdBreakStarted,i),this.Kf.restoreContentDeferred=new d.Deferred,Promise.resolve(this.If.afterContent()).then(function(){return new Promise(function(i,n){if(t){var r,o=function(){e.Kf.restoreContentDeferred.promise.then(i).catch(n),a(),(0,h.clearTimeoutIfDefined)(r)},a=(0,c.subscribe)(e.context.store)(function(e){return(0,u.getIsStopped)((0,u.getPlayerState)(e))},o,function(e){return e});r=window.setTimeout(o,1e3)}else i()})}).then(function(){return e.Kf.restoreContentDeferred=null}).catch(function(t){e.Kf.restoreContentDeferred=null,e.context.logger.debug(t)})},e.prototype.hasAlreadyRequestedPreRollAds=function(){return this.Hf},e.prototype.play=function(){return this.If.resume(),Promise.resolve()},e.prototype.pause=function(){this.If.pause()},e.prototype.getCurrentTime=function(){var e,t=null==(e=this.If)?void 0:e.currentTime();return isNaN(t)?0:null!=t?t:0},e.prototype.getDuration=function(){return this.If.duration()},e.prototype.isLinearAdActive=function(){return this.If.isLinearAdActive()},e.prototype.isPlaying=function(){return this.If.isLinearAdActive(!0)},e.prototype.isPaused=function(){return this.isLinearAdActive()&&!this.isPlaying()},e.prototype.Vf=function(){return this.Cf.getDuration()>0},e.prototype.reset=function(){return this.Ef=[],this.Hf=!1,this.Jf.reset(),this.If.reset()},e.prototype.dispose=function(){this.Cf.off(r.PlayerEvent.TimeChanged,this.Mf),this.Cf.off(r.PlayerEvent.Seek,this.Nf),this.Cf.off(r.PlayerEvent.Warning,this.Qf),this.Cf.off(r.PlayerEvent.TimeShift,this.Of),this.Cf.off(r.PlayerEvent.TimeShifted,this.Pf),this.Cf=null,this.Df=null,this.If.dispose(),this.If=null,this.Jf=null},e}()},28412:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.AdvertisingModule=void 0,t.AdvertisingModule=function(e,t){this.player=e,this.config=t}},88457:function(e,t){var i;Object.defineProperty(t,"__esModule",{value:!0}),t.AdvertisingModuleErrorCode=void 0,function(e){e[e.AD_TAG_TYPE_NOT_MATCHING=110]="AD_TAG_TYPE_NOT_MATCHING",e[e.COULD_NOT_LOAD_AD_MANIFEST=404]="COULD_NOT_LOAD_AD_MANIFEST",e[e.REQUIRED_PLAYER_MODULE_MISSING=2e3]="REQUIRED_PLAYER_MODULE_MISSING"}(i||(t.AdvertisingModuleErrorCode=i={}))},23912:function(e,t){var i;Object.defineProperty(t,"__esModule",{value:!0}),t.AdTagType=void 0,function(e){e.VAST="vast",e.VMAP="vmap",e.VPAID="vpaid"}(i||(t.AdTagType=i={}))},93531:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.calculatePlaybackRestorationPosition=function(e){var t=e.adBreakDuration,i=e.isLive,n=e.playbackPosition,r=e.replaceContentDuration,o=e.resumeLiveContentAtPreviousPosition;return n+(null!=r?r:!i||o?0:t)},t.calculateTimeshiftRestorationPosition=function(e){var t=e.adBreakDuration,i=e.playbackPosition,r=e.replaceContentDuration,o=e.resumeLiveContentAtPreviousPosition?t:0;return Math.min(i-((0,n.isDefined)(r)?t-r:o),0)};var n=i(23068)},6365:function(e,t){var i,n;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=t.DEFAULT_AD_BREAK_POSITION=void 0,t.DEFAULT_AD_BREAK_POSITION="pre",t.DEFAULT_PRELOAD_OFFSET=0,t.NON_SKIPPABLE_IDENTIFIER=-1,t.DEFAULT_VIDEO_LOAD_TIMEOUT=8e3,t.DEFAULT_OVERLAY_AD_BOTTOM_POSITION="4.5em",function(e){e.Progressive="progressive",e.Streaming="streaming"}(i||(t.MediaFileDeliveryType=i={})),function(e){e.Vpaid="vpaid"}(n||(t.VastApiFramework=n={}))},65185:function(e,t){function i(e){return e.bitrate||(e.maxBitrate+e.minBitrate)/2}Object.defineProperty(t,"__esModule",{value:!0}),t.findMediaFileByResolution=function(e,t,i){return i.reduce(function(i,n){var r=Math.abs(e-i.width)+Math.abs(t-i.height);return Math.abs(e-n.width)+Math.abs(t-n.height)<r?n:i})},t.findMediaFileByBitrate=function(e,t){return t.reduce(function(t,n){var r=i(t),o=i(n),a=Math.abs(r-e);return Math.abs(o-e)<a?n:t})}},7581:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}
1),t.VastErrorCode=t.AdvertisingModuleErrorCode=t.AdTagType=t.AdvertisingCoreModuleDefinition=void 0;var n=i(62756),r=i(43255),o=i(90176),a=i(88457);Object.defineProperty(t,"AdvertisingModuleErrorCode",{enumerable:!0,get:function(){return a.AdvertisingModuleErrorCode}});var s=i(23912);Object.defineProperty(t,"AdTagType",{enumerable:!0,get:function(){return s.AdTagType}});var u=i(47091);Object.defineProperty(t,"VastErrorCode",{enumerable:!0,get:function(){return u.VastErrorCode}}),t.AdvertisingCoreModuleDefinition={name:n.ModuleName.AdvertisingCore,module:function(){return{AdvertisingController:o.AdvertisingController,AdPlayerDelegate:r.AdPlayerDelegate}},dependencies:[n.ModuleName.XML],exports:{AdTagType:s.AdTagType,AdvertisingModuleErrorCode:a.AdvertisingModuleErrorCode,VastErrorCode:u.VastErrorCode}},t.default=t.AdvertisingCoreModuleDefinition},85939:function(e,t,i){var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.PlayerStateStore=void 0;var r=i(3714),o=i(44468),a=i(15487),s=i(88844),u=i(19274),c=i(80813),l=i(46922),d=i(81524),h=i(18192),p=i(93531);t.PlayerStateStore=function(){function e(e,t){var i=this;this.context=e,this.internalPlayer=t,this.cK=function(e){var t=e.subtitle;i.KJ.find(function(e){return e.id===t.id})&&(i.internalPlayer.enableSubtitle(t.id),i.KJ=i.KJ.filter(function(e){return e.id!==t.id}))},this.dK=function(){i.internalPlayer.off(r.PlayerEvent.SubtitleAdded,i.cK),i.internalPlayer.off(r.PlayerEvent.SourceUnloaded,i.dK),i.KJ=[]},this.IJ=null,this.JJ=null,this.KJ=[],t.on(r.PlayerEvent.SubtitleAdded,this.cK),t.on(r.PlayerEvent.SourceUnloaded,this.dK)}return e.prototype.capturePlayerState=function(e){var t,i=this.internalPlayer.isLive(),r=i&&!this.context.settings.ENABLE_SEEK_FOR_LIVE,o=r?this.internalPlayer.getTimeShift():this.internalPlayer.getCurrentTime(e);this.JJ={contentDuration:this.internalPlayer.getDuration(),source:this.internalPlayer.getSource(),loadOptions:this.internalPlayer.getLoadOptions(),sourceIdentifier:this.context.sourceContext.sourceIdentifier,hasEnded:this.internalPlayer.hasEnded(),isStartup:!this.internalPlayer.hasCurrentSourcePlayedOnce(),isLive:i,playbackPosition:o,useTimeshiftForRestore:r,playbackSpeed:this.internalPlayer.getPlaybackSpeed(),subtitles:this.internalPlayer.listSubtitles().map(function(e){return n({},e)}),audioTrackId:null==(t=this.internalPlayer.getAudio())?void 0:t.id,audioQualityId:this.internalPlayer.getAudioQuality().id,videoQualityId:this.internalPlayer.getVideoQuality().id}},e.prototype.setAdRestoreState=function(e){this.hasStoredState()&&(this.IJ=e,this.ZK())},e.prototype.getStoredState=function(){return this.JJ},e.prototype.hasStoredState=function(){return null!=this.JJ},e.prototype.LJ=function(){var e=this,t=this.JJ.audioTrackId;if(null!=t){var i=function(){return!!e.internalPlayer.getAvailableAudio().find(function(e){return e.id===t})&&(e.internalPlayer.setAudio(t),!0)};i()||(this.context.logger.log("Delaying audio track restore",t),this.bK(i,r.PlayerEvent.AudioAdded))}},e.prototype.WK=function(){var e=this;return Promise.all(this.JJ.subtitles.map(function(t){var i=e.internalPlayer.listSubtitles().find(function(e){return e.id===t.id});return i?!i.enabled&&t.enabled?e.internalPlayer.enableSubtitle(t.id,!1,!1).then(function(){}):Promise.resolve():(t.url?e.internalPlayer.addSubtitle(t):t.enabled&&(e.context.logger.log("Delaying subtitle restoration as track is not available yet",t),e.KJ.push(t)),Promise.resolve())})).then(function(){})},e.prototype.XK=function(){var e,t,i=null!=(t=null==(e=this.JJ)?void 0:e.sourceIdentifier)?t:this.context.sourceContext.sourceIdentifier;return this.context.serviceManager.get(c.ServiceName.SourceStoreService,i)},e.prototype.YK=function(){if(!this.JJ)return NaN;if(!this.IJ)return this.JJ.playbackPosition;var e={adBreakDuration:this.IJ.adBreakDuration,isLive:this.JJ.isLive,replaceContentDuration:this.IJ.replaceContentDuration,playbackPosition:this.JJ.playbackPosition,resumeLiveContentAtPreviousPosition:this.context.settings.RESUME_LIVE_CONTENT_AT_PREVIOUS_POSITION_AFTER_AD_BREAK};return this.JJ.useTimeshiftForRestore?(0,p.calculateTimeshiftRestorationPosition)(e):(0,p.calculatePlaybackRestorationPosition)(e)},e.prototype.ZK=function(){var e;if(this.JJ){var t=this.YK();this.context.logger.debug("Saving content restore position: ".concat(t)),null==(e=this.XK())||e.dispatch((0,l.setBackgroun
1dPlaybackState)({kind:h.PlaybackKind.Background,position:t}))}},e.prototype.aK=function(e){var t,i=this;if(this.JJ.isStartup)return Promise.resolve(!0);var n=(0,d.getPlaybackPosition)(this.XK().getState().playback);if(this.JJ.useTimeshiftForRestore)return this.internalPlayer.timeShift(n,e),Promise.resolve(!0);var u=(null==(t=this.context.renderer)?void 0:t.getDuration())||this.context.videoElement.duration||this.JJ.contentDuration||n;return n>=u?Promise.resolve(!1):new Promise(function(t,u){var c,l=function(){(0,s.clearTimeoutIfDefined)(c),i.internalPlayer.off(r.PlayerEvent.Seeked,d),i.internalPlayer.off(r.PlayerEvent.Error,h)},d=function(){l(),t(!0)},h=function(){l(),u(Error("Error during playback restoration"))};i.internalPlayer.onInternal(r.PlayerEvent.Seeked,d),i.internalPlayer.onInternal(r.PlayerEvent.Error,h),i.internalPlayer.getPlayerType()===o.PlayerType.Native&&((0,a.isWebOS)()||(0,a.isPlayStation4)())&&(c=window.setTimeout(d,5e3)),i.internalPlayer.seek(n,e)||d()})},e.prototype.restore=function(e){var t=this;return this.hasStoredState()?Promise.resolve().then(function(){return t.internalPlayer.load(t.JJ.source,t.JJ.loadOptions.forceTechnology,t.JJ.loadOptions.restrictions,e)}).then(function(){t.internalPlayer.setPlaybackSpeed(t.JJ.playbackSpeed),t.LJ(),t.internalPlayer.setAudioQuality(t.JJ.audioQualityId),t.internalPlayer.setVideoQuality(t.JJ.videoQualityId)}).then(function(){return t.aK(e)}).then(function(e){var i;return t.WK(),null==(i=t.XK())||i.dispatch((0,l.setMainContentPlaybackState)({kind:h.PlaybackKind.MainContent})),t.clear(),e}):Promise.reject("no stored state to restore")},e.prototype.clear=function(){this.IJ=null,this.JJ=null},e.prototype.bK=function(e,t,i,n){var o,a,c=this;void 0===n&&(n=2e3);var l=function(){var e;(0,s.clearTimeoutIfDefined)(a),c.internalPlayer.off(t,d),c.internalPlayer.off(r.PlayerEvent.SourceUnloaded,l),i?c.internalPlayer.off(i,l):null==(e=c.context.videoElement)||e.removeEventListener(u.MediaElementEvent.canplay,l)},d=function(t){e(t)&&l()};i?this.internalPlayer.onInternal(i,l):null==(o=this.context.videoElement)||o.addEventListener(u.MediaElementEvent.canplay,l),this.internalPlayer.onInternal(t,d),this.internalPlayer.onInternal(r.PlayerEvent.SourceUnloaded,l),a=setTimeout(l,n)},e}()},60326:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.VastClientWrapper=void 0;var n=i(6036),r=i(6365),o=i(47091);t.VastClientWrapper=function(){function e(e,t,i){this.QK=new n.VASTClient({allowUsingBrowserStorageApi:!i}),this.QK.vastParser.initParsingStatus(),this.RK=e||r.DEFAULT_VIDEO_LOAD_TIMEOUT,this.SK=t}return e.prototype.parseManifest=function(e,t){var i=this,n=[],r=function(e){n.push({code:e.ERRORCODE})};return this.QK.vastParser.addListener("VAST-error",r),this.QK.vastParser.parseVAST(e,{timeout:this.RK,withCredentials:this.SK,replaceUnavailableAdPodAds:!t}).catch(function(e){return i.QK.vastParser.removeListener("VAST-error",r),Promise.reject({code:e&&e.ERRORCODE||o.VastErrorCode.UNDEFINED_ERROR})}).then(function(e){var t;return i.QK.vastParser.removeListener("VAST-error",r),(null==(t=e.ads)?void 0:t.length)>0?e:n.length>0?Promise.reject(n[0]):Promise.reject({code:o.VastErrorCode.UNDEFINED_ERROR})})},e}()},47091:function(e,t){var i;Object.defineProperty(t,"__esModule",{value:!0}),t.VastErrorCode=void 0,function(e){e[e.XML_PARSING_ERROR=100]="XML_PARSING_ERROR",e[e.VAST_SCHEMA_VALIDATION_ERROR=101]="VAST_SCHEMA_VALIDATION_ERROR",e[e.VERSION_NOT_SUPPORTED=102]="VERSION_NOT_SUPPORTED",e[e.TRAFFICKING_ERROR=200]="TRAFFICKING_ERROR",e[e.EXPECTING_DIFFERENT_LINEARITY=201]="EXPECTING_DIFFERENT_LINEARITY",e[e.EXPECTING_DIFFERENT_DURATION=202]="EXPECTING_DIFFERENT_DURATION",e[e.EXPECTING_DIFFERENT_SIZE=203]="EXPECTING_DIFFERENT_SIZE",e[e.GENERAL_WRAPPER_ERROR=300]="GENERAL_WRAPPER_ERROR",e[e.WRAPPER_VAST_URI_TIMEOUT=301]="WRAPPER_VAST_URI_TIMEOUT",e[e.WRAPPER_LIMIT_REACHED=302]="WRAPPER_LIMIT_REACHED",e[e.NO_ADS_VAST_RESPONSE=303]="NO_ADS_VAST_RESPONSE",e[e.GENERAL_LINEAR_ERROR=400]="GENERAL_LINEAR_ERROR",e[e.FILE_NOT_FOUND=401]="FILE_NOT_FOUND",e[e.MEDIAFILE_URI_TIMEOUT=402]="MEDIAFILE_URI_TIMEOUT",e[e.NO_SUPPORTED_MEDIAFILE=403]="NO_SUPPORTED_MEDIAFILE",e[e.PROBLEM_DISPLAYING_MEDIAFILE=405]="PROBLEM_DISPLAYING_MEDIAFILE",e[e.GENERAL_NONLINEARADS_ERROR=500]="GENERAL_NONLINEARADS_ERROR",e[e.NONLINEAR_AD_INVALID_DIMENSIONS=501]="NONLINEAR_AD_INVALID_DIMENSIONS",e[e.UNABLE_TO_FETCH_NONLINEAR_RESOURCE=502]="UNABLE_TO_FETCH_NONLINEAR_RESOURCE",e[e.NO_SUPPORTED_NONLINEAR_RESOURCE_TYPE=503]="NO_SUPPORTED_NONLINEAR_RESOURCE_TYPE",e[e.GENERAL_COMPANIONADS_ERROR=600]="GENERAL_COMPANIONADS_ERROR",e[e.COMPANION_AD_INVALID_DIMENSIONS=601]="COMPANION_AD_INVALID_DIMENSIONS",e[e.UNABLE_TO_DISPLAY_REQUIRED_COMPANION=602]="UNABLE_TO_DISPLAY_REQUIRED_COMPANION",e[e.UNABLE_TO_FETCH_COMPANION_RESOURCE=603]="UNABLE_TO_FETCH_COMPANION_RESOURCE",e[e.NO_SUPPORTED_COMPANION_RESOURCE_TYPE=604]="NO_SUPPORTED_COMPANION_RESOURCE_TYPE",e[e.UNDEFINED_ERROR=900]="UNDEFINED_ERROR",e[e.GENERAL_VPAID_ERROR=901]="GENERAL_VPAID_ERROR"}(i||(t.VastErrorCode=i={}))}
1,5838:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.VmapExtractor=void 0;var n=i(70850),r=i(88052),o=i(62756),a=i(45392),s=i(88457),u=i(23912),c=i(6365),l=i(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){return e.getParsedManifest(t.tag.url).then(function(i){return i.manifest.VMAP?Promise.resolve({adBreakConfigs:e.parseVmapAdBreaks(i.manifest,t),downloadTiming:i.downloadTiming}):Promise.reject({code:s.AdvertisingModuleErrorCode.AD_TAG_TYPE_NOT_MATCHING})})},e.getParsedManifest=function(t){return a.AdManifestHelper.downloadVmapManifest(t).catch(function(){return Promise.reject({code:s.AdvertisingModuleErrorCode.COULD_NOT_LOAD_AD_MANIFEST})}).then(function(t){if(!t.body)return Promise.reject({code:l.VastErrorCode.XML_PARSING_ERROR});try{var i=e.xml2js(t.body),n=i.success?i.parsed:{},r={downloadTime:t.elapsedTime,timeToFirstByte:t.timeToFirstByte};return Promise.resolve({manifest:n,downloadTiming:r})}catch(e){return Promise.reject({code:l.VastErrorCode.XML_PARSING_ERROR})}})},e.parseVmapAdBreaks=function(t,i){return e.extractAdBreaks(t).map(function(e){var t,r={id:e.id||n.Util.generateUniqueId(),tag:{url:e.tag,type:u.AdTagType.VAST},position:e.offset,preloadOffset:null!=(t=i.preloadOffset)?t:c.DEFAULT_PRELOAD_OFFSET};i.hasOwnProperty("replaceContentDuration")&&(r.replaceContentDuration=i.replaceContentDuration),i.passthroughMode&&(r.passthroughMode=i.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 i=t._breakId,n=t._timeOffset;switch(n){case"start":n="pre";break;case"end":n="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:i,offset:n,tag:r,trackingEvents:o}}):[]},e.getAdBreakUri=function(t){var i=!!(t.AdSource&&t.AdSource[0]),n=!!(i&&t.AdSource[0].AdTagURI&&t.AdSource[0].AdTagURI[0]),r=!!(i&&t.AdSource[0].VASTAdData&&t.AdSource[0].VASTAdData[0]);return n||r?n&&t.AdSource[0].AdTagURI[0].toString?t.AdSource[0].AdTagURI[0].toString():r?a.AdManifestHelper.toDataUri(e.js2xml(t.AdSource[0].VASTAdData[0])):void 0:""},e}()},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,i){var n=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||({__proto__:[]}
1)instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(t,i)};return function(t,i){if("function"!=typeof i&&null!==i)throw TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.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 i=e.call(this,t)||this;return i.type="companion",i.variations=[],i}return n(t,e),t}(i(36828).Creative)},77615:function(e,t,i){var n=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(t,i)};return function(t,i){if("function"!=typeof i&&null!==i)throw TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.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 i=e.call(this,t)||this;return i.type="linear",i.duration=0,i.skipDelay=null,i.mediaFiles=[],i.videoClickThroughURLTemplate=null,i.videoClickTrackingURLTemplates=[],i.videoCustomClickURLTemplates=[],i.adParameters=null,i.icons=[],i}return n(t,e),t}(i(36828).Creative)},35475:function(e,t,i){var n=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(t,i)};return function(t,i){if("function"!=typeof i&&null!==i)throw TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.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 i=e.call(this,t)||this;return i.type="nonlinear",i.variations=[],i}return n(t,e),t}(i(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}},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.co
vendor: 34,245 bytes, line 1
1dec=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,i){Object.defineProperty(t,"__esModule",{value:!0}),t.parseAd=function(e){var t=e.childNodes;for(var i in t){var n=t[i];if(-1!==["Wrapper","InLine"].indexOf(n.nodeName)){if(u.parserUtils.copyNodeAttribute("id",e,n),u.parserUtils.copyNodeAttribute("sequence",e,n),"Wrapper"===n.nodeName)return l(n);if("InLine"===n.nodeName)return c(n)}}},t.parseExtensions=d;var n=i(63207),r=i(19637),o=i(93088),a=i(2035),s=i(64815),u=i(75065);function c(e){var t=e.childNodes,i=new n.Ad;for(var r in i.id=e.getAttribute("id")||null,i.sequence=e.getAttribute("sequence")||null,t){var c=t[r];switch(c.nodeName){case"Error":i.errorURLTemplates.push(u.parserUtils.parseNodeText(c));break;case"Impression":i.impressionURLTemplates.push(u.parserUtils.parseNodeText(c));break;case"Creatives":u.parserUtils.childrenByName(c,"Creative").forEach(function(e){var t={id:e.getAttribute("id")||null,adId:f(e),sequence:e.getAttribute("sequence")||null,apiFramework:e.getAttribute("apiFramework")||null};for(var n in e.childNodes){var r=e.childNodes[n];switch(r.nodeName){case"UniversalAdId":t.universalAdId=g(r);break;case"Linear":var u=(0,a.parseCreativeLinear)(r,t);u&&i.creatives.push(u);break;case"NonLinearAds":var c=(0,s.parseCreativeNonLinear)(r,t);c&&i.creatives.push(c);break;case"CompanionAds":var l=(0,o.parseCreativeCompanion)(r,t);l&&i.creatives.push(l)}}});break;case"Extensions":i.extensions=d(u.parserUtils.childrenByName(c,"Extension"),i);break;case"AdSystem":i.system={value:u.parserUtils.parseNodeText(c),version:c.getAttribute("version")||null};break;case"AdTitle":i.title=u.parserUtils.parseNodeText(c);break;case"Description":i.description=u.parserUtils.parseNodeText(c);break;case"Advertiser":i.advertiser={name:u.parserUtils.parseNodeText(c),id:c.getAttribute("id")||null};break;case"Pricing":i.pricing={value:u.parserUtils.parseNodeText(c),model:c.getAttribute("model")||null,currency:c.getAttribute("currency")||null};break;case"Survey":i.survey={uri:u.parserUtils.parseNodeText(c),type:c.getAttribute("type")||null};break;case"AdVerifications":p(i.verifications,u.parserUtils.childrenByName(c,"Verification"))}}return i}function l(e){var t=c(e),i=u.parserUtils.childByName(e,"VASTAdTagURI");if(i?t.nextWrapperURL=u.parserUtils.parseNodeText(i):(i=u.parserUtils.childByName(e,"VASTAdTagURL"))&&(t.nextWrapperURL=u.parserUtils.parseNodeText(u.parserUtils.childByName(i,"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 i=function(i){var n=e.trackingEvents[i];t.trackingEvents[e.type][i]||(t.trackingEvents[e.type][i]=[]),n.forEach(function(n){t.trackingEvents[e.type][i].push(n)})};for(var n in e.trackingEvents)i(n)}e.videoClickTrackingURLTemplates&&(t.videoClickTrackingURLTemplates||(t.videoClickTrackingURLTemplates=[]),e.videoClickTrackingURLTemplates.forEach(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}function d(e,t){var i=[];return e.forEach(function(e){var n=h(e,t);n&&i.push(n)}),i}function h(e,t){if("#comment"===e.nodeName)return null;var i=new r.AdExtension,n=e.attributes,o=e.childNodes;if(i.name=e.nodeName,e.attributes){for(var a in n)if(n.hasOwnProperty(a)){var s=n[a];s.nodeName&&s.nodeValue&&(i.attributes[s.nodeName]=s.nodeValue)}}for(var c in o)if(o.hasOwnProperty(c)){if("AdVerifications"===o[c].nodeName){p(t.verifications,u.parserUtils.childrenByName(o[c],"Verification"));continue}var l=h(o[c],t);l&&i.children.push(l)}if(0===i.children.length||1===i.children.length&&["#cdata-section","#text"].indexOf(i.children[0].name)>=0){var d=u.parserUtils.parseNodeText(e);""!==d&&(i.value=d),i.children=[]}return i.isEmpty()?null:i}function p(e,t){var i=["Verification","JavaScriptResource","ExecutableResource","TrackingEvents","Tracking","VerificationParameters"],n=function(e){var t={},r=u.parserUtils.parseNodeText(e);return Object.keys(e.attributes).forEach(function(i){var n=e.attributes[i].nodeName,r=e.attributes[i].nodeValue;n&&r&&(t[n]=r)}),"#comment"!==e.nodeName&&""!==r&&(e.children&&e.children.length>0?e.childNodes.forEach(function(e){i.includes(e.nodeName)&&(t[e.nodeName]||(t[e.nodeName]=[]),t[e.nodeName].push(n(e)))}):t.content=r),t};t.forEach(function(t){var i=n(t);e.push(i)})}function f(e){return e.getAttribute("AdID")||e.getAttribute("adID")||e.getAttribute("adId")||null}function g(e){return{idRegistry:e.getAttribute("idRegistry")||"unknown",value:u.parserUtils.parseNodeText(e)||"unknown"}}},93088:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.parseCreativeCompanion=function(e,t){var i=new r.CreativeCompanion(t);return o.parserUtils.childrenByName(e,"Companion").forEach(function(e){var t=new n.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(i){t.type=i.getAttribute("creativeType")||0,o.parserUtils.childrenByName(e,"AltText").forEach(function(e){t.altText=o.parserUtils.parseNodeText(e)}),t.staticResource=o.parserUtils.parseNodeText(i)}),o.parserUtils.childrenByName(e,"TrackingEvents").forEach(function(e){o.parserUtils.childrenByName(e,"Tracking").forEach(function(e){var i=e.getAttribute("event"),n=o.parserUtils.parseNodeText(e);i&&n&&(null==t.trackingEvents[i]&&(t.trackingEvents[i]=[]),t.trackingEvents[i].push(n))})}),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")),i.variations.push(t)}),i};var n=i(31472),r=i(81214),o=i(75065)},2035:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.parseCreativeLinear=function(e,t){var i,s=new n.CreativeLinear(t);s.duration=a.parserUtils.parseDuration(a.parserUtils.parseNodeText(a.parserUtils.childByName(e,"Duration")));var u=e.getAttribute("skipoffset");if(null==u)s.skipDelay=null;else if("%"===u.charAt(u.length-1)&&-1!==s.duration){var c=parseInt(u,10);s.skipDelay=s.duration*(c/100)}else s.skipDelay=a.parserUtils.parseDuration(u);var l=a.parserUtils.childByName(e,"VideoClicks");l&&(s.videoClickThroughURLTemplate=a.parserUtils.parseNodeText(a.parserUtils.childByName(l,"ClickThrough")),a.parserUtils.childrenByName(l,"ClickTracking").forEach(function(e){s.videoClickTrackingURLTemplates.push(a.parserUtils.parseNodeText(e))}),a.parserUtils.childrenByName(l,"CustomClick").forEach(function(e){s.videoCustomClickURLTemplates.push(a.parserUtils.parseNodeText(e))}));var d=a.parserUtils.childByName(e,"AdParameters");d&&(s.adParameters=a.parserUtils.parseNodeText(d)),a.parserUtils.childrenByName(e,"TrackingEvents").forEach(function(e){a.parserUtils.childrenByName(e,"Tracking").forEach(function(e){var t=e.getAttribute("event"),n=a.parserUtils.parseNodeText(e);if(t&&n){if("progress"===t){if(!(i=e.getAttribute("offset")))return;t="%"===i.charAt(i.length-1)?"progress-".concat(i):"progress-".concat(Math.round(a.parserUtils.parseDuration(i)))}null==s.trackingEvents[t]&&(s.trackingEvents[t]=[]),s.trackingEvents[t].push(n)}})}),a.parserUtils.childrenByName(e,"MediaFiles").forEach(function(e){a.parserUtils.childrenByName(e,"MediaFile").forEach(function(e){var t=new o.MediaFile;t.id=e.getAttribute("id"),t.fileURL=a.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 i=e.getAttribute("scalable");i&&"string"==typeof i&&("true"===(i=i.toLowerCase())?t.scalable=!0:"false"===i&&(t.scalable=!1));var n=e.getAttribute("maintainAspectRatio");n&&"string"==typeof n&&("true"===(n=n.toLowerCase())?t.maintainAspectRatio=!0:"false"===n&&(t.maintainAspectRatio=!1)),s.mediaFiles.push(t)})});var h=a.parserUtils.childByName(e,"Icons");return h&&a.parserUtils.childrenByName(h,"Icon").forEach(function(e){var t=new r.Icon;t.program=e.getAttribute("program"),t.height=parseInt(e.getAttribute("height")||0),t.width=parseInt(e.getAttribute("width")||0),t.xPosition=function(e){return -1!==["left","right"].indexOf(e)?e:parseInt(e||0)}(e.getAttribute("xPosition")),t.yPosition=function(e){return -1!==["top","bottom"].indexOf(e)?e:parseInt(e||0)}(e.getAttribute("yPosition")),t.apiFramework=e.getAttribute("apiFramework"),t.offset=a.parserUtils.parseDuration(e.getAttribute("offset")),t.duration=a.parserUtils.parseDuration(e.getAttribute("duration")),a.parserUtils.childrenByName(e,"HTMLResource").forEach(function(e){t.type=e.getAttribute("creativeType")||"text/html",t.htmlResource=a.parserUtils.parseNodeText(e)}),a.parserUtils.childrenByName(e,"IFrameResource").forEach(function(e){t.type=e.getAttribute("creativeType")||0,t.iframeResource=a.parserUtils.parseNodeText(e)}),a.parserUtils.childrenByName(e,"StaticResource").forEach(function(e){t.type=e.getAttribute("creativeType")||0,t.staticResource=a.parserUtils.parseNodeText(e)});var i=a.parserUtils.childByName(e,"IconClicks");i&&(t.iconClickThroughURLTemplate=a.parserUtils.parseNodeText(a.parserUtils.childByName(i,"IconClickThrough")),a.parserUtils.childrenByName(i,"IconClickTracking").forEach(function(e){t.iconClickTrackingURLTemplates.push(a.parserUtils.parseNodeText(e))})),t.iconViewTrackingURLTemplate=a.parserUtils.parseNodeText(a.parserUtils.childByName(e,"IconViewTracking")),s.icons.push(t)}),s};var n=i(77615),r=i(50199),o=i(36629),a=i(75065)},64815:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.parseCreativeNonLinear=function(e,t){var i=new n.CreativeNonLinear(t);return o.parserUtils.childrenByName(e,"TrackingEvents").forEach(function(e){var t,n;o.parserUtils.childrenByName(e,"Tracking").forEach(function(e){t=e.getAttribute("event"),n=o.parserUtils.parseNodeText(e),t&&n&&(null==i.trackingEvents[t]&&(i.trackingEvents[t]=[]),i.trackingEvents[t].push(n))})}),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 n=o.parserUtils.childByName(e,"AdParameters");n&&(t.adParameters=o.parserUtils.parseNodeText(n)),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))}),i.variations.push(t)}),i};var n=i(35475),r=i(57219),o=i(75065)},75065:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.parserUtils=void 0;var n=i(11417);t.parserUtils={childByName:function(e,t){var i=e.childNodes;for(var n in i){var r=i[n];if(r.nodeName===t)return r}},childrenByName:function(e,t){var i=[],n=e.childNodes;for(var r in n){var o=n[r];o.nodeName===t&&i.push(o)}return i},resolveVastAdTagURI:function(e,t){if(!t)return e;if(0===e.indexOf("//")){var i=location.protocol;return"".concat(i).concat(e)}if(-1===e.indexOf("://")){var n=t.slice(0,t.lastIndexOf("/"));return"".concat(n,"/").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,i){var n=t.getAttribute(e);n&&i.setAttribute(e,n)},parseDuration:function(e){if(null==e)return -1;if(n.util.isNumeric(e))return parseInt(e);var t=e.split(":");if(3!==t.length)return -1;var i=t[2].split("."),r=parseInt(i[0]);2===i.length&&(r+=parseFloat("0.".concat(i[1])));var o=parseInt(60*t[1]),a=parseInt(60*t[0]*60);return isNaN(a)||isNaN(o)||isNaN(r)||o>3600||r>60?-1:a+o+r},splitVAST:function(e){var t=[],i=null;return e.forEach(function(n,r){if(n.sequence&&(n.sequence=parseInt(n.sequence,10)),n.sequence>1){var o=e[r-1];if(o&&o.sequence===n.sequence-1)return void(i&&i.push(n));delete n.sequence}i=[n],t.push(i)}),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 i in t.trackingEvents[e.type]){var n=t.trackingEvents[e.type][i];e.trackingEvents[i]||(e.trackingEvents[i]=[]),e.trackingEvents[i]=e.trackingEvents[i].concat(n)}}),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,i){var n=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(t,i)};return function(t,i){if("function"!=typeof i&&null!==i)throw TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),r=this&&this.__spreadArray||function(e,t,i){if(i||2==arguments.length)for(var n,r=0,o=t.length;r<o;r++)!n&&r in t||(n||(n=Array.prototype.slice.call(t,0,r)),n[r]=t[r]);return e.concat(n||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.VASTParser=void 0;var o=i(71119),a=i(37007),s=i(75065),u=i(27294),c=i(11417),l=i(71076),d={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 n(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 i=[],n=2;n<arguments.length;n++)i[n-2]=arguments[n];this.emit("VAST-error",Object.assign.apply(Object,r([d,t],i,!1))),c.util.track(e,t)},t.prototype.getErrorURLTemplates=function(){return this.rootErrorURLTemplates.concat(this.errorURLTemplates)},t.prototype.fetchVAST=function(e,t,i){var n=this;return new Promise(function(r,o){n.URLTemplateFilters.forEach(function(t){e=t(e)}),n.parentURLs.push(e),n.emit("VAST-resolving",{url:e,wrapperDepth:t,originalUrl:i}),n.urlHandler.get(e,n.fetchingOptions,function(t,i){n.emit("VAST-resolved",{url:e,error:t}),t?o(t):r(i)})})},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||u.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 i=e?c.util.flatten(this.remainingAds):this.remainingAds.shift();return this.errorURLTemplates=[],this.parentURLs=[],this.resolveAds(i,{wrapperDepth:0,originalUrl:this.rootURL}).then(function(e){return t.buildVASTResponse(e)})},t.prototype.getAndParseVAST=function(e,t){var i=this;return void 0===t&&(t={}),this.initParsingStatus(t),this.rootURL=e,this.fetchVAST(e).then(function(n){return t.originalUrl=e,t.isRootVAST=!0,i.parse(n,t).then(function(e){return i.buildVASTResponse(e,t)})})},t.prototype.parseVAST=function(e,t){var i=this;return void 0===t&&(t={}),this.initParsingStatus(t),t.isRootVAST=!0,this.parse(e,t).then(function(e){return i.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,i=this.getPodAds(e),n=this.getStandaloneAds(e).filter(this.hasMediaFiles);return 0===i.length||0===n.length?e:(i=i.map(function(e){return t.hasMediaFiles(e)?e:n.shift()}).filter(Boolean),n.forEach(function(e){return e.isFallback=!0}),i.concat(n))},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 i=new l.VASTResponse;return i.errorURLTemplates=this.getErrorURLTemplates(),e.forEach(function(e){return e.isFallback=!1}),i.ads=t.replaceUnavailableAdPodAds?this.replaceUnavailableAdPodAds(e):this.markFallbackAds(e),this.completeWrapperResolving(i),i},t.prototype.parse=function(e,t){var i=this,n=t.resolveAll,r=void 0===n||n,a=t.wrapperSequence,u=void 0===a?null:a,c=t.originalUrl,l=void 0===c?null:c,d=t.wrapperDepth,h=void 0===d?0:d,p=t.isRootVAST,f=void 0!==p&&p,g=t.parentAdSequence,m=void 0===g?null:g;if(!e||!e.documentElement||"VAST"!==e.documentElement.nodeName)return Promise.reject(Error("Invalid VAST XMLDocument"));var y=[],v=e.documentElement.childNodes;for(var S in v){var b=v[S];if("Error"===b.nodeName){var E=s.parserUtils.parseNodeText(b);f?this.rootErrorURLTemplates.push(E):this.errorURLTemplates.push(E)}if("Ad"===b.nodeName){var T=(0,o.parseAd)(b);T?y.push(T):this.trackVastError(this.getErrorURLTemplates(),{ERRORCODE:101})}}var _=y.length,A=y[_-1];return 1===_&&null!=u&&A&&!A.sequence&&(A.sequence=u),y.forEach(function(e){return i.handleFallbackAdSequence(e,m)}),!1===r&&(this.remainingAds=s.parserUtils.splitVAST(y),y=this.remainingAds.shift()),this.resolveAds(y,{wrapperDepth:h,originalUrl:l})},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 i=this;void 0===e&&(e=[]);var n=t.wrapperDepth,r=t.originalUrl,o=[];return e.forEach(function(e){var t=i.resolveWrappers(e,n,r);o.push(t)}),Promise.all(o).then(function(e){var t=c.util.flatten(e);if(!t&&i.remainingAds.length>0){var o=i.remainingAds.shift();return i.resolveAds(o,{wrapperDepth:n,originalUrl:r})}return t})},t.prototype.resolveWrappers=function(e,t,i){var n=this;return new Promise(function(r){if(t++,!e.nextWrapperURL)return delete e.nextWrapperURL,r(e);if(t>=n.maxWrapperDepth||-1!==n.parentURLs.indexOf(e.nextWrapperURL))return e.errorCode=302,delete e.nextWrapperURL,r(e);e.nextWrapperURL=s.parserUtils.resolveVastAdTagURI(e.nextWrapperURL,i);var o=e.sequence;i=e.nextWrapperURL,n.fetchVAST(e.nextWrapperURL,t,i).then(function(a){return n.parse(a,{originalUrl:i,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&&s.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 i=e.ads[t];(i.errorCode||0===i.creatives.length)&&(this.trackVastError(i.errorURLTemplates.concat(e.errorURLTemplates),{ERRORCODE:i.errorCode||303},{ERRORMESSAGE:i.errorMessage||""},{extensions:i.extensions},{system:i.system}),e.ads.splice(t,1))}},t}(a.EventEmitter)},27294:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.urlHandler=void 0;var n=i(82664),r=i(13769),o=i(2860);t.urlHandler={get:function(e,t,i){return i||("function"==typeof t&&(i=t),t={}),"undefined"==typeof window||null===window?r.nodeURLHandler.get(e,t,i):o.XHRURLHandler.supported()?o.XHRURLHandler.get(e,t,i):n.flashURLHandler.supported()?n.flashURLHandler.get(e,t,i):i(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,i){var n="function"==typeof window.ActiveXObject?new window.ActiveXObject("Microsoft.XMLDOM"):void 0;if(!n)return i(Error("FlashURLHandler: Microsoft.XMLDOM format not supported"));n.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(){n.loadXML(request.responseText),i(null,n)}},supported:function(){return!!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,i){i(Error("Please bundle the library for node to use the node urlHandler"))}}},2860:function(e,t){function i(){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,n){if("https:"===window.location.protocol&&0===e.indexOf("http://"))return n(Error("XHRURLHandler: Cannot go from HTTPS to HTTP."));try{var r=i();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?n(null,r.responseXML):n(Error("XHRURLHandler: ".concat(r.statusText))))},r.send()}catch(e){n(Error("XHRURLHandler: Unexpected error"))}},supported:function(){return!!i()}}},1100:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.Storage=void 0;var i=null,n={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(i&&("undefined"==typeof window||null===window||Object.getPrototypeOf(i)!==window.Storage.prototype||e))return i;try{i="undefined"!=typeof window&&null!==window?window.localStorage||window.sessionStorage:null}catch(e){i=null}return i&&e&&!this.isStorageDisabled(i)||(i=n).clear(),i},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 i(e,t){void 0===t&&(t={});var i=[];t.ASSETURI&&(t.ASSETURI=n(t.ASSETURI)),t.CONTENTPLAYHEAD&&(t.CONTENTPLAYHEAD=n(t.CONTENTPLAYHEAD)),t.ERRORCODE&&!/^[0-9]{3}$/.test(t.ERRORCODE)&&(t.ERRORCODE=900),t.CACHEBUSTING=r(Math.round(1e8*Math.random()).toString()),t.TIMESTAMP=n((new Date).toISOString()),t.RANDOM=t.random=t.CACHEBUSTING;for(var o=0,a=e;o<a.length;o++){var s=a[o];if("string"==typeof s){for(var u in t){var c=t[u],l="[".concat(u,"]"),d="%%".concat(u,"%%");s=(s=s.replace(l,c)).replace(d,c)}i.push(s)}}return i}function n(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,i){for(var n=[],r=e<t,o=i?r?t+1:t-1:t,a=e;r?a<o:a>o;r?a++:a--)n.push(a);return n}Object.defineProperty(t,"__esModule",{value:!0}),t.util=void 0,t.util={track:function(e,t){i(e,t).forEach(function(e){"undefined"!=typeof window&&null!==window&&((new Image).src=e)})},resolveURLTemplates:i,encodeURIComponentRFC3986:n,leftpad:r,range:o,isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},flatten:function e(t){return t.reduce(function(t,i){return t.concat(Array.isArray(i)?e(i):i)},[])}}},6036:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.VASTClient=void 0;var n=i(1100),r=i(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 n.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)},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 i=this;void 0===t&&(t={});var n=Date.now();return(t=Object.assign(this.defaultOptions,t)).hasOwnProperty("resolveAll")||(t.resolveAll=!1),this.totalCallsTimeout<n?(this.totalCalls=1,this.totalCallsTimeout=n+36e5):this.totalCalls++,new Promise(function(r,o){if(i.cappingFreeLunch>=i.totalCalls)return o(Error("VAST call canceled – FreeLunch capping not reached yet ".concat(i.totalCalls,"/").concat(i.cappingFreeLunch)));var a=n-i.lastSuccessfulAd;if(a<0)i.lastSuccessfulAd=0;else if(a<i.cappingMinimumTimeInterval)return o(Error("VAST call canceled – (".concat(i.cappingMinimumTimeInterval,")ms minimum interval reached")));i.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)}])},221:function(e){"use strict";self,e.exports=(self.webpackChunkbitmovin_player=self.webpackChunkbitmovin_player||[]).push([[399],{93500:function(e,t){var i;Object.defineProperty(t,"__esModule",{value:!0}),t.ImaPassthroughMode=void 0,function(e){e.None="none",e.Vast="vast",e.VastAndVmap="vastandvmap"}(i||(t.ImaPassthroughMode=i={}))},39401:function(e,t){var i;Object.defineProperty(t,"__esModule",{value:!0}),t.ImaInternalAdbreakState=void 0,t.ImaInternalAdBreaksTracker=function(e,t){var n=null,r=e.getCuePoints(),o=r.map(function(e){return{state:i.SCHEDULED,position:e,ads:[]}}),a=function(e){var t=e.getAd();t&&f(t,i.PLAYING)},s=function(e){var t=e.getAd();t&&f(t,i.PLAYED)},u=function(e){var t=e.getAd();t&&f(t,i.SKIPPED)},c=function(e){var t=e.getAd();t&&f(t,i.LOADED)},l=function(e){var t=e.getAd();t&&(n=t)},d=function(e){var t,r,a=e.getAdData();if(a.adError&&n){var s=n.getAdPodInfo().getTimeOffset(),u=o.find(function(e){return e.position===s});u&&[i.SCHEDULED,i.LOADED].includes(u.state)&&f(n,i.PLAYED)}(null==(r=null==(t=a.adError)?void 0:t.data)?void 0:r.errorCode)===google.ima.AdError.ErrorCode.VAST_EMPTY_RESPONSE&&o.forEach(function(e){return e.state=i.PLAYED})},h=function(e){var t=e.getError();if(t&&n){var r=n.getAdPodInfo().getTimeOffset(),a=o.find(function(e){return e.position===r});a&&[i.SCHEDULED,i.LOADED].includes(a.state)&&f(n,i.PLAYED)}(null==t?void 0:t.getErrorCode())===google.ima.AdError.ErrorCode.VAST_EMPTY_RESPONSE&&o.forEach(function(e){return e.state=i.PLAYED})};function p(e){var t,n=e.getAd();if(n){var r=n.getAdPodInfo().getTimeOffset();void 0!==r&&n.isLinear()&&(null==(t=o.find(function(e){return e.position===r}))||t.ads.push({id:n.getAdId(),state:i.LOADED}))}}function f(e,t){var n=e.getAdPodInfo().getTimeOffset(),r=e.getAdId();if(void 0!==n){var a=o.find(function(e){return e.position===n});if(!a)return;var s=a.ads.findIndex(function(e){return e.id===r});-1!==s&&(a.ads[s].state=t,function(e){return e.every(function(e){return e.state===i.PLAYED||e.state===i.SKIPPED})}(a.ads)?(a.state=i.PLAYED,function(e){o.filter(function(t){return t.state===i.SCHEDULED&&t.position<e&&t.position>0}).forEach(function(e){e.state=i.MISSED})}(n),function(e){o.filter(function(t){return t.state===i.MISSED&&t.position>e}).forEach(function(e){e.state=i.SCHEDULED})}(n)):a.state=t)}}return e.addEventListener(google.ima.AdEvent.Type.LOADED,p),e.addEventListener(google.ima.AdEvent.Type.AD_BREAK_READY,c),e.addEventListener(google.ima.AdEvent.Type.STARTED,a),e.addEventListener(google.ima.AdEvent.Type.COMPLETE,s),e.addEventListener(google.ima.AdEvent.Type.SKIPPED,u),e.addEventListener(google.ima.AdEvent.Type.LOG,d),e.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,h),e.addEventListener(google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,l),{updateAdBreakState:f,reset:function(){n=null,o=[],r=[],e.removeEventListener(google.ima.AdEvent.Type.LOADED,p),e.removeEventListener(google.ima.AdEvent.Type.AD_BREAK_READY,c),e.removeEventListener(google.ima.AdEvent.Type.STARTED,a),e.removeEventListener(google.ima.AdEvent.Type.COMPLETE,s),e.removeEventListener(google.ima.AdEvent.Type.SKIPPED,u),e.removeEventListener(google.ima.AdEvent.Type.LOG,d),e.removeEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,h),e.removeEventListener(google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,l)},hasAdBreaksToPlay:function(e){return o.some(function(n){var r=n.position,o=[i.SCHEDULED,i.LOADED].includes(n.state);return!(n.state===i.LOADED&&0===n.ads.length&&r<=e+2)&&(-1===r?o&&e>=t-2:o&&r<=e+2)})},getImaInternalAdBreaks:function(){return o}}},function(e){e.SCHEDULED="SCHEDULED",e.LOADED="LOADED",e.PLAYING="PLAYING",e.PLAYED="PLAYED",e.SKIPPED="SKIPPED",e.MISSED="MISSED"}(i||(t.ImaInternalAdbreakState=i={}))},5181:function(e,t,i){var n=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||({__proto__:[]}
1)instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(t,i)};return function(t,i){if("function"!=typeof i&&null!==i)throw TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},o=this&&this.__spreadArray||function(e,t,i){if(i||2==arguments.length)for(var n,r=0,o=t.length;r<o;r++)!n&&r in t||(n||(n=Array.prototype.slice.call(t,0,r)),n[r]=t[r]);return e.concat(n||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.ImaModule=void 0;var a=i(45202),s=i(3714),u=i(34841),c=i(65348),l=i(43767),d=i(89927),h=i(88844),p=i(23068),f=i(70850),g=i(45392),m=i(90176),y=i(28412),v=i(28610),S=i(23912),b=i(6365),E=i(47091),T=i(5838),_=i(93500),A=i(71751),P=i(39401),M=i(73134),I=i(62899);function R(e){for(var t=[],i=1;i<arguments.length;i++)t[i-1]=arguments[i];e&&"function"==typeof e&&e.apply(void 0,t)}function C(e,t){return e.scheduleTime-e.preloadOffset-(t.scheduleTime-t.preloadOffset)}function O(e,t){var i=t.getAd();if(i){if(e.isLinear=i.isLinear(),1===Object.keys(i).length){var n=i[Object.keys(i)[0]].clickThroughUrl;n&&(e.clickThroughUrl=n)}var r=i.getMediaUrl();r&&(e.mediaFileUrl=r),e.data=(0,A.collectAdData)(t)}}t.ImaModule=function(e){function t(t,i){var n=e.call(this,t,i)||this;return n.Rh=!0,n.Uh=function(e){n.zh.restoreCustomPlaybackStateOnAdBreakComplete=!1,n.zh.loadVideoTimeout=n.Fh,n.Ch=e.getAdsManager(n.player.getVideoElement(),n.zh);var t=n.player.getVideoElement().duration;n.Dh=(0,P.ImaInternalAdBreaksTracker)(n.Ch,t),n.Ch.addEventListener(google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,n.Zh),n.Ch.addEventListener(google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,n.ah),n.Ch.addEventListener(google.ima.AdEvent.Type.STARTED,n.ih),n.Ch.addEventListener(google.ima.AdEvent.Type.LOADED,n.fh),n.Ch.addEventListener(google.ima.AdEvent.Type.SKIPPED,n.ph),n.Ch.addEventListener(google.ima.AdEvent.Type.COMPLETE,n.qh),n.Ch.addEventListener(google.ima.AdEvent.Type.PAUSED,n.Ei),n.Ch.addEventListener(google.ima.AdEvent.Type.RESUMED,n.Fi),n.Ch.addEventListener(google.ima.AdEvent.Type.CLICK,n.Gi),n.Ch.addEventListener(google.ima.AdEvent.Type.DURATION_CHANGE,n.Ii),n.Ch.addEventListener(google.ima.AdEvent.Type.FIRST_QUARTILE,n.Ji),n.Ch.addEventListener(google.ima.AdEvent.Type.MIDPOINT,n.Ki),n.Ch.addEventListener(google.ima.AdEvent.Type.THIRD_QUARTILE,n.Li),n.Ch.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,n.Wh),n.Ch.addEventListener(google.ima.AdEvent.Type.INTERACTION,n.Hi),n.Ch.addEventListener(google.ima.AdEvent.Type.ALL_ADS_COMPLETED,n.rh),R(n.config.onAdsManagerAvailable,n.Ch),n.Ch.init(n.xh.clientWidth,n.xh.clientHeight,google.ima.ViewMode.NORMAL),n.Ch.setVolume(n.player.getVolume()/100),n.getActiveAdBreak()||n.Vh()},n.Wh=function(e){var t,i=n.getActiveAdBreak(),r=e.getError(),o=r.getInnerError(),a=r.getErrorCode(),s=null!=o&&o.getErrorCode?o:null;if(i){if(null==(t=n.hg)||t.then(function(){return(0,g.pingVmapTrackingUrls)(i.trackingEvents,v.VmapTrackingEventType.Error)}),function(e){return e===google.ima.AdError.ErrorCode.VAST_EMPTY_RESPONSE||e===google.ima.AdError.ErrorCode.VAST_NO_ADS_AFTER_WRAPPER}(a)&&!n.hg&&((0,g.pingVmapTrackingUrls)(i.trackingEvents,v.VmapTrackingEventType.BreakStart),
vendor: 21,436 bytes, line 1
1(0,g.pingVmapTrackingUrls)(i.trackingEvents,v.VmapTrackingEventType.Error),(0,g.pingVmapTrackingUrls)(i.trackingEvents,v.VmapTrackingEventType.BreakEnd)),s&&s.getErrorCode()===google.ima.AdError.ErrorCode.AUTOPLAY_DISALLOWED)return n.Nh||(n.ag=[i].concat(n.cg,n.ag),n.cg=[]),void n.Yh(s);n.Gh.includes(r.getErrorCode())?n.Zi(i).then(function(e){if(e.manifest)n.ci(i,e.manifest,!0);else{if(i.passthroughMode===_.ImaPassthroughMode.None)return Promise.reject();n.ci(i,null,!0)}}).catch(function(){return n.Yh(r)}):n.Yh(r)}else n.Yh(r)},n.Zh=function(e){n.Qh=!0,(n.hg?n.Ci(!1):Promise.resolve()).then(function(){var t=r({},n.getActiveAdBreak());if(n.Ui(t),!t){var i=n.player.getVideoElement().currentTime;t={tag:null,id:f.Util.generateUniqueId(),position:String(i),scheduleTime:i}}n.hg=n.player.requestAdPlayback(n.gh(e,t)),n.sh=n.hg.then(function(e){return e.requestReporter()}),n.hg.then(function(){return(0,g.pingVmapTrackingUrls)(t.trackingEvents,v.VmapTrackingEventType.BreakStart)});var o=e.getAd();n.lh(o.isLinear(),o.getWidth(),o.getHeight())})},n.ah=function(){var e,t,i=null==(e=n.Dh)?void 0:e.hasAdBreaksToPlay(n.eg),r=n.getActiveAdBreak();null==(t=n.hg)||t.then(function(){return(0,g.pingVmapTrackingUrls)(null==r?void 0:r.trackingEvents,v.VmapTrackingEventType.BreakEnd)}),i||(n.gg&&n.qh(),n.Qh=!1,n.Ph&&(n.Ph=!1,r&&delete r.currentFallbackIndex),n.fg=null,n.Oh=!1,n.yh.style.display="none",n.hg?n.hg.then(function(e){n.cg.length>0?n.ai(n.cg.shift()):e.done().then(function(){n.hg=null,n.bh()})}):n.bh())},n.fh=function(e){var t=n.getActiveAdBreak();t&&n.ch(n.gh(e,t))},n.ih=function(e){(n.fg||n.gg)&&(n.lh(e.getAd().isLinear(),e.getAd().getWidth(),e.getAd().getHeight()),n.gg||n.hh(e),n.fg&&(n.fg.ads=n.fg.ads||[],n.fg.ads.includes(n.gg)||n.fg.ads.push(n.gg)),n.config&&n.config.companionAdContainers&&n.nh(n.config.companionAdContainers(),e),n.gg.isLinear?n.jh(e):n.kh(e))},n.oh=function(){if(n.sh){var e=n.currentTime();e!==n.uh&&e>0&&n.sh.then(function(t){return t.timeupdate(e)}),n.uh=e}},n.ph=function(){n.Di(),n.sh&&n.sh.then(function(e){return e.skipped()})},n.qh=function(){var e;n.Mi(),n.Di(),n.sh&&(n.sh.then(function(e){return e.done()}),n.sh=null==(e=n.hg)?void 0:e.then(function(e){return e.requestReporter()}))},n.rh=function(){n.Rh||(n.Ch.destroy(),n.Bh.contentComplete())},n.Ei=function(){n.Oh=!1,n.sh.then(function(e){return e.paused(n.currentTime())})},n.Fi=function(){n.Oh=!0,n.sh.then(function(e){return e.resumed(n.currentTime())})},n.Gi=function(){var e=n.gg?n.gg.clickThroughUrl:null;n.player.adClicked(e)},n.Hi=function(e){var t;n.player.adInteraction(s.AdInteractionType.Vpaid,null==(t=e.getAdData())?void 0:t.id)},n.Ii=function(e){n.Eh=e.getAd().getDuration()},n.Ji=function(){n.player.onQuartile(s.AdQuartile.FIRST_QUARTILE),n.wh.push(s.AdQuartile.FIRST_QUARTILE)},n.Ki=function(){n.player.onQuartile(s.AdQuartile.MIDPOINT),n.wh.push(s.AdQuartile.MIDPOINT)},n.Li=function(){n.player.onQuartile(s.AdQuartile.THIRD_QUARTILE),n.wh.push(s.AdQuartile.THIRD_QUARTILE)},n.Ni=function(e){var t=n.config.strategy.shouldLoadAdBreak(e);return t||n.Oi(e),t},n.ag=[],n.bg=[],n.cg=[],n.dg=[],n.eg=0,n.fg=null,n.gg=null,n.Dh=null,n.Fh=i.videoLoadTimeout,n.Gh=[],n.Qh=!1,n.wh=[],n.Kh=!1,n.Lh=!1,n.Mh=Promise.resolve(null),n.Oh=!1,n.Ph=!1,n.config.placeholders=r(r({},m.adTagPlaceholderDefaults),n.config.placeholders),n.Ih=new u.Deferred,n.Hh=l.FileLoader.getInstance().loadScript(i.sdkUrl),n}return n(t,e),t.prototype.Sh=function(){"function"==typeof this.config.adContainer&&(this.yh=this.config.adContainer(),this.yh instanceof HTMLElement?this.Kh=!0:this.player.onError(E.VastErrorCode.UNDEFINED_ERROR,"AdvertisingConfig.adContainer was defined but did not provide a valid HTMLElement.")),this.Kh||(this.yh=c.DOMHelper.createTag("div",{class:a.Environment.idPrefix+"ima-container"},{height:"100%",width:"100%",display:"none",border:"none",overflow:"hidden",position:"absolute",top:"0"}),this.xh=this.player.getVideoElement().parentElement,this.xh.appendChild(this.yh)),R(this.config.onAdContainerAvailable,this.yh)},t.prototype.initialize=function(){var e=this;this.Hh.then(function(){e.Sh(),e.Th(),e.Lh=!0}).catch(function(){e.player.onError(M.ImaModuleErrorCode.FAILED_TO_REQUEST_IMA_SDK,"could not load the IMA SDK"),e.Lh=!1,e.Ih.resolve()})},t.prototype.Th=function(){google.ima.settings.setPlayerType("bitmovin-player"),google.ima.settings.setNumRedirects(25),google.ima.settings.setCookiesEnabled(this.config.withCredentials),R(this.config.beforeInitialization,google.ima.settings),this.zh=new google.ima.AdsRenderingSettings,this.config.allowedUiElements&&(this.zh.uiElements=this.config.allowedUiElements),this.Ah=new google.ima.AdDisplayContainer(this.yh,this.player.getVideoElement()),this.Ah.initialize(),this.Bh=new google.ima.AdsLoader(this.Ah),this.Bh.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,this.Wh),this.Bh.addEventListener(google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,this.Uh),this.Gh=[100,404,google.ima.AdError.ErrorCode.COMPANION_REQUIRED_ERROR,google.ima.AdError.ErrorCode.FAILED_TO_REQUEST_ADS,google.ima.AdError.ErrorCode.NONLINEAR_DIMENSIONS_ERROR,google.ima.AdError.ErrorCode.UNKNOWN_AD_RESPONSE,google.ima.AdError.ErrorCode.UNKNOWN_ERROR,google.ima.AdError.ErrorCode.VAST_ASSET_NOT_FOUND,google.ima.AdError.ErrorCode.VAST_EMPTY_RESPONSE,google.ima.AdError.ErrorCode.VAST_LINEAR_ASSET_MISMATCH,google.ima.AdError.ErrorCode.VAST_LOAD_TIMEOUT,google.ima.AdError.ErrorCode.VAST_MALFORMED_RESPONSE,google.ima.AdError.ErrorCode.VAST_NO_ADS_AFTER_WRAPPER,google.ima.AdError.ErrorCode.VAST_SCHEMA_VALIDATION_ERROR,google.ima.AdError.ErrorCode.VAST_TOO_MANY_REDIRECTS,google.ima.AdError.ErrorCode.VAST_TRAFFICKING_ERROR,google.ima.AdError.ErrorCode.VAST_UNSUPPORTED_VERSION,google.ima.AdError.ErrorCode.VAST_WRAPPER_ERROR,1012],this.Ih.resolve()},t.prototype.Vh=function(){this.hg&&this.Ci(),this.vh=null},t.prototype.Xh=function(){this.bh(),this.Qh||this.Ci().catch(function(){})},t.prototype.Yh=function(e){this.player.onError(e.getErrorCode(),e.getMessage(),this.getActiveAdBreak()),this.Di(),this.fg=null,this.cg.length>0?this.ai(this.cg.shift()):this.Xh()},t.prototype.bh=function(){this.Jh&&(this.Jh.resolve(),this.Jh=null)},t.prototype.ch=function(e){e.passthroughMode!==_.ImaPassthroughMode.None&&this.dh(e),this.vh=null,e.hasOwnProperty("ads")||(e.ads=[]),this.eh(e)},t.prototype.dh=function(e){var t=(0,p.isNumber)(e.currentFallbackIndex)&&e.currentFallbackIndex>=0?e.fallbackTags[e.currentFallbackIndex]:e.tag,i=this.vh&&t.type!==S.AdTagType.VMAP?{downloadTime:(0,d.toSeconds)(Date.now()-this.vh)}:null;this.player.metadataLoaded(e,i)},t.prototype.eh=function(e){this.config.strategy.shouldPlayAdBreak(e)?this.Ch.start():(this.fg=null,this.cg.length>0?this.ai(this.cg.shift()):this.bh())},t.prototype.gh=function(e,t){var i,n=r({},t);n.ads=t.ads?o([],t.ads,!0):[];var a=this.gg;return a||O(a={id:null==(i=e.getAd())?void 0:i.getAdId()},e),-1===n.ads.findIndex(function(t){var i;return t.id===(null==(i=e.getAd())?void 0:i.getAdId())})&&n.ads.push(a),n},t.prototype.hh=function(e){var t=this.getActiveAdBreak();if(t&&t.ads){var i=e.getAd().getAdId(),n=t.ads.find(function(e){return e.id===i});n&&(this.gg=n)}this.gg=this.gg||{id:e.getAd().getAdId()},O(this.gg,e)},t.prototype.jh=function(e){var t=this,i=e.getAd().getSkipTimeOffset();this.Eh=e.getAd().getDuration(),-1===this.Eh&&(this.Eh=null),this.gg.width=e.getAd().getVastMediaWidth(),this.gg.height=e.getAd().getVastMediaHeight(),this.gg.duration=this.Eh,this.gg.skippable=i!==b.NON_SKIPPABLE_IDENTIFIER,this.gg.skippable&&(this.gg.skippableAfter=i),this.Oh=!0,this.sh.then(function(e){e.started(t.gg),t.th=window.setInterval(t.oh,250)})},t.prototype.kh=function(e){this.cg.length>0?this.ai(this.cg.shift()):(this.gg.width=e.getAd().getWidth(),this.gg.height=e.getAd().getHeight(),this.player.overlayAdStarted(this.gg),this.Jh&&(this.Jh.resolve(),this.Jh=null)),this.fg=null},t.prototype.lh=function(e,t,i){this.yh.style.display="block",this.Kh||(e?(this.yh.style.width="100%",this.yh.style.height="100%",this.yh.style.top="0",this.yh.style.bottom="",this.yh.style.left="",this.yh.style.right="",this.yh.style.marginLeft="",this.yh.style.marginRight=""):(this.yh.style.width=t+"px",this.yh.style.height=i+"px",this.yh.style.top="",this.yh.style.bottom=b.DEFAULT_OVERLAY_AD_BOTTOM_POSITION,this.yh.style.left="0",this.yh.style.right="0",this.yh.style.marginLeft="auto",this.yh.style.marginRight="auto")),this.mh(e,t,i)},t.prototype.mh=function(e,t,i){var n=this.yh.firstElementChild;n&&(e?(n.style.width="100%",n.style.height="100%"):(n.style.width=t+"px",n.style.height=i+"px"));var r=n.getElementsByTagName("iframe")[0];r&&(e?(r.style.width="100%",r.style.height="100%"):(r.style.width=t+"px",r.style.height=i+"px"))},t.prototype.nh=function(e,t){var i=this,n=t.getAd();n&&e.forEach(function(e){var t=(0,I.selectCompanionAd)(e,n);"innerHTML"in e&&void 0!==t&&(i.gg.hasOwnProperty("companionAds")||(i.gg.companionAds=[]),i.gg.companionAds.push({width:t.getWidth(),height:t.getHeight()}),e.innerHTML=t.getContent())})},t.prototype.Ci=function(e){if(void 0===e&&(e=!0),!this.hg)return Promise.resolve();var t=this.hg.then(function(t){return t.done(e)});return this.hg=null,t},t.prototype.Di=function(){this.gg&&this.gg.companionAds&&this.config.companionAdContainers().forEach(function(e){return e.innerHTML=""}),(0,h.clearIntervalIfDefined)(this.th),this.th=null,this.gg=null,this.Oh=!1,this.uh=null,this.wh=[]},t.prototype.Mi=function(){var e=this;[s.AdQuartile.FIRST_QUARTILE,s.AdQuartile.MIDPOINT,s.AdQuartile.THIRD_QUARTILE].filter(function(t){return!e.wh.includes(t)}).forEach(function(t){e.player.onQuartile(t)})},t.prototype.onTimeChanged=function(e){var t=this;if(!this.isLinearAdActive()){this.Nh=!0,this.eg=e;var i=this.ag.filter(function(t){return t.preloadOffset&&!t.vastResponse&&t.scheduleTime-t.preloadOffset<=e}),n=this.ag.filter(function(t){return t.scheduleTime<=e&&!t.isScheduled});i.filter(this.Ni).forEach(function(e){return t.Yi(e)}),n.filter(function(e){return!!e.vastResponse||t.Ni(e)}).forEach(function(e){e.isScheduled=!0,t.Yi(e).then(function(){t.ag.includes(e)&&t.ai(e)})})}},t.prototype.Oi=function(e){e.discardAfterPlayback?this.discardAdBreak(e.id):e.isScheduled=!0},t.prototype.Pi=function(e){this.ag.forEach(function(t){return t.scheduleTime>=e&&(t.isScheduled=!1)})},t.prototype.onSeek=function(e,t){this.Pi(t);var i=this.ag.filter(function(e){return e.scheduleTime<=t&&!e.isScheduled});if(this.ag=this.ag.filter(function(e){return!i.includes(e)}),i.length>0){var n=this.config.strategy.shouldPlaySkippedAdBreaks(o([],i,!0),e,t);(i=i.filter(function(e){return!e.discardAfterPlayback||n.includes(e)})).forEach(function(e){return e.isScheduled=!0}),n.forEach(function(e){var t=i.findIndex(function(t){return t===e});t>-1&&(i[t].isScheduled=!1)}),this.ag=i.concat(this.ag)}},t.prototype.onResize=function(e,t,i){if(this.Ch&&(!this.gg||this.gg.isLinear)){var n=i?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL;this.Ch.resize(e,t,n)}},t.prototype.onVolumeChanged=function(e){this.Ch&&this.Ch.setVolume(e/100)},t.prototype.beforeContent=function(){var e=this;return this.Vi(this.bg.splice(0,this.bg.length)),this.Hh.then(function(){return e.Lh?e.Mh.catch(function(){}).then(function(){return e.Xi("pre")}):Promise.resolve()})},t.prototype.afterContent=function(){var e=this;return this.Lh?(this.gg&&!this.gg.isLinear&&(this.Di(),this.fg=null,this.Ch.stop()),this.Bh.contentComplete(),this.Xi("post").then(function(){return e.Pi(0)})):Promise.resolve()},t.prototype.Qi=function(e){return Object.keys(_.ImaPassthroughMode).some(function(t){return e===_.ImaPassthroughMode[t]})},t.prototype.Ri=function(e){e.fallbackTags&&e.fallbackTags.length>0&&(e.fallbackTags=e.fallbackTags.filter(function(e){return!!e.url})),this.Qi(e.passthroughMode)||(e.passthroughMode=_.ImaPassthroughMode.Vast);var t=e;return t.position?t.position=String(t.position).toLowerCase():t.position=b.DEFAULT_AD_BREAK_POSITION,"number"!=typeof t.preloadOffset&&(t.preloadOffset=b.DEFAULT_PRELOAD_OFFSET),t},t.prototype.Si=function(e){return e.tag?e.tag.url?Object.keys(S.AdTagType).some(function(t){return e.tag.type===S.AdTagType[t]})?void 0:"The provided ad tag type is invalid":"No ad tag url was provided":"No ad tag was provided"},t.prototype.Ti=function(e,t){return e.map(function(e){var i=r(r({},e.publicAdBreakConfig),{isScheduled:!1,parentAdTag:t.tag});return e.trackingEvents&&(i.trackingEvents=e.trackingEvents),void 0===i.id&&(i.id=f.Util.generateUniqueId()),i})},t.prototype.Ui=function(e){return delete e.isScheduled,delete e.parentAdTag,e},t.prototype.schedule=function(e){var t=this;return this.Mh=this.Ih.promise.then(function(){if(!t.Lh)return Promise.reject("The IMA SDK was not loaded and initialized properly");var i=t.Si(e);if(i)return Promise.reject(i);var n=t.Ri(e);return t.Wi(n).then(function(i){if(0===i.length&&n.fallbackTags&&n.fallbackTags.length>0)return n.tag=n.fallbackTags.shift(),t.schedule(n);var a=t.Ti(i,e);return a.forEach(function(t){return t.discardAfterPlayback=!1!==e.discardAfterPlayback}),Promise.resolve(o([],t.Vi(a).map(function(e){var i=r({},e);return t.Ui(i),i}),!0))})})},t.prototype.Vi=function(e){var t=this,i=[];e.forEach(function(e){var n=t.player.parsePosition(e.position);isNaN(n)?t.bg.push(e):(e.scheduleTime=n,i.push(e))});var n=i.filter(function(e){return e.persistent});return this.ag=this.ag.concat(i),this.dg=this.dg.concat(n),this.ag.sort(C),this.dg.sort(C),i},t.prototype.Wi=function(e){var t=this;return new Promise(function(i){if(e.tag.type===S.AdTagType.VMAP&&e.passthroughMode!==_.ImaPassthroughMode.VastAndVmap){var n=e.tag.url;e.tag.url=t.fi(e.tag.url),T.VmapExtractor.extractAdBreakConfigs(e).then(function(r){var o=r.adBreakConfigs.filter(function(e){var i=t.player.parsePosition(e.publicAdBreakConfig.position);return isNaN(i)||i>=t.eg});e.tag.url=n,t.player.metadataLoaded(e,r.downloadTiming),i(o)}).catch(function(r){e.tag.url=n,r?t.player.onError(r.code,null,e):t.player.onError(E.VastErrorCode.UNDEFINED_ERROR,null,e),i([])})}else i([{publicAdBreakConfig:e}])})},t.prototype.Xi=function(e){var t=this;return this.Ih.promise.then(function(){if(!t.Lh)return Promise.resolve();var i="post"===e?t.ag.filter(function(t){return t.position.includes(e)||t.scheduleTime===1/0}):t.ag.filter(function(t){return t.position.includes(e)||0===t.scheduleTime}),n=Promise.resolve();return(i=i.filter(t.Ni)).length>0&&(t.Jh=new u.Deferred,n=t.Jh.promise,i.forEach(function(e){e.isScheduled=!0,t.Yi(e).then(function(){return t.ai(e)})})),n})},t.prototype.Yi=function(e,t){var i=this,n=e.tag;if(t&&(e.vastResponse=null,n=t),e.vastResponse&&!t)return e.vastResponse;var r=this.fi(n.url);return e.passthroughMode!==_.ImaPassthroughMode.None?e.vastResponse=Promise.resolve({}):e.vastResponse=g.AdManifestHelper.downloadVastManifest(r).then(function(t){var n=t.manifest,r={manifest:g.AdManifestHelper.xmlToString(n)};return g.AdManifestHelper.parseAdVerifications(n).then(function(n){return n&&n.length>0&&(e.ads=[],n.forEach(function(t){t.verifications&&t.verifications.length>0&&e.ads.push({id:t.id,verifications:t.verifications})})),i.player.metadataLoaded(e,t.downloadTiming),Promise.resolve(r)})}).catch(function(t){return i.Zi(e).catch(function(){return delete e.currentFallbackIndex,t?i.player.onError(t.code,null,e):i.player.onError(E.VastErrorCode.UNDEFINED_ERROR,null,e),Promise.resolve({})})}),e.vastResponse},t.prototype.Zi=function(e){return"number"!=typeof e.currentFallbackIndex?e.currentFallbackIndex=0:e.currentFallbackIndex++,e.fallbackTags&&e.fallbackTags[e.currentFallbackIndex]?this.Yi(e,e.fallbackTags[e.currentFallbackIndex]):Promise.reject()},t.prototype.ai=function(e){var t=this;this.Ih.promise.then(function(){var i;if(t.Lh)if(t.ag.includes(e)&&e.discardAfterPlayback&&t.ag.splice(t.ag.indexOf(e),1),t.fg)t.cg.push(e);else{t.gg&&!t.gg.isLinear&&t.Ch&&(t.rh(),t.Di()),t.fg=e;var n=function(e){var i;return e.parentAdTag&&(null==(i=t.fg)?void 0:i.parentAdTag)&&e.parentAdTag===t.fg.parentAdTag};t.Rh=t.ag.some(n)||t.cg.some(n),null==(i=e.vastResponse)||i.then(function(i){return t.ci(e,i.manifest)})}})},t.prototype.bi=function(e){var t,i,n;return null!=(n=null==(i=null==(t=null==e?void 0:e.fallbackTags)?void 0:t[e.currentFallbackIndex])?void 0:i.url)?n:e.tag.url},t.prototype.ci=function(e,t,i){var n=t?g.AdManifestHelper.toDataUri(t):void 0,r=null!=n?n:this.bi(e);r&&this.di(r,i)},t.prototype.di=function(e,t){var i,n=new google.ima.AdsRequest,r=e;0===r.indexOf("data:text/xml,")?n.adsResponse=decodeURIComponent(r.substring(14)):n.adTagUrl=this.fi(e),this.xh&&(n.linearAdSlotWidth=this.xh.clientWidth,n.linearAdSlotHeight=this.xh.clientHeight,n.nonLinearAdSlotWidth=this.xh.clientWidth),(null==(i=this.config)?void 0:i.vastLoadTimeout)&&(n.vastLoadTimeout=this.config.vastLoadTimeout),this.ei(n),n.nonLinearAdSlotHeight=150,this.Ph=t,this.vh=Date.now(),this.Bh.requestAds(n)},t.prototype.ei=function(e){var t,i,n=null==(i=null==(t=this.config.trackers)?void 0:t.omSdk)?void 0:i.onAccessMode;if(void 0!==n&&"function"==typeof n){var r=n(e);if(r){var o={},a=function(e,t){t&&t.forEach(function(t){if("string"==typeof t){var i=google.ima.OmidVerificationVendor[t];void 0!==i&&(o[i]=e)}})};a(google.ima.OmidAccessMode.FULL,r.full),a(google.ima.OmidAccessMode.DOMAIN,r.domain),a(google.ima.OmidAccessMode.LIMITED,r.limited),Object.keys(o).length>0&&(e.omidAccessModeRules=o)}}},t.prototype.fi=function(e){var t=this,i={playbackTime:String(this.player.getVideoElement().currentTime),height:String(this.xh.clientHeight),width:String(this.xh.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.config.placeholders).forEach(function(n){t.config.placeholders[n].forEach(function(t){e=e.replace(t,i[n])})}),e},t.prototype.list=function(){var e=this,t=o(o([],this.cg.map(function(e){return r({},e)}),!0),this.ag.map(function(e){return r({},e)}),!0);return t.forEach(function(t){return e.Ui(t)}),t},t.prototype.getActiveAdBreak=function(){return this.fg},t.prototype.getActiveAd=function(){return this.gg},t.prototype.isLinearAdActive=function(e){return!!this.gg&&(e?!!this.gg.isLinear&&this.Oh:!!this.gg.isLinear)},t.prototype.discardAdBreak=function(e){e&&(this.fg&&this.fg.id===e&&(this.ph(),this.fg=null,this.Ch.stop()),this.ag=this.ag.filter(function(t){return t.id!==e}),this.cg=this.cg.filter(function(t){return t.id!==e}))},t.prototype.currentTime=function(){return!isFinite(this.Eh)||!this.Ch||0>this.Ch.getRemainingTime()?NaN:this.Eh-this.Ch.getRemainingTime()},t.prototype.duration=function(){return isFinite(this.Eh)?this.Eh:0},t.prototype.pause=function(){this.Ch&&this.Ch.pause()},t.prototype.resume=function(){this.Ch&&this.Ch.resume()},t.prototype.skip=function(){return this.Ch&&(this.Ch.skip(),this.gg&&!this.gg.isLinear&&(this.Ch.stop(),this.yh.style.display="none",this.Di())),Promise.resolve()},t.prototype.getModuleInfo=function(){return{name:"advertising-ima",version:a.Environment.VERSION_NUMBER}},t.prototype.gi=function(){var e=this.ag,t=this.bg;this.reset(!1),this.ag=e,this.bg=t,this.cleanUpImaSdk(),this.Ih=new u.Deferred,this.Lh=!1},t.prototype.reset=function(e){var t;return void 0===e&&(e=!0),this.hg=null,this.sh=null,this.getActiveAdBreak()&&(null==(t=this.Ch)||t.stop()),this.Di(),this.ag=this.dg,this.cg=[],this.eg=0,this.Eh=null,this.fg=null,this.Nh=!1,this.Ph=!1,this.vh=null,e&&(this.Mh=Promise.resolve(null)),this.cleanUpImaSdk(),this.Ih=new u.Deferred,this.Lh=!1,Promise.resolve()},t.prototype.cleanUpImaSdk=function(){var e;this.Bh&&(this.Bh.removeEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,this.Wh),this.Bh.removeEventListener(google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,this.Uh),this.Bh.destroy(),this.Bh=null),this.Ch&&(null==(e=this.Dh)||e.reset(),this.Dh=null,this.Ch.removeEventListener(google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,this.Zh),this.Ch.removeEventListener(google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,this.ah),this.Ch.removeEventListener(google.ima.AdEvent.Type.STARTED,this.ih),this.Ch.removeEventListener(google.ima.AdEvent.Type.LOADED,this.fh),this.Ch.removeEventListener(google.ima.AdEvent.Type.SKIPPED,this.ph),this.Ch.removeEventListener(google.ima.AdEvent.Type.COMPLETE,this.qh),this.Ch.removeEventListener(google.ima.AdEvent.Type.PAUSED,this.Ei),this.Ch.removeEventListener(google.ima.AdEvent.Type.RESUMED,this.Fi),this.Ch.removeEventListener(google.ima.AdEvent.Type.CLICK,this.Gi),this.Ch.removeEventListener(google.ima.AdEvent.Type.DURATION_CHANGE,this.Ii),this.Ch.removeEventListener(google.ima.AdEvent.Type.FIRST_QUARTILE,this.Ji),this.Ch.removeEventListener(google.ima.AdEvent.Type.MIDPOINT,this.Ki),this.Ch.removeEventListener(google.ima.AdEvent.Type.THIRD_QUARTILE,this.Li),this.Ch.removeEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,this.Wh),this.Ch.removeEventListener(google.ima.AdEvent.Type.INTERACTION,this.Hi),this.Ch.removeEventListener(google.ima.AdEvent.Type.ALL_ADS_COMPLETED,this.rh),this.Ch.destroy(),this.Ch=null),this.Ah&&(this.Ah.destroy(),this.Ah=null),this.zh=null},t.prototype.dispose=function(){this.Di(),this.cleanUpImaSdk(),this.xh&&this.xh.removeChild(this.yh),this.yh=null,this.fg=null,this.gg=null},t.imaMarker=function(){},t}(y.AdvertisingModule)},73134:function(e,t){var i;
1Object.defineProperty(t,"__esModule",{value:!0}),t.ImaModuleErrorCode=void 0,function(e){e[e.FAILED_TO_REQUEST_IMA_SDK=103]="FAILED_TO_REQUEST_IMA_SDK",e[e.VAST_NO_ADS_AFTER_WRAPPER=303]="VAST_NO_ADS_AFTER_WRAPPER",e[e.FAILED_TO_REQUEST_ADS=1005]="FAILED_TO_REQUEST_ADS",e[e.VAST_ASSET_NOT_FOUND=1007]="VAST_ASSET_NOT_FOUND",e[e.VAST_EMPTY_RESPONSE=1009]="VAST_EMPTY_RESPONSE",e[e.UNKNOWN_AD_RESPONSE=1010]="UNKNOWN_AD_RESPONSE",e[e.UNSUPPORTED_LOCALE=1011]="UNSUPPORTED_LOCALE",e[e.ADS_REQUEST_NETWORK_ERROR=1012]="ADS_REQUEST_NETWORK_ERROR",e[e.INVALID_AD_TAG=1013]="INVALID_AD_TAG",e[e.STREAM_INITIALIZATION_FAILED=1020]="STREAM_INITIALIZATION_FAILED",e[e.ASSET_FALLBACK_FAILED=1021]="ASSET_FALLBACK_FAILED",e[e.INVALID_ARGUMENTS=1101]="INVALID_ARGUMENTS",e[e.AUTOPLAY_DISALLOWED=1205]="AUTOPLAY_DISALLOWED"}(i||(t.ImaModuleErrorCode=i={}))},61647:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.ImaPassthroughMode=t.ImaModuleErrorCode=t.AdvertisingImaModuleDefinition=void 0;var n=i(62756),r=i(93500);Object.defineProperty(t,"ImaPassthroughMode",{enumerable:!0,get:function(){return r.ImaPassthroughMode}});var o=i(5181),a=i(73134);Object.defineProperty(t,"ImaModuleErrorCode",{enumerable:!0,get:function(){return a.ImaModuleErrorCode}}
1),t.AdvertisingImaModuleDefinition={name:n.ModuleName.Advertising,module:function(){return o.ImaModule},dependencies:[n.ModuleName.AdvertisingCore],exports:{ImaModuleErrorCode:a.ImaModuleErrorCode,ImaPassthroughMode:r.ImaPassthroughMode}},t.default=t.AdvertisingImaModuleDefinition},71751:function(e,t,i){var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.collectAdData=function(e){var t,i=e.getAd();return i?function(e){var t=n({},e);return Object.keys(t).forEach(function(e){var i=t[e],n=i&&"object"==typeof i&&!Object.keys(i).some(function(e){return!!i[e]});((0,r.isNumber)(i)&&i<0||!(0,r.isNumber)(i)&&!i||n)&&delete t[e]}),t}({adTitle:i.getTitle(),adSystem:{name:i.getAdSystem()},mimeType:i.getContentType(),bitrate:i.getVastMediaBitrate&&i.getVastMediaBitrate()>0?i.getVastMediaBitrate():-1,wrapperAdIds:i.getWrapperAdIds(),adDescription:i.getDescription(),advertiser:{name:i.getAdvertiserName()},apiFramework:null!=(t=i.getApiFramework())?t:void 0,creative:{id:i.getCreativeId(),adId:i.getCreativeAdId(),universalAdId:{idRegistry:i.getUniversalAdIdRegistry(),value:i.getUniversalAdIdValue()}},dealId:i.getDealId(),minSuggestedDuration:i.isLinear()?o.NON_SKIPPABLE_IDENTIFIER:i.getMinSuggestedDuration(),survey:a(i),traffickingParameters:i.getTraffickingParameters()}):{}};var r=i(23068),o=i(6365);function a(e){var t=e.getSurveyUrl();return t?{uri:t}:void 0}},62899:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.selectCompanionAd=function(e,t){var i=e.clientWidth,n=e.clientHeight,r=t.getCompanionAds(i,n,function(){var e=new google.ima.CompanionAdSelectionSettings;return e.resourceType=google.ima.CompanionAdSelectionSettings.ResourceType.STATIC,e.creativeType=google.ima.CompanionAdSelectionSettings.CreativeType.IMAGE,e.sizeCriteria=google.ima.CompanionAdSelectionSettings.SizeCriteria.SELECT_NEAR_MATCH,e}());return r.length>0?r[0]:t.getCompanionAds(i,n,function(){var e=new google.ima.CompanionAdSelectionSettings;return e.resourceType=google.ima.CompanionAdSelectionSettings.ResourceType.STATIC,e.creativeType=google.ima.CompanionAdSelectionSettings.CreativeType.IMAGE,e.sizeCriteria=google.ima.CompanionAdSelectionSettings.SizeCriteria.IGNORE,e}())[0]}}},function(e){return e(e.s=61647)}])},883:function(e){self,e.exports=(self.webpackChunkbitmovin_player=self.webpackChunkbitmovin_player||[]).push([[153],{30100:function(e){self,e.exports=function(){var e={92:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.post=function(e,t,i,o){void 0===o&&(o=!0),(0,r.isReactNative)()&&!o&&(o=!0);var a,s=!1;window.XDomainRequest?(a=new window.XDomainRequest,s=!0):a=new XMLHttpRequest;var u=function(){if(a.readyState==XMLHttpRequest.DONE&&!(a.responseText<=0)){var e=JSON.parse(a.responseText);i(e)}};s?a.onload=u:a.onreadystatechange=u;try{a.open("POST",e,o),s||a.setRequestHeader("Content-Type","text/plain"),a.send(JSON.stringify(t))}catch(e){n.logger.error("Failed to send POST request.",e)}};var n=i(1916),r=i(5063)},348:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Feature=void 0;var n=i(5063);t.Feature=function(){function e(){this._config=void 0,this._isEnabled=!0}return Object.defineProperty(e.prototype,"config",{get:function(){return this._config},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isEnabled",{get:function(){return this._isEnabled},enumerable:!1,configurable:!0}),e.prototype.disable=function(){this._isEnabled=!1,this.disabled()},e.prototype.configure=function(e,t){return(0,n.isNotNullish)(t)&&(this._config=this.extractConfig(t)),this.configured(e,this._config),this._config},e}()},399:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getWindowVideojsVersion=t.getWindowNavigatorUserAgent=t.getWindowNavigatorLanguage=t.hasWindowWebOSApi=t.getWindowWebOSApi=t.getWindowPerformance=t.getWindowLocationPathname=t.getWindowLocationHostname=t.removeWindowEventListener=t.addWindowEventListener=t.getW
1indowScreenDimensions=t.getWindowDevicePixelRatio=void 0;var n=i(1460),r=i(1820),o=i(5063);t.getWindowDevicePixelRatio=function(){return(0,o.isNullish)(window)||(0,o.isNullish)(window.devicePixelRatio)?1:window.devicePixelRatio>0?window.devicePixelRatio:1},t.getWindowScreenDimensions=function(){if(!(0,o.isNullish)(window)&&!(0,o.isNullish)(window.screen)&&(0,n.isNumber)(window.screen.width)&&(0,n.isNumber)(window.screen.height)){var e=(0,t.getWindowDevicePixelRatio)(),i=window.screen.width*e,r=window.screen.height*e;if(!(!isFinite(i)||!isFinite(r)||i<=0||r<=0))return{width:i,height:r,scale:e}}},t.addWindowEventListener=function(e,t){(0,o.isNullish)(window)||!(0,o.isFunction)(window.addEventListener)||(0,o.isNullish)(t)||window.addEventListener(e,t)},t.removeWindowEventListener=function(e,t){(0,o.isNullish)(window)||!(0,o.isFunction)(window.removeEventListener)||(0,o.isNullish)(t)||window.removeEventListener(e,t)},t.getWindowLocationHostname=function(){if(!(0,o.isNullish)(window)&&!(0,o.isNullish)(window.location)&&(0,r.isValidString)(window.location.hostname))return window.location.hostname},t.getWindowLocationPathname=function(){if(!(0,o.isNullish)(window)&&!(0,o.isNullish)(window.location)&&(0,r.isValidString)(window.location.pathname))return window.location.pathname},t.getWindowPerformance=function(){if(!(0,o.isNullish)(window))return window.performance},t.getWindowWebOSApi=function(){return(0,o.isNullish)(window)?{}:{webOSSystem:window.webOSSystem,PalmSystem:window.PalmSystem}},t.hasWindowWebOSApi=function(){var e=(0,t.getWindowWebOSApi)(),i=e.webOSSystem,n=e.PalmSystem;return!(0,o.isNullish)(i)||!(0,o.isNullish)(n)},t.getWindowNavigatorLanguage=function(){if(!(0,o.isNullish)(window)&&!(0,o.isNullish)(window.navigator))return window.navigator.language||window.navigator.userLanguage},t.getWindowNavigatorUserAgent=function(){if(!(0,o.isNullish)(null==window?void 0:window.navigator)&&(0,r.isValidString)(window.navigator.userAgent))return window.navigator.userAgent},t.getWindowVideojsVersion=function(){var e;if(!(0,o.isNullish)(window))return null==(e=window.videojs)?void 0:e.VERSION}},404:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CodecHelper=void 0;var i={avc:['video/mp4; codecs="avc1.42000a"'],vp9:['video/mp4; codecs="vp09.00.50.08"'],av1:['video/mp4; codecs="av01.0.08M.08"'],hevc:['video/mp4; codecs="hev1.1.6.L93.B0"']};t.CodecHelper=function(){function e(){}return Object.defineProperty(e,"supportedVideoFormats",{get:function(){var e=this;if("MediaSource"in window)return Object.getOwnPropertyNames(i).filter(function(t){return i[t].some(function(t){return e.isCodecSupported(t)})})},enumerable:!1,configurable:!0}),e.isCodecSupported=function(e){return"MediaSource"in window&&MediaSource.isTypeSupported(e)},e}()},436:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getPlayerConfig=function(e){try{if((0,n.isNullish)(e)||(0,n.isNullish)(e.getConfig()))return;return e.getConfig()}catch(e){return}};var n=i(5063)},556:function(e,t){"use strict";var i;Object.defineProperty(t,"__esModule",{value:!0}),t.Player=void 0,function(e){e.AMAZON_IVS="amazonivs",e.BITMOVIN="bitmovin",e.BITMOVIN_PWX="bitmovin-pwx",e.CHROMECAST_SHAKA="chromecast-shaka",e.DASHJS="dashjs",e.HLSJS="hlsjs",e.HTML5="html5",e.JW="jw",e.RADIANT="radiant",e.SHAKA="shaka",e.VIDEOJS="videojs"}(i||(t.Player=i={}))},665:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SpeedMeterAdapter=void 0,t.SpeedMeterAdapter=function(){function e(e,t){var i=this;this.meter=t,e.on(e.exports.PlayerEvent.DownloadFinished,function(e){return i.handleOnDownloadFinishEvent(e)})}return e.prototype.getDownloadSpeedMeter=function(){return this.meter},e.prototype.handleOnDownloadFinishEvent=function(e){e.success&&0===e.downloadType.indexOf("media/video")&&this.meter.addMeasurement({duration:e.downloadTime,size:e.size,timeToFirstByte:e.timeToFirstByte,timestamp:new Date,httpStatus:e.httpStatus})},e}()},675:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EventDispatcher=void 0,t.EventDispatcher=function(){function e(){this.callbacks=[]}return e.prototype.subscribe=function(e){var t=this;return this.callbacks.push(e),function(){return t.unsubscribe(e)}},e.prototype.dispatch=function(e){this.callbacks.slice(0).forEac
1h(function(t){t(e)})},e.prototype.unsubscribe=function(e){var t=this.callbacks.indexOf(e);t>-1&&this.callbacks.splice(t,1)},Object.defineProperty(e.prototype,"subscriberCount",{get:function(){return this.callbacks.length},enumerable:!1,configurable:!0}),e}()},681:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PlayerModule=void 0,t.PlayerModule={name:"analytics",module:{Analytics:i(4679).Bitmovin8Adapter},hooks:{setup:function(e,t){var i=t.getConfig(),n=!i,r=!1===(null==i?void 0:i.analytics);return n||r?Promise.resolve():Promise.resolve(new(0,e.Analytics)(t))}}}},847:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateCookieMaxAgeValue=t.validateCookieDomainValue=t.SessionPersistenceHandler=t.COOKIE_DEFAULT_MAX_AGE=t.COOKIE_NAME_BITMOVIN_ANALYTICS_UUID=void 0;var n=i(3848),r=i(1460),o=i(1820),a=i(5063),s=i(2982);t.COOKIE_NAME_BITMOVIN_ANALYTICS_UUID="bitmovin_analytics_uuid",t.COOKIE_DEFAULT_MAX_AGE=31536e3,t.SessionPersistenceHandler=function(e){var i=e.config;if(!1===(null==i?void 0:i.cookiesEnabled))return(0,n.deleteCookie)(t.COOKIE_NAME_BITMOVIN_ANALYTICS_UUID),void(this.userId=(0,s.generateUUID)());var r=(0,n.getCookie)(t.COOKIE_NAME_BITMOVIN_ANALYTICS_UUID);this.userId=(0,a.isNotNullish)(r)&&!(0,o.isBlank)(r)?r:(0,s.generateUUID)();var u=(0,t.validateCookieDomainValue)(null==i?void 0:i.cookiesDomain),c=(0,t.validateCookieMaxAgeValue)(null==i?void 0:i.cookiesMaxAge),l=new Date(Date.now()+1e3*c).toUTCString();(0,n.setCookie)(t.COOKIE_NAME_BITMOVIN_ANALYTICS_UUID,this.userId,{domain:u,expires:l,maxAge:c})},t.validateCookieDomainValue=function(e){if(!(0,a.isNullish)(e)&&(0,o.isValidString)(e)&&!(0,o.isBlank)(e))return encodeURIComponent(e)},t.validateCookieMaxAgeValue=function(e){return(0,a.isNullish)(e)?t.COOKIE_DEFAULT_MAX_AGE:(0,r.isNumber)(e)?e:t.COOKIE_DEFAULT_MAX_AGE}},887:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Bitmovin8AdModule=void 0;var n=i(5517);t.Bitmovin8AdModule=function(){function e(e,t){var i=this;this.player=e,this.windowEventTracker=t,this.adCallbacks=new n.AdCallbacks,this.isLinearAdActive=function(){return i.player.ads&&i.player.ads.isLinearAdActive()||!1},this.getContainer=function(){return i.player.getContainer()},this.getAdModuleInfo=function(){return i.player.ads?i.player.ads.getModuleInfo():{name:void 0,version:void 0}},this.currentTime=function(){return i.player.getCurrentTime()},this.register()}return e.prototype.register=function(){var e=this;this.player.on(this.player.exports.PlayerEvent.Play,function(t){"advertising-api"===t.issuer&&e.adCallbacks.onPlay(t.issuer)}),this.player.on(this.player.exports.PlayerEvent.Paused,function(t){"advertising-api"===t.issuer&&e.adCallbacks.onPause(t.issuer)}),this.player.on(this.player.exports.PlayerEvent.AdStarted,function(t){e.adCallbacks.onAdStarted(t)}),this.player.on(this.player.exports.PlayerEvent.AdFinished,function(t){e.adCallbacks.onAdFinished(t)}),this.player.on(this.player.exports.PlayerEvent.AdBreakStarted,function(t){e.adCallbacks.onAdBreakStarted(t)}),this.player.on(this.player.exports.PlayerEvent.AdBreakFinished,function(t){e.adCallbacks.onAdBreakFinished(t)}),this.player.on(this.player.exports.PlayerEvent.AdClicked,function(t){e.adCallbacks.onAdClicked(t)}),this.player.on(this.player.exports.PlayerEvent.AdQuartile,function(t){e.adCallbacks.onAdQuartile(t)}),this.player.on(this.player.exports.PlayerEvent.AdSkipped,function(t){e.adCallbacks.onAdSkipped(t)}),this.player.on(this.player.exports.PlayerEvent.AdError,function(t){e.adCallbacks.onAdError(t)}),this.player.on(this.player.exports.PlayerEvent.AdManifestLoaded,function(t){e.adCallbacks.onAdManifestLoaded(t)});var t=function(){e.adCallbacks.onBeforeUnload()};this.windowEventTracker.addEventListener("beforeunload",t),this.windowEventTracker.addEventListener("unload",t)},e}()},1125:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QueueBackend=void 0,t.QueueBackend=function(){function e(){this.queue=[],this.unloadQueue=[],this.syncQueue=[],this.adQueue=[]}return e.prototype.sendRequest=function(e){this.queue.push(e)},e.prototype.sendUnloadRequest=function(e){this.unloadQueue.push(e)},e.prototype.sendRequestSynchronous=function(e){this.syncQueue.push(e)},e.prototype.sendAdRequest=function(e){this.adQueue.push(e)},e.prototype.flushTo=function(e){this.queue.forEach(function(t){e.sendRequest(t)}),this.unloadQueue.forEach(function(t){e.sendUnloadRequest(t)}),this.syncQueue.forEach(function(t){e.sendRequestSynchronous(t)}),this.adQueue.forEach(function(t){e.sendAdRequest(t)})},e}()},1460:function(e,t,i){"use strict";
vendor: 4,782 bytes, line 1
1Object.defineProperty(t,"__esModule",{value:!0}),t.isFiniteNumber=t.isNumber=void 0;var n=i(5063);t.isNumber=function(e){return!(0,n.isNullish)(e)&&"number"==typeof e},t.isFiniteNumber=function(e){return!!(0,t.isNumber)(e)&&((0,n.isFunction)(Number.isFinite)?Number.isFinite(e):isFinite(e))}},1652:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EventDebugging=void 0,t.EventDebugging=function(e,t,i,n,r){this.event=e,this.from=t,this.to=i,this.timestamp=n,this.eventObject=r}},1820:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.startsWith=t.endsWith=t.isBlank=t.isEmpty=t.isValidString=void 0;var n=i(5063);t.isValidString=function(e){return(0,n.isNotNullish)(e)&&"string"==typeof e},t.isEmpty=function(e){return(0,n.isNullish)(e)||0===e.length},t.isBlank=function(e){return(0,t.isEmpty)(e)||(0,t.isEmpty)(null==e?void 0:e.trim())},t.endsWith=function(e,i){return!(!(0,t.isValidString)(e)||!(0,t.isValidString)(i))&&((0,n.isFunction)(String.prototype.endsWith)?e.endsWith(i):e.substring(e.length-i.length)===i)},t.startsWith=function(e,i){return!(!(0,t.isValidString)(e)||!(0,t.isValidString)(i))&&((0,n.isFunction)(String.prototype.startsWith)?e.startsWith(i):e.substring(0,i.length)===i)}},1916:function(e,t){"use strict";var i=this&&this.__spreadArray||function(e,t,i){if(i||2==arguments.length)for(var n,r=0,o=t.length;r<o;r++)!n&&r in t||(n||(n=Array.prototype.slice.call(t,0,r)),n[r]=t[r]);return e.concat(n||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.logger=t.padRight=void 0;var n=function(){function e(){}return e.getInstance=function(){return e.instance||(e.instance=new e),e.instance},e.prototype.initialize=function(e){this.analyticsDebugConfig=e},e.prototype.log=function(e){for(var t=[],i=1;i<arguments.length;i++)t[i-1]=arguments[i];this.enabled&&console.log(e,t)},e.prototype.table=function(e,t){this.enabled&&console.table(e,t)},e.prototype.warn=function(e){for(var t=[],i=1;i<arguments.length;i++)t[i-1]=arguments[i];this.enabled&&console.warn(e,t)},e.prototype.error=function(e){for(var t=[],i=1;i<arguments.length;i++)t[i-1]=arguments[i];this.enabled&&console.error(e,t)},e.prototype.errorMessageToUser=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];console.error.apply(console,i([e],t,!1))},Object.defineProperty(e.prototype,"enabled",{get:function(){return this.analyticsDebugConfig||!1},enumerable:!1,configurable:!0}),e}();t.padRight=function(e,t){return(e+Array(t).join(" ")).slice(0,t)},t.logger=n.getInstance()},2108:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BITMOVIN_ANALYTICS_AUGMENTED_MARKER=void 0,t.hasPlayerAlreadyBeenAugmented=function(e){return!0===e[t.BITMOVIN_ANALYTICS_AUGMENTED_MARKER]},t.markPlayerInstanceAsAugmented=function(e){e[t.BITMOVIN_ANALYTICS_AUGMENTED_MARKER]=!0},t.isDefined=function(e){return!(0,r.isNullish)(e)||(n.logger.log("Bitmovin Analytics: Adapter hasn't been initialized yet"),!1)};var n=i(1916),r=i(5063);t.BITMOVIN_ANALYTICS_AUGMENTED_MARKER="__bitmovinAnalyticsHasBeenSetup"},2168:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MIMETypes=void 0,t.getMIMETypeFromFileExtension=function(e){var i=e.split(/[?#]/)[0].toLowerCase();return(0,n.endsWith)(i,".m3u8")?t.MIMETypes.HLS:(0,n.endsWith)(i,".mp4")||(0,n.endsWith)(i,".m4v")||(0,n.endsWith)(i,".m4a")?t.MIMETypes.MP4:(0,n.endsWith)(i,".webm")?t.MIMETypes.WEBM:(0,n.endsWith)(i,".mpd")?t.MIMETypes.DASH:void 0};var n=i(1820);t.MIMETypes={MP4:"video/mp4",WEBM:"video/webm",HLS:"application/x-mpegURL",DASH:"application/dash+xml"}},2226:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NoOpBackend=void 0,t.NoOpBackend=function(){function e(){}return e.prototype.sendRequest=function(e){},e.prototype.sendUnloadRequest=function(e){},e.prototype.sendRequestSynchronous=function(e){},e.prototype.sendAdRequest=function(e){},e}()},2361:function(e,t){"use strict";var i;Object.defineProperty(t,"__esModule",{value:!0}),t.Event=t.JSM_INITIAL_EVENT=void 0,t.JSM_INITIAL_EVENT="jsm-initial",function(e){e.AUDIO_CHANGE="audioChange",e.AUDIOTRACK_CHANGED="audioTrackChanged",e.CUSTOM_DATA_CHANGE="customDataChange",e.END="end",e.END_AD="adEnd",e.END_BUFFERING="endBuffering",e.END_CAST="endCasting",e.END_FULLSCREEN="endFullscreen",e.ERROR="playerError",e.FINISH_QUALITY_CHANGE="finishQualityChange",e.LOADSTART_AUTOPLAY="loadstartAutoplay",e.MANUAL_SOURCE_CHANGE="manualSourceChangeInitiated",e.MUTE="mute",e.PAUSE="pause",e.PLAY="play",e.PLAYING="playing",e.READY="ready",e.SCREEN_RESIZE="resize",e.SEEK="seek",e.SEEKED="seeked",e.SOURCE_LOADED="sourceLoaded",e.SOURCE_UNLOADED="sourceUnloaded",e.START_AD="adStart",e.START_BUFFERING="startBuffer
1ing",e.START_CAST="startCasting",e.START_FULLSCREEN="startFullscreen",e.SUBTITLE_CHANGE="subtitleChange",e.TIMECHANGED="timechanged",e.UN_MUTE="unMute",e.UNLOAD="unload",e.VIDEO_CHANGE="videoChange",e.VIDEOSTART_TIMEOUT="VIDEOSTART_TIMEOUT"}(i||(t.Event=i={}))},2364:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RemoteBackend=void 0;var n=i(5426),r=i(5063);t.RemoteBackend=function(){function e(e,t,i){this.licenseKey=i,this.hasAdModule=e,this.analyticsCall=new n.AnalyticsCall(t)}return e.prototype.sendRequest=function(e){e.key=this.licenseKey,this.analyticsCall.sendRequest(e,r.noOp)},e.prototype.sendUnloadRequest=function(e){e.key=this.licenseKey,this.analyticsCall.sendUnloadRequest(e)},e.prototype.sendRequestSynchronous=function(e){e.key=this.licenseKey,this.analyticsCall.sendRequestSynchronous(e,r.noOp)},e.prototype.sendAdRequest=function(e){e.key=this.licenseKey,this.hasAdModule&&this.analyticsCall.sendAdRequest(e)},e}()},2376:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WindowEventTracker=void 0;var n=i(399);t.WindowEventTracker=function(){function e(){this.trackedObjects=[]}return e.prototype.addEventListener=function(e,t){this.trackedObjects.push({eventName:e,func:t}),(0,n.addWindowEventListener)(e,t)},e.prototype.release=function(){for(;0!==this.trackedObjects.length;){var e=this.trackedObjects.pop();void 0!==e&&(0,n.removeWindowEventListener)(e.eventName,e.func)}},e}()},2403:function(e,t,i){"use strict";var n,r=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 i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(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)}),o=this&&this.__spreadArray||function(e,t,i){if(i||2==arguments.length)for(var n,r=0,o=t.length;r<o;r++)!n&&r in t||(n||(n=Array.prototype.slice.call(t,0,r)),n[r]=t[r]);return e.concat(n||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.Bitmovin8AnalyticsStateMachine=void 0;var a,s,u=i(2595),c=i(2361),l=i(3565),d=i(1652),h=i(1916),p=i(1460),f=i(5063),g=i(7596),m=i(8253);!function(e){e.AD_PAUSE="AD_PAUSE",e.AD_PLAYING="AD_PLAYING",e.AD_READY="AD_READY",e.AD_STARTUP="AD_STARTUP",e.AUDIOTRACK_CHANGING="AUDIOTRACK_CHANGING",e.CASTING="CASTING",e.CUSTOMDATACHANGE="CUSTOMDATACHANGE",e.END="END",e.END_PLAY_SEEKING="END_PLAY_SEEKING",e.ERROR="ERROR",e.INITIAL_SOURCE_CHANGE="INITIAL_SOURCE_CHANGE",e.MUTING_PAUSE="MUTING_PAUSE",e.MUTING_PLAY="MUTING_PLAY",e.MUTING_READY="MUTING_READY",e.PAUSE="PAUSE",e.PLAY_SEEKING="PLAY_SEEKING",e.PLAYING="PLAYING",e.QUALITY_CHANGE="QUALITY_CHANGE",e.READY="READY",e.REBUFFERING="REBUFFERING",e.SETUP="SETUP",e.SOURCE_CHANGING="SOURCE_CHANGING",e.STARTUP="STARTUP",e.STARTUP_AUTOPLAY="STARTUP_AUTOPLAY",e.SUBTITLE_CHANGING="SUBTITLE_CHANGING",e.VIDEOSTART_FAILED="VIDEOSTART_FAILED"}(a||(a={})),function(e){e.PAUSE_AFTER_SOURCE_LOADED="PAUSE_AFTER_SOURCE_LOADED",e.PAUSE_BEFORE_SOURCE_LOADED="PAUSE_BEFORE_SOURCE_LOADED"}(s||(s={})),t.Bitmovin8AnalyticsStateMachine=function(e){function t(t,i,n){var r=e.call(this,t,i,n)||this;return r.debuggingStates=[],r.enabledDebugging=!1,r.sourceLoadedDuringAutoplayStartup=!1,r}return r(t,e),t.prototype.getAllStatesBut=function(e){return this.getAllStates().filter(function(t){return 0>e.indexOf(t)})},t.prototype.getAllStates=function(){return Object.keys(a).map(function(e){return a[e]})},t.prototype.createStateMachine=function(e){var t,i=this;return u.create({initial:{state:a.SETUP,event:c.JSM_INITIAL_EVENT},error:m.customStateMachineErrorCallback,events:o(o([{name:c.Event.SOURCE_LOADED,from:[a.SETUP,a.ERROR,a.SOURCE_CHANGING,a.INITIAL_SOURCE_CHANGE],to:a.READY},{name:c.Event.PLAY,from:a.READY,to:a.STARTUP},{name:c.Event.PLAYING,from:a.READY,to:a.PLAYING},(0,m.on)(c.Event.READY).stayIn(a.READY),{name:c.Event.ERROR,from:[a.STARTUP,a.AD_STARTUP,a.STARTUP_AUTOPLAY],to:a.VIDEOSTART_FAILED},{name:c.Event.UNLOAD,from:[a.STARTUP,a.AD_STARTUP,a.STARTUP_AUTOPLAY],to:a.VIDEOSTART_FAILED},{name:c.Event.VIDEOSTART_TIMEOUT,from:[a.STARTUP,a.STARTUP_AUTOPLAY],to:a.VIDEOSTART_FAILED},{name:c.Event.SOURCE_UNLOADED,from:[a.STARTUP,a.STARTUP_AUTOPLAY],to:a.VIDEOSTART_FAILED},{name:c.Event.MANUAL_SOURCE_CHANGE,from:[a.STARTUP,a.STARTUP_AUTOPLAY],to:a.VIDEOSTART_FAILED},{name:c.Event.TIMECHANGED,from:[a.STARTUP,a.STARTUP_AUTOPLAY],to:a.PLAYING},(0,m.on)(c.Event.PLAY).stayIn(a.STARTUP),(0,m.on)(c.Event.PLAYING).stayIn(a.STARTUP),(0,m.on)(c.Event.START_BUFFERING).stayIn(a.STARTUP),(0,m.on)(c.Event.END_BUFFERING).stayIn(a.STARTUP),(0,m.on)(c.Event.VIDEO_CHANGE).stayIn(a.STARTUP),(0,m.on)(c.Event.AUDIO_CHANGE).stayIn(a.STARTUP),(0,m.on)(c.Event.READY).stayIn(a.STARTUP),{name:c.Event.PAUSE,from:a.STARTUP,to:a.READY}
vendor: 5,047 bytes, line 1
1,{name:c.Event.LOADSTART_AUTOPLAY,from:[a.SETUP,a.SOURCE_CHANGING,a.INITIAL_SOURCE_CHANGE],to:a.STARTUP_AUTOPLAY},{name:s.PAUSE_BEFORE_SOURCE_LOADED,from:a.STARTUP_AUTOPLAY,to:a.INITIAL_SOURCE_CHANGE},{name:s.PAUSE_AFTER_SOURCE_LOADED,from:a.STARTUP_AUTOPLAY,to:a.READY}],(0,m.whileIn)(a.STARTUP_AUTOPLAY).passOver(c.Event.PAUSE,c.Event.SOURCE_LOADED),!0),[(0,m.on)(c.Event.PLAYING).stayIn(a.PLAYING),(0,m.on)(c.Event.TIMECHANGED).stayIn(a.PLAYING),(0,m.on)(c.Event.END_BUFFERING).stayIn(a.PLAYING),{name:c.Event.START_BUFFERING,from:a.PLAYING,to:a.REBUFFERING},{name:c.Event.END_BUFFERING,from:a.REBUFFERING,to:a.PLAYING},(0,m.on)(c.Event.TIMECHANGED).stayIn(a.REBUFFERING),{name:c.Event.PAUSE,from:a.PLAYING,to:a.PAUSE},{name:c.Event.PAUSE,from:a.REBUFFERING,to:a.PAUSE},{name:c.Event.PLAY,from:a.PAUSE,to:a.PLAYING},{name:c.Event.VIDEO_CHANGE,from:a.PLAYING,to:a.QUALITY_CHANGE},{name:c.Event.AUDIO_CHANGE,from:a.PLAYING,to:a.QUALITY_CHANGE},{name:c.Event.FINISH_QUALITY_CHANGE,from:a.QUALITY_CHANGE,to:a.PLAYING},{name:c.Event.SEEK,from:a.PLAYING,to:a.PLAY_SEEKING},{name:c.Event.PLAY,from:a.PLAY_SEEKING,to:a.END_PLAY_SEEKING},{name:c.Event.PLAYING,from:a.PLAY_SEEKING,to:a.END_PLAY_SEEKING},{name:c.Event.SEEKED,from:a.PLAY_SEEKING,to:a.END_PLAY_SEEKING},{name:c.Event.SEEK,from:a.END_PLAY_SEEKING,to:a.PLAY_SEEKING},{name:c.Event.PLAYING,from:a.END_PLAY_SEEKING,to:a.PLAYING},{name:c.Event.TIMECHANGED,from:a.END_PLAY_SEEKING,to:a.PLAYING},{name:c.Event.PAUSE,from:[a.PLAY_SEEKING,a.END_PLAY_SEEKING],to:a.PAUSE},(0,m.on)(c.Event.SEEK).stayIn(a.PLAY_SEEKING),(0,m.on)(c.Event.START_BUFFERING).stayIn(a.PLAY_SEEKING),(0,m.on)(c.Event.END_BUFFERING).stayIn(a.PLAY_SEEKING),(0,m.on)(c.Event.START_BUFFERING).stayIn(a.END_PLAY_SEEKING),(0,m.on)(c.Event.END_BUFFERING).stayIn(a.END_PLAY_SEEKING),(0,m.on)(c.Event.SEEKED).stayIn(a.END_PLAY_SEEKING),(0,m.on)(c.Event.PLAY).stayIn(a.END_PLAY_SEEKING),(0,m.on)(c.Event.SEEK).stayIn(a.PAUSE),(0,m.on)(c.Event.SEEKED).stayIn(a.PAUSE),(0,m.on)(c.Event.SEEKED).stayIn(a.PLAYING),{name:c.Event.END,from:a.PLAY_SEEKING,to:a.END},{name:c.Event.END,from:a.PLAYING,to:a.END},{name:c.Event.END,from:a.PAUSE,to:a.END},(0,m.on)(c.Event.SEEK).stayIn(a.END),(0,m.on)(c.Event.SEEKED).stayIn(a.END),(0,m.on)(c.Event.TIMECHANGED).stayIn(a.END),(0,m.on)(c.Event.END_BUFFERING).stayIn(a.END),(0,m.on)(c.Event.START_BUFFERING).stayIn(a.END),(0,m.on)(c.Event.END).stayIn(a.END),{name:c.Event.PLAY,from:a.END,to:a.STARTUP},{name:c.Event.ERROR,from:this.getAllStatesBut([a.STARTUP,a.STARTUP_AUTOPLAY]),to:a.ERROR},{name:c.Event.UNLOAD,from:this.getAllStatesBut([a.STARTUP,a.STARTUP_AUTOPLAY,a.AD_STARTUP]),to:a.END},{name:c.Event.SUBTITLE_CHANGE,from:a.PLAYING,to:a.SUBTITLE_CHANGING},(0,m.on)(c.Event.SUBTITLE_CHANGE).stayIn(a.PAUSE),(0,m.on)(c.Event.SUBTITLE_CHANGE).stayIn(a.REBUFFERING),(0,m.on)(c.Event.SUBTITLE_CHANGE).stayIn(a.END_PLAY_SEEKING),(0,m.on)(c.Event.SUBTITLE_CHANGE).stayIn(a.SUBTITLE_CHANGING),{name:c.Event.TIMECHANGED,from:a.SUBTITLE_CHANGING,to:a.PLAYING},{name:c.Event.AUDIOTRACK_CHANGED,from:a.PLAYING,to:a.AUDIOTRACK_CHANGING},(0,m.on)(c.Event.AUDIOTRACK_CHANGED).stayIn(a.PAUSE),(0,m.on)(c.Event.AUDIOTRACK_CHANGED).stayIn(a.REBUFFERING),(0,m.on)(c.Event.AUDIOTRACK_CHANGED).stayIn(a.END_PLAY_SEEKING),(0,m.on)(c.Event.AUDIOTRACK_CHANGED).stayIn(a.AUDIOTRACK_CHANGING),{name:c.Event.TIMECHANGED,from:a.AUDIOTRACK_CHANGING,to:a.PLAYING},{name:c.Event.START_AD,from:a.STARTUP,to:a.AD_STARTUP},{name:c.Event.END_AD,from:a.AD_STARTUP,to:a.STARTUP},(0,m.on)(c.Event.PLAY).stayIn(a.AD_STARTUP),(0,m.on)(c.Event.PAUSE).stayIn(a.AD_STARTUP),{name:c.Event.START_AD,from:a.READY,to:a.AD_READY},{name:c.Event.END_AD,from:a.AD_READY,to:a.STARTUP},(0,m.on)(c.Event.PLAY).stayIn(a.AD_READY),(0,m.on)(c.Event.PAUSE).stayIn(a.AD_READY),{name:c.Event.START_AD,from:a.PAUSE,to:a.AD_PAUSE},{name:c.Event.END_AD,from:a.AD_PAUSE,to:a.PAUSE},(0,m.on)(c.Event.PLAY).stayIn(a.AD_PAUSE),(0,m.on)(c.Event.PAUSE).stayIn(a.AD_PAUSE),{name:c.Event.START_AD,from:a.PLAYING,to:a.AD_PLAYING},{name:c.Event.END_AD,from:a.AD_PLAYING,to:a.PLAYING},(0,m.on)(c.Event.PLAY).stayIn(a.AD_PLAYING),(0,m.on)(c.Event.PAUSE).stayIn(a.AD_PLAYING),{name:c.Event.END,from:a.AD_PLAYING,to:a.END},(0,m.on)(c.Event.TIMECHANGED).stayIn(a.AD_STARTUP),(0,m.on)(c.Event.TIMECHANGED).stayIn(a.AD_READY),(0,m.on)(c.Event.TIMECHANGED).stayIn(a.AD_PAUSE),(0,m.on)(c.Event.TIMECHANGED).stayIn(a.AD_PLAYING),(0,m.on)(c.Event.END_AD).stayIn(a.PLAYING),(0,m.on)(c.Event.END_AD).stayIn(a.PAUSE),(0,m.on)(c.Event.END_AD).stayIn(a.READY),(0,m.on)(c.Event.END_AD).stayIn(a.STARTUP),{name:c.Event.MUTE,from:a.READY,to:a.MUTING_READY},{name:c.Event.UN_MUTE,from:a.READY,to:a.MUTING_READY},{name:"FINISH_MUTING",from:a.MUTING_READY,to:a.READY},{name:c.Event.MUTE,from:a.PLAYING,to:a.MUTING_PLAY},{name:c.Event.UN_MUTE,from:a.PLAYING,to:a.MUTING_PLAY},{name:"FINISH_MUTING",from:a.MUTING_PLAY,to:a.PLAYING},{name:c.Event.MUTE,from:a.PAUSE,to:a.MUTING_PAUSE},{name:c.Event.UN_MUTE,from:a.PAUSE,to:a.MUTING_PAUSE},{name:"FINISH_MUTING",from:a.MUTING_PAUSE,to:a.PAUSE}
vendor: 4,840 bytes, line 1
1,{name:c.Event.START_CAST,from:[a.READY,a.PAUSE,a.PLAYING],to:a.CASTING},(0,m.on)(c.Event.PAUSE).stayIn(a.CASTING),(0,m.on)(c.Event.PLAY).stayIn(a.CASTING),(0,m.on)(c.Event.PLAYING).stayIn(a.CASTING),(0,m.on)(c.Event.TIMECHANGED).stayIn(a.CASTING),(0,m.on)(c.Event.MUTE).stayIn(a.CASTING),(0,m.on)(c.Event.UN_MUTE).stayIn(a.CASTING),(0,m.on)(c.Event.SEEK).stayIn(a.CASTING),(0,m.on)(c.Event.SEEKED).stayIn(a.CASTING),{name:c.Event.END_CAST,from:a.CASTING,to:a.READY},(0,m.on)(c.Event.SEEK).stayIn(a.READY),(0,m.on)(c.Event.SEEKED).stayIn(a.READY),(0,m.on)(c.Event.SEEKED).stayIn(a.STARTUP),{name:c.Event.MANUAL_SOURCE_CHANGE,from:this.getAllStatesBut([a.SETUP,a.STARTUP,a.STARTUP_AUTOPLAY]),to:a.SOURCE_CHANGING},{name:c.Event.MANUAL_SOURCE_CHANGE,from:a.SETUP,to:a.INITIAL_SOURCE_CHANGE},{name:c.Event.SOURCE_UNLOADED,from:this.getAllStatesBut([a.STARTUP,a.STARTUP_AUTOPLAY]),to:a.SOURCE_CHANGING},{name:c.Event.CUSTOM_DATA_CHANGE,from:[a.PLAYING,a.PAUSE],to:a.CUSTOMDATACHANGE},{name:c.Event.PLAYING,from:a.CUSTOMDATACHANGE,to:a.PLAYING},{name:c.Event.PAUSE,from:a.CUSTOMDATACHANGE,to:a.PAUSE}],!1),callbacks:((t={})["onbefore".concat(c.Event.SOURCE_LOADED)]=function(e,t,n,r,o){t===a.STARTUP_AUTOPLAY&&(i.sourceLoadedDuringAutoplayStartup=!0)},t["onbefore".concat(c.Event.SOURCE_UNLOADED)]=function(e,t,n,r,o){return!(t===a.STARTUP_AUTOPLAY&&!i.sourceLoadedDuringAutoplayStartup)},t["onbefore".concat(c.Event.PAUSE)]=function(e,t,n,r,o){return t!==a.STARTUP_AUTOPLAY||(i.sourceLoadedDuringAutoplayStartup?i.stateMachine[s.PAUSE_AFTER_SOURCE_LOADED](r,o):i.stateMachine[s.PAUSE_BEFORE_SOURCE_LOADED](r,o),!1)},t["onleave".concat(a.END_PLAY_SEEKING)]=function(e,t,n,r,o){var s;if(n!==a.PLAY_SEEKING){var u=r-(null!=(s=i.seekStartTimestamp)?s:r);i.seekStartTimestamp=void 0,i.stateMachineCallbacks.setVideoTimeEndFromEvent(o),i.stateMachineCallbacks.seeking(u)}},t["onleave".concat(a.PLAYING)]=function(){i.playingHeartbeatService.stopHeartbeat()},t["onleave".concat(a.STARTUP_AUTOPLAY)]=function(){i.sourceLoadedDuringAutoplayStartup=!1,i.clearVideoStartTimeout()},t["onleave".concat(a.PLAY_SEEKING)]=function(e,t,n,r,o){var s;if(n!==a.END_PLAY_SEEKING){var u=r-(null!=(s=i.seekStartTimestamp)?s:r);i.seekStartTimestamp=void 0,i.stateMachineCallbacks.seeking(u)}},t.onleavestate=function(e,t,n,r,o){if((0,m.logStateMachineTransition)("LEAVE",e,t,n),e!==c.JSM_INITIAL_EVENT&&(t===a.REBUFFERING&&i.resetRebufferingHelpers(),r)){i.addStatesToLog(e,t,n,r,o);var u=r-i.onEnterStateTimestamp;o&&n!==a.END_PLAY_SEEKING&&i.stateMachineCallbacks.setVideoTimeEndFromEvent(o),o&&e!==c.Event.END_AD&&(i.lastTrackedVideoEndObject=o),t!==a.READY&&t!==a.AD_STARTUP||n!==a.STARTUP?t!==a.STARTUP||n!==a.PLAYING&&n!==a.AD_STARTUP||i.clearVideoStartTimeout():i.setVideoStartTimeout();var d=String(t).toLowerCase();if(n===a.VIDEOSTART_FAILED)i.clearVideoStartTimeout(),i.stateMachineCallbacks.videoStartFailed(u,(0,l.createVideoStartFailedReason)(e));else if(t===a.END_PLAY_SEEKING)(0,f.noOp)();else if(e===c.Event.UNLOAD)i.stateMachineCallbacks.unload(u,d);else if(t===a.AD_PAUSE||t===a.AD_READY||t===a.AD_PLAYING||t===a.AD_STARTUP)(0,f.isNotNullish)(i.lastTrackedVideoEndObject)&&(i.stateMachineCallbacks.setVideoTimeStartFromEvent(i.lastTrackedVideoEndObject),i.stateMachineCallbacks.setVideoTimeEndFromEvent(i.lastTrackedVideoEndObject)),i.stateMachineCallbacks.ad(u,"ad");else if(e===c.Event.START_AD&&t===a.STARTUP)(0,f.noOp)();else if(e===c.Event.SOURCE_LOADED&&t===a.INITIAL_SOURCE_CHANGE)(0,f.noOp)();else if(t===a.SETUP)i.stateMachineCallbacks.setup(1,a.SETUP.toLowerCase());else if(e===c.Event.PAUSE&&t===a.STARTUP&&n===a.READY||e===s.PAUSE_BEFORE_SOURCE_LOADED&&t===a.STARTUP_AUTOPLAY&&n===a.INITIAL_SOURCE_CHANGE||e===s.PAUSE_AFTER_SOURCE_LOADED&&t===a.STARTUP_AUTOPLAY&&n===a.READY)i.clearVideoStartTimeout();else if(t===a.STARTUP_AUTOPLAY)i.stateMachineCallbacks.startup(u,a.STARTUP.toLowerCase());else if(t!==a.ERROR){var p=i.stateMachineCallbacks[d];if((0,f.isFunction)(p))try{p(u,d,o)}catch(e){h.logger.error("Exception occurred in State Machine callback "+d,o,e)}else(0,m.logMissingCallbackWarning)(t,[a.READY,a.SOURCE_CHANGING])}o&&n!==a.END_PLAY_SEEKING&&t!==a.PLAY_SEEKING&&n!==a.PLAY_SEEKING&&t!==a.AD_STARTUP&&t!==a.AD_READY&&t!==a.AD_PLAYING&&t!==a.AD_PAUSE&&i.stateMachineCallbacks.setVideoTimeStartFromEvent(o),e===c.Event.MUTE?i.stateMachineCallbacks.mute():e===c.Event.UN_MUTE&&i.stateMachineCallbacks.unMute()}},t["onenter".concat(a.STARTUP_AUTOPLAY)]=function(){i.setVideoStartTimeout()},t["onenter".concat(a.PLAYING)]=function(){i.playingHeartbeatService.startHeartbeat()},t["onenter".concat(a.PLAY_SEEKING)]=function(e,t,n,r,o){t!==a.END_PLAY_SEEKING&&(i.seekStartTimestamp=r)},t["onenter".concat(a.QUALITY_CHANGE)]=function(e,t,n,r,o){i.stateMachineCallbacks.qualitychange(o),i.stateMachine[c.Event.FINISH_QUALITY_CHANGE](r)}
vendor: 4,442 bytes, line 1
1,t.onenterstate=function(t,n,r,o,s){(0,m.logStateMachineTransition)("ENTER",t,n,r),i.onEnterStateTimestamp=null!=o?o:Date.now(),(0,p.isNumber)(e.starttime)&&t===c.JSM_INITIAL_EVENT&&(i.onEnterStateTimestamp=e.starttime),s&&r!==a.END_PLAY_SEEKING&&n!==a.PLAY_SEEKING&&n!==a.AD_STARTUP&&n!==a.AD_READY&&n!==a.AD_PLAYING&&n!==a.AD_PAUSE&&(t!==c.Event.SEEK||n!==a.END_PLAY_SEEKING)&&i.stateMachineCallbacks.setVideoTimeStartFromEvent(s),t===c.Event.START_CAST&&r===a.CASTING&&i.stateMachineCallbacks.startCasting(o,s),r===a.REBUFFERING&&i.startRebufferingHeartbeatInterval()},t["onafter".concat(c.Event.ERROR)]=function(e,t,n,r,o){i.stateMachineCallbacks.error(o)},t["onafter".concat(c.Event.SOURCE_UNLOADED)]=function(e,t,n,r,o){i.sourceLoadedDuringAutoplayStartup=!1},t.onafterevent=function(e,t,n,r,o){e===c.Event.MANUAL_SOURCE_CHANGE&&t===a.SETUP?i.stateMachineCallbacks.initialSourceChange(o):e===c.Event.MANUAL_SOURCE_CHANGE&&i.stateMachineCallbacks.manualSourceChange(o),n!==a.MUTING_READY&&n!==a.MUTING_PLAY&&n!==a.MUTING_PAUSE||i.stateMachine.FINISH_MUTING(r)},t)})},t.prototype.getStates=function(){return this.debuggingStates},t.prototype.setEnabledDebugging=function(e){this.enabledDebugging=e},t.prototype.addStatesToLog=function(e,t,i,n,r){this.enabledDebugging&&this.debuggingStates.push(new d.EventDebugging(e,t,i,n,r))},t}(g.AnalyticsStateMachine)},2595:function(e,t){var i;i={VERSION:"2.4.0",Result:{SUCCEEDED:1,NOTRANSITION:2,CANCELLED:3,PENDING:4},Error:{INVALID_TRANSITION:100,PENDING_TRANSITION:200,INVALID_CALLBACK:300},WILDCARD:"*",ASYNC:"async",create:function(e,t){var n="string"==typeof e.initial?{state:e.initial}:e.initial,r=e.terminal||e.final,o=t||e.target||{},a=e.events||[],s=e.callbacks||{},u={},c={},l=function(e){var t=Array.isArray(e.from)?e.from:e.from?[e.from]:[i.WILDCARD];u[e.name]=u[e.name]||{};for(var n=0;n<t.length;n++)c[t[n]]=c[t[n]]||[],c[t[n]].push(e.name),u[e.name][t[n]]=e.to||t[n];e.to&&(c[e.to]=c[e.to]||[])};n&&(n.event=n.event||"startup",l({name:n.event,from:"none",to:n.state}));for(var d=0;d<a.length;d++)l(a[d]);for(var h in u)u.hasOwnProperty(h)&&(o[h]=i.buildEvent(h,u[h]));for(var h in s)s.hasOwnProperty(h)&&(o[h]=s[h]);return o.current="none",o.is=function(e){return Array.isArray(e)?e.indexOf(this.current)>=0:this.current===e},o.can=function(e){return!this.transition&&void 0!==u[e]&&(u[e].hasOwnProperty(this.current)||u[e].hasOwnProperty(i.WILDCARD))},o.cannot=function(e){return!this.can(e)},o.transitions=function(){return(c[this.current]||[]).concat(c[i.WILDCARD]||[])},o.isFinished=function(){return this.is(r)},o.error=e.error||function(e,t,i,n,r,o,a){throw a||o},o.states=function(){return Object.keys(c).sort()},n&&!n.defer&&o[n.event](),o},doCallback:function(e,t,n,r,o,a){if(t)try{return t.apply(e,[n,r,o].concat(a))}catch(t){return e.error(n,r,o,a,i.Error.INVALID_CALLBACK,"an exception occurred in a caller-provided callback function",t)}},beforeAnyEvent:function(e,t,n,r,o){return i.doCallback(e,e.onbeforeevent,t,n,r,o)},afterAnyEvent:function(e,t,n,r,o){return i.doCallback(e,e.onafterevent||e.onevent,t,n,r,o)},leaveAnyState:function(e,t,n,r,o){return i.doCallback(e,e.onleavestate,t,n,r,o)},enterAnyState:function(e,t,n,r,o){return i.doCallback(e,e.onenterstate||e.onstate,t,n,r,o)},changeState:function(e,t,n,r,o){return i.doCallback(e,e.onchangestate,t,n,r,o)},beforeThisEvent:function(e,t,n,r,o){return i.doCallback(e,e["onbefore"+t],t,n,r,o)},afterThisEvent:function(e,t,n,r,o){return i.doCallback(e,e["onafter"+t]||e["on"+t],t,n,r,o)},leaveThisState:function(e,t,n,r,o){return i.doCallback(e,e["onleave"+n],t,n,r,o)},enterThisState:function(e,t,n,r,o){return i.doCallback(e,e["onenter"+r]||e["on"+r],t,n,r,o)},beforeEvent:function(e,t,n,r,o){if(!1===i.beforeThisEvent(e,t,n,r,o)||!1===i.beforeAnyEvent(e,t,n,r,o))return!1},afterEvent:function(e,t,n,r,o){i.afterThisEvent(e,t,n,r,o),i.afterAnyEvent(e,t,n,r,o)},leaveState:function(e,t,n,r,o){var a=i.leaveThisState(e,t,n,r,o),s=i.leaveAnyState(e,t,n,r,o);return!1!==a&&!1!==s&&(i.ASYNC===a||i.ASYNC===s?i.ASYNC:void 0)},enterState:function(e,t,n,r,o){i.enterThisState(e,t,n,r,o),i.enterAnyState(e,t,n,r,o)},buildEvent:function(e,t){return function(){var n=this.current,r=t[n]||(t[i.WILDCARD]!=i.WILDCARD?t[i.WILDCARD]:n)||n,o=Array.prototype.slice.call(arguments);if(this.transition)return this.error(e,n,r,o,i.Error.PENDING_TRANSITION,"event "+e+" inappropriate because previous transition did not complete");
1if(this.cannot(e))return this.error(e,n,r,o,i.Error.INVALID_TRANSITION,"event "+e+" inappropriate in current state "+this.current);if(!1===i.beforeEvent(this,e,n,r,o))return i.Result.CANCELLED;if(n===r)return i.afterEvent(this,e,n,r,o),i.Result.NOTRANSITION;var a=this;this.transition=function(){return a.transition=null,a.current=r,i.enterState(a,e,n,r,o),i.changeState(a,e,n,r,o),i.afterEvent(a,e,n,r,o),i.Result.SUCCEEDED},this.transition.cancel=function(){a.transition=null,i.afterEvent(a,e,n,r,o)};var s=i.leaveState(this,e,n,r,o);return!1===s?(this.transition=null,i.Result.CANCELLED):i.ASYNC===s?i.Result.PENDING:this.transition?this.transition():void 0}}},e.exports&&(t=e.exports=i),t.StateMachine=i},2647:function(e,t,i){"use strict";var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.InternalAdapter=void 0;var r=i(675),o=i(9796),a=i(4916),s=i(4300),u=i(2361),c=i(4820),l=i(1916),d=i(5063),h=i(2376),p=i(399);t.InternalAdapter=function(){function e(e){var t=this;this.onLicenseKeyReceived=new r.EventDispatcher,this.onLicenseCallFailed=new r.EventDispatcher,this.qualityChangeService=new o.default,this.ssaiService=new s.SsaiService,this.stateMachineCallbacks=n({},c.defaultStateMachineCallbacks),this.sourceInfoFallbackService=new a.SourceInfoFallbackService,this.drmPerformanceInfo=void 0,this.windowEventTracker=new h.WindowEventTracker,this.eventCallback=function(e,i){i=i||{},t.stateMachine?t.stateMachine.callEvent(e,i,Date.now()):l.logger.log("Bitmovin Analytics: StateMachine isn't ready yet")},e||(e={starttime:void 0}),e.starttime||(e.starttime=(0,d.getCurrentTimestamp)()),this.opts=e}return e.prototype.release=function(){this.stateMachine.resetIntervals(),this.stateMachineCallbacks.release(),this.resetSourceRelatedState(),this.windowEventTracker.release()},e.prototype.getCommonPlaybackInfo=function(){var e=(0,p.getWindowScreenDimensions)();return{screenHeight:null==e?void 0:e.height,screenWidth:null==e?void 0:e.width}},e.prototype.getDrmPerformanceInfo=function(){},e.prototype.getSegmentInfo=function(){return[]},e.prototype.getDownloadSpeedInfo=function(){return{segmentsDownloadCount:0,segmentsDownloadSize:0,segmentsDownloadTime:0,avgDownloadSpeed:0,minDownloadSpeed:0,maxDownloadSpeed:0,avgTimeToFirstByte:0}},e.prototype.resetDownloadSpeedInfoMeasures=function(){},e.prototype.setCustomData=function(e){var t=this.stateMachine.currentState,i={customDataValues:e,currentTime:this.currentTime};this.stateMachine.currentState&&("PAUSE"===this.stateMachine.currentState||"PLAYING"===this.stateMachine.currentState)?(this.eventCallback(u.Event.CUSTOM_DATA_CHANGE,{currentTime:this.currentTime}),this.eventCallback(u.Event[t],i)):this.stateMachineCallbacks.customdatachange(void 0,void 0,i)},e.prototype.sourceChange=function(e){this.eventCallback(u.Event.MANUAL_SOURCE_CHANGE,{currentTime:this.currentTime,config:e})},e.prototype.resetSourceRelatedState=function(){this.sourceInfoFallbackService.reset(),this.drmPerformanceInfo=void 0},e}()},2663:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HeartbeatService=t.DEFAULT_HEARTBEAT_INTERVAL_MS=void 0,t.DEFAULT_HEARTBEAT_INTERVAL_MS=59700;var i=function(){function e(e){this.getPlayerCurrentTime=e}return e.prototype.setListener=function(e){this.listener=e},e.prototype.startHeartbeat=function(){var e=this;void 0!==this.heartbeatInterval&&this.clearHeartbeat(),this.heartbeatInterval=setInterval(function(){var t;null==(t=e.listener)||t.onHeartbeat(e.getPlayerCurrentTime())},t.DEFAULT_HEARTBEAT_INTERVAL_MS)},e.prototype.stopHeartbeat=function(){this.clearHeartbeat()},e.prototype.clearHeartbeat=function(){clearTimeout(this.heartbeatInterval),this.heartbeatInterval=void 0},e}();t.HeartbeatService=i},2780:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LongPlaytimeFilteringBackend=void 0;var n=i(5063);t.LongPlaytimeFilteringBackend=function(){function e(e){this.nextBackend=e}return e.prototype.sendRequest=function(e){this.isPlayedAboveThreshold(e)||this.nextBackend.sendRequest(e)},e.prototype.sendUnloadRequest=function(e){this.isPlayedAboveThreshold(e)||this.nextBackend.sendUnloadRequest(e)},e.prototype.sendRequestSynchronous=function(e){this.isPlayedAboveThreshold(e)||this.nextBackend.sendRequestSynchronous(e)},e.prototype.sendAdRequest=function(e){this.nextBackend.sendAdRequest(e)},e.prototype.isPlayedAboveThreshold=function(e){return((0,n.isNullish)(e.played)?0:e.played)>=9e4},e}()},2974:function(e,t){"use strict";
vendor: 9,722 bytes, line 1
1Object.defineProperty(t,"__esModule",{value:!0}),t.objectValues=void 0,t.objectValues=function(e){return Object.keys(e).map(function(t){return e[t]})}},2982:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.generateUUID=void 0,t.generateUUID=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})}},3054:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BackendFactory=void 0;var n=i(5253),r=i(4649),o=i(7540),a=i(3489),s=i(2780),u=i(2226),c=i(7390);t.BackendFactory=function(){function e(){}return e.prototype.createBackend=function(e,t,i,n){if(!this.isEnabled(e))return new u.NoOpBackend;var r=this.createInnerBackend(e,t,i,n);return this.decorateWithDebuggingBackend(e,r)},e.prototype.decorateWithDebuggingBackend=function(e,t){return e.debug?new o.DebuggingBackend(e,t):t},e.prototype.decorateWithBackendFromConfigIfAvailable=function(e,t){return void 0!==e&&void 0!==e.config&&void 0!==e.config.wrapBackend?e.config.wrapBackend(t):t},e.prototype.isEnabled=function(e){return void 0===e.config||!1!==e.config.enabled},e.prototype.createInnerBackend=function(e,t,i,o){var u=e.config&&e.config.backendUrl||r.ANALYTICS_BACKEND_BASE_URL,l=new a.LicenseCheckingBackend(t,n.LicenseCall,u,i,o);l=this.decorateWithBackendFromConfigIfAvailable(e,l);var d=new c.SequenceNumberBackend(l);return new s.LongPlaytimeFilteringBackend(d)},e}()},3129:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Queue=void 0,t.Queue=function(){function e(){this._items=[]}return Object.defineProperty(e.prototype,"items",{get:function(){return this._items},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"length",{get:function(){return this._items.length},enumerable:!1,configurable:!0}),e.prototype.offer=function(e){this._items.push(e)},e.prototype.poll=function(){return this._items.shift()},e.prototype.clear=function(){this._items.splice(0)},e.prototype.limit=function(e){for(;this._items.length>e;)this.poll()},e}()},3413:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.normalizeVideoDuration=function(e){return(0,r.isNullish)(e)||Number.isNaN(e)||e===1/0?0:e},t.buildPlaybackInfoStreamTypeFields=function(e,t){var i={streamFormat:null!=e?e:void 0,progUrl:t};return(0,r.isNullish)(e)?i:e===n.StreamTypes.dash?{streamFormat:e,mpdUrl:t}:e===n.StreamTypes.hls?{streamFormat:e,m3u8Url:t}:e===n.StreamTypes.prog?{streamFormat:e,progUrl:t}:i};var n=i(7224),r=i(5063)},3458:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorCode=void 0,t.ErrorCode=function(){function e(e,t,i){void 0===i&&(i="CRITICAL"),this.code=e,this.message=t,this.errorSeverity=i}return e.BITMOVIN_PLAYER_LICENSING_ERROR=new e(1103,""),e.SETUP_MISSING_LICENSE_WHITELIST=new e(1105,""),e.QUALITY_CHANGE_THRESHOLD_EXCEEDED=new e(1e4,"ANALYTICS_QUALITY_CHANGE_THRESHOLD_EXCEEDED","INFO"),e.BUFFERING_TIMEOUT_REACHED=new e(10001,"ANALYTICS_BUFFERING_TIMEOUT_REACHED"),e.VIDEO_STARTUP_TIMEOUT_REACHED=new e(10002,"ANALYTICS_VIDEOSTART_TIMEOUT_REACHED"),e}()},3489:function(e,t,i){"use strict";var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.LicenseCheckingBackend=void 0;var r=i(4501),o=i(1916),a=i(4649),s=i(2226),u=i(1125),c=i(2364);t.LicenseCheckingBackend=function(){function e(e,t,i,r,o){var c=this;this.licenseCall=t,this.backendBaseUrl=i,this.adapter=r,this.authenticationCallback=o,this.licenseKeyReceived=function(e){clearTimeout(c.licenseLazyLoadingTimeoutHandle),c.unsubscribeFromAdapter(),c.info.key=e.licenseKey,c.promise=c.wrapLicenseCheckPromiseWithCallback(c.performLicenseCheck(),c.authenticationCallback)},this.licenseCallFailed=function(){clearTimeout(c.licenseLazyLoadingTimeoutHandle),c.unsubscribeFromAdapter(),c.backend=new s.NoOpBackend,c.authenticationCallback.authenticationCompleted(!1,void 0)},this.licenseLazyLoadingTimeout=function(){c.unsubscribeFromAdapter(),c.backend=new s.NoOpBackend,c.authenticationCallback.authenticationCompleted(!1,void 0)},this.info=n({},e),this.backend=new u.QueueBackend,this.licenseCall=t,void 0!==e.key&&""!==e.key?this.promise=this.wrapLicenseCheckPromiseWithCallback(this.performLicenseCheck(),this.authenticationCallback):!0===r.supportsDeferredLicenseLoading?(r.onLicenseKeyReceived.subscribe(this.licenseKeyReceived),r.onLicenseCallFailed.subscribe(this.licenseCallFailed),this.licenseLazyLoadingTimeoutHandle=setTimeout(this.licenseLazyLoadingTimeout,a.ANALYTICS_LICENSECALL_TIMEOUT)):(o.authenticationCompleted(!1,void 0),this.backend=new s.NoOpBackend)}return e.prototype.performLicenseCheck=function(){var e=this,t=this.info,i=t.key,n=t.domain,a=t.version;if(!i||""===i){var u={status:r.LicensingResult.Denied,message:"No license key provided"};return this.backend=new s.NoOpBackend,Promise.resolve(u)}return this.licenseCall(i,n,a,this.backendBaseUrl).then(function(t){if(t.status!==r.LicensingResult.Granted)throw Error(t.message);var n=new c.RemoteBackend(!0,e.backendBaseUrl,i);return e.backend.flushTo(n),e.backend=n,t}).catch(function(t){return"Ignoring Impression due to DNT Header being set"===t.message?o.logger.error("License Check for Bitmovin Analytics failed because of",t):o.logger.errorMessageToUser("License Check for Bitmovin Analytics failed because of",t),e.backend=new s.NoOpBackend,{status:r.LicensingResult.Denied,message:t.message}})},e.prototype.sendRequest=function(e){this.backend.sendRequest(e)},e.prototype.sendUnloadRequest=function(e){this.backend.sendUnloadRequest(e)},e.prototype.sendRequestSynchronous=function(e){this.backend.sendRequestSynchronous(e)},e.prototype.sendAdRequest=function(e){this.backend.sendAdRequest(e)},e.prototype.unsubscribeFromAdapter=function(){this.adapter.onLicenseKeyReceived.unsubscribe(this.licenseKeyReceived),this.adapter.onLicenseCallFailed.unsubscribe(this.licenseCallFailed)},e.prototype.wrapLicenseCheckPromiseWithCallback=function(e,t){return e.then(function(e){return t.authenticationCompleted(e.status===r.LicensingResult.Granted,e.features),e})},e}()},3565:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VideoStartFailedReason=void 0,t.createVideoStartFailedReason=function(e){switch(e){case r.Event.ERROR:return n.PLAYER_ERROR;case r.Event.UNLOAD:case r.Event.MANUAL_SOURCE_CHANGE:case r.Event.SOURCE_UNLOADED:return n.PAGE_CLOSED;case r.Event.VIDEOSTART_TIMEOUT:return n.TIMEOUT;default:return n.UNKNOWN}};var n,r=i(2361);!function(e){e.PAGE_CLOSED="PAGE_CLOSED",e.PLAYER_ERROR="PLAYER_ERROR",e.TIMEOUT="TIMEOUT",e.UNKNOWN="UNKNOWN"}(n||(t.VideoStartFailedReason=n={}))},3588:function(e,t){"use strict";var i;Object.defineProperty(t,"__esModule",{value:!0}),t.AD_TYPE=void 0,function(e){e[e.NO_AD=0]="NO_AD",e[e.CSAI=1]="CSAI",e[e.SSAI=2]="SSAI"}(i||(t.AD_TYPE=i={}))},3612:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ViewportTracker=void 0;var n=i(3848),r=i(1916),o=i(1820),a=i(5063);t.ViewportTracker=function(){function e(e,t,i){void 0===i&&(i=1);var o=this;this.inViewport=void 0,this.threshold=i,this.onIntersectionChanged=t,this.element=e;try{var a={root:null,rootMargin:"0px",threshold:i};this.observer=new IntersectionObserver(function(e,t){return o.handleIntersect(e,t)},a),this.observer.observe(e)}catch(e){r.logger.log("Couldn't create instance of IntersectionObserver. timeInViewport will always be reported as 100%.")}this.hiddenPropertyName=(0,n.getDocumentPropertyWithPrefix)("hidden"),this.hiddenPropertyName&&(this.visibilityChange=this.hiddenPropertyName.replace("hidden","")+"visibilitychange",(0,n.addDocumentEventListener)(this.visibilityChange,this.handleVisibilityChange=this.handleVisibilityChange.bind(this),!1))}return e.prototype.isHidden=function(){return!((0,a.isNullish)(document)||!(0,o.isValidString)(this.hiddenPropertyName))&&!0===document[this.hiddenPropertyName]},e.prototype.isInViewport=function(){return!this.isHidden()&&(!!(0,a.isNullish)(this.inViewport)||this.inViewport)},e.prototype.dispose=function(){this.observer&&(this.observer.unobserve(this.element),this.observer.disconnect()),this.visibilityChange&&(0,n.removeDocumentEventListener)(this.visibilityChange,this.handleVisibilityChange,!1)},e.prototype.handleVisibilityChange=function(){this.onIntersectionChanged()},e.prototype.handleIntersect=function(e,t){var i=this;e.forEach(function(e){e.target===i.element&&(i.inViewport=!(e.intersectionRatio<i.threshold))}),this.onIntersectionChanged()},e}()},3786:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Measure=void 0,t.Measure=function(){function e(e){this.download=e}return Object.defineProperty(e.prototype,"speed",{get:function(){return this.download.size/this.download.duration},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"duration",{get:function(){return this.download.duration},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"size",{get:function(){return this.download.size},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"timeToFirstByte",{get:function(){return this.download.timeToFirstByte},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"timestamp",{get:function(){return this.download.timestamp},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"httpStatus",{get:function(){return this.download.httpStatus},enumerable:!1,configurable:!0}),e}()},3848:function(e,t,i){"use strict";
1Object.defineProperty(t,"__esModule",{value:!0}),t.deleteCookie=t.setCookie=t.getCookie=t.removeDocumentEventListener=t.addDocumentEventListener=t.isVideoInFullscreen=t.isDocumentHidden=t.getDocumentPropertyWithPrefix=void 0;var n=i(1916),r=i(1820),o=i(5063);t.getDocumentPropertyWithPrefix=function(e){if(!(0,o.isNullish)(document)){if(e in document)return e;for(var t=e.charAt(0).toUpperCase()+e.slice(1),i=0,n=["webkit","moz","ms","o"];i<n.length;i++){var r=n[i]+t;if(r in document)return r}}},t.isDocumentHidden=function(){var e=(0,t.getDocumentPropertyWithPrefix)("hidden");return!!(0,r.isValidString)(e)&&!0===document[e]},t.isVideoInFullscreen=function(){var e,i=(0,t.getDocumentPropertyWithPrefix)("fullscreenElement");return!!(0,r.isValidString)(i)&&"VIDEO"===(null==(e=document[i])?void 0:e.nodeName)},t.addDocumentEventListener=function(e,t,i){(0,o.isNullish)(document)||!(0,o.isFunction)(document.addEventListener)||(0,o.isNullish)(t)||document.addEventListener(e,t,i)},t.removeDocumentEventListener=function(e,t,i){(0,o.isNullish)(document)||!(0,o.isFunction)(document.removeEventListener)||(0,o.isNullish)(t)||document.removeEventListener(e,t,i)},t.getCookie=function(e){if(!(0,o.isNullish)(document)){var t;try{t=document.cookie.split(";")}catch(e){return void n.logger.log("failed to access cookie objects on document",e)}for(var i=e+"=",r=0,a=t;r<a.length;r++){for(var s=a[r];" "===s.charAt(0);)s=s.substring(1);if(0===s.indexOf(i))return s.substring(i.length,s.length)}return""}},t.setCookie=function(e,t,i){if(!(0,o.isNullish)(document)){var r=e+"="+t+"; path=/";(null==i?void 0:i.domain)&&(r+="; domain=".concat(i.domain)),(null==i?void 0:i.expires)&&(r+="; expires=".concat(i.expires)),(null==i?void 0:i.maxAge)&&(r+="; max-age=".concat(i.maxAge));try{document.cookie=r}catch(e){return void n.logger.log("failed to set cookie object on document",e)}}},t.deleteCookie=function(e){if(!(0,o.isNullish)(document))try{document.cookie="".concat(e,"=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;")}catch(e){return void n.logger.log("failed to delete cookies from document",e)}}},4067:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sanitizeBitmovin8AdapterSsaiAdBreakMetadataAdPosition=void 0;var n=i(5063);t.sanitizeBitmovin8AdapterSsaiAdBreakMetadataAdPosition=function(e){var t=e;return(0,n.isNotNullish)(null==t?void 0:t.adPosition)&&("pre-roll"===t.adPosition?t.adPosition="preroll":"mid-roll"===t.adPosition?t.adPosition="midroll":"post-roll"===(null==t?void 0:t.adPosition)&&(t.adPosition="postroll")),t}},4300:function(e,t,i){"use strict";var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.SsaiService=void 0;var r,o=i(3588),a=i(3458),s=i(5529),u=i(5063),c=i(2982),l=i(7906);function d(e){return(0,u.isNotNullish)(e)}!function(e){e[e.AD_BREAK_STARTED=0]="AD_BREAK_STARTED",e[e.ACTIVE=1]="ACTIVE",e[e.IDLE=2]="IDLE"}(r||(r={})),t.SsaiService=function(){function e(){this.eventHandler=void 0,this.adIndex=-1,this.state=r.IDLE,this.isFirstSampleOfAd=!1,this.sentAdQuartiles=[],this.errorSent=!1}return e.prototype.activate=function(e){this.eventHandler=e},e.prototype.adBreakStart=function(e){d(this.eventHandler)&&this.state==r.IDLE&&(this.state=r.AD_BREAK_STARTED,this.currentAdMetadata=n({},e))},e.prototype.adStart=function(e){var t;if(d(this.eventHandler)&&this.state!=r.IDLE){var i=(new Date).getTime(),n=this.eventHandler.getPlayerCurrentTime();this.eventHandler.reportPlaybackInteraction(i,n),this.state=r.ACTIVE,this.isFirstSampleOfAd=!0,this.adIndex++,this.resetAdData(),this.currentAdMetadata={adPosition:null==(t=this.currentAdMetadata)?void 0:t.adPosition,adId:null==e?void 0:e.adId,adSystem:null==e?void 0:e.adSystem,customData:null==e?void 0:e.customData},this.currentAdImpressionId=(0,c.generateUUID)(),this.timestampOfAdStart=(0,l.getCurrentMonotonicTimestampInMs)(),this.eventHandler.reportEngagementInteraction({type:"started",adIndex:this.adIndex,currentAdImpressionId:this.currentAdImpressionId,currentAdMetadata:(0,u.isNotNullish)(this.currentAdMetadata)?this.currentAdMetadata:{}})}},e.prototype.adQuartileFinished=function(e,t){d(this.eventHandler)&&this.state==r.ACTIVE&&(this.sentAdQuartiles.includes(e)||(this.eventHandler.reportEngagementInteraction({type:"quartile",adIndex:this.adIndex,currentAdImpressionId:this.currentAdImpressionId,currentAdMetadata:(0,u.isNotNullish)(this.currentAdMetadata)?this.currentAdMetadata:{},quartile:e,quartileMetadata:t,timeSinceAdStartedInMs:(0,l.getMonotonicTimestampInMsSince)(this.timestampOfAdStart)}),this.sentAdQuartiles.push(e)))},e.prototype.adBreakEnd=function(){if(d(this.eventHandler)&&this.state!=r.IDLE){if(this.state==r.ACTIVE){var e=(new Date).getTime(),t=this.eventHandler.getPlayerCurrentTime();this.eventHandler.reportPlaybackInteraction(e,t)}this.resetAdBreakData()}},e.prototype.manipulate=function(e){var t,i,n,a;
1if(d(this.eventHandler)&&this.state==r.ACTIVE){e.ad=o.AD_TYPE.SSAI,e.adId=null==(t=this.currentAdMetadata)?void 0:t.adId,e.adSystem=null==(i=this.currentAdMetadata)?void 0:i.adSystem,e.adPosition=null==(n=this.currentAdMetadata)?void 0:n.adPosition,this.isFirstSampleOfAd&&(e.adIndex=this.adIndex,this.isFirstSampleOfAd=!1);var c=null==(a=this.currentAdMetadata)?void 0:a.customData;(0,u.isNotNullish)(c)&&s.customDataValuesKeys.forEach(function(t){c[t]&&(e[t]=c[t])}),e[l.SSAI_RELATED_SAMPLE_MARKER]=!0}},e.prototype.sendAdEngagementErrorSample=function(e,t){d(this.eventHandler)&&this.state===r.ACTIVE&&(this.errorSent||e.code!==a.ErrorCode.QUALITY_CHANGE_THRESHOLD_EXCEEDED.code&&(this.eventHandler.reportEngagementInteraction({type:"error",adIndex:this.adIndex,currentAdImpressionId:this.currentAdImpressionId,currentAdMetadata:(0,u.isNotNullish)(this.currentAdMetadata)?this.currentAdMetadata:{},analyticsError:e,originalError:t,timeSinceAdStartedInMs:(0,l.getMonotonicTimestampInMsSince)(this.timestampOfAdStart)}),this.errorSent=!0))},e.prototype.resetSourceRelatedState=function(){this.resetAdBreakData(),this.adIndex=-1},e.prototype.resetAdBreakData=function(){this.state=r.IDLE,this.isFirstSampleOfAd=!1,delete this.currentAdMetadata,this.resetAdData()},e.prototype.resetAdData=function(){var e,t,i;null==(e=this.currentAdMetadata)||delete e.customData,null==(t=this.currentAdMetadata)||delete t.adId,null==(i=this.currentAdMetadata)||delete i.adSystem,this.errorSent=!1,this.currentAdImpressionId=void 0,this.sentAdQuartiles=[],this.timestampOfAdStart=void 0},e}()},4350:function(e,t,i){"use strict";var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.Analytics=void 0,t.setQualityInfoOnSample=O;var r=i(3588),o=i(3458),a=i(8525),s=i(3565),u=i(6845),c=i(5529),l=i(8331),d=i(404),h=i(1916),p=i(1460),f=i(6481),g=i(1820),m=i(5063),y=i(5063),v=i(2982),S=i(4926),b=i(8421),E=i(399),T=i(8917),_=i(3054),A=i(675),P=i(7721),M=i(2226),I=i(847),R=i(8918),C=i(7906);function O(e,t){(0,p.isNumber)(t.videoPlaybackHeight)&&(e.videoPlaybackHeight=t.videoPlaybackHeight),(0,p.isNumber)(t.videoPlaybackWidth)&&(e.videoPlaybackWidth=t.videoPlaybackWidth),(0,p.isNumber)(t.videoBitrate)&&(e.videoBitrate=t.videoBitrate),(0,p.isNumber)(t.audioBitrate)&&(e.audioBitrate=t.audioBitrate)}t.Analytics=function(){function e(e,t,i,r,o,a,s){var u=this;this.adapter=t,this.backendFactory=i,this.sessionHandler=r,this.featureManager=o,this.onErrorDetailEventDispatcher=a,this.identicalErrorReportingLimiter=s,this.adSamplePageLoadTime=0,this.adSampleAutoplay=!1,this.adSamplePlayerStartupTime=0,this.hasSentStartupSample=!1,this.droppedSampleFrames=0,this.startupTime=0,this.authenticationCallback={authenticationCompleted:function(e,t){u.featureManager.configureFeatures(e,t)}},this.sourceChange=function(e){if(h.logger.log("Processing Source Change for Analytics",e),(0,y.isNullish)(e))u.adapter.sourceChange(u.config);else{(0,l.guardConfigChangeAgainstMissingTitle)(u.config,e),(0,l.guardConfigChangeAgainstMissingIsLive)(u.config,e),(0,l.guardAgainstDuplicatedUserId)(e);var t=(0,l.mergeAnalyticsConfig)(u.config,e);u.adapter.sourceChange(t)}},this.setCustomDataOnce=function(e){var t=n({},u.config);u.setState("customdatachange"),u.sendSample(e),u.config=n({},t),u.setConfigParameters(),u.setAutoDetectedDeviceInformation()},this.setCustomData=function(e){u.adapter.setCustomData(e)},this.getCurrentImpressionId=function(){return u.sample.impressionId},this.getUserId=function(){return u.sessionHandler.userId},this.changeCustomData=function(e){u.config=n(n({},u.config),(0,c.extractCustomDataFieldsOnly)(e)),u.setConfigParameters(),u.setAutoDetectedDeviceInformation()},this.config=e,this.sessionHandler=new I.SessionPersistenceHandler(this.config);var d=this;this.errorDetailTrackingSettingsProvider={get domain(){return(0,l.getDomainFromAnalyticsConfig)(d.config)},get licenseKey(){var p;return null!=(p=d.config.key)?p:""},get impressionId(){var f;return null!=(f=d.getCurrentImpressionId())?f:""},get collectorConfig(){return d.config.config}};var g=this.adapter.onLicenseKeyReceived.subscribe(function(e){u.config.key||(u.config.key=e.licenseKey),g()});this.sample=this.buildInitialSample(),this.droppedSampleFrames=0,this.init(),this.setupStateMachineCallbacks();var m=this.adapter.initialize(this);this.featureManager.registerFeatures(m),this.adapter.adModule&&(this.adAn
1alytics=new T.AdAnalytics(this,this.adapter.adModule))}return Object.defineProperty(e.prototype,"version",{get:function(){return S.VERSION},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"errorDetailSubscribable",{get:function(){return this.onErrorDetailEventDispatcher},enumerable:!1,configurable:!0}),e.prototype.init=function(){if(!0===this.adapter.supportsDeferredLicenseLoading||(0,g.isValidString)(this.config.key)&&!(0,g.isBlank)(this.config.key)){h.logger.initialize(this.config.debug),this.featureManager.resetFeatures();var e=(0,l.getDomainFromAnalyticsConfig)(this.config);this.backend=this.backendFactory.createBackend(this.config,{key:this.config.key,domain:e,version:S.VERSION},this.adapter,this.authenticationCallback),this.hasSentStartupSample=!1,this.identicalErrorReportingLimiter.reset(),this.setConfigParameters(),this.setAutoDetectedDeviceInformation(),this.sample.impressionId=(0,v.generateUUID)(),this.sample.userId=this.sessionHandler.userId,this.adapter.videoCompletionTracker&&this.adapter.videoCompletionTracker.reset(),this.adapter.qualityChangeService.resetValues(),this.adapter.ssaiService.resetSourceRelatedState()}else h.logger.errorMessageToUser("Invalid analytics license key provided")},e.prototype.setConfigParameters=function(){var e;this.sample.key=this.config.key,this.sample.playerKey=this.config.playerKey,this.config.player&&(this.sample.player=this.config.player),this.sample.domain=(0,l.getDomainFromAnalyticsConfig)(this.config),this.sample.deviceInformation=(0,l.getDeviceInformationFromAnalyticsConfig)(this.config),this.sample.cdnProvider=this.config.cdnProvider,this.sample.videoId=this.config.videoId,this.sample.videoTitle=this.config.title,this.sample.customUserId=null!=(e=this.config.userId)?e:this.config.customUserId,m.transferCustomDataFields(this.config,this.sample),this.sample.experimentName=this.config.experimentName},e.prototype.setAutoDetectedDeviceInformation=function(){var e,t;if(!(0,y.isNotNullish)(null==(e=this.sample.deviceInformation)?void 0:e.model)&&(0,E.hasWindowWebOSApi)()){var i=(0,b.getWebOSTVModelName)();(0,y.isNullish)(i)||(this.sample.deviceInformation=null!=(t=this.sample.deviceInformation)?t:{},this.sample.deviceInformation.model=i)}},e.prototype.setupStateMachineCallbacks=function(){var e=this;this.adapter.stateMachineCallbacks.setup=function(t,i){h.logger.log("Setup bitmovin analytics "+e.sample.analyticsVersion+" with impressionId: "+e.sample.impressionId),e.setDuration(t),e.setState(i),e.adSamplePlayerStartupTime=e.sample.playerStartupTime=t;var n,r=(0,E.getWindowPerformance)();if((0,y.isNotNullish)(null==(n=null==r?void 0:r.timing)?void 0:n.navigationStart)){var o=Date.now()-r.timing.navigationStart;e.sample.pageLoadTime=o,e.adSamplePageLoadTime=o}
vendor: 6,052 bytes, line 1
1e.startupTime=t,e.sendSample()},this.adapter.stateMachineCallbacks.startup=function(t,i){e.sample.supportedVideoCodecs=d.CodecHelper.supportedVideoFormats,e.setState(i);var n=Math.max(t,1),r=(e.startupTime||0)+n;e.sample.startupTime=r,e.startupTime=r,e.setDuration(n),e.sample.videoStartupTime=n,e.hasSentStartupSample=!0,e.sample.autoplay=e.adapter.getAutoPlay(),e.adSampleAutoplay=e.sample.autoplay;var o=e.adapter.getCurrentPlaybackInfo(),a=o.videoBitrate,s=o.audioBitrate;e.adapter.qualityChangeService.setStartupHasFinished(a,s);var u=e.adapter.getDrmPerformanceInfo();(0,y.isNotNullish)(u)&&(e.sample.drmType=u.drmType,e.sample.drmLoadTime=u.drmLoadTime),e.sendSample()},this.adapter.stateMachineCallbacks.playing=function(t,i){e.setDuration(t),e.setState(i),e.sample.played=t,e.setCompletionValues(),e.sendSample()},this.adapter.stateMachineCallbacks.unload=function(t,i){var n=e.sample.videoTimeStart;"playing"===i&&(e.setDuration(t),e.setState(i),e.sample.played=t,e.setCompletionValues(),(0,p.isNumber)(e.sample.videoTimeEnd)&&(n=e.sample.videoTimeEnd),e.backend.sendUnloadRequest(e.sample),(0,f.clearSampleStateValues)(e.sample)),e.hasSentStartupSample&&(e.setVideoTimeStart(n),e.setVideoTimeEnd(n),e.setState("closed"),e.backend.sendUnloadRequest(e.sample),(0,f.clearSampleStateValues)(e.sample))},this.adapter.stateMachineCallbacks.heartbeat=function(t,i,r){e.setState(i),e.setDuration(t),e.sample=n(n({},e.sample),r),"playing"===i&&e.setCompletionValues(),e.sendSample()},this.adapter.stateMachineCallbacks.qualitychange=function(t){e.adapter.qualityChangeService.startResetInterval(),e.adapter.qualityChangeService.increaseCounter(),e.adapter.qualityChangeService.hasExceededQualityChangeThreshold()?e.adapter.stateMachineCallbacks.error({code:o.ErrorCode.QUALITY_CHANGE_THRESHOLD_EXCEEDED.code,message:o.ErrorCode.QUALITY_CHANGE_THRESHOLD_EXCEEDED.message,errorSeverity:o.ErrorCode.QUALITY_CHANGE_THRESHOLD_EXCEEDED.errorSeverity,legacyData:void 0,data:{},currentTime:t.currentTime}):(e.setState("qualitychange"),e.setDuration(0),e.adapter.stateMachineCallbacks.setVideoTimeEndFromEvent(t),e.adapter.stateMachineCallbacks.setVideoTimeStartFromEvent(t),e.adapter.stateMachineCallbacks.updateSampleQualityInfo(t),e.sendSample())},this.adapter.stateMachineCallbacks.updateSampleQualityInfo=function(t){"audio"===t.type?((0,p.isNumber)(t.bitrate)&&(e.sample.audioBitrate=t.bitrate),(0,g.isValidString)(t.codec)&&(e.sample.audioCodec=t.codec)):"video"===t.type&&((0,p.isNumber)(t.bitrate)&&(e.sample.videoBitrate=t.bitrate),(0,g.isValidString)(t.codec)&&(e.sample.videoCodec=t.codec),(0,p.isNumber)(t.height)&&(e.sample.videoPlaybackHeight=t.height),(0,p.isNumber)(t.width)&&(e.sample.videoPlaybackWidth=t.width))},this.adapter.stateMachineCallbacks.audiotrack_changing=function(){e.sendSample()},this.adapter.stateMachineCallbacks.pause=function(t,i){e.setDuration(t),e.setState(i),e.sample.paused=t,e.sendSample()},this.adapter.stateMachineCallbacks.seeking=function(t){e.setDuration(t),e.setState("seeking"),e.sample.seeked=t,e.sendSample()},this.adapter.stateMachineCallbacks.rebuffering=function(t,i){e.setDuration(t),e.setState(i),e.sample.buffered=t,e.sendSample()},this.adapter.stateMachineCallbacks.videoStartFailed=function(t,i){e.setState("startup"),e.sample.videoStartFailed=!0,e.sample.videoStartFailedReason=i,e.sample.duration=t,i!==s.VideoStartFailedReason.PLAYER_ERROR&&(i===s.VideoStartFailedReason.TIMEOUT&&(e.sample.errorCode=o.ErrorCode.VIDEO_STARTUP_TIMEOUT_REACHED.code,e.sample.errorMessage=o.ErrorCode.VIDEO_STARTUP_TIMEOUT_REACHED.message,e.sample.errorSeverity=o.ErrorCode.VIDEO_STARTUP_TIMEOUT_REACHED.errorSeverity,e.onErrorDetailEventDispatcher.dispatch({code:o.ErrorCode.VIDEO_STARTUP_TIMEOUT_REACHED.code,message:o.ErrorCode.VIDEO_STARTUP_TIMEOUT_REACHED.message,severity:o.ErrorCode.VIDEO_STARTUP_TIMEOUT_REACHED.errorSeverity})),e.sendSample())},this.adapter.stateMachineCallbacks.error=function(t){var i,n=e.transformError({code:t.code,message:t.message,severity:null!=(i=t.errorSeverity)?i:"CRITICAL"},t.originalError);!n.code||e.identicalErrorReportingLimiter.shouldReportError(n.code,n.severity)?(e.adapter.stateMachineCallbacks.setVideoTimeEndFromEvent(t),e.adapter.stateMachineCallbacks.setVideoTimeStartFromEvent(t),e.setState("error"),e.setDuration(0),e.sample.errorCode=n.code,e.sample.errorMessage=n.message,e.sample.errorSeverity=n.severity,e.sample.errorData=(0,y.tryJSONStringify)(t.legacyData),e.sample.errorSegments=e.adapter.getSegmentInfo().map(function(e){return e.name}),e.adapter.onError&&e.adapter.onError(),e.onErrorDetailEventDispatcher.dispatch({code:n.code,message:n.message,severity:n.severity,errorData:t.data}),e.sendSample()):h.logger.log("Bitmovin Analytics: Processing of the error with code ".concat(n.code," was ignored because the error limit was exceeded."))},this.adapter.stateMachineCallbacks.ad=function(t,i){e.setDuration(t),e.setState(i),e.sample.ad=r.AD_TYPE.CSAI,e.sendSample()},this.adapter.stateMachineCallbacks.mute=function(){e.sample.isMuted=!0},this.adapter.stateMachineCallbacks.unMute=function(){e.sample.isMuted=!1},this.adapter.stateMachineCallbacks.subtitle_changing=function(){e.sendSample()},this.adapter.stateMachineCallbacks.setVideoTimeEndFromEvent=function(t){(0,p.isNumber)(null==t?void 0:t.currentTime)&&e.setVideoTimeEnd(m.calculateTime(t.currentTime))},this.adapter.stateMachineCallbacks.setVideoTimeStartFromEvent=function(t){(0,p.isNumber)(null==t?void 0:t.currentTime)&&e.setVideoTimeStart(m.calculateTime(t.currentTime))},this.adapter.stateMachineCallbacks.manualSourceChange=function(t){e.adapter.resetSourceRelatedState(),e.sample=e.buildInitialSample(),e.droppedSampleFrames=0,e.startupTime=0,e.config=Object.keys(t.config).length>0?t.config:e.config,e.init()},this.adapter.stateMachineCallbacks.initialSourceChange=function(t){e.config=t.config,e.setConfigParameters(),e.setAutoDetectedDeviceInformation()},this.adapter.stateMachineCallbacks.end=function(){e.sample=e.buildInitialSample(),e.droppedSampleFrames=0,e.startupTime=0,e.init(
1)},this.adapter.stateMachineCallbacks.release=function(){var t;e.backend=new M.NoOpBackend,null==(t=e.adAnalytics)||t.release(),e.adapter.qualityChangeService.stopResetInterval(),e.identicalErrorReportingLimiter.reset()},this.adapter.stateMachineCallbacks.customdatachange=function(t,i,n){(0,y.isNotNullish)(null==n?void 0:n.customDataValues)&&e.changeCustomData(n.customDataValues)}},e.prototype.setDuration=function(e){this.sample.duration=e},e.prototype.setState=function(e){this.sample.state=e},e.prototype.setPlaybackInfoFromAdapter=function(){var e=this.adapter.getCurrentPlaybackInfo();e&&(this.sample.isLive=(0,y.isNotNullish)(this.config.isLive)?this.config.isLive:e.isLive,(0,y.isNullish)(this.sample.isLive)&&(this.sample.isLive=!1),(0,g.isValidString)(e.size)&&(this.sample.size=e.size),(0,g.isValidString)(e.playerTech)&&(this.sample.playerTech=e.playerTech),(0,p.isNumber)(e.videoDuration)&&(this.sample.videoDuration=m.calculateTime(e.videoDuration||0)),(0,g.isValidString)(e.streamFormat)&&(this.sample.streamFormat=e.streamFormat),(0,g.isValidString)(e.mpdUrl)&&(this.sample.mpdUrl=e.mpdUrl),(0,g.isValidString)(e.m3u8Url)&&(this.sample.m3u8Url=e.m3u8Url),(0,g.isValidString)(e.progUrl)&&(this.sample.progUrl=e.progUrl),(0,p.isNumber)(e.videoWindowWidth)&&(this.sample.videoWindowWidth=e.videoWindowWidth),(0,p.isNumber)(e.videoWindowHeight)&&(this.sample.videoWindowHeight=e.videoWindowHeight),(0,p.isNumber)(e.screenHeight)&&(this.sample.screenHeight=e.screenHeight),(0,p.isNumber)(e.screenWidth)&&(this.sample.screenWidth=e.screenWidth),m.isBoolean(e.isMuted)&&(this.sample.isMuted=e.isMuted),m.isBoolean(e.isCasting)&&(this.sample.isCasting=e.isCasting),(0,g.isValidString)(e.castTech)&&(this.sample.castTech=e.castTech),(0,g.isValidString)(e.videoTitle)&&!this.config.title&&(this.sample.videoTitle=e.videoTitle),(0,g.isValidString)(e.audioCodec)&&(this.sample.audioCodec=e.audioCodec),(0,g.isValidString)(e.videoCodec)&&(this.sample.videoCodec=e.videoCodec),(0,g.isValidString)(e.audioLanguage)&&(this.sample.audioLanguage=e.audioLanguage),m.isBoolean(e.subtitleEnabled)&&(this.sample.subtitleEnabled=e.subtitleEnabled),(0,g.isValidString)(e.subtitleLanguage)?this.sample.subtitleLanguage=e.subtitleLanguage:this.sample.subtitleLanguage=void 0,(0,p.isNumber)(e.droppedFrames)&&(this.sample.droppedFrames=Math.max(e.droppedFrames-this.droppedSampleFrames,0),this.droppedSampleFrames=e.droppedFrames))},e.prototype.sendSample=function(e){if(this.setPlaybackInfoFromAdapter(),this.sample.time=m.getCurrentTimestamp(),this.sample.downloadSpeedInfo=this.adapter.getDownloadSpeedInfo(),this.adapter.resetDownloadSpeedInfoMeasures(),this.adapter.ssaiService.manipulate(this.sample),null!=e&&this.changeCustomData(e),(0,y.isNullish)(this.sample.videoBitrate)||this.sample.videoBitrate<=0){O(this.sample,this.adapter.getCurrentPlaybackInfo());var t=n({},this.sample);this.backend.sendRequest(t)}else t=n({},this.sample),this.backend.sendRequest(t),O(this.sample,this.adapter.getCurrentPlaybackInfo());(0,f.clearSampleStateValues)(this.sample)},e.prototype.sendSsaiEngagementAdSample=function(e){var t;if(!0===(null==(t=this.config.config)?void 0:t.ssaiEngagementTrackingEnabled)){if((0,R.isSsaiEngagementStartedData)(e)){var i=(0,C.createStartedAdSample)(this.sample,e);this.backend.sendAdRequest(i)}else if((0,R.isSsaiEngagementQuartileData)(e))i=(0,C.createQuartileAdSample)(this.sample,e),this.backend.sendAdRequest(i);else if((0,R.isSsaiEngagementErrorData)(e)){e.analyticsError=this.transformError(e.analyticsError,e.originalError);var n=(0,C.createErrorAdSample)(this.sample,e);this.backend.sendAdRequest(n)}}},e.prototype.setCompletionValues=function(){if(this.adapter.videoCompletionTracker){var e=this.adapter.videoCompletionTracker.addWatched({start:this.sample.videoTimeStart,end:this.sample.videoTimeEnd}),t=this.adapter.videoCompletionTracker.getCompletionPercentage();Number.isNaN(e)||Number.isNaN(t)||(this.sample.completed=e,this.sample.completedTotal=t)}},e.prototype.setVideoTimeStart=function(e){this.sample.videoTimeStart=e},e.prototype.setVideoTimeEnd=function(e){this.sample.videoTimeEnd=e},e.prototype.transformError=function(e,t){var i,n,r={code:e.code,message:e.message,severity:e.severity};try{var o=null==(n=null==(i=this.config.config)?void 0:i.errorTransformerCallback)?void 0:n.transform(r,{originalError:t});r.code=(0,p.isNumber)(null==o?void 0:o.code)?null==o?void 0:o.code:r.code,r.message=(0,g.isValidString)(null==o?void 0:o.message)?null==o?void 0:o.message:r.message,r.severity=(0,g.isValidString)(null==o?void 0:o.severity)&&(0,y.isErrorSeverity)(null==o?void 0:o.severity)?o.severity:r.severity}catch(e){h.logger.error("Error in errorTransformerCallback",e)}return r},e.prototype.buildInitialSample=function(){var e,t=(0,E.getWindowLocationPathname)(),i=this.config.player||this.adapter.getPlayerName();return{ad:0,analyticsVersion:S.VERSION,audioBitrate:0,buffered:0,completedTotal:0,droppedFrames:0,duration:0,isLive:null!=(e=this.config.isLive)&&e,language:(0,E.getWindowNavigatorLanguage)(),pageLoadTime:0,pageLoadType:m.getPageLoadType(),path:(0,g.isValidString)(t)?(0,y.removeTrailingSlash)(t):void 0,paused:0,platform:"web",played:0,player:i,playerStartupTime:0,playerTech:this.adapter.getPlayerTech(),screenHeight:screen.height,screenWidth:screen.width,seeked:0,size:a.PlayerSize.Window,startupTime:0,time:0,userAgent:(0,E.getWindowNavigatorUserAgent)(),version:i+"-"+this.adapter.getPlayerVersion(),videoBitrate:0,videoDuration:0,videoPlaybackHeight:0,videoPlaybackWidth:0,videoStartupTime:0,videoTimeEnd:0,videoTimeStart:0,videoWindowHeight:0,videoWindowWidth:0}},e.create=function(t,i){return new e(t,i,new _.BackendFactory,new I.SessionPersistenceHandler(t),new u.FeatureManager,new A.EventDispatcher,new P.IdenticalErrorReportingLimiter)},e.version=S.VERSION,e}()},4355:function(e,t){"use strict";var i;
1Object.defineProperty(t,"__esModule",{value:!0}),t.CdnProvider=void 0,function(e){e.AKAMAI="akamai",e.BITGRAVITY="bitgravity",e.CHINACACHE="chinacache",e.CLOUDFLARE="cloudflare",e.CLOUDFRONT="cloudfront",e.FASTLY="fastly",e.MAXCDN="maxcdn"}(i||(t.CdnProvider=i={}))},4438:function(e,t){"use strict";var i;Object.defineProperty(t,"__esModule",{value:!0}),t.HttpRequestType=void 0,function(e){e.MANIFEST_DASH="manifest/dash",e.MANIFEST_HLS_MASTER="manifest/hls/master",e.MANIFEST_HLS_VARIANT="manifest/hls/variant",e.MANIFEST_SMOOTH="manifest/smooth",e.MANIFEST_ADS="manifest/ads",e.MEDIA_AUDIO="media/audio",e.MEDIA_VIDEO="media/video",e.MEDIA_SUBTITLES="media/subtitles",e.MEDIA_THUMBNAILS="media/thumbnails",e.MEDIA_SEGMENTINDEX="media/segmentindex",e.DRM_LICENSE_WIDEVINE="drm/license/widevine",e.DRM_LICENSE_PLAYREADY="drm/license/playready",e.DRM_LICENSE_FAIRPLAY="drm/license/fairplay",e.DRM_LICENSE_PRIMETIME="drm/license/primetime",e.DRM_LICENSE_CLEARKEY="drm/license/clearkey",e.DRM_LICENSE_TVKEY="drm/license/tvkey",e.DRM_CERTIFICATE_FAIRPLAY="drm/certificate/fairplay",e.HLS_INTERSTITIALS_ASSET_LIST="hls/interstitials/asset-list",e.KEY_HLS_AES="key/hls/aes",e.TIME_SYNC="time/sync",e.WEBRTC_SDP_REQUEST="webrtc/sdp/request",e.WEBRTC_SDP_ANSWER="webrtc/sdp/answer",e.WEBRTC_SDP_OFFER="webrtc/sdp/offer",e.UNKNOWN="unknown",e.INTERNAL="internal"}(i||(t.HttpRequestType=i={}))},4439:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AdSample=void 0;var n=i(5063);t.AdSample=function(){function e(t){if(this.clicked=0,this.closed=0,this.completed=0,this.midpoint=0,this.quartile1=0,this.quartile3=0,this.skipped=0,this.started=0,t){if(this.adClickthroughUrl=t.clickThroughUrl,this.adId=t.id,this.mediaUrl=t.mediaFileUrl,this.mediaUrl)try{var i=new URL(this.mediaUrl);this.mediaPath=i.pathname,this.mediaServer=i.hostname}catch(e){}this.isLinear=t.isLinear,this.adPlaybackHeight=t.height,this.adPlaybackWidth=t.width,t.data&&(this.videoBitrate=void 0===t.data.bitrate?void 0:1e3*t.data.bitrate,this.streamFormat=t.data.mimeType);var r=t.data;r&&(r.adSystem&&(this.adSystem=r.adSystem.name),r.advertiser&&(this.advertiserName=r.advertiser.name),this.apiFramework=r.apiFramework,r.creative&&(this.creativeAdId=r.creative.adId,this.creativeId=r.creative.id,r.creative.universalAdId&&(this.universalAdIdRegistry=r.creative.universalAdId.idRegistry,this.universalAdIdValue=r.creative.universalAdId.value)),this.adDescription=r.adDescription,this.minSuggestedDuration=n.calculateTimeWithUndefined(r.minSuggestedDuration),r.survey&&(this.surveyUrl=r.survey.uri),this.adTitle=r.adTitle,this.wrapperAdsCount=r.wrapperAdIds?r.wrapperAdIds.length:0)}var o=t;o&&(this.adSkipAfter=e.parseSkipAfter(o.skippableAfter),this.adSkippable=o.skippable||(void 0===this.adSkipAfter?void 0:this.adSkipAfter>=0),this.adDuration=n.calculateTime(o.duration))}return e.parseSkipAfter=function(e){if(void 0!==e)return -1===e?e:n.calculateTime(e)},e}()},4501:function(e,t){"use strict";var i;Object.defineProperty(t,"__esModule",{value:!0}),t.LicensingResult=void 0,function(e){e.Denied="denied",e.Granted="granted",e.Skip="skip"}(i||(t.LicensingResult=i={}))},4649:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SEQUENCE_NUMBER_LIMIT=t.ANALYTICS_MIN_SEEK_DIFFERENCE_THRESHOLD=t.ANALYTICS_REBUFFER_TIMEOUT=t.ANALYTICS_QUALITY_CHANGE_COUNT_RESET_INTERVAL=t.ANALYTICS_QUALITY_CHANGE_COUNT_THRESHOLD=t.ANALYTICS_VIDEOSTART_TIMEOUT=t.ANALYTICS_LICENSECALL_TIMEOUT=t.ANALYTICS_BACKEND_BASE_URL=t.MESSAGE_NAMESPACE=void 0,t.MESSAGE_NAMESPACE="urn:x-cast:com.bitmovin.analytics.cast",t.ANALYTICS_BACKEND_BASE_URL="https://analytics-ingress-global.bitmovin.com",t.ANALYTICS_LICENSECALL_TIMEOUT=6e4,t.ANALYTICS_VIDEOSTART_TIMEOUT=6e4,t.ANALYTICS_QUALITY_CHANGE_COUNT_THRESHOLD=50,t.ANALYTICS_QUALITY_CHANGE_COUNT_RESET_INTERVAL=36e5,t.ANALYTICS_REBUFFER_TIMEOUT=12e4,t.ANALYTICS_MIN_SEEK_DIFFERENCE_THRESHOLD=3,t.SEQUENCE_NUMBER_LIMIT=1e3},4679:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Bitmovin8Adapter=void 0;var n=i(4350),r=i(6398),o=i(8331),a=i(9627),s=i(1916),u=i(2108),c=i(4926),l=i(4067),d=i(6596);t.Bitmovin8Adapter=function(){function e(e,t){var i,c=this;if(this.ssai={adBreakStart:function(e){if((0,u.isDefined)(c.internalAdapter)){var t=(0,l.sanitizeBitmovin8AdapterSsaiAdBreakMetadataAdPosition)(e);if((0,r.hasValidSsaiAdBreakMetadataStructure)(t)){var i=(0,r.simplySanitizeSsaiAdBreakMetadata)(t);c.internalAdapter.ssaiService.adBreakStart(i)}}},adStart:function(e){if((0,u.isDefined)(c.analytics)&&(0,u.isDefined)(c.internalAdapter)&&(0,r.hasValidSsaiAdMetadataStructure)(e)){var t=(0,r.simplySanitizeSsaiAdMetadata)(e);c.internalAdapter.ssaiService.adStart(t),c.analytics.setConfigParameters(),c.analytics.setAutoDetectedDeviceInformation()}},adQuartileFinished:function(e,t){if((0,u.isDefined)(c.analytics)&&(0,u.isDefined)(c.internalAdapter)&&(0,r.hasValidSsaiAdQuartileStructure)(e)){var i=(0,r.sanitizeSsaiAdQuartileMetadata)(t);c.internalAdapter.ssaiService.adQuartileFinished(e,i)}},adBreakEnd:function(){(0,u.isDefined)(c.analytics)&&(0,u.isDefined)(c.internalAdapter)&&(c.internalAdapter.ssaiService.adBreakEnd(),c.analytics.setConfigParameters(),c.analytics.setAutoDetectedDeviceInformation())}},(0,u.hasPlayerAlreadyBeenAugmented)(e))s.logger.errorMessageToUser("Bitmovin Analytics is already hooked up to this player instance");else{(0,u.markPlayerInstanceAsAugmented)(e);var h=e.getConfig(),p=(0,o.sanitizeAnalyticsConfig)(h.analytics);if((0,a.areCollectorRequirementsValid)(p)){(0,o.guardAgainstDuplicatedUserId)(p),p.playerKey=null!=(i=p.playerKey)?i:h.key;var f=d.Bitmovin8InternalAdapter.create(e,t);this.internalAdapter=f,this.analytics=n.Analytics.create(p,this.internalAdapter),e.analytics=this,this.wrapPlayerLoad(e,this.analytics,f)}}}return e.prototype.wrapPlayerLoad=function(e,t,i){var n=e.load;e.load=function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];if(r.length>0){var a=r[0].analytics;t.sourceChange(a)}return i.trackLoadstartWithAutoplay(),n.apply(e,r)}}
vendor: 4,846 bytes, line 1
1,Object.defineProperty(e.prototype,"version",{get:function(){return c.VERSION},enumerable:!1,configurable:!0}),e.prototype.getCurrentImpressionId=function(){if((0,u.isDefined)(this.analytics))return this.analytics.getCurrentImpressionId()},e.prototype.getUserId=function(){if((0,u.isDefined)(this.analytics))return this.analytics.getUserId()},e.prototype.setCustomData=function(e){(0,u.isDefined)(this.internalAdapter)&&this.internalAdapter.setCustomData(e)},e.prototype.setCustomDataOnce=function(e){(0,u.isDefined)(this.analytics)&&this.analytics.setCustomDataOnce(e)},e.prototype.sourceChange=function(e){(0,u.isDefined)(this.analytics)&&this.analytics.sourceChange(e)},e.version=c.VERSION,e}()},4820:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defaultStateMachineCallbacks=void 0,t.defaultStateMachineCallbacks={setup:function(){},startup:function(){},playing:function(){},heartbeat:function(){},qualitychange:function(){},updateSampleQualityInfo:function(){},audiotrack_changing:function(){},pause:function(){},seeking:function(){},rebuffering:function(){},error:function(){},end:function(){},unload:function(){},ad:function(){},mute:function(){},unMute:function(){},subtitle_changing:function(){},setVideoTimeEndFromEvent:function(){},setVideoTimeStartFromEvent:function(){},videoStartFailed:function(){},startCasting:function(){},casting:function(){},manualSourceChange:function(){},initialSourceChange:function(){},muting_ready:function(){},customdatachange:function(){},release:function(){}}},4916:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SourceInfoFallbackService=void 0;var n=i(1820),r=i(5063);t.SourceInfoFallbackService=function(){function e(){}return e.prototype.reset=function(){this.streamFormat=void 0,this.audioCodec=void 0,this.videoCodec=void 0},e.prototype.setStreamFormat=function(e){this.streamFormat=e},e.prototype.applyStreamFormat=function(e){(0,n.isBlank)(this.streamFormat)||(e.streamFormat=this.streamFormat)},e.prototype.applyAndStoreCodecInfo=function(e,t){(0,r.isNotNullish)(null==t?void 0:t.audioCodec)&&(this.audioCodec=t.audioCodec),(0,r.isNotNullish)(null==t?void 0:t.videoCodec)&&(this.videoCodec=t.videoCodec),(0,n.isBlank)(this.audioCodec)||(e.audioCodec=this.audioCodec),(0,n.isBlank)(this.videoCodec)||(e.videoCodec=this.videoCodec)},e}()},4926:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VERSION=void 0,t.VERSION="v2.50.1"},5063:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.tryJSONStringify=t.isAudioMuted=t.isReactNative=t.joinUrls=t.getURLResourceName=t.calculatePercentage=t.transferCustomDataFields=t.getCustomDataString=t.noOp=t.getCurrentTimestamp=t.calculateTimeWithUndefined=t.calculateTime=t.removeTrailingSlash=t.isFunction=t.isPlainObject=t.isObject=t.toBoolean=t.isBoolean=t.isNotNullish=t.isNullish=void 0,t.isErrorSeverity=function(e){return"CRITICAL"===e||"INFO"===e},t.getPageLoadType=function(){return(0,o.isDocumentHidden)()?n.PAGE_LOAD_TYPE.BACKGROUND:n.PAGE_LOAD_TYPE.FOREGROUND};var n=i(9946),r=i(5529),o=i(3848),a=i(1820);t.isNullish=function(e){return null==e},t.isNotNullish=function(e){return!(0,t.isNullish)(e)},t.isBoolean=function(e){return!(0,t.isNullish)(e)&&"boolean"==typeof e},t.toBoolean=function(e){return(!!e).valueOf()},t.isObject=function(e){return(0,t.isNotNullish)(e)&&"object"==typeof e},t.isPlainObject=function(e){return"[object Object]"===Object.prototype.toString.call(e)},t.isFunction=function(e){return"function"==typeof e},t.removeTrailingSlash=function(e){return e.replace(/\/$/g,"")},t.calculateTime=function(e){return Math.round(1e3*e)},t.calculateTimeWithUndefined=function(e){if(!(0,t.isNullish)(e))return(0,t.calculateTime)(e)},t.getCurrentTimestamp=function(){return Date.now()},t.noOp=function(){},t.getCustomDataString=function(e){return"object"==typeof e?(0,t.tryJSONStringify)(e):(0,t.isFunction)(e)?(0,t.getCustomDataString)(e()):void 0===e?e:"string"!=typeof e?String(e):e},t.transferCustomDataFields=function(e,i){for(var n=1;n<=r.customDataFieldCount;n++){var o="customData".concat(n);i[o]=(0,t.getCustomDataString)(e[o])}},t.calculatePercentage=function(e,t){if(void 0!==t&&0!==t)return Math.round((e||0)/t*100)},t.getURLResourceName=function(e){return 0===e.length?"":e.split("/").pop()||""},t.joinUrls=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.reduce(function(e,t){return((0,a.endsWith)(e,"/")&&void 0!==t?e.substr(0,e.length-1):e)+"/"+((0,a.startsWith)(t,"/")?t.substr(1):t)})},t.isReactNative=function(){return(0,t.isNotNullish)(navigator)&&"ReactNative"===navigator.product},t.isAudioMuted=function(e,t){return e||t<.01},t.tryJSONStringify=function(e){if(!(0,t.isNullish)(e))try{return JSON.stringify(e)}catch(e){return}}},5248:function(e,t,i){"use strict";
1Object.defineProperty(t,"__esModule",{value:!0}),t.getSourceInfoFromBitmovinSourceConfig=void 0;var n=i(5063);t.getSourceInfoFromBitmovinSourceConfig=function(e,t){if(!e)return{progBitrate:void 0,progUrl:void 0};if("string"==typeof e)return{progBitrate:0,progUrl:e};if(Array.isArray(e)&&e.length>0){var i=t.getPlaybackVideoData(),r=0;return(0,n.isNotNullish)(i)&&!isNaN(+i.id)&&(r=+i.id),{progBitrate:e[r].bitrate||0,progUrl:e[r].url}}return"object"!=typeof e||Array.isArray(e)?{progBitrate:void 0,progUrl:void 0}:{progBitrate:e.bitrate||0,progUrl:e.url}}},5253:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LicenseCall=function(e,t,i,o){var a=(0,r.joinUrls)(o,"/licensing"),s={analyticsVersion:i,domain:t,key:e};return new Promise(function(e){(0,n.post)(a,s,function(t){e(t)})})};var n=i(92),r=i(5063)},5426:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AnalyticsCall=void 0;var n=i(7906),r=i(92),o=i(5063);t.AnalyticsCall=function(){function e(e){this.analyticsServerUrl=(0,o.joinUrls)(e,"analytics"),this.adAnalyticsServerUrl=(0,o.joinUrls)(e,"analytics/a")}return e.prototype.sendRequest=function(e,t){var i=this.analyticsServerUrl;(0,n.isSsaiRelatedSample)(e)&&(i=(0,n.appendSsaiRoutingParam)(i)),(0,r.post)(i,e,t)},e.prototype.sendUnloadRequest=function(e){var t=this,i=this.analyticsServerUrl;(0,n.isSsaiRelatedSample)(e)&&(i=(0,n.appendSsaiRoutingParam)(i)),this.trySendBeacon(function(e){return t.sendRequestSynchronous(e,o.noOp)},i,e)},e.prototype.trySendBeacon=function(e,t,i,n){if(void 0===n&&(n={}),void 0===navigator.sendBeacon)e(i);else{var r=new Blob([JSON.stringify(i)],n);navigator.sendBeacon(t,r)||e(i)}},e.prototype.sendRequestSynchronous=function(e,t){var i=this.analyticsServerUrl;(0,n.isSsaiRelatedSample)(e)&&(i=(0,n.appendSsaiRoutingParam)(i)),(0,r.post)(i,e,t,!1)},e.prototype.sendAdRequest=function(e){var t=this.adAnalyticsServerUrl;(0,n.isSsaiRelatedSample)(e)&&(t=(0,n.appendSsaiRoutingParam)(t)),this.trySendBeacon(function(e){return(0,r.post)(t,e,o.noOp)},t,e)},e}()},5517:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AdCallbacks=void 0,t.AdCallbacks=function(){this.onAdStarted=function(e){},this.onAdFinished=function(e){},this.onAdBreakStarted=function(e){},this.onAdBreakFinished=function(e){},this.onAdClicked=function(e){},this.onAdError=function(e){},this.onAdManifestLoaded=function(e){},this.onAdQuartile=function(e){},this.onAdSkipped=function(e){},this.onPlay=function(e){},this.onPause=function(e){},this.onBeforeUnload=function(){}}},5529:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.extractCustomDataFieldsOnly=t.customDataFieldCount=t.customDataValuesKeys=void 0,t.customDataValuesKeys=["customData1","customData2","customData3","customData4","customData5","customData6","customData7","customData8","customData9","customData10","customData11","customData12","customData13","customData14","customData15","customData16","customData17","customData18","customData19","customData20","customData21","customData22","customData23","customData24","customData25","customData26","customData27","customData28","customData29","customData30","customData31","customData32","customData33","customData34","customData35","customData36","customData37","customData38","customData39","customData40","customData41","customData42","customData43","customData44","customData45","customData46","customData47","customData48","customData49","customData50","customData51","customData52","customData53","customData54","customData55","customData56","customData57","customData58","customData59","customData60","customData61","customData62","customData63","customData64","customData65","customData66","customData67","customData68","customData69","customData70","customData71","customData72","customData73","customData74","customData75","customData76","customData77","customData78","customData79","customData80","customData81","customData82","customData83","customData84","customData85","customData86","customData87","customData88","customData89","customData90","customData91","customData92","customData93","customData94","customData95","customData96","customData97","customData98","customData99","customData100","experimentName"],t.customDataFieldCount=t.customDataValuesKeys.filter(function(e){return e.match("customData\\d+")}).length,t.extractCustomDataFieldsOnly=function(e){var i={};return t.customDataValuesKeys.forEach(function(t){e[t]&&(i[t]=e[t])}),i}},5766:function(e,t){"use strict";
1Object.defineProperty(t,"__esModule",{value:!0}),t.Converter=void 0,t.Converter=function(){function e(){}return e.bytesToBits=function(e){return 8*e},e.bitsToBytes=function(e){return Math.round(e/8)},e.kiloBitsToBits=function(e){return 1e3*e},e}()},5791:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AdAnalyticsSample=void 0;var n=i(5063);t.AdAnalyticsSample=function(e){this.platform="web",e&&(this.videoImpressionId=e.impressionId,this.userAgent=e.userAgent,this.language=e.language,this.cdnProvider=e.cdnProvider,n.transferCustomDataFields(e,this),this.customUserId=e.customUserId,this.domain=e.domain,this.experimentName=e.experimentName,this.key=e.key,this.path=e.path,this.player=e.player,this.playerKey=e.playerKey,this.playerTech=e.playerTech,this.screenHeight=e.screenHeight,this.screenWidth=e.screenWidth,this.version=e.version,this.size=e.size,this.userId=e.userId,this.videoId=e.videoId,this.videoTitle=e.videoTitle,this.videoWindowHeight=e.videoWindowHeight,this.videoWindowWidth=e.videoWindowWidth,this.audioCodec=e.audioCodec,this.videoCodec=e.videoCodec)}},5878:function(e,t){"use strict";var i;Object.defineProperty(t,"__esModule",{value:!0}),t.CastTech=void 0,function(e){e.AirPlay="AirPlay",e.GoogleCast="GoogleCast",e.WebSocket="WebSocket"}(i||(t.CastTech=i={}))},6235:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SegmentTracker=void 0,t.SegmentTracker=function(){function e(){this.segments=[]}return e.prototype.reset=function(){this.segments=[]},e.prototype.addSegment=function(e){this.segments.push(e)},e.prototype.removeSegment=function(e){this.segments=this.segments.filter(function(t){return t.url!==e})},e.prototype.getSegments=function(){return this.segments},e}()},6398:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isAdPosition=s,t.hasValidSsaiAdBreakMetadataStructure=function(e){if((0,a.isNullish)(e))return!0;if(!(0,a.isPlainObject)(e))return r.logger.errorMessageToUser("Invalid SsaiAdBreakMetadata: not a plain object"),!1;var t=e;return!((0,a.isNotNullish)(t.adPosition)&&!s(t.adPosition)&&(r.logger.errorMessageToUser("Invalid SsaiAdBreakMetadata: 'adPosition' property is not valid"),1))},t.simplySanitizeSsaiAdBreakMetadata=function(e){if(!(0,a.isNullish)(e))return{adPosition:e.adPosition}},t.hasValidSsaiAdMetadataStructure=function(e){if((0,a.isNullish)(e))return!0;if(!(0,a.isPlainObject)(e))return r.logger.errorMessageToUser("Invalid SsaiAdMetadata: not a plain object"),!1;var t=e;return(0,a.isNotNullish)(t.adId)&&!(0,o.isValidString)(t.adId)?(r.logger.errorMessageToUser("Invalid SsaiAdMetadata: 'adId' property is not string"),!1):(0,a.isNotNullish)(t.adSystem)&&!(0,o.isValidString)(t.adSystem)?(r.logger.errorMessageToUser("Invalid SsaiAdMetadata: 'adSystem' property is not string"),!1):!((0,a.isNotNullish)(t.customData)&&!(0,a.isPlainObject)(t.customData)&&(r.logger.errorMessageToUser("Invalid SsaiAdMetadata: 'customData' property is not a plain object"),1))},t.simplySanitizeSsaiAdMetadata=function(e){if(!(0,a.isNullish)(e)){var t=void 0;if((0,a.isNotNullish)(e.customData)){var i=(0,n.extractCustomDataFieldsOnly)(e.customData);t={},(0,a.transferCustomDataFields)(i,t)}return{adId:e.adId,adSystem:e.adSystem,customData:t}}},t.isSsaiAdQuartile=u,t.hasValidSsaiAdQuartileStructure=function(e){return!!u(e)||(r.logger.errorMessageToUser("Invalid SsaiAdQuartile"),!1)},t.sanitizeSsaiAdQuartileMetadata=function(e){if((0,a.isNullish)(e))return{};if(!(0,a.isPlainObject)(e))return r.logger.errorMessageToUser("Invalid SsaiAdQuartileMetadata: not a plain object"),{};var t={failedBeaconUrl:e.failedBeaconUrl};return(0,o.isValidString)(t.failedBeaconUrl)?t.failedBeaconUrl=t.failedBeaconUrl.substring(0,500):(r.logger.errorMessageToUser("Invalid SsaiAdQuartileMetadata: 'failedBeaconUrl' property is not string"),t.failedBeaconUrl=void 0),t};var n=i(5529),r=i(1916),o=i(1820),a=i(5063);function s(e){return"preroll"===e||"midroll"===e||"postroll"===e}function u(e){return"first"===e||"midpoint"===e||"third"===e||"completed"===e}},6481:function(e,t,i){"use strict";
1Object.defineProperty(t,"__esModule",{value:!0}),t.clearSampleStateValues=function(e){e.ad=0,e.adId=void 0,e.adIndex=void 0,e.adPosition=void 0,e.adSystem=void 0,e.autoplay=void 0,e.buffered=0,e.castTech=void 0,e.completed=void 0,e.drmLoadTime=void 0,e.droppedFrames=0,e.duration=0,e.errorCode=void 0,e.errorData=void 0,e.errorMessage=void 0,e.errorSegments=void 0,e.errorSeverity=void 0,e.pageLoadTime=0,e.paused=0,e.played=0,e.playerStartupTime=0,e.seeked=0,e.startupTime=0,e.state=void 0,e.videoStartFailed=void 0,e.videoStartFailedReason=void 0,e.videoStartupTime=0,e[n.SSAI_RELATED_SAMPLE_MARKER]=void 0};var n=i(7906)},6596:function(e,t,i){"use strict";var n,r=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 i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(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)}),o=this&&this.__assign||function(){return(o=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.Bitmovin8InternalAdapter=void 0;var a,s=i(2403),u=i(9664),c=i(2663),l=i(6235),d=i(4916),h=i(6743),p=i(5878),f=i(3458),g=i(2361),m=i(556),y=i(8525),v=i(7614),S=i(9557),b=i(7881),E=i(3413),T=i(5248),_=i(1916),A=i(4649),P=i(5063),M=i(2647),I=i(887),R=i(7543),C=i(8676),O=i(665),D=i(436);!function(e){e.Fullscreen="fullscreen",e.Inline="inline",e.PictureInPicture="pictureinpicture"}(a||(a={})),t.Bitmovin8InternalAdapter=function(e){function t(t,i,n,r,o,a,u){var l=e.call(this,u)||this;l.onBeforeUnLoadEvent=!1,l.getPlayerVersion=function(){return l.player.version},l.getPlayerName=function(){return m.Player.BITMOVIN},l.getPlayerTech=function(){return l.player.getPlayerType()},l.getDrmPerformanceInfo=function(){return l.drmPerformanceInfo},l.httpRequestTrackingAdapter=o,l._videoCompletionTracker=r,l.segmentTracker=n,l.speedMeter=i,l.player=t;var d=new c.HeartbeatService(function(){return t.getCurrentTime()}),h=new s.Bitmovin8AnalyticsStateMachine(l.stateMachineCallbacks,d,l.opts);return d.setListener(h),l.sourceInfoFallbackService=a,l.stateMachine=h,l}return r(t,e),Object.defineProperty(t.prototype,"currentTime",{get:function(){var e;try{if((0,P.isNotNullish)(null==(e=this.player)?void 0:e.getCurrentTime)&&!this.isAdPlaying)return this.player.getCurrentTime()}catch(e){_.logger.warn("Analytics Collector attempted to access player, but player is not available anymore")}return this.lastTrackedCurrentTime?this.lastTrackedCurrentTime:0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isAdPlaying",{get:function(){var e=this.player.ads&&this.player.ads.getActiveAd();return(0,P.isNotNullish)(e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"supportsDeferredLicenseLoading",{get:function(){return!0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"adModule",{get:function(){return this._adModule},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"videoCompletionTracker",{get:function(){return this._videoCompletionTracker},enumerable:!1,configurable:!0}),t.prototype.initialize=function(e){var t=this;this.registerPlayerEventListeners(),this.registerUnloadEventListeners(),this._adModule=new I.Bitmovin8AdModule(this.player,this.windowEventTracker),this.ssaiService.activate({getPlayerCurrentTime:function(){return t.currentTime},reportEngagementInteraction:function(t){e.sendSsaiEngagementAdSample(t)},reportPlaybackInteraction:function(e,i){t.stateMachine.sendPlayingSample(e,i,!0)}});var i=new b.HttpRequestTracking([this.httpRequestTrackingAdapter]);return[new S.ErrorDetailTracking(e.errorDetailTrackingSettingsProvider,new v.ErrorDetailBackend(e.errorDetailTrackingSettingsProvider.collectorConfig),[e.errorDetailSubscribable],i)]},t.prototype.resetSourceRelatedState=function(){this.ssaiService.resetSourceRelatedState(),e.prototype.resetSourceRelatedState.call(this)},t.prototype.getAutoPlay=function(){var e,t=(0,D.getPlayerConfig)(this.player);return!(0,P.isNullish)(t)&&((null==(e=t.playback)?void 0:e.autoplay)||!1)},t.prototype.getCurrentPlaybackInfo=function(){var t,i=this.player.getContainer(),n=o(o({},e.prototype.getCommonPlaybackInfo.call(this)),{size:this.player.getViewMode()===a.Fullscreen?y.PlayerSize.Fullscreen:y.PlayerSize.Window,playerTech:this.getPlayerTech(),isLive:this.player.isLive(),videoDuration:(0,E.normalizeVideoDuration)(this.videoDuration),streamFormat:this.player.getStreamType(),videoWindowWidth:null==i?void 0:i.offsetWidth,videoWindowHeight:null==i?void 0:i.offsetHeight,isMuted:this.player.isMuted(),isCasting:this.player.isCasting(),audioLanguage:(0,P.isNotNullish)(this.player.getAudio())?null==(t=this.player.getAudio())?void 0:t.lang:void 0,subtitleEnabled:!1,droppedFrames:(0,P.isNotNullish)(this.player.getSource())?this.player.getDroppedVideoFrames():0});return this.applySubtitleProperties(n),this.applyPlaybackQualityProperties(n),this.applyCastingProperties(n),this.applySourceProperties(n),((0,P.isNullish)(n.streamFormat)||"unknown"===n.streamFormat)&&this.sourceInfoFallbackService.applyStreamFormat(n),n},t.prototype.getSegmentInfo=function(){return this.segmentTracker.getSegments()},t.prototype.getDownloadSpeedInfo=function(){return this.speedMeter.getInfo()},t.prototype.resetDownloadSpeedInfoMeasures=function(){this.speedMeter.reset()},t.prototype.onError=function(){this.segmentTracker.reset()},t.prototype.trackLoadstartWithAutoplay=function(){this.getAutoPlay()&&this.eventCallback(g.Event.LOADSTART_AUTOPLAY,{currentTime:this.currentTime})},t.prototype.registerPlayerEventListeners=function(){var e=this;this.player.on(this.player.exports.PlayerEvent.SourceUnloaded,function(t){e.segmentTracker.reset(),e.eventCallback(g.Event.SOURCE_UNLOADED,{currentTime:e.currentTime})}),this.player.on(this.player.exports.PlayerEvent.SourceLoaded,function(t){e._videoCompletionTracker.reset(),e.videoDuration=e.player.getDuration(),e._videoCompletionTracker.setVideoDuration(e.player.getDuration()),e.sourceInfoFallbackService.setStreamFormat(e.player.getStreamType()),e.eventCallback(g.Event.SOURCE_LOADED,{})}),this.player.on(this.player.exports.PlayerEvent.CastStarted,function(t){e.eventCallback(g.Event.START_CA
vendor: 7,089 bytes, line 1
1ST,t)}),this.player.on(this.player.exports.PlayerEvent.CastStopped,function(){e.eventCallback(g.Event.END_CAST,{currentTime:e.currentTime})}),this.player.on(this.player.exports.PlayerEvent.Play,function(t){"ui-seek"!==t.issuer&&e.eventCallback(g.Event.PLAY,{currentTime:e.currentTime})}),this.player.on(this.player.exports.PlayerEvent.Playing,function(t){"advertising-api"!==t.issuer&&e.eventCallback(g.Event.PLAYING,{currentTime:e.currentTime})}),this.player.on(this.player.exports.PlayerEvent.Paused,function(t){"ui-seek"!==t.issuer&&e.eventCallback(g.Event.PAUSE,{currentTime:e.currentTime})}),this.player.on(this.player.exports.PlayerEvent.TimeChanged,function(t){e.isAdPlaying||(e.lastTrackedCurrentTime=e.player.getCurrentTime()),e.eventCallback(g.Event.TIMECHANGED,{currentTime:e.lastTrackedCurrentTime})}),this.player.on(this.player.exports.PlayerEvent.Seek,function(t){e.allowSeeking(t)&&e.eventCallback(g.Event.SEEK,{currentTime:e.currentTime})}),this.player.on(this.player.exports.PlayerEvent.Seeked,function(){e.eventCallback(g.Event.SEEKED,{currentTime:e.currentTime})}),this.player.on(this.player.exports.PlayerEvent.StallStarted,function(){e.eventCallback(g.Event.START_BUFFERING,{currentTime:e.currentTime})}),this.player.on(this.player.exports.PlayerEvent.StallEnded,function(){e.eventCallback(g.Event.END_BUFFERING,{currentTime:e.currentTime})}),this.player.on(this.player.exports.PlayerEvent.AudioPlaybackQualityChanged,function(t){var i=t,n=i.sourceQuality,r=i.targetQuality;if(!(0,P.isNullish)(r)){var o={type:"audio",bitrate:r.bitrate,currentTime:e.currentTime,codec:r.codec};(0,P.isNotNullish)(n)&&e.qualityChangeService.shouldAllowAudioQualityChange(r.bitrate)&&e.eventCallback(g.Event.AUDIO_CHANGE,o),e.qualityChangeService.setAudioBitrate(r.bitrate),e.stateMachineCallbacks.updateSampleQualityInfo(o)}}),this.player.on(this.player.exports.PlayerEvent.VideoPlaybackQualityChanged,function(t){var i=t,n=i.sourceQuality,r=i.targetQuality;if(!(0,P.isNullish)(r)){var o={type:"video",width:r.width,height:r.height,bitrate:r.bitrate,currentTime:e.currentTime,codec:r.codec};(0,P.isNotNullish)(n)&&e.qualityChangeService.shouldAllowVideoQualityChange(r.bitrate)&&e.eventCallback(g.Event.VIDEO_CHANGE,o),e.qualityChangeService.setVideoBitrate(r.bitrate),e.stateMachineCallbacks.updateSampleQualityInfo(o)}}),this.player.on(this.player.exports.PlayerEvent.ViewModeChanged,function(t){"fullscreen"===t.to?e.eventCallback(g.Event.START_FULLSCREEN,{currentTime:e.currentTime}):"fullscreen"===t.from&&e.eventCallback(g.Event.END_FULLSCREEN,{currentTime:e.currentTime})}),this.player.on(this.player.exports.PlayerEvent.AdStarted,function(t){e.eventCallback(g.Event.START_AD,{currentTime:e.currentTime})}),this.player.on(this.player.exports.PlayerEvent.AdFinished,function(t){e.eventCallback(g.Event.END_AD,{currentTime:e.currentTime})}),this.player.on(this.player.exports.PlayerEvent.AdSkipped,function(t){e.eventCallback(g.Event.END_AD,{currentTime:e.currentTime})}),this.player.on(this.player.exports.PlayerEvent.AdError,function(t){e.eventCallback(g.Event.END_AD,{currentTime:e.currentTime})}),this.player.on(this.player.exports.PlayerEvent.Muted,function(){e.eventCallback(g.Event.MUTE,{currentTime:e.currentTime})}),this.player.on(this.player.exports.PlayerEvent.Unmuted,function(){e.eventCallback(g.Event.UN_MUTE,{currentTime:e.currentTime})}),this.player.on(this.player.exports.PlayerEvent.Error,function(t){e.eventCallback(g.Event.ERROR,{code:t.code,message:t.name,legacyData:t.data,currentTime:e.currentTime,originalError:t,data:{additionalData:(0,P.tryJSONStringify)(t.data)}}),t.code!==f.ErrorCode.BITMOVIN_PLAYER_LICENSING_ERROR.code&&t.code!==f.ErrorCode.SETUP_MISSING_LICENSE_WHITELIST.code||e.onLicenseCallFailed.dispatch({}),e.ssaiService.sendAdEngagementErrorSample({code:t.code,message:t.name,severity:"CRITICAL"},t)}),this.player.on(this.player.exports.PlayerEvent.PlaybackFinished,function(){e.eventCallback(g.Event.END,{currentTime:e.currentTime})}),this.player.on(this.player.exports.PlayerEvent.DownloadFinished,function(t){0===t.downloadType.indexOf("drm/license/")&&(e.drmPerformanceInfo={drmType:t.downloadType.replace("drm/license/",""),drmLoadTime:1e3*t.downloadTime})}),this.player.on(this.player.exports.PlayerEvent.AudioChanged,function(t){e.eventCallback(g.Event.AUDIOTRACK_CHANGED,{currentTime:e.currentTime})}),this.player.on(this.player.exports.PlayerEvent.SubtitleEnabled,function(t){e.eventCallback(g.Event.SUBTITLE_CHANGE,{currentTime:e.currentTime})}),this.player.on(this.player.exports.PlayerEvent.SubtitleDisabled,function(t){e.eventCallback(g.Event.SUBTITLE_CHANGE,{currentTime:e.currentTime})}),this.player.on(this.player.exports.PlayerEvent.LicenseValidated,function(t){t.data.analytics&&void 0!==t.data.analytics.key?e.onLicenseKeyReceived.dispatch({licenseKey:t.data.analytics.key}):e.onLicenseCallFailed.dispatch({})})},t.prototype.registerUnloadEventListeners=function(){var e=this,t=function(){if(!e.onBeforeUnLoadEvent){e.onBeforeUnLoadEvent=!0;var t=e.lastTrackedCurrentTime;e.eventCallback(g.Event.UNLOAD,{currentTime:t})}e.release()};t=t.bind(!0),this.player.on(this.player.exports.PlayerEvent.Destroy,t),this.windowEventTracker.addEventListener("beforeunload",t),this.windowEventTracker.addEventListener("unload",t)},t.prototype.applySourceProperties=function(e){var t=this.player.getSource();if(!(0,P.isNullish)(t)){e.videoTitle=t.title,e.mpdUrl=t.dash,e.m3u8Url=t.hls;var i=(0,T.getSourceInfoFromBitmovinSourceConfig)(t.progressive,this.player);e.progUrl=i.progUrl,"progressive"===this.player.getStreamType()&&(e.videoBitrate=i.progBitrate)}},t.prototype.applySubtitleProperties=function(e){var t;this.player.subtitles&&(t=this.player.subtitles.list().find(function(e){return!0===e.enabled})),e.subtitleEnabled=(0,P.isNotNullish)(t),e.subtitleLanguage=(0,P.isNotNullish)(t)?t.lang:null},t.prototype.applyPlaybackQualityProperties=function(e){var t=this.player.getPlaybackVideoData();(0,P.isNotNullish)(t)&&(e.videoBitrate=t.bitrate,e.videoPlaybackHeight=t.height,e.videoPlaybackWidth=t.width,e.videoCodec=t.codec);var i=this.player.getPlaybackAudioData();(0,P.isNotNullish)(i)&&(e.audioBitrate=i.bitrate,e.audioCodec=i.codec)},t.prototype.applyCastingProperties=function(e){var t,i=this.player.isCasting()||this.player.isAirplayActive()||!1;if(e.isCasting=i,i)if(this.player.isAirplayActive())e.castTech=p.CastTech.AirPlay;else{var n=null==(t=(0,D.getPlayerConfig)(this.player))?void 0:t.remotecontrol;if(!(0,P.isNullish)(n))switch(n.type){case"googlecast":e.castTech=p.CastTech.GoogleCast;break;case"websocket":e.castTech=p.CastTech.WebSocket}}},t.prototype.allowSeeking=function(e){var t=e;return Math.abs(t.position-t.seekTarget)>A.ANALYTICS_MIN_SEEK_DIFFERENCE_THRESHOLD},t.create=function(e,i){var n=new O.SpeedMeterAdapter(e,new u.DownloadSpeedMeter).getDownloadSpeedMeter(),r=new C.SegmentTrackerAdapter(e,new l.SegmentTracker).getSegmentTracker(),o=new R.HttpRequestTrackingAdapter(e);return new t(e,n,r,new h.default,o,new d.SourceInfoFallbackService,i)},t}(M.InternalAdapter)},6743:function(e,t,i){"use strict";
1Object.defineProperty(t,"__esModule",{value:!0});var n,r=i(5063);!function(e){e[e.None=0]="None",e[e.Overlapping=1]="Overlapping",e[e.FirstContainedInSecond=2]="FirstContainedInSecond",e[e.SecondContainedInFirst=3]="SecondContainedInFirst"}(n||(n={})),t.default=function(){function e(){this.watched=[],this.videoDuration=null}return e.prototype.reset=function(){this.watched=[]},e.prototype.setVideoDuration=function(e){this.videoDuration=1e3*e},e.prototype.addWatched=function(e){if((0,r.isNullish)(this.videoDuration))throw Error("no video duration set for completion tracker");this.watched.push(e);var t=this.mergeWatched(this.watched);return(this.getDuration(e)-t)/this.videoDuration},e.prototype.getCompletionPercentage=function(){if((0,r.isNullish)(this.videoDuration))throw Error("no video duration set for completion tracker");for(var e=0,t=0,i=this.watched;t<i.length;t++){var n=i[t];e+=this.getDuration(n)}return e/this.videoDuration},e.prototype.mergeWatched=function(e){for(var t=0;t<e.length;t++)for(var i=e[t],r=t+1;r<e.length;r++){var o=e[r],a=0,s=this.getOverlappingType(i,o);if(s===n.Overlapping?(this.mergeAndReplace(i,t,o,r),a=this.getOverlappingTimespan(i,o)):s===n.FirstContainedInSecond?(this.watched.splice(t,1),a=this.getDuration(i)):s===n.SecondContainedInFirst&&(this.watched.splice(r,1),a=this.getDuration(o)),s!==n.None)return a+this.mergeWatched(this.watched)}return 0},e.prototype.getOverlappingType=function(e,t){return this.isMomentInTimespan(e.end,t)&&e.start<t.start||this.isMomentInTimespan(e.start,t)&&e.end>t.end?n.Overlapping:this.isMomentInTimespan(e.start,t)&&this.isMomentInTimespan(e.end,t)?n.FirstContainedInSecond:this.isMomentInTimespan(t.start,e)&&this.isMomentInTimespan(t.end,e)?n.SecondContainedInFirst:n.None},e.prototype.isMomentInTimespan=function(e,t){return e>=t.start&&e<t.end},e.prototype.mergeAndReplace=function(e,t,i,n){var r=e.end>i.end?e.end:i.end,o={start:e.start<i.start?e.start:i.start,end:r};this.watched.splice(t,1,o),this.watched.splice(n,1)},e.prototype.getOverlappingTimespan=function(e,t){return(e.end<t.end?e.end:t.end)-(e.start>=t.start?e.start:t.start)},e.prototype.getDuration=function(e){return Math.abs(e.end-e.start)},e}()},6845:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FeatureManager=void 0;var n=i(1916);t.FeatureManager=function(){function e(){this.features=[]}return e.prototype.registerFeatures=function(e){this.features=e},e.prototype.unregisterFeatures=function(){this.features.forEach(function(e){return e.disable()}),this.features=[]},e.prototype.resetFeatures=function(){this.features.forEach(function(e){return e.reset()})},e.prototype.configureFeatures=function(e,t){this.features=this.features.filter(function(i){var r=i.configure(e,t);return!(!e||!0!==(null==r?void 0:r.enabled))||(n.logger.log("Disabling feature ".concat(i.constructor.name," as it isn't enabled according to license callback.")),i.disable(),!1)}),this.features.forEach(function(e){return e.enabled()})},e}()},7224:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StreamTypes=void 0,t.getStreamTypesFromURL=function(e){if(!(0,o.isNullish)(e)&&!(0,r.isBlank)(e)){var t=e.split(/[?#]/)[0].toLowerCase();return(0,r.endsWith)(t,".m3u8")?n.hls:(0,r.endsWith)(t,".mp4")||(0,r.endsWith)(t,".m4v")||(0,r.endsWith)(t,".m4a")||(0,r.endsWith)(t,".webm")?n.prog:(0,r.endsWith)(t,".mpd")?n.dash:void 0}},t.getStreamTypeFromMIMEType=function(e){var t;return((t={})[a.MIMETypes.MP4]=n.prog,t[a.MIMETypes.WEBM]=n.prog,t[a.MIMETypes.HLS]=n.hls,t[a.MIMETypes.DASH]=n.dash,t)[e]};var n,r=i(1820),o=i(5063),a=i(2168);!function(e){e.dash="dash",e.hls="hls",e.prog="progressive"}(n||(t.StreamTypes=n={}))},7232:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AdBreakSample=void 0;var n=i(5063);t.AdBreakSample=function(e,t){this.adFallbackIndex=0,t&&(this.manifestDownloadTime=n.calculateTime(t.downloadTiming.downloadTime)),e&&(this.adReplaceContentDuration=n.calculateTimeWithUndefined(e.replaceContentDuration),this.adFallbackIndex=(e.currentFallbackIndex||-1)+1);var i=e;i&&("pre"===i.position||"post"===i.position?this.adPosition=i.position:(this.adPosition="mid",this.adOffset=i.position),this.adPreloadOffset=n.calculateTimeWithUndefined(i.preloadOffset));var r=e;if(r){this.adIsPersistent=r.persistent;var o=r.tag;if(this.adFallbackIndex>0&&r.fallbackTags&&r.fallbackTags.length>=this.adFallbackIndex&&(o=r.fallbackTags[this.adFallbackIndex-1]),o&&(this.adTagType=o.type,this.adTagUrl=o.url),this.adTagUrl)try{var a=new URL(this.adTagUrl);this.adTagServer=a.hostname,this.adTagPath=a.pathname}catch(e){}}var s=e;s&&(this.adScheduleTime=n.calculateTimeWithUndefined(s.scheduleTime),this.adIdPlayer=s.id)}},7390:function(e,t,i){"use strict";
1Object.defineProperty(t,"__esModule",{value:!0}),t.SequenceNumberBackend=void 0;var n=i(4649);t.SequenceNumberBackend=function(){function e(e){this.sequenceNumber=0,this.nextBackend=e}return e.prototype.sendRequest=function(e){this.updateSampleBeforeSending(e),this.isSequenceNumberAboveThreshold(e)||this.nextBackend.sendRequest(e)},e.prototype.sendUnloadRequest=function(e){this.updateSampleBeforeSending(e),this.isSequenceNumberAboveThreshold(e)||this.nextBackend.sendUnloadRequest(e)},e.prototype.sendRequestSynchronous=function(e){this.updateSampleBeforeSending(e),this.isSequenceNumberAboveThreshold(e)||this.nextBackend.sendRequestSynchronous(e)},e.prototype.sendAdRequest=function(e){this.isSequenceNumberAboveThreshold(e)||this.nextBackend.sendAdRequest(e)},e.prototype.updateSampleBeforeSending=function(e){e.sequenceNumber=this.sequenceNumber++},e.prototype.isSequenceNumberAboveThreshold=function(e){var t;return(null!=(t=e.sequenceNumber)?t:0)>n.SEQUENCE_NUMBER_LIMIT},e}()},7540:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DebuggingBackend=void 0;var n=i(1916);t.DebuggingBackend=function(){function e(e,t){this.underlying=t,e.debug&&e.debug.fields&&(this.debugFields=e.debug.fields)}return e.prototype.sendRequest=function(e){this.printFields(e),this.underlying.sendRequest(e)},e.prototype.sendUnloadRequest=function(e){this.printFields(e),this.underlying.sendUnloadRequest(e)},e.prototype.sendRequestSynchronous=function(e){this.printFields(e),this.underlying.sendRequestSynchronous(e)},e.prototype.sendAdRequest=function(e){this.underlying.sendAdRequest(e)},e.prototype.printFields=function(e){if(this.debugFields&&this.debugFields.length){var t={};this.debugFields.forEach(function(i){return t[i]=e[i]}),n.logger.table([t])}},e}()},7543:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HttpRequestTrackingAdapter=void 0;var n=i(675),r=i(2974),o=i(5063),a=i(4438);t.HttpRequestTrackingAdapter=function(){function e(e){var t=this;this.eventDispatcher=new n.EventDispatcher,this.playerExports=e.exports,e.on(this.playerExports.PlayerEvent.DownloadFinished,function(e){return t.onDownloadFinished(e)})}return e.prototype.subscribe=function(e){return this.eventDispatcher.subscribe(e)},e.prototype.unsubscribe=function(e){this.eventDispatcher.unsubscribe(e)},e.prototype.onDownloadFinished=function(e){var t,i,n;this.eventDispatcher.dispatch({httpRequest:{downloadTime:null!=(t=(0,o.calculateTimeWithUndefined)(null==e?void 0:e.downloadTime))?t:0,httpStatus:null!=(i=null==e?void 0:e.httpStatus)?i:0,success:null!=(n=null==e?void 0:e.success)&&n,timestamp:(0,o.getCurrentTimestamp)(),url:null==e?void 0:e.url,size:null==e?void 0:e.size,timeToFirstByte:(0,o.calculateTimeWithUndefined)(null==e?void 0:e.timeToFirstByte),type:this.mapHttpRequestType(null==e?void 0:e.downloadType)}})},e.prototype.mapHttpRequestType=function(e){return(0,r.objectValues)(a.HttpRequestType).includes(e)?e:a.HttpRequestType.UNKNOWN},e}()},7596:function(e,t,i){"use strict";var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.AnalyticsStateMachine=void 0;var r=i(7906),o=i(3458),a=i(2361),s=i(1916),u=i(4649),c=i(5063),l=i(5063),d=[3e3,5e3,1e4,3e4,59700];t.AnalyticsStateMachine=function(){function e(e,t,i){this.stateMachineCallbacks=e,this.onEnterStateTimestamp=0,this.videoStartupTimeoutMs=u.ANALYTICS_VIDEOSTART_TIMEOUT,this.rebufferTimeoutMs=u.ANALYTICS_REBUFFER_TIMEOUT,this.currentRebufferingIntervalIndex=0,this.stateMachine=this.createStateMachine(i),this.playingHeartbeatService=t}return e.prototype.callEvent=function(e,t,i){var n=this.stateMachine[e];if(null!=n)try{n.call(this.stateMachine,i,t)}catch(n){s.logger.error('StateMachine ignored event "'.concat(e,'" call, because it has thrown exception in the current state "').concat(this.currentState,'"'),t,i,n)}else s.logger.warn('StateMachine ignored event "'.concat(e,'" call, because it was not defined'),t,i)},Object.defineProperty(e.prototype,"currentState",{get:function(){return this.stateMachine.current}
vendor: 24,124 bytes, line 1
1,enumerable:!1,configurable:!0}),e.prototype.resetIntervals=function(){this.clearVideoStartTimeout(),this.clearRebufferingTimeoutHandle(!0),this.clearRebufferingHeartbeatHandle()},e.prototype.startRebufferingHeartbeatInterval=function(e){var t=this;void 0===e&&(e=!0),this.resetRebufferingHelpers(e),this.startRebufferingTimeoutHandle(),this.rebufferingHeartbeatIntervalHandle=setInterval(function(){var e=t.stateMachine.current.toLowerCase();if("rebuffering"===e){var i=(new Date).getTime(),n=i-t.onEnterStateTimestamp;t.stateMachineCallbacks.heartbeat(n,e,{buffered:n}),t.onEnterStateTimestamp=i,t.currentRebufferingIntervalIndex=Math.min(t.currentRebufferingIntervalIndex+1,d.length-1),t.startRebufferingHeartbeatInterval(!1)}else t.resetRebufferingHelpers()},d[this.currentRebufferingIntervalIndex])},e.prototype.resetRebufferingHelpers=function(e){void 0===e&&(e=!0),e&&(this.currentRebufferingIntervalIndex=0),this.clearRebufferingHeartbeatHandle(),this.clearRebufferingTimeoutHandle(e)},e.prototype.clearRebufferingHeartbeatHandle=function(){(0,l.isNotNullish)(this.rebufferingHeartbeatIntervalHandle)&&(clearInterval(this.rebufferingHeartbeatIntervalHandle),this.rebufferingHeartbeatIntervalHandle=void 0)},e.prototype.startRebufferingTimeoutHandle=function(){var e=this;this.currentRebufferingIntervalIndex>0||(this.rebufferingTimeoutHandle=setTimeout(function(){e.callEvent(a.Event.ERROR,n(n({},o.ErrorCode.BUFFERING_TIMEOUT_REACHED),{data:{additionalData:"StateMachine timed out after ".concat(e.rebufferTimeoutMs," ms of consecutive buffering.")}}),c.getCurrentTimestamp()),e.stateMachineCallbacks.release()},this.rebufferTimeoutMs))},e.prototype.clearRebufferingTimeoutHandle=function(e){e&&(0,l.isNotNullish)(this.rebufferingTimeoutHandle)&&(clearTimeout(this.rebufferingTimeoutHandle),this.rebufferingTimeoutHandle=void 0)},e.prototype.setVideoStartTimeout=function(){var e=this;(0,l.isNotNullish)(this.videoStartTimeout)&&this.clearVideoStartTimeout(),this.videoStartTimeout=setTimeout(function(){e.callEvent(a.Event.VIDEOSTART_TIMEOUT,{},Date.now()),e.stateMachineCallbacks.release()},this.videoStartupTimeoutMs)},e.prototype.clearVideoStartTimeout=function(){clearTimeout(this.videoStartTimeout),this.videoStartTimeout=void 0},e.prototype.onHeartbeat=function(e){this.sendPlayingSample(Date.now(),e)},e.prototype.sendPlayingSample=function(e,t,i){void 0===i&&(i=!1);var n=this.stateMachine.current.toLowerCase();if("playing"===n){this.stateMachineCallbacks.setVideoTimeEndFromEvent({currentTime:t});var o=e-this.onEnterStateTimestamp,a={played:o};i&&(a[r.SSAI_RELATED_SAMPLE_MARKER]=!0),this.stateMachineCallbacks.heartbeat(o,n,a),this.onEnterStateTimestamp=e,this.stateMachineCallbacks.setVideoTimeStartFromEvent({currentTime:t})}else s.logger.warn('Unexpected call of "sendPlayingSample" in AnalyticsStateMachine from "'.concat(n,'" state'))},e}()},7614:function(e,t,i){"use strict";var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},r=this&&this.__spreadArray||function(e,t,i){if(i||2==arguments.length)for(var n,r=0,o=t.length;r<o;r++)!n&&r in t||(n||(n=Array.prototype.slice.call(t,0,r)),n[r]=t[r]);return e.concat(n||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorDetailBackend=void 0;var o=i(92),a=i(4649),s=i(5063);t.ErrorDetailBackend=function(){function e(e){var t;this._queue=[],this._enabled=!1,this.backendUrl=(0,s.joinUrls)(null!=(t=null==e?void 0:e.backendUrl)?t:a.ANALYTICS_BACKEND_BASE_URL,"/analytics/error")}return Object.defineProperty(e.prototype,"queue",{get:function(){return this._queue},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"enabled",{get:function(){return this._enabled},set:function(e){this._enabled=e},enumerable:!1,configurable:!0}),e.copyErrorDetailTruncateStringsAndUrls=function(e,t,i){var r,o,a=this;return n(n({},e),{message:null==(r=e.message)?void 0:r.substr(0,t),data:this.copyErrorDataTruncateStrings(e.data,t),httpRequests:null==(o=e.httpRequests)?void 0:o.map(function(e){return a.copyHttpRequestTruncateUrls(e,i)})})},e.copyHttpRequestTruncateUrls=function(e,t){var i,r;return n(n({},e),{url:null==(i=e.url)?void 0:i.substr(0,t),lastRedirectLocation:null==(r=e.lastRedirectLocation)?void 0:r.substr(0,t)})},e.copyErrorDataTruncateStrings=function(e,t){var i,r;return n(n({},e),{exceptionMessage:null==(i=e.exceptionMessage)?void 0:i.substr(0,t),additionalData:null==(r=e.additionalData)?void 0:r.substr(0,t)})},e.copyErrorDetailTruncateHttpRequests=function(e,t){var i;return n(n({},e),{httpRequests:null==(i=e.httpRequests)?void 0:i.slice(-t)})},e.prototype.limitHttpRequestsOfQueuedErrorDetails=function(t){var i=this;this._queue.forEach(function(n,r){i._queue[r]=e.copyErrorDetailTruncateHttpRequests(n,t)})},e.prototype.send=function(t){var i=e.copyErrorDetailTruncateStringsAndUrls(t,e.MAX_STRING_LENGTH,e.MAX_URL_LENGTH);this.enabled?(0,o.post)(this.backendUrl,i,function(){}):this._queue.push(i)},e.prototype.flush=function(){for(var e=r([],this._queue,!0),t=e.shift();(0,s.isNotNullish)(t);)this.removeFromQueue(t),this.send(t),t=e.shift()},e.prototype.clear=function(){this._queue.splice(0,this._queue.length)},e.prototype.removeFromQueue=function(e){var t=this._queue.findIndex(function(t){return t===e});t>=0&&this._queue.splice(t,1)},e.MAX_URL_LENGTH=450,e.MAX_STRING_LENGTH=2e3,e}()},7721:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IdenticalErrorReportingLimiter=void 0,t.IdenticalErrorReportingLimiter=function(){function e(){this._currentErrorCount=0}return e.prototype.shouldReportError=function(t,i){return t===this._lastErrorCode&&i===this._lastErrorSeverity?(this._currentErrorCount++,this._currentErrorCount<=e.MAX_IDENTICAL_ERROR_REPORTING):(this._lastErrorCode=t,this._lastErrorSeverity=i,this._currentErrorCount=1,!0)},e.prototype.reset=function(){this._lastErrorCode=void 0,this._lastErrorSeverity=void 0,this._currentErrorCount=0},e.MAX_IDENTICAL_ERROR_REPORTING=5,e}()},7881:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HttpRequestTracking=void 0;var n=i(1916),r=i(3129);t.HttpRequestTracking=function(){function e(t){var i=this;this.subscribables=t,this._maxRequests=e.DEFAULT_MAX_REQUESTS,this._httpRequestQueue=new r.Queue,this.onDownloadFinishedHandler=function(e){try{i.addRequest(e.httpRequest)}catch(e){n.logger.error("HttpRequestTracking.onDownloadFinished: Error in handler",e)}},t.forEach(function(e){return e.subscribe(i.onDownloadFinishedHandler)})}return Object.defineProperty(e.prototype,"maxRequests",{get:function(){return this._maxRequests},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"httpRequests",{get:function(){return this._httpRequestQueue.items},enumerable:!1,configurable:!0}),e.prototype.configure=function(e){this._maxRequests=e,this._httpRequestQueue.limit(e)},e.prototype.disable=function(){var e=this;this.subscribables.forEach(function(t){return t.unsubscribe(e.onDownloadFinishedHandler)}),this._httpRequestQueue.clear()},e.prototype.reset=function(){this._httpRequestQueue.clear()},e.prototype.addRequest=function(e){this._httpRequestQueue.offer(e),this._httpRequestQueue.limit(this._maxRequests)},e.DEFAULT_MAX_REQUESTS=10,e}()},7906:function(e,t,i){"use strict";var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.ROUTING_URL_PARAM_VALUE_SSAI=t.ROUTING_URL_PARAM=t.SSAI_RELATED_SAMPLE_MARKER=void 0,t.isSsaiRelatedSample=function(e){return e[t.SSAI_RELATED_SAMPLE_MARKER]?(delete e[t.SSAI_RELATED_SAMPLE_MARKER],!0):2===e.adType},t.appendSsaiRoutingParam=function(e){return"".concat(e,"?").concat(t.ROUTING_URL_PARAM,"=").concat(t.ROUTING_URL_PARAM_VALUE_SSAI)},t.createErrorAdSample=function(e,t){return s({playbackSample:e,currentAdImpressionId:t.currentAdImpressionId,adIndex:t.adIndex,currentAdMetadata:t.currentAdMetadata,quartile:void 0,quartileMetadata:void 0,errorCode:t.analyticsError.code,errorMessage:t.analyticsError.message,errorSeverity:t.analyticsError.severity,timeSinceAdStartedInMs:t.timeSinceAdStartedInMs})},t.createStartedAdSample=function(e,t){return s({playbackSample:e,currentAdImpressionId:t.currentAdImpressionId,adIndex:t.adIndex,currentAdMetadata:t.currentAdMetadata,quartile:"started",quartileMetadata:void 0,errorCode:void 0,errorMessage:void 0,errorSeverity:void 0,timeSinceAdStartedInMs:void 0})},t.createQuartileAdSample=function(e,t){return s({playbackSample:e,currentAdImpressionId:t.currentAdImpressionId,adIndex:t.adIndex,currentAdMetadata:t.currentAdMetadata,quartile:t.quartile,quartileMetadata:t.quartileMetadata,timeSinceAdStartedInMs:t.timeSinceAdStartedInMs,errorCode:void 0,errorMessage:void 0,errorSeverity:void 0})},t.getCurrentMonotonicTimestampInMs=u,t.getMonotonicTimestampInMsSince=function(e){if(!(0,o.isNullish)(e))return u()-e};var r=i(5529),o=i(5063),a=i(399);function s(e){var t,i=e.playbackSample,a=e.currentAdImpressionId,s=e.adIndex,u=e.currentAdMetadata,c=e.quartile,l=e.quartileMetadata,d=e.errorCode,h=e.errorMessage,p=e.errorSeverity,f=e.timeSinceAdStartedInMs,g=n(n({},{audioBitrate:null==(t=i)?void 0:t.audioBitrate,analyticsVersion:null==t?void 0:t.analyticsVersion,adPlaybackHeight:null==t?void 0:t.videoPlaybackHeight,adPlaybackWidth:null==t?void 0:t.videoPlaybackWidth,cdnProvider:null==t?void 0:t.cdnProvider,customData1:null==t?void 0:t.customData1,customData2:null==t?void 0:t.customData2,customData3:null==t?void 0:t.customData3,customData4:null==t?void 0:t.customData4,customData5:null==t?void 0:t.customData5,customData6:null==t?void 0:t.customData6,customData7:null==t?void 0:t.customData7,customData8:null==t?void 0:t.customData8,customData9:null==t?void 0:t.customData9,customData10:null==t?void 0:t.customData10,customData11:null==t?void 0:t.customData11,customData12:null==t?void 0:t.customData12,customData13:null==t?void 0:t.customData13,customData14:null==t?void 0:t.customData14,customData15:null==t?void 0:t.customData15,customData16:null==t?void 0:t.customData16,customData17:null==t?void 0:t.customData17,customData18:null==t?void 0:t.customData18,customData19:null==t?void 0:t.customData19,customData20:null==t?void 0:t.customData20,customData21:null==t?void 0:t.customData21,customData22:null==t?void 0:t.customData22,customData23:null==t?void 0:t.customData23,customData24:null==t?void 0:t.customData24,customData25:null==t?void 0:t.customData25,customData26:null==t?void 0:t.customData26,customData27:null==t?void 0:t.customData27,customData28:null==t?void 0:t.customData28,customData29:null==t?void 0:t.customData29,customData30:null==t?void 0:t.customData30,customData31:null==t?void 0:t.customData31,customData32:null==t?void 0:t.customData32,customData33:null==t?void 0:t.customData33,customData34:null==t?void 0:t.customData34,customData35:null==t?void 0:t.customData35,customData36:null==t?void 0:t.customData36,customData37:null==t?void 0:t.customData37,customData38:null==t?void 0:t.customData38,customData39:null==t?void 0:t.customData39,customData40:null==t?void 0:t.customData40,customData41:null==t?void 0:t.customData41,customData42:null==t?void 0:t.customData42,customData43:null==t?void 0:t.customData43,customData44:null==t?void 0:t.customData44,customData45:null==t?void 0:t.customData45,customData46:null==t?void 0:t.customData46,customData47:null==t?void 0:t.customData47,customData48:null==t?void 0:t.customData48,customData49:null==t?void 0:t.customData49,customData50:null==t?void 0:t.customData50,customData51:null==t?void 0:t.customData51,customData52:null==t?void 0:t.customData52,customData53:null==t?void 0:t.customData53,customData54:null==t?void 0:t.customData54,customData55:null==t?void 0:t.customData55,customData56:null==t?void 0:t.customData56,customData57:null==t?void 0:t.customData57,customData58:null==t?void 0:t.customData58,customData59:null==t?void 0:t.customData59,customData60:null==t?void 0:t.customData60,customData61:null==t?void 0:t.customData61,customData62:null==t?void 0:t.customData62,customData63:null==t?void 0:t.customData63,customData64:null==t?void 0:t.customData64,customData65:null==t?void 0:t.customData65,customData66:null==t?void 0:t.customData66,customData67:null==t?void 0:t.customData67,customData68:null==t?void 0:t.customData68,customData69:null==t?void 0:t.customData69,customData70:null==t?void 0:t.customData70,customData71:null==t?void 0:t.customData71,customData72:null==t?void 0:t.customData72,customData73:null==t?void 0:t.customData73,customData74:null==t?void 0:t.customData74,customData75:null==t?void 0:t.customData75,customData76:null==t?void 0:t.customData76,customData77:null==t?void 0:t.customData77,customData78:null==t?void 0:t.customData78,customData79:null==t?void 0:t.customData79,customData80:null==t?void 0:t.customData80,customData81:null==t?void 0:t.customData81,customData82:null==t?void 0:t.customData82,customData83:null==t?void 0:t.customData83,customData84:null==t?void 0:t.customData84,customData85:null==t?void 0:t.customData85,customData86:null==t?void 0:t.customData86,customData87:null==t?void 0:t.customData87,customData88:null==t?void 0:t.customData88,customData89:null==t?void 0:t.customData89,customData90:null==t?void 0:t.customData90,customData91:null==t?void 0:t.customData91,customData92:null==t?void 0:t.customData92,customData93:null==t?void 0:t.customData93,customData94:null==t?void 0:t.customData94,customData95:null==t?void 0:t.customData95,customData96:null==t?void 0:t.customData96,customData97:null==t?void 0:t.customData97,customData98:null==t?void 0:t.customData98,customData99:null==t?void 0:t.customData99,customData100:null==t?void 0:t.customData100,customUserId:null==t?void 0:t.customUserId,domain:null==t?void 0:t.domain,experimentName:null==t?void 0:t.experimentName,key:null==t?void 0:t.key,language:null==t?void 0:t.language,path:null==t?void 0:t.path,platform:null==t?void 0:t.platform,player:null==t?void 0:t.player,playerKey:null==t?void 0:t.playerKey,playerTech:null==t?void 0:t.playerTech,size:null==t?void 0:t.size,screenHeight:null==t?void 0:t.screenHeight,screenWidth:null==t?void 0:t.screenWidth,streamFormat:null==t?void 0:t.streamFormat,userAgent:null==t?void 0:t.userAgent,userId:null==t?void 0:t.userId,version:null==t?void 0:t.version,videoBitrate:null==t?void 0:t.videoBitrate,videoId:null==t?void 0:t.videoId,videoImpressionId:null==t?void 0:t.impressionId,videoTitle:null==t?void 0:t.videoTitle,videoWindowHeight:null==t?void 0:t.videoWindowHeight,videoWindowWidth:null==t?void 0:t.videoWindowWidth}),{adId:null==u?void 0:u.adId,adImpressionId:a,adIndex:s,adPosition:null==u?void 0:u.adPosition,adSystem:null==u?void 0:u.adSystem,adType:2,errorCode:d,errorMessage:h,errorSeverity:p,time:Date.now(),timeSinceAdStartedInMs:f});switch(c){case"started":g.started=1;break;case"first":g.quartile1=1,g.quartile1FailedBeaconUrl=null==l?void 0:l.failedBeaconUrl;break;case"midpoint":g.midpoint=1,g.midpointFailedBeaconUrl=null==l?void 0:l.failedBeaconUrl;break;case"third":g.quartile3=1,g.quartile3FailedBeaconUrl=null==l?void 0:l.failedBeaconUrl;break;case"completed":g.completed=1,g.completedFailedBeaconUrl=null==l?void 0:l.failedBeaconUrl}var m=null==u?void 0:u.customData;return(0,o.isNotNullish)(m)&&r.customDataValuesKeys.forEach(function(e){m[e]&&(g[e]=m[e])}),g}function u(){var e=(0,a.getWindowPerformance)();return(0,o.isNullish)(null==e?void 0:e.now)||!(0,o.isFunction)(window.performance.now)?Date.now():Math.floor(e.now())}t.SSAI_RELATED_SAMPLE_MARKER="triggeredBySsai",t.ROUTING_URL_PARAM="routingParam",t.ROUTING_URL_PARAM_VALUE_SSAI="ssai"},8253:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.logStateMachineTransition=t.logMissingCallbackWarning=t.customStateMachineErrorCallback=t.whileIn=t.on=void 0,t.getAllStates=s,t.getAllStatesBut=function(e,t){return s(t).filter(function(t){return 0>e.indexOf(t)})};var n=i(2595),r=i(1916),o=i(2974),a=i(5063);function s(e){return(0,o.objectValues)(e)}t.on=function(e){return{stayIn:function(t){return{name:e,from:t,to:t}}}},t.whileIn=function(e){var t=function(){for(var t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];return t.map(function(t){return{name:t,from:e,to:e}})};return{runEventCallbacksFor:t,passOver:t}},t.customStateMachineErrorCallback=function(e,t,i,o,s,u,c){var l='StateMachine ignored event "'.concat(e,'", ').concat(u),d={eventName:e,from:t,to:i,args:(0,a.tryJSONStringify)(o),errorCode:s,errorMessage:u};s!==n.Error.INVALID_TRANSITION?r.logger.error(l,d):r.logger.log(l,d)},t.logMissingCallbackWarning=function(e,t){void 0===t&&(t=[]),(0,a.isNullish)(e)||(0,a.isNullish)(t.find(function(t){return e===t}))&&r.logger.warn("Could not find StateMachine callback function for "+e)},t.logStateMachineTransition=function(e,t,i,n){"ENTER"===e?r.logger.log("[ENTER] ".concat((0,r.padRight)(n,20)," EVENT: ").concat((0,r.padRight)(t,20)," from ").concat((0,r.padRight)(i,20))):r.logger.log("[LEAVE] ".concat((0,r.padRight)(i,20)," EVENT: ").concat((0,r.padRight)(t,20)," to ").concat((0,r.padRight)(n,20)))}},8331:function(e,t,i){"use strict";var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.sanitizeAnalyticsConfig=function(e){return(0,s.isNullish)(e)?{}:(a.isBoolean(e.isLive)||(e.isLive=void 0),(0,s.isNotNullish)(e.config)&&(0,s.isNotNullish)(e.config.errorTransformerCallback)&&((0,s.isFunction)(e.config.errorTransformerCallback.transform)||(e.config.errorTransformerCallback=void 0)),e)},t.guardConfigChangeAgainstMissingTitle=function(e,t){(0,s.isNullish)(e)||(0,s.isNullish)(t)||e.title&&(0,o.isBlank)(t.title)&&r.logger.error("The new analytics configuration does not contain the field `title`")},t.guardConfigChangeAgainstMissingIsLive=function(e,t){(0,s.isNullish)(e)||(0,s.isNullish)(t)||e.isLive&&(0,s.isNullish)(t.isLive)&&r.logger.error("The new analytics configuration does not contain the field `isLive`. It will default to `false` which might be unintended? Once stream playback information is available the type will be populated.")},t.guardAgainstDuplicatedUserId=function(e){(0,s.isNullish)(e)||(0,s.isNotNullish)(e.customUserId)&&(0,s.isNotNullish)(e.userId)&&r.logger.warn("Configuration Warning: \nCustomUserId and UserId are set in the config \nValue of UserId will be used in sample \nPlease only use one configuration field to set your userId")},t.getDeviceInformationFromAnalyticsConfig=function(e){if(!(0,s.isNullish)(e)){var t={};if((0,o.isValidString)(e.deviceType)&&!(0,o.isBlank)(e.deviceType)&&(t.model=e.deviceType),(0,o.isValidString)(e.deviceClass)&&!(0,o.isBlank)(e.deviceClass)&&(t.deviceClass=e.deviceClass),0!==Object.keys(t).length)return t}},t.getDomainFromAnalyticsConfig=function(e){var t,i,n=(0,u.getWindowLocationHostname)(),r=n?a.removeTrailingSlash(n):"";return null!=(i=null==(t=null==e?void 0:e.config)?void 0:t.origin)?i:r},t.mergeAnalyticsConfig=function(e,t){var i=function(e){var t=["cdnProvider","videoId","title","isLive","experimentName"],i=/customData\d{1,3}$/g;for(var n in e)((0,s.isNotNullish)(n.match(i))||t.includes(n))&&delete e[n];return e}(e),r=function(e,t){return(0,s.isNotNullish)(t)?n(n(n({},e),{enabled:!0}),t):null!=e?e:{}}(e.config,t.config);return n(n(n({},i),t),{config:r})};var r=i(1916),o=i(1820),a=i(5063),s=i(5063),u=i(399)},8421:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getWebOSTVModelName=function(){try{var e=(0,r.getWindowWebOSApi)(),t=e.webOSSystem,i=e.PalmSystem,o=(null==t?void 0:t.deviceInfo)?JSON.parse(t.deviceInfo):(null==i?void 0:i.deviceInfo)&&JSON.parse(i.deviceInfo);return(0,n.isValidString)(null==o?void 0:o.modelName)&&!(0,n.isBlank)(null==o?void 0:o.modelName)?o.modelName:void 0}catch(e){return}};var n=i(1820),r=i(399)},8525:function(e,t){"use strict";var i;Object.defineProperty(t,"__esModule",{value:!0}),t.PlayerSize=void 0,function(e){e.Fullscreen="FULLSCREEN",e.Window="WINDOW"}(i||(t.PlayerSize=i={}))},8676:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SegmentTrackerAdapter=void 0;var n=i(5063);t.SegmentTrackerAdapter=function(){function e(e,t){var i=this;this.handleSegmentPlaybackEvent=function(e){i.segmentTracker.removeSegment(e.url)},this.segmentTracker=t,e.on(e.exports.PlayerEvent.DownloadFinished,function(e){return i.handleOnDownloadFinishEvent(e)}),e.on(e.exports.PlayerEvent.SegmentPlayback,function(e){return i.handleSegmentPlaybackEvent(e)})}return e.prototype.getSegmentTracker=function(){return this.segmentTracker},e.prototype.handleOnDownloadFinishEvent=function(e){if(0===e.downloadType.indexOf("media/video")){var t=e.url,i={name:n.getURLResourceName(t),url:t,timestamp:e.timestamp};this.segmentTracker.addSegment(i)}},e}()},8917:function(e,t,i){"use strict";var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.AdAnalytics=void 0;var r,o=i(5791),a=i(7232),s=i(4439),u=i(1916),c=i(5063),l=i(5063),d=i(2982),h=i(4926),p=i(3612);!function(e){e.FIRST_QUARTILE="firstQuartile",e.MIDPOINT="midpoint",e.THIRD_QUARTILE="thirdQuartile"}(r||(r={})),t.AdAnalytics=function(){function e(e,t){var i=this;this.onBeforeUnLoadEvent=!1,this.adManifestLoadedEvents=[],this.isPlaying=!1,this.adPodPosition=0,this.analytics=e,this.adapter=t,this.adapter.adCallbacks.onAdStarted=function(e){return i.onAdStarted(e)},this.adapter.adCallbacks.onAdFinished=function(e){return i.onAdFinished(e)},this.adapter.adCallbacks.onAdBreakStarted=function(e){return i.onAdBreakStarted(e)},this.adapter.adCallbacks.onAdBreakFinished=function(e){return i.onAdBreakFinished(e)},this.adapter.adCallbacks.onAdClicked=function(e){return i.onAdClicked(e)},this.adapter.adCallbacks.onAdError=function(e){return i.onAdError(e)},this.adapter.adCallbacks.onAdManifestLoaded=function(e){return i.onAdManifestLoaded(e)},this.adapter.adCallbacks.onPlay=function(){return i.onPlay()},this.adapter.adCallbacks.onPause=function(){return i.onPause()},this.adapter.adCallbacks.onBeforeUnload=function(){return i.onBeforeUnload()},this.adapter.adCallbacks.onAdSkipped=function(e){return i.onAdSkipped(e)},this.adapter.adCallbacks.onAdQuartile=function(e){return i.onAdQuartile(e)},this.viewportTracker=new p.ViewportTracker(this.adapter.getContainer(),function(){return i.onIntersectionChanged()},.5)}return e.prototype.release=function(){this.clearCurrentTimeInterval(),this.viewportTracker.dispose()},e.prototype.onIntersectionChanged=function(){this.activeAdSample&&(this.isContainerInViewport()?this.enterViewportTimestamp=c.getCurrentTimestamp():this.enterViewportTimestamp&&(this.activeAdSample.timeInViewport=(this.activeAdSample.timeInViewport||0)+c.getCurrentTimestamp()-this.enterViewportTimestamp))},e.prototype.isContainerInViewport=function(){return!this.viewportTracker||this.viewportTracker.isInViewport()},e.prototype.onPlay=function(){if(this.adapter&&this.adapter.isLinearAdActive()&&this.activeAdSample){var e=c.getCurrentTimestamp();this.beginPlayingTimestamp=e,this.enterViewportTimestamp=e,this.isPlaying=!0}},e.prototype.onPause=function(){this.adapter&&this.adapter.isLinearAdActive()&&this.activeAdSample&&(this.updatePlayingTime(this.activeAdSample),this.isPlaying=!1)},e.prototype.onAdManifestLoaded=function(e){var t=e.adConfig;t&&t.tag&&"vmap"===t.tag.type?this.sendAnalyticsRequest(new a.AdBreakSample(e.adConfig,e)):e.adBreak&&this.adManifestLoadedEvents.push(e)},e.prototype.onAdBreakStarted=function(e){this.adPodPosition=0,this.activeAdBreakSample=ne
1w a.AdBreakSample(e.adBreak,this.getAdManifestLoadedEvent(e.adBreak)),this.adStartupTimestamp=c.getCurrentTimestamp()},e.prototype.onAdBreakFinished=function(e){this.resetActiveAd(),this.activeAdBreakSample=void 0},e.prototype.onAdStarted=function(e){e.ad.isLinear&&(this.resetActiveAd(),this.activeAdSample=new s.AdSample(e.ad),this.currentTime=void 0,this.activeAdSample.adStartupTime=this.adStartupTimestamp?c.getCurrentTimestamp()-this.adStartupTimestamp:void 0,this.startAd(this.activeAdSample))},e.prototype.onAdFinished=function(e){if(this.activeAdBreakSample&&this.activeAdSample){var t=n({},this.activeAdSample);t.completed=1,this.resetActiveAd(),this.completeAd(this.activeAdBreakSample,t,t.adDuration)}},e.prototype.onAdSkipped=function(e){if(this.activeAdBreakSample&&this.activeAdSample){var t=n({},this.activeAdSample);t.skipped=1,t.skipPosition=this.currentTime,t.skipPercentage=c.calculatePercentage(this.activeAdSample.skipPosition,this.activeAdSample.adDuration),this.resetActiveAd(),this.completeAd(this.activeAdBreakSample,t,t.skipPosition)}},e.prototype.onAdError=function(e){var t,i,n=this,r=e.data||{adBreak:void 0,adConfig:void 0,code:void 0,message:void 0},o=r.adConfig,s=r.adBreak,u=r.code,d=r.message,h=new a.AdBreakSample(s||o,s?this.getAdManifestLoadedEvent(s):void 0),p=this.analytics.transformError({code:u||e.code,message:d||e.name,severity:"CRITICAL"},e);h.errorCode=p.code,h.errorData=(0,l.tryJSONStringify)(e.data),h.errorMessage=p.message,h.errorSeverity=p.severity,this.activeAdSample&&s&&s.ads&&s.ads.includes(function(e){return e.id===n.activeAdSample.adId})&&(i=(t=this.activeAdSample).errorPosition=this.currentTime,t.errorPercentage=c.calculatePercentage(t.errorPosition,t.adDuration)),this.completeAd(h,t,i)},e.prototype.onAdClicked=function(e){this.activeAdSample&&(this.activeAdSample.adClickthroughUrl=e.clickThroughUrl,this.activeAdSample.clicked=1,this.activeAdSample.clickPosition=this.currentTime,this.activeAdSample.clickPercentage=c.calculatePercentage(this.activeAdSample.clickPosition,this.activeAdSample.adDuration))},e.prototype.onAdQuartile=function(e){this.activeAdSample&&(e.quartile===r.FIRST_QUARTILE?this.activeAdSample.quartile1=1:e.quartile===r.MIDPOINT?this.activeAdSample.midpoint=1:e.quartile===r.THIRD_QUARTILE&&(this.activeAdSample.quartile3=1))},e.prototype.onBeforeUnload=function(){if(!this.onBeforeUnLoadEvent&&(this.onBeforeUnLoadEvent=!0,this.activeAdSample&&this.activeAdBreakSample)){var e=n({},this.activeAdSample);e.closed=1,e.closePosition=this.currentTime,e.closePercentage=c.calculatePercentage(e.closePosition,e.adDuration),this.resetActiveAd(),this.completeAd(this.activeAdBreakSample,e,e.closePosition)}},e.prototype.createNewAdAnalyticsSample=function(e){var t=this.adapter.getAdModuleInfo();return n(n({},new o.AdAnalyticsSample(e)),{analyticsVersion:h.VERSION,adModule:t.name,adModuleVersion:t.version,playerStartupTime:this.analytics.adSamplePlayerStartupTime,pageLoadTime:this.analytics.adSamplePageLoadTime,autoplay:this.analytics.adSampleAutoplay,pageLoadType:c.getPageLoadType()})},e.prototype.getAdManifestLoadedEvent=function(e){if(e)return this.adManifestLoadedEvents.find(function(t){return t.adBreak&&t.adBreak.id===e.id})},e.prototype.sendAnalyticsRequest=function(e,t){var i=n(n(n({},this.createNewAdAnalyticsSample(this.analytics.sample)),e),t||new s.AdSample);i.time=c.getCurrentTimestamp(),i.adImpressionId=(0,d.generateUUID)(),i.percentageInViewport=c.calculatePercentage(i.timeInViewport,i.timePlayed),this.analytics.backend.sendAdRequest(i)},e.prototype.updatePlayingTime=function(e){var t=c.getCurrentTimestamp();this.beginPlayingTimestamp&&this.isPlaying&&(void 0!==e.timePlayed&&(e.timePlayed+=t-this.beginPlayingTimestamp),this.isContainerInViewport()&&this.enterViewportTimestamp&&void 0!==e.timeInViewport&&(e.timeInViewport+=t-this.enterViewportTimestamp))},e.prototype.startAd=function(t){var i=this;t.started=1,t.timePlayed=0,t.timeInViewport=0,t.adPodPosition=this.adPodPosition;var n=c.getCurrentTimestamp();this.beginPlayingTimestamp=n,this.enterViewportTimestamp=this.isContainerInViewport()?n:void 0,this.isPlaying=!0,this.currentTime=0,this.adPodPosition++,this.currentTimeInterval=setInterval(function(){try{t&&void 0!==t.adDuration&&t.adDuration>0&&i.adapter.isLinearAdActive()&&(i.currentTime=c.calculateTime(Math.max(i.adapter.currentTime(),0)))}catch(e){u.logger.log("AdStarted monitoring interval failed and got cleared",e),i.resetActiveAd()}},e.TIMEOUT_CURRENT_TIME_INTERVAL)},e.prototype.completeAd=function(e,t,i){void 0===t&&(t=new s.AdSample),t.exitPosition=i,t.playPercentage=c.calculatePercentage(t.exitPosition,t.adDuration),this.adStartupTimestamp=c.getCurrentTimestamp(),this.updatePlayingTime(t),this.isPlaying=!1,this.sendAnalyticsRequest(e,t)},e.prototype.resetActiveAd=function(){this.clearCurrentTimeInterval(),this.activeAdSample=void 0},e.prototype.clearCurrentTimeInterval=function(){clearInterval(this.currentTimeInterval),delete this.currentTime},e.MODULE_NAME="ads",e.TIMEOUT_CURRENT_TIME_INTERVAL=100,e}()},8918:function(e,t){"use strict";
1Object.defineProperty(t,"__esModule",{value:!0}),t.isSsaiEngagementErrorData=function(e){return"error"===e.type},t.isSsaiEngagementQuartileData=function(e){return"quartile"===e.type},t.isSsaiEngagementStartedData=function(e){return"started"===e.type}},9557:function(e,t,i){"use strict";var n,r=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 i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(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)}),o=this&&this.__spreadArray||function(e,t,i){if(i||2==arguments.length)for(var n,r=0,o=t.length;r<o;r++)!n&&r in t||(n||(n=Array.prototype.slice.call(t,0,r)),n[r]=t[r]);return e.concat(n||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorDetailTracking=void 0;var a=i(1916),s=i(5063),u=i(4926);t.ErrorDetailTracking=function(e){function t(t,i,n,r){var c=e.call(this)||this;return c.settingsProvider=t,c.backend=i,c.subscribables=n,c.httpRequestTracking=r,c.errorIndex=0,c.onErrorHandler=function(e){var t,i;try{if(!c.isEnabled)return;var n=null==(t=c.httpRequestTracking)?void 0:t.httpRequests,r=(0,s.isNullish)(n)?void 0:o([],n,!0),l=c.errorIndex;c.errorIndex++;var d={platform:"web",licenseKey:c.settingsProvider.licenseKey,domain:c.settingsProvider.domain,impressionId:c.settingsProvider.impressionId,analyticsVersion:u.VERSION,errorId:l,timestamp:(0,s.getCurrentTimestamp)(),code:e.code,message:e.message,data:null!=(i=e.errorData)?i:{additionalData:void 0,exceptionMessage:void 0,exceptionStacktrace:void 0},httpRequests:r,severity:e.severity};a.logger.log("ErrorDetailTracking.onError: ".concat((0,s.tryJSONStringify)(d))),c.backend.send(d)}catch(e){a.logger.error("ErrorDetailTracking.onError: Error in handler",e)}}
1,n.forEach(function(e){return e.subscribe(c.onErrorHandler)}),c}return r(t,e),t.prototype.reset=function(){var e;null==(e=this.httpRequestTracking)||e.reset(),this.errorIndex=0},t.prototype.enabled=function(){this.backend.enabled=!0,this.backend.flush()},t.prototype.disabled=function(){var e,t=this;this.errorIndex=0,null==(e=this.httpRequestTracking)||e.disable(),this.backend.clear(),this.subscribables.forEach(function(e){return e.unsubscribe(t.onErrorHandler)})},t.prototype.configured=function(e,t){var i,n,r=Math.max(null!=(i=null==t?void 0:t.numberOfHttpRequests)?i:0,0);null==(n=this.httpRequestTracking)||n.configure(r),this.backend.limitHttpRequestsOfQueuedErrorDetails(r)},t.prototype.extractConfig=function(e){return e.errorDetails},t}(i(348).Feature)},9627:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.areCollectorRequirementsValid=function(e){var t=[],i=(0,o.isBlank)((0,n.getDomainFromAnalyticsConfig)(e));if(i&&t.push("no `domain` value found (neither from `window.location` object nor provided by `AnalyticsConfig.config.origin`). Without this value, we cannot verify the origin of your analytics data. Please provide the registered domain via the config during collector creation."),t.length>0){var a="Collector setup failed:"+t.join(" -- ");r.logger.errorMessageToUser(a)}return!i};var n=i(8331),r=i(1916),o=i(1820)},9664:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DownloadSpeedMeter=void 0;var n=i(5766),r=i(3786);t.DownloadSpeedMeter=function(){function e(){this.measures=[]}return e.prototype.reset=function(){this.measures=[]},e.prototype.addMeasurement=function(e){if(!(e.httpStatus>
vendor: 14,125 bytes, line 1
1=400)){var t=new r.Measure(e),i=n.Converter.bitsToBytes(3e8);t.speed>=i||this.measures.push(t)}},e.prototype.getInfo=function(){return{segmentsDownloadCount:this.measures.length,segmentsDownloadSize:this.measures.map(function(e){return e.size}).reduce(this.add,0),segmentsDownloadTime:Math.ceil(1e3*this.totalTime()),avgDownloadSpeed:this.avgSpeed(),minDownloadSpeed:this.minSpeed(),maxDownloadSpeed:this.maxSpeed(),avgTimeToFirstByte:this.avgTimeToFirstByte()}},e.prototype.add=function(e,t){return e+t},e.prototype.avgSpeed=function(){if(0===this.measures.length)return 0;var e=this.speeds().reduce(function(e,t){return e+t},0),t=this.measures.length;return this.bytePerSecondToBitPerSecond(e/t)},e.prototype.bytePerSecondToBitPerSecond=function(e){return n.Converter.bytesToBits(e)},e.prototype.minSpeed=function(){return 0===this.measures.length?0:this.bytePerSecondToBitPerSecond(Math.min.apply(Math,this.speeds()))},e.prototype.speeds=function(){return this.measures.map(function(e){return e.speed})},e.prototype.maxSpeed=function(){return 0===this.measures.length?0:this.bytePerSecondToBitPerSecond(Math.max.apply(Math,this.speeds()))},e.prototype.totalTime=function(){return 0===this.measures.length?0:this.measures.reduce(function(e,t){return e+t.duration},0)},e.prototype.avgTimeToFirstByte=function(){return 0===this.measures.length?0:Math.ceil(this.measures.reduce(function(e,t){return e+1e3*t.timeToFirstByte},0)/this.measures.length)},e}()},9796:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(1460),r=i(4649);t.default=function(){function e(e){void 0===e&&(e=r.ANALYTICS_QUALITY_CHANGE_COUNT_THRESHOLD),this.qualityChangeCount=0,this.previousVideoBitrate=0,this.previousAudioBitrate=0,this.startupHasFinished=!1,this.QUALITY_CHANGE_COUNT_THRESHOLD=e}return e.prototype.resetValues=function(){this.qualityChangeCount=0,this.stopResetInterval(),this.previousVideoBitrate=0,this.previousAudioBitrate=0,this.startupHasFinished=!1},e.prototype.increaseCounter=function(){this.qualityChangeCount++},e.prototype.hasExceededQualityChangeThreshold=function(){return this.qualityChangeCount>this.QUALITY_CHANGE_COUNT_THRESHOLD},e.prototype.setStartupHasFinished=function(e,t){this.startupHasFinished=!0,(0,n.isFiniteNumber)(e)&&(this.previousVideoBitrate=e),(0,n.isFiniteNumber)(t)&&(this.previousAudioBitrate=t)},e.prototype.shouldAllowVideoQualityChange=function(e){return this.startupHasFinished&&(0,n.isFiniteNumber)(e)&&0!==this.previousVideoBitrate&&this.previousVideoBitrate!==e&&!this.hasExceededQualityChangeThreshold()},e.prototype.setVideoBitrate=function(e){this.startupHasFinished&&(this.previousVideoBitrate=e)},e.prototype.shouldAllowAudioQualityChange=function(e){return this.startupHasFinished&&(0,n.isFiniteNumber)(e)&&0!==this.previousAudioBitrate&&this.previousAudioBitrate!==e&&!this.hasExceededQualityChangeThreshold()},e.prototype.setAudioBitrate=function(e){this.startupHasFinished&&(this.previousAudioBitrate=e)},e.prototype.startResetInterval=function(){var e=this;void 0===this.qualityChangeCountResetIntervalId&&(this.qualityChangeCountResetIntervalId=setInterval(function(){e.qualityChangeCount=0},r.ANALYTICS_QUALITY_CHANGE_COUNT_RESET_INTERVAL))},e.prototype.stopResetInterval=function(){void 0!==this.qualityChangeCountResetIntervalId&&(clearInterval(this.qualityChangeCountResetIntervalId),delete this.qualityChangeCountResetIntervalId)},e}()},9946:function(e,t){"use strict";var i;Object.defineProperty(t,"__esModule",{value:!0}),t.PAGE_LOAD_TYPE=void 0,function(e){e[e.FOREGROUND=1]="FOREGROUND",e[e.BACKGROUND=2]="BACKGROUND"}(i||(t.PAGE_LOAD_TYPE=i={}))}},t={};function i(n){var r=t[n];if(void 0!==r)return r.exports;var o=t[n]={exports:{}};return e[n].call(o.exports,o,o.exports,i),o.exports}var n={};return function(){"use strict";var e=n;Object.defineProperty(e,"__esModule",{value:!0}),e.PlayerModule=e.adapters=e.Bitmovin8Adapter=e.CdnProviders=e.Players=e.version=void 0;var t=i(4679);Object.defineProperty(e,"Bitmovin8Adapter",{enumerable:!0,get:function(){return t.Bitmovin8Adapter}});var r=i(681);Object.defineProperty(e,"PlayerModule",{enumerable:!0,get:function(){return r.PlayerModule}});var o=i(4355);Object.defineProperty(e,"CdnProviders",{enumerable:!0,get:function(){return o.CdnProvider}});var a=i(556);Object.defineProperty(e,"Players",{enumerable:!0,get:function(){return a.Player}});var s=i(4926);Object.defineProperty(e,"version",{enumerable:!0,get:function(){return s.VERSION}}),e.adapters={Bitmovin8Adapter:t.Bitmovin8Adapter},e.default={PlayerModule:r.PlayerModule}}(),n}()},84511:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=i(30100).default.PlayerModule}},function(e){return e(e.s=84511)}])},538:function(e){"use strict";self,e.exports=(self.webpackChunkbitmovin_player=self.webpackChunkbitmovin_player||[]).push([[270],{97441:function(e,t){var i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};function n(e){return void 0===e&&(e=0),{offset:e}}function r(e){return 0===e.length?null:e[0]}function o(e,t){var i=t.indexOf("."),n=[];if(-1===i)for(var r=0;r<e.length;r++)e[r].type===t&&n.push(e[r]);else{var o=t.substring(0,i),a=t.substring(i+1);for(r=0;r<e.length;r++)e[r].type===o&&(n=n.concat(e[r].list(a)))}return n}function a(e,i){e.forEach(function(e){t.ISOBox.prototype._boxParsers[e]=i})}function s(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,i){return void 0===i&&(i={}),new t.ISOFile(e,i).parse()}},t.ISOFile=function(e,t){void 0===t&&(t={}),this.options=i({},t),this.options.iv_size=t.iv_size||8,e&&(this._raw=new DataView(e)),this._cursor=n(),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,i){var n=[];return t.ISOFile._sweep.call(this,e,n,i),n},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,i,n){for(var r in this.type&&this.type===e&&i.push(this),this.boxes){if(i.length&&n)return;t.ISOFile._sweep.call(this.boxes[r],e,i,n)}},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=n()},t.ISOBox.parse=function(e){var i=new t.ISOBox;return i._offset=e._cursor.offset,i._root=e._root?e._root:e,i._raw=e._raw,i._parent=e,i._parseBox(),e._cursor.offset=i._raw.byteOffset+i._raw.byteLength,i},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 i=Array(t),n=0;n<t;++n)i[n]=this._readUint(e);return i},t.ISOBox.prototype._readFP=function(e){return this._readInt(2*e)/Math.pow(2,e)},t.ISOBox.prototype._readString=function(e){for(var t="",i=0;i<e;i++)t+=String.fromCharCode(this._readUint(8));return t},t.ISOBox.prototype._readHex=function(e){for(var t=[],i=0;i<e;i++){var n=this._readUint(8);t.push((n>>>4).toString(16)),t.push((15&n).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={},a(["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 i=new t.ISOBox;1===this.version?(i.segment_duration=this._readUint(64),i.media_time=this._readInt(64)):(i.segment_duration=this._readUint(32),i.media_time=this._readInt(32)),i.media_rate_integer=this._readInt(16),i.media_rate_fraction=this._readInt(16),this.entries.push(i)}},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()},a(["free","mdat"],function(){this.data=this._createDataView()}),a(["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={},i=this._readUint(32);t.reference_type=i>>31&1,t.referenced_size=0x7fffffff&i,t.subsegment_duration=this._readUint(32);var n=this._readUint(32);t.starts_with_SAP=n>>31&1,t.SAP_type=n>>28&7,t.SAP_delta_time=0xfffffff
vendor: 9,535 bytes, line 1
1&n,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 i=0;i<t.ranges_count;i++){var n={};n.level=this._readUint(8),n.range_size=this._readUint(24),t.ranges.push(n)}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))},a(["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))}),a(["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 i=0;i<31;i++){var n=this._readUint(8);i<e&&(this.compressor_name+=String.fromCharCode(n))}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),i=this.decoderConfig.decoderConfigDescriptor;i.audioObjectType=e>>>3&31,i.samplingFrequencyIndex=(7&e)<<1|t>>>7&1,i.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){return function(e){if(s(e,e._root.options.iv_size)){var t={iv:e._readHex(e._root.options.iv_size)};return e.flags&&(t=function(e,t){return s(e,2)?(t.subsample_count=e._readUint(16),t.subsamples=Array.apply(null,Array(t.subsample_count)).map(function(t){return function(e){return s(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}}(e)}),t):i(i({},t),{subsample_count:0,subsamples:[]})}(e,t)),t}e.samples=[]}(e)})},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,i){Object.defineProperty(t,"__esModule",{value:!0}),t.CmafChunkParser=void 0;var n=i(74853)
vendor: 26,469 bytes, line 1
1;t.CmafChunkParser=function(){function e(e){this.vx=e,this.Gy=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.Gy=n.ArrayHelper.concatBuffers(this.Gy,e)},e.prototype.getCompleteChunks=function(){var t=e.findCompleteCmafChunks(this.Gy);if(0===t.length)return null;this.vx.logger.insane("Found ".concat(t.length," CMAF chunks"));var i=t[t.length-1].end,n=this.Gy.slice(0,i);return this.Gy=this.Gy.slice(i),n},e.findCompleteCmafChunks=function(t){if(!t||t.byteLength<8)return[];for(var i=new DataView(t),n=[],r=["moof","mdat"],o=0,a=[],s=0;s+8<t.byteLength;){var u=i.getUint32(s),c=e.parseIsoBoxType(new Uint8Array(t),s+4);if(0===u)break;s+u<=t.byteLength&&(a.push(c),c===r[0]&&r.shift(),0===r.length&&(n.push({start:o,end:s+u,boxes:a}),r=["moof","mdat"],o=s+u+1,a=[])),s+=u}return n},e.prototype.reset=function(){this.Gy.byteLength>0&&this.vx.logger.debug("CMAF chunk parser discarded ".concat(this.Gy.byteLength," bytes")),this.Gy=new ArrayBuffer(0)},e}()},12392:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.MP4Decrypter=void 0;var n=i(97441),r=i(74853),o=i(70233),a=i(2992),s=i(88052),u=i(62756);t.MP4Decrypter=function(){function e(e,t,i){this.Hy=e,this.Iy=t,this.Ky=!1,this.Py=i,this.Jy=[]}return e.prototype.parseInitSegment=function(e){var t=this;this.Ky=!1;for(var i=n.ISOBoxer.parseBuffer(e),s=i._raw.buffer,u=function(e){var t=[],i=[];i.push.apply(i,e.list("moov.pssh")),i.push.apply(i,e.list("moof.pssh"));for(var n=0,r=i;n<r.length;n++){var o=r[n];o.kids&&o.kids.length>0&&t.push.apply(t,o.kids)}return t}(i),c=0,l=u;c<l.length;c++){var d=l[c];this.Qy(d)}var h=i.get("moov.trak.mdia.minf.stbl.stsd").entries[0];return h.list("sinf").forEach(function(e){var n=e.get("frma"),s=e.get("schm"),u=e.get("schi.tenc");if(n&&u&&s){for(var c=0;c<4;++c)i._raw.setUint8(h._offset+4+c,n.codingname.charCodeAt(c));t.Ny=u.default_is_encrypted,t.Oy=u.default_iv_size,t.My=u.default_kid,t.Ky=!0;var l=r.ArrayHelper.arrayBufferToAsciiString(o.FormatHelper.hexToBytes(t.My).buffer,!0);t.Qy(l)}(0,a.rewriteMp4BoxType)(e,"free")}),Promise.resolve(s)},e.prototype.Qy=function(e){this.Jy.includes(e)||this.Jy.push(e)},e.prototype.getKeyIds=function(){return this.Jy},e.prototype.addKeys=function(e){for(var t=function(e){var t=i.Iy.find(function(t){return t.kid===e.kid});t?t.key=e.key:i.Iy.push(e)},i=this,n=0,r=e;n<r.length;n++)t(r[n])},e.prototype.getKey=function(){var e;if(this.Ly)return this.Ly;for(var t in this.Iy)if(this.Iy.hasOwnProperty(t)&&this.Iy[t].hasOwnProperty("key")&&this.Iy[t].hasOwnProperty("kid")&&this.Iy[t].kid===this.My){e=this.Iy[t].key;break}return void 0===e&&(e=this.Iy[0].key),"string"==typeof e?this.Ly=o.FormatHelper.hexToBytes(e).buffer:e instanceof Uint8Array?this.Ly=e.buffer:this.Ly=e,this.Ly},e.prototype.decryptDataSegment=function(e){if(!this.getKey())return this.Hy.logger.debug("MP4Decrypter.decryptSegment: Error decrypting AES-128 encrypted content"),Promise.reject("Error decrypting AES-128 encrypted content");if(!1===this.isEncrypted())return this.Hy.logger.debug("MP4Decrypter.decryptSegment: NO ENCRYPTED CONTENT"),Promise.reject("NO ENCRYPTED CONTENT");for(var t=n.ISOBoxer.parseBuffer(e,{iv_size:this.Oy}),i=new c(t),r=[],o=0;o<i.getSampleCount();++o)r.push(this.Ry(e,i,o));return Promise.all(r).then(function(){return function(e){[e.uuidBox,e.sencBox,e.saioBox,e.saizBox,e.seigBox,e.sbgpBox].forEach(function(e){e&&(0,a.rewriteMp4BoxType)(e,"free")})}(i),e})},e.prototype.Ry=function(e,t,i){var n=t.sampleToOffset(i),r=t.sampleToSize(i,1),o=t.getSampleEncodeInfo(i);return o.iv?function(e,t,i,n,r){var o;return(null!=(o=r.subsample_count)?o:0)>0&&r.subsamples?function(e,t){var i=function(e){for(var t=e.reduce(function(e,t){return e+t.byteLength},0),i=new Uint8Array(t),n=0,r=0,o=e;r<o.length;r++){var a=o[r];i.set(a,n),n+=a.byteLength}return i.buffer}(t);return e.decrypt(i).then(function(e){for(var i=0,n=0,r=t;n<r.length;n++){var o=r[n],a=new Uint8Array(e,i,o.byteLength);o.set(a),i+=o.byteLength}})}(e,function(e,t,i){if(!i.subsamples)return[];for(var n=[],r=0,o=i.subsamples;r<o.length;r++){var a=o[r];t+=a.bytes_of_clear_data;var s=a.bytes_of_encrypted_data;if(s>0){var u=new Uint8Array(e,t,s);n.push(u),t+=s}}return n}(t,i,r)):function(e,t,i,n){var r=t.slice(i,i+n);return e.decrypt(r).then(function(e){new Uint8Array(t).set(new Uint8Array(e),i)})}(e,t,i,n)}(new(0,s.ModuleManager.get(u.ModuleName.Crypto).CryptoApi)(this.Hy,"AES-CTR",this.getKey(),o.iv,this.Py),e,n,r,o):(this.Hy.logger.debug("MP4Decrypter.decryptSegment: NO INITIAL VECTOR PROVIDED"),Promise.reject("NO INITIAL VECTOR PROVIDED"))},e.prototype.isEncrypted=function(){return this.Ky},e}();var c=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 i,n=this.getSampleSizeTable(),r=0,o=e;o<e+t;o++)r+=null!=(i=n[o].sample_size)?i:0;return r},e}()},24014:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.MP4EncryptionParser=void 0;var n=i(40306),r=i(3336),o=i(13531),a=i(25811),s=i(51682),u=i(74853),c=i(70233),l=i(85434),d=i(15487);t.MP4EncryptionParser=function(){function e(e){var t=this;this.Uy={stsd:function(e){var i;switch(e+=s.ISOBMFFConstants.FULL_BOX_VERSION_LENGTH+s.ISOBMFFConstants.FULL_BOX_FLAGS_LENGTH,t.Sy[0]){case"vide":i=t.Uy.encv;break;case"soun":i=t.Uy.enca;break;case"hint":case"meta":case"auxv":t.Ty.logger.debug("handler type "+t.Sy[0]+" not yet supported");break;default:t.Ty.logger.debug("invalid handler type "+t.Sy[0])}return i?e+=4:(t.Ty.logger.debug("unsupported handler type "+t.Sy[0]),-1)},encv:function(e){return e+78},enca:function(e){return e+28}},this.Ty=e}return e.prototype.Vy=function(e,t){var i=e.getUint32(t);return i<=0?null:i},e.prototype.Wy=function(e,t){for(var i="",n=0;n<s.ISOBMFFConstants.BOX_TYPE_LENGTH;n++)i+=String.fromCharCode(e.getInt8(t+n));return i},e.prototype.Xy=function(e,t){for(var i,n,r=0,o=t,a=[],u=new DataView(e);r+3<u.byteLength;){if(n=this.Vy(u,r),i=this.Wy(u,r+s.ISOBMFFConstants.BOX_SIZE_LENGTH),null===n)return this.Ty.logger.debug("size is 0, maybe an error, or the largesize should be parsed. Returning with null."),[];if(i!==o[0])r+=n;else{if(o.length<=1)a.push(e.slice(r,r+n));else{var c=r;if(r+=s.ISOBMFFConstants.BOX_SIZE_LENGTH+s.ISOBMFFConstants.BOX_TYPE_LENGTH,this.Uy.hasOwnProperty(i)){var l=this.Uy[i](r);-1!==l&&(r=l)}var d=r-c;d=n-d;var h=e.slice(r,r+d),p=this.Xy(h,t.slice(1));p&&(a=a.concat(p)),r=c}r+=n}}return a.length>0?a:[]},e.prototype.Yy=function(e){for(var t=this.Xy(e,["moov","trak","mdia","hdlr"]),i=[],n=0;n<t.length;n++){var r=new DataView(t[n]),o=s.ISOBMFFConstants.BOX_SIZE_LENGTH+s.ISOBMFFConstants.BOX_TYPE_LENGTH;o+=s.ISOBMFFConstants.FULL_BOX_VERSION_LENGTH+s.ISOBMFFConstants.FULL_BOX_FLAGS_LENGTH,o+=4,i.push(this.Wy(r,o))}return i},e.prototype.Zy=function(e){if(!e||!(e instanceof ArrayBuffer)||e.byteLength<1)return null;var t=new DataView(e),i=s.ISOBMFFConstants.BOX_SIZE_LENGTH+s.ISOBMFFConstants.BOX_TYPE_LENGTH;i+=s.ISOBMFFConstants.FULL_BOX_VERSION_LENGTH+s.ISOBMFFConstants.FULL_BOX_FLAGS_LENGTH+3+1;for(var n="",r=0;r<16;r++)n+=c.FormatHelper.intToHex(t.getUint8(i+r));return n},e.prototype.parseDefaultKIDFromBuffer=function(e,t){this.Sy=this.Yy(e),i=l.MimeTypeHelper.isVideo(t)?["moov","trak","mdia","minf","stbl","stsd","encv","sinf","schi","tenc"]:["moov","trak","mdia","minf","stbl","stsd","enca","sinf","schi","tenc"];var i,n=this.Xy(e,i);if(!n||n.length<1)return null;for(var r=[],o=0;o<n.length;o++){var a=this.Zy(n[o]);null!==a&&r.push(a)}return this.Ty.logger.debug("default KID extracted: "+r),r},e.prototype.ay=function(e){return u.ArrayHelper.arrayBufferToAsciiString(e,!0)},e.prototype.by=function(e){if(!e||!(e instanceof ArrayBuffer)||e.byteLength<3)return this.Ty.logger.debug("could not parse pssh data from box"),null;this.Ty.logger.isLevelEnabled(o.LogLevel.DEBUG)&&this.Ty.logger.debug(this.ay(e));var t,i={},n=new DataView(e);t=0+(s.ISOBMFFConstants.BOX_SIZE_LENGTH+s.ISOBMFFConstants.BOX_TYPE_LENGTH);var r=n.getUint8(t);t+=s.ISOBMFFConstants.FULL_BOX_VERSION_LENGTH+s.ISOBMFFConstants.FULL_BOX_FLAGS_LENGTH;for(var l="",d=0;d<s.ISOBMFFConstants.PSSH_SYSTEM_ID_LENGTH;d++)l+=c.FormatHelper.intToHex(n.getUint8(t)),t++;if(i.systemIDraw=l,i.systemID="urn:uuid:".concat(c.FormatHelper.beautifyUUID(l)),a.DRMSchemeIDURIs.hasOwnProperty(i.systemID)&&(i.systemName=a.DRMSchemeIDURIs[i.systemID]),r>0){var h=n.getUint32(t);for(t+=4,i.kid=[],d=0;d<h;d++){var p=u.ArrayHelper.extractHexString(n,t,s.ISOBMFFConstants.PSSH_KID_LEN);t+=s.ISOBMFFConstants.PSSH_KID_LEN,i.kid.push(p)}}return i.initData=e.slice(0),i.initDataStr=this.ay(i.initData),i},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 i=[];if(i=(i=i.concat(this.Xy(t,["moov","pssh"]))).concat(this.Xy(t,["moof","pssh"])),e.isEncrypted()&&!i.length&&e.isInit()&&(0,d.isTizen2016)())return this.Ty.eventHandler.fireError(new r.PlayerError(n.ErrorCode.SEGMENT_PSSH_DATA_MISSING,void 0,void 0,this.Ty.sourceContext.sourceIdentifier)),[];var o=[];if(Array.isArray(i))for(var a=0;a<i.length;a++){var s=this.by(i[a]);null!==s&&o.push(s)}return o},e}()},32951:function(e,t,i){var n=this&&this.__spreadArray||function(e,t,i){if(i||2==arguments.length)for(var n,r=0,o=t.length;r<o;r++)!n&&r in t||(n||(n=Array.prototype.slice.call(t,0,r)),n[r]=t[r]);return e.concat(n||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.MP4Parser=void 0,t.getVideoSamples=function(e,t,i,n){var r=(0,d.getCodecTag)(t);return b(e.moof,e.mdat,t,n).map(function(e){var t=e;return t.nalus=function(e,t,i){void 0===i&&(i=[]);for(var n=d.AVC_CODEC_TAGS.includes(t)?T:_,r=E+n,o=[],a=0;a+r<e.byteLength;){var s=Math.min(e.getUint32(a),e.byteLength-a-r);if(a+=4,0!==s){var u=d.AVC_CODEC_TAGS.includes(t)?31&e.getUint8(a):e.getUint8(a)>>1&63;if(a+=n,0===i.length||i.includes(u)){var c={type:u,data:new DataView(e.buffer,e.byteOffset+a,s-n)};A(c),o.push(c)}a+=s-n}}return o}(e.data,r,i),t})},t.getTrackSamples=b,t.removeEmulationPreventionThreeBytes=A,t.getMp4Fragments=function(e){var t=e.getParsedData().fetchAll("moof"),i=e.getParsedData().fetchAll("mdat");return t.length===i.length?t.map(function(e,t){return{moof:e,mdat:i[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 i=t.get("moof.traf.tfhd");return i?i.track_ID?i.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 i=R(e).get("moof.traf.tfdt");C(e,t);var n=e.getTimescale();return i&&void 0!==n?i.baseMediaDecodeTime/n:void 0===n?NaN:void 0},t.parseSegmentData=M,t.isValidMp4=function(e){var t=R(e),i=(e.isInit()?["ftyp","moov"]:["moof","mdat"]).every(function(e){return!!t.fetch(e)}),n=t.boxes[t.boxes.length-1],r=(n?n.size+n._offset:0)===e.getData().byteLength,o=!t._incomplete;return i&&r&&o},t.getCodecFromSegment=function(e){var t=M(e);return function(e){var t=I(e);if(!t)return null;var i=t.entries.find(function(e){return n(n([],u.VisualSampleEntryTypes.Avc,!0),u.VisualSampleEntryTypes.Hvc,!0).includes(e.type)});return i?u.VisualSampleEntryTypes.Avc.includes(i.type)?function(e){var t=e.get("avcC");return t&&0!==t.sps.length?e.type+"."+h.FormatHelper.bytesToHex(new Uint8Array(t.sps[0].splice(1,3))):null}(i):u.VisualSampleEntryTypes.Hvc.includes(i.type)?(0,d.assembleHvcCodecString)(i.type,i.get("hvcC")):null:null}(t)||function(e){var t=I(e);if(!t)return null;var i=t.entries[0],n=(i.get("esds")||{}).decoderConfig;return n?i.type+"."+n.objectProfileIndication.toString(16)+"."+n.decoderConfigDescriptor.audioObjectType:null}(t)};var r=i(97441),o=i(40306),a=i(3336),s=i(13531),u=i(1001),c=i(51682),l=i(74853),d=i(34047),h=i(70233),p=i(85434),f=i(2992),g=i(23068),m=i(88052),y=i(62756),v=i(78246),S=8;function b(e,t,i,n){var r,o,a,s=e.get("traf"),u=s.get("tfhd"),l=s.get("trun"),d=null!=(r=u.base_data_offset)?r:e._offset,h=null!=(o=l.data_offset)?o:0;return(null==(a=null==l?void 0:l.samples)?void 0:a.length)?l.samples.map(function(e){var r=e.sample_size||u.default_sample_size||i.getDefaultSampleSize();r>l._raw.buffer.byteLength&&(r=l._raw.buffer.byteLength-(d+h),n.warn("trun.samples.sample_size (".concat(e.sample_size,") is bigger than the available buffer length:").concat(l._raw.buffer.byteLength,". Adjusting to remaining bytes:").concat(r))),1!==l.sample_count||e.sample_size||(r=t.size-function(e){return e.hasOwnProperty("largesize")?c.ISOBMFFConstants.BOX_HEADER_LENGTH_LARGE:c.ISOBMFFConstants.BOX_HEADER_LENGTH_REGULAR}(t));var o={duration:e.sample_duration||u.default_sample_duration||i.getDefaultSampleDuration(),size:r,compositionTimeOffset:e.sample_composition_time_offset||0,data:new DataView(l._raw.buffer,d+h,r)};return h+=r,o}):[]}t.MP4Parser=function(){function e(e,t,i){void 0===i&&(i=r.ISOBoxer),this.context=e,this.mp4EncryptionParser=t,this.isoBoxer=i,this.cy=m.ModuleManager.get(y.ModuleName.Crypto,!1)}return e.prototype.parseSegment=function(e){"mp4"===p.MimeTypeHelper.extractContainerType(e.getMimeType())?(e.isInit()?this.iy(e):this.ky(e),e.setDrmInitData(this.dy(e))):this.context.logger.debug("Skipping parsing of a non MP4 segment")},e.prototype.dy=function(e){var t=this,i=this.mp4EncryptionParser.parsePsshBox(e);return this.context.logger.isLevelEnabled(s.LogLevel.DEBUG)&&(null==i||i.forEach(function(e){return t.context.logger.debug("initData found: ".concat(e.initDataStr))})),Array.isArray(i)&&i.length>0?i:[]},e.prototype.ey=function(e){var t=e.getParsedData().get("moov.mvex.trex");if(t){var i={defaultSampleSize:t.default_sample_size,defaultSampleDuration:t.default_sample_duration};e.updateParserMetadata(i),this.context.logger.debug("default sample duration for "+e.getMimeType()+" : "+i.defaultSampleDuration)}},e.prototype.fy=function(e){var t=e.getParsedData().get("moof.traf.sgpd");if(t&&"seig"===function(e){return String.fromCharCode(e._raw.getUint8(12),e._raw.getUint8(13),e._raw.getUint8(14),e._raw.getUint8(15))}(t)){var i=function(e){var t=1===O(e)?20:16;return e._raw.getUint32(t)}(t);if(!(i<1)){var n=function(e){var t=O(e),i=D(e),n=1===t?24:20;return 1===t&&0===i?e._raw.getUint32(n):i}(t),r=function(e){var t=O(e),i=D(e),n=1===t&&0===i?28:24;return(e._raw.getUint16(n)<<16)+e._raw.getUint8(n+2)}(t),o=function(e){var t=O(e),i=D(e),n=1===t&&0===i?31:27;return e._raw.getUint8(n)}(t),a=function(e){for(var t=O(e),i=D(e),n=1===t&&0===i?32:28,r=new Uint8Array(16),o=0;o<16;o++)r[o]=e._raw.getUint8(n+o);return h.FormatHelper.bytesToUUID(r)}(t);this.context.logger.debug("Parsed SGPD/SEIG, entries(".concat(i,"), key ID(").concat(a,"), IV size(").concat(o,"), isEncrypted(").concat(!!r,"), descriptor length(").concat(n,")")),e.setDrmKid(a)}}},e.prototype.gy=function(e){var t=this.mp4EncryptionParser.parseDefaultKIDFromBuffer(e.getData(),e.getMimeType()),i=(null==t?void 0:t.length)?t.pop():void 0,n=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");n&&(e.updateParserMetadata({ivSize:n.default_iv_size}),e.setEncrypted(!0)),i&&e.setDrmKid(h.FormatHelper.beautifyUUID(i))},e.prototype.hy=function(e){var t=e.get("elst");return!(t&&t.entries.length>0&&t.entries[0].media_time<0)},e.prototype.iy=function(e){var t=M(e,{},this.isoBoxer);t?(this.gy(e),C(e,this.context.logger),this.ey(e),this.context.settings.IGNORE_MP4_EDTS_BOX&&this.jy(t)):this.context.eventHandler.fireError(new a.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.jy=function(e){var t=e.get("moov.trak.edts");t&&!this.hy(t)&&(this.context.logger.debug("Found unsupported edts box, dropping it!"),(0,f.rewriteMp4BoxType)(t,"free"))},e.prototype.ky=function(t){var i,n,r=0,o=t.getSegmentInfo();(null==o?void 0:o.presentationTimeOffset)&&(r=o.presentationTimeOffset);var a=this.ny(t);t.isSelfInit()&&this.ey(t),this.fy(t),this.gy(t),t.setEncrypted(null!=(n=null==(i=t.getInitSegment())?void 0:i.isEncrypted())&&n),function(e){e.getParsedData().fetch("senc")&&e.setEncrypted(!0)}(t),C(t,this.context.logger),this.my(t,r,a),this.ly(t),this.context.settings.PARSE_EMSG_BOXES&&t.setInbandEvents(this.qy(t,r)),t.setLastSegment(this.ry(t));var s=e.getProducerReferenceTime(t);s&&(o.wallClockTime=s)},e.prototype.ly=function(e){var t=this.oy(e);if(t){var i=Math.abs(e.getDuration()-t);i>.5&&this.context.logger.debug("Segment duration is off by "+i+", corrected from "+e.getDuration()+" to "+t),e.setDuration(t)}},e.prototype.my=function(e,t,i){var n=i.fetchAll("tfdt"),r=n[0],o=n.map(function(e){return e._offset});if(r){var a=e.getTimescale();e.setTFDTBoxOffsets(o),e.setBaseMediaDecodeTime(r.baseMediaDecodeTime),e.setPresentationTimeOffset(t),void 0===a?this.context.logger.debug("Could not set playback time - segment is missing timescale."):e.setPlaybackTime(r.baseMediaDecodeTime/a-t)}},e.prototype.ny=function(e){return M(e,{iv_size:e.getIvSize()||S},this.isoBoxer)},e.prototype.oy=function(e){var t=this,i=e.getTimescale();return p.MimeTypeHelper.isAV(e.getMimeType())?void 0===i?(this.context.logger.debug("Could not parse segment duration - segment is missing timescale."),null):e.getParsedData().list("moof.traf").reduce(function(i,n){return i+t.py(n,e.getDefaultSampleDuration())},0)/i:null},e.prototype.py=function(e,t){var i,n=e.get("trun");if(!n)return this.context.logger.insane("Media segment is missing trun box!"),0;var r=e.get("tfhd"),o=r?r.default_sample_duration:null,a=null==(i=n.samples)?void 0:i.reduce(function(e,i){return e+(i.sample_duration||o||t||0)},0);return null!=a?a:0},e.prototype.qy=function(e,t){var i=this.ny(e),n=function(e,t,i){var n=t.fetch("sidx"),r=0,o=e.getTimescale();if(void 0===o)return 0;if(n&&n.earliest_presentation_time)r=n.earliest_presentation_time/o;else{var a=t.fetch("tfdt");a&&a.baseMediaDecodeTime&&(r=a.baseMediaDecodeTime/o)}return(0,g.isNumber)(r)?r-=i:r=0,r}(e,i,t);return i.fetchAll("emsg").map(function(e){return{schemeIdUri:e.scheme_id_uri,value:e.value,presentationTime:w(e,n,t),eventDuration:e.event_duration/e.timescale,id:String(e.id),messageData:l.ArrayHelper.convertBufferSourceToUTF8(e.message_data)}})},e.parseFourCharsText=function(e,t){for(var i="",n=0;n<4;n++)i+=String.fromCharCode(e.getInt8(t+n));return i},e.prototype.ry=function(t){var i=t.getData();if(!i||i.byteLength<4)return!1;for(var n=new DataView(i),r=0;r+3<n.byteLength;){var o=n.getUint32(r);if(o<=0)break;if("styp"===e.parseFourCharsText(n,r+4)){r+=8,r+=8;for(var a=void 0;r<o;)if(a=e.parseFourCharsText(n,r),r+=4,"lmsg"===a)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 i=1e3*t.ntp_timestamp_seconds;return i+=Math.round(t.ntp_timestamp_seconds_fraction/0x100000000*1e3),(0,v.ntpToUnix)(i)},e}();var E=4,T=1,_=2;function A(e){for(var t=[],i=1;i<e.data.byteLength-2;)0===e.data.getUint8(i)&&0===e.data.getUint8(i+1)&&3===e.data.getUint8(i+2)?(t.push(i+2),i+=3):i++;if(0!==t.length){for(var n=new DataView(new ArrayBuffer(e.data.byteLength-t.length)),r=0,o=0;r<n.byteLength;r++,o++)t[0]===o&&(t.shift(),o++),n.setUint8(r,e.data.getInt8(o));e.data=n}}function P(e,t,i){return void 0===t&&(t={}),void 0===i&&(i=r.ISOBoxer),i.parseBuffer(e,t)}function M(e,t,i){if(void 0===t&&(t={}),void 0===i&&(i=r.ISOBoxer),!e.getParsedData()){var n=P(e.getData(),t,i);e.setParsedData(n)}return e.getParsedData()}function I(e){return e.get("moov.trak.mdia.minf.stbl.stsd")}function R(e,t){return void 0===t&&(t=r.ISOBoxer),M(e,{iv_size:e.getIvSize()||S},t)}function C(e,t){var i=e.getParsedData().get("moov.trak.mdia.mdhd");if(i){var n=i.timescale;e.setTimescale(n),t.debug("timescale for ".concat(e.getMimeType()," is ").concat(n))}}function O(e){return e._raw.getUint8(8)}function D(e){return 1===O(e)?e._raw.getUint32(16):0}function w(e,t,i){return 1===e.version?e.presentation_time/e.timescale-i:t+e.presentation_time_delta/e.timescale}},37910:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.ContainerMp4ModuleDefinition=void 0;var n=i(62756),r=i(51700),o=i(12392),a=i(24014),s=i(32951);t.ContainerMp4ModuleDefinition={name:n.ModuleName.ContainerMP4,module:{MP4Parser:s.MP4Parser,MP4Decrypter:o.MP4Decrypter,MP4EncryptionParser:a.MP4EncryptionParser,CmafChunkParser:r.CmafChunkParser,getMp4Fragments:s.getMp4Fragments,getVideoSamples:s.getVideoSamples,parseTfdtBoxOffsets:s.parseTfdtBoxOffsets,getTrackId:s.getTrackId,parseBuffer:s.parseBuffer,parsePlaybackTime:s.parsePlaybackTime,isValidMp4:s.isValidMp4,getCodecFromSegment:s.getCodecFromSegment,getTrackSamples:s.getTrackSamples}},t.default=t.ContainerMp4ModuleDefinition},78246:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.ntpToUnix=function(e){return e+i};var i=new Date(Date.UTC(1900,0,1)).getTime()}},function(e){return e(e.s=37910)}])},72:function(e){self,e.exports=(self.webpackChunkbitmovin_player=self.webpackChunkbitmovin_player||[]).push([[858],{72387:function(e,t,i){e.exports=function(){return i(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,g,m,y,_,b,S,v,T,w,k,C,P,E,A,x,U,M,O,D,I,L,B,R,G,W=Math.pow(2,32),F=W;(function(){var t;if(k={avc1:[],avcC:[],hvc1:[],hvcC:[],btrt:[],dinf:[],dref:[],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 k)k.hasOwnProperty(t)&&(k[t]=[t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2),t.charCodeAt(3)]);C=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)]),A=new Uint8Array(["h".charCodeAt(0),"v".charCodeAt(0),"c".charCodeAt(0),"1".charCodeAt(0)]),P=new Uint8Array([0,0,0,1]),x=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]),U=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]),M={video:x,audio:U},I=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,R=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),G=L,O=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},i=function(){return t(k.dinf,t(k.dref,I))},n=function(e){return t(k.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]))},a=function(e){var i,n,a;for(a=0;a<e.length;a++)if("video"===(n=e[a]).type){i={avc:E,hevc:A}[n.codec];break}return t(k.ftyp,C,P,C,i||E)},y=function(e){return t(k.hdlr,M[e])},r=function(e){return t(k.mdat,e)},m=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(k.mdhd,i)},g=function(e){return t(k.mdia,m(e),y(e.type),o(e))},s=function(e){return t(k.mfhd,new Uint8Array([0,0,0,0,(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e]))},o=function(e){return t(k.minf,"video"===e.type?t(k.vmhd,O):t(k.smhd,D),i(),b(e))},d=function(e,i){for(var n=[],a=i.length;a--;)n[a]=v(i[a]);return t.apply(null,[k.moof,s(e)].concat(n))},p=function(e){for(var i=e.length,n=[];i--;)n[i]=u(e[i]);return t.apply(null,[k.moov,l(4294967295)].concat(n).concat(h(e)))},h=function(e){for(var i=e.length,n=[];i--;)n[i]=T(e[i]);return t.apply(null,[k.mvex].concat(n))},l=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(k.mvhd,i)},_=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(k.sdtp,r)},b=function(e){return t(k.stbl,S(e),t(k.stts,G),t(k.stsc,B),t(k.stsz,R),t(k.stco,L))},e=function(){return t(k.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192]))},c=function(e,i){return t(k.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 i,a;S=function(e){return t(k.stsd,new Uint8Array([0,0,0,0,0,0,0,1]),"video"===e.type?i(e):a(e))},i=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;
1n++)l.push(d[n].byteLength>>>8&255),l.push(255&d[n].byteLength),l=l.concat(Array.prototype.slice.call(d[n]));var u=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=[k.avc1,u,t(k.avcC,new Uint8Array([1,s.profileIdc,s.profileCompatibility,s.levelIdc,255].concat([r.length],p,[o.length],h))),e()],i.sarRatio&&a.push(c(i.sarRatio[0],i.sarRatio[1])),t.apply(null,a);if("hevc"===i.codec){var f,g=s.sps_max_sub_layers_minus1+1,m=s.sps_temporal_id_nesting_flag,y=61440|s.min_spatial_segmentation_idc,_=new DataView(new ArrayBuffer(2)),b=new DataView(new ArrayBuffer(2)),S=new DataView(new ArrayBuffer(2));return _.setUint16(0,d.length),b.setUint16(0,r.length),S.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,g<<3|m<<2|3,3].concat([160,_.getUint8(0),_.getUint8(1)],l).concat([161,b.getUint8(0),b.getUint8(1)],p).concat([162,S.getUint8(0),S.getUint8(1)],h)),t(k.hvc1,u,t(k.hvcC,f),e())}},a=function(e){return t(k.mp4a,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]),n(e))}}(),f=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(k.tkhd,i)},v=function(e){var i,n,a,r,s,o;return i=t(k.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/F),o=Math.floor(e.baseMediaDecodeTime%F),n=t(k.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=w(e,92),t(k.traf,i,n,a)):(r=_(e),a=w(e,r.length+92),t(k.traf,i,n,a,r))},u=function(e){return e.duration=e.duration||4294967295,t(k.trak,f(e),g(e))},T=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(k.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(k.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(k.trun,a)},w=function(t,n){return"audio"===t.type?e(t,n):i(t,n)}}();var N={ftyp:a,mdat:r,moof:d,moov:p,initSegment:function(t){var e,i=a(t),n=p(t);
vendor: 5,111 bytes, line 1
1return(e=new Uint8Array(i.byteLength+n.byteLength)).set(i),e.set(n,i.byteLength),e}};var z=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,Y,H,X,q,K,Z,$,J=j,Q=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},tt=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},et=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},it=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},nt=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=Q(s,o)).size,d.push(a);return d},at=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},rt=[33,16,5,32,164,27],st=[33,65,108,84,1,2,4,8,168,2,4,8,17,191,252],ot=function(t){for(var e=[];t--;)e.push(0);return e},dt=function(){if(!V){var t={96e3:[rt,[227,64],ot(154),[56]],88200:[rt,[231],ot(170),[56]],64e3:[rt,[248,192],ot(240),[56]],48e3:[rt,[255,192],ot(268),[55,148,128],ot(54),[112]],44100:[rt,[255,192],ot(268),[55,163,128],ot(84),[112]],32e3:[rt,[255,192],ot(268),[55,234],ot(226),[112]],24e3:[rt,[255,192],ot(268),[55,255,128],ot(268),[111,112],ot(126),[224]],16e3:[rt,[255,192],ot(268),[55,255,128],ot(268),[111,255],ot(269),[223,108],ot(195),[1,192]],12e3:[st,ot(268),[3,127,248],ot(268),[6,255,240],ot(268),[13,255,224],ot(268),[27,253,128],ot(259),[56]],11025:[st,ot(268),[3,127,248],ot(268),[6,255,240],ot(268),[13,255,224],ot(268),[27,255,192],ot(268),[55,175,128],ot(108),[112]],8e3:[st,ot(268),[3,121,16],ot(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}),{})}(t)}return V},pt=9e4;K=function(t,e){return Y(q(t,e))},Z=function(t,e){return H(X(t),e)}
vendor: 6,590 bytes, line 1
1,$=function(t,e,i){return X(i?t:t-e)};var ht=pt,lt=(Y=function(t){return t*pt},H=function(t,e){return t*e},X=function(t){return t/pt},q=function(t,e){return t/e},K),ct=Z,ut=$,ft=function(t,e,i,n){var a,r,s,o,d=0,p=0,h=0,l=0;if(e.length&&(a=lt(t.baseMediaDecodeTime,t.samplerate),d=Math.ceil(ht/(t.samplerate/1024)),i&&n&&(p=a-Math.max(i,n),l=(h=Math.floor(p/d))*d),!(h<1||l>ht/2))){for((r=dt()[t.samplerate])||(r=e[0].data),s=0;s<h;s++)o=e[0],e.splice(0,0,{data:r,dts:o.dts-d,pts:o.pts-d});return t.baseMediaDecodeTime-=Math.floor(ct(l,t.samplerate)),l}},gt=function(t){var e,i,n=[];for(e=0;e<t.length;e++)i=t[e],n.push({size:i.data.byteLength,duration:1024});return n},mt=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},yt=ht,_t=function(t){delete t.minSegmentDts,delete t.maxSegmentDts,delete t.minSegmentPts,delete t.maxSegmentPts},bt=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/yt,i=Math.floor(i)),i},St=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))},vt=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},Tt=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)},wt=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},kt=4,Ct=function t(e){e=e||{},t.prototype.init.call(this),this.parse708captions_="boolean"!=typeof e.parse708captions||e.parse708captions,this.captionPackets_=[],this.ccStreams_=[new Bt(0,0),new Bt(0,1),new Bt(1,0),new Bt(1,1)],this.parse708captions_&&(this.cc708Stream_=new Ut({captionServices:e.captionServices})),this.reset(),this.ccStreams_.forEach((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")))};(Ct.prototype=new J).push=function(t){var e=this;"sei_rbsp"===t.nalUnitType&&vt(t.escapedRBSP).filter((function(t){return t.payloadType===kt})).map(Tt).forEach((function(i){i&&(e.captionPackets_=e.captionPackets_.concat(wt(t.pts,i)))}))},Ct.prototype.flushCCStreams=function(t){this.ccStreams_.forEach((function(e){return"flush"===t?e.flush():e.partialFlush()}),this)},Ct.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)},Ct.prototype.flush=function(){return this.flushStream("flush")},Ct.prototype.partialFlush=function(){return this.flushStream("partialFlush")},Ct.prototype.reset=function(){this.latestDts_=null,this.ignoreNextEqualDts_=!1,this.numSameDts_=0,this.activeCea608Channel_=[null,null],this.ccStreams_.forEach((function(t){t.reset()}))},Ct.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)},Ct.prototype.setsChannel1Active=function(t){return 4096==(30720&t.ccData)},Ct.prototype.setsChannel2Active=function(t){return 6144==(30720&t.ccData)},Ct.prototype.setsTextOrXDSActive=function(t){return 256==(28928&t.ccData)||4138==(30974&t.ccData)||6186==(30974&t.ccData)},Ct.prototype.dispatchCea708Packet=function(t){this.parse708captions_&&this.cc708Stream_.push(t)};var Pt={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},Et=function(t){return 32<=t&&t<=127||160<=t&&t<=255},At=function(t){this.windowNum=t,this.reset()};At.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},At.prototype.getText=function(){return this.rows.join("\\n")},At.prototype.clearText=function(){this.rows=[""],this.rowIdx=0},At.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--},At.prototype.isEmpty=function(){return 0===this.rows.length||1===this.rows.length&&""===this.rows[0]},At.prototype.addText=function(t){this.rows[this.rowIdx]+=t},At.prototype.backspace=function(){if(!this.isEmpty()){var t=this.rows[this.rowIdx];this.rows[this.rowIdx]=t.substr(0,t.length-1)}};
vendor: 13,604 bytes, line 1
1var xt=function(t,e,i){this.serviceNum=t,this.text="",this.currentWindow=new At(-1),this.windows=[],this.stream=i,"string"==typeof e&&this.createTextDecoder(e)};xt.prototype.init=function(t,e){this.startPts=t;for(var i=0;i<8;i++)this.windows[i]=new At(i),"function"==typeof e&&(this.windows[i].beforeRowOverflow=e)},xt.prototype.setCurrentWindow=function(t){this.currentWindow=this.windows[t]},xt.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 Ut=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))}};Ut.prototype=new J,Ut.prototype.new708Packet=function(){null!==this.current708Packet&&this.push708Packet(),this.current708Packet={data:[],ptsVals:[]}},Ut.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)},Ut.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)},Ut.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],Et(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++},Ut.prototype.extendedCommands=function(t,e){var i=this.current708Packet.data[++t];return Et(i)&&(t=this.handleText(t,e,{isExtended:!0})),t},Ut.prototype.getPts=function(t){return this.current708Packet.ptsVals[Math.floor(t/2)]},Ut.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 xt(t,n,a),this.services[t].init(this.getPts(e),(function(e){a.flushDisplayed(e,a.services[t])})),this.services[t]},Ut.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=Pt[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},Ut.prototype.multiByteCharacter=function(t,e){var i=this.current708Packet.data,n=i[t+1],a=i[t+2];return Et(n)&&Et(a)&&(t=this.handleText(++t,e,{isMultiByte:!0})),t},Ut.prototype.setCurrentWindow=function(t,e){var i=7&this.current708Packet.data[t];return e.setCurrentWindow(i),t},Ut.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},Ut.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},Ut.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},Ut.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)},Ut.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},Ut.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},Ut.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},Ut.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},Ut.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},Ut.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},Ut.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},Ut.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},Ut.prototype.reset=function(t,e){var i=this.getPts(t);return this.flushDisplayed(i,e),this.initService(e.serviceNum,t)};var Mt={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},Ot=function(t){return t=Mt[t]||t,String.fromCharCode(t).replace(/[\\x00]/g,"")},Dt=[4352,4384,4608,4640,5376,5408,5632,5664,5888,5920,4096,4864,4896,5120,5152],It=function(){for(var t=[],e=15;e--;)t.push("");return t},Lt=function(){for(var t=[],e=15;e--;)t[e]=0;return t},Bt=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_=It(),this.displayedIndent_=Lt();else if(e===this.ERASE_NON_DISPLAYED_MEMORY_)this.nonDisplayed_=It(),this.nonDisplayedIndent_=Lt();else if(e===this.RESUME_DIRECT_CAPTIONING_)"paintOn"!==this.mode_&&(this.flushDisplayed(t.pts),this.displayed_=It(),this.displayedIndent_=Lt()),this.mode_="paintOn",this.startPts_=t.pts;else{if(!Boolean(this.mode_))return;if(this.isSpecialCharacter(n,a))r=Ot((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=Ot((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=Dt.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=Ot(n),0!==a&&(r+=Ot(a)),this[this.mode_](t.pts,r),this.column_+=r.length)}}else this.lastControlCode_=null}};Bt.prototype=new J,Bt.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]}})}},Bt.prototype.reset=function(){this.mode_="popOn",this.topRow_=0,this.startPts_=0,this.displayed_=It(),this.nonDisplayed_=It(),this.displayedIndent_=Lt(),this.nonDisplayedIndent_=Lt(),this.lastControlCode_=null,this.column_=0,this.row_=14,this.rollUpRows_=2,this.formatting_=[]},Bt.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},Bt.prototype.isSpecialCharacter=function(t,e){return t===this.EXT_&&e>=48&&e<=63},Bt.prototype.isExtCharacter=function(t,e){return(t===this.EXT_+1||t===this.EXT_+2)&&e>=32&&e<=63},Bt.prototype.isMidRowCode=function(t,e){return t===this.EXT_&&e>=32&&e<=47},Bt.prototype.isOffsetControlCode=function(t,e){return t===this.OFFSET_&&e>=this.TAB_OFFSET_1_&&e<=this.TAB_OFFSET_3_},Bt.prototype.isPAC=function(t,e){return t>=this.BASE_&&t<this.BASE_+8&&e>=64&&e<=127},Bt.prototype.isColorPAC=function(t){return t>=64&&t<=79||t>=96&&t<=127},Bt.prototype.isNormalChar=function(t){return t>=32&&t<=127},Bt.prototype.setRollUp=function(t,e){if("rollUp"!==this.mode_&&(this.row_=14,this.mode_="rollUp",this.flushDisplayed(t),this.nonDisplayed_=It(),this.displayed_=It(),this.displayedIndent_=Lt(),this.nonDisplayedIndent_=Lt()),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},Bt.prototype.addFormatting=function(t,e){this.formatting_=this.formatting_.concat(e);var i=e.reduce((function(t,e){return t+"<"+e+">"}),"");this[this.mode_](t,i)},Bt.prototype.clearFormatting=function(t){if(this.formatting_.length){var e=this.formatting_.reverse().reduce((function(t,e){return t+"<
vendor: 6,418 bytes, line 1
1/"+e+">"}),"");this.formatting_=[],this[this.mode_](t,e)}},Bt.prototype.popOn=function(t,e){var i=this.nonDisplayed_[this.row_];i+=e,this.nonDisplayed_[this.row_]=i},Bt.prototype.rollUp=function(t,e){var i=this.displayed_[this.row_];i+=e,this.displayed_[this.row_]=i},Bt.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_]=""},Bt.prototype.paintOn=function(t,e){var i=this.displayed_[this.row_];i+=e,this.displayed_[this.row_]=i},Bt.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_=It(),this.displayedIndent_=Lt();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},Bt.prototype.incrementIdentation=function(t){"popOn"===this.mode_?this.nonDisplayedIndent_[this.row_]+=t:"rollUp"===this.mode_&&(this.displayedIndent_[this.row_]+=t)};var Rt={CaptionStream:Ct,Cea608Stream:Bt,Cea708Stream:Ut},Gt={H264_STREAM_TYPE:27,H265_STREAM_TYPE:36,ADTS_STREAM_TYPE:15,METADATA_STREAM_TYPE:21},Wt=4294967296,Ft="shared",Nt=function(t,e){var i=1;for(t>e&&(i=-1);Math.abs(e-t)>Wt;)t+=8589934592*i;return t},zt=function t(e){var i,n;t.prototype.init.call(this),this.type_=e||Ft,this.push=function(t){this.type_!==Ft&&t.type!==this.type_||(void 0===t.dts&&void 0===t.pts||(void 0===n&&(n=t.dts),t.dts=Nt(t.dts,n),t.pts=Nt(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")}};zt.prototype=new J;var jt,Vt=zt,Yt=Wt,Ht=function(t,e,i){if(!t)return-1;for(var n=i;n<t.length;n++)if(t[n]===e)return n;return-1},Xt=0,qt=3,Kt=function(t,e,i){var n,a="";for(n=e;n<i;n++)a+="%"+("00"+t[n].toString(16)).slice(-2);return a},Zt=function(t,e,i){var n=decodeURIComponent(Kt(t,e,i));return"\\0"===n[n.length-1]&&(n=n.slice(0,-1)),n},$t=function(t,e,i){return unescape(Kt(t,e,i))},Jt=function(t){return t[0]<<21|t[1]<<14|t[2]<<7|t[3]},Qt=function(t){return t.data[0]===qt?Zt:t.data[0]===Xt?$t:void 0},te={APIC:function(t){var e,i,n=1;t.data[0]===qt&&((e=Ht(t.data,0,n))<0||(t.mimeType=$t(t.data,n,e),n=e+1,t.pictureType=t.data[n],n++,(i=Ht(t.data,0,n))<0||(t.description=Zt(t.data,n,i),n=i+1,"--\\x3e"===t.mimeType?t.url=$t(t.data,n,t.data.length):t.pictureData=t.data.subarray(n,t.data.length))))},"T*":function(t){var e=Qt(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=Qt(t);i&&-1!==(e=Ht(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=$t(t.data,0,t.data.length).replace(/\\0.*$/,"")},WXXX:function(t){var e;t.data[0]===qt&&-1!==(e=Ht(t.data,0,1))&&(t.description=Zt(t.data,1,e),t.url=$t(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=$t(t.data,0,e);break}t.privateData=t.data.subarray(e+1),t.data=t.privateData}},ee={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=Jt(t.subarray(6,10)),n+=10,64&t[5]&&(i+=4,i+=Jt(t.subarray(10,14)),n-=Jt(t.subarray(16,20)));do{if((e=Jt(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,te[r.id]?te[r.id](r):"T"===r.id[0]?te["T*"](r):"W"===r.id[0]&&te["W*"](r),a.push(r),i+=10,i+=e}while(i<n);return a}},parseSyncSafeInteger:Jt,frameParsers:te};(jt=function(t){var e,i={descriptor:t&&t.descriptor},n=0,a=[],r=0;if(jt.prototype.init.call(this),this.dispatchType=Gt.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=ee.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+=ee.parseSyncSafeInteger(e.data.subarray(10,14)),n-=ee.parseSyncSafeInteger(e.data.subarray(16,20)));do{if((s=ee.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,ee.frameParsers[o.id]?ee.frameParsers[o.id](o):"T"===o.id[0]?ee.frameParsers["T*"](o):"W"===o.id[0]&&ee.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 J;var ie,ne,ae,re,se=jt,oe=Yt,de=Vt,pe=188;(ne=function(){var t=new Uint8Array(pe),e=0;ne.prototype.init.call(this),this.push=function(i){var n,a=0,r=pe;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+=pe,r+=pe);a<n.byteLength&&(t.set(n.subarray(a),0),e=n.byteLength-a)},this.flush=function(){e===pe&&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 J,(ae=function(){var t,e,i,n;ae.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];[Gt.H264_STREAM_TYPE,Gt.H265_STREAM_TYPE].indexOf(r)>-1&&null===n.programMapTable.video?n.programMapTable.video={pid:s,streamType:r,codec:he[r]}:r===Gt.ADTS_STREAM_TYPE&&null===n.programMapTable.audio?n.programMapTable.audio={pid:s,streamType:r,codec:he[r]}:r===Gt.METADATA_STREAM_TYPE&&(n.programMapTable["timed-metadata"][s]=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 J,ae.STREAM_TYPES={h264:27,adts:15},(re=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}))}}};re.prototype.init.call(this),this.push=function(s){({pat:function(){},pes:function(){var t,e;switch(s.streamType){case Gt.H264_STREAM_TYPE:case Gt.H265_STREAM_TYPE:(t=n).codec=he[s.streamType],e="video";break;case Gt.ADTS_STREAM_TYPE:e="audio",(t=a).codec=he[s.streamType];break;case Gt.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)})),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>oe;)o.audio[0].dts=o.audio[0].pts=0;else if(!e&&t)for(;0<o.video.length&&o.video[0].dts>oe;)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 J;var he=((ie={})[Gt.H264_STREAM_TYPE]="avc",ie[Gt.H265_STREAM_TYPE]="hevc",ie[Gt.ADTS_STREAM_TYPE]="adts",ie),le={PAT_PID:0,MP2T_PACKET_LENGTH:pe,TransportPacketStream:ne,TransportParseStream
1:ae,ElementaryStream:re,TimestampRolloverStream:de,CaptionStream:Rt.CaptionStream,Cea608Stream:Rt.Cea608Stream,Cea708Stream:Rt.Cea708Stream,MetadataStream:se};for(var ce in Gt)Gt.hasOwnProperty(ce)&&(le[ce]=Gt[ce]);var ue,fe=le,ge=ht,me=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];(ue=function(t){var e,i=0;ue.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;if(t||(i=0),"audio"===n.type){var h;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 h&&(this.skipWarn_(h,p),h=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])))*ge/me[(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:me[(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 h&&(h=p),p++;"number"==typeof h&&(this.skipWarn_(h,p),h=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 J;var ye,_e,be,Se=ue,ve=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()},Te=[{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}],we=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)}},ke=function(t,e,i,n){for(var a=0;a<i;a++)t.skipUnsignedExpGolomb(),t.skipUnsignedExpGolomb(),n&&(t.skipUnsignedExpGolomb(),t.skipUnsignedExpGolomb()),t.skipBits(1)},Ce=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,
1i){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&&ke(t,0,p+1,n),r&&ke(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}},Pe=function(t){var e,i,n=new ve(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 g=n.readUnsignedExpGolomb(),m=n.readUnsignedExpGolomb();n.readBits(1)&&(s=n.readUnsignedExpGolomb(),o=n.readUnsignedExpGolomb(),d=n.readUnsignedExpGolomb(),p=n.readUnsignedExpGolomb());var y=n.readUnsignedExpGolomb(),_=n.readUnsignedExpGolomb(),b=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 S,v=n.readUnsignedExpGolomb();for(e=0;e<v;e++)we(n,e,a,v);if(n.readBits(1)){var T=n.readUnsignedExpGolomb();for(e=0;e<T;e++)n.skipBits(b+4),n.skipBits(1)}for(n.skipBits(2),n.readBits(1)&&(h=Ce(n,l).min_spatial_segmentation_idc),e=0;e<Te.length;e++){var w=Te[e];w.chroma_format_idc===f&&w.separate_colour_plane_flag===r&&(S=w)}return{width:g-S.SubWidthC*(o+s),height:m-S.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}};(_e=function(){var t,e,i=0;_e.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 J,be={100:!0,110:!0,122:!0,244:!0,44:!0,83:!0,86:!0,118:!0,128:!0,138:!0,139:!0,134:!0},(ye=function(){var t,e,i,n,a,r,s,o,d=new _e;ye.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",(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=Pe(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,g=0,m=0,y=0,_=[1,1];if(i=(e=new ve(t)).readUnsignedByte(),a=e.readUnsignedByte(),n=e.readUnsignedByte(),e.skipUnsignedExpGolomb(),be[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(),g=e.readUnsignedExpGolomb(),m=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*g,height:(2-l)*(h+1)*16-2*m-2*y,sarRatio:_}}}).prototype=new J;var Ee,Ae={H26XStream:ye,NalByteStream:_e},xe=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},Ue=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+=xe(e,i))},Me=function(t){var e=Ue(t,0);return t.length>=e+2&&!(255&~t[e])&&!(240&~t[e+1])&&16==(22&t[e+1])},Oe=xe,De=function(t,e){var i=(224&t[e+5])>>5,n=t[e+4]<<3;return 6144&t[e+3]|n|i};(Ee=function(){var t=new Uint8Array,e=0;Ee.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=De(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=Oe(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 J;var Ie,Le,Be,Re,Ge=Ee,We=["audioobjecttype","channelcount","samplerate","samplingfrequencyindex","samplesize","baseMediaDecodeTime","segmentDuration"],Fe=["width","height","sarRatio","baseMediaDecodeTime","segmentDuration"],Ne=Ae.H26XStream,ze=Me,je=ht,Ve=function(t,e){e.stream=t,this.trigger("log",e)},Ye=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",Ve.bind(t,a))}},He=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}
vendor: 5,562 bytes, line 1
1,Xe=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}};(Le=function(t,e){var i,n=[],a=0,r=1/0;i=(e=e||{}).firstSequenceNumber||0,Le.prototype.init.call(this),this.push=function(e){St(t,e),t&&We.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,l;0!==n.length?(t.baseMediaDecodeTime=bt(t,e.keepOriginalTimestamps),l=ft(t,n,a,r),t.samples=gt(n),o=N.mdat(mt(n)),s=N.moof(i,[t]),d=new Uint8Array(s.byteLength+o.byteLength),i++,d.set(s),d.set(o,s.byteLength),_t(t),p=Math.ceil(1024*je/t.samplerate),n.length&&(h=n.length*p,this.trigger("segmentTimingInfo",Xe(lt(t.baseMediaDecodeTime,t.samplerate),n[0].dts,n[0].pts,n[0].dts+h,n[0].pts+h,l||0)),this.trigger("timingInfo",{start:n[0].pts,end:n[0].pts+h})),n=[],this.trigger("data",{track:t,boxes:d}),this.trigger("done","AudioSegmentStream")):this.trigger("done","AudioSegmentStream")},this.reset=function(){_t(t),n=[],this.trigger("reset")}}).prototype=new J,(Ie=function(t,e){var i,n,a,r,s=[],o=[];i=(e=e||{}).firstSequenceNumber||0,Ie.prototype.init.call(this),delete t.minPTS,this.gopCache_=[],this.push=function(e){St(t,e),"seq_parameter_set_rbsp"!==e.nalUnitType||n||(n=e.config,t.sps=[e.data],t.parsedSps=n,Fe.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=tt(s),(r=et(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=it(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");_t(t),r=f}St(t,r),t.samples=nt(r),p=N.mdat(at(r)),t.baseMediaDecodeTime=bt(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",Xe(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=N.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(){_t(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&&He(t.pps[0],s.pps[0])&&t.sps&&s.sps&&He(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 J,(Re=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,Re.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 J,Re.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,Fe.forEach((function(t){s.info[t]=this.videoTrack[t]}),this),s.info.codec=this.videoTrack.codec,s.info.sps=this.videoTrack.parsedSps?z({},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,We.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=N.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=ut(e.startPts+d,o,this.keepOriginalTimestamps),e.endTime=ut(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=ut(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)},Re.prototype.setRemux=function(t){this.remuxTracks=t},(Be=function(t){var e,i,n=this;Be.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 fe.MetadataStream,a.aacStream=new Ge,a.audioTimestampRolloverStream=new fe.TimestampRolloverStream("audio"),a.timedMetadataTimestampRolloverStream=new fe.TimestampRolloverStream("timed-metadata"),a.adtsStream=new Se,a.coalesceStream=new Re(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 Le(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")),Ye(this,a),a},this.setupTsPipeline=function(){var a={};return this.tsTransmuxPipeline=a,a.type="ts",a.hasFlushed=!0,a.metadataStream=new fe.MetadataStream,a.packetStream=new fe.TransportPacketStream,a.parseStream=new fe.TransportParseStream,a.elementaryStream=new fe.ElementaryStream,a.timestampRolloverStream=new fe.TimestampRolloverStream,a.adtsStream=new Se,a.h26xStream=new Ne,a.captionStream=new fe.CaptionStream(t),a.coalesceStream=new Re(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.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 Ie(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 Le(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")),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")),Ye(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),_t(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),_t(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;ze(t)?(this.aacTransmuxPipeline=this.aacTransmuxPipeline||this.setupAacPipeline(),e=this.aacTransmuxPipeline):(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].filter((function(t){return Boolean(t)}))}}).prototype=new J;var qe={Transmuxer:Be,VideoSegmentStream:Ie,AudioSegmentStream:Le,AUDIO_PROPERTIES:We,VIDEO_PROPERTIES:Fe,CaptionStream:fe.CaptionStream,generateSegmentTimingInfo:Xe};return{generator:N,Transmuxer:qe.Transmuxer,AudioSegmentStream:qe.AudioSegmentStream,VideoSegmentStream:qe.VideoSegmentStream,CaptionStream:qe.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)}();',i.p+"6adf5b0325225f0a1fe4.worker.js")}},21332:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ContainerTsModuleDefinition=void 0;var n=i(62756),r=i(67889);t.ContainerTsModuleDefinition={name:n.ModuleName.ContainerTS,module:function(){return{WebWorkerTransmuxer:i(77869).WebWorkerTransmuxer,TransmuxerWorker:r.TransmuxerWorkerClass}}},t.default=t.ContainerTsModuleDefinition},67889:function(e,t,i){"use strict";
vendor: 11,495 bytes, line 1
1Object.defineProperty(t,"__esModule",{value:!0}),t.TransmuxerWorkerClass=void 0,t.TransmuxerWorkerClass=i(72387)},77869:function(e,t,i){"use strict";var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])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=I;var r=i(66790),o=i(40306),a=i(3336),s=i(80813),u=i(15971),c=i(74853),l=i(34047),d=i(34841),h=i(70233),p=i(85434),f=i(88052),g=i(62756),m=i(87187),y=i(67889),v=9e4,S=95443.7176888889;function b(e,t){var i=t.getTimescale();if(void 0===i)return NaN;var n=e&&e.segment.info,r=n&&n.segmentDuration>0?n.segmentDuration/i:t.getDuration();return t.getBaseMediaDecodeTime()/i+r}function E(e,t){for(var i=[],n=0;n<t;n++)i.push(e>>>n&1);return parseInt(i.join(""),2)}t.WebWorkerTransmuxer=function(){function e(t,i){var n=this;this.Ax=[],this.Ex={},this.Fx={},this.Ix=!1,this.Kx=function(){n.resetCaptionParser()},this.Rx=function(t){t.data=e.makeSegmentSelfInitializing(t.initSegment,t.data);var i={id3:e.getId3Metadata(t),closedCaptions:t.captions};n.Dx.push({segment:t,metadata:i})},this.Yx=function(e){var t,i=n.Ax.shift();if(i){if(i.mp2tsSegment.setData(e),n.yx.logger.debug("Transmuxed",i.mp2tsSegment.getUrl()),n.Dx.length<1||0===Object.keys(n.Dx[0].segment.info).length)return i.rejectFn(r.TransmuxingRejectionReason.INVALID_TS_SEGMENT),void n.Xx();if(i.mp2tsSegment.getSegmentInfo().discardData||i.discard)n.Xx();else{n.Zx(i),n.Dx.sort(function(e,t){return e.segment.info.trackId-t.segment.info.trackId});var o=n.Dx.map(function(e){return e.metadata}),a=null==(t=n.yx.config.tweaks)?void 0:t.parse_cea_708_caption;o.forEach(function(e){e.closedCaptions=e.closedCaptions.filter(function(e){return a?e.channel.includes("708"):!e.channel.includes("708")})});var s=n.Ux(n.Dx,i.mp2tsSegment);n.Ix&&s.length>1&&(n.yx.logger.debug("Discarding muxed audio from video segment since there is a separate audio playlist."),s=s.filter(function(e){var t=e[0];return e[1],p.MimeTypeHelper.isVideo(t.getMimeType())})),s.forEach(function(e){var t,i=e[0],r=e[1];p.MimeTypeHelper.isAudio(i.getMimeType())&&(null==(t=n.Bx)||t.postMessage({action:"setAudioAppendStart",appendStart:b(r,i),trackId:r.segment.info.trackId}))}),i.resolveFn({originalSegment:i.mp2tsSegment,transmuxedSegments:s.map(function(e){var t=e[0];return e[1],t}),metadata:o}),n.Xx()}}},this.hx=function(t){if("done"!==t.data.action||"transmuxing"===t.data.what){var i=n.Cx[t.data.action];for(var r in i)if(i.hasOwnProperty(r))if("data"===t.data.action){var o=e.postProcessSegment(t.data.segment);i[r].call(n.Bx,o)}else"done"===t.data.action&&i[r].call(n.Bx,t.data.originalSegment)}},this.yx=t,this.zx=!1,this.Ix=i;try{this.Bx=new y.TransmuxerWorkerClass,this.Bx&&(this.Bx.onmessage=this.hx)}catch(e){this.yx.eventHandler.fireError(new a.PlayerError(o.ErrorCode.PLAYBACK_HLS_COULD_NOT_LOAD_TRANSMUXER,{error:e},"There was an error during the transmuxer initialization.",this.yx.sourceContext.sourceIdentifier))}this.Cx={},this.Dx=[],this.gx("data",this.Rx),this.gx("done",this.Yx)}return e.prototype.setShouldExpectSeparateAvSegments=function(e){this.Ix=e},e.prototype.waitForInitializationForDiscontinuity=function(e){return this.ax(e).promise},e.prototype.isSetupForDiscontinuity=function(e){return this.Hx===e},e.prototype.transmuxSegment=function(e){var t=this;return this.Jx(e).then(function(){return t.Ox(e)})},e.prototype.Jx=function(e){var t,i,n=e.getSegmentInfo().discontinuitySequenceNumber;if(null==n||null==e.getCodec()||p.MimeTypeHelper.isVideo(e.getMimeType())||!this.Ix||this.isSetupForDiscontinuity(n))return Promise.resolve();var r=null==(t=(0,u.getSourceState)(this.yx))?void 0:t.hls,o=Object.keys(null!=(i=null==r?void 0:r.discontinuitySequenceTiming)?i:{}).filter(function(e){return p.MimeTypeHelper.isAV(e)}),a=f.ModuleManager.get(g.ModuleName.HLS).selectors.areDiscontinuitiesMisaligned;return r&&a(r,o,e.getDuration())?(this.yx.logger.debug("[Transmuxer] Skipping delayed transmuxer initialization for disco ".concat(n," as discontinuities are misaligned")),Promise.resolve()):(this.yx.logger.debug("[Transmuxer] Awaiting video segment to complete initialization for discontinuity ".concat(n)),this.waitForInitializationForDiscontinuity(n))},e.prototype.Lx=function(){var e=f.ModuleManager.get(g.ModuleName.HLS);this.Gx=new e.DiscontinuitySequenceNumberTracker(p.MimeTypeHelper.isVideo),this.Gx.subscribe(this.Kx)},e.prototype.Mx=function(e){this.Gx||this.Lx(),this.Gx.trackSegment(e)},e.prototype.Nx=function(){var e=this.yx.sourceContext.sourceIdentifier,t=!1;return this.yx.serviceManager.maybeCall(s.ServiceName.ManifestService,function(e){t=!!(e.getManifest()&&e.isHlsManifest()&&f.ModuleManager.has(g.ModuleName.HLS))},null,e),t},e.prototype.Ox=function(e){var t=this;return new Promise(function(i,n){var r={resolveFn:i,rejectFn:n,mp2tsSegment:e,discard:!1};t.Ax.push(r),t.zx||(t.zx=!0,t.Qx(r))})},e.prototype.Px=function(e){return!(!p.MimeTypeHelper.isAudio(e.getMimeType())||this.Ix)&&I(e.getData())},e.prototype.Qx=function(e){this.yx.logger.debug("Transmuxing "+e.mp2tsSegment.getUrl()),this.Nx()&&this.Mx(e.mp2tsSegment);var t=e.mp2tsSegment.getSegmentInfo(),i=this.Px(e.mp2tsSegment),n=t.discontinuitySequenceNumber;if((i||!this.isSetupForDiscontinuity(n))&&null!=t.startTime){var r=t.startTime;i?this.yx.logger.debug("[Transmuxer] Applying startTime offset to raw AAC, BMDT: ".concat(r," (").concat(r*v,")")):this.yx.logger.debug("[Transmuxer] Initializing disco ".concat(n,", BMDT: ").concat(r," (").concat(r*v,")")),this.Hx=n,this.dx(r)}this.ex(e.mp2tsSegment.getData()),this.fx()},e.makeSegmentSelfInitializing=function(e,t){return c.ArrayHelper.append(e,t)},e.prototype.Sx=function(e){return e.sps?!function(e){return"avc"===e.codec}(e)?!function(e){return"hevc"===e.codec}(e)?null:(0,l.assembleHvcCodecString)("hvc1",n(n({},e.sps),{general_profile_compatibility_flags:E(e.sps.general_profile_compatibility_flags,32)})):"avc1.".concat(h.FormatHelper.intToHex(e.sps.profileIdc)).concat(h.FormatHelper.intToHex(e.sps.profileCompatibility)).concat(h.FormatHelper.intToHex(e.sps.levelIdc)):null},e.prototype.Tx=function(e){return"mp4a.40."+e.audioobjecttype},e.prototype.Ux=function(e,t){var i=this;return e.map(function(e){i.yx.logger.debug("Got transmuxed "+e.segment.type,t.getUrl());var r,o=e.segment.type,a=e.segment.info,s="video"===o?v:a.samplerate,u=t.getSegmentInfo().presentationTimeOffset;r="video"===o?i.Sx(a):i.Tx(a),i.Vx(e,t);var c=new m.Segment(e.segment.data.buffer,o+"/mp4",r,t.getPeriodId(),t.getDuration(),m.SegmentInitType.SELF_INIT,e.segment.info.startsWithKeyframe,t.getNetworkRequestSize(),t.getRepresentationId());return c.setTimescale(s),c.setUrl(t.getUrl()),c.setSegmentInfo(n(n({},t.getSegmentInfo()),{mimeType:c.getMimeType()})),c.setBaseMediaDecodeTime(a.baseMediaDecodeTime),void 0!==u?(c.setPresentationTimeOffset(u),c.setPlaybackTime(a.baseMediaDecodeTime/s-u)):c.setPlaybackTime(NaN),c.setDuration(i.Wx(a,s,t.getDuration())),[c,e]})},e.prototype.Vx=function(e,t){var i=this.yx.serviceManager.get(s.ServiceName.SourceStoreService,this.yx.sourceContext.sourceIdentifier),n=f.ModuleManager.get(g.ModuleName.HLS,!1);if(i&&n){var r=e.segment.info.timelineStartInfo.minSegmentPts%0x200000000,o=t.getPlaybackTime()-r/v,a=o+95443.7176888889;i.dispatch(n.actions.setTimestampRolloverPositions(a,o))}},e.prototype.Wx=function(e,t,i){var n=e.segmentDuration/t;if(n){var r=Math.abs(i-n);return r>.1&&this.yx.logger.debug("Segment duration is off by ".concat(r,", corrected from ").concat(i," to ").concat(n)),n}return i},e.prototype.Xx=function(){if(this.Dx=[],this.Ax.length>0){var e=this.Ax[0];this.Qx(e)}else this.zx=!1},e.prototype.Zx=function(e){var t=e.mp2tsSegment.getSegmentInfo().discontinuitySequenceNumber;if(void 0!==t){if(void 0===this.Ex[t]){var i=this.Dx[0].segment.info.timelineStartInfo;this.Ex[t]=(i.baseMediaDecodeTime-i.pts)/v}this.bx(t),this.bx(-1),this.cx(function(e){return e<t})}},e.prototype.ax=function(e){return this.Fx[e]||(this.Fx[e]=new d.Deferred),this.Fx[e]},e.prototype.bx=function(e){void 0!==e&&this.ax(e).resolve()},e.prototype.cx=function(e){var t=this;void 0===e&&(e=function(){return!0}),Object.entries(this.Fx).forEach(function(i){var n=i[0],o=i[1];!o.hasSettled&&e(Number(n))&&(t.yx.logger.debug("[Transmuxer] Rejecting unresolved disco initialization ".concat(n)),o.reject(r.TransmuxingRejectionReason.TRANSMUXING_ABORTED),delete t.Fx[Number(n)])})},e.prototype.getTimestampMappingOffset=function(e){var t,i=null==(t=e.getSegmentInfo())?void 0:t.discontinuitySequenceNumber,n=this.Ex[i];if(void 0!==i&&void 0!==n)return n+Math.floor((e.getPlaybackTime()-n)/S)*S},e.prototype.discardCurrentJobs=function(e){return p.MimeTypeHelper.isVideo(e)&&(this.cx(),this.Fx={}),this.isTransmuxing()?this.Ax.filter(function(t){return t.mp2tsSegment.getMimeType()===e}).map(function(e){return e.discard=!0,{mp2tsSegment:e.mp2tsSegment}}):[]},e.prototype.dx=function(e){var t;null==(t=this.Bx)||t.postMessage({action:"setTimestampOffset",offset:e})},e.prototype.ex=function(e){var t;null==(t=this.Bx)||t.postMessage({action:"push",data:e},[e])},e.prototype.fx=function(){var e;null==(e=this.Bx)||e.postMessage({action:"flush"})},e.prototype.resetCaptionParser=function(){var e;this.yx.logger.debug("Resetting caption parser..."),null==(e=this.Bx)||e.postMessage({action:"resetCaptions"})},e.prototype.hasActiveJobs=function(){return this.zx&&this.Ax.some(function(e){return!1===e.discard})},e.prototype.hasDelayedAudioSegments=function(){return Object.values(this.Fx).some(function(e){return!e.hasSettled})},e.prototype.isTransmuxing=function(){return this.zx},e.prototype.isTransmuxingSegmentsForPeriod=function(e){return this.Ax.some(function(t){return e===t.mp2tsSegment.getPeriodId()})},e.prototype.reset=function(){this.yx.logger.debug("Resetting transmuxer..."),this.Hx=void 0,this.Gx&&this.Gx.reset()},e.prototype.dispose=function(){var e;this.Bx&&(this.Cx={},this.Ax=[],this.Dx=[],this.Bx.postMessage({action:"dispose"}),this.Bx.terminate(),this.Bx=null),this.reset(),this.cx(),null==(e=this.Gx)||e.dispose(),this.Fx={},this.Ex={}},e.prototype.gx=function(e,t){this.Cx.hasOwnProperty(e)||(this.Cx[e]=[]),this.Cx[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=c.ArrayHelper.getArray(t.data)),t}},e.getId3Metadata=function(t){if(!t.hasOwnProperty("metadata")||!Array.isArray(t.metadata))return[];for(var i=[],n=0;n<t.metadata.length;n++){for(var r={frames:[]},o=0;o<t.metadata[n].frames.length;o++){var a=e.getId3Frame(t.metadata[n].frames[o]);a&&(r.frames.push(a),r[a.key]=a.data)}i.push({presentationTime:t.metadata[n].cueTime,data:r})}return i},e.postProcessSegment=function(e){if(e)return e.data=new Uint8Array(e.data),e},e}();var T=4,_=[73,68,51],A=255,P=240,M=240;function I(e){var t=new Uint8Array(e);return!(t.length<T||t[0]===_[0]&&t[1]===_[1]&&t[2]===_[2]||t[0]!==A||(t[1]&P)!==M)}}},function(e){return e(e.s=21332)}])},304:function(e){"use strict";self,e.exports=(self.webpackChunkbitmovin_player=self.webpackChunkbitmovin_player||[]).push([[234],{55585:function(e,t){var i;
1Object.defineProperty(t,"__esModule",{value:!0}),t.EBMLID=void 0,function(e){e[e.Void=236]="Void",e[e.EBMLElement=0x1a45dfa3]="EBMLElement",e[e.EBMLVersion=17030]="EBMLVersion",e[e.EBMLReadVersion=17143]="EBMLReadVersion",e[e.EBMLMaxIDLength=17138]="EBMLMaxIDLength",e[e.EBMLMaxSizeLength=17139]="EBMLMaxSizeLength",e[e.DocType=17026]="DocType",e[e.DocTypeVersion=17031]="DocTypeVersion",e[e.DocTypeReadVersion=17029]="DocTypeReadVersion",e[e.Segment=0x18538067]="Segment",e[e.SeekHead=0x114d9b74]="SeekHead",e[e.Seek=19899]="Seek",e[e.SeekID=21419]="SeekID",e[e.SeekPosition=21420]="SeekPosition",e[e.Info=0x1549a966]="Info",e[e.TimecodeScale=2807729]="TimecodeScale",e[e.TimecodeScaleDenominator=2807730]="TimecodeScaleDenominator",e[e.Duration=17545]="Duration",e[e.DateUTC=17505]="DateUTC",e[e.Title=31657]="Title",e[e.MuxingApp=19840]="MuxingApp",e[e.WritingApp=22337]="WritingApp",e[e.Cluster=0x1f43b675]="Cluster",e[e.Timecode=231]="Timecode",e[e.PrevSize=171]="PrevSize",e[e.SimpleBlock=163]="SimpleBlock",e[e.BlockGroup=160]="BlockGroup",e[e.Block=161]="Block",e[e.BlockVirtual=162]="BlockVirtual",e[e.BlockAdditions=30113]="BlockAdditions",e[e.BlockMore=166]="BlockMore",e[e.BlockAddID=238]="BlockAddID",e[e.BlockAdditional=165]="BlockAdditional",e[e.BlockDuration=155]="BlockDuration",e[e.ReferenceBlock=251]="ReferenceBlock",e[e.DiscardPadding=30114]="DiscardPadding",e[e.TimeSlice=232]="TimeSlice",e[e.LaceNumber=204]="LaceNumber",e[e.Tracks=0x1654ae6b]="Tracks",e[e.TrackEntry=174]="TrackEntry",e[e.TrackNumber=215]="TrackNumber",e[e.TrackUID=29637]="TrackUID",e[e.TrackType=131]="TrackType",e[e.FlagEnabled=185]="FlagEnabled",e[e.FlagDefault=136]="FlagDefault",e[e.FlagForced=21930]="FlagForced",e[e.FlagLacing=156]="FlagLacing",e[e.DefaultDuration=2352003]="DefaultDuration",e[e.Name=21358]="Name",e[e.Language=2274716]="Language",e[e.CodecID=134]="CodecID",e[e.CodecPrivate=25506]="CodecPrivate",e[e.CodecName=2459272]="CodecName",e[e.CodecDelay=22186]="CodecDelay",e[e.SeekPreRoll=22203]="SeekPreRoll",e[e.Video=224]="Video",e[e.FlagInterlaced=154]="FlagInterlaced",e[e.StereoMode=21432]="StereoMode",e[e.AlphaMode=21440]="AlphaMode",e[e.PixelWidth=176]="PixelWidth",e[e.PixelHeight=186]="PixelHeight",e[e.PixelCropBottom=21674]="PixelCropBottom",e[e.PixelCropTop=21691]="PixelCropTop",e[e.PixelCropLeft=21708]="PixelCropLeft",e[e.PixelCropRight=21725]="PixelCropRight",e[e.DisplayWidth=21680]="DisplayWidth",e[e.DisplayHeight=21690]="DisplayHeight",e[e.DisplayUnit=21682]="DisplayUnit",e[e.AspectRatioType=21683]="AspectRatioType",e[e.FrameRate=2327523]="FrameRate",e[e.Audio=225]="Audio",e[e.SamplingFrequency=181]="SamplingFrequency",e[e.OutputSamplingFrequency=30901]="OutputSamplingFrequency",e[e.Channels=159]="Channels",e[e.BitDepth=25188]="BitDepth",e[e.ContentEncodings=28032]="ContentEncodings",e[e.ContentEncoding=25152]="ContentEncoding",e[e.ContentEncodingOrder=20529]="ContentEncodingOrder",e[e.ContentEncodingScope=20530]="ContentEncodingScope",e[e.ContentEncodingType=20531]="ContentEncodingType",e[e.ContentEncryption=20533]="ContentEncryption",e[e.ContentEncAlgo=18401]="ContentEncAlgo",e[e.ContentEncKeyID=18402]="ContentEncKeyID",e[e.ContentEncAESSettings=18407]="ContentEncAESSettings",e[e.AESSettingsCipherMode=18408]="AESSettingsCipherMode",e[e.Cues=0x1c53bb6b]="Cues",e[e.CuePoint=187]="CuePoint",e[e.CueTime=179]="CueTime",e[e.CueTrackPositions=183]="CueTrackPositions",e[e.CueTrack=247]="CueTrack",e[e.CueClusterPosition=241]="CueClusterPosition",e[e.CueRelativePosition=240]="CueRelativePosition",e[e.CueDuration=178]="CueDuration",e[e.CueBlockNumber=21368]="CueBlockNumber"}(i||(t.EBMLID=i={}))},43154:function(e,t,i){var n=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(t,i)};return function(t,i){if("function"!=typeof i&&null!==i)throw TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();
vendor: 28,400 bytes, line 1
1Object.defineProperty(t,"__esModule",{value:!0}),t.VoidElement=t.GenericEbmlElement=t.PrimitiveEbmlElement=t.EbmlElement=void 0,t.writeSizedBytes=s,t.writeCodedInt=u,t.writeSizedInt=function(e,t){return s(e,t).buffer},t.writeInt=function(e){var t=l(e);return r.ArrayHelper.concatBuffers(u(t),s(e,t).buffer)},t.writeEbmlId=c,t.numberLength=l,t.writeString=function(e){return r.ArrayHelper.concatBuffers(u(e.length),r.ArrayHelper.stringToArrayWithoutEncoding(e).buffer)};var r=i(74853),o=i(55585),a=function(){function e(e,t){this.id=e,this.parser=t,this.orderedElementList=[]}return e.prototype.encodeData=function(){return r.ArrayHelper.concatBuffers.apply(r.ArrayHelper,this.orderedElementList.map(function(e){return e.writeElement()}))},e.prototype.writeElement=function(e){void 0===e&&(e=this.id);var t=this.encodeData(),i=c(e),n=this.parser&&t.byteLength<=this.parser.originalSize?u(t.byteLength,this.parser.originalSizeLength):u(t.byteLength);return r.ArrayHelper.concatBuffers(i,n,t)},e}();function s(e,t){for(var i=new Uint8Array(t),n=t-1;n>=0;n--){var r=255&e;i[n]=r,e=(e-r)/256}return i}function u(e,t){void 0===t&&(t=l(e,7));var i=s(e,t);return i[0]|=1<<8-t,i.buffer}function c(e){return s(e,l(e,8,4)).buffer}function l(e,t,i){void 0===t&&(t=8),void 0===i&&(i=8);for(var n=1;n<=i&&!(e<Math.pow(2,t*n)-1);n+=1);return n}t.EbmlElement=a,t.PrimitiveEbmlElement=function(e){function t(t,i){var n=e.call(this,t,null)||this;return n.data=i,n}return n(t,e),t.prototype.encodeData=function(){return this.data},t.prototype.writeElement=function(e){return void 0===e&&(e=this.id),r.ArrayHelper.concatBuffers(c(e),this.data)},t}(a),t.GenericEbmlElement=function(e){function t(t,i){var n=e.call(this,i,t)||this;return n.parser=t,n}return n(t,e),t.prototype.encodeData=function(){return this.parser.getRawElementData()},t}(a),t.VoidElement=function(e){function t(t){var i=e.call(this,o.EBMLID.Void,null)||this;return i.totalSize=t,i}return n(t,e),t.prototype.writeElement=function(){var e=c(o.EBMLID.Void),t=l(this.totalSize,8),i=this.totalSize-e.byteLength-t;return r.ArrayHelper.concatBuffers(e,u(i,t),new Uint8Array(i).buffer)},t}(a)},7612:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.ContainerWebmModuleDefinition=void 0;var n=i(62756),r=i(86716),o=i(94124),a=i(44219),s=i(35931);t.ContainerWebmModuleDefinition={name:n.ModuleName.ContainerWebM,module:{WebMParser:a.WebMParser,WebMSegmentIndex:s.WebMSegmentIndex,WebMInitFile:o.WebMInitFile,WebMDecrypter:r.WebMDecrypter}},t.default=t.ContainerWebmModuleDefinition},86716:function(e,t,i){var n=this&&this.__spreadArray||function(e,t,i){if(i||2==arguments.length)for(var n,r=0,o=t.length;r<o;r++)!n&&r in t||(n||(n=Array.prototype.slice.call(t,0,r)),n[r]=t[r]);return e.concat(n||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.WebMDecrypter=void 0;var r=i(74853),o=i(70233),a=i(88052),s=i(62756),u=i(94124),c=i(505);function l(e,t){var i=e.shift();return void 0===i?Promise.resolve():t(i).then(function(){return l(e,t)})}function d(e,t){return l(e.slice(0),t)}t.WebMDecrypter=function(){function e(e,t,i){this.context=e,this.keys=t,this.mimeType=i}return e.prototype.kx=function(e,t){return t.decrypt(e.encryptedData).then(function(t){e.decryptedData=t})},e.prototype.lx=function(e){var t=this,i=this.getKey();if(!i)return this.context.logger.debug("Error decrypting sample! Missing key!"),Promise.reject();var n=e.samples.filter(c.isEncryptedSample);if(n.length<1)return Promise.resolve();var r=n[0].initialVector,o=new(0,a.ModuleManager.get(s.ModuleName.Crypto).CryptoApi)(this.context,this.jx,i,r,this.mimeType);return d(n,function(e){return t.kx(e,o)})},e.prototype.parseInitSegment=function(e){var t=new u.WebMInitFile(e),i=function(e){var t,i,n;return null==(n=null==(i=null==(t=e.segment)?void 0:t.track)?void 0:i.trackEntries)?void 0:n.flatMap(function(e){var t;return null==(t=null==e?void 0:e.contentEncodings)?void 0:t.encodings}).map(function(e){return null==e?void 0:e.encryption}).find(Boolean)}(t);return i?(this.ix=o.FormatHelper.bytesToHex(i.keyId),this.jx=function(e){var t,i;switch(null==(t=e.aesSettings)?void 0:t.cipherMode){case u.CipherMode.AES_CBC:return"AES-CBC";case u.CipherMode.AES_CTR:return"AES-CTR";default:throw Error("unknown cipher mode: ".concat(String(null==(i=e.aesSettings)?void 0:i.cipherMode)))}}(i),Promise.resolve(t.writeSegment())):Promise.resolve(e)},e.prototype.decryptDataSegment=function(e){var t=this,i=new c.WebMSegmentFile(e);return d(function(e){return e.clusters.flatMap(function(e){return n(n([],e.blocks,!0),e.blockGroups.map(function(e){return e.block}),!0)}).filter(function(e){return e.encrypted})}(i),function(e){return t.lx(e)}).then(function(){return i.writeSegment()})},e.prototype.getKey=function(){var e=this,t=this.keys.find(function(t){return t.kid===e.ix});return t||(t=this.keys[0])?o.FormatHelper.hexToBytes(t.key).buffer:void 0},e.prototype.getKeyIds=function(){return[r.ArrayHelper.arrayBufferToAsciiString(o.FormatHelper.hexToBytes(this.ix).buffer,!0)]},e.prototype.addKeys=function(e){var t=this;e.forEach(function(e){var i=t.keys.find(function(t){return t.kid===e.kid});i?i.key=e.key:t.keys.push(e)})},e.prototype.isEncrypted=function(){return!!this.jx},e}()},23164:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.WebMElemParser=void 0;var n=i(43154);t.WebMElemParser=function(){function e(e,t,i,r){void 0===t&&(t=e.byteLength),void 0===i&&(i=t),void 0===r&&(r=(0,n.numberLength)(i)),this.dataView=e,this.size=t,this.originalSize=i,this.originalSizeLength=r,this.xW=0}return e.prototype.atEos=function(){return this.xW>=this.size},e.prototype.readId=function(){return this.readCodedInt()},e.prototype.readSubElement=function(){var t=this.readCodedIntAndLength(!0),i=t.value,n=t.length,r=Math.min(i,this.size-this.xW),o=new DataView(this.dataView.buffer,this.dataView.byteOffset+this.xW,r),a=new e(o,o.byteLength,i,n);return this.xW+=r,a},e.prototype.readInt=function(){var e=this.readCodedInt(!0);return this.readSizedInt(e)},e.prototype.readFloat=function(){var e=this.readCodedInt(!0);return this.readSizedFloat(e)},e.prototype.skipElement=function(){var e=this.readCodedInt(!0);0x100000000000000!==e&&(this.xW+=e)},e.prototype.readCodedIntAndLength=function(e){void 0===e&&(e=!1);var t=this.xW;return{value:this.readCodedInt(e),length:this.xW-t}},e.prototype.readCodedInt=function(e){if(void 0===e&&(e=!1),this.atEos())return 0;var t=this.readByte();if(1===t){t=0;for(var i=0;i<7;i++)t=256*t+this.readByte();return t}var n=128;for(i=0;i<6&&n>t;i++)t=256*t+this.readByte(),n*=128;return e?t-n:t},e.prototype.readUTF8=function(){var e=new DataView(this.readArrayBuffer());if("undefined"!=typeof TextDecoder)return new TextDecoder("utf-8").decode(e);for(var t="",i=0;i<e.byteLength;i++)t+=String.fromCharCode(e.getUint8(i));return t},e.prototype.readArrayBuffer=function(e){void 0===e&&(e=this.readCodedInt(!0));var t=this.dataView.buffer.slice(this.dataView.byteOffset+this.xW,this.dataView.byteOffset+this.xW+e);return this.xW+=e,t},e.prototype.readString=function(){for(var e=this.readCodedInt(!0),t="",i=0;i<e;i++)t+=String.fromCharCode(this.readByte());return t},e.prototype.readSizedInt=function(e){for(var t=this.readByte(),i=1;i<e;i++)t=(t<<8)+this.readByte();return t},e.prototype.readSizedFloat=function(e){var t=0;return 4===e?t=this.dataView.getFloat32(this.xW):8===e&&(t=this.dataView.getFloat64(this.xW)),this.xW+=e,t},e.prototype.readByte=function(){return this.dataView.getUint8(this.xW++)},e.prototype.readRest=function(){return this.readArrayBuffer(this.size-this.xW)},e.prototype.getRawElementData=function(){return this.dataView.buffer.slice(this.dataView.byteOffset,this.dataView.byteOffset+this.dataView.byteLength)},e}()},94124:function(e,t,i){var n=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(t,i)};return function(t,i){if("function"!=typeof i&&null!==i)throw TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.ContentEncryption=t.WebMInitFile=t.CipherMode=t.EncryptionAlgorithm=void 0;var r,o,a,s=i(74853),u=i(55585),c=i(43154),l=i(23164);!function(e){e[e.NotEncrypted=0]="NotEncrypted",e[e.DES=1]="DES",e[e.TripleDES=2]="TripleDES",e[e.Twofish=3]="Twofish",e[e.Blowfish=4]="Blowfish",e[e.AES=5]="AES"}(r||(t.EncryptionAlgorithm=r={})),function(e){e[e.AES_CTR=1]="AES_CTR",e[e.AES_CBC=2]="AES_CBC"}(o||(t.CipherMode=o={})),function(e){e[e.Compression=0]="Compression",e[e.Encryption=1]="Encryption"}(a||(a={})),t.WebMInitFile=function(){function e(e){this.mx=[];for(var t=new l.WebMElemParser(new DataView(e));!t.atEos();){var i=t.readId();switch(i){case u.EBMLID.EBMLElement:this.ebmlHeader=new h(t.readSubElement()),this.mx.push(this.ebmlHeader);break;case u.EBMLID.Segment:this.segment=new p(t.readSubElement()),this.mx.push(this.segment);break;case u.EBMLID.Void:default:var n=new c.GenericEbmlElement(t.readSubElement(),i);this.mx.push(n)}}}return e.prototype.writeSegment=function(){return s.ArrayHelper.concatBuffers.apply(s.ArrayHelper,this.mx.map(function(e){return e.writeElement()}))},e}();var d=function(e){for(;!e.atEos();)switch(e.readId()){case u.EBMLID.ContentEncAlgo:this.algorithm=e.readInt();break;case u.EBMLID.ContentEncKeyID:this.keyId=e.readArrayBuffer();break;case u.EBMLID.ContentEncAESSettings:this.aesSettings=new T(e.readSubElement());break;case u.EBMLID.Void:default:e.skipElement()}};t.ContentEncryption=d;var h=function(e){function t(t){var i=e.call(this,u.EBMLID.EBMLElement,t)||this;for(i.parser=t,i.ebmlVersion=1,i.ebmlReadVersion=1,i.ebmlMaxIDLength=4,i.ebmlMaxSizeLength=0,i.docType="matroska",i.docTypeVersion=1,i.docTypeReadVersion=1;!t.atEos();)switch(t.readId()){case u.EBMLID.EBMLVersion:i.ebmlVersion=t.readInt();break;case u.EBMLID.EBMLReadVersion:i.ebmlReadVersion=t.readInt();break;case u.EBMLID.EBMLMaxIDLength:i.ebmlMaxIDLength=t.readInt();break;case u.EBMLID.EBMLMaxSizeLength:i.ebmlMaxSizeLength=t.readInt();break;case u.EBMLID.DocType:i.docType=t.readString();break;case u.EBMLID.DocTypeVersion:i.docTypeVersion=t.readInt();break;case u.EBMLID.DocTypeReadVersion:i.docTypeReadVersion=t.readInt();break;case u.EBMLID.Void:default:t.skipElement()}return i}return n(t,e),t.prototype.encodeData=function(){return this.parser.getRawElementData()},t}(c.EbmlElement),p=function(e){function t(t){var i=e.call(this,u.EBMLID.Segment,t)||this;for(i.parser=t;!t.atEos();){var n=t.readId();switch(n){case u.EBMLID.SeekHead:i.metaSeekInfo=new f(t.readSubElement()),i.orderedElementList.push(i.metaSeekInfo);break;case u.EBMLID.Info:i.segmentInfo=new m(t.readSubElement()),i.orderedElementList.push(i.segmentInfo);break;case u.EBMLID.Tracks:i.track=new y(t.readSubElement()),i.orderedElementList.push(i.track);break;case u.EBMLID.Void:default:var r=new c.GenericEbmlElement(t.readSubElement(),n);i.orderedElementList.push(r)}}return i}return n(t,e),t.prototype.writeElement=function(e){void 0===e&&(e=this.id);var t=this.encodeData(),i=(0,c.writeEbmlId)(e),n=(0,c.writeCodedInt)(this.parser.originalSize,this.parser.originalSizeLength);return s.ArrayHelper.concatBuffers(i,n,t)},t}(c.EbmlElement),f=function(e){function t(t){var i=e.call(this,u.EBMLID.SeekHead,t)||this;for(i.parser=t,i.seekEntries=[];!t.atEos();)switch(t.readId()){case u.EBMLID.Seek:i.seekEntries.push(new g(t.readSubElement()));break;case u.EBMLID.Void:default:t.skipElement()}return i}return n(t,e),t.prototype.encodeData=function(){return this.parser.getRawElementData()},t}(c.EbmlElement),g=function(e){for(;!e.atEos();)switch(e.readId()){case u.EBMLID.SeekID:this.SeekId=e.readInt();break;case u.EBMLID.SeekPosition:this.SeekPosition=e.readInt();break;case u.EBMLID.Void:default:e.skipElement()}},m=function(e){function t(t){var i=e.call(this,u.EBMLID.Info,t)||this;for(i.parser=t,i.nx=1e6,i.ox=1e9,i.px=0,i.dateUTC=0;!t.atEos();)switch(t.readId()){case u.EBMLID.TimecodeScale:i.nx=t.readInt();break;case u.EBMLID.TimecodeScaleDenominator:i.ox=t.readInt();break;case u.EBMLID.Duration:i.px=t.readFloat();break;case u.EBMLID.DateUTC:i.dateUTC=t.readSizedInt(8);break;case u.EBMLID.Title:i.title=t.readUTF8();break;case u.EBMLID.MuxingApp:i.muxingApp=t.readUTF8();break;case u.EBMLID.WritingApp:i.writingApp=t.readUTF8();break;case u.EBMLID.Void:default:t.skipElement()}return i}return n(t,e),t.prototype.getTimecodeScale=function(){return this.nx/this.ox},t.prototype.getDuration=function(){return this.px*this.getTimecodeScale()},t.prototype.encodeData=function(){return this.parser.getRawElementData()},t}(c.EbmlElement),y=function(e){function t(t){var i=e.call(this,u.EBMLID.Tracks,t)||this;for(i.parser=t,i.trackEntries=[];!t.atEos();){var n=t.readId();switch(n){case u.EBMLID.TrackEntry:var r=new v(t.readSubElement());i.trackEntries.push(r),i.orderedElementList.push(r);break;case u.EBMLID.Void:default:var o=new c.GenericEbmlElement(t.readSubElement(),n);i.orderedElementList.push(o)}}return i}return n(t,e),t}(c.EbmlElement),v=function(e){function t(t){var i=e.call(this,u.EBMLID.TrackEntry,t)||this;for(i.parser=t;!t.atEos();)i.rx();return i}return n(t,e),t.prototype.qx=function(){var e=this.parser.readSubElement();if(this.contentEncodings=new b(e),this.contentEncodings.encodings.every(function(e){return e.type===a.Encryption})){var t=2+e.originalSizeLength+e.originalSize;this.orderedElementList.push(new c.VoidElement(t))}else this.orderedElementList.push(this.contentEncodings)},t.prototype.rx=function(){var e=this.parser.readId();switch(e){case u.EBMLID.TrackNumber:this.trackNumber=this.parser.readInt(),this.orderedElementList.push(new c.PrimitiveEbmlElement(e,(0,c.writeInt)(this.trackNumber)));break;case u.EBMLID.TrackUID:this.trackUID=this.parser.readInt(),this.orderedElementList.push(new c.PrimitiveEbmlElement(e,(0,c.writeInt)(this.trackUID)));break;case u.EBMLID.TrackType:this.trackType=this.parser.readInt(),this.orderedElementList.push(new c.PrimitiveEbmlElement(e,(0,c.writeInt)(this.trackType)));break;case u.EBMLID.CodecID:this.codecID=this.parser.readString(),this.orderedElementList.push(new c.PrimitiveEbmlElement(e,(0,c.writeString)(this.codecID)));break;case u.EBMLID.CodecPrivate:this.codecPrivateData=this.parser.readArrayBuffer(),this.orderedElementList.push(new c.PrimitiveEbmlElement(e,s.ArrayHelper.concatBuffers((0,c.writeCodedInt)(this.codecPrivateData.byteLength),this.codecPrivateData)));break;case u.EBMLID.CodecName:this.codecName=this.parser.readUTF8(),this.orderedElementList.push(new c.PrimitiveEbmlElement(e,(0,c.writeString)(this.codecName)));break;case u.EBMLID.Video:this.video=new S(this.parser.readSubElement()),this.orderedElementList.push(this.video);break;case u.EBMLID.ContentEncodings:this.qx();break;case u.EBMLID.Void:default:var t=new c.GenericEbmlElement(this.parser.readSubElement(),e);this.orderedElementList.push(t)}},t}(c.EbmlElement),S=function(e){function t(t){var i=e.call(this,u.EBMLID.Video,t)||this;for(i.parser=t;!t.atEos();)switch(t.readId()){case u.EBMLID.PixelWidth:i.pixelWidth=t.readInt();break;case u.EBMLID.PixelHeight:i.pixelHeight=t.readInt();break;case u.EBMLID.Void:default:t.skipElement()}return i}return n(t,e),t.prototype.encodeData=function(){return this.parser.getRawElementData()},t}(c.EbmlElement),b=function(e){function t(t){var i=e.call(this,u.EBMLID.ContentEncodings,t)||this;for(i.parser=t,i.encodings=[];!t.atEos();){var n=t.readId();switch(n){case u.EBMLID.ContentEncoding:i.sx();break;case u.EBMLID.Void:default:var r=new c.GenericEbmlElement(t.readSubElement(),n);i.orderedElementList.push(r)}}return i}return n(t,e),t.prototype.sx=function(){var e=this.parser.readSubElement(),t=new E(e);if(this.encodings.push(t),t.type===a.Encryption){var i=2+e.originalSizeLength+e.originalSize;this.orderedElementList.push(new c.VoidElement(i))}else this.orderedElementList.push(t)},t}(c.EbmlElement),E=function(e){function t(t){var i=e.call(this,u.EBMLID.ContentEncoding,t)||this;for(i.parser=t,i.order=0,i.scope=1,i.type=0;!t.atEos();)switch(t.readId()){case u.EBMLID.ContentEncodingOrder:i.order=t.readInt();break;case u.EBMLID.ContentEncodingScope:i.scope=t.readInt();break;case u.EBMLID.ContentEncodingType:i.type=t.readInt();break;case u.EBMLID.ContentEncryption:i.encryption=new d(t.readSubElement());break;case u.EBMLID.Void:default:t.skipElement()}return i}return n(t,e),t.prototype.encodeData=function(){return this.parser.getRawElementData()},t}(c.EbmlElement),T=function(e){for(;!e.atEos();)switch(e.readId()){case u.EBMLID.AESSettingsCipherMode:this.cipherMode=e.readInt();break;case u.EBMLID.Void:default:e.skipElement()}}},44219:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.WebMParser=void 0;var n=i(85434),r=i(94124),o=i(505);t.WebMParser=function(){function e(){}return e.prototype.parseSegment=function(e){"webm"===n.MimeTypeHelper.extractContainerType(e.getMimeType())&&(e.isInit()?this.tx(e):this.ux(e))},e.prototype.tx=function(e){var t=new r.WebMInitFile(e.getData()).segment.segmentInfo;e.setDuration(t.getDuration()),e.setTimescale(t.getTimecodeScale())},e.prototype.ux=function(e){var t,i,n=new o.WebMSegmentFile(e.getData()),r=null!=(t=e.getSegmentInfo().presentationTimeOffset)?t:0;e.setPresentationTimeOffset(r);var a=n.clusters[0].timeCode,s=null!=(i=e.getTimescale())?i:1;e.setBaseMediaDecodeTime(a),e.setPlaybackTime(a*s-e.getPresentationTimeOffset())},e}()},505:function(e,t,i){var n=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(t,i)};return function(t,i){if("function"!=typeof i&&null!==i)throw TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.SimpleBlock=t.WebMSegmentFile=void 0,t.isEncryptedSample=u;var r=i(74853),o=i(55585),a=i(43154),s=i(23164);function u(e){return!("decryptedData"in e)}t.WebMSegmentFile=function(){function e(e){this.clusters=[],this.rW=[];for(var t=new s.WebMElemParser(new DataView(e));!t.atEos();){var i=t.readId();switch(i){case o.EBMLID.Cluster:var n=new c(t.readSubElement());this.rW.push(n),this.clusters.push(n);break;case o.EBMLID.Void:default:var r=new a.GenericEbmlElement(t.readSubElement(),i);this.rW.push(r)}}}return e.prototype.writeSegment=function(){return r.ArrayHelper.concatBuffers.apply(r.ArrayHelper,this.rW.map(function(e){return e.writeElement()}))},e}();var c=function(e){function t(t){var i=e.call(this,o.EBMLID.Cluster,t)||this;for(i.parser=t,i.blocks=[],i.blockGroups=[];!t.atEos();){var n=t.readId();switch(n){case o.EBMLID.Timecode:i.timeCode=t.readInt(),i.orderedElementList.push(new a.PrimitiveEbmlElement(n,(0,a.writeInt)(i.timeCode)));break;case o.EBMLID.SimpleBlock:var r=new l(t.readSubElement());i.blocks.push(r),i.orderedElementList.push(r);break;case o.EBMLID.BlockGroup:var s=new d(t.readSubElement());i.blockGroups.push(s),i.orderedElementList.push(s);break;case o.EBMLID.Void:default:var u=new a.GenericEbmlElement(t.readSubElement(),n);i.orderedElementList.push(u)}}return i}return n(t,e),t}(a.EbmlElement),l=function(e){function t(t){var i=e.call(this,o.EBMLID.SimpleBlock,t)||this;i.parser=t,i.samples=[],i.sW=1,i.trackNumber=t.readCodedInt(!0),i.timeCode=t.readSizedInt(2),i.flags=t.readByte();var n=t.readByte();if(i.encrypted=!!(1&n),i.partitioned=!!(2&n),-4&n){var a=r.ArrayHelper.concatBuffers(new Uint8Array([n]).buffer,t.readRest());i.sW=0,i.tW(a)}else i.encrypted?i.uW(t):i.tW(t.readRest());return i}return n(t,e),t.prototype.tW=function(e){this.samples.push({decryptedData:e})},t.prototype.uW=function(e){var t=e.readArrayBuffer(8);this.sW+=8,this.partitioned?this.wW(e,t):this.vW(e,t)},t.prototype.vW=function(e,t){this.samples.push({initialVector:t,encryptedData:e.readRest()})},t.prototype.wW=function(e,t){var i=this,n=e.readSizedInt(1),r=function(e,t){for(var i=[],n=0,r=!1,o=0;o<e;o++){var a=t.readSizedInt(4)-n;0!==a&&i.push({encrypted:r,size:a}),r=!r,n+=a}return i.push({encrypted:r,size:null}),i}(n,e);this.sW+=4*n+1,r.forEach(function(n){var r=null!==n.size?e.readArrayBuffer(n.size):e.readRest();n.encrypted?i.samples.push({initialVector:t,encryptedData:r}):i.samples.push({decryptedData:r})})},t.prototype.encodeData=function(){var e=[(0,a.writeCodedInt)(this.trackNumber),(0,a.writeSizedInt)(this.timeCode,2),(0,a.writeSizedBytes)(this.flags,1).buffer];return this.samples.forEach(function(t){u(t)||e.push(t.decryptedData)}),r.ArrayHelper.concatBuffers.apply(r.ArrayHelper,e)},t.prototype.writeElement=function(t){if(void 0===t&&(t=this.id),this.parser.originalSizeLength+this.sW<=8){var i=this.encodeData(),n=(0,a.writeEbmlId)(t),o=(0,a.writeCodedInt)(i.byteLength,this.parser.originalSizeLength+this.sW);return r.ArrayHelper.concatBuffers(n,o,i)}return this.sW>=3?r.ArrayHelper.concatBuffers(e.prototype.writeElement.call(this,t),new a.VoidElement(this.sW).writeElement()):e.prototype.writeElement.call(this,t)},t}(a.EbmlElement);t.SimpleBlock=l;var d=function(e){function t(t){var i=e.call(this,o.EBMLID.BlockGroup,t)||this;for(i.parser=t,i.referenceBlocks=[];!t.atEos();){var n=t.readId();switch(n){case o.EBMLID.Block:i.block=new l(t.readSubElement()),i.orderedElementList.push(i.block);break;case o.EBMLID.BlockDuration:i.blockDuration=t.readInt(),i.orderedElementList.push(new a.PrimitiveEbmlElement(n,(0,a.writeInt)(i.blockDuration)));break;case o.EBMLID.ReferenceBlock:var r=t.readInt();i.referenceBlocks.push(r),i.orderedElementList.push(new a.PrimitiveEbmlElement(n,(0,a.writeInt)(r)));break;case o.EBMLID.Void:default:var s=new a.GenericEbmlElement(t.readSubElement(),n);i.orderedElementList.push(s)}}return i}return n(t,e),t.prototype.encodeData=function(){return r.ArrayHelper.concatBuffers.apply(r.ArrayHelper,this.orderedElementList.map(function(e){return e instanceof l?e.writeElement(o.EBMLID.Block):e.writeElement()}))},t}(a.EbmlElement)},35931:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.WebMSegmentIndex=void 0;var n=i(55585),r=i(23164);t.WebMSegmentIndex=function(e){this.cues=[];for(var t=new r.WebMElemParser(new DataView(e));!t.atEos();)switch(t.readId()){case n.EBMLID.Cues:this.cues.push(new o(t.readSubElement()));break;case n.EBMLID.Void:default:t.skipElement()}};var o=function(e){for(this.cuePoints=[];!e.atEos();)switch(e.readId()){case n.EBMLID.CuePoint:this.cuePoints.push(new a(e.readSubElement()));break;case n.EBMLID.Void:default:e.skipElement()}},a=function(e){for(this.trackPositions=[];!e.atEos();)switch(e.readId()){case n.EBMLID.CueTime:this.time=e.readInt();break;case n.EBMLID.CueTrackPositions:this.trackPositions.push(new s(e.readSubElement()));break;case n.EBMLID.Void:default:e.skipElement()}},s=function(e){for(this.blockNumber=1,this.codecState=0;!e.atEos();)switch(e.readId()){case n.EBMLID.CueTrack:this.track=e.readInt();break;case n.EBMLID.CueClusterPosition:this.clusterPosition=e.readInt();break;case n.EBMLID.CueRelativePosition:this.relativePosition=e.readInt();break;case n.EBMLID.CueDuration:this.duration=e.readInt();break;case n.EBMLID.CueBlockNumber:this.blockNumber=e.readInt();break;case n.EBMLID.Void:default:e.skipElement()}}}},function(e){return e(e.s=7612)}])},736:function(module,__unused_webpack_exports,__nested_webpack_require_502904__){if(void 0!==__nested_webpack_require_502904__.g&&"undefined"==typeof window){__nested_webpack_require_502904__.g.window=self=__nested_webpack_require_502904__.g,window.NodeList="undefined"!=typeof NodeList?NodeList:{prototype:{}},window.Document="undefined"!=typeof Document?Document:{prototype:{}};var t,shimArrayFn=function(){return[]},shimElementFn=function(){return{appendChild:shimArrayFn}};window.document="undefined"!=typeof document?document:{createTextNode:shimArrayFn,getElementsByTagName:shimArrayFn,createElement:shimElementFn,head:{appendChild:shimArrayFn}},window.Event="undefined"!=typeof Event?Event:{prototype:{}},window.Element="undefined"!=typeof Element?Element:{prototype:{}},window.screen="undefined"!=typeof screen?screen:{prototype:{}},window.navigator="undefined"!=typeof navigator?navigator:{prototype:{},userAgent:"shim",platform:{toLowerCase:shimArrayFn}},window.location="undefined"!=typeof location?location:{}}self,t=function(){return function(){var e,__webpack_modules__={90040:function(module){var URL=window.URL||window.webkitURL;module.exports=function(content,url){try{try{var blob;try{(blob=new(window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder)).append(content),blob=blob.getBlob()}catch(e){blob=new Blob([content])}return new Worker(URL.createObjectURL(blob))}catch(e){return new Worker("data:application/javascript,"+encodeURIComponent(content))}}catch(e){try{var exportReturnStatement="return __webpack_require__(",exportStatement="var __webpack_exports__ = __webpack_require__(";return"!"===content.substring(0,1)&&(content=content.substring(1,content.length-1),content="("+content+")"),content.indexOf(exportStatement)>0&&(content=content.replace(exportStatement,exportReturnStatement)),eval(content).getContext()}catch(e){return{}}}}},37007:function(e){"use strict";var t,i="object"==typeof Reflect?Reflect:null,n=i&&"function"==typeof i.apply?i.apply:function(e,t,i){return Function.prototype.apply.call(e,t,i)};t=i&&"function"==typeof i.ownKeys?i.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var r=Number.isNaN||function(e){return e!=e};function o(){o.init.call(this)}e.exports=o,e.exports.once=function(e,t){return new Promise(function(i,n){function r(i){e.removeListener(t,o),n(i)}function o(){"function"==typeof e.removeListener&&e.removeListener("error",r),i([].slice.call(arguments))}g(e,t,o,{once:!0}),"error"!==t&&function(e,t){"function"==typeof e.on&&g(e,"error",t,{once:!0})}(e,r)})},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var a=10;function s(e){if("function"!=typeof e)throw TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function u(e){return void 0===e._maxListeners?o.defaultMaxListeners:e._maxListeners}function c(e,t,i,n){var r,o,a;if(s(i),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,i.listener?i.listener:i),o=e._events),a=o[t]),void 0===a)a=o[t]=i,++e._eventsCount;else if("function"==typeof a?a=o[t]=n?[i,a]:[a,i]:n?a.unshift(i):a.push(i),(r=u(e))>0&&a.length>r&&!a.warned){a.warned=!0;var c=Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=e,c.type=t,c.count=a.length,function(e){console&&console.warn&&console.warn(e)}(c)}return e}function l(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0==arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function d(e,t,i){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:i},r=l.bind(n);return r.listener=i,n.wrapFn=r,r}function h(e,t,i){var n=e._events;if(void 0===n)return[];var r=n[t];return void 0===r?[]:"function"==typeof r?i?[r.listener||r]:[r]:i?function(e){for(var t=Array(e.length),i=0;i<t.length;++i)t[i]=e[i].listener||e[i];return t}(r):f(r,r.length)}function p(e){var t=this._events;if(void 0!==t){var i=t[e];if("function"==typeof i)return 1;if(void 0!==i)return i.length}return 0}function f(e,t){for(var i=Array(t),n=0;n<t;++n)i[n]=e[n];return i}function g(e,t,i,n){if("function"==typeof e.on)n.once?e.once(t,i):e.on(t,i);else{if("function"!=typeof e.addEventListener)throw TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,function r(o){n.once&&e.removeEventListener(t,r),i(o)})}}Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return a}
vendor: 4,202 bytes, line 1
1,set:function(e){if("number"!=typeof e||e<0||r(e))throw RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");a=e}}),o.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},o.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||r(e))throw RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},o.prototype.getMaxListeners=function(){return u(this)},o.prototype.emit=function(e){for(var t=[],i=1;i<arguments.length;i++)t.push(arguments[i]);var r="error"===e,o=this._events;if(void 0!==o)r=r&&void 0===o.error;else if(!r)return!1;if(r){if(t.length>0&&(a=t[0]),a instanceof Error)throw a;var a,s=Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var u=o[e];if(void 0===u)return!1;if("function"==typeof u)n(u,this,t);else{var c=u.length,l=f(u,c);for(i=0;i<c;++i)n(l[i],this,t)}return!0},o.prototype.addListener=function(e,t){return c(this,e,t,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(e,t){return c(this,e,t,!0)},o.prototype.once=function(e,t){return s(t),this.on(e,d(this,e,t)),this},o.prototype.prependOnceListener=function(e,t){return s(t),this.prependListener(e,d(this,e,t)),this},o.prototype.removeListener=function(e,t){var i,n,r,o,a;if(s(t),void 0===(n=this._events)||void 0===(i=n[e]))return this;if(i===t||i.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete n[e],n.removeListener&&this.emit("removeListener",e,i.listener||t));else if("function"!=typeof i){for(r=-1,o=i.length-1;o>=0;o--)if(i[o]===t||i[o].listener===t){a=i[o].listener,r=o;break}if(r<0)return this;0===r?i.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(i,r),1===i.length&&(n[e]=i[0]),void 0!==n.removeListener&&this.emit("removeListener",e,a||t)}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(e){var t,i,n;if(void 0===(i=this._events))return this;if(void 0===i.removeListener)return 0==arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==i[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete i[e]),this;if(0==arguments.length){var r,o=Object.keys(i);for(n=0;n<o.length;++n)"removeListener"!==(r=o[n])&&this.removeAllListeners(r);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=i[e]))this.removeListener(e,t);else if(void 0!==t)for(n=t.length-1;n>=0;n--)this.removeListener(e,t[n]);return this},o.prototype.listeners=function(e){return h(this,e,!0)},o.prototype.rawListeners=function(e){return h(this,e,!1)},o.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):p.call(e,t)},o.prototype.listenerCount=p,o.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},91829:function(e,t,i){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function r(e,t,i){return(t=function(e){var t=function(e){if("object"!=n(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var i=t.call(e,"string");if("object"!=n(i))return i;throw TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==n(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function o(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),i.push.apply(i,n)}return i}function a(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?o(Object(i),!0).forEach(function(t){r(e,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):o(Object(i)).forEac
vendor: 29,404 bytes, line 1
1h(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))})}return e}function s(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}i.r(t),i.d(t,{__DO_NOT_USE__ActionTypes:function(){return l},applyMiddleware:function(){return y},bindActionCreators:function(){return g},combineReducers:function(){return p},compose:function(){return m},createStore:function(){return d},legacy_createStore:function(){return h}});var u="function"==typeof Symbol&&Symbol.observable||"@@observable",c=function(){return Math.random().toString(36).substring(7).split("").join(".")},l={INIT:"@@redux/INIT"+c(),REPLACE:"@@redux/REPLACE"+c(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+c()}};function d(e,t,i){if("function"==typeof t&&"function"==typeof i||"function"==typeof i&&"function"==typeof arguments[3])throw Error(s(0));if("function"==typeof t&&void 0===i&&(i=t,t=void 0),void 0!==i){if("function"!=typeof i)throw Error(s(1));return i(d)(e,t)}if("function"!=typeof e)throw Error(s(2));var n,r=e,o=t,a=[],c=a,h=!1;function p(){c===a&&(c=a.slice())}function f(){if(h)throw Error(s(3));return o}function g(e){if("function"!=typeof e)throw Error(s(4));if(h)throw Error(s(5));var t=!0;return p(),c.push(e),function(){if(t){if(h)throw Error(s(6));t=!1,p();var i=c.indexOf(e);c.splice(i,1),a=null}}}function m(e){if(!function(e){if("object"!=typeof e||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}(e))throw Error(s(7));if(void 0===e.type)throw Error(s(8));if(h)throw Error(s(9));try{h=!0,o=r(o,e)}finally{h=!1}for(var t=a=c,i=0;i<t.length;i++)(0,t[i])();return e}return m({type:l.INIT}),(n={dispatch:m,subscribe:g,getState:f,replaceReducer:function(e){if("function"!=typeof e)throw Error(s(10));r=e,m({type:l.REPLACE})}})[u]=function(){var e,t=g;return(e={subscribe:function(e){if("object"!=typeof e||null===e)throw Error(s(11));function i(){e.next&&e.next(f())}return i(),{unsubscribe:t(i)}}})[u]=function(){return this},e},n}var h=d;function p(e){for(var t=Object.keys(e),i={},n=0;n<t.length;n++){var r=t[n];"function"==typeof e[r]&&(i[r]=e[r])}var o,a=Object.keys(i);try{!function(e){Object.keys(e).forEach(function(t){var i=e[t];if(void 0===i(void 0,{type:l.INIT}))throw Error(s(12));if(void 0===i(void 0,{type:l.PROBE_UNKNOWN_ACTION()}))throw Error(s(13))})}(i)}catch(e){o=e}return function(e,t){if(void 0===e&&(e={}),o)throw o;for(var n=!1,r={},u=0;u<a.length;u++){var c=a[u],l=i[c],d=e[c],h=l(d,t);if(void 0===h)throw t&&t.type,Error(s(14));r[c]=h,n=n||h!==d}return(n=n||a.length!==Object.keys(e).length)?r:e}}function f(e,t){return function(){return t(e.apply(this,arguments))}}function g(e,t){if("function"==typeof e)return f(e,t);if("object"!=typeof e||null===e)throw Error(s(16));var i={};for(var n in e){var r=e[n];"function"==typeof r&&(i[n]=f(r,t))}return i}function m(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];return 0===t.length?function(e){return e}:1===t.length?t[0]:t.reduce(function(e,t){return function(){return e(t.apply(void 0,arguments))}})}function y(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];return function(e){return function(){var i=e.apply(void 0,arguments),n=function(){throw Error(s(15))},r={getState:i.getState,dispatch:function(){return n.apply(void 0,arguments)}},o=t.map(function(e){return e(r)});return n=m.apply(void 0,o)(i.dispatch),a(a({},i),{},{dispatch:n})}}}},88052:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ModuleManager=void 0;var n=i(40306),r=i(3336),o=i(95880);t.ModuleManager=function(){function e(){}return e.initialize=function(){this.modules||(this.modules={})},e.add=function(e){if(this.initialize(),!e)throw new r.PlayerError(n.ErrorCode.MODULE_INVALID_DEFINITION,void 0,"Cannot add the module: no module definition was provided to the API.");if(!e.name)throw new r.PlayerError(n.ErrorCode.MODULE_INVALID_DEFINITION,void 0,"Cannot add the module: no `name` property was provided to the module definition.");if(!e.module)throw new r.PlayerError(n.ErrorCode.MODULE_INVALID_DEFINITION,void 0,"Cannot add the module: no `module` property was provided to the module definition.");if(e.dependencies){for(var t=0,i=e.dependencies;t<i.length;t++){var a=i[t];if(!this.has(a))throw new o.PlayerModuleMissingError(e.name,a)}if("function"!=typeof e.module)throw new r.PlayerError(n.ErrorCode.MODULE_INVALID_DEFINITION_DEPENDENCY,{name:e.name},"Cannot add the module: modules with dependencies must pass a deferred loading function to the `ModuleDefinition.module` property.")}var s=e.module;"function"==typeof s&&(s=s()),this.modules[e.name]={moduleDefinition:e,module:s},e.hooks&&e.hooks.add&&e.hooks.add(e.module)},e.remove=function(e){var t;if(this.modules){if(!this.modules[e])throw new o.PlayerModuleMissingError(e);var i=this.modules[e].moduleDefinition;(null==(t=i.hooks)?void 0:t.remove)&&i.hooks.remove(i.module),delete this.modules[e]}},e.get=function(e,t){void 0===t&&(t=!0),this.initialize();var i=this.modules[e];if(i&&i.module)return i.module;if(t)throw new o.PlayerModuleMissingError(e)},e.has=function(e){return void 0!==this.get(e,!1)},e.getModuleNames=function(){return Object.getOwnPropertyNames(this.modules)},e.getModuleDefinitions=function(){var e=this;return this.getModuleNames().map(function(t){return e.modules[t]})},e.callSetupHooks=function(e){this.getModuleDefinitions().filter(function(e){return e.moduleDefinition.hooks&&e.moduleDefinition.hooks.setup}).forEach(function(t){return t.moduleDefinition.hooks.setup(t.module,e)})},e.callDestroyHooks=function(e){return Promise.all(this.getModuleDefinitions().filter(function(e){return e.moduleDefinition.hooks&&e.moduleDefinition.hooks.destroy}).map(function(t){return t.moduleDefinition.hooks.destroy(t.module,e)})).then(function(){})},e}()},62756:function(e,t){"use strict";var i;Object.defineProperty(t,"__esModule",{value:!0}),t.ModuleName=void 0,function(e){e.VR="VR",e.XML="XML",e.Smooth="Smooth",e.AdvertisingCore="AdvertisingCore",e.Advertising="Advertising",e.AdvertisingIma="Advertising",e.AdvertisingBitmovin="Advertising",e.AdvertisingOmSdk="AdvertisingOmSdk",e.SGAI="SGAI",e.Polyfill="Polyfill",e.Patch="Patch",e.RemoteControl="RemoteControl",e.RendererMse="RendererMSE",e.EngineNative="EngineNative",e.EngineBitmovin="EngineBitmovin",e.ABR="ABR",e.Crypto="Crypto",e.HLS="HLS",e.DRM="DRM",e.DASH="DASH",e.ContainerTS="ContainerTS",e.ContainerMP4="ContainerMP4",e.ContainerWebM="ContainerWebM",e.Subtitles="Subtitles",e.SubtitlesTTML="SubtitlesTTML",e.SubtitlesWebVTT="SubtitlesWebVTT",e.SubtitlesCEA608="SubtitlesCEA608",e.SubtitlesNative="SubtitlesNative",e.Style="Style",e.Thumbnail="Thumbnail",e.ThumbnailImp="Thumbnail",e.UI="UI",e.Tizen="Tizen",e.Webos="webos",e.Vidaa="vidaa",e.Wpe="wpe",e.LowLatency="LowLatency",e.ServiceWorkerClient="ServiceWorkerClient",e.Envivio="Envivio",e.PlayStation5="PlayStation5",e.PlayStation4="PlayStation4",e.EngineWebRtc="EngineWebRtc",e.ReactNative="ReactNative"}(i||(t.ModuleName=i={}))},95880:function(e,t,i){"use strict";var n=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(t,i)};return function(t,i){if("function"!=typeof i&&null!==i)throw TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.PlayerModuleMissingError=void 0;var r=i(40306);t.PlayerModuleMissingError=function(e){function t(t,i){return i?e.call(this,r.ErrorCode.MODULE_DEPENDENCY_MISSING,{name:t,dependency:i},"The ".concat(t," module requires the ").concat(i," module to be included as well."))||this:e.call(this,r.ErrorCode.MODULE_MISSING,{name:t},"The ".concat(t," module is required to play this stream."))||this}return n(t,e),t}(i(3336).PlayerError)},22374:function(e,t,i){"use strict";var n=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(t,i)};return function(t,i){if("function"!=typeof i&&null!==i)throw TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.PlayerModuleMissingWarning=void 0;var r=i(25926),o=i(4224);t.PlayerModuleMissingWarning=function(e){function t(t,i){return e.call(this,o.WarningCode.MODULE_MISSING,i,{moduleName:t})||this}return n(t,e),t}(r.PlayerWarning)},4524:function(e,t,i){"use strict";var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.BufferRangeHelper=t.MultiRange=void 0,t.rangeFixedValue=l,t.areDisjoint=function(e,t){return l(e.end)<l(t.start)||l(e.start)>l(t.end)},t.isSurrounding=function(e,t){return l(t.start)>l(e.start)&&l(t.end)<l(e.end)},t.isOverlapping=function(e,t){return l(e.start)>=l(t.start)&&l(e.start)<=l(t.end)||l(e.end)>=l(t.start)&&l(e.end)<=l(t.end)},t.isFullyIncluded=d,t.isInTimeRanges=h,t.getBufferedRanges=function(e){var t=[],i=null==e?void 0:e.buffered;if(i)for(var n=0;n<i.length;n++)t.push({start:i.start(n),end:i.end(n)});return t},t.convertRangeToTimeMode=function(e,t,i){var n,o=(0,s.toSeconds)(null!=(n=null==t?void 0:t.getTime())?n:0);return i===r.TimeMode.RelativeTime&&(o=-o),{start:e.start+o,end:e.end+o}};var r=i(20213),o=i(44468),a=i(76399),s=i(89927),u=100,c=function(){function e(e,t,i){this.start=e,this.end=t,this.hits=i||1}return e.prototype.getHits=function(){return this.hits},e.prototype.getStart=function(){return this.start},e.prototype.getEnd=function(){return this.end},e.prototype.EC=function(t){for(var i=[],n=0;n<t.length;n++){var r=t[n],o=r.start,a=r.end,s=r.hits,u=this.start<o&&this.end>a,c=this.start<o&&this.end>o&&this.end<a,l=this.start>o&&this.start<a&&this.end>a,d=this.start>o&&this.end<a,h=this.start===o&&this.end<a,p=this.start===o&&this.end>a,f=this.start<o&&this.end===a,g=this.start>o&&this.end===a,m=this.start===o&&this.end===a;u||p||f||m?i.push(new e(o,a,s+1)):c||h?(i.push(new e(o,this.end,s+1)),i.push(new e(this.end,a,s))):l||g?(i.push(new e(o,this.start,s)),i.push(new e(this.start,a,s+1))):d?(i.push(new e(o,this.start,s)),i.push(new e(this.start,this.end,s+1)),i.push(new e(this.end,a,s))):i.push(new e(o,a,s))}return i},e.prototype.FC=function(t){for(var i=0;i<t.length&&!(this.end-this.start<=0);i++){var n=t[i],r=null;i+1<t.length&&(r=t[i+1]),this.start<n.start?(t.unshift(new e(this.start,Math.min(n.start,this.end))),i++,this.start=n.end):r&&r.start>this.start?(t.splice(i,0,new e(Math.max(n.end,this.start),Math.min(this.end,r.start))),this.start=r.end,i++):null===r&&this.end>n.end&&(t.push(new e(Math.max(n.end,this.start),this.end)),this.start=this.end)}return t},e.prototype.intersect=function(e){if(0===e.length)return[this];var t=this.EC(e);return this.FC(t)},e}();function l(e){return void 0===e||isNaN(e)?0:Math.round(e*u)/u}function d(e,t){return l(t.start)<=l(e.start)&&l(t.end)>=l(e.end)}function h(e,t,i){void 0===i&&(i=0);for(var n=0,r=e;n<r.length;n++){var o=r[n],a=Math.min(Math.round(1e3*o.start)/1e3,o.start),s=Math.max(Math.round(1e3*o.end)/1e3,o.end);if(t>=a&&t<=s-i)return!0}return!1}t.MultiRange=c,t.BufferRangeHelper=function(){function e(){}return e.mergeRanges=function(e,t,i){if(void 0===t&&(t=0),void 0===i&&(i=!0),e.length<1)return e;e.sort(function(e,t){return e.start-t.start});var r=[];r.push(i?n({},e[0]):e[0]);for(var o=1;o<e.length;o++){var a=r.slice(-1)[0],s=e[o];if(!d(s,a)){var u=a.end>=s.start-t,c=a.end<=s.end+t;u&&c?r[r.length-1].end=s.end:r.push(i?n({},s):s)}}return r},e.excludeTimeRange=function(e,t){return e.filter(function(e){return!d(e,t)}).reduce(function(e,i){var r=function(e,t){return e>t.start&&e<=t.end}(t.start,i),o=function(e,t){return e<t.end&&e>=t.start}(t.end,i);return r&&e.push(n(n({},i),{end:t.start})),o&&e.push(n(n({},i),{start:t.end})),r||o||e.push(n({},i)),e},[])},e.getRangesFromQueue=function(t,i){void 0===i&&(i=0);for(var n=[],r=Array.isArray(t)?new a.ArrayIterator(t):t;r.hasNext();){var o=r.next();if(!o.isInit()){var s={start:o.getPlaybackTime()||0,end:0};s.end=s.start+o.getDuration(),n.push(s)}}return e.mergeRanges(n,i,!1)},e.getMultiRanges=function(e){var t=[],i=0;for(var n in e)if(e.hasOwnProperty(n)){i++;for(var r=e[n],o=0;o<r.length;o++)t=new c(r[o].start,r[o].end).intersect(t)}return[t,i]},e.findGapsInRanges=function(e){for(var t=[],i=0;i<e.length-1;i++)e[i+1].start-e[i].end>0&&t.push({start:e[i].end,end:e[i+1].start});return t},e.getCommonBufferedRanges=function(t){var i=[],n=e.getMultiRanges(t),r=n[0],o=n[1];for(var a in r)r.hasOwnProperty(a)&&r[a].getHits()===o&&i.push(r[a]);return i},e.getCommonBufferedTime=function(t,i,n,r){for(var o=-1,a=e.getCommonBufferedRanges(i),s=0;s<a.length;s++)if(a[s].getStart()<=n&&a[s].getEnd()>=n)return n;for(var u in i)if(i.hasOwnProperty(u)){if(i[u].length<1)return null;var c=i[u];for(s=0;s<c.length&&!(c[s].start>=o&&(o=c[s].start,c[s].start>=n));s++);}return -1===o?null:o<n&&n-o<r?n:(t.debug("common time diff [s]",n-o),o)},e.isInBufferedRange=function(e,t){var i=Object.keys(e);return!!i.length&&i.every(function(i){return h(e[i],t)})},e.getTotalCommonBufferLength=function(e){return this.getCommonBufferedRanges(e).reduce(function(e,t){return e+t.getEnd()-t.getStart()},0)},e.getBufferLevel=function(e,t,i){if(!e||!e.length)return 0;var n=0;return i===o.BufferType.ForwardDuration?n=e[e.length-1].end-t:i===o.BufferType.BackwardDuration&&(n=t-e[0].start),Math.max(n,0)},e}()},17564:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BufferSettings=void 0;var n=i(44468),r=i(85434);t.BufferSettings=function(){function e(e,t){this.logger=t,this.lab=JSON.parse(JSON.stringify(e)),this.mab={},this.oab(this.mab,this.lab),this.nab={currentDistanceToLiveEdge:1/0,minimumBufferLength:1,streamDuration:1/0}}return e.prototype.oab=function(e,t){Object.keys(t).forEach(function(t){e[t]={}})},e.prototype.setTargetLevel=function(e,t,i){"number"==typeof t&&(this.lab[i][e]=t)},e.prototype.pab=function(e,t,i){this.mab[i][e]=t},e.prototype.setTargetBufferLevelConstraints=function(e){this.nab=e},e.prototype.setDistanceToLiveEdge=function(e){this.nab.currentDistanceToLiveEdge=e},e.prototype.getTargetLevel=function(e,t){var i,r,o,a,s=null!=(r=null==(i=this.lab[t])?void 0:i[e])?r:1/0,u=null!=(a=null==(o=this.mab[t])?void 0:o[e])?a:1/0,c=this.nab.minimumBufferLength,l=this.nab.streamDuration;return Math.max(Math.min(s,u,e===n.BufferType.BackwardDuration?1/0:this.nab.currentDistanceToLiveEdge,l),c)},e.prototype.getForwardTargetLevel=function(e){return void 0===e&&(e=n.MediaType.Video),this.getTargetLevel(n.BufferType.ForwardDuration,e)},e.prototype.getBackwardTargetLevel=function(e){return void 0===e&&(e=n.MediaType.Video),this.getTargetLevel(n.BufferType.BackwardDuration,e)},e.prototype.qab=function(e){var t,i=r.MimeTypeHelper.isAudio(e)?n.MediaType.Audio:n.MediaType.Video;return(t={})[n.BufferType.BackwardDuration]=this.getBackwardTargetLevel(i),t[n.BufferType.ForwardDuration]=this.getForwardTargetLevel(i),t},e.prototype.rab=function(e,t,i){var r,o=i/2,a=i/2,s=this.qab(e),u=s[n.BufferType.BackwardDuration],c=s[n.BufferType.ForwardDuration],l=i>=2*t,d=c/(c+u);if(!isFinite(u)&&isFinite(c)?(o=t,a=i-t):isFinite(u)&&!isFinite(c)?(o=i-t,a=t):isFinite(u)&&isFinite(c)&&(o=i*d,a=i*(1-d)),l&&o<t){var h=t-o;o+=h,a-=h}return(r={})[n.BufferType.BackwardDuration]=a,r[n.BufferType.ForwardDuration]=o,r},e.prototype.adjustMaxBufferLevels=function(e,t,i){var r=this.rab(t,e,i-e),o=r[n.BufferType.BackwardDuration],a=r[n.BufferType.ForwardDuration];this.logger.debug("Setting new target buffer levels to ".concat(a," (forward) and ").concat(o," (backward)")),this.pab(n.BufferType.ForwardDuration,a,n.MediaType.Audio),this.pab(n.BufferType.ForwardDuration,a,n.MediaType.Video),this.pab(n.BufferType.BackwardDuration,o,n.MediaType.Audio),this.pab(n.BufferType.BackwardDuration,o,n.MediaType.Video)},e}()},66790:function(e,t){"use strict";var i,n,r,o,a,s;Object.defineProperty(t,"__esModule",{value:!0}),t.DrmSetupError=t.TransmuxingRejectionReason=t.SegmentVerificationResult=t.HlsEncryptionMethods=t.HlsEncryptionMethod=t.SOURCE_BUFFER_APPEND_STATUS=t.RepresentationType=void 0,function(e){e[e.AUDIO=1]="AUDIO",e[e.VIDEO=2]="VIDEO",e[e.SUBTITLE=3]="SUBTITLE"}(i||(t.RepresentationType=i={})),function(e){e[e.FAILURE=0]="FAILURE",e[e.QUOTA_EXCEEDED=1]="QUOTA_EXCEEDED",e[e.SUSPENDED=2]="SUSPENDED"}(n||(t.SOURCE_BUFFER_APPEND_STATUS=n={})),function(e){e.NONE="NONE",e.AES_128="AES-128",e.SAMPLE_AES="SAMPLE-AES",e.SAMPLE_AES_CTR="SAMPLE-AES-CTR"}(r||(t.HlsEncryptionMethod=r={})),t.HlsEncryptionMethods=Object.keys(r).map(function(e){return r[e]}),function(e){e.Publish="publish",e.Drop="drop",e.Park="park"}(o||(t.SegmentVerificationResult=o={})),function(e){e.INVALID_TS_SEGMENT="Invalid TS segment, could not extract segment information",e.TRANSMUXING_ABORTED="Transmuxing was aborted as it is no longer needed"}(a||(t.TransmuxingRejectionReason=a={})),function(e){e.CANCELLED="Loading was cancelled for the DRM source",e.MISSING_CONFIGURATION="DRM is not configured"}(s||(t.DrmSetupError=s={}))},56481:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.dispose=function(e){e&&e.dispose()}},86969:function(e,t,i){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,i,n){void 0===n&&(n=i);var r=Object.getOwnPropertyDescriptor(t,i);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[i]}}),Object.defineProperty(e,n,r)}:function(e,t,i,n){void 0===n&&(n=i),e[n]=t[i]}),r=this&&this.__exportStar||function(e,t){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(t,i)||n(t,e,i)};Object.defineProperty(t,"__esModule",{value:!0}),t.util=t.Player=void 0;var o=i(43662);Object.defineProperty(t,"Player",{enumerable:!0,get:function(){return o.Player}}),r(i(20213),t),t.util=i(64681),t.default=o.Player},45202:function(e,t){"use strict";function i(e){return e.hasAttribute("src")&&null!=e.src}Object.defineProperty(t,"__esModule",{value:!0}),t.Environment=void 0,t.Environment=function(){function e(){}return Object.defineProperty(e,"hostname",{get:function(){return this._hostname||(this._hostname=location.hostname),this._hostname},set:function(e){this._hostname=e},enumerable:!1,configurable:!0}),Object.defineProperty(e,"baseUrl",{get:function(){return e.getURL()},enumerable:!1,configurable:!0}),e.checkDomainLock=function(){if(0===this.domains.length||"localhost"===this.hostname)return!0;for(var e=0,t=this.domains.split(",");e<t.length;e++){var i=t[e],n=i.substring(2),r=this.hostname.length-n.length,o=this.hostname.indexOf(n),a=-1!==o&&o===r,s=i.startsWith("*.")&&a;if(i===this.hostname||s)return!0}return!1},e.getURL=function(){var e=this.getCurrentScriptURL();return e.lastIndexOf("/")>-1?e.substring(0,e.lastIndexOf("/")+1):""},e.generateExceptionStack=function(){try{omgwtfnodocumentdotcurrentscript}catch(e){return e.stack}},e.getCurrentScriptFallback=function(){var e=this.generateExceptionStack();if(!e)return"";for(var t=-1!==e.indexOf(" at ")?" at ":"@";-1!==e.indexOf(t);)e=e.substring(e.indexOf(t)+t.length);var i=e.lastIndexOf(":",e.lastIndexOf(":")-1);return e.substring(e.indexOf("(")+1,i)},e.getCurrentScriptURL=function(){var e,t;if(null==(e=window.document)?void 0:e.currentScript){var n=window.document.currentScript.src;return n.indexOf("modules/bitmovinplayer-core.js")>-1?n.substring(0,n.lastIndexOf("modules/bitmovinplayer-core.js")):n}for(var r=(null==(t=window.document)?void 0:t.getElementsByTagName("script"))||[],o=r.length,a=0;a<o;a++)if(i(r[a])){if(r[a].src.indexOf("bitmovinplayer.js")>-1)return r[a].src;if(r[a].src.indexOf("modules/bitmovinplayer-core.js")>-1)return r[a].src.substring(0,r[a].src.indexOf("modules/bitmovinplayer-core.js"))}return this.getCurrentScriptFallback()||(r.length>0&&i(r[o-1])?r[o-1].src:"")},e.VERSION_NUMBER="8.253.0",e.idPrefix="bitmovinplayer-",e.domains="",e.modules={playerui:null},e}()},3714:function(e,t){"use strict";var i,n,r,o,a,s;Object.defineProperty(t,"__esModule",{value:!0}),t.ContentLocationChangedReason=t.LatencyMode=t.AdInteractionType=t.AdQuartile=t.MetadataType=t.PlayerEvent=void 0,function(e){e.Ready="ready",e.Play="play",e.Playing="playing",e.Paused="paused",e.Seek="seek",e.Seeked="seeked",e.TimeShift="timeshift",e.TimeShifted="timeshifted",e.VolumeChanged="volumechanged",e.Muted="muted",e.Unmuted="unmuted",e.PlayerResized="playerresized",e.PlaybackFinished="playbackfinished",e.Error="error",e.Warning="warning",e.StallStarted="stallstarted",e.StallEnded="stallended",e.AudioChanged="audiochanged",e.AudioAdded="audioadded",e.AudioRemoved="audioremoved",e.VideoQualityChanged="videoqualitychanged",e.AudioQualityChanged="audioqualitychanged",e.VideoDownloadQualityChange="videodownloadqualitychange",e.AudioDownloadQualityChange="audiodownloadqualitychange",e.VideoDownloadQualityChanged="videodownloadqualitychanged",e.AudioDownloadQualityChanged="audiodownloadqualitychanged",e.VideoPlaybackQualityChanged="videoplaybackqualitychanged",e.AudioPlaybackQualityChanged="audioplaybackqualitychanged",e.TimeChanged="timechanged",e.CueParsed="cueparsed",e.CueEnter="cueenter",e.CueUpdate="cueupdate",e.CueExit="cueexit",e.SegmentPlayback="segmentplayback",e.Metadata="metadata",e.MetadataParsed="metadataparsed",e.MetadataChanged="metadatachanged",e.VideoAdaptation="videoadaptation",e.AudioAdaptation="audioadaptation",e.DownloadFinished="downloadfinished",e.SegmentRequestFinished="segmentrequestfinished",e.AdManifestLoaded="admanifestloaded",e.AdStarted="adstarted",e.OverlayAdStarted="overlayadstarted",e.AdQuartile="adquartile",e.AdSkipped="adskipped",e.AdClicked="adclicked",e.AdInteraction="adinteraction",e.AdLinearityChanged="adlinearitychanged",e.AdBreakStarted="adbreakstarted",e.AdBreakFinished="adbreakfinished",e.RestoringContent="restoringcontent",e.AdFinished="adfinished",e.AdError="aderror",e.VRViewingDirectionChange="vrviewingdirectionchange",e.VRViewingDirectionChanged="vrviewingdirectionchanged",e.VRStereoChanged="vrstereochanged",e.CastAvailable="castavailable",e.CastStopped="caststopped",e.CastStart="caststart",e.CastStarted="caststarted",e.CastWaitingForDevice="castwaitingfordevice",e.SourceLoaded="sourceloaded",e.SourceUnloaded="sourceunloaded",e.PeriodSwitch="periodswitch",e.PeriodSwitched="periodswitched",e.DVRWindowExceeded="dvrwindowexceeded",e.SubtitleAdded="subtitleadded",e.SubtitleRemoved="subtitleremoved",e.ShowAirplayTargetPicker="showairplaytargetpicker",e.AirplayAvailable="airplayavailable",e.AirplayChanged="airplaychanged",e.Destroy="destroy",e.PlaybackSpeedChanged="playbackspeedchanged",e.DurationChanged="durationchanged",e.ViewModeChanged="viewmodechanged",e.ModuleReady="moduleready",e.SubtitleEnable="subtitleenable",e.SubtitleEnabled="subtitleenabled",e.SubtitleDisable="subtitledisable",e.SubtitleDisabled="subtitledisabled",e.VideoQualityAdded="videoqualityadded",e.VideoQualityRemoved="videoqualityremoved",e.AudioQualityAdded="audioqualityadded",e.AudioQualityRemoved="audioqualityremoved",e.TargetLatencyChanged="targetlatencychanged",e.LatencyModeChanged="latencymodechanged",e.LicenseValidated="licensevalidated",e.DrmLicenseAdded="drmlicenseadded",e.AspectRatioChanged="aspectratiochanged",e.VisibilityChanged="visibilitychanged",e.ContentLocationChanged="contentlocationchanged"}(i||(t.PlayerEvent=i={})),function(e){e.CUETAG="CUETAG",e.DATERANGE="DATERANGE",e.EVENT_STREAM="EVENT-STREAM",e.CUSTOM="CUSTOM",e.SCTE="SCTE",e.ID3="ID3",e.EMSG="EMSG",e.CAST="CAST"}(n||(t.MetadataType=n={})),function(e){e.FIRST_QUARTILE="firstQuartile",e.MIDPOINT="midpoint",e.THIRD_QUARTILE="thirdQuartile"}(r||(t.AdQuartile=r={})),function(e){e.Vpaid="vpaid"}(o||(t.AdInteractionType=o={})),function(e){e.Idle="idle",e.Catchup="catchup",e.Fallback="fallback",e.Suspended="suspended"}(a||(t.LatencyMode=a={})),function(e){e.Failover="failover",e.ContentSteering="contentsteering"}(s||(t.ContentLocationChangedReason=s={}))},20213:function(e,t,i){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,i,n){void 0===n&&(n=i);var r=Object.getOwnPropertyDescriptor(t,i);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[i]}}),Object.defineProperty(e,n,r)}:function(e,t,i,n){void 0===n&&(n=i),e[n]=t[i]}),r=this&&this.__exportStar||function(e,t){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(t,i)||n(t,e,i)};Object.defineProperty(t,"__esModule",{value:!0}),t.util=void 0,r(i(3714),t),t.util=i(29960),r(i(62756),t),r(i(44468),t),r(i(21281),t),r(i(3336),t),r(i(40306),t),r(i(4224),t),r(i(25926),t),r(i(95880),t),r(i(22374),t),r(i(29669),t)},88210:function(e,t){"use strict";var i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.EnumerableValue=function(e,t){return t.addInitializer(function(){var e=Object.getOwnPropertyDescriptor(this,t.name)||Object.getOwnPropertyDescriptor(Object.getPrototypeOf(this),t.name);e&&Object.defineProperty(this,t.name,i(i({},e),{enumerable:!0}))}),e}},29691:function(e,t,i){"use strict";var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},r=this&&this.__runInitializers||function(e,t,i){for(var n=arguments.length>2,r=0;r<t.length;r++)i=n?t[r].call(e,i):t[r].call(e);return n?i:void 0},o=this&&this.__esDecorate||function(e,t,i,n,r,o){function a(e){if(void 0!==e&&"function"!=typeof e)throw TypeError("Function expected");return e}for(var s,u=n.kind,c="getter"===u?"get":"setter"===u?"set":"value",l=!t&&e?n.static?e:e.prototype:null,d=t||(l?Object.getOwnPropertyDescriptor(l,n.name):{}),h=!1,p=i.length-1;p>=0;p--){var f={};for(var g in n)f[g]="access"===g?{}:n[g];for(var g in n.access)f.access[g]=n.access[g];f.addInitializer=function(e){if(h)throw TypeError("Cannot add initializers after decoration has completed");o.push(a(e||null))};var m=(0,i[p])("accessor"===u?{get:d.get,set:d.set}:d[c],f);if("accessor"===u){if(void 0===m)continue;if(null===m||"object"!=typeof m)throw TypeError("Object expected");(s=a(m.get))&&(d.get=s),(s=a(m.set))&&(d.set=s),(s=a(m.init))&&r.unshift(s)}else(s=a(m))&&("field"===u?r.unshift(s):d[c]=s)}l&&Object.defineProperty(l,n.name,d),h=!0},a=this&&this.__spreadArray||function(e,t,i){if(i||2==arguments.length)for(var n,r=0,o=t.length;r<o;r++)!n&&r in t||(n||(n=Array.prototype.slice.call(t,0,r)),n[r]=t[r]);return e.concat(n||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.InternalPlayer=t.LOAD_CANCELLED_BY_DESTROY_MESSAGE=t.LOAD_CANCELLED_MESSAGE=void 0;var s,u,c=i(88052),l=i(62756),d=i(90571),h=i(78760),p=i(40306),f=i(3336),g=i(25926),m=i(4224),y=i(48143),v=i(80813),S=i(56481),b=i(45202),E=i(3714),T=i(51289),_=i(75375),A=i(89279),P=i(96859),M=i(13531),I=i(50172),R=i(69957),C=i(44468),O=i(72786),D=i(53031),w=i(29242),N=i(52546),L=i(83913),k=i(70962),U=i(69251),x=i(93907),B=i(23145),F=i(91565),H=i(7387),j=i(98714),V=i(23690),W=i(87827),G=i(85648),q=i(68925),K=i(63879),z=i(69573),Y=i(15971),X=i(30012),Q=i(21513),Z=i(61089),J=i(93204),$=i(47993),ee=i(34841),et=i(85434),ei=i(72537),en=i(89927),er=i(88844),eo=i(23068),ea=i(70850),es=i(2079);!function(e){e[e.NONE=0]="NONE",e[e.MUTED_PLAY=1]="MUTED_PLAY",e[e.UNMUTED_PLAY=2]="UNMUTED_PLAY"}(s||(s={})),function(e){e.DROPPED_VIDEO_FRAMES="droppedVideoFrames",e.TOTAL_STALLED_TIME="totalStalledTime"}(u||(u={})),t.LOAD_CANCELLED_MESSAGE="Load call was cancelled by another load or unload call",t.LOAD_CANCELLED_BY_DESTROY_MESSAGE="Load was cancelled as the player is being destroyed";var eu=function(){var e,i,eu,eg=[];return e=function(){function e(e,t,i){var n=this;if(this.ez=r(this,eg),this.jz=null,this.kz=null,this.sz=Promise.resolve(),this.Dz=["aHR0cHM6Ly9saWNlbnNpbmcuYml0bW92aW4uY29tL2xpY2Vuc2luZw==","aHR0cHM6Ly9zdHJlYW1pbmcubXBlZy1kYXNoLmNvbS9hY2Nlc3M=","aHR0cHM6Ly9saWNlbnNpbmcucGFuZG9yYXN0cmVhbWluZy5jb20vbGljZW5zaW5n","aHR0cHM6Ly9iaXRtb3Zpbi5zdGEuc2N0di5jaC9saWNlbnNpbmc="].map(function(e){return atob(e)}),this.Ez=["aHR0cHM6Ly9saWNlbnNpbmcuYml0bW92aW4uY29tL2ltcHJlc3Npb24=","aHR0cHM6Ly9zdHJlYW1pbmcubXBlZy1kYXNoLmNvbS9wbGF5YmFjaw==","aHR0cHM6Ly9saWNlbnNpbmcucGFuZG9yYXN0cmVhbWluZy5jb20vaW1wcmVzc2lvbg==","aHR0cHM6Ly9iaXRtb3Zpbi5zdGEuc2N0di5jaC9pbXByZXNzaW9u"].map(function(e){return atob(e)}),this.Fz=Promise.resolve(),this.Gz=Promise.resolve(),this.tA=function(e){var t,i,r,o;
1if(void 0===e&&(e="api"),null==(i=null==(t=n.iz)?void 0:t.bitdashPlayer)?void 0:i.unload){var a=Promise.resolve();eh(e)||(a=n.vB(),n.iB(),n.vA()),null==(o=null==(r=n.iz)?void 0:r.eventHandler)||o.clearEventsOfType(E.PlayerEvent.TimeChanged),n.Iz=!1,n.manifestApi=void 0,n.iz.context&&ed(n.iz.context),n.sz=n.sz.then(function(){return a}).then(function(){var t,i;return null==(i=null==(t=n.iz)?void 0:t.bitdashPlayer)?void 0:i.unload(e).then(function(){var t;return null==(t=n.ez)?void 0:t.serviceManager.maybeCall(v.ServiceName.DrmService,function(t){return t.shutdownIfNeeded(eh(e))})}).then(function(){var t,i,r,o,a;n.Cz&&(null==(t=n.Cz)||t.removePosterImage(),null==(i=n.Cz)||i.stopVisibilityTracking()),(null==(o=null==(r=n.iz)?void 0:r.context)?void 0:o.sourceContext)&&(eh(e)?n.iz.context.sourceContext.isAd&&n.uA():null==(a=n.ez)||a.serviceManager.removeNonPlayerScopeServices(),n.iz.context.sourceContext.dispose())})})}return n.sz},this.setAudio=function(e){var t;n.iA()&&(null==(t=n.iz.bitdashPlayer)||t.setAudio(e))},this.lB=function(e){return void 0===e&&(e=n.getSource()),!!e&&!!e.vr&&(0,Q.getCapabilities)().isIOS},this.KB=function(e,t,i){if(void 0===i&&(i={}),e)n.fireEvent(E.PlayerEvent.LicenseValidated,{data:i});else{n.xz=!1,n.Az=n.JB(t);var r=function(){(0,er.clearTimeoutIfDefined)(o),n.off(E.PlayerEvent.SourceLoaded,r),n.off(E.PlayerEvent.SourceUnloaded,r),n.uz&&n.uz.fireError(n.Az)},o=window.setTimeout(r,500);n.on(E.PlayerEvent.SourceLoaded,r),n.on(E.PlayerEvent.SourceUnloaded,r),n.unload()}},this.MB=function(){var e,t,i;"none"!==(null==(i=null==(t=null==(e=n.iz)?void 0:e.videoElement)?void 0:t.style)?void 0:i.getPropertyValue("display"))||n.iz.vrHandler||n.iz.videoElement.style.setProperty("display","block","important")},this.NB=function(){n.iz&&n.iz.videoElement&&n.iz.videoElement.style&&n.iz.videoElement.style.setProperty("display","none","important")},this.ZB=function(){var e=n.iz.configuration.playback().subtitleLanguage;return e?n.OB(e,n.listSubtitles(),function(e){return n.enableSubtitle(e,!0,!1)}):Promise.resolve()},this.aB=function(){var e=n.iz.configuration.playback().audioLanguage;return e?n.OB(e,n.getAvailableAudio(),n.setAudio):Promise.resolve()},this.fB=function(){var e;if(!(null==(e=n.ez.sourceContext)?void 0:e.isAd)&&(n.tA(),n.fz)){var t=n.fz.getElementsByClassName(b.Environment.idPrefix+"poster")[0];t&&(t.style.display="block")}},this.hB=function(){if(n.oz){n.mz.tweaks().hasOwnProperty("impressionServer")&&(n.Ez.indexOf(n.mz.tweaks().impressionServer)>-1?n.oz.setImpressionServerUrl(n.mz.tweaks().impressionServer):n.hz.warn("Invalid impression server",new f.PlayerError(p.ErrorCode.SETUP_INVALID_IMPRESSION_SERVER,{"impression-server":n.mz.tweaks().impressionServer})));var e=n.mz.get("network");n.oz.issue(n.getConfig().key,n.getPlayerType(),null==e?void 0:e.requestApi).then(function(){},function(){})}},this.vC=function(e,t){if(n.isCastingToCAF()&&t.connectionState===G.ConnectionState.Disconnected&&n.kA()&&n.mA().isLinearAdActive()){var i=n.mA().playerAdvertisingApi;n.wC(i)}},this.xC=function(){var e,t=ef(n.ez);(null==(e=n.mA())?void 0:e.isLinearAdActive())||n.ez.sourceContext.isAd?n.fireEvent(E.PlayerEvent.PlaybackFinished):n.Jz||n.Lz||setTimeout(function(){n.Lz=Promise.resolve().then(function(){var e,t;return null!=(t=null==(e=n.mA())?void 0:e.playPostRollAds())?t:Promise.resolve()}).then(function(){var e;return null!=(e=null==t?void 0:t.playPostRollAds())?e:Promise.resolve()}).then(function(){n.Lz=null,n.yC()})})},this.yC=function(){n.oz&&n.oz.reset(),n.Jz=!0,n.fireEvent(E.PlayerEvent.PlaybackFinished)},this.zC=function(){!(n.kA()&&n.getAds()&&n.getAds().isLinearAdActive())&&n.Jz&&(n.Jz=!1),n.zz=n.AC(n.zz)},Object.keys((0,Q.getCapabilities)()).length||(0,Q.default)().dispatch((0,F.initializeCapabilities)()),this.fz=e,this.id=t,this.gz=i,this.Iz=!1,this.hz=new M.Logger(k.DefaultSettings),this.lz=new ei.StorageHandler((0,Q.getCapabilities)().isLocalStorageAvailable),this.mz=null,this.nz=NaN,this.rz=new w.PlayerFactory,this.uz=new T.EventHandler(this.hz,this.gz,this.id),this.yz=s.NONE,c.ModuleManager.has(l.ModuleName.DRM)){var o=c.ModuleManager.get(l.ModuleName.DRM).DRMDetectorService;this.vz=new o,this.drmApi=c.ModuleManager.get(l.ModuleName.DRM).createDrmApi(function(){var e;return null==(e=n.ez)?void 0:e.serviceManager},this.hz)}this.Nz=!1,this.gB()}return e.prototype.fA=function(){return this.ez&&this.ez.store&&(0,W.isBeingDestroyed)(this.ez.store.getState().player)||!1},e.prototype.gA=function(){return this.ez&&this.ez.store&&(0,W.isDestroyed)(this.ez.store.getState().player)||!1},e.prototype.hA=function(){return!!(this.iz&&this.iz.bitdashPlayer)&&!this.gA()},e.prototype.iA=function(){return this.jA()&&this.Iz},e.prototype.jA=function(){return this.hA()&&!!this.iz&&!!this.iz.bitdashPlayer},e.prototype.kA=function(){return!!(this.iz&&this.iz.adController)},e.prototype.lA=function(){c.ModuleManager.get(l.ModuleName.Advert
1ising);var e=c.ModuleManager.get(l.ModuleName.AdvertisingCore);this.iz.adController=new e.AdvertisingController(this,this.iz.context),this.uz&&this.uz.dispatchEvent(E.PlayerEvent.ModuleReady,{name:l.ModuleName.Advertising})},e.prototype.mA=function(){return this.kA()?this.iz.adController:null},e.prototype.nA=function(){if(!this.hA()||!(null==(e=this.iz)?void 0:e.vrHandler))return!1;var e,t=this.iz.vrHandler.getState();return!!t&&"error"!==t},e.prototype.oA=function(e,t){var i;if(!e||!t)return null;if(t.streaming===C.StreamType.Dash)i=e.dash;else if(t.streaming===C.StreamType.Hls)i=e.hls;else if(t.streaming===C.StreamType.Progressive)i=e.progressive;else if(t.streaming===C.StreamType.Smooth)i=e.smooth;else{if(t.streaming!==C.StreamType.Whep)return null;i=e.whep}return i?{type:t.streaming,url:i,title:e.title,description:e.description,vr:e.vr,config:e}:null},e.prototype.pA=function(){var e=new y.ServiceManager;return new D.PlayerContext({container:this.fz,eventHandler:this.iz.eventHandler,config:this.iz.configuration.get(),storedConfig:this.lz,settings:this.iz.configuration.getSettings(),logger:this.hz,serviceManager:e,internalPlayer:this,segmentInfoService:this.Oz,segmentPrefetchingService:this.Pz,segmentCacheService:this.aA,adRestorationOptimizationService:this.bA})},e.prototype.qA=function(e,t){var i=this;if(!this.iz)return Promise.resolve();var n=this.iz.configuration;n.logs&&n.logs().level&&this.setLogLevel(n.logs().level),this.hz.setConfig(n);var r=this.wz;this.iz.videoElement&&(null!=r||(r=this.iz.videoElement.getWrappedElement()),this.iz.videoElement.dispose()),this.ez.setVideoElement(null!=r?r:document.createElement("video"));var o={context:this.ez,playerInstance:this.iz,container:this.fz,config:n,source:e,forceTech:t,styleManager:this.Cz};return this.rA(),this.rz.getInstance(o).then(function(e){var t,n,r;return i.gA()?null==(t=e.bitdashPlayer)?void 0:t.release().then(function(){e.videoElement&&e.videoElement.dispose(),e.bitdashPlayer=null,e.technology=null,e.videoElement=null}):(i.iz.context=e.context,i.iz.logger=e.logger,i.iz.bitdashPlayer=e.bitdashPlayer,i.iz.technology=e.technology,i.iz.videoElement=e.videoElement,i.iz.hasInitStarted=!0,i.iz.playerConfig.visibility="visible",i.sA(i.iz.context),!i.Bz&&i.fz&&(i.Bz=new es.ViewModeHandler(i.iz,i.fz,null!=(r=null==(n=i.uz)?void 0:n.getEventFunction())?r:function(){},i.lB)),i.PB(),Promise.resolve())})},e.prototype.rA=function(){this.dA&&this.dA(),this.eA&&this.eA(),this.dA=(0,J.subscribe)(this.ez.store)(function(e){return(0,W.getIsStopped)((0,W.getPlayerState)(e))},this.xC,function(e){return!0===e}),this.eA=(0,J.subscribe)(this.ez.store)(function(e){return(0,W.getRemoteControlState)((0,W.getPlayerState)(e))},this.vC,function(){return!0})},e.prototype.sA=function(e){this.kA()&&this.mA().updatePlayerContext(e),e.segmentInfoService&&e.segmentInfoService.updatePlayerContext(e),e.segmentPrefetchingService&&e.segmentPrefetchingService.updatePlayerContext(e),e.segmentCacheService&&e.segmentCacheService.updatePlayerContext(e),e.adRestorationOptimizationService&&e.adRestorationOptimizationService.updatePlayerContext(e)},e.prototype.setVideoQuality=function(e){var t;this.iA()&&(e=String(e)||"auto",null==(t=this.iz.bitdashPlayer)||t.setVideoQuality(e))},e.prototype.setAudioQuality=function(e){var t;this.iA()&&(e=String(e)||"auto",null==(t=this.iz.bitdashPlayer)||t.setAudioQuality(e))},e.prototype.uA=function(){this.iz.context.serviceManager.delete(v.ServiceName.SourceStoreService,this.iz.context.sourceContext.sourceIdentifier)},e.prototype.vA=function(){var e,t,i,n,r,o;null==(t=null==(e=this.iz.context)?void 0:e.adRestorationOptimizationService)||t.reset(),null==(n=null==(i=this.iz.context)?void 0:i.segmentPrefetchingService)||n.reset(),null==(o=null==(r=this.ez)?void 0:r.serviceManager)||o.maybeCall(v.ServiceName.ManifestCachingService,function(e){return e.clear()})},e.prototype.unload=function(e){var t,i,n,r,o=this;return void 0===e&&(e="api"),this.Hz=null,eh(e)&&(this.tz=void 0),eh(e)?(this.jB(u.DROPPED_VIDEO_FRAMES,null!=(i=null==(t=this.iz.bitdashPlayer)?void 0:t.getDroppedVideoFrames())?i:0),this.jB(u.TOTAL_STALLED_TIME,null!=(r=null==(n=this.iz.bitdashPlayer)?void 0:n.getTotalStalledTime())?r:0)):(this.jz=null,this.kz=null),this.Fz.finally(function(){return o.tA(e)})},e.prototype.isCasting=function(){var e;return!!(this.jA()&&ec(this.iz.bitdashPlayer)&&this.isCastAvailable())&&!!(null==(e=this.iz.bitdashPlayer)?void 0:e.isCasting())},e.prototype.castVideo=function(){var e;this.jA()&&ec(this.iz.bitdashPlayer)&&this.iz.bitdashPlayer.isCastAvailable()&&(null==(e=this.iz.bitdashPlayer)||e.castVideo())},e.prototype.isCastAvailable=function(){return this.jA()&&ec(this.iz.bitdashPlayer)&&this.iz.bitdashPlayer.isCastAvailable()},e.prototype.seek=function(e,t){if(void 0===t&&(t="api"),this.kA()&&this.mA().isLinearAdActive()||!this.iA())return!1;if((null==(i=this.tz)?void 0:i.seeking)&&el(t))return null==(n=this.ez)||n.logger.debug("Seeking blocked by playback restrictions"),!1;var i,n,r,o,a,s=null==(r=this.iz.bitdashPlayer)?void 0:r.isLive(),u=this.getSeekableRange(),c=-1!==u.start||-1!==u.end;return!!(!s||s&&this.iz.settings.ENABLE_SEEK_FOR_LIVE)&&(this.wA()?(this.Nz=!0,!!(null==(o=this.iz.bitdashPlayer)?void 0:o.seek(e,t))):!!c&&(this.Nz=!0,e=this.xA(e,u),eh(t)||this.isLive()||(e=Math.min(e,u.end-this.iz.settings.SEEK_TO_END_OFFSET)),!!(null==(a=this.iz.bitdashPlayer)?void 0:a.seek(e,t))))},e.prototype.wA=function(){return this.getPlayerType().includes(C.PlayerType.
1Native)},e.prototype.addMetadata=function(e,t){var i;return!(!this.jA()||!ec(this.iz.bitdashPlayer))&&(null==(i=this.iz.bitdashPlayer)?void 0:i.addMetadata(e,t))},e.prototype.xA=function(e,t){if(e<t.start||e>t.end){var i=e;e=Math.min(e=Math.max(e,t.start),t.end),this.hz.debug("seek time out of seekable range ("+t.start+" to "+t.end+") correcting from "+i+" to "+e)}return e},e.prototype.isMuted=function(){var e;return this.jA()?!!(null==(e=this.iz.bitdashPlayer)?void 0:e.isMuted()):this.iz.muted},e.prototype.getAvailableAudio=function(){var e,t;return this.iA()&&null!=(t=null==(e=this.iz.bitdashPlayer)?void 0:e.getAvailableAudio())?t:[]},e.prototype.setAspectRatio=function(e){this.Cz?this.Cz.setAspectRatio(e):this.hz.debug("Unable to set aspect ratio: the style module is missing.")},e.prototype.yA=function(e){var t=this.listSubtitles().find(function(t){return t.id===e});t&&this.fireEvent(E.PlayerEvent.SubtitleEnabled,{subtitle:n({},t)})},e.prototype.zA=function(){var e=this;return Promise.all(this.listSubtitles().filter(function(e){return e.enabled}).map(function(t){return e.disableSubtitle(t.id,!1)}))},e.prototype.enableSubtitle=function(e,t,i){var r=this;void 0===t&&(t=!0),void 0===i&&(i=!0);var o=this.listSubtitles().find(function(t){return t.id===e});return this.iA()&&o&&!o.enabled?(i&&this.fireEvent(E.PlayerEvent.SubtitleEnable,{subtitle:n({},o)}),Promise.resolve().then(function(){return t?r.zA():Promise.all([!1])}).then(function(){var t;return!!(null==(t=r.iz.bitdashPlayer)?void 0:t.enableSubtitle(e))}).then(function(t){return t&&r.yA(e),t})):Promise.resolve(!1)},e.prototype.disableSubtitle=function(e,t){var i=this;if(void 0===t&&(t=!0),this.iA()){var r=this.listSubtitles().find(function(t){return t.id===e});if(r&&r.enabled)return t&&this.fireEvent(E.PlayerEvent.SubtitleDisable,{subtitle:n({},r)}),this.iz.bitdashPlayer?this.iz.bitdashPlayer.disableSubtitle(e).then(function(e){return e&&i.fireEvent(E.PlayerEvent.SubtitleDisabled,{subtitle:n(n({},r),{enabled:!1})}),e}):Promise.resolve(!1)}return Promise.resolve(!1)},e.prototype.preload=function(){var e,t;this.iA()&&!this.isLive()&&(this.Nz||this.bB(this.iz.source,!!(null==(e=this.iz.bitdashPlayer)?void 0:e.isLive())),null==(t=this.iz.bitdashPlayer)||t.preload())},e.prototype.mute=function(e){var t;this.iz.muted=!0,this.jA()&&(this.kA()&&!this.isMuted()&&this.mA().onVolumeChanged(0),this.qz=this.getVolume(),null==(t=this.iz.bitdashPlayer)||t.mute(e))},e.prototype.unmute=function(e){var t;if(this.iz.muted=!1,this.jA()){if(this.kA()&&this.isMuted()){var i=isNaN(this.qz)?100:this.qz;this.qz=NaN,this.mA().onVolumeChanged(i)}null==(t=this.iz.bitdashPlayer)||t.unmute(e)}},e.prototype.listSubtitles=function(){var e,t;return this.iA()?a([],null!=(t=null==(e=this.iz.bitdashPlayer)?void 0:e.listSubtitles().map(function(e){return n({},e)}))?t:[],!0):[]},e.prototype.getDuration=function(e){var t,i;return void 0===e&&(e="api"),this.jA()?!eh(e)&&this.IA()?this.mA().getDuration():this.iA()&&null!=(i=null==(t=this.iz.bitdashPlayer)?void 0:t.getDuration())?i:0:0},e.prototype.setVolume=function(e,t){var i;this.iz.volume=e,this.jA()&&(null==(i=this.iz.bitdashPlayer)||i.setVolume(e,t),this.kA()&&this.mA().onVolumeChanged(e))},e.prototype.timeShift=function(e,t){var i,n,r;(null==(i=this.tz)?void 0:i.seeking)&&el(t)?null==(n=this.ez)||n.logger.debug("Time shift blocked by playback restrictions"):this.iA()&&(e=this.AA(e),null==(r=this.iz.bitdashPlayer)||r.timeShift(e,t),this.Nz=!0)},e.prototype.AA=function(e){if(e<=0)return e;var t,i=(0,en.toSeconds)(Date.now());this.wA()||(i-=null==(t=this.bufferApi.getLevel(C.BufferType.ForwardDuration,C.MediaType.Video))?void 0:t.targetLevel);var n=Math.min(e-i,0);return this.hz.debug("Timeshifting to timestamp: ".concat(e,", converted relative offset is: ").concat(n)),n},e.prototype.setQueryParameters=function(e){var t;this.jA()&&(null==(t=this.iz.bitdashPlayer)||t.setQueryParameters(e))},e.prototype.clearQueryParameters=function(){var e;this.jA()&&(null==(e=this.iz.bitdashPlayer)||e.clearQueryParameters())},e.prototype.showAirplayTargetPicker=function(){var e;this.jA()&&(null==(e=this.iz.bitdashPlayer)||e.showAirplayTargetPicker())},e.prototype.getVolume=function(){var e,t;return this.jA()?null!=(t=null==(e=this.iz.bitdashPlayer)?void 0:e.getVolume())?t:0:this.iz.volume},e.prototype.getLatency=function(){var e,t;return this.iA()&&null!=(t=null==(e=this.iz.bitdashPlayer)?void 0:e.getLatency())?t:0},e.prototype.setTargetLatency=function(e){var t;this.iA()&&("number"!=typeof e||e<0?this.LB("lowlatency.setLiveLatency","Invalid value: ".concat(e),"value","".concat(e)):null==(t=this.iz.bitdashPlayer)||t.setTargetLatency(e))},e.prototype.getTargetLatency=function(){var e,t;return this.iA()?null!=(t=null==(e=this.iz.bitdashPlayer)?void 0:e.getTargetLatency())?t:0:-1},e.prototype.setCatchupConfig=function(e){var t;this.iA()&&(null==(t=this.iz.bitdashPlayer)||t.setCatchupConfig(e))},e.prototype.getCatchupConfig=function(){var e,t;return this.iA()&&null!=(t=null==(e=this.iz.bitdashPlayer)?void 0:e.getCatchupConfig())?t:null},e.prototype.setFallbackConfig=function(e){var t;this.iA()&&(null==(t=this.iz.bitdashPlayer)||t.setFallbackConfig(e))},e.prototype.getFallbackConfig=function(){var e,t;return this.iA()&&null!=(t=null==(e=this.iz.bitdashPlayer)?void 0:e.getFallbackConfig())?t:null},e.prototype.getCurrentTime=function(e,t){var i,n;return void 0===e&&(e="api"),void 0===t&&(t=C.TimeMode.AbsoluteTime),this.IA()&&!eh(e)?this.mA().getCurrentTime():this.iA()&&null!=(n=null==(i=this.iz.bitdashPlayer)?void 0:i.getCurrentTime(t))?n:0},e.prototype.setTargetBufferLevel=function(e,t,i){var n;if(this.jA()){var r=Object.keys(C.BufferType).some(function(t){return e===C.BufferType[t]}),o=Object.keys(C.MediaType).some(function(e){return i===C.MediaType[e]});r?o?"number"!=typeof t||t<0?this.LB("buffer.setTargetLevel","Invalid value: ".concat(t),"value","".concat(t)):null==(n=this.iz.bitdashPlayer)||n.setTargetBufferLevel(e,t,i):this.LB("buffer.setTargetLevel","Invalid media type: ".concat(i),"media","".concat(i)):this.LB("buffer.setTargetLevel","Invalid buffer type: ".concat(e),"type","".concat(e))}},e.prototype.getBufferLevel=function(e,t){var i,n,r={level:null,targetLevel:null,type:e,media:t};return this.jA()&&this.BA(e,t)&&null!=(n=null==(i=this.iz.bitdashPlayer)?void 0:i.getBufferLevel(e,t))?n:r},e.prototype.BA=function(e,t){var i=Object.keys(C.BufferType).some(function(t){return e===C.BufferType[t]}),n=Object.keys(C.MediaType).some(function(e){return t===C.MediaType[e]});return i&&n},e.prototype.getAudioBufferLength=function(){return this.iA()?this.getBufferLevel(C.BufferType.ForwardDuration,C.MediaType.Audio).level:null},e.prototype.getVideoBufferLength=function(){return this.iA()?this.getBufferLevel(C.BufferType.ForwardDuration,C.MediaType.Video).level:null},e.prototype.getMaxTimeShift=function(){var e,t;return this.iA()&&null!=(t=null==(e=this.iz.bitdashPlayer)?void 0:e.getMaxTimeShift())?t:0},e.prototype.getTimeShift=function(){var e,t;return this.iA()&&null!=(t=null==(e=this.iz.bitdashPlayer)?void 0:e.getTimeShift())?t:0},e.prototype.isStalled=function(){var e;return this.iA()&&!!(null==(e=this.iz.bitdashPlayer)?void 0:e.isStalled())},e.prototype.isLive=function(){var e;return this.iA()&&!!(null==(e=this.iz.bitdashPlayer)?void 0:e.isLive())},e.prototype.hasEnded=function(){var e;return this.iA()&&!!(null==(e=this.iz.bitdashPlayer)?void 0:e.hasEnded())},e.prototype.getAvailableVideoQualities=function(){var e,t;return this.iA()&&null!=(t=null==(e=this.iz.bitdashPlayer)?void 0:e.getAvailableVideoQualities())?t:[]},e.prototype.getAvailableAudioQualities=function(){var e,t;return this.iA()&&null!=(t=null==(e=this.iz.bitdashPlayer)?void 0:e.getAvailableAudioQualities())?t:[]},e.prototype.CA=function(){var e;return this.jA()&&!!this.iz.videoElement&&!!(null==(e=this.iz.videoElement)?void 0:e.isPictureInPicture())},e.prototype.isAirplayAvailable=function(){var e;return this.jA()&&!!(null==(e=this.iz.bitdashPlayer)?void 0:e.isAirplayAvailable())},e.prototype.isAirplayActive=function(){var e;return this.jA()&&!!(null==(e=this.iz.bitdashPlayer)?void 0:e.isAirplayActive())},e.prototype.getDownloadedVideoData=function(){var e,t;return this.iA()&&null!=(t=null==(e=this.iz.bitdashPlayer)?void 0:e.getDownloadedVideoData())?t:{i
1d:"",bitrate:0,height:0,width:0,isAuto:!0}},e.prototype.getDownloadedAudioData=function(){var e,t;return this.iA()&&null!=(t=null==(e=this.iz.bitdashPlayer)?void 0:e.getDownloadedAudioData())?t:{id:"",bitrate:0,isAuto:!0}},e.prototype.getPlaybackVideoData=function(){var e,t;return this.iA()&&null!=(t=null==(e=this.iz.bitdashPlayer)?void 0:e.getPlaybackVideoData())?t:{id:"",bitrate:0,height:0,width:0,uid:void 0}},e.prototype.getPlaybackAudioData=function(){var e,t;return this.iA()&&null!=(t=null==(e=this.iz.bitdashPlayer)?void 0:e.getPlaybackAudioData())?t:{id:"",bitrate:0}},e.prototype.getAspectRatio=function(){var e,t;return null!=(t=null==(e=this.Cz)?void 0:e.getAspectRatio())?t:0},e.prototype.getVisibility=function(){var e;return(null==(e=this.Cz)?void 0:e.getVisibility())||{isVisible:!1,percentVisible:0}},e.prototype.getAudio=function(){var e,t;return this.iA()&&null!=(t=null==(e=this.iz.bitdashPlayer)?void 0:e.getAudio())?t:null},e.prototype.getBufferedRanges=function(){var e,t;return this.iA()&&null!=(t=null==(e=this.iz.bitdashPlayer)?void 0:e.getBufferedRanges())?t:[]},e.prototype.getAvailableSegments=function(){var e,t;return this.iA()&&null!=(t=null==(e=this.iz.bitdashPlayer)?void 0:e.getAvailableSegments())?t:{}},e.prototype.getAudioQuality=function(){var e,t;return this.iA()&&null!=(t=null==(e=this.iz.bitdashPlayer)?void 0:e.getAudioQuality())?t:{id:"auto",bitrate:null}},e.prototype.getManifest=function(){return this.kz},e.prototype.getDroppedVideoFrames=function(){var e,t;return this.uC(u.DROPPED_VIDEO_FRAMES,!(this.kA()&&this.mA().isLinearAdActive()),this.jA()&&null!=(t=null==(e=this.iz.bitdashPlayer)?void 0:e.getDroppedVideoFrames())?t:0)},e.prototype.getTotalStalledTime=function(){var e,t;return this.uC(u.TOTAL_STALLED_TIME,!(this.kA()&&this.mA().isLinearAdActive()),this.jA()&&null!=(t=null==(e=this.iz.bitdashPlayer)?void 0:e.getTotalStalledTime())?t:0)},e.prototype.getVideoQuality=function(){var e,t;return this.iA()&&null!=(t=null==(e=this.iz.bitdashPlayer)?void 0:e.getVideoQuality())?t:{id:"auto",bitrate:null,width:null,height:null}},e.prototype.DA=function(e){var t=this;return new Promise(function(i){var n,r,o=!1,a=!1,s=function(){t.off(E.PlayerEvent.AdBreakStarted,s),o=!0,t.Nz=!1},u=function(){t.off(E.PlayerEvent.AdStarted,u),t.Kz=null,a=!0,i()};t.on(E.PlayerEvent.AdBreakStarted,s),t.on(E.PlayerEvent.AdStarted,u),t.iz.context.serviceManager.get(v.ServiceName.PlayerStateService).transitionToPlayState(!0,e),(null!=(r=null==(n=t.mA())?void 0:n.playPreRollAds())?r:Promise.resolve()).then(function(){var e,i;return null!=(i=null==(e=ef(t.ez))?void 0:e.playPreRollAds())?i:Promise.resolve()}).then(function(){t.Kz=null,t.isContentPlaying()||o&&a||!t.Iz?i():i(t.play(e))}).finally(function(){t.off(E.PlayerEvent.AdBreakStarted,s),t.off(E.PlayerEvent.AdStarted,u)})})},e.prototype.isCastingToCAF=function(){var e=(0,W.getRemoteControlState)(this.ez.store.getState().player);return e.remoteControlType===G.RemoteControlType.GoogleCastV3&&e.connectionState!==G.ConnectionState.Disconnected},e.prototype.EA=function(){if(this.hasCurrentSourcePlayedOnce())return!1;var e=this.mA(),t=ef(this.ez);return!1===(null==e?void 0:e.hasAlreadyRequestedPreRollAds())||!0===(null==t?void 0:t.shouldPlayPreRollAds())},e.prototype.FA=function(){if(this.isCasting())return!1;var e=this.yz===s.NONE,t=this.yz===s.MUTED_PLAY;return e||!this.isMuted()&&t},e.prototype.GA=function(){var e=this;this.iz.vrHandler&&this.iz.vrHandler.requestDeviceOrientationPermission().then(function(){return e.hz.debug("Device orientation permission granted")}).catch(function(){return e.hz.debug("Device orientation permission denied")})},e.prototype.play=function(e){var t=this;return void 0===e&&(e="api"),this.HA(e)?this.Kz?this.Kz.then(function(){return t.mA().play()}):this.mA().play():this.iA()?this.EA()&&!this.isCastingToCAF()?this.Kz=this.DA(e):(this.Nz||this.ez.sourceContext.isAd||this.bB(this.iz.source,this.isLive()),this.GA(),this.iz.bitdashPlayer?this.iz.bitdashPlayer.play(e).then(function(){t.yz=t.AC(t.yz),t.setPlaybackSpeed(t.iz.playbackSpeed)}).catch(function(i){var n;return t.hz.debug("playback could not be started: ",i),t.FA()&&(t.fireEvent(E.PlayerEvent.Warning,new g.PlayerWarning(m.WarningCode.PLAYBACK_COULD_NOT_BE_STARTED)),!t.isCasting()&&t.Iz&&t.pause(),i instanceof Error&&"NotAllowedError"===i.name&&(null==(n=t.iz.context.serviceManager.get(v.ServiceName.PlayerStateService))||n.transitionToPausedState(!0,e))),Promise.reject(i)}):Promise.reject("Player is not available.")):Promise.reject(new f.PlayerError(p.ErrorCode.SOURCE_INVALID,void 0,"No source was loaded when `play()` was called. Please call `load()` first, and wait for the promise to resolve before calling `play()`."))},e.prototype.HA=function(e){if(eh(e))return!1;var t=!!this.Kz;return this.IA()||t},e.prototype.IA=function(){return!!this.kA()&&this.mA().isLinearAdActive()},e.prototype.pause=function(e){var t,i=this;void 0===e&&(e="api"),this.HA(e)?this.Kz?this.Kz.then(function(){return i.mA().pause()}):this.mA().pause():this.iA()&&(null==(t=this.iz.bitdashPlayer)||t.pause(e))},e.prototype.castStop=function(){var e;this.jA()&&ec(this.iz.bitdashPlayer)&&(null==(e=this.iz.bitdashPlayer)||e.castStop())},e.prototype.setLogLevel=function(e){this.hz.setLogLevel(e)},e.prototype.getLogger=function(){return this.hz},e.prototype.JA=function(e,t,i){var n;this.iz&&this.iz.eventHandler?n=this.iz.eventHandler:this.uz&&(n=this.uz),n.on(e,t,i)},e.prototype.onInternal=function(e,t){this.JA(e,t,!0)},e.prototype.on=function(e,t){this.JA(e,t,!1)},e.prototype.off=function(e,t){this.iz&&this.iz.eventHandler?this.iz.eventHandler.off(e,t):this.uz&&this.uz.off(e,t)},e.prototype.KA=function(e){var t;return{context:null,logger:this.hz,container:this.fz,bitdashPlayer:null,eventHandler:this.uz,videoElement:null,adController:null,vrHandler:null,hasInitStarted:!1,technology:{player:C.PlayerType.Unknown,streaming:C.StreamType.Unknown},playerConfig:null,configuration:null,settings:null,source:null,volume:null!=(t=e.playback().volume)?t:100,muted:e.playback().muted||!1,playbackSpeed:1}},e.prototype.LA=function(){try{for(var e=0;this.fz.getElementsByClassName(b.Environment.idPrefix+"error").length>0&&(this.fz.removeChild(this.fz.getElementsByClassName(b.Environment.idPrefix+"error")[0]),!(++e>10)););}catch(e){this.hz.debug("Error removing container error element")}},e.prototype.MA=function(e){if(!this.iz.playerConfig.isAdPlayer){var t,i=this.mz.licensing().delay,n=this.mz.tweaks();(i||0===i)&&!isNaN(i)&&i>=0&&(t=i);var r=this.Dz[0];n.licenseServer&&(this.Dz.includes(n.licenseServer)?r=n.licenseServer:this.hz.warn("Invalid license server",new f.PlayerError(p.ErrorCode.SETUP_INVALID_LICENSE_SERVER,{"license-server":n.licenseServer}))),this.pz=P.LicenseCall.getInstance(this.hz,r,e.key),this.pz.setDelay(t);var o=this.mz.get("network");this.pz.issue(this.KB,null==o?void 0:o.requestApi)}},e.prototype.NA=function(e){this.mz=new d.PlayerConfiguration(e),this.lz.setDisabled(!!(null==(t=e.storage)?void 0:t.disableStorageApi)),this.iz=this.iz||this.KA(this.mz),this.iz.configuration=this.mz,this.iz.settings=this.mz.getSettings(),this.hz.setSettings(this.iz.settings),this.hz.setLogLevel(this.mz.get("logs").level),null==(i=this.uz)||i.addFromObject(this.mz.get("events")),this.hz.setConfig(this.mz);var t,i,n=this.mz.tweaks().log_level;if(n&&this.setLogLevel(n),this.iz.settings.ENABLE_PERFORMANCE_LOGS&&(0,R.setPerformanceTrackingLogger)(this.hz),c.ModuleManager.has(l.ModuleName.XML)&&c.ModuleManager.get(l.ModuleName.XML).setLogger(this.hz),this.mz.get("logs").bitmovin&&(this.hz.forceLogBeautified("Adaptive Video Streaming Service by www.bitmovin.com","blue","14"),this.hz.forceLogBeautified("Player Version "+b.Environment.VERSION_NUMBER,"black","12")),(0,h.validateAppIdConfig)(this.mz),this.iz.playerConfig={isAdPlayer:!1,prefix:"",visibility:"visible"},this.fz&&(this.fz.player=this.gz,this.LA()),this.MA(e),c.ModuleManager.has(l.ModuleName.Style)){var r=c.ModuleManager.get(l.ModuleName.Style).StyleManager;
vendor: 7,244 bytes, line 1
1this.Cz=new r(this,this.iz)}c.ModuleManager.callSetupHooks(this.gz),this.ez=this.pA()},e.prototype.postSetup=function(){this.CB(),this.dB()},e.prototype.setup=function(e){if(!b.Environment.checkDomainLock())throw new f.PlayerError(p.ErrorCode.SETUP_MISSING_DOMAIN_LICENSE_ALLOWLIST,void 0,"The player is not authorized to play content on the current domain.");return this.NA(e)},e.prototype.addSubtitle=function(e){var t,i=this,r=n(n({},e),{kind:(null==e?void 0:e.kind)||"subtitles",id:null!=(null==e?void 0:e.id)?String(null==e?void 0:e.id):void 0,label:(null==e?void 0:e.label)||(null==e?void 0:e.lang),isSideloaded:!0});if(function(e){return e&&"object"==typeof e&&("string"==typeof e.id||(0,eo.isNumber)(e.id))&&"string"==typeof e.lang&&["caption","captions","subtitle","subtitles"].includes(e.kind)}(r)){if(this.iA()&&!r.isFragmented){var o=r.enabled||!1;r.enabled=!1,null==(t=this.iz.bitdashPlayer)||t.addSubtitle(r).then(function(){o&&i.enableSubtitle(r.id,!1,!1)}).catch(function(){return function(){}})}}else this.fireEvent(E.PlayerEvent.Warning,new g.PlayerWarning(m.WarningCode.API_INVALID_ARGUMENT,"Invalid subtitle track: ".concat(JSON.stringify(e)," Please check the documentation for expected properties."),{method:"subtitles.add",parameter:"subtitle",argument:e}))},e.prototype.removeSubtitle=function(e){var t;this.iA()&&(null==(t=this.iz.bitdashPlayer)||t.removeSubtitle(e))},e.prototype.getContainer=function(){return this.fz},e.prototype.setVRStereo=function(e){return!(!this.hA()||!this.nA()||"boolean"!=typeof e)&&this.iz.vrHandler.setStereo(e)},e.prototype.getStreamType=function(){var e,t;return this.iA()&&null!=(t=null==(e=this.iz.technology)?void 0:e.streaming)?t:C.StreamType.Unknown},e.prototype.getPlayerType=function(){var e,t;return this.iA()&&null!=(t=null==(e=this.iz.technology)?void 0:e.player)?t:C.PlayerType.Unknown},e.prototype.getSupportedTech=function(e){switch(e){case C.SupportedTechnologyMode.Platform:return a([],(0,Q.getCapabilities)().techSupportedByPlatform,!0);case C.SupportedTechnologyMode.Modules:return a([],(0,Q.getCapabilities)().techSupportedByModules,!0);case C.SupportedTechnologyMode.PlatformAndModules:return a([],(0,Q.getCapabilities)().techSupportedByModulesOnPlatform,!0);default:return this.fireEvent(E.PlayerEvent.Warning,new g.PlayerWarning(m.WarningCode.API_INVALID_ARGUMENT,"Invalid mode '".concat(e,"'"),{method:"getSupportedTech",parameter:"mode",argument:"".concat(e)})),[]}},e.prototype.getVR=function(){return this.nA()?this.iz.vrHandler:null},e.prototype.getAds=function(){return this.hA()&&this.kA()?this.iz.adController.playerAdvertisingApi:(null==this.getConfig().advertising||c.ModuleManager.has(l.ModuleName.Advertising)||this.hz.warn("A required player module is missing: Advertising"),null)},e.prototype.getSgaiAPI=function(){return this.hA()&&ef(this.ez)?ef(this.ez).getSgaiPlayerAPI():(c.ModuleManager.has(l.ModuleName.AdvertisingCore)&&c.ModuleManager.has(l.ModuleName.SGAI)||this.hz.warn("A required player module is missing: Advertising Core and/or SGAI"),null)},e.prototype.OA=function(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(e){this.hz.log("Could not parse JSON string given as source: "+e.message)}return e&&"object"==typeof e?e:null},e.prototype.PA=function(e){var t;void 0===e&&(e=!1),this.iz&&this.fz&&((t=this.iz.playerConfig&&this.iz.playerConfig.hasOwnProperty("prefix")?document.getElementById(b.Environment.idPrefix+""+this.iz.playerConfig.prefix+"vr-canvas"):document.getElementById(b.Environment.idPrefix+"vr-canvas"))&&t.parentNode&&t.parentNode.removeChild(t),this.fz&&e&&delete this.fz.player)},e.prototype.QA=function(e){var t=!1,i=null;e&&(e.hasOwnProperty("options")&&e.options&&e.options.hasOwnProperty("persistentPoster")&&(t=e.options.persistentPoster),i=e.poster),this.setPosterImage(i,t)},e.prototype.RA=function(e){if(e)return["dash","hls","progressive","smooth","whep","poster","drm","title","description","options","tracks","labeling","vr"].forEach(function(t){e.hasOwnProperty(t)&&!e[t]&&delete e[t]}),e},e.prototype.SA=function(e){var t,i=e.vr,n=(0,Q.getCapabilities)(),r=!!i,o=n[H.CapabilityKey.isIOS];if(r&&o){var a=n[H.CapabilityKey.isInlinePlaybackRestricted];i.restrictedInlinePlayback=a,(null==(t=this.Bz)?void 0:t.isFullscreen())&&this.setViewMode(C.ViewMode.Inline),a&&(i.audioElement=ea.Util.getVRAudioElement(),this.fz.appendChild(i.audioElement.getWrappedElement()))}},e.prototype.TA=function(e,t,i,n){var r;return this.iz.source=e,this.iz.loadOptions=t,(null==(r=this.iz.technology)?void 0:r.player)===i.player?(this.iz.technology=i,Promise.resolve()):this.UA(e,i,n)},e.prototype.UA=function(e,t,i){var n=this,r=function(){var t;n.gA()||(null==(t=n.uz)||t.off(E.PlayerEvent.Error,r),n.QA(e))};return this.onInternal(E.PlayerEvent.Error,r),this.iz.vrHandler=null,this.VA(i).then(function(){return n.qA(e,t)}).then(function(){return n.SA(e)}).catch(function(e){return e&&e.hasOwnProperty("code")&&e.hasOwnProperty("message")&&n.uz?n.uz.fireError(e):e&&n.hz.error(e),Promise.reject(e)})},e.prototype.VA=function(e){var t=this;return this.iz&&this.iz.bitdashPlayer?this.iz.bitdashPlayer.release(e).then(function(){t.iz.bitdashPlayer=null,t.PA()}).catch(function(e){return t.hz.error("There was a problem removing the current player: ".concat(e))}):Promise.resolve()},e.prototype.WA=function(e,t,i){return t===_.ADVERTISING_ISSUER_NAME&&e.canReuseEmeHandler()?e.reInitializeEmeHandler():e.isDrmConfigSet()?void 0:e.setDrmConfig(i)},e.prototype.XA=function(e,t,i){var n=this,r=this.oA(e,this.iz.technology);return this.iz.bitdashPlayer&&r?this.iz.bitdashPlayer.load(r,t.restrictions).then(function(){e.drm&&n.ez.serviceManager.maybeCall(v.ServiceName.DrmService,function(t){return n.WA(t,i,e.drm)})}).catch(function(e){return e&&e.code&&e.message&&n.uz?n.uz.fireError(e):e&&n.hz.debug("Failed to load source:",e),Promise.reject(e)}):Promise.reject("Could not load source from configuration.")},e.prototype.YA=function(e){return!!this.Hz&&(this.Hz.reject(Error(e)),this.Hz=null,!0)},e.prototype.ZA=function(e){this.iz.bitdashPlayer&&e.set(v.ServiceName.StartOffsetService,new B.StartOffsetService(this.iz.bitdashPlayer)),e.set(v.ServiceName.MetadataParsedService,new I.MetadataParsedService(this.iz.context)),e.set(v.ServiceName.StallTimeTrackerService,new x.StallTimeTrackerService(this.iz.context)),e.set(v.ServiceName.ThumbnailService,function(e){if(c.ModuleManager.has(l.ModuleName.Thumbnail))return c.ModuleManager.get(l.ModuleName.Thumbnail).createThumbnailService(e)}(this.iz.context)),e.set(v.ServiceName.PlayerStateService,new N.PlayerStateService(this.iz.context))},e.prototype.load=function(e,i,n,r){var o=this;void 0===r&&(r="api");var a=r===_.ADVERTISING_ISSUER_NAME;eh(r)||ep(r)||(this.Nz=!1,this.zz=s.NONE,this.Jz=!1,this.jz=null,this.kz=null);var u=this.Hz=new ee.Deferred;return this.tz=n,this.Fz=this.Fz.then(function(){return o.kB(e,{forceTechnology:i,restrictions:n},r)}).catch(function(e){return o.uB(u,e)}),this.Gz=this.Gz.then(function(){return o.Fz}).then(function(){if(!eh(r))return o.eB()}).then(function(){return function(e,i){return e===i?Promise.resolve():Promise.reject(Error(t.LOAD_CANCELLED_MESSAGE))}(u,o.Hz)}).then(function(){!function(e,t,i){var n,r=ea.Util.toHash(t)+e.context.
1internalPlayerID,o=new U.SourceContext({source:t,isAd:i,technology:e.technology,sourceIdentifier:r,mseObjectUrl:null==(n=e.videoElement)?void 0:n.src}),a=e.context;a.setSourceContext(o),a.serviceManager.has(v.ServiceName.SourceStoreService,r)||function(e,t){var i=new Z.StoreService(e.store,"sources",t);e.serviceManager.set(v.ServiceName.SourceStoreService,i,t),i.addReducers(z.staticSourceReducers)}(a,r)}(o.iz,e,a),o.ZA(o.iz.context.serviceManager),o.CC(r),o.pB()}).then(function(){return Promise.race([o.qB(e,{forceTechnology:i,restrictions:n},r),u.promise])}).then(u.resolve).then(function(){var e,t,i=null==(e=o.ez.videoElement)?void 0:e.getWrappedElement();i&&(null==(t=o.Cz)||t.maybeStartTrackingVisibility(i))}).catch(function(e){return o.uB(u,e)}),u.promise},e.prototype.kB=function(e,t,i){var n,r=this;return null==(n=this.uz)||n.resetErrors(),this.tA(i).then(function(){r.wB(e);var n=function(e,t,i){var n=ea.Util.splitPlayerAndStreamingTechnology(i);return(0,$.getBestTech)(e.playback().preferredTech,t,n)}(r.mz,e,t.forceTechnology),o=r.yB(e,n);return r.hz.debug("Using technology: ".concat(o.player,".").concat(o.streaming)),r.xB(e),r.mB(e),r.QA(e),r.TA(r.OA(e),t,o,i)})},e.prototype.mB=function(e){e.hasOwnProperty("vr")&&(0,Q.getCapabilities)().isIOS&&(0,Q.getCapabilities)().isInlinePlaybackRestricted&&(e.vr.audioElement=ea.Util.getVRAudioElement(),e.vr.restrictedInlinePlayback=!0),e.hasOwnProperty("vr")&&e.vr.audioElement&&this.fz.appendChild(e.vr.audioElement.getWrappedElement())},e.prototype.nB=function(e){if(c.ModuleManager.has(l.ModuleName.DRM)&&e.drm&&!this.ez.serviceManager.has(v.ServiceName.DrmService)){var t=c.ModuleManager.get(l.ModuleName.DRM).DrmService;this.ez.serviceManager.set(v.ServiceName.DrmService,new t(this.ez))}},e.prototype.oB=function(){var e;this.ez.serviceManager.has(v.ServiceName.RecoveryService)||!1===(null==(e=this.getConfig().playback)?void 0:e.allowDecodingErrorRecovery)||this.ez.serviceManager.set(v.ServiceName.RecoveryService,new L.RecoveryService(this.ez))},e.prototype.pB=function(){!this.ez.serviceManager.has(v.ServiceName.ManifestCachingService)&&this.cA&&this.ez.serviceManager.set(v.ServiceName.ManifestCachingService,this.cA)},e.prototype.qB=function(e,t,i){var n=this,r=this.ez.sourceContext.sourceIdentifier;return this.ez.serviceManager.maybeCall(v.ServiceName.SourceStoreService,function(e){return e.dispatch((0,q.resetLoadedRanges)())},null,r),this.BC(i,r),this.sB(i,r),this.oB(),this.nB(e),this.vz&&this.ez.serviceManager.set(v.ServiceName.DrmDetectorService,this.vz),this.rB().then(function(){return n.XA(e,t,i)}).then(function(){return n.postSetup(),n.AB(e.subtitleTracks),function(e,t){t.maybeCall(v.ServiceName.ThumbnailService,function(t){e&&e.thumbnailTrack&&t.addThumbnails(e.thumbnailTrack.url)})}(e,n.iz.context.serviceManager),n.tB(e,i)}).then(function(){var e,t,i;null==(e=(0,Y.getSourceStore)(n.ez))||e.dispatch((0,K.setMseObjectUrl)(null!=(i=null==(t=n.iz.videoElement)?void 0:t.src)?i:"")),n.fireEvent(E.PlayerEvent.SourceLoaded)})},e.prototype.rB=function(){return this.iz.bitdashPlayer?this.iz.bitdashPlayer.prepareLoad():Promise.reject("Could not load source from configuration.")},e.prototype.sB=function(e,t){eh(e)||ep(e)||!this.ez||(this.ez.serviceManager.maybeCall(v.ServiceName.SourceStoreService,function(e){return e.dispatch((0,X.initializeStartTimeOffset)())},null,t),this.ez.serviceManager.has(v.ServiceName.ManifestCachingService,t)||(this.ez.serviceManager.set(v.ServiceName.ManifestCachingService,this.cA,t),this.ez.serviceManager.maybeCall(v.ServiceName.ManifestCachingService,function(e){return e.clear()},null,t)))},e.prototype.tB=function(e,t){var i,n,r,o;return this.BB(),eh(t)?(this.iz.context.serviceManager.get(v.ServiceName.PlayerStateService).transitionToPlayState(!1,t),Promise.resolve()):ep(t)?(this.kz=null!=(n=null==(i=this.iz.bitdashPlayer)?void 0:i.getManifest())?n:"",Promise.resolve()):(this.oz&&this.oz.reset(),this.jz=e,this.kz=null!=(o=null==(r=this.iz.bitdashPlayer)?void 0:r.getManifest())?o:"",this.QB())},e.prototype.uB=function(e,t){this.off(E.PlayerEvent.Error,this.fB),e.reject(t)},e.prototype.vB=function(){var e,t,i,n=this,r=ef(this.ez);if(!this.kA()&&!r)return Promise.resolve();var o=(null==(e=this.mA())?void 0:e.isLinearAdActive())||!!this.Kz,a=!this.Iz&&o;return(null!=(i=null==(t=this.mA())?void 0:t.reset())?i:Promise.resolve()).then(function(){var e;return null!=(e=null==r?void 0:r.reset())?e:Promise.resolve()}).then(function(){n.Kz=null,a&&n.fireEvent(E.PlayerEvent.SourceUnloaded)})},e.prototype.wB=function(e){this.gA()&&this.zB(p.ErrorCode.API_NOT_AVAILABLE,"Cannot load the source: the player has already been destroyed.");var t=this.RA(e),i=Object.values(C.StreamType).filter(function(e){return e!==C.StreamType.Unknown});if(t&&i.some(function(e){return t.hasOwnProperty(e)})||this.zB(p.ErrorCode.SOURCE_INVALID,"Cannot load the source: the provided source config has no usable stream.",{source:e}),!this.xz)throw this.Az},e.prototype.xB=function(e){var t,i=!!(null==(t=e.options)?void 0:t.shouldRecreateSourceBuffersOnPeriodSwitch);
vendor: 56,402 bytes, line 1
1i!==k.DefaultSettings.DASH_CLEAR_BUFFERS_ON_PERIOD_SWITCHES&&(this.hz.debug("Overriding default setting: `DASH_CLEAR_BUFFERS_ON_PERIOD_SWITCHES = ".concat(i,"`")),k.DefaultSettings.DASH_CLEAR_BUFFERS_ON_PERIOD_SWITCHES=i,this.ez&&(this.ez.settings=this.iz.configuration.getSettings()))},e.prototype.yB=function(e,t){var i=(0,Q.getCapabilities)().techSupportedByPlatform;return i.length<1&&this.zB(p.ErrorCode.SOURCE_NO_SUPPORTED_TECHNOLOGY,"The platform does not support any of the technologies needed to play back the provided source."),!t&&e.hasOwnProperty("vr")&&this.zB(p.ErrorCode.VR_INCOMPATIBLE_PLAYER_TECHNOLOGY,"This platform does not support VR playback."),t||this.zB(p.ErrorCode.SOURCE_NO_SUPPORTED_TECHNOLOGY,"This platform only supports these technologies: ".concat(JSON.stringify(i),".")),t},e.prototype.zB=function(e,t,i){var n,r=new f.PlayerError(e,i,t,null==(n=this.ez.sourceContext)?void 0:n.sourceIdentifier);throw this.uz&&this.uz.fireError(r),r},e.prototype.AB=function(e){var t=this;!this.subtitlesApi&&c.ModuleManager.has(l.ModuleName.Subtitles)&&(this.subtitlesApi=c.ModuleManager.get(l.ModuleName.Subtitles).PlayerSubtitlesApiFactory.build(this),this.fireEvent(E.PlayerEvent.ModuleReady,{name:l.ModuleName.Subtitles})),e&&Array.isArray(e)&&e.forEach(function(e){return t.addSubtitle(e)})},e.prototype.BB=function(){var e,t=null==(e=this.iz.bitdashPlayer)?void 0:e.createManifestApi();t&&(this.manifestApi=t)},e.prototype.CB=function(){if(this.iz.source&&this.iz.source.hasOwnProperty("vr")&&this.hA())if("function"==typeof window.requestAnimationFrame){var e=c.ModuleManager.get(l.ModuleName.VR).VRHandler;this.iz.vrHandler=new e(this.iz.context,this.id,this.iz.source.vr,ea.Util.getVRAudioElement(),this.hz,navigator,this.iz.settings),this.fireEvent(E.PlayerEvent.ModuleReady,{name:l.ModuleName.VR})}else this.hz.warn("VR unavailable","This platform does not support VR")},e.prototype.getConfig=function(e){return void 0===e&&(e=!1),this.mz?e?this.mz.get():this.mz.getUserConfig():{}},e.prototype.getSnapshot=function(e,t){var i;if(this.iA())return null==(i=this.iz.bitdashPlayer)?void 0:i.getSnapshot(e,t)},e.prototype.setPlaybackSpeed=function(e,t){var i,n,r;if(void 0===t&&(t="api"),!isNaN(e=Number(e))&&e>0){if((null==(i=this.tz)?void 0:i.playbackRate)&&el(t))return void(null==(n=this.ez)||n.logger.debug("Playback rate changes blocked by playback restrictions"));this.iz.playbackSpeed=e,this.jA()&&(null==(r=this.iz.bitdashPlayer)||r.setPlaybackSpeed(e))}},e.prototype.getPlaybackSpeed=function(){var e,t;return this.jA()&&null!=(t=null==(e=this.iz.bitdashPlayer)?void 0:e.getPlaybackSpeed())?t:1},e.prototype.DB=function(){var e=this;return new Promise(function(t,i){if(e.Bz&&e.getViewMode()!==C.ViewMode.Inline){var n=function(){t(),e.off(E.PlayerEvent.ViewModeChanged,n)};e.on(E.PlayerEvent.ViewModeChanged,n),e.Bz.setViewMode(C.ViewMode.Inline)}else t()})},e.prototype.destroy=function(){var e,t=this;return this.fA()?Promise.resolve():(null==(e=this.ez)||e.store.dispatch((0,V.setDestroyState)(G.DestroyState.Destroying)),c.ModuleManager.callDestroyHooks(this.gz).then(function(){return t.DB()}).then(function(){return t.FB()}).then(function(){var e,i;null==(e=t.ez)||e.store.dispatch((0,V.setDestroyState)(G.DestroyState.Destroyed)),null==(i=t.uz)||i.setBeingDestroyed(),t.GB()}).then(function(){return t.Gz}).then(function(){return t.tA()}).then(function(){return t.HB()}).then(function(){t.ez&&(t.EB(),t.ez.dispose(),t.ez=null)}))},e.prototype.EB=function(){this.dA&&this.dA(),this.eA&&this.eA(),this.dA=null,this.eA=null},e.prototype.FB=function(){var e=this;return new Promise(function(t){var i=function(){(0,er.clearTimeoutIfDefined)(n),e.off(E.PlayerEvent.Destroy,i),t()},n=window.setTimeout(i,250);e.on(E.PlayerEvent.Destroy,i),e.fireEvent(E.PlayerEvent.Destroy,{},!1,!1)})},e.prototype.GB=function(){this.YA(t.LOAD_CANCELLED_BY_DESTROY_MESSAGE),(0,er.clearTimeoutIfDefined)(this.nz)},e.prototype.HB=function(){var e=this;if(!this.iz)return Promise.resolve();var t=Promise.resolve();return this.PA(!0),ea.Util.removeVRAudioElement(),this.iz.adController=(0,S.dispose)(this.iz.adController),this.iz.vrHandler=null,this.Bz&&(this.Bz=(0,S.dispose)(this.Bz)),this.Oz=(0,S.dispose)(this.Oz),this.Pz=(0,S.dispose)(this.Pz),this.aA=(0,S.dispose)(this.aA),this.bA=(0,S.dispose)(this.bA),this.cA=(0,S.dispose)(this.cA),this.oz.dispose(),this.iz.bitdashPlayer?t=this.iz.bitdashPlayer.release().then(function(){return e.ez.serviceManager.maybeCall(v.ServiceName.DrmService,function(e){return e.release()})}).finally(function(){e.IB(),e.iz.bitdashPlayer=null}):this.IB(),this.iz.context&&ed(this.iz.context),this.vz=(0,S.dispose)(this.vz),this.Cz=(0,S.dispose)(this.Cz),this.uz=(0,S.dispose)(this.uz),this.lz=null,t},e.prototype.IB=function(){if(this.iz.videoElement){var e=this.iz.videoElement.getWrappedElement();this.iz.videoElement=(0,S.dispose)(this.iz.videoElement),this.fz&&e&&e!==this.wz&&this.fz.removeChild(e)}},e.prototype.JB=function(e){if(!e)return new f.PlayerError(p.ErrorCode.SETUP_LICENSE_ERROR,{"error-message":"No license information was returned from the server"});if(e.message&&e.message.includes("Your player is not allowed to play on the domain"))return new f.PlayerError(p.ErrorCode.SETUP_MISSING_LICENSE_ALLOWLIST,{"error-message":e.message});if(e.hasOwnProperty("validationInformation")){for(var t="",i=0;i<e.validationInformation.length;i++)t+=e.validationInformation[i].key+": ",t+=e.validationInformation[i].errorMessage,i<e.validationInformation.length-1&&(t+="</br>");return new f.PlayerError(p.ErrorCode.SETUP_LICENSE_ERROR,{"error-message":t})}return e.hasOwnProperty("message")?new f.PlayerError(p.ErrorCode.SETUP_LICENSE_ERROR,{"error-message":e.message}):void 0},e.prototype.permitControl=function(e){this.iz&&this.iz.bitdashPlayer&&ea.Util.isFunction(this.iz.bitdashPlayer.permitControl)&&this.iz.bitdashPlayer.permitControl(e)},e.prototype.LB=function(e,t,i,n){this.fireEvent(E.PlayerEvent.Warning,new g.PlayerWarning(m.WarningCode.API_INVALID_ARGUMENT,t,{method:e,parameter:i,argument:n}))},e.prototype.fireEvent=function(e,t,i,n){this.uz&&this.uz.getEventFunction()(e,t,i,n)},e.prototype.isPlaying=function(){return this.isContentPlaying()||this.isAdPlaying()},e.prototype.isContentPlaying=function(){var e;return this.iA()&&!!(null==(e=this.iz.bitdashPlayer)?void 0:e.isPlaying())},e.prototype.isAdPlaying=function(){return this.kA()&&this.mA().isPlaying()},e.prototype.isPaused=function(){return this.isContentPaused()||this.isAdPaused()},e.prototype.isContentPaused=function(){var e;return this.iA()&&!!(null==(e=this.iz.bitdashPlayer)?void 0:e.isPaused())},e.prototype.isAdPaused=function(){return this.kA()&&this.mA().isPaused()},e.prototype.setVideoElement=function(e){this.wz=e},e.prototype.getVideoElement=function(){return this.wz?this.wz:this.iz&&this.iz.videoElement?this.iz.videoElement.getWrappedElement():null},e.prototype.isDRMSupported=function(e){return this.vz?this.vz.isSupported(e):Promise.reject("DRM module not loaded")},e.prototype.getSupportedDRM=function(){return this.vz?this.vz.getSupported():Promise.reject("DRM module not loaded")},e.prototype.setAuthentication=function(e){this.pz.setCustomData(e)},e.prototype.setPosterImage=function(e,t){this.Cz?this.Cz.setPosterImage(e,t):this.hz.debug("Unable to set poster image because style module is missing")},e.prototype.getThumbnail=function(e){var t;return this.jA()?function(e,t,i){return i.maybeCall(v.ServiceName.ThumbnailService,function(i){return i.getThumbnail(e,t)})}(e,{width:this.getContainer().clientWidth,height:this.getContainer().clientHeight,isFullscreen:!!(null==(t=this.Bz)?void 0:t.isFullscreen())},this.iz.context.serviceManager):null},e.prototype.getSeekableRange=function(){var e,t;return this.iA()&&null!=(t=null==(e=this.iz.bitdashPlayer)?void 0:e.getSeekableRange())?t:{start:-1,end:-1}},e.prototype.OB=function(e,t,i){var n;t=[].concat(t);for(var r=function(e){if(n=t.find(function(t){return t.lang===e}))return"break"},o=0,a=e=[].concat(e);o<a.length&&"break"!==r(a[o]);o++);return n?Promise.resolve(i(n.id)):Promise.resolve()},e.prototype.PB=function(){var e=this.iz.configuration.buffer();this.cB(e)},e.prototype.QB=function(){return this.VB().then(this.aB).then(this.ZB)},e.prototype.RB=function(){if(this.iz.configuration.playback().playsInline&&void 0!==this.ez.videoElement){var e=this.ez.videoElement.getWrappedElement();e.setAttribute("webkit-playsinline",""),e.setAttribute("playsinline","")}},e.prototype.SB=function(){this.isLive()||this.EA()||this.bB(this.iz.source,!1)},e.prototype.TB=function(){var e,t;null!=(t=null==(e=this.iz.vrHandler)?void 0:e.deviceOrientationPermissionRequired())&&t?this.hz.debug("Autoplay disabled: user permission is required to access device orientation data for VR playback"):this.YB()},e.prototype.UB=function(){var e=this.isLive(),t=this.iz.configuration.playback(),i=this.iz.configuration.adaptation();t.autoplay?this.TB():this.WB(i,e)&&this.preload()},e.prototype.VB=function(){var e=this;return new Promise(function(t){(0,er.clearTimeoutIfDefined)(e.nz),e.iz&&e.iz.bitdashPlayer?(e.RB(),e.SB(),e.UB(),t()):e.nz=window.setTimeout(function(){t(e.QB())},100)})},e.prototype.WB=function(e,t){return!t&&("boolean"!=typeof e.preload||e.preload)},Object.defineProperty(e.prototype,"XB",{get:function(){return this.Hz&&this.Hz.promise||Promise.resolve()},enumerable:!1,configurable:!0}),e.prototype.YB=function(){var e=this;this.XB.then(function(){return e.play()}).catch(function(){return e.hz.insane("Autoplay not triggered because current load call failed")})},e.prototype.bB=function(e,t){var i=this.iz.context.serviceManager.get(v.ServiceName.StartOffsetService).getStartOffset(e);t?this.timeShift(i,_.STARTUP_ISSUER_NAME):this.seek(i,_.STARTUP_ISSUER_NAME)},e.prototype.cB=function(e){var t=this;Object.keys(e).forEach(function(i){Object.keys(e[i]).forEach(function(n){if(t.BA(n,i)){var r=e[i][n];t.setTargetBufferLevel(n,r,i)}})})},e.prototype.dB=function(){this.iz&&(this.Iz=!0,this.setVolume(this.iz.volume),this.setPlaybackSpeed(this.iz.playbackSpeed),this.iz.muted?this.mute():this.unmute())},e.prototype.eB=function(){var e;if(this.getConfig().advertising){if(!this.kA())try{this.lA()}catch(e){this.hz.warn(e)}null==(e=this.iz.adController)||e.initializeAdModule()}},e.prototype.gB=function(){var e=this;this.xz=!0,this.Ez&&this.Ez.length>0&&(this.oz=new A.ImpressionCall(this.hz,this.Ez[0])),this.onInternal(E.PlayerEvent.Error,this.fB),this.onInternal(E.PlayerEvent.Warning,function(t){return e.hz.warn(t.message)}),this.onInternal(E.PlayerEvent.Playing,this.hB),this.onInternal(E.PlayerEvent.SourceLoaded,this.MB),this.on(E.PlayerEvent.SourceUnloaded,this.NB),this.on(E.PlayerEvent.Playing,this.zC),this.bufferApi=O.PlayerBufferApiFactory.create(this),c.ModuleManager.has(l.ModuleName.LowLatency)&&(this.lowLatencyApi=c.ModuleManager.get(l.ModuleName.LowLatency).LowLatencyApiFactory.create(this)),c.ModuleManager.has(l.ModuleName.ABR)&&(this.adaptationApi=c.ModuleManager.get(l.ModuleName.ABR).AdaptationApiFactory.create(this)),c.ModuleManager.has(l.ModuleName.EngineBitmovin)&&(this.Oz=new(c.ModuleManager.get(l.ModuleName.EngineBitmovin)).SegmentInfoService,this.Pz=new(c.ModuleManager.get(l.ModuleName.EngineBitmovin)).SegmentPrefetchingService,this.aA=new(c.ModuleManager.get(l.ModuleName.EngineBitmovin)).SegmentCacheService,this.bA=new(c.ModuleManager.get(l.ModuleName.EngineBitmovin)).AdRestorationOptimizationService,this.cA=new(c.ModuleManager.get(l.ModuleName.EngineBitmovin)).ManifestCachingService),this.iB()},e.prototype.iB=function(){this.Mz=new Map,this.Mz.set(u.DROPPED_VIDEO_FRAMES,0),this.Mz.set(u.TOTAL_STALLED_TIME,0)},e.prototype.jB=function(e,t){this.Mz.has(e)&&this.Mz.set(e,this.Mz.get(e)+t)},e.prototype.uC=function(e,t,i){return this.Mz.get(e)+(t?i:0)},e.prototype.wC=function(e){var t=e.getActiveAdBreak(),i=e.list().filter(function(e){return e.scheduleTime===t.scheduleTime});[t].concat(i).forEach(function(t){return e.discardAdBreak(t.id)})},e.prototype.updateCallback=function(e){},e.prototype.onFullscreenEnter=function(){},e.prototype.onFullscreenExit=function(){},e.prototype.getViewMode=function(){return this.ez?(0,W.getPlayerState)(this.ez.store.getState()).viewMode:C.ViewMode.Inline},e.prototype.isViewModeAvailable=function(e){var t;return this.iA()?!!(null==(t=this.Bz)?void 0:t.isViewModeAvailable(e)):[C.ViewMode.Fullscreen,C.ViewMode.Inline].includes(e)},e.prototype.setViewMode=function(e,t){void 0===t&&(t={}),this.Bz&&this.Bz.setViewMode(e,t)},e.prototype.addExternalEventFilter=function(e){this.uz&&this.uz.addExternalEventFilter(e)},e.prototype.removeExternalEventFilter=function(e){this.uz&&this.uz.removeExternalEventFilter(e)},e.prototype.getSource=function(){return this.jz},e.prototype.getLoadOptions=function(){var e;return this.iA()&&(null==(e=this.iz)?void 0:e.loadOptions)||null},e.prototype.hasCurrentSourcePlayedOnce=function(){return this.zz!==s.NONE},e.prototype.AC=function(e){var t=this.isMuted()?s.MUTED_PLAY:s.UNMUTED_PLAY;return t>e?t:e},e.prototype.BC=function(e,t){if(this.ez&&c.ModuleManager.has(l.ModuleName.ABR))for(var i=c.ModuleManager.get(l.ModuleName.ABR).AdaptationUtils,n=eh(e)?0:i.getStartupBitrateFromConfig(this.ez),r=this.ez.serviceManager.get(v.ServiceName.SourceStoreService,t),o=0,a=Object.values(et.MimeType);o<a.length;o++){var s=a[o];r.dispatch((0,j.setPreferredBitrateForMimeTypeAction)(s,n))}},e.prototype.CC=function(e){var t;if(!eh(e)&&c.ModuleManager.has(l.ModuleName.SGAI)&&this.ez.settings.ENABLE_SGAI_HANDLING){if(!this.ez.serviceManager.has(v.ServiceName.SgaiService)){var i=c.ModuleManager.get(l.ModuleName.SGAI);this.ez.serviceManager.set(v.ServiceName.SgaiService,new i.SgaiService(this.ez))}null==(t=ef(this.ez))||t.initialize()}},e}(),function(){var t="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;i=[(0,R.trackPerformance)("InternalPlayer.load")],eu=[(0,R.trackPerformance)("InternalPlayer.destroy")],o(e,null,i,{kind:"method",name:"load",static:!1,private:!1,access:{has:function(e){return"load"in e},get:function(e){return e.load}},metadata:t},null,eg),o(e,null,eu,{kind:"method",name:"destroy",static:!1,private:!1,access:{has:function(e){return"destroy"in e},get:function(e){return e.destroy}},metadata:t},null,eg),t&&Object.defineProperty(e,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:t})}(),e}();function ec(e){return null!=e&&"isCastAvailable"in e}function el(e){return"api"===e||e===_.UI_SEEK_ISSUER_NAME}function ed(e){[v.ServiceName.MetadataParsedService,v.ServiceName.StartOffsetService,v.ServiceName.PlayerStateService,v.ServiceName.StallTimeTrackerService,v.ServiceName.ThumbnailService].forEach(function(t){return(0,y.disposeService)(e.serviceManager,t)})}function eh(e){return e===_.ADVERTISING_ISSUER_NAME||e===_.ADVERTISING_RESTORE_ISSUER_NAME}function ep(e){return e===_.RECOVERY_ISSUER_NAME}function ef(e){var t;return null==(t=null==e?void 0:e.serviceManager)?void 0:t.get(v.ServiceName.SgaiService)}t.InternalPlayer=eu},75375:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RECOVERY_ISSUER_NAME=t.UI_SEEK_ISSUER_NAME=t.INTERNAL_ISSUER_NAME=t.ADVERTISING_RESTORE_ISSUER_NAME=t.ADVERTISING_ISSUER_NAME=t.STARTUP_ISSUER_NAME=void 0,t.STARTUP_ISSUER_NAME="startup",t.ADVERTISING_ISSUER_NAME="advertising-api",t.ADVERTISING_RESTORE_ISSUER_NAME="advertising-restore",t.INTERNAL_ISSUER_NAME="internal",t.UI_SEEK_ISSUER_NAME="ui-seek",t.RECOVERY_ISSUER_NAME="error-recovery"},99266:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LogLevels=void 0,t.LogLevels={DEBUG:"debug",LOG:"log",WARN:"warn",ERROR:"error",OFF:"off"}},13531:function(e,t,i){"use strict";var n=this&&this.__spreadArray||function(e,t,i){if(i||2==arguments.length)for(var n,r=0,o=t.length;r<o;r++)!n&&r in t||(n||(n=Array.prototype.slice.call(t,0,r)),n[r]=t[r]);return e.concat(n||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.Logger=t.LogLevel=void 0;var r,o=i(99266),a=i(44468);!function(e){e[e.OFF=0]="OFF",e[e.INSANE=1]="INSANE",e[e.DEBUG=2]="DEBUG",e[e.LOG=3]="LOG",e[e.WARN=4]="WARN",e[e.ERROR=5]="ERROR"}(r||(t.LogLevel=r={})),t.Logger=function(){function e(e,t){void 0===t&&(t=r.WARN),this.fG=e,this.setLogLevel(t)}return e.prototype.setConfig=function(e){this.gG=e.logs&&"function"==typeof e.logs().onLog?e.logs().onLog:void 0},e.prototype.setLogLevel=function(t){"string"==typeof t&&(t=e.parseLogLevel(t)),this.eG=t},e.prototype.getLogLevel=function(){return this.eG},e.prototype.isLevelEnabled=function(e){return void 0!==this.gG&&e!==r.INSANE||this.eG!==r.OFF&&this.eG<=e},e.prototype.setSettings=function(e){this.fG=e},e.parseLogLevel=function(e){switch(e){case o.LogLevels.DEBUG:return r.DEBUG;case o.LogLevels.LOG:return r.LOG;case o.LogLevels.WARN:return r.WARN;case o.LogLevels.ERROR:return r.ERROR;default:return r.OFF}},e.prototype.hG=function(e,t,i){var o,s,u,c=function(e){switch(e){case r.INSANE:case r.DEBUG:return a.LogLevel.DEBUG;case r.LOG:return a.LogLevel.LOG;case r.WARN:return a.LogLevel.WARN;case r.ERROR:return a.LogLevel.ERROR;default:return null}}(e),l=n([],i,!0);if(this.eG>0&&this.eG<=e&&("string"==typeof this.fG.LOG_PREFIX&&this.fG.LOG_PREFIX.length>0?(o=console[c]).call.apply(o,n([console,this.fG.LOG_PREFIX,t],l,!1)):(s=console[c]).call.apply(s,n([console,t],l,!1))),this.gG&&e!==r.INSANE)try{(u=this.gG).call.apply(u,n([null,c,t],l,!1))}catch(e){}},e.prototype.insane=function(e){for(var t=[],i=1;i<arguments.length;i++)t[i-1]=arguments[i];this.hG(r.INSANE,e,t)},e.prototype.debug=function(e){for(var t=[],i=1;i<arguments.length;i++)t[i-1]=arguments[i];this.hG(r.DEBUG,e,t)},e.prototype.log=function(e){for(var t=[],i=1;i<arguments.length;i++)t[i-1]=arguments[i];this.hG(r.LOG,e,t)},e.prototype.warn=function(e){for(var t=[],i=1;i<arguments.length;i++)t[i-1]=arguments[i];this.hG(r.WARN,e,t)},e.prototype.error=function(e){for(var t=[],i=1;i<arguments.length;i++)t[i-1]=arguments[i];this.hG(r.ERROR,e,t)},e.prototype.forceLogBeautified=function(e,t,i){navigator.userAgent.indexOf("Trident/")>-1||navigator.userAgent.indexOf("Edge/")>-1?console.log(e):console.log("%c"+e,"color:"+t+";font-weight:bold;font-size:"+i+"px;")},e}()},1001:function(e,t){"use strict";var i,n;Object.defineProperty(t,"__esModule",{value:!0}),t.NalUnitTypeHevc=t.NalUnitTypeAvc=t.VisualSampleEntryTypes=void 0,t.VisualSampleEntryTypes={Avc:["avc1","avc2","avc3"],Hvc:["hvc1","hev1"]},function(e){e[e.SEI=6]="SEI"}(i||(t.NalUnitTypeAvc=i={})),function(e){e[e.SEI=39]="SEI"}(n||(t.NalUnitTypeHevc=n={}))},75108:function(e,t){"use strict";var i,n;Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorCodeMap=t.MediaErrorCode=void 0,function(e){e[e.MEDIA_ERR_NETWORK=2]="MEDIA_ERR_NETWORK",e[e.MEDIA_ERR_DECODE=3]="MEDIA_ERR_DECODE",e[e.MEDIA_ERR_SRC_NOT_SUPPORTED=4]="MEDIA_ERR_SRC_NOT_SUPPORTED"}(i||(t.MediaErrorCode=i={})),function(e){e[e.MEDIA_ERR_DECODE=1301]="MEDIA_ERR_DECODE",e[e.MEDIA_ERR_NETWORK=1400]="MEDIA_ERR_NETWORK",e[e.MEDIA_ERR_SRC_NOT_SUPPORTED=1204]="MEDIA_ERR_SRC_NOT_SUPPORTED"}(n||(t.ErrorCodeMap=n={}))},50172:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MetadataParsedService=void 0;var n=i(3714),r=i(58735),o=i(89927);t.MetadataParsedService=function(){function e(e){this.XW=1.3,this.UW=e.eventHandler,this.UW.on(n.PlayerEvent.SourceUnloaded,this.YW),this.YW()}return e.prototype.YW=function(){this.WW={},this.VW=1/0},e.prototype.addMetadata=function(e,t){if(this.ZW(),[n.MetadataType.EVENT_STREAM,n.MetadataType.DATERANGE].includes(t.metadataType)){var i=(0,r.calculateMetadataHash)(t,e);if(this.WW[i])return;this.WW[i]=Date.now()}this.UW.dispatchEvent(n.PlayerEvent.MetadataParsed,t)},e.prototype.ZW=function(){for(var e=0,t=Object.keys(this.WW);e<t.length;e++){var i=t[e];this.aW(this.WW[i])&&delete this.WW[i]}},e.prototype.aW=function(e){if(!e)return!0;var t=(0,o.toMilliSeconds)(this.VW*this.XW);return Date.now()-t>e},Object.defineProperty(e.prototype,"expirationTimeInSeconds",{get:function(){return this.VW},set:function(e){this.VW=Math.abs(e)},enumerable:!1,configurable:!0}),e.prototype.dispose=function(){this.WW=null,this.UW.off(n.PlayerEvent.SourceUnloaded,this.YW)},e}()},29669:function(e,t){"use strict";var i,n,r,o;Object.defineProperty(t,"__esModule",{value:!0}),t.NetworkRequestApi=t.HttpRequestMethod=t.HttpResponseType=t.HttpRequestType=void 0,function(e){e.MANIFEST_DASH="manifest/dash",e.MANIFEST_HLS_MASTER="manifest/hls/master",e.MANIFEST_HLS_VARIANT="manifest/hls/variant",e.MANIFEST_SMOOTH="manifest/smooth",e.MANIFEST_ADS="manifest/ads",e.MANIFEST_STEERING="manifest/steering",e.MEDIA_AUDIO="media/audio",e.MEDIA_VIDEO="media/video",e.MEDIA_SUBTITLES="media/subtitles",e.MEDIA_THUMBNAILS="media/thumbnails",e.MEDIA_SEGMENTINDEX="media/segmentindex",e.DRM_LICENSE_WIDEVINE="drm/license/widevine",e.DRM_LICENSE_PLAYREADY="drm/license/playready",e.DRM_LICENSE_FAIRPLAY="drm/license/fairplay",e.DRM_LICENSE_PRIMETIME="drm/license/primetime",e.DRM_LICENSE_CLEARKEY="drm/license/clearkey",e.DRM_LICENSE_TVKEY="drm/license/tvkey",e.DRM_CERTIFICATE_FAIRPLAY="drm/certificate/fairplay",e.HLS_INTERSTITIALS_ASSET_LIST="hls/interstitials/asset-list",e.KEY_HLS_AES="key/hls/aes",e.TIME_SYNC="time/sync",e.WEBRTC_SDP_REQUEST="webrtc/sdp/request",e.WEBRTC_SDP_ANSWER="webrtc/sdp/answer",e.WEBRTC_SDP_OFFER="webrtc/sdp/offer",e.UNKNOWN="unknown",e.INTERNAL="internal"}(i||(t.HttpRequestType=i={})),function(e){e.ARRAYBUFFER="arraybuffer",e.BLOB="blob",e.DOCUMENT="document",e.JSON="json",e.TEXT="text"}(n||(t.HttpResponseType=n={})),function(e){e.GET="GET",e.POST="POST",e.HEAD="HEAD",e.PATCH="PATCH"}(r||(t.HttpRequestMethod=r={})),function(e){e.XHR="xhr",e.Fetch="fetch"}(o||(t.NetworkRequestApi=o={}))},69957:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setPerformanceTrackingLogger=function(e){i=e},t.trackPerformance=function(e,t){return void 0===t&&(t=!1),function(i,s){return function(){for(var s=[],u=0;u<arguments.length;u++)s[u]=arguments[u];var c=a(n),l=c.callStack,d=c.parent,h=Date.now(),p=o(),f=function(e,t){var i={method:t,isAsync:!1,next:null,subtractions:[]};return e.next=i,i}(d,e),g=function(){var i=o()-p;if(r({name:e,start:h,duration:i,callStack:l}),t&&(d.subtractions=d.subtractions||[],d.subtractions.push({name:e,duration:i})),f.subtractions&&f.subtractions.length){var n=f.subtractions.map(function(e){return e.name}).join(", "),a=f.subtractions.reduce(function(e,t){return e+t.duration},0);r({name:"".concat(e," without ").concat(n),duration:i-a,start:Date.now()})}!function(e){e.isAsync&&e.next.isAsync||(e.next=null)}(d)},m=i.apply(this,s);return m instanceof Promise?(function(e){e.isAsync=!0}(d.next),m.then(g,g)):g(),m}}},t.trackPerformanceStart=function(e){var t=o();s[e]&&u(e,t),s[e]=t},t.trackPerformanceEnd=function(e){u(e,o()),delete s[e]};var i,n={};function r(e){i&&i.debug("[Performance] ".concat(e.name," lasted ").concat(Math.floor(e.duration),"ms"),e)}function o(){var e,t;return(null==(e=performance.now)?void 0:e.call(performance))||(null==(t=performance.webkitNow)?void 0:t.call(performance))||Date.now()}function a(e,t){void 0===t&&(t=[]);var i=e.next,n=e.method;return n&&t.push(n),i?a(i,t):{callStack:t,parent:e}}var s={};function u(e,t){i&&r({name:e,start:s[e],duration:t-s[e]})}},51072:function(e,t,i){"use strict";var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.PlayPromise=void 0;var r=i(88844),o=i(19274);t.PlayPromise=function(){function e(e,t,i){var o=this;this.c8=function(){var e=function(){(0,r.clearTimeoutIfDefined)(o.Z8),o.Y8&&o.Y8.isLicenseRequestOngoing()?o.Z8=setTimeout(e,o.W8.settings.PLAYBACK_TIMEOUT):o.i8({code:0,name:"NotAllowedError",message:"user interaction required"})};o.Z8=setTimeout(e,o.W8.settings.PLAYBACK_TIMEOUT)},this.g8=function(){o.f8(),o.a8()},this.h8=function(e,t){return o.i8(n(n({},t),{eventName:e}))},this.i8=function(e){o.f8();var t=e;e&&e.type&&(t="error"===e.type?n(n({},e),{name:"NotSupportedError",message:"The operation is not supported"}):n(n({},e),{name:"AbortError",message:"The play call was interrupted by ".concat(e.type)})),o.b8(t)},this.W8=e,this.X8=t,this.Y8=i}return e.prototype.d8=function(){var t=this,i=function(i){var r=e.eventMapping[i];n.X8.addEventListener(i,r?n.g8:function(e){return t.h8(i,e)})},n=this;for(var r in e.eventMapping)i(r);4===this.X8.readyState?this.c8():this.X8.addEventListener(o.MediaElementEvent.canplay,this.c8)},e.prototype.e8=function(){for(var t in e.eventMapping){var i=e.eventMapping[t];this.X8.removeEventListener(t,i?this.g8:this.i8)}this.X8.removeEventListener(o.MediaElementEvent.canplay,this.c8)},e.prototype.f8=function(){(0,r.clearTimeoutIfDefined)(this.Z8),this.e8()},e.prototype.j8=function(){var e=this;return new Promise(function(t,i){e.a8=t,e.b8=i,e.d8()})},e.new=function(t,i,n){return new e(t,i,n).j8()},e.eventMapping={playing:!0,ended:!0,pause:!1,abort:!1,emptied:!1,error:!1},e}()},43662:function(e,t,i){"use strict";var n=this&&this.__runInitializers||function(e,t,i){for(var n=arguments.length>2,r=0;r<t.length;r++)i=n?t[r].call(e,i):t[r].call(e);return n?i:void 0},r=this&&this.__esDecorate||function(e,t,i,n,r,o){function a(e){if(void 0!==e&&"function"!=typeof e)throw TypeError("Function expected");return e}for(var s,u=n.kind,c="getter"===u?"get":"setter"===u?"set":"value",l=!t&&e?n.static?e:e.prototype:null,d=t||(l?Object.getOwnPropertyDescriptor(l,n.name):{}),h=!1,p=i.length-1;p>=0;p--){var f={};for(var g in n)f[g]="access"===g?{}:n[g];for(var g in n.access)f.access[g]=n.access[g];f.addInitializer=function(e){if(h)throw TypeError("Cannot add initializers after decoration has completed");o.push(a(e||null))};var m=(0,i[p])("accessor"===u?{get:d.get,set:d.set}:d[c],f);if("accessor"===u){if(void 0===m)continue;if(null===m||"object"!=typeof m)throw TypeError("Object expected");(s=a(m.get))&&(d.get=s),(s=a(m.set))&&(d.set=s),(s=a(m.init))&&r.unshift(s)}else(s=a(m))&&("field"===u?r.unshift(s):d[c]=s)}l&&Object.defineProperty(l,n.name,d),h=!0};Object.defineProperty(t,"__esModule",{value:!0}),t.Player=void 0;var o,a=i(88052),s=i(40306),u=i(3336),c=i(45202),l=i(20213),d=i(88210),h=i(29691),p=i(69957),f=i(44468),g=i(70850),m=0;function y(){o||(o=new WeakMap)}function v(e,t){y();var i=o.get(e);if(!i)throw new f.PlayerAPINotAvailableError(t);return i}t.Player=function(){var e,t,i,S,b,E,T,_,A,P,M,I,R,C,O=[];return e=function(){function e(e,t){n(this,O),this.a(e,t)}return e.prototype.a=function(e,t){if(!(e instanceof HTMLElement))throw new u.PlayerError(s.ErrorCode.SETUP_NO_HTML_ELEMENT,void 0,"The player container must be an HTMLElement.");y();var i=new h.InternalPlayer(e,g.Util.generateUniqueId(),this);o.set(this,i),m++,i.setup(t)},Object.defineProperty(e.prototype,"version",{get:function(){return c.Environment.VERSION_NUMBER},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"vr",{get:function(){return v(this,"vr").getVR()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"buffer",{get:function(){return v(this,"buffer").bufferApi},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"lowlatency",{get:function(){return v(this,"lowlatency").lowLatencyApi},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"adaptation",{get:function(){return v(this,"adaptation").adaptationApi},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"subtitles",{get:function(){return v(this,"subtitles").subtitlesApi},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"manifest",{get:function(){return v(this,"manifest").manifestApi},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"drm",{get:function(){return v(this,"drm").drmApi},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ads",{get:function(){return v(this,"ads")?o.get(this).getAds():null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"sgai",{get:function(){return v(this,"sgai")?o.get(this).getSgaiAPI():null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"analytics",{get:function(){return v(this,"analytics").analyticsApi},set:function(e){v(this,"analytics").analyticsApi=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"exports",{get:function(){return l},enumerable:!1,configurable:!0}),e.prototype.on=function(e,t){v(this,"on").on(e,t)},e.prototype.addMetadata=function(e,t){return v(this,"addMetadata").addMetadata(e,t)},e.prototype.castStop=function(){v(this,"cast").castStop()},e.prototype.castVideo=function(){v(this,"castVideo").castVideo()},e.prototype.clearQueryParameters=function(){v(this,"clearQueryParameters").clearQueryParameters()},e.prototype.destroy=function(){var e=v(this,"destroy").destroy();return o.delete(this),m--,e},e.prototype.getAspectRatio=function(){return v(this,"getAspectRatio").getAspectRatio()},e.prototype.getAudio=function(){return v(this,"getAudio").getAudio()},e.prototype.getAudioBufferLength=function(){return v(this,"getAudioBufferLength").getAudioBufferLength()},e.prototype.getAudioQuality=function(){return v(this,"getAudioQuality").getAudioQuality()},e.prototype.getAvailableAudio=function(){return v(this,"getAvailableAudio").getAvailableAudio()},e.prototype.getAvailableAudioQualities=function(){return v(this,"getAvailableAudioQualities").getAvailableAudioQualities()},e.prototype.getAvailableSegments=function(){return v(this,"getAvailableSegments").getAvailableSegments()},e.prototype.getAvailableVideoQualities=function(){return v(this,"getAvailableVideoQualities").getAvailableVideoQualities()},e.prototype.getConfig=function(e){return v(this,"getConfig").getConfig(e)},e.prototype.getContainer=function(){return v(this,"getContainer").getContainer()},e.prototype.getCurrentTime=function(e){return void 0===e&&(e=f.TimeMode.AbsoluteTime),v(this,"getCurrentTime").getCurrentTime("api",e)},e.prototype.getDownloadedAudioData=function(){return v(this,"getDownloadedAudioData").getDownloadedAudioData()},e.prototype.getDownloadedVideoData=function(){return v(this,"getDownloadedVideoData").getDownloadedVideoData()},e.prototype.getDroppedVideoFrames=function(){return v(this,"getDroppedVideoFrames").getDroppedVideoFrames()},e.prototype.getDuration=function(){return v(this,"getDuration").getDuration()},e.prototype.getManifest=function(){return v(this,"getManifest").getManifest()},e.prototype.getMaxTimeShift=function(){return v(this,"getMaxTimeShift").getMaxTimeShift()},e.prototype.getPlaybackAudioData=function(){return v(this,"getPlaybackAudioData").getPlaybackAudioData()},e.prototype.getPlaybackSpeed=function(){return v(this,"getPlaybackSpeed").getPlaybackSpeed()},e.prototype.getPlaybackVideoData=function(){return v(this,"getPlaybackVideoData").getPlaybackVideoData()},e.prototype.getPlayerType=function(){return v(this,"getPlayerType").getPlayerType()},e.prototype.getSnapshot=function(e,t){return v(this,"getSnapshot").getSnapshot(e,t)},e.prototype.getStreamType=function(){return v(this,"getStreamType").getStreamType()},e.prototype.getSupportedDRM=function(){return v(this,"getSupportedDRM").getSupportedDRM()},e.prototype.getSupportedTech=function(e){return void 0===e&&(e=f.SupportedTechnologyMode.Platform),v(this,"getSupportedTech").getSupportedTech(e)},e.prototype.getThumbnail=function(e){return v(this,"getThumbnail").getThumbnail(e)},e.prototype.getTimeShift=function(){return v(this,"getTimeShift").getTimeShift()},e.prototype.getTotalStalledTime=function(){return v(this,"getTotalStalledTime").getTotalStalledTime()},e.prototype.getVideoBufferLength=function(){return v(this,"getVideoBufferLength").getVideoBufferLength()},e.prototype.getVideoQuality=function(){return v(this,"getVideoQuality").getVideoQuality()},e.prototype.getVolume=function(){return v(this,"getVolume").getVolume()},e.prototype.hasEnded=function(){return v(this,"hasEnded").hasEnded()},e.prototype.isCastAvailable=function(){return v(this,"isCastAvailable").isCastAvailable()},e.prototype.isCasting=function(){return v(this,"isCasting").isCasting()},e.prototype.isDRMSupported=function(e){return v(this,"isDRMSupported").isDRMSupported(e)},e.prototype.isLive=function(){return v(this,"isLive").isLive()},e.prototype.isMuted=function(){return v(this,"isMuted").isMuted()},e.prototype.isPaused=function(){return v(this,"isPaused").isPaused()},e.prototype.isPlaying=function(){return v(this,"isPlaying").isPlaying()},e.prototype.isStalled=function(){return v(this,"isStalled").isStalled()},e.prototype.load=function(e,t,i){return v(this,"load").load(e,t,{seeking:i})},e.prototype.mute=function(e){v(this,"mute").mute(e)},e.prototype.pause=function(e){v(this,"pause").pause(e)},e.prototype.play=function(e){return v(this,"play").play(e)},e.prototype.off=function(e,t){v(this,"off").off(e,t)},e.prototype.getSeekableRange=function(){return v(this,"getSeekableRange").getSeekableRange()},e.prototype.seek=function(e,t){return v(this,"seek").seek(e,t)},e.prototype.setAspectRatio=function(e){return v(this,"setAspectRatio").setAspectRatio(e)},e.prototype.setAudio=function(e){v(this,"setAudio").setAudio(e)},e.prototype.setAudioQuality=function(e){v(this,"setAudioQuality").setAudioQuality(e)},e.prototype.setAuthentication=function(e){v(this,"getPlayerInstance").setAuthentication(e)},e.prototype.setPlaybackSpeed=function(e){v(this,"setPlaybackSpeed").setPlaybackSpeed(e)},e.prototype.setPosterImage=function(e,t){v(this,"setPosterImage").setPosterImage(e,t)},e.prototype.setQueryParameters=function(e){v(this,"setQueryParameters").setQueryParameters(e)},e.prototype.setVideoElement=function(e){v(this,"setVideoElement").setVideoElement(e)},e.prototype.setVideoQuality=function(e){v(this,"setVideoQuality").setVideoQuality(e)},e.prototype.setVolume=function(e,t){v(this,"setVolume").setVolume(e,t)},e.prototype.setVRStereo=function(e){return v(this,"setVRStereo").setVRStereo(e)},e.prototype.timeShift=function(e,t){v(this,"timeShift").timeShift(e,t)},e.prototype.unload=function(){return v(this,"unload").unload()},e.prototype.unmute=function(e){v(this,"unmute").unmute(e)},e.prototype.isAirplayAvailable=function(){return v(this,"isAirplayAvailable").isAirplayAvailable()},e.prototype.isAirplayActive=function(){return v(this,"isAirplayActive").isAirplayActive()},e.prototype.showAirplayTargetPicker=function(){v(this,"showAirplayTargetPicker").showAirplayTargetPicker()},e.prototype.getBufferedRanges=function(){return v(this,"getBufferedRanges").getBufferedRanges()},e.prototype.preload=function(){v(this,"preload").preload()},e.prototype.setLogLevel=function(e){v(this,"setLogLevel").setLogLevel(e)},e.prototype.getVideoElement=function(){return v(this,"getVideoElement").getVideoElement()},e.prototype.getViewMode=function(){return v(this,"getViewMode").getViewMode()},e.prototype.isViewModeAvailable=function(e){return v(this,"isViewModeAvailable").isViewModeAvailable(e)},e.prototype.setViewMode=function(e,t){v(this,"setViewMode").setViewMode(e,t)},e.prototype.getSource=function(){return v(this,"getSource").getSource()},Object.defineProperty(e,"version",{get:function(){return c.Environment.VERSION_NUMBER},enumerable:!1,configurable:!0}),e.addModule=function(e){a.ModuleManager.add(e)},e.removeModule=function(e){if(m>0)throw new u.PlayerError(s.ErrorCode.MODULE_REMOVED,void 0,"Cannot remove module while player instances are active");a.ModuleManager.remove(e)},e.getModules=function(){return a.ModuleManager.getModuleNames()},e}(),function(){var n="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;t=[(0,p.trackPerformance)("Player.init")],i=[d.EnumerableValue],S=[d.EnumerableValue],b=[d.EnumerableValue],E=[d.EnumerableValue],T=[d.EnumerableValue],_=[d.EnumerableValue],A=[d.EnumerableValue],P=[d.EnumerableValue],M=[d.EnumerableValue],I=[d.EnumerableValue],R=[d.EnumerableValue],C=[d.EnumerableValue],r(e,null,t,{kind:"method",name:"a",static:!1,private:!1,access:{has:function(e){return"a"in e},get:function(e){return e.a}},metadata:n},null,O),r(e,null,i,{kind:"getter",name:"version",static:!1,private:!1,access:{has:function(e){return"version"in e},get:function(e){return e.version}},metadata:n},null,O),r(e,null,S,{kind:"getter",name:"vr",static:!1,private:!1,access:{has:function(e){return"vr"in e},get:function(e){return e.vr}},metadata:n},null,O),r(e,null,b,{kind:"getter",name:"buffer",static:!1,private:!1,access:{has:function(e){return"buffer"in e},get:function(e){return e.buffer}},metadata:n},null,O),r(e,null,E,{kind:"getter",name:"lowlatency",static:!1,private:!1,access:{has:function(e){return"lowlatency"in e},get:function(e){return e.lowlatency}},metadata:n},null,O),r(e,null,T,{kind:"getter",name:"adaptation",static:!1,private:!1,access:{has:function(e){return"adaptation"in e},get:function(e){return e.adaptation}},metadata:n},null,O),r(e,null,_,{kind:"getter",name:"subtitles",static:!1,private:!1,access:{has:function(e){return"subtitles"in e},get:function(e){return e.subtitles}},metadata:n},null,O),r(e,null,A,{kind:"getter",name:"manifest",static:!1,private:!1,access:{has:function(e){return"manifest"in e},get:function(e){return e.manifest}},metadata:n},null,O),r(e,null,P,{kind:"getter",name:"drm",static:!1,private:!1,access:{has:function(e){return"drm"in e},get:function(e){return e.drm}},metadata:n},null,O),r(e,null,M,{kind:"getter",name:"ads",static:!1,private:!1,access:{has:function(e){return"ads"in e},get:function(e){return e.ads}},metadata:n},null,O),r(e,null,I,{kind:"getter",name:"sgai",static:!1,private:!1,access:{has:function(e){return"sgai"in e},get:function(e){return e.sgai}},metadata:n},null,O),r(e,null,R,{kind:"getter",name:"analytics",static:!1,private:!1,access:{has:function(e){return"analytics"in e},get:function(e){return e.analytics}},metadata:n},null,O),r(e,null,C,{kind:"getter",name:"exports",static:!1,private:!1,access:{has:function(e){return"exports"in e},get:function(e){return e.exports}},metadata:n},null,O),n&&Object.defineProperty(e,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:n})}(),e}()},44468:function(e,t,i){"use strict";var n,r,o,a=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(t,i)};return function(t,i){if("function"!=typeof i&&null!==i)throw TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.TimeMode=t.SupportedTechnologyMode=t.ViewMode=t.PlayerAPINotAvailableError=t.LogLevel=t.BufferType=t.MediaType=t.StreamType=t.PlayerType=void 0;var s=i(40306),u=i(3336),c=i(32886);Object.defineProperty(t,"PlayerType",{enumerable:!0,get:function(){return c.PlayerType}});var l,d,h,p=i(65623);Object.defineProperty(t,"StreamType",{enumerable:!0,get:function(){return p.StreamType}}),function(e){e.Audio="audio",e.Video="video",e.Subtitles="subtitles",e.Thumbnails="thumbnails"}(l||(t.MediaType=l={})),function(e){e.ForwardDuration="forwardduration",e.BackwardDuration="backwardduration"}(d||(t.BufferType=d={})),function(e){e.DEBUG="debug",e.LOG="log",e.WARN="warn",e.ERROR="error",e.OFF="off"}(h||(t.LogLevel=h={})),t.PlayerAPINotAvailableError=function(e){function t(t){return e.call(this,s.ErrorCode.API_NOT_AVAILABLE,void 0,"Cannot use the `player.".concat(t,"` API: the player has already been destroyed."))||this}return a(t,e),t}(u.PlayerError),function(e){e.Inline="inline",e.Fullscreen="fullscreen",e.PictureInPicture="pictureinpicture"}(n||(t.ViewMode=n={})),function(e){e.Platform="platform",e.Modules="modules",e.PlatformAndModules="platformandmodules"}(r||(t.SupportedTechnologyMode=r={})),function(e){e.RelativeTime="relativetime",e.AbsoluteTime="absolutetime"}(o||(t.TimeMode=o={}))},72786:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PlayerBufferApiFactory=void 0,t.PlayerBufferApiFactory=function(){function e(){}return e.create=function(e){return new(function(){function t(){}return t.prototype.setTargetLevel=function(t,i,n){e.setTargetBufferLevel(t,i,n)},t.prototype.getLevel=function(t,i){return e.getBufferLevel(t,i)},t}())},e}()},21281:function(e,t){"use strict";var i,n,r,o;Object.defineProperty(t,"__esModule",{value:!0}),t.LiveSynchronizationMethod=t.RttEstimationMethod=t.AdaptationLogicType=t.TimelineReferencePoint=void 0,function(e){e.Start="start",e.End="end",e.CurrentTime="currenttime"}(i||(t.TimelineReferencePoint=i={})),function(e){e.BUFFER="v1",e.BUFFER_FILL_RATE="v2",e.DOWNLOAD_PREDICTION="v3",e.LOW_LATENCY="low-latency-v1",e.WISH="wish"}(n||(t.AdaptationLogicType=n={})),function(e){e.WeightedAverage="weightedaverage",e.Median="median"}(r||(t.RttEstimationMethod=r={})),function(e){e.HttpHead="httphead",e.HttpXsDate="httpxsdate",e.HttpIso="httpiso"}(o||(t.LiveSynchronizationMethod=o={}))},53031:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PlayerContext=void 0;var n=i(17564),r=i(56481),o=i(70962),a=i(6873),s=i(8973),u=i(21513),c=i(61089),l=i(70850),d=i(85902);t.PlayerContext=function(){function e(e){this.internalPlayer=e.internalPlayer,this.internalPlayerID=l.Util.generateUniqueId(),this.config=e.config||{playback:{}},this.storedConfig=e.storedConfig,this.settings=e.settings||o.DefaultSettings,this.bufferSettings=new n.BufferSettings(this.settings.TARGET_BUFFER_LEVEL,e.logger),this.parentHtmlElement=e.container||null,this.fW(),this.logger=e.logger,this.eventHandler=e.eventHandler,this.serviceManager=e.serviceManager,this.segmentInfoService=e.segmentInfoService,this.segmentPrefetchingService=e.segmentPrefetchingService,this.segmentCacheService=e.segmentCacheService,this.adRestorationOptimizationService=e.adRestorationOptimizationService,this.eW=!1}return e.prototype.fW=function(){this.store=new c.StoreService((0,u.default)(),"instances",this.internalPlayerID),this.store.addReducers({player:s.PlayerReducer,metrics:a.MetricsReducer})},e.prototype.setVideoElement=function(e){this.videoElement=d.VideoElementWrapperFactory.createWrappedVideoElement(this,e)},e.prototype.setSourceContext=function(e){this.sourceContext=e},e.prototype.setRenderer=function(e){this.renderer=e},Object.defineProperty(e.prototype,"isDisposed",{get:function(){return this.eW},enumerable:!1,configurable:!0}),e.prototype.dispose=function(){this.eW=!0,this.serviceManager=(0,r.dispose)(this.serviceManager),this.renderer=null,this.parentHtmlElement=null,this.eventHandler=null,this.segmentInfoService=null,this.segmentPrefetchingService=null,this.segmentCacheService=void 0,this.adRestorationOptimizationService=null,this.store=(0,r.dispose)(this.store)},e}()},29242:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PlayerFactory=void 0;var n=i(88052),r=i(62756),o=i(40306),a=i(3336),s=i(44468),u=i(21513),c=i(47993),l=i(43767);t.PlayerFactory=function(){function e(){this.gW=l.FileLoader.getInstance()}return e.constructSetupError=function(t,i,n,r){return e.isSourceValid(i)?t?new a.PlayerError(o.ErrorCode.SOURCE_FORCED_TECHNOLOGY_NOT_SUPPORTED,{"player-type":t.player,"supported-tech":JSON.stringify(n)},"The selected technology is not supported by the player on this platform."):i.hasOwnProperty("vr")?new a.PlayerError(o.ErrorCode.VR_INCOMPATIBLE_PLAYER_TECHNOLOGY,void 0,"This platform does not support VR playback."):r?new a.PlayerError(o.ErrorCode.SOURCE_NO_SUPPORTED_TECHNOLOGY,void 0,"The platform does not support any of the technologies needed to play back the provided source."):new a.PlayerError(o.ErrorCode.SOURCE_NO_STREAM_FOUND_FOR_SUPPORTED_TECHNOLOGY,{"supported-tech":JSON.stringify(n)},"The platform does not support any of the technologies needed to play back the provided source."):new a.PlayerError(o.ErrorCode.SOURCE_INVALID,{source:i},"No DASH / HLS / Smooth / Progressive stream detected in the provided source.")},e.isSourceValid=function(e){var t,i,n,r;return e&&!!(null!=(r=null!=(n=null!=(i=null!=(t=e.dash)?t:e.hls)?i:e.progressive)?n:e.smooth)?r:e.whep)},e.prototype.getInstance=function(t){var i=Object.getOwnPropertyNames(t.source),n=(0,u.getCapabilities)().techSupportedByPlatform,r=(0,c.getBestTech)(t.config.playback().preferredTech,t.source,t.forceTech);if(i.length>0&&!e.isSourceValid(t.source))return Promise.reject(new a.PlayerError(o.ErrorCode.SOURCE_STREAM_TYPE_NOT_SUPPORTED,{streamType:JSON.stringify(i),supportedTech:JSON.stringify(n)},"The specified stream type is not supported by this platform."));if(i.length>0&&!r)return Promise.reject(e.constructSetupError(t.forceTech,t.source,n,r));if(i.length<=0&&!n.length)return Promise.reject(e.constructSetupError(t.forceTech,t.source,n));i.length<=0&&(r=n[0]);var s=t.context.videoElement.getWrappedElement();t.styleManager?(t.styleManager.initializeInternalPlayer(s),t.styleManager.maybeStartTrackingVisibility(s)):!s.parentNode&&t.container&&t.container.appendChild(s),s.muted=t.playerInstance.muted,s.volume=t.playerInstance.volume/100;var l=t.config.adaptation(),d=l.bitrates.maxSelectableVideoBitrate;if((0,u.getCapabilities)().isMobile&&(l.bitrates.maxSelectableVideoBitrate=Math.min(d,1e7),l.exclude=!0),r){var h=e.createRenderer(t.context,r);t.context.setRenderer(h)}return this.iW(t.context,r)},e.createRenderer=function(e,t){return t.player===s.PlayerType.Html5?((0,u.getCapabilities)().isTizen||e.settings.DWORD_BASE_MEDIA_DECODE_TIMESTAMPS)&&n.ModuleManager.has(r.ModuleName.Tizen)?new(n.ModuleManager.get(r.ModuleName.Tizen).getTizenMSERendererConstructor())(e):(0,u.getCapabilities)().isWebOS&&n.ModuleManager.has(r.ModuleName.Webos)?new(n.ModuleManager.get(r.ModuleName.Webos).getWebosRendererConstructor())(e):(0,u.getCapabilities)().isPlayStation5&&n.ModuleManager.has(r.ModuleName.PlayStation5)?new(n.ModuleManager.get(r.ModuleName.PlayStation5).getPlayStation5MSERendererConstructor())(e):(0,u.getCapabilities)().isPlayStation4&&n.ModuleManager.has(r.ModuleName.PlayStation4)?new(n.ModuleManager.get(r.ModuleName.PlayStation4).getPlayStation4MSERendererConstructor())(e):(0,u.getCapabilities)().isVidaa&&n.ModuleManager.has(r.ModuleName.Vidaa)?new(n.ModuleManager.get(r.ModuleName.Vidaa).getVidaaMSERendererConstructor())(e):(0,u.getCapabilities)().isWpeWebKit&&n.ModuleManager.has(r.ModuleName.Wpe)?new(n.ModuleManager.get(r.ModuleName.Wpe).getWpeMSERendererConstructor())(e):new(0,n.ModuleManager.get(r.ModuleName.RendererMse).MSERenderer)(e):null},e.prototype.iW=function(e,t){var i,u=this;if(!e.renderer&&t.player===s.PlayerType.Html5)return Promise.reject(new a.PlayerError(o.ErrorCode.SETUP_NO_RENDERING_ENGINE,{tech:JSON.stringify(t)},"Could not create player: no suitable rendering engine was found. Additional modules may be required."));if(!this.hW&&n.ModuleManager.has(r.ModuleName.RemoteControl)){var c=n.ModuleManager.get(r.ModuleName.RemoteControl).RemoteControlManager;this.hW=new c(e,this.gW)}if(t.player===s.PlayerType.WebRtc)i=Promise.resolve(new(n.ModuleManager.get(r.ModuleName.EngineWebRtc)).WebRtcPlayer(e));else if(t.player===s.PlayerType.Native)i=Promise.resolve(new(n.ModuleManager.get(r.ModuleName.EngineNative)).NativePlayer(e));else{if(t.player!==s.PlayerType.Html5)return Promise.reject(new a.PlayerError(o.ErrorCode.SOURCE_STREAM_TYPE_NOT_SUPPORTED,{given:t.player,supported:"html5, native"},"The specified technology is not supported by the player."));i=e.renderer.ready().then(function(){return new(0,n.ModuleManager.get(r.ModuleName.EngineBitmovin).MediaPlayer)(e)})}return i.then(function(t){return u.hW?u.hW.getPlayerWrapper(e,t):t}).then(function(i){return{context:e,logger:e.logger,bitdashPlayer:i,technology:t,videoElement:e.videoElement}})},e}()},52546:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PlayerStateService=void 0;var n=i(80813),r=i(3714),o=i(23690),a=i(87827),s=i(85648);t.PlayerStateService=function(){function e(e){var t=this;this.xX=function(){t.AX((0,o.setPlayerHasBeenPlaying)(!1))},this.yX=function(){t.AX((0,o.setPlayerHasBeenPlaying)(!0))},this.zX=function(){return a.getPlayerState(t.jW.store.getState())},this.AX=function(e){t.jW.store.dispatch(e)},this.DX=function(e,i){t.playbackState!==e&&(t.playbackState=e,t.AX((0,o.addPlayerPendingTransition)(e))),i&&i()},this.EX=function(e,i){if(t.playbackState!==e)t.playbackState=e,t.AX((0,o.filterPlayerPendingTransition)(e));else{if(!t.FX(e))return;t.jW.logger.debug("Pending state ".concat(s.PlaybackState[e])),t.AX((0,o.removePlayerPendingTransition)(0))}i&&i()},this.jW=e,this.kW=e.eventHandler,this.kW.on(r.PlayerEvent.Playing,this.yX,!0),this.kW.on(r.PlayerEvent.SourceUnloaded,this.xX,!0),this.AX((0,o.resetPlayerState)(["viewMode","remoteControlState"])),this.lW=e.serviceManager.get(n.ServiceName.StallTimeTrackerService),this.wX=!1}return e.prototype.reset=function(){this.transitionToSeekedState(!1),this.stallExit(),this.playbackState=s.PlaybackState.None,this.seekState=s.SeekState.None},Object.defineProperty(e.prototype,"playbackState",{get:function(){return this.zX().playbackState},set:function(e){var t=this.zX().playbackState;this.jW.logger.debug("State change ".concat(s.PlaybackState[t]," -> ").concat(s.PlaybackState[e])),this.AX((0,o.setPlayerPlayback)(e))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"seekState",{get:function(){return this.zX().seekState},set:function(e){var t=this.zX().seekState;this.jW.logger.debug("SeekState change ".concat(s.SeekState[t]," -> ").concat(s.SeekState[e])),this.AX((0,o.setPlayerSeek)(e))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"timeShiftState",{get:function(){return this.zX().timeShiftState},set:function(e){var t=this.zX().timeShiftState;this.jW.logger.debug("TimeShiftState change ".concat(s.TimeShiftState[t]," -> ").concat(s.TimeShiftState[e])),this.AX((0,o.setPlayerTimeShift)(e))},enumerable:!1,configurable:!0}),e.prototype.BX=function(e,t,i,n){this.seekState=e,n&&this.kW.dispatchEvent(r.PlayerEvent.Seek,{position:this.GX(),seekTarget:t,issuer:i||"api"}),this.AX((0,o.setPlayerTargetPlaybackTime)(t))},e.prototype.transitionToSeekingState=function(e,t,i){void 0===i&&(i=!0),this.BX(s.SeekState.Seeking,e,t,i)},e.prototype.transitionToSeekingIOSState=function(e,t,i){return void 0===i&&(i=!0),this.BX(s.SeekState.SeekingIOS,e,t,i)},e.prototype.transitionToSeekedState=function(e){void 0===e&&(e=!0),this.isSeeking()&&(this.seekState=s.SeekState.Seeked,e&&this.kW.dispatchEvent(r.PlayerEvent.Seeked)),this.CX()},e.prototype.CX=function(){this.AX((0,o.setPlayerTargetPlaybackTime)(-1))},e.prototype.isSeeking=function(){return a.getIsSeeking(this.zX())},e.prototype.transitionToTimeShiftingState=function(e,t,i,n){void 0===n&&(n=!0),this.AX((0,o.setPlayerTimeShift)(s.TimeShiftState.Shifting)),n&&this.kW.dispatchEvent(r.PlayerEvent.TimeShift,{position:e,target:t,issuer:i||"api"}),this.AX((0,o.setPlayerTargetPlaybackTime)(t))},e.prototype.transitionToTimeShiftedState=function(e){void 0===e&&(e=!0),this.AX((0,o.setPlayerTimeShift)(s.TimeShiftState.Shifted)),e&&this.kW.dispatchEvent(r.PlayerEvent.TimeShifted),this.CX()},e.prototype.transitionToStoppedState=function(){this.AX((0,o.setPlayerPlayback)(s.PlaybackState.Stopped))},e.prototype.isInitial=function(){return a.getIsInitialPlayback(this.zX())},e.prototype.isTimeShifting=function(){return a.getIsTimeShifting(this.zX())},Object.defineProperty(e.prototype,"isStalled",{get:function(){return this.zX().isStalled},set:function(e){this.AX((0,o.setPlayerStall)(e))},enumerable:!1,configurable:!0}),e.prototype.setIsRendererStalling=function(e){this.AX((0,o.setRendererStallAction)(e)),e&&this.isPlaying()&&!this.hasPendingTransitionToPausedState()&&(this.wX=!0),e?this.stallEnter():this.stallExit()},e.prototype.getIsRendererStalling=function(){return a.getIsRendererStalled(this.zX())},e.prototype.isPlaying=function(){return a.getIsPlaying(this.zX())},e.prototype.isPlay=function(){return a.getIsPlay(this.zX())},e.prototype.isPaused=function(){return a.getIsPaused(this.zX())},e.prototype.isStopped=function(){return a.getIsStopped(this.zX())},e.prototype.stallEnter=function(){this.isPlay()||this.isSeeking()||this.isTimeShifting()||this.isSeeking()||this.isTimeShifting()||this.isStalled||this.isPaused()||this.isStopped()||(this.isStalled=!0,this.lW.startStall(),this.kW.dispatchEvent(r.PlayerEvent.StallStarted,{}))},e.prototype.stallExit=function(){this.isStalled&&(this.isStalled=!1,this.lW.endStall(),this.kW.dispatchEvent(r.PlayerEvent.StallEnded,{}))},e.prototype.hasPendingTransitionToPausedState=function(){return this.FX(s.PlaybackState.Paused)},e.prototype.FX=function(e){return this.zX().pendingTransitions[0]===e},e.prototype.GX=function(){return this.jW.videoElement.currentTime},e.prototype.HX=function(e,t,i){var n=this;this.isPlaying()||(e?i(s.PlaybackState.Play,function(){n.kW.dispatchEvent(r.PlayerEvent.Play,{time:n.GX(),issuer:t},!1)}):i(s.PlaybackState.Play))},e.prototype.transitionToPlayState=function(e,t){this.HX(e,t,this.EX)},e.prototype.transitionToPendingPlayState=function(e,t){this.HX(e,t,this.DX)},e.prototype.transitionToPlayingState=function(e,t){var i=this;void 0===t&&(t=!0),this.EX(s.PlaybackState.Playing,function(){t&&i.kW.dispatchEvent(r.PlayerEvent.Playing,{time:i.GX(),issuer:e},!1)})},e.prototype.transitionToPausedState=function(e,t,i){var n=this;if(void 0===i&&(i=!1),i&&this.wX)return this.jW.logger.insane("Ignoring transition to paused from video element"),void(this.wX=!1);this.wX=!1,e&&this.isStalled&&this.stallExit(),this.jW.videoElement.ended||(e?this.EX(s.PlaybackState.Paused,function(){n.kW.dispatchEvent(r.PlayerEvent.Paused,{time:n.GX(),issuer:t},!1)}):this.DX(s.PlaybackState.Paused))},Object.defineProperty(e.prototype,"targetPlaybackTime",{get:function(){return this.zX().targetPlaybackTime},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"playbackSpeed",{get:function(){var e=this.zX().playbackSpeed;return e.speed*e.multiplier},enumerable:!1,configurable:!0}),e.prototype.setPlaybackSpeed=function(e,t,i){void 0===t&&(t=1),void 0===i&&(i=!0);var n=a.getPlaybackSpeed(this.zX());n.speed===e&&n.multiplier===t||(this.AX((0,o.setPlayerPlaybackSpeed)({speed:e,multiplier:t})),i&&this.kW.dispatchEvent(r.PlayerEvent.PlaybackSpeedChanged,{from:n.speed,to:e}))},Object.defineProperty(e.prototype,"seekingOrTimeshifting",{get:function(){return a.getIsSeekingOrTimeshifting(this.zX())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"seekedOrTimeshifted",{get:function(){return a.getIsSeekedOrTimeshifted(this.zX())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isInitialStall",{get:function(){return a.getIsInitialStall(this.zX())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"hasBeenPlaying",{get:function(){return this.zX().hasBeenPlaying},enumerable:!1,configurable:!0}),e.prototype.dispose=function(){this.kW.off(r.PlayerEvent.Playing,this.yX),this.kW.off(r.PlayerEvent.SourceUnloaded,this.xX)},e}()},32886:function(e,t){"use strict";var i;Object.defineProperty(t,"__esModule",{value:!0}),t.PlayerType=void 0,function(e){e.Html5="html5",e.Native="native",e.WebRtc="webrtc",e.Unknown="unknown"}(i||(t.PlayerType=i={}))},30912:function(e,t,i){"use strict";var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.RecoveryPlayerState=void 0;var r=i(3714),o=i(75375);t.RecoveryPlayerState=function(){function e(e,t){var i=this;this.player=e,this.settings=t,this.xab=null,this.yab=[],this.Aab=function(e){var t=e.subtitle;i.yab.some(function(e){return e.id===t.id})&&(i.player.enableSubtitle(t.id),i.yab=i.yab.filter(function(e){return e.id!==t.id}))},this.Bab=function(){i.player.off(r.PlayerEvent.SubtitleAdded,i.Aab),i.player.off(r.PlayerEvent.SourceUnloaded,i.Bab),i.yab=[]},e.on(r.PlayerEvent.SubtitleAdded,this.Aab),e.on(r.PlayerEvent.SourceUnloaded,this.Bab)}return Object.defineProperty(e.prototype,"source",{get:function(){var e,t;return null!=(t=null==(e=this.xab)?void 0:e.source)?t:null}
1,enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"loadOptions",{get:function(){var e,t;return null!=(t=null==(e=this.xab)?void 0:e.loadOptions)?t:null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"capturedTime",{get:function(){return null==this.xab?null:this.xab.currentTime},enumerable:!1,configurable:!0}),e.prototype.capture=function(){var e,t=this.player.getSource();return!!t&&(this.xab={source:t,loadOptions:this.player.getLoadOptions(),currentTime:this.player.getCurrentTime(o.RECOVERY_ISSUER_NAME),timeShift:this.player.getTimeShift(),wasPaused:this.player.isPaused(),playbackSpeed:this.player.getPlaybackSpeed(),audioTrackId:null==(e=this.player.getAudio())?void 0:e.id,audioQualityId:this.player.getAudioQuality().id,videoQualityId:this.player.getVideoQuality().id,subtitles:this.player.listSubtitles().map(function(e){return n({},e)})},!0)},e.prototype.restore=function(){if(!this.xab)return!1;var e=this.xab,t=e.currentTime,i=e.timeShift,n=e.wasPaused,r=e.playbackSpeed,a=e.audioTrackId,s=e.audioQualityId,u=e.videoQualityId;return this.player.setPlaybackSpeed(r),null!=a&&this.player.setAudio(a),this.player.setAudioQuality(s),this.player.setVideoQuality(u),this.player.isLive()&&!this.settings.ENABLE_SEEK_FOR_LIVE?this.player.timeShift(i,o.RECOVERY_ISSUER_NAME):this.player.seek(t,o.RECOVERY_ISSUER_NAME),this.zab(),n},e.prototype.dispose=function(){this.Bab()},e.prototype.zab=function(){for(var e=function(e){var i=t.player.listSubtitles().find(function(t){return t.id===e.id});i?!i.enabled&&e.enabled&&t.player.enableSubtitle(e.id,!1,!1):e.url?t.player.addSubtitle(e):e.enabled&&t.yab.push(e)},t=this,i=0,n=this.xab.subtitles;i<n.length;i++)e(n[i])},e}()},83913:function(e,t,i){"use strict";var n=this&&this.__awaiter||function(e,t,i,n){return new(i||(i=Promise))(function(r,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){e.done?r(e.value):(function(e){return e instanceof i?e:new i(function(t){t(e)})})(e.value).then(a,s)}u((n=n.apply(e,t||[])).next())})},r=this&&this.__generator||function(e,t){var i,n,r,o={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(u){return function(s){if(i)throw TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(i=1,n&&(r=2&s[0]?n.return:s[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,s[1])).done)return r;switch(n=0,r&&(s=[2&s[0],r.value]),s[0]){case 0:case 1:r=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,n=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((r=(r=o.trys).length>0&&r[r.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!r||s[1]>r[0]&&s[1]<r[3])){o.label=s[1];break}if(6===s[0]&&o.label<r[1]){o.label=r[1],r=s;break}if(r&&o.label<r[2]){o.label=r[2],o.ops.push(s);break}r[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],n=0}finally{i=r=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,u])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.RecoveryService=void 0;var o=i(40306),a=i(25926),s=i(4224),u=i(3714),c=i(75375),l=i(30912),d=i(40153),h=[u.PlayerEvent.SourceLoaded,u.PlayerEvent.SourceUnloaded,u.PlayerEvent.Play,u.PlayerEvent.Ready,u.PlayerEvent.Playing,u.PlayerEvent.Paused,u.PlayerEvent.Seek,u.PlayerEvent.Seeked,u.PlayerEvent.TimeShift,u.PlayerEvent.TimeShifted];t.RecoveryService=function(){function e(e){this.playerContext=e,this.IX=null,this.JX=null,this.KX=null,this.LX=null,this.MX=function(e){return!h.includes(e)},this.NX=!1,this.OX=-1,this.PX=null,this.IX=e,this.JX=e.internalPlayer,this.KX=e.eventHandler,this.LX=e.logger}return Object.defineProperty(e.prototype,"isRecovering",{get:function(){return this.NX},enumerable:!1,configurable:!0}),e.prototype.handleError=function(e){return n(this,void 0,void 0,function(){var t,i,n,a,s,u,c,l,d,h,p,f,g,m,y,v,S,b,E;return r(this,function(r){switch(r.label){case 0:if(null==(t=this.IX)?void 0:t.sourceContext.
1isAd)return null==(a=null==(n=null==(i=this.IX)?void 0:i.logger)?void 0:n.debug)||a.call(n,"Ad is currently playing... Skipping recovery..."),null==(u=null==(s=this.IX)?void 0:s.eventHandler)||u.fireError(e),[2];if(null==(c=this.KX)?void 0:c.hasErrorBeenFired)return null==(h=null==(d=null==(l=this.IX)?void 0:l.logger)?void 0:d.debug)||h.call(d,"Error already fired, skipping recovery for ".concat(e.code," (").concat(e.name,")")),[2];if(e.code!==o.ErrorCode.PLAYBACK_VIDEO_DECODING_ERROR||this.NX)return this.NX&&(null==(g=null==(f=null==(p=this.IX)?void 0:p.logger)?void 0:f.debug)||g.call(f,"Recovery already in progress, firing error ".concat(e.code," (").concat(e.name,") immediately"))),null==(y=null==(m=this.IX)?void 0:m.internalPlayer)||y.unload(),null==(S=null==(v=this.IX)?void 0:v.eventHandler)||S.fireError(e),[2];this.NX=!0,r.label=1;case 1:return r.trys.push([1,3,4,5]),[4,this.QX()];case 2:return r.sent(),[3,5];case 3:return r.sent(),null==(E=null==(b=this.IX)?void 0:b.eventHandler)||E.fireError(e),[3,5];case 4:return this.NX=!1,[7];case 5:return[2]}})})},e.prototype.QX=function(){return n(this,void 0,void 0,function(){var e,t,i,n,o,h,p,f,g,m,y,v;return r(this,function(r){switch(r.label){case 0:if(!this.JX)return[2];if(this.PX=new l.RecoveryPlayerState(this.JX,this.IX.settings),!this.PX.capture())throw this.PX.dispose(),this.PX=null,Error("No source available for recovery");if(e=this.PX.capturedTime,d.ErrorRecoveryUtil.wasRecoveryAttemptedAtPosition(e,this.OX))throw this.PX.dispose(),this.PX=null,Error("Recovery not allowed: already attempted at position ".concat(e));this.OX=e,this.JX.fireEvent(u.PlayerEvent.Warning,new a.PlayerWarning(s.WarningCode.PLAYBACK_VIDEO_DECODING_ERROR_RECOVERY,"Attempting to recover from error by reloading the media source",{time:e})),null==(n=this.KX)||n.addExternalEventFilter(this.MX),r.label=1;case 1:return r.trys.push([1,6,7,8]),[4,this.JX.load(this.PX.source,null==(o=this.PX.loadOptions)?void 0:o.forceTechnology,null==(h=this.PX.loadOptions)?void 0:h.restrictions,c.RECOVERY_ISSUER_NAME)];case 2:return r.sent(),t=this.PX.restore(),this.PX=null,null==(f=null==(p=this.LX)?void 0:p.log)||f.call(p,"Error recovery completed successfully"),t?(this.JX.pause(c.RECOVERY_ISSUER_NAME),[3,5]):[3,3];case 3:return[4,this.JX.play(c.RECOVERY_ISSUER_NAME)];case 4:r.sent(),r.label=5;case 5:return[3,8];case 6:throw i=r.sent(),null==(m=null==(g=this.LX)?void 0:g.error)||m.call(g,"Failed to recover from error during reload sequence:",i),null==(y=this.PX)||y.dispose(),this.PX=null,i;case 7:return null==(v=this.KX)||v.removeExternalEventFilter(this.MX),[7];case 8:return[2]}})})},e.prototype.dispose=function(){var e,t;this.NX&&(null==(e=this.KX)||e.removeExternalEventFilter(this.MX)),null==(t=this.PX)||t.dispose(),this.PX=null,this.OX=-1,this.NX=!1,this.IX=null,this.JX=null,this.KX=null,this.LX=null},e}()},25541:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.dateRangeToISOString=function(e){return new Date(Date.parse(e.startDate)+(0,n.toMilliSeconds)(e.duration)).toISOString()},t.mergeSegmentLists=r,t.updateTimeline=function(e,t){return t.forEach(function(e){return e.consumed=!1}),0===e.length?t:r(e,t)},t.populateCurrentTimelineWithPlaybackTime=function(e,t,i){var n;e[t]&&(function(){n=i;for(var r=t;r<e.length;r++)e[r].playbackTime=n,n+=e[r].duration}(),function(){n=i;for(var r=t-1;r>=0;r--)e[r].playbackTime=n-e[r].duration,n-=e[r].duration}())};var n=i(89927);function r(e,t){var i={},n=function(e){var t=e.discontinuitySequenceNumber,i=e.uri;return t?"".concat(i,"_").concat(t):i};return t.forEach(function(e){return i[n(e)]=e}),e.forEach(function(e){i[n(e)]&&(i[n(e)]=e)}),Object.values(i)}},70962:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultSettings=t.WishDefaultConfig=void 0;var n,r,o,a,s=i(29669),u=i(44468);t.WishDefaultConfig={TARGET_BITRATE_FACTOR:1,TARGET_BUFFER_FACTOR:.8,BITRATE_MODIFIER_FUNCTION_TYPE:"log",USE_RATE_BASED_SELECTION_ON_SEEKING:!1},t.DefaultSettings={TARGET_BUFFER_LEVEL:((n={})[u.MediaType.Video]=((r={})[u.BufferType.ForwardDuration]=40,r[u.BufferType.BackwardDuration]=20,r),n[u.MediaType.Audio]=((o={})[u.BufferType.ForwardDuration]=40,o[u.BufferType.BackwardDuration]=20,o),n),BUFFER_LOGIC_ACTIVATION_THRESHOLD:10,MIN_TIMELINE_LIVE_OFFSET:4,RETRY_DELAY:2,MAX_INCREASE_RETRY_DELAY_SEC:30,INCREASE_RETRY_DELAY:!0,INCREASE_RETRY_DELAY_BASE_SEC:.25,DISABLE_RETRY_FOR_RESPONSE_STATUS:((a={})[s.HttpRequestType.MANIFEST_DASH]=[],a[s.HttpRequestType.MANIFEST_HLS_MASTER]=[],a[s.HttpRequestType.MANIFEST_HLS_VARIANT]=[],a[s.HttpRequestType.MANIFEST_SMOOTH]=[],a[s.HttpRequestType.MANIFEST_ADS]=[],a[s.HttpRequestType.MANIFEST_STEERING]=[],a[s.HttpRequestType.MEDIA_AUDIO]=[],a[s.HttpRequestType.MEDIA_VIDEO]=[],a[s.HttpRequestType.MEDIA_SUBTITLES]=[],a[s.HttpRequestType.MEDIA_THUMBNAILS]=[],a[s.HttpRequestType.MEDIA_SEGMENTINDEX]=[],a[s.HttpRequestType.DRM_LICENSE_WIDEVINE]=[],a[s.HttpRequestType.DRM_LICENSE_PLAYREADY]=[],a[s.HttpRequestType.DRM_LICENSE_FAIRPLAY]=[],a[s.HttpRequestType.DRM_LICENSE_PRIMETIME]=[],a[s.HttpRequestType.DRM_LICENSE_CLEARKEY]=[],a[s.HttpRequestType.DRM_LICENSE_TVKEY]=[],a[s.HttpRequestType.DRM_CERTIFICATE_FAIRPLAY]=[],a[s.HttpRequestType.HLS_INTERSTITIALS_ASSET_LIST]=[],a[s.HttpRequestType.KEY_HLS_AES]=[],a[s.HttpRequestType.TIME_SYNC]=[],a[s.HttpRequestType.WEBRTC_SDP_REQUEST]=[],a[s.HttpRequestType.WEBRTC_SDP_ANSWER]=[],a[s.HttpRequestType.WEBRTC_SDP_OFFER]=[],a[s.HttpRequestType.INTERNAL]=[],a[s.HttpRequestType.UNKNOWN]=[],a),METRIC_HISTORY_SIZE:30,DEFAULT_ADAPTATION_RULE_HISTORY_SIZE:40,LOG_LEVEL:2,LOG_PREFIX:"",RESTART_THRESHOLD:.9,RESTART_THRESHOLD_DELTA:.5,STARTUP_THRESHOLD:.9,STARTUP_THRESHOLD_DELTA:.5,DURATION_MISMATCH_TOLERANCE:.5,MAX_STARTUP_BUFFER:0,START_SEARCHING_END:2,MAX_RETRIES:2,MAX_CDN_RETRIES:2,MAX_MPD_RETRIES:2,MPD_RETRY_DELAY:.5,MPD_UPDATE_PERIOD_TOLERANCE:5,DRM_MAX_RETRIES:1,DRM_RETRY_DELAY:.25,DRM_WITH_CREDENTIALS:!1,CAST_APPLICATION_ID:"D3A86B20",CAST_MESSAGE_NAMESPACE:"urn:x-cast:com.bitmovin.player.cast2",BUFFER_VISIBILITY_DELAY:2,MIN_SELECTABLE_VIDEO_BITRATE:0,MAX_SELECTABLE_VIDEO_BITRATE:1/0,EXCLUDE_DISALLOWED_REPRESENTATIONS:!1,MIN_SELECTABLE_AUDIO_BITRATE:0,MAX_SELECTABLE_AUDIO_BITRATE:1/0,XHR_TIMEOUT:20,QUERY_PARAMETERS:void 0,GAP_TOLERANCE:.1,END_OF_BUFFER_TOLERANCE:.1,END_OF_BUFFER_RECOVERY_TOLERANCE:.5,MAX_POTENTIAL_GAP_TIME_DEVIATION:.125,SEEK_TO_END_OFFSET:2,MINIMUM_ALLOWED_UPDATE_PERIOD:1,MAXIMUM_ALLOWED_UPDATE_PERIOD:1/0,GLOBAL_DISABLE_SEEKING:!1,PRE_ROLL_RESTORE_THRESHOLD:.25,IOS_MIN_TIMEUPDATES_AFTER_AD:2,HTTP_HEADERS:{},DOWNLOAD_DURATION_SAFETY_MARGIN:.4,MAXIMUM_DOWNLOAD_DURATION_MULTIPLIER:2,MAXIMUM_DOWNLOAD_DURATION_MULTIPLIER_SAME_QUALITY:3,RATE_SAFETY_MARGIN_PERCENTAGE:10,MAX_ALLOWED_BANDWIDTH_ESTIMATION:1/0,LIVE_SEGMENT_LIST_START_INDEX_OFFSET:0,MAX_NUM_CACHED_SEGMENTS:1,TRUN_VERSION:void 0,IGNORE_MP4_EDTS_BOX:!0,HLS_AUDIO_ONLY_THRESHOLD_BITRATE:2e5,ENABLE_SEEK_FOR_LIVE:!1,LIVE_EDGE_DISTANCE:0,QUALITY_THRESHOLD:.5,QUALITY_UPPER_THRESHOLD:45,MAX_CONSECUTIVE_VR_ERRORS:3,MAX_CONSECUTIVE_RENDERER_ERRORS:3,DISABLE_HLS_BACKUP_STREAM_FAILOVER:!1,PLAYBACK_TIMEOUT:1500,HLS_SYNC_VIA_MEDIA_SEQUENCE:!1,STOP_DOWNLOAD_ON_PAUSE:!1,VR_SCHEME_ID_URI:"https://bitmov
1in.com/082017/vr",HLS_VR_CHARACTERISTICS_UTI:"com.bitmovin.vr.",SAFARI_NUM_PROGRESS_EVENTS_AFTER_SEEK_GLITCH:5,SEGMENT_LOADER_POOL_SIZE:{},NATIVE_HLS_PARSING:!1,NATIVE_HLS_DOWNLOAD_ERROR_HANDLING:!1,AKAMAI_DATETIME_PARSING:!1,QJY_BROWSER_WORKAROUND:!1,DWORD_BASE_MEDIA_DECODE_TIMESTAMPS:!1,FORCE_BASE_MEDIA_DECODE_TIME_REWRITE:!1,WEBOS_MAX_SAFE_BMDT:1/0,WEBOS_MAX_SAFE_PTO:1/0,TIZEN_MAX_SAFE_BMDT:1/0,TIZEN_MAX_SAFE_PTO:1/0,VIDAA_MAX_SAFE_BMDT:0xffffffff,VIDAA_MAX_SAFE_PTO:0xffffffff,ADAPTATION_SET_SWITCHING_WITHOUT_SUPPLEMENTAL_PROPERTY:!1,MINIMAL_BACKWARD_BUFFER_CLEARING_INTERVAL:.5,CHUNKED_CMAF_STREAMING:!1,LOW_LATENCY_DEFAULT_TARGET_LATENCY:5,LOW_LATENCY_BUFFER_GUARD:.5,LOW_LATENCY_DEFAULT_FALLBACK_PLAYBACK_RATE:.95,LOW_LATENCY_DEFAULT_CATCHUP_PLAYBACK_RATE:1.2,LOW_LATENCY_SEEK_AHEAD:1,ACCEPTABLE_TIMESHIFT_INACCURACY:3,IGNORE_HLS_AUDIO_GROUPS:!1,OPTIMIZE_AD_RESTORATION:!0,AD_RESTORATION_SEGMENT_PREFETCHING_DURATION:5,MIN_SAFE_BUFFER_LEVEL:3,THUMBNAIL_TO_PLAYER_SIZE_RATIO:.1,FAIRPLAY_IGNORE_DUPLICATE_INIT_DATA_KEY_ERRORS:!1,NO_QUOTA_EXCEEDED_ADJUSTMENT:!1,RESUME_LIVE_CONTENT_AT_PREVIOUS_POSITION_AFTER_AD_BREAK:!1,MIN_EFFECTIVE_SEGMENT_DOWNLOAD_TIME:.5,fixed:{APP_NAME:"html5",VERSION:"8.253.0"},CLEAR_BUFFERS_ON_SEEKING_BACKWARDS:!1,DROP_INVALID_SEGMENTS:!1,PROACTIVE_GAP_SKIP_DISTANCE_SECONDS:0,MIN_SIZE_FOR_GAP_SKIPPING:0,FORCE_SOFTWARE_DECRYPTION:!1,SEGMENT_LOADING_PROGRESS_CHECK_INTERVAL:.5,ENABLE_SEGMENT_INFO_PROVIDER_FROM_STORE:!1,HLS_SYNC_SEGMENT_PLAYBACK_TIME_VIA_MEDIA_SEQUENCE:!1,HLS_PARSE_MANIFEST_IN_WORKER:!1,HLS_CLEAR_BUFFERS_ON_DISCONTINUITY_SWITCHES:!1,PARSE_EMSG_BOXES:!0,WISH_ABR_PARAMS:t.WishDefaultConfig,HLS_BACKUP_STREAM_PENALTY_DURATION:30,CHECK_ALL_DRM_LICENSES_FOR_KID:!0,LL_HLS:!0,LL_HLS_SEGMENT_END_TIME_MATCHING_TOLERANCE:.1,LL_HLS_MAX_PLAYLIST_AGE_FOR_BLOCKING_REQUEST_IN_PART_TARGET_MULTIPLES:2,HLS_PARSE_NATIVE_METADATA:!0,PREFER_MANAGED_MEDIA_SOURCE:!0,INFINITE_RETRIES_FOR_LIVE:!0,MAX_SAFE_MSE_DURATION:1/0,ENABLE_MEDIA_ELEMENT_EVENT_LOGS:!1,DISABLE_PARALLEL_SEGMENT_LOADING:!1,ENABLE_MUTED_BACKGROUND_PLAYBACK:!1,POSTPONE_MANIFEST_UPDATES_UNTIL_PLAYBACK_START:!0,DASH_CLEAR_BUFFERS_ON_PERIOD_SWITCHES:!1,DISABLE_AUTO_RECOVERY_ON_DVR_WINDOW_EXCEEDED:!1,ENABLE_SGAI_HANDLING:!1,SGAI_TRIGGER_DELAY_COMPENSATION:0,ENABLE_PERFORMANCE_LOGS:!1,ENABLE_HLS_CONTENT_STEERING:!1,TIZEN_DELAY_END_OF_STREAM_SIGNALING:!1,AUDIO_TRACK_SWITCH_BUFFER_GRACE_PERIOD:2,DISABLE_AUDIO_BUFFER_CLEARING_ON_TRACK_SWITCH:!1}},69251:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SourceContext=void 0,t.SourceContext=function(){function e(e){this.technology=e.technology,this.source=e.source,this.isAd=e.isAd,this.RX=!1,this.SX=e.sourceIdentifier,this.mseObjectUrl=e.mseObjectUrl}return Object.defineProperty(e.prototype,"isDisposed",{get:function(){return this.RX},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"sourceIdentifier",{get:function(){return this.SX},enumerable:!1,configurable:!0}),e.prototype.dispose=function(){this.RX=!0},e}()},93907:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StallTimeTrackerService=void 0;var n=i(91678),r=i(46151),o=i(33436),a=i(94685),s=i(89927);t.StallTimeTrackerService=function(){function e(e){this.context=e,this.context=e,this.UX=0}return e.prototype.startStall=function(){this.TX=Date.now()},e.prototype.endStall=function(){var e=(0,s.toSeconds)(Date.now()-this.TX);this.UX+=e,this.VX()},e.prototype.VX=function(){var e=this;(0,a.isContextAvailable)(this.context)&&Object.keys((0,r.getMetricsState)(this.context.store.getState())).forEach(function(t){return e.context.store.dispatch((0,n.addMetricsValue)(t,o.MetricType.StalledSeconds,e.UX))})},e.prototype.reset=function(){this.UX=0},e.prototype.dispose=function(){},e}()},23145:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StartOffsetService=void 0;var n=i(21281);t.StartOffsetService=function(){function e(e){this.WX=e,this.XX=0}return e.prototype.YX=function(e,t){var i=e.options.startOffset,r=e.options.startOffsetTimelineReference;if(r)switch(r){case n.TimelineReferencePoint.Start:return i>Math.abs(t)?0:i+t;case n.TimelineReferencePoint.End:}return i},e.prototype.ZX=function(e,t){var i=e.options.startOffset,r=e.options.startOffsetTimelineReference;if(r)switch(r){case n.TimelineReferencePoint.Start:break;case n.TimelineReferencePoint.End:return t+i}return i},e.prototype.getStartOffset=function(e){if(e.options){if(void 0!==e.options.startOffset)return this.WX.isLive
vendor: 19,090 bytes, line 1
1()?this.YX(e,this.WX.getMaxTimeShift()):this.ZX(e,this.WX.getDuration());if(void 0!==e.options.startTime)return e.options.startTime}return this.XX},Object.defineProperty(e.prototype,"manifestStartOffset",{set:function(e){this.XX=e},enumerable:!1,configurable:!0}),e.prototype.dispose=function(){this.WX=null},e}()},65623:function(e,t){"use strict";var i;Object.defineProperty(t,"__esModule",{value:!0}),t.StreamType=void 0,function(e){e.Progressive="progressive",e.Dash="dash",e.Hls="hls",e.Smooth="smooth",e.Whep="whep",e.Unknown="unknown"}(i||(t.StreamType=i={}))},20649:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.kebabCaseToCamelCase=function(e){return e.split("-").map(function(e,t){return 0===t?e.toLowerCase():e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()}).join("")},t.forceReallocation=function(e){return e?(0,n.isFirefox)()?JSON.parse(JSON.stringify(e)):(" "+e).slice(1):""};var n=i(15487)},88847:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Suspendable=void 0,t.suspend=function(e){e&&e.suspend()},t.restore=function(e){e&&e.restore()},t.Suspendable=function(){function e(e){this.FZ=!1,this.GZ=null==e?void 0:e.onSuspend,this.HZ=null==e?void 0:e.onRestore}return e.prototype.suspend=function(){var e;this.FZ||(this.FZ=!0,null==(e=this.GZ)||e.call(this))},e.prototype.restore=function(){var e;this.FZ&&(this.FZ=!1,null==(e=this.HZ)||e.call(this))},e.prototype.isSuspended=function(){return this.FZ},e.prototype.dispose=function(){this.FZ=null,this.GZ=null,this.HZ=null},e}()},94685:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isObject=function(e){return null!==e&&"object"==typeof e},t.isContextAvailable=function(e){return void 0!==e&&!e.isDisposed}},64681:function(e,t,i){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,i,n){void 0===n&&(n=i);var r=Object.getOwnPropertyDescriptor(t,i);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[i]}}),Object.defineProperty(e,n,r)}:function(e,t,i,n){void 0===n&&(n=i),e[n]=t[i]}),r=this&&this.__exportStar||function(e,t){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(t,i)||n(t,e,i)};Object.defineProperty(t,"__esModule",{value:!0}),r(i(92006),t)},29960:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},41138:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VideoElementUtil=void 0,t.VideoElementUtil=function(){function e(){}return e.removeSource=function(e){for(e.setAttribute("src",""),e.removeAttribute("src");e.firstChild;)e.removeChild(e.firstChild)},e}()},53129:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultConfig=void 0;var n=i(45202);t.DefaultConfig={key:"",playback:{autoplay:!1,muted:!1,volume:100,timeShift:!0,seeking:!0,playsInline:!0,preferredTech:[],videoCodecPriority:["dvhe","dvh1","vvc","vvi","av01","av1","hevc","hev","hvc","vp9","avc"],audioCodecPriority:["ec-4","ac-4","ec-3","mp4a.a6","ac-3","mp4a.a5","mp4a.40"]},style:{aspectratio:16/9,uiManagerFactory:function(e,t){var i=n.Environment.modules.playerui.UIFactory;if((null==i?void 0:i.buildUI)&&"function"==typeof i.buildUI)return new i.buildUI(e,t);if((null==i?void 0:i.buildDefaultUI)&&"function"==typeof i.buildDefaultUI)return new i.buildDefaultUI(e,t);throw Error("Default UI initialization method not found. Provide a custom `uiManagerFactory` via `StyleConfig`.")},visibility:{enableTracking:!1,visibilityThreshold:50}},tweaks:{file_protocol:!1},adaptation:{mobile:{limitToPlayerSize:!1,exclude:!1,qualityStabilityBalance:.5,bitrates:{minSelectableAudioBitrate:0,maxSelectableAudioBitrate:1/0,minSelectableVideoBitrate:0,maxSelectableVideoBitrate:1/0},resolution:{minSelectableVideoHeight:0,maxSelectableVideoHeight:1/0,minSelectableVideoWidth:0,maxSelectableVideoWidth:1/0}},desktop:{limitToPlayerSize:!1,exclude:!1,qualityStabilityBalance:.5,bitrates:{minSelectableAudioBitrate:0,maxSelectableAudioBitrate:1/0,minSelectableVideoBitrate:0,maxSelectableVideoBitrate:1/0},resolution:{minSelectableVideoHeight:0,maxSelectableVideoHeight:1/0,minSelectableVideoWidth:0,maxSelectableVideoWidth:1/0}}},cast:{enable:!1},events:{},licensing:{},live:{incrementalManifestUpdates:!0},logs:{bitmovin:!0},location:{ui:n.Environment.baseUrl+"bitmovinplayer-ui.js",ui_css:n.Environment.baseUrl+"bitmovinplayer-ui.css",serviceworker:"",cast:"https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1",google_ima:"https://imasdk.googleapis.com/js/sdkloader/ima3.js"}}},60865:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getLowLatencyDefaultConfig=function(e){return void 0===e&&(e={}),{live:r(e),tweaks:o()}};var n=i(21281),r=function(e){var t=e.targetLatency;return{lowLatency:{targetLatency:null!=t?t:5,catchup:{playbackRateThreshold:.075,seekThreshold:5,playbackRate:1.2},fallback:{playbackRateThreshold:.075,seekThreshold:5,playbackRate:.95}},synchronization:[{method:n.LiveSynchronizationMethod.HttpHead,serverUrl:"https://time.akamai.com"}]}},o=function(){return{RESTART_THRESHOLD:.2,RESTART_THRESHOLD_DELTA:.05,STARTUP_THRESHOLD:.2,STARTUP_THRESHOLD_DELTA:.05,DURATION_MISMATCH_TOLERANCE:.05,LOW_LATENCY_BUFFER_GUARD:.8}}},90571:function(e,t,i){"use strict";var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.PlayerConfiguration=void 0;var r=i(40306),o=i(3336),a=i(44468),s=i(70962),u=i(21513),c=i(70850),l=i(53129);t.PlayerConfiguration=function(){function e(e){if(!e)throw new o.PlayerError(r.ErrorCode.SETUP_MISSING_CONFIGURATION,void 0,"The player must be configured with a valid `PlayerConfig`, but no configuration was provided.");this.bW={},this.cW=e,this.dW()}return e.mergeSizeConfig=function(e,t){var i,n,r=!1,o=!1,a=!1;if(t.style?(a=!!t.style.width,o=!!t.style.height,r=!!t.style.aspectratio):t.style={},e.style=e.style||{},r){var s=(0,c.parseAspectRatio)(null!=(n=null==(i=l.DefaultConfig.style)?void 0:i.aspectratio)?n:16/9);e.style.aspectratio=(0,c.parseAspectRatio)(t.style.aspectratio)||s}else e.style.aspectratio=l.DefaultConfig.style.aspectratio;a&&!isNaN(String(t.style.width).slice(-1))&&(e.style.width=t.style.width+"px"),o&&!isNaN(String(t.style.height).slice(-1))&&(e.style.height=t.style.height+"px")},e.prototype.dW=function(){var t=this;c.Util.deepCopyMulti(this.bW,l.DefaultConfig,this.cW);var i=this.cW.adaptation||{},n={};c.Util.deepCopy(n,i),delete n.mobile,delete n.desktop,(0,u.getCapabilities)().isMobile?this.bW.adaptation=c.Util.deepCopyMulti({},l.DefaultConfig.adaptation.mobile,n,i.mobile):this.bW.adaptation=c.Util.deepCopyMulti({},l.DefaultConfig.adaptation.desktop,n,i.desktop);var r=this.bW.adaptation.bitrates;["minSelectableAudioBitrate","maxSelectableAudioBitrate","minSelectableVideoBitrate","maxSelectableVideoBitrate"].forEach(function(e){t.bW.adaptation.bitrates[e]=c.Util.extractBitrateFromString(e.substring(0,3),r[e])}),e.mergeSizeConfig(this.bW,this.cW)},e.overwriteConfigEntries=function(e,t,i){if(t.hasOwnProperty(i)){var n=t[i];for(var r in n)n.hasOwnProperty(r)&&"fixed"!==r&&e.hasOwnProperty(r.toUpperCase())?e[r.toUpperCase()]=n[r]:n.hasOwnProperty(r)&&"MAX_BUFFER_LEVEL"===r.toUpperCase()&&(e.TARGET_BUFFER_LEVEL[a.MediaType.Video][a.BufferType.ForwardDuration]=n[r],e.TARGET_BUFFER_LEVEL[a.MediaType.Audio][a.BufferType.ForwardDuration]=n[r])}},e.prototype.getSettings=function(t){void 0===t&&(t=this.bW);var i,r={},o=t.adaptation||{};return c.Util.deepCopy(r,s.DefaultSettings),e.overwriteConfigEntries(r,t,"tweaks"),e.overwriteConfigEntries(r,t,"cast"),o.bitrates=o.bitrates||{},o.exclude=o.exclude||!1,r.EXCLUDE_DISALLOWED_REPRESENTATIONS=o.exclude,r.MIN_SELECTABLE_AUDIO_BITRATE=o.bitrates.minSelectableAudioBitrate||0,r.MAX_SELECTABLE_AUDIO_BITRATE=o.bitrates.maxSelectableAudioBitrate||1/0,r.MIN_SELECTABLE_VIDEO_BITRATE=o.bitrates.minSelectableVideoBitrate||0,r.MAX_SELECTABLE_VIDEO_BITRATE=o.bitrates.maxSelectableVideoBitrate||1/0,r.QUALITY_THRESHOLD=o.qualityThreshold||r.QUALITY_THRESHOLD,r.QUALITY_UPPER_THRESHOLD=o.qualityUpperThreshold||r.QUALITY_UPPER_THRESHOLD,r.WISH_ABR_PARAMS=n(n({},s.DefaultSettings.WISH_ABR_PARAMS),(null==(i=t.tweaks)?void 0:i.wish_abr_params)||{}),r},e.prototype.getUserConfig=function(){return this.cW},e.prototype.update=function(e){var t={};for(var i in c.Util.deepCopy(t,e),t)t.hasOwnProperty(i)&&(this.bW[i]=t[i],this.cW[i]=t[i])},e.prototype.get=function(e,t){return void 0===t&&(t=this.bW),e?t.hasOwnProperty(e)?this.bW[e]:{}:t},e.prototype.playback=function(){return this.get("playback")},e.prototype.style=function(){return this.get("style")},e.prototype.buffer=function(){return this.get("buffer")},e.prototype.tweaks=function(){return this.get("tweaks")},e.prototype.adaptation=function(){return this.get("adaptation")},e.prototype.advertising=function(){return this.get("advertising")},e.prototype.cast=function(){return this.get("cast")},e.prototype.logs=function(){return this.get("logs")},e.prototype.licensing=function(){return this.get("licensing")},e.prototype.live=function(){return this.get("live")},e.prototype.location=function(){return this.get("location")},e}()},65567:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getTvDefaultConfig=function(e){if((0,n.isUsingFileProtocol)()&&!e)throw Error("You have to provide an app_id if you are loading the app through file protocol");return function(e){var t={forwardduration:r,backwardduration:o},i={buffer:{video:t,audio:t},playback:{autoplay:!0},tweaks:{minimal_backward_buffer_clearing_interval:5}};return e&&(i.tweaks.app_id=e,i.tweaks.file_protocol=!0,i.analytics={config:{origin:e}}),i}(e)};var n=i(47993),r=30,o=10},78760:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateAppIdConfig=function(e){var t=e.get("tweaks"),i=(0,s.getCapabilities)()[a.CapabilityKey.isReactNative],c=(0,u.isUsingFileProtocol)();if(c||i){if(!t.app_id||c&&!t.file_protocol)throw new r.PlayerError(n.ErrorCode.SETUP_UNSUPPORTED_PROTOCOL,{tweaks:JSON.stringify(t)},"The current tweaks configuration is not valid: ".concat(t.app_id?"file_protocol":"app_id"," is missing."));t.app_id&&(!o.Environment.hostname||i)&&(o.Environment.hostname=t.app_id)}};var n=i(40306),r=i(3336),o=i(45202),a=i(7387),s=i(21513),u=i(47993)},40306:function(e,t){"use strict";var i;Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorCode=void 0,function(e){e[e.UNKNOWN=1e3]="UNKNOWN",e[e.API_NOT_AVAILABLE=1001]="API_NOT_AVAILABLE",e[e.SETUP_ERROR=1100]="SETUP_ERROR",e[e.SETUP_NO_HTML_ELEMENT=1101]="SETUP_NO_HTML_ELEMENT",e[e.SETUP_MISSING_CONFIGURATION=1102]="SETUP_MISSING_CONFIGURATION",e[e.SETUP_LICENSE_ERROR=1103]="SETUP_LICENSE_ERROR",e[e.SETUP_MISSING_DOMAIN_LICENSE_WHITELIST=1104]="SETUP_MISSING_DOMAIN_LICENSE_WHITELIST",e[e.SETUP_MISSING_DOMAIN_LICENSE_ALLOWLIST=1104]="SETUP_MISSING_DOMAIN_LICENSE_ALLOWLIST",e[e.SETUP_MISSING_LICENSE_WHITELIST=1105]="SETUP_MISSING_LICENSE_WHITELIST",e[e.SETUP_MISSING_LICENSE_ALLOWLIST=1105]="SETUP_MISSING_LICENSE_ALLOWLIST",e[e.SETUP_INVALID_LICENSE_SERVER=1106]="SETUP_INVALID_LICENSE_SERVER",e[e.SETUP_INVALID_IMPRESSION_SERVER=1107]="SETUP_INVALID_IMPRESSION_SERVER",e[e.SETUP_NO_RENDERING_ENGINE=1108]="SETUP_NO_RENDERING_ENGINE",e[e.SETUP_UNSUPPORTED_PROTOCOL=1113]="SETUP_UNSUPPORTED_PROTOCOL",e[e.SOURCE_ERROR=1200]="SOURCE_ERROR",e[e.SOURCE_INVALID=1201]="SOURCE_INVALID",e[e.SOURCE_MANIFEST_INVALID=1202]="SOURCE_MANIFEST_INVALID",e[e.SOURCE_NO_SUPPORTED_TECHNOLOGY=1203]="SOURCE_NO_SUPPORTED_TECHNOLOGY",e[e.SOURCE_STREAM_TYPE_NOT_SUPPORTED=1204]="SOURCE_STREAM_TYPE_NOT_SUPPORTED",e[e.SOURCE_FORCED_TECHNOLOGY_NOT_SUPPORTED=1205]="SOURCE_FORCED_TECHNOLOGY_NOT_SUPPORTED",e[e.SOURCE_NO_STREAM_FOUND_FOR_SUPPORTED_TECHNOLOGY=1206]="SOURCE_NO_STREAM_FOUND_FOR_SUPPORTED_TECHNOLOGY",e[e.SOURCE_EMPTY_SEGMENT=1207]="SOURCE_EMPTY_SEGMENT",e[e.SOURCE_COULD_NOT_LOAD_MANIFEST=1208]="SOURCE_COULD_NOT_LOAD_MANIFEST",e[e.SOURCE_PROGRESSIVE_STREAM_ERROR=1209]="SOURCE_PROGRESSIVE_STREAM_ERROR",e[e.SOURCE_HLS_STREAM_ERROR=1210]="SOURCE_HLS_STREAM_ERROR",e[e.SOURCE_ENCRYPTION_METHOD_NOT_SUPPORTED=1211]="SOURCE_ENCRYPTION_METHOD_NOT_SUPPORTED",e[e.SOURCE_INVALID_H264_CODEC=7043]="SOURCE_INVALID_H264_CODEC",e[e.PLAYBACK_ERROR=1300]="PLAYBACK_ERROR",e[e.PLAYBACK_VIDEO_DECODING_ERROR=1301]="PLAYBACK_VIDEO_DECODING_ERROR",e[e.PLAYBACK_HLS_COULD_NOT_LOAD_TRANSMUXER=1304]="PLAYBACK_HLS_COULD_NOT_LOAD_TRANSMUXER",e[e.NETWORK_ERROR=1400]="NETWORK_ERROR",e[e.NETWORK_MANIFEST_DOWNLOAD_TIMEOUT=1401]="NETWORK_MANIFEST_DOWNLOAD_TIMEOUT",e[e.NETWORK_SEGMENT_DOWNLOAD_TIMEOUT=1402]="NETWORK_SEGMENT_DOWNLOAD_TIMEOUT",e[e.NETWORK_PROGRESSIVE_STREAM_DOWNLOAD_TIMEOUT=1403]="NETWORK_PROGRESSIVE_STREAM_DOWNLOAD_TIMEOUT",e[e.NETWORK_FAILED_CERTIFICATE_REQUEST=1404]="NETWORK_FAILED_CERTIFICATE_REQUEST",e[e.DRM_ERROR=2e3]="DRM_ERROR",e[e.DRM_MISSING_CONFIGURATION=2001]="DRM_MISSING_CONFIGURATION",e[e.DRM_NO_LICENSE_SERVER_URL_PROVIDED=2002]="DRM_NO_LICENSE_SERVER_URL_PROVIDED",e[e.DRM_FAILED_LICENSE_REQUEST=2003]="DRM_FAILED_LICENSE_REQUEST",e[e.DRM_KEY_SIZE_NOT_SUPPORTED=2005]="DRM_KEY_SIZE_NOT_SUPPORTED",e[e.DRM_NO_KEY_SYSTEM=2006]="DRM_NO_KEY_SYSTEM",e[e.DRM_KEY_SESSION_INITIALIZATION_FAILED=2007]="DRM_KEY_SESSION_INITIALIZATION_FAILED",e[e.DRM_MEDIA_KEY_INITIALIZATION_FAILED=2008]="DRM_MEDIA_KEY_INITIALIZATION_FAILED",e[e.DRM_KEY_ERROR=2009]="DRM_KEY_ERROR",e[e.DRM_KEY_SYSTEM_NOT_SUPPORTED=2010]="DRM_KEY_SYSTEM_NOT_SUPPORTED",e[e.DRM_CERTIFICATE_ERROR=2011]="DRM_CERTIFICATE_ERROR",e[e.DRM_PLAYREADY_INVALID_HEADER_KEY_VALUE_PAIR=2012]="DRM_PLAYREADY_INVALID_HEADER_KEY_VALUE_PAIR",e[e.DRM_RESTRICTED_OUTPUT=2013]="DRM_RESTRICTED_OUTPUT",e[e.DRM_INIT_DATA_MISSING=2015]="DRM_INIT_DATA_MISSING",e[e.VR_ERROR=2100]="VR_ERROR",e[e.VR_INCOMPATIBLE_PLAYER_TECHNOLOGY=2101]="VR_INCOMPATIBLE_PLAYER_TECHNOLOGY",e[e.MODULE_ERROR=3e3]="MODULE_ERROR",e[e.MODULE_INVALID_DEFINITION=3001]="MODULE_INVALID_DEFINITION",e[e.MODULE_INVALID_DEFINITION_DEPENDENCY=3002]="MODULE_INVALID_DEFINITION_DEPENDENCY",e[e.MODULE_MISSING=3003]="MODULE_MISSING",e[e.MODULE_DEPENDENCY_MISSING=3004]="MODULE_DEPENDENCY_MISSING",e[e.MODULE_REMOVED=3005]="MODULE_REMOVED",e[e.MODULE_ADVERTISING_ERROR=3100]="MODULE_ADVERTISING_ERROR",e[e.SEGMENT_PSSH_DATA_MISSING=4e3]="SEGMENT_PSSH_DATA_MISSING"}(i||(t.ErrorCode=i={}))},3336:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PlayerError=void 0;var n=i(40306);t.PlayerError=function(e,t,i,r){this.code=e,this.name=n.ErrorCode[e],this.sourceIdentifier=r,this.message=null!=i?i:"".concat(this.name),this.data=t,"captureStackTrace"in Error&&"function"==typeof Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=Error(this.message).stack}},25926:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PlayerWarning=void 0;var n=i(3714),r=i(4224);t.PlayerWarning=function(e,t,i){this.type=n.PlayerEvent.Warning,this.code=e,this.name=r.WarningCode[e],this.message=t||"".concat(this.code,"/").concat(this.name),this.data=i}},4224:function(e,t){"use strict";var i;Object.defineProperty(t,"__esModule",{value:!0}),t.WarningCode=void 0,function(e){e[e.GENERAL_WARNING=1e3]="GENERAL_WARNING",e[e.API_INVALID_ARGUMENT=1001]="API_INVALID_ARGUMENT",e[e.SETUP_WARNING=1100]="SETUP_WARNING",e[e.SETUP_CREATE_OBJECT_URL_MISSING=1101]="SETUP_CREATE_OBJECT_URL_MISSING",e[e.SETUP_SERVICE_WORKER_INITIALIZATION_FAILED=1103]="SETUP_SERVICE_WORKER_INITIALIZATION_FAILED",e[e.SETUP_SERVICE_WORKER_LOCATION_MISSING=1104]="SETUP_SERVICE_WORKER_LOCATION_MISSING",e[e.SOURCE_WARNING=1200]="SOURCE_WARNING",e[e.SOURCE_CODEC_OR_FILE_FORMAT_NOT_SUPPORTED=1201]="SOURCE_CODEC_OR_FILE_FORMAT_NOT_SUPPORTED",e[e.SOURCE_SMOOTH_REPRESENTATION_MISSING=1202]="SOURCE_SMOOTH_REPRESENTATION_MISSING",e[e.SOURCE_SMOOTH_INVALID_INIT_DATA=1203]="SOURCE_SMOOTH_INVALID_INIT_DATA",e[e.SOURCE_SMOOTH_UNKNOWN_STREAM_INDEX_TYPE=1204]="SOURCE_SMOOTH_UNKNOWN_STREAM_INDEX_TYPE",e[e.SOURCE_SMOOTH_EMPTY_QUALITY_LEVEL=1205]="SOURCE_SMOOTH_EMPTY_QUALITY_LEVEL",e[e.PLAYBACK_WARNING=1300]="PLAYBACK_WARNING",e[e.PLAYBACK_GAP_DETECTED=1301]="PLAYBACK_GAP_DETECTED",e[e.PLAYBACK_DECODE_RETRIES_EXCEEDED=1302]="PLAYBACK_DECODE_RETRIES_EXCEEDED",e[e.PLAYBACK_COULD_NOT_BE_STARTED=1303]="PLAYBACK_COULD_NOT_BE_STARTED",e[e.PLAYBACK_NEGATIVE_DECODING_TIMESTAMP_ENCOUNTERED=1304]="PLAYBACK_NEGATIVE_DECODING_TIMESTAMP_ENCOUNTERED",e[e.PLAYBACK_INVALID_DATA_SEGMENT_ENCOUNTERED=1305]="PLAYBACK_INVALID_DATA_SEGMENT_ENCOUNTERED",e[e.PLAYBACK_VIDEO_DECODING_ERROR_RECOVERY=1306]="PLAYBACK_VIDEO_DECODING_ERROR_RECOVERY",e[e.NETWORK_WARNING=1400]="NETWORK_WARNING",e[e.NETWORK_COULD_NOT_LOAD_MANIFEST=1401]="NETWORK_COULD_NOT_LOAD_MANIFEST",e[e.NETWORK_COULD_NOT_LOAD_SUBTITLE=1402]="NETWORK_COULD_NOT_LOAD_SUBTITLE",e[e.DRM_WARNING=2e3]="DRM_WARNING",e[e.DRM_SERVER_CERTIFICATE_NOT_SUPPORTED=2001]="DRM_SERVER_CERTIFICATE_NOT_SUPPORTED",e[e.DRM_COULD_NOT_DECRYPT_SEGMENT=2002]="DRM_COULD_NOT_DECRYPT_SEGMENT",e[e.DRM_LICENSE_RENEWAL_FAILED=2003]="DRM_LICENSE_RENEWAL_FAILED",e[e.DRM_FAILED_LICENSE_REQUEST=2004]="DRM_FAILED_LICENSE_REQUEST",e[e.DRM_RESTRICTED_OUTPUT=2013]="DRM_RESTRICTED_OUTPUT",e[e.VR_WARNING=2100]="VR_WARNING",e[e.VR_RENDERING_ERROR=2101]="VR_RENDERING_ERROR",e[e.MODULE_WARNING=3e3]="MODULE_WARNING",e[e.MODULE_MISSING=3001]="MODULE_MISSING",e[e.MODULE_ADVERTISING_WARNING=3100]="MODULE_ADVERTISING_WARNING",e[e.MODULE_ADVERTISING_IMA_SDK_NOT_FOUND=3101]="MODULE_ADVERTISING_IMA_SDK_NOT_FOUND",e[e.MODULE_ADVERTISING_OM_SDK_MODULE_MISSING=3102]="MODULE_ADVERTISING_OM_SDK_MODULE_MISSING",e[e.MODULE_ADVERTISING_OM_SDK_INIT_FAILURE=3103]="MODULE_ADVERTISING_OM_SDK_INIT_FAILURE",e[e.MODULE_ADVERTISING_OM_SDK_TRACKING_FAILURE=3104]="MODULE_ADVERTISING_OM_SDK_TRACKING_FAILURE"}(i||(t.WarningCode=i={}))},48143:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ServiceManager=void 0,t.disposeService=function(e,t,i){void 0===i&&(i=r);var n=e.get(t,i);n&&(n.dispose(),e.set(t,null,i))};var n=i(80813),r="player-scoped";function o(e){return Object.keys(e).sort(function(e){return e!==n.ServiceName.SourceStoreService?-1:1}).filter(function(t){return!!e[t]})}t.ServiceManager=function(){function e(){this.GC={},this.HC=new WeakMap}return e.prototype.has=function(e,t){return void 0===t&&(t=r),!!this.get(e,t)},e.prototype.get=function(e,t){if(void 0===t&&(t=r),this.GC[t])return this.GC[t][e]},e.prototype.set=function(e,t,i){void 0===i&&(i=r),this.GC[i]||(this.GC[i]={}),this.GC[i][e]=t,t&&this.HC.set(t,i)},e.prototype.getScope=function(e){return this.HC.get(e)},e.prototype.delete=function(e,t){void 0===t&&(t=r),this.GC[t]&&this.GC[t][e]&&(this.HC.delete(this.GC[t][e]),this.GC[t][e].dispose(),delete this.GC[t][e])},e.prototype.maybeCall=function(e,t,i,n){void 0===i&&(i=null),void 0===n&&(n=r);var o=this.get(e,n);return o?t(o):i}
1,e.prototype.dispose=function(){Object.values(this.GC).forEach(function(e){o(e).forEach(function(t){e[t].dispose()})}),this.GC={},delete this.HC},e.prototype.removeNonPlayerScopeServices=function(){var e=this;Object.keys(this.GC).filter(function(e){return e!==r}).forEach(function(t){o(e.GC[t]).forEach(function(i){e.delete(i,t)}),delete e.GC[t]})},e}()},80813:function(e,t){"use strict";var i;Object.defineProperty(t,"__esModule",{value:!0}),t.ServiceName=void 0,function(e){e.AdaptationService="AdaptationService",e.DrmDetectorService="DrmDetectorService",e.DrmService="DrmService",e.HeartbeatService="HeartbeatService",e.LiveLatencyService="LiveLatencyService",e.ManifestCachingService="ManifestCachingService",e.ManifestLoadingService="ManifestLoadingService",e.ManifestService="ManifestService",e.ManifestUpdateSchedulingService="ManifestUpdateSchedulingService",e.MetadataParsedService="MetadataParsedService",e.PlayerStateService="PlayerStateService",e.RecoveryService="RecoveryService",e.SegmentService="SegmentService",e.SourceStoreService="SourceStoreService",e.StallTimeTrackerService="StallTimeTrackerService",e.StartOffsetService="StartOffsetService",e.StreamTimeService="StreamTimeService",e.SubtitleService="SubtitleService",e.SynchronizedTimeService="SynchronizedTimeService",e.ThumbnailService="Thumbn
1ailService",e.TimedMetadataService="TimedMetadataService",e.SgaiService="SgaiService"}(i||(t.ServiceName=i={}))},51289:function(e,t,i){"use strict";var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.EventHandler=void 0,t.generateTroubleshootUrl=u;var r=i(3336),o=i(3714),a=i(48669),s=function(){function e(){var e=this;this.call=function(){e.mI.call(e.nI,e.data)},this.match=function(t){return!!e.oI&&("string"==typeof t?t===e.eventType:t===e.mI)}}return e.prototype.set=function(e,t,i,n,r){void 0===r&&(r=!0),this.mI=e,this.eventType=t,this.nI=i,this.data=n,this.oI=r},e.prototype.clear=function(){this.mI=null,this.eventType=null,this.nI=null,this.data=null,this.oI=null},Object.defineProperty(e.prototype,"cancelable",{get:function(){return this.oI},enumerable:!1,configurable:!0}),e}();function u(e){return"https://bitmovin.com/docs/player/web/errors/".concat(e)}t.EventHandler=function(){function e(e,t,i){var n=this;for(var r in this.yI=!1,this.zI=!1,this.AI=function(){for(var e,t=n.sI?n.uI.length:20,i=null!=(e=n.uI.splice(0,t))?e:[],r=0;r<i.length;r++){var a=i[r];!a||n.tI&&a.eventType!==o.PlayerEvent.Destroy||n.BI(a)}n.yI=!1,n.uI.length>0&&n.WJ()},this.OJ=function(e,t,i,r){if(void 0===r&&(r=!0),n.NJ(e,t,i)){var o=n.SJ(i),u=0,c=n.MJ(t,e);o[e].forEach(function(t){var i=n.wI.pop()||new s;i.set(t.listener,e,n.pI,c,r),n.uI.push(i),u+=+!!t.repeatable}),u<o[e].length&&(o[e].sort(function(e,t){return a.Comparators.reverseBoolean(e.repeatable,t.repeatable)}),o[e].length=u),n.uI.length>0&&n.WJ()}},this.dispatchEvent=function(e,t,i){void 0===i&&(i=!0),n.sI||n.TJ(e,t,i)},this.clearEventsOfType=function(e){var t=n.uI.reduce(function(t,i,n){return i.match(e)?t.concat(n):t},[]);for(t.sort(function(e,t){return e-t});t.length>0;)n.uI.splice(t.pop(),1)},this.XJ=function(e){e.data===n.xI&&(window.removeEventListener("message",n.XJ),n.AI())},this.qI=e,this.pI=t,this.rI={internal:{},external:{}},this.sI=!1,this.tI=!1,this.uI=[],this.wI=[],o.PlayerEvent)o.PlayerEvent.hasOwnProperty(r)&&(this.rI.internal[o.PlayerEvent[r]]=[],this.rI.external[o.PlayerEvent[r]]=[]);this.vI=[],this.xI="".concat("bitmovin.triggerQueueWorker",".").concat(i)}return e.prototype.BI=function(e){try{e.call(),e.clear(),this.wI.push(e)}catch(e){this.qI.warn("unhandled exception in event callback",e)}},e.prototype.MJ=function(e,t){return n({type:t,timestamp:Date.now()},e)},e.prototype.NJ=function(e,t,i){var n=this.SJ(i),r=n.hasOwnProperty(e)&&n[e].length;return!!(!this.sI&&r)},e.prototype.PJ=function(e){this.uI=this.uI.filter(function(t){return!t.match(e)})},e.prototype.QJ=function(e,t,i){var n=this.SJ(i);n.hasOwnProperty(e)&&(n[e]=n[e].filter(function(e){return e.listener!==t}))},e.prototype.RJ=function(e,t){if(e&&e instanceof r.PlayerError){var i={type:o.PlayerEvent.Error,timestamp:Date.now(),code:e.code,name:e.name,message:e.message,data:e.data,troubleShootLink:u(e.code)};t&&(i.sourceIdentifier=e.sourceIdentifier),this.OJ(o.PlayerEvent.Error,i,t)}else this.qI.error("Supplied error is not of type PlayerError:",e)},e.prototype.SJ=function(e){return e?this.rI.internal:this.rI.external},e.prototype.TJ=function(e,t,i){if(void 0===t&&(t={}),void 0===i&&(i=!0),e===o.PlayerEvent.Error){var n=t;n.hasOwnProperty("code")||(n.code=3e3)}t&&!t.hasOwnProperty("timestamp")&&(t.timestamp=Date.now()),this.OJ(e,t,!0,i),this.vI.length>0&&!this.UJ(e,t)||this.OJ(e,t,!1,i)},e.prototype.UJ=function(e,t){return this.vI.every(function(i){return i(e,t)})},e.prototype.VJ=function(e,t,i,n){void 0===i&&(i=!1),void 0===n&&(n=!0);var r=this.SJ(i);r.hasOwnProperty(e)&&t&&!r[e].find(function(e){return e&&e.listener===t})&&r[e].push({listener:t,repeatable:n})},e.prototype.on=function(e,t,i){void 0===i&&(i=!1),this.VJ(e,t,i)},e.prototype.one=function(e,t,i){void 0===i&&(i=!1),this.VJ(e,t,i,!1)},e.prototype.addFromObject=function(e,t){for(var i in void 0===t&&(t=!1),e)e.hasOwnProperty(i)&&this.on(i,e[i],t)},e.prototype.off=function(e,t,i){void 0===i&&(i=!0),i&&this.PJ(t),this.QJ(e,t,!0),this.QJ(e,t,!1)},e.prototype.getEventFunction=function(){var e=this;return function(t,i,n,r){void 0===n&&(n=!1),void 0===r&&(r=!0),e.dispatchEvent(t,i,r)}},e.prototype.addExternalEventFilter=function(e){0>this.vI.indexOf(e)&&this.vI.push(e)},e.prototype.removeExternalEventFilter=function(e){var t=this.vI.indexOf(e);t>=0&&this.vI.splice(t,1)},e.prototype.dispose=function(){this.uI=this.uI.filter(function(e){return!e.cancelable}),this.sI=!0,this.TJ=null,this.vI=null,this.AI()},e.prototype.setBeingDestroyed=function(){this.tI=!0},Object.defineProperty(e.prototype,"hasErrorBeenFired",{get:function(){return this.zI}
vendor: 25,412 bytes, line 1
1,enumerable:!1,configurable:!0}),e.prototype.resetErrors=function(){this.zI=!1},e.prototype.fireError=function(e){var t,i;this.RJ(e,!0),!this.zI&&this.UJ(o.PlayerEvent.Error,e)&&(this.zI=!0,this.RJ(e,!1)),this.qI.error("PlayerError(".concat(e.code,"/").concat(e.name,") ").concat(null!=(t=e.message)?t:""),null!=(i=e.data)?i:" ")},e.prototype.WJ=function(){this.yI||(this.yI=!0,window.addEventListener("message",this.XJ),window.postMessage(this.xI,location.origin+location.pathname))},e}()},90408:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.maybeFireDurationChangedEvent=function(e,t,i){null!=e&&e!==t&&i&&i.dispatchEvent(n.PlayerEvent.DurationChanged,{from:e,to:t})},t.createPlayerErrorFromMediaError=function(e,t,i){void 0===i&&(i=!1);var n,s=a(e)?e.errorObject.code:e.code,u=a(e)?e.errorMessage:JSON.stringify(e),c=a(e)?e.errorObject:{errorMessage:JSON.stringify(e),code:s};i&&(c.exception=u);var l=null!=(n=o.ErrorCodeMap[o.MediaErrorCode[s]])?n:r.ErrorCode.UNKNOWN;return new r.PlayerError(l,c,"The video element has thrown a media error.",t)};var n=i(3714),r=i(20213),o=i(75108);function a(e){return"errorObject"in e}},89279:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ImpressionCall=void 0;var n=i(45202),r=i(4129),o=i(29669),a=i(7387),s=i(21513),u=i(79069);function c(){return(0,s.getCapabilities)()[a.CapabilityKey.isReactNative]?"Kepler:unknown":"generic"}t.ImpressionCall=function(){function e(e,t){this.logger=e,this.cX=!1,this.dX=u.LicensingLegacySslBackendBaseUrl+"/impression",this.setImpressionServerUrl(t)}return e.prototype.eX=function(e){return new r.DefaultContentLoader({settings:{RETRY_DELAY:0,INCREASE_RETRY_DELAY:!1,INCREASE_RETRY_DELAY_BASE_SEC:0,MAX_INCREASE_RETRY_DELAY_SEC:0,QUERY_PARAMETERS:[],HTTP_HEADERS:null,XHR_TIMEOUT:2e4,DISABLE_RETRY_FOR_RESPONSE_STATUS:{}},logger:this.logger,config:{network:{requestApi:e}}})},e.prototype.issue=function(e,t,i){var r,a=this;if(this.cX)return Promise.resolve(void 0);this.aX=null!=(r=this.aX)?r:this.eX(i),this.cX=!0;var u={domain:n.Environment.hostname,key:e,version:n.Environment.VERSION_NUMBER,type:"web:"+t,platform:c()};return this.aX.load(this.bX,o.HttpRequestMethod.POST,null,JSON.stringify(u)).then(function(e){return e},function(n){return a.bX!==a.dX&&(0,s.getCapabilities)().isTizen?(a.cX=!1,a.setImpressionServerUrl(a.dX),a.issue(e,t,i)):n})},e.prototype.setImpressionServerUrl=function(e){e&&(this.bX=e)},e.prototype.reset=function(){this.cX=!1},e.prototype.dispose=function(){var e;null==(e=this.aX)||e.dispose()},e}()},96859:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LicenseCall=void 0;var n,r=i(45202),o=i(4129),a=i(29669),s=i(21513),u=i(79069);!function(e){e.Granted="granted",e.Denied="denied"}(n||(n={}));var c=["localhost","127.0.0.1"],l=u.LicensingLegacySslBackendBaseUrl+"/licensing";function d(e){if("string"==typeof e)try{return JSON.parse(e)}catch(e){return{}}return e}t.LicenseCall=function(){function e(e,t,i){this.jX=0,this.kX=[],this.lX=!1,this.mX=void 0,this.fX=t,this.gX=i,this.iX=e}return e.prototype.issue=function(e,t){var i=this;this.nX()?setTimeout(function(){return e(!0)},0):this.gX?this.mX?setTimeout(function(){return e(i.mX.granted,i.mX.payload,i.mX.data)},0):(this.kX.push(e),this.lX||(this.lX=!0,setTimeout(function(){i.pX(i.gX,i.fX,t)},this.jX))):setTimeout(function(){return e(!1,{validationInformation:[{key:"key",errorMessage:"field can't take an empty string"}]})},0)},e.prototype.nX=function(){return c.includes(r.Environment.hostname)||!this.fX},e.handleSuccessfulLicenseRequest=function(e){var t={granted:!1,payload:{},data:{}};return e&&e.analytics&&(t.data.analytics={key:e.analytics}),e&&e.hasOwnProperty("status")&&(e.status===n.Granted?(t.granted=!0,t.payload=function(e){var t={};return e.hasOwnProperty("reporting")&&e.reporting&&(t.reporting=!0),e.hasOwnProperty("reportingUrls")&&(t.reportingUrls=e.reportingUrls),e.hasOwnProperty("reportingInterval")&&(t.reportingInterval=e.reportingInterval),e.hasOwnProperty("reportingSampleInterval")&&(t.reportingSampleInterval=e.reportingSampleInterval),t}(e)):e.status===n.Denied&&(t.granted=!1,t.payload={message:e.message})),t},e.handleFailedLicenseRequest=function(e){var t={granted:!1,payload:{},data:{}};return e&&e.hasOwnProperty("validationInformation")?(t.granted=!1,t.payload=e):t.granted=!0,t},e.prototype.oX=function(e){for(var t=0,i=this.kX;t<i.length;t++)(0,i[t])(e.granted,e.payload,e.data)},e.prototype.setCustomData=function(e){this.hX=e},e.prototype.setDelay=function(e){isNaN(e)||(this.jX=Math.min(e,3e4))},e.prototype.pX=function(t,i,n){var o=this,u=JSON.stringify({domain:r.Environment.hostname,key:t||"",version:r.Environment.VERSION_NUMBER,customData:this.hX}),c=this.qX(n);c.load(i,a.HttpRequestMethod.POST,a.HttpResponseType.JSON,u).then(function(t){c.dispose(),o.mX=e.handleSuccessfulLicenseRequest(d(t.body)),o.lX=!1,o.oX(o.mX)},function(r){c.dispose(),i!==l&&(0,s.getCapabilities)().isTizen?setTimeout(function(){return o.pX(t,l,n)},o.jX):(o.mX=e.handleFailedLicenseRequest(d(r.body)),o.lX=!1,o.oX(o.mX))})},e.prototype.qX=function(e){return new o.DefaultContentLoader({settings:{RETRY_DELAY:0,INCREASE_RETRY_DELAY:!1,INCREASE_RETRY_DELAY_BASE_SEC:0,MAX_INCREASE_RETRY_DELAY_SEC:0,QUERY_PARAMETERS:[],HTTP_HEADERS:null,XHR_TIMEOUT:2e4,DISABLE_RETRY_FOR_RESPONSE_STATUS:{}},logger:this.iX,config:{network:{requestApi:e}}})},e.getInstance=function(t,i,n){var r=[i,n].toString();return e.instanceMap.hasOwnProperty(r)||(e.instanceMap[r]=new e(t,i,n)),e.instanceMap[r]},e.reset=function(){Object.keys(e.instanceMap).forEach(function(t){return delete e.instanceMap[t]})},e.instanceMap={},e}()},79069:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LicensingLegacySslBackendBaseUrl=void 0,t.LicensingLegacySslBackendBaseUrl=atob("aHR0cHM6Ly9saWNlbnNpbmctbGVnYWN5LXNzbC1jb21wYXQuYml0bW92aW4uY29t")},32703:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getDateRangeEvent=r,t.nextDateRangeWithSameClass=o,t.extractDateRangeMetadata=function(e,t,i){e.forEach(function(e,n,a){var s;e.endOnNext&&e.class&&(s=o(e,n,a)),i(r(e,t,s))})};var n=i(89927);function r(e,t,i){var r={};return r.startTime=(0,n.toSeconds)(Date.parse(e.startDate)),e.endDate?r.endTime=(0,n.toSeconds)(Date.parse(e.endDate)):void 0===e.duration||isNaN(e.duration)?e.endOnNext&&i&&(r.endTime=(0,n.toSeconds)(Date.parse(i.startDate))):r.endTime=(0,n.toSeconds)(Date.parse(e.startDate))+e.duration,t&&(r.startTime-=t),r.endTime&&t&&(r.endTime-=t),r.data=e,r}function o(e,t,i){for(var n=t+1;n<i.length;n++)if(i[n].class&&i[n].class===e.class)return i[n]}},58735:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.calculateMetadataHash=function(e,t){var i;return void 0===t&&(t=""),o(e)?String((0,r.calcHash)(e.metadataType+e.start+e.metadata.id+Object.keys(e.metadata).length+Object.keys(null!=(i=e.metadata.clientAttributes)?i:{}).length)):String((0,r.calcHash)(t+JSON.stringify(e)))},t.isDateRangeMetadata=o;var n=i(20213),r=i(57387);function o(e){return e.metadataType===n.MetadataType.DATERANGE}},59225:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MetadataService=void 0;var n=i(80813),r=i(32485);t.MetadataService=function(){function e(e,t){this.Q2=e.serviceManager.get(n.ServiceName.MetadataParsedService),this.R2=new r.TimeMetadataHandler(e,t)}return e.prototype.addToMetadataParsedService=function(e,t,i){t.start=t.start||e,this.Q2.addMetadata(i,t)},e.prototype.addToTimeline=function(e,t,i){this.R2.add(e,t,i)},e.prototype.removeUntil=function(e){this.R2.removeUntil(e)},e.prototype.removeMatchingCues=function(e,t){this.R2.removeMatchingCues(e,t)},e.prototype.reset=function(e){this.R2.reset(e)},e.prototype.dispose=function(){this.R2.dispose()},e}()},34851:function(e,t,i){"use strict";var n=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(t,i)};return function(t,i){if("function"!=typeof i&&null!==i)throw TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),r=this&&this.__spreadArray||function(e,t,i){if(i||2==arguments.length)for(var n,r=0,o=t.length;r<o;r++)!n&&r in t||(n||(n=Array.prototype.slice.call(t,0,r)),n[r]=t[r]);return e.concat(n||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.MetadataTimeline=void 0;var o=i(3714);t.MetadataTimeline=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.addCue=function(t,i,n){var a,s;if(!isNaN(t)&&!isNaN(i)&&n){var u=this.Mbb(n.metadata,this.cues);if(-1===u)e.prototype.addCue.call(this,t,i,n);else{var c=this.Mbb(n.metadata,this.activeCues);if(this.Nbb(u,c,{start:t+this.timestampOffset,end:i+this.timestampOffset,content:n,updates:r([],this.cues[u].updates,!0)}),-1!==c){var l={metadataType:n.metadataType,metadata:n.metadata,data:n.metadata,start:null!=(a=n.start)?a:t,end:null!=(s=n.end)?s:i};this.context.eventHandler.dispatchEvent(o.PlayerEvent.MetadataChanged,l)}}}},t.prototype.Mbb=function(e,t){return t.findIndex(function(t){return t.content.metadata.id===e.id})},t.prototype.Nbb=function(e,t,i){-1!==e&&this.cues.splice(e,1,i),-1!==t&&this.activeCues.splice(t,1,i)},t}(i(80438).Timeline)},8719:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StoredCueTracker=void 0,t.StoredCueTracker=function(){function e(){this.nfb={}}return e.prototype.add=function(e){this.nfb[e]=void 0},e.prototype.remove=function(e){delete this.nfb[e]},e.prototype.removeAll=function(){this.nfb={}},e.prototype.has=function(e){return e in this.nfb},e.prototype.dispose=function(){this.removeAll()},e}()},32485:function(e,t,i){"use strict";var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.TimeMetadataHandler=t.TimedMetadataType=void 0,t.isSegmentBoundMetadata=l;var r,o=i(3714),a=i(86897),s=i(15971),u=i(34851),c=i(80438);function l(e){return[r.InBand,r.SegmentPlayback,r.CustomTag].includes(e)}!function(e){e.InBand="inband",e.SegmentPlayback="segmentPlayback",e.Manifest="manifest",e.EventStream="eventStream",e.DateRange="dateRange",e.CustomTag="customTag"}(r||(t.TimedMetadataType=r={})),t.TimeMetadataHandler=function(){function e(e,t){var i=this;this.X2=function(e){var t,n,r;if(null!=(null==(t=null==e?void 0:e.content)?void 0:t.eventType))return null==(r=(n=i.U2)[e.content.eventType])?void 0:r.call(n,e.content)},this.S2=e,this.U2=t,this.V2()}return e.prototype.V2=function(){for(var e in this.T2={},this.U2)this.U2.hasOwnProperty(e)&&(this.T2[e]="dateRange"===e?new u.MetadataTimeline(this.S2,{onCueEnter:this.X2}):new c.Timeline(this.S2,{onCueEnter:this.X2,allowDuplicates:e===r.SegmentPlayback}),this.T2[e].show())},e.prototype.W2=function(e,t){var i=(0,a.getBufferState)((0,s.getSourceState)(this.S2)),n=(0,a.getBufferStartTime)(null==i?void 0:i.bufferStateMap);e.removeMatchingCues(function(e){return e.start<=t&&e.end<=t+1&&e.end<=n})},e.prototype.add=function(e,t,i){if(this.U2.hasOwnProperty(e)){var a=this.T2[e],s=t+1;e===r.SegmentPlayback&&function(e){return e.metadata&&e.metadata.event&&e.metadata.representationId}(i)&&"event"in i.metadata&&"duration"in i.metadata.event?s=t+i.metadata.event.duration:function(e){return e.metadataType===o.MetadataType.DATERANGE}(i)&&(s=!0===i.metadata.endOnNext&&void 0===i.end?1/0:i.start===i.end?i.end+1:i.end),l(e)&&this.W2(a,t);var u=n({eventType:e},i);a.addCue(t,s,u)}},e.prototype.reset=function(e){if(e&&this.U2.hasOwnProperty(e))this.T2[e].removeCues();else for(var t in this.U2)this.U2.hasOwnProperty(t)&&this.T2[t].removeCues()},e.prototype.removeMatchingCues=function(e,t){this.T2[e].removeMatchingCues(t)},e.prototype.removeUntil=function(e){var t=this;Object.keys(this.T2).forEach(function(i){t.T2[i].removeCuesUntil(e)})},e.prototype.dispose=function(){for(var e in this.T2)this.T2.hasOwnProperty(e)&&(this.T2[e].dispose(),this.T2[e]=null);this.T2=null},e.prototype.getTimeline=function(e){if(this.T2)return this.T2[e]},e}()},80438:function(e,t,i){"use strict";var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.Timeline=void 0;var r=i(80813),o=i(3714),a=i(13531),s=i(57387),u=i(70850),c=i(58735),l=i(8719);function d(e){return(0,c.isDateRangeMetadata)(e.content)?(0,c.calculateMetadataHash)(e.content):String((0,s.calcHash)(JSON.stringify({start:e.start,end:e.end,content:e.content})))}function h(e){var t={text:e.text};return"html"in e&&(t.html=e.html,t.text=t.text||t.html),"region"in e&&(t.region=e.region),"regionStyle"in e&&(t.regionStyle=e.regionStyle),"position"in e&&(t.position=e.position),"image"in e&&(t.image=e.image),"vtt"in e&&(t.vtt=e.vtt),t}function p(e){var t=[];return"updates"in e&&(t=e.updates.map(function(t){return{updateTime:t.updateTime,content:{html:t.html,text:e.text}}})),t}function f(e,t){for(var i=e.length-1;i>=0;i--)if(e[i].updateTime<=t)return e[i]}t.Timeline=function(){function e(e,t){var i=this;this.cues=[],this.activeCues=[],this.activeCueUpdates=[],this.timestampOffset=0,this.Rbb=function(e){var t=e.time||e.relativeTime||0;i.Tbb(t),i.Ubb(t),i.Vbb(t)},this.context=e,this.Pbb=e.internalPlayer,this.Obb=t,this.Qbb=!1,t.allowDuplicates||(this.storedCueTracker=new l.StoredCueTracker),this.Pbb&&this.startListening()}return e.prototype.startListening=function(){this.Qbb||(this.Qbb=!0,this.Pbb.on(o.PlayerEvent.TimeChanged,this.Rbb))},e.prototype.stopListening=function(){this.Qbb&&(this.Pbb.off(o.PlayerEvent.TimeChanged,this.Rbb),this.Qbb=!1)},e.shouldCueBeActive=function(e,t){return e.end>=t&&e.start<=t},e.prototype.Sbb=function(e){for(var t=0;t<this.activeCues.length;t++)if(e===this.activeCues[t])return!0;return!1},e.prototype.Tbb=function(t){for(var i,n,r=0;r<this.activeCues.length;r++){var o=this.activeCues[r];e.shouldCueBeActive(o,t)||(this.activeCues.splice(r,1),r--,null==(n=(i=this.Obb).onCueExit)||n.call(i,o))}},e.prototype.Ubb=function(t){for(var i,n,r=0;r<this.cues.length;r++){var o=this.cues[r];if(e.shouldCueBeActive(o,t)&&!this.Sbb(o)){if(!1===(null==(n=(i=this.Obb).onCueEnter)?void 0:n.call(i,o)))continue;this.activeCues.push(o)}}},e.prototype.Vbb=function(e){for(var t,i,r=[],o=0,a=this.activeCues;o<a.length;o++){var s=a[o],u=f(s.updates,e);void 0!==u&&(r.push(u),this.Wbb(u)||null==(i=(t=this.Obb).onCueUpdate)||i.call(t,n(n({},s),{content:n(n({},s.content),u.content)})))}this.activeCueUpdates=r},e.prototype.Wbb=function(e){return!!this.activeCueUpdates.find(function(t){return t===e})},e.prototype.addCue=function(e,t,i,r){var o,s=this;if(void 0===r&&(r=[]),!isNaN(e)&&!isNaN(t)&&i){var c=this.storedCueTracker?d({start:e,end:t,content:i}):void 0;if(!(null==(o=this.storedCueTracker)?void 0:o.has(c))){var l=r.map(function(e){return n(n({},e),{updateTime:e.updateTime+s.timestampOffset})}),h={start:e+this.timestampOffset,end:t+this.timestampOffset,content:i,updates:l};if(this.cues.length>0){var p=this.cues[this.cues.length-1];if(u.Util.deepEqual(i,p.content)&&e>=p.start&&e-.5<=p.end)return this.context.logger.isLevelEnabled(a.LogLevel.INSANE)&&this.context.logger.insane("changing end time of existing cue instead of adding a new cue ["+e+"-"+t+"] "+i),void(this.cues[this.cues.length-1].end=Math.max(t,p.end))}if(this.context.logger.isLevelEnabled(a.LogLevel.INSANE)){var f=JSON.stringify(i);f.length>500&&(f=f.substring(0,497)+"..."),this.context.logger.insane("add new cue ["+e+"-"+t+"] "+f)}this.storedCueTracker&&this.storedCueTracker.add(c),this.cues.push(h)}}},e.prototype.addCues=function(e,t){t=t||0;for(var i=0,n=0,r=e;n<r.length;n++){var o=r[n];if(o&&o.hasOwnProperty("start")&&o.hasOwnProperty("end")&&o.end>t){var a=h(o),s=p(o);this.addCue(o.start,o.end,a,s),i=Math.max(i,o.end)}}return i},e.prototype.removeMatchingCues=function(e){var t=this;this.cues=this.cues.filter(function(i){var n,r=e(i);return r&&(null==(n=t.storedCueTracker)||n.remove(d(i))),!r})},e.prototype.removeCuesUntil=function(e){this.removeMatchingCues(function(t){return t.end<e})},e.prototype.removeCues=function(){var e;this.hide(),this.cues=[],null==(e=this.storedCueTracker)||e.removeAll()},e.prototype.hide=function(){this.Tbb(-1),this.activeCues=[],this.activeCueUpdates=[]},e.prototype.show=function(){var e=this.context.serviceManager.get(r.ServiceName.PlayerStateService),t=(null==e?void 0:e.seekingOrTimeshifting)?e.targetPlaybackTime:this.Pbb.getCurrentTime();this.Rbb({time:t})},e.prototype.isVisible=function(){return!0},e.prototype.setTimestampOffset=function(e){this.timestampOffset=e},e.prototype.dispose=function(){var e;this.cues=[],this.activeCues=[],this.activeCueUpdates=[],null==(e=this.storedCueTracker)||e.dispose(),this.stopListening()},e.prototype.getCues=function(){return this.cues},e}()},4129:function(e,t,i){"use strict";var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultContentLoader=void 0;var r,o=i(89927),a=i(88052),s=i(62756),u=i(3714),c=i(29669),l=i(70962),d=i(68205),h=i(21513),p=i(4527),f=i(47993),g=i(88844),m=i(58313),y=i(70850),v=i(39980),S=i(77401),b=i(91523),E=i(57456),T=i(10647);function _(){return{requestType:c.HttpRequestType.INTERNAL,maxRetries:0}}!function(e){e.start="_download-start"}(r||(r={})),t.DefaultContentLoader=function(){function e(e,t){void 0===t&&(t=_());var i=this;this.load=function(e,t,n,r,o,a,s,u){return void 0===a&&(a=!1),void 0===u&&(u=!1),(i.hK||i.qK)&&i.eK.logger.debug("DefaultContentLoader: load called while a request is already active"),i.oK=s,i.rK=u,t=t||c.HttpRequestMethod.GET,e=i.xK(e),o=E.XhrHelper.mergeHeaders(i.nK.HTTP_HEADERS,o),e?(i.pK={method:t,url:m.URLHelper.toFullUrl(e),headers:JSON.parse(JSON.stringify(o)),responseType:n||c.HttpResponseType.TEXT,credentials:a?"include":"omit"},r&&(i.pK.body=r),i.FK(i.pK).then(function(e){return i.yK(e).catch(i.JK)}).then(i.GK).then(i.DK).then(function(e){return i.sK&&e.body instanceof i.sK.Stream?e.body=e.body.transform(function(e){return e},function(){return i.IK(e)},function(t){return t.message===S.RequestError.Failed&&i.cancel(),e.body.abort(t.message),t.message}):i.IK(e),e})):Promise.reject("no url given")},this.DK=function(e){return i.NK(e.status)?i.MK("Bad response from server",e):Promise.resolve(e)},this.FK=function(e){return i.EK(e,i.gK.preprocessHttpRequest)},this.GK=function(e){return i.EK(e,i.gK.preprocessHttpResponse)},this.HK=function(e){if("function"==typeof i.fK.onProgress&&!i.iK&&i.hK&&(!(e.loadedBytes>=0)||void 0===e.totalBytes||!(e.loadedBytes>=e.totalBytes))){var t=i.tK.getElapsedTimeFrom(i.uK.start);i.fK.onProgress(n(n({},e),{elapsedTime:t}))}},this.JK=function(e){return i.lK++,e.error===S.RequestError.Canceled?i.MK(e.error,e.response):i.GK(e.response).then(function(t){var n,r=null==t?void 0:t.status,o=t?t.url:null;if(!r&&i.fK.resetRetriesWhenOffline&&o&&function(e){return"string"==typeof e&&(0,h.getReachableDomains)().domains.includes((0,m.extractOrigin)(e))}(o)&&(i.lK=0),i.gK.retryHttpRequest&&"function"==typeof i.gK.retryHttpRequest)return i.KK(e.error,t);if((null==t?void 0:t.status)&&i.NK(t.status))return i.MK("retry disabled for HTTP status code "+t.status,t);var a=null!=(n=i.fK.maxRetries)?n:0;return i.lK>a?(i.eK.logger.debug("Retries exceeded for ".concat(i.fK.requestType," (max retries: ").concat(a,")")),i.MK(e.error,t)):i.LK().catch(i.JK)})},this.MK=function(e,t){var n=i.lK;return i.OK(),i.hK=!1,i.wK(!1,t,n),i.fK.onFailure(t,{name:e},n-1),Promise.reject(null!=t?t:Error(e))},this.eK=e,this.gK=this.eK.config&&this.eK.config.network||{},a.ModuleManager.has(s.ModuleName.EngineBitmovin)&&(this.sK=a.ModuleManager.get(s.ModuleName.EngineBitmovin)),this.fK=n(n({},_()),t),this.tK=new v.PerformanceMonitor(this.eK),this.PK()}return e.prototype.vK=function(e,t,i){return Math.min(Math.exp(e*t),i)},e.prototype.wK=function(e,t,i){t&&this.fK.requestType&&this.mK(u.PlayerEvent.DownloadFinished,{type:u.PlayerEvent.DownloadFinished,timestamp:Date.now(),httpStatus:t.status,success:e,url:t.url,downloadTime:(0,o.toSeconds)(y.Util.roundValue((0,o.toMilliSeconds)(t.elapsedTime),0)),size:t.length||0,attempt:i,maxAttempts:this.fK.maxRetries+1,downloadType:this.fK.requestType,mimeType:this.oK,timeToFirstByte:t.timeToFirstByte})},e.prototype.isLoading=function(){return this.hK},e.prototype.isRetrying=function(){return this.lK>0},e.prototype.setResetRetriesWhenOffline=function(e){this.fK.resetRetriesWhenOffline=e},e.prototype.setMaxRetries=function(e){this.fK.maxRetries=e},e.prototype.xK=function(e){return m.URLHelper.appendQueryParametersToUrl(e,this.nK.QUERY_PARAMETERS)},e.prototype.yK=function(e){var t=this;if(this.iK)return Promise.reject({error:S.RequestError.Canceled,response:null});this.uK&&this.tK.clear(this.uK);var i="request-"+y.Util.generateUniqueId();return this.uK={start:i+r.start},this.tK.addMarker(this.uK.start),this.pK=e,this.hK=!0,this.AK(),this.jK.getResponse().then(function(e){return null==e.elapsedTime&&(e.elapsedTime=t.tK.getElapsedTimeFrom(t.uK.start),e.timeToFirstByte=0),e})},e.prototype.zK=function(){var e,t=this;this.gK.sendHttpRequest&&"function"==typeof this.gK.sendHttpRequest&&(e=(0,y.safeUserCallback)(function(){return t.gK.sendHttpRequest(t.fK.requestType,t.pK)},this.eK.logger));var i=this.gK.requestApi===c.NetworkRequestApi.Fetch||this.rK;if(i&&!(0,f.isFetchSupported)()&&(this.eK.logger.debug("Using fetch API is configured but not supported, falling back to XHR!"),i=!1),!e||"function"!=typeof e.getResponse){var n=(0,b.getRequestTimeout)(this.eK,this.fK.requestType);e=i?this.CK(n):this.BK(n)}return e},e.prototype.AK=function(){var e=this,t=this.zK();t.setProgressListener(function(t){return e.HK(t)});var i=p.CancelablePromise.makeCancelable(t.getResponse());this.jK={getResponse:function(){return i},cancel:function(){t.cancel(),i.cancel({error:S.RequestError.Canceled,response:null})},setProgressListener:t.setProgressListener}},e.prototype.BK=function(e){var t=this.fK.disableDownloadTimeout?-1:e;return new T.XhrRequestController(this.eK.logger,this.pK,t)},e.prototype.CK=function(e){return new this.sK.FetchController(this.eK,this.pK,e,this.rK)},e.prototype.EK=function(e,t){var i,n=this;return t&&"function"==typeof t?Promise.resolve(null!=(i=(0,y.safeUserCallback)(function(){return t(n.fK.requestType,e)},this.eK.logger))?i:e):Promise.resolve(e)},e.prototype.IK=function(e){this.hK=!1,this.wK(!0,e,this.lK+1),this.fK.onSuccess(e,e.elapsedTime,e.url),this.OK(),e.url&&(0,h.default)().dispatch((0,d.addReachableDomain)((0,m.extractOrigin)(e.url)))},e.prototype.KK=function(e,t){var i=this;return Promise.resolve((0,y.safeUserCallback)(function(){return i.gK.retryHttpRequest(i.fK.requestType,t,i.lK)},this.eK.logger)).then(function(e){return e.request?(i.eK.logger.debug("HttpResponse was passed on 'retryHttpRequest' instead of a HttpRequest",e),i.MK("HttpResponse was passed on 'retryHttpRequest' instead of a HttpRequest",t)):i.yK(e).catch(i.JK)}).catch(function(){return i.MK(e,t)})},e.prototype.LK=function(){var e=this,t=this.fK.retryDelay,i="constant";return this.nK.INCREASE_RETRY_DELAY&&(t=this.vK(this.nK.INCREASE_RETRY_DELAY_BASE_SEC,this.lK,this.nK.MAX_INCREASE_RETRY_DELAY_SEC),i="incremental"),this.eK.logger.debug("Using ".concat(i," retry delay (").concat(null==t?void 0:t.toFixed(1)," seconds, retry ").concat(this.lK,") for ").concat(this.pK.url)),new Promise(function(i,n){var r=window.setTimeout(function(){e.yK(e.pK).then(i).catch(n)},(0,o.toMilliSeconds)(t));e.qK=function(){e.qK=null,(0,g.clearTimeoutIfDefined)(r),n({error:S.RequestError.Canceled,response:null})}})},e.prototype.NK=function(e){return this.fK.requestType in this.nK.DISABLE_RETRY_FOR_RESPONSE_STATUS&&this.nK.DISABLE_RETRY_FOR_RESPONSE_STATUS[this.fK.requestType].includes(e)},e.prototype.OK=function(){this.lK=0,this.iK=!1,this.qK&&"function"==typeof this.qK&&this.qK()},e.prototype.cancel=function(){this.iK=!0,this.hK&&(this.hK=!1,this.qK&&this.qK(),this.jK&&this.jK.cancel())},e.prototype.getResponse=function(){if(this.jK&&"function"==typeof this.jK.getResponse)return this.jK.getResponse()},e.prototype.PK=function(){var e=["onSuccess","onFailure"];this.lK=0;var t={};y.Util.deepCopy(t,l.DefaultSettings),this.nK=this.eK.settings||t;for(var i=0;i<e.length;i++)this.fK.hasOwnProperty(e[i])&&"function"==typeof this.fK[e[i]]||(this.fK[e[i]]=function(){});this.eK.eventHandler&&"function"==typeof this.eK.eventHandler.dispatchEvent?this.mK=this.eK.eventHandler.dispatchEvent:this.mK=function(){}},e.prototype.dispose=function(){this.isLoading()&&this.cancel(),this.uK&&this.tK.clear(this.uK),this.jK=null,this.mK=null,this.nK=null},e}()},85625:function(e,t){"use strict";var i;
1Object.defineProperty(t,"__esModule",{value:!0}),t.ManifestMimeType=void 0,function(e){e.Dash="application/dash+xml",e.Hls="application/x-mpegurl",e.Smooth="application/vnd.ms-sstr+xml"}(i||(t.ManifestMimeType=i={}))},39980:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PerformanceMonitor=void 0;var n=i(89927),r=i(50025);t.PerformanceMonitor=function(){function e(e){this.context=e}return e.prototype.F4=function(e){return 0===e.length?(this.context.logger.warn("[PERFORMANCE] Mark was not found"),[{startTime:0,duration:0}]):e},e.prototype.G4=function(e){return this.F4(r.performanceWrapper.getEntriesByName(e))},e.prototype.addMarker=function(e){r.performanceWrapper.mark(e)},e.prototype.getElapsedTimeFrom=function(e){var t=this.G4(e);return(0,n.toSeconds)(r.performanceWrapper.now()-t[0].startTime)},e.prototype.clear=function(e){(Array.isArray(e)?e:Object.values(e)).forEach(function(e){r.performanceWrapper.clearMarks(e)})},e}()},13053:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getPerformanceShim=void 0,function(e){e.mark="mark",e.measure="measure"}(i||(i={}));var i,n=[],r={},o=function(e,t){n=t?n.filter(function(i){return i.name!==t&&i.entryType===e}):n.filter(function(t){return t.entryType!==e})},a=function(e,t){return n.filter(function(i){return i[e]===t})},s=function(e,t){r[t]=e,n.push(e)};t.getPerformanceShim=function(){return{now:function(){return Date.now()},mark:function(e){s({name:e,entryType:i.mark,startTime:this.now(),duration:0},e)},measure:function(e,t,n){!function(e,t){var i=function(e){return"[Performance] Mark ".concat(e," does not exist.")};if(!r[t])throw Error(i(t));if(!r[e])throw Error(i(e))}(t,n);var o=r[t]?r[t].startTime:0;s({name:e,startTime:o,duration:(r[n]?r[n].startTime:this.now())-o,entryType:i.measure},e)},getEntriesByName:function(e){return a("name",e)},getEntriesByType:function(e){return a("entryType",e)},clearMarks:function(e){o(i.mark,e)},clearMeasures:function(e){o(i.measure,e)}}}},50025:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.performanceWrapper=t.resolvePerformanceApi=t.requiredMethodNames=void 0;var n=i(13053);t.requiredMethodNames=["now","mark","measure","getEntriesByName","getEntriesByType","clearMarks","clearMeasures"],t.resolvePerformanceApi=function(e){return!function(e,t){return t.every(function(t){return"function"==typeof e[t]})}(e.performance,t.requiredMethodNames)?(0,n.getPerformanceShim)():e.performance},t.performanceWrapper=(0,t.resolvePerformanceApi)(window)},77401:function(e,t){"use strict";var i;Object.defineProperty(t,"__esModule",{value:!0}),t.RequestError=void 0,function(e){e.Failed="request failed",e.Canceled="canceled by user",e.TimedOut="request has timed out"}(i||(t.RequestError=i={}))},4131:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hasLoadedData=function(e){var t,i,n=(null!=(i=null==(t=e.responseTiming)?void 0:t.headersReceivedTimestamp)?i:-1)>-1,r=e.loadedBytes>0;return n&&r}},43446:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TimingUtil=void 0;var n=i(89927);t.TimingUtil=function(){function e(){}return e.getHiResTimestamp=function(){return window.performance&&"function"==typeof window.performance.now?(0,n.toSeconds)(window.performance.now()):(0,n.toSeconds)(Date.now())},e}()},96266:function(e,t){"use strict";var i;Object.defineProperty(t,"__esModule",{value:!0}),t.XhrEvent=void 0,function(e){e.ReadyStateChange="readystatechange",e.Abort="abort",e.Error="error",e.Load="load",e.LoadEnd="loadend",e.LoadStart="loadstart",e.Progress="progress",e.Timeout="timeout"}(i||(t.XhrEvent=i={}))},57456:function(e,t,i){"use strict";var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.XhrHelper=void 0,t.isDownloadTimeInformationValid=function(e){return e.length>0&&e.elapsedTime>=0&&e.timeToFirstByte>=0&&e.elapsedTime>e.timeToFirstByte};var r=i(29669),o=i(21513);t.XhrHelper=function(){function e(){}return e.headersStringToArray=function(e){if(!e||0===e.trim().length)return{};var t={};return e.split("\r\n").filter(function(e){return""!==e}
vendor: 36,566 bytes, line 1
1).forEach(function(e){var i=e.split(": ");t[i[0]]=i[1]}),t},e.toHttpResponse=function(t,i,r){var a=t.readyState===XMLHttpRequest.OPENED&&(0,o.getCapabilities)().isTizen?{status:-1,statusText:"PENDING"}:{status:t.status,statusText:t.statusText},s=e.headersStringToArray(t.getAllResponseHeaders()),u=n({request:i,url:t.responseURL||i.url,headers:s},a);return function(e){return e.openedTimestamp>-1&&e.headersReceivedTimestamp>-1&&e.doneTimestamp>-1}(r)&&(u.timeToFirstByte=r.headersReceivedTimestamp-r.openedTimestamp,u.elapsedTime=r.doneTimestamp-r.openedTimestamp),t.response&&(u.body=this.getResponseBody(t,i.responseType),u.length=t.response.byteLength||t.response.length||0),u},e.getResponseBody=function(e,t){var i;if(t===r.HttpResponseType.JSON&&(null==(i=e.getResponseHeader("content-type"))?void 0:i.includes("application/json"))&&"string"==typeof e.response)try{return JSON.parse(e.response)}catch(e){return null}return e.response},e.setHeaders=function(e,t){t&&Object.keys(t).length>0&&Object.keys(t).forEach(function(i){e.setRequestHeader(i,t[i])})},e.mergeHeaders=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var i={};return e.forEach(function(e){e&&Object.keys(e).forEach(function(t){var n=function(e,t){return Object.keys(e).find(function(e){return e.toLowerCase()===t.toLowerCase()})}(i,t);n?i[n]=e[t]:i[t]=e[t]})}),i},e}()},10647:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.XhrRequestController=void 0;var n=i(77401),r=i(96266),o=i(99313);t.XhrRequestController=function(){function e(e,t,i){var n=this;this.setProgressListener=function(e){n.H4.on(r.XhrEvent.Progress,function(t){return e(t)})},this.H4=new o.XhrWrapper(e,t,i)}return e.prototype.getResponse=function(){return this.I4=this.I4||this.H4.send(),this.I4},e.prototype.cancel=function(){this.H4.abort(n.RequestError.Canceled)},e}()},99313:function(e,t,i){"use strict";var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.XhrWrapper=void 0;var r=i(89927),o=i(88844),a=i(77401),s=i(43446),u=i(96266),c=i(57456);t.XhrWrapper=function(){function e(e,t,i){var n=this;this.Dcb=!1,this.Fcb=function(e){var t,i,r=null!=(t=e.total)?t:-1,o=null!=(i=e.loaded)?i:-1,a=s.TimingUtil.getHiResTimestamp();n.Bcb.totalBytes=r,n.Bcb.loadedBytes=o,n.Ccb.progressTimestamp=a,o<r&&n.Ecb()},this.Gcb=function(e){var t=(0,r.toSeconds)(e.timeStamp);if(n.wcb.readyState===n.wcb.OPENED)n.Ccb.openedTimestamp=t,n.Ecb();else if(n.wcb.readyState===n.wcb.HEADERS_RECEIVED)n.Ccb.headersReceivedTimestamp=t,n.Ecb();else if(n.wcb.readyState===n.wcb.DONE){var i=n.wcb.status>=200&&n.wcb.status<300;n.Ccb.doneTimestamp=t,i&&null!==n.wcb.response?n.xcb(c.XhrHelper.toHttpResponse(n.wcb,n.ucb,n.Ccb)):n.Dcb||n.Hcb(a.RequestError.Failed),n.dispose()}},this.tcb=e,this.ucb=t,this.timeout=i,this.zcb={},this.Acb=!1,this.Ccb={sendTimestamp:-1,openedTimestamp:-1,headersReceivedTimestamp:-1,progressTimestamp:-1,doneTimestamp:-1},this.Bcb={totalBytes:-1,loadedBytes:-1,url:t.url,responseTiming:this.Ccb}}return e.prototype.on=function(e,t){this.zcb=this.zcb||{},this.zcb[e]=this.zcb[e]||[],this.zcb[e].push(t)},e.prototype.Ecb=function(){var e,t=this;(null!=(e=this.zcb[u.XhrEvent.Progress])?e:[]).forEach(function(e){return e(n({},t.Bcb))})},e.prototype.send=function(){var e=this;return this.wcb=new XMLHttpRequest,this.Acb=!1,this.Dcb=!1,new Promise(function(t,i){e.xcb=t,e.ycb=i;try{e.wcb.addEventListener(u.XhrEvent.Progress,e.Fcb),e.wcb.addEventListener(u.XhrEvent.ReadyStateChange,e.Gcb)}catch(i){return e.tcb.debug("ContentLoader: could not add event listeners",i),t(e.send())}e.Ccb.sendTimestamp=s.TimingUtil.getHiResTimestamp(),e.wcb.open(e.ucb.method,e.ucb.url),e.wcb.withCredentials="include"===e.ucb.credentials,e.Ecb(),c.XhrHelper.setHeaders(e.wcb,e.ucb.headers),e.ucb.responseType&&(e.wcb.responseType=e.ucb.responseType),e.timeout>0&&(e.vcb=window.setTimeout(function(){return e.abort(a.RequestError.TimedOut)},e.timeout)),e.ucb.body?e.wcb.send(e.ucb.body):e.wcb.send()})},e.prototype.dispose=function(){this.Acb||((0,o.clearTimeoutIfDefined)(this.vcb),this.wcb.removeEventListener(u.XhrEvent.Progress,this.Fcb),this.wcb.removeEventListener(u.XhrEvent.ReadyStateChange,this.Gcb),this.zcb=null,this.wcb=null,this.xcb=null,this.ycb=null,this.Acb=!0)},e.prototype.Hcb=function(e,t){void 0===t&&(t=!1),this.Acb||(this.ycb({error:e,response:c.XhrHelper.toHttpResponse(this.wcb,this.ucb,this.Ccb)}),t&&this.wcb.abort())},e.prototype.abort=function(e){void 0===e&&(e=a.RequestError.Canceled),this.Acb||this.Dcb||(this.Dcb=!0,this.Hcb(e,!0),this.dispose())},e}()},91523:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getRequestTimeout=function(e,t){var i,r,o,a,s=null!=(i=e.config.network)?i:{};return(0,n.toMilliSeconds)(null!=(a=null!=(o=null==(r=s.requestTimeout)?void 0:r[t])?o:s.defaultRequestTimeout)?a:e.settings.XHR_TIMEOUT)};var n=i(89927)},25811:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DRMSchemeIDURIs=void 0,t.keySystemNameToSchemeUri=function(e){return Object.keys(t.DRMSchemeIDURIs).find(function(i){return t.DRMSchemeIDURIs[i]===e})},t.DRMSchemeIDURIs={"urn:mpeg:dash:mp4protection:2011":"cenc","urn:mpeg:dash:13818:1:CA_descriptor:2011":"cenc4ts","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"widevine","urn:uuid:5e629af5-38da-4063-8977-97ffbd9902d4":"marlin_v1","urn:uuid:adb41c24-2dbf-4a6d-958b-4457c0d27b95":"tvkey","urn:uuid:a68129d3-575b-4f1a-9cba-3223846cf7c3":"nds_videoguard","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"playready","urn:uuid:9a27dd82-fde2-4725-8cbc-4234aa06ec09":"verimatrix_vcas","urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb":"primetime","urn:uuid:1f83e1e8-6ee9-4f0d-ba2f-5ec4e3ed1a66":"securemedia","urn:uuid:644fe7b5-260f-4fad-949a-0762ffb054b4":"cmla_oma","urn:uuid:6a99532d-869f-5922-9a91-113ab7b1e2f3":"mobitv","urn:uuid:35bf197b-530e-42d7-8b65-1b4bf415070f":"divx_drm5","urn:uuid:b4413586-c58c-ffb0-94a5-d4896c1af6c3":"viaccess-orca","urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"common_system-id"}},51682:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ISOBMFFConstants=void 0,t.ISOBMFFConstants={BOX_HEADER_LENGTH_REGULAR:8,BOX_HEADER_LENGTH_LARGE:16,BOX_SIZE_LENGTH:4,BOX_TYPE_LENGTH:4,FULL_BOX_VERSION_LENGTH:1,FULL_BOX_FLAGS_LENGTH:3,PSSH_KID_COUNT_LENGTH:4,PSSH_KID_LEN:16,PSSH_SYSTEM_ID_LENGTH:16,PSSH_DATA_SIZE:4}},33468:function(e,t){"use strict";var i,n;Object.defineProperty(t,"__esModule",{value:!0}),t.KeySystemMap=t.KeySystemKind=void 0,t.keySystemUidToKind=function(e){return Object.keys(t.KeySystemMap).find(function(i){return t.KeySystemMap[i].includes(e)})},t.getRelevantKeySystemMap=function(e){var i,r=((i={})[n.FAIRPLAY]=[],i[n.PLAYREADY]=[],i[n.PRIMETIME]=[],i[n.WIDEVINE]=[],i[n.TVKEY]=[],i);return Object.keys(n).forEach(function(i){var o=n[i];e[o]&&(r[o]=t.KeySystemMap[o])}),r},function(e){e.FAIRPLAY="fairplay",e.PLAYREADY="playready",e.PRIMETIME="primetime",e.WIDEVINE="widevine",e.TVKEY="tvkey"}(n||(t.KeySystemKind=n={})),(i={})[n.FAIRPLAY]=["com.apple.fairplay","com.apple.fps.1_0","com.apple.fps.2_0","com.apple.fps.3_0"],i[n.PLAYREADY]=["com.youtube.playready","com.microsoft.playready","com.microsoft.playready.recommendation","com.microsoft.playready.recommendation.3000"],i[n.PRIMETIME]=["com.adobe.primetime","com.adobe.access"],i[n.WIDEVINE]=["com.widevine.alpha","com.widevine.alpha.experiment"],i[n.TVKEY]=["com.tvkey.drm"],t.KeySystemMap=i},35267:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createAction=function(e,t){return{type:e,meta:{},payload:t}}},48774:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.devToolsExtension=void 0,t.devToolsExtension=i(4081).default.__REDUX_DEVTOOLS_EXTENSION__},39541:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ReducerTree=void 0,t.isReducer=o,t.isReducerTree=function(e){return!!e&&e instanceof r};var n=i(91829),r=function(){function e(){this.d7={}}return e.prototype.has=function(e){return!!this.d7[e]},e.prototype.set=function(e,t){return this.d7[e]=t,this},e.prototype.get=function(e){return this.d7[e]},e.prototype.delete=function(e){delete this.d7[e]},e.prototype.keys=function(){return Object.keys(this.d7)},e.prototype.e7=function(e){var t=this,i={};return this.keys().forEach(function(n){var r=t.get(n),a=e.concat(String(n));i[n]=o(r)?r:r.e7(a)}),0===Object.keys(i).length?function(e){return{}}:(0,n.combineReducers)(i)},e.prototype.buildReducer=function(){return this.e7([])},e}();function o(e){return!!e&&"function"==typeof e}t.ReducerTree=r},61674:function(e,t){"use strict";var i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.addStoreServiceDecoration=void 0,t.addStoreServiceDecoration=function(e){return function(t){return function(){var n=function(){return e.buildReducer()},r=t(n()),o=function(){return r.replaceReducer(n())};return o(),i(i({},r),{addReducer:function(t,i){e.set(t,i),o()},getReducer:function(t){return e.get(t)},removeReducer:function(t){e.delete(t),o()},hasReducer:function(t){return e.has(t)}})}}}},21513:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=d,t.getCapabilities=function(){return function(e){return e.capabilities}(d().getState())},t.getReachableDomains=function(){return function(e){return e.reachableDomains}(d().getState())};var n,r=i(91829),o=i(14638),a=(i(48774),i(81683),i(60430)),s=i(39541),u=i(61674),c=new s.ReducerTree;c.set("capabilities",o.CapabilityReducer).set("reachableDomains",a.ReachableDomainsReducer);var l=function(){var e=[(0,u.addStoreServiceDecoration)(c)];return(0,r.createStore)(function(){return{}},r.compose.apply(void 0,e))};function d(){return n||(n=l()),n}},61089:function(e,t,i){"use strict";var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.StoreService=void 0;var r=i(39541),o=i(93204);t.StoreService=function(){function e(e,t,i){var n=this;this.parentStore=e,this.levelIdentifier=t,this.identifierValue=i,this.sX=[],this.uX=function(e){return e[n.levelIdentifier][n.identifierValue]},this.rX=new r.ReducerTree,this.GY(this.rX)}return e.prototype.dispatch=function(e){var t;return null==(t=this.parentStore)?void 0:t.dispatch(this.tX(e))},e.prototype.tX=function(e){var t;return n(n({},e),{meta:n(n({},e.meta),((t={})[this.levelIdentifier]=this.identifierValue,t))})},e.prototype.vX=function(){return this.parentStore.hasReducer(this.levelIdentifier)||this.parentStore.addReducer(this.levelIdentifier,new r.ReducerTree),this.parentStore.getReducer(this.levelIdentifier)},e.prototype.GY=function(e){var t=this.vX();(0,r.isReducerTree)(t)&&t.set(this.identifierValue,e),this.parentStore.addReducer(this.levelIdentifier,t)},e.prototype.getState=function(){var e,t=null==(e=this.parentStore)?void 0:e.getState();if(t)return this.uX(t)},e.prototype.subscribe=function(e,t){var i=this,n=(0,o.subscribe)(this.parentStore)(this.uX,e,t);return this.sX.push(n),function(){i.sX=i.sX.filter(function(e){return e!==n}),n()}},e.prototype.HY=function(e){var t=this;return function(i,n){return n.meta&&n.meta[t.levelIdentifier]&&n.meta[t.levelIdentifier]!==t.identifierValue?i:e(i,n)}},e.prototype.addReducer=function(e,t){this.rX.set(e,(0,r.isReducer)(t)?this.HY(t):t),this.GY(this.rX)},e.prototype.addReducers=function(e){for(var t=0,i=Object.entries(e);t<i.length;t++){var n=i[t],o=n[0],a=n[1];void 0!==a&&this.rX.set(o,(0,r.isReducer)(a)?this.HY(a):a)}this.GY(this.rX)},e.prototype.getReducer=function(e){return this.rX.get(e)},e.prototype.removeReducer=function(e){this.rX.delete(e),this.GY(this.rX)},e.prototype.hasReducer=function(e){return this.rX.has(e)},e.prototype.dispose=function(){var e=this.vX();this.sX.forEach(function(e){return e()}),e&&(0,r.isReducerTree)(e)&&e.delete(this.identifierValue),this.parentStore.addReducer(this.levelIdentifier,e),this.sX=[],this.rX=null,this.parentStore=null},e}()},93204:function(e,t){"use strict";function i(e){return function(t,i,n){void 0===n&&(n=function(){return!0});var r=t(e.getState());return e.subscribe(function(){var o=t(e.getState()),a=r;r=o,null!=o&&o!==a&&n(o,a)&&i(o,a)})}}function n(e){return function(t,n,r){void 0===r&&(r=function(){return!0});var o=i(e)(t,function(e){o(),n(e)},r);return o}}Object.defineProperty(t,"__esModule",{value:!0}),t.subscribe=i,t.waitForStateChange=n,t.waitForStateChangeThen=function(e){return function(t,i){return void 0===i&&(i=function(){return!0}),new Promise(function(r){n(e)(t,function(e){r(e)},i)})}}},91565:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.initializeCapabilities=function(){return(0,o.createAction)(s,c())},t.setCapabilityKey=function(e,t){return(0,o.createAction)(u,{key:e,value:t})};var n=i(47993),r=i(15487),o=i(35267),a=i(7387),s=a.CapabilityActionType.InitCapabilities,u=a.CapabilityActionType.SetCapability,c=function(){var e;return{isPlayStation5:r.isPlayStation5(),isPlayStation4:r.isPlayStation4(),isMobile:r.isMobile(),isTizen:r.isTizen(),isSafari:r.isSafari(),isIOS:r.isIOS(),isSafariIOS:r.isSafariIOS(),isEdge:r.isEdge(),isLegacyEdge:r.isLegacyEdge(),isEdgeChromium:r.isEdgeChromium(),isChrome:r.isChrome(),isChromium:r.isChromium(),isFirefox:r.isFirefox(),isFirefoxIOS:r.isFirefoxIOS(),isWebOS:r.isWebOS(),isVidaa:r.isVidaa(),isVizio:r.isVizio(),isReactNative:r.isReactNative(),isWpeWebKit:r.isWpeWebKit(),MSESafari:n.MSESafari(),isLocalStorageAvailable:n.isLocalStorageAvailable(),isInlinePlaybackRestricted:n.isInlinePlaybackRestricted(),edgeVersion:r.getEdgeVersion(),IOSVersion:r.getIOSVersion(),safariVersion:r.getSafariVersion(),webOSChromiumVersion:null!=(e=r.getWebOsChromiumVersion().major)?e:0,techSupportedByModules:n.getTechSupportedByModules(),techSupportedByPlatform:n.getTechSupportedByPlatform(),techSupportedByModulesOnPlatform:n.getTechSupportedByModulesOnPlatform()}}},14638:function(e,t,i){"use strict";var n,r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.CapabilityReducer=void 0;var o=i(3793),a=i(7387);t.CapabilityReducer=(0,o.default)({},((n={})[a.CapabilityActionType.InitCapabilities]=function(e,t){return t.payload},n[a.CapabilityActionType.SetCapability]=function(e,t){return function(e,t){var i,n=t.key,o=t.value;return r(r({},e),((i={})[n]=o,i))}(e,t.payload)},n))},7387:function(e,t){"use strict";var i,n;Object.defineProperty(t,"__esModule",{value:!0}),t.CapabilityKey=t.CapabilityActionType=void 0,function(e){e.InitCapabilities="initcapabilities",e.SetCapability="setcapability"}(i||(t.CapabilityActionType=i={})),function(e){e.isPlayStation5="isPlayStation5",e.isPlayStation4="isPlayStation4",e.isMobile="isMobile",e.isTizen="isTizen",e.isSafari="isSafari",e.isChrome="isChrome",e.isChromium="isChromium",e.isFirefox="isFirefox",e.isFirefoxIOS="isFirefoxIOS",e.isWebOS="isWebOS",e.isVidaa="isVidaa",e.isVizio="isVizio",e.isIOS="isIOS",e.isSafariIOS="isSafariIOS",e.isEdge="isEdge",e.isLegacyEdge="isLegacyEdge",e.isEdgeChromium="isEdgeChromium",e.isReactNative="isReactNative",e.isWpeWebKit="isWpeWebKit",e.MSESafari="MSESafari",e.isLocalStorageAvailable="isLocalStorageAvailable",e.isInlinePlaybackRestricted="isInlinePlaybackRestricted",e.IOSVersion="IOSVersion",e.edgeVersion="edgeVersion",e.safariVersion="safariVersion",e.webOSChromiumVersion="webOSChromiumVersion",e.techSupportedByModules="techSupportedByModules",e.techSupportedByPlatform="techSupportedByPlatform",e.techSupportedByModulesOnPlatform="techSupportedByModulesOnPlatform"}(n||(t.CapabilityKey=n={}))},3793:function(e,t){"use strict";var i;Object.defineProperty(t,"__esModule",{value:!0}),t.StaticActionTypes=void 0,function(e){e.Default="default"}(i||(t.StaticActionTypes=i={})),t.default=function(e,t){return function(n,r){return void 0===n&&(n=e),t[r.type]?t[r.type](n,r):t[i.Default]?t[i.Default](n,r):n}}},77753:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isInstanceState=function(e){return(0,n.isObject)(e)&&["player","metrics"].every(function(t){return t in e})};var n=i(94685)},98714:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setPreferredBitrateForMimeTypeAction=function(e,t){return(0,n.createAction)(r.AdaptationActionType.SetPreferredBitrateForMimeType,{mimeType:e,preferredBitrate:t})},t.clearPreferredBitrateForMimeTypeAction=function(e){return(0,n.createAction)(r.AdaptationActionType.ClearPreferredBitrateForMimeType,{mimeType:e})};var n=i(35267),r=i(56960)},87133:function(e,t,i){"use strict";var n,r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.AdaptationReducer=void 0;var o=i(3793),a=i(56960);t.AdaptationReducer=(0,o.default)({},((n={})[a.AdaptationActionType.SetPreferredBitrateForMimeType]=function(e,t){var i=t.payload;return function(e,t,i){var n;return r(r({},e),((n={})[t]=r(r({},e[t]),{preferredBitrate:i}),n))}(e,i.mimeType,i.preferredBitrate)},n[a.AdaptationActionType.ClearPreferredBitrateForMimeType]=function(e,t){return function(e,t){var i;return r(r({},e),((i={})[t]=r(r({},e[t]),{preferredBitrate:void 0}),i))}(e,t.payload.mimeType)},n))},49859:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getAdaptationState=function(e){return e.adaptation},t.getPreferredBitrate=function(e,t){return e[t]?e[t].preferredBitrate:void 0}},56960:function(e,t){"use strict";var i;Object.defineProperty(t,"__esModule",{value:!0}),t.AdaptationActionType=void 0,function(e){e.SetPreferredBitrateForMimeType="setpreferredbitrateformimetype",e.ClearPreferredBitrateForMimeType="clearpreferredbitrateformimetype"}(i||(t.AdaptationActionType=i={}))},91678:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.initializeMetricsForMimeType=function(e,t,i){return void 0===i&&(i=e),(0,n.createAction)(r.MetricsActionType.InitializeMetricsForMimeType,{mimeType:e,settings:t,saveUnderName:i})},t.removeMetricsForMimeType=function(e){return(0,n.createAction)(r.MetricsActionType.RemoveMetricsForMimeType,{mimeType:e})},t.addMetricsValue=function(e,t,i){return(0,n.createAction)(r.MetricsActionType.AddMetricsValue,{mimeType:e,metricType:t,value:i})},t.removeMetricsValue=function(e,t,i){return(0,n.createAction)(r.MetricsActionType.RemoveMetricsValue,{mimeType:e,metricType:t,value:i})},t.clearMetricsHistory=function(e,t){return(0,n.createAction)(r.MetricsActionType.ClearMetricsHistory,{mimeType:e,metricType:t})},t.setBufferLogicActivationThreshold=function(e,t){return(0,n.createAction)(r.MetricsActionType.SetBufferLogicActivationThreshold,{mimeType:e,threshold:t})};var n=i(35267),r=i(33436)},27359:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.containMimeTypeGuard=function(e){return function(t,i){return t[i.mimeType]?e(t,i):t}}},6873:function(e,t,i){"use strict";var n,r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},o=this&&this.__spreadArray||function(e,t,i){if(i||2==arguments.length)for(var n,r=0,o=t.length;r<o;r++)!n&&r in t||(n||(n=Array.prototype.slice.call(t,0,r)),n[r]=t[r]);return e.concat(n||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.MetricsReducer=void 0;var a=i(3793),s=i(27359),u=i(33436);function c(e,t){var i,n=t.mimeType,o=t.threshold;return r(r({},e),((i={})[n]=r(r({},e[n]),{bufferLogicActivationThreshold:o}),i))}function l(e,t){var i,n,a=t.mimeType,s=t.metricType,u=t.value,c=e[a].settings.metricHistorySize,l=e[a].data[s]||[],d=c>0&&l.length>=c;return r(r({},e),((i={})[a]=r(r({},e[a]),{data:r(r({},e[a].data),((n={})[s]=o(o([],d?l.slice(1,l.length):l,!0),[{time:Date.now(),value:u}],!1),n))}),i))}function d(e,t){var i,n,o=t.mimeType,a=t.metricType;return r(r({},e),((i={})[o]=r(r({},e[o]),{data:r(r({},e[o].data),((n={})[a]=[],n))}),i))}function h(e,t){var i,n,o=t.mimeType,a=t.metricType,s=t.value,u=(e[o].data[a]||[]).filter(function(e){return e.time!==s.time||e.value!==s.value});return r(r({},e),((i={})[o]=r(r({},e[o]),{data:r(r({},e[o].data),((n={})[a]=u,n))}),i))}t.MetricsReducer=(0,a.default)({},((n={})[u.MetricsActionType.InitializeMetricsForMimeType]=function(e,t){return function(e,t){var i,n=t.mimeType,o=t.settings,a=t.saveUnderName;return r(r({},e),((i={})[a]={mimeType:n,settings:{metricHistorySize:o.METRIC_HISTORY_SIZE},bufferLogicActivationThreshold:o.BUFFER_LOGIC_ACTIVATION_THRESHOLD,data:{}},i))}(e,t.payload)},n[u.MetricsActionType.RemoveMetricsForMimeType]=function(e,t){return function(e,t){var i=r({},e);return delete i[t.mimeType],i}(e,t.payload)},n[u.MetricsActionType.SetBufferLogicActivationThreshold]=function(e,t){var i=t.payload;return(0,s.containMimeTypeGuard)(c)(e,i)},n[u.MetricsActionType.AddMetricsValue]=function(e,t){var i=t.payload;return(0,s.containMimeTypeGuard)(l)(e,i)},n[u.MetricsActionType.ClearMetricsHistory]=function(e,t){var i=t.payload;return(0,s.containMimeTypeGuard)(d)(e,i)},n[u.MetricsActionType.RemoveMetricsValue]=function(e,t){var i=t.payload;return(0,s.containMimeTypeGuard)(h)(e,i)},n))},46151:function(e,t){"use strict";function i(e,t,i){return e[t]&&e[t].data[i]||[]}Object.defineProperty(t,"__esModule",{value:!0}),t.getMetricsHistoryFromInstanceState=t.getMetricsState=void 0,t.getMetricsHistory=i,t.getMetricsLastEntry=function(e,t,n){var r=i(e,t,n);return 0===r.length?{time:void 0,value:void 0}:r[r.length-1]},t.getMetricsState=function(e){return e.metrics},t.getMetricsHistoryFromInstanceState=function(e,n,r){return i((0,t.getMetricsState)(e),n,r)}},33436:function(e,t){"use strict";var i,n;Object.defineProperty(t,"__esModule",{value:!0}),t.MetricsActionType=t.MetricType=void 0,function(e){e.DownloadTime="downloadtime",e.DecryptionTime="decryptiontime",e.TransmuxingTime="transmuxingtime",e.ProcessingTime="processingtime",e.DownloadSuccess="downloadsuccess",e.RequestedRepresentations="requestedrepresentations",e.DownloadedRepresentation="downloadedrepresentation",e.DownloadedAdaptationSet="downloadedadaptationset",e.DownloadInformation="downloadinformation",e.SegmentInformation="segmentinformation",e.ChunkedDownloadInformation="chunkeddownloadinformation",e.StalledSeconds="stalledseconds",e.StartTime="starttime",e.StartupTimeSeconds="startuptime",e.CachedInitSegments="cachedinitsegments"}(i||(t.MetricType=i={})),function(e){e.InitializeMetricsForMimeType="@instance/metrics/initializemetricsformimetype",e.RemoveMetricsForMimeType="@instance/metrics/removemetricsformimetype",e.AddMetricsValue="@instance/metrics/addmetricsvalue",e.RemoveMetricsValue="@instance/metrics/removemetricsvalue",e.ClearMetricsHistory="@instance/metrics/clearMetricsHistory",e.SetBufferLogicActivationThreshold="@instance/metrics/setbufferlogicactivationthreshold"}(n||(t.MetricsActionType=n={}))},23690:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getInitialPlayerState=void 0,t.setPlayerViewMode=function(e){return(0,r.createAction)(o.PlayerActionType.SetPlayerViewMode,e)},t.setPlayerHasBeenPlaying=function(e){return(0,r.createAction)(o.PlayerActionType.SetPlayerHasBeenPlaying,e)},t.setPlayerSeek=function(e){return(0,r.createAction)(o.PlayerActionType.SetPlayerSeek,e)},t.setPlayerPlayback=function(e){return(0,r.createAction)(o.PlayerActionType.SetPlayerPlayback,e)},t.setPlayerTimeShift=function(e){return(0,r.createAction)(o.PlayerActionType.SetPlayerTimeshift,e)},t.setPlayerStall=function(e){return(0,r.createAction)(o.PlayerActionType.SetPlayerStall,e)},t.setRendererStallAction=function(e){return(0,r.createAction)(o.PlayerActionType.SetRendererStall,e)},t.setPlayerTargetPlaybackTime=function(e){return(0,r.createAction)(o.PlayerActionType.SetPlayerTargetPlaybackTime,e)},t.setPlayerPlaybackSpeed=function(e){return(0,r.createAction)(o.PlayerActionType.SetPlayerPlaybackSpeed,e)},t.setDestroyState=function(e){return(0,r.createAction)(o.PlayerActionType.SetDestroyState,e)},t.addPlayerPendingTransition=function(e){return(0,r.createAction)(o.PlayerActionType.AddPlayerPendingTransition,e)},t.filterPlayerPendingTransition=function(e){return(0,r.createAction)(o.PlayerActionType.FilterPlayerPendingTransition,e)},t.removePlayerPendingTransition=function(e){return(0,r.createAction)(o.PlayerActionType.RemovePlayerPendingTransition,e)},t.clearPlayerPendingTransitions=function(){return(0,r.createAction)(o.PlayerActionType.ClearPlayerPendingTransitions)},t.setRemoteControlType=function(e){return(0,r.createAction)(o.PlayerActionType.SetRemoteControlType,e)},t.setConnectionState=function(e){return(0,r.createAction)(o.PlayerActionType.SetConnectionState,e)},t.resetPlayerState=function(e){return void 0===e&&(e=[]),(0,r.createAction)(o.PlayerActionType.ResetPlayerState,{keepState:e})},t.updateSeekingProcess=function(e){return(0,r.createAction)(o.PlayerActionType.UpdateSeekingProcess,e)};var n=i(44468),r=i(35267),o=i(85648);t.getInitialPlayerState=function(){return{playbackState:o.PlaybackState.None,seekState:o.SeekState.None,timeShiftState:o.TimeShiftState.None,hasBeenPlaying:!1,isStalled:!1,isRendererStalled:!1,targetPlaybackTime:-1,playbackSpeed:{speed:1,multiplier:1},pendingTransitions:[],viewMode:n.ViewMode.Inline,destroyState:o.DestroyState.None,remoteControlState:{connectionState:o.ConnectionState.Disconnected,remoteControlType:o.RemoteControlType.None},seekingProcess:{targetTime:-1,seekableRange:{start:-1,end:-1},isInitial:!1,issuer:""}}}},8973:function(e,t,i){"use strict";var n,r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},o=this&&this.__spreadArray||function(e,t,i){if(i||2==arguments.length)for(var n,r=0,o=t.length;r<o;r++)!n&&r in t||(n||(n=Array.prototype.slice.call(t,0,r)),n[r]=t[r]);return e.concat(n||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.PlayerReducer=void 0;var a=i(3793),s=i(23690),u=i(85648),c=(0,s.getInitialPlayerState)();t.PlayerReducer=(0,a.default)(c,((n={})[u.PlayerActionType.SetPlayerPlayback]=function(e,t){var i=t.payload;return r(r({},e),{playbackState:i})},n[u.PlayerActionType.SetPlayerSeek]=function(e,t){var i=t.payload;return r(r({},e),{seekState:i})},n[u.PlayerActionType.SetPlayerStall]=function(e,t){var i=t.payload;return r(r({},e),{isStalled:i})},n[u.PlayerActionType.SetRendererStall]=function(e,t){return r(r({},e),{isRendererStalled:t.payload})},n[u.PlayerActionType.SetPlayerTimeshift]=function(e,t){var i=t.payload;return r(r({},e),{timeShiftState:i})},n[u.PlayerActionType.SetPlayerHasBeenPlaying]=function(e,t){var i=t.payload;return r(r({},e),{hasBeenPlaying:i})},n[u.PlayerActionType.SetPlayerTargetPlaybackTime]=function(e,t){var i=t.payload;return r(r({},e),{targetPlaybackTime:i})},n[u.PlayerActionType.SetPlayerPlaybackSpeed]=function(e,t){var i=t.payload;return r(r({},e),{playbackSpeed:i})},n[u.PlayerActionType.SetPlayerViewMode]=function(e,t){var i=t.payload;return r(r({},e),{viewMode:i})},n[u.PlayerActionType.AddPlayerPendingTransition]=function(e,t){var i=t.payload;return r(r({},e),{pendingTransitions:o(o([],e.pendingTransitions,!0),[i],!1)})},n[u.PlayerActionType.FilterPlayerPendingTransition]=function(e,t){var i=t.payload;return r(r({},e),{pendingTransitions:e.pendingTransitions.filter(function(e){return e!==i})})},n[u.PlayerActionType.RemovePlayerPendingTransition]=function(e,t){var i=t.payload;return r(r({},e),{pendingTransitions:e.pendingTransitions.filter(function(e,t){return t!==i})})},n[u.PlayerActionType.ClearPlayerPendingTransitions]=function(e,t){return r(r({},e),{pendingTransitions:[]})},n[u.PlayerActionType.ResetPlayerState]=function(e,t){var i=t.payload.keepState,n={};return i.forEach(function(t){return n[t]=e[t]}),r(r({},c),n)},n[u.PlayerActionType.SetDestroyState]=function(e,t){var i=t.payload;return r(r({},e),{destroyState:i})},n[u.PlayerActionType.SetRemoteControlType]=function(e,t){var i=t.payload;return r(r({},e),{remoteControlState:r(r({},e.remoteControlState),{remoteControlType:i})})},n[u.PlayerActionType.SetConnectionState]=function(e,t){var i=t.payload;return r(r({},e),{remoteControlState:r(r({},e.remoteControlState),{connectionState:i})})},n[u.PlayerActionType.UpdateSeekingProcess]=function(e,t){var i=t.payload;return r(r({},e),{seekingProcess:r(r({},e.seekingProcess),i)})},n))},87827:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.subscribeToSeekedOrTimeshifted=t.subscribeToSeeked=t.subscribeToSeek=t.getRemoteControlState=t.getIsRendererStalled=t.isDestroyed=t.isBeingDestroyed=t.getIsSeekedOrTimeshifted=t.getIsSeekingOrTimeshifting=t.getPlaybackSpeed=t.getTargetPlaybackTime=t.getIsTimeShifted=t.getIsTimeShifting=t.getIsSeeked=t.getIsSeeking=t.getIsInitialSeek=t.getIsInitialStall=t.getIsStopped=t.getIsPaused=t.getIsPlay=t.getIsPlaying=t.getIsInitialPlayback=t.getPlayerState=void 0;var n=i(23068),r=i(93204),o=i(85648);t.getPlayerState=function(e){return e.player},t.getIsInitialPlayback=function(e){return e.playbackState===o.PlaybackState.None},t.getIsPlaying=function(e){return e.playbackState===o.PlaybackState.Playing},t.getIsPlay=function(e){return e.playbackState===o.PlaybackState.Play},t.getIsPaused=function(e){return e.playbackState===o.PlaybackState.Paused},t.getIsStopped=function(e){return e.playbackState===o.PlaybackState.Stopped},t.getIsInitialStall=function(e){return!e.hasBeenPlaying&&e.isStalled},t.getIsInitialSeek=function(e){return e.seekState===o.SeekState.None},t.getIsSeeking=function(e){return[o.SeekState.Seeking,o.SeekState.SeekingIOS].includes(e.seekState)},t.getIsSeeked=function(e){return e.seekState===o.SeekState.Seeked},t.getIsTimeShifting=function(e){return e.timeShiftState===o.TimeShiftState.Shifting},t.getIsTimeShifted=function(e){return e.timeShiftState===o.TimeShiftState.Shifted},t.getTargetPlaybackTime=function(e){return e.targetPlaybackTime},t.getPlaybackSpeed=function(e){return e.playbackSpeed},t.getIsSeekingOrTimeshifting=function(e){return(0,t.getIsSeeking)(e)||(0,t.getIsTimeShifting)(e)},t.getIsSeekedOrTimeshifted=function(e){return(0,t.getIsSeeked)(e)||(0,t.getIsTimeShifted)(e)},t.isBeingDestroyed=function(e){return e.destroyState!==o.DestroyState.None},t.isDestroyed=function(e){return e.destroyState===o.DestroyState.Destroyed},t.getIsRendererStalled=function(e){return e.isRendererStalled},t.getRemoteControlState=function(e){return e.remoteControlState},t.subscribeToSeek=function(e,i){return(0,r.subscribe)(e)(function(e){return e&&(0,t.getPlayerState)(e)},i,function(e,i){return(0,n.isDefined)(i)&&(0,n.isDefined)(e)&&!(0,t.getIsSeeking)(i)&&(0,t.getIsSeeking)(e)})},t.subscribeToSeeked=function(e,i){return(0,r.subscribe)(e)(function(e){return e&&(0,t.getPlayerState)(e)},i,function(e,i){return(0,n.isDefined)(i)&&(0,n.isDefined)(e)&&(0,t.getIsSeeking)(i)&&!(0,t.getIsSeeking)(e)})},t.subscribeToSeekedOrTimeshifted=function(e,i){return(0,r.subscribe)(e)(function(e){return e&&(0,t.getPlayerState)(e)&&(0,t.getIsSeekingOrTimeshifting)((0,t.getPlayerState)(e))},i,function(e,t){return!0===t&&!1===e})}},85648:function(e,t){"use strict";var i,n,r,o,a,s,u;Object.defineProperty(t,"__esModule",{value:!0}),t.PlayerActionType=t.DestroyState=t.TimeShiftState=t.SeekState=t.PlaybackState=t.ConnectionState=t.RemoteControlType=void 0,function(e){e[e.None=0]="None",e[e.Websocket=1]="Websocket",e[e.GoogleCastV2=2]="GoogleCastV2",e[e.GoogleCastV3=3]="GoogleCastV3"}(i||(t.RemoteControlType=i={})),function(e){e[e.Connecting=0]="Connecting",e[e.Connected=1]="Connected",e[e.Disconnecting=2]="Disconnecting",e[e.Disconnected=3]="Disconnected"}(n||(t.ConnectionState=n={})),function(e){e[e.None=0]="None",e[e.Stopped=1]="Stopped",e[e.Play=2]="Play",e[e.Playing=3]="Playing",e[e.Paused=4]="Paused"}(r||(t.PlaybackState=r={})),function(e){e[e.None=0]="None",e[e.Seeking=1]="Seeking",e[e.SeekingIOS=2]="SeekingIOS",e[e.Seeked=3]="Seeked"}(o||(t.SeekState=o={})),function(e){e[e.None=0]="None",e[e.Shifting=1]="Shifting",e[e.Shifted=2]="Shifted"}(a||(t.TimeShiftState=a={})),function(e){e.None="none",e.Destroying="destroying",e.Destroyed="destroyed"}(s||(t.DestroyState=s={})),function(e){e.SetPlayerSeek="@instance/player/setplayerseek",e.SetPlayerPlayback="@instance/player/setplayerplayback",e.SetPlayerTimeshift="@instance/player/setplayertimeshift",e.SetPlayerStall="@instance/player/setplayerstall",e.SetRendererStall="@instance/player/setplayerrendererstall",e.SetPlayerHasBeenPlaying="@instance/player/setplayerhasbeenplaying",e.SetPlayerTargetPlaybackTime="@instance/player/setplayertargetplaybacktime",e.SetPlayerPlaybackSpeed="@instance/player/setplayerplaybackspeed",e.SetPlayerViewMode="@instance/player/setplayerviewmode",e.SetDestroyState="@instance/player/setDestroyState",e.AddPlayerPendingTransition="@instance/player/addplayerpendingtransition",e.FilterPlayerPendingTransition="@instance/player/filterplayerpendingtransition",e.RemovePlayerPendingTransition="@instance/player/removeplayerpendingtransition",e.ClearPlayerPendingTransitions="@instance/player/clearplayerpendingtransitions",e.ResetPlayerState="@instance/player/resetplayerstate",e.SetRemoteControlType="@instance/player/setremotecontroltype",e.SetConnectionState="@instance/player/setconnectionstate",e.UpdateSeekingProcess="@instance/player/updateseekingprocess"}(u||(t.PlayerActionType=u={}))},48488:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getInitialDrmState=void 0,t.setManifestDrm=function(e){return(0,n.createAction)(r.DrmActionType.SetManifestDrm,e)},t.resetManifestDrm=function(){return(0,n.createAction)(r.DrmActionType.ResetManifestDrm)},t.trackDrmKidError=function(e){return(0,n.createAction)(r.DrmActionType.TrackDrmKidError,e)},t.resetDrmKidErrors=function(){return(0,n.createAction)(r.DrmActionType.ResetDrmKidErrors)},t.setUsedKeySystem=function(e){return(0,n.createAction)(r.DrmActionType.SetUsedKeySystem,e)},t.resetUsedKeySystem=function(){return(0,n.createAction)(r.DrmActionType.ResetUsedKeySystem)};var n=i(35267),r=i(29682);t.getInitialDrmState=function(){return{keyIdsWithErrors:[],usedKeySystem:{kind:null,uid:null}}}},44991:function(e,t,i){"use strict";var n,r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},o=this&&this.__spreadArray||function(e,t,i){if(i||2==arguments.length)for(var n,r=0,o=t.length;r<o;r++)!n&&r in t||(n||(n=Array.prototype.slice.call(t,0,r)),n[r]=t[r]);return e.concat(n||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.DrmReducer=void 0;var a=i(3793),s=i(48488),u=i(29682),c=(0,s.getInitialDrmState)();t.DrmReducer=(0,a.default)(c,((n={})[u.DrmActionType.SetManifestDrm]=function(e,t){var i=t.payload;return r(r({},e),i)},n[u.DrmActionType.ResetManifestDrm]=function(){return c},n[u.DrmActionType.TrackDrmKidError]=function(e,t){var i=t.payload;return e.keyIdsWithErrors.includes(i)?e:r(r({},e),{keyIdsWithErrors:o(o([],e.keyIdsWithErrors,!0),[i],!1)})},n[u.DrmActionType.ResetDrmKidErrors]=function(e){return e.keyIdsWithErrors.length>0?r(r({},e),{keyIdsWithErrors:[]}):e},n[u.DrmActionType.SetUsedKeySystem]=function(e,t){var i=t.payload;return r(r({},e),{usedKeySystem:i})},n[u.DrmActionType.ResetUsedKeySystem]=function(e,t){return r(r({},e),{usedKeySystem:{kind:null,uid:null}})},n))},29682:function(e,t){"use strict";var i;
1Object.defineProperty(t,"__esModule",{value:!0}),t.DrmActionType=void 0,function(e){e.SetManifestDrm="@instance/sources/@source/drm/setManifest",e.ResetManifestDrm="@instance/sources/@source/drm/setManifest/resetManifest",e.TrackDrmKidError="@instance/sources/@source/drm/trackDrmKidError",e.ResetDrmKidErrors="@instance/sources/@source/drm/resetDrmKidErrors",e.SetUsedKeySystem="@instance/sources/@source/drm/setusedkeysystem",e.ResetUsedKeySystem="@instance/sources/@source/drm/resetusedkeysystem"}(i||(t.DrmActionType=i={}))},69573:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.staticSourceReducers=void 0;var n=i(87133),r=i(44991),o=i(48557);t.staticSourceReducers={startOptions:i(77179).StartOptionsReducer,drm:r.DrmReducer,adaptation:n.AdaptationReducer,playback:o.PlaybackReducer}},15971:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getSourceStore=o,t.getSourceState=function(e){var t=o(e);return null==t?void 0:t.getState()};var n=i(80813),r=i(94685);function o(e){var t,i;return(0,r.isContextAvailable)(e)?null==(t=e.serviceManager)?void 0:t.get(n.ServiceName.SourceStoreService,null==(i=e.sourceContext)?void 0:i.sourceIdentifier):void 0}},68925:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setBufferMaxSize=function(e,t){return(0,n.createAction)(r.BufferActionType.SetBufferMaxSize,{mimeType:e,maxBufferSize:t})},t.setRendererRanges=function(e,t){return(0,n.createAction)(r.BufferActionType.SetRendererRanges,{mimeType:e,ranges:t})},t.setBufferBlockSwitchOngoing=function(e){return(0,n.createAction)(r.BufferActionType.SetBufferBlockSwitchOngoing,{isOngoing:e})},t.setTimestampRollingOver=function(e){return(0,n.createAction)(r.BufferActionType.SetTimestampRollingOver,{isRollingOver:e})},t.addLoadedRange=function(e,t){return(0,n.createAction)(r.BufferActionType.AddLoadedRange,{mimeType:e,range:t})},t.removeLoadedRange=function(e,t){return(0,n.createAction)(r.BufferActionType.RemoveLoadedRange,{mimeType:e,range:t})},t.resetLoadedRanges=function(e){return(0,n.createAction)(r.BufferActionType.ResetLoadedRanges,{mimeType:e})},t.setLoadingRangeFinished=function(e){return(0,n.createAction)(r.BufferActionType.SetLoadingRangeFinished,{isFinished:e})};var n=i(35267),r=i(70118)},86897:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getRendererBufferRangesMap=t.getBufferRangesMap=t.getBufferBlockLoadedRanges=t.getBufferMaxSize=t.hasBufferRangesChanged=t.hasBufferMaxSizeChanged=t.getRendererBufferedRanges=t.getBufferState=t.getBufferStateMap=t.DefaultBufferMaxSize=void 0,t.getLoadedRangesForMimeType=function(e,t){var i,n;return null!=(n=null==(i=e.bufferStateMap[t])?void 0:i.loadedRanges)?n:[]},t.getBufferStartTime=function(e){if(!e)return -1;var t=Object.keys(e).map(function(t){var i,n;return null==(n=null==(i=e[t].rendererRanges)?void 0:i[0])?void 0:n.start}).filter(function(e){return void 0!==e});return t.length>0?Math.max.apply(Math,t):-1},t.getIsTimestampRollingOver=function(e){var t,i;return null!=(i=null==(t=e.buffer)?void 0:t.isTimestampRollingOver)&&i};var n=i(4524),r=i(85434);function o(e){var t;return null!=(t=e.loadedRanges)?t:[]}function a(e,t){return e!==t&&(0!==e.length||0!==t.length)&&e!==t}t.DefaultBufferMaxSize=0,t.getBufferStateMap=function(e){var t;return null==(t=null==e?void 0:e.buffer)?void 0:t.bufferStateMap},t.getBufferState=function(e){return null==e?void 0:e.buffer},t.getRendererBufferedRanges=function(e,t){var i;return t in e&&null!=(i=e[t].rendererRanges)?i:[]},t.hasBufferMaxSizeChanged=function(e){return function(i,n){var r=(0,t.getBufferState)(i),o=(0,t.getBufferState)(n);return(r?(0,t.getBufferMaxSize)(r,e):t.DefaultBufferMaxSize)!==(o?(0,t.getBufferMaxSize)(o,e):t.DefaultBufferMaxSize)}},t.hasBufferRangesChanged=function(e,i){var n=e.bufferStateMap,r=i.bufferStateMap,s=Object.keys(n),u=Object.keys(r);if(s.length!==u.length||s.some(function(e){return!u.includes(e)}))return!0;for(var c=0,l=s;c<l.length;c++){var d=l[c];if(a((0,t.getRendererBufferedRanges)(n,d),(0,t.getRendererBufferedRanges)(r,d))||a(o(n[d]),o(r[d])))return!0}return!1},t.getBufferMaxSize=function(e,i){var n;return i in e.bufferStateMap&&null!=(n=e.bufferStateMap[i].maxBufferSize)?n:t.DefaultBufferMaxSize},t.getBufferBlockLoadedRanges=function(e,t){return e?Object.keys(e.bufferStateMap).reduce(function(i,n){return i[n]=function(e,t){return o(e).filter(function(e){return e.bufferBlockId===t})}(e.bufferStateMap[n],t),i},{}):{}},t.getBufferRangesMap=function(e,t,i){return void 0===t?{}:function(e,t,i){var r=Object.keys(e.bufferStateMap),o=t.getSegmentStoreRangesMap(e,r),a=s(e,r);
vendor: 14,725 bytes, line 1
1return Object.keys(a).forEach(function(e){return o[e].push(a[e])}),function(e,t,i){var r={};return e.forEach(function(e){return r[e]=n.BufferRangeHelper.mergeRanges(t[e].flatMap(function(e){return e}),i)}),r}(r,o,i)}(t,e,i)},t.getRendererBufferRangesMap=function(e,t){return function(i){var n=e.getBufferBlock(i),o=null==n?void 0:n.getAllKnownPeriodIds()[0];return void 0===o||void 0===t||void 0===n?{}:s(t,e.getMediaTypes(o).map(function(e){return e.mimeType}).filter(function(e){return r.MimeTypeHelper.isAV(e)}))}};var s=function(e,i){var n={};return i.forEach(function(i){return n[i]=(0,t.getRendererBufferedRanges)(e.bufferStateMap,i)}),n}},47602:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.subscribeToRendererBufferChanges=function(e,t){var i=(function(e){var t=e.getState(),i=(0,r.getBufferStateMap)(t);return void 0!==i?Object.keys(i):[]})(e).map(function(i){return(0,n.subscribe)(e)(function(e){return function(t){var i=(0,r.getBufferStateMap)(t);return i?(0,r.getRendererBufferedRanges)(i,e):[]}}(i),function(e){return t(i,null!=e?e:[])})});return function(){return i.forEach(function(e){return e()})}};var n=i(93204),r=i(86897)},70118:function(e,t){"use strict";var i;Object.defineProperty(t,"__esModule",{value:!0}),t.BufferActionType=void 0,function(e){e.SetBufferMaxSize="@instance/source/buffer/setbuffermaxsize",e.SetRendererRanges="@instance/source/buffer/setrendererranges",e.SetBufferBlockSwitchOngoing="@instance/source/buffer/setbufferblockswitchongoing",e.SetTimestampRollingOver="@instance/source/buffer/settimestamprollingover",e.AddLoadedRange="@instance/source/buffer/addloadedrange",e.RemoveLoadedRange="@instance/source/buffer/removeloadedrange",e.ResetLoadedRanges="@instance/source/buffer/resetloadedranges",e.SetLoadingRangeFinished="@instance/source/buffer/setloadingrangefinished"}(i||(t.BufferActionType=i={}))},46922:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setBackgroundPlaybackState=t.setMainContentPlaybackState=void 0;var n=i(35267),r=i(18192);t.setMainContentPlaybackState=function(e){return(0,n.createAction)(r.PlaybackActionType.SetMainContentPlaybackState,e)},t.setBackgroundPlaybackState=function(e){return(0,n.createAction)(r.PlaybackActionType.SetBackgroundPlaybackState,e)}},48557:function(e,t,i){"use strict";var n,r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.PlaybackReducer=void 0;var o=i(3793),a=i(18192);t.PlaybackReducer=(0,o.default)({kind:a.PlaybackKind.MainContent},((n={})[a.PlaybackActionType.SetMainContentPlaybackState]=function(e,t){return function(e,t){return r({},t)}(0,t.payload)},n[a.PlaybackActionType.SetBackgroundPlaybackState]=function(e,t){return function(e,t){return r(r({},e),t)}(e,t.payload)},n))},81524:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getPlaybackPosition=void 0;var n=i(18192);t.getPlaybackPosition=function(e){return e.kind===n.PlaybackKind.Background?e.position:NaN}},18192:function(e,t){"use strict";var i,n;Object.defineProperty(t,"__esModule",{value:!0}),t.PlaybackActionType=t.PlaybackKind=void 0,function(e){e.MainContent="maincontent",e.Background="background"}(i||(t.PlaybackKind=i={})),function(e){e.SetMainContentPlaybackState="@instance/sources/@source/playback/setmaincontentplaybackstate",e.SetBackgroundPlaybackState="@instance/sources/@source/playback/setbackgroundplaybackstate"}(n||(t.PlaybackActionType=n={}))},63879:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setMseObjectUrl=function(e){return(0,n.createAction)(r.RendererActionType.SetMseObjectUrl,{url:e})};var n=i(35267),r=i(39564)},39564:function(e,t){"use strict";var i;Object.defineProperty(t,"__esModule",{value:!0}),t.RendererActionType=void 0,function(e){e.SetMseObjectUrl="@instance/source/renderer/setmseobjecturl"}(i||(t.RendererActionType=i={}))},30012:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.initialStartOptions=void 0,t.initializeStartTimeOffset=function(){return o(t.initialStartOptions.startTimeOffset)},t.setStartTimeOffset=o;var n=i(35267),r=i(25934);function o(e){return(0,n.createAction)(r.StartOptionsActionKey.SetStartTimeOffset,{startTimeOffset:e})}t.initialStartOptions={startTimeOffset:0}},77179:function(e,t,i){"use strict";var n,r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.StartOptionsReducer=void 0,t.getStartTimeOffset=function(e){return e.startOptions.startTimeOffset};var o=i(3793),a=i(30012),s=i(25934),u=a.initialStartOptions,c=function(e,t){var i=t.payload;return r(r({},e),i)};t.StartOptionsReducer=(0,o.default)(u,((n={})[s.StartOptionsActionKey.InitStartTimeOffset]=c,n[s.StartOptionsActionKey.SetStartTimeOffset]=c,n))},25934:function(e,t){"use strict";var i;Object.defineProperty(t,"__esModule",{value:!0}),t.StartOptionsActionKey=void 0,function(e){e.InitStartTimeOffset="@instance/sources/@source/startOptions/initStartTimeOffset",e.SetStartTimeOffset="@instance/sources/@source/startOptions/setStartTimeOffset"}(i||(t.StartOptionsActionKey=i={}))},81683:function(e,t){"use strict";function i(e){Object.freeze(e);var t="function"==typeof e,n=Object.prototype.hasOwnProperty;return Object.getOwnPropertyNames(e).forEach(function(r){!n.call(e,r)||t&&("caller"===r||"callee"===r||"arguments"===r)||null===e[r]||"object"!=typeof e[r]&&"function"!=typeof e[r]||Object.isFrozen(e[r])||i(e[r])}),e}Object.defineProperty(t,"__esModule",{value:!0}),t.freeze=void 0,t.deepFreeze=i;var n=function(e){var t=e.getState();(function(e){return null!==e&&"object"==typeof e})(t)&&i(t)};t.freeze=function(e){return n(e),function(t){return function(i){n(e);try{return t(i)}finally{n(e)}}}}},68205:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addReachableDomain=function(e){return(0,n.createAction)(r.ReachableDomainsActionType.AddDomain,e)};var n=i(35267),r=i(32027)},60430:function(e,t,i){"use strict";var n,r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},o=this&&this.__spreadArray||function(e,t,i){if(i||2==arguments.length)for(var n,r=0,o=t.length;r<o;r++)!n&&r in t||(n||(n=Array.prototype.slice.call(t,0,r)),n[r]=t[r]);return e.concat(n||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.ReachableDomainsReducer=void 0;var a=i(3793),s=i(32027);t.ReachableDomainsReducer=(0,a.default)({domains:[]},((n={})[s.ReachableDomainsActionType.AddDomain]=function(e,t){return function(e,t){return r(r({},e),{domains:e.domains.includes(t)?e.domains:o(o([],e.domains,!0),[t],!1)})}(e,t.payload)},n))},32027:function(e,t){"use strict";var i;Object.defineProperty(t,"__esModule",{value:!0}),t.ReachableDomainsActionType=void 0,function(e){e.AddDomain="adddomain"}(i||(t.ReachableDomainsActionType=i={}))},74853:function(e,t,i){"use strict";var n=this&&this.__spreadArray||function(e,t,i){if(i||2==arguments.length)for(var n,r=0,o=t.length;r<o;r++)!n&&r in t||(n||(n=Array.prototype.slice.call(t,0,r)),n[r]=t[r]);return e.concat(n||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.ArrayHelper=void 0,t.invert=function(e){return function(t,i,n){return!e(t,i,n)}},t.findIndexFromEnd=o,t.findIndexWithin=function(e,t,i,n){for(var r=t;r<i;r++)if(n(e[r]))return r;return -1},t.findFromEnd=function(e,t){return e[o(e,t)]},t.forEachFromIndex=function(e,t,i){for(;t<e.length;t++)i(e[t-1],e[t])},t.forceArray=function(e){return Array.isArray(e)?e:[e]},t.contains=function(e,t,i){return void 0===i&&(i=a),null!=e.find(function(e){return i(t,e)})},t.shallowObjectMatcher=a,t.clearArray=function(e){e.splice(0,e.length)},t.removeEntriesFromStart=function(e,t){return t<1?[]:e.splice(0,t)};var r=i(70233);function o(e,t){var i;for(i=e.length-1;i>=0&&!t(e[i]);i--);return i}function a(e,t){return Object.keys(e).length===Object.keys(t).length&&Object.keys(e).every(function(i){return e[i]===t[i]})}t.ArrayHelper=function(){function e(){}return e.comparePrimitiveArrays=function(e,t){if(e.length!==t.length)return!1;for(var i=0;i<e.length;i++)if(e[i]!==t[i])return!1;return!0},e.stringToArrayWithoutEncoding=function(e){for(var t=new Uint8Array(e.length),i=0;i<e.length;i++)t[i]=e.charCodeAt(i);return t},e.convertBufferSourceToUTF8=function(t,i){return void 0===i&&(i="utf-8"),t instanceof ArrayBuffer?t=new Uint8Array(t):t instanceof DataView&&(t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength)),e.convertUint8ArrayToUtf8(t,i)},e.convertUint8ArrayToUtf8=function(e,t){if("undefined"!=typeof TextDecoder)return new TextDecoder(t).decode(e);for(var i=0,n="";i<e.length;){var r=e[i++];if(r>127)if(r>191&&r<224){if(i>=e.length||64&e[i]){n+="�";continue}r=(31&r)<<6|63&e[i++]}else if(r>223&&r<240){if(i+1>=e.length||64&e[i]||64&e[i+1]){n+="�";continue}r=(15&r)<<12|(63&e[i++])<<6|63&e[i++]}else{if(!(r>239&&r<248)||i+2>=e.length||64&e[i]||64&e[i+1]||64&e[i+2]){n+="�";continue}r=(7&r)<<18|(63&e[i++])<<12|(63&e[i++])<<6|63&e[i++]}r<=65535?n+=String.fromCharCode(r):r<=1114111?(r-=65536,n+=String.fromCharCode(r>>10|55296),n+=String.fromCharCode(1023&r|56320)):n+="�"}return n},e.sort=function(e,t,i){if("string"==typeof t&&"[object Array]"===Object.prototype.toString.call(e)){var n;if(i||(i="asc"),"asc"===i)n=-1;else{if("desc"!==i)return;n=1}return e.length<2?e:e.sort(function(e,i){return e[t]<i[t]?n:e[t]>i[t]?-1*n:0})}},e.append=function(t,i){var n=e.getTypedArrayType(t),r=e.getTypedArrayType(i);if(!n&&!r||n!==r)return null;var o=new n((t.byteLength+i.byteLength)/n.BYTES_PER_ELEMENT);return o.set(new n(t),0),o.set(new n(i),t.byteLength/n.BYTES_PER_ELEMENT),o},e.concatBuffers=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(!(e=e.filter(function(e){return e})).length)return null;var i=new Uint8Array(e.reduce(function(e,t){return e+t.byteLength},0));return e.reduce(function(e,t){return i.set(new Uint8Array(t),e),e+t.byteLength},0),i.buffer},e.getTypedArrayType=function(e){return e instanceof Uint8Array?Uint8Array:e instanceof Uint16Array?Uint16Array:e instanceof Uint32Array?Uint32Array:null},e.getArray=function(t){return e.getTypedArrayType(t)?[].slice.call(t):Array.isArray(t)?t:null},e.union=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var i=[];return e.filter(function(e){return!!e}).forEach(function(e){return e.forEach(function(e){i.includes(e)||i.push(e)})}),i},e.isArrayBuffer=function(e){return!!e&&e instanceof ArrayBuffer&&void 0!==e.byteLength},e.arrayBufferToAsciiString=function(t,i){return void 0===i&&(i=!0),e.sparseArrayBufferToAsciiString(t,1,0,i)},e.arrayBufferToBase64=function(e){for(var t="",i=new Uint8Array(e),n=0;n<i.length;n++)t+=String.fromCharCode(i[n]);return window.btoa(t)},e.sparseArrayBufferToAsciiString=function(e,t,i,n){void 0===t&&(t=2),void 0===i&&(i=0),void 0===n&&(n=!0);for(var r="",o=n?new Uint8Array(e):new Uint16Array(e),a=i;a<o.length;a+=t)r+=String.fromCharCode(o[a]);return r},e.intersect=function(){for(var t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];var n=[],r=t.filter(function(e){return!!e});return e.union.apply(e,t).forEach(function(e){r.every(function(t){return t.includes(e)})&&n.push(e)}),n},e.addAndMergeIntersects=function(t,i){var r=t.filter(function(t){return e.intersect(t,i).length>0}),o=t.filter(function(e){return!r.includes(e)});return 0===r.length?n(n([],t,!0),[i],!1):n([e.union.apply(e,n(n([],r,!1),[i],!1))],o,!0)},e.extractAsciiString=function(e,t,i){for(var n=t+i,r="";t<n;t++)r+=String.fromCharCode(e.getUint8(t));return r},e.extractHexString=function(e,t,i){for(var n=t+i,o="";t<n;t++)o+=r.FormatHelper.intToHex(e.getUint8(t));return o},e.insertInSortedArray=function(e,t,i){var n=e.findIndex(i);return n<0?e.push(t):e.splice(n,0,t),e},e.removeUntilInSortedArray=function(e,t){var i=e.findIndex(t),n=-1===i?e.length:i;return 0===n?[]:e.splice(0,n)},e.toArray=function(e){try{if(!e||!e.length)return[];for(var t=Array(e.length),i=0;i<e.length;i++)t[i]=e[i];return t}catch(e){return[]}},e}()},19483:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ArrayMap=void 0,t.ArrayMap=function(){function e(){this.f2=new Map}return e.prototype.get=function(e){return this.f2.get(e)},e.prototype.apply=function(e,t){this.f2.has(e)&&this.f2.set(e,t(this.f2.get(e)))},e.prototype.has=function(e){return this.f2.has(e)},e.prototype.delete=function(e){return this.f2.delete(e)},e.prototype.clear=function(){this.f2.clear()},Object.defineProperty(e.prototype,"size",{get:function(){return this.f2.size},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"length",{get:function(){var e=0;return this.f2.forEach(function(t){return e+=t.length}),e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"values",{get:function(){var e=[];return this.f2.forEach(function(t){e.push(t)}),e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"keys",{get:function(){var e=[];return this.f2.forEach(function(t,i){e.push(i)}),e},enumerable:!1,configurable:!0}),e.prototype.add=function(e,t){return this.ensure(e),null!=t&&this.get(e).push(t),this},e.prototype.ensure=function(e){this.has(e)||this.set(e,[])},e.prototype.set=function(e,t){return this.f2.set(e,t),this},e.prototype.addAll=function(e,t){var i=this;this.ensure(e),t.forEach(function(t){return i.add(e,t)})},e.prototype.getObject=function(){var e={};return this.f2.forEach(function(t,i){e[i]=t}),e},e.prototype.forAll=function(e){this.f2.forEach(function(t,i){return t.forEach(function(t){return e(i,t)})})},e.prototype.sort=function(e){this.f2.forEach(function(t){t.sort(e)})},e.prototype.mapEach=function(t){var i=new e;return this.f2.forEach(function(e,n){return i.set(n,e.map(t))}),i},e.prototype.transform=function(e){var t=[];return this.f2.forEach(function(i){return t.push(e(i))}),t},e.prototype.mapAll=function(t){var i=new e;return this.f2.forEach(function(e,n){return i.set(n,t(e))}),i},e.prototype.getAll=function(){var e=[];return this.f2.forEach(function(t){return e.push.apply(e,t)}),e},e.prototype.deleteValue=function(e,t){if(!this.has(e))return!1;var i=this.f2.get(e),n=i.indexOf(t);return n>=0&&(i.splice(n,1),!0)},e}()},81199:function(e,t,i){"use strict";
1Object.defineProperty(t,"__esModule",{value:!0}),t.getPlayableBufferLevel=function(e){var t=[null==e?void 0:e.getAudioBufferLength(),null==e?void 0:e.getVideoBufferLength()].filter(n.isDefined);return Math.min.apply(Math,t)};var n=i(23068)},4527:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CancelablePromise=void 0,t.CancelablePromise=function(){function e(){}return e.makeCancelable=function(e){var t=function(e){},i=new Promise(function(i,n){t=n,e.then(i,n)});return i.cancel=t.bind(i),i},e}()},47993:function(e,t,i){"use strict";var n=this&&this.__spreadArray||function(e,t,i){if(i||2==arguments.length)for(var n,r=0,o=t.length;r<o;r++)!n&&r in t||(n||(n=Array.prototype.slice.call(t,0,r)),n[r]=t[r]);return e.concat(n||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.MSESafari=t.getBestTech=t.getTechSupportedByModules=t.getTechSupportedByPlatform=t.getTechSupportedByModulesOnPlatform=t.isLocalStorageAvailable=t.isInlinePlaybackRestricted=t.isFairPlayDrmSupported=t.supports=t.checkPlatformSupports=t.hasMediaSourceSupport=t.FairplayKeySystems=void 0,t.isUsingFileProtocol=function(){return"file:"===c.default.location.protocol},t.isFetchSupported=function(){return"function"==typeof c.default.fetch&&"function"==typeof c.default.AbortController};var r,o=i(88052),a=i(62756),s=i(44468),u=i(21513),c=i(4081),l=i(85434),d=i(15487);!function(e){e.FPS_1="com.apple.fps.1_0",e.FPS_2="com.apple.fps.2_0"}(r||(t.FairplayKeySystems=r={}));var h=[{player:s.PlayerType.Html5,streaming:s.StreamType.Dash},{player:s.PlayerType.Html5,streaming:s.StreamType.Hls},{player:s.PlayerType.Html5,streaming:s.StreamType.Smooth},{player:s.PlayerType.WebRtc,streaming:s.StreamType.Whep},{player:s.PlayerType.Native,streaming:s.StreamType.Hls},{player:s.PlayerType.Native,streaming:s.StreamType.Progressive}],p=!!(c.default.ArrayBuffer&&c.default.Uint8Array&&c.default.Uint16Array);t.hasMediaSourceSupport=function(){var e,t,i,n="MediaSource"in c.default&&"function"==typeof(null==(e=c.default.MediaSource)?void 0:e.isTypeSupported),r="WebKitMediaSource"in c.default&&"function"==typeof(null==(t=c.default.WebKitMediaSource)?void 0:t.isTypeSupported),o="ManagedMediaSource"in c.default&&"function"==typeof(null==(i=c.default.ManagedMediaSource)?void 0:i.isTypeSupported);return n||r||o},t.checkPlatformSupports=function(){var e=[];if(p?e=h.filter(function(e){return(0,t.supports)(e.player,e.streaming)}):e.push({player:s.PlayerType.Native,streaming:s.StreamType.Progressive}),(0,d.isSafari)()){for(var i=1;i<e.length;i++)if(e[i].player===s.PlayerType.Native&&e[i].streaming===s.StreamType.Hls){e=e.splice(i,1).concat(e);break}}return e},t.supports=function(e,i){var n=(0,t.hasMediaSourceSupport)()?[s.StreamType.Dash,s.StreamType.Hls,s.StreamType.Smooth]:[],r=!function(){var e=c.default.RTCPeerConnection,t=!!e&&"function"==typeof e.prototype.addTransceiver;return function(){var e,t,i,n,r;return!!(null!=(r=null!=(n=null!=(i=null!=(t=null==(e=navigator.mediaDevices)?void 0:e.getUserMedia)?t:navigator.getUserMedia)?i:navigator.webkitGetUserMedia)?n:navigator.mozGetUserMedia)?r:navigator.msGetUserMedia)}()&&t}()?[]:[s.StreamType.Whep],o=function(e){return e.some(function(e){return e===i})};switch(e){case s.PlayerType.Html5:return o(n);case s.PlayerType.WebRtc:return o(r);case s.PlayerType.Native:return o(function(){var e=[];return function(){var e=document.createElement("video");return e&&"function"==typeof e.canPlayType&&("maybe"===e.canPlayType("application/vnd.apple.mpegURL")||"maybe"===e.canPlayType("application/x-mpegURL")||"maybe"===e.canPlayType("audio/mpegurl")||"maybe"===e.canPlayType("audio/x-mpegurl"))}()&&!(0,d.isEdge)()&&e.push(s.StreamType.Hls),"function"==typeof document.createElement("video").canPlayType&&e.push(s.StreamType.Progressive),e}());default:return!1}},t.isFairPlayDrmSupported=function(){return Object.values(r).some(function(e){var t;return null==(t=c.default.WebKitMediaKeys)?void 0:t.isTypeSupported(e,l.MimeType.VideoMp4)})},t.isInlinePlaybackRestricted=function(){var e=(0,d.getIOSVersion)(),t=e<d.IOS_9&&/iPad/i.test(navigator.userAgent),i=e<d.IOS_10&&/iP(hone|od)/i.test(navigator.userAgent);return d.isSafariIOS&&(t||i)},t.isLocalStorageAvailable=function(){try{return c.default.localStorage&&"function"==typeof localStorage.getItem&&"function"==typeof localStorage.setItem}catch(e){return!1}},t.getTechSupportedByModulesOnPlatform=function(){var e=(0,t.getTechSupportedByModules)();return(0,t.getTechSupportedByPlatform)().filter(function(t){return e.filter(function(e){return function(e,t){return e.player===t.player&&e.streaming===t.streaming}(e,t)}).length>0})},t.getTechSupportedByPlatform=function(){return(0,t.checkPlatformSupports)()},t.getTechSupportedByModules=function(){var e=o.ModuleManager.has(a.ModuleName.EngineBitmovin)?o.ModuleManager.get(a.ModuleName.EngineBitmovin).technologyChecker.getSupp
vendor: 21,922 bytes, line 1
1ortedTechnologies():[],t=o.ModuleManager.has(a.ModuleName.EngineNative)?o.ModuleManager.get(a.ModuleName.EngineNative).technologyChecker.getSupportedTechnologies():[],i=o.ModuleManager.has(a.ModuleName.EngineWebRtc)?o.ModuleManager.get(a.ModuleName.EngineWebRtc).technologyChecker.getSupportedTechnologies():[];return n(n(n([],e,!0),t,!0),i,!0)},t.getBestTech=function(e,t,i){void 0===e&&(e=[]),void 0===t&&(t={});var r=(0,u.getCapabilities)(),o=function(e){var t=n([],(0,u.getCapabilities)().techSupportedByPlatform,!0);return e&&0!==e.length?n(n([],e.filter(function(e){return t.some(function(i,n){var r,o=e.player===i.player&&e.streaming===i.streaming,a=null!=(r=e.exclude)&&r;return o&&t.splice(n,1),o&&!a})}).map(function(e){return{player:e.player,streaming:e.streaming}}),!0),t,!0):t}(e),a=r.techSupportedByPlatform;return i&&(o=a.filter(function(e){return e.player===i.player&&e.streaming===i.streaming})),(t.vr&&((0,d.isSafariIOS)()||(0,d.isSafari)())?o.filter(function(e){var t=e.streaming===s.StreamType.Progressive&&e.player===s.PlayerType.Native,i=e.streaming===s.StreamType.Hls&&e.player===s.PlayerType.Native;return t||i&&(!(0,d.isSafariIOS)()||(0,d.getIOSVersion)()>d.IOS_9)}):o).find(function(e){return!!t[e.streaming]})},t.MSESafari=function(){return(0,d.isSafari)()&&(0,t.hasMediaSourceSupport)()}},34047:function(e,t,i){"use strict";var n=this&&this.__spreadArray||function(e,t,i){if(i||2==arguments.length)for(var n,r=0,o=t.length;r<o;r++)!n&&r in t||(n||(n=Array.prototype.slice.call(t,0,r)),n[r]=t[r]);return e.concat(n||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.CodecStringHelper=t.HEVC_CODEC_TAGS=t.AVC_CODEC_TAGS=void 0,t.isAVMuxedTogether=function(e){return!!e&&e.indexOf(",")>-1},t.assembleHvcCodecString=function(e,t){if(!t)return null;for(var i=n([],t.general_constraint_indicator_flags_bytes,!0);0===i[i.length-1];)i.pop();var r=i.map(function(e){return e.toString(16).toUpperCase()});return n([e,"".concat(["","A","B","C"][t.general_profile_space]).concat(t.general_profile_idc),"".concat(t.general_profile_compatibility_flags),"".concat(0===t.general_tier_flag?"L":"H").concat(t.general_level_idc)],r,!0).join(".")},t.getMediaTypeFromCodec=function(e){return a.isVideoCodec(e)?r.MediaType.Video:a.isAudioCodec(e)?r.MediaType.Audio:a.isSubtitleCodec(e)?r.MediaType.Subtitles:void 0},t.getCodecTag=function(e){var t=e.getCodec();return(null==t?void 0:t.slice(0,3))||""};var r=i(44468),o=i(84568);t.AVC_CODEC_TAGS=["avc"],t.HEVC_CODEC_TAGS=["hev","hvc"];var a=function(){function e(){}return e.hasOldAvc1CodecFormat=function(t){return e.unsupportedCodecStringFormatRegex.test(t)},e.convertAvc1ToAvcotiCodecFormat=function(e){var t=e.split(".");return t.length>2?t.shift()+"."+parseInt(t.shift()).toString(16)+("000"+parseInt(t.shift()).toString(16)).slice(-4):e},e.isSupportedByRenderer=function(e,t,i){return e.isMediaTypeSupported(t,i)},e.getExtractedCodecStrings=function(t){return e.memoizedExtractCodecStrings||(e.memoizedExtractCodecStrings=(0,o.memoize)(s)),e.memoizedExtractCodecStrings(t)},e.getMimeTypeForCodecString=function(t){if(!t)return"unknown";for(var i=0,n=e.mimeTypeOrder;i<n.length;i++){var r=n[i];if(e.mimeTypeMap[r].find(function(e){return t.indexOf(e)>-1}))return r}return"unknown"},e.addCodec=function(t,i){var n;e.mimeTypeMap[t].push(i),null==(n=e.memoizedExtractCodecStrings)||n.invalidate()},e.canSwitchBetweenAudioCodecs=function(e,t){return e===t||[["mp4a.40.2","mp4a.40.5"],["ac-3","mp4a.a5","mp4a.A5"],["ec-3","mp4a.a6","mp4a.A6"]].some(function(i){return i.includes(e)&&i.includes(t)})},e.extractCodec=function(e){return e?e.split(".")[0]:null},e.isVideoCodec=function(t){return"video"===e.getMimeTypeForCodecString(t)},e.isAudioCodec=function(t){return"audio"===e.getMimeTypeForCodecString(t)},e.isSubtitleCodec=function(t){return"application"===e.getMimeTypeForCodecString(t)},e.unsupportedCodecStringFormatRegex=RegExp("^avc1.[0-9]{2,3}.[0-9]{2,3}$"),e.mimeTypeOrder=["video","audio","application"],e.mimeTypeMap={video:["avc","hvc","hev","mp4v","svc","mvc","av1","av01","vp8","vp9","dvh1","dvhe","dvav","dva1","vvc","vvi"],audio:["mp4a","mp3","opus","vorbis","speex","flac","samr","ac-3","ec-3","ac-4","ec-4"],application:["stpp","wvtt","vtt"]},e}();function s(e){return e||"string"==typeof e?e.split(",").reduce(function(e,t){return t=t.trim(),e[a.getMimeTypeForCodecString(t)]=t,e},{}):{}}t.CodecStringHelper=a},48669:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Comparators=void 0,t.Comparators=function(){function e(){}return e.boolean=function(e,t){return e===t?0:e?1:-1},e.reverseBoolean=function(t,i){return e.boolean(i,t)},e}()},19541:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.compareValues=function(e,t,i){return!e&&!t||!(!e||!t)&&(i||Object.keys(e)).every(function(i){return e[i]===t[i]})}},79721:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_PERIOD_ID=void 0,t.DEFAULT_PERIOD_ID="0"},76399:function(e,t){"use strict";var i=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(t,i)};return function(t,i){if("function"!=typeof i&&null!==i)throw TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.FilterIterator=t.ArrayIterator=t.EmptyIterator=void 0;var n=function(){function e(){}return e.prototype.toArray=function(){for(var e=[];this.hasNext();)e.push(this.next());return e},e}();t.EmptyIterator=function(e){function t(){return e.call(this)||this}return i(t,e),t.prototype.hasNext=function(){return!1},t.prototype.next=function(){},t.getInstance=function(){return this.singletonInstance||(this.singletonInstance=new t),this.singletonInstance},t}(n),t.ArrayIterator=function(e){function t(t){var i=e.call(this)||this;return i.data=t,i.QY=-1,i}return i(t,e),t.prototype.hasNext=function(){return this.RY=void 0,this.QY<this.data.length&&(this.QY++,this.RY=this.data[this.QY]),null!=this.RY},t.prototype.next=function(){return this.RY},t}(n),t.FilterIterator=function(e){function t(t,i){var n=e.call(this)||this;return n.iterator=t,n.filter=i,n}return i(t,e),t.prototype.hasNext=function(){var e;for(this.SY=void 0;this.iterator.hasNext();)if(e=this.iterator.next(),this.filter(e)){this.SY=e;break}return null!=this.SY},t.prototype.next=function(){return this.SY},t}(n)},65348:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DOMHelper=void 0,t.DOMHelper=function(){function e(){}return e.createTag=function(e,t,i){void 0===t&&(t={}),void 0===i&&(i={});var n=document.createElement(e);return Object.keys(i).forEach(function(e){return n.style[e]=i[e]}),Object.keys(t).forEach(function(e){return n.setAttribute(e,t[e])}),n},e}()},34841:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Deferred=void 0,t.Deferred=function(){function e(){var e=this;this.dG="pending",this.aG=new Promise(function(t,i){e.bG=function(i){return e.dG="resolved",t(i)},e.cG=function(t){return e.dG="rejected",i(t)}})}return Object.defineProperty(e.prototype,"hasSettled",{get:function(){return"pending"!==this.dG},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"promise",{get:function(){return this.aG},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"resolve",{get:function(){return this.bG},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"reject",{get:function(){return this.cG},enumerable:!1,configurable:!0}),e}()},35660:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DelayedEndOfStreamHelper=void 0;var n=i(19274),r=i(34841);t.DelayedEndOfStreamHelper=function(){function e(e,t){void 0===t&&(t=1);var i=this;this.context=e,this.delayThreshold=t,this.OU=function(){i.LU&&!i.NU(!0)&&i.LU.resolve()},this.MU=e.videoElement}return e.prototype.NU=function(e){var t;return!(!e||!(null==(t=this.MU)?void 0:t.buffered.length))&&this.MU.buffered.end(this.MU.buffered.length-1)-this.MU.currentTime>this.delayThreshold},e.prototype.PU=function(){this.context.logger.debug("Resolving delayed setEndOfStream"),this.MU.removeEventListener(n.MediaElementEvent.timeupdate,this.OU),this.LU=void 0},e.prototype.setEndOfStream=function(e,t){var i=this;if(this.NU(e)){if(this.LU)return Promise.resolve();var o=this.MU.buffered.end(this.MU.buffered.length-1),a=this.MU.currentTime;return this.context.logger.debug("Delaying setEndOfStream(".concat(e,") until playhead is close to end of buffer"),{threshold:this.delayThreshold,currentTime:a,endOfBuffer:o}),this.LU=new r.Deferred,this.MU.addEventListener(n.MediaElementEvent.timeupdate,this.OU),this.LU.promise.then(function(){return i.PU(),t()}).catch(function(){return i.PU()}),Promise.resolve()}return this.LU&&!this.NU(e)&&this.LU.reject(),t()},e.prototype.release=function(){this.LU&&(this.MU.removeEventListener(n.MediaElementEvent.timeupdate,this.OU),this.LU.reject(),this.LU=void 0)},e}()},52424:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DurationConverter=void 0,t.DurationConverter=function(){function e(){}return e.getDurationInSec=function(e){if("string"!=typeof e)return NaN;var t=/^([-])?P(([\d.]*)Y)?(([\d.]*)M)?(([\d.]*)D)?(T)?(([\d.]*)H)?(([\d.]*)M)?(([\d.]*|Infinity)S)?/.exec(e);if(t){var i=!!t[1],n=12*parseFloat(t[2]||"0")*2592e3,r=30*parseFloat(t[4]||"0")*86400,o=24*parseFloat(t[6]||"0")*3600,a=60*parseFloat(t[9]||"0")*60,s=60*parseFloat(t[11]||"0"),u=parseFloat(t[13]||"0");if("T"===t[8]&&void 0===(t[9]||t[11]||t[13]))return NaN;var c=n+r+o+a+s+u;return i&&(c=-c),c}return NaN},e}()},40153:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorRecoveryUtil=void 0,t.ErrorRecoveryUtil=function(){function e(){}return e.wasRecoveryAttemptedAtPosition=function(t,i){return!(i<0)&&Math.abs(t-i)<e.POSITION_TOLERANCE},e.POSITION_TOLERANCE=.1,e}()},43767:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileLoader=void 0,t.FileLoader=function(){function e(){this.IL={}}return e.getInstance=function(){return e.instance||(e.instance=new e),e.instance},e.prototype.loadScript=function(e,t){return void 0===t&&(t=!1),this.IL.hasOwnProperty(e)&&this.IL[e]||(t&&window.requirejs&&window.define?this.IL[e]=new Promise(function(t,i){window.requirejs([e],function(e){t(e)},function(e){i(e)})}):this.IL[e]=new Promise(function(t,i){var n=document.getElementsByTagName("head")[0]||document.documentElement,r=!1,o=document.createElement("script");o.type="text/javascript",o.src=e,o.async=!0,o.onload=o.onreadystatechange=function(){r||this.readyState&&"loaded"!==this.readyState&&"complete"!==this.readyState||(r=!0,o.onload=o.onreadystatechange=null,n&&o.parentNode&&n.removeChild(o),t(void 0))},o.onerror=i,n.insertBefore(o,n.firstChild)})),this.IL[e]},e.prototype.removeScript=function(e,t){this.IL.hasOwnProperty(e)&&this.IL[e]&&delete this.IL[e];for(var i=document.head.getElementsByTagName("script"),n=0;n<i.length;n++)i[n].src.includes(t)&&document.head.removeChild(i[n])},e.prototype.loadCSS=function(e,t){for(var i,n=(null==(i=null==t?void 0:t.container)?void 0:i.call(t))||document.getElementsByTagName("head")[0]||document.documentElement,r=n.querySelectorAll("link"),o=0;o<r.length;o++){var a=r[o];if(a.hasAttribute("href")&&a.getAttribute("href").indexOf(e)>-1)return}var s=document.createElement("link");s.setAttribute("rel","stylesheet"),s.setAttribute("type","text/css"),s.setAttribute("href",e),n.insertBefore(s,n.firstChild),this.IL[e]=!0},e}()},70233:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FormatHelper=void 0,t.FormatHelper=function(){function e(){}return e.hexToBytes=function(e){var t=e.length;1&t&&(e="0"+e,t++);for(var i=new Uint8Array(t>>1),n=0;n<t;n+=2)i[n>>1]=parseInt(e.substring(n,n+2),16);return i},e.bytesToHex=function(e){e instanceof ArrayBuffer&&(e=new Uint8Array(e));for(var t="",i=0;i<e.byteLength;i++){var n=(255&e[i]).toString(16);n.length<2&&(t+="0"),t+=n}return t},e.bytesToUUID=function(e){return this.beautifyUUID(this.bytesToHex(e))},e.beautifyUUID=function(e){return e.slice(0,8)+"-"+e.slice(8,12)+"-"+e.slice(12,16)+"-"+e.slice(16,20)+"-"+e.slice(20)},e.intToHex=function(e){return("00"+e.toString(16)).slice(-2)},e.base64UrlEncode=function(e){return window.btoa(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")},e.base64UrlDecode=function(e){return window.atob((e+"===".slice((e.length+3)%4)).replace(/-/g,"+").replace(/_/g,"/"))},e}()},87244:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isSwitchingBufferBlocks=function(e){var t,i=null==e?void 0:e.getState();return!!i&&(null==(t=i.buffer)?void 0:t.isBufferBlockSwitchOngoing)}},68922:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.applyLabeling=t.getLabelFunction=t.handleLabelAssignment=t.DEFAULT_LABEL=t.LabelingType=void 0;var n,r=i(70850);!function(e){e.Qualities="qualities",e.Tracks="tracks",e.Subtitles="subtitles"}(n||(t.LabelingType=n={})),t.DEFAULT_LABEL="",t.handleLabelAssignment=function(e,i,n){if(!n)return t.DEFAULT_LABEL;var o=(0,r.safeUserCallback)(function(){return n(e)},i.logger);return"string"==typeof o?o:t.DEFAULT_LABEL},t.getLabelFunction=function(e,t,i){var n,r;return null==(r=null==(n=e.labeling)?void 0:n[t])?void 0:r[i]},t.applyLabeling=function(e,i){var n=(0,t.getLabelFunction)(e.source,e.streamType,e.labelingType);return(0,t.handleLabelAssignment)(i,e.context,n)}},84568:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.memoize=function(e,t){var i=new Map;function n(n){return function(i,n){var r=t?t.apply(void 0,n):e;return i.has(r)||i.set(r,e.apply(void 0,n)),i.get(r)}(t||0===n.length?i:r(i,n),n)}function r(e,t,i){void 0===i&&(i=0);var n,o=t.length-1===i,a=t[i];return e.has(a)?n=e.get(a):(n=new Map,e.set(a,n)),i+=1,o?n:r(n,t,i)}return function(){var e=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return n(e)};return e.invalidate=function(){return i.clear()},e}()}},85434:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MimeTypeHelper=t.MimeType=void 0,t.isMediaTypeContained=function(e,t){return Object.keys(e).map(function(e){return a.getMediaType(e)}).includes(a.getMediaType(t))};var n,r=i(85625),o=i(44468);!function(e){e.VideoMp4="video/mp4",e.VideoTs="video/mp2t",e.AudioMp4="audio/mp4",e.AudioTs="audio/mp2t"}(n||(t.MimeType=n={}));var a=function(){function e(){}return e.isSubtitle=function(e){return this.isApplication(e)||this.isText(e)},e.isText=function(e){return e.toLowerCase().includes("text")},e.isTtmlXml=function(e){return e.toLowerCase().includes("ttml+xml")},e.isApplication=function(e){return e.toLowerCase().includes("application")},e.isAV=function(e){return this.isVideo(e)||this.isAudio(e)},e.isVideo=function(e){return e.toLowerCase().includes("video")},e.isUnknown=function(e){return e.toLowerCase().includes("unknown")},e.isAudio=function(e){return e.toLowerCase().includes("audio")},e.isImage=function(e){return e.toLowerCase().includes("image")},e.isDash=function(e){return e.toLowerCase().includes(r.ManifestMimeType.Dash)},e.isHls=function(e){var t=e.toLowerCase();return t.includes(r.ManifestMimeType.Hls)||t.includes("vnd.apple.mpegurl")},e.isMP4=function(e){return e.toLowerCase().includes("mp4")},e.getMediaType=function(e){return this.isVideo(e)?o.MediaType.Video:this.isAudio(e)?o.MediaType.Audio:this.isSubtitle(e)?o.MediaType.Subtitles:this.isImage(e)?o.MediaType.Thumbnails:void 0},e.extractContentType=function(e){return e.split("/")[0]},e.extractContainerType=function(e){var t=e.split("/");return t.length>1?t[1]:null},e}();t.MimeTypeHelper=a},15014:function(e,t){"use strict";function i(e,t){var i;return null==(i=null==e?void 0:e.Period)?void 0:i.find(function(e){return e._id===t})}function n(e,t){var n,r=i(e,t.periodId);if(r)return null==(n=r.AdaptationSet)?void 0:n.find(function(e){return e._internalId.equals(t)})}Object.defineProperty(t,"__esModule",{value:!0}),t.findRepresentation=void 0,t.findPeriod=i,t.findAdaptationSet=n,t.findRepresentation=function(e,t){var i,r=n(e,t);if(r)return null==(i=r.Representation)?void 0:i.find(function(e){return e._internalId.equals(t)})}},15487:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getVidaaVersion=t.isVidaa=t.getTizenVersion=t.isTizen2024=t.isTizen2023=t.isTizen2022=t.isTizen2020=t.isTizen2016=t.isTizen2017=t.isTizen2018=t.isTizen2019=t.isTizen=t.getEdgeVersion=t.isEdge=t.getSafariVersion=t.isSafari=t.isFirefoxIOS=t.isFirefox=t.isChromium=t.isChrome=t.WEBOS_2022_CHROMIUM_VERSION=t.WEBOS_2021_CHROMIUM_VERSION=t.WEBOS_2020_CHROMIUM_VERSION=t.WEBOS_2018_2019_CHROMIUM_VERSION=t.WEBOS_2016_2017_CHROMIUM_VERSION=t.TIZEN_2024_MINOR_VERSION=t.TIZEN_2024_MAJOR_VERSION=t.TIZEN_2023_MINOR_VERSION=t.TIZEN_2023_MAJOR_VERSION=t.TIZEN_2022_MINOR_VERSION=t.TIZEN_2022_MAJOR_VERSION=t.TIZEN_2020_MINOR_VERSION=t.TIZEN_2020_MAJOR_VERSION=t.TIZEN_2019_MINOR_VERSION=t.TIZEN_2019_MAJOR_VERSION=t.TIZEN_2018_MINOR_VERSION=t.TIZEN_2018_MAJOR_VERSION=t.TIZEN_2017_MINOR_VERSION=t.TIZEN_2017_MAJOR_VERSION=t.TIZEN_2016_MINOR_VERSION=t.TIZEN_2016_MAJOR_VERSION=t.SAFARI_18_MAJOR_VERSION=t.SAFARI_17_MAJOR_VERSION=t.SAFARI_15_MAJOR_VERSION=t.IOS_18=t.IOS_17=t.IOS_15=t.IOS_10=t.IOS_9=t.EDGE_CHROMIUM_FIRST_MAJOR_VERSION=void 0,t.resetPlatformDetectorCache=t.isSafariPlatform18orNewer=t.isSafari17orIOS17=t.isSafari15orIOS15=t.getIOSVersion=t.isSafariIOS=t.isIOS=t.isMobile=t.isEdgeAndroid=t.isAndroid=t.isWebOs2022OrNewer=t.isWebOs2020=t.isWebOs2017=t.isWebOs2016=t.isWebOs2019OrOlder=t.getWebOsChromiumVersion=t.isWebOS=t.isWpeWebKit=t.isVizio=void 0,t.isLegacyEdge=r,t.isEdgeChromium=function(){return(0,t.isEdge)()&&(0,t.getEdgeVersion)().major>=t.EDGE_CHROMIUM_FIRST_MAJOR_VERSION},t.isPlayStation5=o,t.isPlayStation4=a,t.isReactNative=function(){return"ReactNative"===window.navigator.product};var n=i(47993);function r(){return(0,t.isEdge)()&&(0,t.getEdgeVersion)().major<t.EDGE_CHROMIUM_FIRST_MAJOR_VERSION}function o(){return/PlayStation 5/i.test(navigator.userAgent)}function a(){return/PlayStation 4/i.test(navigator.userAgent)}t.EDGE_CHROMIUM_FIRST_MAJOR_VERSION=79,t.IOS_9=9,t.IOS_10=10,t.IOS_15=15,t.IOS_17=17,t.IOS_18=18,t.SAFARI_15_MAJOR_VERSION=15,t.SAFARI_17_MAJOR_VERSION=17,t.SAFARI_18_MAJOR_VERSION=18,t.TIZEN_2016_MAJOR_VERSION=2,t.TIZEN_2016_MINOR_VERSION=4,t.TIZEN_2017_MAJOR_VERSION=3,t.TIZEN_2017_MINOR_VERSION=0,t.TIZEN_2018_MAJOR_VERSION=4,t.TIZEN_2018_MINOR_VERSION=0,t.TIZEN_2019_MAJOR_VERSION=5,t.TIZEN_2019_MINOR_VERSION=0,t.TIZEN_2020_MAJOR_VERSION=5,t.TIZEN_2020_MINOR_VERSION=5,t.TIZEN_2022_MAJOR_VERSION=6,t.TIZEN_2022_MINOR_VERSION=5,t.TIZEN_2023_MAJOR_VERSION=7,t.TIZEN_2023_MINOR_VERSION=0,t.TIZEN_2024_MAJOR_VERSION=8,t.TIZEN_2024_MINOR_VERSION=0,t.WEBOS_2016_2017_CHROMIUM_VERSION=38,t.WEBOS_2018_2019_CHROMIUM_VERSION=53,t.WEBOS_2020_CHROMIUM_VERSION=68,t.WEBOS_2021_CHROMIUM_VERSION=79,t.WEBOS_2022_CHROMIUM_VERSION=87,t.isChrome=function(){return navigator.userAgent.includes("Chrome")&&!(0,t.isEdge)()},t.isChromium=function(){return(0,t.isChrome)()||(0,t.isEdge)()&&!r()},t.isFirefox=function(){return navigator.userAgent.includes("Firefox")},t.isFirefoxIOS=function(){return navigator.userAgent.includes("FxiOS")&&(0,t.isIOS)()},t.isSafari=function(){return navigator.userAgent.includes("Safari")&&!navigator.userAgent.includes("Chrome")&&!navigator.userAgent.includes("IEMobile")&&!navigator.userAgent.includes("Edge")&&!(0,t.isTizen)()&&!o()&&!a()&&!(0,t.isWpeWebKit)()||(0,n.isFairPlayDrmSupported)()},t.getSafariVersion=function(){var e=/Version\/(\d+)\.?(\d+)?\.?(\d+)?/.exec(navigator.userAgent)||null;if(!e)return{};var t=e[1],i=e[2],n=e[3],r=function(e){return parseInt(e)};return{major:r(t),minor:r(i),patch:r(n)}},t.isEdge=function(){return/Edge\/\d+/i.test(navigator.userAgent)||/Edg\/\d+/i.test(navigator.userAgent)||/EdgA\/\d+/i.test(navigator.userAgent)||/EdgiOS\/\d+/i.test(navigator.userAgent)},t.getEdgeVersion=function(){var e=/Edge\/(\d+)\.?(\d+)/.exec(navigator.userAgent)||/Edg\/(\d+)\.?(\d+)/.exec(navigator.userAgent)||/EdgA\/(\d+)\.?(\d+)/.exec(navigator.userAgent)||/EdgiOS\/(\d+)\.?(\d+)/.exec(navigator.userAgent);if(!e||0===e.length)return{major:0,minor:0};var t={};return e[1]&&(t.major=parseInt(e[1])),e[1]&&(t.minor=parseInt(e[2])),t};var s,u,c,l,d=function(e,i){var n=(0,t.getTizenVersion)();return n.major===e&&n.minor===i};t.isTizen=function(){return null!=s||(s=navigator.userAgent.includes("Tizen")),s},t.isTizen2019=function(){return d(t.TIZEN_2019_MAJOR_VERSION,t.TIZEN_2019_MINOR_VERSION)},t.isTizen2018=function(){return d(t.TIZEN_2018_MAJOR_VERSION,t.TIZEN_2018_MINOR_VERSION)},t.isTizen2017=function(){return d(t.TIZEN_2017_MAJOR_VERSION,t.TIZEN_2017_MINOR_VERSION)},t.isTizen2016=function(){return d(t.TIZEN_2016_MAJOR_VERSION,t.TIZEN_2016_MINOR_VERSION)},t.isTizen2020=function(){return d(t.TIZEN_2020_MAJOR_VERSION,t.TIZEN_2020_MINOR_VERSION)},t.isTizen2022=function(){return d(t.TIZEN_2022_MAJOR_VERSION,t.TIZEN_2022_MINOR_VERSION)},t.isTizen2023=function(){return d(t.TIZEN_2023_MAJOR_VERSION,t.TIZEN_2023_MINOR_VERSION)},t.isTizen2024=function(){return d(t.TIZEN_2024_MAJOR_VERSION,t.TIZEN_2024_MINOR_VERSION)},t.getTizenVersion=function(){if(void 0===u){var e=/Tizen (\d).(\d)/.exec(navigator.userAgent);u=(null==e?void 0:e[1])?{major:Number(e[1]),minor:Number(e[2]||0)}:{}}return u},t.isVidaa=function(){return navigator.userAgent.includes("VIDAA")},t.getVidaaVersion=function(){var e=new RegExp(/VIDAA\/(\d+)\.?(\d+)/).exec(navigator.userAgent);return(null==e?void 0:e[1])?{major:Number(e[1]),minor:Number(e[2])}:{}}
vendor: 4,925 bytes, line 1
1,t.isVizio=function(){return navigator.userAgent.includes("VIZIO")},t.isWpeWebKit=function(){return navigator.userAgent.includes("WPE")||navigator.userAgent.includes("Astro")},t.isWebOS=function(){return null!=c||(c=navigator.userAgent.includes("Web0S")||navigator.userAgent.includes("NetCast")),c},t.getWebOsChromiumVersion=function(){var e;if(void 0===l){var t=new RegExp(/Chrome\/(\d+)\.?(\d+)/).exec(navigator.userAgent);if(!(null==t?void 0:t[1]))return{};l={major:Number(t[1]),minor:Number(null!=(e=t[2])?e:0)}}return l},t.isWebOs2019OrOlder=function(){var e=(0,t.getWebOsChromiumVersion)();return(0,t.isWebOS)()&&void 0!==(null==e?void 0:e.major)&&e.major<=t.WEBOS_2018_2019_CHROMIUM_VERSION},t.isWebOs2016=function(){return(0,t.getWebOsChromiumVersion)().major===t.WEBOS_2016_2017_CHROMIUM_VERSION&&!("requestMediaKeySystemAccess"in navigator)},t.isWebOs2017=function(){return(0,t.getWebOsChromiumVersion)().major===t.WEBOS_2016_2017_CHROMIUM_VERSION&&"requestMediaKeySystemAccess"in navigator},t.isWebOs2020=function(){return(0,t.isWebOS)()&&(0,t.getWebOsChromiumVersion)().major===t.WEBOS_2020_CHROMIUM_VERSION},t.isWebOs2022OrNewer=function(){var e=(0,t.getWebOsChromiumVersion)();return(0,t.isWebOS)()&&void 0!==(null==e?void 0:e.major)&&e.major>=t.WEBOS_2022_CHROMIUM_VERSION},t.isAndroid=function(){return/Android/i.test(navigator.userAgent)},t.isEdgeAndroid=function(){return(0,t.isEdge)()&&(0,t.isAndroid)()},t.isMobile=function(){return/Android/i.test(navigator.userAgent)||/IEMobile/i.test(navigator.userAgent)||/Windows Phone 10.0/i.test(navigator.userAgent)||/Safari/i.test(navigator.userAgent)&&/Mobile/i.test(navigator.userAgent)},t.isIOS=function(){return/Safari/i.test(navigator.userAgent)&&/Mobile/i.test(navigator.userAgent)&&!/Android/i.test(navigator.userAgent)&&!/Windows Phone 10.0/i.test(navigator.userAgent)},t.isSafariIOS=function(){return/Safari/i.test(navigator.userAgent)&&/iP(hone|od|ad)/i.test(navigator.userAgent)},t.getIOSVersion=function(){var e=/OS (\d+)(_\d+)*/.exec(navigator.userAgent);return e&&e.length>0&&parseInt(e[1],10)||0},t.isSafari15orIOS15=function(){return(0,t.isSafari)()&&(0,t.getSafariVersion)().major===t.SAFARI_15_MAJOR_VERSION||(0,t.isIOS)()&&(0,t.getIOSVersion)()===t.IOS_15},t.isSafari17orIOS17=function(){return(0,t.isSafari)()&&(0,t.getSafariVersion)().major===t.SAFARI_17_MAJOR_VERSION||(0,t.isIOS)()&&(0,t.getIOSVersion)()===t.IOS_17},t.isSafariPlatform18orNewer=function(){var e;return!!((0,t.isSafari)()&&(null!=(e=(0,t.getSafariVersion)().major)?e:0)>=t.SAFARI_18_MAJOR_VERSION)||!!((0,t.isIOS)()&&(0,t.getIOSVersion)()>=t.IOS_18)},t.resetPlatformDetectorCache=function(){s=void 0,u=void 0,c=void 0,l=void 0}},92006:function(e,t,i){"use strict";var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.PlayerConfigBuilder=void 0;var r=i(60865),o=i(65567),a=i(15487),s=i(70850);t.PlayerConfigBuilder=function(){function e(e){"string"==typeof e?this.DC={key:e}:(this.DC={},s.Util.deepCopy(this.DC,e))}return e.prototype.optimizeForPlatform=function(e){var t=(null!=e?e:{}).appId;if((0,a.isTizen)()||(0,a.isWebOS)()){var i=(0,o.getTvDefaultConfig)(t);s.Util.deepCopy(this.DC,i)}return this},e.prototype.enableLowLatency=function(e){var t=(0,r.getLowLatencyDefaultConfig)(e);return s.Util.deepCopy(this.DC,t),this},e.prototype.mergeWith=function(e){return s.Util.deepCopy(this.DC,e),this},e.prototype.build=function(){return n({},this.DC)},e}()},72537:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StorageHandler=void 0;var n=i(4081);t.StorageHandler=function(){function e(e){this.KY=e,this.IY="bitmovinplayer_config",this.data={},this.JY=function(){var e=new Date;return e.setTime(e.getTime()+316224e5),"expires="+e.toUTCString()}(),this.OY()}return e.prototype.get=function(e){return this.data[e]},e.prototype.set=function(e,t){this.data[e]=t,this.PY()},e.prototype.setDisabled=function(e){this.disabled=e},e.prototype.LY=function(e){var t=this.MY();if(!t)return"";for(var i=e+"=",n=t.split(";"),r=0;r<n.length;r++){for(var o=n[r];" "===o.charAt(0);)o=o.substring(1);if(0===o.indexOf(i))return o.substring(i.length,o.length)}return""},e.prototype.MY=function(){try{return document.cookie}catch(e){return""}},e.prototype.NY=function(e){if(e)try{this.data=JSON.parse(e)}catch(e){}},e.prototype.OY=function(){this.KY?this.NY(localStorage.getItem(this.IY)):this.NY(this.LY(this.IY))},e.prototype.PY=function(){if(!this.disabled)try{if(this.KY)localStorage.setItem(this.IY,JSON.stringify(this.data));else{var e=n.default.isSecureContext?"Secure; ":"";document.cookie=this.IY+"="+JSON.stringify(this.data)+"; "+e+"SameSite=Strict; path=/; "+this.JY}}catch(e){}},e}()},66502:function(e,t,i){"use strict";
vendor: 23,715 bytes, line 1
1Object.defineProperty(t,"__esModule",{value:!0}),t.TextSegmentAnalyzer=void 0;var n=i(74853);t.TextSegmentAnalyzer=function(){function e(){}return e.isPlainTextPayload=function(e){if(!e)return!1;var t=[87,69,66,86,84,84],i=new Uint8Array(e.slice(0,6)),r=new Uint8Array(e.slice(0,9));return n.ArrayHelper.comparePrimitiveArrays(i,new Uint8Array(t))||n.ArrayHelper.comparePrimitiveArrays(r,new Uint8Array([239,187,191].concat(t)))},e.detectEncoding=function(e){for(var t,i=!0,n=[34,85,84,70,45,56,34],r=e instanceof ArrayBuffer?new DataView(e):e,o=0;o<r.byteLength;o++)if((t=r.getUint8(o))>128)i=!1;else{if(0===t)return"utf-16";if(t===n[0]&&r.byteLength>o+n.length){for(var a=!0,s=1;s<n.length;s++)if(n[s]!==r.getUint8(o+s)){a=!1;break}if(a)return"utf-8"}}return i?"ascii":"utf-8"},e}()},89927:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toSeconds=function(e){return e/i},t.toMilliSeconds=function(e){return e*i};var i=1e3},88844:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.clearTimeoutIfDefined=function(e){e&&n.default.clearTimeout(e)},t.clearIntervalIfDefined=function(e){e&&n.default.clearInterval(e)};var n=i(4081)},23068:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isBoolean=t.isNumber=void 0,t.isDefined=function(e){return null!=e},t.isVideoRepresentation=function(e){return null!=e._height&&null!=e._width},t.isNumber=function(e){return"number"==typeof e},t.isBoolean=function(e){return"boolean"==typeof e}},58313:function(e,t){"use strict";function i(e,t,i){return e+=t,null!=i&&(e+="="+encodeURIComponent(i)),e}function n(){var e;return(null==(e=window.location)?void 0:e.protocol)||"https:"}function r(e){var t=e.indexOf("//")+2,i=e.indexOf("/",t);return -1===i&&(i=e.indexOf("?",t)),-1===i?e:e.slice(0,i)}Object.defineProperty(t,"__esModule",{value:!0}),t.URLHelper=void 0,t.extractOrigin=r,t.removeQueryParameters=function(e,t){var i=e.split("?"),n=i[0],r=i[1];if(!r)return e;var o=r.split("&").filter(function(e){var i=e.split("=")[0];return!t.includes(i)}).join("&");return o?"".concat(n,"?").concat(o):n},t.URLHelper=function(){function e(){}return e.isUrlAbsolute=function(t){return!!t&&("string"!=typeof t&&(t=e.urlObjectToString(t)),!!e.isDataUri(t)||e.ABSOLUTE_URL_REGEX.test(t))},e.removeUrlParameters=function(e){return e.indexOf("?")>-1&&(e=e.split("?")[0]),e},e.urlObjectToString=function(e){return e&&"string"!=typeof e?!function(e){return e&&"string"==typeof e.__text}(e)?!function(e){return e&&"string"==typeof e.url}(e)?null:e.url:e.__text:e},e.concatUrlParts=function(t,i){var n="/",o=e.urlObjectToString(t),a=e.urlObjectToString(i);return!o||o.length<1||e.isUrlAbsolute(a)?a:!a||a.length<1?o:((o=e.removeUrlParameters(o)).indexOf("/")>-1&&(o=o.substring(0,o.lastIndexOf("/"))),"/"===a[0]&&(o=r(o),n=""),o+n+a)},e.removeLastPathPart=function(t){if(!t)return null;t=e.removeUrlParameters(t);var i=e.getProtocolOffset(t),n=t.lastIndexOf("/");return n===t.length-1&&(t=t.substring(0,n)),(n=t.lastIndexOf("/"))<0?"":n>t.length-1?t:n<=i?t+"/":t.substring(0,n+1)},e.isRootRelativeUrl=function(e){return!!(e&&e.length>0)&&"/"===e[0]},e.getProtocolOffset=function(e){var t=e.indexOf("://");return t>-1?t+3:2*(-1===t&&0===e.indexOf("//"))},e.replaceCdn=function(e,t){var i=r(e),n=r(t);return e.replace(i,n)},e.isSubUrl=function(e,t){return!(!e||!t)&&(0===t.indexOf("../")&&(t=t.substring(3)),e.indexOf(t)>-1)},e.concatBaseUrlWithPartial=function(t,i){return e.isUrlAbsolute(i)?(i.startsWith("/")&&(i=(function(e){return e.substring(0,e.indexOf("//"))}(t)||n())+i),i):(t=this.toFullUrl(t),i&&0!==i.length?e.isRootRelativeUrl(i)?r(t)+i:(t.endsWith("/")||(t=this.removeLastPathPart(t)),t+i):t)},e.appendQueryParametersToUrl=function(e,t){if(!t||0===Object.keys(t).length)return e;var n="",r=e.indexOf("?")>=0;for(var o in t)t.hasOwnProperty(o)&&(n+=r?"&":"?",r=!0,n=i(n,o,t[o]));return e+n},e.toFullUrl=function(t){if(e.isDataUri(t))return t;var i=t.startsWith("//")?n()+t:t;return t.split("//")[1].includes("/")||(i+="/"),i},e.isDataUri=function(e){return e&&0===e.indexOf(this.DATA_URI_PROTOCOL)},e.parseDataUri=function(e){if(!this.isDataUri(e))throw Error("Invalid data uri: "+e);-1===(e=e.substring(this.DATA_URI_PROTOCOL.length)).indexOf(this.COMMA_CHARACTER)&&(e=this.DATA_URI_DEFAULT_MEDIA_TYPE+this.COMMA_CHARACTER+e);var t=e.split(this.COMMA_CHARACTER),i=t[0],n=t[1],r=i.endsWith(this.DATA_URI_BASE64_MARKER),o=i.length-this.DATA_URI_BASE64_MARKER.length-this.COMMA_CHARACTER.length;return{mediaType:r?i.substring(0,o):i,base64:r?n:void 0,data:r?atob(n):n}},e.buildAbsoluteUrl=function(t,i,n){return e.isUrlAbsolute(n)?n:e.isRootRelativeUrl(n)?i+n:t+n},e.getAbsoluteUrl=function(t,i){return e.isUrlAbsolute(t)?t:e.concatBaseUrlWithPartial(i,t)},e.removeDotSegments=function(t){for(var i=e.isUrlAbsolute(t)?r(t):"",n=[],o=0,a=t.substring(i.length).split("/");o<a.length;o++){var s=a[o];if(".."===s){if(0===n.length)return t;n.pop()}else"."!==s&&n.push(s)}return i+n.join("/")},e.DATA_URI_PROTOCOL="data:",e.DATA_URI_BASE64_MARKER="base64",e.DATA_URI_DEFAULT_MEDIA_TYPE="text/plain;charset=US-ASCII",e.ABSOLUTE_URL_REGEX=RegExp("^(?:[a-z]+:)?//","i"),e.COMMA_CHARACTER=",",e}()},70850:function(e,t,i){"use strict";var n=this&&this.__spreadArray||function(e,t,i){if(i||2==arguments.length)for(var n,r=0,o=t.length;r<o;r++)!n&&r in t||(n||(n=Array.prototype.slice.call(t,0,r)),n[r]=t[r]);return e.concat(n||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.Util=void 0,t.parseAspectRatio=function(e){if(!e)return 0;if((e=String(e).replace(",",".")).indexOf(":")>-1)t=e.split(":");else{if(!(e.indexOf("/")>-1))return isNaN(parseFloat(e))?0:parseFloat(e);t=e.split("/")}if(t&&Array.isArray(t)&&t.length>1){var t,i=parseFloat(t[0])/parseFloat(t[1]);return isNaN(i)?0:i}return 0},t.removeDuplicates=function(e){return e.filter(function(e,t,i){return t===i.findIndex(function(t){return l.deepEqual(t,e)})})},t.safeUserCallback=function(e,t){if(!l.isFunction(e))return null;try{return e()}catch(e){return t&&t.warn("Exception in userCallback",e),null}};var r=i(56481),o=i(70962),a=i(19274),s=i(26225),u=i(57387),c=i(89927),l=function(){function e(){}return e.deepEqual=function(t,i){if(t===i)return!0;if(!t||"object"!=typeof t||!i||"object"!=typeof i||Object.keys(t).length!==Object.keys(i).length)return!1;for(var n in t)if(!i.hasOwnProperty(n)||!e.deepEqual(t[n],i[n]))return!1;return!0},e.deepCopy=function(t,i){var n=void 0!==window.ArrayBuffer;for(var r in i)i.hasOwnProperty(r)&&(n&&i[r]instanceof ArrayBuffer?t[r]=i[r].slice(0,i[r].byteLength):"object"==typeof i[r]&&null!==i[r]?(t.hasOwnProperty(r)||(Array.isArray(i[r])?t[r]=[]:t[r]={}),e.deepCopy(t[r],i[r])):t[r]=i[r])},e.deepCopyMulti=function(e){for(var t=this,i=[],n=1;n<arguments.length;n++)i[n-1]=arguments[n];return i.forEach(function(i){return t.deepCopy(e,i)}),e},e.isFunction=function(e){return!!e&&"[object Function]"===({}).toString.call(e)},e.extractBitrateFromString=function(e,t){return isNaN(t)?(t=t.toLowerCase().trim().replace(/,/g,".")).indexOf("mbps")>-1?1e6*t.split("m")[0]:t.indexOf("kbps")>-1?1e3*t.split("k")[0]:t.indexOf("bps")>-1?+t.split("b")[0]:"max"===e?1/0:0:t===1/0?t:+t},e.splitPlayerAndStreamingTechnology=function(e){if(e&&"string"==typeof e){for(var t=e.split("."),i=0,n=0;n<e.length;n++)""===t[n]&&(t[n]=null,i++);return i===e.length?null:{player:t[0],streaming:t[1]}}return null},e.createVRAudioElement=function(){var t=document.createElement("source");t.setAttribute("type","audio/mp3"),t.setAttribute("src","data:audio/mpeg;base64,/+MYxAAAAANIAUAAAASEEB/jwOFM/0MM/90b/+RhST//w4NFwOjf///PZu////9lns5GFDv//l9GlUIEEIAAAgIg8Ir/JGq3/+MYxDsLIj5QMYcoAP0dv9HIjUcH//yYSg+CIbkGP//8w0bLVjUP///3Z0x5QCAv/yLjwtGKTEFNRTMuOTeqqqqqqqqqqqqq/+MYxEkNmdJkUYc4AKqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq");var i={settings:o.DefaultSettings};for(e.vrAudioElement=e.vrAudioElement||new s.MediaElementWrapper(i,document.createElement("audio")),e.vrAudioElement.setAttribute("id","bitmovinplayer-audio"),e.vrAudioElement.addEventListener(a.MediaElementEvent.playing,function(){return e.vrAudioElement.bit_wasPlayCalled=!0}),e.vrAudioElement.setAttribute("crossorigin","anonymous"),e.vrAudioElement.hasAttribute("src")&&e.vrAudioElement.removeAttribute("src");e.vrAudioElement.firstChild;)e.vrAudioElement.removeChild(e.vrAudioElement.firstChild);e.vrAudioElement.load()},e.getVRAudioElement=function(){return e.vrAudioElement||e.createVRAudioElement(),e.vrAudioElement},e.removeVRAudioElement=function(){if(e.vrAudioElement){var t=e.vrAudioElement.getWrappedElement();e.vrAudioElement=(0,r.dispose)(e.vrAudioElement),t.parentNode&&t.parentNode.removeChild(t)}},e.isFullscreen=function(){return document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.webkitCurrentFullScreenElement},e.generateUniqueId=function(){return Date.now().toString(16)+Math.floor(1048576*(1+Math.random())).toString(16).substring(1)},e.getUtcDate=function(t){var i=null;return"string"!=typeof t&&isNaN(t)||(i=new Date("string"==typeof t?e.timeZoneRegex.test(t)?t:t+"Z":t)),i},e.delay=function(e,t){return new Promise(function(i){setTimeout(function(){"function"==typeof t?i(t()):i()},e)})},e.timeInSeconds=function(e){return(0,c.toSeconds)(e.getTime())},e.toHash=function(e){var t=new WeakMap,i=JSON.stringify(e,function e(i,n){if(null==n)return n;if("function"==typeof n)return n.toString().replace(/\n|\s\s/g,"");if(n instanceof ArrayBuffer)return String.fromCharCode.apply(null,new Uint8Array(n.slice(0,20)));if(n instanceof Uint8Array)return String.fromCharCode.apply(null,n.slice(0,20));if("object"==typeof n&&!Array.isArray(n)){if(t.has(n)){var r=JSON.stringify(Object.keys(n),e);return"[Object ".concat(Math.abs((0,u.calcHash)(r)).toString(16),"]")}t.set(n,!0)}return n});return(0x10000000|Math.abs((0,u.calcHash)(i))).toString(16)},e.roundValue=function(e,t){var i=Math.pow(10,t);return Math.round(e*i)/i},e.arrayMove=function(e,t,i){var r=n([],e,!0),o=r[t];return r.splice(t,1),r.splice(i,0,o),r},e.vrAudioElement=null,e.timeZoneRegex=/(?:Z|[+-](?:2[0-3]|[01][0-9]):[0-5][0-9])$/,e}();t.Util=l},57387:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.calcHash=function(e){return(n.ModuleManager.has(r.ModuleName.Subtitles)?n.ModuleManager.get(r.ModuleName.Subtitles).hashCode:o)(e)};var n=i(88052),r=i(62756);function o(e){var t=0;if(0===e.length)return t;for(var i=0;i<e.length;i++)t=(t<<5)-t+e.charCodeAt(i)|0;return t}},78877:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getBufferEndSafetyMargin=function(e){var t=(0,r.getCapabilities)(),i=t.isChromium,u=t.isChrome,c=t.isVizio,l=t.isWebOS,d=t.isPlayStation4;if(l||c||(0,o.isTizen2018)()||(0,o.isTizen2019)()||d)return s;var h=(null==e?void 0:e.usedKeySystem.kind)===n.KeySystemKind.PLAYREADY;return i&&!u&&h?s:a};var n=i(33468),r=i(21513),o=i(15487),a=.25,s=1.25},4081:function(e,t){"use strict";var i;function n(e){return"Math"in e&&e.Math===Math}Object.defineProperty(t,"__esModule",{value:!0}),t.default=null!=(i="object"==typeof window&&window&&n(window)?window:void 0)?i:"object"==typeof self&&self&&n(self)?self:void 0},2992:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.rewriteMp4BoxType=function(e,t){t.split("").slice(0,n).forEach(function(t,n){return e._raw.setUint8(i+n,t.charCodeAt(0))})};var i=4,n=4},60877:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.shouldResetCurrentTimeAfterBufferUnderrun=function(){var e=(0,r.getCapabilities)();return e.isWebOS?e[n.CapabilityKey.webOSChromiumVersion]===o.WEBOS_2020_CHROMIUM_VERSION:e.isChromium};var n=i(7387),r=i(21513),o=i(15487)},17891:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createResizeObserver=function(e,t){var i=["style","width","height","class"],n=function(){return t(e.clientWidth,e.clientHeight)},r=new MutationObserver(n);return{observe:function(){r.observe(e,{attributes:!0,attributeFilter:i,childList:!1,subtree:!0}),window.addEventListener("resize",n)},dispose:function(){r.disconnect(),window.removeEventListener("resize",n)}}}},2079:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ViewModeHandler=void 0;var n=i(56481),r=i(3714),o=i(44468),a=i(23690),s=i(87827),u=i(93204),c=i(19274),l=i(17891),d=["","webkit","moz","ms","o"],h=["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","webkitbeginfullscreen","webkitendfullscreen"];function p(e,t){return d.some(function(i){var n=t;return""!==i&&(n="".concat(i).concat(t.substring(0,1).toUpperCase()).concat(t.substring(1))),"function"==typeof e[n]&&(e[n](),!0)})}function f(){var e,t,i;return null!=(i=null!=(t=null!=(e=document.fullscreenElement)?e:document.mozFullScreenElement)?t:document.webkitFullscreenElement)?i:null}t.ViewModeHandler=function(){function e(e,t,i,n){var s=this;this.currentPlayer=e,this.container=t,this.eventDispatcher=i,this.shouldForceLegacyFullscreen=n,this.VY=!1,this.width=0,this.height=0,this.XY=function(e){return s.currentPlayer.context.store.dispatch(e)},this.YY=function(e,t){e===s.width&&t===s.height||(s.width=e,s.height=t,s.eventDispatcher(r.PlayerEvent.PlayerResized,{width:"".concat(s.width,"px"),height:"".concat(s.height,"px")}),s.currentPlayer.adController&&"function"==typeof s.currentPlayer.adController.onPlayerResize&&s.currentPlayer.adController.onPlayerResize(s.width,s.height))},this.ZY=function(e,t){var i={from:t.viewMode,to:e.viewMode,legacy:s.shouldForceLegacyFullscreen()};s.eY()&&(e.viewMode===o.ViewMode.Fullscreen?(s.currentPlayer.bitdashPlayer.onFullscreenEnter(i),s.width=0,s.height=0):t.viewMode===o.ViewMode.Fullscreen&&s.currentPlayer.bitdashPlayer.onFullscreenExit()),s.eventDispatcher(r.PlayerEvent.ViewModeChanged,i)},this.jY=function(){s.XY((0,a.setPlayerViewMode)(o.ViewMode.PictureInPicture))},this.kY=function(){s.XY((0,a.setPlayerViewMode)(o.ViewMode.Inline))},this.qY=function(e){if(s.isFullscreen()&&e.type===s.WY)return s.WY=void 0,void s.pY();(s.VY||s.lY())&&!s.WY&&(s.WY=e.type,s.oY())},this.TY=(0,l.createResizeObserver)(this.currentPlayer.container,this.YY),this.TY.observe(),this.aY(),this.cY(),this.dY()}return e.prototype.aY=function(){this.UY=(0,u.subscribe)(this.currentPlayer.context.store)(function(e){return(0,s.getPlayerState)(e)},this.ZY,function(e,t){return e.viewMode!==t.viewMode})},e.prototype.bY=function(){return(0,s.getPlayerState)(this.currentPlayer.context.store.getState()).viewMode},e.prototype.cY=function(){var e=this;h.forEach(function(t){return document.addEventListener(t,e.qY)}),this.lY()&&(this.XY((0,a.setPlayerViewMode)(o.ViewMode.Fullscreen)),this.nY(!0))},e.prototype.dY=function(){this.currentPlayer.videoElement&&(this.currentPlayer.videoElement.addEventListener(c.MediaElementEvent.enterpictureinpicture,this.jY),this.currentPlayer.videoElement.addEventListener(c.MediaElementEvent.leavepictureinpicture,this.kY))},e.prototype.eY=function(){return!!this.currentPlayer&&!!this.currentPlayer.bitdashPlayer},e.prototype.fY=function(){return this.eY()&&!!this.currentPlayer.videoElement&&this.currentPlayer.videoElement.isPictureInPictureAvailable()},e.prototype.gY=function(){return this.currentPlayer.videoElement.isPictureInPicture()},e.prototype.isViewModeAvailable=function(e){return e===o.ViewMode.PictureInPicture?this.fY():[o.ViewMode.Fullscreen,o.ViewMode.Inline].includes(e)},e.prototype.hY=function(){this.eY()&&this.currentPlayer.videoElement&&(this.currentPlayer.videoElement.exitPictureInPicture(),this.XY((0,a.setPlayerViewMode)(o.ViewMode.Inline)))},e.prototype.iY=function(){var e;null==(e=this.currentPlayer.videoElement)||e.enterPictureInPicture(),this.XY((0,a.setPlayerViewMode)(o.ViewMode.PictureInPicture))},e.prototype.lY=function(){var e=f();return e&&this.currentPlayer.videoElement.getWrappedElement()===e},e.prototype.mY=function(){return this.shouldForceLegacyFullscreen()?"data-legacy-fullscreen":"data-fullscreen"},e.prototype.nY=function(e){var t=this.mY();this.container.setAttribute(t,String(e))},e.prototype.oY=function(){this.nY(!0),this.VY=!1,this.XY((0,a.setPlayerViewMode)(o.ViewMode.Fullscreen))},e.prototype.pY=function(){this.nY(!1),this.VY=!1,this.bY()===o.ViewMode.Fullscreen&&this.XY((0,a.setPlayerViewMode)(o.ViewMode.Inline))},e.prototype.isFullscreen=function(){return this.bY()===o.ViewMode.Fullscreen||"true"===this.container.getAttribute(this.mY())},e.prototype.rY=function(e){if(void 0===e&&(e=this.container),f())this.currentPlayer.context.logger.debug("cannot enter fullscreen, another element is already fullscreen");else if(this.shouldForceLegacyFullscreen())this.oY();else{var t=p(e,"requestFullscreen");t?this.VY=!0:!t&&this.currentPlayer.videoElement.webkitEnterFullScreen&&(this.VY=!0,this.currentPlayer.videoElement.webkitEnterFullScreen())}},e.prototype.sY=function(){if(this.shouldForceLegacyFullscreen())this.pY();else{var e=p(window.document,"exitFullscreen");e?this.VY=!0:!e&&this.currentPlayer.videoElement.webkitExitFullscreen&&(this.VY=!0,this.currentPlayer.videoElement.webkitExitFullscreen())}},e.prototype.tY=function(){var e=this.bY();this.isFullscreen()?this.sY():(e===o.ViewMode.PictureInPicture||this.gY())&&this.hY()},e.prototype.uY=function(e,t){e!==o.ViewMode.Fullscreen?e===o.ViewMode.PictureInPicture&&this.iY():this.rY(t.fullscreenElement)},e.prototype.setViewMode=function(e,t){void 0===t&&(t={}),e!==this.bY()&&(this.tY(),this.isViewModeAvailable(e)&&this.uY(e,t))},e.prototype.dispose=function(){var e,t,i=this;this.TY=(0,n.dispose)(this.TY),h.forEach(function(e){return document.removeEventListener(e,i.qY)}),null==(e=this.currentPlayer.videoElement)||e.removeEventListener(c.MediaElementEvent.enterpictureinpicture,this.jY),null==(t=this.currentPlayer.videoElement)||t.removeEventListener(c.MediaElementEvent.leavepictureinpicture,this.kY),this.UY()},e}()},46057:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.yieldToMain=function(){return new Promise(function(e){window.setTimeout(e)})}},19274:function(e,t){"use strict";var i;Object.defineProperty(t,"__esModule",{value:!0}),t.MediaElementEvent=void 0,function(e){e.abort="abort",e.canplay="canplay",e.canplaythrough="canplaythrough",e.durationchange="durationchange",e.emptied="emptied",e.encrypted="encrypted",e.ended="ended",e.error="error",e.loadeddata="loadeddata",e.loadedmetadata="loadedmetadata",e.loadstart="loadstart",e.pause="pause",e.play="play",e.playing="playing",e.progress="progress",e.ratechange="ratechange",e.seeked="seeked",e.seeking="seeking",e.stalled="stalled",e.suspend="suspend",e.timeupdate="timeupdate",e.volumechange="volumechange",e.waiting="waiting",e.waitingforkey="waitingforkey",e.currenttimenotadvancing="currenttimenotadvancing",e.primestart="primestart",e.msneedkey="msneedkey",e.enterpictureinpicture="enterpictureinpicture",e.leavepictureinpicture="leavepictureinpicture",e.webkitkeymessage="webkitkeymessage",e.webkitneedkey="webkitneedkey",e.webkitkeyerror="webkitkeyerror",e.webkitkeyadded="webkitkeyadded",e.webkitplaybacktargetavailabilitychanged="webkitplaybacktargetavailabilitychanged",e.webkitpresentationmodechanged="webkitpresentationmodechanged",e.webkitcurrentplaybacktargetiswirelesschanged="webkitcurrentplaybacktargetiswirelesschanged"}(i||(t.MediaElementEvent=i={}))},96556:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MediaElementEventHandler=void 0;var n=i(13531),r=i(4081),o=i(88844),a=i(70850),s=i(19274);t.MediaElementEventHandler=function(){function e(t,i){var n=this;this.handleVideoElementErrorEvent=function(t){if(n.v9(t.type,t),!n.shouldSuppressEvent(t)){if(n.o9.error){t.errorObject={code:n.o9.error.code};var i=e.getMediaErrorName(n.o9.error.code);i&&(t.errorObject.mediaError=i),"msExtendedCode"in n.o9.error&&n.o9.error.msExtendedCode&&(t.errorObject.systemCode=n.o9.error.msExtendedCode.toString(16)),n.o9.error.message&&(t.errorObject.message=n.o9.error.message),t.errorMessage=Object.keys(t.errorObject).map(function(e){return e+": "+t.errorObject[e]}).join(", ")}else t.errorMessage="Video element triggered an Error, but has no error object.";n.callAllHandlers(t)}},this.handleVideoElementEvent=function(e){n.v9(e.type),n.shouldSuppressEvent(e)||n.callAllHandlers(e)},this.n9=t,this.o9=i,this.p9={},this.q9={},this.r9=[],this.s9=!1,this.t9=!1,this.attachVideoEventHandlers()}return Object.defineProperty(e.prototype,"isAd",{get:function(){return this.s9},set:function(e){this.s9=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isPriming",{get:function(){return this.t9},set:function(e){this.t9=e},enumerable:!1,configurable:!0}),e.prototype.suppressEvent=function(e,t,i){var n=this;if(void 0===t&&(t=1e8),this.q9[e]=this.q9[e]||0,this.q9[e]+=t,i&&i>0){var r=window.setTimeout(function(){n.q9[e]=Math.max(n.q9[e]-t,0),n.r9.splice(n.r9.indexOf(r),1)},i);this.r9.push(r)}},e.prototype.clearEventSuppression=function(e){this.q9[e]&&(this.q9[e]=0)},e.prototype.u9=function(){var e=this;Object.keys(this.q9).forEach(function(t){return e.clearEventSuppression(t)}),this.r9.forEach(function(e){return(0,o.clearTimeoutIfDefined)(e)})},e.prototype.triggerEvent=function(e,t){void 0===t&&(t={type:e}),e===s.MediaElementEvent.error?this.handleVideoElementErrorEvent(t):this.handleVideoElementEvent(t)},e.prototype.attachVideoEventHandlers=function(){var e=this;Object.keys(s.MediaElementEvent).forEach(function(t){t===s.MediaElementEvent.error?e.o9.addEventListener(s.MediaElementEvent.error,e.handleVideoElementErrorEvent):e.o9.addEventListener(t,e.handleVideoElementEvent)})},e.prototype.removeVideoEventHandlers=function(){var e=this;Object.keys(s.MediaElementEvent).forEach(function(t){e.o9.removeEventListener(t,e.handleVideoElementEvent)}),this.o9.removeEventListener(s.MediaElementEvent.error,this.handleVideoElementErrorEvent)},e.prototype.shouldSuppressEvent=function(t){return!!this.isAd||!(!this.isPriming||!e.PRIME_RELATED_EVENTS.includes(t.type))||this.q9[t.type]>0&&(this.q9[t.type]--,!0)},e.prototype.v9=function(e,t){var i,r;if(null==(r=null==(i=this.n9)?void 0:i.logger)?void 0:r.isLevelEnabled(n.LogLevel.DEBUG)){var o=this.n9.logger,a="[MediaElementEvent] ".concat(e);this.n9.settings.ENABLE_MEDIA_ELEMENT_EVENT_LOGS?t?o.debug(a,t):o.debug(a):o.isLevelEnabled(n.LogLevel.INSANE)&&(t?o.insane(a,t):o.insane(a))}},e.prototype.callAllHandlers=function(e){var t=this;this.p9[e.type]&&this.p9[e.type].forEach(function(i){t.w9(i,e)})},e.prototype.w9=function(e,t){var i=e.eventModification?e.eventModification(t):t;e.eventHandler.handleEvent?e.eventHandler.handleEvent(i):"function"==typeof e.eventHandler?e.eventHandler(i):this.n9.logger.debug("Encountered unknown event handler for "+t.type+": ",e.eventHandler)},e.prototype.addEventListener=function(e,t,i){this.p9[e]=this.p9[e]||[],this.p9[e].push(new u(t,i))},e.prototype.hasEventHandler=function(e,t){return!!this.p9[e]&&null!=this.p9[e].find(function(e){return e.eventHandler===t})},e.prototype.removeEventListener=function(e,t){this.p9[e]&&(this.p9[e]=this.p9[e].filter(function(e){return e.eventHandler!==t}))},e.prototype.reset=function(){this.u9()},e.prototype.dispose=function(){this.reset(),this.removeVideoEventHandlers(),this.p9=null},e.getMediaErrorName=function(e){if("MediaError"in r.default){for(var t in MediaError)if(t.indexOf("MEDIA_ERR_")>-1&&MediaError[t]===e)return t}return null},e.PRIME_RELATED_EVENTS=[s.MediaElementEvent.play,s.MediaElementEvent.playing,s.MediaElementEvent.pause,s.MediaElementEvent.timeupdate],e}();var u=function(e,t){this.eventHandler=e,t&&a.Util.isFunction(t)&&(this.eventModification=t)}},26225:function(e,t,i){"use strict";
1Object.defineProperty(t,"__esModule",{value:!0}),t.MediaElementWrapper=void 0;var n=i(56481),r=i(51072),o=i(88844),a=i(19274),s=i(96556),u=i(97583);t.MediaElementWrapper=function(){function e(e,t){this.element=t,this.context=e,this.mediaElementEventHandler=new s.MediaElementEventHandler(e,t),this.nativeMediaEventListener=new u.NativeMediaEventListener(e,this),this.drmHandler=null}return Object.defineProperty(e.prototype,"audioTracks",{get:function(){return this.element.audioTracks},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"buffered",{get:function(){return this.element.buffered},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"currentSrc",{get:function(){return this.element.currentSrc},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"duration",{get:function(){return this.element.duration},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ended",{get:function(){return this.element.ended},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"error",{get:function(){return this.element.error},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"mediaKeys",{get:function(){return this.element.mediaKeys},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"msKeys",{get:function(){return this.element.msKeys},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"paused",{get:function(){return this.element.paused},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"networkState",{get:function(){return this.element.networkState},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"played",{get:function(){return this.element.played},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"readyState",{get:function(){return this.element.readyState},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"seekable",{get:function(){return this.element.seekable},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"seeking",{get:function(){return this.element.seeking},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"style",{get:function(){return this.element&&this.element.style},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"textTracks",{get:function(){return this.element.textTracks},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"videoTracks",{get:function(){return this.element.videoTracks},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"firstChild",{get:function(){return this.element.firstChild},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"autoplay",{get:function(){return this.element.autoplay},set:function(e){this.element.autoplay=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"controls",{get:function(){return this.element.controls},set:function(e){this.element.controls=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"crossOrigin",{get:function(){return this.element.crossOrigin},set:function(e){this.element.crossOrigin=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"currentTime",{get:function(){var e,t;return null!=(t=null==(e=this.element)?void 0:e.currentTime)?t:0},set:function(e){this.element.currentTime=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"innerHTML",{get:function(){return this.element.innerHTML},set:function(e){this.element.innerHTML=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"muted",{get:function(){return this.context.settings.ENABLE_MUTED_BACKGROUND_PLAYBACK?this.element&&0===this.element.volume:this.element&&this.element.muted},set:function(e){if(this.context.settings.ENABLE_MUTED_BACKGROUND_PLAYBACK){if(e){var t=this.volume;this.volume=0,this.nativeMediaEventListener.lastKnownState.volume=t}else this.volume=this.nativeMediaEventListener.lastKnownState.volume;this.nativeMediaEventListener.lastKnownState.muted=e,this.element.muted=!1}else this.nativeMediaEventListener.lastKnownState.muted=e,this.element.muted=e}
1,enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"preload",{get:function(){return this.element.preload},set:function(e){this.element.preload=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"src",{get:function(){return this.element.src},set:function(e){this.nativeMediaEventListener.reset(),this.element.src=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"srcObject",{get:function(){return this.element.srcObject},set:function(e){this.nativeMediaEventListener.reset(),this.element.srcObject=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"playbackRate",{get:function(){return this.element.playbackRate},set:function(e){try{this.element.playbackRate=e}catch(t){this.context.logger.log("Browser rejected to set playback rate to "+e)}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"volume",{get:function(){var e;return!0===(null==(e=this.nativeMediaEventListener)?void 0:e.lastKnownState.muted)&&this.context.settings.ENABLE_MUTED_BACKGROUND_PLAYBACK?this.nativeMediaEventListener.lastKnownState.volume:this.element.volume},set:function(e){this.nativeMediaEventListener.lastKnownState.volume=e,this.element.volume=e},enumerable:!1,configurable:!0}),e.prototype.addTextTrack=function(e,t,i){return this.element.addTextTrack(e,t,i)},e.prototype.canPlayType=function(e,t){return this.element.canPlayType(e,t)},e.prototype.load=function(){this.element.load()},e.prototype.pause=function(){this.element&&this.element.pause()},e.prototype.play=function(){return this.internalPlay()},e.prototype.internalPlay=function(){return this.element.play()||r.PlayPromise.new(this.context,this,this.drmHandler)},e.prototype.prime=function(){var e=this,t=function(t){e.mediaElementEventHandler&&(e.mediaElementEventHandler.isPriming=t)};return t(!0),this.mediaElementEventHandler.triggerEvent(a.MediaElementEvent.primestart),this.internalPrime().then(function(){t(!1)})},e.prototype.internalPrime=function(){this.internalPlay().catch(function(){}),this.pause();var e=this.getWrappedElement();return new Promise(function(t){var i=window.setTimeout(function(){e.removeEventListener(a.MediaElementEvent.pause,n),t()},100),n=function(){(0,o.clearTimeoutIfDefined)(i),e.removeEventListener(a.MediaElementEvent.pause,n),t()};e.addEventListener(a.MediaElementEvent.pause,n)})},e.prototype.setMediaKeys=function(e){return this.element&&this.element.setMediaKeys(e)||Promise.resolve()},e.prototype.msSetMediaKeys=function(e){return this.element&&this.element.msSetMediaKeys(e)},e.prototype.msSetMediaProtectionManager=function(e){this.element.msSetMediaProtectionManager(e)},e.prototype.getAttribute=function(e){return this.element.getAttribute(e)},e.prototype.setAttribute=function(e,t){this.element.setAttribute(e,t)},e.prototype.removeAttribute=function(e){this.element.removeAttribute(e)},e.prototype.hasAttribute=function(e){return this.element.hasAttribute(e)},e.prototype.appendChild=function(e){this.element.appendChild(e)},e.prototype.removeChild=function(e){return this.element.removeChild(e)},e.prototype.getElementsByTagName=function(e){return this.element.getElementsByTagName(e)},e.prototype.addEventListener=function(e,t,i){this.mediaElementEventHandler.addEventListener(e,t,i)},e.prototype.removeEventListener=function(e,t){this.mediaElementEventHandler&&this.mediaElementEventHandler.removeEventListener(e,t)},Object.defineProperty(e.prototype,"eventHandler",{get:function(){return this.mediaElementEventHandler},enumerable:!1,configurable:!0}),e.prototype.getWrappedElement=function(){return this.element},e.prototype.dispose=function(){this.mediaElementEventHandler=(0,n.dispose)(this.mediaElementEventHandler),this.nativeMediaEventListener=(0,n.dispose)(this.nativeMediaEventListener),this.drmHandler=null,this.element=null,this.context.logger&&this.context.logger.debug("Disposed wrapped element")},e}()},97583:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NativeMediaEventListener=void 0;var n=i(80813),r=i(3714),o=i(94685),a=i(19274);t.NativeMediaEventListener=function(){function e(e,t){var i,o,a,s,u,c,l=this;this.context=e,this.z9=function(){var e=l.x9.volume,t=l.x9.muted;l.lastKnownState.muted!==t&&(t?l.C9(r.PlayerEvent.Muted,{issuer:"media-element"}):l.C9(r.PlayerEvent.Unmuted,{issuer:"media-element"}),l.lastKnownState.muted=t),l.lastKnownState.volume!==e&&(l.C9(r.PlayerEvent.VolumeChanged,{issuer:"media-element",targetVolume:100*e,sourceVolume:100*l.lastKnownState.volume}),l.lastKnownState.volume=e)},this.A9=function(){var e=l.x9.playbackRate;l.context.serviceManager.maybeCall(n.ServiceName.PlayerStateService,function(t){t.playbackSpeed!==e&&t.setPlaybackSpeed(e)})},this.B9=function(){l.lastKnownState.canPlay||(l.lastKnownState.canPlay=!0,l.C9(r.PlayerEvent.Ready))},this.x9=t,this.lastKnownState={muted:null!=(a=null==(o=null==(i=e.config)?void 0:i.playback)?void 0:o.muted)?a:t.muted,volume:null!=(c=null==(u=null==(s=e.config)?void 0:s.playback)?void 0:u.volume)?c:t.volume,playbackRate:t.playbackRate,canPlay:!1}
1,this.y9()}return e.prototype.y9=function(){this.x9.addEventListener(a.MediaElementEvent.volumechange,this.z9),this.x9.addEventListener(a.MediaElementEvent.canplay,this.B9),this.x9.addEventListener(a.MediaElementEvent.ratechange,this.A9)},e.prototype.C9=function(e,t){(0,o.isContextAvailable)(this.context)&&this.context.eventHandler&&this.context.eventHandler.dispatchEvent(e,t)},e.prototype.D9=function(){this.x9.removeEventListener(a.MediaElementEvent.volumechange,this.z9),this.x9.removeEventListener(a.MediaElementEvent.canplay,this.B9),this.x9.removeEventListener(a.MediaElementEvent.ratechange,this.A9)},e.prototype.reset=function(){this.lastKnownState.canPlay=!1},e.prototype.dispose=function(){this.D9()},e}()},79186:function(e,t,i){"use strict";var n,r=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(t,i)};return function(t,i){if("function"!=typeof i&&null!==i)throw TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.VideoElementWrapper=void 0;var o,a=i(44468),s=i(26225);!function(e){e.Inline="inline",e.PictureInPicture="picture-in-picture",e.Fullscreen="fullscreen"}(o||(o={}));var u=((n={})[o.Inline]=a.ViewMode.Inline,n[o.PictureInPicture]=a.ViewMode.PictureInPicture,n[o.Fullscreen]=a.ViewMode.Fullscreen,n);t.VideoElementWrapper=function(e){function t(t,i){return e.call(this,t,i)||this}return r(t,e),Object.defineProperty(t.prototype,"droppedVideoFrames",{get:function(){var e,t;return null!=(t=null!=(e=this.element.droppedVideoFrames)?e:this.element.webkitDroppedFrameCount)?t:0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"videoWidth",{get:function(){return this.element&&this.element.videoWidth||0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"videoHeight",{get:function(){return this.element&&this.element.videoHeight||0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"webkitKeys",{get:function(){return this.element.webkitKeys},enumerable:!1,configurable:!0}),t.prototype.webkitGenerateKeyRequest=function(e,t){this.element.webkitGenerateKeyRequest(e,t)},Object.defineProperty(t.prototype,"width",{get:function(){return this.element.width},set:function(e){this.element.width=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this.element.height},set:function(e){this.element.height=e},enumerable:!1,configurable:!0}),t.prototype.webkitAddKey=function(e,t,i,n){this.element.webkitAddKey(e,t,i,n)},t.prototype.webkitEnterFullScreen=function(){this.element.webkitEnterFullScreen()},t.prototype.webkitExitFullscreen=function(){this.element.webkitExitFullscreen()},t.prototype.webkitShowPlaybackTargetPicker=function(){return this.element.webkitShowPlaybackTargetPicker()},Object.defineProperty(t.prototype,"webkitDisplayingFullscreen",{get:function(){var e;return null!=(e=this.element.webkitDisplayingFullscreen)&&e},enumerable:!1,configurable:!0}),t.prototype.getViewModeFromPresentationMode=function(){return u[this.element.webkitPresentationMode]||(document.pictureInPictureElement===this.element?a.ViewMode.PictureInPicture:a.ViewMode.Inline)},t.prototype.getVideoPlaybackQuality=function(){var e,t;return null==(t=(e=this.element).getVideoPlaybackQuality)?void 0:t.call(e)},Object.defineProperty(t.prototype,"disableRemotePlayback",{set:function(e){this.element.disableRemotePlayback=e},enumerable:!1,configurable:!0}),t.prototype.isPictureInPictureAvailable=function(){if(!this.element)return!1;var e="function"==typeof this.element.webkitSupportsPresentationMode&&this.element.webkitSupportsPresentationMode(o.PictureInPicture)&&"function"==typeof this.element.webkitSetPresentationMode&&!/iP(hone|od)/i.test(navigator.userAgent),t="function"==typeof this.element.requestPictureInPicture&&"function"==typeof document.exitPictureInPicture&&document.pictureInPictureEnabled;return e||t},t.prototype.isPictureInPicture=function(){return!!this.isPictureInPictureAvailable()&&(this.element.webkitPresentationMode===o.PictureInPicture||document.pictureInPictureElement===this.element)},t.prototype.isAirplayActive=function(){return!!this.element.webkitCurrentPlaybackTargetIsWireless},t.prototype.enterPictureInPicture=function(){var e=this;this.isPictureInPictureAvailable()&&(this.element.webkitSetPresentationMode?this.element.webkitSetPresentationMode(o.PictureInPicture):this.element.requestPictureInPicture&&this.element.requestPictureInPicture().catch(function(t){e.context.logger.debug("Request for PiP failed",t)}))},t.prototype.exitPictureInPicture=function(){var e=this;
vendor: 13,856 bytes, line 1
1this.isPictureInPicture()&&(this.element.webkitPresentationMode===o.PictureInPicture?this.element.webkitSetPresentationMode(o.Inline):document.pictureInPictureElement===this.element&&document.exitPictureInPicture().catch(function(t){e.context.logger.debug("Exiting of PiP failed",t)}))},t.prototype.webkitSetMediaKeys=function(e){this.element.webkitSetMediaKeys(e)},t}(s.MediaElementWrapper)},85902:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VideoElementWrapperFactory=void 0;var n=i(88052),r=i(62756),o=i(7387),a=i(21513),s=i(15487),u=i(96907),c=i(76253),l=i(79186);function d(e,t){return{casUse:e,getConstructor:t}}var h=[d(function(){return(0,s.isSafari15orIOS15)()},function(){return u.Safari15VideoElementWrapper}),d(function(){return(0,a.getCapabilities)()[o.CapabilityKey.isSafari]},function(){return c.SafariVideoElementWrapper}),d(function(){return(0,a.getCapabilities)()[o.CapabilityKey.isWpeWebKit]&&n.ModuleManager.has(r.ModuleName.Wpe)},function(){return n.ModuleManager.get(r.ModuleName.Wpe).WpeVideoElementWrapper}),d(function(){return(0,a.getCapabilities)()[o.CapabilityKey.isTizen]&&n.ModuleManager.has(r.ModuleName.Tizen)},function(){return n.ModuleManager.get(r.ModuleName.Tizen).TizenVideoElementWrapper}),d(function(){return(0,a.getCapabilities)()[o.CapabilityKey.isWebOS]&&n.ModuleManager.has(r.ModuleName.Webos)},function(){return n.ModuleManager.get(r.ModuleName.Webos).WebosVideoElementWrapper}),d(function(){return(0,a.getCapabilities)()[o.CapabilityKey.isVidaa]&&n.ModuleManager.has(r.ModuleName.Vidaa)},function(){return n.ModuleManager.get(r.ModuleName.Vidaa).VidaaVideoElementWrapper}),d(function(){return(0,a.getCapabilities)()[o.CapabilityKey.isPlayStation5]&&n.ModuleManager.has(r.ModuleName.PlayStation5)},function(){return n.ModuleManager.get(r.ModuleName.PlayStation5).PlayStation5VideoElementWrapper}),d(function(){return(0,a.getCapabilities)()[o.CapabilityKey.isPlayStation4]&&n.ModuleManager.has(r.ModuleName.PlayStation4)},function(){return n.ModuleManager.get(r.ModuleName.PlayStation4).PlayStation4VideoElementWrapper})];t.VideoElementWrapperFactory=function(){function e(){}return e.createWrappedVideoElement=function(e,t){var i,n;if(t&&t.nodeName&&"video"===t.nodeName.toLowerCase())return new(null!=(n=null==(i=h.find(function(e){return(0,e.casUse)()}))?void 0:i.getConstructor())?n:l.VideoElementWrapper)(e,t)},e}()},50239:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CurrentTimeCache=void 0;var n=i(19274);t.CurrentTimeCache=function(){function e(e){var t=e.eventHandler,i=e.getVideoElementCurrentTime,r=this;this.Igb=function(){r.Fgb=r.Ggb(),r.Hgb.addEventListener(n.MediaElementEvent.timeupdate,r.reset),r.Hgb.addEventListener(n.MediaElementEvent.playing,r.reset)},this.reset=function(){r.Hgb.removeEventListener(n.MediaElementEvent.timeupdate,r.reset),r.Hgb.removeEventListener(n.MediaElementEvent.playing,r.reset),r.Jgb()},this.Hgb=t,this.Ggb=i,this.Hgb.addEventListener(n.MediaElementEvent.primestart,this.Igb)}return e.prototype.Jgb=function(){this.Fgb=void 0},e.prototype.get=function(){return void 0!==this.Fgb?this.Fgb:this.Ggb()},e.prototype.dispose=function(){this.Hgb.removeEventListener(n.MediaElementEvent.primestart,this.Igb),this.Hgb.removeEventListener(n.MediaElementEvent.timeupdate,this.reset),this.Hgb.removeEventListener(n.MediaElementEvent.playing,this.reset),this.Jgb()},e}()},96907:function(e,t,i){"use strict";var n=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(t,i)};return function(t,i){if("function"!=typeof i&&null!==i)throw TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.Safari15VideoElementWrapper=void 0;var r=i(19274);function o(e){return 0!==e.buffered.length&&e.getWrappedElement().currentTime>=e.buffered.start(0)}t.Safari15VideoElementWrapper=function(e){function t(t,i){var n=e.call(this,t,i)||this;return n.cfb=-1,n.dfb=!1,n.efb=!1,n.ffb=function(){n.cfb=n.getWrappedElement().currentTime,n.paused||(n.dfb=!0,n.mediaElementEventHandler.suppressEvent(r.MediaElementEvent.seeked),n.mediaElementEventHandler.suppressEvent(r.MediaElementEvent.timeupdate))},n.gfb=function(){n.efb=!0},n.hfb=function(){o(n)&&(n.cfb=n.getWrappedElement().currentTime,n.dfb&&n.efb&&!n.getWrappedElement().seeking&&(n.dfb=!1,n.efb=!1,n.mediaElementEventHandler.clearEventSuppression(r.MediaElementEvent.timeupdate),n.mediaElementEventHandler.clearEventSuppression(r.MediaElementEvent.seeked),n.mediaElementEventHandler.triggerEvent(r.MediaElementEvent.seeked),n.mediaElementEventHandler.triggerEvent(r.MediaElementEvent.timeupdate)))},n.getWrappedElement().addEventListener(r.MediaElementEvent.seeking,n.ffb),n.getWrappedElement().addEventListener(r.MediaElementEvent.seeked,n.gfb),n.getWrappedElement().addEventListener(r.MediaElementEvent.timeupdate,n.hfb),n}return n(t,e),Object.defineProperty(t.prototype,"currentTime",{get:function(){var e=this.currentTimeCache.get();return -1===this.cfb&&0!==e&&(this.cfb=e),o(this)?e:Math.max(this.cfb,0)},set:function(e){this.getWrappedElement().currentTime=e},enumerable:!1,configurable:!0}),t.prototype.load=function(){this.ifb(),e.prototype.load.call(this)},t.prototype.play=function(){return this.ended&&(this.cfb=-1),e.prototype.play.call(this)},t.prototype.dispose=function(){this.getWrappedElement().removeEventListener(r.MediaElementEvent.seeking,this.ffb),this.getWrappedElement().removeEventListener(r.MediaElementEvent.seeked,this.gfb),this.getWrappedElement().removeEventListener(r.MediaElementEvent.timeupdate,this.hfb),e.prototype.dispose.call(this)},t.prototype.ifb=function(){this.cfb=-1,this.dfb=!1,this.efb=!1},t}(i(76253).SafariVideoElementWrapper)},55471:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SafariCurrentTimeObserver=void 0;var n=i(20213),r=i(15487),o=i(88844),a=i(19274);t.SafariCurrentTimeObserver=function(){function e(e,t){var i=this;this.context=e,this.videoElement=t,this.Lgb=!1,this.Ngb=Date.now(),this.Ogb=0,this.Pgb=function(){!i.context.isDisposed&&i.videoElement&&(i.videoElement.paused||i.videoElement.seeking||Date.now()-i.Ngb>1e3&&(i.Ogb++,i.Ugb()))},this.Qgb=function(){i.Lgb=!1,(0,o.clearIntervalIfDefined)(i.Kgb),i.Kgb=void 0},this.Rgb=function(){i.Lgb=!0,(0,o.clearIntervalIfDefined)(i.Kgb),i.Kgb=window.setInterval(i.Pgb,250)},this.Sgb=function(){i.Ogb++},this.Tgb=function(){if(i.Ngb=Date.now(),!i.videoElement.paused&&!i.videoElement.seeking){i.Lgb=!0;var e=i.videoElement.currentTime;e===i.Mgb?i.Ogb++:(i.Ogb=0,i.Mgb=e)}},this.videoElement.addEventListener(a.MediaElementEvent.pause,this.Qgb),this.videoElement.addEventListener(a.MediaElementEvent.playing,this.Rgb),this.videoElement.addEventListener(a.MediaElementEvent.timeupdate,this.Tgb),this.videoElement.addEventListener(a.MediaElementEvent.waiting,this.Sgb),this.Kgb=window.setInterval(this.Pgb,250)}return e.prototype.dispose=function(){(0,o.clearIntervalIfDefined)(this.Kgb),this.videoElement.removeEventListener(a.MediaElementEvent.pause,this.Qgb),this.videoElement.removeEventListener(a.MediaElementEvent.playing,this.Rgb),this.videoElement.removeEventListener(a.MediaElementEvent.timeupdate,this.Tgb),this.videoElement.removeEventListener(a.MediaElementEvent.waiting,this.Sgb)},e.prototype.reset=function(){this.Ogb=0,this.Lgb=!1,this.Ngb=Date.now()},e.prototype.Ugb=function(){this.Ogb<=12||(this.Ogb=0,this.Lgb?(this.context.logger.debug("[Safari] currentTime is not progressing from ".concat(this.videoElement.currentTime)),this.Vgb()):this.context.logger.debug("[Safari] Playback is possibly stuck, but no `playing` event was emitted"))},e.prototype.Vgb=function(){if(this.context.internalPlayer.getStreamType()!==n.StreamType.Progressive||function(){var e;return!!((0,r.isSafari)()&&(null!=(e=(0,r.getSafariVersion)().major)?e:0)>=r.SAFARI_15_MAJOR_VERSION)||!!((0,r.isIOS)()&&(0,r.getIOSVersion)()>=r.IOS_15)}()){var e=this.videoElement.currentTime,t=this.videoElement.duration;t>0&&e>=t?(this.context.logger.debug("[Safari] Playback has stalled at the end of the video. Trying to recover..."),this.videoElement.dispatchEvent(new Event(a.MediaElementEvent.ended))):(this.context.logger.debug("[Safari] Video element is stuck. Trying to recover..."),this.Wgb(e+.01))}},e.prototype.Wgb=function(e){try{this.videoElement.currentTime=e}catch(t){this.context.logger.debug("[Safari] Failed to set currentTime on video element to ".concat(e),t)}},e}()},76253:function(e,t,i){"use strict";var n=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(t,i)};return function(t,i){if("function"!=typeof i&&null!==i)throw TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.SafariVideoElementWrapper=void 0;var r=i(51072),o=i(19274),a=i(79186),s=i(50239),u=i(55471);t.SafariVideoElementWrapper=function(e){function t(t,i){var n=e.call(this,t,i)||this;return n.kfb=!1,n.onPlaying=function(){var e;n.paused||n.kfb||(n.kfb=!0,null==(e=n.mediaElementEventHandler)||e.suppressEvent(o.MediaElementEvent.playing))},n.maybeTriggerDelayedPlaying=function(){var e,t;n.kfb&&!n.paused&&!n.seeking&&function(e){return e.readyState>=HTMLMediaElement.HAVE_FUTURE_DATA}(n)&&(n.kfb=!1,null==(e=n.mediaElementEventHandler)||e.clearEventSuppression(o.MediaElementEvent.playing),null==(t=n.mediaElementEventHandler)||t.triggerEvent(o.MediaElementEvent.playing))},n.jfb=new u.SafariCurrentTimeObserver(t,i),n.currentTimeCache=new s.CurrentTimeCache({eventHandler:n.eventHandler,getVideoElementCurrentTime:function(){return n.getWrappedElement().currentTime}}),n.lfb(),n}return n(t,e),t.prototype.lfb=function(){this.getWrappedElement().addEventListener(o.MediaElementEvent.timeupdate,this.maybeTriggerDelayedPlaying),this.getWrappedElement().addEventListener(o.MediaElementEvent.playing,this.onPlaying)},t.prototype.mfb=function(){this.getWrappedElement().removeEventListener(o.MediaElementEvent.timeupdate,this.maybeTriggerDelayedPlaying),this.getWrappedElement().removeEventListener(o.MediaElementEvent.playing,this.onPlaying)},Object.defineProperty(t.prototype,"currentTime",{get:function(){return this.currentTimeCache.get()},set:function(e){this.getWrappedElement().currentTime=e},enumerable:!1,configurable:!0}),t.prototype.dispose=function(){this.jfb.dispose(),this.currentTimeCache.dispose(),this.mfb(),e.prototype.dispose.call(this)},t.prototype.load=function(){this.mediaElementEventHandler.suppressEvent(o.MediaElementEvent.playing),this.kfb=!1,this.jfb.reset(),this.currentTimeCache.reset(),e.prototype.load.call(this)},t.prototype.prime=function(){return e.prototype.prime.call(this).then(function(){return new Promise(function(e){return setTimeout(e,0)})})},t.prototype.play=function(){var e=this;this.mediaElementEventHandler.suppressEvent(o.MediaElementEvent.playing),this.mediaElementEventHandler.suppressEvent(o.MediaElementEvent.timeupdate,1);var t=this.element.play();return null==t&&(t=r.PlayPromise.new(this.context,this,this.drmHandler)),t.then(function(){return e.maybeTriggerDelayedPlaying()})},t}(a.VideoElementWrapper)}},__webpack_module_cache__={};function __nested_webpack_require_348914__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var i=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e].call(i.exports,i,i.exports,__nested_webpack_require_348914__),i.exports}__nested_webpack_require_348914__.m=__webpack_modules__,e=[],__nested_webpack_require_348914__.O=function(t,i,n,r){if(!i){var o=1/0;for(c=0;c<e.length;c++){i=e[c][0],n=e[c][1],r=e[c][2];for(var a=!0,s=0;s<i.length;s++)(!1&r||o>=r)&&Object.keys(__nested_webpack_require_348914__.O).every(function(t){return __nested_webpack_require_348914__.O[t](i[s])})?i.splice(s--,1):(a=!1,r<o&&(o=r));if(a){e.splice(c--,1);var u=n();void 0!==u&&(t=u)}}return t}r=r||0;for(var c=e.length;c>0&&e[c-1][2]>r;c--)e[c]=e[c-1];e[c]=[i,n,r]},__nested_webpack_require_348914__.d=function(e,t){for(var i in t)__nested_webpack_require_348914__.o(t,i)&&!__nested_webpack_require_348914__.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},__nested_webpack_require_348914__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}}(),__nested_webpack_require_348914__.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},__nested_webpack_require_348914__.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},__nested_webpack_require_348914__.p="",function(){var e={114:0};__nested_webpack_require_348914__.O.j=function(t){return 0===e[t]};var t=function(t,i){var n,r,o=i[0],a=i[1],s=i[2],u=0;if(o.some(function(t){return 0!==e[t]})){for(n in a)__nested_webpack_require_348914__.o(a,n)&&(__nested_webpack_require_348914__.m[n]=a[n]);if(s)var c=s(__nested_webpack_require_348914__)}try{s&&!c&&(c=s(__nested_webpack_require_348914__))}catch(e){}for(t&&t(i);u<o.length;u++)r=o[u],__nested_webpack_require_348914__.o(e,r)&&e[r]&&e[r][0](),e[r]=0;return __nested_webpack_require_348914__.O(c)},i=self.webpackChunkbitmovin_player=self.webpackChunkbitmovin_player||[];
1i.forEach(t.bind(null,0)),i.push=t.bind(null,i.push.bind(i))}();var __nested_webpack_exports__=__nested_webpack_require_348914__(86969);return __nested_webpack_require_348914__.O(__nested_webpack_exports__)}()},module.exports=t()},550:function(e){self,e.exports=(self.webpackChunkbitmovin_player=self.webpackChunkbitmovin_player||[]).push([[584],{1356:function(e,t,i){e.exports=function(){return i(90040)('!function(){var t={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 r=Object(this),n=r.length>>>0;if(0===n)return!1;var i=0|e,o=Math.max(i>=0?i:n-Math.abs(i),0);function s(t,e){return t===e||"number"==typeof t&&"number"==typeof e&&isNaN(t)&&isNaN(e)}for(;o<n;){if(s(r[o],t))return!0;o++}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 r=this.length;return null!=e&&(r=Math.min(e,this.length)),this.substring(r-t.length,r)===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 r=e>0?0|e:0;return this.substring(r,r+t.length)===t}}}}()},599:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MessageHandler=void 0;var r=function(){return function(t,e){this.runsInWebWorker=t,this.postMessageFunction=e}}();e.MessageHandler=r},741:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WebWorkerContext=void 0;var n=r(41),i=function(){return function(t){var e=this;this.b="undefined"==typeof window,this.onmessage=null,this.c=function(t,r){e.b?postMessage(t,r):"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.a[t.data.action]&&e.a[t.data.action](t.data)},this.b&&(0,n.installWorkerPolyfills)(),this.a=new t(this.b,this.c)}}();e.WebWorkerContext=i},507:function(t,e,r){"use strict";var n=this&&this.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(e,"__esModule",{value:!0}),e.CryptoWorkerMessageHandler=void 0,e.getContext=function(){return a||c()};var i=r(81),o=r(599),s=r(741),a=null;function c(){var t=new s.WebWorkerContext(u);return onmessage=t.onMessageCallback,t}var u=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.decrypt=function(t){if(i[t.method]&&t.payload){var e,r=t.method,n=t.payload;e="AES_CTR"===r?i.AES_CTR.decrypt(n.data,n.key,n.iv):i.AES_CBC.decrypt(n.data,n.key,n.padding,n.iv),this.postMessageFunction({action:"decrypted",data:e.buffer},[e.buffer])}},e}(o.MessageHandler);e.CryptoWorkerMessageHandler=u,"undefined"==typeof window&&(a=c())},41:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.installWorkerPolyfills=function(){Array.prototype.includes||n.ArrayIncludesPolyfill.polyfill(),String.prototype.includes||o.StringIncludesPolyfill.polyfill(),String.prototype.startsWith||s.StringStartsWithPolyfill.polyfill(),String.prototype.endsWith||i.StringEndsWithPolyfill.polyfill()};var n=r(499),i=r(878),o=r(205),s=r(829)},81:function(t){!function(){t.exports=function(t){function e(){var t=Error.apply(this,arguments);this.message=t.message,this.stack=t.stack}function r(){var t=Error.apply(this,arguments);this.message=t.message,this.stack=t.stack}function n(){var t=Error.apply(this,arguments);this.message=t.message,this.stack=t.stack}function i(t,e){e=!!e;for(var r=t.length,n=new Uint8Array(e?4*r:r),i=0,o=0;i<r;i++){var s=t.charCodeAt(i);if(e&&55296<=s&&s<=56319){if(++i>=r)throw new Error("Malformed string, low surrogate expected at position "+i);s=(55296^s)<<10|65536|56320^t.charCodeAt(i)}else if(!e&&s>>>8)throw new Error("Wide characters are not allowed.");!e||s<=127?n[o++]=s:s<=2047?(n[o++]=192|s>>6,n[o++]=128|63&s):s<=65535?(n[o++]=224|s>>12,n[o++]=128|s>>6&63,n[o++]=128|63&s):(n[o++]=240|s>>18,n[o++]=128|s>>12&63,n[o++]=128|s>>6&63,n[o++]=128|63&s)}return n.subarray(0,o)}function o(t,e){e=!!e;for(var r=t.length,n=new Array(r),i=0,o=0;i<r;i++){var s=t[i];if(!e||s<128)n[o++]=s;else if(s>=192&&s<224&&i+1<r)n[o++]=(31&s)<<6|63&t[++i];else if(s>=224&&s<240&&i+2<r)n[o++]=(15&s)<<12|(63&t[++i])<<6|63&t[++i];else{if(!(s>=240&&s<248&&i+3<r))throw new Error("Malformed UTF8 character at byte offset "+i);var a=(7&s)<<18|(63&t[++i])<<12|(63&t[++i])<<6|63&t[++i];a<=65535?n[o++]=a:(a^=65536,n[o++]=55296|a>>10,n[o++]=56320|1023&a)}}var c="",u=16384;for(i=0;i<o;i+=u)c+=String.fromCharCode.apply(String,n.slice(i,i+u<=o?i+u:o));return c}function s(t){for(var e="",r=0;r<t.length;r++){var n=(255&t[r]).toString(16);n.length<2&&(e+="0"),e+=n}return e}function a(t){return btoa(o(t))}function c(t){return"string"==typeof t}function u(t){return t instanceof ArrayBuffer}function f(t){return t instanceof Uint8Array}function l(t,e){var r=e.heap,n=r?r.byteLength:e.heapSize||65536;if(4095&n||n<=0)throw new Error("heap size must be a positive integer and a multiple of 4096");return r||new t(new ArrayBuffer(n))}function h(t,e,r,n,i){var o=t.length-e,s=o<i?o:i;return t.set(r.subarray(n,n+s),e),s}e.prototype=Object.create(Error.prototype,{name:{value:"IllegalStateError"}}),r.prototype=Object.create(Error.prototype,{name:{value:"IllegalArgumentError"}}),n.prototype=Object.create(Error.prototype,{name:{value:"SecurityError"}}),t.string_to_bytes=i,t.hex_to_bytes=function(t){var e=t.length;1&e&&(t="0"+t,e++);
vendor: 5,785 bytes, line 1
1for(var r=new Uint8Array(e>>1),n=0;n<e;n+=2)r[n>>1]=parseInt(t.substr(n,2),16);return r},t.base64_to_bytes=function(t){return i(atob(t))},t.bytes_to_string=o,t.bytes_to_hex=s,t.bytes_to_base64=a;var p=function(){"use strict";var t,e,r,n,i,o,s=!1;function a(r,n){var i=t[(e[r]+e[n])%255];return 0!==r&&0!==n||(i=0),i}var c=function(c,u){!function(){function c(r){var n,i,o;for(i=o=function(r){var n=t[255-e[r]];return 0===r&&(n=0),n}(r),n=0;n<4;n++)o^=i=255&(i<<1|i>>>7);return 99^o}s||function(){t=[],e=[];var r,n,i=1;for(r=0;r<255;r++)t[r]=i,n=128&i,i<<=1,i&=255,128===n&&(i^=27),i^=t[r],e[t[r]]=r;t[255]=t[0],e[0]=0,s=!0}(),r=[],n=[],i=[[],[],[],[]],o=[[],[],[],[]];for(var u=0;u<256;u++){var f=c(u);r[u]=f,n[f]=u,i[0][u]=a(2,f)<<24|f<<16|f<<8|a(3,f),o[0][f]=a(14,u)<<24|a(9,u)<<16|a(13,u)<<8|a(11,u);for(var l=1;l<4;l++)i[l][u]=i[l-1][u]>>>8|i[l-1][u]<<24,o[l][f]=o[l-1][f]>>>8|o[l-1][f]<<24}}();var f=new Uint32Array(u);f.set(r,512),f.set(n,768);for(var l=0;l<4;l++)f.set(i[l],4096+1024*l>>2),f.set(o[l],8192+1024*l>>2);var h=function(t,e){"use asm";var r=0,n=0,i=0,o=0,s=0,a=0,c=0,u=0,f=0,l=0,h=0,p=0,y=0,d=0,x=0,v=0,w=0,b=0,g=0,_=0,E=0;var m=new Uint32Array(e),A=new Uint8Array(e);function S(t,e,s,a,c,u,f,l){t=t|0;e=e|0;s=s|0;a=a|0;c=c|0;u=u|0;f=f|0;l=l|0;var h=0,p=0,y=0,d=0,x=0,v=0,w=0,b=0;h=s|0x400,p=s|0x800,y=s|0xc00;c=c^m[(t|0)>>2],u=u^m[(t|4)>>2],f=f^m[(t|8)>>2],l=l^m[(t|12)>>2];for(b=16;(b|0)<=a<<4;b=b+16|0){d=m[(s|c>>22&1020)>>2]^m[(h|u>>14&1020)>>2]^m[(p|f>>6&1020)>>2]^m[(y|l<<2&1020)>>2]^m[(t|b|0)>>2],x=m[(s|u>>22&1020)>>2]^m[(h|f>>14&1020)>>2]^m[(p|l>>6&1020)>>2]^m[(y|c<<2&1020)>>2]^m[(t|b|4)>>2],v=m[(s|f>>22&1020)>>2]^m[(h|l>>14&1020)>>2]^m[(p|c>>6&1020)>>2]^m[(y|u<<2&1020)>>2]^m[(t|b|8)>>2],w=m[(s|l>>22&1020)>>2]^m[(h|c>>14&1020)>>2]^m[(p|u>>6&1020)>>2]^m[(y|f<<2&1020)>>2]^m[(t|b|12)>>2];c=d,u=x,f=v,l=w}r=m[(e|c>>22&1020)>>2]<<24^m[(e|u>>14&1020)>>2]<<16^m[(e|f>>6&1020)>>2]<<8^m[(e|l<<2&1020)>>2]^m[(t|b|0)>>2],n=m[(e|u>>22&1020)>>2]<<24^m[(e|f>>14&1020)>>2]<<16^m[(e|l>>6&1020)>>2]<<8^m[(e|c<<2&1020)>>2]^m[(t|b|4)>>2],i=m[(e|f>>22&1020)>>2]<<24^m[(e|l>>14&1020)>>2]<<16^m[(e|c>>6&1020)>>2]<<8^m[(e|u<<2&1020)>>2]^m[(t|b|8)>>2],o=m[(e|l>>22&1020)>>2]<<24^m[(e|c>>14&1020)>>2]<<16^m[(e|u>>6&1020)>>2]<<8^m[(e|f<<2&1020)>>2]^m[(t|b|12)>>2]}function C(t,e,r,n){t=t|0;e=e|0;r=r|0;n=n|0;S(0x0000,0x0800,0x1000,E,t,e,r,n)}function k(t,e,r,i){t=t|0;e=e|0;r=r|0;i=i|0;var s=0;S(0x0400,0x0c00,0x2000,E,t,i,r,e);s=n,n=o,o=s}function U(t,e,f,l){t=t|0;e=e|0;f=f|0;l=l|0;S(0x0000,0x0800,0x1000,E,s^t,a^e,c^f,u^l);s=r,a=n,c=i,u=o}function P(t,e,f,l){t=t|0;e=e|0;f=f|0;l=l|0;var h=0;S(0x0400,0x0c00,0x2000,E,t,l,f,e);h=n,n=o,o=h;r=r^s,n=n^a,i=i^c,o=o^u;s=t,a=e,c=f,u=l}function O(t,e,f,l){t=t|0;e=e|0;f=f|0;l=l|0;S(0x0000,0x0800,0x1000,E,s,a,c,u);s=r=r^t,a=n=n^e,c=i=i^f,u=o=o^l}function M(t,e,f,l){t=t|0;e=e|0;f=f|0;l=l|0;S(0x0000,0x0800,0x1000,E,s,a,c,u);r=r^t,n=n^e,i=i^f,o=o^l;s=t,a=e,c=f,u=l}function T(t,e,f,l){t=t|0;e=e|0;f=f|0;l=l|0;S(0x0000,0x0800,0x1000,E,s,a,c,u);s=r,a=n,c=i,u=o;r=r^t,n=n^e,i=i^f,o=o^l}function B(t,e,s,a){t=t|0;e=e|0;s=s|0;a=a|0;S(0x0000,0x0800,0x1000,E,f,l,h,p);p=~v&p|v&p+1,h=~x&h|x&h+((p|0)==0),l=~d&l|d&l+((h|0)==0),f=~y&f|y&f+((l|0)==0);r=r^t,n=n^e,i=i^s,o=o^a}function W(t,e,r,n){t=t|0;e=e|0;r=r|0;n=n|0;var i=0,o=0,f=0,l=0,h=0,p=0,y=0,d=0,x=0,v=0;t=t^s,e=e^a,r=r^c,n=n^u;i=w|0,o=b|0,f=g|0,l=_|0;for(;(x|0)<128;x=x+1|0){if(i>>>31){h=h^t,p=p^e,y=y^r,d=d^n}i=i<<1|o>>>31,o=o<<1|f>>>31,f=f<<1|l>>>31,l=l<<1;v=n&1;n=n>>>1|r<<31,r=r>>>1|e<<31,e=e>>>1|t<<31,t=t>>>1;if(v)t=t^0xe1000000}s=h,a=p,c=y,u=d}function I(t){t=t|0;E=t}function H(t,e,s,a){t=t|0;e=e|0;s=s|0;a=a|0;r=t,n=e,i=s,o=a}function j(t,e,r,n){t=t|0;e=e|0;r=r|0;n=n|0;s=t,a=e,c=r,u=n}function D(t,e,r,n){t=t|0;e=e|0;r=r|0;n=n|0;f=t,l=e,h=r,p=n}function z(t,e,r,n){t=t|0;e=e|0;r=r|0;n=n|0;y=t,d=e,x=r,v=n}function Z(t,e,r,n){t=t|0;e=e|0;r=r|0;n=n|0;p=~v&p|v&n,h=~x&h|x&r,l=~d&l|d&e,f=~y&f|y&t}function q(t){t=t|0;if(t&15)return-1;A[t|0]=r>>>24,A[t|1]=r>>>16&255,A[t|2]=r>>>8&255,A[t|3]=r&255,A[t|4]=n>>>24,A[t|5]=n>>>16&255,A[t|6]=n>>>8&255,A[t|7]=n&255,A[t|8]=i>>>24,A[t|9]=i>>>16&255,A[t|10]=i>>>8&255,A[t|11]=i&255,A[t|12]=o>>>24,A[t|13]=o>>>16&255,A[t|14]=o>>>8&255,A[t|15]=o&255;return 16}function L(t){t=t|0;if(t&15)return-1;A[t|0]=s>>>24,A[t|1]=s>>>16&255,A[t|2]=s>>>8&255,A[t|3]=s&255,A[t|4]=a>>>24,A[t|5]=a>>>16&255,A[t|6]=a>>>8&255,A[t|7]=a&255,A[t|8]=c>>>24,A[t|9]=c>>>16&255,A[t|10]=c>>>8&255,A[t|11]=c&255,A[t|12]=u>>>24,A[t|13]=u>>>16&255,A[t|14]=u>>>8&255,A[t|15]=u&255;return 16}function R(){C(0,0,0,0);w=r,b=n,g=i,_=o}function F(t,e,s){t=t|0;e=e|0;s=s|0;var a=0;if(e&15)return-1;while((s|0)>=16){N[t&7](A[e|0]<<24|A[e|1]<<16|A[e|2]<<8|A[e|3],A[e|4]<<24|A[e|5]<<16|A[e|6]<<8|A[e|7],A[e|8]<<24|A[e|9]<<16|A[e|10]<<8|A[e|11],A[e|12]<<24|A[e|13]<<16|A[e|14]<<8|A[e|15]);A[e|0]=r>>>24,A[e|1]=r>>>16&255,A[e|2]=r>>>8&255,A[e|3]=r&255,A[e|4]=n>>>24,A[e|5]=n>>>16&255,A[e|6]=n>>>8&255,A[e|7]=n&255,A[e|8]=i>>>24,A[e|9]=i>>>16&255,A[e|10]=i>>>8&255,A[e|11]=i&255,A[e|12]=o>>>24,A[e|13]=o>>>16&255,A[e|14]=o>>>8&255,A[e|15]=o&255;a=a+16|0,e=e+16|0,s=s-16|0}return a|0}function K(t,e,r){t=t|0;e=e|0;r=r|0;var n=0;if(e&15)return-1;while((r|0)>=16){V[t&1](A[e|0]<<24|A[e|1]<<16|A[e|2]<<8|A[e|3],A[e|4]<<24|A[e|5]<<16|A[e|6]<<8|A[e|7],A[e|8]<<24|A[e|9]<<16|A[e|10]<<8|A[e|11],A[e|12]<<24|A[e|13]<<16|A[e|14]<<8|A[e|15]);n=n+16|0,e=e+16|0,r=r-16|0}return n|0}var N=[C,k,U,P,O,M,T,B];var V=[U,W];return{set_rounds:I,set_state:H,set_iv:j,set_nonce:D,set_mask:z,set_counter:Z,get_state:q,get_iv:L,gcm_init:R,cipher:F,mac:K}}(0,u);return h.set_key=function(t,e,n,i,s,a,c,u,l){var p=f.subarray(0,60),y=f.subarray(256,316);p.set([e,n,i,s,a,c,u,l]);for(var d=t,x=1;d<4*t+28;d++){var v=p[d-1];(d%t==0||8===t&&d%t==4)&&(v=r[v>>>24]<<24^r[v>>>16&255]<<16^r[v>>>8&255]<<8^r[255&v]),d%t
vendor: 25,795 bytes, line 1
1==0&&(v=v<<8^v>>>24^x<<24,x=x<<1^(128&x?27:0)),p[d]=p[d-t]^v}for(var w=0;w<d;w+=4)for(var b=0;b<4;b++)v=p[d-(4+w)+(4-b)%4],y[w+b]=w<4||w>=d-4?v:o[0][r[v>>>24]]^o[1][r[v>>>16&255]]^o[2][r[v>>>8&255]]^o[3][r[255&v]];h.set_rounds(t+5)},h};return c.ENC={ECB:0,CBC:2,CFB:4,OFB:6,CTR:7},c.DEC={ECB:1,CBC:3,CFB:5,OFB:6,CTR:7},c.MAC={CBC:0,GCM:1},c.HEAP_DATA=16384,c}();function y(t){t=t||{},this.heap=l(Uint8Array,t).subarray(p.HEAP_DATA),this.asm=t.asm||p(null,this.heap.buffer),this.mode=null,this.key=null,this.reset(t)}function d(t){if(void 0!==t){if(u(t)||f(t))t=new Uint8Array(t);else{if(!c(t))throw new TypeError("unexpected key type");t=i(t)}var e=t.length;if(16!==e&&24!==e&&32!==e)throw new r("illegal key size");var n=new DataView(t.buffer,t.byteOffset,t.byteLength);this.asm.set_key(e>>2,n.getUint32(0),n.getUint32(4),n.getUint32(8),n.getUint32(12),e>16?n.getUint32(16):0,e>16?n.getUint32(20):0,e>24?n.getUint32(24):0,e>24?n.getUint32(28):0),this.key=t}else if(!this.key)throw new Error("key is required")}function x(t){if(void 0!==t){if(u(t)||f(t))t=new Uint8Array(t);else{if(!c(t))throw new TypeError("unexpected iv type");t=i(t)}if(16!==t.length)throw new r("illegal iv size");var e=new DataView(t.buffer,t.byteOffset,t.byteLength);this.iv=t,this.asm.set_iv(e.getUint32(0),e.getUint32(4),e.getUint32(8),e.getUint32(12))}else this.iv=null,this.asm.set_iv(0,0,0,0)}function v(t){this.padding=void 0===t||!!t}function w(t){return t=t||{},this.result=null,this.pos=0,this.len=0,d.call(this,t.key),this.hasOwnProperty("iv")&&x.call(this,t.iv),this.hasOwnProperty("padding")&&v.call(this,t.padding),this}function b(t){if(c(t)&&(t=i(t)),u(t)&&(t=new Uint8Array(t)),!f(t))throw new TypeError("data isn\'t of expected type");for(var e=this.asm,r=this.heap,n=p.ENC[this.mode],o=p.HEAP_DATA,s=this.pos,a=this.len,l=0,y=t.length||0,d=0,x=0,v=new Uint8Array(a+y&-16);y>0;)a+=x=h(r,s+a,t,l,y),l+=x,y-=x,(x=e.cipher(n,o+s,a))&&v.set(r.subarray(s,s+x),d),d+=x,x<a?(s+=x,a-=x):(s=0,a=0);return this.result=v,this.pos=s,this.len=a,this}function g(t){var e=null,n=0;void 0!==t&&(n=(e=b.call(this,t).result).length);var i=this.asm,o=this.heap,s=p.ENC[this.mode],a=p.HEAP_DATA,c=this.pos,u=this.len,f=16-u%16,l=u;if(this.hasOwnProperty("padding")){if(this.padding){for(var h=0;h<f;++h)o[c+u+h]=f;l=u+=f}else if(u%16)throw new r("data length must be a multiple of the block size")}else u+=f;var y=new Uint8Array(n+l);return n&&y.set(e),u&&i.cipher(s,a+c,u),l&&y.set(o.subarray(c,c+l),n),this.result=y,this.pos=0,this.len=0,this}function _(t){if(c(t)&&(t=i(t)),u(t)&&(t=new Uint8Array(t)),!f(t))throw new TypeError("data isn\'t of expected type");var e=this.asm,r=this.heap,n=p.DEC[this.mode],o=p.HEAP_DATA,s=this.pos,a=this.len,l=0,y=t.length||0,d=0,x=a+y&-16,v=0,w=0;this.hasOwnProperty("padding")&&this.padding&&(x-=v=a+y-x||16);for(var b=new Uint8Array(x);y>0;)a+=w=h(r,s+a,t,l,y),l+=w,y-=w,(w=e.cipher(n,o+s,a-(y?0:v)))&&b.set(r.subarray(s,s+w),d),d+=w,w<a?(s+=w,a-=w):(s=0,a=0);return this.result=b,this.pos=s,this.len=a,this}function E(t){var e=null,i=0;void 0!==t&&(i=(e=_.call(this,t).result).length);var o=this.asm,s=this.heap,a=p.DEC[this.mode],c=p.HEAP_DATA,u=this.pos,f=this.len,l=f;if(f>0){if(f%16){if(this.hasOwnProperty("padding"))throw new r("data length must be a multiple of the block size");f+=16-f%16}if(o.cipher(a,c+u,f),this.hasOwnProperty("padding")&&this.padding){var h=s[u+l-1];if(h<1||h>16||h>l)throw new n("bad padding");for(var y=0,d=h;d>1;d--)y|=h^s[u+l-d];if(y)throw new n("bad padding");l-=h}}var x=new Uint8Array(i+l);return i>0&&x.set(e),l>0&&x.set(s.subarray(u,u+l),i),this.result=x,this.pos=0,this.len=0,this}function m(t){this.padding=!0,this.iv=null,y.call(this,t),this.mode="CBC"}var A=m.prototype;function S(t){m.call(this,t)}A.BLOCK_SIZE=16,A.reset=w,A.encrypt=g,A.decrypt=E;var C=S.prototype;function k(t){m.call(this,t)}C.BLOCK_SIZE=16,C.reset=w,C.process=b,C.finish=g;var U=k.prototype;function P(t){this.nonce=null,this.counter=0,this.counterSize=0,y.call(this,t),this.mode="CTR"}function O(t){P.call(this,t)}function M(t,e,n){if(void 0!==n){if(n<8||n>48)throw new r("illegal counter size");this.counterSize=n;var o=Math.pow(2,n)-1;this.asm.set_mask(0,0,o/4294967296|0,0|o)}else this.counterSize=n=48,this.asm.set_mask(0,0,65535,4294967295);if(void 0===t)throw new Error("nonce is required");if(u(t)||f(t))t=new Uint8Array(t);else{if(!c(t))throw new TypeError("unexpected nonce type");t=i(t)}var s=t.length;if(!s||s>16)throw new r("illegal nonce size");this.nonce=t;var a=new DataView(new ArrayBuffer(16));if(new Uint8Array(a.buffer).set(t),this.asm.set_nonce(a.getUint32(0),a.getUint32(4),a.getUint32(8),a.getUint32(12)),void 0!==e){if(!function(t){return"number"==typeof t}(e))throw new TypeError("unexpected counter type");if(e<0||e>=Math.pow(2,n))throw new r("illegal counter value");this.counter=e,this.asm.set_counter(0,0,e/4294967296|0,0|e)}else this.counter=e=0}function T(t){return t=t||{},w.call(this,t),M.call(this,t.nonce,t.counter,t.counterSize),this}U.BLOCK_SIZE=16,U.reset=w,U.process=_,U.finish=E;var B=P.prototype;B.BLOCK_SIZE=16,B.reset=T,B.encrypt=g,B.decrypt=g;var W,I,H=O.prototype;function j(t,e,r){if(void 0===t)throw new SyntaxError("data required");if(void 0===e)throw new SyntaxError("key required");if(void 0===r)throw new SyntaxError("nonce required");return new P({heap:W,asm:I,key:e,nonce:r}).encrypt(t).result}function D(t){t=t||{},this.heap=l(Uint8Array,t),this.asm=t.asm||function(t,e){"use asm";var r=0,n=0,i=0,o=0,s=0,a=0,c=0,u=0,f=0,l=0,h=0,p=0,y=0,d=0,x=0,v=0,w=0,b=0,g=0,_=0,E=0,m=0,A=0,S=0,C=0,k=0,U=new Uint8Array(e);function P(t,e,f,l,h,p,y,d,x,v,w,b,g,_,E,m){t=t|0;e=e|0;f=f|0;l=l|0;h=h|0;p=p|0;y=y|0;d=d|0;x=x|0;v=v|0;w=w|0;b=b|0;g=g|0;_=_|0;E=E|0;m=m|0;var A=0,S=0,C=0,k=0,U=0,P=0,O=0,M=0,T=0;A=r;S=n;C=i;k=o;U=s;P=a;O=c;M=u;T=t+M+(U>>>6^U>>>11^U>>>25^U<<26^U<<21^U<<7)+(O^U&(P^O))+0x428a2f98|0;M=O;O=P;P=U;U=k+T|0;k=C;C=S;S=A;A=T+(S&C^k&(S^C))+(S>>>2^S>>>13^S>>>22^S<<30^S<<19^S<<10)|0;T=e+M+(U>>>6^U>>>11^U>>>25^U<<26^U<<21^U<<7)+(O^U&(P^O))+0x71374491|0;M=O;O=P;P=U;U=k+T|0;k=C;C=S;S=A;A=T+(S&C^k&(S^C))+(S>>>2^S>>>13^S>>>22^S<<30^S<<19^S<<10)|0;T=f+M+(U>>>6^U>>>11^U>>>25^U<<26^U<<21^U<<7)+(O^U&(P^O))+0xb5c0fbcf|0;M=O;O=P;P=U;U=k+T|0;k=C;C=S;S=A;A=T+(S&C^k&(S^C))+(S>>>2^S>>>13^S>>>22^S<<30^S<<19^S<<10)|0;T=l+M+(U>>>6^U>>>11^U>>>25^U<<26^U<<21^U<<7)+(O^U&(P^O))+0xe9b5dba5|0;M=O;O=P;P=U;U=k+T|0;k=C;C=S;S=A;A=T+(S&C^k&(S^C))+(S>>>2^S>>>13^S>>>22^S<<30^S<<19^S<<10)|0;T=h+M+(U>>>6^U>>>11^U>>>25^U<<26^U<<21^U<<7)+(O^U&(P^O))+0x3956c25b|0;M=O;O=P;P=U;U=k+T|0;k=C;C=S;S=A;A=T+(S&C^k&(S^C))+(S>>>2^S>>>13^S>>>22^S<<30^S<<19^S<<10)|0;T=p+M+(U>>>6^U>>>11^U>>>25^U<<26^U<<21^U<<7)+(O^U&(P^O))+0x59f111f1|0;M=O;O=P;P=U;U=k+T|0;k=C;C=S;S=A;A=T+(S&C^k&(S^C))+(S>>>2^S>>>13^S>>>22^S<<30^S<<19^S<<10)|0;T=y+M+(U>>>6^U>>>11^U>>>25^U<<26^U<<21^U<<7)+(O^U&(P^O))+0x923f82a4|0;M=O;O=P;P=U;U=k+T|0;k=C;C=S;S=A;A=T+(S&C^k&(S^C))+(S>>>2^S>>>13^S>>>22^S<<30^S<<19^S<<10)|0;T=d+M+(U>>>6^U>>>11^U>>>25^U<<26^U<<21^U<<7)+(O^U&(P^O))+0xab1c5ed5|0;M=O;O=P;P=U;U=k+T|0;k=C;C=S;S=A;A=T+(S&C^k&(S^C))+(S>>>2^S>>>13^S>>>22^S<<30^S<<19^S<<10)|0;T=x+M+(U>>>6^U>>>11^U>>>25^U<<26^U<<21^U<<7)+(O^U&(P^O))+0xd807aa98|0;M=O;O=P;P=U;U=k+T|0;k=C;C=S;S=A;A=T+(S&C^k&(S^C))+(S>>>2^S>>>13^S>>>22^S<<30^S<<19^S<<10)|0;T=v+M+(U>>>6^U>>>11^U>>>25^U<<26^U<<21^U<<7)+(O^U&(P^O))+0x12835b01|0;M=O;O=P;P=U;U=k+T|0;k=C;C=S;S=A;A=T+(S&C^k&(S^C))+(S>>>2^S>>>13^S>>>22^S<<30^S<<19^S<<10)|0;T=w+M+(U>>>6^U>>>11^U>>>25^U<<26^U<<21^U<<7)+(O^U&(P^O))+0x243185be|0;M=O;O=P;P=U;U=k+T|0;k=C;C=S;S=A;A=T+(S&C^k&(S^C))+(S>>>2^S>>>13^S>>>22^S<<30^S<<19^S<<10)|0;T=b+M+(U>>>6^U>>>11^U>>>25^U<<26^U<<21^U<<7)+(O^U&(P^O))+0x550c7dc3|0;M=O;O=P;P=U;U=k+T|0;k=C;C=S;S=A;A=T+(S&C^k&(S^C))+(S>>>2^S>>>13^S>>>22^S<<30^S<<19^S<<10)|0;T=g+M+(U>>>6^U>>>11^U>>>25^U<<26^U<<21^U<<7)+(O^U&(P^O))+0x72be5d74|0;M=O;O=P;P=U;U=k+T|0;k=C;C=S;S=A;A=T+(S&C^k&(S^C))+(S>>>2^S>>>13^S>>>22^S<<30^S<<19^S<<10)|0;T=_+M+(U>>>6^U>>>11^U>>>25^U<<26^U<<21^U<<7)+(O^U&(P^O))+0x80deb1fe|0;M=O;O=P;P=U;U=k+T|0;k=C;C=S;S=A;A=T+(S&C^k&(S^C))+(S>>>2^S>>>13^S>>>22^S<<30^S<<19^S<<10)|0;T=E+M+(U>>>6^U>>>11^U>>>25^U<<26^U<<21^U<<7)+(O^U&(P^O))+0x9bdc06a7|0;M=O;O=P;P=U;U=k+T|0;k=C;C=S;S=A;A=T+(S&C^k&(S^C))+(S>>>2^S>>>13^S>>>22^S<<30^S<<19^S<<10)|0;T=m+M+(U>>>6^U>>>11^U>>>25^U<<26^U<<21^U<<7)+(O^U&(P^O))+0xc19bf174|0;M=O;O=P;P=U;U=k+T|0;k=C;C=S;S=A;A=T+(S&C^k&(S^C))+(S>>>2^S>>>13^S>>>22^S<<30^S<<19^S<<10)|0;t=T=(e>>>7^e>>>18^e>>>3^e<<25^e<<14)+(E>>>17^E>>>19^E>>>10^E<<15^E<<13)+t+v|0;T=T+M+(U>>>6^U>>>11^U>>>25^U<<26^U<<21^U<<7)+(O^U&(P^O))+0xe49b69c1|0;M=O;O=P;P=U;U=k+T|0;k=C;C=S;S=A;A=T+(S&C^k&(S^C))+(S>>>2^S>>>13^S>>>22^S<<30^S<<19^S<<10)|0;e=T=(f>>>7^f>>>18^f>>>3^f<<25^f<<14)+(m>>>17^m>>>19^m>>>10^m<<15^m<<13)+e+w|0;T=T+M+(U>>>6^U>>>11^U>>>25^U<<26^U<<21^U<<7)+(O^U&(P^O))+0xefbe4786|0;M=O;O=P;P=U;U=k+T|0;k=C;C=S;S=A;A=T+(S&C^k&(S^C))+(S>>>2^S>>>13^S>>>22^S<<30^S<<19^S<<10)|0;f=T=(l>>>7^l>>>18^l>>>3^l<<25^l<<14)+(t>>>17^t>>>19^t>>>10^t<<15^t<<13)+f+b|0;T=T+M+(U>>>6^U>>>11^U>>>25^U<<26^U<<21^U<<7)+(O^U&(P^O))+0x0fc19dc6|0;M=O;O=P;P=U;U=k+T|0;k=C;C=S;S=A;A=T+(S&C^k&(S^C))+(S>>>2^S>>>13^S>>>22^S<<30^S<<19^S<<10)|0;l=T=(h>>>7^h>>>18^h>>>3^h<<25^h<<14)+(e>>>17^e>>>19^e>>>10^e<<15^e<<13)+l+g|0;T=T+M+(U>>>6^U>>>11^U>>>25^U<<26^U<<21^U<<7)+(O^U&(P^O))+0x240ca1cc|0;M=O;O=P;P=U;U=k+T|0;k=C;C=S;S=A;A=T+(S&C^k&(S^C))+(S>>>2^S>>>13^S>>>22^S<<30^S<<19^S<<10)|0;h=T=(p>>>7^p>>>18^p>>>3^p<<25^p<<14)+(f>>>17^f>>>19^f>>>10^f<<15^f<<13)+h+_|0;T=T+M+(U>>>6^U>>>11^U>>>25^U<<26^U<<21^U<<7)+(O^U&(P^O))+0x2de92c6f|0;M=O;O=P;P=U;U=k+T|0;k=C;C=S;S=A;A=T+(S&C^k&(S^C))+(S>>>2^S>>>13^S>>>22^S<<30^S<<19^S<<10)|0;p=T=(y>>>7^y>>>18^y>>>3^y<<25^y<<14)+(l>>>17^l>>>19^l>>>10^l<<15^l<<13)+p+E|0;T=T+M+(U>>>6^U>>>11^U>>>25^U<<26^U<<21^U<<7)+(O^U&(P^O))+0x4a7484aa|0;M=O;O=P;P=U;U=k+T|0;k=C;C=S;S=A;A=T+(S&C^k&(S^C))+(S>>>2^S>>>13^S>>>22^S<<30^S<<19^S<<10)|0;y=T=(d>>>7^d>>>18^d>>>3^d<<25^d<<14)+(h>>>17^h>>>19^h>>>10^h<<15^h<<13)+y+m|0;T=T+M+(U>>>6^U>>>11^U>>>25^U<<26^U<<21^U<<7)+(O^U&(P^O))+0x5cb0a9dc|0;M=O;O=P;P=U;U=k+T|0;k=C;C=S;S=A;A=T+(S&C^k&(S^C))+(S>>>2^S>>>13^S>>>22^S<<30^S<<19^S<<10)|0;d=T=(x>>>7^x>>>18^x>>>3^x<<25^x<<14)+(p>>>17^p>>>19^p>>>10^p<<15^p<<13)+d+t|0;T=T+M+(U>>>6^U>>>11^U>>>25^U<<26^U<<21^U<<7)+(O^U&(P^O))+0x76f988da|0;M=O;O=P;P=U;U=k+T|0;k=C;C=S;S=A;A=T+(S&C^k&(S^C))+(S>>>2^S>>>13^S>>>22^S<<30^S<<19^S<<10)|0;x=T=(v>>>7^v>>>18^v>>>3^v<<25^v<<14)+(y>>>17^y>>>19^y>>>10^y<<15^y<<13)+x+e|0;T=T+M+(U>>>6^U>>>11^U>>>25^U<<26^U<<21^U<<7)+(O^U&(P^O))+0x983e5152|0;M=O;O=P;P=U;U=k+T|0;k=C;C=S;S=A;A=T+(S&C^k&(S^C))+(S>>>2^S>>>13^S>>>22^S<<30^S<<19^S<<10)|0;v=T=(w>>>7^w>>>18^w>>>3^w<<25^w<<14)+(d>>>17^d>>>19^d>>>10^d<<15^d<<13)+v+f|0;T=T+M+(U>>>6^U>>>11^U>>>25^U<<26^U<<21^U<<7)+(O^U&(P^O))+0xa831c66d|0;M=O;O=P;P=U;U=k+T|0;k=C;C=S;S=A;A=T+(S&C^k&(S^C))+(S>>>2^S>>>13^S>>>22^S<<30^S<<19^S<<10)|0;w=T=(b>>>7^b>>>18^b>>>3^b<<25^b<<14)+(x>>>17^x>>>19^x>>>10^x<<15^x<<13)+w+l|0;T=T+M+(U>>>6^U>>>11^U>>>25^U<<26^U<<21^U<<7)+(O^U&(P^O))+0xb00327c8|0;M=O;O=P;P=U;U=k+T|0;k=C;C=S;S=A;A=T+(S&C^k&(S^C))+(S>>>2^S>>>13^S>>>22^S<<30^S<<19^S<<10)|0;b=T=(g>>>7^g>>>18^g>>>3^g<<25^g<<14)+(v>>>17^v>>>19^v>>>10^v<<15^v<<13)+b+h|0;T=T+M+(U>>>6^U>>>11^U>>>25^U<<26^U<<21^U<<7)+(O^U&(P^O))+0xbf597fc7|0;M=O;O=P;P=U;U=k+T|0;k=C;C=S;S=A;A=T+(S&C^k&(S^C))+(S>>>2^S>>>13^S>>>22^S<<30^S<<19^S<<10)|0;g=T=(_>>>7^_>>>18^_>>>3^_<<25^_<<14)+(w>>>17^w>>>19^w>>>10^w<<15^w<<13)+g+p|0;T=T+M+(U>>>6^U>>>11^U>>>25^U<<26^U<<21^U<<7)+(O^U&(P^O))+0xc6e00bf3|0;M=O;O=P;P=U;U=k+T|0;k=C;C=S;S=A;A=T+(S&C^k&(S^C))+(S>>>2^S>>>13^S>>>22^S<<30^S<<19^S<<10)|0;_=T=(E>>>7^E>>>18^E>>>3^E<<25^E<<14)+(b>>>17^b>>>19^b>>>10^b<<15^b<<13)+_+y|0;T=T+M+(U>>>6^U>>>11^U>>>25^U<<26^U<<21^U<<7)+(O^U&(P^O))+0xd5a79147|0;M=O;O=P;P=U;U=k+T|0;k=C;C=S;S=A;A=T+(S&C^k&(S^C))+(S>>>2^S>>>13^S>>>22^S<<30^S<<19^S<<10)|0;E=T=(m>>>7^m>>>18^m>>>3^m<<25^m<<14)+(g>>>17^g>>>19^g>>>10^g<<15^g<<13)+E+d|0;T=T+M+(U>>>6^U>>>11^U>>>25^U<<26^U<<21^U<<7)+(O^U&(P^O))+0x06ca6351|0;M=O;O=P;P=U;U=k+T|0;k=C;C=S;S=A;A=T+(S&C^k&(S^C))+(S>>>2^S>>>13^S>>>22^S<<30^S<<19^S<<10)|0;m=T=(t>>>7^t>>>18^t>>>3^t<<25^t<<14)+(_>>>17^_>>>19^_>>>10^_<<15^_<<13)+m+x|0;T=T+M+(U>>>6^U>>>11^U>>>25^U<<26^U<<21^U<<7)+(O^U&(P^O))+0x14292967|0;M=O;O=P;P=U;U=k+T|0;k=C;C=S;S=A;A=T+(S&C^k&(S^C))+(S>>>2^S>>>13^S>>>22^S<<30^S<<19^S<<10)|0;t=T=(e>>>7^e>>>18^e>>>3^e<<25^e<<14)+(E>>>17^E>>>19^E>>>10^E<<15^E<<13)+t+v|0;T=T+M+(U>>>6^U>>>11^U>>>25^U<<26^U<<21^U<<7)+(O^U&(P^O))+0x27b70a85|0;M=O;O=P;P=U;U=k+T|0;k=C;C=S;S=A;A=T+(S&C^k&(S^C))+(S>>>2^S>>>13^S>>>22^S<<30^S<<19^S<<10)|0;e=T=(f>>>7^f>>>18^f>>>3^f<<25^f<<14)+(m>>>17^m>>>19^m>>>10^m<<15^m<<13)+e+w|0;T=T+M+(U>>>6^U>>>11^U>>>25^U<<26^U<<21^U<<7)+(O^U&(P^O))+0x2e1b2138|0;M=O;O=P;P=U;U=k+T|0;k=C;C=S;S=A;A=T+(S&C^k&(S^C))+(S>>>2^S>>>13^S>>>22^S<<30^S<<19^S<<10)|0;f=T=(l>>>7^l>>>18^l>>>3^l<<25^l<<14)+(t>>>17^t>>>19^t>>>10^t<<15^t<<13)+f+b|0;T=T+M+(U>>>6^U>>>11^U>>>25^U<<26^U<<21^U<<7)+(O^U&(P^O))+0x4d2c6dfc|0;M=O;O=P;P=U;U=k+T|0;k=C;C=S;S=A;A=T+(S&C^k&(S^C))+(S>>>2^S>>>13^S>>>22^S<<30^S<<19^S<<10)|0;l=T=(h>>>7^h>>>18^h>>>3^h<<25^h<<14)+(e>>>17^e>>>19^e>>>10^e<<15^e<<13)+l+g|0;T=T+M+(U>>>6^U>>>11^U>>>25^U<<26^U<<21^U<<7)+(O^U&(P^O))+0x53380d13|0;M=O;O=P;P=U;U=k+T|0;k=C;C=S;S=A;A=T+(S&C^k&(S^C))+(S>>>2^S>>>13^S>>>22^S<<30^S<<19^S<<10)|0;h=T=(p>>>7^p>>>18^p>>>3^p<<25^p<<14)+(f>>>17^f>>>19^f>>>10^f<<15^f<<13)+h+_|0;T=T+M+(U>>>6^U>>>11^U>>>25^U<<26^U<<21^U<<7)+(O^U&(P^O))+0x650a7354|0;M=O;O=P;P=U;U=k+T|0;k=C;C=S;S=A;A=T+(S&C^k&(S^C))+(S>>>2^S>>>13^S>>>22^S<<30^S<<19^S<<10)|0;p=T=(y>>>7^y>>>18^y>>>3^y<<25^y<<14)+(l>>>17^l>>>19^l>>>10^l<<15^l<<13)+p+E|0;T=T+M+(U>>>6^U>>>11^U>>>25^U<<26^U<<21^U<<7)+(O^U&(P^O))+0x766a0abb|0;M=O;O=P;P=U;U=k+T|0;k=C;C=S;S=A;A=T+(S&C^k&(S^C))+(S>>>2^S>>>13^S>>>22^S<<30^S<<19^S<<10)|0;y=T=(d>>>7^d>>>18^d>>>3^d<<25^d<<14)+(h>>>17^h>>>19^h>>>10^h<<15^h<<13)+y+m|0;T=T+M+(U>>>6^U>>>11^U>>>25^U<<26^U<<21^U<<7)+(O^U&(P^O))+0x81c2c92e|0;M=O;O=P;P=U;U=k+T|0;k=C;C=S;S=A;A=T+(S&C^k&(S^C))+(S>>>2^S>>>13^S>>>22^S<<30^S<<19^S<<10)|0;d=T=(x>>>7^x>>>18^x>>>3^x<<25^x<<14)+(p>>>17^p>>>19^p>>>10^p<<15^p<<13)+d+t|0;T=T+M+(U>>>6^U>>>11^U>>>25^U<<26^U<<21^U<<7)+(O^U&(P^O))+0x92722c85|0;M=O;O=P;P=U;U=k+T|0;k=C;C=S;S=A;A=T+(S&C^k&(S^C))+(S>>>2^S>>>13^S>>>22^S<<30^S<<19^S<<10)|0;x=T=(v>>>7^v>>>18^v>>>3^v<<25^v<<14)+(y>>>17^y>>>19^y>>>10^y<<15^y<<13)+x+e|0;T=T+M+(U>>>6^U>>>11^U>>>25^U<<26^U<<21^U<<7)+(O^U&(P^O))+0xa2bfe8a1|0;M=O;O=P;P=U;U=k+T|0;k=C;C=S;S=A;A=T+(S&C^k&(S^C))+(S>>>2^S>>>13^S>>>22^S<<30^S<<19^S<<10)|0;v=T=(w>>>7^w>>>18^w>>>3^w<<25^w<<14)+(d>>>17^d>>>19^d>>>10^d<<15^d<<13)+v+f|0;T=T+M+(U>>>6^U>>>11^U>>>25^U<<26^U<<21^U<<7)+(O^U&(P^O))+0xa81a664b|0;M=O;O=P;P=U;U=k+T|0;k=C;C=S;S=A;A=T+(S&C^k&(S^C))+(S>>>2^S>>>13^S>>>22^S<<30^S<<19^S<<10)|0;w=T=(b>>>7^b>>>18^b>>>3^b<<25^b<<14)+(x>>>17^x>>>19^x>>>10^x<<15^x<<13)+w+l|0;T=T+M+(U>>>6^U>>>11^U>>>25^U<<26^U<<21^U<<7)+(O^U&(P^O))+0xc24b8b70|0;M=O;O=P;P=U;U=k+T|0;k=C;C=S;S=A;A=T+(S&C^k&(S^C))+(S>>>2^S>>>13^S>>>22^S<<30^S<<19^S<<10)|0;b=T=(g>>>7^g>>>18^g>>>3^g<<25^g<<14)+(v>>>17^v>>>19^v>>>10^v<<15^v<<13)+b+h|0;T=T+M+(U>>>6^U>>>11^U>>>25^U<<26^U<<21^U<<7)+(O^U&(P^O))+0xc76c51a3|0;M=O;O=P;P=U;U=k+T|0;k=C;C=S;S=A;A=T+(S&C^k&(S^C))+(S>>>2^S>>>13^S>>>22^S<<30^S<<19^S<<10)|0;g=T=(_>>>7^_>>>18^_>>>3^_<<25^_<<14)+(w>>>17^w>>>19^w>>>10^w<<15^w<<13)+g+p|0;T=T+M+(U>>>6^U>>>11^U>>>25^U<<26^U<<21^U<<7)+(O^U&(P^O))+0xd192e819|0;M=O;O=P;P=U;U=k+T|0;k=C;C=S;S=A;A=T+(S&C^k&(S^C))+(S>>>2^S>>>13^S>>>22^S<<30^S<<19^S<<10)|0;_=T=(E>>>7^E>>>18^E>>>3^E<<25^E<<14)+(b>>>17^b>>>19^b>>>10^b<<15^b<<13)+_+y|0;T=T+M+(U>>>6^U>>>11^U>>>25^U<<26^U<<21^U<<7)+(O^U&(P^O))+0xd6990624|0;M=O;O=P;P=U;U=k+T|0;k=C;C=S;S=A;A=T+(S&C^k&(S^C))+(S>>>2^S>>>13^S>>>22^S<<30^S<<19^S<<10)|0;E=T=(m>>>7^m>>>18^m>>>3^m<<25^m<<14)+(g>>>17^g>>>19^g>>>10^g<<15^g<<13)+E+d|0;T=T+M+(U>>>6^U>>>11^U>>>25^U<<26^U<<21^U<<7)+(O^U&(P^O))+0xf40e3585|0;M=O;O=P;P=U;U=k+T|0;k=C;C=S;S=A;A=T+(S&C^k&(S^C))+(S>>>2^S>>>13^S>>>22^S<<30^S<<19^S<<10)|0;m=T=(t>>>7^t>>>18^t>>>3^t<<25^t<<14)+(_>>>17^_>>>19^_>>>10^_<<15^_<<13)+m+x|0;T=T+M+(U>>>6^U>>>11^U>>>25^U<<26^U<<21^U<<7)+(O^U&(P^O))+0x106aa070|0;M=O;O=P;P=U;U=k+T|0;k=C;C=S;S=A;A=T+(S&C^k&(S^C))+(S>>>2^S>>>13^S>>>22^S<<30^S<<19^S<<10)|0;t=T=(e>>>7^e>>>18^e>>>3^e<<25^e<<14)+(E>>>17^E>>>19^E>>>10^E<<15^E<<13)+t+v|0;T=T+M+(U>>>6^U>>>11^U>>>25^U<<26^U<<21^U<<7)+(O^U&(P^O))+0x19a4c116|0;M=O;O=P;P=U;U=k+T|0;k=C;C=S;S=A;A=T+(S&C^k&(S^C))+(S>>>2^S>>>13^S>>>22^S<<30^S<<19^S<<10)|0;e=T=(f>>>7^f>>>18^f>>>3^f<<25^f<<14)+(m>>>17^m>>>19^m>>>10^m<<15^m<<13)+e+w|0;T=T+M+(U>>>6^U>>>11^U>>>25^U<<26^U<<21^U<<7)+(O^U&(P^O))+0x1e376c08|0;M=O;O=P;P=U;U=k+T|0;k=C;C=S;S=A;A=T+(S&C^k&(S^C))+(S>>>2^S>>>13^S>>>22^S<<30^S<<19^S<<10)|0;f=T=(l>>>7^l>>>18^l>>>3^l<<25^l<<14)+(t>>>17^t>>>19^t>>>10^t<<15^t<<13)+f+b|0;T=T+M+(U>>>6^U>>>11^U>>>25^U<<26^U<<21^U<<7)+(O^U&(P^O))+0x2748774c|0;M=O;O=P;P=U;U=k+T|0;k=C;C=S;S=A;A=T+(S&C^k&(S^C))+(S>>>2^S>>>13^S>>>22^S<<30^S<<19^S<<10)|0;l=T=(h>>>7^h>>>18^h>>>3^h<<25^h<<14)+(e>>>17^e>>>19^e>>>10^e<<15^e<<13)+l+g|0;T=T+M+(U>>>6^U>>>11^U>>>25^U<<26^U<<21^U<<7)+(O^U&(P^O))+0x34b0bcb5|0;M=O;O=P;P=U;U=k+T|0;k=C;C=S;S=A;A=T+(S&C^k&(S^C))+(S>>>2^S>>>13^S>>>22^S<<30^S<<19^S<<10)|0;h=T=(p>>>7^p>>>18^p>>>3^p<<25^p<<14)+(f>>>17^f>>>19^f>>>10^f<<15^f<<13)+h+_|0;T=T+M+(U>>>6^U>>>11^U>>>25^U<<26^U<<21^U<<7)+(O^U&(P^O))+0x391c0cb3|0;M=O;O=P;P=U;U=k+T|0;k=C;C=S;S=A;A=T+(S&C^k&(S^C))+(S>>>2^S>>>13^S>>>22^S<<30^S<<19^S<<10)|0;p=T=(y>>>7^y>>>18^y>>>3^y<<25^y<<14)+(l>>>17^l>>>19^l>>>10^l<<15^l<<13)+p+E|0;T=T+M+(U>>>6^U>>>11^U>>>25^U<<26^U<<21^U<<7)+(O^U&(P^O))+0x4ed8aa4a|0;M=O;O=P;P=U;U=k+T|0;k=C;C=S;S=A;A=T+(S&C^k&(S^C))+(S>>>2^S>>>13^S>>>22^S<<30^S<<19^S<<10)|0;y=T=(d>>>7^d>>>18^d>>>3^d<<25^d<<14)+(h>>>17^h>>>19^h>>>10^h<<15^h<<13)+y+m|0;T=T+M+(U>>>6^U>>>11^U>>>25^U<<26^U<<21^U<<7)+(O^U&(P^O))+0x5b9cca4f|0;M=O;O=P;P=U;U=k+T|0;k=C;C=S;S=A;A=T+(S&C^k&(S^C))+(S>>>2^S>>>13^S>>>22^S<<30^S<<19^S<<10)|0;d=T=(x>>>7^x>>>18^x>>>3^x<<25^x<<14)+(p>>>17^p>>>19^p>>>10^p<<15^p<<13)+d+t|0;T=T+M+(U>>>6^U>>>11^U>>>25^U<<26^U<<21^U<<7)+(O^U&(P^O))+0x682e6ff3|0;M=O;O=P;P=U;U=k+T|0;k=C;C=S;S=A;A=T+(S&C^k&(S^C))+(S>>>2^S>>>13^S>>>22^S<<30^S<<19^S<<10)|0;x=T=(v>>>7^v>>>18^v>>>3^v<<25^v<<14)+(y>>>17^y>>>19^y>>>10^y<<15^y<<13)+x+e|0;T=T+M+(U>>>6^U>>>11^U>>>25^U<<26^U<<21^U<<7)+(O^U&(P^O))+0x748f82ee|0;M=O;O=P;P=U;U=k+T|0;k=C;C=S;S=A;A=T+(S&C^k&(S^C))+(S>>>2^S>>>13^S>>>22^S<<30^S<<19^S<<10)|0;v=T=(w>>>7^w>>>18^w>>>3^w<<25^w<<14)+(d>>>17^d>>>19^d>>>10^d<<15^d<<13)+v+f|0;T=T+M+(U>>>6^U>>>11^U>>>25^U<<26^U<<21^U<<7)+(O^U&(P^O))+0x78a5636f|0;M=O;O=P;P=U;U=k+T|0;k=C;C=S;S=A;A=T+(S&C^k&(S^C))+(S>>>2^S>>>13^S>>>22^S<<30^S<<19^S<<10)|0;w=T=(b>>>7^b>>>18^b>>>3^b<<25^b<<14)+(x>>>17^x>>>19^x>>>10^x<<15^x<<13)+w+l|0;T=T+M+(U>>>6^U>>>11^U>>>25^U<<26^U<<21^U<<7)+(O^U&(P^O))+0x84c87814|0;M=O;O=P;P=U;U=k+T|0;k=C;C=S;S=A;A=T+(S&C^k&(S^C))+(S>>>2^S>>>13^S>>>22^S<<30^S<<19^S<<10)|0;b=T=(g>>>7^g>>>18^g>>>3^g<<25^g<<14)+(v>>>17^v>>>19^v>>>10^v<<15^v<<13)+b+h|0;T=T+M+(U>>>6^U>>>11^U>>>25^U<<26^U<<21^U<<7)+(O^U&(P^O))+0x8cc70208|0;M=O;O=P;P=U;U=k+T|0;k=C;C=S;S=A;A=T+(S&C^k&(S^C))+(S>>>2^S>>>13^S>>>22^S<<30^S<<19^S<<10)|0;g=T=(_>>>7^_>>>18^_>>>3^_<<25^_<<14)+(w>>>17^w>>>19^w>>>10^w<<15^w<<13)+g+p|0;T=T+M+(U>>>6^U>>>11^U>>>25^U<<26^U<<21^U<<7)+(O^U&(P^O))+0x90befffa|0;M=O;O=P;P=U;U=k+T|0;k=C;C=S;S=A;A=T+(S&C^k&(S^C))+(S>>>2^S>>>13^S>>>22^S<<30^S<<19^S<<10)|0;_=T=(E>>>7^E>>>18^E>>>3^E<<25^E<<14)+(b>>>17^b>>>19^b>>>10^b<<15^b<<13)+_+y|0;T=T+M+(U>>>6^U>>>11^U>>>25^U<<26^U<<21^U<<7)+(O^U&(P^O))+0xa4506ceb|0;M=O;O=P;P=U;U=k+T|0;k=C;C=S;S=A;A=T+(S&C^k&(S^C))+(S>>>2^S>>>13^S>>>22^S<<30^S<<19^S<<10)|0;E=T=(m>>>7^m>>>18^m>>>3^m<<25^m<<14)+(g>>>17^g>>>19^g>>>10^g<<15^g<<13)+E+d|0;T=T+M+(U>>>6^U>>>11^U>>>25^U<<26^U<<21^U<<7)+(O^U&(P^O))+0xbef9a3f7|0;M=O;O=P;P=U;U=k+T|0;k=C;C=S;S=A;A=T+(S&C^k&(S^C))+(S>>>2^S>>>13^S>>>22^S<<30^S<<19^S<<10)|0;m=T=(t>>>7^t>>>18^t>>>3^t<<25^t<<14)+(_>>>17^_>>>19^_>>>10^_<<15^_<<13)+m+x|0;T=T+M+(U>>>6^U>>>11^U>>>25^U<<26^U<<21^U<<7)+(O^U&(P^O))+0xc67178f2|0;M=O;O=P;P=U;U=k+T|0;k=C;C=S;S=A;A=T+(S&C^k&(S^C))+(S>>>2^S>>>13^S>>>22^S<<30^S<<19^S<<10)|0;r=r+A|0;n=n+S|0;i=i+C|0;o=o+k|0;s=s+U|0;a=a+P|0;c=c+O|0;u=u+M|0}function O(t){t=t|0;P(U[t|0]<<24|U[t|1]<<16|U[t|2]<<8|U[t|3],U[t|4]<<24|U[t|5]<<16|U[t|6]<<8|U[t|7],U[t|8]<<24|U[t|9]<<16|U[t|10]<<8|U[t|11],U[t|12]<<24|U[t|13]<<16|U[t|14]<<8|U[t|15],U[t|16]<<24|U[t|17]<<16|U[t|18]<<8|U[t|19],U[t|20]<<24|U[t|21]<<16|U[t|22]<<8|U[t|23],U[t|24]<<24|U[t|25]<<16|U[t|26]<<8|U[t|27],U[t|28]<<24|U[t|29]<<16|U[t|30]<<8|U[t|31],U[t|32]<<24|U[t|33]<<16|U[t|34]<<8|U[t|35],U[t|36]<<24|U[t|37]<<16|U[t|38]<<8|U[t|39],U[t|40]<<24|U[t|41]<<16|U[t|42]<<8|U[t|43],U[t|44]<<24|U[t|45]<<16|U[t|46]<<8|U[t|47],U[t|48]<<24|U[t|49]<<16|U[t|50]<<8|U[t|51],U[t|52]<<24|U[t|53]<<16|U[t|54]<<8|U[t|55],U[t|56]<<24|U[t|57]<<16|U[t|58]<<8|U[t|59],U[t|60]<<24|U[t|61]<<16|U[t|62]<<8|U[t|63])}function M(t){t=t|0;U[t|0]=r>>>24;U[t|1]=r>>>16&255;U[t|2]=r>>>8&255;U[t|3]=r&255;U[t|4]=n>>>24;U[t|5]=n>>>16&255;U[t|6]=n>>>8&255;U[t|7]=n&255;U[t|8]=i>>>24;U[t|9]=i>>>16&255;U[t|10]=i>>>8&255;U[t|11]=i&255;U[t|12]=o>>>24;U[t|13]=o>>>16&255;U[t|14]=o>>>8&255;U[t|15]=o&255;U[t|16]=s>>>24;U[t|17]=s>>>16&255;U[t|18]=s>>>8&255;U[t|19]=s&255;U[t|20]=a>>>24;U[t|21]=a>>>16&255;U[t|22]=a>>>8&255;U[t|23]=a&255;U[t|24]=c>>>24;U[t|25]=c>>>16&255;U[t|26]=c>>>8&255;U[t|27]=c&255;U[t|28]=u>>>24;U[t|29]=u>>>16&255;U[t|30]=u>>>8&255;U[t|31]=u&255}function T(){r=0x6a09e667;n=0xbb67ae85;i=0x3c6ef372;o=0xa54ff53a;s=0x510e527f;a=0x9b05688c;c=0x1f83d9ab;u=0x5be0cd19;f=l=0}function B(t,e,h,p,y,d,x,v,w,b){t=t|0;e=e|0;h=h|0;p=p|0;y=y|0;d=d|0;x=x|0;v=v|0;w=w|0;b=b|0;r=t;n=e;i=h;o=p;s=y;a=d;c=x;u=v;f=w;l=b}function W(t,e){t=t|0;e=e|0;var r=0;if(t&63)return-1;while((e|0)>=64){O(t);t=t+64|0;e=e-64|0;r=r+64|0}f=f+r|0;if(f>>>0<r>>>0)l=l+1|0;return r|0}function I(t,e,r){t=t|0;e=e|0;r=r|0;var n=0,i=0;if(t&63)return-1;if(~r)if(r&31)return-1;if((e|0)>=64){n=W(t,e)|0;if((n|0)==-1)return-1;t=t+n|0;e=e-n|0}n=n+e|0;f=f+e|0;if(f>>>0<e>>>0)l=l+1|0;U[t|e]=0x80;if((e|0)>=56){for(i=e+1|0;(i|0)<64;i=i+1|0)U[t|i]=0x00;O(t);e=0;U[t|0]=0}for(i=e+1|0;(i|0)<59;i=i+1|0)U[t|i]=0;U[t|56]=l>>>21&255;U[t|57]=l>>>13&255;U[t|58]=l>>>5&255;U[t|59]=l<<3&255|f>>>29;U[t|60]=f>>>21&255;U[t|61]=f>>>13&255;U[t|62]=f>>>5&255;U[t|63]=f<<3&255;O(t);if(~r)M(r);return n|0}function H(){r=h;n=p;i=y;o=d;s=x;a=v;c=w;u=b;f=64;l=0}function j(){r=g;n=_;i=E;o=m;s=A;a=S;c=C;u=k;f=64;l=0}function D(t,e,U,O,M,B,W,I,H,j,D,z,Z,q,L,R){t=t|0;e=e|0;U=U|0;O=O|0;M=M|0;B=B|0;W=W|0;I=I|0;H=H|0;j=j|0;D=D|0;z=z|0;Z=Z|0;q=q|0;L=L|0;R=R|0;T();P(t^0x5c5c5c5c,e^0x5c5c5c5c,U^0x5c5c5c5c,O^0x5c5c5c5c,M^0x5c5c5c5c,B^0x5c5c5c5c,W^0x5c5c5c5c,I^0x5c5c5c5c,H^0x5c5c5c5c,j^0x5c5c5c5c,D^0x5c5c5c5c,z^0x5c5c5c5c,Z^0x5c5c5c5c,q^0x5c5c5c5c,L^0x5c5c5c5c,R^0x5c5c5c5c);g=r;_=n;E=i;m=o;A=s;S=a;C=c;k=u;T();P(t^0x36363636,e^0x36363636,U^0x36363636,O^0x36363636,M^0x36363636,B^0x36363636,W^0x36363636,I^0x36363636,H^0x36363636,j^0x36363636,D^0x36363636,z^0x36363636,Z^0x36363636,q^0x36363636,L^0x36363636,R^0x36363636);h=r;p=n;y=i;d=o;x=s;v=a;w=c;b=u;f=64;l=0}function z(t,e,f){t=t|0;e=e|0;f=f|0;var l=0,h=0,p=0,y=0,d=0,x=0,v=0,w=0,b=0;if(t&63)return-1;if(~f)if(f&31)return-1;b=I(t,e,-1)|0;l=r,h=n,p=i,y=o,d=s,x=a,v=c,w=u;j();P(l,h,p,y,d,x,v,w,0x80000000,0,0,0,0,0,0,768);if(~f)M(f);return b|0}function Z(t,e,f,l,h){t=t|0;e=e|0;f=f|0;l=l|0;h=h|0;var p=0,y=0,d=0,x=0,v=0,w=0,b=0,g=0,_=0,E=0,m=0,A=0,S=0,C=0,k=0,O=0;if(t&63)return-1;if(~h)if(h&31)return-1;U[t+e|0]=f>>>24;U[t+e+1|0]=f>>>16&255;U[t+e+2|0]=f>>>8&255;U[t+e+3|0]=f&255;z(t,e+4|0,-1)|0;p=_=r,y=E=n,d=m=i,x=A=o,v=S=s,w=C=a,b=k=c,g=O=u;l=l-1|0;while((l|0)>0){H();P(_,E,m,A,S,C,k,O,0x80000000,0,0,0,0,0,0,768);_=r,E=n,m=i,A=o,S=s,C=a,k=c,O=u;j();P(_,E,m,A,S,C,k,O,0x80000000,0,0,0,0,0,0,768);_=r,E=n,m=i,A=o,S=s,C=a,k=c,O=u;p=p^r;y=y^n;d=d^i;x=x^o;v=v^s;w=w^a;b=b^c;g=g^u;l=l-1|0}r=p;n=y;i=d;o=x;s=v;a=w;c=b;u=g;if(~h)M(h);return 0}return{reset:T,init:B,process:W,finish:I,hmac_reset:H,hmac_init:D,hmac_finish:z,pbkdf2_generate_block:Z}}(0,this.heap.buffer),this.BLOCK_SIZE=64,this.HASH_SIZE=32,this.reset()}H.BLOCK_SIZE=16,H.reset=T,H.process=b,H.finish=g,"function"==typeof Uint8Array&&(W=new Uint8Array(1048576),I=p(null,W.buffer)),t.AES_CBC=m,t.AES_CBC.encrypt=function(t,e,r,n){if(void 0===t)throw new SyntaxError("data required");if(void 0===e)throw new SyntaxError("key required");return new m({heap:W,asm:I,key:e,padding:r,iv:n}).encrypt(t).result},t.AES_CBC.decrypt=function(t,e,r,n){if(void 0===t)throw new SyntaxError("data required");if(void 0===e)throw new SyntaxError("key required");return new m({heap:W,asm:I,key:e,padding:r,iv:n}).decrypt(t).result},t.AES_CBC.Encrypt=S,t.AES_CBC.Decrypt=k,t.AES_CTR=P,t.AES_CTR.encrypt=j,t.AES_CTR.decrypt=j,t.AES_CTR.Encrypt=t.AES_CTR.Decrypt=O,D.BLOCK_SIZE=64,D.HASH_SIZE=32;var z=D.prototype;z.reset=function(){return this.result=null,this.pos=0,this.len=0,this.asm.reset(),this},z.process=function(t){if(null!==this.result)throw new e("state must be reset before processing new data");if(c(t)&&(t=i(t)),u(t)&&(t=new Uint8Array(t)),!f(t))throw new TypeError("data isn\'t of expected type");for(var r=this.asm,n=this.heap,o=this.pos,s=this.len,a=0,l=t.length,p=0;l>0;)s+=p=h(n,o+s,t,a,l),a+=p,l-=p,o+=p=r.process(o,s),(s-=p)||(o=0);return this.pos=o,this.len=s,this},z.finish=function(){if(null!==this.result)throw new e("state must be reset before processing new data");return this.asm.finish(this.pos,this.len,0),this.result=new Uint8Array(this.HASH_SIZE),this.result.set(this.heap.subarray(0,this.HASH_SIZE)),this.pos=0,this.len=0,this};var Z=null;function q(t){if(void 0===t)throw new SyntaxError("data required");return function(){return null===Z&&(Z=new D({heapSize:1048576})),Z}().reset().process(t).finish().result}return D.bytes=q,D.hex=function(t){return s(q(t))},D.base64=function(t){return a(q(t))},t.SHA256=D,t}({})}()}},e={};!function r(n){var i=e[n];if(void 0!==i)return i.exports;var o=e[n]={exports:{}};return t[n].call(o.exports,o,o.exports,r),o.exports}(507)}();',i.p+"
1a1d8070370c0c5b66d14.worker.js")}},97030:function(e,t,i){"use strict";var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.ClearKeyLoader=void 0;var r=i(40306),o=i(3336),a=i(56481),s=i(4129),u=i(29669),c=i(70962),l=i(74853),d=i(70233),h=i(23068);function p(e){return d.FormatHelper.bytesToHex(l.ArrayHelper.stringToArrayWithoutEncoding(d.FormatHelper.base64UrlDecode(e)))}t.ClearKeyLoader=function(){function e(e,t){this.Wm=e,this.Zm=e.sourceContext.sourceIdentifier,this.Ym=n(n({},t),{licenseRequestRetryDelay:(0,h.isNumber)(t.licenseRequestRetryDelay)?Math.max(0,t.licenseRequestRetryDelay):c.DefaultSettings.DRM_RETRY_DELAY,maxLicenseRequestRetries:(0,h.isNumber)(t.maxLicenseRequestRetries)?Math.floor(Math.max(0,t.maxLicenseRequestRetries)):c.DefaultSettings.DRM_MAX_RETRIES,withCredentials:"boolean"==typeof t.withCredentials?t.withCredentials:c.DefaultSettings.DRM_WITH_CREDENTIALS}),this.Xm=new s.DefaultContentLoader(this.Wm,{requestType:u.HttpRequestType.DRM_LICENSE_CLEARKEY,maxRetries:this.Ym.maxLicenseRequestRetries,retryDelay:this.Ym.licenseRequestRetryDelay})}return e.prototype.load=function(e){var t,i,n=this,a={kids:e.map(function(e){return d.FormatHelper.base64UrlEncode(e)}),type:"temporary"},s=null!=(i=null==(t=this.Ym)?void 0:t.headers)?i:void 0;return this.Xm.load(this.Ym.LA_URL,u.HttpRequestMethod.POST,u.HttpResponseType.JSON,JSON.stringify(a),s,this.Ym.withCredentials,"application/json").then(function(e){return e.body.keys.filter(function(e){return e.k}).map(function(e){return{key:p(e.k),kid:p(e.kid)}})}).catch(function(e){return n.Wm.eventHandler.fireError(new o.PlayerError(r.ErrorCode.DRM_FAILED_LICENSE_REQUEST,{statusCode:e.status,statusText:e.statusText,serverResponse:e.body},"Failed to load the DRM clear keys: ".concat(e.status," ").concat(e.statusText,"."),n.Zm)),Promise.reject(e)})},e.prototype.dispose=function(){this.Xm=(0,a.dispose)(this.Xm),this.Ym=null},e}()},55522:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CryptoApi=void 0;var n=i(7387),r=i(21513),o=i(70233),a=i(15487),s=i(42752);t.CryptoApi=function(){function e(e,t,i,n,r){if(this.am=e,this.bm=r,"AES-CBC"!==t&&"AES-CTR"!==t)throw Error("AES mode '"+t+"' not supported!");this.cm="string"==typeof i?o.FormatHelper.hexToBytes(i).buffer:i,this.dm="string"==typeof n?o.FormatHelper.hexToBytes(n).buffer:n,this.fm=t,this.em=new u(new 
vendor: 14,521 bytes, line 1
1Uint8Array(this.dm)),this.gm=e.settings.FORCE_SOFTWARE_DECRYPTION||this.hm()}return e.prototype.hm=function(){if(!e.isWebCryptoSubtleSupported())return!0;var t=(0,r.getCapabilities)()[n.CapabilityKey.isWebOS]&&(0,r.getCapabilities)()[n.CapabilityKey.webOSChromiumVersion]===a.WEBOS_2016_2017_CHROMIUM_VERSION,i=(0,r.getCapabilities)()[n.CapabilityKey.isLegacyEdge];return"AES-CTR"===this.fm&&(t||i)},e.prototype.decrypt=function(e){var t=this;return this.gm?(this.am.logger.insane("Performing SW decryption"),this.im(e)):this.jm(e).catch(function(i){if(t.am.logger.debug("WebCrypto decryption error: "+i),"NotSupportedError"===i.name&&i.message.indexOf("Only secure origins are allowed")>-1)return t.im(e)})},e.prototype.im=function(e){if(!e||!this.cm||!this.em)return Promise.reject("Error decrypting AES-128 encrypted content");var t=this.fm.replace("-","_");if("AES_CBC"===t)return s.WebWorkerCrypto.getInstance(this.bm).decrypt(this.am,t,e,this.cm,!0,this.dm);if("AES_CTR"===t){var i=this.em.getValue().buffer;return this.em.increment(e.byteLength/16),s.WebWorkerCrypto.getInstance(this.bm).decrypt(this.am,t,e,this.cm,!1,i)}return Promise.reject("Error decrypting AES-128 encrypted content")},e.prototype.jm=function(t){var i=this,n=e.getWebCryptoApi(),r={name:this.fm};return"AES-CTR"===this.fm&&(r.length=128),n.subtle.importKey("raw",this.cm,r,!1,["decrypt"]).then(function(e){var r={name:i.fm};return"AES-CBC"===i.fm?r.iv=new DataView(i.dm):"AES-CTR"===i.fm&&(r.counter=i.em.getValue(),r.length=128,i.em.increment(t.byteLength/16)),n.subtle.decrypt(r,e,t)})},e.getWebCryptoApi=function(){return window.crypto},e.isWebCryptoApiSupported=function(){return void 0!==e.getWebCryptoApi()},e.isWebCryptoSubtleSupported=function(){return!(!e.isWebCryptoApiSupported()||!e.getWebCryptoApi().subtle)},e}();var u=function(){function e(e){this.km=new Uint8Array(16),"string"==typeof e?this.km.set(o.FormatHelper.hexToBytes(e)):e instanceof Uint8Array&&this.km.set(e)}return e.prototype.getValue=function(){return new Uint8Array(this.km.buffer.slice(0))},e.prototype.increment=function(e){e=e||1;for(var t=0,i=15;i>=0&&(0!==e||0!==t);i--){var n=this.km[i]+(255&e)+t;t=n>>>8,this.km[i]=255&n,e>>>=8}},e}()},86797:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createDecrypter=function(e,t,i){return t.includes("mp4")?new(0,n.ModuleManager.get(r.ModuleName.ContainerMP4).MP4Decrypter)(e,i,t):t.includes("webm")?new(0,n.ModuleManager.get(r.ModuleName.ContainerWebM).WebMDecrypter)(e,i,t):null};var n=i(88052),r=i(62756)},24896:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CryptoModuleDefinition=void 0;var n=i(62756),r=i(97030),o=i(55522),a=i(86797),s=i(42752);t.CryptoModuleDefinition={name:n.ModuleName.Crypto,module:{CryptoApi:o.CryptoApi,WebWorkerCrypto:s.WebWorkerCrypto,ClearKeyLoader:r.ClearKeyLoader,createDecrypter:a.createDecrypter}},t.default=t.CryptoModuleDefinition},42752:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WebWorkerCrypto=void 0,t.WebWorkerCrypto=function(){function e(){var e=this;this.mm=!1,this.nm=[],this.om=function(t){var i=t.data;"decrypted"===i.action&&e.pm(i.data)},this.pm=function(t){if(e.nm.shift().resolveFn(t),e.nm.length>0){var i=e.nm[0];e.lm.postMessage(i.message,[i.message.payload.data])}else e.mm=!1};var t=i(1356);this.lm=new t,this.lm.onmessage=this.om}return e.prototype.decrypt=function(e,t,i,n,r,o){var a=this;return new Promise(function(e){var s={action:"decrypt",method:t,payload:{data:i.slice(0,i.byteLength),key:n.slice(0,n.byteLength),padding:r,iv:o.slice(0,o.byteLength)}};a.nm.push({resolveFn:e,message:s}),a.mm||(a.mm=!0,a.lm.postMessage(s,[s.payload.data]))})},e.dispose=function(){for(var t in e.instances)e.instances.hasOwnProperty(t)&&(e.instances[t].lm.terminate(),delete e.instances[t])},e.getInstance=function(t){return e.instances[t]||(e.instances[t]=new e),e.instances[t]},e.instances={},e}()}},function(e){return e(e.s=24896)}])},375:function(e){"use strict";self,e.exports=(self.webpackChunkbitmovin_player=self.webpackChunkbitmovin_player||[]).push([[367],{96693:function(e,t,i){var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])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 i=(0,s.default)(e._initialization,t),r=o.URLHelper.concatBaseUrlWithPartial(u(t),i);return n(n({},(0,a.createInitSegmentInfoBase)(t)),{url:r,mediaURL:i})},t.extractBaseUrlFromRepresentation=u,t.provideSegmentInfoFromInitializationNodeProperty=function(e,t){var i=e.Initialization[0],r=function(e,t){return e._sourceURL?e._sourceURL:u(t)}(i,t),s=o.URLHelper.concatBaseUrlWithPartial(u(t),r),c=function(e){var t,i,n=null!=(i=null==(t=e._range)?void 0:t.split("-").map(function(e){return parseInt(e)}))?i:[];return n.length>1?{start:n[0],end:n[1]}:null}(i);return n(n({},(0,a.createInitSegmentInfoBase)(t)),{url:s,mediaURL:r,byteRange:c})},t.provideSegmentInfoFromIndexRangeProperty=function(e,t){var i=u(t),r={start:0,end:parseInt(e._indexRange.split("-")[0])-1};return n(n({},(0,a.createInitSegmentInfoBase)(t)),{url:i,mediaURL:i,byteRange:r})};var r=i(94685),o=i(58313),a=i(65439),s=i(4771);function u(e){return e.BaseURL?o.URLHelper.urlObjectToString(e.BaseURL[0]):""}},44908:function(e,t,i){var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},r=this&&this.__spreadArray||function(e,t,i){if(i||2==arguments.length)for(var n,r=0,o=t.length;r<o;r++)!n&&r in t||(n||(n=Array.prototype.slice.call(t,0,r)),n[r]=t[r]);return e.concat(n||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.MPDLoader=void 0;var o=i(40306),a=i(3336),s=i(80813),u=i(3714),c=i(4129),l=i(85625),d=i(77401),h=i(57456),p=i(29669),f=i(91678),g=i(33436),m=i(89927),y=i(58313),v=i(78340);function S(e){return{url:e.url,statusCode:e.status,statusText:e.statusText}}function b(e){return"dynamic"===(null==e?void 0:e._type)}t.MPDLoader=function(){function e(e,t){var i=this;this.Dq=0,this.Lq=function(e){return e.body?i.Mq(e):(i.Bq.load(null,null).catch(function(){}),null)},this.Nq=function(e,t){i.Eq=function(e,t,i){if((null==t?void 0:t.name)===d.RequestError.Canceled)return null;if((null==t?void 0:t.name)===d.RequestError.TimedOut)return new a.PlayerError(o.ErrorCode.NETWORK_MANIFEST_DOWNLOAD_TIMEOUT,S(e),"Failed to load DASH manifest: the request timed out.",i);var n=(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 a.PlayerError(o.ErrorCode.SOURCE_COULD_NOT_LOAD_MANIFEST,S(e),n,i)}(e,t,i.wq.sourceIdentifier)},this.vq=e,this.wq=t,this.Cq=e.settings,this.yq=new v.MPDParser(e,t),this.xq=!1,this.Fq=e.eventHandler,this.Aq=[];var n={onFailure:this.Nq,maxRetries:this.Cq.MAX_MPD_RETRIES,requestType:p.HttpRequestType.MANIFEST_DASH,resetRetriesWhenOffline:!1};this.Bq=new c.DefaultContentLoader(e,n)}return e.prototype.Gq=function(e,t){if(this.xq)return null;var i=e.trim();return this.Hq(i,t)},e.prototype.Hq=function(e,t){var i,n=this.vq.serviceManager.get(s.ServiceName.ManifestCachingService),o=null!=(i=null==n?void 0:n.getParsedManifest(this.zq))?i:this.Iq(e,t);return o?(b(o)||null==n||n.cacheParsedManifest(o,this.zq),this.Aq=o.BaseURL?r(r([],o.Location,!0),o.BaseURL.map(function(e){return e.url}),!0):o.Location,this.zq=this.Aq[0],o):null},e.prototype.Iq=function(e,t){return this.yq.parse(e,this.zq,t)},e.prototype.Jq=function(){this.Bq&&this.Bq.cancel(),this.xq=!0,this.zq=null},e.prototype.dispose=function(){this.Jq(),this.Bq.dispose(),this.yq&&(this.yq.dispose(),this.yq=null),this.Cq=null},e.prototype.load=function(e){var t=this;this.zq=null!=e?e:this.zq;var i=this.zq;return this.Eq=null,e&&(this.xq=!1),i?this.Kq(i).then(function(e){return t.Lq(e)}).then(function(e){return t.zq!==i&&t.Aq.includes(t.zq)&&(t.vq.logger.debug("Switched manifest location to ".concat(t.zq)),t.vq.eventHandler.dispatchEvent(u.PlayerEvent.ContentLocationChanged,{sourceLocationId:i,targetLocationId:t.zq,reason:u.ContentLocationChangedReason.Failover})),e}).catch(function(e){return t.xq||(null==e?void 0:e.message)===d.RequestError.Canceled?Promise.reject():(t.vq.logger.debug("Error during loading: "+t.zq+": ",e),Promise.reject(e))}):(this.vq.eventHandler.fireError(new a.PlayerError(o.ErrorCode.SOURCE_INVALID,void 0,"Cannot load the manifest: no URL was provided.",this.wq.sourceIdentifier)),Promise.reject("No manifest url provided"))},e.prototype.Kq=function(e){var t,i=this,n=this.vq.serviceManager.maybeCall(s.ServiceName.ManifestCachingService,function(t){return t.getHttpResponse(e)});if(n)return Promise.resolve(n);var r=null==(t=this.wq.source.options)?void 0:t.manifestWithCredentials;return this.Bq.load(e,p.HttpRequestMethod.GET,null,null,null,r,l.ManifestMimeType.Dash).catch(function(e){return i.Dq++,i.Dq<i.Aq.length?(i.zq=y.URLHelper.replaceCdn(i.zq,i.Aq[i.Dq]),i.Kq(i.zq)):(i.vq.logger.debug("no base url left, all tried"),i.Eq&&i.Fq.fireError(i.Eq),i.Eq=null,Promise.reject(e))})},e.prototype.updateRepresentation=function(e){return Promise.resolve(e)},e.prototype.stopRepresentationUpdate=function(e){return Promise.resolve()},e.prototype.Mq=function(e){var t,i,r,o,a=null!=(t=e.elapsedTime)?t:0;(0,h.isDownloadTimeInformationValid)(e)&&(this.vq.logger.debug("Downloaded manifest in: ".concat(a.toFixed(2),", TTFB: ").concat(null==(i=e.timeToFirstByte)?void 0:i.toFixed(2))),this.vq.store.dispatch((0,f.addMetricsValue)("default",g.MetricType.DownloadInformation,{bytes:e.length,time:a,timeToFirstByte:e.timeToFirstByte}))),this.zq=e.url;var u=n({},this.Gq(e.body,(0,m.toSeconds)(Math.round(a))));return u._currentLoadingUrl=this.zq,b(u)?!0===(null==(o=null==(r=this.vq)?void 0:r.settings)?void 0:o.INFINITE_RETRIES_FOR_LIVE)&&this.Bq.setResetRetriesWhenOffline(!0):this.vq.serviceManager.maybeCall(s.ServiceName.ManifestCachingService,function(t){return t.cacheHttpResponse(e,e.url)}),u},e}()},78340:function(e,t,i){var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},r=this&&this.__runInitializers||function(e,t,i){for(var n=arguments.length>2,r=0;r<t.length;r++)i=n?t[r].call(e,i):t[r].call(e);return n?i:void 0},o=this&&this.__esDecorate||function(e,t,i,n,r,o){function a(e){if(void 0!==e&&"function"!=typeof e)throw TypeError("Function expected");return e}for(var s,u=n.kind,c="getter"===u?"get":"setter"===u?"set":"value",l=!t&&e?n.static?e:e.prototype:null,d=t||(l?Object.getOwnPropertyDescriptor(l,n.name):{}),h=!1,p=i.length-1;p>=0;p--){var f={};for(var g in n)f[g]="access"===g?{}:n[g];for(var g in n.access)f.access[g]=n.access[g];f.addInitializer=function(e){if(h)throw TypeError("Cannot add initializers after decoration has completed");o.push(a(e||null))};var m=(0,i[p])("accessor"===u?{get:d.get,set:d.set}:d[c],f);if("accessor"===u){if(void 0===m)continue;if(null===m||"object"!=typeof m)throw TypeError("Object expected");(s=a(m.get))&&(d.get=s),(s=a(m.set))&&(d.set=s),(s=a(m.init))&&r.unshift(s)}else(s=a(m))&&("field"===u?r.unshift(s):d[c]=s)}l&&Object.defineProperty(l,n.name,d),h=!0};Object.defineProperty(t,"__esModule",{value:!0}),t.BaseURL=t.MPDParser=void 0,t.mergeCommonAttributes=E,t.parseFraction=T;var a=i(25926),s=i(4224),u=i(3714),c=i(20213),l=i(69957),d=i(44468),h=i(34047),p=i(52424),f=i(68922),g=i(85434),m=i(58313),y=i(88052),v=i(62756),S=RegExp("_(.*:)?label","i"),b=["__text","_byteRange","_serviceLocation","_availabilityTimeOffset","_availabilityTimeComplete"];function E(e,t){if(e&&t)for(var i=["SegmentBase","SegmentList","SegmentTemplate"],r=0,o=i;r<o.length;r++){var a=o[r],s=Array.isArray(e[a])&&e[a][0],u=Array.isArray(t[a])&&t[a][0],c=i.find(function(t){return e[t]});u&&s?e[a]=[n(n({},t[a][0]),e[a][0])]:u&&!c&&(e[a]=t[a])}}function T(e){var t=e.split("/");return parseInt(t[0])/(parseInt(t[1])||1)}function _(e){"string"==typeof e._audioSamplingRate&&(e._audioSamplingRate=parseFloat(e._audioSamplingRate))}function A(e){"string"==typeof e._height&&(e._height=parseFloat(e._height)),"string"==typeof e._width&&(e._width=parseFloat(e._width)),"string"==typeof e._frameRate&&(e._frameRate=T(e._frameRate))}function P(e){return"string"==typeof e?[{value:e}]:Array.isArray(e)?e.map(function(e){return{id:e._id,lang:e._lang,value:e.toString()}}):[]}function M(e){var t;return"http://dashif.org/guidelines/trickmode"===(null==(t=null==e?void 0:e[0])?void 0:t._schemeIdUri)}t.MPDParser=function(){var e,t,i=[];return e=function(){function t(e,t){this.OQ=r(this,i),this.OQ=e,this.PQ=t,this.QQ=e.renderer;var n=y.ModuleManager.get(v.ModuleName.XML);this.RQ=n.parseXML,this.SQ=n.parseJSONtoXML}return t.prototype.TQ=function(e,t){return(0,f.applyLabeling)({source:this.PQ.source,context:this.OQ,streamType:d.StreamType.Dash,labelingType:e},t)},t.prototype.UQ=function(e){var t,i,n,r=null!=(n=null==(i=null==(t=e.Label)?void 0:t[0])?void 0:i.value)?n:e._label,o={mimeType:e._mimeType,lang:e._lang};return this.TQ(f.LabelingType.Tracks,o)||r},t.prototype.VQ=function(e,t){var i,n,r,o=null!=(r=null==(n=null==(i=t.Label)?void 0:i[0])?void 0:n.value)?r:t._label,a={id:t._id,mimeType:e,bitrate:t._bandwidth,qualityRanking:t._qualityRanking,width:t._width,height:t._height,frameRate:t._framerate};return this.TQ(f.LabelingType.Qualities,a)||o},t.prototype.WQ=function(e){var t=this,i=0;for(var n in e)if(e.hasOwnProperty(n)){if("Accessibility"===n&&this.XQ(e,e[n]),"EssentialProperty"===n&&M(e[n]))return this.OQ.logger.debug("Ignoring trickplay track ".concat(e._id," from Period ").concat(e._periodId)),null;"Label"===n&&(e.Label=P(e[n])),"SegmentTemplate"===n&&this.YQ(e[n]),"SegmentTemplate"===n||0===n.indexOf("_")||Array.isArray(e[n])||
1(e[n]=[e[n]]),"Representation"===n&&(e[n]=e[n].filter(function(n){var r,o,a=n._mimeType||e._mimeType;if(n._mimeType=n._mimeType||e._mimeType,a&&(a=a.toLowerCase()),"AudioChannelConfiguration"in e){var s=e.AudioChannelConfiguration;null!=(r=(o=n).AudioChannelConfiguration)||(o.AudioChannelConfiguration=s)}E(n,e),_(n),A(n),"string"==typeof n._bandwidth&&(n._bandwidth=parseFloat(n._bandwidth)),n.Label&&(n.Label=P(n.Label)),n.SegmentTemplate&&t.YQ(n.SegmentTemplate);var u=n._codecs||e._codecs;if(a&&(0===a.indexOf("application")||0===a.indexOf("text")||0===a.indexOf("image")||a.indexOf("mp2t")>=0))i++,n._label=t.VQ(a,n);else if(a&&u){if(n._codecs=u,!h.CodecStringHelper.isSupportedByRenderer(t.QQ,a,u))return t.OQ.logger.debug("Representation not supported ("+a+'; codecs="'+u+'")'),!1;i++,n._label=t.VQ(a,n)}return!0}))}return i>0?(!e.hasOwnProperty("_mimeType")&&e.Representation[0].hasOwnProperty("_mimeType")&&(e._mimeType=e.Representation[0]._mimeType),e._label=this.UQ(e),e.Representation.sort(function(e,t){return e._bandwidth-t._bandwidth}),e):(this.OQ.logger.debug("AdaptationSet ".concat(e._id," from Period ").concat(e._periodId," has no supported representations")),null)},t.prototype.XQ=function(t,i){t.ClosedCaptionLabels={};for(var n=e.filterAccessibilityTagsByScheme(i,"urn:scte:dash:cc:cea-608:2015"),r=e.extractLabelGroups(n),o=0;o<r.length;
vendor: 9,343 bytes, line 1
1o++){var a=r[o],s=a.split("="),u=2===s.length?[s[0],s[1]]:["CC"+o,a],c=u[0],l=u[1];t.ClosedCaptionLabels[c]={label:l,lang:l}}},t.prototype.YQ=function(e){for(var t,i,n=0,r=e;n<r.length;n++){var o=r[n];if(o.hasOwnProperty("SegmentTimeline"))for(var a=Number(null!=(t=o._timescale)?t:"1"),s=0,u=null!=(i=o.SegmentTimeline)?i:[];s<u.length;s++){var c=u[s],l=c.S.reduce(function(e,t){var i;return e+Number(t._d)*(Number(null!=(i=t._r)?i:"0")+1)},0);c.totalDuration=l/a}}},t.filterAccessibilityTagsByScheme=function(e,t){return e&&e.length>0?e.filter(function(e){return e._schemeIdUri===t}):[]},t.extractLabelGroups=function(e){for(var t=[],i=0,n=e;i<n.length;i++){var r=n[i];if(r._value){var o=r._value.split(";");t.push.apply(t,o)}}return t},t.prototype.ZQ=function(e,t){for(var i=0;i<e.length;i++)if("string"==typeof t&&e[i].url===t||"object"==typeof t&&e[i].url===t.url)return!0;return!1},t.prototype.aQ=function(e,t,i,n){var r;Array.isArray(e.BaseURL)||(e.BaseURL=[e.BaseURL]);for(var o=[],a=0;a<e.BaseURL.length;a++){if((r=new I).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[a])r.url=e.BaseURL[a];else if("object"==typeof e.BaseURL[a]){for(var s in e.BaseURL[a].hasOwnProperty("__text")&&(r.url=e.BaseURL[a].__text),e.BaseURL[a].hasOwnProperty("_serviceLocation")&&(r.serviceLocation=e.BaseURL[a]._serviceLocation),e.BaseURL[a].hasOwnProperty("_byteRange")&&(r.serviceLocation=e.BaseURL[a]._byteRange),e.BaseURL[a].hasOwnProperty("_availabilityTimeOffset")&&(r.serviceLocation=e.BaseURL[a]._availabilityTimeOffset),e.BaseURL[a].hasOwnProperty("_availabilityTimeComplete")&&(r.serviceLocation=e.BaseURL[a]._availabilityTimeComplete),e.BaseURL[a])if(e.BaseURL[a].hasOwnProperty(s)&&0===s.indexOf("_")&&-1===b.indexOf(s)){var u={};u[s.substring(1)]=e.BaseURL[a][s],r.customAttributes.push(u)}}o.push(r)}for(e.BaseURL=[],a=0;a<o.length;a++){var c=o[a];if(m.URLHelper.isUrlAbsolute(c))this.ZQ(e.BaseURL,c)||(c.isAbsolute=!0,n.push(c),e.BaseURL.push(c));else for(var l=0;l<i.length;l++){var d=i[l].toString();"/"!==i[l].url[i[l].url.length-1]&&(d+="/");var h=m.URLHelper.concatUrlParts(d,c);this.ZQ(e.BaseURL,h)||((r=new I).url=h,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=c.serviceLocation||i[l].serviceLocation,r.byteRange=c.byteRange||i[l].byteRange,r.availabilityTimeOffset=c.availabilityTimeOffset||i[l].availabilityTimeOffset,r.availabilityTimeComplete=c.availabilityTimeComplete||i[l].availabilityTimeComplete,e.BaseURL.push(r),n.push(r))}}return n},t.prototype.bQ=function(e,t,i){var n=[];if(t=t||[],i=i||[],"object"!=typeof e)return e;for(var r in e.hasOwnProperty("BaseURL")&&(n=this.aQ(e,i,t,n)),n.length<1&&(n=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 a=e[r][o]._id||o+"";e[r][o]=this.bQ(e[r][o],n,i.concat([a])),"Representation"!==r||e[r][o].hasOwnProperty("BaseURL")||(e[r][o].BaseURL=n)}}else 0===r.indexOf("_")&&(S.test(r)||"_streamName"===r)&&(e._label=e[r],"_label"!==r&&delete e[r]);return e},t.prototype.cQ=function(e){var t=p.DurationConverter.getDurationInSec(e._timeShiftBufferDepth);return(t=isNaN(t)?-1/0:-t)>0&&t<this.OQ.bufferSettings.getForwardTargetLevel()&&(t=this.OQ.bufferSettings.getForwardTargetLevel()),t},t.fillInMissingIds=function(e){Array.isArray(e.Period)||(e.Period=[e.Period]);for(var t=[],i=[],n=[],r=[],o=[],a=[],s=e.Period,u=0;u<s.length;u++){s[u].hasOwnProperty("_id")&&s[u]._id?t.push(s[u]._id):r.push(s[u]),Array.isArray(s[u].AdaptationSet)||(s[u].AdaptationSet=[s[u].AdaptationSet]);for(var c=s[u].AdaptationSet,l=0;l<c.length;l++){c[l].hasOwnProperty("_id")&&c[l]._id?i.push(c[l]._id):o.push(c[l]),c[l]._periodId=s[u]._id,Array.isArray(c[l].Representation)||(c[l].Representation=[c[l].Representation]);for(var d=c[l].Representation,h=0;h<d.length;h++)d[h].hasOwnProperty("_id")&&d[h]._id?n.push(d[h]._id):a.push(d[h])}}for(var p=0,f=0,g=r;f<g.length;f++){var m=g[f];do p++;while(t.includes(""+p));m._id=""+p;for(var y=0,v=m.AdaptationSet;y<v.length;y++)v[y]._periodId=m._id;t.push(""+p)}p=0;for(var S=0,b=o;S<b.length;S++){var E=b[S];do p++;while(i.includes(""+p));E._id=""+p,i.push(""+p)}p=0;for(var T=0,_=a;T<_.length;T++){var A=_[T];do p++;while(n.includes(""+p));A._id=""+p,n.push(""+p)}},t.prototype.dQ=function(e){return"dynamic"===e._type&&(e._timeShiftBufferDepth=this.cQ(e)),e},t.prototype.oR=function(e){return e._publishTime&&(e._publishTime=new Date(e._publishTime).getTime()),e},t.prototype.pR=function(e,t){return e.hasOwnProperty("Location")?Array.isArray(e.Location)||(e.Location=[e.Location]):e.Location=[t],e},t.prototype.qR=function(e){e.hasOwnProperty("BaseURL")&&!Array.isArray(e.BaseURL)&&(e.BaseURL=[e.BaseURL]);for(var t=[],i=0;i<e.Location.length;i++){var n=e.Location[i],r=new I;r.url=m.URLHelper.removeLastPathPart(n),t.push(r)}return this.bQ(e,t,null)},t.prototype.rR=function(e,t){t._start?t.start=p.DurationConverter.getDurationInSec(t._start):(t.start=e.start+e.duration,t._start="PT"+t.start+"S")},t.prototype.sR=function(e){for(var t={start:0,duration:0,_start:"PT0S",_duration:"PT0S"},i=0;i<e.Period.length;i++){var n=e.Period[i];this.rR(t,n),n._duration?n.duration=p.DurationConverter.getDurationInSec(n._duration):(e.Period[i+1]?n.duration=(p.DurationConverter.getDurationInSec(e.Period[i+1]._start)||0)-n.start:e._mediaPresentationDuration?n.duration=(p.DurationConverter.getDurationInSec(e._mediaPresentationDuration)||0)-n.start:n.duration=1/0,n._duration="PT"+n.duration+"S"),this.OQ.logger.debug("period ".concat(i," (id=").concat(n._id,"): ").concat(n.start,"-").concat(n.start+n.duration)),e.Period[i]=n,t=n}return e},t.prototype.tR=function(e){for(var t,i,n=this,r=[],o=[],c=p.DurationConverter.getDurationInSec(e._mediaPresentationDuration),l=function(l){var h=e.Period[l];for(var f in t=p.DurationConverter.getDurationInSec(h._start),i=p.DurationConverter.getDurationInSec(h._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)&&l===e.Period.length-1&&!isNaN(c)&&(i=c-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:i}),h)if(h.hasOwnProperty(f)&&["BaseURL","AdaptationSet","EventStream"].includes(f)){if(Array.isArray(h[f])||(h[f]=[h[f]]),"AdaptationSet"===f){var m=h[f].map(function(e){var t=e._mimeType;return!t&&e.Representation.length>0&&(t=e.Representation[0]._mimeType),g.MimeTypeHelper.extractContentType(t)}).filter(function(e,t,i){return i.indexOf(e)===t});h[f]=h[f].map(function(e){E(e,h);var t=n.WQ(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 y=function(e){h[f].some(function(t){return t._mimeType.includes(e)})||d.OQ.eventHandler.dispatchEvent(u.PlayerEvent.Warning,new a.PlayerWarning(s.WarningCode.SOURCE_CODEC_OR_FILE_FORMAT_NOT_SUPPORTED))},v=0,S=m.filter(function(e){return"audio"===e||"video"===e});v<S.length;v++)y(S[v]);h[f].length<1&&r.push(l)}else if("EventStream"===f)for(var b=0,T=h[f].filter(function(e){return e.Event});b<T.length;b++)for(var _=0,A=T[b].Event;_<A.length;_++){var P=A[_];P.rawXmlRepresentation=d.SQ({event:P})}}},d=this,h=0;h<e.Period.length;h++)l(h);return r.length>0&&"static"===e._type&&this.uR(r,o,c,e),e=this.sR(e)},t.prototype.uR=function(e,t,i,n){for(var r,o,a;!isNaN(parseInt(r=e.pop()));){if(o=t[r].start,a=t[r].duration,!isNaN(o)&&!isNaN(a)){isNaN(i)||(n._mediaPresentationDuration="PT"+(i-=a)+"S");for(var s=r+1;s<t.length;s++)isNaN(parseFloat(t[s].start))||(t[s].start=t[s].start-a,n.Period[s]._start="PT"+t[s].start+"S")}t.splice(r,1),n.Period.splice(r,1)}},t.parseUTCTimingInformation=function(e){e.hasOwnProperty("UTCTiming")&&!Array.isArray(e.UTCTiming)&&(e.UTCTiming=[e.UTCTiming]);for(var t=[],i=(e.UTCTiming||[]).filter(function(e){return e.hasOwnProperty("_schemeIdUri")&&"string"==typeof e._schemeIdUri}),n=0,r=i;n<r.length;n++){var o=r[n],a={schemeIdUri:o._schemeIdUri,value:""};"string"==typeof o._value&&(a.value=o._value),t.push(a)}return t.length>0?e.UTCTiming=t:delete e.UTCTiming,e},t.prototype.parse=function(t,i,n){var r,o=this.RQ(t,{decodeEntities:!0});if(!1===o.success)throw new c.PlayerError(c.ErrorCode.SOURCE_MANIFEST_INVALID,{errorMessage:o.error.message},"DASH manifest is not a valid XML",this.PQ.sourceIdentifier);var a=o.parsed.MPD;return a._requestTimestamp=Date.now(),a._downloadTime=n,a._type=null!=(r=a._type)?r:"static",e.fillInMissingIds(a),a=this.dQ(a),a=this.oR(a),a=this.pR(a,i),a=this.qR(a),a=this.tR(a),(a=e.parseUTCTimingInformation(a))&&a.Period&&0!==a.Period.length?(a.originalDashManifest=t,a):(this.OQ.eventHandler.fireError(new c.PlayerError(c.ErrorCode.SOURCE_MANIFEST_INVALID,void 0,"DASH manifest contains 
1no usable periods",this.OQ.sourceContext.sourceIdentifier)),null)},t.prototype.dispose=function(){this.QQ=null},t}(),function(){var n="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;t=[(0,l.trackPerformance)("MPDParser.parse")],o(e,null,t,{kind:"method",name:"parse",static:!1,private:!1,access:{has:function(e){return"parse"in e},get:function(e){return e.parse}},metadata:n},null,i),n&&Object.defineProperty(e,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:n})}(),e}();var I=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=I},66759:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.DASHModuleDefinition=void 0;var n=i(62756),r=i(96693),o=i(44908),a=i(4771),s=i(63889),u=i(12054),c=i(31439),l={isIndexRangeNode:r.isIndexRangeNode,isInitializationNode:r.isInitializationNode,isInitializationStringNode:r.isInitializationStringNode},d={provideSegmentInfoFromInitializationProperty:r.provideSegmentInfoFromInitializationProperty,provideSegmentInfoFromInitializationNodeProperty:r.provideSegmentInfoFromInitializationNodeProperty,provideSegmentInfoFromIndexRangeProperty:r.provideSegmentInfoFromIndexRangeProperty};t.DASHModuleDefinition={name:n.ModuleName.DASH,module:function(){return{MPDLoader:o.MPDLoader,SegmentBaseMPDHandler:s.SegmentBaseMPDHandler,SegmentTemplateMPDHandler:u.SegmentTemplateMPDHandler,SegmentTimelineMPDHandler:c.SegmentTimelineMPDHandler,replaceAllPlaceholders:a.default,initSegmentInfoSourceDetectors:l,initSegmentInfoProviders:d}},dependencies:[n.ModuleName.EngineBitmovin,n.ModuleName.XML]},t.default=t.DASHModuleDefinition},63889:function(e,t,i){var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])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=i(80813),o=i(56481),a=i(4129),s=i(29669),u=i(79721),c=i(84568),l=i(58313),d=i(88052),h=i(62756),p=i(13422),f=i(59707),g=i(96693);function m(e,t,i){for(var n=[],r=0,o=e;r<o.length;r++){var a=o[r],s=a.referenced_size,u=a.subsegment_duration,c=t,l=c+s-1;n.push({byteRange:{start:c,end:l},time:i,duration:u}),t+=s,i+=u}return n}t.SegmentBaseMPDHandler=function(){function e(e){var t=this;this.context=e,this.Qq=0,this.Sq=-1,this.cq=(0,c.memoize)(this.zr.bind(this),function(e,t){return t._internalId.representationId}),this.dq=function(e){var i=n({},t.Zq.getRepresentationById(t.Vq));return t.cq(e,i).then(function(e){var n;if(t.bq.dispatch((0,f.setRepresentationSegmentIndexAction)(i._internalId,e)),t.bq.dispatch((0,f.setRepresentationIsLoadingAction)(i._internalId,!1)),e||(t.bq.dispatch((0,f.setRepresentationSegmentIndexParsingErrorAction)(i._internalId,!0)),t.context.logger.warn("Error parsing SegmentIndex for representation with id ".concat(null==(n=t.Vq)?void 0:n.key()))),t.Sq>=0){var r=t.Sq;t.Sq=-1,t.seekTo(r)}return t.Yq=null,t.Vq}).catch(function(e){throw t.cq.invalidate(),e})},this.or=function(e){return t.Yq=null,t.context.logger.warn("Getting segment index failed for representation with id ".concat(t.Vq.key()," (Error: ").concat(JSON.stringify(e),")")),Promise.reject(JSON.stringify(e))},this.sr=function(e){return t.Xq?Promise.reject("fail"):new Promise(function(i,r){t.Xq=n(n({},e),{resolve:i,reject:r})})},this.Oq=e.settings;var i=e.sourceContext.sourceIdentifier;this.Zq=e.serviceManager.get(r.ServiceName.ManifestService,i);var o=this.Zq.getFirstPeriod()||{_id:u.DEFAULT_PERIOD_ID};this.Pq=o._id;var l=this.Oq.MAX_RETRIES;this.Wq=new a.DefaultContentLoader(e,{maxRetries:l,retryDelay:this.Oq.RETRY_DELAY,requestType:s.HttpRequestType.MEDIA_SEGMENTINDEX}),this.bq=e.serviceManager.get(r.ServiceName.SourceStoreService,i)}return e.prototype.pr=function(e){var t,i,n=this.Zq.getRepresentationById(e);if(n&&n.segmentIndex){var r=this.Zq.getPeriodDuration(this.Pq);isFinite(r)&&(i=r/n.segmentIndex.references.length);var o=this.Zq.getMediaPresentationDuration();
vendor: 37,366 bytes, line 1
10!==o&&(isFinite(o)&&(t=o/n.segmentIndex.references.length),i||(i=t)),n.segmentIndex&&(t=n.segmentIndex.references[0].duration/n.segmentIndex.timescale,i||(i=t))}return i},e.prototype.qr=function(){var e,t,i=this.Zq.getRepresentationById(this.Tq);if(null==(t=null==(e=null==i?void 0:i.segmentIndex)?void 0:e.references)?void 0:t.length){var n=i.segmentIndex.timescale||1,r=i.segmentIndex.references[this.Qq].time/n,o=this.getTimestampOffset(),a={url:"",byteRange:i.segmentIndex.references[this.Qq].byteRange,periodId:i._internalId.periodId,presentationTimeOffset:o,startTime:r-o};return this.Qq++,this.Rq=Math.floor(this.Qq*this.getSegmentDuration())+this.wr(),a}},e.prototype.getInitSegmentInfo=function(e){var t=this.Zq.getRepresentationById(e);return t&&t.SegmentBase&&t.BaseURL?n(n({},this.rr(t)),{codecs:(0,p.getCodecsFromAdaptationSet)(this.Zq.getAdaptationSet(e))}):null},e.prototype.rr=function(e){var t,i=e.SegmentBase[0];return(0,g.isInitializationNode)(i)?(0,g.provideSegmentInfoFromInitializationNodeProperty)(i,e):e.segmentIndex?(0,g.isIndexRangeNode)(i)?(0,g.provideSegmentInfoFromIndexRangeProperty)(i,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.Xq){var e=this.qr();e&&(this.Xq.resolve(e),this.Xq=null)}},e.prototype.setAdaptationSetId=function(e){this.Uq=e,this.aq=e.adaptationSetId.split("-")[0],this.tr(),this.resolvePendingSegmentInfoRequests()},e.prototype.tr=function(){var e,t=this,i=this.Zq.getRepresentationById(this.Tq);i&&(e=i._bandwidth);var n=this.Zq.getMatchingRepresentationsByBandwidth(this.Uq,e),r=this.Tq?n.find(function(e){return e._internalId===t.Tq}):null,o=null!=r?r:n[0];this.Tq=o._internalId,this.Pq=this.Tq.periodId,o.segmentIndex||(this.updateRepresentation(this.Tq),o=this.Zq.getRepresentationById(o._internalId)),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.Zq.getRepresentationById(e)&&(this.Tq=e,this.seekTo(this.Rq),!0)},e.prototype.getSegmentInfos=function(){var e=this.getSeekableRange();return this.ur(e)},e.prototype.ur=function(e){var t=this,i={};return this.Zq.getAdaptationSet(this.Uq).Representation.forEach(function(n){var r=n._id;if(i[r]=[],1===n.BaseURL.length){var o=n.BaseURL[0].url;i[r].push({url:l.URLHelper.appendQueryParametersToUrl(o,t.Oq.QUERY_PARAMETERS)})}else for(var a=0;a<n.BaseURL.length;a++)o=l.URLHelper.appendQueryParametersToUrl(n.BaseURL[a].url,t.Oq.QUERY_PARAMETERS),i[r].push({url:o});i[r].forEach(function(t){t.duration=e.end-e.start,t.startTime=e.start})}),i},e.prototype.getNextSegmentInfo=function(e){var t=this.qr();return t?Promise.resolve(t):this.sr({time:e})},e.prototype.getSubtitleUrl=function(){var e=this.Zq.getAvailableBaseURLsForRepresentation(this.Tq);return e?e[0]:null},e.prototype.getStartNumber=function(){},e.prototype.getLiveEdgeTime=function(){return -1},e.prototype.getActualTimeShiftBufferDepth=function(){return this.Zq.getTimeShiftBufferDepthSeconds()},e.prototype.vr=function(){var e,t=this;return this.Zq.getRepresentationById(this.Tq)&&(e=this.pr(this.Tq)),e<0&&(e=this.Zq.getAdaptationSet(this.Uq).Representation.map(function(e){return t.pr(e._internalId)}).find(function(e){return e>0})),isFinite(e)?[e,!0]:[1,!1]},e.prototype.getSegmentDuration=function(){return this.vr()[0]},e.prototype.hasNext=function(){this.resolvePendingSegmentInfoRequests();var e=this.Zq.getRepresentationById(this.Tq);if(e){if(e.segmentIndex)return this.Qq<e.segmentIndex.references.length;if(!this.isSegmentInfoLoaded(this.Tq))return!0}return!1},e.prototype.wr=function(){var e,t,i;return null!=(i=null==(t=null==(e=this.Zq)?void 0:e.findPeriod(this.Pq))?void 0:t.start)?i:0},e.prototype.seekTo=function(e){this.Rq=e;var t,i,n=this.vr(),r=n[0],o=n[1];if((r<0||!o)&&(this.Sq=e),r>0&&o&&e>-1){var a=Math.max(e-this.wr(),0),s=null==(t=this.Zq)?void 0:t.getRepresentationById(this.Tq);this.Tq&&s&&(this.setIndex(Math.floor(a/r)),this.context.logger.debug("seekTo: ".concat(e,", new index: ").concat(this.Qq," (representationId: ").concat(null==(i=this.Tq)?void 0:i.key(),", ").concat(s._mimeType,")")))}},e.prototype.getTimestampOffset=function(){var e=this.Zq.findPeriod(this.Pq),t=this.Zq.getRepresentationById(this.Tq),i=t&&t.SegmentBase?t.SegmentBase[0]:null,n=0;if(i&&i.hasOwnProperty("_presentationTimeOffset")&&i.hasOwnProperty("_timescale")){var r=i.hasOwnProperty("_timescale")?parseInt(i._timescale):1;n=parseInt(i._presentationTimeOffset)/r}return e&&(n-=e.start),n},e.prototype.getIndex=function(){return this.Qq},e.prototype.setIndex=function(e){this.Qq=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.Yq)return this.Yq.catch(function(){}).then(function(){return t.updateRepresentation(e)});var i=void 0,n=void 0,r=this.Zq.getRepresentationById(e);if(r){if(this.Wq.isLoading())return;this.context.logger.debug("Going to load segment index (Representation Id: ".concat(null==e?void 0:e.key(),")")),i=(0,g.extractBaseUrlFromRepresentation)(r);var o=parseInt((n=r.SegmentBase[0]._indexRange).split("-")[1])+1;return this.bq.dispatch((0,f.setRepresentationAnchorPointAction)(r._internalId,o)),this.Vq=e,this.Yq=this.Wq.load(i,s.HttpRequestMethod.GET,s.HttpResponseType.ARRAYBUFFER,null,{Range:"bytes="+n}).then(function(e){return t.dq(e.body)}).catch(this.or)}return this.context.logger.log("Getting segment index failed (Invalid Representation Id: ".concat(null==e?void 0:e.key(),")")),Promise.reject(null)},e.prototype.isSegmentInfoLoaded=function(e){return this.Zq.isSegmentInfoLoaded(e)},e.prototype.rewindOneSegment=function(){return this.Qq--,!(this.Qq<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.Zq.getMediaPresentationDuration()}},e.prototype.getPendingSegmentInfoRequest=function(){return this.Xq},e.prototype.setPendingSegmentInfoRequest=function(e){this.Xq=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.Oq=null,this.Zq=null,this.Tq=null,this.bq=null,this.Wq=(0,o.dispose)(this.Wq),this.Xq=null,this.cq=null},e.prototype.setTimestampOffset=function(e,t){},e.prototype.xr=function(){return this.context.serviceManager.get(r.ServiceName.SegmentService).get(this.aq).getSegment(this.getInitSegmentInfo(this.Vq)).then(function(e){return e.read()}).then(function(e){return e.value})},e.prototype.yr=function(e,t){return this.xr().then(function(i){var n=d.ModuleManager.get(h.ModuleName.ContainerWebM).WebMSegmentIndex,r=d.ModuleManager.get(h.ModuleName.ContainerWebM).WebMInitFile,o=new n(e),a=new r(i.getData()).segment.segmentInfo,s=function(e,t,i){for(var n=e.cues.flatMap(function(e){return e.cuePoints}),r=Array(n.length),o=t-function(e){var t=e.cues&&e.cues[0],i=t&&t.cuePoints&&t.cuePoints[0],n=i&&i.trackPositions&&i.trackPositions[0];return n&&n.clusterPosition||0}(e),a=n.length-1;a>=0;a--)r[a]={time:n[a].time,byteRange:{start:o+n[a].trackPositions[0].clusterPosition}},a===n.length-1?r[a].duration=i-r[a].time:(r[a].byteRange.end=r[a+1].byteRange.start-1,r[a].duration=r[a+1].time-r[a].time);return r}(o,parseInt(t.SegmentBase[0]._indexRange.split("-")[1])+1,a.getDuration()/a.getTimecodeScale());return{timescale:a.getTimecodeScale(),references:s}})},e.prototype.zr=function(e,t){return"webm"===this.aq.split("/")[1]?this.yr(e,t):Promise.resolve(this.Ar(e,t.anchorPoint))},e.prototype.Ar=function(e,t){if(!e||!t)return this.context.logger.debug("Error parsing SegmentIndex: Wrong Parameters"),null;var i=d.ModuleManager.get(h.ModuleName.ContainerMP4).parseBuffer(e).boxes.find(function(e){return"sidx"===e.type});return i?{timescale:i.timescale,references:m(i.references,i.first_offset+t,i.earliest_presentation_time)}:(this.context.logger.debug("Error parsing SegmentIndex: No sidx box found"),null)},e}()},12054:function(e,t,i){var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])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=p;var r=i(80813),o=i(77179),a=i(89927),s=i(23068),u=i(58313),c=i(16197),l=i(54053),d=i(96693),h=i(4771);function p(e){return e&&null!=e._timescale&&parseInt(e._timescale)||1}t.SegmentTemplateMPDHandler=function(){function e(e){this.context=e,this.settings=e.settings,this.manifestService=e.serviceManager.get(r.ServiceName.ManifestService,e.sourceContext.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.Cr=function(){var e=this.getTemplate(this.currentRepresentationId);return e&&e._endNumber?parseInt(e._endNumber):NaN},e.prototype.setAdaptationSetId=function(e,t,i){void 0===t&&(t=null),void 0===i&&(i={isManifestUpdate:!1}),this.currentAdaptationSetId=e,this.currentRepresentationId=t;var n=!this.currentRepresentationId||!!this.manifestService.getRepresentationById(this.currentRepresentationId),r=this.manifestService.getAdaptationSet(this.currentAdaptationSetId);this.currentRepresentationId&&n||(this.currentRepresentationId=r.Representation[0]._internalId),this.getTemplate(this.currentRepresentationId)?this.Br||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),i=this.manifestService.getRepresentationById(e);return(0,d.isInitializationStringNode)(t)?(0,d.provideSegmentInfoFromInitializationProperty)(t,i):null},e.prototype.Dr=function(){return parseFloat(this.getTemplate(this.currentRepresentationId)._availabilityTimeOffset)||0},e.prototype.Er=function(e){var t=this.getExpectedPresentationTime(e);return t-=this.Dr(),(0,a.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.Fr=function(){var e;return(null==(e=this.getCurrentPeriod())?void 0:e.start)||0},e.prototype.isExpectedSegmentPlaybackTimeExceedingPeriodDuration=function(e){var t=this.Cr();if(isFinite(t))return e>t;var i=this.getCurrentPeriod(),n=(null==i?void 0:i._duration)?i.start+i.duration:1/0;return this.getExpectedPresentationTime(e)>=n},e.prototype.checkIfSegmentAvailable=function(e){return this.Er(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 i=this.checkIfSegmentAvailable(this.Br),n=this.isExpectedSegmentPlaybackTimeExceedingPeriodDuration(this.Br);if(!i||n)return null;e.wallClockTime=this.Er(this.Br)-(0,a.toMilliSeconds)(this.getSegmentDuration())}var r=this.manifestService.getRepresentationById(this.currentRepresentationId);return e.periodId=null==r?void 0:r._internalId.periodId,e.url=(0,h.default)(t._media,r,this.Br,this.time),e.segmentNumber=this.Br,e.startTime=this.getExpectedPresentationTime(this.Br),this.setIndex(this.Br+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(i,r){t.pendingSegmentInfoRequest=n(n({},e),{resolve:i,reject:r})})},e.prototype.resolvePendingSegmentInfoRequests=function(){if(this.pendingSegmentInfoRequest){var e=this.getNextSegmentInfo_(),t=this.isExpectedSegmentPlaybackTimeExceedingPeriodDuration(this.Br);e?(this.pendingSegmentInfoRequest.resolve(e),this.pendingSegmentInfoRequest=null):t&&(this.pendingSegmentInfoRequest.reject(l.SegmentInfoError.SEGMENT_EXCEEDING_PERIOD_DURATION),this.pendingSegmentInfoRequest=null)}},e.prototype.getSegmentInfos=function(e){var t=this,i={};return this.manifestService.getAdaptationSet(this.currentRepresentationId).Representation.forEach(function(n){var r,o,a,s=n._internalId,c=t.getTemplate(s),l=[],d=t.getSeekableRange().end-t.getSeekableRange().start,p=0,f=t.manifestService.isLive();f?(a=t.time-d,r=t.Br-d/t.getSegmentDuration(),o=t.Br):(a=c._presentationTimeOffset||0,o=parseInt((r=0)+d/t.getSegmentDuration()));for(var g=r;g<=o;g++){var m={};m.duration=t.getSegmentDuration(),m.startTime=f?t.getExpectedPresentationTime(g):p*t.getSegmentDuration();var y=(0,h.default)(c._media,n,r+p,a+p*t.getSegmentDuration());m.url=e?u.URLHelper.concatBaseUrlWithPartial(e,y):y,m.url=u.URLHelper.appendQueryParametersToUrl(m.url,t.settings.QUERY_PARAMETERS),l.push(m),p++}i[s.representationId]=l}),i},e.prototype.getSubtitleUrl=function(){var e=this.manifestService.getRepresentationById(this.currentRepresentationId).BaseURL[0];return e.url||e},e.prototype.Gr=function(){var e=this.getTemplate(this.currentRepresentationId);return e&&e.hasOwnProperty("_liveEdgeNumber")},e.prototype.Hr=function(){if(this.Gr())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),i=Number(null==e?void 0:e._timescale);return isNaN(t)?1:isNaN(i)?t:t/i},e.prototype.seekTo=function(e){e>-1&&this.setIndex(this.Ir(e))},e.prototype.getTimescale=function(){return p(this.getTemplate(this.currentRepresentationId))},e.prototype.getExpectedPresentationTime=function(e){var t=this.Fr();return(e-this.getStartNumber())*this.getSegmentDuration()+t},e.prototype.Ir=function(e){var t=this.getSegmentDuration();return Math.floor(Math.max(e-this.Fr()-t/2,0)/t)+this.getStartNumber()},e.prototype.getActualTimeShiftBufferDepth=function(){var e=this.Jr();return e.end-e.start},e.prototype.Jr=function(){var e=(0,o.getStartTimeOffset)(this.Kr().getState()),t=this.manifestService.getMediaPresentationDuration()||1/0;return this.manifestService.isLive()?this.Mr(t):this.Lr(e,t)},e.prototype.Kr=function(){return this.context.serviceManager.get(r.ServiceName.SourceStoreService,this.context.sourceContext.sourceIdentifier)},e.prototype.Lr=function(e,t){return{start:e,end:isFinite(t)?e+t:0}},e.prototype.Mr=function(e){var t=(this.manifestService.getFirstPeriod()||{start:0}).start,i=Math.min(-1*this.manifestService.getTimeShiftBufferDepthSeconds(),(0,a.toSeconds)(Date.now()-this.manifestService.getAvailabilityStartTime())),n=this.getLiveEdgeTime();return{start:Math.max(t,n-i),end:n}},e.prototype.getSeekableRange=function(){var e=this.Jr();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.isExpectedSegmentPlaybackTimeExceedingPeriodDuration(this.Br),i=Math.ceil(e/this.getSegmentDuration())+this.getStartNumber()-1;return!t&&this.Br<=i},e.prototype.getTimestampOffset=function(){var e=this.getCurrentPeriod(),t=0,i=this.getTemplate(this.currentRepresentationId);return i&&i._presentationTimeOffset&&(t=i._presentationTimeOffset/this.getTimescale()),e&&(t-=e.start),t},e.prototype.Nr=function(e,t){var i=this.manifestService.getPeriod(e)||this.getCurrentPeriod();return this.manifestService.isLastPeriod(e.periodId)?i&&(0,s.isNumber)(i.duration)&&isFinite(i.duration)?i.duration:i&&i.start?(0,a.toSeconds)(t)-i.start:this.manifestService.calculateCumulativePeriodDuration(e.periodId):this.manifestService.getPeriodDuration(e.periodId)},e.prototype.Or=function(e){var t=Date.now(),i=(0,a.toSeconds)(t-this.manifestService.getRequestTimestamp());return this.Gr()?this.Hr()+Math.floor(i/this.getSegmentDuration()):this.manifestService.isLive()&&this.manifestService.getManifest()._availabilityStartTime?Math.floor(this.Nr(e,t)/this.getSegmentDuration()+this.getStartNumber()):this.getStartNumber()},e.prototype.Pr=function(e){return Math.max(this.Or(e),this.getStartNumber())},e.prototype.getIndex=function(){return this.Br},e.prototype.setIndex=function(e){this.Br=e},e.prototype.getLiveEdgeTime=function(){return(0,a.toSeconds)(Date.now())},e.prototype.timeShift=function(e,t){if(void 0===t&&(t=this.currentRepresentationId.periodId),this.manifestService.isLive()){var i=this.Br,n=this.Pr(new c.PeriodId(t));0===e?(this.setIndex(n),this.context.logger.debug("timeShift changes index from "+i+" to "+this.Br+" [back to live edge]")):(this.setIndex(n+Math.floor(e/this.getSegmentDuration())),this.Br<this.getStartNumber()&&this.setIndex(this.getStartNumber()),this.context.logger.debug("timeShift changes index from "+i+" to "+this.Br))}},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.Br-1),this.Br<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,i){var n=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(t,i)};return function(t,i){if("function"!=typeof i&&null!==i)throw TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])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 o=i(74853),a=i(89927),s=i(58313),u=i(54053),c=i(4771),l=i(12054),d=i(39761);function h(e,t,i){var n;(n=e.entries).push.apply(n,t),e.latestTime+=i*t.length,e.latestOriginalTime+=i*t.length,e.index+=t.length}t.SegmentTimelineMPDHandler=function(e){function t(t){var i=e.call(this,t)||this;return i.Qr=0,i.Rr=null,i.Sr=[],i.Tr=!0,i.Xr=!1,i.Ur=1,i.Vr=0,i.Wr=0,i}return n(t,e),t.prototype.setAdaptationSetId=function(t,i,n){void 0===i&&(i=null),void 0===n&&(n={isPeriodSwitch:!1,isManifestUpdate:!1}),this.currentAdaptationSetId=t,this.currentRepresentationId=i;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 a=this.getTemplate(this.currentRepresentationId);a?(this.setTimeline(a,n.isPeriodSwitch),this.getIndex()||e.prototype.setIndex.call(this,this.getStartNumber())):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.Yr=function(e){return null!=(null==e?void 0:e.start)&&isFinite(e.start)?e.start:0},t.prototype.Zr=function(){this.manifestService.isLive()&&this.Tr&&(this.Xr||this.timeShift(0),this.Tr=!1)},t.prototype.ar=function(e){return!(null==e?void 0:e._media)||!this.manifestService.representationExists(this.currentRepresentationId)},t.prototype.br=function(e){var t=this.Sr[this.Qr];t&&(e.wallClockTime=(0,a.toMilliSeconds)(t.ot/this.Ur-this.getTimestampOffset()))},t.prototype.getNextSegmentInfo_=function(){var t,i,n={isInitSegment:!1,presentationTimeOffset:this.getTimestampOffset()},r=this.getTemplate(this.currentRepresentationId);if(this.ar(r)||(this.Zr(),!(this.Sr.length>0&&this.Qr<this.Sr.length)))return null;var o=this.Sr[this.Qr];e.prototype.setIndex.call(this,o.i),this.time=o.ot,n.duration=o.duration,n.mediaPresentationTime=o.t,n.segmentNumber=o.i;var a=null!=(i=null==(t=this.getCurrentPeriod())?void 0:t.start)?i:0;if(n.startTime=o.playbackTime+a,this.manifestService.isLive()){if(this.isExpectedSegmentPlaybackTimeExceedingPeriodDuration(this.Qr))return null;this.br(n)}var s=this.manifestService.getRepresentationById(this.currentRepresentationId);return s?(n.periodId=null==s?void 0:s._internalId.periodId,n.url=(0,c.default)(r._media,s,this.getIndex(),this.time),e.prototype.setIndex.call(this,this.getIndex()+1),this.Qr++,n):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(i,n){t.pendingSegmentInfoRequest=r(r({},e),{resolve:i,reject:n})})},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 i=this.getTimelineDuration(),n=i/this.getTimelineLength(),r=t.start+i,o=t.duration-n/2;isFinite(o)&&r>=o&&(this.pendingSegmentInfoRequest.reject(u.SegmentInfoError.PERIOD_COMPLETE),this.pendingSegmentInfoRequest=null)}}}},t.prototype.getSegmentInfos=function(e){var t=this,i={};return this.manifestService.getAdaptationSet(this.currentRepresentationId).Representation.forEach(function(n){for(var r=n._internalId,o=t.getTemplate(r),a=[],u=t.manifestService.isLive(),l=t.getTimelineLength(),d=0,h=0;h<l;h++){var p=t.Sr[h],f={};f.duration=p.duration,u?f.startTime=t.getExpectedPresentationTime(h):(f.startTime=d,d+=p.duration);var g=(0,c.default)(o._media,n,p.i,p.ot);f.url=e?s.URLHelper.concatBaseUrlWithPartial(e,g):g,f.url=s.URLHelper.appendQueryParametersToUrl(f.url,t.settings.QUERY_PARAMETERS),a.push(f)}i[r.representationId]=a}),i},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 i=this.Yr(this.getCurrentPeriod());this.Xr=!1,isFinite(i)&&(t-=i);for(var n=1;n<this.Sr.length;n++)if(this.Sr[n].playbackTime>t)return this.Qr=n-1,e.prototype.setIndex.call(this,this.Sr[this.Qr].i),this.Tr=!1,this.getIndex();this.Qr=Math.max(this.Sr.length-1,0)}return e.prototype.setIndex.call(this,this.Sr[this.Qr].i),this.getIndex()},t.prototype.getExpectedPresentationTime=function(e){var t,i;return(null!=(i=null==(t=this.getCurrentPeriod())?void 0:t.start)?i:0)+this.Sr[e].playbackTime},t.prototype.hasNext=function(e){if(this.Qr<this.Sr.length){var t=this.Sr[0].t,i=this.Sr[this.Qr];if(this.isExpectedSegmentPlaybackTimeExceedingPeriodDuration(this.Qr))return!1;if(i)return i.t-t<=e*this.Ur}return!1},t.prototype.getTimestampOffset=function(){var e=this.getCurrentPeriod(),t=this.Vr/this.Ur;return e&&(t-=e.start),t},t.prototype.setIndex=function(t){if(e.prototype.setIndex.call(this,t),this.Sr&&this.Sr.length>0)for(var i=0;i<this.Sr.length;i++)this.Sr[i].i===t&&(this.Qr=i)},t.prototype.getLiveEdgeTime=function(){if(!this.manifestService.isLive())return -1;var t=this.manifestService.getLastPeriod(),i=this.getCurrentPeriod();if(null==t||(null==i?void 0:i._id)===t._id)return this.Yr(i)+this.cr()/this.Ur;var n=(0,d.getFirstAvSegmentTemplateFromPeriod)(t);return(null==n?void 0:n.SegmentTimeline)?this.Yr(t)+(0,d.calculateTimelineEnd)(n):e.prototype.getLiveEdgeTime.call(this)},t.prototype.cr=function(){if(!this.Sr.length)return 0;var e=this.Sr[this.Sr.length-1];return e.t+e.d},t.prototype.timeShift=function(t,i){if(this.manifestService.isLive()&&!(this.Sr.length<1)){this.Xr=!1;for(var n=this.Sr[0].t,r=this.cr(),o=t*this.Ur,a=Math.max(this.Wr,this.settings.MIN_TIMELINE_LIVE_OFFSET)*this.Ur,s=Math.max(n+a,r+o),u=this.Sr.length-1;u>=0;u--)if(this.Sr[u].t<=s){this.Qr=u;break}(this.Qr>=this.Sr.length||this.Qr<=0)&&(this.context.logger.debug("timeline index ran out of bounds on timeShift, falling back to 0"),this.Qr=0),this.context.logger.debug("timeShift changes index to "+this.Qr),this.Tr=!1,e.prototype.setIndex.call(this,this.Sr[this.Qr].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.Qr--,this.Qr<0&&(this.context.logger.debug("Timeline array index is smaller than 0, probably a discontinuity. Using 0."),this.Qr=0),!0},t.prototype.dr=function(e,t){for(var i,n={entries:[],latestTime:0,latestOriginalTime:0,lastPreviousTimelineEntryIndex:0,index:this.getStartNumber()},r=0,o=0,a=0,s=e;a<s.length;a++)for(var u=0,c=null!=(i=s[a].S)?i:[];u<c.length;u++){var l=c[u],p=(0,d.parseStringToNumber)(l._r),f=parseInt(l._d);if(l.hasOwnProperty("_t")){var g=(0,d.parseStringToNumber)(l._t);n.latestOriginalTime=g,n.latestTime=g-this.Vr}for(;n.latestTime+f<=0&&p>=0;)this.context.logger.debug("Negative timeline entry detected, discarding segment. Time: ".concat(n.latestTime,", presentationTimeOffset: ").concat(this.Vr,".")),n.latestTime+=f,n.latestOriginalTime+=f,p--;for(var m=this.gr(n,t,f,p),y=0;y<m.length;y++)m[y].i=n.index+y;r+=m.length,h(n,m,f);var v=p-m.length+1;o+=v,h(n,this.fr(n,v,f),f)}return this.er(r,o),n.entries},t.prototype.er=function(e,t){var i;this.context.logger.debug("[SegmentTimeline][".concat(null==(i=this.currentRepresentationId)?void 0:i.representationId,"] Re-using ").concat(e," entries, adding ").concat(t," new entries"))},t.prototype.fr=function(e,t,i){for(var n=[],r=0;r<t;r++){var o=e.latestTime+i*r,a={d:i,t:o,ot:e.latestOriginalTime+i*r,i:e.index+r,playbackTime:o/this.Ur,duration:i/this.Ur};n.push(a)}return n},t.prototype.gr=function(e,t,i,n){var r=(0,o.findIndexWithin)(t,e.lastPreviousTimelineEntryIndex,t.length,function(t){return t.t===e.latestTime&&t.d===i});if(-1===r)return[];var a=function(e,t,i,n){for(var r=e[t].t,o=n;o>0;o--){var a=t+o,s=e[a],u=r+i*o;if(s&&s.t===u&&s.d===i)return a}return t}(t,r,i,n);return e.lastPreviousTimelineEntryIndex=a,t.slice(r,a+1)},t.prototype.getTimelineDuration=function(){var e=this;return this.Sr&&this.Sr.length>0&&isFinite(this.Ur)?this.Sr.reduce(function(t,i){return t+i.d/e.Ur},0):0},t.prototype.getTimelineLength=function(){return this.Sr?this.Sr.length:0},t.prototype.setTimeline=function(e,t){void 0===t&&(t=!1);var i=e.SegmentTimeline;if(this.Xr=this.Xr||!!t,i&&this.Rr!==i){this.Rr=i;var n=this.hr(),r=this.getTimescale();this.Ur=r,this.Vr=parseFloat(String(e._presentationTimeOffset))||0;var o=this.dr(i,this.Sr);o.length>0&&(this.Wr=o[0].d/r),this.ir(o,r,n),this.Sr=o}},t.prototype.hr=function(){return this.Sr&&this.Sr.length>0?this.Ur:this.getTimescale()},t.prototype.ir=function(t,i,n){var r,o=!1;if(this.Sr&&this.Sr.length>0?r=(o=this.Qr>=this.Sr.length)?this.Sr[this.Sr.length-1]:this.Sr[this.Qr]:(this.Qr=0,e.prototype.setIndex.call(this,0)),r){for(var a=t.length-1;a>=0;a--)if(g(t[a],i,r,n)){this.Qr=a+ +!!o,e.prototype.setIndex.call(this,t[a].i+ +!!o);break}}},t.prototype.getSegmentDurationCurrentElement=function(){var e=this.Sr[this.Qr];return e?e.d/this.Ur:1},t.prototype.dispose=function(){this.settings=null,this.Sr=[]},t}(l.SegmentTemplateMPDHandler);var p=1e8;function f(e){return Math.round(e*p)/p}function g(e,t,i,n){var r=f(e.t/t),o=f(r+e.d/t),a=f(i.t/n);return r<=a&&a<o}},4771:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,i,r){var o=e.match(/(\$((RepresentationID)|(Bandwidth)|(Time)|(Number(%([\d]*[A-Za-z]))?)|())\$)/g),a=null!=i,s=t.hasOwnProperty("_bandwidth"),u=null!=r;function c(e){if(0===e.indexOf("Number")&&a){if(e.indexOf("%")>-1){var n=function(e){var t=parseInt(e.substring(0,e.length-1)),i=e[e.length-1].toLowerCase(),n=0!==e[e.length-1].indexOf(i);return[0===i.indexOf("o")?8:0===i.indexOf("x")?16:(i.indexOf("d"),10),t,n]}(e.substring(e.indexOf("%")+1)),o=n[0],c=n[1],l=n[2];return function(e,t){for(;e.length<t;)e="0"+e;return e}(function(e,t){return t?e.toUpperCase():e.toLowerCase()}(i.toString(o),l),c)}return String(i)}return 0===e.indexOf("RepresentationID")?t._internalId.representationId:0===e.indexOf("Bandwidth")&&s?String(t._bandwidth):0===e.indexOf("Time")&&u?String(r):""===e?"$":void 0}var l=[].concat(o).filter(function(e){return e}).map(function(e){return e.substring(1,e.length-1)}).map(function(e){return[e,c(e)]}).filter(function(e){return e[1].length>0}).reduce(function(e,t){var i=t[0],n=t[1];return e.replace("$".concat(i,"$"),n)},e);return(0,n.forceReallocation)(l)};var n=i(20649)},39761:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.getFirstAvSegmentTemplateFromPeriod=function(e){var t,i=e.AdaptationSet.find(function(e){return n.MimeTypeHelper.isAV(e._mimeType)}),r=null==(t=null==i?void 0:i.Representation[0])?void 0:t.SegmentTemplate;return null==r?void 0:r[0]},t.calculateTimelineEnd=function(e){for(var t,i,n=parseFloat(String(e._presentationTimeOffset))||0,a=(0,r.getTimescaleFromTemplate)(e),s=0,u=0,c=null!=(t=e.SegmentTimeline)?t:[];u<c.length;u++)for(var l=0,d=null!=(i=c[u].S)?i:[];l<d.length;l++){var h=d[l],p=o(h._r),f=parseInt(h._d);h.hasOwnProperty("_t")&&(s=Math.max(0,o(h._t)-n)),s+=f*(p+1)}return s/a},t.parseStringToNumber=o;var n=i(85434),r=i(12054);function o(e,t){return void 0===t&&(t=0),e?parseInt(e):t}}},function(e){return e(e.s=66759)}])},882:function(e){"use strict";self,e.exports=(self.webpackChunkbitmovin_player=self.webpackChunkbitmovin_player||[]).push([[766],{67579:function(e,t){var i;Object.defineProperty(t,"__esModule",{value:!0}),t.MediaKeySystemConfig=void 0,function(e){!function(e){e.Required="required",e.Optional="optional"}(e.PersistentState||(e.PersistentState={})),function(e){e.Optional="optional",e.NotAllowed="not-allowed"}(e.DistinctiveIdentifier||(e.DistinctiveIdentifier={})),function(e){e.Temporary="temporary",e.PersistentLicense="persistent-license"}(e.SessionType||(e.SessionType={}))}(i||(t.MediaKeySystemConfig=i={}))},88559:function(e,t,i){var n=this&&this.__spreadArray||function(e,t,i){if(i||2==arguments.length)for(var n,r=0,o=t.length;r<o;r++)!n&&r in t||(n||(n=Array.prototype.slice.call(t,0,r)),n[r]=t[r]);return e.concat(n||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.ContentProtectionHelper=void 0;var r=i(25811),o=i(51682),a=i(33468),s=i(74853),u=i(70233),c=i(92656),l="_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=c.PlayReady.parseWrmHeader(e,4);if(!t||!t.length)return[];var i=c.PlayReady.extractKeyIdsFromPlayReadyHeaders(t);return i&&i.length?i.map(function(e){return function(e){var t=s.ArrayHelper.stringToArrayWithoutEncoding(atob(e));return c.PlayReady.kidToCENC(t),s.ArrayHelper.arrayBufferToAsciiString(t.buffer)}(e)}):[]},e.getFirstKeyId=function(e){if(!e||!e.length)return null;for(var t=0,i=e;t<i.length;t++){var n=f(i[t]);if(n&&n.length)return n[0]}return null},e.writeKeySystemId=function(e,t,i){return e.setUint32(t,parseInt(i.substring(0,8),16)),t+=4,e.setUint32(t,parseInt(i.substring(8,16),16)),t+=4,e.setUint32(t,parseInt(i.substring(16,24),16)),t+=4,e.setUint32(t,parseInt(i.substring(24,32),16)),t+4},e.writeKeyIds=function(t,i,n){return t.setUint32(i,n.length),i+=4,n.forEach(function(n){t.setUint32(i,e.extractUint32FromString(n,0)),i+=4,t.setUint32(i,e.extractUint32FromString(n,4)),i+=4,t.setUint32(i,e.extractUint32FromString(n,8)),i+=4,t.setUint32(i,e.extractUint32FromString(n,12)),i+=4}),i},e.extractKeySystemIdFromUri=function(e){return e.replace(/-/g,"").split(":")[2]},e.wrapInPsshBox=function(e,t){var i=s.ArrayHelper.stringToArrayWithoutEncoding(atob(e)),n=this.parseKeyIds(i),r=n.length>0,a=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&&(a+=o.ISOBMFFConstants.PSSH_KID_COUNT_LENGTH+n.length*o.ISOBMFFConstants.PSSH_KID_LEN);var u=this.extractKeySystemIdFromUri(t),c=a+i.byteLength,l=new Uint8Array(c),d=new DataView(l.buffer),h=0;if(d.setUint32(h,c),h+=4,d.setUint32(h,0x70737368),h+=4,d.setUint8(h,+!!r),h+=1,h+=3,!u||32!==u.length)return s.ArrayHelper.arrayBufferToAsciiString(i.buffer);h=this.writeKeySystemId(d,h,u),r&&(h=this.writeKeyIds(d,h,n)),d.setUint32(h,i.length),h+=4;for(var p=0;p<i.byteLength;p++)d.setUint8(h+p,i[p]);return btoa(s.ArrayHelper.arrayBufferToAsciiString(l.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=s.ArrayHelper.stringToArrayWithoutEncoding(atob(e)),i=this.parseBoxSize(t),n=this.parseBoxType(t);return i===t.byteLength&&"pssh"===n},e.extractKidsFromPSSHBox=function(e){if(!e||e.byteLength<3)return[];var t=8,i=[],n=new DataView(e);if(0>=n.getUint8(t))return[];t+=20;var r=n.getUint32(t);t+=4;for(var o=0;o<r;o++){for(var a="",s=t;s<t+16;s++)a+=("00"+n.getUint8(s).toString(16)).slice(-2);t+=16,i.push(u.FormatHelper.beautifyUUID(a))}return i},e.parseContentProtection=function(t,i){var n=function(e){if(r.DRMSchemeIDURIs[e])return e;var t=(0,a.keySystemUidToKind)(e);return(0,r.keySystemNameToSchemeUri)(t)}(t.keyformat);if(!n)return null;e.isValidPsshBox(i)||(i=e.wrapInPsshBox(i,n));var o={schemeIdUri:n,pssh:i};return t.keyid&&(o.defaultKid=t.keyid),o},e.parseContentProtectionDescriptors=function(e){return e.filter(h).map(p)},e}();function h(e){var t;return r.DRMSchemeIDURIs.hasOwnProperty(null==(t=null==e?void 0:e._schemeIdUri)?void 0:t.toLowerCase())}function p(e){var t,i={schemeIdUri:e._schemeIdUri.toLowerCase(),name:r.DRMSchemeIDURIs[e._schemeIdUri.toLowerCase()]};"cenc"===i.name&&"string"==typeof e[l]&&(i.defaultKid=e[l].toLowerCase());var o=(null==(t=e.pssh)?void 0:t.length)>0?e.pssh:function(e,t){return(null==e?void 0:e.length)>0?e.map(function(e){return{__text:d.wrapInPsshBox(e.__text,t)}}):[]}(e.pro,e._schemeIdUri);return o.length>0&&(i.pssh=[],i.kids=[],i.psshData=[]),o.forEach(function(e){var t=atob(e.__text),r=s.ArrayHelper.stringToArrayWithoutEncoding(t).buffer,o=d.extractKidsFromPSSHBox(r);i.pssh.push(t),i.psshData.push(r),i.kids=n(n([],i.kids,!0),o,!0)}),i}function f(e){var t=e._schemeIdUri.toLowerCase(),i=r.DRMSchemeIDURIs[t];return"cenc"===i&&"string"==typeof e[l]?[e[l].toLowerCase()]:"playready"===i&&e.pro&&e.pro.length?function(e){var t=g(e,"pro");return d.parseKeyIds(t).map(function(e){return u.FormatHelper.bytesToUUID(s.ArrayHelper.stringToArrayWithoutEncoding(e))})}(e):function(e){var t=g(e,"pssh");return d.extractKidsFromPSSHBox(t.buffer)}(e)}function g(e,t){var i=function(e,t){var i,n,r=null!=(i=e[t])?i:null;if(!r)return"";var o=null!=(n=r[0])?n:null;return o?o.__text:""}(e,t);return s.ArrayHelper.stringToArrayWithoutEncoding(atob(i))}t.ContentProtectionHelper=d},29173:function(e,t,i){var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])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=i(66790),o=i(40306),a=i(3336),s=i(20213),u=i(33468),c=i(48488),l=i(15971),d=i(74853),h=i(34841),p=i(70581),f=i(92656),g=i(58857),m=i(84344);t.DRMManager=function(){function e(e){var t=this;this.So=function(){return Promise.all([t.Po.promise,t.Qo.promise]).then(t.Zo).catch(function(){})},this.To=function(e){return t.addInitData(e)},this.isLicenseRequestOngoing=function(){return!(!t.emeHandler||"function"!=typeof t.emeHandler.isLicenseRequestOngoing)&&t.emeHandler.isLicenseRequestOngoing()},this.Xo=function(e,i){if(t.context.logger.debug("DRM license request failed",JSON.stringify(e)),e.response!==f.EMPTY_KEY_MESSAGE)return e.hasOwnProperty("statusCode")&&"postponed"===e.statusCode?(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)):void(t.usedKeySystem.kind?(t.licenseStorage.addLicense(t.usedKeySystem.kind,{initDataStr:e.initDataStr}),i.forEach(function(e){return t.context.store.dispatch((0,c.trackDrmKidError)(e))})):t.context.logger.debug("key system info not available, probably has already been shut down due to an error"))},this.Yo=function(e){t.usedKeySystem.kind&&t.licenseStorage.addLicense(t.usedKeySystem.kind,e)},this.Zo=function(){t.usedKeySystem.kind&&!t.Oo&&t.context.eventHandler.fireError(new a.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.No=!1,this.licenseStorage=new g.LicenseStorage(this.context),this.context.videoElement.drmHandler=this,this.Oo=!1,this.Po=new h.Deferred,this.Po.promise.catch(function(){}),this.Qo=new h.Deferred,this.usedKeySystem={kind:null,uid:null}}return e.prototype.shutdown=function(){var e;return this.Ro=!0,this.licenseStorage.dispose(),this.context.videoElement.drmHandler=null,this.No=!1,this.usedKeySystem={kind:null,uid:null},this.Oo=!1,this.Po.reject(),null==(e=(0,l.getSourceStore)(this.context))||e.dispatch((0,c.resetUsedKeySystem)()),null===this.emeHandler?Promise.resolve():(this.emeHandler.setWaitingForKeyListener(null),this.emeHandler.unload())},e.prototype.Uo=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.Vo=function(){this.licenseStorage.getEntriesWithoutLicense().some(function(e){return e.initData})&&(this.Oo=!0)},e.prototype.Wo=function(){var e=this;this.licenseStorage.getEntriesWithoutLicense().filter(function(e){return e.initData&&!e.initDataStr}).forEach(function(t){var i=e.emeHandler.getIdentifierFromInitData(d.ArrayHelper.arrayBufferToAsciiString(t.initData));e.licenseStorage.updateInitData(n(n({},t),{initDataStr:i}))})},e.prototype.setConfig=function(e,t){var i=this,n=(0,u.getRelevantKeySystemMap)(e);return(0,m.resolveDRMSystem)(n,e,this.context).then(function(e){if(i.Ro)return i.context.logger.debug("Shutdown in progress - prevented resolving DRM system!"),Promise.reject(Error(r.DrmSetupError.CANCELLED));i.usedKeySystem=e.keySystem,i.No=!0,null==(n=(0,l.getSourceStore)(i.context))||n.dispatch((0,c.setUsedKeySystem)(i.usedKeySystem)),i.emeHandler=e.emeHandler.instance,i.emeHandler.setEncryptedListener(i.To),i.emeHandler.setWaitingForKeyListener(i.So);var n,o=i.emeHandler.load(e.keySystem.instance,e.keySystem.uid,e.config,t);return i.Uo(),i.Vo(),i.Wo(),i.requestMissingLicenses(),i.Po.resolve(),o.then(function(){return e.emeHandler.kind})}).catch(function(e){return i.context.logger.debug("Error while loading EME handler: ".concat(null==e?void 0:e.message),e),null!==i.emeHandler&&i.emeHandler.unload(),i.Po.reject(),Promise.reject(e)})},e.prototype.requestMissingLicenses=function(){var e=this;this.No&&this.usedKeySystem.kind&&this.licenseStorage.getEntriesWithoutLicense().forEach(function(t){var i=t.initData,n=t.initDataStr,r=t.sessionId,o=t.systemName,a=t.wasRequested,s=t.isPending;o===e.usedKeySystem.kind?i?a||(e.licenseStorage.setRequested(n,o),e.emeHandler.requestLicense(i,n,r).then(e.Yo).catch(function(i){return e.Xo(i,t.keyIds)})):s||e.licenseStorage.setPending(n,o):e.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 p.UnprefixedEMEHandler?this.licenseStorage.hasUsableOrPendingMediaKey(e,this.usedKeySystem.kind):this.licenseStorage.hasLicense(e,this.usedKeySystem.kind)},e.prototype.addInitData=function(e){var t,i;if(e&&(!this.usedKeySystem.kind||e.systemName===this.usedKeySystem.kind)){var r=this.preprocessInitDataStr(e),o=this.usedKeySystem.kind||e.systemName,a=r?this.licenseStorage.getLicense(r,o):void 0;(null==a?void 0:a.initData)||(e.initDataStr=r,e.kid=null!=(i=null==(t=this.emeHandler)?void 0:t.getKeyUuidsFromInitData(e.initData))?i:[],a?this.licenseStorage.updateInitData(n(n({},a),{systemName:o,initData:e.initData,initDataStr:e.initDataStr,keyIds:e.kid})):this.licenseStorage.add(e),this.Oo=this.Oo||!!(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.Qo.resolve()},e.prototype.prepareForMseShutdown=function(){var e,t,i;return null!=(i=null==(t=null==(e=this.emeHandler)?void 0:e.prepareForMseShutdown)?void 0:t.call(e))?i: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(s.WarningCode.DRM_LICENSE_RENEWAL_FAILED);if(!(null==(i=this.emeHandler)?void 0:i.disposeSessionForInitData))return this.context.logger.debug("RenewLicense is not supported for the current EME."),Promise.reject(s.WarningCode.DRM_LICENSE_RENEWAL_FAILED);var t,i,n=this.licenseStorage.findLicenseForPublicId(e,this.usedKeySystem.kind);return n?this.ao(n.initDataStr):(this.context.logger.debug("Could not find active drm session for "+e),Promise.reject(s.WarningCode.DRM_LICENSE_RENEWAL_FAILED))},e.prototype.isUsingUnprefixedEmeHandler=function(){return!!this.emeHandler&&this.emeHandler instanceof p.UnprefixedEMEHandler},e.prototype.ao=function(e){var t=this;return this.licenseStorage.resetLicense(this.usedKeySystem.kind,e),this.emeHandler.disposeSessionForInitData(e).then(function(){return t.requestMissingLicenses()}).catch(function(i){return t.context.eventHandler.dispatchEvent(s.PlayerEvent.Warning,new s.PlayerWarning(s.WarningCode.DRM_LICENSE_RENEWAL_FAILED,null,{keyIds:e.split(";"),error:i})),Promise.reject(i)})},e}()}
vendor: 1,397 bytes, line 1
1,34079:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.createDrmApi=function(e,t){return new(function(){function i(){}return i.prototype.renewLicense=function(i){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(n.ServiceName.DrmService);return o?o.renewLicense(i):(t.debug("No DRM source loaded, ignoring renewLicense call"),Promise.reject("NoDrmSource"))},i}())};var n=i(80813)},97115:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.createDrmManager=function(e){return(0,r.getCapabilities)()[n.CapabilityKey.isTizen]&&o.ModuleManager.has(a.ModuleName.Tizen)?o.ModuleManager.get(a.ModuleName.Tizen).createTizenDRMManager(e):(0,r.getCapabilities)()[n.CapabilityKey.isWebOS]&&o.ModuleManager.has(a.ModuleName.Webos)?new(o.ModuleManager.get(a.ModuleName.Webos).getWebosDrmManagerConstructor())(e):new s.DRMManager(e)};var n=i(7387),r=i(21513),o=i(88052),a=i(62756),s=i(29173)},93101:function(e,t,i){var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])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=i(66790),o=i(33468),a=i(7387),s=i(21513),u=i(93204),c=i(34841),l=i(4
16057),d=i(97115),h=i(55327),p=i(84344),f=i(99921);t.DrmService=function(){function e(e){this.context=e,this.eo=new c.Deferred,this.fo=!1,this.io=Promise.resolve()}return e.prototype.jo=function(){var e=this;this.mo().then(function(){return e.co=(0,d.createDrmManager)(e.context)})},e.prototype.canReuseEmeHandler=function(){var e=this.go;return e===f.EMEHandlerKind.UNPREFIXED||e===f.EMEHandlerKind.MS_PREFIXED},e.prototype.reInitializeEmeHandler=function(){return this.co.reInitializeEmeHandler()},e.prototype.resolveDrmSystemFromSourceConfig=function(e){var t=this;if(!this.ho){var i=(0,o.getRelevantKeySystemMap)(e);this.ho=(0,l.yieldToMain)().then(function(){return(0,p.resolveUsedDRMSystem)(i,e,t.context)}).then(function(i){return t.context.logger.debug("Early DRM key system resolved",i),n(n({},i),{config:e})}).catch(function(e){return t.context.logger.debug("Early DRM key system resolving failed:",e),null})}},e.prototype.setDrmConfig=function(e){this.bo=e,this.eo=new c.Deferred,this.fo=!1,this.jo()},e.prototype.updateDrmConfig=function(e,t){var i=this;return this.fo?this.eo.promise:(this.bo=n(n({},this.bo),e),this.fo=!0,this.co.setConfig(this.bo,t).then(function(e){i.go=e,i.eo.resolve()}).catch(function(e){i.fo=!1,i.eo.reject(e)}).finally(function(){return i.eo.promise}))},e.prototype.addInitData=function(e){var t=this;this.co&&this.eo.promise.then(function(){var i;return null==(i=t.co)?void 0:i.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,i;return null!=(i=null==(t=this.co)?void 0:t.renewLicense(e))?i:Promise.reject("No active drm manager")},e.prototype.getUsedKeySystemKind=function(){var e;return(null==(e=this.co)?void 0:e.getUsedKeySystemKind())||null},e.prototype.getUsedKeySystemUid=function(){var e;return(null==(e=this.co)?void 0:e.getUsedKeySystemUid())||null},e.prototype.getUsedOrEarlyResolvedKeySystemUid=function(){var e=this.getUsedKeySystemUid();return e?Promise.resolve(e):this.ho?this.ho.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.ho||Promise.resolve(null)},e.prototype.waitForPendingLicenseRequests=function(e){var t=this,i=function(){var i,n;return null!=(n=null==(i=t.co)?void 0:i.hasOngoingLicenseRequests(e))&&n};if(!i())return Promise.resolve();this.context.logger.debug("Waiting for pending DRM license requests to complete");var n=new c.Deferred,r=(0,u.subscribe)(this.context.store)(function(e){return h.getLicenseState(e)},function(){i()||(r(),n.resolve())});return n.promise},e.prototype.ko=function(e){var t,i=this;if(null==(t=this.co)?void 0:t.hasUsableMediaKey(e))return Promise.resolve();var n=new c.Deferred,r=(0,u.subscribe)(this.context.store)(function(e){return h.getLicenseState(e)},function(){var t;(null==(t=i.co)?void 0:t.hasUsableMediaKey(e))&&(i.context.logger.debug("DRM license added for key ID ".concat(e)),r(),n.resolve())});return this.co&&this.co.requestMissingLicenses(),n.promise},e.prototype.lo=function(e){var t,i,n,r=this.getUsedKeySystemKind()===o.KeySystemKind.PLAYREADY,u=(0,s.getCapabilities)()[a.CapabilityKey.isEdge],c=null!=(i=null==(t=this.co)?void 0:t.isUsingUnprefixedEmeHandler())&&i,l=r&&u&&c,d=e.hasDrmKid()?e.getDrmKid():void 0;return!(!this.fo||void 0===d||!l||(null==(n=this.co)?void 0:n.hasUsableMediaKey(d)))},e.prototype.maybeWaitForDrmLicense=function(e,t){var i=this,n=!e.isInit()||e.isSelfInit(),r=this.lo(e),o=void 0!==t&&Object.keys(t).length>0,a=e.hasDrmKid()?e.getDrmKid():void 0;return o&&r&&n&&void 0!==a?(this.context.logger.debug("Deferring appendage of ".concat(e.getUrl()," as DRM license for key ID ").concat(a," has not yet been requested")),e.getDrmInitData().forEach(function(e){return i.addInitData(e)}),this.ko(a)):Promise.resolve()},e.prototype.preprocessInitDataStr=function(e){return this.co.preprocessInitDataStr(e)},e.prototype.signalInitDataShouldBeAvailable=function(){this.co.signalInitDataShouldBeAvailable()},Object.defineProperty(e.prototype,"shutdownPromise",{get:function(){return this.io}
vendor: 6,399 bytes, line 1
1,enumerable:!1,configurable:!0}),e.prototype.mo=function(){var e=this;return this.co&&(this.io=this.io.then(function(){var t;return null==(t=e.co)?void 0:t.shutdown().catch(function(t){e.context.logger.debug("Couldn't shut down DRMManager ".concat(t))})})),this.io},e.prototype.shutdownIfNeeded=function(e){return e&&this.canReuseEmeHandler()?Promise.resolve():this.release()},e.prototype.release=function(){var e=this;return this.bo=null,this.mo().then(function(){return e.co=null})},e.prototype.prepareForMseShutdown=function(){var e,t;return null!=(t=null==(e=this.co)?void 0:e.prepareForMseShutdown())?t:Promise.resolve()},e.prototype.suspend=function(){var e,t;return null!=(t=null==(e=this.co)?void 0:e.suspend())?t:Promise.resolve()},e.prototype.dispose=function(){this.release()},e.prototype.isDrmConfigSet=function(){return!!this.bo},e}()},24109:function(e,t,i){var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])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 r,o,a=i(40306),s=i(3336),u=i(4129),c=i(91523),l=i(57456),d=i(29669),h=i(74853),p=i(88844),f=i(19274);!function(e){e[e.MEDIA_KEYERR_DOMAIN=6]="MEDIA_KEYERR_DOMAIN"}(r||(r={})),function(e){e.FPS_1="com.apple.fps.1_0"}(o||(t.SupportedFairplayKeySystems=o={})),t.FairplayHandler=function(){function e(t,i,n){var o=this;this.Go=function(e){if(o.ro){o.so=!0;var t=e.initData,i=o.Vp(t);if(o.Co(t),o.xo)o.Jo(i,t);else{var n=o.ro.serverCertificate;if(n)return n instanceof ArrayBuffer==0?void o.no.eventHandler.fireError(new s.PlayerError(a.ErrorCode.DRM_CERTIFICATE_ERROR,void 0,"The provided `AppleFairplayDRMConfig.serverCertificate` is not of type `ArrayBuffer`.",o.no.sourceContext.sourceIdentifier)):(o.xo=o.Io(n),void o.Jo(i,t));o.Fo().then(function(e){o.xo=o.Io(e.body),o.Jo(i,t)}).catch(function(e){o.no.logger.debug("Error while loading the certificate ",e)}),o.Ao()}}else o.no.eventHandler.fireError(new s.PlayerError(a.ErrorCode.DRM_MISSING_CONFIGURATION,void 0,"A FairPlay DRM config is required to play this source, but none was provided.",o.no.sourceContext.sourceIdentifier))},this.Up=function(e,t){o.no.eventHandler.fireError(new s.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,"."),o.no.sourceContext.sourceIdentifier))},this.Yp=function(){(0,p.clearTimeoutIfDefined)(o.yo)},this.Zp=function(t,i){o.so=!0;var n=t.message,r=t.target,c=o.ro,h=c.withCredentials,p=void 0!==h&&h,f=c.licenseResponseType,g=void 0===f?d.HttpResponseType.TEXT:f,m=c.maxLicenseRequestRetries,y=c.headers,v=c.prepareMessage,S=l.XhrHelper.mergeHeaders({"Content-Type":"application/x-www-form-urlencoded"},y),b=o.Do(m),E=new u.DefaultContentLoader(o.no,{maxRetries:b,requestType:d.HttpRequestType.DRM_LICENSE_FAIRPLAY});t.messageBase64Encoded=e.base64EncodeUint8Array(n);var T="function"==typeof v?v(t,r):"spc=".concat(encodeURIComponent(t.messageBase64Encoded),"&assetId=").concat(r.contentId),_=o.Ho(i);_&&"string"==typeof _?E.load(_,d.HttpRequestMethod.POST,g,T,S,p).then(function(e){o.ap(e,r)}).catch(o.bp):(o.so=!1,o.no.eventHandler.fireError(new s.PlayerError(a.ErrorCode.DRM_NO_LICENSE_SERVER_URL_PROVIDED,{licenseServer:_},"No valid license server URL was provided through the FairPlay DRM config.",o.no.sourceContext.sourceIdentifier)))},this.ap=function(t,i){if(o.so=!1,"function"!=typeof o.ro.prepareLicenseAsync){var n=t.body;"function"==typeof o.ro.prepareLicense?n=o.ro.prepareLicense(n):(n=n.trim()).startsWith("<ckc>")&&n.endsWith("</ckc>")&&(n=n.slice(5,-6));var r=n;"string"==typeof n&&(r=e.base64DecodeUint8Array(n)),i.update(r)}else o.ro.prepareLicenseAsync(t.body).then(function(e){i.update(e)}).catch(function(e){o.no.logger.log(e),o.no.eventHandler.fireError(new s.PlayerError(a.ErrorCode.DRM_CERTIFICATE_ERROR,{reason:e},"Unable to parse the certificate: `AppleFairplayDRMConfig.prepareLicenseAsync` failed.",o.no.sourceContext.sourceIdentifier))})},this.bp=function(e){o.so=!1,o.no.logger.debug("The license request failed."),o.no.eventHandler.fireError(new s.PlayerError(a.ErrorCode.DRM_FAILED_LICENSE_REQUEST,{responseCode:e.status,responseText:e.statusText,serverResponse:e.body},void 0,o.oo))},this.cp=function(e){o.so=!1,o.no.logger.debug("A decryption key error was encountered"),o.no.logger.debug(e);var t=e.target,i=t?t.error:{},n=i.code,u=i.systemCode,c=o.uo&&o.no.settings.FAIRPLAY_IGNORE_DUPLICATE_INIT_DATA_KEY_ERRORS;n===r.MEDIA_KEYERR_DOMAIN&&0x48444350===u?o.no.eventHandler.fireError(new s.PlayerError(a.ErrorCode.DRM_RESTRICTED_OUTPUT,void 0,void 0,o.oo)):c?o.no.logger.debug("Ignoring key error as duplicate needkey events have been tracked"):o.no.eventHandler.fireError(new s.PlayerError(a.ErrorCode.DRM_KEY_ERROR,{code:n,systemCode:u},void 0,o.oo))},this.dp=function(){o.no.logger.debug("Decryption key was added to session.")},this.isLicenseRequestOngoing=function(){return o.so},this.no=t,this.oo=t.sourceContext.sourceIdentifier,this.po=t.settings,this.qo=i,this.ro=n,this.so=!1,this.to=[],this.uo=!1,this.wo=null,this.vo=null,n&&n.hasOwnProperty("certificateURL")&&(this.zo=n.certificateURL),this.qo.drmHandler=this,this.qo.addEventListener(f.MediaElementEvent.webkitneedkey,this.Go),this.qo.addEventListener(f.MediaElementEvent.error,this.Yp)}return e.prototype.Ao=function(){var e=this;(0,p.clearTimeoutIfDefined)(this.yo);var t=(0,c.getRequestTimeout)(this.no,d.HttpRequestType.DRM_CERTIFICATE_FAIRPLAY);this.yo=window.setTimeout(function(){e.no.eventHandler.fireError(new s.PlayerError(a.ErrorCode.DRM_CERTIFICATE_ERROR,void 0,"The FairPlay certificate request was not completed within the timeout of ".concat(t," ms."),e.no.sourceContext.sourceIdentifier))},t)},e.stringToArray=function(e){for(var t=new ArrayBuffer(2*e.length),i=new Uint16Array(t),n=0,r=e.length;n<r;n++)i[n]=e.charCodeAt(n);return i},e.base64DecodeUint8Array=function(e){for(var t=window.atob(e),i=t.length,n=new Uint8Array(new ArrayBuffer(i)),r=0;r<i;r++)n[r]=t.charCodeAt(r);return n},e.base64EncodeUint8Array=function(e){for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
1+/=",i="",n=0;n<e.length;){var r=e[n++],o=n<e.length?e[n++]:NaN,a=n<e.length?e[n++]:NaN,s=r>>2,u=(3&r)<<4|o>>4,c=(15&o)<<2|a>>6,l=63&a;isNaN(o)?c=l=64:isNaN(a)&&(l=64),i+=t.charAt(s)+t.charAt(u)+t.charAt(c)+t.charAt(l)}return i},e.prototype.Bo=function(e,t,i,n){void 0===n&&(n=null),i.addEventListener(e,function(e){return t(e,n)},!1)},e.prototype.Co=function(e){var t=h.ArrayHelper.arrayBufferToAsciiString(e.buffer,!1);this.to.includes(t)?(this.no.logger.debug("Observed duplicate need key event with initData",t),this.uo=!0):this.to.push(t)},e.prototype.Do=function(e){var t=parseInt("".concat(e));return isFinite(t)?t:3},e.prototype.Eo=function(){var e=this.ro.maxCertificateRequestRetries;return new u.DefaultContentLoader(this.no,{onFailure:this.Up,maxRetries:this.Do(e),requestType:d.HttpRequestType.DRM_CERTIFICATE_FAIRPLAY})},e.prototype.Fo=function(){var e=this,t=this.ro,i=t.withCredentials,r=void 0!==i&&i,o=t.certificateHeaders,a=n({},o);return this.vo=this.Eo(),new Promise(function(t,i){e.vo.load(e.zo,d.HttpRequestMethod.GET,d.HttpResponseType.ARRAYBUFFER,null,a,r).then(function(e){return t(e)}).catch(function(e){return i(e)}).finally(function(){e.vo=null})})},e.prototype.Ho=function(e){var t=h.ArrayHelper.arrayBufferToAsciiString(e.buffer,!1);if(this.ro&&this.ro.hasOwnProperty("LA_URL"))return this.no.logger.debug("licenseServerUrl (config param): "+this.ro.LA_URL),this.ro.LA_URL;if(/skd:\/\//.test(t)){var i="function"==typeof this.ro.getLicenseServerUrl?this.ro.getLicenseServerUrl(t.substring(t.indexOf("skd:"))):t.substring(t.indexOf("skd:")+4);return this.no.logger.debug("licenseServerUrl: "+i),i}return null},e.prototype.Io=function(e){var t="function"==typeof this.ro.prepareCertificate;try{return new Uint8Array(t?this.ro.prepareCertificate(e):e)}catch(e){return void this.no.eventHandler.fireError(new s.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.no.sourceContext.sourceIdentifier))}},e.prototype.Jo=function(e,t){(0,p.clearTimeoutIfDefined)(this.yo);var i=this.Wp(t,e,this.xo);if(this.wo||this.Xp(),this.qo.webkitKeys||this.qo.webkitSetMediaKeys(new WebKitMediaKeys(this.wo)),this.qo.webkitKeys){var n=this.qo.webkitKeys.createSession("video/mp4",i);n?(n.contentId=e,this.Bo("webkitkeymessage",this.Zp,n,t),this.Bo("webkitkeyadded",this.dp,n),this.Bo("webkitkeyerror",this.cp,n)):this.no.eventHandler.fireError(new s.PlayerError(a.ErrorCode.DRM_KEY_SESSION_INITIALIZATION_FAILED,void 0,"Unable to initialize DRM key session: `webkitKeys.createSession` failed.",this.no.sourceContext.sourceIdentifier))}else this.no.eventHandler.fireError(new s.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.no.sourceContext.sourceIdentifier))},e.prototype.Vp=function(e){var t=h.ArrayHelper.arrayBufferToAsciiString(e.buffer,!1);if("function"==typeof this.ro.prepareContentId)t=this.ro.prepareContentId(t);else{var i=t.indexOf("?");t=i<0?"":t.substring(i+1)}return this.no.logger.debug("contentId: "+t),t},e.prototype.Wp=function(t,i,n){var r="string"==typeof i?e.stringToArray(i):i,o=0,a=new ArrayBuffer(t.byteLength+4+r.byteLength+4+n.byteLength),s=new DataView(a);new Uint8Array(a,o,t.byteLength).set(t),o+=t.byteLength,s.setUint32(o,r.byteLength,!0),o+=4;var u=this.ro.useUint16InitData?new Uint16Array(a,o,r.length):new Uint8Array(a,o,r.byteLength);return u.set(r),o+=u.byteLength,s.setUint32(o,n.byteLength,!0),new Uint8Array(a,o+=4,n.byteLength).set(n),new Uint8Array(a,0,a.byteLength)},e.prototype.Xp=function(){var e=Object.keys(o).map(function(e){return o[e]});this.wo=e.find(function(e){return WebKitMediaKeys.isTypeSupported(e,"video/mp4")})||null,this.wo||this.no.eventHandler.fireError(new s.PlayerError(a.ErrorCode.DRM_KEY_SYSTEM_NOT_SUPPORTED,{supportedKeySystem:e},"FairPlay DRM is not supported on this platform.",this.no.sourceContext.sourceIdentifier))},e.prototype.destroy=function(){this.qo.drmHandler=null,this.qo.removeEventListener(f.MediaElementEvent.webkitneedkey,this.Go),this.qo.removeEventListener(f.MediaElementEvent.error,this.Yp),this.wo=null,this.xo=null,this.to=[],this.zo=null,this.uo=!1},e.prototype.dispose=function(){var e;this.destroy(),(0,p.clearTimeoutIfDefined)(this.yo),null==(e=this.vo)||e.cancel(),this.po=null,this.wo=null,this.xo=null,this.zo=null},e}()},58857:function(e,t,i){var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};
vendor: 36,441 bytes, line 1
1Object.defineProperty(t,"__esModule",{value:!0}),t.hasMatchingLicenseInfoForKeySystem=t.LicenseStorage=void 0,t.isMediaKeyStatusUnknownOrPendingOrUsable=function(e){return e.mediaKeyStatus===c.MediaKeyStatus.Usable||e.mediaKeyStatus===c.MediaKeyStatus.Pending||e.mediaKeyStatus===c.MediaKeyStatus.Unknown},t.getKeySystemMap=p,t.getAllLicensesForKeySystem=f;var r=i(3714),o=i(93204),a=i(4358),s=i(91921),u=i(55327),c=i(56068),l=function(){function e(e){var t=this;this.xQ=1,this.yQ=function(e){t.vQ.store.dispatch((0,a.resetLicenses)())},this.BQ=function(){return u.getLicenseState(t.vQ.store.getState())},this.CQ=function(e){t.vQ.store.dispatch(e)},this.vQ=e,this.vQ.store.hasReducer("drmLicenses")||(this.vQ.store.addReducer("drmLicenses",s.LicenseReducer),this.vQ.store.dispatch((0,a.initializeLicenseStorage)(e.storedConfig))),this.zQ(),this.yQ=this.yQ.bind(this),window.addEventListener("beforeunload",this.yQ)}return e.prototype.zQ=function(){var e=this;this.wQ=(0,o.subscribe)(this.vQ.store)(function(e){return u.getLicenseState(e)},function(t){return e.AQ(t)})},e.prototype.AQ=function(e){(0,a.maybeStoreLicences)(e,this.vQ.storedConfig)},e.prototype.add=function(e){var t=e.systemName,i=e.initData,n=e.initDataStr;if(!t||!n||this.getLicense(n,t))return!1;var r={hasLicense:!1,initData:i,initDataStr:n,license:null,isPending:!1,systemName:t,wasRequested:!1,keyIds:e.kid,mediaKeyStatus:c.MediaKeyStatus.Unknown,usedByPlayerId:this.vQ.internalPlayerID};return this.CQ((0,a.addLicense)({systemName:t,licenseInfo:r,initDataStr:n})),!0},e.prototype.addLicense=function(e,t){var i=t.initDataStr,o=t.license,s=t.response,u=t.sessionInfo,c=void 0===u?{}:u;if(o||s||t.restoredFromPersistentLicense){var l=this.getLicense(i,e),d=n(n(n({},l||{}),c),{isPending:!1,hasLicense:!0,license:o||null,usedByPlayerId:this.vQ.internalPlayerID});d.publicId||(d.publicId=String(this.xQ++)),this.vQ.eventHandler.dispatchEvent(r.PlayerEvent.DrmLicenseAdded,{license:{id:d.publicId,keyIds:d.initDataStr.split(";"),keySystemString:e}});var h={licenseInfo:d,initDataStr:i,systemName:e};return this.CQ(l?(0,a.updateLicense)(h):(0,a.addLicense)(h))}this.CQ((0,a.removeLicense)({initDataStr:i,systemName:e}))},e.prototype.findLicenseForPublicId=function(e,t){var i,n=this.BQ().drmData[t];return Object.keys(n).forEach(function(t){n[t].publicId===e&&(i=n[t])}),i},e.prototype.getEntriesWithoutLicense=function(){return Object.values(this.BQ().drmData).flatMap(function(e){return Object.values(e)}).filter(function(e){return!e.hasLicense&&!e.wasRequested})},e.prototype.getLicense=function(e,t){var i=this.BQ(),n=(0,a.getLicenseInfoKey)(e);return i.drmData[t]&&i.drmData[t][n]},e.prototype.getAllLicensesForKeySystem=function(e){return f(e,this.BQ())},e.prototype.DQ=function(e,t,i){var r=this.getLicense(e,t);r&&this.CQ((0,a.updateLicense)({initDataStr:e,licenseInfo:i(n({},r)),systemName:t}))},e.prototype.setRequested=function(e,t){this.DQ(e,t,function(e){return n(n({},e),{wasRequested:!0})})},e.prototype.hasLicense=function(e,i){return(0,t.hasMatchingLicenseInfoForKeySystem)(e,p(this.BQ(),i),d)},e.prototype.hasUsableOrPendingMediaKey=function(e,i){return(0,t.hasMatchingLicenseInfoForKeySystem)(e,p(this.BQ(),i),h)},e.prototype.hasOngoingLicenseRequests=function(e){return this.getAllLicensesForKeySystem(e).some(function(e){return!e.hasLicense&&e.wasRequested})},e.prototype.setKeyIds=function(e,t,i){this.DQ(e,t,function(e){return n(n({},e),{keyIds:i})})},e.prototype.setPending=function(e,t){this.DQ(e,t,function(e){return n(n({},e),{isPending:!0})})},e.prototype.resetLicense=function(e,t){var i=this.getLicense(t,e)||{},r=n(n({},i),{keyIds:[],isPending:!1,hasLicense:!1,license:null,expiration:null,sessionId:null,wasRequested:!1});this.CQ((0,a.resetLicense)({systemName:e,initDataStr:t,licenseInfo:r}))},e.prototype.remove=function(e){this.CQ((0,a.removeLicense)({initDataStr:e}))},e.prototype.updateInitData=function(e){var t=e.initDataStr,i=e.systemName;this.CQ((0,a.updateLicense)({initDataStr:t,licenseInfo:e,systemName:i}))},e.prototype.dispose=function(){this.vQ.store.getState().drmLicenses&&!this.vQ.store.getState().drmLicenses.inPersistentState?this.vQ.store.dispatch((0,a.clearLicenseStorage)()):this.vQ.store.dispatch((0,a.resetLicenses)()),this.wQ&&this.wQ(),window.removeEventListener("beforeunload",this.yQ)},e}();function d(e){return e.hasLicense}function h(e){return e.mediaKeyStatus===c.MediaKeyStatus.Usable||e.mediaKeyStatus===c.MediaKeyStatus.Pending}function p(e,t){var i;return null!=(i=null==e?void 0:e.drmData[t])?i:{}}function f(e,t){var i=t.drmData[e];return i?Object.values(i):[]}t.LicenseStorage=l,t.hasMatchingLicenseInfoForKeySystem=function(e,t,i){return Object.values(t).some(function(t){return t.keyIds.includes(e)&&i(t)})}},47272:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.DRMModuleDefinition=void 0;var n=i(62756),r=i(67579),o=i(88559),a=i(34079),s=i(29173),u=i(93101),c=i(70581),l=i(80680),d=i(24109),h=i(92656),p=i(4358),f=i(55327),g=i(78763),m=i(6234);t.DRMModuleDefinition={name:n.ModuleName.DRM,module:{DrmService:u.DrmService,DRMManager:s.DRMManager,FairplayHandler:d.FairplayHandler,PlayReady:h.PlayReady,DRMDetectorService:g.DRMDetectorService,WebKitPrefixedEMEHandler:l.WebKitPrefixedEMEHandler,UnprefixedEMEHandler:c.UnprefixedEMEHandler,parseInitData:m.parseInitData,getLicenseState:f.getLicenseState,getLicenseInfoKey:p.getLicenseInfoKey,createDrmApi:a.createDrmApi,ContentProtectionHelper:o.ContentProtectionHelper},exports:{MediaKeySystemConfig:r.MediaKeySystemConfig}},t.default=t.DRMModuleDefinition},46658:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.ParallelContentLoader=void 0;var n=i(4129);t.ParallelContentLoader=function(){function e(e,t){this.GQ=[],this.EQ=e,this.FQ=t}return e.prototype.load=function(e,t,i,r,o,a,s,u){var c=this,l=new n.DefaultContentLoader(this.EQ,this.FQ);return this.GQ.push(l),l.load(e,t,i,r,o,a,s,u).finally(function(){c.GQ=c.GQ.filter(function(e){return e!==l}),l.dispose()})},e.prototype.cancel=function(){this.GQ.forEach(function(e){return e.cancel()})},e.prototype.isLoading=function(){return this.GQ.some(function(e){return e.isLoading()})},e.prototype.isRetrying=function(){return this.GQ.some(function(e){return e.isRetrying()})},e.prototype.dispose=function(){this.GQ.forEach(function(e){return e.dispose()}),this.GQ=[]},e}()},86558:function(e,t,i){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 n,r=i(40306),o=i(3336),a=i(34841),s=i(70850),u=i(19274),c=i(6234);!function(e){e.KeyMessage="mskeymessage",e.KeyAdded="mskeyadded",e.KeyError="mskeyerror"}(n||(n={})),t.MSPrefixedEMEHandler=function(){function e(e){var t=this;this.e9=function(){if(t.Q9)return Promise.reject("EME handler destroyed");if(t.c9.readyState===HTMLMediaElement.HAVE_NOTHING)return s.Util.delay(250,t.e9);if(t.c9.msKeys)return t.R9.logger.debug("session already created"),Promise.resolve();try{t.b9=new MSMediaKeys(t.S9),t.c9.msSetMediaKeys(t.b9)}catch(e){return t.T9.fireError(new o.PlayerError(r.ErrorCode.DRM_MEDIA_KEY_INITIALIZATION_FAILED,{keySystem:t.S9,eme:"msPrefixed",error:e},"Unable to initialize the DRM media keys: `msSetMediaKeys` failed.",t.R9.sourceContext.sourceIdentifier)),Promise.reject(e)}return Promise.resolve()},this.f9=function(e){if(t.R9.logger.debug("onKeyNeeded"),t.V9&&t.V9(),e){var i=(0,c.parseInitData)(e.initData);i&&i.length&&t.Y9&&i.forEach(function(e){return t.Y9(e)})}},this.R9=e,this.Q9=!1,this.X9=[],this.U9=!1,this.T9=this.R9.eventHandler}return Object.defineProperty(e.prototype,"c9",{get:function(){return this.R9.videoElement},enumerable:!1,configurable:!0}),e.getVideoErrorNameFromError=function(e,t){for(var i in e)if((i.indexOf("MEDIA_ERR_")>-1||i.indexOf("MEDIA_KEYERR_")>-1)&&e[i]===t)return i;return"UNKNOWN"},e.getHexFromCode=function(e){return isFinite(e)?(e<0&&(e=0xffffffff+e+1),"0x"+e.toString(16).toUpperCase()):null},e.prototype.d9=function(t,i){if(this.U9=!1,null!==t&&t.deferred.reject(),i&&i.target&&i.target.error){this.c9.removeEventListener(u.MediaElementEvent.error,this.Z9);var n=i.target.error,a=Number(n.code),s=Number(n.systemCode),c=Number(n.msExtendedCode),l=e.getVideoErrorNameFromError(n,a),d=e.getHexFromCode(s),h=e.getHexFromCode(c)||d,p=r.ErrorCode[r.ErrorCode.DRM_KEY_ERROR]+" - "+l+" (code: "+a+"), "+h;this.T9.fireError(new o.PlayerError(r.ErrorCode.DRM_KEY_ERROR,{code:a,systemCode:s},p,this.R9.sourceContext.sourceIdentifier))}},e.prototype.g9=function(e,t){var i=this,n=t.target.sessionId;this.a9[n]=t.target,this.U9=!0,this.R9.logger.debug("("+e.id+") onKeyMessage",JSON.stringify(t)),this.P9.handleLicenseRequest(t).then(function(t){i.R9.logger.debug("license available ("+e.id+")"),i.k9(t.body,n,e.id),e.license=t,i.U9=!1}).catch(function(t){i.R9.logger.debug("license request failed ("+e.id+")"),e.deferred.reject(t),i.U9=!1})},e.prototype.h9=function(e,t){this.R9.logger.debug("key added for request ID ".concat(e.id)),e&&e.license?(this.R9.logger.debug("license request successful ("+e.id+")"),e.deferred.resolve(e.license)):e.deferred.resolve({response:"automatically added by EME",licenseRequestId:e.id}),this.U9=!1},e.prototype.i9=function(e){var t=this.P9.getCDMData();return t?this.c9.msKeys.createSession("video/mp4",e,new Uint8Array(t)):this.c9.msKeys.createSession("video/mp4",e)},e.prototype.j9=function(e){var t=this,i={deferred:new a.Deferred,id:s.Util.generateUniqueId()};return e?(this.W9.then(function(){t.c9.msKeys?t.U9?i.deferred.reject({status:"postponed",licenseRequestId:i.id}):(0===e.byteLength&&t.R9.logger.log("no init data"),t.U9=!0,t.R9.logger.debug("create key session ("+i.id+") ..."),i.onKeyError=t.d9.bind(t,i),i.onKeyAdded=t.h9.bind(t,i),i.onKeyMessage=t.g9.bind(t,i),i.session=t.i9(new Uint8Array(e)),i.session.addEventListener(n.KeyError,i.onKeyError,!1),i.session.addEventListener(n.KeyAdded,i.onKeyAdded,!1),i.session.addEventListener(n.KeyMessage,i.onKeyMessage,!1),t.X9.push(i)):t.R9.logger.debug("video.keys not available.")}),i.deferred.promise):Promise.reject("no init data ("+i.id+")")},e.prototype.k9=function(e,t,i){this.U9=!1,e&&(this.R9.logger.debug("updating keySession ("+i+")"),this.a9[t].update(this.P9.prepareLicense(e)))},e.prototype.setWaitingForKeyListener=function(e){this.V9=e},e.prototype.setEncryptedListener=function(e){this.Y9=e},e.prototype.load=function(e,t){var i=this;return this.P9=e,this.S9=t,this.Q9=!1,this.a9={},this.W9=this.e9(),this.W9.then(function(){i.Z9&&i.c9.removeEventListener(u.MediaElementEvent.error,i.Z9),i.Z9=i.d9.bind(i,null),i.c9.addEventListener(u.MediaElementEvent.error,i.Z9)}).catch(function(){}),this.c9.addEventListener(u.MediaElementEvent.msneedkey,this.f9),this.W9},e.prototype.reInitialize=function(){this.c9.eventHandler.hasEventHandler(u.MediaElementEvent.msneedkey,this.f9)||this.c9.addEventListener(u.MediaElementEvent.msneedkey,this.f9),null==this.c9.msKeys?this.c9.msSetMediaKeys(this.b9):this.R9.logger.debug("Unable to reuse msKeys object as there already is an existing one on the video.")},e.prototype.l9=function(e){var t=e.getElementsByTagName("KID");if(!t)return null;for(var i="",n=0;n<t.length;n++){var r=t[n];r&&r.childNodes&&r.childNodes.length>0?i+=r.childNodes[0].nodeValue+";":r&&r.hasAttribute("value")?i+=r.getAttribute("value")+";":r&&r.hasAttribute("VALUE")?i+=r.getAttribute("VALUE")+";":this.R9.logger.debug("could not parse PlayReady KID",r)}return i.split(";")[0]||null},e.prototype.m9=function(e){var t=RegExp("p[\0]+l[\0]+a[\0]+y[\0]+r[\0]+e[\0]+a[\0]+d[\0]+y","gi"),i=RegExp("w[\0]+r[\0]+m[\0]+h[\0]+e[\0]+a[\0]+d[\0]+e[\0]+r","gi"),n=t.test(e)||i.test(e);if(!e.includes("<")||!n)return e;for(var r=e.slice(e.indexOf("<")),o="",a=0;a<r.length;a+=2)o+=r[a];try{var s=new DOMParser;return this.l9(s.parseFromString(o,"application/xml"))||e}catch(t){return this.R9.logger.debug("could not parse PlayReady PSSH XML, could be another cdm..."),e}},e.prototype.getKeyUuidsFromInitData=function(e){var t,i;return null!=(i=null==(t=this.P9)?void 0:t.getKeyUuidsFromInitData(e))?i:[]},e.prototype.getIdentifierFromInitData=function(e){return this.P9?this.P9.getIdentifierFromInitData(e):this.m9(e)},e.prototype.requestLicense=function(e,t){var i=this;return this.R9.logger.debug("request a new license for "+t+"..."),this.W9.then(function(){return i.R9.logger.debug("keySystem is ready, sending license request..."),i.j9(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.U9},e.prototype.unload=function(){var e=this;this.Q9=!0,this.c9.removeEventListener(u.MediaElementEvent.msneedkey,this.f9),this.c9.removeEventListener(u.MediaElementEvent.error,this.Z9),this.X9.forEach(function(t){try{var i=t.session;i.removeEventListener(n.KeyError,t.onKeyError),i.removeEventListener(n.KeyAdded,t.onKeyAdded),i.removeEventListener(n.KeyMessage,t.onKeyMessage)}catch(t){e.R9.logger.debug("Could not destroy license request context",t)}});var t=Object.keys(this.a9||{}).map(function(t){return Promise.resolve(e.a9[t].close())});return this.a9={},this.P9=null,this.S9=null,this.X9=[],this.W9=null,this.V9=null,this.b9=null,Promise.all(t).catch(function(t){return e.R9.logger.debug("couldn't close key session!",t),Promise.resolve(null)})},e.prototype.suspend=function(){return Promise.resolve()},e}()},70581:function(e,t,i){var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},r=this&&this.__spreadArray||function(e,t,i){if(i||2==arguments.length)for(var n,r=0,o=t.length;r<o;r++)!n&&r in t||(n||(n=Array.prototype.slice.call(t,0,r)),n[r]=t[r]);return e.concat(n||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 o,a=i(66790),s=i(40306),u=i(3336),c=i(25926),l=i(4224),d=i(3714),h=i(33468),p=i(48488),f=i(21513),g=i(74853),m=i(34841),y=i(70233),v=i(15487),S=i(19274),b=i(67579),E=i(92656),T=i(4358),_=i(55327),A=i(56068),P=i(6234);!function(e){e.KeyMessage="message",e.KeyStatusChange="keystatuseschange"}(o||(o={})),t.UnprefixedEMEHandler=function(){function e(e){var t=this;this.tp=function(e,i){if(!t.mp)return t.closeSession(e),Promise.resolve(i);var n=t.ip.get(e);return n&&(n.loaded=!0),t.context.logger.debug("drm license response base64:",btoa(g.ArrayHelper.arrayBufferToAsciiString(i.body,!0))),t.Bp(i.body,e).then(function(){return t.context.logger.debug("keySession updated successfully"),i}).catch(function(e){return t.context.logger.warn("update() failed. reason: "+e),Promise.reject(e)})},this.encryptedEventHandler=function(e){e&&t.processMediaEncryptedEvent(e)},this.Cp=function(e){t.context.logger.debug("waiting for key..."),t.lp&&t.lp()},this.Gp=function(e,i){switch(e){case A.MediaKeyStatus.Usable:t.context.logger.debug("key ".concat(i," is now usable"));break;case A.MediaKeyStatus.Expired:t.context.logger.debug("key ".concat(i," has expired."));break;case A.MediaKeyStatus.Pending:t.context.logger.debug("key ".concat(i," does not have a status yet, still pending"));break;case A.MediaKeyStatus.OutputRestricted:t.context.logger.debug("key ".concat(i," has restricted the output"));break;default:t.context.logger.debug("Status of key ".concat(i," changed to ").concat(e))}},this.Hp=function(e){t.context.logger.debug("key status change...");var i,n=e.target,r=t.ip.get(n),o=t.Fp(n.keyStatuses),a=Object.values(o),s=Object.keys(o);if(r){var u=r.initDataStr;t.context.logger.debug("key session init data",u),t.Jp(o,btoa(u)),t.hasExpiredKeys(a)&&(t.closeSession(n),t.ip.delete(n),null==(i=t.context.store)||i.dispatch((0,T.removeLicense)({initDataStr:u})),t.context.logger.debug("Session key expired. Closing session ".concat(n.sessionId)));var c=!(!t.context.settings.CHECK_ALL_DRM_LICENSES_FOR_KID||!t.pp)&&(0,_.verifyKeysAreUsableOrPendingOnAnyLicense)(s,(0,h.keySystemUidToKind)(t.hp),(0,_.getLicenseState)(t.pp));if(s.length>0&&c)t.context.logger.debug("all known keys of session either pending or still usable");else if(a.includes(A.MediaKeyStatus.OutputRestricted)){var l=Object.keys(o).filter(function(e){return o[e]===A.MediaKeyStatus.OutputRestricted});t.Ip(l,n,u)}}else t.context.logger.debug("failed to handle key status change, key session was removed",n)},this.context=e,this.fp=e.sourceContext.sourceIdentifier,this.ip=new Map,this.jp=[],this.kp=!1,this.gp=null}return Object.defineProperty(e.prototype,"video",{get:function(){return this.context.videoElement},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"pp",{get:function(){return this.context.store.getState()},enumerable:!1,configurable:!0}),e.prototype.qp=function(e,t){var i=this,n=[],r=[];return t&&2===t.length&&(n=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,n&&n.length>0&&(e.audioCapabilities=e.audioCapabilities||[],e.audioCapabilities=e.audioCapabilities.concat(n),(this.np.audioRobustness||""===this.np.audioRobustness)&&e.audioCapabilities.forEach(function(e){e.robustness=i.np.audioRobustness})),r&&r.length>0&&(e.videoCapabilities=e.videoCapabilities||[],e.videoCapabilities=e.videoCapabilities.concat(r),(this.np.videoRobustness||""===this.np.videoRobustness)&&e.videoCapabilities.forEach(function(e){e.robustness=i.np.videoRobustness})),this.context.logger.debug("Prepared the MediaKeySystemConfig:",e),e},e.prototype.rp=function(e,t){void 0===t&&(t=!1);var i=n({},this.qp(this.ep.getMediaKeySystemConfiguration(),e));return(t||(0,f.default)().getState().capabilities.isTizen)&&(i.sessionTypes=[b.MediaKeySystemConfig.SessionType.Temporary]),[i,{initDataTypes:["cenc"],videoCapabilities:void 0,audioCapabilities:void 0,distinctiveIdentifier:i.distinctiveIdentifier,persistentState:i.persistentState,sessionTypes:i.sessionTypes}]},e.prototype.sp=function(e){var t=this,i=this.rp(e);return window.navigator.requestMediaKeySystemAccess(this.hp,i).catch(function(){var i=t.rp(e,!0);return window.navigator.requestMediaKeySystemAccess(t.hp,i)}).then(function(e){var i=e.getConfiguration();return t.context.store.dispatch((0,T.setPersistentState)(t.vp(i))),t.gp=i,e.createMediaKeys()})},e.prototype.up=function(e,t){var i=this;if(this.ep){this.kp=!0;var r=t.message,o=t.target,a=this.ip.get(o);a&&(a.expiration=o.expiration);var s=2===r.byteLength,u=btoa(g.ArrayHelper.arrayBufferToAsciiString(r,!0));this.context.logger.debug("drm license request base64:",u),this.ep.handleLicenseRequest(t).then(this.tp.bind(this,o)).then(function(t){s||e.resolve(n(n({},t),{session:o,wasLicenseRestored:!1}))}).catch(function(t){i.context.logger.debug("license request failed, destroying keySession:"),i.closeSession(o),i.ip.delete(o),e.reject(t)})}else e.reject("session destroyed")},e.prototype.vp=function(e){var t=e||this.gp||{},i=t.persistentState,n=t.sessionTypes,r=void 0===n?[]:n;return i===b.MediaKeySystemConfig.PersistentState.Required&&r.includes(b.MediaKeySystemConfig.SessionType.PersistentLicense)},e.prototype.wp=function(e,t,i){var n=this.video.mediaKeysObject,r=this.vp()?n.createSession(b.MediaKeySystemConfig.SessionType.PersistentLicense):n.createSession(),o={expiration:null,initData:e,initDataStr:t,loaded:!1,onKeyMessage:i};return this.ip.set(r,o),r},e.prototype.xp=function(e,t,i,n){var r=this;this.context.logger.debug("load stored session with sessionId: ".concat(i));var a=this.up.bind(this,n),s=this.wp(e,t,a);return s.addEventListener(o.KeyStatusChange,this.Hp),s.addEventListener(o.KeyMessage,a),s.load(i).then(function(e){if(!e)return r.context.logger.debug("stored session: ".concat(s.sessionId," not loaded")),void r.ip.delete(s);r.context.logger.debug("stored session: ".concat(s.sessionId," succesfully loaded")),n.resolve({session:s,wasLicenseRestored:!0})}).catch(function(e){r.context.logger.debug("stored session: ".concat(s.sessionId," not loaded"),e),n.reject(e),r.ip.delete(s)}),n.promise},e.prototype.yp=function(e,t,i){var n=this,r=this.up.bind(this,i),a=this.wp(e,t,r);return a.addEventListener(o.KeyStatusChange,this.Hp),a.addEventListener(o.KeyMessage,r),a.generateRequest("cenc",e).catch(function(e){n.ip.delete(a),i.reject(e),n.context.eventHandler.fireError(new u.PlayerError(s.ErrorCode.DRM_KEY_SESSION_INITIALIZATION_FAILED,{reason:e,licenseInitDataString:t},"Unable to initialize DRM key session: `MediaKeySession.generateRequest` failed.",n.fp))}),i.promise},e.prototype.setMediaKeys=function(e){var t=this,i=new m.Deferred;return this.video.mediaKeysPromise=(this.video.mediaKeysPromise||Promise.resolve()).then(function(){var n=t.video.setMediaKeys(e)||Promise.resolve();return i.resolve(n),n.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)})}),i.promise},e.prototype.zp=function(e){e||this.context.eventHandler.dispatchEvent(d.PlayerEvent.Warning,new c.PlayerWarning(l.WarningCode.DRM_SERVER_CERTIFICATE_NOT_SUPPORTED))},e.prototype.onServerCertificateSetFailed=function(e,t,i){i.reason=t instanceof Error?t.message:"unknown error",this.context.eventHandler.fireError(new u.PlayerError(s.ErrorCode.DRM_CERTIFICATE_ERROR,i,"Unable to setup the key system: `MediaKeys.setServerCertificate` failed.",this.fp))},e.prototype.Ap=function(e,t){var i=this;this.np.serverCertificate&&e&&e.setServerCertificate(this.np.serverCertificate).then(function(e){return i.zp(e)}).catch(function(n){return i.onServerCertificateSetFailed(e,n,t)})},e.prototype.setupKeySystem=function(e){var t=this,i={drmCapabilities:e,keySystem:this.hp,eme:"unprefixed"};return this.sp(e).then(function(e){return i.createdMediaKeys=e,null===t.hp?(t.context.logger.debug("EMEHandler was unloaded during key-system creation"),Promise.reject(Error(a.DrmSetupError.CANCELLED))):(t.video.mediaKeysObject=e,t.Ap(e,i),t.setMediaKeys(e))}).catch(function(e){var n;return(null==e?void 0:e.message)!==a.DrmSetupError.CANCELLED&&(i.reason=null!=(n=null==e?void 0:e.message)?n:e,t.context.eventHandler.fireError(new u.PlayerError(s.ErrorCode.DRM_MEDIA_KEY_INITIALIZATION_FAILED,i,"Unable to initialize the DRM key system with the specified combinations.",t.fp))),Promise.reject(e)})},e.prototype.Bp=function(e,t){return this.kp=!1,e&&this.ep?(this.jp.includes(t)||this.jp.push(t),t.update(this.ep.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 i=(0,P.parseInitData)(e.initData);i&&i.length&&this.op&&i.forEach(function(e){return t.op(e)})},e.prototype.hasExpiredKeys=function(e){return e.some(function(e){return e===A.MediaKeyStatus.Expired})},e.prototype.Dp=function(e){var t=new Uint8Array(e instanceof ArrayBuffer?e:e.buffer);return(0,h.keySystemUidToKind)(this.hp)===h.KeySystemKind.PLAYREADY&&(0,v.isEdge)()&&E.PlayReady.kidToCENC(t),y.FormatHelper.bytesToUUID(t)},e.prototype.Ep=function(e,t){var i="",n="";return"string"==typeof e?(i=this.Dp(t),n=String(e)):"string"==typeof t?(i=this.Dp(e),n=String(t)):this.context.logger.debug("could not parse key id and status",typeof e,typeof t),[i,n]},e.prototype.Fp=function(e){var t=this,i={};return e.forEach(function(e,n){var r=t.Ep(e,n),o=r[0],a=r[1];i[o]=a}),i},e.prototype.Ip=function(e,t,i){var n,r=this;this.context.eventHandler.dispatchEvent(d.PlayerEvent.Warning,new c.PlayerWarning(l.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,p.trackDrmKidError)(e))}),this.closeSession(t),this.ip.delete(t),null==(n=this.context.store)||n.dispatch((0,T.removeLicense)({initDataStr:i}))},e.prototype.Jp=function(e,t){var i=this;Object.keys(e).forEach(function(n){var r,o,a=e[n];null==(r=i.context.store)||r.dispatch((0,T.setMediaKeyStatus)((0,h.keySystemUidToKind)(i.hp),n,a,t)),a===A.MediaKeyStatus.InternalError&&(null==(o=i.context.store)||o.dispatch((0,p.trackDrmKidError)(n))),i.Gp(a,n)})},e.prototype.unload=function(){var e,t=this,i=[];this.ip.forEach(function(e,t){return i.push(t)}),this.video.removeEventListener(S.MediaElementEvent.waitingforkey,this.Cp),this.video.removeEventListener(S.MediaElementEvent.encrypted,this.encryptedEventHandler);var n=i.map(function(e){var i=t.closeSession(e);return t.jp.includes(e)?i:Promise.resolve()});this.ep=null,this.ip=new Map,this.jp=[],this.hp=null,this.lp=null,this.video.mediaKeysObject=null;var o=null==(e=this.mp)?void 0:e.catch(function(e){return t.context.logger.debug("Caught key system promise rejection:",e)}).finally(function(){return t.mp=void 0});return Promise.all(r(r([],n,!0),[o],!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,i=this.ip.get(e);return i&&(e.removeEventListener(o.KeyStatusChange,this.Hp),e.removeEventListener(o.KeyMessage,i.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,i,n){return this.ep=e,this.hp=t,this.np=i[(0,h.keySystemUidToKind)(t)],this.video.addEventListener(S.MediaElementEvent.encrypted,this.encryptedEventHandler),this.video.addEventListener(S.MediaElementEvent.waitingforkey,this.Cp),this.mp=this.setupKeySystem(n),this.mp},e.prototype.Kp=function(e){var t=!1;return this.ip.forEach(function(i){return t=t||i.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.Cp)||this.video.addEventListener(S.MediaElementEvent.waitingforkey,this.Cp)},e.prototype.Lp=function(e){if(!this.pp)return!1;for(var t=(0,h.keySystemUidToKind)(this.hp),i=(0,_.getLicenseState)(this.pp).drmData[t],n=0,r=Object.keys(i);n<r.length;n++){var o=i[r[n]];if(o.sessionId===e)return void 0===o.usedByPlayerId||o.usedByPlayerId===this.context.internalPlayerID}return!1},e.prototype.Mp=function(e,t,i,n){return e?this.Kp(e)?(n.reject({message:"session for requested initData already present"}),n.promise):i&&this.vp()&&this.Lp(i)?this.xp(e,t,i,n):this.yp(e,t,n):(n.reject({message:"no initData provided for license request"}),n.promise)},e.prototype.Np=function(){return new m.Deferred},e.prototype.requestLicense=function(e,t,i){var n=this;this.kp=!0,this.context.logger.debug("request a new license for ".concat(t," ..."));var r=this.Np();return this.mp.then(function(){return null===n.video.mediaKeysObject?Promise.reject(Error(a.DrmSetupError.CANCELLED)):n.Mp(e,t,i,r)}).then(function(e){n.kp=!1;var i=e.session,r=void 0===i?{}:i;return{initDataStr:t,license:e.wasLicenseRestored?null:e.body,sessionInfo:{sessionId:r.sessionId,expiration:r.expiration},restoredFromPersistentLicense:e.wasLicenseRestored}}).catch(function(e){return n.kp=!1,Promise.reject({response:e,initDataStr:t})})},e.prototype.getKeyUuidsFromInitData=function(e){var t,i;return null!=(i=null==(t=this.ep)?void 0:t.getKeyUuidsFromInitData(e))?i:[]},e.prototype.getIdentifierFromInitData=function(e){return this.ep?this.ep.getIdentifierFromInitData(e):e},e.prototype.isLicenseRequestOngoing=function(){return this.kp},e.prototype.setWaitingForKeyListener=function(e){this.lp=e},e.prototype.setEncryptedListener=function(e){this.op=e},e.prototype.suspend=function(){return Promise.resolve()},e.prototype.disposeSessionForInitData=function(e){var t=this,i=[];return this.ip.forEach(function(n,r){n.initDataStr===e&&(i.push(t.closeSession(r).then(function(){t.context.logger.debug("Closed session "+r.sessionId)})),t.jp=t.jp.filter(function(e){return e.sessionId!==r.sessionId}),t.ip.delete(r))}),i.length<1?Promise.reject("Unable to find an existing drm session for "+e):Promise.all(i)},e}()},80680:function(e,t,i){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 n,r,o=i(40306),a=i(3336),s=i(34841),u=i(19274),c=i(6234);!function(e){e[e.Domain=6]="Domain"}(n||(n={})),function(e){e[e.HDCP=0x48444350]="HDCP"}(r||(r={})),t.WebKitPrefixedEMEHandler=function(){function e(e){var t=this;this.fq=function(e){if(t.context.logger.debug("key needed..."),t.Pp&&t.Pp(),e){var i=(0,c.parseInitData)(e.initData);i&&i.length&&t.Sp&&t.invokeEncryptedListener(e.initData,i)}},this.context=e,this.Qp=e.sourceContext.sourceIdentifier,this.video=e.videoElement,this.Rp=[],this.eq=[]}return e.prototype.invokeEncryptedListener=function(e,t){var i=this;t.forEach(function(e){return i.Sp(e)})},e.prototype.gq=function(e,t,i){this.Rp.includes(i)&&this.Rp.splice(this.Rp.indexOf(i)),this.context.logger.debug("keySystem: "+this.selectedKeySystem+", license: "+e+", KID: "+t+", sessionId: "+i),this.video.webkitAddKey(this.selectedKeySystem,e,t,i)},e.prototype.hq=function(e,t,i){this.Op=!1,null!==e?this.gq(this.keySystem.prepareLicense(e),t,i):this.context.logger.debug("Empty license response")},e.prototype.iq=function(e,t){null!==e&&e.deferred.reject();var i=t.target||{},s=i.error||i.errorCode||{},u=s.code,c=s.systemCode;this.context.logger.debug("A decryption key error was encountered:",{error:s,code:u,systemCode:c}),u===n.Domain&&c===r.HDCP?this.context.eventHandler.fireError(new a.PlayerError(o.ErrorCode.DRM_RESTRICTED_OUTPUT,void 0,void 0,this.Qp)):this.context.eventHandler.fireError(new a.PlayerError(o.ErrorCode.DRM_KEY_ERROR,{code:u,systemCode:c},void 0,this.Qp))},e.prototype.jq=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(u.MediaElementEvent.webkitkeyerror,e.onKeyError)},e.prototype.kq=function(e,t){var i=this,n=t.sessionId;t.kid=e.kid,this.Rp.includes(n)?this.context.logger.debug("Session ".concat(n," already handled, ignoring...")):(this.Rp.push(n),this.Op=!0,this.keySystem.handleLicenseRequest(t).then(function(t){i.hq(t.body,t.kid||e.initData,n),e.license=t}).catch(function(t){return e.deferred.reject(t)}))},e.prototype.lq=function(e,t){var i=this,n={kid:t,initData:e,deferred:new s.Deferred};return this.eq.push(n.deferred),n.onKeyError=this.iq.bind(this,n),n.onKeyAdded=this.jq.bind(this,n),n.onKeyMessage=this.kq.bind(this,n),this.video.addEventListener(u.MediaElementEvent.webkitkeyerror,n.onKeyError),this.video.addEventListener(u.MediaElementEvent.webkitkeyadded,n.onKeyAdded),this.video.addEventListener(u.MediaElementEvent.webkitkeymessage,n.onKeyMessage),this.video.webkitGenerateKeyRequest(this.selectedKeySystem,new Uint8Array(e)),n.deferred.promise.finally(function(){i.video.removeEventListener(u.MediaElementEvent.webkitkeyerror,n.onKeyError),i.video.removeEventListener(u.MediaElementEvent.webkitkeyadded,n.onKeyAdded),i.video.removeEventListener(u.MediaElementEvent.webkitkeymessage,n.onKeyMessage),i.mq(n.deferred)}),n.deferred.promise},e.prototype.mq=function(e){var t=this.eq.findIndex(function(t){return t===e});this.eq.splice(t,1)},e.prototype.unload=function(){return this.Tp&&this.video.removeEventListener(u.MediaElementEvent.webkitkeyerror,this.Tp),this.eq.forEach(function(e){e.reject("unloading the WebKITPrefixedEMEHandler")}),this.eq=[],this.video.removeEventListener(u.MediaElementEvent.webkitneedkey,this.fq),this.selectedKeySystem=null,this.keySystem=null,this.Pp=null,Promise.resolve()},e.prototype.load=function(e,t){return this.keySystem=e,this.selectedKeySystem=t,this.Tp&&this.video.removeEventListener(u.MediaElementEvent.webkitkeyerror,this.Tp),this.Tp=this.iq.bind(this,null),this.video.addEventListener(u.MediaElementEvent.webkitneedkey,this.fq),this.video.addEventListener(u.MediaElementEvent.webkitkeyerror,this.Tp),Promise.resolve()},e.prototype.reInitialize=function(){},e.prototype.requestLicense=function(e,t){var i=this;return this.Op=!0,this.context.logger.debug("request a new license for "+t+"..."),this.lq(e).then(function(e){return i.Op=!1,{initDataStr:t,license:e.body}}).catch(function(e){return i.Op=!1,Promise.reject({initDataStr:t,statusCode:e.status,response:e})})},e.prototype.getKeyUuidsFromInitData=function(e){var t,i;return null!=(i=null==(t=this.keySystem)?void 0:t.getKeyUuidsFromInitData(e))?i:[]},e.prototype.getIdentifierFromInitData=function(e){return this.keySystem?this.keySystem.getIdentifierFromInitData(e):e},e.prototype.isLicenseRequestOngoing=function(){return this.Op},e.prototype.setWaitingForKeyListener=function(e){this.Pp=e},e.prototype.setEncryptedListener=function(e){this.Sp=e},e.prototype.suspend=function(){return Promise.resolve()},e}()},92656:function(e,t,i){var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])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=i(40306),o=i(3336),a=i(25926),s=i(4224),u=i(3714),c=i(57456),l=i(29669),d=i(51682),h=i(74853),p=i(70233),f=i(67579),g=i(46658),m="<WRMHEADER";function y(e){var t="string"==typeof e?(new DOMParser).parseFromString(e,"application/xml"):e;if(!t)return null;var i=t.getElementsByTagName("LA_URL");return i.length>0?i.item(0).textContent:null}t.EMPTY_KEY_MESSAGE="KeyMessageWasEmpty";var v=function(){function e(e,t){var i=this;this.context=e,this.rq=function(e,t){if(i.context.logger.debug("PlayReady license request failed: ".concat(null==t?void 0:t.name,". Response:"),null==e?void 0:e.body),null!==e)return i.qq(null==e?void 0:e.status)?(i.context.logger.debug("Retrying other KIDs",e),void i.context.eventHandler.dispatchEvent(u.PlayerEvent.Warning,new a.PlayerWarning(s.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}))):void i.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,"."),i.nq));i.context.logger.debug("Playready license failed without specific reason",e,t)},this.nq=e.sourceContext.sourceIdentifier,this.oq=t,e.logger.debug("Using DRM key system: PlayReady"),this.pq=new g.ParallelContentLoader(e,{onFailure:this.rq,maxRetries:t.maxLicenseRequestRetries,retryDelay:t.licenseRequestRetryDelay,requestType:l.HttpRequestType.DRM_LICENSE_PLAYREADY})}return e.getPlaintextChallengeText=function(e,t){var i=e.getElementsByTagName("Challenge")[0];if(i.hasOwnProperty("innerHTML"))return'<Challenge xmlns="http://schemas.microsoft.com/DRM/2007/03/
1protocols/messages">'+i.innerHTML+"</Challenge>";var n=t.indexOf("<Challenge"),r=t.indexOf("</Challenge>")+12;return t.substring(n,r)},e.prototype.qq=function(e){return!!this.oq.retryOtherKeysOnHttpStatusCode&&this.oq.retryOtherKeysOnHttpStatusCode.includes(e)},e.prototype.sq=function(i){var n,a=i.message.buffer||i.message,s=this.oq.hasOwnProperty("utf8message")&&this.oq.utf8message,u=h.ArrayHelper.arrayBufferToAsciiString(a,s);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 c=(new DOMParser).parseFromString(u,"application/xml");if(c.getElementsByTagName("Challenge")[0])if(this.oq.hasOwnProperty("plaintextChallenge")&&this.oq.plaintextChallenge)n='<?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(c,u)+"</challenge></AcquireLicense></soap:Body></soap:Envelope>";else{var l=c.getElementsByTagName("Challenge")[0].childNodes[0].nodeValue;l&&(n=window.atob(l))}else this.context.logger.log("TODO: playready update needed, not implemented yet");var d={},p=u.match(/<HttpHeaders>.*<\/HttpHeaders>/);if(p&&1===p.length){var f=p[0].match(/<name>([^<]+?)<\/name>/g),g=p[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.nq)),null;for(var m=0;m<f.length;m++)d[f[m].replace(/<\/?name>/g,"")]=g[m].replace(/<\/?value>/g,"")}return{challenge:n,laURL:this.oq.LA_URL||i.destinationURL||i.defaultURL||y(c)||y(n),headers:d}},e.prototype.handleLicenseRequest=function(e){var i=this.sq(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.oq)||this.oq.forceSSL){var n=document.createElement("a");n.href=i.laURL,n.protocol="https:",i.laURL=n.href}return i.headers=c.XhrHelper.mergeHeaders(i.headers,this.oq.headers||{}),this.pq.load(i.laURL,l.HttpRequestMethod.POST,l.HttpResponseType.ARRAYBUFFER,i.challenge,i.headers,this.oq.withCredentials)},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.nq)),null}},e.prototype.getCDMData=function(){if(this.oq&&this.oq.customData){for(var t=[],i=0;i<this.oq.customData.length;++i)t.push(this.oq.customData.charCodeAt(i)),t.push(0);var n=String.fromCharCode.apply(null,t);n=btoa(n);var r=e.PRCDMData.replace("%PROACTIVE%",!!this.oq.proactiveLicense+"").replace("%CUSTOMDATA%",n),o=[];for(i=0;i<r.length;++i)o.push(r.charCodeAt(i)),o.push(0);return new Uint8Array(o).buffer}return null},e.getPlayreadyRecordsFromWrmHeader=function(e,t){for(var i=0,n=[],r=h.ArrayHelper.sparseArrayBufferToAsciiString(e.buffer,2,t);i<r.length;){var o=r.indexOf(m,i),a=r.indexOf("WRMHEADER>",o);if(o>=0&&a>o&&i<a){var s=t+2*o,u=t+2*a+20;n.push({type:1,value:e.buffer.slice(s,u)}),i=a}else i=r.length}return n},e.getPlayReadyRecordsFromPlayreadyObject=function(e,t){var i=t+4,n=[],r=new DataView(e.buffer),o=r.getUint16(i,!0);i+=2;for(var a=0;a<o;a++){var s=r.getUint16(i,!0);i+=2;var u=r.getUint16(i,!0);i+=2;var c={type:s,value:e.buffer.slice(i,i+u)};n.push(c),i+=u}return n},e.isValidPlayReadyObject=function(e,t){var i=new DataView(e.buffer,t);return!(i.getUint32(0,!0)>i.byteLength)&&m.split("").map(function(e){return e.charCodeAt(0)}).some(function(e,t){return i.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(h.ArrayHelper.sparseArrayBufferToAsciiString(e.value),"application/xml")}catch(i){return null!==t&&t.logger.debug("could not parse PlayReady PSSH XML",i,e),null}},e.parseWrmHeader=function(e,t,i){var n=this;return void 0===i&&(i=null),this.getPlayReadyRecords(e,t).map(function(e){return n.parsePlayReadyRecord(e,i)}).filter(function(e){return null!==e})},e.prototype.tq=function(e){var t=h.ArrayHelper.stringToArrayWithoutEncoding(e);return this.parsePlayReadyInitDataBuffer(t.buffer)},e.prototype.parsePlayReadyInitDataBuffer=function(t){for(var i=new DataView(t),n="",r=d.ISOBMFFConstants.BOX_SIZE_LENGTH,o=0;o<d.ISOBMFFConstants.BOX_TYPE_LENGTH;o++)n+=String.fromCharCode(i.getInt8(r+o));if("pssh"===n){r+=d.ISOBMFFConstants.BOX_TYPE_LENGTH;var a=i.getUint8(r);r+=d.ISOBMFFConstants.FULL_BOX_VERSION_LENGTH+d.ISOBMFFConstants.FULL_BOX_FLAGS_LENGTH+d.ISOBMFFConstants.PSSH_SYSTEM_ID_LENGTH,a>0&&(r+=4+i.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 i=[],n=0;n<e.length;n++){var r=e[n].getElementsByTagName("KID");if(r&&r.length>0)for(var o=0;o<r.length;o++){var a=r[o];a&&a.childNodes&&a.childNodes.length>0?i.push(a.childNodes[0].nodeValue):a&&a.hasAttribute("value")?i.push(a.getAttribute("value")):a&&a.hasAttribute("VALUE")?i.push(a.getAttribute("VALUE")):t&&t.logger.debug("could not parse PlayReady KID",a)}}return i},e.prototype.getKeyUuidsFromInitData=function(t){return e.extractKeyIdsFromPlayReadyHeaders(this.parsePlayReadyInitDataBuffer(t),this.context).map(function(e){return atob(e)}).map(function(e){return h.ArrayHelper.stringToArrayWithoutEncoding(e)}
vendor: 10,022 bytes, line 1
1).map(function(t){var i=new Uint8Array(t);return e.kidToCENC(i),i}).map(function(e){return p.FormatHelper.bytesToUUID(e)})},e.prototype.getIdentifierFromInitData=function(t){if(!t.includes("<"))return t;var i=this.tq(t),n=e.extractKeyIdsFromPlayReadyHeaders(i,this.context);return n&&n.length>0?n.join(";"):t},e.prototype.getMediaKeySystemConfiguration=function(){var e=this.oq.mediaKeySystemConfig,t={persistentState:f.MediaKeySystemConfig.PersistentState.Optional,sessionTypes:[f.MediaKeySystemConfig.SessionType.Temporary]};return"object"==typeof e?n(n({},t),e):t},e.swapBytes=function(e,t,i){var n=e[i];e[i]=e[t],e[t]=n},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.oq=null,this.pq.dispose()},e.PRCDMData='<PlayReadyCDMData type="LicenseAcquisition"><LicenseAcquisition version="1.0" Proactive="%PROACTIVE%"><CustomData encoding="base64encoded">%CUSTOMDATA%</CustomData></LicenseAcquisition></PlayReadyCDMData>',e}();t.PlayReady=v},25271:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.PrimeTime=void 0;var n=i(40306),r=i(3336),o=i(4129),a=i(29669);t.PrimeTime=function(){function e(e,t){var i=this;this.context=e,this.n8=function(e,t){i.context.logger.debug("PrimeTime license request failed: ".concat(t.name,". Response:"),e.body),i.context.eventHandler.fireError(new r.PlayerError(n.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,"."),i.k8))},this.k8=e.sourceContext.sourceIdentifier,this.l8=t,e.logger.debug("Using DRM key system: PrimeTime"),this.m8=new o.DefaultContentLoader(e,{onFailure:this.n8,maxRetries:t.maxLicenseRequestRetries,retryDelay:t.licenseRequestRetryDelay,requestType:a.HttpRequestType.DRM_LICENSE_PRIMETIME})}return e.prototype.handleLicenseRequest=function(t){var i,n,r=t.message;switch(this.l8.headers&&Object.keys(this.l8.headers).length>0&&(i=this.l8.headers),t.messageType){case e.INDIVIDUALIZATION_REQUEST:n=this.l8.indivURL||this.l8.LA_URL;break;case e.LICENSE_REQUEST:case e.LICENSE_RELEASE:n=this.l8.LA_URL;break;default:this.context.logger.debug("unknown license request type, assuming license-request"),n=this.l8.LA_URL}return this.m8.load(n,a.HttpRequestMethod.POST,a.HttpResponseType.ARRAYBUFFER,r,i,this.l8.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.l8.mediaKeySystemConfig;return"object"==typeof e?e:{}},e.prototype.dispose=function(){this.l8=null,this.m8.dispose(),this.m8=null},e.INDIVIDUALIZATION_REQUEST="individualization-request",e.LICENSE_REQUEST="license-request",e.LICENSE_RELEASE="license-release",e}()},31884:function(e,t,i){var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])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=i(40306),o=i(3336),a=i(4129),s=i(29669),u=i(74853),c=i(67579),l=i(92378);t.TVKey=function(){function e(e,t){var i=this;this.context=e,this.tvkeyConfig=t,this.p8=function(e,t){i.context.logger.debug("TVKey license request failed: ".concat(t.name,". Response:"),e.body),i.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,"."),i.context.sourceContext.sourceIdentifier))},e.logger.debug("Using DRM key system: TVKey"),this.o8=new a.DefaultContentLoader(e,{onFailure:this.p8,maxRetries:t.maxLicenseRequestRetries,requestType:s.HttpRequestType.DRM_LICENSE_TVKEY})}return e.prototype.q8=function(e){if("function"==typeof this.tvkeyConfig.prepareMessage)return this.tvkeyConfig.prepareMessage(e);var t=new Uint8Array(e.message),i=u.ArrayHelper.convertBufferSourceToUTF8(t);return'{"OttLicenseRequestMessage":'.concat(i,"}")},e.prototype.r8=function(){var e=this.tvkeyConfig.headers||{};return n({"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.q8(e),i=this.r8();return this.o8.load(this.tvkeyConfig.LA_URL,s.HttpRequestMethod.POST,s.HttpResponseType.TEXT,t,i,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,l.parseKidsFromTVKeyPssh)(e,this.context.logger)},e.prototype.getIdentifierFromInitData=function(e){try{var t=u.ArrayHelper.stringToArrayWithoutEncoding(e),i=(0,l.parseKidsFromTVKeyPssh)(t.buffer,this.context.logger);return i.length?i.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 n({persistentState:c.MediaKeySystemConfig.PersistentState.Optional,sessionTypes:[c.MediaKeySystemConfig.SessionType.Temporary]},null!=(e=this.tvkeyConfig.mediaKeySystemConfig)?e:{})},e.prototype.dispose=function(){this.o8.dispose()},e}()},81982:function(e,t,i){var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.Widevine=void 0;var r=i(40306),o=i(3336),a=i(25926),s=i(4224),u=i(3714),c=i(29669),l=i(48488),d=i(67579),h=i(46658),p=i(51063);t.Widevine=function(){function e(e,t){var i=this;this.context=e,this.x8=function(e,t){i.context.logger.debug("Widevine license request failed: ".concat(t.name,". Response:"),e.body),i.w8(e.status)?i.context.eventHandler.dispatchEvent(u.PlayerEvent.Warning,new a.PlayerWarning(s.WarningCode.DRM_FAILED_LICENSE_REQUEST,"License request failed, retrying with other keys.",{responseCode:e.status,responseText:e.statusText,serverResponse:e.body})):i.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,"."),i.s8))},this.s8=e.sourceContext.sourceIdentifier,this.t8=t,this.v8=new Map,e.logger.debug("Using DRM key system: Widevine"),this.u8=new h.ParallelContentLoader(e,{onFailure:this.x8,maxRetries:t.maxLicenseRequestRetries,retryDelay:t.licenseRequestRetryDelay,requestType:c.HttpRequestType.DRM_LICENSE_WIDEVINE})}return e.prototype.w8=function(e){return this.t8.retryOtherKeysOnHttpStatusCode?this.t8.retryOtherKeysOnHttpStatusCode.includes(e):!(!this.t8.retryOtherKeysOnForbiddenLicense||403!==e)},e.prototype.y8=function(e){return"function"==typeof this.t8.prepareMessage?this.t8.prepareMessage(e):e.message},e.prototype.z8=function(){return this.t8.headers&&Object.keys(this.t8.headers).length>0?this.t8.headers:void 0},e.prototype.A8=function(e){var t=(0,p.parseWidevineLicenseRequestProtoBuf)(e);void 0!==t&&this.v8.set(t.requestId,t.requestedKeyIds)},e.prototype.handleLicenseRequest=function(e){if(!this.t8.LA_URL)return Promise.reject("no LA URL given");var t=this.y8(e),i=this.z8();return this.A8(t),this.u8.load(this.t8.LA_URL,c.HttpRequestMethod.POST,c.HttpResponseType.ARRAYBUFFER,t,i,this.t8.withCredentials,"application/json")},e.prototype.B8=function(e){var t;if("function"==typeof this.t8.prepareLicense){var i=this.t8.prepareLicense({license:e});return null!=(t=null==i?void 0:i.license)?t:void 0}},e.prototype.M9=function(e){var t=new Uint8Array(e),i=this.B8(t);return null!=i?i:t},e.prototype.N9=function(e){this.context.logger.debug("No DRM license received for key ID ".concat(e)),this.context.store.dispatch((0,l.trackDrmKidError)(e))},e.prototype.O9=function(e){var t,i=this,n=(0,p.parseWidevineLicenseResponseProtoBuf)(e);void 0!==n&&(null!=(t=this.v8.get(n.requestId))?t:[]).filter(function(e){return!n.returnedKeyIds.includes(e)}).forEach(function(e){return i.N9(e)})},e.prototype.prepareLicense=function(e){return this.O9(e),this.M9(e)},e.prototype.getCDMData=function(){return null},e.prototype.getKeyUuidsFromInitData=function(e){return(0,p.parseKidsFromWidevinePssh)(e)},e.prototype.getIdentifierFromInitData=function(e){return e},e.prototype.getMediaKeySystemConfiguration=function(){var e,t=this.t8.mediaKeySystemConfig,i=null==(e=null==t?void 0:t.sessionTypes)?void 0:e.includes(d.MediaKeySystemConfig.SessionType.PersistentLicense),r={persistentState:d.MediaKeySystemConfig.PersistentState.Optional,sessionTypes:i?[d.MediaKeySystemConfig.SessionType.PersistentLicense]:[d.MediaKeySystemConfig.SessionType.Temporary]};return"object"==typeof t?n(n({},r),t):r},e.prototype.dispose=function(){this.t8=null,this.u8.dispose(),this.v8.clear()},e}()},4358:function(e,t,i){var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},r=this&&this.__rest||function(e,t){var i={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(i[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(n=Object.getOwnPropertySymbols(e);r<n.length;r++)0>t.indexOf(n[r])&&Object.prototype.propertyIsEnumerable.call(e,n[r])&&(i[n[r]]=e[n[r]])}return i};
1Object.defineProperty(t,"__esModule",{value:!0}),t.getInitialLicenseState=void 0,t.addLicense=function(e){return(0,o.createAction)(s.LicenseActionType.AddLicense,e)},t.updateLicense=function(e){return(0,o.createAction)(s.LicenseActionType.UpdateLicense,e)},t.removeLicense=function(e){return(0,o.createAction)(s.LicenseActionType.RemoveLicense,e)},t.resetLicense=function(e){return(0,o.createAction)(s.LicenseActionType.ResetLicense,e)},t.resetLicenses=function(){return(0,o.createAction)(s.LicenseActionType.ResetLicenses)},t.clearLicenseStorage=function(){return(0,o.createAction)(s.LicenseActionType.ClearLicenseStorage)},t.initializeLicenseStorage=function(e){return(0,o.createAction)(s.LicenseActionType.InitializeLicenseStorage,{storageHandler:e})},t.setPersistentState=function(e){return(0,o.createAction)(s.LicenseActionType.SetPersistentState,e)},t.setMediaKeyStatus=function(e,t,i,n){return(0,o.createAction)(s.LicenseActionType.SetMediaKeyStatus,{keySystemKind:e,keyUuid:t,status:i,initDataStr:n})},t.loadLicences=l,t.maybeStoreLicences=function(e,t){e&&((0,a.clearTimeoutIfDefined)(c),c=window.setTimeout(function(){return function(e,t){try{var i=e.drmData,o={};
vendor: 5,047 bytes, line 1
1Object.keys(i).forEach(function(e){o[e]={},Object.entries(i[e]).forEach(function(t){var i=t[0],a=t[1],u=void 0===a?{}:a,c=(u.license,u.initData,r(u,["license","initData"]));delete c.publicId,o[e][i]=n(n({},c),{hasLicense:!1,isPending:!1,wasRequested:!1,mediaKeyStatus:s.MediaKeyStatus.Unknown})})});var a=JSON.stringify(n(n({},e),{drmData:o}));t.set(u,a)}catch(e){}}(e,t)}))},t.getLicenseInfoKey=function(e){return btoa(e)};var o=i(35267),a=i(88844),s=i(56068),u="bitmovinplayer_licenseStorage",c=-1;function l(e){try{var t=e.get(u);return JSON.parse(t)||{}}catch(e){return{}}}t.getInitialLicenseState=function(e){var t=l(e);return n({inPersistentState:!1,drmData:{}},t)}},91921:function(e,t,i){var n,r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])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=i(33468),a=i(3793),s=i(4358),u=i(56068),c={drmData:{},inPersistentState:!1};function l(e,t,i){var n,o=(0,s.getLicenseInfoKey)(t),a=r(r({},e),{drmData:r({},e.drmData)});return i&&(e.drmData[i]?a.drmData[i]=r(r({},e.drmData[i]),((n={})[o]=r({},e.drmData[i][o]),n)):a.drmData[i]={}),a}function d(e,t){var i,n=t.initDataStr,o=t.licenseInfo,a=t.systemName,u=l(e,n,a),c=(0,s.getLicenseInfoKey)(n),d=e.drmData[a]&&e.drmData[a][c]||{};return u.drmData[a]=r(r({},e.drmData[a]),((i={})[c]=r(r({},d),o),i)),u}t.LicenseReducer=(0,a.default)(c,((n={})[u.LicenseActionType.AddLicense]=function(e,t){return d(e,t.payload)},n[u.LicenseActionType.UpdateLicense]=function(e,t){return d(e,t.payload)},n[u.LicenseActionType.RemoveLicense]=function(e,t){return function(e,t){var i=t.initDataStr,n=null,r=(0,s.getLicenseInfoKey)(i);return Object.keys(e.drmData).forEach(function(t){if(t){var a=(n=l(n||e,i,o.KeySystemKind[t])).drmData[t];n.drmData[t]=a?Object.keys(a).filter(function(e){return r!==e}).reduce(function(e,t){return e[t]=a[t],e},{}):{}}}),n||e}(e,t.payload)},n[u.LicenseActionType.ResetLicense]=function(e,t){return d(e,t.payload)},n[u.LicenseActionType.ResetLicenses]=function(e){return function(e){var t={};return Object.keys(e.drmData).forEach(function(i){i&&(t[i]={},Object.entries(e.drmData[i]).forEach(function(e){var n=e[0],o=e[1];t[i][n]=r(r({},o),{keyIds:[],license:null,hasLicense:!1,isPending:!1,wasRequested:!1,initData:null,usedByPlayerId:void 0})}))}),{inPersistentState:e.inPersistentState,drmData:t}}(e)},n[u.LicenseActionType.SetPersistentState]=function(e,t){var i=t.payload;return r(r({},e),{inPersistentState:i})},n[u.LicenseActionType.ClearLicenseStorage]=function(){return c},n[u.LicenseActionType.InitializeLicenseStorage]=function(e,t){var i=t.payload;return(0,s.getInitialLicenseState)(i.storageHandler)},n[u.LicenseActionType.SetMediaKeyStatus]=function(e,t){var i,n=t.payload,o=n.keySystemKind,a=n.keyUuid,s=n.status,u=n.initDataStr,c=e.drmData[o];if(!(null==c?void 0:c[u]))return e;var l=r({},c),d=l[u];return d.keyIds.includes(a)&&(l[u]=r(r({},d),{mediaKeyStatus:s})),r(r({},e),{drmData:r(r({},e.drmData),((i={})[o]=l,i))})},n))},55327:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.getLicenseState=void 0,t.verifyKeysAreUsableOrPendingOnAnyLicense=function(e,t,i){var r=(0,n.getAllLicensesForKeySystem)(t,i).flatMap(function(e){return e.keyIds});return e.filter(function(e){return r.includes(e)}).map(function(e){return(0,n.hasMatchingLicenseInfoForKeySystem)(e,(0,n.getKeySystemMap)(i,t),n.isMediaKeyStatusUnknownOrPendingOrUsable)}).every(function(e){return!0===e})};var n=i(58857);t.getLicenseState=function(e){return e.drmLicenses}},56068:function(e,t){var i,n;Object.defineProperty(t,"__esModule",{value:!0}),t.MediaKeyStatus=t.LicenseActionType=void 0,function(e){e.AddLicense="@instance/license/add",e.UpdateLicense="@instance/license/update",e.RemoveLicense="@instance/license/remove",e.ResetLicense="@instance/license/reset",e.ResetLicenses="@instance/license/reset-all",e.SetMediaKeyStatus="@instance/license/setMediaKeyStatus",e.SetPersistentState="@instance/license/setPersistentState",e.ClearLicenseStorage="@instance/license/clearLicenseStorage",e.InitializeLicenseStorage="@instance/license/initializeLicenseStorage"}(i||(t.LicenseActionType=i={})),function(e){e.Unknown="unknown",e.Usable="usable",e.Expired="expired",e.Released="released",e.Pending="status-pending",e.OutputRestricted="output-restricted",e.OutputDownscaled="output-downscaled",e.InternalError="internal-error"}(n||(t.MediaKeyStatus=n={}))},78763:function(e,t,i){var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},r=this&&this.__spreadArray||function(e,t,i){if(i||2==arguments.length)for(var n,r=0,o=t.length;r<o;r++)!n&&r in t||(n||(n=Array.prototype.slice.call(t,0,r)),n[r]=t[r]);return e.concat(n||Array.prototype.slice.call(t))};
1Object.defineProperty(t,"__esModule",{value:!0}),t.DRMDetectorService=void 0;var o=i(33468),a=i(74853),s=i(15487),u=i(35987),c=i(24273);function l(e){return e.filter(function(e){var t;return null==(t=e.contentType)?void 0:t.includes("ac-3")})}function d(e){return l(e).length>0&&(0,s.isTizen)()&&(0,s.getTizenVersion)().major>=s.TIZEN_2018_MAJOR_VERSION}t.DRMDetectorService=function(){function e(){this.uq=new c.EMEWrapper}return e.prototype.isSupported=function(e){return this.uq?this.uq.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,i){var o;if(d(t)){var s=l(t).map(function(e){return n(n({},e),{contentType:e.contentType.replace("ac-3","ec-3")})});s=s.filter(function(e){return!(0,a.contains)(t,e)}),o=r(r([],t,!0),s,!0)}else o=t;return this.uq.getSupportedCapabilities(e,o,i).then(function(e){if(d(t)){var i=e.audioCapabilities;e.audioCapabilities=function(e){var t=e.filter(function(e){var t;return null==(t=e.contentType)?void 0:t.includes("ec-3")}).map(function(e){return n(n({},e),{contentType:e.contentType.replace("ec-3","ac-3")})}).filter(function(t){return!(0,a.contains)(e,t)});return r(r([],e,!0),t,!0)}(i),e.audioCapabilities=e.audioCapabilities.filter(function(e){return(0,a.contains)(t,e,function(e,t){return e.contentType===t.contentType})})}return e})},e.prototype.dispose=function(){this.uq.dispose()},e}()},24273:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.EMEWrapper=void 0;var n=i(57387),r=i(84568),o="DOMException: Unsupported keySystem",a=[{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.HQ=document.createElement("video"),this.IQ=(0,r.memoize)(this.NQ.bind(this),function(e,t,i){return String((0,n.calcHash)(JSON.stringify({keySystem:e,audioCapabilities:t,videoCapabilities:i})))})}return e.prototype.isSupported=function(e){var t;return"function"==typeof window.WebKitMediaKeys?this.JQ(e):"function"==typeof window.navigator.requestMediaKeySystemAccess?this.KQ(e).then(function(e){return e.keySystem}):"function"==typeof window.MSMediaKeys?this.LQ(e):"function"==typeof(null==(t=this.HQ)?void 0:t.webkitGenerateKeyRequest)?this.MQ(e):Promise.reject(o)},e.prototype.JQ=function(e){var t,i;return(null==(i=(t=window.WebKitMediaKeys).isTypeSupported)?void 0:i.call(t,e))?Promise.resolve(e):Promise.reject(o)},e.prototype.KQ=function(e,t){void 0===t&&(t=a);try{return window.navigator.requestMediaKeySystemAccess(e,t)}catch(e){return Promise.reject(e)}},e.prototype.LQ=function(e){var t,i;return(null==(i=(t=window.MSMediaKeys).isTypeSupported)?void 0:i.call(t,e))?Promise.resolve(e):Promise.reject(o)},e.prototype.MQ=function(e){var t;return(null==(t=this.HQ)?void 0:t.canPlayType("video/mp4",e))?Promise.resolve(e):Promise.reject(o)},e.prototype.getSupportedCapabilities=function(e,t,i){return this.IQ(e,t,i)},e.prototype.NQ=function(e,t,i){if("function"==typeof window.navigator.requestMediaKeySystemAccess){var n=[{initDataTypes:["cenc"],audioCapabilities:t,videoCapabilities:i},{initDataTypes:["cenc"],videoCapabilities:void 0,audioCapabilities:void 0}];return window.navigator.requestMediaKeySystemAccess(e,n).then(function(e){var n,r,o=e.getConfiguration();return{audioCapabilities:null!=(n=null==o?void 0:o.audioCapabilities)?n:t,videoCapabilities:null!=(r=null==o?void 0:o.videoCapabilities)?r:i}}).catch(function(){return{audioCapabilities:t,videoCapabilities:i}})}return Promise.resolve({audioCapabilities:t,videoCapabilities:i})},e.prototype.dispose=function(){this.HQ=null,this.IQ.invalidate()},e}()},84344:function(e,t,i){var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},r=this&&this.__spreadArray||function(e,t,i){if(i||2==arguments.length)for(var n,r=0,o=t.length;r<o;r++)!n&&r in t||(n||(n=Array.prototype.slice.call(t,0,r)),n[r]=t[r]);return e.concat(n||Array.prototype.slice.call(t))};
vendor: 23,338 bytes, line 1
1Object.defineProperty(t,"__esModule",{value:!0}),t.mergeKeySystemPriorities=t.resolveDRMSystem=t.instantiateDRMSystem=void 0,t.resolveUsedDRMSystem=b;var o=i(80813),a=i(33468),s=i(70962),u=i(67579),c=i(92656),l=i(25271),d=i(31884),h=i(81982),p=i(99921),f=i(30665),g=function(e,t){var i=function(e){return"boolean"==typeof e},o=function(e){return"number"==typeof e&&e!==1/0&&e!==-1/0&&!isNaN(e)},u=Object.keys(t).filter(function(i){return!!t[i]&&i in e}).reduce(function(e,r){return e[r]=n(n({},t[r]),{licenseRequestRetryDelay:o(t[r].licenseRequestRetryDelay)?Math.max(0,t[r].licenseRequestRetryDelay):s.DefaultSettings.DRM_RETRY_DELAY,maxLicenseRequestRetries:o(t[r].maxLicenseRequestRetries)?Math.floor(Math.max(0,t[r].maxLicenseRequestRetries)):s.DefaultSettings.DRM_MAX_RETRIES,withCredentials:i(t[r].withCredentials)?t[r].withCredentials:s.DefaultSettings.DRM_WITH_CREDENTIALS}),e},Object.create(null)),c=function(e){var t=[a.KeySystemKind.FAIRPLAY,a.KeySystemKind.PLAYREADY,a.KeySystemKind.PRIMETIME,a.KeySystemKind.WIDEVINE,a.KeySystemKind.TVKEY],i=(Array.isArray(e)?e.filter(function(e){return t.includes(e)}):[]).reduce(function(e,t){return e.includes(t)||e.push(t),e},[]),n=[a.KeySystemKind.PLAYREADY,a.KeySystemKind.FAIRPLAY,a.KeySystemKind.TVKEY,a.KeySystemKind.WIDEVINE,a.KeySystemKind.PRIMETIME].filter(function(e){return!i.includes(e)});return r(r([],i,!0),n,!0)}(t.preferredKeySystems);return n(n({},u),{preferredKeySystems:c})},m=function(e,t){var i=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 i.map(function(e){return{emeHandler:{kind:t},keySystem:e}})})},y=function(e,t){var i,n,r,o=(0,f.or)(function(e){return e.keySystem.kind===a.KeySystemKind.FAIRPLAY},function(e){return!!t.playready&&!!t.playready.customData&&e.keySystem.kind===a.KeySystemKind.PLAYREADY&&e.emeHandler.kind===p.EMEHandlerKind.UNPREFIXED}),s=(0,f.or)(function(e){return!!t.playready&&e.keySystem.kind===a.KeySystemKind.PLAYREADY},function(e){return!!t.primetime&&e.keySystem.kind===a.KeySystemKind.PRIMETIME},function(e){return!!t.widevine&&e.keySystem.kind===a.KeySystemKind.WIDEVINE},function(e){return!!t.tvkey&&e.keySystem.kind===a.KeySystemKind.TVKEY}),c=e.filter((0,f.and)((0,f.not)(o),s));return(null==(r=null==(n=null==(i=t.playready)?void 0:i.mediaKeySystemConfig)?void 0:n.sessionTypes)?void 0:r.includes(u.MediaKeySystemConfig.SessionType.PersistentLicense))?c.filter(function(e){return e.keySystem.uid!==a.KeySystemMap[a.KeySystemKind.PLAYREADY][1]}):c},v=function(e,t){var i=function(e,t){return t.weight-e.weight},n=function(e){return e.wrapped},r=function(e,t){return function(i){var n=t(i),r=e.findIndex(function(e){return e===n});return{weight:-1!==r?e.length-r:r,wrapped:i}}},o=r([p.EMEHandlerKind.WEBOS_2017_UNPREFIXED,p.EMEHandlerKind.WEBOS_UNPREFIXED,p.EMEHandlerKind.WEBOS_WEBKIT_PREFIXED,p.EMEHandlerKind.PLAYSTATION_4,p.EMEHandlerKind.UNPREFIXED,p.EMEHandlerKind.TIZEN,p.EMEHandlerKind.WEBKIT_PREFIXED,p.EMEHandlerKind.MS_PREFIXED],function(e){return e.emeHandler.kind}),a=r(e,function(e){return e.keySystem.kind});return t.map(a).sort(i).map(n).reduce(function(e,t){var i=e[e.length-1];return void 0!==i&&i[i.length-1].keySystem.kind===t.keySystem.kind?i.push(t):e.push([t]),e},[]).flatMap(function(e){return e.map(o).sort(i).map(n)})},S=function(e,t,i){switch(e){case a.KeySystemKind.FAIRPLAY:throw Error("Can not create Fairplay instance");case a.KeySystemKind.PLAYREADY:return new c.PlayReady(i,t.playready);case a.KeySystemKind.PRIMETIME:return new l.PrimeTime(i,t.primetime);case a.KeySystemKind.WIDEVINE:return new h.Widevine(i,t.widevine);case a.KeySystemKind.TVKEY:return new d.TVKey(i,t.tvkey);default:throw Error("Could not create KeySystem ".concat(e))}};function b(e,i,n){n.logger.debug("Resolving DRM key system...",{keySystemMap:e,config:i});var r=g(e,i),o=(0,p.allEMEHandlers)(n).filter(function(e){return e.isAvailable}),s=y(m((0,t.mergeKeySystemPriorities)(e,i),o),r),u=v(r.preferredKeySystems,s),c=function(e){if(0===e.length){var t=Object.keys(i).filter(function(e){return Object.values(a.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],s=e.slice(1);n.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 c(s)}):c(s)};return c(u)}t.instantiateDRMSystem=function(e,t,i){return n(n({},e),{config:t,emeHandler:n(n({},e.emeHandler),{instance:(0,p.createEMEHandlerInstance)(e.emeHandler.kind,i)}),keySystem:n(n({},e.keySystem),{instance:S(e.keySystem.kind,t,i)})})},t.resolveDRMSystem=function(e,i,n){var r=g(e,i),s=n.serviceManager.get(o.ServiceName.DrmService);return(s?s.getResolvedKeySystemFromSourceConfig():Promise.resolve(null)).then(function(o){return o&&0===Object.values(a.KeySystemKind).filter(function(e){return!(e in o.config)&&e in r}).length?(0,t.instantiateDRMSystem)(o,r,n):b(e,i,n).then(function(e){return(0,t.instantiateDRMSystem)(e,r,n)})})},t.mergeKeySystemPriorities=function(e,t){for(var i,n,r={fairplay:[],playready:[],primetime:[],widevine:[],tvkey:[]},o=function(e,o){if(!e||!Object.values(a.KeySystemKind).some(function(t){return t===e}))return"continue";var s=e,u=null!=(n=null==(i=null==t?void 0:t[s])?void 0:i.keySystemPriority)?n:[];r[s]=u;var c=o.filter(function(e){return!u.includes(e)});r[s]=r[s].concat(c)},s=0,u=Object.entries(e);s<u.length;s++){var c=u[s];o(c[0],c[1])}return r}},99921:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.createEMEHandlerInstance=t.allEMEHandlers=t.EMEHandlerKind=void 0;var n,r=i(21513),o=i(15487),a=i(88052),s=i(62756),u=i(86558),c=i(70581),l=i(80680);!function(e){e.MS_PREFIXED="MS_PREFIXED",e.WEBOS_UNPREFIXED="WEBOS_UNPREFIXED",e.WEBOS_WEBKIT_PREFIXED="WEBOS_WEBKIT_PREFIXED",e.WEBOS_2017_UNPREFIXED="WEBOS_2017_UNPREFIXED",e.UNPREFIXED="UNPREFIXED",e.PLAYSTATION_4="PLAYSTATION_4",e.TIZEN="TIZEN",e.WEBKIT_PREFIXED="WEBKIT_PREFIXED"}(n||(t.EMEHandlerKind=n={}));var d=function(e){return(0,c.isUnprefixedEmeHandlerSupported)(e)},h=function(e){return(0,u.isMsPrefixedEmeHandlerSupported)(e)},p=function(e){return function(t){return(0,l.isWebkitPrefixedEmeHandlerSupported)(e.videoElement,t)}};t.allEMEHandlers=function(e){return[{kind:n.UNPREFIXED,isAvailable:!0,isSupported:d},{kind:n.WEBOS_UNPREFIXED,isAvailable:(0,r.getCapabilities)().isWebOS&&a.ModuleManager.has(s.ModuleName.Webos),isSupported:d},{kind:n.WEBOS_2017_UNPREFIXED,isAvailable:(0,r.getCapabilities)().isWebOS&&(0,o.isWebOs2017)()&&a.ModuleManager.has(s.ModuleName.Webos),isSupported:d},{kind:n.WEBOS_WEBKIT_PREFIXED,isAvailable:(0,r.getCapabilities)().isWebOS&&a.ModuleManager.has(s.ModuleName.Webos),isSupported:p(e)},{kind:n.MS_PREFIXED,isAvailable:!0,isSupported:h},{kind:n.PLAYSTATION_4,isAvailable:(0,r.getCapabilities)().isPlayStation4&&a.ModuleManager.has(s.ModuleName.PlayStation4),isSupported:d},{kind:n.TIZEN,isAvailable:(0,r.getCapabilities)().isTizen&&a.ModuleManager.has(s.ModuleName.Tizen),isSupported:p(e)},{kind:n.WEBKIT_PREFIXED,isAvailable:!0,isSupported:p(e)}]},t.createEMEHandlerInstance=function(e,t){switch(e){case n.MS_PREFIXED:return new u.MSPrefixedEMEHandler(t);case n.WEBOS_UNPREFIXED:return new(a.ModuleManager.get(s.ModuleName.Webos).getWebosUnprefixedEmeHandlerConstructor())(t);case n.WEBOS_2017_UNPREFIXED:return new(a.ModuleManager.get(s.ModuleName.Webos).getWebos2017UnprefixedEmeHandlerConstructor())(t);case n.WEBOS_WEBKIT_PREFIXED:return new(a.ModuleManager.get(s.ModuleName.Webos).getWebosWebkitPrefixedEmeHandlerConstructor())(t);case n.TIZEN:return new(a.ModuleManager.get(s.ModuleName.Tizen).getTizenEMEHandlerConstructor())(t);case n.PLAYSTATION_4:return new(a.ModuleManager.get(s.ModuleName.PlayStation4).getPlayStation4EMEHandlerConstructor())(t);case n.UNPREFIXED:return new c.UnprefixedEMEHandler(t);case n.WEBKIT_PREFIXED:return new l.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=[],i=0;i<arguments.length;i++)t[i]=arguments[i];return e.reduce(function(e,i){return e&&i.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=[],i=0;i<arguments.length;i++)t[i]=arguments[i];return e.reduce(function(e,i){return e||i.apply(void 0,t)},!1)}},t.not=function(e){return function(){for(var t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];return!e.apply(void 0,t)}};var i=function(e,t){if(e.length!==t.length)return!1;for(var i=0;i<e.length;i++)if(e[i]!==t[i])return!1;return!0};t.memoOne=function(e,t){var n,r=null,o=void 0!==t?t:i;return function(){for(var t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];return null!==r&&o(t,r)||(n=e.apply(void 0,t),r=t),n}},t.removeFromObject=function(e,t){return Object.keys(e).filter(function(e){return!t.includes(e)}).reduce(function(t,i){return t[i]=e[i],t},Object.create(null))}},6234:function(e,t,i){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,i=e instanceof Uint8Array?e.buffer:e,n=new DataView(i),o=[];do{var a=n.getUint32(t),u=i.slice(t,t+a);t+=a;var c=s(u);c&&o.push(c)}while(t<e.byteLength);return o};var n=i(25811),r=i(51682),o=i(74853),a=i(70233);function s(e){var t={},i=new DataView(e),s=r.ISOBMFFConstants.BOX_SIZE_LENGTH,u=o.ArrayHelper.extractAsciiString(i,s,r.ISOBMFFConstants.BOX_TYPE_LENGTH);if(s+=r.ISOBMFFConstants.BOX_TYPE_LENGTH,"pssh"!==u)return null;var c=i.getUint8(s);s+=r.ISOBMFFConstants.FULL_BOX_VERSION_LENGTH+r.ISOBMFFConstants.FULL_BOX_FLAGS_LENGTH;var l=o.ArrayHelper.extractHexString(i,s,r.ISOBMFFConstants.PSSH_SYSTEM_ID_LENGTH);if(s+=r.ISOBMFFConstants.PSSH_SYSTEM_ID_LENGTH,t.systemIDraw=l,t.systemID="urn:uuid:".concat(a.FormatHelper.beautifyUUID(l)),n.DRMSchemeIDURIs.hasOwnProperty(t.systemID)&&(t.systemName=n.DRMSchemeIDURIs[t.systemID]),c>0){var d=i.getUint32(s);s+=r.ISOBMFFConstants.PSSH_KID_COUNT_LENGTH,t.kid=[];for(var h=0;h<d;h++)t.kid.push(o.ArrayHelper.extractHexString(i,s,r.ISOBMFFConstants.PSSH_KID_LEN)),s+=r.ISOBMFFConstants.PSSH_KID_LEN}return t.initData=e,t.initDataStr=o.ArrayHelper.arrayBufferToAsciiString(e,!0),t}},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=[],i=e.length>0,n=Promise.resolve(null);return e.forEach(function(e,r){n=n.then(function(){return e}).then(function(e){t[r]=e,i=!1}).catch(function(){t[r]=void 0})}),n.then(function(){return i?Promise.reject(t):t})}},49988:function(e,t){var i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])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=g(e)?new Uint8Array(e).buffer:e,i=[],n=new d(t);n.hasNext();){var r=f(n);if(!r)break;var o=m(r,n);o&&i.push(o)}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&&g(e.value)};var n,r=127,o=128,a=7,s=7,u=3,c=8,l=4;!function(e){e[e.VarInt=0]="VarInt",e[e.Bit64=1]="Bit64",e[e.LengthLimited=2]="LengthLimited",e[e.StartGroup=3]="StartGroup",e[e.EndGroup=4]="EndGroup",e[e.Bit32=5]="Bit32"}(n||(t.ProtoBufWireType=n={}));var d=function(){function e(e){this.Bgb=0,this.Cgb=new Uint8Array(e)}return e.prototype.hasNext=function(){return this.Bgb<this.Cgb.byteLength},e.prototype.getNext=function(){if(this.hasNext()){var e=this.Cgb[this.Bgb];return this.Bgb++,e}},e.prototype.reset=function(){this.Bgb=0},e}();function h(e){var t,i=[];do{if(void 0===(t=e.getNext()))break;i.push(t&r)}while(t&o);return i.reduce(function(e,t,i){return e+(t<<i*a)},0)}function p(e,t){for(var i=[],n=0;n<t;n++){var r=e.getNext();if(void 0===r)break;i.push(r)}return i}function f(e){var t=h(e);if(void 0!==t)return{wireType:t&s,fieldNumber:t>>u}}function g(e){return Array.isArray(e)&&e.every(function(e){return"number"==typeof e})}function m(e,t){switch(e.wireType){case n.VarInt:return i(i({},e),{value:h(t)});case n.Bit64:return i(i({},e),{value:p(t,c)});case n.LengthLimited:var r=h(t);if(!r)return;return i(i({},e),{value:p(t,r)});case n.Bit32:return i(i({},e),{value:p(t,l)});case n.StartGroup:case n.EndGroup:default:return}}},92378:function(e,t,i){var n=this&&this.__spreadArray||function(e,t,i){if(i||2==arguments.length)for(var n,r=0,o=t.length;r<o;r++)!n&&r in t||(n||(n=Array.prototype.slice.call(t,0,r)),n[r]=t[r]);return e.concat(n||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.parseKidsFromTVKeyPssh=function(e,t){try{var i=(0,u.parseInitData)(e).flatMap(function(e){return function(e,t){var i,a=null!=(i=e.kid)?i:[],s=function(e,t){var i=e.initData,n=new DataView(i),a=function(e){var t=new DataView(e),i=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 n=t.getUint32(i);i+=r.ISOBMFFConstants.PSSH_KID_COUNT_LENGTH+n*r.ISOBMFFConstants.PSSH_KID_LEN}return i}(i),s=n.getUint32(a),u=a+r.ISOBMFFConstants.PSSH_DATA_SIZE;if(s<=0||u+s>i.byteLength)return t.debug("Invalid Nagra data size"),[];var c=new Uint8Array(i,u,s),l=o.ArrayHelper.convertBufferSourceToUTF8(c),d=JSON.parse(atob(l));return"string"==typeof d.keyId?[d.keyId]:[]}(e,t);return n(n([],a,!0),s,!0)}(e,t)}).map(c);return(0,s.removeDuplicates)(i)}catch(e){return t.debug("Failed to parse key IDs from TVKey PSSH data:",e),[]}};var r=i(51682),o=i(74853),a=i(70233),s=i(70850),u=i(6234),c=function(e){return e.includes("-")?e:a.FormatHelper.beautifyUUID(e)}},51063:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.parseWidevineLicenseRequestProtoBuf=function(e){var t=P(e,n.LicenseRequest);if(t){var i=(0,s.findFieldByFieldNumber)(t,l);if((0,s.isLengthLimitedProtoBufField)(i)){var r=(0,s.parseProtoBufMessage)(i.value),a=(0,s.findFieldByFieldNumber)(r,d);if((0,s.isLengthLimitedProtoBufField)(a)){var u=(0,s.parseProtoBufMessage)(a.value),c=(0,s.findFieldByFieldNumber)(u,h),f=(0,s.findFieldByFieldNumber)(u,p);if((0,s.isLengthLimitedProtoBufField)(f)&&(0,s.isLengthLimitedProtoBufField)(c)){var g=o.ArrayHelper.arrayBufferToBase64(new Uint8Array(f.value).buffer),m=M((0,s.parseProtoBufMessage)(c.value));if(m)return{requestId:g,requestedKeyIds:m}}}}}},t.parseWidevineLicenseResponseProtoBuf=function(e){var t=P(e,n.License);if(t){var i=(0,s.findFieldByFieldNumber)(t,g);if((0,s.isLengthLimitedProtoBufField)(i)){var r=(0,s.parseProtoBufMessage)(i.value),u=(0,s.findFieldByFieldNumber)(r,m);if((0,s.isLengthLimitedProtoBufField)(u)){var c=o.ArrayHelper.arrayBufferToBase64(new Uint8Array(u.value).buffer),l=function(e){return(0,s.getFieldsByFieldNumber)(e,y).filter(s.isLengthLimitedProtoBufField).map(function(e){return(0,s.parseProtoBufMessage)(e.value)}).filter(A)}(t);if(0!==l.length){var d=function(e){for(var t=[],i=0,n=e;i<n.length;i++){var r=n[i],o=(0,s.findFieldByFieldNumber)(r,v);if(!(0,s.isLengthLimitedProtoBufField)(o))return;t.push(a.FormatHelper.bytesToUUID(new Uint8Array(o.value).buffer))}return t}(l);if(d&&function(e){return e.every(function(e){return"string"==typeof e})}(d))return{requestId:c,returnedKeyIds:d}}}}}},t.parseKidsFromWidevinePssh=function(e){var t=function(e){var t=new DataView(e.buffer);if(!(t.byteLength<=E)){if(1===t.getUint8(E)&&t.byteLength>b){var i=t.getUint32(b);return e.buffer.slice(28+i*T)}return e.buffer.slice(28)}}(new Uint8Array(e));if(!t)return[];var i=M((0,s.parseProtoBufMessage)(t));return null!=i?i:[]};var n,r,o=i(74853),a=i(70233),s=i(49988),u=4,c=2,l=2,d=1,h=1,p=3,f=2,g=1,m=1,y=3,v=1,S=1,b=27,E=8,T=16,_=32;function A(e){var t=(0,s.findFieldByFieldNumber)(e,u);return(null==t?void 0:t.value)===r.Content}function P(e,t){var i=(0,s.parseProtoBufMessage)(e);if(function(e,t){return function(e){var t=(0,s.findFieldByFieldNumber)(e,S);if("number"==typeof(null==t?void 0:t.value))return null==t?void 0:t.value}(e)===t}(i,t))return function(e){var t=(0,s.findFieldByFieldNumber)(e,c);if((0,s.isLengthLimitedProtoBufField)(t))return(0,s.parseProtoBufMessage)(t.value)}(i)}function M(e){var t=(0,s.getFieldsByFieldNumber)(e,f).filter(s.isLengthLimitedProtoBufField).filter(function(e){return e.value.length===T||e.value.length===_}).map(function(e){return e.value.length===_?a.FormatHelper.beautifyUUID(String.fromCodePoint.apply(null,e.value)):a.FormatHelper.bytesToUUID(new Uint8Array(e.value).buffer)});return t.length>0?t:void 0}!function(e){e[e.LicenseRequest=1]="LicenseRequest",e[e.License=2]="License"}(n||(n={})),function(e){e[e.Content=2]="Content"}(r||(r={}))}},function(e){return e(e.s=47272)}])},58:function(e){"use strict";self,e.exports=(self.webpackChunkbitmovin_player=self.webpackChunkbitmovin_player||[]).push([[238],{34795:function(e,t){var i;Object.defineProperty(t,"__esModule",{value:!0}),t.ContainerFormat=void 0,function(e){e.MP4="mp4",e.TS="ts",e.WEBM="webm"}(i||(t.ContainerFormat=i={}))},12030:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.DrmKidErrorHandler=void 0;var n=i(80813),r=i(91678),o=i(46151),a=i(33436),s=i(93204),u=i(13114);t.DrmKidErrorHandler=function(){function e(e,t){var i=this;this.context=e,this.onDownloadedRepresentationExcludedCallback=t,this.BY=function(e,t){if(void 0!==e&&void 0!==t){var n=e.filter(function(e){return!t.includes(e)});i.AY(n)}};var r=e.sourceContext.sourceIdentifier;this.yY=e.store,this.vY=e.logger,this.zY=e.serviceManager.get(n.ServiceName.SourceStoreService,r),this.wY=e.serviceManager.get(n.ServiceName.ManifestService,r),this.xY=(0,s.subscribe)(this.zY)(u.getDrmKeyIdsWithErrors,this.BY)}return e.prototype.AY=function(e){var t=function(e,t){return e.getAllRepresentations().filter(function(e){return e.associatedKid&&t.includes(e.associatedKid)}).map(function(e){return e._internalId})}(this.wY,e),i=this.yY.getState();if(0!==t.length&&void 0!==i){var n=function(e,t){return t.some(function(t){return e.some(function(e){return e.equals(t)})})}(function(e){return(0,o.getMetricsHistoryFromInstanceState)(e,"default",a.MetricType.RequestedRepresentations).map(function(e){return e.value})}(i),t);this.vY.debug("Excluding representations due to DRM licenses not being available",t),this.wY.excludeRepresentations(t)&&n&&(this.yY.dispatch((0,r.clearMetricsHistory)("default",a.MetricType.RequestedRepresentations)),this.onDownloadedRepresentationExcludedCallback())}},e.prototype.trackSegment=function(e){var t=e.getDrmKid();if(void 0!==t){var i=this.zY.getState(),n=e.getRepresentationId(),r=i?(0,u.getDrmKeyIdsWithErrors)(i):[];(function(e,t,i){return e!==i.getRepresentationDrmKid(t)})(t,n,this.wY)&&(function(e,t,i){i.setRepresentationDrmKid(t,e)}(t,n,this.wY),this.AY(r))}},e.prototype.dispose=function(){this.xY()},e}()},65272:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.HeartbeatService=void 0;var n=i(80813),r=i(88844);function o(e){e.shouldClearSubtitleServiceBuffers()&&e.clearSubtitleServiceBuffers()}function a(e,t){e.shouldSuspendHeartbeat()||function(e,t){var i=e.getActiveSegmentControllers(),n=i.length>0;n&&i.forEach(function(i){var n=t.getTimeForNextSegment(i.getMimeType());e.getNextSegment(i,n)}),e.areAllLoadersReady()&&(n?o(e):e.isLoadingLastPeriod()?function(e){e.areMediaTypesFinalForPlayingPeriod()?e.maybeStop():e.isAVCompletelyLoaded()&&e.signalEndOfStream(),o(e)}(e):(e.switchLoadingPeriod(),a(e,t)))}(e,t)}t.HeartbeatService=function(){function e(e,t){this.serviceManager=e,this.mediaPlayerController=t,this.IC=-1}return Object.defineProperty(e.prototype,"JC",{get:function(){return this.serviceManager.get(n.ServiceName.StreamTimeService)},enumerable:!1,configurable:!0}),e.prototype.KC=function(){var e=this;(0,r.clearTimeoutIfDefined)(this.IC),this.IC=window.setTimeout(function(){return e.LC()},250)},e.prototype.LC=function(){this.KC(),a(this.mediaPlayerController,this.JC)},e.prototype.beat=function(){this.started&&a(this.mediaPlayerController,this.JC)},Object.defineProperty(e.prototype,"started",{get:function(){return -1!==this.IC},enumerable:!1,configurable:!0}),e.prototype.start=function(){this.LC()},e.prototype.stop=function(){(0,r.clearTimeoutIfDefined)(this.IC),this.IC=-1},e.prototype.dispose=function(){this.stop()},e}()},94358:function(e,t,i){var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.MediaPlayer=t.LoadState=void 0,t.checkIfGapSkip=q;var r,o=i(4524),a=i(48143),s=i(80813),u=i(56481),c=i(3714),l=i(90408),d=i(75375),h=i(44468),p=i(91678),f=i(46151),g=i(33436),m=i(23690),y=i(87827),v=i(93204),S=i(34047),b=i(85434),E=i(89927),T=i(19274),_=i(88052),A=i(62756),P=i(65272),M=i(23901),I=i(96533),R=i(38568),C=i(90087),O=i(23940),D=i(52090),w=i(44552),N=i(15761),L=i(36193),k=i(52447),U=i(88935),x=i(27531),B=i(33903),F=i(47531),H=i(16870),j=i(68981);!function(e){e.Unloaded="unloaded",e.Preparing="preparing",e.Loading="loading",e.Loaded="loaded"}(r||(t.LoadState=r={}));var V=Object.freeze({id:"auto",bitrate:null}),W=Object.freeze({id:"auto",bitrate:null,width:null,height:null});function G(e){return e===d.ADVERTISING_ISSUER_NAME||e===d.ADVERTISING_RESTORE_ISSUER_NAME}function q(e,t){if(!_.ModuleManager.has(A.ModuleName.RendererMse)||!e.videoElement)return!1;for(var i=_.ModuleManager.get(A.ModuleName.RendererMse).Ranges,n=e.settings.MIN_SIZE_FOR_GAP_SKIPPING,r=i.findGaps(e.videoElement.buffered,n),o=!1,a=0;a<r.length;a++).1>=Math.abs(r.end(a)+i.TIME_FUDGE_FACTOR-t)&&(o=!0);return o}t.MediaPlayer=function(){function e(e){var t=this;this.i=-1,this.k=!1,this.n=!1,this.o=!1,this.p=!0,this.q="api",this.r="api",this.K=function(e){if(null==t.T()&&!e.isInit()){var i=t.isLive()?t.L(e):0;t.U(i)}},this.M=function(){t.isLive()&&t.Q()&&t.R()},this.N=function(e){if(t.k)t.k=!1;else{t.c.debug("Caught a video element error: ",e);var i=(0,l.createPlayerErrorFromMediaError)(e,t.b.sourceContext.sourceIdentifier),n=t.b.serviceManager.get(s.ServiceName.RecoveryService);if(n)return void n.handleError(i);t.unload(),t.g.fireError(i)}},this.P=function(){var e=t.w.getStatus(t.v,t.V());t.v!==e.mode&&(t.b.eventHandler.dispatchEvent(c.PlayerEvent.LatencyModeChanged,{from:t.v,to:e.mode}),t.v=e.mode),e.mode===c.LatencyMode.Suspended||t.x.seekingOrTimeshifting||(e.requiredAction===t.h.LiveLatencyControlA
1ction.Seek?t.O():e.requiredAction===t.h.LiveLatencyControlAction.PlaybackRate&&t.setPlaybackSpeed(1,e.actionParam,!1))},this.X=function(){t.x.getIsRendererStalling()?(t.c.debug("Renderer is currently stalled. Waiting for unstalling before ending stall."),t.Jb(),t.A=(0,v.subscribe)(t.b.store)(function(e){return(0,y.getPlayerState)(e)},function(){return t.W()},function(e){return!(0,y.getIsRendererStalled)(e)})):t.W()},this.Y=function(){t.n&&(t.c.debug("Detected replay attempt from video element"),t.b.internalPlayer.play()),t.x.transitionToPlayState(!0,t.q)},this.Z=function(){t.c.insane("video element signaled pause in state: ".concat(t.x.playbackState)),t.l.maybeTransitionToPausedState(t.r)},this.Bb=function(e){return{id:e.id,lang:e.lang,label:e.label,role:e.role,metadata:e.metadata,getQualities:function(){return C.MediaPlayerManifestApiFactory.getAudioQualities(t.t,t.getCurrentPlayingPeriodId(),e.id)}}},this.Db=function(e){var i=q(t.b,e.time);t.e.GLOBAL_DISABLE_SEEKING&&!i&&Math.abs(e.time-t.s)>.05&&(t.c.debug("Seeking now allowed, seeking back to expected time"),t.b.videoElement.currentTime=t.s)},this.Eb=function(e){if(!t.n){var i=0===t.f.getCurrentTime(!0),n=t.isPlaying(),r=t.x.isSeeking(),o=t.isStalled();!n||r||o||i?t.c.debug("Skipping timeupdate",{isPlaying:n,isSeeking:r,isStalled:o,timeUpdateWithoutBuffer:i,time:e.time}):t.mb(t.getCurrentTime())}},this.Fb=function(){t.n=!0},this.Gb=function(){t.b.logger.debug("DVR window exceeded"),t.x.isPlaying()?t.e.DISABLE_AUTO_RECOVERY_ON_DVR_WINDOW_EXCEEDED||t.Hb():t.o=!0},this.Ib=function(e){3001===e.code&&t.unload()},this.Mb=function(){t.t.isHlsManifest()||t.Lb()},this.Nb=function(){t.t.isHlsManifest()||t.Kb()},this.Pb=function(e){t.isLive()&&(t.Q()?t.R():t.S(!1))},this.b=e,this.c=e.logger,this.d=e.config,this.e=e.settings,this.f=e.renderer,this.g=e.eventHandler,this.m=r.Unloaded,this.b.store.dispatch((0,p.initializeMetricsForMimeType)("default",this.b.settings)),this.l=new D.MediaPlayerController(e,this.K),_.ModuleManager.has(A.ModuleName.LowLatency)&&(this.h=_.ModuleManager.get(A.ModuleName.LowLatency)),this.g.on(c.PlayerEvent.PeriodSwitch,this.Mb),this.g.on(c.PlayerEvent.PeriodSwitched,this.Nb),this.g.on(c.PlayerEvent.PlaybackSpeedChanged,this.Pb),this.z=(0,v.subscribe)(this.b.store)(function(e){return(0,y.getIsPlaying)((0,y.getPlayerState)(e))},this.M,function(e,t){return e&&!t})}return e.prototype.C=function(e,t){var i=t.serviceManager;this.D(t),this.E(t),this.F(t,e),this.G(t);var n=_.ModuleManager.get(A.ModuleName.ABR).AdaptationService;i.set(s.ServiceName.AdaptationService,new n(t)),i.set(s.ServiceName.TimedMetadataService,new N.TimedMetadataService(t)),i.set(s.ServiceName.SegmentService,new w.SegmentService(t));var r=new F.StreamTimeService(i,t.sourceContext.sourceIdentifier);i.set(s.ServiceName.StreamTimeService,r),i.set(s.ServiceName.HeartbeatService,new P.HeartbeatService(i,this.l),t.sourceContext.sourceIdentifier),this.H(t),this.I(t)},e.prototype.D=function(e){var t=e.serviceManager,i=e.sourceContext.sourceIdentifier;if(!t.has(s.ServiceName.SynchronizedTimeService,i)){var n=new H.SynchronizedTimeService(e,e.sourceContext);t.set(s.ServiceName.SynchronizedTimeService,n,i)}},e.prototype.E=function(e){var t=e.serviceManager,i=e.sourceContext.sourceIdentifier;t.has(s.ServiceName.ManifestService,i)?(this.t=t.get(s.ServiceName.ManifestService,i),this.t.restore()):(this.t=new I.ManifestService(e,e.sourceContext),t.set(s.ServiceName.ManifestService,this.t,i))},e.prototype.F=function(e,t){var i=e.serviceManager,n=e.sourceContext.sourceIdentifier;if(!i.has(s.ServiceName.ManifestLoadingService,n)){var r=(0,M.createManifestLoadingService)(t,e,e.sourceContext);i.set(s.ServiceName.ManifestLoadingService,r,n)}},e.prototype.G=function(e){var t=e.serviceManager,i=e.sourceContext.sourceIdentifier;if(t.has(s.ServiceName.ManifestUpdateSchedulingService,i))t.get(s.ServiceName.ManifestUpdateSchedulingService,i).restore();else{var n=new R.ManifestUpdateScheduler(e,e.sourceContext);t.set(s.ServiceName.ManifestUpdateSchedulingService,n,i)}},e.prototype.H=function(e){var t=e.serviceManager,i=e.sourceContext.sourceIdentifier;if(_.ModuleManager.has(A.ModuleName.Subtitles)&&!t.has(s.ServiceName.SubtitleService,i)){var n=_.ModuleManager.get(A.ModuleName.Subtitles).SubtitleService;t.set(s.ServiceName.SubtitleService,new n(e),i)}this.u=t.get(s.ServiceName.SubtitleService,i)},e.prototype.I=function(e){var t,i=e.serviceManager;null==(t=this.w)||t.dispose(),_.ModuleManager.has(A.ModuleName.LowLatency)&&(i.set(s.ServiceName.LiveLatencyService,new this.h.LiveLatencyService(e)),this.w=i.get(s.ServiceName.LiveLatencyService))},e.prototype.J=function(e){var t,i,n,r,o=this.b.serviceManager;[s.ServiceName.LiveLatencyService,s.ServiceName.TimedMetadataService].forEach(function(e){return(0,a.disposeService)(o,e)});var u=null==(t=this.b.sourceContext)?void 0:t.sourceIdentifier;if(u){(0,a.disposeService)(o,s.ServiceName.HeartbeatService,u),(0,a.disposeService)(o,s.ServiceName.SegmentService,u);
1var c=!this.b.sourceContext.isAd;e===d.ADVERTISING_ISSUER_NAME&&c?(null==(i=o.get(s.ServiceName.ManifestService,u))||i.suspend(),null==(n=o.get(s.ServiceName.ManifestUpdateSchedulingService,u))||n.suspend(),null==(r=o.get(s.ServiceName.SubtitleService,u))||r.disableAllSubtitles()):[s.ServiceName.ManifestService,s.ServiceName.ManifestLoadingService,s.ServiceName.ManifestUpdateSchedulingService,s.ServiceName.SynchronizedTimeService,s.ServiceName.SubtitleService].forEach(function(e){return(0,a.disposeService)(o,e,u)})}},e.prototype.L=function(e){var t=null!=e.getSegmentInfo().wallClockTime?e.getPlaybackTime()-(0,E.toSeconds)(e.getSegmentInfo().wallClockTime):0;return this.l.getSeekableRange().start+t},e.prototype.play=function(e){return this.q=e,this.p?this.j?this.x.isPlaying()?(this.c.debug("Ignoring play call as play was already triggered or we're already playing"),Promise.resolve()):(this.n=!1,this.x.isPaused()&&this.isLive()&&(this.o||this.getMaxTimeShift()>=0)&&!this.e.DISABLE_AUTO_RECOVERY_ON_DVR_WINDOW_EXCEEDED&&(this.b.logger.debug("Handling DVR window excursion - going to live edge"),this.O(),this.o=!1),this.l.start(),this.x.transitionToPendingPlayState(!1,e),this.f.play()):Promise.resolve():Promise.reject("Play control not permitted")},e.prototype.O=function(){var e=this;this.e.ENABLE_SEEK_FOR_LIVE?this.x.isSeeking()||this.seek(this.getSeekableRange().end,d.INTERNAL_ISSUER_NAME):this.l.timeShift(0,function(){return e.Ab()}).catch(function(){return e.zb()})},e.prototype.Q=function(){return!!this.w&&!this.isPaused()&&0===this.getTimeShift()&&1===this.getPlaybackSpeed()&&!this.x.isTimeShifting()&&!this.x.isSeeking()},e.prototype.R=function(){this.w.resumeControl()},e.prototype.S=function(e){void 0===e&&(e=!0);var t=this.v===c.LatencyMode.Suspended;this.w&&!t&&(this.w.suspendControl(),e&&this.setPlaybackSpeed(1,1,!1))},e.prototype.T=function(){var e;
vendor: 23,189 bytes, line 1
1return(0,B.getRelativeCurrentTimeOffset)(null==(e=this.tb())?void 0:e.getState())},e.prototype.U=function(e){var t;null==(t=this.tb())||t.dispatch((0,x.setRelativeCurrentTimeOffset)(e))},e.prototype.V=function(){var e=[this.getBufferLevel(h.BufferType.ForwardDuration,h.MediaType.Audio),this.getBufferLevel(h.BufferType.ForwardDuration,h.MediaType.Video)].map(function(e){return e.level}).filter(function(e){return null!==e});return 0===e.length?0:Math.min.apply(Math,e)},e.prototype.W=function(){this.Jb(),this.x.stallExit(),this.x.transitionToPlayingState(this.q),this.n=!1},e.prototype.preload=function(){this.m!==r.Unloaded&&this.l&&this.l.start()},e.prototype.pause=function(e){this.p&&(this.c.insane("Pause was called via the API"),this.x.isInitial()||(this.r=e,this.isLive()&&this.w&&this.w.isConfigured()&&(this.S(),this.P()),this.x.isPaused()||this.x.isStopped()||this.f.pause(),this.x.transitionToPausedState(this.f.isPaused(),e)))},e.prototype.mute=function(e){this.isMuted()||(this.f.mute(),this.b.eventHandler.dispatchEvent(c.PlayerEvent.Muted,{issuer:e||"api"}))},e.prototype.unmute=function(e){this.isMuted()&&(this.f.unmute(),this.b.eventHandler.dispatchEvent(c.PlayerEvent.Unmuted,{issuer:e||"api"}))},e.prototype.kb=function(e,t){var i,n=null==(i=this.tb())?void 0:i.getState();if(!n)return e;for(var r=_.ModuleManager.get(A.ModuleName.HLS).selectors,o=r.getHlsState,a=(0,r.getMergedDiscontinuityTimings)(o(n)),s=Object.values(a),u=0;u<s.length-1;u++){var c=s[u].endTime,l=s[u+1].startTime;if(e>=c-t&&e<l)return this.c.debug("Adjusting seek target to discontinuity start: ".concat(e," -> ").concat(l)),l}return e},e.prototype.seek=function(e,t){void 0===t&&(t="");var i,n,r,o=this.d&&this.d.hasOwnProperty("playback")?this.d.playback:{},a=!o.hasOwnProperty("seeking")||o.seeking,s=this.b.store.getState(),u=!!s&&null!=(r=null==(n=null==(i=(0,y.getPlayerState)(s))?void 0:i.seekingProcess)?void 0:n.isInitial)&&r,c=![d.STARTUP_ISSUER_NAME,d.INTERNAL_ISSUER_NAME].includes(t);if(!(u||!this.e.GLOBAL_DISABLE_SEEKING&&a)||!this.p)return!1;var l=this.e.END_OF_BUFFER_TOLERANCE,h=this.t.isHlsManifest()?this.kb(e,l):(0,j.adjustTargetTimeToPeriodStart)(e,l,this.t,this.c);return this.n=!1,this.lb(),this.Ob(),this.x.transitionToSeekingState(h,t,c),this.b.store.dispatch((0,m.updateSeekingProcess)({issuer:t,targetTime:h,seekableRange:this.getSeekableRange(),isInitial:u})),!0},e.prototype.lb=function(){this.x.isTimeShifting()&&(this.l.getTimeShiftHandler().cancel(),this.x.transitionToTimeShiftedState(!1))},e.prototype.mb=function(e){e!==this.s&&(this.b.eventHandler.dispatchEvent(c.PlayerEvent.TimeChanged,{time:e}),this.s=e,this.isLive()&&this.w&&this.w.isConfigured()&&this.P())},e.prototype.setVolume=function(e,t){var i=this.f.getVolume();this.f.setVolume(e),i!==e&&this.b.eventHandler.dispatchEvent(c.PlayerEvent.VolumeChanged,{targetVolume:e,sourceVolume:i,issuer:t||"api"})},e.prototype.setAudioQuality=function(e){var t,i=this.getAvailableAudioQualities(),n=this.getAudioQuality();(t="auto"===e?V:i.find(function(t){return t.id===e}))&&n.id!==t.id&&(this.nb(h.MediaType.Audio,e),this.b.eventHandler.dispatchEvent(c.PlayerEvent.AudioQualityChanged,{sourceQuality:n,sourceQualityId:n.id,targetQuality:t,targetQualityId:t.id}))},e.prototype.getAudioQuality=function(){var e=this.vb(h.MediaType.Audio),t=this.b.serviceManager.get(s.ServiceName.AdaptationService),i=t.isAuto(e),n=t.getCurrentRepresentationId(e);return i||null===n?V:this.getAvailableAudioQualities().find(function(e){return e.id===n.representationId})},e.prototype.nb=function(e,t){var i=this.vb(e);this.b.serviceManager.get(s.ServiceName.AdaptationService).setFixedRepresentation(i,t)},e.prototype.setVideoQuality=function(e){var t,i=this.getAvailableVideoQualities(),n=this.getVideoQuality();(t="auto"===e?W:i.find(function(t){return t.id===e}))&&n.id!==t.id&&(this.b.eventHandler.dispatchEvent(c.PlayerEvent.VideoQualityChanged,{sourceQuality:n,sourceQualityId:n.id,targetQuality:t,targetQualityId:t.id}),this.nb(h.MediaType.Video,e))},e.prototype.getVideoQuality=function(){var e=this.vb(h.MediaType.Video),t=this.b.serviceManager.get(s.ServiceName.AdaptationService),i=t.isAuto(e),n=t.getCurrentRepresentationId(e);return i||null===n?W:this.getAvailableVideoQualities().find(function(e){return e.id===n.representationId})},e.prototype.ob=function(){var e=this.b.sourceContext;e.source&&e.source.options&&e.source.options.headers&&(this.e.HTTP_HEADERS=e.source.options.headers)},e.prototype.pb=function(e){var t=this.tb();if(void 0!==t)if(e.type===h.StreamType.Hls&&_.ModuleManager.has(A.ModuleName.HLS)&&!t.hasReducer("hls")){var i=_.ModuleManager.get(A.ModuleName.HLS);t.addReducers(n(n({},k.engineBitmovinSourceReducers),{hls:i.HlsReducer}))}else t.addReducers(k.engineBitmovinSourceReducers)},e.prototype.qb=function(){this.f.on(T.MediaElementEvent.error,this.N),this.f.on(T.MediaElementEvent.timeupdate,this.Eb),this.f.on(T.MediaElementEvent.seeking,this.Db),this.f.on(T.MediaElementEvent.playing,this.X),this.f.on(T.MediaElementEvent.play,this.Y),this.f.on(T.MediaElementEvent.pause,this.Z)},e.prototype.rb=function(){this.c.debug("setting bitrate boundaries for audio to "+this.e.MIN_SELECTABLE_AUDIO_BITRATE+" - "+this.e.MAX_SELECTABLE_AUDIO_BITRATE),this.c.debug("setting bitrate boundaries for video to "+this.e.MIN_SELECTABLE_VIDEO_BITRATE+" - "+this.e.MAX_SELECTABLE_VIDEO_BITRATE)},e.prototype.sb=function(e,t){var i,n=this;return this.m===r.Unloaded?Promise.reject("Unload during load"):(this.C(e,this.b),this.b.sourceContext.source=e.config,(null==(i=this.b.videoElement)?void 0:i.eventHandler)&&this.b.videoElement.eventHandler.reset(),this.j=e,this.n=!1,this.o=!1,this.b.store.dispatch((0,m.updateSeekingProcess)({isInitial:!0})),this.rb(),this.w&&(this.v=c.LatencyMode.Suspended,this.w.reset()),this.qb(),this.e.GLOBAL_DISABLE_SEEKING=t||!1,this.m=r.Loading,this.l.init(e).then(function(){n.m=r.Loaded,n.Kb()}))},e.prototype.prepareLoad=function(){var e=this.b.serviceManager.get(s.ServiceName.PlayerStateService);e&&(this.x=e);var t=Promise.resolve();return this.m===r.Loading&&(t=this.unload()),this.x.reset(),this.m=r.Preparing,t},e.prototype.load=function(e,t){var i,n=this;if("dash"!==e.type&&"hls"!==e.type&&"smooth"!==e.type)return Promise.reject("invalid source");this.pb(e),this.ob(),this.y=(0,v.subscribe)(this.b.store)(function(e){return(0,y.getIsStopped)((0,y.getPlayerState)(e))},this.Fb,function(e){return!0===e}),this.g.on(c.PlayerEvent.DVRWindowExceeded,this.Gb,!0),this.g.on(c.PlayerEvent.Error,this.Ib,!0);var r=null!=(i=null==t?void 0:t.seeking)&&i;return this.f.ready().then(function(){return n.sb(e,r)})},e.prototype.tb=function(){return this.b.serviceManager.get(s.ServiceName.SourceStoreService,this.b.sourceContext.sourceIdentifier)},e.prototype.unload=function(e){var t=this;if(this.Jb(),this.m===r.Unloaded)return Promise.resolve();var i=this.m===r.Loaded;this.n=!1,this.m=r.Unloaded,this.k=!0,this.f.off(T.MediaElementEvent.error,this.N),this.f.off(T.MediaElementEvent.timeupdate,this.Eb),this.f.off(T.MediaElementEvent.seeking,this.Db),this.f.off(T.MediaElementEvent.playing,this.X),this.f.off(T.MediaElementEvent.play,this.Y),this.f.off(T.MediaElementEvent.pause,this.Z),null==this||this.y(),this.g.off(c.PlayerEvent.DVRWindowExceeded,this.Gb),this.g.off(c.PlayerEvent.Error,this.Ib),this.x.isPlaying()&&this.f.pause(),this.x.reset();var n=this.b.sourceContext.sourceIdentifier;return this.b.serviceManager.has(s.ServiceName.SynchronizedTimeService,n)&&!G(e)&&this.b.serviceManager.get(s.ServiceName.SynchronizedTimeService,n).reset(),this.Lb(),(this.l?this.l.terminate():Promise.resolve()).then(function(){t.j=void 0,t.J(e),G(e)||function(e){return!!e&&e===d.RECOVERY_ISSUER_NAME}(e)||(t.tb().dispatch((0,L.clearActiveTracksAction)()),t.U(null)),i&&t.g.dispatchEvent(c.PlayerEvent.SourceUnloaded)})},e.prototype.ub=function(){return this.l.isInitialized()},e.prototype.isPlaying=function(){return this.x.isPlaying()},e.prototype.isPaused=function(){return this.x.isPaused()},e.prototype.hasEnded=function(){return this.n},e.prototype.isMuted=function(){return this.f.isMuted()},e.prototype.isStalled=function(){return this.x.isStalled},e.prototype.isLive=function(){return this.t.isLive()},e.prototype.getVolume=function(){return this.f.getVolume()},e.prototype.getCurrentTime=function(e){void 0===e&&(e=h.TimeMode.AbsoluteTime);var t,i=null!=(t=this.T())?t:0;return!this.isLive()&&this.hasEnded()?e===h.TimeMode.RelativeTime?this.getDuration():this.getDuration()+i:e===h.TimeMode.RelativeTime?Math.max(0,this.l.getCurrentTime()-i):this.l.getCurrentTime()},e.prototype.getDuration=function(){return this.t.getDuration()},e.prototype.getAvailableVideoQualities=function(){return this.ub()?this.t.getVideoRepresentations(this.getCurrentPlayingPeriodId()):[]},e.prototype.getAvailableSegments=function(){return this.ub()?this.l.getAvailableSegments():{}},e.prototype.getAvailableAudioQualities=function(){var e=this.getAudio();if(!this.ub()||!e)return[];var t=this.t.getAudioRepresentations(this.getCurrentPlayingPeriodId());return t[e.id]?t[e.id]:[]},e.prototype.getDroppedVideoFrames=function(){return this.f.getDroppedVideoFrames()},e.prototype.setTargetBufferLevel=function(e,t,i){this.b.bufferSettings.setTargetLevel(e,t,i)},e.prototype.getBufferLevel=function(e,t){var i={level:null,targetLevel:this.b.bufferSettings.getTargetLevel(e,t),type:e,media:t},n=this.f.getCurrentTime(),r=(0,f.getMetricsState)(this.b.store.getState()),o=Object.keys(r).find(function(e){return b.MimeTypeHelper.isVideo(e)}),a=Object.keys(r).find(function(e){return b.MimeTypeHelper.isAudio(e)});return t===h.MediaType.Video&&o?i.level=this.l.getBufferLevel(o,n,e):t===h.MediaType.Audio&&a&&(i.level=this.l.getBufferLevel(a,n,e)),i},e.prototype.getTotalStalledTime=function(){var e=(0,f.getMetricsState)(this.b.store.getState());for(var t in e)if(e[t]){var i=(0,f.getMetricsLastEntry)(e,t,g.MetricType.StalledSeconds);if(i&&i.value&&!isNaN(i.value))return Math.round(100*i.value)/100}return 0},e.prototype.vb=function(e){return Object.keys((0,f.getMetricsState)(this.b.store.getState())).find(function(t){return t.includes(e)})},e.prototype.getDownloadedData=function(e){var t=this.vb(e),i=n({},this.xb(t)),r=n({},this.wb(t));return r.id&&(r.id=""+r.id),void 0===r.width&&void 0!==i.width&&(r.width=i.width),r.width=parseInt(""+r.width),void 0===r.height&&void 0!==i.height&&(r.height=i.height),r.height=parseInt(""+r.height),void 0===r.bitrate&&void 0!==i.bitrate&&(r.bitrate=i.bitrate),r.bitrate=parseInt(""+r.bitrate),r.isAuto=this.b.serviceManager.get(s.ServiceName.AdaptationService).isAuto(t),r},e.prototype.wb=function(e){if(this.l.hasStarted()){var t=(0,f.getMetricsState)(this.b.store.getState());if(t[e])return(0,f.getMetricsLastEntry)(t,e,g.MetricType.DownloadedRepresentation).value}return{}},e.prototype.xb=function(e){if(this.l.hasStarted()){var t=(0,f.getMetricsState)(this.b.store.getState());if(t[e])return(0,f.getMetricsLastEntry)(t,e,g.MetricType.DownloadedAdaptationSet).value}return{}},e.prototype.getDownloadedVideoData=function(){var e=this.getDownloadedData(h.MediaType.Video),t=!0;return e.hasOwnProperty("isAuto")&&(t=e.isAuto),e&&(e.bitrate||e.id)?{id:e.id,bitrate:e.bitrate,height:e.height,width:e.width,isAuto:t}:{id:"",bitrate:0,height:0,width:0,isAuto:!0}},e.prototype.getDownloadedAudioData=function(){var e=this.getDownloadedData(h.MediaType.Audio),t=!0;return e.hasOwnProperty("isAuto")&&(t=e.isAuto),e&&(e.bitrate||e.id)?{id:e.id,bitrate:e.bitrate,isAuto:t}:{id:"",bitrate:0,isAuto:!0}},e.prototype.getPlaybackVideoData=function(){var e=this.l.getPlaybackRepresentation(h.MediaType.Video)||{},t=isNaN(e._height)?0:Number(e._height),i=isNaN(e._width)?0:Number(e._width),n={id:e._id+"",bitrate:Number(e._bandwidth)||0,frameRate:e._frameRate,height:t,width:i,uid:e.uid};return e._codecs&&(n.codec=S.CodecStringHelper.getExtractedCodecStrings(e._codecs).video),n},e.prototype.getPlaybackAudioData=function(){var e,t={id:String(void 0),bitrate:Number(void 0)},i=this.l.getPlaybackRepresentation(h.MediaType.Audio);return i&&null!=(e=(0,O.representationToQuality)(i,i._mimeType))?e:t},e.prototype.setQueryParameters=function(e){this.e.QUERY_PARAMETERS=e},e.prototype.clearQueryParameters=function(){this.e.QUERY_PARAMETERS=void 0},e.prototype.yb=function(e){this.x&&this.x.isTimeShifting()&&(this.x.transitionToTimeShiftedState(e),this.i=-1)},e.prototype.zb=function(){this.yb(!1)},e.prototype.Ab=function(e){this.yb(e!==d.STARTUP_ISSUER_NAME)},e.prototype.getMaxTimeShift=function(){if(this.isLive()&&this.ub())return this.d.playback&&!1===this.d.playback.timeShift?0:this.l.getMaxTimeShift()},e.prototype.timeShift=function(e,t){var i=this;if(this.ub()&&0>=this.getMaxTimeShift()){-1===this.i&&(this.i=this.getCurrentTime(),0===this.i&&(this.i=this.l.getTimeShiftLiveEdge())),this.Ob();var n=this.l.getPlaybackTimeForTimeShiftOffset(e);this.x.transitionToTimeShiftingState(this.i,n,t||"api",t!==d.STARTUP_ISSUER_NAME),this.l.timeShift(e,function(){return i.Ab(t)}).catch(function(){return i.zb()})}},e.prototype.getTimeShift=function(){return this.ub()?this.l.getTimeShift():0},e.prototype.addSubtitle=function(e){var t=this;return this.ub()&&this.u?Promise.resolve(void 0).then(function(){t.u.addExternalSubtitle(e)}):Promise.reject(void 0)},e.prototype.removeSubtitle=function(e){this.ub()&&this.u&&this.u.removeSubtitle(e)},e.prototype.enableSubtitle=function(e){return this.ub()&&this.u?this.u.enableSubtitle(e):Promise.resolve(!1)},e.prototype.disableSubtitle=function(e){return this.ub()&&this.u?this.u.disableSubtitle(e):Promise.resolve(!1)},e.prototype.listSubtitles=function(){return this.ub()&&this.u&&this.l?this.u.getAvailableSubtitles(this.getCurrentPlayingPeriodId()):[]},e.prototype.setAudio=function(e){var t=this;if(this.ub()&&this.l&&"string"==typeof e){var i=this.getAudio();if(i&&i.id===String(e))return;this.l.setAudio(e).then(function(){var e=t.getAudio();e&&i&&e.id!==i.id&&t.b.eventHandler.dispatchEvent(c.PlayerEvent.AudioChanged,{targetAudio:e,sourceAudio:i,time:t.f.getCurrentTime()})}).catch(function(e){t.c.debug("setAudio failed for lang ",e)})}},e.prototype.getAvailableAudio=function(){return this.ub()&&this.l?this.l.getAvailableAudio(this.getCurrentPlayingPeriodId()).map(this.Bb):[]},e.prototype.getAudio=function(){if(this.ub()&&this.l){var e=this.l.getAudio();if(e)return this.Bb(e)}return null},e.prototype.getManifest=function(){var e=this.t.getManifest();if(e)return e._isHls?this.Cb():e.originalDashManifest},e.prototype.Cb=function(){return _.ModuleManager.get(A.ModuleName.HLS).selectors.getHlsState(this.tb().getState()).masterPlaylist.string},e.prototype.getBufferedRanges=function(){var e=this.l.getBufferedRanges(!0);return o.BufferRangeHelper.getCommonBufferedRanges(e).map(function(e){return{start:e.getStart(),end:e.getEnd()}})},e.prototype.getSnapshot=function(e,t){if(this.isPlaying()||this.isPaused())return this.f.getSnapshotData(e,t)},e.prototype.setPlaybackSpeed=function(e,t,i){void 0===t&&(t=1),void 0===i&&(i=!0),this.f.setPlaybackSpeed(e*t),this.x.playbackSpeed!==this.f.getPlaybackSpeed()&&this.x.setPlaybackSpeed(e,t,i)},e.prototype.getPlaybackSpeed=function(){return this.x.playbackSpeed},e.prototype.permitControl=function(e){this.p=e},e.prototype.getSeekableRange=function(){return(!this.isLive()||this.e.ENABLE_SEEK_FOR_LIVE)&&this.l?this.l.getSeekableRange():{start:-1,end:-1}},e.prototype.createManifestApi=function(){return C.MediaPlayerManifestApiFactory.create(this,this.b)},e.prototype.Hb=function(){var e=this.l.getTimeShiftHandler(),t=this.getMaxTimeShift()+e.getMinSegmentDuration(),i=this.l.getPlaybackTimeForTimeShiftOffset(t),n=e.isTimeInBufferedRange(i);this.b.logger.debug("Handling DVRWindowExceeded - TimeShifting to ".concat(n?t:"live edge")),this.timeShift(n?t:0)},e.prototype.getLatency=function(){return this.w.getLatency()},e.prototype.setTargetLatency=function(e){var t=Math.abs(this.t.getTimeShiftBufferDepthSeconds());e>t&&(e=t,this.c.debug("Tried to set target latency outside DVR window, corrected to lower bound",t)),this.b.eventHandler.dispatchEvent(c.PlayerEvent.TargetLatencyChanged,{from:this.w.getTargetLatency(),to:e}),this.w.setTargetLatency(e)},e.prototype.getTargetLatency=function(){return this.w.getTargetLatency()},e.prototype.setCatchupConfig=function(e){this.w.setCatchupConfig(e)},e.prototype.getCatchupConfig=function(){return this.w.getCatchupConfig()},e.prototype.setFallbackConfig=function(e){this.w.setFallbackConfig(e)},e.prototype.getFallbackConfig=function(){return this.w.getFallbackConfig()},e.prototype.release=function(e){var t,i=this;return this.g.off(c.PlayerEvent.PeriodSwitch,this.Mb),this.g.off(c.PlayerEvent.PeriodSwitched,this.Nb),this.g.off(c.PlayerEvent.PlaybackSpeedChanged,this.Pb),this.z(),null==(t=this.B)||t.call(this),this.unload(e).then(function(){return i.x=null,i.l=(0,u.dispose)(i.l),i.f.release().then(function(){return i.f=null})})},e.prototype.Jb=function(){this.A&&(this.A(),this.A=void 0)},e.prototype.Kb=function(){for(var e=this.getCurrentTime(),t=0,i=this.getAvailableAudio();t<i.length;t++){var n=i[t];this.b.eventHandler.dispatchEvent(c.PlayerEvent.AudioAdded,{track:n,time:e})}},e.prototype.Lb=function(){for(var e=this.getCurrentTime(),t=0,i=this.getAvailableAudio();t<i.length;t++){var n=i[t];this.b.eventHandler.dispatchEvent(c.PlayerEvent.AudioRemoved,{track:n,time:e})}},e.prototype.Ob=function(){var e=this;!this.B&&this.b.store&&(this.B=(0,y.subscribeToSeekedOrTimeshifted)(this.b.store,function(){var t;null==(t=e.B)||t.call(e),e.B=void 0,e.Q()?e.R():e.S()}))},e.prototype.getCurrentPlayingPeriodId=function(){return(0,U.getPlayingPeriodId)(this.tb().getState())},e.prototype.updateCallback=function(e){},e.prototype.onFullscreenEnter=function(){},e.prototype.onFullscreenExit=function(){},e.prototype.isAirplayAvailable=function(){return!1},e.prototype.isAirplayActive=function(){return!1},e.prototype.showAirplayTargetPicker=function(){},e}()},52090:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.MediaPlayerController=void 0,t.isBufferChangeRequired=K,t.getDefaultMaxStartupBuffer=Y;var n=i(4524),r=i(80813),o=i(56481),a=i(3714),s=i(75375),u=i(44468),c=i(91678),l=i(23690),d=i(87827),h=i(48488),p=i(15971),f=i(77179),g=i(93204),m=i(34047),y=i(79721),v=i(78877),S=i(87244),b=i(85434),E=i(15487),T=i(19274),_=i(88052),A=i(62756),P=i(35046),M=i(12030),I=i(87222),R=i(13422),C=i(16197),O=i(84696),D=i(14443),w=i(58784),N=i(11536),L=i(36193),k=i(62198),U=i(42208),x=i(88935),B=i(13114),F=i(39523),H=i(99529),j=i(52602),V=i(69102),W=i(60729),G=i(42614);function q(e){var t=_.ModuleManager.get(A.ModuleName.HLS,!1),i=null==t?void 0:t.M3u8Loader;return void 0!==i&&e instanceof i}function K(e,t){return!(0,V.areAudioMimeCodecsCompatible)({mimeType:e._mimeType,codec:(0,R.getCodecsFromAdaptationSet)(e)},{mimeType:t._mimeType,codec:(0,R.getCodecsFromAdaptationSet)(t)})}function z(e,t){var i=e.getPlaybackTimeRange(),n=(0,H.getTrackIdentifier)(e.getSegmentInfo());i&&(null==t||t.dispatch((0,F.removeStreamTimeRange)(n,i,H.StreamTimeRangeType.Loading)))}function Y(){return(0,E.isWebOS)()||(0,E.isTizen)()?2.5:1/0}t.MediaPlayerController=function(){function e(e,t){var i=this;this.YC={},this.HD=function(e){if(i.XC.isBufferClearingOngoing())z(e,i.ID());else{if(i.oC.trackSegment(e),i.GD(e))return i.RC.logger.debug("Dropping segment ".concat(e.getUrl())),void z(e,i.ID());var t=e.getMimeType(),n=i.YC[t];n&&i.JD(n)&&i.tC(e.getPeriodId()),i.XC.addSegment(e).then(function(){var e;null==(e=i.kC)||e.beat()}).catch(function(e){i.MC&&i.MC.debug(e)}),i.SC(e)}},this.gD=function(){var e=i.XC.getBufferedRangesMap(),t=Math.max.apply(Math,Object.values(e).filter(function(e){return e.length>0}).map(function(e){return e[e.length-1].start}));i.seek(t,!1,!0)},this.hD=function(){var e;i.jD(),i.UC&&i.UD(),i.fD(),i.iD(),i.UC&&(i.getAllSegmentControllers().forEach(function(e){return e.updateMpd()}),null==(e=i.mC)||e.onManifestUpdate()),i.RC.serviceManager.get(r.ServiceName.TimedMetadataService).parseEventStream()},this.wD=function(){(i.hasStreamEnded()||i.isInitialized()&&!i.cC.isPlaying())&&i.start()},this.CD=function(e){var t;if(e){if(e.success||408===e.httpStatus){var n=i.YC[e.mimeType];n&&i.DD(e,n)}e.success||null==(t=i.kC)||t.beat()}},this.OE=function(){i.getAllSegmentControllers().every(function(e){var t=i.lC.getTimeForNextSegment(e.getMimeType());return e.hasNext(t)})?i.MC.debug("ignoring ended event in firePlaybackFinishedEvent as there are more segments available"):i.bC.isLastPeriod(i.dC.getCurrentPlayingPeriodId())?i.XC.hasFutureBufferBlockData()||(i.stop(),i.MC.debug("Stopping buffer controller"),i.XC.stop(!0),i.cC.transitionToStoppedState()):i.MC.debug("ignoring ended event in firePlaybackFinishedEvent as there is a future period")},this.RC=e,this.MC=e.logger,this.NC=e.settings,this.OC=e.bufferSettings,this.PC=e.eventHandler,this.QC=e.renderer,this.SC=t,this.UC=!1,this.TC=null,this.VC={},this.WC=0,this.gC=!1,this.fC=!1,this.pC=new N.PlayerConfigEnhancer(e)}return e.prototype.tC=function(e){this.XC.addRequiredMediaType(e,"video/mp4"),this.XC.addRequiredMediaType(e,"audio/mp4")},e.prototype.ED=function(){var e=this,t=this.bC.isLive(),i=t?this.getTimeShift():this.QC.getCurrentTime();t?this.timeShift(i,function(){},!0).catch(function(t){return e.RC.logger.debug("TimeShift failed",t)}):this.seek(i,!1,!1,!0)},e.prototype.FD=function(){this.ED(),this.RC.logger.debug("manifest update interrupted by DRM key status change")},e.prototype.GD=function(e){var t=b.MimeTypeHelper.isSubtitle(e.getMimeType()),i=this.RC.sourceContext.technology.streaming===u.StreamType.Hls,n=(0,f.getStartTimeOffset)(this.ID().getState())+this.bC.getDuration(),r=this.isVod()&&e.getPlaybackTime()>=n,o=this.gC||r,a=this.bC.isRepresentationExcluded(e.getRepresentationId());return!t&&!i&&o||a},e.prototype.ID=function(){return this.RC.serviceManager.get(r.ServiceName.SourceStoreService,this.RC.sourceContext.sourceIdentifier)},e.prototype.JD=function(e){var t=m.CodecStringHelper.getExtractedCodecStrings(e.getCodecs());return!!(t.video&&t.audio)},e.prototype.getMaxTimeShift=function(){return this.getTimeShiftHandler().getMaxTimeShift()},e.prototype.KD=function(){this.PC.off(a.PlayerEvent.SegmentRequestFinished,this.CD)},e.prototype.LD=function(){var e=this,t=this.RC.store;!this.sC&&t&&(this.sC=(0,g.subscribe)(t)(function(e){if(e)return(0,d.getPlayerState)(e).seekingProcess},function(t,i){return t&&i&&e.zD(t,i)}))},e.prototype.MD=function(){var e=this.ID();!this.qC&&e&&(this.qC=(0,g.subscribe)(e)(k.getManifest,this.hD,function(e,t){return e.isInitialized&&!t.isInitialized}))},e.prototype.ND=function(){this.qC&&(this.qC(),this.qC=null)},e.prototype.OD=function(){var e=this.ID();!this.rC&&e&&(this.rC=(0,g.subscribe)(e)(x.getPlayingTracksState,this.wD,x.wasSwitchingToPeriodIdReset))},e.prototype.PD=function(){this.rC&&(this.rC(),this.rC=void 0)},e.prototype.QD=function(e){var t,i,n=(0,R.getMimeTypeForAdaptationSet)(e);if(b.MimeTypeHelper.isAV(n)){this.RC.store.dispatch((0,c.initializeMetricsForMimeType)(n,this.RC.settings)),this.ID().dispatch((0,L.setMediaTypeAction)(e._internalId,(0,O.resolveMediaTypes)(e))),this.VC[n]=(0,R.getCodecsFromAdaptationSet)(e);
1var r=this.dC.getCurrentPlayingPeriodId();this.YC[n]=new D.SegmentController(this.RC,this.HD,n,this.VC[n],e.isTransmuxingRequired,this.ZC,null!=(t=e._periodId)?t:r,this.ID()),null==(i=this.mC)||i.updateSegmentControllers(this.YC),this.hC&&this.YC[n].setTransmuxer(this.hC),r&&this.QC.storeDrmInitDataFromManifest(e),this.RC.segmentInfoService&&this.RC.segmentInfoService.setSegmentControllers(Object.values(this.YC))}},e.prototype.updatePeriodForTimeshift=function(e,t,i){var n,r=this.dC.getCurrentPlayingPeriodId();r||this.dC.setCurrentPlayingPeriodId(e),this.dC.getCurrentLoadingPeriodId()!==e&&i&&this.switchLoadingPeriodForAllMedia(e),t&&r!==e&&(this.RC.logger.debug("Updating current playing period to ".concat(e)),this.dC.setCurrentPlayingPeriodId(e)),r!==e&&(null==(n=(0,p.getSourceStore)(this.RC))||n.dispatch((0,U.periodSwitchStarted)(e)))},e.prototype.RD=function(e){var t=e.AdaptationSet.find(function(e){return b.MimeTypeHelper.isVideo(e._mimeType)});t&&this.XC.addRequiredMediaType(e._id,t._mimeType);var i=e.AdaptationSet.find(function(e){return b.MimeTypeHelper.isAudio(e._mimeType)});i&&this.XC.addRequiredMediaType(e._id,i._mimeType)},e.prototype.SD=function(e){var t=this;e.AdaptationSet.filter(function(e){return b.MimeTypeHelper.isSubtitle(e._mimeType)}).forEach(function(i){t.XC.addRequiredMediaType(e._id,i._mimeType)})},e.prototype.TD=function(e){this.RD(e),this.SD(e)},e.prototype.UD=function(){var e=this;
1this.bC.getAllPeriods().forEach(function(t){e.TD(t),e.XC.checkIfEndOfBufferReached(e.NC.END_OF_BUFFER_TOLERANCE,!0)})},e.prototype.VD=function(){var e=this;return this.TC?this.TC:!0===this.UC||null===this.bC.getManifest()?this.TC=Promise.resolve():(this.WD(),this.VC={},this.TC=this.QC.ready().then(function(){return e.ZD()}))},e.prototype.WD=function(){var e=this;this.YC&&(Object.keys(this.YC).forEach(function(t){return e.YC[t].dispose()}),this.YC={})},e.prototype.XD=function(){var e=this;if(_.ModuleManager.has(A.ModuleName.ContainerTS)){var t=_.ModuleManager.get(A.ModuleName.ContainerTS);this.getAllSegmentControllers().filter(function(e){return e.isTransmuxerRequired()}).forEach(function(i){e.hC=e.hC||new t.WebWorkerTransmuxer(e.RC,e.YD()),i.setTransmuxer(e.hC)}),this.iC&&this.iC.setTransmuxer(this.hC)}},e.prototype.YD=function(){return this.getAllSegmentControllers().filter(function(e){return b.MimeTypeHelper.isAV(e.getMimeType())}).length>1},e.prototype.ZD=function(){this.dC.setInitialPeriod(),this.eD(),this.UD();var e=this.dC.getCurrentPlayingPeriod()||this.bC.getFirstPeriod();e&&this.bD(e),this.aD(),this.XD(),this.UC=!0},e.prototype.aD=function(){var e,t,i,n,r=this.getAudioSegmentController();if(this.iC){var o=null!=(i=null==(t=null==(e=null==r?void 0:r.getCurrentLangObj)?void 0:e.call(r))?void 0:t.lang)?i:null==(n=(0,I.getPreferredLanguage)("audio/mp4"))?void 0:n.language;this.iC.enableForcedSubtitle(o)}},e.prototype.bD=function(e){var t,i=this;this.cD(null!=(t=null==e?void 0:e.AdaptationSet)?t:[]).forEach(function(e){return i.dD(e)})},e.prototype.cD=function(e){var t,i,n,r=e.find(function(e){return b.MimeTypeHelper.isAudio(e._mimeType)}),o=e.find(function(e){return b.MimeTypeHelper.isVideo(e._mimeType)}),a=(null!=(i=null==(t=null==o?void 0:o.ContentComponent)?void 0:t.length)?i:0)>1;if(!r||!o||!a)return e;var s=(0,I.getHlsDefaultLanguage)(r._mimeType,this.ID().getState()),u=null==(n=o.ContentComponent)?void 0:n.find(function(e){return e._lang===(null==s?void 0:s.language)&&e._id===(null==s?void 0:s.name)});return s&&u?[o]:e},e.prototype.dD=function(e){var t=(0,R.getMimeTypeForAdaptationSet)(e);(0,b.isMediaTypeContained)(this.VC,t)||this.QD(e)},e.prototype.eD=function(){this.XC=new P.BufferController(this.RC,this.gD,this.bC.getTotalDuration(),this.dC.getCurrentPlayingPeriodId())},e.prototype.getBufferLevel=function(e,t,i,n){return void 0===n&&(n=!0),this.XC?this.XC.getOverallBufferLevel(e,t,i,n):0},e.prototype.fD=function(){var e=this;if(this.dC.shouldHandleDroppedOutPeriod()&&this.dC.isLoadingPeriodDroppedOut()){var t=this.getTimeShift();this.MC.debug("Current loading period (".concat(this.dC.getCurrentLoadingPeriodId(),") ")+"dropped out of the manifest, handling gracefully by time shifting to current offset ".concat(t)),this.timeShift(t,void 0,!0).catch(function(t){return e.RC.logger.debug("TimeShift failed",t)})}},e.prototype.iD=function(){var e=this;this.RC.serviceManager.maybeCall(r.ServiceName.ThumbnailService,function(t){e.RC.sourceContext.source&&e.RC.sourceContext.source.thumbnailTrack||t.addThumbnails(e.bC.getAllDashThumbnailSources())})},e.prototype.jD=function(){var e=this.bC.isLive(),t=this.RC.serviceManager.get(r.ServiceName.StartOffsetService),i=this.bC.hasSuggestedStartPosition();if(e){var n=this.bC.getTimeShiftBufferDepthSeconds();0!==n&&(this.jC.expirationTimeInSeconds=n),i&&(t.manifestStartOffset=this.bC.getLiveStartOffset(),this.kD())}else i&&(t.manifestStartOffset=this.bC.getVodStartOffset())},e.prototype.kD=function(){if(!this.isInitialized()){var e=Math.abs(this.bC.getLiveStartOffset(!1));e=e>0?e:this.bC.getMaxSegmentDuration(),this.RC.bufferSettings.setDistanceToLiveEdge(e)}},e.prototype.terminate=function(){var e,t,i=this;this.MC.debug("stopping playback"),this.stop(),this.getAllSegmentControllers().forEach(function(e){return e.stop()}),this.XC&&this.XC.stop(!0),this.hC=(0,o.dispose)(this.hC),this.mC=(0,o.dispose)(this.mC),this.oC=(0,o.dispose)(this.oC),(0,o.dispose)(this.dC),this.nC=null,this.QC.off(T.MediaElementEvent.ended,this.OE);var n=this.QC.shutdown(!1).catch(function(e){return i.MC.debug("Got an error on shutdown",{message:e.message}),Promise.resolve()});return this.KD(),this.PD(),this.UC=!1,null==(e=this.dC)||e.setCurrentPlayingPerio
1dId(void 0),this.VC=null,this.RC.store.dispatch((0,h.resetDrmKidErrors)()),null==(t=this.bC)||t.resetExcludedRepresentations(),this.WD(),n},e.prototype.dispose=function(){this.mC=(0,o.dispose)(this.mC),this.XC=(0,o.dispose)(this.XC),(0,o.dispose)(this.dC);try{this.KD()}catch(e){}this.ND(),this.PD(),this.WD(),this.sC&&this.sC(),this.iC=null,this.kC=null,this.lC=null,this.YC=null,this.NC=null,this.OC=null,this.PC=null,this.QC=null,this.VC=null},e.prototype.lD=function(){var e=this.RC.sourceContext.sourceIdentifier;this.bC=this.RC.serviceManager.get(r.ServiceName.ManifestService,e),this.cC=this.RC.serviceManager.get(r.ServiceName.PlayerStateService),this.iC=this.RC.serviceManager.get(r.ServiceName.SubtitleService,e),this.jC=this.RC.serviceManager.get(r.ServiceName.MetadataParsedService),this.ZC=this.RC.serviceManager.get(r.ServiceName.ManifestLoadingService,e),this.kC=this.RC.serviceManager.get(r.ServiceName.HeartbeatService,e),this.lC=this.RC.serviceManager.get(r.ServiceName.StreamTimeService),this.aC=this.RC.serviceManager.get(r.ServiceName.ManifestUpdateSchedulingService,e)},e.prototype.init=function(e){var t,i=this,n=this.ID();this.dC=new w.PeriodSwitchTracker(this.RC),this.OD(),this.LD(),this.eC=!1,this.RC.store.dispatch((0,h.resetDrmKidErrors)()),this.lD(),n&&!this.oC&&(this.oC=new M.DrmKidErrorHandler(this.RC,function(){return i.FD()})),this.QC.on(T.MediaElementEvent.ended,this.OE);var o=this.aC.isInitiated()?Promise.resolve():this.aC.init(e.url.toString());return e.config.drm&&(null==(t=this.RC.serviceManager.get(r.ServiceName.DrmService))||t.resolveDrmSystemFromSourceConfig(e.config.drm)),o.then(function(){return i.MD(),i.hD(),i.pC.adjustToCurrentSource(i.RC,i.bC),i.UC?Promise.resolve():i.VD()})},e.prototype.stop=function(){var e;this.MC.debug("Stopping main timer"),null==(e=this.kC)||e.stop(),this.TC=null,this.PC.off(a.PlayerEvent.SegmentRequestFinished,this.CD),this.ND()},e.prototype.isOneLoaderReady=function(){return this.getAllSegmentControllers().some(function(e){return e.canLoad()})},e.prototype.areAllLoadersReady=function(){return this.getAllSegmentControllers().every(function(e){return e.canLoad()})},e.prototype.isVod=function(){return!this.bC.isLive()},e.prototype.mD=function(){return this.cC.isPaused()&&this.NC.STOP_DOWNLOAD_ON_PAUSE&&this.bC.isLive()},e.prototype.nD=function(e){var t=Object.keys(this.YC).find(function(t){return b.MimeTypeHelper.isAV(t)&&e!==t});if(!t||(0,W.isPlayingLowLatencyHls)(this.RC))return!1;if(this.eC)return b.MimeTypeHelper.isAudio(t);var i=this.YC[t],n=this.lC.getTimeForNextSegment(t);if(i.hasNext(n)&&!i.hasDownloadError&&!i.hasDelayedSegmentsInTransmuxer()){var r=this.getBufferRelevantTime(),o=this.tD(e,r),a=this.tD(t,r);return this.NC.DISABLE_PARALLEL_SEGMENT_LOADING&&o===a?b.MimeTypeHelper.isVideo(t):!this.oD(t,a)&&n<this.lC.getTimeForNextSegment(e)}return i.getCurrentPeriodId()!==this.YC[e].getCurrentPeriodId()},e.prototype.oD=function(e,t){var i=b.MimeTypeHelper.getMediaType(e);return t>=this.OC.getForwardTargetLevel(i)},e.prototype.pD=function(){var e=this,t=this.getAllSegmentControllers(),i=this.XC.hasPendingSegments(),n=t.map(function(e){return e.getMimeType()}),r=t.some(function(e){return e.hasPendingSegments()}),o=n.some(function(t){return e.QC.isDataBeingAppended(t)});return!r&&!i&&!o},e.prototype.shouldSuspendHeartbeat=function(){return!this.isOneLoaderReady()||this.mD()||this.XC.isBufferClearingOngoing()||this.fC},e.prototype.getActiveSegmentControllers=function(){var e=this;return this.getAllSegmentControllers().filter(function(t){return e.qD(t)})},e.prototype.qD=function(e){var t=this.dC.getCurrentLoadingPeriodId(),i=this.lC.getTimeForNextSegment(e.getMimeType());return e.canLoad()&&(e.hasNext(i)||e.hasPendingSegments(t))&&!this.nD(e.getMimeType())},e.prototype.shouldClearSubtitleServiceBuffers=function(){var e;return!this.cC.seekingOrTimeshifting&&!!(null==(e=this.iC)?void 0:e.hasSubtitles())},e.prototype.clearSubtitleServiceBuffers=function(){var e;null==(e=this.iC)||e.clearBuffersUntil(this.QC.getCurrentTime()-10)},e.prototype.areMediaTypesFinalForPlayingPeriod=function(){var e=this.dC.getCurrentPlayingPerio
1dId();return this.XC.areBufferBlockMediaTypesFinalForPeriod(e)},e.prototype.maybeStop=function(){var e=this.bC.isManifestFinalized(),t=this.bC.isLastPeriod(this.dC.getCurrentLoadingPeriodId());e&&t&&(this.XC.stop(!1),this.pD()&&(this.signalEndOfStream(),this.stop()))},e.prototype.rD=function(){var e=this;if(!this.cC.isPlay()||this.cC.hasBeenPlaying)return!1;var t=0!==this.RC.settings.MAX_STARTUP_BUFFER?this.RC.settings.MAX_STARTUP_BUFFER:Y();if(t<=0||t===1/0||this.XC.isSegmentStoreWaitingForSegments())return!1;var i=Object.keys(this.VC),n=this.getBufferRelevantTime(),r=i.map(function(t){return e.tD(t,n)}),o=Math.min.apply(Math,r),a=this.ID(),s=(0,B.getDrmState)(null==a?void 0:a.getState());return o>=(t=Math.max(t,this.RC.settings.STARTUP_THRESHOLD,(0,v.getBufferEndSafetyMargin)(s),(0,G.getMinSafeStartupBuffer)(this.RC,i)))&&(this.sD(n)?(this.MC.debug("Not delaying segment loading despite reaching max startup buffer: current time ".concat(n," is in an A/V timeline gap")),!1):(this.MC.debug("Max startup buffer of ".concat(t," reached, delaying segment loading until playback has started"),{currentTime:n,maxStartupBuffer:t,bufferLevels:r}),!0))},e.prototype.sD=function(e){if(this.XC.isInStartupPhase())return!1;var t=this.XC.getBufferedRangesMap(!1),i=Object.keys(t),r=i.filter(function(i){return!(0,n.isInTimeRanges)(t[i],e)});return 0!==r.length&&r.length!==i.length&&r.every(function(i){return Math.min.apply(Math,t[i].map(function(e){return e.start}))-e>=1})},e.prototype.getNextSegment=function(e,t){if(e.canLoad()&&this.QC.shouldContinueBuffering()&&!this.rD()){var i=b.MimeTypeHelper.getMediaType(e.getMimeType()),n=this.OC.getForwardTargetLevel(i),o=this.tD(e.getMimeType(),this.getBufferRelevantTime());o>=n||(this.RC.serviceManager.get(r.ServiceName.AdaptationService).addSample(e.getMimeType(),{bufferTargetLevel:n,bufferLevel:o}),e.hasNext(t)&&e.getNext(t))}},e.prototype.getBufferRelevantTime=function(){return this.cC.seekingOrTimeshifting?this.cC.targetPlaybackTime:this.QC.getCurrentTime()},e.prototype.tD=function(e,t){return this.getBufferLevel(e,t,u.BufferType.ForwardDuration)},e.prototype.isLoadingLastPeriod=function(){return this.dC.isLoadingLastPeriod()&&!this.eC},e.prototype.switchLoadingPeriod=function(){if(this.eC){var e=this.getAudioSegmentController(),t=e.getCurrentPeriodId(),i=this.bC.getNextPeriod(t)._id;this.vD(i),e.getCurrentPeriodId()===this.dC.getCurrentLoadingPeriodId()&&(e.isTransmuxerRequired()&&e.getTransmuxer()&&(e.getTransmuxer().dispose(),e.setTransmuxer(this.hC)),this.eC=!1,this.MC.debug("The audio SegmentController caught up to the overall loading period again."))}else{var n=this.bC.getNextPeriod(this.dC.getCurrentLoadingPeriodId());n&&this.switchLoadingPeriodForAllMedia(n._id)}},e.prototype.switchLoadingPeriodForAllMedia=function(e){var t=this;e!==this.dC.getCurrentLoadingPeriodId()&&(this.eC=!1,this.uD(e),this.getAllSegmentControllers().filter(function(t){return t.getCurrentPeriodId()!==e}).forEach(function(i){i.switchPeriod(e),t.QC.storeDrmInitDataFromManifest(i.getAdaptationSetForPeriodId(e))}),this.dC.setCurrentLoadingPeriodId(e))},e.prototype.uD=function(e){var t,i,n=this;(null!=(i=null==(t=this.bC.getPeriod(new C.PeriodId(e)))?void 0:t.AdaptationSet)?i:[]).forEach(function(e){return n.dD(e)}),this.resetTransmuxer()},e.prototype.vD=function(e){var t=this.getAudioSegmentController(),i=t.getCurrentPeriodId();t.resetTransmuxer(),t.switchPeriod(e),this.MC.debug("Switched audio loading period from ".concat(i," to ").concat(e))},e.prototype.isAVCompletelyLoaded=function(){var e=this.getAllSegmentControllers().some(function(e){return e.hasPendingSegments()})||this.XC.hasPendingSegments();return this.bC.isManifestFinalized()&&!e},e.prototype.getBufferedRanges=function(e){return void 0===e&&(e=!1),this.XC.getBufferedRangesMap(e)},e.prototype.resetTransmuxer=function(){this.hC&&(this.hC.dispose(),this.hC=null),this.XD()},e.prototype.xD=function(){this.XC.hasStopped()&&this.XC.restart()},e.prototype.yD=function(e,t,i,n){if(i&&0===e)return!1;var r=e<this.QC.getCurrentTime()&&this.RC.settings.CLEAR_BUFFERS_O
vendor: 16,055 bytes, line 1
1N_SEEKING_BACKWARDS;return!t&&(!this.XC.isInBufferedRange(e)||r)||n},e.prototype.zD=function(e,t){var i;if(-1===e.targetTime&&t.targetTime>=0)null==(i=this.cC)||i.transitionToSeekedState(t.issuer!==s.STARTUP_ISSUER_NAME);else{var n=e.targetTime!==t.targetTime,r=e.targetTime>=0;n&&r&&this.seek(e.targetTime,e.issuer===s.STARTUP_ISSUER_NAME)}},e.prototype.seek=function(e,t,i,n){var r,o=this;if(void 0===t&&(t=!1),void 0===i&&(i=!1),void 0===n&&(n=!1),this.XC){this.xD(),this.WC++;var a=this.WC,u=null!=(r=this.bC.getPeriodIdForTime(e))?r:y.DEFAULT_PERIOD_ID;this.AD(u);var c,h,f=this.dC.getCurrentPlayingPeriodId();this.MC.debug("seek from current period (".concat(f,") to target period ")+"(".concat(u,") - seek time in period is: ").concat(e)),this.XC.readyToSeek().then(function(){var r;if(h=o.yD(e,i,t,n),c=o.dC.getCurrentLoadingPeriodId()!==u&&h,f!==u&&(null==(r=(0,p.getSourceStore)(o.RC))||r.dispatch((0,U.periodSwitchStarted)(u))),h&&o.XC.isBufferAvailable())return o.BD()}).then(function(){return o.UC?(c&&o.switchLoadingPeriodForAllMedia(u),h&&o.getAllSegmentControllers().forEach(function(t){t.setAdaptionLogicStartupPhase(),t.seekTo(e)}),(t?Promise.resolve():o.start()).then(function(){var t;null==(t=o.kC)||t.beat(),o.XC.setCurrentTime(e).then(function(t){var i;o.RC.isDisposed||(o.WC===a?(o.MC.debug("Successfully seeked to ".concat(t)),null==(i=(0,p.getSourceStore)(o.RC))||i.dispatch((0,U.periodSwitchFinished)(u)),o.RC.store.dispatch((0,l.updateSeekingProcess)({targetTime:-1,issuer:"",isInitial:!1,seekableRange:{start:-1,end:-1}}))):function(e){var t=e.getState();if(!t)return!1;var i=(0,d.getPlayerState)(t).seekingProcess.issuer;return i!==s.STARTUP_ISSUER_NAME&&""!==i}(o.RC.store)&&o.RC.logger.debug("Seek to ".concat(e," has finished but a newer operation has been started")))}).catch(function(e){o.MC.debug("Failed to set currentTime on seek",e)})})):(o.MC.debug("Aborting seek as MediaPlayerController has been terminated!"),Promise.resolve())})}},e.prototype.AD=function(e){var t=this;void 0===this.dC.getCurrentPlayingPeriodId()&&(this.MC.debug("current period is undefined, using seek target period "+e),this.dC.setCurrentPlayingPeriodId(e),this.resetTransmuxer(),this.getAllSegmentControllers().forEach(function(e){e.switchPeriod(t.dC.getCurrentPlayingPeriodId()),b.MimeTypeHelper.isAV(e.getMimeType())&&t.QC.storeDrmInitDataFromManifest(e.getCurrentAdaptationSet())}),this.dC.setCurrentLoadingPeriodId(this.dC.getCurrentPlayingPeriodId()))},e.prototype.BD=function(){var e=this;return this.RC.logger.debug("Clearing buffer on seek"),this.gC=!1,this.getAllSegmentControllers().forEach(function(e){return e.cancelLoading()}),this.XC.clearBuffers().catch(function(){e.MC.debug("Failed to clear buffers on seek, carrying on regardless")})},e.prototype.getAllSegmentControllers=function(){return Object.values(this.YC||{})},e.prototype.getAudioSegmentController=function(){return this.getAllSegmentControllers().find(function(e){return b.MimeTypeHelper.isAudio(e.getMimeType())})},e.prototype.DD=function(e,t){var i,n;if(!(e.isInit||!e.success&&this.cC.seekingOrTimeshifting)){var o=b.MimeTypeHelper.getMediaType(t.getMimeType()),a=this.getBufferLevel(t.getMimeType(),this.QC.getCurrentTime(),u.BufferType.ForwardDuration),s=this.OC.getForwardTargetLevel(o);null==(n=null==(i=this.RC.serviceManager)?void 0:i.get(r.ServiceName.AdaptationService))||n.addSample(t.getMimeType(),{bufferTargetLevel:s,bufferLevel:a,segmentDuration:e.duration,segmentDownloadDuration:e.downloadTime,downloadCancelled:!e.success})}},e.prototype.signalEndOfStream=function(e){void 0===e&&(e=!0),this.isVod()&&(this.gC||(this.gC=!0,this.XC.setEndOfStream(!0),e&&this.stop()),this.XC.isStarted()&&this.XC.stop())},e.prototype.start=function(){var e=this;return this.hasStarted()?Promise.resolve():this.VD().then(function(){var t;e.XC.hasStreamEnded()&&(e.seek((0,f.getStartTimeOffset)(e.ID().getState())),e.getAllSegmentControllers().forEach(function(e){return e.resetTransmuxer()})),e.XC.isStarted()||e.XC.restart(),e.getAllSegmentControllers().filter(function(e){return b.MimeTypeHelper.isAV(e.getMimeType())}).forEach(function(t){return e.QC.storeDrmInitDataFromManifest(t.getCurrentAdaptationSet())}),e.MC.debug("Starting main timer"),e.gC=!1,null==(t=e.kC)||t.start(),e.MD(),e.PC.on(a.PlayerEvent.SegmentRequestFinished,e.CD)})},e.prototype.maybeTransitionToPausedState=function(e){(0,S.isSwitchingBufferBlocks)(this.ID())?this.RC.logger.debug("Ignoring transition to Paused because buffer block switch is ongoing"):this.cC.transitionToPausedState(!0,e,!0)},e.prototype.PE=function(e){var t=this;return Promise.all(e.map(function(e){return t.XC.clearCacheForMimeType(e),t.XC.clearBuffer(e)})).then(function(){})},e.prototype.QE=function(e,t){var i=this,n=e.getSourceBufferTypes().find(b.MimeTypeHelper.isAudio);return this.XC.clearCacheForMimeType(n),this.XC.removeBufferRange(n,t+this.NC.AUDIO_TRACK_SWITCH_BUFFER_GRACE_PERIOD).catch(function(){return i.MC.debug("Failed to trim forward buffer after audio track switch")})},e.prototype.RE=function(e,t){var i=this;return this.XC.setEndOfStream(!1).then(function(){var n=i.NC.DISABLE_AUDIO_BUFFER_CLEARING_ON_TRACK_SWITCH?i.QE(e,t):i.PE(e.getSourceBufferTypes());return e.getCurrentPeriodId()!==i.dC.getCurrentPlayingPeriodId()?i.aE(e):e.getCurrentPeriodId()!==i.dC.getCurrentLoadingPeriodId()&&i.dC.setCurrentLoadingPeriodId(e.getCurrentPeriodId()),e.setAdaptionLogicStartupPhase(),e.seekTo(t),i.start().catch(function(){return i.MC.debug("Failed to restart stopped MPC after audio track switch")}),n.then(function(){i.NC.DISABLE_AUDIO_BUFFER_CLEARING_ON_TRACK_SWITCH||i.QC.setCurrentTime(t).catch(function(e){return i.MC.debug("Failed to set currentTime on audio track switch",e)})}).catch(function(e){return i.MC.debug("Failed to attempt to restore playback after audio track switch",e)})})},e.prototype.setAudio=function(e){var t,i=this,n=this.getAvailableAudio(this.dC.getCurrentPlayingPeriodId()),r=n.find(function(t){return t.id===e});if(!this.UC||!r)return Promise.reject(null);var o=null==(t=this.getAudio())?void 0:t.id,a=n.find(function(e){return e.id===o});if(!a||o===e)return Promise.reject(o);var s=Object.keys(this.YC),u=s.find(b.MimeTypeHelper.isAudio)||s.find(b.MimeTypeHelper.isVideo),c=this.bC.getAdaptationSet(a.adaptationSetId),l=this.bC.getAdaptationSet(r.adaptationSetId);return c&&l&&u?(this.fC=!0,this.SE(l,r.id).then(function(){var e,t=null!=(e=i.bC.getAdaptationSet(r.adaptationSetId))?e:l;return i.UE(c,t,u).then(function(e){return i.VE(c,t,r,e)}).then(function(e){return i.TE(e)}).then(function(e){return i.YE(e,r)})}).finally(function(){return i.fC=!1})):Promise.reject("Did not find matching adaptation set")},e.prototype.SE=function(e,t){return b.MimeTypeHelper.isAudio(e._mimeType)&&q(this.ZC)?this.ZC.updateAdaptationSet(t):Promise.resolve()},e.prototype.TE=function(e){return Object.keys(e).some(b.MimeTypeHelper.isAudio)&&q(this.ZC)&&this.getAllSegmentControllers().forEach(function(e){return e.updateMpd()}),Promise.resolve(e)},e.prototype.UE=function(e,t,i){var n,r=this,o=K(t,e),a=b.MimeTypeHelper.isVideo(t._mimeType)||b.MimeTypeHelper.isVideo(e._mimeType),s=!(0,V.hasContentProtection)(e.ContentProtection,t.ContentProtection);return!a&&(o||s)?(this.XC.updateRequiredMediaType(t._mimeType,i),this.XE(i,t).then(function(){var e=Object.keys(r.YC).find(b.MimeTypeHelper.isVideo);return s&&e?r.PE([e]).then(function(){var t,i=r.YC[e],n=r.dC.getCurrentPlayingPeriodId();i.getCurrentPeriodId()!==n&&r.YC[e].switchPeriod(n),r.YC[e].seekTo(r.QC.getCurrentTime()),null==(t=r.mC)||t.updateSegmentControllers(r.YC)}):Promise.resolve()}).then(function(){return r.XC.changeBufferType(t._mimeType,r.VC[t._mimeType],s)})):Promise.resolve(((n={})[t._mimeType]="",n))},e.prototype.VE=function(e,t,i,n){var r=this;return b.MimeTypeHelper.isVideo(t._mimeType)||b.MimeTypeHelper.isVideo(e._mimeType)?this.PE([e._mimeType,t._mimeType]).then(function(){var n=b.MimeTypeHelper.isVideo(t._mimeType);return r.hC.setShouldExpectSeparateAvSegments(!n),n?(r.WE(e),Promise.resolve()):(r.dD(t),r.ZE(i,e._mimeType))}).then(function(){return n}):Promise.resolve(n)},e.prototype.WE=function(e){var t;if(e){var i=e._mimeType,n=this.YC[i];n.cancelLoading(),n.dispose(),delete this.YC[i],delete this.VC[i],null==(t=this.mC)||t.updateSegmentControllers(this.YC),this.ID().dispatch((0,L.removeActiveTrackAction)(e._internalId)),this.RC.segmentInfoService&&this.RC.segmentInfoService.setSegmentControllers(Object.values(this.YC))}},e.prototype.XE=function(e,t){var i=this,n=this.YC[e];return this.WE(n.getCurrentAdaptationSet()),this.PE([e]).then(function(){return i.QD(t),t._mimeType})},e.prototype.YE=function(e,t){var i=this;return Promise.all(Object.keys(e).map(function(e){return i.ZE(t,e)})).then(function(){})},e.prototype.ZE=function(e,t){if(this.iC&&this.iC.enableForcedSubtitle(e.lang),this.YC[t].setCurrentLangObj(e),this.YC[t].cancelLoading(),this.hasStarted()||this.gC){var i=this.getBufferRelevantTime();return this.RE(this.YC[t],i)}return Promise.resolve()},e.prototype.getAudio=function(){if(this.UC){var e=void 0,t=Object.keys(this.YC).find(function(e){return b.MimeTypeHelper.isAudio(e)});if(t&&(e=this.YC[t].getCurrentLangObj()),!e){var i=Object.keys(this.YC).find(function(e){return b.MimeTypeHelper.isVideo(e)});if(i&&this.YC[i].getSourceBufferTypes()){var n=this.YC[i];if(n.getSourceBufferTypes().some(function(e){return b.MimeTypeHelper.isAudio(e)})){var r=n.getCurrentAdaptationSet()._internalId;e=this.getAvailableAudio(this.dC.getCurrentPlayingPeriodId()).find(function(e){return e.adaptationSetId===r})||n.getCurrentLangObj()}}}return e||null}return null},e.prototype.aE=function(e){if(this.JD(e))this.switchLoadingPeriodForAllMedia(this.dC.getCurrentPlayingPeriodId());else{if(this.MC.debug("audio needs to load previous period(s) and catch up to the overall loading period"),e.isTransmuxerRequired()){var t=_.ModuleManager.get(A.ModuleName.ContainerTS);e.setTransmuxer(new t.WebWorkerTransmuxer(this.RC,this.YD()))}this.eC=!0,this.vD(this.dC.getCurrentPlayingPeriodId())}},e.prototype.getPlaybackRepresentation=function(e){for(var t in this.YC)if(this.YC[t]&&t.includes(e))return this.RC.serviceManager.get(r.ServiceName.TimedMetadataService).getPlaybackRepresentation(t)},e.prototype.getTimeShift=function(){return this.getTimeShiftHandler().getTimeShift()},e.prototype.getTimeShiftLiveEdge=function(){return this.bC.isLive()?this.getTimeShiftHandler().getTimeShiftLiveEdge():0},e.prototype.getPlaybackTimeForTimeShiftOffset=function(e){return this.getTimeShiftHandler().calculatePlaybackTimeForTimeShiftOffset(e)},e.prototype.getTimeShiftHandler=function(){return this.mC||(this.mC=new j.TimeShiftHandler(this.RC,this,this.XC,this.YC)),this.mC},e.prototype.timeShift=function(e,t,i){return void 0===i&&(i=!1),this.getTimeShiftHandler().timeShift(e,t,i)},e.prototype.getAvailableAudio=function(e){return this.bC.getAvailableAudio(e)},e.prototype.hasStreamEnded=function(){return!!this.XC&&this.XC.hasStreamEnded()},e.prototype.getCurrentTime=function(){return this.QC.getCurrentTime()},e.prototype.getSeekableRange=function(){if(this.bC.isLive()){if(this.cC.seekingOrTimeshifting&&this.nC)return this.nC;var e=this.getTimeShiftLiveEdge(),t=e+this.getMaxTimeShift();return this.nC={start:t,end:e}}var i=this.getAllSegmentControllers().find(function(e){return b.MimeTypeHelper.isAV(e.getMimeType())});return i?i.getMPDHandler().getSeekableRange():{start:-1,end:-1}},e.prototype.getAvailableSegments=function(){var e=this,t={};return Object.keys(this.YC).forEach(function(i){t[i]=e.YC[i].getSegmentInfos()}),t},e.prototype.isInitialized=function(){return this.UC},e.prototype.hasStarted=function(){var e,t;return null!=(t=null==(e=this.kC)?void 0:e.started)&&t},e}()},84696:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.resolveMediaTypes=function(e){return(0,r.getCodecsFromAdaptationSet)(e).split(",").map(function(e){return(0,n.getMediaTypeFromCodec)(e)})};var n=i(34047),r=i(13422)},52570:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.MseModuleDefinition=void 0;var n=i(68925),r=i(86897),o=i(62756),a=i(34795),s=i(47151),u=i(67580),c=i(13422),l=i(79505),d=i(94358),h=i(99257),p=i(88618),f=i(48514),g=i(14443),m=i(25248),y=i(63066),v=i(54015),S=i(97587),b=i(36193),E=i(44115),T=i(88935),_=i(72498),A=i(39523),P=i(99529),M=i(64922),I={removeStreamTimeRange:A.removeStreamTimeRange,removeLoadedRange:n.removeLoadedRange,addLoadedRange:n.addLoadedRange,resetLoadedRanges:n.resetLoadedRanges,resetStreamTimeline:A.resetStreamTimeline,removeActiveTrackAction:b.removeActiveTrackAction,setRepresentationIdAction:b.setRepresentationIdAction,setMediaTypeAction:b.setMediaTypeAction},R={getPlayingPeriodId:T.getPlayingPeriodId,getContainerFormat:E.getContainerFormat,getLoadedRangesForMimeType:r.getLoadedRangesForMimeType,getSegmentInfos:_.getSegmentInfos},C={containerFormat:a.ContainerFormat,streamTimeRangeType:P.StreamTimeRangeType};t.MseModuleDefinition={name:o.ModuleName.EngineBitmovin,module:{MediaPlayer:d.MediaPlayer,SegmentController:g.SegmentController,technologyChecker:new M.TechnologyChecker,Stream:S.Stream,FetchController:p.FetchController,SegmentInfoService:m.SegmentInfoService,SegmentPrefetchingService:v.SegmentPrefetchingService,SegmentCacheService:f.SegmentCacheService,AdRestorationOptimizationService:h.AdRestorationOptimizationService,ManifestCachingService:u.ManifestCachingService,SegmentListMPDHandler:y.SegmentListMPDHandler,actions:I,selectors:R,mseModuleTypes:C,AdaptationSetId:s.AdaptationSetId,RepresentationId:l.RepresentationId,getTrackIdentifier:P.getTrackIdentifier,getCodecsFromAdaptationSet:c.getCodecsFromAdaptationSet,getMimeTypeForAdaptationSet:c.getMimeTypeForAdaptationSet}},t.default=t.MseModuleDefinition},58784:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.PeriodSwitchTracker=void 0;var n=i(80813),r=i(3714),o=i(93204),a=i(89927),s=i(42208),u=i(88935);t.PeriodSwitchTracker=function(){function e(e){var t=this;this.UZ=function(e,i){var n=t.getCurrentPlayingPeriodId(),o=e.switchingToPeriodId;n!==o&&(t.DY.debug("Starting switch from Period ".concat(n," to Period ").concat(o)),t.CY.eventHandler.dispatchEvent(r.PlayerEvent.PeriodSwitch,{sourcePeriod:{periodId:n},targetPeriod:{periodId:o}}))},this.VZ=function(e,i){var n=i.switchingToPeriodId,o=t.getCurrentPlayingPeriodId();if(n!==o){t.setCurrentPlayingPeriodId(n);var a=t.getCurrentPlayingPeriod();a&&a.AdaptationSet.forEach(function(e){return t.CY.renderer.storeDrmInitDataFromManifest(e)}),t.DY.debug("Successfully switched from Period ".concat(o," to Period ").concat(n)),t.CY.eventHandler.dispatchEvent(r.PlayerEvent.PeriodSwitched,{sourcePeriod:{periodId:o},targetPeriod:{periodId:n}})}},this.CY=e,this.DY=e.logger,this.SZ()}return e.prototype.RZ=function(){return this.CY.serviceManager.get(n.ServiceName.ManifestService,this.CY.sourceContext.sourceIdentifier)},e.prototype.getCurrentPlayingPeriod=function(){return this.RZ().findPeriod(this.getCurrentPlayingPeriodId())},e.prototype.SZ=function(){var e=this.WZ();!this.QZ&&e&&(this.QZ=(0,o.subscribe)(e)(u.getPlayingTracksState,this.UZ,u.isSwitchingPeriods)),!this.FY&&e&&(this.FY=(0,o.subscribe)(e)(u.getPlayingTracksState,this.VZ,u.wasSwitchingToPeriodIdReset))},e.prototype.TZ=function(){this.FY&&(this.FY(),this.FY=void 0),this.QZ&&(this.QZ(),this.QZ=void 0)},e.prototype.WZ=function(){return this.CY.serviceManager.get(n.ServiceName.SourceStoreService,this.CY.sourceContext.sourceIdentifier)},e.prototype.getCurrentLoadingPeriodId=function(){return this.EY},e.prototype.setCurrentLoadingPeriodId=function(e){this.EY=e},e.prototype.getCurrentPlayingPeriodId=function(){return(0,u.getPlayingPeriodId)(this.WZ().getState())},e.prototype.setCurrentPlayingPeriodId=function(e){this.WZ().dispatch((0,s.setPlayingPeriodId)(e))},e.prototype.resetPeriodIds=function(){this.setCurrentPlayingPeriodId(void 0),this.setCurrentLoadingPeriodId(void 0)},e.prototype.shouldHandleDroppedOutPeriod=function(){return null!=this.getCurrentPlayingPeriodId()||null!=this.EY}
1,e.prototype.XZ=function(e){return!this.RZ().getAllPeriods().map(function(e){return e._id}).includes(e)},e.prototype.isLoadingPeriodDroppedOut=function(){return this.XZ(this.EY)},e.prototype.isLoadingLastPeriod=function(){return this.RZ().isLastPeriod(this.EY)},e.prototype.setInitialPeriod=function(){var e=this.RZ().isLive()?this.YZ():this.ZZ();this.EY=e,this.setCurrentPlayingPeriodId(this.EY),this.DY.debug("setting initial period to ".concat(this.EY))},e.prototype.YZ=function(){var e=(0,a.toSeconds)(Date.now())-this.RZ().getDesiredDistanceToLiveEdge();return this.RZ().getPeriodIdForTime(e)},e.prototype.ZZ=function(){var e=this.CY.serviceManager.get(n.ServiceName.StartOffsetService).getStartOffset(this.CY.sourceContext.source);return this.RZ().getPeriodIdForTime(e)},e.prototype.dispose=function(){this.TZ()},e}()},11536:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.PlayerConfigEnhancer=void 0;var n=i(21281),r=i(70850),o=i(50962);t.PlayerConfigEnhancer=function(){function e(e){this.aZ={},r.Util.deepCopy(this.aZ,e.config),this.bZ={},r.Util.deepCopy(this.bZ,e.settings)}return e.prototype.adjustToCurrentSource=function(e,t){var i,r,a,s,u=e.config;if(u.adaptation&&(u.adaptation.logic=null==(i=this.aZ.adaptation)?void 0:i.logic),e.settings.CHUNKED_CMAF_STREAMING=this.bZ.CHUNKED_CMAF_STREAMING,t.isDashManifest()&&t.isLive()&&(0,o.isLowLatencyConfigured)(e)){e.logger.debug("Detected DASH Live stream and LL config, enabling 'low-latency-v1' adaptation logic and CHUNKED_CMAF_STREAMING tweak"),u.adaptation=null!=(r=u.adaptation)?r:{},u.adaptation.logic=null!=(a=u.adaptation.logic)?a:n.AdaptationLogicType.LOW_LATENCY;var c=e.internalPlayer.getConfig().tweaks||{};e.settings.CHUNKED_CMAF_STREAMING=null==(s=c.CHUNKED_CMAF_STREAMING)||s}},e}()},3095:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.createSegmentParser=function(e,t){if(t===o.ContainerFormat.MP4&&n.ModuleManager.has(r.ModuleName.ContainerMP4)){var i=n.ModuleManager.get(r.ModuleName.ContainerMP4);return new i.MP4Parser(e,new i.MP4EncryptionParser(e))}if(t===o.ContainerFormat.WEBM&&n.ModuleManager.has(r.ModuleName.ContainerWebM))return new(0,n.ModuleManager.get(r.ModuleName.ContainerWebM).WebMParser)};var n=i(88052),r=i(62756),o=i(34795)},47531:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.StreamTimeService=void 0;var n=i(80813),r=i(74853),o=i(99529);function a(e){return[o.StreamTimeRangeType.Loading,o.StreamTimeRangeType.Failed].includes(e.type)}t.StreamTimeService=function(){function e(e,t){this.serviceManager=e,this.sourceIdentifier=t}return Object.defineProperty(e.prototype,"NG",{get:function(){return this.serviceManager.get(n.ServiceName.SourceStoreService,this.sourceIdentifier).getState()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"OG",{get:function(){var e;return null==(e=this.NG)?void 0:e.streamTimeline},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"PG",{get:function(){var e;return null==(e=this.NG)?void 0:e.buffer.bufferStateMap},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"QG",{get:function(){return this.serviceManager.get(n.ServiceName.PlayerStateService)},enumerable:!1,configurable:!0}),e.prototype.getTimeForNextSegment=function(e){var t,i,n,o,s=(0,r.findFromEnd)(this.OG[e]||[],a),u=null==(t=this.PG)?void 0:t[e],c=[s,(null==(i=null==u?void 0:u.loadedRanges)?void 0:i[u.loadedRanges.length-1])||(null==(n=null==u?void 0:u.rendererRanges)?void 0:n[u.rendererRanges.length-1])].filter(function(e){return e}).map(function(e){return e.end}),l=Math.max.apply(Math,c);return isFinite(l)?l:(null==(o=this.QG)?void 0:o.seekingOrTimeshifting)?this.QG.targetPlaybackTime:0},e.prototype.dispose=function(){},e}()},64922:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.TechnologyChecker=void 0;var n=i(88052),r=i(62756);t.TechnologyChecker=function(){function e(){}return e.prototype.getSupportedTechnologies=function(){return n.ModuleManager.has(r.ModuleName.RendererMse)?n.ModuleManager.get(r.ModuleName.RendererMse).technologyChecker.getSupportedTechnologies():[]},e}()}
1,52602:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.TimeShiftHandler=void 0;var n=i(80813),r=i(3714),o=i(87827),a=i(15971),s=i(79721),u=i(89927),c=i(23068),l=i(70850),d=i(88052),h=i(62756),p=i(42208),f=i(39523),g=i(99529),m=i(68981),y=i(50962),v=i(60729);t.TimeShiftHandler=function(){function e(e,t,i,r){var o=this;this.nZ=!1,this.AZ=function(){o.BZ(!0)},this.CZ=function(e){var t=o.cZ.renderer.getCurrentTime(!0),i=t-e;i=l.Util.roundValue(i,1),o.zZ(i,t)},this.cZ=e,this.dZ=t,this.eZ=i,this.fZ=Object.keys(r).map(function(e){return r[e]}),this.gZ=e.serviceManager.get(n.ServiceName.ManifestService,e.sourceContext.sourceIdentifier),this.hZ=e.logger,this.kZ=0,this.oZ=e.sourceContext.sourceIdentifier,this.DZ()}return e.prototype.pZ=function(){var e=(0,y.isLowLatencyConfigured)(this.cZ),t=(0,v.isPlayingLowLatencyHls)(this.cZ);return e||t},e.prototype.qZ=function(){var e;if(this.lZ&&!this.lZ.isOngoing){var t=(0,u.toSeconds)(Date.now()-this.lZ.timestamp);e=this.lZ.liveEdge+t}else e=this.rZ();return isFinite(e)||(e=(0,u.toSeconds)(Date.now()-this.gZ.getAvailabilityStartTime())),e},e.prototype.rZ=function(){var e=this.tZ();if(!this.pZ())return e;var t=this.fZ.reduce(function(e,t){return Math.min(e,t.getMPDHandler().getSegmentDuration())},1/0),i=this.sZ();return i-e<t?i:e},e.prototype.sZ=function(){var e=this.cZ.serviceManager.maybeCall(n.ServiceName.SynchronizedTimeService,function(e){return e.getTimeDifference()},0,this.cZ.sourceContext.sourceIdentifier);return(0,u.toSeconds)(Date.now()+e)},e.prototype.tZ=function(){return this.fZ.map(function(e){return e.getLiveEdgeTime()}).reduce(function(e,t){return t<e&&t>=0?t:e},1/0)},e.prototype.updateSegmentControllers=function(e){this.fZ=Object.values(e)},e.prototype.getMaxTimeShift=function(){return this.gZ.getManifest()?Math.min(this.gZ.getTimeShiftBufferDepthSeconds()+this.gZ.getDesiredDistanceToLiveEdge(),0):0},e.prototype.getTimeShiftLiveEdge=function(){return this.qZ()-this.gZ.getDesiredDistanceToLiveEdge()},e.prototype.getTimeShift=function(){var e=this.uZ();if(this.mZ&&Math.abs((0,u.toSeconds)(Date.now()-this.mZ.completionDate)-(this.dZ.getCurrentTime()-this.mZ.reachedTime))<this.cZ.settings.ACCEPTABLE_TIMESHIFT_INACCURACY)return this.mZ.offset;var t=this.getMaxTimeShift();return e<t&&(e=t),e>0&&(e=0),e},e.prototype.uZ=function(e){return void 0===e&&(e=!1),!this.lZ||this.lZ.isOngoing?0:(e?this.dZ.getBufferRelevantTime():this.dZ.getCurrentTime())-this.getTimeShiftLiveEdge()},e.prototype.vZ=function(){return this.qZ()-this.dZ.getBufferRelevantTime()},e.prototype.timeShift=function(e,t,i){var n,r=this;void 0===i&&(i=!1);var o=!!this.lZ;o||this.yZ(),e=Math.max(this.getMaxTimeShift(),e);var u=this.dZ.getCurrentTime(),l=this.calculatePlaybackTimeForTimeShiftOffset(e),d=null!=(n=this.gZ.getPeriodIdForTime(l))?n:s.DEFAULT_PERIOD_ID;this.kZ++;var h=this.kZ,f=i||this.eZ.shouldBuffersBeClearedOnTimeshift(l);return this.hZ.debug("Performing timeShift to offset ".concat(e,", time: ").concat(u," -> ").concat(l,", period: ").concat(d)),this.eZ.setTimeshiftCancelState(!1),(0,c.isDefined)(d)&&this.dZ.updatePeriodForTimeshift(d,!o,f),f&&this.fZ.forEach(function(e){return e.seekTo(l)}),o&&this.wZ(l),this.BZ(!0),this.eZ.setCurrentTime(l,!0,i).then(function(i){var n;r.BZ(!1),r.mZ={offset:e,completionDate:Date.now(),reachedTime:i},r.kZ===h&&t?(r.hZ.debug("Successfully timeShifted to ".concat(i,", hit target time with a diff of ").concat(i-l)),null==(n=(0,a.getSourceStore)(r.cZ))||n.dispatch((0,p.periodSwitchFinished)(d)),t()):t&&r.cZ.logger.debug("Timeshift to ".concat(e," has finished but a newer operation has been started"))}).catch(function(e){r.hZ.debug("Failed to set currentTime on timeShift",e)}).finally(function(){return r.eZ.setTimeshiftCancelState(!1)})},e.prototype.wZ=function(e){var t;if(this.gZ.isHlsManifest()){var i=this.cZ.serviceManager.get(n.ServiceName.SourceStoreService,this.oZ);(function(e,t){var i,n,r=null!=(n=null==(i=null==e?void 0:e.timestampRolloverPositions)?void 0:i.next)?n:-1;return -1!==r&&(t>=r||t<=e.timestampRolloverPositions.previous)})(null==(t=d.ModuleManager.get(h.ModuleName.HLS))?void 0:t.selectors.getHlsState(null==i?void 0:i.getState()),e)&&(this.cZ.logger.debug("Resetting transmuxer because target is beyond a timestamp rollover"),this.dZ.resetTransmuxer())}},e.prototype.cancel=function(){this.cZ.logger.debug("Cancelling ongoing time shift operation..."),this.eZ.setTimeshiftCancelState(!0)},e.prototype.calculatePlaybackTimeForTimeShiftOffset=function(e){var t=this.gZ.getDesiredDistanceToLiveEdge(),i=this.qZ(),n=i+(e-t);return this.gZ.hasMultiplePeriods()?(0,m.adjustTargetTimeToPeriodStart)(n,this.cZ.settings.END_OF_BUFFER_TOLERANCE,this.gZ,this.cZ.logger):0===e&&this.pZ()?Math.min(i,n+this.cZ.settings.LOW_LATENCY_SEEK_AHEAD):n},e.prototype.onManifestUpdate=function(){this.yZ(),this.gZ.isLive()&&
vendor: 11,442 bytes, line 1
1(this.uZ(!0)<this.getMaxTimeShift()-this.getMinSegmentDuration()?this.cZ.settings.DISABLE_AUTO_RECOVERY_ON_DVR_WINDOW_EXCEEDED?this.nZ||(this.cZ.eventHandler.dispatchEvent(r.PlayerEvent.DVRWindowExceeded),this.nZ=!0):this.cZ.eventHandler.dispatchEvent(r.PlayerEvent.DVRWindowExceeded):this.nZ=!1,this.xZ())},e.prototype.xZ=function(){var e=this;this.cZ.serviceManager.maybeCall(n.ServiceName.SourceStoreService,function(t){var i,n=e.gZ.getTimeShiftBufferDepthSeconds(),r=e.qZ()+n,o=null==(i=t.getState())?void 0:i.streamTimeline;void 0!==o&&Object.keys(o).forEach(function(e){t.dispatch((0,f.removeStreamTimeRange)(e,{start:0,end:r},g.StreamTimeRangeType.Failed))})})},e.prototype.isTimeInBufferedRange=function(e){return this.eZ.isInBufferedRange(e)},e.prototype.getMinSegmentDuration=function(){return this.fZ.reduce(function(e,t){return Math.min(e,t.getMPDHandler().getSegmentDuration())},1/0)},e.prototype.yZ=function(){var e=this.gZ.isLive(),t=e?this.vZ():1/0,i=e?Math.abs(this.gZ.getTimeShiftBufferDepthSeconds()):this.gZ.getDuration();this.cZ.bufferSettings.setTargetBufferLevelConstraints({minimumBufferLength:this.getMinSegmentDuration(),currentDistanceToLiveEdge:t,streamDuration:i})},e.prototype.zZ=function(e,t){this.mZ={completionDate:Date.now(),reachedTime:t,offset:e},this.BZ(!1)},e.prototype.BZ=function(e){this.lZ&&(e||!this.lZ.isOngoing)||(this.lZ={timestamp:Date.now(),liveEdge:this.qZ(),isOngoing:e})},e.prototype.DZ=function(){var e=this;this.iZ=(0,o.subscribeToSeek)(this.cZ.store,this.AZ),this.jZ=(0,o.subscribeToSeeked)(this.cZ.store,function(t,i){return e.CZ(i.seekingProcess.seekableRange.end)})},e.prototype.EZ=function(){var e,t;null==(e=this.iZ)||e.call(this),null==(t=this.jZ)||t.call(this)},e.prototype.dispose=function(){this.EZ(),this.eZ.setTimeshiftCancelState(!0)},e}()},90685:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.BufferBlock=t.EncryptionState=void 0,t.isPrecedingSegment=s;var n,r=i(85434),o=i(48954);function a(e,t,i){e.hasOwnProperty(t)&&i(e[t])}function s(e,t,i){var n=e.isInit(),r=e.getMimeType()!==t;return!n&&!r&&e.getPlaybackTime()+e.getDuration()<i}!function(e){e.Encrypted="encrypted",e.Clear="clear"}(n||(t.EncryptionState=n={})),t.BufferBlock=function(){function e(e){this.Eab={},this.Fab={},this.id=e,this.Cab=[],this.Dab=new Map}return e.prototype.addSegment=function(e){var t=e.getMimeType();e.isInit()&&this.Lab(t),this.Gab(e),this.Hab(e);var i=e.isInit()?0:e.getDuration();this.Cab.push({segment:e}),e.isInit()||(this.setMaxSegmentDuration(t,Math.max(i,this.getMaxSegmentDuration(t))),this.Kab(e,t)),e.setBufferBlockId(this.id),this.Jab(e)},e.prototype.Gab=function(e){var t=e.getSegmentInfo(),i=t.discontinuitySequenceNumber,n=t.mimeType;n&&(this.Eab[n]||(this.Eab[n]=[]),null==i||this.Eab[n].includes(i)||this.Eab[n].push(i))},e.prototype.Hab=function(e){var t=e.getSegmentInfo(),i=t.periodId,n=t.mimeType;n&&(this.Fab[n]||(this.Fab[n]=[]),null==i||this.Fab[n].includes(i)||this.Fab[n].push(i))},e.prototype.setSegregationCriteria=function(e,t){this.Dab.has(t)||this.Iab(t),this.Mab(t).segregationCriteria=e},e.prototype.Iab=function(e){var t={};return this.Dab.set(e,t),t},e.prototype.updateMediaTypeForMimeType=function(e){var t=this.Mab(e.mimeType)||this.Iab(e.mimeType);t.mediaType?(a(e,"codec",function(e){t.mediaType.codec=e}),a(e,"timescale",function(e){t.mediaType.timescale=e})):t.mediaType=e},e.prototype.getSegregationCriteria=function(e){var t;return null==(t=this.Mab(e))?void 0:t.segregationCriteria},e.prototype.Jab=function(e){var t,i,n=e.getMimeType(),r=this.getMediaType(n);r?(null!=(t=r.codec)||(r.codec=e.getCodec()),null!=(i=r.timescale)||(r.timescale=e.getTimescale())):(this.Dab.has(n)||this.Dab.set(n,{}),this.Mab(n).mediaType={mimeType:n,codec:e.getCodec(),timescale:e.getTimescale()})},e.prototype.getMediaType=function(e){var t,i;return null!=(i=null==(t=this.Mab(e))?void 0:t.mediaType)?i:null},e.prototype.addMediaType=function(e){r.MimeTypeHelper.isAV(e.mimeType)&&!this.getMediaType(e.mimeType)&&(this.Dab.has(e.mimeType)||this.Iab(e.mimeType),this.Mab(e.mimeType).mediaType=e)},e.prototype.removeMediaType=function(e){this.Dab.delete(e)},e.prototype.hasMediaType=function(e){var t,i;return null!=(i=null==(t=this.Dab)?void 0:t.has(e))&&i},e.prototype.getMediaTypes=function(){return(0,o.getValues)(this.Dab).map(function(e){return e.mediaType})},e.prototype.getMediaTypesWithoutSubs=function(){return this.getMediaTypes().filter(function(e){return r.MimeTypeHelper.isAV(e.mimeType)})},e.prototype.removeSegment=function(e){var t=this.Cab.findIndex(function(t){return t.segment===e});t>-1&&this.Cab.splice(t,1)},e.prototype.clearSegments=function(e){this.Cab=this.Cab.filter(function(t){return t.segment.getMimeType()!==e});var t=this.Mab(e);t&&(t.playbackTimeRange=void 0),this.Eab[e]=[],this.Fab[e]=[]},e.prototype.getPrecedingSegments=function(e,t){var i=[];return this.Cab.forEach(function(n){s(n.segment,e,t)&&i.push(n.segment)}),i},e.prototype.Kab=function(e,t){var i=this.getPlaybackTimeRange(t),n=e.getPlaybackTime(),r=n+e.getDuration();i?(n<i.start&&(i.start=n),r>i.end&&(i.end=r)):this.Mab(t).playbackTimeRange={start:n,end:r}},e.prototype.getPlaybackTimeRange=function(e){var t,i;return null!=(i=null==(t=this.Mab(e))?void 0:t.playbackTimeRange)?i:null},e.prototype.getId=function(){return this.id},e.prototype.getAllKnownPeriodIds=function(){var e;return(e=[]).concat.apply(e,Object.values(this.Fab))},e.prototype.getMinCommonStartTime=function(){return(0,o.getValues)(this.Dab).filter(function(e){return e.playbackTimeRange}).map(function(e){return e.playbackTimeRange}).reduce(function(e,t){return Math.max(t.start,e)},-1/0)},e.prototype.getCommonPlaybackTimeRanges=function(){return(0,o.getValues)(this.Dab).filter(function(e){return e.playbackTimeRange}).map(function(e){return e.playbackTimeRange}).reduce(function(e,t){return{start:Math.max(t.start,e.start),end:Math.min(t.end,e.end)}},{start:-1/0,end:1/0})},e.prototype.setMaxSegmentDuration=function(e,t){this.Dab.has(e)||this.Iab(e),this.Mab(e).maxSegmentDuration=t},e.prototype.getMaxSegmentDuration=function(e){var t;return(null==(t=this.Mab(e))?void 0:t.maxSegmentDuration)||0},e.prototype.hasMaxSegmentDuration=function(e){var t;return null!=(null==(t=this.Mab(e))?void 0:t.maxSegmentDuration)},e.prototype.hasMaxSegmentDurations=function(){return!!(0,o.getValues)(this.Dab).map(function(e){return e.maxSegmentDuration}).find(function(e){return e>=0})},e.prototype.getMinMaxSegmentDuration=function(){var e=Number.MAX_VALUE;return(0,o.getValues)(this.Dab).map(function(e){return e.maxSegmentDuration}).forEach(function(t){return e=t<e?t:e}),e},e.prototype.getAllSegmentsForMimeType=function(e){return this.getAllSegments().filter(function(t){return t.getMimeType()===e})},e.prototype.getAllSegments=function(){return this.Cab.map(function(e){return e.segment})},e.prototype.hasDataSegments=function(e){return this.Cab.some(function(t){return!t.segment.isInit()&&t.segment.getMimeType()===e})},e.prototype.hasSegments=function(){return this.getAllSegments().length>0},e.prototype.hasTrackedDiscontinuity=function(e){var t=this;return Object.keys(this.Eab).some(function(i){return t.Eab[i].includes(e)})},e.prototype.hasTrackedPeriodId=function(e){var t=this;return Object.keys(this.Fab).some(function(i){return t.Fab[i].includes(e)})},e.prototype.getNextSegment=function(){var e=this.Cab.filter(function(e){return!e.pendingRemoval});if(0===e.length)return null;var t=e.find(function(t){return e.filter(function(e){return t.segment.getMimeType()===e.segment.getMimeType()}).some(function(e){return!e.segment.isInit()})});return t?(t.pendingRemoval=!0,t.segment):null},e.prototype.Lab=function(e){var t=this.getAllSegmentsForMimeType(e);if(t.length>0){var i=t[t.length-1];i.isInit()&&this.removeSegment(i)}},e.prototype.Mab=function(e){return this.Dab.get(e)},Object.defineProperty(e.prototype,"mediaTypes",{get:function(){var e={};return this.Dab.forEach(function(t,i){e[i]=t.mediaType}),e},enumerable:!1,configurable:!0}),e.prototype.getMinDistanceFromBufferBlock=function(e){var t=this.getCommonPlaybackTimeRanges();return Math.min(Math.min(Math.abs(e.getPlaybackTime()-t.start),Math.abs(e.getPlaybackTime()-t.end)),Math.min(Math.abs(e.getPlaybackEndTime()-t.start),Math.abs(e.getPlaybackEndTime()-t.end)))},e}()},674:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.areBufferBlocksEqual=function(e,t){return!(!e||!t)&&e===t}},35046:function(e,t,i){var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.BufferController=void 0;var r=i(4524),o=i(66790),a=i(40306),s=i(3336),u=i(25926),c=i(4224),l=i(80813),d=i(56481),h=i(3714),p=i(44468),f=i(33468),g=i(91678),m=i(46151),y=i(33436),v=i(87827),S=i(85648),b=i(68925),E=i(86897),T=i(21513),_=i(93204),A=i(79721),P=i(34841),M=i(87244),I=i(85434),R=i(15487),C=i(89927),O=i(23068),D=i(70850),w=i(19274),N=i(88052),L=i(62756),k=i(95880),U=i(62198),x=i(42208),B=i(59604),F=i(13114),H=i(39523),j=i(14808),V=i(99529),W=i(90685),G=i(60632),q=i(94305),K=i(51888),z=i(39494),Y=i(77264);function X(e,t){return{periodId:t,contentInformation:e.getMediaTypes().map(function(t){return{codec:t.codec,mimeType:t.mimeType,isDrmProtected:e.getSegregationCriteria(t.mimeType).encryption===W.EncryptionState.Encrypted}})}}t.BufferController=function(){function e(e,t,i,n){var r=this;this.a0=[],this.k0=!1,this.l0=!0,this.m0=!1,this.n0=!1,this.u0={},this.w0={},this.z0=!1,this.B0=0,this.G0=function(){r.i0=r.OZ.getTotalDuration(),r.i0>(r.NZ.getDuration()||0)&&r.J0()},this.J0=function(){r.m0||r.NZ.setDuration(r.i0)},this.K0=function(e){r.IZ.logger.debug("Renderer setup failed with",e)},this.m1=function(){Date.now()-r.q0>r.p0&&r.l1()&&r.U0();var e=!(0,T.getCapabilities)().isTizen;r.checkIfEndOfBufferReached(r.KZ.END_OF_BUFFER_TOLERANCE,e)},this.n1=function(){if(r.PZ){var e=r.PZ.getBufferBlock(r.g0),t=e?r.PZ.getSmallestMaxSegmentDuration(e):r.KZ.END_OF_BUFFER_RECOVERY_TOLERANCE;r.checkIfEndOfBufferReached(t,!0)}},this.o1=function(){r.t1(r.NZ.getCurrentTime(!0))},this.p1=function(){r.checkIfEndOfBufferReached(r.KZ.END_OF_BUFFER_RECOVERY_TOLERANCE,!0)},this.IZ=e,this.JZ=e.logger,this.KZ=e.settings,this.LZ=e.bufferSettings,this.MZ=e.eventHandler,this.NZ=e.renderer,this.OZ=e.serviceManager.get(l.ServiceName.ManifestService,e.sourceContext.sourceIdentifier),this.PZ=new z.SegmentStore(this.IZ,this.KZ),this.h0=t,this.v0=new q.BufferStallingService(this.Z1(),this.JZ,this.IZ.renderer),this.i0=i,this.g0=z.INITIAL_BUFFER_BLOCK_ID,this.t0=new Map,this.o0=!1,this.q0=0,this.p0=(0,C.toMilliSeconds)(this.IZ.settings.MINIMAL_BACKWARD_BUFFER_CLEARING_INTERVAL),this.s0=new Map,this.y0=new K.DeferredReject,this.b0=Promise.resolve(null),this.C0=new G.BufferRangesCache(this.IZ,this.PZ),this.F0(),this.NZ.ready().then(function(){r.J0(),r.I0()&&r.O0(n)}).catch(this.K0),this.E0=(0,_.subscribe)(this.IZ.store)(function(e){return e&&(0,v.getPlayerState)(e).seekState},function(){r.l1()&&r.U0()},function(e,t){return e===S.SeekState.Seeked&&t!==S.SeekState.Seeked})}return e.prototype.F0=function(){var e=this,t=this.IZ.store;void 0!==t&&(this.D0=(0,_.subscribe)(t)(function(e){return e&&(0,v.getIsStopped)((0,v.getPlayerState)(e))},function(){return e.n0=!0},function(e){return!0===e}))}
1,Object.defineProperty(e.prototype,"H0",{get:function(){return this.v0.isRendererStalling()},enumerable:!1,configurable:!0}),e.prototype.I0=function(){var e,t;return!!(null==(t=(0,F.getDrmState)(null==(e=this.P0())?void 0:e.getState()))?void 0:t.immediateLicenseRequest)},e.prototype.L0=function(e,t){var i=this,n=Promise.resolve();return this.r0=new P.Deferred,this.l0||(n=this.NZ.shutdown(!0)),this.u0={},this.r0.resolve(n.then(function(){return i.NZ.ready()}).then(function(){i.J0(),i.g1(),e.forEach(function(e){var t=e.mimeType;i.addMimeTypeAndCodec(t,e.codec)||(i.JZ.debug("Could not create source buffer for ".concat(t)),i.IZ.store.dispatch((0,g.removeMetricsForMimeType)(t))),i.M0(t)}),i.a0=e.filter(function(e){return I.MimeTypeHelper.isAV(e.mimeType)});var n,r=null!=(n=t.getAllKnownPeriodIds()[0])?n:A.DEFAULT_PERIOD_ID;return i.O0(r),Promise.resolve(i.a0.length)})),this.r0.promise.catch(function(e){return i.JZ.warn(e)}).then(function(){i.r0=null}),this.r0.promise},e.prototype.M0=function(e){var t=this,i=this.P0();i&&(this.w0[e]=i.subscribe(function(){return t.V0(e)},(0,E.hasBufferMaxSizeChanged)(e)))},e.prototype.N0=function(e){var t=this.w0[e];t&&(t(),delete this.w0[e])},e.prototype.O0=function(e){var t,i=this,r=(0,F.getDrmState)(null==(t=this.P0())?void 0:t.getState());if(void 0!==r&&Object.keys(r).length>0){var a=n(n({},this.IZ.sourceContext.source),{drm:r}),s=this.OZ.getDRMCapabilitiesForPeriod(e);Object.keys(f.KeySystemMap).some(function(e){return a.drm.hasOwnProperty(e)})&&(this.b0=this.NZ.setDrmConfig(r,s),this.b0.catch(function(e){(null==e?void 0:e.message)!==o.DrmSetupError.CANCELLED&&i.JZ.debug("Could not initialize renderer with given DRM config: ".concat(null==e?void 0:e.message),e)}))}},e.prototype.P0=function(){var e;return null==(e=this.IZ.serviceManager)?void 0:e.get(l.ServiceName.SourceStoreService,this.IZ.sourceContext.sourceIdentifier)},e.prototype.Q0=function(){var e=this;return this.A0?this.A0.catch(function(){return e.z0=!0,Promise.reject("Failed to clear buffer on timeshift, stopping segment cache processing")}).then(function(){return e.z0?(e.z0=!1,Promise.reject("Timeshift cancelled, stopping segment cache processing")):Promise.resolve()}):Promise.resolve()},e.prototype.addSegment=function(e){var t,i=this;if(!this.PZ)return Promise.reject("Skipping segment processing, segment store is already disposed");this.JZ.insane("adding segment to cache for period ".concat(e.getPeriodId()," with playback time ").concat(e.getPlaybackTime()," and mime type ").concat(e.getMimeType())),this.PZ.addSegment(e);var n=this.d1(),r=this.PZ.getBufferBlock(n);if(this.PZ.getNextBufferBlock(n)&&this.Z0(r)&&(null==(t=this.P0())||t.dispatch((0,b.setLoadingRangeFinished)(!0))),this.f1(),function(e,t){var i=(0,V.getTrackIdentifier)(e.getSegmentInfo()),n=e.getPlaybackTimeRange();
vendor: 6,600 bytes, line 1
1n&&(null==t||t.dispatch((0,H.removeStreamTimeRange)(i,n,V.StreamTimeRangeType.Loading))),null==t||t.dispatch((0,b.addLoadedRange)(i,(0,B.segmentToBufferBlockTimeRange)(e)))}(e,this.P0()),!this.areBufferBlockMediaTypesFinalForPeriod(e.getPeriodId()))return Promise.resolve();var o=Promise.resolve();if(this.c0){var a=this.c0.time,s=this.y1(a);if(!this.PZ.canSwitchToBufferBlock(s))return Promise.resolve();o=this.Q0().then(function(){return i.z1(a,s)})}else if((0,M.isSwitchingBufferBlocks)(this.P0())||this.isBufferAvailable()||this.r0)this.r0&&(o=this.r0.promise);else{var u=this.PZ.getBufferBlockForSegment(e),c=null==u?void 0:u.getMediaTypesWithoutSubs();if(!c||!u)return this.JZ.debug("Chosen buffer block for segment unexpectedly had no mediaTypes"),Promise.resolve();o=this.L0(c,u)}return o.then(function(){return i.NZ?i.NZ.ready():Promise.reject("Stopping queue processing, renderer is not available")}).then(function(){return i.X0()})},e.prototype.R0=function(e,t){var i=this;this.PZ&&this.PZ.getPrecedingSegments(e,t).forEach(function(e){var t;i.PZ.removeSegment(e),null==(t=i.P0())||t.dispatch((0,b.removeLoadedRange)(e.getMimeType(),(0,B.segmentToBufferBlockTimeRange)(e)))})},e.prototype.S0=function(e,t){var i=this;return this.R0(e,t),this.q0=Date.now(),this.NZ.removeData(e,0,t).catch(function(t){return i.JZ.debug("Error clearing ".concat(e," backward buffer:"),t)})},e.prototype.T0=function(){if(this.PZ){var e=this.PZ.getBufferBlock(this.g0),t=e?this.PZ.getSmallestMaxSegmentDuration(e):-1;this.p0=(0,C.toMilliSeconds)(Math.max(t/2,this.IZ.settings.MINIMAL_BACKWARD_BUFFER_CLEARING_INTERVAL))}},e.prototype.U0=function(){var e,t,i=this;this.T0();var n=null==(e=this.PZ)?void 0:e.getBufferBlock(this.g0),r=this.NZ.getCurrentTime(),o=(0,E.getBufferStateMap)(null==(t=this.P0())?void 0:t.getState());o&&Object.keys(o).forEach(function(e){var t,a=null==(t=(0,E.getRendererBufferedRanges)(o,e)[0])?void 0:t.start,s=I.MimeTypeHelper.getMediaType(e);if(void 0!==a&&(null==n?void 0:n.hasMaxSegmentDuration(e))){var u=r-Math.max(n.getMaxSegmentDuration(e)+1,i.LZ.getBackwardTargetLevel(s));a<u&&(i.JZ.debug("Clearing backward buffer for ".concat(e," from ").concat(a," to ").concat(u)),i.S0(e,u).catch(function(e){i.IZ.logger.debug("Could not clear backward buffer",e)}))}})},e.prototype.setEndOfStream=function(e){var t;return e&&this.f0||!this.NZ?(this.JZ.debug("Skipping setting EOS"),Promise.resolve()):(e&&(null==(t=this.P0())||t.dispatch((0,b.setLoadingRangeFinished)(!0))),this.o0=e,this.NZ.setEndOfStream(e))},e.prototype.V0=function(e){var t,i=(0,E.getBufferState)(null==(t=this.P0())?void 0:t.getState()),n=void 0!==i?(0,E.getBufferMaxSize)(i,e):E.DefaultBufferMaxSize;if(this.JZ.debug("Exceeded quota for ".concat(e," with ").concat(n," seconds of data in the buffers")),!this.IZ.settings.NO_QUOTA_EXCEEDED_ADJUSTMENT){var r=this.NZ.getCurrentTime(),o=this.PZ.getSmallestSafeBufferSize(r,e);this.LZ.adjustMaxBufferLevels(o,e,n)}},e.prototype.W0=function(){var e,t=this.PZ.getBufferBlock(this.g0),i=function(e){return e.reduce(function(e,t){var i=e.getPlaybackTime();return t.getPlaybackTime()<i?t:e},e[0])}(this.PZ.getAllSegmentsFromBufferBlock(t).toArray()),n=null!=(e=null==i?void 0:i.getPlaybackTime())?e:0;n<0&&(this.MZ.dispatchEvent(h.PlayerEvent.Warning,new u.PlayerWarning(c.WarningCode.PLAYBACK_NEGATIVE_DECODING_TIMESTAMP_ENCOUNTERED)),this.JZ.debug("Encountered negative DTS ".concat(n,", attempting to correct PTO...")),this.B0=n)},e.prototype.X0=function(){var e=this;return this.l0?this.N1()?(this.W0(),this.k1(1/0).then(function(){return e.P1()})):Promise.resolve():this.k1(1/0)},e.prototype.getBufferedRangesMap=function(e){void 0===e&&(e=!0);var t,i=(0,E.getBufferState)(null==(t=this.P0())?void 0:t.getState());return void 0!==i&&this.PZ?e?this.C0.getRanges(i):(0,E.getRendererBufferRangesMap)(this.PZ,i)(this.g0):{}},e.prototype.Y0=function(e,t){var i=this;if(!this.PZ)return Promise.resolve();var n=this.PZ.getAllSegmentsFromBufferBlock(e),o=n.hasNext()&&n.next();return o?(this.PZ.removeSegment(o),this.T1(o).catch(function(e){i.JZ.warn("Could not add segment to renderer (mimeType: ".concat(o.getMimeType(),", playbackTime: ").concat(o.getPlaybackTime(),")"),e)}).then(function(){o.isInit()||null==(n=i.P0())||n.dispatch((0,b.removeLoadedRange)(o.getMimeType(),(0,B.segmentToBufferBlockTimeRange)(o))),i.t0.set(o.getMimeType(),!o.isInit());var n,a=r.BufferRangeHelper.getTotalCommonBufferLength(i.getBufferedRangesMap());return!(0,M.isSwitchingBufferBlocks)(i.P0())||a<t?i.Y0(e,t):Promise.resolve()})):Promise.resolve()},e.prototype.Z0=function(e){var t,i,n=this;if(!e)return!1;var r=this.hasStopped(),o=null==(t=this.PZ)?void 0:t.hasStartedLoadingNextBufferBlock(this.g0),a=null==(i=this.PZ)?void 0:i.hasSegmentsForBufferBlock(e);return!this.a0.some(function(e){return n.NZ.isDataBeingAppended(e.mimeType)})&&(o||r)&&!a},e.prototype.isSegmentStoreWaitingForSegments=function(){var e,t;return null!=(t=null==(e=this.PZ)?void 0:e.isWaitingForSegments())&&t},e.prototype.k1=function(e){var t=this,i=this.PZ.getBufferBlock(this.g0);return this.f0=!0,this.Y0(i,e).then(function(){var e,n;t.f0=!1,t.H0&&!t.isBufferClearingOngoing()&&t.W1()&&t.b1(),t.Z0(i)?(t.JZ.debug("Finished loading BB ".concat(t.g0,": signaling EOS")),null==(e=t.P0())||e.dispatch((0,b.setLoadingRangeFinished)(!0)),t.e0?t.JZ.debug("Skipped EOS signaling as a BufferBlock switch is just being executed"):t.d0&&(0,M.isSwitchingBufferBlocks)(t.P0())?(t.JZ.debug("delaying EOS signal until ongoing period switch is completed"),t.d0.then(function(){t.setEndOfStream(!0)})):t.setEndOfStream(!0)):null==(n=t.P0())||n.dispatch((0,b.setLoadingRangeFinished)(!1))})},e.prototype.l1=function(){var e,t,i=this.IZ.serviceManager.get(l.ServiceName.PlayerStateService);if(!i)return!1;var n=null!=(e=i.seekingOrTimeshifting)&&e,r=null==(t=this.P0())?void 0:t.getState(),o=r&&(0,E.getIsTimestampRollingOver)(r);return!(this.o0||(0,M.isSwitchingBufferBlocks)(this.P0())||n||o)},e.prototype.checkIfEndOfBufferReached=function(e,t){if(this.NZ.hasDataInSourceBuffers()){var i=this.NZ.getCurrentTime(!0);this.q1(i,e)&&(this.r1()?t?this.t1(i):this.JZ.debug("End of buffer reached, but cannot switch buffer block yet."):!this.m0&&this.O1()>0&&(this.Y1(),this.s1()))}else this.NZ.isPaused()||this.Y1()},e.prototype.q1=function(e,t){var i=this.NZ.getEndOfBufferTime();return void 0!==i&&(e>=i-t||this.OZ.isLive()&&0===e)},e.prototype.r1=function(){var e,t=null==(e=this.PZ)?void 0:e.getBufferBlock(this.g0);return!!t&&!!this.PZ&&this.PZ.hasStartedLoadingNextBufferBlock(t.getId())},e.prototype.s1=function(){var e,t=!0;
1this.t0.forEach(function(i,n){I.MimeTypeHelper.isVideo(n)&&(t=i,e=n)}),t||(this.JZ.debug("Resetting currentTime on video element on stalling"),this.IZ.videoElement.currentTime=this.IZ.videoElement.currentTime,this.t0.set(e,!0))},e.prototype.t1=function(e){var t,i,n=this.P0();if((0,M.isSwitchingBufferBlocks)(n))return!1;var r=null==n?void 0:n.getState();if(!r||(0,E.getIsTimestampRollingOver)(r))return!1;var o=this.r1(),a=null==(t=this.PZ)?void 0:t.getNextBufferBlock(this.g0);if(o&&a&&(null==(i=this.PZ)?void 0:i.areBufferBlockMediaTypesFinal(a))){var s=a.getMinCommonStartTime(),u=isFinite(s)&&s>=e?s:e;return this.z1(u,a),!0}return!1},e.prototype.readyToSeek=function(){return this.d0?(this.JZ.debug("Awaiting ongoing buffer block switch before seek"),this.d0.then(function(){}).catch(function(){})):Promise.resolve()},e.prototype.shouldBuffersBeClearedOnTimeshift=function(e){var t=this.NZ.getCurrentTime();return!this.isInBufferedRange(e)||e<t},e.prototype.u1=function(e,t){return void 0===t&&(t=!1),t||this.shouldBuffersBeClearedOnTimeshift(e)?this.v1():Promise.resolve()},e.prototype.setTimeshiftCancelState=function(e){this.z0=e},e.prototype.v1=function(){var e=this;return this.IZ.logger.debug("Clearing buffer on timeshift"),this.clearBuffers().then(function(){return e.z0?(e.z0=!1,Promise.reject("cancelled timeshift")):Promise.resolve()})},e.prototype.setCurrentTime=function(e,t,i){var n=this;void 0===t&&(t=!1),void 0===i&&(i=!1);var r=this.PZ.getBufferBlockForPlaybackTime(e),o=this.PZ.getBufferBlock(this.g0),a=!!(!r||r.getId()!==o.getId());return this.j0=e,this.l0||this.isInBufferedRange(e)||this.Y1(),t&&this.isBufferAvailable()&&!this.isBufferClearingOngoing()&&this.u1(e,i).catch(function(e){return n.JZ.debug("Error clearing buffers:",e)}),a?r?this.z1(e,r):this.B1(e):(this.c0=void 0,this.NZ.setCurrentTime(e).then(function(e){return n.w1(e)}))},e.prototype.w1=function(e){return this.j0=void 0,this.W1()?this.H0&&(this.JZ.debug("End stalling after seek to ".concat(e)),this.b1()):this.JZ.debug("Delay ending stall as the restart threshold is not yet reached"),Promise.resolve(e)},e.prototype.x1=function(e,t){var i,n,r,o,a,s=null!=(n=null==(i=this.c0)?void 0:i.time)?n:t,u=(0,O.isNumber)(null==(r=this.c0)?void 0:r.time)&&(null==(o=this.PZ)?void 0:o.canSwitchToBufferBlockForTime(s));if(this.JZ.debug("Buffer block switch failed:",e),this.y0=new K.DeferredReject,u){this.JZ.debug("Trying to continue delayed BufferBlock switch to ".concat(s,"..."));var c=this.y1(s);return this.z1(s,c)}return null==(a=this.P0())||a.dispatch((0,b.setBufferBlockSwitchOngoing)(!1)),Promise.resolve(t)},e.prototype.y1=function(e){var t,i=this.OZ.getPeriodIdForTime(e);return null==(t=this.PZ)?void 0:t.getTargetBufferBlock(e,i)},e.prototype.z1=function(e,t){var i,n,r=this,o=function(){};if(this.y0&&this.y0.reject("BufferBlock switch interrupted by newest one"),this.y0=new K.DeferredReject,null==(i=this.P0())||i.dispatch((0,b.setBufferBlockSwitchOngoing)(!0)),this.c0&&(o=this.c0.deferred.resolve),!(null==(n=this.PZ)?void 0:n.canSwitchToBufferBlock(t)))return this.B1(e);this.e0=!0;var a=this.A0||Promise.resolve();return this.d0=a.then(function(){return r.setEndOfStream(!1)}).then(function(){return r.c0=void 0}).then(function(){return r.y0.next(function(){return r.clearRendererBuffers()})}).then(function(){return r.y0.next(function(){return r.A1(t,e)})}).then(function(e){return r.e0=!1,r.y0=new K.DeferredReject,o(e),e}).catch(function(t){return r.x1(t,e)}).finally(function(){r.d0=void 0}),this.d0},e.prototype.A1=function(e,t){var i,n;return this.hasStreamEnded()?(null==(i=this.y0)||i.reject("BufferBlock switch interrupted by source unloading"),Promise.reject("Source was unloaded")):(0,R.isTizen2017)()||(null==(n=this.PZ)?void 0:n.shouldSwitchBufferBlock(e,this.g0))?this.G1(t,e):this.C1(t,e)},e.prototype.B1=function(e){(0,M.isSwitchingBufferBlocks)(this.P0())&&this.y0&&this.y0.reject("BufferBlock switch interrupted by newest one");var t=this.PZ.getAvailablePositionForTime(e,this.NZ.getCurrentTime());return this.c0&&this.c0.time===e||(this.c0&&this.c0.time!==e&&this.c0.deferred.reject(),this.c0={time:t,deferred:new P.Deferred}),this.c0.deferred.promise},e.prototype.C1=function(e,t){var i,n=this,r=t.getId();return(null==(i=this.PZ)?void 0:i.getBufferBlock(r))?(this.o0=!1,this.g0=r,this.PZ.deleteOldBufferBlocks(r),this.e0=!1,this.s0.clear(),this.y0.next(function(){return n.k1(1/0)}).then(function(){return n.y0.next(function(){return n.I1(e)})}).then(function(e){var t;return null==(t=n.P0())||t.dispatch((0,b.setBufferBlockSwitchOngoing)(!1)),n.D1(),n.w1(e)})):(this.JZ.debug("Target BufferBlock is no longer available, cancelling BufferBlock switch..."),Promise.reject("The targeted buffer BufferBlock is no longer available"))},e.prototype.D1=function(){var e=this,t=this.Z1();t&&(this.H0||t.isPaused()||this.NZ.play().catch(function(t){e.JZ.debug("play call failed with reason: ".concat(t))}))},e.prototype.E1=function(e,t){var i,n=null==(i=this.PZ)?void 0:i.getBufferBlock(this.g0);if(!n)return!0;var r=n.getAllKnownPeriodIds().some(function(t){return e.hasTrackedPeriodId(t)}),o=this.a0.length===t.length,a=!(r||o)||!(0,Y.canReuseSourceBuffer)(n,e,t);return this.F1(a,n,e)},e.prototype.F1=function(e,t,i){var n,r,o,a,s=null==(n=this.IZ)?void 0:n.sourceContext.source,u=null==(r=null==s?void 0:s.options)?void 0:r.shouldRecreateSourceBuffersOnPeriodSwitch;if(!u)return e;var c=t.getAllKnownPeriodIds(),l=X(t,null!=(o=c[c.length-1])?o:A.DEFAULT_PERIOD_ID),d=null!=(a=i.getAllKnownPeriodIds()[0])?a:A.DEFAULT_PERIOD_ID,h=X(i,d),p=(0,D.safeUserCallback)(function(){return u(l,h,e)},this.IZ.logger);return"boolean"==typeof p?(this.JZ.debug("User overwrote default SourceBuffer recreation strategy from ".concat(e," to ").concat(p)+" for the switch from ".concat(l.periodId," to ").concat(h.periodId,".")),p):e},e.prototype.G1=function(e,t){var i,n,r,o,a,s,u=this;this.JZ.debug("Switching buffer block for time ".concat(e));var c=t.getMediaTypesWithoutSubs(),d=this.H1(t,c);if(this.a0=c,null==(i=this.P0())||i.dispatch((0,b.setLoadingRangeFinished)(!1)),null==(r=null==(n=this.IZ.serviceManager)?void 0:n.get(l.ServiceName.TimedMetadataService))||r.resetContentBoundaryTracking(),!1===(null==(o=this.Z1())?void 0:o.seekingOrTimeshifting)){var h=null!=(a=t.getAllKnownPeriodIds()[0])?a:A.DEFAULT_PERIOD_ID;
vendor: 8,238 bytes, line 1
1null==(s=this.P0())||s.dispatch((0,x.periodSwitchStarted)(h))}return this.y0.next(function(){return d}).then(function(){return u.y0.next(function(){return u.C1(e,t)})}).then(function(e){return u.y0.next(function(){return u.k1(1/0).catch(function(){return u.IZ.logger.debug("Could not push segment into renderer")})}).then(function(){return e})})},e.prototype.H1=function(e,t){return this.E1(e,t)?(this.JZ.debug("recreating the buffers with types",t),this.L0(t,e)):Promise.resolve(0)},e.prototype.I1=function(e){var t=this,i=this.c0;return this.c0=void 0,this.y0.next(function(){return t.NZ.setCurrentTime(e)}).then(function(e){return i&&i.deferred&&i.deferred.resolve(e),e})},e.prototype.addMimeTypeAndCodec=function(e,t,i){if(void 0===i&&(i=!1),!I.MimeTypeHelper.isAV(e))return!0;var n=this.NZ.addBuffer(e,t);return n&&((0,m.getMetricsState)(this.IZ.store.getState())[e]||this.IZ.store.dispatch((0,g.initializeMetricsForMimeType)(e,this.IZ.settings)),i||this.IZ.store.dispatch((0,g.addMetricsValue)(e,y.MetricType.StalledSeconds,0))),n},e.prototype.J1=function(){var e,t,i,n,r,o=this.d1(),a=null==(e=this.PZ)?void 0:e.getAllBufferBlocks(),s=null==(t=this.PZ)?void 0:t.getFutureBufferBlocks(o),u=null==(i=this.PZ)?void 0:i.getBufferBlock(o);if(null==a?void 0:a.length){if(!(null==s?void 0:s.length))return u;for(var c=a.findIndex(function(e){return e.getId()===o}),l=c;l<a.length;l++){var d=a[l];(null==(n=this.PZ)?void 0:n.hasStartedLoadingNextBufferBlock(d.getId()))&&(u=null==(r=this.PZ)?void 0:r.getNextBufferBlock(d.getId()))}return u}},e.prototype.K1=function(){return this.a0.map(function(e){return e.mimeType})},e.prototype.L1=function(){var e,t;return null!=(t=null==(e=this.J1())?void 0:e.getMediaTypes().map(function(e){return e.mimeType}))?t:[]},e.prototype.M1=function(e,t,i){var n=this;if(!this.isBufferAvailable())return 0;var r=e.map(function(e){return n.getOverallBufferLevel(e,t,p.BufferType.ForwardDuration,i)});return r.length>0?Math.min.apply(Math,r):0},e.prototype.N1=function(){var e=this.LZ.getForwardTargetLevel(),t=this.O1()-this.KZ.DURATION_MISMATCH_TOLERANCE,i=Math.min(this.KZ.STARTUP_THRESHOLD,e-this.KZ.STARTUP_THRESHOLD_DELTA,isFinite(t)?t:1/0),n=this.L1();return this.M1(n)>=i},e.prototype.O1=function(){return this.OZ.isLive()?1/0:this.NZ.getDuration()-this.c1()},e.prototype.P1=function(){if(this.l0){var e=Date.now(),t=(0,m.getMetricsState)(this.IZ.store.getState()),i=(0,m.getMetricsLastEntry)(t,"default",y.MetricType.StartTime).value,n=(0,C.toSeconds)(e-i);this.IZ.store.dispatch((0,g.addMetricsValue)("default",y.MetricType.StartupTimeSeconds,n)),isNaN(n)||this.JZ.debug("start up time: ".concat(n)),this.l0=!1,this.b1()}},e.prototype.Q1=function(e){var t=this.NZ.getCurrentTime(!0);e.isInit()&&I.MimeTypeHelper.isVideo(e.getMimeType())&&this.H0&&this.isInBufferedRange(t)&&(this.JZ.debug("Resetting currentTime on video element on unstalling"),this.IZ.videoElement.currentTime=this.IZ.videoElement.currentTime)},e.prototype.R1=function(e){var t=this;e.getDrmInitData().filter(function(e){var t;return(null==(t=e.kid)?void 0:t.length)>0}).forEach(function(i){return t.OZ.setRepresentationDrmKid(e.getRepresentationId(),i.kid[0])})},e.prototype.S1=function(e){var t=e.getPresentationTimeOffset()+this.B0;isNaN(t)||e.setPresentationTimeOffset(t)},e.prototype.T1=function(e){var t=this;this.B0<0&&this.S1(e);var i=I.MimeTypeHelper.extractContentType(e.getMimeType());if(this.u0[i]!==e.getInitSegment()){var n=e.getInitSegment();return this.u0[i]=n,Promise.all([n,e].map(function(e){return t.U1(e)})).then()}return this.U1(e)},e.prototype.U1=function(e){var t=this;return e.hasDrmInitData()&&this.R1(e),this.b0.catch(function(i){if(e.isEncrypted())throw(null==i?void 0:i.message)!==o.DrmSetupError.CANCELLED&&t.IZ.eventHandler.fireError(function(e,t){var i;return N.ModuleManager.has(L.ModuleName.DRM)?(null==e?void 0:e.message)===o.DrmSetupError.MISSING_CONFIGURATION?new s.PlayerError(a.ErrorCode.DRM_MISSING_CONFIGURATION,{reason:e.message},void 0,t):new s.PlayerError(a.ErrorCode.DRM_NO_KEY_SYSTEM,{reason:null!=(i=null==e?void 0:e.message)?i:e},void 0,t):new k.PlayerModuleMissingError(L.ModuleName.DRM)}(i,t.IZ.sourceContext.sourceIdentifier)),"DRMConfig failure";t.JZ.debug("Problem ensuring segment, error:",i)}).then(function(){return t.Q1(e),t.V1(e),t.NZ.appendData(e).catch(function(e){t.JZ.debug("could not append data to renderer",e)})})},e.prototype.V1=function(e){var t,i;if(!e.isInit()){var n=e.getSegmentInfo().discontinuitySequenceNumber,r=e.getPeriodId(),o=void 0!==n?String(n):r,a=e.getMimeType();if(o!==this.s0.get(a)){var s=e.getPresentationTimeOffset();(0,O.isNumber)(s)&&isFinite(s)&&this.NZ.setTimestampOffset(a,-s),this.s0.set(a,o),null==(i=null==(t=this.IZ.serviceManager)?void 0:t.get(l.ServiceName.TimedMetadataService))||i.trackContentBoundary(e)}}},e.prototype.W1=function(){var e=this;if(!this.LZ)return!1;var t=this.KZ.RESTART_THRESHOLD;(0,R.isWebOS)()&&(t=Math.max(t,1.5));var i=Math.min(t,this.LZ.getForwardTargetLevel()-this.KZ.RESTART_THRESHOLD_DELTA,this.O1()),n=this.K1();return n.every(function(t){return e.NZ.getBufferedRanges(t).length>0})&&this.M1(n)>=i},e.prototype.X1=function(){return!this.l0&&!(0,M.isSwitchingBufferBlocks)(this.P0())},e.prototype.Y1=function(){this.X1()&&this.v0.startStalling()},e.prototype.Z1=function(){return this.IZ.serviceManager.get(l.ServiceName.PlayerStateService)},e.prototype.a1=function(e){var t=this.Z1();if(!t)return!1;var i=this.KZ,n=Math.max(i.END_OF_BUFFER_TOLERANCE,i.END_OF_BUFFER_RECOVERY_TOLERANCE,i.RESTART_THRESHOLD),r=this.K1(),o=this.M1(r,e,!1),a=o>=n,s=o>=this.O1()||this.m0;return!a&&!s&&!t.seekingOrTimeshifting},e.prototype.b1=function(){if(this.H0)if((0,M.isSwitchingBufferBlocks)(this.P0()))this.JZ.debug("Ending stall was aborted due to buffer block switching");else{var e=this.c1();this.a1(e)?this.e1(e)?(this.JZ.debug("Ending stall at the gap"),this.h0()):this.JZ.debug("Cannot unstall yet as playback is stalling at a gap and there is no future common buffer"):this.v0.endStalling()}},e.prototype.c1=function(){return void 0!==this.j0?this.j0:this.NZ.getCurrentTime()},e.prototype.d1=function(){return this.PZ.getCurrentBufferBlockId()},e.prototype.hasPendingSegments=function(e){return e=e||this.d1(),this.PZ.getFutureBufferBlocks(e).some(function(e){return e.hasSegments()})},e.prototype.getOverallBufferLevel=function(e,t,i,n){void 0===t&&(t=this.NZ.getCurrentTime()),void 0===i&&(i=p.BufferType.ForwardDuration),void 0===n&&(n=!0),this.l0&&(t=this.c1());var o=this.getBufferedRangesMap()[e];return o&&0!==o.length?(o=n?r.BufferRangeHelper.mergeRanges(o.concat(r.BufferRangeHelper.findGapsInRanges(o)),this.KZ.GAP_TOLERANCE):o.filter(function(e){return e.start<=t&&t<=e.end}),r.BufferRangeHelper.getBufferLevel(o,t,i)):0},e.prototype.e1=function(e){return void 0===e&&(e=this.NZ.getCurrentTime()),r.BufferRangeHelper.getCommonBufferedRanges(this.getBufferedRangesMap()).some(function(t){return t.getStart()>e})},e.prototype.hasFutureBufferBlockData=function(){var e;return!!(null==(e=this.PZ)?void 0:e.getNextBufferBlock(this.g0))||(0,M.isSwitchingBufferBlocks)(this.P0())},e.prototype.isInBufferedRange=function(e){return r.BufferRangeHelper.isInBufferedRange(this.getBufferedRangesMap(),e)},e.prototype.isStarted=function(){return this.k0},e.prototype.isInStartupPhase=function(){return this.l0},e.prototype.hasStreamEnded=function(){return this.n0},e.prototype.f1=function(){var e;if(!this.x0){var t=this.P0();void 0!==t&&void 0!==(null==(e=t.getState())?void 0:e.manifest)&&(this.x0=(0,_.subscribe)(t)(U.getManifest,this.G0,function(e){return(null==e?void 0:e.isInitialized)||!1}))}},e.prototype.stop=function(e){void 0===e&&(e=!1),this.m0=!0,this.k0=!1,this.l0=!1,e?(this.NZ.end(),this.n0=!0,this.JZ.debug("stopped playback"),this.NZ.off(w.MediaElementEvent.stalled,this.p1),this.NZ.off(w.MediaElementEvent.waiting,this.p1),this.NZ.off(w.MediaElementEvent.ended,this.o1),this.NZ.off(w.MediaElementEvent.timeupdate,this.m1),this.NZ.off(w.MediaElementEvent.currenttimenotadvancing,this.n1),this.x0&&(this.x0(),this.x0=void 0),void 0!==this.D0&&(this.D0(),this.D0=void 0),this.g1(),this.t0.clear()):this.b1()},e.prototype.hasStopped=function(){return this.m0},e.prototype.g1=function(){var e=this;
1Object.keys(this.w0).forEach(function(t){return e.N0(t)})},e.prototype.restart=function(){this.m0=!1,this.k0||(this.k0=!0,this.NZ.on(w.MediaElementEvent.stalled,this.p1),this.NZ.on(w.MediaElementEvent.waiting,this.p1),this.NZ.on(w.MediaElementEvent.ended,this.o1),this.NZ.on(w.MediaElementEvent.timeupdate,this.m1),this.NZ.on(w.MediaElementEvent.currenttimenotadvancing,this.n1)),this.n0=!1},e.prototype.dispose=function(){var e,t;this.stop(!0),this.NZ=null,this.MZ=null,this.KZ=null,this.LZ=null,this.MZ=null,this.PZ=void 0,this.u0=null,null==(e=this.E0)||e.call(this),null==(t=this.P0())||t.dispatch((0,b.resetLoadedRanges)()),this.C0.dispose(),this.a0=[],this.g1(),this.b0=null,this.v0=(0,d.dispose)(this.v0)},e.prototype.changeBufferType=function(e,t,i){var n,r,o=this.a0.find(function(t){return I.MimeTypeHelper.getMediaType(t.mimeType)===I.MimeTypeHelper.getMediaType(e)});return o&&(this.a0.splice(this.a0.indexOf(o),1),this.a0.push({mimeType:e,codec:t}),this.N0(o.mimeType),null==(r=this.P0())||r.dispatch((0,b.resetLoadedRanges)(o.mimeType))),this.M0(e),this.u0={},o?this.NZ.changeBufferType(e,t,i):Promise.resolve(((n={})[e]=t,n))},e.prototype.addRequiredMediaType=function(e,t){this.PZ.addRequiredMediaType(e,t)},e.prototype.updateRequiredMediaType=function(e,t){var i;null==(i=this.PZ)||i.changeMediaType(e,t)},e.prototype.areBufferBlockMediaTypesFinalForPeriod=function(e){var t,i;return null!=(i=null==(t=this.PZ)?void 0:t.areBufferBlockMediaTypesFinalForPeriod(e))&&i},e.prototype.clearCacheForMimeType=function(e){var t;null==(t=this.P0())||t.dispatch((0,b.resetLoadedRanges)(e)),this.PZ.clearSegments(e)},e.prototype.h1=function(){var e,t=this;Object.keys((0,j.getStreamTimeline)(null==(e=this.P0())?void 0:e.getState())).filter(function(e){return I.MimeTypeHelper.isAV(e)}).forEach(function(e){return t.clearCacheForMimeType(e)})},e.prototype.isBufferClearingOngoing=function(){return void 0!==this.A0},e.prototype.clearBuffers=function(){var e=this;return this.A0?this.JZ.debug("Skipping buffer clearing as it is already ongoing"):(this.Y1(),this.h1(),this.A0=this.setEndOfStream(!1).then(function(){return e.clearRendererBuffers()}),this.A0.finally(function(){return e.A0=void 0})),this.A0},e.prototype.clearRendererBuffers=function(){var e=this;return this.isBufferAvailable()?Promise.all(this.a0.map(function(t){return e.clearBuffer(t.mimeType)})).then(function(){}):Promise.resolve()},e.prototype.clearBuffer=function(e){var t=this;return this.NZ.removeData(e).catch(function(i){return t.JZ.debug("Error clearing ".concat(e," buffer:"),i)})},e.prototype.removeBufferRange=function(e,t,i){var n=this;return this.NZ.removeData(e,t,i).catch(function(t){return n.JZ.debug("Error removing ".concat(e," buffer range:"),t)})},e.prototype.isBufferAvailable=function(){return this.a0.length>0},e}()},60632:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.BufferRangesCache=void 0;var n=i(80813),r=i(86897),o=i(93204),a=i(10333);t.BufferRangesCache=function(){function e(e,t){var i=this;this.context=e,this.segmentStore=t,this.Qab=this.Sab(),this.Oab=(0,o.subscribe)(e.store)(a.sourceIdentifiersSelector,function(){return i.Rab()},function(e,t){return!!e.includes(i.context.sourceContext.sourceIdentifier)&&(0,a.hasASourceStoreIdentifierChanged)(e,t)}),this.Uab(),this.Vab((0,r.getBufferState)(this.Qab.getState()))}return e.prototype.Rab=function(){this.Qab=this.Sab(),this.Qab?(this.Uab(),this.Vab((0,r.getBufferState)(this.Qab.getState()))):this.Tab()},e.prototype.Sab=function(){return this.context.serviceManager.get(n.ServiceName.SourceStoreService,this.context.sourceContext.sourceIdentifier)},e.prototype.Tab=function(){this.Nab&&this.Nab(),this.Nab=void 0,this.Oab=void 0},e.prototype.Uab=function(){var e=this;this.Tab(),this.Nab=(0,o.subscribe)(this.Qab)(function(e){return(0,r.getBufferState)(e)},function(t){return e.Vab(t)},r.hasBufferRangesChanged)},e.prototype.Vab=function(e){this.Pab={overallBufferRanges:(0,r.getBufferRangesMap)(this.segmentStore,e,this.context.settings.GAP_TOLERANCE)}},e.prototype.getRanges=function(e){return void 0!==this.Nab&&void 0!==this.Pab&&0!==Object.keys(this.Pab.overallBufferRanges).length||this.Vab(e),this.Pab.overallBufferRanges},e.prototype.dispose=function(){this.Tab(),this.Oab&&(this.Oab(),this.Oab=void 0),this.Pab=void 0},e}()}
vendor: 12,726 bytes, line 1
1,94305:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.BufferStallingService=void 0;var n=i(85648),r=i(60877);t.BufferStallingService=function(){function e(e,t,i){this.playerStateService=e,this.logger=t,this.renderer=i}return e.prototype.startStalling=function(){this.isRendererStalling()||(this.logger.debug("Stalling playback at ".concat(this.renderer.getCurrentTime(!0))),this.logger.insane("Video element stall started in state: ".concat(this.playerStateService.playbackState)),this.playerStateService.setIsRendererStalling(!0),this.playerStateService.isPlaying()&&(this.logger.insane("Call pause on renderer"),this.renderer.pause()))},e.prototype.endStalling=function(){var e=this;if(this.isRendererStalling()){this.playerStateService.setIsRendererStalling(!1);var t=[n.PlaybackState.Play,n.PlaybackState.Playing].includes(this.playerStateService.playbackState);this.logger.debug("Unstalling and ".concat(t?"":"not ","restarting playback")),t&&(!this.playerStateService.seekingOrTimeshifting&&(0,r.shouldResetCurrentTimeAfterBufferUnderrun)()&&(this.logger.debug("Resetting current time before unstalling"),this.renderer.setCurrentTime(this.renderer.getCurrentTime())),this.renderer.play().catch(function(t){e.logger&&e.logger.debug("Play after unstalling failed with reason: ".concat(t))}))}},e.prototype.isRendererStalling=function(){return this.playerStateService.getIsRendererStalling()},e.prototype.dispose=function(){this.logger=null,this.playerStateService=null,this.renderer=null},e}()},51888:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.DeferredReject=void 0,t.DeferredReject=function(){function e(){this.gbb=!1}return e.prototype.reject=function(e){this.gbb=!0,this.hbb=e},e.prototype.next=function(e){return this.gbb?Promise.reject(this.hbb):e()},e}()},39494:function(e,t,i){var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.SegmentStore=t.INITIAL_BUFFER_BLOCK_ID=void 0;var r=i(68925),o=i(86897),a=i(15971),s=i(34047),u=i(79721),c=i(76399),l=i(85434),d=i(88052),h=i(62756),p=i(59604),f=i(99529),g=i(90685),m=i(674),y=i(77264);t.INITIAL_BUFFER_BLOCK_ID=0;var v=function(){function e(e,i){this.context=e,this.jbb=[],this.lbb={};var n=new g.BufferBlock(t.INITIAL_BUFFER_BLOCK_ID);this.lbb={},this.kbb=new y.Segregation(this.lbb,i),this.ibb=[n]}return e.prototype.mbb=function(e){return this.ibb.find(function(t){return t.hasTrackedPeriodId(e)})},e.prototype.hasSegmentsForBufferBlock=function(e){return this.getAllSegmentsFromBufferBlock(e).hasNext()},e.prototype.isWaitingForSegments=function(){return 0!==this.jbb.length},e.prototype.hasDataSegmentsForBufferBlock=function(e){return Object.keys(e.mediaTypes).filter(function(e){return l.MimeTypeHelper.isAV(e)}).every(function(t){return e.hasDataSegments(t)})},e.prototype.getTargetBufferBlock=function(e,t){return this.getBufferBlockForPlaybackTime(e)||this.wbb(e)||this.mbb(t)},e.prototype.canSwitchToBufferBlock=function(e){if(!e)return!1;var t=this.areBufferBlockMediaTypesFinal(e);return this.hasDataSegmentsForBufferBlock(e)&&t},e.prototype.canSwitchToBufferBlockForTime=function(e){var t=this.getBufferBlockForPlaybackTime(e);return this.canSwitchToBufferBlock(t)},e.prototype.areBufferBlockMediaTypesFinalForPeriod=function(e){var t,i=this;if(void 0===this.lbb[e])return!1;var n=this.mbb(e);if(!n||0===Object.keys(null!=(t=null==n?void 0:n.mediaTypes)?t:{}).length)return!1;var r=Object.keys(n.mediaTypes);return Object.keys(this.lbb[e]).filter(function(e){return l.MimeTypeHelper.isAV(e)}).every(function(t){var n;return r.includes(t)&&(null==(n=i.lbb[e][t])?void 0:n.codec)})},e.prototype.areBufferBlockMediaTypesFinal=function(e){var t,i=this;return!(!e||0===Object.keys(null!=(t=null==e?void 0:e.mediaTypes)?t:{}).length)&&e.getAllKnownPeriodIds().every(function(e){return i.areBufferBlockMediaTypesFinalForPeriod(e)})},e.prototype.addRequiredMediaType=function(e,t){this.lbb[e]||(this.lbb[e]={}),this.lbb[e][t]||(this.lbb[e][t]={mimeType:t});var i=this.mbb(e);i&&(i.mediaTypes[t]||i.addMediaType({mimeType:t}))},e.prototype.changeMediaType=function(e,t){var i=this,n=Object.keys(this.lbb),r=t;n.forEach(function(n){t||(r=Object.keys(i.lbb[n]).find(function(t){return l.MimeTypeHelper.getMediaType(t)===l.MimeTypeHelper.getMediaType(e)})),i.nbb(n,r),i.addRequiredMediaType(n,e),i.clearSegments(r)})},e.prototype.nbb=function(e,t){if(this.lbb[e]){delete this.lbb[e][t];var i=this.mbb(e);i&&i.removeMediaType(t)}},e.prototype.obb=function(e,t){var i;if(this.lbb[e]){var r=this.lbb[e][t.mimeType];this.lbb[e][t.mimeType]=n(n({},r),t)}else this.lbb[e]=((i={})[t.mimeType]=t,i)},e.prototype.pbb=function(e,t){var i=this;if(1===this.ibb.length&&this.kbb.canAddSegmentToBufferBlock(e,this.ibb[0],t))return this.ibb[0];var n=this.ibb.reduce(function(n,r){return i.kbb.canAddSegmentToBufferBlock(e,r,t)&&(!n||r.getMinDistanceFromBufferBlock(e)<n.getMinDistanceFromBufferBlock(e))?r:n},void 0);if(n){var r=n.getCommonPlaybackTimeRanges(),o=e.getPlaybackTime(),a=function(e){return e.map(function(e){return{range:e.getCommonPlaybackTimeRanges(),block:e}}).sort(function(e,t){return e.range.start-t.range.start})}(this.ibb.filter(function(e){return e!==n})),s=function(e,t){return t.reduce(function(t,i){return i.range.end<=e?Math.max(i.range.start,t):t},-1/0)}(r.start,a),u=function(e,t){return t.reduce(function(t,i){return i.range.start>=e?Math.min(i.range.start,t):t},1/0)}(r.end,a);if(s<=o&&o<=u&&!this.qbb(o,n,a))return n}},e.prototype.qbb=function(e,t,i){return i.filter(function(e){return isFinite(e.range.start)&&e.range.start>t.getCommonPlaybackTimeRanges().start&&isFinite(e.range.end)&&e.range.end>t.getCommonPlaybackTimeRanges().end}).some(function(t){var i=t.range.start<=e&&e<=t.range.end,n=e>t.range.end;return i||n})},e.prototype.rbb=function(e,t){var i=this,n=null!=e?e:u.DEFAULT_PERIOD_ID;return Object.keys(this.lbb[n]).filter(function(e){return l.MimeTypeHelper.isAV(e)}).every(function(e){return i.jbb.some(function(i){return i.getMimeType()===e&&i.getSegmentInfo().discontinuitySequenceNumber===t&&i.getPeriodId()===n})})},e.prototype.sbb=function(e){var t,i=null==(t=(0,a.getSourceState)(this.context))?void 0:t.hls;return!!i&&(0,d.ModuleManager.get(h.ModuleName.HLS).selectors.areDiscontinuitiesMisaligned)(i,Object.keys(this.lbb[u.DEFAULT_PERIOD_ID]).filter(function(e){return l.MimeTypeHelper.isAV(e)}),e.getDuration())},e.prototype.addSegment=function(e){var t=this;if(function(e,t){var i=e.getSegmentInfo(),n=i.codecs,r=i.discontinuitySequenceNumber,o=i.periodId;return null!=r?!t.some(function(e){return e.hasTrackedDiscontinuity(r)})&&!(0,s.isAVMuxedTogether)(n):void 0!==o&&!t.some(function(e){return e.hasTrackedPeriodId(o)})}(e,this.ibb)){var i=e.getSegmentInfo(),n=i.discontinuitySequenceNumber,r=i.periodId;if(this.jbb.push(e),this.context.logger.debug("[SegmentStore] Reached new content boundary ".concat(null!=n?n:r," with ").concat(e.getMimeType()," segment"),{url:e.getUrl()}),this.rbb(r,n)){var o=this.jbb.filter(function(e){return e.getSegmentInfo().discontinuitySequenceNumber===n&&e.getSegmentInfo().periodId===r});this.context.logger.debug("[SegmentStore] ".concat(null==n?"Period":"Discontinuity"," ").concat(null!=n?n:r," is ready: adding segments to store")),this.tbb(o),this.jbb=this.jbb.filter(function(e){return e.getSegmentInfo().discontinuitySequenceNumber!==n||e.getSegmentInfo().periodId!==r})}else this.sbb(e)&&(this.context.logger.debug("[SegmentStore] Detected misaligned discontinuities: flushing all delayed segments"),this.jbb.forEach(function(e){return t.tbb([e])}),this.jbb=[])}else this.tbb([e])},e.prototype.tbb=function(e){var t=this,i=e.reduce(function(e,i){var n=t.kbb.getSegregationCriteria(i),r=t.pbb(i,n);return null===e?r:r!==e?void 0:r},null);i||(i=this.vbb(),this.ibb.push(i)),e.forEach(function(e){var n=t.kbb.getSegregationCriteria(e);t.context.logger.debug("[SegmentStore] Added ".concat(e.getMimeType()," segment to BB with ID ").concat(i.getId()),{segment:e.getUrl(),segmentCriteria:n});var o=(0,a.getSourceStore)(t.context),s=(0,f.getTrackIdentifier)(e.getSegmentInfo());null==o||o.dispatch((0,r.removeLoadedRange)(s,(0,p.segmentToBufferBlockTimeRange)(e))),i.addSegment(e),null==o||o.dispatch((0,r.addLoadedRange)(s,(0,p.segmentToBufferBlockTimeRange)(e))),i.getSegregationCriteria(e.getMimeType())||i.setSegregationCriteria(n,e.getMimeType());var u=i.getMediaType(e.getMimeType());u&&t.obb(e.getPeriodId(),u)})},e.prototype.ubb=function(){var e=this.ibb[this.ibb.length-1];return e?e.getId()+1:t.INITIAL_BUFFER_BLOCK_ID},e.prototype.vbb=function(){var e=this.ubb();return this.context.logger.debug("[SegmentStore] creating new BB with ID ".concat(e)),new g.BufferBlock(e)},e.prototype.getMediaTypes=function(e){var t=this;return e&&this.lbb[e]?Object.keys(this.lbb[e]).map(function(i){return t.lbb[e][i]}):[]},e.prototype.getAllBufferBlocks=function(){return this.ibb},e.prototype.getCurrentBufferBlockId=function(){var e,i=this.ibb[0];return null!=(e=null==i?void 0:i.getId())?e:t.INITIAL_BUFFER_BLOCK_ID},e.prototype.deleteOldBufferBlocks=function(e){this.ibb=this.ibb.filter(function(t){return t.getId()>=e&&t.getAllSegments().length>0})},e.prototype.getActiveBufferBlock=function(){var e;return null!=(e=this.getBufferBlock(this.getCurrentBufferBlockId()))?e:null},e.prototype.getBufferBlock=function(e){return this.ibb.find(function(t){return t.getId()===e})},e.prototype.getBufferBlockForSegment=function(e){return this.getBufferBlock(e.getBufferBlockId())},e.prototype.getBufferBlockForPlaybackTime=function(e){var t=this,i=this.ibb.filter(function(i){var n=0===e?t.getSmallestMaxSegmentDuration(i)-.01:.01;return Object.keys(i.mediaTypes).filter(function(e){return l.MimeTypeHelper.isAV(e)}).every(function(t){var r,o;return(null==(r=i.getPlaybackTimeRange(t))?void 0:r.start)<=e+n&&(null==(o=i.getPlaybackTimeRange(t))?void 0:o.end)>=e})});return i[i.length-1]},e.prototype.wbb=function(e){return this.ibb.filter(function(t){return t.getMinCommonStartTime()>=e}).sort(function(e,t){return e.getMinCommonStartTime()-t.getMinCommonStartTime()})[0]},e.prototype.getNextSegment=function(){var e,t;return null!=(t=null==(e=this.getActiveBufferBlock())?void 0:e.getNextSegment())?t:null},e.prototype.removeSegment=function(e){var t=this.getBufferBlockForSegment(e);t&&t.removeSegment(e),this.jbb=this.jbb.filter(function(t){return t!==e})},e.prototype.getAllSegmentsFromBufferBlock=function(e,t){if(!e)return c.EmptyIterator.getInstance();var i=e.getAllSegments();return t?new c.FilterIterator(new c.ArrayIterator(i),function(e){return e.getMimeType()===t}):new c.ArrayIterator(i)},e.prototype.getNextBufferBlock=function(e){return this.ibb.find(function(t){return t.getId()>e})},e.prototype.getFutureBufferBlocks=function(e){return this.ibb.filter(function(t){return t.getId()>=e})},e.prototype.getPrecedingSegments=function(e,t){var i=this.jbb.filter(function(i){return(0,g.isPrecedingSegment)(i,e,t)});return this.ibb.flatMap(function(i){return i.getPrecedingSegments(e,t)}).concat(i)},e.prototype.clearSegments=function(e){this.context.logger.debug("[SegmentStore] clearing all segments for ".concat(e)),this.ibb.forEach(function(t){return t.clearSegments(e)}),this.jbb=this.jbb.filter(function(t){return t.getMimeType()!==e})},e.prototype.getSmallestMaxSegmentDuration=function(e){return e&&e.hasMaxSegmentDurations()?e.getMinMaxSegmentDuration():-1},e.prototype.getSmallestSafeBufferSize=function(e,t){var i=this.getBufferBlockForPlaybackTime(e);return(null==i?void 0:i.hasMaxSegmentDuration(t))?i.getMaxSegmentDuration(t)+1:1},e.prototype.getAvailablePositionForTime=function(e,t){var i=e;if(t&&e>t){var n=this.getBufferBlockForPlaybackTime(e);n||(n=this.wbb(e))&&(i=n.getMinCommonStartTime())}return i},e.prototype.getPlaybackTimesForBufferBlock=function(e,t){var i=this,n=this.getBufferBlock(e);return t.map(function(e){var t=new c.FilterIterator(i.getAllSegmentsFromBufferBlock(n,e),function(e){return!e.isInit()});return t.hasNext()?t.next().getPlaybackTime():-1/0})},e.prototype.hasStartedLoadingNextBufferBlock=function(e){var t=this.getNextBufferBlock(e);return!!t&&this.hasDataSegmentsForBufferBlock(t)},e.prototype.shouldSwitchBufferBlock=function(e,t){return!(0,m.areBufferBlocksEqual)(e,this.getBufferBlock(t))},e.prototype.getSegmentStoreRangesMap=function(e,t){var i={};return t.forEach(function(e){return i[e]=[]}),this.getFutureBufferBlocks(this.getCurrentBufferBlockId()).map(function(e){return e.getId()}).concat(1/0).map(function(t){return(0,o.getBufferBlockLoadedRanges)(e,t)}
1).forEach(function(e){return Object.keys(e).forEach(function(t){return i[t].push(e[t])})}),i},e}();t.SegmentStore=v},77264:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.Segregation=void 0,t.areSegregationCriteriaEqual=c,t.canReuseSourceBuffer=function(e,t,i){var o=(0,r.getCapabilities)().isTizen?m:(0,r.getCapabilities)().isLegacyEdge?v:(0,r.getCapabilities)()[n.CapabilityKey.isEdge]?g:(0,r.getCapabilities)()[n.CapabilityKey.isWebOS]?y:(0,r.getCapabilities)()[n.CapabilityKey.isPlayStation4]?p:(0,r.getCapabilities)()[n.CapabilityKey.isPlayStation5]?f:h;return i.every(function(i){var n=i.mimeType;return o.canReuseSourceBuffers(e,t,n)})};var n=i(7387),r=i(21513),o=i(34047),a=i(85434),s=i(15487),u=i(90685);function c(e,t,i){return void 0===i&&(i=[]),Object.keys(e).filter(function(e){return!i.includes(e)}).every(function(i){return t&&t[i]===e[i]})}function l(e,t){var i=e.getMediaTypes().find(function(e){return e.mimeType===t});return i?i.timescale:0}function d(e,t,i){return{currentCriteria:e.getSegregationCriteria(i),nextCriteria:t.getSegregationCriteria(i)}}t.Segregation=function(){function e(e,t){this.requiredMediaTypes=e,this.settings=t,this.requiredMediaTypes=e}return e.prototype.xbb=function(e){var t;return!!(null==(t=this.requiredMediaTypes[e.getPeriodId()])?void 0:t[e.getMimeType()])},e.prototype.ybb=function(e,t){var i=this;if(void 0!==t.getSegmentInfo().discontinuitySequenceNumber)return!0;if(!this.xbb(t))return!1;var n=t.getPeriodId(),r=Object.keys(this.requiredMediaTypes[n]||{}).filter(function(e){return a.MimeTypeHelper.isAV(e)});return e.length===r.length&&e.every(function(e){var t;return null==(t=i.requiredMediaTypes[n])?void 0:t[e.mimeType]})},e.prototype.getSegregationCriteria=function(e){var t,i={encryption:function(e){return e.isEncrypted()?u.EncryptionState.Encrypted:u.EncryptionState.Clear}(e),codec:o.CodecStringHelper.extractCodec(e.getCodec())};if(this.settings.HLS_CLEAR_BUFFERS_ON_DISCONTINUITY_SWITCHES){var n=null==(t=e.getSegmentInfo())?void 0:t.discontinuitySequenceNumber;null!=n&&(i.discontinuityNumber=n)}return(this.settings.DASH_CLEAR_BUFFERS_ON_PERIOD_SWITCHES||(0,s.isTizen2016)())&&(i.periodId=e.getPeriodId()),i},e.prototype.canAddSegmentToBufferBlock=function(e,t,i){var n,r=t.getMediaTypes();if(0===r.length)return!0;if(!this.ybb(r,e))return!1;var o=e.getMimeType(),a=t.getSegregationCriteria(o);if(a)return c(i,a);var s=null==(n=r.find(function(e){return e.mimeType!==o}))?void 0:n.mimeType;return!s||c(i,t.getSegregationCriteria(s),["codec","encryption"])},e}();var h={canReuseSourceBuffers:function(e,t,i){var n=d(e,t,i);return S(n.currentCriteria,n.nextCriteria)}},p={canReuseSourceBuffers:function(e,t,i){var n=d(e,t,i),r=n.currentCriteria,o=n.nextCriteria;return S(r,o)&&b(r,o)&&E(r,o)&&function(e,t){return(null==e?void 0:e.periodId)===(null==t?void 0:t.periodId)}(r,o)&&T(e,t,i)}},f={canReuseSourceBuffers:function(e,t,i){var n=d(e,t,i),r=n.currentCriteria,o=n.nextCriteria;return S(r,o)&&b(r,o)&&T(e,t,i)}},g={canReuseSourceBuffers:function(e,t,i){var n=d(e,t,i),r=n.currentCriteria,o=n.nextCriteria;return S(r,o)&&b(r,o)}},m={canReuseSourceBuffers:function(e,t,i){var n=d(e,t,i),r=n.currentCriteria,o=n.nextCriteria;return!(0,s.isTizen2017)()&&S(r,o)&&b(r,o)&&T(e,t,i)}},y={canReuseSourceBuffers:function(e,t,i){var n=d(e,t,i),r=n.currentCriteria,o=n.nextCriteria,a=S(r,o)&&T(e,t,i)&&!E(r,o);return((0,s.isWebOs2017)()||(0,s.isWebOs2016)())&&(a=a&&b(r,o)),a}},v={canReuseSourceBuffers:function(e,t,i){return!1}};function S(e,t){return(null==e?void 0:e.codec)===(null==t?void 0:t.codec)}function b(e,t){return(null==e?void 0:e.encryption)===(null==t?void 0:t.encryption)}function E(e,t){return(null==e?void 0:e.discontinuityNumber)===(null==t?void 0:t.discontinuityNumber)}function T(e,t,i){return l(e,i)===l(t,i)}},14302:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.AbstractUpdater=t.REPRESENTATION_UPDATE_CANCEL=void 0,t.calculateUpdateDelayInMillis=c;var n=i(80813),r=i(3714),o=i(34841),a=i(89927),s=i(88844);t.REPRESENTATION_UPDATE_CANCEL="CANCEL";var u=function(){function e(e,t){var i=this;this.context=e,this.updateCallbacks=t,this.uO=function(){var e,t;!1===(null==(e=i.tO)?void 0:e.hasSettled)&&(i.context.logger.debug("Scheduling delayed manifest update as playback has started"),null==(t=i.tO)||t.resolve(),i.tO=void 0)},this.AO=function(e){i.BO(e),i.clearTimeout()},this.CO=function(e){i.success(e),i.clearTimeout(),i.sO||i.scheduleUpdate()},this.sO=!1,e.eventHandler.on(r.PlayerEvent.Playing,this.uO,!0)}return e.prototype.cancel=function(){var e;this.qO&&(this.qO.reject(t.REPRESENTATION_UPDATE_CANCEL),this.updateCallbacks.error(t.REPRESENTATION_UPDATE_CANCEL),null==(e=this.tO)||e.reject(t.REPRESENTATION_UPDATE_CANCEL),this.tO=void 0),this.clearTimeout()},e.prototype.clearTimeout=function(){(0,s.clearTimeoutIfDefined)(this.rO),this.rO=null},e.prototype.stop=function(){null!==this.rO&&(this.sO=!0,this.cancel())},e.prototype.start=function(){this.sO=!1,this.scheduleUpdate()},e.prototype.scheduleUpdate=function(e){void 0===e&&(e=!1),this.rO||this.sO||this.vO(e)},e.prototype.vO=function(e){var t=this,i=c(this.getLastReloadTimestamp(),this.getReloadIntervalInSeconds());if(!(i>
10x7fffffff)){var n=new o.Deferred,r={isForcedUpdate:e,wasInvalidated:function(){return n!==t.qO}};n.promise.catch(function(){}),this.qO=n,this.rO=window.setTimeout(function(){return t.wO(r)},i)}},e.prototype.wO=function(e){var t=this;this.xO(e.isForcedUpdate).then(function(){return t.update()}).then(function(i){e.wasInvalidated()||t.CO(i)}).catch(function(i){e.wasInvalidated()||t.AO(i)})},e.prototype.xO=function(e){var t;return!(null==(t=this.context.settings)?void 0:t.POSTPONE_MANIFEST_UPDATES_UNTIL_PLAYBACK_START)||e||!function(e){var t,i;return!0===(null==(i=null==(t=null==e?void 0:e.serviceManager)?void 0:t.get(n.ServiceName.PlayerStateService))?void 0:i.isPlay())}(this.context)||this.zO()?Promise.resolve():(this.context.logger.debug("Delaying manifest update until playback has started"),this.tO=this.tO||new o.Deferred,this.tO.promise)},e.prototype.yO=function(){return this.context.serviceManager.get(n.ServiceName.SourceStoreService,this.context.sourceContext.sourceIdentifier)},e.prototype.zO=function(){var e,t,i;return null==(i=null==(t=null==(e=this.yO())?void 0:e.getState())?void 0:t.hls)?void 0:i.isLowLatencyPlaylist},e.prototype.BO=function(e){this.qO.reject(e),this.updateCallbacks.error(e)},e.prototype.success=function(e){this.qO.resolve(e),this.updateCallbacks.success(e)},e.prototype.dispose=function(){this.context.eventHandler.off(r.PlayerEvent.Playing,this.uO,!0)},Object.defineProperty(e.prototype,"isStopped",{get:function(){return this.sO},enumerable:!1,configurable:!0}),e.prototype.getPayload=function(){return this.qO.promise},e}();function c(e,t){if(isNaN(t))return 0;var i=(0,a.toSeconds)(Date.now()-e);return i>=t?0:(0,a.toMilliSeconds)(t-i)}t.AbstractUpdater=u},87222:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.findAdaptationSetOfMimeType=function(e,t,i){void 0===i&&(i={});var n,r=i.sourceState,o=i.langObj,c=i.periodSwitched,d=s(e,r),h=l(t,e);return d&&(n=u(h,d,o,c)),!n&&r&&(n=u(h,a(e,r),o,c)),n||h[0]},t.getHlsDefaultLanguage=a,t.getPreferredLanguage=s,t.findAdaptationSetsForMimeType=l;var n=i(85434),r=i(88052),o=i(62756);function a(e,t){var i;if(r.ModuleManager.has(o.ModuleName.HLS)){var a=r.ModuleManager.get(o.ModuleName.HLS).selectors,s=a.getHlsState,u=a.getDefaultLanguages,c=s(t),l=c?u(c):void 0;if(l){var d=null==(i=n.MimeTypeHelper.getMediaType(e))?void 0:i.toUpperCase();return d?l[d]:void 0}}}function s(e,t){var i=t&&a(e,t),n={language:navigator.language||navigator.userLanguage||(null==i?void 0:i.language)};return n.language&&i&&c(n.language,i.language)&&(n.name=i.name),n}function u(e,t,i,n){if(void 0===n&&(n=!1),0!==e.length){var r=void 0;if(i&&(r=function(e,t,i){var n=e.find(function(e){return e._lang&&t.lang&&e._lang===t.lang}),r=e.find(function(e){return t.adaptationSetId&&e._internalId.equals(t.adaptationSetId)});return r=r||e.find(function(e){return t.id===e._internalId.adaptationSetId}),i?n||r:r||n}(e,i,n)),r)return r;if(t&&t.language){var o=e.filter(function(e){return!(!e._lang||null==e._lang)&&c(e._lang,t.language)});return o.find(function(e){return e.Representation.find(function(e){return e._name===t.name})})||o[0]}}}function c(e,t){return!!((null==e?void 0:e.includes(t))||(null==t?void 0:t.includes(e)))}function l(e,t){return e.AdaptationSet.filter(function(e){return e._mimeType===t||e.Representation.find(function(e){return e._mimeType===t})})}},47151:function(e,t,i){var n=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(t,i)};return function(t,i){if("function"!=typeof i&&null!==i)throw TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.AdaptationSetId=void 0,t.createAdaptationSetIdFromMimeTypeAndIndex=function(e,t,i){return new r(e,"".concat(t,"-").concat(i))};var r=function(e){function t(t,i){var n=e.call(this,t)||this;return n.Sb=i,n}return n(t,e),Object.defineProperty(t.prototype,"adaptationSetId",{get:function(){return this.Sb}
1,enumerable:!1,configurable:!0}),t.prototype.equals=function(t){return e.prototype.equals.call(this,t)&&this.adaptationSetId===(null==t?void 0:t.adaptationSetId)},t.prototype.key=function(){return e.prototype.key.call(this)+"-"+this.adaptationSetId},t}(i(16197).PeriodId);t.AdaptationSetId=r},92778:function(e,t){var i;Object.defineProperty(t,"__esModule",{value:!0}),t.DashSchemeUri=void 0,function(e){e.AudioChannelConfig="urn:mpeg:dash:23003:3:audio_channel_configuration:2011"}(i||(t.DashSchemeUri=i={}))},23940:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.MPDExtractor=void 0,t.stripUnderscorePrefix=m,t.applyProperties=y,t.representationToQuality=v,t.getMinimumUpdatePeriodInSeconds=function(e){return null==(null==e?void 0:e._minimumUpdatePeriod)?1/0:s.DurationConverter.getDurationInSec(e._minimumUpdatePeriod)},t.getContentTypeFromMimeTypeAndCodecs=b;var n=i(80813),r=i(44468),o=i(77179),a=i(34047),s=i(52424),u=i(85434),c=i(89927),l=i(70850),d=i(88052),h=i(62756),p=i(59707),f=i(62198),g=i(92778);function m(e){return 0===e.indexOf("_")?e.substring(1):e}function y(e,t,i){return void 0===i&&(i=[]),Object.keys(e).filter(function(e){return 0===i.length||i.indexOf(e)>-1}).forEach(function(i){t[m(i)]=e[i]}),t}function v(e,t,i){if(!e)return null;var n={id:e._id?String(e._id):null,bitrate:e._bandwidth||0},r=a.CodecStringHelper.getExtractedCodecStrings(e._codecs||i);return!function(e,t){return u.MimeTypeHelper.isAudio(t)}(0,t)?!function(e,t){return u.MimeTypeHelper.isVideo(t)}(0,t)?(n.label=e._label||S(n.bitrate),n):function(e,t,i){e.width=t._width||0,e.height=t._height||0,i.video&&(e.codec=i.video),t.hasOwnProperty("_frameRate")&&(e.frameRate=t._frameRate);var n=S(e.bitrate);return e.width&&e.height&&(n="".concat(e.width,"x").concat(e.height,", ").concat(n)),e.label=t._label||n,e}(n,e,r):function(e,t,i){i.audio&&(e.codec=i.audio);var n,r,o=null==(r=null==(n=t.AudioChannelConfiguration)?void 0:n.find(function(e){var t=e._schemeIdUri,i=e._value;return t===g.DashSchemeUri.AudioChannelConfig&&void 0!==i}))?void 0:r._value;return o&&(e.channels=parseInt(o)),e.label=t._label||S(e.bitrate),e}(n,e,r)}function S(e){return"".concat(Math.round(e/1e3),"kbps")}function b(e,t){return"".concat(e,'; codecs="').concat(t,'"')}function E(e,t){for(var i=function(t){-1===e.findIndex(function(e){return e.contentType===t.contentType})&&e.push(t)},n=0,r=t;n<r.length;n++)i(r[n])}t.MPDExtractor=function(){function e(e,t){var i=this;this.isLive=function(){var e;return"dynamic"===(null==(e=i.IF())?void 0:e._type)},this.CF=e,this.DF=t,this.EF=e.settings,this.GF=!1,this.FF=e.serviceManager.get(n.ServiceName.SynchronizedTimeService,this.DF.sourceIdentifier),this.HF=e.serviceManager.get(n.ServiceName.SourceStoreService,this.DF.sourceIdentifier)}return e.prototype.IF=function(){var e;return(0,f.getManifest)(null==(e=this.HF)?void 0:e.getState())},e.prototype.JF=function(){var e,t;return null!=(t=null==(e=this.IF())?void 0:e.Period)?t:[]},e.prototype.KF=function(e){var t=this.JF().find(function(t){return t._id===e});return t?t.AdaptationSet:[]},e.prototype.adjustPeriodStartTimes=function(){var e,t,i,n=null==(e=this.HF)?void 0:e.getState();if(n&&!this.GF&&!(null==(t=this.IF())?void 0:t._isHls)){var r=this.isLive()?(0,c.toSeconds)(this.getAvailabilityStartTime()):(0,o.getStartTimeOffset)(n);null==(i=this.HF)||i.dispatch((0,p.adjustPeriodStartTimes)(r)),this.GF=!0}},e.prototype.getAvailabilityStartTime=function(){var e;return this.isLive()&&(null==(e=this.IF())?void 0:e._availabilityStartTime)?l.Util.getUtcDate(this.IF()._availabilityStartTime).getTime()-this.LF():0},e.prototype.getAvailabilityEndTime=function(){var e;return(null==(e=this.IF())?void 0:e.hasOwnProperty("_availabilityEndTime"))?new Date(l.Util.getUtcDate(this.IF()._availabilityEndTime).getTime()-this.LF()):null},e.prototype.LF=function(){return this.FF?this.FF.getTimeDifference():0},e.prototype.getType=function(){var e;return null==(e=this.IF())?void 0:e._type},e.prototype.getDuration=function(){var e;return null==(e=this.IF())?void 0:e._mediaPresentationDuration},e.prototype.getRequestTimestamp=function(){var e;return null==(e=this.IF())?void 0:e._requestTimestamp},e.isValueWithinBounds=function(e,t,i){return!e||e>=t&&e<=i},e.prototype.MF=function(t){var i=e.isValueWithinBounds(t.width,this.CF.config.adaptation.resolution.minSelectableVideoWidth,this.CF.config.adaptation.resolution.maxSelectableVideoWidth),n=e.isValueWithinBounds(t.height,this.CF.config.adaptation.resolution.minSelectableVideoHeight,this.CF.config.adaptation.resolution.maxSelectableVideoHeight),r=e.isValueWithinBounds(t.bitrate,this.EF.MIN_SELECTABLE_VIDEO_BITRATE,this.EF.MAX_SELECTABLE_VIDEO_BITRATE);return i&&n&&r},e.prototype.NF=function(t){return e.isValueWithinBounds(t.bitrate,this.EF.MIN_SELECTABLE_AUDIO_BITRATE,this.EF.MAX_SELECTABLE_AUDIO_BITRATE)},e.prototype.OF=function(e,t){var i=this;if(!e)return[];var n=t.filter(function(t){return u.MimeTypeHelper.isVideo(e)&&i.MF(t)||u.MimeTypeHelper.isAudio(e)&&i.NF(t)});return n.length<1&&t.length>0?t:n},e.prototype.PF=function(e){if(!e)return[];var t=e.Representation.map(function(t){return v(t,e._mimeType,e._codecs)});return this.EF.EXCLUDE_DISALLOWED_REPRESENTATIONS&&(t=this.OF(e._mimeType,t)),t},e.prototype.getAudioQualities=function(e){var t=this,i=this.RF(e);return i?this.KF(i).reduce(function(e,i){return i._mimeType&&u.MimeTypeHelper.isAudio(i._mimeType)&&(e[i._internalId.adaptationSetId]=t.PF(i)),e},{}):{}},e.prototype.getVideoQualities=function(e){var t=this.RF(e);if(!t)return[];var i=this.KF(t).find(function(e){return e._mimeType&&u.MimeTypeHelper.isVideo(e._mimeType)});return i?this.PF(i):[]},e.prototype.getLangObjectFromAdaptationSet=function(e,t,i){var n={id:null,lang:null,adaptationSetId:null,kind:null,label:"off",url:null},r=e._mimeType&&e._mimeType.indexOf(t)>-1,o=i&&e._mimeType.indexOf(i)>-1;return u.MimeTypeHelper.isSubtitle(t)&&(n.kind="subtitle"),e.Role&&e.Role.length>0&&(n.role=e.Role.map(function(e){return y(e,{})})),(r||o)&&(y(e,n,["_lang","_isFragmented"]),n.lang=n.lang||"und",n.label=e._label||n.lang,n.adaptationSetId=e._internalId,n.id=e._internalId.adaptationSetId,n.metadata=this.QF(e)),n},e.prototype.QF=function(e){var t;if(null==(t=e.SupplementalProperty)?void 0:t.length)return e.SupplementalProperty.map(function(e){return{schemeIdUri:e._schemeIdUri,value:e._value,id:e._id}})},e.prototype.toSubtitleTrack=function(e,t,i){var n,r=this.getLangObjectFromAdaptationSet(e,t,i),o={id:r.id,lang:r.lang,kind:r.kind,isFragmented:null!=(n=r.isFragmented)&&n,isSideloaded:!1,enabled:!1,label:r.label};return null!=r.role&&(o.role=r.role),null!=r.metadata&&(o.metadata=r.metadata),o.forced=function(e,t){var i,n;return!!(null==(i=e.role)?void 0:i.some(function(e){return e.value&&["forced_subtitle","forced-subtitle"].includes(e.value)}))||!!(null==(n=null==t?void 0:t._hls)?void 0:n.isForced)}(o,e.Representation[0]),o},e.prototype.getAvailableSubtitles=function(e){var t=this,i=0;return(e=this.RF(e))?this.KF(e).filter(function(e){return u.MimeTypeHelper.isSubtitle(e._mimeType)}
vendor: 22,102 bytes, line 1
1).map(function(e){var n=t.toSubtitleTrack(e,"application","text");return n.id||(i++,n.id="sub_".concat(i)),n}):[]},e.prototype.getClosedCaptionLabels=function(e){return(e=this.RF(e))?this.KF(e).filter(function(e){return e.ClosedCaptionLabels}).flatMap(function(e){return Object.keys(e.ClosedCaptionLabels).map(function(t){var i=e.ClosedCaptionLabels[t];return{id:t,kind:"captions",lang:i.lang||"unknown",label:i.label||"Captions (".concat(t,")")}})}):[]},e.prototype.getAvailableAudio=function(e,t){var i=this;void 0===t&&(t=!0);var n=this.RF(e);if(!n)return[];var o=this.KF(n),a=0,s=o.filter(function(e){return u.MimeTypeHelper.isAudio(e._mimeType)}).map(function(e){var t=i.getLangObjectFromAdaptationSet(e,r.MediaType.Audio);return t&&"off"!==t.label?(t.id||(t.id="audio_"+a,a++),t):null});if(t){var c=o.find(function(e){return u.MimeTypeHelper.isVideo(e._mimeType)});if(c&&c.ContentComponent){var l=c.ContentComponent.filter(function(e){return e._contentType===r.MediaType.Audio}).map(function(e){return{id:e._id,lang:e._lang,label:e._id,adaptationSetId:c._internalId}});s=s.concat(l)}}return s.filter(function(e){return e})},e.prototype.getAvailableVideo=function(e){var t=this.RF(e);if(!t)return[];var i=this.KF(t).find(function(e){return u.MimeTypeHelper.isVideo(e._mimeType)});return i?[this.getLangObjectFromAdaptationSet(i,r.MediaType.Video)]:[]},e.getContentProtectionForManifestElement=function(e){var t;return(null==(t=null==e?void 0:e.ContentProtection)?void 0:t.length)&&d.ModuleManager.has(h.ModuleName.DRM)?d.ModuleManager.get(h.ModuleName.DRM).ContentProtectionHelper.parseContentProtectionDescriptors(e.ContentProtection):[]},e.getContentProtectionForAdaptationSet=function(t){for(var i=[],n=0;n<t.Representation.length;n++)i=i.concat(e.getContentProtectionForManifestElement(t.Representation[n]));return i.concat(e.getContentProtectionForManifestElement(t))},e.prototype.getTimeShiftBufferDepthSeconds=function(){if(this.isLive()){var e=this.IF()._timeShiftBufferDepth,t=(0,c.toSeconds)(Date.now()-this.getAvailabilityStartTime());return e===-1/0?-t:Math.max(e,-t)}return 0},e.getCurrentAndSuccessorPeriod=function(e,t){for(var i=[null,0,null],n=i[0],r=i[1],o=i[2];r<e.length;r++)if(e[r]._id===t){n=e[r],o=e[r+1]||null;break}return[n,o]},e.prototype.getPeriodDuration=function(t,i){i=null!=i?i:this.JF();var n,r=e.getCurrentAndSuccessorPeriod(i,t),o=r[0],a=r[1];if(o&&o._duration)return s.DurationConverter.getDurationInSec(o._duration);if(o&&o.start&&a&&a.start)return a.start-o.start;if(null==(n=this.IF())?void 0:n._mediaPresentationDuration){var u=s.DurationConverter.getDurationInSec(this.IF()._mediaPresentationDuration);if(!isNaN(u))return u}return 1/0},e.prototype.getDRMCapabilitiesForPeriod=function(e){if(!(e=this.RF(e)))return[[],[]];var t=this.JF().find(function(t){return t._id===e});return this.getDRMCapabilitiesFromPeriod(t)},e.prototype.getDRMCapabilitiesFromPeriod=function(t){for(var i=[],n=[],r=0,o=t.AdaptationSet;r<o.length;r++){var a=o[r],s=a._mimeType,c=e.getMimeTypeCodecStringForAdaptationSet(a);u.MimeTypeHelper.isVideo(s)?E(n,c):u.MimeTypeHelper.isAudio(s)&&E(i,c)}return[i,n]},e.prototype.dispose=function(){this.EF=null},e.getMimeTypeCodecStringForAdaptationSet=function(t){for(var i=[],n=0,r=t.Representation;n<r.length;n++){var o=r[n],a=e.getAttributeFromRepresentationOrAdaptationSet("_codecs",o,t),s=t._mimeType;if(t._mimeType&&a){var u=b(s,a);i.push({contentType:u})}}return i},e.getAttributeFromRepresentationOrAdaptationSet=function(e,t,i){return t.hasOwnProperty(e)&&t[e]?t[e]:i.hasOwnProperty(e)&&i[e]?i[e]:null},e.prototype.RF=function(e){var t=this.JF();if(0===t.length)return this.CF.logger.warn("No periods available in the manifest"),null;if(t.find(function(t){return t._id===e}))return e;var i=t[t.length-1]._id;return this.CF.logger.debug("Period "+e+" not available - return last period ("+i+")"),i},e.prototype.getEventStreamEvents=function(e){var t=this;return e&&e.EventStream?e.EventStream.filter(function(e){return e.Event}).flatMap(function(i){var n,r=Number(null!=(n=i._timescale)?n:1);return t.SF(e.start,i,r)}):[]},e.prototype.SF=function(e,t,i){var n=this;return t.Event.map(function(r){var o={};if(o.startTime=(r._presentationTime||0)/i+e,r._duration){var a=r._duration/i;o.endTime=o.startTime+a}else o.endTime=o.startTime;return o.data=n.TF(r,t._schemeIdUri),o})},e.prototype.TF=function(e,t){var i=/<event[^>]*>(.*)(<\/event>|\/>)/g.exec(e.rawXmlRepresentation),n=void 0;i&&i.length>1&&(n=i[1]);var r={};return Object.getOwnPropertyNames(e).filter(function(e){return!["_presentationTime","_duration","__text"].some(function(t){return t===e})&&0===e.lastIndexOf("_",0)}).forEach(function(t){r[t.substring(1,t.length)]=e[t]}),{properties:r,content:n,schemeIdUri:t}},e}()},67580:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.ManifestCachingService=void 0;var n=i(58313);function r(e,t){t[e]||(t[e]={})}t.ManifestCachingService=function(){function e(){this.Qb={}}return e.prototype.set=function(e,t,i){var o=n.URLHelper.toFullUrl(e);r(o,this.Qb),this.Qb[o][t]=i},e.prototype.Rb=function(e,t){var i=n.URLHelper.toFullUrl(e);r(i,this.Qb),this.Qb[i].expire=t},e.prototype.get=function(e,t){var i=n.URLHelper.toFullUrl(t),r=this.Qb[i];if(r&&function(e){return e>=Date.now()}(r.expire))return r[e];delete this.Qb[i]},e.prototype.cacheHttpResponse=function(e,t,i){void 0===i&&(i=1/0),this.set(t,"httpResponse",e),this.Rb(t,i)},e.prototype.cacheParsedManifest=function(e,t,i){void 0===i&&(i=1/0),this.set(t,"parsedManifest",e),this.Rb(t,i)},e.prototype.cacheSegmentList=function(e,t,i){void 0===i&&(i=1/0),this.set(t,"segmentList",e),this.Rb(t,i)},e.prototype.getHttpResponse=function(e){return this.get("httpResponse",e)},e.prototype.getParsedManifest=function(e){return this.get("parsedManifest",e)},e.prototype.getSegmentList=function(e){return this.get("segmentList",e)},e.prototype.clear=function(){this.Qb={}},e.prototype.dispose=function(){this.Qb={}},e}()},23901:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.createManifestLoadingService=function(e,t,i){switch(e.type){case o.StreamType.Dash:return new(0,a.ModuleManager.get(s.ModuleName.DASH).MPDLoader)(t,i);case o.StreamType.Hls:return new(0,a.ModuleManager.get(s.ModuleName.HLS).M3u8Loader)(t,i);case o.StreamType.Smooth:return new(0,a.ModuleManager.get(s.ModuleName.Smooth).SmoothStreamingLoader)(t,i);default:throw new r.PlayerError(n.ErrorCode.SOURCE_INVALID,{given:e.type,supported:"dash, hls, smooth"},"The provided stream type is not supported by the player.",i.sourceIdentifier)}};var n=i(40306),r=i(3336),o=i(44468),a=i(88052),s=i(62756)},13422:function(e,t,i){var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.orderAdaptationSetsByCodec=function(e,t){return(e=n({},e)).Period=e.Period.map(function(e){if(!e.AdaptationSet)return n({},e);var i=function(e){return e.reduce(function(e,t){var i=u(t);return r.MimeTypeHelper.isVideo(i)?e.videoSets.push(t):r.MimeTypeHelper.isAudio(i)?e.audioSets.push(t):e.otherSets.push(t),e},{videoSets:[],audioSets:[],otherSets:[]})}(e.AdaptationSet),o=i.videoSets,s=i.audioSets,c=i.otherSets,l=a(o,t.video),d={};return s.forEach(function(e){var t=e._lang||"none";d[t]=d[t]||[],d[t].push(e)}),Object.keys(d).forEach(function(e){l=l.concat(a(d[e],t.audio))}),n(n({},e),{AdaptationSet:l.concat(c)})}),e},t.sortAdaptationSetsByBestCodec=a,t.getCodecsFromAdaptationSet=s,t.getMimeTypeForAdaptationSet=u,t.removeRepresentations=function(e,t){if(!(e.Period&&e.Period.length>0)||0===t.length)return e;var i=e.Period.map(function(e){return function(e,t){var i=e.AdaptationSet.map(function(e){return function(e,t,i){var r=t.Representation.filter(function(t){return!i.some(function(i){return i.equals(new o.RepresentationId(e,t._id))})});return n(n({},t),{Representation:r})}(e._internalId,e,t)}).filter(function(e){return e.Representation.length>0});return n(n({},e),{AdaptationSet:i})}(e,t)}).filter(function(e){return e.AdaptationSet.length>0});return n(n({},e),{Period:i})};var r=i(85434),o=i(79505);function a(e,t){var i=function(e){for(var i=0;i<t.length;i++)if(0===e.indexOf(t[i]))return i;return t.length+1};return e.sort(function(e,t){return i(s(e))-i(s(t))})}function s(e){var t;if((null==(t=null==e?void 0:e._codecs)?void 0:t.length)>0)return e._codecs;if(e.Representation&&e.Representation.length>0){var i=e.Representation[e.Representation.length-1];if(i._codecs)return i._codecs}return""}function u(e){if(e._mimeType)return e._mimeType;if(Array.isArray(e.Representation)){var t=e.Representation.find(function(e){return e._mimeType});if(t)return t._mimeType}return""}},96533:function(e,t,i){var n=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(t,i)};return function(t,i){if("function"!=typeof i&&null!==i)throw TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},o=this&&this.__spreadArray||function(e,t,i){if(i||2==arguments.length)for(var n,r=0,o=t.length;r<o;r++)!n&&r in t||(n||(n=Array.prototype.slice.call(t,0,r)),n[r]=t[r]);return e.concat(n||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.ManifestService=void 0,t.initializeInternalIds=x,t.addDrmKidsToRepresentations=B,t.iterateAdaptationSets=F,t.getNearestPeriodForTime=H,t.findLowestPossibleBandwidthFromRepresentations=function(e,t){return void 0===t&&(t=-1/0),e.reduce(function(e,i){return i._bandwidth>=t?Math.min(e,i._bandwidth):e},1/0)},t.getMatchingRepresentationsByBandwidth=j,t.getMatchingRepresentationByBandwidth=V,t.getCodecPriorities=G,t.getCodecOfAdaptationSetMimeType=q;var a=i(40306),s=i(3336),u=i(80813),c=i(56481),l=i(3714),d=i(90408),h=i(25811),p=i(48488),f=i(30012),g=i(20649),m=i(88847),y=i(94685),v=i(74853),S=i(34047),b=i(52424),E=i(85434),T=i(15014),_=i(89927),A=i(23068),P=i(88052),M=i(62756),I=i(59707),R=i(62198),C=i(90919),O=i(87222),D=i(47151),w=i(13422),N=i(23940),L=i(16197),k=i(79505),U="Outdated";function x(e){var t;return(e=r({},e)).Period=null==(t=e.Period)?void 0:t.map(function(e){var t;return r(r({},e),{AdaptationSet:null==(t=e.AdaptationSet)?void 0:t.map(function(t,i){var n,o=(0,D.createAdaptationSetIdFromMimeTypeAndIndex)(e._id,t._mimeType,i);return r(r({},t),{_internalId:o,_periodId:e._id,Representation:null==(n=t.Representation)?void 0:n.map(function(e){return r(r({},e),{_internalId:new k.RepresentationId(o,e._id)})})})})})}),e}function B(e){if(P.ModuleManager.has(M.ModuleName.DRM)){var t=P.ModuleManager.get(M.ModuleName.DRM).ContentProtectionHelper.getFirstKeyId;F(e,function(e){for(var i=t(e.ContentProtection),n=0;e.Representation&&n<e.Representation.length;n++){var r=e.Representation[n];(i||r.ContentProtection)&&(r.associatedKid=r.ContentProtection&&t(r.ContentProtection)||i)}})}}function F(e,t){for(var i=0;e.Period&&i<e.Period.length;i++)for(var n=e.Period[i],r=0;n.AdaptationSet&&r<n.AdaptationSet.length;r++)t(n.AdaptationSet[r])}function H(e,t){if(e&&e.length){if(t<e[0].start)return e[0];var i=e[e.length-1];return t>=i.start?i:function(e,t){for(var i=e.length-1;i>=0;i--){var n=e[i].start+e[i].duration;if(t>=e[i].start&&t<n)return e[i];if(t>=n&&t<e[i+1].start)return e[i+1]}}(e,t)||i}}function j(e,t,i){void 0===i&&(i=function(){return!0});var n=e.filter(i),r=n.filter(function(e){return e._bandwidth===t});return r.length>0?r:function(e,t){var i=e.map(function(e){return e._bandwidth}).reduce(function(e,i){return Math.abs(i-t)<Math.abs(e-t)?i:e});return e.filter(function(e){return e._bandwidth===i})}(n,t)}function V(e,t,i){void 0===e&&(e=[]),void 0===i&&(i=function(){return!0});var n=e.filter(i),r=null,o=-1/0;return n.forEach(function(e){e._bandwidth>o&&e._bandwidth<=t&&(o=e._bandwidth,r=e)}),r||n[0]}function W(e,t,i){var n=i?"videoCodecPriority":"audioCodecPriority";return(null==t?void 0:t.options)&&t.options[n]?t.options[n]:e.playback&&e.playback[n]?e.playback&&e.playback[n]:[]}function G(e,t){return{video:W(e,t,!0),audio:W(e,t,!1)}}function q(e){var t=(0,w.getCodecsFromAdaptationSet)(e);if(!t||0===t.length)return null;var i=S.CodecStringHelper.getExtractedCodecStrings(t),n=e._mimeType.split("/")[0];return i[n]?S.CodecStringHelper.extractCodec(i[n]):null}function K(e){return e.reduce(function(e,t){return e[t._id]=function(e){return e.AdaptationSet.map(function(e){return e._mimeType}).filter(function(e,t,i){return E.MimeTypeHelper.isAV(e)&&i.indexOf(e)===t})}(t),e},{})}t.ManifestService=function(e){function t(t,i){var n=e.call(this,{onRestore:function(){return n.sE()}})||this;n.context=t,n.kE=0,n.rE=function(e){var t=n.getAdaptationSet(e._internalId);if(t){var i=function(t){n.context.eventHandler.dispatchEvent(t,{quality:{id:e._id,bitrate:e._bandwidth}})};E.MimeTypeHelper.isAudio(t._mimeType)?i(l.PlayerEvent.AudioQualityRemoved):E.MimeTypeHelper.isVideo(t._mimeType)&&i(l.PlayerEvent.VideoQualityRemoved)}},n.xE=function(e){(e.Representation||[]).forEach(function(t){e._codecs&&!t._codecs&&(t._codecs=e._codecs),e._width&&!t._width&&(t._width=e._width),e._height&&!t._height&&(t._height=e._height)}),delete e.SegmentTemplate},n.cE=i,n.bE=t.settings,n.gE=[];var r=n.cE.sourceIdentifier;return n.hE=t.serviceManager.get(u.ServiceName.SynchronizedTimeService,r),n.dE=t.serviceManager.get(u.ServiceName.SourceStoreService,r),n}return n(t,e),Object.defineProperty(t.prototype,"lE",{get:function(){return this.fE||(this.fE=new N.MPDExtractor(this.context,this.cE)),this.fE},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"mE",{get:function(){var e;return(0,R.getManifest)(null==(e=this.dE)?void 0:e.getState())},enumerable:!1,configurable:!0}),t.prototype.nE=function(e){this.dE.dispatch((0,I.setManifestAction)(this.preProcessManifest(e)))},t.prototype.updateManifest=function(e){var t=this;this.kE++;var i=this.kE;return this.KE(e).then(function(){return t.oE(i),t.pE(e)}).then(function(){t.oE(i),t.qE(e)}).catch(function(e){if(e!==U)throw e;t.context.logger.debug("Skipping manifest update, since a newer manifest is available")})},t.prototype.oE=function(e){if(e!==this.kE)throw U},t.prototype.pE=function(e){var t,i,n=this,r=null==(t=this.context.serviceManager)?void 0:t.get(u.ServiceName.DrmService),o=null==(i=this.context.serviceManager)?void 0:i.get(u.ServiceName.DrmDetectorService);return r&&o&&(null==e?void 0:e.Period)?r.getUsedOrEarlyResolvedKeySystemUid().then(function(t){if(t){var i=function(e,t){var i=[],n=[];return e.Period.forEach(function(e){var r=t.getDRMCapabilitiesFromPeriod(e);i=i.concat(r[0]),n=n.concat(r[1])}),{audioCapabilities:i,videoCapabilities:n}}(e,n.lE),r=i.audioCapabilities,a=i.videoCapabilities;return o.getSupportedCapabilities(t,r,a).then(function(t){return function(e,t,i){e.Period.forEach(function(e){e.AdaptationSet=e.AdaptationSet.filter(function(n){return n.Representation=n.Representation.filter(function(r){var o=e.ContentProtection||n.ContentProtection,a=(null==o?void 0:o.length)>0,s=(0,N.getContentTypeFromMimeTypeAndCodecs)(r._mimeType,r._codecs),u=function(e,t,i){return E.MimeTypeHelper.isAudio(e)?!!t.find(function(t){return t.contentType===e}):!E.MimeTypeHelper.isVideo(e)||!!i.find(function(t){return t.contentType===e})}(s,t.audioCapabilities,t.videoCapabilities);return a&&!u&&i.debug("Representation not supported by MediaKeySystem (".concat(s,")")),!a||u}),!E.MimeTypeHelper.isAV(n._mimeType)||n.Representation.length>0})})}(e,t,n.context.logger)})}}):Promise.resolve()},t.prototype.qE=function(e){if((0,y.isContextAvailable)(this.context)&&this.context.serviceManager){if(this.IE(),e.isInitialized=!1,this.nE(e),this.isLive()){var t=this.getFirstPeriod(),i=this.isHlsManifest()&&t?t.start:(0,_.toSeconds)(this.getAvailabilityStartTime());this.dE.dispatch((0,f.setStartTimeOffset)(i))}this.lE.adjustPeriodStartTimes();var n=this.FE();(0,d.maybeFireDurationChangedEvent)(this.eE,n,this.context.eventHandler),this.eE=n,this.BE(!0),this.context.serviceManager.maybeCall(u.ServiceName.HeartbeatService,function(e){return e.beat()},void 0,this.context.sourceContext.sourceIdentifier)}},t.prototype.excludeRepresentations=function(e){var t=this,i=e.map(function(e){return t.getRepresentationById(e)}).filter(function(e){return!!e});this.BE(!1);var n=K(this.getAllPeriods());this.gE=v.ArrayHelper.union(this.gE,e),this.dE.dispatch((0,I.removeRepresentationsAction)(this.gE));var r=K(this.getAllPeriods());return Object.keys(n).every(function(e){return null!=r[e]&&n[e].length===r[e].length})?(this.IE(),i.forEach(this.rE),this.BE(!0),!0):(this.context.eventHandler.fireError(new s.PlayerError(a.ErrorCode.SOURCE_ERROR,void 0,"No playable track left",this.context.sourceContext.sourceIdentifier)),!1)},t.prototype.isRepresentationExcluded=function(e){return this.gE.some(function(t){return t.equals(e)})},t.prototype.resetExcludedRepresentations=function(){this.gE=[]},t.prototype.sE=function(){this.CE(this.getManifest()),this.dE.dispatch((0,I.setManifestAction)(x(this.getManifest())))},t.getAdaptationSetSwitchingSupplementalProperties=function(e){return!e.SupplementalProperty||e.SupplementalProperty.length<=0?null:e.SupplementalProperty.filter(function(e){return"urn:mpeg:dash:adaptation-set-switching:2016"===e._schemeIdUri})},t.prototype.tE=function(e,t,i){var n=i&&i.length>0;if(!n&&!this.bE.ADAPTATION_SET_SWITCHING_WITHOUT_SUPPLEMENTAL_PROPERTY)return null;var r=[],o=e._group,a=q(e);return n&&i.forEach(function(e){e._value&&r.push.apply(r,e._value.split(","))}),this.bE.ADAPTATION_SET_SWITCHING_WITHOUT_SUPPLEMENTAL_PROPERTY&&t.forEach(function(e){r.includes(e._id)||r.push(e._id)}),t.filter(function(t){if(!r.includes(t._id)||t._id===e._id)return!1;var i=t._group===o,n=t._mimeType===e._mimeType,s=q(t)===a,u=t._lang===e._lang;return n&&s&&i&&u})},t.prototype.uE=function(e){var i=this;return e.AdaptationSet?e.AdaptationSet.reduce(function(n,r){var a=t.getAdaptationSetSwitchingSupplementalProperties(r),s=i.tE(r,e.AdaptationSet,a);return s&&0!==s.length?v.ArrayHelper.addAndMergeIntersects(n,o([r],s,!0)):n},[]):[]},t.mergeAdaptationSetProperties=function(e,t,i){var n=e.hasOwnProperty(i),r=t.hasOwnProperty(i);(n||r)&&(n?r||(t[i]=[]):e[i]=[],e[i]=e[i].concat(t[i]))},t.prototype.vE=function(e,t){return e.filter(function(e){return e.hasOwnProperty(t)}).map(function(e){return e[t]})},t.prototype.wE=function(e,t){var i=[e].concat(t),n=this.vE(i,"_minWidth"),r=this.vE(i,"_maxWidth"),o=this.vE(i,"_minHeight"),a=this.vE(i,"_maxHeight"),s=this.vE(i,"_minBandwidth"),u=this.vE(i,"_maxBandwidth");n.length>0&&(e._minWidth=Math.min.apply(null,n)),r.length>0&&(e._maxWidth=Math.max.apply(null,r)),o.length>0&&(e._minHeight=Math.min.apply(null,o)),a.length>0&&(e._maxHeight=Math.max.apply(null,a)),s.length>0&&(e._minBandwidth=Math.min.apply(null,s)),u.length>0&&(e._maxBandwidth=Math.max.apply(null,u))},t.prototype.yE=function(e,i){i.forEach(this.xE);var n=i.shift();i.forEach(function(e){["Representation","ContentComponent","ContentProtection","SupplementalProperty"].forEach(function(i){return t.mergeAdaptationSetProperties(n,e,i)})}),this.wE(n,i),e.AdaptationSet=e.AdaptationSet.filter(function(e){return!i.includes(e)})},t.prototype.zE=function(e){var t;null==(t=null==e?void 0:e.AdaptationSet)||t.forEach(function(e){var t;null==(t=null==e?void 0:e.Representation)||t.sort(function(e,t){return e._bandwidth-t._bandwidth})})},t.prototype.AE=function(e){var t=this;return e.Period.forEach(function(e){t.uE(e).forEach(function(i){t.yE(e,i)}),t.zE(e)}),e},t.prototype.setRepresentationDrmKid=function(e,t){this.dE.dispatch((0,I.setRepresentationDrmKidAction)(e,t))},t.prototype.getRepresentationDrmKid=function(e){var t;return null==(t=this.getRepresentationById(e))?void 0:t.associatedKid},t.prototype.BE=function(e){this.dE.dispatch((0,I.setManifestInitializedAction)(e))},t.prototype.CE=function(e){var t=this.cE.source.drm,i=function(e){return null==e.Period?[]:e.Period.filter(function(e){return e.AdaptationSet&&e.AdaptationSet.length>0}).reduce(function(e,t){return e.concat(t.AdaptationSet)},[]).filter(function(e){return e.ContentProtection&&e.ContentProtection.length>0}).flatMap(function(e){return e.ContentProtection}).filter(function(e){return null!=e.laurl&&e.laurl.length>0}).flatMap(function(e){return e.laurl.map(function(t){return r(r({},t),{drmType:h.DRMSchemeIDURIs[e._schemeIdUri]})})}).filter(function(e){return null!=e.drmType}).map(function(e){var t;return(t={})[e.drmType]={LA_URL:e._licenseUrl},t})}(e),n={};i.length>0&&(n=r({},i[0])),null!=t&&Object.keys(t).length>0&&Object.keys(t).forEach(function(e){n[e]=null!=n[e]?r(r({},n[e]),t[e]):t[e]}),this.DE(n);var o=Object.keys(n).length>0?(0,p.setManifestDrm)(n):(0,p.resetManifestDrm)();this.dE.dispatch(o)},t.prototype.DE=function(e){if(P.ModuleManager.has(M.ModuleName.DRM)&&Object.keys(e).length>0&&!this.context.serviceManager.has(u.ServiceName.DrmService)){var t=P.ModuleManager.get(M.ModuleName.DRM).DrmService;this.context.serviceManager.set(u.ServiceName.DrmService,new t(this.context))}this.context.serviceManager.maybeCall(u.ServiceName.DrmService,function(t){t.isDrmConfigSet()||t.setDrmConfig(e)})},t.prototype.EE=function(){var e=new Map;return this.getAllRepresentations().filter(function(e){return e._internalId&&e.associatedKid}).forEach(function(t){return e.set(t._internalId.key(),t.associatedKid)}),e},t.prototype.preProcessManifest=function(e){var t=this.EE();return e.Period&&e.Period.length>0?(B(e=(0,w.orderAdaptationSetsByCodec)(e,G(this.context.config,this.cE.source))),e=this.AE(e),P.ModuleManager.has(M.ModuleName.Envivio)&&
1(e=P.ModuleManager.get(M.ModuleName.Envivio).fixSegmentTimelineLiveStream(e)),this.isSuspended()||this.CE(e),e=x(e),function(e,t){e.Period.flatMap(function(e){var t;return null!=(t=null==e?void 0:e.AdaptationSet)?t:[]}).flatMap(function(e){var t;return null!=(t=null==e?void 0:e.Representation)?t:[]}).forEach(function(e){t.has(e._internalId.key())&&(e.associatedKid=t.get(e._internalId.key()))})}(e=(0,w.removeRepresentations)(e,this.gE),t),e):(this.context.eventHandler.fireError(new s.PlayerError(a.ErrorCode.SOURCE_ERROR,void 0,"No playable track left",this.cE.sourceIdentifier)),null)},t.prototype.FE=function(){if(this.lE){var e=NaN,t=this.lE.getDuration();return t&&(this.iE&&this.iE===t?e=this.jE:(e=b.DurationConverter.getDurationInSec(t),this.iE=t,this.jE=e)),isNaN(e)&&this.isLive()?1/0:e}return 0},t.prototype.getDuration=function(){return this.eE},t.prototype.isLive=function(){return!!this.mE&&this.lE.isLive()},t.prototype.getAvailabilityStartTime=function(){return this.lE.getAvailabilityStartTime()},t.prototype.getAvailabilityEndTime=function(){return this.lE.getAvailabilityEndTime()},t.prototype.isAvailabilityEndTimeExceeded=function(){var e=this.getAvailabilityEndTime();return e&&Date.now()>e.getTime()},t.prototype.findPeriod=function(e){return(0,T.findPeriod)(this.mE,e)},t.prototype.getAllPeriods=function(){var e,t;return null!=(t=null==(e=this.mE)?void 0:e.Period)?t:[]},t.prototype.getPeriod=function(e){return e?this.findPeriod(e.periodId):null},t.prototype.isLanguageAvailable=function(e,t,i){var n=(0,T.findPeriod)(this.mE,e)||this.getFirstPeriod();return(0,O.findAdaptationSetsForMimeType)(n,t).some(function(e){var t=e._lang&&i.lang&&e._lang===i.lang,n=i.adaptationSetId&&e._internalId.equals(i.adaptationSetId);return t||n})},t.prototype.findAdaptationSet=function(e,t,i,n){void 0===n&&(n=!1);var r=(0,T.findPeriod)(this.mE,e)||this.getFirstPeriod();if(void 0!==r){var o=this.dE.getState(),a=(0,O.findAdaptationSetOfMimeType)(t,r,{sourceState:o,langObj:i,periodSwitched:n,playbackConfig:this.context.config.playback});return a||this.context.logger.debug("No AdaptationSet found to match mime type "+t),a}},t.prototype.getManifest=function(){return this.mE},t.prototype.getAvailableAudio=function(e,t){return this.lE.getAvailableAudio(e,t)},t.prototype.getAvailableVideo=function(e){return this.lE.getAvailableVideo(e)},t.prototype.getAvailableSubtitles=function(e){return this.lE.getAvailableSubtitles(e)},t.prototype.getClosedCaptionLabels=function(e){return this.lE.getClosedCaptionLabels(e)},t.prototype.getVideoRepresentations=function(e){return this.lE.getVideoQualities(e)},t.prototype.getAudioRepresentations=function(e){return this.lE.getAudioQualities(e)},t.prototype.getPeriodDuration=function(e,t){var i;return this.lE.getPeriodDuration(e,null!=t?t:null==(i=this.getManifest())?void 0:i.Period)},t.prototype.GE=function(e){var t,i;return this.isLastPeriod(e._id)?null!=(i=function(e){var t,i,n,r,o,a,s,u;return(null==e?void 0:e.SegmentTemplate)?null==(n=null==(i=null==(t=e.SegmentTemplate[0])?void 0:t.SegmentTimeline)?void 0:i[0])?void 0:n.totalDuration:(null==e?void 0:e.Representation)?null==(u=null==(s=null==(a=null==(o=null==(r=e.Representation[0])?void 0:r.SegmentTemplate)?void 0:o[0])?void 0:a.SegmentTimeline)?void 0:s[0])?void 0:u.totalDuration:void 0}(e.AdaptationSet[0]))?i:1/0:null!=(t=e.duration)?t:this.getPeriodDuration(e._id)},t.prototype.hasMultiplePeriods=function(){return this.getAllPerio
1ds().length>1},t.prototype.hasSinglePeriod=function(){return 1===this.getAllPeriods().length},t.prototype.HE=function(){var e=this;return this.getAllPeriods().reduce(function(t,i){return t+e.GE(i)},0)},t.prototype.getTimeShiftBufferDepthSeconds=function(){return Math.max(this.lE.getTimeShiftBufferDepthSeconds(),-this.HE())},t.prototype.getRequestTimestamp=function(){return this.lE.getRequestTimestamp()},t.prototype.getMediaPresentationDuration=function(){var e,t=b.DurationConverter.getDurationInSec(null==(e=this.mE)?void 0:e._mediaPresentationDuration);return isNaN(t)?0:t},t.prototype.calculateCumulativePeriodDuration=function(e){for(var t,i,n=0,r=0,o=null!=(i=null==(t=this.mE)?void 0:t.Period)?i:[];r<o.length;r++){var a=o[r];if(a._id===e)break;n+=this.getPeriodDuration(a._id)}return this.isLive()?(0,_.toSeconds)(Date.now()-this.getAvailabilityStartTime())-n:n},t.prototype.getMinimumUpdatePeriod=function(){return(0,N.getMinimumUpdatePeriodInSeconds)(this.mE)},t.prototype.getContentProtectionForAdaptationSet=function(e){return N.MPDExtractor.getContentProtectionForAdaptationSet(e)},t.prototype.getLangObjectFromAdaptationSet=function(e,t){return this.lE.getLangObjectFromAdaptationSet(e,t)},t.prototype.toSubtitleTrack=function(e,t){return this.lE.toSubtitleTrack(e,t)},t.prototype.getDRMCapabilitiesForPeriod=function(e){return this.lE.getDRMCapabilitiesForPeriod(e)},t.prototype.hasManifestTypeChanged=function(e){return!(!this.mE||this.mE._type===e||(this.context.logger.log("Manifest has just changed from "+this.mE._type+" to "+e),0))},t.prototype.getPeriodIdForTime=function(e){var t,i=this.getAllPerio
1ds();return 1===i.length?i[0]._id:null==(t=H(i,e))?void 0:t._id},t.prototype.dispose=function(){this.IE(),e.prototype.dispose.call(this)},t.prototype.IE=function(){this.fE=(0,c.dispose)(this.fE)},t.prototype.JE=function(){var e=this.getFirstPeriod();if(this.jE&&e&&e.start)return e.start+this.jE},t.prototype.getTotalDuration=function(){if(this.isLive())return this.JE()||1/0;var e=this.getLastPeriod();return e?(e.start||e._start&&b.DurationConverter.getDurationInSec(e._start)||0)+this.lE.getPeriodDuration(e._id):0},t.prototype.getFirstPeriod=function(){return this.getAllPeriods()[0]},t.prototype.getLastPeriod=function(){var e=this.getAllPeriods();if(e.length>0)return e[e.length-1]},t.prototype.isLastPeriod=function(e){var t=this.getLastPeriod();return!!t&&e===t._id},t.prototype.isManifestFinalized=function(){return!this.isLive()},t.prototype.isFirstPeriod=function(e){var t=this.getFirstPeriod();return!!t&&t._id===e},t.prototype.isHlsManifest=function(){var e,t;return null!=(t=null==(e=this.getManifest())?void 0:e._isHls)&&t},t.prototype.isDashManifest=function(){return!this.isHlsManifest()&&!this.isSmoothManifest()},t.prototype.isSmoothManifest=function(){var e,t;return"smooth"===(null==(t=null==(e=this.mE)?void 0:e.originalFormat)?void 0:t.format)},t.prototype.getHlsTags=function(){if(!this.isHlsManifest())return null;var e=P.ModuleManager.get(M.ModuleName.HLS).selectors,t=e.getHlsState;return(0,e.getCustomTags)(t(this.dE.getState()))},t.prototype.isMimeTypePartOfPeriod=function(e,t){var i=this.getPeriod(new L.PeriodId(t));return(i?i.AdaptationSet:[]).some(function(t){return t._mimeType===e})},t.prototype.getNextPeriod=function(e){var t;if(null==(t=this.mE)?void 0:t.Period)for(var i=this.findPeriod(e),n=this.mE.Period.indexOf(i)+1;n<this.mE.Period.length;n++){var r=this.mE.Period[n];if(r)return r}return null},t.prototype.getEventStreamEvents=function(e){return this.lE.getEventStreamEvents(e)},t.prototype.hasAdaptationSets=function(e){var t=this.mE;if(t&&t.Period){var i=t.Period.find(function(t){return t._id===e});return!!(i&&i.AdaptationSet)}return!1},t.prototype.KE=function(e){if(this.hE){var t=this.hE.getSynchronizationPromise();if(t)return t;if(e.UTCTiming&&e.UTCTiming.length>0)return this.hE.synchronizeWithServer(e.UTCTiming,e._downloadTime)}return Promise.resolve()},t.prototype.getAdaptationSet=function(e){if(e&&this.mE)return(0,T.findAdaptationSet)(this.mE,e)},t.prototype.getRepresentationById=function(e){if(e&&this.mE)return(0,T.findRepresentation)(this.mE,e)},t.prototype.representationExists=function(e){return!!this.getRepresentationById(e)},t.prototype.getMatchingRepresentationsByBandwidth=function(e,t,i){void 0===i&&(i=function(){return!0});var n=this.getAdaptationSet(e);return n?j(n.Representation,t,i):[]},t.prototype.getMatchingRepresentationByBandwidth=function(e,t,i){void 0===i&&(i=function(){return!0});var n=this.getAdaptationSet(e);return n?V(n.Representation,t,i):null},t.prototype.getAllRepresentations=function(){return this.getAllPerio
1ds().flatMap(function(e){var t;return(null==(t=e.AdaptationSet)?void 0:t.flatMap(function(e){return e.Representation}))||[]})},t.prototype.getRepresentation=function(e,t){return this.getRepresentationById(new k.RepresentationId(e,t))},t.prototype.getAllAdaptationSets=function(){return this.getAllPeriods().flatMap(function(e){return e.AdaptationSet})},t.prototype.getAllImageAdaptationSets=function(){return this.getAllAdaptationSets().filter(function(e){return e._mimeType.includes("image")&&"image"===e._contentType})},t.prototype.getAllDashThumbnailSources=function(){var e=this;return this.getAllImageAdaptationSets().map(function(t){var i=e.findPeriod(t._internalId.periodId);return{adaptationSet:t,timing:{startTime:i.start,duration:i.duration}}})},t.prototype.getAdaptationSetIndex=function(e){var t=this.findPeriod(e.periodId);return t&&t.AdaptationSet&&0!==t.AdaptationSet.length?t.AdaptationSet.findIndex(function(t){return t._internalId.equals(e)}):-1},t.prototype.getAvailableBaseURLsForRepresentation=function(e){var t=this.getAdaptationSet(e);if(void 0===e||!t)return[];for(var i=[],n=t.Representation,r=0;r<n.length;r++)if(n[r]._internalId.equals(e)&&n[r].BaseURL&&n[r].BaseURL.length>0){i=n[r].BaseURL;break}var o=[];for(r=0;r<i.length;r++)o.push((0,g.forceReallocation)(i[r].url));return o},t.prototype.findDownloadedHlsRepresentation=function(e){var t=this.getAdaptationSet(e);return t?t.Representation.find(function(e){return e._hls&&!!e._hls.requestTimestamp}):null},t.prototype.isManifestFetchRequired=function(e){if(!this.isHlsManifest())return!1;var t=Date.now(),i=this.getRepresentationById(e),n=!!i.SegmentList&&i.SegmentList.length>0&&!!i.SegmentList[0].SegmentURL,r=n?i.SegmentList[0].SegmentURL.length:0,o=!n||r>0,a=t-(i._requestTimestamp||t),s=this.isLive()&&a>=this.getMinimumUpdatePeriod();return!o||s},t.prototype.hasSelfInitialisingSegments=function(){return this.getAllPerio
1ds().map(function(e){return e.AdaptationSet}).reduce(function(e,t){return e.concat(t)},[]).map(function(e){return e.Representation}).reduce(function(e,t){return e.concat(t)},[]).some(function(e){var t=e.SegmentList&&e.SegmentList.length>0?e.SegmentList:[],i=!!e.SegmentBase&&e.SegmentBase.length>0,n=e.SegmentTemplate&&e.SegmentTemplate.length>0?e.SegmentTemplate:[];return!(e.init||i||t.some(function(e){return!!e.init})||n.some(function(e){return!!e._initialization}))})},t.prototype.isSegmentInfoLoaded=function(e){var t=this.getRepresentationById(e);return!(!t||!t.segmentIndex&&!t.segmentIndexParsingError)},t.prototype.isPrecedingPeriod=function(e,t){if(!(e&&t&&this.mE&&this.mE.Period))return!1;var i=this.mE.Period.findIndex(function(t){return t._id===e}),n=this.mE.Period.findIndex(function(e){return e._id===t});return i>=0&&n>=0&&n<i},t.prototype.getMaxSegmentDuration=function(){var e=b.DurationConverter.getDurationInSec(this.mE._maxSegmentDuration);return isNaN(e)?0:e},t.prototype.getDesiredDistanceToLiveEdge=function(){var e,t=null==(e=this.context.serviceManager.get(u.ServiceName.LiveLatencyService))?void 0:e.getTargetLatency();return(0,A.isDefined)(t)?t:this.context.bufferSettings.getForwardTargetLevel()+this.bE.LIVE_EDGE_DISTANCE},t.prototype.hasSuggestedStartPosition=function(){var e,t;return null!=(t=null==(e=this.mE)?void 0:e.hasOwnProperty("_startOffset"))&&t},t.prototype.getVodStartOffset=function(){return Math.max(0,Math.min(this.mE._startOffset,this.getDuration()-this.bE.SEEK_TO_END_OFFSET))},t.prototype.getLiveStartOffset=function(e){void 0===e&&(e=!0);var t=this.mE._startOffset;return t-=Math.abs(this.getTimeShiftBufferDepthSeconds()),e&&(t+=this.getDesiredDistanceToLiveEdge(),t=Math.min(0,t)),t},t.prototype.initSegmentStartTimesFromReferenceSegment=function(e){this.dE.dispatch((0,I.initPlaybackTimesFromReferenceSegment)(e))},t.prototype.initializeSegmentStartTimesFromStart=function(e){var t,i,n=this.getRepresentationById(e),r=null==(i=null==(t=null==n?void 0:n.SegmentList)?void 0:t[0])?void 0:i.SegmentURL;if(n&&(null==r?void 0:r.length)){var o=r.length-1,a=(0,_.toSeconds)(n._requestTimestamp)-r[o]._duration;this.context.logger.debug("Initializing segment start times with start time of last segment ".concat(a),e),this.dE.dispatch((0,I.initPlaybackTimesFromIndex)(e,o,a))}else this.context.logger.debug("Failed to initialize segment start times, no segments found",e)},t.prototype.hasSegmentStartTimeForHlsRepresentation=function(e){var t,i,n,r=this.getRepresentationById(e);return void 0!==(null==(n=null==(i=null==(t=null==r?void 0:r.SegmentList)?void 0:t[0])?void 0:i.SegmentURL[0])?void 0:n._playbackTime)},t.prototype.getStartTimeForHlsSegment=function(e,t){var i,n,r,o,a,s=this.getRepresentationById(e),u=null!=(r=null==(n=null==(i=null==s?void 0:s.SegmentList)?void 0:i[0])?void 0:n.SegmentURL)?r:[],c=(0,C.findSegmentUrlIndexWithinSegmentList)(t,u);return -1!==c&&void 0!==u[c]._playbackTime?u[c]._playbackTime:null!=(a=null==(o=this.getFirstPeriod())?void 0:o.start)?a:void 0},t.prototype.isTimeNearPeriodEnd=function(e,t,i){var n=this.findPeriod(t),r=null==n?void 0:n.start;if(void 0===r)return!1;
vendor: 5,082 bytes, line 1
1var o=r+this.getPeriodDuration(n._id,this.getAllPeriods());return e>=r&&e<=o&&o-e<=i},t}(m.Suspendable)},38568:function(e,t,i){var n=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(t,i)};return function(t,i){if("function"!=typeof i&&null!==i)throw TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),r=this&&this.__runInitializers||function(e,t,i){for(var n=arguments.length>2,r=0;r<t.length;r++)i=n?t[r].call(e,i):t[r].call(e);return n?i:void 0},o=this&&this.__esDecorate||function(e,t,i,n,r,o){function a(e){if(void 0!==e&&"function"!=typeof e)throw TypeError("Function expected");return e}for(var s,u=n.kind,c="getter"===u?"get":"setter"===u?"set":"value",l=!t&&e?n.static?e:e.prototype:null,d=t||(l?Object.getOwnPropertyDescriptor(l,n.name):{}),h=!1,p=i.length-1;p>=0;p--){var f={};for(var g in n)f[g]="access"===g?{}:n[g];for(var g in n.access)f.access[g]=n.access[g];f.addInitializer=function(e){if(h)throw TypeError("Cannot add initializers after decoration has completed");o.push(a(e||null))};var m=(0,i[p])("accessor"===u?{get:d.get,set:d.set}:d[c],f);if("accessor"===u){if(void 0===m)continue;if(null===m||"object"!=typeof m)throw TypeError("Object expected");(s=a(m.get))&&(d.get=s),(s=a(m.set))&&(d.set=s),(s=a(m.init))&&r.unshift(s)}else(s=a(m))&&("field"===u?r.unshift(s):d[c]=s)}l&&Object.defineProperty(l,n.name,d),h=!0};Object.defineProperty(t,"__esModule",{value:!0}),t.ManifestUpdateScheduler=void 0,t.isRepresentationUpToDate=v;var a=i(3336),s=i(80813),u=i(77401),c=i(69957),l=i(85648),d=i(93204),h=i(88847),p=i(85434),f=i(89927),g=i(59707),m=i(22059),y=i(63147);function v(e){var t;return!!e._requestTimestamp&&e._requestTimestamp+(0,f.toMilliSeconds)(null!=(t=e._updateInterval)?t:1/0)>Date.now()}t.ManifestUpdateScheduler=function(){var e,t=h.Suspendable,i=[];return e=function(e){function t(t,n){var o=e.call(this,{onSuspend:function(){return o.AF()},onRestore:function(){return o.BF()}})||this;o.LE=r(o,i),o.dF=!1,o.eF={},o.jF=function(e){return null==e?void 0:e.activeTracks},o.kF=function(e){e&&o.NE.isHlsManifest()&&o.lF(e)},o.pF=function(e){return e.player&&e.player.playbackState},o.qF=function(e){e&&(e===l.PlaybackState.Paused?o.yF():e===l.PlaybackState.Playing&&o.zF())},o.tF=function(e){o.vF(e),o.NE.updateManifest(o.NE.getManifest()).catch(function(){o.cF.debug("Updating the manifest failed")})},o.uF=function(e,t){if(o.cF.debug("Rejection while updating the representation",e),e===u.RequestError.Failed||e===u.RequestError.TimedOut||e instanceof a.PlayerError){var i=e instanceof a.PlayerError?e.name:e;o.aF.dispatch((0,g.updateRepresentationFailedDownloadAction)(t._internalId,i)),o.NE.updateManifest(o.NE.getManifest()).catch(function(e){o.cF.debug("Error while updating the manifest after the representation failed to load",e)})}},o.wF=function(){o.cF.debug("Error while loading manifest")},o.LE=t,o.ME=n;var c=o.ME.sourceIdentifier;return o.NE=t.serviceManager.get(s.ServiceName.ManifestService,c),o.YF=t.serviceManager.get(s.ServiceName.ManifestLoadingService,c),o.ZF=t.store,o.aF=t.serviceManager.get(s.ServiceName.SourceStoreService,c),o.bF=t.eventHandler,o.cF=t.logger,o.gF=o.iF(),o.hF=o.oF(t),o}return n(t,e),t.prototype.iF=function(){var e=this;return(0,d.subscribe)(this.aF)(function(t){return e.jF(t)},this.kF)},t.prototype.lF=function(e){this.mF(e),this.nF(e)},t.prototype.mF=function(e){var t=this;Object.keys(e).filter(function(t){return e[t].selectedRepresentationId}).forEach(function(i){t.rF(e[i].selectedRepresentationId)})},t.prototype.nF=function(e){var t=this;Object.keys(this.eF).filter(function(t){return!Object.keys(e).includes(t)}).forEach(function(e){t.eF[e].stop(),delete t.eF[e]})},t.prototype.oF=function(e){return(0,d.subscribe)(this.ZF)(this.pF,this.qF,function(){return e.settings.STOP_DOWNLOAD_ON_PAUSE})},t.prototype.rF=function(e){var t=this.NE.getRepresentationById(e),i=e.adaptationSetId;t?this.eF[i]?this.eF[i].getRepresentation()._internalId.equals(e)||this.eF[i].setRepresentation(t):this.eF[t._internalId.adaptationSetId]=this.sF(t):this.cF.debug("[ManifestUpdateScheduler] Representation not found for update: ".concat(e.representationId," (adaptationSet: ").concat(i,", periodId: ").concat(e.periodId,")"))},t.prototype.stopRepresentationUpdates=function(e){var t,i=this.eF[e._internalId.adaptationSetId];return null!=(t=null==i?void 0:i.stopRepresentationUpdate(e))?t:Promise.resolve()},t.prototype.scheduleRepresentationUpdate=function(e){var t=this.eF[e._internalId.adaptationSetId];null==t||t.setRepresentation(e),null==t||t.start()},t.prototype.sF=function(e){var t=this,i=new y.RepresentationUpdater(this.LE,e,this.YF,{success:this.tF,error:function(e){return t.uF(e,i.getRepresentation())}});return p.MimeTypeHelper.isAV(e._mimeType)||i.setRepresentation(e),i.start(),i}
1,t.prototype.vF=function(e){this.aF.dispatch((0,g.updateRepresentationAction)(e))},t.prototype.init=function(e){var t=this;return this.YF.load(e).then(function(e){return t.NE.updateManifest(e).then(function(){t.dF=!0,t.NE.isLive()&&!t.NE.isHlsManifest()&&t.xF(e)})}).catch(function(e){return e instanceof a.PlayerError||e instanceof Error?Promise.reject(e):Promise.reject(Error("The loading of the manifest has failed or was cancelled"))})},t.prototype.xF=function(e){var t=this;this.fF=new m.ManifestUpdater(this.LE,this.YF,e,{minAllowedUpdatePeriod:this.LE.settings.MINIMUM_ALLOWED_UPDATE_PERIOD,maxAllowedUpdatePeriod:this.LE.settings.MAXIMUM_ALLOWED_UPDATE_PERIOD},{success:function(e){return t.NE.updateManifest(e)},error:this.wF}),this.fF.start()},t.prototype.waitForRepUpdate=function(e){return 0===Object.keys(this.eF).length||v(this.NE.getRepresentationById(e))?Promise.resolve():this.eF[e.adaptationSetId].updateRepresentation().then(function(){})},t.prototype.yF=function(){Object.values(this.eF).forEach(function(e){return e.stop()}),this.fF&&this.fF.stop()},t.prototype.zF=function(){Object.values(this.eF).filter(function(e){return e.isStopped}).forEach(function(e){e.start()}),this.fF&&this.fF.isStopped&&this.fF.start()},t.prototype.AF=function(){this.hF()},t.prototype.BF=function(){this.hF=this.oF(this.LE)},t.prototype.isInitiated=function(){return this.dF},t.prototype.dispose=function(){var t;this.gF(),this.hF(),this.yF(),null==(t=this.fF)||t.dispose(),Object.values(this.eF).forEach(function(e){e.dispose()}),this.fF=null,this.eF=null,e.prototype.dispose.call(this)},t}(t),function(){var n,r="function"==typeof Symbol&&Symbol.metadata?Object.create(null!=(n=t[Symbol.metadata])?n:null):void 0;o(e,null,[(0,c.trackPerformance)("ManifestUpdateScheduler.init",!0)],{kind:"method",name:"init",static:!1,private:!1,access:{has:function(e){return"init"in e},get:function(e){return e.init}},metadata:r},null,i),r&&Object.defineProperty(e,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:r})}(),e}()},22059:function(e,t,i){var n=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(t,i)};return function(t,i){if("function"!=typeof i&&null!==i)throw TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.ManifestUpdater=void 0;var r=i(14302),o=i(23940);t.ManifestUpdater=function(e){function t(t,i,n,r,o){var a=e.call(this,t,o)||this;return a.context=t,a.manifestLoader=i,a.manifest=n,a.settings=r,a}return n(t,e),t.prototype.getUpdatedManifest=function(){return this.getPayload()},t.prototype.update=function(){var e=this;return this.manifestLoader.load(this.manifest._currentLoadingUrl).then(function(t){return e.manifest=t,t})},t.prototype.getReloadIntervalInSeconds=function(){var e=(0,o.getMinimumUpdatePeriodInSeconds)(this.manifest);return isNaN(e)?this.settings.minAllowedUpdatePeriod:Math.min(this.settings.maxAllowedUpdatePeriod,Math.max(this.settings.minAllowedUpdatePeriod,e))},t.prototype.getLastReloadTimestamp=function(){return this.manifest._requestTimestamp},t}(r.AbstractUpdater)},90087:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.MediaPlayerManifestApiFactory=void 0;var n=i(80813),r=i(3714),o=i(16197);t.MediaPlayerManifestApiFactory=function(){function e(){}return e.create=function(t,i){var r=i.serviceManager.get(n.ServiceName.ManifestService,i.sourceContext.sourceIdentifier);return new function(){r.isHlsManifest()?this.hls=e.createHlsApi(r):r.isSmoothManifest()||(this.dash=e.createDashApi(t,r))}},e.createDashApi=function(t,i){return new(function(){function n(){}return n.prototype.getPeriod=function(){var n=i.getPeriodIdForTime(t.getCurrentTime()),r=i.getPeriod(new o.PeriodId(n));return r?e.createPeriodApi(i,r):null}
vendor: 4,080 bytes, line 1
1,n.prototype.listPeriods=function(){return i.getAllPeriods().map(function(t){return e.createPeriodApi(i,t)})},n}())},e.createHlsApi=function(t){return new(function(){function i(){this.properties=t.getHlsTags()}return i.prototype.getVideoTracks=function(){return e.getVideoTracks(t,t.getFirstPeriod()._id)},i.prototype.getAudioTracks=function(){return e.getAudioTracks(t,t.getFirstPeriod()._id)},i.prototype.getTextTracks=function(){return e.getTextTracks(t,t.getFirstPeriod()._id)},i}())},e.createPeriodApi=function(t,i){return new(function(){function n(){this.id=i._id,this.properties={},i._id&&(this.properties.id=i._id),i._start&&(this.properties.start=i._start),i._duration&&(this.properties.duration=i._duration)}return n.prototype.getVideoTracks=function(){return e.getVideoTracks(t,this.id)},n.prototype.getAudioTracks=function(){return e.getAudioTracks(t,this.id)},n.prototype.getTextTracks=function(){return e.getTextTracks(t,this.id)},n.prototype.getMetadata=function(){return e.getMetadata(t,this.id)},n}())},e.getAudioTracks=function(t,i){return t.getAvailableAudio(i,!1).map(function(n){var r={id:n.id,label:n.label,lang:n.lang,getQualities:function(){return e.getAudioQualities(t,i,n.id)}};return n.role&&(r.role=n.role),n.metadata&&(r.metadata=n.metadata),r})},e.getVideoTracks=function(t,i){return t.getAvailableVideo(i).map(function(n){var r={id:n.id,label:n.label,getQualities:function(){return e.getVideoQualities(t,i)}};return n.role&&(r.role=n.role),n.metadata&&(r.metadata=n.metadata),r})},e.getTextTracks=function(e,t){return e.getAvailableSubtitles(t)},e.getMetadata=function(e,t){return e.getEventStreamEvents(e.findPeriod(t)).map(function(e){return{type:r.MetadataType.EVENT_STREAM,payload:e.data,start:e.startTime,end:e.endTime}})},e.getAudioQualities=function(e,t,i){return e.getAudioRepresentations(t)[i]||[]},e.getVideoQualities=function(e,t){return e.getVideoRepresentations(t)},e}()},16197:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.PeriodId=void 0,t.PeriodId=function(){function e(e){this.RG=e}return Object.defineProperty(e.prototype,"periodId",{get:function(){return this.RG},enumerable:!1,configurable:!0}),e.prototype.equals=function(e){return null!=e&&this.periodId===e.periodId},e.prototype.key=function(){return this.periodId},e}()},79505:function(e,t,i){var n=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(t,i)};return function(t,i){if("function"!=typeof i&&null!==i)throw TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.RepresentationId=void 0;var r=i(47151);t.RepresentationId=function(e){function t(t,i){var n=e.call(this,t.periodId,t.adaptationSetId)||this;return n.Tb=i,n}return n(t,e),Object.defineProperty(t.prototype,"representationId",{get:function(){return this.Tb},enumerable:!1,configurable:!0}),t.prototype.equals=function(t){return e.prototype.equals.call(this,t)&&this.representationId===(null==t?void 0:t.representationId)},t.prototype.key=function(){return e.prototype.key.call(this)+"-"+this.representationId},t.from=function(e){return e._representationId&&e._adaptationSetId&&e._periodId?new t(new r.AdaptationSetId(e._periodId,e._adaptationSetId),e._representationId):null},t}(r.AdaptationSetId)},63147:function(e,t,i){var n=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(t,i)};return function(t,i){if("function"!=typeof i&&null!==i)throw TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();
1Object.defineProperty(t,"__esModule",{value:!0}),t.RepresentationUpdater=void 0;var r=i(88052),o=i(62756),a=i(60729),s=i(14302);t.RepresentationUpdater=function(e){function t(t,i,n,r){var o=e.call(this,t,r)||this;return o.context=t,o.representation=i,o.manifestLoader=n,o}return n(t,e),t.prototype.getRepresentation=function(){return this.representation},t.prototype.setRepresentation=function(e){this.representation._internalId.equals(e._internalId)||this.cancel(),this.representation=e,this.scheduleUpdate(!0)},t.prototype.updateRepresentation=function(){return this.getPayload()},t.prototype.stopRepresentationUpdate=function(t){return e.prototype.stop.call(this),this.manifestLoader.stopRepresentationUpdate(t)},t.prototype.update=function(){var e=this;return this.manifestLoader.updateRepresentation(this.representation).then(function(t){if(e.representation._id!==t._id)throw s.REPRESENTATION_UPDATE_CANCEL;return e.representation=t,t})},t.prototype.getReloadIntervalInSeconds=function(){var e,t;return this.representation._requestTimestamp?(0,a.isPlayingLowLatencyHls)(this.context)&&(null==(e=r.ModuleManager.get(o.ModuleName.HLS))?void 0:e.canMakeBlockingPlaylistReload(this.representation,this.context.settings))?0:null!=(t=this.representation._updateInterval)?t:1/0:0},t.prototype.getLastReloadTimestamp=function(){return this.representation._requestTimestamp?this.representation._requestTimestamp:0},t}(s.AbstractUpdater)},99257:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.AdRestorationOptimizationService=void 0;var n=i(3714),r=i(91678),o=i(46151),a=i(94685),s=i(13422),u=i(80813),c=i(81524);t.AdRestorationOptimizationService=function(){function e(){var e=this;this.cb=function(){(0,a.isContextAvailable)(e.Vb)&&e.Vb.eventHandler.off(n.PlayerEvent.AdStarted,e.cb),e.db(e.Zb),e.Zb=[]}}return e.prototype.updatePlayerContext=function(e){this.Ub=[],this.Vb=e,this.Wb=e.segmentInfoService,this.Xb=e.segmentPrefetchingService,this.Yb=e.segmentCacheService},e.prototype.optimizeRestorationAfterUpcomingAdBreak=function(){var e,t,i=this,r=null==(t=null==(e=this.ab())?void 0:e.getState())?void 0:t.playback;if(!(0,a.isContextAvailable)(this.Vb)||!this.Wb||!r)return Promise.reject("Could not get playback state and/or SegmentInfoService");var o=(0,c.getPlaybackPosition)(r);return isNaN(o)?Promise.reject("Could not get playback position"):this.Wb.getSegmentInfos(o,this.Vb.settings.AD_RESTORATION_SEGMENT_PREFETCHING_DURATION).then(function(e){i.bb(e),i.Zb=e,(0,a.isContextAvailable)(i.Vb)&&i.Vb.eventHandler&&i.Vb.eventHandler.on(n.PlayerEvent.AdStarted,i.cb)})},e.prototype.ab=function(){return(0,a.isContextAvailable)(this.Vb)?this.Vb.serviceManager.get(u.ServiceName.SourceStoreService,this.Vb.sourceContext.sourceIdentifier):void 0},e.prototype.bb=function(e){var t=(0,a.isContextAvailable)(this.Vb)?this.Vb.sourceContext.sourceIdentifier:void 0,i=t?this.Vb.serviceManager.get(u.ServiceName.ManifestService,t):void 0;i&&e.forEach(function(e){var t=i.getAdaptationSet(e.internalRepresentationId);t&&(e.codecs=(0,s.getCodecsFromAdaptationSet)(t))})},e.prototype.db=function(e){var t;this.Ub=e.reduce(function(e,t){return t.mimeType&&!e.includes(t.mimeType)&&e.push(t.mimeType),e},[]),this.eb(),null==(t=this.Xb)||t.fetchAll(e)},e.prototype.hasPrefetchedSegment=function(e,t){var i,n;return(!(0,a.isContextAvailable)(this.Vb)||!this.Vb.sourceContext.isAd)&&null!=(n=null==(i=this.Yb)?void 0:i.hasPrefetchedSegment(e,t))&&n},e.prototype.getPrefetchedSegment=function(e,t){var i,n;return null!=(n=null==(i=this.Yb)?void 0:i.getPrefetchedSegment(e,t))?n:null},e.prototype.getRepresentationForPrefetchedSegment=function(e){var t;return null==(t=this.Yb)?void 0:t.getRepresentationForPrefetchedSegment(e)},e.prototype.eb=function(){var e=this;if((0,a.isContextAvailable)(this.Vb)){var t=this.Vb.store.getState();if(0!==this.Ub.length&&t){var i=(0,o.getMetricsState)(t);this.Ub.forEach(function(t){i[t]||e.Vb.store.dispatch((0,r.initializeMetricsForMimeType)(t,e.Vb.settings))})}}},e.prototype.reset=function(){(0,a.isContextAvailable)(this.Vb)&&this.Vb.eventHandler.off(n.PlayerEvent.AdStarted,this.cb),this.Ub=[],this.Zb=[]},e.prototype.dispose=function(){this.reset(),this.Wb=void 0,this.Xb=void 0,this.Yb=void 0},e}()}
vendor: 8,663 bytes, line 1
1,17382:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.calculateDownloadRates=function(e){return e.map(function(e){return(0,n.bytesToBits)(e.bytes)/e.downloadDuration}).filter(function(e){return e<1/0})},t.filterValuesExceedingAverageByMargin=function(e){var t=1.1*r(e);return e.filter(function(e){return e<=t})},t.calcAverage=r,t.bpsToMbps=function(e){return e/1024/1024};var n=i(33004);function r(e){return e.reduce(function(e,t){return e+t},0)/e.length}},49440:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.resolveContainerFormat=function(e,t,i){return i?function(e,t){var i,s=r.ModuleManager.has(o.ModuleName.ContainerMP4),c=null==(i=r.ModuleManager.get(o.ModuleName.ContainerMP4,!1))?void 0:i.isValidMp4;return s&&c(t)?{source:a.ContainerFormat.MP4,target:a.ContainerFormat.MP4}:n.MimeTypeHelper.isSubtitle(e)?u(e):{source:a.ContainerFormat.TS,target:a.ContainerFormat.MP4}}(e,t):u(e)};var n=i(85434),r=i(88052),o=i(62756),a=i(34795),s=i(14443);function u(e){var t=(0,s.extractContainerFormat)(e);return t?{source:t,target:t}:void 0}},23133:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.addEncryptionKeyToStore=function(e,t,i){return i.dispatch((0,o.addEncryptionKey)({uri:e,key:void 0,loadState:s.KeyLoadState.Loading})),t.load(e).then(function(t){return null==i||i.dispatch((0,o.updateEncryptionKey)({uri:e,key:r.FormatHelper.bytesToHex(t),loadState:s.KeyLoadState.Loaded})),function(e){var t=(0,a.getAllEncryptionKeys)(e.getState());t&&t.length>u&&e.dispatch((0,o.removeEncryptionKey)(t[0].uri))}(i),t}).catch(function(t){return null==i||i.dispatch((0,o.updateEncryptionKey)({uri:e,key:void 0,loadState:s.KeyLoadState.Cancel})),Promise.reject(t)})},t.waitForKeyToBeLoaded=function(e,t){return new Promise(function(i,o){var u=(0,n.subscribe)(e)(function(e){return(0,a.getEncryptionKey)(e,t)},function(e){return e.loadState===s.KeyLoadState.Cancel?(u(),o(Error("Encryption key load cancelled!"))):e.loadState===s.KeyLoadState.Loaded&&e.key?(u(),i(r.FormatHelper.hexToBytes(e.key).buffer)):void 0})})};var n=i(93204),r=i(70233),o=i(51386),a=i(66628),s=i(92096),u=20},88618:function(e,t,i){var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.FetchController=void 0;var r,o=i(77401),a=i(43446),s=i(29669),u=i(34841),c=i(88844),l=i(97587);function d(e){return![s.HttpRequestMethod.GET,s.HttpRequestMethod.HEAD].includes(e)}!function(e){e.User="user",e.Timeout="timeout"}(r||(r={})),t.FetchController=function(){function e(e,t,i,r){var o=this;this.useStreamResponse=r,this.setProgressListener=function(e){o.yc=e},this.Hc=function(e){o.yc&&(o.xc.progressTimestamp=a.TimingUtil.getHiResTimestamp(),o.zc.loadedBytes=e,o.yc(n({},o.zc)))},this.Ic=function(){(0,c.clearTimeoutIfDefined)(o.uc)},this.fb=e.logger,this.gb=i,this.ib=t,this.jb=new u.Deferred,this.wc=0,this.xc={sendTimestamp:-1,openedTimestamp:-1,headersReceivedTimestamp:-1,progressTimestamp:-1,doneTimestamp:-1},this.hb=new AbortController,this.zc={loadedBytes:0,url:t.url,responseTiming:this.xc,chunks:[],elapsedTime:0}}return e.prototype.getResponse=function(){return this.Ac(this.ib),this.jb.promise},e.prototype.cancel=function(e){void 0===e&&(e=r.User),(0,c.clearTimeoutIfDefined)(this.uc),this.vc=e,this.hb.abort()},e.prototype.Ac=function(e){var t,i=this,s={method:e.method,headers:new Headers(e.headers),credentials:e.credentials,signal:this.hb?this.hb.signal:void 0,body:d(e.method)?e.body:void 0};this.xc.sendTimestamp=a.TimingUtil.getHiResTimestamp(),fetch(e.url,s).then(function(e){var t;if(i.xc.headersReceivedTimestamp=a.TimingUtil.getHiResTimestamp(),null==(t=i.yc)||t.call(i,n({},i.zc)),e.ok){var r=i.Cc(e);i.Ec(e).then(function(e){r.body=e,r.length=i.wc,r.timeToFirstByte=i.xc.headersReceivedTimestamp-i.xc.sendTimestamp,i.xc.doneTimestamp>0&&(r.elapsedTime=i.xc.doneTimestamp-i.xc.sendTimestamp),i.jb.resolve(r)}).catch(function(t){i.Jc({error:t.message,response:i.Cc(e)})})}else i.Jc({error:o.RequestError.Failed,response:i.Cc(e)})}).catch(function(e){i.Jc({error:i.Dc(e)})}),this.xc.openedTimestamp=a.TimingUtil.getHiResTimestamp(),null==(t=this.yc)||t.call(this,n({},this.zc)),this.uc=window.setTimeout(function(){return i.cancel(r.Timeout)},this.gb)},e.prototype.Bc=function(e){var t={};return e.headers.forEach(function(e,i){return t[i]=e}),t},e.prototype.Cc=function(e){return{request:this.ib,url:e.url,headers:this.Bc(e),status:e.status,statusText:e.statusText}},e.prototype.Dc=function(e){return this.fb.debug("fetch error",e),e instanceof Error&&"AbortError"===e.name?this.vc===r.User?o.RequestError.Canceled:o.RequestError.TimedOut:o.RequestError.Failed},e.prototype.Ec=function(e){var t=this;if(e.body&&this.useStreamResponse){var i=new l.Stream,n=this.xc.headersReceivedTimestamp;return this.Fc(e,function(e){var r=a.TimingUtil.getHiResTimestamp(),o=r-n;n=r,t.zc.chunks.push({downloadDuration:o,bytes:e.byteLength});var s=e instanceof Uint8Array?e.buffer:e;i.add(s)}).then(function(){i.end(),t.Ic()}).catch(function(e){t.fb.debug("Error reading of fetch response:",e),i.abort(t.Dc(e))}),Promise.resolve(i)}var r=e.headers.get("Content-Length"),o=r?parseInt(r):0;return this.zc.totalBytes=o,this.Fc(e.clone()).catch(function(e){t.fb.debug("Error reading of fetch response:",e)}),this.Gc(e).then(function(e){return t.wc=o,t.xc.doneTimestamp=a.TimingUtil.getHiResTimestamp(),t.Ic(),e})},e.prototype.Fc=function(e,t){var i=this;if(!e.body)return Promise.reject(Error("response.body is null"));var n=e.body.getReader(),r=function(){return n.read().then(function(e){var n=e.done,o=e.value;return n?(i.xc.doneTimestamp=a.TimingUtil.getHiResTimestamp(),void i.Hc(i.wc)):o?(null==t||t(o),i.wc+=o.byteLength,i.Hc(i.wc),r()):void 0})};return r()},e.prototype.Gc=function(e){switch(this.ib.responseType){case s.HttpResponseType.ARRAYBUFFER:return e.arrayBuffer();case s.HttpResponseType.TEXT:return e.text();case s.HttpResponseType.JSON:return e.json();default:return Promise.reject(Error("Unsupported response type on fetch request"))}},e.prototype.Jc=function(e){(0,c.clearTimeoutIfDefined)(this.uc),this.fb.debug("Error performing fetch: ".concat(e.error),e.response),this.jb.reject(e)},e}()},94618:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.KeyLoader=void 0;var n=i(40306),r=i(3336),o=i(4129),a=i(77401),s=i(29669);t.KeyLoader=function(){function e(e){this.Y2=e,this.Z2=e.settings,this.b2=e.sourceContext.sourceIdentifier,this.a2=new o.DefaultContentLoader(this.Y2,{maxRetries:this.Z2.MAX_RETRIES,retryDelay:this.Z2.RETRY_DELAY,requestType:s.HttpRequestType.KEY_HLS_AES})}return e.prototype.c2=function(){var e=this.Y2.sourceContext.source&&this.Y2.sourceContext.source.hasOwnProperty("options")&&this.Y2.sourceContext.source.options,t=e&&e.hasOwnProperty("withCredentials")&&e.withCredentials,i=e&&e.hasOwnProperty("hlsWithCredentials")&&e.hlsWithCredentials;return!!t||!!i},e.prototype.load=function(e){var t=this;return this.a2?this.a2.load(e,s.HttpRequestMethod.GET,s.HttpResponseType.ARRAYBUFFER,void 0,void 0,this.c2()).then(function(e){return e.body}).catch(function(i){if(i.message===a.RequestError.Canceled)return Promise.reject(i);var o=new r.PlayerError(n.ErrorCode.DRM_FAILED_LICENSE_REQUEST,{statusCode:i.status,statusText:i.statusText,keyUrl:e},"Failed to load the DRM key: ".concat(i.status," ").concat(i.statusText,"."),t.b2);return t.Y2.eventHandler.fireError(o),Promise.reject(o)}):Promise.reject("Could not load: No loader.")},e.prototype.isLoading=function(){return!!this.a2&&this.a2.isLoading()},e.prototype.dispose=function(){this.a2&&"function"==typeof this.a2.dispose&&this.a2.dispose(),this.a2=void 0,this.Z2=void 0},e}()},689:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.getLoaderConfig=function(e,t){var i;return(null==(i=e.config.tweaks)?void 0:i.segmentLoaderArgs)?e.config.tweaks.segmentLoaderArgs:{maxRetries:e.settings.MAX_CDN_RETRIES,requestType:a(t),disableDownloadTimeout:!0,resetRetriesWhenOffline:!0}},t.getLoader=function(e,t){var i,r=null==(i=e.config.tweaks)?void 0:i.segmentLoader;return r&&"function"==typeof r?new r(t):new n.DefaultContentLoader(e,t)};var n=i(4129),r=i(29669),o=i(85434);function a(e){return o.MimeTypeHelper.isVideo(e)?r.HttpRequestType.MEDIA_VIDEO:o.MimeTypeHelper.isAudio(e)?r.HttpRequestType.MEDIA_AUDIO:o.MimeTypeHelper.isSubtitle(e)?r.HttpRequestType.MEDIA_SUBTITLES:o.MimeTypeHelper.isUnknown(e)?r.HttpRequestType.INTERNAL:r.HttpRequestType.UNKNOWN}},54053:function(e,t){var i;
1Object.defineProperty(t,"__esModule",{value:!0}),t.SegmentInfoError=void 0,function(e){e.END_OF_STREAM_REACHED="END_OF_STREAM_REACHED",e.PERIOD_COMPLETE="PERIOD_COMPLETE",e.SEGMENT_EXCEEDING_PERIOD_DURATION="SEGMENT_EXCEEDING_PERIOD_DURATION"}(i||(t.SegmentInfoError=i={}))},86219:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.MPDHandlerFactory=void 0;var n=i(80813),r=i(79721),o=i(88052),a=i(62756),s=i(63066);t.MPDHandlerFactory=function(){function e(){}return e.createInstance=function(e,t,i,u,c){void 0===u&&(u=r.DEFAULT_PERIOD_ID);var l=e.serviceManager.get(n.ServiceName.ManifestService,e.sourceContext.sourceIdentifier);if(!(null==l?void 0:l.hasAdaptationSets(u)))return null;var d=l.findAdaptationSet(u,t,c);if(!d)return e.logger.debug("Did not find adaptation set for mime type [".concat(t,"] in period ").concat(u)),null;var h=d.Representation&&d.Representation[0],p=h&&h.SegmentTemplate?h.SegmentTemplate:d.SegmentTemplate;return l.isSmoothManifest()?function(e,t,i,n){return n?new(o.ModuleManager.get(a.ModuleName.Smooth).createSmoothSegmentTemplateMPDHandler())(e,t,i):null}(e,t,i,p):l.isHlsManifest()?function(e,t){return t.SegmentList?new s.SegmentListMPDHandler(e):null}(e,h):function(e,t,i){var n=o.ModuleManager.get(a.ModuleName.DASH);return t&&t[0].SegmentTimeline?new n.SegmentTimelineMPDHandler(e):t?new n.SegmentTemplateMPDHandler(e):i.SegmentList?new s.SegmentListMPDHandler(e):i.SegmentBase?new n.SegmentBaseMPDHandler(e):null}(e,p,h)},e}()},34810:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.throwPlaylistDownloadError=function(e,t,i,s){if(e.logger.debug(t),s instanceof r.PlayerError)e.eventHandler.fireError(s);else if(function(e){return!!e&&Object.keys(n.ErrorCode).includes(e)}(s)){var u=n.ErrorCode[s];e.eventHandler.fireError(new r.PlayerError(u,a(i),t,e.sourceContext.sourceIdentifier))}else s!==o.RequestError.TimedOut?e.eventHandler.fireError(new r.PlayerError(n.ErrorCode.SOURCE_COULD_NOT_LOAD_MANIFEST,a(i),t,e.sourceContext.sourceIdentifier)):e.eventHandler.fireError(new r.PlayerError(n.ErrorCode.NETWORK_MANIFEST_DOWNLOAD_TIMEOUT,a(i),"Failed to load the segment: the request timed out.",e.sourceContext.sourceIdentifier))};var n=i(40306),r=i(3336),o=i(77401);function a(e){return{url:null==e?void 0:e.Uri,mimeType:null==e?void 0:e._mimeType,codecs:null==e?void 0:e._codecs,bitrate:null==e?void 0:e._bandwidth}}},37641:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.SegmentCache=void 0,t.areSegmentsIdentical=o;var n=i(74853),r=i(19541);function o(e,t){return(e.isInitSegment?["url","periodId","byteRange","representationId"]:["url","periodId","byteRange","discontinuitySequenceNumber"]).every(function(i){return"object"==typeof e[i]?(0,r.compareValues)(e[i],t[i]):e[i]===t[i]})}t.SegmentCache=function(){function e(e){this.wH=Math.max(0,e),this.xH=[]}return e.prototype.contains=function(e){return this.xH.some(function(t){return o(e.getSegmentInfo(),t.getSegmentInfo())})},e.prototype.yH=function(e){this.xH=0!==e?this.xH.slice(-e):[]},e.prototype.add=function(e){this.contains(e)||(this.xH.push(e),this.yH(this.wH))},e.prototype.get=function(e){return this.xH.find(function(t){return o(e,t.getSegmentInfo())})},e.prototype.clear=function(){this.yH(0)},e.prototype.remove=function(e){this.xH=this.xH.filter((0,n.invert)(e))},e.prototype.getCapacity=function(){return this.wH},e.prototype.getCachedCount=function(){return this.xH.length},e.prototype.getCachedSegments=function(){return this.xH.slice(0)},e}()},48514:function(e,t){function i(e,t){var i=[];return e.forEach(function(e){return i.push(t(e))}),i}Object.defineProperty(t,"__esModule",{value:!0}),t.SegmentCacheService=void 0,t.SegmentCacheService=function(){function e(){}return e.prototype.updatePlayerContext=function(e){this.Kc=e.segmentPrefetchingService},e.prototype.hasPrefetchedSegment=function(e,t){var i,n=e;return"string"==typeof e&&(n=this.Lc(e,t)),!(!n||"string"==typeof n)&&!!(null==(i=this.Kc)?void 0:i.getPrefetchedSegment(n))},e.prototype.getPrefetchedSegment=function(e,t){var i=this;if(!this.Kc||!e.mimeType)return null;var n=this.Kc.getPrefetchedSegment(e);return this.Kc.clearPrefetchingQueue(e.mimeType),n&&(this.Kc.removePrefetchedSegment(e),this.Kc.setShouldDownloadBeCancelledCallback(e.mimeType,t),n.catch(function(){}).finally(function(){i.Kc&&e.mimeType&&i.Kc.removeShouldDownloadBeCancelledCallback(e.mimeType)})),n},e.prototype.getRepresentationForPrefetchedSegment=function(e){var t,n=null==(t=this.Kc)?void 0:t.getPrefetchedSegments().get(e);if(n)return i(n,function(e){return e.segmentInfo.internalRepresentationId}).find(Boolean)},e.prototype.Lc=function(e,t){var n,r=null==(n=this.Kc)?void 0:n.getPrefetchedSegments().get(e);if(r)return i(r,function(e){return e.segmentInfo}).find(function(e){if(null==(null==t?void 0:t.segmentNumber)||null==(null==t?void 0:t.startTime)||null==(null==t?void 0:t.duration))return!0;var i=t.segmentNumber+1,n=Math.round(t.startTime+t.duration),r=e.segmentNumber===i,o=null!=e.startTime&&Math.round(e.startTime)===n;return r||o})},e.prototype.dispose=function(){this.Kc=void 0},e}()},14443:function(e,t,i){var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},r=this&&this.__spreadArray||function(e,t,i){if(i||2==arguments.length)for(var n,r=0,o=t.length;r<o;r++)!n&&r in t||(n||(n=Array.prototype.slice.call(t,0,r)),n[r]=t[r]);return e.concat(n||Array.prototype.slice.call(t))};
vendor: 4,110 bytes, line 1
1Object.defineProperty(t,"__esModule",{value:!0}),t.SegmentController=void 0,t.getSegmentManager=ei,t.extractContainerFormat=en;var o=i(66790),a=i(40306),s=i(3336),u=i(25926),c=i(4224),l=i(80813),d=i(56481),h=i(3714),p=i(13531),f=i(77401),g=i(98714),m=i(49859),y=i(91678),v=i(46151),S=i(33436),b=i(15971),E=i(93204),T=i(94685),_=i(34047),A=i(85434),P=i(15014),M=i(89927),I=i(23068),R=i(58313),C=i(88052),O=i(62756),D=i(95880),w=i(34795),N=i(13422),L=i(23940),k=i(84696),U=i(3095),x=i(19627),B=i(36193),F=i(44115),H=i(59707),j=i(88935),V=i(39523),W=i(99529),G=i(60729),q=i(49440),K=i(73794),z=i(86219),Y=i(34810),X=i(37641),Q=i(50429),Z=i(65439),J=i(65244),$=i(98892),ee=i(25902);function et(e,t){var i=(0,Z.getSegmentInfoTimeRange)(e),n=(0,W.getTrackIdentifier)(e);i&&(null==t||t.dispatch((0,V.removeStreamTimeRange)(n,i,W.StreamTimeRangeType.Loading)))}function ei(e,t,i,n,r){var o=e.serviceManager.get(l.ServiceName.AdaptationService),a=e.serviceManager.get(l.ServiceName.ManifestService,e.sourceContext.sourceIdentifier),s=function(i,r){var s=!!(null==o?void 0:o.shouldDownloadBeCancelled(t,i,r));return(null==a?void 0:a.isHlsManifest())&&n.possiblyDependentSegments&&s?(e.logger.debug("Download should be cancelled, but this is disabled for segments not starting with key frames"),!1):s};return e.serviceManager.maybeCall(l.ServiceName.SegmentService,function(e){return e.add({mimeType:t,shouldDownloadBeCancelledCallback:s},i,r)})}function en(e){var t=e.split("/")[1].toLowerCase();return Object.values(w.ContainerFormat).find(function(e){return e===t})}function er(e,t){if(e&&(0,T.isContextAvailable)(t))return t.serviceManager.maybeCall(l.ServiceName.ManifestService,function(t){return t.getRepresentationById(e)},void 0,t.sourceContext.sourceIdentifier)}t.SegmentController=function(){function e(e,t,i,n,r,a,s,u){var c=this;this.context=e,this.onDataAvailableCallback=t,this.mimeType=i,this.manifestLoader=a,this.Mc=C.ModuleManager.get(O.ModuleName.HLS,!1),this.Sc={},this.Tc=[],this.hasDownloadError=!1,this.Zc=!1,this.ec=!1,this.fc=!1,this.nc=[],this.Nd=function(e){if((0,T.isContextAvailable)(c.context)){var t="Error obtaining ".concat(c.mimeType," segment info");c.Vc&&c.Vc===e?c.oc.insane(t,e):c.nd(t,e),c.Vc=e}},this.Ud=function(e){c.nd("Error in cancelLoading of segmentLoaderPool ",e)},this.getNext=function(e,t){var i,n=!(null==(i=c.rc)?void 0:i.canLoad())||c.bc||c.hasActiveTransmuxingJobs()||c.fc||c.td();if(c.Qc&&!n){c.nd("Getting next segment for time ".concat(e));var r={periodId:c.Yc,recommendedRepresentationId:t,time:e};c.Kd(r).then(function(e){return c.ld(e)}).catch(c.Nd)}},this.ed=function(e){c.hasDownloadError=!1,c.ad(e);var t=c.bd(e);if(t!==o.SegmentVerificationResult.Drop){if(t!==o.SegmentVerificationResult.Park)if(c.isTransmuxerRequired()){var i=e.getSegmentInfo();i.presentationTimeOffset&&isNaN(i.presentationTimeOffset)&&(c.Pc.setTimestampOffset(0),i.presentationTimeOffset=0),c.Zd(e)}else{var n=!1;c.Qc&&c.rc&&(n=c.Wc.onSegmentAvailable(e,{id3:[],closedCaptions:[]},c.Qc,c.rc)),n||et(e.getSegmentInfo(),c.mc),e.getMimeType().indexOf("mp4")>-1&&!c.Ve()&&(c.Uc=e.isLastSegment())}}else et(e.getSegmentInfo(),c.mc)},this.Oe=function(e,t){var i,n=!!(null==(i=c.kc)?void 0:i.shouldDownloadBeCancelled(c.mimeType,e,t));return c.Ve()&&c.jc.possiblyDependentSegments&&n?(c.nd("Download should be cancelled, but this is disabled for segments not starting with key frames"),!1):n};var d=e.sourceContext.sourceIdentifier;if(this.Yc=s,this.mc=u,this.Nc=e.serviceManager.get(l.ServiceName.ManifestUpdateSchedulingService,d),this.cc=new x.SegmentUnavailabilityHandler(this.context),this.kc=this.context.serviceManager.get(l.ServiceName.AdaptationService),this.lc=this.context.serviceManager.get(l.ServiceName.StreamTimeService),this.jc={isTransmuxingRequired:r&&!this.sc,transmuxer:void 0,possiblyDependentSegments:!1,isAvMuxedTogether:(0,_.isAVMuxedTogether)(n),discardNextSegment:!1,muxedAudioTrackIndex:0},this.kd()){var h=this.jd();this.jc.isTransmuxingRequired=h.source!==h.target}this.Se()}return Object.defineProperty(e.prototype,"oc",{get:function(){return this.context.logger}
1,enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"pc",{get:function(){return this.context.settings},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"qc",{get:function(){return this.context.eventHandler},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"rc",{get:function(){return ei(this.context,this.mimeType,this.Oc,this.jc,this.gc)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"sc",{get:function(){return A.MimeTypeHelper.isSubtitle(this.mimeType)},enumerable:!1,configurable:!0}),e.prototype.tc=function(e){var t,i=this.Ed();if(i){var n=null==(t=this.kc)?void 0:t.getUserSelectedRepresentation(this.mimeType,this.Qc,e);return n?(this.qc.dispatchEvent(i,{representationID:n._internalId.representationId}),n._internalId):void this.qc.dispatchEvent(i,{representationID:e.representationId})}},e.prototype.Ed=function(){return A.MimeTypeHelper.isAudio(this.mimeType)?h.PlayerEvent.AudioAdaptation:A.MimeTypeHelper.isVideo(this.mimeType)?h.PlayerEvent.VideoAdaptation:null},e.prototype.Fd=function(){var e;if(null==(e=this.context.adRestorationOptimizationService)?void 0:e.hasPrefetchedSegment(this.mimeType,this.ac))return this.context.adRestorationOptimizationService.getRepresentationForPrefetchedSegment(this.mimeType)},e.prototype.Gd=function(e){if(!this.Pc.canSwitchRepresentation(e.time)&&this.Rc)return this.Rc;var t=this.Fd();if(t)return t;var i=this.mc.getState(),n=!!i&&!!(0,m.getPreferredBitrate)((0,m.getAdaptationState)(i),this.mimeType),r=this.Hd(),o=e.recommendedRepresentationId,a=(null==o?void 0:o.periodId)===this.getCurrentPeriodId();o&&a&&!n&&(r=o);var s=r?this.tc(r):void 0;return s?(this.ec=!0,s):r},e.prototype.Hd=function(){var e,t,i={hlsDependentSegments:this.jc.possiblyDependentSegments,segmentDuration:this.Pc.getSegmentDuration()};return null==(e=this.kc)?void 0:e.selectRepresentation(this.mimeType,i,null==(t=this.getCurrentAdaptationSet())?void 0:t.Representation)},e.prototype.Id=function(e){var t=this.Rc?this.Rc.representationId:null;this.nd("switching representation from ".concat(t," to ").concat(e.representationId)),this.Pc.setRepresentationId(e),this.Rc=e},e.prototype.invalidateOngoingRequests=function(){this.Zc=!0},e.prototype.Jd=function(e,t){var i,n=er(e,this.context),r=er(t,this.context),o=n?(0,L.representationToQuality)(n,this.mimeType):void 0,a=r?(0,L.representationToQuality)(r,this.mimeType):void 0;if(a){var s={targetQuality:a,targetQualityId:a.id,sourceQuality:o,sourceQualityId:null!=(i=null==o?void 0:o.id)?i:null};A.MimeTypeHelper.isVideo(this.mimeType)?this.context.eventHandler.dispatchEvent(h.PlayerEvent.VideoDownloadQualityChange,s):A.MimeTypeHelper.isAudio(this.mimeType)&&this.context.eventHandler.dispatchEvent(h.PlayerEvent.AudioDownloadQualityChange,s)}},e.prototype.Kd=function(e){var t,i=this,r=void 0!==(null==(t=this.ac)?void 0:t.segmentNumber)?this.ac.segmentNumber+1:0,o=this.Gd(e),u=!o.equals(this.Rc);return u&&A.MimeTypeHelper.isAV(this.mimeType)&&this.Jd(this.Rc,o),this.Zc=!1,this.bc=this.Sd(o).then(function(){return i.Qc&&i.Pc.setAdaptationSetId(i.Qc,o),u&&i.Id(o),i.Pc.getNextSegmentInfo(e.time)}).then(function(e){var t,a=null!=(t=i.Rc)?t:o;if(i.Od(e,r,a),i.Ld(e))throw(0,T.isContextAvailable)(i.context)&&i.nd("invalidating ongoing SegmentInfo request for",n({}
1,e)),"ongoing segment info request was invalidated";return i.ac=e,e}).catch(function(t){var r,u;if(i.bc=void 0,function(e){return e instanceof s.PlayerError?[a.ErrorCode.SOURCE_MANIFEST_INVALID,a.ErrorCode.SOURCE_COULD_NOT_LOAD_MANIFEST].includes(e.code):e===f.RequestError.Failed||e===f.RequestError.TimedOut}(t)){var c=null!=(u=null!=(r=null==t?void 0:t.name)?r:null==t?void 0:t.message)?u:t;i.nd("HLS playlist loading failed for representation ".concat(o.representationId," (").concat(c,")"));var l=i.yd(o);if(l)return i.nd("Trying with lower quality representation ".concat(l.representationId)),i.Kd(n(n({},e),{recommendedRepresentationId:l}));i.zd(o,t)}throw t}).finally(function(){i.dc=void 0}),this.bc},e.prototype.Ld=function(e){return this.Zc&&e&&!e.isInitSegment&&!this.Md(e)},e.prototype.Md=function(e){return void 0!==this.dc&&(0,I.isNumber)(e.startTime)&&(0,I.isNumber)(e.duration)&&this.dc>=e.startTime&&this.dc<=e.startTime+e.duration},e.prototype.getDataSegmentInfo=function(e){var t={periodId:this.Yc,time:e};return this.Rc&&this.Rc.periodId===this.getCurrentPeriodId()?this.Kd(n(n({},t),{recommendedRepresentationId:this.Rc})):this.Kd(t)},e.prototype.Od=function(e,t,i){e&&(this.Pd(e,i),this.Qd(e),this.Rd(i,e),e.duration||e.isInitSegment||(e.duration=this.Pc.getSegmentDuration()),(void 0===e.segmentNumber||isNaN(e.segmentNumber))&&(e.segmentNumber=t),e.discardData=this.jc.discardNextSegment,this.jc.discardNextSegment=!1,this.ec&&(e.preventDownloadCanceling=!0,this.ec=!1))},e.prototype.Pd=function(e,t){var i=er(t,this.context);i&&(e.representationId=t.representationId,e.internalRepresentationId=t,e.mimeType=this.mimeType,e.bitrate=i._bandwidth,e.periodId=t.periodId,e.codecs=this.getCodecs(),A.MimeTypeHelper.isAudio(this.mimeType)?(e.sampleRate=i._audioSamplingRate,e.width=void 0,e.height=void 0):A.MimeTypeHelper.isVideo(this.mimeType)&&(e.width=i._width,e.height=i._height,e.frameRate=i._frameRate))},e.prototype.Qd=function(e){if(A.MimeTypeHelper.isVideo(this.mimeType)&&!e.dateTime&&this.pc.AKAMAI_DATETIME_PARSING&&this.Mc){var t=null!=e.duration?this.Mc.PlaylistUtils.getProgramDateTimeFromSegmentUrl(e.url,e.duration):void 0;t&&(e.dateTime=t)}},e.prototype.Rd=function(e,t){var i=this.context.serviceManager.maybeCall(l.ServiceName.ManifestService,function(t){return t.getAvailableBaseURLsForRepresentation(e)},void 0,this.context.sourceContext.sourceIdentifier);t.availableBaseURLs=i,t.firstUsedBaseURLIndex=0,this.ac&&this.ac.lastUsedBaseURLIndex&&(t.firstUsedBaseURLIndex=this.ac.lastUsedBaseURLIndex),t.lastUsedBaseURLIndex=t.firstUsedBaseURLIndex,this.Ve()?(t.baseURL="",t.mediaURL||(t.mediaURL=t.url)):(t.baseURL=i[t.firstUsedBaseURLIndex],t.mediaURL=t.mediaURL||t.url,delete t.url),t.url=R.URLHelper.concatBaseUrlWithPartial(t.baseURL,t.mediaURL)},e.prototype.Sd=function(e){var t,i,n,r,o=this,a=null!=(i=null==(t=this.Qc)?void 0:t.adaptationSetId)?i:"",s=null==(n=this.mc.getState().activeTracks)?void 0:n[a],u=!(null==(r=null==s?void 0:s.selectedRepresentationId)?void 0:r.equals(e));return this.mc.dispatch((0,B.setRepresentationIdAction)(e)),u?this.Nc?this.Nc.waitForRepUpdate(e).then(function(){return o.Pc.updateRepresentation(e)}):Promise.reject("ManifestUpdateScheduler does not exist."):Promise.resolve()},e.prototype.Td=function(){var e;return this.isTransmuxerRequired()&&!!(null==(e=this.jc.transmuxer)?void 0:e.isTransmuxing())},e.prototype.hasActiveTransmuxingJobs=function(){var e;return!!this.isTransmuxerRequired()&&(this.hasDelayedSegmentsInTransmuxer()||!!(null==(e=this.jc.transmuxer)?void 0:e.hasActiveJobs()))},e.prototype.hasDelayedSegmentsInTransmuxer=function(){var e;return A.MimeTypeHelper.isAudio(this.mimeType)&&this.isTransmuxerRequired()&&!!(null==(e=this.jc.transmuxer)?void 0:e.hasDelayedAudioSegments())},e.prototype.Vd=function(){var e,t,i=this;(null!=(t=null==(e=this.jc.transmuxer)?void 0:e.discardCurrentJobs(this.mimeType))?t:[]).forEach(function(e){return et(e.mp2tsSegment.getSegmentInfo(),i.mc)})},e.prototype.cancelLoading=function(){var e;this.Zc=!0,null==(e=this.rc)||e.cancel().catch(this.Ud)},e.prototype.seekTo=function(e){var t=this;null!==e&&this.Qc&&(this.cancelLoading(),this.Vd(),this.Tc=[],this.hasDownloadError=!1,this.Uc=!1,this.ic&&this.ic.reset(),this.isTransmuxerRequired()&&this.jc.transmuxer&&this.jc.transmuxer.resetCaptionParser(),e>=0&&(this.dc=e,this.Pc.seekTo(e),this.context.serviceManager.maybeCall(l.ServiceName.TimedMetadataService,function(e){return e.clearSegmentBoundMetadata(t.mimeType)})))},e.prototype.Wd=function(e){var t,i=this,n=this.Ye(this.Yc),r=this.context.serviceManager.maybeCall(l.ServiceName.ManifestService,function(e){return e.getMediaPresentationDuration()},0,this.context.sourceContext.sourceIdentifier);if(n&&n.hasOwnProperty("_duration"))t=this.context.serviceManager.maybeCall(l.ServiceName.ManifestService,function(e){return e.getPeriodDuration(i.Yc)},void 0,this.context.sourceContext.sourceIdentifier);else{if(0===r)return!1;t=r}return this.Pc.hasNext(t)},e.prototype.Xd=function(e){var t=this;if(this.context.serviceManager.maybeCall(l.ServiceName.ManifestService,function(e){return e.isAvailabilityEndTimeExceeded()},!1,this.context.sourceContext.sourceIdentifier))return this.oc.log("Stream (".concat(this.mimeType,") availability end time reached, stopping download of further segments.")),this.Uc=!0,!1;this.context.serviceManager.maybeCall(l.ServiceName.ManifestService,function(e){return e.isLastPerio
1d(t.Yc)},!1,this.context.sourceContext.sourceIdentifier)&&this.Pc.resolvePendingSegmentInfoRequests();var i=this.context.serviceManager.maybeCall(l.ServiceName.ManifestService,function(e){return e.getPeriodDuration(t.Yc)},void 0,this.context.sourceContext.sourceIdentifier);return this.Pc.hasNext(i)},e.prototype.hasNext=function(e){var t=this,i=this.context.serviceManager.maybeCall(l.ServiceName.ManifestService,function(e){return e.isLastPeriod(t.Yc)},!1,this.context.sourceContext.sourceIdentifier);return!(this.Uc&&i||!this.Qc||!this.Pc)&&(this.Xe()?this.Xd(e):this.Wd(e))},e.prototype.Yd=function(e){var t=this;if(e.transmuxedSegments.every(function(e){return null!==e.getCodec()})){!this.jc.possiblyDependentSegments&&function(e){return e.transmuxedSegments.some(function(e){return A.MimeTypeHelper.isAV(e.getMimeType())&&!e.isIndependentlyDecodable()})}(e)&&(this.nd("Encountered HLS segment not starting with a key frame"),this.jc.possiblyDependentSegments=!0);var i=e.transmuxedSegments.find(function(e){return"video/mp4"===e.getMimeType()}),n=e.transmuxedSegments.filter(function(e){return"audio/mp4"===e.getMimeType()}),r=[i,n[this.jc.muxedAudioTrackIndex]||n[0]].filter(function(e){return!!e});r.forEach(function(e){return t.Xc.maybeAdjustTimestampOffsetAtDiscontinuityChange(e,t.Pc)}),this.rc&&this.Qc&&this.Wc.onMuxedSegmentAvailable(e,r,this.Qc,this.rc);var o=r[r.length-1];o&&o.getMimeType().indexOf("mp4")>-1&&(this.Uc=o.isLastSegment()),this.nd("Transmuxing done",e.originalSegment.getUrl())}else{var a=e.originalSegment.getUrl();this.nd("Discarding muxing because codecs were not available in the segment: ".concat(a))}},e.prototype.hasPendingSegments=function(e){var t,i,n,r,o,a;return e?(o=this.isTransmuxerRequired()&&!!this.jc.transmuxer&&this.jc.transmuxer.isTransmuxingSegmentsForPeriod(e),a=null!=(i=null==(t=this.rc)?void 0:t.isLoading(e))&&i):(o=this.Td(),a=null!=(r=null==(n=this.rc)?void 0:n.isLoading())&&r),a||o||this.fc||!!this.bc},e.prototype.Zd=function(e){var t=this;if(this.jc.transmuxer){var i=e.getSegmentInfo();this.jc.transmuxer.isSetupForDiscontinuity(i.discontinuitySequenceNumber)||(void 0===i.startTime&&(this.nd("resetting segment playback times for new initialization"),this.mc.dispatch((0,H.resetSegmentPlaybackTimes)())),(0,K.initializeHlsSegmentStartTimes)(e,this.context,this.Pc));var n=Date.now();this.jc.transmuxer.transmuxSegment(e).then(function(e){var r,o=(0,M.toSeconds)(Date.now()-n),a={time:o,representationId:i.internalRepresentationId};return t.context.store.dispatch((0,y.addMetricsValue)(t.mimeType,S.MetricType.TransmuxingTime,a)),t.context.logger.debug("Transmuxed ".concat(t.mimeType," segment in: ").concat(null==o?void 0:o.toFixed(2),", quality: ").concat(null!=(r=i.representationId)?r:"")),t.Yd(e)}).catch(function(i){et(e.getSegmentInfo(),t.mc),i!==o.TransmuxingRejectionReason.TRANSMUXING_ABORTED?t.hd(e,"Transmuxing failed: ".concat(i)):t.nd(i,e.getUrl())})}},e.prototype.ad=function(e){var t,i;
vendor: 5,736 bytes, line 1
1if(!this.kd()||this.fd(e)){var n=(0,q.resolveContainerFormat)(this.mimeType,e,this.Ve());this.nd("Container format is ".concat(null==n?void 0:n.source)),n&&this.mc.dispatch((0,B.setContainerFormatAction)(e.getRepresentationId(),n)),this.jc.isTransmuxingRequired=!!(n&&n.source!==n.target),!this.jc.isTransmuxingRequired&&A.MimeTypeHelper.isAV(this.mimeType)&&(null==(t=this.jc.transmuxer)||t.dispose(),this.context.serviceManager.maybeCall(l.ServiceName.SubtitleService,function(e){e.setTransmuxer(void 0)},void 0,null==(i=this.context.sourceContext)?void 0:i.sourceIdentifier))}},e.prototype.bd=function(e){if(this.fd(e))return this.nd("Warning: Loaded segment has size 0 bytes, skipping further processing! May cause gap!",e.getUrl()),null==(t=this.ic)||t.reset(),o.SegmentVerificationResult.Drop;if(this.isTransmuxerRequired()){if(!C.ModuleManager.has(O.ModuleName.ContainerTS))return this.context.eventHandler.fireError(new D.PlayerModuleMissingError(O.ModuleName.ContainerTS)),o.SegmentVerificationResult.Drop}else if(!this.We()&&this.gd(e)){if(this.context.settings.DROP_INVALID_SEGMENTS)return this.hd(e,"The loaded MP4 segment is invalid, skipping further processing! May cause gap!"),o.SegmentVerificationResult.Drop;this.hd(e,"The loaded MP4 segment is invalid. This may cause playback issues!")}var t,i=C.ModuleManager.get(O.ModuleName.LowLatency,!1),n=this.context.serviceManager.get(l.ServiceName.ManifestService,this.context.sourceContext.sourceIdentifier);if((0,G.isPlayingLowLatencyHls)(this.context)&&i&&n){var r=i.verifyLlHlsSegment(e,n);if(r===o.SegmentVerificationResult.Drop)return this.nd("LL-HLS Segment Verification: Dropping (partial) segment as it disappeared from playlist",e.getUrl()),o.SegmentVerificationResult.Drop;if(r===o.SegmentVerificationResult.Park)return this.cd(e),o.SegmentVerificationResult.Park}return o.SegmentVerificationResult.Publish},e.prototype.cd=function(e){var t=this,i=(0,E.subscribe)(this.mc)(function(t){var i;if(t.manifest)return null==(i=(0,P.findRepresentation)(t.manifest,e.getRepresentationId()))?void 0:i._requestTimestamp},function(){i(),t.dd(i),t.ed(e)},function(e,t){return e!==t});this.nc.push(i)},e.prototype.dd=function(e){var t=this.nc.findIndex(function(t){return t===e});t>-1&&this.nc.splice(t,1)},e.prototype.fd=function(e){var t=e.getData();return!!(t&&t.byteLength<1)},e.prototype.gd=function(e){if(!C.ModuleManager.has(O.ModuleName.ContainerMP4)||!A.MimeTypeHelper.isAV(this.mimeType))return!1;var t=C.ModuleManager.get(O.ModuleName.ContainerMP4,!1),i=t.isValidMp4,n=t.MP4Parser;return this.Oc instanceof n&&!i(e)},e.prototype.hd=function(e,t){this.qc.dispatchEvent(h.PlayerEvent.Warning,new u.PlayerWarning(c.WarningCode.PLAYBACK_INVALID_DATA_SEGMENT_ENCOUNTERED,t,{mimeType:e.getMimeType(),segmentUrl:e.getUrl()}))},e.prototype.jd=function(){var e=this.mc.getState();return e&&(0,F.getContainerFormat)(e,A.MimeTypeHelper.getMediaType(this.mimeType))},e.prototype.kd=function(){return!!this.jd()},e.prototype.ld=function(e){var t=this;return this.bc=void 0,this.fc=!0,e?(this.Tc.push(e),this.Vc=void 0,this.md(e),this.od(e).catch(function(i){return t.rd(i,e)}).finally(function(){return t.fc=!1})):Promise.resolve()},e.prototype.md=function(e){var t=this.getInitSegmentInfoForDataSegmentInfo(e);t&&(e.init=t)},e.prototype.nd=function(e){for(var t,i,n,o=[],a=1;a<arguments.length;a++)o[a-1]=arguments[a];(null==(i=this.oc)?void 0:i.isLevelEnabled(p.LogLevel.DEBUG))&&(t=this.oc).debug.apply(t,r(["[".concat(this.mimeType,"][").concat(null==(n=this.Rc)?void 0:n.representationId,"] SegmentController: ").concat(e)],o,!1))},e.prototype.od=function(e){var t;return(null==(t=this.oc)?void 0:t.isLevelEnabled(p.LogLevel.DEBUG))&&this.nd("Loading ".concat(JSON.stringify(e))),this.pd(e)},e.prototype.getInitSegmentInfoForDataSegmentInfo=function(e){var t;return(t=e.init?n(n({},e.init),{isInitSegment:!0,internalRepresentationId:e.internalRepresentationId}):this.Pc.getInitSegmentInfo(e.internalRepresentationId))&&this.Od(t,void 0,e.internalRepresentationId),t},e.prototype.pd=function(e){var t=this;return this.rc?this.rc.getSegment(e).then(function(e){return t.qd(e)}):Promise.reject()},e.prototype.qd=function(e){var t=this;return new Promise(function(i,n){e.transform(function(e){!function(e,t){var i=t.findIndex(function(t){return(0,X.areSegmentsIdentical)(t,e)});i>-1&&t.splice(i,1)}(e.getSegmentInfo(),t.Tc),t.ed(e)},function(){return i()},function(e){var i=e.message,r={reason:i};return n(r),r.reason!==J.SegmentLoadingErrorReason.CANCEL&&t.nd("Error loading segment",i),i})})},e.prototype.rd=function(e,t){null==(i=(0,b.getSourceStore)(this.context))||i.dispatch((0,g.clearPreferredBitrateForMimeTypeAction)(this.mimeType)),et(t,this.mc);var i,n=(null==e?void 0:e.info)?e.info.response.status:0;switch(null==e?void 0:e.reason){case J.SegmentLoadingErrorReason.CANCEL:this.nd("Download was cancelled as the segment is probably outdated");break;case J.SegmentLoadingErrorReason.ERROR_DECRYPTING:this.nd("Could not decrypt segment",t.url),this.qc.dispatchEvent(h.PlayerEvent.Warning,new u.PlayerWarning(c.WarningCode.DRM_COULD_NOT_DECRYPT_SEGMENT));break;case J.SegmentLoadingErrorReason.ERROR_LOADING:this.vd(n,t,J.SegmentLoadingErrorReason.ERROR_LOADING);break;case J.SegmentLoadingErrorReason.TIMEOUT:this.vd(n,t,J.SegmentLoadingErrorReason.TIMEOUT);break;case J.SegmentLoadingErrorReason.ABR_TIMEOUT:this.Dd(t);break;default:this.nd("Unexpected error while loading the segment",{url:t.url,error:e})}},e.prototype.sd=function(e,t){var i=this;return this.Mc&&this.manifestLoader instanceof this.Mc.M3u8Loader?this.manifestLoader.switchToBackupStream(e,t).then(function(e){return e.length>0}).catch(function(e){return i.nd("Could not switch to HLS backup stream
1: ".concat(e)),Promise.resolve(!1)}):Promise.resolve(!1)},e.prototype.td=function(){return!!(this.Mc&&this.manifestLoader instanceof this.Mc.M3u8Loader)&&this.manifestLoader.isSwitchingToBackupStreams()},e.prototype.ud=function(){var e=this.pc.CHUNKED_CMAF_STREAMING?1:this.Tc.length;return this.Pc.getIndex()-e},e.prototype.vd=function(e,t,i){(null==t?void 0:t.isPreloadHint)?this.nd("Ignoring download error of preload hint segment.",t.url):(this.nd("Failed to load segment (code: ".concat(e,") ").concat(t.url)),this.cc.shouldTryAlternatives(e)?this.wd(t,e,i):(this.Bd(t),this.hasDownloadError=!0))},e.prototype.wd=function(e,t,i){var n=this;if(this.Rc&&this.Rc.equals(e.internalRepresentationId)){var r=this.context.serviceManager.maybeCall(l.ServiceName.ManifestService,function(e){return n.Qc&&e.getRepresentation(n.Qc,n.Rc.representationId)},null,this.context.sourceContext.sourceIdentifier);if(r){var o=!1;this.sd(r,e).then(function(e){return o=e}).then(function(){var e;return null==(e=n.rc)?void 0:e.cancel()}).then(function(){return n.xd(o,e,t,i)})}}else this.nd("Ignoring download error of previous representation.")},e.prototype.xd=function(e,t,i,n){var r,o=this.ud();if(this.Tc=[],e)this.Pc.setIndex(Math.max(0,o));else if(r=this.cc.switchBaseURL(t))this.context.logger.debug("Switching ".concat(this.mimeType," segment location to ").concat(r.baseURL)),this.ld(r);else{var a=this.yd(this.Rc);if(a){if(this.lc){this.Pc.setIndex(Math.max(0,o)),this.nd("Trying with lower quality segment ".concat(a.representationId));var s=this.lc.getTimeForNextSegment((0,W.getTrackIdentifier)(t)),u=this.Pc.getLatestTimeForPossibleSwitch(s);this.getNext(u,a)}}else this.hasDownloadError=!0,this.Ad(t,i,n)}},e.prototype.yd=function(e){var t,i,n;if(e&&(null==(t=this.kc)?void 0:t.isAuto(this.mimeType))){var r=null!=(n=null==(i=this.Ze(this.Qc))?void 0:i.Representation)?n:[];return this.cc.switchQuality(r,e)}},e.prototype.zd=function(e,t){var i;if(this.Xe()&&this.pc.INFINITE_RETRIES_FOR_LIVE){this.nd("Could not load any segment of any quality from any CDN: restart retries."),this.cc.downloadSuccess(!1);var n=er(this.Rc,this.context);n&&(this.mc.dispatch((0,H.updateRepresentationFailedDownloadAction)(n._internalId,null)),null==(i=this.Nc)||i.scheduleRepresentationUpdate(n))}else{var r=er(e,this.context);(0,Y.throwPlaylistDownloadError)(this.context,"Could not load segments of any quality from any CDN",r,t)}},e.prototype.Ad=function(e,t,i){this.Bd(e),this.Xe()&&this.pc.INFINITE_RETRIES_FOR_LIVE?(this.nd("Could not load current segment of any quality from any CDN (all retries failed), skipping it..."),this.Cd(e)):(0,Q.throwDownloadError)(this.context,"Segment not available at any quality or location",t,e,i)},e.prototype.Bd=function(e){var t,i=(0,Z.getSegmentInfoTimeRange)(e);if(i&&(0,T.isContextAvailable)(this.context)&&e.mimeType){var n=(0,W.getTrackIdentifier)(e);null==(t=(0,b.getSourceStore)(this.context))||t.dispatch((0,V.addStreamTimeRange)(n,i,W.StreamTimeRangeType.Failed))}},e.prototype.Cd=function(e){if(this.cc.downloadSuccess(!1),e.hasDownloadFailed=!0,null!=e.startTime&&null!=e.duration){var t=e.startTime+e.duration,i=this.Pc.adjustTimeToNextSegmentStart(t);this.getNext(i)}},e.prototype.Dd=function(e){var t,i=this;(0,T.isContextAvailable)(this.context)&&(this.nd("Download took too long, cancelled it",e.url),!e.isInitSegment&&this.Pc&&(null==(t=this.rc)||t.cancel().then(function(){if(i.Pc){var e=i.ud();i.Tc=[],i.nd("Trying to get the same segment with a lower bitrate."),i.Pc.setIndex(Math.max(0,e))}})))},e.prototype.Pe=function(e,t,i){var n=this;if(void 0===i&&(i=!1),this.sc&&!(null==t?void 0:t.id))return this.gc=t,void(this.rc&&this.cancelLoading());var r=this.context.serviceManager.maybeCall(l.ServiceName.ManifestService,function(r){return r.findAdaptationSet(e,n.mimeType,t,i)},null,this.context.sourceContext.sourceIdentifier);return r?(this.gc=this.context.serviceManager.maybeCall(l.ServiceName.ManifestService,function(e){return e.getLangObjectFromAdaptationSet(r,n.mimeType)},void 0,this.context.sourceContext.sourceIdentifier),r._internalId):void 0},e.prototype.getCurrentAdaptationSet=function(){return this.Ze(this.Qc)}
1,e.prototype.getAdaptationSetForPeriodId=function(e){return this.Ze(this.Sc[e])||this.getCurrentAdaptationSet()},e.prototype.updateMpd=function(){this.nd("Caught a manifest update event");var e,t=!this.Ye(this.Yc);for(var i in this.Qc=this.Pe(this.Yc,this.gc,!1),!t&&this.Qc&&(this.Sc[this.Yc]=this.Qc,null==(e=this.kc)||e.setAdaptationSetId(this.mimeType,this.Qc),this.Pc.setAdaptationSetId(this.Qc,this.Rc,{isPeriodSwitch:!1,isManifestUpdate:!0})),this.Sc)this.Ye(i)||delete this.Sc[i]},e.prototype.activateSubtitleSegmentController=function(e){var t;this.sc&&(this.Qc&&(this.Pc.setAdaptationSetId(this.Qc),null==(t=this.kc)||t.setAdaptationSetId(this.mimeType,this.Qc)),isNaN(this.Pc.getTimestampOffset())&&this.Pc.setTimestampOffset(0),this.seekTo(e))},e.prototype.setCurrentLangObj=function(e){var t;if(this.jc.isAvMuxedTogether&&A.MimeTypeHelper.isVideo(this.mimeType)){var i=this.Ze(this.Qc);if(null==i?void 0:i.ContentComponent){var n=i.ContentComponent.find(function(t){return"audio"===t._contentType&&t._id===e.id});if(n)return this.jc.muxedAudioTrackIndex=i.ContentComponent.filter(function(e){return"audio"===e._contentType}).indexOf(n),void(this.gc=e)}}e.id!==(null==(t=this.gc)?void 0:t.id)&&this.Qe(e)},e.prototype.Qe=function(e){var t=this.Qc;
1if(this.Qc&&this.mc.dispatch((0,B.removeActiveTrackAction)(this.Qc)),this.Qc=this.Pe(this.Yc,e),this.Qc){var i=this.Ze(this.Qc);i&&this.mc.dispatch((0,B.setMediaTypeAction)(i._internalId,(0,k.resolveMediaTypes)(i))),this.Sc[this.Yc]=this.Qc,t&&!this.Qc.equals(t)&&this.Re(e)}},e.prototype.Re=function(e){var t,i;this.gc=e,this.hc=e,this.nd("Trying to set language to ID ".concat(this.gc.id)+" (lang: ".concat(this.gc.lang,") for mpd handler and adaption handler")),this.Qc&&(this.Pc.setAdaptationSetId(this.Qc),null==(t=this.kc)||t.setAdaptationSetId(this.mimeType,this.Qc),null==(i=this.kc)||i.selectRepresentation(this.mimeType))},e.prototype.getCurrentLangObj=function(){return this.gc},e.prototype.stop=function(){var e,t;this.cancelLoading(),null==(e=this.rc)||e.clearCache(),null==(t=this.kc)||t.shutdown(this.mimeType)},e.prototype.Se=function(){var e,t,i=this,n=this.context.serviceManager.maybeCall(l.ServiceName.ManifestService,function(e){return e.getFirstPeriod()},void 0,this.context.sourceContext.sourceIdentifier);!this.Yc&&n&&(this.Yc=n._id);var r=z.MPDHandlerFactory.createInstance(this.context,this.mimeType,this.manifestLoader,this.Y
1c);if(r){this.Pc=r;var o,u=en(this.mimeType);u&&(o=(0,U.createSegmentParser)(this.context,u)),o?this.Oc=o:this.nd("Could not create segment parser for mime type"),this.Xc=new ee.TimestampOffsetService(this.context,this.mimeType),this.Wc=new $.SegmentPreProcessor(this.context,this.mimeType,this.onDataAvailableCallback,this.jc,this.cc,this.Xc,this.Oc),this.Wc.setMpdHandler(this.Pc),this.hasDownloadError=!1,this.Qc=this.Pe(this.Yc,this.gc),this.Qc&&(this.Sc[this.Yc]=this.Qc),this.context.serviceManager.maybeCall(l.ServiceName.SegmentService,function(e){return e.add({mimeType:i.mimeType,shouldDownloadBeCancelledCallback:i.Oe},i.Oc,i.gc)}),this.Ve()&&(this.ic=new this.Mc.HlsTimelineTracker(this.context,this.pc.GAP_TOLERANCE),this.Wc.setHlsTimelineTracker(this.ic)),A.MimeTypeHelper.isMP4(this.mimeType)&&this.context.serviceManager.maybeCall(l.ServiceName.SubtitleService,function(e){e.setupCea608CaptionExtractor(i.context.logger)},void 0,null==(e=this.context.sourceContext)?void 0:e.sourceIdentifier),this.Qc&&(null==(t=this.kc)||t.setAdaptationSetId(this.mimeType,this.Qc),this.Pc.setAdaptationSetId(this.Qc,void 0,{isPeriodSwitch:!0}),this.Xe()&&!this.pc.ENABLE_SEEK_FOR_LIVE&&this.Pc.timeShift(0,this.Yc)),this.Uc=!1}else this.qc.fireError(new s.PlayerError(a.ErrorCode.SOURCE_MANIFEST_INVALID,void 0,"Could not create an MPD handler for the given source.",this.context.sourceContext.sourceIdentifier))},e.prototype.getSegmentInfos=function(){var e,t=this,i=null==(e=this.context.serviceManager.maybeCall(l.ServiceName.ManifestService,function(e){return e.getAvailableBaseURLsForRepresentation(t.Rc)},null,this.context.sourceContext.sourceIdentifier))?void 0:e[0];return this.Pc.getSegmentInfos(i)},e.prototype.getCurrentPeriodId=function(){return this.Yc},e.prototype.Te=function(e){var t=this;return this.hc&&this.context.serviceManager.maybeCall(l.ServiceName.ManifestService,function(i){return i.isLanguageAvailable(e,t.mimeType,t.hc)},!1,this.context.sourceContext.sourceIdentifier)?this.hc:this.gc},e.prototype.switchPeriod=function(e){var t,i,n,r=this,o=this.Te(e);if(this.nd("switching period from ".concat(this.Yc," to ").concat(e)),this.cancelLoading(),null==(t=this.rc)||t.clearCache(),this.Ue(),this.Yc=e,this.Rc=void 0,this.Qc=this.Pe(e,o,!0),this.Qc&&(this.Sc[e]=this.Qc),this.Qc){null==(i=this.kc)||i.setAdaptationSetId(this.mimeType,this.Qc);var u=this.Pc.getPendingSegmentInfoRequest(),c=z.MPDHandlerFactory.createInstance(this.context,this.mimeType,this.manifestLoader,e,o);c?(this.Pc.dispose(),this.Pc=c):this.qc.fireError(new s.PlayerError(a.ErrorCode.SOURCE_MANIFEST_INVALID)),this.Wc.setMpdHandler(this.Pc),this.Pc.setPendingSegmentInfoRequest(u),this.Pc.setAdaptationSetId(this.Qc,void 0,{isPeriodSwitch:!0})}if(this.isTransmuxerRequired()){var d=this.context.serviceManager.maybeCall(l.ServiceName.ManifestService,function(e){return r.Qc&&e.findDownloadedHlsRepresentation(r.Qc)},null,this.context.sourceContext.sourceIdentifier);d&&this.Pc.setRepresentationId(d._internalId),this.ic&&this.ic.reset(),null==(n=this.rc)||n.clearCache(!1)}this.hasDownloadError=!1,this.Uc=!1},e.prototype.getMPDHandler=function(){return this.Pc},e.prototype.getIndex=function(){return this.Pc&&this.Pc.getIndex()||0},e.prototype.getSourceBufferTypes=function(){var e=[];return this.isTransmuxerRequired()&&this.jc.isAvMuxedTogether?(e.push("video/mp4"),e.push("audio/mp4")):e.push(this.mimeType),e},e.prototype.getCodecs=function(){var e,t=this.getCurrentAdaptationSet();return null!=(e=t&&(0,N.getCodecsFromAdaptationSet)(t))?e:void 0},e.prototype.getLiveEdgeTime=function(){return this.Xe()?this.Pc.getLiveEdgeTime():-1},e.prototype.setAdaptionLogicStartupPhase=function(){var e;null==(e=this.kc)||e.setStartupPhase(this.mimeType)},e.prototype.getMimeType=function(){return this.mimeType},e.prototype.Ue=function(){var e=this,t=this.context.store.getState(),i=t?(0,v.getMetricsState)(t):void 0;if(this.rc&&i){var n=this.mc.getState(),r=n?(0,j.getPlayingPeriodId)(n):void 0;this.rc.removeCachedInitSegments(function(t){return e.context.serviceManager.maybeCall(l.ServiceName.ManifestService,function(e){return e.isPrecedingPerio
vendor: 8,405 bytes, line 1
1d(r,t.getPeriodId())},!1,e.context.sourceContext.sourceIdentifier)}),((0,v.getMetricsHistory)(i,this.mimeType,S.MetricType.CachedInitSegments)||[]).filter(function(t){var i=t.value.internalRepId.periodId;return e.context.serviceManager.maybeCall(l.ServiceName.ManifestService,function(e){return e.isPrecedingPeriod(r,i)},!1,e.context.sourceContext.sourceIdentifier)}).forEach(function(t){return e.context.store.dispatch((0,y.removeMetricsValue)(e.mimeType,S.MetricType.CachedInitSegments,t))})}},e.prototype.canLoad=function(){var e;return!!(null==(e=this.rc)?void 0:e.canLoad())},e.prototype.isTransmuxerRequired=function(){return this.jc.isTransmuxingRequired},e.prototype.setTransmuxer=function(e){this.jc.transmuxer=e},e.prototype.getTransmuxer=function(){return this.jc.transmuxer},e.prototype.resetTransmuxer=function(){this.jc.transmuxer&&this.jc.transmuxer.reset()},e.prototype.Ve=function(){return this.context.serviceManager.maybeCall(l.ServiceName.ManifestService,function(e){return e.isHlsManifest()},!1,this.context.sourceContext.sourceIdentifier)},e.prototype.We=function(){return this.context.serviceManager.maybeCall(l.ServiceName.ManifestService,function(e){return e.isSmoothManifest()},!1,this.context.sourceContext.sourceIdentifier)},e.prototype.Xe=function(){return this.context.serviceManager.maybeCall(l.ServiceName.ManifestService,function(e){return e.isLive()},!1,this.context.sourceContext.sourceIdentifier)},e.prototype.Ye=function(e){return this.context.serviceManager.maybeCall(l.ServiceName.ManifestService,function(t){return t.findPeriod(e)},null,this.context.sourceContext.sourceIdentifier)},e.prototype.Ze=function(e){return this.context.serviceManager.maybeCall(l.ServiceName.ManifestService,function(t){return t.getAdaptationSet(e)},null,this.context.sourceContext.sourceIdentifier)},e.prototype.dispose=function(){var e,t;(0,d.dispose)(this.Pc),(0,d.dispose)(this.Xc),(0,d.dispose)(this.Wc),null==(e=this.kc)||e.release(this.mimeType),this.ic&&this.ic.dispose(),(0,T.isContextAvailable)(this.context)&&(null==(t=this.context.serviceManager.get(l.ServiceName.SegmentService))||t.disposeOfType(this.mimeType,this.gc)),this.nc.forEach(function(e){return e()})},e}()},50429:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.throwDownloadError=function(e,t,i,l,d){e.eventHandler.dispatchEvent(s.PlayerEvent.Warning,new o.PlayerWarning(a.WarningCode.PLAYBACK_DECODE_RETRIES_EXCEEDED)),e.eventHandler.fireError(function(e,t,i,o,a){var s=e.sourceContext.sourceIdentifier;if(0===i)return t&&t===u.RequestError.TimedOut||a===c.SegmentLoadingErrorReason.TIMEOUT?new r.PlayerError(n.ErrorCode.NETWORK_SEGMENT_DOWNLOAD_TIMEOUT,{segmentUrl:o.url,mimeType:o.mimeType},"Failed to load the segment: the request timed out.",s):new r.PlayerError(n.ErrorCode.NETWORK_ERROR,{url:o.url,statusCode:i},t,s);e.logger.debug(t);var l={message:t};return o.url&&(l.segment=function(e){return{url:e.url,mimeType:e.mimeType,codecs:e.codecs}}(o)),a===c.SegmentLoadingErrorReason.TIMEOUT?new r.PlayerError(n.ErrorCode.NETWORK_SEGMENT_DOWNLOAD_TIMEOUT,l,t,s):new r.PlayerError(n.ErrorCode.NETWORK_ERROR,l,t,s)}(e,t,i,l,d))};var n=i(40306),r=i(3336),o=i(25926),a=i(4224),s=i(3714),u=i(77401),c=i(65244)},77286:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.SegmentInfoProvider=void 0;var n=i(58313),r=i(90919);t.SegmentInfoProvider=function(){function e(){}return e.findSegmentInfoOfRepresentation=function(t,i){if(i.SegmentList){var n=i.SegmentList[0].SegmentURL,r=t.getUrl(),o=n.find(function(t){return e.getSegmentInfoUrl(t,i)===r});if(o)return o}return null},e.findHlsRepresentationForSegment=function(e,t){var i,n,o=t.Representation.find(function(t){return e.getRepresentationId().representationId===t._internalId.representationId});if(o){var a=(0,r.findSegmentUrlIndexWithinSegmentList)(e.getSegmentInfo(),null!=(n=null==(i=o.SegmentList)?void 0:i[0].SegmentURL)?n:[]);if(-1!==a)return{representation:o,index:a}}},e.getSegmentInfoUrl=function(e,t){var i=e._media;return n.URLHelper.isUrlAbsolute(i)||(i=n.URLHelper.concatUrlParts(t.BaseURL[0],i)),i},e}()},25248:function(e,t,i){var n=this&&this.__spreadArray||function(e,t,i){if(i||2==arguments.length)for(var n,r=0,o=t.length;r<o;r++)!n&&r in t||(n||(n=Array.prototype.slice.call(t,0,r)),n[r]=t[r]);return e.concat(n||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.SegmentInfoService=void 0,t.getSegmentInfoId=function(e){return e.url+(e.byteRange?","+JSON.stringify(e.byteRange):"")};var r=i(80813),o=i(94685);function a(e,t,i){void 0===i&&(i=[]);var n=i[i.length-1],r=n?n.startTime+n.duration:0;return t<=0||!e.hasNext(r)?Promise.resolve(i):e.getDataSegmentInfo(r).then(function(n){return n.duration&&(t-=n.duration),i.push(n),a(e,t,i)})}t.SegmentInfoService=function(){function e(){this.be=[]}return e.prototype.updatePlayerContext=function(e){this.ae=e},e.prototype.setSegmentControllers=function(e){this.be=e},e.prototype.getSegmentControllerMimeTypes=function(){return this.be.map(function(e){return e.getMimeType()})},e.prototype.getSegmentInfos=function(e,t){if(!(0,o.isContextAvailable)(this.ae))return Promise.resolve([]);var i=this.ae.serviceManager.get(r.ServiceName.ManifestService,this.ae.sourceContext.sourceIdentifier).getPeriodIdForTime(e);return Promise.all(this.be.map(function(r){return function(e,t){return e.getCurrentPeriodId()!==t.targetPeriodId&&e.switchPeriod(t.targetPeriodId),e.seekTo(t.startTime),e.getCurrentAdaptationSet()?function(e,t){return a(e,t.duration).then(function(t){if(t.length>0){var i=e.getInitSegmentInfoForDataSegmentInfo(t[0]);if(i)return n([i],t,!0)}return t})}(e,t):Promise.resolve([])}(r,{startTime:e,duration:t,targetPeriodId:i})})).then(function(e){return e.flatMap(function(e){return e})})},e.prototype.dispose=function(){this.be=[]},e}()},65439:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.isSegmentTiming=function(e){return"startTime"in e&&(0,n.isNumber)(e.startTime)&&"duration"in e&&(0,n.isNumber)(e.duration)},t.findSegmentIndexForTime=function(e,t,i){var n=!e||!e.length,o=t<e[0].startTime+e[0].duration;if(n||o)return 0;var a=e.length-1;if(t>=e[a].startTime)return a;var s=Math.min(Math.floor(Math.max(t-e[0].startTime,0)/i),e.length-1);return r(e[0])&&r(e[s])?function(e,t,i){for(;e[i]&&e[i].startTime>t;)i--;for(;e[i]&&e[i].startTime+e[i].duration<=t;)i++;return Math.min(i=Math.max(i,0),e.length-1)}(e,t,s):null},t.createInitSegmentInfoBase=function(e){var t=e._internalId;return{internalRepresentationId:t,representationId:t.representationId,periodId:t.periodId,mimeType:e._mimeType,isInitSegment:!0}},t.getSegmentInfoTimeRange=function(e){if((null==e?void 0:e.duration)&&void 0!==(null==e?void 0:e.startTime))return{start:e.startTime,end:e.startTime+e.duration}};var n=i(23068);function r(e){return e&&(0,n.isNumber)(e.startTime)}},63066:function(e,t,i){var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.SegmentListMPDHandler=t.PHANTOM_SEGMENT_URL=void 0,t.assignSegmentStartTimesFromHlsRepresentation=b,t.copyPropValues=_,t.getMatchingPart=A;var r=i(66790),o=i(80813),a=i(77179),s=i(20649),u=i(74853),c=i(52424),l=i(89927),d=i(23068),h=i(88052),p=i(62756),f=i(50827),g=i(72498),m=i(60729),y=i(54053),v=i(65439);function S(e,t){var i=e[String(t)];return i&&i.startTime>0?i.startTime:(i=e[String(t-1)])&&i.endTime>0?i.endTime:null}function b(e,t,i){var n;e.length&&i.hasSegmentStartTimeForHlsRepresentation(t)&&(null!=e[0].startTime?n=(0,u.findIndexFromEnd)(e,function(e){return null!=e.startTime})+1:(e[0].startTime=i.getStartTimeForHlsSegment(t,e[0]),n=1),(0,u.forEachFromIndex)(e,n,function(e,t){return t.startTime=e.startTime+e.duration}))}function E(e){return e.url.endsWith(t.PHANTOM_SEGMENT_URL)}function T(e,i){var n=i.duration-e.duration;return _(i,e,["url","mediaURL","duration","parts","init","key","discontinuitySequenceNumber","isDiscontinuityStart"]),e.url.endsWith(t.PHANTOM_SEGMENT_URL)||(e.url=(0,s.forceReallocation)(e.url)),n}function _(e,t,i){i.forEach(function(i){return t[i]=e[i]})}function A(e,t,i){var n,r=null==(n=e.parts)?void 0:n.every(v.isSegmentTiming);if(e.parts&&r){var o=e.parts,a=o.reduce(function(e,t){return e+t.duration}
1,0)/o.length,s=(0,v.findSegmentIndexForTime)(o,t,a);if(null!=s)return i?e.parts[0]:(s=P(t,s,o),e.parts[s])}}function P(e,t,i){var n=i[t],r=n.startTime+n.duration;return Math.abs(e-n.startTime)<=Math.abs(e-r)?t:t+1}t.PHANTOM_SEGMENT_URL="PHANTOM-SEGMENT",t.SegmentListMPDHandler=function(){function e(e){this.ce=e,this.de=e.sourceContext,this.fe=e.settings,this.ee=e.logger,this.le=e.serviceManager.get(o.ServiceName.ManifestService,this.de.sourceIdentifier),this.ke=0,this.ne={},this.me=NaN}return Object.defineProperty(e.prototype,"oe",{get:function(){return this.ce.serviceManager.get(o.ServiceName.PlayerStateService)},enumerable:!1,configurable:!0}),e.prototype.pe=function(e,t){if(!e)return null;var i,o={isInitSegment:!1,url:e._media,duration:e._duration,internalRepresentationId:t,periodId:t.periodId};if(e._key&&e._key.method!==r.HlsEncryptionMethod.NONE&&(o.key=e._key),void 0!==e._playbackTime&&(o.startTime=e._playbackTime),e._dateTime&&(o.dateTime=e._dateTime),e._metadata&&(o.metadata=e._metadata),e._byteRange&&(o.byteRange=e._byteRange),e._init&&(o.init=e._init,(null==(i=e._init.key)?void 0:i.method)===r.HlsEncryptionMethod.NONE&&(o.init=n({},o.init),delete o.init.key)),void 0!==e._mediaSequence&&(o.mediaSequence=e._mediaSequence),void 0!==e._discontinuitySequenceNumber&&(o.discontinuitySequenceNumber=e._discontinuitySequenceNumber),e._parts){var a=o.dateTime;o.parts=e._parts.map(function(e){var t=function(e,t){var i={url:e.uri,duration:e.duration,isInitSegment:!1,internalRepresentationId:t.internalRepresentationId,isPreloadHint:!!e.isPreloadHint,isIndependent:!!e.independent};return e.byteRange&&(i.byteRange=e.byteRange),t.key&&(i.key=t.key),t.init&&(i.init=t.init),(0,d.isDefined)(t.mediaSequence)&&(i.mediaSequence=t.mediaSequence),(0,d.isDefined)(t.discontinuitySequenceNumber)&&(i.discontinuitySequenceNumber=t.discontinuitySequenceNumber),i}(e,o);return a&&(t.dateTime=a,t.startTime=(0,l.toSeconds)(a.getTime()),a=new Date(a.getTime()+(0,l.toMilliSeconds)(e.duration))),t})}return o},e.prototype.qe=function(e,t,i){if(t.SegmentURL.length<1)return e.entries=[],e.totalDuration=0,e.entries.length;for(var n=this.pe(t.SegmentURL[0],i),r=0,o=0,a=0;a<e.entries.length;a++){var s=e.entries[a];if((0,f.isIdenticalSegmentInfo)(s,n))break;r+=s.duration,e.entries.splice(a,1),a--,o++,this.he.equals(i)&&this.rewindOneSegment()}return e.totalDuration-=r,o},e.prototype.re=function(e,t,i){for(var n=[],r=e.entries[e.entries.length-1],o=0,a=t.SegmentURL.length-1;a>=0;a--){var s=this.pe(t.SegmentURL[a],i);if(r&&(0,f.isIdenticalSegmentInfo)(r,s)){if(E(r)){var u=T(r,s);e.totalDuration+=u}break}r&&(0,f.isIdenticalInitSegmentInfo)(r.init,s.init)&&(s.init=r.init),isNaN(s.duration)&&(s.duration=e.maximumSegmentDuration),s.duration/=e.timescale,o+=s.duration,n.push(s)}return e.totalDuration+=o,n.reverse(),e.entries=e.entries.concat(n),n.length},e.prototype.se=function(e,t){var i,n,r=t.SegmentList,o=t._internalId.representationId,a=null==(i=this.he)?void 0:i.equals(t._internalId),s=null==(n=null==r?void 0:r[0])?void 0:n.SegmentURL.length;if(!a||s){e.Uri&&e.Uri!==t.Uri&&this.te(e,null==r?void 0:r[0],a),e.Uri=t.Uri,e.timescale=1,e.maximumSegmentDuration=1,e.startNumber=1;for(var u=function(i){var n=r[i];if(n.hasOwnProperty("_duration")&&(e.maximumSegmentDuration=Number(n._duration)),["_timescale","_startNumber","_presentationTimeOffset"].filter(function(e){return n.hasOwnProperty(e)}).forEach(function(t){return e[t.substr(1)]=n[t]}),c.ue(e,n,t),n.hasOwnProperty("SegmentURL")){var a=c.qe(e,n,t._internalId),s=c.re(e,n,t._internalId);c.ve(t._mimeType,o,a,s),c.le.isHlsManifest()?b(e.entries,t._internalId,c.le):c.we(e,t._internalId)}},c=this,l=0;l<r.length;l++)u(l)}},e.prototype.te=function(e,t,i){var n,r,o,a,s,c;if(this.le.isLive()&&i){var l=null!=(o=null==(r=null==(n=e.entries)?void 0:n[0])?void 0:r.mediaSequence)?o:1/0,d=(null!=(s=null==(a=null==t?void 0:t.SegmentURL[0])?void 0:a._mediaSequence)?s:0)-l,h=function(e){var t,i;return Math.ceil(24/(e.totalDuration/(null!=(i=null==(t=e.entries)?void 0:t.length)?i:1)))}(e);!isNaN(d)&&d>0&&d<h&&this.gf(d)}(0,u.clearArray)(null!=(c=e.entries)?c:[])},e.prototype.ue=function(e,t,i){var n,r=null==(n=h.ModuleManager.get(p.ModuleName.DASH,!1))?void 0:n.initSegmentInfoSourceDetectors.isInitializationNode;(null==r?void 0:r(t))?e.init=h.ModuleManager.get(p.ModuleName.DASH,!1).initSegmentInfoProviders.provideSegmentInfoFromInitializationNodeProperty(t,i):delete e.init},e.prototype.ve=function(e,t,i,n){(i>0||n>0)&&this.ee.debug("[".concat(e,"][").concat(t,"] Updated segment list, removed ").concat(i," segments and added ").concat(n," segments"))},e.prototype.we=function(e,t){var i=this.qf(t),n=0;
1e.entries.forEach(function(e){var t;e.startTime=i+n,n+=null!=(t=e.duration)?t:0})},e.prototype.extrapolateStartTimesFromDiscontinuityStarts=function(e){var t,i,n,r,o=null==(i=null==(t=this.xe())?void 0:t.getState())?void 0:i.hls;if(o){var a=e.getRepresentationId().representationId,s=this.getSegmentListEntries(this.he),u=h.ModuleManager.get(p.ModuleName.HLS).selectors,c=u.getDiscoSequenceTimings,l=u.getMergedDiscontinuityTimings,d=function(e,t){for(var i=e[0].discontinuitySequenceNumber,n=1;n<e.length;n++){var r=e[n].discontinuitySequenceNumber;if(r!==i){var o=S(t,r);if(null!=o)return{index:n,discontinuityStartTime:o}}}return null}(s,null!=(n=c(o,e.getMimeType()))?n:l(o));if(!d){var f=null==(r=this.hf())?void 0:r.start;if(void 0===f)return;d={index:0,discontinuityStartTime:f},this.ee.debug("Could not find discontinuity boundary with start time, using period start time ".concat(f))}this.ee.debug("Assigning segment start times for rep ".concat(a," from discontinuity at index ").concat(d.index," with time ").concat(d.discontinuityStartTime)),s[d.index].startTime=d.discontinuityStartTime;for(var g=d.index-1;g>=0;g--)s[g].startTime=s[g+1].startTime-s[g+1].duration;for(g=d.index+1;g<s.length;g++)s[g].startTime=s[g-1].startTime+s[g-1].duration}},e.prototype.xe=function(){return this.ce.serviceManager.get(o.ServiceName.SourceStoreService,this.ce.sourceContext.sourceIdentifier)},e.prototype.ye=function(e,t){for(var i=-1,n=this.getSegmentListEntries(t),r=n.length-1;r>=0;r--)if((0,f.isIdenticalSegmentInfo)(n[r],e)){i=r;break}return i},e.prototype.ze=function(e){var t,i=this,n=null==(t=this.le)?void 0:t.getAdaptationSet(e);n&&n.Representation.forEach(function(e){var t=i.ne[e._internalId.key()];if(t||(t=i.De(e._internalId.key())),e.hasOwnProperty("SegmentList")&&(i.se(t,e),h.ModuleManager.has(p.ModuleName.DASH))){var n=h.ModuleManager.get(p.ModuleName.DASH).initSegmentInfoSourceDetectors.isInitializationNode;if(!t.hasOwnProperty("init")&&e.hasOwnProperty("SegmentBase")&&e.SegmentBase&&n(e.SegmentBase[0])){var r=h.ModuleManager.get(p.ModuleName.DASH).initSegmentInfoProviders.provideSegmentInfoFromInitializationNodeProperty;t.init=r(e.SegmentBase[0],e)}}})},e.prototype.Ae=function(){var e,t,i=this,n=null==(e=this.ce.serviceManager.get(o.ServiceName.SourceStoreService,this.de.sourceIdentifier).getState().activeTracks)?void 0:e[this.ie.adaptationSetId];if((null==(t=null==n?void 0:n.selectedRepresentationId)?void 0:t.periodId)===this.ie.periodId)return n.selectedRepresentationId;if(this.he){var r=this.le.getRepresentation(this.ie,this.he.representationId);if(r)return r._internalId}return(this.Be(function(e){return i.isSegmentInfoLoaded(e._internalId)})||this.Be())._internalId},e.prototype.Be=function(e){return this.le.getMatchingRepresentationByBandwidth(this.ie,this.Ee(),e)},e.prototype.Ce=function(){var e=this.ie.equals(this.he),t=!this.he||!!this.le.getRepresentationById(this.he);return!this.he||!e||!t},e.prototype.setAdaptationSetId=function(e){this.ie=e,this.ze(this.ie);var t,i=this.le.isLive(),n=0;this.Ce()&&(this.he=this.Ae());var r=this.ne[this.he.key()];if(r||(r=this.De(this.he.key())),r&&i&&r.entries&&r.entries.length>0){var o=r.entries.length-1;this.ge>o&&(n=this.ge-o),this.ge=Math.min(o,this.ge||0),this.ge=Math.max(0,this.ge),t=r.entries[this.ge]}if(this.ge=this.ge||0,i&&(this.ke=this.getSegmentDuration()*this.fe.LIVE_SEGMENT_LIST_START_INDEX_OFFSET),i){if(t&&r){var a=this.ye(t,this.he);a>=0?this.ge=a+n:this.Ge()}else this.Ge();var s=this.Fe();s?this.cf(s):this.resolvePendingSegmentInfoRequests()}else this.resolvePendingSegmentInfoRequests()},e.prototype.De=function(e){var t={totalDuration:0,entries:[],SegmentURL:[],startNumber:0,init:null,maximumSegmentDuration:1,timescale:1};return this.ne[e]=t,t},e.prototype.Ee=function(){var e=0,t=this.kf();return t&&(e=t._bandwidth),e},e.prototype.Fe=function(){var e;if(this.le.isHlsManifest()){var t=this.le.getRepresentationById(this.he);if(null==(e=null==t?void 0:t._hls)?void 0:e.loadFailureReason)return t._hls.loadFailureReason}return this.hasNext()||this.le.isLastPeriod(this.he.periodId)?null:y.SegmentInfoError.PERIOD_COMPLETE},e.prototype.Ge=function(){this.fe.ENABLE_SEEK_FOR_LIVE?this.ge=0:this.timeShift(0)},e.prototype.He=function(e,t){var i,n,r=this.le.getRepresentationById(e),o=this.le.getRepresentationById(t),a=(0,d.isNumber)(null==(i=null==o?void 0:o._hls)?void 0:i.mediaSequence)&&(0,d.isNumber)(null==(n=null==r?void 0:r._hls)?void 0:n.mediaSequence);if(r&&o&&a){var s=o._hls.mediaSequence-r._hls.mediaSequence,c=this.getSegmentListEntries(e),l=this.getSegmentListEntries(t);s>=c.length||(l[0].startTime=c[s].startTime,(0,u.forEachFromIndex)(l,1,function(e,t){(0,d.isNumber)(e.startTime)&&(0,d.isNumber)(e.duration)&&(t.startTime=e.startTime+e.duration)}))}},e.prototype.setRepresentationId=function(e){var t=this.le.getRepresentationById(e),i=this.getSegmentListEntries(this.he)[this.ge];if(t){var n=void 0===this.he,r=this.he;if(this.he=e,this.le.isLive()&&t._hls){if(this.fe.HLS_SYNC_SEGMENT_PLAYBACK_TIME_V
vendor: 6,470 bytes, line 1
1IA_MEDIA_SEQUENCE&&this.He(r,this.he),n)this.Ge();else if(this.fe.HLS_SYNC_VIA_MEDIA_SEQUENCE){var o=this.le.getRepresentationById(r)._hls.mediaSequence+this.ge;this.ge=o-t._hls.mediaSequence,this.ge=Math.max(this.ge,0)}else if(null!=(null==i?void 0:i.startTime)&&!isNaN(i.startTime)){var a=this.pf(i.startTime);null===a||isNaN(a)||(this.ge=this.Ie(a,i.startTime))}}return!0}return!1},e.prototype.Ie=function(e,t){var i=this.getSegmentListEntries(this.he),n=[i[e],i[e+1]];if(e===i.length-1||n.some(function(e){return!e.startTime}))return e;var r=n.map(function(e){return Math.abs(e.startTime-t)}),o=Math.min.apply(this,r);return e+r.indexOf(o)},e.prototype.getInitSegmentInfo=function(){var e=this.lf(this.he);if(null==e?void 0:e.init)return e.init.presentationTimeOffset=this.getTimestampOffset(),e.init;var t=this.getSegmentListEntries(this.he);if(this.Zf(t)&&this.ge>-1){var i=n({},t[this.ge]);if(i.init){var r=i.init;return r.isInitSegment=!0,r}}return null},e.prototype.Je=function(e){var t;if(!(this.getSegmentListEntries(this.he).length<1||this.ge<0)){var i=this.Ke(e);return i&&this.ee.debug("".concat(null==(t=this.ie)?void 0:t.adaptationSetId," given time ").concat(e," matches seek time, performing precise segment/part search"),e),(0,m.isPlayingLowLatencyHls)(this.ce)&&this.Le(e,i),this.Me(e,i)}},e.prototype.Ke=function(e){var t;return e===(null==(t=this.oe)?void 0:t.targetPlaybackTime)},e.prototype.Le=function(e,t){var i;if(0!==e){if(this.ge=this.pf(e),!t){var n=this.getSegmentListEntries(this.he),r=n[this.ge];if(!(r.parts&&r.parts.length>0)){var o=this.ge;this.ge=P(e,this.ge,n),this.ge!==o&&this.ee.debug("Snapped segment index for time ".concat(e," to next segment boundary at ").concat(null==(i=n[this.ge])?void 0:i.startTime))}}}else this.ce.logger.debug("Ignoring target time of 0 for LL-HLS")},e.prototype.Me=function(e,t){var i=this.getSegmentListEntries(this.he);if(this.Zf(i)){var n=i[this.ge];if(!(n.parts&&n.parts.length>0))return this.Yf();if(E(n))return A(n,e,t);var r=A(n,e,t);return r?n.parts.indexOf(r)>0?r:this.Yf():(this.ge++,this.Me(e,t))}},e.prototype.getNextSegmentInfo=function(e){var t=this.Je(e);return t?(this.Ne(t),Promise.resolve(t)):this.bf({time:e})},e.prototype.Ne=function(e){return e.presentationTimeOffset=this.getTimestampOffset(),e.startTime&&(e.wallClockTime=(0,l.toMilliSeconds)(e.startTime)),e},e.prototype.Yf=function(){return this.getSegmentListEntries(this.he)[this.ge++]},e.prototype.getSegmentInfos=function(){var e=this,t={},i=this.le.getAdaptationSet(this.ie);return i&&i.Representation.forEach(function(i){var n=e.getSegmentListEntries(i._internalId);t[i._id]=n.map(function(e){return{url:e.url,duration:e.duration,startTime:e.startTime}})}),t},e.prototype.getSubtitleUrl=function(){return this.le.getAvailableSubtitles(this.ie.periodId)[0].url},e.prototype.getStartNumber=function(){var e=this.lf(this.he);return e?e.startNumber:1},e.prototype.getSegmentDuration=function(){var e=this,t=this.lf(this.he),i=this.getSegmentListEntries(this.he);if(t)return i.length>0&&(0,d.isNumber)(t.totalDuration)?t.totalDuration/i.length:t.maximumSegmentDuration;if(this.le.getAdaptationSet(this.ie)){var n=Object.keys(this.ne).map(function(t){return e.ne[t]}).find(function(e){return null!==e});if(n)return n.maximumSegmentDuration}return 1},e.prototype.seekTo=function(e){e>-1&&(this.ge=this.pf(e))},e.prototype.Zf=function(e){return this.ge<e.length},e.prototype.hasNext=function(){var e=this.getSegmentListEntries(this.he);return!this.he||!e.length||(this.le.isLive()?this.af(e):this.Zf(e))},e.prototype.af=function(e){return!!this.le.isLastPeriod(this.he.periodId)||this.Zf(e)},e.prototype.setTimestampOffset=function(e,t){void 0===t&&(t=1),this.me=e/t},e.prototype.getTimestampOffset=function(){if(!isNaN(this.me))return this.me;var e=this.hf(),t=0;if(this.he){var i=this.lf(this.he);i&&!isNaN(i.presentationTimeOffset)&&(t=i.presentationTimeOffset/i.timescale)}return e&&!this.le.isHlsManifest()&&(t-=e.start),t},e.prototype.getIndex=function(){return this.ge},e.prototype.setIndex=function(e){if("number"==typeof e)return e<0?(this.ee.debug("Tried to set index at MPDHandler to value smaller 0. Setting to 0."),void(this.ge=0)):void(this.ge=e);this.ee.debug("Tried to set index at MPDHandler with parameter not being a number!")},e.prototype.bf=function(e){var t,i=this;if(this.je)return Promise.reject("fail");var r=this.le.getRepresentationById(this.he);return(null==(t=null==r?void 0:r._hls)?void 0:t.loadFailureReason)?Promise.reject(r._hls.loadFailureReason):(this.ee.debug("No segment info was found for the target time. Waiting for representation update."),new Promise(function(t,r){i.je=n(n({},e),{resolve:t,reject:r})}))},e.prototype.resolvePendingSegmentInfoRequests=function(){if(this.je){var e=this.Je(this.je.time);e?(this.Ne(e),this.je.resolve(e),this.je=null):this.le.isLive()||this.hasNext()||this.je.reject(y.SegmentInfoError.END_OF_STREAM_REACHED)}},e.prototype.cf=function(e){this.je&&(this.je.reject(e),this.je=null)},e.prototype.df=function(){var e=this.getSegmentListEntries(this.he);return e.length>0?e.length-1:0},e.prototype.ef=function(e){for(var t,i=Math.abs(e),n=this.getSegmentDuration(),r=this.getSegmentListEntries(this.he),o=this.df(),a=0,s=r.length-1;s>=0&&!((a+=null!=(t=r[s].duration)?t:n)>=i);s--)o--;return Math.max(0,o)},e.prototype.timeShift=function(e,t,i){if(this.le.isLive()){var n=this.ge;this.ge=i&&this.ff()?this.pf(i):this.ef(e),this.ee.debug("timeShift changes index from ".concat(n," to ").concat(this.ge,", based on")+" offset ".concat(e," and target time ").concat(i))}},e.prototype.ff=function(){var e,t=null==(e=this.getSegmentListEntries(this.he)[0])?void 0:e.startTime;return(0,d.isNumber)(t)&&t>=0},e.prototype.updateRepresentation=function(e){return Promise.resolve(e)},e.prototype.isSegmentInfoLoaded=function(e){if(void 0===e&&(e=this.he),!e)return!1;var t=this.getSegmentListEntries(e),i=this.le.getRepresentationById(e);return!(!t.length||!i)},e.prototype.gf=function(e){this.ee.debug("Rewinding segment list index by ".concat(e," segments")),this.ge-=e,this.ge<0&&(this.ee.debug("List array index is smaller than 0, probably a discontinuity. Using 0."),this.ge=0)},e.prototype.rewindOneSegment=function(){return this.ge--,!(this.ge<0&&(this.ee.debug("List array index is smaller than 0, probably a discontinuity. Using 0."),this.ge=0,1))},e.prototype.hf=function(){return this.le.getPeriod(this.he)},e.prototype.jf=function(e){var t=this.hf().start;
1return(this.le.hasSinglePeriod()?this.getSeekableRange().start:t)+this.getSegmentListEntries(this.he).slice(0,e).reduce(function(e,t){return e+t.duration},0)},e.prototype.kf=function(){return this.le.getRepresentationById(this.he)},e.prototype.lf=function(e){if(e)return this.ne[e.key()]},e.prototype.getSegmentListEntries=function(e){var t,i;return e?this.fe.ENABLE_SEGMENT_INFO_PROVIDER_FROM_STORE&&this.le.isHlsManifest()?this.mf(e):null!=(i=null==(t=this.lf(e))?void 0:t.entries)?i:[]:[]},e.prototype.mf=function(e){var t,i=null==(t=this.xe())?void 0:t.getState();return(0,g.getSegmentInfos)(i,e.key())},e.prototype.nf=function(e,t){var i,n;if(!this.ie)return 0;for(var r=this.le.getPeriod(this.ie),o=null!=(i=null==r?void 0:r.start)?i:0,a=this.getSegmentListEntries(this.he),s=0,u=o;u<=t&&s<a.length;s++)u+=null!=(n=a[s].duration)?n:0;return Math.max(s-1,0)},e.prototype.pf=function(e){var t=this.lf(this.he),i=this.getSegmentListEntries(this.he);if(!t||0===i.length||!(0,d.isNumber)(t.totalDuration))return 0;var n=Math.max(this.qf(),e),r=t.totalDuration/i.length,o=(0,v.findSegmentIndexForTime)(i,n,r);return null!==o?o:this.nf(t,n)},e.prototype.qf=function(e){void 0===e&&(e=this.he);var t=this.le.hasSinglePeriod()?this.getSeekableRange().start:this.le.getPeriod(e).start;return this.le.isFirstPeriod(e.periodId)&&(t+=this.ke),t},e.prototype.getLiveEdgeTime=function(){var e,t=null==(e=this.le)?void 0:e.getLastPeriod();return t?t.start+c.DurationConverter.getDurationInSec(t._duration):1/0},e.prototype.getActualTimeShiftBufferDepth=function(){return this.le.getTimeShiftBufferDepthSeconds()},e.prototype.getSeekableRange=function(){var e={start:0,end:0},t=this.le.getTotalDuration();if(!this.le.isLive())return e.start=(0,a.getStartTimeOffset)(this.xe().getState()),e.end=t,e;var i=this.le.getTimeShiftBufferDepthSeconds(),n=(0,l.toSeconds)(this.le.getRequestTimestamp()-this.le.getAvailabilityStartTime());if(e.start=Math.max(n+i,0),e.end=Math.max(n,0),h.ModuleManager.has(p.ModuleName.HLS)&&this.le.isHlsManifest()){var r=h.ModuleManager.get(p.ModuleName.HLS).selectors,o=r.getHlsState;"EVENT"===(0,r.getPlaylistType)(o(this.xe().getState()))?(e.start=0,e.end=t):e.start+=this.ke}return e.end-=this.le.getDesiredDistanceToLiveEdge(),e},e.prototype.getPendingSegmentInfoRequest=function(){return this.je},e.prototype.setPendingSegmentInfoRequest=function(e){this.je=e},e.prototype.canSwitchRepresentation=function(e){var t,i=this.getSegmentListEntries(this.he)[this.ge];if(!i)return!0;var n=function(e,t,i){return void 0!==t.startTime&&void 0!==t.duration&&Math.abs(e-(t.startTime+t.duration))<i}(e,i,this.fe.LL_HLS_SEGMENT_END_TIME_MATCHING_TOLERANCE);if(!E(i)&&n)return!0;var r=this.Ke(e);return!((null==(t=null==i?void 0:i.parts)?void 0:t.length)&&A(i,e,r)!==i.parts[0])},e.prototype.getLatestTimeForPossibleSwitch=function(e){var t,i=this.rf(e),n=i.isLoadingCurrentSegmentsParts,r=i.currentSegment;return r&&n&&null!=(t=r.startTime)?t:e},e.prototype.adjustTimeToNextSegmentStart=function(e){var t=this.rf(e),i=t.isLoadingCurrentSegmentsParts,n=t.currentSegment;return i&&(null==n?void 0:n.startTime)&&(null==n?void 0:n.duration)?n.startTime+n.duration:e},e.prototype.rf=function(e){var t,i=function(e,t){var i,n,r;if(t&&!(t.length<1)&&(null==(i=t[0])?void 0:i.duration)){var o=(0,v.findSegmentIndexForTime)(t,e,t[0].duration),a=null===o,s=e<(null!=(r=null==(n=t[0])?void 0:n.startTime)?r:1/0),u=t[t.length-1];if(void 0!==u.startTime&&void 0!==u.duration){var c=e>u.startTime+u.duration;if(!(a||s||c))return t[o]}}}(e,this.getSegmentListEntries(this.he)),n=null==(t=null==i?void 0:i.parts)?void 0:t[0],r=this.Ke(e),o=!1;if(n&&i){var a=A(i,e,r);o=void 0!==a&&a!==n}return{currentSegment:i,isLoadingCurrentSegmentsParts:o}},e.prototype.dispose=function(){this.fe=null,this.le=null,this.ie=null,this.he=null,this.le=null,this.je=null,this.ne=null},e}()},65244:function(e,t,i){var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};
1Object.defineProperty(t,"__esModule",{value:!0}),t.SegmentLoader=t.State=t.SegmentLoadingErrorReason=void 0;var r,o,a=i(66790),s=i(40306),u=i(3336),c=i(80813),l=i(3714),d=i(77401),h=i(4131),p=i(43446),f=i(91523),g=i(57456),m=i(29669),y=i(91678),v=i(46151),S=i(33436),b=i(70233),E=i(85434),T=i(89927),_=i(88844),A=i(23068),P=i(88052),M=i(62756),I=i(95880),R=i(34795),C=i(87187),O=i(44115),D=i(66628),w=i(33004),N=i(17382),L=i(23133),k=i(94618),U=i(689),x=i(97587);function B(e){switch(e){case o.ABR_TIMEOUT:return r.ABR_TIMEOUT;case o.TIMEOUT:return r.TIMEOUT;default:return r.CANCEL}}!function(e){e.CANCEL="CANCEL",e.ERROR_LOADING="ERROR_LOADING",e.ERROR_DECRYPTING="ERROR_DECRYPTING",e.BUSY="BUSY",e.UNKNOWN="UNKNOWN",e.TIMEOUT="TIMEOUT",e.ABR_TIMEOUT="ABR_TIMEOUT"}(r||(t.SegmentLoadingErrorReason=r={})),function(e){e[e.IDLE=1]="IDLE",e[e.LOADING=2]="LOADING",e[e.CANCELLING=3]="CANCELLING",e[e.TERMINATED=4]="TERMINATED",e[e.TIMEOUT=5]="TIMEOUT",e[e.ABR_TIMEOUT=6]="ABR_TIMEOUT"}(o||(t.State=o={})),t.SegmentLoader=function(){function e(e,t,i,r){void 0===r&&(r=!1);var a=this;if(this.context=e,this.cancelLoading=function(e){var t,i,n,r,s,u,c;if(void 0===e&&(e=o.CANCELLING),(0,_.clearTimeoutIfDefined)(a.CH),a.CH=void 0,(0,_.clearIntervalIfDefined)(a.DH),a.DH=void 0,a.isLoading()){var l=a.MH[a.PH];if(delete a.MH[a.PH],a.TH=e,a.EH.cancel(),void 0!==a.NH){var d=null!=(i=null==(t=a.NH.responseTiming)?void 0:t.headersReceivedTimestamp)?i:-1,p=null!=(r=null==(n=a.NH.responseTiming)?void 0:n.openedTimestamp)?r:-1,f=null!=(s=a.NH.elapsedTime)?s:-1,g=d-p;f>=0&&g>=0&&f>g&&a.context.store.dispatch((0,y.addMetricsValue)(a.BH,S.MetricType.DownloadInformation,{bytes:a.NH.loadedBytes,time:f,timeToFirstByte:g})),(null==(u=a.NH)?void 0:u.chunks)&&l&&a.ZH(l),a.VH={success:!1,httpStatus:408,url:a.PH,downloadTime:f,size:a.NH.loadedBytes,duration:null!=(c=a.OH)?c:0,isInit:a.RH,mimeType:a.BH,uid:void 0,timeToFirstByte:(0,h.hasLoadedData)(a.NH)?g:-1}}a.NH=void 0}},this.gH=function(){var e,t,i,r=null!=(i=null==(t=null==(e=a.NH)?void 0:e.responseTiming)?void 0:t.sendTimestamp)?i:-1;void 0===a.NH||r<0||a.hH(n(n({},a.NH),{elapsedTime:p.TimingUtil.getHiResTimestamp()-r}))},this.hH=function(e){var t,i=null!=(t=e.elapsedTime)?t:-1,r=a.MH[a.PH];a.NH=n(n({},e),{segmentDuration:a.OH,url:a.PH,representationBitrate:r.bitrate}),a.RH||i<=.5||a.TH!==o.LOADING||a.FH(a.NH,r.internalRepresentationId)&&a.cancelLoading(o.ABR_TIMEOUT)},this.iH=function(e,t,i){var n,r,o,s,u,c,d=a.context.store.getState(),h=d?(0,v.getMetricsState)(d):void 0;if(a.context.logger.debug("Downloaded ".concat(a.BH," ").concat(a.RH?"init":"data"," segment in: ").concat(null==(n=e.elapsedTime)?void 0:n.toFixed(2),", TTFB: ").concat(null==(r=e.timeToFirstByte)?void 0:r.toFixed(2),", quality: ").concat(null!=(s=null==(o=a.MH[a.PH])?void 0:o.representationId)?s:"")),!a.RH&&h&&a.BH in h&&(a.context.store.dispatch((0,y.addMetricsValue)(a.BH,S.MetricType.DownloadTime,t)),a.context.store.dispatch((0,y.addMetricsValue)(a.BH,S.MetricType.DownloadSuccess,!0)),(0,g.isDownloadTimeInformationValid)(e)&&a.context.store.dispatch((0,y.addMetricsValue)(a.BH,S.MetricType.DownloadInformation,{bytes:e.length,time:e.elapsedTime,timeToFirstByte:e.timeToFirstByte})),null==(u=a.NH)?void 0:u.chunks)){a.zH.debug("[SegmentLoader] ",a.NH.chunks);var p=(0,N.calculateDownloadRates)(a.NH.chunks),f=(0,N.calcAverage)((0,N.filterValuesExceedingAverageByMargin)(p)),m=a.NH.loadedBytes,b=a.MH[a.PH],E=b.duration,T=void 0!==E?(0,w.bytesToBits)(m)/E:void 0,A=b.bitrate;a.zH.debug("[SegmentLoader] DL rate (AVG-based filter): ".concat((0,N.bpsToMbps)(f),", segmentBitrate: ").concat(T)),a.context.store.dispatch((0,y.addMetricsValue)(a.BH,S.MetricType.ChunkedDownloadInformation,{downloadRate:f,segmentBitrate:T,representationBitrate:A}))}(0,_.clearTimeoutIfDefined)(a.CH),a.CH=void 0,(0,_.clearIntervalIfDefined)(a.DH),a.DH=void 0;var P={success:!0,httpStatus:e.status,url:e.url,downloadTime:e.elapsedTime,size:e.length,duration:a.OH,isInit:a.RH,mimeType:a.BH,uid:a.QH,timeToFirstByte:null!=(c=e.timeToFirstByte)?c:-1};a.AH.dispatchEvent(l.PlayerEvent.SegmentRequestFinished,P)},this.zH=e.logger,this.AH=e.eventHandler,this.HH=e.config.tweaks.segmentLoaderArgs||null,this.GH=e.config.tweaks.segmentLoader||null,this.OH=1,this.TH=o.IDLE,this.BH=t,this.FH=i,this.LH=null,this.MH={},this.VH=null,this.YH=r,P.ModuleManager.has(M.ModuleName.ContainerMP4)){var s=P.ModuleManager.get(M.ModuleName.ContainerMP4);this.XH=new s.CmafChunkParser(this.context)}this.rH()}return e.prototype.ZH=function(e){var t,i,n,r,o,a,s,u,c=(null!=(n=null==(i=null==(t=this.NH)?void 0:t.responseTiming)?void 0:i.progressTimestamp)?n:p.TimingUtil.getHiResTimestamp())-(null!=(a=null==(o=null==(r=this.NH)?void 0:r.responseTiming)?void 0:o.headersReceivedTimestamp)?a:0),l=(0,w.bytesToBits)(null!=(u=null==(s=this.NH)?void 0:s.loadedBytes)?u:0)/c,d=void 0===e.duration?1:Math.max(1-c/e.duration,.1);this.context.store.dispatch((0,y.addMetricsValue)(this.BH,S.MetricType.ChunkedDownloadInformation,{downloadRate:l*d,segmentBitrate:void 0,representationBitrate:e.bitrate}))},e.prototype.isLoading=function(){var e=!!(this.IH&&this.IH.isLoading());return this.TH===o.LOADING||this.TH===o.CANCELLING||this.EH&&this.EH.isLoading()||e},e.prototype.isRetrying=function(){return this.EH&&this.EH.isRetrying()},e.prototype.load=function(e){var t=this;if(this.isLoading())return this.zH.debug("Error loading segment, loader is busy!"+this.PH),Promise.reject({reason:r.BUSY});this.EH&&this.EH.dispose();var i=this.aH(e);return this.VH=null,this.NH=void 0,this.EH=(0,U.getLoader)(this.context,i),this.TH=o.LOADING,this.PH=e.url,this.QH=btoa(this.PH),this.MH[this.PH]=e,this.RH=e.isInitSegment,this.OH=e.duration,this.LH=this.bH(e).then(function(){return t.jH(e)}).catch(function(e){throw t.TH=o.IDLE,t.LH=null,e}),this.LH},e.prototype.aH=function(e){var t=n({},this.UH);return e.isPreloadHint&&(t.maxRetries=0),(e.isInitSegment||e.preventDownloadCanceling||function(e,t){var i,n=null==(i=null==e?void 0:e.serviceManager)?void 0:i.get(c.ServiceName.AdaptationService);if(!n||!t.mimeType||!t.representationId)return!1;
1var r=n.getLowestRepresentationId(t.mimeType);return t.representationId===r}(this.context,e))&&(t.disableDownloadTimeout=!1,e.preventDownloadCanceling=!0),t},e.prototype.bH=function(e){var t,i=this;this.SH=e.key;var n=!!(null==(t=this.SH)?void 0:t.buffer);if(!this.SH||n)return Promise.resolve();switch(this.SH.method){case a.HlsEncryptionMethod.AES_128:return this.dH(e).then(function(e){e&&(i.SH.buffer=e)});case a.HlsEncryptionMethod.SAMPLE_AES:return this.AH.fireError(new u.PlayerError(s.ErrorCode.SOURCE_ENCRYPTION_METHOD_NOT_SUPPORTED,{"encryption-method":this.SH.method,supported:a.HlsEncryptionMethod.AES_128},"The ".concat(a.HlsEncryptionMethod.SAMPLE_AES," encryption method is not supported."),this.context.sourceContext.sourceIdentifier)),Promise.reject({reason:r.ERROR_DECRYPTING});case a.HlsEncryptionMethod.SAMPLE_AES_CTR:return Promise.resolve();default:return Promise.reject({reason:r.ERROR_DECRYPTING})}},e.prototype.getCurrentLoadPromise=function(){return this.LH},e.prototype.cH=function(){var e;return null==(e=this.context.serviceManager)?void 0:e.get(c.ServiceName.SourceStoreService,this.context.sourceContext.sourceIdentifier)},e.prototype.dH=function(e){var t,i,n=null==(t=e.key)?void 0:t.uri,r=this.cH();if(!r||!n)return Promise.reject(Error("Source store not available."));var o=r.getState(),a=(0,D.getEncryptionKey)(o,n);return(null==a?void 0:a.uri)?a.key?Promise.resolve(b.FormatHelper.hexToBytes(a.key).buffer):(0,L.waitForKeyToBeLoaded)(r,n):(null!=(i=this.IH)||(this.IH=new k.KeyLoader(this.context)),(0,L.addEncryptionKeyToStore)(n,this.IH,r))},e.prototype.eH=function(e,t){var i;return!this.YH&&(null==(i=this.context.adRestorationOptimizationService)?void 0:i.hasPrefetchedSegment(t))?(this.MH[e]&&(this.MH[e].wasPrefetched=!0),this.context.adRestorationOptimizationService.getPrefetchedSegment(t,this.FH)):null},e.prototype.fH=function(){(0,_.clearIntervalIfDefined)(this.DH);var e=(0,T.toMilliSeconds)(this.context.settings.SEGMENT_LOADING_PROGRESS_CHECK_INTERVAL);this.DH=e<=0?void 0:window.setInterval(this.gH,e)},e.prototype.jH=function(e){var t,i=this,n={};e.byteRange&&(n.Range="bytes="+e.byteRange.start+"-"+e.byteRange.end);var r=this.context.sourceContext.source&&this.context.sourceContext.source.hasOwnProperty("options")&&!!this.context.sourceContext.source.options.withCredentials;(0,_.clearTimeoutIfDefined)(this.CH),this.CH=void 0,(0,_.clearIntervalIfDefined)(this.DH),this.DH=void 0,e.preventDownloadCanceling||(this.CH=window.setTimeout(function(){return i.cancelLoading(o.TIMEOUT)},(0,f.getRequestTimeout)(this.context,this.UH.requestType)));var a=this.eH(this.PH,e);if(a)return this.context.logger.debug("return prefetched segment for",this.PH),a.then(function(e){var t=new x.Stream;return i.qH(),t.add(e),e.getSegmentInfo().wasPrefetched=!0,t.end(),t}).catch(function(e){throw e});var s=null==(t=this.cH())?void 0:t.getState(),u=s&&(0,O.getContainerFormat)(s,E.MimeTypeHelper.getMediaType(this.BH)),c=(null==u?void 0:u.source)===R.ContainerFormat.MP4,l=!!this.SH||!!this.KH,d=this.context.settings.CHUNKED_CMAF_STREAMING&&this.XH&&c&&!e.isInitSegment&&!l;return this.fH(),this.EH.load(this.PH,m.HttpRequestMethod.GET,m.HttpResponseType.ARRAYBUFFER,null,n,r,this.BH,d).then(function(e){return i.pH(e.body)}).catch(function(e){throw i.kH(e)})},e.prototype.kH=function(e){var t,i;return[o.CANCELLING,o.TIMEOUT,o.ABR_TIMEOUT].includes(this.TH)?(this.zH.debug("Cancelled ".concat(this.BH," download [").concat(this.PH,"]")),this.VH&&(null==(t=this.AH)||t.dispatchEvent(l.PlayerEvent.SegmentRequestFinished,this.VH)),i={reason:B(this.TH)}):this.TH===o.LOADING&&(i={reason:r.ERROR_LOADING,info:{response:e,isInit:this.RH}}),i},e.prototype.getAllLoadingPeriodIds=function(){var e=this;return Object.keys(this.MH).map(function(t){var i;return null==(i=e.MH[t])?void 0:i.periodId}).filter(A.isDefined)},e.prototype.getCurrentLoadingSegmentInfo=function(){return this.isLoading()&&this.PH&&this.MH[this.PH]?this.MH[this.PH]:null},e.prototype.attachDecrypter=function(e){this.KH=this.KH||e},e.prototype.attachClearKeyLoader=function(e){this.JH=this.JH||e},e.prototype.terminate=function(){var e,t=this;this.isLoading()?(null==(e=this.LH)||e.catch(function(){t.TH=o.TERMINATED}),this.cancelLoading()):this.TH=o.TERMINATED},e.prototype.lH=function(e){var t,i=this.RH?C.SegmentInitType.INIT:C.SegmentInitType.NONE,n=this.MH[this.PH],r=new C.Segment(e,this.BH,null!=(t=n.codecs)?t:null,n.periodId,this.OH,i,!0,e.byteLength,n.internalRepresentationId,n.startTime);return r.setUrl(this.PH),r.setSegmentInfo(n),r},e.prototype.mH=function(e,t){return this.SH&&this.SH.method===a.HlsEncryptionMethod.AES_128&&!t?this.nH(e):this.KH?this.oH(e):Promise.resolve(e)},e.prototype.nH=function(e){var t,i;return P.ModuleManager.has(M.ModuleName.Crypto)?(null==(t=this.SH)?void 0:t.buffer)&&(null==(i=this.SH)?void 0:i.iv)?(this.zH.debug("Decrypting AES-128-encrypted segment ".concat(this.PH,", ")+"KEY: 0x".concat(b.FormatHelper.bytesToHex(this.SH.buffer),", ")+"IV: 0x".concat(this.SH.iv)),new(0,P.ModuleManager.get(M.ModuleName.Crypto).CryptoApi)(this.context,"AES-CBC",this.SH.buffer,this.SH.iv,this.BH).decrypt(e).then(function(e){if(!e||0===e.byteLength)throw{reason:r.ERROR_DECRYPTING};return e}).catch(function(){throw{reason:r.ERROR_DECRYPTING}})):(this.zH.debug("Error decrypting AES-128-encrypted segment, missing key or IV"),Promise.reject({reason:r.ERROR_DECRYPTING})):(this.context.eventHandler.fireError(new I.PlayerModuleMissingError(M.ModuleName.Crypto)),Promise.reject({reason:r.ERROR_DECRYPTING}))},e.prototype.oH=function(e){var t=this,i=Promise.resolve(e);if(this.RH)i=this.KH.parseInitSegment(e),this.JH&&(i=i.then(function(e){return t.JH.load(t.KH.getKeyIds()).then(function(i){return t.KH.addKeys(i),Promise.resolve(e)})}));else if(this.KH.isEncrypted()){var n=b.FormatHelper.bytesToHex(this.KH.getKey());
vendor: 22,386 bytes, line 1
1this.zH.debug("Decrypting SAMPLE-AES-encrypted segment ".concat(this.PH,", KEY: 0x").concat(n)),i=this.KH.decryptDataSegment(e)}return i.catch(function(){throw{reason:r.ERROR_DECRYPTING}})},e.prototype.pH=function(e,t){var i=this;if(void 0===t&&(t=!1),e instanceof ArrayBuffer){this.WH=new x.Stream;var n=Date.now();this.mH(e,t).then(function(t){i.TH===o.TERMINATED||i.TH===o.CANCELLING?i.WH.abort(r.CANCEL):(i.WH.add(i.lH(t)),i.WH.end());var a,s=i.MH[i.PH];if(e!==t&&s){var u=(0,T.toSeconds)(Date.now()-n),c=s.internalRepresentationId,l={time:u,representationId:c};i.context.store.dispatch((0,y.addMetricsValue)(i.BH,S.MetricType.DecryptionTime,l)),i.context.logger.debug("Decrypted ".concat(i.BH," segment in: ").concat(null==u?void 0:u.toFixed(2),", quality: ").concat(null!=(a=null==c?void 0:c.representationId)?a:""))}}).catch(function(){return i.WH.abort(r.ERROR_DECRYPTING)}).finally(function(){return i.qH()})}else this.WH=e.transform(function(e){return i.XH.appendData(e),i.XH.getCompleteChunks()},function(){},function(e){return e.message}).transform(function(e){return i.lH(e)},function(){return i.qH()},function(e){i.zH.debug("Error handling fetch segment request",e);var t=r.ERROR_LOADING;return e.message===d.RequestError.Canceled&&(t=B(i.TH)),i.qH(),t});return Promise.resolve(this.WH)},e.prototype.qH=function(){this.TH=o.IDLE,this.LH=null,this.XH&&this.XH.reset(),this.MH&&delete this.MH[this.PH]},e.prototype.dispose=function(){this.terminate(),(0,_.clearTimeoutIfDefined)(this.CH),(0,_.clearIntervalIfDefined)(this.DH),this.EH&&this.EH.dispose&&this.EH.dispose(),this.IH&&this.IH.dispose(),P.ModuleManager.has(M.ModuleName.Crypto)&&P.ModuleManager.get(M.ModuleName.Crypto).WebWorkerCrypto.dispose(),this.EH=null,this.GH=null,this.HH=null,this.IH=null,this.PH=null,this.QH=null,this.SH=null,this.MH={},this.NH=void 0,this.KH=null,this.AH=null},e.prototype.rH=function(){var e=this;this.UH=n(n({},(0,U.getLoaderConfig)(this.context,this.BH)),{onSuccess:this.iH,onProgress:this.hH,onFailure:function(t,i){var n,r;e.context.store.dispatch((0,y.addMetricsValue)(e.BH,S.MetricType.DownloadSuccess,!1)),(null==i?void 0:i.name)===d.RequestError.TimedOut&&(e.TH=o.TIMEOUT),(0,_.clearTimeoutIfDefined)(e.CH),e.CH=void 0,(0,_.clearIntervalIfDefined)(e.DH),e.DH=void 0,delete e.MH[e.PH],e.AH.dispatchEvent(l.PlayerEvent.SegmentRequestFinished,{success:!1,httpStatus:t&&t.status||0,url:null!=(n=null==t?void 0:t.url)?n:e.PH,downloadTime:-1,size:-1,duration:e.OH,isInit:e.RH,mimeType:e.BH,uid:void 0,timeToFirstByte:null!=(r=null==t?void 0:t.timeToFirstByte)?r:-1})}})},e}()},71018:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.SegmentLoaderPool=void 0,t.getLoaderPoolSize=y;var n=i(91678),r=i(46151),o=i(33436),a=i(15971),s=i(94685),u=i(85434),c=i(23068),l=i(88052),d=i(62756),h=i(39523),p=i(99529),f=i(65439),g=i(65244),m=1;function y(e,t){var i=u.MimeTypeHelper.extractContentType(e);return t&&(0,c.isNumber)(t[i])?Math.max(m,t[i]):m}function v(e){return!!(null==e?void 0:e.LA_URL)}function S(e){return(null==e?void 0:e.length)>0}t.SegmentLoaderPool=function(){function e(e,t){this.context=e,this.i1=t.mimeType,this.j1=[],this.u2=t.shouldDownloadBeCancelledCallback,this.addLoaders(y(this.i1,e.settings.SEGMENT_LOADER_POOL_SIZE)),this.x2()}return e.prototype.addLoaders=function(e){for(var t=0;t<e;t++)this.j1.push(new g.SegmentLoader(this.context,this.i1,this.u2))},e.prototype.v2=function(e){if(this.context.segmentPrefetchingService&&this.context.segmentPrefetchingService.hasMp4Decrypter(this.i1))return this.context.segmentPrefetchingService.getDecrypter(this.i1);var t=l.ModuleManager.get(d.ModuleName.Crypto).createDecrypter,i=S(e.drm.clearkey)?e.drm.clearkey:[];return t(this.context,this.i1,i)},e.prototype.w2=function(e){return new(0,l.ModuleManager.get(d.ModuleName.Crypto).ClearKeyLoader)(this.context,e)},e.prototype.x2=function(){var e=this.context.sourceContext.source,t=!function(e){var t,i;return S(null==(t=null==e?void 0:e.drm)?void 0:t.clearkey)||v(null==(i=null==e?void 0:e.drm)?void 0:i.clearkey)}(e)?null:this.v2(e);if(t&&(this.j1.forEach(function(e){return e.attachDecrypter(t)}),this.context.segmentPrefetchingService&&this.context.segmentPrefetchingService.setDecrypter(t,this.i1),v(e.drm.clearkey))){var i=this.w2(e.drm.clearkey);this.j1.forEach(function(e){return e.attachClearKeyLoader(i)})}},e.prototype.isLoading=function(){return this.j1.some(function(e){return e.isLoading()})},e.prototype.isFreeLoaderAvailable=function(){return this.j1.some(function(e){return!e.isLoading()})},e.prototype.y2=function(e){var t=(0,r.getMetricsHistoryFromInstanceState)(this.context.store.getState(),"default",o.MetricType.RequestedRepresentations);(t?t.map(function(e){return e.value}):[]).includes(e)||this.context.store.dispatch((0,n.addMetricsValue)("default",o.MetricType.RequestedRepresentations,e))},e.prototype.load=function(e){var t=this.j1.find(function(e){return!e.isLoading()});if(!t)return this.context.logger.debug("Failed to load segment. No free loader!",e.url),Promise.reject(null);this.y2(e.internalRepresentationId),this.context.logger.debug("[SegmentLoader ".concat(this.j1.indexOf(t),"][").concat(e.mimeType,"][").concat(e.representationId,"] Loading ").concat(e.startTime," ").concat(e.url));var i=(0,f.getSegmentInfoTimeRange)(e),n=(0,p.getTrackIdentifier)(e),r=(0,a.getSourceStore)(this.context);return i&&(null==r||r.dispatch((0,h.addStreamTimeRange)(n,i,p.StreamTimeRangeType.Loading))),t.load(e).catch(function(e){throw i&&(null==r||r.dispatch((0,h.removeStreamTimeRange)(n,i,p.StreamTimeRangeType.Loading))),e})},e.prototype.cancelLoading=function(){var e=this;return Promise.all(this.j1.map(function(e){return e.isLoading()&&e.cancelLoading(),Promise.resolve(e.getCurrentLoadPromise())})).then(function(){}).catch(function(t){(null==t?void 0:t.reason)!==g.SegmentLoadingErrorReason.CANCEL&&(0,s.isContextAvailable)(e.context)&&e.context.logger.debug("Error while loading a segment ",t)})},e.prototype.getLoadingPeriodIds=function(){return this.j1.flatMap(function(e){return e.getAllLoadingPeriodIds()})},e.prototype.dispose=function(){this.cancelLoading(),this.j1.forEach(function(e){return e.dispose()}),this.j1=null},e}()},98892:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.SegmentPreProcessor=void 0;var n=i(80813),r=i(3714),o=i(91678),a=i(33436),s=i(15971),u=i(85434),c=i(66502),l=i(88052),d=i(62756),h=i(23940),p=i(39523),f=i(99529),g=i(60729),m=i(73794),y=i(37641),v=i(77286),S=i(65439),b=i(63066);function E(e,t){return!t.isAvMuxedTogether||u.MimeTypeHelper.isVideo(e.getMimeType())}function T(e){return u.MimeTypeHelper.isSubtitle(e.getMimeType())}t.SegmentPreProcessor=function(){function e(e,t,i,r,o,a,s){this.context=e,this.mimeType=t,this.onDataAvailableCallback=i,this.hls=r,this.segmentUnavailabilityHandler=o,this.timestampOffsetService=a,this.segmentParser=s,this.EI=!1,this.FI=null;var u=e.sourceContext.sourceIdentifier;this.CI=this.context.serviceManager.get(n.ServiceName.ManifestService,u)}return Object.defineProperty(e.prototype,"HI",{get:function(){return this.context.logger},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"II",{get:function(){return this.context.eventHandler},enumerable:!1,configurable:!0}),e.prototype.setHlsTimelineTracker=function(e){this.DI=e},e.prototype.setMpdHandler=function(e){this.GI=e},e.prototype.onMuxedSegmentAvailable=function(e,t,i,n){var r=this,o=t.find(function(e){return E(e,r.hls)});if(o){var a=!o.getRepresentationId().equals(this.FI),u=this.OI(o,i,a),c=u.shouldMakeSegmentAvailable,l=u.shouldCacheSegment;c?t.forEach(function(t){var o=e.metadata[e.transmuxedSegments.indexOf(t)];r.onSegmentAvailable(t,o,i,n)||n.cacheSegment(e.originalSegment)}):(l&&n.cacheSegment(e.originalSegment),function(e,t){var i=(0,s.getSourceStore)(t),n=e.getSegmentInfo(),r=(0,S.getSegmentInfoTimeRange)(n),o=(0,f.getTrackIdentifier)(n);i&&r&&i.dispatch((0,p.removeStreamTimeRange)(o,r,f.StreamTimeRangeType.Loading))}(e.originalSegment,this.context))}},e.prototype.onSegmentAvailable=function(e,t,i,n){var r,o,a;return this.HI.debug("onSegmentAvailable ".concat(e.getMimeType()).concat(e.isInit()?" init":""," segment [").concat(e.getUrl(),"]")),this.segmentUnavailabilityHandler.downloadSuccess(e.isInit()),null==(o=(r=this.GI).generateSmoothInitSegment)||o.call(r,e,this.segmentParser),this.hls.isTransmuxingRequired||c.TextSegmentAnalyzer.isPlainTextPayload(e.getData())||null==(a=this.segmentParser)||a.parseSegment(e),!!e.isInit()||this.JI(e,t,i,n)},e.prototype.JI=function(e,t,i,r){var o,a,u,l,d=this,h=!e.getRepresentationId().equals(this.FI);E(e,this.hls)&&h&&this.LI(e,this.FI);var g=this.hls.isTransmuxingRequired,y=!0;if(this.CI.isHlsManifest()){if(this.KI(e),!g&&!c.TextSegmentAnalyzer.isPlainTextPayload(e.getData())){(isNaN(this.GI.getTimestampOffset())||0===this.GI.getTimestampOffset())&&(0,m.initializeHlsSegmentStartTimes)(e,this.context,this.GI),this.timestampOffsetService.maybeAdjustTimestampOffsetAtDiscontinuityChange(e,this.GI)&&(null==(o=this.segmentParser)||o.parseSegment(e));var v=this.OI(e,i,h),b=v.shouldMakeSegmentAvailable,_=v.shouldCacheSegment;if(!b)return _&&r.cacheSegment(e),!1}T(e)&&this.timestampOffsetService.maybeAdjustTimestampOffsetAtDiscontinuityChange(e,this.GI),this.CI.initSegmentStartTimesFromReferenceSegment(e)}if(g&&this.hls.possiblyDependentSegments&&h&&E(e,this.hls)&&!this.EI){this.HI.debug("Just switched playlists, isIndependentlyDecodable=".concat(e.isIndependentlyDecodable(),", (").concat(e.getMimeType(),", ").concat(e.getUrl(),")"));var A=this.GI.getIndex()>1;!e.isIndependentlyDecodable()&&A&&(this.HI.debug("Started keyframe recovery"),this.GI.setIndex(this.GI.getIndex()-2),y=!1,this.hls.discardNextSegment=!0,this.EI=!0)}if(!y)return!1;!function(e,t){var i=(0,s.getSourceStore)(t),n=e.getSegmentInfo(),r=(0,S.getSegmentInfoTimeRange)(n),o=e.getPlaybackTimeRange(),a=(0,f.getTrackIdentifier)(n);i&&r&&o&&(i.dispatch((0,p.removeStreamTimeRange)(a,r,f.StreamTimeRangeType.Loading)),i.dispatch((0,p.addStreamTimeRange)(a,o,f.StreamTimeRangeType.Loading)))}(e,this.context),this.context.serviceManager.get(n.ServiceName.TimedMetadataService).onSegmentAvailable({segment:e,extractedMetadata:t,isSegmentOfMainStream:E(e,this.hls),presentationTimeOffset:this.GI.getTimestampOffset()}),this.context.serviceManager.maybeCall(n.ServiceName.SubtitleService,function(i){i.handleClosedCaptions(d.GI,e,null==t?void 0:t.closedCaptions,g)},void 0,null==(a=this.context.sourceContext)?void 0:a.sourceIdentifier);var P=e.getPlaybackTime(),M=null==(u=e.getSegmentInfo())?void 0:u.startTime,I=M?Math.abs(P-M):void 0;return this.HI.debug("[".concat("SegmentPreProcessor","][").concat(e.getMimeType(),"]: playbackTimeForSegment=").concat(P," expected=").concat(M," (diff=").concat(null==I?void 0:I.toFixed(3),") ").concat(e.getUrl())),E(e,this.hls)&&(null==(l=this.DI)||l.trackPlaybackTime(e),this.EI=!1),this.onDataAvailableCallback(e),y},e.prototype.KI=function(e){var t=l.ModuleManager.get(d.ModuleName.LowLatency,!1);(0,g.isPlayingLowLatencyHls)(this.context)&&t&&t.applyUpdatedSegmentInfoProps(e,this.CI)},e.prototype.LI=function(e,t){this.MI(e.getMimeType(),t,e.getRepresentationId());var i=e.getSegmentInfo(),n={id:i.representationId,bitrate:i.bitrate,width:i.width,height:i.height};this.context.store.dispatch((0,o.addMetricsValue)(this.mimeType,a.MetricType.DownloadedRepresentation,n)),this.FI=e.getRepresentationId()},e.prototype.MI=function(e,t,i){if(u.MimeTypeHelper.isVideo(e))n=r.PlayerEvent.VideoDownloadQualityChanged;else{if(!u.MimeTypeHelper.isAudio(e))return;n=r.PlayerEvent.AudioDownloadQualityChanged}var n,o=(0,h.representationToQuality)(this.CI.getRepresentationById(t),e),a=(0,h.representationToQuality)(this.CI.getRepresentationById(i),e);this.II.dispatchEvent(n,{targetQuality:a,targetQualityId:a.id,sourceQuality:o,sourceQualityId:o?o.id:null})},e.prototype.NI=function(e,t){var i={hasGap:!1};if(e&&this.CI.isHlsManifest()&&!T(e)&&E(e,this.hls)&&this.DI){var n=v.SegmentInfoProvider.findHlsRepresentationForSegment(e,this.CI.getAdaptationSet(t));if(n&&(i=this.DI.checkForTimelineGap(e,n.representation,n.index)).hasGap&&void 0!==i.correctedIndex){this.HI.debug("Encountered timeline gap (".concat(i.gapSizeSec,"), just loaded ").concat(e.getUrl()));var r=n.representation._internalId,o=this.GI instanceof b.SegmentListMPDHandler&&this.GI.getSegmentListEntries(r)&&this.GI.getSegmentListEntries(r)[i.correctedIndex];if(o&&(0,y.areSegmentsIdentical)(e.getSegmentInfo(),o))return this.HI.debug("Gap handling: Segment is identical to the one we just loaded, not rewinding"),i.hasGap=!1,i;o&&o.hasDownloadFailed?(this.HI.debug("Gap handling: Could not handle gap, segment has failed to download"),i.couldHandle=!1):(this.HI.debug("Gap handling: Correcting index from ".concat(this.GI.getIndex()," to ").concat(i.correctedIndex)),this.GI.setIndex(i.correctedIndex))}}return i},e.prototype.OI=function(e,t,i){if(!(this.DI.isGapVerificationNeeded()||this.DI.isSeekTargetVerificationNeeded()||i))return{shouldMakeSegmentAvailable:!0,shouldCacheSegment:!1};var n=this.NI(e,t);return n.hasGap?n.couldHandle?!function(e){var t;return(null!=(t=e.gapSizeSec)?t:0)>0}(n)?{shouldMakeSegmentAvailable:!1,shouldCacheSegment:!1}:{shouldMakeSegmentAvailable:!1,shouldCacheSegment:!0}:(this.DI.reset(),{shouldMakeSegmentAvailable:!0,shouldCacheSegment:!1}):{shouldMakeSegmentAvailable:!0,shouldCacheSegment:!1}},e.prototype.dispose=function(){this.FI=null,this.DI=null,this.CI=null,this.onDataAvailableCallback=null,this.hls=null,this.segmentUnavailabilityHandler=null,this.timestampOffsetService=null,this.segmentParser=null,this.GI=null},e}()},11991:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.SegmentPrefetcher=void 0;var n=i(94685),r=i(19483),o=i(65244);t.SegmentPrefetcher=function(){function e(e){var t=this;this.fI=function(e){var i=t.ZI.get(e);i&&0!==i.length&&t.gI(i.shift()).then(function(){return t.fI(e)})},this.ZI=new r.ArrayMap,this.bI=new Map,this.aI=new Map,this.cI=new Map,this.dI=e,this.eI=new Map}return e.prototype.updateContext=function(e){this.YI=e},e.prototype.setShouldDownloadBeCancelledCallback=function(e,t){this.eI.set(e,t)},e.prototype.removeShouldDownloadBeCancelledCallback=function(e){this.eI.delete(e)},e.prototype.setDecrypter=function(e,t){this.aI.set(t,e),this.cI.has(t)&&this.cI.get(t).attachDecrypter(e)},e.prototype.removeDecrypter=function(e){this.aI.delete(e)},e.prototype.getDecrypter=function(e){return this.aI.get(e)},e.prototype.prefetchSegment=function(e){return this.gI(e)},e.prototype.prefetchSegments=function(e){var t=this;e.forEach(function(e){return t.ZI.add(e.mimeType,e)}),this.ZI.keys.forEach(function(e){return t.fI(e)})},e.prototype.gI=function(e){var t=this,i=this.iI(e.mimeType).then(function(){return t.hI(e)}).then(function(){}).catch(function(){});return this.bI.set(e.mimeType,i),i},e.prototype.hI=function(e){var t=this;if(!(0,n.isContextAvailable)(this.YI))return Promise.reject("PlayerContext not available");var i=this.jI(e).load(e).then(function(e){return e.read()}).then(function(e){return e.value});return this.dI.onPrefetch({segmentInfo:e,loadingPromise:i}),i.catch(function(i){(0,n.isContextAvailable)(t.YI)&&t.YI.logger.debug("segment prefetching failed for",e,"with",i)}),i},e.prototype.iI=function(e){return this.bI.has(e)||this.bI.set(e,Promise.resolve()),this.bI.get(e)},e.prototype.jI=function(e){return this.cI.has(e.mimeType)||this.cI.set(e.mimeType,this.kI(e)),this.cI.get(e.mimeType)},e.prototype.kI=function(e){this.bI.set(e.mimeType,Promise.resolve());var t=new o.SegmentLoader(this.YI,e.mimeType,this.lI(e),!0);return t.attachDecrypter(this.aI.get(e.mimeType)),t},e.prototype.lI=function(e){var t=this;return function(i){var n=e.mimeType,r=t.cI.get(n),o=r?r.getCurrentLoadingSegmentInfo():null,a=void 0!==n?t.eI.get(n):void 0,s=o?o.internalRepresentationId:e.internalRepresentationId;return void 0!==a&&a(i,s)}},e.prototype.clearPrefetchingQueue=function(e){this.ZI.delete(e)},e.prototype.reset=function(){this.ZI.clear(),this.cI.forEach(function(e){return e.dispose()}),this.eI.clear(),this.cI.clear(),this.aI.clear()},e.prototype.dispose=function(){this.reset(),this.cI=null,this.eI=null},e}()},54015:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.SegmentPrefetchingService=void 0;var n=i(25248),r=i(11991);t.SegmentPrefetchingService=function(){function e(){this.tf=new r.SegmentPrefetcher(this),this.uf=new Map}return e.prototype.updatePlayerContext=function(e){this.sf=e,this.tf.updateContext(this.sf)},e.prototype.setDecrypter=function(e,t){this.tf.setDecrypter(e,t)},e.prototype.removeDecrypter=function(e){this.tf.removeDecrypter(e)},e.prototype.getDecrypter=function(e){return this.tf.getDecrypter(e)},e.prototype.hasMp4Decrypter=function(e){return!!this.getDecrypter(e)},e.prototype.setShouldDownloadBeCancelledCallback=function(e,t){this.tf.setShouldDownloadBeCancelledCallback(e,t)},e.prototype.removeShouldDownloadBeCancelledCallback=function(e){this.tf.removeShouldDownloadBeCancelledCallback(e)},e.prototype.fetch=function(e){var t=this;return this.tf.prefetchSegment(e).then(function(){var i=t.uf.get(e.mimeType).get((0,n.getSegmentInfoId)(e));return i?Promise.resolve(i.loadingPromise):Promise.reject()})},e.prototype.fetchAll=function(e){this.tf.prefetchSegments(e)},e.prototype.onPrefetch=function(e){var t=e.segmentInfo.mimeType;this.uf.has(t)||this.uf.set(t,new Map),this.uf.get(t).set((0,n.getSegmentInfoId)(e.segmentInfo),e)},e.prototype.hasPrefetchedSegment=function(e){return!!this.vf(e)},e.prototype.getPrefetchedSegment=function(e){var t=this.vf(e);return t?t.loadingPromise:null},e.prototype.vf=function(e){return this.uf.has(e.mimeType)&&this.uf.get(e.mimeType).get((0,n.getSegmentInfoId)(e))||null},e.prototype.getPrefetchedSegments=function(){return this.uf},e.prototype.removePrefetchedSegment=function(e){this.uf.has(e.mimeType)&&this.uf.get(e.mimeType).delete((0,n.getSegmentInfoId)(e))},e.prototype.clearPrefetchingQueue=function(e){this.tf.clearPrefetchingQueue(e)},e.prototype.reset=function(){this.tf.reset(),this.uf.clear()},e.prototype.dispose=function(){this.reset(),this.tf.dispose(),this.tf=null,this.uf=null},e}()},44552:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.SegmentManager=t.SegmentService=void 0;var n=i(56481),r=i(85434),o=i(15487),a=i(37641),s=i(71018),u=i(97587),c=i(88401);t.SegmentService=function(){function e(e){var t=this;this.context=e,this.WF=function(e){t.UF.has(e)&&(t.UF.get(e).dispose(),t.UF.delete(e))},this.UF=new Map}return e.prototype.VF=function(e,t){var i=void 0===t?{}:t,n=i.id,o=i.lang;return r.MimeTypeHelper.isSubtitle(e)?[e,n,o].filter(Boolean).join("-"):e},e.prototype.add=function(e,t,i){var n=this.get(e.mimeType,i);return n||(n=this.createSegmentManager(e,t),this.UF.set(this.VF(e.mimeType,i),n)),n},e.prototype.createSegmentManager=function(e,t){return new l(this.context,e,t)},e.prototype.get=function(e,t){return this.UF.get(this.VF(e,t))},e.prototype.disposeOfType=function(e,t){this.WF(this.VF(e,t))},e.prototype.dispose=function(){this.UF.forEach(function(e){return e.dispose()}),this.UF.clear()},e}();var l=function(){function e(e,t,i){this.context=e,this.segmentParser=i,this.lG=!1,this.jG=new s.SegmentLoaderPool(e,t),this.iG=new c.UrlInitSegmentProvider(e,t.mimeType),this.XF=new a.SegmentCache(e.settings.MAX_NUM_CACHED_SEGMENTS),this.kG=Promise.resolve(null)}return e.prototype.getSegment=function(e){var t=e.isInitSegment?this.mG(e).then(function(e){return d(e)}):this.nG(e);return this.kG=this.kG.catch(function(){}).then(function(){return t}),this.kG},e.prototype.mG=function(e){var t=this;return this.iG.getSegment(e).then(function(e){var i;return null==(i=t.segmentParser)||i.parseSegment(e),e}).catch(function(e){return t.context.logger.debug("Error during loading an init segment",e),Promise.reject(e)})},e.prototype.nG=function(e){var t,i=this;(null==(t=e.key)?void 0:t.method)&&(this.lG=!0);var n=this.oG(e);return(this.pG()?this.qG(n,e):this.rG(n,e)).then(function(e){var t=e[0],n=e[1];return t.transform(function(e){return i.tG(e,n),e},function(){},function(e){return i.context.logger.debug("Loading failed",e),e.message})})},e.prototype.oG=function(e){var t=Promise.resolve();if(e.init){var i=this.iG.getCachedSegment(e);t=i?Promise.resolve(i):this.mG(e.init)}return t},e.prototype.pG=function(){var e;return this.context.settings.DISABLE_PARALLEL_SEGMENT_LOADING||!!(null==(e=this.context.sourceContext.source.drm)?void 0:e.clearkey)||this.lG||(0,o.isTizen2016)()},e.prototype.qG=function(e,t){var i=this;return e.then(function(e){return i.sG(t).then(function(t){return[t,e]})})},e.prototype.rG=function(e,t){return Promise.all([this.sG(t),e])},e.prototype.sG=function(e){var t=this.getCachedSegment(e);return null!=t?(this.context.logger.debug("Returning segment from cache for URL: ".concat(e.url)),Promise.resolve(d(t))):this.jG.load(e)},e.prototype.tG=function(e,t){t&&e.setInitSegment(t)},e.prototype.isLoading=function(e){return e?this.jG.getLoadingPeriodIds().includes(e):this.jG.getLoadingPeriodIds().length>0},e.prototype.canLoad=function(){var e=this.jG.isFreeLoaderAvailable();return this.pG()?e&&!this.iG.isLoading():e},e.prototype.cacheSegment=function(e){this.XF.add(e)},e.prototype.hasCachedSegment=function(e){return!!this.getCachedSegment(e)},e.prototype.getCachedSegment=function(e){return e.isInitSegment?this.iG.getCachedSegment(e):this.XF.get(e)},e.prototype.removeCachedInitSegments=function(e){this.iG.removeCachedSegments(e)},e.prototype.clearCache=function(e){void 0===e&&(e=!0),e&&this.iG.removeCachedSegments(function(){return!0}),this.XF.clear()},e.prototype.cancel=function(){return this.jG.cancelLoading()},e.prototype.dispose=function(){this.cancel(),this.clearCache(!1),this.jG=(0,n.dispose)(this.jG),this.segmentParser=void 0,(0,n.dispose)(this.iG)},e}();function d(e){var t=new u.Stream;return t.add(e),t.end(),t}t.SegmentManager=l},25902:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.TimestampOffsetService=void 0;var n=i(80813),r=i(85434),o=i(66502),a=i(88052),s=i(62756);t.TimestampOffsetService=function(){function e(e,t){this.context=e,this.mimeType=t,this.PI=new Map;var i=e.sourceContext.sourceIdentifier;this.QI=e.serviceManager.get(n.ServiceName.SourceStoreService,i)}return Object.defineProperty(e.prototype,"RI",{get:function(){return this.context.logger}
1,enumerable:!1,configurable:!0}),e.prototype.maybeAdjustTimestampOffsetAtDiscontinuityChange=function(e,t){var i=e.getSegmentInfo().discontinuitySequenceNumber;if(null==i||e.isInit())return!1;var n=this.PI.get(e.getMimeType())!==i,r=isNaN(t.getTimestampOffset());if(n||r)this.SI(e,i,t);else if(e.getSegmentInfo().wasPrefetched){var o=this.TI(e,i);this.UI(e,o)}return this.PI.set(e.getMimeType(),i),!0},e.prototype.SI=function(e,t,i){var n=this.TI(e,t);this.VI(e,t,i),this.RI.debug("[".concat(this.mimeType,"] Initialized PTO for new discontinuity ").concat(t," to ").concat(n," on segment ").concat(e.getUrl())),i.setTimestampOffset(n),this.UI(e,n)},e.prototype.TI=function(e,t){var i,n,r=this.XI(e).encodedPlaybackTime,o=a.ModuleManager.get(s.ModuleName.HLS),u=null!=(i=null==o?void 0:o.selectors)?i:{},c=u.getHlsState,l=u.getPresentationTimeOffset,d=null==c?void 0:c(this.QI.getState());return d&&null!=(n=l(d,String(t)))?n:this.WI(e,r,t)},e.prototype.UI=function(e,t){var i=this.XI(e),n=i.encodedPlaybackTime,r=i.shouldUpdatePlaybackTime;e.getSegmentInfo().presentationTimeOffset=t,e.setPresentationTimeOffset(t),r&&e.setPlaybackTime(n-t)},e.prototype.VI=function(e,t,i){null==e.getSegmentInfo().startTime&&"extrapolateStartTimesFromDiscontinuityStarts"in i&&(this.RI.debug("[".concat(e.getMimeType(),"] Missing segment startTime when trying to calculate PTO for discontinuity ").concat(t)),i.extrapolateStartTimesFromDiscontinuityStarts(e))},e.prototype.WI=function(e,t,i){var n=t-e.getSegmentInfo().startTime,u=a.ModuleManager.get(s.ModuleName.HLS);return r.MimeTypeHelper.isSubtitle(e.getMimeType())&&o.TextSegmentAnalyzer.isPlainTextPayload(e.getData())||(this.QI.dispatch(u.actions.setPresentationTimeOffset(String(i),n)),this.RI.debug("[".concat(e.getMimeType(),"] Setting PTO for discontinuity ").concat(i," to ").concat(n))),n},e.prototype.XI=function(e){var t,i=a.ModuleManager.get(s.ModuleName.ContainerMP4,!1),n=!0,r=i?i.parsePlaybackTime(e,this.RI):e.getBaseMediaDecodeTime()/e.getTimescale();return isNaN(r)&&(r=null!=(t=e.getPlaybackTime())?t:e.getSegmentInfo().startTime,n=!1),{encodedPlaybackTime:r,shouldUpdatePlaybackTime:n}},e.prototype.dispose=function(){this.PI=null,this.QI=null},e}()},88401:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.UrlInitSegmentProvider=void 0;var n=i(91678),r=i(33436),o=i(37641),a=i(71018);t.UrlInitSegmentProvider=function(){function e(e,t){this.C2={},this.z2=e,this.A2=new a.SegmentLoaderPool(e,{mimeType:t,shouldDownloadBeCancelledCallback:function(){return!1}}),this.B2=new o.SegmentCache(1/0)}return e.prototype.getSegment=function(e){var t=this,i=this.B2.get(e);return i?Promise.resolve(i):null!=this.C2[e.url]?this.C2[e.url]:this.D2(e).then(function(e){return t.E2(e),e})},e.prototype.isLoading=function(){return this.A2.isLoading()},e.prototype.D2=function(e){var t=this;this.A2.isFreeLoaderAvailable()||this.A2.addLoaders(1),this.z2.logger.debug("Loading init segment",e.url);var i=this.A2.load(e).then(function(e){return e.read()}).then(function(t){if(!t.value)throw Error("SegmentStream error ".concat(e.url));return t.value}).finally(function(){delete t.C2[e.url]});return this.C2[e.url]=i,i},e.prototype.E2=function(e){this.B2.add(e),this.z2.store.dispatch((0,n.addMetricsValue)(e.getMimeType(),r.MetricType.CachedInitSegments,{internalRepId:e.getSegmentInfo().internalRepresentationId}))},e.prototype.getCachedSegment=function(e){return this.B2.get(e)},e.prototype.removeCachedSegments=function(e){this.B2.remove(e)},e.prototype.dispose=function(){this.B2.clear(),this.A2.dispose()},e}()},73794:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.initializeHlsSegmentStartTimes=function(e,t,i){var o=t.sourceContext.sourceIdentifier,a=t.serviceManager.get(n.ServiceName.ManifestService,o);if(a&&!a.getAllAdaptationSets().some(function(e){return e.Representation.some(function(e){var t,i;return void 0!==(null==(i=null==(t=e.SegmentList)?void 0:t[0].SegmentURL[0])?void 0:i._playbackTime)})})){var s=e.getRepresentationId();a.initializeSegmentStartTimesFromStart(s),(0,r.assignSegmentStartTimesFromHlsRepresentation)(i.getSegmentListEntries(e.getRepresentationId()),s,a)}};var n=i(80813),r=i(63066)}
vendor: 4,019 bytes, line 1
1,97587:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.Stream=void 0;var n=i(34841),r=i(24389),o=i(78006);t.Stream=function(){function e(){var e=this;this.Af=function(){e.yf&&!e.isEmpty()&&(e.yf.resolve({done:!1,value:e.xf.shift()}),e.yf=null)},this.wf=o.StreamState.Open,this.xf=[],this.zf=new n.Deferred,this.zf.promise.catch(function(){})}return e.prototype.add=function(e){this.wf===o.StreamState.Open&&(this.xf.push(e),this.Af())},e.prototype.read=function(){if(this.yf)return Promise.reject({name:r.StreamReadError.ParallelRead});if(this.wf===o.StreamState.Ended&&this.isEmpty())return Promise.resolve({done:!0});if(this.wf===o.StreamState.Aborted)return Promise.reject({name:r.StreamReadError.Aborted,message:this.getError()});this.yf=new n.Deferred;var e=this.yf.promise;return this.Af(),e},e.prototype.end=function(){this.wf===o.StreamState.Open&&(this.wf=o.StreamState.Ended,this.yf&&this.isEmpty()&&(this.yf.resolve({done:!0}),this.yf=null),this.zf.resolve())},e.prototype.abort=function(e){var t;if(this.wf===o.StreamState.Open){this.wf=o.StreamState.Aborted,this.error=e;var i={name:o.StreamState.Aborted,message:null!=(t=this.getError())?t:""};this.yf&&(this.yf.reject(i),this.yf=null),this.zf.reject(i)}},e.prototype.transform=function(t,i,n){var r=this,o=new e,a=function(){r.read().then(function(e){var n=e.done,r=e.value;if(n)i&&i(),o.end();else{var s=null!=r&&t(r);s&&o.add(s),a()}}).catch(function(e){n?o.abort(n(e)):o.abort(e)})};return a(),o},e.prototype.isEmpty=function(){return 0===this.xf.length},e.prototype.getError=function(){return this.error||null},e}()},24389:function(e,t){var i;Object.defineProperty(t,"__esModule",{value:!0}),t.StreamReadError=void 0,function(e){e.Aborted="aborted",e.ParallelRead="parallelread"}(i||(t.StreamReadError=i={}))},78006:function(e,t){var i;Object.defineProperty(t,"__esModule",{value:!0}),t.StreamState=void 0,function(e){e.Open="open",e.Ended="ended",e.Aborted="aborted"}(i||(t.StreamState=i={}))},61800:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.DiscontinuityMonitor=void 0;var n=i(3714);t.DiscontinuityMonitor=function(){function e(e){var t=this;this.context=e,this.J2=function(){t.G2=!0},this.K2=function(){var e=t.context.internalPlayer.getCurrentTime();Object.values(t.H2).forEach(function(i){e>=i.playbackTime&&i.playbackTime+i.duration>=e&&t.maybeFirePeriodSwitchEvents(i)}),t.H2={},t.G2=!1},this.F2={},this.H2={},this.G2=!1,this.I2=[],this.context.eventHandler.on(n.PlayerEvent.Seek,this.J2,!0),this.context.eventHandler.on(n.PlayerEvent.Seeked,this.K2,!0)}return e.prototype.trackIncomingDiscontinuity=function(e,t,i,n){this.F2[t]?this.G2&&(this.H2[t]={mimeType:t,discontinuitySequenceNumber:e,playbackTime:i,duration:n}):this.F2[t]={discontinuitySequenceNumber:e,startTime:i||0},this.I2.includes(e)||this.I2.push(e)},e.prototype.isDiscontinuityExpected=function(e){return this.I2.includes(e)},e.prototype.reset=function(){this.I2=[]},e.prototype.maybeFirePeriodSwitchEvents=function(e){var t=e.mimeType,i=e.discontinuitySequenceNumber,r=e.playbackTime;if(null!=i&&this.F2[t]){var o=this.F2[t].discontinuitySequenceNumber;o!==i&&(this.L2(t,i,r)&&(this.context.eventHandler.dispatchEvent(n.PlayerEvent.PeriodSwitch),this.context.eventHandler.dispatchEvent(n.PlayerEvent.PeriodSwitched,{sourcePeriod:{periodId:String(o)},targetPeriod:{periodId:String(i)}})),this.F2[t]={discontinuitySequenceNumber:i,startTime:r})}},e.prototype.L2=function(e,t,i){var n=this,r=Object.keys(this.F2).filter(function(t){return t!==e}),o=!0;return r.forEach(function(e){var r=n.F2[e];r.discontinuitySequenceNumber===t&&1>Math.abs(i-r.startTime)&&(o=!1)}),o},e.prototype.dispose=function(){this.context.eventHandler.off(n.PlayerEvent.Seek,this.J2),this.context.eventHandler.off(n.PlayerEvent.Seeked,this.K2)},e}()},86163:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.PeriodSwitchMonitor=void 0;var n=i(15971),r=i(42208),o=i(88935);t.PeriodSwitchMonitor=function(){function e(e){this.context=e,this.M2=[]}
1return e.prototype.isPeriodExpected=function(e){return this.M2.includes(e)},e.prototype.trackIncomingPeriod=function(e){this.M2.includes(e)||this.M2.push(e)},e.prototype.maybeHandlePeriodSwitch=function(e){var t=(0,n.getSourceStore)(this.context),i=null==t?void 0:t.getState();if(t&&i){var a=e.periodId,s=(0,o.getPlayingPeriodId)(i);a&&a!==s&&this.M2.includes(a)&&(t.dispatch((0,r.periodSwitchStarted)(a)),t.dispatch((0,r.periodSwitchFinished)(a)))}},e.prototype.reset=function(){this.M2=[]},e.prototype.dispose=function(){this.M2=[]},e}()},87187:function(e,t,i){var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.SegmentInitType=t.Segment=void 0;var r,o=i(74853),a=i(85434),s=i(65439);t.Segment=function(){function e(e,t,i,n,a,s,u,c,l,d){void 0===s&&(s=r.NONE),this.pN=[],this.data=e,this.kN=t,this.lN=i,this.jN=n,this.mN=a,this.nN=s,this.oN=u,this.rN=!1,this.bN={subtitles:[]},this.sN=c,this.tN=l,this.eN=d,this.uN=!1,this.xN=null,e instanceof ArrayBuffer||"string"==typeof e&&(this.data=o.ArrayHelper.stringToArrayWithoutEncoding(e).buffer)}return e.prototype.setDrmKid=function(e){this.zN=e},e.prototype.hasDrmKid=function(){return!!this.getDrmKid()},e.prototype.getDrmKid=function(){var e,t,i;return null!=(i=null!=(e=this.zN)?e:null==(t=this.yN)?void 0:t.getDrmKid())?i:void 0},e.prototype.setDrmInitData=function(e){this.xN=e},e.prototype.hasDrmInitData=function(){var e;return(null==(e=this.xN)?void 0:e.length)>0},e.prototype.getDrmInitData=function(){return this.hasDrmInitData()?this.xN:[]},e.prototype.getMimeType=function(){return this.kN},e.prototype.isInit=function(){return this.nN===r.INIT},e.prototype.isSelfInit=function(){return this.nN===r.SELF_INIT},e.prototype.isEncrypted=function(){return this.rN},e.prototype.setEncrypted=function(e){this.rN=e},e.prototype.setUrl=function(e){this.cN=e},e.prototype.getUrl=function(){return this.cN},e.prototype.getData=function(){return this.data},e.prototype.setData=function(e){this.data=e},e.prototype.getMetadata=function(){return this.bN},e.prototype.setMetadata=function(e){this.bN=e},e.prototype.getPlaybackTime=function(){return this.eN},e.prototype.setPlaybackTime=function(e){this.eN=e},e.prototype.getPlaybackEndTime=function(){return this.eN+this.mN},e.prototype.getPlaybackTimeRange=function(){return this.mN?{start:this.getPlaybackTime(),end:this.getPlaybackEndTime()}:(0,s.getSegmentInfoTimeRange)(this.getSegmentInfo())},e.prototype.getBaseMediaDecodeTime=function(){return this.gN},e.prototype.setBaseMediaDecodeTime=function(e){this.gN=e},e.prototype.getPresentationTimeOffset=function(){return this.hN},e.prototype.setPresentationTimeOffset=function(e){this.hN=e},e.prototype.getTFDTBoxOffsets=function(){return this.fN},e.prototype.setTFDTBoxOffsets=function(e){this.fN=e},e.prototype.KO=function(e){var t;return this.getParserMetadata()&&this.getParserMetadata()[e]?this.getParserMetadata()[e]:(null==(t=this.getInitSegment())?void 0:t.getParserMetadata())?this.getInitSegment().getParserMetadata()[e]:void 0},e.prototype.getTimescale=function(){return this.KO("timescale")},e.prototype.getIvSize=function(){return this.KO("ivSize")},e.prototype.getDefaultSampleDuration=function(){return this.KO("defaultSampleDuration")},e.prototype.getDefaultSampleSize=function(){return this.KO("defaultSampleSize")},e.prototype.setTimescale=function(e){this.updateParserMetadata({timescale:e})},e.prototype.getPeriodId=function(){return this.jN},e.prototype.getCodec=function(){return this.lN},e.prototype.setCodec=function(e){this.lN=e},e.prototype.getDuration=function(){return this.mN},e.prototype.setDuration=function(e){this.mN=e},e.prototype.getNetworkRequestSize=function(){return this.sN},e.prototype.getRepresentationId=function(){return this.tN},e.prototype.getParsedData=function(){return this.dN},e.prototype.setParsedData=function(e){this.dN=e},e.prototype.getSegmentInfo=function(){return this.iN},e.prototype.isIndependentlyDecodable=function(){return this.oN},e.prototype.setSegmentInfo=function(e){this.iN=e},e.prototype.getMediaInfo=function(){var e={};return this.iN&&this.iN.bitrate&&(e.bitrate=this.iN.bitrate),a.MimeTypeHelper.isAudio(this.kN)?this.iN&&this.iN.sampleRate&&(e.sampleRate=this.iN.sampleRate):a.MimeTypeHelper.isVideo(this.kN)&&(this.iN&&this.iN.width&&(e.width=this.iN.width),this.iN&&this.iN.height&&(e.height=this.iN.height),this.iN&&this.iN.frameRate&&(e.frameRate=this.iN.frameRate)),e},e.prototype.isDirty=function(){return this.uN},e.prototype.setDirty=function(e){this.uN=e},e.prototype.setInbandEvents=function(e){this.pN=e},e.prototype.getInbandEvents=function(){return this.pN},e.prototype.setLastSegment=function(e){this.qN=e},e.prototype.isLastSegment=function(){return this.qN},e.prototype.wasLoadedFrom=function(e){return this.getUrl().includes(e)},e.prototype.getParserMetadata=function(){return this.vN},e.prototype.setParserMetadata=function(e){this.vN=e},e.prototype.updateParserMetadata=function(e){this.vN=n(n({},this.vN),e)},e.prototype.setBufferBlockId=function(e){this.wN=e},e.prototype.getBufferBlockId=function(){return this.wN},e.prototype.setInitSegment=function(e){this.yN=e},e.prototype.getInitSegment=function(){return this.yN},e}(),function(e){e[e.NONE=0]="NONE",e[e.INIT=1]="INIT",e[e.SELF_INIT=2]="SELF_INIT"}(r||(t.SegmentInitType=r={}))},50827:function(e,t){function i(e){return[e.url,e.mediaURL].filter(
vendor: 9,936 bytes, line 1
1Boolean)}function n(e,t){return null==e?null==t:null!=t&&e.start===t.start&&e.end===t.end}Object.defineProperty(t,"__esModule",{value:!0}),t.isIdenticalSegmentInfo=function(e,t){if(void 0!==e.mediaSequence&&void 0!==t.mediaSequence)return e.mediaSequence===t.mediaSequence;var r=function(e,t){var n=i(e),r=i(t);return n.some(function(e){return r.includes(e)})}(e,t),o=n(e.byteRange,t.byteRange),a=e.discontinuitySequenceNumber===t.discontinuitySequenceNumber;return r&&o&&a},t.isIdenticalInitSegmentInfo=function(e,t){var i=(null==e?void 0:e.url)===(null==t?void 0:t.url),r=n(null==e?void 0:e.byteRange,null==t?void 0:t.byteRange);return i&&r}},19627:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.SegmentUnavailabilityHandler=void 0;var n=i(3714),r=i(58313);t.SegmentUnavailabilityHandler=function(){function e(e){this.tH={},this.uH=!1,this.sH=e}return e.prototype.downloadSuccess=function(e){this.uH&&e?this.uH=!1:this.tH={}},e.prototype.vH=function(e,t){for(var i=[],n=0;n<e.length&&!e[n]._internalId.equals(t);n++)this.tH[e[n]._id]||i.push(e[n]);return i.length>0?i[i.length-1]._internalId:null},e.prototype.switchQuality=function(e,t){this.tH[t.representationId]=!0;var i=this.vH(e,t);return i?(this.uH=!0,i):(this.sH.logger.log("no quality left, all tried"),null)},e.prototype.switchBaseURL=function(e){var t=e.availableBaseURLs,i=e.lastUsedBaseURLIndex+1;if((i%=t.length)===e.firstUsedBaseURLIndex)return this.sH.logger.log("no base url left, all tried"),null;var o=e.baseURL;return e.lastUsedBaseURLIndex=i,e.baseURL=t[i],e.url=r.URLHelper.concatBaseUrlWithPartial(e.baseURL,e.mediaURL),this.sH.eventHandler.dispatchEvent(n.PlayerEvent.ContentLocationChanged,{sourceLocationId:null!=o?o:"",targetLocationId:e.baseURL,reason:n.ContentLocationChangedReason.Failover}),e},e.prototype.shouldTryAlternatives=function(e){return e>=400&&e<=599||0===e},e}()},15761:function(e,t,i){var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.TimedMetadataService=void 0;var r=i(80813),o=i(56481),a=i(3714),s=i(59225),u=i(32485),c=i(91678),l=i(46151),d=i(33436),h=i(85434),p=i(79505),f=i(61800),g=i(86163);function m(e){var t=e.getSegmentInfo();return{uid:btoa(e.getUrl()),url:e.getUrl(),mimeType:e.getMimeType(),playbackTime:e.getPlaybackTime(),presentationTimestamp:e.getBaseMediaDecodeTime()/e.getTimescale(),duration:e.getDuration(),mediaInfo:e.getMediaInfo(),wallClockTime:t.wallClockTime,discontinuitySequenceNumber:t.discontinuitySequenceNumber,periodId:void 0===t.discontinuitySequenceNumber?t.periodId:void 0}}t.TimedMetadataService=function(){function e(e){var t,i=this;this.context=e,this.CG=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),i.context.eventHandler.dispatchEvent(a.PlayerEvent.Metadata,t)}},this.EG=function(e){e&&e.hasOwnProperty("metadataType")&&i.context.eventHandler.dispatchEvent(a.PlayerEvent.Metadata,{metadataType:e.metadataType,metadata:e.metadata})},this.FG=function(e){var t=e.metadata.event;return!(void 0!==t.periodId&&!i.AG.isPeriodExpected(t.periodId))&&!(void 0!==t.discontinuitySequenceNumber&&!i.zG.isDiscontinuityExpected(t.discontinuitySequenceNumber))&&(i.wG[t.mimeType]=t,i.vG[t.mimeType]=p.RepresentationId.from(e.metadata.representationId),i.zG.maybeFirePeriodSwitchEvents(t),i.AG.maybeHandlePeriodSwitch(t),i.uG[t.mimeType]&&i.uG[t.mimeType].id===t.representationId||i.GG(t),void i.context.eventHandler.dispatchEvent(a.PlayerEvent.SegmentPlayback,t))},this.uG={},this.vG={},this.wG={},this.yG=this.context.serviceManager.get(r.ServiceName.ManifestService,e.sourceContext.sourceIdentifier);var n=((t={})[u.TimedMetadataType.InBand]=this.EG,t[u.TimedMetadataType.SegmentPlayback]=this.FG,t[u.TimedMetadataType.Manifest]=this.CG,t[u.TimedMetadataType.EventStream]=this.CG,t[u.TimedMetadataType.DateRange]=this.CG,t[u.TimedMetadataType.CustomTag]=this.CG,t);this.xG=new s.MetadataService(e,n),this.zG=new f.DiscontinuityMonitor(e),this.AG=new g.PeriodSwitchMonitor(e)}return e.prototype.clearSegmentBoundMetadata=function(e){this.xG.removeMatchingCues(u.TimedMetadataType.SegmentPlayback,function(t){return t.content.metadata.mimeType===e})},e.prototype.onSegmentAvailable=function(e){var t,i=this,n=e.segment,r=e.extractedMetadata,o=e.isSegmentOfMainStream,s=e.presentationTimeOffset;if(o){t=function(e){var t=m(e),i=e.getSegmentInfo();return i.dateTime&&(t.dateTime=i.dateTime),i.representationId&&(t.representationId=i.representationId),t}(n);var u=n.getSegmentInfo();u.metadata&&u.metadata.forEach(function(e){i.MG(e,t,n.getPeriodId())}),function(e){return e.metadata&&e.metadata.length>0&&e.metadata[0].type===a.MetadataType.CUSTOM}(u)&&this.KG(u),this.IG(r,s,n.getPeriodId())}else t=m(n);this.BG(n,t),n.getInbandEvents().forEach(function(e){i.LG(e,n.getPeriodId())})},e.prototype.BG=function(e,t){if(!e.isInit()){var i=e.getSegmentInfo(),n=e.getMimeType(),r={metadata:{event:t,representationId:{_periodId:i.internalRepresentationId.periodId,_adaptationSetId:i.internalRepresentationId.adaptationSetId,_representationId:i.internalRepresentationId.representationId},mimeType:n}};this.xG.addToTimeline(u.TimedMetadataType.SegmentPlayback,t.playbackTime,r),(0,l.getMetricsState)(this.context.store.getState())[n]||this.context.store.dispatch((0,c.initializeMetricsForMimeType)(n,this.context.settings)),this.context.store.dispatch((0,c.addMetricsValue)(n,d.MetricType.SegmentInformation,{bitrate:8*e.getNetworkRequestSize()/e.getDuration(),duration:e.getDuration(),playbackTime:i.startTime||e.getPlaybackTime(),representationId:e.getRepresentationId()}))}},e.prototype.parseEventStream=function(){var e=this;this.yG.getAllPeriods().forEach(function(t){e.yG.getEventStreamEvents(t).forEach(function(i){e.DG(i,t)})})},e.prototype.DG=function(e,t){var i={metadataType:a.MetadataType.EVENT_STREAM,metadata:e.data,start:e.startTime,end:e.endTime};this.xG.addToMetadataParsedService(e.startTime,n(n({},i),{data:e.data}),t._id),this.xG.addToTimeline(u.TimedMetadataType.EventStream,e.startTime,i)},e.prototype.getPlaybackRepresentation=function(e){var t=this.context.serviceManager.get(r.ServiceName.ManifestService,this.context.sourceContext.sourceIdentifier),i=null==t?void 0:t.getRepresentationById(this.vG[e]);if(i)return i=n({},i),this.wG[e]&&(i.uid=this.wG[e].uid),i},e.prototype.trackContentBoundary=function(e){var t=e.getPeriodId();this.AG.trackIncomingPeriod(t);var i=e.getSegmentInfo().discontinuitySequenceNumber;if(void 0!==i){var n=e.getSegmentInfo().startTime,r=e.getSegmentInfo().duration,o=e.getMimeType();this.zG.trackIncomingDiscontinuity(i,o,n,r)}},e.prototype.resetContentBoundaryTracking=function(){this.AG.reset(),this.zG.reset()},e.prototype.GG=function(e){var t,i;h.MimeTypeHelper.isAudio(e.mimeType)?(t=a.PlayerEvent.AudioPlaybackQualityChanged,i={id:e.representationId,bitrate:parseFloat(e.mediaInfo.bitrate)}):h.MimeTypeHelper.isVideo(e.mimeType)&&(t=a.PlayerEvent.VideoPlaybackQualityChanged,i={id:e.representationId,bitrate:parseFloat(e.mediaInfo.bitrate),width:parseFloat(e.mediaInfo.width),height:parseFloat(e.mediaInfo.height)}),t&&this.context.eventHandler.dispatchEvent(t,{targetQuality:i,sourceQuality:this.uG[e.mimeType]||null}),this.uG[e.mimeType]=i},e.prototype.processDateRangeEvent=function(e,t){var i={metadataType:a.MetadataType.DATERANGE,metadata:e.data,start:e.startTime,end:e.endTime};this.xG.addToMetadataParsedService(e.startTime,n(n({},i),{data:e.data}),t),this.xG.addToTimeline(u.TimedMetadataType.DateRange,e.startTime,i)},e.prototype.HG=function(e,t){var i=this;e.forEach(function(e){if(e._metadata&&e._metadata.length>0&&e._playbackTime){var n={metadataType:a.MetadataType.CUSTOM,metadata:e._metadata,data:e._metadata,start:e._playbackTime,end:e._playbackTime+e._duration};i.xG.addToMetadataParsedService(e._playbackTime,n,t)}})},e.prototype.IG=function(e,t,i){var n=this;e&&Array.isArray(e.id3)&&e.id3.length>0&&e.id3.forEach(function(e){n.JG(e,t,i)})},e.prototype.JG=function(e,t,i){var r=e.presentationTime-t,o={metadataType:a.MetadataType.ID3,metadata:e.data,start:r};this.xG.addToMetadataParsedService(r,n(n({},o),{data:e.data}),i),this.xG.addToTimeline(u.TimedMetadataType.InBand,r,o)},e.prototype.KG=function(e){var t=this,i=this.yG.getRepresentationById(e.internalRepresentationId);i.SegmentList[0].SegmentURL.forEach(function(n,r){n._media===e.url&&(n._playbackTime||function(e,t,i){for(var n=t,r=i;n>=0;)e[n]._playbackTime=r,r-=e[n]._duration,n--;for(n=t+1,r=i+e[t]._duration;n<e.length;)e[n]._playbackTime=r,r+=e[n]._duration,n++}(i.SegmentList[0].SegmentURL,r,e.startTime),t.xG.addToTimeline(u.TimedMetadataType.CustomTag,e.startTime,{metadataType:a.MetadataType.CUSTOM,metadata:n._metadata,start:e.startTime,end:e.startTime+e.duration}))}),this.HG(i.SegmentList[0].SegmentURL,e.periodId)},e.prototype.LG=function(e,t){var i=e.presentationTime,r={metadataType:a.MetadataType.EMSG,metadata:e,start:i};this.xG.addToMetadataParsedService(i,n(n({},r),{data:e}),t),this.xG.addToTimeline(u.TimedMetadataType.InBand,i,r)},e.prototype.MG=function(e,t,i){var r=e.type;if(r===a.MetadataType.CUSTOM)t.EXPERIMENTAL=t.EXPERIMENTAL||{},t.EXPERIMENTAL.hlsAttributes=t.EXPERIMENTAL.hlsAttributes||[],t.EXPERIMENTAL.hlsAttributes=t.EXPERIMENTAL.hlsAttributes.concat(e.attributes);else{var o={metadataType:/^CUE-(IN|OUT(-CONT)?)$/.test(r)?a.MetadataType.CUETAG:a.MetadataType[e.type],metadata:e,start:t.playbackTime};this.xG.addToMetadataParsedService(o.start,n(n({},o),{data:e}),i),this.xG.addToTimeline(u.TimedMetadataType.Manifest,o.start,o)}},e.prototype.dispose=function(){this.xG=(0,o.dispose)(this.xG),this.yG=null,this.zG=(0,o.dispose)(this.zG),this.AG.dispose()},e}()}
1,36193:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.setRepresentationIdAction=function(e){return(0,n.createAction)(o.ActiveTracksActionType.SetSelectedRepresentationId,{selectedRepresentationId:e})},t.setMediaTypeAction=function(e,t){var i=(0,r.forceArray)(t);return(0,n.createAction)(o.ActiveTracksActionType.SetMediaType,{trackId:e,mediaTypes:i})},t.setContainerFormatAction=function(e,t){return(0,n.createAction)(o.ActiveTracksActionType.SetContainerFormat,{trackId:e,containerFormat:t})},t.removeActiveTrackAction=function(e){return(0,n.createAction)(o.ActiveTracksActionType.RemoveActiveTrack,{adaptationSetId:e})},t.clearActiveTracksAction=function(){return(0,n.createAction)(o.ActiveTracksActionType.ClearActiveTracks)};var n=i(35267),r=i(74853),o=i(7511)},7511:function(e,t){var i;Object.defineProperty(t,"__esModule",{value:!0}),t.ActiveTracksActionType=void 0,function(e){e.SetSelectedRepresentationId="@instance/sources/@source/activetracks/setselectedrepresentationid",e.SetMediaType="@instance/sources/@source/activetracks/setmediatype",e.SetContainerFormat="@instance/sources/@source/activetracks/setcontainerformat",e.RemoveActiveTrack="@instance/sources/@source/activetracks/remove",e.ClearActiveTracks="@instance/sources/@source/activetracks/clear"}(i||(t.ActiveTracksActionType=i={}))},44115:function(e,t,i){var n,r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},o=this&&this.__rest||function(e,t){var i={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(i[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(n=Object.getOwnPropertySymbols(e);r<n.length;r++)0>t.indexOf(n[r])&&Object.prototype.propertyIsEnumerable.call(e,n[r])&&(i[n[r]]=e[n[r]])}return i};Object.defineProperty(t,"__esModule",{value:!0}),t.ActiveTracksReducer=void 0,t.getContainerFormat=function(e,t){var i;if(e.activeTracks)return null==(i=Object.values(e.activeTracks).find(function(e){var i;return null==(i=e.mediaTypes)?void 0:i.includes(t)}))?void 0:i.containerFormat},t.getMediaTypes=function(e,t){var i;return e.activeTracks&&(null==(i=e.activeTracks[t.adaptationSetId])?void 0:i.mediaTypes)||[]};var a=i(3793),s=i(7511),u={};t.ActiveTracksReducer=(0,a.default)({},((n={})[s.ActiveTracksActionType.SetSelectedRepresentationId]=function(e,t){return function(e,t){var i,n=t.selectedRepresentationId,o=e[n.adaptationSetId];return r(r({},e),((i={})[n.adaptationSetId]=r(r({},o),{selectedRepresentationId:n}),i))}(e,t.payload)},n[s.ActiveTracksActionType.SetMediaType]=function(e,t){return function(e,t){var i,n=t.trackId,o=t.mediaTypes,a=e[n.adaptationSetId];return r(r({},e),((i={})[n.adaptationSetId]=r(r({},a),{mediaTypes:o}),i))}(e,t.payload)},n[s.ActiveTracksActionType.SetContainerFormat]=function(e,t){return function(e,t){var i,n=t.trackId,o=t.containerFormat,a=e[n.adaptationSetId];return r(r({},e),((i={})[n.adaptationSetId]=r(r({},a),{containerFormat:o}),i))}(e,t.payload)},n[s.ActiveTracksActionType.RemoveActiveTrack]=function(e,t){return function(e,t){var i=e,n=t.adaptationSetId.adaptationSetId,a=(i[n],o(i,["symbol"==typeof n?n:n+""]));return r({},a)}(e,t.payload)},n[s.ActiveTracksActionType.ClearActiveTracks]=function(){return u},n))},51386:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.removeEncryptionKey=t.updateEncryptionKey=t.addEncryptionKey=void 0;var n=i(35267),r=i(92096);t.addEncryptionKey=function(e){return(0,n.createAction)(r.EncryptionKeyActionKey.AddEncryptionKey,e)},t.updateEncryptionKey=function(e){return(0,n.createAction)(r.EncryptionKeyActionKey.UpdateEncryptionKey,e)},t.removeEncryptionKey=function(e){return(0,n.createAction)(r.EncryptionKeyActionKey.RemoveEncryptionKey,{keyUri:e})}},20477:function(e,t,i){var n,r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},o=this&&this.__spreadArray||function(e,t,i){if(i||2==arguments.length)for(var n,r=0,o=t.length;r<o;r++)!n&&r in t||(n||(n=Array.prototype.slice.call(t,0,r)),n[r]=t[r]);return e.concat(n||Array.prototype.slice.call(t))};
vendor: 22,235 bytes, line 1
1Object.defineProperty(t,"__esModule",{value:!0}),t.EncryptionKeyReducer=void 0;var a=i(3793),s=i(92096);t.EncryptionKeyReducer=(0,a.default)([],((n={})[s.EncryptionKeyActionKey.AddEncryptionKey]=function(e,t){var i=t.payload;return o(o([],e,!0),[r({},i)],!1)},n[s.EncryptionKeyActionKey.UpdateEncryptionKey]=function(e,t){var i=t.payload,n=e.findIndex(function(e){return e.uri===i.uri});if(-1===n)return e;var a=e[n],s=o([],e,!0);return s.splice(n,1,r(r({},a),i)),s},n[s.EncryptionKeyActionKey.RemoveEncryptionKey]=function(e,t){var i=t.payload;return o([],e,!0).filter(function(e){return e.uri!==i.keyUri})},n))},66628:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.getEncryptionKey=t.getAllEncryptionKeys=void 0,t.getAllEncryptionKeys=function(e){return null==e?void 0:e.encryptionKeys},t.getEncryptionKey=function(e,t){var i;return null==(i=null==e?void 0:e.encryptionKeys)?void 0:i.find(function(e){return e.uri===t})}},92096:function(e,t){var i,n;Object.defineProperty(t,"__esModule",{value:!0}),t.EncryptionKeyActionKey=t.KeyLoadState=void 0,function(e){e.Loading="loading",e.Loaded="loaded",e.Cancel="cancel"}(i||(t.KeyLoadState=i={})),function(e){e.AddEncryptionKey="@instance/sources/@source/encryptionkey/addEncryptionKey",e.UpdateEncryptionKey="@instance/sources/@source/encryptionkey/updateEncryptionKey",e.RemoveEncryptionKey="@instance/sources/@source/encryptionkey/removeEncryptionKey"}(n||(t.EncryptionKeyActionKey=n={}))},52447:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.engineBitmovinSourceReducers=void 0;var n=i(44115),r=i(20477),o=i(79872),a=i(88935),s=i(63184),u=i(95236),c=i(73861),l=i(41710),d=i(14808);t.engineBitmovinSourceReducers={manifest:o.ManifestReducer,activeTracks:n.ActiveTracksReducer,playingTracks:a.PlayingTracksReducer,encryptionKeys:r.EncryptionKeyReducer,buffer:c.BufferReducer,renderer:l.RendererReducer,streamTimeline:d.StreamTimelineReducer,segmentInfoMap:u.SegmentInfoMapReducer,relativeCurrentTimeOffset:s.RelativeCurrentTimeOffsetReducer}},42208:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.periodSwitchStarted=t.periodSwitchFinished=t.setPlayingPeriodId=void 0;var n=i(35267),r=i(84362);t.setPlayingPeriodId=function(e){return(0,n.createAction)(r.PlayingTracksActionKey.SetPlayingPeriodId,e)},t.periodSwitchFinished=function(e){return(0,n.createAction)(r.PlayingTracksActionKey.FinishedPeriodSwitch,e)},t.periodSwitchStarted=function(e){return(0,n.createAction)(r.PlayingTracksActionKey.StartedPeriodSwitch,e)}},88935:function(e,t,i){var n,r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.PlayingTracksReducer=t.isSwitchingPeriods=t.wasSwitchingToPeriodIdReset=t.getPlayingTracksState=t.getPlayingPeriodId=void 0;var o=i(3793),a=i(84362);t.getPlayingPeriodId=function(e){var t;return null==(t=e.playingTracks)?void 0:t.playingPeriodId},t.getPlayingTracksState=function(e){return e.playingTracks},t.wasSwitchingToPeriodIdReset=function(e,t){return void 0!==(null==t?void 0:t.switchingToPeriodId)&&void 0===(null==e?void 0:e.switchingToPeriodId)},t.isSwitchingPeriods=function(e,t){return void 0===(null==t?void 0:t.switchingToPeriodId)&&void 0!==(null==e?void 0:e.switchingToPeriodId)},t.PlayingTracksReducer=(0,o.default)({},((n={})[a.PlayingTracksActionKey.SetPlayingPeriodId]=function(e,t){var i=t.payload;return r(r({},e),{playingPeriodId:i})},n[a.PlayingTracksActionKey.FinishedPeriodSwitch]=function(e,t){var i=t.payload;return r(r({},e),{switchingToPeriodId:e.switchingToPeriodId===i?void 0:e.switchingToPeriodId})},n[a.PlayingTracksActionKey.StartedPeriodSwitch]=function(e,t){var i=t.payload;return r(r({},e),{switchingToPeriodId:i})},n))},84362:function(e,t){var i;Object.defineProperty(t,"__esModule",{value:!0}),t.PlayingTracksActionKey=void 0,function(e){e.SetPlayingPeriodId="@instance/sources/@source/playingTracks/setPlayingPeriodId",e.FinishedPeriodSwitch="@instance/sources/@source/playingTracks/periodSwitchFinished",e.StartedPeriodSwitch="@instance/sources/@source/playingTracks/periodSwitchStarted"}(i||(t.PlayingTracksActionKey=i={}))},27531:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.RelativeCurrentTimeOffsetActionType=void 0,t.setRelativeCurrentTimeOffset=function(e){return(0,r.createAction)(n.SetRelativeCurrentTimeOffset,e)};var n,r=i(35267);!function(e){e.SetRelativeCurrentTimeOffset="@instance/source/setrelativecurrenttimeoffset"}(n||(t.RelativeCurrentTimeOffsetActionType=n={}))},63184:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.RelativeCurrentTimeOffsetReducer=void 0;var n,r=i(3793),o=i(27531);t.RelativeCurrentTimeOffsetReducer=(0,r.default)(null,((n={})[o.RelativeCurrentTimeOffsetActionType.SetRelativeCurrentTimeOffset]=function(e,t){return t.payload},n))},33903:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.getRelativeCurrentTimeOffset=void 0,t.getRelativeCurrentTimeOffset=function(e){var t;return null!=(t=null==e?void 0:e.relativeCurrentTimeOffset)?t:null}},10333:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.sourceIdentifiersSelector=t.hasASourceStoreIdentifierChanged=void 0,t.hasASourceStoreIdentifierChanged=function(e,t){return e.length!==t.length||e.some(function(e){return!t.includes(e)})},t.sourceIdentifiersSelector=function(e){var t;return Object.keys(null!=(t=e.sources)?t:{})}},59707:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.setManifestAction=function(e){return(0,n.createAction)(r.ManifestActionType.SetManifest,{manifest:e})},t.setManifestInitializedAction=function(e){return(0,n.createAction)(r.ManifestActionType.SetManifestInitialized,{isInitialized:e})},t.removeRepresentationsAction=function(e){return(0,n.createAction)(r.ManifestActionType.RemoveRepresentations,{representationIds:e})},t.updateManifestAction=function(e){return(0,n.createAction)(r.ManifestActionType.UpdateManifest,e)},t.updateAdaptationSetAction=function(e,t){return(0,n.createAction)(r.ManifestActionType.UpdateAdaptationSet,{adaptationSetId:e,updates:t})},t.updateRepresentationAction=function(e){return(0,n.createAction)(r.ManifestActionType.UpdateRepresentation,e)},t.updatePeriodTimingAction=function(e,t){return(0,n.createAction)(r.ManifestActionType.UpdatePeriodTiming,{periodId:e,timing:t})},t.adjustPeriodStartTimes=function(e){return(0,n.createAction)(r.ManifestActionType.AdjustPeriodStartTimes,{offset:e})},t.setRepresentationDrmKidAction=function(e,t){return(0,n.createAction)(r.ManifestActionType.SetRepresentationDrmKid,{representationId:e,associatedKid:t})},t.updateRepresentationFailedDownloadAction=function(e,t){return(0,n.createAction)(r.ManifestActionType.UpdateRepresentationFailedDownload,{representationId:e,loadFailureReason:t})},t.setRepresentationSegmentIndexAction=function(e,t){return(0,n.createAction)(r.ManifestActionType.SetRepresentationSegmentIndex,{representationId:e,segmentIndex:t})},t.setRepresentationIsLoadingAction=function(e,t){return(0,n.createAction)(r.ManifestActionType.SetRepresentationIsLoading,{representationId:e,isLoading:t})},t.setRepresentationSegmentIndexParsingErrorAction=function(e,t){return(0,n.createAction)(r.ManifestActionType.SetRepresentationSegmentIndexParsingError,{representationId:e,segmentIndexParsingError:t})},t.setRepresentationAnchorPointAction=function(e,t){return(0,n.createAction)(r.ManifestActionType.SetRepresentationAnchorPoint,{representationId:e,anchorPoint:t})},t.initPlaybackTimesFromIndex=function(e,t,i){return(0,n.createAction)(r.ManifestActionType.InitPlaybackTimesFromIndex,{representationId:e,index:t,playbackTimeForIndex:i})},t.initPlaybackTimesFromReferenceSegment=function(e){return(0,n.createAction)(r.ManifestActionType.InitPlaybackTimesFromReferenceSegment,{representationId:e.getRepresentationId(),segmentUrl:e.getUrl(),segmentPlaybackTime:e.getPlaybackTime(),discontinuitySequenceNumber:e.getSegmentInfo().discontinuitySequenceNumber})},t.resetSegmentPlaybackTimes=function(){return(0,n.createAction)(r.ManifestActionType.ResetSegmentPlaybackTimes)};var n=i(35267),r=i(71050)},79872:function(e,t,i){var n,r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},o=this&&this.__spreadArray||function(e,t,i){if(i||2==arguments.length)for(var n,r=0,o=t.length;r<o;r++)!n&&r in t||(n||(n=Array.prototype.slice.call(t,0,r)),n[r]=t[r]);return e.concat(n||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.ManifestReducer=void 0;var a=i(3793),s=i(15014),u=i(13422),c=i(71050);function l(e,t,i){var n,o;return r(r({},e),{Period:null!=(o=null==(n=e.Period)?void 0:n.map(function(e){var n;return r(r({},e),{AdaptationSet:null==(n=e.AdaptationSet)?void 0:n.map(function(e){var n;return r(r({},e),{Representation:null==(n=e.Representation)?void 0:n.map(function(e){return e._internalId.equals(t)?r(r({},e),i):e})})})})}))?o:[]})}function d(e,t,i){var n=o([],e,!0);return n[t]=r({},n[t]),n[t]._playbackTime=i,function(e,t){for(var i=t-1;i>=0;i--)e[i]=r({},e[i]),e[i]._playbackTime=e[i+1]._playbackTime-e[i]._duration}(n,t),function(e,t){for(var i=t+1;i<e.length;i++)e[i]=r({},e[i]),e[i]._playbackTime=e[i-1]._playbackTime+e[i-1]._duration}(n,t),n}function h(e){return r(r({},e),{SegmentURL:e.SegmentURL.map(function(e){var t=r({},e);return delete t._playbackTime,t})})}t.ManifestReducer=(0,a.default)({},((n={})[c.ManifestActionType.SetManifest]=function(e,t){return t.payload.manifest||e},n[c.ManifestActionType.SetManifestInitialized]=function(e,t){return r(r({},e),{isInitialized:t.payload.isInitialized})},n[c.ManifestActionType.RemoveRepresentations]=function(e,t){return 0===t.payload.representationIds.length?e:(0,u.removeRepresentations)(e,t.payload.representationIds)},n[c.ManifestActionType.UpdateManifest]=function(e,t){return function(e,t){return r(r({},e),t)}(e,t.payload)},n[c.ManifestActionType.UpdateAdaptationSet]=function(e,t){return function(e,t){var i,n=t.adaptationSetId,a=t.updates,s=e.Period.findIndex(function(e){return e._id===n.periodId});if(s<0)return e;var u=null==(i=e.Period[s])?void 0:i.AdaptationSet.findIndex(function(e){return e._internalId.equals(n)});if(u<0)return e;var c=r({},e);c.Period=o([],c.Period,!0),c.Period[s]=r({},c.Period[s]);var l=c.Period[s];return l.AdaptationSet=o([],l.AdaptationSet,!0),l.AdaptationSet[u]=r(r({},l.AdaptationSet[u]),a),c}(e,t.payload)},n[c.ManifestActionType.UpdateRepresentation]=function(e,t){return function(e,t){var i,n,a,s=t,u=s._internalId;if(!e.Period)return e;var c=e.Period.findIndex(function(e){return e._id===u.periodId}),l=null==(i=e.Period[c])?void 0:i.AdaptationSet.findIndex(function(e){return e._internalId.equals(u)}),d=null==(a=null==(n=e.Period[c])?void 0:n.AdaptationSet[l])?void 0:a.Representation.findIndex(function(e){return e._internalId.equals(u)}),h=r({},e);h.Period=o([],h.Period,!0),h.Period[c]=r({},h.Period[c]);var p=h.Period[c];p.AdaptationSet=o([],p.AdaptationSet,!0),p.AdaptationSet[l]=r({},p.AdaptationSet[l]);var f=p.AdaptationSet[l];return f.Representation=o([],f.Representation,!0),f.Representation[d]=s,h}(e,t.payload)},n[c.ManifestActionType.UpdateRepresentationFailedDownload]=function(e,t){var i,n,o=t.payload,a=o.representationId,s=o.loadFailureReason,u=function(e){var t;return e._internalId.equals(a)?s:null==(t=e._hls)?void 0:t.loadFailureReason};return r(r({},e),{Period:null!=(n=null==(i=e.Period)?void 0:i.map(function(e){var t;return r(r({},e),{AdaptationSet:null==(t=e.AdaptationSet)?void 0:t.map(function(e){var t;return r(r({},e),{Representation:null==(t=e.Representation)?void 0:t.map(function(e){return r(r({},e),{_hls:r(r({},e._hls),{loadFailureReason:u(e)})})})})})})}))?n:[]})},n[c.ManifestActionType.AdjustPeriodStartTimes]=function(e,t){return t.payload.offset?r(r({},e),{Period:e.Period.map(function(e){return r(r({},e),{start:e.start+t.payload.offset})})}):e},n[c.ManifestActionType.UpdatePeriodTiming]=function(e,t){return function(e,t){if(!e.Period)return e;var i=t.periodId,n=t.timing,a=e.Period.findIndex(function(e){return e._id===i});if(a<0)return e;var s=o([],e.Period,!0);return s[a]=r(r({},s[a]),n),r(r({},e),{Period:s})}(e,t.payload)},n[c.ManifestActionType.SetRepresentationDrmKid]=function(e,t){var i=t.payload;return l(e,i.representationId,{associatedKid:i.associatedKid})},n[c.ManifestActionType.SetRepresentationIsLoading]=function(e,t){var i=t.payload;return l(e,i.representationId,{isLoading:i.isLoading})},n[c.ManifestActionType.SetRepresentationSegmentIndex]=function(e,t){var i=t.payload;return l(e,i.representationId,{segmentIndex:i.segmentIndex})},n[c.ManifestActionType.SetRepresentationSegmentIndexParsingError]=function(e,t){var i=t.payload;return l(e,i.representationId,{segmentIndexParsingError:i.segmentIndexParsingError})},n[c.ManifestActionType.SetRepresentationAnchorPoint]=function(e,t){var i=t.payload;return l(e,i.representationId,{anchorPoint:i.anchorPoint})},n[c.ManifestActionType.InitPlaybackTimesFromIndex]=function(e,t){var i,n=t.payload,o=n.representationId,a=n.index,u=n.playbackTimeForIndex,c=(0,s.findRepresentation)(e,o);return c?l(e,o,r(r({},c),{SegmentList:null==(i=c.SegmentList)?void 0:i.map(function(e){return r(r({},e),{SegmentURL:d(e.SegmentURL,a,u)})})})):e},n[c.ManifestActionType.InitPlaybackTimesFromReferenceSegment]=function(e,t){var i,n=t.payload,o=n.representationId,a=n.segmentUrl,u=n.segmentPlaybackTime,c=n.discontinuitySequenceNumber,h=(0,s.findRepresentation)(e,o);if(!(null==h?void 0:h.SegmentList)||0===h.SegmentList.length||void 0!==(null==(i=h.SegmentList[0].SegmentURL[0])?void 0:i._playbackTime)||void 0===u)return e;var p=h.SegmentList[0].SegmentURL.findIndex(function(e){return e._media===a&&e._discontinuitySequenceNumber===c});return -1===p?e:l(e,o,r(r({},h),{SegmentList:h.SegmentList.map(function(e){return r(r({},e),{SegmentURL:d(e.SegmentURL,p,u)})})}))},n[c.ManifestActionType.ResetSegmentPlaybackTimes]=function(e){return r(r({},e),{Period:e.Period.map(function(e){return r(r({},e),{AdaptationSet:e.AdaptationSet.map(function(e){return r(r({},e),{Representation:e.Representation.map(function(e){var t;return r(r({},e),{SegmentList:null==(t=e.SegmentList)?void 0:t.map(h)})})})})})})})},n))},62198:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.getManifest=void 0,t.getManifest=function(e){return null==e?void 0:e.manifest}},71050:function(e,t){var i;Object.defineProperty(t,"__esModule",{value:!0}),t.ManifestActionType=void 0,function(e){e.SetManifest="@instance/manifest/setmanifest",e.SetManifestInitialized="@instance/manifest/setmanifestinitialized",e.RemoveRepresentations="@instance/manifest/removerepresentations",e.UpdateManifest="@instance/manifest/updatemanifest",e.UpdateAdaptationSet="@instance/manifest/updateadaptationset",e.UpdateRepresentation="@instance/manifest/updaterepresentation",e.UpdatePeriodTiming="@instance/manifest/updateperiodtiming",e.AdjustPeriodStartTimes="@instance/manifest/adjustperiodstarttimes",e.SetRepresentationDrmKid="@instance/manifest/setrepresentationdrmkid",e.UpdateRepresentationFailedDownload="@instance/manifest/setrepresentationfaileddownload",e.SetRepresentationSegmentIndex="@instance/manifest/setrepresentationsegmentindex",e.SetRepresentationIsLoading="@instance/manifest/setrepresentationisloading",e.SetRepresentationSegmentIndexParsingError="@instance/manifest/setrepresentationsegmentindexparsingerror",e.SetRepresentationAnchorPoint="@instance/manifest/setrepresentationacnhorpoint",e.InitPlaybackTimesFromIndex="@instance/manifest/initplaybacktimesfromindex",e.InitPlaybackTimesFromReferenceSegment="@instance/manifest/initplaybacktimesfromreferencesegment",e.ResetSegmentPlaybackTimes="@instance/manifest/resetsegmentplaybacktimes"}(i||(t.ManifestActionType=i={}))},95236:function(e,t,i){var n,r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},o=this&&this.__spreadArray||function(e,t,i){if(i||2==arguments.length)for(var n,r=0,o=t.length;r<o;r++)!n&&r in t||(n||(n=Array.prototype.slice.call(t,0,r)),n[r]=t[r]);return e.concat(n||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.SegmentInfoMapReducer=void 0;var a=i(3793),s=i(37641),u=i(49713);function c(e,t,i){var n;return r(r({},e),((n={})[t]=i,n))}t.SegmentInfoMapReducer=(0,a.default)({},((n={})[u.SegmentInfoMapActionType.SetSegmentInfos]=function(e,t){return c(e,t.payload.qualityPath,t.payload.updatedEntry)},n[u.SegmentInfoMapActionType.UpdateSegmentInfos]=function(e,t){return function(e,t,i){if(!e[t]||0===i.segmentInfos.length)return c(e,t,i);var n=e[t].segmentInfos,a=n.findIndex(function(e){return(0,s.areSegmentsIdentical)(e,i.segmentInfos[0])});if(-1===a)return c(e,t,i);var u,l,d=n.length-a,h=i.segmentInfos.length-d;if(0!==a||0!==h){var p=h>0?i.segmentInfos.slice(-h):[];l=o(o([],n.slice(a),!0),p,!0)}else l=n;var f=r(r(r({},e[t]),i),{segmentInfos:l});return r(r({},e),((u={})[t]=f,u))}(e,t.payload.qualityPath,t.payload.updatedEntry)},n))},72498:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.getMostRecentlyRefreshedQuality=t.getSegmentInfos=t.getSegmentMapEntry=void 0,t.getSegmentMapEntry=function(e,t){return null==e?void 0:e.segmentInfoMap[t]},t.getSegmentInfos=function(e,i){var n,r;return null!=(r=null==(n=(0,t.getSegmentMapEntry)(e,i))?void 0:n.segmentInfos)?r:[]},t.getMostRecentlyRefreshedQuality=function(e){if(e)return Object.values(e.segmentInfoMap).filter(function(e){return null!=e.qualityInfo.lastUpdateTimestamp}).sort(function(e,t){var i=e.qualityInfo.lastUpdateTimestamp;return t.qualityInfo.lastUpdateTimestamp-i})[0]}},49713:function(e,t){var i;Object.defineProperty(t,"__esModule",{value:!0}),t.SegmentInfoMapActionType=void 0,function(e){e.SetSegmentInfos="@instance/sources/@source/playback/setSegmentInfos",e.UpdateSegmentInfos="@instance/sources/@source/playback/updateSegmentInfos"}(i||(t.SegmentInfoMapActionType=i={}))},59604:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.mergeBufferBlockTimeRanges=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var i=a(e);return Object.keys(i).flatMap(function(e){return n.BufferRangeHelper.mergeRanges(i[e],r)})},t.excludeBufferBlockTimeRange=function(e,t){var i=t.bufferBlockId,s=a(e.map(function(e){return o(e.start,e.end,e.bufferBlockId)})),u=s[i];if(!(null==u?void 0:u.length))return e;var c=function(e,t){var i=[];return e.forEach(function(e){(0,n.areDisjoint)(e,t)?i.push(e):(0,n.isSurrounding)(e,t)?i.push.apply(i,function(e,t){return[o(e.start,t.start,e.bufferBlockId),o(t.end,e.end,e.bufferBlockId)]}(e,t)):(0,n.isFullyIncluded)(e,t)||i.push(function(e,t){return o(e.start>=t.start?t.end:e.start,e.end>t.end?e.end:t.start,e.bufferBlockId)}(e,t))}),i.filter(function(e){return e.end-e.start>=r})}(u,t);return s[i]=n.BufferRangeHelper.mergeRanges(c,r),Object.keys(s).flatMap(function(e){return s[e]})},t.segmentToBufferBlockTimeRange=function(e){var t,i=null!=(t=e.getBufferBlockId())?t:1/0,n=e.getPlaybackTime();return o(n,n+e.getDuration(),i)};var n=i(4524),r=.1;function o(e,t,i){return{start:(0,n.rangeFixedValue)(e),end:(0,n.rangeFixedValue)(t),bufferBlockId:i}}function a(e){var t={};return e.forEach(function(e){t[e.bufferBlockId]||(t[e.bufferBlockId]=[]),t[e.bufferBlockId].push(e)}),t}},73861:function(e,t,i){var n,r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},o=this&&this.__spreadArray||function(e,t,i){if(i||2==arguments.length)for(var n,r=0,o=t.length;r<o;r++)!n&&r in t||(n||(n=Array.prototype.slice.call(t,0,r)),n[r]=t[r]);return e.concat(n||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.BufferReducer=void 0;var a=i(4524),s=i(3793),u=i(70118),c=i(59604);t.BufferReducer=(0,s.default)({isLoadingRangeFinished:!1,isBufferBlockSwitchOngoing:!1,isTimestampRollingOver:!1,bufferStateMap:{}},((n={})[u.BufferActionType.SetBufferMaxSize]=function(e,t){var i,n=t.payload;return r(r({},e),{bufferStateMap:r(r({},e.bufferStateMap),((i={})[n.mimeType]=r(r({},e.bufferStateMap[n.mimeType]),{maxBufferSize:n.maxBufferSize}),i))})},n[u.BufferActionType.SetRendererRanges]=function(e,t){var i,n=t.payload;return r(r({},e),{bufferStateMap:r(r({},e.bufferStateMap),((i={})[n.mimeType]=r(r({},e.bufferStateMap[n.mimeType]),{rendererRanges:n.ranges}),i))})},n[u.BufferActionType.SetBufferBlockSwitchOngoing]=function(e,t){var i=t.payload;return r(r({},e),{isBufferBlockSwitchOngoing:i.isOngoing})},n[u.BufferActionType.SetTimestampRollingOver]=function(e,t){var i=t.payload;return r(r({},e),{isTimestampRollingOver:i.isRollingOver})},n[u.BufferActionType.AddLoadedRange]=function(e,t){var i,n,s,u=t.payload,l=u.mimeType,d=u.range;if(!l)return e;var h=null!=(s=null==(n=e.bufferStateMap[l])?void 0:n.loadedRanges)?s:[];return h.some(function(e){return(0,a.isFullyIncluded)(d,e)})?e:r(r({},e),{bufferStateMap:r(r({},e.bufferStateMap),((i={})[l]=r(r({},e.bufferStateMap[l]),{loadedRanges:c.mergeBufferBlockTimeRanges.apply(void 0,o(o([],h,!1),[d],!1))}),i))})},n[u.BufferActionType.RemoveLoadedRange]=function(e,t){var i,n,o,s=t.payload,u=s.mimeType,l=s.range;if(!u)return e;var d=null!=(o=null==(n=e.bufferStateMap[u])?void 0:n.loadedRanges)?o:[];return d.every(function(e){return!(0,a.isOverlapping)(l,e)})?e:r(r({},e),{bufferStateMap:r(r({},e.bufferStateMap),((i={})[u]=r(r({},e.bufferStateMap[u]),{loadedRanges:(0,c.excludeBufferBlockTimeRange)(d,l)}),i))})},n[u.BufferActionType.ResetLoadedRanges]=function(e,t){var i,n,o,a=t.payload.mimeType;if(void 0===a){if(void 0===e)return{isLoadingRangeFinished:!1,isBufferBlockSwitchOngoing:!1,isTimestampRollingOver:!1,bufferStateMap:{}};var s=r(r({},e),{bufferStateMap:r({},e.bufferStateMap)});
1return Object.keys(s.bufferStateMap).forEach(function(e){s.bufferStateMap[e]=r(r({},s.bufferStateMap[e]),{loadedRanges:[]})}),s}return(null!=(o=null==(n=e.bufferStateMap[a])?void 0:n.loadedRanges)?o:[]).length>0?r(r({},e),{bufferStateMap:r(r({},e.bufferStateMap),((i={})[a]=r(r({},e.bufferStateMap[a]),{loadedRanges:[]}),i))}):e},n[u.BufferActionType.SetLoadingRangeFinished]=function(e,t){var i=t.payload.isFinished;return i!==e.isLoadingRangeFinished?r(r({},e),{isLoadingRangeFinished:i}):e},n))},13114:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.getDrmUsedKeySystem=t.getDrmKeyIdsWithErrors=t.getDrmState=void 0,t.getDrmState=function(e){return null==e?void 0:e.drm},t.getDrmKeyIdsWithErrors=function(e){var t,i;return null!=(i=null==(t=e.drm)?void 0:t.keyIdsWithErrors)?i:[]},t.getDrmUsedKeySystem=function(e){var i;return(null==(i=(0,t.getDrmState)(e))?void 0:i.usedKeySystem)||{kind:null,uid:null}}},41710:function(e,t,i){var n,r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.RendererReducer=void 0;var o=i(3793),a=i(39564);t.RendererReducer=(0,o.default)({mseObjectUrl:""},((n={})[a.RendererActionType.SetMseObjectUrl]=function(e,t){var i=t.payload;return r(r({},e),{mseObjectUrl:i.url})},n))},39523:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.addStreamTimeRange=function(e,t,i){var o={start:t.start,end:t.end,type:i};return(0,n.createAction)(r.StreamTimelineActionType.StreamTimeRangeAdd,{mimeType:e,streamTimeRange:o})},t.removeStreamTimeRange=function(e,t,i){return(0,n.createAction)(r.StreamTimelineActionType.StreamTimeRangeRemove,{mimeType:e,range:t,type:i})},t.resetStreamTimeline=function(e){return(0,n.createAction)(r.StreamTimelineActionType.StreamTimelineReset,e)};var n=i(35267),r=i(80965)},14808:function(e,t,i){var n,r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},o=this&&this.__spreadArray||function(e,t,i){if(i||2==arguments.length)for(var n,r=0,o=t.length;r<o;r++)!n&&r in t||(n||(n=Array.prototype.slice.call(t,0,r)),n[r]=t[r]);return e.concat(n||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.getStreamTimeline=t.StreamTimelineReducer=void 0;var a=i(4524),s=i(3793),u=i(99529),c=i(80965),l={};t.StreamTimelineReducer=(0,s.default)(l,((n={})[c.StreamTimelineActionType.StreamTimeRangeAdd]=function(e,t){return function(e,t,i){var n,a=e[t]?o([],e[t],!0):[];return r(r({},e),((n={})[t]=(0,u.addStreamTimeRangeToTimeline)(a,i),n))}(e,t.payload.mimeType,t.payload.streamTimeRange)},n[c.StreamTimelineActionType.StreamTimeRangeRemove]=function(e,t){return function(e,t,i,n){if(!e[t])return e;var s,c=o([],e[t],!0);if(n){var l=r(r({},i),{type:n});c=(0,u.removeStreamTimeRangeFromTimeline)(c,l)}else c=a.BufferRangeHelper.excludeTimeRange(c,i);return r(r({},e),((s={})[t]=c,s))}(e,t.payload.mimeType,t.payload.range,t.payload.type)},n[c.StreamTimelineActionType.StreamTimelineReset]=function(e,t){return function(e,t){var i;return t?r(r({},e),((i={})[t]=[],i)):l}(e,t.payload)},n)),t.getStreamTimeline=function(e){var t;return null!=(t=null==e?void 0:e.streamTimeline)?t:{}}},80965:function(e,t){var i;Object.defineProperty(t,"__esModule",{value:!0}),t.StreamTimelineActionType=void 0,function(e){e.StreamTimelineReset="@instance/source/stream/streamtimelinereset",e.StreamTimeRangeRemove="@instance/source/stream/streamtimerangeremove",e.StreamTimeRangeAdd="@instance/source/stream/streamtimerangeadd"}(i||(t.StreamTimelineActionType=i={}))},99529:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.StreamTimeRangeType=void 0,t.addStreamTimeRangeToTimeline=function(e,t){var i=e.filter(function(e){return e.type===t.type}).concat(t),n=r.BufferRangeHelper.mergeRanges(i,o.DefaultSettings.GAP_TOLERANCE);return e=e.filter(function(e){return e.type!==t.type}
vendor: 8,327 bytes, line 1
1),n.forEach(function(t){e=a.ArrayHelper.insertInSortedArray(e,t,function(e){return e.start>t.start})}),e},t.removeStreamTimeRangeFromTimeline=function(e,t){var i=e.filter(function(e){return e.type===t.type}),n=r.BufferRangeHelper.excludeTimeRange(i,t);return e=e.filter(function(e){return e.type!==t.type}),n.forEach(function(t){t.end-t.start>o.DefaultSettings.GAP_TOLERANCE&&(e=a.ArrayHelper.insertInSortedArray(e,t,function(e){return e.start>t.start}))}),e},t.getTrackIdentifier=function(e){var t=e.mimeType,i=e.internalRepresentationId;return s.MimeTypeHelper.isSubtitle(t)?"".concat(t,"/").concat(i.adaptationSetId):t};var n,r=i(4524),o=i(70962),a=i(74853),s=i(85434);!function(e){e.Loading="loading",e.Failed="failed"}(n||(t.StreamTimeRangeType=n={}))},16870:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.SynchronizedTimeService=void 0;var n=i(89927),r=i(55938),o=i(58747),a=i(58486);t.SynchronizedTimeService=function(){function e(e,t){this.SG=e,this.TG=t,this.UG=0;var i=new a.HttpHeadTimeProvider(this.SG,new o.ISO8601TimeDecoder),n=new a.HttpGetTimeProvider(this.SG,new o.XSDateTimeDecoder),r=new a.HttpGetTimeProvider(this.SG,new o.ISO8601TimeDecoder),s=new a.StringTimeProvider(new o.XSDateTimeDecoder);this.VG={"urn:mpeg:dash:utc:http-head:2012":i,"urn:mpeg:dash:utc:http-head:2014":i,"urn:mpeg:dash:utc:http-xsdate:2012":n,"urn:mpeg:dash:utc:http-xsdate:2014":n,"urn:mpeg:dash:utc:http-iso:2012":r,"urn:mpeg:dash:utc:http-iso:2014":r,"urn:mpeg:dash:utc:direct:2012":s,"urn:mpeg:dash:utc:direct:2014":s},this.YG()}return e.prototype.YG=function(){var e=(0,r.getUtcTimingSources)(this.SG.config,this.TG.source);e.length>0&&this.synchronizeWithServer(e)},e.prototype.getTimeDifference=function(){return this.UG},e.prototype.ZG=function(e){var t=this,i=e.shift();if(!i)return Promise.reject(Error("No time source left to try"));if(!this.VG[i.schemeIdUri])return this.SG.logger.debug("UTCTiming scheme ".concat(i.schemeIdUri," is not supported.")),this.ZG(e);this.WG=this.VG[i.schemeIdUri];var n=Date.now();return this.WG.requestTime(i.value).then(function(e){return e+(Date.now()-n)/2}).catch(function(){return t.SG.logger.debug("UTCTiming scheme ".concat(i.schemeIdUri," resulted in an error")),t.ZG(e)})},e.prototype.synchronizeWithServer=function(e,t){var i=this;return void 0===t&&(t=0),this.XG||(this.XG=this.ZG(e).then(function(e){i.WG=void 0,i.UG=e+(0,n.toMilliSeconds)(t)-Date.now(),i.SG.logger.debug("Synchronized client time with time server - drift: ".concat((0,n.toSeconds)(i.UG),"s"))}).catch(function(){i.SG.logger.debug("Synchronizing client time with time server unsuccessful")})),this.XG},e.prototype.getSynchronizationPromise=function(){return this.XG},e.prototype.reset=function(){this.UG=0,this.XG=void 0,this.WG&&(this.WG.cancelRequest(),this.WG=void 0)},e.prototype.dispose=function(){this.reset()},e}()},58747:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.XSDateTimeDecoder=t.ISO8601TimeDecoder=void 0,t.ISO8601TimeDecoder=function(){function e(){}return e.prototype.decode=function(e){return Date.parse(e)},e}(),t.XSDateTimeDecoder=function(){function e(){}return e.prototype.decode=function(t){var i=Date.parse(t);if(isNaN(i)){var n=e.DATETIME_REGEX.exec(t);if(!n)return NaN;var r=Date.UTC(parseInt(n[1],10),parseInt(n[2],10)-1,parseInt(n[3],10),parseInt(n[4],10),parseInt(n[5],10),n[6]&&parseInt(n[6],10)||0,n[7]&&1e3*parseFloat(n[7])||0);if(n[9]&&n[10]){var o=60*parseInt(n[9],10)+parseInt(n[10],10);r+=("+"===n[8]?-1:1)*o*6e4}return new Date(r).getTime()}return i},e.DATETIME_REGEX=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2})(?::(\d*)(\.\d*)?)?(?:([+-])(\d{2}):(\d{2}))?/,e}()},58486:function(e,t,i){var n=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(t,i)};return function(t,i){if("function"!=typeof i&&null!==i)throw TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.StringTimeProvider=t.HttpHeadTimeProvider=t.HttpGetTimeProvider=t.HttpTimeProvider=t.ServerTimeProvider=void 0;var r=i(4129),o=i(29669),a=function(e){this.timeDecoder=e};t.ServerTimeProvider=a;var s=function(e){function t(t,i){var n=e.call(this,i)||this;return n.N2=t,n}return n(t,e),t.prototype.P2=function(e){var t=this,i=e.shift();return i?(this.O2=new r.DefaultContentLoader(this.N2,{requestType:o.HttpRequestType.TIME_SYNC,maxRetries:1}),this.O2.load(i,this.requestMethod).then(function(e){var i=t.timeDecoder.decode(t.processResponse(e));return t.O2=void 0,isNaN(i)?Promise.reject(Error("Failed to decode time")):Promise.resolve(i)}).catch(function(i){return t.N2.logger.debug("could not load UTC time url",i),t.P2(e)})):Promise.reject(Error("No time source left to try"))},t.prototype.requestTime=function(e){var t=this,i=e.match(/\S+/g);return i?this.P2(i).then(function(e){return t.O2=void 0,e}):Promise.reject(Error("No time source left to try"))},t.prototype.cancelRequest=function(){this.O2&&this.O2.cancel()},t}(a);t.HttpTimeProvider=s;var u=function(e){function t(t,i){var n=e.call(this,t,i)||this;return n.requestMethod=o.HttpRequestMethod.GET,n}return n(t,e),t.prototype.processResponse=function(e){return e.body},t}(s);t.HttpGetTimeProvider=u,t.HttpHeadTimeProvider=function(e){function t(t,i){var n=e.call(this,t,i)||this;return n.requestMethod=o.HttpRequestMethod.HEAD,n}return n(t,e),t.prototype.processResponse=function(e){var t=Object.keys(e.headers).find(function(e){return"date"===e.toLocaleLowerCase()});return t&&e.headers[t]||""},t}(u),t.StringTimeProvider=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.requestTime=function(e){var t=this.timeDecoder.decode(e);return isNaN(t)?Promise.reject(Error("Failed to decode time")):Promise.resolve(t)},t.prototype.cancelRequest=function(){},t}(a)},55938:function(e,t,i){var n=this&&this.__spreadArray||function(e,t,i){if(i||2==arguments.length)for(var n,r=0,o=t.length;r<o;r++)!n&&r in t||(n||(n=Array.prototype.slice.call(t,0,r)),n[r]=t[r]);return e.concat(n||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.getUtcTimingSources=function(e,t){var i=[];return(function(e,t){var i,r,o=(null==(i=e.live)?void 0:i.synchronization)||[],a=(null==(r=t.live)?void 0:r.synchronization)||[];return n(n([],o,!0),a.filter(function(e){return!o.some(function(t){return t.method===e.method})}),!0)})(e,t).forEach(function(e){var t=function(e){switch(e){case r.LiveSynchronizationMethod.HttpHead:return"urn:mpeg:dash:utc:http-head:2014";case r.LiveSynchronizationMethod.HttpXsDate:return"urn:mpeg:dash:utc:http-xsdate:2014";case r.LiveSynchronizationMethod.HttpIso:return"urn:mpeg:dash:utc:http-iso:2014";default:return}}(e.method);t&&i.push({schemeIdUri:t,value:e.serverUrl})}),i};var r=i(21281)},69102:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.areAudioMimeCodecsCompatible=function(e,t){return e.mimeType===t.mimeType&&n.CodecStringHelper.canSwitchBetweenAudioCodecs(e.codec,t.codec)},t.hasContentProtection=function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=[]),0===e.length&&0===t.length||e.length>0&&t.length>0};var n=i(34047)},90919:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.findSegmentUrlIndexWithinSegmentList=function(e,t){return t.findIndex(function(t){var i=e.discontinuitySequenceNumber===t._discontinuitySequenceNumber,o=r(e.url,t._media),a=(0,n.compareValues)(e.byteRange,t._byteRange);return i&&o&&a})},t.matchesMediaUrl=r;var n=i(19541);function r(e,t){return e.endsWith(t)||e.split("?")[0].endsWith(t)}},48954:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.getValues=function(e){var t=[];return e.forEach(function(e){t.push(e)}),t},t.getKeys=function(e){var t=[];return e.forEach(function(e,i){t.push(i)}),t}},42614:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.getMinSafeStartupBuffer=function(e,t){if((0,r.isTizen2016)()){var i=t.map(function(e){return n.MimeTypeHelper.getMediaType(e)}).map(function(t){return e.bufferSettings.getForwardTargetLevel(t)}
1);return Math.max.apply(Math,i)}return(0,r.isWebOs2019OrOlder)()||(0,r.isLegacyEdge)()?6:(0,r.isTizen2017)()||(0,r.isTizen2018)()||(0,r.isTizen2019)()||(0,r.isWebOs2020)()?4:0};var n=i(85434),r=i(15487)},33004:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.bytesToBits=function(e){return 8*e}},68981:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.adjustTargetTimeToPeriodStart=function(e,t,i,n){var r,o=i.getPeriodIdForTime(e);if(!o)return e;var a=i.isTimeNearPeriodEnd(e,o,t),s=i.getNextPeriod(o);return a&&s?(n.debug("Target time ".concat(e," too close to end of period ").concat(o,", adjusting to next period start ").concat(s.start)),null!=(r=s.start)?r:e):e}},50962:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.isLowLatencyConfigured=function(e){var t=e.serviceManager.get(n.ServiceName.LiveLatencyService);return(null==t?void 0:t.isConfigured())||!1};var n=i(80813)},60729:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.isPlayingLowLatencyHls=function(e){if(!(0,a.isLowLatencyConfigured)(e)||!e.settings.LL_HLS)return!1;var t,i=(0,n.getSourceState)(e);if(!i)return!1;var s=r.ModuleManager.get(o.ModuleName.HLS,!1);if(!s)return!1;var u=s.selectors,c=u.getHlsState,l=u.getIsLowLatencyPlaylist,d=c(i);return!!d&&null!=(t=l(d))&&t};var n=i(15971),r=i(88052),o=i(62756),a=i(50962)}},function(e){return e(e.s=52570)}])},313:function(e){"use strict";self,e.exports=(self.webpackChunkbitmovin_player=self.webpackChunkbitmovin_player||[]).push([[855],{48297:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.AbstractHlsManifestController=void 0;var n,r,o=i(80813),a=i(3714),s=i(32703),u=i(59225),c=i(32485),l=i(79721),d=i(89927),h=i(58313),p=i(70850),f=i(88052),g=i(62756),m=i(77374);!function(e){e.CueTag="cueTag",e.Scte35="scte35",e.DateRange="dateRange",e.CustomTags="customTags"}(n||(n={})),t.AbstractHlsManifestController=function(){function e(e){var t,i=this;this.context=e,this.x7=[],this.y7=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),i.context.eventHandler.dispatchEvent(a.PlayerEvent.Metadata,t)}},this.z7=function(e){var t=i.segmentTimelineController.getPlayingSegment(e.relativeTime||e.time);t&&!t.consumed&&(t.consumed=!0,i.B7(t),i.A7(t))},this.C7=function(){i.segmentTimelineController.reset()},this.D7=function(){i.segmentTimelineController.reset()},this.registerVariantPlaylist=function(e){if(!i.parsedManifest)throw Error("No master manifest available, cannot register variant playlist.");var t=i.F7(e.body);if(!i.E7(t))throw Error("Variant playlist is not valid.");var n=i.parsedManifest.playlists.find(function(t){var i=h.URLHelper.removeDotSegments(t.uri);return h.URLHelper.removeDotSegments(e.url).includes(i)});if(!n)throw Error("Variant playlist was not found in master manifest.");if(!(0,m.isVideoVariant)(n,i.parsedManifest)&&!function(e){var t;return null!=(t=e.playlists.every(function(t){return(0,m.isMediaElement)(t.uri,e)}))&&t}(i.parsedManifest))throw Error("Variant playlist is not a video variant");i.segmentTimelineController.switchTimeline(n.id),r.extrapolateProgramDateTime(t.segments),i.x7=r.createDiscontinuitySequences(t,i.x7);var o=function(e,t,i){for(var n,o=e.segments,a=o.some(function(e){return void 0!==e.dateTime}),s=0;s<o.length;s++){var u=o[s];if(u.variantPlaylistId=t,u.mediaSequenceNumber=e.mediaSequence+s,!a&&(null==(n=i.tweaks)?void 0:n.akamai_datetime_parsing)){var c=r.getProgramDateTimeFromSegmentUrl(u.uri,u.duration);c&&(u.dateTime=c)}}return o}(t,n.id,i.t7);i.v7.expirationTimeInSeconds=i.segmentTimelineController.updateTimeline(n.id,o);var a=i.segmentTimelineController.getCurrentTimeline();if(o[0].dateTime){var u=p.Util.timeInSeconds(o[0].dateTime);t.programDateTime=u,i.w7.removeUntil(u)}(0,s.extractDateRangeMetadata)(t.dateRange,t.endList?t.programDateTime:void 0,function(e){i.G7(e)});var c=!(null==t?void 0:t.endList);return i.J7(a,c),t},r=f.ModuleManager.get(g.ModuleName.HLS).PlaylistUtils,this.settings=e.settings,this.t7=e.config,this.u7=e.eventHandler,this.s7=null,this.v7=e.serviceManager.get(o.ServiceName.MetadataParsedService),this.u7.on(a.PlayerEvent.TimeChanged,this.z7),this.u7.on(a.PlayerEvent.TimeShifted,this.C7),this.u7.on(a.PlayerEvent.Seeked,this.D7),this.w7=new u.MetadataService(this.context,((t={})[c.TimedMetadataType.Manifest]=this.y7,t[c.TimedMetadataType.DateRange]=this.y7,t))}return e.prototype.A7=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(a.PlayerEvent.SegmentPlayback,t)},e.prototype.B7=function(e){var t=this,i=e.dateTime?(0,d.toSeconds)(e.dateTime.getTime()):e.playbackTime,n=i+e.duration;e.metadata&&e.metadata.forEach(function(e){!function(e){return e.type.includes("CUE")}(e)?t.context.eventHandler.dispatchEvent(a.PlayerEvent.Metadata,{metadataType:e.type,metadata:e}):t.context.eventHandler.dispatchEvent(a.PlayerEvent.Metadata,{metadataType:a.MetadataType.CUETAG,metadata:e})}),e.customTags&&this.context.eventHandler.dispatchEvent(a.PlayerEvent.Metadata,{metadataType:a.MetadataType.CUSTOM,metadata:e.customTags,start:i,end:n})},e.prototype.resolveMasterManifest=function(e){return this.parsedManifest?Promise.resolve(this.manifestUrl):(this.manifestUrl=e,this.downloadMasterManifest(e))},e.prototype.registerMasterManifest=function(e,t){this.s7=e.body;var i,n=this.processMasterManifest(null!=(i=e.body)?i:"",t);if(this.parsedManifest=this.F7(n),this.isValidMasterPlaylist(this.parsedManifest))return n;if(this.E7(this.parsedManifest)){var r="#EXTM3U\n#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=100000\n$VARIANT$\n".replace("$VARIANT$",t);n=this.processMasterManifest(r,t),this.s7=r,this.parsedManifest=this.F7(n)}else this.parsedManifest=null;return n},e.prototype.isValidMasterPlaylist=function(e){return null!=e&&"playlists"in e&&e.playlists.length>0},e.prototype.E7=function(e){return null!=e&&"segments"in e&&e.segments.length>0},e.prototype.F7=function(e){var t=f.ModuleManager.get(g.ModuleName.HLS).parsePlaylist;try{return t(e)}catch(e){return null}},e.prototype.G7=function(e){var t={metadataType:a.MetadataType.DATERANGE,metadata:e.data,start:e.startTime,end:e.endTime};this.I7(t)},e.prototype.H7=function(e){return{metadataType:e.metadataType,metadata:e.metadata,data:e.metadata,start:e.start,end:e.end}},e.prototype.I7=function(e){var t=e.metadataType===a.MetadataType.DATERANGE?c.TimedMetadataType.DateRange:c.TimedMetadataType.Manifest;this.w7.addToMetadataParsedService(e.start,this.H7(e),l.DEFAULT_PERIOD_ID),e.metadataType!==a.MetadataType.CUSTOM&&this.w7.addToT
vendor: 4,826 bytes, line 1
1imeline(t,e.start,e)},e.prototype.J7=function(e,t){var i=this;e.forEach(function(e){Object.values(n).forEach(function(r){e.hasOwnProperty(r)&&(function(e,t,i){var r=i&&t.dateTime?(0,d.toSeconds)(t.dateTime.getTime()):t.playbackTime;switch(e){case n.CueTag:return[{metadataType:a.MetadataType.CUETAG,metadata:t[n.CueTag],start:r}];case n.Scte35:return[{metadataType:a.MetadataType.SCTE,metadata:t[n.Scte35],start:r}];case n.CustomTags:return[{metadataType:a.MetadataType.CUSTOM,metadata:t[n.CustomTags],start:r,end:r+t.duration}];default:return[]}})(r,e,t).forEach(function(e){return i.I7(e)})})})},e.prototype.parseTimelineEntries=function(e){var t=this.F7(e);return this.E7(t)?t.segments.map(function(e){var t;return{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 i=e[t],n=0,r=0;r<i.timeline.length;r++){for(var o=i.timeline[r],a=this.segmentTimelineController.getCurrentTimeline(),s=0;s<a.length;s++){var u=a[s];if(u.uri===o.uri)return u.playbackTime-n}n+=o.duration}return -1},e.prototype.getParsedManifest=function(){return this.parsedManifest},e.prototype.getManifest=function(){return this.s7},e.prototype.K7=function(){this.u7&&(this.u7.off(a.PlayerEvent.TimeChanged,this.z7),this.u7.off(a.PlayerEvent.TimeShifted,this.C7),this.u7.off(a.PlayerEvent.Seeked,this.D7))},e.prototype.dispose=function(){this.K7(),this.segmentTimelineController&&(this.segmentTimelineController.dispose(),this.segmentTimelineController=null),this.w7&&(this.w7.dispose(),this.w7=null),this.parsedManifest=null,this.s7=null,this.manifestUrl=null,this.settings=null,this.t7=null,this.u7=null},e}()},32418:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.AppleAirplayService=t.isAirplaySupported=void 0;var n,r=i(3714),o=i(19274);!function(e){e.Available="available",e.NotAvailable="not-available"}(n||(n={})),t.isAirplaySupported=function(){return!!window.WebKitPlaybackTargetAvailabilityEvent},t.AppleAirplayService=function(){function e(e,t){var i=this;this.videoElement=e,this.eventHandler=t,this.LO=!1,this.MO=function(e){switch(e.availability){case n.Available:i.LO=!0,i.eventHandler.dispatchEvent(r.PlayerEvent.AirplayAvailable);break;case n.NotAvailable:i.LO=!1}},this.NO=function(){i.eventHandler.dispatchEvent(r.PlayerEvent.AirplayChanged,{airplayEnabled:i.isAirplayActive(),time:i.videoElement.currentTime})},this.initAirplay()}return e.prototype.initAirplay=function(){this.videoElement.setAttribute("x-webkit-airplay","allow"),this.videoElement.addEventListener(o.MediaElementEvent.webkitplaybacktargetavailabilitychanged,this.MO),this.videoElement.addEventListener(o.MediaElementEvent.webkitcurrentplaybacktargetiswirelesschanged,this.NO)},e.prototype.isAirplayAvailable=function(){return this.LO},e.prototype.isAirplayActive=function(){return this.videoElement.isAirplayActive()},e.prototype.showAirplayTargetPicker=function(){this.isAirplayAvailable()&&(this.videoElement.webkitShowPlaybackTargetPicker(),this.eventHandler.dispatchEvent(r.PlayerEvent.ShowAirplayTargetPicker))},e.prototype.dispose=function(){this.videoElement.removeEventListener(o.MediaElementEvent.webkitplaybacktargetavailabilitychanged,this.MO),this.videoElement.removeEventListener(o.MediaElementEvent.webkitcurrentplaybacktargetiswirelesschanged,this.NO)},e}()},99373:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.AssetAvailabilityChecker=void 0;var n=i(4129),r=i(29669),o=i(89927),a=i(88844),s=i(19274);t.AssetAvailabilityChecker=function(){function e(e,t,i){var a=this;this.context=e,this.source=t,this.mediaElement=i,this.QO=function(){a.mediaElement.removeEventListener(s.MediaElementEvent.loadstart,a.QO);var e=(0,o.toMilliSeconds)(a.context.settings.XHR_TIMEOUT)/2;a.OO=window.setTimeout(function(){a.context.logger.debug("Asset loading has not resolved after ".concat((0,o.toSeconds)(e),"s. Checking accessibility."));var t=!1;a.PO=new n.DefaultContentLoader(a.context,{onProgress:function(e){var i;e.loadedBytes>0&&(t=!0,null==(i=a.PO)||i.cancel())},requestType:r.HttpRequestType.INTERNAL}),a.PO.load(a.source.src).catch(function(e){if(!t){a.context.logger.debug("Forcing error event as the asset was not accessible.",e);var i=new Event(s.MediaElementEvent.error,{bubbles:!1,cancelable:!1});a.source.dispatchEvent(i)}})},e)},i.addEventListener(s.MediaElementEvent.loadstart,this.QO)}return e.prototype.dispose=function(){(0,a.clearTimeoutIfDefined)(this.OO),this.mediaElement.removeEventListener(s.MediaElementEvent.loadstart,this.QO),this.PO&&(this.PO.cancel(),this.PO.dispose())},e}()},95945:function(e,t,i){var n=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||({__proto__:[]}
1)instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(t,i)};return function(t,i){if("function"!=typeof i&&null!==i)throw TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.FallbackHlsManifestController=void 0;var r,o=i(25926),a=i(4224),s=i(3714),u=i(29669),c=i(89927),l=i(88844),d=i(88052),h=i(62756),p=i(48297),f=i(56191),g=i(59043),m=i(77374);t.FallbackHlsManifestController=function(e){function t(t){var i=e.call(this,t)||this;return i.W7=function(e){return i.context.logger.debug("Error while loading the playlist ",e),null},r=d.ModuleManager.get(h.ModuleName.HLS).PlaylistUtils,i.L7=new g.HlsDownloadService(i.context),i.segmentTimelineController=new f.FallbackSegmentTimelineController(t.videoElement),i.context.logger.debug("Initializing controller for native HLS parsing"),i}return n(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.downloadMasterManifest=function(e){var t=this;return this.L7.downloadPlaylist(e,u.HttpRequestType.MANIFEST_HLS_MASTER).then(function(e){var i,n,r,o=t.registerMasterManifest(e,e.url);if(!t.parsedManifest)throw Error("Manifest parsing failed");var a=null!=(n=null==(i=t.parsedManifest.playlists.find(function(e){return m.isVideoVariant(e,t.parsedManifest)}))?void 0:i.uri)?n:null==(r=t.parsedManifest.playlists[0])?void 0:r.uri;return t.N7(a).then(function(i){return t.overrideManifestUrl(o,e.url,i)})})},t.prototype.processMasterManifest=function(e,t){return m.replaceManifestUrls(t,e,this.settings.QUERY_PARAMETERS)},t.prototype.N7=function(e){var t=this;return this.L7.downloadPlaylist(e,u.HttpRequestType.MANIFEST_HLS_VARIANT).then(this.registerVariantPlaylist).then(function(i){return r.isLive(i)&&t.T7(i,e),i})},t.prototype.overrideManifestUrl=function(e,t,i){return"createObjectURL"in window.URL?this.O7(e,i):(this.context.eventHandler.dispatchEvent(s.PlayerEvent.Warning,new o.PlayerWarning(a.WarningCode.SETUP_CREATE_OBJECT_URL_MISSING)),Promise.resolve(t))},t.prototype.O7=function(e,t){var i=this;return r.isLive(t)?Promise.resolve(this.V7(e)):Promise.all(this.P7(e)).then(function(t){return t.filter(function(e){return!!e}).forEach(function(t){e=e.replace(t.mediaUrl,t.blobUrl)}),i.V7(e)})},t.prototype.P7=function(e){var t=this;return e.split("\n").map(function(e){return m.parseUrlFromLine(e)}).filter(function(e){return null!==e}).map(function(e){return t.Q7(e)})},t.prototype.Q7=function(e){var t=this;return this.L7.downloadPlaylist(e,u.HttpRequestType.MANIFEST_HLS_VARIANT).then(function(i){var n=m.replaceManifestUrls(e,i.body,t.settings.QUERY_PARAMETERS);return{blobUrl:t.U7(n),mediaUrl:e}}).catch(this.W7)},t.prototype.R7=function(e){var t=this;return this.L7.downloadPlaylist(e.uri,u.HttpRequestType.MANIFEST_HLS_VARIANT).then(function(i){return{width:e.width,height:e.height,timeline:t.parseTimelineEntries(i.body)}}).catch(this.W7)},t.prototype.S7=function(e){var t=this;return function(){if(!t.L7)return function(){};t.L7.downloadPlaylist(e,u.HttpRequestType.MANIFEST_HLS_VARIANT,!1).then(t.registerVariantPlaylist).then(function(e){return r.isLive(e)&&t.T7(e,t.parsedManifest.playlists[0].uri),e}).catch(t.W7)}},t.prototype.T7=function(e,t){this.M7=setTimeout(this.S7(t),(0,c.toMilliSeconds)(e.targetDuration))},t.prototype.U7=function(e){var t=new Blob([e],{type:"application/x-mpegURL"});return window.URL.createObjectURL(t)},t.prototype.V7=function(e){return"data:application/x-mpegURL,"+encodeURIComponent(e)},t.prototype.X7=function(){return this.parsedManifest.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.Y7=function(){var e=this,t=this.X7();return t.reverse(),Promise.all(t.map(function(t){return e.R7(t)})).then(function(t){var i=e.getPlaybackTimeOfFirstSegmentInTimeline(t);return i>=0&&t.forEach(function(e){e.timeline.reduce(function(e,t){return t.playbackTime=e,e+t.duration},i)}),t})},t.prototype.getCurrentSegments=function(e,t,i,n){return void 0===n&&(n=1),this.Y7().then(function(r){var o=r.find(function(e){return e.width===t&&e.height===i});return function(e,t,i){for(var n,r=[],o=0;o<e.length;o++){var a=e[o];n=0;for(var s=0;s<a.timeline.length;s++){var u=a.timeline[s];if(u.playbackTime+u.duration>=i&&(r.push(u.uri),n++),n>t)break}}return r}(o?[o]:r,n,e)})},t.prototype.dispose=function(){e.prototype.dispose.call(this),(0,l.clearTimeoutIfDefined)(this.M7),this.M7=null},t}
vendor: 4,163 bytes, line 1
1(p.AbstractHlsManifestController)},56191:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.FallbackSegmentTimelineController=void 0;var n=i(25541);t.FallbackSegmentTimelineController=function(){function e(e){this.idb=e,this.jdb=!0,this.gdb={}}return e.prototype.kdb=function(){return this.idb.duration===1/0},e.prototype.switchTimeline=function(e){this.gdb[e]||(this.hdb=e,this.gdb[e]=[])},e.prototype.updateTimeline=function(e,t){var i=this,r=this.gdb[e],o=n.updateTimeline(r,t),a=o.findIndex(function(e){return e.hasOwnProperty("playbackTime")});-1!==a&&n.populateCurrentTimelineWithPlaybackTime(o,a,o[a].playbackTime),this.gdb[e]=o;var s=o.reduce(function(e,t){return i.kdb()&&!i.jdb||(t.playbackTime=e),e+t.duration},0);return this.jdb&&(this.jdb=!1),s},e.prototype.getPlayingSegment=function(e){for(var t=this.getCurrentTimeline(),i=0;i<t.length;i++){var n=t[i];if(e>=n.playbackTime&&e<=n.playbackTime+n.duration)return t[i]}return null},e.prototype.addDownloadedSegments=function(e){},e.prototype.getCurrentTimeline=function(){return this.gdb[this.hdb]},e.prototype.getAllTimelines=function(){return this.gdb},e.prototype.reset=function(){this.gdb[this.hdb].forEach(function(e){return e.consumed=!1})},e.prototype.dispose=function(){this.gdb={},this.idb=null},e}()},30712:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.HlsDownloadErrorHandler=void 0;var n=i(40306),r=i(3336),o=i(4129),a=i(43446),s=i(29669),u=i(21513),c=i(88844),l=i(19274);t.HlsDownloadErrorHandler=function(){function e(e,t){var i=this;this.cO=function(){for(var e=i.SO.buffered,t="",n=0;n<e.length;n++)t+="".concat(e.start(n)," - ").concat(e.end(n),", ");t===i.ZO?i.aO++:i.aO=0,i.aO>=10&&i.eO(),i.ZO=t},this.dO=function(){var e=a.TimingUtil.getHiResTimestamp(),t=!i.SO.paused&&!i.SO.seeking&&!i.SO.ended;e-i.bO>5&&t&&i.gO()},this.eO=function(){i.XO=a.TimingUtil.getHiResTimestamp(),i.iO()},this.fO=function(){i.XO=-1/0,(0,c.clearTimeoutIfDefined)(i.WO)},this.gO=function(){i.VO=a.TimingUtil.getHiResTimestamp(),i.iO()},this.hO=function(){i.VO=-1/0,i.bO=a.TimingUtil.getHiResTimestamp(),(0,c.clearTimeoutIfDefined)(i.WO)},this.jO=function(){if(0!==i.SO.buffered.length){var e=i.SO.currentTime,t=i.SO.buffered.end(i.SO.buffered.length-1),a=e<=t&&e+.5>t,u=i.SO.paused,c=i.SO.networkState===HTMLMediaElement.NETWORK_LOADING,l=i.SO.videoWidth,d=i.SO.videoHeight;!u&&a&&c&&i.TO.getCurrentSegments(t,l,d,2).then(function(e){var t=new o.DefaultContentLoader(i.RO),a=function(i,n){return void 0===i&&(i=!0),e.length>0&&i?t.load(e.pop(),s.HttpRequestMethod.HEAD).then(function(e){return a(e.status>=200&&e.status<300,e)}):i?Promise.resolve():Promise.reject(n)};a().catch(function(e){var t=e.url,o=e.status,a=e.statusText;i.RO.eventHandler.fireError(new r.PlayerError(n.ErrorCode.NETWORK_ERROR,{url:t,statusCode:o,statusText:a},"Failed to load segment ".concat(t,", statusCode: ").concat(o,", statusText: ").concat(a),i.RO.sourceContext.sourceIdentifier))})})}},this.RO=e,this.SO=e.videoElement,this.TO=t,this.UO=!1,this.XO=-1/0,this.VO=-1/0,this.WO=-1,this.ZO="",this.aO=0,this.bO=-1/0,this.SO.addEventListener(l.MediaElementEvent.waiting,this.gO),this.SO.addEventListener(l.MediaElementEvent.stalled,this.eO),this.SO.addEventListener(l.MediaElementEvent.progress,this.fO),this.SO.addEventListener(l.MediaElementEvent.timeupdate,this.hO),(0,u.getCapabilities)().isIOS&&(this.YO=window.setInterval(function(){i.cO(),i.dO()},500))}return e.prototype.iO=function(){var e=Math.abs(this.VO-this.XO);(0,c.clearTimeoutIfDefined)(this.WO),isFinite(e)&&(this.WO=window.setTimeout(this.jO,1e3*(5-Math.min(5,e))))},e.prototype.dispose=function(){(0,c.clearTimeoutIfDefined)(this.YO),(0,c.clearTimeoutIfDefined)(this.WO),this.SO.removeEventListener(l.MediaElementEvent.waiting,this.gO),this.SO.removeEventListener(l.MediaElementEvent.stalled,this.eO),this.SO.removeEventListener(l.MediaElementEvent.progress,this.fO),this.SO.removeEventListener(l.MediaElementEvent.timeupdate,this.hO),this.SO=null,this.TO=null},e}()},59043:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.HlsDownloadService=void 0;var n=i(25926),r=i(4224),o=i(3714),a=i(4129),s=i(29669);
1t.HlsDownloadService=function(){function e(e){var t=this;this.ndb=!1,this.tdb=function(e){t.ldb.eventHandler.dispatchEvent(o.PlayerEvent.Warning,new n.PlayerWarning(r.WarningCode.NETWORK_COULD_NOT_LOAD_MANIFEST)),t.ldb.logger.debug("Could not load manifest, got HTTP status code "+e.status)},this.ldb=e,this.odb()}return e.prototype.odb=function(){this.pdb(),this.qdb()},e.prototype.pdb=function(){this.mdb={}},e.prototype.qdb=function(){var e=this.ldb.sourceContext.source&&this.ldb.sourceContext.source.options||{};this.ndb="boolean"==typeof e.hlsManifestWithCredentials?e.hlsManifestWithCredentials:!0===e.manifestWithCredentials},e.prototype.downloadPlaylist=function(e,t,i){return void 0===i&&(i=!0),i&&this.mdb.hasOwnProperty(e)?Promise.resolve(this.mdb[e]):this.rdb(t,e)},e.prototype.rdb=function(e,t){var i=this,n=this.sdb(e);return n.load(t,s.HttpRequestMethod.GET,s.HttpResponseType.TEXT,null,{},this.ndb).then(function(e){return n.dispose(),i.mdb[t]=e,e}).catch(function(e){return n.dispose(),Promise.reject(e)})},e.prototype.sdb=function(e){return new a.DefaultContentLoader(this.ldb,{onFailure:this.tdb,maxRetries:this.ldb.settings.MAX_MPD_RETRIES,requestType:e})},e.prototype.dispose=function(){},e}()},81152:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.HlsLiveNativeTimeTracker=void 0;var n=i(75375),r=i(89927),o=i(88844),a=i(70850),s=i(19274);t.HlsLiveNativeTimeTracker=function(){function e(e,t){this.nativePlayer=e,this.context=t,this.kO=0,this.lO=null,this.mO=null}return e.prototype.onUnload=function(e){e===n.ADVERTISING_ISSUER_NAME&&this.context.settings.RESUME_LIVE_CONTENT_AT_PREVIOUS_POSITION_AFTER_AD_BREAK&&null==this.lO&&(this.nativePlayer.isLive()?(this.lO=Date.now(),this.kO=this.nativePlayer.getSeekableRange().start,this.mO=this.nativePlayer.getStartDate()):this.nO())},e.prototype.nO=function(){this.lO=null,this.kO=0,this.mO=null},e.prototype.adjustTargetTime=function(e,t){var i=this;return t!==n.ADVERTISING_RESTORE_ISSUER_NAME||null==this.lO?(this.context.logger.debug("No adjustments are made",this.lO),Promise.resolve(e)):(null!=this.mO?this.oO():Promise.resolve(null)).then(function(t){if(null!=t){i.context.logger.debug("StartDate progressed from ".concat(i.mO," to: ").concat(t," during the ad"));var n=a.Util.timeInSeconds(t)-a.Util.timeInSeconds(i.mO);i.kO=n}else{i.context.logger.debug("Adjusting time based on seekable range");var o=(0,r.toSeconds)(Date.now()-i.lO);i.kO+=o}var s=e-i.kO;return i.context.logger.debug("Adjusting target time from ".concat(e," by ").concat(i.kO," to ").concat(s)),i.nO(),s})},e.prototype.oO=function(){var e=this,t=this.pO();return t?Promise.resolve(t):new Promise(function(t){var i=void 0,n=function(){t(e.pO()),e.context.videoElement.removeEventListener(s.MediaElementEvent.loadeddata,n),(0,o.clearTimeoutIfDefined)(i)};e.context.logger.debug("Waiting for video.startDate to be valid"),e.context.videoElement.addEventListener(s.MediaElementEvent.loadeddata,n),i=window.setTimeout(n,2e3)})},e.prototype.pO=function(){var e=this.nativePlayer.getStartDate();return e&&!isNaN(e.getTime())?e:null},e}()},81929:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.createHlsManifestController=function(e){if(s(e)){var t=new(n.ModuleManager.get(r.ModuleName.ServiceWorkerClient).createServiceWorkerHlsManifestController(o.AbstractHlsManifestController))(e);return t.init().then(function(){return t}).catch(function(){return u(e)})}return u(e)},t.shouldUseServiceWorker=s;var n=i(88052),r=i(62756),o=i(48297),a=i(95945);function s(e){var t=e.config.location&&e.config.location.serviceworker;return"serviceWorker"in navigator&&t&&n.ModuleManager.has(r.ModuleName.ServiceWorkerClient)}function u(e){var t=new a.FallbackHlsManifestController(e);return t.init().then(function(){return t})}},77374:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.replaceManifestUrls=function(e,t,i){var n=t.split(/\r?\n/);return n.forEach(function(t,s){var u=o(t);if(u&&t.match(r)){var c=a(e,u,i);n[s]=t.replace(r,function(){return'URI="'.concat(c,'"')})}else u&&(n[s]=a(e,u,i))}),n.join("\n")},t.parseUrlFromLine=o,t.replaceUrlAndAddUriParams=a,t.isMediaElement=s,t.isVideoVariant=function(e,t){var i,n;return null!=(n=null==(i=t.playlists)?void 0:i.some(function(i){return e.uri.includes(i.uri)&&!s(e.ur
vendor: 11,967 bytes, line 1
1i,t)}))&&n};var n=i(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 a(e,t,i){var r=n.URLHelper.concatBaseUrlWithPartial(e,t);return n.URLHelper.appendQueryParametersToUrl(r,i)}function s(e,t){var i,n;return null!=(n=null==(i=t.media)?void 0:i.some(function(t){var i;return null==(i=t.attributes.URI)?void 0:i.includes(e)}))&&n}},27530:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.NativeModuleDefinition=void 0;var n=i(62756),r=i(925),o=i(49706);t.NativeModuleDefinition={name:n.ModuleName.EngineNative,module:{NativePlayer:r.NativePlayer,technologyChecker:new o.TechnologyChecker}},t.default=t.NativeModuleDefinition},925:function(e,t,i){var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},r=this&&this.__runInitializers||function(e,t,i){for(var n=arguments.length>2,r=0;r<t.length;r++)i=n?t[r].call(e,i):t[r].call(e);return n?i:void 0},o=this&&this.__esDecorate||function(e,t,i,n,r,o){function a(e){if(void 0!==e&&"function"!=typeof e)throw TypeError("Function expected");return e}for(var s,u=n.kind,c="getter"===u?"get":"setter"===u?"set":"value",l=!t&&e?n.static?e:e.prototype:null,d=t||(l?Object.getOwnPropertyDescriptor(l,n.name):{}),h=!1,p=i.length-1;p>=0;p--){var f={};for(var g in n)f[g]="access"===g?{}:n[g];for(var g in n.access)f.access[g]=n.access[g];f.addInitializer=function(e){if(h)throw TypeError("Cannot add initializers after decoration has completed");o.push(a(e||null))};var m=(0,i[p])("accessor"===u?{get:d.get,set:d.set}:d[c],f);if("accessor"===u){if(void 0===m)continue;if(null===m||"object"!=typeof m)throw TypeError("Object expected");(s=a(m.get))&&(d.get=s),(s=a(m.set))&&(d.set=s),(s=a(m.init))&&r.unshift(s)}else(s=a(m))&&("field"===u?r.unshift(s):d[c]=s)}l&&Object.defineProperty(l,n.name,d),h=!0};Object.defineProperty(t,"__esModule",{value:!0}),t.NativePlayer=void 0;var a,s=i(4524),u=i(40306),c=i(3336),l=i(25926),d=i(4224),h=i(80813),p=i(56481),f=i(3714),g=i(90408),m=i(75375),y=i(4129),v=i(69957),S=i(44468),b=i(23690),E=i(87827),T=i(21513),_=i(93204),A=i(74853),P=i(34841),M=i(85434),I=i(15487),R=i(89927),C=i(88844),O=i(23068),D=i(58313),w=i(70850),N=i(41138),L=i(19274),k=i(88052),U=i(62756),x=i(29669),B=i(32418),F=i(99373),H=i(30712),j=i(81152),V=i(81929),W=i(56678);!function(e){e.None="none",e.Metadata="metadata",e.Auto="auto"}(a||(a={}));var G="not available",q=.75;function K(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}t.NativePlayer=function(){var e,t,i=[];return e=function(){function t(e){var t=this;this.Sj=r(this,i),this.Yj=0,this.dj=!1,this.ej=null,this.fj=!1,this.gj=!1,this.hj=!0,this.ij=-1,this.jj=!1,this.kj=!1,this.lj=!1,this.mj=0,this.pj=-1,this.sj=-1,this.tj=null,this.uj="api",this.vj="api",this.wj="api",this.yj=0,this.Aj=-1,this.Bj=0,this.Cj=!1,this.Lj=0,this.Wk=[],this.Zk=!0,this.ak=!1,this.bk=!1,this.dk=[],this.ek=!1,this.fk=!1,this.hk={},this.lk=!1,this.pk=!1,this.qk=!1,this.rk=function(e){if(t.Ol()){var i=e.track;t.Bk(f.PlayerEvent.AudioAdded,{track:t.Pl(i)}),i.enabled&&t.dj&&t.nl(null,i)}},this.sk=function(e){t.Ol()&&t.Bk(f.PlayerEvent.AudioRemoved,{track:t.Pl(e.track)})},this.tk=function(){var e,i,n=t.Uj.getViewModeFromPresentationMode();n===S.ViewMode.PictureInPicture||n===S.ViewMode.Fullscreen&&(0,T.getCapabilities)().isIOS?null==(e=t.tj)||e.enableNative():null==(i=t.tj)||i.disableNative(),t.Sj.store.dispatch((0,b.setPlayerViewMode)(n))},this.uk=function(){(0,g.maybeFireDurationChangedEvent)(t.Kj,t.getDuration(),t.Wj),t.Kj=t.getDuration(),t.bk&&t.zk()},this.vk=function(){t.zj.stallExit(),t.Cj&&t.ej&&t.Gk(),t.fj=!1,t.zj.transitionToPlayState(!0,t.uj)},this.wk=function(){t.zj.isStalled?(t.zj.stallExit(),t.zj.transitionToPlayingState(t.uj)):t.zj.isStopped()?t.Jk():t.zj.isPlaying()||(t.zj.transitionToPlayState(!0,t.uj),t.zj.transitionToPlayingState(t.uj))},this.Ak=function(){var e;(0,C.clearTimeoutIfDefined)(t.Ij),null==(e=t.Jj)||e.dispose(),t.ak||(0,C.clearTimeoutIfDefined)(t.Hj),t.ak=!0,t.lk=!1,t.Zk=!0,t.bk=!0,t.zk()},this.Bk=function(e,i,n,r){void 0===i&&(i={}),void 0===n&&(n=!1),void 0===r&&(r=!1),t.Wj&&(t.Zk||n)&&t.Wj.dispatchEvent(e,i,r)},this.Ck=function(e){var i=t.Fk(),n=i.currentTime;(-1!==t.Aj||n!==t.Aj)&&!t.kj&&(t.Ek(n)?(Promise.resolve(t.Uj.play()).catch(function(e){t.Tj.insane("Play promise rejected:",e)}),t.lj=!0,i.currentTime=t.Bj):t.Dk(i,n),t.jj=!1,t.Xk&&(t.Xk.width=t.Uj.videoWidth,t.Xk.height=t.Uj.videoHeight))},this.Jk=function(){t.isPlaying()||(t.fj=!1,t.pl(),t.zj.transitionToPlayingState(t.uj))},this.Kk=function(){t.fj=!0},this.getCurrentTime=function(e){void 0===e&&(e=S.TimeMode.AbsoluteTime);var i=t.getStartDate();return e===S.TimeMode.AbsoluteTime&&i?w.Util.timeInSeconds(i)+t.Fk().currentTime:t.Fk().currentTime},this.getAudioQuality=this.getPlaybackAudioData,this.getVideoQuality=this.getPlaybackVideoData,this.Yl=function(){var e,i=t.Fk(),n=Math.abs(i.currentTime-t.Bj),r=t.Xj.GLOBAL_DISABLE_SEEKING,o=null!=(e=t.nj)?e:i.duration;r&&(n>q||i.currentTime<o-q)?(Promise.resolve(t.Uj.play()).catch(function(e){t.Tj.insane("Play promise rejected:"+e)}),t.lj=!0,t.Uj.currentTime=t.Bj):(t.Bj=0,t.zj.isPlaying()&&t.zj.transitionToPausedState(!0,t.vj),t.zj.transitionToStoppedState())},this.dl=function(){t.Zl(),t.mj=0,!t.Xj.GLOBAL_DISABLE_SEEKING||t.ek||t.gk?(t.Aj=t.Fk().currentTime,t.gk=!1,t.zj.isSeeking()&&(t.tj&&t.tj.seek(),t.cl())):t.kj=!1,t.el()},this.fl=function(){if(t.Xj.GLOBAL_DISABLE_SEEKING&&!t.gk)t.kj=!t.ek,t.mj++,t.mj>1&&(t.lj=!1);else if(!t.zj.isSeeking()&&!t.zj.isTimeShifting()){var e=t.Fk().currentTime;t.zj.transitionToSeekingIOSState(e,m.INTERNAL_ISSUER_NAME),t.Aj=e}},this.tm=function(){void 0===t.oj&&(t.oj=t.Fk().currentTime)},this.um=function(){t.Yj++,t.Yj<t.Xj.IOS_MIN_TIMEUPDATES_AFTER_AD||(t.Wj.off(f.PlayerEvent.TimeChanged,t.um),t.ek=!0,t.Pk({time:t.Zj,issuer:"api",force:!0}))},this.Sj=e,this.qj=!1,this.Tj=e.logger,this.Uj=e.videoElement,this.Vj=e.config,this.Wj=e.eventHandler,this.Xj=e.settings,this.jk=[],this.Gj=null,this.cj=this.Uj.volume,this.mk=this.Uj.getAttribute("crossOrigin"),this.rj=-1/0,(0,B.isAirplaySupported)()&&(this.Dj=new B.AppleAirplayService(this.Uj,this.Wj)),this.nk=new j.HlsLiveNativeTimeTracker(this,e),this.kk=[{event:L.MediaElementEvent.pause,handler:function(){t.Zl(),t.fj||t.zj.transitionToPausedState(!0,t.vj,!0)}},{event:L.MediaElementEvent.ended,handler:function(){t.Yl()}},{event:L.MediaElementEvent.play,handler:this.vk},{event:L.MediaElementEvent.canplay,handler:function(){t.zj.stallExit()}},{event:L.MediaElementEvent.seeking,handler:function(){t.jj=!0,t.fl(),t.getCurrentTime()>=t.getDuration()&&(t.dl(),t.Yl())}},{event:L.MediaElementEvent.seeked,handler:function(){t.dl(),t.Cj&&t.ej&&t.Gk()}},{event:L.MediaElementEvent.durationchange,handler:this.uk},{event:L.MediaElementEvent.loadeddata,handler:this.Ak},{event:L.MediaElementEvent.loadedmetadata,handler:function(){t.Ij=window.setTimeout(t.Ak,200)}},{event:L.MediaElementEvent.playing,handler:this.wk},{event:L.MediaElementEvent.waiting,handler:function(){t.Zl(),t.zj.stallEnter()}},{event:L.MediaElementEvent.timeupdate,handler:this.Ck},{event:L.MediaElementEvent.error,handler:function(e){var i;t.ak||1!==t.Wk.length||t.type!==S.StreamType.Progressive?(t.ck.reject(),t.gj?(t.Tj.debug("Ignoring video element error",e.errorObject),t.gj=!1):(t.Tj.debug("video element has thrown an error",e.errorObject),(0,C.clearTimeoutIfDefined)(t.Hj),null==(i=t.Wj)||i.fireError((0,g.createPlayerErrorFromMediaError)(e,t.Sj.sourceContext.sourceIdentifier,!0)))):t.Dl(u.ErrorCode.SOURCE_PROGRESSIVE_STREAM_ERROR,t.Uj.getWrappedElement().src,e)}},{event:L.MediaElementEvent.webkitpresentationmodechanged,handler:this.tk},{elementSelector:function(e){return e.audioTracks},event:"addtrack",handler:this.rk},{elementSelector:function(e){return e.audioTracks},event:"removetrack",handler:this.sk}]}return t.prototype.xk=function(){var e,t;return!((0,I.isWebOS)()||(0,I.isTizen2023)()||(0,I.isTizen2024)()||(0,I.isEdgeAndroid)()||(null==(t=null==(e=this.Vj)?void 0:e.tweaks)?void 0:t.prevent_video_element_preloading)||this.getDuration())},t.prototype.yk=function(){if(!this.Tl()||(null==(t=null==(e=this.Vj)?void 0:e.tweaks)?void 0:t.prevent_video_element_preloading)||(0,I.isWebOS)()||this.pk)return!1;var e,t,i=this.Uj.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA;return!z(this.Fk().seekable)&&!i},t.prototype.zk=function(){this.xk()||this.yk()?this.Tj.debug("Cannot resolve deferred loading yet, waiting for required data to be loaded ",{duration:String(this.getDuration()),seekableRangeAvailable:z(this.Fk().seekable),videoElementReadyState:this.Fk().readyState}):this.ck.resolve()},t.prototype.Dk=function(e,t){if(this.lj=!1,this.nj=e.duration,t>this.nj+2)return this.Sj.logger.debug("CurrentTime ".concat(t," exceeds video duration (").concat(this.nj,"), reverting current time")),void(e.currentTime=this.nj-.1);this.Bj=t,this.zj.stallExit(),this.zj.isSeeking()||this.zj.isTimeShifting()||!this.isPlaying()||(null!=this.getStartDate()?this.Bk(f.PlayerEvent.TimeChanged,{time:this.getCurrentTime(),relativeTime:t}):this.Bk(f.PlayerEvent.TimeChanged,{time:this.getCurrentTime()}))},t.prototype.Ek=function(e){if(!this.Xj.GLOBAL_DISABLE_SEEKING||!this.jj)return!1;var t=-1!==this.Aj&&e>this.Aj+q,i=Math.abs(e-this.Bj);return(!this.lj||t)&&i>q},t.prototype.Fk=function(){return this.Cj&&this.ej?this.ej:this.Uj},t.prototype.Gk=function(){var e=Date.now();(0,R.toSeconds)(e-this.Lj)>=1/30&&(this.Uj.currentTime=this.ej.currentTime,this.Lj=e),this.isPlaying()&&window.requestAnimationFrame(this.Gk)},t.prototype.Hk=function(){if(this.isLive()&&!this.Ok()){var e=this.wm();e.end>=0&&this.Mk(e.end,m.STARTUP_ISSUER_NAME)}},t.prototype.Ik=function(){void 0!==this.ok&&(this.ll(),this.seek(this.ok,"api-play"))},t.prototype.play=function(e){return this.hj?(this.uj=e,this.Ik(),this.Hk(),this.Fk().play()):Promise.reject("Play control not permitted")},t.prototype.getStartDate=function(){if(!this.isLive())return null;var e=this.Fk().getWrappedElement(),t="function"==typeof e.getStartDate?e.getStartDate():null;return t&&!isNaN(t.getTime())?t:null},t.prototype.preload=function(){this.Fk().preload=this.rl()},t.prototype.pause=function(e){this.vj=e;var t=this.Fk();this.hj&&this.dj&&(this.zj.transitionToPausedState(!1,this.vj),t.pause())},t.prototype.mute=function(e){this.Fk().muted||(this.Fk().muted=!0,this.Bk(f.PlayerEvent.Muted,{issuer:e||"api"}))},t.prototype.unmute=function(e){this.Fk().muted&&(this.Fk().muted=!1,this.Bk(f.PlayerEvent.Unmuted,{issuer:e||"api"}))},t.prototype.Lk=function(e){var t=this.getStartDate();return t?e-(0,R.toSeconds)(t.getTime()):e},t.prototype.seek=function(e,t){var i=this;return!(!this.Nk(e)||this.getCurrentTime()===e)&&(this.nk.adjustTargetTime(e,t).then(function(e){i.wj=t,i.gl(e,t);var n=i.Lk(e);return i.Pk({time:n,issuer:t})}),this.bk&&this.getDuration()>0)},t.prototype.Mk=function(e,t){this.pj=this.getCurrentTime(),this.wj=t,this.hl(e,t),this.Qk({time:e,issuer:t})},t.prototype.Nk=function(e){this.gk=this.fk&&this.Vk(e);var t=!this.Xj.GLOBAL_DISABLE_SEEKING&&this.Uk();return(this.gk||t)&&this.hj},t.prototype.Ok=function(){var e=!(this.Vj.playback&&this.Vj.playback.hasOwnProperty("timeShift"))||!!this.Vj.playback.timeShift;return this.isLive()&&e},t.prototype.Pk=function(e){return!this.Rk(e)&&(this.zj.transitionToSeekingState(e.time,e.issuer,!1),this.Sk(e),!0)},t.prototype.Qk=function(e){this.Rk(e,!0)||(this.zj.transitionToTimeShiftingState(this.getCurrentTime(),e.time,e.issuer,!1),e.time<0&&(e.time=this.wm().end+e.time,this.Zl()),this.Sk(e))},t.prototype.Rk=function(e,t){return void 0===t&&(t=!1),this.zj.isSeeking()&&"api-
1play"!==e.issuer?(this.Tj.debug("Seeking already in progress, delaying seek for time",e.time),this.ml(e,t,[L.MediaElementEvent.seeked]),!0):this.bk?0===this.getDuration()?(this.Tj.debug("Delaying the seek until stream duration is known"),this.ml(e,t,[L.MediaElementEvent.durationchange]),!0):this.Uj.seekable.length<1&&(this.Tj.debug("Delaying the seek as the seekable range is not yet known"),this.ml(e,t,[L.MediaElementEvent.timeupdate,L.MediaElementEvent.canplay]),!0):(this.Tj.debug("Delaying the seek until data is loaded"),this.ml(e,t,[L.MediaElementEvent.loadeddata]),!0)},t.prototype.Sk=function(e){var t=e.issuer===m.ADVERTISING_ISSUER_NAME,i=this.wm();this.Tj.debug("Seek to ".concat(e.time,", seekable range:"),i);var n=this.Tk(e.time,i,t);this.fk=!1,this.lj=this.lj||this.gk||e.force;var r=parseFloat(n.toFixed(2));this.sj=r,this.Tj.debug("Setting time on video element from ".concat(this.Fk().currentTime," to ").concat(r)),this.Fk().currentTime=r},t.prototype.Tk=function(e,t,i){void 0===i&&(i=!1);var n=K(e,t);return i?e>=t.end&&(n=t.end-.1):n=Math.min(n,t.end-this.Xj.SEEK_TO_END_OFFSET),n!==e&&this.Tj.debug("Adjusted seek target from ".concat(e," to ").concat(n)),n},t.prototype.Uk=function(){var e=this.Vj&&this.Vj.hasOwnProperty("playback")?this.Vj.playback:{};return!e.hasOwnProperty("seeking")||e.seeking},t.prototype.Vk=function(e){var t=this.Sj.sourceContext.source?this.Sj.sourceContext.source:{};return t.hasOwnProperty("options")&&t.options.hasOwnProperty("startTime")&&e===t.options.startTime},t.prototype.gl=function(e,t){t!==m.STARTUP_ISSUER_NAME&&this.Bk(f.PlayerEvent.Seek,{position:this.getCurrentTime(),seekTarget:e,issuer:t||"api"})},t.prototype.hl=function(e,t){t!==m.STARTUP_ISSUER_NAME&&this.Bk(f.PlayerEvent.TimeShift,{target:e<0?this.pj+e:e,position:this.pj,issuer:t||"api"})},t.prototype.il=function(e){var t=this;return new Promise(function(i){var n=function(){e.removeEventListener(L.MediaElementEvent.seeked,n),i()};t.jk.push({el:e,ev:L.MediaElementEvent.seeked,fn:n}),e.addEventListener(L.MediaElementEvent.seeked,n)})},t.prototype.jl=function(e,t){var i=this;return new Promise(function(n,r){var o=0,a=function(){var s=e.buffered,u=s.length>0?s.end(s.length-1):-1/0;(o+=+!!isFinite(u))>i.Xj.SAFARI_NUM_PROGRESS_EVENTS_AFTER_SEEK_GLITCH&&u<t?(e.removeEventListener(L.MediaElementEvent.progress,a),r(null)):u>=t&&(e.removeEventListener(L.MediaElementEvent.progress,a),n())};i.jk.push({el:e,ev:L.MediaElementEvent.progress,fn:a}),e.addEventListener(L.MediaElementEvent.progress,a)})},t.prototype.kl=function(e,t){var i=this;return this.type!==S.StreamType.Hls?Promise.resolve():this.il(e).then(function(){return i.jl(e,t)}).catch(function(){throw i.Tj.debug("seek to target time (".concat(t,") failed - trying to recover by seeking to ").concat(t+1)),null})},t.prototype.ll=function(){var e=this;Object.keys(this.hk).forEach(function(t){e.Fk().removeEventListener(t,e.hk[t])}),this.hk={}},t.prototype.ml=function(e,t,i){var n=this,r=this.Fk();this.ll(),this.ok=e.time;var o=function(i){n.ll();var a={time:(0,O.isNumber)(i)?i:e.time,issuer:e.issuer,force:e.force};n.kl(r,e.time).catch(function(){return o(e.time+1)}),n.ok=void 0,t?n.Qk(a):n.Pk(a)};i.forEach(function(e){r.addEventListener(e,o),n.hk[e]=o})},t.prototype.setAudio=function(e){var t=A.ArrayHelper.toArray(this.Uj.audioTracks).find(function(t){return t.id===e});t&&this.ol(t)},t.prototype.nl=function(e,t){this.Bk(f.PlayerEvent.AudioChanged,{targetAudio:{id:t.id,label:t.label,lang:t.language},sourceAudio:e,time:this.Uj.currentTime})},t.prototype.ol=function(e){if(!e.enabled){var t=A.ArrayHelper.toArray(this.Uj.audioTracks).find(function(e){return e.enabled}),i=null;t&&(t.enabled=!1,i=this.Pl(t)),e.enabled=!0,this.nl(i,e)}},t.prototype.setVolume=function(e,t){var i=this.Fk(),n=this.cj,r=Math.min(e/100,1);n!==r&&(this.cj=r,i.volume=r,this.Bk(f.PlayerEvent.VolumeChanged,{targetVolume:100*r,sourceVolume:100*n,issuer:t||"api"}))},t.prototype.pl=function(){var e=this;(0,C.clearTimeoutIfDefined)(this.Hj),this.ak||(this.Hj=window.setTimeout(function(){e.Hj=void 0,!e.ak&&e.Wj&&(e.type===S.StreamType.Hls?e.Wj.fireError(new c.PlayerError(u.ErrorCode.NETWORK_MANIFEST_DOW
vendor: 38,470 bytes, line 1
1NLOAD_TIMEOUT,{sourceUrl:e.Yk.url},"Failed to load the HLS playlist: the request timed out.",e.Sj.sourceContext.sourceIdentifier)):e.type===S.StreamType.Progressive&&e.Wj.fireError(new c.PlayerError(u.ErrorCode.NETWORK_PROGRESSIVE_STREAM_DOWNLOAD_TIMEOUT,{sourceUrl:e.Yk.url},"Failed to load the progressive source: the request timed out.",e.Sj.sourceContext.sourceIdentifier)))},(0,R.toMilliSeconds)(this.Xj.XHR_TIMEOUT/2)))},t.getContentDomain=function(e){var t=document.createElement("a");return t.href=e,""===t.host&&(t.href=t.href),t.hostname},t.prototype.ql=function(e){var t;(0,I.isTizen)()&&(null==(t=this.Jj)||t.dispose(),this.Jj=new F.AssetAvailabilityChecker(this.Sj,e,this.Uj))},t.prototype.prepareLoad=function(){return Promise.resolve()},t.prototype.rl=function(){var e,t,i,n;return(null==(t=null==(e=this.Vj)?void 0:e.tweaks)?void 0:t.prevent_video_element_preloading)?a.None:!1===(null==(n=null==(i=this.Vj)?void 0:i.adaptation)?void 0:n.preload)?a.Metadata:a.Auto},t.prototype.load=function(t,i,n){var r,o=this,s=null!=(r=null==i?void 0:i.seeking)&&r;this.zj=this.Sj.serviceManager.get(h.ServiceName.PlayerStateService),this.zj.transitionToSeekedState(!1);var u=this.rl();u!==a.Auto&&this.Uj.setAttribute("preload",u),this.type=this.Sj.sourceContext.technology.streaming,this.Yk=t,t.type&&(this.type=t.type),!0===this.dj&&this.unload().catch(function(){}),this.ak=!1,this.bk=!1,this.Fk().nativeMediaEventListener.reset(),this.fk=!0,this.gj=!1,this.yj=0,this.ok=void 0,this.pk=!1,t.hasOwnProperty("vr")&&t.vr&&t.vr.restrictedInlinePlayback?(this.Cj=!0,this.ej=w.Util.getVRAudioElement(),this.qm(this.ej)):(this.ej=null,this.Cj=!1,this.qm(this.Uj)),this.Wj.on(f.PlayerEvent.TimeChanged,this.tm),this.ik=(0,_.subscribe)(this.Sj.store)(function(e){return(0,E.getIsStopped)((0,E.getPlayerState)(e))},this.Kk,function(e){return!0===e}),this.Xj.GLOBAL_DISABLE_SEEKING=s||!1,this.ij>-1&&((0,C.clearTimeoutIfDefined)(this.ij),this.ij=-1);var c="";t&&t.url&&("string"==typeof t.url?c=t.url:t.url.length>0&&(c=t.url[0].url));var l=window.location.hostname===e.getContentDomain(c);t.hasOwnProperty("vr")&&t.vr&&!l&&(this.mk=this.Uj.getAttribute("crossOrigin"),this.Uj.setAttribute("crossOrigin","anonymous")),this.Uj.eventHandler.reset(),this.lk||(this.tj=this.sm()),this.ck=new P.Deferred;var d=this.tl(t,n);return this.ck.promise.then(function(){o.Sj.sourceContext.source=t.config}).then(function(){return d}).then(function(){return o.ul(t)})},t.prototype.sl=function(e){var t=this;(0,I.isSafari17orIOS17)()&&fetch(e.url,{method:x.HttpRequestMethod.GET,headers:{Range:"bytes=0-0"}}).then(function(e){e.redirected&&(t.Tj.debug("Detected source redirection."),t.bk&&t.ck.resolve(),t.pk=!0)}).catch(function(){})},t.prototype.tl=function(e,t){var i=this;return this.type===S.StreamType.Hls?(this.sl(e),this.Al(e)):this.type===S.StreamType.Progressive?this.Bl(e,t).then(function(){return i.vl()}):Promise.resolve()},t.prototype.ul=function(e){this.xj=e,this.dj=!0,this.Bj=0,this.lj=!1},t.prototype.vl=function(){var e,t;(null==(t=null==(e=this.Vj)?void 0:e.tweaks)?void 0:t.prevent_video_element_preloading)?this.zk():this.Uj.load()},t.prototype.wl=function(t,i){var n=this;if(t.config.drm&&t.config.drm.fairplay){var r=k.ModuleManager.get(U.ModuleName.DRM).FairplayHandler;this.Ej=new r(this.Sj,this.Uj,t.config.drm.fairplay)}var o=e.createSourceElement(i,null);this.Gl(o,"0",t),this.ql(o);var a={element:o,handler:function(e){return n.Dl(u.ErrorCode.SOURCE_HLS_STREAM_ERROR,o.src,e)}};this.dk.push(a),a.element.addEventListener(L.MediaElementEvent.error,a.handler)},t.prototype.xl=function(e,t){this.wl(e,t),this.vl()},t.prototype.yl=function(e,t){var i=this,n=D.URLHelper.appendQueryParametersToUrl(t,{"bitmovin-player-id":this.Sj.internalPlayerID});return this.xl(e,n),this.Fj.resolveMasterManifest(e.url).then(function(){}).catch(function(e){i.Tj.debug("Couldn't access master playlist with ServiceWorker: ".concat(e))})},t.prototype.zl=function(e,t){var i=this;return V.createHlsManifestController(this.Sj).then(function(n){return i.Fj=n,i.Xj.NATIVE_HLS_DOWNLOAD_ERROR_HANDLING&&(i.Gj=new H.HlsDownloadErrorHandler(i.Sj,n)),V.shouldUseServiceWorker(i.Sj)?i.yl(e,t):i.Fj.resolveMasterManifest(e.url).then(function(t){0!==t.indexOf("data")&&0!==t.indexOf("blob")||i.xl(e,t)}).catch(function(e){i.Tj.debug("Couldn't access master playlist for native HLS parsing: ".concat(e))})})},t.prototype.Al=function(e){if("string"!=typeof e.url){var t,i=new c.PlayerError(u.ErrorCode.SOURCE_INVALID,{given:e.url},"Cannot load the HLS playlist: the source URL should be a string.",this.Sj.sourceContext.sourceIdentifier);return null==(t=this.Wj)||t.fireError(i),this.ck.reject(i),Promise.resolve()}var n=this.adjustToFullUrlWithQueryParams(e.url);return this.Xj.NATIVE_HLS_PARSING?this.zl(e,n):(this.xl(e,n),Promise.resolve())},t.prototype.Bl=function(e,t){if(this.Wk=[],Array.isArray(e.url))this.Cl(e.url,t);else{var i={url:e.url,bitrate:0};this.Uj.src=this.adjustToFullUrlWithQueryParams(i.url),this.Il("0",i),this.Jl("0",i),this.ql(this.Uj.getWrappedElement())}return Promise.resolve()},t.prototype.Cl=function(e,t){var i=this;t=t||function(e){var t=e.findIndex(function(e){return!0===e.preferred});return t>-1?String(t):"0"}(e);var n=this.El(e,t,!0);if(n){var r={element:n,handler:function(e){return i.Dl(u.ErrorCode.SOURCE_PROGRESSIVE_STREAM_ERROR,n.src,e)}};this.dk.push(r),r.element.addEventListener(L.MediaElementEvent.error,r.handler),this.Cj&&this.ej&&this.ej.load(),this.ql(n)}},t.prototype.Dl=function(e,t,i){var n,r=this;(0,C.clearTimeoutIfDefined)(this.Hj),null==(n=this.Jj)||n.dispose(),this.dj=!0,this.Tj.debug("Caught a stream error event (".concat(e,", ").concat(t,")"),i),new y.DefaultContentLoader(this.Sj).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(n){var o,a=n.error,s=n.status,u=n.statusText,l=(null==i?void 0:i.message)||i,d=function(e,t){r.ck.reject(new c.PlayerError(e,t,"The video element has thrown an error while loading the stream.",r.Sj.sourceContext.sourceIdentifier))};200!==s?(o={event:i,error:a,status:s,statusText:u,src:t,extraMessage:l},r.Tj.debug("last/only source has thrown an error ".concat(s," - ").concat(u),o),d(e,o)):(o={event:i,error:a,src:t,extraMessage:l},r.Tj.debug("last/only source has thrown an error, but we are able to download the asset during the error handling.",o),r.Yk&&r.yj<r.Xj.MAX_RETRIES?(r.yj++,r.Tj.debug("Reloading the source: attempt ".concat(r.yj," of ").concat(r.Xj.MAX_RETRIES,".")),r.tl(r.Yk).catch(function(){return d(e,o)})):d(e,o))})},t.prototype.El=function(t,i,n){for(var r,o=[],a=-1,s=null,u=null,c=0;c<t.length;c++){var l=t[c];if(!this.Fl(l,u,n)){if(r=e.createSourceElement(this.adjustToFullUrlWithQueryParams(l.url),l.type),u=u||l.type,this.Il(String(c),l),n){if(o.indexOf(l.type)>-1){this.Tj.debug("Stream of mime type ".concat(l.type," already added.. continuing"));continue}i===String(c)?(s=r,a=l.bitrate,this.Gl(r,String(c),l),o.push(l.type)):a===l.bitrate&&(s=r,this.Hl(r),o.push(l.type))}else s=r,this.Gl(r,String(c),l);this.Cj&&this.ej&&(this.ej.innerHTML=this.Uj.innerHTML)}}return s},t.prototype.Fl=function(t,i,n){return!e.isValidProgressiveSourceObject(t)||!!n&&(!this.Kl(t.type)||!!i&&i!==t.type)},t.isValidProgressiveSourceObject=function(e){return"object"==typeof e&&e&&e.url&&""!==e.url},t.prototype.Gl=function(e,t,i){this.Uj.appendChild(e),this.Jl(t,i)},t.prototype.Hl=function(e){this.Uj.appendChild(e)},t.prototype.Il=function(e,t){var i={id:e};t.bitrate&&(i.bitrate=t.bitrate),i.label=String(t.label||t.bitrate||"unknown"),this.Wk.push(i)},t.prototype.Jl=function(e,t){this.Xk={id:e},t.bitrate&&(this.Xk.bitrate=t.bitrate),this.Xk.label=""+(t.label||t.bitrate||"unknown")},t.prototype.Kl=function(e){return!(this.Uj.canPlayType(e).length<=0&&(this.Tj.debug("Mime type"+e+" not supported.. continuing"),1))},t.createSourceElement=function(e,t){var i=document.createElement("source");return i.src=e,t&&(0>t.indexOf("/")&&(t="video/"+t),i.type=t),i},t.prototype.unload=function(e,t){var i,n;return void 0===e&&(e="api"),void 0===t&&(t=!1),this.nk.onUnload(e),this.ll(),this.ck&&!t&&this.ck.reject(),(0,C.clearTimeoutIfDefined)(this.Ij),(0,C.clearTimeoutIfDefined)(this.Hj),null==(i=this.Jj)||i.dispose(),this.fj=!1,this.Ej=(0,p.dispose)(this.Ej),this.Gj=(0,p.dispose)(this.Gj),this.Fj=(0,p.dispose)(this.Fj),this.jk.forEach(function(e){return e.el.removeEventListener(e.ev,e.fn)}),this.jk=[],this.lk||(null==(n=this.tj)||n.signalSourceChange(),this.tj=(0,p.dispose)(this.tj)),this.Nl(),this.Ll(),this.pause(),this.gj=!0,this.Ml(),this.ik&&this.ik(),this.Zk&&(this.Xk=null),this.dj&&(this.dj=!1,t||(this.Bk(f.PlayerEvent.SourceUnloaded,{oldSource:this.xj}),this.Kj=null)),Promise.resolve()},t.prototype.Ll=function(){if(this.Cj&&this.ej){for(this.ej.removeAttribute("src");this.ej.firstChild;)this.ej.removeChild(this.ej.firstChild);this.ej.load()}},t.prototype.Ml=function(){var e=this;this.Cj?this.ej&&this.rm(this.ej):this.rm(this.Uj),this.ll(),this.Wj.off(f.PlayerEvent.TimeChanged,this.tm),this.Wj.off(f.PlayerEvent.TimeChanged,this.um),this.dk.forEach(function(t){try{t.element.removeEventListener(L.MediaElementEvent.error,t.handler)}catch(t){e.Tj.debug("Error while removing event listener",t)}})},t.prototype.Nl=function(){N.VideoElementUtil.removeSource(this.Uj),null!=this.mk?this.Uj.setAttribute("crossOrigin",this.mk):this.Uj.removeAttribute("crossOrigin"),this.Uj.load()},t.prototype.Ol=function(){return this.Cj&&this.ej&&"readyState"in this.ej?this.ej.readyState!==HTMLMediaElement.HAVE_NOTHING:!("readyState"in this.Uj)||this.Uj.readyState!==HTMLMediaElement.HAVE_NOTHING},t.prototype.isLive=function(){return this.Fk().duration===1/0},t.prototype.isPlaying=function(){return this.zj.isPlaying()},t.prototype.isPaused=function(){return this.zj.isPaused()},t.prototype.hasEnded=function(){return this.fj},t.prototype.isMuted=function(){return this.Fk().muted},t.prototype.isStalled=function(){return this.zj.isStalled},t.prototype.getVolume=function(){return 100*this.Fk().volume},t.prototype.getDuration=function(){return this.Fk().duration},t.prototype.Pl=function(e){var t={id:e.id||String(A.ArrayHelper.toArray(this.Uj.audioTracks).indexOf(e)),label:e.label,lang:e.language,getQualities:null},i=this.Ql(t);return i&&"string"==typeof i&&(t.label=i),t},t.prototype.getAudio=function(){var e=A.ArrayHelper.toArray(this.Uj.audioTracks).find(function(e){return e.enabled});return e?this.Pl(e):null},t.prototype.getAvailableAudio=function(){var e=this;return A.ArrayHelper.toArray(this.Uj.audioTracks).map(function(t){return e.Pl(t)})},t.prototype.Ql=function(e){var t={id:e.id,lang:e.lang,mimeType:M.MimeType.AudioMp4};return this.Rl()(t)},t.prototype.Rl=function(){var t=this.Sj.sourceContext,i=t&&t.source&&t.source.labeling;return i&&i[this.type]&&i[this.type].tracks?"function"!=typeof i[this.type].tracks?e.getDefaultLabelForAudio:i[this.type].tracks:e.getDefaultLabelForAudio},t.getDefaultLabelForAudio=function(){return null},t.prototype.getDownloadedVideoData=function(){return this.type===S.StreamType.Progressive?this.Xk:this.Fj?this.Fj.getDownloadedVideoData():{id:G,bitrate:0,height:0,width:0,isAuto:!0}},t.prototype.getDownloadedAudioData=function(){return{id:G,bitrate:0,isAuto:this.type===S.StreamType.Progressive}},t.prototype.Sl=function(e){var t={};return t.id=e.id,t.label=e.label,e.width>1?t.width=e.width:this.Xk&&this.Xk.id===e.id&&(this.Xk.width>1?t.width=this.Xk.width:!isNaN(this.Uj.videoWidth)&&this.Uj.videoWidth>1&&(t.width=this.Uj.videoWidth)),e.height>1?t.height=e.height:this.Xk&&this.Xk.id===e.id&&(this.Xk.height>1?t.height=this.Xk.height:!isNaN(this.Uj.videoHeight)&&this.Uj.videoHeight>1&&(t.height=this.Uj.videoHeight)),void 0!==e.bitrate&&"unknown"!==e.bitrate&&(t.bitrate=e.bitrate),t},t.prototype.getPlaybackVideoData=function(){if(this.Fj){var e=this.Fj.getPlayingVideoData();if(e)return e}if(this.Xk){var t=this.Sl(this.Xk);return"progressive"!==this.type&&(t.id=G),t}return{id:G,bitrate:0,height:this.Uj.videoHeight,width:this.Uj.videoWidth}},t.prototype.getPlaybackAudioData=function(){return{id:G,bitrate:0}},t.prototype.getMaxTimeShift=function(){if(!this.Ok())return 0;var e=this.wm();return this.Tl()&&e.start>=0?e.start-e.end:0},t.prototype.Tl=function(){return this.type===S.StreamType.Hls&&this.isLive()},t.prototype.timeShift=function(e,t){if(this.Ok()&&this.Ul(e,t))if(0===e){var i=this.wm();i.end>=0&&this.Mk(i.end)}else this.Mk(e,t)},t.prototype.Ul=function(e,t){if(t===m.STARTUP_ISSUER_NAME&&!function(e){return null!=(null==e?void 0:e.startTime)||null!=(null==e?void 0:e.startOffset)}(this.Sj.sourceContext.source.options))return!1;var i=Math.abs(Math.abs(e)-Math.abs(this.getTimeShift())),n=this.al(e);return i>.25&&!(this.qj&&n)},t.prototype.getTimeShift=function(){if(this.Vl())return 0;var e=this.wm();if(e.start>=0&&this.Xl()){var t=K(this.Fk().currentTime-e.end,this.vm());this.qj=this.al(t)&&!this.Wl(),this.rj=this.qj?0:t}return isFinite(this.rj)?this.rj:0},t.prototype.Vl=function(){return!this.isLive()||!this.zj.hasBeenPlaying&&!this.zj.seekedOrTimeshifted||this.qj},t.prototype.Wl=function(){return this.isStalled()||this.isPaused()},t.prototype.Xl=function(){return!isFinite(this.rj)||this.Wl()},t.prototype.getManifest=function(){return this.Fj?this.Fj.getManifest():null},t.prototype.getSnapshot=function(e,t){if(this.isPlaying()||this.isPaused()){var i=this.Uj.videoWidth,n=this.Uj.videoHeight;if(this.aj||(this.aj=document.createElement("canvas"),this.aj.id="snapshotHiddenCanvas"),this.aj&&this.aj.getContext&&this.aj.getContext("2d")){this.aj.height=n,this.aj.width=i,this.bj=this.aj.getContext("2d"),this.bj.drawImage(this.Uj.getWrappedElement(),0,0,i,n);var r=void 0;try{("image/jpeg"===e||"image/webp"===e)&&(Number(t)===t?(t<0||t>1)&&(t=1):t=1),r=this.aj.toDataURL(e,t)}catch(e){return void(e&&e.message?this.Tj.debug("Snapshot acquisition failed: "+e.message):this.Tj.debug("Snapshot acquisition failed"))}return{height:n,width:i,data:r}}}},t.prototype.setPlaybackSpeed=function(e){this.Fk().playbackRate=e},t.prototype.getPlaybackSpeed=function(){return this.Fk().playbackRate},t.prototype.permitControl=function(e){this.hj=e},t.prototype.Zl=function(){this.rj=-1/0,this.Ok()&&(this.qj=!1)},t.prototype.al=function(e){return Math.abs(e)<2*this.Xj.SEEK_TO_END_OFFSET},t.prototype.bl=function(){return this.sj!==this.Aj&&this.wj===m.STARTUP_ISSUER_NAME},t.prototype.cl=function(){this.bl()&&(this.Sj.logger.debug("Seek target changed during startup..."),this.gl(this.sj),this.wj="api",this.sj=-1)},t.prototype.el=function(){this.zj.isSeeking()&&(this.zj.transitionToSeekedState(this.wj!==m.STARTUP_ISSUER_NAME),this.wj="api"),this.zj.isTimeShifting()&&this.zj.transitionToTimeShiftedState(this.wj!==m.STARTUP_ISSUER_NAME)},t.prototype.qm=function(e){for(var t=0;t<this.kk.length;t++){var i=this.kk[t].elementSelector?this.kk[t].elementSelector(e):e;i&&i.addEventListener(this.kk[t].event,this.kk[t].handler)}},t.prototype.rm=function(e){for(var t=0;t<this.kk.length;t++){var i=this.kk[t].elementSelector?this.kk[t].elementSelector(e):e;i&&i.removeEventListener&&i.removeEventListener(this.kk[t].event,this.kk[t].handler)}},t.prototype.getBufferLevel=function(e){var t={level:null,targetLevel:null,type:e,media:S.MediaType.Video},i=this.Fk();if(!i.buffered||i.buffered.length<1)return t;var n=function(n){for(var r=0;r<i.buffered.length;r++){var o=i.buffered.start(r),a=i.buffered.end(r);o>n||a<=n||(t.level=a-n,e===S.BufferType.BackwardDuration&&(t.level=n-o))}},r=i.currentTime;if(n(r),null==t.level){var o=function(e,t){for(var i=e.buffered.start(0),n=Math.abs(i-t),r=1;r<e.buffered.length;r++){var o=Math.abs(e.buffered.start(r)-t);o<n&&(n=o,i=e.buffered.start(r))}return{distanceToCurrentTime:n,closestBufferStart:i}}(i,r),a=o.distanceToCurrentTime,s=o.closestBufferStart;a<1&&(this.Sj.logger.debug("Adjusting buffer level to closest buffer range ",s),n(s))}return t},t.prototype.sm=function(){if(k.ModuleManager.has(U.ModuleName.SubtitlesNative))return new(0,k.ModuleManager.get(U.ModuleName.SubtitlesNative).TextTrackController)(this.Sj,this.Uj,this.Vj,this.type);this.Tj.log("Unable to create native SubtitleController because the ".concat(U.ModuleName.SubtitlesNative," module is missing"))},t.prototype.removeSubtitle=function(e){e&&this.tj&&this.tj.removeSubtitle(e)},t.prototype.addSubtitle=function(e){return this.tj?(this.removeSubtitle(e.id),e.kind="subtitles",this.tj.addSubtitle(e)):Promise.reject()},t.prototype.listSubtitles=function(){return this.tj?this.tj.getAvailableSubtitles():[]},t.prototype.enableSubtitle=function(e){return this.tj?this.tj.enableSubtitle(e):Promise.resolve(!1)},t.prototype.disableSubtitle=function(e){return this.tj?Promise.resolve(this.tj.disableSubtitle(e)):Promise.resolve(!1)},t.prototype.adjustToFullUrlWithQueryParams=function(e){var t=D.URLHelper.toFullUrl(e);return D.URLHelper.appendQueryParametersToUrl(t,this.Xj.QUERY_PARAMETERS)},t.prototype.onFullscreenEnter=function(){this.qk=this.Uj.webkitDisplayingFullscreen,this.tj&&this.qk&&this.tj.enableNative()},t.prototype.onFullscreenExit=function(){this.tj&&this.qk&&this.tj.disableNative(),this.qk=!1},t.prototype.getAvailableVideoQualities=function(){var e=this;return"progressive"!==this.type?[]:this.Wk.map(function(t){return e.Sl(t)})},t.prototype.getBufferedRanges=function(){var e=this;return(0,s.getBufferedRanges)(this.Fk()).map(function(t){return(0,s.convertRangeToTimeMode)(t,e.getStartDate(),S.TimeMode.AbsoluteTime)})},t.prototype.setVideoQuality=function(e){var t,i=this,r=this.getPlaybackSpeed(),o=this.Wk.find(function(t){return t.id===e});if("progressive"===this.type&&o&&(!this.Xk||this.Xk.id!==e)){this.lk=!0,this.Zj=this.getCurrentTime(),this.Wk=[],this.Zk=!1;var a=this.zj.isPlaying()||this.zj.isPlay();this.zj.stallEnter(),this.unload("api",!0).catch(function(){});var s=this.Sl(o),u={sourceQuality:this.Xk,sourceQualityId:this.Xk?this.Xk.id:null,targetQuality:s,targetQualityId:s.id};this.Wj.one(f.PlayerEvent.StallEnded,function(){i.Zk=!0,(0,T.getCapabilities)().isIOS||(0,T.getCapabilities)().isSafari?(i.Yj=0,i.Wj.on(f.PlayerEvent.TimeChanged,i.um)):(i.Yj=1/0,i.um()),a&&(i.play(m.INTERNAL_ISSUER_NAME).catch(function(){i.Bk(f.PlayerEvent.Warning,new l.PlayerWarning(d.WarningCode.PLAYBACK_COULD_NOT_BE_STARTED))}),i.zj.transitionToPlayingState(m.INTERNAL_ISSUER_NAME,!1))}),this.Bk(f.PlayerEvent.VideoQualityChanged,n({},u),!0),null==(t=this.Dj)||t.initAirplay(),this.load(this.Yk,{seeking:this.Xj.GLOBAL_DISABLE_SEEKING},e).then(function(){i.setPlaybackSpeed(r),i.Bk(f.PlayerEvent.VideoDownloadQualityChange,n({},u),!0),i.Bk(f.PlayerEvent.VideoDownloadQualityChanged,n({},u),!0),i.Bk(f.PlayerEvent.VideoPlaybackQualityChanged,{sourceQuality:u.sourceQuality,targetQuality:u.targetQuality},!0)})}},t.prototype.isAirplayAvailable=function(){var e,t;return null!=(t=null==(e=this.Dj)?void 0:e.isAirplayAvailable())&&t},t.prototype.isAirplayActive=function(){var e,t;return null!=(t=null==(e=this.Dj)?void 0:e.isAirplayActive())&&t},t.prototype.showAirplayTargetPicker=function(){var e;null==(e=this.Dj)||e.showAirplayTargetPicker()},t.prototype.vm=function(){return this.isLive()?{start:this.getMaxTimeShift(),end:0}:{start:-1,end:-1}},t.prototype.wm=function(){var e=this.Uj.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}},t.prototype.getSeekableRange=function(){if(!this.isLive()||this.Xj.ENABLE_SEEK_FOR_LIVE){var e=this.getStartDate(),t=this.wm();return e?(0,s.convertRangeToTimeMode)(t,e,S.TimeMode.AbsoluteTime):t}return{start:-1,end:-1}},t.prototype.createManifestApi=function(){return this.Fj?W.NativePlayerManifestApiFactory.create(this.Fj):null},t.prototype.release=function(){var e,t=this,i=this.unload("api").catch(function(){});return(0,C.clearTimeoutIfDefined)(this.Hj),i=i.then(function(){t.type=null,t.Vj=null,t.Wj=null,t.Xj=null,t.Zj=null,t.aj=null,t.bj=null,t.ej=null,t.Uj=null,t.uj=null,t.vj=null,t.wj=null,t.xj=null,t.Yk=null,t.Xk=null,t.Wk=null,t.dk=null,t.ok=void 0}),null==(e=this.Dj)||e.dispose(),this.tj&&this.tj.dispose(),this.tj=null,this.Ej&&this.Ej.dispose(),this.Ej=null,this.Gj&&this.Gj.dispose(),this.Gj=null,this.Fj&&this.Fj.dispose(),this.Fj=null,i},t.prototype.setQueryParameters=function(e){this.Xj.QUERY_PARAMETERS=e},t.prototype.clearQueryParameters=function(){this.Xj.QUERY_PARAMETERS=void 0},t.prototype.setAudioQuality=function(e){},t.prototype.setTargetBufferLevel=function(){},t.prototype.getAvailableAudioQualities=function(){return[]},t.prototype.getDroppedVideoFrames=function(){return 0},t.prototype.getTotalStalledTime=function(){return 0},t.prototype.updateCallback=function(e){},t.prototype.getAvailableSegments=function(){return{}},t.prototype.getLatency=function(){var e=this.Uj.getWrappedElement();if(!e.getStartDate)return 1/0;var t=e.getStartDate().getTime();if(isNaN(t))return 1/0;var i=(new Date).getTime();return(0,R.toSeconds)(i-t)-this.Uj.currentTime},t.prototype.setTargetLatency=function(e){},t.prototype.getTargetLatency=function(){return null},t.prototype.setCatchupConfig=function(e){},t.prototype.getCatchupConfig=function(){return null},t.prototype.setFallbackConfig=function(e){},t.prototype.getFallbackConfig=function(){return null},t}(),function(){var n="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;t=[(0,v.trackPerformance)("NativePlayer.load",!0)],o(e,null,t,{kind:"method",name:"load",static:!1,private:!1,access:{has:function(e){return"load"in e},get:function(e){return e.load}},metadata:n},null,i),n&&Object.defineProperty(e,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:n})}(),e}()},56678:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.NativePlayerManifestApiFactory=void 0;var n=i(34047);t.NativePlayerManifestApiFactory=function(){function e(){}return e.create=function(t){var i=t.getParsedManifest();return t.isValidMasterPlaylist(i)?new function(){this.hls=e.createHlsApi(t)}:null},e.createHlsApi=function(t){var i=t.getParsedManifest(),n=i.media.filter(function(e){return"AUDIO"===e.attributes.TYPE}),r=i.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(i.playlists)},o.prototype.getAudioTracks=function(){return e.getAudioTracks(n,i.playlists)},o.prototype.getTextTracks=function(){return e.getTextTracks(r)},o}())},e.getAudioTracks=function(e,t){var i=e.reduce(function(e,t){return e[t.attributes.LANGUAGE]||(e[t.attributes.LANGUAGE]=t.attributes.NAME),e},{}),r=Object.keys(i).map(function(t,n){return{id:"audio-".concat(n),label:i[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&&n.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:n.CodecStringHelper.getExtractedCodecStrings(e.attributes.CODECS).audio}})}}),r},e.getVideoTracks=function(t){var i=t.filter(function(e){return!e.attributes.CODECS||n.CodecStringHelper.getMimeTypeForCodecString(e.attributes.CODECS).includes("video")});return[{id:"video-0",label:"und",getQualities:function(){return e.getVideoQualities(i)}}]},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,i=e.attributes.RESOLUTION&&e.attributes.RESOLUTION.height,r={id:i?"".concat(i,"_").concat(e.attributes.BANDWIDTH):"".concat(e.attributes.BANDWIDTH),bitrate:e.attributes.BANDWIDTH,width:t||0,height:i||0};if(e.attributes.CODECS){var o=n.CodecStringHelper.getExtractedCodecStrings(e.attributes.CODECS);o.video&&(r.codec=o.video)}return r})},e}()},49706:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.TechnologyChecker=void 0;var n=i(44468);t.TechnologyChecker=function(){function e(){}return e.prototype.getSupportedTechnologies=function(){return[{player:n.PlayerType.Native,streaming:n.StreamType.Progressive},{player:n.PlayerType.Native,streaming:n.StreamType.Hls},{player:n.PlayerType.Native,streaming:n.StreamType.Dash}]},e}()}},function(e){return e(e.s=27530)}])},87:function(e){"use strict";self,e.exports=(self.webpackChunkbitmovin_player=self.webpackChunkbitmovin_player||[]).push([[497],{69100:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.WhepModuleDefinition=void 0;var n=i(62756),r=i(3392),o=i(75801);t.WhepModuleDefinition={name:n.ModuleName.EngineWebRtc,module:{WebRtcPlayer:o.WebRtcPlayer,technologyChecker:new r.TechnologyChecker}},t.default=t.WhepModuleDefinition},3392:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.TechnologyChecker=void 0;var n=i(44468);t.TechnologyChecker=function(){function e(){}return e.prototype.getSupportedTechnologies=function(){return[{player:n.PlayerType.WebRtc,streaming:n.StreamType.Whep}]},e}()},75801:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.WebRtcPlayer=void 0;var n=i(40306),r=i(3336),o=i(80813),a=i(3714),s=i(44468),u=i(15487),c=i(88844),l=i(19274),d=i(8204),h="not available";function p(){}function f(){return null}t.WebRtcPlayer=function(){function e(e){var t=this;if(this.context=e,this.preload=p,this.setAudioQuality=p,this.setVideoQuality=p,this.setTargetBufferLevel=p,this.updateCallback=p,this.setQueryParameters=p,this.clearQueryParameters=p,this.timeShift=p,this.removeSubtitle=p,this.setAudio=p,this.permitControl=p,this.onFullscreenEnter=p,this.onFullscreenExit=p,this.showAirplayTargetPicker=p,this.setTargetLatency=p,this.setCatchupConfig=p,this.setFallbackConfig=p,this.getManifest=f,this.getAudio=f,this.getLatency=f,this.getTargetLatency=f,this.getCatchupConfig=f,this.getFallbackConfig=f,this.createManifestApi=f,this.pause=function(){return t.ym.pause()},this.seek=function(){return!1},this.isPlaying=function(){return!t.ym.paused},this.isPaused=function(){return t.ym.paused},this.hasEnded=function(){return t.ym.ended},this.isMuted=function(){return t.ym.muted},this.isStalled=function(){return!1},this.isLive=function(){return!0},this.getVolume=function(){return 100*t.ym.volume},this.getCurrentTime=function(){return t.ym.currentTime},this.getDuration=function(){return 1/0},this.getAvailableVideoQualities=function(){return[]},this.getAvailableAudioQualities=function(){return[]},this.getDroppedVideoFrames=function(){return t.ym.droppedVideoFrames},this.getTotalStalledTime=function(){return 0},this.getBufferedRanges=function(){return[]},this.getMaxTimeShift=function(){return 0},this.getTimeShift=function(){return 0},this.addSubtitle=function(){return Promise.reject()},this.enableSubtitle=function(){return Promise.resolve(!1)},this.disableSubtitle=function(){return Promise.resolve(!1)},this.listSubtitles=function(){return[]},this.getAvailableAudio=function(){return[]},this.getSnapshot=function(){},this.getPlaybackSpeed=function(){var e,i;return null!=(i=null==(e=t.ym)?void 0:e.playbackRate)?i:1},this.isAirplayAvailable=function(){return!1},this.isAirplayActive=function(){return!1},this.getSeekableRange=function(){return{start:-1,end:-1}},this.getAvailableSegments=function(){return{}},this.getDownloadedVideoData=function(){return{id:h,bitrate:0,height:0,width:0,isAuto:!0}},this.getDownloadedAudioData=function(){return{id:h,bitrate:0,isAuto:!0}},this.getPlaybackVideoData=function(){return{id:h,bitrate:0,height:t.ym.videoHeight,width:t.ym.videoWidth}},this.getPlaybackAudioData=function(){return{id:h,bitrate:0}},this.getAudioQuality=this.getPlaybackAudioData,this.getVideoQuality=this.getPlaybackVideoData,this.getBufferLevel=function(e,t){return{level:null,targetLevel:null,type:e,media:null!=t?t:s.MediaType.Video}},this.Mm=function(){var e;null==(e=t.Jm)||e.transitionToPlayingState("webrtc")},this.Nm=function(){var e;null==(e=t.Jm)||e.transitionToPausedState(!0,"webrtc")},this.Om=function(){t.context.eventHandler.dispatchEvent(a.PlayerEvent.TimeChanged,{time:t.ym.currentTime})},this.Pm=function(){var e,i;if("failed"===(null==(e=t.Im)?void 0:e.connectionState)){if(t.context.logger.debug("WebRTC peer connection failed"),t.Im.close(),t.Fm<=0)return void t.context.eventHandler.fireError(new r.PlayerError(n.ErrorCode.SOURCE_ERROR,void 0,"WebRTC peer connection failed",t.context.sourceContext.sourceIdentifier));t.context.logger.debug("WebRTC peer connection failed, retrying ".concat(t.Fm," more time(s)")),t.Vm().catch(function(e){return t.context.logger.debug("WebRTC peer connection failed:",e)}),t.Fm--}else"connected"===(null==(i=t.Im)?void 0:i.connectionState)&&(t.context.logger.debug("WebRTC peer connection established"),t.Fm=2)},this.Qm=function(){void 0!==t.Im&&(t.Im.close(),t.ym.srcObject=null,t.Im=t.Tm(),t.Dm.resetPeer(t.Im),t.Dm.connect().catch(function(e){return t.context.logger.debug("WHEP reconnection failed:",e)}))},this.Rm=function(){var e;if(void 0!==t.Im){var i=0;null==(e=t.Im)||e.getStats(null).then(function(e){var n=[];e.forEach(function(e){n.push(e),e.type.match("inbound-rtp")&&(i+=e.bytesReceived)}),t.context.logger.debug("WebRTC connection statistics:",n),i<=t.Bm?(t.Hm+=t.xm,!1===t.Gm&&t.Hm>=t.Am&&(t.context.logger.debug("WebRTC media seems to have disconnected..."),t.Gm=!0)):(t.Bm=i,t.Hm=0,!0===t.Gm&&(t.context.logger.debug("WebRTC media reconnected"),t.Gm=!1))}).catch(function(e){return t.context.logger.debug("WebRTC statistics collection failed",e)})}},this.Um=function(e){for(var i=0,n=e.streams;i<n.length;i++){var r=n[i];"feedbackvideomslabel"===r.id||t.ym.srcObject||(t.context.logger.debug('Set WebRTC video element remote stream to "'.concat(r.id,'" with ').concat(r.getAudioTracks().length," audio tracks and ").concat(r.getVideoTracks().length," video tracks")),t.ym.srcObject=r)}},void 0===this.context.videoElement)throw new r.PlayerError(n.ErrorCode.SETUP_ERROR);this.Bm=0,this.Hm=0,this.Gm=!1,this.ym=this.context.videoElement,this.Fm=2,this.xm=2e3,this.Am=3e4,this.zm=[{urls:"stun:stun.l.google.com:19302"}]}return e.prototype.Km=function(){this.ym.addEventListener(l.MediaElementEvent.pause,this.Nm),this.ym.addEventListener(l.MediaElementEvent.playing,this.Mm),this.ym.addEventListener(l.MediaElementEvent.timeupdate,this.Om)},e.prototype.Lm=function(){this.ym.removeEventListener(l.MediaElementEvent.pause,this.Nm),this.ym.removeEventListener(l.MediaElementEvent.playing,this.Mm),this.ym.removeEventListener(l.MediaElementEvent.timeupdate,this.Om)},e.prototype.load=function(e){return"string"!=typeof e.url?Promise.reject("Invalid source config"):(this.Km(),this.Fm=2,this.Em=e.url,this.Vm())},e.prototype.Sm=function(){var e={iceServers:this.zm};return(0,u.isTizen2020)()&&(e.sdpSemantics="unified-plan"),e},e.prototype.Tm=function(){var e=new RTCPeerConnection(this.Sm());return e.onconnectionstatechange=this.Pm,e.ontrack=this.Um,e},e.prototype.Vm=function(){return this.Im=this.Tm(),void 0===this.Em?Promise.reject(new r.PlayerError(n.ErrorCode.SOURCE_INVALID,void 0,"WHEP channel URL is undefined",this.context.sourceContext.sourceIdentifier)):(void 0!==this.Dm&&this.Dm.dispose(),this.Dm=new d.WhepAdapter(this.context,this.Im,this.Em,this.Qm),this.Cm=window.setInterval(this.Rm,this.xm),this.Dm.connect())},e.prototype.stop=function(){var e;(0,c.clearIntervalIfDefined)(this.Cm),this.Cm=void 0,this.Dm.dispose(),null==(e=this.Im)||e.close(),this.ym.srcObject=null,this.ym.load()},e.prototype.play=function(){var e;return null==(e=this.Jm)||e.transitionToPlayState(!0,"webrtc"),this.ym.play()},e.prototype.mute=function(){this.ym.muted||(this.ym.muted=!0,this.context.eventHandler.dispatchEvent(a.PlayerEvent.Muted))},e.prototype.unmute=function(){this.ym.muted&&(this.ym.muted=!1,this.context.eventHandler.dispatchEvent(a.PlayerEvent.Unmuted))},e.prototype.destroy=function(){this.stop()},e.prototype.setVolume=function(e){var t=this.getVolume();this.ym.volume=Math.min(e/100,1),this.context.eventHandler.dispatchEvent(a.PlayerEvent.VolumeChanged,{sourceVolume:t,targetVolume:e})},e.prototype.prepareLoad=function(){return this.Jm=this.context.serviceManager.get(o.ServiceName.PlayerStateService),Promise.resolve()},e.prototype.unload=function(){var e=null!==this.ym.srcObject;return this.Lm(),this.stop(),e&&this.context.eventHandler.dispatchEvent(a.PlayerEvent.SourceUnloaded),Promise.resolve()},e.prototype.setPlaybackSpeed=function(e){this.ym.playbackRate=e},e.prototype.release=function(){return this.Lm(),this.destroy(),this.unload()},e}()},8204:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.WhepAdapter=void 0;var n,r=i(40306),o=i(3336),a=i(4129),s=i(29669),u=i(88844),c={"Content-Type":"application/sdp"};!function(e){e[e.Client=0]="Client",e[e.Server=1]="Server"}(n||(n={})),t.WhepAdapter=function(){function e(e,t,i,a){var s=this;this.context=e,this.channelUrl=i,this.reconnectCallback=a,this.NN=function(){s.IN=!0,s.JN=window.setTimeout(s.UN,2e3)},this.RN=function(e){if("icecandidate"===e.type){var t=e.candidate;t&&s.context.logger.debug("ICE candidate:",t.candidate)}},this.SN=function(e){s.context.logger.debug("Waiting for ICE candidates failed:",e);var t=e instanceof o.PlayerError?e:new o.PlayerError(r.ErrorCode.SOURCE_INVALID,{error:e},"ICE gathering failed",s.context.sourceContext.sourceIdentifier);s.context.eventHandler.fireError(t)},this.TN=function(){s.context.logger.debug('WHEP ICE gathering state changed to "'.concat(s.HN.iceGatheringState,'"')),"complete"===s.HN.iceGatheringState&&s.IN&&s.VN().catch(s.SN)},this.UN=function(){s.context.logger.debug("IceGatheringTimeout"),s.IN&&s.VN().catch(s.SN)},this.WN=function(e){return Promise.reject(new o.PlayerError(r.ErrorCode.NETWORK_ERROR,{status:e.status,statusText:e.statusText,body:e.body},"WHEP network request failed with status ".concat(e.status),s.context.sourceContext.sourceIdentifier))},this.GN=n.Client,this.HN=t,this.resetPeer(t)}return e.prototype.KN=function(e){e.addEventListener("icecandidate",this.RN),e.addEventListener("icegatheringstatechange",this.TN)},e.prototype.LN=function(e){e.removeEventListener("icecandidate",this.RN),e.removeEventListener("icegatheringstatechange",this.TN)},e.prototype.resetPeer=function(e){this.LN(this.HN),this.KN(e),this.HN=e},e.prototype.connect=function(){return this.QN()},e.prototype.MN=function(){(0,u.clearTimeoutIfDefined)(this.JN),this.JN=void 0},e.prototype.ON=function(){var e=this;return this.YN().then(function(t){return e.HN.setRemoteDescription({type:"offer",sdp:t})}).then(function(){return e.HN.createAnswer()}).then(function(t){return e.HN.setLocalDescription(t)}).then(this.NN)},e.prototype.PN=function(){var e=this;return this.HN.addTransceiver("video",{direction:"recvonly"}),this.HN.addTransceiver("audio",{direction:"recvonly"}),this.HN.createOffer().then(function(t){return e.HN.setLocalDescription(t)}).then(this.NN)},e.prototype.QN=function(){return this.MN(),this.GN===n.Client?this.PN():this.ON()},e.prototype.VN=function(){return this.MN(),this.IN=!1,this.GN===n.Client?this.aN():this.ZN()},e.prototype.XN=function(e,t,i){return new a.DefaultContentLoader(this.context,{requestType:i}).load(this.channelUrl,e,s.HttpResponseType.TEXT,t,c)},e.prototype.YN=function(){var e=this;return this.GN!==n.Server?Promise.resolve(""):this.XN(s.HttpRequestMethod.POST,"",s.HttpRequestType.WEBRTC_SDP_REQUEST).then(function(t){var i,n,r,o;return e.FN=null!=(o=null!=(n=null==(i=t.headers)?void 0:i.Location)?n:null==(r=t.headers)?void 0:r.location)?o:"",e.context.logger.debug("WHEP resource offered:",e.FN),String(t.body)}).catch(this.WN)},e.prototype.ZN=function(){var e,t=this;if(this.GN!==n.Server)return Promise.resolve();var i=this.HN.localDescription;return this.XN(s.HttpRequestMethod.PATCH,null!=(e=null==i?void 0:i.sdp)?e:"",s.HttpRequestType.WEBRTC_SDP_ANSWER).then(function(e){return t.context.logger.debug("WHEP answer response: ".concat(e.status))}).catch(this.WN)},e.prototype.aN=function(){var e,t=this;if(this.GN!==n.Client)return Promise.resolve();var i=this.HN.localDescription;return this.XN(s.HttpRequestMethod.POST,null!=(e=null==i?void 0:i.sdp)?e:"",s.HttpRequestType.WEBRTC_SDP_OFFER).then(function(e){var i,r,o,a;return"string"==typeof e.body?(t.FN=null!=(a=null!=(r=null==(i=e.headers)?void 0:i.Location)?r:null==(o=e.headers)?void 0:o.location)?a:"",t.context.logger.debug("Received WHEP remote description (location: ".concat(t.FN,")")),t.HN.setRemoteDescription({type:"answer",sdp:e.body})):(400===e.status?(t.context.logger.debug("server does not support WHEP client-offer, reconnecting..."),t.GN=n.Server,t.reconnectCallback()):t.context.logger.debug("WHEP offer response: ".concat(e.status)),Promise.resolve())}).catch(this.WN)},e.prototype.dispose=function(){this.LN(this.HN)},e}()}},function(e){return e(e.s=69100)}])},146:function(e){self,e.exports=(self.webpackChunkbitmovin_player=self.webpackChunkbitmovin_player||[]).push([[458],{62903:function(e,t,i){e.exports=function(){return i(90040)('!function(){"use strict";var e={1829:function(e,t,n){function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function r(e,t,n){return(t=function(e){var t=function(e){if("object"!=i(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==i(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function a(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
vendor: 2,874 bytes, line 1
1t%2?o(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function s(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}n.r(t),n.d(t,{__DO_NOT_USE__ActionTypes:function(){return c},applyMiddleware:function(){return E},bindActionCreators:function(){return g},combineReducers:function(){return p},compose:function(){return h},createStore:function(){return d},legacy_createStore:function(){return f}});var u=function(){return"function"==typeof Symbol&&Symbol.observable||"@@observable"}(),l=function(){return Math.random().toString(36).substring(7).split("").join(".")},c={INIT:"@@redux/INIT"+l(),REPLACE:"@@redux/REPLACE"+l(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+l()}};function d(e,t,n){var i;if("function"==typeof t&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error(s(0));if("function"==typeof t&&void 0===n&&(n=t,t=void 0),void 0!==n){if("function"!=typeof n)throw new Error(s(1));return n(d)(e,t)}if("function"!=typeof e)throw new Error(s(2));var r=e,o=t,a=[],l=a,f=!1;function p(){l===a&&(l=a.slice())}function S(){if(f)throw new Error(s(3));return o}function g(e){if("function"!=typeof e)throw new Error(s(4));if(f)throw new Error(s(5));var t=!0;return p(),l.push(e),function(){if(t){if(f)throw new Error(s(6));t=!1,p();var n=l.indexOf(e);l.splice(n,1),a=null}}}function h(e){if(!function(e){if("object"!=typeof e||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}(e))throw new Error(s(7));if(void 0===e.type)throw new Error(s(8));if(f)throw new Error(s(9));try{f=!0,o=r(o,e)}finally{f=!1}for(var t=a=l,n=0;n<t.length;n++)(0,t[n])();return e}return h({type:c.INIT}),(i={dispatch:h,subscribe:g,getState:S,replaceReducer:function(e){if("function"!=typeof e)throw new Error(s(10));r=e,h({type:c.REPLACE})}})[u]=function(){var e,t=g;return(e={subscribe:function(e){if("object"!=typeof e||null===e)throw new Error(s(11));function n(){e.next&&e.next(S())}return n(),{unsubscribe:t(n)}}})[u]=function(){return this},e},i}var f=d;function p(e){for(var t=Object.keys(e),n={},i=0;i<t.length;i++){var r=t[i];"function"==typeof e[r]&&(n[r]=e[r])}var o,a=Object.keys(n);try{!function(e){Object.keys(e).forEach((function(t){var n=e[t];if(void 0===n(void 0,{type:c.INIT}))throw new Error(s(12));if(void 0===n(void 0,{type:c.PROBE_UNKNOWN_ACTION()}))throw new Error(s(13))}))}(n)}catch(e){o=e}return function(e,t){if(void 0===e&&(e={}),o)throw o;for(var i=!1,r={},u=0;u<a.length;u++){var l=a[u],c=n[l],d=e[l],f=c(d,t);
vendor: 4,450 bytes, line 1
1if(void 0===f)throw t&&t.type,new Error(s(14));r[l]=f,i=i||f!==d}return(i=i||a.length!==Object.keys(e).length)?r:e}}function S(e,t){return function(){return t(e.apply(this,arguments))}}function g(e,t){if("function"==typeof e)return S(e,t);if("object"!=typeof e||null===e)throw new Error(s(16));var n={};for(var i in e){var r=e[i];"function"==typeof r&&(n[i]=S(r,t))}return n}function h(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return 0===t.length?function(e){return e}:1===t.length?t[0]:t.reduce((function(e,t){return function(){return e(t.apply(void 0,arguments))}}))}function E(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){return function(){var n=e.apply(void 0,arguments),i=function(){throw new Error(s(15))},r={getState:n.getState,dispatch:function(){return i.apply(void 0,arguments)}},o=t.map((function(e){return e(r)}));return i=h.apply(void 0,o)(n.dispatch),a(a({},n),{},{dispatch:i})}}}},4499:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.ArrayIncludesPolyfill=void 0,t.ArrayIncludesPolyfill=function(){return{polyfill:function(){Object.defineProperty(Array.prototype,"includes",{value:function(e,t){if(null==this)throw new TypeError(\'"this" is null or not defined\');var n=Object(this),i=n.length>>>0;if(0===i)return!1;var r=0|t,o=Math.max(r>=0?r:i-Math.abs(r),0);function a(e,t){return e===t||"number"==typeof e&&"number"==typeof t&&isNaN(e)&&isNaN(t)}for(;o<i;){if(a(n[o],e))return!0;o++}return!1}})}}}()},3878:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.StringEndsWithPolyfill=void 0,t.StringEndsWithPolyfill=function(){return{polyfill:function(){String.prototype.endsWith=function(e,t){if(null==e)return!1;var n=this.length;return null!=t&&(n=Math.min(t,this.length)),this.substring(n-e.length,n)===e}}}}()},4205:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.StringIncludesPolyfill=void 0,t.StringIncludesPolyfill=function(){return{polyfill:function(){String.prototype.includes=function(e,t){return"number"!=typeof t&&(t=0),!(t+e.length>this.length)&&-1!==this.indexOf(e,t)}}}}()},829:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.StringStartsWithPolyfill=void 0,t.StringStartsWithPolyfill=function(){return{polyfill:function(){String.prototype.startsWith=function(e,t){var n=t>0?0|t:0;return this.substring(n,n+e.length)===e}}}}()},8052:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.ModuleManager=void 0;var i=n(306),r=n(3336),o=n(5880),a=function(){function e(){}return e.initialize=function(){this.modules||(this.modules={})},e.add=function(e){if(this.initialize(),!e)throw new r.PlayerError(i.ErrorCode.MODULE_INVALID_DEFINITION,void 0,"Cannot add the module: no module definition was provided to the API.");if(!e.name)throw new r.PlayerError(i.ErrorCode.MODULE_INVALID_DEFINITION,void 0,"Cannot add the module: no `name` property was provided to the module definition.");if(!e.module)throw new r.PlayerError(i.ErrorCode.MODULE_INVALID_DEFINITION,void 0,"Cannot add the module: no `module` property was provided to the module definition.");if(e.dependencies){for(var t=0,n=e.dependencies;t<n.length;t++){var a=n[t];if(!this.has(a))throw new o.PlayerModuleMissingError(e.name,a)}if("function"!=typeof e.module)throw new r.PlayerError(i.ErrorCode.MODULE_INVALID_DEFINITION_DEPENDENCY,{name:e.name},"Cannot add the module: modules with dependencies must pass a deferred loading function to the `ModuleDefinition.module` property.")}var s=e.module;"function"==typeof s&&(s=s()),this.modules[e.name]={moduleDefinition:e,module:s},e.hooks&&e.hooks.add&&e.hooks.add(e.module)},e.remove=function(e){var t;if(this.modules){if(!this.modules[e])throw new o.PlayerModuleMissingError(e);var n=this.modules[e].moduleDefinition;(null===(t=n.hooks)||void 0===t?void 0:t.remove)&&n.hooks.remove(n.module),delete this.modules[e]}},e.get=function(e,t){void 0===t&&(t=!0),this.initialize();var n=this.modules[e];if(n&&n.module)return n.module;if(t)throw new o.PlayerModuleMissingError(e)},e.has=function(e){return void 0!==this.get(e,!1)},e.getModuleNames=function(){return Object.getOwnPropertyNames(this.modules)},e.getModuleDefinitions=function(){var e=this;return this.getModuleNames().map((function(t){return e.modules[t]}))},e.callSetupHooks=function(e){this.getModuleDefinitions().filter((function(e){return e.moduleDefinition.hooks&&e.moduleDefinition.hooks.setup}
vendor: 15,992 bytes, line 1
1)).forEach((function(t){return t.moduleDefinition.hooks.setup(t.module,e)}))},e.callDestroyHooks=function(e){var t=this.getModuleDefinitions().filter((function(e){return e.moduleDefinition.hooks&&e.moduleDefinition.hooks.destroy})).map((function(t){return t.moduleDefinition.hooks.destroy(t.module,e)}));return Promise.all(t).then((function(){}))},e}();t.ModuleManager=a},2756:function(e,t){var n;Object.defineProperty(t,"__esModule",{value:!0}),t.ModuleName=void 0,function(e){e.VR="VR",e.XML="XML",e.Smooth="Smooth",e.AdvertisingCore="AdvertisingCore",e.Advertising="Advertising",e.AdvertisingIma="Advertising",e.AdvertisingBitmovin="Advertising",e.AdvertisingOmSdk="AdvertisingOmSdk",e.SGAI="SGAI",e.Polyfill="Polyfill",e.Patch="Patch",e.RemoteControl="RemoteControl",e.RendererMse="RendererMSE",e.EngineNative="EngineNative",e.EngineBitmovin="EngineBitmovin",e.ABR="ABR",e.Crypto="Crypto",e.HLS="HLS",e.DRM="DRM",e.DASH="DASH",e.ContainerTS="ContainerTS",e.ContainerMP4="ContainerMP4",e.ContainerWebM="ContainerWebM",e.Subtitles="Subtitles",e.SubtitlesTTML="SubtitlesTTML",e.SubtitlesWebVTT="SubtitlesWebVTT",e.SubtitlesCEA608="SubtitlesCEA608",e.SubtitlesNative="SubtitlesNative",e.Style="Style",e.Thumbnail="Thumbnail",e.ThumbnailImp="Thumbnail",e.UI="UI",e.Tizen="Tizen",e.Webos="webos",e.Vidaa="vidaa",e.Wpe="wpe",e.LowLatency="LowLatency",e.ServiceWorkerClient="ServiceWorkerClient",e.Envivio="Envivio",e.PlayStation5="PlayStation5",e.PlayStation4="PlayStation4",e.EngineWebRtc="EngineWebRtc",e.ReactNative="ReactNative"}(n||(t.ModuleName=n={}))},5880:function(e,t,n){var i=this&&this.__extends||function(){var e=function(t,n){return e=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,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.PlayerModuleMissingError=void 0;var r=n(306),o=function(e){function t(t,n){return n?e.call(this,r.ErrorCode.MODULE_DEPENDENCY_MISSING,{name:t,dependency:n},"The ".concat(t," module requires the ").concat(n," module to be included as well."))||this:e.call(this,r.ErrorCode.MODULE_MISSING,{name:t},"The ".concat(t," module is required to play this stream."))||this}return i(t,e),t}(n(3336).PlayerError);t.PlayerModuleMissingError=o},6790:function(e,t){var n,i,r,o,a,s;Object.defineProperty(t,"__esModule",{value:!0}),t.DrmSetupError=t.TransmuxingRejectionReason=t.SegmentVerificationResult=t.HlsEncryptionMethods=t.HlsEncryptionMethod=t.SOURCE_BUFFER_APPEND_STATUS=t.RepresentationType=void 0,function(e){e[e.AUDIO=1]="AUDIO",e[e.VIDEO=2]="VIDEO",e[e.SUBTITLE=3]="SUBTITLE"}(n||(t.RepresentationType=n={})),function(e){e[e.FAILURE=0]="FAILURE",e[e.QUOTA_EXCEEDED=1]="QUOTA_EXCEEDED",e[e.SUSPENDED=2]="SUSPENDED"}(i||(t.SOURCE_BUFFER_APPEND_STATUS=i={})),function(e){e.NONE="NONE",e.AES_128="AES-128",e.SAMPLE_AES="SAMPLE-AES",e.SAMPLE_AES_CTR="SAMPLE-AES-CTR"}(r||(t.HlsEncryptionMethod=r={})),t.HlsEncryptionMethods=Object.keys(r).map((function(e){return r[e]})),function(e){e.Publish="publish",e.Drop="drop",e.Park="park"}(o||(t.SegmentVerificationResult=o={})),function(e){e.INVALID_TS_SEGMENT="Invalid TS segment, could not extract segment information",e.TRANSMUXING_ABORTED="Transmuxing was aborted as it is no longer needed"}(a||(t.TransmuxingRejectionReason=a={})),function(e){e.CANCELLED="Loading was cancelled for the DRM source",e.MISSING_CONFIGURATION="DRM is not configured"}(s||(t.DrmSetupError=s={}))},3714:function(e,t){var n,i,r,o,a,s;Object.defineProperty(t,"__esModule",{value:!0}),t.ContentLocationChangedReason=t.LatencyMode=t.AdInteractionType=t.AdQuartile=t.MetadataType=t.PlayerEvent=void 0,function(e){e.Ready="ready",e.Play="play",e.Playing="playing",e.Paused="paused",e.Seek="seek",e.Seeked="seeked",e.TimeShift="timeshift",e.TimeShifted="timeshifted",e.VolumeChanged="volumechanged",e.Muted="muted",e.Unmuted="unmuted",e.PlayerResized="playerresized",e.PlaybackFinished="playbackfinished",e.Error="error",e.Warning="warning",e.StallStarted="stallstarted",e.StallEnded="stallended",e.AudioChanged="audiochanged",e.AudioAdded="audioadded",e.AudioRemoved="audioremoved",e.VideoQualityChanged="videoqualitychanged",e.AudioQualityChanged="audioqualitychanged",e.VideoDownloadQualityChange="videodownloadqualitychange",e.AudioDownloadQualityChange="audiodownloadqualitychange",e.VideoDownloadQualityChanged="videodownloadqualitychanged",e.AudioDownloadQualityChanged="audiodownloadqualitychanged",e.VideoPlaybackQualityChanged="videoplaybackqualitychanged",e.AudioPlaybackQualityChanged="audioplaybackqualitychanged",e.TimeChanged="timechanged",e.CueParsed="cueparsed",e.CueEnter="cueenter",e.CueUpdate="cueupdate",e.CueExit="cueexit",e.SegmentPlayback="segmentplayback",e.Metadata="metadata",e.MetadataParsed="metadataparsed",e.MetadataChanged="metadatachanged",e.VideoAdaptation="videoadaptation",e.AudioAdaptation="audioadaptation",e.DownloadFinished="downloadfinished",e.SegmentRequestFinished="segmentrequestfinished",e.AdManifestLoaded="admanifestloaded",e.AdStarted="adstarted",e.OverlayAdStarted="overlayadstarted",e.AdQuartile="adquartile",e.AdSkipped="adskipped",e.AdClicked="adclicked",e.AdInteraction="adinteraction",e.AdLinearityChanged="adlinearitychanged",e.AdBreakStarted="adbreakstarted",e.AdBreakFinished="adbreakfinished",e.RestoringContent="restoringcontent",e.AdFinished="adfinished",e.AdError="aderror",e.VRViewingDirectionChange="vrviewingdirectionchange",e.VRViewingDirectionChanged="vrviewingdirectionchanged",e.VRStereoChanged="vrstereochanged",e.CastAvailable="castavailable",e.CastStopped="caststopped",e.CastStart="caststart",e.CastStarted="caststarted",e.CastWaitingForDevice="castwaitingfordevice",e.SourceLoaded="sourceloaded",e.SourceUnloaded="sourceunloaded",e.PeriodSwitch="periodswitch",e.PeriodSwitched="periodswitched",e.DVRWindowExceeded="dvrwindowexceeded",e.SubtitleAdded="subtitleadded",e.SubtitleRemoved="subtitleremoved",e.ShowAirplayTargetPicker="showairplaytargetpicker",e.AirplayAvailable="airplayavailable",e.AirplayChanged="airplaychanged",e.Destroy="destroy",e.PlaybackSpeedChanged="playbackspeedchanged",e.DurationChanged="durationchanged",e.ViewModeChanged="viewmodechanged",e.ModuleReady="moduleready",e.SubtitleEnable="subtitleenable",e.SubtitleEnabled="subtitleenabled",e.SubtitleDisable="subtitledisable",e.SubtitleDisabled="subtitledisabled",e.VideoQualityAdded="videoqualityadded",e.VideoQualityRemoved="videoqualityremoved",e.AudioQualityAdded="audioqualityadded",e.AudioQualityRemoved="audioqualityremoved",e.TargetLatencyChanged="targetlatencychanged",e.LatencyModeChanged="latencymodechanged",e.LicenseValidated="licensevalidated",e.DrmLicenseAdded="drmlicenseadded",e.AspectRatioChanged="aspectratiochanged",e.VisibilityChanged="visibilitychanged",e.ContentLocationChanged="contentlocationchanged"}(n||(t.PlayerEvent=n={})),function(e){e.CUETAG="CUETAG",e.DATERANGE="DATERANGE",e.EVENT_STREAM="EVENT-STREAM",e.CUSTOM="CUSTOM",e.SCTE="SCTE",e.ID3="ID3",e.EMSG="EMSG",e.CAST="CAST"}(i||(t.MetadataType=i={})),function(e){e.FIRST_QUARTILE="firstQuartile",e.MIDPOINT="midpoint",e.THIRD_QUARTILE="thirdQuartile"}(r||(t.AdQuartile=r={})),function(e){e.Vpaid="vpaid"}(o||(t.AdInteractionType=o={})),function(e){e.Idle="idle",e.Catchup="catchup",e.Fallback="fallback",e.Suspended="suspended"}(a||(t.LatencyMode=a={})),function(e){e.Failover="failover",e.ContentSteering="contentsteering"}(s||(t.ContentLocationChangedReason=s={}))},4468:function(e,t,n){var i=this&&this.__extends||function(){var e=function(t,n){return e=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,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.TimeMode=t.SupportedTechnologyMode=t.ViewMode=t.PlayerAPINotAvailableError=t.LogLevel=t.BufferType=t.MediaType=t.StreamType=t.PlayerType=void 0;var r=n(306),o=n(3336),a=n(2886);Object.defineProperty(t,"PlayerType",{enumerable:!0,get:function(){return a.PlayerType}});var s,u,l,c=n(5623);Object.defineProperty(t,"StreamType",{enumerable:!0,get:function(){return c.StreamType}}),function(e){e.Audio="audio",e.Video="video",e.Subtitles="subtitles",e.Thumbnails="thumbnails"}(s||(t.MediaType=s={})),function(e){e.ForwardDuration="forwardduration",e.BackwardDuration="backwardduration"}(u||(t.BufferType=u={})),function(e){e.DEBUG="debug",e.LOG="log",e.WARN="warn",e.ERROR="error",e.OFF="off"}(l||(t.LogLevel=l={}));var d,f,p,S=function(e){function t(t){return e.call(this,r.ErrorCode.API_NOT_AVAILABLE,void 0,"Cannot use the `player.".concat(t,"` API: the player has already been destroyed."))||this}return i(t,e),t}(o.PlayerError);t.PlayerAPINotAvailableError=S,function(e){e.Inline="inline",e.Fullscreen="fullscreen",e.PictureInPicture="pictureinpicture"}(d||(t.ViewMode=d={})),function(e){e.Platform="platform",e.Modules="modules",e.PlatformAndModules="platformandmodules"}(f||(t.SupportedTechnologyMode=f={})),function(e){e.RelativeTime="relativetime",e.AbsoluteTime="absolutetime"}(p||(t.TimeMode=p={}))},2886:function(e,t){var n;Object.defineProperty(t,"__esModule",{value:!0}),t.PlayerType=void 0,function(e){e.Html5="html5",e.Native="native",e.WebRtc="webrtc",e.Unknown="unknown"}(n||(t.PlayerType=n={}))},5623:function(e,t){var n;Object.defineProperty(t,"__esModule",{value:!0}),t.StreamType=void 0,function(e){e.Progressive="progressive",e.Dash="dash",e.Hls="hls",e.Smooth="smooth",e.Whep="whep",e.Unknown="unknown"}(n||(t.StreamType=n={}))},649:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.kebabCaseToCamelCase=function(e){return e.split("-").map((function(e,t){return 0===t?e.toLowerCase():e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()})).join("")},t.forceReallocation=function(e){return e?(0,i.isFirefox)()?JSON.parse(JSON.stringify(e)):(" "+e).slice(1):""};var i=n(5487)},4685:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.isObject=function(e){return null!==e&&"object"==typeof e},t.isContextAvailable=function(e){return void 0!==e&&!e.isDisposed}},306:function(e,t){var n;Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorCode=void 0,function(e){e[e.UNKNOWN=1e3]="UNKNOWN",e[e.API_NOT_AVAILABLE=1001]="API_NOT_AVAILABLE",e[e.SETUP_ERROR=1100]="SETUP_ERROR",e[e.SETUP_NO_HTML_ELEMENT=1101]="SETUP_NO_HTML_ELEMENT",e[e.SETUP_MISSING_CONFIGURATION=1102]="SETUP_MISSING_CONFIGURATION",e[e.SETUP_LICENSE_ERROR=1103]="SETUP_LICENSE_ERROR",e[e.SETUP_MISSING_DOMAIN_LICENSE_WHITELIST=1104]="SETUP_MISSING_DOMAIN_LICENSE_WHITELIST",e[e.SETUP_MISSING_DOMAIN_LICENSE_ALLOWLIST=1104]="SETUP_MISSING_DOMAIN_LICENSE_ALLOWLIST",e[e.SETUP_MISSING_LICENSE_WHITELIST=1105]="SETUP_MISSING_LICENSE_WHITELIST",e[e.SETUP_MISSING_LICENSE_ALLOWLIST=1105]="SETUP_MISSING_LICENSE_ALLOWLIST",e[e.SETUP_INVALID_LICENSE_SERVER=1106]="SETUP_INVALID_LICENSE_SERVER",e[e.SETUP_INVALID_IMPRESSION_SERVER=1107]="SETUP_INVALID_IMPRESSION_SERVER",e[e.SETUP_NO_RENDERING_ENGINE=1108]="SETUP_NO_RENDERING_ENGINE",e[e.SETUP_UNSUPPORTED_PROTOCOL=1113]="SETUP_UNSUPPORTED_PROTOCOL",e[e.SOURCE_ERROR=1200]="SOURCE_ERROR",e[e.SOURCE_INVALID=1201]="SOURCE_INVALID",e[e.SOURCE_MANIFEST_INVALID=1202]="SOURCE_MANIFEST_INVALID",e[e.SOURCE_NO_SUPPORTED_TECHNOLOGY=1203]="SOURCE_NO_SUPPORTED_TECHNOLOGY",e[e.SOURCE_STREAM_TYPE_NOT_SUPPORTED=1204]="SOURCE_STREAM_TYPE_NOT_SUPPORTED",e[e.SOURCE_FORCED_TECHNOLOGY_NOT_SUPPORTED=1205]="SOURCE_FORCED_TECHNOLOGY_NOT_SUPPORTED",e[e.SOURCE_NO_STREAM_FOUND_FOR_SUPPORTED_TECHNOLOGY=1206]="SOURCE_NO_STREAM_FOUND_FOR_SUPPORTED_TECHNOLOGY",e[e.SOURCE_EMPTY_SEGMENT=1207]="SOURCE_EMPTY_SEGMENT",e[e.SOURCE_COULD_NOT_LOAD_MANIFEST=1208]="SOURCE_COULD_NOT_LOAD_MANIFEST",e[e.SOURCE_PROGRESSIVE_STREAM_ERROR=1209]="SOURCE_PROGRESSIVE_STREAM_ERROR",e[e.SOURCE_HLS_STREAM_ERROR=1210]="SOURCE_HLS_STREAM_ERROR",e[e.SOURCE_ENCRYPTION_METHOD_NOT_SUPPORTED=1211]="SOURCE_ENCRYPTION_METHOD_NOT_SUPPORTED",e[e.SOURCE_INVALID_H264_CODEC=7043]="SOURCE_INVALID_H264_CODEC",e[e.PLAYBACK_ERROR=1300]="PLAYBACK_ERROR",e[e.PLAYBACK_VIDEO_DECODING_ERROR=1301]="PLAYBACK_VIDEO_DECODING_ERROR",e[e.PLAYBACK_HLS_COULD_NOT_LOAD_TRANSMUXER=1304]="PLAYBACK_HLS_COULD_NOT_LOAD_TRANSMUXER",e[e.NETWORK_ERROR=1400]="NETWORK_ERROR",e[e.NETWORK_MANIFEST_DOWNLOAD_TIMEOUT=1401]="NETWORK_MANIFEST_DOWNLOAD_TIMEOUT",e[e.NETWORK_SEGMENT_DOWNLOAD_TIMEOUT=1402]="NETWORK_SEGMENT_DOWNLOAD_TIMEOUT",e[e.NETWORK_PROGRESSIVE_STREAM_DOWNLOAD_TIMEOUT=1403]="NETWORK_PROGRESSIVE_STREAM_DOWNLOAD_TIMEOUT",e[e.NETWORK_FAILED_CERTIFICATE_REQUEST=1404]="NETWORK_FAILED_CERTIFICATE_REQUEST",e[e.DRM_ERROR=2e3]="DRM_ERROR",e[e.DRM_MISSING_CONFIGURATION=2001]="DRM_MISSING_CONFIGURATION",e[e.DRM_NO_LICENSE_SERVER_URL_PROVIDED=2002]="DRM_NO_LICENSE_SERVER_URL_PROVIDED",e[e.DRM_FAILED_LICENSE_REQUEST=2003]="DRM_FAILED_LICENSE_REQUEST",e[e.DRM_KEY_SIZE_NOT_SUPPORTED=2005]="DRM_KEY_SIZE_NOT_SUPPORTED",e[e.DRM_NO_KEY_SYSTEM=2006]="DRM_NO_KEY_SYSTEM",e[e.DRM_KEY_SESSION_INITIALIZATION_FAILED=2007]="DRM_KEY_SESSION_INITIALIZATION_FAILED",e[e.DRM_MEDIA_KEY_INITIALIZATION_FAILED=2008]="DRM_MEDIA_KEY_INITIALIZATION_FAILED",e[e.DRM_KEY_ERROR=2009]="DRM_KEY_ERROR",e[e.DRM_KEY_SYSTEM_NOT_SUPPORTED=2010]="DRM_KEY_SYSTEM_NOT_SUPPORTED",e[e.DRM_CERTIFICATE_ERROR=2011]="DRM_CERTIFICATE_ERROR",e[e.DRM_PLAYREADY_INVALID_HEADER_KEY_VALUE_PAIR=2012]="DRM_PLAYREADY_INVALID_HEADER_KEY_VALUE_PAIR",e[e.DRM_RESTRICTED_OUTPUT=2013]="DRM_RESTRICTED_OUTPUT",e[e.DRM_INIT_DATA_MISSING=2015]="DRM_INIT_DATA_MISSING",e[e.VR_ERROR=2100]="VR_ERROR",e[e.VR_INCOMPATIBLE_PLAYER_TECHNOLOGY=2101]="VR_INCOMPATIBLE_PLAYER_TECHNOLOGY",e[e.MODULE_ERROR=3e3]="MODULE_ERROR",e[e.MODULE_INVALID_DEFINITION=3001]="MODULE_INVALID_DEFINITION",e[e.MODULE_INVALID_DEFINITION_DEPENDENCY=3002]="MODULE_INVALID_DEFINITION_DEPENDENCY",e[e.MODULE_MISSING=3003]="MODULE_MISSING",e[e.MODULE_DEPENDENCY_MISSING=3004]="MODULE_DEPENDENCY_MISSING",e[e.MODULE_REMOVED=3005]="MODULE_REMOVED",e[e.MODULE_ADVERTISING_ERROR=3100]="MODULE_ADVERTISING_ERROR",e[e.SEGMENT_PSSH_DATA_MISSING=4e3]="SEGMENT_PSSH_DATA_MISSING"}(n||(t.ErrorCode=n={}))},3336:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.PlayerError=void 0;var i=n(306),r=function(){return function(e,t,n,r){this.code=e,this.name=i.ErrorCode[e],this.sourceIdentifier=r,this.message=null!=n?n:"".concat(this.name),this.data=t,"captureStackTrace"in Error&&"function"==typeof Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error(this.message).stack}}();t.PlayerError=r},813:function(e,t){var n;Object.defineProperty(t,"__esModule",{value:!0}),t.ServiceName=void 0,function(e){e.AdaptationService="AdaptationService",e.DrmDetectorService="DrmDetectorService",e.DrmService="DrmService",e.HeartbeatService="HeartbeatService",e.LiveLatencyService="LiveLatencyService",e.ManifestCachingService="ManifestCachingService",e.ManifestLoadingService="ManifestLoadingService",e.ManifestService="ManifestService",e.ManifestUpdateSchedulingService="ManifestUpdateSchedulingService",e.MetadataParsedService="MetadataParsedService",e.PlayerStateService="PlayerStateService",e.RecoveryService="RecoveryService",e.SegmentService="SegmentService",e.SourceStoreService="SourceStoreService",e.StallTimeTrackerService="StallTimeTrackerService",e.StartOffsetService="StartOffsetService",e.StreamTimeService="StreamTimeService",e.SubtitleService="SubtitleService",e.SynchronizedTimeService="SynchronizedTimeService",e.ThumbnailService="Thumbn
1ailService",e.TimedMetadataService="TimedMetadataService",e.SgaiService="SgaiService"}(n||(t.ServiceName=n={}))},5625:function(e,t){var n;Object.defineProperty(t,"__esModule",{value:!0}),t.ManifestMimeType=void 0,function(e){e.Dash="application/dash+xml",e.Hls="application/x-mpegurl",e.Smooth="application/vnd.ms-sstr+xml"}(n||(t.ManifestMimeType=n={}))},5267:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.createAction=function(e,t){return{type:e,meta:{},payload:t}}},8774:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.devToolsExtension=void 0;var i=n(4081);t.devToolsExtension=i.default.__REDUX_DEVTOOLS_EXTENSION__},9541:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.ReducerTree=void 0,t.isReducer=o,t.isReducerTree=function(e){return Boolean(e)&&e instanceof r};var i=n(1829),r=function(){function e(){this.ub={}}return e.prototype.has=function(e){return Boolean(this.ub[e])},e.prototype.set=function(e,t){return this.ub[e]=t,this},e.prototype.get=function(e){return this.ub[e]},e.prototype.delete=function(e){delete this.ub[e]},e.prototype.keys=function(){return Object.keys(this.ub)},e.prototype.vb=function(e){var t=this,n={};return this.keys().forEach((function(i){var r=t.get(i),a=e.concat(String(i));n[i]=o(r)?r:r.vb(a)})),0===Object.keys(n).length?function(e){return{}}:(0,i.combineReducers)(n)},e.prototype.buildReducer=function(){return this.vb([])},e}();function o(e){return Boolean(e)&&"function"==typeof e}t.ReducerTree=r},1674: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},n.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.addStoreServiceDecoration=void 0,t.addStoreServiceDecoration=function(e){return function(t){return function(){var i=function(){return e.buildReducer()},r=t(i()),o=function(){return r.replaceReducer(i())};return o(),n(n({},r),{addReducer:function(t,n){e.set(t,n),o()},getReducer:function(t){return e.get(t)},removeReducer:function(t){e.delete(t),o()},hasReducer:function(t){return e.has(t)}})}}}},1513:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=d,t.getCapabilities=function(){return function(e){return e.capabilities}(d().getState())},t.getReachableDomains=function(){return function(e){return e.reachableDomains}(d().getState())};var i,r=n(1829),o=n(4638),a=(n(8774),n(1683),n(430)),s=n(9541),u=n(1674),l=new s.ReducerTree;l.set("capabilities",o.CapabilityReducer).set("reachableDomains",a.ReachableDomainsReducer);var c=function(){var e=[(0,u.addStoreServiceDecoration)(l)];return(0,r.createStore)((function(){return{}}),r.compose.apply(void 0,e))};function d(){return i||(i=c()),i}},4638: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},r.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.CapabilityReducer=void 0;var o=n(3793),a=n(7387);t.CapabilityReducer=(0,o.default)({},((i={})[a.CapabilityActionType.InitCapabilities]=function(e,t){return function(e){return e}(t.payload)},i[a.CapabilityActionType.SetCapability]=function(e,t){return function(e,t){var n,i=t.key,o=t.value;return r(r({},e),((n={})[i]=o,n))}(e,t.payload)},i))},7387:function(e,t){var n,i;Object.defineProperty(t,"__esModule",{value:!0}),t.CapabilityKey=t.CapabilityActionType=void 0,function(e){e.InitCapabilities="initcapabilities",e.SetCapability="setcapability"}(n||(t.CapabilityActionType=n={})),function(e){e.isPlayStation5="isPlayStation5",e.isPlayStation4="isPlayStation4",e.isMobile="isMobile",e.isTizen="isTizen",e.isSafari="isSafari",e.isChrome="isChrome",e.isChromium="isChromium",e.isFirefox="isFirefox",e.isFirefoxIOS="isFirefoxIOS",e.isWebOS="isWebOS",e.isVidaa="isVidaa",e.isVizio="isVizio",e.isIOS="isIOS",e.isSafariIOS="isSafariIOS",e.isEdge="isEdge",e.isLegacyEdge="isLegacyEdge",e.isEdgeChromium="isEdgeChromium",e.isReactNative="isReactNative",e.isWpeWebKit="isWpeWebKit",e.MSESafari="MSESafari",e.isLocalStorageAvailable="isLocalStorageAvailable",e.isInlinePlaybackRestricted="isInlinePlaybackRestricted",e.IOSVersion="IOSVersion",e.edgeVersion="edgeVersion",e.safariVersion="safariVersion",e.webOSChromiumVersion="webOSChromiumVersion",e.techSupportedByModules="techSupportedByModules",e.techSupportedByPlatform="techSupportedByPlatform",e.techSupportedByModulesOnPlatform="techSupportedByModulesOnPlatform"}(i||(t.CapabilityKey=i={}))},3793:function(e,t){var n;
vendor: 5,692 bytes, line 1
1Object.defineProperty(t,"__esModule",{value:!0}),t.StaticActionTypes=void 0,function(e){e.Default="default"}(n||(t.StaticActionTypes=n={})),t.default=function(e,t){return function(i,r){return void 0===i&&(i=e),t[r.type]?t[r.type](i,r):t[n.Default]?t[n.Default](i,r):i}}},5971:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.getSourceStore=o,t.getSourceState=function(e){var t=o(e);return null==t?void 0:t.getState()};var i=n(813),r=n(4685);function o(e){var t,n;return(0,r.isContextAvailable)(e)?null===(t=e.serviceManager)||void 0===t?void 0:t.get(i.ServiceName.SourceStoreService,null===(n=e.sourceContext)||void 0===n?void 0:n.sourceIdentifier):void 0}},12:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.initialStartOptions=void 0,t.initializeStartTimeOffset=function(){return o(t.initialStartOptions.startTimeOffset)},t.setStartTimeOffset=o;var i=n(5267),r=n(5934);function o(e){return(0,i.createAction)(r.StartOptionsActionKey.SetStartTimeOffset,{startTimeOffset:e})}t.initialStartOptions={startTimeOffset:0}},7179: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},r.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.StartOptionsReducer=void 0,t.getStartTimeOffset=function(e){return e.startOptions.startTimeOffset};var o=n(3793),a=n(12),s=n(5934),u=a.initialStartOptions,l=function(e,t){var n=t.payload;return r(r({},e),n)};t.StartOptionsReducer=(0,o.default)(u,((i={})[s.StartOptionsActionKey.InitStartTimeOffset]=l,i[s.StartOptionsActionKey.SetStartTimeOffset]=l,i))},5934:function(e,t){var n;Object.defineProperty(t,"__esModule",{value:!0}),t.StartOptionsActionKey=void 0,function(e){e.InitStartTimeOffset="@instance/sources/@source/startOptions/initStartTimeOffset",e.SetStartTimeOffset="@instance/sources/@source/startOptions/setStartTimeOffset"}(n||(t.StartOptionsActionKey=n={}))},1683:function(e,t){function n(e){Object.freeze(e);var t="function"==typeof e,i=Object.prototype.hasOwnProperty;return Object.getOwnPropertyNames(e).forEach((function(r){!i.call(e,r)||t&&("caller"===r||"callee"===r||"arguments"===r)||null===e[r]||"object"!=typeof e[r]&&"function"!=typeof e[r]||Object.isFrozen(e[r])||n(e[r])})),e}Object.defineProperty(t,"__esModule",{value:!0}),t.freeze=void 0,t.deepFreeze=n;var i=function(e){var t=e.getState();(function(e){return null!==e&&"object"==typeof e})(t)&&n(t)};t.freeze=function(e){return i(e),function(t){return function(n){i(e);try{return t(n)}finally{i(e)}}}}},430: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},r.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.ReachableDomainsReducer=void 0;var a=n(3793),s=n(2027);t.ReachableDomainsReducer=(0,a.default)({domains:[]},((i={})[s.ReachableDomainsActionType.AddDomain]=function(e,t){return function(e,t){return r(r({},e),{domains:e.domains.includes(t)?e.domains:o(o([],e.domains,!0),[t],!1)})}(e,t.payload)},i))},2027:function(e,t){var n;Object.defineProperty(t,"__esModule",{value:!0}),t.ReachableDomainsActionType=void 0,function(e){e.AddDomain="adddomain"}(n||(t.ReachableDomainsActionType=n={}))},4853: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.ArrayHelper=void 0,t.invert=function(e){return function(t,n,i){return!e(t,n,i)}},t.findIndexFromEnd=a,t.findIndexWithin=function(e,t,n,i){for(var r=t;r<n;r++)if(i(e[r]))return r;return-1},t.findFromEnd=function(e,t){return e[a(e,t)]},t.forEachFromIndex=function(e,t,n){for(;t<e.length;t++)n(e[t-1],e[t])},t.forceArray=function(e){return Array.isArray(e)?e:[e]},t.contains=function(e,t,n){return void 0===n&&(n=s),null!=e.find((function(e){return n(t,e)}))},t.shallowObjectMatcher=s,t.clearArray=function(e){e.splice(0,e.length)},t.removeEntriesFromStart=function(e,t){return t<1?[]:e.splice(0,t)};var r=n(233),o=function(){function e(){}return e.comparePrimitiveArrays=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},e.stringToArrayWithoutEncoding=function(e){for(var t=new Uint8Array(e.length),n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return t},e.convertBufferSourceToUTF8=function(t,n){return void 0===n&&(n="utf-8"),t instanceof ArrayBuffer?t=new Uint8Array(t):t instanceof DataView&&(t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength)),e.convertUint8ArrayToUtf8(t,n)},e.convertUint8ArrayToUtf8=function(e,t){if("undefined"!=typeof TextDecoder)return new TextDecoder(t).decode(e);for(var n=0,i="";n<e.length;){var r=e[n++];if(r>127)if(r>191&&r<224){if(n>=e.length||64&e[n]){i+="�";continue}r=(31&r)<<6|63&e[n++]}else if(r>223&&r<240){if(n+1>=e.length||64&e[n]||64&e[n+1]){i+="�";continue}r=(15&r)<<12|(63&e[n++])<<6|63&e[n++]}else{if(!(r>239&&r<248)){i+="�";continue}if(n+2>=e.length||64&e[n]||64&e[n+1]||64&e[n+2]){i+="�";continue}r=(7&r)<<18|(63&e[n++])<<12|(63&e[n++])<<6|63&e[n++]}r<=65535?i+=String.fromCharCode(r):r<=1114111?(r-=65536,i+=String.fromCharCode(r>>
110|55296),i+=String.fromCharCode(1023&r|56320)):i+="�"}return i},e.sort=function(e,t,n){if("string"==typeof t&&"[object Array]"===Object.prototype.toString.call(e)){var i;if(n||(n="asc"),"asc"===n)i=-1;else{if("desc"!==n)return;i=1}return e.length<2?e:e.sort((function(e,n){return e[t]<n[t]?i:e[t]>n[t]?-1*i:0}))}},e.append=function(t,n){var i=e.getTypedArrayType(t),r=e.getTypedArrayType(n);if(!i&&!r||i!==r)return null;var o=new i((t.byteLength+n.byteLength)/i.BYTES_PER_ELEMENT);return o.set(new i(t),0),o.set(new i(n),t.byteLength/i.BYTES_PER_ELEMENT),o},e.concatBuffers=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(!(e=e.filter((function(e){return e}))).length)return null;var n=e.reduce((function(e,t){return e+t.byteLength}),0),i=new Uint8Array(n);return e.reduce((function(e,t){return i.set(new Uint8Array(t),e),e+t.byteLength}),0),i.buffer},e.getTypedArrayType=function(e){return e instanceof Uint8Array?Uint8Array:e instanceof Uint16Array?Uint16Array:e instanceof Uint32Array?Uint32Array:null},e.getArray=function(t){return e.getTypedArrayType(t)?[].slice.call(t):Array.isArray(t)?t:null},e.union=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=[];return e.filter((function(e){return Boolean(e)})).forEach((function(e){return e.forEach((function(e){n.includes(e)||n.push(e)}))})),n},e.isArrayBuffer=function(e){return Boolean(e)&&e instanceof ArrayBuffer&&void 0!==e.byteLength},e.arrayBufferToAsciiString=function(t,n){return void 0===n&&(n=!0),e.sparseArrayBufferToAsciiString(t,1,0,n)},e.arrayBufferToBase64=function(e){for(var t="",n=new Uint8Array(e),i=0;i<n.length;i++)t+=String.fromCharCode(n[i]);return window.btoa(t)},e.sparseArrayBufferToAsciiString=function(e,t,n,i){void 0===t&&(t=2),void 0===n&&(n=0),void 0===i&&(i=!0);for(var r="",o=i?new Uint8Array(e):new Uint16Array(e),a=n;a<o.length;a+=t)r+=String.fromCharCode(o[a]);return r},e.intersect=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var i=[],r=t.filter((function(e){return Boolean(e)}));return e.union.apply(e,t).forEach((function(e){r.every((function(t){return t.includes(e)}))&&i.push(e)})),i},e.addAndMergeIntersects=function(t,n){var r=t.filter((function(t){return e.intersect(t,n).length>0})),o=t.filter((function(e){return!r.includes(e)}));return 0===r.length?i(i([],t,!0),[n],!1):i([e.union.apply(e,i(i([],r,!1),[n],!1))],o,!0)},e.extractAsciiString=function(e,t,n){for(var i=t+n,r="";t<i;t++)r+=String.fromCharCode(e.getUint8(t));return r},e.extractHexString=function(e,t,n){for(var i=t+n,o="";t<i;t++)o+=r.FormatHelper.intToHex(e.getUint8(t));return o},e.insertInSortedArray=function(e,t,n){var i=e.findIndex(n);return i<0?e.push(t):e.splice(i,0,t),e},e.removeUntilInSortedArray=function(e,t){var n=e.findIndex(t),i=-1===n?e.length:n;return 0===i?[]:e.splice(0,i)},e.toArray=function(e){try{if(!e||!e.length)return[];for(var t=new Array(e.length),n=0;n<e.length;n++)t[n]=e[n];return t}catch(e){return[]}},e}();function a(e,t){var n;for(n=e.length-1;n>=0&&!t(e[n]);n--);return n}function s(e,t){return Object.keys(e).length===Object.keys(t).length&&Object.keys(e).every((function(n){return e[n]===t[n]}))}t.ArrayHelper=o},7993: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.MSESafari=t.getBestTech=t.getTechSupportedByModules=t.getTechSupportedByPlatform=t.getTechSupportedByModulesOnPlatform=t.isLocalStorageAvailable=t.isInlinePlaybackRestricted=t.isFairPlayDrmSupported=t.supports=t.checkPlatformSupports=t.hasMediaSourceSupport=t.FairplayKeySystems=void 0,t.isUsingFileProtocol=function(){return"file:"===l.default.location.protocol},t.isFetchSupported=function(){return"function"==typeof l.default.fetch&&"function"==typeof l.default.AbortController};var r,o=n(8052),a=n(2756),s=n(4468),u=n(1513),l=n(4081),c=n(5434),d=n(5487);!function(e){e.FPS_1="com.apple.fps.1_0",e.FPS_2="com.apple.fps.2_0"}(r||(t.FairplayKeySystems=r={}));var f=[{player:s.PlayerType.Html5,streaming:s.StreamType.Dash},{player:s.PlayerType.Html5,streaming:s.StreamType.Hls},{player:s.PlayerType.Html5,streaming:s.StreamType.Smooth},{player:s.PlayerType.WebRtc,streaming:s.StreamType.Whep}
vendor: 8,178 bytes, line 1
1,{player:s.PlayerType.Native,streaming:s.StreamType.Hls},{player:s.PlayerType.Native,streaming:s.StreamType.Progressive}],p=Boolean(l.default.ArrayBuffer&&l.default.Uint8Array&&l.default.Uint16Array);t.hasMediaSourceSupport=function(){var e,t,n,i="MediaSource"in l.default&&"function"==typeof(null===(e=l.default.MediaSource)||void 0===e?void 0:e.isTypeSupported),r="WebKitMediaSource"in l.default&&"function"==typeof(null===(t=l.default.WebKitMediaSource)||void 0===t?void 0:t.isTypeSupported),o="ManagedMediaSource"in l.default&&"function"==typeof(null===(n=l.default.ManagedMediaSource)||void 0===n?void 0:n.isTypeSupported);return i||r||o};t.checkPlatformSupports=function(){var e=[];if(p?e=f.filter((function(e){return(0,t.supports)(e.player,e.streaming)})):e.push({player:s.PlayerType.Native,streaming:s.StreamType.Progressive}),(0,d.isSafari)())for(var n=1;n<e.length;n++)if(e[n].player===s.PlayerType.Native&&e[n].streaming===s.StreamType.Hls){e=e.splice(n,1).concat(e);break}return e},t.supports=function(e,n){var i=(0,t.hasMediaSourceSupport)()?[s.StreamType.Dash,s.StreamType.Hls,s.StreamType.Smooth]:[],r=function(){var e=l.default.RTCPeerConnection,t=Boolean(e)&&"function"==typeof e.prototype.addTransceiver;return function(){var e,t,n,i,r;return Boolean(null!==(r=null!==(i=null!==(n=null!==(t=null===(e=navigator.mediaDevices)||void 0===e?void 0:e.getUserMedia)&&void 0!==t?t:navigator.getUserMedia)&&void 0!==n?n:navigator.webkitGetUserMedia)&&void 0!==i?i:navigator.mozGetUserMedia)&&void 0!==r?r:navigator.msGetUserMedia)}()&&t}()?[s.StreamType.Whep]:[],o=function(e){return e.some((function(e){return e===n}))};switch(e){case s.PlayerType.Html5:return o(i);case s.PlayerType.WebRtc:return o(r);case s.PlayerType.Native:return o(function(){var e=[];return function(){var e=document.createElement("video");return e&&"function"==typeof e.canPlayType&&("maybe"===e.canPlayType("application/vnd.apple.mpegURL")||"maybe"===e.canPlayType("application/x-mpegURL")||"maybe"===e.canPlayType("audio/mpegurl")||"maybe"===e.canPlayType("audio/x-mpegurl"))}()&&!(0,d.isEdge)()&&e.push(s.StreamType.Hls),function(){return"function"==typeof document.createElement("video").canPlayType}()&&e.push(s.StreamType.Progressive),e}());default:return!1}},t.isFairPlayDrmSupported=function(){return Object.values(r).some((function(e){var t;return null===(t=l.default.WebKitMediaKeys)||void 0===t?void 0:t.isTypeSupported(e,c.MimeType.VideoMp4)}))},t.isInlinePlaybackRestricted=function(){var e=(0,d.getIOSVersion)(),t=e<d.IOS_9&&/iPad/i.test(navigator.userAgent),n=e<d.IOS_10&&/iP(hone|od)/i.test(navigator.userAgent);return d.isSafariIOS&&(t||n)},t.isLocalStorageAvailable=function(){try{return l.default.localStorage&&"function"==typeof localStorage.getItem&&"function"==typeof localStorage.setItem}catch(e){return!1}},t.getTechSupportedByModulesOnPlatform=function(){var e=(0,t.getTechSupportedByModules)();return(0,t.getTechSupportedByPlatform)().filter((function(t){return e.filter((function(e){return function(e,t){return e.player===t.player&&e.streaming===t.streaming}(e,t)})).length>0}))},t.getTechSupportedByPlatform=function(){return(0,t.checkPlatformSupports)()},t.getTechSupportedByModules=function(){var e=o.ModuleManager.has(a.ModuleName.EngineBitmovin)?o.ModuleManager.get(a.ModuleName.EngineBitmovin).technologyChecker.getSupportedTechnologies():[],t=o.ModuleManager.has(a.ModuleName.EngineNative)?o.ModuleManager.get(a.ModuleName.EngineNative).technologyChecker.getSupportedTechnologies():[],n=o.ModuleManager.has(a.ModuleName.EngineWebRtc)?o.ModuleManager.get(a.ModuleName.EngineWebRtc).technologyChecker.getSupportedTechnologies():[];return i(i(i([],e,!0),t,!0),n,!0)},t.getBestTech=function(e,t,n){void 0===e&&(e=[]),void 0===t&&(t={});var r=(0,u.getCapabilities)(),o=function(e){var t=(0,u.getCapabilities)(),n=i([],t.techSupportedByPlatform,!0);if(!e||0===e.length)return n;var r=e.filter((function(e){return n.some((function(t,i){var r,o=e.player===t.player&&e.streaming===t.streaming,a=null!==(r=e.exclude)&&void 0!==r&&r;return o&&n.splice(i,1),o&&!a}))})).map((function(e){return{player:e.player,streaming:e.streaming}}));return i(i([],r,!0),n,!0)}(e),a=r.techSupportedByPlatform;return n&&(o=a.filter((function(e){return e.player===n.player&&e.streaming===n.streaming}))),(t.vr&&((0,d.isSafariIOS)()||(0,d.isSafari)())?o.filter((function(e){var t=e.streaming===s.StreamType.Progressive&&e.player===s.PlayerType.Native,n=e.streaming===s.StreamType.Hls&&e.player===s.PlayerType.Native;return t||n&&(!(0,d.isSafariIOS)()||(0,d.getIOSVersion)()>d.IOS_9)})):o).find((function(e){return Boolean(t[e.streaming])}))},t.MSESafari=function(){return(0,d.isSafari)()&&(0,t.hasMediaSourceSupport)()}},2424:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.DurationConverter=void 0;var n=function(){function e(){}return e.getDurationInSec=function(e){if("string"!=typeof e)return NaN;var t=/^([-])?P(([\\d.]*)Y)?(([\\d.]*)M)?(([\\d.]*)D)?(T)?(([\\d.]*)H)?(([\\d.]*)M)?(([\\d.]*|Infinity)S)?/.exec(e);if(t){var n=Boolean(t[1]),i=12*parseFloat(t[2]||"0")*30*24*60*60,r=30*parseFloat(t[4]||"0")*24*60*60,o=24*parseFloat(t[6]||"0")*60*60,a=60*parseFloat(t[9]||"0")*60,s=60*parseFloat(t[11]||"0"),u=parseFloat(t[13]||"0");if("T"===t[8]&&void 0===(t[9]||t[11]||t[13]))return NaN;var l=i+r+o+a+s+u;return n&&(l=-l),l}return NaN},e}();t.DurationConverter=n},233:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.FormatHelper=void 0;var n=function(){function e(){}return e.hexToBytes=function(e){var t=e.length;1&t&&(e="0"+e,t++);for(var n=new Uint8Array(t>>1),i=0;i<t;i+=2)n[i>>1]=parseInt(e.substring(i,i+2),16);return n},e.bytesToHex=function(e){e instanceof ArrayBuffer&&(e=new Uint8Array(e));for(var t="",n=0;n<e.byteLength;n++){var i=(255&e[n]).toString(16);i.length<2&&(t+="0"),t+=i}return t},e.bytesToUUID=function(e){return this.beautifyUUID(this.bytesToHex(e))},e.beautifyUUID=function(e){return e.slice(0,8)+"-"+e.slice(8,12)+"-"+e.slice(12,16)+"-"+e.slice(16,20)+"-"+e.slice(20)},e.intToHex=function(e){return("00"+e.toString(16)).slice(-2)},e.base64UrlEncode=function(e){return window.btoa(e).replace(/\\+/g,"-").replace(/\\//g,"_").replace(/=/g,"")},e.base64UrlDecode=function(e){return window.atob((e+"===".slice((e.length+3)%4)).replace(/-/g,"+").replace(/_/g,"/"))},e}();t.FormatHelper=n},6599:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.MessageHandler=void 0;var n=function(){return function(e,t){this.runsInWebWorker=e,this.postMessageFunction=t}}();t.MessageHandler=n},5434:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.MimeTypeHelper=t.MimeType=void 0,t.isMediaTypeContained=function(e,t){return Object.keys(e).map((function(e){return a.getMediaType(e)})).includes(a.getMediaType(t))};var i,r=n(5625),o=n(4468);!function(e){e.VideoMp4="video/mp4",e.VideoTs="video/mp2t",e.AudioMp4="audio/mp4",e.AudioTs="audio/mp2t"}(i||(t.MimeType=i={}));var a=function(){function e(){}return e.isSubtitle=function(e){return this.isApplication(e)||this.isText(e)},e.isText=function(e){return e.toLowerCase().includes("text")},e.isTtmlXml=function(e){return e.toLowerCase().includes("ttml+xml")},e.isApplication=function(e){return e.toLowerCase().includes("application")},e.isAV=function(e){return this.isVideo(e)||this.isAudio(e)},e.isVideo=function(e){return e.toLowerCase().includes("video")},e.isUnknown=function(e){return e.toLowerCase().includes("unknown")},e.isAudio=function(e){return e.toLowerCase().includes("audio")},e.isImage=function(e){return e.toLowerCase().includes("image")},e.isDash=function(e){return e.toLowerCase().includes(r.ManifestMimeType.Dash)},e.isHls=function(e){var t=e.toLowerCase();return t.includes(r.ManifestMimeType.Hls)||t.includes("vnd.apple.mpegurl")},e.isMP4=function(e){return e.toLowerCase().includes("mp4")},e.getMediaType=function(e){return this.isVideo(e)?o.MediaType.Video:this.isAudio(e)?o.MediaType.Audio:this.isSubtitle(e)?o.MediaType.Subtitles:this.isImage(e)?o.MediaType.Thumbnails:void 0},e.extractContentType=function(e){return e.split("/")[0]},e.extractContainerType=function(e){var t=e.split("/");return t.length>1?t[1]:null},e}();t.MimeTypeHelper=a}
1,5487:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.getVidaaVersion=t.isVidaa=t.getTizenVersion=t.isTizen2024=t.isTizen2023=t.isTizen2022=t.isTizen2020=t.isTizen2016=t.isTizen2017=t.isTizen2018=t.isTizen2019=t.isTizen=t.getEdgeVersion=t.isEdge=t.getSafariVersion=t.isSafari=t.isFirefoxIOS=t.isFirefox=t.isChromium=t.isChrome=t.WEBOS_2022_CHROMIUM_VERSION=t.WEBOS_2021_CHROMIUM_VERSION=t.WEBOS_2020_CHROMIUM_VERSION=t.WEBOS_2018_2019_CHROMIUM_VERSION=t.WEBOS_2016_2017_CHROMIUM_VERSION=t.TIZEN_2024_MINOR_VERSION=t.TIZEN_2024_MAJOR_VERSION=t.TIZEN_2023_MINOR_VERSION=t.TIZEN_2023_MAJOR_VERSION=t.TIZEN_2022_MINOR_VERSION=t.TIZEN_2022_MAJOR_VERSION=t.TIZEN_2020_MINOR_VERSION=t.TIZEN_2020_MAJOR_VERSION=t.TIZEN_2019_MINOR_VERSION=t.TIZEN_2019_MAJOR_VERSION=t.TIZEN_2018_MINOR_VERSION=t.TIZEN_2018_MAJOR_VERSION=t.TIZEN_2017_MINOR_VERSION=t.TIZEN_2017_MAJOR_VERSION=t.TIZEN_2016_MINOR_VERSION=t.TIZEN_2016_MAJOR_VERSION=t.SAFARI_18_MAJOR_VERSION=t.SAFARI_17_MAJOR_VERSION=t.SAFARI_15_MAJOR_VERSION=t.IOS_18=t.IOS_17=t.IOS_15=t.IOS_10=t.IOS_9=t.EDGE_CHROMIUM_FIRST_MAJOR_VERSION=void 0,t.resetPlatformDetectorCache=t.isSafariPlatform18orNewer=t.isSafari17orIOS17=t.isSafari15orIOS15=t.getIOSVersion=t.isSafariIOS=t.isIOS=t.isMobile=t.isEdgeAndroid=t.isAndroid=t.isWebOs2022OrNewer=t.isWebOs2020=t.isWebOs2017=t.isWebOs2016=t.isWebOs2019OrOlder=t.getWebOsChromiumVersion=t.isWebOS=t.isWpeWebKit=t.isVizio=void 0,t.isLegacyEdge=r,t.isEdgeChromium=function(){return(0,t.isEdge)()&&(0,t.getEdgeVersion)().major>=t.EDGE_CHROMIUM_FIRST_MAJOR_VERSION},t.isPlayStation5=o,t.isPlayStation4=a,t.isReactNative=function(){return"ReactNative"===window.navigator.product};var i=n(7993);function r(){return(0,t.isEdge)()&&(0,t.getEdgeVersion)().major<t.EDGE_CHROMIUM_FIRST_MAJOR_VERSION}function o(){return/PlayStation 5/i.test(navigator.userAgent)}function a(){return/PlayStation 4/i.test(navigator.userAgent)}t.EDGE_CHROMIUM_FIRST_MAJOR_VERSION=79,t.IOS_9=9,t.IOS_10=10,t.IOS_15=15,t.IOS_17=17,t.IOS_18=18,t.SAFARI_15_MAJOR_VERSION=15,t.SAFARI_17_MAJOR_VERSION=17,t.SAFARI_18_MAJOR_VERSION=18,t.TIZEN_2016_MAJOR_VERSION=2,t.TIZEN_2016_MINOR_VERSION=4,t.TIZEN_2017_MAJOR_VERSION=3,t.TIZEN_2017_MINOR_VERSION=0,t.TIZEN_2018_MAJOR_VERSION=4,t.TIZEN_2018_MINOR_VERSION=0,t.TIZEN_2019_MAJOR_VERSION=5,t.TIZEN_2019_MINOR_VERSION=0,t.TIZEN_2020_MAJOR_VERSION=5,t.TIZEN_2020_MINOR_VERSION=5,t.TIZEN_2022_MAJOR_VERSION=6,t.TIZEN_2022_MINOR_VERSION=5,t.TIZEN_2023_MAJOR_VERSION=7,t.TIZEN_2023_MINOR_VERSION=0,t.TIZEN_2024_MAJOR_VERSION=8,t.TIZEN_2024_MINOR_VERSION=0,t.WEBOS_2016_2017_CHROMIUM_VERSION=38,t.WEBOS_2018_2019_CHROMIUM_VERSION=53,t.WEBOS_2020_CHROMIUM_VERSION=68,t.WEBOS_2021_CHROMIUM_VERSION=79,t.WEBOS_2022_CHROMIUM_VERSION=87,t.isChrome=function(){return navigator.userAgent.includes("Chrome")&&!(0,t.isEdge)()},t.isChromium=function(){return(0,t.isChrome)()||(0,t.isEdge)()&&!r()},t.isFirefox=function(){return navigator.userAgent.includes("Firefox")},t.isFirefoxIOS=function(){return navigator.userAgent.includes("FxiOS")&&(0,t.isIOS)()},t.isSafari=function(){return navigator.userAgent.includes("Safari")&&!navigator.userAgent.includes("Chrome")&&!navigator.userAgent.includes("IEMobile")&&!navigator.userAgent.includes("Edge")&&!(0,t.isTizen)()&&!o()&&!a()&&!(0,t.isWpeWebKit)()||(0,i.isFairPlayDrmSupported)()},t.getSafariVersion=function(){var e=/Version\\/(\\d+)\\.?(\\d+)?\\.?(\\d+)?/.exec(navigator.userAgent)||null;if(!e)return{};var t=e[1],n=e[2],i=e[3],r=function(e){return parseInt(e)};return{major:r(t),minor:r(n),patch:r(i)}},t.isEdge=function(){return/Edge\\/\\d+/i.test(navigator.userAgent)||/Edg\\/\\d+/i.test(navigator.userAgent)||/EdgA\\/\\d+/i.test(navigator.userAgent)||/EdgiOS\\/\\d+/i.test(navigator.userAgent)},t.getEdgeVersion=function(){var e=/Edge\\/(\\d+)\\.?(\\d+)/.exec(navigator.userAgent)||/Edg\\/(\\d+)\\.?(\\d+)/.exec(navigator.userAgent)||/EdgA\\/(\\d+)\\.?(\\d+)/.exec(navigator.userAgent)||/EdgiOS\\/(\\d+)\\.?(\\d+)/.exec(navigator.userAgent);if(!e||0===e.length)return{major:0,minor:0};var t={};return e[1]&&(t.major=parseInt(e[1])),e[1]&&(t.minor=parseInt(e[2])),t};var s,u,l,c,d=function(e,n){var i=(0,t.getTizenVersion)();return i.major===e&&i.minor===n};t.isTizen=function(){return null!=s||(s=navigator.userAgent.includes("Tizen")),s},t.isTizen2019=function(){return d(t.TIZEN_2019_MAJOR_VERSION,t.TIZEN_2019_MINOR_VERSION)},t.isTizen2018=function(){return d(t.TIZEN_2018_MAJOR_VERSION,t.TIZEN_2018_MINOR_VERSION)},t.isTizen2017=function(){return d(t.TIZEN_2017_MAJOR_VERSION,t.TIZEN_2017_MINOR_VERSION)},t.isTizen2016=function(){return d(t.TIZEN_2016_MAJOR_VERSION,t.TIZEN_2016_MINOR_VERSION)},t.isTizen2020=function(){return d(t.TIZEN_2020_MAJOR_VERSION,t.TIZEN_2020_MINOR_VERSION)},t.isTizen2022=function(){return d(t.TIZEN_2022_MAJOR_VERSION,t.TIZEN_2022_MINOR_VERSION)},t.isTizen2023=function(){return d(t.TIZEN_2023_MAJOR_VERSION,t.TIZEN_2023_MINOR_VERSION)},t.isTizen2024=function(){return d(t.TIZEN_2024_MAJOR_VERSION,t.TIZEN_2024_MINOR_VERSION)},t.getTizenVersion=function(){if(void 0===u){var e=/Tizen (\\d).(\\d)/.exec(navigator.userAgent);u=(null==e?void 0:e[1])?{major:Number(e[1]),minor:Number(e[2]||0)}:{}}return u},t.isVidaa=function(){return navigator.userAgent.includes("VIDAA")},t.getVidaaVersion=function(){var e=new RegExp(/VIDAA\\/(\\d+)\\.?(\\d+)/).exec(navigator.userAgent);return(null==e?void 0:e[1])?{major:Number(e[1]),minor:Number(e[2])}:{}}
1,t.isVizio=function(){return navigator.userAgent.includes("VIZIO")},t.isWpeWebKit=function(){return navigator.userAgent.includes("WPE")||navigator.userAgent.includes("Astro")},t.isWebOS=function(){return null!=l||(l=navigator.userAgent.includes("Web0S")||navigator.userAgent.includes("NetCast")),l},t.getWebOsChromiumVersion=function(){var e;if(void 0===c){var t=new RegExp(/Chrome\\/(\\d+)\\.?(\\d+)/).exec(navigator.userAgent);if(!(null==t?void 0:t[1]))return{};c={major:Number(t[1]),minor:Number(null!==(e=t[2])&&void 0!==e?e:0)}}return c},t.isWebOs2019OrOlder=function(){var e=(0,t.getWebOsChromiumVersion)();return(0,t.isWebOS)()&&void 0!==(null==e?void 0:e.major)&&e.major<=t.WEBOS_2018_2019_CHROMIUM_VERSION},t.isWebOs2016=function(){return(0,t.getWebOsChromiumVersion)().major===t.WEBOS_2016_2017_CHROMIUM_VERSION&&!("requestMediaKeySystemAccess"in navigator)},t.isWebOs2017=function(){return(0,t.getWebOsChromiumVersion)().major===t.WEBOS_2016_2017_CHROMIUM_VERSION&&"requestMediaKeySystemAccess"in navigator},t.isWebOs2020=function(){return(0,t.isWebOS)()&&(0,t.getWebOsChromiumVersion)().major===t.WEBOS_2020_CHROMIUM_VERSION},t.isWebOs2022OrNewer=function(){var e=(0,t.getWebOsChromiumVersion)();return(0,t.isWebOS)()&&void 0!==(null==e?void 0:e.major)&&e.major>=t.WEBOS_2022_CHROMIUM_VERSION},t.isAndroid=function(){return/Android/i.test(navigator.userAgent)},t.isEdgeAndroid=function(){return(0,t.isEdge)()&&(0,t.isAndroid)()},t.isMobile=function(){return/Android/i.test(navigator.userAgent)||/IEMobile/i.test(navigator.userAgent)||/Windows Phone 10.0/i.test(navigator.userAgent)||/Safari/i.test(navigator.userAgent)&&/Mobile/i.test(navigator.userAgent)},t.isIOS=function(){return/Safari/i.test(navigator.userAgent)&&/Mobile/i.test(navigator.userAgent)&&!/Android/i.test(navigator.userAgent)&&!/Windows Phone 10.0/i.test(navigator.userAgent)},t.isSafariIOS=function(){return/Safari/i.test(navigator.userAgent)&&/iP(hone|od|ad)/i.test(navigator.userAgent)},t.getIOSVersion=function(){var e=/OS (\\d+)(_\\d+)*/.exec(navigator.userAgent);return e&&e.length>0&&parseInt(e[1],10)||0},t.isSafari15orIOS15=function(){return function(){return(0,t.isSafari)()&&(0,t.getSafariVersion)().major===t.SAFARI_15_MAJOR_VERSION}()||function(){return(0,t.isIOS)()&&(0,t.getIOSVersion)()===t.IOS_15}()},t.isSafari17orIOS17=function(){return function(){return(0,t.isSafari)()&&(0,t.getSafariVersion)().major===t.SAFARI_17_MAJOR_VERSION}()||function(){return(0,t.isIOS)()&&(0,t.getIOSVersion)()===t.IOS_17}()},t.isSafariPlatform18orNewer=function(){var e;return!!((0,t.isSafari)()&&(null!==(e=(0,t.getSafariVersion)().major)&&void 0!==e?e:0)>=t.SAFARI_18_MAJOR_VERSION)||!!((0,t.isIOS)()&&(0,t.getIOSVersion)()>=t.IOS_18)},t.resetPlatformDetectorCache=function(){s=void 0,u=void 0,l=void 0,c=void 0}},9927:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.toSeconds=function(e){return e/n},t.toMilliSeconds=function(e){return e*n};var n=1e3},3068:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.isBoolean=t.isNumber=void 0,t.isDefined=function(e){return null!=e},t.isVideoRepresentation=function(e){return null!=e._height&&null!=e._width},t.isNumber=function(e){return"number"==typeof e},t.isBoolean=function(e){return"boolean"==typeof e}},6741:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.WebWorkerContext=void 0;var i=n(8041),r=function(){return function(e){var t=this;this.b="undefined"==typeof window,this.onmessage=null,this.c=function(e,n){t.b?postMessage(e,n):"function"==typeof t.onmessage&&setTimeout((function(){t.onmessage({data:e})}),0)},this.postMessage=function(e){setTimeout((function(){t.onMessageCallback({data:e})}),0)},this.terminate=function(){},this.onMessageCallback=function(e){e.data.action&&e.data&&t.a[e.data.action]&&t.a[e.data.action](e.data)},this.b&&(0,i.installWorkerPolyfills)(),this.a=new e(this.b,this.c)}}();t.WebWorkerContext=r},4081:function(e,t){var n;function i(e){return"Math"in e&&e.Math===Math}Object.defineProperty(t,"__esModule",{value:!0});var r=null!==(n=function(){return"object"==typeof window&&window&&i(window)?window:void 0}())&&void 0!==n?n:function(){return"object"==typeof self&&self&&i(self)?self:void 0}();t.default=r},6110:function(e,t,n){var i=this&&this.__extends||function(){var e=function(t,n){return e=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,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();
vendor: 39,470 bytes, line 1
1Object.defineProperty(t,"__esModule",{value:!0}),t.HlsParserWebworkerMessageHandler=void 0,t.getContext=function(){return s||u()};var r=n(6599),o=n(6741),a=n(7432),s=null;function u(){var e=new o.WebWorkerContext(l);return onmessage=e.onMessageCallback,e}var l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.parseHlsPlaylist=function(e){var t=e.payload;try{var n=(0,a.parsePlaylist)(t.data,t.options);this.postMessageFunction({action:"parsedPlaylist",data:n})}catch(e){this.postMessageFunction({action:"error",data:e.message})}},t}(r.MessageHandler);t.HlsParserWebworkerMessageHandler=l,"undefined"==typeof window&&(s=u())},5707: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},i.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.generateRendition=function(e){var t,n,r;return{name:e.name,attributes:i(i({},e.attributes),{TYPE:null===(t=e.attributes)||void 0===t?void 0:t.TYPE,"GROUP-ID":null===(n=e.attributes)||void 0===n?void 0:n["GROUP-ID"],NAME:null===(r=e.attributes)||void 0===r?void 0:r.NAME})}},t.generateStartAttributes=function(e){var t,n;return(null===(t=e.attributes)||void 0===t?void 0:t.hasOwnProperty("TIME-OFFSET"))&&(n={timeOffset:Number(e.attributes["TIME-OFFSET"]),precise:"YES"===e.attributes.PRECISE}),e.attributes&&n&&n.hasOwnProperty("timeOffset")&&(e.attributes["TIME-OFFSET"]=n.timeOffset,e.attributes.PRECISE=n.precise),n},t.generatePartInfoTag=function(e){return{targetDuration:parseFloat(e["PART-TARGET"])}},t.generateServerControlTag=function(e){var t={canBlockReload:!1};return e.attributes?(e.attributes["CAN-SKIP-UNTIL"]&&(t.canSkipUntil=parseFloat(e.attributes["CAN-SKIP-UNTIL"])),void 0!==t.canSkipUntil&&e.attributes["CAN-SKIP-DATERANGES"]&&(t.canSkipDateRanges="YES"===e.attributes["CAN-SKIP-DATERANGES"]),e.attributes["HOLD-BACK"]&&(t.holdBack=parseFloat(e.attributes["HOLD-BACK"])),e.attributes["PART-HOLD-BACK"]&&(t.partHoldBack=parseFloat(e.attributes["PART-HOLD-BACK"])),e.attributes["CAN-BLOCK-RELOAD"]&&(t.canBlockReload="YES"===e.attributes["CAN-BLOCK-RELOAD"]),t):t},t.generateSkipTag=function(e){var t={skippedSegments:0,recentlyRemovedDateranges:[]};return e.attributes?(e.attributes["SKIPPED-SEGMENTS"]&&(t.skippedSegments=parseInt(e.attributes["SKIPPED-SEGMENTS"])),e.attributes["RECENTLY-REMOVED-DATERANGES"]&&(t.recentlyRemovedDateranges=e.attributes["RECENTLY-REMOVED-DATERANGES"].split("\\t")),t):t},t.generatePartTag=function(e,t){var n={uri:(0,s.forceReallocation)(e.URI),duration:parseFloat(e.DURATION)};if("YES"===e.INDEPENDENT&&(n.independent=!0),e.BYTERANGE){var i=e.BYTERANGE.split("@"),r=parseInt(i[0]),o=parseInt(i[1]);isNaN(o)&&(o=(null==t?void 0:t.byteRange)?t.byteRange.end+1:0),n.byteRange={start:o,end:o+r-1}}return"YES"===e.GAP&&(n.gap=!0),n},t.generatePreloadHintTag=function(e,t){if("PART"===e.TYPE){var n={uri:(0,s.forceReallocation)(e.URI),duration:t,isPreloadHint:!0};return(i=u(e))&&(n.byteRange=i),{part:n}}if("MAP"===e.TYPE){var i,r={url:(0,s.forceReallocation)(e.URI)};return(i=u(e))&&(r.byteRange=i),{init:r}}return{}},t.generateStreamInfTag=function(e,t){var n,r,o,a,s,u={name:e.name,uri:t,attributes:i(i({},e.attributes),{BANDWIDTH:null===(n=e.attributes)||void 0===n?void 0:n.BANDWIDTH})};return(null===(r=e.attributes)||void 0===r?void 0:r.RESOLUTION)&&(u.attributes.RESOLUTION=f(e)),(null===(o=e.attributes)||void 0===o?void 0:o.BANDWIDTH)&&(u.attributes.BANDWIDTH=parseInt(e.attributes.BANDWIDTH)),(null===(a=e.attributes)||void 0===a?void 0:a["AVERAGE-BANDWIDTH"])&&(u.attributes["AVERAGE-BANDWIDTH"]=parseInt(e.attributes["AVERAGE-BANDWIDTH"])),(null===(s=e.attributes)||void 0===s?void 0:s["PROGRAM-ID"])&&(u.attributes["PROGRAM-ID"]=parseInt(e.attributes["PROGRAM-ID"])),u.id=l(u.attributes),u},t.generateVariantPlaylistId=l,t.generateSessionKeyTag=function(e){d(e)},t.generateIFrameStreamInfTag=function(e){var t,n,i;(null===(t=e.attributes)||void 0===t?void 0:t.BANDWIDTH)&&(e.attributes.BANDWIDTH=parseInt(e.attributes.BANDWIDTH)),(null===(n=e.attributes)||void 0===n?void 0:n["AVERAGE-BANDWIDTH"])&&(e.attributes["AVERAGE-BANDWIDTH"]=parseInt(e.attributes["AVERAGE-BANDWIDTH"],10)),(null===(i=e.attributes)||void 0===i?void 0:i.RESOLUTION)&&(e.attributes.RESOLUTION=f(e))},t.generateSegmentEntrySkeleton=function(){return{uri:"",duration:0,mediaSequence:0}},t.generateCueTag=function(e,t){var n={type:t};if(e.attributes){var i=[];for(var r in e.attributes)if(e.attributes.hasOwnProperty(r)){var o=e.attributes[r]?"".concat(r,"=").concat(e.attributes[r]):r;i.push(o)}n.attributes=i}return n},t.generateDateRange=function(e){var t={type:a.MetadataType.DATERANGE};if(e.attributes){t.clientAttributes={};var n=e.attributes;for(var i in n)if(n.hasOwnProperty(i)){var r=c(i,n[i]);i.startsWith("X-")?t.clientAttributes[(0,s.kebabCaseToCamelCase)(i.substring(2))]=r:t[(0,s.kebabCaseToCamelCase)(i)]=r}}return t.duration&&(t.duration=Number(t.duration)),t.plannedDuration&&(t.plannedDuration=Number(t.plannedDuration)),t.endOnNext&&(t.endOnNext=!0),t},t.generateKeyTag=function(e){var t;if(d(e),e.attributes&&"NONE"!==e.attributes.METHOD&&e.attributes.URI){var n={method:null!==(t=o.HlsEncryptionMethods.find((function(t){return t===e.attributes.METHOD})))&&void 0!==t?t:o.HlsEncryptionMethod.AES_128,uri:(0,s.forceReallocation)(e.attributes.URI)};return void 0!==e.attributes.IV&&(n.iv=e.attributes.IV),e.attributes.KEYFORMAT&&(n.keyformat=(0,s.forceReallocation)(e.attributes.KEYFORMAT)),e.attributes.KEYFORMATVERSIONS&&(n.keyformatversions=(0,s.forceReallocation)(e.attributes.KEYFORMATVERSIONS)),e.attributes.KEYID&&(n.keyid=(0,s.forceReallocation)(e.attributes.KEYID)),n}},t.generateByteRangeTag=function(e,t){var n;if(e.value){var i=e.value.split("@"),r=i[0],o=i[1],a={length:parseInt(r||"0")};if(o)a.offset=parseInt(o);else{var s=t[t.length-1];(null==s?void 0:s.byterange)&&(a.offset=(null!==(n=s.byterange.offset)&&void 0!==n?n:0)+s.byterange.length)}return a}},t.generateMapTag=function(e,t){var n,i;if(null===(n=e.attributes)||void 0===n?void 0:n.URI){var o={url:(0,s.forceReallocation)(e.attributes.URI)};if(null===(i=e.attributes)||void 0===i?void 0:i.BYTERANGE){var a=e.attributes.BYTERANGE.split("@"),u=a[0],l=a[1];o.byteRange={start:parseInt(l),end:parseInt(l)+parseInt(u)-1}}return t.keys.length>0&&(o.keys=r([],t.keys,!0),t.keyInUse=!0),o}},t.generateCustomTag=function(e){try{e=(0,s.forceReallocation)(e);var t=/^#([^:=]*)([:=])?(.*)$/.exec(e);if(!(null==t?void 0:t[1]))return;var n={name:t[1]},i="";if("="===t[2]&&t[3])i=t[3];else if(":"===t[2]&&t[3]){var r=E.exec(t[3]);r&&"="===r[2]&&r[3]?n.attributes=function(e){for(var t=e.split(p),n=t.length,i={};n--;)if(""!==t[n]){var r=S.exec(t[n]);if(r){var o=r.slice(1),a=o[0],s=o[1];i[a.trim()]=s.trim().replace(g,"$1")}}return i}(t[3]):i=t[3]}return i&&(n.value=i.replace(h,"$1")),n}catch(e){return}};var o=n(6790),a=n(3714),s=n(649);function u(e){var t=parseInt(e["BYTERANGE-START"]),n=parseInt(e["BYTERANGE-END"]);if(!isNaN(t)||!isNaN(n))return{start:isNaN(t)?0:t,end:isNaN(n)?Math.pow(2,53)-1:n}}function l(e){var t="";return e.RESOLUTION&&(t+=e.RESOLUTION.height+"_"),t+e.BANDWIDTH}function c(e,t){var n=(0,s.forceReallocation)(t);return function(e){return["X-RESUME-OFFSET","X-PLAYOUT-LIMIT"].includes(e)}(e)?Number(n):function(e){return["X-SNAP","X-RESTRICT"].includes(e)}(e)?n.split(","):n}function d(e){var t;if(null===(t=e.attributes)||void 0===t?void 0:t.IV){var n=e.attributes.IV;(n.startsWith("0x")||n.startsWith("0X"))&&(e.attributes.IV=n.substring(2))}}function f(e){var t,n={width:0,height:0},i=null===(t=e.attributes)||void 0===t?void 0:t.RESOLUTION.split("x");return i[0]&&(n.width=parseInt(i[0])),i[1]&&(n.height=parseInt(i[1])),n}var p=/(?:^|,)((?:[^=]*)=(?:"[^"]*"|[^,]*))/,S=/([^=]*)=(.*)/,g=/^[\'"](.*)[\'"]$/,h=/^[\'"](.*)[\'"]$/g,E=/^([^:="]*)([:=])?(.*)$/},9297:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.TextParser=void 0;var n=/[ \\t]+/gm,i=function(){function e(e){this.data=e,this.rb=0}return e.prototype.sb=function(){return this.rb===this.data.length},e.prototype.skipWhitespace=function(){this.readRegex(n)},e.prototype.readRegex=function(e){var t=this.tb(e);if(!this.sb()&&void 0!==t&&t.position===this.rb)return this.rb+=t.length,t.results},e.prototype.tb=function(e){e.lastIndex=this.rb;var t=e.exec(this.data);if(null!==t)return{position:t.index,length:t[0].length,results:t}},e}();t.TextParser=i},7432:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.parsePlaylist=function(e,t){void 0===t&&(t={});var n=-1===e.indexOf("#EXTINF")?i.Master:i.Media,d=e.replace(u,"\\n").trim().split(/\\n+/m),f=(0,r.removeTrailingWhitespaces)(d[0]);if(!l.test(f))throw new Error("Playlist parsing failed: missing #EXTM3U tag");if(n===i.Media)return(0,a.parseVariant)(d,t);for(var p,S=[],g=[],h=[],E=1,v=!0,y=!1,m=!0,T=0;T<d.length;T++){var _=(0,r.removeTrailingWhitespaces)(d[T]),O=d[T+1];if((0,r.isCustomTag)(_))c(S,_);else if(m)m=!1;else{var I=(0,o.parseTag)(_);switch(I.name){case"EXT-X-STREAM-INF":h.push((0,s.generateStreamInfTag)(I,(0,r.removeTrailingWhitespaces)(O))),m=!0;break;case"EXT-X-MEDIA":var R=(0,s.generateRendition)(I);g.push(R),S.push(R);break;case"EXT-X-VERSION":E=Number(I.value);break;case"EXT-X-START":p=(0,s.generateStartAttributes)(I),S.push(I);break;case"EXT-X-ALLOW-CACHE":v="YES"===I.value||void 0===I.value;break;case"EXT-X-INDEPENDENT-SEGMENTS":y=!0,S.push(I);break;case"EXT-X-I-FRAME-STREAM-INF":(0,s.generateIFrameStreamInfTag)(I),S.push(I);break;case"EXT-X-SESSION-DATA":default:S.push(I);break;case"EXT-X-SESSION-KEY":(0,s.generateSessionKeyTag)(I),S.push(I)}}}var N={version:E,allowCache:v,independentSegments:y,hasM3u:!0,media:g,playlists:h,tags:S=S.concat(h)};return p&&(N.start=p),N};var i,r=n(3577),o=n(1908),a=n(1945),s=n(5707),u=/\\r\\n|\\r(?=[^\\n]|$)/gm,l=/^#EXTM3U($|[ \\t\\n])/m;function c(e,t){var n=(0,s.generateCustomTag)(t);n&&e.push(n)}!function(e){e.Master="master",e.Media="media"}(i||(i={}))},3577: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},i.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.parseSegments=function(e,t,n,d){void 0===d&&(d={});for(var g,h=[],E=0,v=(0,c.generateSegmentEntrySkeleton)(),y=r([],t,!0),m=0,T=n.mediaSequence,_={keys:[],keyInUse:!1},O=function(e){!function(e,t,n,i,o,a,s){e.duration=t,e.uri=n,e.mediaSequence=s,i&&(e.init=i),a.length>0&&(e.customTags=a),o.keys.length>0&&(e.keys=r([],o.keys,!0),o.keyInUse=!0)}(v,m,e,g,_,y,T),h.push(v),E+=m,T++,function(){v=(0,c.generateSegmentEntrySkeleton)(),y=[],m=0}()},I=function(e){var t,s,f=(0,u.parseTag)(e);switch(f.name){case"EXTINF":m=parseFloat(f.value);break;case"EXT-X-BYTERANGE":v.byterange=(0,c.generateByteRangeTag)(f,h);break;case"EXT-X-DISCONTINUITY":v.discontinuity=!0;break;case"EXT-X-PROGRAM-DATE-TIME":!function(e,t){t.value&&(e.dateTime=new Date(t.value))}(v,f);break;case"EXT-X-KEY":if("NONE"===(null===(t=f.attributes)||void 0===t?void 0:t.METHOD)){_.keys=[{method:o.HlsEncryptionMethod.NONE}];break}!function(e,t){t.keyInUse&&(t.keys=[],t.keyInUse=!1);var n=(0,c.generateKeyTag)(e);void 0!==n&&t.keys.push(n)}(f,_);break;case"EXT-X-MAP":g=(0,c.generateMapTag)(f,_);break;case"EXT-X-DATERANGE":n.dateRange.push((0,c.generateDateRange)(f));break;case"EXT-X-CUE-OUT-CONT":v.cueTag=(0,c.generateCueTag)(f,"CUE-OUT-CONT");break;case"EXT-X-CUE-OUT":v.cueTag=(0,c.generateCueTag)(f,"CUE-OUT");break;case"EXT-X-CUE-IN":v.cueTag=(0,c.generateCueTag)(f,"CUE-IN");break;case"EXT-X-SCTE35":!function(e,t){var n;void 0===e.scte35&&(e.scte35=[]),e.scte35.push({type:a.MetadataType.SCTE,attributes:i({CUE:null===(n=t.attributes)||void 0===n?void 0:n.CUE},t.attributes)})}(v,f);break;case"EXT-X-PART":!function(e,t,n){var i;if(n.parsePartTags){t.parts=null!==(i=t.parts)&&void 0!==i?i:[];var r=t.parts[t.parts.length-1];t.parts.push((0,c.generatePartTag)(e.attributes,r))}}(f,v,d);break;case"EXT-X-PRELOAD-HINT":var p=function(e,t,n){return n.parsePartTags&&t?(0,c.generatePreloadHintTag)(e.attributes,t.targetDuration):{}}(f,n.partInfo,d);p.init&&(g=p.init,_.keys.length>0&&(g.keys=r([],_.keys,!0),_.keyInUse=!0)),p.part&&(v.parts=null!==(s=v.parts)&&void 0!==s?s:[],v.parts.push(p.part));break;case"EXT-X-SKIP":var S=(0,c.generateSkipTag)(f);n.skippedSegmentsCount=S.skippedSegments,T+=S.skippedSegments;break;case"EXT-X-ENDLIST":n.endList=!0;break;case"EXT-X-MEDIA-SEQUENCE":(0,l.resolvePlaylistTag)(n,f,y),T=n.mediaSequence,n.skippedSegmentsCount&&(T+=n.skippedSegmentsCount);break;default:(0,l.resolvePlaylistTag)(n,f,y)}},R=0,N=e;R<N.length;R++){var b=p(N[R]);""!==b&&(b.startsWith("#")?S(b)?f(n,y,b):I(b):O(b))}v.parts&&v.parts.length>0&&(m=v.parts.reduce((function(e,t){return e+t.duration}),0),O(s.PHANTOM_SEGMENT_URL)),n.segments=h,n.totalDuration=E},t.addCustomTagToPlaylistTagList=d,t.handleCustomTag=f,t.removeTrailingWhitespaces=p,t.isCustomTag=S;var o=n(6790),a=n(3714),s=n(3066),u=n(1908),l=n(1945),c=n(5707);function d(e,t){void 0===e.tags&&(e.tags=[]),t&&e.tags.push(t)}function f(e,t,n){t.push({type:a.MetadataType.CUSTOM,attributes:n}),d(e,(0,c.generateCustomTag)(n))}function p(e){return e.replace(/^[ \\t]+/g,"")}function S(e){return/^#(?!EXT)/m.test(e)}},1908:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.parseTag=function(e){var t,n=r.exec(e);if(!n)throw new Error("Invalid tag "+e);var s,u=n[1],l=n[2],c={};if(l){var d=new i.TextParser(l),f=void 0,p=d.readRegex(o);for(p&&(s=null!==(t=p[1])&&void 0!==t?t:p[2]);f=d.readRegex(a);){var S=f[1],g=f[2]||f[3];if(S.includes(",")){var h=S.split(","),E=h[0];S=h[1].trim(),c[E]=void 0}c[S]=g,d.skipWhitespace()}}return{name:u,attributes:c,value:s}};var i=n(9297),r=/^#(EXT[^:]*)(?::(.*))?$/,o=/^(?:"([^"]*)"|([^,=]+))(?:,|$)/g,a=/([^=]+)=*(?:"([^"]*)"|([^",]*))(?:,|$)/g},1945: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},i.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.SEGMENT_TAGS=void 0,t.parseVariant=function(e,n){void 0===n&&(n={});for(var i={version:1,allowCache:!0,hasM3u:!0,endList:!1,segments:[],dateRange:[],skippedSegmentsCount:0,targetDuration:0,totalDuration:0,mediaSequence:0},r=[],s=0;s<e.length;s++){var c=(0,o.removeTrailingWhitespaces)(e[s]);if(""!==c)if((0,o.isCustomTag)(c))(0,o.handleCustomTag)(i,r,c);else{var d=(0,a.parseTag)(c);if(t.SEGMENT_TAGS.includes(d.name))return(0,o.parseSegments)(e.slice(s),r,i,n),u(i),i;l(i,d,r)}}return u(i),i},t.resolvePlaylistTag=l;var r=n(3714),o=n(3577),a=n(1908),s=n(5707);function u(e){var t;"EVENT"===e.playlistType&&(e.discontinuitySequence=null!==(t=e.discontinuitySequence)&&void 0!==t?t:0)}function l(e,t,n){switch(t.name){case"EXT-X-VERSION":e.version=Number(t.value);break;case"EXT-X-START":e.start=(0,s.generateStartAttributes)(t);break;case"EXT-X-INDEPENDENT-SEGMENTS":e.independentSegments=!0;break;case"EXT-X-TARGETDURATION":t.value&&(e.targetDuration=parseInt(t.value));break;case"EXT-X-MEDIA-SEQUENCE":t.value&&(e.mediaSequence=parseInt(t.value));break;case"EXT-X-DISCONTINUITY-SEQUENCE":t.value&&(e.discontinuitySequence=parseInt(t.value));break;case"EXT-X-PLAYLIST-TYPE":e.playlistType="EVENT"===t.value?"EVENT":"VOD";break;case"EXT-X-PART-INF":e.partInfo=(0,s.generatePartInfoTag)(t.attributes);break;case"EXT-X-ALLOW-CACHE":e.allowCache="NO"!==t.value;break;case"EXT-X-SERVER-CONTROL":e.serverControl=(0,s.generateServerControlTag)(t);break;case"EXT-X-DATERANGE":e.dateRange.push((0,s.generateDateRange)(t));break;case"EXT-X-ENDLIST":e.endList=!0;break;case"EXTM3U":break;default:n.push(i({type:r.MetadataType.CUSTOM},t)),(0,o.addCustomTagToPlaylistTagList)(e,t)}}t.SEGMENT_TAGS=["EXTINF","EXT-X-BYTERANGE","EXT-X-DISCONTINUITY","EXT-X-PROGRAM-DATE-TIME","EXT-X-KEY","EXT-X-GAP","EXT-X-BITRATE","EXT-X-PART","EXT-X-MAP","EXT-X-CUE-OUT-CONT","EXT-X-CUE-OUT","EXT-X-CUE-IN","EXT-X-SCTE35","EXT-X-SKIP"]},4053:function(e,t){var n;Object.defineProperty(t,"__esModule",{value:!0}),t.SegmentInfoError=void 0,function(e){e.END_OF_STREAM_REACHED="END_OF_STREAM_REACHED",e.PERIOD_COMPLETE="PERIOD_COMPLETE",e.SEGMENT_EXCEEDING_PERIOD_DURATION="SEGMENT_EXCEEDING_PERIOD_DURATION"}(n||(t.SegmentInfoError=n={}))},5439:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.isSegmentTiming=function(e){return"startTime"in e&&(0,i.isNumber)(e.startTime)&&"duration"in e&&(0,i.isNumber)(e.duration)},t.findSegmentIndexForTime=function(e,t,n){var i=!e||!e.length,o=t<e[0].startTime+e[0].duration;if(i||o)return 0;var a=e.length-1;if(t>=e[a].startTime)return a;var s=Math.max(t-e[0].startTime,0),u=Math.min(Math.floor(s/n),e.length-1);return r(e[0])&&r(e[u])?function(e,t,n){for(;e[n]&&e[n].startTime>t;)n--;for(;e[n]&&e[n].startTime+e[n].duration<=t;)n++;return n=Math.max(n,0),n=Math.min(n,e.length-1)}(e,t,u):null},t.createInitSegmentInfoBase=function(e){var t=e._internalId;return{internalRepresentationId:t,representationId:t.representationId,periodId:t.periodId,mimeType:e._mimeType,isInitSegment:!0}},t.getSegmentInfoTimeRange=function(e){if((null==e?void 0:e.duration)&&void 0!==(null==e?void 0:e.startTime))return{start:e.startTime,end:e.startTime+e.duration}};var i=n(3068);function r(e){return e&&(0,i.isNumber)(e.startTime)}},3066: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},i.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.SegmentListMPDHandler=t.PHANTOM_SEGMENT_URL=void 0,t.assignSegmentStartTimesFromHlsRepresentation=T,t.copyPropValues=I,t.getMatchingPart=R;var r=n(6790),o=n(813),a=n(7179),s=n(649),u=n(4853),l=n(2424),c=n(9927),d=n(3068),f=n(8052),p=n(2756),S=n(827),g=n(2498),h=n(729),E=n(4053),v=n(5439);t.PHANTOM_SEGMENT_URL="PHANTOM-SEGMENT";var y=function(){function e(e){this.d=e,this.e=e.sourceContext,this.g=e.settings,this.f=e.logger,this.m=e.serviceManager.get(o.ServiceName.ManifestService,this.e.sourceIdentifier),this.l=0,this.o={},this.n=NaN}return Object.defineProperty(e.prototype,"p",{get:function(){return this.d.serviceManager.get(o.ServiceName.PlayerStateService)},enumerable:!1,configurable:!0}),e.prototype.q=function(e,t){var n;if(!e)return null;var o={isInitSegment:!1,url:e._media,duration:e._duration,internalRepresentationId:t,periodId:t.periodId};if(e._key&&e._key.method!==r.HlsEncryptionMethod.NONE&&(o.key=e._key),void 0!==e._playbackTime&&(o.startTime=e._playbackTime),e._dateTime&&(o.dateTime=e._dateTime),e._metadata&&(o.metadata=e._metadata),e._byteRange&&(o.byteRange=e._byteRange),e._init&&(o.init=e._init,(null===(n=e._init.key)||void 0===n?void 0:n.method)===r.HlsEncryptionMethod.NONE&&(o.init=i({},o.init),delete o.init.key)),void 0!==e._mediaSequence&&(o.mediaSequence=e._mediaSequence),void 0!==e._discontinuitySequenceNumber&&(o.discontinuitySequenceNumber=e._discontinuitySequenceNumber),e._parts){var a=o.dateTime;o.parts=e._parts.map((function(e){var t=function(e,t){var n={url:e.uri,duration:e.duration,isInitSegment:!1,internalRepresentationId:t.internalRepresentationId,isPreloadHint:Boolean(e.isPreloadHint),isIndependent:Boolean(e.independent)};return e.byteRange&&(n.byteRange=e.byteRange),t.key&&(n.key=t.key),t.init&&(n.init=t.init),(0,d.isDefined)(t.mediaSequence)&&(n.mediaSequence=t.mediaSequence),(0,d.isDefined)(t.discontinuitySequenceNumber)&&(n.discontinuitySequenceNumber=t.discontinuitySequenceNumber),n}(e,o);return a&&(t.dateTime=a,t.startTime=(0,c.toSeconds)(a.getTime()),a=new Date(a.getTime()+(0,c.toMilliSeconds)(e.duration))),t}))}return o},e.prototype.r=function(e,t,n){if(t.SegmentURL.length<1)return e.entries=[],e.totalDuration=0,e.entries.length;for(var i=this.q(t.SegmentURL[0],n),r=0,o=0,a=0;a<e.entries.length;a++){var s=e.entries[a];if((0,S.isIdenticalSegmentInfo)(s,i))break;r+=s.duration,e.entries.splice(a,1),a--,o++,this.i.equals(n)&&this.rewindOneSegment()}return e.totalDuration-=r,o},e.prototype.s=function(e,t,n){for(var i=[],r=e.entries[e.entries.length-1],o=0,a=t.SegmentURL.length-1;a>=0;a--){var s=this.q(t.SegmentURL[a],n);if(r&&(0,S.isIdenticalSegmentInfo)(r,s)){if(_(r)){var u=O(r,s);e.totalDuration+=u}break}r&&(0,S.isIdenticalInitSegmentInfo)(r.init,s.init)&&(s.init=r.init),isNaN(s.duration)&&(s.duration=e.maximumSegmentDuration),s.duration/=e.timescale,o+=s.duration,i.push(s)}return e.totalDuration+=o,i.reverse(),e.entries=e.entries.concat(i),i.length},e.prototype.t=function(e,t){var n,i,r=t.SegmentList,o=t._internalId.representationId,a=null===(n=this.i)||void 0===n?void 0:n.equals(t._internalId),s=null===(i=null==r?void 0:r[0])||void 0===i?void 0:i.SegmentURL.length;if(!a||s){e.Uri&&e.Uri!==t.Uri&&this.u(e,null==r?void 0:r[0],a),e.Uri=t.Uri,e.timescale=1,e.maximumSegmentDuration=1,e.startNumber=1;for(var u=function(n){var i=r[n];if(i.hasOwnProperty("_duration")&&(e.maximumSegmentDuration=Number(i._duration)),["_timescale","_startNumber","_presentationTimeOffset"].filter((function(e){return i.hasOwnProperty(e)})).forEach((function(t){return e[t.substr(1)]=i[t]})),l.v(e,i,t),i.hasOwnProperty("SegmentURL")){var a=l.r(e,i,t._internalId),s=l.s(e,i,t._internalId);l.w(t._mimeType,o,a,s),l.m.isHlsManifest()?T(e.entries,t._internalId,l.m):l.x(e,t._internalId)}},l=this,c=0;c<r.length;c++)u(c)}},e.prototype.u=function(e,t,n){var i,r,o,a,s,l;if(this.m.isLive()&&n){var c=null!==(o=null===(r=null===(i=e.entries)||void 0===i?void 0:i[0])||void 0===r?void 0:r.mediaSequence)&&void 0!==o?o:1/0,d=(null!==(s=null===(a=null==t?void 0:t.SegmentURL[0])||void 0===a?void 0:a._mediaSequence)&&void 0!==s?s:0)-c,f=function(e){var t,n,i=e.totalDuration/(null!==(n=null===(t=e.entries)||void 0===t?void 0:t.length)&&void 0!==n?n:1);return Math.ceil(24/i)}(e);!isNaN(d)&&d>0&&d<f&&this.X(d)}(0,u.clearArray)(null!==(l=e.entries)&&void 0!==l?l:[])},e.prototype.v=function(e,t,n){var i,r=null===(i=f.ModuleManager.get(p.ModuleName.DASH,!1))||void 0===i?void 0:i.initSegmentInfoSourceDetectors.isInitializationNode;(null==r?void 0:r(t))?e.init=f.ModuleManager.get(p.ModuleName.DASH,!1).initSegmentInfoProviders.provideSegmentInfoFromInitializationNodeProperty(t,n):delete e.init},e.prototype.w=function(e,t,n,i){(n>0||i>0)&&this.f.debug("[".concat(e,"][").concat(t,"] Updated segment list, removed ").concat(n," segments and added ").concat(i," segments"))},e.prototype.x=function(e,t){var n=this.pb(t),i=0;e.entries.forEach((function(e){var t;e.startTime=n+i,i+=null!==(t=e.duration)&&void 0!==t?t:0}))},e.prototype.extrapolateStartTimesFromDiscontinuityStarts=function(e){var t,n,i,r,o=null===(n=null===(t=this.y())||void 0===t?void 0:t.getState())||void 0===n?void 0:n.hls;if(o){var a=e.getRepresentationId().representationId,s=this.getSegmentListEntries(this.i),u=f.ModuleManager.get(p.ModuleName.HLS).selectors,l=u.getDiscoSequenceTimings,c=u.getMergedDiscontinuityTimings,d=function(e,t){for(var n=e[0].discontinuitySequenceNumber,i=1;i<e.length;i++){var r=e[i].discontinuitySequenceNumber;if(r!==n){var o=m(t,r);if(null!=o)return{index:i,discontinuityStartTime:o}}}return null}(s,null!==(i=l(o,e.getMimeType()))&&void 0!==i?i:c(o));if(!d){var S=null===(r=this.Y())||void 0===r?void 0:r.start;if(void 0===S)return;d={index:0,discontinuityStartTime:S},this.f.debug("Could not find discontinuity boundary with start time, using period start time ".concat(S))}this.f.debug("Assigning segment start times for rep ".concat(a," from discontinuity at index ").concat(d.index," with time ").concat(d.discontinuityStartTime)),s[d.index].startTime=d.discontinuityStartTime;for(var g=d.index-1;g>=0;g--)s[g].startTime=s[g+1].startTime-s[g+1].duration;for(g=d.index+1;g<s.length;g++)s[g].startTime=s[g-1].startTime+s[g-1].duration}},e.prototype.y=function(){return this.d.serviceManager.get(o.ServiceName.SourceStoreService,this.d.sourceContext.sourceIdentifier)},e.prototype.z=function(e,t){for(var n=-1,i=this.getSegmentListEntries(t),r=i.length-1;r>=0;r--)if((0,S.isIdenticalSegmentInfo)(i[r],e)){n=r;break}return n},e.prototype.A=function(e){var t,n=this,i=null===(t=this.m)||void 0===t?void 0:t.getAdaptationSet(e);i&&i.Representation.forEach((function(e){var t=n.o[e._internalId.key()];if(t||(t=n.E(e._internalId.key())),e.hasOwnProperty("SegmentList")&&(n.t(t,e),f.ModuleManager.has(p.ModuleName.DASH))){var i=f.ModuleManager.get(p.ModuleName.DASH).initSegmentInfoSourceDetectors.isInitializationNode;if(!t.hasOwnProperty("init")&&e.hasOwnProperty("SegmentBase")&&e.SegmentBase&&i(e.SegmentBase[0])){var r=f.ModuleManager.get(p.ModuleName.DASH).initSegmentInfoProviders.provideSegmentInfoFromInitializationNodeProperty;t.init=r(e.SegmentBase[0],e)}}}))},e.prototype.B=function(){var e,t,n=this,i=null===(e=this.d.serviceManager.get(o.ServiceName.SourceStoreService,this.e.sourceIdentifier).getState().activeTracks)||void 0===e?void 0:e[this.j.adaptationSetId];if((null===(t=null==i?void 0:i.selectedRepresentationId)||void 0===t?void 0:t.periodId)===this.j.periodId)return i.selectedRepresentationId;if(this.i){var r=this.m.getRepresentation(this.j,this.i.representationId);if(r)return r._internalId}return(this.C((function(e){return n.isSegmentInfoLoaded(e._internalId)}))||this.C())._internalId},e.prototype.C=function(e){return this.m.getMatchingRepresentationByBandwidth(this.j,this.F(),e)},e.prototype.D=function(){var e=this.j.equals(this.i),t=!this.i||Boolean(this.m.getRepresentationById(this.i));return!this.i||!e||!t},e.prototype.setAdaptationSetId=function(e){this.j=e,this.A(this.j);var t,n=this.m.isLive(),i=0;this.D()&&(this.i=this.B());var r=this.o[this.i.key()];if(r||(r=this.E(this.i.key())),r&&n&&r.entries&&r.entries.length>0){var o=r.entries.length-1;this.h>o&&(i=this.h-o),this.h=Math.min(o,this.h||0),this.h=Math.max(0,this.h),t=r.entries[this.h]}if(this.h=this.h||0,n&&(this.l=this.getSegmentDuration()*this.g.LIVE_SEGMENT_LIST_START_INDEX_OFFSET),n){if(t&&r){var a=this.z(t,this.i);a>=0?this.h=a+i:this.H()}else this.H();var s=this.G();s?this.T(s):this.resolvePendingSegmentInfoRequests()}else this.resolvePendingSegmentInfoRequests()},e.prototype.E=function(e){var t={totalDuration:0,entries:[],SegmentURL:[],startNumber:0,init:null,maximumSegmentDuration:1,timescale:1};return this.o[e]=t,t},e.prototype.F=function(){var e=0,t=this.kb();return t&&(e=t._bandwidth),e},e.prototype.G=function(){var e;if(this.m.isHlsManifest()){var t=this.m.getRepresentationById(this.i);if(null===(e=null==t?void 0:t._hls)||void 0===e?void 0:e.loadFailureReason)return t._hls.loadFailureReason}return this.hasNext()||this.m.isLastPeriod(this.i.periodId)?null:E.SegmentInfoError.PERIOD_COMPLETE},e.prototype.H=function(){this.g.ENABLE_SEEK_FOR_LIVE?this.h=0:this.timeShift(0)},e.prototype.I=function(e,t){var n,i,r=this.m.getRepresentationById(e),o=this.m.getRepresentationById(t),a=(0,d.isNumber)(null===(n=null==o?void 0:o._hls)||void 0===n?void 0:n.mediaSequence)&&(0,d.isNumber)(null===(i=null==r?void 0:r._hls)||void 0===i?void 0:i.mediaSequence);if(r&&o&&a){var s=o._hls.mediaSequence-r._hls.mediaSequence,l=this.getSegmentListEntries(e),c=this.getSegmentListEntries(t);s>=l.length||(c[0].startTime=l[s].startTime,(0,u.forEachFromIndex)(c,1,(function(e,t){(0,d.isNumber)(e.startTime)&&(0,d.isNumber)(e.duration)&&(t.startTime=e.startTime+e.duration)})))}},e.prototype.setRepresentationId=function(e){var t=this.m.getRepresentationById(e),n=this.getSegmentListEntries(this.i)[this.h];if(t){var i=void 0===this.i,r=this.i;if(this.i=e,this.m.isLive()&&t._hls)if(this.g.HLS_SYNC_SEGMENT_PLAYBACK_TIME_VIA_MEDIA_SEQUENCE&&this.I(r,this.i),i)this.H();else if(this.g.HLS_SYNC_VIA_MEDIA_SEQUENCE){var o=this.m.getRepresentationById(r)._hls.mediaSequence+this.h;this.h=o-t._hls.mediaSequence,this.h=Math.max(this.h,0)}else if(null!=(null==n?void 0:n.startTime)&&!isNaN(n.startTime)){var a=this.ob(n.startTime);null===a||isNaN(a)||(this.h=this.J(a,n.startTime))}return!0}return!1},e.prototype.J=function(e,t){var n=this.getSegmentListEntries(this.i),i=[n[e],n[e+1]];if(e===n.length-1||i.some((function(e){return!e.startTime})))return e;var r=i.map((function(e){return Math.abs(e.startTime-t)})),o=Math.min.apply(this,r);return e+r.indexOf(o)},e.prototype.getInitSegmentInfo=function(){var e=this.lb(this.i);if(null==e?void 0:e.init)return e.init.presentationTimeOffset=this.getTimestampOffset(),e.init;var t=this.getSegmentListEntries(this.i);if(this.Q(t)&&this.h>-1){var n=i({},t[this.h]);if(n.init){var r=n.init;return r.isInitSegment=!0,r}}return null},e.prototype.K=function(e){var t;if(!(this.getSegmentListEntries(this.i).length<1||this.h<0)){var n=this.L(e);return n&&this.f.debug("".concat(null===(t=this.j)||void 0===t?void 0:t.adaptationSetId," given time ").concat(e," matches seek time, performing precise segment/part search"),e),(0,h.isPlayingLowLatencyHls)(this.d)&&this.M(e,n),this.N(e,n)}},e.prototype.L=function(e){var t;return e===(null===(t=this.p)||void 0===t?void 0:t.targetPlaybackTime)||!1},e.prototype.M=function(e,t){var n;if(0!==e){if(this.h=this.ob(e),!t){var i=this.getSegmentListEntries(this.i),r=i[this.h];if(!(r.parts&&r.parts.length>0)){var o=this.h;this.h=N(e,this.h,i),this.h!==o&&this.f.debug("Snapped segment index for time ".concat(e," to next segment boundary at ").concat(null===(n=i[this.h])||void 0===n?void 0:n.startTime))}}}else this.d.logger.debug("Ignoring target time of 0 for LL-HLS")},e.prototype.N=function(e,t){var n=this.getSegmentListEntries(this.i);if(this.Q(n)){var i=n[this.h];if(!(i.parts&&i.parts.length>0))return this.P();if(_(i))return R(i,e,t);var r=R(i,e,t);return r?i.parts.indexOf(r)>0?r:this.P():(this.h++,this.N(e,t))}},e.prototype.getNextSegmentInfo=function(e){var t=this.K(e);return t?(this.O(t),Promise.resolve(t)):this.S({time:e})},e.prototype.O=function(e){return e.presentationTimeOffset=this.getTimestampOffset(),e.startTime&&(e.wallClockTime=(0,c.toMilliSeconds)(e.startTime)),e},e.prototype.P=function(){return this.getSegmentListEntries(this.i)[this.h++]},e.prototype.getSegmentInfos=function(){var e=this,t={},n=this.m.getAdaptationSet(this.j);return n&&n.Representation.forEach((function(n){var i=e.getSegmentListEntries(n._internalId);t[n._id]=i.map((function(e){return{url:e.url,duration:e.duration,startTime:e.startTime}}))})),t},e.prototype.getSubtitleUrl=function(){return this.m.getAvailableSubtitles(this.j.periodId)[0].url},e.prototype.getStartNumber=function(){var e=this.lb(this.i);return e?e.startNumber:1},e.prototype.getSegmentDuration=function(){var e=this,t=this.lb(this.i),n=this.getSegmentListEntries(this.i);if(t)return n.length>0&&(0,d.isNumber)(t.totalDuration)?t.totalDuration/n.length:t.maximumSegmentDuration;if(this.m.getAdaptationSet(this.j)){var i=Object.keys(this.o).map((function(t){return e.o[t]})).find((function(e){return null!==e}));if(i)return i.maximumSegmentDuration}return 1},e.prototype.seekTo=function(e){e>-1&&(this.h=this.ob(e))},e.prototype.Q=function(e){return this.h<e.length},e.prototype.hasNext=function(){var e=this.getSegmentListEntries(this.i);return!this.i||!e.length||(this.m.isLive()?this.R(e):this.Q(e))},e.prototype.R=function(e){return!!this.m.isLastPeriod(this.i.periodId)||this.Q(e)},e.prototype.setTimestampOffset=function(e,t){void 0===t&&(t=1),this.n=e/t},e.prototype.getTimestampOffset=function(){if(!isNaN(this.n))return this.n;var e=this.Y(),t=0;if(this.i){var n=this.lb(this.i);n&&!isNaN(n.presentationTimeOffset)&&(t=n.presentationTimeOffset/n.timescale)}return e&&!this.m.isHlsManifest()&&(t-=e.start),t},e.prototype.getIndex=function(){return this.h},e.prototype.setIndex=function(e){if("number"==typeof e)return e<0?(this.f.debug("Tried to set index at MPDHandler to value smaller 0. Setting to 0."),void(this.h=0)):void(this.h=e);this.f.debug("Tried to set index at MPDHandler with parameter not being a number!")},e.prototype.S=function(e){var t,n=this;if(this.k)return Promise.reject("fail");var r=this.m.getRepresentationById(this.i);return(null===(t=null==r?void 0:r._hls)||void 0===t?void 0:t.loadFailureReason)?Promise.reject(r._hls.loadFailureReason):(this.f.debug("No segment info was found for the target time. Waiting for representation update."),new Promise((function(t,r){n.k=i(i({},e),{resolve:t,reject:r})})))},e.prototype.resolvePendingSegmentInfoRequests=function(){if(this.k){var e=this.K(this.k.time);e?(this.O(e),this.k.resolve(e),this.k=null):this.m.isLive()||this.hasNext()||this.k.reject(E.SegmentInfoError.END_OF_STREAM_REACHED)}},e.prototype.T=function(e){this.k&&(this.k.reject(e),this.k=null)},e.prototype.U=function(){var e=this.getSegmentListEntries(this.i);return e.length>0?e.length-1:0},e.prototype.V=function(e){for(var t,n=Math.abs(e),i=this.getSegmentDuration(),r=this.getSegmentListEntries(this.i),o=this.U(),a=0,s=r.length-1;s>=0&&!((a+=null!==(t=r[s].duration)&&void 0!==t?t:i)>=n);s--)o--;return Math.max(0,o)},e.prototype.timeShift=function(e,t,n){if(this.m.isLive()){var i=this.h;this.h=n&&this.W()?this.ob(n):this.V(e),this.f.debug("timeShift changes index from ".concat(i," to ").concat(this.h,", based on")+" offset ".concat(e," and target time ").concat(n))}},e.prototype.W=function(){var e,t=null===(e=this.getSegmentListEntries(this.i)[0])||void 0===e?void 0:e.startTime;return(0,d.isNumber)(t)&&t>=0},e.prototype.updateRepresentation=function(e){return Promise.resolve(e)},e.prototype.isSegmentInfoLoaded=function(e){if(void 0===e&&(e=this.i),!e)return!1;var t=this.getSegmentListEntries(e),n=this.m.getRepresentationById(e);return!(!t.length||!n)},e.prototype.X=function(e){this.f.debug("Rewinding segment list index by ".concat(e," segments")),this.h-=e,this.h<0&&(this.f.debug("List array index is smaller than 0, probably a discontinuity. Using 0."),this.h=0)},e.prototype.rewindOneSegment=function(){return this.h--,!(this.h<0&&(this.f.debug("List array index is smaller than 0, probably a discontinuity. Using 0."),this.h=0,1))},e.prototype.Y=function(){return this.m.getPeriod(this.i)},e.prototype.Z=function(e){var t=this.Y().start;return(this.m.hasSinglePeriod()?this.getSeekableRange().start:t)+this.getSegmentListEntries(this.i).slice(0,e).reduce((function(e,t){return e+t.duration}),0)},e.prototype.kb=function(){return this.m.getRepresentationById(this.i)},e.prototype.lb=function(e){if(e)return this.o[e.key()]},e.prototype.getSegmentListEntries=function(e){var t,n;return e?this.g.ENABLE_SEGMENT_INFO_PROVIDER_FROM_STORE&&this.m.isHlsManifest()?this.mb(e):null!==(n=null===(t=this.lb(e))||void 0===t?void 0:t.entries)&&void 0!==n?n:[]:[]},e.prototype.mb=function(e){var t,n=null===(t=this.y())||void 0===t?void 0:t.getState();return(0,g.getSegmentInfos)(n,e.key())},e.prototype.nb=function(e,t){var n,i;if(!this.j)return 0;for(var r=this.m.getPeriod(this.j),o=null!==(n=null==r?void 0:r.start)&&void 0!==n?n:0,a=this.getSegmentListEntries(this.i),s=0,u=o;u<=t&&s<a.length;s++)u+=null!==(i=a[s].duration)&&void 0!==i?i:0;return Math.max(s-1,0)},e.prototype.ob=function(e){var t=this.lb(this.i),n=this.getSegmentListEntries(this.i);if(!t||0===n.length||!(0,d.isNumber)(t.totalDuration))return 0;var i=this.pb(),r=Math.max(i,e),o=t.totalDuration/n.length,a=(0,v.findSegmentIndexForTime)(n,r,o);return null!==a?a:this.nb(t,r)},e.prototype.pb=function(e){void 0===e&&(e=this.i);var t=this.m.hasSinglePeriod()?this.getSeekableRange().start:this.m.getPeriod(e).start;return this.m.isFirstPeriod(e.periodId)&&(t+=this.l),t},e.prototype.getLiveEdgeTime=function(){var e,t=null===(e=this.m)||void 0===e?void 0:e.getLastPeriod();return t?t.start+l.DurationConverter.getDurationInSec(t._duration):1/0},e.prototype.getActualTimeShiftBufferDepth=function(){return this.m.getTimeShiftBufferDepthSeconds()},e.prototype.getSeekableRange=function(){var e={start:0,end:0},t=this.m.getTotalDuration();if(!this.m.isLive())return e.start=(0,a.getStartTimeOffset)(this.y().getState()),e.end=t,e;var n=this.m.getTimeShiftBufferDepthSeconds(),i=(0,c.toSeconds)(this.m.getRequestTimestamp()-this.m.getAvailabilityStartTime());if(e.start=Math.max(i+n,0),e.end=Math.max(i,0),f.ModuleManager.has(p.ModuleName.HLS)&&this.m.isHlsManifest()){var r=f.ModuleManager.get(p.ModuleName.HLS).selectors,o=r.getHlsState;"EVENT"===(0,r.getPlaylistType)(o(this.y().getState()))?(e.start=0,e.end=t):e.start+=this.l}return e.end-=this.m.getDesiredDistanceToLiveEdge(),e},e.prototype.getPendingSegmentInfoRequest=function(){return this.k},e.prototype.setPendingSegmentInfoRequest=function(e){this.k=e},e.prototype.canSwitchRepresentation=function(e){var t,n=this.getSegmentListEntries(this.i)[this.h];if(!n)return!0;var i=function(e,t,n){return void 0!==t.startTime&&void 0!==t.duration&&Math.abs(e-(t.startTime+t.duration))<n}(e,n,this.g.LL_HLS_SEGMENT_END_TIME_MATCHING_TOLERANCE);if(!_(n)&&i)return!0;var r=this.L(e);return!((null===(t=null==n?void 0:n.parts)||void 0===t?void 0:t.length)&&R(n,e,r)!==n.parts[0])},e.prototype.getLatestTimeForPossibleSwitch=function(e){var t,n=this.qb(e),i=n.isLoadingCurrentSegmentsParts,r=n.currentSegment;return r&&i&&null!==(t=r.startTime)&&void 0!==t?t:e},e.prototype.adjustTimeToNextSegmentStart=function(e){var t=this.qb(e),n=t.isLoadingCurrentSegmentsParts,i=t.currentSegment;return n&&(null==i?void 0:i.startTime)&&(null==i?void 0:i.duration)?i.startTime+i.duration:e},e.prototype.qb=function(e){var t,n=function(e,t){var n,i,r;if(t&&!(t.length<1)&&(null===(n=t[0])||void 0===n?void 0:n.duration)){var o=(0,v.findSegmentIndexForTime)(t,e,t[0].duration),a=null===o,s=e<(null!==(r=null===(i=t[0])||void 0===i?void 0:i.startTime)&&void 0!==r?r:1/0),u=t[t.length-1];if(void 0!==u.startTime&&void 0!==u.duration){var l=e>u.startTime+u.duration;if(!(a||s||l))return t[o]}}}(e,this.getSegmentListEntries(this.i)),i=null===(t=null==n?void 0:n.parts)||void 0===t?void 0:t[0],r=this.L(e),o=!1;if(i&&n){var a=R(n,e,r);o=void 0!==a&&a!==i}return{currentSegment:n,isLoadingCurrentSegmentsParts:o}},e.prototype.dispose=function(){this.g=null,this.m=null,this.j=null,this.i=null,this.m=null,this.k=null,this.o=null},e}();function m(e,t){var n=e[String(t)];return n&&n.startTime>0?n.startTime:(n=e[String(t-1)])&&n.endTime>0?n.endTime:null}function T(e,t,n){var i;e.length&&n.hasSegmentStartTimeForHlsRepresentation(t)&&(null!=e[0].startTime?i=(0,u.findIndexFromEnd)(e,(function(e){return null!=e.startTime}))+1:(e[0].startTime=n.getStartTimeForHlsSegment(t,e[0]),i=1),(0,u.forEachFromIndex)(e,i,(function(e,t){return t.startTime=e.startTime+e.duration})))}function _(e){return e.url.endsWith(t.PHANTOM_SEGMENT_URL)}function O(e,n){var i=n.duration-e.duration;return I(n,e,["url","mediaURL","duration","parts","init","key","discontinuitySequenceNumber","isDiscontinuityStart"]),!e.url.endsWith(t.PHANTOM_SEGMENT_URL)&&(e.url=(0,s.forceReallocation)(e.url)),i}
1function I(e,t,n){n.forEach((function(n){return t[n]=e[n]}))}function R(e,t,n){var i,r=null===(i=e.parts)||void 0===i?void 0:i.every(v.isSegmentTiming);if(e.parts&&r){var o=e.parts,a=o.reduce((function(e,t){return e+t.duration}),0)/o.length,s=(0,v.findSegmentIndexForTime)(o,t,a);if(null!=s)return n?e.parts[0]:(s=N(t,s,o),e.parts[s])}}function N(e,t,n){var i=n[t],r=i.startTime+i.duration;return Math.abs(e-i.startTime)<=Math.abs(e-r)?t:t+1}t.SegmentListMPDHandler=y},827:function(e,t){function n(e){return[e.url,e.mediaURL].filter(Boolean)}function i(e,t){return null==e?null==t:null!=t&&e.start===t.start&&e.end===t.end}Object.defineProperty(t,"__esModule",{value:!0}),t.isIdenticalSegmentInfo=function(e,t){if(void 0!==e.mediaSequence&&void 0!==t.mediaSequence)return e.mediaSequence===t.mediaSequence;var r=function(e,t){var i=n(e),r=n(t);return i.some((function(e){return r.includes(e)}))}(e,t),o=i(e.byteRange,t.byteRange),a=e.discontinuitySequenceNumber===t.discontinuitySequenceNumber;return r&&o&&a},t.isIdenticalInitSegmentInfo=function(e,t){var n=(null==e?void 0:e.url)===(null==t?void 0:t.url),r=i(null==e?void 0:e.byteRange,null==t?void 0:t.byteRange);return n&&r}},2498:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.getMostRecentlyRefreshedQuality=t.getSegmentInfos=t.getSegmentMapEntry=void 0,t.getSegmentMapEntry=function(e,t){return null==e?void 0:e.segmentInfoMap[t]},t.getSegmentInfos=function(e,n){var i,r;return null!==(r=null===(i=(0,t.getSegmentMapEntry)(e,n))||void 0===i?void 0:i.segmentInfos)&&void 0!==r?r:[]},t.getMostRecentlyRefreshedQuality=function(e){if(e)return Object.values(e.segmentInfoMap).filter((function(e){return null!=e.qualityInfo.lastUpdateTimestamp})).sort((function(e,t){var n=e.qualityInfo.lastUpdateTimestamp;return t.qualityInfo.lastUpdateTimestamp-n}))[0]}},962:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.isLowLatencyConfigured=function(e){var t=e.serviceManager.get(i.ServiceName.LiveLatencyService);return(null==t?void 0:t.isConfigured())||!1};var i=n(813)},729:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.isPlayingLowLatencyHls=function(e){var t;if(!(0,a.isLowLatencyConfigured)(e)||!e.settings.LL_HLS)return!1;var n=(0,i.getSourceState)(e);if(!n)return!1;var s=r.ModuleManager.get(o.ModuleName.HLS,!1);if(!s)return!1;var u=s.selectors,l=u.getHlsState,c=u.getIsLowLatencyPlaylist,d=l(n);return!!d&&null!==(t=c(d))&&void 0!==t&&t};var i=n(5971),r=n(8052),o=n(2756),a=n(962)},8041:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.installWorkerPolyfills=function(){Array.prototype.includes||i.ArrayIncludesPolyfill.polyfill(),String.prototype.includes||o.StringIncludesPolyfill.polyfill(),String.prototype.startsWith||a.StringStartsWithPolyfill.polyfill(),String.prototype.endsWith||r.StringEndsWithPolyfill.polyfill()};var i=n(4499),r=n(3878),o=n(4205),a=n(829)}},t={};function n(i){var r=t[i];if(void 0!==r)return r.exports;var o=t[i]={exports:{}};return e[i].call(o.exports,o,o.exports,n),o.exports}!function(){n.d=function(e,t){for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})}}(),function(){n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}}(),function(){n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}}(),n(6110)}();',i.p+"d7bcbee9def87ff2d01e.worker.js")}},16661:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CodecDetector=void 0,t.extractCodecFromTsSegment=h,t.extractCodecFromMp4Segment=p,t.mergeSegmentCodecs=f,t.isFmp4Segment=g;var n=i(66790),r=i(3336),o=i(4129),a=i(74853),s=i(58313),u=i(88052),c=i(62756),l=i(95880),d=i(18146);function h(e,t){if(!u.ModuleManager.has(c.ModuleName.ContainerTS))return Promise.reject(new l.PlayerModuleMissingError(c.ModuleName.ContainerTS));var i=function(e){return new(u.ModuleManager.get(c.ModuleName.ContainerTS)).WebWorkerTransmuxer(e,!1)}(t);return i.transmuxSegment(e).then(function(t){var i=f(t.transmuxedSegments);if(!i)throw"couldn't detect codec for ".concat(e.getMimeType());return i}).finally(function(){i.dispose()})}function p(e){if(!u.ModuleManager.has(c.ModuleName.ContainerMP4))return Promise.reject(new l.PlayerModuleMissingError(c.ModuleName.ContainerMP4));var t=u.ModuleManager.get(c.ModuleName.ContainerMP4).getCodecFromSegment(e);
1return t?Promise.resolve(t):Promise.reject("couldn't detect codec for ".concat(e.getMimeType()))}function f(e){for(var t="",i=0,n=e;i<n.length;i++){var r=n[i];if(!r.getCodec())return null;t+=(""===t?"":",")+r.getCodec()}return t}function g(e){for(var t=e.getData(),i=new DataView(t,0,t.byteLength),n=[],r=0;r+8<i.byteLength;){var o=i.getUint32(r);if(0===o)break;var s=a.ArrayHelper.extractAsciiString(i,r+4,4);n.push(s),r+=o}return e.isInit()?["ftyp","moov"].every(function(e){return n.includes(e)}):["moof","mdat"].every(function(e){return n.includes(e)})}t.CodecDetector=function(){function e(e){this.aP=e,this.bP=new o.DefaultContentLoader(this.aP)}return e.prototype.cP=function(e){return this.aP.segmentPrefetchingService&&(this.aP.segmentPrefetchingService.hasPrefetchedSegment(e)?this.aP.segmentPrefetchingService.getPrefetchedSegment(e):this.aP.segmentPrefetchingService.fetch(e))||Promise.reject()},e.prototype.probeCodecs=function(e,t,i,o,a){var u=this;void 0===a&&(a=t?e.length-1:0);var c=e.slice(),l=t?c.pop():c.shift();if(!l)return Promise.reject(Error("Could not load any segment"));var h,p=l.init,f=void 0!==p,g=(0,s.extractOrigin)(i),m=s.URLHelper.buildAbsoluteUrl(i,g,f?p.url:l.uri),y=f?p.keys:l.keys,v=function(e,t,i,n){for(var r,o=0,a=e;o<a.length;o++){var s=a[o];r=(0,d.generateSegmentEncryptionInfo)(s,t,i,n)}return r}(null!=y?y:[],i,g,o+a);(null==v?void 0:v.method)===n.HlsEncryptionMethod.AES_128&&(h=v);var S=function(e,t,i){return{url:e,key:i,byteRange:(0,d.parseSegmentByteRange)(t.byterange),mimeType:"unknown/mp4",internalRepresentationId:null,isInitSegment:!!t.init,preventDownloadCanceling:!0}}(m,l,h);return this.cP(S).then(function(e){return u.dP(e)}).catch(function(e){if(e instanceof r.PlayerError)return Promise.reject(e);u.aP.logger.debug("Codec probing from segment failed",e);var n=t?a-1:a+1;return u.probeCodecs(c,t,i,o,n)}).then(function(e){return u.aP.logger.debug("Probed codec is",e),e})},e.prototype.dP=function(e){return g(e)?p(e):h(e,this.aP)},e}()},8251:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DiscontinuitySequenceNumberTracker=void 0,t.DiscontinuitySequenceNumberTracker=function(){function e(e){this.An=e,this.Cn=[],this.reset()}return e.prototype.Dn=function(e){var t=this;this.Cn.forEach(function(i){return i(t.Bn,e)})},e.prototype.trackSegment=function(e){if(this.An(e.getMimeType())&&!e.isInit()){var t=e.getSegmentInfo(),i=null==t?void 0:t.discontinuitySequenceNumber,n=isFinite(this.Bn),r=this.Bn!==i;n&&r&&this.Dn(i),this.Bn=i}},e.prototype.subscribe=function(e){this.Cn.push(e)},e.prototype.unsubscribe=function(e){var t=this.Cn.indexOf(e);t<0||this.Cn.splice(t,1)},e.prototype.reset=function(){this.Bn=-1/0},e.prototype.dispose=function(){this.reset(),this.Cn=[]},e}()},15617:function(e,t,i){"use strict";var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.HlsBackupStreamsHandler=t.BackupStreamErrors=void 0,t.getLocationIdForRep=v;var r,o=i(80813),a=i(3714),s=i(43446),u=i(15971),c=i(85434),l=i(15014),d=i(14302),h=i(59707),p=i(62198),f=i(90919),g=i(18146),m=i(73315);function y(e,t){var i,n,r,o,a=t&&null!=(o=null==(r=null==(n=null==(i=(0,p.getManifest)(t))?void 0:i.BaseURL)?void 0:n[0])?void 0:r.url)?o:"";return g.PlaylistUtils.getBaseUrl(a,e)}function v(e,t){var i,n;if(e)return S(null!=(n=null==(i=t[e._mimeType])?void 0:i[e._id])?n:{},e.Uri)}function S(e,t){return Object.keys(e).find(function(i){return Object.values(e[i]).includes(t)})}function b(e,t){var i={},n=[];for(var r in e){var o=e[r][t];n.includes(o)||(n.push(o),i[r]=e[r])}return i}!function(e){e.ALL_PENALIZED="ALL_PENALIZED",e.LOADING_FAILED="LOADING_FAILED",e.NO_BACKUP_STREAMS="NO_BACKUP_STREAMS"}(r||(t.BackupStreamErrors=r={})),t.HlsBackupStreamsHandler=function(){function e(e,t,i){this.context=e,this.backupStreamInfo=t,this.updateRepresentation=i,this.backupStreamsMap={}
1,this.penalizedStreams={},this.DO=!1,this.EO=!1,this.FO=e.serviceManager.get(o.ServiceName.ManifestService,e.sourceContext.sourceIdentifier),this.GO=this.context.serviceManager.get(o.ServiceName.ManifestUpdateSchedulingService,this.context.sourceContext.sourceIdentifier)}return e.prototype.populateBackupStreamsMap=function(e){this.backupStreamsMap=function(e,t){var i,n=((i={})[c.MimeType.AudioMp4]={},i[c.MimeType.VideoMp4]={},i);return t.forEach(function(t){var i,r=t._mimeType===c.MimeType.AudioMp4?null!=(i=t._name)?i:c.MimeType.AudioMp4:c.MimeType.VideoMp4,o=e.find(function(e){return Object.values(e).find(function(e){return e[r]===t.Uri})});o&&(n[t._mimeType][t._id]=b(o,r))}),n}(this.backupStreamInfo,e);var t,i,n=v(null!=(t=e.find(function(e){return c.MimeTypeHelper.isVideo(e._mimeType)}))?t:e[0],this.backupStreamsMap);void 0!==n&&(null==(i=(0,u.getSourceStore)(this.context))||i.dispatch((0,m.setContentLocationId)(n)))},e.prototype.isCurrentlySwitchingToBackupStreams=function(){return this.EO},e.prototype.signalLoadingFinished=function(){this.DO=!0},e.prototype.switchToBackupStream=function(e,t){var i,n,o=this,s=null!=(n=null==(i=this.backupStreamsMap[e._mimeType])?void 0:i[e._id])?n:{};if(Object.keys(s).length<=1)return Promise.reject(r.NO_BACKUP_STREAMS);var c=this.ZP(e._mimeType),l=(null==c?void 0:c._id)===e._id&&(null==c?void 0:c.Uri)!==e.Uri,h=function(e,t){if(!t)return!0;var i,n,r=null==(n=null==(i=e.SegmentList)?void 0:i[0])?void 0:n.SegmentURL;return!!r&&-1!==(0,f.findSegmentUrlIndexWithinSegmentList)(t,r)}(e,t);if(l||!h)return this.context.logger.debug("Ignoring outdated failover request for ".concat(e._mimeType," rep ").concat(e._id),{hasPlaylistUriChanged:l,isSegmentInPlaylist:h}),Promise.resolve([c]);var p=S(s,e.Uri);if(void 0===p)return this.context.logger.debug("Could not find the failing rep in the current list of backup streams.",{id:e._id,uri:e.Uri,backupStreams:s}),Promise.reject(r.NO_BACKUP_STREAMS);this.HO(p),this.IO();var g=this.getNextLocationId(Object.keys(s),p);return void 0===g?(this.context.logger.debug("No other backup stream is available: all penalized."),Promise.reject(r.ALL_PENALIZED)):(this.context.logger.debug("Starting failover from stream ".concat(p," to ").concat(g)),this.JO(e,p,g).then(function(e){var t,i,n,r=S(s,null!=(i=null==(t=e[0])?void 0:t.Uri)?i:"");return o.context.logger.debug("Successfully completed failover to stream index ".concat(r)),void 0!==r&&(null==(n=(0,u.getSourceStore)(o.context))||n.dispatch((0,m.setContentLocationId)(String(r))),o.context.eventHandler.dispatchEvent(a.PlayerEvent.ContentLocationChanged,{sourceLocationId:p,targetLocationId:r,reason:a.ContentLocationChangedReason.Failover})),e}).catch(function(e){return e===d.REPRESENTATION_UPDATE_CANCEL?Promise.reject(e):(o.context.logger.debug("Failover from stream ".concat(p," to ").concat(g," failed")),Promise.reject(r.LOADING_FAILED))}))},e.prototype.HO=function(e){this.context.logger.debug("Penalizing stream ".concat(e," for ").concat(this.context.settings.HLS_BACKUP_STREAM_PENALTY_DURATION,"s")),this.penalizedStream
1s[e]=s.TimingUtil.getHiResTimestamp()},e.prototype.IO=function(){var e=this,t=s.TimingUtil.getHiResTimestamp();Object.keys(this.penalizedStreams).forEach(function(i){t-e.penalizedStreams[i]>=e.context.settings.HLS_BACKUP_STREAM_PENALTY_DURATION&&(e.context.logger.debug("Depenalizing stream ".concat(i)),delete e.penalizedStreams[i])})},e.prototype.JO=function(e,t,i){var n=this,r=[e],o=e._mimeType===c.MimeType.AudioMp4?this.ZP(c.MimeType.VideoMp4):this.ZP(c.MimeType.AudioMp4);o&&this.DO&&r.push(o);var a=r.map(function(e){return n.UP(e,i).catch(function(i){var r;return i!==d.REPRESENTATION_UPDATE_CANCEL&&(n.context.logger.debug("Failed to rotate URL for rep ".concat(e._id,": ").concat(null!=(r=null==i?void 0:i.message)?r:i)),n.VP(e,t)),Promise.reject(i)})});return this.EO=!0,Promise.all(a).finally(function(){return n.EO=!1})},e.prototype.UP=function(e,t){var i=this,n=(0,u.getSourceStore)(this.context);if(!n)return Promise.resolve(e);this.YP(e,t,n);var r=(0,p.getManifest)(n.getState());if(!r)return Promise.resolve(e);var o=e._internalId,a=(0,l.findRepresentation)(r,o);return e.Uri===(null==a?void 0:a.Uri)?(this.context.logger.debug("Current ".concat(e._mimeType," rep ").concat(e._id," does not need update")),Promise.resolve(e)):(this.context.logger.debug("Rotating URL for rep ".concat(e._id," from ").concat(e.Uri," to ").concat(a.Uri)),this.WP(e).then(function(){return i.updateRepresentation(a)}).then(function(e){return i.XP(e),e}))},e.prototype.VP=function(e,t){var i=(0,u.getSourceStore)(this.context);i&&(this.YP(e,t,i),this.context.logger.debug("Restoring URL for rep ".concat(e._id," to ").concat(e.Uri)),this.XP(e))},e.prototype.WP=function(e){var t;return(null==(t=this.FO)?void 0:t.isLive())&&this.GO?this.GO.stopRepresentationUpdates(e):Promise.resolve()},e.prototype.XP=function(e){var t,i;(null==(t=this.FO)?void 0:t.isLive())&&(null==(i=this.GO)||i.scheduleRepresentationUpdate(e))},e.prototype.YP=function(e,t,i){var r,o=this;null==(r=this.FO)||r.getAllRepresentations().filter(function(t){return t._mimeType===e._mimeType}).forEach(function(r){var a,s,u,c,l=null!=(s=null==(a=o.backupStreamsMap[r._mimeType])?void 0:a[r._id])?s:{},d=null!=(u=r._name)?u:r._mimeType,p=null==(c=l[t])?void 0:c[d];if(p&&r.Uri!==p){var f=n(n({},r),{Uri:p,BaseURL:[{url:y(p,i.getState())}],SegmentList:r.SegmentList?[n(n({},r.SegmentList[0]),{SegmentURL:[]})]:r.SegmentList,_requestTimestamp:r._id!==e._id?0:r._requestTimestamp});i.dispatch((0,h.updateRepresentationAction)(f))}})},e.prototype.getNextLocationId=function(e,t){for(var i=Number(t)||0,n=1;n<=e.length;n++){var r=(i+n)%e.length;
1if(void 0===this.penalizedStreams[r])return String(r)}},e.prototype.ZP=function(e){var t,i,n=this.context.serviceManager.get(o.ServiceName.AdaptationService),r=null!=(t=null==n?void 0:n.getCurrentRepresentationId(e))?t:void 0;return null==(i=this.FO)?void 0:i.getRepresentationById(r)},e.prototype.getNextBackupUriForCodecProbing=function(e){var t,i,n,r,o,a=function(t){return Object.values(t).includes(e)},s=null!=(t=this.backupStreamInfo.find(function(e){return Object.values(e).some(a)}))?t:{},u=null!=(i=Object.keys(s).find(function(e){return a(s[e])}))?i:"",c=null!=(n=s[u])?n:{},l=null!=(r=Object.keys(c).find(function(t){return c[t]===e}))?r:"";return null==(o=b(s,l)[Number(u)+1])?void 0:o[l]},e.prototype.dispose=function(){this.penalizedStreams={}},e}()},40870:function(e,t,i){"use strict";var n=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(t,i)};return function(t,i){if("function"!=typeof i&&null!==i)throw TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.HlsContentSteeringHandler=void 0;var r=i(40306),o=i(3336),a=i(4129),s=i(77401),u=i(29669),c=i(89927),l=i(88844),d=i(58313),h=i(15617),p=i(23483);t.HlsContentSteeringHandler=function(e){function t(t,i,n,c){var l,d=e.call(this,t,i,n)||this;if(d.context=t,d.backupStreamInfo=i,d.updateRepresentation=n,d.defaultContentSteeringInfo=c,d.kP=function(){var e,t=null==(e=d.context.sourceContext.source.options)?void 0:e.manifestWithCredentials;d.iP.load(d.gP,u.HttpRequestMethod.GET,void 0,void 0,void 0,t).then(function(e){return d.lP(e)}).catch(function(e){var t;(null==e?void 0:e.message)===s.RequestError.Canceled||d.context.isDisposed||(d.context.logger.debug("Loading of the steering manifest failed",null!=(t=null==e?void 0:e.message)?t:e),d.jP())})},d.gP=null==(l=d.defaultContentSteeringInfo.attributes)?void 0:l["SERVER-URI"],!d.gP)throw new o.PlayerError(r.ErrorCode.SOURCE_MANIFEST_INVALID,{message:"The EXT-X-CONTENT-STEERING tag is missing the required SERVER-URI attribute."},"Invalid HLS manifest: missing required content steering SERVER-URI attribute.",d.context.sourceContext.sourceIdentifier);return d.iP=new a.DefaultContentLoader(d.context,{maxRetries:d.context.settings.MAX_MPD_RETRIES,requestType:u.HttpRequestType.MANIFEST_STEERING}),d.fP=2e3,d}return n(t,e),t.prototype.populateBackupStreamsMap=function(t){e.prototype.populateBackupStreamsMap.call(this,t),this.jP()},t.prototype.jP=function(){(0,l.clearTimeoutIfDefined)(this.eP),this.eP=window.setTimeout(this.kP,this.fP)},t.prototype.lP=function(e){if(!this.context.isDisposed){var t=(0,p.parseSteeringManifest)(e.body);if(!t)return this.context.logger.debug("Ignoring invalid steering manifest"),void this.jP();this.hP=t["PATHWAY-PRIORITY"];var i=t["RELOAD-URI"];i&&(this.gP=d.URLHelper.getAbsoluteUrl(i,e.url)),this.fP=(0,c.toMilliSeconds)(t.TTL),this.jP()}},t.prototype.getNextLocationId=function(e,t){var i,n,r=this;return(null!=(n=null!=(i=this.hP)?i:e)?n:[]).find(function(e){return!r.penalizedStream
vendor: 8,715 bytes, line 1
1s[e]&&e!==t})},t.prototype.dispose=function(){(0,l.clearTimeoutIfDefined)(this.eP),this.eP=void 0,this.iP.dispose(),e.prototype.dispose.call(this)},t}(h.HlsBackupStreamsHandler)},23483:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseSteeringManifest=function(e){if(e)try{var t=JSON.parse(e);if(!function(e){if("object"!=typeof e||null===e)return!1;var t=e,i=t.VERSION,n="number"==typeof i&&Number.isInteger(i)&&i>0,r=t["PATHWAY-PRIORITY"],o=Array.isArray(r)&&r.length>0&&r.every(function(e){return"string"==typeof e}),a=t.TTL,s="number"==typeof a&&a>0,u=t["RELOAD-URI"],c=void 0===u||"string"==typeof u&&u.length>0;return n&&o&&s&&c}(t))return;return t}catch(e){return}}},30234:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isValidHlsPlaylist=function(e){return(0,c.isMasterPlaylist)(e)&&function(e){return e.playlists.length>0}(e)||(0,c.isMediaPlaylist)(e)&&function(e){return e.segments.length>0}(e)},t.getPeriod=function(e){return(0,a.getManifest)(e.getState()).Period[0]},t.parseHlsManifest=d,t.ensureMasterPlaylist=function(e,t,i){return(0,c.isMasterPlaylist)(t)?Promise.resolve(t):(e.logger.debug("HLS manifest is not a master playlist but a variant. Using master playlist template!"),d(e,["#EXTM3U\n#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=0",i].join("\n")).then(function(e){if(!(0,c.isMasterPlaylist)(e))throw Error("Template is not of type HLS MasterPlaylist");return e}))},t.parsePlaylistInWorker=h,t.createDiscontinuitySequences=function(e,t){var i=c.PlaylistUtils.createDiscontinuitySequences(e,t);return i.forEach(function(e,t){c.PlaylistUtils.extrapolateProgramDateTime(e.segments),e.indexOfFirstSegment=0===t?0:i[t-1].indexOfLastSegment+1,e.indexOfLastSegment=e.indexOfFirstSegment+e.segments.length-1}),i},t.getTracksWithUnknownCodecs=function(e){return{audioTracksWithoutCodecs:e.media.filter(function(t){var i,n=t.attributes;if("AUDIO"!==n.TYPE||void 0===n.URI||void 0!==n.CODECS)return!1;var o=e.playlists.find(function(e){return e.attributes.AUDIO===n["GROUP-ID"]});if(void 0===o||o.uri===n.URI)return!1;var a=null==(i=o.attributes.CODECS)?void 0:i.split(",");return void 0===a||a.every(function(e){return!r.CodecStringHelper.isAudioCodec(e)})}),videoTracksWithoutCodecs:e.playlists.filter(function(e){return void 0===e.attributes.CODECS})}},t.updateMissingCodecsForPlaylists=function(e,t,i){!function(e,t){t.forEach(function(t){return t.attributes.CODECS=function(e,t){var i=Object.keys(r.CodecStringHelper.getExtractedCodecStrings(e)),n=r.CodecStringHelper.getExtractedCodecStrings(t),o=Object.keys(n).filter(function(e){return!i.includes(e)}).map(function(e){return n[e]}).join(",");return o&&0!==o.length?function(e,t){return"string"!=typeof e||0===e.length?t:e+","+t}(e,o):e}(t.attributes.CODECS,e)})}(e,p(t,i))},t.findAllOrMatchingVariants=p;var n=i(69957),r=i(34047),o=i(58313),a=i(62198),s=i(50962),u=i(37432),c=i(18146),l=i(97123);function d(e,t){var i={parsePartTags:(0,s.isLowLatencyConfigured)(e)&&e.settings.LL_HLS};return(e.settings.HLS_PARSE_MANIFEST_IN_WORKER?h(t,e.logger,i):function(e,t){try{(0,n.trackPerformanceStart)("HlsPlaylist.parsePlaylist");var i=(0,u.parsePlaylist)(e,t);return(0,n.trackPerformanceEnd)("HlsPlaylist.parsePlaylist"),Promise.resolve(i)}catch(e){return Promise.reject(e)}}(t,i)).then(function(t){if("playlists"in t){var i=t.playlists.filter(function(t){return t.attributes.BANDWIDTH>=e.settings.HLS_AUDIO_ONLY_THRESHOLD_BITRATE});t.playlists=i.length?i:t.playlists}return t})}function h(e,t,i){return l.WebWorkerParser.getInstance(t).parsePlaylist(e,i)}function p(e,t){var i,n=function(e){return e.playlists||[]}(e),r=n.some(function(e){return o.URLHelper.isSubUrl(t,e.uri)}),a=function(e,t){return(function(e){return e.media||[]})(e).find(function(e){var i;return o.URLHelper.isSubUrl(t,null==(i=e.attributes)?void 0:i.URI)})}(e,t);if(!r&&a){var s=null==(i=a.attributes)?void 0:i["GROUP-ID"];if(s)return n.filter(function(e){var t,i;return(null==(t=e.attributes)?void 0:t.AUDIO)===s||(null==(i=e.attributes)?void 0:i.VIDEO)===s})}return n}},56727:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HlsTimelineTracker=void 0;var n=i(80813),r=i(87827),o=i(15971),a=i(93204),s=i(90919),u=i(61895);function c(e,t,i,n){return{hasGap:e,gapSizeSec:t,couldHandle:i,correctedIndex:n}}function l(e){return e>=0&&isFinite(e)}function d(e,t,i){for(;e>.001;){if(i<=0)return -1;e-=t[i-1]._duration,i--}return i}function h(e,t,i){for(;e<-.001;)if(e+=t[i]._duration,++i>=t.length)return 1/0;return i}t.HlsTimelineTracker=function(){function e(e,t){var i=this;this.Ln=!1,this.En=e,this.Jn=-1,this.Fn=t,this.Gn=this.En.serviceManager.get(n.ServiceName.PlayerStateService),this.Hn=(0,a.subscribe)(this.En.store)(function(e){return(0,r.getTargetPlaybackTime)((0,r.getPlayerState)(e))},function(){return i.Kn=!0},function(e){return -1!==e});var s=(0,o.getSourceStore)(this.En);s&&(this.In=(0,a.subscribe)(s)(function(e){return e&&(0,u.getContentLocationId)((0,u.getHlsState)(e))},function(){return i.Ln=!0},function(e,t){return e!==t}))}return e.prototype.reset=function(){this.Jn=-1,this.Ln=!1},e.prototype.isGapVerificationNeeded=function(){return this.Ln&&-1!==this.Jn},e.prototype.isSeekTargetVerificationNeeded=function(){return this.Kn&&-1===this.Jn},e.prototype.trackPlaybackTime=function(e){var t,i=null==(t=e.getSegmentInfo())?void 0:t.duration,n=e.getDuration();this.Jn=e.getPlaybackTime()+Math.max(n,null!=i?i:n)},e.prototype.checkForTimelineGap=function(e,t,i){if(this.Jn>=0)return this.Ln=!1,this.Mn(e,t,i);var n,r=(null==(n=this.Gn)?void 0:n.seekingOrTimeshifting)?this.Gn.targetPlaybackTime:-1;return this.Kn&&r>-1?(this.Kn=!1,this.Nn(r,e,t,i)):{hasGap:!1}},e.prototype.Mn=function(e,t,i){var n,r=function(e,t){var i,n=null==(i=e.getSegmentInfo())?void 0:i.startTime,r=e.getPlaybackTime();return void 0===n||Math.abs(r-n)>e.getDuration()+t?r:Math.min(r,n)}(e,this.Fn);if(function(e,t,i){return e>=t&&e<=i}(this.Jn,r-this.Fn,r+e.getDuration()))return{hasGap:!1};var o={hasGap:!1},a=e.getPlaybackTime()-this.Jn,u=t.SegmentList?t.SegmentList[0].SegmentURL:[],p=(0,s.findSegmentUrlIndexWithinSegmentList)(e.getSegmentInfo(),u),f=p>=0?p:i,g=f;return a>0?((n=l(g=d(a,u,f)))||(this.En.logger.debug("Could not handle gap on playlist switch, reached lower boundary of segment list"),g=0),o=c(!0,a,n,g)):a<0&&((n=l(g=h(a,u,f)))||(this.En.logger.debug("Could not handle gap on playlist switch, reached upper boundary of segment list"),g=u.length),o=c(!0,a,n,g)),g===f&&o.hasGap&&(this.En.logger.debug("Ignoring gap as calculated new segment index did not change"),o.hasGap=!1),o},e.prototype.Nn=function(e,t,i,n){var r=i.SegmentList?i.SegmentList[0].SegmentURL:[],o=t.getPlaybackTime(),a=t.getPlaybackTime()+t.getDuration();this.En.logger.debug("HLS seek target verification",{seekTarget:e,segmentStartTime:o,segmentEndTime:a});var u,p,f,g=(0,s.findSegmentUrlIndexWithinSegmentList)(t.getSegmentInfo(),r);return g=g>=0?g:n,e<o?((f=l(u=d(p=o-e,r,g)))||(u=0),this.En.logger.debug("Target segment starts too late, corrected segment index from ".concat(g," to ").concat(u)),c(!0,p,f,u)):e>a?((f=l(u=h(p=a-e,r,g)))||(u=r.length),this.En.logger.debug("Target segment ends too early, corrected segment index from ".concat(g," to ").concat(u)),c(!0,p,f,u)):{hasGap:!1}},e.prototype.dispose=function(){var e;null==(e=this.In)||e.call(this),this.Hn(),this.Ln=!1,this.Kn=!1,this.Jn=-1},e}()},67113:function(e,t,i){"use strict";var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},r=this&&this.__spreadArray||function(e,t,i){if(i||2==arguments.length)for(var n,r=0,o=t.length;r<o;r++)!n&&r in t||(n||(n=Array.prototype.slice.call(t,0,r)),n[r]=t[r]);return e.concat(n||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.M3u8DashManifest=void 0;var o=i(56481),a=i(32703),s=i(77179),u=i(74853),c=i(79721),l=i(89927),d=i(58313),h=i(70850),p=i(13422),f=i(96533),g=i(59707),m=i(62198),y=i(5671),v=i(80813),S=i(85434),b=i(52610),E=i(42594),T=i(57778),_=i(18146),A=i(47596),P=i(73315),M=i(61895);t.M3u8DashManifest=function(){function e(e,t){this.rP=-1/0,this.mP=e,this.nP=t,this.oP=new T.M3u8Translator(e,t),this.pP=1/0,this.qP=e.serviceManager.get(v.ServiceName.SourceStoreService,t.sourceIdentifier)}return e.prototype.updateBaseUrl=function(e){this.oP.updateBaseUrl(e)},e.prototype.getBaseUrl=function(){return this.oP.getBaseUrl()},e.prototype.sP=function(){return(0,M.getHlsState)(this.qP.getState())},e.prototype.findAdaptationSet=function(e){return this.getManifest().Perio
1d[0].AdaptationSet.find(function(t){var i;return t._internalId.adaptationSetId===e||(null==(i=t.ContentComponent)?void 0:i.some(function(t){return t._id===e}))})},e.prototype.createDashManifestSkeleton=function(e){var t=this.oP.createDashManifestSkeleton(e);return t=(0,p.orderAdaptationSetsByCodec)(t,(0,f.getCodecPriorities)(this.mP.config,this.nP.source)),(0,f.initializeInternalIds)(t)},e.prototype.extractBackupStreams=function(e){return this.oP.extractBackupStreams(e)},e.prototype.onMasterPlaylistAvailable=function(e){var t=this.createDashManifestSkeleton(e);this.qP.dispatch((0,g.setManifestAction)(t)),this.qP.dispatch((0,P.setDefaultLanguages)(e)),this.qP.dispatch((0,P.setCustomTags)(e)),this.qP.dispatch((0,P.setMasterPlaylistString)(e.rawString))},e.prototype.getManifest=function(){return(0,m.getManifest)(this.qP.getState())},e.prototype.getAllVariantRepresentions=function(){return this.getManifest().Period[0].AdaptationSet.filter(function(e){return S.MimeTypeHelper.isAV(e._mimeType)||S.MimeTypeHelper.isSubtitle(e._mimeType)||S.MimeTypeHelper.isImage(e._mimeType)}).flatMap(function(e){return e.Representation})},e.prototype.onMediaLoaded=function(e,t,i){var n=this;this.qP.dispatch((0,P.setMasterPlaylistString)(e)),this.qP.dispatch((0,P.setEndlist)(!!i.endList)),i.playlistType&&!(0,M.getPlaylistType)(this.sP())&&this.qP.dispatch((0,P.setPlaylistType)(i.playlistType)),void 0===(0,M.getIsLowLatencyPlaylist)(this.sP())&&this.qP.dispatch((0,P.setIsLowLatencyPlaylist)(void 0!==i.partInfo)),this.EP(i),this.FP(i);var r=this.getManifest().Period[0],o=this.AP(t.Uri,r).map(function(e){return n.BP(e,i)});return S.MimeTypeHelper.isAV(t._mimeType)&&(this.yP(i,o),this.zP(i)),o.forEach(function(e){var t=n.wP(e,i);n.xP(r,t,!i.endList),n.tP(e),n.mP.settings.ENABLE_SEGMENT_INFO_PROVIDER_FROM_STORE&&n.uP(i,e)}),this.mP.serviceManager.maybeCall(v.ServiceName.TimedMetadataService,function(e){return(0,a.extractDateRangeMetadata)(i.dateRange,i.endList?i.programDateTime:void 0,function(t){e.processDateRangeEvent(t,c.DEFAULT_PERIOD_ID)})}),o.find(function(e){return e._id===t._id})},e.prototype.tP=function(e){var t,i=null==(t=e.ContentProtection)?void 0:t.map(function(e){return{_schemeIdUri:e._schemeIdUri,pssh:[],pro:[]}}),n=this.findAdaptationSet(e._internalId.adaptationSetId);if(n&&i&&i.some(function(e){var t;return!(null==(t=n.ContentProtection)?void 0:t.some(function(t){return t._schemeIdUri===e._schemeIdUri}))})){var o=n.ContentProtection?(0,h.removeDuplicates)(r(r([],n.ContentProtection,!0),i,!0)):i;this.qP.dispatch((0,g.updateAdaptationSetAction)(e._internalId,{ContentProtection:o}))}},e.prototype.uP=function(e,t){var i,n,r=t._internalId.key(),o=null==(i=this.qP.getState())?void 0:i.segmentInfoMap[r];o&&(n=(0,E.updateMapEntry)(o,e,t))||(n=(0,E.createNewMapEntry)(e,t),this.vP(n,e)),this.qP.dispatch((0,y.setSegmentInfos)(r,n))},e.prototype.vP=function(e,t){var i=this.qP.getState();if(i){var n=(0,A.getStartTimeExtrapolationReferencePoint)(e,t,i);(0,A.extrapolateStartTime)(e.segmentInfos,n)}},e.prototype.wP=function(e,t){var i,n,r,o=null!=(r=null==(n=null==(i=e.SegmentList)?void 0:i[0])?void 0:n.SegmentURL)?r:[];return o.length>0&&null!=o[0]._playbackTime?(0,M.getFirstDiscoSequenceTiming)(this.sP()).startTime:t.startTime},e.prototype.xP=function(e,t,i){var n=0===e.duration?this.pP:Math.min(e.duration,this.pP),r=i?1/0:n,o={start:t,_start:"PT".concat(t,"S"),duration:r,_duration:"PT".concat(n,"S")};this.qP.dispatch((0,g.updatePeriodTimingAction)(c.DEFAULT_PERIOD_ID,o))},e.prototype.yP=function(e,t){var i,n,r,o,a,s=e.totalDuration,u=null!=(i=t.find(function(t){return t.Uri===e.uri}))?i:t[0],c=null==(r=null==(n=null==u?void 0:u.SegmentList)?void 0:n[0])?void 0:r.SegmentURL,l=(null!=(o=null==c?void 0:c.length)?o:0)>0&&void 0!==(null==(a=null==c?void 0:c[0])?void 0:a._playbackTime);if(c&&l){var d=(0,b.getTimingInfoFromSegmentList)(c);s=d.totalDuration,this.qP.dispatch((0,P.setDiscoTimings)(u._mimeType,d.discoTimings))}this.pP=e.endList?Math.min(this.pP,s):s},e.prototype.zP=function(e){var t,i=!e.endList,n=(0,m.getManifest)(this.qP.getState()),r={_requestTimestamp:e.requestTimestamp,_type:i?"dynamic":"static",_mediaPresentationDuration:i?1/0:"PT".concat(this.pP,"S"),_maxSegmentDuration:"PT".concat(e.targetDuration,"S"),_hasIndependentSegments:n._hasIndependentSegments||e.independentSegments};e.start&&(e.start.timeOffset=_.PlaylistUtils.getStartOffsetCloseToPlaylistEnd(e,this.rP),this.rP=e.start.timeOffset,r._startOffset=_.PlaylistUtils.getStartOffset(e)),i&&(r._minimumUpdatePeriod="PT".concat(e.targetDuration,"S"),r._timeShiftBufferDepth=-this.pP,r._availabilityStartTime=null!=(t=n._availabilityStartTime)?t:new Date(e.requestTimestamp-(0,l.toMilliSeconds)(this.pP)).toISOString()),this.qP.dispatch((0,g.updateManifestAction)(r))},e.prototype.AP=function(e,t){return t.AdaptationSet.flatMap(function(t){return t.Representation.filter(function(t){return d.URLHelper.isSubUrl(e,t.Uri)})})},e.prototype.BP=function(e,t){var i=n({},e);return i._requestTimestamp=t.requestTimestamp,i._updateInterval=(0,_.calculateUpdateIntervalInSeconds)(this.mP,t),i._hls=n(n({},i._hls),{requestTimestamp:t.requestTimestamp,mediaSequence:t.mediaSequence,serverControl:t.serverControl,loadFailureReason:null}),t.partInfo&&(i._hls.partTargetDuration=t.partInfo.targetDuration),i.SegmentList=[n({},i.SegmentList[0])],i.SegmentList[0].SegmentURL=r([],i.SegmentList[0].SegmentURL,!0),this.CP(i,t),this.qP.dispatch((0,g.updateRepresentationAction)(i)),i},e.prototype.CP=function(t,i){var n;if(0!==i.segments.length){if(t.SegmentList){this.mP.logger.debug("Updating segment list for playlist ".concat(t._id));var o=this.DP(t,i);if(o.contentProtectionInfos.length>
vendor: 14,488 bytes, line 1
10){var a=e.contentProtectionToXmlJson(o.contentProtectionInfos);if((0,_.isDeltaPlaylist)(i)){var s=null!=(n=t.ContentProtection)?n:[];t.ContentProtection=(0,h.removeDuplicates)(r(r([],s,!0),a,!0))}else t.ContentProtection=a}var c=t.SegmentList[0].SegmentURL,l=o.entries,d=(0,_.calcNumberOfSegmentsToDrop)(c,l,i.skippedSegmentsCount);(0,u.removeEntriesFromStart)(c,d),(0,_.addNewSegments)(c,l),t.SegmentList[0]._duration=i.targetDuration,t.SegmentList[0]._timescale=1}}else this.mP.logger.debug("No segments for representation ".concat(t._id," in loaded playlist"))},e.prototype.DP=function(e,t){if(_.PlaylistUtils.isLive(t))return this.oP.translateSegmentList(e,t);var i=this.mP.serviceManager.maybeCall(v.ServiceName.ManifestCachingService,function(t){return t.getSegmentList(e.Uri)});if(i)return i;var n=this.oP.translateSegmentList(e,t);return this.mP.serviceManager.maybeCall(v.ServiceName.ManifestCachingService,function(t){return t.cacheSegmentList(n,e.Uri)}),n},e.prototype.EP=function(e){var t=e.segments[0];(null==t?void 0:t.dateTime)&&(e.programDateTime=(0,l.toSeconds)(t.dateTime.getTime()))},e.prototype.FP=function(e){var t=e.segments[0];e.endList?(e.startTime=(0,s.getStartTimeOffset)(this.qP.getState()),e.segments[0].startTime=e.startTime):t&&t.dateTime?(e.startTime=(0,l.toSeconds)(t.dateTime.getTime()),e.segments[0].startTime=e.startTime):e.startTime=(0,l.toSeconds)(e.requestTimestamp)-e.totalDuration},e.contentProtectionToXmlJson=function(e){return e.map(function(e){var t={_schemeIdUri:e.schemeIdUri};return e.defaultKid&&(t["_cenc:default_KID"]=e.defaultKid),e.pssh&&(t.pssh=[{__text:e.pssh}]),t})},e.prototype.dispose=function(){this.oP=(0,o.dispose)(this.oP)},e}()},14447:function(e,t,i){"use strict";var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.M3u8Loader=t.HlsQueryParamNames=void 0,t.getParsedManifest=w;var r,o=i(40306),a=i(3336),s=i(80813),u=i(56481),c=i(3714),l=i(4129),d=i(77401),h=i(57456),p=i(29669),f=i(98714),g=i(91678),m=i(33436),y=i(85434),v=i(89927),S=i(58313),b=i(14302),E=i(87222),T=i(36193),_=i(59707),A=i(60729),P=i(16661),M=i(15617),I=i(40870),R=i(30234),C=i(67113),O=i(95212),D=i(18146);function w(e,t,i){var n=i.url,r=i.manifestText,o=e.serviceManager.maybeCall(s.ServiceName.ManifestCachingService,function(e){return e.getParsedManifest(n)});return o?Promise.resolve(o):(0,R.parseHlsManifest)(e,r)}function N(e){return{url:e.url,statusCode:e.status,statusText:e.statusText}}!function(e){e.MediaSequenceNumber="_HLS_msn",e.PartIndex="_HLS_part",e.Skip="_HLS_skip"}(r||(t.HlsQueryParamNames=r={})),t.M3u8Loader=function(){function e(e,t){var i=this;this.Tn={},this.updateRepresentation=function(e){var t=i.tn(e,e.Uri);i.On.logger.debug("M3u8Loader: updateRepresentation (".concat(t,")"));var n=i.Tn[e._id];return i.vn(n,t).then(function(t){return i.qn(t,e)}).then(function(e){var t,r,o=i.xn(),a=!0===(null==(r=null==(t=i.On)?void 0:t.settings)?void 0:r.INFINITE_RETRIES_FOR_LIVE);return o&&a&&n.setResetRetriesWhenOffline(!0),e}).catch(function(t){return i.un(t,e)})},this.wn=function(e,t){i.Un||(i.Vn=t.name,i.On.logger.debug("Failed to load playlist: ".concat(e.url," - ").concat(t.name)))},this.On=e,this.Pn=t,this.Wn=[],this.Xn=[],this.Rn={},this.Un=!1,this.Zn=new C.M3u8DashManifest(e,t),this.Sn=this.yn(p.HttpRequestType.MANIFEST_HLS_MASTER),this.an=e.serviceManager.get(s.ServiceName.SourceStoreService,t.sourceIdentifier)}return e.prototype.load=function(e){var t=this;return this.Un=!1,this.Vn=null,this.vn(this.Sn,e).then(function(e){return t.bn(e)}).then(function(e){return t.Zn.updateBaseUrl(e.url),t.cn(e),t.hn(e)}).then(function(e){return t.pn(e),t.dn()}).then(function(){return t.Zn.getManifest()}).catch(function(e){var i=e instanceof Error?e.message:void 0;return t.Un||i===d.RequestError.Canceled?Promise.reject():e instanceof a.PlayerError||e instanceof Error?Promise.reject(e):Promise.reject(t.zn(e))}).finally(function(){var e;return null==(e=t.Yn)?void 0:e.signalLoadingFinished()})},e.prototype.bn=function(e){var t=this;if(this.Un)return Promise.reject(Error("The loading of the HLS source was cancelled."));var i=e.body;if(void 0===i)return Promise.reject(Error("Cannot parse the playlist: content is empty."));var r={manifestText:i,url:e.url};return w(this.On,this.Pn,r).then(function(i){return(0,R.isValidHlsPlaylist)(i)?(t.gn(e,i),(0,R.ensureMasterPlaylist)(t.On,i,e.url)):Promise.reject(Error("Cannot parse master playlist: invalid format."))}).then(function(t){return n(n({},t),{rawString:i,url:e.url})}).catch(function(e){return Promise.reject(new a.PlayerError(o.ErrorCode.SOURCE_MANIFEST_INVALID,{errorMessage:e.message},"HLS manifest is not a valid M3U playlist",t.Pn.sourceIdentifier))})},e.prototype.cn=function(e){var t=this.Zn.extractBackupStreams(e);if(!t.every(function(e){return Object.keys(e).length<=1})){var i=e.tags.find(function(e){return"EXT-X-CONTENT-STEERING"===e.name});this.Yn=i&&this.On.settings.ENABLE_HLS_CONTENT_STEERING?new I.HlsContentSteeringHandler(this.On,t,this.updateRepresentation,i):new M.HlsBackupStreamsHandler(this.On,t,this.updateRepresentation)}},e.prototype.dn=function(){var e=this,t=this.an.getState(),i=this.Zn.getManifest().Period[0],n=(0,E.findAdaptationSetOfMimeType)(y.MimeType.VideoMp4,i,{sourceState:t}),r=(0,E.findAdaptationSetOfMimeType)(y.MimeType.AudioMp4,i,{sourceState:t,playbackConfig:this.On.config.playback}),s=[];return n&&s.push(this.en(n)),r&&s.push(this.en(r)),Promise.all(s).catch(function(t){return t instanceof a.PlayerError?Promise.reject(t):e.Vn===d.RequestError.TimedOut||t===d.RequestError.TimedOut?Promise.reject(new a.PlayerError(o.ErrorCode.NETWORK_MANIFEST_DOWNLOAD_TIMEOUT,{error:t},"Failed to load the HLS variant playlists: the request timed out.",e.Pn.sourceIdentifier)):Promise.reject(new a.PlayerError(o.ErrorCode.SOURCE_HLS_STREAM_ERROR,{error:t},"There was an error while retrieving the variant playlists.",e.Pn.sourceIdentifier))})},e.prototype.en=function(e){var t=this,i=this.fn(e.Representation,e._mimeType,e);if(!i){var n="No ".concat(e._mimeType," variants/renditions available");return this.On.logger.log(n),Promise.reject(new a.PlayerError(o.ErrorCode.SOURCE_MANIFEST_INVALID,{reason:n},n,this.Pn.sourceIdentifier))}return this.updateRepresentation(i).then(function(e){return t.an.dispatch((0,f.setPreferredBitrateForMimeTypeAction)(i._mimeType,i._bandwidth)),t.an.dispatch((0,T.setRepresentationIdAction)(i._internalId)),e}).catch(function(n){var r,o;return t.On.logger.debug("Representation ".concat(i._id," failed, dropping it"),null!=(r=null==n?void 0:n.message)?r:n),e.Representation=e.Representation.filter(function(e){return e!==i}),e.Representation.length>0?t.en(e):(t.On.logger.log("All ".concat(e._mimeType," variants/renditions failed"),null!=(o=null==n?void 0:n.message)?o:n),Promise.reject(n))})},e.prototype.fn=function(e,t,i){return this.On.serviceManager.maybeCall(s.ServiceName.AdaptationService,function(n){n.setAdaptationSetId(i._mimeType,i._internalId);var r=n.selectRepresentation(t,{},e);return e.find(function(e){return e._internalId.equals(r)})})},e.prototype.updateAdaptationSet=function(e){var t=this,i=this.Zn.findAdaptationSet(e);return i?Promise.all(i.Representation.map(function(e){var i=t.yn(p.HttpRequestType.MANIFEST_HLS_VARIANT);return t.vn(i,e.Uri).then(function(i){return t.qn(i,e)}).then(function(e){t.an.dispatch((0,_.updateRepresentationAction)(e))})})):Promise.reject("Could not find data")},e.prototype.gn=function(e,t){this.On.serviceManager.maybeCall(s.ServiceName.ManifestCachingService,function(i){i.cacheHttpResponse(e,e.url),i.cacheParsedManifest(t,e.url)})},e.prototype.hn=function(e){var t=this,i=(0,R.getTracksWithUnknownCodecs)(e),n=i.audioTracksWithoutCodecs,r=i.videoTracksWithoutCodecs;return 0===n.length&&0===r.length?Promise.resolve(e):(this.On.logger.debug("Codecs are missing in master playlist - probing them from segments now"),this.nn(e,n).then(function(){return t.on(e,r)}).then(function(){return e}).catch(function(e){if(e instanceof a.PlayerError)return Promise.reject(e);var i,n="Codec verification failed",r=null!=(i=null==e?void 0:e.message)?i:e;t.On.logger.debug(n,e);var s=t.Vn===d.RequestError.TimedOut?o.ErrorCode.NETWORK_MANIFEST_DOWNLOAD_TIMEOUT:o.ErrorCode.SOURCE_MANIFEST_INVALID;return Promise.reject(new a.PlayerError(s,{reason:r},n,t.Pn.sourceIdentifier))}))},e.prototype.jn=function(e,t){var i=this,n=e.url,r=e.body;if(void 0===r)return Promise.reject("Cannot parse codec, empty manifest response");var o={url:t,manifestText:r};return w(this.On,this.Pn,o).then(function(r){var o=(0,D.calculateUpdateIntervalInSeconds)(i.On,r),a=Date.now()+(0,v.toMilliSeconds)(o);i.On.serviceManager.maybeCall(s.ServiceName.ManifestCachingService,function(t){t.cacheHttpResponse(e,n,a),t.cacheParsedManifest(r,n,a)});var u=r.segments,c=D.PlaylistUtils.isLive(r),l=r.mediaSequence,d=D.PlaylistUtils.getBaseUrl(i.Zn.getBaseUrl(),t);return new P.CodecDetector(i.On).probeCodecs(u,c,d,l)})},e.prototype.kn=function(e){var t=e.map(function(e,t){return{bitrate:e.attributes.BANDWIDTH,id:t}});return this.On.serviceManager.maybeCall(s.ServiceName.AdaptationService,function(i){return e[i.selectQualityBasedOnBitrateMeasurement(t).id]})},e.prototype.ln=function(e,t){var i=this,n=new l.DefaultContentLoader(this.On,{requestType:p.HttpRequestType.MANIFEST_HLS_VARIANT,onFailure:this.wn});return this.mn(n,e).then(function(t){return i.jn(t,e)}).then(function(i){return(0,R.updateMissingCodecsForPlaylists)(i,t,e)})},e.prototype.mn=function(e,t){var i=this;return this.vn(e,t).catch(function(n){i.On.logger.debug("Representation failed to load during codec probing ".concat(t));var r,o=null==(r=i.Yn)?void 0:r.getNextBackupUriForCodecProbing(t);return o?(i.On.logger.debug("Attempting to continue codec probing using backup stream ".concat(o)),i.mn(e,o)):Promise.reject(n)})},e.prototype.nn=function(e,t){var i=this,n=t.shift();if(!(null==n?void 0:n.attributes.URI))return Promise.resolve();var r=S.URLHelper.getAbsoluteUrl(n.attributes.URI,this.Zn.getBaseUrl());return this.ln(r,e).then(function(){return i.nn(e,t)})},e.prototype.on=function(e,t){if(0===t.length)return Promise.resolve();var i=this.kn(t),n=S.URLHelper.getAbsoluteUrl(i.uri,this.Zn.getBaseUrl());return this.ln(n,e)},e.prototype.pn=function(e){var t,i=this;void 0===this.Qn&&(this.Qn=e),this.Zn.onMasterPlaylistAvailable(e);var n=this.Zn.getAllVariantRepresentions();n.forEach(function(e){i.Tn[e._id]=i.yn(p.HttpRequestType.MANIFEST_HLS_VARIANT)}),null==(t=this.Yn)||t.populateBackupStreamsMap(n)},e.prototype.qn=function(e,t){var i=this;if(this.Un)return Promise.reject(b.REPRESENTATION_UPDATE_CANCEL);var n=e.url,u=e.body;if(!u)return Promise.reject(new a.PlayerError(o.ErrorCode.SOURCE_MANIFEST_INVALID,void 0,"Cannot parse the playlist: the body of the response is empty.",this.Pn.sourceIdentifier));var c=Date.now(),l={url:n,manifestText:u};return w(this.On,this.Pn,l).then(function(l){l.uri=(0,S.removeQueryParameters)(n,Object.values(r)),l.requestTimestamp=c;var d,h,p=O.M3u8Validator.checkForError(l);if(p)return Promise.reject(new a.PlayerError(o.ErrorCode.SOURCE_MANIFEST_INVALID,{M3u8ValidatorError:p},"The parsed media playlist is invalid: ".concat(p),i.Pn.sourceIdentifier));l.start=null!=(d=l.start)?d:i.Qn.start;var f=t._mimeType;i.Rn[f]=(0,R.createDiscontinuitySequences)(l,null!=(h=i.Rn[f])?h:[]);var y=i.rn(i.Rn[f],!D.PlaylistUtils.isLive(l));l.segments=y.flatMap(function(e){return e.segments});var b=i.Zn.onMediaLoaded(u,t,l);D.PlaylistUtils.isLive(l)||i.On.serviceManager.maybeCall(s.ServiceName.ManifestCachingService,function(t){t.cacheHttpResponse(e,n),t.cacheParsedManifest(l,n)});var E=(0,v.toSeconds)(Date.now()-c);return i.On.store.dispatch((0,g.addMetricsValue)("default",m.MetricType.ProcessingTime,E)),i.On.logger.insane("Parsed playlist in: ".concat(null==E?void 0:E.toFixed(2))),b}).catch(function(e){if(e instanceof a.PlayerError)return Promise.reject(e);var t="Failed to parse the media playlist",n=e instanceof Error?e.message:t;return Promise.reject(new a.PlayerError(o.ErrorCode.SOURCE_MANIFEST_INVALID,{errorMessage:n},t,i.Pn.sourceIdentifier))})},e.prototype.rn=function(e,t){return e.filter(function(i,n){var r=!t&&n===e.length-1,o=i.segments.reduce(function(e,t){return e+t.duration},0);return!!(0===n&&o>0||r)||o>0})},e.prototype.stop=function(){var e=this;this.Wn.forEach(function(t){return e.On.eventHandler.off(c.PlayerEvent.Play,t)}),this.Xn.forEach(function(t){return e.On.eventHandler.off(c.PlayerEvent.Paused,t)}),this.Wn=[],this.Xn=[],this.sn(),this.Un=!0},e.prototype.sn=function(){var e=this;this.Sn.cancel(),Object.keys(this.Tn).forEach(function(t){e.Tn[t].dispose(),delete e.Tn[t]})},e.prototype.stopRepresentationUpdate=function(e){var t,i=this.Tn[e._id];return(null==i?void 0:i.isLoading())?(this.On.logger.debug("M3u8Loader: stopping ongoing representation update (".concat(e.Uri,")")),i.cancel(),(null!=(t=i.getResponse())?t:Promise.resolve()).catch(function(){}).then(function(){})):Promise.resolve()},e.prototype.tn=function(e,t){var i,n={},o=(0,D.getLastMediaSequenceAndPartIndex)(e);return(0,A.isPlayingLowLatencyHls)(this.On)&&(0,D.canMakeBlockingPlaylistReload)(e,this.On.settings)&&o&&(n[r.MediaSequenceNumber]=String(o.mediaSequence),n[r.PartIndex]=String(o.partIndex+1)),(null==(i=this.On.config.live)?void 0:i.incrementalManifestUpdates)&&(0,D.canPerformDeltaUpdate)(e)&&(n[r.Skip]=(0,D.isDeltaUpdateV2Supported)(e)?"v2":"YES"),S.URLHelper.appendQueryParametersToUrl(t,n)},e.prototype.un=function(e,t){var i,n=this;return this.Un||(null==e?void 0:e.message)===d.RequestError.Canceled?Promise.reject(b.REPRESENTATION_UPDATE_CANCEL):(this.On.logger.debug("M3u8Loader: updateRepresentation failed (".concat(t.Uri,")"),null!=(i=null==e?void 0:e.message)?i:e),this.switchToBackupStream(t).then(function(e){var t;return e[0]||Promise.reject(null!=(t=n.Vn)?t:d.RequestError.Failed)}).catch(function(t){return n.Vn===d.RequestError.TimedOut?Promise.reject(d.RequestError.TimedOut):Object.values(M.BackupStreamErrors).includes(t)&&e instanceof a.PlayerError?Promise.reject(e):Promise.reject(t===b.REPRESENTATION_UPDATE_CANCEL?t:d.RequestError.Failed)}))},e.prototype.switchToBackupStream=function(e,t){return this.Yn?this.Yn.switchToBackupStream(e,t):Promise.reject(M.BackupStreamErrors.NO_BACKUP_STREAMS)}
1,e.prototype.isSwitchingToBackupStreams=function(){var e,t;return null!=(t=null==(e=this.Yn)?void 0:e.isCurrentlySwitchingToBackupStreams())&&t},e.prototype.vn=function(e,t){if(!t){var i,n=new a.PlayerError(o.ErrorCode.SOURCE_INVALID,void 0,"Cannot load the playlist: no URL was provided.",this.Pn.sourceIdentifier);return this.On.eventHandler.fireError(n),Promise.reject(n)}var r=this.On.serviceManager.maybeCall(s.ServiceName.ManifestCachingService,function(e){return e.getHttpResponse(t)});if(r)return Promise.resolve(r);var u=null==(i=this.Pn.source.options)?void 0:i.manifestWithCredentials;return e.load(t,p.HttpRequestMethod.GET,null,null,null,u)},e.prototype.xn=function(){return this.On.serviceManager.maybeCall(s.ServiceName.ManifestService,function(e){return e.isLive()},!1,this.On.sourceContext.sourceIdentifier)},e.prototype.yn=function(e){var t,i,n=this,r=!0===(null==(i=null==(t=this.On)?void 0:t.settings)?void 0:i.INFINITE_RETRIES_FOR_LIVE),o=this.xn();return new l.DefaultContentLoader(this.On,{onSuccess:function(e,t){var i,r;n.Vn=null,(0,h.isDownloadTimeInformationValid)(e)&&(n.On.logger.debug("Downloaded playlist in: ".concat(null==(i=e.elapsedTime)?void 0:i.toFixed(2),", TTFB: ").concat(null==(r=e.timeToFirstByte)?void 0:r.toFixed(2))),n.On.store.dispatch((0,g.addMetricsValue)("default",m.MetricType.DownloadInformation,{bytes:e.length,time:e.elapsedTime,timeToFirstByte:e.timeToFirstByte})))},onFailure:this.wn,maxRetries:this.On.settings.MAX_MPD_RETRIES,requestType:e,resetRetriesWhenOffline:o&&r})},e.prototype.zn=function(e){if(this.Vn===d.RequestError.TimedOut)return new a.PlayerError(o.ErrorCode.NETWORK_MANIFEST_DOWNLOAD_TIMEOUT,N(e),"Failed to load HLS playlist: the request timed out.",this.Pn.sourceIdentifier);var t=(null==e?void 0:e.status)===XMLHttpRequest.UNSENT?"Failed to load the HLS playlist due to CORS restrictions or because the client is offline.":"Failed to load HLS playlist: ".concat(null==e?void 0:e.status," ").concat(null==e?void 0:e.statusText,".");return new a.PlayerError(o.ErrorCode.SOURCE_COULD_NOT_LOAD_MANIFEST,N(e),t,this.Pn.sourceIdentifier)},e.prototype.dispose=function(){var e,t=this;this.stop(),this.Zn=(0,u.dispose)(this.Zn),this.Qn=null,this.Vn=null,this.Sn.dispose(),null==(e=this.Yn)||e.dispose(),Object.keys(this.Tn).forEach(function(e){return t.Tn[e].dispose()}),this.Tn=null},e}()},36848:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.uniqueRenditions=function(e){var t=[];return e.forEach(function(e){var i=t.findIndex(function(t){return(0,n.compareValues)(e,t,["GROUP-ID","NAME","TYPE"])});if(-1!==i){var r=t[i];"YES"===e.DEFAULT&&"YES"!==r.DEFAULT&&(t[i]=e)}else t.push(e)}),t};var n=i(19541)},17051:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.M3u8RepresentationFactory=void 0;var n=i(66790),r=i(44468),o=i(34047),a=i(68922),s=i(58313),u=i(92778),c=i(18146);t.M3u8RepresentationFactory=function(){function e(e,t){this.peb=e,this.qeb=t}return e.prototype.create=function(e,t,i,r,o){if(void 0===o&&(o=!0),!e)return null;var a=this.reb(e,r);if(t===n.RepresentationType.AUDIO)a=this.teb(e,a,i,r);else if(t===n.RepresentationType.VIDEO)a=this.seb(e,a,i,r,o);else{if(t!==n.RepresentationType.SUBTITLE)return null;a=this.ueb(e,a,i,r)}var s=this.veb(a);return s&&(a._label=s),a},e.prototype.reb=function(e,t){var i=e.uri||e.URI;i&&!s.URLHelper.isUrlAbsolute(i)&&(i=s.URLHelper.concatBaseUrlWithPartial(t,i));var n={_id:"",_mimeType:"",_bandwidth:0,_codecs:"",_hls:{requestTimestamp:0},BaseURL:null,SegmentList:[{SegmentURL:[],entries:[],totalDuration:0}],Uri:i};return e.NAME&&(n._label=e.NAME),n},e.prototype.seb=function(e,t,i,n,r){var a=t;if(a._mimeType="video/"+i,a._width=0,a._height=0,a.BaseURL=[{url:c.PlaylistUtils.getBaseUrl(n,e.uri)}],a._bandwidth=e.attributes["AVERAGE-BANDWIDTH"]||e.attributes.BANDWIDTH,a._bandwidth||(a._bandwidth=this.peb.settings.MIN_SELECTABLE_VIDEO_BITRATE),a._bandwidth=Number(a._bandwidth),e.attributes.CODECS){var s=o.CodecStringHelper.getExtractedCodecStrings(e.attributes.CODECS);o.CodecStringHelper.hasOldAvc1CodecFormat(s.video)&&(s.video=o.CodecStringHelper.convertAvc1ToAvcotiCodecFormat(s.video)),r?s.video&&s.audio?a._codecs=s.video+","+s.audio:s.video&&!s.audio?a._codecs=s.video:!s.video&&s.audio&&(a._codecs=s.audio):a._codecs=s.video}return e.attributes["FRAME-RATE"]&&(a._frameRate=parseFloat(e.attributes["FRAME-RATE"])),e.attributes.RESOLUTION&&(a._width=e.attributes.RESOLUTION.width,a._height=e.attributes.RESOLUTION.height,a._id+=e.attributes.RESOLUTION.height+"_"),a._id+=e.attributes.BANDWIDTH,a},e.prototype.teb=function(e,t,i,n){var r,o,a,s=t;if(s._id=e.NAME+" "+e["GROUP-ID"]||"",s._mimeType="audio/"+i,s._codecs=e.CODECS||(null==(r=e.attributes)?void 0:r.CODECS),s._name=e.NAME||"",s._groupId=e["GROUP-ID"]||"",s._label=s._name+" "+s._groupId,s._bandwidth=null!=(a=null!=(o=e["AVERAGE-BANDWIDTH"])?o:e.BANDWIDTH)?a:0,s.BaseURL=[{url:c.PlaylistUtils.getBaseUrl(n,e.URI||e.uri)}],e.CHANNELS){var l=e.CHANNELS.split("/")[0];s.AudioChannelConfiguration=[{_schemeIdUri:u.DashSchemeUri.AudioChannelConfig,_value:l}]}return s},e.prototype.ueb=function(e,t,i,n){var r=t;return r._id=e.NAME,r._mimeType="application/"+i,r._codecs="wvtt",r._name=e.NAME||"",r.BaseURL=[{url:c.PlaylistUtils.getBaseUrl(n,e.URI)}],r._hls.isForced="YES"===e.FORCED,r},e.prototype.veb=function(e){var t={id:e._id,mimeType:e._mimeType,width:e._width,height:e._height,bitrate:e._bandwidth};return(0,a.applyLabeling)({source:this.qeb.source,context:this.peb,streamType:r.StreamType.Hls,labelingType:a.LabelingType.Qualities},t)},e}()},42594:function(e,t,i){"use strict";var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},r=this&&this.__spreadArray||function(e,t,i){if(i||2==arguments.length)for(var n,r=0,o=t.length;r<o;r++)!n&&r in t||(n||(n=Array.prototype.slice.call(t,0,r)),n[r]=t[r]);return e.concat(n||Array.prototype.slice.call(t))};
vendor: 16,029 bytes, line 1
1Object.defineProperty(t,"__esModule",{value:!0}),t.createNewMapEntry=s,t.updateMapEntry=function(e,t,i){var o=e.segmentInfos,c=o.findIndex(function(e){return function(e,t){var i=e.url===t.uri,n=e.discontinuitySequenceNumber===t.discontinuitySequenceNumber,r=!e.byteRange&&!t.byterange,o=e.byteRange&&t.byterange&&e.byteRange.start===t.byterange.offset&&e.byteRange.end===t.byterange.offset+t.byterange.length;return i&&n&&(o||r)}(e,t.segments[0])});if(-1===c)return s(t,i);var l=o.length-c,d=t.segments.length-l;if(0!==c||0!==d){var h=t.segments.slice(-d).map(function(e){return u(e,i)}),p=function(e){var t=e[e.length-1];if(void 0!==t.startTime&&void 0!==t.duration)return t.startTime+t.duration}(o);return null!=p&&(0,a.forwardExtrapolateSegmentStartTime)(h,{index:0,startTime:p}),{qualityInfo:n(n({},e.qualityInfo),{lastUpdateTimestamp:Date.now()}),segmentInfos:r(r([],o.slice(c),!0),h,!0)}}return e};var o=i(23068),a=i(47596);function s(e,t){var i=e.segments.map(function(e){return u(e,t)});return{qualityInfo:{lastUpdateTimestamp:Date.now()},segmentInfos:i}}function u(e,t){var i,n={url:e.uri,isInitSegment:!1,internalRepresentationId:t._internalId,isDiscontinuityStart:e.discontinuity,discontinuitySequenceNumber:e.discontinuitySequenceNumber,duration:e.duration,startTime:e.startTime,periodId:t._internalId.periodId,key:e.key,metadata:null!=(i=e.metadata)?i:[],mimeType:t._mimeType,bitrate:t._bandwidth,codecs:t._codecs};return e.byterange&&(n.byteRange={start:e.byterange.offset,end:e.byterange.offset+e.byterange.length}),e.init&&(n.init=e.init),e.dateTime&&(n.dateTime=e.dateTime),(0,o.isVideoRepresentation)(t)&&(n.height=t._height,n.width=t._width,n.frameRate=t._frameRate),n}},57778:function(e,t,i){"use strict";var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.HlsParsing=t.M3u8Translator=void 0;var r,o=i(66790),a=i(34047),s=i(79721),u=i(84568),c=i(85434),l=i(89927),d=i(58313),h=i(70850),p=i(88052),f=i(62756),g=i(34795),m=i(47151),y=i(36848),v=i(17051),S=i(18146),b=new RegExp(/^data:text\/plain.*;base64.*,(.+)/);function E(e){return"AUDIO"===e.TYPE}function T(e,t){var i,n,r,o,a=e.attributes.BANDWIDTH===t.attributes.BANDWIDTH,s=(null==(i=e.attributes.RESOLUTION)?void 0:i.height)===(null==(n=t.attributes.RESOLUTION)?void 0:n.height)&&(null==(r=e.attributes.RESOLUTION)?void 0:r.width)===(null==(o=t.attributes.RESOLUTION)?void 0:o.width),u=e.attributes.CODECS===t.attributes.CODECS;return a&&s&&u}function _(e,t,i,n){t&&i&&t!==i&&(e[n?t:i]=!0)}function A(e,t,i){var n,r;return i&&null!=(r=null==(n=null==e?void 0:e.attributes)?void 0:n["PATHWAY-ID"])?r:String(Object.keys(t).length)}function P(e,t,i){void 0!==i&&(e[t]=i)}t.M3u8Translator=function(){function e(e,t){this.l7=0,this.m7=!1,this.V8=(0,u.memoize)(function(e){var t=b.exec(e);return null!==t&&2===t.length?t[1]:null}),this.i7=e,this.j7=t,this.k7=new v.M3u8RepresentationFactory(e,t)}return e.prototype.updateBaseUrl=function(e){this.n7=d.URLHelper.removeLastPathPart(e)},e.prototype.getBaseUrl=function(){var e;return null!=(e=this.n7)?e:""},e.prototype.o7=function(e,t){for(var i={},n={_schemeIdUri:"urn:scte:dash:cc:cea-"+t+":2015",_value:""},r=0;r<e.length;r++){var o=e[r]["INSTREAM-ID"];i[o]={lang:e[r].LANGUAGE||e[r].NAME||o,label:e[r].NAME||e[r].LANGUAGE||o},n._value.length>0&&(n._value+=";"),n._value+="708"===t?o.substring(7)+"=lang:":o+"=",n._value+=e[r].LANGUAGE}return{closedCaptionLabel:i,accessibility:n}},e.prototype.p7=function(e){if(!e)return{closedCaptionLabel:null,accessibility:[]};var t=this.o7(e.cea608,"608"),i=this.o7(e.cea708,"708"),n=[],r=null;return t.accessibility._value&&(n.push(t.accessibility),r=t.closedCaptionLabel),i.accessibility._value&&n.push(i.accessibility),{closedCaptionLabel:r,accessibility:n}},e.prototype.q7=function(e,t,i,n,r){for(var a=[],s=1/0,u=0,c=1/0,l=0,d=1/0,h=0,p="video/"+n,f=0,g=e;f<g.length;f++){var y=g[f];if(y.uri){var v=this.k7.create(y,o.RepresentationType.VIDEO,n,this.n7,this.m7);a.push(v),s=Math.min(s,v._height),u=Math.max(u,v._height),c=Math.min(c,v._width),l=Math.max(l,v._width),d=Math.min(d,v._bandwidth),h=Math.max(h,v._bandwidth)}}a.sort(function(e,t){return e._bandwidth-t._bandwidth});var S={Representation:a,ContentComponent:[{_id:"video",_contentType:"video"}],_id:String(this.l7),_group:null,_mimeType:p,_internalId:new m.AdaptationSetId(i,String(this.l7++)),_minBandwidth:d,_maxBandwidth:h,_minHeight:s,_maxHeight:u,_minWidth:c,_maxWidth:l,isTransmuxingRequired:!0};r&&Object.keys(r).forEach(function(e){r[e].entries.filter(function(e){return!e.URI}).forEach(function(e){S.ContentComponent.push({_id:e.NAME,_contentType:"audio",_lang:e.LANGUAGE})})});var b=this.p7(t);b.closedCaptionLabel&&(S.ClosedCaptionLabels=b.closedCaptionLabel),b.accessibility.length>0&&(S.Accessibility=b.accessibility);var E=this.E8(S);return E&&"string"==typeof E&&(S._label=E),S},e.prototype.r7=function(e,t,i,n){for(var r=[],a=0,s=e;a<s.length;a++){var u=s[a];if(u.uri){var c=this.k7.create(u,o.RepresentationType.AUDIO,n,this.n7,this.m7);r.push(c)}}r.sort(function(e,t){return e._bandwidth-t._bandwidth});var l={Representation:r,_id:String(this.l7),_group:null,_mimeType:"audio/"+n,_internalId:new m.AdaptationSetId(i,String(this.l7++)),_minBandwidth:1/0,_maxBandwidth:0,isTransmuxingRequired:!0},d=this.p7(t);d.closedCaptionLabel&&(l.ClosedCaptionLabels=d.closedCaptionLabel),d.accessibility.length>0&&(l.Accessibility=d.accessibility);var h=this.E8(l);return h&&"string"==typeof h&&(l._label=h),l},e.prototype.C8=function(e,t,i){var n=this,r=this.i7.settings.IGNORE_HLS_AUDIO_GROUPS,a=0,s=[],u=function(t){return{Representation:[],_id:String(n.l7),_internalId:new m.AdaptationSetId(e,String(n.l7++)),_mimeType:"audio/"+i,_minBandwidth:1/0,_maxBandwidth:-1,_lang:t,_group:String(a++),isTransmuxingRequired:!0}};return Object.keys(t).forEach(function(e){var a,c,l,d=t[e],h=d.entries.find(function(e){return e.LANGUAGE&&"und"!==e.LANGUAGE});h&&(c=h.LANGUAGE),r||(l=u(c));for(var p=(0,y.uniqueRenditions)(d.entries.filter(function(e){return e.URI})),f=0,g=p;f<g.length;f++){var m=g[f];r&&(l=u(c));var v=n.k7.create(m,o.RepresentationType.AUDIO,i,n.n7,n.m7);l.Representation.push(v),l._minBandwidth=Math.min(l._minBandwidth,v._bandwidth),l._maxBandwidth=Math.max(l._maxBandwidth,v._bandwidth);var S=m.CHARACTERISTICS;if(S&&0===S.indexOf(n.i7.settings.HLS_VR_CHARACTERISTICS_UTI)&&(l.Role=[{_schemeIdUri:n.i7.settings.VR_SCHEME_ID_URI,_value:S.substring(n.i7.settings.HLS_VR_CHARACTERISTICS_UTI.length)}]),!l._label){var b=n.E8(l);b&&"string"==typeof b?l._label=b:v._name?l._label=v._name:l._label=e}r&&l.Representation.length>0&&s.push(l),l.Representation.sort(function(e,t){return e._bandwidth-t._bandwidth})}!function(e){e.forEach(function(e,t){e._bandwidth=128e3+32e3*t})}(null!=(a=null==l?void 0:l.Representation)?a:[]),!r&&l.Representation.length>0&&s.push(l)}),s},e.prototype.D8=function(e,t,i){var n=this,r=0;return Object.values(t).filter(function(e){return e.URI}).map(function(t){var a={Representation:[],_id:String(n.l7),_internalId:new m.AdaptationSetId(e,String(n.l7++)),_mimeType:"application/mp4",_lang:t.LANGUAGE,_group:""+r++,_isFragmented:!0},s=n.k7.create(t,o.RepresentationType.SUBTITLE,i,n.n7,n.m7);a.Representation.push(s);var u=n.E8(a);return u&&"string"==typeof u?a._label=u:s._name?a._label=s._name:a._label=t.LANGUAGE,a})},e.prototype.E8=function(e){var t={mimeType:e._mimeType,lang:e._lang};return e._label&&(t.label=e._label),this.F8()(t)},e.prototype.F8=function(){var e,t=this.i7.sourceContext,i=t&&t.source&&t.source.labeling;return(null==(e=null==i?void 0:i.hls)?void 0:e.tracks)?"function"!=typeof i.hls.tracks?this.G8:(0,h.safeUserCallback)(function(){return i.hls.tracks},this.i7.logger):this.G8},e.prototype.G8=function(){return null},e.prototype.extractBackupStreams=function(e){for(var t,i=[],n=null!=(t=this.n7)?t:"",r=e.playlists,o={},a=this.i7.settings.ENABLE_HLS_CONTENT_STEERING,s=A(e.tags.find(function(e){return"EXT-X-CONTENT-STEERING"===e.name}),{},a),u=0;u<r.length;u++){var c={},l=r[u],d=A(l,c,a);this.H8(c,l,e.media,n,d);for(var h=u+1;h<r.length;h++){var p=r[h];if(T(l,p)){var f=A(p,c,a);this.H8(c,p,e.media,n,f);var g=f===s;g&&r.splice(u,1,p),_(o,l.attributes.AUDIO,p.attributes.AUDIO,g),r.splice(h,1),h--}}i.push(c)}return this.i7.settings.IGNORE_HLS_AUDIO_GROUPS||(e.media=e.media.filter(function(e){return!o[e.attributes["GROUP-ID"]]})),i},e.prototype.H8=function(e,t,i,n,r){this.i7.settings.DISABLE_HLS_BACKUP_STREAM_FAILOVER||(e[r]=function(e,t,i){var n={};return n[c.MimeType.VideoMp4]=d.URLHelper.getAbsoluteUrl(e.uri,i),e.attributes.AUDIO&&(function(e,t,i){return e.filter(function(e){return E(e.attributes)&&e.attributes["GROUP-ID"]===t&&e.attributes.URI}).map(function(e){var t;return{id:e.attributes.NAME,url:d.URLHelper.getAbsoluteUrl(null!=(t=e.attributes.URI)?t:"",i)}})})(t,e.attributes.AUDIO,i).forEach(function(e){n[e.id]=e.url}),n}(t,i,n))},e.prototype.createDashManifestSkeleton=function(e){var t=e;return this.I8(t),this.L8(t),this.m7=this.S8(t),{BaseURL:[{url:this.n7}],Period:[this.R8(t,s.DEFAULT_PERIOD_ID)],_hasIndependentSegments:e.independentSegments,_isHls:!0,isInitialized:!1}},e.prototype.I8=function(e){var t=this;e.playlists.forEach(function(e){if(e.attributes.CODECS){var i=a.CodecStringHelper.getExtractedCodecStrings(e.attributes.CODECS);if(!i.video&&i.unknown&&(e.attributes.RESOLUTION||e.attributes["FRAME-RATE"])){var n=a.CodecStringHelper.extractCodec(i.unknown);t.i7.logger.debug("Assuming unknown codec ".concat(n," is video")),a.CodecStringHelper.addCodec("video",n)}}})},e.prototype.J8=function(e,t){return a.CodecStringHelper.getMimeTypeForCodecString(e.attributes.CODECS)===t},e.prototype.K8=function(e){var t=this,i=e.playlists.some(function(e){return t.J8(e,"video")}),n=e.playlists.some(function(e){return t.J8(e,"audio")});i&&n&&(e.playlists=e.playlists.filter(function(e){return t.J8(e,"video")}))},e.prototype.L8=function(e){this.K8(e)},e.prototype.M8=function(e,t){void 0===t&&(t=!1);var i=a.CodecStringHelper.getExtractedCodecStrings(e.attributes.CODECS);return i.video?(a.CodecStringHelper.hasOldAvc1CodecFormat(i.video)&&(i.video=a.CodecStringHelper.convertAvc1ToAvcotiCodecFormat(i.video)),t?i.video:i.video.split(".")[0]):null},e.prototype.N8=function(e,t){void 0===t&&(t=!1);var i=a.CodecStringHelper.getExtractedCodecStrings(e.attributes.CODECS);return i.audio?t?i.audio:i.audio.split(".")[0]:null},e.prototype.O8=function(e){var t=this;return e.map(function(e){return t.M8(e)}).filter(function(e,t,i){return e&&i.indexOf(e)===t})},e.prototype.P8=function(e){var t=this;return e.map(function(e){return t.N8(e)}).filter(function(e,t,i){return e&&i.indexOf(e)===t})},e.prototype.Q8=function(e){var t=this.O8(e),i=this.P8(e);if(0===t.length&&0===i.length)return{unknown:e};if(0===t.length){var n={};return i.forEach(function(t){n[t]=e.filter(function(e){var i;return null==(i=e.attributes.CODECS)?void 0:i.includes(t)})}),n}var r={};return t.forEach(function(t){r[t]=e.filter(function(e){var i;return null==(i=e.attributes.CODECS)?void 0:i.includes(t)})}),r},e.prototype.R8=function(t,i){var n=this,o={_id:i,_duration:"PT0S",duration:0,AdaptationSet:[]},s=r.extractMediaRenditions(t,this.i7.settings.IGNORE_HLS_AUDIO_GROUPS,function(e){if(null!=e.attributes.CODECS){var t=function(e){return e.split(",").map(function(e){return a.CodecStringHelper.hasOldAvc1CodecFormat(e)?a.CodecStringHelper.convertAvc1ToAvcotiCodecFormat(e):e}).join(",")}(e.attributes.CODECS),i=a.CodecStringHelper.getExtractedCodecStrings(t).video;return!!i&&n.i7.renderer.isMediaTypeSupported("video/mp4",i)}return!0}),u=this.Q8(t.playlists),c=Object.keys(u),l=c.filter(function(e){return a.CodecStringHelper.isVideoCodec(e)}).map(function(e){return n.q7(u[e],s.captions,o._id,g.ContainerFormat.MP4,s.audio)}).filter(function(t){return t.Representation=t.Representation.reduce(function(t,i){var r=e.isRepresentationSupported(i,n.i7.renderer),o=!!t.find(function(e){return e.Uri===i.Uri});return r&&!o&&t.push(i),t},[]),t.Representation.length>0}),d=this.C8(o._id,s.audio,g.ContainerFormat.MP4).filter(function(t){return t.Representation=t.Representation.filter(function(t){return e.isRepresentationSupported(t,n.i7.renderer)}),t.Representation.length>0}).concat(c.filter(function(e){return a.CodecStringHelper.isAudioCodec(e)}).map(function(e){return n.r7(u[e],s.captions,o._id,g.ContainerFormat.MP4)})),h=this.D8(o._id,s.subtitles,g.ContainerFormat.MP4);return o.AdaptationSet=[].concat(l,d,h),p.ModuleManager.has(f.ModuleName.Thumbnail)&&(o.AdaptationSet=p.ModuleManager.get(f.ModuleName.Thumbnail).extendAdaptationSets(o.AdaptationSet,t,this.n7)),o},e.isRepresentationSupported=function(e,t){var i=!e._mimeType.includes("audio")&&!e._mimeType.includes("video");if(!e._codecs||i)return!0;var n=a.CodecStringHelper.getExtractedCodecStrings(e._codecs);return Object.keys(n).every(function(e){return a.CodecStringHelper.isSupportedByRenderer(t,e+"/mp4",n[e])})},e.prototype.S8=function(e){var t=e.media.filter(function(e){return E(e.attributes)});return!t.length||t.some(function(e){return!e.attributes.URI})},e.prototype.T8=function(e,t,i,n,r){for(var o,a=function(e){null!==s.V8(e.uri)?(void 0!==t.find(function(t){return!Object.keys(e).some(function(i){return e[i]!==t[i]})})||t.push(e),t.length>0&&(o=void 0)):o=(0,S.generateSegmentEncryptionInfo)(e,i,n,r)},s=this,u=0,c=null!=e?e:[];u<c.length;u++)a(c[u]);return o},e.prototype.translateSegmentList=function(e,t){var i,r,o,a=t.segments,s=[],u=[],c=null!=(o=null==(r=null==(i=e.BaseURL)?void 0:i[0])?void 0:r.url)?o:"",h="";c&&(h=(0,d.extractOrigin)(c)),this.V8.invalidate();for(var p=0,f=function(e){c&&(e.uri=d.URLHelper.buildAbsoluteUrl(c,h,e.uri));var i=g.T8(e.keys,u,c,h,e.mediaSequence);e.init&&(e.init.url=d.URLHelper.buildAbsoluteUrl(c,h,e.init.url),e.init.key=g.T8(e.init.keys,u,c,h,e.mediaSequence));var r={_media:e.uri,_duration:e.duration,_mediaSequence:e.mediaSequence,_discontinuitySequenceNumber:e.discontinuitySequenceNumber,_metadata:[]};P(r,"_discontinuity",e.discontinuity),P(r,"_key",i),P(r,"_init",e.init),P(r,"_dateTime",e.dateTime),P(r,"_byteRange",(0,S.parseSegmentByteRange)(e.byterange)),P(r,"_playbackTime",function(e,t,i){var n;return e.endList?(null!=(n=e.startTime)?n:0)+t:i?(0,l.toSeconds)(i.getTime()):void 0}(t,p,e.dateTime)),["cueTag","scte35","customTags"].filter(function(t){return e.hasOwnProperty(t)}).forEach(function(t){return r._metadata=r._metadata.concat(e[t])}),e.parts&&(r._parts=e.parts.map(function(e){return n(n({},e),{uri:d.URLHelper.buildAbsoluteUrl(c,h,e.uri)})})),s.push(r),p+=e.duration},g=this,m=0,y=a;m<y.length;m++)f(y[m]);return{entries:s,contentProtectionInfos:this.U8(u)}},e.prototype.U8=function(e){var t=this,i=[];return e.forEach(function(e){var n=function(e,t){return p.ModuleManager.has(f.ModuleName.DRM)?p.ModuleManager.get(f.ModuleName.DRM).ContentProtectionHelper.parseContentProtection(e,t):null}(e,t.V8(e.uri));n?i.push(n):t.i7.logger.debug("Encountered unknown/unsupported DRM scheme:",e.keyformat)}),i},e.prototype.dispose=function(){this.n7=null,this.V8.invalidate()},e}(),function(e){function t(e,t){var i={};return e.forEach(function(e){var n=t[e["GROUP-ID"]]||t[Object.keys(t)[0]];e["AVERAGE-BANDWIDTH"]=n[0]["AVERAGE-BANDWIDTH"],e.BANDWIDTH=n[0].BANDWIDTH,e.CODECS=n[0].CODECS;var r=e["AVERAGE-BANDWIDTH"]||e.BANDWIDTH,o=Object.keys(i).find(function(t){var n,r,o=i[t].entries[0];return(null==o?void 0:o.NAME)===e.NAME&&a.CodecStringHelper.canSwitchBetweenAudioCodecs(null!=(n=null==o?void 0:o.CODECS)?n:"",null!=(r=e.CODECS)?r:"")});if(o&&i[o]){var s=i[o];s.entries.push(e),s.MIN_BANDWIDTH=Math.min(s.MIN_BANDWIDTH,r),s.MAX_BANDWIDTH=Math.max(s.MAX_BANDWIDTH,r)}else i[e.CODECS?"".concat(e.NAME," (").concat(e.CODECS,")"):e.NAME]={entries:[e],MIN_BANDWIDTH:r,MAX_BANDWIDTH:r}}),i}function i(e){var t={};return e.forEach(function(e){return t[e.NAME]=e}),t}
1function n(e){var t={cea608:[],cea708:[]};return e.forEach(function(e){e["INSTREAM-ID"]&&0===e["INSTREAM-ID"].indexOf("CC")?t.cea608.push(e):e["INSTREAM-ID"]&&0===e["INSTREAM-ID"].indexOf("SERVICE")&&t.cea708.push(e)}),t}function r(e){var t=function(e){var t={};return e.forEach(function(e){var i=e.attributes.AUDIO;t[i]||(t[i]=[]);var n={"AVERAGE-BANDWIDTH":e.attributes["AVERAGE-BANDWIDTH"],BANDWIDTH:e.attributes.BANDWIDTH,CODECS:void 0};e.attributes.CODECS&&e.attributes.CODECS.indexOf(",")>-1&&(n.CODECS=function(e){return e.attributes.CODECS.split(",").find(function(e){return a.CodecStringHelper.isAudioCodec(e)})}(e)),t[i].push(n)}),t}(e);return function(e){Object.values(e).forEach(function(e){e.sort(function(e,t){return e.BANDWIDTH-t.BANDWIDTH})})}(t),t}e.extractMediaRenditions=function(e,o,a){var s=e.playlists.filter(a),u=e.media.map(function(e){return e.attributes}),c=r(s),l=u.filter(function(e){var t=c[e["GROUP-ID"]];return E(e)&&(o||t)}),d=u.filter(function(e){return"SUBTITLES"===e.TYPE}),h=u.filter(function(e){return"CLOSED-CAPTIONS"===e.TYPE});return{audio:t(l,c),subtitles:i(d),captions:n(h)}},e.getPropertiesForAudioGroups=r}(r||(t.HlsParsing=r={}))},95212:function(e,t){"use strict";var i;Object.defineProperty(t,"__esModule",{value:!0}),t.M3u8Validator=t.M3u8ValidatorError=void 0,function(e){e.EmptyPlaylist="EmptyPlaylist"}(i||(t.M3u8ValidatorError=i={})),t.M3u8Validator=function(){function e(){}return e.checkForError=function(t){for(var i=0,n=e.mediaPlaylistRules;i<n.length;i++){var r=n[i];if(!r.fn(t))return r.err}return null},e.mediaPlaylistRules=[{fn:function(e){var t;return(null==(t=e.segments)?void 0:t.length)>0},err:i.EmptyPlaylist}],e}()},81232:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HLSModuleDefinition=void 0;var n=i(62756),r=i(8251),o=i(56727),a=i(14447),s=i(37432),u=i(18146),c=i(73315),l=i(23512),d=i(61895),h={setPresentationTimeOffset:c.setPresentationTimeOffset,setTimestampRolloverPositions:c.setTimestampRolloverPositions},p={areDiscontinuitiesMisaligned:d.areDiscontinuitiesMisaligned,getPresentationTimeOffset:d.getPresentationTimeOffset,getHlsState:d.getHlsState,getPlaylistType:d.getPlaylistType,getIsLowLatencyPlaylist:d.getIsLowLatencyPlaylist,getEndlist:d.getEndlist,getDefaultLanguages:d.getDefaultLanguages,getCustomTags:d.getCustomTags,getDiscoSequenceTiming:d.getDiscoSequenceTiming,getDiscoSequenceTimings:d.getDiscoSequenceTimings,getFirstDiscoSequenceTiming:d.getFirstDiscoSequenceTiming,getMergedDiscontinuityTimings:d.getMergedDiscontinuityTimings};t.HLSModuleDefinition={name:n.ModuleName.HLS,module:function(){return{HlsTimelineTracker:o.HlsTimelineTracker,M3u8Loader:a.M3u8Loader,parsePlaylist:s.parsePlaylist,PlaylistUtils:u.PlaylistUtils,DiscontinuitySequenceNumberTracker:r.DiscontinuitySequenceNumberTracker,HlsReducer:l.HlsReducer,actions:h,selectors:p,canMakeBlockingPlaylistReload:u.canMakeBlockingPlaylistReload}},dependencies:[n.ModuleName.EngineBitmovin]},t.default=t.HLSModuleDefinition},18146:function(e,t,i){"use strict";var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.PlaylistUtils=t.isMediaPlaylist=t.isMasterPlaylist=void 0,t.calculateUpdateIntervalInSeconds=function(e,t){if(!d.isLive(t))return 1/0;var i=t.segments[t.segments.length-1];if(void 0!==i){if((0,c.isPlayingLowLatencyHls)(e)){var n=function(e,t){var i,n,r=t.parts;return r&&r.length>0?r[r.length-1].duration:null!=(n=null==(i=e.partInfo)?void 0:i.targetDuration)?n:void 0}(t,i);if(void 0!==n)return n}return Math.max(e.settings.MINIMUM_ALLOWED_UPDATE_PERIOD,i.duration)}return e.settings.MINIMUM_ALLOWED_UPDATE_PERIOD},t.parseSegmentByteRange=function(e){var t,i;if(e)return{start:null!=(t=e.offset)?t:0,end:(null!=(i=e.offset)?i:0)+e.length-1}},t.generateSegmentEncryptionInfo=function(e,t,i,a){if(e.method===r.HlsEncryptionMethod.NONE)return e;var s=n(n({},e),{uri:u.URLHelper.buildAbsoluteUrl(t,i,e.uri)});return s.iv=s.iv?(0,o.forceReallocation)(s.iv):function(e){var t=e.length;return t>=32?e:"00000000000000000000000000000000".substring(0,32-t)+e}(a.toString(16)),s},t.getLastMediaSequenceAndPartIndex=f,t.canMakeBlockingPlaylistReload=function(e,t){var i,n,r=!!(null==(n=null==(i=e._hls)?void 0:i.serverControl)?void 0:n.canBlockReload),o=f(e),a=p(e)<=function(e,t){var i,n=null==(i=e._hls)?void 0:i.partTargetDuration;return n?n*t.LL_HLS_MAX_PLAYLIST_AGE_FOR_BLOCKING_REQUEST_IN_PART_TARGET_MULTIPLES:-1}(e,t);return r&&void 0!==o&&a},t.canPerformDeltaUpdate=function(e){var t,i,n=null==(i=null==(t=e._hls)?void 0:t.serverControl)?void 0:i.canSkipUntil;return void 0!==n&&!(p(e)>n/2)},t.isDeltaUpdateV2Supported=function(e){var t,i;return void 0!==(null==(i=null==(t=e._hls)?void 0:t.serverControl)?void 0:i.canSkipUntil)&&!0===e._hls.serverControl.canSkipDateRanges},t.calcNumberOfSegmentsToDrop=function(e,t,i){return 0===e.length?0:0===t.length?e.length:t[0]._mediaSequence-e[0]._mediaSequence-i},t.addNewSegments=function(e,t){if(0!==t.length)if(0!==e.length){var i=e[e.length-1],r=t[t.length-1]._mediaSequence-i._mediaSequence,o=(0,a.findFromEnd)(t,function(e){return e._mediaSequence===i._mediaSequence}),s=n(n({},i),o);if(g(s),e[e.length-1]=s,0!==r){var u=t.slice(-r);
vendor: 8,768 bytes, line 1
1u.forEach(g),function(e,t,i){t.forEach(function(t){i.forEach(function(i){return function(e,t,i){t[e]&&!i[e]&&(i[e]=t[e])}(i,e,t)})})}(s,u,["_init","_key"]),void 0!==i._playbackTime&&function(e,t){var i=t;e.forEach(function(e){void 0===e._playbackTime&&(e._playbackTime=i),i=e._playbackTime+e._duration})}(u,i._playbackTime+i._duration),e.push.apply(e,u)}}else e.push.apply(e,t)},t.isDeltaPlaylist=function(e){return e.skippedSegmentsCount>0};var r=i(66790),o=i(20649),a=i(74853),s=i(89927),u=i(58313),c=i(60729),l=i(93187);t.isMasterPlaylist=function(e){return"playlists"in e},t.isMediaPlaylist=function(e){return!(0,t.isMasterPlaylist)(e)};var d=function(){function e(){}return e.createDiscontinuitySequences=function(e,t){var i=e.segments.filter(function(e){return e.duration>0}),n=this.getStartingDiscontinuity(e,i,t),r={id:n,segments:[],duration:0},o=[r];return i.forEach(function(e,t){void 0!==e.discontinuity&&(n++,0===t?r.id=n:(r={id:n,duration:0,segments:[]},o.push(r))),e.discontinuitySequenceNumber=n,r.segments.push(e),r.duration+=e.duration}),o},e.getStartingDiscontinuity=function(t,i,n){var r=t.discontinuitySequence;return null==r&&(r=0!==n.length&&e.isLive(t)?this.findCurrentDiscontinuitySequenceNumber(i,n):0),r},e.findCurrentDiscontinuitySequenceNumber=function(e,t){for(var i=[],n=0,r=0;r<t.length-1;r++)n+=t[r].segments.length,i.push(n);var o=[];return e.forEach(function(e,t){void 0!==e.discontinuity&&o.push(t)}),0===i.length?t[0]?t[0].id:0:0===o.length?t[t.length-1].id:o.length!==i.length?o.length>i.length?t[0].id:t[1].id:this.findFirstPeriodByIndexTracking(i,o,t)},e.findFirstPeriodByIndexTracking=function(e,t,i){if(e[0]>t[0])return i[0].id;if(e[0]<t[0]){for(var n=e[0]-t[0],r=0,o=0;o<e.length;o++)e[o]+n<t[0]&&r++;return i[r].id}var a=function(){return e.every(function(e,i){return e===t[i]})};if(a())return i[0].id;for(var s=1;e.length>0;){for(e.shift(),o=0;o<e.length;o++)e[o]--;if(a())break;s++}return i[s].id},e.extrapolateProgramDateTime=function(e){var t,i=null;if(e.find(function(e,t){return e.dateTime&&(i=t),void 0!==e.dateTime}),null!==i){for(t=i-1;t>=0;t--){var n=e[t+1].dateTime,r=Math.ceil((0,s.toMilliSeconds)(e[t].duration));e[t].dateTime=new Date(n.getTime()-r)}for(t=i+1;t<e.length;t++){var o=e[t-1].dateTime,a=Math.ceil((0,s.toMilliSeconds)(e[t-1].duration));e[t].dateTime=new Date(o.getTime()+a)}}},e.isLive=function(e){return!0!==e.endList},e.getProgramDateTimeFromSegmentUrl=function(e,t){if(e.indexOf("akamaihd.net")>-1){var i=e.match(/segment(\d{9})/);if(i&&2===i.length)return new Date(parseInt(i[1])*Math.round((0,s.toMilliSeconds)(t)))}return null},e.correctStartOffsetToBounds=function(e,t){return e>0&&e>t?t:e<0&&Math.abs(e)>t?-t:e},e.getImpreciseStartOffsetFromStartOfPlaylist=function(e){for(var t=e.start.timeOffset,i=0,n=0;n<e.segments.length-1&&t-e.segments[n+1].duration>0;n++){var r=e.segments[n].duration;t-=r,i+=r}return i},e.getImpreciseStartOffsetFromEndOfPlaylist=function(e){for(var t=Math.abs(e.start.timeOffset),i=0,n=e.segments.length-1;n>=0&&h(t,1)>0;n--)t-=e.segments[n].duration,i+=h(e.segments[n].duration,2);return e.totalDuration-i},e.getImpreciseStartOffset=function(t){return t.start.timeOffset>=0?e.getImpreciseStartOffsetFromStartOfPlaylist(t):e.getImpreciseStartOffsetFromEndOfPlaylist(t)},e.getStartOffsetCloseToPlaylistEnd=function(t,i){var n=t.start.timeOffset;return Math.max(i,n=(n=e.correctStartOffsetToBounds(n,t.totalDuration))<0?-h(Math.abs(n),2):h(n,2))},e.getStartOffset=function(t){var i=t.start.timeOffset;return(i=e.correctStartOffsetToBounds(i,t.totalDuration))<0&&(i+=t.totalDuration),t.start.precise||(i=e.getImpreciseStartOffset(t)),Number(i.toFixed(2))},e.getBaseUrl=function(e,t){var i=e;return i=u.URLHelper.removeUrlParameters(i),!(t=u.URLHelper.removeLastPathPart(t))||0>t.indexOf("/")?e:u.URLHelper.concatUrlParts(i,t)},e}();function h(e,t){return Math.floor(e*Math.pow(10,t))/Math.pow(10,t)}function p(e){var t;return(null==(t=null==e?void 0:e._hls)?void 0:t.requestTimestamp)?(0,s.toSeconds)(Date.now()-e._hls.requestTimestamp):1/0}function f(e){var t,i,n=null==(t=e.SegmentList)?void 0:t[0].SegmentURL,r=null==n?void 0:n[n.length-1],o=null!=(i=null==r?void 0:r._parts)?i:[];if(r&&0!==o.length){if((o=o.filter(function(e){return!e.isPreloadHint})).length>0)return{mediaSequence:r._mediaSequence,partIndex:o.length-1};var a=null==n?void 0:n[n.length-2];if((null==a?void 0:a._parts)&&0!==a._parts.length)return{mediaSequence:a._mediaSequence,partIndex:a._parts.length-1}}}function g(e){var t;e._media=(0,o.forceReallocation)(e._media),null==(t=e._metadata)||t.forEach(function(e){return(0,l.forceReallocateStringProps)(e)})}t.PlaylistUtils=d},47596:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StartTimeExtrapolationDirection=void 0,t.extrapolateStartTime=function(e,t,i){void 0===i&&(i=n.Bidirectional),i===n.Backward?c(e,t):(i===n.Forward||c(e,t),u(e,t))},t.forwardExtrapolateSegmentStartTime=u,t.backwardExtrapolateSegmentStartTime=c,t.getStartTimeExtrapolationReferencePoint=function(e,t,i){if(t.endList)return{index:0,startTime:(0,r.getStartTimeOffset)(i)};var n,o,u=e.segmentInfos[0];if(null==u?void 0:u.dateTime)return{index:0,startTime:(0,a.toSeconds)(u.dateTime.getTime())};var c=(0,s.getMostRecentlyRefreshedQuality)(i);if(c){var d=l(e,c);if(d)return d}return{index:0,startTime:null!=(o=null==(n=null==c?void 0:c.segmentInfos[0])?void 0:n.startTime)?o:(0,a.toSeconds)(t.requestTimestamp)-t.totalDuration}},t.getStartTimeViaDiscontinuityBoundaries=l,t.findDiscontinuityBoundary=d,t.hasDiscontinuityBoundary=h;var n,r=i(77179),o=i(74853),a=i(89927),s=i(72498);function u(e,t){var i=t.index,n=t.startTime;e[i].startTime=n;for(var r=i+1;r<e.length;r++)e[r].startTime=e[r-1].startTime+e[r-1].duration}function c(e,t){var i=t.index,n=t.startTime;e[i].startTime=n;for(var r=i-1;r>=0;r--)e[r].startTime=e[r+1].startTime-e[r].duration}function l(e,t){if(h(e.segmentInfos)&&h(t.segmentInfos)){var i=t.segmentInfos[t.segmentInfos.length-1],n=d(t.segmentInfos,i.discontinuitySequenceNumber),r=t.segmentInfos[n],o=d(e.segmentInfos,r.discontinuitySequenceNumber);if(null!=o)return{index:o,startTime:r.startTime}}}function d(e,t){return h(e)?(0,o.findIndexFromEnd)(e,function(e){return!!e.isDiscontinuityStart&&e.discontinuitySequenceNumber===t}):-1}function h(e){if(!e.length)return!1;if(e[0].isDiscontinuityStart)return!0;var t=e[0],i=e[e.length-1];return t.discontinuitySequenceNumber!==i.discontinuitySequenceNumber}!function(e){e.Backward="backward",e.Forward="forward",e.Bidirectional="Bidirectional"}(n||(t.StartTimeExtrapolationDirection=n={}))},97123:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WebWorkerParser=void 0,t.WebWorkerParser=function(){function e(e){var t=this;this.a7=!1,this.b7=[],this.c7=function(e){var i=e.data;if(["parsedPlaylist","error"].includes(i.action)&&0!==t.b7.length){var n=t.b7.shift();if("error"===i.action&&(null==n||n.rejectFn(i.data)),"parsedPlaylist"===i.action&&(null==n||n.resolveFn(i.data)),t.b7.length>0){var r=t.b7[0];t.Z7.postMessage(r.message)}else t.a7=!1}};try{var n=i(62903);this.Z7=new n,this.Z7.onmessage=this.c7}catch(t){e.warn("WebWorkerParser: Could not create web worker",t)}}return e.prototype.parsePlaylist=function(e,t){var i=this;return new Promise(function(n,r){var o={action:"parseHlsPlaylist",payload:{data:e,options:t}};i.b7.push({resolveFn:n,rejectFn:r,message:o}),i.a7||(i.a7=!0,i.Z7.postMessage(o))})},e.getInstance=function(t){return e.instance||(e.instance=new e(t)),e.instance},e.instance=null,e}()},93187:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.forceReallocateStringProps=function e(t){Object.keys(t).forEach(function(i){"string"==typeof t[i]&&(t[i]=(0,n.forceReallocation)(t[i])),"object"==typeof t[i]&&e(t[i])})};var n=i(20649)},52610:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getTimingInfoFromSegmentList=function(e){return e.reduce(function(e,t,i,n){var r=t._discontinuitySequenceNumber,o=t._playbackTime;if(void 0===e.discoTimings[r]){e.discoTimings[r]={startTime:o,endTime:1/0};var a=e.discoTimings[r-1];a&&(a.endTime=o)}return i===n.length-1&&(e.discoTimings[r].endTime=o+t._duration),e.totalDuration+=t._duration,e},{totalDuration:0,discoTimings:{}})}},5707:function(e,t,i){"use strict";var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},r=this&&this.__spreadArray||function(e,t,i){if(i||2==arguments.length)for(var n,r=0,o=t.length;r<o;r++)!n&&r in t||(n||(n=Array.prototype.slice.call(t,0,r)),n[r]=t[r]);return e.concat(n||Array.prototype.slice.call(t))};
1Object.defineProperty(t,"__esModule",{value:!0}),t.generateRendition=function(e){var t,i,r;return{name:e.name,attributes:n(n({},e.attributes),{TYPE:null==(t=e.attributes)?void 0:t.TYPE,"GROUP-ID":null==(i=e.attributes)?void 0:i["GROUP-ID"],NAME:null==(r=e.attributes)?void 0:r.NAME})}},t.generateStartAttributes=function(e){var t,i;return(null==(t=e.attributes)?void 0:t.hasOwnProperty("TIME-OFFSET"))&&(i={timeOffset:Number(e.attributes["TIME-OFFSET"]),precise:"YES"===e.attributes.PRECISE}),e.attributes&&i&&i.hasOwnProperty("timeOffset")&&(e.attributes["TIME-OFFSET"]=i.timeOffset,e.attributes.PRECISE=i.precise),i},t.generatePartInfoTag=function(e){return{targetDuration:parseFloat(e["PART-TARGET"])}},t.generateServerControlTag=function(e){var t={canBlockReload:!1};return e.attributes&&(e.attributes["CAN-SKIP-UNTIL"]&&(t.canSkipUntil=parseFloat(e.attributes["CAN-SKIP-UNTIL"])),void 0!==t.canSkipUntil&&e.attributes["CAN-SKIP-DATERANGES"]&&(t.canSkipDateRanges="YES"===e.attributes["CAN-SKIP-DATERANGES"]),e.attributes["HOLD-BACK"]&&(t.holdBack=parseFloat(e.attributes["HOLD-BACK"])),e.attributes["PART-HOLD-BACK"]&&(t.partHoldBack=parseFloat(e.attributes["PART-HOLD-BACK"])),e.attributes["CAN-BLOCK-RELOAD"]&&(t.canBlockReload="YES"===e.attributes["CAN-BLOCK-RELOAD"])),t},t.generateSkipTag=function(e){var t={skippedSegments:0,recentlyRemovedDateranges:[]};return e.attributes&&(e.attributes["SKIPPED-SEGMENTS"]&&(t.skippedSegments=parseInt(e.attributes["SKIPPED-SEGMENTS"])),e.attributes["RECENTLY-REMOVED-DATERANGES"]&&(t.recentlyRemovedDateranges=e.attributes["RECENTLY-REMOVED-DATERANGES"].split("	"))),t},t.generatePartTag=function(e,t){var i={uri:(0,s.forceReallocation)(e.URI),duration:parseFloat(e.DURATION)};if("YES"===e.INDEPENDENT&&(i.independent=!0),e.BYTERANGE){var n=e.BYTERANGE.split("@"),r=parseInt(n[0]),o=parseInt(n[1]);isNaN(o)&&(o=(null==t?void 0:t.byteRange)?t.byteRange.end+1:0),i.byteRange={start:o,end:o+r-1}}return"YES"===e.GAP&&(i.gap=!0),i},t.generatePreloadHintTag=function(e,t){if("PART"===e.TYPE){var i={uri:(0,s.forceReallocation)(e.URI),duration:t,isPreloadHint:!0};return(n=u(e))&&(i.byteRange=n),{part:i}}if("MAP"===e.TYPE){var n,r={url:(0,s.forceReallocation)(e.URI)};return(n=u(e))&&(r.byteRange=n),{init:r}}return{}},t.generateStreamInfTag=function(e,t){var i,r,o,a,s,u={name:e.name,uri:t,attributes:n(n({},e.attributes),{BANDWIDTH:null==(i=e.attributes)?void 0:i.BANDWIDTH})};return(null==(r=e.attributes)?void 0:r.RESOLUTION)&&(u.attributes.RESOLUTION=h(e)),(null==(o=e.attributes)?void 0:o.BANDWIDTH)&&(u.attributes.BANDWIDTH=parseInt(e.attributes.BANDWIDTH)),(null==(a=e.attributes)?void 0:a["AVERAGE-BANDWIDTH"])&&(u.attributes["AVERAGE-BANDWIDTH"]=parseInt(e.attributes["AVERAGE-BANDWIDTH"])),(null==(s=e.attributes)?void 0:s["PROGRAM-ID"])&&(u.attributes["PROGRAM-ID"]=parseInt(e.attributes["PROGRAM-ID"])),u.id=c(u.attributes),u},t.generateVariantPlaylistId=c,t.generateSessionKeyTag=function(e){d(e)},t.generateIFrameStreamInfTag=function(e){var t,i,n;(null==(t=e.attributes)?void 0:t.BANDWIDTH)&&(e.attributes.BANDWIDTH=parseInt(e.attributes.BANDWIDTH)),(null==(i=e.attributes)?void 0:i["AVERAGE-BANDWIDTH"])&&(e.attributes["AVERAGE-BANDWIDTH"]=parseInt(e.attributes["AVERAGE-BANDWIDTH"],10)),(null==(n=e.attributes)?void 0:n.RESOLUTION)&&(e.attributes.RESOLUTION=h(e))},t.generateSegmentEntrySkeleton=function(){return{uri:"",duration:0,mediaSequence:0}},t.generateCueTag=function(e,t){var i={type:t};if(e.attributes){var n=[];for(var r in e.attributes)if(e.attributes.hasOwnProperty(r)){var o=e.attributes[r]?"".concat(r,"=").concat(e.attributes[r]):r;n.push(o)}i.attributes=n}return i},t.generateDateRange=function(e){var t={type:a.MetadataType.DATERANGE};if(e.attributes){t.clientAttributes={};var i=e.attributes;for(var n in i)if(i.hasOwnProperty(n)){var r=l(n,i[n]);n.startsWith("X-")?t.clientAttributes[(0,s.kebabCaseToCamelCase)(n.substring(2))]=r:t[(0,s.kebabCaseToCamelCase)(n)]=r}}return t.duration&&(t.duration=Number(t.duration)),t.plannedDuration&&(t.plannedDuration=Number(t.plannedDuration)),t.endOnNext&&(t.endOnNext=!0),t},t.generateKeyTag=function(e){var t;if(d(e),e.attributes&&"NONE"!==e.attributes.METHOD&&e.attributes.URI){var i={method:null!=(t=o.HlsEncryptionMethods.find(function(t){return t===e.attributes.METHOD}))?t:o.HlsEncryptionMethod.AES_128,uri:(0,s.forceReallocation)(e.attributes.URI)};return void 0!==e.attributes.IV&&(i.iv=e.attributes.IV),e.attributes.KEYFORMAT&&(i.keyformat=(0,s.forceReallocation)(e.attributes.KEYFORMAT)),e.attributes.KEYFORMATVERSIONS&&(i.keyformatversions=(0,s.forceReallocation)(e.attributes.KEYFORMATVERSIONS)),e.attributes.KEYID&&(i.keyid=(0,s.forceReallocation)(e.attributes.KEYID)),i}},t.generateByteRangeTag=function(e,t){var i;if(e.value){var n=e.value.split("@"),r=n[0],o=n[1],a={length:parseInt(r||"0")};if(o)a.offset=parseInt(o);else{var s=t[t.length-1];(null==s?void 0:s.byterange)&&(a.offset=(null!=(i=s.byterange.offset)?i:0)+s.byterange.length)}return a}},t.generateMapTag=function(e,t){var i,n;if(null==(i=e.attributes)?void 0:i.URI){var o={url:(0,s.forceReallocation)(e.attributes.URI)};if(null==(n=e.attributes)?void 0:n.BYTERANGE){var a=e.attributes.BYTERANGE.split("@"),u=a[0],c=a[1];o.byteRange={start:parseInt(c),end:parseInt(c)+parseInt(u)-1}}return t.keys.length>
vendor: 13,121 bytes, line 1
10&&(o.keys=r([],t.keys,!0),t.keyInUse=!0),o}},t.generateCustomTag=function(e){try{e=(0,s.forceReallocation)(e);var t=/^#([^:=]*)([:=])?(.*)$/.exec(e);if(!(null==t?void 0:t[1]))return;var i={name:t[1]},n="";if("="===t[2]&&t[3])n=t[3];else if(":"===t[2]&&t[3]){var r=y.exec(t[3]);r&&"="===r[2]&&r[3]?i.attributes=function(e){for(var t=e.split(p),i=t.length,n={};i--;)if(""!==t[i]){var r=f.exec(t[i]);if(r){var o=r.slice(1),a=o[0],s=o[1];n[a.trim()]=s.trim().replace(g,"$1")}}return n}(t[3]):n=t[3]}return n&&(i.value=n.replace(m,"$1")),i}catch(e){return}};var o=i(66790),a=i(3714),s=i(20649);function u(e){var t=parseInt(e["BYTERANGE-START"]),i=parseInt(e["BYTERANGE-END"]);if(!isNaN(t)||!isNaN(i))return{start:isNaN(t)?0:t,end:isNaN(i)?0x1fffffffffffff:i}}function c(e){var t="";return e.RESOLUTION&&(t+=e.RESOLUTION.height+"_"),t+e.BANDWIDTH}function l(e,t){var i=(0,s.forceReallocation)(t);return!function(e){return["X-RESUME-OFFSET","X-PLAYOUT-LIMIT"].includes(e)}(e)?!function(e){return["X-SNAP","X-RESTRICT"].includes(e)}(e)?i:i.split(","):Number(i)}function d(e){var t;if(null==(t=e.attributes)?void 0:t.IV){var i=e.attributes.IV;(i.startsWith("0x")||i.startsWith("0X"))&&(e.attributes.IV=i.substring(2))}}function h(e){var t,i={width:0,height:0},n=null==(t=e.attributes)?void 0:t.RESOLUTION.split("x");return n[0]&&(i.width=parseInt(n[0])),n[1]&&(i.height=parseInt(n[1])),i}var p=/(?:^|,)((?:[^=]*)=(?:"[^"]*"|[^,]*))/,f=/([^=]*)=(.*)/,g=/^['"](.*)['"]$/,m=/^['"](.*)['"]$/g,y=/^([^:="]*)([:=])?(.*)$/},39297:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TextParser=void 0;var i=/[ \t]+/gm;t.TextParser=function(){function e(e){this.data=e,this.f7=0}return e.prototype.g7=function(){return this.f7===this.data.length},e.prototype.skipWhitespace=function(){this.readRegex(i)},e.prototype.readRegex=function(e){var t=this.h7(e);if(!this.g7()&&void 0!==t&&t.position===this.f7)return this.f7+=t.length,t.results},e.prototype.h7=function(e){e.lastIndex=this.f7;var t=e.exec(this.data);if(null!==t)return{position:t.index,length:t[0].length,results:t}},e}()},37432:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parsePlaylist=function(e,t){void 0===t&&(t={});var i=-1===e.indexOf("#EXTINF")?n.Master:n.Media,d=e.replace(u,"\n").trim().split(/\n+/m);if(!c.test((0,r.removeTrailingWhitespaces)(d[0])))throw Error("Playlist parsing failed: missing #EXTM3U tag");if(i===n.Media)return(0,a.parseVariant)(d,t);for(var h,p=[],f=[],g=[],m=1,y=!0,v=!1,S=!0,b=0;b<d.length;b++){var E=(0,r.removeTrailingWhitespaces)(d[b]),T=d[b+1];if((0,r.isCustomTag)(E))l(p,E);else if(S)S=!1;else{var _=(0,o.parseTag)(E);switch(_.name){case"EXT-X-STREAM-INF":g.push((0,s.generateStreamInfTag)(_,(0,r.removeTrailingWhitespaces)(T))),S=!0;break;case"EXT-X-MEDIA":var A=(0,s.generateRendition)(_);f.push(A),p.push(A);break;case"EXT-X-VERSION":m=Number(_.value);break;case"EXT-X-START":h=(0,s.generateStartAttributes)(_),p.push(_);break;case"EXT-X-ALLOW-CACHE":y="YES"===_.value||void 0===_.value;break;case"EXT-X-INDEPENDENT-SEGMENTS":v=!0,p.push(_);break;case"EXT-X-I-FRAME-STREAM-INF":(0,s.generateIFrameStreamInfTag)(_),p.push(_);break;case"EXT-X-SESSION-DATA":default:p.push(_);break;case"EXT-X-SESSION-KEY":(0,s.generateSessionKeyTag)(_),p.push(_)}}}var P={version:m,allowCache:y,independentSegments:v,hasM3u:!0,media:f,playlists:g,tags:p=p.concat(g)};return h&&(P.start=h),P};var n,r=i(73577),o=i(41908),a=i(1945),s=i(5707),u=/\r\n|\r(?=[^\n]|$)/gm,c=/^#EXTM3U($|[ \t\n])/m;function l(e,t){var i=(0,s.generateCustomTag)(t);i&&e.push(i)}!function(e){e.Master="master",e.Media="media"}(n||(n={}))},73577:function(e,t,i){"use strict";var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},r=this&&this.__spreadArray||function(e,t,i){if(i||2==arguments.length)for(var n,r=0,o=t.length;r<o;r++)!n&&r in t||(n||(n=Array.prototype.slice.call(t,0,r)),n[r]=t[r]);return e.concat(n||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.parseSegments=function(e,t,i,d){void 0===d&&(d={});for(var g,m=[],y=0,v=(0,l.generateSegmentEntrySkeleton)(),S=r([],t,!0),b=0,E=i.mediaSequence,T={keys:[],keyInUse:!1},_=function(e){!function(e,t,i,n,o,a,s){e.duration=t,e.uri=i,e.mediaSequence=s,n&&(e.init=n),a.length>0&&(e.customTags=a),o.keys.length>0&&(e.keys=r([],o.keys,!0),o.keyInUse=!0)}(v,b,e,g,T,S,E),m.push(v),y+=b,E++,v=(0,l.generateSegmentEntrySkeleton)(),S=[],b=0},A=function(e){var t,s,h=(0,u.parseTag)(e);switch(h.name){case"EXTINF":b=parseFloat(h.value);break;case"EXT-X-BYTERANGE":v.byterange=(0,l.generateByteRangeTag)(h,m);break;case"EXT-X-DISCONTINUITY":v.discontinuity=!0;break;case"EXT-X-PROGRAM-DATE-TIME":!function(e,t){t.value&&(e.dateTime=new Date(t.value))}(v,h);break;case"EXT-X-KEY":if("NONE"===(null==(t=h.attributes)?void 0:t.METHOD)){T.keys=[{method:o.HlsEncryptionMethod.NONE}];break}!function(e,t){t.keyInUse&&(t.keys=[],t.keyInUse=!1);var i=(0,l.generateKeyTag)(e);void 0!==i&&t.keys.push(i)}(h,T);break;case"EXT-X-MAP":g=(0,l.generateMapTag)(h,T);break;case"EXT-X-DATERANGE":i.dateRange.push((0,l.generateDateRange)(h));break;case"EXT-X-CUE-OUT-CONT":v.cueTag=(0,l.generateCueTag)(h,"CUE-OUT-CONT");break;case"EXT-X-CUE-OUT":v.cueTag=(0,l.generateCueTag)(h,"CUE-OUT");break;case"EXT-X-CUE-IN":v.cueTag=(0,l.generateCueTag)(h,"CUE-IN");break;case"EXT-X-SCTE35":!function(e,t){var i;void 0===e.scte35&&(e.scte35=[]),e.scte35.push({type:a.MetadataType.SCTE,attributes:n({CUE:null==(i=t.attributes)?void 0:i.CUE},t.attributes)})}(v,h);break;case"EXT-X-PART":!function(e,t,i){var n;if(i.parsePartTags){t.parts=null!=(n=t.parts)?n:[];var r=t.parts[t.parts.length-1];t.parts.push((0,l.generatePartTag)(e.attributes,r))}}(h,v,d);break;case"EXT-X-PRELOAD-HINT":var p=function(e,t,i){return i.parsePartTags&&t?(0,l.generatePreloadHintTag)(e.attributes,t.targetDuration):{}}(h,i.partInfo,d);p.init&&(g=p.init,T.keys.length>0&&(g.keys=r([],T.keys,!0),T.keyInUse=!0)),p.part&&(v.parts=null!=(s=v.parts)?s:[],v.parts.push(p.part));break;case"EXT-X-SKIP":var f=(0,l.generateSkipTag)(h);i.skippedSegmentsCount=f.skippedSegments,E+=f.skippedSegments;break;case"EXT-X-ENDLIST":i.endList=!0;break;case"EXT-X-MEDIA-SEQUENCE":(0,c.resolvePlaylistTag)(i,h,S),E=i.mediaSequence,i.skippedSegmentsCount&&(E+=i.skippedSegmentsCount);break;default:(0,c.resolvePlaylistTag)(i,h,S)}},P=0,M=e;P<M.length;P++){var I=p(M[P]);""!==I&&(I.startsWith("#")?f(I)?h(i,S,I):A(I):_(I))}v.parts&&v.parts.length>0&&(b=v.parts.reduce(function(e,t){return e+t.duration},0),_(s.PHANTOM_SEGMENT_URL)),i.segments=m,i.totalDuration=y},t.addCustomTagToPlaylistTagList=d,t.handleCustomTag=h,t.removeTrailingWhitespaces=p,t.isCustomTag=f;var o=i(66790),a=i(3714),s=i(63066),u=i(41908),c=i(1945),l=i(5707);function d(e,t){void 0===e.tags&&(e.tags=[]),t&&e.tags.push(t)}function h(e,t,i){t.push({type:a.MetadataType.CUSTOM,attributes:i}),d(e,(0,l.generateCustomTag)(i))}function p(e){return e.replace(/^[ \t]+/g,"")}function f(e){return/^#(?!EXT)/m.test(e)}},41908:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseTag=function(e){var t,i=r.exec(e);if(!i)throw Error("Invalid tag "+e);var s,u=i[1],c=i[2],l={};if(c){var d=new n.TextParser(c),h=void 0,p=d.readRegex(o);for(p&&(s=null!=(t=p[1])?t:p[2]);h=d.readRegex(a);){var f=h[1],g=h[2]||h[3];if(f.includes(",")){var m=f.split(","),y=m[0];f=m[1].trim(),l[y]=void 0}l[f]=g,d.skipWhitespace()}}return{name:u,attributes:l,value:s}};var n=i(39297),r=/^#(EXT[^:]*)(?::(.*))?$/,o=/^(?:"([^"]*)"|([^,=]+))(?:,|$)/g,a=/([^=]+)=*(?:"([^"]*)"|([^",]*))(?:,|$)/g},1945:function(e,t,i){"use strict";var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.SEGMENT_TAGS=void 0,t.parseVariant=function(e,i){void 0===i&&(i={});for(var n={version:1,allowCache:!0,hasM3u:!0,endList:!1,segments:[],dateRange:[],skippedSegmentsCount:0,targetDuration:0,totalDuration:0,mediaSequence:0},r=[],s=0;s<e.length;s++){var l=(0,o.removeTrailingWhitespaces)(e[s]);if(""!==l)if((0,o.isCustomTag)(l))(0,o.handleCustomTag)(n,r,l);else{var d=(0,a.parseTag)(l);if(t.SEGMENT_TAGS.includes(d.name))return(0,o.parseSegments)(e.slice(s),r,n,i),u(n),n;c(n,d,r)}}return u(n),n},t.resolvePlaylistTag=c;var r=i(3714),o=i(73577),a=i(41908),s=i(5707);function u(e){var t;"EVENT"===e.playlistType&&(e.discontinuitySequence=null!=(t=e.discontinuitySequence)?t:0)}function c(e,t,i){switch(t.name){case"EXT-X-VERSION":e.version=Number(t.value);break;case"EXT-X-START":e.start=(0,s.generateStartAttributes)(t);break;case"EXT-X-INDEPENDENT-SEGMENTS":e.independentSegments=!0;break;case"EXT-X-TARGETDURATION":t.value&&(e.targetDuration=parseInt(t.value));break;case"EXT-X-MEDIA-SEQUENCE":t.value&&(e.mediaSequence=parseInt(t.value));break;case"EXT-X-DISCONTINUITY-SEQUENCE":t.value&&(e.discontinuitySequence=parseInt(t.value));break;case"EXT-X-PLAYLIST-TYPE":e.playlistType="EVENT"===t.value?"EVENT":"VOD";break;case"EXT-X-PART-INF":e.partInfo=(0,s.generatePartInfoTag)(t.attributes);break;case"EXT-X-ALLOW-CACHE":e.allowCache="NO"!==t.value;break;case"EXT-X-SERVER-CONTROL":e.serverControl=(0,s.generateServerControlTag)(t);break;case"EXT-X-DATERANGE":e.dateRange.push((0,s.generateDateRange)(t));break;case"EXT-X-ENDLIST":e.endList=!0;break;case"EXTM3U":break;default:i.push(n({type:r.MetadataType.CUSTOM},t)),(0,o.addCustomTagToPlaylistTagList)(e,t)}}t.SEGMENT_TAGS=["EXTINF","EXT-X-BYTERANGE","EXT-X-DISCONTINUITY","EXT-X-PROGRAM-DATE-TIME","EXT-X-KEY","EXT-X-GAP","EXT-X-BITRATE","EXT-X-PART","EXT-X-MAP","EXT-X-CUE-OUT-CONT","EXT-X-CUE-OUT","EXT-X-CUE-IN","EXT-X-SCTE35","EXT-X-SKIP"]},73315:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setContentLocationId=t.setTimestampRolloverPositions=t.setPresentationTimeOffset=t.setDiscoTimings=t.setCustomTags=t.setDefaultLanguages=t.setEndlist=t.setIsLowLatencyPlaylist=t.setPlaylistType=t.setMasterPlaylistString=void 0;var n=i(35267),r=i(45861);t.setMasterPlaylistString=function(e){return(0,n.createAction)(r.HlsActionType.SetMasterPlaylistString,e)},t.setPlaylistType=function(e){return(0,n.createAction)(r.HlsActionType.SetPlaylistType,e)},t.setIsLowLatencyPlaylist=function(e){return(0,n.createAction)(r.HlsActionType.SetIsLowLatencyPlaylist,e)},t.setEndlist=function(e){return(0,n.createAction)(r.HlsActionType.SetEndlist,e)},t.setDefaultLanguages=function(e){return(0,n.createAction)(r.HlsActionType.SetDefaultLanguages,e)},t.setCustomTags=function(e){return(0,n.createAction)(r.HlsActionType.SetCustomTags,e)},t.setDiscoTimings=function(e,t){return(0,n.createAction)(r.HlsActionType.SetDiscoTimings,{mimeType:e,discoTimings:t})},t.setPresentationTimeOffset=function(e,t){return(0,n.createAction)(r.HlsActionType.SetPresentationTimeOffset,{discoSequenceNumber:e,presentationTimeOffset:t})},t.setTimestampRolloverPositions=function(e,t){return(0,n.createAction)(r.HlsActionType.SetTimestampRolloverPositions,{next:e,previous:t})},t.setContentLocationId=function(e){return(0,n.createAction)(r.HlsActionType.SetContentLocationId,{locationId:e})}},23512:function(e,t,i){"use strict";var n,r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},o=this&&this.__spreadArray||function(e,t,i){if(i||2==arguments.length)for(var n,r=0,o=t.length;r<o;r++)!n&&r in t||(n||(n=Array.prototype.slice.call(t,0,r)),n[r]=t[r]);return e.concat(n||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.HlsReducer=void 0,t.extrapolateSegmentStartTime=function(e,t,i){var n=o([],e,!0);return n[t]=r({},n[t]),n[t].startTime=i,function(e,t){for(var i=t-1;i>=0;i--)e[i]=r({},e[i]),e[i].startTime=e[i+1].startTime-e[i].duration}(n,t),function(e,t){for(var i=t+1;i<e.length;i++)e[i]=r({},e[i]),e[i].startTime=e[i-1].startTime+e[i-1].duration}(n,t),n};var a=i(3793),s=i(45861);t.HlsReducer=(0,a.default)({masterPlaylist:{string:""},defaultLanguages:{},discontinuitySequenceTiming:{},presentationTimeOffsets:{},timestampRolloverPositions:{previous:-1,next:-1}},((n={})[s.HlsActionType.SetMasterPlaylistString]=function(e,t){return function(e,t){return e.masterPlaylist.string?e:r(r({},e),{masterPlaylist:{string:t}})}(e,t.payload)},n[s.HlsActionType.SetPlaylistType]=function(e,t){return function(e,t){return r(r({},e),{playlistType:t})}(e,t.payload)},n[s.HlsActionType.SetIsLowLatencyPlaylist]=function(e,t){return function(e,t){return r(r({},e),{isLowLatencyPlaylist:t})}(e,t.payload)},n[s.HlsActionType.SetEndlist]=function(e,t){return function(e,t){return r(r({},e),{endlist:t})}(e,t.payload)},n[s.HlsActionType.SetDefaultLanguages]=function(e,t){return function(e,t){var i={},n={};
1return t.media.forEach(function(e){var t=!!e.attributes;if(t){var r=e.attributes,o=r.TYPE,a=r.LANGUAGE;a&&null!=a&&(t&&"YES"===e.attributes.DEFAULT&&!i[o]&&(i[o]={name:e.attributes.NAME,language:a}),"YES"!==e.attributes.AUTOSELECT||n[o]||(n[o]={name:e.attributes.NAME,language:a}))}}),r(r({},e),{defaultLanguages:r(r({},n),i)})}(e,t.payload)},n[s.HlsActionType.SetCustomTags]=function(e,t){return function(e,t){var i=t;return r(r({},e),{customTags:i.tags})}(e,t.payload)},n[s.HlsActionType.SetDiscoTimings]=function(e,t){return function(e,t){var i,n=t.mimeType,o=t.discoTimings;return r(r({},e),{discontinuitySequenceTiming:r(r({},e.discontinuitySequenceTiming),((i={})[n]=o,i))})}(e,t.payload)},n[s.HlsActionType.SetPresentationTimeOffset]=function(e,t){return function(e,t){var i,n=t.discoSequenceNumber,o=t.presentationTimeOffset;return r(r({},e),{presentationTimeOffsets:r(r({},e.presentationTimeOffsets),((i={})[n]=o,i))})}(e,t.payload)},n[s.HlsActionType.SetTimestampRolloverPositions]=function(e,t){return function(e,t){return r(r({},e),{timestampRolloverPositions:t})}(e,t.payload)},n[s.HlsActionType.SetContentLocationId]=function(e,t){return function(e,t){return r(r({},e),{contentLocationId:t.locationId})}(e,t.payload)},n))},61895:function(e,t){"use strict";var i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};function n(e){var t={};return Object.keys(e).forEach(function(i){var n;Object.keys(null!=(n=e[i])?n:{}).forEach(function(n){t[n]=function(i,n){var r,o,a,s,u,c,l,d,h,p;return{startTime:Math.max(null!=(a=null==(o=null==(r=e[n])?void 0:r[i])?void 0:o.startTime)?a:-1/0,null!=(u=null==(s=t[i])?void 0:s.startTime)?u:-1/0),endTime:Math.min(null!=(d=null==(l=null==(c=e[n])?void 0:c[i])?void 0:l.endTime)?d:1/0,null!=(p=null==(h=t[i])?void 0:h.endTime)?p:1/0)}}(n,i)})}),t}Object.defineProperty(t,"__esModule",{value:!0}),t.getContentLocationId=t.getPresentationTimeOffset=t.getMergedDiscontinuityTimings=t.getFirstDiscoSequenceTiming=t.getDiscoSequenceTimings=t.getDiscoSequenceTiming=t.getCustomTags=t.getDefaultLanguages=t.getEndlist=t.getIsLowLatencyPlaylist=t.getPlaylistType=void 0,t.getHlsState=function(e){return e.hls},t.computeMergedDiscontinuityTimings=n,t.areDiscontinuitiesMisaligned=function(e,t,i){if(void 0===i&&(i=2),t.length<=1||!e.discontinuitySequenceTiming)return!1;var r=function(e,t){return t.reduce(function(t,i){return i in e&&(t[i]=e[i]),t},{})}(e.discontinuitySequenceTiming,t),o=n(r);return 1!==Object.keys(o).length&&!Object.keys(o).every(function(e,n){var a=o[e];return t.every(function(t){var s,u=null==(s=r[t])?void 0:s[e];if(!u)return!0;var c=Math.abs(u.startTime-a.startTime),l=Math.abs(u.endTime-a.endTime);return 0===n?l<=i:n===Object.keys(o).length-1?c<=i:c<=i&&l<=i})})},t.getPlaylistType=function(e){return e.playlistType},t.getIsLowLatencyPlaylist=function(e){return e.isLowLatencyPlaylist},t.getEndlist=function(e){return e.endlist},t.getDefaultLanguages=function(e){return e.defaultLanguages},t.getCustomTags=function(e){return e.customTags},t.getDiscoSequenceTiming=function(e,t,n){var r,o;return(null==(o=null==(r=e.discontinuitySequenceTiming)?void 0:r[t])?void 0:o[n])?i({},e.discontinuitySequenceTiming[t][n]):null},t.getDiscoSequenceTimings=function(e,t){var n;return(null==(n=e.discontinuitySequenceTiming)?void 0:n[t])?i({},e.discontinuitySequenceTiming[t]):null},t.getFirstDiscoSequenceTiming=function(e){var i,n=(0,t.getMergedDiscontinuityTimings)(e);return null!=(i=n[Object.keys(n)[0]])?i:{startTime:0,endTime:0}},t.getMergedDiscontinuityTimings=function(e){var t;return n(null!=(t=e.discontinuitySequenceTiming)?t:{})},t.getPresentationTimeOffset=function(e,t){return e.presentationTimeOffsets[t]},t.getContentLocationId=function(e){return e.contentLocationId}},45861:function(e,t){"use strict";var i;Object.defineProperty(t,"__esModule",{value:!0}),t.HlsActionType=void 0,function(e){e.SetMasterPlaylistString="@instance/hls/setmasterplayliststring",e.SetPlaylistType="@instance/hls/setplaylisttype",e.SetIsLowLatencyPlaylist="@instance/hls/setislowlatencyplaylist",e.SetEndlist="@instance/hls/setendlist",e.SetDefaultLanguages="@instance/hls/setsefaultlanguages",e.SetCustomTags="@instance/hls/setsustomtags",e.SetDiscoTimings="@instance/hls/setdiscotimings",e.SetPresentationTimeOffset="@instance/hls/setpresentationtimeoffset",e.SetTimestampRolloverPositions="@instance/hls/settimestamprolloverpositions",e.SetContentLocationId="@instance/hls/setcontentlocationid"}(i||(t.HlsActionType=i={}))},5671:function(e,t,i){"use strict";
1Object.defineProperty(t,"__esModule",{value:!0}),t.setSegmentInfos=function(e,t){return(0,n.createAction)(r.SegmentInfoMapActionType.SetSegmentInfos,{qualityPath:e,updatedEntry:t})},t.updateSegmentInfos=function(e,t){return(0,n.createAction)(r.SegmentInfoMapActionType.UpdateSegmentInfos,{qualityPath:e,updatedEntry:t})};var n=i(35267),r=i(49713)}},function(e){return e(e.s=81232)}])},195:function(e){"use strict";self,e.exports=(self.webpackChunkbitmovin_player=self.webpackChunkbitmovin_player||[]).push([[727],{3089:function(e,t){var i;Object.defineProperty(t,"__esModule",{value:!0}),t.LiveLatencyControlAction=void 0,function(e){e[e.None=0]="None",e[e.PlaybackRate=1]="PlaybackRate",e[e.Seek=2]="Seek"}(i||(t.LiveLatencyControlAction=i={}))},34377:function(e,t,i){var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.LiveLatencyService=void 0,t.mergeLowLatencyConfigs=u;var r=i(3714),o=i(23068),a=i(3089),s=i(18734);function u(e,t){void 0===e&&(e={}),void 0===t&&(t={});var i=n({},e);return(0,o.isDefined)(t.targetLatency)&&(i.targetLatency=t.targetLatency),t.catchup&&(i.catchup=n(n({},e.catchup||{}),t.catchup)),t.fallback&&(i.fallback=n(n({},e.fallback||{}),t.fallback)),i}t.LiveLatencyService=function(){function e(e){var t,i,n,c;if(this.Fv={mode:r.LatencyMode.Idle,requiredAction:a.LiveLatencyControlAction.PlaybackRate,actionParam:1},this.Ev=e,this.Gv=new s.LiveLatencyTracker(e),this.Hv=e.settings.LOW_LATENCY_BUFFER_GUARD,(0,o.isDefined)(null==(t=e.config.live)?void 0:t.lowLatency)||(0,o.isDefined)(null==(i=e.sourceContext.source.live)?void 0:i.lowLatency)){var l=u(null==(n=e.config.live)?void 0:n.lowLatency,null==(c=e.sourceContext.source.live)?void 0:c.lowLatency);this.Iv=u(this.Kv(),l)}}return e.prototype.Kv=function(){return{targetLatency:this.Ev.settings.LOW_LATENCY_DEFAULT_TARGET_LATENCY,catchup:{playbackRate:this.Ev.settings.LOW_LATENCY_DEFAULT_CATCHUP_PLAYBACK_RATE,playbackRateThreshold:1/0,seekThreshold:1/0},fallback:{playbackRate:this.Ev.settings.LOW_LATENCY_DEFAULT_FALLBACK_PLAYBACK_RATE,playbackRateThreshold:1/0,seekThreshold:1/0}}},e.prototype.getLatency=function(){return this.Gv.getLatency()},e.prototype.getTargetLatency=function(){var e;return null==(e=this.Iv)?void 0:e.targetLatency},e.prototype.setTargetLatency=function(e){this.Iv=this.Iv||this.Kv(),this.Iv.targetLatency=e},e.prototype.setCatchupConfig=function(e){this.Iv=this.Iv||this.Kv(),this.Iv.catchup=n(n({},this.Kv().catchup),e)},e.prototype.getCatchupConfig=function(){var e;return null==(e=this.Iv)?void 0:e.catchup},e.prototype.setFallbackConfig=function(e){this.Iv=this.Iv||this.Kv(),this.Iv.fallback=n(n({},this.Kv().fallback),e)},e.prototype.getFallbackConfig=function(){var e;return null==(e=this.Iv)?void 0:e.fallback},e.prototype.getStatus=function(e,t){var i=this.Gv.getLatency();return!this.isConfigured()||this.Jv||i===1/0?{mode:r.LatencyMode.Suspended,requiredAction:a.LiveLatencyControlAction.None}:i<this.Iv.targetLatency?this.Lv(e,i):i>this.Iv.targetLatency?this.Mv(e,i,t):this.Fv},e.prototype.Lv=function(e,t){var i=this.Iv.targetLatency,n=this.Iv.fallback,o=t<i-n.seekThreshold,s=t<i-n.playbackRateThreshold;return o?{mode:r.LatencyMode.Fallback,requiredAction:a.LiveLatencyControlAction.Seek,actionParam:i}:e===r.LatencyMode.Fallback||s?{mode:r.LatencyMode.Fallback,requiredAction:a.LiveLatencyControlAction.PlaybackRate,actionParam:n.playbackRate}:this.Fv},e.prototype.Mv=function(e,t,i){var n=this.Iv.targetLatency,o=this.Iv.catchup,s=t>n+o.seekThreshold,u=t>n+o.playbackRateThreshold,c=i>this.Hv;return s?{mode:r.LatencyMode.Catchup,requiredAction:a.LiveLatencyControlAction.Seek,actionParam:n}:c&&(e===r.LatencyMode.Catchup||u)?{mode:r.LatencyMode.Catchup,requiredAction:a.LiveLatencyControlAction.PlaybackRate,actionParam:o.playbackRate}:this.Fv},e.prototype.reset=function(){this.Gv.reset(),this.Jv=!1},e.prototype.suspendControl=function(){this.Jv=!0},e.prototype.resumeControl=function(){this.Jv=!1},e.prototype.isConfigured=function(){return!!this.Iv},e.prototype.dispose=function(){this.reset(),this.Gv.dispose()},e}()}
1,18734:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.LiveLatencyTracker=void 0;var n=i(80813),r=i(3714),o=i(89927);t.LiveLatencyTracker=function(){function e(e){var t=this;this.iV=function(e){e.wallClockTime&&t.fV===1/0&&(t.fV=e.wallClockTime-(0,o.toMilliSeconds)(e.playbackTime))},this.cV=e,this.dV=e.renderer,this.eV=e.eventHandler,this.fV=1/0,this.eV.on(r.PlayerEvent.SegmentPlayback,this.iV),this.gV=e.serviceManager.get(n.ServiceName.SynchronizedTimeService,this.cV.sourceContext.sourceIdentifier)}return e.prototype.hV=function(){return Date.now()+this.gV.getTimeDifference()},e.prototype.getLatency=function(){if(this.fV===1/0)return 1/0;var e=this.dV.getCurrentTime(),t=(0,o.toMilliSeconds)(e)+this.fV,i=this.hV();return(0,o.toSeconds)(Math.round(i-t))},e.prototype.reset=function(){this.fV=1/0},e.prototype.dispose=function(){this.eV.off(r.PlayerEvent.SegmentPlayback,this.iV),this.reset()},e}()},89659:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.verifyLlHlsSegment=function(e,t){var i,o,s,u=null==(o=null==(i=t.getRepresentationById(e.getRepresentationId()))?void 0:i.SegmentList)?void 0:o[0].SegmentURL;if(!u)return n.SegmentVerificationResult.Publish;var c=(0,r.findFromEnd)(u,function(t){return t._mediaSequence===e.getSegmentInfo().mediaSequence});if(!c||a(e,c))return n.SegmentVerificationResult.Publish;var l=(null!=(s=c._parts)?s:[]).find(function(t){return a(e,t)});return l?l.isPreloadHint?n.SegmentVerificationResult.Park:n.SegmentVerificationResult.Publish:n.SegmentVerificationResult.Drop},t.applyUpdatedSegmentInfoProps=function(e,t){var i,n,o,s,u=null==(n=null==(i=t.getRepresentationById(e.getRepresentationId()))?void 0:i.SegmentList)?void 0:n[0].SegmentURL;if(u){var c=(0,r.findFromEnd)(u,function(t){return t._mediaSequence===e.getSegmentInfo().mediaSequence}),l=(null!=(o=null==c?void 0:c._parts)?o:[]).find(function(t){return a(e,t)});if(c&&l){var d=e.getSegmentInfo();d.discontinuitySequenceNumber=c._discontinuitySequenceNumber,c._discontinuity&&(d.isDiscontinuityStart=c._discontinuity),c._init&&(d.init=null!=(s=d.init)?s:{isInitSegment:!0,internalRepresentationId:e.getRepresentationId(),url:c._init.url},d.init.url=c._init.url,d.init.byteRange=c._init.byteRange,d.init.key=c._init.key),c._key?d.key=c._key:delete d.key,e.setDuration(l.duration)}}};var n=i(66790),r=i(74853),o=i(19541);function a(e,t){var i="uri"in t,n=e.getUrl().includes(i?t.uri:t._media),r=(0,o.compareValues)(e.getSegmentInfo().byteRange,i?t.byteRange:t._byteRange);return n&&r}},95940:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.LowLatencyApiFactory=void 0,t.LowLatencyApiFactory=function(){function e(){}return e.create=function(e){return new(function(){function t(){}return t.prototype.getLatency=function(){return e.getLatency()},t.prototype.setTargetLatency=function(t){e.setTargetLatency(t)},t.prototype.getTargetLatency=function(){return e.getTargetLatency()},t.prototype.setCatchupConfig=function(t){e.setCatchupConfig(t)},t.prototype.getCatchupConfig=function(){return e.getCatchupConfig()},t.prototype.setFallbackConfig=function(t){e.setFallbackConfig(t)},t.prototype.getFallbackConfig=function(){return e.getFallbackConfig()},t}())},e}()},61487:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.LowLatencyDefinition=void 0;var n=i(62756),r=i(3089),o=i(34377),a=i(89659),s=i(95940);t.LowLatencyDefinition={name:n.ModuleName.LowLatency,module:function(){return{LowLatencyApiFactory:s.LowLatencyApiFactory,LiveLatencyService:o.LiveLatencyService,LiveLatencyControlAction:r.LiveLatencyControlAction,verifyLlHlsSegment:a.verifyLlHlsSegment,applyUpdatedSegmentInfoProps:a.applyUpdatedSegmentInfoProps}}},t.default=t.LowLatencyDefinition}},function(e){return e(e.s=61487)}])},815:function(e){"use strict";self,e.exports=(self.webpackChunkbitmovin_player=self.webpackChunkbitmovin_player||[]).push([[737],{1765:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.BufferMimeCodecMap=void 0;var n=i(77753),r=i(91678),o=i(46151),a=i(33436),s=i(94685),u=i(85434);t.BufferMimeCodecMap=function(){function e(e,t){this.mV={},this.nV=e,this.oV=t}return e.prototype.pV=function(e){var t,i,a=null==(t=this.nV)?void 0:t.getState();(0,n.isInstanceState)(a)&&c(this.oV)&&((0,o.getMetricsState)(a)[e]||null==(i=this.nV)||i.dispatch((0,r.initializeMetricsForMimeType)(e,this.oV)))},e.prototype.qV=function(e){var t;null==(t=this.nV)||t.dispatch((0,r.removeMetricsForMimeType)(e))},e.prototype.add=function(e,t){var i;this.mV[e]=t,this.pV(e),null==(i=this.nV)||i.dispatch((0,r.addMetricsValue)(e,a.MetricType.StalledSeconds,0))},e.prototype.remove=function(e){var t=this,i=u.MimeTypeHelper.getMediaType(e);
vendor: 14,324 bytes, line 1
1Object.keys(this.mV).forEach(function(e){u.MimeTypeHelper.getMediaType(e)===i&&(t.qV(e),delete t.mV[e])})},e.prototype.has=function(e,t){var i=this,n=u.MimeTypeHelper.getMediaType(e),r=u.MimeTypeHelper.extractContainerType(e);return Object.keys(this.mV).some(function(o){var a=u.MimeTypeHelper.getMediaType(o),s=u.MimeTypeHelper.extractContainerType(o);return a===n&&s===r&&t===i.mV[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(i){return e(i,t.entries()[i])})},e.prototype.entries=function(){return this.mV},e.prototype.dispose=function(){this.mV={},this.nV=void 0,this.oV=void 0},e}();var c=function(e){return(0,s.isObject)(e)}},98331:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.GapHandler=void 0;var n=i(3714),r=i(77753),o=i(87827),a=i(86897),s=i(15971),u=i(21513),c=i(85434),l=i(15487),d=i(60877),h=i(88844),p=i(19274),f=i(80354),g=i(82889),m=[p.MediaElementEvent.seeking,p.MediaElementEvent.seeked,p.MediaElementEvent.pause,p.MediaElementEvent.playing,p.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,i,u=this;this.BV=!1,this.play=function(){u.CV=Date.now()},this.GV=function(){if(!u.rV.isDisposed&&void 0!==u.sV){var e=u.sV.paused,t=u.sV.seeking,i=u.XV(u.sV.currentTime),n=u.FV(),r=u.EV();e||t&&!i||n||(u.uV++,r||u.HV())}},this.HV=function(){var e,t=u.rV.store.getState();if((0,r.isInstanceState)(t)&&u.sV){var i=(0,o.getPlayerState)(t);((0,o.getIsSeeking)(i)||(null==(e=u.sV)?void 0:e.seeking))&&!u.XV(u.sV.currentTime)||u.UV()}},this.IV=function(){var e=(0,s.getSourceState)(u.rV);e&&!(0,a.getIsTimestampRollingOver)(e)&&u.UV()},this.JV=function(){u.AV=void 0},this.NV=function(){if(u.xV=Date.now(),u.sV&&!u.sV.paused&&!u.sV.seeking){u.zV||(u.DV(),u.zV=!0);var e=u.rV.renderer.getCurrentTime(!0);if(u.KV(e))u.MV();else{var t=u.rV.renderer.getVideoElementBufferedRanges();if(t.length>1&&!u.AV){var i=u.rV.settings.MIN_SIZE_FOR_GAP_SKIPPING;u.AV=function(e,t,i){for(var n=0;n<e.length-1;n++){var r=e[n].end,o=e[n+1].start;if(r>t&&o>r&&o-r>=i)return{start:r,end:o}}}(t,e,i)}else u.LV(e)?(u.tV++,u.HV()):e===u.vV?u.tV++:(u.tV=0,u.uV=0,u.vV=e)}}},this.OV=function(){u.tV=0,u.uV=0,(0,h.clearTimeoutIfDefined)(u.wV),u.wV=-1},this.PV=function(e){if(u.sV&&!u.BV){var t=u.rV.renderer.getVideoElementBufferedRanges().sort(function(e,t){return e.start-t.start}),i=u.rV.renderer.getCurrentTime(!0),n=y(t,i);if(u.tV=0,u.uV=0,u.wV=-1,void 0!==n&&i===e){var r=n.start;u.rV.logger.debug("Skipping gap from ".concat(i," to ").concat(r)),u.QV(i,r)}}},this.rV=e,this.sV=e.videoElement,this.xV=0,this.tV=0,this.uV=0,this.CV=0,this.zV=!1,this.AV=void 0,null==(t=this.sV)||t.addEventListener(p.MediaElementEvent.timeupdate,this.NV),null==(i=this.sV)||i.addEventListener(p.MediaElementEvent.play,this.play),this.rV.eventHandler.on(n.PlayerEvent.Seek,this.JV)}return e.prototype.DV=function(){var e,t,i;null==(e=this.sV)||e.addEventListener(p.MediaElementEvent.waiting,this.HV),null==(t=this.sV)||t.addEventListener(p.MediaElementEvent.stalled,this.IV);for(var n=0,r=m;n<r.length;n++){var o=r[n];null==(i=this.sV)||i.addEventListener(o,this.OV)}this.yV=window.setInterval(this.GV,250)},e.prototype.EV=function(){return Date.now()-this.CV<500},e.prototype.FV=function(){return Date.now()-this.xV<=1e3},e.prototype.KV=function(e){return!(!this.AV||this.BV)&&(function(e,t){return e>t.start&&e<t.end}(e,this.AV)||function(e,t,i){return!(e<=0)&&i.start>t&&i.start-e<=t}(this.rV.settings.PROACTIVE_GAP_SKIP_DISTANCE_SECONDS,e,this.AV)||function(e,t){return e>t.end&&(0,d.shouldResetCurrentTimeAfterBufferUnderrun)()}(e,this.AV))},e.prototype.LV=function(e){return 5===this.tV&&e===this.vV},e.prototype.MV=function(){if(this.sV&&this.AV){var e=this.rV.renderer.getCurrentTime(!0),t=Math.max(e+.01,this.AV.end);this.rV.logger.debug("Skipping gap proactively from ".concat(e," to ").concat(t)),this.QV(e,t)}},e.prototype.QV=function(e,t){var i=this;this.BV=!0,this.AV=void 0,this.RV(e,t).then(function(){return i.rV.renderer.setCurrentTime(t+g.Ranges.TIME_FUDGE_FACTOR)}).then(function(t){return i.rV.logger.debug("Jumped buffer gap from ".concat(e," to ").concat(t))}).catch(function(n){return i.rV.logger.debug("Failed to skip buffer gap from ".concat(e," to ").concat(t),n)}).finally(function(){i.BV=!1,i.AV=void 0})},e.prototype.RV=function(e,t){if(!(0,u.getCapabilities)().isTizen)return Promise.resolve();var i=this.SV();if(void 0===i)return Promise.resolve();var n=y(this.rV.renderer.getBufferedRanges(i).sort(function(e,t){return e.start-t.start}),e);return t!==(null==n?void 0:n.start)?(this.rV.logger.debug("Clearing video data from ".concat(e," to ").concat(t," to ensure gap can be skipped")),this.rV.renderer.removeData(i,e,t)):Promise.resolve()},e.prototype.SV=function(){var e;return null==(e=this.rV.segmentInfoService)?void 0:e.getSegmentControllerMimeTypes().find(function(e){return c.MimeTypeHelper.isVideo(e)})},e.prototype.TV=function(e,t,i){for(var n=g.Ranges.findGaps(e,i),r=0;r<n.length;r++){var o=n.start(r),a=n.end(r);if(t-o<4&&t-o>2)return{start:o,end:a}}},e.prototype.UV=function(){if(!(this.wV>-1)&&this.zV&&this.sV){var e=this.sV.buffered,t=this.sV.currentTime,i=g.Ranges.findNextRange(e,t),n=this.rV.settings.MIN_SIZE_FOR_GAP_SKIPPING;if(0===i.length){var r=this.TV(e,t,n);if(r)return this.rV.logger.debug("Encountered a gap in video from ".concat(r.start," to ").concat(r.end,". Seeking to ").concat(t,"...")),this.uV=0,void this.YV(t);var o=(0,f.findNextRangeForGap)(t,e),a=o.isNearEndOfBufferedRange,s=o.nextRangeStart;return a&&isFinite(s)?(this.rV.logger.debug("Playback stalled because of a very small gap. Seeking to ".concat(s,"...")),this.uV=0,void this.YV(s)):void(this.uV>10&&(this.uV=0,this.VV(t,this.sV)))}if(!function(e,t,i){if(0===i)return!1;var n=g.Ranges.findNextRange(e,t);if(0===n.length)return!1;var r=g.Ranges.findRangeForTime(e,t),o=r.length?r.end(0):t;return n.start(0)-o<i}(e,t,n)){var u=i.start(0)-t;this.rV.logger.debug("setTimer: stopped at: ".concat(t,", setting timer for: ").concat(u,", seeking to: ").concat(i.start(0))),this.wV=window.setTimeout(this.PV.bind(this),u,this.rV.renderer.getCurrentTime(!0))}}},e.prototype.VV=function(e,t){this.rV.logger.debug("currentTime not advancing from ".concat(e," although the video element is neither paused nor seeking")),this.WV(e,t),t.eventHandler.triggerEvent(p.MediaElementEvent.currenttimenotadvancing)},e.prototype.WV=function(e,t){var i=(0,u.getCapabilities)(),n=i.isSafari,r=i.isTizen,o=i.isWpeWebKit,a=i.isPlayStation5;if(e>t.duration&&!n)this.YV(t.duration);else if(this.rV.settings.QJY_BROWSER_WORKAROUND||r||(0,l.isWebOs2016)()||(0,l.isWebOs2022OrNewer)()||o)this.YV(e+.01);else{var s=a;this.YV(e,s)}},e.prototype.XV=function(e){if(!this.sV)return!1;for(var t=this.sV.buffered,i=0;i<t.length;i++)if(t.end(i)===e)return!0;return!1},e.prototype.shutdown=function(){var e,t,i,r,o;null==(e=this.sV)||e.removeEventListener(p.MediaElementEvent.waiting,this.HV),null==(t=this.sV)||t.removeEventListener(p.MediaElementEvent.stalled,this.IV),null==(i=this.sV)||i.removeEventListener(p.MediaElementEvent.timeupdate,this.NV),null==(r=this.sV)||r.removeEventListener(p.MediaElementEvent.play,this.play),this.rV.eventHandler.off(n.PlayerEvent.Seek,this.JV);for(var a=0,s=m;a<s.length;a++){var u=s[a];null==(o=this.sV)||o.removeEventListener(u,this.OV)}(0,h.clearIntervalIfDefined)(this.yV),this.OV()},e.prototype.YV=function(e,t){if(void 0===t&&(t=!1),this.sV&&(this.sV.currentTime!==e||t))try{this.sV.currentTime=e}catch(t){this.rV.logger.debug("GapHandler failed to set currentTime on video element to ".concat(e),t)}},e}()},80354:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.findNextRangeForGap=function(e,t){for(var i=!1,r=1/0,o=0;o<t.length;o++){var a=t.start(o),s=t.end(o),u=e+2*n.Ranges.TIME_FUDGE_FACTOR;if(i&&!isFinite(r)){r=a;break}a<e&&s>e&&u>s&&(i=!0)}return{isNearEndOfBufferedRange:i,nextRangeStart:r}};var n=i(82889)},79323:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.MSERenderer=void 0;var n=i(4524),r=i(66790),o=i(40306),a=i(3336),s=i(80813),u=i(3714),c=i(44468),l=i(33468),d=i(7387),h=i(23690),p=i(15971),f=i(21513),g=i(93204),m=i(94685),y=i(34841),v=i(78877),S=i(87244),b=i(84568),E=i(85434),T=i(23068),_=i(19274),A=i(68925),P=i(86897),M=i(1765),I=i(98331),R=i(48873),C=i(65940),O=i(10344);t.MSERenderer=function(){function e(e){var t=this;this.context=e,this.nw=0,this.waitingForSeekedPromise=null,this.ww=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 i=e.find(function(e){return t.ow.hasOwnProperty(e)});return i?t.setTimestampOffset(i,t.ow[i]):t.setTimestampOffset(e[0],0)},this.xw=function(){if(t.video){var e=t.video.isPictureInPicture()?c.ViewMode.PictureInPicture:c.ViewMode.Inline;t.context.store.dispatch((0,h.setPlayerViewMode)(e))}},this.yw=function(e){e.time&&e.time>0&&(t.nw=0)},this.postBufferRemoval=function(e,i,n){t.logger.debug("successfully removed buffer for ".concat(e," (from  ").concat(i," to ").concat(n,")"))},this.Cw=(0,b.memoize)(this.Dw.bind(this)),this.logger=e.logger,this.video=e.videoElement,this.settings=e.settings,this.Xv=Promise.resolve(),this.eventHandler=void 0,this.ow={},this.Yv=new M.BufferMimeCodecMap(e.store,e.settings),this.savedCurrentTime=0,this.playerEventHandler=e.eventHandler,this.shutdownPromise=Promise.resolve(),this.init(!0)}return e.prototype.createMSEWrapper=function(){return new R.MSEWrapper(this.context)},e.prototype.tw=function(e){return e?this.vw():this.uw()},e.prototype.uw=function(){var e=this;return function(){var t;return null==(t=e.mse)?void 0:t.createNewMSE()}},e.prototype.vw=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.qw=Promise.resolve(),this.mse=this.createMSEWrapper(),this.Xv=this.Xv.catch(function(e){return t.context.logger.debug("Caught error during MSE recreation",e)}).then(this.tw(e)),this.av=!0,this.segmentQueues={},this.setCurrentTimeContext=void 0,this.setCurrentTimeDelayedContext=void 0,this.rw=new Map,this.sw=new Map,this.mw=new I.GapHandler(this.context),null==this.eventHandler&&this.video&&(this.eventHandler=new O.VideoEventHandler(this.video),this.eventHandler.on(_.MediaElementEvent.timeupdate,this.yw)),this.on(_.MediaElementEvent.webkitpresentationmodechanged,this.xw),this.playerEventHandler.on(u.PlayerEvent.Seek,this.ww)},e.prototype.trackRendererError=function(e){this.nw++,this.nw>=this.settings.MAX_CONSECUTIVE_RENDERER_ERRORS&&this.context.eventHandler.fireError(new a.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,p.getSourceStore)(this.context))||t.dispatch((0,A.setRendererRanges)(e,this.getOverallBufferedRanges(e)))},e.prototype.addBuffer=function(e,t){var i,n=this;if(!this.mse)return!1;this.Yv.add(e,t);var r=!!this.mse.addBuffer(e,t,function(){return n.updateRendererRangesInStore(e)});return r&&(this.mse.addUpdateEndCallback(e,function(){var t;return null==(t=n.setCurrentTimeDelayedContext)||t.reevaluateDataInBuffer(),n.rw.set(e,!1)}),this.segmentQueues[e]=[],null==(i=(0,p.getSourceStore)(this.context))||i.dispatch((0,A.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(s.ServiceName.ManifestService,function(i){var n=i.getContentProtectionForAdaptationSet(e).flatMap(function(e){var i=l.KeySystemKind[e.name.toUpperCase()],n=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:n,systemName:i,kid:[]}})});t.addDrmInitData(n)},void 0,this.context.sourceContext.sourceIdentifier)},e.prototype.appendData=function(e){var t=this;return this.addDrmInitData(e.getDrmInitData()),this.addSegmentToSegmentQueue(e),this.qw=this.qw.catch(function(){}).then(function(){return t.processSegmentQueues()}),this.qw},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,i;return null!=(i=null==(t=this.mse)?void 0:t.getBufferedRanges(e))?i:[]},e.prototype.getVideoElementBufferedRanges=function(){return(0,n.getBufferedRanges)(this.video)},e.prototype.getOverallBufferedRanges=function(e){if(!this.mse||!this.segmentQueues.hasOwnProperty(e))return[];var t=n.BufferRangeHelper.getRangesFromQueue(this.segmentQueues[e],this.settings.GAP_TOLERANCE);return t=t.concat(this.getBufferedRanges(e)),n.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.zw=function(e){var t=(0,p.getSourceState)(this.context);if(!t)return[];var i=(0,P.getBufferStateMap)(t);return i?(0,P.getRendererBufferedRanges)(i,e):[]},e.prototype.getEndOfBufferTime=function(){var e=this,t=[];
1if(this.segmentQueueMimeTypes.forEach(function(i){var n=e.zw(i);if(n.length>0){var r=n[n.length-1].end;t.push(r)}}),0!==t.length)return Math.min.apply(Math,t)},e.prototype.removeDataFromSegmentQueues=function(e,t,i){var n=this;void 0===t&&(t=-1/0),void 0===i&&(i=1/0),this.segmentQueues.hasOwnProperty(e)&&(this.segmentQueues[e]=this.segmentQueues[e].filter(function(r){var o=r.getDuration(),a=r.getPlaybackTime(),s=r.getRepresentationId().representationId,u=r.isInit()||a<t||a+o>i;return n.logger.debug("[MSERenderer][".concat(e,"][").concat(s,"] Removing segment from queue [").concat(!u,"]. ")+"Clearing from ".concat(t," to ").concat(i,". Segment: [playbackTime=").concat(r.getPlaybackTime(),", ")+"duration=".concat(r.getDuration(),", url=").concat(r.getUrl(),"]")),u}),this.updateRendererRangesInStore(e))},e.prototype.removeData=function(e,t,i){return this.mse?(void 0===t&&void 0===i&&this.saveCurrentTime(),this.removeDataFromSegmentQueues(e,t,i),this.mse.removeFromBuffer(e,t,i,this.postBufferRemoval)):Promise.reject()},e.prototype.getDroppedVideoFrames=function(){var e,t,i,n,r;return null!=(r=null!=(i=null==(t=null==(e=this.video)?void 0:e.getVideoPlaybackQuality())?void 0:t.droppedVideoFrames)?i:null==(n=this.video)?void 0:n.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,S.isSwitchingBufferBlocks)((0,p.getSourceStore)(e.context)))return e.ready();throw t}):Promise.resolve()},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.bv=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 i=Promise.resolve();this.isMSEOpen()||this.Hw(e)||(this.logger.debug("reopen MSE on setCurrentTime"),i=this.reOpenMse());var n=i.then(function(){return t.setCurrentTimeInternal(e).catch(function(i){return t.logger.debug("could not set time ".concat(e," on video element"),i),t.getCurrentTime()}).finally(function(){return t.av=!1})});return this.setCurrentTimeContext={time:e,isInitialSeek:this.av,promise:n},n},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:0!==this.savedCurrentTime&&this.Aw()?this.savedCurrentTime:(this.savedCurrentTime=0,this.getCurrentVideoTime())},e.prototype.Aw=function(){var e;return!this.hasDataInSourceBuffers()&&!(null==(e=this.mse)?void 0:e.isBufferRemovalPending())||!(!(0,S.isSwitchingBufferBlocks)((0,p.getSourceStore)(this.context))&&this.Hw(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 i=this.video.videoWidth,n=this.video.videoHeight;this.pw||(this.pw=document.createElement("canvas"),this.pw.id="snapshotHiddenCanvas"),this.pw.width=i,this.pw.height=n;var r=this.pw.getContext("2d");null==r||r.drawImage(this.video.getWrappedElement(),0,0,i,n);var o=void 0;return("image/jpeg"===e||"image/webp"===e)&&(t=Math.max(t,0),t=Math.min(t,1)),o=this.pw.toDataURL(e,t),{height:n,width:i,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.Bw=function(){return this.drmService?this.drmService.shutdownPromise:Promise.resolve()},e.prototype.ready=function(){var e=this;return this.shutdownPromise.then(function(){return e.Bw()}).then(function(){return e.mse||e.init(!1),e.Xv})},e.prototype.setTimestampOffset=function(e,t){var i=this;return this.mse?this.mse.setTimestampOffset(e,t).then(function(){i.ow[e]=t}):Promise.resolve()},e.prototype.shutdown=function(e){var t,i=this;if(!this.mse)return this.shutdownPromise;
vendor: 46,175 bytes, line 1
1for(var n in this.waitingForSeekedPromise=null,e&&this.saveCurrentTime(),this.segmentQueues)this.segmentQueues.hasOwnProperty(n)&&(delete this.segmentQueues[n],null==(t=(0,p.getSourceStore)(this.context))||t.dispatch((0,A.setRendererRanges)(n,[])));var r=this.mse;return this.shutdownPromise=this.shutdownPromise.then(function(){return r.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.mw&&(this.mw.shutdown(),this.mw=void 0),this.eventHandler&&!e&&(this.eventHandler.dispose(),this.eventHandler=void 0),this.rw.clear(),this.sw.clear(),this.shutdownPromise},e.prototype.release=function(){var e;for(var t in this.segmentQueues)this.segmentQueues.hasOwnProperty(t)&&null!==this.mse&&(delete this.segmentQueues[t],null==(e=(0,p.getSourceStore)(this.context))||e.dispatch((0,A.setRendererRanges)(t,[])));return this.Yv.dispose(),this.mse&&this.mse.dispose(),this.Xv=Promise.resolve(),this.ow={},this.cancelSetCurrentTimeDelayed(),this.mw&&(this.mw.shutdown(),this.mw=void 0),this.off(_.MediaElementEvent.webkitpresentationmodechanged,this.xw),this.eventHandler&&(this.eventHandler.off(_.MediaElementEvent.timeupdate,this.yw),this.eventHandler.dispose(),this.eventHandler=void 0),this.waitingForSeekedPromise=null,this.playerEventHandler.off(u.PlayerEvent.Seek,this.ww),this.Cw.invalidate(),this.Bw()},e.prototype.on=function(e,t){var i;null==(i=this.eventHandler)||i.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(s.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.Cw("".concat(e,'; codecs="').concat(t,'"'))},e.prototype.Dw=function(e){return(0,C.shouldUseManagedMediaSource)(this.context.settings.PREFER_MANAGED_MEDIA_SOURCE)?window.ManagedMediaSource.isTypeSupported(e):"MediaSource"in window&&MediaSource.isTypeSupported(e)},e.prototype.Ew=function(){this.Zv&&(this.Zv.reject(Error("Cancelled pending end of stream.")),this.Zv=void 0)},e.prototype.Fw=function(){var e=this;return this.Zv=this.Zv||new y.Deferred,this.Zv.promise.then(function(){var t;return null==(t=e.mse)?void 0:t.endOfStream()}).catch(function(t){(0,m.isContextAvailable)(e.context)&&e.context.logger.debug(t)})},e.prototype.setEndOfStream=function(e){if(void 0===e&&(e=!0),!e)return this.Ew(),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.bv&&t&&!isNaN(t)&&this.cancelSetCurrentTimeDelayed(),this.setCurrentTimeDelayedContext?this.Fw():this.mse.endOfStream()},e.prototype.Gw=function(e){var t=this.Jw();for(var i in t){var n=t[i];if(n.start<=e&&n.end>=e)return!0}return!1},e.prototype.Hw=function(e,t){if(void 0===t&&(t=0),this.Gw(e))return!1;var i=this.getRangesInSourceBuffers();return!!i&&Object.keys(i).every(function(r){return(0,n.isInTimeRanges)(i[r],e,t)})},e.prototype.Iw=function(e,t){var i,r=null!=(i=this.getRangesInSourceBuffers())?i:{},o=Object.keys(r),a=function(e,t){return Object.keys(e).map(function(i){return e[i].find(function(e){return(0,n.isInTimeRanges)([e],t)})}).filter(T.isDefined)}(r,e);if(0===o.length||a.length<o.length)return NaN;var s=Math.min.apply(Math,a.map(function(e){var t;return null!=(t=null==e?void 0:e.end)?t:1/0}))-e;return s>=t?e:e-(t-s)},e.prototype.adjustTimeToNextCommonBufferStart=function(e){var t,i,n,r=this,o=null==(t=(0,p.getSourceState)(this.context))?void 0:t.drm,a=(0,v.getBufferEndSafetyMargin)(o);if(this.Hw(e,a))return e;var s=this.Hw(e),u=this.getFutureBufferStarts(e).filter(function(t){return t>=e}),c=0===u.length,l=null==(n=null==(i=(0,p.getSourceState)(this.context))?void 0:i.buffer.isLoadingRangeFinished)||n;if(s&&c){var d=this.Iw(e,a);return d===e||l?!isNaN(d)&&this.Hw(d)?(this.logger.debug("Adjusting current time away from end of buffer: ".concat(d)),d):e:(this.logger.debug("Not adjusting seek target, because there will be future data"),NaN)}if(!s&&c)return NaN;var h=u.find(function(e){return r.Hw(e,a)}),f=null!=h?h:Math.min.apply(Math,u);return h||l?(this.logger.debug("Adjusting current time to next safe buffer start: ".concat(f)),f):(this.logger.debug("Not adjusting seek target, as it is not safe across media types and there will be future data"),NaN)},e.prototype.getFutureBufferStarts=function(e){var t,i=this.getRangesInSourceBuffers();if(!i)return[];if(this.mse){var r=this.Jw();t=Object.keys(r).map(function(e){return r[e]})}else t=[];return n.BufferRangeHelper.getCommonBufferedRanges(i).filter(function(t){return t.getEnd()>=e&&!isNaN(t.getStart())}).filter(function(e){return t.every(function(t){return(0,n.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.Jw=function(){if(!this.mse||!this.mse.isBufferRemovalPending())return{};var e={};for(var t in this.segmentQueues){var i=this.mse.getRangePendingRemoval(t);this.segmentQueues.hasOwnProperty(t)&&i&&(e[t]=i)}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)===R.MediaSourceReadyState.open},e.prototype.Kw=function(e){var t,i=null==(t=(0,p.getSourceState)(this.context))?void 0:t.drm;return this.context.serviceManager.maybeCall(s.ServiceName.DrmService,function(t){return t.maybeWaitForDrmLicense(e,i)},Promise.resolve())},e.prototype.addSegmentFromQueueToMse=function(e){var t=this;if(!this.mse)return Promise.resolve();var i=Promise.resolve();this.isMSEOpen()||(i=this.reOpenMse());var n=this.getHeadOfQueue(e);if(!n)return Promise.resolve();var o=n.getRepresentationId().representationId,a=n.getUrl();return this.context.logger.debug("[MSERenderer][".concat(e,"][").concat(o,"] Scheduling appendage to buffer [url=").concat(a,"], DRM key ID (").concat(n.getDrmKid(),")")),i.then(function(){return t.Kw(n)}).then(function(){return t.mse?t.segmentQueues[e].includes(n)?t.mse.addToBuffer(n).then(function(){var i=t.getHeadOfQueue(e)!==n;if(t.logger.debug("[MSERenderer][".concat(e,"][").concat(o,"] Appended segment to buffer [url=").concat(a,"]")),i){var r=t.segmentQueues[e][0],s=r?r.getUrl():"none";t.logger.debug("[MSERenderer][".concat(e,"][").concat(o,"] Skipping removal of [url=").concat(a,"] ")+"from segment queue as the queue head has unexpectedly changed to [url=".concat(s,"]"))}else t.segmentQueues[e].shift();t.drmService&&t.hasDataInSourceBuffers()&&!(0,S.isSwitchingBufferBlocks)((0,p.getSourceStore)(t.context))&&t.drmService.signalInitDataShouldBeAvailable()}):(t.logger.debug("[MSERenderer][".concat(e,"][").concat(o,"] Segment ").concat(n.getUrl()," no longer part of the queue - skipping appendage")),Promise.resolve()):Promise.reject(r.SOURCE_BUFFER_APPEND_STATUS.FAILURE)}).catch(function(i){if(t.logger.debug("[MSERenderer][".concat(e,"][").concat(o,"] Adding segment from queue to buffer failed"),i),i===r.SOURCE_BUFFER_APPEND_STATUS.FAILURE&&t.trackRendererError(n),t.mse&&i===r.SOURCE_BUFFER_APPEND_STATUS.QUOTA_EXCEEDED){t.rw.set(e,!0);var a=t.sw.get(e);return a||(a=new y.Deferred,t.sw.set(e,a)),t.mse.addOneUpdateEndCallback(e,a.resolve).then(function(){t.sw.delete(e),t.context.logger.debug("Appending segment after quota has been exceeded...")}),a.promise.then(function(){return t.processSegmentQueues()})}return t.mse?t.mse.queueActionOnBuffer(e,function(){return t.processSegmentQueues()}):Promise.reject(i)})},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.Lw=function(e){var t=this;this.segmentQueueMimeTypes.forEach(function(i){t.segmentQueues[i]=t.segmentQueues[i].filter(function(t){return t.getPlaybackTime()+t.getDuration()>=e}),t.updateRendererRangesInStore(i),t.rw.set(i,!1)}),this.sw.forEach(function(e){return e.reject()}),this.sw.clear()},e.prototype.resolvePendingEndOfStream=function(){this.Zv&&(this.Zv.resolve(),this.Zv=void 0)},e.prototype.setCurrentTimeInternal=function(e){var t=this;if(!this.mse)return Promise.reject("Couldn't set current time, MSE is not open");(function(e){var t=!1;return e.forEach(function(e){return t=t||e}),t})(this.rw)&&this.Lw(e);var i=this.mse.waitForBuffers().then(function(){return t.waitingForSeekedPromise}).then(function(){if(t.setCurrentTimeContext){if(t.setCurrentTimeContext.time!==e)return Promise.reject("A newer setting of change time has been scheduled.")}else t.setCurrentTimeContext={time:e,isInitialSeek:!1,promise:i};var n=t.adjustTimeToNextCommonBufferStart(e);return isNaN(n)?t.Mw(e):n}).then(function(e){var i,n,r,o,a=null!=(n=null==(i=t.video)?void 0:i.currentTime)?n:0,s=!t.isPaused();return(null==(r=t.setCurrentTimeContext)?void 0:r.isInitialSeek)&&s&&a>e?(t.logger.debug("Skip initial seek to ".concat(e," as playback has started and is already at ").concat(a)),o=Promise.resolve(a)):(t.logger.debug("set time on video element to ".concat(e)),o=t.seekOnVideoElement(e)),o.then(function(e){return t.resolvePendingEndOfStream(),e}).catch(function(i){return t.handleVideoSetCurrentTimeError(e,i)}).finally(function(){t.waitingForSeekedPromise=null,t.setCurrentTimeContext=void 0,t.savedCurrentTime=0})});return i},e.prototype.Mw=function(e){var t=this;this.context.logger.debug("Delaying seek, waiting for data in buffer for time ".concat(e));var i=(0,p.getSourceStore)(this.context);if(!i)return Promise.reject(Error("No source store available"));var n=new y.Deferred,r=(0,g.subscribe)(i)(function(e){return(0,P.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 i=t.adjustTimeToNextCommonBufferStart(e);isNaN(i)?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:i}):(r(),t.context.logger.debug("Re-evaluated delayed seek to ".concat(e,": Resolving with seek target ").concat(i)),t.setCurrentTimeDelayedContext=void 0,n.resolve(i))},deferred:n,unsubscribeFromSourceStore:r},n.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(i,n){t.video?(t.video.currentTime=e,i(t.video.currentTime)):n("No video reference")}),this.waitingForSeekedPromise},e.prototype.saveCurrentTime=function(){this.setCurrentTimeContext?this.savedCurrentTime=this.setCurrentTimeContext.time:this.savedCurrentTime=this.getCurrentVideoTime()},e.prototype.Nw=function(e){var t=this;return void 0===e&&(e=this.getCurrentTime()),this.shutdown(!1).then(function(){return t.ready()}).then(function(){t.Yv.forEach(function(e,i){t.addBuffer(e,i)||(t.context.logger.debug("Failed to create source buffer ".concat(e)),t.Yv.remove(e))})}).then(function(){t.setCurrentTime(e).then(function(){var e,i;return(null==(i=null==(e=t.context.serviceManager)?void 0:e.get(s.ServiceName.PlayerStateService))?void 0:i.isPlaying())?t.play():Promise.resolve()})})},e.prototype.Ow=function(e){var t,i=this,n=E.MimeTypeHelper.getMediaType(e);this.segmentQueueMimeTypes.forEach(function(e){var t;E.MimeTypeHelper.getMediaType(e)===n&&(delete i.segmentQueues[e],null==(t=(0,p.getSourceStore)(i.context))||t.dispatch((0,A.setRendererRanges)(e,[])))}),this.segmentQueues[e]=[],null==(t=(0,p.getSourceStore)(this.context))||t.dispatch((0,A.setRendererRanges)(e,[]))},e.prototype.changeBufferType=function(e,t,i){var n=this;if(this.Yv.update(e,t),this.Ow(e),this.mse&&this.mse.isChangeTypeSupported()){var r=!(i&&(0,f.getCapabilities)()[d.CapabilityKey.isEdgeChromium]);return this.mse.changeBufferType(e,t,r).then(function(){var i;return(i={})[e]=t,i}).catch(function(i){return n.logger.debug("Failed to change buffer type to ".concat(e," ").concat(t,":"),i),n.Nw().then(function(){return n.Yv.entries()})})}return this.Nw().then(function(){return n.Yv.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,i){var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])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 r,o=i(66790),a=i(40306),s=i(3336),u=i(25926),c=i(4224),l=i(3714),d=i(13531),h=i(75108),p=i(7387),f=i(68925),g=i(63879),m=i(15971),y=i(21513),v=i(34841),S=i(85434),b=i(15487),E=i(23068),T=i(41138),_=i(76340),A=i(60321),P=i(65940);function M(e){for(var t=[],i=0;i<(null==e?void 0:e.length);i++){var n="[".concat(e.start(i)," - ").concat(e.end(i),"]");t.push(n)}return t.toString()}!function(e){e.closed="closed",e.open="open",e.ended="ended"}(r||(t.MediaSourceReadyState=r={})),t.MSEWrapper=function(){function e(e){var t=this;this.Ww=function(e,i,n){t.logger.debug("successfully removed buffer for ".concat(e," (from  ").concat(i," to ").concat(n,")"))},this.waitForBuffer=function(e){return t.sourceBuffers.hasOwnProperty(e)?t.iw().then(function(){return t.sourceBuffers[e].ready()}):Promise.reject("No SourceBuffer for '".concat(e,"' available"))},this.jw=function(){t.logger.debug("[MSEWrapper][ManagedMediaSource] Start Streaming received, resuming loading"),t.Tw=!0},this.kw=function(){t.logger.debug("[MSEWrapper][ManagedMediaSource] Stop Streaming received, stopping loading"),t.Tw=!1},this.lw=function(e){t.logger.isLevelEnabled(d.LogLevel.DEBUG)&&t.logger.debug("Received bufferedChange event, Added Ranges: ".concat(M(e.addedRanges),", Removed Ranges: ").concat(M(e.removedRanges)))},e.videoElement&&(this.context=e,this.logger=e.logger,this.video=e.videoElement,this.sourceBuffers={},this.Rw=!1,this.Uw=Promise.resolve(),this.Tw=!0)}return e.prototype.getBufferedRanges=function(e){return this.sourceBuffers.hasOwnProperty(e)?this.sourceBuffers[e].bufferedRanges:[]},e.prototype.printDetailedBufferRange=function(e,t){var i;try{i=e.buffered}catch(e){return void this.logger.debug("".concat(t," buffer range: Error accessing buffered ranges"))}if(0!==i.length)for(var n=0;n<i.length;n++)this.logger.debug("".concat(t," buffer range [").concat(n,"]: ").concat(i.start(n)," - ").concat(i.end(n)));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,i){var n=this;if(this.mediaSource){if(this.Rw&&!this.sourceBuffers.hasOwnProperty(e))try{var r=this.mediaSource.addSourceBuffer(e+"; codecs="+t);this.sourceBuffers[e]=new A.SourceBufferWrapper(r,{mimeType:e,codec:t},function(t){i(t),n.context.logger.isLevelEnabled(d.LogLevel.DEBUG)&&n.printDetailedBufferRange(r,e)})}catch(i){return this.logger.debug("Could not add SourceBuffer for "+e+" with codecs "+t+":"+i),void this.context.eventHandler.dispatchEvent(l.PlayerEvent.Warning,new u.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 i=this.sourceBuffers[e];i&&(this.logger.debug("setting new source buffer [".concat(e,"] offset from ").concat(i.buffer.timestampOffset," to ").concat(t)),i.buffer.timestampOffset=t)},e.prototype.setTimestampOffset=function(e,t){return this.sourceBuffers.hasOwnProperty(e)?((0,E.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 i=this;return this.queueActionOnBuffer(e,function(){return i.updateTimestampOffset(e,t)}).catch(function(t){i.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.Vw=function(e,t,i){var n=this.sourceBuffers[e].buffer.buffered;return{start:this.getBufferRangeStart(n,t),end:this.getBufferRangeEnd(n,i)}},e.prototype.preBufferRemoval=function(e,t,i){this.logger.debug("removing buffer for ".concat(e," (from ").concat(t," to ").concat(i,")"))},e.prototype.removeBufferRange=function(e,t,i){this.preBufferRemoval(e,t,i),this.sourceBuffers[e].buffer.remove(t,i)},e.prototype.removeFromBuffer=function(e,t,i,n){var o=this;return void 0===n&&(n=this.Ww),this.queueActionOnBuffer(e,function(){var a,s,d;try{if(o.video&&o.video.currentTime>=0&&(null==(d=null==(s=null==(a=o.sourceBuffers[e])?void 0:a.buffer)?void 0:s.buffered)?void 0:d.length)>0){var h=o.Vw(e,t,i),p=h.start,f=h.end;if(p>=0&&f>p){if(o.sourceBuffers[e].removalPending=!0,o.sourceBuffers[e].rangePendingRemoval={start:p,end:f},!o.mediaSource||o.mediaSource.readyState===r.open){var g=o.sourceBuffers[e].onUpdateEnded().then(function(){o.sourceBuffers[e]&&(o.sourceBuffers[e].rangePendingRemoval=null,o.sourceBuffers[e].removalPending=!1,n(e,p,f))});return o.removeBufferRange(e,p,f),g}o.logger.debug("cannot remove buffer for ".concat(e," (from ").concat(p," to ").concat(f,"): MediaSource is not open")),o.addOneSourceOpenCallback(function(){o.removeFromBuffer(e,p,f,n).catch(function(t){o.logger.debug("Couldn't remove buffer from ".concat(p," to ").concat(f," for ").concat(e),t)})})}else o.logger.debug("Ignoring buffer clearing request for ".concat(e,", as the passed-in range is not valid: ").concat(p," to ").concat(f))}else o.logger.debug("Ignoring buffer clearing request for ".concat(e,", as there are no buffered ranges."))}catch(t){var m="".concat(c.WarningCode[c.WarningCode.PLAYBACK_WARNING],": Buffer clearing failed for ").concat(e,". Exception: ").concat(JSON.stringify(t));o.context.eventHandler.dispatchEvent(l.PlayerEvent.Warning,new u.PlayerWarning(c.WarningCode.PLAYBACK_WARNING,m))}return Promise.resolve()})},e.prototype.removeBuffer=function(e){var t=this,i=Promise.resolve(),r=this.sourceBuffers[e];if(!r||!this.mediaSource)return i;if(this.isMediaSourceOpen())try{null==r||r.buffer.abort()}catch(e){return this.logger.debug("Could not abort last action on buffer",n({},e)),Promise.resolve()}if(S.MimeTypeHelper.isSubtitle(e))i=i.then(function(){return t.removeFromBuffer(e).catch(function(e){t.logger.debug("Error removing buffer data",e)})});else try{this.mediaSource&&this.mediaSource.removeSourceBuffer(r.buffer)}catch(t){this.logger.debug("Error while trying to remove ".concat(e," source buffer."),t)}return this.Xw(e),i},e.prototype.Xw=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)===r.open},e.prototype.Yw=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 i in this.sourceBuffers)this.sourceBuffers.hasOwnProperty(i)&&t.push(this.removeBuffer(i));return Promise.all(t).then(function(){e.sourceBuffers={},e.logger.debug("Removed all SourceBuffers")})},e.prototype.tearDownMediaSource=function(){var e=this;return this.Uw=this.Uw.then(function(){return e.Yw()}).then(function(){e.mediaSource?e.Zw():e.logger.debug("Media source has already been removed.")}),this.Uw},e.prototype.Zw=function(){var e;if(this.video)if(null!==this.video.getWrappedElement()){var t=(0,_.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.jw),this.mediaSource.removeEventListener("endstreaming",this.kw),this.mediaSource.removeEventListener("bufferedchange",this.lw)),this.Pw&&this.Pw.reject("MediaSource is being destroyed."),this.Pw=void 0,this.Qw=void 0,t===this.video.src&&(T.VideoElementUtil.removeSource(this.video),this.video.load()),this.mediaSource=void 0,this.Rw=!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,i=function(n){t.removeSourceOpenCallback(i),e(n)};this.addSourceOpenCallback(i)},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 i=(0,E.isNumber)(e)&&e>0?e:1/0;i===1/0&&t.context.settings.MAX_SAFE_MSE_DURATION!==1/0&&(0,E.isNumber)(t.context.settings.MAX_SAFE_MSE_DURATION)&&t.context.settings.MAX_SAFE_MSE_DURATION>0&&(i=t.context.settings.MAX_SAFE_MSE_DURATION),t.mediaSource.duration!==i&&(t.isMediaSourceOpen()?(t.logger.debug("Setting video duration on MSE: ".concat(t.mediaSource.duration," -> ").concat(i)),t.mediaSource.duration=i):t.logger.debug("Skipping setDuration (".concat(t.mediaSource.duration," -> ").concat(i,"), 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.Rw},Object.defineProperty(e.prototype,"readyState",{get:function(){return this.mediaSource?this.mediaSource.readyState:void 0},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,i,n;return null!=(n=null==(i=null==(t=this.sourceBuffers)?void 0:t[e])?void 0:i.rangePendingRemoval)?n:void 0},e.prototype.aw=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,i=e.getMimeType();return this.queueActionOnBuffer(i,function(){return t.mediaSource?t.mediaSource.readyState!==r.open?(t.logger.warn("MediaSource is not open (readyState="+t.mediaSource.readyState+")"),Promise.reject(o.SOURCE_BUFFER_APPEND_STATUS.FAILURE)):t.sourceBuffers.hasOwnProperty(i)?t.bw(e,i):(t.logger.log("sourceBuffers has no entry for "+i),Promise.reject(o.SOURCE_BUFFER_APPEND_STATUS.FAILURE)):(t.logger.debug("Could not queue action on SourceBuffer: MediaSource has been destroyed"),Promise.reject(o.SOURCE_BUFFER_APPEND_STATUS.FAILURE))})},e.prototype.bw=function(e,t){var i=e.getRepresentationId().representationId;try{this.logger.debug("[MSEWrapper][".concat(t,"][").concat(i,"] Adding segment to SourceBuffer [").concat(e.getUrl(),"]"));var n=this.sourceBuffers[t];return n.buffer.appendBuffer(e.getData()),n.onUpdateEnded()}catch(n){return this.cw(n,e,t,i)}},e.prototype.cw=function(e,t,i,n){var r;return this.logger.debug("[MSEWrapper][".concat(i,"][").concat(n,"] appendBuffer() failed"),e),"QuotaExceededError"===e.name?this.dw(i):((null==(r=this.video)?void 0:r.error)?this.ew(e,t,i,n):this.gw(e,t,i,n),this.logger.debug("[MSEWrapper][".concat(i,"][").concat(n,"] Failed appending segment to SourceBuffer"),e),Promise.reject(o.SOURCE_BUFFER_APPEND_STATUS.FAILURE))},e.prototype.dw=function(e){return this.logger.debug("QuotaExceededError, trying to remove old data from buffers..."),this.context.store.dispatch((0,f.setBufferMaxSize)(e,this.aw(e))),Promise.reject(o.SOURCE_BUFFER_APPEND_STATUS.QUOTA_EXCEEDED)},e.prototype.ew=function(e,t,i,n){var r;if(null==(r=this.video)?void 0:r.error){var o={mediaError:this.video.error,appendBufferError:e,mimeType:i,segmentUrl:t.getUrl(),codec:t.getCodec(),networkState:this.video.networkState,readyState:this.video.readyState};this.logger.warn("[MSEWrapper][".concat(i,"][").concat(n,"] appendBuffer() failed due to HTMLMediaElement.error: ").concat(this.video.error.code," - ").concat(this.video.error.message),o),this.fw(this.video.error.code)?this.context.eventHandler.fireError(new s.PlayerError(a.ErrorCode.PLAYBACK_ERROR,o,"Fatal media error detected: ".concat(this.video.error.message,". Player reload may be required."),this.context.sourceContext.sourceIdentifier)):this.context.eventHandler.dispatchEvent(l.PlayerEvent.Warning,new u.PlayerWarning(c.WarningCode.PLAYBACK_WARNING,"appendBuffer failed due to HTMLMediaElement.error: ".concat(this.video.error.code," - ").concat(this.video.error.message),o))}},e.prototype.fw=function(e){return[h.MediaErrorCode.MEDIA_ERR_DECODE,h.MediaErrorCode.MEDIA_ERR_SRC_NOT_SUPPORTED].includes(e)},e.prototype.gw=function(e,t,i,n){var r,o,a={appendBufferError:e,mimeType:i,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(i,"][").concat(n,"] appendBuffer() failed without HTMLMediaElement.error - treating as non-fatal"),a),this.context.eventHandler.dispatchEvent(l.PlayerEvent.Warning,new u.PlayerWarning(c.WarningCode.PLAYBACK_WARNING,"appendBuffer failed without HTMLMediaElement.error: ".concat(e.message||e.name||"Unknown error"),a))},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 source",t)})},e.prototype.waitForBuffers=function(){var e=Object.keys(this.sourceBuffers).map(this.waitForBuffer);return this.iw().then(function(){return Promise.all(e).then(function(){})})},e.prototype.queueActionOnBuffers=function(e){var t=this,i=new Promise(function(e,n){Promise.all(Object.keys(t.sourceBuffers).map(function(e){var n=t.queueActionOnBuffer(e,function(){});return t.queueActionOnBuffer(e,function(){return i}).then().catch(),n})).then(function(){return e()},n)}).then(function(){return e()}).then(function(){return Promise.all(Object.keys(t.sourceBuffers).map(function(e){return t.sourceBuffers[e].ready()})).then(function(){})});return i},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.hw=function(e){var t,i=this;return null==(t=this.Pw)||t.reject(e),this.Qw?this.Qw.then(function(){i.Pw=void 0}):Promise.reject(e)},e.prototype.iw=function(){var e,t=this;if(this.Qw)return this.Qw;this.Pw=new v.Deferred,this.Qw=this.Pw.promise;var i=function(e){var i;r(),null==(i=t.Pw)||i.reject(e)},n=function(){var e;r(),t.Rw=!0,t.Sw||(t.Tw=!0),null==(e=t.Pw)||e.resolve()},r=function(){t.mediaSource&&(t.mediaSource.removeEventListener("error",i),t.mediaSource.removeEventListener("sourceopen",n),t.mediaSource.removeEventListener("webkitsourceopen",n))};if(!this.video)return this.hw("Could not set source to video element");if(!this.mediaSource)return this.hw("mediaSource must not be null or undefined");if(this.mediaSource.addEventListener("error",i),this.mediaSource.addEventListener("sourceopen",n,!1),this.mediaSource.addEventListener("webkitsourceopen",n,!1),this.Sw&&(this.video.disableRemotePlayback=!0,this.mediaSource.addEventListener("startstreaming",this.jw),this.mediaSource.addEventListener("endstreaming",this.kw),this.mediaSource.addEventListener("bufferedchange",this.lw)),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,g.setMseObjectUrl)(o))}else this.logger.debug("Could not use window.URL.createObjectURL(mediaSource) as the browser claims the function does not exist."),this.Pw.reject("Could not create Object URL");return this.Qw.then(function(){t.Pw=void 0})},Object.defineProperty(e.prototype,"shouldContinueBuffering",{get:function(){return this.Tw},enumerable:!1,configurable:!0}),e.prototype.createNewMSE=function(){var e=this;return this.mediaSource?this.tearDownMediaSource().then(function(){return e.wx()}):this.Uw.then(function(){return e.wx()})},e.prototype.wx=function(){return this.Sw=(0,P.shouldUseManagedMediaSource)(this.context.settings.PREFER_MANAGED_MEDIA_SOURCE),this.Sw?(this.logger.debug("[MSEWrapper] Using ManagedMediaSource"),this.mediaSource=new window.ManagedMediaSource):(this.logger.debug("[MSEWrapper] Using MediaSource"),this.mediaSource=new window.MediaSource),this.iw()},e.prototype.isChangeTypeSupported=function(){var e,t,i=(0,y.getCapabilities)(),n=i.isWebOS&&i[p.CapabilityKey.webOSChromiumVersion]>=b.WEBOS_2021_CHROMIUM_VERSION;return!!(null==(t=null==(e=window.SourceBuffer)?void 0:e.prototype)?void 0:t.changeType)&&!(0,y.getCapabilities)().isTizen&&!n},e.prototype.xx=function(e){var t=this,i=S.MimeTypeHelper.getMediaType(e),n=Object.keys(this.sourceBuffers).find(function(n){var r=S.MimeTypeHelper.getMediaType(n);return t.sourceBuffers.hasOwnProperty(n)&&r===i&&n!==e});n&&(this.sourceBuffers[e]=this.sourceBuffers[n],delete this.sourceBuffers[n])},e.prototype.changeBufferType=function(e,t,i){var n=this;this.xx(e);var r=this.sourceBuffers[e];return r?i&&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),n.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}()},21586:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.MSERendererModuleDefinition=void 0;var n=i(62756),r=i(79323),o=i(48873),a=i(82889),s=i(44914);t.MSERendererModuleDefinition={name:n.ModuleName.RendererMse,module:{MSEWrapper:o.MSEWrapper,MSERenderer:r.MSERenderer,Ranges:a.Ranges,technologyChecker:new s.TechnologyChecker}},t.default=t.MSERendererModuleDefinition},69200:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.LinkedListQueue=void 0;var i=function(e){this.value=e};t.LinkedListQueue=function(){function e(){this.bab=0}return Object.defineProperty(e.prototype,"length",{get:function(){return this.bab},enumerable:!1,configurable:!0}),e.prototype.dequeue=function(){if(0!==this.bab){var e=this.dab;return this.dab=null==e?void 0:e.previous,e&&(e.previous=void 0,e.next=void 0),this.bab--,null==e?void 0:e.value}},e.prototype.enqueue=function(e){if(0===this.bab){var t=new i(e);this.cab=t,this.dab=t}else{var n=this.cab;this.cab=new i(e),this.cab.next=n,n&&(n.previous=this.cab)}this.bab++},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,i){var n=[];if(t&&t.length)for(var r=0;r<t.length;r++)i(t.start(r),t.end(r))&&n.push([t.start(r),t.end(r)]);return e.createTimeRanges(n)},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,i){return Array.isArray(t)?e.createTimeRangesObj(t):void 0===t||void 0===i?e.createTimeRangesObj():e.createTimeRangesObj([[t,i]])},e.findNextRange=function(t,i){return e.filterRanges(t,function(t,n){return t-e.TIME_FUDGE_FACTOR>=i&&n-t>e.MIN_RANGE_DURATION})},e.findGaps=function(t,i){if(t.length<2)return e.createTimeRanges();for(var n=[],r=1;r<t.length;r++){var o=t.end(r-1),a=t.start(r);a-o>i&&n.push([o,a])}return e.createTimeRanges(n)},e.findRangeForTime=function(t,i){return e.filterRanges(t,function(e,t){return e<=i&&t>=i})},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,i;return null!=(i=null==(t=null==e?void 0:e.renderer)?void 0:t.mseObjectUrl)?i:""}},60321:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.SourceBufferWrapper=void 0;var n=i(34841),r=i(69200);t.SourceBufferWrapper=function(){function e(e,t,i){var n=this;this.onBufferedRangesChanged=i,this.nW=function(){n.qW(),n.onBufferedRangesChanged(n.bufferedRanges),n.pW(function(e){return e.resolve()})},this.oW=function(e){n.pW(function(t){return t.reject(e)})},this.ready=function(){return n.buffer.updating?n.onUpdateEnded():Promise.resolve()},this.buffer=e,this.bV=t,this.bufferedRanges=[],this.queuePromise=Promise.resolve(),this.mW=new r.LinkedListQueue,["error","abort","sourceended","sourceclose"].forEach(function(e){n.buffer.addEventListener(e,n.oW)}),this.buffer.addEventListener("updateend",this.nW)}return e.prototype.pW=function(e){for(var t;null!=(t=this.mW.dequeue());)e(t)},e.prototype.qW=function(){try{this.bufferedRanges=function(e){for(var t=[],i=0;i<e.length;i++)t.push({start:e.start(i),end:e.end(i)});return t}(this.buffer.buffered)}catch(e){}},e.prototype.onUpdateEnded=function(){var e=new n.Deferred;return this.mW.enqueue(e),e.promise},e.prototype.queueAction=function(e){var t=this,i=this.queuePromise.then(function(){return t.ready()}).then(function(){return Promise.resolve(e()).then(function(){return t.ready()})});return this.queuePromise=i.catch(function(){}),i},e.prototype.changeType=function(e,t){this.buffer.changeType("".concat(e,"; codecs=").concat(t)),this.bV.mimeType=e,this.bV.codec=t},e.prototype.getCodec=function(){return this.bV.codec},e.prototype.getMimeType=function(){return this.bV.mimeType},e.prototype.dispose=function(){var e=this;["error","abort","sourceended","sourceclose"].forEach(function(t){e.buffer.removeEventListener(t,e.oW)}),this.pW(function(e){return e.reject("disposing source buffer")}),this.buffer.removeEventListener("updateend",this.nW)},e}()},44914:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.TechnologyChecker=void 0;var n=i(44468);t.TechnologyChecker=function(){function e(){}return e.prototype.getSupportedTechnologies=function(){return[{player:n.PlayerType.Html5,streaming:n.StreamType.Dash},{player:n.PlayerType.Html5,streaming:n.StreamType.Hls},{player:n.PlayerType.Html5,streaming:n.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.aV=function(e){return e.time=t.ZV&&t.ZV.currentTime||0,e},this.ZV=e}return e.prototype.on=function(e,t){this.ZV&&this.ZV.addEventListener(e,t,this.aV)},e.prototype.off=function(e,t){this.ZV&&this.ZV.removeEventListener(e,t)},e.prototype.fire=function(e,t){this.ZV&&this.ZV.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)}])},141:function(e){"use strict";self,e.exports=(self.webpackChunkbitmovin_player=self.webpackChunkbitmovin_player||[]).push([[787],{3664:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.DeviceDetector=void 0,t.DeviceDetector=function(){function e(){}return e.isGoogleCast=function(){return window.navigator.userAgent.indexOf("Chrome")>-1&&window.navigator.userAgent.indexOf("CrKey")>-1},e}()},82601:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.PatchModuleDefinition=void 0;var n=i(62756),r=i(87500);t.PatchModuleDefinition={name:n.ModuleName.Patch,module:{Patches:r.Patches},hooks:{add:function(e){e.Patches.install()}}},t.default=t.PatchModuleDefinition},87500:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.Patches=void 0;var n=i(3664);t.Patches=function(){function e(){}return e.arrayReduce=function(e,t){if(null===this)throw TypeError("Array.prototype.reduce called on null or undefined");if("function"!=typeof e)throw TypeError(e+" is not a function");var i,n=Object(this),r=n.length>>>0,o=0;if(void 0!==t)i=t;else{for(;o<r&&!(o in n);)o++;if(o>=r)throw TypeError("Reduce of empty array with no initial value");i=n[o++]}for(;o<r;)o in n&&(i=e(i,n[o],o,n)),o++;return i},e.install=function(){n.DeviceDetector.isGoogleCast()&&window.navigator.userAgent.indexOf("CrKey/1.25.")>-1&&(Array.prototype.reduce=e.arrayReduce)},e}()}},function(e){return e(e.s=82601)}])},324:function(e){"use strict";self,e.exports=(self.webpackChunkbitmovin_player=self.webpackChunkbitmovin_player||[]).push([[538],{49056:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.ArrayBufferPolyfill=void 0,t.ArrayBufferPolyfill=function(){function e(e,t){return(e=0|e||0)<0?Math.max(e+t,0):Math.min(e,t)}return{polyfill:function(){ArrayBuffer.prototype.slice=function(t,i){var n=this.byteLength,r=e(t,n),o=n;if(void 0!==i&&(o=e(i,n)),r>o)return new ArrayBuffer(0);var a=o-r,s=new ArrayBuffer(a),u=new Uint8Array(s),c=new Uint8Array(this,r,a);return u.set(c),s}}}}()},10455:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.ArrayFindIndexPolyfill=void 0,t.ArrayFindIndexPolyfill={polyfill:function(){Object.defineProperty(Array.prototype,"findIndex",{value:function(e){if(null==this)throw TypeError('"this" is null or not defined');var t=Object(this),i=t.length>>>0;if("function"!=typeof e)throw TypeError("predicate must be a function");for(var n=arguments[1],r=0;r<i;){var o=t[r];if(e.call(n,o,r,t))return r;r++}return -1},configurable:!0,writable:!0})}}},77337:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.ArrayFindPolyfill=void 0,t.ArrayFindPolyfill={polyfill:function(){Array.prototype.find=function(e){if(null==this)throw TypeError("Array.prototype.find called on null or undefined");if("function"!=typeof e)throw TypeError("predicate must be a function");for(var t,i=Object(this),n=i.length>>>0,r=arguments[1],o=0;o<n;o++)if(t=i[o],e.call(r,t,o,i))return t}}}},22581:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.ArrayFlatMapPolyfill=void 0,t.ArrayFlatMapPolyfill=function(){function e(){}return e.polyfill=function(){Object.defineProperty(Array.prototype,"flatMap",{value:function(e){return Array.prototype.concat.apply([],this.map(e))}})},e}()},64499:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.ArrayIncludesPolyfill=void 0,t.ArrayIncludesPolyfill={polyfill:function(){Object.defineProperty(Array.prototype,"includes",{value:function(e,t){if(null==this)throw TypeError('"this" is null or not defined');var i=Object(this),n=i.length>>>0;if(0===n)return!1;var r=0|t,o=Math.max(r>=0?r:n-Math.abs(r),0);function a(e,t){return e===t||"number"==typeof e&&"number"==typeof t&&isNaN(e)&&isNaN(t)}for(;o<n;){if(a(i[o],e))return!0;o++}return!1}})}}},99810:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.PromisePolyfill=void 0,t.PromisePolyfill=(function(){function e(e){return"function"==typeof e}var t,i,n=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)},r=0,o=function(e,n){c[r]=e,c[r+1]=n,2===(r+=2)&&(t?t(l):i())},a=("undefined"!=typeof window?window:void 0)||{},s=a.MutationObserver||a.WebKitMutationObserver,u="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,c=Array(1e3);function l(){for(var e=0;e<r;e+=2)(0,c[e])(c[e+1]),c[e]=void 0,c[e+1]=void 0;r=0}function d(){}i=s?function(){var e=0,t=new s(l),i=document.createTextNode("");return t.observe(i,{characterData:!0}),function(){i.data=e=++e%2}}():u?function(){var e=new MessageChannel;return e.port1.onmessage=l,function(){e.port2.postMessage(0)}}():function(){setTimeout(l,1)};var h=void 0,p=new E;function f(t,i){if(i.constructor===t.constructor)!function(e,t){1===t._state?y(e,t._result):2===t._state?v(e,t._result):S(t,void 0,function(t){g(e,t)},function(t){v(e,t)})}(t,i);else{var n=function(e){try{return e.then}catch(e){return p.error=e,p}}(i);n===p?v(t,p.error):void 0===n?y(t,i):e(n)?function(e,t,i){o(function(e){var n=!1,r=function(i,r){try{i.call(r,function(i){n||(n=!0,t!==i?g(e,i):y(e,i))},function(t){n||(n=!0,v(e,t))})}catch(e){return e}}(i,t,e._label);!n&&r&&(n=!0,v(e,r))},e)}(t,i,n):y(t,i)}}function g(e,t){e===t?v(e,TypeError("You cannot resolve a promise with itself")):function(e){return"function"==typeof e||"object"==typeof e&&null!==e}(t)?f(e,t):y(e,t)}function m(e){e._onerror&&e._onerror(e._result),b(e)}function y(e,t){e._state===h&&(e._result=t,e._state=1,0!==e._subscribers.length&&o(b,e))}function v(e,t){e._state===h&&(e._state=2,e._result=t,o(m,e))}function S(e,t,i,n){var r=e._subscribers,a=r.length;e._onerror=null,r[a]=t,r[a+1]=i,r[a+2]=n,0===a&&e._state&&o(b,e)}function b(e){var t=e._subscribers,i=e._state;if(0!==t.length){for(var n,r,o=e._result,a=0;a<t.length;a+=3)n=t[a],r=t[a+i],n?_(i,n,r,o):r(o);e._subscribers.length=0}}function E(){this.error=null}var T=new E;function _(t,i,n,r){var o,a,s,u,c=e(n);if(c){if((o=function(e,t){try{return e(t)}catch(e){return T.error=e,T}}(n,r))===T?(u=!0,a=o.error,o=null):s=!0,i===o)return void v(i,TypeError("A promises callback cannot return that same promise."))}else o=r,s=!0;i._state!==h||(c&&s?g(i,o):u?v(i,a):1===t?y(i,o):2===t&&v(i,o))}function A(e,t){var i=this;i._instanceConstructor=e,i.promise=new e(d),i._validateInput(t)?(i._input=t,i.length=t.length,i._remaining=t.length,i._init(),0===i.length?y(i.promise,i._result):(i.length=i.length||0,i._enumerate(),0===i._remaining&&y(i.promise,i._result))):v(i.promise,i._validationError())}A.prototype._validateInput=function(e){return n(e)},A.prototype._validationError=function(){return Error("Array Methods must be provided an Array")},A.prototype._init=function(){this._result=Array(this.length)};var P=A;A.prototype._enumerate=function(){for(var e=this,t=e.length,i=e.promise,n=e._input,r=0;i._state===h&&r<t;r++)e._eachEntry(n[r],r)},A.prototype._eachEntry=function(e,t){var i=this,n=i._instanceConstructor;!function(e){return"object"==typeof e&&null!==e}(e)?(i._remaining--,i._result[t]=e):e.constructor===n&&e._state!==h?(e._onerror=null,i._settledAt(e._state,t,e._result)):i._willSettleAt(n.resolve(e),t)},A.prototype._settledAt=function(e,t,i){var n=this,r=n.promise;r._state===h&&(n._remaining--,2===e?v(r,i):n._result[t]=i),0===n._remaining&&y(r,n._result)},A.prototype._willSettleAt=function(e,t){var i=this;S(e,void 0,function(e){i._settledAt(1,t,e)},function(e){i._settledAt(2,t,e)})};var M=0,I=R;function R(t){this._id=M++,this._state=void 0,this._result=void 0,this._subscribers=[],d!==t&&(e(t)||function(){throw TypeError("You must pass a resolver function as the first argument to the promise constructor")}(),this instanceof R||function(){throw TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object c
1onstructor cannot be called as a function.")}(),function(e,t){try{t(function(t){g(e,t)},function(t){v(e,t)})}catch(t){v(e,t)}}(this,t))}return R.all=function(e){return new P(this,e).promise},R.race=function(e){var t=new this(d);if(!n(e))return v(t,TypeError("You must pass an array to race.")),t;var i=e.length;function r(e){g(t,e)}function o(e){v(t,e)}for(var a=0;t._state===h&&a<i;a++)S(this.resolve(e[a]),void 0,r,o);return t},R.resolve=function(e){if(e&&"object"==typeof e&&e.constructor===this)return e;var t=new this(d);return g(t,e),t},R.reject=function(e){var t=new this(d);return v(t,e),t},R._setScheduler=function(e){t=e},R._setAsap=function(e){o=e},R._asap=o,R.prototype={constructor:R,then:function(e,t){var i=this,n=i._state;if(1===n&&!e||2===n&&!t)return this;var r=new this.constructor(d),a=i._result;if(n){var s=arguments[n-1];o(function(){_(n,r,s,a)})}else S(i,r,e,t);return r},catch:function(e){return this.then(null,e)}},{Promise:I,polyfill:function(){var e=window.Promise;e&&"[object Promise]"===Object.prototype.toString.call(e.resolve())&&!e.cast||(window.Promise=I)}}}).call(this)},61545:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.MapPolyfill=void 0,t.MapPolyfill={polyfill:function(){var e,t=Object.defineProperty,i=function(e,t){return e===t||e!=e&&t!=t};function n(e){this.add?e.forEach(this.add,this):e.forEach(function(e){this.set(e[0],e[1])},this)}function r(t,n){if(n!=n||0===n)for(e=t.length;e--&&!i(t[e],n););else e=t.indexOf(n);return -1<e}function o(e,t,i){var n=[0],r=!1;return e.push(n),{next:function(){var o,a=n[0];return!r&&a<t.length?(o=i?[t[a],i[a]]:t[a],n[0]++):(r=!0,e.splice(e.indexOf(n),1)),{done:r,value:o}}}}function a(){return this._values.length}window.Map=function(e){function i(e){if(!this||this.constructor!==i)return new(i(e));this._keys=[],this._values=[],this._itp=[],e&&n.call(this,e)}return t(e,"size",{get:a}),e.constructor=i,i.prototype=e,i}({delete:function(t){return this.has(t)&&(this._keys.splice(e,1),this._values.splice(e,1),this._itp.forEach(function(t){e<t[0]&&t[0]--})),-1<e},has:function(e){return r.call(this,this._keys,e)},get:function(t){return this.has(t)?this._values[e]:void 0},set:function(t,i){return this.has(t)?this._values[e]=i:this._values[this._keys.push(t)-1]=i,this},keys:function(){return o(this._itp,this._keys)},values:function(){return o(this._itp,this._values)},entries:function(){return o(this._itp,this._keys,this._values)},forEach:function(e,t){for(var i=this.entries();;){var n=i.next();if(n.done)break;e.call(t,n.value[1],n.value[0],this)}},clear:function(){(this._keys||0).length=this._values.length=0}})}}},88514:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.NodeChildrenPolyfill=void 0,t.NodeChildrenPolyfill={polyfill:function(){!function(e){e&&e.prototype&&null==e.prototype.children&&Object.defineProperty(e.prototype,"children",{get:function(){var e,t=0,i=this.childNodes,n=[];if(!i)return n;for(;e=i[t++];)1===e.nodeType&&n.push(e);return n}})}(window.Node||window.Element)}}},45417:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.NodeListPolyfill=void 0,t.NodeListPolyfill={polyfill:function(){NodeList.prototype.forEach=function(e,t){t=t||window;for(var i=0;i<this.length;i++)e.call(t,this[i],i,this)}}}},90927:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.ObjectAssignPolyfill=void 0,t.ObjectAssignPolyfill={polyfill:function(){Object.defineProperty(Object,"assign",{value:function(e,t){if(null==e)throw TypeError("Cannot convert undefined or null to object");for(var i=Object(e),n=1;n<arguments.length;n++){var r=arguments[n];if(null!=r)for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(i[o]=r[o])}return i},writable:!0,configurable:!0})}}},45078:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.ObjectEntriesPolyfill=void 0,t.ObjectEntriesPolyfill={polyfill:function(){Object.entries=function(e){for(var t=Object.keys(e),i=t.length,n=Array(i);i--;)n[i]=[t[i],e[t[i]]];return n}}}},75284:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.ObjectValuesPolyfill=void 0,t.ObjectValuesPolyfill={polyfill:function(){Object.values=function(e){return Object.keys(e).map(function(t){return e[t]})}}}}
vendor: 18,251 bytes, line 1
1,18410:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default={polyfill:function(){window.Promise.prototype.finally&&"function"==typeof window.Promise.prototype.finally||(window.Promise.prototype.finally=function(e){var t=this.constructor;return this.then(function(i){return t.resolve(e()).then(function(){return i})},function(i){return t.resolve(e()).then(function(){throw i})})})}}},33878:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.StringEndsWithPolyfill=void 0,t.StringEndsWithPolyfill={polyfill:function(){String.prototype.endsWith=function(e,t){if(null==e)return!1;var i=this.length;return null!=t&&(i=Math.min(t,this.length)),this.substring(i-e.length,i)===e}}}},64205:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.StringIncludesPolyfill=void 0,t.StringIncludesPolyfill={polyfill:function(){String.prototype.includes=function(e,t){return"number"!=typeof t&&(t=0),!(t+e.length>this.length)&&-1!==this.indexOf(e,t)}}}},30829:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.StringStartsWithPolyfill=void 0,t.StringStartsWithPolyfill={polyfill:function(){String.prototype.startsWith=function(e,t){var i=t>0?0|t:0;return this.substring(i,i+e.length)===e}}}},3805:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.WeakMapPolyfill=void 0;var i=function(){};!function(){function e(t){t.permitHostObjects___&&t.permitHostObjects___(e)}var t,n=!1;if("function"==typeof WeakMap)if(t=WeakMap,"undefined"!=typeof navigator&&/Firefox/.test(navigator.userAgent));else{var r=new t,o=Object.freeze({});if(r.set(o,1),1===r.get(o))return i=function(){};n=!0}var a=Object.getOwnPropertyNames,s=Object.defineProperty,u=Object.isExtensible,c="weakmap:",l=c+"ident:"+Math.random()+"___";if("undefined"!=typeof crypto&&"function"==typeof crypto.getRandomValues&&"function"==typeof ArrayBuffer&&"function"==typeof Uint8Array){var d=new Uint8Array(new ArrayBuffer(25));crypto.getRandomValues(d),l=c+"rand:"+Array.prototype.map.call(d,function(e){return(e%36).toString(36)}).join("")+"___"}function h(e){return e.substr(0,8)!=c||"___"!==e.substr(e.length-3)}var p="object"==typeof window?Object.getOwnPropertyNames(window):[];if(s(Object,"getOwnPropertyNames",{value:function(e){if("[object Window]"===Object.prototype.toString.call(e))try{return a(e)}catch(e){return[].concat([],p)}return a(e).filter(h)}}),"getPropertyNames"in Object){var f=Object.getPropertyNames;s(Object,"getPropertyNames",{value:function(e){return f(e).filter(h)}})}function g(e){if(e!==Object(e))throw TypeError("Not an object: "+e);var t=e[l];if(t&&t.key===e)return t;if(u(e)){t={key:e};try{return s(e,l,{value:t,writable:!1,enumerable:!1,configurable:!1}),t}catch(e){return}}}function m(e){return e.prototype=null,Object.freeze(e)}!function(){var e=Object.freeze;s(Object,"freeze",{value:function(t){return g(t),e(t)}});var t=Object.seal;s(Object,"seal",{value:function(e){return g(e),t(e)}});var i=Object.preventExtensions;s(Object,"preventExtensions",{value:function(e){return g(e),i(e)}})}();var y=!1;function v(){y||"undefined"==typeof console||(y=!0,console.warn("WeakMap should be invoked as new WeakMap(), not WeakMap(). This will be an error in the future."))}var S=0,b=function(){this instanceof b||v();var e=[],t=[],i=S++;return Object.create(b.prototype,{get___:{value:m(function(n,r){var o,a=g(n);return a?i in a?a[i]:r:(o=e.indexOf(n))>=0?t[o]:r})},has___:{value:m(function(t){var n=g(t);return n?i in n:e.indexOf(t)>=0})},set___:{value:m(function(n,r){var o,a=g(n);return a?a[i]=r:(o=e.indexOf(n))>=0?t[o]=r:(t[o=e.length]=r,e[o]=n),this})},delete___:{value:m(function(n){var r,o,a=g(n);return a?i in a&&delete a[i]:!((r=e.indexOf(n))<0||(o=e.length-1,e[r]=void 0,t[r]=t[o],e[r]=e[o],e.length=o,t.length=o,0))})}})};b.prototype=Object.create(Object.prototype,{get:{value:function(e,t){return this.get___(e,t)},writable:!0,configurable:!0},has:{value:function(e){return this.has___(e)},writable:!0,configurable:!0},set:{value:function(e,t){return this.set___(e,t)},writable:!0,configurable:!0},delete:{value:function(e){return this.delete___(e)},writable:!0,configurable:!0}}),"function"==typeof t?function(){function r(){this instanceof b||v();var i,r=new t,o=void 0,a=!1;return i=n?function(e,t){return r.set(e,t),r.has(e)||(o||(o=b()),o.set(e,t)),this}:function(e,t){if(a)try{r.set(e,t)}catch(i){o||(o=b()),o.set___(e,t)}else r.set(e,t);return this},Object.create(b.prototype,{get___:{value:m(function(e,t){return o?r.has(e)?r.get(e):o.get___(e,t):r.get(e,t)})},has___:{value:m(function(e){return r.has(e)||!!o&&o.has___(e)})},set___:{value:m(i)},delete___:{value:m(function(e){var t=!!r.delete(e);return o&&o.delete___(e)||t})},permitHostObjects___:{value:m(function(t){if(t!==e)throw Error("bogus call to permitHostObjects___");a=!0})}})}n&&"undefined"!=typeof Proxy&&(Proxy=void 0),r.prototype=b.prototype,i=function(){window.WeakMap=r},Object.defineProperty(WeakMap.prototype,"constructor",{value:WeakMap,enumerable:!1,configurable:!0,writable:!0})}():("undefined"!=typeof Proxy&&(Proxy=void 0),i=function(){window.WeakMap=b})}(),t.WeakMapPolyfill={polyfill:i}},33402:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.PolyfillModuleDefinition=void 0;var n=i(62756),r=i(62935);t.PolyfillModuleDefinition={name:n.ModuleName.Polyfill,module:{Polyfills:r.Polyfills},hooks:{add:function(e){e.Polyfills.installPolyfills()}}},t.default=t.PolyfillModuleDefinition},62935:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.Polyfills=void 0;var n=i(49056),r=i(10455),o=i(77337),a=i(22581),s=i(64499),u=i(99810),c=i(61545),l=i(88514),d=i(45417),h=i(90927),p=i(45078),f=i(75284),g=i(18410),m=i(33878),y=i(64205),v=i(30829),S=i(3805);t.Polyfills={installPolyfills:function(){window.bitmovin=window.bitmovin||{},window&&window.Promise&&"function"==typeof window.Promise||u.PromisePolyfill.polyfill(),g.default.polyfill(),window&&window.ArrayBuffer&&!window.ArrayBuffer.prototype.slice&&n.ArrayBufferPolyfill.polyfill(),window.WeakMap&&"function"==typeof window.WeakMap||S.WeakMapPolyfill.polyfill(),window.Map&&"function"==typeof window.Map||c.MapPolyfill.polyfill(),Array.prototype.find||o.ArrayFindPolyfill.polyfill(),Array.prototype.includes||s.ArrayIncludesPolyfill.polyfill(),Array.prototype.findIndex||r.ArrayFindIndexPolyfill.polyfill(),Array.prototype.flatMap||a.ArrayFlatMapPolyfill.polyfill(),String.prototype.includes||y.StringIncludesPolyfill.polyfill(),String.prototype.startsWith||v.StringStartsWithPolyfill.polyfill(),String.prototype.endsWith||m.StringEndsWithPolyfill.polyfill(),window.NodeList&&!NodeList.prototype.forEach&&d.NodeListPolyfill.polyfill(),(window.Node&&!Node.prototype.hasOwnProperty("children")||window.Element&&!Element.prototype.hasOwnProperty("children"))&&l.NodeChildrenPolyfill.polyfill(),Object.values||f.ObjectValuesPolyfill.polyfill(),Object.entries||p.ObjectEntriesPolyfill.polyfill(),Object.assign||h.ObjectAssignPolyfill.polyfill(),(window.MediaSource||window.WebKitMediaSource)&&(window.MediaSource=window.MediaSource||window.WebKitMediaSource),Number.isNaN||(Number.isNaN=function(e){return"number"==typeof e&&isNaN(e)})}}}},function(e){return e(e.s=33402)}])},748:function(module){"use strict";var t;self,t=function(){return(self.webpackChunkbitmovin_player=self.webpackChunkbitmovin_player||[]).push([[140],{71223:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.isSameSource=r;var n=i(58313);function r(e,t){return!e&&!t||!(!e||!t)&&(e.dash?o(e.dash,t.dash,t):e.hls?o(e.hls,t.hls,t):!!e.progressive&&!Array.isArray(t.progressive)&&o(e.progressive,t.progressive,t))}function o(e,t,i){try{return r(JSON.parse(e),i)}catch(e){}return!!t&&n.URLHelper.toFullUrl(t)===n.URLHelper.toFullUrl(e)}},68657:function(e,t){var i;Object.defineProperty(t,"__esModule",{value:!0}),t.GoogleCastReceiverVersion=void 0,function(e){e.v2="v2",e.v3="v3"}(i||(t.GoogleCastReceiverVersion=i={}))},32645:function(e,t,i){var n=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(t,i)};return function(t,i){if("function"!=typeof i&&null!==i)throw TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.GoogleCastRemoteControlBase=void 0,t.mediaInfoToSourceConfig=c;var r=i(3714),o=i(20213),a=i(85625),s=i(94685),u=i(60768);function c(e){var t=e.contentUrl||e.contentId;switch(e.contentType.toLowerCase()){case a.ManifestMimeType.Dash:return{dash:t};case a.ManifestMimeType.Hls:return{hls:t};case a.ManifestMimeType.Smooth:return{smooth:t};default:return{progressive:t}}}t.GoogleCastRemoteControlBase=function(e){function t(t,i){var n=e.call(this,t)||this;n.AM=function(e,t){n.context.logger.debug("addReceiverActionListener",e),n.isConnected()||n.onConnect(e.friendlyName)},n.BM=function(e){switch(n.context.logger.debug("CAST_STATE_CHANGED",e),e.castState){case cast.framework.CastState.NO_DEVICES_AVAILABLE:n.onReady(!1);break;case cast.framework.CastState.NOT_CONNECTED:n.onReady(!0);case cast.framework.CastState.CONNECTING:case cast.framework.CastState.CONNECTED:}},n.CM=function(e){switch(n.context.logger.debug("SESSION_STATE_CHANGED",e),e.sessionState){case cast.framework.SessionState.NO_SESSION:case cast.framework.SessionState.SESSION_STARTING:break;case cast.framework.SessionState.SESSION_STARTED:n.onConnected(e.session.getCastDevice().friendlyName,!1);break;case cast.framework.SessionState.SESSION_START_FAILED:n.context.logger.debug("SESSION_START_FAILED",e.errorCode),e.errorCode!==chrome.cast.ErrorCode.CANCEL&&n.onError();break;case cast.framework.SessionState.SESSION_ENDING:break;case cast.framework.SessionState.SESSION_ENDED:n.onDisconnected();break;case cast.framework.SessionState.SESSION_RESUMED:n.onConnected(e.session.getCastDevice().friendlyName,!0),n.remotePlayer.isPaused||(n.zM(),n.onRemotePlayerEvent({event:r.PlayerEvent.Play}))}},n.DM=function(e){n.mediaInfoChangedEventHandler(e)},n.EM=function(e){switch(n.context.logger.debug("PLAYER_STATE_CHANGED",e),e.value){case chrome.cast.media.PlayerState.PAUSED:n.onRemotePlayerEvent({event:r.PlayerEvent.Paused});break;case chrome.cast.media.PlayerState.PLAYING:n.onRemotePlayerEvent({event:r.PlayerEvent.Playing})}},n.FM=function(){n.context.logger.debug("IS_PAUSED_CHANGED",n.remotePlayer.isPaused),n.remotePlayer.isPaused||n.onRemotePlayerEvent({event:r.PlayerEvent.Play})},n.GM=function(){n.context.logger.debug("CURRENT_TIME_CHANGED",n.remotePlayer.currentTime),n.onRemotePlayerEvent({event:r.PlayerEvent.TimeChanged})},n.HM=function(){n.context.logger.debug("VOLUME_LEVEL_CHANGED",n.remotePlayer.volumeLevel),n.onRemotePlayerEvent({event:r.PlayerEvent.VolumeChanged})},n.IM=function(){n.context.logger.debug("IS_MUTED_CHANGED",n.remotePlayer.isMuted),n.onRemotePlayerEvent({event:n.remotePlayer.isMuted?r.PlayerEvent.Muted:r.PlayerEvent.Unmuted})},n.JM=function(e){n.context.logger.debug("IS_CONNECTED_CHANGED",e),n.remotePlayer.isConnected?n.context.logger.debug("remotePlayer connected"):n.context.logger.debug("remotePlayer not connected")},n.KM=function(){n.remotePlayer.isPaused||(n.context.logger.debug('Switching receiver state to "paused"'),n.remotePlayerController.playOrPause())},n.config=i,n.yM=void 0;var o=function(e){if(t.logger.debug("__onGCastApiAvailable "+e),e)try{n.initializeCast()}catch(e){t.logger.debug("Cast initialization failed",e)}n.yM&&n.yM(e)};return window.chrome&&window.chrome.cast&&window.cast&&window.cast.framework?setTimeout(function(){return o(!0)},1e3):(n.yM=window.__onGCastApiAvailable,window.__onGCastApiAvailable=o),n}return n(t,e),t.prototype.zM=function(){var e,t,i=this;null==(t=null==(e=this.castSession)?void 0:e.getMediaSession())||t.getStatus(void 0,function(){(0,s.isContextAvailable)(i.context)&&i.context.logger.debug("State updated from Receiver")},function(e){(0,s.isContextAvailable)(i.context)&&i.context.logger.debug("State update from receiver failed:",e)})},t.prototype.initializeCast=function(){cast.framework.CastContext.getInstance().setOptions({receiverApplicationId:this.config.receiverApplicationId,autoJoinPolicy:chrome.cast.AutoJoinPolicy.ORIGIN_SCOPED,resumeSavedSession:null!=(e=this.config.rejoinActiveSession)&&e}),this.remotePlayer=new cast.framework.RemotePlayer,this.remotePlayerController=new cast.framework.RemotePlayerController(this.remotePlayer),this.remotePlayerController.addEventListener(cast.framework.RemotePlayerEventType.IS_CONNECTED_CHANGED,this.JM),this.remotePlayerController.addEventListener(cast.framework.RemotePlayerEventType.PLAYER_STATE_CHANGED,this.EM),this.remotePlayerController.addEventListener(cast.framework.RemotePlayerEventType.IS_PAUSED_CHANGED,this.FM),this.remotePlayerController.addEventListener(cast.framework.RemotePlayerEventType.CURRENT_TIME_CHANGED,this.GM),this.remotePlayerController.addEventListener(cast.framework.RemotePlayerEventType.VOLUME_LEVEL_CHANGED,this.HM),this.remotePlayerController.addEventListener(cast.framework.RemotePlayerEventType.IS_MUTED_CHANGED,this.IM),cast.framework.CastContext.getInstance().getCastState()!==cast.framework.CastState.NO_DEVICES_AVAILABLE?this.onReady(!0):cast.framework.CastContext.getInstance().addEventListener(cast.framework.CastContextEventType.CAST_STATE_CHANGED,this.BM),cast.framework.CastContext.getInstance().addEventListener(cast.framework.CastContextEventType.SESSION_STATE_CHANGED,this.CM),chrome.cast.addReceiverActionListener(this.AM);var e,t=cast.framework.CastContext.getInstance().getCurrentSession();t&&this.onConnected(t.getCastDevice().friendlyName,!0)},t.prototype.mediaInfoChangedEventHandler=function(e){var t=this.remotePlayer.mediaInfo;this.mediaInfo=e.value,this.context.logger.debug("MEDIA_INFO_CHANGED",t)},t.prototype.getConfig=function(){return this.config},t.prototype.connect=function(){var e=this;cast.framework.CastContext.getInstance().requestSession().then(function(){return e.context.logger.debug("Session request successful")}).catch(function(t){t===chrome.cast.ErrorCode.CANCEL||(e.context.logger.debug("Session request failed",t),e.onError())})},t.prototype.onConnected=function(t,i){var n=this;this.castSession=cast.framework.CastContext.getInstance().getCurrentSession(),this.castSession.addMessageListener(this.config.messageNamespace,function(e,t){n.context.logger.insane(e,t);try{var i=JSON.parse(t);n.handleRemoteControlReceiverMessage(i)}catch(e){n.context.logger.error("message parsing failed",t)}}),this.context.eventHandler.on(r.PlayerEvent.PlaybackFinished,this.KM),e.prototype.onConnected.call(this,t,i)},t.prototype.sendMessage=function(e,t){void 0===e&&(e=u.RemoteControlMessageType.PlayerApiMethodCall),this.castSession.sendMessage(this.config.messageNamespace,{type:e,data:t})},t.prototype.disconnect=function(){cast.framework.CastContext.getInstance().endCurrentSession(!0),this.onDisconnect()},t.prototype.onDisconnected=function(){e.prototype.onDisconnected.call(this),this.context.eventHandler.off(r.PlayerEvent.PlaybackFinished,this.KM),this.playerState=null},t.prototype.release=function(){window.__onGCastApiAvailable=this.yM||void 0,this.remotePlayerController&&(this.remotePlayerController.removeEventListener(cast.framework.RemotePlayerEventType.MEDIA_INFO_CHANGED,this.DM),this.remotePlayerController.removeEventListener(cast.framework.RemotePlayerEventType.PLAYER_STATE_CHANGED,this.EM),this.remotePlayerController.removeEventListener(cast.framework.RemotePlayerEventType.IS_MUTED_CHANGED,this.IM),this.remotePlayerController.removeEventListener(cast.framework.RemotePlayerEventType.VOLUME_LEVEL_CHANGED,this.HM),this.remotePlayerController.removeEventListener(cast.framework.RemotePlayerEventType.CURRENT_TIME_CHANGED,this.GM),this.remotePlayerController.removeEventListener(cast.framework.RemotePlayerEventType.IS_PAUSED_CHANGED,this.FM),this.remotePlayerController.removeEventListener(cast.framework.RemotePlayerEventType.IS_CONNECTED_CHANGED,this.JM),chrome.cast.removeReceiverActionListener(this.AM),cast.framework.CastContext.getInstance().removeEventListener(cast.framework.CastContextEventType.CAST_STATE_CHANGED,this.BM),cast.framework.CastContext.getInstance().removeEventListener(cast.framework.CastContextEventType.SESSION_STATE_CHANGED,this.CM))},t.prototype.setSource=function(e,t,i){var n=this;return this.lastSource=e,this.getMediaInfo(e).then(function(e){var r=new chrome.cast.media.LoadRequest(e);return r.autoplay=t||!1,null!=i&&(r.currentTime=i),n.loadMediaRequest(r)})},t.prototype.loadMediaRequest=function(e){var t=this,i=cast.framework.CastContext.getInstance().getCurrentSession().getSessionObj();return new Promise(function(n,r){i.loadMedia(e,function(e){t.context.logger.debug("Load successful",e),t.media=e,t.remotePlayerController.addEventListener(cast.framework.RemotePlayerEventType.MEDIA_INFO_CHANGED,t.DM),n()},function(e){t.context.logger.debug("Load failed with error",e),r(e)})})},t.prototype.getSource=function(){return this.remotePlayer.mediaInfo?c(this.remotePlayer.mediaInfo):null},t.prototype.play=function(){this.remotePlayer.isPaused&&this.remotePlayerController.playOrPause()},t.prototype.isPlaying=function(){return!this.remotePlayer.isPaused},t.prototype.pause=function(){this.remotePlayer.isPaused||this.remotePlayerController.playOrPause()},t.prototype.isPaused=function(){return this.remotePlayer.isPaused},t.prototype.getCurrentTime=function(t){return void 0===t&&(t=o.TimeMode.AbsoluteTime),t===o.TimeMode.RelativeTime?e.prototype.getCurrentTime.call(this,t):this.remotePlayer.currentTime},t.prototype.seek=function(e){this.remotePlayer.currentTime=e,this.remotePlayerController.seek(),this.onRemotePlayerEvent({event:r.PlayerEvent.Seeked})},t.prototype.setVolume=function(e){this.remotePlayer.volumeLevel=e,this.remotePlayerController.setVolumeLevel()},t.prototype.getVolume=function(){return this.remotePlayer.volumeLevel},t.prototype.setMuted=function(e){e!==this.remotePlayer.isMuted&&this.remotePlayerController.muteOrUnmute()},t.prototype.isMuted=function(){return this.remotePlayer.isMuted}
1,t}(i(35317).RemoteControlBase)},61348:function(e,t,i){var n=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(t,i)};return function(t,i){if("function"!=typeof i&&null!==i)throw TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.GoogleCastRemoteControlV2=void 0;var r=i(58313),o=i(32645),a=i(61567);t.GoogleCastRemoteControlV2=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.getMediaInfo=function(e){var t=new chrome.cast.media.MediaInfo(a.RemoteJSON.stringify(e),"application/json");if(t.streamType=chrome.cast.media.StreamType.BUFFERED,t.metadata=new chrome.cast.media.GenericMediaMetadata,t.metadata.title=e.title||null,t.metadata.subtitle=e.description||null,e.poster){var i=r.URLHelper.toFullUrl(e.poster);t.metadata.images=[new chrome.cast.Image(i)]}return Promise.resolve(t)},t.prototype.removeSubtitle=function(e){this.sendMethodCallMessage("subtitles.remove",[e])},t.prototype.addSubtitle=function(e){this.sendMethodCallMessage("subtitles.add",[e])},t}(o.GoogleCastRemoteControlBase)},23747:function(e,t,i){var n=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(t,i)};return function(t,i){if("function"!=typeof i&&null!==i)throw TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),r=this&&this.__spreadArray||function(e,t,i){if(i||2==arguments.length)for(var n,r=0,o=t.length;r<o;r++)!n&&r in t||(n||(n=Array.prototype.slice.call(t,0,r)),n[r]=t[r]);return e.concat(n||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.GoogleCastRemoteControlV3=void 0,t.getDrmConfig=function(e){if(e.widevine)return b(e.widevine,o.WIDEVINE);if(e.playready)return b(e.playready,o.PLAYREADY);if(e.clearkey)return b(e.clearkey,o.CLEARKEY);throw Error("Not supported drm config.")},t.getUrlFromKeys=v,t.sortProgressiveSources=S;var o,a=i(80813),s=i(20213),u=i(85625),c=i(74853),l=i(70233),d=i(58313),h=i(32645),p=i(7209),f=i(2025),g=i(58367),m=i(13748),y=i(15529);function v(e){return"data:application/json;base64,"+btoa(JSON.stringify({keys:e.map(function(e){var t=l.FormatHelper.hexToBytes(e.key),i=l.FormatHelper.hexToBytes(e.kid||"");return{kty:"oct",kid:c.ArrayHelper.arrayBufferToBase64(i.buffer).replace(/[=]*$/,""),k:c.ArrayHelper.arrayBufferToBase64(t.buffer).replace(/[=]*$/,"")}})}))}function S(e){return e.sort(function(e,t){return e.preferred===t.preferred?(e.bitrate||0)>(t.bitrate||0)?-1:1:(e.preferred||0)>(t.preferred||0)?-1:1})}function b(e,t){return!function(e){return Array.isArray(e)}(e)?{protectionSystem:t,licenseUrl:e.LA_URL||"",headers:e.headers,withCredentials:e.withCredentials||!1}:{protectionSystem:o.CLEARKEY,licenseUrl:v(e)}}!function(e){e.CLEARKEY="clearkey",e.PLAYREADY="playready",e.WIDEVINE="widevine"}(o||(o={})),t.GoogleCastRemoteControlV3=function(e){function t(t,i){var n=e.call(this,t,i)||this;return n.NM=0,n.QM=!1,n.WM=function(e){var t,i;(null==(t=n.mediaInfo)?void 0:t.duration)>0&&(null==(i=n.mediaInfo)?void 0:i.duration)-n.MM<2&&0===e.value&&(n.LM=!0,n.onRemotePlayerEvent({event:s.PlayerEvent.PlaybackFinished})),n.MM=e.value},n.OM=new m.MediaInfoTrackMapper(t),n.PM=new g.EditTrackInfoProcessor(n.mediaInfo,n.media,n.context.logger),n.RM=new y.MediaInfoWrapper(n.mediaInfo,n.context.logger),n}return n(t,e),t.prototype.initializeCast=function(){e.prototype.initializeCast.call(this),this.VM()},t.prototype.getCurrentTime=function(e){if(void 0===e&&(e=s.TimeMode.AbsoluteTime),!this.remotePlayer)return 0;var t=this.remotePlayer.currentTime;return e===s.TimeMode.RelativeTime?t:this.SM(t)},t.prototype.SM=function(e){return e+this.UM()},t.prototype.TM=function(e){return e-this.UM()},t.prototype.UM=function(){var e,t,i,n=null==(t=null==(e=this.castSession)?void 0:e.getMediaSession())?void 0:t.customData;return null!=(i=null==n?void 0:n.startAbsoluteTime)?i:0},t.prototype.VM=function(){var e=this;this.remotePlayerController.addEventListener(cast.framework.RemotePlayerEventType.CURRENT_TIME_CHANGED,this.WM),this.context.eventHandler.on(s.PlayerEvent.PeriodSwitch,function(){new f.GoogleCastV3TrackFinder(e.mediaInfo).hasATrackToLoad()&&e.eM()})},t.prototype.sendMessage=function(e,t){this.config.messageNamespace&&this.castSession.sendMessage(this.config.messageNamespace,{type:"METADATA",data:t})},t.prototype.play=function(){var t=this;this.LM&&this.lastSource?this.setSource(this.lastSource).then(function(){return e.prototype.play.call(t)}):e.prototype.play.call(this),this.LM=!1},t.prototype.XM=function(e){var t=this.aM(e),i=t.url,n=t.mimeType,r=new chrome.cast.media.MediaInfo(i,n);return r.customData=(0,p.getCustomData)(e,n),r},t.prototype.getMediaInfo=function(e){var t,i=this.XM(e),n=this.context.sourceContext.sourceIdentifier,r=this.context.serviceManager.get(a.ServiceName.ManifestService,n);return(null==r?void 0:r.isLive())&&(i.streamType=chrome.cast.media.StreamType.LIVE,this.N
1M=0),this.YM(null!=(t=e.subtitleTracks)?t:[],i),this.config.prepareMediaInfo?this.config.prepareMediaInfo(i):Promise.resolve(i)},t.prototype.YM=function(e,t){var i=new y.MediaInfoWrapper(t,this.context.logger);r(r([],null!=e?e:[],!0),this.ZM(),!0).forEach(function(e){return i.maybeAddInternalTrack(e)})},t.prototype.ZM=function(){var e=this.context.internalPlayer.listSubtitles().filter(function(e){return e.isSideloaded}),t=this.context.internalPlayer.getAvailableAudio();return r(r([],e,!0),t,!0)},t.prototype.aM=function(e){var t,i;if(e.dash)t=e.dash,i=u.ManifestMimeType.Dash;else if(e.hls)t=e.hls,i=u.ManifestMimeType.Hls;else if(e.smooth)t=e.smooth,i=u.ManifestMimeType.Smooth;else{if(!e.progressive)throw Error("Source not supported.");var n=this.cM(e.progressive);t=n.url,i=n.mimeType}return{url:t=d.URLHelper.toFullUrl(t),mimeType:i}},t.prototype.timeShift=function(e){var t;this.NM=e,this.seek(((null==(t=this.bM())?void 0:t.end)||0)+e)},t.prototype.seek=function(t){e.prototype.seek.call(this,this.TM(t))},t.prototype.bM=function(){var e,t=null==(e=this.remotePlayer)?void 0:e.liveSeekableRange;return void 0===(null==t?void 0:t.start)||void 0===(null==t?void 0:t.end)?{start:-1,end:-1}:{start:this.SM(t.start),end:this.SM(t.end)}},t.prototype.getTimeShift=function(){var e=this.bM();if(e.end<0)return this.NM;var t=this.getCurrentTime()-e.end;return t>0?0:t},t.prototype.getMaxTimeShift=function(){var e,t,i=this.bM();return(null!=(e=null==i?void 0:i.start)?e:0)-(null!=(t=null==i?void 0:i.end)?t:0)},t.prototype.cM=function(e){var t,i;if(Array.isArray(e)){var n=S(e)[0];t=n.url,i=n.type}else t=e;return{url:t,mimeType:i}},t.prototype.release=function(){e.prototype.release.call(this),this.remotePlayerController&&this.remotePlayerController.removeEventListener(cast.framework.RemotePlayerEventType.CURRENT_TIME_CHANGED,this.WM)},t.prototype.dM=function(e){var t,i,n=this;e&&(null!=(i=null==(t=e.customData)?void 0:t.needsReloadBeforePlay)&&i?this.eM().then(function(){n.PM.enableTrack(e)}):this.PM.enableTrack(e))},t.prototype.enableSubtitle=function(e){var t=new f.GoogleCastV3TrackFinder(this.mediaInfo).findTrackByInternalId(e,chrome.cast.media.TrackType.TEXT);t&&this.dM(t)},t.prototype.disableSubtitle=function(e){this.PM.disableTrack(e,chrome.cast.media.TrackType.TEXT)},t.prototype.setAudio=function(e){var t=new f.GoogleCastV3TrackFinder(this.mediaInfo).findTrackByInternalId(e,chrome.cast.media.TrackType.AUDIO);t&&this.dM(t)},t.prototype.mediaInfoChangedEventHandler=function(t){e.prototype.mediaInfoChangedEventHandler.call(this,t),this.PM.setMediaInfo(this.mediaInfo),this.RM=new y.MediaInfoWrapper(this.mediaInfo,this.context.logger),this.OM.maybeReMapTracksForMediaInfo(this.mediaInfo);var i,n,r=new y.MediaInfoWrapper(this.mediaInfo,this.context.logger);this.ZM().forEach(function(e){return r.maybeAddInternalTrack(e)}),this.QM&&(null==(n=null==(i=this.mediaInfo)?void 0:i.tracks)?void 0:n.length)>0&&this.fM()},t.prototype.addSubtitle=function(e){this.RM.maybeAddInternalTrack(e)},t.prototype.removeSubtitle=function(e){var t,i,n=new y.MediaInfoWrapper(this.mediaInfo,this.context.logger),r=!!(null==(i=null==(t=this.media)?void 0:t.activeTrackIds)?void 0:i.find(function(t){return t===n.findTrackIdForTrack(e)}));n.maybeRemoveInternalTrack(e)&&r&&this.PM.disableTrack(e,chrome.cast.media.TrackType.TEXT)},t.prototype.eM=function(){var e=new chrome.cast.media.LoadRequest(this.mediaInfo);return e.currentTime=this.context.internalPlayer.getCurrentTime(),e.autoplay=this.context.internalPlayer.isPlaying(),this.loadMediaRequest(e)},t.prototype.loadMediaRequest=function(t){var i=this;return this.OM.markAllTracksAsReadyToPlay(t.media.tracks),e.prototype.loadMediaRequest.call(this,t).then(function(){i.QM=!0,i.PM.setMedia(i.media),i.PM.setMediaInfo(i.mediaInfo),i.fM()})},t.prototype.fM=function(){var e,t=this;if(this.mediaInfo){this.QM=!1;var i=this.context.internalPlayer.listSubtitles().filter(function(e){return!!e.enabled}).map(function(e){return e.id});i.push(null==(e=this.context.internalPlayer.getAudio())?void 0:e.id),i=i.filter(Boolean);var n=new f.GoogleCastV3TrackFinder(this.mediaInfo).findTracksForIds(i),r=n.some(function(e){var t;return null==(t=e.customData)?void 0:t.needsReloadBeforePlay}),o=n.map(function(e){return e.trackId});if(!r)return this.PM.changeActiveTracksBasedOnCastIds(o);this.eM().then(function(){t.PM.changeActiveTracksBasedOnCastIds(o)})}},t}(h.GoogleCastRemoteControlBase)}
1,7209:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.getCustomData=function(e,t){var i={};return o(e.drm)&&(i.drm=(0,r.getDrmConfig)(e.drm)),o(e.metadata)&&(i.metadata=e.metadata),o(e.options)&&(i.options=function(e,t){var i,r,o=e.options;return t===n.ManifestMimeType.Dash?(i=a(o,["dashWithCredentials","withCredentials"]),r=a(o,["dashManifestWithCredentials","manifestWithCredentials"])):t===n.ManifestMimeType.Hls&&(i=a(o,["hlsWithCredentials","withCredentials"]),r=a(o,["hlsManifestWithCredentials","manifestWithCredentials"])),{withCredentials:i||!1,manifestWithCredentials:r||!1}}(e,t)),i};var n=i(85625),r=i(23747);function o(e){return Object.keys(null!=e?e:{}).length>0}function a(e,t){for(var i,n=0,r=t;n<r.length;n++){var o=r[n];if(o in e){i=e[o];break}}return i}},2025:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.GoogleCastV3TrackFinder=void 0,t.GoogleCastV3TrackFinder=function(){function e(e){this.W6=e}return e.prototype.findTrackIdByInternalId=function(e,t){var i,n;return null!=(n=null==(i=this.findTrackByInternalId(e,t))?void 0:i.trackId)?n:null},e.prototype.findTrackByInternalId=function(e,t){var i,n,r;return null!=(r=(null!=(n=null==(i=this.W6)?void 0:i.tracks)?n:[]).find(function(i){var n;return(null==(n=i.customData)?void 0:n.internalId)===e&&i.type===t}))?r:null},e.prototype.findTracksForIds=function(e){var t,i;return(null!=(i=null==(t=this.W6)?void 0:t.tracks)?i:[]).filter(function(t){var i;return e.includes(null==(i=t.customData)?void 0:i.internalId)})},e.prototype.hasATrackToLoad=function(){var e,t;return!!(null==(t=null==(e=this.W6)?void 0:e.tracks)?void 0:t.find(function(e){var t;return null==(t=e.customData)?void 0:t.needsReloadBeforePlay}))},e.prototype.setMediaInfo=function(e){this.W6=e},e}()},94952:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.wrapCustomElementRegistry=function(){var e=function(){var e=window.customElements;return!function(e){return"object"==typeof e&&["get","define","whenDefined","upgrade"].every(function(t){return"function"==typeof e[t]})}(e)?void 0:e}();void 0===i&&void 0!==e&&(i=new r(e),Object.defineProperty(window,"customElements",{get:function(){return i}}))};var i,n=["google-cast-button","google-cast-launcher"],r=function(){function e(e){this.registry=e}return e.prototype.define=function(e,t,i){var r=n.includes(e),o=!!this.registry.get(e);r&&o||this.registry.define(e,t,i)},e.prototype.whenDefined=function(e){return this.registry.whenDefined(e)},e.prototype.get=function(e){return this.registry.get(e)},e.prototype.upgrade=function(e){this.registry.upgrade(e)},e}()},92682:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.RemoteControlModuleDefinition=void 0;var n=i(62756),r=i(42489);t.RemoteControlModuleDefinition={name:n.ModuleName.RemoteControl,module:{RemoteControlManager:r.RemoteControlManager}},t.default=t.RemoteControlModuleDefinition},60768:function(e,t){var i;Object.defineProperty(t,"__esModule",{value:!0}),t.RemoteControlMessageType=void 0,function(e){e[e.SourceSetup=0]="SourceSetup",e[e.PlayerApiMethodCall=1]="PlayerApiMethodCall",e[e.CustomData=2]="CustomData"}(i||(t.RemoteControlMessageType=i={}))},35317:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.RemoteControlBase=void 0;var n,r=i(20213),o=i(60768),a=i(30165);!function(e){e[e.Idle=0]="Idle",e[e.Ready=1]="Ready",e[e.Connected=2]="Connected"}(n||(n={})),t.RemoteControlBase=function(){function e(e){this.context=e,this.U6=n.Idle}return Object.defineProperty(e.prototype,"U6",{get:function(){return this.S6},set:function(e){this.context.logger.debug("Remote control session state change: ".concat(n[this.S6]," -> ").concat(n[e])),this.S6=e},enumerable:!1,configurable:!0}),e.prototype.getConfig=function(){throw Error("Not implemented - overwrite in subclasses!")},e.prototype.setOnErrorCallback=function(e){this.L6=e},e.prototype.setOnReadyCallback=function(e){this.M6=e},e.prototype.setOnConnectCallback=function(e){this.N6=e},e.prototype.setOnConnectedCallback=function(e){this.O6=e},e.prototype.setOnDisconnectCallback=function(e){this.P6=e},e.prototype.setOnDisconnectedCallback=function(e){this.Q6=e},e.prototype.setOnRemotePlayerEventCallback=function(e){this.R6=e},e.prototype.isReady=function(){return this.U6===n.Ready},e.prototype.isConnected=function(){return this.U6===n.Connected},e.prototype.onError=function(){this.U6=n.Ready,this.L6&&this.L6()},e.prototype.onReady=function(e){void 0===e&&(e=!0);var t=e?n.Ready:n.Idle;this.U6!==t&&(this.U6=t,this.M6&&this.M6({receiverAvailable:e}))},e.prototype.V6=function(){this.playerState={isPlaying:!1,isPaused:!1,hasEnded:!1,isMuted:!1,isStalled:!1,isLive:!1,getVolume:1,getCurrentTime:0,getRelativeCurrentTime:0,getDuration:0,getVersion:"",getDroppedVideoFrames:0,getForwardBufferLevelForVideo:0,getBackwardBufferLevelForVideo:0,getForwardBufferLevelForAudio:0,getBackwardBufferLevelForAudio:0,getTotalStalledTime:0,getDownloadedVideoData:null,getDownloadedAudioData:null,getPlaybackVideoData:null,getPlaybackAudioData:null,getMaxTimeShift:0,getTimeShift:0,getSubtitle:null,getAudio:null}},e.prototype.onConnect=function(e){this.N6&&this.N6({deviceName:e}),this.V6()},e.prototype.onConnected=function(e,t){this.U6=n.Connected,this.V6(),this.O6&&this.O6({deviceName:e,resumed:t})},e.prototype.onDisconnect=function(){this.P6&&this.P6()},e.prototype.onDisconnected=function(){this.U6=n.Ready,this.Q6&&this.Q6()},e.prototype.onRemotePlayerEvent=function(e){this.R6&&this.R6(e)},e.prototype.sendMethodCallMessage=function(e,t){var i=[];t&&(i=Array.isArray(t)?t:1===t.length?[t[0]]:Array.apply(null,t)),this.sendMessage(o.RemoteControlMessageType.PlayerApiMethodCall,{methodName:e,arguments:i})},e.prototype.handleRemoteControlReceiverMessage=function(e){switch(e.type){case a.RemoteControlReceiverMessageType.PlayerState:return this.playerState=e.data,!0;case a.RemoteControlReceiverMessageType.PlayerEvent:var t=e.data;return this.onRemotePlayerEvent(t),!0;case a.RemoteControlReceiverMessageType.PlayerGetterCallReturnValue:return!0}return!1},e.prototype.play=function(){this.sendMethodCallMessage("play")},e.prototype.pause=function(){this.sendMethodCallMessage("pause")},e.prototype.seek=function(e){this.sendMethodCallMessage("seek",[e])},e.prototype.setTargetBufferLevel=function(e,t,i){this.sendMethodCallMessage("setTargetBufferLevel",[e,t,i])},e.prototype.setVolume=function(e){this.sendMethodCallMessage("setVolume",[e])},e.prototype.setMuted=function(e){e?this.sendMethodCallMessage("mute"):this.sendMethodCallMessage("unmute")},e.prototype.isPlaying=function(){return this.playerState.isPlaying}
vendor: 21,797 bytes, line 1
1,e.prototype.isPaused=function(){return this.playerState.isPaused},e.prototype.getCurrentTime=function(e){return void 0===e&&(e=r.TimeMode.AbsoluteTime),e===r.TimeMode.AbsoluteTime?this.playerState.getCurrentTime:this.playerState.getRelativeCurrentTime},e.prototype.getVolume=function(){return this.playerState.getVolume},e.prototype.isMuted=function(){return this.playerState.isMuted},e.prototype.hasEnded=function(){return this.playerState.hasEnded},e.prototype.isStalled=function(){return this.playerState.isStalled},e.prototype.isLive=function(){return this.playerState.isStalled},e.prototype.getDuration=function(){return this.playerState.getDuration},e.prototype.getDroppedVideoFrames=function(){return this.playerState.getDroppedVideoFrames},e.prototype.getBufferLevel=function(e,t){var i={level:0,targetLevel:this.context.bufferSettings.getTargetLevel(e,t),type:e,media:t};return r.BufferType.ForwardDuration?t===r.MediaType.Video?i.level=this.playerState.getForwardBufferLevelForVideo:t===r.MediaType.Audio&&(i.level=this.playerState.getForwardBufferLevelForAudio):r.BufferType.BackwardDuration&&(t===r.MediaType.Video?i.level=this.playerState.getBackwardBufferLevelForVideo:t===r.MediaType.Audio&&(i.level=this.playerState.getBackwardBufferLevelForAudio)),i},e.prototype.getTotalStalledTime=function(){return this.playerState.getTotalStalledTime},e.prototype.getDownloadedVideoData=function(){return this.playerState.getDownloadedVideoData},e.prototype.getDownloadedAudioData=function(){return this.playerState.getDownloadedAudioData},e.prototype.getPlaybackVideoData=function(){return this.playerState.getPlaybackVideoData},e.prototype.getPlaybackAudioData=function(){return this.playerState.getPlaybackAudioData},e.prototype.getTimeShift=function(){return this.playerState.getTimeShift},e.prototype.getMaxTimeShift=function(){return this.playerState.getMaxTimeShift},e.prototype.preload=function(){this.sendMethodCallMessage("preload",[])},e.prototype.setAudioQuality=function(e){this.sendMethodCallMessage("setAudioQuality",[e])},e.prototype.setVideoQuality=function(e){this.sendMethodCallMessage("setVideoQuality",[e])},e.prototype.setQueryParameters=function(e){this.sendMethodCallMessage("setQueryParameters",[e])},e.prototype.clearQueryParameters=function(){this.sendMethodCallMessage("clearQueryParameters",[])},e.prototype.timeShift=function(e){this.sendMethodCallMessage("timeShift",[e])},e.prototype.enableSubtitle=function(e){this.sendMethodCallMessage("subtitles.enable",[e])},e.prototype.disableSubtitle=function(e){this.sendMethodCallMessage("subtitles.disable",[e])},e.prototype.setAudio=function(e){this.sendMethodCallMessage("setAudio",[e])},e.prototype.getSnapshot=function(e,t){this.sendMethodCallMessage("getSnapshot",[e,t])},e.prototype.setPlaybackSpeed=function(e){this.sendMethodCallMessage("setPlaybackSpeed",[e])},e.prototype.unload=function(){return this.sendMethodCallMessage("unload"),Promise.resolve()},e}()},42489:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.RemoteControlManager=void 0;var n=i(23690),r=i(85648),o=i(68657),a=i(32645),s=i(61348),u=i(23747),c=i(94952),l=i(77118),d=i(91297);t.RemoteControlManager=function(){function e(t,i){this.Rj=e.setupRemoteControl(t),this.Rj instanceof a.GoogleCastRemoteControlBase&&function(e,t){(0,c.wrapCustomElementRegistry)(),e.removeScript(t,"cast_sender.js"),e.removeScript(t,"cast_framework.js"),setTimeout(function(){return e.loadScript(t)},0)}(i,t.config.location.cast)}return e.prototype.getPlayerWrapper=function(e,t){return new l.RemoteControlPlayerWrapper(e,t,this.Rj)},e.setupRemoteControl=function(e){if(null==e.config||null==e.settings)return null;var t=e.config,i=e.settings;if((t.cast&&t.cast.enable||(!t.cast||t.cast&&!t.cast.hasOwnProperty("enable"))&&t.remotecontrol&&"googlecast"===t.remotecontrol.type)&&(t.remotecontrol&&"googlecast"===t.remotecontrol.type&&t.remotecontrol.receiverApplicationId?(i.CAST_APPLICATION_ID=t.remotecontrol.receiverApplicationId,e.logger.debug("ChromeCast setting application ID to ".concat(i.CAST_APPLICATION_ID))):t.cast&&t.cast.application_id?(i.CAST_APPLICATION_ID=t.cast.application_id,e.logger.debug("ChromeCast setting application ID to ".concat(i.CAST_APPLICATION_ID))):e.logger.debug("ChromeCast using default application ID ".concat(i.CAST_APPLICATION_ID)),t.remotecontrol&&"googlecast"===t.remotecontrol.type&&t.remotecontrol.messageNamespace?0===t.remotecontrol.messageNamespace.indexOf("urn:x-cast:")?i.CAST_MESSAGE_NAMESPACE=t.remotecontrol.messageNamespace:(e.logger.debug("ChromeCast setting message namespace failed! Namespace must start with urn:x-cast:"),e.logger.debug("ChromeCast using default message namespace ".concat(i.CAST_MESSAGE_NAMESPACE))):t.cast&&t.cast.message_namespace?0===t.cast.message_namespace.indexOf("urn:x-cast:")?(i.CAST_MESSAGE_NAMESPACE=t.cast.message_namespace,e.logger.debug("ChromeCast setting message namespace to ".concat(i.CAST_MESSAGE_NAMESPACE))):(e.logger.debug("ChromeCast setting message namespace failed! Namespace must start with urn:x-cast:"),e.logger.debug("ChromeCast using default message namespace ".concat(i.CAST_MESSAGE_NAMESPACE))):e.logger.debug("ChromeCast using default message namespace ".concat(i.CAST_MESSAGE_NAMESPACE)),t.hasOwnProperty("remotecontrol")||(t.remotecontrol={type:"googlecast",receiverApplicationId:i.CAST_APPLICATION_ID,messageNamespace:i.CAST_MESSAGE_NAMESPACE,customReceiverConfig:{receiverStylesheetUrl:t.cast.receiverStylesheetUrl||null}})),t.remotecontrol&&t.remotecontrol.type)switch(t.remotecontrol.type){case"googlecast":return t.remotecontrol.receiverApplicationId=t.remotecontrol.receiverApplicationId||i.CAST_APPLICATION_ID,t.remotecontrol.messageNamespace=t.remotecontrol.messageNamespace||i.CAST_MESSAGE_NAMESPACE,t.remotecontrol.receiverVersion===o.GoogleCastReceiverVersion.v3?(e.store.dispatch((0,n.setRemoteControlType)(r.RemoteControlType.GoogleCastV3)),new u.GoogleCastRemoteControlV3(e,t.remotecontrol)):(e.store.dispatch((0,n.setRemoteControlType)(r.RemoteControlType.GoogleCastV2)),new s.GoogleCastRemoteControlV2(e,t.remotecontrol));case"websocket":return e.store.dispatch((0,n.setRemoteControlType)(r.RemoteControlType.Websocket)),new d.WebSocketRemoteControl(e,t.remotecontrol);default:e.logger.debug("unknown remote control type: "+t.remotecontrol.type)}return null},e}()},77118:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.RemoteControlPlayerWrapper=t.addStartOffset=t.clamp=t.getForwardBufferDiff=void 0;var n=i(3714),r=i(75375),o=i(44468),a=i(23690),s=i(87827),u=i(85648),c=i(71223),l=i(32645),d=i(60768);t.getForwardBufferDiff=function(e){return e.getBufferLevel(o.BufferType.ForwardDuration,o.MediaType.Video).targetLevel-20},t.clamp=function(e,t,i){return Math.max(t,Math.min(i,e))},t.addStartOffset=function(e,i,n){var r=!!(e.options&&e.options.startOffset);return(i||!r)&&(e.options=e.options||{},e.options.startOffset=n.isLive()?n.getTimeShift()-(0,t.getForwardBufferDiff)(n):n.getCurrentTime()),e};var h=function(){function e(e,i,r){var o=this;if(this.jM=!1,this.kM=!1,this.gM=e,this.hM=i,this.iM=r,r){var s=!1,l=!1,d=function(){o.kM=o.hM.isPlaying(),o.hM.pause()};r.setOnErrorCallback(function(){e.logger.debug("Remote error"),e.eventHandler.dispatchEvent(n.PlayerEvent.CastStopped),s&&(s=!1,o.mM(),e.store.dispatch((0,a.setConnectionState)(u.ConnectionState.Disconnected)))}),r.setOnReadyCallback(function(t){e.logger.debug("Remote ready"),e.eventHandler.dispatchEvent(n.PlayerEvent.CastAvailable,{receiverAvailable:t.receiverAvailable})}),r.setOnConnectCallback(function(t){e.logger.debug("Remote connect",t),e.store.dispatch((0,a.setConnectionState)(u.ConnectionState.Connecting)),d(),e.eventHandler.dispatchEvent(n.PlayerEvent.CastWaitingForDevice,{castPayload:{deviceName:t.deviceName,currentTime:void 0,timestamp:void 0,type:void 0}})}),r.setOnConnectedCallback(function(i){e.logger.debug("Remote connected",i),e.store.dispatch((0,a.setConnectionState)(u.ConnectionState.Connected));var h=(0,c.isSameSource)(r.getSource(),e.sourceContext.source);if(i.resumed&&d(),!i.resumed||!h){e.settings.QUERY_PARAMETERS&&r.setQueryParameters(e.settings.QUERY_PARAMETERS),null!=r.getConfig()&&r.getConfig().customReceiverConfig&&o.addMetadata("CAST",{type:"customReceiverConfig",data:r.getConfig().customReceiverConfig});var p=(0,t.addStartOffset)(e.sourceContext.source,o.jM,o.hM);r.setSource(p,o.lM(),o.hM.getCurrentTime()),l=!0}e.eventHandler.dispatchEvent(n.PlayerEvent.CastStarted,{deviceName:i.deviceName,resuming:i.resumed}),s=!0,e.eventHandler.dispatchEvent(n.PlayerEvent.VolumeChanged)}),r.setOnDisconnectCallback(function(){e.store.dispatch((0,a.setConnectionState)(u.ConnectionState.Disconnecting)),e.logger.debug("Remote disconnect")}),r.setOnDisconnectedCallback(function(){e.logger.debug("Remote disconnected"),e.store.dispatch((0,a.setConnectionState)(u.ConnectionState.Disconnected)),e.eventHandler.dispatchEvent(n.PlayerEvent.CastStopped),s=!1,o.mM(),e.eventHandler.dispatchEvent(n.PlayerEvent.VolumeChanged)}),r.setOnRemotePlayerEventCallback(function(t){if(e.logger.debug("Remote player state changed",t),l)switch(t.event){case n.PlayerEvent.Play:case n.PlayerEvent.Paused:l=!1;for(var o=0,a=i.listSubtitles();o<a.length;o++){var s=a[o];r.addSubtitle(s),s.enabled&&r.enableSubtitle(s.id)}}var u=t.data||{};u.remote=!0,e.eventHandler.dispatchEvent(t.event,u)})}else e.logger.debug("No remote control passed into wrapper")}return e.prototype.lM=function(){return this.gM.config&&this.gM.config.playback&&this.gM.config.playback.autoplay||this.kM},e.prototype.mM=function(){var e=this.gM.settings.ENABLE_SEEK_FOR_LIVE;if(this.hM.isLive()&&!e){var i=this.iM.getTimeShift()+(0,t.getForwardBufferDiff)(this.hM),n=this.hM.getMaxTimeShift();this.hM.timeShift((0,t.clamp)(i,n,0))}else{var r=this.hM.getSeekableRange(),o=this.iM.getCurrentTime();this.hM.seek((0,t.clamp)(o,r.start,r.end))}this.iM.isPlaying()?this.hM.play():this.hM.pause()},e.prototype.nM=function(){return null!=this.iM&&this.iM.isReady()},e.prototype.oM=function(){return null!=this.iM&&this.iM.isConnected()},e.prototype.pM=function(e){var t=(0,s.getRemoteControlState)(this.gM.store.getState().player).remoteControlType===u.RemoteControlType.GoogleCastV3;e===r.UI_SEEK_ISSUER_NAME&&t||this.iM.pause()},e.prototype.AN=function(e){this.hM.pause(e)},e.prototype.getAvailableSegments=function(){return this.hM.getAvailableSegments()},e.prototype.play=function(e){return this.jM=!0,this.oM()?(this.iM.play(),Promise.resolve()):this.hM.play(e)},e.prototype.preload=function(){this.oM()?this.iM.preload():this.hM.preload()},e.prototype.pause=function(e){this.oM()?this.pM(e):this.AN(e)},e.prototype.mute=function(e){this.oM()&&this.iM.setMuted(!0),this.hM.mute(e)},e.prototype.unmute=function(e){this.oM()&&this.iM.setMuted(!1),this.hM.unmute(e)},e.prototype.setVolume=function(e,t){this.oM()?this.iM.setVolume(e/100):this.hM.setVolume(e,t)},e.prototype.seek=function(e,t){return this.oM()?(this.iM.seek(e),!0):this.hM.seek(e,t)},e.prototype.setAudioQuality=function(e){this.oM()&&this.iM.setAudioQuality(e),this.hM.setAudioQuality(e)},e.prototype.setVideoQuality=function(e){this.oM()&&this.iM.setVideoQuality(e),this.hM.setVideoQuality(e)},e.prototype.prepareLoad=function(){return this.hM.prepareLoad()},e.prototype.load=function(e,t,i){return this.oM()&&this.iM.setSource(this.gM.sourceContext.source,this.lM()),this.hM.load(e,t,i)},e.prototype.unload=function(e){return this.oM()&&this.iM.unload(),this.hM?this.hM.unload(e):Promise.resolve()},e.prototype.isPlaying=function(){return this.oM()?this.iM.isPlaying():this.hM.isPlaying()},e.prototype.isPaused=function(){return this.oM()?this.iM.isPaused():this.hM.isPaused()},e.prototype.hasEnded=function(){return this.oM()?this.iM.hasEnded():this.hM.hasEnded()},e.prototype.isMuted=function(){return this.oM()?this.iM.isMuted():this.hM.isMuted()},e.prototype.isStalled=function(){return this.oM()?this.iM.isStalled():this.hM.isStalled()},e.prototype.isLive=function(){return this.hM.isLive()},e.prototype.getVolume=function(){return this.oM()?100*this.iM.getVolume():this.hM.getVolume()},e.prototype.getCurrentTime=function(e){return void 0===e&&(e=o.TimeMode.AbsoluteTime),this.oM()?this.iM.getCurrentTime(e):this.hM.getCurrentTime(e)},e.prototype.getDuration=function(){return this.hM.getDuration()},e.prototype.getAvailableVideoQualities=function(){return this.hM.getAvailableVideoQualities()},e.prototype.getAvailableAudioQualities=function(){return this.hM.getAvailableAudioQualities()},e.prototype.getDroppedVideoFrames=function(){return this.oM()?this.iM.getDroppedVideoFrames():this.hM.getDroppedVideoFrames()},e.prototype.setTargetBufferLevel=function(e,t,i){return this.oM()?this.iM.setTargetBufferLevel(e,t,i):this.hM.setTargetBufferLevel(e,t,i)},e.prototype.getBufferLevel=function(e,t){return this.oM()?this.iM.getBufferLevel(e,t):this.hM.getBufferLevel(e,t)},e.prototype.getTotalStalledTime=function(){return this.oM()?this.iM.getTotalStalledTime():this.hM.getTotalStalledTime()},e.prototype.getDownloadedVideoData=function(){return this.oM()?this.iM.getDownloadedVideoData():this.hM.getDownloadedVideoData()},e.prototype.getDownloadedAudioData=function(){return this.oM()?this.iM.getDownloadedAudioData():this.hM.getDownloadedAudioData()},e.prototype.getPlaybackVideoData=function(){return this.oM()?this.iM.getPlaybackVideoData():this.hM.getPlaybackVideoData()},e.prototype.getPlaybackAudioData=function(){return this.oM()?this.iM.getPlaybackAudioData():this.hM.getPlaybackAudioData()},e.prototype.getBufferedRanges=function(){return this.hM.getBufferedRanges()},e.prototype.getManifest=function(){return this.hM.getManifest()},e.prototype.isCasting=function(){return this.oM()},e.prototype.isCastAvailable=function(){return this.nM()||this.oM()},e.prototype.castVideo=function(){this.nM()&&(this.iM.connect(),this.gM.eventHandler.dispatchEvent(n.PlayerEvent.CastStart))},e.prototype.castStop=function(){if(this.oM()){if(this.iM instanceof l.GoogleCastRemoteControlBase)return this.iM.connect();this.iM.disconnect()}},e.prototype.updateCallback=function(e){this.hM.updateCallback(e)},e.prototype.setQueryParameters=function(e){this.oM()&&this.iM.setQueryParameters(e),this.hM.setQueryParameters(e)},e.prototype.clearQueryParameters=function(){this.oM()&&this.iM.clearQueryParameters(),this.hM.clearQueryParameters()},e.prototype.getMaxTimeShift=function(){return this.oM()?this.iM.getMaxTimeShift():this.hM.getMaxTimeShift()},e.prototype.timeShift=function(e,t){this.oM()?this.iM.timeShift(e):this.hM.timeShift(e,t)},e.prototype.getTimeShift=function(){return this.oM()?this.iM.getTimeShift():this.hM.getTimeShift()},e.prototype.addSubtitle=function(e){return this.oM()&&this.iM.addSubtitle(e),this.hM.addSubtitle(e)},e.prototype.removeSubtitle=function(e){this.oM()&&this.iM.removeSubtitle(e),this.hM.removeSubtitle(e)},e.prototype.enableSubtitle=function(e){return this.oM()&&this.iM.enableSubtitle(e),this.hM.enableSubtitle(e)},e.prototype.disableSubtitle=function(e){return this.oM()&&this.iM.disableSubtitle(e),this.hM.disableSubtitle(e)},e.prototype.listSubtitles=function(){return this.hM.listSubtitles()},e.prototype.getAudioQuality=function(){return this.hM.getAudioQuality()},e.prototype.getVideoQuality=function(){return this.hM.getVideoQuality()},e.prototype.setAudio=function(e){this.oM()&&this.iM.setAudio(e),this.hM.setAudio(e)},e.prototype.getAvailableAudio=function(){return this.hM.getAvailableAudio()},e.prototype.getAudio=function(){return this.hM.getAudio()},e.prototype.getSnapshot=function(e,t){if(!this.oM())return this.hM.getSnapshot(e,t)},e.prototype.setPlaybackSpeed=function(e){this.oM()&&this.iM.setPlaybackSpeed(e),this.hM.setPlaybackSpeed(e)},e.prototype.getPlaybackSpeed=function(){return this.hM.getPlaybackSpeed()},e.prototype.permitControl=function(e){this.hM.permitControl(e)},e.prototype.addMetadata=function(e,t){return!("CAST"!==e.toUpperCase()||!this.oM()||(this.iM.sendMessage(d.RemoteControlMessageType.CustomData,t),0))},e.prototype.onFullscreenEnter=function(e){this.hM.onFullscreenEnter(e)},e.prototype.onFullscreenExit=function(){this.hM.onFullscreenExit()},e.prototype.isAirplayAvailable=function(){return this.hM.isAirplayAvailable()},e.prototype.isAirplayActive=function(){return this.hM.isAirplayActive()},e.prototype.showAirplayTargetPicker=function(){this.hM.showAirplayTargetPicker()},e.prototype.getSeekableRange=function(){return this.hM.getSeekableRange()},e.prototype.getLatency=function(){return this.hM.getLatency()},e.prototype.setTargetLatency=function(e){this.hM.setTargetLatency(e)},e.prototype.getTargetLatency=function(){return this.hM.getTargetLatency()},e.prototype.setCatchupConfig=function(e){this.hM.setCatchupConfig(e)},e.prototype.getCatchupConfig=function(){return this.hM.getCatchupConfig()},e.prototype.setFallbackConfig=function(e){this.hM.setFallbackConfig(e)},e.prototype.getFallbackConfig=function(){return this.hM.getFallbackConfig()},e.prototype.createManifestApi=function(){return this.hM.createManifestApi()},e.prototype.release=function(e){var t=this;return null!=this.iM&&(this.iM.setOnErrorCallback(null),this.iM.setOnReadyCallback(null),this.iM.setOnConnectCallback(null),this.iM.setOnConnectedCallback(null),this.iM.setOnDisconnectCallback(null),this.iM.setOnDisconnectedCallback(null),this.iM.setOnRemotePlayerEventCallback(null),this.iM.release()),this.hM.release(e).then(function(){t.hM=null,t.iM=null})},e}();t.RemoteControlPlayerWrapper=h},30165:function(e,t){var i,n;Object.defineProperty(t,"__esModule",{value:!0}),t.UnsupportedPlayerApiMethods=t.RemoteControlReceiverMessageType=void 0,function(e){e[e.PlayerState=0]="PlayerState",e[e.PlayerEvent=1]="PlayerEvent",e[e.PlayerGetterCallReturnValue=2]="PlayerGetterCallReturnValue"}(i||(t.RemoteControlReceiverMessageType=i={})),function(e){e.GET_CONTAINER="getContainer",e.GET_SNAPSHOT="getSnapShot",e.GET_VIDEO_ELEMENT="getVideoElement"}(n||(t.UnsupportedPlayerApiMethods=n={}))},61567:function(__unused_webpack_module,exports){Object.defineProperty(exports,"__esModule",{value:!0}),exports.RemoteJSON=void 0;var RemoteJSON=function(){function RemoteJSON(){}return RemoteJSON.stringifyFunction=function(e){if("function"==typeof e)return RemoteJSON.FUNCTION_PREFIX+e.toString()},RemoteJSON.parseFunction=function(fs){if(fs&&"string"==typeof fs&&0===fs.indexOf(RemoteJSON.FUNCTION_PREFIX)){var f="f = "+fs.substring(RemoteJSON.FUNCTION_PREFIX.length);if(eval(f),"function"==typeof f)return f}},RemoteJSON.stringify=function(e,t,i){return JSON.stringify(e,function(e,i){return"function"==typeof i?RemoteJSON.stringifyFunction(i):t?t(e,i):i},i)},RemoteJSON.parse=function(e,t){return JSON.parse(e,function(e,i){return RemoteJSON.parseFunction(i)||(t?t(e,i):i)})},RemoteJSON.FUNCTION_PREFIX="function::",RemoteJSON}();exports.RemoteJSON=RemoteJSON},91297:function(e,t,i){var n=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(t,i)};return function(t,i){if("function"!=typeof i&&null!==i)throw TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.WebSocketRemoteControl=void 0;var r=i(60768),o=i(35317),a=i(61567);t.WebSocketRemoteControl=function(e){function t(t,i){var n=e.call(this,t)||this;return n.BN=i,window.WebSocket&&n.onReady(),n}return n(t,e),t.prototype.getConfig=function(){return this.BN},t.prototype.connect=function(){var e=this;if(!this.isReady())throw Error("Remote is not ready");this.onConnect("WebSocket Receiver"),this.CN=new WebSocket(this.BN.url+"?role=remote"),this.CN.addEventListener("open",function(t){e.onConnected("WebSocket Receiver",!1)}),this.CN.addEventListener("error",function(t){e.context.logger.debug("Error",t),e.onError()}),this.CN.addEventListener("close",function(t){e.context.logger.debug("Close",t),e.onDisconnected()}),this.CN.addEventListener("message",function(t){return e.EN(t)})},t.prototype.EN=function(e){if(e.data)try{var t=JSON.parse(e.data);this.handleRemoteControlReceiverMessage(t)}catch(t){this.context.logger.error("message parsing failed",e.data)}else this.context.logger.log("unknown message received",e.data)},t.prototype.sendMessage=function(e,t){this.CN.send(a.RemoteJSON.stringify({type:e,data:t}))},t.prototype.addSubtitle=function(e){this.sendMethodCallMessage("subtitles.add",[e])},t.prototype.removeSubtitle=function(e){this.sendMethodCallMessage("subtitles.remove",[e])},t.prototype.disconnect=function(){this.onDisconnect(),this.CN.close()},t.prototype.release=function(){},t.prototype.setSource=function(e,t,i){this.DN=e,this.sendMessage(r.RemoteControlMessageType.SourceSetup,{source:e,autoplay:t,time:i})},t.prototype.getSource=function(){return this.DN},t}(o.RemoteControlBase)},58367:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.EditTrackInfoProcessor=void 0;var n=i(2025),r=i(26662);t.EditTrackInfoProcessor=function(){function e(e,t,i){this.Y6=Promise.resolve(),this.X6=new n.GoogleCastV3TrackFinder(e),this.media=t,this.logger=i}return e.prototype.setMedia=function(e){this.media=e},e.prototype.setMediaInfo=function(e){this.X6.setMediaInfo(e)},e.prototype.enableTrack=function(e){var t,i=this,n=e.trackId;this.a6(null==(t=e.customData)?void 0:t.internalId,e.type,n)&&n&&this.Y6.then(function(){var t=i.Z6(e.type);return t.push(n),new r.EditTrackInfoRequest(i.media,t,i.logger).execute()})},e.prototype.Z6=function(e){if(!this.media||!this.media.activeTrackIds)return[];var t,i=this.media.activeTrackIds,n=null==(t=this.media.media)?void 0:t.tracks;
1if(!n)return i;var r=n.filter(function(t){return t.type!==e});return i.filter(function(e){return r.find(function(t){return t.trackId===e})})},e.prototype.disableTrack=function(e,t){var i,n=this.X6.findTrackIdByInternalId(e,t);if(this.a6(e,t,n)&&n){var o=((null==(i=this.media)?void 0:i.activeTrackIds)||[]).filter(function(e){return e!==n});this.Y6=new r.EditTrackInfoRequest(this.media,o,this.logger).execute()}},e.prototype.changeActiveTracksBasedOnCastIds=function(e){this.media&&(this.Y6=new r.EditTrackInfoRequest(this.media,e,this.logger).execute())},e.prototype.a6=function(e,t,i){return this.media?null!==i||(this.logger.debug("EditTrackInfoProcessor: Could not make track request. No trackId found for combination:",{requestId:e,type:t}),!1):(this.logger.debug("EditTrackInfoProcessor: Media info is not initialized."),!1)},e}()},26662:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.EditTrackInfoRequest=void 0,t.EditTrackInfoRequest=function(){function e(e,t,i){this.ddb=e,this.edb=t,this.fdb=i}return e.prototype.execute=function(){var e=this;return new Promise(function(t,i){if(e.ddb){var n=new chrome.cast.media.EditTracksInfoRequest(e.edb);e.ddb.editTracksInfo(n,t,i)}else i("Media is not initialized properly.")}).catch(function(t){e.fdb.debug("Problem executing EditTrackInfoRequest",t)})},e}()},13748:function(e,t,i){var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.MediaInfoTrackMapper=void 0;var r=i(80186),o=i(57230);t.MediaInfoTrackMapper=function(){function e(e){this.context=e}return e.prototype.maybeReMapTracksForMediaInfo=function(e){(null==e?void 0:e.tracks)&&this.mapTracksWithNoInternalId(e.tracks)},e.prototype.mapTracksWithNoInternalId=function(e){var t=this,i=e.filter(function(e){var t;return!(null==(t=e.customData)?void 0:t.internalId)}),n={};i.forEach(function(i){var r=i.type,o=n[r];o||(o=t.d6(i),n[r]=o),t.b6(i,e,o)})},e.prototype.b6=function(e,t,i){var r;if(!(null==(r=null==e?void 0:e.customData)?void 0:r.internalId)&&(null==t?void 0:t.length)){var o=this.c6(e,t,i);o?e.customData=n(n({},e.customData),{internalId:o}):this.context.logger.debug("Could not map track for language:",e.language,"No relevant internal track was found.",e)}},e.prototype.c6=function(e,t,i){var n,o,a,s=i.filter(function(t){return(0,r.bothTracksHaveSameLanguage)(t,e)}),u=null==(n=s[0])?void 0:n.id;if(s.length>0){var c=t.filter(function(e){var t;return!!(null==(t=e.customData)?void 0:t.internalId)}).map(function(e){return e.customData.internalId});return null!=(a=null==(o=s.find(function(e){return!c.includes(e.id)}
1))?void 0:o.id)?a:null}return u},e.prototype.d6=function(e){return(0,o.isSubtitle)(e)?this.context.internalPlayer.listSubtitles():(0,o.isAudio)(e)?this.context.internalPlayer.getAvailableAudio():[]},e.prototype.markAllTracksAsReadyToPlay=function(e){null==e||e.forEach(function(e){e.customData&&(e.customData.needsReloadBeforePlay=!1)})},e}()},15529:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.MediaInfoWrapper=void 0;var n=i(57230);t.MediaInfoWrapper=function(){function e(e,t){e&&!Array.isArray(e.tracks)&&(e.tracks=[]),this.e6=e,this.f6=t}return e.prototype.g6=function(){var e,t,i,n=null==(e=this.e6)?void 0:e.tracks;return(null==n?void 0:n.length)&&null!=(i=null==(t=n[n.length-1])?void 0:t.trackId)?i:0},e.prototype.maybeAddInternalTrack=function(e){if(this.e6&&!(this.h6(e.id)>=0)){var t=(0,n.fromInternalTrackToGoogleTrack)(e,this.g6()+1);(0,n.isValidTrack)(t)?this.e6.tracks.push(t):this.f6.debug("Trying to add an invalid track",t)}},e.prototype.maybeRemoveInternalTrack=function(e){var t,i,n=this.h6(e);return n>-1&&(null==(i=null==(t=this.e6)?void 0:t.tracks)||i.splice(n,1)),n>-1},e.prototype.h6=function(e){var t;return e&&(null==(t=this.e6)?void 0:t.tracks)?this.e6.tracks.findIndex(function(t){var i;return e===(null==(i=t.customData)?void 0:i.internalId)}):-1},e.prototype.findTrackIdForTrack=function(e){var t,i,n;return null!=(n=null==(i=null==(t=this.e6)?void 0:t.tracks[this.h6(e)])?void 0:i.trackId)?n:-1},e}()},80186:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.bothTracksHaveSameLanguage=function(e,t){var i;return!!t.language&&((null==(i=e.lang)?void 0:i.toLowerCase())===t.language.toLowerCase()||function(e,t){var i=n.SHAKA_ISO_MAP[e];return i?t===i:function(e){var t=Object.keys(n.SHAKA_ISO_MAP).find(function(t){return e===n.SHAKA_ISO_MAP[t]||e===t});return null!=t?n.SHAKA_ISO_MAP[t]:null}(t)===e}(t.language,e.lang))};var n=i(90435)},57230:function(e,t){function i(e){return e.type===chrome.cast.media.TrackType.AUDIO}Object.defineProperty(t,"__esModule",{value:!0}),t.fromInternalTrackToGoogleTrack=function(e,t){var n,r=e.getQualities?chrome.cast.media.TrackType.AUDIO:chrome.cast.media.TrackType.TEXT,o=new chrome.cast.media.Track(t,r);return function(e,t){i(t)?function(e,t){var i,n;t.trackContentType=null!=(n=null==(i=e.getQualities().find(function(e){return e.codec}))?void 0:i.codec)?n:""}(e,t):function(e,t){t.trackContentType=e.id?e.id.split("-")[0]:"",t.trackContentId=e.url,t.subtype=function(e){var t,i;return e.kind===chrome.cast.media.TextTrackType.METADATA.toLowerCase()?chrome.cast.media.TextTrackType.METADATA:(null==(t=e.kind)?void 0:t.includes("caption"))||function(e){return!!e.find(function(e){var t;return null==(t=e.value)?void 0:t.includes("caption")})}(null!=(i=e.role)?i:[])?chrome.cast.media.TextTrackType.CAPTIONS:chrome.cast.media.TextTrackType.SUBTITLES}(e)}(e,t)}(e,o),o.language=e.lang,o.name=e.label,o.roles=(null==(n=e.role)
vendor: 2,332 bytes, line 1
1?void 0:n.filter(function(e){return!!e.value}).map(function(e){return e.value||""}))||[],o.customData={internalId:e.id,needsReloadBeforePlay:!0},o},t.isValidTrack=function(e){return!(!(e.trackContentType&&e.trackId&&e.language&&e.name)||i(e)||!e.subtype||!e.trackContentId)},t.isSubtitle=function(e){return e.type===chrome.cast.media.TrackType.TEXT},t.isAudio=i},90435:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.SHAKA_ISO_MAP=void 0,t.SHAKA_ISO_MAP={aar:"aa",abk:"ab",afr:"af",aka:"ak",alb:"sq",amh:"am",ara:"ar",arg:"an",arm:"hy",asm:"as",ava:"av",ave:"ae",aym:"ay",aze:"az",bak:"ba",bam:"bm",baq:"eu",bel:"be",ben:"bn",bih:"bh",bis:"bi",bod:"bo",bos:"bs",bre:"br",bul:"bg",bur:"my",cat:"ca",ces:"cs",cha:"ch",che:"ce",chi:"zh",chu:"cu",chv:"cv",cor:"kw",cos:"co",cre:"cr",cym:"cy",cze:"cs",dan:"da",deu:"de",div:"dv",dut:"nl",dzo:"dz",ell:"el",eng:"en",epo:"eo",est:"et",eus:"eu",ewe:"ee",fao:"fo",fas:"fa",fij:"fj",fin:"fi",fra:"fr",fre:"fr",fry:"fy",ful:"ff",geo:"ka",ger:"de",gla:"gd",gle:"ga",glg:"gl",glv:"gv",gre:"el",grn:"gn",guj:"gu",hat:"ht",hau:"ha",heb:"he",her:"hz",hin:"hi",hmo:"ho",hrv:"hr",hun:"hu",hye:"hy",ibo:"ig",ice:"is",ido:"io",iii:"ii",iku:"iu",ile:"ie",ina:"ia",ind:"id",ipk:"ik",isl:"is",ita:"it",jav:"jv",jpn:"ja",kal:"kl",kan:"kn",kas:"ks",kat:"ka",kau:"kr",kaz:"kk",khm:"km",kik:"ki",kin:"rw",kir:"ky",kom:"kv",kon:"kg",kor:"ko",kua:"kj",kur:"ku",lao:"lo",lat:"la",lav:"lv",lim:"li",lin:"ln",lit:"lt",ltz:"lb",lub:"lu",lug:"lg",mac:"mk",mah:"mh",mal:"ml",mao:"mi",mar:"mr",may:"ms",mkd:"mk",mlg:"mg",mlt:"mt",mon:"mn",mri:"mi",msa:"ms",mya:"my",nau:"na",nav:"nv",nbl:"nr",nde:"nd",ndo:"ng",nep:"ne",nld:"nl",nno:"nn",nob:"nb",nor:"no",nya:"ny",oci:"oc",oji:"oj",ori:"or",orm:"om",oss:"os",pan:"pa",per:"fa",pli:"pi",pol:"pl",por:"pt",pus:"ps",que:"qu",roh:"rm",ron:"ro",rum:"ro",run:"rn",rus:"ru",sag:"sg",san:"sa",sin:"si",slk:"sk",slo:"sk",slv:"sl",sme:"se",smo:"sm",sna:"sn",snd:"sd",som:"so",sot:"st",spa:"es",sqi:"sq",srd:"sc",srp:"sr",ssw:"ss",sun:"su",swa:"sw",swe:"sv",tah:"ty",tam:"ta",tat:"tt",tel:"te",tgk:"tg",tgl:"tl",tha:"th",tib:"bo",tir:"ti",ton:"to",tsn:"tn",tso:"ts",tuk:"tk",tur:"tr",twi:"tw",uig:"ug",ukr:"uk",urd:"ur",uzb:"uz",ven:"ve",vie:"vi",vol:"vo",wel:"cy",wln:"wa",wol:"wo",xho:"xh",yid:"yi",yor:"yo",zha:"za",zho:"zh",zul:"zu"}}},function(e){return e(
vendor: 14,438 bytes, line 1
1e.s=92682)}])},module.exports=t()},532:function(e){"use strict";self,e.exports=(self.webpackChunkbitmovin_player=self.webpackChunkbitmovin_player||[]).push([[930],{79868:function(e,t){var i,n;Object.defineProperty(t,"__esModule",{value:!0}),t.ResponseStatusCode=t.ServiceWorkerMessageType=void 0,function(e){e.Dispose="dispose",e.Logging="logging",e.Playlist="playlist",e.Segment="segment",e.QueryParameters="queryparameters",e.WithCredentials="withcredentials",e.PreProcessRequestStarted="preprocessRequestStarted",e.PreProcessRequestFinished="preprocessRequestFinished",e.PreProcessResponseStarted="preprocessResponseStarted",e.PreProcessResponseFinished="preprocessResponseFinished"}(i||(t.ServiceWorkerMessageType=i={})),function(e){e[e.Success=200]="Success",e[e.PartialContent=206]="PartialContent",e[e.BadRequest=400]="BadRequest"}(n||(t.ResponseStatusCode=n={}))},81772:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.ServiceWorkerClientModuleDefinition=void 0;var n=i(62756),r=i(61402);t.ServiceWorkerClientModuleDefinition={name:n.ModuleName.ServiceWorkerClient,module:{createServiceWorkerHlsManifestController:r.createServiceWorkerHlsManifestController}},t.default=t.ServiceWorkerClientModuleDefinition},72439:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.ServiceWorkerClient=void 0;var n=i(25926),r=i(4224),o=i(3714);t.ServiceWorkerClient=function(){function e(e){var t=this;this.CW=null,this.DW=function(e){if(t.AW.videoElement.getWrappedElement()){var i=t.AW.internalPlayerID;e.data.clientId&&e.data.clientId!==i?t.AW.logger.insane("".concat(i," ignores '").concat(e.data.type,"' event from another player")):t.BW[e.data.type]&&t.BW[e.data.type].forEach(function(t){return t(e.data)})}},this.AW=e,this.BW={playlist:[],segment:[],logging:[],preprocessRequestStarted:[],preprocessResponseStarted:[]}}return e.prototype.initialize=function(){var e=this,t=this.AW.config.tweaks&&this.AW.config.tweaks.serviceworker_scope?{scope:this.AW.config.tweaks.serviceworker_scope}:{};return""===this.AW.config.location.serviceworker?(this.AW.eventHandler.dispatchEvent(o.PlayerEvent.Warning,new n.PlayerWarning(r.WarningCode.SETUP_SERVICE_WORKER_LOCATION_MISSING)),Promise.reject()):navigator.serviceWorker.register(this.AW.config.location.serviceworker,t).then(function(e){return e.update()}).then(function(){return navigator.serviceWorker.ready}).then(function(t){var i;e.CW=null!=(i=t.active)?i:navigator.serviceWorker.controller,navigator.serviceWorker.addEventListener("message",e.DW)}).catch(function(t){throw e.AW.eventHandler.dispatchEvent(o.PlayerEvent.Warning,new n.PlayerWarning(r.WarningCode.SETUP_SERVICE_WORKER_INITIALIZATION_FAILED,"ServiceWorker setup failed with error ".concat(t))),t})},e.prototype.sendMessage=function(e){this.CW&&this.CW.postMessage(e)},e.prototype.addPlaylistListener=function(e){this.BW.playlist.push(e)},e.prototype.addSegmentListener=function(e){this.BW.segment.push(e)},e.prototype.addLoggingListener=function(e){this.BW.logging.push(e)},e.prototype.addPreprocessRequestListener=function(e){this.BW.preprocessRequestStarted.push(e)},e.prototype.addPreprocessResponseListener=function(e){this.BW.preprocessResponseStarted.push(e)},e.prototype.dispose=function(){navigator.serviceWorker.removeEventListener("message",this.DW),this.BW={playlist:[],segment:[],logging:[],preprocessRequestStarted:[],preprocessResponseStarted:[]},this.CW=null},e}()},61402:function(e,t,i){var n=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(t,i)};return function(t,i){if("function"!=typeof i&&null!==i)throw TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},o=this&&this.__awaiter||function(e,t,i,n){return new(i||(i=Promise))(function(r,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){e.done?r(e.value):(function(e){return e instanceof i?e:new i(function(t){t(e)})})(e.value).then(a,s)}u((n=n.apply(e,t||[])).next())})},a=this&&this.__generator||function(e,t){var i,n,r,o={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(u){return function(s){if(i)throw TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(i=1,n&&(r=2&s[0]?n.return:s[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,s[1])).done)return r;switch(n=0,r&&(s=[2&s[0],r.value]),s[0]){case 0:case 1:r=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,n=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((r=(r=o.trys).length>0&&r[r.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!r||s[1]>r[0]&&s[1]<r[3])){o.label=s[1];break}if(6===s[0]&&o.label<r[1]){o.label=r[1],r=s;break}if(r&&o.label<r[2]){o.label=r[2],o.ops.push(s);break}r[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],n=0}finally{i=r=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,u])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.createServiceWorkerHlsManifestController=function(e){return s||(s=function(e){function t(t){var i=e.call(this,t)||this;return i.Xz=function(e){return o(i,void 0,void 0,function(){var t,i,n,o,s,u;return a(this,function(a){switch(a.label){case 0:t=null==(u=this.context.config.network)?void 0:u.preprocessHttpRequest,i=r(r({},e.httpRequest),{headers:r({},e.httpRequest.headers)}),a.label=1;case 1:return a.trys.push([1,3,,4]),o=this.parsedManifest?c.HttpRequestType.MANIFEST_HLS_VARIANT:c.HttpRequestType.MANIFEST_HLS_MASTER,[4,null==t?void 0:t(o,i)];case 2:return n=a.sent(),[3,4];case 3:return s=a.sent(),this.context.logger.warn("Network preprocessHttpRequest failed with an error",s),[3,4];case 4:return this.Tz.sendMessage({type:p.ServiceWorkerMessageType.PreProcessRequestFinished,id:e.id,httpRequest:null!=n?n:e.httpRequest,clientId:e.clientId}),[2]}})})},i.Yz=function(e){return o(i,void 0,void 0,function(){var t,i,n,o,s,u;return a(this,function(a){switch(a.label){case 0:t=null==(u=this.context.config.network)?void 0:u.preprocessHttpResponse,i=r(r({},e.httpResponse),{headers:r({},e.httpResponse.headers)}),a.label=1;case 1:return a.trys.push([1,3,,4]),o=this.parsedManifest?c.HttpRequestType.MANIFEST_HLS_VARIANT:c.HttpRequestType.MANIFEST_HLS_MASTER,[4,null==t?void 0:t(o,i)];case 2:return n=a.sent(),[3,4];case 3:return s=a.sent(),this.context.logger.warn("Network preprocessHttpResponse failed with an error",s),[3,4];case 4:return this.Tz.sendMessage({type:p.ServiceWorkerMessageType.PreProcessResponseFinished,id:e.id,httpResponse:null!=n?n:e.httpResponse,clientId:e.clientId}),[2]}})})},i.onPlaylistMessage=function(e){if(i.parsedManifest)try{i.registerVariantPlaylist(m(e))}catch(e){i.context.logger.debug("Ignoring playlist from Service Worker: ".concat(e.message))}else i.Uz.resolve(i.Wz),i.registerMasterManifest(m(e),e.url)},i.az=function(e){if(i.context.videoElement.duration!==1/0)for(var t=i.segmentTimelineController.getAllTimelines(),n=Object.values(t),r=0;r<n.length;r++){var o=n[r];if(i.Zz(e.url,o)){i.segmentTimelineController.switchTimeline(o[0].variantPlaylistId);break}}else i.segmentTimelineController.addDownloadedSegments(e.url),o=i.segmentTimelineController.getCurrentTimeline(),i.Zz(e.url,o)},i.dz=function(e){i.context.logger.debug("Logging",{message:e.message,data:e.data})},i.segmentTimelineController=new g.ServiceWorkerSegmentTimelineController(t.videoElement),i.Vz={id:"not available",bitrate:0,height:0,width:0,isAuto:!0},i.context.logger.debug("Initializing controller for ServiceWorker"),i}return n(t,e),t.prototype.getDownloadedVideoData=function(){return this.Vz},t.prototype.getPlayingVideoData=function(){var e,t,i=this.segmentTimelineController.getPlayingSegment(this.context.videoElement.currentTime);if(!i)return null;var n=this.parsedManifest.playlists.find(function(e){return e.id===i.variantPlaylistId});if(!n)return null;var r=n.attributes.CODECS?l.CodecStringHelper.getExtractedCodecStrings(n.attributes.CODECS):{};return{id:n.id,bitrate:n.attributes.BANDWIDTH,frameRate:n.attributes["FRAME-RATE"]?Number(n.attributes["FRAME-RATE"]):void 0,width:null==(e=n.attributes.RESOLUTION)?void 0:e.width,height:null==(t=n.attributes.RESOLUTION)?void 0:t.height,codec:r.video}},t.prototype.init=function(){var e=this;return this.Tz=new f.ServiceWorkerClient(this.context),this.Tz.initialize().then(function(){var t;e.Tz.addLoggingListener(e.dz),e.Tz.addPlaylistListener(e.onPlaylistMessage),e.Tz.addSegmentListener(e.az),e.Tz.addPreprocessRequestListener(e.Xz),e.Tz.addPreprocessResponseListener(e.Yz),(null==(t=e.context.sourceContext.source.options)?void 0:t.withCredentials)&&e.Tz.sendMessage({type:p.ServiceWorkerMessageType.WithCredentials,withCredentials:!0,clientId:e.context.internalPlayerID}),e.context.settings.QUERY_PARAMETERS&&e.Tz.sendMessage({type:p.ServiceWorkerMessageType.QueryParameters,queryParameters:e.context.settings.QUERY_PARAMETERS,clientId:e.context.internalPlayerID})}).catch(function(t){throw e.dispose(),t})},t.prototype.downloadMasterManifest=function(e){var t=this;return this.Wz=e,this.Uz=new d.Deferred,this.Uz.promise.then(function(e){return h.URLHelper.appendQueryParametersToUrl(e,r(r({},t.context.config.tweaks.query_parameters),{"bitmovin-player-id":t.context.internalPlayerID}))})},t.prototype.processMasterManifest=function(e,t){return e},t.prototype.Zz=function(e,t){var i=t.findIndex(function(t){return e.includes(t.uri)});if(i>-1){var n=this.bz(t[i].variantPlaylistId);if(n.bitrate!==this.Vz.bitrate)return this.cz(n,this.Vz),this.Vz=n,!0;this.Vz=n}return!1},t.prototype.bz=function(e){var t=this.parsedManifest.playlists.find(function(t){return t.id===e}),i={id:"",isAuto:!0,height:null,width:null,bitrate:null};return t&&t.hasOwnProperty("attributes")&&(t.attributes.RESOLUTION&&(i.id=t.attributes.RESOLUTION.height+"_",i.height=t.attributes.RESOLUTION.height,i.width=t.attributes.RESOLUTION.width),i.id+=t.attributes.BANDWIDTH,i.bitrate=t.attributes.BANDWIDTH),i},t.prototype.cz=function(e,t){this.context.eventHandler.dispatchEvent(u.PlayerEvent.VideoDownloadQualityChange,{targetQuality:e,targetQualityId:e.id,sourceQuality:t,sourceQualityId:t.id})},t.prototype.getCurrentSegments=function(e,t,i,n){return Promise.resolve([])},t.prototype.overrideManifestUrl=function(e,t,i){return Promise.resolve(this.manifestUrl)},t.prototype.dispose=function(){e.prototype.dispose.call(this),this.Tz.sendMessage({type:p.ServiceWorkerMessageType.Dispose,clientId:this.context.internalPlayerID}),this.Tz.dispose()},t}(e)),s};var s,u=i(3714),c=i(29669),l=i(34047),d=i(34841),h=i(58313),p=i(79868),f=i(72439),g=i(69904);function m(e){return{url:e.url,body:e.playlist,headers:{},request:null,status:p.ResponseStatusCode.Success,statusText:"OK"}}},69904:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.ServiceWorkerSegmentTimelineController=void 0;var n=i(25541),r=i(19274);t.ServiceWorkerSegmentTimelineController=function(){function e(e){var t=this;this.MW=function(){t.IW.buffered.length&&!t.LW&&(n.populateCurrentTimelineWithPlaybackTime(t.getCurrentTimeline(),0,0),t.LW=!0)},this.EW={},this.FW=null,this.GW=null,this.HW=0,this.IW=e,this.JW=[],this.KW=!1,this.LW=!1,e.addEventListener(r.MediaElementEvent.progress,this.MW)}return e.prototype.NW=function(){return this.IW.duration===1/0},e.prototype.switchTimeline=function(e){this.FW!==e&&(this.NW()&&this.EW[e]&&(this.EW[e]=[]),this.EW[e]||(this.EW[e]=[]),this.GW=this.FW,this.FW=e,this.KW=!0)},e.prototype.updateTimeline=function(e,t){var i=this,r=this.EW[e],o=n.updateTimeline(r,t),a=o.reduce(function(e,t){return i.NW()||(t.playbackTime=e),e+t.duration},0);return this.EW[e]=o,this.LW&&this.QW(o),a},e.prototype.OW=function(e){return this.GW&&this.HW&&e<this.HW?this.getPreviousTimeline():this.getCurrentTimeline()},e.prototype.getPlayingSegment=function(e){return this.OW(e).find(function(t){return e>=t.playbackTime&&e<=t.playbackTime+t.duration})||null},e.prototype.addDownloadedSegments=function(e){this.JW.push(e),this.PW()},e.prototype.PW=function(){this.JW.length>5&&(this.JW=this.JW.slice(-5,this.JW.length))},e.prototype.QW=function(e){var t=e.findIndex(function(e){return e.hasOwnProperty("playbackTime")});-1!==t?n.populateCurrentTimelineWithPlaybackTime(e,t,e[t].playbackTime):this.KW?(this.KW=!1,this.RW(this.FW,this.GW),this.HW=this.EW[this.FW][0].playbackTime):this.SW(this.FW)},e.prototype.RW=function(e,t){var i,r=this.EW[e]||[],o=this.EW[t]||[],a=r.findIndex(function(e){return!!(i=o.find(function(t){return t.mediaSequenceNumber===e.mediaSequenceNumber&&t.playbackTime}))});-1!==a&&(null==i?void 0:i.playbackTime)?n.populateCurrentTimelineWithPlaybackTime(r,a,i.playbackTime):this.SW(e)},e.prototype.SW=function(e){for(var t=this.EW[e],i=this.JW.shift(),r=-1;i&&r<0;)r=t.findIndex(function(e){return i===e.uri}),i=this.JW.shift();if(t[r]){var o=this.TW(r,e);n.populateCurrentTimelineWithPlaybackTime(t,r,o)}},e.prototype.TW=function(e,t){var i=this.EW[t],n=this.IW.buffered.start(0),r=this.IW.buffered.end(0);return r-n>i[e].duration?r:n},e.prototype.getCurrentTimeline=function(){return this.EW[this.FW]||[]},e.prototype.getPreviousTimeline=function(){return this.EW[this.GW]||[]},e.prototype.getAllTimelines=function(){return this.EW},e.prototype.reset=function(){Object.values(this.EW).forEach(function(e){e.forEach(function(e){return e.consumed=!1})})},e.prototype.dispose=function(){this.IW.removeEventListener(r.MediaElementEvent.progress,this.MW),this.EW={},this.JW=[]},e}()}},function(e){return e(e.s=81772)}])},187:function(e){"use strict";self,e.exports=(self.webpackChunkbitmovin_player=self.webpackChunkbitmovin_player||[]).push([[283],{41906:function(e,t,i){var n=this&&this.__awaiter||function(e,t,i,n){return new(i||(i=Prom
1ise))(function(r,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){e.done?r(e.value):(function(e){return e instanceof i?e:new i(function(t){t(e)})})(e.value).then(a,s)}u((n=n.apply(e,t||[])).next())})},r=this&&this.__generator||function(e,t){var i,n,r,o={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(u){return function(s){if(i)throw TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(i=1,n&&(r=2&s[0]?n.return:s[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,s[1])).done)return r;switch(n=0,r&&(s=[2&s[0],r.value]),s[0]){case 0:case 1:r=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,n=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((r=(r=o.trys).length>0&&r[r.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!r||s[1]>r[0]&&s[1]<r[3])){o.label=s[1];break}if(6===s[0]&&o.label<r[1]){o.label=r[1],r=s;break}if(r&&o.label<r[2]){o.label=r[2],o.ops.push(s);break}r[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],n=0}finally{i=r=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,u])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.HlsAssetListLoader=void 0;var o=i(20213),a=i(4129),s=i(6505);t.HlsAssetListLoader=function(){function e(e){this.y6=new a.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 n(this,void 0,void 0,function(){var t;return r(this,function(i){switch(i.label){case 0:this.z6=e,t=this.B6(e),this.A6=t,i.label=1;case 1:return i.trys.push([1,,3,4]),[4,t];case 2:return[2,i.sent()];case 3:return this.A6===t&&(this.A6=void 0,this.z6=void 0),[7];case 4:return[2]}})})},e.prototype.B6=function(e){return n(this,void 0,void 0,function(){var t,i;return r(this,function(n){switch(n.label){case 0:return[4,this.y6.load(e)];case 1:if(!(i=(t=n.sent()).body&&"string"==typeof t.body?JSON.parse(t.body):null))throw Error("Failed to fetch asset list from ".concat(e,": ").concat(t.body?"Invalid JSON":"Empty response"));if(!i.ASSETS||!Array.isArray(i.ASSETS))throw Error("Invalid asset list format from ".concat(e,": missing or invalid ASSETS array"));return[2,{assets:i.ASSETS.map(function(e){return{uri:e.URI,duration:e.DURATION,customAttributes:(0,s.extractUnknownAttributes)(e,["URI","DURATION"])}}),customAttributes:(0,s.extractUnknownAttributes)(i,["ASSETS"])}]}})})},e.prototype.isLoading=function(){return void 0!==this.A6||this.y6.isLoading()},e.prototype.getCurrentLoadingUrl=function(){return this.z6},e.prototype.getCurrentLoadingPromise=function(){return this.A6},e.prototype.cancel=function(){this.y6.cancel(),this.z6=void 0},e.prototype.dispose=function(){this.A6=void 0,this.z6=void 0,this.y6.dispose()},e}()},57562:function(e,t,i){var n=this&&this.__awaiter||function(e,t,i,n){return new(i||(i=Promise))(function(r,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){e.done?r(e.value):(function(e){return e instanceof i?e:new i(function(t){t(e)})})(e.value).then(a,s)}u((n=n.apply(e,t||[])).next())})},r=this&&this.__generator||function(e,t){var i,n,r,o={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(u){return function(s){if(i)throw TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(i=1,n&&(r=2&s[0]?n.return:s[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,s[1])).done)return r;switch(n=0,r&&(s=[2&s[0],r.value]),s[0]){case 0:case 1:r=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,n=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((r=(r=o.trys).length>0&&r[r.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!r||s[1]>r[0]&&s[1]<r[3])){o.label=s[1];break}if(6===s[0]&&o.label<r[1]){o.label=r[1],r=s;break}if(r&&o.label<r[2]){o.label=r[2],o.ops.push(s);break}r[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],n=0}finally{i=r=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,u])}}};
1Object.defineProperty(t,"__esModule",{value:!0}),t.HlsAssetLoader=void 0;var o=i(80813),a=i(20213),s=i(4129);t.HlsAssetLoader=function(){function e(e){this.context=e,this.F6=new s.DefaultContentLoader(e,{maxRetries:e.settings.MAX_MPD_RETRIES,retryDelay:e.settings.MPD_RETRY_DELAY,requestType:a.HttpRequestType.MANIFEST_HLS_MASTER})}return e.prototype.load=function(e){return n(this,void 0,void 0,function(){var t,i;return r(this,function(n){switch(n.label){case 0:return(t=this.context.serviceManager.maybeCall(o.ServiceName.ManifestCachingService,function(t){return t.getHttpResponse(e)}))?[2,t]:[4,this.F6.load(e)];case 1:return i=n.sent(),this.context.serviceManager.maybeCall(o.ServiceName.ManifestCachingService,function(t){return t.cacheHttpResponse(i,e)}),[2,i]}})})},e.prototype.isLoading=function(){return this.F6.isLoading()},e.prototype.dispose=function(){this.F6.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.pcb},set:function(e){this.pcb=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.Adb=new Map}return e.prototype.register=function(e,t){var i=this.Adb.has(e)?this.Adb.get(e):[];i.push.apply(i,t),this.Adb.set(e,i)},e.prototype.getTrackingEventsForTrigger=function(e){var t;return null!=(t=this.Adb.get(e))?t:[]},e.prototype.removeTrackingEventForTrigger=function(e,t){var i=this.Adb.get(e);i&&this.Adb.set(e,i.filter(function(e){return e!==t}))},e.prototype.clearTrackingEventsForTrigger=function(e){this.Adb.delete(e)},e.prototype.clear=function(){this.Adb.clear()},e}()},10603:function(e,t,i){var n=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(t,i)};return function(t,i){if("function"!=typeof i&&null!==i)throw TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.HlsInterstitialsAdTracker=void 0;var r=i(89927),o=i(70850),a=i(62843),s=i(59990),u=i(39521),c=i(1951),l=i(28038),d=i(13117),h=1/0;function p(e,t){var i="number"==typeof e&&Number.isFinite(e)?e:t;return(0,r.toMilliSeconds)(Math.max(0,i))}t.HlsInterstitialsAdTracker=function(e){function t(t,i){var n=e.call(this,i)||this;return n.context=t,n.playerDelegate=i,n.registry=new s.HlsInterstitialMappingRegistry,n.G6=new a.HlsInterstitialCustomAttributesMappingRegistry(n.registry),n}return n(t,e),t.prototype.getClickThroughUrl=function(){return this.G6.clickThroughUrl},t.prototype.startTrackingAd=function(t,i){var n=this;e.prototype.startTrackingAd.call(this,t,i),this.G6.clickThroughUrl=void 0;var r=(0,u.getHlsCustomAttributesMappingFunction)(this.context);if(r){var a=(0,u.prepareInterstitialDataForMapping)(t);a&&(0,o.safeUserCallback)(function(){return r(a,n.G6)},this.context.logger);var s=(0,u.prepareInterstitialAssetDataForMapping)(i);s&&(0,o.safeUserCallback)(function(){return r(s,n.G6)},this.context.logger)}this.I6(i.duration)},t.prototype.started=function(){var t;e.prototype.started.call(this),null==(t=this.H6)||t.start()},t.prototype.reset=function(){var t;null==(t=this.H6)||t.reset(),this.H6=void 0,e.prototype.reset.call(this)},t.prototype.dispose=function(){var t;null==(t=this.H6)||t.dispose(),this.H6=void 0,e.prototype.dispose.call(this)},t.prototype.I6=function(e){var t,i,n=this;if(this.J6()&&this.K6()){var r=null==(i=null==(t=this.context.config.hls)?void 0:t.interstitials)?void 0:i.viewability;this.H6=new d.ViewabilityTracker(this.context,{viewableDurationMs:p(null==r?void 0:r.view
1ableDuration,2),decisionTimeoutMs:p(null==r?void 0:r.decisionTimeout,e||h)},function(e){n.pingTrackingUrls(e)})}},t.prototype.J6=function(){var e,t;return!!(null==(t=null==(e=this.context.config.style)?void 0:e.visibility)?void 0:t.enableTracking)},t.prototype.K6=function(){var e=this;return[l.AdTrackingEventTrigger.VIEWABLE,l.AdTrackingEventTrigger.NOT_VIEWABLE,l.AdTrackingEventTrigger.VIEW_UNDETERMINED].some(function(t){return e.registry.getTrackingEventsForTrigger(t).length>0})},t}(c.SgaiAdTracker)},39521:function(e,t,i){var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])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,i,n,o,s=null==(i=null==(t=e.config.hls)?void 0:t.interstitials)?void 0:i.customAttributesMapping;if((0,r.isDefined)(s))return!0;var u=null==(o=null==(n=e.config.hls)?void 0:n.interstitials)?void 0:o.customAttributesMappingPreset;return!!(0,r.isDefined)(u)&&u!==a.CustomAttributesMappingPresets.NONE},t.getHlsCustomAttributesMappingFunction=function(e){var t,i=null==(t=e.config.hls)?void 0:t.interstitials;return(null==i?void 0:i.customAttributesMapping)&&"function"==typeof i.customAttributesMapping?i.customAttributesMapping:(null==i?void 0:i.customAttributesMappingPreset)===a.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:n({},e.customAdTrackingInfo)};return e.adCreativeSignaling&&(t.customAttributes[s.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 i={duration:e.duration,uri:null!=(t=e.mediaFileUrl)?t:"",customAttributes:n({},e.customAdTrackingInfo)};return e.adCreativeSignaling&&(i.customAttributes[s.AD_CREATIVE_SIGNALING_KEY]=e.adCreativeSignaling),i}};var r=i(23068),o=i(22705),a=i(6742),s=i(61933)},6742:function(e,t){var i;Object.defineProperty(t,"__esModule",{value:!0}),t.CustomAttributesMappingPresets=void 0,function(e){e.NONE="NONE",e.AD_CREATIVE_SIGNALING="AD-CREATIVE-SIGNALING"}(i||(t.CustomAttributesMappingPresets=i={}))},2423:function(e,t,i){var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},r=this&&this.__awaiter||function(e,t,i,n){return new(i||(i=Promise))(function(r,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){e.done?r(e.value):(function(e){return e instanceof i?e:new i(function(t){t(e)})})(e.value).then(a,s)}u((n=n.apply(e,t||[])).next())})},o=this&&this.__generator||function(e,t){var i,n,r,o={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(u){return function(s){if(i)throw TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(i=1,n&&(r=2&s[0]?n.return:s[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,s[1])).done)return r;switch(n=0,r&&(s=[2&s[0],r.value]),s[0]){case 0:case 1:r=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,n=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((r=(r=o.trys).length>0&&r[r.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!r||s[1]>r[0]&&s[1]<r[3])){o.label=s[1];break}if(6===s[0]&&o.label<r[1]){o.label=r[1],r=s;break}if(r&&o.label<r[2]){o.label=r[2],o.ops.push(s);break}r[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],n=0}finally{i=r=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,u])}}},a=this&&this.__rest||function(e,t){var i={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(i[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(n=Object.getOwnPropertySymbols(e);r<n.length;r++)0>t.indexOf(n[r])&&Object.prototype.propertyIsEnumerable.call(e,n[r])&&(i[n[r]]=e[n[r]])}return i};
1Object.defineProperty(t,"__esModule",{value:!0}),t.HlsInterstitialsProvider=void 0;var s=i(6365),u=i(3714),c=i(58735),l=i(85625),d=i(44468),h=i(81199),p=i(85434),f=i(23068),g=i(70850),m=i(41906),y=i(57562),v=i(65007),S=i(61933),b=i(6505),E=i(43661);function T(e,t,i){var r;return!(null==i?void 0:i.shouldPlayInterstitial)||null==(r=(0,g.safeUserCallback)(function(){return i.shouldPlayInterstitial(n({},e))},t))||r}function _(e){for(var t={},i=0,n=Object.entries(e.metadata.clientAttributes);i<n.length;i++){var r=n[i],o=r[0],a=r[1];S.KNOWN_CLIENT_ATTRIBUTES.includes(o)||(t[o]=a)}return t}function A(e,t,i,n){var r=t.toLowerCase(),o=(0,E.isProgressiveMediaUrl)(r);return{id:e,isLinear:!0,width:0,height:0,duration:i,mediaFileUrl:t,adCreativeSignaling:n,data:{delivery:o?s.MediaFileDeliveryType.Progressive:s.MediaFileDeliveryType.Streaming,mimeType:o?p.MimeType.VideoMp4:l.ManifestMimeType.Hls}}}function P(e){var t=e;return t.isLoadAllowed,t.hasBeenPlayed,a(t,["isLoadAllowed","hasBeenPlayed"])}t.HlsInterstitialsProvider=function(){function e(e){var t,i,n=this;this.context=e,this.LL=new Map([["ASSET-LIST",new Map],["ASSET",new Map]]),this.RL=function(e){if(n.SL(e)){var t=function(e){var t,i=(0,b.resolveRestrictValue)(e.metadata.clientAttributes.restrict),n=(0,b.resolveTriggerPolicy)(e.metadata.cue);return{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:i,hasBeenPlayed:!1,jumpPolicy:(0,b.convertRestrictionToJumpPolicy)(i),seekingRestriction:(0,b.convertRestrictionToSeekingRestriction)(i),triggerPolicy:n,customAttributes:_(e)}}(e);n.JL.add(t)}},this.JL=new v.HlsInterstitialsQueue(e),this.KL=null==(i=null==(t=e.config)?void 0:t.hls)?void 0:i.interstitials,this.context.eventHandler.on(u.PlayerEvent.MetadataParsed,this.RL)}return e.prototype.getDueAds=function(e){return this.JL.getForTime(e)},e.prototype.getPreRollAds=function(){return this.JL.getUnplayedInterstitials().filter(function(e){var t;return null==(t=e.triggerPolicy)?void 0:t.includes(S.TriggerPolicy.PRE)})},e.prototype.getPostRollAds=function(){return this.JL.getUnplayedInterstitials().filter(function(e){var t;return null==(t=e.triggerPolicy)?void 0:t.includes(S.TriggerPolicy.POST)})},e.prototype.handleSkippedAds=function(e,t){var i=this.JL.getAdsInRange(e,t);if(0===i.length)return[];var n=(0,b.shouldPlayJumpedOverInterstitials)(i,e,t,this.context);n.length>0&&this.context.logger.debug("Playing ".concat(n.length," jump-restricted ads"));for(var r=0,o=i;r<o.length;r++){var a=o[r];n.includes(a)||this.markAdAsPlayed(a)}return n},e.prototype.listUnplayedAds=function(){return this.JL.getUnplayedInterstitials().map(P)},e.prototype.markAdAsPlayed=function(e){e.hasBeenPlayed=!0},e.prototype.markPastAdsAsPlayed=function(e){var t=this.JL.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 i=0,n=t;i<n.length;i++){var r=n[i];r.hasBeenPlayed||this.markAdAsPlayed(r)}}},e.prototype.reinsertAds=function(e){for(var t,i,n=0,r=this.JL.getAll();n<r.length;n++){var o=r[n];o.hasBeenPlayed&&o.start>e&&!(null==(t=o.triggerPolicy)?void 0:t.includes(S.TriggerPolicy.ONCE))&&(o.hasBeenPlayed=!1,o.assetList=void 0,o.isLoadAllowed=void 0,null==(i=this.LL.get("ASSET-LIST"))||i.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,b.isHlsInterstitialAd)(e)&&e.seekingRestriction===S.SeekingRestriction.NO_SEEKING?{seeking:!0,playbackRate:!0}:{}},e.prototype.clearDroppedOutAds=function(){var e=this,t=(0,E.getDvrWindowStart)(this.context.internalPlayer);isFinite(t)&&this.JL.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,f.isDefined)(e.assetList)?(0,b.extractUnknownAttributes)(e.assetList,["assets"])[S.AD_CREATIVE_SIGNALING_KEY]:(null==(t=e.customAttributes)?void 0:t.adCreativeSignaling)?JSON.parse(atob(e.customAttributes.adCreativeSignaling)):void 0},e.prototype.OL=function(e){var t,i=this,n=function(e){var t;return(0,f.isDefined)(e)&&(0,E.isHlsManifestUri)(e)&&!(null==(t=i.LL.get("ASSET"))?void 0:t.get(e))};if(function(e){var t;return(0,f.isDefined)(e.assetListUri)&&!e.assetList&&!1!==e.isLoadAllowed&&!(null==(t=i.LL.get("ASSET-LIST"))?void 0:t.get(e.id))}(e))return{ad:e,uri:e.assetListUri,type:"ASSET-LIST"};
1if(this.context.internalPlayer.getPlayerType()!==d.PlayerType.Native){if((0,f.isDefined)(e.assetList)){var r=null==(t=e.assetList.assets.find(function(e){return n(e.uri)}))?void 0:t.uri;if((0,f.isDefined)(r))return{ad:e,uri:r,type:"ASSET"}}return n(e.assetUri)?{ad:e,uri:e.assetUri,type:"ASSET"}:void 0}},e.prototype.preloadUpcomingAds=function(e){var t,i,n,r,o=this;if(!(null==(t=this.ML)?void 0:t.isLoading())&&!(null==(i=this.NL)?void 0:i.isLoading())){for(var a,s=(0,h.getPlayableBufferLevel)(this.context.internalPlayer),u=0,c=this.JL.getAdsInRange(e,e+s);u<c.length;u++){var l=c[u];if(a=this.OL(l),(0,f.isDefined)(a))break}if((0,f.isDefined)(a))switch(this.context.logger.debug("Preloading ".concat(a.type," for upcoming interstitial for time ").concat(a.ad.start,", id ").concat(a.ad.id,", uri ").concat(a.uri)),a.type){case"ASSET":return null==(n=this.LL.get("ASSET"))||n.set(a.uri,!0),void this.PL(a.uri).then(function(){return o.context.logger.debug("Asset uri preloaded: ".concat(null==a?void 0:a.uri))}).catch(function(e){var t;o.context.logger.debug("Preloading failed for asset uri ".concat(null==a?void 0:a.uri,": ").concat(null!=(t=null==e?void 0:e.message)?t:"Unknown reason"))});case"ASSET-LIST":return null==(r=this.LL.get("ASSET-LIST"))||r.set(a.ad.id,!0),void this.QL(a.ad).then(function(){return o.context.logger.debug("Asset list preloaded: ".concat(null==a?void 0:a.uri))}).catch(function(e){var t;o.context.logger.debug("Preloading failed for asset list ".concat(null==a?void 0:a.uri,": ").concat(null!=(t=null==e?void 0:e.message)?t:"Unknown reason"))});default:return}}},e.prototype.PL=function(e){return r(this,void 0,void 0,function(){var t;return o(this,function(i){switch(i.label){case 0:return null!=(t=this.NL)||(this.NL=new y.HlsAssetLoader(this.context)),[4,this.NL.load(e)];case 1:return i.sent(),[2]}})})},e.prototype.QL=function(e){return r(this,void 0,void 0,function(){var t,i,r,a,s,u,c;return o(this,function(o){switch(o.label){case 0:if(!(0,f.isDefined)(e.assetListUri))throw Error("Cannot load asset list without assetListUri");if((0,f.isDefined)(e.isLoadAllowed)||(e.isLoadAllowed=function(e,t,i){var r;return!(null==i?void 0:i.shouldLoadInterstitial)||null==(r=(0,g.safeUserCallback)(function(){return i.shouldLoadInterstitial(n({},e))},t))||r}(e,this.context.logger,this.KL)),!e.isLoadAllowed)throw Error("Not allowed to load based on user feedback");return null!=(c=this.ML)||(this.ML=new m.HlsAssetListLoader(this.context)),t=this.ML.getCurrentLoadingUrl(),r=void 0!==(i=this.ML.getCurrentLoadingPromise()),a=t===e.assetListUri,r&&a?(this.context.logger.debug("The asset list for the interstitial with id ".concat(e.id," was already preloading")),s=e,[4,i]):[3,2];case 1:return s.assetList=o.sent(),[2];case 2:return!r||a?[3,4]:(this.context.logger.debug("Interrupting preloading of outdated asset list ".concat(t)),this.ML.cancel(),[4,null==i?void 0:i.catch(function(){})]);case 3:o.sent(),o.label=4;case 4:return u=e,[4,this.ML.load(e.assetListUri)];case 5:return u.assetList=o.sent(),[2]}})})},e.prototype.resolveNestedAds=function(e){return r(this,void 0,void 0,function(){var t,i;return o(this,function(n){switch(n.label){case 0:if(!(0,f.isDefined)(e.assetListUri))return[3,6];n.label=1;case 1:return n.trys.push([1,4,,5]),(0,f.isDefined)(e.assetList)?[3,3]:(this.context.logger.debug("Loading asset list with id ".concat(e.id," from URI ").concat(e.assetListUri)),[4,this.QL(e)]);case 2:n.sent(),this.context.logger.debug("Asset list loaded for ".concat(e.id)),n.label=3;case 3:return T(e,this.context.logger,this.KL)?[2,e.assetList.assets.map(function(t,i){var n;return A("".concat(e.id,"-").concat(i),t.uri,t.duration,null==(n=t.customAttributes)?void 0:n[S.AD_CREATIVE_SIGNALING_KEY])})]:(this.context.logger.debug("Skipping playing interstitial with id ".concat(e.id," based on user feedback")),[2,[]]);case 4:return t=n.sent(),this.context.logger.debug("Could not resolve asset list with id ".concat(e.id,", uri ").concat(e.assetListUri,": ").concat(null!=(i=null==t?void 0:t.message)?i:"Unknown reason")),[2,[]];case 5:return[3,7];case 6:return(0,f.isDefined)(e.assetUri)?T(e,this.context.logger,this.KL)?[2,[A("".concat(e.id,"-0"),e.assetUri,e.end-e.start)]]:(this.context.logger.debug("Skipping interstitial with i
1d ".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 7:return[2]}})})},e.prototype.getReplaceContentDuration=function(e,t){return(0,f.isDefined)(e.resumeOffset)?e.resumeOffset:this.getTotalPlannedDuration(e,t)},e.prototype.getTotalPlannedDuration=function(e,t){return(0,f.isDefined)(e.playoutLimit)?e.playoutLimit:(0,b.calculateInterstitialDuration)(e,t)},e.prototype.getTotalPlayoutLimit=function(e){if((0,f.isDefined)(e.playoutLimit))return e.playoutLimit},e.prototype.SL=function(e){return(0,c.isDateRangeMetadata)(e)&&"com.apple.hls.interstitial"===e.metadata.class},e.prototype.getQueuedInterstitials=function(){return this.JL.getAll()},e.prototype.dispose=function(){var e,t,i,n;this.context.eventHandler.off(u.PlayerEvent.MetadataParsed,this.RL),null==(e=this.ML)||e.dispose(),null==(t=this.NL)||t.dispose(),null==(i=this.LL.get("ASSET-LIST"))||i.clear(),null==(n=this.LL.get("ASSET"))||n.clear()},e}()},65007:function(e,t,i){var n=this&&this.__rest||function(e,t){var i={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(i[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(n=Object.getOwnPropertySymbols(e);r<n.length;r++)0>t.indexOf(n[r])&&Object.prototype.propertyIsEnumerable.call(e,n[r])&&(i[n[r]]=e[n[r]])}return i},r=this&&this.__spreadArray||function(e,t,i){if(i||2==arguments.length)for(var n,r=0,o=t.length;r<o;r++)!n&&r in t||(n||(n=Array.prototype.slice.call(t,0,r)),n[r]=t[r]);return e.concat(n||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.HlsInterstitialsQueue=void 0;var o=i(74853),a=i(61933);t.HlsInterstitialsQueue=function(){function e(e){this.context=e,this.C6=[]}return e.prototype.add=function(e){this.E6(e)?this.D6(e):(this.context.logger.debug("Adding HLS interstitial to queue at start time ".concat(e.start),e),o.ArrayHelper.insertInSortedArray(this.C6,e,function(t){return t.start>e.start}))},e.prototype.D6=function(e){var t=this.C6.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.C6[t],(e.id,e.start,e.hasBeenPlayed,e.isLoadAllowed,n(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.C6,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=[],i=function(i){return i.start>e?"break":[a.TriggerPolicy.PRE,a.TriggerPolicy.POST].some(function(e){var t;return null==(t=i.triggerPolicy)?void 0:t.includes(e)})?"continue":void(e>=i.start&&e<=i.end&&t.push(i))},n=0,r=this.getUnplayedInterstitials();n<r.length&&"break"!==i(r[n]);n++);return t},e.prototype.getAdsInRange=function(e,t){for(var i=[],n=function(n){return n.start>t?"break":[a.TriggerPolicy.PRE,a.TriggerPolicy.POST].some(function(e){var t;return null==(t=n.triggerPolicy)?void 0:t.includes(e)})?"continue":void(n.start>=e&&n.start<=t&&i.push(n))},r=0,o=this.getUnplayedInterstitials();r<o.length&&"break"!==n(o[r]);r++);return i},e.prototype.getAll=function(){return r([],this.C6,!0)},e.prototype.getUnplayedInterstitials=function(){return this.C6.filter(function(e){return!e.hasBeenPlayed})},e.prototype.E6=function(e){return this.C6.some(function(t){return t.id===e.id})},e}()},61933:function(e,t){var i,n,r,o;Object.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"],function(e){e.SKIP="SKIP",e.JUMP="JUMP"}(i||(t.RestrictValue=i={})),function(e){e.NO_SEEKING="NO_SEEKING"}(n||(t.SeekingRestriction=n={})),function(e){e.ALLOW="ALLOW",e.RESTRICT="RESTRICT"}(r||(t.JumpPolicy=r={})),function(e){e.PRE="PRE",e.POST="POST",e.ONCE="ONCE"}(o||(t.TriggerPolicy=o={}))},6505:function(e,t,i){var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};
vendor: 2,423 bytes, line 1
1Object.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 i=t.reduce(function(e,t){return e+t.duration},0);return i>0?i: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(","),i=[];return t.includes("PRE")&&i.push(o.TriggerPolicy.PRE),t.includes("POST")&&i.push(o.TriggerPolicy.POST),t.includes("ONCE")&&i.push(o.TriggerPolicy.ONCE),i},t.isHlsInterstitialAd=a,t.getJumpRestrictedHlsInterstitials=s,t.shouldPlayJumpedOverInterstitials=function(e,t,i,o){var a,u,c=null==(u=null==(a=o.config)?void 0:a.hls)?void 0:u.interstitials;if(null==c?void 0:c.shouldPlayJumpedOverInterstitials){var l=e.map(function(e){return n({},e)}),d=(0,r.safeUserCallback)(function(){return c.shouldPlayJumpedOverInterstitials(l,t,i)},o.logger);if(d){var h=d.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 p=function(e){return e[e.length-1]}(s(e));return p?[p]:[]};var r=i(70850),o=i(61933);function a(e){return"object"==typeof e&&null!==e&&"id"in e&&("scheduleTime"in e||"start"in e)}function s(e){return(function(e){return e.filter(a)})(e).filter(function(e){return e.jumpPolicy===o.JumpPolicy.RESTRICT})}t.extractUnknownAttributes=function(e,t){return Object.keys(e).reduce(function(i,n){return t.includes(n)||(i[n]=e[n]),i},{})}},60047:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.SGAIModuleDefinition=void 0;var n=i(62756),r=i(91135);t.SGAIModuleDefinition={name:n.ModuleName.SGAI,module:function(){return{SgaiService:r.SgaiService}}
1,dependencies:[n.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 i=this;this.durationMs=e,this.callback=t,this.Bfb=null,this.Cfb=null,this.Efb=!1,this.Ffb=function(){i.Efb||(i.Bfb=null,i.Cfb=null,i.Dfb=0,i.callback())},this.Dfb=Math.max(0,e)}return e.prototype.start=function(){this.Efb||null!==this.Bfb||(this.Dfb<=0?this.Ffb():(this.Cfb=Date.now(),this.Bfb=window.setTimeout(this.Ffb,this.Dfb)))},e.prototype.pause=function(){if(null!==this.Bfb&&null!==this.Cfb){var e=Date.now()-this.Cfb;this.Dfb=Math.max(0,this.Dfb-e),window.clearTimeout(this.Bfb),this.Bfb=null,this.Cfb=null}},e.prototype.resume=function(){this.start()},e.prototype.reset=function(e){void 0===e&&(e=this.durationMs),null!==this.Bfb&&window.clearTimeout(this.Bfb),this.Bfb=null,this.Cfb=null,this.Dfb=Math.max(0,e)},e.prototype.dispose=function(){this.reset(),this.Efb=!0},e}()},71734:function(e,t,i){var n=this&&this.__awaiter||function(e,t,i,n){return new(i||(i=Promise))(function(r,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){e.done?r(e.value):(function(e){return e instanceof i?e:new i(function(t){t(e)})})(e.value).then(a,s)}u((n=n.apply(e,t||[])).next())})},r=this&&this.__generator||function(e,t){var i,n,r,o={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(u){return function(s){if(i)throw TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(i=1,n&&(r=2&s[0]?n.return:s[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,s[1])).done)return r;switch(n=0,r&&(s=[2&s[0],r.value]),s[0]){case 0:case 1:r=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,n=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((r=(r=o.trys).length>0&&r[r.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!r||s[1]>r[0]&&s[1]<r[3])){o.label=s[1];break}if(6===s[0]&&o.label<r[1]){o.label=r[1],r=s;break}if(r&&o.label<r[2]){o.label=r[2],o.ops.push(s);break}r[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],n=0}finally{i=r=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,u])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.SgaiAdPlayer=void 0;var o=i(43255),a=i(86969),s=i(3714),u=i(90408),c=i(34841),l=i(23068),d=i(10603),h=i(39521),p=i(43661);t.SgaiAdPlayer=function(){function e(e){var t=this;this.context=e,this.VL=null,this.WL=null,this.XL=null,this.YL=null,this.ZL=null,this.aL=0,this.bL=null,this.cL=null,this.dL=!1,this.rM=function(e){return n(t,void 0,void 0,function(){var t;return r(this,function(i){return null==(t=this.UL)||t.progress(e.time),this.sM(e.time)&&this.qM(),[2]})})},this.wM=function(){return n(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.UL)||e.complete(),[4,this.qM()];case 1:return t.sent(),[2]}})})},this.xM=function(e){var i;t.context.logger.debug("SGAI ad player error",e),null==(i=t.UL)||i.errorWithCode("TODO: some error"),t.qM(),t.YL&&(t.YL(e instanceof a.PlayerError||e instanceof Error?e:Error("AdPlayer failed: ".concat(JSON.stringify(e)))),t.XL=null,t.YL=null)},this.TL=new o.AdPlayerDelegate({context:e,internalPlayer:e.internalPlayer,restoreContentDeferred:new c.Deferred}),(0,p.isPlayingHls)(e)&&(0,h.shouldEnableHlsAdTracking)(e)&&(this.UL=new d.HlsInterstitialsAdTracker(this.context,this.TL))}return e.prototype.playAdBreak=function(e,t){return n(this,void 0,void 0,function(){var i,n,o,a,s,u,c,l;return r(this,function(r){switch(r.label){case 0:return[4,this.fL(!1,this.WL)];case 1:r.sent(),this.bL=e,this.ZL=t,r.label=2;case 2:return r.trys.push([2,10,11,13]),i=this,[4,this.TL.requestAdPlayback(e)];case 3:i.WL=r.sent(),n=0,o=null!=(c=e.ads)?c:[],r.label=4;case 4:if(!(n<o.length)||(a=o[n],this.dL))return[3,9];if(null==a.id)return this.context.logger.debug("SGAI ad without id detected - skipping playback",a),[3,8];if(this.sM())return[3,8];null==(l=this.UL)||l.startTrackingAd(e,a),this.context.logger.debug("Triggering playback of SGAI ad ".concat(a.id," at time ").concat(e.scheduleTime),a),r.label=5;case 5:return r.trys.push([5,7,,8]),[4,this.eL(a,e.restrictions)];case 6:return r.sent(),this.aL+=a.duration,[3,8];case 7:return s=r.sent(),this.context.logger.debug("Failed to play SGAI ad ".concat(a.id),s),[3,8];case 8:return n++,[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.fL(t.isLastAdBreak,this.WL)];case 12:return r.sent(),[7];case 13:return[2]}})})},e.prototype.skipActiveAd=function(){return this.VL?(this.context.logger.debug("Skipping currently active SGAI ad"),this.qM()):(this.context.logger.debug("No active SGAI ad to skip"),Promise.resolve())},e.prototype.getActiveAd=function(){return this.cL},e.prototype.eL=function(e,t){return n(this,void 0,void 0,function(){var i,n,o,a=this;return r(this,function(r){switch(r.label){case 0:if(!this.WL||this.dL)throw Error("No active AdPlaybackAPI available for playback");r.label=1;case 1:return r.trys.push([1,4,5,6]),[4,this.WL.requestPlayer()];case 2:return i=r.sent(),this.VL=i,[4,new Promise(function(n,r){a.XL=n,a.YL=r;var o,u=null==(o=a.UL)?void 0:o.getClickThroughUrl();return e.clickThroughUrl=u,e.clickThroughUrlOpened=u?function(){var e;return null==(e=a.UL)?void 0:e.click()}:void 0,i.on(s.PlayerEvent.TimeChanged,a.rM),i.on(s.PlayerEvent.Playing,function(){var e;return null==(e=a.UL)?void 0:e.setPaused(!1)}),i.on(s.PlayerEvent.Paused,function(){var e;return null==(e=a.UL)?void 0:e.setPaused(!0)}),i.on(s.PlayerEvent.Muted,function(){var e;return null==(e=a.UL)?void 0:e.setMuted(!0)}),i.on(s.PlayerEvent.Unmuted,function(){var e;return null==(e=a.UL)?void 0:e.setMuted(!1)}),i.on(s.PlayerEvent.PlaybackFinished,a.wM),i.on(s.PlayerEvent.Error,a.xM),a.context.logger.debug("Loading ad ".concat(e.id)),a.cL=e,i.load(e,t).then(function(){a.UL&&(a.UL.loaded(),a.UL.trackImpression(),a.UL.started())}).catch(a.xM)})];case 3:return r.sent(),[3,6];case 4:throw n=r.sent(),o="Error during SGAI ad playback for ".concat(e.id,": ").concat(null==n?void 0:n.message),this.context.logger.debug(o,n),n;case 5:return this.VL=null,this.cL=null,[7];case 6:return[2]}})})},e.prototype.fL=function(e,t){return n(this,void 0,void 0,function(){var i;return r(this,function(n){switch(n.label){case 0:if(!t)return[3,6];n.label=1;case 1:return n.trys.push([1,4,5,6]),this.dL?[3,3]:[4,t.done(e)];case 2:n.sent(),n.label=3;case 3:return[3,6];case 4:return i=n.sent(),this.context.logger.debug("Error finishing current ad playback",i),[3,6];case 5:return this.VL=null,this.cL=null,this.WL=null,this.XL=null,this.YL=null,[7];case 6:return this.vM(),[2]}})})},e.prototype.qM=function(){return n(this,void 0,void 0,function(){var e,t;return r(this,function(i){switch(i.label){case 0:if(!this.VL)return[3,5];i.label=1;case 1:return i.trys.push([1,3,,4]),[4,this.VL.done()];case 2:return i.sent(),[3,4];case 3:return e=i.sent(),this.context.logger.debug("Error calling adPlayer.done()",e),[3,4];case 4:this.VL=null,this.cL=null,i.label=5;case 5:return null==(t=this.UL)||t.reset(),this.XL&&(this.XL(),this.XL=null,this.YL=null),[2]}})})},e.prototype.sM=function(e){void 0===e&&(e=0);var t,i=null==(t=this.ZL)?void 0:t.getPlayoutLimit();if(!(0,l.isDefined)(i))return!1;this.uM(i),this.tM(i);var n=this.aL+e>=i;return n&&this.context.logger.debug("Playout limit (".concat(i,"s) reached for current SGAI ad break")),n},e.prototype.tM=function(e){var t,i=null==(t=this.ZL)?void 0:t.getReplaceContentDuration();if(this.bL&&(0,l.isDefined)(i)){var n=this.bL.totalPlannedDuration!==e,r=this.bL.replaceContentDuration!==i;(n||r)&&(this.bL.replaceContentDuration=i,this.bL.totalPlannedDuration=e,this.TL.updateAdRestoreState({adBreakDuration:e,replaceContentDuration:i}))}},e.prototype.uM=function(e){var t,i,n=null!=(i=null==(t=this.cL)?void 0:t.duration)?i:0,r=e-this.aL,o=r>0&&r<n;this.cL&&o&&(this.context.logger.debug("Current Ad duration changed from (".concat(n,"s
1) to (").concat(r,"s) due to playout limit")),(0,u.maybeFireDurationChangedEvent)(n,r,this.context.eventHandler),this.cL.duration=r)},e.prototype.vM=function(){this.bL=null,this.ZL=null,this.aL=0},e.prototype.dispose=function(){return n(this,void 0,void 0,function(){var e;return r(this,function(t){switch(t.label){case 0:return this.dL=!0,this.VL?(this.context.logger.debug("Source was unloaded while SGAI ad was playing"),[4,this.qM()]):[3,2];case 1:t.sent(),t.label=2;case 2:return this.TL.reset(),null==(e=this.UL)||e.dispose(),this.vM(),[2]}})})},e}()},1951:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.SgaiAdTracker=void 0;var n=i(95217),r=i(3714),o=i(23068),a=i(28038);t.SgaiAdTracker=function(){function e(e){this.playerDelegate=e,this.Bdb=0,this.Cdb=[]}return e.prototype.click=function(){var e=this.getClickThroughUrl();e&&this.playerDelegate.adClicked(e),this.pingTrackingUrls(a.AdTrackingEventTrigger.CLICKED)},e.prototype.close=function(){},e.prototype.complete=function(){this.Ddb(100),this.pingTrackingUrls(a.AdTrackingEventTrigger.COMPLETE)},e.prototype.errorWithCode=function(e){this.pingTrackingUrls(a.AdTrackingEventTrigger.ERROR)},e.prototype.loaded=function(){this.pingTrackingUrls(a.AdTrackingEventTrigger.LOADED)},e.prototype.progress=function(e){var t=Math.round(100*e)/this.Bdb;this.Ddb(t),this.pingTrackingUrls(a.AdTrackingEventTrigger.PROGRESS,e)},e.prototype.setDuration=function(e){this.Bdb=e},e.prototype.setFullscreen=function(e){},e.prototype.setMuted=function(e){this.pingTrackingUrls(e?a.AdTrackingEventTrigger.MUTE:a.AdTrackingEventTrigger.UNMUTE)},e.prototype.setPaused=function(e){this.pingTrackingUrls(e?a.AdTrackingEventTrigger.PAUSE:a.AdTrackingEventTrigger.RESUME)},e.prototype.skip=function(){this.pingTrackingUrls(a.AdTrackingEventTrigger.SKIP)},e.prototype.started=function(){this.pingTrackingUrls(a.AdTrackingEventTrigger.START)},e.prototype.trackImpression=function(){this.pingTrackingUrls(a.AdTrackingEventTrigger.IMPRESSION)},e.prototype.volumeChanged=function(e){},e.prototype.Ddb=function(e){var t=this;[r.AdQuartile.FIRST_QUARTILE,r.AdQuartile.MIDPOINT,r.AdQuartile.THIRD_QUARTILE].forEach(function(i){!t.Cdb.includes(i)&&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}}(i)&&(t.playerDelegate.onQuartile(i),t.Cdb.push(i),t.pingTrackingUrls(i))})},e.prototype.pingTrackingUrls=function(e,t){var i=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,n.pingUrl)(e)}),(0,o.isDefined)(t)&&i.registry.removeTrackingEventForTrigger(e,r)})},e.prototype.startTrackingAd=function(e,t){this.Bdb=t.duration,this.registry.clear(),this.Cdb=[]},e.prototype.getClickThroughUrl=function(){},e.prototype.setupWasSuccessful=function(){return(0,o.isDefined)(this.registry)},e.prototype.reset=function(){this.Bdb=0,this.registry.clear(),this.Cdb=[]},e.prototype.dispose=function(){this.reset()},e}()},28038:function(e,t){var i,n;Object.defineProperty(t,"__esModule",{value:!0}),t.AdTrackingEventTrigger=t.SgaiAdType=void 0,function(e){e.LINEAR="linear"}(i||(t.SgaiAdType=i={})),function(e){e.IMPRESSION="impression",e.PAUSE="pause",e.MUTE="mute",e.UNMUTE="unmute",e.RESUME="resume",e.LOADED="loaded",e.START="start",e.PROGRESS="progress",e.FIRST_QUARTILE="firstQuartile",e.MIDPOINT="midpoint",e.THIRD_QUARTILE="thirdQuartile",e.COMPLETE="complete",e.ERROR="error",e.CLICKED="clickTracking",e.SKIP="skip",e.VIEWABLE="viewable",e.NOT_VIEWABLE="notViewable",e.VIEW_UNDETERMINED="viewUndetermined"}(n||(t.AdTrackingEventTrigger=n={}))},91135:function(e,t,i){var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},r=this&&this.__awaiter||function(e,t,i,n){return new(i||(i=Promise))(function(r,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){e.done?r(e.value):(function(e){return e instanceof i?e:new i(function(t){t(e)})})(e.value).then(a,s)}u((n=n.apply(e,t||[])).next())})},o=this&&this.__generator||function(e,t){var i,n,r,o={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]}
1,trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(u){return function(s){if(i)throw TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(i=1,n&&(r=2&s[0]?n.return:s[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,s[1])).done)return r;switch(n=0,r&&(s=[2&s[0],r.value]),s[0]){case 0:case 1:r=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,n=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((r=(r=o.trys).length>0&&r[r.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!r||s[1]>r[0]&&s[1]<r[3])){o.label=s[1];break}if(6===s[0]&&o.label<r[1]){o.label=r[1],r=s;break}if(r&&o.label<r[2]){o.label=r[2],o.ops.push(s);break}r[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],n=0}finally{i=r=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,u])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.SgaiService=void 0;var a=i(56481),s=i(3714),u=i(34841),c=i(23068),l=i(2423),d=i(71734),h=i(43661);t.SgaiService=function(){function e(e){var t=this;this.context=e,this.ti=!1,this.ui=!1,this.vi=void 0,this.wi=!1,this.yi=function(){var e;null!=(e=t.xi)||(t.xi=new u.Deferred),t.xi.resolve()},this.zi=function(){t.ri&&!t.ti&&t.ri.markPastAdsAsPlayed(t.context.internalPlayer.getCurrentTime())},this.Ai=function(e){if(t.ri&&!t.ti){t.ri.clearDroppedOutAds();var i=t.context.settings.SGAI_TRIGGER_DELAY_COMPENSATION,n=t.ri.getDueAds(e.time+i);0!==n.length?(t.context.logger.debug("Scheduling playback of SGAI ads at time ".concat(e.time),n),t.Pj(n)):t.ri.preloadUpcomingAds(e.time)}},this.Bi=function(e){var i=n(n({},e),{seekTarget:e.target});t.Nj(i)},this.Mj=function(){t.Oj()},this.Nj=function(e){t.ri&&!t.ti&&(t.vi=n({},e),e.seekTarget>=e.position||t.ri.reinsertAds(e.seekTarget))},this.Oj=function(){if(t.ri&&!t.ti&&t.vi){var e=t.vi,i=e.position,n=e.seekTarget;if(t.vi=void 0,!(n<=i)){var r=t.ri.handleSkippedAds(i,n);0!==r.length&&(t.context.logger.debug("Scheduling playback of ".concat(r.length," SGAI ads on seeking"),r),t.Pj(r,0))}}},this.context.logger.debug("Creating SGAI service")}return e.prototype.initialize=function(){this.ui=!1,this.context.logger.debug("Initializing SGAI service"),(0,h.isPlayingHls)(this.context)&&(this.ri=new l.HlsInterstitialsProvider(this.context),this.context.eventHandler.on(s.PlayerEvent.SourceLoaded,this.yi),this.context.eventHandler.on(s.PlayerEvent.Playing,this.zi),this.context.eventHandler.on(s.PlayerEvent.TimeChanged,this.Ai),this.context.eventHandler.on(s.PlayerEvent.Seek,this.Nj),this.context.eventHandler.on(s.PlayerEvent.Seeked,this.Oj),this.context.eventHandler.on(s.PlayerEvent.TimeShift,this.Bi),this.context.eventHandler.on(s.PlayerEvent.TimeShifted,this.Mj))},e.prototype.getSgaiPlayerAPI=function(){var e=this;return{list:function(){var t,i;return null!=(i=null==(t=e.ri)?void 0:t.listUnplayedAds())?i:[]},skip:function(){var t,i;return null!=(i=null==(t=e.si)?void 0:t.skipActiveAd())?i:Promise.resolve()},getActiveAd:function(){var t,i;return null!=(i=null==(t=e.si)?void 0:t.getActiveAd())?i:void 0}}},e.prototype.shouldPlayPreRollAds=function(){return!!this.ri&&!this.wi},e.prototype.playPreRollAds=function(){return r(this,void 0,void 0,function(){var e,t,i=this;return o(this,function(n){switch(n.label){case 0:return this.ri?(null!=(t=this.xi)||(this.xi=new u.Deferred),[4,this.xi.promise.catch(function(){})]):[2];case 1:return n.sent(),this.ui?(this.context.logger.debug("Source loading failed or was aborted, skipping SGAI pre-roll playback"),[2]):(this.wi=!0,0===(e=this.ri.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.Pj(e).finally(function(){return i.zi()})]))}})})},e.prototype.Pj=function(e,t){return r(this,void 0,void 0,function(){var i,n,r,a,s,u,l=this;return o(this,function(h){switch(h.label){case 0:return this.ti=!0,[4,Promise.all(e.map(function(e){return l.Qj(e)}))];case 1:n=(i=h.sent()).reduce(function(e,t){var i;return e+(null!=(i=t.replaceContentDuration)?i:0)},0)+this.context.settings.SGAI_TRIGGER_DELAY_COMPENSATION,r=function(r){var s,h;return o(this,function(o){switch(o.label){case 0:if(!(s=i[r]).ads||0===s.ads.length)return a.context.logger.debug("No ads found for SGAI with id ".concat(s.id,", skipping playback")),[2,"continue"];
1if(a.ui||!a.ri)return[2,"break"];s.replaceContentDuration=null!=t?t:n,a.context.logger.debug("Scheduling playback of SGAI ad break with ".concat(s.ads.length," ads"),s),o.label=1;case 1:return o.trys.push([1,3,,4]),null!=(u=a.si)||(a.si=new d.SgaiAdPlayer(a.context)),[4,a.si.playAdBreak(s,{isLastAdBreak:r===i.length-1,getPlayoutLimit:function(){var t;return null==(t=l.ri)?void 0:t.getTotalPlayoutLimit(e[r])},getReplaceContentDuration:function(){if((0,c.isDefined)(t))return t;var i,n,o=null==(i=l.ri)?void 0:i.getReplaceContentDuration(e[r],null!=(n=s.ads)?n:[]);return(0,c.isDefined)(o)?o+l.context.settings.SGAI_TRIGGER_DELAY_COMPENSATION:void 0}})];case 2:return o.sent(),[3,4];case 3:return h=o.sent(),a.context.logger.debug("Failed to play SGAI ad break with id ".concat(s.id),h),[3,4];case 4:return[2]}})},a=this,s=0,h.label=2;case 2:return s<i.length?[5,r(s)]:[3,5];case 3:if("break"===h.sent())return[3,5];h.label=4;case 4:return s++,[3,2];case 5:return this.ti=!1,this.vi=void 0,[2]}})})},e.prototype.Qj=function(e){return r(this,void 0,void 0,function(){var t,i,n,r,a,s,u,c,l,d;return o(this,function(o){switch(o.label){case 0:return this.ri?[4,this.ri.resolveNestedAds(e)]:[3,2];case 1:return i=o.sent(),[3,3];case 2:i=[],o.label=3;case 3:return t=i,n=null==(s=this.ri)?void 0:s.getReplaceContentDuration(e,t),r=null==(u=this.ri)?void 0:u.getTotalPlannedDuration(e,t),a=t.length>0,null==(c=this.ri)||c.markAdAsPlayed(e),[2,{id:e.id,scheduleTime:e.start,replaceContentDuration:a?n:void 0,totalPlannedDuration:a?r:void 0,ads:t,adCreativeSignaling:null==(l=this.ri)?void 0:l.resolveAdCreativeSignaling(e),restrictions:null==(d=this.ri)?void 0:d.resolveRestrictions(e)}]}})})},e.prototype.playPostRollAds=function(){if(!this.ri)return Promise.resolve();var e=this.ri.getPostRollAds();return 0===e.length?Promise.resolve():(this.context.logger.debug("Scheduling playback of post-roll SGAI ads with id ".concat(e.map(function(e){return e.id}).join(", ")),e),this.Pj(e))},e.prototype.reset=function(){return r(this,void 0,void 0,function(){var e,t;return o(this,function(i){switch(i.label){case 0:return this.context.logger.debug("Resetting SGAI service"),this.ui=!0,this.wi=!1,this.vi=void 0,this.context.eventHandler.off(s.PlayerEvent.Playing,this.zi),this.context.eventHandler.off(s.PlayerEvent.TimeChanged,this.Ai),this.context.eventHandler.off(s.PlayerEvent.TimeShift,this.Bi),this.context.eventHandler.off(s.PlayerEvent.TimeShifted,this.Mj),this.context.eventHandler.off(s.PlayerEvent.Seek,this.Nj),this.context.eventHandler.off(s.PlayerEvent.Seeked,this.Oj),this.context.eventHandler.off(s.PlayerEvent.SourceLoaded,this.yi),null==(e=this.xi)||e.reject(),this.xi=void 0,this.ri=(0,a.dispose)(this.ri),[4,null==(t=this.si)?void 0:t.dispose()];case 1:return i.sent(),this.si=void 0,this.ti=!1,[2]}})})},e.prototype.dispose=function(){},e}()},43661:function(e,t,i){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===n.StreamType.Hls},t.isHlsManifestUri=r,t.isProgressiveMediaUrl=function(e){return!r(e)&&e.toLowerCase().includes(".mp4")};var n=i(20213);function r(e){return e.toLowerCase().includes(".m3u8")}},13117:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.ViewabilityTracker=void 0;var n=i(3714),r=i(84770),o=i(28038);t.ViewabilityTracker=function(){function e(e,t,i){var n=this;this.context=e,this.config=t,this.onDecision=i,this.Edb=!1,this.Fdb=!1,this.Gdb=!0,this.Hdb=0,this.Idb=null,this.Kdb={paused:!1,stalled:!1},this.Ldb=null,this.Mdb=function(e){n.Fdb=!!e.isVisible,n.Vdb()},this.Ndb=function(){n.Gdb=n.Wdb(),n.Vdb()},this.Odb=function(){n.Edb||n.adb(o.AdTrackingEventTrigger.NOT_VIEWABLE)},this.Pdb=function(){n.Ydb("paused")},this.Qdb=function(){n.Zdb("paused")},this.Rdb=function(){n.Ydb("stalled")},this.Sdb=function(){n.Zdb("stalled")},this.Udb=function(){var e,t=Date.now();n.Edb||!n.Tdb()||n.cdb()?n.Ldb=t:(n.Hdb+=t-(null!=(e=n.Ldb)?e:t),n.Ldb=t,n.Hdb>
vendor: 7,982 bytes, line 1
1=n.config.viewableDurationMs&&n.adb(o.AdTrackingEventTrigger.VIEWABLE))},this.Jdb=new r.PausableTimeout(this.config.decisionTimeoutMs,this.Odb)}return e.prototype.start=function(){this.Edb||(this.Xdb()?(this.Gdb=this.Wdb(),this.Fdb=!!this.context.internalPlayer.getVisibility().isVisible,this.Vdb(),this.context.eventHandler.on(n.PlayerEvent.VisibilityChanged,this.Mdb),this.context.eventHandler.on(n.PlayerEvent.Paused,this.Pdb),this.context.eventHandler.on(n.PlayerEvent.Playing,this.Qdb),this.context.eventHandler.on(n.PlayerEvent.StallStarted,this.Rdb),this.context.eventHandler.on(n.PlayerEvent.StallEnded,this.Sdb),document.addEventListener("visibilitychange",this.Ndb,{passive:!0}),this.Jdb.start(),this.Ldb=Date.now(),this.Hdb=0,this.Idb=window.setInterval(this.Udb,250)):this.adb(o.AdTrackingEventTrigger.VIEW_UNDETERMINED))},e.prototype.Tdb=function(){return this.Fdb&&this.Gdb},e.prototype.Vdb=function(){this.Fdb&&this.Gdb||(this.Hdb=0)},e.prototype.Wdb=function(){return"string"==typeof document.visibilityState?"visible"===document.visibilityState:"boolean"==typeof document.hidden&&!document.hidden},e.prototype.Xdb=function(){var e,t;return"undefined"!=typeof window&&"undefined"!=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.Ydb=function(e){if(!this.Kdb[e]){var t=!this.cdb();this.Kdb[e]=!0,t&&this.Jdb.pause()}},e.prototype.Zdb=function(e){this.Kdb[e]&&(this.Kdb[e]=!1,this.cdb()||this.Jdb.resume())},e.prototype.adb=function(e){this.Edb||(this.Edb=!0,this.bdb(),this.onDecision(e))},e.prototype.bdb=function(){this.context.eventHandler.off(n.PlayerEvent.VisibilityChanged,this.Mdb),this.context.eventHandler.off(n.PlayerEvent.Paused,this.Pdb),this.context.eventHandler.off(n.PlayerEvent.Playing,this.Qdb),this.context.eventHandler.off(n.PlayerEvent.StallStarted,this.Rdb),this.context.eventHandler.off(n.PlayerEvent.StallEnded,this.Sdb),document.removeEventListener("visibilitychange",this.Ndb),null!==this.Idb&&(window.clearInterval(this.Idb),this.Idb=null,this.Ldb=null),this.Jdb.pause()},e.prototype.reset=function(){this.bdb(),this.Edb=!1,this.Hdb=0,this.Kdb.paused=!1,this.Kdb.stalled=!1,this.Jdb.reset()},e.prototype.cdb=function(){return this.Kdb.paused||this.Kdb.stalled},e.prototype.dispose=function(){this.bdb(),this.Jdb.dispose()},e}()},22705:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.defaultCustomAttributesMapping=void 0;var n=i(61933),r=i(28038),o=function(e,t){if(t&&0!==t.length)for(var i=function(t,i){i.urls&&i.urls.length>0&&e.tracking.register(t,[{urls:i.urls,offset:i.offset}])},n=0,o=t;n<o.length;n++){var a=o[n];switch(a.type){case r.AdTrackingEventTrigger.CLICKED:i(r.AdTrackingEventTrigger.CLICKED,a);break;case r.AdTrackingEventTrigger.IMPRESSION:i(r.AdTrackingEventTrigger.IMPRESSION,a);break;case r.AdTrackingEventTrigger.COMPLETE:i(r.AdTrackingEventTrigger.COMPLETE,a);break;case r.AdTrackingEventTrigger.START:i(r.AdTrackingEventTrigger.START,a);break;case r.AdTrackingEventTrigger.FIRST_QUARTILE:i(r.AdTrackingEventTrigger.FIRST_QUARTILE,a);break;case r.AdTrackingEventTrigger.MIDPOINT:i(r.AdTrackingEventTrigger.MIDPOINT,a);break;case r.AdTrackingEventTrigger.THIRD_QUARTILE:i(r.AdTrackingEventTrigger.THIRD_QUARTILE,a);break;case r.AdTrackingEventTrigger.PAUSE:i(r.AdTrackingEventTrigger.PAUSE,a);break;case r.AdTrackingEventTrigger.RESUME:i(r.AdTrackingEventTrigger.RESUME,a);break;case r.AdTrackingEventTrigger.MUTE:i(r.AdTrackingEventTrigger.MUTE,a);break;case r.AdTrackingEventTrigger.UNMUTE:i(r.AdTrackingEventTrigger.UNMUTE,a);break;case r.AdTrackingEventTrigger.ERROR:i(r.AdTrackingEventTrigger.ERROR,a);break;case r.AdTrackingEventTrigger.LOADED:i(r.AdTrackingEventTrigger.LOADED,a);break;case r.AdTrackingEventTrigger.PROGRESS:i(r.AdTrackingEventTrigger.PROGRESS,a);break;case r.AdTrackingEventTrigger.SKIP:i(r.AdTrackingEventTrigger.SKIP,a);break;case r.AdTrackingEventTrigger.VIEWABLE:i(r.AdTrackingEventTrigger.VIEWABLE,a);break;case r.AdTrackingEventTrigger.NOT_VIEWABLE:i(r.AdTrackingEventTrigger.NOT_VIEWABLE,a);break;case r.AdTrackingEventTrigger.VIEW_UNDETERMINED:i(r.AdTrackingEventTrigger.VIEW_UNDETERMINED,a)}}};t.defaultCustomAttributesMapping=function(e,t){var i,r=null==(i=e.customAttributes)?void 0:i[n.AD_CREATIVE_SIGNALING_KEY];if(r){o(t,r.tracking);for(var a=0,s=function(e){return e?Array.isArray(e)?e:[e]:[]}(r.payload);a<s.length;a++){var u=s[a];u.clickThrough&&!t.clickThroughUrl&&(t.clickThroughUrl=u.clickThrough),o(t,u.tracking)}}}}},function(e){return e(e.s=60047)}])},429:function(e){self,e.exports=(self.webpackChunkbitmovin_player=self.webpackChunkbitmovin_player||[]).push([[485],{79500:function(e,t){var i={parseBuffer:function(e){return new n(e).parse()},addBoxProcessor:function(e,t){"string"==typeof e&&"function"==typeof t&&(r.prototype._boxProcessors[e]=t)},createFile:function(){return new n},createBox:function(e,t,i){var n=r.create(e);return t&&t.append(n,i),n},createFullBox:function(e,t,n){var r=i.createBox(e,t,n);return r.version=0,r.flags=0,r},Utils:{}};i.Utils.dataViewToString=function(e,t){var i=t||"utf-8";if("undefined"!=typeof TextDecoder)return new TextDecoder(i).decode(e);var n=[],r=0;if("utf-8"===i)for(;r<e.byteLength;){var o=e.getUint8(r++);o<128||(o=o<224?(31&o)<<6|63&e.getUint8(r++):o<240?(15&o)<<12|(63&e.getUint8(r++))<<6|63&e.getUint8(r++):(7&o)<<18|(63&e.getUint8(r++))<<12|(63&e.getUint8(r++))<<6|63&e.getUint8(r++)),n.push(String.fromCharCode(o))}else for(;r<e.byteLength;)n.push(String.fromCharCode(e.getUint8(r++)));return n.join("")},i.Utils.utf8ToByteArray=function(e){var t,i;if("undefined"!=typeof TextEncoder)t=(new TextEncoder).encode(e);else for(t=[],i=0;i<e.length;++i){var n=e.charCodeAt(i);n<128?t.push(n):(n<2048?t.push(192|n>>6):(n<65536?t.push(224|n>>12):(t.push(240|n>>18),t.push(128|63&n>>12)),t.push(128|63&n>>6)),t.push(128|63&n))}return t},i.Utils.appendBox=function(e,t,i){if(t._offset=e._cursor.offset,t._root=e._root?e._root:e,t._raw=e._raw,t._parent=e,-1!==i)if(null!=i){var n,r=-1;if("number"==typeof i)r=i;else{if("string"==typeof i)n=i;else{if("object"!=typeof i||!i.type)return void e.boxes.push(t);n=i.type}for(var o=0;o<e.boxes.length;o++)if(n===e.boxes[o].type){r=o+1;break}}e.boxes.splice(r,0,t)}else e.boxes.push(t)},t.parseBuffer=i.parseBuffer,t.addBoxProcessor=i.addBoxProcessor,t.createFile=i.createFile,t.createBox=i.createBox,t.createFullBox=i.createFullBox,t.Utils=i.Utils,i.Cursor=function(e){this.offset=void 0===e?0:e};var n=function(e){this._cursor=new i.Cursor,this.boxes=[],e&&(this._raw=new DataView(e))};n.prototype.fetch=function(e){var t=this.fetchAll(e,!0);return t.length?t[0]:null},n.prototype.fetchAll=function(e,t){var i=[];return n._sweep.call(this,e,i,t),i},n.prototype.parse=function(){for(this._cursor.offset=0,this.boxes=[];this._cursor.offset<this._raw.byteLength;){var e=r.parse(this);if(void 0===e.type)break;this.boxes.push(e)}return this},n._sweep=function(e,t,i){for(var r in this.type&&this.type==e&&t.push(this),this.boxes){if(t.length&&i)return;n._sweep.call(this.boxes[r],e,t,i)}},n.prototype.write=function(){var e,t=0;for(e=0;e<this.boxes.length;e++)t+=this.boxes[e].getLength(!1);var i=new Uint8Array(t);for(this._rawo=new DataView(i.buffer),this.bytes=i,this._cursor.offset=0,e=0;e<this.boxes.length;e++)this.boxes[e].write();return i.buffer},n.prototype.append=function(e,t){i.Utils.appendBox(this,e,t)};var r=function(){this._cursor=new i.Cursor};r.parse=function(e){var t=new r;return t._offset=e._cursor.offset,t._root=e._root?e._root:e,t._raw=e._raw,t._parent=e,t._parseBox(),e._cursor.offset=t._raw.byteOffset+t._raw.byteLength,t},r.create=function(e){var t=new r;return t.type=e,t.boxes=[],t},r.prototype._boxContainers=["dinf","edts","mdia","meco","mfra","minf","moof","moov","mvex","
1stbl","strk","traf","trak","tref","udta","vttc","sinf","schi","encv","enca","meta","grpl","prsl"],r.prototype._boxProcessors={},r.prototype._procField=function(e,t,i){this._parsing?this[e]=this._readField(t,i):this._writeField(t,i,this[e])},r.prototype._procFieldArray=function(e,t,i,n){var r;if(this._parsing)for(this[e]=[],r=0;r<t;r++)this[e][r]=this._readField(i,n);else for(r=0;r<this[e].length;r++)this._writeField(i,n,this[e][r])},r.prototype._procFullBox=function(){this._procField("version","uint",8),this._procField("flags","uint",24)},r.prototype._procEntries=function(e,t,i){var n;if(this._parsing)for(this[e]=[],n=0;n<t;n++)this[e].push({}),i.call(this,this[e][n]);else for(n=0;n<t;n++)i.call(this,this[e][n])},r.prototype._procSubEntries=function(e,t,i,n){var r;if(this._parsing)for(e[t]=[],r=0;r<i;r++)e[t].push({}),n.call(this,e[t][r]);else for(r=0;r<i;r++)n.call(this,e[t][r])},r.prototype._procEntryField=function(e,t,i,n){this._parsing?e[t]=this._readField(i,n):this._writeField(i,n,e[t])},r.prototype._procSubBoxes=function(e,t){var i;if(this._parsing)for(this[e]=[],i=0;i<t;i++)this[e].push(r.parse(this));else for(i=0;i<t;i++)this._rawo?this[e][i].write():this.size+=this[e][i].getLength()},r.prototype._readField=function(e,t){switch(e){case"uint":return this._readUint(t);case"int":return this._readInt(t);case"template":return this._readTemplate(t);case"string":return -1===t?this._readTerminatedString():this._readString(t);case"data":return this._readData(t);case"utf8":return this._readUTF8String();case"utf8string":return this._readUTF8TerminatedString();default:return -1}},r.prototype._readInt=function(e){var t=null,i=this._cursor.offset-this._raw.byteOffset;switch(e){case 8:t=this._raw.getInt8(i);break;case 16:t=this._raw.getInt16(i);break;case 32:t=this._raw.getInt32(i);break;case 64:t=0x100000000*this._raw.getInt32(i)+this._raw.getInt32(i+4)}return this._cursor.offset+=e>>3,t},r.prototype._readUint=function(e){var t,i,n=null,r=this._cursor.offset-this._raw.byteOffset;switch(e){case 8:n=this._raw.getUint8(r);break;case 16:n=this._raw.getUint16(r);break;case 24:n=((t=this._raw.getUint16(r))<<8)+(i=this._raw.getUint8(r+2));break;case 32:n=this._raw.getUint32(r);break;case 64:n=0x100000000*(t=this._raw.getUint32(r))+(i=this._raw.getUint32(r+4))}return this._cursor.offset+=e>>3,n},r.prototype._readString=function(e){for(var t="",i=0;i<e;i++)t+=String.fromCharCode(this._readUint(8));return t},r.prototype._readTemplate=function(e){return this._readUint(e/2)+this._readUint(e/2)/Math.pow(2,e/2)},r.prototype._readTerminatedString=function(){for(var e="";this._cursor.offset-this._offset<this._raw.byteLength;){var t=this._readUint(8);if(0===t)break;e+=String.fromCharCode(t)}return e},r.prototype._readData=function(e){var t=e>0?e:this._raw.byteLength-(this._cursor.offset-this._offset);if(t>0){var i=new Uint8Array(this._raw.buffer,this._cursor.offset,t);return this._cursor.offset+=t,i}return null},r.prototype._readUTF8String=function(){var e=this._raw.byteLength-(this._cursor.offset-this._offset),t=null;return e>0&&(t=new DataView(this._raw.buffer,this._cursor.offset,e),this._cursor.offset+=e),t?i.Utils.dataViewToString(t):t},r.prototype._readUTF8TerminatedString=function(){var e,t=this._raw.byteLength-(this._cursor.offset-this._offset),n=null;if(t>0){for(n=new DataView(this._raw.buffer,this._cursor.offset,t),e=0;e<t&&0!==n.getUint8(e);e++);n=new DataView(this._raw.buffer,this._cursor.offset,e),this._cursor.offset+=Math.min(e+1,t)}return n?i.Utils.dataViewToString(n):n},r.prototype._parseBox=function(){if(this._parsing=!0,this._cursor.offset=this._offset,this._offset+8>this._raw.buffer.byteLength)this._root._incomplete=!0;else{switch(this._procField("size","uint",32),this._procField("type","string",4),1===this.size&&this._procField("largesize","uint",64),"uuid"===this.type&&this._procFieldArray("usertype",16,"uint",8),this.size){case 0:this._raw=new DataView(this._raw.buffer,this._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._boxProcessors[this.type]&&this._boxProcessors[this.type].call(this),-1!==this._boxContainers.indexOf(this.type)?this._parseContainerBox():this._data=this._readData())}},r.prototype._parseFullBox=function(){this.version=this._readUint(8),this.flags=this._readUint(24)},r.prototype._parseContainerBox=function(){for(this.boxes=[];this._cursor.offset-this._raw.byteOffset<this._raw.byteLength;)this.boxes.push(r.parse(this))},r.prototype.append=function(e,t){i.Utils.appendBox(this,e,t)},r.prototype.getLength=function(){if(this._parsing=!1,this._rawo=null,this.size=0,this._procField("size","uint",32),this._procField("type","string",4),1===this.size&&this._procField("largesize","uint",64),"uuid"===this.type&&this._procFieldArray("usertype",16,"uint",8),this._boxProcessors[this.type]&&this._boxProcessors[this.type].call(this),-1!==this._boxContainers.indexOf(this.type))for(var e=0;e<this.boxes.length;e++)this.size+=this.boxes[e].getLength();return this._data&&this._writeData(this._data),this.size},r.prototype.write=function(){switch(this._parsing=!1,this._cursor.offset=this._parent._cursor.offset,this.size){case 0:this._rawo=new DataView(this._parent._rawo.buffer,this._cursor.offset,this.parent._rawo.byteLength-this._cursor.offset);break;case 1:this._rawo=new DataView(this._parent._rawo.buffer,this._cursor.offset,this.largesize);break;default:this._rawo=new DataView(this._parent._rawo.buffer,this._cursor.offset,this.size)}if(this._procField("size","uint",32),this._procField("type","string",4),1===this.size&&this._procField("largesize","uint",64),"uuid"===this.type&&this._procFieldArray("usertype",16,"uint",8),this._boxProcessors[this.type]&&this._boxProcessors[this.type].call(this),-1!==this._boxContainers.indexOf(this.type))for(var e=0;e<this.boxes.length;e++)this.boxes[e].write();return this._data&&this._writeData(this._data),this._parent._cursor.offset+=this.size,this.size},r.prototype._writeInt=function(e,t){if(this._rawo){var i=this._cursor.offset-this._rawo.byteOffset;switch(e){case 8:this._rawo.setInt8(i,t);break;case 16:this._rawo.setInt16(i,t);break;case 32:this._rawo.setInt32(i,t);break;case 64:var n=Math.floor(t/0x100000000),r=t-0x100000000*n;this._rawo.setUint32(i,n),this._rawo.setUint32(i+4,r)}this._cursor.offset+=e>>3}else this.size+=e>>3},r.prototype._writeUint=function(e,t){if(this._rawo){var i,n,r=this._cursor.offset-this._rawo.byteOffset;switch(e){case 8:this._rawo.setUint8(r,t);break;case 16:this._rawo.setUint16(r,t);break;case 24:i=(0xffff00&t)>>8,n=255&t,this._rawo.setUint16(r,i),this._rawo.setUint8(r+2,n);break;case 32:this._rawo.setUint32(r,t);break;case 64:n=t-0x100000000*(i=Math.floor(t/0x100000000)),this._rawo.setUint32(r,i),this._rawo.setUint32(r+4,n)}this._cursor.offset+=e>>3}else this.size+=e>>3},r.prototype._writeString=function(e,t){for(var i=0;i<e;i++)this._writeUint(8,t.charCodeAt(i))},r.prototype._writeTerminatedString=function(e){if(0!==e.length){for(var t=0;t<e.length;t++)this._writeUint(8,e.charCodeAt(t));this._writeUint(8,0)}},r.prototype._writeTemplate=function(e,t){var i=Math.floor(t),n=(t-i)*M
vendor: 9,282 bytes, line 1
1ath.pow(2,e/2);this._writeUint(e/2,i),this._writeUint(e/2,n)},r.prototype._writeData=function(e){if(e)if(this._rawo){if(e instanceof Array){for(var t=this._cursor.offset-this._rawo.byteOffset,i=0;i<e.length;i++)this._rawo.setInt8(t+i,e[i]);this._cursor.offset+=e.length}e instanceof Uint8Array&&(this._root.bytes.set(e,this._cursor.offset),this._cursor.offset+=e.length)}else this.size+=e.length},r.prototype._writeUTF8String=function(e){var t=i.Utils.utf8ToByteArray(e);if(this._rawo)for(var n=new DataView(this._rawo.buffer,this._cursor.offset,t.length),r=0;r<t.length;r++)n.setUint8(r,t[r]);else this.size+=t.length},r.prototype._writeField=function(e,t,i){switch(e){case"uint":this._writeUint(t,i);break;case"int":this._writeInt(t,i);break;case"template":this._writeTemplate(t,i);break;case"string":-1==t?this._writeTerminatedString(i):this._writeString(t,i);break;case"data":this._writeData(i);break;case"utf8":this._writeUTF8String(i)}},r.prototype._boxProcessors.ardi=function(){this._procFullBox(),this._procField("audio_rendering_indication","uint",8)},r.prototype._boxProcessors.avc1=r.prototype._boxProcessors.avc2=r.prototype._boxProcessors.avc3=r.prototype._boxProcessors.avc4=r.prototype._boxProcessors.hvc1=r.prototype._boxProcessors.hev1=r.prototype._boxProcessors.encv=function(){this._procFieldArray("reserved1",6,"uint",8),this._procField("data_reference_index","uint",16),this._procField("pre_defined1","uint",16),this._procField("reserved2","uint",16),this._procFieldArray("pre_defined2",3,"uint",32),this._procField("width","uint",16),this._procField("height","uint",16),this._procField("horizresolution","template",32),this._procField("vertresolution","template",32),this._procField("reserved3","uint",32),this._procField("frame_count","uint",16),this._procFieldArray("compressorname",32,"uint",8),this._procField("depth","uint",16),this._procField("pre_defined3","int",16),this._procField("config","data",-1)},r.prototype._boxProcessors.ctts=function(){this._procFullBox(),this._procField("entry_count","uint",32),this._procEntries("entries",this.entry_count,function(e){this._procEntryField(e,"sample_count","uint",32),this._procEntryField(e,"sample_offset",1===this.version?"int":"uint",32)})},r.prototype._boxProcessors.dref=function(){this._procFullBox(),this._procField("entry_count","uint",32),this._procSubBoxes("entries",this.entry_count)},r.prototype._boxProcessors.elng=function(){this._procFullBox(),this._procField("extended_language","utf8string")},r.prototype._boxProcessors.elst=function(){this._procFullBox(),this._procField("entry_count","uint",32),this._procEntries("entries",this.entry_count,function(e){this._procEntryField(e,"segment_duration","uint",1===this.version?64:32),this._procEntryField(e,"media_time","int",1===this.version?64:32),this._procEntryField(e,"media_rate_integer","int",16),this._procEntryField(e,"media_rate_fraction","int",16)})},r.prototype._boxProcessors.emsg=function(){this._procFullBox(),1==this.version?(this._procField("timescale","uint",32),this._procField("presentation_time","uint",64),this._procField("event_duration","uint",32),this._procField("id","uint",32),this._procField("scheme_id_uri","string",-1),this._procField("value","string",-1)):(this._procField("scheme_id_uri","string",-1),this._procField("value","string",-1),this._procField("timescale","uint",32),this._procField("presentation_time_delta","uint",32),this._procField("event_duration","uint",32),this._procField("id","uint",32)),this._procField("message_data","data",-1)},r.prototype._boxProcessors.free=r.prototype._boxProcessors.skip=function(){this._procField("data","data",-1)},r.prototype._boxProcessors.frma=function(){this._procField("data_format","uint",32)},r.prototype._boxProcessors.ftyp=r.prototype._boxProcessors.styp=function(){this._procField("major_brand","string",4),this._procField("minor_version","uint",32);var e=-1;this._parsing&&(e=(this._raw.byteLength-(this._cursor.offset-this._raw.byteOffset))/4),this._procFieldArray("compatible_brands",e,"string",4)},r.prototype._boxProcessors.hdlr=function(){this._procFullBox(),this._procField("pre_defined","uint",32),this._procField("handler_type","string",4),this._procFieldArray("reserved",3,"uint",32),this._procField("name","string",-1)},r.prototype._boxProcessors.imda=function(){this._procField("imda_identifier","uint",32),this._procField("data","data",-1)},r.prototype._boxProcessors.kind=function(){this._procFullBox(),this._procField("schemeURI","utf8string"),this._procField("value","utf8string")},r.prototype._boxProcessors.labl=function(){this._procFullBox(),this.is_group_label=!!(1&this.flags),this._procField("label_id","uint",16),this._procField("language","utf8string"),this._procField("label","utf8string")},r.prototype._boxProcessors.mdat=function(){this._procField("data","data",-1)},r.prototype._boxProcessors.mdhd=function(){this._procFullBox(),this._procField("creation_time","uint",1==this.version?64:32),this._procField("modification_time","uint",1==this.version?64:32),this._procField("timescale","uint",32),this._procField("duration","uint",1==this.version?64:32),this._parsing||"string"!=typeof this.language||(this.language=this.language.charCodeAt(0)-96<<10|this.language.charCodeAt(1)-96<<5|this.language.charCodeAt(2)-96),this._procField("language","uint",16),this._parsing&&(this.language=String.fromCharCode(96+(this.language>>10&31),96+(this.language>>5&31),96+(31&this.language))),this._procField("pre_defined","uint",16)},r.prototype._boxProcessors.mehd=function(){this._procFullBox(),this._procField("fragment_duration","uint",1==this.version?64:32)},r.prototype._boxProcessors.meta=function(){this._procFullBox()},r.prototype._boxProcessors.mfhd=function(){this._procFullBox(),this._procField("sequence_number","uint",32)},r.prototype._boxProcessors.mfro=function(){this._procFullBox(),this._procField("mfra_size","uint",32)},r.prototype._boxProcessors.mp4a=r.prototype._boxProcessors.enca=function(){this._procFieldArray("reserved1",6,"uint",8),this._procField("data_reference_index","uint",16),this._procFieldArray("reserved2",2,"uint",32),this._procField("channelcount","uint",16),this._procField("samplesize","uint",16),this._procField("pre_defined","uint",16),this._procField("reserved3","uint",16),this._procField("samplerate","template",32),this._procField("esds","data",-1)},r.prototype._boxProcessors.mvhd=function(){this._procFullBox(),this._procField("creation_time","uint",1==this.version?64:32),this._procField("modification_time","uint",1==this.version?64:32),this._procField("timescale","uint",32),this._procField("duration","uint",1==this.version?64:32),this._procField("rate","template",32),this._procField("volume","template",16),this._procField("reserved1","uint",16),this._procFieldArray("reserved2",2,"uint",32),this._procFieldArray("matrix",9,"template",32),this._procFieldArray("pre_defined",6,"uint",32),this._procField("next_track_ID","uint",32)},r.prototype._boxProcessors.payl=function(){this._procField("cue_text","utf8")},r.prototype._boxProcessors.prft=function(){this._procFullBox(),this._procField("reference_track_ID","uint",32),this._procField("ntp_timestamp_sec","uint",32),this._procField("ntp_timestamp_frac","uint",32),this._procField("media_time","uint",1==this.version?64:32)},r.prototype._boxProcessors.prsl=function(){this._procFullBox(),this._procField("group_id","uint",32),this._procField("num_entities_in_group","uint",32),this._procEntries("entities",this.num_entities_in_group,function(e){this._procEntryField(e,"entity_id","uint",32)}),4096&this.flags&&this._procField("preselection_tag","utf8string"),8192&this.flags&&this._procField("selection_priority","uint",8),16384&this.flags&&this._procField("interleaving_tag","utf8string")},r.prototype._boxProcessors.pssh=function(){this._procFullBox(),this._procFieldArray("SystemID",16,"uint",8),this._procField("DataSize","uint",32),this._procFieldArray("Data",this.DataSize,"uint",8)},r.prototype._boxProcessors.schm=function(){this._procFullBox(),this._procField("scheme_type","uint",32),this._procField("scheme_version","uint",32),1&this.flags&&this._procField("scheme_uri","string",-1)},r.prototype._boxProcessors.sdtp=function(){this._procFullBox();var e=-1;this._parsing&&(e=this._raw.byteLength-(this._cursor.offset-this._raw.byteOffset)),this._procFieldArray("sample_dependency_table",e,"uint",8)},r.prototype._boxProcessors.sidx=function(){this._procFullBox(),this._procField("reference_ID","uint",32),this._procField("timescale","uint",32),this._procField("earliest_presentation_time","uint",1==this.version?64:32),this._procField("first_offset","uint",1==this.version?64:32),this._procField("reserved","uint",16),this._procField("reference_count","uint",16),this._procEntries("references",this.reference_count,function(e){this._parsing||(e.reference=(1&e.reference_type)<<31,e.reference|=0x7fffffff&e.referenced_size,e.sap=(1&e.starts_with_SAP)<<31,e.sap|=(3&e.SAP_type)<<28,e.sap|=0xfffffff&e.SAP_delta_time),this._procEntryField(e,"reference","uint",32),this._procEntryField(e,"subsegment_duration","uint",32),this._procEntryField(e,"sap","uint",32),this._parsing&&(e.reference_type=e.reference>>31&1,e.referenced_size=0x7fffffff&e.reference,e.starts_with_SAP=e.sap>>31&1,e.SAP_type=e.sap>>28&7,e.SAP_delta_time=0xfffffff
vendor: 5,555 bytes, line 1
1&e.sap)})},r.prototype._boxProcessors.smhd=function(){this._procFullBox(),this._procField("balance","uint",16),this._procField("reserved","uint",16)},r.prototype._boxProcessors.ssix=function(){this._procFullBox(),this._procField("subsegment_count","uint",32),this._procEntries("subsegments",this.subsegment_count,function(e){this._procEntryField(e,"ranges_count","uint",32),this._procSubEntries(e,"ranges",e.ranges_count,function(e){this._procEntryField(e,"level","uint",8),this._procEntryField(e,"range_size","uint",24)})})},r.prototype._boxProcessors.stsd=function(){this._procFullBox(),this._procField("entry_count","uint",32),this._procSubBoxes("entries",this.entry_count)},r.prototype._boxProcessors.sttg=function(){this._procField("settings","utf8")},r.prototype._boxProcessors.stts=function(){this._procFullBox(),this._procField("entry_count","uint",32),this._procEntries("entries",this.entry_count,function(e){this._procEntryField(e,"sample_count","uint",32),this._procEntryField(e,"sample_delta","uint",32)})},r.prototype._boxProcessors.subs=function(){this._procFullBox(),this._procField("entry_count","uint",32),this._procEntries("entries",this.entry_count,function(e){this._procEntryField(e,"sample_delta","uint",32),this._procEntryField(e,"subsample_count","uint",16),this._procSubEntries(e,"subsamples",e.subsample_count,function(e){this._procEntryField(e,"subsample_size","uint",1===this.version?32:16),this._procEntryField(e,"subsample_priority","uint",8),this._procEntryField(e,"discardable","uint",8),this._procEntryField(e,"codec_specific_parameters","uint",32)})})},r.prototype._boxProcessors.tenc=function(){this._procFullBox(),this._procField("default_IsEncrypted","uint",24),this._procField("default_IV_size","uint",8),this._procFieldArray("default_KID",16,"uint",8)},r.prototype._boxProcessors.tfdt=function(){this._procFullBox(),this._procField("baseMediaDecodeTime","uint",1==this.version?64:32)},r.prototype._boxProcessors.tfhd=function(){this._procFullBox(),this._procField("track_ID","uint",32),1&this.flags&&this._procField("base_data_offset","uint",64),2&this.flags&&this._procField("sample_description_offset","uint",32),8&this.flags&&this._procField("default_sample_duration","uint",32),16&this.flags&&this._procField("default_sample_size","uint",32),32&this.flags&&this._procField("default_sample_flags","uint",32)},r.prototype._boxProcessors.tfra=function(){this._procFullBox(),this._procField("track_ID","uint",32),this._parsing||(this.reserved=0,this.reserved|=(48&this.length_size_of_traf_num)<<4,this.reserved|=(12&this.length_size_of_trun_num)<<2,this.reserved|=3&this.length_size_of_sample_num),this._procField("reserved","uint",32),this._parsing&&(this.length_size_of_traf_num=(48&this.reserved)>>4,this.length_size_of_trun_num=(12&this.reserved)>>2,this.length_size_of_sample_num=3&this.reserved),this._procField("number_of_entry","uint",32),this._procEntries("entries",this.number_of_entry,function(e){this._procEntryField(e,"time","uint",1===this.version?64:32),this._procEntryField(e,"moof_offset","uint",1===this.version?64:32),this._procEntryField(e,"traf_number","uint",8*(this.length_size_of_traf_num+1)),this._procEntryField(e,"trun_number","uint",8*(this.length_size_of_trun_num+1)),this._procEntryField(e,"sample_number","uint",8*(this.length_size_of_sample_num+1))})},r.prototype._boxProcessors.tkhd=function(){this._procFullBox(),this._procField("creation_time","uint",1==this.version?64:32),this._procField("modification_time","uint",1==this.version?64:32),this._procField("track_ID","uint",32),this._procField("reserved1","uint",32),this._procField("duration","uint",1==this.version?64:32),this._procFieldArray("reserved2",2,"uint",32),this._procField("layer","uint",16),this._procField("alternate_group","uint",16),this._procField("volume","template",16),this._procField("reserved3","uint",16),this._procFieldArray("matrix",9,"template",32),this._procField("width","template",32),this._procField("height","template",32)},r.prototype._boxProcessors.trex=function(){this._procFullBox(),this._procField("track_ID","uint",32),this._procField("default_sample_description_index","uint",32),this._procField("default_sample_duration","uint",32),this._procField("default_sample_size","uint",32),this._procField("default_sample_flags","uint",32)},r.prototype._boxProcessors.trun=function(){this._procFullBox(),this._procField("sample_count","uint",32),1&this.flags&&this._procField("data_offset","int",32),4&this.flags&&this._procField("first_sample_flags","uint",32),this._procEntries("samples",this.sample_count,function(e){256&this.flags&&this._procEntryField(e,"sample_duration","uint",32),512&this.flags&&this._procEntryField(e,"sample_size","uint",32),1024&this.flags&&this._procEntryField(e,"sample_flags","uint",32),2048&this.flags&&this._procEntryField(e,"sample_composition_time_offset",1===this.version?"int":"uint",32)})},r.prototype._boxProcessors["url "]=r.prototype._boxProcessors["urn "]=function(){this._procFullBox(),"urn "===this.type&&this._procField("name","string",-1),this._procField("location","string",-1)},r.prototype._boxProcessors.vlab=function(){this._procField("source_label","utf8")},r.prototype._boxProcessors.vmhd=function(){this._procFullBox(),this._procField("graphicsmode","uint",16),this._procFieldArray("opcolor",3,"uint",16)},r.prototype._boxProcessors.vttC=function(){this._procField("config","utf8")},r.prototype._boxProcessors.vtte=function(){}},96725:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ISOBoxer=void 0;var n=i(79500),r=
vendor: 30,484 bytes, line 1
1Object.getPrototypeOf(n.createBox("dummy")).constructor,o=Object.getPrototypeOf(n.createFile()).constructor;function a(e){return 0===e.length?null:e[0]}function s(e,t){var i=t.indexOf("."),n=[];if(-1===i)n=e.filter(function(e){return e.type===t});else{var r=t.substring(0,i),o=t.substring(i+1);n=e.filter(function(e){return e.type===r}).map(function(e){return e.list(o)}).reduce(function(e,t){return e.concat(t)},n)}return n}o.prototype.get=function(e){return a(this.list(e))},o.prototype.list=function(e){return s(this.boxes,e)},r.prototype.list=function(e){return s(this.boxes||this.entries||[],e)},r.prototype.get=function(e){return a(this.list(e))},t.ISOBoxer=n},20508:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InitSegmentGenerator=void 0;var n=i(88052),r=i(62756),o=i(96725),a=i(72635),s=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];t.InitSegmentGenerator=function(){function e(t,i,o){if(this.wR=i,this.yR=this.wR.timescale||a.DEFAULT_TIMESCALE_FACTOR,this.xR=this.wR.trackId,o){var s=n.ModuleManager.get(r.ModuleName.DRM),u=new s.PlayReady(t,{});this.vR=o.map(function(t){var i=e.base64ToArrayBuffer(t.content),n=String.fromCharCode.apply(null,i),r=u.getIdentifierFromInitData(n),o=e.base64ToArrayBuffer(r);return s.PlayReady.kidToCENC(o),{header:t,kid:o}})}}return e.prototype.getParsedData=function(){return this.zR||this.AR(),this.zR},e.prototype.generateArrayBuffer=function(){return this.getParsedData().write()},e.prototype.AR=function(){var t=o.ISOBoxer.createFile();e.createFtypBox(t),this.BR(t),this.zR=t},e.createFtypBox=function(e){var t=o.ISOBoxer.createBox("ftyp",e);return t.major_brand="iso6",t.minor_version=1,t.compatible_brands=[],t.compatible_brands[0]="isom",t.compatible_brands[1]="iso6",t.compatible_brands[2]="msdh",t},e.prototype.BR=function(t){var i=o.ISOBoxer.createBox("moov",t);this.CR(i);var n=o.ISOBoxer.createBox("trak",i);this.DR(n);var r=o.ISOBoxer.createBox("mdia",n);this.ER(r),this.FR(r);var a=o.ISOBoxer.createBox("minf",r);switch(this.wR.type){case"video":e.appendVmhdBox(a);break;case"audio":e.appendSmhdBox(a)}var s=o.ISOBoxer.createBox("dinf",a);e.appendDrefBox(s);var u=o.ISOBoxer.createBox("stbl",a);o.ISOBoxer.createFullBox("stts",u)._data=[0,0,0,0,0,0,0,0],o.ISOBoxer.createFullBox("stsc",u)._data=[0,0,0,0,0,0,0,0],o.ISOBoxer.createFullBox("stco",u)._data=[0,0,0,0,0,0,0,0],o.ISOBoxer.createFullBox("stsz",u)._data=[0,0,0,0,0,0,0,0,0,0,0,0],this.GR(u);var c=o.ISOBoxer.createBox("mvex",i);this.OR(c),this.vR&&this.vR.forEach(function(t){e.appendProtectionSystemSpecificHeaderBoxForPR(i,t.header.content)})},e.prototype.CR=function(e){var t=o.ISOBoxer.createFullBox("mvhd",e);return t.version=1,t.creation_time=0,t.modification_time=0,t.timescale=this.yR,t.duration=Math.round(this.wR.periodDuration*this.yR),t.rate=1,t.volume=1,t.reserved1=0,t.reserved2=[0,0],t.matrix=[1,0,0,0,1,0,0,0,16384],t.pre_defined=[0,0,0,0,0,0],t.next_track_ID=this.xR+1,t},e.prototype.DR=function(e){var t=o.ISOBoxer.createFullBox("tkhd",e);return t.version=1,t.flags=7,t.creation_time=0,t.modification_time=0,t.track_ID=this.xR,t.reserved1=0,t.duration=Math.round(this.wR.periodDuration*this.yR),t.reserved2=[0,0],t.layer=0,t.alternate_group=0,t.volume=1,t.matrix=[1,0,0,0,1,0,0,0,16384],t.width=this.wR.width,t.height=this.wR.height,t},e.prototype.ER=function(e){var t=o.ISOBoxer.createFullBox("mdhd",e);return t.version=1,t.creation_time=0,t.modification_time=0,t.timescale=this.yR,t.duration=Math.round(this.wR.periodDuration*this.yR),t.language=this.wR.lang||"und",t.pre_defined=0,t},e.prototype.FR=function(e){var t=o.ISOBoxer.createFullBox("hdlr",e);switch(t.pre_defined=0,this.wR.type){case"video":t.handler_type="vide";break;case"audio":t.handler_type="soun";break;default:t.handler_type="meta"}return t.name=""+this.wR.id,t.reserved=[0,0,0],t},e.appendVmhdBox=function(e){var t=o.ISOBoxer.createFullBox("vmhd",e);t.flags=1,t.graphicsmode=0,t.opcolor=[0,0,0]},e.appendSmhdBox=function(e){var t=o.ISOBoxer.createFullBox("smhd",e);t.flags=1,t.balance=0,t.reserved=0},e.appendDrefBox=function(e){var t=o.ISOBoxer.createFullBox("dref",e);t.entry_count=1,t.entries=[];var i=o.ISOBoxer.createFullBox("url ",t,!1);i.location="",i.flags=1,t.entries.push(i)},e.prototype.GR=function(e){var t=o.ISOBoxer.createFullBox("stsd",e);switch(t.entries=[],this.wR.type){case"video":case"audio":t.entries.push(this.HR(t))}t.entry_count=t.entries.length},e.prototype.HR=function(e){var t=this.wR.codecs.substring(0,this.wR.codecs.indexOf("."));switch(t){case"avc1":return this.IR(e,t);case"mp4a":return this.KR(e,t);default:throw{name:"Unsupported codec",message:"Unsupported codec",data:{codec:t}}}},e.prototype.IR=function(t,i){var n;if((n=this.vR?o.ISOBoxer.createBox("encv",t,!1):o.ISOBoxer.createBox("avc1",t,!1)).reserved1=[0,0,0,0,0,0],n.data_reference_index=1,n.pre_defined1=0,n.reserved2=0,n.pre_defined2=[0,0,0],n.height=this.wR.height,n.width=this.wR.width,n.horizresolution=72,n.vertresolution=72,n.frame_count=1,n.compressorname=[10,65,86,67,32,67,111,100,105,110,103,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],n.depth=24,n.pre_defined3=65535,n.config=this.JR(),this.vR){var r=o.ISOBoxer.createBox("sinf",n);e.appendOriginalFormatBox(r,i),e.appendSchemeTypeBox(r),this.MR(r)}return n},e.prototype.JR=function(){for(var t,i=15,n=[],r=[],o=0,a=0,s=0,u=this.wR.codecPrivateData.split("00000001").slice(1),c=0;c<u.length;c++)switch(31&(t=e.hexStringtoBuffer(u[c]))[0]){case 7:n.push(t),i+=t.length+2;break;case 8:r.push(t),i+=t.length+2}n.length>0&&(o=n[0][1],s=n[0][2],a=n[0][3]);var l=new Uint8Array(i),d=0;l[d++]=(0xff000000&i)>>24,l[d++]=(0xff0000&i)>>16,l[d++]=(65280&i)>>8,l[d++]=255&i,l.set([97,118,99,67],d),d+=4,l[d++]=1,l[d++]=o,l[d++]=s,l[d++]=a,l[d++]=255,l[d++]=224|n.length;for(var h=0;h<n.length;h++)l[d++]=(65280&n[h].length)>>8,l[d++]=255&n[h].length,l.set(n[h],d),d+=n[h].length;for(l[d++]=r.length,h=0;h<r.length;h++)l[d++]=(65280&r[h].length)>>8,l[d++]=255&r[h].length,l.set(r[h],d),d+=r[h].length;return l},e.prototype.KR=function(t,i){var n;if((n=this.vR?o.ISOBoxer.createBox("enca",t,!1):o.ISOBoxer.createBox("mp4a",t,!1)).reserved1=[0,0,0,0,0,0],n.data_reference_index=1,n.reserved2=[0,0],n.channelcount=this.wR.audioChannels,n.samplesize=16,n.pre_defined=0,n.samplerate=this.wR.audioSamplingRate,n.esds=this.LR(),this.vR){var r=o.ISOBoxer.createBox("sinf",n);e.appendOriginalFormatBox(r,i),e.appendSchemeTypeBox(r),this.MR(r)}return n},e.prototype.LR=function(){var t=e.hexStringtoBuffer(this.wR.codecPrivateData),i=34+t.length,n=new Uint8Array(i),r=0;return n[r++]=(0xff000000&i)>>24,n[r++]=(0xff0000&i)>>16,n[r++]=(65280&i)>>8,n[r++]=255&i,n.set([101,115,100,115],r),r+=4,n.set([0,0,0,0],r),r+=4,n[r++]=3,n[r++]=20+t.length,n[r++]=(65280&this.xR)>>8,n[r++]=255&this.xR,n[r++]=0,n[r++]=4,n[r++]=15+t.length,n[r++]=64,n[r]=20,n[r]|=0,n[r++]|=1,n[r++]=255,n[r++]=255,n[r++]=255,n[r++]=(0xff000000&this.wR.bandwidth)>>24,n[r++]=(0xff0000&this.wR.bandwidth)>>16,n[r++]=(65280&this.wR.bandwidth)>>8,n[r++]=255&this.wR.bandwidth,n[r++]=(0xff000000&this.wR.bandwidth)>>24,n[r++]=(0xff0000&this.wR.bandwidth)>>16,n[r++]=(65280&this.wR.bandwidth)>>8,n[r++]=255&this.wR.bandwidth,n[r++]=5,n[r++]=t.length,n.set(t,r),n},e.appendOriginalFormatBox=function(t,i){o.ISOBoxer.createBox("frma",t).data_format=e.stringToCharCode(i)},e.appendSchemeTypeBox=function(e){var t=o.ISOBoxer.createFullBox("schm",e);t.flags=0,t.version=0,t.scheme_type=0x63656e63,t.scheme_version=65536},e.prototype.MR=function(e){var t=o.ISOBoxer.createBox("schi",e);this.NR(t)},e.appendProtectionSystemSpecificHeaderBoxForPR=function(t,i){var n=o.ISOBoxer.createFullBox("pssh",t),r=e.base64ToArrayBuffer(i);n.flags=0,n.version=0,n.SystemID=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]),n.DataSize=r.length,n.Data=r},e.prototype.NR=function(e){var t=o.ISOBoxer.createFullBox("tenc",e);t.flags=0,t.version=0,t.default_IsEncrypted=1,t.default_IV_size=8,t.default_KID=this.vR?this.vR[0].kid:s},e.prototype.OR=function(e){var t=o.ISOBoxer.createFullBox("trex",e);t.track_ID=this.xR,t.default_sample_description_index=1,t.default_sample_duration=0,t.default_sample_size=0,t.default_sample_flags=0},e.base64ToArrayBuffer=function(e){for(var t=window.atob(e),i=t.length,n=new Uint8Array(i),r=0;r<i;r++)n[r]=t.charCodeAt(r);return n},e.hexStringtoBuffer=function(e){var t,i=new Uint8Array(e.length/2);for(t=0;t<e.length/2;t+=1)i[t]=parseInt(""+e[2*t]+e[2*t+1],16);return i},e.stringToCharCode=function(e){var t,i=0;for(t=0;t<e.length;t+=1)i|=e.charCodeAt(t)<<8*(e.length-t-1);return i},e}()},22981:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SmoothModuleDefinition=void 0;var n=i(62756);t.SmoothModuleDefinition={name:n.ModuleName.Smooth,module:function(){return{SmoothStreamingLoader:i(27955).A,createSmoothSegmentTemplateMPDHandler:i(77674).createSmoothSegmentTemplateMPDHandler}},dependencies:[n.ModuleName.EngineBitmovin,n.ModuleName.DASH]},t.default=t.SmoothModuleDefinition},77674:function(e,t,i){"use strict";var n=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(t,i)};return function(t,i){if("function"!=typeof i&&null!==i)throw TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.createSmoothSegmentTemplateMPDHandler=function(){var e;return(e=function(t){function i(i,n,r){var o=t.call(this,i)||this;return o.Js=void 0,o.Is=n,o.Ls=r,o.Ms=e.trackIDs[n],e.trackIDs[n]=Math.max(e.trackIDs.audioMp4,e.trackIDs.videoMp4)+1,s.ISOBoxer.addBoxProcessor("uuid",u.uuidProcessor),s.ISOBoxer.addBoxProcessor("saio",u.saioProcessor),s.ISOBoxer.addBoxProcessor("saiz",u.saizProcessor),s.ISOBoxer.addBoxProcessor("senc",u.sencProcessor),o}return n(i,t),i.prototype.checkIfSegmentAvailable=function(e){return!0},i.prototype.isExpectedSegmentPlaybackTimeExceedingPeriodDuration=function(e){return!1},i.prototype.generateSmoothInitSegment=function(e,t){if(this.Ns(e),this.currentRepresentationId&&!this.currentRepresentationId.equals(this.Js)){this.Js=this.currentRepresentationId;var i=this.manifestService.findAdaptationSet(this.manifestService.getFirstPeriod()._id,this.Is),n=s.ISOBoxer.parseBuffer(e.getData());e.setParsedData(n);var u=r.ModuleManager.get(o.ModuleName.ContainerMP4).getTrackId(this.context.logger,n),c=this.manifestService.getRepresentationById(this.currentRepresentationId),l=this.Ls.createInitSegmentForRepresentation(c,i,u),d=l[0],h=l[1],p=new a.Segment(h,this.Is,e.getCodec(),e.getPeriodId(),null,a.SegmentInitType.INIT,!0,-1,e.getRepresentationId());p.setParsedData(d),p.setUrl(c.BaseURL[0].url),p.setLastSegment(!1),e.getSegmentInfo()&&p.setSegmentInfo({internalRepresentationId:e.getSegmentInfo().internalRepresentationId,representationId:e.getSegmentInfo().representationId}),null==t||t.parseSegment(p),this.Ks=p}e.setInitSegment(this.Ks)},i.prototype.Ns=function(e){e&&!e.isInit()&&this.rewriteDataSegmentBoxes(e)},i.prototype.rewriteDataSegmentBoxes=function(t){var i=s.ISOBoxer.parseBuffer(t.getData()),n=i.fetch("tfhd"),r=this.manifestService.getAdaptationSetIndex(t.getRepresentationId())+1;r>0?this.Ms=r:this.Ms<1&&(this.Ms=1),n.track_ID=this.Ms;var o=i.fetch("tfdt"),a=i.fetch("traf");null===o&&((o=s.ISOBoxer.createFullBox("tfdt",a,n)).version=1,o.flags=0,o.baseMediaDecodeTime=Math.floor(t.getSegmentInfo().mediaPresentationTime));var u=i.fetch("trun"),c=i.fetch("tfxd");c&&(c._parent.boxes.splice(c._parent.boxes.indexOf(c),1),c=null);var l=i.fetch("sepiff");if(null!==l){l.type="senc",l.usertype=void 0;var d=i.fetch("saio");if(null===d){(d=s.ISOBoxer.createFullBox("saio",a)).version=0,d.flags=0,d.entry_count=1,d.offset=[0];var h=s.ISOBoxer.createFullBox("saiz",a);if(h.version=0,h.flags=0,h.sample_count=l.sample_count,h.default_sample_info_size=0,h.sample_info_size=[],2&l.flags)for(var p=0;p<l.sample_count;p+=1)h.sample_info_size[p]=10+6*l.entry[p].NumberOfEntries;else h.default_sample_info_size=8}}n.flags&=0xfffffe,n.flags|=131072,u.flags|=1;var f=i.fetch("moof");u.data_offset=f.getLength()+8;var g=i.fetch("saio");if(null!==g){var m=e.getBoxOffset(f,"traf"),y=e.getBoxOffset(a,"senc");g.offset[0]=m+y+16}t.setData(i.write()),t.setParsedData(s.ISOBoxer.parseBuffer(t.getData()))},i.getBoxOffset=function(e,t){for(var i=8,n=0;n<e.boxes.length&&e.boxes[n].type!==t;n++)i+=e.boxes[n].size;return i},i.prototype.dispose=function(){t.prototype.dispose.call(this),this.Ls=null},i}(r.ModuleManager.get(o.ModuleName.DASH).SegmentTimelineMPDHandler)).trackIDs={videoMp4:2,audioMp4:1},e};var r=i(88052),o=i(62756),a=i(87187),s=i(96725),u=i(16580)},27955:function(e,t,i){"use strict";t.A=void 0;var n=i(40306),r=i(3336),o=i(25926),a=i(4224),s=i(80813),u=i(3714),c=i(4129),l=i(85625),d=i(77401),h=i(57456),p=i(29669),f=i(91678),g=i(33436),m=i(88052),y=i(62756),v=i(20508),S=i(72635),b=i(28574);t.A=function(){function e(e,t){var i=this;this.Bs=!1,this.Cs=function(e,t){if((null==t?void 0:t.name)!==d.RequestError.Canceled){var o=new r.PlayerError(n.ErrorCode.SOURCE_COULD_NOT_LOAD_MANIFEST,{sourceUrl:e.url,statusCode:e.status},"Failed to load the manifest: ".concat(e.status," ").concat(e.statusText,"."),i.kr.sourceIdentifier);0===e.status&&(o=t&&t.name===d.RequestError.TimedOut?new r.PlayerError(n.ErrorCode.NETWORK_MANIFEST_DOWNLOAD_TIMEOUT,{sourceUrl:e.url},"Failed to load the manifest: the request timed out.",i.kr.sourceIdentifier):new r.PlayerError(n.ErrorCode.SOURCE_COULD_NOT_LOAD_MANIFEST,{url:e.url,statusCode:e.status,statusText:e.statusText},"Failed to load the smooth manifest due to CORS restrictions or because the client is offline.",i.kr.sourceIdentifier)),i.jr.eventHandler.fireError(o)}},this.load=function(e){return i.lr=e||i.lr,i.lr?i.Ds(i.lr).then(i.Es).catch(function(e){return(null==e?void 0:e.message)===d.RequestError.Canceled?Promise.reject():(i.jr.logger.debug("Error while loading smooth manifest",e),Promise.reject(e))}):(i.jr.eventHandler.fireError(new r.PlayerError(n.ErrorCode.SOURCE_INVALID,void 0,"Cannot load the manifest: no URL was provided.",i.kr.sourceIdentifier)),Promise.reject("No manifest url provided"))},this.Es=function(e){if(!i.mr)return null;if((0,h.isDownloadTimeInformationValid)(e)&&i.jr.store.dispatch((0,f.addMetricsValue)("default",g.MetricType.DownloadInformation,{bytes:e.length,time:e.elapsedTime,timeToFirstByte:e.timeToFirstByte})),null===e.body||e.length<1)return i.jr.eventHandler.fireError(new r.PlayerError(n.ErrorCode.SOURCE_MANIFEST_INVALID,void 0,"The downloaded manifest was empty and could not be parsed.",i.kr.sourceIdentifier)),null;i.lr=e.url;var t,o=e.body?i.Fs(e.body):null;return o?("dynamic"===o._type?!0!==(null==(t=i.nr)?void 0:t.INFINITE_RETRIES_FOR_LIVE)||i.Bs||(i.mr.setResetRetriesWhenOffline(!0),i.Bs=!0):i.jr.serviceManager.maybeCall(s.ServiceName.ManifestCachingService,function(t){return t.cacheHttpResponse(e,e.url)}),o):null},this.jr=e,this.kr=t,this.nr=e.settings,this.mr=new c.DefaultContentLoader(e,{requestType:p.HttpRequestType.MANIFEST_SMOOTH,onFailure:this.Cs,maxRetries:this.nr.MAX_MPD_RETRIES,retryDelay:this.nr.MPD_RETRY_DELAY,resetRetriesWhenOffline:!1}),this.As=m.ModuleManager.get(y.ModuleName.XML).parseXML}return e.prototype.dispose=function(){var e;this.ys&&this.ys.dispose(),this.ys=null,this.zs&&this.zs.dispose(),this.zs=null,this.nr=null,null==(e=this.mr)||e.cancel(),this.mr=null,this.Bs=!1},e.prototype.Ds=function(e){var t,i=this.jr.serviceManager.maybeCall(s.ServiceName.ManifestCachingService,function(t){return t.getHttpResponse(e)});if(i)return Promise.resolve(i);var n=null==(t=this.kr.source.options)?void 0:t.manifestWithCredentials;return this.mr.load(e,p.HttpRequestMethod.GET,null,null,null,n,l.ManifestMimeType.Smooth)},e.prototype.Fs=function(e){var t;try{if(null===e)throw"input must not be null";var i=this.As(e,{decodeEntities:!0});if(!1===i.success)throw Error("manifest parsing failed");t=i.parsed}catch(e){return void this.jr.eventHandler.fireError(new r.PlayerError(n.ErrorCode.SOURCE_MANIFEST_INVALID,void 0,"The Smooth manifest XML could not be parsed.",this.kr.sourceIdentifier))}if(this.Gs(t)){this.ys?this.ys.updateManifest(t,this.lr):this.ys=new S.SmoothStreamingParser(this.jr,t,this.lr);var o=this.ys.getParsedManifest();return this.zs?this.zs.updateManifest(o,Date.now()):this.zs=new b.SmoothToMpdConverter(this.jr,o,Date.now()),this.zs.getDASHManifest()}},e.prototype.createInitSegmentForRepresentation=function(e,t,i){if(!e)return this.jr.logger.debug("Cannot create init segment for undefined representation."),void this.jr.eventHandler.dispatchEvent(u.PlayerEvent.Warning,new o.PlayerWarning(a.WarningCode.SOURCE_SMOOTH_REPRESENTATION_MISSING));if(this.ys){var s=this.ys.getParsedManifest(),c=s.clips[Number(e._internalId.periodId)].streamIndexes.find(function(t){return 0===e._id.indexOf(t.name)});if(!c)return this.jr.logger.log("Cannot generate InitSegment, unable to find smooth StreamIndex for: ",e),this.jr.eventHandler.fireError(new r.PlayerError(n.ErrorCode.SOURCE_MANIFEST_INVALID,null,"Unable to generate an InitSegment because StreamIndex disappeared",this.jr.sourceContext.sourceIdentifier)),null;var l=c.qualityInformation.find(function(t){return t.bitrate===e._bandwidth});if(!l)return this.jr.logger.log("Cannot generate InitSegment, unable to find smooth QualityInfo for: ",e),this.jr.eventHandler.fireError(new r.PlayerError(n.ErrorCode.SOURCE_MANIFEST_INVALID,null,"Unable to generate InitSegment because QualityInformation disappeared",this.jr.sourceContext.sourceIdentifier)),null;var d={type:c.type,timescale:c.timeScale||s.timeScale||S.DEFAULT_TIMESCALE_FACTOR,trackId:i,codecPrivateData:l.codecPrivateData,lang:c.language,bandwidth:l.bitrate,codecs:e._codecs,id:e._id,internalRepresentationId:e._internalId,periodDuration:s.duration};if("video"===c.type){var h=l;d.width=h.maxWidth,d.height=h.maxHeight}else if("audio"===c.type){var p=l;d.audioChannels=p.noChannels,d.audioSamplingRate=p.samplingRate}var f=new v.InitSegmentGenerator(this.jr,d,s.protection);return[f.getParsedData(),f.generateArrayBuffer()]}this.jr.eventHandler.dispatchEvent(u.PlayerEvent.Warning,new o.PlayerWarning(a.WarningCode.SOURCE_SMOOTH_INVALID_INIT_DATA))},e.prototype.Gs=function(e){return!(!e||!e.hasOwnProperty("SmoothStreamingMedia")&&!e.SmoothStreamingMedia)||(this.jr.eventHandler.fireError(new r.PlayerError(n.ErrorCode.SOURCE_MANIFEST_INVALID,{reason:"Root element is not SmoothStreamingMedia"},"The downloaded manifest is not a valid Smooth Streaming manifest.",this.jr.sourceContext.sourceIdentifier)),!1)},e.prototype.updateRepresentation=function(e){return Promise.resolve(e)},e.prototype.stopRepresentationUpdate=function(e){return Promise.resolve()},e}()},72635:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SmoothStreamingParser=t.DEFAULT_TIMESCALE_FACTOR=void 0;var n=i(40306),r=i(3336),o=i(25926),a=i(4224),s=i(3714),u=i(58313);t.DEFAULT_TIMESCALE_FACTOR=1e7;var c=function(){function e(e,i,n){this.QR=t.DEFAULT_TIMESCALE_FACTOR,this.PR=e,this.updateManifest(i,n)}return e.prototype.getParsedManifest=function(){return this.TR||this.VR(),this.RR},e.prototype.updateManifest=function(e,t){this.SR=e,this.UR=t,this.TR=!1,this.RR=null},e.prototype.VR=function(){var e=this;this.RR=this.XR(this.SR.SmoothStreamingMedia),this.WR(),this.RR.startTime=1/0,this.RR.duration=0,this.SR.SmoothStreamingMedia.Clip.forEach(function(t){var i=t.StreamIndex;Array.isArray(i)||(i=[i]);var n=-1,r=1/0;i.forEach(function(i){var o=e.parseStreamIndex(i,t);o&&(o.totalTime>n&&(n=o.totalTime),o.startTime<r&&(r=o.startTime))}),-1===t.ClipBegin&&(t.ClipBegin=r*e.QR,t.ClipEnd=(r+n)*e.QR),e.RR.startTime=Math.min(e.RR.startTime,r),e.RR.duration+=n,e.RR.clips.push(t)}),this.YR(this.SR.SmoothStreamingMedia)},e.prototype.WR=function(){if(this.SR.SmoothStreamingMedia.Clip)Array.isArray(this.SR.SmoothStreamingMedia.Clip)||(this.SR.SmoothStreamingMedia.Clip=[this.SR.SmoothStreamingMedia.Clip]);else{var e={_ClipBegin:-1,_ClipEnd:-1,_Url:this.UR,streamIndexes:[],StreamIndex:this.SR.SmoothStreamingMedia.StreamIndex};this.SR.SmoothStreamingMedia.Clip=[e],delete this.SR.SmoothStreamingMedia.StreamIndex}this.SR.SmoothStreamingMedia.Clip.forEach(function(e){e.streamIndexes=e.streamIndexes||[],e.ClipBegin=Number(e._ClipBegin),e.ClipEnd=Number(e._ClipEnd),e.Url=String(e._Url)})},e.prototype.XR=function(i){var n={lookaheadCount:i._LookaheadCount,dvrWindowLength:Number(i._DVRWindowLength)||0,location:this.UR,duration:-1,startTime:-1,timeScale:Number(i._TimeScale||t.DEFAULT_TIMESCALE_FACTOR),isLive:e.parseBoolean(i._IsLive,!1),canPause:e.parseBoolean(i._CanPause,!0),canSeek:e.parseBoolean(i._CanSeek,!0),minorVersion:Number(i._MinorVersion)||2,majorVersion:Number(i._MajorVersion)||2,clips:[]};return this.QR=n.timeScale,n.isLive?n.dvrWindowLength=n.dvrWindowLength/this.QR:n.dvrWindowLength=0,this.TR=!0,n},e.prototype.YR=function(e){if(e.Protection&&e.Protection.ProtectionHeader){var t=e.Protection.ProtectionHeader;Array.isArray(t)||(t=[t]),this.RR.protection=t.map(function(e){return{systemId:e.SystemID,content:e.__text}})}},e.prototype.parseStreamIndex=function(e,t){var i=this.ZR(e,t.Url);return 0===(i=this.dR(e,i)).qualityInformation.length?(this.PR.eventHandler.dispatchEvent(s.PlayerEvent.Warning,new o.PlayerWarning(a.WarningCode.SOURCE_SMOOTH_EMPTY_QUALITY_LEVEL,"StreamIndex does not contain any QualityLevel, will be filtered out")),null):(t.streamIndexes.push(i),i)},e.prototype.ZR=function(t,i){var n={name:t._Name||"unnamed"+e.unnamedStreamIndexCounter++,parentStream:t._ParentStream,numberOfChunks:Number(t._Chunks),timeScale:Number(t._TimeScale||t._StreamTimeScale||this.QR),type:t._Type,templateUrl:this.aR(t._Url,i),totalTime:0,startTime:0,fragmentInfos:[]};return t._Subtype&&""!==t._Subtype&&(n.subType=t._Subtype),t._Language&&(n.language=t._Language),e.parseCustomAttributes(t,n),this.bR(t,n),n},e.prototype.aR=function(e,t){return u.URLHelper.isUrlAbsolute(e)?e:u.URLHelper.removeLastPathPart(t)+e},e.parseCustomAttributes=function(e,t){if(e&&e.CustomAttributes){t.customAttributes||(t.customAttributes={});var i=e.CustomAttributes;Array.isArray(i)||(i=[i]),i.forEach(function(e){Object.keys(e).forEach(function(i){t.customAttributes[i]=e[i]})})}},e.prototype.bR=function(e,t){if(e&&e.c&&!(e.c.length<1)){for(var i=[].concat(e.c),o=t.timeScale||this.QR,a=0,s=0,u=0,c=0;c<i.length;c++){var l=i[c],d=1;l._r&&(d=Number(l._r));for(var h=Number(l._t||a),p=0,f=1;f<=d;f++){var g=l._d,m={duration:g=g?Number(g):this.cR(c,i,a)/d,startTime:h+p,index:u};t.fragmentInfos.push(m),0===c&&1===f&&(t.startTime=a,a=h),p+=g,s+=g,a+=g,u++}}t.totalTime=s/o}else this.PR.eventHandler.fireError(new r.PlayerError(n.ErrorCode.SOURCE_MANIFEST_INVALID,void 0,"StreamIndex must contain StreamFragmentElements",this.PR.sourceContext.sourceIdentifier))},e.prototype.cR=function(e,t,i){var o,a=t[e]._t||i;if(e+1<t.length){var s=t[e+1];a&&s._t&&(o=Number(s._t)-Number(a))}if(e>0&&e-1>0){var u=t[e-1];if(a&&u._t){var c=Number(a)-Number(u._t);o?c!==o&&this.PR.logger.debug("To avoid gaps in the timeline returning calculated duration of: "+"".concat(o," instead of: ").concat(c," for fragment at startTime: ").concat(a)):o=Number(a)-Number(u._t)}}if(o)return o;this.PR.eventHandler.fireError(new r.PlayerError(n.ErrorCode.SOURCE_MANIFEST_INVALID,void 0,"Unable to calculate missing FragmentDuration",this.PR.sourceContext.sourceIdentifier))},e.prototype.dR=function(t,i){var n=this,r=t.QualityLevel;Array.isArray(r)||(r=[r]);var u=i;return u.qualityInformation=r.map(function(t){var r;if("video"===i.type)r=e.parseVideoQualityInformation(t);else if("audio"===i.type){var u=e.parseAudioQualityInformation(t);r=e.validateAudioQualityInformation(u)}else{if("text"!==i.type)return n.PR.eventHandler.dispatchEvent(s.PlayerEvent.Warning,new o.PlayerWarning(a.WarningCode.SOURCE_SMOOTH_UNKNOWN_STREAM_INDEX_TYPE,'Unknown StreamIndex.type: "'.concat(i.type,'", it will be ignored'))),null;r=e.parseTextQualityInformation(t)}return e.parseCustomAttributes(t,r),r}).filter(function(e){return null!=e}),u},e.parseVideoQualityInformation=function(e){return{codec:e._FourCC,codecPrivateData:e._CodecPrivateData,maxHeight:parseInt(e._MaxHeight),maxWidth:parseInt(e._MaxWidth),bitrate:parseInt(e._Bitrate),index:parseInt(e._Index)}},e.parseAudioQualityInformation=function(e){return{codec:e._FourCC,codecPrivateData:e._CodecPrivateData,bitrate:parseInt(e._Bitrate),index:parseInt(e._Index),noChannels:parseInt(e._Channels),samplingRate:parseInt(e._SamplingRate,10),audioTag:parseInt(e._AudioTag)}},e.parseTextQualityInformation=function(e){return{codec:e._FourCC,codecPrivateData:e._CodecPrivateData,bitrate:parseInt(e._Bitrate),index:parseInt(e._Index)}},e.validateAudioQualityInformation=function(t){if(null!==t.codecPrivateData&&""!==t.codecPrivateData)return t;var i,n=e.SAMPLING_FREQUENCY_INDEXES[String(t.samplingRate)];if("AACH"===t.codec){var r=5,o=new Uint8Array(4),a=e.SAMPLING_FREQUENCY_INDEXES[2*t.samplingRate];o[0]=r<<3|n>>1,o[1]=n<<7|t.noChannels<<3|a>>1,o[2]=a<<7|8,o[3]=0,(s=new Uint16Array(2))[0]=(o[0]<<8)+o[1],s[1]=(o[2]<<8)+o[3],i=s[0].toString(16)+s[1].toString(16)}else{var s,u=new Uint8Array(2);r=2,u[0]=r<<3|n>>1,u[1]=n<<7|t.noChannels<<3,(s=new Uint16Array(1))[0]=(u[0]<<8)+u[1],i=s[0].toString(16)}var c=""+i;return t.codecPrivateData=c=c.toUpperCase(),t},e.parseBoolean=function(e,t){return void 0===e&&(e=null),void 0===t&&(t=!1),e?"string"==typeof e?"true"===e.toLowerCase():!!e:t},e.prototype.dispose=function(){this.RR=null,this.SR=null},e.unnamedStreamIndexCounter=0,e.SAMPLING_FREQUENCY_INDEXES={96e3:0,88200:1,64e3:2,48e3:3,44100:4,32e3:5,24e3:6,22050:7,16e3:8,12e3:9,11025:10,8e3:11,7350:12},e}();t.SmoothStreamingParser=c},28574:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SmoothToMpdConverter=void 0;var n=i(40306),r=i(3336),o=i(25926),a=i(4224),s=i(3714),u=i(89927),c=i(47151),l=i(92778),d=i(79505);t.SmoothToMpdConverter=function(){function e(e,t,i){this.eR=e,this.iR=e.eventHandler,this.updateManifest(t,i)}return e.prototype.getDASHManifest=function(){return this.hR||this.zS(),this.gR},e.prototype.updateManifest=function(e,t){this.hR=!1,this.gR=null,this.fR=e,this.jR=1,this.kR={format:"smooth"},this.lR=!1,this.mR=t,this.nR={}},e.prototype.zS=function(){var t=this;(this.fR.canPause||this.fR.canSeek)&&(this.lR=!0),this.gR={"_xmlns:xsi":"http://www.w3.org/2001/XMLSchema-instance",_xmlns:"urn:mpeg:dash:schema:mpd:2011","_xmlns:xlink":"http://www.w3.org/1999/xlink","_xsi:schemaLocation":"urn:mpeg:DASH:schema:MPD:2011 http://standards.iso.org/ittf/PubliclyAvailableStandards/MPEG-DASH_schema_files/DASH-MPD.xsd",_profiles:"urn:mpeg:dash:profile:isoff-live:2011",_type:this.fR.isLive?"dynamic":"static",_minimumUpdatePeriod:this.fR.isLive?"PT4S":null,_mediaPresentationDuration:e.convertDurationToSeconds(Number(this.fR.duration)),_timeShiftBufferDepth:-this.fR.dvrWindowLength,_requestTimestamp:this.mR,originalFormat:this.kR,Location:[this.fR.location],Period:[],isInitialized:!1},this.fR.clips.forEach(function(e,i){var n=t.BS(e,i);t.gR.Period.push(n),t.fR.isLive&&(t.gR._availabilityStartTime=t.yS||new Date(t.mR-(0,u.toMilliSeconds)(t.fR.dvrWindowLength)).toISOString(),t.lR=!1),t.lR&&t.AS(n),t.jR=1}),this.fR.isLive&&(this.yS=this.gR._availabilityStartTime),this.hR=!0},e.prototype.AS=function(e){var t=this,i=this.nR[Number(e._id)];0!==i.audio&&0!==i.video&&e.AdaptationSet.forEach(function(e){var n=i.video;if(i[e._contentType]!==n){var r=i[e._contentType],o=(r-n)/t.fR.timeScale;t.eR.logger.debug("Updating the presentation time offset of ".concat(e._contentType," ")+"from: ".concat(r," to ").concat(n,". Difference: ").concat(o,"s"))}e.SegmentTemplate[0]._presentationTimeOffset=n})},e.convertDurationToSeconds=function(e){return"PT"+e+"S"},e.prototype.BS=function(t,i){var n=this,r=[];t.streamIndexes.forEach(function(e){r.push(n.CS(e,i))});var o=t.ClipBegin/this.fR.timeScale,a=t.ClipEnd/this.fR.timeScale-o,s=0;return this.gR.Period.forEach(function(e){s+=e.duration}),{_id:String(i),_start:e.convertDurationToSeconds(s),start:s,_duration:e.convertDurationToSeconds(a),duration:a,AdaptationSet:r}},e.prototype.CS=function(t,i){var n,r,o,a=this,s=t.type,u=1/0,d=0,h=[],p=new c.AdaptationSetId(String(i),String(this.jR));t.qualityInformation&&t.qualityInformation.length>0?("text"===(s+=e.buildMimeTypeSuffix(t.qualityInformation[0]))&&(s="application/mp4"),t.qualityInformation.forEach(function(e){var i=a.DS(t,e,s,p);u>e.bitrate&&(u=e.bitrate),d<e.bitrate&&(d=e.bitrate),e.maxHeight&&(r=e.maxHeight),e.maxWidth&&(n=e.maxWidth),e.samplingRate&&(i._audioSamplingRate=e.samplingRate),e.noChannels&&(o=e.noChannels),h.push(i)})):(u=0,d=1/0),h.sort(function(e,t){return e._bandwidth-t._bandwidth});var f=[this.GS(t,i)],g={_id:String(this.jR),_internalId:p,_group:String(this.jR++),_contentType:t.type,_mimeType:s,_minBandwidth:u,_maxBandwidth:d,_periodId:String(i),_codecs:"",Representation:h,SegmentTemplate:f};return h.forEach(function(e){return e.SegmentTemplate=g.SegmentTemplate}),t.language&&(g._lang=t.language),n&&(g._maxWidth=n),r&&(g._maxHeight=r),o&&h.forEach(function(e){return e.AudioChannelConfiguration=[{_schemeIdUri:l.DashSchemeUri.AudioChannelConfig,_value:"".concat(o)}]}),g},e.buildMimeTypeSuffix=function(e){switch(e.codec){case"TEXT":case"TTML":return"";default:return"/mp4"}},e.prototype.DS=function(e,t,i,n){var r=[{url:this.HS(e.templateUrl)}],o=new d.RepresentationId(n,e.name+"_"+t.bitrate),a={_id:o.representationId,_internalId:o,_requestTimestamp:null,_bandwidth:t.bitrate,_mimeType:i,Uri:r[0].url,_codecs:this.ES(t.codec,t.codecPrivateData),BaseURL:r};return t.maxHeight&&(a._height=t.maxHeight),t.maxWidth&&(a._width=t.maxWidth),a},e.prototype.ES=function(t,i){return i=i?i.toString():"","H264"===t||"AVC1"===t?this.FS(i):t.indexOf("AAC")>-1?e.getAACCodec(t,i):"TEXT"===t||"TTML"===t?"stpp":(this.eR.logger.debug("Unknown codec while converting Smooth Manifest: "+t),this.iR.dispatchEvent(s.PlayerEvent.Warning,new o.PlayerWarning(a.WarningCode.SOURCE_CODEC_OR_FILE_FORMAT_NOT_SUPPORTED)),t)},e.prototype.FS=function(e){var t=/00000001[0-9]7/.exec(e);if(t&&t.length>0){var i=e.indexOf(t[0])+10;return"avc1."+e.substring(i,i+6)}return this.eR.logger.debug("Unable to parse H264-codec information from codecPr
1ivateData: "+e),this.eR.eventHandler.fireError(new r.PlayerError(n.ErrorCode.SOURCE_INVALID_H264_CODEC,{codec:"h264",codecPrivateData:e},"Unable to parse H264-codec information from codecPrivateData.",this.eR.sourceContext.sourceIdentifier)),null},e.getAACCodec=function(e,t){return"mp4a.40."+("AACH"===e?5:void 0===t||""===t?2:(248&parseInt(t.substring(0,2),16))>>3)},e.prototype.GS=function(e,t){var i=this.HS(e.templateUrl),n=e.timeScale||this.fR.timeScale||1e4,r=this.IS(e,t,n);return{_timescale:String(n),_media:i,SegmentTimeline:[r]}},e.prototype.HS=function(e){return e.indexOf("{start_time}")>-1&&(this.lR=!0),e.replace("{bitrate}","$Bandwidth$").replace("{start time}","$Time$").replace("{start_time}","$Time$")},e.prototype.IS=function(e,t,i){var n=[];return e.fragmentInfos&&e.fragmentInfos.length>0&&(this.nR[t]||(this.nR[t]={}),this.nR[t][e.type]=e.fragmentInfos[0].startTime,n=e.fragmentInfos.map(function(e){return{_t:String(e.startTime),_d:String(e.duration),_n:e.index}})),{S:n,totalDuration:n.reduce(function(e,t){var i;return e+Number(t._d)*(Number(null!=(i=t._r)?i:"0")+1)},0)/i}},e.prototype.dispose=function(){this.iR=null,this.fR=null},e}()},16580:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.saioProcessor=function(){this._procFullBox(),1&this.flags&&(this._procField("aux_info_type","uint",32),this._procField("aux_info_type_parameter","uint",32)),this._procField("entry_count","uint",32),this._procFieldArray("offset",this.entry_count,"uint",1===this.version?64:32)},t.saizProcessor=function(){this._procFullBox(),1&this.flags&&(this._procField("aux_info_type","uint",32),this._procField("aux_info_type_parameter","uint",32)),this._procField("default_sample_info_size","uint",8),this._procField("sample_count","uint",32),0===this.default_sample_info_size&&this._procFieldArray("sample_info_size",this.sample_count,"uint",8)},t.sencProcessor=r,t.uuidProcessor=function(){n.ArrayHelper.comparePrimitiveArrays(this.usertype,[109,29,155,5,66,213,68,230,128,226,20,29,175,247,87,178])&&(this._procFullBox(),this._parsing&&(this.type="tfxd"),this._procField("fragment_absolute_time","uint",1===this.version?64:32),this._procField("fragment_duration","uint",1===this.version?64:32)),n.ArrayHelper.comparePrimitiveArrays(this.usertype,[212,128,126,242,202,57,70,149,142,84,38,203,158,70,167,159])&&(this._procFullBox(),this._parsing&&(this.type="tfrf"),this._procField("fragment_count","uint",8),this._procEntries("entry",this.fragment_count,function(e){this._procEntryField(e,"fragment_absolute_time","uint",1===this.version?64:32),this._procEntryField(e,"fragment_duration","uint",1===this.version?64:32)})),n.ArrayHelper.comparePrimitiveArrays(this.usertype,[162,57,79,82,90,155,79,20,162,68,108,66,124,100,141,244])&&(this._parsing&&(this.type="sepiff"),r.call(this))},t.avccProcessor=function(){this._procField("configuration_version","uint",8),this._procField("avc_profile_indication","uint",8),this._procField("profile_compatibility","uint",8),this._procField("avc_level_indication","uint",8),this._parsing||(this.temp1=this.complete_representation<<7|this.length_size_minus_one),this._procField("temp1","uint",8),this._parsing&&(this.complete_representation=this.temp1>>>7&1,this.length_size_minus_one=3&this.temp1),this._parsing||(this.num_sps&=31),this._procField("num_sps","uint",8),this._parsing&&(this.num_sps&=31),this._procEntries("sps",this.num_sps,function(e){this._procEntryField(e,"length","uint",16),this._procEntryField(e,"data","data",e.length)}),this._parsing||(this.num_pps&=31),this._procField("num_pps","uint",8),this._parsing&&(this.num_pps&=31),this._procEntries("pps",this.num_pps,function(e){this._procEntryField(e,"length","uint",16),this._procEntryField(e,"data","data",e.length)})},t.esdsProcessor=function(){this._procFullBox(),this._procField("reserved","uint",16),this._procField("esId","uint",16),this._procField("streamPriority","uint",8),this.streamPriority&=31,this._procField("reserved2","uint",16),this._procField("decoderConfig","data",17)};var n=i(74853);function r(){this._procFullBox(),this._procField("sample_count","uint",32),1&this.flags&&this._procField("IV_size","uint",8),this._procEntries("entry",this.sample_count,function(e){this._procEntryField(e,"InitializationVector","data",8),2&this.flags&&(this._procEntryField(e,"NumberOfEntries","uint",16),this._procSubEntries(e,"clearAndCryptedData",e.NumberOfEntries,function(e){this._procEntryField(e,"BytesOfClearData","uint",16),this._procEntryField(e,"BytesOfEncryptedData","uint",32)}))})}}},function(e){return e(e.s=22981)}])},322:function(e){"use strict";self,e.exports=(self.webpackChunkbitmovin_player=self.webpackChunkbitmovin_player||[]).push([[314],{89462:function(e,t){Object.defineProperty(t,"__esMo
1dule",{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;\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,i){var n=this;this.G9=e,this.I9=t,this.J9=i,this.K9=!1,this.H9=new Image,this.H9.onload=function(){n.K9=!0,n.I9&&n.I9(n.G9)},this.H9.onerror=function(){n.J9&&n.J9(n.G9)},this.H9.src=e}return e.prototype.abort=function(){null!==this.H9&&(this.H9.src="",this.H9.onload=null,this.H9.onerror=null),this.H9=null,this.I9=null,this.J9=null},e.prototype.isLoaded=function(){return this.K9},e.prototype.getUrl=function(){return this.G9},e}()}
vendor: 51,345 bytes, line 1
1,920:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.StyleModuleDefinition=void 0;var n=i(62756),r=i(76133);t.StyleModuleDefinition={name:n.ModuleName.Style,module:{StyleManager:r.StyleManager}},t.default=t.StyleModuleDefinition},80285:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.PosterManager=void 0;var n=i(45202),r=i(3714),o=i(17432);t.PosterManager=function(){function e(t,i,o){var a=this;this.UT=function(e){(e.type===r.PlayerEvent.TimeChanged&&e.time>0||e.type===r.PlayerEvent.AdStarted)&&(a.RT.off(r.PlayerEvent.TimeChanged,a.UT),a.RT.off(r.PlayerEvent.AdStarted,a.UT),a.WT())},this.PT=t,this.QT=i,this.RT=o,this.ST=document.createElement("div"),this.ST.setAttribute("class",n.Environment.idPrefix+e.POSTER_CLASS),this.PT.appendChild(this.ST)}return e.prototype.getPosterElement=function(){return this.ST},e.prototype.setPosterImage=function(e,t){var i=this;"string"==typeof e&&""!==e&&(this.TT&&this.TT.abort(),this.WT(),this.TT=new o.ImagePreloader(e,function(e){i.ST.style.backgroundImage="url("+e+")",i.VT(t)}),t||(this.RT.on(r.PlayerEvent.TimeChanged,this.UT),this.RT.on(r.PlayerEvent.AdStarted,this.UT)))},e.prototype.removePosterImage=function(){this.TT&&this.TT.abort(),this.ST.style.backgroundImage="none",this.WT()},e.prototype.VT=function(e){this.QT.isPlaying()&&!e||(this.ST.style.display="block")},e.prototype.WT=function(){this.ST.style.display="none"},e.prototype.dispose=function(){this.TT&&this.TT.abort(),this.RT.off(r.PlayerEvent.TimeChanged,this.UT),this.RT.off(r.PlayerEvent.AdStarted,this.UT),this.PT.removeChild(this.ST)},e.POSTER_CLASS="poster",e}()},76133:function(e,t,i){var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])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=i(45202),o=i(3714),a=i(70850),s=i(89462),u=i(80285),c=i(16334),l=i(3865),d=16/9,h="video-player-style";function p(e){var t=e.configuration.style(),i=t.width,n=t.height,r=t.aspectratio;return null==i&&null==n&&null==r?{width:i,height:n,aspectratio:d}:{width:i,height:n,aspectratio:r}}t.StyleManager=function(){function e(e,t){var i=this;this.ou=function(e,t){i.du.eventHandler.dispatchEvent(o.PlayerEvent.VisibilityChanged,{isVisible:e,percentVisible:t})},this.du=t,this.eu=t.container,this.fu=this.eu.id||String(Math.round(1e7*Math.random())),this.gu=[];var n=r.Environment.idPrefix+""+t.playerConfig.prefix+"container";this.mu(n),this.hu=new u.PosterManager(t.container,e,t.eventHandler),this.ju=d,this.pu(),this.ku()}return e.prototype.ku=function(){var e=this.lu();if(e&&!(e.getElementsByClassName(h).length>0)){var t=document.createElement("style");t.className=h,t.setAttribute("type","text/css"),t.innerHTML=s.baselineCss,e.appendChild(t)}},e.prototype.lu=function(){var e=this.du.configuration.style();return e.container&&(0,a.safeUserCallback)(function(){return e.container()},this.du.logger)||document.getElementsByTagName("head")[0]||document.head},e.prototype.mu=function(e){this.gu.push(e),this.eu.classList.add(e)},e.prototype.nu=function(e){this.eu.classList.remove(e);var t=this.gu.indexOf(e);t>-1&&this.gu.splice(t,1)},e.prototype.setAspectRatio=function(e){var t=this.ju,i=(0,a.parseAspectRatio)(e),r=p(this.du),s=r.width,u=r.height;if(!(s&&u||t===i))if(i){this.ju=i;var c=n(n({},p(this.du)),{aspectratio:this.ju});this.qu(c),this.du.eventHandler.dispatchEvent(o.PlayerEvent.AspectRatioChanged,{from:t,to:i})}else this.du.logger.debug("Invalid aspect ratio provided (".concat(e,")"))},e.prototype.getAspectRatio=function(){return this.ju},e.prototype.getVisibility=function(){var e,t,i,n;return{isVisible:null!=(t=null==(e=this.iu)?void 0:e.getVisibility())&&t,percentVisible:null!=(n=null==(i=this.iu)?void 0:i.getPercentVisibility())?n:0}},e.prototype.stopVisibilityTracking=function(){var e;null==(e=this.iu)||e.dispose(),this.iu=void 0},e.prototype.maybeStartTrackingVisibility=function(e){var t=this.du.configuration.style().visibility,i=t.enableTracking,n=t.visibilityThreshold;i&&(this.iu&&this.stopVisibilityTracking(),this.iu=new l.VisibilityTracker(e,n,this.ou))},e.prototype.setPosterImage=function(e,t){this.hu.setPosterImage(e,t)},e.prototype.removePosterImage=function(){this.hu.removePosterImage()},e.prototype.initializeInternalPlayer=function(e){c.StyleUtility.addHtmlStructure(this.eu,this.du,this.hu,e)},e.prototype.pu=function(){var e=p(this.du);this.qu(e)},e.prototype.qu=function(e){var t=this.du.container;if(t){if(e.width&&(t.style.width=e.width),e.height&&(t.style.height=e.height),this.ju=function(e,t){return t.width&&t.height?e.clientWidth/e.clientHeight:parseFloat(t.aspectratio)}(t,e),e.height&&!e.width&&this.ju){var i=t.clientHeight*this.ju;t.style.width="".concat(i,"px"),t.style.removeProperty("height")}e.width&&e.height||this.ru(this.ju)}},e.prototype.ru=function(e){var t,i=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.fu,c.StyleUtility.createCustomCssRule(".bitmovinplayer-container.".concat(t,"::before"),"padding-bottom: ".concat(100/e,"%"),this.lu())),["aspect-16x9","aspect-4x3","aspect-3x2","aspect-16x10","custom-aspect-ratio-"+this.fu].forEach(function(e){return i.nu(e)}),this.mu(t))},e.prototype.dispose=function(){var e,t=this;this.hu.dispose(),null==(e=this.iu)||e.dispose(),this.gu.slice().forEach(function(e){return t.nu(e)})},e}()},16334:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.StyleUtility=void 0;var n=i(45202),r=i(70850);t.StyleUtility=function(){function e(){}return e.addHtmlStructure=function(e,t,i,o){t.source.hasOwnProperty("vr")&&!r.Util.vrAudioElement&&r.Util.getVRAudioElement();var a=null;o&&o.hasAttribute("id")&&(a=o.getAttribute("id"));var s=a||n.Environment.idPrefix+""+t.playerConfig.prefix+"video-"+e.getAttribute("id");if(o.setAttribute("id",s),o.hasAttribute("src")&&o.removeAttribute("src"),!o.parentNode||o.parentNode!==e){var u,c=i.getPosterElement(),l=e.getElementsByClassName("bitmovinplayer-vr-canvas"),d=e.getElementsByClassName("bitmovinplayer-vr-helper-canvas");(u=d&&d.length>0?d[0]:l&&l.length>0?l[0]:c||null)?e.insertBefore(o,u):e.appendChild(o)}"hidden"===t.playerConfig.visibility&&(e.style.display="none")},e.createCustomCssRule=function(e,t,i){var n="bitmovin-style-module",r=i.getElementsByClassName(n)[0];r||((r=document.createElement("style")).setAttribute("class",n),r.setAttribute("type","text/css"),i.insertBefore(r,i.firstChild));var o=r.sheet||r.styleSheet;!function(e,t){var i=function(e,t){for(var i=0;i<e.length;i++)if((e.item?e.item(i):e[i]).selectorText===t)return i;return -1}(e.cssRules,t);-1!==i&&(e.removeRule?e.removeRule(i):e.deleteRule&&e.deleteRule(i))}(o,e),function(e,t,i){e.addRule?e.addRule(t,i):e.insertRule&&e.insertRule("".concat(t," {").concat(i,"}"),0)}(o,e,t)},e}()},3865:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.VisibilityTracker=void 0;var i={passive:!0};function n(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.XT=null,this.YT=!1,this.ZT=0,this.aT=!1,this.bT=!1,this.cT=null,this.dT=function(e){if(!o.aT){var t=e[0];t&&(o.ZT=n(t.intersectionRatio),o.fT())}},this.eT=function(){"undefined"!=typeof window&&(window.addEventListener("scroll",o.iT,i),window.addEventListener("resize",o.iT,i),window.addEventListener("orientationchange",o.iT,i))},this.hT=function(){"undefined"!=typeof window&&(window.removeEventListener("scroll",o.iT),window.removeEventListener("resize",o.iT),window.removeEventListener("orientationchange",o.iT),o.jT())},this.iT=function(){o.aT||null===o.cT&&(o.cT=window.requestAnimationFrame(function(){o.cT=null,o.kT()}))},this.kT=function(){var e=o.element.getBoundingClientRect(),t=e.width*e.height;if(t<=0)return o.ZT=0,void o.fT();var i=window.innerWidth||document.documentElement.clientWidth||0,r=window.innerHeight||document.documentElement.clientHeight||0;if(i<=0||r<=0)return o.ZT=0,void o.fT();o.ZT=n(Math.max(0,Math.min(e.right,i)-Math.max(e.left,0))*Math.max(0,Math.min(e.bottom,r)-Math.max(e.top,0))/t),o.fT()},"undefined"!=typeof window&&"undefined"!=typeof document&&("IntersectionObserver"in window?(this.XT=new IntersectionObserver(this.dT,{threshold:Array.from({length:101},function(e,t){return t/100})}),requestAnimationFrame(function(){requestAnimationFrame(function(){var e;null==(e=o.XT)||e.observe(o.element)})})):(this.kT(),this.eT()))}return e.prototype.fT=function(){var e=this.YT;this.YT=this.ZT>=this.visibilityThreshold,this.bT?e!==this.YT&&this.onVisibilityChanged(this.YT,this.ZT):this.bT=!0},e.prototype.getVisibility=function(){return this.YT},e.prototype.getPercentVisibility=function(){return this.ZT},e.prototype.dispose=function(){this.aT||(this.aT=!0,this.gT())},e.prototype.gT=function(){if(this.XT)return this.XT.disconnect(),void(this.XT=null);this.hT()},e.prototype.jT=function(){null!==this.cT&&(window.cancelAnimationFrame(this.cT),this.cT=null)},e}()}},function(e){return e(e.s=920)}])},924:function(e){self,e.exports=(self.webpackChunkbitmovin_player=self.webpackChunkbitmovin_player||[]).push([[886],{30251:function(e){e.exports=function(){"use strict";var e=function(){this.init=function(){var e={};this.on=function(t,i){e[t]||(e[t]=[]),e[t]=e[t].concat(i)},this.off=function(t,i){var n;return!!e[t]&&(n=e[t].indexOf(i),e[t]=e[t].slice(),e[t].splice(n,1),n>-1)},this.trigger=function(t){var i,n,r,o;if(i=e[t])if(2==arguments.length)for(r=i.length,n=0;n<r;++n)i[n].call(this,arguments[1]);else{for(o=[],n=arguments.length,n=1;n<arguments.length;++n)o.push(arguments[n]);for(r=i.length,n=0;n<r;++n)i[n].apply(this,o)}},this.dispose=function(){e={}}}};e.prototype.pipe=function(e){return this.on("data",function(t){e.push(t)}),this.on("done",function(t){e.flush(t)}),this.on("partialdone",function(t){e.partialFlush(t)}),this.on("endedtimeline",function(t){e.endTimeline(t)}),this.on("reset",function(t){e.reset(t)}),e},e.prototype.push=function(e){this.trigger("data",e)},e.prototype.flush=function(e){this.trigger("done",e)},e.prototype.partialFlush=function(e){this.trigger("partialdone",e)},e.prototype.endTimeline=function(e){this.trigger("endedtimeline",e)},e.prototype.reset=function(e){this.trigger("reset",e)};var t=e,i=function(e){return 181!==e.payload[0]||49!=(e.payload[1]<<8|e.payload[2])||"GA94"!==String.fromCharCode(e.payload[3],e.payload[4],e.payload[5],e.payload[6])||3!==e.payload[7]?null:e.payload.subarray(8,e.payload.length-1)},n=function e(t){t=t||{},e.prototype.init.call(this),this.parse708captions_="boolean"!=typeof t.parse708captions||t.parse708captions,this.captionPackets_=[],this.ccStreams_=[new f(0,0),new f(0,1),new f(1,0),new f(1,1)],this.parse708captions_&&(this.cc708Stream_=new u({captionServices:t.captionServices})),this.reset(),this.ccStreams_.forEach(function(e){e.on("data",this.trigger.bind(this,"data")),e.on("partialdone",this.trigger.bind(this,"partialdone")),e.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")))};(n.prototype=new t).push=function(e){var t=this;"sei_rbsp"===e.nalUnitType&&(function(e){for(var t=0,i=[],n=0,r=0;t<e.byteLength&&128!==e[t];){for(;255===e[t];)n+=255,t++;for(n+=e[t++];255===e[t];)r+=255,t++;r+=e[t++];var o=String.fromCharCode(e[t+3],e[t+4],e[t+5],e[t+6]);4===n&&"GA94"===o&&i.push({payloadType:n,payloadSize:r,payload:e.subarray(t,t+r)}),t+=r,n=0,r=0}return i})(e.escapedRBSP).filter(function(e){return 4===e.payloadType}).map(i).forEach(function(i){i&&(t.captionPackets_=t.captionPackets_.concat(function(e,t){var i,n,r,o,a=[];if(!(64&t[0]))return a;for(n=31&t[0],i=0;i<n;i++)o={type:3&t[2+(r=3*i)],pts:e},4&t[r+2]&&(o.ccData=t[r+3]<<8|t[r+4],a.push(o));return a}(e.pts,i)))})},n.prototype.flushCCStreams=function(e){this.ccStreams_.forEach(function(t){return"flush"===e?t.flush():t.partialFlush()},this)},n.prototype.flushStream=function(e){this.captionPackets_.length&&(this.captionPackets_.forEach(function(e,t){e.presortIndex=t}),this.captionPackets_.sort(function(e,t){return e.pts===t.pts?e.presortIndex-t.presortIndex:e.pts-t.pts}),this.captionPackets_.forEach(function(e){e.type<2?this.dispatchCea608Packet(e):this.dispatchCea708Packet(e)},this),this.captionPackets_.length=0),this.flushCCStreams(e)},n.prototype.flush=function(){return this.flushStream("flush")},n.prototype.partialFlush=function(){return this.flushStream("partialFlush")},n.prototype.reset=function(){this.latestDts_=null,this.ignoreNextEqualDts_=!1,this.numSameDts_=0,this.activeCea608Channel_=[null,null],this.ccStreams_.forEach(function(e){e.reset()})},n.prototype.dispatchCea608Packet=function(e){this.setsTextOrXDSActive(e)?this.activeCea608Channel_[e.type]=null:this.setsChannel1Active(e)?this.activeCea608Channel_[e.type]=0:this.setsChannel2Active(e)&&(this.activeCea608Channel_[e.type]=1),null!==this.activeCea608Channel_[e.type]&&this.ccStreams_[(e.type<<1)+this.activeCea608Channel_[e.type]].push(e)},n.prototype.setsChannel1Active=function(e){return 4096==(30720&e.ccData)},n.prototype.setsChannel2Active=function(e){return 6144==(30720&e.ccData)},n.prototype.setsTextOrXDSActive=function(e){return 256==(28928&e.ccData)||4138==(30974&e.ccData)||6186==(30974&e.ccData)},n.prototype.dispatchCea708Packet=function(e){this.parse708captions_&&this.cc708Stream_.push(e)};var r={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},o=function(e){return 32<=e&&e<=127||160<=e&&e<=255},a=function(e){this.windowNum=e,this.reset()};a.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},a.prototype.getText=function(){return this.rows.join("\n")},a.prototype.clearText=function(){this.rows=[""],this.rowIdx=0},a.prototype.newLine=function(e){for(this.rows.length>=this.virtualRowCount&&"function"==typeof this.beforeRowOverflow&&this.beforeRowOverflow(e),this.rows.length>0&&(this.rows.push(""),this.rowIdx++);this.rows.length>this.virtualRowCount;)this.rows.shift(),this.rowIdx--},a.prototype.isEmpty=function(){return 0===this.rows.length||1===this.rows.length&&""===this.rows[0]},a.prototype.addText=function(e){this.rows[this.rowIdx]+=e},a.prototype.backspace=function(){if(!this.isEmpty()){var e=this.rows[this.rowIdx];this.rows[this.rowIdx]=e.substr(0,e.length-1)}};var s=function(e,t,i){this.serviceNum=e,this.text="",this.currentWindow=new a(-1),this.windows=[],this.stream=i,"string"==typeof t&&this.createTextDecoder(t)};s.prototype.init=function(e,t){this.startPts=e;for(var i=0;i<8;i++)this.windows[i]=new a(i),"function"==typeof t&&(this.windows[i].beforeRowOverflow=t)},s.prototype.setCurrentWindow=function(e){this.currentWindow=this.windows[e]},s.prototype.createTextDecoder=function(e){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(e)}catch(t){this.stream.trigger("log",{level:"warn",message:"TextDecoder could not be created with "+e+" encoding. "+t})}};var u=function e(t){t=t||{},e.prototype.init.call(this);var i,n=this,r=t.captionServices||{},o={};Object.keys(r).forEach(function(e){i=r[e],/^SERVICE/.test(e)&&(o[e]=i.encoding)}),this.serviceEncodings=o,this.current708Packet=null,this.services={},this.push=function(e){3===e.type?n.new708Packet():null===n.current708Packet&&n.new708Packet(),n.add708Bytes(e)}};u.prototype=new t,u.prototype.new708Packet=function(){null!==this.current708Packet&&this.push708Packet(),this.current708Packet={data:[],ptsVals:[]}},u.prototype.add708Bytes=function(e){var t=e.ccData,i=t>>>8,n=255&t;this.current708Packet.ptsVals.push(e.pts),this.current708Packet.data.push(i),this.current708Packet.data.push(n)},u.prototype.push708Packet=function(){var e=this.current708Packet,t=e.data,i=null,n=null,r=0,o=t[r++];for(e.seq=o>>6,e.sizeCode=63&o;r<t.length;r++)n=31&(o=t[r++]),7==(i=o>>5)&&n>0&&(i=o=t[r++]),this.pushServiceBlock(i,r,n),n>0&&(r+=n-1)},u.prototype.pushServiceBlock=function(e,t,i){var n,r=t,a=this.current708Packet.data,s=this.services[e];for(s||(s=this.initService(e,r));r<t+i&&r<a.length;r++)o(n=a[r])?r=this.handleText(r,s):24===n?r=this.multiByteCharacter(r,s):16===n?r=this.extendedCommands(r,s):128<=n&&n<=135?r=this.setCurrentWindow(r,s):152<=n&&n<=159?r=this.defineWindow(r,s):136===n?r=this.clearWindows(r,s):140===n?r=this.deleteWindows(r,s):137===n?r=this.displayWindows(r,s):138===n?r=this.hideWindows(r,s):139===n?r=this.toggleWindows(r,s):151===n?r=this.setWindowAttributes(r,s):144===n?r=this.setPenAttributes(r,s):145===n?r=this.setPenColor(r,s):146===n?r=this.setPenLocation(r,s):143===n?s=this.reset(r,s):8===n?s.currentWindow.backspace():12===n?s.currentWindow.clearText():13===n?s.currentWindow.pendingNewLine=!0:14===n?s.currentWindow.clearText():141===n&&r++},u.prototype.extendedCommands=function(e,t){return o(this.current708Packet.data[++e])&&(e=this.handleText(e,t,{isExtended:!0})),e},u.prototype.getPts=function(e){return this.current708Packet.ptsVals[Math.floor(e/2)]},u.prototype.initService=function(e,t){var i,n,r=this;return(i="SERVICE"+e)in this.serviceEncodings&&(n=this.serviceEncodings[i]),this.services[e]=new s(e,n,r),this.services[e].init(this.getPts(t),function(t){r.flushDisplayed(t,r.services[e])}),this.services[e]},u.prototype.handleText=function(e,t,i){var n,o,a=i&&i.isExtended,s=i&&i.isMultiByte,u=this.current708Packet.data,c=4096*!!a,l=u[e],d=u[e+1],h=t.currentWindow;return t.textDecoder_&&!a?(s?(o=[l,d],e++):o=[l],n=t.textDecoder_.decode(new Uint8Array(o))):n=function(e){var t=r[e]||e;return 4096&e&&e===t?"":String.fromCharCode(t)}(c|l),h.pendingNewLine&&!h.isEmpty()&&h.newLine(this.getPts(e)),h.pendingNewLine=!1,h.addText(n),e},u.prototype.multiByteCharacter=function(e,t){var i=this.current708Packet.data,n=i[e+1],r=i[e+2];return o(n)&&o(r)&&(e=this.handleText(++e,t,{isMultiByte:!0})),e},u.prototype.setCurrentWindow=function(e,t){var i=7&this.current708Packet.data[e];return t.setCurrentWindow(i),e},u.prototype.defineWindow=function(e,t){var i=this.current708Packet.data,n=i[e],r=7&n;t.setCurrentWindow(r);var o=t.currentWindow;return o.visible=(32&(n=i[++e]))>>5,o.rowLock=(16&n)>>4,o.columnLock=(8&n)>>3,o.priority=7&n,o.relativePositioning=(128&(n=i[++e]))>>7,o.anchorVertical=127&n,o.anchorHorizontal=n=i[++e],o.anchorPoint=(240&(n=i[++e]))>>4,o.rowCount=15&n,o.columnCount=63&(n=i[++e]),o.windowStyle=(56&(n=i[++e]))>>3,o.penStyle=7&n,o.virtualRowCount=o.rowCount+1,e},u.prototype.setWindowAttributes=function(e,t){var i=this.current708Packet.data,n=i[e],r=t.currentWindow.winAttr;return r.fillOpacity=(192&(n=i[++e]))>>6,r.fillRed=(48&n)>>4,r.fillGreen=(12&n)>>2,r.fillBlue=3&n,r.borderType=(192&(n=i[++e]))>>6,r.borderRed=(48&n)>>4,r.borderGreen=(12&n)>>2,r.borderBlue=3&n,n=i[++e],r.borderType+=(128&n)>>5,r.wordWrap=(64&n)>>6,r.printDirection=(48&n)>>4,r.scrollDirection=(12&n)>>2,r.justify=3&n,r.effectSpeed=(240&(n=i[++e]))>>4,r.effectDirection=(12&n)>>2,r.displayEffect=3&n,e},u.prototype.flushDisplayed=function(e,t){for(var i=[],n=0;n<8;n++)t.windows[n].visible&&!t.windows[n].isEmpty()&&i.push(t.windows[n].getText());t.endPts=e,t.text=i.join("\n\n"),this.pushCaption(t),t.startPts=e},u.prototype.pushCaption=function(e){""!==e.text&&(this.trigger("data",{startPts:e.startPts,endPts:e.endPts,text:e.text,stream:"cc708_"+e.serviceNum}),e.text="",e.startPts=e.endPts)},u.prototype.displayWindows=function(e,t){var i=this.current708Packet.data[++e],n=this.getPts(e);this.flushDisplayed(n,t);for(var r=0;r<8;r++)i&1<<r&&(t.windows[r].visible=1);return e},u.prototype.hideWindows=function(e,t){var i=this.current708Packet.data[++e],n=this.getPts(e);this.flushDisplayed(n,t);for(var r=0;r<8;r++)i&1<<r&&(t.windows[r].visible=0);return e},u.prototype.toggleWindows=function(e,t){var i=this.current708Packet.data[++e],n=this.getPts(e);this.flushDisplayed(n,t);for(var r=0;r<8;r++)i&1<<r&&(t.windows[r].visible^=1);return e},u.prototype.clearWindows=function(e,t){var i=this.current708Packet.data[++e],n=this.getPts(e);this.flushDisplayed(n,t);for(var r=0;r<8;r++)i&1<<r&&t.windows[r].clearText();return e},u.prototype.deleteWindows=function(e,t){var i=this.current708Packet.data[++e],n=this.getPts(e);this.flushDisplayed(n,t);for(var r=0;r<8;r++)i&1<<r&&t.windows[r].reset();return e},u.prototype.setPenAttributes=function(e,t){var i=this.current708Packet.data,n=i[e],r=t.currentWindow.penAttr;return r.textTag=(240&(n=i[++e]))>>4,r.offset=(12&n)>>2,r.penSize=3&n,r.italics=(128&(n=i[++e]))>>7,r.underline=(64&n)>>6,r.edgeType=(56&n)>>3,r.fontStyle=7&n,e},u.prototype.setPenColor=function(e,t){var i=this.current708Packet.data,n=i[e],r=t.currentWindow.penColor;return r.fgOpacity=(192&(n=i[++e]))>>6,r.fgRed=(48&n)>>4,r.fgGreen=(12&n)>>2,r.fgBlue=3&n,r.bgOpacity=(192&(n=i[++e]))>>6,r.bgRed=(48&n)>>4,r.bgGreen=(12&n)>>2,r.bgBlue=3&n,r.edgeRed=(48&(n=i[++e]))>>4,r.edgeGreen=(12&n)>>2,r.edgeBlue=3&n,e},u.prototype.setPenLocation=function(e,t){var i=this.current708Packet.data,n=i[e],r=t.currentWindow.penLoc;return t.currentWindow.pendingNewLine=!0,r.row=15&(n=i[++e]),r.column=63&(n=i[++e]),e},u.prototype.reset=function(e,t){var i=this.getPts(e);return this.flushDisplayed(i,t),this.initService(t.serviceNum,e)};var c={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},l=function(e){return String.fromCharCode(e=c[e]||e).replace(/[\x00]/g,"")},d=[4352,4384,4608,4640,5376,5408,5632,5664,5888,5920,4096,4864,4896,5120,5152],h=function(){for(var e=[],t=15;t--;)e.push("");return e},p=function(){for(var e=[],t=15;t--;)e[t]=0;return e},f=function e(t,i,n){e.prototype.init.call(this),this.field_=t||0,this.dataChannel_=i||0,this.name_="CC"+(1+(this.field_<<1|this.dataChannel_)),this.setConstants(),this.reset(),this.push=function(e){var t,i,n,r,o;if((t=32639&e.ccData)!==this.lastControlCode_){if(4096==(61440&t)?this.lastControlCode_=t:t!==this.PADDING_&&(this.lastControlCode_=null),n=t>>>8,r=255&t,t!==this.PADDING_)if(t===this.RESUME_CAPTION_LOADING_)this.mode_="popOn";else if(t===this.END_OF_CAPTION_)this.mode_="popOn",this.clearFormatting(e.pts),this.flushDisplayed(e.pts),i=this.displayed_,this.displayed_=this.nonDisplayed_,this.nonDisplayed_=i,i=this.displayedIndent_,this.displayedIndent_=this.nonDisplayedIndent_,this.nonDisplayedIndent_=i,this.startPts_=e.pts;else if(t===this.ROLL_UP_2_ROWS_)this.rollUpRows_=2,this.setRollUp(e.pts);else if(t===this.ROLL_UP_3_ROWS_)this.rollUpRows_=3,this.setRollUp(e.pts);else if(t===this.ROLL_UP_4_ROWS_)this.rollUpRows_=4,this.setRollUp(e.pts);else if(t===this.CARRIAGE_RETURN_)this.clearFormatting(e.pts),this.flushDisplayed(e.pts),this.shiftRowsUp_(),this.startPts_=e.pts;else if(t===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(t===this.ERASE_DISPLAYED_MEMORY_)this.flushDisplayed(e.pts),this.displayed_=h(),this.displayedIndent_=p();else if(t===this.ERASE_NON_DISPLAYED_MEMORY_)this.nonDisplayed_=h(),this.nonDisplayedIndent_=p();else if(t===this.RESUME_DIRECT_CAPTIONING_)"paintOn"!==this.mode_&&(this.flushDisplayed(e.pts),this.displayed_=h(),this.displayedIndent_=p()),this.mode_="paintOn",this.startPts_=e.pts;else{if(!this.mode_)return;if(this.isSpecialCharacter(n,r))o=l((n=(3&n)<<8)|r),this[this.mode_](e.pts,o),this.column_++;else if(this.isExtCharacter(n,r))"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),o=l((n=(3&n)<<8)|r),this[this.mode_](e.pts,o),this.column_++;else if(this.isMidRowCode(n,r))this.clearFormatting(e.pts),this[this.mode_](e.pts," "),this.column_++,14&~r||this.addFormatting(e.pts,["i"]),1&~r||this.addFormatting(e.pts,["u"]);else if(this.isOffsetControlCode(n,r)){var a=3&r;this.column_+=a,this.incrementIdentation(a)}else if(this.isPAC(n,r)){var s=d.indexOf(7968&t);"rollUp"===this.mode_&&(s-this.rollUpRows_+1<0&&(s=this.rollUpRows_-1),this.setRollUp(e.pts,s)),s!==this.row_&&(this.clearFormatting(e.pts),this.changeRow(s)),1&r&&-1===this.formatting_.indexOf("u")&&this.addFormatting(e.pts,["u"]),16&~t||(this.column_=4*((14&t)>>1),"popOn"===this.mode_?this.nonDisplayedIndent_[this.row_]=this.column_:"rollUp"===this.mode_&&(this.displayedIndent_[this.row_]=this.column_)),this.isColorPAC(r)&&(14&~r||this.addFormatting(e.pts,["i"]))}else this.isNormalChar(n)&&(o=l(n),0!==r&&(o+=l(r)),this[this.mode_](e.pts,o),this.column_+=o.length)}}else this.lastControlCode_=null}};return f.prototype=new t,f.prototype.flushDisplayed=function(e){for(var t=0;t<this.displayed_.length;t++){var i=this.displayed_[t];i&&i.length&&this.trigger("data",{startPts:this.startPts_,endPts:e,text:i,stream:this.name_,position:{row:t,column:this.displayedIndent_[t]}})}},f.prototype.reset=function(){this.mode_="popOn",this.topRow_=0,this.startPts_=0,this.displayed_=h(),this.nonDisplayed_=h(),this.displayedIndent_=p(),this.nonDisplayedIndent_=p(),this.lastControlCode_=null,this.column_=0,this.row_=14,this.rollUpRows_=2,this.formatting_=[]},f.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},f.prototype.isSpecialCharacter=function(e,t){return e===this.EXT_&&t>=48&&t<=63},f.prototype.isExtCharacter=function(e,t){return(e===this.EXT_+1||e===this.EXT_+2)&&t>=32&&t<=63},f.prototype.isMidRowCode=function(e,t){return e===this.EXT_&&t>=32&&t<=47},f.prototype.isOffsetControlCode=function(e,t){return e===this.OFFSET_&&t>=this.TAB_OFFSET_1_&&t<=this.TAB_OFFSET_3_},f.prototype.isPAC=function(e,t){return e>=this.BASE_&&e<this.BASE_+8&&t>=64&&t<=127},f.prototype.isColorPAC=function(e){return e>=64&&e<=79||e>=96&&e<=127},f.prototype.isNormalChar=function(e){return e>=32&&e<=127},f.prototype.setRollUp=function(e,t){if("rollUp"!==this.mode_&&(this.row_=14,this.mode_="rollUp",this.flushDisplayed(e),this.nonDisplayed_=h(),this.displayed_=h(),this.displayedIndent_=p(),this.nonDisplayedIndent_=p()),void 0!==t&&t!==this.row_)for(var i=0;i<this.rollUpRows_;i++)this.displayed_[t-i]=this.displayed_[this.row_-i],this.displayed_[this.row_-i]="";void 0===t&&(t=this.row_),this.topRow_=t-this.rollUpRows_+1},f.prototype.addFormatting=function(e,t){this.formatting_=this.formatting_.concat(t);var i=t.reduce(function(e,t){return e+"<"+t+">"},"");this[this.mode_](e,i)},f.prototype.clearFormatting=function(e){if(this.formatting_.length){var t=this.formatting_.reverse().reduce(function(e,t){return e+"</"+t+">"},"");this.formatting_=[],this[this.mode_](e,t)}},f.prototype.popOn=function(e,t){var i=this.nonDisplayed_[this.row_];i+=t,this.nonDisplayed_[this.row_]=i},f.prototype.rollUp=function(e,t){var i=this.displayed_[this.row_];i+=t,this.displayed_[this.row_]=i},f.prototype.shiftRowsUp_=function(){var e;for(e=0;e<this.topRow_;e++)this.displayed_[e]="";for(e=this.row_+1;e<15;e++)this.displayed_[e]="";for(e=this.topRow_;e<this.row_;e++)this.displayed_[e]=this.displayed_[e+1];this.displayed_[this.row_]=""},f.prototype.paintOn=function(e,t){var i=this.displayed_[this.row_];i+=t,this.displayed_[this.row_]=i},f.prototype.changeRow=function(e){if("rollUp"===this.mode_){var t=this.row_-this.topRow_+1;this.topRow_=e-t+1;var i=this.displayed_,n=this.displayedIndent_;this.displayed_=h(),this.displayedIndent_=p();for(var r=0;r<t;r++)e-r>=0&&(this.displayed_[e-r]=i[this.row_-r],this.displayedIndent_[e-r]=n[this.row_-r])}this.row_=e},f.prototype.incrementIdentation=function(e){"popOn"===this.mode_?this.nonDisplayedIndent_[this.row_]+=e:"rollUp"===this.mode_&&(this.displayedIndent_[this.row_]+=e)},{CaptionStream:n}}()},82396:function(e,t,i){"use strict";var n=this&&this.__spreadArray||function(e,t,i){if(i||2==arguments.length)for(var n,r=0,o=t.length;r<o;r++)!n&&r in t||(n||(n=Array.prototype.slice.call(t,0,r)),n[r]=t[r]);return e.concat(n||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.Cea608Extractor=t.CEA_EXTRACTOR_SUPPORTED_CODEC_TAGS=t.MPEG_TS_TIMESCALE=void 0;var r=i(1001),o=i(34047),a=i(3188);t.MPEG_TS_TIMESCALE=9e4,t.CEA_EXTRACTOR_SUPPORTED_CODEC_TAGS=n(n([],o.AVC_CODEC_TAGS,!0),o.HEVC_CODEC_TAGS,!0);var s=function(){function e(e,t,i){void 0===i&&(i=!1),this.logger=e,this.MP4Module=t,this.parseCea708Caption=i,this.tu=1,this.uu=0}return e.prototype.extract=function(e){var i,n,a=this,s=(null!=(n=null==(i=e.getInitSegment())?void 0:i.getParsedData())?n:e.getParsedData()).get("moov.trak.mdia.mdhd"),u=(0,o.getCodecTag)(e);if(!t.CEA_EXTRACTOR_SUPPORTED_CODEC_TAGS.includes(u))return Promise.resolve([]);var c=o.AVC_CODEC_TAGS.includes(u)?r.NalUnitTypeAvc.SEI:r.NalUnitTypeHevc.SEI;s&&(this.tu=s.timescale);var l=e.getParsedData().get("moov.mvex.trex");l&&(this.uu=l.default_sample_duration);var d=this.MP4Module.getMp4Fragments(e).flatMap(function(t){var i=t.moof.get("traf.tfdt"),n=a.MP4Module.getVideoSamples(t,e,[c],a.logger),r=i?a.vu(i.baseMediaDecodeTime):0;return n.flatMap(function(e){var t=e.nalus.map(function(t){return function(e,t){return{nalUnitType:"sei_rbsp",escapedRBSP:new Uint8Array(e.data.buffer,e.data.byteOffset,e.data.byteLength),pts:t}}(t,r+a.vu(e.compositionTimeOffset))});return r+=Math.floor(a.vu(e.duration||a.uu)),t})});return this.wu(d)},e.prototype.vu=function(e){return e/this.tu*t.MPEG_TS_TIMESCALE},e.prototype.wu=function(e){return 0===e.length?Promise.resolve([]):(this.su||(this.su=new a.Cea608Processor(this.parseCea708Caption)),this.su.getCaptions(e).catch(function(){return Promise.resolve([])}))},e.prototype.reset=function(){this.su&&this.su.reset()},e.prototype.dispose=function(){this.su&&this.su.dispose()},e}();t.Cea608Extractor=s},3188:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Cea608Processor=void 0;var n=i(30251),r=i(85269);t.Cea608Processor=function(){function e(e){var t=this;this.mT=[],this.pushCaptions=function(e){t.lT=!1,e.forEach(function(e){return t.qT.push(e)})},this.rT=function(){t.qT.on("data",t.sT),t.qT.on("done",t.tT)},this.sT=function(e){t.mT.push((0,r.assembleCaption)(e))},this.tT=function(){if(!t.lT)if(t.lT=!0,t.uT(t.mT),t.mT=[],t.oT.length>0){var e=t.oT[0];t.process(e.captionPackets)}else t.pT=!1},this.nT=e,this.mT=[],this.oT=[],this.pT=!1,this.qT=new n.CaptionStream({parse708captions:e}),this.rT()}return e.prototype.getCaptions=function(e){var t=this;return new Promise(function(i,n){e&&Array.isArray(e)&&!(e.length<1)||n(Error("Could not get captions, no SeiNal provided")),t.oT.push({captionPackets:e,resolve:i,reject:n}),t.pT||(t.pT=!0,t.process(e))})},e.prototype.process=function(e){this.pushCaptions(e),this.flush()},e.prototype.flush=function(){this.qT.flush()},e.prototype.reset=function(){this.qT.reset()},e.prototype.uT=function(e){var t=this,i=e.filter(function(e){return t.nT?e.channel.includes("708"):!e.channel.includes("708")}),n=this.oT.shift();null==n||n.resolve(i)},e.prototype.dispose=function(){this.qT.reset()},e}()},20784:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CeaSubtitlesModuleDefinition=void 0;var n=i(62756),r=i(82396);t.CeaSubtitlesModuleDefinition={name:n.ModuleName.SubtitlesCEA608,module:function(){return{Cea608Extractor:r.Cea608Extractor,CEA_EXTRACTOR_SUPPORTED_CODEC_TAGS:r.CEA_EXTRACTOR_SUPPORTED_CODEC_TAGS}},dependencies:[n.ModuleName.Subtitles]},t.default=t.CeaSubtitlesModuleDefinition},85269:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assembleCaption=function(e){return{start:e.startPts/i,end:e.endPts/i,text:e.text,channel:e.stream,position:e.position}};var i=9e4}},function(e){return e(e.s=20784)}])},60:function(e){"use strict";self,e.exports=(self.webpackChunkbitmovin_player=self.webpackChunkbitmovin_player||[]).push([[826],{91444:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.NativeSubtitlesModuleDefinition=void 0;var n=i(62756),r=i(43931);t.NativeSubtitlesModuleDefinition={name:n.ModuleName.SubtitlesNative,module:function(){return{TextTrackController:r.TextTrackController}},dependencies:[n.ModuleName.Subtitles]},t.default=t.NativeSubtitlesModuleDefinition},43931:function(e,t,i){var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},r=this&&this.__spreadArray||function(e,t,i){if(i||2==arguments.length)for(var n,r=0,o=t.length;r<o;r++)!n&&r in t||(n||(n=Array.prototype.slice.call(t,0,r)),n[r]=t[r]);return e.concat(n||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.TextTrackController=void 0;var o,a,s,u=i(25926),c=i(4224),l=i(3714),d=i(4129),h=i(29669),p=i(74853),f=i(15487),g=i(88844),m=i(58313),y=i(88052),v=i(62756),S=i(52364);!function(e){e.Showing="showing",e.Hidden="hidden",e.Disabled="disabled"}(o||(o={})),function(e){e.Subtitle="subtitles",e.ForcedSubtitle="forced",e.Caption="captions",e.Metadata="metadata"}(a||(a={})),function(e){e.ID3="org.id3",e.DATERANGE="com.apple.quicktime.HLS",e.EMSG="https://aomedia.org/emsg/ID3"}(s||(s={}));var b=RegExp("^(?:[a-z]+:)?//","i"),E=function(e){var t={id:e.id,lang:e.lang,label:e.label,kind:e.kind,isFragmented:e.isFragmented,isSideloaded:e.isSideloaded,enabled:e.textTrack&&e.textTrack.mode!==o.Disabled,forced:e.kind===a.ForcedSubtitle};return e.url&&(t.url=e.url),e.metadata&&(t.metadata=e.metadata),t};function T(e,t){for(var i=0,n=e;i<n.length;i++){var r=n[i];if(r===t.textTrack)return r}}t.TextTrackController=function(){function e(e,t,i,r){var a=this;this.pt=function(e,t,i){var n=e.body;n&&a.ot(n.trim(),i)},this.qt=function(e,t){a.Vt.logger.debug("Error loading subtitle file: "+JSON.stringify(t)),a.removeSubtitle(a.nt(e.url)),a.Wt.dispatchEvent(l.PlayerEvent.Warning,new u.PlayerWarning(c.WarningCode.NETWORK_COULD_NOT_LOAD_SUBTITLE)),a.Vt.logger.debug("Could not load subtitles/captions, got HTTP status code "+e.status)},this.st=function(e){var t=e.currentTarget.activeCues,i={frames:[]};for(var r in t)if(t[r].type===s.ID3&&void 0!==t[r].value){var o=t[r].value;p.ArrayHelper.isArrayBuffer(o.data)&&((o=n({},o)).data=p.ArrayHelper.getArray(new Uint8Array(o.data))),i[o.key]=o.data,i.frames.push(o),a.kt&&a.tt(t[r],e.currentTarget)}i.frames.length&&a.Wt.dispatchEvent(l.PlayerEvent.Metadata,{metadataType:l.MetadataType.ID3,metadata:i})},this.ut=function(e){var t=e.target;if(t.activeCues&&t.activeCues.length>0){var i=S.TextTrackCueHelper.cueListToArray(t.activeCues),n=a.Tu(t);S.TextTrackCueHelper.sort(i).forEach(function(e){return a.wt(n,e)})}},this.Ct=function(e){var t=window.setTimeout(function(){return a.Dt(e)},0);a.ht.push(t)},this.Su=function(){return null},this.Wu=function(){var e;a.Yt?a.Zt&&a.disableSubtitle(a.Zt):(a.Zt=null==(e=a.Vu())?void 0:e.id,a.Zt&&a.enableSubtitle(a.Zt,!0))},this.Xu=function(){a.disableSubtitle(a.Zt),a.Wu()},this.Zu=function(){var e=a.Uu(),t=e[0],i=e[1];if(a.Yu(i))return a.disableSubtitle(i),void a.Wu();i||(a.Yt=void 0),a.Wu(),a.lt&&a.au(),i&&t&&t.mode!==o.Hidden&&!a.it.includes(t)&&a.enableSubtitle(i)},this.Vt=e,this.Wt=e.eventHandler,this.Xt=t,this.type=r,this.dt=[],this.et={},this.bt=1,this.ct=0,this.gt=!1,this.ht=[],this.it=[],this.jt=[],this.at=null,this.kt=(0,f.isSafariPlatform18orNewer)(),i.hasOwnProperty("style")&&i.style.hasOwnProperty("nativeSubtitles")?this.ft=!!i.style.nativeSubtitles:this.ft=!1,t.audioTracks&&t.audioTracks.addEventListener("change",this.Xu),t.textTracks&&"function"==typeof t.textTracks.addEventListener&&(t.textTracks.addEventListener("addtrack",this.Ct),t.textTracks.addEventListener("change",this.Zu))}return Object.defineProperty(e.prototype,"lt",{get:function(){return this.gt||this.ft},enumerable:!1,configurable:!0}),e.prototype.getAvailableSubtitles=function(){return Object.values(this.et||{}).filter(function(e){return e.kind!==a.ForcedSubtitle}).map(E)},e.prototype.enableSubtitle=function(e,t){void 0===t&&(t=!1);var i=this.et[e];return i?(t||(this.Yt=e),i.textTrack&&(this.ft||this.gt?i.textTrack.mode=o.Showing:i.textTrack.mode=o.Hidden),i.enabled?Promise.resolve(!1):(i.enabled=!0,i.textTrack?i.loadPromise.then(function(){return!0},function(){return!1}):Promise.resolve(!0))):Promise.resolve(!1)},e.prototype.disableSubtitle=function(e){var t=this,i=this.et[e];return!!i&&(i.textTrack&&(i.textTrack.mode=o.Disabled),i.enabled=!1,r([],this.jt,!0).forEach(function(i){return i.subtitleId===e&&t.At(e,i)}),!0)},e.prototype.mt=function(e){var t,i;return window.VTTCue?new window.VTTCue(e.start,e.end,null!=(t=e.html)?t:e.text):window.TextTrackCue?new TextTrackCue(e.start,e.end,null!=(i=e.html)?i:e.text):void 0},e.prototype.nt=function(e){if(e&&this.et){for(var t in this.et)if(this.et.hasOwnProperty(t)&&this.et[t].url===e)return t}},e.prototype.ot=function(e,t){var i=this.nt(t);if(i&&e){for(var r=y.ModuleManager.get(v.ModuleName.Subtitles).SubtitleParserFactory.createInstance(this.Vt,e).parse(e),o=0;o<r.length;o++)this.Wt.dispatchEvent(l.PlayerEvent.CueParsed,n(n({subtitleId:i},r[o]),{periodId:null})),this.et[i].textTrack.addCue(this.mt(r[o]));this.Wt.dispatchEvent(l.PlayerEvent.SubtitleAdded,{subtitle:E(this.et[i])})}},e.prototype.rt=function(e){var t=this;if(e&&e.trim())return this.Vt.logger.debug("loading "+e),this.at=new d.DefaultContentLoader(this.Vt,{maxRetries:this.Vt.settings.MAX_RETRIES,retryDelay:this.Vt.settings.RETRY_DELAY,onSuccess:this.pt,onFailure:this.qt,requestType:h.HttpRequestType.MEDIA_SUBTITLES}),this.at.load(e).catch(function(e){t.Vt.logger.debug("Error while loading subtitles ",e)})},e.prototype.tt=function(e,t){try{t.removeCue(e)}catch(e){"NotFoundError"!==e.name&&this.Vt.logger.debug("Error removing cue from native TextTrack: ".concat(e.name,": ").concat(e.message))}},e.prototype.vt=function(e,t){var i=y.ModuleManager.get(v.ModuleName.Subtitles).HtmlTransformer,n=i.htmlToText,r=i.stripHtmlTags,o=(y.ModuleManager.get(v.ModuleName.SubtitlesWebVTT,!1)||{}).extractVttProperties,a={subtitleId:e,text:n(t.text),start:t.startTime,end:t.endTime},s=[a];if("subtitles"===t.track.kind)a.html=function(e){var t=(0,y.ModuleManager.get(v.ModuleName.Subtitles).HtmlTransformer.prepareHtml)(e);return t.startsWith("<span>")?t:"<span>".concat(t,"</span>")}(t.text),window.VTTCue&&(t instanceof VTTCue&&o?a.vtt=o(t):t instanceof VTTCue&&this.Vt.logger.debug("Could not interpret VTT properties from native VTTCue Event as ".concat(v.ModuleName.SubtitlesWebVTT," is missing")));else if("captions"===t.track.kind){a.position=function(e){var t=80/15,i=e.line-10,n=e.position-10;return i-=i%t,n-=n%2.5,{row:i=Math.round(i/t),column:n=Math.round(n/2.5)}}(t);var u=r(a.text);a.position.column+u.length>S.CEA_608_MAX_LINE_LENGTH-1&&(s=S.TextTrackCueHelper.splitCea608Cue(a))}return s},e.prototype.wt=function(e,t){var i=this;if(t){var n=Object.values(this.et).find(function(e){return e.textTrack===t.track});if(function(e,t,i){if(i){var n=y.ModuleManager.get(v.ModuleName.Subtitles).HtmlTransformer,r=n.stripAwayHtmlBreakPoints,o=n.replaceHtmlBreakPointsWithNewLine;e&&i.isSideloaded&&(t.text=o(t.text)),e||i.isSideloaded||(t.text=r(t.text))}}(this.ft||this.gt,t,n),!this.ft&&!this.gt){var r=this.vt(e,t);r.forEach(function(n){i.yt(n)?i.Wt.dispatchEvent(l.PlayerEvent.CueUpdate,n):i.zt(e,t,n)}),this.xt(e,r)}}},e.prototype.xt=function(e,t){var i=this,n=this.jt.filter(function(i){return!t.find(function(e){return i.start===e.start&&i.text===e.text&&i.subtitleId===e.subtitleId})&&i.end===1/0&&i.subtitleId===e});n.length>0&&n.forEach(function(t){i.At(e,t)})},e.prototype.yt=function(e){var t=this,i=this.jt.find(function(i){var n=i.start===e.start,r=i.text===e.text,o=!e.end||i.end===1/0||i.end===t.Xt.duration||i.end===e.end;return n&&r&&o});return!!i&&(i.end=e.end,!0)},e.prototype.zt=function(e,t,i){var n=this;this.jt.push(i),t.onexit=function(){n.vt(e,t).forEach(function(t){return n.At(e,t)})},this.Wt.dispatchEvent(l.PlayerEvent.CueEnter,i)},e.prototype.At=function(e,t){var i=this.jt.find(function(e){return e.start===t.start&&e.end===t.end&&e.text===t.text});if(i){this.jt=this.jt.filter(function(e){return e!==i});var n={subtitleId:e,text:i.text,start:i.start,end:i.end};i.position&&(n.position=i.position),this.Wt.dispatchEvent(l.PlayerEvent.CueExit,n)}},e.prototype.removeSubtitle=function(e){if(this.et.hasOwnProperty(e)){this.et[e].textTrack.mode!==o.Disabled&&this.disableSubtitle(e),this.et[e].textTrack.mode=o.Disabled;var t=this.et[e];delete this.et[e],this.Wt.dispatchEvent(l.PlayerEvent.SubtitleRemoved,{subtitle:E(t)})}},e.prototype.signalSourceChange=function(){this.Xt&&this.Xt.textTracks&&"function"==typeof this.Xt.textTracks.addEventListener&&this.Xt.textTracks.removeEventListener("addtrack",this.Ct),this.removeAll()},e.prototype.removeAll=function(){for(var e in this.Vt.logger.debug("removing all subtitle tracks"),this.ht.forEach(function(e){return(0,g.clearTimeoutIfDefined)(e)}),this.ht=[],this.et)this.et.hasOwnProperty(e)&&(this.et[e].textTrack.mode=o.Disabled,this.et[e].textTrack.removeEventListener("cuechange",this.ut));this.et={},this.jt=[],this.bt=1,this.ct=0},e.prototype.addSubtitle=function(e){if("function"!=typeof this.Xt.addTextTrack)return this.Vt.logger.warn("adding subtitles not supported!"),Promise.reject();this.et.hasOwnProperty(e.id)&&(this.Vt.logger.debug("re-adding subtitle "+e.id),this.removeSubtitle(e.id));var t=e.url?m.URLHelper.toFullUrl(function(e){return"https:"===location.protocol?e.replace(b,"//"):e}(e.url.trim())):null,i={id:e.id,url:t,kind:e.kind,lang:e.lang,label:e.label,textTrack:null,isFragmented:!1,isSideloaded:!0,loadPromise:null,metadata:e.metadata};return this.et[e.id]=i,this.et[e.id].textTrack=this.Xt.addTextTrack(e.kind,e.label),this.et[e.id].textTrack.mode=o.Disabled,this.et[e.id].textTrack.addEventListener("cuechange",this.ut),this.Bt(i)},e.prototype.Bt=function(e){var t=this;return e.url?e.loadPromise=this.rt(e.url).then(function(){if(!t.getAvailableSubtitles().find(function(t){return t.id===e.id}))throw"subtitle adding failed"}):(this.Vt.logger.log("No url was provided for an external subtitle, nothing will be loaded."),e.loadPromise=Promise.resolve(),this.Wt.dispatchEvent(l.PlayerEvent.SubtitleAdded,{subtitle:E(e)})),e.loadPromise},e.prototype.Dt=function(e){for(var t,i,n=this,r=e.track,s=e.isFragmented&&r.kind===a.Subtitle||!1,u=0,c=Object.keys(this.et);u<c.length;u++){var d=c[u],h=this.et[d];if(h.textTrack===r&&h.isSideloaded)return void this.Vt.logger.insane("track "+r.label+" has already been added externally")}switch(r.kind){case a.Subtitle:t=r.id||"sub".concat(this.ct),i=r.label||"Subtitles (".concat(this.ct,")"),this.ct++;break;case a.ForcedSubtitle:t=r.id||"fsub".concat(this.ct),i=r.label||"Subtitles (".concat(this.ct,")) (Forced)"),this.ct++;break;case a.Caption:t="CC".concat(this.bt),i=r.label||"Captions (CC ".concat(this.bt,")"),this.bt++;break;default:return void this.Et(r)}this.Vt.logger.debug("adding ".concat(r.kind," text track ").concat(t)),this.et[t]={id:t,url:null,kind:r.kind,lang:r.language||"unknown",label:i,textTrack:r,isFragmented:s,isSideloaded:!1,loadPromise:Promise.resolve()},(i=this.Gt(this.et[t]))&&"string"==typeof i&&(this.et[t].label=i),this.it.push(r),r.addEventListener("cuechange",this.ut),r.kind!==a.ForcedSubtitle&&this.Wt.dispatchEvent(l.PlayerEvent.SubtitleAdded,{subtitle:E(this.et[t])}),r.mode=o.Disabled;var p=window.setTimeout(function(){n.it=n.it.filter(function(e){return e!==r}),Object.keys(n.et).map(function(e){return n.et[e]}).filter(function(e){return e.enabled&&!!e.textTrack&&e.textTrack.mode===o.Disabled}).forEach(function(e){n.lt?e.textTrack.mode=o.Showing:e.textTrack.mode=o.Hidden})},0);this.ht.push(p),this.Ft()&&this.Wu()},e.prototype.Et=function(e){this.Vt.settings.HLS_PARSE_NATIVE_METADATA&&(this.dt.push(e),e.mode=o.Hidden,e.addEventListener("cuechange",this.st))},e.prototype.Ft=function(){var e=Object.keys(this.et).length;return this.Xt.textTracks.length===e},e.prototype.Gt=function(e){var t={kind:e.kind,id:e.id,label:e.label,lang:e.lang};return this.Ht()(t)},e.prototype.Ht=function(){var e=this.Vt.sourceContext,t=e&&e.source&&e.source.labeling;return t&&t[this.type]&&t[this.type].subtitles?"function"!=typeof t[this.type].subtitles?this.Su:t[this.type].subtitles:this.Su},e.prototype.Tu=function(e){var t;return(null==(t=Object.values(this.et).find(function(t){return t.textTrack===e}))?void 0:t.id)||null},e.prototype.Uu=function(){for(var e=0,t=this.Xt.textTracks;e<t.length;e++){var i=t[e];if((i.mode===o.Showing||i.mode===o.Hidden)&&i.kind!==a.Metadata&&i.kind!==a.ForcedSubtitle)return[i,this.Tu(i)]}return[void 0,void 0]},e.prototype.enableNative=function(){var e=this;Object.keys(this.et).map(function(t){return e.et[t]}).filter(function(e){return e.enabled&&!!e.textTrack}).forEach(function(e){return e.textTrack.mode=o.Showing}),this.gt=!0},e.prototype.disableNative=function(){var e=this;Object.keys(this.et).map(function(t){return e.et[t]}).filter(function(e){return e.enabled&&!!e.textTrack}).forEach(function(e){return e.textTrack.mode=o.Hidden}),this.gt=!1},e.prototype.seek=function(){var e=this;Object.keys(this.et).map(function(t){return e.et[t]}).filter(function(e){return e.enabled&&!!e.textTrack}).forEach(function(e){var t=e.textTrack.mode;e.textTrack.mode=o.Disabled,e.textTrack.mode=t})},e.prototype.Vu=function(){var e,t,i,n=this.Xt.audioTracks,r=y.ModuleManager.get(v.ModuleName.Subtitles).LanguageComparer.isEqualIsoLanguage;if(this.Yt)i=null==(e=this.et[this.Yt])?void 0:e.lang;else{if(!n)return;var o=p.ArrayHelper.toArray(n).find(function(e){return e.enabled});i=null==o?void 0:o.language}i=null!=(t=null!=i?i:navigator.language)?t:navigator.userLanguage;var s=Object.values(this.et).filter(function(e){return e.kind===a.ForcedSubtitle}),u=s.find(function(e){return r(e.lang,i)});return null!=u?u:s[0]},e.prototype.Yu=function(e){var t=this,i=Object.keys(this.et).some(function(i){return i===e&&t.et[i].enabled});return e&&!this.lt&&!i},e.prototype.au=function(){var e=this,t=function(e){var t=n({},e);return delete t.loadPromise,delete t.textTrack,n({},t)};this.bu().forEach(function(i){e.disableSubtitle(i.id),e.Wt.dispatchEvent(l.PlayerEvent.SubtitleDisabled,{subtitle:t(i)})}),this.cu().forEach(function(i){e.Wt.dispatchEvent(l.PlayerEvent.SubtitleEnabled,{subtitle:t(i)})})},e.prototype.bu=function(){var e=this.Xt.textTracks;return Object.values(this.et).filter(function(e){return e.enabled}).filter(function(t){var i=T(e,t);return i&&i.mode===o.Disabled})},e.prototype.cu=function(){var e=this.Xt.textTracks;return Object.values(this.et).filter(function(e){return!e.enabled}).filter(function(t){var i=T(e,t);return i&&i.mode!==o.Disabled})},e.prototype.dispose=function(){var e;this.removeAll(),this.Wt=null,this.jt=null,this.et=null,this.dt=null,null==(e=this.Xt.audioTracks)||e.removeEventListener("change",this.Xu),this.Xt&&this.Xt.textTracks&&"function"==typeof this.Xt.textTracks.addEventListener&&(this.Xt.textTracks.removeEventListener("addtrack",this.Ct),this.Xt.textTracks.removeEventListener("change",this.Zu)),this.at&&this.at.dispose(),this.at=null},e}()},52364:function(e,t){var i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.TextTrackCueHelper=t.CEA_608_MAX_LINE_LENGTH=void 0,t.CEA_608_MAX_LINE_LENGTH=32;var n=function(){function e(){}return e.cueListToArray=function(e){for(var t=[],i=0;i<e.length;i++)t.push(e[i]);return t},e.sortEqualStartTimeByLineFn=function(e,t){if("line"in e&&"line"in t&&e.startTime===t.startTime){if(e.line<t.line)return -1;if(e.line>t.line)return 1}return 0},e.sortByStartTimeFn=function(e,t){return e.startTime<t.startTime?-1:+(e.startTime>t.startTime)},e.sort=function(t){return t.sort(e.sortByStartTimeFn),t.sort(e.sortEqualStartTimeByLineFn),t},e.getTagIndexRanges=function(e){for(var t,i=RegExp("<[^>]*>","g"),n=[];t=i.exec(e);){var r=t[0];n.push({start:t.index,end:t.index+r.length-1})}return n},e.splitCea608Cue=function(i){for(var n=t.CEA_608_MAX_LINE_LENGTH-i.position.column,r=i.text,o=e.getTagIndexRanges(r),a=[],s=0,u=0,c=!1,l=0,d=0;d<r.length;){if(d===r.length-1){a.push(r.substring(s));break}if(o.length>0&&d===o[0].start&&(c=!0),c);else if(u++," "===r[d]&&(l=d),u>=n&&l>s){d=l+1;var h=r.substring(s,d);h&&a.push(h),s=d,u=1}c&&o.length>0&&d===o[0].end&&(c=!1,o.shift()),d++}var p=e.createCueEvents(a,i);return e.adjustCea608CaptionPositioning(p),p},e.createCueEvents=function(e,t){var n=e.length-1;return e.map(function(e){var r=i({},t);return r.text=e,r.position={column:r.position.column,row:r.position.row-n},n--,r})},e.adjustCea608CaptionPositioning=function(e){var t=Math.max.apply(Math,e.map(function(e){return e.position.row})),i=Math.min.apply(Math,e.map(function(e){return e.position.row}));if(t>14){var n=14-t;e.forEach(function(e){return e.position.row+=n})}if(i<0){var r=0-i;e.forEach(function(e){return e.position.row+=r})}},e}();t.TextTrackCueHelper=n}},function(e){return e(e.s=91444)}])},70:function(e){"use strict";self,e.exports=(self.webpackChunkbitmovin_player=self.webpackChunkbitmovin_player||[]).push([[840],{90942:function(e,t,i){Object.defineProperty(t,"__esMo
1dule",{value:!0}),t.TTMLSubtitlesModuleDefinition=void 0;var n=i(62756),r=i(95021);t.TTMLSubtitlesModuleDefinition={name:n.ModuleName.SubtitlesTTML,module:function(){return{TTMLParser:r.TTMLParser}},dependencies:[n.ModuleName.Subtitles]},t.default=t.TTMLSubtitlesModuleDefinition},95021:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.TTMLParser=void 0;var n=i(76444),r=i(31207);t.TTMLParser=function(){function e(e){this.Hs=e}return e.prototype.parse=function(e,t){var i=this;void 0===t&&(t=0);var o=/xmlns:(\S+)="http:\/\/www.w3.org\/ns\/ttml"/.exec(e),a=null!=o?e.replace(RegExp("(<[/]?)(".concat(o[1],":)([\\s\\S]+?>)"),"g"),"$1$3"):e,s=(new DOMParser).parseFromString(a,"application/xml"),u=(0,n.getFirstElementByTagName)(s,"tt"),c=(0,n.getFirstElementByTagName)(u,"body");if(!u||!c)return[];t&&!isNaN(t)||(t=0);var l=(0,n.extractImages)(u),d=(0,r.getStylingInfo)(u),h=(0,n.getLayoutInfo)(u),p=(0,r.parseBodyStyle)(c,d);return(0,n.splitUpTimedElements)(c).map(function(e){return(0,r.applyStyling)(e,d,l,e.element),(0,n.redistributeLineBreaks)(e.element),(0,r.applyBodyStyle)(e,p),(0,n.getSubtitleCue)({timedElement:e,layouts:h,baseOffset:t,styles:d},i.Hs.logger)})},e}()},32148:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.parseAttributes=function(e){var t=new Map;return(0,r.iterableToArray)(e.attributes).forEach(function(e){return t.set(o(e),e.value)}),t},t.getQualifiedAttributeName=function(e,t){var i=(0,r.iterableToArray)(e).find(function(e){return function(e){return null!=e.localName?e.localName:null!=e.name?o(e):""}(e)===t});return i?i.name:""},t.processAttribute=function(e,t,i,r){var o=i.includes("-")?(0,n.kebabCaseToCamelCase)(i):i,a=e.get(o);if(void 0!==a){var s=r(a);s&&("string"!=typeof s||""!==s)&&t.set(i,s)}};var n=i(20649),r=i(76444);function o(e){var t=e.name;return t.includes(":")?t.split(":")[1]:t}},76444:function(e,t,i){var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},r=this&&this.__spreadArray||function(e,t,i){if(i||2==arguments.length)for(var n,r=0,o=t.length;r<o;r++)!n&&r in t||(n||(n=Array.prototype.slice.call(t,0,r)),n[r]=t[r]);return e.concat(n||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.LayoutStyleProperties=t.LayoutInfoEntryKeys=void 0,t.iterableToArray=h,t.redistributeLineBreaks=function e(t){var i=h(t.children),n=i.filter(function(e){return"br"===e.tagName}),r=i.filter(function(e){return"span"===e.tagName});if(n.length>0&&r.length>0){var o=0;for(n.forEach(function(e){var t;return null==(t=e.parentElement)?void 0:t.removeChild(e)});n.length>0;){var a=n.shift();if(a&&(r[o].nextSibling?t.insertBefore(a,r[o].nextSibling):t.appendChild(a)),++o>=r.length)break}n.forEach(function(e){return t.appendChild(e)})}i.forEach(e)},t.getSubtitleCue=function(e,t){var i,n,r=e.timedElement,a=e.layouts,c=e.baseOffset,d=e.styles,h=r.end?g(r.end):NaN,y=r.dur?g(r.dur):NaN,v=r.begin?g(r.begin):NaN,S=m(r.element),b=function(e,t,i){var n=!!e&&i.has(e),r=i.get(e);return(n&&r instanceof Map?function(e){var t=e.get(o.StyleIds);return Array.isArray(t)?t:[]}(r):[]).map(function(e){return(0,l.getCSSFromStyleID)(e,t)}).join("")+(r&&r instanceof Map?f(r):"")+(n&&r instanceof Map?p(r):"")}(S,d,a),E=v+c,T=isFinite(h)?h+c:E+y,_=s.ModuleManager.get(u.ModuleName.Subtitles).HtmlTransformer.htmlToText,A=(S?function(e){var t;return e.innerHTML?e.innerHTML:e.parentNode&&null!=(t=e.parentNode.innerHTML)?t:""}(r.element):function(e){var t;return null!=(t=e.outerHTML)?t:""}(r.element)).replace(/<br><\/br>/g,"<br>").replace(/[\r\n]+\s*/g,""),P={start:E,end:T,text:A?_(A):null!=(n=null==(i=r.element.textContent)?void 0:i.trim())?n:"",region:S,regionStyle:b,html:A};return r.backgroundImageSource&&(P.image=r.backgroundImageSource),(h<0||v<0||y<0)&&t.debug("could not parse time string for TTML subtitle cue"),P},t.extractLayoutStylesCss=p,t.extractLayoutPositionStylesCss=f,t.extractImages=function(e){var t=b(e,"head"),i=b(t,"metadata");return i?h(i.getElementsByTagNameNS("*","image")).filter(function(e){var t;return e.hasAttribute("xml:id")&&(null==(t=e.prefix)?void 0:t.includes("smpte"))}).map(function(e){var t,i,n,r;return{mimeType:null!=(i=null==(t=e.getAttribute("imagetype"))?void 0:t.toLowerCase())?i:"png",id:"#"+e.getAttribute("xml:id"),base64:null!=(r=null==(n=e.textContent)?void 0:n.trim())?r:""}}):[]},t.getLayoutInfo=function(e){var t=new Map;if(!e)return t;var i=(0,c.parseAttributes)(e),s=n({},d),u=b(e,"head"),p=b(u,"layout"),f=p?h(p.getElementsByTagName("region")):[];if(!f||0===f.length)return t.set("cellResolutionRows",s.rows),t.set("cellResolutionColumns",s.columns),t;var g=i.get("cellResolution");if(g){var m=g.split(" "),v=parseInt(m[0],10),S=parseInt(m[1],10);isFinite(v)&&v>0&&(s.columns=v),isFinite(S)&&S>0&&(s.rows=S)}var E=b(u,"styling"),T=E?h(E.getElementsByTagName("style")):[];return f.forEach(function(e){var i=e.getAttribute("xml:id")||e.getAttribute("id");i&&t.set(i,function(e,t,i){var n=new Map,s=(0,c.parseAttributes)(e);if(n.set(o.CellResolutionRows,t.rows),n.set(o.CellResolutionColumns,t.columns),s.has("style")){var u=s.get("style"),d=u?u.split(" "):[];n.set(o.StyleIds,d),function(e,t){var i=e.get(o.StyleIds);function n(t,i){if((t.getAttribute("xml:id")||t.getAttribute("id"))===i){y(t.getAttribute("tts:origin"),t.getAttribute("tts:extent"),e);var n=(0,c.parseAttributes)(t);
vendor: 4,657 bytes, line 1
1Object.values(a).forEach(function(t){(0,c.processAttribute)(n,e,t,function(e){return e})})}}i&&(Array.isArray(i)?i.forEach(function(e){t.forEach(function(t){return n(t,e)})}):t.forEach(function(e){return n(e,i)}))}(n,i)}return function(e,t,i){var n=e.getElementsByTagName("style");n.length&&(h(n).forEach(function(e){(0,c.parseAttributes)(e).forEach(function(e,t){i.set(t,e)})}),r(r([],l.COLOR_STYLE_ATTRIBUTES,!0),l.BASE_STYLE_ATTRIBUTES,!0).forEach(function(e){(0,c.processAttribute)(i,t,e,function(e){return e})}))}(e,n,s),y(s.get("origin"),s.get("extent"),n),Object.values(a).forEach(function(e){(0,c.processAttribute)(s,n,e,function(e){return e})}),n}(e,s,T))}),t},t.splitUpTimedElements=function(e){if(!e||e.children.length<1)return[];var t=s.ModuleManager.get(u.ModuleName.Subtitles).createHtmlElement;return v(e).map(function(i){var n=t("div"),r=(0,c.parseAttributes)(i),o=(function(e,t){for(var i=[],n=e,r=function(e){return e.parentElement||e.parentNode};n&&r(n)&&r(n)!==t;)i.unshift(r(n)),n=r(n);return i})(i,e).reduce(function(e,t){return e.appendChild(t.cloneNode(!1))},n);return n.children[0]&&S(n.children[0]),o.appendChild(i),{end:r.get("end"),dur:r.get("dur"),begin:r.get("begin"),element:n.children[0]}})},t.getFirstElementByTagName=b;var o,a,s=i(88052),u=i(62756),c=i(32148),l=i(31207);!function(e){e.CellResolutionRows="cellResolutionRows",e.CellResolutionColumns="cellResolutionColumns",e.Top="top",e.Left="left",e.Width="width",e.Height="height",e.StyleIds="styleIDs"}(o||(t.LayoutInfoEntryKeys=o={})),function(e){e.DisplayAling="displayAlign",e.Padding="padding",e.WritingMode="writingMode",e.ShowBackground="showBackground",e.Overflow="overflow"}(a||(t.LayoutStyleProperties=a={}));var d={rows:15,columns:40};function h(e){for(var t=[],i=0;i<e.length;i++)t.push(e[i]);return t}function p(e){return r(r(r([],l.COLOR_STYLE_ATTRIBUTES,!0),l.BASE_STYLE_ATTRIBUTES,!0),Object.values(a),!0).filter(function(t){return e.has(t)}).map(function(t){var i=e.get(t),n=Array.isArray(i)?"":"".concat(i);return n?Object.values(l.TTMLSpecificAttributes).some(function(e){return e.toString()===t.toString()})?(0,l.getCssFromTtmlSpecificAttribute)(t,n):(0,l.getCssFromCommonAttribute)(t,n):""}).join("")}function f(e){return[o.Top,o.Left,o.Height,o.Width].map(function(t){return"".concat(t,":").concat(e.get(t),";")}).join("")}function g(e){var t=e.match(/^(\d+):(\d+):(\d+)((?:\.)(\d+)$)?/),i=t?function(e){var t=3600*parseInt(e[1]),i=60*parseInt(e[2]),n=parseInt(e[3]),r=0;return e[5]&&(r=.001*parseInt(e[5])),t+i+n+r}(t):function(e){var t=e.charAt(e.length-1);return"h"===t?3600*parseFloat(e.slice(0,-1)):"m"===t?60*parseFloat(e.slice(0,-1)):"s"===t?"m"===e.charAt(e.length-2)?parseFloat(e.slice(0,-2))/1e3:parseFloat(e.slice(0,-1)):NaN}(e);return isFinite(i)?i:-1}function m(e){var t=(0,c.parseAttributes)(e).get("region");if(t)return t;for(var i=e.children,n=0;n<i.length;n++){var r=m(i[n]);if(r)return r}return""}function y(e,t,i){if(e){var n=e.split(" ");i.set(o.Top,n[1]),i.set(o.Left,n[0])}if(t){var r=t.split(" ");i.set(o.Width,r[0]),i.set(o.Height,r[1])}}function v(e){var t=function(e){var t=(0,c.parseAttributes)(e);return t.has("begin")&&(t.has("end")||t.has("dur"))}(e),i=h(e.children).flatMap(v).filter(Boolean);return i.length>0?i:t?[e]:[]}function S(e){["begin","dur","end"].map(function(t){return(0,c.getQualifiedAttributeName)(e.attributes,t)}).filter(function(e){return!!e}).forEach(function(t){return e.removeAttribute(t)}),h(e.children).forEach(S)}function b(e,t){if(!e)return null;var i=e.getElementsByTagName(t);return i.length>0?i[0]:null}},31207:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.TTMLSpecificAttributesToCSS=t.TTMLSpecificAttributes=t.COLOR_STYLE_ATTRIBUTES=t.BASE_STYLE_ATTRIBUTES=void 0,t.applyStyling=function e(t,i,n,r){void 0===r&&(r=t.element);var s=function(e,t){var i="",n=e.getAttribute("style");return n&&(i+=n.split(" ").map(function(e){return f(e,t)}).join(";").replace(/;;+/g,";")),i+g(v(e))}(r,i);s.length>0&&r.setAttribute("style",s),(0,u.iterableToArray)(r.children).forEach(function(r){return e(t,i,n,r)}),function(e,t,i){var n=t.getAttribute("smpte:backgroundImage"),r=n?i.find(function(e){return e.id===n}):null;if(r){var s=o.ModuleManager.get(a.ModuleName.Subtitles).createHtmlElement("img"),u="data:image/".concat(r.mimeType,";base64,").concat(r.base64);s.setAttribute("style","width:100%"),s.setAttribute("src",u),e.backgroundImageSource=u,t.appendChild(s)}}(t,r,n)},t.getStylingInfo=function(e){var t=new Map,i=(0,u.getFirstElementByTagName)(e,"head"),n=(0,u.getFirstElementByTagName)(i,"styling");return n&&(0,u.iterableToArray)(n.getElementsByTagName("style")).forEac
1h(function(e){var i=e.getAttribute("xml:id")||e.getAttribute("id");i&&t.set(i,v(e))}),t},t.applyBodyStyle=function(e,t){if(t){var i=e.element.getAttribute("style");e.element.setAttribute("style",i?i+t:t)}},t.parseBodyStyle=function(e,t){var i=e.getAttribute("style"),n=v(e),r=i?f(i,t):"";return S(n).reduce(function(e,t){return"".concat(e).concat(t,":").concat(n.get(t),";")},r)},t.getCssFromCommonAttribute=function(e,t){return e===u.LayoutStyleProperties.Padding?"box-sizing:border-box;".concat(e,":").concat(t,";"):"".concat(e,":").concat(t,";")},t.getCssFromTtmlSpecificAttribute=function(e,i){var n=Object.values(r).find(function(t){return t===e});if(n){var o=t.TTMLSpecificAttributesToCSS[n],a=o.values[i];return o&&a?o.prefix+"".concat(o.cssProperty,":").concat(a,";"):""}return""},t.getCSSColorFromTTML=p,t.getCSSFromStyleID=f;var n,r,o=i(88052),a=i(62756),s=i(32148),u=i(76444),c=RegExp("^#([0-9a-fA-F]{3,8})$"),l=16,d=5,h=9;function p(e){var t=0,i=0,n=0,r=1;if(c.test(e)){if(e.length===d)return t=parseInt(e.slice(1,2),l),i=parseInt(e.slice(2,3),l),n=parseInt(e.slice(3,4),l),r=parseInt(e.slice(4),l),"rgba(".concat(t,",").concat(i,",").concat(n,",").concat(r,")");if(e.length===h)return t=parseInt(e.slice(1,3),l),i=parseInt(e.slice(3,5),l),n=parseInt(e.slice(5,7),l),r=parseInt(e.slice(7),l),"rgba(".concat(t,",").concat(i,",").concat(n,",").concat(r,")")}return e}function f(e,t){var i=t.get(e);return i instanceof Map?g(i):i?"".concat(e,":").concat(i):""}function g(e){var t=S(e).filter(function(e){return 0>["cellResolutionRows","cellResolutionColumns"].indexOf(e)}).map(function(t){return"".concat(t,":").concat(e.get(t))}).join(";");return""===t?t:"".concat(t,";")}function m(e){return e.replace(/(default)|(monospace(Sans)?Serif)/g,"monospace").replace(/(sansSerif)|(proportional(Sans)?Serif)/g,"sans-serif")}function y(e){return"wrap"===e?"break-word":"normal"}function v(e){var i=new Map,n=(0,s.parseAttributes)(e);return t.BASE_STYLE_ATTRIBUTES.forEach(function(e){(0,s.processAttribute)(n,i,e,function(e){return e})}),t.COLOR_STYLE_ATTRIBUTES.forEach(function(e){(0,s.processAttribute)(n,i,e,p)}),(0,s.processAttribute)(n,i,"font-family",m),(0,s.processAttribute)(n,i,"word-wrap",y),i}function S(e){var t=[];return e.forEach(function(e,i){return t.push(i)}),t}t.BASE_STYLE_ATTRIBUTES=["font-size","line-height","text-align","unicode-bidi","font-weight","direction","text-decoration","font-style","multiRowAlign","linePadding"],t.COLOR_STYLE_ATTRIBUTES=["color","background-color"],function(e){e.DISPLAY_ALIGN="displayAlign"}(r||(t.TTMLSpecificAttributes=r={})),(n={})[r.DISPLAY_ALIGN]={prefix:"display:flex;justify-content:center;",cssProperty:"align-items",values:{before:"flex-start",center:"center",after:"flex-end"}},t.TTMLSpecificAttributesToCSS=n}},function(e){return e(e.s=90942)}])},913:function(e){"use strict";self,e.exports=(self.webpackChunkbitmovin_player=self.webpackChunkbitmovin_player||[]).push([[831],{48519:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.WebVttSubtitlesModuleDefinition=void 0;var n=i(62756),r=i(69041),o=i(1757);t.WebVttSubtitlesModuleDefinition={name:n.ModuleName.SubtitlesWebVTT,module:function(){return{WebVttParser:o.WebVttParser,extractVttProperties:r.extractVttProperties}},dependencies:[n.ModuleName.Subtitles]},t.default=t.WebVttSubtitlesModuleDefinition},1757:function(e,t,i){var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])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=i(730),o=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.Jt(e):this.Kt(e,t)},e.prototype.Jt=function(e){var t,i,n=e.split("\n"),o=n[1],s=n[2],u=n[3],c=n[4],l=n.slice(5).join("\n"),d=a();d.start=Number(o),d.end=Number(s),d.i=Number(u);var h=r.parseContents(l,0,r.getPlaceholderVttStyleProperties());return d.text=null!=(i=null!=(t=null==h?void 0:h.textContent)?t:null==h?void 0:h.innerText)?i:"",d.html=r.stringifyCueHtml(h),c&&(d.vtt=r.parseOptions(c,[])),d.vtt.id=u,[d]},e.prototype.Kt=function(e,t){var i=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")}),n=this.Lt(e),r=this.Mt(i),o={vtt:n,base:t};return this.Tt(i,r,o)},e.prototype.Lt=function(e){var t=/X-TIMESTAMP-MAP=(.*)\n/.exec(e);if(null==(null==t?void 0:t[1]))return 0;var i=t[0],n=/LOCAL:((?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3}))/m.exec(i),o=/MPEGTS:(\d+)/m.exec(i),a=0;if(null==n?void 0:n[1]){var s=r.parseTime(n[1]);null!=s&&(a=s)}var u=0;return null!=o&&(u=Number(o[1])),u/9e4-a},e.prototype.Mt=function(e){for(var t=[],i=[],n=0,o=e;n<o.length;n++){var a=o[n],s=a[0];/^STYLE/.test(s.trim())&&i.push.apply(i,r.parseStyles(a)),/^region:?/i.test(s.trim())&&t.push.apply(t,r.parseRegions(a))}return{regions:t,styles:i}},e.prototype.Nt=function(e){var t=/^NOTE/.test(e),i=/^STYLE/.test(e),n=/^region:?/i.test(e);return!t&&!i&&!n},e.prototype.Ot=function(e){return null!=e&&""!==e&&!!e.includes("--\x3e")},e.prototype.Pt=function(e){var t={},i=[];return e.forEach(function(e){null==e.identifier&&(t=n(n({},t),e.style));var r=i.findIndex(function(t){return t.identifier===e.identifier});-1!==r?i[r]={identifier:e.identifier,style:n(n({},i[r].style),e.style)}:i.push(e)}),r.getPlaceholderVttStyleProperties().forEach(function(e){i.find(function(t){return t.identifier===e.identifier})||i.push(e)}),{globalStyle:t,contentStyles:i}},e.prototype.Qt=function(e,t){var i=r.stringifyCssProperties(t);i&&(e.html.setAttribute("style",i),e.subCues.forEach(function(e){e.html.setAttribute("style",i)}))},e.prototype.Rt=function(e,t,i){var n=/(<\d+:\d{2}:\d{2}[.,]\d{3}>)/g,o=[],a=function(e){var t=e[0].split(/[ \t]+-->[ \t]+/);return{start:r.parseTime(t[0]),end:r.parseTime(t[1])}}(e),u=a.start,c=a.end;if(null!==u&&null!==c){for(var l=function(e){return e.slice(1).join("\n").trim()}(e),d=l.split(n),h="",p=l.replace(n,""),f=u;d.length>0;){var g=d.shift(),m=d.shift(),y=m?r.parseTime(m):c,v=null!=y?y:c;if(f!==v){var S=s(g,h,p=p.substring(g.length));h+=g;var b=r.parseContents(S,i,t);o.push({updateTime:f,html:b}),f=v}}var E=o.shift();if(E)return{start:u,end:c,html:E.html,subCues:o}}},e.prototype.St=function(e,t,i){var r={};return i&&(r=e.filter(function(e){return e.identifier==="#"+i}).reduce(function(e,t){return n(n({},e),t.style)},{})),n(n({},t),r)},e.prototype.Tt=function(e,t,i){var o=this,s=[],u=0,c=t.regions,l=t.styles,d=this.Pt(l),h=d.globalStyle,p=d.contentStyles;return e.filter(function(e){return o.Nt(e[0])}).forEach(function(e){var t=void 0;e[0].includes("--\x3e")||(t=e[0].trim(),e.splice(0,1));var l=o.Ut(t,u);if(u=l,o.Ot(e[0])){var d=r.parseOptions(e[0],c);d.id=t;var f=o.Rt(e,p,i.base);if(void 0!==f){var g=o.St(p,h,t);o.Qt(f,g);var m=function(e,t,i,o){var s,u,c=a();return c.i=t,c.start=e.start+i.base,c.end=e.end+i.base,c.text=(null==(s=e.html)?void 0:s.textContent)||(null==(u=e.html)?void 0:u.innerText)||"",c.html=r.stringifyCueHtml(e.html),c.vtt=n({},o),0!==i.vtt&&(c.offset=i.vtt),c.updates=e.subCues.map(function(e){return{updateTime:e.updateTime+i.base,html:r.stringifyCueHtml(e.html)}}),c}(f,l,i,d);s.push(m)}}}),s},e.prototype.Ut=function(e,t){var i=Number(e);return null==e||isNaN(i)?t+1:i},e}();function a(){return{i:null,start:null,end:null,text:null,html:null,vtt:r.getDefaultVttProperties(),offset:null,updates:[]}}function s(e,t,i){return(t?u(t,"cue-past"):"")+e+(i?u(i,"cue-future"):"")}function u(e,t){return"<c.".concat(t,">").concat(e,"</c>")}t.WebVttParser=o,t.default=o},39157:function(e,t,i){var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},r=this&&this.__spreadArray||function(e,t,i){if(i||2==arguments.length)for(var n,r=0,o=t.length;r<o;r++)!n&&r in t||(n||(n=Array.prototype.slice.call(t,0,r)),n[r]=t[r]);return e.concat(n||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.parseContents=function(e,t,i){var n=o.ModuleManager.get(a.ModuleName.Subtitles).createHtmlElement("span");return g({input:e,root:n,current:n,tagStack:[],offset:t,styles:i})};
1var o=i(88052),a=i(62756),s=i(99735),u=i(69041),c={"&amp;":"&","&lt;":"<","&gt;":">","&lrm;":"‎","&rlm;":"‏","&nbsp;":"\xa0"},l={c:"span",i:"i",b:"b",u:"u",ruby:"ruby",rt:"rt",v:"span",lang:"span"},d={v:"title",lang:"lang"},h={rt:"ruby"},p={"cue-future":":future","cue-past":":past"},f=2;function g(e){var t=function(e){if(!e)return null;var t=/^([^<]*)(<[^>]+>?)?/.exec(e);if(!t)return null;var i=t[1],n=t[2];return i||n}(e.input);return null==t?e.root:(e.input=e.input.substring(t.length),function(e,t){if("<"!==e[0]){var i=t.current.ownerDocument.createTextNode(function(e){return Object.keys(c).forEach(function(t){e=e.replace(RegExp(t,"g"),c[t])}),e}(e));return t.current.appendChild(i),g(t)}if("/"===e[1])return function(e,t){return t.length>0&&t[t.length-1]===e.substring(f).replace(">","")}(e,t.tagStack)&&(t.tagStack.pop(),t.current=t.current.parentNode),g(t);var o=(0,u.parseTime)(e.substring(1,e.length-1));if(null!=o){var a=t.current.ownerDocument.createComment("time: ".concat(o+t.offset));return t.current.appendChild(a),g(t)}var m=/^<([^.\s/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/.exec(e);if(!m)return g(t);var y=m[0],v=m[1],S=m[2],b=m[3],E=function(e,t,i){var n=l[e];if(!n)return null;var r=i.createElement(n),o=d[e];return o&&t&&(r[o]=t.trim()),r}(v,b,t.current.ownerDocument);return E&&function(e,t){return!h[t.localName]||h[t.localName]===e.localName}(t.current,E)&&(function(e,t,i){var o=function(e,t){e=r(r([],e,!0),s.webVttDefaultClassStyles,!0);var i,o,a,c,l,d="",h="",f={};if(t.type&&"v"!==t.type&&(f=null!=(o=null==(i=e.find(function(e){return e.identifier===t.type}))?void 0:i.style)?o:f),t.contents){var g=t.contents.substring(1).split(".").map(function(e){return p[e]||".".concat(e)}),m=[];g.forEach(function(t){var i,n=null==(i=e.find(function(e){return e.identifier===t}))?void 0:i.style;n&&m.push(n)}),f=m.reduce(function(e,t){return n(n({},e),t)},{}),d=t.contents.split(".").join(" ").trim()}return"v"===t.type&&t.annotation&&(h=t.annotation.substring(1),f=null!=(c=null==(a=e.find(function(e){return e.identifier==="".concat(t.type,'[voice="').concat(h,'"]')}))?void 0:a.style)?c:f),{className:d,title:h,styleString:null!=(l=(0,u.stringifyCssProperties)(f))?l:""}}(t,i),a=o.className,c=o.title,l=o.styleString;c&&(e.title=c),a&&(e.className=a),l&&e.setAttribute("style",l)}(E,t.styles,{type:v,contents:S,annotation:b}),t.tagStack.push(y[1]),t.current.appendChild(E),t.current=E),g(t)}(t,e))}},99735:function(e,t){var i=this&&this.__spreadArray||function(e,t,i){if(i||2==arguments.length)for(var n,r=0,o=t.length;r<o;r++)!n&&r in t||(n||(n=Array.prototype.slice.call(t,0,r)),n[r]=t[r]);return e.concat(n||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.webVttDefaultClassStyles=void 0;var n=["white","lime","cyan","red","yellow","magenta","blue","black"];t.webVttDefaultClassStyles=i(i([],n.map(function(e){return{identifier:".".concat(e),style:{color:e}}}),!0),n.map(function(e){return{identifier:".bg_".concat(e),style:{background:e}}}),!0)},76171:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.parseOptions=function(e,t){var i=e.split(/\s/),n=(0,r.getDefaultVttProperties)();return i.forEach(function(e){o(e.split(":"),t,n)}),function(e){var t=(0,r.getDefaultVttProperties)();null!=e.region&&(e.vertical!==t.vertical||e.size!==t.size||e.line!==t.line)&&delete e.region}(n),n},t.setOptionProperty=o;var n=i(23068),r=i(69041);function o(e,t,i){var o=e[0],s=e[1];switch(o){case"region":!function(e,t,i){var n=t.find(function(t){return t.id===e});null!=n&&(i.region=n)}(s,t,i);break;case"vertical":!function(e,t){var i=(0,r.ensureArray)(/^(lr|rl)$/.exec(e))[1];null!=i&&(t.vertical=i)}(s,i);break;case"align":!function(e,t){var i=(0,r.ensureArray)(/^(start|middle|center|end|left|right)$/.exec(e))[1];null!=i&&(t.align=i),t.positionAlign=a(void 0,t)}(s,i);break;case"size":!function(e,t){var i=(0,r.ensureArray)(/^([\d.]+)%$/.exec(e))[1];null!=i&&(t.size=Number(i))}(s,i);break;case"position":!function(e,t){var i=(0,r.ensureArray)(/^([\d.]+|auto)%?(?:,(line-left|line-right|center))?$/.exec(e)),n=i[1],o=i[2];"auto"===n?t.position="auto":void 0!==n&&(t.position=Number(n)),t.positionAlign=a(o,t)}(s,i);break;case"line":!function(e,t){var i=(0,r.ensureArray)(/^(-?[\d.]+|auto)(%)?(?:,(start|end|center|auto))?$/.exec(e)),o=i[1],a=i[2],s=i[3],u="%"===a;"auto"===o?t.line="auto":u?t.line="".concat(o,"%"):null!=e&&(t.line=Number(o)),null!=s&&(t.lineAlign=s),t.snapToLines=(0,n.isNumber)(t.line)}(s,i)}}function a(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"}}}
vendor: 9,173 bytes, line 1
1,69041:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.getDefaultVttProperties=s,t.extractVttProperties=function(e){var t={vertical:"",align:"center",size:100,line:"auto",lineAlign:"start",position:"auto",positionAlign:"center",snapToLines:!1},i={id:null,width:100,lines:3,regionAnchorX:0,regionAnchorY:100,viewportAnchorX:0,viewportAnchorY:100,scroll:""};return Object.keys(t).forEach(function(r){return(0,a.setOptionProperty)(function(e,t,i){var r=[e,t[e]?"".concat(t[e]):i[e]],o="line"===e;return("position"===e&&(0,n.isNumber)(t[e])||o&&!1===t.snapToLines)&&(r[1]+="%"),r}(r,e,t),[i],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 i=t[1],n=t[2],r=t[3];return Number(t[4])/1e3+Number(r)+60*Number(n)+3600*(Number(i)||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],";")}).join(""):null},t.stringifyCueHtml=function(e){return(0,r.ModuleManager.get(o.ModuleName.Subtitles).HtmlTransformer.prepareHtml)((null==e?void 0:e.outerHTML)||"")};var n=i(23068),r=i(88052),o=i(62756),a=i(76171);function s(){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,i){Object.defineProperty(t,"__esModule",{value:!0}),t.parseRegions=function(e){for(var t=[],i=0,n=e;i<n.length;i++){var a=n[i];if(a=a.trim(),/^REGION$/i.test(a)){t.push(r(e));break}/^Region:/i.test(a)&&t.push(o(a))}return t};var n=i(69041);function r(e){return a(e.slice(1),":")}function o(e){return a(e.split(/[ \t]+/).slice(1),"=")}function a(e,t){var i=(0,n.getDefaultVttRegionProperties)();return e.forEach(function(e){!function(e,t){var i=e[0],r=e[1];switch(i){case"id":!function(e,t){null!=e&&(t.id=e)}(r,t);break;case"width":!function(e,t){var i=(0,n.ensureArray)(/^(\d{1,2}|100)%$/.exec(e))[1];null!=i&&(t.width=Number(i))}(r,t);break;case"lines":!function(e,t){var i=(0,n.ensureArray)(/^(\d+)$/.exec(e))[1];null!=i&&(t.lines=Number(i))}(r,t);break;case"regionanchor":!function(e,t){var i=(0,n.ensureArray)(/^(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(e)),r=i[1],o=i[2];null!=r&&(t.regionAnchorX=Number(r)),null!=o&&(t.regionAnchorY=Number(o))}(r,t);break;case"viewportanchor":!function(e,t){var i=(0,n.ensureArray)(/^(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(e)),r=i[1],o=i[2];null!=r&&(t.viewportAnchorX=Number(r)),null!=o&&(t.viewportAnchorY=Number(o))}(r,t);break;case"scroll":!function(e,t){var i=(0,n.ensureArray)(/^(up)$/.exec(e))[1];null!=i&&(t.scroll=i)}(r,t)}}(e.split(t),i)}),i}},22649:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.parseStyles=function(e){var t=[],i=/::cue(\((.+)\))?(?= |{)/,n=/([a-zA-Z0-9-]+):(.+?(?=;|}|$))/g,r=i.exec(e[1]);if(!r)return t;for(var o=1;o<e.length;o++){for(var a=i.exec(e[o]),s=null!==a,u=(r=s?a:r)[2],c={},l=n.exec(e[o]);null!==l;){var d=l[1],h=l[2];c[d]=h.trim(),l=n.exec(e[o])}(s||Object.keys(c).length>0)&&t.push({identifier:u,style:c})}return t},t.getPlaceholderVttStyleProperties=function(){return[{identifier:":future",style:{visibility:"hidden"}}]}},730:function(e,t,i){var n=this&&this.__createBinding||(Object.create?function(e,t,i,n){void 0===n&&(n=i);var r=Object.getOwnPropertyDescriptor(t,i);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[i]}}),Object.defineProperty(e,n,r)}:function(e,t,i,n){void 0===n&&(n=i),e[n]=t[i]}),r=this&&this.__exportStar||function(e,t){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(t,i)||n(t,e,i)};Object.defineProperty(t,"__esModule",{value:!0}),r(i(79347),t),r(i(39157),t),r(i(76171),t),r(i(69041),t),r(i(22649),t)}},function(e){return e(e.s=48519)}])},242:function(e){"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 i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};function n(e,t){return Object.keys(t).find(function(i){var n=t[i].getSubtitle(),r=n.id,o=n.lang,a=n.isFragmented,s=n.kind,u=r===e.id,c=!e.isFragmented||a===e.isFragmented,l=o===e.lang;e.isPreferred&&e.lang&&(l=o.includes(e.lang)||e.lang.includes(o));var d=s===e.kind&&l&&c;return u||d})}Object.defineProperty(t,"__esModule",{value:!0}),t.EnabledSubtitlesTracker=void 0,t.EnabledSubtitlesTracker=function(){function e(){this.JS={},this.KS=0}return e.prototype.addSubtitle=function(e){this.removeSubtitle(e.id),this.JS[this.MS()]=i({isFragmented:!1},e)},e.prototype.removeSubtitle=function(e){var t=this;Object.keys(this.JS).forEach(function(i){t.JS[i].id===e&&delete t.JS[i]})},e.prototype.shouldEnableSubtitle=function(e,t){var i=this;return!!Object.keys(this.JS).find(function(n){return i.LS(i.JS[n],t)===e.id})},e.prototype.LS=function(e,t){var i=e.id,r=e.kind,o=e.lang,a=e.isFragmented;return n({lang:o,kind:r,isFragmented:a,id:i},t)||n({lang:o,kind:r,isFragmented:a},t)||n({lang:o,kind:r},t)},e.prototype.MS=function(){return this.KS++,this.KS},e.prototype.dispose=function(){this.JS={},this.KS=0},e}()},53396:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.ForcedSubtitleController=void 0;var n=i(55552);t.ForcedSubtitleController=function(){function e(){this.NS={}}return e.prototype.addSubtitleHandler=function(e){this.NS[e.getSubtitle().id]=e},e.prototype.deactivate=function(){return this.PS()?Promise.all(Object.values(this.NS).map(function(e){return e.deactivate()})).then(function(){}):Promise.resolve()},e.prototype.activate=function(e){var t=this;return void 0===e&&(e=this.OS),this.PS()?(this.OS=e,this.deactivate().then(function(){var e=Object.values(t.NS).find(function(e){return(0,n.isEqualIsoLanguage)(e.getSubtitle().lang,t.OS)});if((e=null!=e?e:Object.values(t.NS)[0])&&!e.isActive())return e.activate().catch(function(){})})):Promise.resolve()},e.prototype.onSeek=function(e,t){Object.values(this.NS).forEach(function(i){return i.onSeek(e,t)})},e.prototype.onSeeked=function(e,t){Object.values(this.NS).forEach(function(i){return i.onSeeked(e,t)})},e.prototype.dispose=function(){Object.values(this.NS).forEach(function(e){return e.dispose()}),this.NS=null},e.prototype.PS=function(){return Object.keys(this.NS).length>0},e.prototype.getForcedSubtitleHandler=function(e){if(this.NS)return Object.values(this.NS).find(function(t){return e(t)})},e}()},42009:function(e,t){function i(e){return e.replace(/<[^>]*>?/g,"")}function n(e){return e.replace(/<br\s*\/?>/g,"\n")}Object.defineProperty(t,"__esModule",{value:!0}),t.htmlToText=function(e){return i(n(e))},t.stripHtmlTags=i,t.prepareHtml=function(e){return e.replace(/(\r\n|\r|\n)/g,"<br />")},t.replaceHtmlBreakPointsWithNewLine=n,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 i;if(void 0===t)return!1;if(null==(i=window.Intl)?void 0:i.DisplayNames){var n=new window.Intl.DisplayNames(["en"],{type:"language"});try{return n.of(e.split("-")[0])===n.of(t.split("-")[0])}catch(e){}}return e===t}},86058:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.parseMP4WrappedSubtitles=function(e,t){var i=e.getTimescale();if(void 0===i||!a.ModuleManager.has(s.ModuleName.ContainerMP4))return[];var o=a.ModuleManager.get(s.ModuleName.ContainerMP4);return function(e,t,i){var o=0,a=[],s=0;return e.forEach(function(e){var l=r.CodecStringHelper.extractCodec(t.getCodec()),d=e.duration/i,h=t.getPlaybackTime()+o,p=h+d;if(o+=d,"wvtt"===l||"vtt"===l){var f=function(e,t,i,r){for(var o=e.data.buffer,a=e.data.byteOffset,s=0,u=[],l="",d="";s<e.data.byteLength;){var h=e.data.getUint32(s),p=a+s,f=n.ArrayHelper.convertBufferSourceToUTF8(new Uint8Array(o,p+4,4));if("vttc"===f){if(l){var g=c(t,i,r,d,l);u.push(g),r+=1,l="",d=""}s+=8}else"payl"===f?l=n.ArrayHelper.convertBufferSourceToUTF8(new Uint8Array(o,p+8,h-8)):"sttg"===f&&(d=n.ArrayHelper.convertBufferSourceToUTF8(new Uint8Array(o,p+8,h-8))),s+=h}return l&&(g=c(t,i,r,d,l),u.push(g)),u}(e,h,p,s);s+=f.length,f.forEach(function(e){a.push({start:h,end:p,text:e})})}else"stpp"===l&&a.push({start:h,end:p,text:u(e)})}),a}(o.getMp4Fragments(e).flatMap(function(i){return o.getTrackSamples(i.moof,i.mdat,e,t)}),e,i)};var n=i(74853),r=i(34047),o=i(66502),a=i(88052),s=i(62756);function u(e){var t=new Uint8Array(e.data.buffer,e.data.byteOffset,e.data.byteLength);return n.ArrayHelper.convertBufferSourceToUTF8(t,o.TextSegmentAnalyzer.detectEncoding(e.data))}function c(e,t,i,n,r){return["[EMBEDDEDWEBVTT]",e,t,i,n,r].join("\n")}},52112:function(e,t,i){var n=this&&this.__createBinding||(Object.create?function(e,t,i,n){void 0===n&&(n=i);var r=Object.getOwnPropertyDescriptor(t,i);
1r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[i]}}),Object.defineProperty(e,n,r)}:function(e,t,i,n){void 0===n&&(n=i),e[n]=t[i]}),r=this&&this.__exportStar||function(e,t){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(t,i)||n(t,e,i)};Object.defineProperty(t,"__esModule",{value:!0}),t.SubtitleModuleDefinition=void 0;var o=i(62756),a=i(71340),s=i(42009),u=i(55552),c=i(78717),l=i(26438),d=i(606),h=i(85224);t.SubtitleModuleDefinition={name:o.ModuleName.Subtitles,module:function(){return{SubtitleService:d.SubtitleService,SubtitleParserFactory:l.SubtitleParserFactory,PlayerSubtitlesApiFactory:c.PlayerSubtitlesApiFactory,HtmlTransformer:s,LanguageComparer:u,hashCode:a.hashCode,createHtmlElement:h.createHtmlElement}},dependencies:[o.ModuleName.EngineBitmovin]},t.default=t.SubtitleModuleDefinition,r(i(82657),t)},15569:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.parsePlainTextSubtitles=function(e){var t,i,o=r.TextSegmentAnalyzer.detectEncoding(e.getData()),a=n.ArrayHelper.convertBufferSourceToUTF8(e.getData(),o),s=null!=(t=e.getPlaybackTime())?t:0;return[{start:s,end:s+(null!=(i=e.getDuration())?i:0),text:a}]};var n=i(74853),r=i(66502)},78717:function(e,t,i){var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])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=i(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,i){void 0===i&&(i=!0),e.enableSubtitle(t,i)},t.prototype.disable=function(t){e.disableSubtitle(t)},t.prototype.cueEnter=function(t){e.fireEvent(r.PlayerEvent.CueEnter,n(n({},t),{type:r.PlayerEvent.CueEnter}))},t.prototype.cueExit=function(t){e.fireEvent(r.PlayerEvent.CueExit,n(n({},t),{type:r.PlayerEvent.CueExit}))},t}())},e}()},26438:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.SubtitleParserFactory=void 0;var n=i(3714),r=i(88052),o=i(62756),a=i(22374);t.SubtitleParserFactory=function(){function e(){}return e.createInstance=function(e,t){var i;return t.indexOf("<?")>-1||t.indexOf("<tt")>-1?r.ModuleManager.has(o.ModuleName.SubtitlesTTML)?i=new(0,r.ModuleManager.get(o.ModuleName.SubtitlesTTML).TTMLParser)(e):e.eventHandler.dispatchEvent(n.PlayerEvent.Warning,new a.PlayerModuleMissingWarning(o.ModuleName.SubtitlesTTML,"The ".concat(o.ModuleName.SubtitlesTTML," module is required to parse TTML subtitles."))):r.ModuleManager.has(o.ModuleName.SubtitlesWebVTT)?i=new(r.ModuleManager.get(o.ModuleName.SubtitlesWebVTT)).WebVttParser:e.eventHandler.dispatchEvent(n.PlayerEvent.Warning,new a.PlayerModuleMissingWarning(o.ModuleName.SubtitlesWebVTT,"The ".concat(o.ModuleName.SubtitlesWebVTT," module is required to parse WebVTT subtitles."))),i},e}()},606:function(e,t,i){var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])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=i(80813),o=i(56481),a=i(3714),s=i(91678),u=i(93204),c=i(34047),l=i(85434),d=i(70850),h=i(88052),p=i(62756),f=i(22374),g=i(37723),m=i(53396),y=i(39310),v=i(60672),S=i(88788),b=i(69363),E=i(74715);t.SubtitleService=function(){function e(e){var t=this;this.context=e,this.getTransmuxer=function(){return t.Rs},this.ks=function(){t.js()},this.qs=function(e){t.js(),t.Ws=e.position;var i,n=null!=(i=t.Ws)?i:0,r=function(e){return"seekTarget"in e?e.seekTarget:e.target}(e);Object.values(t.Os).forEach(function(e){return e.onSeek(n,r)}),t.Us.onSeek(n,r)}
vendor: 18,348 bytes, line 1
1,this.rs=function(){var e,i=null!=(e=t.Ws)?e:0,n=t.context.internalPlayer.getCurrentTime();Object.values(t.Os).forEach(function(e){return e.onSeeked(i,n)}),t.Us.onSeeked(i,n)},this.vs=function(e,i){t.context.logger.debug("Switching periods in subtitleService");var n=t.Qs.findPeriod(e);n?(t.us(e,i),t.setupControllersForNextPeriod(n),t.ws()):t.context.logger.log("Can not find period with id = ".concat(e," in Manifest. Skipping period update"))},this.It=function(){Object.keys(t.Os).forEach(function(e){return t.Os[e].dispose()}),t.Os={},t.Ps&&(t.Ps.dispose(),t.Ps=void 0),t.Vs&&t.Vs.reset()},this.Os={},this.Ss=e.eventHandler,this.Qs=e.serviceManager.get(r.ServiceName.ManifestService,e.sourceContext.sourceIdentifier),this.Ts=new g.EnabledSubtitlesTracker,this.Us=new m.ForcedSubtitleController,this.Ss.on(a.PlayerEvent.Seek,this.qs),this.Ss.on(a.PlayerEvent.TimeShift,this.qs),this.Ss.on(a.PlayerEvent.Seeked,this.rs),this.Ss.on(a.PlayerEvent.TimeShifted,this.rs),this.Ss.on(a.PlayerEvent.SourceUnloaded,this.It),this.Ys=h.ModuleManager.has(p.ModuleName.SubtitlesCEA608)?h.ModuleManager.get(p.ModuleName.SubtitlesCEA608):void 0,this.bs()}return e.prototype.Zs=function(e,t){var i=e!==t,n=this.Qs.isHlsManifest()&&!(t||!e);return i||n},e.prototype.bs=function(){var e=this,t=this.context.serviceManager.get(r.ServiceName.SourceStoreService,this.context.sourceContext.sourceIdentifier);this.Xs=(0,u.subscribe)(t)(h.ModuleManager.get(p.ModuleName.EngineBitmovin).selectors.getPlayingPeriodId,this.vs,function(t,i){return e.Zs(t,i)})},e.prototype.setupControllersForNextPeriod=function(e){var t=this,i=h.ModuleManager.get(p.ModuleName.EngineBitmovin).getMimeTypeForAdaptationSet;e.AdaptationSet.forEach(function(e){var n=i(e);(0,E.isSubtitleTrack)(n,t.Qs.isHlsManifest())&&t.cs(e,n)})},e.prototype.cs=function(e,t){if((0,E.isFragmentedAdaptationSet)(e))return this.context.store.dispatch((0,s.initializeMetricsForMimeType)(t,this.context.settings)),void this.ds(e,t);this.es(e,t)},e.prototype.ds=function(e,t){var i=this.context.sourceContext.sourceIdentifier,n=this.context.serviceManager.get(r.ServiceName.SourceStoreService,this.context.sourceContext.sourceIdentifier);if(n){var o={mimeType:t,codec:h.ModuleManager.get(p.ModuleName.EngineBitmovin).getCodecsFromAdaptationSet(e),isHls:this.Qs.isHlsManifest(),manifestLoader:this.context.serviceManager.get(r.ServiceName.ManifestLoadingService,i),periodId:e._internalId.periodId,sourceStore:n};this.addFragmentSubtitle(o,e)}},e.prototype.es=function(e,t){if(h.ModuleManager.has(p.ModuleName.DASH)){var i=new(h.ModuleManager.get(p.ModuleName.DASH)).SegmentTemplateMPDHandler(this.context),n=this.Qs.toSubtitleTrack(e,t);i.setAdaptationSetId(e._internalId),n.url=i.getSubtitleUrl().toString(),this.addExternalSubtitle(n,e)}},e.prototype.setTransmuxer=function(e){this.Rs=e},e.prototype.hasSubtitle=function(e){return!!this.Os[e]},e.prototype.enableSubtitle=function(e){var t=this,i=this.Os[e];return i&&!i.isActive()?i.activate().then(function(){i.refresh(),t.Us.deactivate()}).then(function(){return t.Ts.addSubtitle(i.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.fs(e,t))return e;var i=new v.ExternalFileSubtitleHandler(this.context,e,t);return this.gs(i),e},e.prototype.fs=function(e,t){var i,n,r=this.Os[e.id],o=null!=(i=null==r?void 0:r.periodId)?i:null,a=null!=(n=null==t?void 0:t._internalId.periodId)?n:null;return r&&o===a?r:this.Us.getForcedSubtitleHandler(function(t){var i,n=t.getSubtitle().id===e.id,r=(null!=(i=t.periodId)?i:null)===a;return n&&r})},e.prototype.gs=function(e){var t=e.getSubtitle(),i=this.context.config.playback.isForcedSubtitle;if("function"==typeof i?(0,d.safeUserCallback)(function(){return i(t)},this.context.logger):t.forced)this.Us.addSubtitleHandler(e);else{var n=!1,r=t.id;this.Os[r]&&(n=this.Os[r].isActive(),this.xs(r)),this.hs(e),n&&e.activate()}},e.prototype.hs=function(e){var t=e.getSubtitle();this.is(t),this.Os[t.id]=e,this.ss(t)},e.prototype.is=function(e){var t,i,n=this.context.sourceContext.source.labeling,r=this.Qs.isHlsManifest()?null==(t=null==n?void 0:n.hls)?void 0:t.subtitles:null==(i=null==n?void 0:n.dash)?void 0:i.subtitles;"function"==typeof r&&(e.label=(0,d.safeUserCallback)(function(){return r(e)},this.context.logger))},e.prototype.addFragmentSubtitle=function(e,t){if(!h.ModuleManager.has(p.ModuleName.EngineBitmovin))return this.context.logger.warn("Unable to add fragmented subtitles because MSE Module is missing"),null;var i=this.Qs.toSubtitleTrack(t,e.mimeType);i.isFragmented=!0,i.url=null;var n=new S.FragmentedSubtitleHandler(this.context,e,i,this.getTransmuxer);return this.gs(n),i},e.prototype.setupCea608CaptionExtractor=function(e){if(!this.Ys)return this.Ss.dispatchEvent(a.PlayerEvent.Warning,new f.PlayerModuleMissingWarning(p.ModuleName.SubtitlesCEA608,"The ".concat(p.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(!h.ModuleManager.has(p.ModuleName.ContainerMP4))return this.Ss.dispatchEvent(a.PlayerEvent.Warning,new f.PlayerModuleMissingWarning(p.ModuleName.ContainerMP4,"The ".concat(p.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.Ps&&this.Ps.dispose();var t,i=h.ModuleManager.get(p.ModuleName.ContainerMP4),n=this.Ys.Cea608Extractor;return this.Ps=new n(e,i,null==(t=this.context.config.tweaks)?void 0:t.parse_cea_708_caption),this.Ps},e.prototype.js=function(){this.Ps&&(this.context.logger.debug("Resetting CEA caption extractor..."),this.Ps.reset())},e.prototype.ls=function(){var e=h.ModuleManager.get(p.ModuleName.HLS);this.Vs=new e.DiscontinuitySequenceNumberTracker(l.MimeTypeHelper.isVideo),this.Vs.subscribe(this.ks)},e.prototype.ms=function(e){this.Vs||this.ls(),this.Vs.trackSegment(e)},e.prototype.ns=function(){return this.Qs.getManifest()&&this.Qs.isHlsManifest()&&h.ModuleManager.has(p.ModuleName.HLS)},e.prototype.handleClosedCaptions=function(e,t,i,n){var r;return!n&&l.MimeTypeHelper.isVideo(t.getMimeType())&&(null==(r=this.Ys)?void 0:r.CEA_EXTRACTOR_SUPPORTED_CODEC_TAGS.includes((0,c.getCodecTag)(t)))?this.os(t,e.getTimestampOffset()):(this.ps(i,t.getPeriodId()),Promise.resolve())},e.prototype.os=function(e,t){var i=this;return this.Ps?(this.ns()&&this.ms(e),this.Ps.extract(e).then(function(n){!function(e,t){e.forEach(function(e){e.start-=t,e.end-=t})}(n,t),n.length>0&&(i.context.logger.insane("Extracted Closed Captions from fMP4: "+JSON.stringify(n)),i.ps(n,e.getPeriodId()))}).catch(function(e){var t;e instanceof f.PlayerModuleMissingWarning?(null==(t=i.Ps)||t.dispose(),i.Ps=void 0,i.Ss.dispatchEvent(a.PlayerEvent.Warning,e)):i.context.logger.debug("Error parsing CEA-608 Captions from fMP4: "+e)})):Promise.resolve()},e.prototype.ps=function(e,t){if(e&&Array.isArray(e)&&0!==e.length)for(var i=this.Qs.getClosedCaptionLabels(t),n=function(e){var n=e.channel;if(!r.Os[n]){var o=i.find(function(e){return e.id===n})||{id:n,kind:"captions",lang:"unknown",label:"Captions (".concat(e.channel,")")};r.hs(new y.Cea608Handler(r.context,o))}r.Os[n].addCaption(e,t)},r=this,o=0,a=e;o<a.length;o++)n(a[o])},e.prototype.ss=function(e){this.Ss.dispatchEvent(a.PlayerEvent.SubtitleAdded,{subtitle:n({},e)})},e.prototype.disableSubtitle=function(e){var t=this,i=this.Os[e];return i?i.deactivate().then(function(){return t.Ts.removeSubtitle(e),0===t.getActiveSubtitles().length&&t.Us.activate().catch(function(){}),!0}).catch(function(){return!1}):Promise.resolve(!1)},e.prototype.disableAllSubtitles=function(){var e=this;this.getActiveSubtitles().forEach(function(t){return e.disableSubtitle(t.id)})},e.prototype.removeSubtitle=function(e){this.xs(e),this.Ts.removeSubtitle(e)},e.prototype.getActiveSubtitles=function(){var e=this;return Object.keys(this.Os).filter(function(t){return e.Os[t].isActive()}).map(function(t){return e.Os[t].getSubtitle()})},e.prototype.hasSubtitles=function(){return Object.keys(this.Os).length>0},e.prototype.getAvailableSubtitles=function(e){return Object.values(this.Os).filter(function(t){var i=t.periodId;return!i||e===i}).map(function(e){return e.getSubtitle()})},e.prototype.enableForcedSubtitle=function(e){this.Us.activate(e).catch(function(){})},e.prototype.ts=function(e,t,i){var n=e.getSubtitleType()===b.SubtitleType.FRAGMENTED&&e.periodId===i,r=e.getSubtitleType()===b.SubtitleType.EXTERNAL_FILE&&e.periodId&&e.periodId!==t;return n||r},e.prototype.us=function(e,t){var i=this;Object.keys(this.Os).forEach(function(n){var r=i.Os[n];i.ts(r,e,t)&&i.xs(n)})},e.prototype.ws=function(){var e=this;Object.keys(this.Os).forEach(function(t){var i,n=e.Os[t];if(!n.isActive()&&e.Ts.shouldEnableSubtitle(n.getSubtitle(),e.Os)){var r={subtitle:n.getSubtitle()};null==(i=e.Ss)||i.dispatchEvent(a.PlayerEvent.SubtitleEnable,r),n.activate().then(function(){var t;null==(t=e.Ss)||t.dispatchEvent(a.PlayerEvent.SubtitleEnabled,r)})}})},e.prototype.xs=function(e){if(this.Os[e]){var t=this.Os[e].getSubtitle();this.Os[e].dispose(),delete this.Os[e],this.Ss&&this.Ss.dispatchEvent(a.PlayerEvent.SubtitleRemoved,{subtitle:t})}},e.prototype.clearBuffersUntil=function(e){var t=this;Object.keys(this.Os).forEach(function(i){return t.Os[i].clearBuffersUntil(e)})},e.prototype.dispose=function(){this.It(),this.Ts=(0,o.dispose)(this.Ts),this.Us=(0,o.dispose)(this.Us),this.Vs=(0,o.dispose)(this.Vs),this.Rs=void 0,this.Qs=null,this.Ss.off(a.PlayerEvent.Seek,this.qs),this.Ss.off(a.PlayerEvent.TimeShift,this.qs),this.Ss.off(a.PlayerEvent.Seeked,this.rs),this.Ss.off(a.PlayerEvent.TimeShifted,this.rs),this.Ss.off(a.PlayerEvent.SourceUnloaded,this.It),this.Xs(),this.Os={},this.Ss=null},e}()},74715:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.isSubtitleTrack=function(e,t){return(n.MimeTypeHelper.isText(e)||n.MimeTypeHelper.isTtmlXml(e))&&!t||n.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 n=i(85434)},74437:function(e,t,i){var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},r=this&&this.__runInitializers||function(e,t,i){for(var n=arguments.length>2,r=0;r<t.length;r++)i=n?t[r].call(e,i):t[r].call(e);return n?i:void 0},o=this&&this.__esDecorate||function(e,t,i,n,r,o){function a(e){if(void 0!==e&&"function"!=typeof e)throw TypeError("Function expected");return e}for(var s,u=n.kind,c="getter"===u?"get":"setter"===u?"set":"value",l=!t&&e?n.static?e:e.prototype:null,d=t||(l?Object.getOwnPropertyDescriptor(l,n.name):{}),h=!1,p=i.length-1;p>=0;p--){var f={};for(var g in n)f[g]="access"===g?{}:n[g];for(var g in n.access)f.access[g]=n.access[g];f.addInitializer=function(e){if(h)throw TypeError("Cannot add initializers after decoration has completed");o.push(a(e||null))};var m=(0,i[p])("accessor"===u?{get:d.get,set:d.set}:d[c],f);if("accessor"===u){if(void 0===m)continue;if(null===m||"object"!=typeof m)throw TypeError("Object expected");(s=a(m.get))&&(d.get=s),(s=a(m.set))&&(d.set=s),(s=a(m.init))&&r.unshift(s)}else(s=a(m))&&("field"===u?r.unshift(s):d[c]=s)}l&&Object.defineProperty(l,n.name,d),h=!0};Object.defineProperty(t,"__esModule",{value:!0}),t.AbstractSubtitleHandler=void 0;var a=i(80813),s=i(3714),u=i(80438),c=i(69957),l=i(44468),d=i(88052),h=i(62756);function p(e,t){return n({subtitleId:t,start:e.start,end:e.end},e.content)}t.AbstractSubtitleHandler=function(){var e,t=[];return e=function(){function e(e,i,n){void 0===n&&(n=null);var o=this;this.timeline=r(this,t),this.onCueEnter=function(e){o.context.eventHandler.dispatchEvent(s.PlayerEvent.CueEnter,p(e,o.getSubtitle().id))},this.onCueExit=function(e){o.context.eventHandler&&o.context.eventHandler.dispatchEvent(s.PlayerEvent.CueExit,p(e,o.getSubtitle().id))},this.onCueUpdate=function(e){o.context.eventHandler.dispatchEvent(s.PlayerEvent.CueUpdate,p(e,o.getSubtitle().id))},this.context=e,this.E9=i,this.E9.enabled=this.E9.enabled||!1,this.timeline=new u.Timeline(e,{onCueEnter:this.onCueEnter,onCueExit:this.onCueExit,onCueUpdate:this.onCueUpdate}),this.timeline.stopListening(),this.periodId=n,this.F9=e.serviceManager.get(a.ServiceName.SourceStoreService,e.sourceContext.sourceIdentifier)}return e.prototype.fireOnCueParsedEvents=function(e,t){var i=this;e&&this.context.eventHandler&&e.forEach(function(e){i.context.eventHandler.dispatchEvent(s.PlayerEvent.CueParsed,n(n({subtitleId:i.getSubtitle().id},e),{periodId:t}))})},e.prototype.isActive=function(){return this.E9.enabled},e.prototype.activate=function(){return this.E9.enabled=!0,this.timeline.startListening(),this.timeline.show(),Promise.resolve()},e.prototype.deactivate=function(){return this.E9.enabled=!1,this.timeline.stopListening(),this.timeline.hide(),Promise.resolve()},e.prototype.refresh=function(){this.timeline.show()},e.prototype.getSubtitle=function(){return this.E9},e.prototype.clearBuffersUntil=function(e){this.timeline.removeCuesUntil(e)},e.prototype.dispose=function(){this.F9=null,this.deactivate(),this.timeline.dispose()},e.prototype.isTsContainer=function(){var e,t=d.ModuleManager.get(h.ModuleName.EngineBitmovin),i=t.selectors,n=t.mseModuleTypes;return(null==(e=i.getContainerFormat(this.F9.getState(),l.MediaType.Video))?void 0:e.source)===n.containerFormat.TS},e.prototype.applyVttOffset=function(e){return this.isTsContainer()?e.map(function(e){return null!=e.offset?n(n({},e),{start:e.start+e.offset,end:e.end+e.offset,updates:e.updates.map(function(t){return n(n({},t),{updateTime:t.updateTime+e.offset})})}):e}):e},e}(),function(){var i="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;o(e,null,[(0,c.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:i},null,t),i&&Object.defineProperty(e,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:i})}(),e}()},39310:function(e,t,i){var n=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(t,i)};return function(t,i){if("function"!=typeof i&&null!==i)throw TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.Cea608Handler=void 0;var r=i(74437),o=i(69363);t.Cea608Handler=function(e){function t(t,i,n){return void 0===n&&(n=null),e.call(this,t,i,n)||this}return n(t,e),t.prototype.onSeek=function(){},t.prototype.onSeeked=function(e,t){var i=t<e,n=this.context.settings.CLEAR_BUFFERS_ON_SEEKING_BACKWARDS;i&&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 o.SubtitleType.IN_STREAM},t}(r.AbstractSubtitleHandler)},60672:function(e,t,i){var n=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(t,i)};return function(t,i){if("function"!=typeof i&&null!==i)throw TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.ExternalFileSubtitleHandler=void 0;var r=i(25926),o=i(4224),a=i(56481),s=i(3714),u=i(4129),c=i(29669),l=i(26438),d=i(74437),h=i(69363);t.ExternalFileSubtitleHandler=function(e){function t(i,n,r){var o=e.call(this,i,n,r&&r._internalId.periodId)||this;return o.US=function(e){if(o.timeline.removeCues(),null==e?void 0:e.body){o.TS=!0;var t=o.VS(e.body.trim()),i=o.applyVttOffset(t);o.fireOnCueParsedEvents(i,null),o.timeline.addCues(i)}},r&&(n.id=r.Representation[0]._id),n.url?(o.SS=t.enforceHTTPSForSecureOrigins(n.url.trim()),o.TS=!1,o.QS=new u.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.TS=!0,o.RS=Promise.resolve()),o}return n(t,e),t.prototype.activate=function(){var t=this;return this.context.logger.debug("loading "+this.SS),e.prototype.activate.call(this).then(function(){return t.RS?t.RS:t.TS?Promise.resolve():(t.RS=t.QS.load(t.SS).then(t.US).catch(function(e){var i,n;if(t.RS=void 0,!t.isActive())return Promise.resolve();throw t.context.eventHandler&&t.context.eventHandler.dispatchEvent(s.PlayerEvent.Warning,new r.PlayerWarning(o.WarningCode.NETWORK_COULD_NOT_LOAD_SUBTITLE)),t.context.logger.debug("Could not load subtitles/captions, got HTTP status code ".concat(null!=(n=null==(i=null==e?void 0:e.status)?void 0:i.toString())?n:""),e),t.deactivate(),"loading failed"}),t.RS)})},t.prototype.VS=function(e){return l.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.QS=(0,a.dispose)(this.QS)},t}(d.AbstractSubtitleHandler)},88788:function(e,t,i){var n=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||({__proto__:[]}
1)instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(t,i)};return function(t,i){if("function"!=typeof i&&null!==i)throw TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])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 o=i(4524),a=i(80813),s=i(3714),u=i(44468),c=i(87827),l=i(86897),d=i(93204),h=i(81199),p=i(34047),f=i(79721),g=i(85434),m=i(66502),y=i(23068),v=i(88052),S=i(62756),b=i(86058),E=i(15569),T=i(26438),_=i(74437),A=i(69363);function P(e){return m.TextSegmentAnalyzer.isPlainTextPayload(e.getData())}function M(e){var t=e.getCodec();return("wvtt"===t||"vtt"===t||""===t&&e.getMimeType().includes("vtt"))&&P(e)}function I(e,t){var i=v.ModuleManager.get(S.ModuleName.EngineBitmovin,!1);if(void 0!==t&&void 0!==i)return i.selectors.getContainerFormat(t,e)}function R(e){return"discontinuitySequenceNumber"in e}t.FragmentedSubtitleHandler=function(e){function t(t,i,n,r){var o=e.call(this,t,n,i.periodId)||this;return o.uS=function(e){var t,i=function(e){var t=null==e?void 0:e.getState();return void 0!==t&&void 0!==e?Promise.race((function(e){var t,i=null!=(t=e.activeTracks)?t:{};return Object.keys(i).flatMap(function(e){var t;return null!=(t=i[e].mediaTypes)?t:[]}).filter(function(e){return e===u.MediaType.Video||e===u.MediaType.Audio})})(t).map(function(i){return function(e,t,i){var n=I(i,t);return void 0!==n?Promise.resolve(n):(0,d.waitForStateChangeThen)(e)(function(e){return I(i,e)},function(e){return void 0!==e})}(e,t,i)})):Promise.reject("SourceState unavailable")}(o.context.serviceManager.get(a.ServiceName.SourceStoreService,o.context.sourceContext.sourceIdentifier)),n=null==(t=e.getSegmentInfo())?void 0:t.discontinuitySequenceNumber;return void 0!==n&&(i=i.then(function(){return o.lS(n)}).then(function(){return o.mS(n)}).then(function(){return o.isActive()}).catch(function(){return!1})),i.then(function(t){o.vS(e),t&&o.sS(e)})},o.MT=function(e){var t;if(e&&void 0!==e.time){var i=e.time;o.clearBuffersUntil(i);var n=(null==(t=o.dS)?void 0:t.getTimeForNextSegment(o.WS))||i,r=n-i,a=(0,h.getPlayableBufferLevel)(o.context.internalPlayer);isNaN(n)||r>=a||o.XS.hasNext(n)&&(o.XS.getMPDHandler().resolvePendingSegmentInfoRequests(),o.XS.getNext(n))}},o.OT=function(){o.XS.updateMpd()},o.eventHandler=t.eventHandler,o.bS=i.sourceStore,o.dS=t.serviceManager.get(a.ServiceName.StreamTimeService),o.cS=t.serviceManager.get(a.ServiceName.ManifestUpdateSchedulingService,t.sourceContext.sourceIdentifier),o.ZS=r,o.YS=i.isHls,o.aS=t.bufferSettings,o.XS=new(v.ModuleManager.get(S.ModuleName.EngineBitmovin)).SegmentController(t,o.uS,i.mimeType,i.codec,i.isHls,i.manifestLoader,i.periodId,i.sourceStore),o.XS.setCurrentLangObj(n),o.WS="".concat(i.mimeType,"/").concat(n.id),o.eS=v.ModuleManager.get(S.ModuleName.HLS,!1),o.gS(),o}return n(t,e),t.prototype.gS=function(){!this.fS&&this.bS&&(this.fS=(0,d.subscribe)(this.bS)(function(e){return null==e?void 0:e.manifest},this.OT,function(e,t){return!!((null==e?void 0:e.isInitialized)&&!(null==t?void 0:t.isInitialized))}))},t.prototype.hS=function(){this.fS&&(this.fS(),this.fS=void 0)},t.prototype.iS=function(e){return M(e)?(0,E.parsePlainTextSubtitles)(e):!function(e){return g.MimeTypeHelper.isApplication(e.getMimeType())&&!P(e)}(e)?e.getMetadata().subtitles:(0,b.parseMP4WrappedSubtitles)(e,this.context.logger)},t.prototype.jS=function(e){var t=e.getMetadata();t.subtitles=this.iS(e),e.setMetadata(t)},t.prototype.kS=function(e){var t,i=null!=(t=e.getPlaybackTime())?t:e.getSegmentInfo().startTime;e.setPlaybackTime(i)},t.prototype.lS=function(e){var t=this.ZS();return this.YS&&t?(void 0!==e&&this.rS()||(e=-1),t.waitForInitializationForDiscontinuity(e)):Promise.resolve()},t.prototype.mS=function(e){if(!this.rS()||void 0!==this.tS(e))return Promise.resolve();if(!this.eS)return Promise.reject(Error("HLS Module missing"));var t=this.eS.selectors,i=t.getHlsState,n=t.getPresentationTimeOffset;return(0,d.waitForStateChangeThen)(this.bS)(function(t){return n(i(t),String(e))},function(e){return void 0!==e}).then()},t.prototype.nS=function(e){var t,i,n=null==(t=this.context.serviceManager.get(a.ServiceName.SourceStoreService,e))?void 0:t.getState(),r=null==(i=this.XS.getCurrentAdaptationSet())?void 0:i.Representation[0];return r&&n?(0,v.ModuleManager.get(S.ModuleName.EngineBitmovin).selectors.getSegmentInfos)(n,r._internalId.key()):[]},t.prototype.oS=function(e,t){var i,n,r,o,s=v.ModuleManager.get(S.ModuleName.EngineBitmovin).AdaptationSetId,u=this.context.serviceManager.get(a.ServiceName.ManifestService,e),c=new s(f.DEFAULT_PERIOD_ID,t),l=null==u?void 0:u.getAdaptationSet(c);return null!=(o=null==(r=null==(n=null==(i=null==l?void 0:l.Representation[0])?void 0:i.SegmentList)?void 0:n[0])?void 0:r.SegmentURL)?o:[]},t.prototype.pS=function(){var e=this.context.sourceContext.sourceIdentifier;return this.context.settings.ENABLE_SEGMENT_INFO_PROVIDER_FROM_STORE?this.nS(e):this.oS(e,this.get
vendor: 5,270 bytes, line 1
1Subtitle().id)},t.prototype.qS=function(){var e=this.pS();if(e&&0!==e.length)return e.reduce(function(e,t){var i=R(t)?t.startTime:t._playbackTime,n=R(t)?t.discontinuitySequenceNumber:t._discontinuitySequenceNumber;return(0,y.isNumber)(i)&&(0,y.isNumber)(n)&&void 0===e[n]&&(e[n]=i),e},{})},t.prototype.rS=function(){var e,t=v.ModuleManager.get(S.ModuleName.HLS,!1),i=null==(e=this.bS)?void 0:e.getState();if(!t||!i)return!1;var n=t.selectors,r=n.getHlsState,o=n.getMergedDiscontinuityTimings,a=r(i);if(!a)return!1;var s=this.qS();if(!s)return!1;var u=o(a),c=Object.keys(s).find(function(e){return!u[e]||Math.abs(u[e].startTime-s[e])>1}),l=Object.keys(u).find(function(e){return null==s[e]});return null==c&&null==l},t.prototype.sS=function(e){this.wS(e),this.jS(e),this.kS(e),this.IT(e),this.isActive()&&this.timeline.show()},t.prototype.tS=function(e){var t;if(this.eS){var i=this.eS.selectors,n=i.getHlsState,r=i.getPresentationTimeOffset,o=null==(t=this.bS)?void 0:t.getState(),a=o?n(o):void 0;if(a)return r(a,String(e))}},t.prototype.vS=function(e){var t,i=e.getPlaybackTimeRange();if(i){var n=v.ModuleManager.get(S.ModuleName.EngineBitmovin),r=n.actions.removeStreamTimeRange,o=n.mseModuleTypes.streamTimeRangeType;null==(t=this.bS)||t.dispatch(r(this.WS,i,o.Loading))}},t.prototype.wS=function(e){var t,i=e.getPlaybackTimeRange();if(!e.isInit()&&i){var n=v.ModuleManager.get(S.ModuleName.EngineBitmovin).actions.addLoadedRange,o=r(r({},i),{bufferBlockId:-1});null==(t=this.bS)||t.dispatch(n(this.WS,o))}},t.prototype.xS=function(e){var t,i,n=-this.XS.getMPDHandler().getTimestampOffset();if(this.YS){var r=e.getSegmentInfo().discontinuitySequenceNumber,o=this.tS(r);void 0!==o?n=-o:this.context.logger.warn("FragmentedSubtitleHandler: Failed to get PTO for disco sequence ".concat(r," from store, falling back to MPDHandler value of ").concat(-n),e.getSegmentInfo())}return n+(null!=(i=null==(t=this.ZS())?void 0:t.getTimestampMappingOffset(e))?i:0)},t.prototype.IT=function(e){var i=e.getMetadata().subtitles;if(Array.isArray(i)&&0!==i.length){var n=M(e),r=this.xS(e),o=n||function(e){return"stpp"===p.CodecStringHelper.extractCodec(e.getCodec())}(e)||function(e){return"application/mp4"===e.getMimeType()&&"wvtt"===e.getCodec()&&!P(e)}(e)?this.JT(i,r):i,a=n?this.applyVttOffset(o):o,s=t.ensureCueInSegmentRange(a,e.getPlaybackTime(),e.getDuration(),r,this.isTsContainer());this.fireOnCueParsedEvents(s,this.periodId),this.timeline.addCues(s)}},t.prototype.JT=function(e,t){var i=this;return e.flatMap(function(e){return i.KT(e.text,t)})},t.ensureCueInSegmentRange=function(e,t,i,n,o){if(void 0===o&&(o=!1),!t&&0!==t||t<0||!i)return e;if(e.length>0){var a=i+n;if(e.every(function(e){return e.end<=a}))return e.map(function(e){return o&&null!=e.offset?r(r({},e),{start:e.start+t-n-e.offset,end:e.end+t-n-e.offset}):r(r({},e),{start:e.start+t-n,end:e.end+t-n})})}return e},t.prototype.KT=function(e,t){var i=T.SubtitleParserFactory.createInstance(this.context,e);return t?i.parse(e,t):i.parse(e)},t.prototype.activate=function(){var t=this;return e.prototype.activate.call(this),this.LT().then(function(){if(t.isActive()){var e=function(e,t){var i=(0,c.getPlayerState)(t.getState());return(0,c.getIsSeekingOrTimeshifting)(i)?i.targetPlaybackTime:e.getCurrentTime(!0)}(t.context.renderer,t.context.store);t.XS.activateSubtitleSegmentController(e),t.XS.hasNext(e)&&t.XS.getNext(e),t.eventHandler.on(s.PlayerEvent.TimeChanged,t.MT)}})},t.prototype.LT=function(){var e=this.XS.getCurrentAdaptationSet().Representation[0],t=e._internalId,i=e._mimeType,n=v.ModuleManager.get(S.ModuleName.EngineBitmovin).actions,r=n.setRepresentationIdAction,o=n.setMediaTypeAction;return this.bS.dispatch(r(t)),this.bS.dispatch(o(t,g.MimeTypeHelper.getMediaType(i))),this.cS.waitForRepUpdate(t)},t.prototype.deactivate=function(){this.timeline.removeCues();var t,i=v.ModuleManager.get(S.ModuleName.EngineBitmovin).actions,n=i.resetStreamTimeline,r=i.resetLoadedRanges;this.eventHandler.off(s.PlayerEvent.TimeChanged,this.MT),this.bS.dispatch(n(this.WS)),this.bS.dispatch(r(this.WS));var o=null==(t=this.XS.getCurrentAdaptationSet())?void 0:t._internalId;return o&&this.bS.dispatch(v.ModuleManager.get(S.ModuleName.EngineBitmovin).actions.removeActiveTrackAction(o)),e.prototype.deactivate.call(this)},t.prototype.getSubtitleType=function(){return A.SubtitleType.FRAGMENTED},t.prototype.clearBuffersUntil=function(t){e.prototype.clearBuffersUntil.call(this,t);var i=v.ModuleManager.get(S.ModuleName.EngineBitmovin).actions.removeLoadedRange;this.bS.dispatch(i(this.WS,{start:0,end:t,bufferBlockId:-1}))},t.prototype.NT=function(e){var t,i=null==(t=this.bS)?void 0:t.getState(),n=(0,l.getBufferState)(i),r=n?(0,l.getLoadedRangesForMimeType)(n,this.WS):[];return(0,o.isInTimeRanges)(r,e)},t.prototype.onSeek=function(e,t){this.isActive()&&(this.NT(t)||this.XS.cancelLoading())},t.prototype.onSeeked=function(e,t){if(this.isActive()&&!this.NT(t)){this.timeline.removeCues();var i=v.ModuleManager.get(S.ModuleName.EngineBitmovin).actions.resetLoadedRanges;this.bS.dispatch(i(this.WS)),this.XS.seekTo(t),this.XS.hasNext(t)&&this.XS.getNext(t)}},t.prototype.dispose=function(){e.prototype.dispose.call(this),this.hS(),this.XS.dispose()},t}(_.AbstractSubtitleHandler)},69363:function(e,t){var i;
1Object.defineProperty(t,"__esModule",{value:!0}),t.SubtitleType=void 0,function(e){e[e.EXTERNAL_FILE=0]="EXTERNAL_FILE",e[e.FRAGMENTED=1]="FRAGMENTED",e[e.IN_STREAM=2]="IN_STREAM"}(i||(t.SubtitleType=i={}))},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 i=0;i<e.length;i++)t=(t<<5)-t+e.charCodeAt(i)|0;return t}},85224:function(e,t,i){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 i=(null!=n||(n=new DOMParser),n).parseFromString("<".concat(e,"></").concat(e,">"),"text/html");return(null==(t=i.body)?void 0:t.firstChild)||i.firstChild}return document.createElement(e)};var n,r=i(21513),o=void 0}},function(e){return e(e.s=52112)}])},607:function(e){"use strict";self,e.exports=(self.webpackChunkbitmovin_player=self.webpackChunkbitmovin_player||[]).push([[898],{5214:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.BitmovinThumbnailService=void 0;var n=i(56481),r=i(94685),o=i(2758),a=i(93617);t.BitmovinThumbnailService=function(){function e(e){this.context=e,this.sy=new a.ThumbnailTimelineStore(e)}return e.prototype.addThumbnails=function(e){var t=this;if(!this.sy||!(0,r.isContextAvailable)(this.context))return Promise.resolve();this.sy.clear();var i=(0,o.createThumbnailParser)(this.context,e);return i.parse(e).then(function(e){var i;return null==(i=t.sy)?void 0:i.addTracks(e)}).finally(function(){return i.dispose()})},e.prototype.getThumbnail=function(e,t){var i,n;return null!=(n=null==(i=this.sy)?void 0:i.getThumbnail(e,t))?n:null},e.prototype.dispose=function(){this.sy=(0,n.dispose)(this.sy)},e}()},78270:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.DashThumbnailParser=void 0,t.isDashThumbnailSet=u,t.getSegmentTemplate=c;var n=i(94685),r=i(85434),o=i(23068),a=i(15827),s=i(59462);function u(e){if(!e)return!1;var t=r.MimeTypeHelper.isImage(e._mimeType)&&"image"===e._contentType,i=Array.isArray(e.Representation)&&null!=c(e);return!!(t&&i)}function c(e){return l(null==e?void 0:e.Representation[0])||l(e)}function l(e){var t,i;return null!=(i=null==(t=null==e?void 0:e.SegmentTemplate)?void 0:t[0])?i:null}t.DashThumbnailParser=function(){function e(e){this.context=e}return e.prototype.parse=function(e){var t=this,i=e.filter(function(e){return u(e.adaptationSet)&&(0,o.isNumber)(e.timing.startTime)});return 0===i.length?Promise.resolve([]):Promise.resolve(i.flatMap(function(e){try{return t.hab(e)}catch(e){return(0,n.isContextAvailable)(t.context)&&t.context.logger.warn("Error parsing DASH thumbnails: ".concat(e)),[]}}))},e.prototype.hab=function(e){var t=this;return e.adaptationSet.Representation.reduce(function(i,n){var r=(0,a.parseThumbnailRepresentation)(n,e,t.context),o=(0,s.mapToThumbnailTrack)(r);return null!=o&&i.push(o),i},[])},e.prototype.dispose=function(){},e}()},15827:function(e,t,i){var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])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,i){return new l(e,t,i).parseRepresentation()};var r=i(80813),o=i(77179),a=i(89927),s=i(88052),u=i(62756),c=i(78270),l=function(){function e(e,t,i){this.representation=e,this.source=t,this.context=i,this.hasValidData=!!(e&&t&&i)&&this.validate()}return e.prototype.validate=function(){this.Deb=this.source.timing;var e=(0,c.getSegmentTemplate)(this.source.adaptationSet);return!(!e||!this.representation||(this.Eeb=e,!(this.Eeb._media&&this.representation.BaseURL&&this.representation.BaseURL[0].url)||(this.Heb=this.Eeb._media,this.Feb=this.representation.BaseURL[0].url,!this.representation.EssentialProperty||!this.representation.EssentialProperty[0]||(this.Ieb=this.representation.EssentialProperty[0],this.Eeb.SegmentTimeline&&this.Eeb.SegmentTimeline[0]&&(this.Geb=this.Eeb.SegmentTimeline[0]),0))))},e.prototype.parseRepresentation=function(){return this.hasValidData?this.Geb?this.Ufb():this.Jeb():[]},e.prototype.Jeb=function(){var e,t=this.Zfb(),i=Number(this.Eeb._timescale)||1,n=Number(null!=(e=this.Eeb._startNumber)?e:1),r=Number(this.Eeb._duration)/i,o=(this.Eeb._presentationTimeOffset||0)/i,a=this.bfb(),c=r/a.ttiles,l=Math.ceil(this.Deb.duration/c),d=n-1+Math.ceil(this.Deb.duration/r),h=[],p=s.ModuleManager.get(u.ModuleName.DASH).replaceAllPlaceholders;t>0&&(n+=Math.floor(t/r),this.Deb.startTime=Math.ceil(this.Deb.startTime+t));for(var f=n;f<=d;f++){var g=h[h.length-1]||{start:0,end:this.Deb.startTime},m=p(this.Heb,this.representation,f),y={start:g.end,end:r-o,url:this.Feb+m,text:m};h=h.concat(this.Yfb(a,y,c,this.representation))}return h.slice(0,l)},e.prototype.Ufb=function(){for(var e=parseInt(this.Eeb._timescale)||1,t=s.ModuleManager.get(u.ModuleName.DASH).replaceAllPlaceholders,i=Number(this.Eeb._startNumber)||0,n=this.bfb(),r=this.Wfb(e)&&this.Eeb._presentationTimeOffset||0,o=[],a=0,
1c=0,l=0;l<this.Geb.S.length;l++){var d=this.Geb.S[l],h=(Number(d._r)||0)+1,p=Number(d._d),f=this.Geb.S[l+1];isNaN(p)&&null!=f&&(p=(Number(f._t)-Number(d._t))/h);for(var g=p/e/n.ttiles,m=0;m<h;m++){var y=null==d._t?c:Number(d._t)+m*p;c=y+p;var v=t(this.Heb,this.representation,i+a,y);a++;var S={start:(y-r)/e,end:(c-r)/e,url:this.Feb+v,text:v};o=o.concat(this.Yfb(n,S,g,this.representation))}}return this.afb(o),o},e.prototype.Vfb=function(){var e,t=this.context.sourceContext.sourceIdentifier,i=this.context.serviceManager.get(r.ServiceName.ManifestService,t);return null!=(e=null==i?void 0:i.isLive())&&e},e.prototype.Wfb=function(e){return!this.Vfb()||this.Xfb(e)},e.prototype.Xfb=function(e){var t,i=this.Eeb._presentationTimeOffset||0;if(0===i)return!1;var n=null==(t=this.Geb.S[0])?void 0:t._t;if(!n)return!1;var r=Number(n)/e;return Math.abs(Number(n)-i)/e<3600&&r>1e9},e.prototype.Yfb=function(e,t,i,r){for(var o=[],a={width:r._width/e.htiles,height:r._height/e.vtiles},s=0,u=0;u<e.vtiles;u++)for(var c=0;c<e.htiles;c++){var l=t.start+s;o.push(n(n({},t),{start:l,end:l+i,x:c*a.width,y:u*a.height,width:a.width,height:a.height})),s+=i}return o},e.prototype.Zfb=function(){if(isFinite(this.Deb.duration))return 0;var e,t=this.context.serviceManager.get(r.ServiceName.ManifestService,this.context.sourceContext.sourceIdentifier);if(!t)return 0;this.Deb.startTime=(0,a.toSeconds)(t.getAvailabilityStartTime());var i=null==(e=t.findPeriod(this.representation._internalId.periodId))?void 0:e.start;return isFinite(i)&&(this.Deb.startTime=i),this.Deb.duration=(0,a.toSeconds)(Date.now())-this.Deb.startTime,this.Deb.startTime+this.Deb.duration+t.getTimeShiftBufferDepthSeconds()-this.Deb.startTime},e.prototype.afb=function(e){var t;if(this.Vfb()){var i=this.context.sourceContext.sourceIdentifier,n=null==(t=this.context.serviceManager.get(r.ServiceName.SourceStoreService,i))?void 0:t.getState();if(n){var a=(0,o.getStartTimeOffset)(n);e.forEach(function(e){e.start+=a,e.end+=a})}}},e.prototype.bfb=function(){var e,t=1,i=1;return["http://dashif.org/thumbnail_tile","http://dashif.org/guidelines/thumbnail_tile"].includes(this.Ieb._schemeIdUri)&&(t=(e=this.Ieb._value.split("x").map(function(e){return parseInt(e)}))[0],i=e[1]),{vtiles:i,htiles:t,ttiles:i*t}},e}()},86200:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.BitmovinThumbnailModuleDefinition=void 0;var n=i(62756),r=i(5214);t.BitmovinThumbnailModuleDefinition={name:n.ModuleName.Thumbnail,module:{createThumbnailService:function(e){return new r.BitmovinThumbnailService(e)},extendAdaptationSets:function(e,t,i){return e}}},t.default=t.BitmovinThumbnailModuleDefinition},2758:function(e,t,i){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,n.isDashThumbnailSet)(e.adaptationSet)})?new n.DashThumbnailParser(e):{parse:function(){return Promise.resolve([])},dispose:function(){}}};var n=i(78270),r=i(75042)},41358:function(e,t){function i(e,t,n){var r=n.start,o=void 0===r?0:r,a=n.end,s=void 0===a?t.length:a,u=o+Math.floor((s-o)/2),c=t[u];return!function(e,t){return t>=e.start&&t<=e.end}(c,e)?u===o?null:c.start>e?i(e,t,{start:o,end:u}):i(e,t,{start:u,end:s}):c}Object.defineProperty(t,"__esModule",{value:!0}),t.ThumbnailTimeline=void 0,t.ThumbnailTimeline=function(){function e(e){this.eab=[],this.fab=e.width,this.gab=e.height}return e.prototype.addThumbnails=function(e){this.eab=this.eab.concat(e)},e.prototype.getThumbnail=function(e){var t=this.eab.length;return 0===t||e<this.eab[0].start||e>this.eab[t-1].end?null:i(e,this.eab,{start:0,end:t})||null},e.prototype.getThumbnailWidth=function(){return this.fab},e.prototype.getThumbnailHeight=function(){return this.gab},e.prototype.clearThumbnails=function(){this.eab=[]},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,i){Object.defineProperty(t,"__esModule",{value:!0}),t.ThumbnailTimelineStore=void 0;var n=i(41358);function r(e,t,i){return Math.abs(t-e.getThumbnailWidth())+Math.abs(i-e.getThumbnailHeight())}t.ThumbnailTimelineStore=function(){function e(e){this.context=e,this.yW=[]}return e.prototype.addTracks=function(e){var t=this;0!==e.length&&e.forEach(function(e){return t.zW(e).addThumbnails(e.thumbnails)})},e.prototype.getThumbnail=function(e,t){if(0===this.yW.length)return null;var i,n,o=null!=(n=null==(i=this.context.settings)?void 0:i.THUMBNAIL_TO_PLAYER_SIZE_RATIO)?n:1;return(function(e,t,i){return i.reduce(function(i,n){var o=r(i,e,t);return r(n,e,t)<o?n:i})})(t.width*o,t.height*o,this.yW).getThumbnail(e)},e.prototype.zW=function(e){var t=this.yW.find(function(t){return t.isMatchingTimeline(e)});return t||(t=new n.ThumbnailTimeline(e),this.yW.push(t),t)},e.prototype.clear=function(){this.yW.forEach(function(e){return e.dispose()}),this.yW=[]},e.prototype.dispose=function(){this.clear()},e}()},75042:function(e,t,i){var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};
vendor: 128,405 bytes, line 1
1Object.defineProperty(t,"__esModule",{value:!0}),t.WebVttThumbnailParser=void 0;var r=i(4129),o=i(29669),a=i(94685),s=i(58313),u=i(88052),c=i(62756),l=i(59462);t.WebVttThumbnailParser=function(){function e(e){this.context=e}return e.prototype.parse=function(e){var t=this;if(!(0,a.isContextAvailable)(this.context))return Promise.resolve([]);var i=e.slice(0,e.lastIndexOf("/")+1);return this.iab(e,this.context).then(function(e){if(!e)return[];var r=t.kab().parse(e).map(function(e){return function(e,t){var i="#xywh=",r=e.text;if(-1===r.indexOf(i))return n(n({},e),{url:s.URLHelper.concatUrlParts(t,r)});var o=r.indexOf(i)+6,a=r.substring(o);r=r.slice(0,o-6);var u=a.split(","),c=u[0],l=u[1],d=u[2],h=u[3];return n(n({},e),{url:s.URLHelper.concatUrlParts(t,r),x:parseFloat(c),y:parseFloat(l),w:parseFloat(d),h:parseFloat(h)})}(e,i)}).map(function(e){return 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}}(e)}),o=(0,l.mapToThumbnailTrack)(r);return null!=o?[o]:[]}).catch(function(e){return(0,a.isContextAvailable)(t.context)&&t.context.logger.warn("Error trying to get WebVtt thumbnails: ".concat(e)),[]})},e.prototype.iab=function(e,t){if(s.URLHelper.isDataUri(e))return Promise.resolve(this.jab(e,t.logger));var i=new r.DefaultContentLoader(t,{requestType:o.HttpRequestType.MEDIA_THUMBNAILS});return i.load(e).then(function(e){return e.body}).finally(function(){return i.dispose()})},e.prototype.jab=function(e,t){try{return s.URLHelper.parseDataUri(e).data}catch(e){throw t.warn("Error decoding WebVtt thumbnail data URI: ".concat(e)),e}},e.prototype.kab=function(){return new(u.ModuleManager.get(c.ModuleName.SubtitlesWebVTT)).WebVttParser},e.prototype.dispose=function(){},e}()},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)}])},465:function(e){"use strict";self,e.exports=(self.webpackChunkbitmovin_player=self.webpackChunkbitmovin_player||[]).push([[209],{35725:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.UIModuleDefinition=void 0;var n=i(62756),r=i(18528);t.UIModuleDefinition={name:n.ModuleName.UI,module:{},hooks:{setup:function(e,t){null!=(i=e.uiControlsMap)||(e.uiControlsMap=new WeakMap);var i,n=new r.UiControls(t);e.uiControlsMap.set(t,n)},destroy:function(e,t){var i,n,r=null==(i=e.uiControlsMap)?void 0:i.get(t);return r&&(r.dispose(),null==(n=e.uiControlsMap)||n.delete(t)),Promise.resolve()}}},t.default=t.UIModuleDefinition},18528:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.UiControls=void 0;var n=i(45202),r=i(43767),o=i(70850);t.UiControls=function(){function e(e){this.yv=!1,this.zv=null;var t=e.getConfig(!0);!1!==t.ui&&(t.ui&&(this.Av=t.ui),this.Bv(e))}return e.prototype.Bv=function(e){var t=this,i=e.getConfig(),o=e.getConfig(!0);r.FileLoader.getInstance().loadCSS(o.location.ui_css,o.style),this.Cv(i,o).then(function(i){var r;i?n.Environment.modules.playerui=i:(null==(r=window.bitmovin)?void 0:r.playerui)&&(n.Environment.modules.playerui=window.bitmovin.playerui),t.Dv(e,o)}).catch(function(e){console.warn("Could not load UI",e),t.zv=null})},e.prototype.Cv=function(t,i){if(null!=(null==(o=t.location)?void 0:o.ui))return r.FileLoader.getInstance().loadScript(t.location.ui,!0);if(e.isDefaultUIAvailable())return Promise.resolve(n.Environment.modules.playerui);var o,a=i.location.ui;return r.FileLoader.getInstance().loadScript(a,!0)},e.prototype.Dv=function(e,t){this.yv||(this.zv=t.style.uiManagerFactory(e,this.Av))},e.isDefaultUIAvailable=function(){if(!n.Environment.modules.playerui||!n.Environment.modules.playerui.UIFactory)return!1;var e=n.Environment.modules.playerui.UIFactory;return e&&o.Util.isFunction(e.buildUI)},e.prototype.dispose=function(){this.yv=!0,this.zv&&this.zv.release()},e}()}},function(e){return e(e.s=35725)}])},310:function(e){"use strict";self,e.exports=(self.webpackChunkbitmovin_player=self.webpackChunkbitmovin_player||[]).push([[838],{84276:function(e,t,i){var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.BaseMediaDecodeTimeHandler=t.PtoGapFillingMode=void 0;var r,o=i(4524),a=i(80813),s=i(87827),u=i(68925),c=i(47602),l=i(19483),d=i(34841),h=i(87244),p=i(85434),f=i(15487),g=i(89927),m=i(19274),y=i(88052),v=i(62756),S=i(44885),b=i(73849),E=i(8301),T=i(48558),_=i(21651);!function(e){e.KeepGaps="keep-gaps",e.FillGaps="fill-gaps"}(r||(t.PtoGapFillingMode=r={})),t.BaseMediaDecodeTimeHandler=function(){function e(e,t,i,a){var s=this;this.maxSafeBaseMediaDecodeTime=i,this.maxSafePresentationTimeOffset=a,this.VU=function(){s.XU(s.CT.settings.END_OF_BUFFER_TOLERANCE)},this.WU=function(){s.XU(s.CT.settings.END_OF_BUFFER_RECOVERY_TOLERANCE)},this.cU=function(){if(s.CT.videoElement)try{var e=s.bU(),t=s.CT.videoElement.currentTime,i=s.YU(t).mapEach(function(e){return e.playbackRange}).mapAll(function(e){return o.BufferRangeHelper.mergeRanges(e,s.CT.settings.GAP_TOLERANCE)}).getObject(),r=o.BufferRangeHelper.getCommonBufferedRanges(n(n({},i),{bufferedRanges:e})).shift();if(void 0!==r){var a=r.getStart();s.CT.logger.debug("continuing playback at ".concat(a," (from ").concat(t,")")),s.CT.videoElement.currentTime=a,s.ZU(),s.CT.videoElement.eventHandler.removeEventListener(m.MediaElementEvent.currenttimenotadvancing,s.WU),s.TU().finally(function(){var e;return null==(e=s.KU())?void 0:e.dispatch((0,u.setTimestampRollingOver)(!1))}).then(function(){s.CT.logger.debug("successfully cleared previous buffers")}).catch(function(e){s.CT.logger.debug("could not clear previous buffers:",e)})}else s.aU()}catch(e){s.CT.logger.debug("could not handle timestamp overflow:",e)}else s.CT.logger.debug("Could not handle timestamp overflow: Video Element is not defined")},this.CT=e,this.SU=r.KeepGaps,this.GT=t,this.DT=void 0,this.FT=new Map,this.ET=new _.SegmentTimeInformationArrayMap,this.CT.videoElement?(this.CT.videoElement.addEventListener(m.MediaElementEvent.waiting,this.WU),this.CT.videoElement.addEventListener(m.MediaElementEvent.stalled,this.WU),this.CT.videoElement.addEventListener(m.MediaElementEvent.timeupdate,this.VU),e.logger.debug("BaseMediaDecodeTime limit is set to ".concat(P(i)," bits")),e.logger.debug("PresentationTimeOffset limit is set to ".concat(P(a)," bits")),e.settings.FORCE_BASE_MEDIA_DECODE_TIME_REWRITE&&e.logger.debug("BaseMediaDecodeTime rewriting is forced!")):e.logger.debug("Could not set up BaseMediaDecodeTime rewriting: Video Element is not defined")}return e.prototype.TU=function(){var e=this,t=[];return this.UU().keys.forEach(function(i){t.push(e.GT(i))}),Promise.all(t).then(function(){})},e.prototype.getEndOfBufferTime=function(){var e=o.BufferRangeHelper.getCommonBufferedRanges(this.UU(!0).getObject()).sort(function(e,t){return e.getStart()-t.getStart()});return e.length>0?e[e.length-1].getEnd():0},e.prototype.setPtoGapFillingMode=function(e){this.SU=e},e.prototype.getEarliestExternalTimeBufferedRangeIndex=function(e){var t=0;try{for(var i=void 0,n=0;n<e.length;n++){var r=this.mapToExternalTime(e.start(n));(void 0===i||r<i)&&(i=r,t=n)}}catch(e){this.CT.logger.debug("Could not determine buffer region offset:",e)}return t},e.prototype.UU=function(e){var t=this;return void 0===e&&(e=!1),this.ET.mapEach(function(t){return e?t.originalPlaybackRange:t.playbackRange}).mapAll(function(e){return o.BufferRangeHelper.mergeRanges(e,t.CT.settings.GAP_TOLERANCE)})},e.prototype.XU=function(e){var t,i,n=this.CT.videoElement;if(n){var r=n.currentTime;if(!(r>=n.duration&&n.duration>0)){var o=n.buffered;if(o.length<2)null==(t=this.KU())||t.dispatch((0,u.setTimestampRollingOver)(!1));else if(0!==this.getEarliestExternalTimeBufferedRangeIndex(o)){var a=o.end(o.length-1);r>=a-Math.max(this.CT.settings.MINIMAL_BACKWARD_BUFFER_CLEARING_INTERVAL,this.CT.settings.END_OF_BUFFER_TOLERANCE,this.CT.settings.END_OF_BUFFER_RECOVERY_TOLERANCE)&&(null==(i=this.KU())||i.dispatch((0,u.setTimestampRollingOver)(!0))),r>=a-e&&this.cU()}}}},e.prototype.YU=function(e){var t=this,i=this.CT.settings.GAP_TOLERANCE,n=new l.ArrayMap;return this.ET.keys.forEach(function(r){var o=!1,a=-1/0,s=t.ET.get(r),u=!1;s.sort(function(e,t){return e.originalPlaybackTime-t.originalPlaybackTime});var c=s.filter(function(t){var n=t.playbackRange,r=n.start-i<=e&&n.end+i>=e;if(u=u||r,!isFinite(a)&&r)a=t.playbackTime;else if(isFinite(a))return o=o||t.playbackTime<a;return!1});0!==c.length||u||(s.sort(function(e,t){return e.originalPlaybackTime-t.originalPlaybackTime}),c=s.filter(function(t){return t.playbackRange.end<e})),n.addAll(r,c)}),n},e.prototype.ZU=function(){void 0!==this.DT&&(this.DT(),this.DT=void 0)},e.prototype.aU=function(){var e=this,t=this.KU();void 0!==t&&(this.ZU(),this.DT=(0,c.subscribeToRendererBufferChanges)(t,function(){return e.WU()}))},e.prototype.bU=function(){var e,t=[],i=null==(e=this.CT.videoElement)?void 0:e.buffered;if(!function(e){return 0!==(null==e?void 0:e.length)}(i))return[];for(var n=0;n<i.length;n++)t.push({start:i.start(n),end:i.end(n)});return t},e.prototype.dU=function(e){var t,i=e.getMimeType(),n=e.getPlaybackTimeRange();if(void 0!==n){var r=(null!=(t=this.ET.get(i))?t:[]).filter(function(e){return e.originalPlaybackRange.end<n.end});return r[r.length-1]}},e.prototype.eU=function(e){var t=this,i=!1,n=!1,o=new _.SegmentTimeInformationArrayMap;return this.ET.keys.forEach(function(e){return(0,S.ensureMimeTypeInMap)(o,e)}),e.forEach(function(e){if(!e.isDirty()){var a=new T.SegmentTimeInformation(e,t.maxSafeBaseMediaDecodeTime),s=a.presentationTimeOffset/a.timescale,u=t.xU(s),c=t.yU(a);(i=i||u||c||t.CT.settings.FORCE_BASE_MEDIA_DECODE_TIME_REWRITE||t.tU(a)||t.uU(a,a.baseMediaDecodeTime,a.presentationTimeOffset))&&(a.isBaseMediaDecodeTimeLimitExceeded=!0,t.CT.logger.debug("BaseMediaDecodeTime (".concat(a.originalBaseMediaDecodeTime,") exceeding limit for ").concat(a.mimeType," segment")));var l=t.dU(e),d=l?l.originalPresentationTimeOffset/l.timescale:s;d!==s&&(t.SU===r.FillGaps||(null==l?void 0:l.isBaseMediaDecodeTimeLimitExceeded))&&(t.CT.logger.debug("Detected a presentation time offset change: ".concat(d," -> ").concat(s),{precedingSegmentTimeInfo:null==l?void 0:l.segmentUrl}),n=!0),(0,S.addSegmentTimeInfoToMap)(o,a.mimeType,a)}}),[i,n,o]},e.prototype.fU=function(e){return y.ModuleManager.has(v.ModuleName.ContainerMP4)?e.getTFDTBoxOffsets()||y.ModuleManager.get(v.ModuleName.ContainerMP4).parseTfdtBoxOffsets(e):(this.CT.logger.debug("Can't rewrite BMDT for TS segment as MP4 module is not available"),[])},e.prototype.gU=function(e,t){var i=this.fU(e);e.setTFDTBoxOffsets(i);var n=e.getBaseMediaDecodeTime()-t.truncatedBaseMediaDecodeTime;e.getTFDTBoxOffsets().forEach(function(t){var i=0,r=new DataView(e.getData(),t),o=r.getUint32(i);i+=4;var a=String.fromCharCode(r.getUint8(i++),r.getUint8(i++),r.getUint8(i++),r.getUint8(i++));if(i+=8*(1===o),"tfdt"===a){var s=r.getUint8(i);i+=4,1===s?function(e,t,i){var n=0x100000000*e.getUint32(t)+e.getUint32(t+4)-i;e.setUint32(t,Math.floor(n/0x100000000)),t+=4,e.setUint32(t,n)}(r,i,n):function(e,t,i){var n=e.getUint32(t)-i;e.setUint32(t,n)}(r,i,n)}}),e.setBaseMediaDecodeTime(t.truncatedBaseMediaDecodeTime),e.setDirty(!0)},e.prototype.hU=function(e,t){var i=this;t.forAll(function(t,n){(0,S.addSegmentTimeInfoToMap)(i.ET,t,n);var r=n.getMatchingSegment(e);r&&i.gU(r,n)})},e.prototype.iU=function(e,t){return e.reduce(function(e,i){var n=Math.floor(t(i)/i.timescale);return!isFinite(e)&&isFinite(n)||n<e?n:e},-1/0)},e.prototype.jU=function(e,t){var i=this;return Math.min.apply(Math,e.transform(function(e){return i.iU(e,t)}))},e.prototype.kU=function(e){return this.jU(e,function(e){return e.truncatedBaseMediaDecodeTime-e.truncatedPresentationTimeOffset})},e.prototype.lU=function(e){return this.jU(e,function(e){return e.originalPresentationTimeOffset})},e.prototype.mU=function(e){var t={},i=this.lU(e);isFinite(i)?(e.forAll(function(e,n){var r=n.timescale,o=n.originalBaseMediaDecodeTime,a=n.originalPresentationTimeOffset,s=Math.floor(a-i*r),u=a-s,c=o-u,l=Math.floor(u/r);n.truncatedBaseMediaDecodeTime=c,n.truncatedPresentationTimeOffset=s,t.hasOwnProperty(e)||(t[e]=l)}),this.nU(t)):this.CT.logger.debug("Could not determine common PresentationTimeOffset divisor")},e.prototype.nU=function(e){var t=this;Object.keys(e).forEach(function(i){var n=t.FT.get(i);n&&n.resolve(e[i]);var r=new d.Deferred;t.FT.set(i,r),r.resolve(e[i])})},e.prototype.oU=function(e,t){var i,n=this,r=this.kU(t);isFinite(r)?(t.forAll(function(t,i){var o=i.getMatchingSegment(e);o&&n.pU(o,i,r),(0,S.addSegmentTimeInfoToMap)(n.ET,t,i)}),null==(i=this.CT.videoElement)||i.addEventListener(m.MediaElementEvent.currenttimenotadvancing,this.WU)):this.CT.logger.debug("Could not determine common BaseMediaDecideTime divisor")},e.prototype.pU=function(e,t,i){t.truncatedBaseMediaDecodeTime=t.truncatedBaseMediaDecodeTime-t.timescale*i,t.truncatedPlaybackTime=(t.truncatedBaseMediaDecodeTime-t.truncatedPresentationTimeOffset)/t.timescale,this.gU(e,t)},e.prototype.qU=function(e){for(var t,i,n=e.keys,o=e.getAll(),a=[],s=1/0,u=0,c=n;u<c.length;u++){var l=c[u],d=(null!=(t=this.ET.get(l))?t:[]).filter(function(e){return!o.includes(e)&&!e.isReferenceSegment});d.sort(function(e,t){return e.originalPlaybackTime-t.originalPlaybackTime});var h=d.pop(),p=null!=(i=null==h?void 0:h.playbackRange.end)?i:1/0,f=e.get(l)||[];if(0===f.length)return 1/0;var g=Math.min.apply(Math,f.map(function(e){return e.playbackTime})),m=g-p;s=Math.min(s,g),isFinite(m)&&a.push(m)}if(a.length!==n.length)return this.CT.logger.debug("No segments to align with end of buffer"),0;var y=s-this.CT.settings.GAP_TOLERANCE;return Math.min(this.SU===r.KeepGaps?Math.min.apply(Math,a):Math.max.apply(Math,a),y)},e.prototype.rU=function(e,t){var i=this,n=this.qU(t),r=!0;if(t.forAll(function(e,o){if(r){var a=n*o.timescale,s=o.truncatedPresentationTimeOffset+a,u=o.truncatedBaseMediaDecodeTime;i.vU(u,s,o,t)||(i.CT.logger.debug("Cannot shift segments to EOB: would exceed timestamp limits for ".concat(e)),r=!1)}}),r){this.CT.logger.debug("Aligning segments with EOB by shifting ".concat(n," seconds"));var o={};t.forAll(function(e,t){var i=n*t.timescale;t.updateAsContinuous(t.truncatedBaseMediaDecodeTime,t.truncatedPresentationTimeOffset+i);var r=t.originalPresentationTimeOffset-t.truncatedPresentationTimeOffset;o[e]=r/t.timescale}),this.nU(o),e.forEach(function(e){return e.setDirty(!0)})}else this.CT.logger.debug("Cannot align segments with end of buffer: would exceed timestamp limits")},e.prototype.sU=function(e,t,i){return 0===t.length||(t.keys.every(function(e){return(t.get(e)||[]).length>0})?(this.mU(t),this.oU(e,t),i&&this.rU(e,t),!0):(this.CT.logger.debug("Could not handle BaseMediaDecodeTime overflow: at least one buffer is empty"),!1))},e.prototype.tU=function(e){if(e.isBaseMediaDecodeTimeLimitExceeded)return!0;var t,i=(0,b.getLargestPrecedingSegmentTimeInfo)(null!=(t=this.ET.get(e.mimeType))?t:[],e.originalPlaybackTime);return!!i&&isFinite(i.truncatedBaseMediaDecodeTime)&&i.truncatedBaseMediaDecodeTime!==i.originalBaseMediaDecodeTime},e.prototype.uU=function(e,t,i){var n,r=e.duration,o=e.timescale,a=e.mimeType,s=this.ET.keys.find(function(e){return e!==a});if(!s)return!1;var u=null==(n=this.ET.get(s))?void 0:n.slice(-1)[0];if(!u)return!1;var c=(t+i)/o,l={start:c,end:c+r},d=u.playbackTime+u.duration,h={start:d,end:d+u.duration},p=Math.max(l.start,h.start);return!(Math.min(l.end,h.end)-p<=r/2)&&h.end*u.timescale-u.presentationTimeOffset>this.maxSafeBaseMediaDecodeTime},e.prototype.vU=function(e,t,i,n){var r=this,o=i.duration,a=i.timescale;if(e+o*a>this.maxSafeBaseMediaDecodeTime)return this.CT.logger.debug("Detected BMDT overflow for ".concat(i.mimeType," segment")),!1;if(this.uU(i,e,t))return this.CT.logger.debug("Triggering early BMDT overflow for ".concat(i.mimeType," segment")),!1;var s=t/a,u=e/a+o;return(function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var i=[];return e.forEach(function(e){e.forAll(function(e,t){i.includes(t.timescale)||i.push(t.timescale)})}),i})(n,this.ET).every(function(e){return r.wU(s,u,e)})},e.prototype.wU=function(e,t,i){return t*i+e*i<=this.maxSafeBaseMediaDecodeTime},e.prototype.xU=function(e){return Math.abs(e)>this.maxSafePresentationTimeOffset},e.prototype.yU=function(e){if(!(0,f.isTizen2017)())return!1;var t=e.originalPlaybackTime,i=e.duration,n=e.mimeType,r=t+i>(0,g.toSeconds)(this.maxSafeBaseMediaDecodeTime);return p.MimeTypeHelper.isAudio(n)&&r},e.prototype.zU=function(e,t){if(this.CT.settings.FORCE_BASE_MEDIA_DECODE_TIME_REWRITE)return!0;var i=e/t.timescale;return!!this.xU(i)||this.yU(t)},e.prototype.AU=function(e,t,i){var n=e.baseMediaDecodeTime,r=e.presentationTimeOffset,o=e.foundMatchingPreviousSegment,a=!this.vU(n,r,t,i);return o?a:a||this.zU(r,t)},e.prototype.BU=function(e){var t=this,i=new l.ArrayMap,n=new l.ArrayMap;return e.keys.forEach(function(r){(0,S.ensureMimeTypeInMap)(i,r),(0,S.ensureMimeTypeInMap)(n,r),(0,S.ensureMimeTypeInMap)(t.ET,r);var o,a=null!=(o=t.ET.get(r))?o:[],s=a.length?a:t.ET.getAllValues();(e.get(r)||[]).forEach(function(r){var o=(0,b.findOverflowDataForSegmentInMap)(r,s,t.CT.settings.GAP_TOLERANCE,t.CT.logger);if(t.AU(o,r,e))t.CT.logger.debug("Segment added to discontinuous time info map.",r.segmentUrl,r.mimeType),r.updateAsDiscontinuous(),(0,S.addSegmentTimeInfoToMap)(n,r.mimeType,r);else{var a=o.baseMediaDecodeTime,u=o.presentationTimeOffset;r.updateAsContinuous(a,u),(0,S.addSegmentTimeInfoToMap)(i,r.mimeType,r)}})}),{discontinuousSegmentTimeInfoMap:n,continuousSegmentTimeInfoMap:i}},e.prototype.CU=function(e,t,i){var n,r=this.BU(t),o=r.discontinuousSegmentTimeInfoMap,a=r.continuousSegmentTimeInfoMap;if(this.hU(e,a),this.sU(e,o,i))return!0;var s=(0,E.maybeSwitchOverASegmentToDiscontinuous)({continuousSegmentTimeInfoMap:a,discontinuousSegmentTimeInfoMap:o});if(!s){var u=this.BU(this.ET);s=(0,E.maybeSwitchOverASegmentToDiscontinuous)({continuousSegmentTimeInfoMap:u.continuousSegmentTimeInfoMap,discontinuousSegmentTimeInfoMap:o}),this.CT.logger.debug("Did not find any matching segment time info in current map, retried with existing ones.",s)}return!!s&&(this.CT.logger.debug("Moved ".concat(s.mimeType," segment from continued to discontinued. Trying to process discontinued infos again."),{switchedSegmentUrl:s.segmentUrl,matchingSegmentUrl:null==(n=s.getMatchingSegment(e))?void 0:n.getUrl()}),this.sU(e,o,i))},e.prototype.DU=function(e){var t=this;e.forAll(function(e,i){(null==(n=t.ET.get(e))?void 0:n.find(i.equals))||(0,S.addSegmentTimeInfoToMap)(t.ET,i.mimeType,i);var n,r=t.FT.get(i.mimeType);r&&r.resolve(0)})},e.prototype.EU=function(e){return e.every(function(e){return p.MimeTypeHelper.isMP4(e.getMimeType())})},e.prototype.FU=function(){this.maxSafeBaseMediaDecodeTime=1/0,this.maxSafePresentationTimeOffset=1/0},e.prototype.GU=function(){return this.maxSafeBaseMediaDecodeTime!==1/0||this.maxSafePresentationTimeOffset!==1/0},e.prototype.rewriteTimeStampsIfNecessary=function(e){!this.EU(e)&&this.GU()&&(this.CT.logger.debug("Disabling BMDT rewriting due to unsupported container format"),this.FU());var t,i=this.HU(),n=e.map(T.getSectionId).reduce(M,[]).some(function(e){return!i.includes(e)}),r=function(e){return e.reduce(function(e,t){return e.includes(t.getMimeType())||e.push(t.getMimeType()),e},[])}(e),o=this.ET.keys.every(function(e){return r.includes(e)});if(n&&!o)return this.CT.logger.debug("Cannot check for rewriting necessity - not all buffers have data yet"),!1;var a=this.eU(e),s=a[0],u=a[1],c=a[2];if(s)return this.CU(e,c,u);if(n&&u)return this.IU(e,c),!0;for(var l=0,d=c.getAllValues();l<d.length;l++){var h=d[l],p=h.mimeType,f=null!=(t=this.ET.get(p))?t:[],g=(0,b.findPrecedingSegmentTimeInfo)(f,h,this.CT.settings.GAP_TOLERANCE);(null==g?void 0:g.isBaseMediaDecodeTimeLimitExceeded)&&!h.isBaseMediaDecodeTimeLimitExceeded&&(h.updateAsDiscontinuous(),h.updateAsContinuous(h.originalBaseMediaDecodeTime,g.truncatedPresentationTimeOffset))}return this.DU(c),!0},e.prototype.HU=function(){return this.ET.transform(function(e){return e.map(function(e){return e.sectionId})}).flatMap(function(e){return e}).reduce(M,[])},e.prototype.IU=function(e,t){var i={},n=this.qU(t);this.CT.logger.debug("Trying to handle PTO change, required shift: ".concat(n,"s")),t.forAll(function(e,t){var r=-n*t.timescale,o=r/t.timescale;t.isBaseMediaDecodeTimeLimitExceeded=!0,t.updateAsContinuous(t.originalBaseMediaDecodeTime,t.originalPresentationTimeOffset-r),i[t.mimeType]=o}),this.nU(i),this.DU(t),e.forEach(function(e){return e.setDirty(!0)})},e.prototype.signalBufferRemoval=function(e,t,i){var n;if(this.ET.has(e)){var r=o.BufferRangeHelper.mergeRanges(t,this.CT.settings.GAP_TOLERANCE),a=this.ET.get(e)||[],s=a.filter(function(e){return e.isPlaybackRangeOverlapping(r)});if(0===s.length&&this.nU(((n={})[e]=0,n)),this.JU(a,r,i)){var u=a[0];this.CT.logger.debug("Keeping reference BMDT segment info for mime type ".concat(e," after buffer clearing"),{segmentUrl:u.segmentUrl,sectionId:u.sectionId}),u.markAsReferenceSegment(),s.push(u)}this.ET.set(e,s)}},e.prototype.JU=function(e,t,i){var n=this.KU();if((0,h.isSwitchingBufferBlocks)(n)||0!==t.length||0===e.length)return!1;var r=this.CT.store.getState(),o=!!(null==r?void 0:r.player)&&(0,s.getIsSeekingOrTimeshifting)(r.player),u=this.CT.serviceManager.get(a.ServiceName.ManifestService,this.CT.sourceContext.sourceIdentifier),c=this.mapToExternalTime(i),l=null==u?void 0:u.getPeriodIdForTime(c);return!o&&e[0].periodId===l},e.prototype.mapToExternalTime=function(e,t){var i=this;void 0===t&&(t=!1);var n=this.ET.getAllValues(),r=n.find(function(t){var n=t.playbackRange.start-i.CT.settings.GAP_TOLERANCE,r=t.playbackRange.end+i.CT.settings.GAP_TOLERANCE;return!t.isReferenceSegment&&e>=n&&e<=r})||(t?n[0]:void 0);return r&&(this.HT=r.originalPlaybackTime-r.playbackTime),this.mapToCachedExternalTime(e)},e.prototype.mapToCachedExternalTime=function(e){return void 0!==this.HT?Math.max(this.HT+e,0):(this.CT.logger.debug("Couldn't map internal time ".concat(e," to external time")),e)},e.prototype.mapToInternalTime=function(e,t,i){var n=this;void 0===t&&(t=!1);var r=this.ET.getAllValues().filter(function(e){return void 0===i||i===e.mimeType}),o=r.find(function(t){var i=t.originalPlaybackRange.start-n.CT.settings.GAP_TOLERANCE,r=t.originalPlaybackRange.end+n.CT.settings.GAP_TOLERANCE;return e>=i&&e<=r})||(t?r[0]:void 0);return o?Math.max(o.playbackTime+(e-o.originalPlaybackTime),0):e},e.prototype.mapToExternalTimeRange=function(e){if(null!=e)return{start:this.mapToExternalTime(e.start),end:this.mapToExternalTime(e.end)}},e.prototype.mapToExternalTimeRanges=function(e){var t=this;return e.map(function(e){return t.mapToExternalTimeRange(e)}).filter(function(e){return void 0!==e})},e.prototype.mapToExternalTimeRangesMap=function(e){var t=this;return null==e?null:Object.keys(e).reduce(function(i,n){return i[n]=t.mapToExternalTimeRanges(e[n]),i},{})},e.prototype.getSegmentTimeRanges=function(e,t){var i=this,n=[];return e.forEach(function(e){var r=i.ET.get(t).find(function(t){return t.isSegmentMatching(e)});r&&n.push(r.playbackRange)}),n},e.prototype.getCorrectTimeStampOffset=function(e,t){var i=this.FT.get(e);return i||(i=new d.Deferred,this.FT.set(e,i)),i.promise.then(function(e){return t+e})},e.prototype.dispose=function(){var e,t,i,n;this.ET.clear(),this.ZU(),null==(e=this.CT.videoElement)||e.removeEventListener(m.MediaElementEvent.currenttimenotadvancing,this.WU),null==(t=this.CT.videoElement)||t.removeEventListener(m.MediaElementEvent.waiting,this.WU),null==(i=this.CT.videoElement)||i.removeEventListener(m.MediaElementEvent.stalled,this.WU),null==(n=this.CT.videoElement)||n.removeEventListener(m.MediaElementEvent.timeupdate,this.VU)},e.prototype.KU=function(){return this.CT.serviceManager.get(a.ServiceName.SourceStoreService,this.CT.sourceContext.sourceIdentifier)},e}();var A=Math.log(2);function P(e){return Math.ceil(Math.log(e+1)/A)}function M(e,t){return e.includes(t)||e.push(t),e}},44885:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.addSegmentTimeInfoToMap=void 0,t.ensureMimeTypeInMap=function(e,t){e.get(t)||e.addAll(t,[])},t.addSegmentTimeInfoToMap=function(e,t,i){(function(e,t,i){var n;return null==(n=e.get(t))?void 0:n.find(function(e){return e.segmentUrl===(null==i?void 0:i.segmentUrl)&&e.equals(i)})})(e,t,i)||e.add(t,i)}},73849:function(e,t){function i(e){return Math.floor(e.originalBaseMediaDecodeTime-e.baseMediaDecodeTime)}function n(e){return Math.floor(e.originalPresentationTimeOffset-e.presentationTimeOffset)}function r(e,t,i){return e.find(function(e){var n=e.originalPlaybackRange.end;return t.originalPlaybackRange.start>=n-i&&t.originalPlaybackRange.start<=n+i})}function o(e,t){return e.reduce(function(e,i){var n=i.originalPlaybackTime,r=e?e.originalPlaybackTime:-1/0;return n<t&&n>r?i:e},void 0)}Object.defineProperty(t,"__esModule",{value:!0}),t.findOverflowDataForSegmentInMap=function(e,t,a,s){var u=1/0,c=1/0,l=r(t,e,a)||o(t,e.originalPlaybackTime),d=l?e.timescale/l.timescale:1;1!==d&&s.debug("Detected a timescale change: ".concat(null==l?void 0:l.timescale," -> ").concat(e.timescale));var h=l&&e.originalPresentationTimeOffset===l.originalPresentationTimeOffset*d;return h&&(u=e.originalBaseMediaDecodeTime-Math.round(i(l)*d),c=e.originalPresentationTimeOffset-Math.round(n(l)*d)),{baseMediaDecodeTime:u,presentationTimeOffset:c,foundMatchingPreviousSegment:!!h}},t.getBmdtOffset=i,t.getPtoOffset=n,t.findPrecedingSegmentTimeInfo=r,t.getLargestPrecedingSegmentTimeInfo=o},8301:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.findContinuousSegmentToMove=t.maybeSwitchOverASegmentToDiscontinuous=void 0;var n=i(44885);t.maybeSwitchOverASegmentToDiscontinuous=function(e){var i=(0,t.findContinuousSegmentToMove)(e);return i&&(e.continuousSegmentTimeInfoMap.deleteValue(i.mimeType,i),i.updateAsDiscontinuous(),(0,n.addSegmentTimeInfoToMap)(e.discontinuousSegmentTimeInfoMap,i.mimeType,i)),i},t.findContinuousSegmentToMove=function(e){var t=e.continuousSegmentTimeInfoMap.keys;if(2!==t.length||t.every(function(t){return e.continuousSegmentTimeInfoMap.get(t).length>0}))return null;for(var i=0,n=t;i<n.length;i++){var r=n[i];if(e.discontinuousSegmentTimeInfoMap.has(r)&&!((e.discontinuousSegmentTimeInfoMap.get(r)||[]).length>0)){var o=e.continuousSegmentTimeInfoMap.get(r)||[];if(o.length)return o[0]}}return null}},48558:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.SegmentTimeInformation=void 0,t.getSectionId=r;var n=i(4524);function r(e){var t,i,n;return null!=(n=null==(i=null==(t=e.getSegmentInfo())?void 0:t.discontinuitySequenceNumber)?void 0:i.toString())?n:e.getPeriodId()}t.SegmentTimeInformation=function(){function e(e,t){var i,n,o=this;this.equals=function(e){if(e){var t=o.mimeType===e.mimeType,i=o.duration===e.duration,n=o.originalBaseMediaDecodeTime===e.originalBaseMediaDecodeTime,r=o.sectionId===e.sectionId;return t&&i&&n&&r}return!1},this.segmentUrl=e.getUrl(),this.duration=e.getDuration(),this.mimeType=e.getMimeType(),this.timescale=null!=(i=e.getTimescale())?i:1,this.originalPlaybackTime=e.getPlaybackTime(),this.Wab=null==(n=e.getSegmentInfo())?void 0:n.byteRange,this.originalBaseMediaDecodeTime=e.getBaseMediaDecodeTime(),this.originalPresentationTimeOffset=e.getPresentationTimeOffset()*this.timescale,this.isBaseMediaDecodeTimeLimitExceeded=this.originalBaseMediaDecodeTime+this.duration*this.timescale>t,this.periodId=e.getPeriodId(),this.L9=!1,this.sectionId=r(e),this.truncatedBaseMediaDecodeTime=1/0,this.truncatedPresentationTimeOffset=1/0,this.truncatedPlaybackTime=1/0}return Object.defineProperty(e.prototype,"isReferenceSegment",{get:function(){return this.L9},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"playbackTime",{get:function(){return this.isBaseMediaDecodeTimeLimitExceeded&&this.truncatedPlaybackTime!==1/0?this.truncatedPlaybackTime:this.originalPlaybackTime},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"baseMediaDecodeTime",{get:function(){return this.isBaseMediaDecodeTimeLimitExceeded&&this.truncatedBaseMediaDecodeTime!==1/0?this.truncatedBaseMediaDecodeTime:this.originalBaseMediaDecodeTime},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"presentationTimeOffset",{get:function(){return this.isBaseMediaDecodeTimeLimitExceeded&&this.truncatedPresentationTimeOffset!==1/0?this.truncatedPresentationTimeOffset:this.originalPresentationTimeOffset},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"playbackRange",{get:function(){return{start:this.playbackTime,end:this.playbackTime+this.duration}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"originalPlaybackRange",{get:function(){return{start:this.originalPlaybackTime,end:this.originalPlaybackTime+this.duration}},enumerable:!1,configurable:!0}),e.prototype.getMatchingSegment=function(e){var t=this;return e.find(function(e){return t.isSegmentMatching(e)})},e.prototype.isSegmentMatching=function(e){var t,i,n,r=e.getUrl()===this.segmentUrl,o=e.getPlaybackTime()===this.originalPlaybackTime,a=null==(t=e.getSegmentInfo())?void 0:t.byteRange,s=(null==a?void 0:a.start)===(null==(i=this.Wab)?void 0:i.start),u=(null==a?void 0:a.end)===(null==(n=this.Wab)?void 0:n.end),c=s&&u,l=e.getMimeType()===this.mimeType;return r&&o&&c&&l},e.prototype.updateAsDiscontinuous=function(){this.isBaseMediaDecodeTimeLimitExceeded=!0},e.prototype.updateAsContinuous=function(e,t){this.truncatedBaseMediaDecodeTime=e,this.truncatedPresentationTimeOffset=t,this.truncatedPlaybackTime=(e-t)/this.timescale},e.prototype.markAsReferenceSegment=function(){this.L9=!0},e.prototype.isPlaybackRangeOverlapping=function(e){var t=this.playbackRange,i={buffered:e},r=n.BufferRangeHelper.isInBufferedRange(i,t.start),o=n.BufferRangeHelper.isInBufferedRange(i,t.end),a=n.BufferRangeHelper.getCommonBufferedRanges({buffered:e,inSegment:[t]}).length>0;return r||o||a},e}()},21651:function(e,t,i){var n=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(t,i)};return function(t,i){if("function"!=typeof i&&null!==i)throw TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.SegmentTimeInformationArrayMap=void 0,t.SegmentTimeInformationArrayMap=function(e){function t(){return e.call(this,function(e,t){return e.originalPlaybackTime-t.originalPlaybackTime})||this}return n(t,e),t.prototype.find=function(e){if(e)return this.get(e.getMimeType()).find(function(t){return t.isSegmentMatching(e)})},t}(i(61252).SortedArrayMap)},61252:function(e,t,i){var n=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(t,i)};return function(t,i){if("function"!=typeof i&&null!==i)throw TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.SortedArrayMap=void 0,t.SortedArrayMap=function(e){function t(t){var i=e.call(this)||this;return i.sab=t,i.tab=[],i}return n(t,e),t.prototype.getAllValues=function(){return this.tab},t.prototype.uab=function(e){return e?e.sort(this.sab):[]},t.prototype.set=function(t,i){var n=this.uab(i);return this.vab(t,n),e.prototype.set.call(this,t,n)},t.prototype.add=function(e,t){var i=t?[t]:[];return this.addAll(e,i),this},t.prototype.addAll=function(e,t){this.ensure(e),this.set(e,[].concat(t||[],this.get(e)))},t.prototype.delete=function(t){return this.wab(this.get(t)),e.prototype.delete.call(this,t)},t.prototype.deleteValue=function(t,i){return this.wab([i]),e.prototype.deleteValue.call(this,t,i)},t.prototype.clear=function(){this.tab=[],e.prototype.clear.call(this)},t.prototype.vab=function(e,t){void 0===t&&(t=[]);var i=this.get(e);this.wab(i),this.tab=this.uab(this.tab.concat(t))},t.prototype.wab=function(e){var t=this;void 0===e&&(e=[]),e.forEach(function(e){var i=t.tab.indexOf(e);i>-1&&t.tab.splice(i,1)})},t}(i(19483).ArrayMap)},1124:function(e,t,i){var n=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(t,i)};return function(t,i){if("function"!=typeof i&&null!==i)throw TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.getTvMseWrapperConstructor=function(){return void 0===r&&(r=l()),r};var r,o=i(3714),a=i(20213),s=i(70850),u=i(88052),c=i(24281),l=function(){return function(e){function t(t,i){var n=e.call(this,t)||this;return n.Yab={},n.Xab=i,n}return n(t,e),t.prototype.printDetailedBufferRange=function(e,t){var i;try{i=e.buffered}catch(e){return void this.logger.debug("".concat(t," buffer range: Error accessing buffered ranges"))}if(0!==i.length)for(var n=0;n<i.length;n++){var r=i.start(n),o=i.end(n);this.logger.debug("".concat(t," buffer range [").concat(n,"]: ").concat(this.Xab.mapToExternalTime(r,!0)," - ").concat(this.Xab.mapToExternalTime(o,!0)," (").concat(r," - ").concat(o,")"))}else this.logger.debug("".concat(t," buffer range: empty"))},t.prototype.getBufferStartTime=function(){var e=this,t=Object.keys(this.sourceBuffers).map(function(t){return 0===e.sourceBuffers[t].bufferedRanges.length?0:e.Xab.mapToExternalTime(e.sourceBuffers[t].bufferedRanges[0].start)});return Math.max.apply(null,t)},t.prototype.updateTimestampOffset=function(t,i){try{e.prototype.updateTimestampOffset.call(this,t,i)}catch(e){this.logger.error("Unable to update timestampOffset",e),e.code===DOMException.INVALID_STATE_ERR&&this.context.eventHandler.dispatchEvent(o.PlayerEvent.Warning,new a.PlayerWarning(a.WarningCode.PLAYBACK_WARNING,"Unable to update timestampOffset (Invalid State error)",e))}},t.prototype.Zab=function(e,t){this.Yab[e]||(this.Yab[e]={currentOffset:this.sourceBuffers[e].buffer.timestampOffset,pendingOffset:t})},t.prototype.queueTimestampOffsetUpdate=function(t,i){var n=this;return this.Zab(t,i),this.Xab.getCorrectTimeStampOffset(t,i).then(function(e){return n.Yab[t].pendingOffset=e}).then(function(){var i=n.Yab[t].pendingOffset,r=n.Yab[t].currentOffset;return s.Util.roundValue(r,6)===s.Util.roundValue(i,6)&&n.isMediaSourceOpen()?Promise.resolve():(n.logger.debug("Updating timestamp offset for ".concat(t," to ").concat(i," (uncorrected offset: ").concat(r,")")),n.Yab[t].currentOffset=i,e.prototype.queueTimestampOffsetUpdate.call(n,t,i).finally(function(){var e,i,r=null==(i=null==(e=n.sourceBuffers[t])?void 0:e.buffer)?void 0:i.timestampOffset;n.Yab[t].currentOffset=r}))})},t.prototype.getBufferRangeStart=function(e,t){void 0===t&&(t=0);var i=this.Xab.getEarliestExternalTimeBufferedRangeIndex(e);return Math.max(t,e.start(i))},t.prototype.preBufferRemoval=function(e,t,i){this.logger.debug("removing buffer for ".concat(e," (from ").concat(this.Xab.mapToExternalTime(t)," to ").concat(this.Xab.mapToExternalTime(i),") (").concat(t," to ").concat(i,")"))},t.prototype.getRangePendingRemoval=function(e){return this.sourceBuffers.hasOwnProperty(e)&&this.Xab.mapToExternalTimeRange(this.sourceBuffers[e].rangePendingRemoval)||void 0},t.prototype.addToBuffer=function(t){var i=this;return(0,c.rewriteUnsupportedBoxes)(t),this.aab(t).then(function(){return e.prototype.addToBuffer.call(i,t)})},t.prototype.aab=function(e){var t=e.getMimeType(),i=-e.getPresentationTimeOffset();return e.isDirty()&&!e.isInit()?this.setTimestampOffset(t,i):Promise.resolve()},t}(u.ModuleManager.get(a.ModuleName.RendererMse).MSEWrapper)}},35501:function(e,t,i){var n=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(t,i)};return function(t,i){if("function"!=typeof i&&null!==i)throw TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),r=this&&this.__spreadArray||function(e,t,i){if(i||2==arguments.length)for(var n,r=0,o=t.length;r<o;r++)!n&&r in t||(n||(n=Array.prototype.slice.call(t,0,r)),n[r]=t[r]);return e.concat(n||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.getTvRendererConstructor=function(){return void 0===o&&(o=f()),o};var o,a=i(4524),s=i(66790),u=i(34841),c=i(88052),l=i(62756),d=i(84276),h=i(48558),p=i(1124),f=function(){return function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.postBufferRemoval=function(e,i,n){t.video&&(t.baseMediaDecodeTimeHandler.signalBufferRemoval(e,t.zT(e),t.video.currentTime),t.logger.debug("successfully removed buffer for ".concat(e," (from ").concat(t.baseMediaDecodeTimeHandler.mapToExternalTime(i)," to ").concat(t.baseMediaDecodeTimeHandler.mapToExternalTime(n),") (").concat(i," to ").concat(n,")")))},t}return n(t,e),t.prototype.init=function(t){this.baseMediaDecodeTimeHandler=new d.BaseMediaDecodeTimeHandler(this.context,this.yT.bind(this),this.getMaxSafeBaseMediaDecodeTime(),this.getMaxSafePresentationTimeOffset()),e.prototype.init.call(this,t),this.xT||(this.xT=new u.Deferred),this.xT.resolve(this.baseMediaDecodeTimeHandler)},t.prototype.getMaxSafeBaseMediaDecodeTime=function(){return 1/0},t.prototype.getMaxSafePresentationTimeOffset=function(){return 1/0},t.prototype.createMSEWrapper=function(){return new((0,p.getTvMseWrapperConstructor)())(this.context,this.baseMediaDecodeTimeHandler)},t.prototype.getCurrentVideoTime=function(){return this.baseMediaDecodeTimeHandler.mapToExternalTime(e.prototype.getCurrentVideoTime.call(this))},t.prototype.getRangesInSourceBuffers=function(){return this.baseMediaDecodeTimeHandler.mapToExternalTimeRangesMap(e.prototype.getRangesInSourceBuffers.call(this))},t.prototype.getBufferedRanges=function(t){return this.baseMediaDecodeTimeHandler.mapToExternalTimeRanges(e.prototype.getBufferedRanges.call(this,t))},t.prototype.getVideoElementBufferedRanges=function(){var t=e.prototype.getVideoElementBufferedRanges.call(this);return this.baseMediaDecodeTimeHandler.mapToExternalTimeRanges(t)},t.prototype.yT=function(e){var t,i,n=this;if(!this.mse)return Promise.reject();var r=null==(t=this.mse)?void 0:t.getBufferedRanges(e);return Promise.all((null!=(i=null==r?void 0:r.slice(1))?i:[]).map(function(t){var i;return n.logger.debug("Clearing buffer on rollover for ".concat(e," from ").concat(t.start," to ").concat(t.end)),null==(i=n.mse)?void 0:i.removeFromBuffer(e,t.start-n.settings.GAP_TOLERANCE,t.end+n.settings.GAP_TOLERANCE,n.postBufferRemoval)})).then(function(){})},t.prototype.removeData=function(e,t,i){if(!this.mse)return Promise.reject();void 0===t&&void 0===i&&this.saveCurrentTime(),this.removeDataFromSegmentQueues(e,t,i);var n=void 0!==t?this.baseMediaDecodeTimeHandler.mapToInternalTime(t,!0,e):void 0,r=void 0!==i?this.baseMediaDecodeTimeHandler.mapToInternalTime(i,!0,e):void 0;return this.mse.removeFromBuffer(e,n,r,this.postBufferRemoval)},t.prototype.addSegmentFromQueueToMse=function(t){var i=this,n=this.AT(function(e){return!e.isInit()}),r=Object.keys(this.segmentQueues).every(function(e){var t=i.mse&&i.mse.getBufferedRanges(e).length>0,r=n.some(function(t){return t.getMimeType()===e});return t||r});if(0===n.length||!r)return Promise.reject(s.SOURCE_BUFFER_APPEND_STATUS.SUSPENDED);var o=n.reduce(function(e,t){return t.getPlaybackTime()<e.getPlaybackTime()?t:e},n[0]),a=(0,h.getSectionId)(o),u=this.AT(function(e){return!e.isInit()&&(0,h.getSectionId)(e)===a});return this.baseMediaDecodeTimeHandler.rewriteTimeStampsIfNecessary(u)?e.prototype.addSegmentFromQueueToMse.call(this,t):Promise.reject(s.SOURCE_BUFFER_APPEND_STATUS.SUSPENDED)},t.prototype.zT=function(e){if(null===this.mse||!this.segmentQueues.hasOwnProperty(e))return[];var t,i,n=this.AT(function(e){return!e.isInit()}),o=this.baseMediaDecodeTimeHandler.getSegmentTimeRanges(n,e),s=null!=(i=null==(t=this.mse)?void 0:t.getBufferedRanges(e))?i:[];return a.BufferRangeHelper.mergeRanges(r(r([],o,!0),s,!0),this.settings.GAP_TOLERANCE)},t.prototype.adjustTimeToNextCommonBufferStart=function(t){var i=e.prototype.adjustTimeToNextCommonBufferStart.call(this,t);return isNaN(i)?NaN:Math.ceil(100*this.baseMediaDecodeTimeHandler.mapToInternalTime(i))/100},t.prototype.seekOnVideoElement=function(e){var t=this;return this.waitingForSeekedPromise=new Promise(function(i,n){if(t.video){t.video.currentTime=e;var r=t.video.currentTime;i(t.getBaseMediaDecodeTimeHandler().then(function(e){return e.mapToExternalTime(r)}))}else n("No video reference")}),this.waitingForSeekedPromise},t.prototype.getBaseMediaDecodeTimeHandler=function(){return this.xT.promise},t.prototype.AT=function(e){var t=this;return void 0===e&&(e=function(){return!0}),Object.keys(this.segmentQueues).flatMap(function(e){return t.segmentQueues[e]}).filter(e)},t.prototype.getEndOfBufferTime=function(){if(this.video&&this.video.buffered&&this.video.buffered.length>0&&this.baseMediaDecodeTimeHandler)return this.baseMediaDecodeTimeHandler.getEndOfBufferTime()},t.prototype.shutdown=function(t){var i=this;return e.prototype.shutdown.call(this,t).then(function(){i.BT()})},t.prototype.BT=function(){this.xT=new u.Deferred,this.baseMediaDecodeTimeHandler.dispose()},t.prototype.release=function(){return this.BT(),e.prototype.release.call(this)},t}(c.ModuleManager.get(l.ModuleName.RendererMse).MSERenderer)}},24281:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.rewriteUnsupportedBoxes=function(e,t){void 0===t&&(t=o),t.forEach(function(t){var i,n=null==(i=e.getParsedData())?void 0:i.get(t);n&&(0,r.rewriteMp4BoxType)(n,"free")})};var n=i(15487),r=i(2992),o=function(){var e=["skip"];return((0,n.isTizen2016)()||(0,n.isTizen2017)())&&e.push("moov.trak.edts"),e}()},73868:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.VidaaModuleDefinition=void 0;var n=i(62756),r=i(72858),o=i(34742);t.VidaaModuleDefinition={name:n.ModuleName.Vidaa,module:function(){return{VidaaVideoElementWrapper:o.VidaaVideoElementWrapper,getVidaaMSERendererConstructor:r.getVidaaMSERendererConstructor}},dependencies:[n.ModuleName.RendererMse]},t.default=t.VidaaModuleDefinition},72858:function(e,t,i){var n=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(t,i)};return function(t,i){if("function"!=typeof i&&null!==i)throw TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.getVidaaMSERendererConstructor=function(){return null===o&&(o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.getMaxSafeBaseMediaDecodeTime=function(){return this.context.settings.VIDAA_MAX_SAFE_BMDT},t.prototype.getMaxSafePresentationTimeOffset=function(){return this.context.settings.VIDAA_MAX_SAFE_PTO},t}((0,r.getTvRendererConstructor)())),o};var r=i(35501),o=null},34742:function(e,t,i){var n=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(t,i)};return function(t,i){if("function"!=typeof i&&null!==i)throw TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.VidaaVideoElementWrapper=void 0,t.VidaaVideoElementWrapper=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.prime=function(){return this.context.logger.log("Not priming video element as this causes issues on VIDAA"),Promise.resolve()},t}(i(79186).VideoElementWrapper)}},function(e){return e(e.s=73868)}])},643:function(e){self,e.exports=(self.webpackChunkbitmovin_player=self.webpackChunkbitmovin_player||[]).push([[339],{50879:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ByteBuffer=void 0,t.ByteBuffer=function(){function e(){}return e.stringToBytes=function(e,t){t=!!t;for(var i=e.length,n=new Uint8Array(t?4*i:i),r=0,o=0;o<i;o++){var a=e.charCodeAt(o);if(t&&55296<=a&&a<=56319){if(++o>=i)throw Error("Malformed string, low surrogate expected at position "+o);a=(55296^a)<<10|65536|56320^e.charCodeAt(o)}else if(!t&&a>>>8)throw Error("Wide characters are not allowed.");!t||a<=127?n[r++]=a:(a<=2047?n[r++]=192|a>>6:(a<=65535?n[r++]=224|a>>12:(n[r++]=240|a>>18,n[r++]=128|a>>12&63),n[r++]=128|a>>6&63),n[r++]=128|63&a)}return n.subarray(0,r)},e.bytesToHex=function(e){for(var t="",i=0;i<e.length;i++){var n=(255&e[i]).toString(16);n.length<2&&(t+="0"),t+=n}return t},e.hexToBytes=function(e){var t=e.length;1&t&&(e="0"+e,t++);for(var i=new Uint8Array(t>>1),n=0;n<t;n+=2)i[n>>1]=parseInt(e.substr(n,2),16);return i},e.base64ToBytes=function(t){return e.stringToBytes(atob(t))},e}()},5357:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Cardboard=void 0;var n=i(57160),r=i(50879);t.Cardboard=function(){function e(){}return e.decode=function(t){return new n.ProtoBuf(r.ByteBuffer.base64ToBytes(t),e.proto).readAll()},e.proto={1:{name:"vendor",type:"string"},2:{name:"model",type:"string"},3:{name:"screen_to_lens_distance",type:"float"},4:{name:"inter_lens_distance",type:"float"},5:{name:"left_eye_field_of_view_angles",type:"float",packed:!0},11:{name:"vertical_alignment",type:{0:"bottom",1:"center",2:"top"}},6:{name:"tray_to_lens_distance",type:"float"},7:{name:"distortion_coefficients",type:"float",packed:!0},10:{name:"has_magnet",type:"boolean"},12:{name:"primary_button",type:{0:"none",1:"magnet",2:"touch",3:"indirect_touch"}},defaults:{vertical_alignment:"bottom",primary_button:"magnet"}},e}()},7247:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CardboardViewer=void 0;var n=i(67392);t.CardboardViewer=function(e){this.label=e.model,this.fov=e.left_eye_field_of_view_angles[0],this.interLensDistance=e.inter_lens_distance,this.baselineLensDistance=e.tray_to_lens_distance,this.screenLensDistance=e.screen_to_lens_distance,this.distortion=new n.Distortion(e.distortion_coefficients),this.inverseCoefficients=this.distortion.approximateInverse()}},95433:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Device=void 0;var i=[{type:"android",rules:[{ua:"Nexus 7"}],dpi:[320.8,323],bw:3,ac:500},{type:"android",rules:[{ua:"ASUS_Z00AD"}],dpi:[403,404.6],bw:3,ac:1e3},{type:"android",rules:[{ua:"HTC6435LVW"}],dpi:[449.7,443.3],bw:3,ac:1e3},{type:"android",rules:[{ua:"HTC One XL"}],dpi:[315.3,314.6],bw:3,ac:1e3},{type:"android",rules:[{ua:"Nexus 9"}],dpi:289,bw:3,ac:500},{type:"android",rules:[{ua:"HTC One M9"}],dpi:[442.5,443.3],bw:3,ac:500},{type:"android",rules:[{ua:"HTC One_M8"}],dpi:[449.7,447.4],bw:3,ac:500},{type:"android",rules:[{ua:"HTC One"}],dpi:472.8,bw:3,ac:1e3},{type:"android",rules:[{ua:"Nexus 6P"}],dpi:[515.1,518],bw:3,ac:1e3},{type:"android",rules:[{ua:"Nexus 5X"}],dpi:[422,419.9],bw:3,ac:1e3},{type:"android",rules:[{ua:"LGMS345"}],dpi:[221.7,219.1],bw:3,ac:500},{type:"android",rules:[{ua:"LG-D800"}],dpi:[422,424.1],bw:3,ac:500},{type:"android",rules:[{ua:"LG-D850"}],dpi:[537.9,541.9],bw:3,ac:500},{type:"android",rules:[{ua:"VS985 4G"}],dpi:[537.9,535.6],bw:3,ac:1e3},{type:"android",rules:[{ua:"Nexus 5 "}],dpi:[442.4,444.8],bw:3,ac:1e3},{type:"android",rules:[{ua:"Nexus 4"}],dpi:[319.8,318.4],bw:3,ac:1e3},{type:"android",rules:[{ua:"LG-P769"}],dpi:[240.6,247.5],bw:3,ac:1e3},{type:"android",rules:[{ua:"LGMS323"}],dpi:[206.6,204.6],bw:3,ac:1e3},{type:"android",rules:[{ua:"LGLS996"}],dpi:[403.4,401.5],bw:3,ac:1e3},{type:"android",rules:[{ua:"4560MMX"}],dpi:[240,219.4],bw:3,ac:1e3},{type:"android",rules:[{ua:"Micromax A250"}],dpi:[480,446.4],bw:3,ac:1e3},{type:"android",rules:[{ua:"Micromax AQ4501"}],dpi:240,bw:3,ac:500},{type:"android",rules:[{ua:"DROID RAZR"}],dpi:[368.1,256.7],bw:3,ac:1e3},{type:"android",rules:[{ua:"XT830C"}],dpi:[254,255.9],bw:3,ac:1e3},{type:"android",rules:[{ua:"XT1021"}],dpi:[254,256.7],bw:3,ac:500},{type:"android",rules:[{ua:"XT1023"}],dpi:[254,256.7],bw:3,ac:500},{type:"android",rules:[{ua:"XT1028"}],dpi:[326.6,327.6],bw:3,ac:1e3},{type:"android",rules:[{ua:"XT1034"}],dpi:[326.6,328.4],bw:3,ac:500},{type:"android",rules:[{ua:"XT1053"}],dpi:[315.3,316.1],bw:3,ac:1e3},{type:"android",rules:[{ua:"XT1562"}],dpi:[403.4,402.7],bw:3,ac:1e3},{type:"android",rules:[{ua:"Nexus 6 "}],dpi:[494.3,489.7],bw:3,ac:1e3},{type:"android",rules:[{ua:"XT1063"}],dpi:[295,296.6],bw:3,ac:1e3},{type:"android",rules:[{ua:"XT1064"}],dpi:[295,295.6],bw:3,ac:500},{type:"android",rules:[{ua:"XT1092"}],dpi:[422,424.1],bw:3,ac:500},{type:"android",rules:[{ua:"XT1095"}],dpi:[422,423.4],bw:3,ac:1e3},{type:"android",rules:[{ua:"A0001"}],dpi:[403.4,401],bw:3,ac:1e3},{type:"android",rules:[{ua:"ONE E1005"}],dpi:[442.4,441.4],bw:3,ac:1e3},{type:"android",rules:[{ua:"ONE A2005"}],dpi:[391.9,405.4],bw:3,ac:1e3},{type:"android",rules:[{ua:"X909"}],dpi:[442.4,444.1],bw:3,ac:1e3},{type:"android",rules:[{ua:"GT-I9082"}],dpi:[184.7,185.4],bw:3,ac:1e3},{type:"android",rules:[{ua:"SM-G360P"}],dpi:[196.7,205.4],bw:3,ac:1e3},{type:"android",rules:[{ua:"Nexus S"}],dpi:[234.5,229.8],bw:3,ac:1e3},{type:"android",rules:[{ua:"GT-I9300"}],dpi:[304.8,303.9],bw:5,ac:500},{type:"android",rules:[{ua:"SM-T230NU"}],dpi:216,bw:3,ac:500},{type:"android",rules:[{ua:"SGH-T399"}],dpi:[217.7,231.4],bw:3,ac:1e3},{type:"android",rules:[{ua:"SM-N9005"}],dpi:[386.4,387],bw:3,ac:500},{type:"android",rules:[{ua:"SAMSUNG-SM-N900A"}],dpi:[386.4,387.7],bw:3,ac:1e3},{type:"android",rules:[{ua:"GT-I9500"}],dpi:[442.5,443.3],bw:3,ac:500},{type:"android",rules:[{ua:"GT-I9505"}],dpi:439.4,bw:4,ac:1e3},{type:"android",rules:[{ua:"SM-G900F"}],dpi:[415.6,431.6],bw:5,ac:1e3},{type:"android",rules:[{ua:"SM-G900M"}],dpi:[415.6,431.6],bw:5,ac:1e3},{type:"android",rules:[{ua:"SM-G800F"}],dpi:326.8,bw:3,ac:1e3},{type:"android",rules:[{ua:"SM-G906S"}],dpi:[562.7,572.4],bw:3,ac:1e3},{type:"android",rules:[{ua:"GT-I9300"}],dpi:[306.7,304.8],bw:5,ac:1e3},{type:"android",rules:[{ua:"SM-T535"}],dpi:[142.6,136.4],bw:3,ac:500},{type:"android",rules:[{ua:"SM-N920C"}],dpi:[515.1,518.4],bw:3,ac:1e3},{type:"android",rules:[{ua:"GT-I9300I"}],dpi:[304.8,305.8],bw:3,ac:1e3},{type:"android",rules:[{ua:"GT-I9195"}],dpi:[249.4,256.7],bw:3,ac:500},{type:"android",rules:[{ua:"SPH-L520"}],dpi:[249.4,255.9],bw:3,ac:1e3},{type:"android",rules:[{ua:"SAMSUNG-SGH-I717"}],dpi:285.8,bw:3,ac:1e3},{type:"android",rules:[{ua:"SPH-D710"}],dpi:[217.7,204.2],bw:3,ac:1e3},{type:"android",rules:[{ua:"GT-N7100"}],dpi:265.1,bw:3,ac:1e3},{type:"android",rules:[{ua:"SCH-I605"}],dpi:265.1,bw:3,ac:1e3},{type:"android",rules:[{ua:"Galaxy Nexus"}],dpi:[315.3,314.2],bw:3,ac:1e3},{type:"android",rules:[{ua:"SM-N910H"}],dpi:[515.1,518],bw:3,ac:1e3},{type:"android",rules:[{ua:"SM-N910C"}],dpi:[515.2,520.2],bw:3,ac:500},{type:"android",rules:[{ua:"SM-G130M"}],dpi:[165.9,164.8],bw:3,ac:500},{type:"android",rules:[{ua:"SM-G928I"}],dpi:[515.1,518.4],bw:3,ac:1e3},{type:"android",rules:[{ua:"SM-G920F"}],dpi:580.6,bw:3,ac:500},{type:"android",rules:[{ua:"SM-G920P"}],dpi:[522.5,577],bw:3,ac:1e3},{type:"android",rules:[{ua:"SM-G925F"}],dpi:580.6,bw:3,ac:500},{type:"android",rules:[{ua:"SM-G925V"}],dpi:[522.5,576.6],bw:3,ac:1e3},{type:"android",rules:[{ua:"C6903"}],dpi:[442.5,443.3],bw:3,ac:500},{type:"android",rules:[{ua:"D6653"}],dpi:[428.6,427.6],bw:3,ac:1e3},{type:"android",rules:[{ua:"E6653"}],dpi:[428.6,425.7],bw:3,ac:1e3},{type:"android",rules:[{ua:"E6853"}],dpi:[403.4,401.9],bw:3,ac:1e3},{type:"android",rules:[{ua:"SGP321"}],dpi:[224.7,224.1],bw:3,ac:500},{type:"android",rules:[{ua:"ALCATEL ONE TOUCH Fierce"}],dpi:[240,247.5],bw:3,ac:1e3},{type:"android",rules:[{ua:"thl 5000"}],dpi:[480,443.3],bw:3,ac:1e3},{type:"android",rules:[{ua:"ZTE Blade L2"}],dpi:240,bw:3,ac:500},{type:"ios",rules:[{res:[640,960]}],dpi:[325.1,328.4],bw:4,ac:1e3},{type:"ios",rules:[{res:[640,960]}],dpi:[325.1,328.4],bw:4,ac:1e3},{type:"ios",rules:[{res:[640,1136]}],dpi:[317.1,320.2],bw:3,ac:1e3},{type:"ios",rules:[{res:[640,1136]}],dpi:[317.1,320.2],bw:3,ac:1e3},{type:"ios",rules:[{res:[750,1334]}],dpi:326.4,bw:4,ac:1e3},{type:"ios",rules:[{res:[750,1334]}],dpi:326.4,bw:4,ac:1e3},{type:"ios",rules:[{res:[1242,2208]}],dpi:[453.6,458.4],bw:4,ac:1e3},{type:"ios",rules:[{res:[1242,2208]}],dpi:[453.6,458.4],bw:4,ac:1e3}],n=function(){function e(t){this.width=t.width||e.getScreenWidth(),this.height=t.height||e.getScreenHeight(),this.widthMeters=t.widthMeters,this.heightMeters=t.heightMeters,this.bevelMeters=t.bevelMeters}return e.isIOS=function(){return/iPad|iPhone|iPod/.test(navigator.platform)},e.getScreenWidth=function(){return Math.max(window.screen.width,window.screen.height)*window.devicePixelRatio},e.getScreenHeight=function(){return Math.min(window.screen.width,window.screen.height)*window.devicePixelRatio},e.detect=function(t){for(var n=navigator.userAgent||navigator.vendor||window.opera,a=e.getScreenWidth(),s=e.getScreenHeight(),u=0;u<i.length;u++){var c=i[u];if(c.rules)if("ios"===c.type||"android"===c.type){if(e.isIOS()===("ios"===c.type)){for(var l=!1,d=0;d<c.rules.length;d++){var h=c.rules[d];if(e.matchRule(h,n,a,s)){t.debug("Rule matched:"+JSON.stringify(h)),l=!0;break}}if(l){var p=.0254,f={width:a,height:s,widthMeters:.0254/(c.dpi[0]||c.dpi)*a,heightMeters:p/(c.dpi[1]||c.dpi)*s,bevelMeters:.001*c.bw};return t.debug("Device found: "+JSON.stringify(f)),new e(f)}}}else t.debug("Device["+u+"] has invalid type.");else t.debug("Device["+u+"] has no rules section.")}return e.isIOS()?(t.debug("Using fallback iOS device measurements."),o):(t.debug("Using fallback Android device measurements."),r)},e.matchRule=function(e,t,i,n){if(!e.ua&&!e.res||e.ua&&0>t.indexOf(e.ua))return!1;if(e.res){if(!e.res[0]||!e.res[1])return!1;var r=e.res[0],o=e.res[1];if(Math.min(i,n)!==Math.min(r,o)||Math.max(i,n)!==Math.max(r,o))return!1}return!0},e}();t.Device=n;var r=new n({widthMeters:.11,heightMeters:.062,bevelMeters:.004}),o=new n({widthMeters:.1038,heightMeters:.0584,bevelMeters:.004})},3973:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DeviceInfo=void 0;var n=i(95433),r=i(44369),o=i(7247);t.DeviceInfo=function(){function e(e,t){this.U4=new o.CardboardViewer(e),this.V4=n.Device.detect(t)}return e.prototype.getDevice=function(){return this.V4},e.prototype.setViewer=function(e){this.U4=e},e.prototype.getDistortedFieldOfViewLeftEye=function(){var e=this.U4.screenLensDistance,t=this.U4.distortion,i=(this.V4.widthMeters-this.U4.interLensDistance)/2,n=this.U4.interLensDistance/2,o=this.U4.baselineLensDistance-this.V4.bevelMeters,a=this.V4.heightMeters-o,s=r.MathUtil.radToDeg(Math.atan(t.distort(i/e))),u=r.MathUtil.radToDeg(Math.atan(t.distort(n/e))),c=r.MathUtil.radToDeg(Math.atan(t.distort(o/e))),l=r.MathUtil.radToDeg(Math.atan(t.distort(a/e)));return{leftDegrees:Math.min(s,this.U4.fov),rightDegrees:Math.min(u,this.U4.fov),downDegrees:Math.min(c,this.U4.fov),upDegrees:Math.min(l,this.U4.fov)}},e.prototype.getLeftEyeVisibleTanAngles=function(){var e=this.U4.distortion,t=Math.tan(-r.MathUtil.degToRad(this.U4.fov)),i=Math.tan(r.MathUtil.degToRad(this.U4.fov)),n=Math.tan(r.MathUtil.degToRad(this.U4.fov)),o=Math.tan(-r.MathUtil.degToRad(this.U4.fov)),a=this.V4.widthMeters/4,s=this.V4.heightMeters/2,u=this.U4.baselineLensDistance-this.V4.bevelMeters-s,c=this.U4.interLensDistance/2-a,l=-u,d=this.U4.screenLensDistance,h=e.distort((c-a)/d),p=e.distort((l+s)/d),f=e.distort((c+a)/d),g=e.distort((l-s)/d),m=new Float32Array(4);return m[0]=Math.max(t,h),m[1]=Math.min(i,p),m[2]=Math.min(n,f),m[3]=Math.max(o,g),m},e.prototype.getLeftEyeNoLensTanAngles=function(){var e=this.U4.distortion,t=new Float32Array(4),i=e.distortInverse(Math.tan(-r.MathUtil.degToRad(this.U4.fov))),n=e.distortInverse(Math.tan(r.MathUtil.degToRad(this.U4.fov))),o=e.distortInverse(Math.tan(r.MathUtil.degToRad(this.U4.fov))),a=e.distortInverse(Math.tan(-r.MathUtil.degToRad(this.U4.fov))),s=this.V4.widthMeters/4,u=this.V4.heightMeters/2,c=this.U4.baselineLensDistance-this.V4.bevelMeters-u,l=this.U4.interLensDistance/2-s,d=-c,h=this.U4.screenLensDistance,p=(l-s)/h,f=(d+u)/h,g=(l+s)/h,m=(d-u)/h;return t[0]=Math.max(i,p),t[1]=Math.min(n,f),t[2]=Math.min(o,g),t[3]=Math.max(a,m),t},e.prototype.getLeftEyeVisibleScreenRect=function(e){var t=this.U4.screenLensDistance,i=(this.V4.widthMeters-this.U4.interLensDistance)/2,n=this.U4.baselineLensDistance-this.V4.bevelMeters,r=(e[0]*t+i)/this.V4.widthMeters,o=(e[1]*t+n)/this.V4.heightMeters,a=(e[2]*t+i)/this.V4.widthMeters,s=(e[3]*t+n)/this.V4.heightMeters;return{x:r,y:s,width:a-r,height:o-s}},e.prototype.getFieldOfViewLeftEye=function(e){return e?this.getUndistortedFieldOfViewLeftEye():this.getDistortedFieldOfViewLeftEye()},e.prototype.getFieldOfViewRightEye=function(e){var t=this.getFieldOfViewLeftEye(e);return{leftDegrees:t.leftDegrees,rightDegrees:t.rightDegrees,downDegrees:t.downDegrees,upDegrees:t.upDegrees}},e.prototype.getUndistortedFieldOfViewLeftEye=function(){var e=this.getUndistortedParams_();return{leftDegrees:r.MathUtil.radToDeg(Math.atan(e.outerDist)),rightDegrees:r.MathUtil.radToDeg(Math.atan(e.innerDist)),downDegrees:r.MathUtil.radToDeg(Math.atan(e.bottomDist)),upDegrees:r.MathUtil.radToDeg(Math.atan(e.topDist))}},e.prototype.getUndistortedViewportLeftEye=function(){var e=this.getUndistortedParams_(),t=this.U4.screenLensDistance,i=this.V4.widthMeters/t,n=this.V4.heightMeters/t,r=this.V4.width/i,o=this.V4.height/n,a=Math.round((e.eyePosX-e.outerDist)*r),s=Math.round((e.eyePosY-e.bottomDist)*o);return{x:a,y:s,width:Math.round((e.eyePosX+e.innerDist)*r)-a,height:Math.round((e.eyePosY+e.topDist)*o)-s}},e.prototype.getUndistortedParams_=function(){var e=this.U4.distortion,t=this.U4.screenLensDistance,i=this.U4.interLensDistance/2/t,n=this.V4.widthMeters/t,o=this.V4.heightMeters/t,a=n/2-i,s=(this.U4.baselineLensDistance-this.V4.bevelMeters)/t,u=this.U4.fov,c=e.distortInverse(Math.tan(r.MathUtil.degToRad(u))),l=Math.min(a,c),d=Math.min(i,c),h=Math.min(s,c);return{outerDist:l,innerDist:d,topDist:Math.min(o-s,c),bottomDist:h,eyePosX:a,eyePosY:s}},e}()},67392:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Distortion=void 0,t.Distortion=function(){function e(e){this.Icb=e}return e.prototype.distortInverse=function(e){for(var t=0,i=1,n=e-this.distort(t);Math.abs(i-t)>1e-4;){var r=e-this.distort(i),o=i-(i-t)/(r-n)*r;t=i,i=o,n=r}return i},e.prototype.distort=function(e){for(var t=e*e,i=0,n=this.Icb.length-1;n>=0;n--)i=t*(i+this.Icb[n]);return(i+1)*e},e.solveLinear_=function(e,t){var i,n,r,o=e.length;for(n=0;n<o-1;++n)for(r=n+1;r<o;++r){var a=e[n][r]/e[n][n];for(i=n+1;i<o;++i)e[i][r]-=a*e[i][n];t[r]-=a*t[n]}var s=Array(o);for(n=o-1;n>=0;--n){var u=t[n];for(i=n+1;i<o;++i)u-=e[i][n]*s[i];s[n]=u/e[n][n]}return s},e.solveLeastSquares_=function(t,i){var n,r,o,a,s=t.length,u=t[0].length;if(u!==i.length)throw Error("Matrix / vector dimension mismatch");var c=Array(s);for(o=0;o<s;++o)for(c[o]=Array(s),r=0;r<s;++r){for(a=0,n=0;n<u;++n)a+=t[r][n]*t[o][n];c[o][r]=a}var l=Array(s);for(r=0;r<s;++r){for(a=0,n=0;n<u;++n)a+=t[r][n]*i[n];l[r]=a}return e.solveLinear_(c,l)},e.prototype.approximateInverse=function(t,i){t=t||1,i=i||100;var n,r,o=Array(12);for(r=0;r<12;++r)o[r]=Array(i);var a=Array(i);for(n=0;n<i;++n){var s=t*(n+1)/i,u=this.distort(s),c=u;for(r=0;r<12;++r)c*=u*u,o[r][n]=c;a[n]=s-u}return e.solveLeastSquares_(o,a)},e}()},44369:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Quat=t.Vec3=t.Mat4=t.MathUtil=void 0,t.MathUtil=function(){function e(){}return e.degToRad=function(e){return e*Math.PI/180},e.radToDeg=function(e){return 180*e/Math.PI},e.hypot=function(e,t){return Math.sqrt(e*e+t*t)},e.getSum=function(e){return e.length>0?e.reduce(function(e,t){return e+t},0):0},e.getAverage=function(t){return t.length>0?e.getSum(t)/t.length:1/0},e.sign=function(e){return Math.sign&&Math.sign(e)||(e>0?1:e<0?-1:0)},e}(),t.Mat4=function(){function e(){}return e.create=function(){var e;return(e="undefined"!=typeof Float32Array?new Float32Array(16):Array(16))[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e},e.identity=function(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e},e.rotate=function(e,t,i){var n,r,o,a,s,u,c,l,d,h,p,f,g,m,y,v,S,b,E,T,_,A,P,M,I=i[0],R=i[1],C=i[2],O=Math.sqrt(I*I+R*R+C*C);return 1e-6>Math.abs(O)?null:(I*=O=1/O,R*=O,C*=O,n=Math.sin(t),o=1-(r=Math.cos(t)),a=e[0],s=e[1],u=e[2],c=e[3],l=e[4],d=e[5],h=e[6],p=e[7],f=e[8],g=e[9],m=e[10],y=e[11],v=I*I*o+r,S=R*I*o+C*n,b=C*I*o-R*n,E=I*R*o-C*n,T=R*R*o+r,_=C*R*o+I*n,A=I*C*o+R*n,P=R*C*o-I*n,M=C*C*o+r,e[0]=a*v+l*S+f*b,e[1]=s*v+d*S+g*b,e[2]=u*v+h*S+m*b,e[3]=c*v+p*S+y*b,e[4]=a*E+l*T+f*_,e[5]=s*E+d*T+g*_,e[6]=u*E+h*T+m*_,e[7]=c*E+p*T+y*_,e[8]=a*A+l*P+f*M,e[9]=s*A+d*P+g*M,e[10]=u*A+h*P+m*M,e[11]=c*A+p*P+y*M,e)},e.multiply=function(e,t,i){var n=t[0],r=t[1],o=t[2],a=t[3],s=t[4],u=t[5],c=t[6],l=t[7],d=t[8],h=t[9],p=t[10],f=t[11],g=t[12],m=t[13],y=t[14],v=t[15],S=i[0],b=i[1],E=i[2],T=i[3];return e[0]=S*n+b*s+E*d+T*g,e[1]=S*r+b*u+E*h+T*m,e[2]=S*o+b*c+E*p+T*y,e[3]=S*a+b*l+E*f+T*v,S=i[4],b=i[5],E=i[6],T=i[7],e[4]=S*n+b*s+E*d+T*g,e[5]=S*r+b*u+E*h+T*m,e[6]=S*o+b*c+E*p+T*y,e[7]=S*a+b*l+E*f+T*v,S=i[8],b=i[9],E=i[10],T=i[11],e[8]=S*n+b*s+E*d+T*g,e[9]=S*r+b*u+E*h+T*m,e[10]=S*o+b*c+E*p+T*y,e[11]=S*a+b*l+E*f+T*v,S=i[12],b=i[13],E=i[14],T=i[15],e[12]=S*n+b*s+E*d+T*g,e[13]=S*r+b*u+E*h+T*m,e[14]=S*o+b*c+E*p+T*y,e[15]=S*a+b*l+E*f+T*v,e},e.perspective=function(e,t,i,n,r){var o=1/Math.tan(t/2),a=1/(n-r);return e[0]=o/i,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=o,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=(r+n)*a,e[11]=-1,e[12]=0,e[13]=0,e[14]=2*r*n*a,e[15]=0,e},e.invert=function(e,t){var i=t[0],n=t[1],r=t[2],o=t[3],a=t[4],s=t[5],u=t[6],c=t[7],l=t[8],d=t[9],h=t[10],p=t[11],f=t[12],g=t[13],m=t[14],y=t[15],v=i*s-n*a,S=i*u-r*a,b=i*c-o*a,E=n*u-r*s,T=n*c-o*s,_=r*c-o*u,A=l*g-d*f,P=l*m-h*f,M=l*y-p*f,I=d*m-h*g,R=d*y-p*g,C=h*y-p*m,O=v*C-S*R+b*I+E*M-T*P+_*A;return O?(O=1/O,e[0]=(s*C-u*R+c*I)*O,e[1]=(r*R-n*C-o*I)*O,e[2]=(g*_-m*T+y*E)*O,e[3]=(h*T-d*_-p*E)*O,e[4]=(u*M-a*C-c*P)*O,e[5]=(i*C-r*M+o*P)*O,e[6]=(m*b-f*_-y*S)*O,e[7]=(l*_-h*b+p*S)*O,e[8]=(a*R-s*M+c*A)*O,e[9]=(n*M-i*R-o*A)*O,e[10]=(f*T-g*b+y*v)*O,e[11]=(d*b-l*T-p*v)*O,e[12]=(s*P-a*I-u*A)*O,e[13]=(i*I-n*P+r*A)*O,e[14]=(g*S-f*E-m*v)*O,e[15]=(l*E-d*S+h*v)*O,e):null},e}();var i=function(){function e(){}return e.create=function(){var e;return(e="undefined"!=typeof Float32Array?new Float32Array(3):[,,,])[0]=0,e[1]=0,e[2]=0,e},e}();t.Vec3=i,t.Quat=function(){function e(){}return e.create=function(){var e;return(e="undefined"!=typeof Float32Array?new Float32Array(4):[,,,,])[0]=0,e[1]=0,e[2]=0,e[3]=1,e},e.fromValues=function(e,t,i,n){var r;return(r="undefined"!=typeof Float32Array?new Float32Array(4):[,,,,])[0]=e,r[1]=t,r[2]=i,r[3]=n,r},e.multiply=function(e,t,i){var n=t[0],r=t[1],o=t[2],a=t[3],s=i[0],u=i[1],c=i[2],l=i[3];return e[0]=n*l+a*s+r*c-o*u,e[1]=r*l+a*u+o*s-n*c,e[2]=o*l+a*c+n*u-r*s,e[3]=a*l-n*s-r*u-o*c,e},e.toAngle=function(e){var t=i.create(),n=e[0]*e[0],r=e[1]*e[1],o=e[2]*e[2],a=e[0]*e[1]+e[2]*e[3];return a>.499?(t[2]=2*Math.atan2(e[0],e[3]),t[0]=Math.PI/2,t[1]=0):a<-.499?(t[2]=-2*Math.atan2(e[0],e[3]),t[0]=-Math.PI/2,t[1]=0):(t[2]=Math.atan2(2*e[1]*e[3]-2*e[0]*e[2],1-2*r-2*o),t[0]=Math.asin(2*a),t[1]=Math.atan2(2*e[0]*e[3]-2*e[1]*e[2],1-2*n-2*o)),{yaw:180*t[2]/Math.PI,pitch:180*t[1]/Math.PI,roll:180*t[0]/Math.PI}},e}()},57160:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProtoBuf=void 0,t.ProtoBuf=function(){function e(e,t){this.Xbb=e,this.abb=t,this.Ybb=0,this.Zbb=new DataView(this.Xbb.buffer,0,this.Xbb.length)}return e.prototype.readVarInt=function(){var e,t=0;for(e=0;this.Ybb<this.Xbb.length&&(t|=(127&this.Xbb[this.Ybb])<<e,128&this.Xbb[this.Ybb]);this.Ybb++)e+=7;return this.Ybb++,t},e.prototype.readHeader=function(){var e=this.readVarInt();return{tag:e>>>3,type:7&e}},e.prototype.readString=function(){for(var e=this.readVarInt(),t=Array(e),i=0,n=this.Ybb;n<this.Ybb+e;n++){var r=this.Xbb[n];if(r<128)t[i++]=r;else if(r>=192&&r<224&&n+1<e)t[i++]=(31&r)<<6|63&this.Xbb[++n];else if(r>=224&&r<240&&n+2<e)t[i++]=(15&r)<<12|(63&this.Xbb[++n])<<6|63&this.Xbb[++n];else{if(!(r>=240&&r<248&&n+3<e))throw Error("Malformed UTF8 character at byte offset "+n);var o=(7&r)<<18|(63&this.Xbb[++n])<<12|(63&this.Xbb[++n])<<6|63&this.Xbb[++n];o<=65535?t[i++]=o:(o^=65536,t[i++]=55296|o>>10,t[i++]=56320|1023&o)}}var a="",s=16384;for(n=0;n<i;n+=s)a+=String.fromCharCode.apply(String,t.slice(n,n+s<=i?n+s:i));return this.Ybb+=e,a},e.prototype.readPacked=function(e){var t=this.readVarInt(),i=[];switch(e){case"float":for(var n=0;n<t/4;n++)i.push(this.Zbb.getFloat32(this.Ybb,!0)),this.Ybb+=4;break;case"int":for(var r=this.Ybb;this.Ybb<r+t;)i.push(this.readVarInt())}return i},e.prototype.bbb=function(e){for(var t=0,i=0;i<e;i++)t=(t<<8)+this.Xbb[this.Ybb+i],this.Ybb++;return t},e.prototype.readNum32=function(){var e=this.Zbb.getFloat32(this.Ybb,!0);return this.Ybb+=4,e},e.prototype.readNum64=function(){return this.bbb(8)},e.prototype.readField=function(e){var t;switch(e){case 0:t=this.readVarInt();break;case 1:t=this.readNum64();break;case 2:t=this.readString();break;case 5:t=this.readNum32()}return t},e.prototype.readAll=function(){for(var e={};this.Ybb<this.Xbb.length;){var t=this.readHeader(),i=void 0;if(this.abb.hasOwnProperty(t.tag))if(i=this.abb[t.tag],2===t.type&&i&&i.hasOwnProperty("packed")&&i.packed)e[i.name]=this.readPacked(i.type);else{var n=this.readField(t.type);"boolean"===i.type?n=!!n:"object"==typeof i.type&&(n=i.type[n]),e[i.name]=n}}if(e.length>0)for(var r in this.abb.defaults)this.abb.defaults.hasOwnProperty(r)&&void 0===e[r]&&(e[r]=this.abb.defaults[r]);return e},e}()},43948:function(e,t){"use strict";var i,n,r;Object.defineProperty(t,"__esModule",{value:!0}),t.TransitionTimingType=t.VRState=t.VRContentType=void 0,function(e){e.Single="single",e.TAB="tab",e.SBS="sbs"}(i||(t.VRContentType=i={})),function(e){e.Ready="ready",e.Playing="playing",e.Error="error",e.Uninitialized="uninitialized"}(n||(t.VRState=n={})),function(e){e.None="none",e.EaseIn="ease-in",e.EaseOut="ease-out",e.EaseInOut="ease-in-out"}(r||(t.TransitionTimingType=r={}))},61535:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InternalVRHandler=void 0;var n=i(5357),r=i(3973),o=i(25926),a=i(4224),s=i(45202),u=i(3714),c=i(44468),l=i(21513),d=i(19274),h=i(43948),p=i(33639),f=i(85361);t.InternalVRHandler=function(){function e(t,i,c,g,m,y,v,S){var b=this;this.YJ=null,this.ZJ=null,this.aJ=null,this.bJ=null,this.cJ=h.VRState.Uninitialized,this.dJ=null,this.eJ=!1,this.fJ=!1,this.gJ=null,this.hJ=null,this.iJ=null,this.jJ=!1,this.zJ=function(){b.kJ=!0},this.DJ=function(e){if(b.cJ!==h.VRState.Playing)return b.mJ&&b.rJ.onRenderingSuspended&&b.rJ.onRenderingSuspended(),void(b.mJ=!1);b.AJ(),b.fJ!==b.eJ&&(b.oJ.getEventFunction()(u.PlayerEvent.VRStereoChanged,{stereo:b.eJ}),b.fJ=b.eJ);var t=b.hJ.update(e),i=!b.jJ||b.kJ||0===e;i||t||0===e||b.lJ?(b.nJ&&b.rJ.onStartRendering&&b.rJ.onStartRendering(),!b.mJ&&b.rJ.onRenderingResumed&&b.rJ.onRenderingResumed(),b.gJ.drawScene(b.hJ.getProjectionInverse(),i),b.nJ=!1,b.mJ=!0):(b.mJ&&b.rJ.onRenderingSuspended&&b.rJ.onRenderingSuspended(),b.mJ=!1),null===b.dJ&&(b.aJ=requestAnimationFrame(b.DJ)),b.kJ=!1,b.lJ=!1},this.EJ=function(){b.yJ().removeEventListener(d.MediaElementEvent.playing,b.EJ),b.yJ().removeEventListener(d.MediaElementEvent.seeked,b.EJ),b.cJ===h.VRState.Ready&&(b.AJ(),b.cJ=h.VRState.Playing,b.aJ=requestAnimationFrame(b.DJ))},this.FJ=function(e){b.cJ=h.VRState.Error,b.dJ=e,b.CJ(),b.aJ&&(cancelAnimationFrame(b.aJ),b.aJ=null),b.oJ.getEventFunction()(u.PlayerEvent.Warning,new o.PlayerWarning(a.WarningCode.VR_RENDERING_ERROR)),b.sJ.debug("VR Rendering error: "+e)},this.enableGyroscope=function(){return b.hJ.enableGyroscope(),!0},this.disableGyroscope=function(){return b.hJ.disableGyroscope(),!0},this.isGyroscopeEnabled=function(){return b.hJ.isGyroscopeEnabled()},this.enableMouseControl=function(){return b.hJ.enableMouseControl(),!0},this.disableMouseControl=function(){return b.hJ.disableMouseControl(),!0},this.isMouseControlEnabled=function(){return b.hJ.isMouseControlEnabled()},this.enableKeyboardControl=function(){return b.hJ.enableKeyboardControl(),!0},this.disableKeyboardControl=function(){return b.hJ.disableKeyboardControl(),!0},this.isKeyboardControlEnabled=function(){return b.hJ.isKeyboardControlEnabled()},this.setViewingDirection=function(e){return!!b.hJ&&(b.hJ.setViewingDirection(e),!0)},this.pause=function(){b.jJ=!0},this.GJ=function(){var e=b.yJ();4!==e.readyState?e.addEventListener(d.MediaElementEvent.playing,function(){return b.jJ=!1}):b.jJ=!1},this.HJ=function(){b.oJ.off(u.PlayerEvent.Playing,b.GJ),b.oJ.off(u.PlayerEvent.Paused,b.pause),b.oJ.off(u.PlayerEvent.Destroy,b.HJ),b.oJ.off(u.PlayerEvent.SourceUnloaded,b.HJ),b.oJ=null;var e=b.yJ();b.vJ&&b.vJ.removeEventListener(d.MediaElementEvent.seeked,b.zJ),b.CJ(),b.YJ&&b.YJ.parentNode&&(b.YJ.parentNode.removeChild(b.YJ),b.YJ=null),b.ZJ&&b.ZJ.parentNode&&(b.ZJ.parentNode.removeChild(b.ZJ),b.ZJ=null),b.bJ&&b.bJ.parentNode&&(b.bJ.parentNode.removeChild(b.bJ),b.bJ=null),b.cJ=h.VRState.Uninitialized,b.aJ&&(cancelAnimationFrame(b.aJ),b.aJ=null),b.hJ&&b.hJ.destroy(),b.hJ=null,b.gJ.destroy(),b.gJ=null,e.removeEventListener(d.MediaElementEvent.playing,b.EJ),e.removeEventListener(d.MediaElementEvent.seeked,b.EJ)},this.oJ=t.eventHandler,this.vJ=t.videoElement,this.wJ=g,this.pJ=t.parentHtmlElement,this.id=i,this.qJ=c,this.rJ=S,this.sJ=m,this.tJ=y,this.uJ=t.sourceContext.technology.streaming,this.xJ=v,this.kJ=!1,this.lJ=!1,this.mJ=!1,this.nJ=!0,this.YJ=document.createElement("canvas"),this.YJ.setAttribute("id","bitmovinplayer-vr-canvas"),this.YJ.style.display="none",this.YJ.style.position="absolute";var E=this.pJ.getElementsByClassName(s.Environment.idPrefix+"poster")[0];E?this.pJ.insertBefore(this.YJ,E):this.pJ.appendChild(this.YJ);var T=t.sourceContext.technology.player;if(e.isVideoTextureSupported(y,this.uJ,T)?this.sJ.debug("VR: using 3D rendering context"):(this.ZJ=document.createElement("canvas"),this.ZJ.setAttribute("id","bitmovinplayer-vr-helper-canvas"),this.ZJ.style.display="none",this.ZJ.style.position="absolute",this.pJ.insertBefore(this.ZJ,this.YJ),this.sJ.debug("VR: using 2D rendering context")),(0,l.getCapabilities)().isSafariIOS&&(this.vJ.setAttribute("playsinline",""),this.vJ.setAttribute("webkit-playsinline",""),this.sJ.debug("VR: set playsinline = true")),this.bJ=document.getElementById("bitmovinplayer-no-select-style-node"),this.bJ||(this.bJ=document.createElement("style"),this.bJ.setAttribute("id","bitmovinplayer-no-select-style-node"),this.bJ.appendChild(document.createTextNode(".bitmovinplayer-no-select { -webkit-user-select: none; -moz-user-select: -moz-none; -ms-user-select: none; user-select: none; }")),document.getElementsByTagName("head")[0].appendChild(this.bJ)),this.eJ=this.qJ.stereo,this.fJ=this.eJ,this.qJ.restrictedInlinePlayback?this.sJ.debug("VR: using restricted inline playback"):this.vJ.addEventListener(d.MediaElementEvent.seeked,this.zJ),"string"==typeof this.qJ.cardboard){var _=n.Cardboard.decode(this.qJ.cardboard);this.sJ.debug("cardboard: "+JSON.stringify(_)),_.hasOwnProperty("distortion_coefficients")&&(this.iJ=new r.DeviceInfo(_,this.sJ))}this.cJ=h.VRState.Ready,this.hJ=new p.OrientationHandler(this.YJ,this.pJ,this.qJ,this.rJ,this.oJ),this.gJ=new f.Renderer(this.YJ,this.ZJ,t,this.iJ,this.FJ,this.sJ,this.xJ,this.qJ,this.rJ),this.oJ.on(u.PlayerEvent.Playing,this.GJ),this.oJ.on(u.PlayerEvent.Paused,this.pause),this.oJ.on(u.PlayerEvent.Destroy,this.HJ),this.oJ.on(u.PlayerEvent.SourceUnloaded,this.HJ),this.BJ(),this.AJ();var A=this.yJ();4!==A.readyState&&A.paused?(A.addEventListener(d.MediaElementEvent.playing,this.EJ),A.addEventListener(d.MediaElementEvent.seeked,this.EJ)):this.EJ()}return e.prototype.yJ=function(){return this.qJ.restrictedInlinePlayback&&this.wJ?this.wJ:this.vJ},e.prototype.AJ=function(){if(this.YJ){this.pJ&&this.pJ.clientWidth&&this.pJ.clientHeight?(e=this.pJ.clientWidth,t=this.pJ.clientHeight):(e=window.innerWidth,t=window.innerHeight),this.vJ&&this.vJ.videoWidth&&this.vJ.videoHeight?(i=this.vJ.videoWidth,n=this.vJ.videoHeight):(i=e,n=t);var e,t,i,n,r=(this.tJ.devicePixelRatio||1)/this.gJ.getBackingStoreRatio(),o=e*r,a=t*r,s=o/a;o>i&&(a=(o=i)/s),a>n&&(o=(a=n)*s),this.YJ.width===o&&this.YJ.height===a||(this.YJ.width=o,this.YJ.height=a),this.ZJ&&(this.ZJ.width!==i||this.ZJ.height!==n)&&(this.ZJ.width=i,this.ZJ.height=n)}},e.prototype.BJ=function(){this.YJ&&(this.YJ.style.display="block"),this.ZJ&&(this.ZJ.style.display="block"),this.vJ&&(this.vJ.style.display="none")},e.prototype.CJ=function(){this.YJ&&(this.YJ.style.display="none"),this.ZJ&&(this.ZJ.style.display="none"),this.vJ&&this.vJ.style&&(this.vJ.style.display="block")},e.isVideoTextureSupported=function(e,t,i){var n=e.appName,r=e.userAgent,o=e.appVersion,a=(0,l.getCapabilities)().safariVersion,s=(a.major>10||10===a.major&&a.minor>=1)&&!(0,l.getCapabilities)().isSafariIOS,u=-1;return!(t===c.StreamType.Hls&&i===c.PlayerType.Native&&!s)&&("Microsoft Internet Explorer"===n?null!==RegExp("MSIE ([0-9]{1,}[\\.0-9]{0,})").exec(r)&&(u=parseFloat(RegExp.$1)):"Netscape"===n&&(-1!==o.indexOf("Trident")?u=11:null!==RegExp("Edge/([0-9]{1,}[\\.0-9]{0,})").exec(r)&&(u=parseFloat(RegExp.$1))),-1===u||u>=13)},e.prototype.setStereo=function(e){return this.lJ=this.eJ!==e,this.eJ=e,this.eJ?(this.gJ.enableStereo(),this.hJ.enableStereo()):(this.gJ.disableStereo(),this.hJ.disableStereo()),!0},e.prototype.getStereo=function(){return this.eJ},e.prototype.getState=function(){return this.cJ===h.VRState.Ready?h.VRState.Ready:this.cJ===h.VRState.Playing?h.VRState.Playing:this.cJ===h.VRState.Error?h.VRState.Error:this.cJ===h.VRState.Uninitialized?null:void 0},e.prototype.getLastError=function(){return this.dJ},e.prototype.getViewingDirection=function(){return this.hJ?this.hJ.getViewingDirection():{yaw:0,pitch:0,roll:0}},e.prototype.moveViewingDirection=function(e){return!!this.hJ&&(this.hJ.moveViewingDirection(e),!0)},e.prototype.setViewingDirectionChangeEventInterval=function(e){return!!this.hJ&&(this.hJ.setViewingDirectionChangeEventInterval(e),!0)},e.prototype.getViewingDirectionChangeEventInterval=function(){return this.hJ?this.hJ.getViewingDirectionChangeEventInterval():-1},e.prototype.setViewingDirectionChangeThreshold=function(e){return!!this.hJ&&(this.hJ.setViewingDirectionChangeThreshold(e),!0)},e.prototype.getViewingDirectionChangeThreshold=function(){return this.hJ?this.hJ.getViewingDirectionChangeThreshold():-1},e.prototype.setVerticalFieldOfView=function(e){return!!this.hJ&&(this.hJ.setVerticalFieldOfView(e),!0)},e.prototype.getVerticalFieldOfView=function(){return this.hJ?this.hJ.getVerticalFieldOfView():-1},e.prototype.setHorizontalFieldOfView=function(e){return!!this.hJ&&(this.hJ.setHorizontalFieldOfView(e),!0)},e.prototype.getHorizontalFieldOfView=function(){return this.hJ?this.hJ.getHorizontalFieldOfView():-1},e.prototype.zoom=function(e){return!!this.hJ&&this.hJ.zoom(e)},e.prototype.getZoom=function(){return this.hJ?this.hJ.getZoom():-1},e.prototype.deviceOrientationPermissionRequired=function(){var e,t;return null!=(t=null==(e=this.hJ)?void 0:e.permissionRequired())&&t},e.prototype.requestDeviceOrientationPermission=function(){var e,t;return null!=(t=null==(e=this.hJ)?void 0:e.requestPermission())?t:Promise.resolve()},e}()},6463:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VRState=t.TransitionTimingType=t.VRContentType=t.VRModuleDefinition=void 0;var n=i(62756),r=i(43948);Object.defineProperty(t,"TransitionTimingType",{enumerable:!0,get:function(){return r.TransitionTimingType}}),Object.defineProperty(t,"VRContentType",{enumerable:!0,get:function(){return r.VRContentType}}),Object.defineProperty(t,"VRState",{enumerable:!0,get:function(){return r.VRState}});var o=i(24180);t.VRModuleDefinition={name:n.ModuleName.VR,module:{VRHandler:o.VRHandler},exports:{VRContentType:r.VRContentType,TransitionTimingType:r.TransitionTimingType,VRState:r.VRState}},t.default=t.VRModuleDefinition},85361:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Renderer=void 0;var n=i(44369),r=i(3714),o=i(44468),a=i(43948),s=i(54479),u=i(17378),c=function(){function e(){this.g2=[],this.h2=[]}return e.prototype.getVideoWidths=function(){return this.g2},e.prototype.getVideoHeights=function(){return this.h2},e.prototype.add=function(e,t){0>this.g2.indexOf(e)&&(this.g2.push(e),this.g2.sort(function(e,t){return e-t})),0>this.h2.indexOf(t)&&(this.h2.push(t),this.h2.sort(function(e,t){return e-t}))},e}();t.Renderer=function(){function e(e,t,i,n,o,a,l,d,h){var p=this;this.i2=null,this.j2=null,this.k2=s.GL_ERROR.NO_ERROR,this.m2=-1,this.n2=!1,this.o2=-1,this.p2=-1,this.q2=-1,this.r2=-1,this.s2=-1,this.t2=[-1,-1,1,-1,1,1,-1,1],this.E3=[0,1,2,0,2,3],this.F3=-1,this.G3=/mediump/g,this.H3=!0,this.I3=[0,0,0,0,0,0,0,0,0,0,0,0],this.J3={LEFT:0,RIGHT:1},this.K3=[0,0,0,0,0,0,0,0,0,0,0,0],this.L3=1,this.M3=[[1,1],[1,1]],this.N3=[1,1],this.S3=null,this.T3=null,this.U3=null,this.V3=null,this.W3=null,this.X3=null,this.Y3=-1,this.Z3=-1,this.a3=null,this.b3=!1,this.c3=null,d.stereo?(this.n2=!0,this.m2=2):(this.n2=!1,this.m2=1),this.R3=i.eventHandler,this.S3=a,this.T3=e,this.U3=t,this.V3=i.videoElement,this.W3=o,this.X3=i.sourceContext.technology.streaming,this.c3=l,this.d3=d,this.e3=h,this.l2=[],this.R3.on(r.PlayerEvent.TimeChanged,function(){return p.H3=!1}),n&&(this.K3=this.P4(n),this.L3=this.Q4(n),this.M3[this.J3.LEFT]=this.S4(n,this.J3.LEFT),this.M3[this.J3.RIGHT]=this.S4(n,this.J3.RIGHT),this.N3=this.T4(n)),this.a3=new c,this.Q3=new u.FrameRateMonitor(1500,1e3),this.d3.enableFrameRateMeasurements?(this.Q3.enable(),this.Q3.subscribe(this)):this.Q3.disable();try{this.v3(),this.u3(),this.w3(),this.x3(),this.y3(),this.z3(),this.A3(),this.B3()}catch(e){this.S3.error(e)}}return e.prototype.r3=function(e){if(void 0===e&&(e=[]),null!==this.i2){var t=this.i2.getError();if(t===s.GL_ERROR.NO_ERROR)return this.k2=s.GL_ERROR.NO_ERROR,void(this.l2=[]);if(this.l2.push(t),e.indexOf(t)>-1&&this.H3)throw this.k2=s.GL_ERROR.NO_ERROR,this.l2=[],"STARTUP ERROR";if(!(this.l2.length>=this.c3.MAX_CONSECUTIVE_VR_ERRORS))return;this.k2=this.l2[this.l2.length-1]}var i="Unable to initialize WebGL";throw s.GL_ERROR_STR[this.k2]&&(i=s.GL_ERROR_STR[this.k2]),this.W3(i),i},e.prototype.s3=function(e,t){for(var i=[],n=2;n<arguments.length;n++)i[n-2]=arguments[n];var r=null;if(e&&"function"==typeof e[t]){try{r=e[t].apply(e,i)}catch(e){this.S3.warn("could not call WebGL function ("+t+"("+JSON.stringify(i)+")): "+e)}this.r3()}return r},e.prototype.t3=function(e){throw this.k2=s.GL_ERROR.OTHER_ERROR,this.W3(e),e},e.prototype.u3=function(){this.P3=i(10768),this.O3=i(50766);var e=this.s3(this.i2,"getShaderPrecisionFormat",this.i2.FRAGMENT_SHADER,this.i2.HIGH_FLOAT);0!==e.precision&&0!==e.rangeMin&&0!==e.rangeMax&&(this.P3=this.P3.replace(this.G3,"highp")),0!==(e=this.s3(this.i2,"getShaderPrecisionFormat",this.i2.VERTEX_SHADER,this.i2.HIGH_FLOAT)).precision&&0!==e.rangeMin&&0!==e.rangeMax&&(this.O3=this.O3.replace(this.G3,"highp"))},e.prototype.v3=function(){this.U3&&(this.j2=this.U3.getContext("2d"));var e={failIfMajorPerformanceCaveat:!0};this.i2=this.T3.getContext("webgl",e)||this.T3.getContext("experimental-webgl",e),this.r3(),this.s3(this.i2,"clearColor",.5,.5,.5,1),this.s3(this.i2,"clearDepth",1),this.s3(this.i2,"disable",this.i2.DEPTH_TEST)},e.prototype.w3=function(){this.o2=this.s3(this.i2,"createShader",this.i2.VERTEX_SHADER),this.s3(this.i2,"shaderSource",this.o2,this.O3),this.s3(this.i2,"compileShader",this.o2),this.s3(this.i2,"getShaderParameter",this.o2,this.i2.COMPILE_STATUS)||this.t3("Vertex shader compilation failed ("+this.s3(this.i2,"getShaderInfoLog",this.o2)+")"),this.p2=this.s3(this.i2,"createShader",this.i2.FRAGMENT_SHADER),this.s3(this.i2,"shaderSource",this.p2,this.P3),this.s3(this.i2,"compileShader",this.p2),this.s3(this.i2,"getShaderParameter",this.p2,this.i2.COMPILE_STATUS)||this.t3("Fragment shader compilation failed ("+this.s3(this.i2,"getShaderInfoLog",this.p2)+")")},e.prototype.x3=function(){this.q2=this.s3(this.i2,"createProgram"),this.s3(this.i2,"attachShader",this.q2,this.o2),this.s3(this.i2,"attachShader",this.q2,this.p2),this.s3(this.i2,"linkProgram",this.q2),this.s3(this.i2,"getProgramParameter",this.q2,this.i2.LINK_STATUS)||this.t3("Unable to link program: "+this.s3(this.i2,"getProgramInfoLog",this.q2)),this.s3(this.i2,"useProgram",this.q2)},e.prototype.y3=function(){this.f3=new s.GLAttribute(this.i2,this.q2,"vertexPosition",null)},e.prototype.z3=function(){this.g3=new s.GLUniform(this.i2,this.q2,"eyeSelector",s.GLVariableType.UNIFORM_1I),this.h3=new s.GLUniform(this.i2,this.q2,"textureUnit",s.GLVariableType.UNIFORM_1I),this.j3=new s.GLUniform(this.i2,this.q2,"contentType",s.GLVariableType.UNIFORM_1I),this.k3=new s.GLUniform(this.i2,this.q2,"contentFieldOfView",s.GLVariableType.UNIFORM_1F),this.l3=new s.GLUniform(this.i2,this.q2,"videoWidth",s.GLVariableType.UNIFORM_1F),this.m3=new s.GLUniform(this.i2,this.q2,"videoHeight",s.GLVariableType.UNIFORM_1F),this.i3=new s.GLUniform(this.i2,this.q2,"projectionInverse",s.GLVariableType.UNIFORM_MATRIX_4FV),this.n3=new s.GLUniform(this.i2,this.q2,"distortionCoefficients",s.GLVariableType.UNIFORM_1FV),this.o3=new s.GLUniform(this.i2,this.q2,"distortionMaxFovSquared",s.GLVariableType.UNIFORM_1F),this.p3=new s.GLUniform(this.i2,this.q2,"distortionFovOffset",s.GLVariableType.UNIFORM_2FV),this.q3=new s.GLUniform(this.i2,this.q2,"distortionFovScale",s.GLVariableType.UNIFORM_2FV)},e.prototype.A3=function(){this.r2=this.s3(this.i2,"createBuffer"),this.s3(this.i2,"bindBuffer",this.i2.ARRAY_BUFFER,this.r2),this.s3(this.i2,"bufferData",this.i2.ARRAY_BUFFER,new Float32Array(this.t2),this.i2.STATIC_DRAW),this.s2=this.s3(this.i2,"createBuffer"),this.s3(this.i2,"bindBuffer",this.i2.ELEMENT_ARRAY_BUFFER,this.s2),this.s3(this.i2,"bufferData",this.i2.ELEMENT_ARRAY_BUFFER,new Uint16Array(this.E3),this.i2.STATIC_DRAW)},e.prototype.B3=function(){this.F3=this.s3(this.i2,"createTexture"),this.s3(this.i2,"bindTexture",this.i2.TEXTURE_2D,this.F3),this.s3(this.i2,"texParameteri",this.i2.TEXTURE_2D,this.i2.TEXTURE_MAG_FILTER,this.i2.LINEAR),this.s3(this.i2,"texParameteri",this.i2.TEXTURE_2D,this.i2.TEXTURE_MIN_FILTER,this.i2.LINEAR),this.s3(this.i2,"texParameteri",this.i2.TEXTURE_2D,this.i2.TEXTURE_WRAP_S,this.i2.CLAMP_TO_EDGE),this.s3(this.i2,"texParameteri",this.i2.TEXTURE_2D,this.i2.TEXTURE_WRAP_T,this.i2.CLAMP_TO_EDGE)},e.prototype.C3=function(e,t){var i,n,r=this.s3(this.j2,"getImageData",0,0,e,t);if(!r)return this.S3.debug("Texture size verification failed."),void(this.b3=!1);for(var o=this.a3.getVideoWidths(),a=this.a3.getVideoHeights(),s=0;s<o.length&&r.data[4*(o[s]-1)+3]>0;s++)i=Math.min(o[s],e);for(var u=0;u<a.length&&r.data[(a[u]-1)*this.V3.videoWidth*4+3]>0;u++)n=Math.min(a[u],t);i&&n&&(i!==e||n!==t)?(this.S3.debug("Texture size mismatch! Expected "+e+"x"+t+" but got "+i+"x"+n+" instead."),this.s3(this.j2,"drawImage",this.U3,0,0,i,n,0,0,this.U3.width,this.U3.height)):this.b3=!1},e.prototype.D3=function(){if(!this.k2||this.k2===s.GL_ERROR.NO_ERROR){var e=this.V3.videoWidth,t=this.V3.videoHeight;if(this.U3&&this.j2){var i=0;this.X3!==o.StreamType.Progressive&&/Trident/.test(navigator.userAgent)&&(i=.0555555*t);var n=t-2*i;this.s3(this.j2,"drawImage",this.V3.getWrappedElement(),0,i,e,n,0,0,this.U3.width,this.U3.height),this.a3.add(e,t);var r=this.Y3!==e,a=this.Z3!==t;!r&&!a||/Trident/.test(navigator.userAgent)||(this.b3=!0),this.b3&&this.C3(e,t),this.Y3=e,this.Z3=t}this.s3(this.i2,"activeTexture",this.i2.TEXTURE0),this.s3(this.i2,"bindTexture",this.i2.TEXTURE_2D,this.F3);try{var u=null!==this.e3.requestFakeInput?this.e3.requestFakeInput():null;null!==u?this.s3(this.i2,"texImage2D",this.i2.TEXTURE_2D,0,this.i2.RGB,this.i2.RGB,this.i2.UNSIGNED_BYTE,u):this.U3?this.s3(this.i2,"texImage2D",this.i2.TEXTURE_2D,0,this.i2.RGB,this.i2.RGB,this.i2.UNSIGNED_BYTE,this.U3):this.s3(this.i2,"texImage2D",this.i2.TEXTURE_2D,0,this.i2.RGB,this.i2.RGB,this.i2.UNSIGNED_BYTE,this.V3.getWrappedElement())}catch(e){this.t3(e.message)}}},e.prototype.onFrameRateAvailable=function(e,t,i){this.S3.debug("Average framerate: "+e.toFixed(2)+"fps, of which "+(100*i).toFixed(2)+"% were spent drawing the scene, "+(100*t).toFixed(2)+"% were spent updating the texture")},e.prototype.O4=function(e,t){if(!this.k2||this.k2===s.GL_ERROR.NO_ERROR){switch(this.s3(this.i2,"useProgram",this.q2),this.s3(this.i2,"bindBuffer",this.i2.ARRAY_BUFFER,this.r2),this.s3(this.i2,"vertexAttribPointer",this.f3.loc,2,this.i2.FLOAT,!1,0,0),this.s3(this.i2,"activeTexture",this.i2.TEXTURE0),this.s3(this.i2,"bindTexture",this.i2.TEXTURE_2D,this.F3),this.g3.setValue(e),this.h3.setValue(0),this.k3.setValue(this.d3.contentFieldOfView),isFinite(this.V3.videoWidth)&&this.V3.videoWidth>0&&isFinite(this.V3.videoHeight)&&this.V3.videoHeight>0?(this.l3.setValue(this.V3.videoWidth),this.m3.setValue(this.V3.videoHeight)):(this.l3.setValue(4096),this.m3.setValue(2048)),this.d3.contentType){case a.VRContentType.Single:this.j3.setValue(0);break;case a.VRContentType.SBS:this.j3.setValue(1);break;case a.VRContentType.TAB:this.j3.setValue(2);break;default:this.t3("Invalid content type specified ("+this.d3.contentType+")")}this.n3.setValue(this.K3),this.o3.setValue(this.L3),this.p3.setValue(this.M3[e]),this.q3.setValue(this.N3),this.i3.setValue(t),this.s3(this.i2,"viewport",this.T3.width/2*e,0,this.T3.width/this.m2,this.T3.height),this.s3(this.i2,"bindBuffer",this.i2.ELEMENT_ARRAY_BUFFER,this.s2),this.s3(this.i2,"drawElements",this.i2.TRIANGLES,6,this.i2.UNSIGNED_SHORT,0)}},e.prototype.P4=function(e){return e?e.viewer.inverseCoefficients:this.I3},e.prototype.Q4=function(e){var t=this.R4(e),i=n.MathUtil.hypot(Math.tan(n.MathUtil.degToRad(Math.max(t.leftDegrees,t.rightDegrees))),Math.tan(n.MathUtil.degToRad(Math.max(t.downDegrees,t.upDegrees))));return i*i},e.prototype.R4=function(e,t){var i=t||this.J3.LEFT;return i===this.J3.LEFT?e.getFieldOfViewLeftEye(!0):i===this.J3.RIGHT?e.getFieldOfViewRightEye(!0):null},e.prototype.S4=function(e,t){var i=this.R4(e,t);return[Math.tan(n.MathUtil.degToRad(i.leftDegrees)),Math.tan(n.MathUtil.degToRad(i.downDegrees))]},e.prototype.T4=function(e){var t=this.R4(e);return[Math.tan(n.MathUtil.degToRad(t.leftDegrees))+Math.tan(n.MathUtil.degToRad(t.rightDegrees)),Math.tan(n.MathUtil.degToRad(t.upDegrees))+Math.tan(n.MathUtil.degToRad(t.downDegrees))]},e.prototype.getBackingStoreRatio=function(){var e=0;return this.k2===s.GL_ERROR.NO_ERROR&&(e=(e=(e=(e=(e=e||this.i2.webkitBackingStorePixelRatio)||this.i2.mozBackingStorePixelRatio)||this.i2.msBackingStorePixelRatio)||this.i2.oBackingStorePixelRatio)||this.i2.backingStorePixelRatio),e||1},e.prototype.enableStereo=function(){this.n2=!0,this.m2=2},e.prototype.disableStereo=function(){this.n2=!1,this.m2=1},e.prototype.drawScene=function(e,t){if((!this.k2||this.k2===s.GL_ERROR.NO_ERROR)&&this.i2&&this.V3.getWrappedElement()){this.Q3.endAnimationFrame(),this.Q3.startAnimationFrame(),this.Q3.startDrawScene();try{this.Q3.startUpdateTexture(),t&&this.D3(),this.Q3.endUpdateTexture(),this.O4(this.J3.LEFT,e),this.n2&&this.O4(this.J3.RIGHT,e),null!==this.e3.onDrawScene&&this.e3.onDrawScene(this.i2),this.r3([s.GL_ERROR.INVALID_VALUE])}catch(e){this.S3.warn("Texture update failed: "+e)}this.Q3.endDrawScene()}},e.prototype.destroy=function(){this.Q3.unsubscribe(this),this.Q3.destroy(),this.Q3=null,this.a3=null,this.i2=null,this.T3=null,this.j2=null,this.U3=null},e}()},24180:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VRHandler=void 0;var n,r=i(61535),o=i(70372);t.VRHandler=function(){function e(e,t,i,a,s,u,c){var l=o.ConfigParser.parse(i),d=l[0],h=l[1],p=new r.InternalVRHandler(e,t,d,a,s,u,c,h);(n=n||new window.WeakMap).set(this,p)}return e.prototype.Bf=function(){return n.has(this)&&"error"!==n.get(this).getState()},e.prototype.setStereo=function(e){var t="boolean"==typeof e;return!(!this.Bf()||!t)&&n.get(this).setStereo(e)},e.prototype.enableGyroscope=function(){return!!this.Bf()&&n.get(this).enableGyroscope()},e.prototype.disableGyroscope=function(){return!!this.Bf()&&n.get(this).disableGyroscope()},e.prototype.isGyroscopeEnabled=function(){return!!this.Bf()&&n.get(this).isGyroscopeEnabled()},e.prototype.enableMouseControl=function(){return!!this.Bf()&&n.get(this).enableMouseControl()},e.prototype.disableMouseControl=function(){return!!this.Bf()&&n.get(this).disableMouseControl()},e.prototype.isMouseControlEnabled=function(){return!!this.Bf()&&n.get(this).isMouseControlEnabled()},e.prototype.enableKeyboardControl=function(){return!!this.Bf()&&n.get(this).enableKeyboardControl()},e.prototype.disableKeyboardControl=function(){return!!this.Bf()&&n.get(this).disableKeyboardControl()},e.prototype.isKeyboardControlEnabled=function(){return!!this.Bf()&&n.get(this).isKeyboardControlEnabled()},e.prototype.getStereo=function(){return!!this.Bf()&&n.get(this).getStereo()},e.prototype.getState=function(){return n.has(this)?n.get(this).getState():null},e.prototype.getLastError=function(){return n.has(this)?n.get(this).getLastError():null},e.prototype.getViewingDirection=function(){return this.Bf()?n.get(this).getViewingDirection():{yaw:0,pitch:0,roll:0}},e.prototype.setViewingDirection=function(e){var t=e&&isFinite(e.yaw)&&isFinite(e.pitch)&&isFinite(e.roll);return!(!this.Bf()||!t)&&n.get(this).setViewingDirection(e)},e.prototype.moveViewingDirection=function(e){var t=isFinite(e.x)&&isFinite(e.y)&&isFinite(e.phi);return!(!this.Bf()||!t)&&n.get(this).moveViewingDirection(e)},e.prototype.setViewingDirectionChangeEventInterval=function(e){var t=isFinite(e);return!(!this.Bf()||!t)&&n.get(this).setViewingDirectionChangeEventInterval(e)},e.prototype.getViewingDirectionChangeEventInterval=function(){return this.Bf()?n.get(this).getViewingDirectionChangeEventInterval():-1},e.prototype.setViewingDirectionChangeThreshold=function(e){var t=isFinite(e);return!(!this.Bf()||!t)&&n.get(this).setViewingDirectionChangeThreshold(e)},e.prototype.getViewingDirectionChangeThreshold=function(){return this.Bf()?n.get(this).getViewingDirectionChangeThreshold():-1},e.prototype.setVerticalFieldOfView=function(e){return!!this.Bf()&&n.get(this).setVerticalFieldOfView(e)},e.prototype.getVerticalFieldOfView=function(){return this.Bf()?n.get(this).getVerticalFieldOfView():-1},e.prototype.setHorizontalFieldOfView=function(e){return!!this.Bf()&&n.get(this).setHorizontalFieldOfView(e)},e.prototype.getHorizontalFieldOfView=function(){return this.Bf()?n.get(this).getHorizontalFieldOfView():-1},e.prototype.zoom=function(e){return!!this.Bf()&&n.get(this).zoom(e)},e.prototype.getZoom=function(){return this.Bf()?n.get(this).getZoom():-1},e.prototype.deviceOrientationPermissionRequired=function(){var e,t;return this.Bf()&&null!=(t=null==(e=n.get(this))?void 0:e.deviceOrientationPermissionRequired())&&t},e.prototype.requestDeviceOrientationPermission=function(){var e,t;return this.Bf()&&null!=(t=null==(e=n.get(this))?void 0:e.requestDeviceOrientationPermission())?t:Promise.resolve()},e}()},45698:function(e,t,i){"use strict";var n=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(t,i)};return function(t,i){if("function"!=typeof i&&null!==i)throw TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.ApiControl=void 0;var r=i(37485);t.ApiControl=function(e){function t(t,i,n){var o=e.call(this,t,i)||this;return o.setViewingDirectionChangeEventInterval(n),o.Mcb=new r.DisplacementVector,o.Ncb=new r.DisplacementVector,o.Pcb=0,o}return n(t,e),t.prototype.getDisplacementVector=function(e){return this.Pcb+=e,this.Pcb>this.Ocb?this.Ncb.update(0,0,0,!1,e):(r.DisplacementVector.clone(this.Mcb,this.Ncb),this.Ncb.length=this.Mcb.length*e,this.Ncb.phi=this.Mcb.phi*e,this.Ncb.update(this.Ncb.x,this.Ncb.y,this.Ncb.phi,!0,e)),this.Ncb},t.prototype.setTargetVector=function(e){this.Mcb.fromVec3(e,!0),this.Pcb=0},t.prototype.setViewingDirectionChangeEventInterval=function(e){this.Ocb=e},t.prototype.dispose=function(){this.disable()},t}(i(67982).Control)},67982:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Control=void 0,t.Control=function(){function e(e,t){this.config=e,this.debugHooks=t}return e.prototype.enable=function(){this.enabled=!0},e.prototype.disable=function(){this.enabled=!1},e.prototype.isEnabled=function(){return this.enabled},e}()},22185:function(e,t,i){"use strict";var n=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(t,i)};return function(t,i){if("function"!=typeof i&&null!==i)throw TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.KeyboardControl=void 0;var r=i(37485),o=i(67982),a=function(){function e(e){this.setKeyCombinations(e),this.Rcb=!1}return e.prototype.checkAndSetActiveState=function(e){return this.Qcb.some(function(t){return!t.some(function(t){return 0>e.indexOf(t)})})?(this.Rcb=!0,!0):(this.Rcb=!1,!1)},e.prototype.isActive=function(){return this.Rcb},e.prototype.setKeyCombinations=function(e){for(var t=[],i=0,n=e;i<n.length;i++){var r=n[i].split(" ").filter(function(e){return e.length>0});r.length>0&&t.push(r)}this.Qcb=t},e}();t.KeyboardControl=function(e){function t(t,i){var n=e.call(this,t,i)||this;return n.bcb=function(e){if(e&&"string"==typeof e.key){var t=e.key.replace(" ","Space"),i=n.Zcb.indexOf(t);i>=0&&"keyup"===e.type?n.Zcb.splice(i,1):i<0&&"keydown"===e.type&&n.Zcb.push(t),n.Tcb.checkAndSetActiveState(n.Zcb),n.Ucb.checkAndSetActiveState(n.Zcb),n.Vcb.checkAndSetActiveState(n.Zcb),n.Wcb.checkAndSetActiveState(n.Zcb),n.Xcb.checkAndSetActiveState(n.Zcb),n.Ycb.checkAndSetActiveState(n.Zcb)}},n.Scb=n.config.maxDisplacementSpeed,n.Tcb=new a(["w"]),n.Ucb=new a(["s"]),n.Vcb=new a(["a"]),n.Wcb=new a(["d"]),n.Xcb=new a(["e"]),n.Ycb=new a(["q"]),n.Zcb=[],n.acb=new r.DisplacementVector,n.applyKeyMap(n.config.keyMap),n.enable(),n}return n(t,e),t.prototype.getDisplacementVector=function(e){if(this.enabled){var t=0,i=0,n=0;this.debugHooks.requestKeyActiveState?(i+=this.debugHooks.requestKeyActiveState("up")?this.Scb*e:0,i-=this.debugHooks.requestKeyActiveState("down")?this.Scb*e:0,t+=this.debugHooks.requestKeyActiveState("left")?this.Scb*e:0,t-=this.debugHooks.requestKeyActiveState("right")?this.Scb*e:0,n-=this.debugHooks.requestKeyActiveState("rotateClockwise")?this.Scb*e:0,n+=this.debugHooks.requestKeyActiveState("rotateCounterclockwise")?this.Scb*e:0):(i+=this.Tcb.isActive()?this.Scb*e:0,i-=this.Ucb.isActive()?this.Scb*e:0,t+=this.Vcb.isActive()?this.Scb*e:0,t-=this.Wcb.isActive()?this.Scb*e:0,n-=this.Xcb.isActive()?this.Scb*e:0,n+=this.Ycb.isActive()?this.Scb*e:0);var r=0!==t||0!==i||0!==n;this.acb.update(t,i,n,r,e)}else this.acb.update(0,0,0,!1,e);return this.acb},t.prototype.enable=function(){this.enabled=!0,document.addEventListener("keydown",this.bcb,!1),document.addEventListener("keyup",this.bcb,!1)},t.prototype.disable=function(){this.enabled=!1,document.removeEventListener("keydown",this.bcb,!1),document.removeEventListener("keyup",this.bcb,!1)},t.prototype.dispose=function(){this.disable()},t.prototype.applyKeyMap=function(e){e.hasOwnProperty("up")&&this.Tcb.setKeyCombinations(e.up),e.hasOwnProperty("down")&&this.Ucb.setKeyCombinations(e.down),e.hasOwnProperty("left")&&this.Vcb.setKeyCombinations(e.left),e.hasOwnProperty("right")&&this.Wcb.setKeyCombinations(e.right),e.hasOwnProperty("rotateClockwise")&&this.Xcb.setKeyCombinations(e.rotateClockwise),e.hasOwnProperty("rotateCounterclockwise")&&this.Ycb.setKeyCombinations(e.rotateCounterclockwise)},t}(o.Control)},64419:function(e,t,i){"use strict";var n=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(t,i)};return function(t,i){if("function"!=typeof i&&null!==i)throw TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.MouseControl=void 0;var r=i(37485),o=i(51629);t.MouseControl=function(e){function t(i,n,a,s,u){void 0===u&&(u=90);var c=e.call(this,i,n)||this;return c.lcb=function(e){var i=t.getTouchPosition(e),n=0,r=0;c.ecb&&(n=i.x-c.hcb.x,r=i.y-c.hcb.y,c.icb.x+=n,c.icb.y+=r,c.hcb=i),Math.abs(n)+Math.abs(r)>0&&(c.gcb=!0),e.preventDefault()},c.mcb=function(e){e.stopPropagation(),e.preventDefault(),o.ElementHelper.removeEventListener(document,["click"],c.mcb,!0)},c.ncb=function(e){o.ElementHelper.removeEventListener(document,o.ElementHelper.touchEvents.move,c.lcb,!1),o.ElementHelper.removeEventListener(document,o.ElementHelper.touchEvents.up,c.ncb,!1),o.ElementHelper.removeEventListener(c.ccb,o.ElementHelper.touchEvents.up,c.ncb,!1),o.ElementHelper.removeClass(document.body,"bitmovinplayer-no-select"),c.hcb=null,c.ecb=!1,c.gcb&&c.fcb&&e.target===c.fcb&&o.ElementHelper.addEventListener(document,["click"],c.mcb,!0),c.gcb=!1,c.fcb=null},c.ocb=function(e){c.hcb=t.getTouchPosition(e),c.icb={x:0,y:0},c.ecb=!0,c.gcb=!1,c.fcb=e.target,o.ElementHelper.addEventListener(document,o.ElementHelper.touchEvents.move,c.lcb,!1),o.ElementHelper.addEventListener(document,o.ElementHelper.touchEvents.up,c.ncb,!1),o.ElementHelper.addEventListener(c.ccb,o.ElementHelper.touchEvents.up,c.ncb,!1),o.ElementHelper.addClass(document.body,"bitmovinplayer-no-select")},c.ccb=a,c.dcb=s,c.ecb=!1,c.hcb=null,c.icb={x:0,y:0},c.jcb=u,c.kcb=new r.DisplacementVector,c.enable(),c}return n(t,e),t.prototype.getDisplacementVector=function(e){var t=this.dcb.clientWidth,i=this.dcb.clientHeight,n=!!this.debugHooks.requestTraveledMouseDistance,r=this.jcb*(i/t);if(this.icb=n?this.debugHooks.requestTraveledMouseDistance(e):this.icb,this.enabled&&isFinite(r)&&r>0){var o=this.ecb||0!==this.icb.x||0!==this.icb.y;this.kcb.update(this.icb.x/this.dcb.clientWidth*this.jcb,this.icb.y/this.dcb.clientHeight*r,0,o,e),this.icb={x:0,y:0}}else this.kcb.update(0,0,0,this.ecb,e);return this.kcb},t.prototype.enable=function(){this.enabled=!0,o.ElementHelper.addEventListener(this.ccb,o.ElementHelper.touchEvents.down,this.ocb,!1)},t.prototype.disable=function(){this.enabled=!1,o.ElementHelper.removeEventListener(document,o.ElementHelper.touchEvents.move,this.lcb,!1),o.ElementHelper.removeEventListener(document,o.ElementHelper.touchEvents.up,this.ncb,!1),o.ElementHelper.removeEventListener(this.ccb,o.ElementHelper.touchEvents.up,this.ncb,!1),o.ElementHelper.removeEventListener(this.ccb,o.ElementHelper.touchEvents.down,this.ocb,!1),o.ElementHelper.removeEventListener(document,["click"],this.mcb,!0),this.hcb=null,this.ecb=!1,this.gcb=!1,this.fcb=null,o.ElementHelper.removeClass(document.body,"bitmovinplayer-no-select")},t.prototype.dispose=function(){this.disable(),this.ccb=null,this.dcb=null},t.getTouchPosition=function(e){var t={x:0,y:0};return"ms"===o.ElementHelper.touchEvents.type?(t.x=e.clientX||e.originalEvent.layerX,t.y=e.clientY||e.originalEvent.layerY):"mobile"===o.ElementHelper.touchEvents.type?(t.x=e.touches[0].clientX,t.y=e.touches[0].clientY):(t.x=e.clientX,t.y=e.clientY),t.x=t.x||0,t.y=t.y||0,t},t}(i(67982).Control)},54479:function(e,t){"use strict";var i,n,r=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(t,i)};return function(t,i){if("function"!=typeof i&&null!==i)throw TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.GLUniform=t.GLAttribute=t.GLVariableType=t.GL_ERROR_STR=t.GL_ERROR=void 0,function(e){e[e.NO_ERROR=0]="NO_ERROR",e[e.OTHER_ERROR=1]="OTHER_ERROR",e[e.INVALID_ENUM=1280]="INVALID_ENUM",e[e.INVALID_FRAMEBUFFER_OPERATION=1286]="INVALID_FRAMEBUFFER_OPERATION",e[e.INVALID_OPERATION=1282]="INVALID_OPERATION",e[e.INVALID_VALUE=1281]="INVALID_VALUE"}(i||(t.GL_ERROR=i={})),t.GL_ERROR_STR={1280:"INVALID_ENUM",1286:"INVALID_FRAMEBUFFER_OPERATION",1282:"INVALID_OPERATION",1281:"INVALID_VALUE"},function(e){e.UNIFORM_1I="uniform1i",e.UNIFORM_1F="uniform1f",e.UNIFORM_MATRIX_4FV="uniformMatrix4fv",e.UNIFORM_1FV="uniform1fv",e.UNIFORM_2FV="uniform2fv"}(n||(t.GLVariableType=n={}));var o=function(){function e(e,t,i,n){this.context=e,this.program=t,this.name=i,this.type=n}return Object.defineProperty(e.prototype,"loc",{get:function(){return this.location},enumerable:!1,configurable:!0}),e}();t.GLAttribute=function(e){function t(t,i,n,r){var o=e.call(this,t,i,n,r)||this;return o.location=o.context.getAttribLocation(o.program,o.name),o.context.enableVertexAttribArray(o.name),o}return r(t,e),t.prototype.setValue=function(e){},t}(o),t.GLUniform=function(e){function t(t,i,n,r){var o=e.call(this,t,i,n,r)||this;return o.location=o.context.getUniformLocation(o.program,o.name),o.context.enableVertexAttribArray(o.name),o}return r(t,e),t.prototype.setValue=function(e){this.type.indexOf("Matrix")>-1?this.context[this.type].call(this.context,this.location,!1,e):this.context[this.type].call(this.context,this.location,e)},t}(o)},55443:function(e,t,i){"use strict";var n=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(t,i)};return function(t,i){if("function"!=typeof i&&null!==i)throw TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultDeviceOrientationProvider=void 0;var r,o=i(44369),a=i(16404);!function(e){e.Granted="granted",e.Denied="denied"}(r||(r={})),t.DefaultDeviceOrientationProvider=function(e){function t(){var i=e.call(this)||this;i.ofb=null,i.pfb=null,i.qfb=null,i.rfb=0,i.sfb=0,i.vfb=function(e){var t=void 0!==e.alpha&&null!==e.alpha,n=void 0!==e.beta&&null!==e.beta,r=void 0!==e.gamma&&null!==e.gamma;t&&n&&r&&(i.ofb=e.alpha,i.pfb=e.gamma,i.qfb=e.beta),e.hasOwnProperty("screenOrientation")&&(i.rfb=i.ufb(e))},i.wfb=function(){i.vfb(t.getDeviceOrientationFromWindow())},i.xfb=function(e){e&&e.data&&i.vfb(e.data)},window.top!==window?window.addEventListener("message",i.xfb,!1):window.addEventListener("deviceorientation",i.vfb);try{window.addEventListener("orientationchange",i.wfb);var n=t.getDeviceOrientationFromWindow();i.vfb(n)}catch(e){window.removeEventListener("orientationchange",i.wfb)}return i.enable(),i}return n(t,e),t.prototype.getOrientation=function(){if(!this.orientationDataAvailable()||!this.enabled)return this.defaultDeviceOrientation;var e=o.MathUtil.degToRad(this.ofb)/2,t=o.MathUtil.degToRad(this.qfb)/2,i=o.MathUtil.degToRad(this.pfb)/2,n=Math.cos(t),r=Math.cos(i),a=Math.cos(e),s=Math.sin(t),u=Math.sin(i),c=Math.sin(e),l=n*r*a-s*u*c,d=s*r*a-n*u*c,h=n*u*a+s*r*c,p=n*r*c+s*u*a,f=o.Quat.fromValues(d,h,p,l),g=o.MathUtil.degToRad(this.tfb())/2,m=o.Quat.fromValues(0,0,-Math.sin(g),Math.cos(g)),y=o.Quat.create();o.Quat.multiply(y,f,m);var v=Math.sqrt(.5);return o.Quat.multiply(y,o.Quat.fromValues(-v,0,0,v),y),o.Quat.toAngle(y)},t.prototype.orientationDataAvailable=function(){return null!==this.ofb},t.supported=function(){return!!window.DeviceOrientationEvent},t.prototype.tfb=function(){return this.rfb},t.prototype.ufb=function(e){var t;switch(e.screenOrientation.type){case"landscape-primary":t=90;break;case"landscape-secondary":t=-90;break;case"portrait-secondary":t=180;break;case"portrait-primary":t=0}return!t&&isNaN(t)&&(t=isNaN(e.screenOrientation.type)?e.orientation||0:e.screenOrientation.type),window.top!==window&&t===this.sfb&&e.orientation!==t&&(t=e.orientation||0),t},t.getDeviceOrientationFromWindow=function(){var e=window.screen,t=e.orientation||e.mozOrientation||e.msOrientation||{};return{screenOrientation:{type:t.type||t,angle:t.angle},orientation:window.orientation}},t.prototype.permissionRequired=function(){return"undefined"!=typeof DeviceMotionEvent&&"function"==typeof DeviceMotionEvent.requestPermission},t.prototype.requestPermission=function(){return"undefined"==typeof DeviceMotionEvent||"function"!=typeof DeviceMotionEvent.requestPermission?Promise.resolve():DeviceMotionEvent.requestPermission().then(function(e){return e===r.Granted?Promise.resolve():Promise.reject()})},t}(a.DeviceOrientationProvider)},16404:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DeviceOrientationProvider=void 0,t.DeviceOrientationProvider=function(){function e(){this.defaultFieldOfView={upDegrees:45,rightDegrees:55,downDegrees:45,leftDegrees:55},this.defaultDeviceOrientation={yaw:0,pitch:0,roll:0}}return e.prototype.getFieldOfViewParams=function(){return this.defaultFieldOfView},e.supported=function(){return!1},e.prototype.enable=function(){this.enabled=!0},e.prototype.disable=function(){this.enabled=!1},e.prototype.isEnabled=function(){return this.enabled},e.prototype.permissionRequired=function(){return!1},e.prototype.requestPermission=function(){return Promise.resolve()},e}()},59324:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DeviceOrientationProviderFactory=void 0;var n=i(55443),r=i(11805),o=i(72458);t.DeviceOrientationProviderFactory=function(){function e(){}return e.get=function(){return o.WebVRDeviceOrientationProvider.supported()?new o.WebVRDeviceOrientationProvider:n.DefaultDeviceOrientationProvider.supported()?new n.DefaultDeviceOrientationProvider:new r.NoDeviceOrientationProvider},e}()},37485:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DisplacementVector=void 0;var n=i(23068),r=Math.PI/180,o=180/Math.PI;t.DisplacementVector=function(){function e(e,t,i,n){void 0===e&&(e=0),void 0===t&&(t=0),void 0===i&&(i=0),void 0===n&&(n=!1),this.scb=null,this.update(e,t,i,n)}return Object.defineProperty(e.prototype,"x",{get:function(){return this.cbb},set:function(e){this.cbb!==e&&this.update(e,this.dbb,this.ebb)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"y",{get:function(){return this.dbb},set:function(e){this.dbb!==e&&this.update(this.cbb,e,this.ebb)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"phi",{get:function(){return this.ebb},set:function(e){this.ebb!==e&&this.update(this.cbb,this.dbb,e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"alpha",{get:function(){return this.qcb},set:function(e){this.qcb!==e&&this.update(this.fbb*Math.cos(e*r),this.fbb*Math.sin(e*r),this.ebb)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"length",{get:function(){return this.fbb},set:function(e){this.fbb!==e&&this.update(e*Math.cos(this.qcb*r),e*Math.sin(this.qcb*r),this.ebb)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"active",{get:function(){return this.rcb},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"deltaTime",{get:function(){return this.scb||0},set:function(e){this.scb=e},enumerable:!1,configurable:!0}),e.prototype.update=function(e,t,i,r,a){if(void 0===i&&(i=0),"boolean"==typeof r&&(this.rcb=r),(0,n.isNumber)(a)&&(this.scb=a),this.cbb!==e||this.dbb!==t||this.ebb!==i){if(this.cbb=1e-4>Math.abs(e)?0:e,this.dbb=1e-4>Math.abs(t)?0:t,this.ebb=1e-4>Math.abs(i)?0:i,0===this.cbb&&0===this.dbb&&0===this.ebb)return this.fbb=0,void(this.qcb=0);this.fbb=Math.sqrt(this.cbb*this.cbb+this.dbb*this.dbb),0===this.dbb&&this.cbb>=0?this.qcb=0:0===this.cbb&&this.dbb>0?this.qcb=90:0===this.cbb&&this.dbb<0?this.qcb=270:this.cbb<0&&0===this.dbb?this.qcb=180:this.cbb>0&&this.dbb>0?this.qcb=Math.atan(this.dbb/this.cbb)*o:this.cbb<0&&this.dbb>0||this.cbb<0&&this.dbb<0?this.qcb=180+Math.atan(this.dbb/this.cbb)*o:this.cbb>0&&this.dbb<0?this.qcb=360+Math.atan(this.dbb/this.cbb)*o:this.qcb=0}},e.prototype.fromVec3=function(e,t,i){this.update(e.x,e.y,e.phi,t,i)},e.prototype.add=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var i=this.cbb,n=this.dbb,r=this.ebb,o=0,a=e;o<a.length;o++){var s=a[o];i+=s.cbb,n+=s.dbb,r+=s.ebb}this.update(i,n,r)},e.prototype.diff=function(t,i){i instanceof e?this.update(i.x-t.x,i.y-t.y,i.phi-t.phi):this.update(t.x-this.cbb,t.y-this.dbb,t.phi-this.ebb)},e.clone=function(t,i){t instanceof e&&i instanceof e&&i.update(t.cbb,t.dbb,t.ebb,t.rcb,t.scb)},e.prototype.scale=function(e){this.length=this.fbb*e},e}()},11805:function(e,t,i){"use strict";var n=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(t,i)};return function(t,i){if("function"!=typeof i&&null!==i)throw TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.NoDeviceOrientationProvider=void 0,t.NoDeviceOrientationProvider=function(e){function t(){var t=e.call(this)||this;return t.enable(),t}return n(t,e),t.prototype.getOrientation=function(){return this.defaultDeviceOrientation},t.prototype.orientationDataAvailable=function(){return!0},t.supported=function(){return!0},t}(i(16404).DeviceOrientationProvider)},33639:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OrientationHandler=void 0;var n,r=i(44369),o=i(3714),a=i(45698),s=i(22185),u=i(64419),c=i(76320),l=i(59324),d=i(37485);!function(e){e.VERTICAL="vertical",e.HORIZONTAL="horizontal",e.BOTH="BOTH"}(n||(n={})),t.OrientationHandler=function(){function e(e,t,i,o,h){var p=this;this.X4=null,this.Y4=null,this.Z4=1,this.a4=null,this.b4=null,this.c4=null,this.d4=null,this.e4=null,this.f4=null,this.g4=null,this.enableGyroscope=function(){p.W4.enable()},this.disableGyroscope=function(){p.W4.disable()},this.isGyroscopeEnabled=function(){return p.W4.isEnabled()},this.enableMouseControl=function(){p.k4.enable()},this.disableMouseControl=function(){p.k4.disable()},this.isMouseControlEnabled=function(){return p.k4.isEnabled()},this.enableKeyboardControl=function(){p.j4.enable()},this.disableKeyboardControl=function(){p.j4.disable()},this.isKeyboardControlEnabled=function(){return p.j4.isEnabled()},this.h4=e,this.i4=i,this.C4=h,this.W4=l.DeviceOrientationProviderFactory.get(),this.d4=r.Mat4.create(),this.e4=r.Mat4.create(),this.f4=r.Mat4.create(),this.a4=r.Mat4.create(),this.X4=r.Mat4.create(),this.Z4=this.i4.stereo?2:1,this.c4={yaw:0,pitch:0,roll:0},this.c4.yaw=this.i4.startPosition,this.p4=new d.DisplacementVector,this.q4=new d.DisplacementVector,this.b4={yaw:this.c4.yaw,pitch:0,roll:0},this.r4=this.i4.viewingDirectionChangeEventInterval,this.s4=this.i4.viewingDirectionChangeThreshold,this.x4=this.i4.verticalFieldOfView,this.y4=this.i4.horizontalFieldOfView,this.z4=this.x4>-1,this.A4=this.y4>-1,this.B4=1,this.t4=0,this.u4=!1,this.j4=new s.KeyboardControl(this.i4.keyboardControl,o),this.k4=new u.MouseControl(this.i4.mouseControl,o,t,this.h4),this.l4=new a.ApiControl(this.i4.apiControl,o,this.r4),this.n4=c.TransitionTimingFactory.get(this.i4.keyboardControl),this.m4=c.TransitionTimingFactory.get(this.i4.mouseControl),this.o4=c.TransitionTimingFactory.get(this.i4.apiControl),this.x4>-1&&this.y4>-1?this.w4=n.BOTH:this.y4>-1?this.w4=n.HORIZONTAL:this.w4=n.VERTICAL}return e.clampValue=function(e,t,i){return 0===t&&360===i?e%360:e>i?i:e<t?t:e},e.clampToWindow=function(t,i){var n={yaw:0,pitch:0,roll:t.roll};return n.yaw=e.clampValue(t.yaw,i.minYaw,i.maxYaw),n.pitch=e.clampValue(t.pitch,i.minPitch,i.maxPitch),n},e.prototype.D4=function(t){void 0===t&&(t={yaw:0,pitch:0,roll:0}),null!==this.g4&&(this.g4=e.clampToWindow(this.g4,this.i4.viewingWindow),this.c4.yaw=this.g4.yaw-t.yaw,this.c4.pitch=this.g4.pitch-t.pitch,this.c4.roll=this.g4.roll-t.roll,this.m4.reset(),this.n4.reset(),this.o4.reset()),this.g4=null,this.b4.yaw=this.c4.yaw+t.yaw,this.b4.pitch=this.c4.pitch+t.pitch,this.b4.roll=this.c4.roll+t.roll,this.b4=e.clampToWindow(this.b4,this.i4.viewingWindow),r.Mat4.identity(this.a4),r.Mat4.rotate(this.a4,r.MathUtil.degToRad(this.b4.yaw+180),[0,1,0]),r.Mat4.rotate(this.a4,r.MathUtil.degToRad(this.b4.pitch),[1,0,0]),r.Mat4.rotate(this.a4,r.MathUtil.degToRad(this.b4.roll),[0,0,1])},e.prototype.getProjectionInverse=function(){return this.X4},e.prototype.getViewingDirection=function(){return this.b4},e.prototype.setViewingDirection=function(e){this.g4=e},e.prototype.setVerticalFieldOfView=function(e){this.z4=-1!==e,this.x4=-1===e?-1:Math.max(Math.min(180,e),0),-1===e&&this.w4===n.BOTH?this.w4=n.HORIZONTAL:this.w4===n.HORIZONTAL&&(this.A4?this.w4=n.BOTH:this.w4=n.VERTICAL)},e.prototype.getVerticalFieldOfView=function(){return this.x4/this.B4},e.prototype.setHorizontalFieldOfView=function(e){this.A4=-1!==e,this.y4=-1===e?-1:Math.max(Math.min(180,e),0),-1===e&&this.w4===n.BOTH?this.w4=n.VERTICAL:this.w4===n.VERTICAL&&(this.z4?this.w4=n.BOTH:this.w4=n.HORIZONTAL)},e.prototype.getHorizontalFieldOfView=function(){return this.y4/this.B4},e.prototype.zoom=function(e){return!!isFinite(e)&&(this.B4=Math.max(Number(e),1e-10),!0)},e.prototype.getZoom=function(){return this.B4},e.prototype.E4=function(){var e,t,i=this.W4.getFieldOfViewParams(),o=[1];this.x4<0&&(this.x4=i.upDegrees+i.downDegrees),this.y4<0&&(this.y4=i.leftDegrees+i.rightDegrees),this.w4!==n.BOTH&&this.w4!==n.HORIZONTAL||o.push(180/(this.y4/this.B4)),this.w4!==n.BOTH&&this.w4!==n.VERTICAL||o.push(180/(this.x4/this.B4)),this.B4/=Math.min.apply(null,o);var a=r.MathUtil.degToRad(this.x4/this.B4),s=r.MathUtil.degToRad(this.y4/this.B4);this.w4===n.BOTH?(e=a,t=Math.tan(.5*s)/Math.tan(.5*a)):t=this.h4.width/this.Z4/this.h4.height,this.w4===n.HORIZONTAL?(e=2*Math.atan(Math.tan(s/2)/t),this.x4=r.MathUtil.radToDeg(e)*this.B4):this.w4===n.VERTICAL&&(e=a,this.y4=r.MathUtil.radToDeg(2*Math.atan(t*Math.tan(a/2)))/this.Z4*this.B4),r.Mat4.perspective(this.f4,e,t,.1,10),r.Mat4.invert(this.d4,this.f4),r.Mat4.multiply(this.X4,this.a4,this.d4)},e.prototype.update=function(t){this.Y4=this.Y4||t;for(var i=(t-this.Y4)/1e3,n=r.Mat4.create(),a=0;a<this.X4.length;a++)n[a]=this.X4[a];this.t4+=i,this.p4.update(0,0,0),i>0&&this.p4.add(this.m4.apply(this.k4.getDisplacementVector(i)),this.n4.apply(this.j4.getDisplacementVector(i)),this.o4.apply(this.l4.getDisplacementVector(i))),this.c4.yaw+=this.p4.x,this.c4.pitch+=this.p4.y,this.c4.roll+=this.p4.phi,this.c4=e.clampToWindow(this.c4,this.i4.viewingWindow),this.Y4=t,this.W4.orientationDataAvailable()?this.D4(this.W4.getOrientation()):this.D4(),this.q4.add(this.p4);var s=Math.abs(this.q4.length)>this.s4||Math.abs(this.q4.phi)>this.s4;s||this.u4||(this.t4=0);var u=this.t4>=this.r4;for(s&&(u||!this.u4)?(this.u4=!0,this.t4=0,this.q4.update(0,0,0),this.C4.getEventFunction()(o.PlayerEvent.VRViewingDirectionChange,{direction:this.b4})):u&&this.u4&&(this.u4=!1,this.q4.update(0,0,0),this.t4=0,this.C4.getEventFunction()(o.PlayerEvent.VRViewingDirectionChanged,{direction:this.b4})),this.E4(),a=0;a<this.X4.length;a++)if(n[a]!==this.X4[a])return!0;return!1},e.prototype.enableStereo=function(){this.Z4=2},e.prototype.disableStereo=function(){this.Z4=1},e.prototype.moveViewingDirection=function(e){this.l4.setTargetVector(e)},e.prototype.setViewingDirectionChangeEventInterval=function(e){this.r4=e},e.prototype.getViewingDirectionChangeEventInterval=function(){return this.r4},e.prototype.setViewingDirectionChangeThreshold=function(e){this.s4=e},e.prototype.getViewingDirectionChangeThreshold=function(){return this.s4},e.prototype.permissionRequired=function(){return this.W4.permissionRequired()},e.prototype.requestPermission=function(){return this.W4.requestPermission()},e.prototype.destroy=function(){this.j4.dispose(),this.k4.dispose(),this.j4=null,this.k4=null},e}()},72458:function(e,t,i){"use strict";var n=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(t,i)};return function(t,i){if("function"!=typeof i&&null!==i)throw TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.WebVRDeviceOrientationProvider=void 0;var r=i(44369);t.WebVRDeviceOrientationProvider=function(e){function t(){var t=e.call(this)||this;return t.yfb=null,t.zfb=null,t.Afb=function(e){var i;for(i=0;i<e.length;++i)if(e[i]instanceof HMDVRDevice){t.yfb=e[i];break}if(t.yfb){for(i=0;i<e.length;++i)if(e[i]instanceof PositionSensorVRDevice&&e[i].hardwareUnitId===t.yfb.hardwareUnitId){t.zfb=e[i];break}}},navigator.getVRDevices&&navigator.getVRDevices().then(t.Afb),t.enable(),t}return n(t,e),t.prototype.getOrientation=function(){if(this.orientationDataAvailable()&&this.enabled){var e=this.zfb.getState(),t=new Float32Array([0,0,0,0]);return null!==e&&e.orientation&&(t=new Float32Array([e.orientation.x,e.orientation.y,e.orientation.z,e.orientation.w])),r.Quat.toAngle(t)}return this.defaultDeviceOrientation},t.prototype.getFieldOfViewParams=function(){return this.orientationDataAvailable()?this.yfb.getEyeParameters("left").recommendedFieldOfView:this.defaultFieldOfView},t.prototype.orientationDataAvailable=function(){return null!==this.zfb&&null!==this.yfb},t.supported=function(){return!!navigator.getVRDevices},t}(i(16404).DeviceOrientationProvider)},81116:function(e,t,i){"use strict";var n=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(t,i)};return function(t,i){if("function"!=typeof i&&null!==i)throw TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.EaseInOutTransitionTiming=void 0;var r=i(44369),o=i(37485);t.EaseInOutTransitionTiming=function(e){function t(t){var i=e.call(this,t)||this;return i.currentDisplacementVector=new o.DisplacementVector,i.intermediateDisplacementVector=new o.DisplacementVector,i.targetDisplacementVector=new o.DisplacementVector,i.normalizedTargetDisplacementVector=new o.DisplacementVector,i.normalizedDisplacementVector=new o.DisplacementVector,i.maximumLinearAcceleration=0,i.maximumAngularAcceleration=0,i}return n(t,e),t.prototype.shouldTransitionBeApplied=function(){var e=isFinite(this.targetDisplacementVector.deltaTime),t=this.targetDisplacementVector.deltaTime>0;return e&&t},t.prototype.apply=function(e){if(this.targetDisplacementVector.deltaTime=e.deltaTime,o.DisplacementVector.clone(e,this.normalizedDisplacementVector),o.DisplacementVector.clone(this.targetDisplacementVector,this.normalizedTargetDisplacementVector),this.normalizedDisplacementVector.length/=this.normalizedDisplacementVector.deltaTime,this.normalizedTargetDisplacementVector.length/=this.normalizedTargetDisplacementVector.deltaTime,this.normalizedDisplacementVector.phi/=this.normalizedDisplacementVector.deltaTime,this.normalizedTargetDisplacementVector.phi/=this.normalizedTargetDisplacementVector.deltaTime,this.normalizedDisplacementVector.diff(this.normalizedTargetDisplacementVector),this.normalizedDisplacementVector.length>0&&(this.maximumLinearAcceleration=this.normalizedDisplacementVector.length/this.config.transitionTime),0!==Math.abs(this.normalizedDisplacementVector.phi)&&(this.maximumAngularAcceleration=Math.abs(this.normalizedDisplacementVector.phi)/this.config.transitionTime),o.DisplacementVector.clone(e,this.targetDisplacementVector),!this.shouldTransitionBeApplied())return o.DisplacementVector.clone(this.targetDisplacementVector,this.currentDisplacementVector),this.targetDisplacementVector;this.intermediateDisplacementVector.diff(this.currentDisplacementVector,this.targetDisplacementVector);var t=Math.min(this.maximumLinearAcceleration*this.targetDisplacementVector.deltaTime*this.targetDisplacementVector.deltaTime,this.config.maxDisplacementSpeed),i=Math.min(this.maximumAngularAcceleration*this.targetDisplacementVector.deltaTime*this.targetDisplacementVector.deltaTime,this.config.maxDisplacementSpeed);return this.intermediateDisplacementVector.length>t&&(this.intermediateDisplacementVector.length=t),Math.abs(this.intermediateDisplacementVector.phi)>i&&(this.intermediateDisplacementVector.phi=r.MathUtil.sign(this.intermediateDisplacementVector.phi)*i),this.currentDisplacementVector.add(this.intermediateDisplacementVector),this.currentDisplacementVector},t.prototype.reset=function(){this.currentDisplacementVector.update(0,0,0),this.intermediateDisplacementVector.update(0,0,0),this.targetDisplacementVector.update(0,0,0),this.maximumLinearAcceleration=0,this.maximumAngularAcceleration=0},t}(i(7192).TransitionTiming)},68801:function(e,t,i){"use strict";var n=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(t,i)};return function(t,i){if("function"!=typeof i&&null!==i)throw TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.EaseInTransitionTiming=void 0,t.EaseInTransitionTiming=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.shouldTransitionBeApplied=function(){var e=isFinite(this.targetDisplacementVector.deltaTime),t=this.targetDisplacementVector.deltaTime>0,i=this.targetDisplacementVector.active;return e&&t&&i},t}(i(81116).EaseInOutTransitionTiming)},95746:function(e,t,i){"use strict";var n=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(t,i)};return function(t,i){if("function"!=typeof i&&null!==i)throw TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.EaseOutTransitionTiming=void 0,t.EaseOutTransitionTiming=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.shouldTransitionBeApplied=function(){var e=isFinite(this.targetDisplacementVector.deltaTime),t=this.targetDisplacementVector.deltaTime>0,i=this.targetDisplacementVector.active;return e&&t&&!i},t}(i(81116).EaseInOutTransitionTiming)},4551:function(e,t,i){"use strict";var n=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(t,i)};return function(t,i){if("function"!=typeof i&&null!==i)throw TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.NoTransitionTiming=void 0,t.NoTransitionTiming=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.apply=function(e){return e},t.prototype.reset=function(){},t}(i(7192).TransitionTiming)},7192:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TransitionTiming=void 0,t.TransitionTiming=function(e){this.config=e}},76320:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TransitionTimingFactory=void 0;var n=i(43948),r=i(81116),o=i(68801),a=i(95746),s=i(4551);t.TransitionTimingFactory=function(){function e(){}return e.get=function(e){switch(e.transitionTimingType){case n.TransitionTimingType.None:return new s.NoTransitionTiming(e);case n.TransitionTimingType.EaseIn:return new o.EaseInTransitionTiming(e);case n.TransitionTimingType.EaseOut:return new a.EaseOutTransitionTiming(e);case n.TransitionTimingType.EaseInOut:return new r.EaseInOutTransitionTiming(e)}},e}()},70372:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ConfigParser=void 0;var n=i(43948),r={contentType:n.VRContentType.Single,stereo:!1,startPosition:0,contentFieldOfView:360,verticalFieldOfView:-1,horizontalFieldOfView:-1,viewingWindow:{minYaw:0,maxYaw:360,minPitch:-90,maxPitch:90},restrictedInlinePlayback:!1,enableFrameRateMeasurements:!1,cardboard:null,viewingDirectionChangeThreshold:5,viewingDirectionChangeEventInterval:.25,keyboardControl:{transitionTimingType:n.TransitionTimingType.EaseInOut,transitionTime:.25,maxDisplacementSpeed:90,keyMap:{up:["w"],right:["d"],down:["s"],left:["a"],rotateClockwise:["e"],rotateCounterclockwise:["q"]}},mouseControl:{transitionTimingType:n.TransitionTimingType.EaseOut,transitionTime:.25,maxDisplacementSpeed:1/0},apiControl:{transitionTimingType:n.TransitionTimingType.EaseInOut,transitionTime:.25,maxDisplacementSpeed:1/0}};t.ConfigParser=function(){function e(){}return e.getObject=function(e,t){for(var i=t.split("."),n=!0,o=e,a=r,s=0,u=i;s<u.length;s++){var c=u[s];o.hasOwnProperty(c)&&n?o=o[c]:n=!1,a.hasOwnProperty(c)&&(a=a[c])}return[n,o,a]},e.getPrimitive=function(t,i,n,r){var o=e.getObject(t,i),a=o[0],s=o[1],u=o[2],c=!0;if(r)for(var l in r){if(r.hasOwnProperty(l)&&r[l]===s){c=!0;break}c=!1}return a&&typeof s===n&&c
vendor: 4,269 bytes, line 1
1?s:u},e.getArray=function(t,i,n){var r=e.getObject(t,i),o=r[0],a=r[1],s=r[2];return o&&"object"==typeof a&&a instanceof Array&&!a.some(function(e){return typeof e!==n})?a:s},e.getStringPrimitive=function(t,i,n){return e.getPrimitive(t,i,"string",n)},e.getEnumPrimitive=function(t,i,n){return e.getPrimitive(t,i,"string",n)},e.getBooleanPrimitive=function(t,i,n){return e.getPrimitive(t,i,"boolean",n)},e.getNumberPrimitive=function(t,i,n){return e.getPrimitive(t,i,"number",n)},e.getStringArray=function(t,i){return e.getArray(t,i,"string")},e.parseGeneralConfig=function(t,i){i.stereo=e.getBooleanPrimitive(t,"stereo"),i.restrictedInlinePlayback=e.getBooleanPrimitive(t,"restrictedInlinePlayback"),i.startPosition=e.getNumberPrimitive(t,"startPosition"),i.contentFieldOfView=e.getNumberPrimitive(t,"contentFieldOfView"),i.verticalFieldOfView=e.getNumberPrimitive(t,"verticalFieldOfView"),i.horizontalFieldOfView=e.getNumberPrimitive(t,"horizontalFieldOfView"),i.enableFrameRateMeasurements=e.getBooleanPrimitive(t,"enableFrameRateMeasurements"),i.cardboard=e.getStringPrimitive(t,"cardboard"),i.viewingDirectionChangeThreshold=e.getNumberPrimitive(t,"viewingDirectionChangeThreshold"),i.viewingDirectionChangeEventInterval=e.getNumberPrimitive(t,"viewingDirectionChangeEventInterval")},e.parseViewingWindow=function(t,i){i.viewingWindow=r.viewingWindow,t.hasOwnProperty("viewingWindow")&&"object"==typeof t.viewingWindow&&(i.viewingWindow.minYaw=e.getNumberPrimitive(t,"viewingWindow.minYaw"),i.viewingWindow.maxYaw=e.getNumberPrimitive(t,"viewingWindow.maxYaw"),i.viewingWindow.minPitch=e.getNumberPrimitive(t,"viewingWindow.minPitch"),i.viewingWindow.maxPitch=e.getNumberPrimitive(t,"viewingWindow.maxPitch"))},e.parseKeyboardControl=function(t,i){i.keyboardControl=r.keyboardControl,t.hasOwnProperty("keyboardControl")&&"object"==typeof t.keyboardControl&&(i.keyboardControl.transitionTimingType=e.getEnumPrimitive(t,"keyboardControl.transitionTimingType",n.TransitionTimingType),i.keyboardControl.transitionTime=e.getNumberPrimitive(t,"keyboardControl.transitionTime"),i.keyboardControl.maxDisplacementSpeed=e.getNumberPrimitive(t,"keyboardControl.maxDisplacementSpeed"),t.keyboardControl.hasOwnProperty("keyMap")&&"object"==typeof t.keyboardControl.keyMap&&(i.keyboardControl.keyMap.up=e.getStringArray(t,"keyboardControl.keyMap.up"),i.keyboardControl.keyMap.right=e.getStringArray(t,"keyboardControl.keyMap.right"),i.keyboardControl.keyMap.down=e.getStringArray(t,"keyboardControl.keyMap.down"),i.keyboardControl.keyMap.left=e.getStringArray(t,"keyboardControl.keyMap.left"),i.keyboardControl.keyMap.rotateClockwise=e.getStringArray(t,"keyboardControl.keyMap.rotateClockwise"),i.keyboardControl.keyMap.rotateCounterclockwise=e.getStringArray(t,"keyboardControl.keyMap.rotateCounterclockwise")))},e.parseMouseControl=function(t,i){i.mouseControl=r.mouseControl,t.hasOwnProperty("mouseControl")&&"object"==typeof t.mouseControl&&(i.mouseControl.transitionTimingType=e.getEnumPrimitive(t,"mouseControl.transitionTimingType",n.TransitionTimingType),i.mouseControl.transitionTime=e.getNumberPrimitive(t,"mouseControl.transitionTime"),i.mouseControl.maxDisplacementSpeed=e.getNumberPrimitive(t,"mouseControl.maxDisplacementSpeed"))},e.parseApiControl=function(t,i){i.apiControl=r.apiControl,t.hasOwnProperty("apiControl")&&"object"==typeof t.apiControl&&(i.apiControl.transitionTimingType=e.getEnumPrimitive(t,"apiControl.transitionTimingType",n.TransitionTimingType),i.apiControl.transitionTime=e.getNumberPrimitive(t,"apiControl.transitionTime"),i.apiControl.maxDisplacementSpeed=e.getNumberPrimitive(t,"apiControl.maxDisplacementSpeed"))},e.parseDebugHooks=function(e){var t={onDrawScene:null,onStartRendering:null,onRenderingSuspended:null,onRenderingResumed:null,requestFakeInput:null,requestTraveledMouseDistance:null,requestKeyActiveState:null};return e.debugHooks&&Object.keys(t).filter(function(t){return"function"==typeof e.debugHooks[t]}).forEach(function(i){return t[i]=e.debugHooks[i]}),t},e.parse=function(t){t=t||{};var i={contentType:e.getEnumPrimitive(t,"contentType",n.VRContentType)};return e.parseGeneralConfig(t,i),e.parseViewingWindow(t,i),e.parseKeyboardControl(t,i),e.parseMouseControl(t,i),e.parseApiControl(t,i),[i,e.parseDebugHooks(t)]},e}()
vendor: 18,561 bytes, line 1
1},51629:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ElementHelper=void 0,t.ElementHelper=function(){function e(){}return e.addEventListener=function(e,t,i,n){for(var r=0;r<t.length;r++)e.addEventListener(t[r],i,n)},e.removeEventListener=function(e,t,i,n){for(var r=0;r<t.length;r++)e.removeEventListener(t[r],i,n)},e.addClass=function(e,t){if(e&&t){var i=e.getAttribute("class"),n=!0;i&&i.length>0&&(n=0>i.split(" ").indexOf(t)),i&&i.length>0&&n&&(t=i+" "+t),n&&e.setAttribute("class",t)}},e.removeClass=function(e,t){if(e&&t){var i=e.getAttribute("class");i&&i.indexOf(t)>-1&&(i=i.replace(RegExp("(?:^|\\s)"+t+"(?!\\S)"),"").trim(),e.setAttribute("class",i))}},e.getNavigator=function(){return window.navigator},Object.defineProperty(e,"touchEvents",{get:function(){var t=e.getNavigator().userAgent,i=e.getNavigator().msPointerEnabled;return/Android|IEMobile|iP(hone|ad|od)/i.test(t)?i?{start:["MSPointerDown"],move:["MSPointerMove"],end:["MSPointerUp"],down:["MSPointerDown"],up:["MSPointerUp"],click:["MSPointerUp"],type:"ms"}:{start:["touchstart"],move:["touchmove"],end:["touchend","touchcancel"],down:["touchstart"],up:["touchend","touchcancel"],click:["touchend"],type:"mobile"}:{start:["mouseover"],move:["mousemove"],end:["mouseleave","mouseout"],down:["mousedown"],up:["mouseup"],click:["click"],type:"desktop"}},enumerable:!1,configurable:!0}),e}()},17378:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FrameRateMonitor=void 0;var n=i(44369);t.FrameRateMonitor=function(){function e(e,t){void 0===t&&(t=1e3);var i=this;this.startAnimationFrame=function(){i.Jbb&&(i.Fbb=window.performance.now())},this.endAnimationFrame=function(){if(!(i.Fbb<0)){var e=window.performance.now()-i.Fbb;i.Cbb.push(e),i.Lbb(),i.Ibb+=e,i.Ibb>i.Abb&&i.Bbb&&(i.Ibb=0,i.Kbb(i.getAverageFrameRate(),i.getTimeSpentUpdatingTexture(),i.getTimeSpentDrawingScene()))}},this.startUpdateTexture=function(){i.Jbb&&(i.Gbb=window.performance.now())},this.endUpdateTexture=function(){i.Gbb<0||i.Ebb.push(window.performance.now()-i.Gbb)},this.startDrawScene=function(){i.Jbb&&(i.Hbb=window.performance.now())},this.endDrawScene=function(){i.Hbb<0||i.Dbb.push(window.performance.now()-i.Hbb)},this.Cbb=[],this.Ebb=[],this.Dbb=[],this.Fbb=-1,this.Gbb=-1,this.Hbb=-1,this.zbb=e,this.Abb=t,this.Bbb=[],this.Ibb=0,this.Jbb=!1}return e.prototype.enable=function(){this.Jbb=!0},e.prototype.disable=function(){this.Jbb=!1,this.Cbb=[],this.Ebb=[],this.Dbb=[],this.Fbb=-1,this.Gbb=-1,this.Hbb=-1},e.prototype.subscribe=function(e){-1===this.Bbb.indexOf(e)&&this.Bbb.push(e)},e.prototype.unsubscribe=function(e){this.Bbb.indexOf(e)>-1&&this.Bbb.splice(this.Bbb.indexOf(e),1)},e.prototype.getAverageFrameRate=function(){return 1/(n.MathUtil.getAverage(this.Cbb)/1e3)},e.prototype.getTimeSpentUpdatingTexture=function(){return n.MathUtil.getSum(this.Ebb)/n.MathUtil.getSum(this.Cbb)},e.prototype.getTimeSpentDrawingScene=function(){return n.MathUtil.getSum(this.Dbb)/n.MathUtil.getSum(this.Cbb)},e.prototype.destroy=function(){this.disable(),this.Bbb=null},e.prototype.Kbb=function(e,t,i){for(var n=0,r=this.Bbb;n<r.length;n++)r[n].onFrameRateAvailable(e,t,i)},e.prototype.Lbb=function(){for(var e=0,t=this.Cbb.length-1;t>=0;t--)if((e+=this.Cbb[t])>=this.zbb){this.Cbb.splice(0,t+1),this.Ebb.splice(0,t+1),this.Dbb.splice(0,t+1);break}},e}()},10768:function(e){e.exports="precision mediump float;\n\nconst int LEFT_EYE = 0;\nconst int RIGHT_EYE = 1;\nconst int CONTENT_TYPE_MONO = 0;\nconst int CONTENT_TYPE_STEREO_SBS = 1;\nconst int CONTENT_TYPE_STEREO_TAB = 2;\nconst float PI = 3.1415926535897932384626433832795;\nconst float TwoPI = 6.283185307179586476925286766559;\n\nuniform int eyeSelector;\nuniform int contentType;\nuniform float videoWidth;\nuniform float videoHeight;\nuniform float contentFieldOfView;\nuniform sampler2D textureUnit;\nvarying vec3 viewingDirection;\n\nfloat restrictedMod(float value, float divisor, float bound) {\n  return mod(value, divisor) * (1.0 - (2.0 * bound)) + bound;\n}\n\nvec4 directionToColor(vec3 direction, int eye, int contentType, float contentFieldOfView, float videoWidth, float videoHeight) {\n  float eyeOffset = 0.0;\n  float textureSizeMultiplier = contentFieldOfView / 180.;\n  float theta = atan(direction.x, direction.z * -1.0);\n  float verticalSamplingOffset = 1.0 / (2.0 * videoHeight);\n  float horizontalSamplingOffset = 1.0 / (2.0 * videoWidth);\n  float phi = atan(direction.y * -1.0, length(direction.xz));\n\n  float u = mod(theta / (PI * textureSizeMultiplier), 1.0);\n  float v = mod(phi / PI + 0.5, 1.0);\n\n  if (eye == LEFT_EYE) {\n    eyeOffset = 0.0;\n  } else if (eye == RIGHT_EYE) {\n    eyeOffset = 0.5;\n  }\n\n  if ((theta + PI) / PI > textureSizeMultiplier) {\n    return vec4(0., 0., 0., 1.);\n  }\n\n  if (contentType == CONTENT_TYPE_STEREO_SBS) {\n    u = restrictedMod(theta / (TwoPI * textureSizeMultiplier), 0.5, horizontalSamplingOffset) + eyeOffset;\n  } else if (contentType == CONTENT_TYPE_STEREO_TAB) {\n    v = restrictedMod(v / 2.0, 0.5, verticalSamplingOffset) + (0.5 - eyeOffset);\n  }\n\n  return texture2D(textureUnit, vec2(u, v));\n}\nvoid main(void) {\n  gl_FragColor = directionToColor(viewingDirection, eyeSelector, contentType, contentFieldOfView, videoWidth, videoHeight);\n}\n"},50766:function(e){e.exports="precision mediump float;\n\nattribute vec2 vertexPosition;\nvarying vec3 viewingDirection;\nuniform mat4 projectionInverse;\nuniform vec2 distortionFovScale;\nuniform vec2 distortionFovOffset;\nuniform float contentWidthDegrees;\nuniform float distortionMaxFovSquared;\nuniform float distortionCoefficients[12];\n\nfloat DistortionFactor(float rSquared) {\n    float ret = 0.0;\n    rSquared = min(distortionMaxFovSquared, rSquared);\n    ret = rSquared * (ret + distortionCoefficients[11]);\n    ret = rSquared * (ret + distortionCoefficients[10]);\n    ret = rSquared * (ret + distortionCoefficients[9]);\n    ret = rSquared * (ret + distortionCoefficients[8]);\n    ret = rSquared * (ret + distortionCoefficients[7]);\n    ret = rSquared * (ret + distortionCoefficients[6]);\n    ret = rSquared * (ret + distortionCoefficients[5]);\n    ret = rSquared * (ret + distortionCoefficients[4]);\n    ret = rSquared * (ret + distortionCoefficients[3]);\n    ret = rSquared * (ret + distortionCoefficients[2]);\n    ret = rSquared * (ret + distortionCoefficients[1]);\n    ret = rSquared * (ret + distortionCoefficients[0]);\n    return ret + 1.0;\n}\n\nvec4 Distort(vec4 point) {\n    vec3 pointNdc = point.xyz / point.w;\n    vec2 pointUnitSquare = (pointNdc.xy + vec2(1.0)) / 2.0;\n    vec2 pointTanAngle = pointUnitSquare * distortionFovScale - distortionFovOffset;\n    float radiusSquared = dot(pointTanAngle, pointTanAngle);\n    float distortionFactor = DistortionFactor(radiusSquared);\n    vec2 distortedPointTanAngle = pointTanAngle * distortionFactor;\n    vec2 distortedPointUnitSquare = (distortedPointTanAngle + distortionFovOffset)\n        / distortionFovScale;\n    vec3 distortedPointNdc = vec3(distortedPointUnitSquare * 2.0 - vec2(1.0), pointNdc.z);\n    return vec4(distortedPointNdc, 1.0) * point.w;\n}\n\nvoid main(void) {\n  gl_Position = Distort(vec4(vertexPosition, 1.0, 1.0));\n  vec4 projectiveDirection = projectionInverse * gl_Position;\n  viewingDirection = projectiveDirection.xyz / projectiveDirection.w;\n }\n"}},function(e){return e(e.s=6463)}])},966:function(e){"use strict";self,e.exports=(self.webpackChunkbitmovin_player=self.webpackChunkbitmovin_player||[]).push([[962],{54663:function(e,t,i){i.r(t),i.d(t,{SaxXMLParserWrapper:function(){return b},decode:function(){return u}});var n=String.fromCharCode,r=Object.prototype.hasOwnProperty,o=/&#(\d+);|&#x([0-9a-f]+);|&(\w+);/gi,a={amp:"&",apos:"'",gt:">",lt:"<",quot:'"'};function s(e,t,i,o){return o?r.call(a,o)?a[o]:"&"+o+";":n(t||parseInt(i,16))}function u(e){return e.length>3&&-1!==e.indexOf("&")?e.replace(o,s):e}Object.keys(a).forEach(function(e){a[e.toUpperCase()]=a[e]});var c="http://www.w3.org/2001/XMLSchema-instance",l="xsi",d="xsi:type",h="non-whitespace outside of root node";function p(e){return Error(e)}function f(e){return"missing namespace for prefix <"+e+">"}function g(e){return{get:e,enumerable:!0}}function m(e){var t,i={};for(t in e)i[t]=e[t];return i}function y(e){return e+"$uri"}function v(){return{line:0,column:0}}function S(e){throw e}function b(e){if(!this)return new b(e);var t,i,n,r,o,a,s,E,T,_=e&&e.proxy,A=e&&e.attributeNamePrefix||"",P=function(e){return A+e},M=S,I=v,R=!1,C=!1,O=null,D=!1;function w(e){e instanceof Error||(e=p(e)),O=e,M(e,I)}function N(e){o&&(e instanceof Error||(e=p(e)),o(e,I))}this.on=function(e,u){if("function"!=typeof u)throw p("required args <name, cb>");switch(e){case"openTag":i=u;break;case"text":t=u;break;case"closeTag":n=u;break;case"error":M=u;break;case"warn":o=u;break;case"cdata":r=u;break;case"attention":E=u;break;case"question":s=u;break;case"comment":a=u;break;default:throw p("unsupported event: "+e)}return this},this.ns=function(e){if(void 0===e&&(e={}),"object"!=typeof e)throw p("required args <nsMap={}>");var t,i={};for(t in e)i[t]=e[t];return i[c]=l,C=!0,T=i,this},this.parse=function(e){if("string"!=typeof e)throw p("required args <xml=string>");return O=null,function(e){var o,c,l,p,v,S,b,A,M,O,L,k=C?[]:null,U=C?function(e){var t,i,n={};for(t in e)n[i=e[t]]=i,n[y(i)]=t;return n}(T):null,x=[],B=0,F=!1,H=!1,j=0,V=0,W="",G=0;function q(){if(null!==L)return L;var e,t,i,n,r,o,a,s,c,l,h,p=C&&U.xmlns,g=C&&R?[]:null,v=G,S=W,b=S.length,E={},_={},A=function(e,t){return E[P(e)]=t};e:for(;v<b;v++)if(c=!1,!(32===(l=S.charCodeAt(v))||l<14&&l>8)){for((l<65||l>122||l>90&&l<97)&&95!==l&&58!==l&&(N("illegal first char attribute name"),c=!0),h=v+1;h<b;h++)if(!((l=S.charCodeAt(h))>96&&l<123||l>64&&l<91||l>47&&l<59||46===l||45===l||95===l)){if(32===l||l<14&&l>8){N("missing attribute value"),v=h;continue e}if(61===l)break;N("illegal attribute name char"),c=!0}if("xmlns:xmlns"===(s=S.substring(v,h))&&(N("illegal declaration of xmlns"),c=!0),34===(l=S.charCodeAt(h+1)))-1===(h=S.indexOf('"',v=h+2))&&-1!==(h=S.indexOf("'",v))&&(N("attribute value quote missmatch"),c=!0);else if(39===l)-1===(h=S.indexOf("'",v=h+2))&&-1!==(h=S.indexOf('"',v))&&(N("attribute value quote missmatch"),c=!0);else for(N("missing attribute value quotes"),c=!0,h+=1;h<b&&!(32===(l=S.charCodeAt(h+1))||l<14&&l>8);h++);for(-1===h&&(N("missing closing quotes"),h=b,c=!0),c||(o=S.substring(v,h)),v=h;h+1<b&&!(32===(l=S.charCodeAt(h+1))||l<14&&l>8);h++)v===h&&(N("illegal character after attribute end"),c=!0);if(v=h+1,!c)if(s in _)N("attribute <"+s+"> already defined");else if(_[s]=!0,C)if(R){if(null!==(r="xmlns"===s?"xmlns":120===s.charCodeAt(0)&&"xmlns:"===s.substr(0,6)?s.substr(6):null)){if(e=u(o),t=y(r),!(a=T[e])){if("xmlns"===r||t in U&&U[t]!==e)do a="ns"+B++;while(void 0!==U[a]);else a=r;T[e]=a}U[r]!==a&&(n||(U=m(U),n=!0),U[r]=a,"xmlns"===r&&(U[y(a)]=e,p=a),U[t]=e),A(s,o);continue}g.push(s,o)}else -1!==(l=s.indexOf(":"))?(i=U[s.substring(0,l)])?((s=p===i?s.substr(l+1):i+s.substr(l))===d&&(o=-1!==(l=o.indexOf(":"))?(i=U[i=o.substring(0,l)]||i)+o.substring(l):p+":"+o),A(s,o)):N(f(s.substring(0,l))):A(s,o);else A(s,o)}if(R)for(v=0,b=g.length;v<b;v++){if(s=g[v++],o=g[v],-1!==(l=s.indexOf(":"))){if(!(i=U[s.substring(0,l)])){N(f(s.substring(0,l)));continue}(s=p===i?s.substr(l+1):i+s.substr(l))===d&&(o=-1!==(l=o.indexOf(":"))?(i=U[i=o.substring(0,l)]||i)+o.substring(l):p+":"+o)}A(s,o)}return L=E}for(I=function(){for(var t,i,n=/(\r\n|\r|\n)/g,r=0,o=0,a=0,s=V;j>=a&&(t=n.exec(e))&&!((s=t[0].length+t.index)>j);)r+=1,a=s;return -1==j?(o=s,i=e.substring(V)):0===V?i=e.substring(V,j):(o=j-a,i=-1==V?e.substring(j):e.substring(j,V+1)),{data:i,line:r,column:o}},_&&(O=Object.create({},{name:g(function(){return A}),originalName:g(function(){return M}),attrs:g(q),ns:g(function(){return U})}));-1!==V;){if(-1===(j=60===e.charCodeAt(V)?V:e.indexOf("<",V)))return x.length?w("unexpected end of file"):0===V?w("missing start tag"):void(V<e.length&&e.substring(V).trim()&&N(h));if(V!==j){if(x.length){if(t&&(t(e.substring(V,j),u,I),D))return}else if(e.substring(V,j).trim()&&(N(h),D))return}if(33===(v=e.charCodeAt(j+1))){if(91===(p=e.charCodeAt(j+2))&&"CDATA["===e.substr(j+3,6)){if(-1===(V=e.indexOf("]]>",j)))return w("unclosed cdata");if(r&&(r(e.substring(j+9,V),I),D))return;V+=3;continue}if(45===p&&45===e.charCodeAt(j+3)){if(-1===(V=e.indexOf("--\x3e",j)))return w("unclosed comment");if(a&&(a(e.substring(j+4,V),u,I),D))return;V+=3;continue}}if(63!==v){for(c=j+1;;c++){if(isNaN(S=e.charCodeAt(c)))return V=-1,w("unclosed tag");if(34===S)c=-1!==(p=e.indexOf('"',c+1))?p:c;else if(39===S)c=-1!==(p=e.indexOf("'",c+1))?p:c;else if(62===S){V=c;break}}if(33!==v){if(L={},47===v){if(F=!1,H=!0,!x.length)return w("missing open tag");if(c=A=x.pop(),p=j+2+c.length,e.substring(j+2,p)!==c)return w("closing tag mismatch");for(;p<V;p++)if(!(32===(v=e.charCodeAt(p))||v>8&&v<14))return w("close tag")}else{if(47===e.charCodeAt(V-1)?(c=A=e.substring(j+1,V-1),F=!0,H=!0):(c=A=e.substring(j+1,V),F=!0,H=!1),!(v>96&&v<123||v>64&&v<91||95===v||58===v))return w("illegal first char nodeName");for(p=1,l=c.length;p<l;p++)if(!((v=c.charCodeAt(p))>96&&v<123||v>64&&v<91||v>47&&v<59||45===v||95===v||46==v)){if(32===v||v<14&&v>8){A=c.substring(0,p),L=null;break}return w("invalid nodeName")}H||x.push(A)}if(C){if(o=U,F&&(H||k.push(o),null===L&&(R=-1!==c.indexOf("xmlns",p))&&(G=p,W=c,q(),R=!1)),M=A,-1!==(v=A.indexOf(":"))){if(!(b=U[A.substring(0,v)]))return w("missing namespace on <"+M+">");A=A.substr(v+1)}else b=U.xmlns;b&&(A=b+":"+A)}if(F&&(G=p,W=c,i&&(_?i(O,u,H,I):i(A,q,u,H,I),D)))return;if(H){if(n&&(n(_?O:A,u,F,I),D))return;C&&(U=F?o:k.pop())}V+=1}else{if(E&&(E(e.substring(j,V+1),u,I),D))return;V+=1}}else{if(-1===(V=e.indexOf("?>",j)))return w("unclosed question");if(s&&(s(e.substring(j,V+2),I),D))return;V+=2}}}(e),I=v,D=!1,O},this.stop=function(){D=!0}}},78442:function(e,t){var i=this&&this.__spreadArray||function(e,t,i){if(i||2==arguments.length)for(var n,r=0,o=t.length;r<o;r++)!n&&r in t||(n||(n=Array.prototype.slice.call(t,0,r)),n[r]=t[r]);return e.concat(n||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.parseJSONtoXML=c;var n=["__prefix","__text","__cdata"];function r(e){return n.includes(e)}function o(e){return e.length>0&&""!==e.join("")}function a(e,t,i){return function(e,t,i){var n="";return i?(n+="<".concat(i),n+=e.length>0?" ".concat(e.join(" ")):"",n+=t?">":"/>"):n}(t,o(e),i)+function(e,t){var i="";return o(e)&&(i+=e.join(""),i+=t?"</".concat(t,">"):""),i}(e,i)}function s(e){return"<![CDATA[".concat(e,"]]>")}function u(e,t){return t.map(function(t){return"string"==typeof t?a(""!==t?[t]:[],[],e):c(t,e)})}function c(e,t){var n=function(e){for(var t=function(e){return Object.keys(e).filter(r)}(e),i=null,n=[],o=0,a=t;o<a.length;o++){var u=a[o];"__prefix"===u&&(i=e[u]),"__text"===u&&n.push(e[u]),"__cdata"===u&&e[u].forEach(function(e){n.push(s(e))})}return[i,n]}(e),o=n[0],l=n[1],d=function(e){for(var t=function(e){return Object.keys(e).filter(function(e){return!e.startsWith("_")})}(e),i=[],n=0,r=t;n<r.length;n++){var o=r[n],a=e[o];"string"!=typeof a?a instanceof Array?i.push.apply(i,u(o,a)):"object"==typeof a&&i.push(c(a,o)):i.push("<".concat(o,">").concat(a,"</").concat(o,">"))}return i}(e),h=function(e){return(function(e){return Object.keys(e).filter(function(e){return e.startsWith("_")&&!r(e)})})(e).map(function(t){return"".concat(t.replace("_",""),'="').concat(e[t],'"')})}(e),p=t;return p&&o&&(p="".concat(o,":").concat(t)),a(i(i([],l,!0),d,!0),h,p)}},15872:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.XMLModuleDefinition=void 0;var n=i(62756),r=i(78442),o=i(89214),a=i(89214);t.XMLModuleDefinition={name:n.ModuleName.XML,module:{parseXML:a.parseXML,parseJSONtoXML:r.parseJSONtoXML,setLogger:o.setLogger}},t.default=t.XMLModuleDefinition},89214:function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.sanitizeXML=h,t.setLogger=function(e){u=e},t.parseXML=function(e,t){s=s||new r.SaxXMLParserWrapper({attributeNamePrefix:"_"});var i,a=h(e),p={},f=t.useArrayRepresentationForChildren?c:l;return s.on(n.TagOpened,function(e,i,n,r){var o=function(e,t){var i=t();if(!e.includes(":"))return[e,i];var n=e.split(":"),r=n[0],o=n[1];return i.__prefix=r,[o,i]}(e,i),a=o[0],s=o[1];!function(e,t,i){i&&(e._media&&(e._media=t(e._media)),e._initialization&&(e._initialization=t(e._initialization)))}(s,n,t.decodeEntities),p=f(p,a,s,r)}),s.on(n.TagClosed,function(e){p=function(e){var t=e.parent;return delete e.parent,function(e,t){if(d(t)&&null!=t.key)if(e[t.key]!==t){if(e[t.key].constructor===Array){var i=e[t.key].indexOf(t);e[t.key][i]=t.__text}}else e[t.key]=t.__text}(t,e),delete e.key,t}(p)}),s.on(n.Text,function(e,i){!function(e,t){e.__text=t.trim(),o(e)}(p,t.decodeEntities?i(e):e)}),s.on(n.CData,function(e){null==p.__cdata?p.__cdata=[e]:p.__cdata.push(e),o(p)}),s.on(n.Error,function(e){i=Error("XML parsing failed: ".concat(e instanceof Error?e.message:String(e))),u&&u.debug(i.message),s.stop(),p={}}),s.parse(a),i?{success:!1,error:i}:{success:!0,parsed:p}};var n,r=i(54663);function o(e){e.toString=function(){return(this.__text?this.__text:"")+(this.__cdata?this.__cdata:"")}}function a(e,t){t&&2===Object.keys(e).length&&(e.__text="",o(e))}!function(e){e.TagOpened="openTag",e.TagClosed="closeTag",e.Text="text",e.Error="error",e.Warning="warn",e.CData="cdata",e.Attention="attention",e.Question="question",e.Comment="comment"}(n||(n={}));var s,u,c=function(e,t,i,n){return i.parent=e,i.key=t,e.parent||e.key||e[t]?e[t]?e[t].push(i):(a(i,n),e[t]=[i]):e[t]=i,i},l=function(e,t,i,n){return i.parent=e,i.key=t,e[t]?e[t].constructor===Array?e[t].push(i):e[t]=[e[t],i]:(a(i,n),e[t]=i),i},d=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)}])}},__webpack_module_cache__={};function __nested_webpack_require_2297282__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var i=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e].call(i.exports,i,i.exports,__nested_webpack_require_2297282__),i.exports}__nested_webpack_require_2297282__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}}();var __nested_webpack_exports__=__nested_webpack_require_2297282__(319);return __nested_webpack_exports__}()})}()}}]);

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.