if (self.CavalryLogger) { CavalryLogger.start_js(["Zb9eoQC"]); } __d("CometFeedVideoPlayerPlaceholder_video.graphql",[],(function(a,b,c,d,e,f){"use strict";a={argumentDefinitions:[],kind:"Fragment",metadata:null,name:"CometFeedVideoPlayerPlaceholder_video",selections:[{args:null,kind:"FragmentSpread",name:"VideoPlayerCometFeedThumbnail_video"}],type:"Video",abstractKey:null};e.exports=a}),null); __d("useOzImplementationData_video.graphql",[],(function(a,b,c,d,e,f){"use strict";a={argumentDefinitions:[],kind:"Fragment",metadata:null,name:"useOzImplementationData_video",selections:[{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"can_use_oz",storageKey:null},{alias:"playable_url_dash",args:[{kind:"Literal",name:"scrubbing_preference",value:"MPEG_DASH"}],kind:"ScalarField",name:"playable_url",storageKey:'playable_url(scrubbing_preference:"MPEG_DASH")'},{alias:null,args:null,kind:"ScalarField",name:"dash_manifest",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"min_quality_preference",storageKey:null}],type:"Video",abstractKey:null};e.exports=a}),null); __d("useProgressiveImplementationData_video.graphql",[],(function(a,b,c,d,e,f){"use strict";a={argumentDefinitions:[],kind:"Fragment",metadata:null,name:"useProgressiveImplementationData_video",selections:[{alias:null,args:null,kind:"ScalarField",name:"is_rss_podcast_video",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"is_spherical",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"min_quality_preference",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"playable_url",storageKey:null},{alias:"playable_url_quality_hd",args:[{kind:"Literal",name:"quality",value:"HD"}],kind:"ScalarField",name:"playable_url",storageKey:'playable_url(quality:"HD")'},{alias:null,args:null,concreteType:"SphericalVideoFallbackUrls",kind:"LinkedField",name:"spherical_video_fallback_urls",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"hd",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"sd",storageKey:null}],storageKey:null}],type:"Video",abstractKey:null};e.exports=a}),null); __d("useShakaImplementationData_video.graphql",[],(function(a,b,c,d,e,f){"use strict";a={argumentDefinitions:[],kind:"Fragment",metadata:null,name:"useShakaImplementationData_video",selections:[{alias:null,args:null,kind:"ScalarField",name:"is_rss_podcast_video",storageKey:null},{alias:null,args:null,concreteType:"VideoPlayerShakaLiveP2PInit",kind:"LinkedField",name:"video_player_shaka_live_p2p_init",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"json_encoded_video_data",storageKey:null}],storageKey:null}],type:"Video",abstractKey:null};e.exports=a}),null); __d("useVideoPlayerShakaPerformanceLoggerBuilder_init.graphql",[],(function(a,b,c,d,e,f){"use strict";a={argumentDefinitions:[],kind:"Fragment",metadata:null,name:"useVideoPlayerShakaPerformanceLoggerBuilder_init",selections:[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null}],type:"VideoPlayerShakaPerformanceLoggerInit",abstractKey:null};e.exports=a}),null); __d("useVideoPlayerShakaPerformanceLoggerBuilder_video.graphql",[],(function(a,b,c,d,e,f){"use strict";a={argumentDefinitions:[],kind:"Fragment",metadata:null,name:"useVideoPlayerShakaPerformanceLoggerBuilder_video",selections:[{alias:"video_player_shaka_performance_logger_init2",args:null,concreteType:"VideoPlayerShakaPerformanceLoggerInit",kind:"LinkedField",name:"video_player_shaka_performance_logger_init",plural:!1,selections:[{args:null,documentName:"useVideoPlayerShakaPerformanceLoggerBuilder_video",fragmentName:"useVideoPlayerShakaPerformanceLoggerBuilder_init",fragmentPropName:"init",kind:"ModuleImport"},{alias:null,args:null,kind:"ScalarField",name:"per_session_sampling_rate",storageKey:null}],storageKey:null}],type:"Video",abstractKey:null};e.exports=a}),null); __d("useVideoPlayerShakaPerformanceLoggerRelayImpl_init.graphql",[],(function(a,b,c,d,e,f){"use strict";a={argumentDefinitions:[],kind:"Fragment",metadata:null,name:"useVideoPlayerShakaPerformanceLoggerRelayImpl_init",selections:[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null}],type:"VideoPlayerShakaPerformanceLoggerInit",abstractKey:null};e.exports=a}),null); __d("useVideoPlayerShakaPerformanceLoggerRelayImpl_video.graphql",[],(function(a,b,c,d,e,f){"use strict";a={argumentDefinitions:[],kind:"Fragment",metadata:null,name:"useVideoPlayerShakaPerformanceLoggerRelayImpl_video",selections:[{alias:null,args:null,concreteType:"VideoPlayerShakaPerformanceLoggerInit",kind:"LinkedField",name:"video_player_shaka_performance_logger_init",plural:!1,selections:[{args:null,documentName:"useVideoPlayerShakaPerformanceLoggerRelayImpl_video",fragmentName:"useVideoPlayerShakaPerformanceLoggerRelayImpl_init",fragmentPropName:"init",kind:"ModuleImport"}],storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"video_player_shaka_performance_logger_should_sample",storageKey:null}],type:"Video",abstractKey:null};e.exports=a}),null); __d("useCometRelayExpiredVideoUrlRefreshHandlerQuery_facebookRelayOperation",[],(function(a,b,c,d,e,f){e.exports="4268667373184908"}),null); __d("useCometRelayExpiredVideoUrlRefreshHandlerQuery.graphql",["useCometRelayExpiredVideoUrlRefreshHandlerQuery_facebookRelayOperation"],(function(a,b,c,d,e,f){"use strict";a=function(){var a={defaultValue:null,kind:"LocalArgument",name:"expiredURL"},c={defaultValue:null,kind:"LocalArgument",name:"videoID"},d=[{kind:"Variable",name:"id",variableName:"videoID"}],e={alias:null,args:[{kind:"Variable",name:"expired_url",variableName:"expiredURL"}],concreteType:"RMDRefreshedUrl",kind:"LinkedField",name:"rmd_refreshed_url",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"new_url",storageKey:null}],storageKey:null};return{fragment:{argumentDefinitions:[a,c],kind:"Fragment",metadata:null,name:"useCometRelayExpiredVideoUrlRefreshHandlerQuery",selections:[{alias:null,args:d,concreteType:"Video",kind:"LinkedField",name:"video",plural:!1,selections:[e],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:[c,a],kind:"Operation",name:"useCometRelayExpiredVideoUrlRefreshHandlerQuery",selections:[{alias:null,args:d,concreteType:"Video",kind:"LinkedField",name:"video",plural:!1,selections:[e,{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null}],storageKey:null}]},params:{id:b("useCometRelayExpiredVideoUrlRefreshHandlerQuery_facebookRelayOperation"),metadata:{},name:"useCometRelayExpiredVideoUrlRefreshHandlerQuery",operationKind:"query",text:null}}}();e.exports=a}),null); __d("useVideoImplementationsImpl_video.graphql",[],(function(a,b,c,d,e,f){"use strict";a={argumentDefinitions:[],kind:"Fragment",metadata:null,name:"useVideoImplementationsImpl_video",selections:[{args:null,kind:"FragmentSpread",name:"useOzImplementationData_video"},{args:null,kind:"FragmentSpread",name:"useShakaImplementationData_video"},{args:null,kind:"FragmentSpread",name:"useProgressiveImplementationData_video"}],type:"Video",abstractKey:null};e.exports=a}),null); __d("useVideoPlayerShakaConfig_video.graphql",[],(function(a,b,c,d,e,f){"use strict";a={argumentDefinitions:[],kind:"Fragment",metadata:null,name:"useVideoPlayerShakaConfig_video",selections:[{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"is_spherical",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"is_gaming_video",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"is_latency_menu_enabled",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"is_live_streaming",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"fbls_tier",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"is_latency_sensitive_broadcast",storageKey:null},{kind:"ClientExtension",selections:[{alias:null,args:null,kind:"ScalarField",name:"selected_latency_setting",storageKey:null}]}],type:"Video",abstractKey:null};e.exports=a}),null); __d("CometFeedVideoPlayerPlaceholder.react",["fbt","CometFeedVideoPlayerPlaceholder_video.graphql","CometPressable.react","CometRelay","VideoPlayerCometFeedThumbnail.react","VideoPlayerPlayButton.react","react","stylex"],(function(a,b,c,d,e,f,g,h){"use strict";var i,j=d("react"),k={pressable:{cursor:"nhd2j8a9",display:"a8c37x1j",pointerEvents:"mrt03zmi"},root:{bottom:"i09qtzwb",boxSizing:"rq0escxv",end:"n7fi1qx3",position:"pmk7jnqg",start:"j9ispegn",top:"kr520xx4",alignItems:"bp9cbjyn",display:"j83agx80",justifyContent:"taijpn5t",pointerEvents:"hzruof5a"}};function a(a){var e=d("CometRelay").useFragment(i!==void 0?i:i=b("CometFeedVideoPlayerPlaceholder_video.graphql"),a.video);e=j.jsxs(j.Fragment,{children:[j.jsx(c("VideoPlayerCometFeedThumbnail.react"),{video:e}),j.jsx(c("VideoPlayerPlayButton.react"),{isVisible:!0})]});return typeof a.onClick==="function"?j.jsx(c("CometPressable.react"),{display:"block",label:h._(/*FBT_CALL*/"Reproduzir o v\u00eddeo"/*FBT_CALL*/),onPress:a.onClick,overlayDisabled:!0,xstyle:[k.root,k.pressable],children:e}):j.jsx("div",{className:c("stylex")(k.root),children:e})}a.displayName=a.name+" [from "+f.id+"]";g["default"]=a}),98); __d("useSEOLoggedOutWebCrawler",["gkx"],(function(a,b,c,d,e,f,g){"use strict";function a(){return c("gkx")("1779508")}g["default"]=a}),98); __d("OzOneSemanticHandlerUtils",["ConstUriUtils","qex","recoverableViolation"],(function(a,b,c,d,e,f,g){"use strict";function h(a,b,c){b!=null&&(b.indexOf("+RE")>=0&&a.retry()),c!=null&&c()}function a(a,b){var d=b.error;d=d.getExtra();var e=d.code;d=d.headers;var f=null;e==null&&c("recoverableViolation")("A ONE Semantic error response must have an error code.","comet_video_player");d==null&&c("recoverableViolation")("A ONE Semantic error response must contain response Headers.","comet_video_player");if(d!=null){d=d.get("x-fb-one-variant");f=(d=d)!=null?d:null}d=JSON.parse(a.getString("network_retry_intervals_json","{}"));a=d[e];switch(e){case"410":b.endStream();break;case"404":h(b,f,function(){var a=c("qex")._("560")||!1;a&&b.retry({behavior:"recover_failed_request"})});break;case"429":b.retry(a);break;case"403":default:}}function i(a){if(a!=null){a=parseInt(a,10);var b=c("qex")._("2048866");if(b!=null&&b>0)return!isNaN(a)&&a>0&&a<=b}return!1}function j(a,b){if(a!=null&&b!=null){a=parseInt(a,10);b=parseInt(b,10);return!isNaN(a)&&!isNaN(b)&&a>0&&a<=b}return!1}function k(a){if(a!=null){a=d("ConstUriUtils").getUri(a);if(a){a=a.getQueryParam("os_param");return a?String(a).toString():null}}return null}function l(a,b){var d=a!=null;return i(b)||(d||!!c("qex")._("1959789"))&&j(b,a)}function b(a){var b=a.getExtra();b=b.headers;b=m(b);a=a.getExtra();var d=a.code;a=a.url;if(b!=null&&d==null){c("recoverableViolation")("A ONE Semantic error response must have an error code.","comet_video_player");return!1}d=k(a);return l(d,b)}function m(a){if(a){a=a.get("x-fb-one");if(a!=null)return parseInt(a,10)>0?a:null}return null}function e(a,b,c){var d=null,e=null;b!=null&&(d=k(b),d!=null&&a.setOneReqWave(parseInt(d,10)));b=c==null?void 0:c.headers;b&&(e=m(b),e!=null&&a.setOneResWave(parseInt(e,10)));a.setOneObserved(l(d,e))}g.maybeRetryForVariant=h;g.evaluateOneSemanticsResponse=a;g.isOneSemanticsForcedForResponseWave=i;g.isOneSemanticsEnabledForWave=j;g.getOneSemanticRequestWave=k;g.shouldRespondWithOneSemantics=b;g.getOneSemanticResponseWave=m;g.setOneSemanticFetchStreamLoggingAttributes=e}),98); __d("handleOzManifestFetchErrorEvent",[],(function(a,b,c,d,e,f){"use strict";function a(a,b){var c=a.getNumber("initial_manifest_request_retry_count",0),d=JSON.parse(a.getString("network_retry_intervals_json","{}")),e=a.getNumber("live_max_try_attempts_on_404",1),f=["404","503"];a.getBool("live_gracefully_handle_no_network",!1)&&f.push("0");a.getBool("live_gracefully_handle_410",!1)&&f.push("410");a.getBool("live_gracefully_handle_502",!1)&&f.push("502");a.getBool("live_gracefully_handle_429",!1)&&f.push("429");a.getBool("live_gracefully_handle_504",!1)&&f.push("504");var g=b.error.getExtra().code;a.getBool("handle_mpd_null_error_codes",!1)&&(g=g!=null?g:null);d=d[g];if(b.isInitialRequest)typeof d==="number"&&d>0&&b.retryAttemptCount-1)switch(g){case"410":b.endStream();break;case"404":e0&&b.retry({waitMs:d});break;default:break}else g===null&&a.getBool("handle_mpd_null_error_codes",!1)&&b.retry()}f["default"]=a}),66); __d("handleOzStreamErrorEvent",[],(function(a,b,c,d,e,f){"use strict";var g=[0,1,1,2,3,5,8,13,21,34];function a(a,b){var c=b.error.getExtra().code;if(a.getBool("retry_null_error_code_in_stream",!1)&&c==null){b.retry();return}var d=JSON.parse(a.getString("network_end_broadcasts_json","[]"));if(d.includes(c)){b.endStream();return}d=JSON.parse(a.getString("network_skip_json","[]"));if(d.includes(c)){b.retry();return}d=a.getBool("back_off_pdash_504_retry",!0)?g[b.retryAttemptCount]:0;var e=JSON.parse(a.getString("network_reload_mpd_json","[]")),f=a.getBool("fix_reload_manifest_retry",!1);if(a.getBool("back_off_pdash_504_retry",!0)&&d==null&&(!f||e.includes(c)))return;if(d!=null&&e.includes(c)){a.getBool("network_reload_mpd_json_retry",!1)?b.retry({behavior:"recover_failed_request",waitMs:d*1e3}):b.retry({waitMs:d*1e3});return}f=JSON.parse(a.getString("network_retry_intervals_json",'{"0": 1000, "404": 2000, "502": 1000, "503": 1000, "504": 1000}'));e=c!=null?f[c]:null;if(e!=null){a.getBool("network_retry_intervals_json_retry",!1)?b.retry({behavior:"retry_failed_request",waitMs:e}):b.retry({waitMs:e});return}}f["default"]=a}),66); __d("OzOneSemanticHandler",["OzOneSemanticHandlerUtils","handleOzManifestFetchErrorEvent","handleOzStreamErrorEvent","qex"],(function(a,b,c,d,e,f,g){"use strict";function a(a,b){var e=b.error;!!c("qex")._("1959788")&&d("OzOneSemanticHandlerUtils").shouldRespondWithOneSemantics(e)?d("OzOneSemanticHandlerUtils").evaluateOneSemanticsResponse(a,b):c("handleOzManifestFetchErrorEvent")(a,b)}function b(a,b){var e=b.error;!!c("qex")._("1959788")&&d("OzOneSemanticHandlerUtils").shouldRespondWithOneSemantics(e)?d("OzOneSemanticHandlerUtils").evaluateOneSemanticsResponse(a,b):c("handleOzStreamErrorEvent")(a,b)}g.handleManifestFetchErrorEvent=a;g.handleStreamErrorEvent=b}),98); __d("OzCDNSignedQueryParams",["ConstUriUtils"],(function(a,b,c,d,e,f,g){"use strict";a=function(){function a(){this.$1={}}var b=a.prototype;b.$2=function(a,b,c){this.$1[a]==null&&(this.$1[a]={}),this.$1[a][b]=c};b.get=function(a){a=this.$1[a];return a==null?null:a};b.update=function(a){a=d("ConstUriUtils").getUri(a);if(a!=null){var b=a.getQueryParams();a=a.getDomain()+a.getPath();var c=b.get("oe");c!=null&&this.$2(a,"oe",String(b.get("oe")));b.get("oh")!=null&&this.$2(a,"oh",String(b.get("oh")))}};return a}();g["default"]=a}),98); __d("SphericalMediaGyroOverlay.react",["cx","CSS","joinClasses","react"],(function(a,b,c,d,e,f,g,h){"use strict";var i=d("react"),j=800,k=function(a,b,c){b===void 0&&(b=!0);c===void 0&&(c=!1);return{gyroRoot:"_1zvy"+(a?" _2dz7":"")+(b?" _4z8s":"")+(c?" _4z8p":""),gyroOuter:"_4z8q",gyroInner:"_4z8r",gyroMeridian:"_4z8t",gyroEquator:"_4z8u",gyroTextShell:"_4z8v",gyroText:"_4z8w"}};a=function(a){babelHelpers.inheritsLoose(b,a);function b(){var b,c;for(var d=arguments.length,e=new Array(d),f=0;f16/9?Math.round(a/(16/9)):b}function h(a,b){var c=null,d=null,e=null,f=null;for(var g=0;g100?100:h}return 0}function a(a){a=a.split(",");var b=[];for(var c=0;c0;l--){if(i[l].mosValue===-1||i[l-1].mosValue===-1)return a;var m=i[l].track.bandwidth||-1,n=i[l-1].track.bandwidth||-1;if(m===-1||n===-1)return a;if(i[l].mosValue=n)continue;m=i[l-1].track.bandwidth!==null?i[l].mosValue-i[l-1].mosValue:Infinity;if(m<=k&&i[l].track.bandwidth&&d/i[l].track.bandwidth<=f){k-=m;continue}else k=e;j.push(i[l].track)}j.push(i[0].track);j.reverse();return j}f.getQualityLabel=g;f.getMosValue=h;f.parsePlaybackMos=a;f.filterTracksWithExpensiveMos=b}),66); __d("OzSystemicRiskUtils",["oz-player/networks/OzBandwidthUtils"],(function(a,b,c,d,e,f,g){"use strict";var h=50;function i(a,b,c){a=d("oz-player/networks/OzBandwidthUtils").getEstimatedRequestTimeToLastByteMs(a,b,c);return b/a*8e3}function a(a,b,c,d){a=a*b;b=a*c/8e3;c=i(d,b,h);return a0)return b<=a.getNumber("systemic_risk_abr_low_mos_resolution",0);return c!=null&&c>0?c<=a.getNumber("systemic_risk_abr_min_watchable_mos",0):!1}function b(a){var b=a.bandwidthDiagnostics,c=a.bitrate,d=a.bufferAhead,e=a.config,f=a.hasMadeInitialDecision,g=a.initialRiskFactor,k=a.previousMos,l=a.previousResolution,m=a.remainingVideoDurationMs;a=a.segmentFetchRangeDurationMs;c=c*a/8e3;a=i(b,c,e.getNumber("systemic_risk_abr_high_estimate_confidence",75));b=i(b,c,h);c=j(e,l,k);var n=1;c||(n=b/a);b=f||c?1:g;a=b*(c?e.getNumber("systemic_risk_abr_low_mos_risk_factor",1):e.getNumber("systemic_risk_abr_risk_factor",1));f=(m-d*1e3)/m;g=a*n;b=g*f;e=Math.max(b,1);return{bandwidth:n,buffer:f,encoding:a,lowMos:c,multiplier:e,previousMos:k,previousResolution:l}}g.getBandwidthEstimateForRequest=i;g.isEffectiveBitrateBelowBandwidthEstimate=a;g.isConsideredLowMos=j;g.getRiskFactorsForRepresentation=b}),98); __d("oz-player/utils/OzAbrUtils",[],(function(a,b,c,d,e,f){"use strict";a=function(a,b,c,d){var e=a.getNumber("resolution_constraint_factor");if(e===0)return b;var f=b.filter(function(b){var f=b.getWidth()<=c.width*d*e;b=b.getHeight()<=c.height*d*e;return a.getBool("use_strict_resolution_constraint")?f&&b:f||b});return!f.length?[b[0]]:f};b=function(a,b,c,d,e,f){b=b?a.getNumber("min_switch_interval"):a.getNumber("initial_switch_interval");d=d>=a.getNumber("abr_min_bandwidth_samples");var g=a.getNumber("abr_eval_buffer_threshold");c=!g||c>=g;g=null;e+a.getNumber("min_eval_interval")>Date.now()?g="min_eval_interval":f+b>Date.now()?g="min_switch_interval":!d?g="min_bandwidth_samples":c||(g="buffer_threshold_not_satisfied");return g};f.excludeLargeRepresentations=a;f.getReasonToPreventEvaluation=b}),66); __d("oz-player/utils/OzBufferingUtils",[],(function(a,b,c,d,e,f){"use strict";e=.1;var g=1,h=.2;function a(a,b,c){if(i(a,c))return!0;c=a.currentTime;var d=0;for(var e=0;e=c){d=g;break}}return d-c>b}function i(a,b){var c=a.currentTime,d=0;for(var e=0;e=c){d=g;break}}return Math.abs(d-b)<=h||Math.abs(c-b)<=h}function b(a,b){a=a?a.getSourceBufferState():null;if(!a)return 0;b=b.getCurrentTime();return j(b,a.getBufferedRanges())}function j(a,b){var c=null;for(var d=0;da&&(c=e)}return!c?0:c.endTime-a}function c(a){var b=[];for(var c=0;c=b.startTime&&aa&&c[d].endTime-a>b)return!0}return!1}f.BUFFER_UNDERFLOW_THRESHOLD=e;f.BUFFER_OVERFLOW_THRESHOLD=g;f.BUFFER_FUDGE_FACTOR=h;f.hasEnoughBuffer=a;f.hasBufferedToOrReachedEnd=i;f.getBufferAheadFromPlaybackStates=b;f.getBufferAheadFromCurrentTime=j;f.getNumericalRangesFromSourceBuffer=c;f.hasEnoughPartialBuffer=d;f.hasBuffer=l}),66); __d("oz-player/utils/OzPlaybackRestrictionsUtils",[],(function(a,b,c,d,e,f){"use strict";var g=function(a,b){return a.getBandwidth()-b.getBandwidth()};a=function(a,b,c,d,e){if(d.length===0)return[];d.sort(g);b=b.reduce(function(a,b){return b.applyRestriction(a,c)},d);if(e!=null&&e.length>0){var f=d.filter(function(a){return e.indexOf(a.getID())>-1});b=b.concat(f).sort(g)}return a.getBool("ignore_restrictions_when_all_representations_restricted")?b.length>0?b:d:b};f.applyVideoPlaybackRestrictions=a}),66); __d("OzSystemicRiskABRManager",["MosUtils","OzSystemicRiskUtils","oz-player/networks/OzBandwidthEstimator","oz-player/utils/OzAbrUtils","oz-player/utils/OzBufferingUtils","oz-player/utils/OzPlaybackRestrictionsUtils"],(function(a,b,c,d,e,f,g){"use strict";var h=6e4,i=2e3,j={BANDWIDTH:"br",BUFFER:"vb",ENCODING:"er",LOW_MOS:"lm",MULTIPLIER:"m",PREVIOUS_MOS:"pm",PREVIOUS_RESOLUTION:"pr"};a=function(){function a(a,b,c,d,e,f,g,h){this.$11=!1,this.$1=a,this.$2=b,this.$3=c,this.$4=d,this.$5=e,this.$7=f,this.$8=g,this.$9=h}var b=a.prototype;b.setSourceBuffer=function(a){this.$6=a};b.updateRepresentations=function(a){var b=this;this.$3=a;a=this.$3.find(function(a){return a.getQualityLabel()===b.$2.getQualityLabel()});this.$2=(a=a)!=null?a:this.$3[0]};b.getBestRepresentation=function(a){var b=this.$1.getLegacyConfig(),e=d("oz-player/utils/OzBufferingUtils").getBufferAheadFromPlaybackStates(this.$6,this.$5),f=this.$5.getDuration();f=isNaN(f)?h:f;if(this.$3.length===0){this.$10="no available representations";return this.$2}var g=this.$5.getCurrentTime();f=this.$9==="static"?(f-g)*1e3:h;g=this.$8();a=b.getBool("systemic_risk_use_fetch_range_duration",!1)?this.$12(a):i;var j=b.getBool("use_bandwidth_estimate_from_headers_in_abr",!1)?c("oz-player/networks/OzBandwidthEstimator").getBandwidthDiagnosticsFromHeaders(b):c("oz-player/networks/OzBandwidthEstimator").getBandwidthDiagnostics(b);if(j==null){this.$10="missing bandwidth diagnostics";return this.$2}var k=this.$13(this.$3).sort(function(a,b){return a.getBandwidth()-b.getBandwidth()}),l=null,m=null,n=null;for(var o=0;o0?k[0]:this.$3[0]:this.$2=l;this.$15((p=n)!=null?p:m,{isSystemicRiskABREnabled:b.getBool("use_systemic_risk_abr",!1),noRepresentationSelected:l==null,representationCount:k.length});this.$11||(this.$11=!0);return this.$2};b.$12=function(a){var b=i;if(a!=null&&a.length>0){var c=a[0].getTimeRange().startTime;a=a[a.length-1].getTimeRange().endTime;a-c>0&&(b=(a-c)*1e3)}return b};b.$14=function(a,b){a=a.getCustomField("playbackResolutionMos");a=d("MosUtils").parsePlaybackMos(String(a));return a!=null?d("MosUtils").getMosValue(a,d("MosUtils").getQualityLabel(b.width,b.height)):null};b.$13=function(a){var b=this;if(!this.$1.getLegacyConfig().getBool("systemic_risk_abr_apply_representation_restrictions",!1))return a;var c=this.$1.getLegacyConfig().getBool("exclude_large_representations_after_restrictions",!1),e=a;a=function(){e=d("oz-player/utils/OzAbrUtils").excludeLargeRepresentations(b.$1,e,b.$8(),b.$7)};var f=function(){e=d("oz-player/utils/OzPlaybackRestrictionsUtils").applyVideoPlaybackRestrictions(b.$1,b.$4,b.$8(),e)};c||(a(),f());c&&(f(),a());return e};b.$15=function(a,b){if(a==null)return;var c=b.isSystemicRiskABREnabled,d=b.noRepresentationSelected;b=b.representationCount;this.$10=[[j.LOW_MOS,a.lowMos],[j.ENCODING,a.encoding],[j.BANDWIDTH,a.bandwidth],[j.MULTIPLIER,a.multiplier],[j.BUFFER,a.buffer],[j.PREVIOUS_MOS,a.previousMos],[j.PREVIOUS_RESOLUTION,a.previousResolution]].reduce(function(a,b){var c=b[1],d="";switch(typeof c){case"number":d=c.toFixed(1);break;case"boolean":d=c?"1":"0";break;default:d="null"}return a+(b[0]+": "+d+";")},"");c||(this.$10+="disabled;");d&&(this.$10+="none-selected-of-"+b+";")};b.getLastEvaluationReason=function(){return this.$10};return a}();g["default"]=a}),98); __d("VideoPlayerImplementationLoadSequenceManager",["setTimeout"],(function(a,b,c,d,e,f,g){"use strict";a=function(){function a(){this.$1=[],this.$2=[]}var b=a.prototype;b.schedule=function(a,b,d){var e=this,f={load:d,maximumBlockTimeMs:a.getNumber("load_sequence_max_delay_ms",0),sequence:b},g=a.getNumber("load_sequence_only_prioritize_first_count",0);g>0?d=!this.$2.find(function(a){return a.sequence0){a=a[0].$;if(a)return Number.parseInt(a.timescale,0)||null}return null}};b.getBool("parse_initialization_binary",!1)&&(a.initializationBinary=function(a){try{a=window.atob(a.FBInitializationBinary[0]._);return d("oz-player/utils/OzReadableStreamUtils").stringToUint8Array(a)}catch(a){return null}});a.playbackResolutionMos=function(a){try{return a.$.FBPlaybackResolutionMos}catch(a){return null}};a.qualityLabel=function(a){try{return a.$.FBQualityLabel}catch(a){return null}};b.getBool("parse_first_segment",!1)&&(a.firstSegmentParser=function(a){if(e!=null&&e>0)return null;try{var b=a.SegmentBase[0].$.FBFirstSegmentRange.split("-").map(Number),d={startByte:b[0],endByte:b[1]};b=a.BaseURL[0]._;var f=new(c("oz-player/shims/OzURI"))(b),g=new(c("oz-player/manifests/OzSegmentOptions"))();return{getData:function(){return null},getURI:function(){return f},getByteRange:function(){return d},getTimeRange:function(){return{startTime:0,endTime:2}},getSequenceNumber:function(){return null},getOptions:function(){return g}}}catch(a){return null}});return a}g.createOzCustomRepresentationParsers=a}),98); __d("OzDashPrefetchCache",["VideoDashPrefetchCache"],(function(a,b,c,d,e,f,g){"use strict";a=function(){function a(){}var b=a.prototype;b.hasCacheValue=function(a){return c("VideoDashPrefetchCache").hasCacheValue(a)};b.getCacheValue=function(a){return c("VideoDashPrefetchCache").getCacheValue(a)};b.getCachedRepresentations=function(){return null};return a}();g["default"]=a}),98); __d("oz-player/shims/www/ozvariantWWW",["invariant"],(function(a,b,c,d,e,f,g,h){a=h;g["default"]=a}),98); __d("oz-player/shims/ozvariant",["oz-player/shims/www/ozvariantWWW"],(function(a,b,c,d,e,f,g){g["default"]=c("oz-player/shims/www/ozvariantWWW")}),98); __d("oz-player/utils/OzNumericalHelper",[],(function(a,b,c,d,e,f){"use strict";var g=1e-5;function h(a,b,c){c===void 0&&(c=g);return Math.abs(b-a)<=c}function i(a,b,c){c===void 0&&(c=g);return a>b&&!h(a,b,c)}function j(a,b,c){c===void 0&&(c=g);return ah&&a.rangeStart>b}function j(a,b){a=a.rangeEnd;b=b.rangeEnd;if(a===null||a===void 0)return!0;return b===null||b===void 0?!1:Math.abs(a-b)>h&&a>b}function k(a,b,c,d){c=c.rangeEnd;return c===null||c===void 0?!1:a.getBool("numerical_range_utils_is_after_range_exclusive")&&b===c||Math.abs(b-c)>((a=d)!=null?a:h)&&b>c}function a(a,b,c){var d=b.rangeEnd;if(d===null||d===void 0)return!1;c=(c=c)!=null?c:h;return a-b.rangeStart>=c&&d-a>=c}function l(a,b){return a>b-h}function b(a){if(!a.length)return[];var b=[],c=a[0];b.push(c);for(var d=1;d=b?0:c.reduceRight(function(c,d){var e=d.rangeStart;d=d.rangeEnd;if(bd)return c;else if(d==null||b<=d)return Math.min(b-e,b-a)+c;else if(a>=e)return Math.min(d-a,b-a)+c;else return d-e+c},0)}function n(a,b){var c;c=a.length==0?(c=b[b.length-1])!=null?c:null:null;for(var e=0;e=0;c--){var e=this.$4[c];if(d("oz-player/utils/OzNumericalHelper").lessThanOrEqual(e.t+e.d*(e.r+1),a,this.$9))break;b=e}if(b===null)return null;if(this.$8.getBool("live_no_segment_when_playhead_is_before_first_segment")&&d("oz-player/utils/OzNumericalHelper").greaterThan(b.t,a,this.$9))return null;e=Math.max(0,Math.floor((a-b.t+this.$9)/b.d));return this.$13(b,e)};b.getSegment=function(a){var b=0;a=a;while(a>=0&&b=c){a-=c;b++;continue}break}c=this.$4[b];return!c?null:this.$13(c,a)};b.getSegmentAfter=function(a){a=a.getTimeRange().endTime;return this.getSegmentByTime(a)};b.getPredictedSegmentAfter=function(a){return null};b.canPredict=function(){return!1};b.canApproximateId=function(){return!1};b.isEndingSegment=function(a){if(!this.$4||!this.$4.length||!this.$6)return!1;var b=this.$4[this.$4.length-1],c=b.r;b=this.$13(b,c);return Math.abs(b.getTimeRange().startTime-a.getTimeRange().startTime)+Math.abs(b.getTimeRange().endTime-a.getTimeRange().endTime)b.t)return 1;return a.d===b.d?a.r-b.r:0});b=[];for(var e=0,f=e+1;fh.d)throw new(c("oz-player/utils/OzError"))({type:"OZ_REPRESENTATION_PARSER",description:"Previous segment group duration greater than new.",extra:{code:"OZ_RP-1"}});g.d=h.d;g.r=Math.max(g.r,h.r);g.id=h.id;f++;continue}else b.push(this.$4[e]),e=f,f++}this.$4.length>0&&b.push(this.$4[this.$4.length-1]);(g=this.$4).splice.apply(g,[0,this.$4.length].concat(b));return}h=this.$4.length-1;e=a.length-1;f=h;g=e;b=JSON.stringify(this.$4);while(h>=0&&e>=0){var i=this.$4[h],j=a[e];if(d("oz-player/utils/OzNumericalHelper").equalTo(i.t,j.t,this.$9)){var k=h===f||e===g,l=k&&(h!==f&&j.r>i.r||e!==g&&i.r>j.r);k=!k&&i.r!==j.r||l;if(k)throw new(c("oz-player/utils/OzError"))({type:"OZ_REPRESENTATION_PARSER",description:'Segment group "R" field mismatch. Old groups: '+b+"\n , new groups: "+JSON.stringify(a),extra:{code:"OZ_RP-2"}});if(this.$8.getBool("throw_on_non_zero_r_d_mismatch")&&i.r>0&&i.d!==j.d)throw new(c("oz-player/utils/OzError"))({type:"OZ_REPRESENTATION_PARSER",description:"Duration mismatch between non-zero repeat tag and new.",extra:{code:"OZ_RP-3"}});i.r=Math.max(i.r,j.r);i.id!=null&&j.id!=null&&(i.id=Math.max(i.id,j.id));if(this.$8.getBool("fix_template_duration_artifact_in_manifest")){if(i.d>j.d)throw new(c("oz-player/utils/OzError"))({type:"OZ_REPRESENTATION_PARSER",description:"Previous segment group duration greater than new.",extra:{code:"OZ_RP-4"}});i.d=j.d}h--;e--}else if(d("oz-player/utils/OzNumericalHelper").greaterThan(j.t,i.t,this.$9))this.$4.splice(h+1,0,j),e--;else{if(this.$17(i,j))throw new(c("oz-player/utils/OzError"))({type:"OZ_REPRESENTATION_PARSER",description:"Segment group misalinged",extra:{code:"OZ_RP-5"}});h--}}if(e>=0){(l=this.$4).unshift.apply(l,a.slice(0,e+1))}};b.$15=function(a){a=this.$11(a);a=d("oz-player/utils/OzNumericalRangeUtil").mergeSortedRanges(this.$5.map(function(a){return{rangeStart:a.startTime,rangeEnd:a.endTime}}).concat(a.map(function(a){return{rangeStart:a.startTime,rangeEnd:a.endTime}})));this.$5=a.map(function(a){return{startTime:a.rangeStart,endTime:a.rangeEnd===null||a.rangeEnd===void 0?Infinity:a.rangeEnd}})};b.$11=function(a){var b=this;a=d("oz-player/utils/OzNumericalRangeUtil").mergeSortedRanges(this.$4.map(function(a){var c=b.$13(a,0).getTimeRange().startTime;a=b.$13(a,a.r).getTimeRange().endTime;return{rangeStart:c,rangeEnd:a}}));return a.map(function(a){var b=a.rangeStart;a=a.rangeEnd;a=a===null||a===void 0?Infinity:a;return{startTime:b,endTime:a}})};b.$13=function(a,b){var d=this;b===void 0&&(b=0);var e=a.t,f=a.d,g=a.r;a=a.id;var h=e+f*b,i=this.$8.getBool("use_sc_timebased_segments"),j=this.$8.getBool("use_scf_timebased_segments"),k=this.$8.getBool("touch_cb_key"),l=a!=null?a-(g-b):null,m=new(c("oz-player/manifests/OzSegmentOptions"))();return{getData:function(){return null},getURI:function(){var a=d.$8.getBool("use_templated_pdash_segments")&&d.$1!=null&&l!=null?d.$1.replace("$Number$",l.toString()):d.$2.replace("$Time$",h.toString());a=new(c("oz-player/shims/OzURI"))(a);i&&a.addQueryData("_nc_sc",1);j&&a.addQueryData("_nc_scf",1);var b=a.getQueryData().cb;k&&b!=null&&a.addQueryData("cb",b+"_oz");return a},getTimeRange:function(){return{startTime:h/d.$3,endTime:(h+f)/d.$3}},getByteRange:function(){return null},getSequenceNumber:function(){return null},getOptions:function(){return m}}};b.getSegmentGroups=function(){return this.$4};b.getEndingSegment=function(){if(this.$4.length==0)return null;var a=this.$4[this.$4.length-1],b=a.r;return this.$13(a,b)};b.forceParseIfNotParsed=function(){};b.getMaxGopSec=function(){return null};return a}();g["default"]=a}),98); __d("oz-player/utils/OzUrlHelper",[],(function(a,b,c,d,e,f){"use strict";function a(a){a=a;var b=a.indexOf("://"),c=a.indexOf("/",b+3);c>b&&(a=a.substring(c));return a}function g(a){a=a;var b=a.lastIndexOf("/"),c=a.lastIndexOf("://");b>c+2&&(a=a.substring(0,b+1));return a}function h(a){a=a;a=g(a);return a.endsWith("/")?g(a.substring(0,a.length-1)):a}function i(a,b){a=g(a);b=b;while(b.length)if(b.startsWith("./"))b=b.substring(2);else if(b.startsWith("../"))b=b.substring(3),a=h(a),a.endsWith("/")&&(a=a.substring(0,a.length-1));else if(b.startsWith(".."))b=b.substring(2),a=h(a);else if(b.startsWith("."))b=b.substring(1);else break;b&&b.length&&(a.endsWith("/")||(a+="/"),a+=b);return a}function j(){for(var a=arguments.length,b=new Array(a),c=0;c0)d=i(d,b.shift());return d}function b(a,b){return k(b)?b:j(a,b)}function k(a){var b=/^https?:\/\//i;return b.test(a)}f.stripToPathAndQueryOnly=a;f.joinRelativeUrlPaths=j;f.joinUrlPaths=b}),66); __d("PredictedSegmentTemplateSegmentsContainer",["oz-player/manifests/OzSegmentOptions","oz-player/manifests/SegmentTemplateSegmentsContainer","oz-player/shims/OzURI","oz-player/shims/ozvariant","oz-player/utils/OzNumericalHelper","oz-player/utils/OzNumericalRangeUtil","oz-player/utils/OzUrlHelper"],(function(a,b,c,d,e,f,g){"use strict";a=function(a){babelHelpers.inheritsLoose(b,a);function b(b,c,d,e,f,g,h,i,j,k){k===void 0&&(k=!1);c=a.call(this,b,c,e,f,null,k)||this;c.$PredictedSegmentTemplateSegmentsContainer9=0;c.$PredictedSegmentTemplateSegmentsContainer11=null;c.$PredictedSegmentTemplateSegmentsContainer10=d;c.$PredictedSegmentTemplateSegmentsContainer8=k;c.$PredictedSegmentTemplateSegmentsContainer12=f;c.$PredictedSegmentTemplateSegmentsContainer7=b;c.$PredictedSegmentTemplateSegmentsContainer5=e;c.$PredictedSegmentTemplateSegmentsContainer1=g;c.$PredictedSegmentTemplateSegmentsContainer3=i;c.$PredictedSegmentTemplateSegmentsContainer2=h;c.$PredictedSegmentTemplateSegmentsContainer4=j;c.$PredictedSegmentTemplateSegmentsContainer6=b.getNumber("live_numerical_error_epsilon");for(var d=0;d0&&f.$PredictedSegmentTemplateSegmentsContainer10!=null&&(a.addQueryData("_nc_dinfo-manifest-url",d("oz-player/utils/OzUrlHelper").stripToPathAndQueryOnly(f.$PredictedSegmentTemplateSegmentsContainer10)),a.addQueryData("_nc_dinfo-timeout",j));return a}}};e.updateWith=function(d){d instanceof b||c("oz-player/shims/ozvariant")(0,646);this.$PredictedSegmentTemplateSegmentsContainer3=d.$PredictedSegmentTemplateSegmentsContainer3;this.$PredictedSegmentTemplateSegmentsContainer1=d.$PredictedSegmentTemplateSegmentsContainer1;a.prototype.updateWith.call(this,d);this.$PredictedSegmentTemplateSegmentsContainer12=d.$PredictedSegmentTemplateSegmentsContainer12;this.$PredictedSegmentTemplateSegmentsContainer8=d.$PredictedSegmentTemplateSegmentsContainer8;for(var d=0;d0};e.canApproximateId=function(){var a=this.$PredictedSegmentTemplateSegmentsContainer13();return a!=null};e.$PredictedSegmentTemplateSegmentsContainer16=function(a){var b=null;a=a*this.$PredictedSegmentTemplateSegmentsContainer5;var e=this.$PredictedSegmentTemplateSegmentsContainer12.length>0?this.$PredictedSegmentTemplateSegmentsContainer12[this.$PredictedSegmentTemplateSegmentsContainer12.length-1].t+this.$PredictedSegmentTemplateSegmentsContainer12[this.$PredictedSegmentTemplateSegmentsContainer12.length-1].d:null,f=this.$PredictedSegmentTemplateSegmentsContainer7.getLegacyConfig().getNumber("pdash_future_edgelatency_gops",0);if(e!=null&&e<=a&&f!==0&&a=0;g++){var h=this.$PredictedSegmentTemplateSegmentsContainer12[this.$PredictedSegmentTemplateSegmentsContainer12.length-1-g];h.r===0||c("oz-player/shims/ozvariant")(0,18769);if(d("oz-player/utils/OzNumericalHelper").lessThanOrEqual(h.t+h.d*(h.r+1),a,this.$PredictedSegmentTemplateSegmentsContainer6))break;b=h;e=g}if(b===null||f>0&&a=this.$PredictedSegmentTemplateSegmentsContainer3:a.prototype.isEndingSegment.call(this,b)};e.getEndingSegment=function(){if(this.$PredictedSegmentTemplateSegmentsContainer12.length===0)return null;var a=this.$PredictedSegmentTemplateSegmentsContainer12[this.$PredictedSegmentTemplateSegmentsContainer12.length-1];return this.$PredictedSegmentTemplateSegmentsContainer14(a.t/this.$PredictedSegmentTemplateSegmentsContainer5,(a.t+a.d)/this.$PredictedSegmentTemplateSegmentsContainer5,this.$PredictedSegmentTemplateSegmentsContainer3)};e.getMaxGopSec=function(){return this.$PredictedSegmentTemplateSegmentsContainer9/this.$PredictedSegmentTemplateSegmentsContainer5};return b}(c("oz-player/manifests/SegmentTemplateSegmentsContainer"));g["default"]=a}),98); __d("oz-player/parsers/OzDefaultSegmentTimelineParser",["oz-player/manifests/SegmentTemplateSegmentsContainer","oz-player/utils/OzUrlHelper"],(function(a,b,c,d,e,f,g){"use strict";a=function(){function a(){}a.parseSegments=function(a,b){a=[];b.SegmentTimeline[0].S&&(a=b.SegmentTimeline[0].S.map(function(a){return{t:Number.parseInt(a.$.t,10),d:Number.parseInt(a.$.d,10),r:Number.parseInt(a.$.r||"0",10),id:a.$.id?Number.parseInt(a.$.id,10):void 0}}));return a};var b=a.prototype;b.parseSegmentsContainer=function(b,e,f){return new(c("oz-player/manifests/SegmentTemplateSegmentsContainer"))(b,d("oz-player/utils/OzUrlHelper").joinUrlPaths(e.baseUrl,f.$.media),Number.parseInt(f.$.timescale,10),a.parseSegments(b,f),null,e.isStaticMpd)};return a}();g["default"]=a}),98); __d("OzPredictedSegmentTimelineParser",["PredictedSegmentTemplateSegmentsContainer","oz-player/manifests/SegmentTemplateSegmentsContainer","oz-player/parsers/OzDefaultSegmentTimelineParser","oz-player/shims/OzURI","oz-player/utils/OzUrlHelper"],(function(a,b,c,d,e,f,g){"use strict";a=function(){function a(){}var b=a.prototype;b.parseSegmentsContainer=function(a,b,e){var f;if(e.SegmentTimeline[0].$.FBPredictedMedia){f=d("oz-player/utils/OzUrlHelper").joinUrlPaths(b.baseUrl,e.SegmentTimeline[0].$.FBPredictedMedia);var g=new(c("oz-player/shims/OzURI"))(f);g.addQueryData("_nc_sc",1);f=g.toString()}var h;e.SegmentTimeline[0].$.FBPredictedMediaStartNumber&&(h=Number.parseInt(e.SegmentTimeline[0].$.FBPredictedMediaStartNumber,0));var i;e.SegmentTimeline[0].$.FBPredictedMediaEndNumber&&(i=Number.parseInt(e.SegmentTimeline[0].$.FBPredictedMediaEndNumber,0));var j;e.SegmentTimeline[0].$.FBAverageDuration&&(j=Number.parseInt(e.SegmentTimeline[0].$.FBAverageDuration,0));g=c("oz-player/parsers/OzDefaultSegmentTimelineParser").parseSegments(a,e);return(b.isTemplatedMpd&&h!=null&&j!=null||!b.isTemplatedMpd)&&f!=null&&i!=null?new(c("PredictedSegmentTemplateSegmentsContainer"))(a,d("oz-player/utils/OzUrlHelper").joinUrlPaths(b.baseUrl,e.$.media),b.mpdUrl,Number.parseInt(e.$.timescale,10),g,f,h,i,j,b.isStaticMpd):new(c("oz-player/manifests/SegmentTemplateSegmentsContainer"))(a,d("oz-player/utils/OzUrlHelper").joinUrlPaths(b.baseUrl,e.$.media),Number.parseInt(e.$.timescale,10),g,f,b.isStaticMpd)};return a}();g["default"]=a}),98); __d("OzVideoLiveTraceNetworkRequestStreamHandler",["oz-player/networks/OzTransformStream","oz-player/utils/OzResourceTimingUtils"],(function(a,b,c,d,e,f,g){"use strict";a=function(){function a(a,b){b===void 0&&(b=!1),this.$2=!1,this.$1=a,this.$2=b}var b=a.prototype;b.onResponse=function(a,b){var e=this,f=a.headers,g=null;if(!this.$1)return null;a=new(c("oz-player/networks/OzTransformStream"))();a.addListener("writableClose",function(){var a={},c=d("oz-player/utils/OzResourceTimingUtils").getLatestResourceTimingEntry(b);c&&(a.lat=Math.round(c.responseStart-c.requestStart).toString());e.$1&&f&&e.$1(f,g,a)});this.$2&&a.addListener("writableWrite",function(a){g===null?g=[a]:g.push(a)});return a};b.onError=function(a,b){return null};return a}();g["default"]=a}),98); __d("TimeRanges",["invariant"],(function(a,b,c,d,e,f,g,h){a=function(){function a(a){this.$1=[],this.$1=a}var b=a.prototype;b.start=function(a){this.$1[a]||h(0,2205);return this.$1[a].startTime};b.end=function(a){this.$1[a]||h(0,2205);return this.$1[a].endTime};b.length=function(){return this.$1.length};return a}();g["default"]=a}),98); __d("oz-player/drm/OzDrmUtils",[],(function(a,b,c,d,e,f){"use strict";a=function(a){return Uint8Array.from(window.atob(a),function(a){return a.charCodeAt(0)})};b=function(a){return window.btoa(String.fromCharCode.apply(null,new Uint8Array(a)))};f.base64ToUint8Array=a;f.arrayBufferToBase64=b}),66); __d("OzWidevineDrmProvider",["ConstUriUtils","FBLogger","oz-player/drm/OzDrmUtils"],(function(a,b,c,d,e,f,g){"use strict";a=function(){function a(a,b,e,f,g){this.$2=[];this.$4=!0;this.$5=!1;g!=null&&g!==""&&(this.$1=d("oz-player/drm/OzDrmUtils").base64ToUint8Array(g));if(b!=null&&f!=null){b=(g=d("ConstUriUtils").getUri(b))==null?void 0:g.addQueryParam("access_token",f);if(b==null)throw c("FBLogger")("comet_video_player").mustfixThrow("Invalid Graph API license uri for video: %s",a);this.$3=b.toString();this.$5=!0;this.$4=!1}else{g=e["0"];if(g==null){g="/video/drm/getlicense";b=(f=d("ConstUriUtils").getUri(g))==null?void 0:f.addQueryParam("video_id",a);if(b==null)throw c("FBLogger")("comet_video_player").mustfixThrow("Invalid server license uri for video: %s",a);this.$3=b.toString()}else this.$3=g}}var b=a.prototype;b.getKeySystem=function(){return"com.widevine.alpha"};b.getSchemeId=function(){return"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed"};b.getInitDatas=function(){return this.$2};b.setInitDatas=function(a){this.$2=a};b.getRequireDistinctiveIdentifier=function(){return"optional"};b.getRequirePersistentState=function(){return"optional"};b.getInitDataTypes=function(){return};b.getDrmSessionTypes=function(){return["temporary"]};b.getAudioRobustness=function(){return""};b.getVideoRobustness=function(){return""};b.getServerCertificate=function(){return this.$1};b.getLicenseRequestInfo=function(a){var b={url:this.$3,method:"POST",body:"",headers:{},credentials:void 0};this.$4&&(b.credentials="include");a=d("oz-player/drm/OzDrmUtils").arrayBufferToBase64(a);if(this.$5){var c={request:a};b.body=JSON.stringify(c);b.headers["Content-Type"]="application/json"}else b.body=a,b.headers["Content-Type"]="application/text";return b};b.parseLicenseResponse=function(a){a=String.fromCharCode.apply(null,a);var b;try{b=JSON.parse(a)}catch(a){b=void 0}var c;if(b!==void 0&&b.data!==void 0&&b.data.length===1){b=b.data[0];b.error!==null&&b.error!==void 0||(c=b.license)}else c=a;return c!==void 0&&c!==null&&c!==""?d("oz-player/drm/OzDrmUtils").base64ToUint8Array(c):null};return a}();g["default"]=a}),98); __d("OzDOMEventListenerImpl",["cr:1351686"],(function(a,b,c,d,e,f,g){"use strict";a={listenDOMEvent:b("cr:1351686").listen,captureDOMEvent:b("cr:1351686").capture,suppressDOMEvent:b("cr:1351686").suppress};c=a;g["default"]=c}),98); __d("oz-player/shims/www/OzDOMEventListenerWWW",["OzDOMEventListenerImpl"],(function(a,b,c,d,e,f){"use strict";a=b("OzDOMEventListenerImpl");f["default"]=a}),66); __d("oz-player/shims/OzDOMEventListener",["oz-player/shims/www/OzDOMEventListenerWWW"],(function(a,b,c,d,e,f,g){"use strict";g["default"]=c("oz-player/shims/www/OzDOMEventListenerWWW")}),98); __d("oz-player/shims/www/OzSubscriptionsHandlerWWW",["SubscriptionsHandler"],(function(a,b,c,d,e,f,g){"use strict";g["default"]=c("SubscriptionsHandler")}),98); __d("oz-player/shims/OzSubscriptionsHandler",["oz-player/shims/www/OzSubscriptionsHandlerWWW"],(function(a,b,c,d,e,f,g){"use strict";g["default"]=c("oz-player/shims/www/OzSubscriptionsHandlerWWW")}),98); __d("oz-player/shims/www/ozThrottleWWW",["throttle"],(function(a,b,c,d,e,f,g){"use strict";g["default"]=c("throttle")}),98); __d("oz-player/shims/ozThrottle",["oz-player/shims/www/ozThrottleWWW"],(function(a,b,c,d,e,f,g){"use strict";g["default"]=c("oz-player/shims/www/ozThrottleWWW")}),98); __d("oz-player/strategies/OzBufferingDetectorStates",["oz-player/utils/OzBufferingUtils"],(function(a,b,c,d,e,f,g){"use strict";var h=function(){function a(a,b,c){this.$1=a,this.$2=b,this.$3=c}var b=a.prototype;b.handleEvent=function(a,b,c){if(a.type==="pause"||b.paused)return new i(this.$1,this.$2);a=this.$3 instanceof j?this.$1.getInPlayBufferOverflowTarget():this.$1.getStartBufferUnderflowTarget();return d("oz-player/utils/OzBufferingUtils").hasEnoughBuffer(b,a,c)?new j(this.$1,this.$2):this};return a}(),i=function(){function a(a,b){this.$1=a,this.$2=b}var b=a.prototype;b.handleEvent=function(a,b,c){return a.type==="play"||a.type==="playing"||!b.paused?d("oz-player/utils/OzBufferingUtils").hasEnoughBuffer(b,this.$1.getStartBufferUnderflowTarget(),c)?new j(this.$1,this.$2):new h(this.$1,this.$2,this):this};return a}(),j=function(){function a(a,b){this.$1=a,this.$2=b,this.$3=b.getString("stream_types_eligible_for_partial_playback","").split(",")}var b=a.prototype;b.handleEvent=function(a,b,c,e){e===void 0&&(e=new Map());if(a.type==="pause"||b.paused)return new i(this.$1,this.$2);return this.$2.getBool("buffer_when_waiting",!1)&&a.type==="waiting"||!d("oz-player/utils/OzBufferingUtils").hasEnoughBuffer(b,this.$1.getInPlayBufferUnderflowTarget(),c)&&!this.$4(a,b.currentTime,e)?new h(this.$1,this.$2,this):this};b.$4=function(a,b,c){return this.$2.getBool("buffer_when_waiting_in_partial_buffer",!1)&&a.type==="waiting"?!1:d("oz-player/utils/OzBufferingUtils").hasEnoughPartialBuffer(b,c,this.$3,this.$2.getNumber("partial_playback_buffer_overflow",0))};return a}();g.OzVideoBufferingState=h;g.OzVideoPausedState=i;g.OzVideoPlayingState=j}),98); __d("oz-player/strategies/OzBufferingStateThresholdManager",["oz-player/shims/OzPerformance","oz-player/utils/OzBufferingUtils"],(function(a,b,c,d,e,f,g){"use strict";a=function(){function a(a){this.$2=!1,this.$3=-Infinity,this.$4=-Infinity,this.$1=a}var b=a.prototype;b.getInPlayBufferUnderflowTarget=function(){return this.$1.getNumber("in_play_buffer_underflow_target",d("oz-player/utils/OzBufferingUtils").BUFFER_UNDERFLOW_THRESHOLD)};b.getInPlayBufferOverflowTarget=function(){if(this.$5())return this.$1.getNumber("stream_interrupt_in_play_buffer_overflow_target",d("oz-player/utils/OzBufferingUtils").BUFFER_UNDERFLOW_THRESHOLD);return c("oz-player/shims/OzPerformance").now()-this.$40?b/1e3*-1:a.getNumber("live_initial_playback_position",0)}function n(a,b,c){return b>0&&c>0?(b+c)/1e3:a.getNumber("livehead_fall_behind_block_threshold",0)}function o(a,b){return b>0?b/2/1e3:a.getNumber("live_time_range_block_margin",0)}function p(){return function(a,b,d,e,f,g,h,i){return a.getLegacyConfig().getBool("use_systemic_risk_abr",!1)?new(c("OzSystemicRiskABRManager"))(a,b,d,e,f,g,h,i):null}}function q(a){return j!==null&&j!==void 0&&j!==""&&k!==null&&k!==void 0&&k!==""?{paramName:j,paramValue:k}:null}function r(a){return l!==null&&l!==void 0&&l!==""?l+c("guid")():null}function s(a,b){var d=b.experimentationConfig,e=b.getCurrentVideoRepresentation,f=b.getOzCDNSignedQueryParams,g=b.playbackIsLiveStreaming,h=b.playbackSessionId;b=b.shouldRefresh403;var i=a.getQueryData(),j;if(g){j={};var k=m(a);k!==null&&k!==""&&(j=babelHelpers["extends"]({},j,{os_param:k}));if(a.getPath().includes(".m4v")){k=q(a);if(k!==null&&k&&k.paramName!==""&&k.paramValue!==""){var l;j=babelHelpers["extends"]({},j,(l={},l[k.paramName]=k.paramValue,l))}k=r(a);k!==null&&k!==""&&(j=babelHelpers["extends"]({},j,{_nc_rnd:k}));d.getBool("live_video_send_player_id_in_requests",!1)&&(j=babelHelpers["extends"]({},j,{_nc_psid:h}));if(d.getBool("server_side_abr_send_client_estimates",!1)){l=c("oz-player/networks/OzBandwidthEstimator").getBandwidthDiagnostics(d);l&&(j=babelHelpers["extends"]({},j,{_nc_bwe:String(l.bandwidthEstimate),_nc_bwe_std:String(l.bandwidthStandardDeviation),_nc_ttfb:String(l.timeToFirstByteMsEstimate),_nc_ttfb_std:String(l.timeToFirstByteMsStandardDeviation)}));k=e();k&&(j=babelHelpers["extends"]({},j,{_nc_abr_bitrate:String(k.getBandwidth()),_nc_abr_qlabel:k.getQualityLabel()}))}}c("gkx")("2047")&&(j=babelHelpers["extends"]({},j,{_nc_wclk_ms:String(Date.now())}))}g&&c("gkx")("1998922")&&(j=babelHelpers["extends"]({},j,{_nc_nc:"1"}));c("gkx")("1836350")&&(i.uss!=null&&i.odm!=null&&(j=babelHelpers["extends"]({},j,{manual_redirect:"1"})));if(b){h=f();if(h!=null){d=a.getDomain()+a.getPath();l=h.get(d);if(l!=null)for(var n in l){j=babelHelpers["extends"]({},j,(e={},e[n]=l[n],e))}}}return j}g.getOsParamValue=m;g.checkShouldIncludeCredentials=a;g.createOzBufferingDetector=b;g.createOzDrmProviders=d;g.createOzPerfLoggerProviders=e;g.calculateInitialPlaybackPositionForDynamicMpd=f;g.calculateLiveheadFallBehindBlockThreshold=n;g.calculateLiveheadFallBehindBlockMargin=o;g.getVideoAbrManagerFactory=p;g.getTestQueryParam=q;g.getTestRndQueryParamValue=r;g.getCustomRequestParametersForURI=s}),98); __d("OzMinimumSmallestDimensionRestriction",[],(function(a,b,c,d,e,f){"use strict";a=function(){function a(a){this.$1=a}var b=a.prototype;b.applyRestriction=function(a,b){var c=this;if(a.length===0)return[];b=a.filter(function(a){var b=a.getWidth();a=a.getHeight();b=b=c.$1});return b.length>0?b:[a[a.length-1]]};return a}();f["default"]=a}),66); __d("OzMosThresholdRestriction",["MosUtils"],(function(a,b,c,d,e,f,g){"use strict";a=function(){function a(a){this.$3=new Map(),this.$4=a,this.$1=a.getNumber("mos_upper_threshold",0),this.$2=a.getNumber("mos_lower_threshold",0)}var b=a.prototype;b.$5=function(){return this.$4.getBool("cache_mos_threshold",!1)?{mosUpperThreshold:this.$1,mosLowerThreshold:this.$2}:{mosUpperThreshold:this.$4.getNumber("mos_upper_threshold",0),mosLowerThreshold:this.$4.getNumber("mos_lower_threshold",0)}};b.$6=function(a,b){var c=null;if(this.$3.get(a))c=this.$3.get(a);else{var e=a.getCustomField("playbackResolutionMos");e!=null&&(c=d("MosUtils").parsePlaybackMos(String(e)),c&&this.$3.set(a,c))}return c!=null?d("MosUtils").getMosValue(c,d("MosUtils").getQualityLabel(b.width,b.height)):null};b.$7=function(a,b){var c=this,d=null,e=this.$5(),f=e.mosUpperThreshold;a.forEach(function(a){a=c.$6(a,b);a!=null&&a>f&&(d==null||d>a)&&(d=a)});return d==null?a:a.filter(function(a){a=c.$6(a,b);return a==null?!0:a<=f||a===d})};b.$8=function(a,b){var c=this,d=[],e=this.$5(),f=e.mosLowerThreshold;a.forEach(function(a){var e=c.$6(a,b);e!=null&&e>f&&d.push(a)});d.length===0&&d.push(a[a.length-1]);return d};b.applyRestriction=function(a,b){if(a.length===0)return[];a=a;var c=this.$5(),d=c.mosLowerThreshold;c=c.mosUpperThreshold;c>0&&(a=this.$7(a,b));d>0&&(a=this.$8(a,b));return a};return a}();g["default"]=a}),98); __d("getOzPlaybackRestrictions",["OzMinimumSmallestDimensionRestriction","OzMosThresholdRestriction","gkx"],(function(a,b,c,d,e,f,g){"use strict";var h=720,i=2160;function a(a,b){var d=[];switch(a){case"HD":d.push(new(c("OzMinimumSmallestDimensionRestriction"))(h));break;case"UHD":c("gkx")("1488288")&&d.push(new(c("OzMinimumSmallestDimensionRestriction"))(i));break;default:break}a=b.getNumber("mos_upper_threshold",0);var e=b.getNumber("mos_lower_threshold",0);(a>0||e>0)&&d.push(new(c("OzMosThresholdRestriction"))(b));return d}g["default"]=a}),98); __d("oz-player/configs/OzPlayerConfigDefaults",[],(function(a,b,c,d,e,f){a={abort_clear_video_node_on_detach:!1,abr_use_download_time:!1,accept_external_buffering_detector:!0,allow_queueing_end_of_stream_when_update:!1,always_use_current_time_in_playback_state:!0,append_retry_quota_exceeded_error:!0,async_clear_on_quality_upgrade:!1,bandwidth_ignore_on_stream_write_samples:!1,bandwidth_use_chunk_response_size:!1,bandwidth_use_response_time_adjustment:!1,buffer_when_waiting:!1,buffer_when_waiting_in_partial_buffer:!0,call_end_of_stream_in_quick_starter:!0,catchup_use_timeline_range_end_time_as_end:!1,check_buffer_range_once_for_playhead_update:!1,check_mediasource_readystate_before_end_of_stream:!0,cleanup_video_node_on_destroy:!0,clear_buffer_on_quota_exceeded_error:!0,clear_buffer_on_seek_into_unbuffered_range:!0,clear_sbm_buffer_on_byte_threshold:!1,convert_dom_exception_to_oz_error:!0,copy_new_manifest:!0,create_new_media_source_on_node_reset:!1,debug_live_replay:!1,delay_stream_end_for_sourceended:!0,detach_media_source_manager:!0,disable_audio_scheduler:!1,download_cursor_1st_run_2_fallback:!1,download_cursor_1st_run_set_skipped_segment_on:!0,download_cursor_disable_buffer_ahead_rule_on:!0,dvl_update_interval_reset_on_err:!0,emit_destroyed_after_media_keys_clear:!1,enable_abr_for_first_request:!1,enable_adaptation:!0,enable_appends_on_wait_update_end_failure:!1,enable_dvl:!0,enable_immediate_down_switch:!1,enable_network_manager_error:!1,estimate_video_bandwidth_only:!0,exclude_prefetch_bandwidth_samples:!0,fallback_on_append_error:!1,fix_buffer_ahead_priority_strategy:!0,fix_initial_segment_non_zero_start_time:!0,fix_operation_deferred_promise_lifecycle:!1,fix_quick_starter_overhead:!0,fix_seek_performance:!1,fix_segment_updated_subscription_leak:!0,fix_setup_video_duration_on_representation_switch:!0,fix_template_duration_artifact_in_manifest:!0,generate_mos_segment_buffer_diff:!1,get_fetch_body_text_when_response_not_ok:!0,get_mpd_least_last_time_range:!0,handle_buffered_timerange_update_on_ratechange:!1,handle_invalid_webm_duration:!1,handle_mpd_retries_outside_oz_mpd_updater:!0,ignore_reset_after_seek_if_bufferahead:!1,ignore_reset_after_seek_if_bufferahead_liverewind:!1,ignore_restrictions_when_all_representations_restricted:!1,ignore_time_to_response_start:!1,latencymanager_stalempd_edgelatency_sec_on:!1,latencymanager_stalled_edgelatency_sec_on:!1,lazy_parse_sidx:!1,listen_for_canplay_in_buffering_detector:!0,live_audio_ibr:!0,live_catch_up_only_when_paused:!1,live_disable_mpd_updates_when_paused:!0,live_gracefully_handle_410:!0,live_gracefully_handle_mpd_errors:!0,live_gracefully_handle_no_network:!0,live_no_segment_when_playhead_is_before_first_segment:!0,live_playhead_catch_up:!1,live_query_time_in_range:!0,load_video_node_on_unload:!0,log_appended_segment_info:!1,log_extra_events:!1,mpd_update_cancel_current_request_tracker:!0,ms_promise_for_null:!1,no_representation_error_detailed_message:!0,null_segment_for_no_buffer_target:!0,numerical_range_utils_is_after_range_exclusive:!0,overwrite_video_current_time_property:!0,pausable_stream_throws_error_when_aborted:!0,pdash_download_cursor_catchup_skip_totalbufer:!0,pdash_download_cursor_nocatchup_use_currentbuffer:!1,pdash_download_cursor_use_totalbuffer:!0,pdash_use_pdash_segmentlocator:!1,pdash_wait_on_mpd_refresh_when_error:!0,playback_speed_latency_adjustment_user_rate_disable:!0,player_emit_mpdparsed_early:!1,playhead_manager_buffered_timerange_update_on_timeupdate:!1,playhead_manager_buffer_gaps_skip_reverse:!1,playhead_manager_clamp_initial_playback_position:!1,playhead_manager_handle_buffered_timerange_update_on_timeupdate:!0,playhead_manager_handle_timerange_update_on_timeupdate:!0,playhead_manager_handle_time_range_update_on_waiting:!1,prevent_multiple_successive_representation_switch:!0,prevent_unnecessary_seek_stream_anchor_reset:!0,proceed_on_representation_change_in_init_append_fail:!0,remove_src_attr_on_unload:!0,reset_catchup_timeout_after_play_sec_on_overwrite:!0,respect_initial_representation_on_setup:!1,restart_media_streams_on_stream_resumed:!1,retry_fetch_on_prefetch_error:!1,retry_video_element_error:!0,revoke_object_url_on_detach:!1,sbm_abort_on_append_new_readable_stream:!1,sbm_recursively_waits_for_update_end:!1,sbm_wait_for_abort_on_reject:!1,sbm_waits_for_update_end:!0,seek_ahead_use_native_current_time:!0,seek_to_start_quick_starter:!0,segment_end_410_response:!0,set_source_buffer_append_window_end:!1,should_check_that_source_buffer_attached:!1,sidx_parser_memory_optimization:!1,skip_playhead_adjustment_before_initial_playback_position:!1,skip_timerange_gaps:!0,skip_videobuffer_gaps:!1,skip_videobuffer_gaps_on_buffer_updated:!0,stable_buffered_timeranges_in_observedsourcebufferstate:!0,stop_loop_driver_immediately_on_cleanup:!0,stop_manifest_update_when_static:!0,streaming_task_reject_current_stream_deferred:!0,stream_interrupted_fuzzy_equals:!1,stub_safari_source_buffer_abort:!1,suppress_playing_event_while_buffering:!1,throw_cancel_operation_abort_failed:!1,throw_error_on_clear_buffer_on_seek_failed:!0,throw_network_error_during_stream:!1,throw_no_license_error:!0,throw_on_non_zero_r_d_mismatch:!0,touch_cb_key:!1,treat_inline_mpd_xml_empty_string_as_null:!1,update_bandwidth_cache_on_sample:!1,update_duration_when_init_appended:!0,update_live_video_config_on_representation_switch:!0,update_media_source_duration:!0,use_abr_for_missing_default_representation:!0,use_buffering_detector_for_playhead_interruption:!0,use_ending_duration_for_gop_multiplier:!0,use_live_latency_manager:!1,use_loose_manifest_updates:!1,use_performance_entry_on_stream_close:!1,use_scf_timebased_segments:!1,use_scheduler:!0,use_sc_timebased_segments:!1,use_segment_request_cache:!1,use_simple_moving_average_estimator:!1,use_stream_end_time_in_segment_locator:!1,use_strict_resolution_constraint:!1,use_templated_pdash_segments:!0,use_ttfb_from_headers:!1,vtt_caption_representation:!1,xmlparser_use_domparser:!0};b={abr_confidence_threshold:.9,abr_eval_buffer_threshold:0,abr_min_bandwidth_samples:0,abr_prevent_down_switch_buffer_threshold:11,abr_restrict_from_index:0,abr_restrict_to_index:0,append_byte_target_without_range:1e5,appends_per_segment:6,audio_byte_threshold_to_clear_buffer:0,auto_seek_playhead_slack:.5,bandwidth_boundary_standard_deviation_factor:1,bandwidth_estimator_half_life:6,bandwidth_estimator_outlier_exclusion_factor:50,bandwidth_estimator_std_dev_penalty_factor:0,bandwidth_estimator_variance_penalty_down_factor:0,bandwidth_estimator_variance_penalty_half_life:0,bandwidth_estimator_variance_penalty_up_factor:0,bandwidth_penalty_additional_video_start:0,bandwidth_penalty_per_additional_video:0,bandwidth_response_time_handicap:0,bandwidth_ttfb_samples_to_save:5,buffer_ahead_target:22,buffer_target_constraint_append_succeeded_reward:.2,buffer_target_constraint_minimum_sec:2,buffer_target_constraint_quota_exceeded_penalty:.3,byte_count_per_sample:2e5,catchup_timeout_after_buffering_sec:0,catchup_timeout_after_play_sec:0,clear_buffer_on_seek_epsilon_s:0,clear_buffer_on_seek_nudge_s:0,default_bandwidth_estimate:1e6,download_time_buffer_delta_penalty_factor:0,dvl_initial_segment_ignore_count:1,dvl_update_interval_ms:0,dynamic_mpd_initial_playback_position_offset_modifier:4,initial_manifest_request_retry_count:3,initial_switch_interval:0,in_play_buffer_overflow_target:1,in_play_buffer_underflow_target:.1,latencymanager_stalempd_edgelatency_sec:0,latencymanager_stalled_edgelatency_sec:0,live_audio_ibr_bandwidth_percentage:.05,live_catch_up_fall_behind_threshold:20,live_catch_up_live_head_delta:6,live_max_try_attempts_on_404:2,live_numerical_error_epsilon:1e-4,loop_body_handle_error_interval_ms:1,low_buffer_bandwidth_target_increase_factor:0,low_buffer_bandwidth_target_threshold:10,low_segment_stream_playhead_threshold:0,manifest_update_frequency_ms:0,max_bandwidth_sample_count:30,maximum_bandwidth_sample_bandwidth:1e8,max_start_eme_attempts:3,min_buffer_behind_playhead:10,min_eval_interval:100,minimum_bandwidth_sample_duration:10,minimum_bytes_to_sample_on_close:25e3,minimum_download_additional_buffer_ms:0,min_switch_interval:100,mpd_updater_network_request_timeout_ms:2e4,ms_promise_for_null_ms:0,network_seg_timeout_ms:0,overwrite_livehead_fall_behind_block_threshold:0,overwrite_live_time_range_block_margin:0,partial_playback_buffer_overflow:.75,paused_stream_segments_count:2,pdash_download_cursor_between_catchups_seg:0,pdash_download_cursor_catchup_threshold_gop_multiplier:0,pdash_download_cursor_catchup_threshold_sec:0,pdash_download_cursor_catchup_tolerance_sec:0,per_stream_duration_target:0,pixels_above_viewport_to_observe:0,pixels_below_viewport_to_observe:0,playback_speed_enabled_delay_sec:4,playback_speed_latency_adjustment_rate:0,playback_speed_latency_slowdown_adjustment_rate:0,playback_speed_latency_speedup_adjustment_rate:0,playback_speed_min_buffer_sec:1,playback_speed_min_duration_sec:2,playback_speed_min_sharpness_factor:3,playback_speed_restore_min_duration_sec:1,playhead_manager_buffered_auto_seek_playhead_slack:.5,playhead_manager_buffered_is_near_gap_threshold:1.5,playhead_manager_buffered_numerical_error:.01,playhead_manager_timeupdate_throttle_ms:1e3,playhead_nudge_slack:.1,pre_start_buffer_ahead_target:16.924449682236,prioritize_by_viewport_static_penalty:0,recent_buffer_in_play_buffer_overflow_target:3,recent_buffer_timeout_ms:1e4,resolution_constraint_factor:2,sbm_read_timeout_ms:0,seconds_to_stream:10,seconds_to_stream_near_bandwidth_boundary:10,seek_ahead_epsilon:.05,segments_to_stream:5,segments_to_stream_near_bandwidth_boundary:5,segments_to_stream_under_playhead_threshold:0,skip_videobuffer_gaps_max_gap_size_sec:0,stale_mpd_buffer_ahead_target:0,start_buffer_underflow_target:.1,steady_state_measurement_duration_ms:0,steady_state_min_buffer_duration_sec:0,steady_state_target_latency_sec:0,stream_interrupt_buffer_target_timeout_ms:1e4,stream_interrupt_check_mpd_stale_count_threshold:3,stream_interrupt_in_play_buffer_overflow_target:1,tagged_time_range_per_append_throttle:0,timeline_offset_threshold:10,time_to_first_byte_estimate_half_life_ms:500,time_to_first_byte_ignore_above_threshold_ms:0,video_byte_threshold_to_clear_buffer:0};c={block_representation_status_codes_json:"[500]",block_representation_status_codes_temporarily_json:"{}",cdn_experiment_id:"",stream_types_eligible_for_partial_playback:""};e.exports={defaultBools:a,defaultNumbers:b,defaultStrings:c}}),null); __d("oz-player/configs/OzPlayerConfig",["oz-player/configs/OzPlayerConfigDefaults"],(function(a,b,c,d,e,f,g){"use strict";a=function(){function a(a){a===void 0&&(a={}),this.$1=a}var b=a.prototype;b.getBool=function(a){return typeof this.$1[a]==="boolean"?this.$1[a]:d("oz-player/configs/OzPlayerConfigDefaults").defaultBools[a]};b.getNumber=function(a){return typeof this.$1[a]==="number"?this.$1[a]:d("oz-player/configs/OzPlayerConfigDefaults").defaultNumbers[a]};b.getString=function(a){return typeof this.$1[a]==="string"?this.$1[a]:d("oz-player/configs/OzPlayerConfigDefaults").defaultStrings[a]};b.getLegacyConfig=function(){var a=this;return{getBool:function(b,c){return typeof a.$1[b]==="boolean"?a.$1[b]:(b=d("oz-player/configs/OzPlayerConfigDefaults").defaultBools[b])!=null?b:c},getNumber:function(b,c){return typeof a.$1[b]==="number"?a.$1[b]:(b=d("oz-player/configs/OzPlayerConfigDefaults").defaultNumbers[b])!=null?b:c},getString:function(b,c){return typeof a.$1[b]==="string"?a.$1[b]:(b=d("oz-player/configs/OzPlayerConfigDefaults").defaultStrings[b])!=null?b:c}}};return a}();g["default"]=a}),98); __d("oz-player/configs/OzConfigUtils",["oz-player/configs/OzPlayerConfig"],(function(a,b,c,d,e,f,g){"use strict";var h=new(c("oz-player/configs/OzPlayerConfig"))();a=function(a){return{getBool:function(b){return a.getBool(b,h.getBool(b))},getNumber:function(b){return a.getNumber(b,h.getNumber(b))},getString:function(b){return a.getString(b,h.getString(b))},getLegacyConfig:function(){return a}}};g.provideConfigWithDefaults=a}),98); __d("VideoPlayerOzImplementationEnginePartsImplFunction",["CometThrottle","ConstUriUtils","NetworkStatus","OzActiveActiveFailoverNetworkRequestStreamHandler","OzCDNSignedQueryParams","OzCustomParsers","OzCustomRepresentationParsers","OzDashPrefetchCache","OzOneSemanticHandler","OzOneSemanticHandlerUtils","OzPredictedSegmentTimelineParser","OzVideoLiveTraceNetworkRequestStreamHandler","Promise","TimeRanges","VideoPlayerConnectionQuality","VideoPlayerImplementationErrors","VideoPlayerOzImplementationEnginePartsImplUtils","cr:1836099","cr:1871597","cr:1947728","cr:1993377","cr:4686","cr:9958","getOzPlaybackRestrictions","gkx","orEmptyArray","oz-player/configs/OzConfigUtils","oz-player/networks/OzBandwidthEstimator","unrecoverableViolation"],(function(a,b,c,d,e,f,g){"use strict";var h=null,i=null;b("cr:1836099")&&(h=b("cr:1836099").getHiveConfig(),i=b("cr:1836099").HiveOz);function a(a){var e=a.OzPlayerClass,f=a.callChain,g=a.destroyOzPlayerPartsRef,j=a.engineDebugAPI,k=a.engineExtrasAPI,l=a.getCaptionsInfo,m=a.getLatencyLevelManager,n=a.getOzQuickStarter,o=a.getVideoLiveTrace,p=a.handleCaptionsInfoChange,q=a.handleFatalImplementationError,r=a.hivePluginRef,s=a.initialProps,t=a.logger,u=a.machine,v=a.overrideOzRequestImplementationRef,w=a.ozBufferingDetectorRef,x=a.ozPlayerRef,y=a.p2pSessionLoggerRef,z=a.playerVersion,A=a.resolvedVideoInfo,B=a.videoElement;a=a.videoElementAPI;var C={current:0},D={current:!1},E={current:null},F={current:null};g.current=function(a){var b=w.current;b&&(w.current=null,b.destroy());b=x.current;b&&(j&&j.handleOzPlayerChanged(null),x.current=null,b.destroy([].concat(a,["destroyOzPlayerParts"]).join(":")));b=E.current;b&&(E.current=null,b());F.current&&(F.current=null);$();r.current&&(r.current=null);y.current&&(y.current=null);v.current&&(v.current=null)};g=A.accessToken;var G=A.audioOnly,H=A.experimentationConfig,I=A.graphQLVideoDRMInfo,J=A.graphQLVideoP2PSettings,K=A.manifestUrl,L=A.manifestXmlStringResolved,aa=A.minQualityPreference,M=A.videoFBID,N=null;H.getBool("use_prefetch_cache",!1)&&(b("cr:4686")&&M!=null?N=b("cr:4686").get(M):N=new(c("OzDashPrefetchCache"))());var O=s.disableLogging?null:A.VideoPlayerShakaPerformanceLoggerClass;n=n();var P=Boolean(s.loggingMetaData.coreVideoPlayerMetaData.isLiveStreaming),Q=function(a){return k.getEstimatedBandwidth()},R=function(){return k.getApproximateFBLSToPlayerDisplayLatency()},ba=function(){H.setContext("connection_quality",d("VideoPlayerConnectionQuality").evaluate(function(){return Q(P)}))},S=function(){var a=H.getNumber("connection_quality_context_throttle_frequency",0);if(a===0)return null;var b=c("CometThrottle")(ba,a),d=c("oz-player/networks/OzBandwidthEstimator").addListener("bandwidth_sampled",b);return function(){d.remove(),b.cancel()}};E.current=S();S=d("VideoPlayerOzImplementationEnginePartsImplUtils").createOzDrmProviders({accessToken:g,graphQLVideoDRMInfo:I,videoFBID:M});I=function(){return u.getCurrentState().controlledState.dimensions};var T=function(){return u.getCurrentState().controlledState.playerFormat};g=d("VideoPlayerOzImplementationEnginePartsImplUtils").createOzPerfLoggerProviders({VideoPlayerShakaPerformanceLoggerClass:O,accessToken:g,disableLogging:s.disableLogging,getApproximateFBLSToPlayerDisplayLatency:R,getBandwidthEstimate:Q,getPlayerDimensions:I,getPlayerFormat:T,playbackIsLiveStreaming:P,playerInstanceCount:s.loggingMetaData.playerImplementationInstanceCountRef.current,playerInstanceKey:s.loggingMetaData.instanceKey,playerSuborigin:s.loggingMetaData.coreVideoPlayerMetaData.subOrigin,playerVersion:z,videoElement:B,videoFBID:M,videoPlayerShakaPerformanceLoggerBuilder:A.videoPlayerShakaPerformanceLoggerBuilder});F.current==null&&(F.current=new(c("OzCDNSignedQueryParams"))());if(J&&M!=null){R=J.config;T=J.hive_initialization_options;A=y.current=(z=y.current)!=null?z:b("cr:1871597")?new(b("cr:1871597"))(M):null;try{if(!r.current){A&&A.logEnableP2P();z=function(a){y.current&&y.current.logHiveError(a)};M=function(b){var a=x.current;a&&a.injectExternalDebugEvent("P2PTech",b.tech);y.current&&y.current.logSessionActive(b.tech)};var U=function(b){var a=x.current;a&&a.injectExternalDebugEvent("P2PStats",b);y.current&&y.current.setCurrentHiveStats(b)},V=function(a){a=a.state;var b=u.getCurrentState();b=b.controlledState;b=b.playbackState;r.current&&a==="CLOSED"&&($(),Y&&b!=="ended"&&(D.current&&K!=null?Y.updatePlayerRunTimeConfig({manifestUrl:K}):Y.load(K)))};U={HiveJS:{maximumTrimming:{dash:void 0,hls:void 0},renderStatsCallback:U},HiveJava:{},debugLevel:"off",hiveTechOrder:["HiveJS","StatsJS","HiveJava"],onActiveSession:M,onError:z,onSessionStateChange:V,telemetryId:A?A.getSessionID():0};M=H.getNumber("hive_maximum_trimming_seconds",0);M>0&&(U.HiveJS.maximumTrimming={dash:M,hls:M});if(T){z=T.HiveJava;V=T.debugLevel;M=T.hiveTechOrder;U.hiveTechOrder=M.slice();U.HiveJava=z?{minVersion:z.minVersion}:{};U.debugLevel=(T=V)!=null?T:U.debugLevel}c("gkx")("2047688")&&(U=babelHelpers["extends"]({},U,{testId:"fb_video_player_p2p_jest_e2e"}));if(R.disable_hivejava_for_livevc===!0&&K!=null&&K.startsWith("https://livestream-lookaside")){M=U.hiveTechOrder.indexOf("HiveJava");M>=0&&U.hiveTechOrder.splice(M,1)}if(h)h.SensitiveInfo.restrictedConnectivityInfo=!0;else throw c("unrecoverableViolation")("HiveConfig does not exist","comet_video_player");if(i)r.current=new i(U);else throw c("unrecoverableViolation")("HiveOz does not exist","comet_video_player");if(r.current){if(!b("cr:1947728"))throw c("unrecoverableViolation")("OzConfigurableRequestImplementation does not exist","comet_video_player");v.current=b("cr:1947728")(r.current.getRequestImplementation(),{inferResponseStatusIsOK:c("gkx")("3951"),inferResponseStatusIsOk2xx:c("gkx")("277")})}}}catch(a){A&&A.logError(a),$()}}z=[new(c("OzVideoLiveTraceNetworkRequestStreamHandler"))(function(a,b,c){var d=o();d!=null&&d.handleHeadersAndBody(a,b,c)},H.getBool("live_trace_parse_emsg",!1))];c("OzActiveActiveFailoverNetworkRequestStreamHandler")&&z.push(new(c("OzActiveActiveFailoverNetworkRequestStreamHandler"))(function(a,b){if(c("gkx")("1664503")){var e=x.current,f=a.headers;if(e&&f){f=parseInt(f.get("x-fb-video-replica"),10);t.logVPLEvent({eventType:"replica_switch",logDataOverrides:{error_code:a.status.toString(),error_user_info:JSON.stringify({failover_response_code:a.status.toString(),replica:f,url:b})},state:u.getCurrentState()});a=e.getMpdUrl();if(a!=null){b=d("ConstUriUtils").getUri(a);if(b){a=b.addQueryParam("replica",f);a&&($(),e.updatePlayerRunTimeConfig({manifestUrl:a.toString()}))}}}}}));var W=s.expiredVideoUrlRefreshHandler,ca=s.loggingMetaData.instanceKey;V=c("gkx")("221");T=c("gkx")("1836350")||c("gkx")("1993562");var X=P?V:T;R={audioOnly:(R=G)!=null?R:!1,bufferEndLimit:s.bufferEndLimit!=null?s.bufferEndLimit:null,bufferingDetector:(M=w.current)!=null?M:void 0,config:d("oz-player/configs/OzConfigUtils").provideConfigWithDefaults(H),configureCustomRequestParametersForSegment:function(a){var b=null;if(H.getBool("live_video_send_transaction_id_in_requests",!1)){a=a.getOptions();var c=a.getSegmentRequestTransactionID();c==null&&(c=++C.current,a.setSegmentRequestTransactionID(c));b=(a=b)!=null?a:{};b=babelHelpers["extends"]({},b,{_nc_tsid:c.toString()})}return b},customParsers:d("OzCustomParsers").createOzCustomParser(),customRepresentationParsers:d("OzCustomRepresentationParsers").createOzCustomRepresentationParsers({ozConfig:H}),customSegmentTimelineParser:H.getBool("enable_predictive_dash",!1)?new(c("OzPredictedSegmentTimelineParser"))():void 0,debugCreateInitiator:[].concat(f,["proceedWithOzPlayerCreation"]).join(":"),drmProviders:S,getCustomRequestParametersForURI:function(a){return d("VideoPlayerOzImplementationEnginePartsImplUtils").getCustomRequestParametersForURI(a,{experimentationConfig:H,getCurrentVideoRepresentation:function(){var a=x.current;return a==null?void 0:a.getCurrentVideoRepresentation()},getOzCDNSignedQueryParams:function(){return F.current},playbackIsLiveStreaming:P,playbackSessionId:ca,shouldRefresh403:X})},getOverrideOzRequestImplementation:function(){return v.current},getShouldIncludeCredentials:H.getBool("use_oz_credentials_provider",!1)?d("VideoPlayerOzImplementationEnginePartsImplUtils").checkShouldIncludeCredentials:null,getVideoDimensions:I,initialPlaybackPositionForDynamicMpd:d("VideoPlayerOzImplementationEnginePartsImplUtils").calculateInitialPlaybackPositionForDynamicMpd(H,(U=s.initialDesiredLatencyMs)!=null?U:0),initialRepresentationIDs:c("orEmptyArray")(s.initialRepresentationIds),liveheadFallBehindBlockMargin:d("VideoPlayerOzImplementationEnginePartsImplUtils").calculateLiveheadFallBehindBlockMargin(H,(A=s.initialDesiredLatencyMs)!=null?A:0),liveheadFallBehindBlockThreshold:d("VideoPlayerOzImplementationEnginePartsImplUtils").calculateLiveheadFallBehindBlockThreshold(H,(V=s.initialDesiredLatencyMs)!=null?V:0,(T=s.initialLatencyToleranceMs)!=null?T:0),loggerConfig:{isOzDevConsoleEnabled:c("gkx")("722076"),observedOperationLoggers:n&&O&&O.shouldInitialize()?n.getObservedOperationLoggers():[],perfLoggerProviders:g},mpdUrl:K,networkRequestStreamHandlers:z,networkRequestStreamRetryHandler:X?function(a,d,e){var f=a.headers,g=f==null?void 0:f.get("x-fb-url-refresh"),h=F.current;if(a.status===403&&h!=null){t.logVPLEvent({eventType:"video_cdn_url_expired",logDataOverrides:{error_user_info:JSON.stringify({expired_url:e})},state:u.getCurrentState()});f=null;g!=null&&b("cr:1993377")!=null?f=b("cr:1993377")(g):W!=null&&(f=W(e));if(f!=null)return f.then(function(a){var b;b=(b=a.refreshedUrl)!=null?b:null;a=(a=a.reason)!=null?a:null;if(b!=null){t.logVPLEvent({eventType:"video_cdn_url_refreshed",logDataOverrides:{error_user_info:JSON.stringify({refreshed_url:b})},state:u.getCurrentState()});h.update(b);return d()}else{throw c("unrecoverableViolation")("expiredVideoUrlRefreshHandler refreshed url should not be "+((b==null?void 0:b.length)===0?"an empty string":"null")+", reason: "+((b=a)!=null?b:"null"),"comet_video_player")}})["catch"](function(a){t.logVPLEvent({eventType:"video_cdn_url_refresh_error",logDataOverrides:{error_description:a.message,error_user_info:JSON.stringify({expired_url:e,refresh_url:g})},state:u.getCurrentState()});throw a})}return b("Promise").resolve(a)}:null,prefetchCache:N,rawMpdXml:r.current?void 0:L,seekHandler:c("gkx")("1482680")?function(a){var b=B.currentTime;u.dispatch({payload:{seekSourcePosition:b},type:"implementation_seek_requested"});B.currentTime=a}:null,setCustomFetchStreamLoggingAttributes:function(a,b,e){a.setIsOnline(c("NetworkStatus").isOnline());if(c("gkx")("951")){var f=e==null?void 0:e.headers;if(f)try{a.setProxyStatusHeader(f.get("proxy-status")),a.setDynamicStatusHeader(f.get("x-fb-dynamic-status"))}catch(a){}}d("OzOneSemanticHandlerUtils").setOneSemanticFetchStreamLoggingAttributes(a,b,e)},startTimeStamp:H.getBool("fix_start_timestamp",!1)?s.startTimestamp:0,videoAbrManagerFactory:d("VideoPlayerOzImplementationEnginePartsImplUtils").getVideoAbrManagerFactory(),videoNodeOrQuickStarter:(G=n)!=null?G:B,videoPlaybackRestrictions:c("getOzPlaybackRestrictions")(aa,H)};var Y=new e(R);x.current=Y;w.current&&w.current.attachPerfLoggerProvider(Y.getPerfLoggerProvider());M=s.loggingMetaData.playerImplementationInstanceCountRef;M.current++;Y.onError(function(a){O&&O.flushQueuedLogs(),q(a,"oz_player_error")});Y.addListener("switchVideoRepresentation",function(){u.dispatch({payload:{targetVideoQuality:k.getCurrentTargetVideoQuality()},type:"representation_changed"})});var Z=function(a){if(H.getBool("enable_error_recovery_attempt_logging",!1)){a=d("VideoPlayerImplementationErrors").createVideoPlayerErrorFromOzImplementationError(a,"oz_player_stream_error_retry");u.dispatch({payload:{recoverableError:a},type:"error_recovery_attempt"})}};Y.addListener("manifestFetchError",function(a){d("OzOneSemanticHandler").handleManifestFetchErrorEvent(H,a)});Y.addListener("manifestFetchErrorRetry",function(a){Z(a)});Y.addListener("streamError",function(a){return d("OzOneSemanticHandler").handleStreamErrorEvent(H,a)});Y.addListener("streamErrorRetry",function(a){Z(a)});Y.addListener("streamInterruptAt",function(){u.dispatch({type:"stream_interrupted"})});Y.addListener("streamResumedAt",function(){u.dispatch({type:"stream_resumed"})});Y.addListener("streamEnd",function(){$(),u.dispatch({type:"stream_ended"})});Y.addListener("videoNodeErrorRetry",function(a){if(H.getBool("enable_error_recovery_attempt_logging",!1)){a=d("VideoPlayerImplementationErrors").createVideoPlayerErrorFromVideoNodeError(a,"oz_player_stream_error_retry");u.dispatch({payload:{recoverableError:a},type:"error_recovery_attempt"})}});n==null?(Y.addListener("enterBuffering",function(a){if(c("gkx")("1235655"))return;u.dispatch({payload:{bufferingType:a},type:"buffering_begin_requested"})}),Y.addListener("leaveBuffering",function(){u.dispatch({type:"buffering_end_requested"})})):d("VideoPlayerOzImplementationEnginePartsImplUtils").createOzBufferingDetector(B,a,H,u,w);j&&j.handleOzPlayerChanged(Y);var da=function(){var a=l();a={inbandCaptionsAutogeneratedFromManifest:k.getInbandCaptionsAutogeneratedFromManifest(),inbandCaptionsExpectedFromManifest:k.getInbandCaptionsExpectedFromManifest(),inbandCaptionsExpectedFromProps:a==null?void 0:a.inbandCaptionsExpectedFromProps,representationCaptionsExpectedFromManifest:k.getRepresentationCaptionsExpectedFromManifest(),sideLoadCaptionsExpectedFromProps:a==null?void 0:a.sideLoadCaptionsExpectedFromProps,sideLoadCaptionsUrlFromProps:a==null?void 0:a.sideLoadCaptionsUrlFromProps};var b=u.getCurrentState();b=b.controlledState;(a.inbandCaptionsExpectedFromManifest!==b.captionsLoaded||a.inbandCaptionsAutogeneratedFromManifest!==b.inbandCaptionsAutogenerated)&&p(a)},ea=function(a,b){a=a.getCustomField("timescale");a=typeof a==="number"?a:0;u.dispatch({payload:{timescale:a,videoBytes:b},type:"cea608_bytes_received"})},fa=function(){var a=k.getVideoRepresentations();if(a!=null&&a.length>0){a=a[0].getTimeRanges();if(a!=null&&a.length>0){var b=a[0].startTime;a=Math.max(a[a.length-1].endTime-H.getNumber("live_rewind_seek_to_live_delta",8),b);u.dispatch({payload:{seekableRanges:new(c("TimeRanges"))([{endTime:a,startTime:b}])},type:"seekable_ranges_changed"})}}},ga=function(){var a=Y.getMpd();if(!a)return;a=a.getCustomField("loapStreamType");var b=o();typeof a==="number"&&b!=null&&b.setStreamType(a)},ha=function(a){var d=function(){fa(),da(),ga()};a.addListener("updated",d);c("gkx")("1656434")&&d();a=b("cr:9958")!=null?b("cr:9958")(u):null;Y.updatePlayerRunTimeConfig({audioStreamDataHandler:a,videoStreamDataHandler:ea});if(k.isPredictiveDash()){H.setContext("streaming_implementation","pdash");d=m();d&&d.maybeUpdateLatencyLevel()}a=l();p({inbandCaptionsAutogeneratedFromManifest:k.getInbandCaptionsAutogeneratedFromManifest(),inbandCaptionsExpectedFromManifest:k.getInbandCaptionsExpectedFromManifest(),inbandCaptionsExpectedFromProps:a==null?void 0:a.inbandCaptionsExpectedFromProps,representationCaptionsExpectedFromManifest:k.getRepresentationCaptionsExpectedFromManifest(),sideLoadCaptionsExpectedFromProps:a==null?void 0:a.sideLoadCaptionsExpectedFromProps,sideLoadCaptionsUrlFromProps:a==null?void 0:a.sideLoadCaptionsUrlFromProps})};Y.addListener("vttCaptionsUpdated",function(a){u.dispatch({payload:{activeCaptions:a},type:"controller_set_active_captions_requested"})});Y.addListener("mpdParsed",function(a){k.isPredictiveDash()&&H.setContext("streaming_implementation","pdash")});Y.addListener("mpdReady",function(a){D.current=!0;ha(a);u.dispatch({payload:{availableQualities:k.getAvailableVideoQualities(),selectedVideoQuality:k.getUserSelectedVideoQuality(),targetVideoQuality:k.getCurrentTargetVideoQuality(),videoProjection:(a=k.getVideoProjectionType())!=null?a:null},type:"implementation_engine_initialized"})});Y.addListener("representationBlocked",function(a){u.dispatch({payload:{availableQualities:k.getAvailableVideoQualities(),blockedRepresentationID:a},type:"implementation_engine_representation_blocked"})});function $(){var a=r.current,b=y.current;if(a!=null){r.current=null;y.current=null;v.current=null;try{a&&a.closeHiveSession(),b&&b.logEndSession()}catch(a){b&&b.logHiveError(a)}}}f=r.current;S=J==null?void 0:J.ticket;if(K!=null&&J&&f&&S!=null){I=Y.getPerfLoggerProvider();I&&I.setIsP2pPlayback(!0);U=K.substring(K.indexOf("?"));A=f.initSession(S+U,Y,B);A.then(function(a){var b=a.manifest;a=a.tech;var c=y.current;b!==K&&c&&c.logManifestMismatch(b,K);c&&c.logSessionInit(a,b);t.setAdditionalLogData("is_p2p_playback",!0);Y.load(b)})["catch"](function(a){var b=y.current;b&&b.logError(a);$();Y.load(K)})}else t.setAdditionalLogData("is_p2p_playback",!1),Y.load(K)}g.proceedWithOzPlayerCreation=a}),98); __d("VideoPlayerOzImplementationLatencyLevelManager",[],(function(a,b,c,d,e,f){"use strict";a=function(){function a(a,b){this.$2="normal",this.$4=null,this.$1=a,this.$3=b}var b=a.prototype;b.updatePlayerFormat=function(a){this.$4!==a&&(this.$4=a,this.maybeUpdateLatencyLevel())};b.maybeUpdateLatencyLevel=function(){var a=this.$5();a!==this.$2&&(this.$2=a,this.$3.dispatch({payload:{latencyLevel:a},type:"implementation_set_latency_level_requested"}))};b.$5=function(){var a=[];try{a=JSON.parse(this.$1.getString("player_formats_for_low_latency","[]"))}catch(a){}return a.includes("*")||a.includes(this.$4)?"low":"normal"};return a}();f["default"]=a}),66); __d("VideoPlayerOzQuickStarterUtils",["VideoDashPrefetchCache"],(function(a,b,c,d,e,f,g){"use strict";function h(a,b,d){b=c("VideoDashPrefetchCache").createQueryStringURL(b);b=c("VideoDashPrefetchCache").getCacheValue(b);if(!b){a.push(d);return null}return b}function i(a,b){return a.find(function(a){return a.segmentType===b})}function a(a,b,c){var d=i(b,"init");b=i(b,"data");if(d){var e=h(a,d,c+" init");if(!e)return null;var f;b&&(f=h(a,b,c+" data"));return{initializationPromise:e,mimeCodec:d.mimeCodec,representationID:d.representationID,segmentPromise:f}}return null}g.createPrefetchDataForTrack=a}),98); __d("VideoPlayerOzImplementationEngine",["VideoPlayerImplementationEngineAPI","VideoPlayerImplementationEngineVideoElementAPI","VideoPlayerImplementationErrors","VideoPlayerImplementationLoadSequenceManager","VideoPlayerODS","VideoPlayerOzImplementationEngineExtrasAPI","VideoPlayerOzImplementationEnginePartsImplFunction","VideoPlayerOzImplementationEnginePartsImplUtils","VideoPlayerOzImplementationLatencyLevelManager","VideoPlayerOzQuickStarterUtils","cr:10753","cr:1473549","cr:1494460","cr:1534629","cr:72","emptyFunction","gkx","promiseDone","unrecoverableViolation"],(function(a,b,c,d,e,f,g){"use strict";e=!1;var h=c("emptyFunction");function a(a){var e=a.debugLogId,f=a.handleFatalError,g=a.initialProps;a=a.setExposedStateInReact;var i={current:null},j={current:null},k={current:null},l={current:null},m={current:null},n={current:null},o={current:null},p={current:null},q={current:null},r={current:null},s={current:null},t={current:null},u={current:null},v={current:null};function w(){var a;return(a=p.current)!=null?a:null}function x(){var a;return(a=o.current)!=null?a:null}function y(){return n.current}function z(){var a;return(a=(a=j.current)==null?void 0:a.experimentationConfig)!=null?a:null}function A(){var a;return(a=Y.current)!=null?a:null}function B(){var a;return(a=v.current)!=null?a:null}var C;b("cr:1473549")&&(C=new(b("cr:1473549"))());var D="comet_oz",E=function(a,b){return b.manifestXmlStringInitial!==null?a.manifestXmlStringInitial!==b.manifestXmlStringInitial:a.manifestUrl!==b.manifestUrl},F=function(a,b){return a.videoFBID!==b.videoFBID},G=function(a){return a.getBool("use_full_player_if_cached",!1)&&b("cr:1534629")?b("cr:1534629")().getModuleIfRequireable():null},H=function(a,b,c){b!=null?j.current=babelHelpers["extends"]({},a,{manifestXmlStringResolved:b}):j.current=a,X.dispatch({type:"implementation_engine_oz_manifest_downloading"}),m.current=G(a.experimentationConfig),L(m.current,[].concat(c,["proceedWithOzManifestDownloading"]))},I=function(a){var b,e=a.manifestUrl,f=a.manifest;b={VideoPlayerShakaPerformanceLoggerClass:a.VideoPlayerShakaPerformanceLoggerClass,accessToken:a.loggingMetaData.accessToken,audioOnly:a.audioOnly,experimentationConfig:a.experimentationConfig,graphQLVideoDRMInfo:a.graphQLVideoDRMInfo,graphQLVideoP2PSettings:a.graphQLVideoP2PSettings,manifestUrl:(b=e)!=null?b:null,manifestXmlStringInitial:(b=f)!=null?b:null,minQualityPreference:a.minQualityPreference,ozQuickStarterData:a.ozQuickStarterData,videoFBID:a.videoFBID,videoPlayerShakaPerformanceLoggerBuilder:a.videoPlayerShakaPerformanceLoggerBuilder};var g=i.current;v.current==null&&(v.current=new(c("VideoPlayerOzImplementationLatencyLevelManager"))(a.experimentationConfig,X));a.loggingMetaData.coreVideoPlayerMetaData.playerFormat!=null&&X.dispatch({payload:{playerFormat:a.loggingMetaData.coreVideoPlayerMetaData.playerFormat},type:"controller_set_player_format"});v.current.updatePlayerFormat((a=a.loggingMetaData.coreVideoPlayerMetaData.playerFormat)!=null?a:null);a=!1;if(g==null)a=!0;else if(g!=null&&!F(b,g)&&E(b,g)){var h=14;d("VideoPlayerODS").bumpEntityKey("OzImplementation","manifest_reloaded",h);a=!1}else if(g!=null&&F(b,g))throw c("unrecoverableViolation")("videoFBID changed after player initialization","comet_video_player");if(!a)return!1;e=b.manifestUrl;f=b.manifestXmlStringInitial;if(f==null&&e==null)throw c("unrecoverableViolation")("Empty manifestXmlStringInitial and manifestUrl","comet_video_player");i.current=b;H(b,f,["handleVideoInfoChangeForOzImplementation","downloadManifestInOz"]);return!0},J=function(a,b,e,f,g){var h=function(b){if(l.current!==a)return;m.current=b;L(b,[].concat(g,["handleOzPlayerModuleLoadSuccess"]))},i=function(b){if(l.current!==a)return;V(b,"oz_player_module_load_failed")};l.current=a;var j=f.experimentationConfig,k=f.ozQuickStarterData;if(n.current==null&&b!=null&&f!=null&&(!j.getBool("prevent_unnecessary_quickstarter_instance",!1)||k!=null)){j=new b(e,f.experimentationConfig);c("gkx")("1494163")&&(n.current=j);if(k!=null){b=[];e=d("VideoPlayerOzQuickStarterUtils").createPrefetchDataForTrack(b,k.video,"video");if(e){j.addPrefetchTrack(e);f=d("VideoPlayerOzQuickStarterUtils").createPrefetchDataForTrack(b,k.audio,"audio");f&&j.addPrefetchTrack(f)}}j.addListener("streamEnd",function(){X.dispatch({type:"stream_ended"})});c("gkx")("1494163")||(n.current=j)}c("promiseDone")(a,h,i)},K=function(a){a=d("VideoPlayerImplementationEngineVideoElementAPI").createVideoPlayerImplementationEngineVideoElementAPI(a);Y.current=a;return a},L=function(a,c){var e=S(),f=j.current;if(e==null||f==null)return;var g=K(e),h=f.experimentationConfig;a?M(a,e,g,f,[].concat(c,["proceedWithResolvedVideoInfo","OzPlayerModuleFromRef"])):b("cr:1494460")?M(b("cr:1494460")(),e,g,f,[].concat(c,["proceedWithResolvedVideoInfo","VideoPlayerOzPlayerModuleLoaderSync"])):b("cr:1534629")?(h.getBool("instantiate_buffering_detector_before_quick_starter",!1)&&d("VideoPlayerOzImplementationEnginePartsImplUtils").createOzBufferingDetector(e,g,f.experimentationConfig,X,p),J(b("cr:1534629")().load(),b("cr:10753"),e,f,[].concat(c,["proceedWithResolvedVideoInfo","VideoPlayerOzPlayerModuleLoaderAsync"]))):V(new Error("Neither of OzPlayerModuleLoader is available."),"oz_player_module_loaders_missing")},M=function(a,b,e,f,h){try{var i={OzPlayerClass:a,callChain:[].concat(h,["proceedWithResolvedVideoInfoAndOzPlayerModuleSync"]),destroyOzPlayerPartsRef:u,engineDebugAPI:C,engineExtrasAPI:Q,getCaptionsInfo:R,getLatencyLevelManager:B,getOzQuickStarter:y,getVideoLiveTrace:T,handleCaptionsInfoChange:U,handleFatalImplementationError:V,initialProps:g,logger:W,machine:X,ozBufferingDetectorRef:p,playerVersion:D,resolvedVideoInfo:f,videoElement:b,videoElementAPI:e};a=z();h=g.loadSequence;a&&a.getNumber("load_sequence_max_delay_ms",0)>0&&h!=null?t.current=c("VideoPlayerImplementationLoadSequenceManager").schedule(a,h,function(){d("VideoPlayerOzImplementationEnginePartsImplFunction").proceedWithOzPlayerCreation(babelHelpers["extends"]({},i,{hivePluginRef:q,overrideOzRequestImplementationRef:s,ozPlayerRef:o,p2pSessionLoggerRef:r}));return e.getCanPlayPromise()}):d("VideoPlayerOzImplementationEnginePartsImplFunction").proceedWithOzPlayerCreation(babelHelpers["extends"]({},i,{hivePluginRef:q,overrideOzRequestImplementationRef:s,ozPlayerRef:o,p2pSessionLoggerRef:r}));k.current=f}catch(a){V(a,"oz_player_create_exception")}};function N(a){c("gkx")("1494163")&&(k.current=null);var b=u.current;b!=null&&(u.current=null,b(a));t.current!=null&&(t.current(),t.current=null);b=n.current;b&&(n.current=null);c("gkx")("1494163")&&(n.current=null)}function O(){if(c("gkx")("1494163"))i.current=null,j.current=null,k.current=null;else return}function P(){l.current=null,m.current=null}var Q=d("VideoPlayerOzImplementationEngineExtrasAPI").createVideoPlayerOzImplementationEngineExtrasAPI({getConfig:z,getOzPlayer:x,getOzQuickStarter:y,getVideoElementAPI:A});A=d("VideoPlayerImplementationEngineAPI").createVideoPlayerImplementationEngine({createDebugAPI:function(b){var a=b.getVideoElementAPI;b=b.logger;return C?C.createDebugAPI({engineExtrasAPI:Q,getConfig:function(){var a;return(a=(a=k.current)==null?void 0:a.experimentationConfig)!=null?a:null},getManifest:function(){var a;return(a=(a=k.current)==null?void 0:a.manifestXmlStringResolved)!=null?a:null},getManifestUrl:function(){var a;return(a=(a=k.current)==null?void 0:a.manifestUrl)!=null?a:null},getOzBufferingDetector:w,getOzPlayer:x,getVideoElementAPI:a,logger:b}):null},createVideoPlayerError:d("VideoPlayerImplementationErrors").createVideoPlayerErrorFromOzImplementationError,debugLog:h,debugLogId:e,destroyEngineParts:function(a){N([].concat(a,["destroyEngineParts"])),O(),P()},engineExtrasAPI:Q,engineMetadata:{isAbrEnabled:!0,isExternalMedia:!1,playerImplementationName:"oz_v2",playerVersion:D,streamingFormat:"dash"},handleFatalError:f,handleVideoElementMounted:function(a){var b=S();L(m.current,[].concat(a,["handleVideoElementMounted"]))},handleVideoElementUnmounted:function(a){(c("gkx")("1494163")||c("gkx")("1380112"))&&N([].concat(a,["handleVideoElementUnmounted"]))},handleVideoInfoChange:I,initialProps:g,setExposedStateInReact:a});e=A.engine;var R=A.getCaptionsInfo,S=A.getVideoElement,T=A.getVideoLiveTrace,U=A.handleCaptionsInfoChange,V=A.handleFatalImplementationError,W=A.logger,X=A.machine,Y=A.videoElementAPIRef;return e}g.createVideoPlayerOzImplementationEngine=a}),98); __d("VideoPlayerOzImplementationV2.react",["VideoPlayerImplementationEngineAPI","VideoPlayerImplementationReactVideoElement.react","VideoPlayerOzImplementationEngine","react","useSEOLoggedOutWebCrawler"],(function(a,b,c,d,e,f,g){"use strict";var h=d("react");function a(a){var b=d("VideoPlayerImplementationEngineAPI").useVideoPlayerImplementationEngine(a,d("VideoPlayerOzImplementationEngine").createVideoPlayerOzImplementationEngine),e=b[0];b=b[1];var f=c("useSEOLoggedOutWebCrawler")(),g={src:null,videoElementCallbacks:b.videoElementCallbacks,videoElementRefCallback:b.videoElementRefCallback};f&&(g={src:a.manifestUrl,videoElementCallbacks:null,videoElementRefCallback:null});return h.jsx(c("VideoPlayerImplementationReactVideoElement.react"),{alt:a.alt,implementationController:b.implementationController,implementationExposedState:e,renderWithVideoImplementationStates:a.renderWithVideoImplementationStates,src:g.src,videoElementCallbacks:g.videoElementCallbacks,videoElementRefCallback:g.videoElementRefCallback})}a.displayName=a.name+" [from "+f.id+"]";g["default"]=a}),98); __d("VideoPlayerOzPlayerModuleLoaderDeferredForDisplay",["requireDeferredForDisplay"],(function(a,b,c,d,e,f,g){"use strict";var h=c("requireDeferredForDisplay")("oz-player").__setRef("VideoPlayerOzPlayerModuleLoaderDeferredForDisplay");function a(){return{getModuleIfRequireable:function(){return h.getModuleIfRequireable()||null},load:function(){return h.load()}}}g["default"]=a}),98); __d("VideoPlayerShakaImplementationData",[],(function(a,b,c,d,e,f){"use strict";function a(a){var b=a.videoData;a=a.videoPlayerShakaConfig;return b==null?null:{videoData:b,videoPlayerShakaConfig:a}}f.makeShakaImplementationData=a}),66); __d("VideoPlayerOzWWWConfig",[],(function(a,b,c,d,e,f){"use strict";var g="oz_www_";a=function(){function a(a){this.$1=a}var b=a.prototype;b.getBool=function(a,b){return this.$1.getBool(g+a,b)};b.getNumber=function(a,b){return this.$1.getNumber(g+a,b)};b.getString=function(a,b){return this.$1.getString(g+a,b)};b.setContext=function(a,b){this.$1.setContext(a,b)};b.getAllContexts=function(){return this.$1.getAllContexts()};return a}();f["default"]=a}),66); __d("useOzImplementationData",["CometRelay","VideoPlayerOzImplementationData","VideoPlayerOzWWWConfig","react","useOzImplementationData_video.graphql"],(function(a,b,c,d,e,f,g){"use strict";var h,i=d("react").useMemo;function a(a,e){var f=e.manifestURL_DO_NOT_USE,g=e.ozQuickStarterData,j=e.videoPlayerShakaConfig,k=i(function(){return j==null?null:new(c("VideoPlayerOzWWWConfig"))(j)},[j]),l=d("CometRelay").useFragment(h!==void 0?h:h=b("useOzImplementationData_video.graphql"),a);return i(function(){return d("VideoPlayerOzImplementationData").makeOzImplementationData({canUseOz:l.can_use_oz,dashManifest:f!=null?null:l.dash_manifest,dashUrl:f!=null?f:l.playable_url_dash,experimentationConfig:k,minQualityPreference:l.min_quality_preference,ozQuickStarterData:f!=null?null:g,videoFBID:l.id})},[l,f,k,g])}g["default"]=a}),98); __d("useProgressiveImplementationData",["CometRelay","VideoPlayerProgressiveImplementationData","gkx","useProgressiveImplementationData_video.graphql"],(function(a,b,c,d,e,f,g){"use strict";var h;function a(a,e){var f,g;e=e.initialForceHD;e=e===void 0?!1:e;a=d("CometRelay").useFragment(h!==void 0?h:h=b("useProgressiveImplementationData_video.graphql"),a);f=a.is_spherical===!0?(f=(f=a.spherical_video_fallback_urls)==null?void 0:f.hd)!=null?f:a.playable_url_quality_hd:a.playable_url_quality_hd;g=a.is_spherical===!0?(g=(g=a.spherical_video_fallback_urls)==null?void 0:g.sd)!=null?g:a.playable_url:a.playable_url;var i=a.is_rss_podcast_video===!0,j=c("gkx")("1129");return d("VideoPlayerProgressiveImplementationData").makeProgressiveImplementationData({hdSrc:f,hdSrcPreferred:e===!0||j||a.min_quality_preference==="HD"||a.min_quality_preference==="UHD",isExternalMedia:i,sdSrc:g})}g["default"]=a}),98); __d("useShakaImplementationData",["CometRelay","VideoPlayerShakaImplementationData","cr:1604324","react","recoverableViolation","useShakaImplementationData_video.graphql"],(function(a,b,c,d,e,f,g){"use strict";var h,i=d("react").useMemo;function a(a,e){var f=e.videoPlayerShakaConfig,g=d("CometRelay").useFragment(h!==void 0?h:h=b("useShakaImplementationData_video.graphql"),a);return i(function(){var a;if(g.is_rss_podcast_video===!0)return null;a=(a=g.video_player_shaka_live_p2p_init)==null?void 0:a.json_encoded_video_data;if(a==null)return null;if(b("cr:1604324")==null)return c("recoverableViolation")("VideoData is not supported","comet_video_player");var e=null;try{e=new(b("cr:1604324"))(JSON.parse(a))}catch(a){c("recoverableViolation")("VideoData JSON is broken","comet_video_player")}return d("VideoPlayerShakaImplementationData").makeShakaImplementationData({videoData:e,videoPlayerShakaConfig:f})},[g,f])}g["default"]=a}),98); __d("useVideoPlayerShakaPerformanceLoggerBuilder",["CometRelay","useVideoPlayerShakaPerformanceLoggerBuilder_init.graphql","useVideoPlayerShakaPerformanceLoggerBuilder_video.graphql"],(function(a,b,c,d,e,f,g){"use strict";var h,i;h!==void 0?h:h=b("useVideoPlayerShakaPerformanceLoggerBuilder_init.graphql");function a(a){var c;a=d("CometRelay").useFragment(i!==void 0?i:i=b("useVideoPlayerShakaPerformanceLoggerBuilder_video.graphql"),a);var e=a.video_player_shaka_performance_logger_init2?d("CometRelay").ModuleResource.read(a.video_player_shaka_performance_logger_init2):null;if(e!=null&&((c=a.video_player_shaka_performance_logger_init2)==null?void 0:c.per_session_sampling_rate)!==null){return new e({perSessionSamplingRate:(c=a.video_player_shaka_performance_logger_init2)==null?void 0:c.per_session_sampling_rate})}return null}g["default"]=a}),98); __d("useVideoPlayerShakaPerformanceLoggerRelayImpl",["CometRelay","useVideoPlayerShakaPerformanceLoggerRelayImpl_init.graphql","useVideoPlayerShakaPerformanceLoggerRelayImpl_video.graphql"],(function(a,b,c,d,e,f,g){"use strict";var h,i;h!==void 0?h:h=b("useVideoPlayerShakaPerformanceLoggerRelayImpl_init.graphql");function a(a){a=d("CometRelay").useFragment(i!==void 0?i:i=b("useVideoPlayerShakaPerformanceLoggerRelayImpl_video.graphql"),a);var c=a.video_player_shaka_performance_logger_init?d("CometRelay").ModuleResource.read(a.video_player_shaka_performance_logger_init):null;c!=null&&a.video_player_shaka_performance_logger_should_sample===!0&&c.forceShouldSample();return c}g["default"]=a}),98); __d("useVideoPlayerShakaPerformanceLoggerRelay",["useVideoPlayerShakaPerformanceLoggerRelayImpl"],(function(a,b,c,d,e,f,g){"use strict";g["default"]=c("useVideoPlayerShakaPerformanceLoggerRelayImpl")}),98); __d("makeOzPlayerAudioStreamEventDataHandler",["DataViewReader","FBLogger","Mp4DASHEventMessageBox","Mp4Demuxer"],(function(a,b,c,d,e,f,g){"use strict";function a(a){return h.bind(null,a)}function h(a,b,d){if(a.getCurrentState().controlledState.emsgObserverTokens.size===0)return;b=new(c("Mp4Demuxer"))(new DataView(d));while(!b.atEnd()){d=b.parseBox();if(d.getType()===c("Mp4DASHEventMessageBox").canonicalType){var e=b.parseCanonicalBox(c("Mp4DASHEventMessageBox"),b.parseFullBox(d));if(e instanceof c("Mp4DASHEventMessageBox")){var f=i(e);f!=null&&a.dispatch({payload:{emsgBox:{box:e,payload:f}},type:"emsg_box_received"})}}b.skipBox(d)}}function i(a){try{a=a.getMessageData();a=new(c("DataViewReader"))(a).readZeroTerminatedString(a.byteLength);a=JSON.parse(a);return j(a)}catch(a){c("FBLogger")("comet_video_player").catching(a).warn("Parsing emsg data failed: %s",String(a))}return null}function j(a){a=k(a.rosterData);return a==null?null:{data:a,type:"roster_data"}}function k(a){if(typeof a!=="object"||!Array.isArray(a.speakerInfoList)||typeof a.activeSpeaker!=="string"&&typeof a.activeSpeaker!=="number")return null;return a.speakerInfoList.findIndex(function(a){return typeof a.audioMuted!=="boolean"||typeof a.id!=="string"&&typeof a.id!=="number"})!==-1?null:a}g["default"]=a}),98); __d("useCometRelayExpiredVideoUrlRefreshHandler",["CometRelay","react","unrecoverableViolation","useCometRelayExpiredVideoUrlRefreshHandlerQuery.graphql"],(function(a,b,c,d,e,f,g){"use strict";var h,i=d("react").useCallback;function a(a){var e=d("CometRelay").useRelayEnvironment();if(a==null||a.length===0)throw c("unrecoverableViolation")("refreshCometRelayVideoPlayerExpiredUrl videoFBID cannot be "+((a==null?void 0:a.length)===0?"an empty string":"null"),"comet_video_player");var f=i(function(c){var f=h!==void 0?h:h=b("useCometRelayExpiredVideoUrlRefreshHandlerQuery.graphql");return d("CometRelay").fetchQuery(e,f,{expiredURL:btoa(c),videoID:a}).toPromise().then(function(a){var b;b=(b=a==null?void 0:(b=a.video)==null?void 0:(b=b.rmd_refreshed_url)==null?void 0:b.new_url)!=null?b:null;a=(a=a==null?void 0:(a=a.video)==null?void 0:(a=a.rmd_refreshed_url)==null?void 0:a.reason)!=null?a:null;return{reason:a,refreshedUrl:b}})},[e,a]);return f}g["default"]=a}),98); __d("manifestHasUnsupportedCodecs",["gkx"],(function(a,b,c,d,e,f,g){"use strict";function a(a){if(!c("gkx")("1917833")||window.MediaSource==null||a==null||typeof a!=="string")return!1;var b=/mimeType=\"([^\"]*)\"\s*codecs=\"([^\"]*)\"/g,d;while(d=b.exec(a)){d=d[1]+'; codecs="'+d[2]+'"';if(!window.MediaSource.isTypeSupported(d))return!0}return!1}g["default"]=a}),98); __d("useVideoImplementationsImpl",["CometRelay","ErrorMetadata","VideoPlayerOzImplementationV2.react","VideoPlayerProgressiveImplementationV2.react","cr:1604325","err","gkx","manifestHasUnsupportedCodecs","recoverableViolation","useOzImplementationData","useProgressiveImplementationData","useShakaImplementationData","useVideoImplementationsImpl_video.graphql"],(function(a,b,c,d,e,f,g){"use strict";var h;function a(a,e){var f=[],g=e.forceProgressiveImpl;g=g===void 0?!1:g;var i=e.initialForceHD;i=i===void 0?!1:i;var j=e.manifestURL_DO_NOT_USE,k=e.ozQuickStarterData,l=e.videoFBID;e=e.videoPlayerShakaConfig;a=d("CometRelay").useFragment(h!==void 0?h:h=b("useVideoImplementationsImpl_video.graphql"),a);var m=c("useShakaImplementationData")(a,{videoPlayerShakaConfig:e});m!=null&&(b("cr:1604325")==null?c("recoverableViolation")("VideoPlayerShakaImplementation is not supported","comet_video_player"):f.push({Component:b("cr:1604325"),data:m,typename:"VideoPlayerShakaImplementation"}));m=c("useOzImplementationData")(a,{manifestURL_DO_NOT_USE:j,ozQuickStarterData:k,videoPlayerShakaConfig:e});j=m!=null&&c("manifestHasUnsupportedCodecs")(m.manifest);!g&&m!=null&&(m.manifest!=null&&!j||m.manifestUrl!=null)&&f.push({Component:c("VideoPlayerOzImplementationV2.react"),data:m,typename:"VideoPlayerOzImplementation"});k=c("useProgressiveImplementationData")(a,{initialForceHD:i});c("VideoPlayerProgressiveImplementationV2.react")!=null&&k!=null&&f.push({Component:c("VideoPlayerProgressiveImplementationV2.react"),data:k,typename:"VideoPlayerProgressiveImplementation"});if(f.length===0&&c("gkx")("1611172")){e=c("err")("Cannot play video: No matching video player implementations");a={forced_progressive:g,has_oz_data:m!=null,has_oz_manifest:(m==null?void 0:m.manifest)!=null,has_oz_manifest_url:(m==null?void 0:m.manifestUrl)!=null,has_oz_unsupported_codecs:j,has_progressive_data:k!=null};e.metadata=new(c("ErrorMetadata"))();e.metadata.addEntries(["COMET_VIDEO","VIDEO_ID",String(l)],["COMET_VIDEO","VIDEO_IMPLEMENTATION_DEBUG_DATA",JSON.stringify(a)]);c("recoverableViolation")("useVideoImplementations: No matching video player implementations","comet_video_player",{error:e})}return f}g["default"]=a}),98); __d("useVideoImplementations",["useVideoImplementationsImpl"],(function(a,b,c,d,e,f,g){"use strict";g["default"]=c("useVideoImplementationsImpl")}),98); __d("VideoPlayerShakaConfigContextProvider",[],(function(a,b,c,d,e,f){"use strict";a=function(){function a(){this.$1={}}var b=a.prototype;b.setContext=function(a,b){if(this.$1[a]!==b){var c;this.$1=babelHelpers["extends"]({},this.$1,(c={},c[a]=b,c))}};b.setAllContexts=function(a){this.$1=a};b.getAllContexts=function(){return this.$1};return a}();f["default"]=a}),66); __d("VideoPlayerShakaConfig",["VideoPlayerContextSensitiveConfigResolver","VideoPlayerShakaConfigContextProvider"],(function(a,b,c,d,e,f,g){var h={};a=function(){function a(a,b,d){this.$1=new(c("VideoPlayerShakaConfigContextProvider"))(),this.$2=b||null,this.$3=new(c("VideoPlayerContextSensitiveConfigResolver"))(d),this.$3.setContexts(a||{}),a&&this.$1.setAllContexts(a)}a.setGlobalOverrideConfig=function(a){h=a};var b=a.prototype;b.setContext=function(a,b){var c=this.$1.getAllContexts();this.$1.setContext(a,b);a=this.$1.getAllContexts();c!==a&&this.$3.setContexts(a)};b.setOverrideConfig=function(a){this.$2=a};b.getBool=function(a,b){a=this.$4(a,b);return typeof a==="boolean"?a:b};b.getNumber=function(a,b){a=this.$4(a,b);return typeof a==="number"?a:b};b.getString=function(a,b){a=this.$4(a,b);return typeof a==="string"?a:b};b.getAllContexts=function(){return this.$1.getAllContexts()};b.$4=function(a,b){if(!!h&&typeof h[a]===typeof b)return h[a];if(typeof this.$3.getValue(a)===typeof b)return this.$3.getValue(a);return!!this.$2&&typeof this.$2[a]===typeof b?this.$2[a]:null};return a}();g["default"]=a}),98); __d("useVideoPlayerShakaConfig",["CometRelay","VideoPlayerConnectionQuality","VideoPlayerOzWWWGlobalConfig","VideoPlayerShakaConfig","oz-player/networks/OzBandwidthEstimator","react","useSelectedLatencySetting","useVideoPlayerShakaConfig_video.graphql"],(function(a,b,c,d,e,f,g){"use strict";var h;e=d("react");var i=e.useEffect,j=e.useState;function a(a,e){e=e.adClientToken;var f=d("CometRelay").useFragment(h!==void 0?h:h=b("useVideoPlayerShakaConfig_video.graphql"),a),g=e!=null,k=f.is_spherical===!0,l=f.is_gaming_video===!0;e=c("useSelectedLatencySetting")((a=f.id)!=null?a:"null",f.selected_latency_setting);var m=e[0];a=j(function(){var a;return new(c("VideoPlayerShakaConfig"))({connection_quality:d("VideoPlayerConnectionQuality").evaluate(function(){return c("oz-player/networks/OzBandwidthEstimator").getBandwidth(c("VideoPlayerOzWWWGlobalConfig"))}),content_category:l?"gaming":"general",fbls_tier:((a=f.fbls_tier)==null?void 0:a.startsWith("user"))?"user":"general",is_ad:g,is_latency_sensitive_broadcast:f.is_latency_sensitive_broadcast===!0,is_live:f.is_live_streaming===!0,is_spherical:k,latency_level:f.is_latency_menu_enabled===!0?m:"normal",player_format:"inline",servable_via_fmbs:!1,streaming_implementation:"default"})});var n=a[0];i(function(){n.setContext("is_ad",g)},[n,g]);i(function(){n.setContext("is_spherical",k)},[n,k]);return n}g["default"]=a}),98); __d("oz-player/loggings/OzLoggingUtils",[],(function(a,b,c,d,e,f){"use strict";function a(a,b,c){a=a.getOperationLogger(b).start();try{b=c(a);return b}catch(b){a.setError(b);throw b}finally{a.log()}}function b(a,b,c,d,e){d===void 0&&(d=function(){});e===void 0&&(e=function(){});var f=b.getOperationLogger(c).start();d(f);return a.then(function(a){e(f);f.log();return a})["catch"](function(a){e(f);f.setError(a);f.log();throw a})}f.executeOperationAndLog=a;f.monitorPromiseAndLogOperation=b}),66); __d("oz-player/loggings/OzOperationLoggerBase",[],(function(a,b,c,d,e,f){"use strict";a=function(){function a(a){this.$50=new Map(),this.$1=a}var b=a.prototype;b.start=function(){var a=Date.now();this.setClientTimeBegin(a);this.setClientTimeEnd(null);this.setClientTimeDuration(null);return this};b.log=function(){var a=Date.now(),b=this.getClientTimeBegin(),c=this.getClientTimeEnd();(b==null||b===0)&&(b=a,this.setClientTimeBegin(b));(c==null||c===0)&&(c=a,this.setClientTimeEnd(c));this.setClientTimeDuration(c-b)};b.setError=function(a){this.$2=a;return this};b.setPerSessionSamplingRate=function(a){this.$3=a;return this};b.setAppendTarget=function(a){this.$45=a;return this};b.setOneObserved=function(a){this.$42=a;return this};b.setOneReqWave=function(a){this.$43=a;return this};b.setOneResWave=function(a){this.$44=a;return this};b.setIsP2pPlayback=function(a){this.$41=a;return this};b.setResult=function(a){this.$4=a;return this};b.setType=function(a){this.$5=a;return this};b.setClientTimeBegin=function(a){this.$6=a;return this};b.setClientTimeDuration=function(a){this.$7=a;return this};b.setClientTimeEnd=function(a){this.$8=a;return this};b.setSegmentCount=function(a){this.$15=a;return this};b.setTimeToFirstByte=function(a){this.$9=a;return this};b.setTimeToLastByte=function(a){this.$10=a;return this};b.setTimeToRequestStart=function(a){this.$11=a;return this};b.setTimeToRequestSent=function(a){this.$12=a;return this};b.setReason=function(a){this.$13=a;return this};b.setResource=function(a){this.$14=a;return this};b.setSegmentStartTime=function(a){this.$16=a;return this};b.setSegmentEndTime=function(a){this.$17=a;return this};b.setLength=function(a){this.$18=a;return this};b.setLiveheadPosition=function(a){this.$19=a;return this};b.setLiveheadSeqNumHeader=function(a){this.$20=a;return this};b.setLiveheadSeqNumMpd=function(a){this.$21=a;return this};b.setManifestType=function(a){this.$22=a;return this};b.setPriorityFloat=function(a){this.$23=a;return this};b.setAppendedBufferMs=function(a){this.$24=a;return this};b.setInitiator=function(a){this.$25=a;return this};b.setPreloadTime=function(a){this.$26=a;return this};b.setConcluder=function(a){this.$27=a;return this};b.setPreviousRepresentationID=function(a){this.$28=a;return this};b.setRepresentationID=function(a){this.$29=a;return this};b.setStreamSwitchReason=function(a){this.$30=a;return this};b.setState=function(a){this.$31=a;return this};b.setContentLengthHeader=function(a){this.$32=a;return this};b.setOriginHitHeader=function(a){this.$34=a;return this};b.setEdgeHitHeader=function(a){this.$35=a;return this};b.setFNAHitHeader=function(a){this.$36=a;return this};b.setCode=function(a){this.$33=a;return this};b.setResponseTimeMsHeader=function(a){this.$37=a;return this};b.setIsTemplatedManifest=function(a){this.$38=a;return this};b.setIsLatencyCachupEnabled=function(a){this.$39=a;return this};b.setPlayerFormat=function(a){this.$40=a;return this};b.setIsRingBufferSample=function(a){this.$46=a;return this};b.setIsOnline=function(a){this.$47=a;return this};b.setProxyStatusHeader=function(a){this.$48=a;return this};b.setPlaybackFbmsParam=function(a){return this};b.setPreferredEdgeLatency=function(a){this.$49=a;return this};b.setUserInfo=function(a){return this};b.setDynamicStatusHeader=function(a){return this};b.getPerSessionSamplingRate=function(){return this.$3};b.setMediaSourceSourceBuffer=function(a,b){this.$50.set(a,b);return this};b.unsetMediaSourceSourceBuffers=function(){this.$50.clear();return this};b.getError=function(){return this.$2};b.getResult=function(){return this.$4};b.getType=function(){return this.$5};b.getClientTimeBegin=function(){return this.$6};b.getClientTimeEnd=function(){return this.$7!=null?this.$6!=null?this.$6+this.$7:null:this.$8};b.getTimeToRequestStart=function(){return this.$11};b.getTimeToRequestSent=function(){return this.$12};b.getReason=function(){return this.$13};b.getResource=function(){return this.$14};b.getOperationName=function(){return this.$1};b.getSegmentStartTime=function(){return this.$16};b.getSegmentEndTime=function(){return this.$17};b.getLength=function(){return this.$18};b.getLiveheadPosition=function(){return this.$19};b.getManifestType=function(){return this.$22};b.getPriorityFloat=function(){return this.$23};b.getAppendedBufferMs=function(){return this.$24};b.getInitiator=function(){return this.$25};b.getPreloadTime=function(){return this.$26};b.getConcluder=function(){return this.$27};b.getContentLengthHeader=function(){return this.$32};b.getOriginHitHeader=function(){return this.$34};b.getEdgeHitHeader=function(){return this.$35};b.getFNAHitHeader=function(){return this.$36};b.getCode=function(){return this.$33};b.getResponseTimeMsHeader=function(){return this.$37};b.getIsTemplatedManifest=function(){return this.$38};b.getOneObserved=function(){return this.$42};b.getOneReqWave=function(){return this.$43};b.getOneResWave=function(){return this.$44};b.getAppendTarget=function(){return this.$45};b.getIsRingBufferSample=function(){return this.$46};b.getIsOnline=function(){return this.$47};b.getProxyStatusHeader=function(){return this.$48};b.getMediaSourceSourceBuffers=function(){return this.$50};return a}();f["default"]=a}),66); __d("oz-player/utils/OzErrorEmitter",["oz-player/shims/OzEventEmitter","oz-player/shims/ozvariant"],(function(a,b,c,d,e,f,g){"use strict";a=function(a){babelHelpers.inheritsLoose(b,a);function b(b){var d;b===void 0&&(b=!1);d=a.call(this)||this;d.$OzErrorEmitter1=!1;d.$OzErrorEmitter2=!1;d.$OzErrorEmitter3=[];d.emitError=function(a){!d.$OzErrorEmitter1?d.$OzErrorEmitter2?d.$OzErrorEmitter3.push(a):d.$OzErrorEmitter1||c("oz-player/shims/ozvariant")(0,14038):d.emit("error",a)};d.$OzErrorEmitter2=b;return d}var d=b.prototype;d.onError=function(a){this.$OzErrorEmitter1=!0;a=this.addListener("error",a);this.$OzErrorEmitter2&&this.$OzErrorEmitter3.length>0&&this.$OzErrorEmitter3.forEach(this.emitError);return a};return b}(c("oz-player/shims/OzEventEmitter"));g["default"]=a}),98); __d("oz-player/drm/OzDrmManager",["oz-player/drm/OzDrmUtils","oz-player/loggings/OzLoggingUtils","oz-player/loggings/OzOperationLoggerBase","oz-player/shims/OzDOMEventListener","oz-player/shims/OzMaybeNativePromise","oz-player/shims/OzSubscriptionsHandler","oz-player/utils/OzError","oz-player/utils/OzErrorEmitter"],(function(a,b,c,d,e,f,g){"use strict";a=function(){function a(a,b,e){var f=this;e===void 0&&(e=null);this.$1=null;this.$2=new Map();this.$4=!1;this.$6=new(c("oz-player/shims/OzSubscriptionsHandler"))();this.$7=new(c("oz-player/utils/OzErrorEmitter"))();this.$8=!1;this.$9=null;this.$10=0;this.$12=[];this.$14=[];this.$24=function(a){a instanceof c("oz-player/loggings/OzOperationLoggerBase")&&a.getError()&&a.setResult("failed")};this.$21=function(a){if(f.$4)return c("oz-player/shims/OzMaybeNativePromise").reject(new Error("OzDrmManager destroyed before call to mediaKeySystemAccess.createMediaKeys()."));var b=f.$5.mediaKeys!=null?c("oz-player/shims/OzMaybeNativePromise").resolve(f.$5.mediaKeys):a.createMediaKeys();return d("oz-player/loggings/OzLoggingUtils").monitorPromiseAndLogOperation(b.then(function(b){return{mediaKeySystemAccess:a,mediaKeys:b}}),f.$3,"drm_create_media_keys",function(){},f.$24)};this.$22=function(a){if(f.$4)return c("oz-player/shims/OzMaybeNativePromise").reject(new Error("OzDrmManager destroyed before call to setMediaKeys()"));var b=a.mediaKeySystemAccess,e=a.mediaKeys;if(!e)throw new(c("oz-player/utils/OzError"))({type:"OZ_DRM_MANAGER",description:"No mediaKeys for mediaKeySystemAccess"});a=f.$5.setMediaKeys(e).then(function(){if(f.$4)return c("oz-player/shims/OzMaybeNativePromise").reject(new Error("OzDrmManager destroyed after setMediaKeys() called."));var a=Array.from(f.$2.values()).find(function(a){return a.getKeySystem()===b.keySystem});if(!a)throw new(c("oz-player/utils/OzError"))({type:"OZ_DRM_MANAGER",description:"Can't find OzDrmProvider for keySystem "+b.keySystem});var d=a.getServerCertificate();return d?e.setServerCertificate(d).then(function(){return{mediaKeys:e,provider:a}}):{mediaKeys:e,provider:a}});return d("oz-player/loggings/OzLoggingUtils").monitorPromiseAndLogOperation(a,f.$3,"drm_set_media_keys",function(){},f.$24)};this.$23=function(a){var b=a.mediaKeys,e=a.provider;a=e.getInitDatas();if(a.length===0){f.$6.addSubscriptions(c("oz-player/shims/OzDOMEventListener").listenDOMEvent(f.$5,"encrypted",function(a){f.$25(b,e,a)["catch"](function(a){f.$17(a,"encrypted")})}));return c("oz-player/shims/OzMaybeNativePromise").resolve([])}a=a.map(function(a){return f.$25(b,e,{initData:a.data,initDataType:a.type})});return d("oz-player/loggings/OzLoggingUtils").monitorPromiseAndLogOperation(c("oz-player/shims/OzMaybeNativePromise").all(a),f.$3,"drm_request_license",function(){},f.$24)};this.$5=b;this.$1=e;this.$3=a.cloneContext().setType("drm_manager")}var b=a.prototype;b.hasContentProtections=function(){return this.$9};b.onError=function(a){return this.$7.onError(a)};b.$15=function(a,b){var d;a instanceof c("oz-player/utils/OzError")?d=a:a instanceof Error?(a.stack,d=new(c("oz-player/utils/OzError"))({type:"OZ_DRM_MANAGER",description:a.message,extra:{originalError:a}})):a!=null&&typeof a.message==="string"?d=new(c("oz-player/utils/OzError"))({type:"OZ_DRM_MANAGER",description:a.message,extra:{}}):d=new(c("oz-player/utils/OzError"))({type:"OZ_DRM_MANAGER",description:"Unknown DRM "+b+" error",extra:{}});return d};b.$16=function(a){this.$7.emitError(a)};b.$17=function(a,b){var c;c=(c=(c=this.$1)==null?void 0:c.maxStartEMEAttempts)!=null?c:-1;this.$10=0?parseFloat((a[c].endTime-b).toFixed(3)):0;a=c>=0?a.length-1-c:-1;return{bufferAheadSec:b,bufferedOffset:a}}function h(a,b,c){var e=a.map(function(a){return{rangeStart:a.startTime,rangeEnd:a.endTime}});c=d("oz-player/utils/OzNumericalRangeUtil").findCurrentRangeIndex(c,b,e);e=parseFloat(e.reduce(function(a,c){var e=c.rangeEnd;return e===null||e===void 0?a:a+(d("oz-player/utils/OzNumericalRangeUtil").isWithin(b,c)?e-b:d("oz-player/utils/OzNumericalRangeUtil").isLargerThan(c.rangeStart,b)?e-c.rangeStart:0)},0).toFixed(3));a=c>=0?a.length-1-c:-1;return{bufferAheadSec:e,bufferedOffset:a}}g.getTotalBufferedTime=a;g.getStartBufferedTime=b;g.getEndBufferedTime=c;g.convertToBufferedTimeRangeArray=e;g.getBufferAheadInBufferedRanges=f;g.getTotalBufferAheadOfPosition=h}),98); __d("oz-player/media_source/SourceBufferManagerUtils",["oz-player/utils/OzNumericalRangeUtil","oz-player/utils/OzSourceBufferUtil"],(function(a,b,c,d,e,f,g){"use strict";function a(a,b,c){if(a.getBool("generate_mos_segment_buffer_diff")){var e=d("oz-player/utils/OzNumericalRangeUtil").convertFromTimeRanges(c.getBufferedRanges());a=function(){var a=d("oz-player/utils/OzNumericalRangeUtil").firstAddedInSortedRanges(e,d("oz-player/utils/OzNumericalRangeUtil").convertFromTimeRanges(c.getBufferedRanges()));return{startTime:(a==null?void 0:a.rangeStart)||0,endTime:(a==null?void 0:a.rangeEnd)||0}};return a}else{var f=d("oz-player/utils/OzSourceBufferUtil").getEndBufferedTime(b);a=function(){var a=d("oz-player/utils/OzSourceBufferUtil").getEndBufferedTime(b);return{startTime:f,endTime:a}};return a}}g.startMeasuringAppendedBuffer=a}),98); __d("oz-player/shims/www/ozClearTimeoutWWW",["clearTimeout"],(function(a,b,c,d,e,f,g){"use strict";g["default"]=c("clearTimeout")}),98); __d("oz-player/shims/ozClearTimeout",["oz-player/shims/www/ozClearTimeoutWWW"],(function(a,b,c,d,e,f,g){"use strict";g["default"]=c("oz-player/shims/www/ozClearTimeoutWWW")}),98); __d("oz-player/states/OzObservedSourceBufferState",["oz-player/shims/OzSubscriptionsHandler"],(function(a,b,c,d,e,f,g){"use strict";a=function(){function a(a,b){var d=this;this.$2=new(c("oz-player/shims/OzSubscriptionsHandler"))();this.$3=[];this.$5=new Set();this.$7=function(){if(d.$4.getBool("stable_buffered_timeranges_in_observedsourcebufferstate")){var a;try{a=d.$1.getBuffered()}catch(a){if(a.name==="InvalidStateError"){d.$3=[];return}else throw a}var b=[];for(var c=0;c=b.length)break;e=b[d++]}else{d=b.next();if(d.done)break;e=d.value}e=e;e()}}),this.$1.registerOnErrorListener(this.$7))};b.setSourceBuffer=function(a){this.$1=a,this.$6(),this.$7()};b.getBufferedRanges=function(){return this.$3};b.addEventListener=function(a,b){var c=this;this.$5.add(b);return{remove:function(){c.$5["delete"](b)}}};b.destroy=function(){this.$5.clear(),this.$2.release(),this.$2.engage()};return a}();g["default"]=a}),98); __d("oz-player/utils/OzCustomErrorCode",[],(function(a,b,c,d,e,f){"use strict";a={APPEND_BUFFER_UNKNOWN_ERROR:"21539",APPEND_BUFFER_INVALID_STATE_ERROR_SOURCE_BUFFER_HAS_BEEN_REMOVED:"21540",APPEND_BUFFER_MEDIA_ERROR_ATTRIBUTE_NOT_NULL:"21541",APPEND_BUFFER_SOURCE_BUFFER_UPDATING_ATTRIBUTE_IS_TRUE:"21542",SOURCE_BUFFER_MANAGER_ADD_SOURCE_BUFFER_ERROR:"21543",SOURCE_BUFFER_MANAGER_CREATE_ERROR:"21544",SETUP_STREAMS_PROMISE_REJECTION:"21545",APPEND_BUFFER_QUOTA_EXCEEDED_ERROR:"21546",APPEND_BUFFER_INVALID_STATE_ERROR:"21547",SOURCE_BUFFER_MANAGER_UPDATEEND_UNKNOWN_ERROR:"21548",NETWORK_REQUEST_STREAM_RETRY_HANDLER_ERROR:"21549",STREAM_APPEND_QUOTA_EXCEEDED_HANDLER_ERROR:"21550",SOURCE_BUFFER_MANAGER_CLEAR_RANGE_FAILED:"21551"};b=a;f["default"]=b}),66); __d("oz-player/media_source/SourceBufferManager",["oz-player/loggings/OzLoggingUtils","oz-player/media_source/SourceBufferManagerUtils","oz-player/shims/OzDOMEventListener","oz-player/shims/OzDeferred","oz-player/shims/OzMaybeNativePromise","oz-player/shims/OzStreams","oz-player/shims/OzSubscriptionsHandler","oz-player/shims/ozClearTimeout","oz-player/shims/ozSetTimeoutAcrossTransitions","oz-player/states/OzObservedSourceBufferState","oz-player/utils/OzCustomErrorCode","oz-player/utils/OzError","oz-player/utils/OzSourceBufferUtil","oz-player/utils/ozConcatUint8Arrays"],(function(a,b,c,d,e,f,g){"use strict";a=function(){function a(a,b,d,e,f,g){var h=this;g===void 0&&(g=null);this.$3=null;this.$4=new(c("oz-player/shims/OzSubscriptionsHandler"))();this.$7=!1;this.$8=[];this.$12=!1;this.$13=!1;this.$15=0;this.$27=function(){if(h.$10.hasError()){h.$13=!1;h.$12=!1;var a=h.$10.getMediaErrorName();a=a!==null&&a!==void 0?a:"An unknown source buffer error occurred.";var b=h.$10.getErrorCode();b=b!==null&&b!==void 0?String(b):c("oz-player/utils/OzCustomErrorCode").SOURCE_BUFFER_MANAGER_UPDATEEND_UNKNOWN_ERROR;a=new(c("oz-player/utils/OzError"))({type:"OZ_SOURCE_BUFFER",description:a,extra:{code:b}});if(h.$11.getBool("fix_operation_deferred_promise_lifecycle")){b=h.$3;b&&(h.$3=null,b.reject(a))}else h.$3&&h.$3.reject(a),h.$3=null;h.cancelOperationAndCleanQueue()}else h.$13||(h.$13=!0,h.$4.addSubscriptions(c("oz-player/shims/OzDOMEventListener").listenDOMEvent(h.$10.getVideoNode(),"error",h.$27)))};this.$18=function(){var a=h.$1;if(a!=null){a.getOperationLogger("source_buffer_updateend").setError((a=h.$10.getMediaErrorName())!=null?a:void 0).setCode(h.$10.getErrorCode()).setResult(h.$12?"failed":"success").log()}a=h.$3;a&&(h.$12?h.$27():h.$11.getBool("fix_operation_deferred_promise_lifecycle")?(h.$3=null,a.resolve()):(a.resolve(),h.$3&&(h.$3=null)))};this.$19=function(){var a=h.$1;if(a!=null){a.getOperationLogger("source_buffer_error").setError((a=h.$10.getMediaErrorName())!=null?a:void 0).setCode(h.$10.getErrorCode()).setResult("failed").log()}h.$12=!0};this.$1=g;this.$2=a;this.$11=b;this.$17();this.$9=new(c("oz-player/states/OzObservedSourceBufferState"))(this.$2,this.$11);this.$10=d;this.$14=e;this.$16=f}var b=a.prototype;b.$17=function(){this.$4.release(),this.$4=new(c("oz-player/shims/OzSubscriptionsHandler"))(),this.$4.addSubscriptions(this.$2.registerOnUpdateEndListener(this.$18),this.$2.registerOnErrorListener(this.$19))};b.setSourceBuffer=function(a){var b=this;return this.cancelOperationAndCleanQueue()["catch"](function(){}).then(function(){b.$2=a,b.$17(),b.$9.setSourceBuffer(a)})};b.queueData=function(a,b,d,e){b===void 0&&(b=null);d===void 0&&(d=0);e===void 0&&(e=null);var f=new(c("oz-player/shims/OzDeferred"))(c("oz-player/shims/OzMaybeNativePromise"));this.$8.push({data:a,deferred:f,loggerProvider:b,appendTarget:d,onDataAppend:e});a=f.getPromise();this.$7||this.$20();return a};b.cancelOperationAndCleanQueue=function(a){a===void 0&&(a=null);a&&a.cloneContext().getOperationLogger("source_buffer_cancel_and_clean").log();var b=this.$21("cancel and clean");this.$8.forEach(function(a){a=a.deferred;a.reject(b)});this.$8=[];try{this.$14(this.$2)&&(this.$10.hasError()||this.$2.abort())}catch(b){var d=b;a&&a.cloneContext().getOperationLogger("cancel_operation_abort_failed").setError(d).setReason(this.$16?this.$16():null).log();if(this.$11.getBool("throw_cancel_operation_abort_failed"))throw d}a=c("oz-player/shims/OzMaybeNativePromise").resolve();d=this.$3;d&&(this.$11.getBool("fix_operation_deferred_promise_lifecycle")&&(this.$3=null),d.reject(b),a=d.getPromise()["catch"](function(){}));this.$5&&(this.$5.reject(b),this.$5=null);return a};b.getSourceBufferState=function(){return this.$9};b.clearRange=function(a,b){if(this.$11.getBool("clear_sbm_buffer_on_byte_threshold")){var c=this.getTotalTimeInBuffer(),d=this.getTotalTimeInBufferForRange(a,b);this.$15*=c>0?1-d/c:0}d=this.$11.getBool("throw_error_on_clear_buffer_on_seek_failed")?Math.max(a,0):a;b>0&&b>d&&this.$2.remove(d,b)};b.$22=function(a,b){a=this.$11.getBool("throw_error_on_clear_buffer_on_seek_failed")?Math.max(a,0):a;if(b>0&&b>a){var d=this.$23();this.clearRange(a,b);return d}return c("oz-player/shims/OzMaybeNativePromise").resolve()};b.clearRangeWithWait=function(a,b){var c=this,d=this.cancelOperationAndCleanQueue();d=d.then(function(){return c.$22(a,b)});return d};b.clear=function(){if(this.$2.getBuffered().length>0){var a=d("oz-player/utils/OzSourceBufferUtil").getStartBufferedTime(this.$2),b=d("oz-player/utils/OzSourceBufferUtil").getEndBufferedTime(this.$2);if(b>0)return this.$22(a,b)}return this.cancelOperationAndCleanQueue()};b.$23=function(a){if(this.$11.getBool("fix_operation_deferred_promise_lifecycle")){var b=null;if(this.$3)b=this.$3.getPromise(),a&&d("oz-player/loggings/OzLoggingUtils").monitorPromiseAndLogOperation(b,a,"wait_for_source_buffer");else if(this.$2.getIsUpdating()){var e=this.$3=new(c("oz-player/shims/OzDeferred"))(c("oz-player/shims/OzMaybeNativePromise"));b=e.getPromise();a&&d("oz-player/loggings/OzLoggingUtils").monitorPromiseAndLogOperation(b,a,"wait_for_source_buffer")}else return c("oz-player/shims/OzMaybeNativePromise").resolve()}e=this.$3=new(c("oz-player/shims/OzDeferred"))(c("oz-player/shims/OzMaybeNativePromise"));b=e.getPromise();a&&d("oz-player/loggings/OzLoggingUtils").monitorPromiseAndLogOperation(b,a,"wait_for_source_buffer");return b};b.$24=function(a,b,e,f){var g=this;if(this.$3!==null)return c("oz-player/shims/OzMaybeNativePromise").reject(this.$25("cannot have concurrent appends"));var h=function h(){if(g.$11.getBool("sbm_recursively_waits_for_update_end")&&g.$2.getIsUpdating())return g.$23(b).then(h)["catch"](function(a){if(g.$11.getBool("enable_appends_on_wait_update_end_failure"))return h();throw a});if(g.$11.getBool("fix_operation_deferred_promise_lifecycle")&&g.$3!==null)return c("oz-player/shims/OzMaybeNativePromise").reject(g.$25("cannot have concurrent appends (inner)"));var i=g.$3=new(c("oz-player/shims/OzDeferred"))(c("oz-player/shims/OzMaybeNativePromise")),j=!1;try{j=g.$2.getIsUpdating(),g.$2.appendBuffer(a)}catch(a){var k=a,l=c("oz-player/utils/OzCustomErrorCode").APPEND_BUFFER_UNKNOWN_ERROR,m=k.name,n=k.message;m==="QuotaExceededError"?l=c("oz-player/utils/OzCustomErrorCode").APPEND_BUFFER_QUOTA_EXCEEDED_ERROR:g.$10.hasError()?l=c("oz-player/utils/OzCustomErrorCode").APPEND_BUFFER_MEDIA_ERROR_ATTRIBUTE_NOT_NULL:j?l=c("oz-player/utils/OzCustomErrorCode").APPEND_BUFFER_SOURCE_BUFFER_UPDATING_ATTRIBUTE_IS_TRUE:m==="InvalidStateError"&&typeof n==="string"&&/SourceBuffer has been removed/.test(n)?l=c("oz-player/utils/OzCustomErrorCode").APPEND_BUFFER_INVALID_STATE_ERROR_SOURCE_BUFFER_HAS_BEEN_REMOVED:m==="InvalidStateError"&&(l=c("oz-player/utils/OzCustomErrorCode").APPEND_BUFFER_INVALID_STATE_ERROR);j=new(c("oz-player/utils/OzError"))({type:m==="QuotaExceededError"&&g.$11.getBool("append_retry_quota_exceeded_error")?"OZ_SOURCE_BUFFER_QUOTA_EXCEEDED":"OZ_SOURCE_BUFFER",description:String(n),extra:{originalError:k,code:l}});g.$3=null;i.reject(j)}m=i.getPromise();b&&d("oz-player/loggings/OzLoggingUtils").monitorPromiseAndLogOperation(m,b,"append",function(b){var c;b.setLength(a.byteLength);c=(c=e==null?void 0:e.appendTarget)!=null?c:null;b.setAppendTarget(c)});return m.then(function(){f&&f()})};if(!this.$11.getBool("sbm_waits_for_update_end"))return h();if(!this.$11.getBool("sbm_recursively_waits_for_update_end")&&this.$2.getIsUpdating())return this.$23(b).then(h)["catch"](function(a){if(g.$11.getBool("enable_appends_on_wait_update_end_failure"))return h();throw a});this.$15+=a.byteLength;return h()};b.$20=function(){var a=this;if(this.$7)return c("oz-player/shims/OzMaybeNativePromise").reject(this.$25("Another unit of queued data is being appended."));var b=this.$8.shift();if(!b){this.$7=!1;return c("oz-player/shims/OzMaybeNativePromise").resolve()}var e=b.data,f=b.deferred,g=b.loggerProvider,h=b.appendTarget;b=b.onDataAppend;this.$7=!0;e=e instanceof d("oz-player/shims/OzStreams").OzReadableStream?this.$26(e,g,h,b):this.$24(e,g,{appendTarget:h},b);var i=d("oz-player/media_source/SourceBufferManagerUtils").startMeasuringAppendedBuffer(this.$11,this.$2,this.$9);return e["catch"](function(a){f.reject(a)}).then(function(){var b=i(),c=b.startTime;b=b.endTime;f.resolve({startTime_UNSAFE:c,endTime_UNSAFE:b,appendedSec:b-c});a.$7=!1;a.$20()})};b.$26=function(a,b,d,e){var f=this;this.$11.getBool("sbm_abort_on_append_new_readable_stream")&&this.$2.abort();var g=[],h=0,i=a.getReader();a=function a(){var j=new(c("oz-player/shims/OzDeferred"))(c("oz-player/shims/OzMaybeNativePromise"));f.$5=j;var k=null;f.$11.getNumber("sbm_read_timeout_ms")>0&&(k=c("oz-player/shims/ozSetTimeoutAcrossTransitions")(function(){var a=new(c("oz-player/utils/OzError"))({type:"OZ_SOURCE_BUFFER",description:"ReadableStreamReader.read() timed out.",extra:{}});j.reject(a);f.$5=null;f.$6=k=null},f.$11.getNumber("sbm_read_timeout_ms")));i.read().then(function(a){j.resolve(a),f.$5=null,k&&(c("oz-player/shims/ozClearTimeout")(k),f.$6=k=null)})["catch"](function(a){j.reject(a),f.$5=null,k&&(c("oz-player/shims/ozClearTimeout")(k),f.$6=k=null)});return j.getPromise().then(function(i){if(i.done){var j=c("oz-player/utils/ozConcatUint8Arrays")(g);j=j.buffer;g.length=0;h=0;j=j;return j.byteLength>0?f.$24(j,b,{appendTarget:d},e):c("oz-player/shims/OzMaybeNativePromise").resolve()}j=i.value;i=null;var k=j;if(d>0){j=j instanceof Uint8Array?j:new Uint8Array(j);g.push(j);h+=j.byteLength;if(h>=d){j=c("oz-player/utils/ozConcatUint8Arrays")(g);j=j.buffer;g.length=0;h=0;k=j}}k&&k.byteLength>=d&&(i=k);return i?f.$24(i,b,{appendTarget:d},e).then(function(){return a()}):a()},function(a){if(f.$11.getBool("sbm_wait_for_abort_on_reject")){var b=new(c("oz-player/shims/OzDeferred"))(c("oz-player/shims/OzMaybeNativePromise")),d=f.$3?f.$3.getPromise():c("oz-player/shims/OzMaybeNativePromise").resolve();d["catch"](function(){}).then(function(){var c=f.$23();f.$2.abort();c.then(function(){b.reject(a)})["catch"](function(){b.reject(a)})});return b.getPromise()}else{f.$2.abort();return c("oz-player/shims/OzMaybeNativePromise").reject(a)}})};return a()};b.$25=function(a){a=new Error(a);a.name="invariant_violation";return a};b.$21=function(a){a=new Error("operation is cancelled: "+a);a.name="cancelled";return a};b.destroy=function(){var a=this,b=this.$1;b&&b.cloneContext().getOperationLogger("source_buffer_destroy").log();this.$6&&c("oz-player/shims/ozClearTimeout")(this.$6);this.$6=null;b=this.$3;if(b)if(this.$11.getBool("fix_operation_deferred_promise_lifecycle")){var d=function(){a.$3=null,a.$4.release(),a.$4=new(c("oz-player/shims/OzSubscriptionsHandler"))()};this.$13?b.getPromise().then(function(){d()},function(){d()})["catch"](function(){}):(d(),b.reject(this.$21("destroyed")))}else!this.$13?(b.reject(this.$21("destroyed")),this.$3=null,this.$4.release(),this.$4=new(c("oz-player/shims/OzSubscriptionsHandler"))()):b.getPromise()["catch"](function(){a.$3=null,a.$4.release(),a.$4=new(c("oz-player/shims/OzSubscriptionsHandler"))()});this.$9.destroy()};b.getTotalTimeInBufferForRange=function(a,b){var c=this.$2.getBuffered(),d=0;for(var e=0;e=c.start(e)&&(d+=Math.min(c.end(e),b)-Math.max(c.start(e),a));return d};b.getTotalTimeInBuffer=function(){var a=this.$2.getBuffered(),b=0;for(var c=0;c0&&a>=c&&e.$11.getBool("clear_sbm_buffer_on_byte_threshold")){a=Math.max(0,e.$1.currentTime-e.$29());a>0&&b.clearRangeWithWait(0,a)}e.$26()}))};b.$27=function(a){var b=this;return c("oz-player/shims/getOzVTTSourceBufferImpl")().then(function(d){if(b.$21!=null){var e=new d({onCaptionsChanged:b.$21}),f=c("oz-player/shims/ozThrottle")(function(){e.setCurrentVideoTime(b.$1.currentTime)},200);b.$3.addSubscriptions(c("oz-player/shims/OzDOMEventListener").listenDOMEvent(b.$1,"timeupdate",function(){f()}),{remove:function(){f=function(){}}});return e}else throw new(c("oz-player/utils/OzError"))({type:"OZ_SOURCE_BUFFER",description:'Failed to addSourceBuffer("'+a+'"): No handleVttCaptionsUpdated callback provided',extra:{code:c("oz-player/utils/OzCustomErrorCode").SOURCE_BUFFER_MANAGER_ADD_SOURCE_BUFFER_ERROR.toString()}})})};b.createSourceBufferManager=function(a,b){var e=this;b===void 0&&(b=!1);return c("oz-player/shims/OzMaybeNativePromise").all([this.$23(),this.$24(a,b)]).then(function(b){b[0];b=b[1];var f=new(c("oz-player/media_source/SourceBufferManager"))(b,e.$11,e.$9,function(a){return e.$2.readyState!=="closed"&&(e.$11.getBool("should_check_that_source_buffer_attached")?e.$30(a):!0)},function(){return e.$2.readyState},e.$5.cloneContext().setType(d("oz-player/utils/OzMimeUtil").getMimeType(a)));e.$25(b,f,a);e.$7.set(a,f);return f})["catch"](function(a){if(a instanceof c("oz-player/utils/OzError"))throw a;else{a=new(c("oz-player/utils/OzError"))({type:"OZ_SOURCE_BUFFER",description:"Failed to create SBM: "+(a.message||String(a)),extra:{originalError:a,code:c("oz-player/utils/OzCustomErrorCode").SOURCE_BUFFER_MANAGER_CREATE_ERROR.toString()}});throw a}})};b.setOnClearVideoNodeError=function(a){this.$16=a};b.setOnRetryVideoElementError=function(a){this.$17=a};b.getMediaSource=function(){return this.$2};b.notifyEndOfStream=function(a){var b=this,d=new(c("oz-player/shims/OzDeferred"))(c("oz-player/shims/OzMaybeNativePromise"));this.$3.addSubscriptions(c("oz-player/shims/OzDOMEventListener").listenDOMEvent(this.$2,"sourceended",function(){d.resolve()}));this.$8.push(function(c){b.$11.getBool("check_mediasource_readystate_before_end_of_stream")?c.readyState==="open"&&(a(b.$5.getOperationLogger("end_of_stream")).log(),c.endOfStream()):(a(b.$5.getOperationLogger("end_of_stream")).log(),c.endOfStream())});this.$26();return d.getPromise()};b.updateDuration=function(a){this.$8.push(function(b){b.duration=a}),this.$26()};b.detach=function(){this.$18&&(c("oz-player/shims/ozClearTimeout")(this.$18),this.$18=null);this.$5.getOperationLogger("source_buffer_detach").unsetMediaSourceSourceBuffers();var a=this.$1.src;this.$1.removeAttribute("src");for(var b=0;b0?f:"HTTP error."));typeof f!=="string"&&typeof f.getReader==="function"||c("oz-player/shims/ozvariant")(0,3287);h=f;for(var a=0;a=a.startByte}function d(a,b){a=a;b=b;if(b.startBytea.endByte+1)return null;c=b.endByte==null||b.endByte>a.endByte?b.endByte:a.endByte;return{startByte:a.startByte,endByte:c}}function e(a,b){if(b.endByte==null)return null;if(a.startByte>b.endByte)return{startByte:a.startByte,endByte:a.endByte};return a.endByte!=null&&a.endByte<=b.endByte?null:{startByte:b.endByte+1,endByte:a.endByte}}function g(a){return a.endByte==null?null:a.endByte-a.startByte+1}f.startsAtSame=a;f.startsImmediateAfter=b;f.startsDuring=c;f.union=d;f.disjoinAfter=e;f.getLength=g}),66); __d("oz-player/networks/OzProducerInterruptedError",[],(function(a,b,c,d,e,f){"use strict";a=function(a){babelHelpers.inheritsLoose(b,a);function b(){return a.apply(this,arguments)||this}return b}(babelHelpers.wrapNativeSuper(Error));f["default"]=a}),66); __d("oz-player/networks/OzDeferredBuffer",["oz-player/networks/OzProducerInterruptedError","oz-player/shims/OzDeferred","oz-player/shims/OzMaybeNativePromise"],(function(a,b,c,d,e,f,g){"use strict";a=function(){function a(a){a===void 0&&(a={});this.$2=[];this.$3=!1;this.$5=0;a=a;a=a.disableArrayShift;this.$1=!!a}var b=a.prototype;b.produce=function(a){this.$6(a)};b.signalProducerInterruption=function(){this.$6(new(c("oz-player/networks/OzProducerInterruptedError"))("producer interrupted"))};b.consume=function(a){var b=this;if(this.$3)throw new Error("A buffer can only be consumed by one client at a time");this.$3=!0;var d=c("oz-player/shims/OzMaybeNativePromise").resolve();this.isEmpty()&&(this.$4=new(c("oz-player/shims/OzDeferred"))(c("oz-player/shims/OzMaybeNativePromise")),d=this.$4.getPromise());return d.then(function(){if(b.$1){if(b.$2[b.$5]===void 0)throw new Error("buffer has no value at position "+b.$5)}else if(b.$2.length===0)throw new Error("buffer length must not be 0");b.$4=null;b.$3=!1;var c=b.$1?b.$7(a):b.$8(a);if(c instanceof Uint8Array)return c;throw c})};b.$6=function(a){this.$2.push(a),this.$4&&this.$4.resolve()};b.$7=function(a){var b=this.$2[this.$5];if(b===void 0)return new Uint8Array([]);b=b;if(!(b instanceof Uint8Array)){this.$2[this.$5]=void 0;this.$5++;return b}if(a!==void 0&&b.length>a){var c=b.slice(a);b=b.slice(0,a);this.$2[this.$5]=c}else this.$2[this.$5]=void 0,this.$5++;return b};b.$8=function(a){if(this.$2.length===0)return new Uint8Array([]);var b=this.$2[0];if(!(b instanceof Uint8Array)){this.$2.shift();return b}if(a!==void 0&&b.length>a){var c=b.slice(a);b=b.slice(0,a);this.$2[0]=c}else this.$2.shift();return b};b.isEmpty=function(){return this.$1?this.$2[this.$5]===void 0:this.$2.length===0};return a}();g["default"]=a}),98); __d("oz-player/utils/ozPipeErrorTo",[],(function(a,b,c,d,e,f){"use strict";function a(a,b){try{a==null?void 0:a.error(b)}catch(a){}}f["default"]=a}),66); __d("oz-player/networks/OzPausableRangeStream",["oz-player/manifests/OzByteRange","oz-player/networks/OzDeferredBuffer","oz-player/shims/OzDeferred","oz-player/shims/OzMaybeNativePromise","oz-player/utils/ozPipeErrorTo"],(function(a,b,c,d,e,f,g){"use strict";function h(){return new Error("Upstream has an inconsistent range")}var i=function(){function a(){this.$1=0}var b=a.prototype;b.setBytesToSkip=function(a){this.$1=a};b.setBytesSkipped=function(a){this.$1-=a};b.getBytesToSkip=function(){return this.$1};b.hasMoreBytesToSkip=function(){return this.$1>0};return a}();a=function(){function a(b,d,e,f,g){var j=this;this.$5=!1;this.$7=0;this.$8=0;this.$13=!1;this.$14=0;this.$15=new i();this.$16=!1;this.$17=!1;this.$18=!1;this.startStream=function(){j.$13=!0;var b={startByte:j.$1.startByte,endByte:j.$1.endByte};!j.$16?b.startByte+=j.$8:j.$8&&(j.$3.produce("skip_buffered_bytes"),j.$8=0);var d=j.$4;return j.$2.startStream(b).then(function(b){b.pipeTo(j.$17?d:j.$4).then(function(){j.$12&&j.$12.resolve("stream_done")})["catch"](function(b){j.$12&&!j.$12.isSettled()&&(j.$17&&b===a.STREAM_PAUSED?j.$12.resolve("stream_paused"):j.$12.reject(b))});j.$12=new(c("oz-player/shims/OzDeferred"))(c("oz-player/shims/OzMaybeNativePromise"));return{statusPromise:j.$12.getPromise()}})};this.$19=b;this.$20=d;this.$1=e;this.$2=f;b=g||{};d=b.fixStreamingUndefinedEndByte;e=b.disableDeferredBufferArrayShift;f=b.enablePausableStreamResumeFromStartDangerously;g=b.fixPausePreReadableStream;b=b.throwErrorWhenAborted;this.$11=!!d;this.$16=!!f;this.$17=!!g;this.$18=!!b;this.$3=new(c("oz-player/networks/OzDeferredBuffer"))({disableArrayShift:!!e});this.$6=new this.$19({start:function(a){j.$10=a},pull:function(a){if((j.$11&&j.$1.endByte===null&&j.$5||j.$7===j.$21())&&j.$3.isEmpty()){a.close();return c("oz-player/shims/OzMaybeNativePromise").resolve()}var b=function b(){var d=j.$15.hasMoreBytesToSkip()?j.$15.getBytesToSkip():void 0;return j.$3.consume(d).then(function(d){if(j.$15.hasMoreBytesToSkip()){j.$15.setBytesSkipped(d.length);return b()}j.$7+=d.length;var e=j.$21();e!==null&&j.$7>(e||0)&&c("oz-player/utils/ozPipeErrorTo")(j.$10,h());a.enqueue(d)})["catch"](function(a){if(a==="skip_buffered_bytes"){j.$15.setBytesToSkip(j.$7);return b()}throw a})};return b()},cancel:function(a){j.$12&&j.$12.resolve("stream_cancelled"),c("oz-player/utils/ozPipeErrorTo")(j.$9,a)}});this.$4=this.$22()}var b=a.prototype;b.$21=function(){var a=this.$1,b=a.startByte;a=a.endByte;return a!=null?a-b+1:null};b.$22=function(){var a=this;return new this.$20({start:function(b){a.$9=b},write:function(b){a.$3.produce(b),a.$8+=b.length},close:function(){a.$5=!0;var b=a.$1,d=b.endByte;b=b.startByte;a.$11&&d===null&&a.$3.produce(new Uint8Array([]));d!==null&&a.$8!==(d||0)-b+1&&c("oz-player/utils/ozPipeErrorTo")(a.$10,h())},abort:function(b){a.$12&&(a.$18?a.$12.reject(b):a.$12.resolve("stream_aborted")),c("oz-player/utils/ozPipeErrorTo")(a.$10,b)}})};b.getStream=function(){return this.$6};b.pauseStream=function(){c("oz-player/utils/ozPipeErrorTo")(this.$9,a.STREAM_PAUSED),this.$12&&this.$12.resolve("stream_paused"),this.$4=this.$22()};b.getByteRange=function(){return this.$1};b.getBytesStreamed=function(){return this.$7};b.tryConcatByteRange=function(a){if(this.$13||!d("oz-player/manifests/OzByteRange").startsImmediateAfter(a,this.$1))return!1;this.$1={startByte:this.$1.startByte,endByte:a.endByte};return!0};return a}();a.STREAM_PAUSED="streamPaused";g["default"]=a}),98); __d("oz-player/networks/RequestParamCreator",["oz-player/shims/OzURI"],(function(a,b,c,d,e,f,g){"use strict";a=function(a,b){var d=this;this.createRequestParam=function(a,b){var e=new(c("oz-player/shims/OzURI"))(a.toString());if(b){a=b.startByte;var f=b.endByte;a===0&&(f===null||f===void 0)||(e.addQueryData({bytestart:b.startByte}),f!==null&&f!==void 0&&e.addQueryData({byteend:f}))}if(d.$2){var g=d.$2(e);g&&Object.keys(g).forEach(function(a){var b=g[a];e.addQueryData(a,b)})}a=d.$1&&d.$1(e)?"include":"same-origin";return{uri:e,http:{credentials:a}}};this.$1=a;this.$2=b};g["default"]=a}),98); __d("oz-player/networks/getOzSegmentStreamableRange",[],(function(a,b,c,d,e,f){"use strict";function a(a){if(!a.length)return null;var b=a[0].getURI().toString(),c=a[0].getByteRange();if(!c)return null;var d=c;for(var e=1;e0||c("oz-player/shims/ozvariant")(0,212);var f=c("oz-player/networks/getOzSegmentStreamableRange")(a)||{startByte:0,endByte:null},g=this.$6?this.$6():null,h=this.$13(a[0]);h=new(c("oz-player/networks/OzNetworkRequestStream"))(this.$2,h,null,this.$1,this.$4,g,this.$3,this.$9,e,this.$5);return this.$14(f,h,b,d,a)};b.createPausableStream=function(a,b,d){a.length>0||c("oz-player/shims/ozvariant")(0,212);var e=c("oz-player/networks/getOzSegmentStreamableRange")(a)||{startByte:0,endByte:null},f=null,g=this.$2.getNumber("network_seg_timeout_ms");g>0&&(f={networkTimeoutMs:g});g=this.$6?this.$6():null;var h=this.$13(a[0]),i=new(c("oz-player/networks/OzNetworkRequestStream"))(this.$2,h,f,this.$1,this.$4,g,this.$3,this.$9,null,this.$5,this.$11);return{pausableStream:this.$15(e,i,b||null,d),loggingPayloads:{getRequestUrl:function(){return i.getLastRequestUrl()||null},isPrefetch:function(){return i.retrievedFromCache()},segments:a,getResponse:function(){return i.getLastResponse()}}}};b.requestRawUrl=function(a,b,d){d===void 0&&(d=null);var e=this.$6?this.$6():null;a=new(c("oz-player/networks/OzNetworkRequestStream"))(this.$2,new(c("oz-player/shims/OzURI"))(a),b,this.$1,this.$4,e,this.$3,this.$9,null,this.$5,this.$11);b={startByte:0,endByte:null};return this.$14(b,a,[],d)};b.$15=function(a,b,e,f){b=b;if(e!=null)for(var g=0;g>>31;d=d&2147483647;var g=f.readUint32();f.readUint32();if(e==1)throw new Error("Heirarchical SIDXs are not supported.");var h=l/i,j=(l+g)/i;a===0&&(n=h);var k=m,q=k+d-1,r=new(c("oz-player/manifests/OzSegmentOptions"))();p.push(o?new(c("oz-player/manifests/OzDataSegment"))(b,h-n,j-n,k,q):{getData:function(){return null},getURI:function(){return b},getTimeRange:function(){return{startTime:h-n,endTime:j-n}},getByteRange:function(){return{startByte:k,endByte:q}},getSequenceNumber:function(){return null},getOptions:function(){return r}});l+=g;m+=d};for(var d=0;da)return d}return null};b.getSegmentAfter=function(a){var b=this.$1(),c=b.findIndex(function(b){return b.getTimeRange().startTime===a.getTimeRange().startTime&&b.getTimeRange().endTime===a.getTimeRange().endTime});return c>=0&&c+10?a[a.length-1]:null;return a};b.getMaxGopSec=function(){return null};return a}();f["default"]=a}),66); /** * License: https://www.facebook.com/legal/license/8SOvLuObRf9/ */ __d("oz-player/parsers/OzWebmSidxParser",["oz-player/manifests/OzDataSegment","oz-player/shims/OzDataViewReader","oz-player/shims/ozvariant"],(function(a,b,c,d,e,f,g){"use strict";var h=.1,i=440786851,j=408125543,k=357149030,l=2807729,m=17545,n=475249515,o=187,p=179,q=183,r=241,s=[new Uint8Array([255]),new Uint8Array([127,255]),new Uint8Array([63,255,255]),new Uint8Array([31,255,255,255]),new Uint8Array([15,255,255,255,255]),new Uint8Array([7,255,255,255,255,255]),new Uint8Array([3,255,255,255,255,255,255]),new Uint8Array([1,255,255,255,255,255,255,255])];function t(a,b){if(!a&&!b)return!0;if(!a||!b)return!1;if(a.length!=b.length)return!1;for(var c=0;c8)throw new RangeError("EbmlElement: Unsigned integer has too many bytes.");if(this.$1.byteLength==8&&this.$1.getUint8(0)&224)throw new RangeError("EbmlParser: Unsigned integer must be at most 53 bits.");var a=0;for(var b=0;b7)throw new RangeError("EbmlParser: EBML ID must be at most 7 bytes.");var b=0;for(var c=0;c8)throw new RangeError("EbmlParser: Variable sized integer must fit within 8 bytes.");c=new Uint8Array(b);c[0]=a;for(var a=1;a=0&&(k>=0||c("oz-player/shims/ozvariant")(0,4010),i.push(new(c("oz-player/manifests/OzDataSegment"))(g,j,m,k,l-1)));j=m;k=l}if(j>=0){k>=0||c("oz-player/shims/ozvariant")(0,4010);m=f;a.getBool("handle_invalid_webm_duration")&&(m=f>j?f:j+h);i.push(new(c("oz-player/manifests/OzDataSegment"))(g,j,m,k,null))}return i}function y(a){a=a.createParser();var b=a.parseElement();if(b.id!=p)return null;b=b.getUint();a=a.parseElement();if(a.id!=q)return null;a=a.createParser();var c=0;while(a.hasMoreData()){var d=a.parseElement();if(d.id!=r)continue;c=d.getUint();break}return{unscaledTime:b,relativeOffset:c}}function z(a){a=a.createParser();var b=null;while(a.hasMoreData()){var c=a.parseElement();if(c.id!=k)continue;b=c;break}return!b?null:w(b)}function A(a){a=new v(a);var b=a.parseElement();if(b.id!=i)return null;b=a.parseElement();if(b.id!=j)return null;a=b.getOffset();b=z(b);return!b?null:{segmentOffset:a,timecodeScale:b.timecodeScale,duration:b.duration}}function a(a,b,c,d){d=new DataView(d.buffer);c=new DataView(c.buffer);d=A(d);if(!d)return[];c=new v(c);c=c.parseElement();return c.id!=n?[]:x(a,c,d.segmentOffset,d.timecodeScale,d.duration,b)}g.parse=a}),98); __d("oz-player/parsers/OzSidxSegmentsParser",["oz-player/loggings/OzLoggingUtils","oz-player/manifests/OzSegmentOptions","oz-player/manifests/OzZeroTimeRangeSegment","oz-player/networks/getOzBandwidthEstimatorPipeThroughReporter","oz-player/parsers/OzMp4SidxParser","oz-player/parsers/OzSidxSegmentsContainer","oz-player/parsers/OzWebmSidxParser","oz-player/shims/OzEventEmitter","oz-player/shims/OzMaybeNativePromise","oz-player/shims/OzURI","oz-player/utils/OzErrorEmitter","oz-player/utils/OzReadableStreamUtils"],(function(a,b,c,d,e,f,g){"use strict";function h(a){a=a.split("-");return{startByte:Number.parseInt(a[0],10),endByte:Number.parseInt(a[1],10)}}a=function(){function a(a,b,d,e,f,g,h,i){i===void 0&&(i=!1),this.$6=new(c("oz-player/utils/OzErrorEmitter"))(),this.$7=[],this.$9=new(c("oz-player/shims/OzEventEmitter"))(),this.$1=b,this.$2=new(c("oz-player/shims/OzURI"))(d),this.$3=e,this.$5=f,this.$4=g,this.$8=h.cloneContext().setType("sidx"),this.$10=a,this.$11=i}var b=a.prototype;b.onError=function(a){return this.$6.onError(a)};b.parseInitializationSegment=function(){var a=this,b=this.$1.Initialization[0].$.range,d=h(b),e=new(c("oz-player/manifests/OzSegmentOptions"))();b=this.$10.getBool("sidx_parser_memory_optimization")?new(c("oz-player/manifests/OzZeroTimeRangeSegment"))(this.$2,d.startByte,d.endByte):{getData:function(){return null},getURI:function(){return a.$2},getTimeRange:function(){return{startTime:0,endTime:0}},getByteRange:function(){return d},getSequenceNumber:function(){return null},getOptions:function(){return e}};return b};b.parseSegmentsContainer=function(){var a=this,b=function(){d("oz-player/loggings/OzLoggingUtils").monitorPromiseAndLogOperation(a.$12(),a.$8,"process_sidx")["catch"](a.$6.emitError)},e=this.$10.getBool("lazy_parse_sidx")&&!this.$11;e||b();e=new(c("oz-player/parsers/OzSidxSegmentsContainer"))(function(){return a.$7},this.$9,e?b:null);return e};b.$13=function(a,b,e){e===void 0&&(e="DISABLE_CACHE");a=new(c("oz-player/manifests/OzZeroTimeRangeSegment"))(a,b.startByte,b.endByte);b=this.$5+";sidx";a=this.$4.request([a],[c("oz-player/networks/getOzBandwidthEstimatorPipeThroughReporter")(b)],this.$8,e);b=a.getStream().getReader();return d("oz-player/utils/OzReadableStreamUtils").pumpAllData(b)};b.$12=function(){var a=this,b=this.$1.$.indexRange,e=h(b);b=[this.$13(this.$2,e)];if(this.$3==="webm"){var f=h(this.$1.Initialization[0].$.range);b.push(this.$13(this.$2,f,"ENABLE_CACHE"));f=c("oz-player/shims/OzMaybeNativePromise").all(b).then(function(b){var c=b[0];b=b[1];a.$7=d("oz-player/parsers/OzWebmSidxParser").parse(a.$10,a.$2,c,b)})}else f=b[0].then(function(b){a.$7=d("oz-player/parsers/OzMp4SidxParser").parse(a.$10,a.$2,e.startByte,b)});return f.then(function(){a.$9.emit("segment_updated")})};return a}();g["default"]=a}),98); __d("oz-player/parsers/OzVideoContainerType",[],(function(a,b,c,d,e,f){"use strict";function a(a){return(a.split("/")[1]||"").trim()}f.parse=a}),66); __d("oz-player/parsers/OzRepresentationParserBase",["oz-player/manifests/OzRepresentationBase","oz-player/parsers/OzSegmentTemplateParser","oz-player/parsers/OzSidxSegmentsParser","oz-player/parsers/OzVideoContainerType","oz-player/parsers/getMIMECodecs","oz-player/shims/ozvariant","oz-player/utils/OzError","oz-player/utils/OzErrorEmitter","oz-player/utils/OzMimeUtil"],(function(a,b,c,d,e,f,g){"use strict";a=function(){function a(a,b,d,e,f,g,h,i,j,k,l){this.$5=new(c("oz-player/utils/OzErrorEmitter"))();this.$1=b;this.$6=e;this.$7=f;this.$9=d;this.$10=a;this.$11=g;this.$2=h;this.$3=i;this.$4=j;this.$12=k;this.$13=l;try{this.$7=this.$7.cloneContext().setRepresentationID(this.parseID())}catch(a){}}var b=a.prototype;b.$14=function(){var a=this,b=this.$8;if(b)return b;if(this.$1.SegmentBase){var e=this.$1.SegmentBase[0],f=this.$1.BaseURL[0]._;typeof f==="string"||c("oz-player/shims/ozvariant")(0,29051);var g=this.$12.includes(this.$1.$.id);b=new(c("oz-player/parsers/OzSidxSegmentsParser"))(this.$10,e,f,d("oz-player/parsers/OzVideoContainerType").parse(this.$1.$.mimeType),d("oz-player/utils/OzMimeUtil").getMimeType(this.$1.$.mimeType),this.$6,this.$7,g);b.onError(function(b){var c;if((c=a.$13)==null?void 0:c.handleError(a.parseID(),b))return;return a.$5.emitError(b)})}else if(this.$1.SegmentTemplate)b=this.$15(this.$1.SegmentTemplate[0],{isShared:!1});else if(this.$2)b=this.$15(this.$2[0],{isShared:!0});else{e=new(c("oz-player/utils/OzError"))({type:"OZ_REPRESENTATION_PARSER",description:"Unrecognized representation type",extra:{code:"OZ_RP-7"}});throw e}this.$8=b;return b};b.$15=function(a,b){var d;a=a;b.isShared&&(a=babelHelpers["extends"]({},a,{$:babelHelpers["extends"]({},a.$,{initialization:a.$.initialization.replace("$RepresentationID$",this.$1.$.id),media:a.$.media.replace("$RepresentationID$",this.$1.$.id)})}));b=this.$9.mpdUrl;var e=this.$1.BaseURL&&this.$1.BaseURL[0]?this.$1.BaseURL[0]._:null;e=e!=null?e:b;if(e==null){var f=new(c("oz-player/utils/OzError"))({type:"OZ_REPRESENTATION_PARSER",description:"Missing mpd url for template manifest",extra:{code:"OZ_RP-6"}});throw f}f=this.$9.customSegmentTimelineParser;d=(d=this.$9.customRepresentationParsers)==null?void 0:d.initializationBinary;d=d?d(this.$1):null;return new(c("oz-player/parsers/OzSegmentTemplateParser"))(this.$10,a,{baseUrl:e,mpdUrl:b,isStaticMpd:this.$11.manifestType==="static",isTemplatedMpd:this.$11.manifestIsTemplated},f,d)};b.onError=function(a){return this.$5.onError(a)};b.parseInitSegment=function(){return this.$14().parseInitializationSegment()};b.parseBandwidth=function(){return Number(this.$1.$.bandwidth)};b.parseMimeCodecs=function(){var a,b;a=(a=(a=this.$1.$.mimeType)!=null?a:this.$3)!=null?a:"";b=(b=(b=this.$1.$.codecs)!=null?b:this.$4)!=null?b:"";return c("oz-player/parsers/getMIMECodecs")(a,b)};b.parseSegmentsContainer=function(){return this.$14().parseSegmentsContainer()};b.parseID=function(){return""+this.$1.$.id};b.parseCustomFieldFirstSegment=function(){var a=this.$9.customRepresentationParsers?this.$9.customRepresentationParsers.firstSegmentParser:null;return a?a(this.$1):null};b.parse=function(){return new(c("oz-player/manifests/OzRepresentationBase"))(this.$1,this.parseID(),this.parseMimeCodecs(),this.parseInitSegment(),this.parseSegmentsContainer(),this.parseBandwidth(),this.parseCustomFieldFirstSegment(),this.$9.customRepresentationParsers)};return a}();g["default"]=a}),98); __d("oz-player/parsers/OzApplicationRepresentationParser",["oz-player/manifests/OzApplicationRepresentation","oz-player/parsers/OzRepresentationParserBase"],(function(a,b,c,d,e,f,g){"use strict";a=function(a){babelHelpers.inheritsLoose(b,a);function b(b,c,d,e,f,g,h,i,j,k){b=a.call(this,b,c,d,e,f,g,h,i,j,k)||this;b.$OzApplicationRepresentationParser1=c;b.$OzApplicationRepresentationParser2=d;return b}var d=b.prototype;d.parse=function(){var a=this.$OzApplicationRepresentationParser2.customRepresentationParsers;return new(c("oz-player/manifests/OzApplicationRepresentation"))(this.$OzApplicationRepresentationParser1,this.parseID(),this.parseMimeCodecs(),this.parseInitSegment(),this.parseSegmentsContainer(),this.parseBandwidth(),this.parseCustomFieldFirstSegment(),a)};return b}(c("oz-player/parsers/OzRepresentationParserBase"));g["default"]=a}),98); __d("oz-player/manifests/OzAudioRepresentation",["oz-player/manifests/OzRepresentationBase"],(function(a,b,c,d,e,f,g){"use strict";a=function(a){babelHelpers.inheritsLoose(b,a);function b(b,c,d,e,f,g,h,i){d=a.call(this,b,c,d,e,f,g,h,i)||this;d.$OzAudioRepresentation1=b;d.$OzAudioRepresentation2=c;d.$OzAudioRepresentation3=g;return d}var c=b.prototype;c.getBitrateKbps=function(){var a=1024;return(this.$OzAudioRepresentation3/a).toFixed(1)+"Kbps"};c.getQualityLabel=function(){return this.$OzAudioRepresentation2};return b}(c("oz-player/manifests/OzRepresentationBase"));g["default"]=a}),98); __d("oz-player/parsers/OzAudioRepresentationParser",["oz-player/manifests/OzAudioRepresentation","oz-player/parsers/OzRepresentationParserBase"],(function(a,b,c,d,e,f,g){"use strict";a=function(a){babelHelpers.inheritsLoose(b,a);function b(b,c,d,e,f,g,h,i,j,k){b=a.call(this,b,c,d,e,f,g,h,i,j,k)||this;b.$OzAudioRepresentationParser1=c;b.$OzAudioRepresentationParser2=d;return b}var d=b.prototype;d.parse=function(){var a=this.$OzAudioRepresentationParser2.customRepresentationParsers;return new(c("oz-player/manifests/OzAudioRepresentation"))(this.$OzAudioRepresentationParser1,this.parseID(),this.parseMimeCodecs(),this.parseInitSegment(),this.parseSegmentsContainer(),this.parseBandwidth(),this.parseCustomFieldFirstSegment(),a)};return b}(c("oz-player/parsers/OzRepresentationParserBase"));g["default"]=a}),98); __d("oz-player/parsers/OzVideoRepresentationParser",["oz-player/manifests/OzVideoRepresentation","oz-player/parsers/OzRepresentationParserBase"],(function(a,b,c,d,e,f,g){"use strict";a=function(a){babelHelpers.inheritsLoose(b,a);function b(b,c,d,e,f,g,h,i,j,k,l){b=a.call(this,b,c,d,e,f,g,h,i,j,k,l)||this;b.$OzVideoRepresentationParser1=c;b.$OzVideoRepresentationParser2=d;return b}var d=b.prototype;d.parse=function(){var a=Number.parseInt(this.$OzVideoRepresentationParser1.$.height,10),b=Number.parseInt(this.$OzVideoRepresentationParser1.$.width,10),d=this.$OzVideoRepresentationParser2.customRepresentationParsers;return new(c("oz-player/manifests/OzVideoRepresentation"))(this.$OzVideoRepresentationParser1,this.parseID(),this.parseMimeCodecs(),this.parseInitSegment(),this.parseSegmentsContainer(),this.parseBandwidth(),this.parseCustomFieldFirstSegment(),d,b,a)};return b}(c("oz-player/parsers/OzRepresentationParserBase"));g["default"]=a}),98); __d("oz-player/parsers/OzMpdParser",["oz-player/manifests/Mpd","oz-player/parsers/OzApplicationRepresentationParser","oz-player/parsers/OzAudioRepresentationParser","oz-player/parsers/OzVideoRepresentationParser","oz-player/utils/OzErrorEmitter"],(function(a,b,c,d,e,f,g){"use strict";a=function(){function a(a,b,d,e,f,g,h){g===void 0&&(g=[]),h===void 0&&(h=null),this.$2=new(c("oz-player/utils/OzErrorEmitter"))(),this.$5=a,this.$1=d,this.$3=e,this.$4=b,this.$6=f,this.$7=g,this.$8=h}var b=a.prototype;b.onError=function(a){return this.$2.onError(a)};b.parse=function(a){a=a;var b=this.$4.createXmlParser().parse(a);b=b.MPD&&b.MPD.length>0?b.MPD[0]:null;if(!b){var d=2e3;throw new Error("parsed manifest XML missing MPD node; truncated xml ("+d+"/"+a.length+"): "+a.substring(0,d))}d=b.Period&&b.Period.length>0?b.Period[0]:null;if(!d){var e=2e3;throw new Error("parsed manifest XML missing Period node; truncated xml ("+e+"/"+a.length+"): "+a.substring(0,e))}a=d.AdaptationSet||[];e=this.$9(b);d=this.$10(b);var f=this.$11(a,"video"),g=this.$12(f,c("oz-player/parsers/OzVideoRepresentationParser"),{manifestType:e,manifestIsTemplated:d});g.sort(function(a,b){return a.getHeight()-b.getHeight()});var h=this.$11(a,"audio"),i=this.$12(h,c("oz-player/parsers/OzAudioRepresentationParser"),{manifestType:e,manifestIsTemplated:d});i.sort(function(a,b){return a.getBandwidth()-b.getBandwidth()});var j=[];if(this.$5.getBool("vtt_caption_representation")){a=this.$13(a,"application");j=this.$12(a[0],c("oz-player/parsers/OzApplicationRepresentationParser"),{manifestType:e,manifestIsTemplated:d})}a=this.$4.mpdUrl;d=new(c("oz-player/manifests/Mpd"))(b,g,i,j,a,this.$14(b),this.$4.customParsers||new Map(),e==="static");if(this.$6){j=this.$6;j.startEME(f,g,h,i)}return d};b.$14=function(a){a=a.$.minimumUpdatePeriod||"";a=/\d+/g.exec(a);if(a&&a.length){a=a[0];return a?Number.parseInt(a,10):null}return null};b.$9=function(a){return a.$.type||"static"};b.$10=function(a){var b;b=(b=this.$4.customParsers)==null?void 0:b.get("isLiveTemplated");if(!b)return!1;b=b(a);return typeof b==="boolean"&&b};b.$11=function(a,b){return a.find(this.$15(b))};b.$13=function(a,b){return a.filter(this.$15(b))};b.$15=function(a){return function(b){if(b.$.mimeType!=null)return b.$.mimeType.indexOf(a)!==-1;b=b.Representation;return b&&b.length>0&&b[0].$.mimeType.indexOf(a)!==-1}};b.$12=function(a,b,c){var d=this;return!a?[]:a.Representation.map(function(e){e=new b(d.$5,e,d.$4,d.$1,d.$3,c,a.SegmentTemplate,a.$.mimeType,a.$.codecs,d.$7,d.$8);e.onError(d.$2.emitError);return e.parse()})};return a}();g["default"]=a}),98); __d("oz-player/utils/OzMpdUtils",[],(function(a,b,c,d,e,f){"use strict";function g(a){var b=null;a.forEach(function(a){if(a){var c=a.endTime;c<((c=(c=b)==null?void 0:c.endTime)!=null?c:Infinity)&&(b=a)}});return b}function a(a,b){var c=[];c.push.apply(c,a.getVideoRepresentations().concat(a.getAudioRepresentations()));if(c.length)if(b.getBool("get_mpd_least_last_time_range")){a=c.map(function(a){a=a.getEndingSegment();return a?a.getTimeRange():null});return g(a)}else{b=c[0].getEndingSegment();if(b)return b.getTimeRange()}return null}function b(a){var b=[];b.push.apply(b,a.getVideoRepresentations().concat(a.getAudioRepresentations()));if(b.length){a=b[0].getEndingSegment();if(a)return a.getSequenceNumber()}return null}f.getLeastEndTimeTimeRange=g;f.getMpdLastTimeRange=a;f.getMpdLastSequenceNumber=b}),66); __d("oz-player/utils/OzStreamInterruptChecker",["oz-player/shims/OzEventEmitter","oz-player/utils/OzMpdUtils","oz-player/utils/OzNumericalHelper"],(function(a,b,c,d,e,f,g){"use strict";a=function(a){babelHelpers.inheritsLoose(b,a);function b(b,c){var d;d=a.call(this)||this;d.$OzStreamInterruptChecker4=0;d.$OzStreamInterruptChecker5=null;d.$OzStreamInterruptChecker6=!1;d.$OzStreamInterruptChecker2=b;d.$OzStreamInterruptChecker3=c;d.$OzStreamInterruptChecker1=d.$OzStreamInterruptChecker3.getNumber("live_numerical_error_epsilon");return d}var c=b.prototype;c.notifyMpdUpdated=function(){var a=d("oz-player/utils/OzMpdUtils").getMpdLastTimeRange(this.$OzStreamInterruptChecker2,this.$OzStreamInterruptChecker3),b=a?a.endTime:null,c=!1;b!==null&&(c=this.$OzStreamInterruptChecker3.getBool("stream_interrupted_fuzzy_equals")?this.$OzStreamInterruptChecker5!=null&&d("oz-player/utils/OzNumericalHelper").equalTo(b,this.$OzStreamInterruptChecker5,this.$OzStreamInterruptChecker1):b===this.$OzStreamInterruptChecker5);c?this.$OzStreamInterruptChecker4++:(this.$OzStreamInterruptChecker4=0,this.$OzStreamInterruptChecker6&&this.$OzStreamInterruptChecker5!==null&&this.$OzStreamInterruptChecker5!==void 0&&a!==null&&a!==void 0&&this.emit("streamResumedAt",a.startTime),this.$OzStreamInterruptChecker6=!1);c=this.$OzStreamInterruptChecker3.getNumber("stream_interrupt_check_mpd_stale_count_threshold");!this.$OzStreamInterruptChecker6&&c>0&&this.$OzStreamInterruptChecker4>=c&&b!==null&&b!==void 0&&(this.emit("streamInterruptAt",b),this.$OzStreamInterruptChecker6=!0);this.$OzStreamInterruptChecker5=b};return b}(c("oz-player/shims/OzEventEmitter"));g["default"]=a}),98); __d("oz-player/parsers/OzMpdUpdater",["oz-player/parsers/OzMpdParser","oz-player/shims/OzEventEmitter","oz-player/shims/OzSubscriptionsHandler","oz-player/shims/OzURI","oz-player/shims/ozClearTimeout","oz-player/shims/ozSetTimeoutAcrossTransitions","oz-player/utils/OzError","oz-player/utils/OzErrorEmitter","oz-player/utils/OzMpdUtils","oz-player/utils/OzReadableStreamUtils","oz-player/utils/OzStreamInterruptChecker"],(function(a,b,c,d,e,f,g){"use strict";a=function(a){babelHelpers.inheritsLoose(b,a);function b(b,e,f,g,h,i,j){var k;k=a.call(this)||this;k.$OzMpdUpdater8=new(c("oz-player/utils/OzErrorEmitter"))();k.$OzMpdUpdater10=new(c("oz-player/shims/OzSubscriptionsHandler"))();k.$OzMpdUpdater11=!1;k.$OzMpdUpdater15=0;k.$OzMpdUpdater16=0;k.$OzMpdUpdater17=null;k.$OzMpdUpdater19=!0;k.$OzMpdUpdater22=function(){var a,b=k.$OzMpdUpdater2.getLocation();k.$OzMpdUpdater19=!1;if(!b)return;var e=new(c("oz-player/shims/OzURI"))(b),f=String((a=e.getQueryData().ms)!=null?a:e.getQueryData().ms_dev);if(k.$OzMpdUpdater6.getBool("live_disable_mpd_updates_when_paused")&&!k.$OzMpdUpdater12.isPlaying()){k.setupUpdateLoop();return}var g=k.$OzMpdUpdater5.getOperationLogger("update_manifest").start();k.$OzMpdUpdater25(b).then(function(a){var e;k.$OzMpdUpdater16=0;k.$OzMpdUpdater26();k.$OzMpdUpdater7=0;if(k.$OzMpdUpdater19)return;var h=Object.assign({},k.$OzMpdUpdater13,{mpdUrl:b});h=new(c("oz-player/parsers/OzMpdParser"))(k.$OzMpdUpdater6,h,k.$OzMpdUpdater1,k.$OzMpdUpdater5,k.$OzMpdUpdater14);h.onError(function(a){k.$OzMpdUpdater8.emitError(a),g.setError(a).log()});h=h.parse(a);a=k.$OzMpdUpdater2.isStaticMpd();k.$OzMpdUpdater2.updateWith(h);k.$OzMpdUpdater2.markRefreshed();h.isStaticMpd()&&!a&&k.emit("streamTransitionToStatic");h=d("oz-player/utils/OzMpdUtils").getMpdLastTimeRange(k.$OzMpdUpdater2,k.$OzMpdUpdater6);a=h&&h.endTime!=0?h.endTime:null;h=String((h=(h=k.$OzMpdUpdater2)==null?void 0:h.getCustomField("currentServerTimeMs"))!=null?h:"");e=String((e=(e=k.$OzMpdUpdater2)==null?void 0:e.getCustomField("lastVideoFrameTs"))!=null?e:"");h=k.$OzMpdUpdater6.getBool("log_extra_events")?{currentServerTimeMs:h,ingestLastVideoFrameTs:e,nowMs:String(Date.now())}:{};g.setLiveheadPosition(a).setLiveheadSeqNumMpd(d("oz-player/utils/OzMpdUtils").getMpdLastSequenceNumber(k.$OzMpdUpdater2)).setManifestType(k.$OzMpdUpdater2.isStaticMpd()?"static":"dynamic").setIsTemplatedManifest(Boolean(k.$OzMpdUpdater2.getCustomField("isLiveTemplated"))).setPlaybackFbmsParam(f).setUserInfo(h).log();k.$OzMpdUpdater9.notifyMpdUpdated();k.setupUpdateLoop()})["catch"](function(a){k.$OzMpdUpdater26();g.setError(a).log();if(k.$OzMpdUpdater6.getBool("handle_mpd_retries_outside_oz_mpd_updater")){var d;if(k.$OzMpdUpdater6.getBool("convert_dom_exception_to_oz_error"))if(a instanceof c("oz-player/utils/OzError"))d=a;else{var e=a.code!=null?String(a.code):null,f={originalError:a,url:b};e!==null&&(f.code=e);d=new(c("oz-player/utils/OzError"))({type:"OZ_NETWORK",description:a.name+"; "+a.message+"; "+a.description+";",extra:f})}else{d=a instanceof c("oz-player/utils/OzError")?a:new(c("oz-player/utils/OzError"))({type:"OZ_NETWORK",description:"Unknown mpd url load failure; errorMessage: "+a.message+"; errorDescription: "+((e=a.description)!=null?e:"")+";",extra:{originalError:a,url:b}})}k.$OzMpdUpdater24(d,b)}else k.$OzMpdUpdater23(a)})};var l=e.getMinimumUpdatePeriod();k.$OzMpdUpdater7=0;k.$OzMpdUpdater1=f;k.$OzMpdUpdater2=e;k.$OzMpdUpdater12=g;k.$OzMpdUpdater3=l;k.$OzMpdUpdater5=h.cloneContext().setType("manifest");k.$OzMpdUpdater6=b;k.$OzMpdUpdater13=i;k.$OzMpdUpdater14=j;k.$OzMpdUpdater2.addListener("locationUpdated",function(){k.$OzMpdUpdater20(),k.setupUpdateLoop()});k.$OzMpdUpdater9=new(c("oz-player/utils/OzStreamInterruptChecker"))(k.$OzMpdUpdater2,k.$OzMpdUpdater6);k.$OzMpdUpdater10.addSubscriptions(k.$OzMpdUpdater9.addListener("streamResumedAt",function(a){k.emit("streamResumedAt",a)}),k.$OzMpdUpdater9.addListener("streamInterruptAt",function(a){k.emit("streamInterruptAt",a)}));return k}var e=b.prototype;e.$OzMpdUpdater20=function(){c("oz-player/shims/ozClearTimeout")(this.$OzMpdUpdater4),this.$OzMpdUpdater4=null,this.$OzMpdUpdater21(),this.$OzMpdUpdater19=!0};e.setupUpdateLoop=function(){var a,b=!this.$OzMpdUpdater11;b&&this.$OzMpdUpdater6.getBool("stop_manifest_update_when_static")&&(b=!this.$OzMpdUpdater2.isStaticMpd(),this.$OzMpdUpdater3=this.$OzMpdUpdater2.getMinimumUpdatePeriod());a=(a=this.$OzMpdUpdater3)!=null?a:0;b&&a&&this.$OzMpdUpdater2.getLocation()&&(this.$OzMpdUpdater4=c("oz-player/shims/ozSetTimeoutAcrossTransitions")(this.$OzMpdUpdater22,this.$OzMpdUpdater6.getNumber("manifest_update_frequency_ms")||a*1e3))};e.onError=function(a){return this.$OzMpdUpdater8.onError(a)};e.$OzMpdUpdater23=function(a){if(this.$OzMpdUpdater6.getBool("live_gracefully_handle_mpd_errors")){var b;a instanceof c("oz-player/utils/OzError")&&(b=a.getExtra().code||"");var d=["404","503"];this.$OzMpdUpdater6.getBool("live_gracefully_handle_no_network")&&d.push("0");var e=this.$OzMpdUpdater6.getNumber("live_max_try_attempts_on_404"),f=!1;if(b&&d.indexOf(b)>-1)switch(b){case"410":this.$OzMpdUpdater11=!0;f=!0;break;case"404":this.$OzMpdUpdater7++;if(this.$OzMpdUpdater7>=e)break;case"503":case"0":f=!0;break}if(f){this.setupUpdateLoop();return}}this.$OzMpdUpdater8.emitError(a)};e.$OzMpdUpdater24=function(a,b){var c=this;b=!0;var d=this.$OzMpdUpdater16-1,e=a.getExtra().code;this.$OzMpdUpdater17!==e?(this.$OzMpdUpdater17=e,this.$OzMpdUpdater15=1):this.$OzMpdUpdater15++;var f=function(){b=!1};e={endStream:function(){f(),c.$OzMpdUpdater11=!0,c.$OzMpdUpdater6.getBool("live_gracefully_handle_410")&&c.emit("streamGone")},consecutiveFailuresForErrorCode:this.$OzMpdUpdater15,error:a,isInitialRequest:!1,retry:function(b){c.emit("manifestFetchErrorRetry",a),f(),c.setupUpdateLoop()},retryAttemptCount:d};this.emit("manifestFetchError",e);b&&this.$OzMpdUpdater8.emitError(a)};e.$OzMpdUpdater27=function(a,b){a=new(c("oz-player/shims/OzURI"))(a);a.addQueryData("_nc_expid",b);return a.toString()};e.$OzMpdUpdater25=function(a){this.$OzMpdUpdater21();this.$OzMpdUpdater16++;var b=this.$OzMpdUpdater6.getString("cdn_experiment_id");a=b.length===0?a:this.$OzMpdUpdater27(a,b);b=this.$OzMpdUpdater1.requestRawUrl(a,{networkTimeoutMs:this.$OzMpdUpdater6.getNumber("mpd_updater_network_request_timeout_ms")},this.$OzMpdUpdater5);this.$OzMpdUpdater18=b;a=b.getStream().getReader();return d("oz-player/utils/OzReadableStreamUtils").pumpString(a)};e.$OzMpdUpdater21=function(){this.$OzMpdUpdater18&&this.$OzMpdUpdater6.getBool("mpd_update_cancel_current_request_tracker")&&(this.$OzMpdUpdater18.cancel(),this.$OzMpdUpdater16=0),this.$OzMpdUpdater26()};e.$OzMpdUpdater26=function(){this.$OzMpdUpdater18=null};e.destroy=function(){this.$OzMpdUpdater4&&c("oz-player/shims/ozClearTimeout")(this.$OzMpdUpdater4),this.$OzMpdUpdater10.release()};return b}(c("oz-player/shims/OzEventEmitter"));g["default"]=a}),98); __d("oz-player/parsers/OzXmlParserImplDOMParser",["oz-player/utils/OzError"],(function(a,b,c,d,e,f,g){function h(){return{$:{}}}function i(a){var b=h();for(var c=a.attributes,d=0;dd)switch(b[f]){case"textNode":y(c);break;case"cdata":x(c,"oncdata",c.cdata);c.cdata="";break;case"script":x(c,"onscript",c.script);c.script="";break;default:A(c,"Max buffer length exceeded: "+b[f])}e=Math.max(e,h)}h=a.MAX_BUFFER_LENGTH-e;c.bufferCheckPosition=h+c.position}function e(a){for(var c=0,d=b.length;c"||p(a)}function s(a,b){return a.test(b)}function t(a,b){return!s(a,b)}var u=0;a.STATE={BEGIN:u++,BEGIN_WHITESPACE:u++,TEXT:u++,TEXT_ENTITY:u++,OPEN_WAKA:u++,SGML_DECL:u++,SGML_DECL_QUOTED:u++,DOCTYPE:u++,DOCTYPE_QUOTED:u++,DOCTYPE_DTD:u++,DOCTYPE_DTD_QUOTED:u++,COMMENT_STARTING:u++,COMMENT:u++,COMMENT_ENDING:u++,COMMENT_ENDED:u++,CDATA:u++,CDATA_ENDING:u++,CDATA_ENDING_2:u++,PROC_INST:u++,PROC_INST_BODY:u++,PROC_INST_ENDING:u++,OPEN_TAG:u++,OPEN_TAG_SLASH:u++,ATTRIB:u++,ATTRIB_NAME:u++,ATTRIB_NAME_SAW_WHITE:u++,ATTRIB_VALUE:u++,ATTRIB_VALUE_QUOTED:u++,ATTRIB_VALUE_CLOSED:u++,ATTRIB_VALUE_UNQUOTED:u++,ATTRIB_VALUE_ENTITY_Q:u++,ATTRIB_VALUE_ENTITY_U:u++,CLOSE_TAG:u++,CLOSE_TAG_SAW_WHITE:u++,SCRIPT:u++,SCRIPT_ENDING:u++};a.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"};a.ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,"int":8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830};Object.keys(a.ENTITIES).forEach(function(b){var c=a.ENTITIES[b];c=typeof c==="number"?String.fromCharCode(c):c;a.ENTITIES[b]=c});for(var v in a.STATE)a.STATE[a.STATE[v]]=v;u=a.STATE;function w(a,b,c){a[b]&&a[b](c)}function x(a,b,c){a.textNode&&y(a),w(a,b,c)}function y(a){a.textNode=z(a.opt,a.textNode),a.textNode&&w(a,"ontext",a.textNode),a.textNode=""}function z(a,b){a.trim&&(b=b.trim());a.normalize&&(b=b.replace(/\s+/g," "));return b}function A(a,b){y(a);a.trackPosition&&(b+="\nLine: "+a.line+"\nColumn: "+a.column+"\nChar: "+a.c);b=new Error(b);a.error=b;w(a,"onerror",b);return a}function B(a){a.sawRoot&&!a.closedRoot&&C(a,"Unclosed root tag");a.state!==u.BEGIN&&a.state!==u.BEGIN_WHITESPACE&&a.state!==u.TEXT&&A(a,"Unexpected end");y(a);a.c="";a.closed=!0;w(a,"onend");c.call(a,a.strict,a.opt);return a}function C(a,b){if(typeof a!=="object"||!(a instanceof c))throw new Error("bad call to strictFail");a.strict&&A(a,b)}function D(a){a.strict||(a.tagName=a.tagName[a.looseCase]());var b=a.tags[a.tags.length-1]||a,c=a.tag={name:a.tagName,attributes:{}};a.opt.xmlns&&(c.ns=b.ns);a.attribList.length=0;x(a,"onopentagstart",c)}function E(a,b){var c=a.indexOf(":");c=c<0?["",a]:a.split(":");var d=c[0];c=c[1];b&&a==="xmlns"&&(d="xmlns",c="");return{prefix:d,local:c}}function F(a){a.strict||(a.attribName=a.attribName[a.looseCase]());if(a.attribList.indexOf(a.attribName)!==-1||a.tag.attributes.hasOwnProperty(a.attribName)){a.attribName=a.attribValue="";return}if(a.opt.xmlns){var b=E(a.attribName,!0),c=b.prefix;b=b.local;if(c==="xmlns")if(b==="xml"&&a.attribValue!==i)C(a,"xml: prefix must be bound to "+i+"\nActual: "+a.attribValue);else if(b==="xmlns"&&a.attribValue!==j)C(a,"xmlns: prefix must be bound to "+j+"\nActual: "+a.attribValue);else{c=a.tag;var d=a.tags[a.tags.length-1]||a;c.ns===d.ns&&(c.ns=Object.create(d.ns));c.ns[b]=a.attribValue}a.attribList.push([a.attribName,a.attribValue])}else a.tag.attributes[a.attribName]=a.attribValue,x(a,"onattribute",{name:a.attribName,value:a.attribValue});a.attribName=a.attribValue=""}function G(a,b){if(a.opt.xmlns){var c=a.tag,d=E(a.tagName);c.prefix=d.prefix;c.local=d.local;c.uri=c.ns[d.prefix]||"";c.prefix&&!c.uri&&(C(a,"Unbound namespace prefix: "+JSON.stringify(a.tagName)),c.uri=d.prefix);d=a.tags[a.tags.length-1]||a;c.ns&&d.ns!==c.ns&&Object.keys(c.ns).forEach(function(b){x(a,"onopennamespace",{prefix:b,uri:c.ns[b]})});for(var d=0,e=a.attribList.length;d";a.tagName="";a.state=u.SCRIPT;return}x(a,"onscript",a.script);a.script=""}var b=a.tags.length,c=a.tagName;a.strict||(c=c[a.looseCase]());var d=c;while(b--){var e=a.tags[b];if(e.name!==d)C(a,"Unexpected close tag");else break}if(b<0){C(a,"Unmatched closing tag: "+a.tagName);a.textNode+="";a.state=u.TEXT;return}a.tagName=c;e=a.tags.length;while(e-->b){var f=a.tag=a.tags.pop();a.tagName=a.tag.name;x(a,"onclosetag",a.tagName);d={};for(var g in f.ns)d[g]=f.ns[g];c=a.tags[a.tags.length-1]||a;a.opt.xmlns&&f.ns!==c.ns&&Object.keys(f.ns).forEach(function(b){var c=f.ns[b];x(a,"onclosenamespace",{prefix:b,uri:c})})}b===0&&(a.closedRoot=!0);a.tagName=a.attribValue=a.attribName="";a.attribList.length=0;a.state=u.TEXT}function I(a){var b=a.entity,c=b.toLowerCase(),d,e="";if(a.ENTITIES[b])return a.ENTITIES[b];if(a.ENTITIES[c])return a.ENTITIES[c];b=c;b.charAt(0)==="#"&&(b.charAt(1)==="x"?(b=b.slice(2),d=parseInt(b,16),e=d.toString(16)):(b=b.slice(1),d=parseInt(b,10),e=d.toString(10)));b=b.replace(/^0+/,"");if(isNaN(d)||e.toLowerCase()!==b){C(a,"Invalid character entity");return"&"+a.entity+";"}return String.fromCodePoint(d)}function J(a,b){b==="<"?(a.state=u.OPEN_WAKA,a.startTagPosition=a.position):p(b)||(C(a,"Non-whitespace before first tag."),a.textNode=b,a.state=u.TEXT)}function K(a,b){var c="";b"?(x(b,"onsgmldeclaration",b.sgmlDecl),b.sgmlDecl="",b.state=u.TEXT):q(e)?(b.state=u.SGML_DECL_QUOTED,b.sgmlDecl+=e):b.sgmlDecl+=e;continue;case u.SGML_DECL_QUOTED:e===b.q&&(b.state=u.SGML_DECL,b.q="");b.sgmlDecl+=e;continue;case u.DOCTYPE:e===">"?(b.state=u.TEXT,x(b,"ondoctype",b.doctype),b.doctype=!0):(b.doctype+=e,e==="["?b.state=u.DOCTYPE_DTD:q(e)&&(b.state=u.DOCTYPE_QUOTED,b.q=e));continue;case u.DOCTYPE_QUOTED:b.doctype+=e;e===b.q&&(b.q="",b.state=u.DOCTYPE);continue;case u.DOCTYPE_DTD:b.doctype+=e;e==="]"?b.state=u.DOCTYPE:q(e)&&(b.state=u.DOCTYPE_DTD_QUOTED,b.q=e);continue;case u.DOCTYPE_DTD_QUOTED:b.doctype+=e;e===b.q&&(b.state=u.DOCTYPE_DTD,b.q="");continue;case u.COMMENT:e==="-"?b.state=u.COMMENT_ENDING:b.comment+=e;continue;case u.COMMENT_ENDING:e==="-"?(b.state=u.COMMENT_ENDED,b.comment=z(b.opt,b.comment),b.comment&&x(b,"oncomment",b.comment),b.comment=""):(b.comment+="-"+e,b.state=u.COMMENT);continue;case u.COMMENT_ENDED:e!==">"?(C(b,"Malformed comment"),b.comment+="--"+e,b.state=u.COMMENT):b.state=u.TEXT;continue;case u.CDATA:e==="]"?b.state=u.CDATA_ENDING:b.cdata+=e;continue;case u.CDATA_ENDING:e==="]"?b.state=u.CDATA_ENDING_2:(b.cdata+="]"+e,b.state=u.CDATA);continue;case u.CDATA_ENDING_2:e===">"?(b.cdata&&x(b,"oncdata",b.cdata),x(b,"onclosecdata"),b.cdata="",b.state=u.TEXT):e==="]"?b.cdata+="]":(b.cdata+="]]"+e,b.state=u.CDATA);continue;case u.PROC_INST:e==="?"?b.state=u.PROC_INST_ENDING:p(e)?b.state=u.PROC_INST_BODY:b.procInstName+=e;continue;case u.PROC_INST_BODY:if(!b.procInstBody&&p(e))continue;else e==="?"?b.state=u.PROC_INST_ENDING:b.procInstBody+=e;continue;case u.PROC_INST_ENDING:e===">"?(x(b,"onprocessinginstruction",{name:b.procInstName,body:b.procInstBody}),b.procInstName=b.procInstBody="",b.state=u.TEXT):(b.procInstBody+="?"+e,b.state=u.PROC_INST_BODY);continue;case u.OPEN_TAG:s(m,e)?b.tagName+=e:(D(b),e===">"?G(b):e==="/"?b.state=u.OPEN_TAG_SLASH:(p(e)||C(b,"Invalid character in tag name"),b.state=u.ATTRIB));continue;case u.OPEN_TAG_SLASH:e===">"?(G(b,!0),H(b)):(C(b,"Forward-slash in opening tag not followed by >"),b.state=u.ATTRIB);continue;case u.ATTRIB:if(p(e))continue;else e===">"?G(b):e==="/"?b.state=u.OPEN_TAG_SLASH:s(l,e)?(b.attribName=e,b.attribValue="",b.state=u.ATTRIB_NAME):C(b,"Invalid attribute name");continue;case u.ATTRIB_NAME:e==="="?b.state=u.ATTRIB_VALUE:e===">"?(C(b,"Attribute without value"),b.attribValue=b.attribName,F(b),G(b)):p(e)?b.state=u.ATTRIB_NAME_SAW_WHITE:s(m,e)?b.attribName+=e:C(b,"Invalid attribute name");continue;case u.ATTRIB_NAME_SAW_WHITE:if(e==="=")b.state=u.ATTRIB_VALUE;else if(p(e))continue;else C(b,"Attribute without value"),b.tag.attributes[b.attribName]="",b.attribValue="",x(b,"onattribute",{name:b.attribName,value:""}),b.attribName="",e===">"?G(b):s(l,e)?(b.attribName=e,b.state=u.ATTRIB_NAME):(C(b,"Invalid attribute name"),b.state=u.ATTRIB);continue;case u.ATTRIB_VALUE:if(p(e))continue;else q(e)?(b.q=e,b.state=u.ATTRIB_VALUE_QUOTED):(C(b,"Unquoted attribute value"),b.state=u.ATTRIB_VALUE_UNQUOTED,b.attribValue=e);continue;case u.ATTRIB_VALUE_QUOTED:if(e!==b.q){e==="&"?b.state=u.ATTRIB_VALUE_ENTITY_Q:b.attribValue+=e;continue}F(b);b.q="";b.state=u.ATTRIB_VALUE_CLOSED;continue;case u.ATTRIB_VALUE_CLOSED:p(e)?b.state=u.ATTRIB:e===">"?G(b):e==="/"?b.state=u.OPEN_TAG_SLASH:s(l,e)?(C(b,"No whitespace between attributes"),b.attribName=e,b.attribValue="",b.state=u.ATTRIB_NAME):C(b,"Invalid attribute name");continue;case u.ATTRIB_VALUE_UNQUOTED:if(!r(e)){e==="&"?b.state=u.ATTRIB_VALUE_ENTITY_U:b.attribValue+=e;continue}F(b);e===">"?G(b):b.state=u.ATTRIB;continue;case u.CLOSE_TAG:if(!b.tagName)if(p(e))continue;else t(l,e)?b.script?(b.script+=""?H(b):s(m,e)?b.tagName+=e:b.script?(b.script+=""?H(b):C(b,"Invalid characters in closing tag");continue;case u.TEXT_ENTITY:case u.ATTRIB_VALUE_ENTITY_Q:case u.ATTRIB_VALUE_ENTITY_U:var i,j;switch(b.state){case u.TEXT_ENTITY:i=u.TEXT;j="textNode";break;case u.ATTRIB_VALUE_ENTITY_Q:i=u.ATTRIB_VALUE_QUOTED;j="attribValue";break;case u.ATTRIB_VALUE_ENTITY_U:i=u.ATTRIB_VALUE_UNQUOTED;j="attribValue";break}e===";"?(b[j]+=I(b),b.entity="",b.state=i):s(b.entity.length?o:n,e)?b.entity+=e:(C(b,"Invalid character in entity name"),b[j]+="&"+b.entity+e,b.entity="",b.state=i);continue;default:throw new Error(b,"Unknown state: "+b.state)}}b.position>=b.bufferCheckPosition&&d(b);return b}String.fromCodePoint||(function(){var a=String.fromCharCode,b=Math.floor,c=function(){var c=16384,d=[],e,f,g=-1,h=arguments.length;if(!h)return"";var i="";while(++g1114111||b(j)!==j)throw RangeError("Invalid code point: "+j);j<=65535?d.push(j):(j-=65536,e=(j>>10)+55296,f=j%1024+56320,d.push(e,f));(g+1===h||d.length>c)&&(i+=a.apply(null,d),d.length=0)}return i};Object.defineProperty?Object.defineProperty(String,"fromCodePoint",{value:c,configurable:!0,writable:!0}):String.fromCodePoint=c})()})(typeof g==="undefined"?this.sax={}:g)}var j=!1;function k(){j||(j=!0,i());return h.exports}function a(a){switch(a){case void 0:return k()}}e.exports=a}),null); __d("sax",["sax-1.2.4"],(function(a,b,c,d,e,f){e.exports=b("sax-1.2.4")()}),null); __d("oz-player/shims/www/OzSaxWWW",["sax"],(function(a,b,c,d,e,f,g){g["default"]=c("sax")}),98); __d("oz-player/shims/OzSax",["oz-player/shims/www/OzSaxWWW"],(function(a,b,c,d,e,f,g){g["default"]=c("oz-player/shims/www/OzSaxWWW")}),98); __d("oz-player/parsers/OzXmlParserImplSax",["oz-player/shims/OzSax","oz-player/shims/ozvariant","oz-player/utils/OzError"],(function(a,b,c,d,e,f,g){function h(){return{$:{}}}a=function(){function a(){var a=this;this.$4=[];this.$5=function(a){throw a};this.$6=function(b){b=b.name;var d=h(),e=a.$3||a.$2;e||c("oz-player/shims/ozvariant")(0,219);Object.prototype.hasOwnProperty.call(e,b)||(e[b]=[]);e[b].push(d);a.$4.push(e);a.$3=d};this.$8=function(){var b=a.$4.pop();a.$3=b};this.$9=function(b){b=b;b=b.trim();if(!b)return;var d=a.$3;d||c("oz-player/shims/ozvariant")(0,220);d._&&c("oz-player/shims/ozvariant")(0,221);d._=b};this.$7=function(b){var d=b.name;b=b.value;var e=a.$3;e||c("oz-player/shims/ozvariant")(0,222);e.$[d]=b};var b=!0;b=this.$1=c("oz-player/shims/OzSax").parser(b);b.onerror=this.$5;b.onopentagstart=this.$6;b.onattribute=this.$7;b.onclosetag=this.$8;b.ontext=this.$9}var b=a.prototype;b.parse=function(a){var b=h();this.$2=b;try{this.$1.write(a).close()}catch(b){var d=2e3;throw new(c("oz-player/utils/OzError"))({type:"OZ_XML_PARSER",description:b.message+"; truncated xml ("+d+"/"+a.length+"): "+a.substring(0,d),extra:{originalError:b}})}this.$3=null;this.$2=null;this.$4=[];return b};return a}();g["default"]=a}),98); __d("oz-player/playback_controls/OzClearSourceBufferOnSeekManager",["oz-player/shims/OzDeferred","oz-player/shims/OzMaybeNativePromise","oz-player/utils/OzCustomErrorCode","oz-player/utils/OzError","oz-player/utils/OzErrorEmitter"],(function(a,b,c,d,e,f,g){"use strict";a=function(){function a(a,b,d,e){e===void 0&&(e=null),this.$3=new(c("oz-player/utils/OzErrorEmitter"))(),this.$4=new Map(),this.$5=!1,this.$6=!1,this.$7=!1,this.$8=null,this.$9=[],this.$10=null,this.$11=null,this.$1=a,this.$2=b,this.$4=d,this.$11=e}var b=a.prototype;b.$12=function(a){var b;this.$5=!0;return this.$2.getBool("clear_buffer_on_seek_into_unbuffered_range")?(b=this.$8)!=null?b:a.call(this.$1):a.call(this.$1)};b.$13=function(a,b){this.$6=!0,this.$2.getBool("clear_buffer_on_seek_into_unbuffered_range")?(this.$9.push({t:b}),this.$8=b,this.$9.length===1&&this.$14(a)):a.call(this.$1,b)};b.$15=function(a){this.$7=!0;return this.$2.getBool("clear_buffer_on_seek_into_unbuffered_range")?this.$8!=null?!0:a.call(this.$1):a.call(this.$1)};b.$16=function(a,b){var d=this,e=new(c("oz-player/shims/OzDeferred"))(c("oz-player/shims/OzMaybeNativePromise")),f=[];this.$4.forEach(function(c,d){d=c.clearSourceBufferRange(a,b);f.push(d)});var g=c("oz-player/shims/OzMaybeNativePromise").all(f);g.then(function(){e.resolve()})["catch"](function(a){d.$2.getBool("throw_error_on_clear_buffer_on_seek_failed")?e.reject(a):e.resolve()});return e.getPromise()};b.$14=function(a){var b=this,d=this.$9.length>0?this.$9[0]:null,e=this.$2.getNumber("clear_buffer_on_seek_epsilon_s");if(d){var f=d.t;d=this.$1.buffered;var g=d.length,h=d.length<=0,i=-1,j=!1;for(var k=0;i<0&&k=d.start(k)&&f+e-1;var l=this.$2.getNumber("clear_buffer_on_seek_nudge_s");k&&i>=0&&i0&&(f=Math.min(f,d.end(i)-l),f=Math.max(f,d.start(i)+l));if(h||k||!j)this.$11&&this.$11.getOperationLogger("seek_to_next_time").setLength(Math.round(f*1e3)).setInitiator("no_clear").log(),a.call(this.$1,f),this.$9.shift(),this.$14(a);else{var m=null;this.$11&&(m=this.$11.getOperationLogger("clear_buffer_before_seek").setLength(Math.round(f*1e3)).setUserInfo({bufferRangesLength:String(g),nudgeSec:String(l)}).start());i=this.$16(this.$2.getBool("throw_error_on_clear_buffer_on_seek_failed")?Math.max(f-e,0):f-e,d.end(g-1)+e);i.then(function(){m&&m.log(),b.$11&&b.$11.getOperationLogger("seek_to_next_time").setLength(Math.round(f*1e3)).setInitiator("after_clear").log(),a.call(b.$1,f),b.$9.shift(),b.$14(a)})["catch"](function(a){m&&m.setError(a).log(),b.$3.emitError(a instanceof c("oz-player/utils/OzError")?a:new(c("oz-player/utils/OzError"))({type:"OZ_SOURCE_BUFFER",description:a?a.name+": "+a.message:"Unknown error while clearing the buffer.",extra:{code:c("oz-player/utils/OzCustomErrorCode").SOURCE_BUFFER_MANAGER_CLEAR_RANGE_FAILED,originalError:a}}))})}}else this.$8=null};b.maybeOverwriteVideoCurrentTimeProperty=function(){var a=this;if(this.$2.getBool("overwrite_video_current_time_property")){var b,c,d=Object.getOwnPropertyDescriptor&&Object.getOwnPropertyDescriptor(this.$1,"currentTime");d=(b=d)!=null?b:Object.getOwnPropertyDescriptor&&Object.getOwnPropertyDescriptor(HTMLMediaElement.prototype,"currentTime");b=Object.getOwnPropertyDescriptor&&Object.getOwnPropertyDescriptor(this.$1,"seeking");b=(c=b)!=null?c:Object.getOwnPropertyDescriptor&&Object.getOwnPropertyDescriptor(HTMLMediaElement.prototype,"seeking");var e=d&&typeof d.get==="function"?d.get:null,f=d&&typeof d.set==="function"?d.set:null,g=b&&typeof b.get==="function"?b.get:null;if(e&&f&&g&&Object.defineProperty){try{Object.defineProperty(this.$1,"currentTime",{get:function(){return a.$12(e)},set:function(b){a.$13(f,b)},configurable:!0,enumerable:!0});Object.defineProperty(this.$1,"seeking",{get:function(){return a.$15(g)},configurable:!0,enumerable:!0});c=this.$1.currentTime;this.$1.currentTime=c;this.$1.seeking}catch(a){}this.$17(function(){a.getCurrentTimePropertyOverwriteSuccess()&&Object.defineProperty(a.$1,"currentTime",{get:e,set:f,configurable:!0,enumerable:!0}),a.getSeekingPropertyOverwriteSuccess()&&Object.defineProperty(a.$1,"seeking",{get:g,configurable:!0,enumerable:!0})})}}};b.getCurrentTimePropertyOverwriteSuccess=function(){return this.$5&&this.$6};b.getSeekingPropertyOverwriteSuccess=function(){return this.$7};b.$17=function(a){this.$10=a};b.onError=function(a){return this.$3.onError(a)};b.destroy=function(){try{this.$10&&this.$10()}catch(a){}};return a}();g["default"]=a}),98); __d("sumOfArray",[],(function(a,b,c,d,e,f){function a(a){var b=0,c=a.length;for(var d=0;dthis.$5&&(this.$3=!0)};b.recommendedLatency=function(a){if(!this.$3)return 0;var b=c("sumOfArray")(this.$2)/this.$2.length;b=b-this.$7;return a-b};b.destroy=function(){this.$1.release()};return a}();g["default"]=a}),98); __d("oz-player/playback_controls/OzLiveLatencyManager",["oz-player/playback_controls/OzSteadyStateManager","oz-player/shims/OzDOMEventListener","oz-player/shims/OzSubscriptionsHandler","oz-player/shims/ozThrottle","oz-player/utils/OzSourceBufferUtil"],(function(a,b,c,d,e,f,g){"use strict";a=function(){function a(a){var b=this;this.$8=new(c("oz-player/shims/OzSubscriptionsHandler"))();this.$9=null;this.$11=!1;this.$12=null;this.$13=null;this.$14=null;this.$15=!0;var d=a.config,e=a.mpd,f=a.playbackState,g=a.bufferingDetector,h=a.video;a=a.loggerProvider;this.$1=d;this.$2=e;this.$3=f;d.getNumber("steady_state_measurement_duration_ms")>0&&(this.$7=new(c("oz-player/playback_controls/OzSteadyStateManager"))(d,h));g!=null&&(this.$8.addSubscriptions(g.addListener("enterBuffering",function(a){if(a=="in_play"){b.$9=0;(a=b.$7)==null?void 0:a.reset()}b.$11=!1;(a=b.$6)==null?void 0:a.log();b.$6=null})),this.$8.addSubscriptions(g.addListener("leaveBuffering",function(){b.$9==0&&(b.$9=Date.now()),b.$11=!1})));this.$4=h;this.$5=a;this.$16()&&this.$8.addSubscriptions(c("oz-player/shims/OzDOMEventListener").listenDOMEvent(this.$4,"timeupdate",c("oz-player/shims/ozThrottle")(function(){b.$17()},this.$1.getNumber("playhead_manager_timeupdate_throttle_ms"))),c("oz-player/shims/OzDOMEventListener").listenDOMEvent(this.$4,"seeking",function(){b.$14=Date.now(),b.$12=null}),c("oz-player/shims/OzDOMEventListener").listenDOMEvent(this.$4,"playing",function(){b.$14=Date.now(),b.$12=null}))}var b=a.prototype;b.enabled=function(){var a=this.$1.getNumber("catchup_timeout_after_buffering_sec");return a==0||this.$9==null||this.$9!=0&&this.$9+a*1e3<=Date.now()};b.isBehindPreferredLiveHeadLatencyWithTolerance=function(){return this.$3.getCurrentTime()0?a:b};b.getPreferredLiveHeadLatencyToleranceSec=function(){return this.$1.getNumber("pdash_download_cursor_catchup_tolerance_sec")};b.shouldEnableManifestTimeRangeCatchup=function(){return!this.$1.getNumber("pdash_download_cursor_catchup_threshold_sec")};b.shouldEnableCursorBasedCatchup=function(){var a=this.$2.getVideoRepresentations()[0];a=a&&a.canPredict();return a&&this.$1.getNumber("pdash_download_cursor_catchup_threshold_sec")>0};b.setEnablePlaybackRateAdjustmentForSession=function(a){this.$15=a};b.$22=function(a,b,c){var d=this.$1.getNumber("playback_speed_min_sharpness_factor");c=a*2/(1+Math.pow(Math.E,-(c-b)*d));return 1-a+c};b.$16=function(){return this.$1.getNumber("playback_speed_latency_adjustment_rate")>0||this.$1.getNumber("playback_speed_latency_slowdown_adjustment_rate")>0||this.$1.getNumber("playback_speed_latency_speedup_adjustment_rate")>0};b.$17=function(){var a=d("oz-player/utils/OzSourceBufferUtil").getBufferAheadInBufferedRanges(d("oz-player/utils/OzSourceBufferUtil").convertToBufferedTimeRangeArray(this.$4.buffered),this.$3.getCurrentTime(),this.$1),b=a.bufferAheadSec;a=a.bufferedOffset;this.$23(b,a);(a=this.$7)==null?void 0:a.appendBuffer(b)};b.$23=function(a,b){var c=this.$1.getNumber("playback_speed_enabled_delay_sec"),d=this.$1.getNumber("playback_speed_min_buffer_sec");a>d&&(this.$11=!0);var e=this.$1.getNumber("playback_speed_min_duration_sec"),f=this.$1.getNumber("playback_speed_restore_min_duration_sec"),g=this.$1.getNumber("playback_speed_latency_adjustment_rate"),h=this.$1.getNumber("playback_speed_latency_slowdown_adjustment_rate"),i=this.$1.getNumber("playback_speed_latency_speedup_adjustment_rate");if(this.$4.playbackRate==0){var j;this.$10=null;(j=this.$6)==null?void 0:j.log();this.$6=null}else if(this.$15&&this.$11&&a0||h>0)&&b===0&&(c===0||this.$14!=null&&this.$14+c*1e30?1-h:this.$22(g,d,a);!this.$1.getBool("playback_speed_latency_adjustment_user_rate_disable")&&this.$10==null&&(this.$10=this.$4.playbackRate);this.$6==null&&this.$1.getBool("log_extra_events")&&(this.$6=this.$5.getOperationLogger("latency_manager").start().setInitiator("speed_adjustment").setReason("slow").setUserInfo({newPlaybackRate:String(j),oldPlaybackRate:String(this.$4.playbackRate)}));this.$24(j)}else if(this.$15&&this.$11&&this.isBehindPreferredLiveHeadLatency()&&i>0&&b===0&&(this.$13==null||this.$13+f*1e3(((c=b.getEndingSegment())==null?void 0:c.getTimeRange().endTime)||0)?a:b})};b.$19=function(a){var b;if(a<=0)return a;var c=this.$20();b=c==null?void 0:(b=c.getEndingSegment())==null?void 0:b.getTimeRange();if(!b)return a;c=c==null?void 0:(c=c.getSegmentByTime((b==null?void 0:b.endTime)-a))==null?void 0:c.getTimeRange();return!c?a:(b==null?void 0:b.endTime)-(c==null?void 0:c.startTime)};b.destroy=function(){var a;(a=this.$7)==null?void 0:a.destroy();this.$8.release()};return a}();g["default"]=a}),98); __d("oz-player/playback_controls/OzPlaybackTimeRangeManager",["oz-player/shims/OzSubscriptionsHandler","oz-player/utils/OzBufferingUtils"],(function(a,b,c,d,e,f,g){"use strict";a=function(){function a(a){var b=this;this.$4=null;this.$5=0;this.$6=0;this.$7=!0;this.$8=0;this.$9=0;this.$10=!1;this.$12=0;this.$13=0;this.$15=new(c("oz-player/shims/OzSubscriptionsHandler"))();this.$17=function(){b.$10!=b.$14.isPlaying()&&(b.$14.isPlaying()&&(b.$11=Date.now()),b.$10=b.$14.isPlaying())};var d=a.video,e=a.config,f=a.mpd,g=a.liveheadFallBehindBlockThreshold,h=a.liveheadFallBehindBlockMargin,i=a.playbackState;a=a.perfLoggerProvider;this.$1=e;this.$2=d;this.$3=f;this.$8=g;this.$9=h;this.$14=i;this.$16=a;this.$1.getNumber("catchup_timeout_after_play_sec")!==0&&this.$15.addSubscriptions(this.$14.addEventListener("play",this.$17),this.$14.addEventListener("pause",this.$17))}var b=a.prototype;b.setTimelineBlockingEnabled=function(a){this.$7=a,this.$7||this.$3.unblockTimeRange()};b.setTimeRangeProvider=function(a){var b=this;this.$4!=null&&this.$4.remove();this.$4=a.addUpdateListener(function(){var c=a.getTimeRanges(),d=0;if(c.length!==0){c=c[c.length-1];d=c.endTime}b.$18(d)})};b.$18=function(a){var b;if(!this.$7)return;if(this.$5===a)return;this.$5=a;if(this.$2.currentTime<=this.$6)return;a=this.$1.getBool("catchup_use_timeline_range_end_time_as_end")?a:this.$2.duration;var c=this.$1.getNumber("overwrite_livehead_fall_behind_block_threshold")!==0?this.$1.getNumber("overwrite_livehead_fall_behind_block_threshold"):this.$8,e=this.$1.getNumber("overwrite_live_time_range_block_margin")!==0?this.$1.getNumber("overwrite_live_time_range_block_margin"):this.$9;this.$17();this.$1.getBool("reset_catchup_timeout_after_play_sec_on_overwrite")&&(this.$13!=e||this.$12!=c)&&(this.$13=e,this.$12=c,this.$11=Date.now());b=this.$1.getNumber("catchup_timeout_after_play_sec")===0||Date.now()-((b=this.$11)!=null?b:0)c){b=[];for(var c=0;c0?b-a+g:0}f.computeSeekAhead=a}),66); __d("oz-player/utils/OzTimelineGapUtil",["oz-player/utils/OzNumericalHelper","oz-player/utils/OzNumericalRangeUtil"],(function(a,b,c,d,e,f,g){"use strict";var h=1.5;function a(a,b,c,e){b=b.map(function(a){return{rangeStart:a.startTime,rangeEnd:a.endTime}});return d("oz-player/utils/OzNumericalRangeUtil").findCurrentRangeIndex(c,a,b,e)===-1}function b(a,b,c,e,f){f===void 0&&(f=h);var g=b.map(function(a){return{rangeStart:a.startTime,rangeEnd:a.endTime}});c=d("oz-player/utils/OzNumericalRangeUtil").findCurrentRangeIndex(c,a,g,e);if(c!==-1){g=b[c];return d("oz-player/utils/OzNumericalHelper").lessThanOrEqual(a,g.endTime)&&g.endTime-athis.$3)&&(this.$4=Date.now(),this.$3=this.$2.currentTime,this.$5=!1,this.$6={});this.$6[a]=this.$6[a]==null?1:this.$6[a]+1;var d=this.$4;if(!this.$5&&!this.$2.paused&&d!=null&&d+1e40&&this.$OzPlayheadManager10.add(a);a=this.$OzPlayheadManager6.getBool("seek_ahead_use_native_current_time")?this.$OzPlayheadManager1.currentTime:this.$OzPlayheadManager7.getCurrentTime();a=d("oz-player/strategies/LiveheadSeekaheadStrategy").computeSeekAhead(a,c);var e=this.$OzPlayheadManager6.getNumber("timeline_offset_threshold");a>0&&(e===0||a0?this.$OzPlayheadManager13:b+this.$OzPlayheadManager13;if(this.$OzPlayheadManager20!=null){var c;b=(c=this.$OzPlayheadManager20)==null?void 0:c.getInitialPlayHeadPosition()}this.$OzPlayheadManager15=!0;if(this.$OzPlayheadManager6.getBool("playhead_manager_clamp_initial_playback_position")){c=(c=this.$OzPlayheadManager5)==null?void 0:c.getTimeRanges();c!=null&&c.length>0&&c[0].startTime>b&&(b=c[0].startTime)}this.$OzPlayheadManager27(b,"initial_playback_position",a);this.emit("initialPlaybackPositionSet",b)}};e.$OzPlayheadManager23=function(a,b){b===void 0&&(b=null);if(this.$OzPlayheadManager20!=null?!this.$OzPlayheadManager20.shouldEnableManifestTimeRangeCatchup():!this.$OzPlayheadManager6.getBool("skip_timerange_gaps"))return;var c=this.$OzPlayheadManager9;if(c&&c.isEnabled(this.$OzPlayheadManager1,this.$OzPlayheadManager8)){c=c.computeNewPlayheadPosition(this.$OzPlayheadManager1,this.$OzPlayheadManager8);if(typeof c==="number"){this.$OzPlayheadManager27(c,"live_catch_up_strategy",a,b);return}}c=this.$OzPlayheadManager6.getNumber("auto_seek_playhead_slack");if(c===0)return;var e=this.$OzPlayheadManager5;if(!e)return;var f=this.$OzPlayheadManager7.getCurrentTime(),g=e.getTimeRanges().map(function(a){return{rangeStart:a.startTime,rangeEnd:a.endTime}}),h=d("oz-player/utils/OzNumericalRangeUtil").findNextRangeIndex(f,g);if((d("oz-player/utils/OzTimelineGapUtil").isNearGap(f,e.getTimeRanges(),this.$OzPlayheadManager6)||d("oz-player/utils/OzTimelineGapUtil").isInGap(f,e.getTimeRanges(),this.$OzPlayheadManager6))&&h!==-1){f=g[h];this.$OzPlayheadManager27(f.rangeStart+c,"jump_over_timeline_gap",a,b)}};e.$OzPlayheadManager24=function(a){var b;if(!this.$OzPlayheadManager6.getBool("skip_videobuffer_gaps"))return;if(this.$OzPlayheadManager6.getBool("overwrite_video_current_time_property")&&this.$OzPlayheadManager6.getBool("clear_buffer_on_seek_into_unbuffered_range")&&!this.$OzPlayheadManager17)return;var c=this.$OzPlayheadManager6.getNumber("playhead_manager_buffered_auto_seek_playhead_slack");if(c===0)return;var e=this.$OzPlayheadManager7.getCurrentTime(),f=[];for(var g=0;g=0?g[l]:null;if(l!=null&&l.rangeStart<=b&&l.rangeEnd!=null&&l.rangeEnd>b){this.$OzPlayheadManager27(b,"reverse_jump_over_buffer_gap",a,null);return}}if((d("oz-player/utils/OzTimelineGapUtil").isNearGap(e,f,this.$OzPlayheadManager6,k,j)||d("oz-player/utils/OzTimelineGapUtil").isInGap(e,f,this.$OzPlayheadManager6,k))&&h!==-1&&(i===0||g[h].rangeStart-e0&&(this.$OzPlayheadManager6.getBool("playhead_manager_buffer_gaps_skip_reverse")?Math.abs(e):e)<=f)return;this.$OzPlayheadManager11.getOperationLogger("playhead_adjustment").setLength(Math.round(a*1e3)).setReason(b).setInitiator(c).setType(d).setUserInfo({seekAdjustment:String(Math.round(e*1e3))}).log();this.$OzPlayheadManager12(a);b==="initial_playback_position"&&(this.$OzPlayheadManager14=!0)};return b}(c("oz-player/shims/OzEventEmitter"));g["default"]=a}),98); __d("oz-player/playback_controls/OzPlayheadNudger",["oz-player/shims/OzDOMEventListener","oz-player/shims/OzSubscriptionsHandler"],(function(a,b,c,d,e,f,g){"use strict";a=function(){function a(a){var b=this;this.$2=new(c("oz-player/shims/OzSubscriptionsHandler"))();this.$3=null;this.$6=function(){var a=b.$4.getNumber("playhead_nudge_slack");if(a===0)return;var c=b.$3;c!=null&&!b.$1.paused&&b.$1.readyState===4&&(b.$1.currentTime===c&&(b.$1.currentTime+=a,b.$4.getBool("log_extra_events")&&b.$5.getOperationLogger("playhead_adjustment").setInitiator("nudger").setLength(a).log()),b.$3=null)};this.$7=function(){b.$3=b.$1.currentTime};this.$8=function(){b.$3=null};var d=a.video,e=a.config;a=a.perfLoggerProvider;this.$1=d;this.$4=e;this.$5=a;this.$2.addSubscriptions(c("oz-player/shims/OzDOMEventListener").listenDOMEvent(this.$1,"timeupdate",this.$6),c("oz-player/shims/OzDOMEventListener").listenDOMEvent(this.$1,"playing",this.$7),c("oz-player/shims/OzDOMEventListener").listenDOMEvent(this.$1,"pause",this.$8))}var b=a.prototype;b.destroy=function(){this.$2.release()};return a}();g["default"]=a}),98); __d("oz-player/states/OzObservedPlaybackState",["oz-player/loggings/OzMultiDestinationPerfLogger","oz-player/shims/OzDOMEventListener","oz-player/shims/OzSubscriptionsHandler","oz-player/shims/ozThrottle"],(function(a,b,c,d,e,f,g){"use strict";var h=150;a=function(){function a(a,b,e){var f=this;e===void 0&&(e=new(d("oz-player/loggings/OzMultiDestinationPerfLogger").OzMultiDestinationPerfLoggerProvider)([]));this.$5=new(c("oz-player/shims/OzSubscriptionsHandler"))();this.$8=function(){f.$6.getOperationLogger("pause").setState("paused").log()};this.$9=function(){f.$7(),f.$6.getOperationLogger("playing").setState("playing").log()};this.$7=function(){f.$3=f.$2.currentTime,f.$4=Date.now()};this.$1=a.getBool("always_use_current_time_in_playback_state");this.$2=b;this.$6=e;this.$3=this.$2.currentTime;this.$4=Date.now();this.$5.addSubscriptions(c("oz-player/shims/OzDOMEventListener").listenDOMEvent(this.$2,"seeked",this.$7),c("oz-player/shims/OzDOMEventListener").listenDOMEvent(this.$2,"seeking",this.$7),c("oz-player/shims/OzDOMEventListener").listenDOMEvent(this.$2,"timeupdate",c("oz-player/shims/ozThrottle")(this.$7,h)),c("oz-player/shims/OzDOMEventListener").listenDOMEvent(this.$2,"pause",this.$8),c("oz-player/shims/OzDOMEventListener").listenDOMEvent(this.$2,"playing",this.$9))}var b=a.prototype;b.isPlaying=function(){return!this.$2.paused};b.getCurrentTime=function(){return this.$1?this.$2.currentTime:this.$3};b.getCurrentTimeUpdateTime=function(){return this.$4};b.forceUpdateCurrentTime=function(){this.$7()};b.getDuration=function(){return this.$2.duration};b.addEventListener=function(a,b){return c("oz-player/shims/OzDOMEventListener").listenDOMEvent(this.$2,a,b)};b.destroy=function(){this.$5.release()};return a}();g["default"]=a}),98); __d("oz-player/utils/OzPositionToViewportUtils",[],(function(a,b,c,d,e,f){"use strict";function a(a,b,c){b=b.filter(function(a){a=a.position;if(a==null)return!1;var b=a.y-window.scrollY;return b>=0||(a.height+b)/a.height>c}).sort(function(a,b){return a.position==null||b.position==null?0:a.position.y-b.position.y});return b.findIndex(function(b){return b.video===a})}f.determinePositionIndexOfVideoFromViewportVertically=a}),66); __d("oz-player/states/OzPositionToViewportTracker",["oz-player/shims/OzEventEmitter","oz-player/utils/OzPositionToViewportUtils"],(function(a,b,c,d,e,f,g){"use strict";var h=null,i=.5;a=function(a){babelHelpers.inheritsLoose(b,a);function b(b){var c;c=a.call(this)||this;c.$OzPositionToViewportTracker1=[];c.$OzPositionToViewportTracker5=function(a){a.forEach(function(a){var b=c.$OzPositionToViewportTracker1.find(function(b){return a.target===b.video});b!=null&&(a.isIntersecting?b.position=c.$OzPositionToViewportTracker7(a):c.$OzPositionToViewportTracker1.map(function(b){a.target===b.video&&(b.position=null)}));c.$OzPositionToViewportTracker1.forEach(function(a){a.positionIndexToViewportVertically=c.$OzPositionToViewportTracker6(a.video)})}),c.emit("state_changed")};c.$OzPositionToViewportTracker2=b;return c}var c=b.prototype;c.$OzPositionToViewportTracker4=function(){if(this.$OzPositionToViewportTracker3!=null)return;this.$OzPositionToViewportTracker3=new IntersectionObserver(this.$OzPositionToViewportTracker5,{rootMargin:this.$OzPositionToViewportTracker2.getNumber("pixels_above_viewport_to_observe")+"px 0px "+this.$OzPositionToViewportTracker2.getNumber("pixels_below_viewport_to_observe")+"px 0px",threshold:0})};c.registerVideo=function(a){this.$OzPositionToViewportTracker1.push({video:a,position:null,positionIndexToViewportVertically:-1}),this.$OzPositionToViewportTracker4(),this.$OzPositionToViewportTracker3!=null&&this.$OzPositionToViewportTracker3.observe(a)};c.getPositionIndexOfVideoFromViewportVertically=function(a){var b=this.$OzPositionToViewportTracker1.find(function(b){return b.video===a});return b!=null?b.positionIndexToViewportVertically:-1};c.$OzPositionToViewportTracker6=function(a){return d("oz-player/utils/OzPositionToViewportUtils").determinePositionIndexOfVideoFromViewportVertically(a,this.$OzPositionToViewportTracker1,i)};c.$OzPositionToViewportTracker7=function(a){a=a.boundingClientRect;return{x:a.x+window.scrollX,y:a.y+window.scrollY,width:a.width,height:a.height}};b.getInstance=function(a){h==null&&(h=new b(a));return h};c.unregisterVideo=function(a){var b=this,c=[];this.$OzPositionToViewportTracker1.forEach(function(d){d.video===a&&b.$OzPositionToViewportTracker3!=null?b.$OzPositionToViewportTracker3.unobserve(a):c.push(d)});this.$OzPositionToViewportTracker1=c;this.$OzPositionToViewportTracker1.length===0&&this.$OzPositionToViewportTracker3!=null&&(this.$OzPositionToViewportTracker3.disconnect(),this.$OzPositionToViewportTracker3=null)};return b}(c("oz-player/shims/OzEventEmitter"));g["default"]=a}),98); __d("oz-player/states/OzPositionToViewport",["oz-player/shims/OzEventEmitter","oz-player/shims/OzSubscriptionsHandler","oz-player/states/OzPositionToViewportTracker"],(function(a,b,c,d,e,f,g){"use strict";a=function(a){babelHelpers.inheritsLoose(b,a);function b(b,d){var e;e=a.call(this)||this;e.$OzPositionToViewport1=new(c("oz-player/shims/OzSubscriptionsHandler"))();e.$OzPositionToViewport3=b;e.$OzPositionToViewport2=c("oz-player/states/OzPositionToViewportTracker").getInstance(d);e.$OzPositionToViewport2.registerVideo(b);e.$OzPositionToViewport1.addSubscriptions(e.$OzPositionToViewport2.addListener("state_changed",function(){e.emit("state_changed")}));return e}var d=b.prototype;d.getPositionIndexOfVideoFromViewportVertically=function(){return this.$OzPositionToViewport3!=null?this.$OzPositionToViewport2.getPositionIndexOfVideoFromViewportVertically(this.$OzPositionToViewport3):-1};d.destroy=function(){this.$OzPositionToViewport3!=null&&this.$OzPositionToViewport2.unregisterVideo(this.$OzPositionToViewport3),this.$OzPositionToViewport3=null};return b}(c("oz-player/shims/OzEventEmitter"));g["default"]=a}),98); __d("oz-player/strategies/OzPlaybackConfidenceUtils",[],(function(a,b,c,d,e,f){"use strict";var g=.8;function a(a,b,c,d,e,f,i,j){c=Math.min(1,c/d);d=1+(1-c)*e;c=a.getBandwidth()*d;if(c>b)return g*(b/c);e=0;if(f!=null&&i!=null&&j>0){d=h(a,b,f,i);d!=null&&d>0&&(e=d/1e3*j)}return 1-(1-g)*c/b-e}function h(a,b,c,d){var e=a.getBandwidth();a=a.getSegment(0);if(a){a=a.getTimeRange();a=(a.endTime-a.startTime)*c;c=a*e/b*1e3+d;return c-a*1e3}}f.getPlaybackConfidence=a;f.getEstimatedDownloadTimeBufferDeltaMs=h}),66); __d("oz-player/strategies/OzAbrManager",["oz-player/networks/OzBandwidthEstimator","oz-player/strategies/OzPlaybackConfidenceUtils","oz-player/utils/OzAbrUtils","oz-player/utils/OzBufferingUtils","oz-player/utils/OzPlaybackRestrictionsUtils"],(function(a,b,c,d,e,f,g){"use strict";a=function(){function a(a,b,c,d,e,f,g,h){this.$2=0,this.$3=Date.now(),this.$4=!1,this.$10=null,this.$1=a,this.$5=b,this.$6=this.$14(b,c),this.$7=d,this.$8=e,this.$11=f,this.$12=g,this.$13=h}var b=a.prototype;b.setSourceBuffer=function(a){this.$9=a};b.$14=function(a,b){var c=this.$1.getNumber("abr_restrict_from_index"),d=this.$1.getNumber("abr_restrict_to_index");if(d===0&&c===0)return b;var e=b.findIndex(function(b){return a.getID()===b.getID()});return e===-1?b:b.filter(function(a,b){return b-e>=c&&b-e<=d})};b.$15=function(a){a=d("oz-player/utils/OzAbrUtils").excludeLargeRepresentations(this.$1,a,this.$12(),this.$11);a=d("oz-player/utils/OzPlaybackRestrictionsUtils").applyVideoPlaybackRestrictions(this.$1,this.$7,this.$12(),a);return a};b.getBestRepresentation=function(a){a=(a=a==null?void 0:a.length)!=null?a:null;var b=d("oz-player/utils/OzBufferingUtils").getBufferAheadFromPlaybackStates(this.$9,this.$8),e=d("oz-player/utils/OzAbrUtils").getReasonToPreventEvaluation(this.$1,this.$4,b,c("oz-player/networks/OzBandwidthEstimator").getSampleCount(),this.$2,this.$3);if(e!==null&&e!==void 0){this.$10=e;return this.$5}e=Date.now();this.$2=e;var f=c("oz-player/networks/OzBandwidthEstimator").getAdjustedBandwidth(this.$1.getLegacyConfig()),g=this.$15(this.$6),h=null;this.$1.getBool("abr_use_download_time")&&a!=null?h=this.$16(g,f,a)||this.$17(g,f,b,a):h=this.$17(g,f,b,a);f=g[0];h=h||f;if(this.$18(b,h)){this.$10="high_buffer";return this.$5}this.$5!==h&&(this.$4=!0,this.$3=e,this.$5=h);this.$10="bandwidth";return h};b.$17=function(a,b,e,f){f===void 0&&(f=null);var g=null;for(var h=0;hthis.$1.getNumber("abr_confidence_threshold")&&(!g||g.getBandwidth()=0;f--){var g=d("oz-player/strategies/OzPlaybackConfidenceUtils").getEstimatedDownloadTimeBufferDeltaMs(a[f],b,e,c("oz-player/networks/OzBandwidthEstimator").getEstimatedTimeToFirstByteMs(this.$1.getLegacyConfig())||0);if(g!=null&&g+this.$1.getNumber("minimum_download_additional_buffer_ms")<0)return a[f]}return null};b.$18=function(a,b){var c=this.$1.getNumber("abr_prevent_down_switch_buffer_threshold");return c>0&&a>=c&&this.$5.getBandwidth()>b.getBandwidth()?!0:!1};b.getLastEvaluationReason=function(){return this.$10};b.updateRepresentations=function(a){var b=this;this.$6=a;a=this.$6.find(function(a){return a.getQualityLabel()===b.$5.getQualityLabel()});this.$5=(a=a)!=null?a:this.$6[0]};return a}();g["default"]=a}),98); __d("oz-player/strategies/OzAudioIBRManager",["oz-player/networks/OzBandwidthEstimator"],(function(a,b,c,d,e,f,g){"use strict";a=function(){function a(a,b){this.$1=a,this.$2=b}var b=a.prototype;b.getInitialAudioRepresentation=function(a){var b=c("oz-player/networks/OzBandwidthEstimator").getAdjustedBandwidth(this.$1.getLegacyConfig());a=a.slice(0);a.sort(function(a,b){return a.getBandwidth()-b.getBandwidth()});var d=this.$1.getNumber("live_audio_ibr_bandwidth_percentage");d=b*d;for(var e=a.length-1;e>=0;e--)if(a[e].getBandwidth()<=d){this.$2.getOperationLogger("audio_ibr_success").setRepresentationID(a[e].getID()).setReason(b.toString()).log();return a[e]}this.$2.getOperationLogger("audio_ibr_no_op").setReason(b.toString()).log();return null};return a}();g["default"]=a}),98); __d("oz-player/strategies/getSegmentsCount",[],(function(a,b,c,d,e,f){"use strict";function a(a,b,c,d){var e=0,f=a.getTimeRange().startTime;a=a;var g=a.getTimeRange().startTime;while(a!==null&&g0&&(e=c("oz-player/strategies/getSegmentsCount")(b,d,a,e));return e};return a}();g["default"]=a}),98); __d("oz-player/strategies/OzBandwidthBoundaryStreamSegmentsCountStrategy",["oz-player/networks/OzBandwidthEstimator","oz-player/strategies/OzStaticStreamSegmentsStrategy","oz-player/strategies/getSegmentsCount"],(function(a,b,c,d,e,f,g){"use strict";a=function(){function a(a,b){this.$1=a,this.$2=b,this.$3=new(c("oz-player/strategies/OzStaticStreamSegmentsStrategy"))(a)}var b=a.prototype;b.isActive=function(a){return!0};b.getSegmentsCount=function(a,b,d){var e=c("oz-player/networks/OzBandwidthEstimator").getBandwidth(this.$1.getLegacyConfig()),f=c("oz-player/networks/OzBandwidthEstimator").getStandardDeviationOfBandwidth(),g=this.$1.getNumber("bandwidth_boundary_standard_deviation_factor"),h=this.$2.some(function(a){a=a.getBandwidth();return Math.abs(a-e)0&&(e=c("oz-player/strategies/getSegmentsCount")(b,d,a,e));return e};b.$5=function(a,b){var c=Infinity;a=a.getByteRange();if(a){var d=a.endByte;if(d!==null&&d!==void 0){var e=this.$1.getNumber("per_stream_duration_target");d=d-a.startByte;e>1e-5&&d!==0&&(c=Math.ceil(e*b/(d*8)))}}return c};return a}();g["default"]=a}),98); __d("oz-player/strategies/OzBlockedRepresentationsManager",["oz-player/shims/OzEventEmitter","oz-player/shims/ozClearTimeout","oz-player/shims/ozSetTimeoutAcrossTransitions","oz-player/utils/OzError"],(function(a,b,c,d,e,f,g){"use strict";a=function(){function a(a){this.$2=new Map(),this.$3=new Set(),this.$4=new Set(),this.$5=new(c("oz-player/shims/OzEventEmitter"))(),this.$6(a),this.$7(a)}var b=a.prototype;b.isBlocked=function(a){return this.$3.has(a)};b.handleError=function(a,b){if(this.$1!=null&&this.$3.size===this.$1-1)return!1;if(b instanceof c("oz-player/utils/OzError")&&b.getType()==="OZ_NETWORK"){b=Number(b.getExtra().code);if(!isNaN(b)&&this.$2.has(b)){this.$3.has(a)||this.$8(a,b);return!0}}return!1};b.$8=function(a,b){var d,e=this;this.$3.add(a);(d=this.$5)==null?void 0:d.emit("representation_blocked",a);d=this.$2.get(b)||0;if(d>0){var f=c("oz-player/shims/ozSetTimeoutAcrossTransitions")(function(){e.$3["delete"](a),e.$4["delete"](f)},d);this.$4.add(f)}};b.applyRestriction=function(a,b){var c=this;return a.filter(function(a){return!c.$3.has(a.getID())})};b.onRepresentationBlocked=function(a){return this.$5?this.$5.addListener("representation_blocked",a):{remove:function(){}}};b.setAvailableRepresentationsCount=function(a){this.$1=a};b.destroy=function(){var a;(a=this.$5)==null?void 0:a.removeAllListeners();this.$5=null;for(var a=this.$4,b=Array.isArray(a),d=0,a=b?a:a[typeof Symbol==="function"?Symbol.iterator:"@@iterator"]();;){var e;if(b){if(d>=a.length)break;e=a[d++]}else{d=a.next();if(d.done)break;e=d.value}e=e;c("oz-player/shims/ozClearTimeout")(e)}this.$4.clear()};b.$6=function(a){var b=this;try{a=JSON.parse(a.getString("block_representation_status_codes_json"));Array.isArray(a)&&a.forEach(function(a){a=parseInt(a,10);isNaN(a)||b.$2.set(a,-1)})}catch(a){}};b.$7=function(a){var b=this;try{a=JSON.parse(a.getString("block_representation_status_codes_temporarily_json"));Object.entries(a).forEach(function(a){var c=a[0];a=a[1];c=parseInt(c,10);a=parseInt(a,10);!isNaN(c)&&!isNaN(a)&&b.$2.set(c,a)})}catch(a){}};return a}();g["default"]=a}),98); __d("oz-player/strategies/OzBufferAheadPriorityStrategy",["oz-player/shims/OzEventEmitter","oz-player/shims/OzSubscriptionsHandler","oz-player/shims/ozThrottle","oz-player/utils/OzBufferingUtils"],(function(a,b,c,d,e,f,g){"use strict";var h=6,i=1e3;a=function(a){babelHelpers.inheritsLoose(b,a);function b(b,d){var e;e=a.call(this)||this;e.$OzBufferAheadPriorityStrategy3=new(c("oz-player/shims/OzSubscriptionsHandler"))();e.$OzBufferAheadPriorityStrategy5=function(){e.emit("state_changed")};e.$OzBufferAheadPriorityStrategy4=b;e.$OzBufferAheadPriorityStrategy1=d;e.$OzBufferAheadPriorityStrategy3.addSubscriptions(e.$OzBufferAheadPriorityStrategy1.addEventListener("progress",c("oz-player/shims/ozThrottle")(e.$OzBufferAheadPriorityStrategy5,i)),e.$OzBufferAheadPriorityStrategy1.addEventListener("timeupdate",c("oz-player/shims/ozThrottle")(e.$OzBufferAheadPriorityStrategy5,i)));return e}var e=b.prototype;e.getName=function(){return"buffer_ahead"};e.setSourceBufferState=function(a){if(this.$OzBufferAheadPriorityStrategy2)return;this.$OzBufferAheadPriorityStrategy4.getBool("fix_buffer_ahead_priority_strategy")&&(this.$OzBufferAheadPriorityStrategy2=a);this.$OzBufferAheadPriorityStrategy3.addSubscriptions(a.addEventListener("buffer_updated",c("oz-player/shims/ozThrottle")(this.$OzBufferAheadPriorityStrategy5,i)))};e.isActive=function(){return!0};e.getPriority=function(){var a=this.$OzBufferAheadPriorityStrategy2;if(!a)return 1;var b=this.$OzBufferAheadPriorityStrategy1.getCurrentTime();a=a.getBufferedRanges();b=d("oz-player/utils/OzBufferingUtils").getBufferAheadFromCurrentTime(b,a);return b>=h?0:1};e.destroy=function(){this.$OzBufferAheadPriorityStrategy3.release()};return b}(c("oz-player/shims/OzEventEmitter"));g["default"]=a}),98); __d("oz-player/strategies/OzBufferAheadTargetStrategy",[],(function(a,b,c,d,e,f){"use strict";a=function(){function a(a){this.$1=a}var b=a.prototype;b.isActive=function(){return!0};b.getBufferTarget=function(){return this.$1.getNumber("buffer_ahead_target")};return a}();f["default"]=a}),66); __d("oz-player/strategies/OzBufferEndLimitStrategy",[],(function(a,b,c,d,e,f){"use strict";a=function(){function a(a,b){this.$1=a,this.$2=b}var b=a.prototype;b.isActive=function(){return!0};b.getBufferTarget=function(){var a=this.$3();return this.$2>=a?this.$2-a:0};b.$3=function(){return this.$1.buffered.length===0?0:this.$1.buffered.end(0)};return a}();f["default"]=a}),66); __d("oz-player/strategies/OzBufferTargetBoundedStreamSegmentsCountStrategy",[],(function(a,b,c,d,e,f){"use strict";a=function(){function a(a,b){this.$1=a,this.$2=b}var b=a.prototype;b.isActive=function(a){return!a.isPlaying()};b.getSegmentsCount=function(a,b,c){a=a.getCurrentTime();var d=this.$1.computeBufferTarget(),e=1,f=b;b=b.getTimeRange().startTime;while(f!==null&&b=b.length)break;e=b[d++]}else{d=b.next();if(d.done)break;e=d.value}e=e;if(e.isActive()){a=e.getBufferTarget();break}}for(var e=this.$3,d=Array.isArray(e),c=0,e=d?e:e[typeof Symbol==="function"?Symbol.iterator:"@@iterator"]();;){if(d){if(c>=e.length)break;b=e[c++]}else{c=e.next();if(c.done)break;b=c.value}b=b;a=b.adjustBufferTargetInSeconds(a)}this.$1=a;return a};b.handleEvent=function(a){for(var b=this.$3,c=Array.isArray(b),d=0,b=c?b:b[typeof Symbol==="function"?Symbol.iterator:"@@iterator"]();;){var e;if(c){if(d>=b.length)break;e=b[d++]}else{d=b.next();if(d.done)break;e=d.value}e=e;e.handleEvent(a)}};return a}();f["default"]=a}),66); __d("oz-player/strategies/OzBufferTargetCalculatorQuotaExceededConstraint",[],(function(a,b,c,d,e,f){"use strict";a=function(){function a(a){this.$2=1,this.$1=a}var b=a.prototype;b.adjustBufferTargetInSeconds=function(a){a=a;this.$1.getBool("append_retry_quota_exceeded_error")&&(a=Math.max(this.$1.getNumber("buffer_target_constraint_minimum_sec"),a*this.$2));return a};b.handleEvent=function(a){var b=this.$2;switch(a){case"append_succeeded":b=Math.max(0,Math.min(1,b+this.$1.getNumber("buffer_target_constraint_append_succeeded_reward")));break;case"append_quota_exceeded":b=Math.max(0,Math.min(1,b-this.$1.getNumber("buffer_target_constraint_quota_exceeded_penalty")));break;default:a}this.$2=b};return a}();f["default"]=a}),66); __d("oz-player/strategies/OzLiveheadDeltaCatchupStrategy",[],(function(a,b,c,d,e,f){"use strict";a=function(){function a(a){this.$1=a}var b=a.prototype;b.isEnabled=function(a,b){return(!this.$1.getBool("live_catch_up_only_when_paused")||a.paused)&&typeof b.getMinimumUpdatePeriod()==="number"};b.computeNewPlayheadPosition=function(a,b){a=a.currentTime;b=b.getVideoRepresentations()[0];if(!b)return null;b=b.getTimeRanges();if(b.length===0)return null;b=b[b.length-1].endTime;return b-a>this.$1.getNumber("live_catch_up_fall_behind_threshold")?b-this.$1.getNumber("live_catch_up_live_head_delta"):null};return a}();f["default"]=a}),66); __d("oz-player/strategies/OzPausedStreamSegmentsCountStrategy",[],(function(a,b,c,d,e,f){"use strict";a=function(){function a(a,b){this.$1=a,this.$2=b}var b=a.prototype;b.isActive=function(){return!this.$1.isPlaying()};b.getSegmentsCount=function(a,b,c){return this.$2.getNumber("paused_stream_segments_count")};return a}();f["default"]=a}),66); __d("oz-player/strategies/OzPlayheadAtInterruptionDetector",["oz-player/shims/OzDOMEventListener","oz-player/shims/OzEventEmitter","oz-player/shims/OzSubscriptionsHandler"],(function(a,b,c,d,e,f,g){"use strict";var h=1;a=function(a){babelHelpers.inheritsLoose(b,a);function b(b,d){var e;e=a.call(this)||this;e.$OzPlayheadAtInterruptionDetector2=null;e.$OzPlayheadAtInterruptionDetector3=new(c("oz-player/shims/OzSubscriptionsHandler"))();e.$OzPlayheadAtInterruptionDetector4=null;e.$OzPlayheadAtInterruptionDetector1=b;b=d?d.addListener("enterBuffering",function(){e.$OzPlayheadAtInterruptionDetector5()}):c("oz-player/shims/OzDOMEventListener").listenDOMEvent(e.$OzPlayheadAtInterruptionDetector1,"waiting",function(){e.$OzPlayheadAtInterruptionDetector5()});e.$OzPlayheadAtInterruptionDetector3.addSubscriptions(b);e.$OzPlayheadAtInterruptionDetector4=d;return e}var d=b.prototype;d.notifyStreamInterrupted=function(a){this.$OzPlayheadAtInterruptionDetector2=a,this.$OzPlayheadAtInterruptionDetector5()};d.notifyStreamResumed=function(){this.$OzPlayheadAtInterruptionDetector2=null};d.$OzPlayheadAtInterruptionDetector5=function(){if(this.$OzPlayheadAtInterruptionDetector2!=null){var a=this.$OzPlayheadAtInterruptionDetector2||0;Math.abs(this.$OzPlayheadAtInterruptionDetector1.currentTime-a)0?b===-1?a*-1:0:b===-1?-Infinity:-1*b};d.destroy=function(){this.$OzPositionToViewportPriorityStrategy3.release()};return b}(c("oz-player/shims/OzEventEmitter"));g["default"]=a}),98); __d("oz-player/strategies/OzPriorityCalculator",["oz-player/shims/OzEventEmitter","oz-player/shims/OzSubscriptionsHandler"],(function(a,b,c,d,e,f,g){"use strict";a=function(a){babelHelpers.inheritsLoose(b,a);function b(b){var d;d=a.call(this)||this;d.$OzPriorityCalculator2=new(c("oz-player/shims/OzSubscriptionsHandler"))();d.$OzPriorityCalculator1=b;(b=d.$OzPriorityCalculator2).addSubscriptions.apply(b,d.$OzPriorityCalculator1.map(function(a){return a.addListener("state_changed",function(){d.emit("state_changed",d.compute(),a.getName())})}));return d}var d=b.prototype;d.setSourceBufferState=function(a){this.$OzPriorityCalculator1.forEach(function(b){return b.setSourceBufferState(a)}),this.emit("state_changed",this.compute(),"source_buffer")};d.compute=function(){var a=this.$OzPriorityCalculator1.reduce(function(a,b){b=b.isActive()?b.getPriority():0;return a+b},0);return Math.max(a,0)};d.destroy=function(){this.$OzPriorityCalculator2.release()};return b}(c("oz-player/shims/OzEventEmitter"));g["default"]=a}),98); __d("oz-player/strategies/OzStaleManifestBufferTargetStrategy",[],(function(a,b,c,d,e,f){"use strict";a=function(){function a(a,b){this.$1=b,this.$2=a}var b=a.prototype;b.isActive=function(){return this.$2.getRefreshDate()==null&&this.$1.getNumber("stale_mpd_buffer_ahead_target")>0};b.getBufferTarget=function(){return this.$1.getNumber("stale_mpd_buffer_ahead_target")};return a}();f["default"]=a}),66); __d("oz-player/strategies/OzStartupBufferTargetStrategy",[],(function(a,b,c,d,e,f){"use strict";a=function(){function a(a,b){this.$1=a,this.$3=b}var b=a.prototype;b.isActive=function(){var a=this.$1.isPlaying();a&&(this.$2=!0);return!this.$2};b.getBufferTarget=function(){return this.$3.getNumber("pre_start_buffer_ahead_target")};return a}();f["default"]=a}),66); __d("oz-player/strategies/OzStreamSegmentsCountCalculator",[],(function(a,b,c,d,e,f){"use strict";var g=1;a=function(){function a(a){this.$1=a}var b=a.prototype;b.computeMin=function(a,b,c){var d=Number.MAX_VALUE;for(var e=this.$1,f=Array.isArray(e),h=0,e=f?e:e[typeof Symbol==="function"?Symbol.iterator:"@@iterator"]();;){var i;if(f){if(h>=e.length)break;i=e[h++]}else{h=e.next();if(h.done)break;i=h.value}i=i;i.isActive(a)&&(d=Math.min(d,i.getSegmentsCount(a,b,c)))}return d===Number.MAX_VALUE?g:Math.max(d,g)};return a}();f["default"]=a}),66); __d("oz-player/strategies/OzSupportedMimeCodecsRestriction",[],(function(a,b,c,d,e,f){"use strict";a=function(){function a(){}var b=a.prototype;b.applyRestriction=function(a,b){return a.filter(function(a){a=MediaSource.isTypeSupported(a.getMimeCodecs());return!!a})};return a}();f["default"]=a}),66); __d("oz-player/streams/OzEndOfStreamWatcher",["oz-player/shims/OzEventEmitter","oz-player/shims/ozvariant"],(function(a,b,c,d,e,f,g){"use strict";a=function(a){babelHelpers.inheritsLoose(b,a);function b(b,c){var d;d=a.call(this)||this;d.$OzEndOfStreamWatcher1=new Map();d.$OzEndOfStreamWatcher2=b;d.$OzEndOfStreamWatcher3=c;return d}var d=b.prototype;d.registerMediaStream=function(a){this.$OzEndOfStreamWatcher1.has(a)&&c("oz-player/shims/ozvariant")(0,5191),this.$OzEndOfStreamWatcher1.set(a,!1)};d.notifyRepresentationSwitched=function(a){this.$OzEndOfStreamWatcher1.has(a)||c("oz-player/shims/ozvariant")(0,5192),this.$OzEndOfStreamWatcher4(function(a){return a.setInitiator("end_of_stream_watcher").setReason("representation_switched")})};d.notifyMediaStreamEnded=function(a){this.$OzEndOfStreamWatcher1.has(a)||c("oz-player/shims/ozvariant")(0,5192),this.$OzEndOfStreamWatcher1.set(a,!0),this.$OzEndOfStreamWatcher4(function(a){return a.setInitiator("end_of_stream_watcher").setReason("media_stream_ended")})};d.$OzEndOfStreamWatcher4=function(a){var b=this,c=this.$OzEndOfStreamWatcher2.getMediaSource();(this.$OzEndOfStreamWatcher3.getBool("allow_queueing_end_of_stream_when_update")||c.readyState==="open")&&this.$OzEndOfStreamWatcher5()&&(this.$OzEndOfStreamWatcher3.getBool("delay_stream_end_for_sourceended")?this.$OzEndOfStreamWatcher2.notifyEndOfStream(a).then(function(){b.emit("streamEnd")})["catch"](function(){b.emit("streamEnd")}):(this.$OzEndOfStreamWatcher2.notifyEndOfStream(a),this.emit("streamEnd")))};d.$OzEndOfStreamWatcher5=function(){if(this.$OzEndOfStreamWatcher1.size===0)return!1;for(var a=this.$OzEndOfStreamWatcher1.values(),b=Array.isArray(a),c=0,a=b?a:a[typeof Symbol==="function"?Symbol.iterator:"@@iterator"]();;){var d;if(b){if(c>=a.length)break;d=a[c++]}else{c=a.next();if(c.done)break;d=c.value}d=d;if(!d)return!1}return!0};d.destroy=function(){this.$OzEndOfStreamWatcher1.clear()};return b}(c("oz-player/shims/OzEventEmitter"));g["default"]=a}),98); __d("oz-player/streams/OzHandleUserRepresentationSwitch",["oz-player/shims/OzSubscriptionsHandler","oz-player/utils/OzCustomErrorCode","oz-player/utils/OzError","oz-player/utils/OzErrorEmitter"],(function(a,b,c,d,e,f,g){"use strict";a=function(){function a(a,b,d,e,f){var g=this;this.$2=new(c("oz-player/utils/OzErrorEmitter"))();this.$5=null;this.$6=new(c("oz-player/shims/OzSubscriptionsHandler"))();this.$1=a;this.$3=b;this.$4=d;this.$7=e;f.then(function(a){g.$5=a});this.$6.addSubscriptions(e.addListener("switchRepresentation",function(a,b){g.$8(a,b)}))}var b=a.prototype;b.cleanup=function(){this.$6.release(),this.$6.engage()};b.onError=function(a){return this.$2.onError(a)};b.$8=function(a,b){var d=this;if(a!=="user")return;a=this.$5;if(a==null)return;var e=this.$7.getRepresentationIDAtTime(this.$3.getCurrentTime()),f;for(var g=0;g0?a(d.createPausableStream(b,f,e)):a(null)})["catch"](function(a){return c(a)})});this.$9=!0;a=a.addStreamDeferred(g,e);g={genStream:a.genStream,cancel:a.cancel,getStatusChangePromise:this.$14(a.getStatusChangePromise)};return g};e.$12=function(a){var b=this.$2;this.$11(this.$1.compute(),"start_stream");!b||b.isCancelled()?(b=this.$2=new(c("oz-player/networks/OzStreamingTask"))(this.$8,a,this.$10),this.$6.enqueue(b,this.$4)["catch"](function(){})):this.$6.updatePriority(b,this.$4);return b};e.$14=function(a){var c=this;return function(){return a().then(function(a){c.$15();return a})["catch"](function(a){c.$15();return b("Promise").reject(a)})}};e.finishTaskIfNoOngoingStream=function(){this.$9||this.$16()};e.destroy=function(){this.$3.release();var a=this.$2;this.$2=null;a&&this.$6.remove(a)};e.$15=function(){this.$9=!1,this.$11(this.$1.compute(),"end_stream"),this.$40&&d.getCurrentTime()=a});return b!=null&&b.length>0?b[0]:null}f.getRangeForTime=a}),66); __d("oz-player/streams/OzSegmentLocator",["oz-player/utils/OzNumericalRangeUtil","oz-player/utils/OzRangeUtils"],(function(a,b,c,d,e,f,g){"use strict";function a(a){a=a.getEndingSegment();return a!=null&&a.getSequenceNumber()!=null?a.getSequenceNumber():0}var h=function(a,b){a=a.getCurrentTime();a=b?d("oz-player/utils/OzRangeUtils").getRangeForTime(a,b.getBufferedRanges()):null;return a},i=function(a,b,c){b=h(a,b);c=c?c.getTimeRange().endTime:0;a=a.getCurrentTime()||0;c?a=c:b&&(a=b.endTime);return a};b=function(a,b,c,e,f,g,j,k){var l=a.getPredictedSegmentAfter(g);if(l&&b.isPlaying())return l;l=h(b,e);if(j.getBool("use_stream_end_time_in_segment_locator")&&l&&l.endTime===k)return null;l=i(b,e,g);k=f.getTimeRanges();e=d("oz-player/utils/OzNumericalRangeUtil").findDiffCoveredByRanges(b.getCurrentTime(),l,k.map(function(a){return{rangeStart:a.startTime,rangeEnd:a.endTime}}));if(e>c)return null;g=a.getSegment(0);(j.getNumber("auto_seek_playhead_slack")===0||j.getBool("fix_initial_segment_non_zero_start_time"))&&g&&g.getTimeRange().startTime>l&&(l=g.getTimeRange().startTime);return a.getSegmentByTime(l)};g.getEndingSequenceNumber=a;g.getTimeToQuery=i;g.getSegment=b}),98); __d("oz-player/streams/OzPredictedSegmentLocator",["oz-player/manifests/OzSegmentOptions","oz-player/shims/OzURI","oz-player/streams/OzSegmentLocator","oz-player/utils/OzSourceBufferUtil"],(function(a,b,c,d,e,f,g){"use strict";function h(a,b){var c=0;for(var d in a){var e;if(d===b)continue;c=Math.max(c,(e=a[d].lastSkippedToSegmentNumber)!=null?e:0)}return c}function i(a){return a.reduce(function(a,b){var c;return((c=b==null?void 0:b.getSequenceNumber())!=null?c:0)>((c=a==null?void 0:a.getSequenceNumber())!=null?c:0)?b:a})}function j(a,b){var d=new(c("oz-player/manifests/OzSegmentOptions"))();return a.getPredictedSegmentAfter({getData:function(){return null},getByteRange:function(){return null},getSequenceNumber:function(){return b-1},getTimeRange:function(){return{endTime:0,startTime:0}},getURI:function(){return new(c("oz-player/shims/OzURI"))("")},getOptions:function(){return d}})}a=function(){function a(a){this.$5={};var b=a.videoNode,c=a.liveLatencyManager,d=a.loggerProvider;a=a.dynamicVideoLibrary;this.$1=b;this.$2=c;this.$3=d;this.$4=a}var b=a.prototype;b.getSegment=function(a,b,c,d,e,f,g,h,i){var j;this.$5[i]==null&&(this.$5[i]={lastSkippedToSegmentNumber:null});(j=this.$2)==null?void 0:j.setEnablePlaybackRateAdjustmentForSession(h);j=this.$6(a,b,c,d,e,f,g,h,i);g.getBool("log_extra_events")&&j.segment===null&&this.$3.getOperationLogger("segment_locator").setInitiator(j.initiator).setReason(j.reason).setType(i).setUserInfo(j.userInfo).log();a=this.$4;if(j.segment&&a!=null){b=j.segment.getOptions();b.setIsDVLEnabled(a.shouldRequestDynamicInfo(i))}return j.segment};b.$6=function(a,b,c,e,f,g,k,l,m){var n,o=b.getCurrentTime(),p=k.getNumber("pdash_download_cursor_catchup_threshold_sec")>0;p=this.$2==null?!1:this.$2.shouldEnableCursorBasedCatchup();var q=k.getBool("pdash_download_cursor_nocatchup_use_currentbuffer")&&!l;q=e!=null?k.getBool("pdash_download_cursor_use_totalbuffer")&&!q?d("oz-player/utils/OzSourceBufferUtil").getTotalBufferAheadOfPosition(e.getBufferedRanges(),b.getCurrentTime(),k):d("oz-player/utils/OzSourceBufferUtil").getBufferAheadInBufferedRanges(e.getBufferedRanges(),b.getCurrentTime(),k):{bufferAheadSec:0,bufferedOffset:0};e=q.bufferAheadSec;b=q.bufferedOffset;q=null;var r=null,s=this.$2?this.$2.enabled():!0,t=a.getPredictedSegmentAfter(f),u=j(a,k.getNumber("pdash_download_cursor_between_catchups_seg")>0?h(this.$5):h(this.$5,m)),v=!0;if(p&&l&&((n=t)==null?void 0:n.getSequenceNumber())!=null&&((n=(n=t)==null?void 0:n.getSequenceNumber())!=null?n:0)<=((n=u==null?void 0:u.getSequenceNumber())!=null?n:0)){t=u;q="paired_catchup";if(k.getBool("log_extra_events")){this.$3.getOperationLogger("latency_manager").setInitiator(q).setUserInfo({bufferAheadSec:String(e),bufferedOffset:String(b)}).setLength(((n=u==null?void 0:u.getSequenceNumber())!=null?n:0)-((n=(n=t)==null?void 0:n.getSequenceNumber())!=null?n:0)).setType(m).log()}v=!1}else if(p&&l&&s&&t!=null&&((n=this.$2)==null?void 0:n.isBehindPreferredLiveHeadLatencyWithTolerance())){if(k.getBool("pdash_download_cursor_catchup_skip_totalbufer")&&this.$2&&e>this.$2.getPreferredLiveHeadLatencySec()&&b==0)return{segment:null,initiator:"catchup_pause",userInfo:{bufferAheadSec:String(e),bufferedOffset:String(b)}};p=a.getEndingSegment();l=i([p,t]);n=k.getNumber("pdash_download_cursor_between_catchups_seg")===0||((n=u==null?void 0:u.getSequenceNumber())!=null?n:0)+k.getNumber("pdash_download_cursor_between_catchups_seg")<((u=p==null?void 0:p.getSequenceNumber())!=null?u:0);if(n){if(((p=l==null?void 0:l.getSequenceNumber())!=null?p:0)>((n=(u=t)==null?void 0:u.getSequenceNumber())!=null?n:0)){this.$5[m].lastSkippedToSegmentNumber=(p=l==null?void 0:l.getSequenceNumber())!=null?p:0;if(k.getBool("log_extra_events")){this.$3.getOperationLogger("latency_manager").setInitiator("catchup").setUserInfo({bufferAheadSec:String(e),bufferedOffset:String(b)}).setLength(((u=l==null?void 0:l.getSequenceNumber())!=null?u:0)-((p=(n=t)==null?void 0:n.getSequenceNumber())!=null?p:0)).setType(m).log()}}t=l;q="catchup";v=!1}}else if(f==null){t=a.getSegmentByTime(o);q="1st_run";u=a.getTimeRanges();t===null&&this.$2!=null&&k.getBool("download_cursor_1st_run_2_fallback")&&(t=a.getSegmentByTime(this.$2.getInitialPlayHeadPosition()),q="1st_run_2");r={approx:String(a.canApproximateId()),ranges:String(u.length),mpdStartTime:u.length>0?String(u[u.length-1].startTime):null,mpdEndTime:u.length>0?String(u[u.length-1].endTime):null};if(k.getBool("download_cursor_1st_run_set_skipped_segment_on")){this.$5[m].lastSkippedToSegmentNumber=(p=(n=t)==null?void 0:n.getSequenceNumber())!=null?p:0}}v=v&&k.getBool("download_cursor_disable_buffer_ahead_rule_on")?s:v;if(v&&e>c)return{segment:null,initiator:"buffer_ahead_rule",userInfo:{bufferAheadSec:String(e),bufferedOffset:String(b),lastMaxSegNum:String(h(this.$5,m)),segment:t?String(t.getSequenceNumber()):null}};if(k.getBool("pdash_wait_on_mpd_refresh_when_error")){l=g&&g.getSequenceNumber()||0;f=t&&t.getSequenceNumber()||0;if(t&&g&&l>=f){o=d("oz-player/streams/OzSegmentLocator").getEndingSequenceNumber(a);return(o||0)>=l?{segment:g}:{segment:null,initiator:"mpd_refresh",userInfo:{leSegNum:String(l)}}}}return{segment:t,initiator:q?q:void 0,userInfo:r?r:void 0}};return a}();g.getSegmentForSequenceNumber=j;g.OzPredictedSegmentLocator=a}),98); __d("oz-player/utils/OzTaggedTimeRanges",[],(function(a,b,c,d,e,f){a=function(){function a(a){this.$1=[],this.$2=0,this.$3=0,this.$4=a?a:function(a,b){return a===b}}var b=a.prototype;b.add=function(a,b,c){if(b=this.$1[f].startTime&&(d=f+1);b<=this.$1[f].endTime&&(e=f);if(b=b.startTime&&(this.$1.splice(a-1,2,{startTime:c.startTime,endTime:Math.max(b.endTime,c.endTime),tag:b.tag}),a--):(c.endTime>b.startTime&&c.startTime===b.startTime?(this.$1.splice(a-1,1),a--):c.endTime>b.startTime&&this.$1.splice(a-1,1,{startTime:c.startTime,endTime:b.startTime,tag:c.tag}),c.endTime>b.endTime&&this.$1.splice(a+1,0,{startTime:b.endTime,endTime:c.endTime,tag:c.tag})));c=null;a!==this.$1.length-1&&(c=this.$1[a+1]);c&&(this.$4(c.tag,b.tag)?c.startTime<=b.endTime&&this.$1.splice(a,2,{startTime:b.startTime,endTime:Math.max(c.endTime,b.endTime),tag:b.tag}):c.startTime<=b.endTime&&(c.endTime=this.$3?this.$2:0,c=null;for(var b=b;b0:!1)||(!e.$OzMediaStream1.getBool("prevent_unnecessary_seek_stream_anchor_reset")||e.$OzMediaStream9!=null)&&(e.$OzMediaStream9=null,e.$OzMediaStream32=!1,e.$OzMediaStream25&&e.$OzMediaStream25.resolve())}));e.$OzMediaStream41!=null&&e.$OzMediaStream17.addSubscriptions(e.$OzMediaStream41.onRepresentationBlocked(function(a){return e.$OzMediaStream43(a)}));e.$OzMediaStream22=d("oz-player/utils/OzMimeUtil").getMimeType(q.getMimeCodecs());e.$OzMediaStream31=new(c("oz-player/networks/OzStreamingTaskStateManager"))({mimeType:e.$OzMediaStream22,priorityCalculator:e.$OzMediaStream28,loggerProvider:e.$OzMediaStream18,setCustomFetchStreamLoggingAttributes:e.$OzMediaStream40,config:e.$OzMediaStream1});e.$OzMediaStream24=new(c("oz-player/streams/OzMediaStreamLoopDriver"))(babelHelpers.assertThisInitialized(e),e.$OzMediaStream18);p===q.getID()?(e.$OzMediaStream8=q,e.$OzMediaStream21>0&&e.$OzMediaStream44(h,q)):e.$OzMediaStream45(q);return e}var e=b.prototype;e.start=function(){this.$OzMediaStream24.start()};e.getCurrentRepresentation=function(){return this.$OzMediaStream8};e.switchRepresentation=function(a){this.$OzMediaStream45(a,"user")};e.onError=function(a){return this.$OzMediaStream34.onError(a)};e.updateRunTimeConfigs=function(a){a=a.streamDataHandler;a!==void 0&&(this.$OzMediaStream35=a)};e.$OzMediaStream45=function(a,b){var d=this;b===void 0&&(b="internal");b==="user"&&(this.$OzMediaStream9=null);if(this.$OzMediaStream1.getBool("fix_segment_updated_subscription_leak")){var e;(e=this.$OzMediaStream20)==null?void 0:e.remove();this.$OzMediaStream20=null}e=this.$OzMediaStream18.cloneContext().setType(this.$OzMediaStream22+";init");var f=e.cloneContext().setRepresentationID(a.getID()),g=a.getInitSegment(),h=g.getData();if(h==null){g=this.$OzMediaStream12.request([g],[c("oz-player/networks/getOzBandwidthEstimatorPipeThroughReporter")(this.$OzMediaStream22)],f,"ENABLE_CACHE");h=g.getStream()}var i=e.getOperationLogger("stream_switch").setPreviousRepresentationID(this.$OzMediaStream8?this.$OzMediaStream8.getID():null).setInitiator(b).setRepresentationID(a.getID()).setReason(b==="internal"?this.$OzMediaStream16&&this.$OzMediaStream16.getLastEvaluationReason():b).start();this.$OzMediaStream8=a;this.emit("switchRepresentation",b,a);this.$OzMediaStream46({data:h,dataAppendedCallback:function(){i.log(),d.$OzMediaStream1.getBool("append_retry_quota_exceeded_error")&&d.$OzMediaStream27.handleEvent("append_succeeded"),d.emit("initAppended"),d.$OzMediaStream14.notifyRepresentationSwitched(d)},dataAppendedErrorCallback:function(b){var c;i.setError(b).log();d.$OzMediaStream47(b);(c=d.$OzMediaStream41)==null?void 0:c.handleError(a.getID(),b);if(d.$OzMediaStream1.getBool("proceed_on_representation_change_in_init_append_fail")&&a.getID()!==d.$OzMediaStream8.getID()){(c=d.$OzMediaStream25)==null?void 0:c.resolve()}},loggerProvider:f.cloneContext(),appendTarget:0,timeRange:null})};e.getLoopInterval=function(){return this.$OzMediaStream23};e.execute=function(){var a=this.$OzMediaStream48();if(a){var b=this.$OzMediaStream25=new(c("oz-player/shims/OzDeferred"))(c("oz-player/shims/OzMaybeNativePromise"));a.then(function(){return b.resolve()})["catch"](function(a){return b.reject(a)});return b.getPromise()}return null};e.$OzMediaStream49=function(a){if(this.$OzMediaStream16&&this.$OzMediaStream30&&(this.$OzMediaStream1.getBool("enable_abr_for_first_request")||this.$OzMediaStream15||this.$OzMediaStream21>0)){a=this.$OzMediaStream16.getBestRepresentation(a);if(this.$OzMediaStream8!==a)return a}return null};e.$OzMediaStream50=function(a){var b=this.$OzMediaStream6?this.$OzMediaStream6.getSourceBufferState():null,c=this.$OzMediaStream21>0?this.$OzMediaStream8.getSegment(this.$OzMediaStream21-1):null,e=this.$OzMediaStream27.computeBufferTarget();if(this.$OzMediaStream1.getBool("null_segment_for_no_buffer_target")&&e<=0)return null;var f=null;a&&(f=this.$OzMediaStream8.getCustomFieldFirstSegment());if(!f&&this.$OzMediaStream8.canPredict()&&this.$OzMediaStream37!=null){a=this.$OzMediaStream36&&this.$OzMediaStream7.isPlaying();return this.$OzMediaStream37.getSegment(this.$OzMediaStream8,this.$OzMediaStream7,e,b,this.$OzMediaStream9||c,this.$OzMediaStream10,this.$OzMediaStream1,a,this.$OzMediaStream22)}else{f||(f=d("oz-player/streams/OzSegmentLocator").getSegment(this.$OzMediaStream8,this.$OzMediaStream7,e,b,this.$OzMediaStream8,this.$OzMediaStream9||c,this.$OzMediaStream1,this.$OzMediaStream33));if(this.$OzMediaStream8.canPredict()){a=this.$OzMediaStream10&&this.$OzMediaStream10.getSequenceNumber()||0;e=f&&f.getSequenceNumber()||0;if(f&&this.$OzMediaStream10&&a>=e){e=d("oz-player/streams/OzSegmentLocator").getEndingSequenceNumber(this.$OzMediaStream8);return(e||0)>=a?this.$OzMediaStream10:null}}}if(!f&&!this.$OzMediaStream51()){e=this.$OzMediaStream8.getEndingSegment();if(e&&this.$OzMediaStream8.isEndingSegment(e)){a=e.getTimeRange().endTime;b=d("oz-player/streams/OzSegmentLocator").getTimeToQuery(this.$OzMediaStream7,b,this.$OzMediaStream9||c);b>=a&&!this.$OzMediaStream51()&&(f=e)}}return f};e.$OzMediaStream52=function(){return!this.$OzMediaStream15&&this.$OzMediaStream21===0};e.$OzMediaStream53=function(a,b){var e;e=(e=b.fetchSingleSegment)!=null?e:!1;b=(b=b.preventRepresentationSwitch)!=null?b:!1;var f=[];if(e)f=[a];else{e=this.$OzMediaStream29.computeMin(this.$OzMediaStream7,a,this.$OzMediaStream8);f=d("oz-player/strategies/OzStreamLengthStrategy").getStreamingSegments(this.$OzMediaStream1,e,this.$OzMediaStream8,this.$OzMediaStream7,a);f=c("oz-player/networks/OzNetworkManager").getStreamableSegmentsRange(f);if(!b){e=this.$OzMediaStream49(f);if(e){this.$OzMediaStream45(e);a=this.$OzMediaStream50(!1);if(!a)return[];else return this.$OzMediaStream53(a,{fetchSingleSegment:!1,preventRepresentationSwitch:this.$OzMediaStream1.getBool("prevent_multiple_successive_representation_switch")})}}}return f};e.$OzMediaStream54=function(){var a=this;if(this.$OzMediaStream1.getBool("fix_segment_updated_subscription_leak")){var b=function(b){b==null?void 0:b.remove(),a.$OzMediaStream20===b&&(a.$OzMediaStream20=null)};b(this.$OzMediaStream20);var d=null;return new(c("oz-player/shims/OzMaybeNativePromise"))(function(c,e){a.getCurrentRepresentation().forceParseIfNotParsed(),d=a.getCurrentRepresentation().addUpdateListener(function(){b(d),c()}),a.$OzMediaStream20=d})["catch"](function(a){b(d);throw a})}else return new(c("oz-player/shims/OzMaybeNativePromise"))(function(c,d){a.getCurrentRepresentation().forceParseIfNotParsed();var b=a.getCurrentRepresentation().addUpdateListener(function(){c(),a.$OzMediaStream20=null,b.remove()});a.$OzMediaStream20=b})};e.$OzMediaStream44=function(a,b){var c=this,d=b.addUpdateListener(function(){var e=b.getSegment(a-1);e!=null&&c.$OzMediaStream26.add(0,e.getTimeRange().endTime,{id:b.getID()});d.remove()})};e.$OzMediaStream55=function(a,b){var d=this;return new(c("oz-player/shims/OzMaybeNativePromise"))(function(b,c){c=d.$OzMediaStream50(a);c==null?b([]):b(d.$OzMediaStream53(c,{fetchSingleSegment:a}))})};e.$OzMediaStream48=function(){var a,b=this,d=this.$OzMediaStream6?this.$OzMediaStream6.getSourceBufferState():null;if(this.$OzMediaStream8.canPredict()&&this.$OzMediaStream10&&this.$OzMediaStream8.isEndingSegment(this.$OzMediaStream10)){this.endStream();this.$OzMediaStream18.cloneContext().getOperationLogger("media_loop_end").setInitiator("end1").setRepresentationID(this.$OzMediaStream8.getID()).log();return}if(this.$OzMediaStream8.canPredict()&&this.$OzMediaStream9&&this.$OzMediaStream8.isEndingSegment(this.$OzMediaStream9)){this.endStream();this.$OzMediaStream18.cloneContext().getOperationLogger("media_loop_end").setInitiator("end2").setRepresentationID(this.$OzMediaStream8.getID()).log();return}var e=this.$OzMediaStream52(),f=this.$OzMediaStream50(e);if(this.$OzMediaStream8.canPredict()&&this.$OzMediaStream11!=null&&((f==null?void 0:f.getSequenceNumber())||0)>=(((a=this.$OzMediaStream11)==null?void 0:a.getSequenceNumber())||0)){this.$OzMediaStream1.getBool("log_extra_events")&&this.$OzMediaStream18.cloneContext().getOperationLogger("media_loop_end").setInitiator("segment_end").setRepresentationID(this.$OzMediaStream8.getID()).log();return}f===this.$OzMediaStream38?this.$OzMediaStream39++:this.$OzMediaStream39=0;this.$OzMediaStream38=f;this.$OzMediaStream7.isPlaying()&&this.$OzMediaStream39>0&&this.$OzMediaStream1.getBool("log_extra_events")&&this.$OzMediaStream18.cloneContext().getOperationLogger("get_segment_to_stream_same_segment").setReason((f==null?void 0:f.getSequenceNumber())!=null?String(f==null?void 0:f.getSequenceNumber()):null).setLength(this.$OzMediaStream39).setRepresentationID(this.$OzMediaStream8.getID()).setSegmentStartTime(f==null?void 0:f.getTimeRange().startTime).setSegmentEndTime(f==null?void 0:f.getTimeRange().endTime).log();if(this.$OzMediaStream32){this.$OzMediaStream23=h;this.$OzMediaStream18.cloneContext().getOperationLogger("media_loop_end").setInitiator("ongoing_stream").setReason(((a=this.$OzMediaStream9)==null?void 0:a.getSequenceNumber())!=null?String((a=this.$OzMediaStream9)==null?void 0:a.getSequenceNumber()):null).setRepresentationID(this.$OzMediaStream8.getID()).log();return null}this.$OzMediaStream21>0&&!this.$OzMediaStream51()&&this.endStreamIfBufferedToEndTime();if(!f||this.$OzMediaStream32){if(this.$OzMediaStream8.canPredict()&&this.$OzMediaStream1.getBool("ms_promise_for_null")){var g=this.$OzMediaStream1.getNumber("ms_promise_for_null_ms");return new(c("oz-player/shims/OzMaybeNativePromise"))(function(a,d){var e=c("oz-player/shims/ozSetTimeoutAcrossTransitions")(function(){c("oz-player/shims/ozClearTimeout")(e),a()},g?g:(b.$OzMediaStream8.getMaxGopSec()||1)*1e3)})}this.$OzMediaStream23=h;this.$OzMediaStream32||this.$OzMediaStream31.finishTaskIfNoOngoingStream();return this.$OzMediaStream54()}this.$OzMediaStream23=0;var i=this.$OzMediaStream53(f,{fetchSingleSegment:e});if(i.length===0){this.$OzMediaStream18.cloneContext().getOperationLogger("media_loop_end").setInitiator("no_stream_segments").setReason(((a=this.$OzMediaStream9)==null?void 0:a.getSequenceNumber())!=null?String((f=this.$OzMediaStream9)==null?void 0:f.getSequenceNumber()):null).setRepresentationID(this.$OzMediaStream8.getID()).log();return this.$OzMediaStream54()}this.$OzMediaStream15=!0;var j=i[i.length-1]||null,k=this.$OzMediaStream8,l=function(){return k.isEndingSegment(j)};i.length!==0||c("oz-player/shims/ozvariant")(0,23148);a=i[0];f=a.getTimeRange().startTime;var m=j.getTimeRange().endTime,n=this.$OzMediaStream18.cloneContext();n.setRepresentationID(this.$OzMediaStream8.getID());this.$OzMediaStream1.getBool("log_appended_segment_info")||n.setSegmentStartTime(f).setSegmentEndTime(m);var o,p,q=this.$OzMediaStream1.getBool("disable_audio_scheduler")&&this.$OzMediaStream22.indexOf("audio")!==-1;this.$OzMediaStream1.getBool("use_scheduler")&&!q&&!e?p=this.$OzMediaStream31.startStreamDeferred({segmentsPromise:this.$OzMediaStream55(e,i),networkManager:this.$OzMediaStream12,sourceBufferState:d,playbackState:this.$OzMediaStream7,segmentsLoggerProvider:n.cloneContext()}):o=this.$OzMediaStream12.request(i,[c("oz-player/networks/getOzBandwidthEstimatorPipeThroughReporter")(this.$OzMediaStream22)],n.cloneContext());this.$OzMediaStream13=o;this.$OzMediaStream32=!0;var r=this.$OzMediaStream56(a,j,i.length),s={startTime:f,endTime:m,tag:{id:this.$OzMediaStream8.getID()}},t=n.getOperationLogger("queued_append");t.start().setReason(this.$OzMediaStream16&&this.$OzMediaStream16.getLastEvaluationReason());var u=function(a){b.$OzMediaStream46({data:a,dataAppendedCallback:function(c,a){t.setAppendedBufferMs(Math.round(c.appendedSec*1e3)),b.$OzMediaStream1.getBool("log_appended_segment_info")&&t.setSegmentEndTime(c.endTime_UNSAFE*1e3).setSegmentStartTime(c.startTime_UNSAFE*1e3),t.log(),b.$OzMediaStream1.getBool("append_retry_quota_exceeded_error")&&b.$OzMediaStream27.handleEvent("append_succeeded"),i.forEach(function(c){b.emit("SegmentAppended",b.$OzMediaStream57(c,a))}),l()&&b.endStream(),b.$OzMediaStream21=0},dataAppendedErrorCallback:function(a){t.setError(a).log();var c=p||o;c&&c.cancel();b.$OzMediaStream47(a)},loggerProvider:n.cloneContext(),appendTarget:r,timeRange:s})},v;!!p||!!o||c("oz-player/shims/ozvariant")(0,23147);p?(p.genStream().then(function(a){return u(a)})["catch"](function(a){return b.$OzMediaStream34.emitError(a)}),v=p.getStatusChangePromise()):o&&(u(o.getStream()),v=o.getStatusChangePromise());!v&&c("oz-player/shims/ozvariant")(0,51928);q=v.then(function(a){b.$OzMediaStream58(a,j);return b.$OzMediaStream59()}).then(function(){b.$OzMediaStream2=0});return q["catch"](function(a){var c=b.$OzMediaStream9;return b.$OzMediaStream60(j).then(function(){var d;(d=b.$OzMediaStream41)==null?void 0:d.handleError(k.getID(),a);return b.$OzMediaStream61(a,j,c)})})};e.handleError=function(a){var b=this.$OzMediaStream18.getOperationLogger("media_stream_loop_error");b.setError(a).setResult("failed").log();return this.$OzMediaStream1.getNumber("loop_body_handle_error_interval_ms")};e.$OzMediaStream61=function(a,b,e){var f=this;this.$OzMediaStream32=!1;var g=new(c("oz-player/shims/OzDeferred"))(c("oz-player/shims/OzMaybeNativePromise")),h=this.$OzMediaStream62(a),i=h[0],j=h[1],k=function(b){f.$OzMediaStream2++;f.$OzMediaStream1.getBool("log_extra_events")&&f.$OzMediaStream18.getOperationLogger("media_stream").setInitiator("fetch_stream_"+(b.behavior!=null?b.behavior:"default")).setLength(b.timeoutMs).setReason(""+i.getDescription()).setCode(j.length>0?Number.parseInt(j,10):null).setType(f.$OzMediaStream22).log();if(b.behavior==="retry_failed_request")f.$OzMediaStream9=e;else if(b.behavior==="recover_failed_request"&&a instanceof c("oz-player/utils/OzError")){var h;h=(h=a.getExtra())==null?void 0:h.headers;h=c("oz-player/shims/OzNetworkDiagnostics").getNextValidSegmentId(h);h!=null&&(f.$OzMediaStream9=d("oz-player/streams/OzPredictedSegmentLocator").getSegmentForSequenceNumber(f.$OzMediaStream8,h-1))}c("oz-player/shims/ozSetTimeoutAcrossTransitions")(function(){f.emit("streamErrorRetry",i);return g.resolve()},b.timeoutMs)};this.$OzMediaStream4!==j?(this.$OzMediaStream4=j,this.$OzMediaStream3=1):this.$OzMediaStream3++;h=!0;var l=function(){h=!1},m={consecutiveFailuresForErrorCode:this.$OzMediaStream3,endStream:function(){l(),f.$OzMediaStream10=b,f.$OzMediaStream1.getBool("segment_end_410_response")&&(f.$OzMediaStream11=b),f.endStream(),g.resolve()},error:i,isInitialRequest:!1,retry:function(a){var b;l();k({timeoutMs:(b=a==null?void 0:a.waitMs)!=null?b:0,behavior:a==null?void 0:a.behavior})},retryAttemptCount:this.$OzMediaStream2};this.emit("streamError",m);h&&(this.$OzMediaStream34.emitError(i),this.$OzMediaStream2=0,g.resolve());return g.getPromise()};e.$OzMediaStream60=function(a){this.$OzMediaStream9=null;this.$OzMediaStream10=a;this.$OzMediaStream31.finishTaskIfNoOngoingStream();return this.$OzMediaStream6?this.$OzMediaStream6.cancelOperationAndCleanQueue(this.$OzMediaStream18):c("oz-player/shims/OzMaybeNativePromise").resolve()};e.$OzMediaStream58=function(a,b){a==="done"&&(this.$OzMediaStream9=b)};e.$OzMediaStream59=function(){this.$OzMediaStream32=!1};e.$OzMediaStream62=function(a){var b,d;a instanceof c("oz-player/utils/OzError")?(b=a.getExtra().code||"",d=a):(b=a.status!=null&&a.status!==""?a.status.toString():"0",d=new(c("oz-player/utils/OzError"))({type:"OZ_NETWORK",description:a.message,extra:{originalError:a,code:b,url:a.url}}));return[d,b]};e.$OzMediaStream46=function(a){this.$OzMediaStream19.push(a),this.$OzMediaStream6&&this.$OzMediaStream42()};e.$OzMediaStream63=function(a){if(this.$OzMediaStream6!=null&&a!=null){var b=this.$OzMediaStream6.getSourceBufferState().getBufferedRanges();b=d("oz-player/utils/OzRangeUtils").getRangeForTime(a.startTime+i,b);b!=null&&this.$OzMediaStream26.add(a.startTime,b.endTime,a.tag)}};e.$OzMediaStream42=function(){var a=this;this.$OzMediaStream19.forEach(function(b){var d=b.data,e=b.dataAppendedCallback,f=b.dataAppendedErrorCallback,g=b.loggerProvider,h=b.appendTarget,i=b.timeRange;b=d instanceof Uint8Array||a.$OzMediaStream35==null?d:d.pipeThrough(new(c("oz-player/networks/OzReadableStreamDataReader"))(a.$OzMediaStream35.bind(a,a.$OzMediaStream8)));d=null;var j=a.$OzMediaStream1.getNumber("tagged_time_range_per_append_throttle");j>0&&(d=c("oz-player/shims/ozThrottle")(function(){a.$OzMediaStream63(i)},j));a.$OzMediaStream6&&a.$OzMediaStream6.queueData(b,g,h,d).then(function(b){e(b,i),i&&a.$OzMediaStream8.canPredict()&&b.startTime_UNSAFE&&b.endTime_UNSAFE?a.$OzMediaStream26.add(b.startTime_UNSAFE,b.endTime_UNSAFE,i.tag):i&&a.$OzMediaStream26.add(i.startTime,i.endTime,i.tag)})["catch"](function(a){f(a)})});this.$OzMediaStream19=[]};e.$OzMediaStream64=function(){var a=this.$OzMediaStream6,b=this.$OzMediaStream7.getCurrentTime(),d=null;a&&(d=this.$OzMediaStream1.getBool("clear_buffer_on_quota_exceeded_error")?a.clearRangeWithWait(0,b):a.cancelOperationAndCleanQueue(this.$OzMediaStream18));return(b=d)!=null?b:c("oz-player/shims/OzMaybeNativePromise").resolve()};e.$OzMediaStream47=function(a){var b=this;if(this.$OzMediaStream1.getBool("append_retry_quota_exceeded_error")&&a instanceof c("oz-player/utils/OzError")&&a.getType()==="OZ_SOURCE_BUFFER_QUOTA_EXCEEDED"){this.emit("streamErrorRetry",new(c("oz-player/utils/OzError"))({type:a.getType(),description:a.getDescription(),extra:babelHelpers["extends"]({},a.getExtra(),{mimeType:this.$OzMediaStream22})}));this.$OzMediaStream27.handleEvent("append_quota_exceeded");var d=this.$OzMediaStream64();d.then(function(){b.restartLoopBody()})["catch"](function(a){a=new(c("oz-player/utils/OzError"))({type:"OZ_STREAM_APPEND_QUOTA_EXCEEDED_HANDLER_ERROR",description:a.name+": "+a.message,extra:{originalError:a,code:c("oz-player/utils/OzCustomErrorCode").STREAM_APPEND_QUOTA_EXCEEDED_HANDLER_ERROR}});b.$OzMediaStream34.emitError(a)})}else this.$OzMediaStream1.getBool("fallback_on_append_error")&&a instanceof c("oz-player/utils/OzError")&&a.getType()!=="OZ_NETWORK"&&this.$OzMediaStream34.emitError(a)};e.$OzMediaStream56=function(a,b,c){var d=0,e=this.$OzMediaStream1.getNumber("appends_per_segment");if(e>0){a=a.getByteRange();b=b.getByteRange();a&&b&&b.endByte!=null&&(d=Math.ceil((b.endByte-a.startByte+1)/(c*e)))}d===0&&(d=this.$OzMediaStream1.getNumber("append_byte_target_without_range"));return d};e.getIsAdaptationEnabled=function(){return this.$OzMediaStream30};e.enableAdaptation=function(){this.$OzMediaStream30=!0};e.disableAdaptation=function(){this.$OzMediaStream30=!1};e.cleanup=function(){var a=this.$OzMediaStream1.getBool("stop_loop_driver_immediately_on_cleanup");a&&this.$OzMediaStream24.stop();this.$OzMediaStream5.then(function(a){a.destroy()});this.$OzMediaStream31.destroy();this.$OzMediaStream17.release();this.$OzMediaStream17.engage();this.removeAllListeners();this.$OzMediaStream20&&(this.$OzMediaStream20.remove(),this.$OzMediaStream1.getBool("fix_segment_updated_subscription_leak")&&(this.$OzMediaStream20=null));a||this.$OzMediaStream24.stop()};e.getRepresentationIDAtTime=function(a){var b=this.$OzMediaStream26.get(a);if(!b){var c=this.$OzMediaStream8.getTimeRanges();c=c[c.length-1];var d=.001;c&&a>=c.endTime&&a<=this.$OzMediaStream7.getDuration()+d&&(b=this.$OzMediaStream26.get(c.endTime-d))}return b?b.id:null};e.endStream=function(){this.$OzMediaStream14.notifyMediaStreamEnded(this),this.$OzMediaStream65()};e.endStreamIfBufferedToEndTime=function(){var a=this.$OzMediaStream8.getTimeRanges();if(a.length>0){a=a[a.length-1].endTime;if(this.$OzMediaStream6){var b=this.$OzMediaStream6.getSourceBufferState().getBufferedRanges();b.length>0&&(Math.abs(b[b.length-1].endTime-a)0&&(this.$OzMediaStream33=a[a.length-1].endTime)}};e.$OzMediaStream51=function(){return this.$OzMediaStream33!==null};e.$OzMediaStream43=function(a){this.$OzMediaStream8.getID()===a&&this.$OzMediaStream16!=null&&this.$OzMediaStream45(this.$OzMediaStream16.getBestRepresentation())};e.setEnableLiveheadCatchup=function(a){this.$OzMediaStream36=a};e.clearSourceBufferRange=function(a,b){var d=this.$OzMediaStream6;return d?d.clearRangeWithWait(a,b):c("oz-player/shims/OzMaybeNativePromise").resolve()};e.getDebug=function(){return{SourceBufferManager:this.$OzMediaStream6,MediaStreamAbrManager:this.$OzMediaStream16}};return b}(c("oz-player/shims/OzEventEmitter"));g["default"]=a}),98); __d("oz-player/utils/getRepresentationInCache",["oz-player/networks/RequestParamCreator"],(function(a,b,c,d,e,f,g){"use strict";var h=new(c("oz-player/networks/RequestParamCreator"))();function a(a,b){b===void 0&&(b=null);return a.find(function(a){a=a.getInitSegment();var c=a&&a.getByteRange();return a&&c&&b?b.hasCacheValue(h.createRequestParam(a.getURI(),c).uri.toString()):!1})||null}g["default"]=a}),98); __d("oz-player/Player",["Promise","oz-player/configs/OzPlayerConfig","oz-player/drm/OzDrmManager","oz-player/loggings/OzDevConsolePerfLogger","oz-player/loggings/OzLoggingUtils","oz-player/loggings/OzMultiDestinationPerfLogger","oz-player/loggings/OzOperationLoggerObserver","oz-player/manifests/OzDynamicVideoLibrary","oz-player/manifests/OzVideoRepresentation","oz-player/media_source/MediaSourceManager","oz-player/media_source/OzMediaSeekableRangeManager","oz-player/networks/OzClientClock","oz-player/networks/OzNetworkManager","oz-player/parsers/OzMpdParser","oz-player/parsers/OzMpdUpdater","oz-player/parsers/OzXmlParserImplDOMParser","oz-player/parsers/OzXmlParserImplSax","oz-player/playback_controls/OzClearSourceBufferOnSeekManager","oz-player/playback_controls/OzLiveLatencyManager","oz-player/playback_controls/OzPlaybackTimeRangeManager","oz-player/playback_controls/OzPlayheadManager","oz-player/playback_controls/OzPlayheadNudger","oz-player/shims/OzEventEmitter","oz-player/shims/OzMaybeNativePromise","oz-player/shims/OzPerformance","oz-player/shims/OzSubscriptionsHandler","oz-player/shims/ozClearTimeout","oz-player/shims/ozSetTimeoutAcrossTransitions","oz-player/shims/ozvariant","oz-player/states/OzObservedPlaybackState","oz-player/states/OzPositionToViewport","oz-player/strategies/OzAbrManager","oz-player/strategies/OzAudioIBRManager","oz-player/strategies/OzBandwidthBoundaryStreamSegmentsCountStrategy","oz-player/strategies/OzBlockedRepresentationsManager","oz-player/strategies/OzBufferAheadPriorityStrategy","oz-player/strategies/OzBufferAheadTargetStrategy","oz-player/strategies/OzBufferEndLimitStrategy","oz-player/strategies/OzBufferTargetBoundedStreamSegmentsCountStrategy","oz-player/strategies/OzBufferTargetCalculator","oz-player/strategies/OzBufferTargetCalculatorQuotaExceededConstraint","oz-player/strategies/OzBufferingDetector","oz-player/strategies/OzLiveheadDeltaCatchupStrategy","oz-player/strategies/OzPausedStreamSegmentsCountStrategy","oz-player/strategies/OzPlayheadAtInterruptionDetector","oz-player/strategies/OzPlayingStatePriorityStrategy","oz-player/strategies/OzPositionToViewportPriorityStrategy","oz-player/strategies/OzPriorityCalculator","oz-player/strategies/OzStaleManifestBufferTargetStrategy","oz-player/strategies/OzStartupBufferTargetStrategy","oz-player/strategies/OzStaticStreamSegmentsStrategy","oz-player/strategies/OzStreamSegmentsCountCalculator","oz-player/strategies/OzSupportedMimeCodecsRestriction","oz-player/streams/OzEndOfStreamWatcher","oz-player/streams/OzHandleUserRepresentationSwitch","oz-player/streams/OzMediaStream","oz-player/streams/OzPredictedSegmentLocator","oz-player/utils/OzCustomErrorCode","oz-player/utils/OzError","oz-player/utils/OzErrorEmitter","oz-player/utils/OzMpdUtils","oz-player/utils/OzPlaybackRestrictionsUtils","oz-player/utils/OzReadableStreamUtils","oz-player/utils/getRepresentationInCache"],(function(a,b,c,d,e,f,g){"use strict";function h(a){a||c("oz-player/shims/ozvariant")(0,21876);return a}a=function(a){babelHelpers.inheritsLoose(e,a);function e(b){var e;e=a.call(this)||this;e.$Player4=new Map();e.$Player5=new Map();e.$Player9=void 0;e.$Player10=new(c("oz-player/shims/OzSubscriptionsHandler"))();e.$Player11=new(c("oz-player/utils/OzErrorEmitter"))();e.$Player25=[];e.$Player31=null;e.$Player32=null;e.$Player41=null;e.$Player49=!1;e.$Player52=0;e.$Player53=null;e.$Player54=null;e.$Player55=0;e.$Player56=null;e.$Player57=null;e.$Player58=!1;e.$Player61=null;e.$Player76=function(){var a=e.$Player3.getBool("xmlparser_use_domparser")?new(c("oz-player/parsers/OzXmlParserImplDOMParser"))():new(c("oz-player/parsers/OzXmlParserImplSax"))();return a};e.$Player78=function(){e.$Player4.forEach(function(a){return a.endStreamIfBufferedToEndTime()})};e.$Player79=function(){e.$Player4.forEach(function(a){return a.endStream()})};var f=b.audioOnly;f=f===void 0?!1:f;var g=b.bufferingDetector,h=b.videoNodeOrQuickStarter,i=b.config,j=b.configMap,k=b.rawMpdXml,l=b.mpdUrl;l=l===void 0?null:l;var m=b.loggerConfig;m=m===void 0?{perfLoggerProviders:[],observedOperationLoggers:[],isOzDevConsoleEnabled:!1}:m;var n=b.prefetchCache;n=n===void 0?null:n;var o=b.getOverrideOzRequestImplementation;o=o===void 0?null:o;var p=b.networkRequestStreamHandlers,q=b.networkRequestStreamRetryHandler,r=b.getShouldIncludeCredentials;r=r===void 0?null:r;var s=b.getCustomRequestParametersForURI;s=s===void 0?null:s;var t=b.initialRepresentationIDs;t=t===void 0?[]:t;var u=b.debugCreateInitiator;u=u===void 0?null:u;var v=b.customParsers;v=v===void 0?new Map():v;var w=b.videoPlaybackRestrictions;w=w===void 0?[]:w;var x=b.customSegmentTimelineParser;x=x===void 0?null:x;var y=b.customRepresentationParsers;y=y===void 0?{}:y;var z=b.videoAbrManagerFactory;z=z===void 0?null:z;var A=b.seekHandler;A=A===void 0?null:A;var B=b.initialPlaybackPositionForDynamicMpd;B=B===void 0?-20:B;var C=b.liveheadFallBehindBlockThreshold;C=C===void 0?30:C;var D=b.liveheadFallBehindBlockMargin;D=D===void 0?5.9:D;var E=b.startTimeStamp;E=E===void 0?0:E;var F=b.drmProviders;F=F===void 0?[]:F;var G=b.getVideoDimensions;G=G===void 0?null:G;var H=b.setCustomFetchStreamLoggingAttributes;H=H===void 0?null:H;var I=b.bufferEndLimit;I=I===void 0?null:I;b=b.configureCustomRequestParametersForSegment;b=b===void 0?null:b;e.$Player47=u;u=m.perfLoggerProviders;var J=m.observedOperationLoggers;m=m.isOzDevConsoleEnabled;e.$Player16=m||!1;e.$Player15=new(d("oz-player/loggings/OzMultiDestinationPerfLogger").OzMultiDestinationPerfLoggerProvider)(e.$Player67().concat(u));e.$Player1=f;e.$Player3=(m=i)!=null?m:new(c("oz-player/configs/OzPlayerConfig"))((u=j)!=null?u:{});e.$Player68();e.$Player22=new(c("oz-player/loggings/OzOperationLoggerObserver"))();e.$Player22.observe(J,e.$Player15);e.$Player24=n;e.$Player51=o;f=n&&n.getCachedRepresentations();e.$Player25=f||t;e.$Player27=v;e.$Player65=new(c("oz-player/strategies/OzBlockedRepresentationsManager"))(e.$Player3);e.$Player10.addSubscriptions(e.$Player65.onRepresentationBlocked(function(a){e.emit("representationBlocked",a)}));e.$Player30=[e.$Player65,new(c("oz-player/strategies/OzSupportedMimeCodecsRestriction"))()].concat(w);e.$Player28=y;e.$Player29=x;e.$Player34=z;e.$Player35=A;e.$Player36=E;e.$Player37=B;e.$Player38=C;e.$Player40=D;e.$Player64=I;e.$Player45=F;e.$Player61=H;h instanceof HTMLVideoElement?(e.$Player2=h,e.$Player6=new(c("oz-player/media_source/MediaSourceManager"))(e.$Player2,e.$Player3,e.$Player15,function(a){e.emit("vttCaptionsUpdated",a)})):(e.$Player2=h.getVideoNode(),e.$Player6=h.getMediaSourceManager(),e.$Player7=h);e.$Player6.setOnClearVideoNodeError(function(){e.$Player69()});e.$Player6.setOnRetryVideoElementError(function(a){e.emit("videoNodeErrorRetry",a)});e.$Player6.onError(function(a){e.$Player11.emitError(a)});e.$Player62=new(c("oz-player/playback_controls/OzClearSourceBufferOnSeekManager"))(e.$Player2,e.$Player3,e.$Player4,e.$Player15);e.$Player62.maybeOverwriteVideoCurrentTimeProperty();e.$Player10.addSubscriptions(e.$Player62.onError(e.$Player11.emitError));e.$Player3.getBool("enable_dvl")&&(e.$Player63=new(c("oz-player/manifests/OzDynamicVideoLibrary"))({config:e.$Player3}));e.$Player42=p;e.$Player43=r;e.$Player44=s;e.$Player66=b;e.$Player12=new(c("oz-player/networks/OzNetworkManager"))({config:e.$Player3,prefetchCache:e.$Player24,networkRequestStreamHandlers:e.$Player42,getOverrideOzRequestImplementation:e.$Player51,getShouldIncludeCredentials:e.$Player43,getCustomRequestParametersForURI:e.$Player44,networkRequestStreamRetryHandler:q,setCustomFetchStreamLoggingAttributes:e.$Player61,dynamicVideoLibrary:e.$Player63,configureCustomRequestParametersForSegment:e.$Player66});e.$Player17=l;e.$Player3.getBool("treat_inline_mpd_xml_empty_string_as_null")?e.$Player8=k!=null&&k!==""?k:null:e.$Player8=k;e.$Player13=new(c("oz-player/states/OzObservedPlaybackState"))(e.$Player3,e.$Player2,e.$Player15);e.$Player50=G;e.$Player14=new(c("oz-player/streams/OzEndOfStreamWatcher"))(e.$Player6,e.$Player3);e.$Player10.addSubscriptions(e.$Player14.addListener("streamEnd",function(){e.$Player49=!0,e.emit("streamEnd")}));e.$Player23=new(c("oz-player/media_source/OzMediaSeekableRangeManager"))(e.$Player6,e.$Player3);if(e.$Player3.getBool("accept_external_buffering_detector")){e.$Player48=(i=g)!=null?i:e.$Player70()}else e.$Player7==null&&(e.$Player48=e.$Player70());e.$Player3.getNumber("pixels_below_viewport_to_observe")>0&&(e.$Player59=new(c("oz-player/states/OzPositionToViewport"))(e.$Player2,e.$Player3));return e}var f=e.prototype;f.$Player71=function(a){var b=this;this.$Player72();this.$Player7&&this.$Player10.addSubscriptions(this.$Player7.onError(this.$Player11.emitError));try{var e=d("oz-player/loggings/OzLoggingUtils").executeOperationAndLog(this.$Player15.cloneContext().setInitiator(this.$Player47),"parse_manifest",function(e){var c=b.$Player73(a);if(b.$Player3.getBool("log_extra_events")){var f,g;f=String((f=c.getCustomField("currentServerTimeMs"))!=null?f:"");g=String((g=c.getCustomField("lastVideoFrameTs"))!=null?g:"");f={currentServerTimeMs:f,ingestLastVideoFrameTs:g,nowMs:String(Date.now())};g=d("oz-player/utils/OzMpdUtils").getMpdLastTimeRange(c,b.$Player3);g=g&&g.endTime!=0?g.endTime:null;e.setLiveheadPosition(g).setLiveheadSeqNumMpd(d("oz-player/utils/OzMpdUtils").getMpdLastSequenceNumber(c)).setManifestType(c.isStaticMpd()?"static":"dynamic").setIsTemplatedManifest(Boolean(c.getCustomField("isLiveTemplated"))).setUserInfo(f)}return c});this.$Player74(e)}catch(a){e=a;if(e instanceof c("oz-player/utils/OzError"))this.$Player11.emitError(e);else throw e}};f.$Player74=function(a){var b=this;this.$Player9=h(a);this.$Player3.getBool("player_emit_mpdparsed_early")&&this.emit("mpdParsed",a);this.$Player26=this.$Player75();this.$Player65.setAvailableRepresentationsCount(a.getVideoRepresentations().length);if(this.$Player17!==null&&this.$Player17!==void 0){var d=new(c("oz-player/parsers/OzMpdUpdater"))(this.$Player3,a,this.$Player12,this.$Player13,this.$Player15,{mpdUrl:null,createXmlParser:this.$Player76,customParsers:this.$Player27,customRepresentationParsers:this.$Player28,customSegmentTimelineParser:this.$Player29},this.$Player46);this.$Player77(d);this.$Player10.addSubscriptions(d.onError(this.$Player11.emitError),d.addListener("manifestFetchError",function(a){return b.emit("manifestFetchError",a)}),d.addListener("manifestFetchErrorRetry",function(a){return b.emit("manifestFetchErrorRetry",a)}),d.addListener("streamTransitionToStatic",this.$Player78),d.addListener("streamGone",this.$Player79));d.setupUpdateLoop();this.$Player21=d}this.$Player3.getBool("use_live_latency_manager")?!a.isStaticMpd()?(this.$Player39=new(c("oz-player/playback_controls/OzLiveLatencyManager"))({config:this.$Player3,mpd:a,playbackState:this.$Player13,bufferingDetector:this.$Player48,video:this.$Player2,loggerProvider:this.$Player15}),this.$Player36=this.$Player39.getPreferredLiveHeadLatencySec()*-1):this.$Player36=this.$Player36:this.$Player36=a.isStaticMpd()?this.$Player36:this.$Player80(a);this.$Player18=new(c("oz-player/playback_controls/OzPlayheadManager"))({video:this.$Player2,mpd:a,dynamicVideoLibrary:this.$Player63,playheadCatchup:this.$Player33,playbackState:this.$Player13,config:this.$Player3,perfLoggerProvider:this.$Player15,seekHandler:this.$Player35,initialPlaybackPosition:this.$Player36,canSupportSkipVideobufferGaps:this.$Player62.getCurrentTimePropertyOverwriteSuccess(),liveLatencyManager:this.$Player39});this.$Player19=new(c("oz-player/playback_controls/OzPlayheadNudger"))({config:this.$Player3,video:this.$Player2,perfLoggerProvider:this.$Player15});this.$Player20=new(c("oz-player/playback_controls/OzPlaybackTimeRangeManager"))({config:this.$Player3,video:this.$Player2,mpd:a,liveheadFallBehindBlockThreshold:this.$Player38,liveheadFallBehindBlockMargin:this.$Player40,playbackState:this.$Player13,perfLoggerProvider:this.$Player15});this.$Player81()["catch"](function(a){if(a instanceof c("oz-player/utils/OzError"))b.$Player11.emitError(a);else{var d=typeof a==="object"&&a!=null&&a.message!=null&&a.message!==""?String(a.message):String(a);b.$Player11.emitError(new(c("oz-player/utils/OzError"))({type:"OZ_INITIALIZATION",description:"Failed to setup streams: "+d,extra:{originalError:a,code:c("oz-player/utils/OzCustomErrorCode").SETUP_STREAMS_PROMISE_REJECTION.toString()}}))}});this.emit("mpdReady",a)};f.load=function(a){var b=this;this.$Player17=a;try{var d=this.$Player8;d!=null?this.$Player71(d):a!=null?this.$Player82(a).then(function(a){if(b.$Player58){b.$Player58=!1;b.load(b.$Player17);return}b.$Player8=a;b.$Player52=0;b.$Player71(a)})["catch"](function(d){var e;if(b.$Player58){b.$Player58=!1;b.load(b.$Player17);return}e=d instanceof c("oz-player/utils/OzError")?d:new(c("oz-player/utils/OzError"))({type:"OZ_INITIALIZATION",description:"Unknown mpd url load failure; errorMessage: "+d.message+"; errorDescription: "+((e=d.description)!=null?e:"")+";",extra:{originalError:d,url:a}});b.$Player83(e,a)}):this.$Player11.emitError(new(c("oz-player/utils/OzError"))({type:"OZ_INITIALIZATION",description:"Cannot start Oz without a raw mpd xml or mpd url"}))}catch(a){d=a instanceof c("oz-player/utils/OzError")?a:new(c("oz-player/utils/OzError"))({type:"OZ_INITIALIZATION",description:"Failed to call load"+("; errorMessage: "+a.message+"; errorDescription: "+((d=a.description)!=null?d:"")+";")});this.$Player11.emitError(d)}};f.$Player80=function(a){var b;b=(b=a.getVideoRepresentations()[0].getMaxGopSec())!=null?b:0;if(this.$Player3.getBool("use_ending_duration_for_gop_multiplier")){a=(a=a.getVideoRepresentations()[0].getEndingSegment())==null?void 0:a.getTimeRange();a=a!=null?a.endTime-a.startTime:0;a>0&&(b=a)}return Math.min(this.$Player37+this.$Player3.getNumber("dynamic_mpd_initial_playback_position_offset_modifier"),-1*b*this.$Player3.getNumber("pdash_download_cursor_catchup_threshold_gop_multiplier"))};f.$Player82=function(a){this.$Player52++;a=this.$Player12.requestRawUrl(a,null,this.$Player15);a=a.getStream().getReader();return d("oz-player/utils/OzReadableStreamUtils").pumpString(a)};f.$Player84=function(){this.$Player53!=null&&(c("oz-player/shims/ozClearTimeout")(this.$Player53),this.$Player53=null)};f.$Player83=function(a,b){var d=this,e=!0,f=this.$Player52-1,g=a.getExtra().code;this.$Player54!==g?(this.$Player54=g,this.$Player55=1):this.$Player55++;var h=function(){e=!1};g={endStream:function(){throw new(c("oz-player/utils/OzError"))({type:"OZ_INITIALIZATION",description:"Cannot call endStream before stream is started"})},consecutiveFailuresForErrorCode:this.$Player55,error:a,isInitialRequest:!0,retry:function(a){h(),d.$Player84(),d.$Player53=c("oz-player/shims/ozSetTimeoutAcrossTransitions")(function(){d.$Player84(),d.load(b)},(a==null?void 0:a.waitMs)!=null?a==null?void 0:a.waitMs:1e3)},retryAttemptCount:f};this.$Player3.getNumber("initial_manifest_request_retry_count")>0&&this.emit("manifestFetchError",g);e&&this.$Player11.emitError(a)};f.updatePlayerRunTimeConfig=function(a){var b=a.manifestUrl,c=a.audioStreamDataHandler,d=a.videoStreamDataHandler;a=a.applicationStreamDataHandler;if(d!==void 0){var e=this.$Player4.get("video");e&&e.updateRunTimeConfigs({streamDataHandler:d})}if(c!==void 0){e=this.$Player4.get("audio");e&&e.updateRunTimeConfigs({streamDataHandler:c})}if(a!==void 0){d=this.$Player4.get("caption");d&&d.updateRunTimeConfigs({streamDataHandler:a})}b!=null&&b!==""&&this.$Player85(b)};f.$Player86=function(a,b){var c=this,e=a.getMimeCodecs(),f,g=0,h=null,i=this.$Player7;i&&(f=i.getSourceBufferManagerPromise(e),g=i.getPrependedSegmentsCount(e),this.$Player3.getBool("fix_quick_starter_overhead")&&(h=i.getRepresentationId(e)));f||(f=this.$Player6.createSourceBufferManager(e,this.$Player3.getBool("set_source_buffer_append_window_end")));this.$Player87(f,b,h,a,g);i=f.then(function(a){c.$Player48&&c.$Player48.setSourceBufferState(b,a.getSourceBufferState());return a});return d("oz-player/loggings/OzLoggingUtils").monitorPromiseAndLogOperation(i,this.$Player15,"source_attach",function(a){a.setType(b)}).then(function(a){return c.$Player18.observeSourceBufferState(a.getSourceBufferState(),b)})};f.isDrm=function(){var a=this.$Player46;if(a!==null&&a!==void 0){a=a.hasContentProtections();return a!=null?a:!1}return!1};f.$Player72=function(){if(this.$Player45.length>0){var a=this.$Player46=new(d("oz-player/drm/OzDrmManager").OzDrmManager)(this.$Player15,this.$Player2,{maxStartEMEAttempts:this.$Player3.getNumber("max_start_eme_attempts"),throwNoLicenseError:this.$Player3.getBool("throw_no_license_error")});a.onError(this.$Player11.emitError);this.$Player45&&this.$Player45.forEach(a.addProvider,a);this.$Player28.drmProtections&&this.$Player11.emitError(new(c("oz-player/utils/OzError"))({type:"OZ_DRM_MANAGER",description:'"drmProtections" is a reserved parser name for "customRepresentationParsers". Please rename your parser.'}));this.$Player28.drmProtections=function(b){return a.parseContentProtectionForRepresentation(b)}}};f.$Player88=function(a){var b=this,d=h(this.$Player9);a=[this.$Player3,a,d.getVideoRepresentations(),this.$Player30,this.$Player13,window.devicePixelRatio||1,function(){return b.$Player89()},d.isStaticMpd()?"static":"dynamic"];d=this.$Player34&&this.$Player34.apply(this,a);return(d=d)!=null?d:babelHelpers.construct(c("oz-player/strategies/OzAbrManager"),a)};f.$Player87=function(a,b,e,f,g){var i=this,j=h(this.$Player9),k=this.$Player5.get(b),l=new(c("oz-player/streams/OzMediaStream"))({config:this.$Player3,sourceBufferManagerPromise:a,prependedSegmentsCount:g,networkManager:this.$Player12,playbackState:this.$Player13,endOfStreamWatcher:this.$Player14,bufferTargetCalculator:this.$Player26,priorityCalculator:this.$Player90(),streamSegmentsCountCalculator:this.$Player91(b),abrManager:k,loadedRepresentationId:e,representation:f,loggerProvider:this.$Player15.cloneContext().setType(b),segmentLocator:this.$Player60,setCustomFetchStreamLoggingAttributes:this.$Player61,blockedRepresentationsManager:this.$Player65});this.$Player36===0?l.start():this.$Player10.addSubscriptions(this.$Player18.addListener("initialPlaybackPositionSet",function(){i.$Player13.forceUpdateCurrentTime(),l.start()}));this.$Player10.addSubscriptions(l.onError(this.$Player11.emitError),this.$Player23.listenToMediaStreamInitAppended(l));b==="video"&&(this.$Player32=new(c("oz-player/streams/OzHandleUserRepresentationSwitch"))(this.$Player3,this.$Player13,d("oz-player/utils/OzPlaybackRestrictionsUtils").applyVideoPlaybackRestrictions(this.$Player3,this.$Player30,this.$Player89(),j.getVideoRepresentations()),l,a),this.$Player10.addSubscriptions(this.$Player32.onError(this.$Player11.emitError)));this.$Player4.set(b,l);this.$Player10.addSubscriptions(l.addListener("switchRepresentation",function(){if(i.$Player3.getBool("update_live_video_config_on_representation_switch")){var a=l.getCurrentRepresentation();i.$Player3.getBool("fix_setup_video_duration_on_representation_switch")||i.$Player92(a);i.$Player23.setTimeRangeProvider(a);i.$Player18.setTimeRangeProvider(a);i.$Player20!=null&&i.$Player20.setTimeRangeProvider(a)}b==="video"&&i.emit("switchVideoRepresentation")}),l.addListener("SegmentAppended",function(a){i.$Player93("SegmentAppended",a)}),l.addListener("streamError",function(a){i.emit("streamError",a)}),l.addListener("streamErrorRetry",function(a){i.emit("streamErrorRetry",a)}))};f.$Player75=function(){return this.$Player64!=null?new(c("oz-player/strategies/OzBufferTargetCalculator"))([new(c("oz-player/strategies/OzBufferEndLimitStrategy"))(this.$Player2,this.$Player64)],[]):new(c("oz-player/strategies/OzBufferTargetCalculator"))([new(c("oz-player/strategies/OzStaleManifestBufferTargetStrategy"))(h(this.$Player9),this.$Player3),new(c("oz-player/strategies/OzStartupBufferTargetStrategy"))(this.$Player13,this.$Player3),new(c("oz-player/strategies/OzBufferAheadTargetStrategy"))(this.$Player3)],this.$Player3.getBool("append_retry_quota_exceeded_error")?[new(c("oz-player/strategies/OzBufferTargetCalculatorQuotaExceededConstraint"))(this.$Player3)]:[])};f.$Player77=function(a){var b=this;if(this.$Player3.getNumber("stream_interrupt_check_mpd_stale_count_threshold")>0){var d=this.$Player3.getBool("use_buffering_detector_for_playhead_interruption")?this.$Player48:null,e=new(c("oz-player/strategies/OzPlayheadAtInterruptionDetector"))(this.$Player2,d);this.$Player10.addSubscriptions(e.addListener("playheadAtInterruption",function(a){b.$Player15.getOperationLogger("stream_interrupted").log(),b.emit("streamInterruptAt",a)}),a.addListener("streamInterruptAt",function(a){var c;(c=b.$Player48)==null?void 0:c.notifyStreamInterrupted();e.notifyStreamInterrupted(a)}),a.addListener("streamResumedAt",function(a){var c;b.$Player3.getBool("restart_media_streams_on_stream_resumed")&&b.$Player4.forEach(function(a){a.restartLoopBody()});b.$Player15.getOperationLogger("stream_resumed").log();(c=b.$Player48)==null?void 0:c.notifyStreamResumed();e.notifyStreamResumed();b.emit("streamResumedAt",a)}));this.$Player31=e}};f.$Player90=function(){var a=[new(c("oz-player/strategies/OzPlayingStatePriorityStrategy"))(this.$Player13),new(c("oz-player/strategies/OzBufferAheadPriorityStrategy"))(this.$Player3,this.$Player13)].concat(this.$Player3.getNumber("pixels_below_viewport_to_observe")>0&&this.$Player59!=null?new(c("oz-player/strategies/OzPositionToViewportPriorityStrategy"))(this.$Player59,this.$Player3):[]);return new(c("oz-player/strategies/OzPriorityCalculator"))(a)};f.$Player91=function(a){var b=[new(c("oz-player/strategies/OzStaticStreamSegmentsStrategy"))(this.$Player3),new(c("oz-player/strategies/OzBufferTargetBoundedStreamSegmentsCountStrategy"))(this.$Player26,this.$Player3)];this.$Player3.getNumber("paused_stream_segments_count")!==0&&b.push(new(c("oz-player/strategies/OzPausedStreamSegmentsCountStrategy"))(this.$Player13,this.$Player3));if(a==="video"){a=h(this.$Player9);b.push(new(c("oz-player/strategies/OzBandwidthBoundaryStreamSegmentsCountStrategy"))(this.$Player3,a.getVideoRepresentations()))}return new(c("oz-player/strategies/OzStreamSegmentsCountCalculator"))(b)};f.onError=function(a){return this.$Player11.onError(a)};f.getSelectedVideoQuality=function(){var a=this.$Player9;if(!a)return"";var b=this.$Player4.get("video");b=b&&b.getCurrentRepresentation();if(b instanceof c("oz-player/manifests/OzVideoRepresentation"))return b.getQualityLabel();b=a.getVideoRepresentations();a=b[0];if(a)return a.getQualityLabel();a||c("oz-player/shims/ozvariant")(0,19857);return""};f.switchToVideoQuality=function(a){var b=h(this.$Player9);b=b.getVideoRepresentations().find(function(b){return b.getQualityLabel()===a});if(b){var c=this.$Player4.get("video");c&&(c.switchRepresentation(b),c.disableAdaptation())}};f.getIsVideoQualityAdaptationEnabled=function(){var a=this.$Player4.get("video");return a?a.getIsAdaptationEnabled():!1};f.enableVideoQualityAdaptation=function(){var a=this.$Player4.get("video");a&&a.enableAdaptation()};f.getVideoQualities=function(){var a=this,b=this.$Player9;return!b?[]:b.getVideoRepresentations().filter(function(b){var c;return!((c=a.$Player65)==null?void 0:c.isBlocked(b.getID()))}).map(function(a){return a.getQualityLabel()})};f.setEnableLiveheadCatchup=function(a){this.$Player20&&(a?this.$Player15.getOperationLogger("live_catchup_enabled").setIsLatencyCachupEnabled(!0).log():this.$Player15.getOperationLogger("live_catchup_disabled").setIsLatencyCachupEnabled(!1).log(),this.$Player20.setTimelineBlockingEnabled(a)),this.$Player4.forEach(function(b){b.setEnableLiveheadCatchup(a)}),this.$Player18.setEnableLiveheadCatchup(a)};f.$Player81=function(){var a=this,c=h(this.$Player9);c=c.getVideoRepresentations()[0];this.$Player60=c&&c.canPredict()&&this.$Player3.getBool("pdash_use_pdash_segmentlocator")||c&&c.canApproximateId()?new(d("oz-player/streams/OzPredictedSegmentLocator").OzPredictedSegmentLocator)({videoNode:this.$Player2,liveLatencyManager:this.$Player39,loggerProvider:this.$Player15,dynamicVideoLibrary:this.$Player63}):null;c=this.$Player1?[this.$Player94({liveConfigsFromAudioStream:!0}),this.$Player95()]:[this.$Player96(),this.$Player94({}),this.$Player95()];var e=[];return b("Promise").all(c).then(function(){var b=a.$Player4.get("video"),c=a.$Player4.get("audio"),d=a.$Player4.get("caption");b&&e.push(b.getCurrentRepresentation());c&&e.push(c.getCurrentRepresentation());d&&e.push(d.getCurrentRepresentation());e.forEach(function(b){a.$Player10.addSubscriptions(b.addUpdateListener(function(){a.$Player93("SegmentIndexesUpdated",e)}))});a.$Player93("InitialSegmentIndexes",e);a.$Player2&&a.$Player2.style&&(a.$Player2.style.display=a.$Player1?"none":"block")})};f.$Player92=function(a){if(a.getTimeRanges().length){a=a.getTimeRanges()[a.getTimeRanges().length-1].endTime;this.$Player6.updateDuration(a)}else this.$Player3.getBool("log_extra_events")&&this.$Player15.getOperationLogger("playhead_adjustment").setInitiator("setup_initial_duration").setResult("failed").log()};f.$Player97=function(a){this.$Player92(a),this.$Player23.setTimeRangeProvider(a),this.$Player18.setTimeRangeProvider(a),this.$Player20!=null&&this.$Player20.setTimeRangeProvider(a)};f.$Player96=function(){var a=h(this.$Player9);a=a.getVideoRepresentations();if(this.$Player3.getBool("no_representation_error_detailed_message")&&!a.length)return c("oz-player/shims/OzMaybeNativePromise").reject(new Error("no video representations in the manifest."));var b=d("oz-player/utils/OzPlaybackRestrictionsUtils").applyVideoPlaybackRestrictions(this.$Player3,this.$Player30,this.$Player89(),a,this.$Player3.getBool("respect_initial_representation_on_setup")?this.$Player25:null);if(!b.length)if(this.$Player3.getBool("no_representation_error_detailed_message")){a=a.map(function(a){return a.getQualityLabel()+"@"+a.getWidth()+"x"+a.getHeight()+"("+a.getMimeCodecs()+")"});return c("oz-player/shims/OzMaybeNativePromise").reject(new Error("restricted all video representations: "+a.join(", ")))}else return c("oz-player/shims/OzMaybeNativePromise").reject(new Error("no representation available."));this.$Player97(b[0]);a=this.$Player98(b);if(this.$Player3.getBool("enable_adaptation")){var e=this.$Player88(a||b[0]);this.$Player5.set("video",e);this.$Player3.getBool("use_abr_for_missing_default_representation")&&!a&&(a=e.getBestRepresentation())}return this.$Player86(a||b[0],"video")};f.$Player94=function(a){a=a.liveConfigsFromAudioStream;a=a===void 0?!1:a;var b=h(this.$Player9);b=b.getAudioRepresentations();a&&this.$Player97(b[0]);return b.length?this.$Player86(this.$Player99(b)||b[0],"audio"):c("oz-player/shims/OzMaybeNativePromise").resolve()};f.$Player95=function(){var a=h(this.$Player9);a=a.getApplicationRepresentations();return a.length?this.$Player86(this.$Player100(a)||a[0],"caption"):c("oz-player/shims/OzMaybeNativePromise").resolve()};f.getMpd=function(){return this.$Player9};f.destroy=function(a){var c=this;a=this.$Player15.getOperationLogger("unload").setInitiator(a).start();this.$Player62.destroy();this.$Player84();this.$Player4.forEach(function(a){a.cleanup()});this.$Player32&&this.$Player32.cleanup();this.$Player4=new Map();this.$Player10.release();this.$Player10.engage();this.$Player13.destroy();this.$Player18&&this.$Player18.destroy();this.$Player39&&(this.$Player39.destroy(),this.$Player39=null);this.$Player19&&(this.$Player19.destroy(),this.$Player19=null);this.$Player20&&(this.$Player20.destroy(),this.$Player20=null);this.$Player46&&this.$Player46.destroy();this.$Player59&&this.$Player59.destroy();this.$Player12&&this.$Player12.destroy();this.$Player50&&(this.$Player50=null);this.$Player3.getBool("detach_media_source_manager")&&this.$Player6&&this.$Player6.detach();var d=b("Promise").resolve();this.$Player3.getBool("cleanup_video_node_on_destroy")&&(this.$Player2.pause(),this.$Player3.getBool("remove_src_attr_on_unload")?this.$Player2.removeAttribute("src"):this.$Player2.src="","function"===typeof this.$Player2.setMediaKeys&&(d=this.$Player2.setMediaKeys(null)));this.$Player21&&this.$Player21.destroy();this.$Player31&&this.$Player31.destroy();this.$Player22.destroy();this.$Player23.destroy();this.$Player48&&this.$Player48.destroy();this.$Player65&&this.$Player65.destroy();a.log();this.$Player3.getBool("emit_destroyed_after_media_keys_clear")||this.emit("destroyed");a=[d];return b("Promise").all(a).then(function(){c.$Player3.getBool("load_video_node_on_unload")&&(c.$Player2.load(),c.$Player3.getBool("emit_destroyed_after_media_keys_clear")&&c.emit("destroyed"))})};f.$Player98=function(a){var b=this,d;d=a.find(function(a){return b.$Player25.indexOf(a.getID())!==-1});if(!d&&this.$Player7&&this.$Player3.getBool("fix_quick_starter_overhead")){var e=this.$Player7.getRepresentationId("video");e!==null&&e!==void 0&&(d=a.find(function(a){return a.getID()===e}))}d||(d=c("oz-player/utils/getRepresentationInCache")(a,this.$Player24));return d||null};f.$Player99=function(a){var b=this,d=h(this.$Player9),e;e=a.find(function(a){return b.$Player25.indexOf(a.getID())!==-1});if(!e&&this.$Player7&&this.$Player3.getBool("fix_quick_starter_overhead")){var f=this.$Player7.getRepresentationId("audio");f!==null&&f!==void 0&&(e=a.find(function(a){return a.getID()===f}))}e||(e=c("oz-player/utils/getRepresentationInCache")(a,this.$Player24));if(!e&&!d.isStaticMpd()&&a.length>1&&this.$Player3.getBool("live_audio_ibr")){d=new(c("oz-player/strategies/OzAudioIBRManager"))(this.$Player3,this.$Player15);e=d.getInitialAudioRepresentation(a)}return e||null};f.$Player100=function(a){return null};f.$Player73=function(a){var b=new(c("oz-player/parsers/OzMpdParser"))(this.$Player3,{mpdUrl:this.$Player17,createXmlParser:this.$Player76,customParsers:this.$Player27,customRepresentationParsers:this.$Player28,customSegmentTimelineParser:this.$Player29},this.$Player12,this.$Player15,this.$Player46,this.$Player25,this.$Player65);this.$Player10.addSubscriptions(b.onError(this.$Player11.emitError));return b.parse(a)};f.$Player67=function(){var a=[];this.$Player16&&a.push(new(d("oz-player/loggings/OzDevConsolePerfLogger").OzDevConsolePerfLoggerProvider)());return a};f.$Player101=function(a,b){b=this.$Player4.get(b);return b?b.getRepresentationIDAtTime(a):null};f.getAudioRepresentationIDAtTime=function(a){return this.$Player101(a,"audio")};f.getVideoRepresentationIDAtTime=function(a){return this.$Player101(a,"video")};f.getCurrentVideoRepresentation=function(){return this.$Player102("video")};f.getCurrentAudioRepresentation=function(){return this.$Player102("audio")};f.$Player102=function(a){var b=this.$Player101(this.$Player13.getCurrentTime(),a),c=this.$Player9;if(!c)return null;var d=[];a==="audio"?d=c.getAudioRepresentations():a==="video"&&(d=c.getVideoRepresentations());return(a=d.find(function(a){return a.getID()===b}))!=null?a:null};f.getSelectedVideoRepresentation=function(){var a=this.$Player4.get("video");return a!=null?a.getCurrentRepresentation():null};f.getSelectedAudioRepresentation=function(){var a=this.$Player4.get("audio");return a!=null?a.getCurrentRepresentation():null};f.getDebug=function(){var a=this,b=this.$Player4.get("video"),c=this.$Player4.get("audio"),d=this.$Player4.get("caption"),e,f,g,i,j,k,l;b&&(e=b.getDebug().MediaStreamAbrManager,f=b.getDebug().SourceBufferManager,f&&(g=f.getDebug().SourceBuffer));c&&(i=c.getDebug().SourceBufferManager,i&&(j=i.getDebug().SourceBuffer));d&&(k=d.getDebug().SourceBufferManager,k&&(l=k.getDebug().SourceBuffer));return{getManifest:function(){return h(a.$Player9)},indentifiersIntact:!0,VideoSourceStream:b,VideoAbrManager:e,VideoBufferManager:f,VideoSourceBuffer:g,AudioSourceStream:c,AudioBufferManager:i,AudioSourceBuffer:j,CaptionSourceStream:d,CaptionBufferManager:k,CaptionSourceBuffer:l}};f.injectExternalDebugEvent=function(a,b){this.$Player93(a,b)};f.$Player93=function(a,b){this.emit("debug/dashPlayerEvent",{detail:{type:a,event:b}})};f.$Player68=function(){this.$Player3.getBool("live_playhead_catch_up")&&(this.$Player33=new(c("oz-player/strategies/OzLiveheadDeltaCatchupStrategy"))(this.$Player3))};f.$Player70=function(){var a=this,b=new(c("oz-player/strategies/OzBufferingDetector"))(this.$Player2,this.$Player3.getLegacyConfig(),function(){return a.$Player49?a.$Player2.duration:Infinity});b.attachPerfLoggerProvider(this.$Player15);this.$Player10.addSubscriptions(b.addListener("enterBuffering",function(b){a.emit("enterBuffering",b)}),b.addListener("leaveBuffering",function(){a.emit("leaveBuffering")}));return b};f.$Player89=function(){var a=this.$Player50?this.$Player50():{width:this.$Player2.offsetWidth,height:this.$Player2.offsetHeight};return a};f.getMpdUrl=function(){return this.$Player17};f.$Player85=function(a){var b=this;this.$Player17=a;var c=this.$Player9;if(!c){this.$Player58=!0;return}else{c.updateLocation(a);this.$Player41&&(this.$Player10.releaseOne(this.$Player41),this.$Player41=null);a=function(){b.$Player41&&(b.$Player10.releaseOne(b.$Player41),b.$Player41=null),b.$Player4.forEach(function(a,d){var e=a.getCurrentRepresentation(),f=e.getQualityLabel();e=(d==="video"?c.getVideoRepresentations():c.getAudioRepresentations()).slice();if(d==="video"){d=b.$Player5.get(d);d&&d.updateRepresentations(c.getVideoRepresentations())}d=e[0];e.forEach(function(a){var b=a.getQualityLabel();b===f&&(d=a)});a.switchRepresentation(d);a.restartLoopBody()})};this.$Player41=c.addListener("updated",a);this.$Player10.addSubscriptions(this.$Player41)}};f.getPerfLoggerProvider=function(){return this.$Player15};f.getApproximateFBLSToPlayerDisplayLatency=function(){var a,b;a=Number((a=(a=this.$Player9)==null?void 0:a.getCustomField("lastVideoFrameTs"))!=null?a:void 0);b=Number((b=(b=this.$Player9)==null?void 0:b.getCustomField("currentServerTimeMs"))!=null?b:void 0);var c=this.$Player103(a,b);a=this.$Player104(a,b);return{latencyFromClockSync:a,latencyFromMpdUpdate:c}};f.$Player103=function(a,b){if(!this.$Player13.getCurrentTime()||isNaN(a)||isNaN(b))return null;b=0;this.$Player56===a?b=(c("oz-player/shims/OzPerformance").now()-Number(this.$Player57))/1e3:(this.$Player57=c("oz-player/shims/OzPerformance").now(),this.$Player56=a);a=a/1e3+b-this.$Player13.getCurrentTime();return a};f.$Player104=function(a,b){var d;if(!this.$Player13.getCurrentTime()||isNaN(a)||isNaN(b)||c("oz-player/networks/OzClientClock").getClientClockOffsetMs()==null||!c("oz-player/networks/OzClientClock").getClientClockOffsetMs())return null;d=this.$Player13.getCurrentTimeUpdateTime()+((d=c("oz-player/networks/OzClientClock").getClientClockOffsetMs())!=null?d:0);b=b;var e=this.$Player13.getCurrentTime()*1e3;a=a;d=(d-b-(e-a))/1e3;return d};f.$Player69=function(){this.$Player4.forEach(function(a){a.restartLoopBody();var b=a.getCurrentRepresentation();a.switchRepresentation(b)})};return e}(c("oz-player/shims/OzEventEmitter"));g["default"]=a}),98); __d("oz-player",["oz-player/Player"],(function(a,b,c,d,e,f,g){"use strict";g["default"]=c("oz-player/Player")}),98); __d("VideoPlayerShakaBandwidthEstimator",["CacheStorage","Run","requireWeak"],(function(a,b,c,d,e,f,g){var h;c("requireWeak")("Shaka",function(a){h=a.util.EWMACacheBandwidthEstimator});var i=null,j=!1,k=30,l=2e6,m=25e4,n=123034;a=function(){function a(){var a=this,b=new(c("CacheStorage"))("localstorage","_video_"),e=b.get("bandwidthEstimate");this.$1={isMockObject:!0,getBandwidth:function(a){return e},getFastMovingBandwidth:function(){return e}};h&&(this.$1=new h(k,l,function(){},e),this.$1.isMockObject=!1);d("Run").onUnload(function(){b.set("bandwidthEstimate",a.$1.getBandwidth())})}var b=a.prototype;b.getEstimator=function(){return this.$1};a.getInstance=function(){(i===null||i.getEstimator().isMockObject&&h)&&(i=new a());return i};a.getEstimator=function(){return a.getInstance().getEstimator()};a.getBandwidth=function(b){var c=a.getEstimator();return c.getBandwidth(b)};a.getBandwidthByVideoType=function(b){return a.getBandwidth(a.getBandwidthModel(b))};a.getBandwidthModel=function(a){return a?"aggressive":"conservative"};a.isAutoplayBandwidthRestrained=function(b){var c=a.getEstimator(),d;j?d=c.getFastMovingBandwidth():d=c.getBandwidth();c=b?m:n;d===null||d>=c?j=!1:j=!0;return j};return a}();g["default"]=a}),98);