;/*FB_PKG_DELIM*/ __d("VideoPlayerDashPerformanceLoggerEventFalcoEvent",["FalcoLoggerInternal","getFalcoLogPolicy_DO_NOT_USE"],(function(t,n,r,o,a,i,l){"use strict";var e=r("getFalcoLogPolicy_DO_NOT_USE")("1962341"),s=o("FalcoLoggerInternal").create("video_player_dash_performance_logger_event",e),u=s;l.default=u}),98); __d("VideoPlayerDashPerformanceLoggerPayloadBuilder",[],(function(t,n,r,o,a,i){"use strict";var e={access_token:void 0,additional_buffered_ranges:void 0,append_target:void 0,appended_buffer_ms:void 0,bandwidth_estimate:void 0,client_time_begin:void 0,client_time_duration:void 0,client_time_end:void 0,code:void 0,concluder:void 0,connection_quality_level:void 0,content_length_header:void 0,device_pixel_ratio_float:void 0,dropped_frames:void 0,dynamic_bitrate:void 0,edge_hit_header:void 0,ended:void 0,error:void 0,event:void 0,expected_length:void 0,fbls_to_ply_dis_ms:void 0,initiator:void 0,is_drm:void 0,is_live:void 0,is_muted:void 0,is_online:void 0,is_p2p_playback:void 0,is_page_visible:void 0,is_prefetch:void 0,is_ring_buffer_sample:void 0,is_servable_via_fbms:void 0,is_templated_manifest:void 0,is_latency_catchup_enabled:void 0,last_buffered_end:void 0,last_buffered_start:void 0,last_buffering_event_end_time:void 0,last_buffering_event_start_time:void 0,last_playing_event_time:void 0,length:void 0,livehead_delta:void 0,livehead_seq_num_header:void 0,livehead_seq_num_mpd:void 0,logical_cpu_count:void 0,lowest_quality_representation_id:void 0,manifest_type:void 0,mediastream_event_count:void 0,mediasource_previous_duration:void 0,mediasource_new_duration:void 0,one_observed:void 0,one_req_wave:void 0,one_res_wave:void 0,origin_hit_header:void 0,parent_id:void 0,playback_fbms_param:void 0,playback_rate:void 0,player_height:void 0,player_instance_count:void 0,player_origin_caller_specified:void 0,player_suborigin:void 0,player_version:void 0,player_width:void 0,player_format:void 0,playhead:void 0,preload_time:void 0,previous_representation_id:void 0,priority_float:void 0,proxy_status_header:void 0,reason:void 0,representation_id:void 0,reschedule_count:void 0,resource:void 0,response_time_ms_header:void 0,result:void 0,script_path:void 0,segment_count:void 0,segment_end_time:void 0,segment_start_time:void 0,segment_time_gap:void 0,sequential_id:void 0,session:void 0,state:void 0,stream_switch_reason:void 0,time_between_bytes_max:void 0,time_since_main_thread_available:void 0,time_to_first_byte:void 0,time_to_last_byte:void 0,time_to_request_sent:void 0,time_to_request_start:void 0,total_frames:void 0,type:void 0,update_period:void 0,user_info:void 0,video_duration:void 0,video_id:void 0,video_playback_experience_issue:void 0,was_delayed:void 0,fna_hit_header:void 0,last_video_buffered_end:void 0,last_video_buffered_start:void 0,last_audio_buffered_end:void 0,last_audio_buffered_start:void 0,per_session_sampling_rate:void 0};function l(e){var t=e;return typeof t=="string"&&(t=Number(e)),t!=null&&isFinite(t)?String(Math.floor(t)):null}var s=(function(){function t(){this.$1=babelHelpers.extends({},e)}var n=t.prototype;return n.clear=function(){return this.$1=babelHelpers.extends({},e),this},n.getData=function(){return babelHelpers.extends({},this.$1)},n.updateData=function(t){return this.$1=babelHelpers.extends({},this.$1,t),this},n.setPerSessionSampleRate=function(t){return this.$1.per_session_sampling_rate=l(t),this},n.setAccessToken=function(t){return this.$1.access_token=t,this},n.setAdditionalBufferedRanges=function(t){return this.$1.additional_buffered_ranges=t,this},n.setAppendTarget=function(t){return this.$1.append_target=l(t),this},n.setAppendedBufferMs=function(t){return this.$1.appended_buffer_ms=l(t),this},n.setBandwidthEstimate=function(t){return this.$1.bandwidth_estimate=l(t),this},n.setClientTimeBegin=function(t){return this.$1.client_time_begin=l(t),this},n.setClientTimeDuration=function(t){return this.$1.client_time_duration=l(t),this},n.setClientTimeEnd=function(t){return this.$1.client_time_end=l(t),this},n.setCode=function(t){return this.$1.code=l(t),this},n.setConcluder=function(t){return this.$1.concluder=t,this},n.setConnectionQualityLevel=function(t){return this.$1.connection_quality_level=t,this},n.setContentLengthHeader=function(t){return this.$1.content_length_header=l(t),this},n.setDevicePixelRatioFloat=function(t){return this.$1.device_pixel_ratio_float=t,this},n.setDroppedFrames=function(t){return this.$1.dropped_frames=l(t),this},n.setDynamicBitrate=function(t){return this.$1.dynamic_bitrate=l(t),this},n.setFNAHitHeader=function(t){return this.$1.fna_hit_header=t,this},n.setEdgeHitHeader=function(t){return this.$1.edge_hit_header=t,this},n.setEnded=function(t){return this.$1.ended=t,this},n.setError=function(t){return this.$1.error=t,this},n.setEvent=function(t){return this.$1.event=t,this},n.setExpectedLength=function(t){return this.$1.expected_length=l(t),this},n.setFblsToPlyDisMs=function(t){return this.$1.fbls_to_ply_dis_ms=l(t),this},n.setPreferredEdgeLatency=function(t){return this.$1.preferred_edge_latency=l(t),this},n.setInitiator=function(t){return this.$1.initiator=t,this},n.setIsDrm=function(t){return this.$1.is_drm=t,this},n.setIsLive=function(t){return this.$1.is_live=t,this},n.setIsMuted=function(t){return this.$1.is_muted=t,this},n.setIsOnline=function(t){return this.$1.is_online=t,this},n.setIsP2pPlayback=function(t){return this.$1.is_p2p_playback=t,this},n.setIsPageVisible=function(t){return this.$1.is_page_visible=t,this},n.setIsPrefetch=function(t){return this.$1.is_prefetch=t,this},n.setIsRingBufferSample=function(t){return this.$1.is_ring_buffer_sample=t,this},n.setIsServableViaFbms=function(t){return this.$1.is_servable_via_fbms=t,this},n.setIsTemplatedManifest=function(t){return this.$1.is_templated_manifest=t,this},n.setIsLatencyCachupEnabled=function(t){return this.$1.is_latency_catchup_enabled=t,this},n.setPlayerFormat=function(t){return this.$1.player_format=t,this},n.setLastBufferedEnd=function(t){return this.$1.last_buffered_end=l(t),this},n.setLastBufferedStart=function(t){return this.$1.last_buffered_start=l(t),this},n.setLastBufferingEventEndTime=function(t){return this.$1.last_buffering_event_end_time=l(t),this},n.setLastBufferingEventStartTime=function(t){return this.$1.last_buffering_event_start_time=l(t),this},n.setLastPlayingEventTime=function(t){return this.$1.last_playing_event_time=l(t),this},n.setLength=function(t){return this.$1.length=l(t),this},n.setLiveheadDelta=function(t){return this.$1.livehead_delta=l(t),this},n.setLiveheadSeqNumHeader=function(t){return this.$1.livehead_seq_num_header=l(t),this},n.setLiveheadSeqNumMpd=function(t){return this.$1.livehead_seq_num_mpd=l(t),this},n.setLogicalCpuCount=function(t){return this.$1.logical_cpu_count=l(t),this},n.setLowestQualityRepresentationID=function(t){return this.$1.lowest_quality_representation_id=t,this},n.setManifestType=function(t){return this.$1.manifest_type=t,this},n.setIsMixedCodecManifest=function(t){return this.$1.is_mixed_codec_manifest=t,this},n.setMediastreamEventCount=function(t){return this.$1.mediastream_event_count=l(t),this},n.setMediaSourceNewDuration=function(t){return this.$1.mediasource_new_duration=t,this},n.setMediaSourcePreviousDuration=function(t){return this.$1.mediasource_previous_duration=t,this},n.setOneObserved=function(t){return this.$1.one_observed=t,this},n.setOneReqWave=function(t){return this.$1.one_req_wave=l(t),this},n.setOneResWave=function(t){return this.$1.one_res_wave=l(t),this},n.setOriginHitHeader=function(t){return this.$1.origin_hit_header=t,this},n.setParentID=function(t){return this.$1.parent_id=l(t),this},n.setPlaybackFbmsParam=function(t){return this.$1.playback_fbms_param=t,this},n.setPlaybackRate=function(t){return this.$1.playback_rate=t,this},n.setPlayerHeight=function(t){return this.$1.player_height=l(t),this},n.setPlayerInstanceCount=function(t){return this.$1.player_instance_count=l(t),this},n.setPlayerOriginCallerSpecified=function(t){return this.$1.player_origin_caller_specified=t,this},n.setPlayerSuborigin=function(t){return this.$1.player_suborigin=t,this},n.setPlayerVersion=function(t){return this.$1.player_version=t,this},n.setPlayerWidth=function(t){return this.$1.player_width=l(t),this},n.setPlayhead=function(t){return this.$1.playhead=l(t),this},n.setPreloadTime=function(t){return this.$1.preload_time=l(t),this},n.setPreviousRepresentationID=function(t){return this.$1.previous_representation_id=t,this},n.setPriorityFloat=function(t){return this.$1.priority_float=t,this},n.setProxyStatusHeader=function(t){return this.$1.proxy_status_header=t,this},n.setPushed=function(t){return this},n.setReason=function(t){return this.$1.reason=t,this},n.setRepresentationID=function(t){return this.$1.representation_id=t,this},n.setRescheduleCount=function(t){return this.$1.reschedule_count=l(t),this},n.setResource=function(t){return this.$1.resource=t,this},n.setResponseTimeMsHeader=function(t){return this.$1.response_time_ms_header=l(t),this},n.setResult=function(t){return this.$1.result=t,this},n.setScriptPath=function(t){return this.$1.script_path=t,this},n.setSegmentCount=function(t){return this.$1.segment_count=l(t),this},n.setSegmentEndTime=function(t){return this.$1.segment_end_time=l(t),this},n.setSegmentStartTime=function(t){return this.$1.segment_start_time=l(t),this},n.setSegmentTimeGap=function(t){return this.$1.segment_time_gap=l(t),this},n.setSequentialID=function(t){return this.$1.sequential_id=l(t),this},n.setSession=function(t){return this.$1.session=t,this},n.setState=function(t){return this.$1.state=t,this},n.setStreamSwitchReason=function(t){return this.$1.stream_switch_reason=t,this},n.setTimeBetweenBytesMax=function(t){return this.$1.time_between_bytes_max=l(t),this},n.setTimeSinceMainThreadAvailable=function(t){return this.$1.time_since_main_thread_available=l(t),this},n.setTimeToFirstByte=function(t){return this.$1.time_to_first_byte=l(t),this},n.setTimeToLastByte=function(t){return this.$1.time_to_last_byte=l(t),this},n.setTimeToRequestSent=function(t){return this.$1.time_to_request_sent=l(t),this},n.setTimeToRequestStart=function(t){return this.$1.time_to_request_start=l(t),this},n.setTotalFrames=function(t){return this.$1.total_frames=l(t),this},n.setType=function(t){return this.$1.type=t,this},n.setUpdatePeriod=function(t){return this.$1.update_period=l(t),this},n.setUserInfo=function(t){return this.$1.user_info=t,this},n.setVideoDuration=function(t){return this.$1.video_duration=l(t),this},n.setVideoID=function(t){return this.$1.video_id=t,this},n.setVideoPlaybackExperienceIssue=function(t){return this.$1.video_playback_experience_issue=t,this},n.setWasDelayed=function(t){return this.$1.was_delayed=t,this},n.setDynamicStatusHeader=function(t){return this.$1.dynamic_status_header=t,this},n.setLastAudioBufferedEnd=function(t){return this.$1.last_audio_buffered_end=l(t),this},n.setLastAudioBufferedStart=function(t){return this.$1.last_audio_buffered_start=l(t),this},n.setLastVideoBufferedEnd=function(t){return this.$1.last_video_buffered_end=l(t),this},n.setLastVideoBufferedStart=function(t){return this.$1.last_video_buffered_start=l(t),this},t})();i.convertToInt64=l,i.VideoPlayerDashPerformanceLoggerPayloadBuilder=s}),66); __d("ExtendableVideoPlayerShakaPerformanceTypedLogger",["VideoPlayerDashPerformanceLoggerEventFalcoEvent","VideoPlayerDashPerformanceLoggerPayloadBuilder","VideoPlayerShakaPerformanceLoggerConfig","clearTimeout","gkx","qex","setTimeout"],(function(t,n,r,o,a,i,l){"use strict";var e,s=999,u=(e=r("qex")._("2104"))!=null?e:12e4,c=[],d=0,m=!1,p=!1,_=null,f=(function(e){function t(){return e.apply(this,arguments)||this}babelHelpers.inheritsLoose(t,e),t.isEnabled=function(){return t.$ExtendableVideoPlayerShakaPerformanceTypedLogger$p_5()||t.$ExtendableVideoPlayerShakaPerformanceTypedLogger$p_6()},t.disable=function(){m=!1},t.enable=function(){m=!0},t.$ExtendableVideoPlayerShakaPerformanceTypedLogger$p_7=function(n){var e=c[n];if(e!=null){var r=new t;r.updateData(e).log()}},t.flushQueuedLogs=function(){if(d=d>s?0:d,!t.isEnabled()){p=!0,t.enable();for(var e=d;e<=s;++e)t.$ExtendableVideoPlayerShakaPerformanceTypedLogger$p_7(e);for(var n=0;n0?this.$ExtendableVideoPlayerShakaPerformanceTypedLogger$p_8():r("gkx")("26220")&&(d=d>s?0:d,c[d++]=this.getData())},n.setPerSessionSampleRate=function(n){return this.$ExtendableVideoPlayerShakaPerformanceTypedLogger$p_4=n,e.prototype.setPerSessionSampleRate.call(this,n)},n.setState=function(n){return this.$ExtendableVideoPlayerShakaPerformanceTypedLogger$p_1=n,e.prototype.setState.call(this,n)},n.getState=function(){return this.$ExtendableVideoPlayerShakaPerformanceTypedLogger$p_1},n.setType=function(n){return this.$ExtendableVideoPlayerShakaPerformanceTypedLogger$p_3=n,e.prototype.setType.call(this,n)},n.getType=function(){return this.$ExtendableVideoPlayerShakaPerformanceTypedLogger$p_3},n.setIsRingBufferSample=function(n){return e.prototype.setIsRingBufferSample.call(this,n),this},n.setSequentialID=function(n){return this.$ExtendableVideoPlayerShakaPerformanceTypedLogger$p_2=n,e.prototype.setSequentialID.call(this,n),this},n.setParentLogger=function(t){return this.setParentID(t.$ExtendableVideoPlayerShakaPerformanceTypedLogger$p_2),this},n.$ExtendableVideoPlayerShakaPerformanceTypedLogger$p_9=function(){var e=this;r("VideoPlayerDashPerformanceLoggerEventFalcoEvent").log(function(){return e.getData()})},t})(o("VideoPlayerDashPerformanceLoggerPayloadBuilder").VideoPlayerDashPerformanceLoggerPayloadBuilder);l.default=f}),98); __d("LiveVideoWorkplaceP2PPlaybackTypedLogger",["Banzai","GeneratedLoggerUtils"],(function(t,n,r,o,a,i){"use strict";var e=(function(){function e(){this.$1={}}var t=e.prototype;return t.log=function(t){n("GeneratedLoggerUtils").log("logger:LiveVideoWorkplaceP2PPlaybackLoggerConfig",this.$1,n("Banzai").BASIC,t)},t.logVital=function(t){n("GeneratedLoggerUtils").log("logger:LiveVideoWorkplaceP2PPlaybackLoggerConfig",this.$1,n("Banzai").VITAL,t)},t.logImmediately=function(t){n("GeneratedLoggerUtils").log("logger:LiveVideoWorkplaceP2PPlaybackLoggerConfig",this.$1,{signal:!0},t)},t.clear=function(){return this.$1={},this},t.getData=function(){return babelHelpers.extends({},this.$1)},t.updateData=function(t){return this.$1=babelHelpers.extends({},this.$1,t),this},t.setBroadcastID=function(t){return this.$1.broadcast_id=t,this},t.setBroadcastURL=function(t){return this.$1.broadcast_url=t,this},t.setCommunityID=function(t){return this.$1.community_id=t,this},t.setCommunityName=function(t){return this.$1.community_name=t,this},t.setCustomerID=function(t){return this.$1.customer_id=t,this},t.setEventStr=function(t){return this.$1.event_str=t,this},t.setExceptionCode=function(t){return this.$1.exception_code=t,this},t.setExceptionMessage=function(t){return this.$1.exception_message=t,this},t.setExceptionSeverity=function(t){return this.$1.exception_severity=t,this},t.setExceptionTrace=function(t){return this.$1.exception_trace=t,this},t.setExceptionType=function(t){return this.$1.exception_type=t,this},t.setHiveClientStatsCdnRequests=function(t){return this.$1.hive_client_stats_cdn_requests=t,this},t.setHiveClientStatsCdnResponseBytes=function(t){return this.$1.hive_client_stats_cdn_response_bytes=t,this},t.setHiveClientStatsCdnResponseErrors=function(t){return this.$1.hive_client_stats_cdn_response_errors=t,this},t.setHiveClientStatsCdnResponses=function(t){return this.$1.hive_client_stats_cdn_responses=t,this},t.setHiveClientStatsNumPartners=function(t){return this.$1.hive_client_stats_num_partners=t,this},t.setHiveClientStatsP2pRequests=function(t){return this.$1.hive_client_stats_p2p_requests=t,this},t.setHiveClientStatsP2pResponseBytes=function(t){return this.$1.hive_client_stats_p2p_response_bytes=t,this},t.setHiveClientStatsP2pResponseErrors=function(t){return this.$1.hive_client_stats_p2p_response_errors=t,this},t.setHiveClientStatsP2pResponses=function(t){return this.$1.hive_client_stats_p2p_responses=t,this},t.setHiveClientStatsSavings=function(t){return this.$1.hive_client_stats_savings=t,this},t.setHivePartnerID=function(t){return this.$1.hive_partner_id=t,this},t.setHivePluginTech=function(t){return this.$1.hive_plugin_tech=t,this},t.setHiveStreamingTicketingEndpoint=function(t){return this.$1.hive_streaming_ticketing_endpoint=t,this},t.setHTTPStatusCode=function(t){return this.$1.http_status_code=t,this},t.setP2pPlaybackReportURL=function(t){return this.$1.p2p_playback_report_url=t,this},t.setP2pPlaybackTicketURL=function(t){return this.$1.p2p_playback_ticket_url=t,this},t.setSessionID=function(t){return this.$1.session_id=t,this},t.setSummaryCdnTraffic=function(t){return this.$1.summary_cdn_traffic=t,this},t.setSummaryP2pTraffic=function(t){return this.$1.summary_p2p_traffic=t,this},t.setSummaryPeerSavings=function(t){return this.$1.summary_peer_savings=t,this},t.setSummaryQualityScore=function(t){return this.$1.summary_quality_score=t,this},t.setSummaryUniqueViewers=function(t){return this.$1.summary_unique_viewers=t,this},t.setSummaryViewedMinutes=function(t){return this.$1.summary_viewed_minutes=t,this},t.setTimeMs=function(t){return this.$1.time_ms=t,this},t.setTimeSpentInP2pMs=function(t){return this.$1.time_spent_in_p2p_ms=t,this},t.setVideoID=function(t){return this.$1.video_id=t,this},t.setViewerManifestURL=function(t){return this.$1.viewer_manifest_url=t,this},e})(),l={broadcast_id:!0,broadcast_url:!0,community_id:!0,community_name:!0,customer_id:!0,event_str:!0,exception_code:!0,exception_message:!0,exception_severity:!0,exception_trace:!0,exception_type:!0,hive_client_stats_cdn_requests:!0,hive_client_stats_cdn_response_bytes:!0,hive_client_stats_cdn_response_errors:!0,hive_client_stats_cdn_responses:!0,hive_client_stats_num_partners:!0,hive_client_stats_p2p_requests:!0,hive_client_stats_p2p_response_bytes:!0,hive_client_stats_p2p_response_errors:!0,hive_client_stats_p2p_responses:!0,hive_client_stats_savings:!0,hive_partner_id:!0,hive_plugin_tech:!0,hive_streaming_ticketing_endpoint:!0,http_status_code:!0,p2p_playback_report_url:!0,p2p_playback_ticket_url:!0,session_id:!0,summary_cdn_traffic:!0,summary_p2p_traffic:!0,summary_peer_savings:!0,summary_quality_score:!0,summary_unique_viewers:!0,summary_viewed_minutes:!0,time_ms:!0,time_spent_in_p2p_ms:!0,video_id:!0,viewer_manifest_url:!0};i.default=e}),66); __d("MosUtils",[],(function(t,n,r,o,a,i){"use strict";function e(e,t){if(e===0||t===0)return 0;if(e16/9?Math.round(e/(16/9)):t}function l(e,t){for(var n=null,r=null,o=null,a=null,i=0;i100?100:s}return 0}function s(e){for(var t=e.split(","),n=[],r=0;r=200&&s<=u:!0,status:s,arrayBuffer:function(){return r("MaybeNativePromise").resolve(l)}};a(c)},function(t,n,o){if(t==null||t==="0")i(new TypeError("NetworkError"));else{var l=new ArrayBuffer(0),s={body:r("oz-player/utils/arrayBuffer2OzReadableStream")(l),headers:e(n),ok:!1,status:parseInt(t,10),arrayBuffer:function(){return r("MaybeNativePromise").resolve(l)}};a(s)}})})}}l.default=s}),98); __d("OzCustomParsers",[],(function(t,n,r,o,a,i){function e(){return new Map([["fbProjection",function(e){try{return e.Period[0].AdaptationSet[0].$.FBProjection||null}catch(e){return null}}],["hasInbandCaptionsFromAccessibility",function(e){var t=e.Period[0],n=t&&t.AdaptationSet[0].Accessibility;return n&&n[0]?n[0].$.schemeIdUri==="urn:scte:dash:cc:cea-608:2015":!1}],["hasInbandCaptionsFromUsingASRCaptions",function(e){var t=Number.parseInt(e.$.usingASRCaptions,0);return!isNaN(t)&&t!=0}],["hasInbandCaptionsFromIsUsingAsrCaptionsEmployeeDogfooding",function(e){var t=Number.parseInt(e.$.isUsingAsrCaptionsEmployeeDogfooding,0);return!isNaN(t)&&t!=0}],["hasVTTRepresentationCaptions",function(e){return e.Period[0].AdaptationSet.find(function(e){var t;return((t=e.$.mimeType)==null?void 0:t.startsWith("application"))&&e.$.lang!=null})!=null}],["isLiveTemplated",function(e){return e.$.FBIsLiveTemplated==="true"}],["isFBMS",function(e){return e.$.FBMS==="true"}],["isFBWasLive",function(e){return e.$.FBWasLive==="true"}],["loapStreamType",function(e){return e.$.loapStreamType?parseInt(e.$.loapStreamType,10):0}],["fbManifestIdentifier",function(e){var t;return(t=e.$.FBManifestIdentifier)!=null?t:""}],["lastVideoFrameTs",function(e){return e.$.lastVideoFrameTs?Number.parseInt(e.$.lastVideoFrameTs,10):null}],["currentServerTimeMs",function(e){return e.$.currentServerTimeMs?Number.parseInt(e.$.currentServerTimeMs,10):null}],["validationErrors",function(e){var t;return(t=e.$.validationErrors)!=null?t:""}]])}i.createOzCustomParser=e}),66); __d("oz-player/manifests/OzSegmentOptions",[],(function(t,n,r,o,a,i){"use strict";var e=(function(){function e(){this.$1=!1,this.$2=null}var t=e.prototype;return t.setSegmentNumDecisionTime=function(t){this.$2=t},t.getSegmentNumDecisionTime=function(){return this.$2},t.setIsDVLEnabled=function(t){this.$1=t},t.isDVLEnabled=function(){return this.$1},e})();i.default=e}),66); __d("oz-player/shims/www/OzURIWWWImplConstUri",["ConstUriUtils","err"],(function(t,n,r,o,a,i,l){"use strict";function e(e){var t=e.getQueryParams(),n={};return t.forEach(function(e,t){typeof e=="string"||typeof e=="number"?n[t]=e:n[t]=String(e)}),n}var s=(function(){function t(t){if(this.$1=o("ConstUriUtils").getUri(t),this.$1==null)throw r("err")("Invalid URI passed to OzURI");this.$2=e(this.$1)}var n=t.prototype;return n.addQueryData=function(n,r){var t=this.$1;if(typeof n=="string"){var o;t=(o=t)==null?void 0:o.addQueryParam(n,r===void 0?"":r)}else{var a,i=new Map;Object.keys(n).forEach(function(e){i.set(e,n[e])}),t=(a=t)==null?void 0:a.addQueryParams(i)}t!=null&&(this.$1=t,this.$2=e(this.$1))},n.getQueryData=function(){return this.$2},n.getDomain=function(){var e,t;return(e=(t=this.$1)==null?void 0:t.getDomain())!=null?e:""},n.toString=function(){var e,t;return(e=(t=this.$1)==null?void 0:t.toString())!=null?e:""},n.getPath=function(){var e,t;return(e=(t=this.$1)==null?void 0:t.getPath())!=null?e:""},t})();l.default=s}),98); __d("oz-player/shims/www/OzURIWWW",["oz-player/shims/www/OzURIWWWImplConstUri"],(function(t,n,r,o,a,i,l){"use strict";l.default=r("oz-player/shims/www/OzURIWWWImplConstUri")}),98); __d("oz-player/shims/OzURI",["oz-player/shims/www/OzURIWWW"],(function(t,n,r,o,a,i,l){"use strict";l.default=r("oz-player/shims/www/OzURIWWW")}),98); __d("oz-player/utils/OzError",[],(function(t,n,r,o,a,i){"use strict";var e=(function(e){function t(t,n){var r;n===void 0&&(n=0),r=e.call(this,t.description)||this,r.$OzErrorClass$p_1=t,r.name=t.type,r.message=t.description;var o=r.stack;if(!(typeof o=="string"&&o!==""))if(Error.captureStackTrace){var a={};Error.captureStackTrace(a,r.constructor),o=a.stack}else{var i=new Error().stack.split("\n");i.splice(/^Error/.test(i[0])?1:0,1),o="Error\n"+i.join("\n")}return typeof o=="string"&&o!==""?r.stack=o.split("\n").map(function(e,t){return t===0?r.name+": "+r.message.replace(/\n.*/," (...)"):t-1200?"...":""):""),extra:{code:a.toString(),headers:o,url:n}},1)}function m(t,n){e(t);var r=s(t)?t:null;return u(babelHelpers.extends({},n,{type:r?r.getType():n.type,description:n.description+" - "+(!(t instanceof Error)&&typeof t=="object"&&t!=null&&typeof t.message=="string"?t.message:String(t)),extra:babelHelpers.extends({},n.extra,{originalError:t})}),1)}function p(e,t){return u({type:e.getType(),description:e.getDescription(),extra:babelHelpers.extends({},e.getExtra(),{mimeType:t})})}function _(e){var t,n;return s(e)?(t=e.getExtra().code||"",n=e):(t=e.status!=null&&e.status!==""?e.status.toString():"0",n=u({type:"OZ_NETWORK",description:e.message,extra:{originalError:e,code:t,url:e.url}})),[n,t]}l.isOzError=s,l.createOzError=u,l.createOzCancelledError=c,l.createOzNetworkError=d,l.convertPromiseRejectionReasonToOzError=m,l.getOzErrorWithMIMEType=p,l.getNormalizedErrorAndCode=_}),98); __d("oz-player/utils/ozConcatUint8Arrays",["oz-player/utils/OzErrorUtils"],(function(t,n,r,o,a,i,l){"use strict";function e(e){for(var t=0,n=0;n0){var n=e[0].$;if(n)return Number.parseInt(n.timescale,0)||null}return null}};return t.getBool("parse_initialization_binary",!1)&&(a.initializationBinary=function(e){try{var t=window.atob(e.FBInitializationBinary[0]._);return o("oz-player/utils/OzReadableStreamUtils").stringToUint8Array(t)}catch(e){return null}}),a.playbackResolutionMos=function(e){try{return e.$.FBPlaybackResolutionMos}catch(e){return null}},a.playbackResolutionCsvqm=function(e){try{return e.$.FBPlaybackResolutionCsvqm}catch(e){return null}},a.qualityLabel=function(e){try{return e.$.FBQualityLabel}catch(e){return null}},t.getBool("parse_first_segment",!1)&&(a.firstSegmentParser=function(e){if(n!=null&&n>0)return null;try{var t=e.SegmentBase[0].$.FBFirstSegmentRange.split("-").map(Number),o={startByte:t[0],endByte:t[1]},a=e.BaseURL[0]._,i=new(r("oz-player/shims/OzURI"))(a),l=new(r("oz-player/manifests/OzSegmentOptions"));return{getData:function(){return null},getURI:function(){return i},getByteRange:function(){return o},getTimeRange:function(){return{startTime:0,endTime:2}},getSequenceNumber:function(){return null},getOptions:function(){return l}}}catch(e){return null}}),a}l.createOzCustomRepresentationParsers=e}),98); __d("OzDOMEventListenerImpl",["CometEventListener"],(function(t,n,r,o,a,i,l){"use strict";var e={listenDOMEvent:r("CometEventListener").listen,captureDOMEvent:r("CometEventListener").capture,suppressDOMEvent:r("CometEventListener").suppress},s=e;l.default=s}),98); __d("OzDashPrefetchCache",["VideoDashPrefetchCache"],(function(t,n,r,o,a,i,l){"use strict";var e=(function(){function e(){}var t=e.prototype;return t.hasCacheValue=function(t){return r("VideoDashPrefetchCache").hasCacheValue(t)},t.getCacheValue=function(t){return r("VideoDashPrefetchCache").getCacheValue(t)},t.getCachedRepresentations=function(){return null},e})();l.default=e}),98); __d("OzMaximumDimensionsRestriction",[],(function(t,n,r,o,a,i){"use strict";var e=(function(){function e(e){this.$1=e}var t=e.prototype;return t.applyRestriction=function(t,n){if(t.length===0)return[];var e=this.$1,r=1/0,o=null,a=[];return t.forEach(function(t){var n=t.getWidth(),i=t.getHeight(),l=e.maxWidth,s=e.maxHeight,u=n<=l&&i<=s;u&&a.push(t),n*i0?a:o?[o]:[]},e})();i.default=e}),66); __d("OzMinimumSmallestDimensionRestriction",[],(function(t,n,r,o,a,i){"use strict";var e=(function(){function e(e){this.$1=e}var t=e.prototype;return t.applyRestriction=function(t){var e=this;if(t.length===0)return[];var n=t.filter(function(t){var n=t.getWidth(),r=t.getHeight(),o=n=e.$1});return n.length>0?n:[t[t.length-1]]},e})();i.default=e}),66); __d("OzMosThresholdRestriction",["MosUtils"],(function(t,n,r,o,a,i,l){"use strict";var e=(function(){function e(e){this.$3=new Map,this.$4=e,this.$1=e.getNumber("mos_upper_threshold",0),this.$2=e.getNumber("mos_lower_threshold",0)}var t=e.prototype;return t.$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)}},t.$6=function(t,n){var e=null;if(this.$3.get(t))e=this.$3.get(t);else{var r=t.getCustomField("playbackResolutionMos");r!=null&&(e=o("MosUtils").parsePlaybackMos(String(r)),e&&this.$3.set(t,e))}return e!=null?o("MosUtils").getMosValue(e,o("MosUtils").getQualityLabel(n.width,n.height)):null},t.$7=function(t,n){var e=this,r=null,o=this.$5(),a=o.mosUpperThreshold;return t.forEach(function(t){var o=e.$6(t,n);o!=null&&o>a&&(r==null||r>o)&&(r=o)}),r==null?t.slice():t.filter(function(t){var o=e.$6(t,n);return o==null?!0:o<=a||o===r})},t.$8=function(t,n){var e=this,r=[],o=this.$5(),a=o.mosLowerThreshold;return t.forEach(function(t){var o=e.$6(t,n);o!=null&&o>a&&r.push(t)}),r.length===0&&r.push(t[t.length-1]),r},t.applyRestriction=function(t,n){if(t.length===0)return[];var e=this.$5(),r=e.mosLowerThreshold,o=e.mosUpperThreshold,a=void 0;return o>0&&(a=this.$7(a!=null?a:t,n)),r>0&&(a=this.$8(a!=null?a:t,n)),a!=null?a:t.slice()},e})();l.default=e}),98); __d("oz-player/shims/www/OzEventEmitterWWW",["BaseEventEmitter"],(function(t,n,r,o,a,i,l){"use strict";l.default=r("BaseEventEmitter")}),98); __d("oz-player/shims/OzEventEmitter",["oz-player/shims/www/OzEventEmitterWWW"],(function(t,n,r,o,a,i,l){"use strict";l.default=r("oz-player/shims/www/OzEventEmitterWWW")}),98); __d("oz-player/utils/OzNumericalHelper",[],(function(t,n,r,o,a,i){"use strict";var e=1e-5;function l(t,n,r){return r===void 0&&(r=e),Math.abs(n-t)<=r}function s(t,n,r){return r===void 0&&(r=e),t>n&&!l(t,n,r)}function u(t,n,r){return r===void 0&&(r=e),te&&t.rangeStart>r}function u(t,n){var r=t.rangeEnd,o=n.rangeEnd;return r==null?!0:o==null?!1:Math.abs(r-o)>e&&r>o}function c(t,n,r,o){var a=r.rangeEnd;return a==null?!1:n===a||Math.abs(n-a)>(o!=null?o:e)&&n>a}function d(t,n,r){var o=n.rangeEnd;if(o==null)return!1;var a=r!=null?r:e;return t-n.rangeStart>=a&&o-t>=a}function m(t,n){return t>n-e}function p(e){if(!e.length)return[];var t=[],n=e[0];t.push(n);for(var r=1;r=t?0:n.reduceRight(function(n,r){var o=r.rangeEnd,a=r.rangeStart;return to?n:o==null||t<=o?Math.min(t-a,t-e)+n:e>=a?Math.min(o-e,t-e)+n:o-a+n},0)}function y(e,t){for(var n,r=e.length===0&&(n=t[t.length-1])!=null?n:null,a=0;a=0;a--){var i=this.$4[a];if(o("oz-player/utils/OzNumericalHelper").lessThanOrEqual(i.t+i.d*(i.r+1),n,this.$9))break;r=i}if(r===null||o("oz-player/utils/OzNumericalHelper").greaterThan(r.t,n,this.$9))return null;var l=Math.max(0,Math.floor((n-r.t+this.$9)/r.d));return this.$13(r,l)},n.getSegment=function(t){for(var e=0,n=t;n>=0&&e=a){n-=a,e++;continue}break}var i=this.$4[e];return i?this.$13(i,n):null},n.getSegmentAfter=function(t){var e=t.getTimeRange().endTime;return this.getSegmentByTime(e)},n.getPredictedSegmentAfter=function(t){return null},n.canPredict=function(){return!1},n.canApproximateId=function(){return!1},n.isEndingSegment=function(n){if(!this.$4||!this.$4.length||!this.$6)return!1;var t=this.$4[this.$4.length-1],r=t.r,o=this.$13(t,r);return Math.abs(o.getTimeRange().startTime-n.getTimeRange().startTime)+Math.abs(o.getTimeRange().endTime-n.getTimeRange().endTime)n&&(t=t.substring(r)),t}function l(e){var t=e,n=t.lastIndexOf("/"),r=t.lastIndexOf("://");return n>r+2&&(t=t.substring(0,n+1)),t}function s(e){var t=e;return t=l(t),t.endsWith("/")?l(t.substring(0,t.length-1)):t}function u(e,t){for(var n=l(e),r=t;r.length;)if(r.startsWith("./"))r=r.substring(2);else if(r.startsWith("../"))r=r.substring(3),n=s(n),n.endsWith("/")&&(n=n.substring(0,n.length-1));else if(r.startsWith(".."))r=r.substring(2),n=s(n);else if(r.startsWith("."))r=r.substring(1);else break;return r&&r.length&&(n.endsWith("/")||(n+="/"),n+=r),n}function c(){for(var e=arguments.length,t=new Array(e),n=0;n0;)r=u(r,t.shift());return r}function d(e,t){return m(t)?t:c(e,t)}function m(e){var t=/^https?:\/\//i;return t.test(e)}i.stripToPathAndQueryOnly=e,i.joinRelativeUrlPaths=c,i.joinUrlPaths=d}),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(t,n,r,o,a,i,l){"use strict";var e=(function(e){function t(t,n,r,o,a,i,l,s,u,c){var d;c===void 0&&(c=!1),d=e.call(this,t,n,o,a,null,c)||this,d.$PredictedSegmentTemplateSegmentsContainer$p_9=0,d.$PredictedSegmentTemplateSegmentsContainer$p_11=null,d.$PredictedSegmentTemplateSegmentsContainer$p_10=r,d.$PredictedSegmentTemplateSegmentsContainer$p_8=c,d.$PredictedSegmentTemplateSegmentsContainer$p_12=a,d.$PredictedSegmentTemplateSegmentsContainer$p_7=t,d.$PredictedSegmentTemplateSegmentsContainer$p_5=o,d.$PredictedSegmentTemplateSegmentsContainer$p_1=i,d.$PredictedSegmentTemplateSegmentsContainer$p_3=s,d.$PredictedSegmentTemplateSegmentsContainer$p_2=l,d.$PredictedSegmentTemplateSegmentsContainer$p_4=u,d.$PredictedSegmentTemplateSegmentsContainer$p_6=t.getNumber("live_numerical_error_epsilon");for(var m=0;m0&&e.$PredictedSegmentTemplateSegmentsContainer$p_10!=null&&(t.addQueryData("_nc_dinfo-manifest-url",o("oz-player/utils/OzUrlHelper").stripToPathAndQueryOnly(e.$PredictedSegmentTemplateSegmentsContainer$p_10)),t.addQueryData("_nc_dinfo-timeout",s)),t}}},n.updateWith=function(o){o instanceof t||r("oz-player/shims/ozvariant")(0,646),this.$PredictedSegmentTemplateSegmentsContainer$p_3=o.$PredictedSegmentTemplateSegmentsContainer$p_3,this.$PredictedSegmentTemplateSegmentsContainer$p_1=o.$PredictedSegmentTemplateSegmentsContainer$p_1,e.prototype.updateWith.call(this,o),this.$PredictedSegmentTemplateSegmentsContainer$p_12=o.$PredictedSegmentTemplateSegmentsContainer$p_12,this.$PredictedSegmentTemplateSegmentsContainer$p_8=o.$PredictedSegmentTemplateSegmentsContainer$p_8;for(var n=0;n0?this.$PredictedSegmentTemplateSegmentsContainer$p_12[this.$PredictedSegmentTemplateSegmentsContainer$p_12.length-1].t+this.$PredictedSegmentTemplateSegmentsContainer$p_12[this.$PredictedSegmentTemplateSegmentsContainer$p_12.length-1].d:null,i=this.$PredictedSegmentTemplateSegmentsContainer$p_7.getLegacyConfig().getNumber("pdash_future_edgelatency_gops",0);if(a!=null&&a<=n&&i!==0&&n=0;c++){var d=this.$PredictedSegmentTemplateSegmentsContainer$p_12[this.$PredictedSegmentTemplateSegmentsContainer$p_12.length-1-c];if(d.r===0||r("oz-player/shims/ozvariant")(0,18769),o("oz-player/utils/OzNumericalHelper").lessThanOrEqual(d.t+d.d*(d.r+1),n,this.$PredictedSegmentTemplateSegmentsContainer$p_6))break;e=d,u=c}return e===null||i>0&&n=this.$PredictedSegmentTemplateSegmentsContainer$p_3:e.prototype.isEndingSegment.call(this,n)},n.getEndingSegment=function(){if(this.$PredictedSegmentTemplateSegmentsContainer$p_12.length===0)return null;var e=this.$PredictedSegmentTemplateSegmentsContainer$p_12[this.$PredictedSegmentTemplateSegmentsContainer$p_12.length-1];return this.$PredictedSegmentTemplateSegmentsContainer$p_14(e.t/this.$PredictedSegmentTemplateSegmentsContainer$p_5,(e.t+e.d)/this.$PredictedSegmentTemplateSegmentsContainer$p_5,this.$PredictedSegmentTemplateSegmentsContainer$p_3)},n.getMaxGopSec=function(){return this.$PredictedSegmentTemplateSegmentsContainer$p_9/this.$PredictedSegmentTemplateSegmentsContainer$p_5},t})(r("oz-player/manifests/SegmentTemplateSegmentsContainer"));l.default=e}),98); __d("oz-player/parsers/OzDefaultSegmentTimelineParser",["oz-player/manifests/SegmentTemplateSegmentsContainer","oz-player/utils/OzUrlHelper"],(function(t,n,r,o,a,i,l){"use strict";var e=(function(){function e(){}e.parseSegments=function(t,n){var e=[];return n.SegmentTimeline[0].S&&(e=n.SegmentTimeline[0].S.map(function(e){return{t:Number.parseInt(e.$.t,10),d:Number.parseInt(e.$.d,10),r:Number.parseInt(e.$.r||"0",10),id:e.$.id?Number.parseInt(e.$.id,10):void 0}})),e};var t=e.prototype;return t.parseSegmentsContainer=function(n,a,i){return new(r("oz-player/manifests/SegmentTemplateSegmentsContainer"))(n,o("oz-player/utils/OzUrlHelper").joinUrlPaths(a.baseUrl,i.$.media),Number.parseInt(i.$.timescale,10),e.parseSegments(n,i),null,a.isStaticMpd)},e})();l.default=e}),98); __d("OzPredictedSegmentTimelineParser",["PredictedSegmentTemplateSegmentsContainer","oz-player/manifests/SegmentTemplateSegmentsContainer","oz-player/parsers/OzDefaultSegmentTimelineParser","oz-player/shims/OzURI","oz-player/utils/OzUrlHelper"],(function(t,n,r,o,a,i,l){"use strict";var e=(function(){function e(){}var t=e.prototype;return t.parseSegmentsContainer=function(t,n,a){var e;if(a.SegmentTimeline[0].$.FBPredictedMedia){e=o("oz-player/utils/OzUrlHelper").joinUrlPaths(n.baseUrl,a.SegmentTimeline[0].$.FBPredictedMedia);var i=new(r("oz-player/shims/OzURI"))(e);i.addQueryData("_nc_sc",1),e=i.toString()}var l;a.SegmentTimeline[0].$.FBPredictedMediaStartNumber&&(l=Number.parseInt(a.SegmentTimeline[0].$.FBPredictedMediaStartNumber,0));var s;a.SegmentTimeline[0].$.FBPredictedMediaEndNumber&&(s=Number.parseInt(a.SegmentTimeline[0].$.FBPredictedMediaEndNumber,0));var u;a.SegmentTimeline[0].$.FBAverageDuration&&(u=Number.parseInt(a.SegmentTimeline[0].$.FBAverageDuration,0));var c=r("oz-player/parsers/OzDefaultSegmentTimelineParser").parseSegments(t,a);return(n.isTemplatedMpd&&l!=null&&u!=null||!n.isTemplatedMpd)&&e!=null&&s!=null?new(r("PredictedSegmentTemplateSegmentsContainer"))(t,o("oz-player/utils/OzUrlHelper").joinUrlPaths(n.baseUrl,a.$.media),n.mpdUrl,Number.parseInt(a.$.timescale,10),c,e,l,s,u,n.isStaticMpd):new(r("oz-player/manifests/SegmentTemplateSegmentsContainer"))(t,o("oz-player/utils/OzUrlHelper").joinUrlPaths(n.baseUrl,a.$.media),Number.parseInt(a.$.timescale,10),c,e,n.isStaticMpd)},e})();l.default=e}),98); __d("oz-player/networks/OzTransformStream",["oz-player/shims/OzEventEmitter","oz-player/shims/OzStreams","oz-player/utils/OzErrorUtils"],(function(t,n,r,o,a,i,l){"use strict";var e=(function(e){function t(t){var n,r;r=e.call(this)||this;var a=(n=t==null?void 0:t.errorTransform)!=null?n:function(e){return e},i,l;return r.writable=new(o("oz-player/shims/OzStreams")).OzWritableStream({start:function(t){l=t},write:function(t){r.emit("writableWrite",t);try{r.onDataWritten(t)}catch(e){i.error(o("oz-player/utils/OzErrorUtils").createOzError({type:"OZ_STREAM",description:"Error from write handler: "+r.constructor.name,extra:{code:"OZ_S-0",originalError:e}}))}i.enqueue(t)},close:function(){r.emit("writableClose");try{r.onClose()}catch(e){i.error(o("oz-player/utils/OzErrorUtils").createOzError({type:"OZ_STREAM",description:"Error from close handler: "+r.constructor.name,extra:{code:"OZ_S-1",originalError:e}}))}i.close()},abort:function(t){var e=a(t);i.error(e)}}),r.readable=new(o("oz-player/shims/OzStreams")).OzReadableStream({start:function(t){i=t},cancel:function(t){r.emit("readableCancel",t),l.error(t)}}),r}babelHelpers.inheritsLoose(t,e);var n=t.prototype;return n.onDataWritten=function(t){},n.onClose=function(){},t})(r("oz-player/shims/OzEventEmitter"));l.default=e}),98); __d("oz-player/shims/www/OzPerformanceWWW",["performance","performanceNow"],(function(t,n,r,o,a,i,l){var e,s,u={now:function(){return(e||(e=r("performanceNow")))()},getEntriesByName:function(t,n){return typeof(s||(s=r("performance"))).getEntriesByName=="function"?(s||(s=r("performance"))).getEntriesByName(t,n):[]}},c=u;l.default=c}),98); __d("oz-player/shims/OzPerformance",["oz-player/shims/www/OzPerformanceWWW"],(function(t,n,r,o,a,i,l){l.default=r("oz-player/shims/www/OzPerformanceWWW")}),98); __d("oz-player/utils/OzResourceTimingUtils",["oz-player/shims/OzPerformance"],(function(t,n,r,o,a,i,l){"use strict";var e=function(t){var e=r("oz-player/shims/OzPerformance").getEntriesByName(t,"resource");return e.reduce(function(e,t){return e==null?t:t.responseEnd0&&(this.$4=!0,this.logReceivedFirstPeerRequest())},t.pauseStatsLogging=function(){this.$5&&(window.clearInterval(this.$5),this.$5=null)},t.resumeStatsLogging=function(){this.$8()},t.$8=function(){var e=this;this.$5||(this.$5=window.setInterval(function(){return e.logStats()},6e4))},t.$9=function(){return new(r("LiveVideoWorkplaceP2PPlaybackTypedLogger"))().setVideoID(this.$1).setCommunityID(this.$7.communityId).setCommunityName(this.$7.communityName).setSessionID(this.$2).setTimeMs(Date.now())},t.logEnableP2P=function(){this.$9().setEventStr("ENABLE_P2P").log()},t.logSessionInit=function(t,n){this.$6=Date.now(),this.$9().setEventStr("SESSION_INITIALIZED").setHivePluginTech(t).setViewerManifestURL(n).log()},t.logSessionActive=function(t){this.$9().setEventStr("SESSION_ACTIVE").setHivePluginTech(t).log()},t.logManifestMismatch=function(t,n){this.$9().setEventStr("MANIFEST_MISMATCH").setBroadcastURL(t).setViewerManifestURL(n).log()},t.logError=function(t){this.$9().setEventStr("ERROR").setExceptionTrace(t.stack).setExceptionMessage(t.message).setExceptionType(t.name).log()},t.logHiveError=function(t){this.$9().setEventStr("HIVE_ERROR").setExceptionMessage(t.message).setExceptionType("HiveErrorMessage").setExceptionCode(t.code).setExceptionSeverity(t.severity).log()},t.logUnload=function(){var e=this.$9().setEventStr("UNLOAD"),t=this.$3;t&&e.setHiveClientStatsCdnRequests(t.cdnRequests).setHiveClientStatsCdnResponseBytes(t.cdnResponseBytes).setHiveClientStatsCdnResponseErrors(t.cdnResponseErrors).setHiveClientStatsCdnResponses(t.cdnResponses).setHiveClientStatsP2pRequests(t.p2pRequests).setHiveClientStatsP2pResponseBytes(t.p2pResponseBytes).setHiveClientStatsP2pResponseErrors(t.p2pResponseErrors).setHiveClientStatsP2pResponses(t.p2pResponses).setHiveClientStatsSavings(parseInt(t.savings,10)).setHiveClientStatsNumPartners(Object.keys(t.partners).length),e.log()},t.logCreatedP2PVideoSource=function(){this.$9().setEventStr("CREATED_VIDEO_SOURCE").log()},t.logStats=function(){var e=this.$3,t=this.$9().setEventStr("STATS");e&&t.setHiveClientStatsCdnRequests(e.cdnRequests).setHiveClientStatsCdnResponseBytes(e.cdnResponseBytes).setHiveClientStatsCdnResponseErrors(e.cdnResponseErrors).setHiveClientStatsCdnResponses(e.cdnResponses).setHiveClientStatsP2pRequests(e.p2pRequests).setHiveClientStatsP2pResponseBytes(e.p2pResponseBytes).setHiveClientStatsP2pResponseErrors(e.p2pResponseErrors).setHiveClientStatsP2pResponses(e.p2pResponses).setHiveClientStatsSavings(parseInt(e.savings,10)).setHiveClientStatsNumPartners(Object.keys(e.partners).length),t.log()},t.logReceivedFirstPeerRequest=function(){this.$9().setEventStr("RECEIVED_FIRST_PEER_REQUEST").log()},t.logEndSession=function(){this.pauseStatsLogging();var e=this.$6,t=e!=null?Date.now()-e:-1;this.$9().setEventStr("SESSION_END").setTimeSpentInP2pMs(t).log()},t.logMissingGetRequestPromise=function(){this.$9().setEventStr("MISSING_GET_REQUEST_PROMISE").log()},e})();l.default=e}),98); __d("VideoPlayerOzWWWConfig",[],(function(t,n,r,o,a,i){"use strict";var e="oz_www_",l=(function(){function t(e){this.$1=e}var n=t.prototype;return n.getBool=function(n,r){return this.$1.getBool(e+n,r)},n.getNumber=function(n,r){return this.$1.getNumber(e+n,r)},n.getString=function(n,r){return this.$1.getString(e+n,r)},n.setContext=function(t,n){this.$1.setContext(t,n)},n.getAllContexts=function(){return this.$1.getAllContexts()},t})();i.default=l}),66); __d("VideoPlayerOzWWWGlobalConfig",["VideoPlayerShakaGlobalConfig"],(function(t,n,r,o,a,i,l){"use strict";var e="oz_www_",s={getBool:function(n,r){return o("VideoPlayerShakaGlobalConfig").getBool(e+n,r)},getNumber:function(n,r){return o("VideoPlayerShakaGlobalConfig").getNumber(e+n,r)},getString:function(n,r){return o("VideoPlayerShakaGlobalConfig").getString(e+n,r)}},u=s;l.default=u}),98); __d("VideoPlayerPlayLogger",["EventListener","SubscriptionsHandler"],(function(t,n,r,o,a,i,l){var e=(function(){function e(e,t){var n=this;this.$3=new(r("SubscriptionsHandler")),this.$1=e,this.$2=t,this.$3.addSubscriptions(r("EventListener").listen(this.$1,"playing",function(){return n.$5()}),r("EventListener").listen(this.$1,"pause",function(){return n.$6()}))}var t=e.prototype;return t.playStarted=function(){(this.$1.paused||this.$1.ended)&&(this.$4=this.$2.getOperationLogger("play").setState("pending_play").start())},t.$6=function(){this.$4&&(this.$4.setResult("aborted").log(),this.$4=null)},t.$5=function(){this.$4&&(this.$4.log(),this.$4=null)},t.unload=function(){this.$3.release()},e})();l.default=e}),98); __d("VideoPlayerMainThreadAvailability",["ShakaConstants","Visibility","performanceNow","vulture"],(function(t,n,r,o,a,i,l){"use strict";var e,s=window.__fbNativeSetTimeout,u=t.__fbNativeClearTimeout,c=window.requestIdleCallback,d=window.cancelIdleCallback,m=function(t,n){var e=function(){t(e,n)};return e},p=(function(){function t(){this.$1=!1,this.$2=null,this.$3=null,this.$4=null}var n=t.prototype;return n.enable=function(){this.$1||!this.$5()||(this.$6(),this.$7(),this.$1=!0)},n.getTimeSinceMainThreadAvailable=function(){return r("vulture")("6XXgYtTWRDXi6qG-9ImsB3OADqQ="),this.$2!=null?(e||(e=r("performanceNow")))()-Number(this.$2):null},n.$8=function(){this.$2=r("Visibility").isHidden()?null:(e||(e=r("performanceNow")))()},n.$9=function(){this.$2=null,typeof this.$4=="number"&&(d(this.$4),this.$4=null),typeof this.$3=="number"&&(u(this.$3),this.$3=null)},n.$7=function(){this.$10()},n.$6=function(){var e=this,t;(t=r("Visibility")).addListener(t.VISIBLE,function(){e.$9(),e.$7()}),t.addListener(t.HIDDEN,function(){e.$9()})},n.$10=function(){var e=this,t=r("ShakaConstants").numbers.settimeout_polling_delay;if(t>-1){var n=function(){e.$8(),e.$3=s(n,t)};s(n,t)}},n.$5=function(){return r("Visibility").isSupported()&&typeof c=="function"&&typeof d=="function"&&typeof s=="function"&&typeof u=="function"},n.maybeEnablePerformanceTest=function(){var e,t,n=r("ShakaConstants").numbers.recursive_ric_timeout;n>-1&&(t={timeout:n});var o=r("ShakaConstants").numbers.recursive_native_settimeout_delay;o>-1&&typeof s=="function"&&(e=m(s,o)),e&&e()},t})(),_=new p;l.default=_}),98); __d("oz-player/loggings/OzPerfLoggerProviderBase",["oz-player/utils/OzErrorUtils"],(function(t,n,r,o,a,i,l){"use strict";var e=(function(){function e(){}var t=e.prototype;return t.cloneContext=function(){var e=this.createLoggerProvider();return this.$11(e),e},t.setType=function(t){return this.$1=t,this},t.setInitiator=function(t){return this.$2=t,this},t.setResource=function(t){return this.$4=t,this},t.setRepresentationID=function(t){return this.$3=t,this},t.setSegmentStartTime=function(t){return this.$5=t,this},t.setSegmentEndTime=function(t){return this.$6=t,this},t.setStreamSwitchReason=function(t){return this.$7=t,this},t.setIsP2pPlayback=function(t){return this.$8=t,this},t.setIsRingBufferSample=function(t){return this.$9=t,this},t.setPerSessionSampleRate=function(t){return this.$10=t,this},t.getType=function(){return this.$1},t.getInitiator=function(){return this.$2},t.getRepresentationID=function(){return this.$3},t.getStreamSwitchReason=function(){return this.$7},t.getResource=function(){return this.$4},t.getSegmentStartTime=function(){return this.$5},t.getSegmentEndTime=function(){return this.$6},t.getIsP2pPlayback=function(){return this.$8},t.getIsRingBufferSample=function(){return this.$9},t.getOperationLogger=function(t){var e=this.createOperationLogger(t);return this.setOperationContext(e)},t.setOperationContext=function(t){return this.$11(t),t},t.createOperationLogger=function(t){throw o("oz-player/utils/OzErrorUtils").createOzError({type:"OZ_NOT_IMPLEMENTED_ERROR",description:"Not implemented: createOperationLogger"})},t.createLoggerProvider=function(){throw o("oz-player/utils/OzErrorUtils").createOzError({type:"OZ_NOT_IMPLEMENTED_ERROR",description:"Not implemented: createLoggerProvider"})},t.$11=function(t){this.getType()&&t.setType(this.getType()),this.getInitiator()&&t.setInitiator(this.getInitiator()),this.getResource()&&t.setResource(this.getResource()),this.getRepresentationID()&&t.setRepresentationID(this.getRepresentationID()),this.getStreamSwitchReason()&&t.setStreamSwitchReason(this.getStreamSwitchReason()),typeof this.getSegmentStartTime()=="number"&&t.setSegmentStartTime(this.getSegmentStartTime()),typeof this.getSegmentEndTime()=="number"&&t.setSegmentEndTime(this.getSegmentEndTime()),typeof this.getIsP2pPlayback()=="boolean"&&t.setIsP2pPlayback(this.getIsP2pPlayback()),typeof this.getIsRingBufferSample()=="boolean"&&t.setIsRingBufferSample(this.getIsRingBufferSample())},e})();l.default=e}),98); __d("VideoPlayerShakaPerformanceLogger",["ExtendableVideoPlayerShakaPerformanceTypedLogger","ScriptPath","VideoPlaybackQuality","VideoPlayerMainThreadAvailability","VideoPlayerShakaGlobalConfig","VideoPlayerShakaPerformanceLoggerConfig","Visibility","clearTimeout","gkx","oz-player/loggings/OzPerfLoggerProviderBase","oz-player/utils/OzErrorUtils","setTimeoutAcrossTransitions"],(function(t,n,r,o,a,i,l){"use strict";var e=3e5,s=200,u=4;r("VideoPlayerMainThreadAvailability").maybeEnablePerformanceTest();var c=!1,d=(function(t){function n(e){var r,o,a,i;return i=t.call(this)||this,i.$VideoPlayerShakaPerformanceLogger$p_13=!1,i.$VideoPlayerShakaPerformanceLogger$p_14=!0,i.$VideoPlayerShakaPerformanceLogger$p_26=0,i.$VideoPlayerShakaPerformanceLogger$p_27=0,i.$VideoPlayerShakaPerformanceLogger$p_28=[],i.$VideoPlayerShakaPerformanceLogger$p_38=new Map,i.$VideoPlayerShakaPerformanceLogger$p_25=e,i.$VideoPlayerShakaPerformanceLogger$p_2=e.videoID,i.$VideoPlayerShakaPerformanceLogger$p_4=e.video,i.$VideoPlayerShakaPerformanceLogger$p_1=e.uniqueID,i.$VideoPlayerShakaPerformanceLogger$p_3=0,i.$VideoPlayerShakaPerformanceLogger$p_11=e.isLive,i.$VideoPlayerShakaPerformanceLogger$p_12=e.isServableViaFbms,i.$VideoPlayerShakaPerformanceLogger$p_9=null,i.$VideoPlayerShakaPerformanceLogger$p_15=e.accessToken,i.$VideoPlayerShakaPerformanceLogger$p_16=e.playerOrigin,i.$VideoPlayerShakaPerformanceLogger$p_17=e.playerSuborigin,i.$VideoPlayerShakaPerformanceLogger$p_18=e.playerVersion,i.$VideoPlayerShakaPerformanceLogger$p_29=e.getBandwidthEstimate,i.$VideoPlayerShakaPerformanceLogger$p_30=(r=e.getPlayerDimensions)!=null?r:null,i.$VideoPlayerShakaPerformanceLogger$p_31=(o=e.getPlayerFormat)!=null?o:null,i.setRepresentationID(e.representationId),i.$VideoPlayerShakaPerformanceLogger$p_33=e.isDrm,i.$VideoPlayerShakaPerformanceLogger$p_35={},i.$VideoPlayerShakaPerformanceLogger$p_36=(a=e.playerInstanceCount)!=null?a:null,n.maybeEnableMainThreadAvailabilityLogging(),i}babelHelpers.inheritsLoose(n,t),n.forceShouldSample=function(){c=!0,r("ExtendableVideoPlayerShakaPerformanceTypedLogger").enable()},n.shouldInitialize=function(){return c||!!o("VideoPlayerShakaPerformanceLoggerConfig").isSampled||r("gkx")("26220")},n.flushQueuedLogs=function(){r("ExtendableVideoPlayerShakaPerformanceTypedLogger").flushQueuedLogs()},n.setVideoPlaybackExperienceIssue=function(t){n.$VideoPlayerShakaPerformanceLogger$p_32=t},n.isEnabled=function(){return r("ExtendableVideoPlayerShakaPerformanceTypedLogger").isEnabled()},n.maybeEnableMainThreadAvailabilityLogging=function(){o("VideoPlayerShakaGlobalConfig").getBool("enable_main_thread_availability_logging",!1)&&r("ExtendableVideoPlayerShakaPerformanceTypedLogger").isEnabled()&&r("VideoPlayerMainThreadAvailability").enable()};var a=n.prototype;return a.$VideoPlayerShakaPerformanceLogger$p_39=function(t){var e=null;try{e=t.getBuffered()}catch(e){}if(e!=null&&e.length>0){var n=e.length-1;return{lastBufferedStart:Math.round(e.start(n)*1e3),lastBufferedEnd:Math.round(e.end(n)*1e3)}}return null},a.$VideoPlayerShakaPerformanceLogger$p_40=function(t){var e=t,n=this.$VideoPlayerShakaPerformanceLogger$p_4.buffered;if(n.length>0){var r=n.length-1;e=e.setLastBufferedStart(Math.round(n.start(r)*1e3)).setLastBufferedEnd(Math.round(n.end(r)*1e3))}for(var o=[],a=0;au&&this.$VideoPlayerShakaPerformanceLogger$p_28.shift()},a.getEventLogger=function(t){var e=this,a=Date.now(),i=new(r("ExtendableVideoPlayerShakaPerformanceTypedLogger")),l=this.$VideoPlayerShakaPerformanceLogger$p_4.currentTime,s=this.$VideoPlayerShakaPerformanceLogger$p_4.duration,u=this.$VideoPlayerShakaPerformanceLogger$p_29(this.$VideoPlayerShakaPerformanceLogger$p_11),c=this.$VideoPlayerShakaPerformanceLogger$p_25.getApproximateFBLSToPlayerDisplayLatency(),d=this.$VideoPlayerShakaPerformanceLogger$p_30?this.$VideoPlayerShakaPerformanceLogger$p_30():null;switch(this.$VideoPlayerShakaPerformanceLogger$p_40(i).setEvent(t).setVideoID(this.$VideoPlayerShakaPerformanceLogger$p_2).setDroppedFrames(o("VideoPlaybackQuality").getDroppedFrames(this.$VideoPlayerShakaPerformanceLogger$p_4)).setTotalFrames(o("VideoPlaybackQuality").getTotalFrames(this.$VideoPlayerShakaPerformanceLogger$p_4)).setEnded(this.$VideoPlayerShakaPerformanceLogger$p_4.ended).setIsMuted(this.$VideoPlayerShakaPerformanceLogger$p_4.muted).setPlaybackRate(this.$VideoPlayerShakaPerformanceLogger$p_4.playbackRate).setDynamicBitrate(this.$VideoPlayerShakaPerformanceLogger$p_23).setPlayhead(Math.round(l*1e3)).setVideoDuration(Math.round(s*1e3)).setLogicalCpuCount(navigator&&navigator.hardwareConcurrency).setPlayerOriginCallerSpecified(this.$VideoPlayerShakaPerformanceLogger$p_16).setScriptPath(o("ScriptPath").getScriptPath()).setPlayerHeight(d?d.height:null).setPlayerWidth(d?d.width:null).setPlayerSuborigin(this.$VideoPlayerShakaPerformanceLogger$p_17).setPlayerVersion(this.$VideoPlayerShakaPerformanceLogger$p_18).setPlayerFormat(this.$VideoPlayerShakaPerformanceLogger$p_31?this.$VideoPlayerShakaPerformanceLogger$p_31():null).setBandwidthEstimate(u==null?null:Math.round(u)).setRepresentationID(this.getRepresentationID()).setLowestQualityRepresentationID(this.$VideoPlayerShakaPerformanceLogger$p_22).setIsLive(this.$VideoPlayerShakaPerformanceLogger$p_11).setIsServableViaFbms(this.$VideoPlayerShakaPerformanceLogger$p_12).setPlaybackFbmsParam(this.$VideoPlayerShakaPerformanceLogger$p_37).setIsPageVisible(!r("Visibility").isHidden()).setIsTemplatedManifest(this.$VideoPlayerShakaPerformanceLogger$p_13).setSession(this.$VideoPlayerShakaPerformanceLogger$p_1).setDevicePixelRatioFloat(window.devicePixelRatio||1).setManifestType(this.$VideoPlayerShakaPerformanceLogger$p_20).setIsMixedCodecManifest(this.$VideoPlayerShakaPerformanceLogger$p_21).setLiveheadSeqNumMpd(this.$VideoPlayerShakaPerformanceLogger$p_10).setSequentialID(this.$VideoPlayerShakaPerformanceLogger$p_3++).setState(this.$VideoPlayerShakaPerformanceLogger$p_5).setLastBufferingEventStartTime(this.$VideoPlayerShakaPerformanceLogger$p_8).setLastBufferingEventEndTime(this.$VideoPlayerShakaPerformanceLogger$p_7).setLastPlayingEventTime(this.$VideoPlayerShakaPerformanceLogger$p_6).setLiveheadDelta(this.getLiveheadDelta()).setResult("success").setAccessToken(this.$VideoPlayerShakaPerformanceLogger$p_15).setVideoPlaybackExperienceIssue(n.$VideoPlayerShakaPerformanceLogger$p_32).setClientTimeBegin(a).setClientTimeDuration(0).setClientTimeEnd(a).setIsDrm(this.$VideoPlayerShakaPerformanceLogger$p_33).setPlayerInstanceCount(this.$VideoPlayerShakaPerformanceLogger$p_36).setFblsToPlyDisMs((c==null?void 0:c.latencyFromMpdUpdate)!=null?Math.round(c.latencyFromMpdUpdate*1e3):null).setPreferredEdgeLatency(this.$VideoPlayerShakaPerformanceLogger$p_19).setPerSessionSampleRate(this.$VideoPlayerShakaPerformanceLogger$p_25.perSessionSampleRate).setIsLatencyCachupEnabled(this.$VideoPlayerShakaPerformanceLogger$p_14).setIsOnline(this.$VideoPlayerShakaPerformanceLogger$p_34),t){case"buffering":case"buffering_timeout":case"enter_buffering":case"unload":i.setError(this.$VideoPlayerShakaPerformanceLogger$p_28.join(" | "))}switch(t){case"leave_buffering":case"playing":this.$VideoPlayerShakaPerformanceLogger$p_28=[]}var m=this,p=i.setState;i.setState=function(e){var t=this;return e!==m.$VideoPlayerShakaPerformanceLogger$p_5&&e==="playing"?m.$VideoPlayerShakaPerformanceLogger$p_6=Date.now():e!=="playing"&&(m.$VideoPlayerShakaPerformanceLogger$p_6=null),m.$VideoPlayerShakaPerformanceLogger$p_5=e,p.call(this,e)},i.updateState=function(e){return this.getState()==m.$VideoPlayerShakaPerformanceLogger$p_5?this.setState(e):this};var _=i.setError;i.setError=function(e){if(typeof e=="object"&&e!=null)if(o("oz-player/utils/OzErrorUtils").isOzError(e))this.setResult("failed"),this.setCode(e.getExtra().code),m.addToLastErrorQueue(e.getType()),_.call(this,e.getType());else{if(e.type==="aborted"||e.type==="delay")this.setResult("aborted");else if(e.type==="paused")this.setResult("paused");else if(this.setResult("failed"),e.type!=null&&e.type!=="")m.addToLastErrorQueue(e.type),_.call(this,e.type);else{var t=function(t){return t.replace(/([0-9]{2,})/g,function(e){for(var t="";t.length0||a>0)&&n.push(new(r("OzMosThresholdRestriction"))(t)),n}l.default=e}),98); __d("handleOzManifestFetchErrorEvent",[],(function(t,n,r,o,a,i){"use strict";function e(e,t){var n=e.getNumber("initial_manifest_request_retry_count",0),r=JSON.parse(e.getString("network_retry_intervals_json","{}")),o=e.getNumber("live_max_try_attempts_on_404",1),a=["404","503"];e.getBool("live_gracefully_handle_no_network",!1)&&a.push("0"),e.getBool("live_gracefully_handle_410",!1)&&a.push("410"),e.getBool("live_gracefully_handle_502",!1)&&a.push("502"),e.getBool("live_gracefully_handle_429",!1)&&a.push("429"),e.getBool("live_gracefully_handle_504",!1)&&a.push("504"),e.getBool("normalize_mpd_fetch_errors",!1)&&a.push("20");var i=t.error.getExtra().code;if(!(e.getBool("no_retry_on_empty_string_error_code",!1)&&i==="")){e.getBool("handle_mpd_null_error_codes",!1)&&(i=i!=null?i:null);var l=r[i];if(t.isInitialRequest)typeof l=="number"&&l>0&&t.retryAttemptCount-1)switch(i){case"410":t.endStream();break;case"404":o0&&t.retry({waitMs:l});break;default:break}else i===null&&e.getBool("handle_mpd_null_error_codes",!1)&&t.retry()}}i.default=e}),66); __d("handleOzStreamErrorEvent",[],(function(t,n,r,o,a,i){"use strict";var e=[0,1,1,2,3,5,8,13,21,34];function l(t,n){var r=n.error.getExtra().code;if(!(t.getBool("no_retry_on_empty_string_error_code",!1)&&r==="")){if(t.getBool("retry_null_error_code_in_stream",!1)&&r==null){n.retry();return}var o=JSON.parse(t.getString("network_end_broadcasts_json","[]"));if(o.includes(r)){n.endStream();return}var a=JSON.parse(t.getString("network_skip_json","[]"));if(a.includes(r)){n.retry();return}var i=t.getBool("back_off_pdash_504_retry",!0)?e[n.retryAttemptCount]:0,l=JSON.parse(t.getString("network_reload_mpd_json","[]")),s=t.getBool("fix_reload_manifest_retry",!1);if(!(t.getBool("back_off_pdash_504_retry",!0)&&i==null&&(!s||l.includes(r)))){if(i!=null&&l.includes(r)){t.getBool("network_reload_mpd_json_retry",!1)?n.retry({behavior:"recover_failed_request",waitMs:i*1e3}):n.retry({waitMs:i*1e3});return}var u=JSON.parse(t.getString("network_retry_intervals_json",'{"0": 1000, "404": 2000, "502": 1000, "503": 1000, "504": 1000}')),c=r!=null?u[r]:null;if(c!=null){t.getBool("network_retry_intervals_json_retry",!1)?n.retry({behavior:"retry_failed_request",waitMs:c}):n.retry({waitMs:c});return}}}}i.default=l}),66); __d("getAvailableMimeCodecsFromDashManifest",[],(function(t,n,r,o,a,i){"use strict";function e(e){var t=/^(audio|video)\/.*$/;return t.test(e)}function l(t,n){var r=[],o=n?window.ManagedMediaSource:window.MediaSource;if(t!=null){for(var a=/mimeType=\"([^\"]*)\"[^\>]*codecs=\"([^\"]*)\"/g,i=/codecs=\"([^\"]*)\"[^\>]*mimeType=\"([^\"]*)\"/g,l,s=[];l=a.exec(t);)s.push([l[1],l[2]]);for(;l=i.exec(t);)s.push([l[2],l[1]]);for(var u of s){var c=u[0],d=u[1],m=c+'; codecs="'+d+'"',p=c.startsWith("audio")?"audio":c.startsWith("video")?"video":"other",_=!0,f=!1;e(m)&&(f=!0,_=o?o.isTypeSupported(m):!1),r.push({codecs:d,isRequiredForPlayback:f,isTypeSupported:_,mimeCodec:m,mimeType:c,representationType:p})}}return r}i.default=l}),66); __d("manifestHasUnsupportedCodecs",["getAvailableMimeCodecsFromDashManifest"],(function(t,n,r,o,a,i,l){"use strict";function e(e,t){if(t&&window.ManagedMediaSource!=null||!t&&window.MediaSource!=null){var n=r("getAvailableMimeCodecsFromDashManifest")(e,t);return n.length<=0?!1:n.some(function(e){return!e.isTypeSupported})}return!1}l.default=e}),98); __d("oz-player/configs/OzPlayerConfigDefaults",[],(function(t,n,r,o,a,i){var e={bandwidth_ignore_on_stream_write_samples:!1,bandwidth_use_response_time_adjustment:!1,catchup_use_timeline_range_end_time_as_end:!1,clear_on_seek:!0,debug_live_replay:!1,do_not_end_stream:!1,enable_abr_logging:!1,enable_alternative_audio_tracks:!1,enable_lip_sync_abr_select_quality:!1,enable_managed_media_source:!1,enable_revoke_object_url_on_destroy:!1,fix_live_rewind_user_selected_playback_speed:!0,ignore_reset_after_seek_if_bufferahead:!1,latencymanager_stalled_edgelatency_sec_on:!1,msm_refactor_wait_for_sourceopen:!1,ms_promise_for_null:!1,no_rep_to_switch_fallback_progressive:!1,normalize_mpd_fetch_errors:!0,parse_number_templated_uri:!0,pdash_use_pdash_segmentlocator:!1,playback_speed_latency_adjustment_disabled:!1,player_emit_mpdparsed_early:!1,playhead_manager_buffered_timerange_update_on_timeupdate:!0,playhead_manager_clamp_initial_playback_position:!1,reset_catchup_timeout_after_play_sec_on_overwrite:!0,retry_video_element_error:!0,sidx_parser_memory_optimization:!0,skip_videobuffer_gaps:!0,skip_videobuffer_gaps_on_buffer_updated:!0,use_live_latency_manager:!1,use_scf_timebased_segments:!1,video_cdn_url_refresh:!1,vtt_caption_representation:!0},l={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,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_header_expire_threshold: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_around_playhead_boundary_ms:5e3,clear_buffer_on_seek_epsilon_s:0,clear_buffer_on_seek_nudge_s:0,default_bandwidth_estimate:1e6,download_cursor_buffer_ahead_time_max_sec:0,download_cursor_total_buffer_max_sec: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_stalled_edgelatency_sec:0,live_audio_ibr_bandwidth_percentage:.05,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_initial_update_delay_ms:0,manifest_update_frequency_ms:0,max_bandwidth_sample_count:30,maximum_bandwidth_sample_bandwidth:1e8,max_start_eme_attempts:3,min_eval_interval:100,minimum_bandwidth_sample_duration:10,minimum_bytes_to_sample_on_close:25e3,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,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,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,sidx_segment_retry_attempts:9999,sidx_segment_retry_interval_ms:100,skip_videobuffer_gaps_max_gap_size_sec:0,stale_mpd_buffer_ahead_target:0,start_buffer_underflow_target:.1,steadystate_minbuffer_buckets:0,steadystate_minbuffer_buckets_sec:1,steadystate_minbuffer_sec:0,stream_interrupt_buffer_target_timeout_ms:1e4,stream_interrupt_check_mpd_stale_count_threshold:6,stream_interrupt_in_play_buffer_overflow_target:1,stream_reader_max_buffer_len:0,timeline_offset_threshold:10,time_to_first_byte_estimate_half_life_ms:500,time_to_first_byte_ignore_above_threshold_ms:0},s={bandwidth_estimate_header_key:"",bandwidth_estimate_key:"",block_representation_status_codes_json:"[500, 503]",block_representation_status_codes_temporarily_json:"{}",cdn_experiment_id:"",stream_types_eligible_for_partial_playback:""};a.exports={defaultBools:e,defaultNumbers:l,defaultStrings:s}}),null); __d("oz-player/configs/OzPlayerConfig",["oz-player/configs/OzPlayerConfigDefaults"],(function(t,n,r,o,a,i,l){"use strict";var e=(function(){function e(e){e===void 0&&(e={}),this.$1=e}var t=e.prototype;return t.getBool=function(t){return typeof this.$1[t]=="boolean"?this.$1[t]:o("oz-player/configs/OzPlayerConfigDefaults").defaultBools[t]},t.getNumber=function(t){return typeof this.$1[t]=="number"?this.$1[t]:o("oz-player/configs/OzPlayerConfigDefaults").defaultNumbers[t]},t.getString=function(t){return typeof this.$1[t]=="string"?this.$1[t]:o("oz-player/configs/OzPlayerConfigDefaults").defaultStrings[t]},t.getLegacyConfig=function(){var e=this;return{getBool:function(n,r){var t;return typeof e.$1[n]=="boolean"?e.$1[n]:(t=o("oz-player/configs/OzPlayerConfigDefaults").defaultBools[n])!=null?t:r},getNumber:function(n,r){var t;return typeof e.$1[n]=="number"?e.$1[n]:(t=o("oz-player/configs/OzPlayerConfigDefaults").defaultNumbers[n])!=null?t:r},getString:function(n,r){var t;return typeof e.$1[n]=="string"?e.$1[n]:(t=o("oz-player/configs/OzPlayerConfigDefaults").defaultStrings[n])!=null?t:r}}},e})();l.default=e}),98); __d("oz-player/drm/OzDrmUtils",[],(function(t,n,r,o,a,i){"use strict";var e=function(t){return Uint8Array.from(window.atob(t),function(e){return e.charCodeAt(0)})},l=function(t){return window.btoa(String.fromCharCode.apply(null,new Uint8Array(t)))};i.base64ToUint8Array=e,i.arrayBufferToBase64=l}),66); __d("oz-player/shims/www/ozReportUnexpectedErrorWWW",["FBLogger","getErrorSafe"],(function(t,n,r,o,a,i,l){"use strict";function e(e,t,n){n===void 0&&(n="mustfix");var o=r("getErrorSafe")(e),a=r("FBLogger")("oz_player").catching(o),i="Unexpected "+o.name+" in "+t;switch(n){case"fatal":a.fatal(i);break;case"mustfix":a.mustfix(i);break;case"warn":a.warn(i);break;case"info":a.info(i);break;case"debug":a.debug(i);break}}l.default=e}),98); __d("oz-player/shims/ozReportUnexpectedError",["oz-player/shims/www/ozReportUnexpectedErrorWWW"],(function(t,n,r,o,a,i,l){"use strict";l.default=r("oz-player/shims/www/ozReportUnexpectedErrorWWW")}),98); __d("oz-player/loggings/OzLoggingUtils",["oz-player/shims/ozReportUnexpectedError"],(function(t,n,r,o,a,i,l){"use strict";function e(e,t,n){var r=e.getOperationLogger(t).start();try{return n(r)}catch(e){throw r.setError(e),e}finally{r.log()}}function s(e,t,n,o,a){o===void 0&&(o=function(){}),a===void 0&&(a=function(){});var i=t.getOperationLogger(n).start();o(i),e.then(function(e){a(i),i.log()},function(e){a(i),i.setError(e),i.log()}).catch(function(e){r("oz-player/shims/ozReportUnexpectedError")(e,n+" logger")})}l.executeOperationAndLog=e,l.monitorPromiseAndLogOperation=s}),98); __d("oz-player/loggings/OzOperationLoggerBase",[],(function(t,n,r,o,a,i){"use strict";var e=(function(){function e(e){this.$52=new Map,this.$1=e}var t=e.prototype;return t.start=function(){var e=Date.now();return this.setClientTimeBegin(e),this.setClientTimeEnd(null),this.setClientTimeDuration(null),this},t.log=function(){var e=Date.now(),t=this.getClientTimeBegin(),n=this.getClientTimeEnd();(t==null||t===0)&&(t=e,this.setClientTimeBegin(t)),(n==null||n===0)&&(n=e,this.setClientTimeEnd(n)),this.setClientTimeDuration(n-t)},t.setError=function(t){return this.$2=t,this},t.setPerSessionSampleRate=function(t){return this.$3=t,this},t.setAppendTarget=function(t){return this.$47=t,this},t.setOneObserved=function(t){return this.$44=t,this},t.setOneReqWave=function(t){return this.$45=t,this},t.setOneResWave=function(t){return this.$46=t,this},t.setIsP2pPlayback=function(t){return this.$43=t,this},t.setResult=function(t){return this.$4=t,this},t.setType=function(t){return this.$5=t,this},t.setClientTimeBegin=function(t){return this.$6=t,this},t.setClientTimeDuration=function(t){return this.$7=t,this},t.setClientTimeEnd=function(t){return this.$8=t,this},t.setSegmentCount=function(t){return this.$15=t,this},t.setTimeToFirstByte=function(t){return this.$9=t,this},t.setTimeToLastByte=function(t){return this.$10=t,this},t.setTimeToRequestStart=function(t){return this.$11=t,this},t.setTimeToRequestSent=function(t){return this.$12=t,this},t.setReason=function(t){return this.$13=t,this},t.setResource=function(t){return this.$14=t,this},t.setSegmentStartTime=function(t){return this.$16=t,this},t.setSegmentEndTime=function(t){return this.$17=t,this},t.setLength=function(t){return this.$18=t,this},t.setLiveheadPosition=function(t){return this.$19=t,this},t.setLiveheadSeqNumHeader=function(t){return this.$20=t,this},t.setLiveheadSeqNumMpd=function(t){return this.$21=t,this},t.setManifestType=function(t){return this.$22=t,this},t.setMediaSourceNewDuration=function(t){return this.$23=t,this},t.setMediaSourcePreviousDuration=function(t){return this.$24=t,this},t.setPriorityFloat=function(t){return this.$25=t,this},t.setAppendedBufferMs=function(t){return this.$26=t,this},t.setInitiator=function(t){return this.$27=t,this},t.setPreloadTime=function(t){return this.$28=t,this},t.setConcluder=function(t){return this.$29=t,this},t.setPreviousRepresentationID=function(t){return this.$30=t,this},t.setRepresentationID=function(t){return this.$31=t,this},t.setStreamSwitchReason=function(t){return this.$32=t,this},t.setState=function(t){return this.$33=t,this},t.setContentLengthHeader=function(t){return this.$34=t,this},t.setOriginHitHeader=function(t){return this.$36=t,this},t.setEdgeHitHeader=function(t){return this.$37=t,this},t.setFNAHitHeader=function(t){return this.$38=t,this},t.setCode=function(t){return this.$35=t,this},t.setResponseTimeMsHeader=function(t){return this.$39=t,this},t.setIsTemplatedManifest=function(t){return this.$40=t,this},t.setIsLatencyCachupEnabled=function(t){return this.$41=t,this},t.setPlayerFormat=function(t){return this.$42=t,this},t.setIsRingBufferSample=function(t){return this.$48=t,this},t.setIsOnline=function(t){return this.$49=t,this},t.setProxyStatusHeader=function(t){return this.$50=t,this},t.setPlaybackFbmsParam=function(t){return this},t.setPreferredEdgeLatency=function(t){return this.$51=t,this},t.setUserInfo=function(t){return this},t.setDynamicStatusHeader=function(t){return this},t.setIsMixedCodecManifest=function(t){return this.$53=t,this},t.getPerSessionSampleRate=function(){return this.$3},t.setMediaSourceSourceBuffer=function(t,n){return this.$52.set(t,n),this},t.unsetMediaSourceSourceBuffers=function(){return this.$52.clear(),this},t.getError=function(){return this.$2},t.getResult=function(){return this.$4},t.getType=function(){return this.$5},t.getClientTimeBegin=function(){return this.$6},t.getClientTimeEnd=function(){return this.$7!=null?this.$6!=null?this.$6+this.$7:null:this.$8},t.getTimeToRequestStart=function(){return this.$11},t.getTimeToRequestSent=function(){return this.$12},t.getReason=function(){return this.$13},t.getResource=function(){return this.$14},t.getOperationName=function(){return this.$1},t.getSegmentStartTime=function(){return this.$16},t.getSegmentEndTime=function(){return this.$17},t.getLength=function(){return this.$18},t.getLiveheadPosition=function(){return this.$19},t.getManifestType=function(){return this.$22},t.getIsMixedCodecManifest=function(){return this.$53},t.getPriorityFloat=function(){return this.$25},t.getAppendedBufferMs=function(){return this.$26},t.getInitiator=function(){return this.$27},t.getPreloadTime=function(){return this.$28},t.getConcluder=function(){return this.$29},t.getContentLengthHeader=function(){return this.$34},t.getOriginHitHeader=function(){return this.$36},t.getEdgeHitHeader=function(){return this.$37},t.getFNAHitHeader=function(){return this.$38},t.getCode=function(){return this.$35},t.getResponseTimeMsHeader=function(){return this.$39},t.getIsTemplatedManifest=function(){return this.$40},t.getOneObserved=function(){return this.$44},t.getOneReqWave=function(){return this.$45},t.getOneResWave=function(){return this.$46},t.getAppendTarget=function(){return this.$47},t.getIsRingBufferSample=function(){return this.$48},t.getIsOnline=function(){return this.$49},t.getProxyStatusHeader=function(){return this.$50},t.getMediaSourceSourceBuffers=function(){return this.$52},e})();i.default=e}),66); __d("oz-player/shims/www/OzDOMEventListenerWWW",["OzDOMEventListenerImpl"],(function(t,n,r,o,a,i){"use strict";var e=n("OzDOMEventListenerImpl");i.default=e}),66); __d("oz-player/shims/OzDOMEventListener",["oz-player/shims/www/OzDOMEventListenerWWW"],(function(t,n,r,o,a,i,l){"use strict";l.default=r("oz-player/shims/www/OzDOMEventListenerWWW")}),98); __d("oz-player/shims/www/OzMaybeNativePromiseWWW",["cr:3014"],(function(t,n,r,o,a,i,l){"use strict";l.default=n("cr:3014")}),98); __d("oz-player/shims/OzMaybeNativePromise",["oz-player/shims/www/OzMaybeNativePromiseWWW"],(function(t,n,r,o,a,i,l){"use strict";l.default=r("oz-player/shims/www/OzMaybeNativePromiseWWW")}),98); __d("oz-player/shims/www/OzSubscriptionsHandlerWWW",["SubscriptionsHandler"],(function(t,n,r,o,a,i,l){"use strict";l.default=r("SubscriptionsHandler")}),98); __d("oz-player/shims/OzSubscriptionsHandler",["oz-player/shims/www/OzSubscriptionsHandlerWWW"],(function(t,n,r,o,a,i,l){"use strict";l.default=r("oz-player/shims/www/OzSubscriptionsHandlerWWW")}),98); __d("oz-player/utils/OzErrorEmitter",["oz-player/shims/OzEventEmitter","oz-player/shims/ozvariant"],(function(t,n,r,o,a,i,l){"use strict";var e=(function(e){function t(t){var n;return t===void 0&&(t=!1),n=e.call(this)||this,n.$OzErrorEmitter$p_1=!1,n.$OzErrorEmitter$p_2=!1,n.$OzErrorEmitter$p_3=[],n.emitError=function(e){n.$OzErrorEmitter$p_1?n.emit("error",e):n.$OzErrorEmitter$p_2?n.$OzErrorEmitter$p_3.push(e):n.$OzErrorEmitter$p_1||r("oz-player/shims/ozvariant")(0,14038)},n.$OzErrorEmitter$p_2=t,n}babelHelpers.inheritsLoose(t,e);var n=t.prototype;return n.onError=function(t){this.$OzErrorEmitter$p_1=!0;var e=this.addListener("error",t);return this.$OzErrorEmitter$p_2&&this.$OzErrorEmitter$p_3.length>0&&this.$OzErrorEmitter$p_3.forEach(this.emitError),e},t})(r("oz-player/shims/OzEventEmitter"));l.default=e}),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/OzErrorEmitter","oz-player/utils/OzErrorUtils"],(function(t,n,r,o,a,i,l){"use strict";var e=(function(){function e(e,t,n){var a=this;n===void 0&&(n=null),this.$1=null,this.$2=new Map,this.$4=!1,this.$6=new(r("oz-player/shims/OzSubscriptionsHandler")),this.$7=new(r("oz-player/utils/OzErrorEmitter")),this.$8=!1,this.$9=null,this.$10=0,this.$11=[],this.$12=[],this.$22=function(e,t){e instanceof r("oz-player/loggings/OzOperationLoggerBase")&&e.getError()&&e.setResult("failed"),t!=null&&e.setReason(t)},this.$19=function(e){if(a.$4)return r("oz-player/shims/OzMaybeNativePromise").reject(o("oz-player/utils/OzErrorUtils").createOzError({type:"OZ_DRM_MANAGER",description:"OzDrmManager destroyed before call to mediaKeySystemAccess.createMediaKeys()."}));var t=a.$5.mediaKeys!=null?r("oz-player/shims/OzMaybeNativePromise").resolve(a.$5.mediaKeys):e.createMediaKeys(),n=t.then(function(t){return{mediaKeySystemAccess:e,mediaKeys:t}});return o("oz-player/loggings/OzLoggingUtils").monitorPromiseAndLogOperation(n,a.$3,"drm_create_media_keys",function(){},a.$22),n},this.$20=function(e){if(a.$4)return r("oz-player/shims/OzMaybeNativePromise").reject(o("oz-player/utils/OzErrorUtils").createOzError({type:"OZ_DRM_MANAGER",description:"OzDrmManager destroyed before call to setMediaKeys()"}));var t=e.mediaKeys,n=e.mediaKeySystemAccess;if(!t)throw o("oz-player/utils/OzErrorUtils").createOzError({type:"OZ_DRM_MANAGER",description:"No mediaKeys for mediaKeySystemAccess"});var i=a.$5.setMediaKeys(t).then(function(){if(a.$4)return r("oz-player/shims/OzMaybeNativePromise").reject(o("oz-player/utils/OzErrorUtils").createOzError({type:"OZ_DRM_MANAGER",description:"OzDrmManager destroyed after setMediaKeys() called."}));var e=Array.from(a.$2.values()).find(function(e){return e.getKeySystem()===n.keySystem});if(!e)throw o("oz-player/utils/OzErrorUtils").createOzError({type:"OZ_DRM_MANAGER",description:"Can't find OzDrmProvider for keySystem "+n.keySystem});var i=e.getServerCertificate();return i?t.setServerCertificate(i).then(function(){return{mediaKeys:t,provider:e}}):{mediaKeys:t,provider:e}});return o("oz-player/loggings/OzLoggingUtils").monitorPromiseAndLogOperation(i,a.$3,"drm_set_media_keys",function(){},a.$22),i},this.$21=function(e){var t=e.mediaKeys,n=e.provider,i=n.getInitDatas();if(i.length===0)return a.$6.addSubscriptions(r("oz-player/shims/OzDOMEventListener").listenDOMEvent(a.$5,"encrypted",function(e){a.$23(t,n,e).catch(function(e){a.$14(o("oz-player/utils/OzErrorUtils").convertPromiseRejectionReasonToOzError(e,{type:"OZ_DRM_MANAGER",description:"DRM encrypted rejection"}))})})),r("oz-player/shims/OzMaybeNativePromise").resolve([]);var l=i.map(function(e){return a.$23(t,n,{initData:e.data,initDataType:e.type})}),s=r("oz-player/shims/OzMaybeNativePromise").all(l);return o("oz-player/loggings/OzLoggingUtils").monitorPromiseAndLogOperation(s,a.$3,"drm_request_license",function(){},a.$22),s},this.$5=t,this.$1=n,this.$3=e.cloneContext().setType("drm_manager")}var t=e.prototype;return t.hasContentProtections=function(){return this.$9},t.onError=function(t){return this.$7.onError(t)},t.$13=function(t){this.$7.emitError(t)},t.$14=function(t){var e,n,r=(e=(n=this.$1)==null?void 0:n.maxStartEMEAttempts)!=null?e:-1;this.$10=0?parseFloat((e[r].endTime-t).toFixed(3)):0,i=r>=0?e.length-1-r:-1;return{bufferAheadSec:a,bufferedOffset:i}}function p(e,t,n){var r=e.map(function(e){return{rangeStart:e.startTime,rangeEnd:e.endTime}}),a=o("oz-player/utils/OzNumericalRangeUtil").findCurrentRangeIndex(n,t,r),i=parseFloat(r.reduce(function(e,n){var r=n.rangeEnd;return r==null?e:e+(o("oz-player/utils/OzNumericalRangeUtil").isWithin(t,n)?r-t:o("oz-player/utils/OzNumericalRangeUtil").isLargerThan(n.rangeStart,t)?r-n.rangeStart:0)},0).toFixed(3)),l=a>=0?e.length-1-a:-1;return{bufferAheadSec:i,bufferedOffset:l}}l.getTotalBufferedTime=e,l.getTotalInBufferedRanges=s,l.getStartBufferedTime=u,l.getEndBufferedTime=c,l.convertToBufferedTimeRangeArray=d,l.getBufferAheadInBufferedRanges=m,l.getTotalBufferAheadOfPosition=p}),98); __d("oz-player/media_source/SourceBufferManagerUtils",["oz-player/utils/OzSourceBufferUtil"],(function(t,n,r,o,a,i,l){"use strict";function e(e,t,n){var r=o("oz-player/utils/OzSourceBufferUtil").getEndBufferedTime(t);return function(){var e=o("oz-player/utils/OzSourceBufferUtil").getEndBufferedTime(t);return{startTime:r,endTime:e}}}l.startMeasuringAppendedBuffer=e}),98); __d("oz-player/shims/www/OzDeferredWWW",["Deferred"],(function(t,n,r,o,a,i,l){"use strict";l.default=r("Deferred")}),98); __d("oz-player/shims/OzDeferred",["oz-player/shims/www/OzDeferredWWW"],(function(t,n,r,o,a,i,l){"use strict";l.default=r("oz-player/shims/www/OzDeferredWWW")}),98); __d("oz-player/utils/OzFakeEventTarget",[],(function(t,n,r,o,a,i){"use strict";var e=(function(){function e(){this.$1={}}var t=e.prototype;return t.dispatchEvent=function(t){this.$1[t]!=null&&this.$1[t].forEach(function(e){return e()})},t.addEventListener=function(t,n){var e=this;return this.$1[t]===void 0&&(this.$1[t]=new Set),this.$1[t].add(n),{remove:function(){e.removeEventListener(t,n)}}},t.removeEventListener=function(t,n){this.$1[t]&&this.$1[t].delete(n)},t.destroy=function(){this.$1={}},e})();i.default=e}),66); __d("oz-player/states/OzObservedSourceBufferState",["oz-player/shims/OzSubscriptionsHandler","oz-player/utils/OzFakeEventTarget"],(function(t,n,r,o,a,i,l){"use strict";var e=(function(e){function t(t,n){var o;return o=e.call(this)||this,o.$OzObservedSourceBufferState$p_2=new(r("oz-player/shims/OzSubscriptionsHandler")),o.$OzObservedSourceBufferState$p_3=[],o.$OzObservedSourceBufferState$p_6=function(){var e;try{e=o.$OzObservedSourceBufferState$p_1.getBuffered()}catch(e){if(e.name==="InvalidStateError"){o.$OzObservedSourceBufferState$p_3=[];return}else throw e}for(var t=[],n=0;n0&&n>e&&this.$3.remove(e,n)},a.$21=function(t,n){var e=Math.max(t,0);if(n>0&&n>e){var o=this.$22();return this.$20(e,n),o}return r("oz-player/shims/OzMaybeNativePromise").resolve()},a.clearRangeWithWait=function(r){var t=this;return this.cancelOperationAndCleanQueue(),r.reduce(function(e,n){var r=n.fromTime,o=n.toTime;return e.then(function(){return t.$21(r,o)})},(e||(e=n("Promise"))).resolve())},a.$22=function(t){var e=this.$4=new(r("oz-player/shims/OzDeferred"))(r("oz-player/shims/OzMaybeNativePromise")),n=e.getPromise();return t&&o("oz-player/loggings/OzLoggingUtils").monitorPromiseAndLogOperation(n,t,"wait_for_source_buffer"),n},a.$23=function(t,n,a,i){var e=this,l=function(){var l=e.$4=new(r("oz-player/shims/OzDeferred"))(r("oz-player/shims/OzMaybeNativePromise")),s=!1,u=!0;try{u=!!e.$3.getBuffered()}catch(e){u=!1}try{if(s=e.$3.getIsUpdating(),u)e.$3.appendBuffer(t,n);else return l.resolve(),l.getPromise()}catch(t){var c=t,d=r("oz-player/utils/OzCustomErrorCode").APPEND_BUFFER_UNKNOWN_ERROR,m=c.name,p=c.message;m==="QuotaExceededError"?d=r("oz-player/utils/OzCustomErrorCode").APPEND_BUFFER_QUOTA_EXCEEDED_ERROR:e.$10.hasError()?d=r("oz-player/utils/OzCustomErrorCode").APPEND_BUFFER_MEDIA_ERROR_ATTRIBUTE_NOT_NULL:s?d=r("oz-player/utils/OzCustomErrorCode").APPEND_BUFFER_SOURCE_BUFFER_UPDATING_ATTRIBUTE_IS_TRUE:m==="InvalidStateError"&&typeof p=="string"&&/SourceBuffer has been removed/.test(p)?d=r("oz-player/utils/OzCustomErrorCode").APPEND_BUFFER_INVALID_STATE_ERROR_SOURCE_BUFFER_HAS_BEEN_REMOVED:m==="InvalidStateError"&&(d=r("oz-player/utils/OzCustomErrorCode").APPEND_BUFFER_INVALID_STATE_ERROR);var _=o("oz-player/utils/OzErrorUtils").createOzError({type:o("oz-player/utils/OzErrorUtils").isOzError(c)?c.getType():m==="QuotaExceededError"?"OZ_SOURCE_BUFFER_QUOTA_EXCEEDED":m==="OZ_SOURCE_BUFFER_CHANGE_TYPE"?"OZ_SOURCE_BUFFER_CHANGE_TYPE":"OZ_SOURCE_BUFFER",description:"SBM#"+e.$1+" appendBuffer("+n+") failed: "+String(p),extra:o("oz-player/utils/OzErrorUtils").isOzError(c)?c.getExtra():{originalError:c,code:d}});e.$4=null,l.reject(_)}var f=l.getPromise();return a&&o("oz-player/loggings/OzLoggingUtils").monitorPromiseAndLogOperation(f,a,"append",function(e){var n;e.setLength(t.byteLength);var r=(n=i==null?void 0:i.appendTarget)!=null?n:null;e.setAppendTarget(r)}),f};return this.$3.getIsUpdating()?this.$22(a).then(l).catch(function(e){throw e}):(this.$14+=t.byteLength,l())},a.$19=function(){var e=this;if(this.$7)return r("oz-player/shims/OzMaybeNativePromise").reject(this.$24("Another unit of queued data is being appended."));var t=this.$8.shift();if(!t)return this.$7=!1,r("oz-player/shims/OzMaybeNativePromise").resolve();var n=t.appendTarget,a=t.clearSourceBufferRange,i=t.data,l=t.deferred,s=t.loggerProvider,u=t.mimeCodecs;this.$7=!0;var c,d=function(){return i instanceof o("oz-player/shims/OzStreams").OzReadableStream?e.$25(i,u,s,n):e.$23(i,u,s,{appendTarget:n})};a?(c=this.$3.getIsUpdating()?this.$22(s):r("oz-player/shims/OzMaybeNativePromise").resolve(),c=c.then(function(){return e.clearRangeWithWait([{fromTime:a[0],toTime:a[1]}])}).then(d)):c=d();var m=o("oz-player/media_source/SourceBufferManagerUtils").startMeasuringAppendedBuffer(this.$11,this.$3,this.$9);return c.catch(function(e){l.reject(e)}).then(function(){var t=m(),n=t.endTime,r=t.startTime;l.resolve({startTime_UNSAFE:r,endTime_UNSAFE:n,appendedSec:n-r}),e.$7=!1,e.$19().catch(function(e){})})},a.$25=function(t,n,a,i){var e=this,l=[],s=0,u=t.getReader(),c=function(){var t=new(r("oz-player/shims/OzDeferred"))(r("oz-player/shims/OzMaybeNativePromise"));return e.$6=t,u.read().then(function(n){t.resolve(n),e.$6=null}).catch(function(n){t.reject(n),e.$6=null}),t.getPromise().then(function(t){if(t.done){var o=r("oz-player/utils/ozConcatUint8Arrays")(l),u=o.buffer;return l.length=0,s=0,u.byteLength>0?e.$23(u,n,a,{appendTarget:i}):r("oz-player/shims/OzMaybeNativePromise").resolve()}var d=t.value,m=d;if(i>0){var p=d instanceof Uint8Array?d:new Uint8Array(d);if(l.push(p),s+=p.byteLength,s>=i){var _=r("oz-player/utils/ozConcatUint8Arrays")(l),f=_.buffer;l.length=0,s=0,m=f}}return m&&m.byteLength>=i?e.$23(m,n,a,{appendTarget:i}).then(function(){return c()}):c()},function(t){if(e.$11.getBool("enable_alternative_audio_tracks"))try{e.$15()==="open"&&(e.$10.hasError()||e.$3.abort())}catch(e){var a=e}else try{e.$3.abort()}catch(e){var i=e}if(typeof t=="object"&&o("oz-player/utils/OzErrorUtils").isOzError(t))return r("oz-player/shims/OzMaybeNativePromise").reject(t);if(typeof t=="object"&&t!=null&&typeof t.name=="string"&&t.name==="TypeError"&&typeof t.message=="string"&&t.message.includes("network error")){var l=o("oz-player/utils/OzErrorUtils").convertPromiseRejectionReasonToOzError(t,{description:"SBM#"+e.$1+" appendReadableStream("+n+") failed: Stream read is interrupted (previously TypeError network error)}",extra:{originalError:t},type:"OZ_NETWORK"});return r("oz-player/shims/OzMaybeNativePromise").reject(l)}var s=o("oz-player/utils/OzErrorUtils").convertPromiseRejectionReasonToOzError(t,{description:"SBM#"+e.$1+" appendReadableStream("+n+") failed: Unexpected error while reading from stream: "+String(t),extra:{originalError:t},type:"OZ_NETWORK"});return r("oz-player/shims/OzMaybeNativePromise").reject(s)})};return c()},a.$24=function(t){var e=this.$2;return e!=null&&e.getOperationLogger("source_buffer_invariant").setError(t).setResult("failed").log(),o("oz-player/utils/OzErrorUtils").createOzError({type:"OZ_SOURCE_BUFFER",description:"SBM invariant: "+t})},a.destroy=function(){var e=this,t=this.$2;t&&t.cloneContext().getOperationLogger("source_buffer_destroy").log();var n=this.$4;n&&(this.$13?n.getPromise().catch(function(){e.$4=null,e.$5.release(),e.$5=new(r("oz-player/shims/OzSubscriptionsHandler"))}):(n.reject(o("oz-player/utils/OzErrorUtils").createOzCancelledError("SBM destroyed")),this.$4=null,this.$5.release(),this.$5=new(r("oz-player/shims/OzSubscriptionsHandler")))),this.$9.destroy()},a.getDebug=function(){return{SourceBuffer:this.$3}},t})();l.default=s}),98); __d("oz-player/shims/www/getOzVTTSourceBufferImplLazyWWW",["JSResourceForInteraction"],(function(t,n,r,o,a,i,l){"use strict";var e=r("JSResourceForInteraction")("OzVTTSourceBufferImpl").__setRef("oz-player/shims/www/getOzVTTSourceBufferImplLazyWWW");function s(){return e.load()}l.default=s}),98); __d("oz-player/shims/www/getOzVTTSourceBufferImplWWW",["oz-player/shims/www/getOzVTTSourceBufferImplLazyWWW"],(function(t,n,r,o,a,i,l){"use strict";l.default=r("oz-player/shims/www/getOzVTTSourceBufferImplLazyWWW")}),98); __d("oz-player/shims/getOzVTTSourceBufferImpl",["oz-player/shims/www/getOzVTTSourceBufferImplWWW"],(function(t,n,r,o,a,i,l){"use strict";l.default=r("oz-player/shims/www/getOzVTTSourceBufferImplWWW")}),98); __d("oz-player/shims/www/ozClearTimeoutWWW",["clearTimeout"],(function(t,n,r,o,a,i,l){"use strict";l.default=r("clearTimeout")}),98); __d("oz-player/shims/ozClearTimeout",["oz-player/shims/www/ozClearTimeoutWWW"],(function(t,n,r,o,a,i,l){"use strict";l.default=r("oz-player/shims/www/ozClearTimeoutWWW")}),98); __d("oz-player/shims/www/ozSetTimeoutAcrossTransitionsWWW",["setTimeoutAcrossTransitions"],(function(t,n,r,o,a,i,l){"use strict";l.default=r("setTimeoutAcrossTransitions")}),98); __d("oz-player/shims/ozSetTimeoutAcrossTransitions",["oz-player/shims/www/ozSetTimeoutAcrossTransitionsWWW"],(function(t,n,r,o,a,i,l){"use strict";l.default=r("oz-player/shims/www/ozSetTimeoutAcrossTransitionsWWW")}),98); __d("oz-player/shims/www/ozThrottleWWW",["throttle"],(function(t,n,r,o,a,i,l){"use strict";l.default=r("throttle")}),98); __d("oz-player/shims/ozThrottle",["oz-player/shims/www/ozThrottleWWW"],(function(t,n,r,o,a,i,l){"use strict";l.default=r("oz-player/shims/www/ozThrottleWWW")}),98); __d("oz-player/utils/ozGetErrorNameFromMediaErrorCode",[],(function(t,n,r,o,a,i){"use strict";function e(e){switch(e){case 1:return"MEDIA_ERR_ABORTED";case 2:return"MEDIA_ERR_NETWORK";case 3:return"MEDIA_ERR_DECODE";case 4:return"MEDIA_ERR_SRC_NOT_SUPPORTED";default:}return"MEDIA_ERR_UNKNOWN"}i.default=e}),66); __d("oz-player/media_source/MediaSourceManager",["oz-player/loggings/OzMultiDestinationPerfLogger","oz-player/media_source/OzMSESourceBufferImpl","oz-player/media_source/OzMediaErrorProvider","oz-player/media_source/SourceBufferManager","oz-player/shims/OzDOMEventListener","oz-player/shims/OzDeferred","oz-player/shims/OzMaybeNativePromise","oz-player/shims/OzSubscriptionsHandler","oz-player/shims/getOzVTTSourceBufferImpl","oz-player/shims/ozClearTimeout","oz-player/shims/ozReportUnexpectedError","oz-player/shims/ozSetTimeoutAcrossTransitions","oz-player/shims/ozThrottle","oz-player/utils/OzCustomErrorCode","oz-player/utils/OzErrorEmitter","oz-player/utils/OzErrorUtils","oz-player/utils/OzMimeUtil","oz-player/utils/ozGetErrorNameFromMediaErrorCode"],(function(t,n,r,o,a,i,l){"use strict";var e=(function(){function e(e){var t=this,n=e.videoNode,a=e.config,i=e.perfLoggerProvider,l=i===void 0?new(o("oz-player/loggings/OzMultiDestinationPerfLogger")).OzMultiDestinationPerfLoggerProvider([]):i,s=e.isChangeTypeSupported,u=e.useManagedMediaSource,c=e.handleVttCaptionsUpdated,d=e.onClearVideoNodeError,m=e.onRetryVideoElementError;this.$3=new(r("oz-player/shims/OzSubscriptionsHandler")),this.$4=new(r("oz-player/shims/OzSubscriptionsHandler")),this.$6=[],this.$7=new Map,this.$8=[],this.$10=!1,this.$12=!1,this.$13=!1,this.$14=!1,this.$15=!1,this.$18=null,this.$19=null,this.$20=new(r("oz-player/utils/OzErrorEmitter")),this.$22="undetected",this.$23=!1,this.$24=!1,this.$31=function(){if(t.$34()||(t.$10=!1),!!t.$35()){var e=t.$8.shift();e&&(e(t.$2),t.$10=!0)}},this.$5=l,this.$11=a,this.$1=n,this.$21=c,this.$16=d,this.$17=m,this.$23=s,this.$24=u,this.$9=new(r("oz-player/media_source/OzMediaErrorProvider"))(this.$1),this.$3.addSubscriptions(r("oz-player/shims/OzDOMEventListener").listenDOMEvent(this.$1,"error",function(){var e;t.$5.getOperationLogger("media_element_error").setError((e=t.$9.getMediaErrorName())!=null?e:void 0).setCode(t.$9.getErrorCode()).setResult("failed").setUserInfo({av1HardwareSupport:t.$22}).log(),t.$8=[],t.$6=[],t.$4.release(),t.$4=new(r("oz-player/shims/OzSubscriptionsHandler")),t.$15=t.$15||t.$14||t.$13;var n=t.$1.error,a=(n==null?void 0:n.code)||0,i=!n&&t.$1.poster!=null&&t.$1.poster!=="",l=o("oz-player/utils/OzErrorUtils").createOzError({type:i?"OZ_POSSIBLE_POSTER_LOAD_FAILURE":r("oz-player/utils/ozGetErrorNameFromMediaErrorCode")(a),description:(n==null?void 0:n.message)!=null?n.message:"",extra:{originalError:n,code:String(a)}});if(t.$19!=null){t.$5.getOperationLogger("media_element_error").setError(n).setCode(a).setReason("mitigation_failed").setResult("failed").setUserInfo({av1HardwareSupport:t.$22}).log(),t.$20.emitError(l);return}t.$19=t.$1.currentTime,t.$18==null&&(t.$18=r("oz-player/shims/ozSetTimeoutAcrossTransitions")(function(){t.$18=null,t.$11.getBool("retry_video_element_error")&&(t.$17!=null&&t.$17(l),t.$25())},0))}),r("oz-player/shims/OzDOMEventListener").listenDOMEvent(this.$1,"play",function(){t.$14=!0}),r("oz-player/shims/OzDOMEventListener").listenDOMEvent(this.$1,"playing",function(){t.$14=!1,t.$15=!1,t.$19=null,t.$13=!0}),r("oz-player/shims/OzDOMEventListener").listenDOMEvent(this.$1,"pause",function(){t.$14=!1,t.$13=!1,t.$15=!!t.$1.error}),r("oz-player/shims/OzDOMEventListener").listenDOMEvent(this.$1,"ended",function(){t.$14=!1,t.$13=!1})),this.$2=this.$26(),this.$5.getOperationLogger("media_source_new").log(),this.$3.addSubscriptions(r("oz-player/shims/OzDOMEventListener").listenDOMEvent(this.$2,"sourceopen",function(){t.$5.getOperationLogger("media_source_open").log()}),r("oz-player/shims/OzDOMEventListener").listenDOMEvent(this.$2,"sourceended",function(){t.$5.getOperationLogger("media_source_ended").log()}),r("oz-player/shims/OzDOMEventListener").listenDOMEvent(this.$2,"sourceclose",function(){t.$5.getOperationLogger("media_source_close").log()})),this.$27(this.$2)}var t=e.prototype;return t.$26=function(){return this.$24?new ManagedMediaSource:new MediaSource},t.$27=function(t){var e=this.$1,n=e.src;n!==""&&URL.revokeObjectURL(n),t?(this.$24&&(e.disableRemotePlayback=!0),e.src=URL.createObjectURL(t)):(e.removeAttribute("src"),e.removeAttribute("srcObject"))},t.$25=function(){var e=this;this.$7.forEach(function(e){e.cancelOperationAndCleanQueue()}),this.$2=this.$26(),this.$27(this.$2),this.$7.forEach(function(e,t){e.setSourceBuffer(null)});var t=this.$28().then(function(){var t=[];return e.$7.forEach(function(n,r){var o=e.$29(r).then(function(t){n.setSourceBuffer(t),e.$30(t,r)});t.push(o)}),r("oz-player/shims/OzMaybeNativePromise").all(t)});t.then(function(){if(e.$16&&e.$16(),e.$19!=null&&(e.$1.currentTime=e.$19),e.$15){var t=e.$1.play();return t==null?void 0:t.catch(function(){})}}).catch(function(t){e.$20.emitError(t)})},t.$28=function(){var e=this;if(this.$11.getBool("msm_refactor_wait_for_sourceopen")){if(this.$2.readyState==="open")return r("oz-player/shims/OzMaybeNativePromise").resolve();var t=new(r("oz-player/shims/OzDeferred"))(r("oz-player/shims/OzMaybeNativePromise")),n=r("oz-player/shims/OzDOMEventListener").listenDOMEvent(this.$2,"sourceopen",function(){n.remove(),t.resolve(),e.$31()});return this.$3.addSubscriptions(n),t.getPromise()}else{if(this.$2.readyState==="open")return r("oz-player/shims/OzMaybeNativePromise").resolve();var o=new(r("oz-player/shims/OzDeferred"))(r("oz-player/shims/OzMaybeNativePromise"));return this.$3.addSubscriptions(r("oz-player/shims/OzDOMEventListener").listenDOMEvent(this.$2,"sourceopen",function(){o.resolve(),e.$31()})),o.getPromise()}},t.$29=function(t){var e=this;if(this.$11.getBool("msm_refactor_wait_for_sourceopen"))return r("oz-player/shims/OzMaybeNativePromise").resolve().then(function(){return e.$32(t)}).catch(function(e){var n=o("oz-player/utils/OzErrorUtils").createOzError({type:"OZ_SOURCE_BUFFER",description:'Failed to addSourceBuffer("'+t+'"): '+String(e),extra:{originalError:e,code:r("oz-player/utils/OzCustomErrorCode").SOURCE_BUFFER_MANAGER_ADD_SOURCE_BUFFER_ERROR.toString()}});throw n});try{return this.$32(t)}catch(e){var n=o("oz-player/utils/OzErrorUtils").createOzError({type:"OZ_SOURCE_BUFFER",description:'Failed to addSourceBuffer("'+t+'"): '+(e.message||String(e)),extra:{originalError:e,code:r("oz-player/utils/OzCustomErrorCode").SOURCE_BUFFER_MANAGER_ADD_SOURCE_BUFFER_ERROR.toString()}});throw n}},t.$32=function(t){var e=this;{var n;return t.includes("vtt")?n=this.$33(t):n=this.$28().then(function(){return new(r("oz-player/media_source/OzMSESourceBufferImpl"))(e.$2.addSourceBuffer(t),t,e.$11,e.$23)}),n.then(function(n){return e.$6.push(n),n.registerOnUpdateListener(function(){e.$5.cloneContext().getOperationLogger("source_buffer_update_start").setType(o("oz-player/utils/OzMimeUtil").getMimeType(t)).setMediaSourceSourceBuffer(o("oz-player/utils/OzMimeUtil").getMimeType(t),n).setType(o("oz-player/utils/OzMimeUtil").getMimeType(t)).log()}),e.$5.getOperationLogger("add_source_buffer").setMediaSourceSourceBuffer(o("oz-player/utils/OzMimeUtil").getMimeType(t),n).log(),n})}},t.$30=function(t,n){var e=this;this.$4.addSubscriptions(t.registerOnUpdateEndListener(function(){e.$31()}))},t.$33=function(t){var e=this;return r("oz-player/shims/getOzVTTSourceBufferImpl")().then(function(n){if(e.$21!=null){var a=new n({onCaptionsChanged:e.$21,config:e.$11}),i=r("oz-player/shims/ozThrottle")(function(){a.setCurrentVideoTime(e.$1.currentTime)},200);return e.$3.addSubscriptions(r("oz-player/shims/OzDOMEventListener").listenDOMEvent(e.$1,"timeupdate",function(){i()}),{remove:function(){i=function(){}}}),a}else throw o("oz-player/utils/OzErrorUtils").createOzError({type:"OZ_SOURCE_BUFFER",description:'Failed to addSourceBuffer("'+t+'"): No handleVttCaptionsUpdated callback provided',extra:{code:r("oz-player/utils/OzCustomErrorCode").SOURCE_BUFFER_MANAGER_ADD_SOURCE_BUFFER_ERROR.toString()}})})},t.createSourceBufferManager=function(t,n,a,i){var e=this;return(this.$11.getBool("msm_refactor_wait_for_sourceopen")?this.$29(n).then(function(e){return[void 0,e]}):r("oz-player/shims/OzMaybeNativePromise").all([this.$28(),this.$29(n)])).then(function(a){var i=a[0],l=a[1],s=new(r("oz-player/media_source/SourceBufferManager"))(t,l,e.$11,e.$9,function(){return e.$2.readyState},e.$5.cloneContext().setType(o("oz-player/utils/OzMimeUtil").getMimeType(n)));return e.$30(l,n),e.$7.set(n,s),s}).catch(function(n){var a=o("oz-player/utils/OzErrorUtils").isOzError(n)?n.getExtra():void 0,i=a==null?void 0:a.code,l=o("oz-player/utils/OzErrorUtils").isOzError(n)?""+n.getType()+(i!=null?"#"+i:"")+": "+n.getDescription():String(n),s=o("oz-player/utils/OzErrorUtils").createOzError({type:"OZ_SOURCE_BUFFER",description:"Failed to create SBM#"+t+": "+l+", support AAC-LC="+(e.$2.constructor.isTypeSupported("audio/mp4; codecs=mp4a.40.2")?"true":"false")+", readyState="+e.$2.readyState,extra:babelHelpers.extends({},a,{originalError:n,code:r("oz-player/utils/OzCustomErrorCode").SOURCE_BUFFER_MANAGER_CREATE_ERROR.toString()})});throw s})},t.getReadyState=function(){return this.$2.readyState},t.getMediaSource=function(){return this.$2},t.notifyEndOfStream=function(t,n){var e=this,o=new(r("oz-player/shims/OzDeferred"))(r("oz-player/shims/OzMaybeNativePromise"));return this.$3.addSubscriptions(r("oz-player/shims/OzDOMEventListener").listenDOMEvent(this.$2,"sourceended",function(){o.resolve()})),this.$8.push(function(r){if(r.readyState==="open"){var o=e.$5.getOperationLogger("end_of_stream");o.setInitiator(t).setReason(n),o.log(),r.endOfStream()}}),this.$31(),o.getPromise()},t.updateDuration=function(t,n){var e=this,a=this.$2.duration;Number.isFinite(a)&&(!n||a>=t)||(this.$8.push(function(n){n.duration!==a&&!(isNaN(n.duration)&&isNaN(a))&&r("oz-player/shims/ozReportUnexpectedError")(o("oz-player/utils/OzErrorUtils").createOzError({type:"OZ_SOURCE_BUFFER",description:"mediaSource duration discrepancy: "+n.duration+" != "+a}),"MediaSourceManager updateDuration","warn");var i=e.$11.getBool("msm_refactor_wait_for_sourceopen")?n.duration!==1/0&&t0){var n=this.$4(),o=n.bandwidth.length,a=n.navigationTiming.length,i={bandwidth:n.bandwidth.slice(Math.max(0,o-t),o),navigationTiming:n.navigationTiming.slice(Math.max(0,a-t),a)};r("oz-player/shims/OzCacheStorage").set(this.$2,e.serialize(i))}},e.deserialize=function(t){var e={};try{e=JSON.parse(t)}catch(e){}return typeof e=="object"&&Array.isArray(e.b)&&Array.isArray(e.t)?{bandwidth:e.b.reduce(function(e,t){return typeof t.b=="number"&&typeof t.t=="number"&&typeof t.s=="number"&&e.push({bytes:t.b,timeInMs:t.t,timestamp:t.s}),e},[]),navigationTiming:e.t.reduce(function(e,t){return typeof t.t=="number"&&typeof t.s=="number"&&(typeof t.l=="number"&&typeof t.b=="number"?e.push({timeToFirstByteMs:t.t,timeToLastByteMs:t.l,bytes:t.b,timestamp:t.s}):e.push({timeToFirstByteMs:t.t,timeToLastByteMs:0,bytes:0,timestamp:t.s})),e},[])}:null},e.serialize=function(t){var e={b:t.bandwidth.map(function(e){return{b:e.bytes,s:e.timestamp,t:e.timeInMs}}),t:t.navigationTiming.map(function(e){return{s:e.timestamp,t:e.timeToFirstByteMs,l:e.timeToLastByteMs,b:e.bytes}})};return JSON.stringify(e)},e})();l.default=e}),98); __d("oz-player/networks/OzBandwidthUtils",[],(function(t,n,r,o,a,i){"use strict";var e=.3,l=3,s=50,u=10,c=5,d=new Map([["51",.03],["52",.06],["53",.08],["54",.1],["55",.13],["56",.16],["57",.18],["58",.2],["59",.23],["60",.26],["61",.28],["62",.31],["63",.33],["64",.36],["65",.39],["66",.42],["67",.44],["68",.47],["69",.5],["70",.53],["71",.56],["72",.59],["73",.62],["74",.65],["75",.68],["76",.71],["77",.74],["78",.78],["79",.81],["80",.85],["81",.88],["82",.92],["83",.96],["84",1],["85",1.04],["86",1.08],["87",1.13],["88",1.18],["89",1.23],["90",1.28],["91",1.34],["92",1.41],["93",1.48],["94",1.56],["95",1.65],["96",1.76],["97",1.89],["98",2.06],["99",2.33]]);function m(e,t,n,r){if(e.length===0)return null;var o=_(e),a=h(e,t),i=a.average,l=a.totalWeight,d=u,m=c,p=s;if(n.length>0){d=f(n.map(function(e){return e.timeToFirstByteMs}));var y=g(n.map(function(e){return{value:e.timeToFirstByteMs,weight:1}}),r);p=y.average,m=y.totalWeight}return{bandwidthEstimate:i,bandwidthStandardDeviation:o,bandwidthTotalWeight:l,timeToFirstByteMsEstimate:p,timeToFirstByteMsStandardDeviation:d,timeToFirstByteMsTotalWeight:m}}function p(e){for(var t=0,n=0;n0&&t!=null&&Date.now()-t0){this.$1=!0;var e=this.$4.getCachedSamples();e!=null&&(this.$2=e.bandwidth,this.$3=e.navigationTiming)}return{recentBandwidthSamples:this.$2,recentNavigationTimingSamples:this.$3}},t.addBandwidthSample=function(t,n){this.$2.push(babelHelpers.extends({},t,{timestamp:n!=null?n:Date.now()})),this.$2.length>r("oz-player/configs/OzGlobalConfig").getNumber("max_bandwidth_sample_count",30)&&this.$2.shift()},t.addNavigationTimingSample=function(t,n){this.$3.push(babelHelpers.extends({},t,{timestamp:n!=null?n:Date.now()})),this.$3.length>r("oz-player/configs/OzGlobalConfig").getNumber("max_bandwidth_sample_count",30)&&this.$3.shift()},e})();l.default=e}),98); __d("oz-player/networks/OzBandwidthEstimatorBase",["oz-player/configs/OzGlobalConfig","oz-player/networks/OzBandwidthCache","oz-player/networks/OzBandwidthUtils","oz-player/networks/OzNetworkSamples","oz-player/shims/OzEventEmitter","oz-player/utils/OzErrorUtils"],(function(t,n,r,o,a,i,l){"use strict";var e=1e6,s="bandwidthEstimate",u="bandwidthAndTTFBSamples",c=(function(t){function n(){var e;return e=t.call(this)||this,e.$OzBandwidthEstimatorBase$p_2=new(r("oz-player/networks/OzNetworkSamples")),e.$OzBandwidthEstimatorBase$p_1=new(r("oz-player/networks/OzBandwidthCache"))(s,u,function(){return e.getAdjustedBandwidth(r("oz-player/configs/OzGlobalConfig"))},function(){return{bandwidth:e.$OzBandwidthEstimatorBase$p_2.getRecentBandwidthSamples(),navigationTiming:e.$OzBandwidthEstimatorBase$p_2.getRecentNavigationTimingSamples()}}),e.$OzBandwidthEstimatorBase$p_2.setBandwidthCache(e.$OzBandwidthEstimatorBase$p_1),e}babelHelpers.inheritsLoose(n,t);var a=n.prototype;return a.getNetworkSamples=function(){return this.$OzBandwidthEstimatorBase$p_2},a.getStandardDeviationOfBandwidth=function(){return o("oz-player/networks/OzBandwidthUtils").getStandardDeviationOfBandwidth(this.$OzBandwidthEstimatorBase$p_2.getRecentBandwidthSamples())},a.getSampleCount=function(){return this.$OzBandwidthEstimatorBase$p_2.getRecentBandwidthSamples().length},a.getAdjustedBandwidth=function(t){return this.$OzBandwidthEstimatorBase$p_2.getRecentBandwidthSamples().length===0?this.getDefaultEstimate(t):this.$OzBandwidthEstimatorBase$p_3(t)},a.getBandwidthDiagnostics=function(t){throw o("oz-player/utils/OzErrorUtils").createOzError({type:"OZ_NOT_IMPLEMENTED_ERROR",description:"must be implementd by subclasses"})},a.getBandwidth=function(t){throw o("oz-player/utils/OzErrorUtils").createOzError({type:"OZ_NOT_IMPLEMENTED_ERROR",description:"must be implementd by subclasses"})},a.getBandwidthDiagnosticsFromHeaders=function(t){var e=this.getBandwidthDiagnostics(t);if(e==null)return null;var n=this.$OzBandwidthEstimatorBase$p_2.getBandwidthEstimateFromHeaders();if(n==null)return e;var r,o,a;if(e!=null)r=e.timeToFirstByteMsEstimate,o=e.timeToFirstByteMsStandardDeviation,a=e.timeToFirstByteMsTotalWeight;else return null;return{bandwidthEstimate:n.meanEstimate,bandwidthStandardDeviation:1,bandwidthTotalWeight:1,timeToFirstByteMsEstimate:r,timeToFirstByteMsStandardDeviation:o,timeToFirstByteMsTotalWeight:a}},a.getDefaultEstimate=function(n){var t,r,o=this.$OzBandwidthEstimatorBase$p_1.getCachedBandwidth();if(typeof o=="number"&&o>0)return o;var a=((t=(r=window.navigator)==null||(r=r.connection)==null?void 0:r.downlink)!=null?t:0)*1e6,i=a>0?a:n.getNumber("default_bandwidth_estimate",e);return i},a.$OzBandwidthEstimatorBase$p_3=function(t){return this.getBandwidth(t)},a.addBandwidthSample=function(t,n,r){this.$OzBandwidthEstimatorBase$p_2.addBandwidthSample({bytes:t,timeInMs:n},r),this.emit("bandwidth_sampled")},a.addNavigationTimingSample=function(t,n,r,o){var e={timeToFirstByteMs:t,timeToLastByteMs:n,bytes:r};this.$OzBandwidthEstimatorBase$p_2.addNavigationTimingSample(e,o)},a.setBandwidthEstimateFromHeaders=function(t){this.$OzBandwidthEstimatorBase$p_2.setBandwidthEstimateFromHeaders(t)},a.hasRecentBandwidthEstimateFromHeader=function(){return this.getNetworkSamples().hasRecentBandwidthEstimateFromHeader()},n})(r("oz-player/shims/OzEventEmitter"));l.default=c}),98); __d("oz-player/networks/OzBandwidthEstimator",["oz-player/networks/OzBandwidthEstimatorBase","oz-player/networks/OzBandwidthUtils"],(function(t,n,r,o,a,i,l){"use strict";var e=(function(e){function t(){return e.apply(this,arguments)||this}babelHelpers.inheritsLoose(t,e);var n=t.prototype;return n.getBandwidthDiagnostics=function(t){return o("oz-player/networks/OzBandwidthUtils").getBandwidthDiagnostics(this.getNetworkSamples().getRecentBandwidthSamples(),t.getNumber("bandwidth_estimator_half_life",6),this.getNetworkSamples().getRecentNavigationTimingSamples(),t.getNumber("time_to_first_byte_estimate_half_life_ms",500))},n.getBandwidth=function(t){var e=o("oz-player/networks/OzBandwidthUtils").getBandwidthEstimate(this.getNetworkSamples().getRecentBandwidthSamples(),t.getNumber("bandwidth_estimator_half_life",6),t.getNumber("bandwidth_estimator_outlier_exclusion_factor",50),t.getNumber("bandwidth_estimator_std_dev_penalty_factor",0));return e>0?e:this.getDefaultEstimate(t)},t})(r("oz-player/networks/OzBandwidthEstimatorBase")),s=new e,u=s;l.default=u}),98); __d("oz-player/networks/OzClientClock",["oz-player/shims/OzPerformance","oz-player/utils/OzResourceTimingUtils"],(function(t,n,r,o,a,i,l){"use strict";function e(e){if(e!==null){var t=parseInt(e,10);if(!isNaN(t))return t}return null}var s=(function(){function t(){this.$1=null,this.$2=0,this.$2=Date.now()-r("oz-player/shims/OzPerformance").now()}var n=t.prototype;return n.updateOffsetFromHeaderResponse=function(n,r){var t=e(r.get("x-fb-dynamic-server-wallclock-ms")),a=e(r.get("x-fb-dynamic-rtt-ms")),i=o("oz-player/utils/OzResourceTimingUtils").getLatestResourceTimingEntry(n);if(t!==null&&a!==null&&i!=null&&i.responseStart>0&&i.duration>10){var l=i.requestStart+this.$2,s=t-l-a/2;this.$1=s}},n.now=function(){var e;return r("oz-player/shims/OzPerformance").now()+this.$2+((e=this.$1)!=null?e:0)},n.getClientClockOffsetMs=function(){return this.$1},t})(),u=new s;l.default=u}),98); __d("oz-player/networks/OzCreateErrorStream",["oz-player/shims/OzStreams"],(function(t,n,r,o,a,i,l){"use strict";function e(e){return new(o("oz-player/shims/OzStreams")).OzReadableStream({pull:function(n){n.error(e)}})}l.default=e}),98); __d("oz-player/shims/OzFetchAPI",[],(function(t,n,r,o,a,i){"use strict";var e=function(n,r){return t.fetch(n,r)},l=function(n,r){return new t.Response(n,r)};i.fetch=e,i.Response=l}),66); __d("oz-player/networks/FetchWithTimeout",["oz-player/shims/OzFetchAPI","oz-player/shims/ozClearTimeout","oz-player/shims/ozSetTimeoutAcrossTransitions"],(function(t,n,r,o,a,i,l){"use strict";function e(e,n,a,i){var l=null,s;if("AbortController"in t&&a!=null&&a!=0){var u=new AbortController;l=r("oz-player/shims/ozSetTimeoutAcrossTransitions")(function(){return u.abort()},a),s=babelHelpers.extends({},n,{signal:u.signal})}else s=babelHelpers.extends({},n);return i!=null&&(s=babelHelpers.extends({},s,{referrer:i})),o("oz-player/shims/OzFetchAPI").fetch(e,s).then(function(e){return r("oz-player/shims/ozClearTimeout")(l),e})}l.default=e}),98); __d("oz-player/utils/maybeConvertReadableStreamToOzReadableStream",["asyncToGeneratorRuntime","oz-player/shims/OzStreams"],(function(t,n,r,o,a,i,l){"use strict";function e(e){if(!o("oz-player/shims/OzStreams").OzReadableStreamIsPolyfilled)return e;var t=e.getReader();return new(o("oz-player/shims/OzStreams")).OzReadableStream({start:(function(){var e=n("asyncToGeneratorRuntime").asyncToGenerator(function*(e){for(;;){var n=yield t.read();if(n.done)break;e.enqueue(n.value)}e.close()});function r(t){return e.apply(this,arguments)}return r})()})}l.default=e}),98); __d("oz-player/utils/processFetchResponse",["oz-player/networks/OzHTTPHeaders","oz-player/shims/OzMaybeNativePromise","oz-player/utils/arrayBuffer2OzReadableStream","oz-player/utils/maybeConvertReadableStreamToOzReadableStream"],(function(t,n,r,o,a,i,l){"use strict";function e(e){var t=e.body,n=e.headers,a=e.ok,i=e.status;return t!=null?r("oz-player/shims/OzMaybeNativePromise").resolve({ok:a,status:i,headers:o("oz-player/networks/OzHTTPHeaders").maybeConvertHeadersToOzHTTPHeaders(n),body:r("oz-player/utils/maybeConvertReadableStreamToOzReadableStream")(t),arrayBuffer:function(){return e.arrayBuffer()}}):e.arrayBuffer().then(function(e){return{ok:a,status:i,headers:o("oz-player/networks/OzHTTPHeaders").maybeConvertHeadersToOzHTTPHeaders(n),body:r("oz-player/utils/arrayBuffer2OzReadableStream")(e),arrayBuffer:function(){return r("oz-player/shims/OzMaybeNativePromise").resolve(e)}}})}l.default=e}),98); __d("oz-player/networks/OzFetchRequestImplementation",["oz-player/networks/FetchWithTimeout","oz-player/utils/processFetchResponse"],(function(t,n,r,o,a,i,l){"use strict";function e(e,t,n,o,a,i,l,s){var u=n?n.networkTimeoutMs:null,c=r("oz-player/networks/FetchWithTimeout")(e,t,u);return c.then(function(e){var t=e.headers,n=e.ok,a=e.status;return o!=null&&!n&&typeof e.text=="function"?e.text().then(function(r){return{ok:n,status:a,headers:t,body:r,arrayBuffer:function(){return e.arrayBuffer()}}}):r("oz-player/utils/processFetchResponse")(e)})}var s=e,u=s;l.default=u}),98); __d("oz-player/networks/withRetries",["Promise","asyncToGeneratorRuntime","oz-player/shims/ozSetTimeoutAcrossTransitions"],(function(t,n,r,o,a,i,l){"use strict";var e;function s(t,o,a){return new(e||(e=n("Promise")))(function(e,i){function l(e){return s.apply(this,arguments)}function s(){return s=n("asyncToGeneratorRuntime").asyncToGenerator(function*(n){try{e(yield t())}catch(e){if(n>0){var s=typeof a=="function"?a(o-n):a;r("oz-player/shims/ozSetTimeoutAcrossTransitions")(function(){l(n-1)},s)}else i(e)}}),s.apply(this,arguments)}l(o)})}l.default=s}),98); __d("oz-player/networks/OzFetchWithCache",["oz-player/networks/OzFetchRequestImplementation","oz-player/networks/withRetries","oz-player/shims/OzMaybeNativePromise","oz-player/utils/OzErrorUtils","oz-player/utils/arrayBuffer2OzReadableStream","oz-player/utils/processFetchResponse"],(function(t,n,r,o,a,i,l){"use strict";function e(e){var t=e.config,n=e.dataAppendedCallback,a=e.dataAppendedErrorCallback,i=e.http,l=e.mediaStreamType,s=e.onPerfEntryAvailable,u=e.options,c=e.overrideOzRequestImplementation,d=e.prefetchCache,m=e.url,p=c!=null?function(){return c.apply(void 0,arguments)}:r("oz-player/networks/OzFetchRequestImplementation"),_=d?d.getCacheValue(m):null,f=_,g=!1,h;if(f)g=!0,h=f.then(function(e){if(e.initiator==="FETCH"){var t=e.response,n=t.headers,a=t.ok,i=t.status;return!a&&typeof e.response.text=="function"?e.response.text().then(function(t){return{ok:!1,status:i,headers:n,body:t,arrayBuffer:function(){return e.response.arrayBuffer()}}}):r("oz-player/utils/processFetchResponse")(e.response)}else if(e.initiator==="XHR_REQUEST"){var l=r("oz-player/utils/arrayBuffer2OzReadableStream")(e.response);return{body:l,status:200,headers:null,ok:!0,arrayBuffer:function(){return r("oz-player/shims/OzMaybeNativePromise").resolve(e.response)}}}else throw o("oz-player/utils/OzErrorUtils").createOzError({type:"OZ_UNEXPECTED_CACHE_INITIATOR",description:"Unable to handle request initiator: "+e.initiator})}).catch(function(e){return p(m,i,null,null,l,s,n,a)});else{var y,C=(y=u==null?void 0:u.retryAttempts_SIDX_USE_ONLY)!=null?y:0;if(C>0){var b,v=(b=u==null?void 0:u.retryTimeoutMs_SIDX_USE_ONLY)!=null?b:100;h=r("oz-player/networks/withRetries")(function(){return p(m,i,u,t,l,s,n,a)},C,v)}else h=p(m,i,u,t,l,s,n,a)}return{promise:h,retrievedFromCache:g}}l.default=e}),98); __d("oz-player/utils/OzVideoUrlUtils",[],(function(t,n,r,o,a,i){"use strict";var e=-2147483648,l=~e,s=e+1;function u(e){var t=e|0;return Math.max(s,Math.min(t,l))}function c(e){var t=Number.parseInt(e,16);return Number.isFinite(t)?new Date(u(t)*1e3):null}function d(){return u(Date.now()/1e3)}var m={OE:"oe",OE2:"oe2",ODM:"odm",USS:"uss"};function p(e){var t=e instanceof URL?e.searchParams:new URL(e).searchParams,n=t.get(m.OE),r=n==null?void 0:c(n);return{expirationDate:r}}function _(e){var t=e instanceof URL?e.searchParams:new URL(e).searchParams;return t.get(m.OE2)!==null||t.get(m.ODM)!==null||t.get(m.USS)!==null}function f(e){var t=p(e),n=t.expirationDate;return n!=null&&n<=new Date(d()*1e3)}i.DEFAULT_UNIXTIME=e,i.MAX_INT=l,i.parseCdnUrlParams=p,i.isShortenedExpiryTimestampCdnUrl=_,i.isCdnUrlExpired=f}),66); __d("oz-player/networks/OzNetworkRequestStream",["Promise","oz-player/networks/OzCreateErrorStream","oz-player/networks/OzFetchWithCache","oz-player/shims/OzURI","oz-player/shims/ozvariant","oz-player/utils/OzCustomErrorCode","oz-player/utils/OzErrorUtils","oz-player/utils/OzResourceTimingUtils","oz-player/utils/OzVideoUrlUtils"],(function(t,n,r,o,a,i,l){"use strict";var e,s=(function(){function t(e){this.$8=!1,this.$10="auto";var t=e.baseUri,n=e.baseUriDecisionTime,r=e.config,o=e.dataAppendedCallback,a=e.dataAppendedErrorCallback,i=e.debugName,l=e.dynamicVideoLibrary,s=e.mediaStreamType,u=e.networkRequestFetchPriority,c=e.networkRequestStreamHandlers,d=e.networkRequestStreamRetryHandler,m=e.networkRequestUrlRefreshHandler,p=e.options,_=e.overrideOzRequestImplementation,f=e.prefetchCache,g=e.requestParamCreator;this.$1=i,this.$2=t,this.$3=p,this.$4=g,this.$11=c!=null?c:[],this.$10=u,this.$12=d,this.$13=m,this.$9=_,this.$14=f,this.$15=r,this.$16=l,this.$17=n,this.$18=s,this.$19=o,this.$20=a}var a=t.prototype;return a.$21=function(t){var e=this,n=this.$4.createRequestParam(this.$2,t,this.$10),o=n.http,a=n.uri,i=a.toString();this.$5=i;var l=r("oz-player/networks/OzFetchWithCache")({config:this.$15,url:i,http:o,overrideOzRequestImplementation:this.$9,options:this.$3,prefetchCache:this.$14,mediaStreamType:this.$18,onPerfEntryAvailable:function(n){e.$22(n)},dataAppendedCallback:this.$19,dataAppendedErrorCallback:this.$20}),s=l.promise,u=l.retrievedFromCache;return this.$8=u,{requestPromise:s,requestUrl:i}},a.startStream=function(t){var e=this;return this.$23().then(function(){if(e.$15.getBool("video_cdn_url_refresh")&&!o("oz-player/utils/OzVideoUrlUtils").isShortenedExpiryTimestampCdnUrl(e.$2.toString())&&o("oz-player/utils/OzVideoUrlUtils").isCdnUrlExpired(e.$2.toString()))return r("oz-player/networks/OzCreateErrorStream")(o("oz-player/utils/OzErrorUtils").createOzNetworkError({description:"OzNetworkRequestStream("+e.$1+") CDN URL expired.",responseStatus:0,responseHeaders:null,requestUrl:e.$2.toString()}));var n=e.$21(t),a=n.requestPromise,i=n.requestUrl,l=i,s=Date.now();return a.then(function(n){var a;return(a=e.$16)==null||a.updateWithResponse(i,s,e.$17,n),e.$7=n,e.$12!=null&&n.ok===!1?e.$12(n,function(){var n=e.$21(t),r=n.requestPromise,o=n.requestUrl;return l=o,r},l).catch(function(e){throw o("oz-player/utils/OzErrorUtils").createOzError({type:"OZ_NETWORK_REQUEST_STREAM_RETRY_HANDLER_ERROR",description:String(e),extra:{originalError:e,code:r("oz-player/utils/OzCustomErrorCode").NETWORK_REQUEST_STREAM_RETRY_HANDLER_ERROR,url:l}})}):n}).then(function(t){for(var n=[],a=0;a=e.startByte}function u(e,t){var n=e,r=t;if(r.startByten.endByte+1)return null;var a=r.endByte==null||r.endByte>n.endByte?r.endByte:n.endByte;return{startByte:n.startByte,endByte:a}}function c(e,t){return t.endByte==null?null:e.startByte>t.endByte?{startByte:e.startByte,endByte:e.endByte}:e.endByte!=null&&e.endByte<=t.endByte?null:{startByte:t.endByte+1,endByte:e.endByte}}function d(e){return e.endByte==null?null:e.endByte-e.startByte+1}i.startsAtSame=e,i.startsImmediateAfter=l,i.startsDuring=s,i.union=u,i.disjoinAfter=c,i.getLength=d}),66); __d("oz-player/networks/OzProducerInterruptedError",[],(function(t,n,r,o,a,i){"use strict";var e=(function(e){function t(){return e.apply(this,arguments)||this}return babelHelpers.inheritsLoose(t,e),t})(babelHelpers.wrapNativeSuper(Error));i.default=e}),66); __d("oz-player/networks/OzDeferredBuffer",["oz-player/networks/OzProducerInterruptedError","oz-player/shims/OzDeferred","oz-player/shims/OzMaybeNativePromise","oz-player/utils/OzErrorUtils"],(function(t,n,r,o,a,i,l){"use strict";var e=(function(){function e(e){e===void 0&&(e={}),this.$2=[],this.$3=!1,this.$5=0;var t=e,n=t.disableArrayShift;this.$1=!!n}var t=e.prototype;return t.produce=function(t){this.$6(t)},t.signalProducerInterruption=function(){this.$6(new(r("oz-player/networks/OzProducerInterruptedError"))("producer interrupted"))},t.consume=function(t){var e=this;if(this.$3)throw o("oz-player/utils/OzErrorUtils").createOzError({type:"OZ_DEFERRED_BUFFER",description:"A buffer can only be consumed by one client at a time"});this.$3=!0;var n=r("oz-player/shims/OzMaybeNativePromise").resolve();return this.isEmpty()&&(this.$4=new(r("oz-player/shims/OzDeferred"))(r("oz-player/shims/OzMaybeNativePromise")),n=this.$4.getPromise()),n.then(function(){if(e.$1){if(e.$2[e.$5]===void 0)throw o("oz-player/utils/OzErrorUtils").createOzError({type:"OZ_DEFERRED_BUFFER",description:"buffer has no value at position "+e.$5})}else if(e.$2.length===0)throw o("oz-player/utils/OzErrorUtils").createOzError({type:"OZ_DEFERRED_BUFFER",description:"buffer length must not be 0"});e.$4=null,e.$3=!1;var n=e.$1?e.$7(t):e.$8(t);if(n instanceof Uint8Array)return n;throw n})},t.$6=function(t){this.$2.push(t),this.$4&&this.$4.resolve()},t.$7=function(t){var e=this.$2[this.$5];if(e===void 0)return new Uint8Array([]);var n=e;if(!(n instanceof Uint8Array))return this.$2[this.$5]=void 0,this.$5++,n;if(t!==void 0&&n.length>t){var r=n.slice(t);n=n.slice(0,t),this.$2[this.$5]=r}else this.$2[this.$5]=void 0,this.$5++;return n},t.$8=function(t){if(this.$2.length===0)return new Uint8Array([]);var e=this.$2[0];if(!(e instanceof Uint8Array))return this.$2.shift(),e;if(t!==void 0&&e.length>t){var n=e.slice(t);e=e.slice(0,t),this.$2[0]=n}else this.$2.shift();return e},t.isEmpty=function(){return this.$1?this.$2[this.$5]===void 0:this.$2.length===0},e})();l.default=e}),98); __d("oz-player/utils/ozPipeErrorTo",[],(function(t,n,r,o,a,i){"use strict";function e(e,t){try{e==null||e.error(t)}catch(e){}}i.default=e}),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/OzErrorUtils","oz-player/utils/ozPipeErrorTo"],(function(t,n,r,o,a,i,l){"use strict";function e(){return o("oz-player/utils/OzErrorUtils").createOzError({type:"OZ_STREAM",description:"Upstream has an inconsistent range"})}var s=(function(){function e(){this.$1=0}var t=e.prototype;return t.setBytesToSkip=function(t){this.$1=t},t.setBytesSkipped=function(t){this.$1-=t},t.getBytesToSkip=function(){return this.$1},t.hasMoreBytesToSkip=function(){return this.$1>0},e})(),u=(function(){function t(n,o,a,i,l){var u=this;this.$5=!1,this.$7=0,this.$8=0,this.$13=!1,this.$14=new s,this.$15=!1,this.$16=!1,this.$17=!1,this.startStream=function(){u.$13=!0;var e={startByte:u.$1.startByte,endByte:u.$1.endByte};u.$15?u.$8&&(u.$3.produce("skip_buffered_bytes"),u.$8=0):e.startByte+=u.$8;var n=u.$4;return u.$2.startStream(e).then(function(e){return e.pipeTo(u.$16?n:u.$4).then(function(){u.$12&&u.$12.resolve("stream_done")}).catch(function(e){u.$12&&!u.$12.isSettled()&&(u.$16&&e===t.STREAM_PAUSED?u.$12.resolve("stream_paused"):u.$12.reject(e))}),u.$12=new(r("oz-player/shims/OzDeferred"))(r("oz-player/shims/OzMaybeNativePromise")),{statusPromise:u.$12.getPromise()}})},this.$18=n,this.$19=o,this.$1=a,this.$2=i;var c=l||{},d=c.disableDeferredBufferArrayShift,m=c.enablePausableStreamResumeFromStartDangerously,p=c.fixPausePreReadableStream,_=c.fixStreamingUndefinedEndByte,f=c.throwErrorWhenAborted;this.$11=!!_,this.$15=!!m,this.$16=!!p,this.$17=!!f,this.$3=new(r("oz-player/networks/OzDeferredBuffer"))({disableArrayShift:!!d}),this.$6=new this.$18({start:function(t){u.$10=t},pull:function(n){if((u.$11&&u.$1.endByte===null&&u.$5||u.$7===u.$20())&&u.$3.isEmpty())return n.close(),r("oz-player/shims/OzMaybeNativePromise").resolve();var t=function(){var o=u.$14.hasMoreBytesToSkip()?u.$14.getBytesToSkip():void 0;return u.$3.consume(o).then(function(o){if(u.$14.hasMoreBytesToSkip())return u.$14.setBytesSkipped(o.length),t();u.$7+=o.length;var a=u.$20();a!==null&&u.$7>(a||0)&&r("oz-player/utils/ozPipeErrorTo")(u.$10,e()),n.enqueue(o)}).catch(function(e){if(e==="skip_buffered_bytes")return u.$14.setBytesToSkip(u.$7),t();throw e})};return t()},cancel:function(t){u.$12&&u.$12.resolve("stream_cancelled"),r("oz-player/utils/ozPipeErrorTo")(u.$9,t)}}),this.$4=this.$21()}var n=t.prototype;return n.$20=function(){var e=this.$1,t=e.endByte,n=e.startByte;return t!=null?t-n+1:null},n.$21=function(){var t=this;return new this.$19({start:function(n){t.$9=n},write:function(n){t.$3.produce(n),t.$8+=n.length},close:function(){t.$5=!0;var n=t.$1,o=n.endByte,a=n.startByte;t.$11&&o===null&&t.$3.produce(new Uint8Array([])),o!==null&&t.$8!==(o||0)-a+1&&r("oz-player/utils/ozPipeErrorTo")(t.$10,e())},abort:function(n){t.$12&&(t.$17?t.$12.reject(n):t.$12.resolve("stream_aborted")),r("oz-player/utils/ozPipeErrorTo")(t.$10,n)}})},n.getStream=function(){return this.$6},n.pauseStream=function(){r("oz-player/utils/ozPipeErrorTo")(this.$9,t.STREAM_PAUSED),this.$12&&this.$12.resolve("stream_paused"),this.$4=this.$21()},n.getByteRange=function(){return this.$1},n.getBytesStreamed=function(){return this.$7},n.tryConcatByteRange=function(t){return this.$13||!o("oz-player/manifests/OzByteRange").startsImmediateAfter(t,this.$1)?!1:(this.$1={startByte:this.$1.startByte,endByte:t.endByte},!0)},t})();u.STREAM_PAUSED="streamPaused",l.default=u}),98); __d("oz-player/networks/RequestParamCreator",["oz-player/shims/OzURI"],(function(t,n,r,o,a,i,l){"use strict";var e=function(t,n){var e=this;this.createRequestParam=function(t,n,o){var a=new(r("oz-player/shims/OzURI"))(t.toString());if(n){var i=n.endByte,l=n.startByte;l===0&&i==null||(a.addQueryData({bytestart:n.startByte}),i!=null&&a.addQueryData({byteend:i}))}if(e.$2){var s=e.$2(a);s&&Object.keys(s).forEach(function(e){var t=s[e];a.addQueryData(e,t)})}var u=e.$1&&e.$1(a)?"include":"same-origin";return{uri:a,http:{credentials:u,priority:o}}},this.$1=t,this.$2=n};l.default=e}),98); __d("oz-player/networks/getOzSegmentStreamableRange",[],(function(t,n,r,o,a,i){"use strict";function e(e){if(!e.length)return null;var t=e[0].getURI().toString(),n=e[0].getByteRange();if(!n)return null;for(var r=n,o=1;o0?{chunkSize:String(p)}:null)};l.setPerformanceLoggingAttributes=m,l.setFetchStreamLoggingAttributes=p,l.setBandwidthSampledLoggingAttributes=_}),98); __d("oz-player/networks/OzNetworkManager",["oz-player/loggings/OzLoggingUtils","oz-player/networks/OzNetworkRequestStream","oz-player/networks/OzPausableRangeStream","oz-player/networks/RequestParamCreator","oz-player/networks/getOzSegmentStreamableRange","oz-player/shims/OzStreams","oz-player/shims/OzURI","oz-player/shims/ozvariant","oz-player/utils/OzNetworkRequestLoggingUtils"],(function(t,n,r,o,a,i,l){"use strict";var e=(function(){function e(e){this.$10=null,this.$15="auto";var t=e.bandwidthEstimator,n=e.config,o=e.configureCustomRequestParametersForSegment,a=e.dynamicVideoLibrary,i=e.getCustomRequestParametersForURI,l=e.getOverrideOzRequestImplementation,s=e.getShouldIncludeCredentials,u=e.networkRequestFetchPriority,c=u===void 0?"auto":u,d=e.networkRequestStreamHandlers,m=e.networkRequestStreamRetryHandler,p=e.networkRequestUrlRefreshHandler,_=e.onResourceTimingBufferFull,f=e.prefetchCache,g=e.setCustomFetchStreamLoggingAttributes;this.$2=n,this.$8=s,this.$9=i,this.$1=new(r("oz-player/networks/RequestParamCreator"))(this.$8,this.$9),this.$3=f,this.$4=d,this.$5=m,this.$6=p,this.$7=l,this.$10=g,this.$11=a,this.$12=o,this.$13=_,this.$14=t,this.$15=c}var t=e.prototype;return t.destroy=function(){},t.request=function(t){var e=t.dataAppendedCallback,n=t.dataAppendedErrorCallback,o=t.debugName,a=t.loggerProvider,i=t.mediaStreamType,l=t.pipeThroughRangeStreamProviders,s=t.requestOptions,u=t.segments;u.length>0||r("oz-player/shims/ozvariant")(0,212);var c=r("oz-player/networks/getOzSegmentStreamableRange")(u)||{startByte:0,endByte:null},d=this.$7?this.$7():null,m=this.$16(u[0]),p=new(r("oz-player/networks/OzNetworkRequestStream"))({debugName:o,config:this.$2,baseUri:m,baseUriDecisionTime:null,options:s,requestParamCreator:this.$1,networkRequestFetchPriority:this.$15,networkRequestStreamHandlers:this.$4,networkRequestUrlRefreshHandler:this.$6,overrideOzRequestImplementation:d,prefetchCache:this.$3,networkRequestStreamRetryHandler:this.$5,mediaStreamType:i,dataAppendedCallback:e,dataAppendedErrorCallback:n});return this.$17(c,p,l,a,u)},t.createPausableStream=function(t){var e=t.dataAppendedCallback,n=t.dataAppendedErrorCallback,o=t.debugName,a=t.loggerProvider,i=t.mediaStreamType,l=t.pipeThroughRangeStreamProviders,s=t.segments;s.length>0||r("oz-player/shims/ozvariant")(0,212);var u=r("oz-player/networks/getOzSegmentStreamableRange")(s)||{startByte:0,endByte:null},c=null,d=this.$2.getNumber("network_seg_timeout_ms");d>0&&(c={networkTimeoutMs:d});var m=this.$7?this.$7():null,p=new(r("oz-player/networks/OzNetworkRequestStream"))({debugName:o,config:this.$2,baseUri:this.$16(s[0]),baseUriDecisionTime:s[0].getOptions().getSegmentNumDecisionTime(),options:c,requestParamCreator:this.$1,networkRequestFetchPriority:this.$15,networkRequestStreamHandlers:this.$4,networkRequestUrlRefreshHandler:this.$6,overrideOzRequestImplementation:m,prefetchCache:this.$3,networkRequestStreamRetryHandler:this.$5,dynamicVideoLibrary:this.$11,mediaStreamType:i,dataAppendedCallback:e,dataAppendedErrorCallback:n});return{pausableStream:this.$18(u,p,l||null,a),loggingPayloads:{getRequestUrl:function(){return p.getLastRequestUrl()||null},segments:s,getResponse:function(){return p.getLastResponse()}}}},t.requestRawUrl=function(t){var e=t.debugName,n=t.loggerProvider,o=t.options,a=t.url,i=this.$7?this.$7():null,l=new(r("oz-player/networks/OzNetworkRequestStream"))({debugName:e,config:this.$2,baseUri:new(r("oz-player/shims/OzURI"))(a),baseUriDecisionTime:null,options:o,networkRequestFetchPriority:this.$15,requestParamCreator:this.$1,networkRequestStreamHandlers:this.$4,networkRequestUrlRefreshHandler:this.$6,overrideOzRequestImplementation:i,prefetchCache:this.$3,networkRequestStreamRetryHandler:this.$5,dynamicVideoLibrary:this.$11,mediaStreamType:null,dataAppendedCallback:null,dataAppendedErrorCallback:null}),s={startByte:0,endByte:null};return this.$17(s,l,[],n)},t.$18=function(t,n,a,i){var e=n;if(a!=null)for(var l=0;l0)){var e=Date.now()-n.$8,r=n.$1.getLastPerformanceEntry();r&&n.$13(r.responseStart-r.requestStart,r.responseEnd-r.requestStart,n.$11),!r&&t.__isresourcetimingbufferfull&&n.$15&&n.$15(),n.$3>0&&e>0&&n.$10===0&&n.$11>=n.$3&&n.$28(n.$11,e)}};var o=e.byteCountPerSample,a=e.ignoreOnStreamWriteSamples,i=e.loggerProvider,l=e.maximumSampleBandwidth,s=e.minimumBytesToSampleOnClose,u=e.minimumSampleDuration,c=e.onResourceTimingBufferFull,d=e.responseTimeHandicapMs,m=e.stream,p=e.useResponseTimeMs;this.$1=m,this.$17=i,this.$2=o,this.$3=s,this.$4=u,this.$5=l,this.$6=p,this.$7=d,this.$18=a,this.$16.addListener("writableWrite",this.$22),this.$16.addListener("writableClose",this.$23),this.$15=c}var n=e.prototype;return n.getTransformStream=function(){return this.$16},n.onBandwidthSample=function(t){this.$12=t},n.onNavigationTimingSample=function(t){this.$13=t},n.onEstimateFromHeaders=function(t){this.$14=t},n.$24=function(t,n,r){var e=n-r,a=this.$17?this.$17.getOperationLogger("bandwidth_sampled"):null;if(a){var i=Date.now(),l=i-e;o("oz-player/utils/OzNetworkRequestLoggingUtils").setBandwidthSampledLoggingAttributes(a,this.$1.getLastRequestUrl(),t,this.$1.getLastResponse(),l,i,this.$21),a.log()}this.$12(t,e)},n.$29=function(t,n,r){if(n-r<=0)return!0;var e=t*8/(n/1e3);return nthis.$5},n.$28=function(t,n){var e=this.$1.getLastResponse(),o=this.$6&&r("oz-player/shims/OzNetworkDiagnostics").getResponseTimeMs(e==null?void 0:e.headers)||0;this.$29(t,n,o)||this.$24(t,n,Math.max(o-this.$7,0))},n.$25=function(){var e,t=(e=this.$1.getLastResponse())==null?void 0:e.headers;if(!(this.$20||t==null)){this.$20=!0;var n=r("oz-player/shims/OzNetworkDiagnostics").getBandwidthMeanEstimate(t);n!=null&&this.$14(n)}},n.$26=function(){if(!this.$19){if(this.$21==null){var e=this.$1.getLastResponse();this.$21=r("oz-player/shims/OzNetworkDiagnostics").getUsableResponseSizeForBandwidthEstimation(e==null?void 0:e.headers)||0}this.$21!=null&&this.$21>0&&this.$11>=this.$21&&(this.$19=!0,this.$28(this.$11,Date.now()-this.$9))}},n.$27=function(){var e=Date.now(),t=e-this.$8;this.$2>0&&this.$11>=this.$10+this.$2&&!this.$29(this.$11,t,0)&&(this.$24(this.$11-this.$10,t,0),this.$8=e,this.$10=this.$11)},e})();l.default=e}),98); __d("oz-player/networks/bandwidth/pipeStreamThroughBandwidthEstimator",["oz-player/networks/OzNetworkRequestStreamBandwidthReporter"],(function(t,n,r,o,a,i,l){"use strict";var e=2e5;function s(t,n,o,a,i){return{startStream:function(s){var l=new(r("oz-player/networks/OzNetworkRequestStreamBandwidthReporter"))({stream:n,loggerProvider:o,byteCountPerSample:t.getNumber("byte_count_per_sample",e),minimumBytesToSampleOnClose:t.getNumber("minimum_bytes_to_sample_on_close",25e3),minimumSampleDuration:t.getNumber("minimum_bandwidth_sample_duration",10),maximumSampleBandwidth:t.getNumber("maximum_bandwidth_sample_bandwidth",1e8),useResponseTimeMs:t.getBool("bandwidth_use_response_time_adjustment",!1),responseTimeHandicapMs:t.getNumber("bandwidth_response_time_handicap",0),ignoreOnStreamWriteSamples:t.getBool("bandwidth_ignore_on_stream_write_samples",!1),onResourceTimingBufferFull:i});return l.onBandwidthSample(function(e,t){a.addBandwidthSample(e,t)}),l.onNavigationTimingSample(function(e,n,r){var o=t.getNumber("time_to_first_byte_ignore_above_threshold_ms",0);(o===0||e<=o)&&a.addNavigationTimingSample(e,n,r)}),l.onEstimateFromHeaders(function(e){a.setBandwidthEstimateFromHeaders({meanEstimate:e})}),n.startStream(s).then(function(e){return n.retrievedFromCache()?e:e.pipeThrough(l.getTransformStream())})}}}l.pipeStreamThroughBandwidthEstimator=s}),98); __d("oz-player/networks/getOzBandwidthEstimatorPipeThroughReporter",["oz-player/networks/OzNetworkRequestStream","oz-player/networks/bandwidth/pipeStreamThroughBandwidthEstimator"],(function(t,n,r,o,a,i,l){"use strict";function e(e,t){return function(n,a,i,l){var s=e==="video";return a instanceof r("oz-player/networks/OzNetworkRequestStream")&&s?o("oz-player/networks/bandwidth/pipeStreamThroughBandwidthEstimator").pipeStreamThroughBandwidthEstimator(n.getLegacyConfig(),a,i,t,l):a}}l.default=e}),98); __d("oz-player/manifests/OzDataSegment",["oz-player/manifests/OzSegmentOptions"],(function(t,n,r,o,a,i,l){"use strict";var e=(function(){function e(e,t,n,o,a){this.$6=new(r("oz-player/manifests/OzSegmentOptions")),this.$1=e,this.$2=t,this.$3=n,this.$4=o,this.$5=a}var t=e.prototype;return t.getData=function(){return null},t.getURI=function(){return this.$1},t.getTimeRange=function(){return{startTime:this.$2,endTime:this.$3}},t.getByteRange=function(){return{startByte:this.$4,endByte:this.$5}},t.getSequenceNumber=function(){return null},t.getOptions=function(){return this.$6},e})();l.default=e}),98); __d("oz-player/shims/www/OzDataViewReaderWWW",["DataViewReader"],(function(t,n,r,o,a,i,l){"use strict";l.default=r("DataViewReader")}),98); __d("oz-player/shims/OzDataViewReader",["oz-player/shims/www/OzDataViewReaderWWW"],(function(t,n,r,o,a,i,l){"use strict";l.default=r("oz-player/shims/www/OzDataViewReaderWWW")}),98); /** * License: https://www.facebook.com/legal/license/k5cmJzUOK4Y/ */ __d("oz-player/parsers/OzMp4SidxParser",["oz-player/manifests/OzDataSegment","oz-player/manifests/OzSegmentOptions","oz-player/shims/OzDataViewReader","oz-player/utils/OzErrorUtils"],(function(t,n,r,o,a,i,l){"use strict";var e=1936286840;function s(t,n,a,i){var l=new(r("oz-player/shims/OzDataViewReader"))(new DataView(i.buffer)),s=l.readUint32(),u=l.readUint32();if(u!==e)throw o("oz-player/utils/OzErrorUtils").createOzError({type:"OZ_SIDX_PARSER",description:'Invalid box type, expected "sidx".'});s==1&&(s=l.readUint64());var c=l.readUint8();l.skip(3),l.skip(4);var d=l.readUint32();if(!d)throw o("oz-player/utils/OzErrorUtils").createOzError({type:"OZ_SIDX_PARSER",description:"Invalid timescale."});var m,p;c==0?(m=l.readUint32(),p=l.readUint32()):(m=l.readUint64(),p=l.readUint64()),l.skip(2);for(var _=l.readUint16(),f=m,g=a+s+p,h=0,y=t.getBool("sidx_parser_memory_optimization"),C=[],b=function(){var e=l.readUint32(),t=(e&2147483648)>>>31,a=e&2147483647,i=l.readUint32();if(e=l.readUint32(),t==1)throw o("oz-player/utils/OzErrorUtils").createOzError({type:"OZ_SIDX_PARSER",description:"Heirarchical SIDXs are not supported."});var s=f/d,u=(f+i)/d;v===0&&(h=s);var c=g,m=c+a-1,p=new(r("oz-player/manifests/OzSegmentOptions"));C.push(y?new(r("oz-player/manifests/OzDataSegment"))(n,s-h,u-h,c,m):{getData:function(){return null},getURI:function(){return n},getTimeRange:function(){return{startTime:s-h,endTime:u-h}},getByteRange:function(){return{startByte:c,endByte:m}},getSequenceNumber:function(){return null},getOptions:function(){return p}}),f+=i,g+=a},v=0;v<_;v++)b();return C}l.parse=s}),98); __d("oz-player/parsers/OzSidxSegmentsContainer",["oz-player/utils/OzErrorUtils"],(function(t,n,r,o,a,i,l){"use strict";var e=(function(){function e(e,t){this.$1=e,this.$2=t}var t=e.prototype;return t.getSegmentByTime=function(t){for(var e=this.$1(),n=0;nt)return r}return null},t.getSegmentAfter=function(t){var e=this.$1(),n=e.findIndex(function(e){return e.getTimeRange().startTime===t.getTimeRange().startTime&&e.getTimeRange().endTime===t.getTimeRange().endTime});return n>=0&&n+10?e[e.length-1]:null},t.getMaxGopSec=function(){return null},e})();l.default=e}),98); /** * License: https://www.facebook.com/legal/license/k5cmJzUOK4Y/ */ __d("oz-player/parsers/OzWebmSidxParser",["oz-player/manifests/OzDataSegment","oz-player/shims/OzDataViewReader","oz-player/shims/ozvariant"],(function(t,n,r,o,a,i,l){"use strict";var e=440786851,s=408125543,u=357149030,c=2807729,d=17545,m=475249515,p=187,_=179,f=183,g=241,h=[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 y(e,t){if(!e&&!t)return!0;if(!e||!t||e.length!==t.length)return!1;for(var n=0;n8)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.");for(var e=0,t=0;t7)throw new RangeError("EbmlParser: EBML ID must be at most 7 bytes.");for(var t=0,n=0;n8)throw new RangeError("EbmlParser: Variable sized integer must fit within 8 bytes.");var r=new Uint8Array(t);r[0]=e;for(var o=1;o=0&&(c>=0||r("oz-player/shims/ozvariant")(0,4010),l.push(new(r("oz-player/manifests/OzDataSegment"))(i,u,_,c,f-1))),u=_,c=f}}}if(u>=0){c>=0||r("oz-player/shims/ozvariant")(0,4010);var g=a;l.push(new(r("oz-player/manifests/OzDataSegment"))(i,u,g,c,null))}return l}function R(e){var t=e.createParser(),n=t.parseElement();if(n.id!=_)return null;var r=n.getUint(),o=t.parseElement();if(o.id!=f)return null;for(var a=o.createParser(),i=0;a.hasMoreData();){var l=a.parseElement();if(l.id==g){i=l.getUint();break}}return{unscaledTime:r,relativeOffset:i}}function L(e){for(var t=e.createParser(),n=null;t.hasMoreData();){var r=t.parseElement();if(r.id==u){n=r;break}}return n?v(n):null}function E(t){var n=new b(t),r=n.parseElement();if(r.id!=e)return null;var o=n.parseElement();if(o.id!=s)return null;var a=o.getOffset(),i=L(o);return i?{segmentOffset:a,timecodeScale:i.timecodeScale,duration:i.duration}:null}function k(e,t,n,r){var o=new DataView(r.buffer),a=new DataView(n.buffer),i=E(o);if(!i)return[];var l=new b(a),s=l.parseElement();return s.id!=m?[]:S(e,s,i.segmentOffset,i.timecodeScale,i.duration,t)}l.parse=k}),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(t,n,r,o,a,i,l){"use strict";function e(e){var t=e.split("-");return{startByte:Number.parseInt(t[0],10),endByte:Number.parseInt(t[1],10)}}var s=(function(){function t(e,t,n,o,a,i,l){this.$6=new(r("oz-player/utils/OzErrorEmitter")),this.$7=[],this.$9=new(r("oz-player/shims/OzEventEmitter")),this.$1=t,this.$2=new(r("oz-player/shims/OzURI"))(n),this.$3=o,this.$5=a,this.$4=i,this.$8=l.cloneContext().setType(a==="video"||a==="audio"?a+";sidx":"sidx"),this.$10=e}var n=t.prototype;return n.onError=function(t){return this.$6.onError(t)},n.parseInitializationSegment=function(){var t=this,n=this.$1.Initialization[0].$.range,o=e(n),a=new(r("oz-player/manifests/OzSegmentOptions"));return this.$10.getBool("sidx_parser_memory_optimization")?new(r("oz-player/manifests/OzZeroTimeRangeSegment"))(this.$2,o.startByte,o.endByte):{getData:function(){return null},getURI:function(){return t.$2},getTimeRange:function(){return{startTime:0,endTime:0}},getByteRange:function(){return o},getSequenceNumber:function(){return null},getOptions:function(){return a}}},n.parseSegmentsContainer=function(){var e=this,t=this.$11();return o("oz-player/loggings/OzLoggingUtils").monitorPromiseAndLogOperation(t,this.$8,"process_sidx"),t.catch(function(t){e.$6.emitError(t)}),new(r("oz-player/parsers/OzSidxSegmentsContainer"))(function(){return e.$7},this.$9)},n.$12=function(t,n,a){var e=new(r("oz-player/manifests/OzZeroTimeRangeSegment"))(t,n.startByte,n.endByte),i=this.$5+";sidx",l=this.$4.request({debugName:"OzSidxSegmentsParser/sidx/"+this.$5,segments:[e],pipeThroughRangeStreamProviders:[r("oz-player/networks/getOzBandwidthEstimatorPipeThroughReporter")(i,this.$4.getBandwidthEstimator())],loggerProvider:this.$8,requestOptions:{networkTimeoutMs:null,retryAttempts_SIDX_USE_ONLY:this.$10.getNumber("sidx_segment_retry_attempts"),retryTimeoutMs_SIDX_USE_ONLY:this.$10.getNumber("sidx_segment_retry_interval_ms")},mediaStreamType:a}),s=l.getStream().getReader();return o("oz-player/utils/OzReadableStreamUtils").pumpAllData(s)},n.$11=function(){var t=this,n=this.$1.$.indexRange,a=e(n),i=[this.$12(this.$2,a,null)],l;if(this.$3==="webm"){var s=e(this.$1.Initialization[0].$.range);i.push(this.$12(this.$2,s,null)),l=r("oz-player/shims/OzMaybeNativePromise").all(i).then(function(e){var n=e[0],r=e[1];t.$7=o("oz-player/parsers/OzWebmSidxParser").parse(t.$10,t.$2,n,r)})}else l=i[0].then(function(e){t.$7=o("oz-player/parsers/OzMp4SidxParser").parse(t.$10,t.$2,a.startByte,e)});return l.then(function(){t.$9.emit("segment_updated")})},t})();l.default=s}),98); __d("oz-player/parsers/OzVideoContainerType",[],(function(t,n,r,o,a,i){"use strict";function e(e){return(e.split("/")[1]||"").trim()}i.parse=e}),66); __d("oz-player/parsers/OzRepresentationParserBase",["oz-player/manifests/OzRepresentationBase","oz-player/parsers/OzSegmentTemplateParser","oz-player/parsers/OzSidxSegmentsParser","oz-player/parsers/OzVideoContainerType","oz-player/utils/OzErrorEmitter","oz-player/utils/OzErrorUtils","oz-player/utils/OzMimeUtil"],(function(t,n,r,o,a,i,l){"use strict";var e=(function(){function e(e,t,n,o,a,i,l,s,u,c,d,m,p,_,f){this.$9=new(r("oz-player/utils/OzErrorEmitter")),this.$1=t,this.$2=n,this.$10=a,this.$11=i,this.$13=o,this.$14=e,this.$15=l,this.$3=s,this.$4=u,this.$5=c,this.$6=d!=null?d:null,this.$7=m!=null?m:null,this.$8=p!=null?p:null,this.$16=_,this.$17=f;try{this.$11=this.$11.cloneContext().setRepresentationID(this.parseID())}catch(e){}}var t=e.prototype;return t.$18=function(){var e=this,t=this.$12;if(t)return t;if(this.$1.SegmentBase){var n=this.$1.SegmentBase[0],a=this.$1.BaseURL[0]._;if(typeof a!="string")throw o("oz-player/utils/OzErrorUtils").createOzError({type:"OZ_REPRESENTATION_PARSER",description:"Missing representation BaseURL",extra:{code:"OZ_RP-9"}});t=new(r("oz-player/parsers/OzSidxSegmentsParser"))(this.$14,n,a,o("oz-player/parsers/OzVideoContainerType").parse(this.$1.$.mimeType),o("oz-player/utils/OzMimeUtil").getMimeType(this.$1.$.mimeType),this.$10,this.$11),t.onError(function(t){var n;if(!((n=e.$17)!=null&&n.handleError(e.parseID(),t)))return e.$9.emitError(t)})}else if(this.$1.SegmentTemplate)t=this.$19(this.$1.SegmentTemplate[0],{isShared:!1});else if(this.$3)t=this.$19(this.$3[0],{isShared:!0});else throw o("oz-player/utils/OzErrorUtils").createOzError({type:"OZ_REPRESENTATION_PARSER",description:"Unrecognized representation type",extra:{code:"OZ_RP-7"}});return this.$12=t,t},t.$19=function(t,n){var e,a=t;n.isShared&&(a=babelHelpers.extends({},a,{$:babelHelpers.extends({},a.$,{initialization:a.$.initialization.replace("$RepresentationID$",this.$1.$.id),media:a.$.media.replace("$RepresentationID$",this.$1.$.id)})}));var i=this.$13.mpdUrl,l=this.$1.BaseURL&&this.$1.BaseURL[0]?this.$1.BaseURL[0]._:null,s=l!=null?l:i;if(s==null)throw o("oz-player/utils/OzErrorUtils").createOzError({type:"OZ_REPRESENTATION_PARSER",description:"Missing mpd url for template manifest",extra:{code:"OZ_RP-6"}});var u=this.$13.customSegmentTimelineParser,c=(e=this.$13.customRepresentationParsers)==null?void 0:e.initializationBinary,d=c?c(this.$1):null;return new(r("oz-player/parsers/OzSegmentTemplateParser"))(this.$14,a,{baseUrl:s,mpdUrl:i,isStaticMpd:this.$15.manifestType==="static",isTemplatedMpd:this.$15.manifestIsTemplated},u,d)},t.onError=function(t){return this.$9.onError(t)},t.parseInitSegment=function(){return this.$18().parseInitializationSegment()},t.parseBandwidth=function(){return Number(this.$1.$.bandwidth)},t.parseMimeType=function(){var e,t;return(e=(t=this.$1.$.mimeType)!=null?t:this.$4)!=null?e:""},t.parseCodecs=function(){var e,t;return(e=(t=this.$1.$.codecs)!=null?t:this.$5)!=null?e:""},t.parseVariantKey=function(){return this.$6},t.parseLang=function(){return this.$7},t.parseRole=function(){return this.$8},t.parseSegmentsContainer=function(){return this.$18().parseSegmentsContainer()},t.parseID=function(){return""+this.$1.$.id},t.parseCustomFieldFirstSegment=function(){var e=this.$13.customRepresentationParsers?this.$13.customRepresentationParsers.firstSegmentParser:null;return e?e(this.$1):null},t.parse=function(){return new(r("oz-player/manifests/OzRepresentationBase"))(this.$1,this.$2,this.parseID(),this.parseMimeType(),this.parseCodecs(),this.parseVariantKey(),this.parseLang(),this.parseRole(),this.parseInitSegment(),this.parseSegmentsContainer(),this.parseBandwidth(),this.parseCustomFieldFirstSegment(),this.$13.customRepresentationParsers)},e})();l.default=e}),98); __d("oz-player/parsers/OzApplicationRepresentationParser",["oz-player/manifests/OzApplicationRepresentation","oz-player/parsers/OzRepresentationParserBase"],(function(t,n,r,o,a,i,l){"use strict";var e=(function(e){function t(t,n,r,o,a,i,l,s,u,c,d,m,p,_){var f;return f=e.call(this,t,n,r,o,a,i,l,s,u,c,d,m,p,_)||this,f.$OzApplicationRepresentationParser$p_1=n,f.$OzApplicationRepresentationParser$p_3=o,f}babelHelpers.inheritsLoose(t,e);var n=t.prototype;return n.parse=function(){var e=this.$OzApplicationRepresentationParser$p_3.customRepresentationParsers;return new(r("oz-player/manifests/OzApplicationRepresentation"))(this.$OzApplicationRepresentationParser$p_1,this.$OzApplicationRepresentationParser$p_2,this.parseID(),this.parseMimeType(),this.parseCodecs(),this.parseVariantKey(),this.parseLang(),this.parseRole(),this.parseInitSegment(),this.parseSegmentsContainer(),this.parseBandwidth(),this.parseCustomFieldFirstSegment(),e)},t})(r("oz-player/parsers/OzRepresentationParserBase"));l.default=e}),98); __d("oz-player/manifests/OzAudioRepresentation",["oz-player/manifests/OzRepresentationBase"],(function(t,n,r,o,a,i,l){"use strict";var e=(function(e){function t(t,n,r,o,a,i,l,s,u,c,d,m,p){var _;return _=e.call(this,t,n,r,o,a,i,l,s,u,c,d,m,p)||this,_.$OzAudioRepresentation$p_1=r,_.$OzAudioRepresentation$p_2=d,_.$OzAudioRepresentation$p_3={id:r,displayLabel:_.getDisplayLabel(),mimeCodecs:_.getMimeCodecs(),variantKey:i,lang:l,role:s},_}babelHelpers.inheritsLoose(t,e);var n=t.prototype;return n.getBitrateKbps=function(){var e=1024;return(this.$OzAudioRepresentation$p_2/e).toFixed(1)+"Kbps"},n.getDisplayLabel=function(){var t=e.prototype.getLang.call(this),n=e.prototype.getRole.call(this),r=t==null?"Default":t;return n==null?r:r+" - "+n},n.getAudioTrack=function(){return this.$OzAudioRepresentation$p_3},t})(r("oz-player/manifests/OzRepresentationBase"));l.default=e}),98); __d("oz-player/parsers/OzAudioRepresentationParser",["oz-player/manifests/OzAudioRepresentation","oz-player/parsers/OzRepresentationParserBase"],(function(t,n,r,o,a,i,l){"use strict";var e=(function(e){function t(t,n,r,o,a,i,l,s,u,c,d,m,p,_){var f;return f=e.call(this,t,n,r,o,a,i,l,s,u,c,d,m,p,_)||this,f.$OzAudioRepresentationParser$p_1=n,f.$OzAudioRepresentationParser$p_3=o,f}babelHelpers.inheritsLoose(t,e);var n=t.prototype;return n.parse=function(){var e=this.$OzAudioRepresentationParser$p_3.customRepresentationParsers;return new(r("oz-player/manifests/OzAudioRepresentation"))(this.$OzAudioRepresentationParser$p_1,this.$OzAudioRepresentationParser$p_2,this.parseID(),this.parseMimeType(),this.parseCodecs(),this.parseVariantKey(),this.parseLang(),this.parseRole(),this.parseInitSegment(),this.parseSegmentsContainer(),this.parseBandwidth(),this.parseCustomFieldFirstSegment(),e)},t})(r("oz-player/parsers/OzRepresentationParserBase"));l.default=e}),98); __d("oz-player/parsers/OzVideoRepresentationParser",["oz-player/manifests/OzVideoRepresentation","oz-player/parsers/OzRepresentationParserBase"],(function(t,n,r,o,a,i,l){"use strict";var e=(function(e){function t(t,n,r,o,a,i,l,s,u,c,d,m,p,_,f){var g;return g=e.call(this,t,n,r,o,a,i,l,s,u,c,d,m,p,_,f)||this,g.$OzVideoRepresentationParser$p_1=n,g.$OzVideoRepresentationParser$p_2=r,g.$OzVideoRepresentationParser$p_3=o,g}babelHelpers.inheritsLoose(t,e);var n=t.prototype;return n.parse=function(){var e=Number.parseInt(this.$OzVideoRepresentationParser$p_1.$.height,10),t=Number.parseInt(this.$OzVideoRepresentationParser$p_1.$.width,10),n=this.$OzVideoRepresentationParser$p_3.customRepresentationParsers;return new(r("oz-player/manifests/OzVideoRepresentation"))(this.$OzVideoRepresentationParser$p_1,this.$OzVideoRepresentationParser$p_2,this.parseID(),this.parseMimeType(),this.parseCodecs(),this.parseVariantKey(),this.parseLang(),this.parseRole(),this.parseInitSegment(),this.parseSegmentsContainer(),this.parseBandwidth(),this.parseCustomFieldFirstSegment(),n,t,e)},t})(r("oz-player/parsers/OzRepresentationParserBase"));l.default=e}),98); __d("oz-player/utils/OzIbrUtils",["oz-player/networks/OzBandwidthEstimator"],(function(t,n,r,o,a,i,l){"use strict";var e=function(t,n,o){var e=r("oz-player/networks/OzBandwidthEstimator").getAdjustedBandwidth(n.getLegacyConfig()),a=t.slice(0);a.sort(function(e,t){return e.getBandwidth()-t.getBandwidth()});for(var i=n.getNumber("live_audio_ibr_bandwidth_percentage"),l=e*i,s=a.length-1;s>=0;s--)if(a[s].getBandwidth()<=l)return o.getOperationLogger("audio_ibr_success").setRepresentationID(a[s].getID()).setReason(e.toString()).log(),a[s];return o.getOperationLogger("audio_ibr_no_op").setReason(e.toString()).log(),null};l.getInitialAudioRepresentation=e}),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","oz-player/utils/OzErrorUtils","oz-player/utils/OzIbrUtils"],(function(t,n,r,o,a,i,l){"use strict";var e=(function(){function e(e){var t=e.blockedRepresentationsManager,n=e.config,o=e.drmManager,a=e.enableAlternativeAudioTracks,i=e.initialRepresentationIDs,l=e.networkManager,s=e.ozParserContext,u=e.perfLoggerProvider,c=e.useManagedMediaSource;this.$2=new(r("oz-player/utils/OzErrorEmitter")),this.$5=n,this.$1=l,this.$3=u,this.$4=s,this.$6=o,this.$7=i!=null?i:[],this.$8=t!=null?t:null,this.$9=a,this.$10=c!=null?c:!1,this.$11=!0}var t=e.prototype;return t.onError=function(t){return this.$2.onError(t)},t.parse=function(t){var e=this,n=[],a=t,i=this.$4.createXmlParser().parse(a),l=i.MPD&&i.MPD.length>0?i.MPD[0]:null;if(!l){var s=2e3;throw o("oz-player/utils/OzErrorUtils").createOzError({type:"OZ_MPD_PARSER",description:"parsed manifest XML missing MPD node; truncated xml ("+Math.min(s,a.length)+"/"+a.length+"): "+a.substring(0,s)})}var u=l.Period&&l.Period.length>0?l.Period[0]:null;if(!u){var c=2e3;throw o("oz-player/utils/OzErrorUtils").createOzError({type:"OZ_MPD_PARSER",description:"parsed manifest XML missing Period node; truncated xml ("+Math.min(c,a.length)+"/"+a.length+"): "+a.substring(0,c)})}var d=u.AdaptationSet||[],m=this.$12(l);this.$11=m==="static";var p=this.$13(l),_=this.$14(this.$15(d,"video"),{manifestType:m,manifestIsTemplated:p},n),f;this.$9?f=this.$16(this.$15(d,"audio"),{manifestType:m,manifestIsTemplated:p},n).sort(function(e,t){return e.getBandwidth()-t.getBandwidth()}):f=this.$17(this.$18(d,"audio"),r("oz-player/parsers/OzAudioRepresentationParser"),{manifestType:m,manifestIsTemplated:p},n).sort(function(e,t){return e.getBandwidth()-t.getBandwidth()});var g=[];if(this.$5.getBool("vtt_caption_representation")){var h=this.$15(d,"application");g=this.$17(h[0],r("oz-player/parsers/OzApplicationRepresentationParser"),{manifestType:m,manifestIsTemplated:p},n)}var y=this.$4.mpdUrl,C=new(r("oz-player/manifests/Mpd"))(l,_,f,g,y,this.$19(l),this.$4.customParsers||new Map,this.$11);if(this.$6){var b=this.$6;b.startEME(_,f)}return n.forEach(function(t){t.onError(e.$2.emitError)}),C},t.$19=function(t){var e=t.$.minimumUpdatePeriod||"",n=/\d+/g.exec(e);if(n&&n.length){var r=n[0];return r?Number.parseInt(r,10):null}return null},t.$12=function(t){return t.$.type||"static"},t.$13=function(t){var e,n=(e=this.$4.customParsers)==null?void 0:e.get("isLiveTemplated");if(!n)return!1;var r=n(t);return typeof r=="boolean"&&r},t.$18=function(t,n){return t.find(this.$20(n))},t.$15=function(t,n){return t.filter(this.$20(n))},t.$20=function(t){return function(e){if(e.$.mimeType!=null)return e.$.mimeType.indexOf(t)!==-1;var n=e.Representation;return n&&n.length>0&&n[0].$.mimeType.indexOf(t)!==-1}},t.$17=function(t,n,r,o){var e=this;if(!t)return[];var a=t.Role,i=a!=null?a:[],l=i[0],s=l?l.$.value:null,u=t.$.lang,c=u==="und"?null:u,d=t.$.FBVariantKey,m=d==="und"?null:d!=null?d:null;return t.Representation.map(function(a){var i,l=new n(e.$5,a,(i=a.ContentProtection)!=null?i:t.ContentProtection,e.$4,e.$1,e.$3,r,t.SegmentTemplate,t.$.mimeType,t.$.codecs,m,c,s,e.$7,e.$8),u=l.parse();return o.push(l),u})},t.$21=function(t){return this.$10?ManagedMediaSource.isTypeSupported(t):MediaSource.isTypeSupported(t)},t.$14=function(t,n,o){var e=this,a=[],i=new Set;return t.filter(Boolean).forEach(function(t,l,s){var u=l===s.length-1;for(var c of t.Representation){var d,m;if(!((d=c.$.FBAbrPolicyTags)!=null&&d.includes("avoid_on_abr")&&!u)){var p=t.Role,_=p!=null?p:[],f=_[0],g=f?f.$.value:null,h=t.$.lang,y=h==="und"?null:h,C=t.$.FBVariantKey,b=C==="und"?null:C!=null?C:null,v=new(r("oz-player/parsers/OzVideoRepresentationParser"))(e.$5,c,(m=c.ContentProtection)!=null?m:t.ContentProtection,e.$4,e.$1,e.$3,n,t.SegmentTemplate,t.$.mimeType,t.$.codecs,b,y,g,e.$7,e.$8),S=v.parse();if(o.push(v),!e.$21(S.getMimeCodecs())){i.add(S.getMimeCodecs());continue}a.push(S)}}}),a.filter(Boolean)},t.$16=function(t,n,a){var e=this,i=[],l=new Set,s=t.filter(Boolean).map(function(t){var o=t.Role,i=o!=null?o:[],s=i[0],u=s?s.$.value:null,c=t.$.lang,d=c==="und"?null:c,m=t.$.FBVariantKey,p=m==="und"?null:m!=null?m:null,_=[];for(var f of t.Representation){var g,h=new(r("oz-player/parsers/OzAudioRepresentationParser"))(e.$5,f,(g=f.ContentProtection)!=null?g:t.ContentProtection,e.$4,e.$1,e.$3,n,t.SegmentTemplate,t.$.mimeType,t.$.codecs,p,d,u,e.$7),y=h.parse();if(a.push(h),!e.$21(y.getMimeCodecs())){l.add(y.getMimeCodecs());continue}_.push(y)}return _});return s.forEach(function(t){if(t.length>1){var n=o("oz-player/utils/OzIbrUtils").getInitialAudioRepresentation(t,e.$5,e.$3);i.push(n!=null?n:t[0])}else i.push.apply(i,t)}),i.filter(Boolean)},e})();l.default=e}),98); __d("oz-player/utils/OzMpdUtils",[],(function(t,n,r,o,a,i){"use strict";function e(e){var t=null;return e.forEach(function(e){if(e){var n,r,o=e.endTime;o<((n=(r=t)==null?void 0:r.endTime)!=null?n:1/0)&&(t=e)}}),t}function l(t,n){var r=[];if(r.push.apply(r,t.getVideoRepresentations().concat(t.getAudioRepresentations())),r.length){var o=r.map(function(e){var t=e.getEndingSegment();return t?t.getTimeRange():null});return e(o)}return null}function s(e){var t=[];if(t.push.apply(t,e.getVideoRepresentations().concat(e.getAudioRepresentations())),t.length){var n=t[0].getEndingSegment();if(n)return n.getSequenceNumber()}return null}i.getLeastEndTimeTimeRange=e,i.getMpdLastTimeRange=l,i.getMpdLastSequenceNumber=s}),66); __d("oz-player/utils/OzStreamInterruptChecker",["oz-player/shims/OzEventEmitter","oz-player/utils/OzMpdUtils"],(function(t,n,r,o,a,i,l){"use strict";var e=(function(e){function t(t,n){var r;return r=e.call(this)||this,r.$OzStreamInterruptChecker$p_4=0,r.$OzStreamInterruptChecker$p_5=null,r.$OzStreamInterruptChecker$p_6=!1,r.$OzStreamInterruptChecker$p_2=t,r.$OzStreamInterruptChecker$p_3=n,r.$OzStreamInterruptChecker$p_1=r.$OzStreamInterruptChecker$p_3.getNumber("live_numerical_error_epsilon"),r}babelHelpers.inheritsLoose(t,e);var n=t.prototype;return n.notifyMpdUpdated=function(){var e=o("oz-player/utils/OzMpdUtils").getMpdLastTimeRange(this.$OzStreamInterruptChecker$p_2,this.$OzStreamInterruptChecker$p_3),t=e?e.endTime:null,n=!1;t!==null&&(n=t===this.$OzStreamInterruptChecker$p_5),n?this.$OzStreamInterruptChecker$p_4++:(this.$OzStreamInterruptChecker$p_4=0,this.$OzStreamInterruptChecker$p_6&&this.$OzStreamInterruptChecker$p_5!==null&&this.$OzStreamInterruptChecker$p_5!==void 0&&e!==null&&e!==void 0&&this.emit("streamResumedAt",e.startTime),this.$OzStreamInterruptChecker$p_6=!1);var r=this.$OzStreamInterruptChecker$p_3.getNumber("stream_interrupt_check_mpd_stale_count_threshold");!this.$OzStreamInterruptChecker$p_6&&r>0&&this.$OzStreamInterruptChecker$p_4>=r&&t!==null&&t!==void 0&&(this.emit("streamInterruptAt",t),this.$OzStreamInterruptChecker$p_6=!0),this.$OzStreamInterruptChecker$p_5=t},t})(r("oz-player/shims/OzEventEmitter"));l.default=e}),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/OzErrorEmitter","oz-player/utils/OzErrorUtils","oz-player/utils/OzMpdUtils","oz-player/utils/OzReadableStreamUtils","oz-player/utils/OzStreamInterruptChecker"],(function(t,n,r,o,a,i,l){"use strict";var e=(function(e){function t(t,n,a,i,l,s,u,c,d){var m;m=e.call(this)||this,m.$OzMpdUpdater$p_8=new(r("oz-player/utils/OzErrorEmitter")),m.$OzMpdUpdater$p_10=new(r("oz-player/shims/OzSubscriptionsHandler")),m.$OzMpdUpdater$p_11=!1,m.$OzMpdUpdater$p_16=0,m.$OzMpdUpdater$p_18=0,m.$OzMpdUpdater$p_19=null,m.$OzMpdUpdater$p_21=!0,m.$OzMpdUpdater$p_22=0,m.$OzMpdUpdater$p_26=function(){var e,t,n=m.$OzMpdUpdater$p_2.getLocation();if(m.$OzMpdUpdater$p_21=!1,!(n==null||n==="")){var a=new(r("oz-player/shims/OzURI"))(n),i=String((e=(t=a.getQueryData().ms)!=null?t:a.getQueryData().msdev)!=null?e:a.getQueryData().mstest);if(!m.$OzMpdUpdater$p_12.isPlaying()){m.setupUpdateLoop();return}var l=m.$OzMpdUpdater$p_5.getOperationLogger("update_manifest").start();m.$OzMpdUpdater$p_28(n).then(function(e){var t,a,s,u,c,d,p,_;if(m.$OzMpdUpdater$p_18=0,m.$OzMpdUpdater$p_29(),m.$OzMpdUpdater$p_7=0,!m.$OzMpdUpdater$p_21){var f=babelHelpers.extends({},m.$OzMpdUpdater$p_13,{mpdUrl:n}),g=new(r("oz-player/parsers/OzMpdParser"))({config:m.$OzMpdUpdater$p_6,ozParserContext:f,networkManager:m.$OzMpdUpdater$p_1,perfLoggerProvider:m.$OzMpdUpdater$p_5,drmManager:m.$OzMpdUpdater$p_14,initialRepresentationIDs:[],blockedRepresentationsManager:null,enableAlternativeAudioTracks:!1,useManagedMediaSource:m.$OzMpdUpdater$p_23});g.onError(function(e){m.$OzMpdUpdater$p_8.emitError(e),l.setError(e).log()});var h=g.parse(e),y=m.$OzMpdUpdater$p_2.isStaticMpd();m.$OzMpdUpdater$p_2.updateWith(h),m.$OzMpdUpdater$p_2.markRefreshed(),h.isStaticMpd()&&!y&&m.emit("streamTransitionToStatic");var C=o("oz-player/utils/OzMpdUtils").getMpdLastTimeRange(m.$OzMpdUpdater$p_2,m.$OzMpdUpdater$p_6),b=C&&C.endTime!=0?C.endTime:null,v=String((t=(a=m.$OzMpdUpdater$p_2)==null?void 0:a.getCustomField("currentServerTimeMs"))!=null?t:""),S=String((s=(u=m.$OzMpdUpdater$p_2)==null?void 0:u.getCustomField("lastVideoFrameTs"))!=null?s:""),R={currentServerTimeMs:v,ingestLastVideoFrameTs:S,nowMs:String(Date.now())},L=new Set(((c=(d=m.$OzMpdUpdater$p_2)==null?void 0:d.getVideoRepresentations())!=null?c:[]).map(function(e){return e.getCodecs()})).size>1,E=new Set(((p=(_=m.$OzMpdUpdater$p_2)==null?void 0:_.getAudioRepresentations())!=null?p:[]).map(function(e){return e.getCodecs()})).size>1;l.setLiveheadPosition(b).setLiveheadSeqNumMpd(o("oz-player/utils/OzMpdUtils").getMpdLastSequenceNumber(m.$OzMpdUpdater$p_2)).setManifestType(m.$OzMpdUpdater$p_2.isStaticMpd()?"static":"dynamic").setIsMixedCodecManifest(L||E).setIsTemplatedManifest(!!m.$OzMpdUpdater$p_2.getCustomField("isLiveTemplated")).setPlaybackFbmsParam(i).setUserInfo(R).log(),m.$OzMpdUpdater$p_9.notifyMpdUpdated(),m.setupUpdateLoop()}}).catch(function(e){m.$OzMpdUpdater$p_29(),l.setError(e).log();var t=null;if(o("oz-player/utils/OzErrorUtils").isOzError(e))t=e;else{var r,a=null,i="Caught an unknown error when fetching the manifest.";if(e!=null)if(m.$OzMpdUpdater$p_6.getBool("normalize_mpd_fetch_errors")){var s=o("oz-player/utils/OzErrorUtils").getNormalizedErrorAndCode(e),u=s[0],c=s[1];t=u}else r=e,a=r.code!=null?String(r.code):null,i=r.name+"; "+r.message+"; "+r.description+";";if(t==null){var d={originalError:r,url:n};a!==null&&(d.code=a),t=o("oz-player/utils/OzErrorUtils").createOzError({type:"OZ_NETWORK",description:i,extra:d})}}m.$OzMpdUpdater$p_27(t,n)})}};var p=n.getMinimumUpdatePeriod();return m.$OzMpdUpdater$p_7=0,m.$OzMpdUpdater$p_1=a,m.$OzMpdUpdater$p_2=n,m.$OzMpdUpdater$p_12=i,m.$OzMpdUpdater$p_3=p,m.$OzMpdUpdater$p_5=l.cloneContext().setType("manifest"),m.$OzMpdUpdater$p_6=t,m.$OzMpdUpdater$p_13=s,m.$OzMpdUpdater$p_14=u,m.$OzMpdUpdater$p_15=c,m.$OzMpdUpdater$p_23=d,m.$OzMpdUpdater$p_2.addListener("locationUpdated",function(){m.$OzMpdUpdater$p_24(),m.setupUpdateLoop()}),m.$OzMpdUpdater$p_9=new(r("oz-player/utils/OzStreamInterruptChecker"))(m.$OzMpdUpdater$p_2,m.$OzMpdUpdater$p_6),m.$OzMpdUpdater$p_10.addSubscriptions(m.$OzMpdUpdater$p_9.addListener("streamResumedAt",function(e){m.emit("streamResumedAt",e)}),m.$OzMpdUpdater$p_9.addListener("streamInterruptAt",function(e){m.emit("streamInterruptAt",e)})),m}babelHelpers.inheritsLoose(t,e);var n=t.prototype;return n.$OzMpdUpdater$p_24=function(){r("oz-player/shims/ozClearTimeout")(this.$OzMpdUpdater$p_4),this.$OzMpdUpdater$p_4=null,this.$OzMpdUpdater$p_25(),this.$OzMpdUpdater$p_21=!0},n.setupUpdateLoop=function(){var e,t=!this.$OzMpdUpdater$p_11;t&&(t=!this.$OzMpdUpdater$p_2.isStaticMpd(),this.$OzMpdUpdater$p_3=this.$OzMpdUpdater$p_2.getMinimumUpdatePeriod());var n=this.$OzMpdUpdater$p_17==null&&this.$OzMpdUpdater$p_6.getNumber("manifest_initial_update_delay_ms")>0?this.$OzMpdUpdater$p_6.getNumber("manifest_initial_update_delay_ms"):this.$OzMpdUpdater$p_6.getNumber("manifest_update_frequency_ms")||((e=this.$OzMpdUpdater$p_3)!=null?e:0)*1e3;t&&n&&this.$OzMpdUpdater$p_2.getLocation()&&(this.$OzMpdUpdater$p_4=r("oz-player/shims/ozSetTimeoutAcrossTransitions")(this.$OzMpdUpdater$p_26,n))},n.onError=function(t){return this.$OzMpdUpdater$p_8.onError(t)},n.$OzMpdUpdater$p_27=function(t,n){var e=this,r=!0,o=this.$OzMpdUpdater$p_18-1,a=t.getExtra().code;this.$OzMpdUpdater$p_19!==a?(this.$OzMpdUpdater$p_19=a,this.$OzMpdUpdater$p_16=1):this.$OzMpdUpdater$p_16++;var i=function(){r=!1},l={endStream:function(){i(),e.$OzMpdUpdater$p_11=!0,e.emit("streamGone")},consecutiveFailuresForErrorCode:this.$OzMpdUpdater$p_16,error:t,isInitialRequest:!1,retry:function(r){e.emit("manifestFetchErrorRetry",t),i(),e.setupUpdateLoop()},retryAttemptCount:o};this.emit("manifestFetchError",l),r&&this.$OzMpdUpdater$p_8.emitError(t)},n.$OzMpdUpdater$p_30=function(t,n){var e=new(r("oz-player/shims/OzURI"))(t);return e.addQueryData("_nc_expid",n),e.toString()},n.$OzMpdUpdater$p_31=function(t){if(!this.$OzMpdUpdater$p_15)return t;var e=new(r("oz-player/shims/OzURI"))(t);return e.addQueryData("_nc_tsid","mpd-"+this.$OzMpdUpdater$p_22++),e.toString()},n.$OzMpdUpdater$p_28=function(t){this.$OzMpdUpdater$p_25(),this.$OzMpdUpdater$p_18++;var e=this.$OzMpdUpdater$p_6.getString("cdn_experiment_id"),n=e.length===0?t:this.$OzMpdUpdater$p_30(t,e);n=this.$OzMpdUpdater$p_31(n);var r=this.$OzMpdUpdater$p_1.requestRawUrl({debugName:"OzMpdUpdater/requestMpd/mpd",url:n,options:{networkTimeoutMs:this.$OzMpdUpdater$p_6.getNumber("mpd_updater_network_request_timeout_ms")},loggerProvider:this.$OzMpdUpdater$p_5});this.$OzMpdUpdater$p_17=Date.now(),this.$OzMpdUpdater$p_20=r;var a=r.getStream().getReader();return o("oz-player/utils/OzReadableStreamUtils").pumpString(a)},n.$OzMpdUpdater$p_25=function(){this.$OzMpdUpdater$p_20&&(this.$OzMpdUpdater$p_20.cancel(),this.$OzMpdUpdater$p_18=0),this.$OzMpdUpdater$p_29()},n.$OzMpdUpdater$p_29=function(){this.$OzMpdUpdater$p_20=null},n.destroy=function(){this.$OzMpdUpdater$p_4&&r("oz-player/shims/ozClearTimeout")(this.$OzMpdUpdater$p_4),this.$OzMpdUpdater$p_10.release()},t})(r("oz-player/shims/OzEventEmitter"));l.default=e}),98); __d("oz-player/shims/www/OzXmlParserTrustedTypesHTMLPolicyWWW",["TrustedTypes","fb-error"],(function(t,n,r,o,a,i,l){"use strict";var e={createHTML:function(t){if(t.startsWith('\n<')||t.startsWith('\n<')||t.startsWith('\n1?t-1:0),r=1;r0?this.$9[0]:null,a=this.$2.getNumber("clear_buffer_on_seek_epsilon_s");if(n){for(var i=n.t,l=this.$1.buffered,s=l.length,u=l.length<=0,c=-1,d=!1,m=0;c<0&&m=l.start(m)&&i+a-1,_=this.$2.getNumber("clear_buffer_on_seek_nudge_s");if(p&&c>=0&&c0&&(i=Math.min(i,l.end(c)-_),i=Math.max(i,l.start(c)+_)),u||p||!d)this.$11&&this.$11.getOperationLogger("seek_to_next_time").setLength(Math.round(i*1e3)).setInitiator("no_clear").log(),t.call(this.$1,i),this.$9.shift(),this.$14(t);else{var f=null;this.$11&&(f=this.$11.getOperationLogger("clear_buffer_before_seek").setLength(Math.round(i*1e3)).setUserInfo({bufferRangesLength:String(s),nudgeSec:String(_)}).start());var g=this.$16(Math.max(i-a,0),l.end(s-1)+a);g.then(function(){f&&f.log(),e.$11&&e.$11.getOperationLogger("seek_to_next_time").setLength(Math.round(i*1e3)).setInitiator("after_clear").log(),t.call(e.$1,i),e.$9.shift(),e.$14(t)}).catch(function(t){f&&f.setError(t).log(),e.$3.emitError(o("oz-player/utils/OzErrorUtils").isOzError(t)?t:o("oz-player/utils/OzErrorUtils").createOzError({type:"OZ_SOURCE_BUFFER",description:t?t.name+": "+t.message:"Unknown error while clearing the buffer.",extra:{code:r("oz-player/utils/OzCustomErrorCode").SOURCE_BUFFER_MANAGER_CLEAR_RANGE_FAILED,originalError:t}}))})}}else this.$8=null},t.maybeOverwriteVideoCurrentTimeProperty=function(){var e=this,t=Object.getOwnPropertyDescriptor&&Object.getOwnPropertyDescriptor(this.$1,"currentTime");t=t!=null?t:Object.getOwnPropertyDescriptor&&Object.getOwnPropertyDescriptor(HTMLMediaElement.prototype,"currentTime");var n=Object.getOwnPropertyDescriptor&&Object.getOwnPropertyDescriptor(this.$1,"seeking");n=n!=null?n:Object.getOwnPropertyDescriptor&&Object.getOwnPropertyDescriptor(HTMLMediaElement.prototype,"seeking");var r=t&&typeof t.get=="function"?t.get:null,o=t&&typeof t.set=="function"?t.set:null,a=n&&typeof n.get=="function"?n.get:null;if(r&&o&&a&&Object.defineProperty){try{Object.defineProperty(this.$1,"currentTime",{get:function(){return e.$12(r)},set:function(n){e.$13(o,n)},configurable:!0,enumerable:!0}),Object.defineProperty(this.$1,"seeking",{get:function(){return e.$15(a)},configurable:!0,enumerable:!0});var i=this.$1.currentTime;this.$1.currentTime=i,this.$1.seeking}catch(e){}this.$17(function(){e.getCurrentTimePropertyOverwriteSuccess()&&Object.defineProperty(e.$1,"currentTime",{get:r,set:o,configurable:!0,enumerable:!0}),e.getSeekingPropertyOverwriteSuccess()&&Object.defineProperty(e.$1,"seeking",{get:a,configurable:!0,enumerable:!0})})}},t.getCurrentTimePropertyOverwriteSuccess=function(){return this.$5&&this.$6},t.getSeekingPropertyOverwriteSuccess=function(){return this.$7},t.$17=function(t){this.$10=t},t.onError=function(t){return this.$3.onError(t)},t.destroy=function(){try{this.$10&&this.$10()}catch(e){}},e})();l.default=e}),98); __d("oz-player/playback_controls/OzSteadyStateManager",["oz-player/shims/ozvariant"],(function(t,n,r,o,a,i,l){"use strict";function e(e){throw new TypeError('"'+e+'" is read-only')}var s=(function(){function e(e,t){this.$1=[],this.$2=e,this.$3=t}var t=e.prototype;return t.addSample=function(t){var e,n,r=Math.floor(Date.now()/(1e3*this.$3)),o=r%this.$2;((e=this.$1[o])==null?void 0:e.bucketNumber)!=r&&(this.$1[o]={bucketNumber:0,val:null}),this.$1[o]={bucketNumber:r,val:Math.min(t,(n=this.$1[o].val)!=null?n:t)}},t.min=function(){var e=this,t,n=Date.now(),o=this.$1.filter(function(t){return t!=null&&t.val!=null&&n-e.$2*1e3*e.$30&&(this.$7=new(r("oz-player/playback_controls/OzSteadyStateManager"))(this.$1.getNumber("steadystate_minbuffer_buckets"),this.$1.getNumber("steadystate_minbuffer_buckets_sec"))),n!=null&&(this.$8.addSubscriptions(n.addListener("enterBuffering",function(e){var n;if(e==="in_play"){var r;t.$9=0,(r=t.$7)==null||r.reset()}t.$10=!1,(n=t.$6)==null||n.log(),t.$6=null})),this.$8.addSubscriptions(n.addListener("leaveBuffering",function(){t.$9===0&&(t.$9=Date.now()),t.$10=!1}))),this.$4=u,this.$5=i,this.$16()){var c;this.$8.addSubscriptions((c=r("oz-player/shims/OzDOMEventListener")).listenDOMEvent(this.$4,"timeupdate",r("oz-player/shims/ozThrottle")(function(){t.$17(),t.$18()},this.$1.getNumber("playhead_manager_timeupdate_throttle_ms"))),c.listenDOMEvent(this.$4,"waiting",function(){t.$17()}),c.listenDOMEvent(this.$4,"durationchange",function(){t.$17()}),c.listenDOMEvent(this.$4,"seeking",function(){var e;t.$13=Date.now(),t.$11=null,(e=t.$7)==null||e.reset()}),c.listenDOMEvent(this.$4,"playing",function(){t.$13=Date.now(),t.$11=null}),c.listenDOMEvent(u,"pause",function(){var e;return(e=t.$7)==null?void 0:e.reset()}))}}var t=e.prototype;return t.enabled=function(){var e=this.$1.getNumber("catchup_timeout_after_buffering_sec");return e===0||this.$9==null||this.$9!==0&&this.$9+e*1e3<=Date.now()},t.isBehindPreferredLiveHeadLatencyWithTolerance=function(){return this.$3.getCurrentTime()this.$1.getNumber("steadystate_minbuffer_sec")},t.getInitialPlayHeadPosition=function(){return this.getLiveHeadTimeSec()-this.getPreferredLiveHeadLatencySec()},t.getLiveHeadTimeSec=function(){var e,t=this.$22();return(t==null||(e=t.getEndingSegment())==null?void 0:e.getTimeRange().endTime)||0},t.$21=function(){return this.$9!=null&&this.$1.getBool("latencymanager_stalled_edgelatency_sec_on")},t.getPreferredLiveHeadLatencySec=function(){var e=this.$21()?this.$1.getNumber("latencymanager_stalled_edgelatency_sec"):this.$1.getNumber("pdash_download_cursor_catchup_threshold_sec"),t=this.$23(e);return this.$5.getOperationLogger("latency_manager").setPreferredEdgeLatency(t*1e3),t},t.getPreferredLiveHeadLatencyToleranceSec=function(){return this.$1.getNumber("pdash_download_cursor_catchup_tolerance_sec")},t.shouldEnableManifestTimeRangeCatchup=function(){return!this.$1.getNumber("pdash_download_cursor_catchup_threshold_sec")},t.shouldEnableCursorBasedCatchup=function(){var e=this.$2.getVideoRepresentations()[0],t=e&&e.canPredict();return t&&this.$1.getNumber("pdash_download_cursor_catchup_threshold_sec")>0},t.setEnableCatchup=function(t){var e=this.$14;!this.$14&&t===!0&&(this.$9=null),this.$14=t,this.$1.getBool("fix_live_rewind_user_selected_playback_speed")&&t!==e&&this.$18()},t.$24=function(t,n,r){var e=this.$1.getNumber("playback_speed_min_sharpness_factor"),o=t*2/(1+Math.pow(Math.E,-(r-n)*e));return 1-t+o},t.$16=function(){return!this.$1.getBool("playback_speed_latency_adjustment_disabled")&&(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)},t.$17=function(){var e,t=o("oz-player/utils/OzSourceBufferUtil").getBufferAheadInBufferedRanges(o("oz-player/utils/OzSourceBufferUtil").convertToBufferedTimeRangeArray(this.$4.buffered),this.$3.getCurrentTime(),this.$1).bufferAheadSec;(e=this.$7)==null||e.addSample(t)},t.$18=function(){var e=o("oz-player/utils/OzSourceBufferUtil").getBufferAheadInBufferedRanges(o("oz-player/utils/OzSourceBufferUtil").convertToBufferedTimeRangeArray(this.$4.buffered),this.$3.getCurrentTime(),this.$1),t=e.bufferAheadSec,n=e.bufferedOffset;this.$25(t,n)},t.$25=function(t,n){var e=this.$1.getNumber("playback_speed_enabled_delay_sec"),r=this.$1.getNumber("playback_speed_min_buffer_sec");t>r&&(this.$10=!0);var o=this.$1.getNumber("playback_speed_min_duration_sec"),a=this.$1.getNumber("playback_speed_restore_min_duration_sec"),i=this.$1.getNumber("playback_speed_latency_adjustment_rate"),l=this.$1.getNumber("playback_speed_latency_slowdown_adjustment_rate"),s=this.$1.getNumber("playback_speed_latency_speedup_adjustment_rate");if(this.$4.playbackRate===0){var u;(u=this.$6)==null||u.log(),this.$6=null}else if(this.$14&&this.$10&&t0||l>0)&&n===0&&(e===0||this.$13!=null&&this.$13+e*1e30?1-l:this.$24(i,r,t);this.$6==null&&(this.$6=this.$5.getOperationLogger("latency_manager").start().setInitiator("speed_adjustment").setReason("slow").setUserInfo({newPlaybackRate:String(c),oldPlaybackRate:String(this.$4.playbackRate)})),this.$26(c)}else if(this.$14&&this.$10&&(this.$19()||this.$20())&&s>0&&n===0&&(this.$12==null||this.$12+a*1e3(((r=t.getEndingSegment())==null?void 0:r.getTimeRange().endTime)||0)?e:t})},t.$23=function(t){var e,n;if(t<=0)return t;var r=this.$22(),o=r==null||(e=r.getEndingSegment())==null?void 0:e.getTimeRange();if(!o)return t;var a=r==null||(n=r.getSegmentByTime((o==null?void 0:o.endTime)-t))==null?void 0:n.getTimeRange();return a?(o==null?void 0:o.endTime)-(a==null?void 0:a.startTime):t},t.destroy=function(){this.$8.release()},e})();l.default=e}),98); __d("oz-player/utils/OzBufferingUtils",[],(function(t,n,r,o,a,i){"use strict";var e=.1,l=1,s=.2;function u(e,t,n){if(c(e,n))return!0;for(var r=e.currentTime,o=0,a=0;a=r){o=l;break}}return o-r>t}function c(e,t){for(var n=e.currentTime,r=0,o=0;o=n){r=i;break}}return Math.abs(r-t)<=s||Math.abs(n-t)<=s}function d(e,t){if(!t)return 0;var n=null;for(var r of t)r.startTime<=e&&r.endTime>e&&(n=r);return n?n.endTime-e:0}function m(e){for(var t=[],n=0;n=t.startTime&&ee&&r[o].endTime-e>t)return!0}return!1}i.BUFFER_UNDERFLOW_THRESHOLD=e,i.BUFFER_OVERFLOW_THRESHOLD=l,i.BUFFER_FUDGE_FACTOR=s,i.hasEnoughBuffer=u,i.hasBufferedToOrReachedEnd=c,i.getBufferAheadFromCurrentTime=d,i.getNumericalRangesFromSourceBuffer=m,i.hasEnoughPartialBuffer=p,i.hasBuffer=f}),66); __d("oz-player/playback_controls/OzPlaybackTimeRangeManager",["oz-player/shims/OzSubscriptionsHandler","oz-player/utils/OzBufferingUtils"],(function(t,n,r,o,a,i,l){"use strict";var e=(function(){function e(e){var t=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(r("oz-player/shims/OzSubscriptionsHandler")),this.$17=function(){t.$10!=t.$14.isPlaying()&&(t.$14.isPlaying()&&(t.$11=Date.now()),t.$10=t.$14.isPlaying())};var n=e.config,o=e.liveheadFallBehindBlockMargin,a=e.liveheadFallBehindBlockThreshold,i=e.mpd,l=e.perfLoggerProvider,s=e.playbackState,u=e.video;this.$1=n,this.$2=u,this.$3=i,this.$8=a,this.$9=o,this.$14=s,this.$16=l,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 t=e.prototype;return t.setTimelineBlockingEnabled=function(t){this.$7=t,this.$7||this.$3.unblockTimeRange()},t.setTimeRangeProvider=function(t){var e=this;this.$4!=null&&this.$4.remove(),this.$4=t.addUpdateListener(function(){var n=t.getTimeRanges(),r=0;if(n.length!==0){var o=n[n.length-1];r=o.endTime}e.$18(r)})},t.$18=function(t){var e;if(this.$7&&this.$5!==t&&(this.$5=t,!(this.$2.currentTime<=this.$6))){var n=this.$1.getBool("catchup_use_timeline_range_end_time_as_end")?t:this.$2.duration,r=this.$1.getNumber("overwrite_livehead_fall_behind_block_threshold")!==0?this.$1.getNumber("overwrite_livehead_fall_behind_block_threshold"):this.$8,a=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!=a||this.$12!=r)&&(this.$13=a,this.$12=r,this.$11=Date.now());var i=this.$1.getNumber("catchup_timeout_after_play_sec")===0||Date.now()-((e=this.$11)!=null?e:0)r){for(var l=[],s=0;s0?r-t+e:0}i.computeSeekAhead=l}),66); __d("oz-player/utils/OzTimelineGapUtil",["oz-player/utils/OzNumericalHelper","oz-player/utils/OzNumericalRangeUtil"],(function(t,n,r,o,a,i,l){"use strict";var e=1.5;function s(e,t,n,r){var a=t.map(function(e){return{rangeStart:e.startTime,rangeEnd:e.endTime}});return o("oz-player/utils/OzNumericalRangeUtil").findCurrentRangeIndex(n,e,a,r)===-1}function u(t,n,r,a,i){i===void 0&&(i=e);var l=n.map(function(e){return{rangeStart:e.startTime,rangeEnd:e.endTime}}),s=o("oz-player/utils/OzNumericalRangeUtil").findCurrentRangeIndex(r,t,l,a);if(s!==-1){var u=n[s];return o("oz-player/utils/OzNumericalHelper").lessThanOrEqual(t,u.endTime)&&u.endTime-tthis.$3)&&(this.$4=Date.now(),this.$3=this.$2.currentTime,this.$5=!1,this.$6={}),this.$6[t]=this.$6[t]==null?1:this.$6[t]+1;var r=this.$4;if(!this.$5&&!this.$2.paused&&r!=null&&r+1e40&&this.$OzPlayheadManager$p_10.add(t);var r=this.$OzPlayheadManager$p_1.currentTime,a=o("oz-player/strategies/LiveheadSeekaheadStrategy").computeSeekAhead(r,e),i=this.$OzPlayheadManager$p_6.getNumber("timeline_offset_threshold");a>0&&(i===0||a0?this.$OzPlayheadManager$p_13:n+this.$OzPlayheadManager$p_13;if(this.$OzPlayheadManager$p_20!=null){var r;e=(r=this.$OzPlayheadManager$p_20)==null?void 0:r.getInitialPlayHeadPosition()}if(this.$OzPlayheadManager$p_15=!0,this.$OzPlayheadManager$p_6.getBool("playhead_manager_clamp_initial_playback_position")){var o,a=(o=this.$OzPlayheadManager$p_5)==null?void 0:o.getTimeRanges();a!=null&&a.length>0&&a[0].startTime>e&&(e=a[0].startTime)}this.$OzPlayheadManager$p_27(e,"initial_playback_position",t),this.emit("initialPlaybackPositionSet",e)}},a.$OzPlayheadManager$p_24=function(t){var e,n,r=this;if(this.$OzPlayheadManager$p_6.getBool("skip_videobuffer_gaps")&&this.$OzPlayheadManager$p_17){var a=this.$OzPlayheadManager$p_6.getNumber("playhead_manager_buffered_auto_seek_playhead_slack");if(a!==0){for(var i=this.$OzPlayheadManager$p_7.getCurrentTime(),l=[],s=0;s=0?u[y]:null,b=function(n){var e=r.$OzPlayheadManager$p_22==null||h==null||r.$OzPlayheadManager$p_22g){this.$OzPlayheadManager$p_27(g,"reverse_jump_over_buffer_gap",t,null,{lastSegmentStartPTS:String(f),last200RequestedUrlDecisionMinTime:String(h),lastSeekTime:String(this.$OzPlayheadManager$p_22)});return}if(C!=null&&y!=d){this.$OzPlayheadManager$p_27(C.rangeStart,"jump_over_buffer_gap_last_dl_range",t,null,{lastSegmentStartPTS:String(f),last200RequestedUrlDecisionMinTime:String(h),lastSeekTime:String(this.$OzPlayheadManager$p_22)});return}}if((o("oz-player/utils/OzTimelineGapUtil").isNearGap(i,l,this.$OzPlayheadManager$p_6,_,p)||o("oz-player/utils/OzTimelineGapUtil").isInGap(i,l,this.$OzPlayheadManager$p_6,_))&&c!==-1&&(m===0||u[c].rangeStart-i0&&Math.abs(e)<=i||(this.$OzPlayheadManager$p_11.getOperationLogger("playhead_adjustment").setLength(Math.round(t*1e3)).setReason(n).setInitiator(r).setType(o).setUserInfo(babelHelpers.extends({},a,{seekAdjustment:String(Math.round(e*1e3))})).log(),this.$OzPlayheadManager$p_12(t),n==="initial_playback_position"&&(this.$OzPlayheadManager$p_14=!0))},n})(r("oz-player/shims/OzEventEmitter"));l.default=u}),98); __d("oz-player/shims/www/OzUuidWWW",["uuidv4"],(function(t,n,r,o,a,i,l){"use strict";l.default=r("uuidv4")}),98); __d("oz-player/shims/OzUuid",["oz-player/shims/www/OzUuidWWW"],(function(t,n,r,o,a,i,l){"use strict";l.default=r("oz-player/shims/www/OzUuidWWW")}),98); __d("oz-player/states/OzObservedPlaybackState",["oz-player/loggings/OzMultiDestinationPerfLogger","oz-player/shims/OzDOMEventListener","oz-player/shims/OzSubscriptionsHandler"],(function(t,n,r,o,a,i,l){"use strict";var e=(function(){function e(e,t,n){var a=this;n===void 0&&(n=new(o("oz-player/loggings/OzMultiDestinationPerfLogger")).OzMultiDestinationPerfLoggerProvider([])),this.$2=new(r("oz-player/shims/OzSubscriptionsHandler")),this.$4=function(){a.$3.getOperationLogger("pause").setState("paused").log()},this.$5=function(){a.$3.getOperationLogger("playing").setState("playing").log()},this.$1=t,this.$3=n,this.$2.addSubscriptions(r("oz-player/shims/OzDOMEventListener").listenDOMEvent(this.$1,"pause",this.$4),r("oz-player/shims/OzDOMEventListener").listenDOMEvent(this.$1,"playing",this.$5))}var t=e.prototype;return t.isPlaying=function(){return!this.$1.paused},t.getCurrentTime=function(){return this.$1.currentTime},t.getCurrentTimeUpdateTime=function(){return Date.now()},t.getDuration=function(){return this.$1.duration},t.addEventListener=function(t,n){return r("oz-player/shims/OzDOMEventListener").listenDOMEvent(this.$1,t,n)},t.destroy=function(){this.$2.release()},e})();l.default=e}),98); __d("oz-player/utils/OzPositionToViewportUtils",[],(function(t,n,r,o,a,i){"use strict";function e(e,t,n){var r=t.filter(function(e){var t=e.position;if(t==null)return!1;var r=t.y-window.scrollY;return r>=0||(t.height+r)/t.height>n}).sort(function(e,t){return e.position==null||t.position==null?0:e.position.y-t.position.y});return r.findIndex(function(t){return t.video===e})}function l(e){return e.isIntersecting!=null?e.isIntersecting:e.intersectionRatio>0||e.intersectionRect&&(e.intersectionRect.height>0||e.intersectionRect.width>0)}i.determinePositionIndexOfVideoFromViewportVertically=e,i.intersectionObserverEntryIsIntersecting=l}),66); __d("oz-player/states/OzPositionToViewportTracker",["oz-player/shims/OzEventEmitter","oz-player/utils/OzPositionToViewportUtils"],(function(t,n,r,o,a,i,l){"use strict";var e=null,s=.5,u=(function(t){function n(e){var n;return n=t.call(this)||this,n.$OzPositionToViewportTracker$p_1=[],n.$OzPositionToViewportTracker$p_5=function(e){e.forEach(function(e){var t=n.$OzPositionToViewportTracker$p_1.find(function(t){return e.target===t.video});t!=null&&(o("oz-player/utils/OzPositionToViewportUtils").intersectionObserverEntryIsIntersecting(e)?t.position=n.$OzPositionToViewportTracker$p_7(e):n.$OzPositionToViewportTracker$p_1.map(function(t){e.target===t.video&&(t.position=null)})),n.$OzPositionToViewportTracker$p_1.forEach(function(e){e.positionIndexToViewportVertically=n.$OzPositionToViewportTracker$p_6(e.video)})}),n.emit("state_changed")},n.$OzPositionToViewportTracker$p_2=e,n}babelHelpers.inheritsLoose(n,t);var r=n.prototype;return r.$OzPositionToViewportTracker$p_4=function(){this.$OzPositionToViewportTracker$p_3==null&&(this.$OzPositionToViewportTracker$p_3=new IntersectionObserver(this.$OzPositionToViewportTracker$p_5,{rootMargin:this.$OzPositionToViewportTracker$p_2.getNumber("pixels_above_viewport_to_observe")+"px 0px "+this.$OzPositionToViewportTracker$p_2.getNumber("pixels_below_viewport_to_observe")+"px 0px",threshold:0}))},r.registerVideo=function(t){this.$OzPositionToViewportTracker$p_1.push({video:t,position:null,positionIndexToViewportVertically:-1}),this.$OzPositionToViewportTracker$p_4(),this.$OzPositionToViewportTracker$p_3!=null&&this.$OzPositionToViewportTracker$p_3.observe(t)},r.getPositionIndexOfVideoFromViewportVertically=function(t){var e=this.$OzPositionToViewportTracker$p_1.find(function(e){return e.video===t});return e!=null?e.positionIndexToViewportVertically:-1},r.$OzPositionToViewportTracker$p_6=function(t){return o("oz-player/utils/OzPositionToViewportUtils").determinePositionIndexOfVideoFromViewportVertically(t,this.$OzPositionToViewportTracker$p_1,s)},r.$OzPositionToViewportTracker$p_7=function(t){var e=t.boundingClientRect;return{x:e.x+window.scrollX,y:e.y+window.scrollY,width:e.width,height:e.height}},n.getInstance=function(r){return e==null&&(e=new n(r)),e},r.unregisterVideo=function(t){var e=this,n=[];this.$OzPositionToViewportTracker$p_1.forEach(function(r){r.video===t&&e.$OzPositionToViewportTracker$p_3!=null?e.$OzPositionToViewportTracker$p_3.unobserve(t):n.push(r)}),this.$OzPositionToViewportTracker$p_1=n,this.$OzPositionToViewportTracker$p_1.length===0&&this.$OzPositionToViewportTracker$p_3!=null&&(this.$OzPositionToViewportTracker$p_3.disconnect(),this.$OzPositionToViewportTracker$p_3=null)},n})(r("oz-player/shims/OzEventEmitter"));l.default=u}),98); __d("oz-player/states/OzPositionToViewport",["oz-player/shims/OzEventEmitter","oz-player/shims/OzSubscriptionsHandler","oz-player/states/OzPositionToViewportTracker"],(function(t,n,r,o,a,i,l){"use strict";var e=(function(e){function t(t,n){var o;return o=e.call(this)||this,o.$OzPositionToViewport$p_1=new(r("oz-player/shims/OzSubscriptionsHandler")),o.$OzPositionToViewport$p_3=t,o.$OzPositionToViewport$p_2=r("oz-player/states/OzPositionToViewportTracker").getInstance(n),o.$OzPositionToViewport$p_2.registerVideo(t),o.$OzPositionToViewport$p_1.addSubscriptions(o.$OzPositionToViewport$p_2.addListener("state_changed",function(){o.emit("state_changed")})),o}babelHelpers.inheritsLoose(t,e);var n=t.prototype;return n.getPositionIndexOfVideoFromViewportVertically=function(){return this.$OzPositionToViewport$p_3!=null?this.$OzPositionToViewport$p_2.getPositionIndexOfVideoFromViewportVertically(this.$OzPositionToViewport$p_3):-1},n.destroy=function(){this.$OzPositionToViewport$p_3!=null&&this.$OzPositionToViewport$p_2.unregisterVideo(this.$OzPositionToViewport$p_3),this.$OzPositionToViewport$p_3=null},t})(r("oz-player/shims/OzEventEmitter"));l.default=e}),98); __d("oz-player/strategies/OzPlaybackConfidenceUtils",[],(function(t,n,r,o,a,i){"use strict";var e=.8;function l(t,n,r,o,a,i){var l=Math.min(1,r/o),s=1+(1-l)*a,u=t.getBandwidth()*s;return u>n?e*(n/u):1-(1-e)*u/n}i.getPlaybackConfidence=l}),66); __d("oz-player/utils/OzAbrUtils",[],(function(t,n,r,o,a,i){"use strict";function e(e,t,n,r){if(r.resolutionConstraintFactor===0)return e.slice();var o=e.filter(function(e){var o=e.getWidth()<=t.width*n*r.resolutionConstraintFactor,a=e.getHeight()<=t.height*n*r.resolutionConstraintFactor;return o&&a});return o.length?o:[e[0]]}function l(e,t,n,r,o,a){var i=t?e.getNumber("min_switch_interval"):e.getNumber("initial_switch_interval"),l=r>=e.getNumber("abr_min_bandwidth_samples"),s=e.getNumber("abr_eval_buffer_threshold"),u=!s||n>=s,c=null;return o+e.getNumber("min_eval_interval")>Date.now()?c="min_eval_interval":a+i>Date.now()?c="min_switch_interval":l?u||(c="buffer_threshold_not_satisfied"):c="min_bandwidth_samples",c}i.excludeLargeRepresentations=e,i.getReasonToPreventEvaluation=l}),66); __d("oz-player/utils/OzPlaybackRestrictionsUtils",[],(function(t,n,r,o,a,i){"use strict";function e(e,t,n){if(n.length===0)return[];var r=e.reduce(function(e,n){return n.applyRestriction(e,t)},n);return r}i.applyVideoPlaybackRestrictions=e}),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(t,n,r,o,a,i,l){"use strict";var e=(function(){function e(e,t,n,r,o,a,i,l,s){this.$2=0,this.$3=Date.now(),this.$4=!1,this.$10=null,this.$1=e,this.$5=t,this.$6=this.$15(t,n),this.$7=r,this.$8=o,this.$11=a,this.$12=i,this.$13=l,this.$14=s,this.$1.getBool("enable_abr_logging")&&this.$14.getOperationLogger("abr_initialized").setResult("success").setUserInfo({newRepresentationIds:n.map(function(e){return e.getID()}).join(","),newCodecs:n.map(function(e){return e.getCodecs()}).join("|"),newDisplayLabels:n.map(function(e){return e.getDisplayLabel()}).join(",")}).setRepresentationID(t.getID()).setType("video").setInitiator("OzAbrManager").log()}var t=e.prototype;return t.setSourceBuffer=function(t){this.$9=t},t.$15=function(t,n){var e=this.$1.getNumber("abr_restrict_from_index"),r=this.$1.getNumber("abr_restrict_to_index");if(r===0&&e===0)return n;var o=n.findIndex(function(e){return t.getID()===e.getID()});return o===-1?n:n.filter(function(t,n){return n-o>=e&&n-o<=r})},t.$16=function(t){var e=o("oz-player/utils/OzAbrUtils").excludeLargeRepresentations(t,this.$12(),this.$11,{resolutionConstraintFactor:this.$1.getNumber("resolution_constraint_factor")});return e=o("oz-player/utils/OzPlaybackRestrictionsUtils").applyVideoPlaybackRestrictions(this.$7,this.$12(),e),e},t.getBestRepresentation=function(t){var e,n,a,i=(e=t==null?void 0:t.length)!=null?e:null,l=(n=(a=this.$9)==null?void 0:a.getSourceBufferState().getBufferedRanges())!=null?n:null,s=this.$8.getCurrentTime(),u=o("oz-player/utils/OzBufferingUtils").getBufferAheadFromCurrentTime(s,l),c=o("oz-player/utils/OzAbrUtils").getReasonToPreventEvaluation(this.$1,this.$4,u,r("oz-player/networks/OzBandwidthEstimator").getSampleCount(),this.$2,this.$3);if(c!=null)return this.$10=c,this.$1.getBool("enable_abr_logging")&&this.$14.getOperationLogger("abr_best_representation_selected").setResult("failed").setReason(this.$10).setType("video").setInitiator("OzAbrManager").log(),this.$5;var d=Date.now();this.$2=d;var m=r("oz-player/networks/OzBandwidthEstimator").getAdjustedBandwidth(this.$1.getLegacyConfig()),p=this.$16(this.$6),_=this.$17(p,m,u,i),f=p[0];if(_=_||f,this.$18(u,_))return this.$10="high_buffer",this.$1.getBool("enable_abr_logging")&&this.$14.getOperationLogger("abr_best_representation_selected").setResult("failed").setUserInfo({filteredRepresentationIds:p.map(function(e){return e.getID()}).join(",")}).setPreviousRepresentationID(this.$5.getID()).setReason(this.$10).setType("video").setInitiator("OzAbrManager").log(),this.$5;var g=this.$5;return g!==_&&(this.$4=!0,this.$3=d,this.$5=_),this.$10="bandwidth",this.$1.getBool("enable_abr_logging")&&this.$14.getOperationLogger("abr_best_representation_selected").setResult("success").setUserInfo({filteredRepresentationIds:p.map(function(e){return e.getID()}).join(",")}).setRepresentationID(_.getID()).setPreviousRepresentationID(g==null?void 0:g.getID()).setReason(this.$10).setType("video").setInitiator("OzAbrManager").log(),_},t.$17=function(t,n,r,a){a===void 0&&(a=null);for(var e=null,i=0;ithis.$1.getNumber("abr_confidence_threshold")&&(!e||e.getBandwidth()0&&t>=e&&this.$5.getBandwidth()>n.getBandwidth()},t.getLastEvaluationReason=function(){return this.$10},t.updateRepresentations=function(t){var e=this,n=this.$6;this.$6=t;var r=this.$6.find(function(t){return t.getDisplayLabel()===e.$5.getDisplayLabel()}),o=this.$5;this.$5=r!=null?r:this.$6[0],this.$1.getBool("enable_abr_logging")&&this.$14.getOperationLogger("abr_representations_updated").setResult("success").setUserInfo({previousRepresentationIds:n.map(function(e){return e.getID()}).join(","),newRepresentationIds:t.map(function(e){return e.getID()}).join(","),newCodecs:t.map(function(e){return e.getCodecs()}).join("|"),newDisplayLabels:t.map(function(e){return e.getDisplayLabel()}).join(",")}).setRepresentationID(this.$5.getID()).setPreviousRepresentationID(o==null?void 0:o.getID()).setReason(this.$10).setType("video").setInitiator("OzAbrManager").log()},e})();l.default=e}),98); __d("oz-player/strategies/getSegmentsCount",[],(function(t,n,r,o,a,i){"use strict";function e(e,t,n,r){for(var o=0,a=e.getTimeRange().startTime,i=e,l=i.getTimeRange().startTime;i!==null&&l0&&(a=r("oz-player/strategies/getSegmentsCount")(n,o,e,a)),a},e})();l.default=e}),98); __d("oz-player/strategies/OzBandwidthBoundaryStreamSegmentsCountStrategy",["oz-player/networks/OzBandwidthEstimator","oz-player/strategies/OzStaticStreamSegmentsStrategy","oz-player/strategies/getSegmentsCount"],(function(t,n,r,o,a,i,l){"use strict";var e=(function(){function e(e,t){this.$1=e,this.$2=t,this.$3=new(r("oz-player/strategies/OzStaticStreamSegmentsStrategy"))(e)}var t=e.prototype;return t.isActive=function(t){return!0},t.getSegmentsCount=function(t,n,o){var e=r("oz-player/networks/OzBandwidthEstimator").getBandwidth(this.$1.getLegacyConfig()),a=r("oz-player/networks/OzBandwidthEstimator").getStandardDeviationOfBandwidth(),i=this.$1.getNumber("bandwidth_boundary_standard_deviation_factor"),l=this.$2.some(function(t){var n=t.getBandwidth();return Math.abs(n-e)0&&(a=r("oz-player/strategies/getSegmentsCount")(n,o,e,a)),a},t.$5=function(t,n){var e=1/0,r=t.getByteRange();if(r){var o=r.endByte;if(o!=null){var a=this.$1.getNumber("per_stream_duration_target"),i=o-r.startByte;a>1e-5&&i!==0&&(e=Math.ceil(a*n/(i*8)))}}return e},e})();l.default=e}),98); __d("oz-player/strategies/OzBlockedRepresentationsManager",["oz-player/shims/OzEventEmitter","oz-player/shims/ozClearTimeout","oz-player/shims/ozSetTimeoutAcrossTransitions","oz-player/utils/OzErrorUtils"],(function(t,n,r,o,a,i,l){"use strict";var e=(function(){function e(e,t){this.$2=new Map,this.$3=new Set,this.$4=new Set,this.$5=new(r("oz-player/shims/OzEventEmitter")),this.$6=t===!0,this.$7(e),this.$8(e)}var t=e.prototype;return t.isBlocked=function(t){return this.$3.has(t)},t.handleError=function(t,n){if(this.$1!=null&&this.$3.size===this.$1-1)return!1;if(o("oz-player/utils/OzErrorUtils").isOzError(n)&&n.getType()==="OZ_NETWORK"){var e=Number(n.getExtra().code);if(!isNaN(e)&&this.$2.has(e))return this.$3.has(t)||this.$9(t,e),!0}return!1},t.$9=function(t,n){var e,o=this;this.$3.add(t),(e=this.$5)==null||e.emit("representation_blocked",t);var a=this.$2.get(n)||0;if(a>0){var i=r("oz-player/shims/ozSetTimeoutAcrossTransitions")(function(){o.$3.delete(t),o.$4.delete(i)},a);this.$4.add(i)}},t.applyRestriction=function(t){var e=this;return t.filter(function(t){return!e.$3.has(t.getID())})},t.onRepresentationBlocked=function(t){return this.$5?this.$5.addListener("representation_blocked",t):{remove:function(){}}},t.setAvailableRepresentationsCount=function(t){this.$1=t},t.destroy=function(){var e;(e=this.$5)==null||e.removeAllListeners(),this.$5=null;for(var t of this.$4)r("oz-player/shims/ozClearTimeout")(t);this.$4.clear()},t.$7=function(t){var e=this;try{var n=JSON.parse(t.getString("block_representation_status_codes_json"));if(Array.isArray(n)&&(n.forEach(function(t){var n=parseInt(t,10);isNaN(n)||e.$2.set(n,-1)}),this.$6))for(var r=500;r<=599;r++)this.$2.set(r,-1)}catch(e){}},t.$8=function(t){var e=this;try{var n=JSON.parse(t.getString("block_representation_status_codes_temporarily_json"));Object.entries(n).forEach(function(t){var n=t[0],r=t[1],o=parseInt(n,10),a=parseInt(r,10);!isNaN(o)&&!isNaN(a)&&e.$2.set(o,a)})}catch(e){}},e})();l.default=e}),98); __d("oz-player/strategies/OzBufferAheadPriorityStrategy",["oz-player/shims/OzEventEmitter","oz-player/shims/OzSubscriptionsHandler","oz-player/shims/ozThrottle","oz-player/utils/OzBufferingUtils"],(function(t,n,r,o,a,i,l){"use strict";var e=6,s=1e3,u=(function(t){function n(e,n){var o;return o=t.call(this)||this,o.$OzBufferAheadPriorityStrategy$p_3=new(r("oz-player/shims/OzSubscriptionsHandler")),o.$OzBufferAheadPriorityStrategy$p_5=function(){o.emit("state_changed")},o.$OzBufferAheadPriorityStrategy$p_4=e,o.$OzBufferAheadPriorityStrategy$p_1=n,o.$OzBufferAheadPriorityStrategy$p_3.addSubscriptions(o.$OzBufferAheadPriorityStrategy$p_1.addEventListener("progress",r("oz-player/shims/ozThrottle")(o.$OzBufferAheadPriorityStrategy$p_5,s)),o.$OzBufferAheadPriorityStrategy$p_1.addEventListener("timeupdate",r("oz-player/shims/ozThrottle")(o.$OzBufferAheadPriorityStrategy$p_5,s))),o}babelHelpers.inheritsLoose(n,t);var a=n.prototype;return a.getName=function(){return"buffer_ahead"},a.setSourceBufferState=function(t){this.$OzBufferAheadPriorityStrategy$p_2||(this.$OzBufferAheadPriorityStrategy$p_2=t,this.$OzBufferAheadPriorityStrategy$p_3.addSubscriptions(t.addEventListener("buffer_updated",r("oz-player/shims/ozThrottle")(this.$OzBufferAheadPriorityStrategy$p_5,s))))},a.isActive=function(){return!0},a.getPriority=function(){var t=this.$OzBufferAheadPriorityStrategy$p_2;if(!t)return 1;var n=this.$OzBufferAheadPriorityStrategy$p_1.getCurrentTime(),r=t.getBufferedRanges(),a=o("oz-player/utils/OzBufferingUtils").getBufferAheadFromCurrentTime(n,r);return a>=e?0:1},a.destroy=function(){this.$OzBufferAheadPriorityStrategy$p_3.release()},n})(r("oz-player/shims/OzEventEmitter"));l.default=u}),98); __d("oz-player/strategies/OzBufferAheadTargetStrategy",[],(function(t,n,r,o,a,i){"use strict";var e=(function(){function e(e){this.$1=e}var t=e.prototype;return t.isActive=function(){return!0},t.getBufferTarget=function(){return this.$1.getNumber("buffer_ahead_target")},e})();i.default=e}),66); __d("oz-player/strategies/OzBufferEndLimitStrategy",[],(function(t,n,r,o,a,i){"use strict";var e=(function(){function e(e,t){this.$1=e,this.$2=t}var t=e.prototype;return t.isActive=function(){return!0},t.getBufferTarget=function(){var e=this.$3();return this.$2>=e?this.$2-e:0},t.$3=function(){return this.$1.buffered.length===0?0:this.$1.buffered.end(0)},e})();i.default=e}),66); __d("oz-player/strategies/OzBufferTargetBoundedStreamSegmentsCountStrategy",[],(function(t,n,r,o,a,i){"use strict";var e=(function(){function e(e,t){this.$1=e,this.$2=t}var t=e.prototype;return t.isActive=function(t){return!t.isPlaying()},t.getSegmentsCount=function(t,n,r){for(var e=t.getCurrentTime(),o=this.$1.computeBufferTarget(),a=1,i=n,l=n.getTimeRange().startTime;i!==null&&l0?t===-1?e*-1:0:t===-1?-1/0:-1*t},n.destroy=function(){this.$OzPositionToViewportPriorityStrategy$p_3.release()},t})(r("oz-player/shims/OzEventEmitter"));l.default=e}),98); __d("oz-player/strategies/OzPriorityCalculator",["oz-player/shims/OzEventEmitter","oz-player/shims/OzSubscriptionsHandler"],(function(t,n,r,o,a,i,l){"use strict";var e=(function(e){function t(t){var n,o;return o=e.call(this)||this,o.$OzPriorityCalculator$p_2=new(r("oz-player/shims/OzSubscriptionsHandler")),o.$OzPriorityCalculator$p_1=t,(n=o.$OzPriorityCalculator$p_2).addSubscriptions.apply(n,o.$OzPriorityCalculator$p_1.map(function(e){return e.addListener("state_changed",function(){o.emit("state_changed",o.compute(),e.getName())})})),o}babelHelpers.inheritsLoose(t,e);var n=t.prototype;return n.setSourceBufferState=function(t){this.$OzPriorityCalculator$p_1.forEach(function(e){return e.setSourceBufferState(t)}),this.emit("state_changed",this.compute(),"source_buffer")},n.compute=function(){var e=this.$OzPriorityCalculator$p_1.reduce(function(e,t){var n=t.isActive()?t.getPriority():0;return e+n},0);return Math.max(e,0)},n.destroy=function(){this.$OzPriorityCalculator$p_2.release()},t})(r("oz-player/shims/OzEventEmitter"));l.default=e}),98); __d("oz-player/strategies/OzSingleCodecRestriction",[],(function(t,n,r,o,a,i){"use strict";var e=(function(){function e(){}var t=e.prototype;return t.applyRestriction=function(t){if(t.length<=0)return t.slice();var e=new Set(t.map(function(e){return l(e)})),n="av01",r=e.has(n)?n:e.values().next().value;return r==null?t.slice():t.filter(function(e){return l(e)===r})},e})();function l(e){return e.getMimeCodecs().replace(/\..*$/,"")}i.default=e}),66); __d("oz-player/strategies/OzStaleManifestBufferTargetStrategy",[],(function(t,n,r,o,a,i){"use strict";var e=(function(){function e(e,t){this.$1=t,this.$2=e}var t=e.prototype;return t.isActive=function(){return this.$2.getRefreshDate()==null&&this.$1.getNumber("stale_mpd_buffer_ahead_target")>0},t.getBufferTarget=function(){return this.$1.getNumber("stale_mpd_buffer_ahead_target")},e})();i.default=e}),66); __d("oz-player/strategies/OzStartupBufferTargetStrategy",[],(function(t,n,r,o,a,i){"use strict";var e=(function(){function e(e,t){this.$1=e,this.$3=t}var t=e.prototype;return t.isActive=function(){var e=this.$1.isPlaying();return e&&(this.$2=!0),!this.$2},t.getBufferTarget=function(){return this.$3.getNumber("pre_start_buffer_ahead_target")},e})();i.default=e}),66); __d("oz-player/strategies/OzStreamSegmentsCountCalculator",[],(function(t,n,r,o,a,i){"use strict";var e=1,l=(function(){function t(e){this.$1=e}var n=t.prototype;return n.computeMin=function(n,r,o){var t=Number.MAX_VALUE;for(var a of this.$1)a.isActive(n)&&(t=Math.min(t,a.getSegmentsCount(n,r,o)));return t===Number.MAX_VALUE?e:Math.max(t,e)},t})();i.default=l}),66); __d("oz-player/strategies/OzSupportedMimeCodecsRestriction",[],(function(t,n,r,o,a,i){"use strict";var e=(function(){function e(e){this.$1=e}var t=e.prototype;return t.applyRestriction=function(t){var e=this;return t.filter(function(t){var n=e.$1?ManagedMediaSource.isTypeSupported(t.getMimeCodecs()):MediaSource.isTypeSupported(t.getMimeCodecs());return!!n})},e})();i.default=e}),66); __d("oz-player/streams/OzEndOfStreamWatcher",["oz-player/shims/OzEventEmitter","oz-player/shims/ozvariant"],(function(t,n,r,o,a,i,l){"use strict";var e=(function(e){function t(t,n){var r;return r=e.call(this)||this,r.$OzEndOfStreamWatcher$p_1=new Map,r.$OzEndOfStreamWatcher$p_4=!1,r.$OzEndOfStreamWatcher$p_2=t,r.$OzEndOfStreamWatcher$p_3=n,r}babelHelpers.inheritsLoose(t,e);var n=t.prototype;return n.registerMediaStream=function(t){!this.$OzEndOfStreamWatcher$p_1.has(t)||r("oz-player/shims/ozvariant")(0,5191),this.$OzEndOfStreamWatcher$p_1.set(t,!1)},n.notifyRepresentationSwitched=function(t){this.$OzEndOfStreamWatcher$p_1.has(t)||r("oz-player/shims/ozvariant")(0,5192),this.$OzEndOfStreamWatcher$p_1.get(t)===!0&&this.$OzEndOfStreamWatcher$p_1.set(t,!1),this.$OzEndOfStreamWatcher$p_5("end_of_stream_watcher","representation_switched")},n.notifyMediaStreamEnded=function(t,n){this.$OzEndOfStreamWatcher$p_1.has(t)||r("oz-player/shims/ozvariant")(0,5192),this.$OzEndOfStreamWatcher$p_1.set(t,!0),this.$OzEndOfStreamWatcher$p_5("end_of_stream_watcher","media_stream_ended:"+n)},n.$OzEndOfStreamWatcher$p_5=function(t,n){var e=this;if(this.$OzEndOfStreamWatcher$p_3.getBool("do_not_end_stream")){!this.$OzEndOfStreamWatcher$p_4&&this.$OzEndOfStreamWatcher$p_6()&&(this.$OzEndOfStreamWatcher$p_4=!0,this.emit("streamEnd"));return}var r=this.$OzEndOfStreamWatcher$p_2.getReadyState();r==="open"&&this.$OzEndOfStreamWatcher$p_6()&&this.$OzEndOfStreamWatcher$p_2.notifyEndOfStream(t,n).then(function(){e.emit("streamEnd")}).catch(function(){e.emit("streamEnd")})},n.$OzEndOfStreamWatcher$p_6=function(){if(this.$OzEndOfStreamWatcher$p_1.size===0)return!1;for(var e of this.$OzEndOfStreamWatcher$p_1.values())if(!e)return!1;return!0},n.destroy=function(){this.$OzEndOfStreamWatcher$p_1.clear()},t})(r("oz-player/shims/OzEventEmitter"));l.default=e}),98); __d("oz-player/streams/OzHandleUserRepresentationSwitch",["oz-player/shims/OzSubscriptionsHandler","oz-player/shims/ozReportUnexpectedError","oz-player/utils/OzErrorEmitter"],(function(t,n,r,o,a,i,l){"use strict";var e=(function(){function e(e,t,n,o,a,i){var l=this;this.$2=new(r("oz-player/utils/OzErrorEmitter")),this.$5=null,this.$6=new(r("oz-player/shims/OzSubscriptionsHandler")),this.$1=e,this.$3=t,this.$4=n,this.$7=o,this.$8=i,a.then(function(e){l.$5=e},function(){}).catch(function(e){r("oz-player/shims/ozReportUnexpectedError")(e,"OzHandleUserRepresentationSwitch SBM promise then - create")}),this.$6.addSubscriptions(o.addListener("switchRepresentation",function(e,t){l.$9(e,t)}))}var t=e.prototype;return t.destroy=function(){this.$6.release(),this.$6.engage()},t.onError=function(t){return this.$2.onError(t)},t.$9=function(t,n){if(t==="user"){var e=this.$5;if(e!=null){for(var o=this.$7.getRepresentationIDAtTime(this.$3.getCurrentTime()),a,i=0;i=((t==null?void 0:t.getSequenceNumber())||0)}i.isSequenceNumberEqual=e,i.isSequenceNumberGreaterOrEqual=l}),66); __d("oz-player/networks/OzReadableStreamDataReader",["oz-player/networks/OzTransformStream","oz-player/utils/ozConcatUint8Arrays"],(function(t,n,r,o,a,i,l){"use strict";var e=(function(e){function t(t,n){var r;if(n===void 0&&(n=null),r=e.call(this)||this,r.$OzReadableStreamDataReader$p_1=[],r.$OzReadableStreamDataReader$p_3=1/0,r.$OzReadableStreamDataReader$p_4=0,r.$OzReadableStreamDataReader$p_2=t,n!=null){var o=n.getNumber("stream_reader_max_buffer_len");r.$OzReadableStreamDataReader$p_3=o>0?o:1/0}return r}babelHelpers.inheritsLoose(t,e);var n=t.prototype;return n.onDataWritten=function(t){if(this.$OzReadableStreamDataReader$p_4+t.byteLength>=this.$OzReadableStreamDataReader$p_3){var e=r("oz-player/utils/ozConcatUint8Arrays")(this.$OzReadableStreamDataReader$p_1),n=e.buffer;this.$OzReadableStreamDataReader$p_2(n),this.$OzReadableStreamDataReader$p_1.length=0,this.$OzReadableStreamDataReader$p_4=0}this.$OzReadableStreamDataReader$p_1.push(t),this.$OzReadableStreamDataReader$p_4+=t.byteLength},n.onClose=function(){var e=this.$OzReadableStreamDataReader$p_1,t=r("oz-player/utils/ozConcatUint8Arrays")(e),n=t.buffer;e.length=0,this.$OzReadableStreamDataReader$p_4=0,this.$OzReadableStreamDataReader$p_2(n)},t})(r("oz-player/networks/OzTransformStream"));l.default=e}),98); __d("oz-player/networks/OzStreamingTask",["oz-player/loggings/OzLoggingUtils","oz-player/shims/OzDeferred","oz-player/shims/OzMaybeNativePromise","oz-player/shims/OzPerformance","oz-player/utils/OzErrorUtils","oz-player/utils/OzNetworkRequestLoggingUtils"],(function(t,n,r,o,a,i,l){"use strict";var e=(function(){function e(e,t,n){this.$3=new(r("oz-player/shims/OzDeferred"))(r("oz-player/shims/OzMaybeNativePromise")),this.$5=!1,this.$9=null,this.$1=this.$2=new(r("oz-player/shims/OzDeferred"))(r("oz-player/shims/OzMaybeNativePromise")),this.$6=r("oz-player/shims/OzPerformance").now(),this.$7=t,this.$8=e,this.$9=n}var t=e.prototype;return t.run=function(){var e=this.$3.getPromise(),t=this.$7;if(t){var n=r("oz-player/shims/OzPerformance").now()-this.$6;o("oz-player/loggings/OzLoggingUtils").monitorPromiseAndLogOperation(e,t,"streaming_task",function(){},function(e){e.setTimeToRequestSent(Math.floor(n))})}return this.$2.resolve(),e},t.getPromise=function(){return this.$3.getPromise()},t.cancel=function(){this.$3.getPromise().catch(function(){}),this.$3.reject(o("oz-player/utils/OzErrorUtils").createOzError({type:"OZ_STREAMING_TASK",description:"task cancelled",extra:{code:"OZ_ST-1"}})),this.$5=!0},t.finish=function(){this.$3.resolve()},t.isCancelled=function(){return this.$5},t.addStreamDeferred=function(t,n){var e=new(r("oz-player/shims/OzDeferred"))(r("oz-player/shims/OzMaybeNativePromise")),o=new(r("oz-player/shims/OzDeferred"))(r("oz-player/shims/OzMaybeNativePromise"));this.$10({createStreamResult:t,changeStatusDeferred:e,createStreamDeferred:o,loggerProviderWithStreamContext:n});var a=function(){return o.getPromise()};return{genStream:a,cancel:function(){if(t){var e=t.pausableStream;return e.pauseStream()}},getStatusChangePromise:function(){return e.getPromise()}}},t.$10=function(t){var e=this,n=t.changeStatusDeferred,a=t.createStreamDeferred,i=t.createStreamResult,l=t.loggerProviderWithStreamContext,s=t.loggingPayloads,u=this.$1.getPromise(),c=r("oz-player/shims/OzPerformance").now(),d=this.$1=new(r("oz-player/shims/OzDeferred"))(r("oz-player/shims/OzMaybeNativePromise"));d.getPromise().catch(function(){}),u.then(function(){if(i){var t=i.pausableStream;i.loggingPayloads&&(s=i.loggingPayloads),a.resolve(t.getStream()),e.$4=t;var n=r("oz-player/shims/OzPerformance").now(),u=e.$11(t.startStream());if(l){var d=function(a){var r=s;if(r){o("oz-player/utils/OzNetworkRequestLoggingUtils").setFetchStreamLoggingAttributes(a,r.getRequestUrl(),r.segments,n-c,t.getBytesStreamed(),r.getResponse());var i=e.$9;i&&i(a,r.getRequestUrl(),r.getResponse())}};o("oz-player/loggings/OzLoggingUtils").monitorPromiseAndLogOperation(u,l,"fetch_stream",d,d)}return u}return null}).then(function(t){e.$4=null,d.resolve(),n.resolve(t||"cancelled")}).catch(function(t){e.$4=null,e.$3.reject(t),d.reject(t),n.reject(t)})},t.$11=function(t){return t.then(function(e){var t=e.statusPromise;return t.then(function(e){return e==="stream_done"?"done":"error"})})},e})();l.default=e}),98); __d("oz-player/scheduling/OzRoundRobinPriorityTaskQueue",["oz-player/shims/ozReportUnexpectedError"],(function(t,n,r,o,a,i,l){"use strict";var e=(function(){function e(e,t){t===void 0&&(t=-1),this.$3=function(){},this.$4=[],this.$5=new Map,this.$1=e,this.$2=t}var t=e.prototype;return t.getHighestPriority=function(){return Math.max.apply(Math,this.$4.map(function(e){return e.queue.length?e.priority:-1/0}))},t.enqueue=function(t,n){var e=this,o=n;o=this.$6(o);var a=this.$5.get(t);if(a!==o){this.$5.has(t)&&this.remove(t);var i=this.$7(o),l=this.$4[i];l&&l.priority===o||(l={priority:o,queue:[]},this.$4.splice(i,0,l)),this.$5.set(t,o),l.queue.push(t),t.getPromise().then(function(){e.remove(t)},function(){e.remove(t)}).catch(function(e){r("oz-player/shims/ozReportUnexpectedError")(e,"OzRoundRobinPriorityTaskQueue remove after task run")}),this.$3(t,o>=this.$1?"immediate":"normal")}},t.updatePriority=function(t,n){this.$5.has(t)&&this.enqueue(t,n)},t.dequeue=function(){for(var e=0;e-1&&r.queue.splice(o,1)}this.$5.delete(t)}},t.setOnTaskUpdated=function(t){this.$3=t},t.clearOnTaskUpdated=function(){this.setOnTaskUpdated(function(){})},t.getLength=function(){return this.$5.size},t.test_isEmpty=function(){return this.$5.size===0&&this.$4.every(function(e){return e.queue.length===0})},t.$7=function(t){var e=t;e=this.$6(e);var n;for(n=0;n=this.$4[n].priority)return n;return n},t.$6=function(t){var e=t;return this.$2>=0&&(e=Number.parseFloat(e.toFixed(this.$2))),e},e})();l.default=e}),98); __d("oz-player/scheduling/OzSequentialTaskScheduler",["oz-player/shims/OzMaybeNativePromise","oz-player/shims/ozReportUnexpectedError","oz-player/shims/ozSetTimeoutAcrossTransitions"],(function(t,n,r,o,a,i,l){"use strict";var e=(function(){function e(e,t){this.$3=0,this.$1=e;var n=t||{},r=n.taskTimeout;this.$4=r||0}var t=e.prototype;return t.start=function(){var e=this;this.$1.setOnTaskUpdated(function(t,n){return e.$5(t,n)});var t=this.$1.dequeue();t&&this.$6(t,"immediate")},t.destroy=function(){this.$2&&this.$2.cancel(),this.$1.clearOnTaskUpdated()},t.$5=function(t,n){var e=this.$6(t,n);e&&this.$1.remove(t)},t.$6=function(t,n){var e=this;if(this.$2&&n!=="immediate")return!1;this.$2&&this.$2.cancel();var o=t.run().catch(function(e){});return this.$4>0&&(o=r("oz-player/shims/OzMaybeNativePromise").race([o,new(r("oz-player/shims/OzMaybeNativePromise"))(function(t,n){r("oz-player/shims/ozSetTimeoutAcrossTransitions")(t,e.$4)})])),this.$3++,this.$2=t,o=o.then(function(){if(e.$3--,e.$2===t&&(e.$2=null),e.$3===0){var n=e.$1.dequeue();n&&e.$6(n,"immediate")}}),o.catch(function(e){r("oz-player/shims/ozReportUnexpectedError")(e,"OzSequentialTaskScheduler task complete")}),!0},e})();l.default=e}),98); __d("oz-player/networks/OzStreamingTaskQueueProvider",["oz-player/scheduling/OzRoundRobinPriorityTaskQueue","oz-player/scheduling/OzSequentialTaskScheduler"],(function(t,n,r,o,a,i,l){"use strict";var e=new Map,s=new Map,u=2,c=2,d=6e4;function m(t){var n=e.get(t);if(!n){n=new(r("oz-player/scheduling/OzRoundRobinPriorityTaskQueue"))(u,c);var o=new(r("oz-player/scheduling/OzSequentialTaskScheduler"))(n,{taskTimeout:d});e.set(t,n),s.set(t,o),o.start()}return n}l.OZ_QUEUE_MAX_PRIORITY=u,l.getQueue=m}),98); __d("oz-player/networks/OzStreamingTaskStateManager",["Promise","oz-player/networks/OzStreamingTask","oz-player/networks/OzStreamingTaskQueueProvider","oz-player/networks/getOzBandwidthEstimatorPipeThroughReporter","oz-player/shims/OzSubscriptionsHandler"],(function(t,n,r,o,a,i,l){"use strict";var e,s=(function(){function t(e){var t=this;this.$3=new(r("oz-player/shims/OzSubscriptionsHandler")),this.$4=0,this.$9=!1,this.$10=null;var n=e.bandwidthEstimator,a=e.config,i=e.loggerProvider,l=e.mimeType,s=e.priorityCalculator,u=e.setCustomFetchStreamLoggingAttributes;this.$5=l,this.$1=s,this.$6=o("oz-player/networks/OzStreamingTaskQueueProvider").getQueue(this.$5),this.$7=i,this.$8=a,this.$11=n!=null?n:null,this.$10=u,this.$3.addSubscriptions(this.$1.addListener("state_changed",function(e,n){t.$12(e,n),t.$2&&t.$6.updatePriority(t.$2,t.$4)}))}var a=t.prototype;return a.$13=function(){var e=[];return e.push(r("oz-player/networks/getOzBandwidthEstimatorPipeThroughReporter")(this.$5,this.$11)),e},a.startStreamDeferred=function(t){var e=t.dataAppendedCallback,n=t.dataAppendedErrorCallback,r=t.debugName,o=t.mediaStreamType,a=t.networkManager,i=t.segments,l=t.segmentsLoggerProvider,s=this.$14(l),u=this.$13(),c;i.length>0?c=a.createPausableStream({debugName:r,segments:i,pipeThroughRangeStreamProviders:u,loggerProvider:l,mediaStreamType:o,dataAppendedCallback:e,dataAppendedErrorCallback:n}):c=null,this.$9=!0;var d=s.addStreamDeferred(c,l);return{genStream:d.genStream,cancel:d.cancel,getStatusChangePromise:this.$15(d.getStatusChangePromise)}},a.$14=function(t){var e=this.$2;return this.$12(this.$1.compute(),"start_stream"),!e||e.isCancelled()?(e=this.$2=new(r("oz-player/networks/OzStreamingTask"))(this.$8,t,this.$10),this.$6.enqueue(e,this.$4)):this.$6.updatePriority(e,this.$4),e},a.$15=function(r){var t=this;return function(){return r().then(function(e){return t.$16(),e}).catch(function(r){return t.$16(),(e||(e=n("Promise"))).reject(r)})}},a.finishTaskIfNoOngoingStream=function(){this.$9||this.$17()},a.destroy=function(){this.$3.release();var e=this.$2;this.$2=null,e&&this.$6.remove(e)},a.$16=function(){this.$9=!1,this.$12(this.$1.compute(),"end_stream"),this.$40&&r.getCurrentTime()=e});return n!=null&&n.length>0?n[0]:null}i.getRangeForTime=e}),66); __d("oz-player/streams/OzSegmentLocator",["oz-player/utils/OzNumericalRangeUtil","oz-player/utils/OzRangeUtils"],(function(t,n,r,o,a,i,l){"use strict";function e(e){var t=e.getEndingSegment();return t!=null&&t.getSequenceNumber()!=null?t.getSequenceNumber():0}var s=function(t,n){var e=t.getCurrentTime();return n?o("oz-player/utils/OzRangeUtils").getRangeForTime(e,n.getBufferedRanges()):null},u=function(t,n,r){var e=s(t,n),o=r?r.getTimeRange().endTime:0,a=t.getCurrentTime()||0;return o?a=o:e&&(a=e.endTime),a},c=function(t,n,r,a,i,l,s,c){var e=t.getPredictedSegmentAfter(l);if(e&&n.isPlaying())return e;var d=u(n,a,l),m=i.getTimeRanges(),p=o("oz-player/utils/OzNumericalRangeUtil").findDiffCoveredByRanges(n.getCurrentTime(),d,m.map(function(e){return{rangeStart:e.startTime,rangeEnd:e.endTime}}));if(p>r)return null;var _=t.getSegment(0);return _&&_.getTimeRange().startTime>d&&(d=_.getTimeRange().startTime),t.getSegmentByTime(d)};l.getEndingSequenceNumber=e,l.getTimeToQuery=u,l.getSegment=c}),98); __d("oz-player/streams/OzSegmentUtils",["oz-player/manifests/OzSegmentOptions","oz-player/shims/OzURI"],(function(t,n,r,o,a,i,l){"use strict";function e(e){return e.reduce(function(e,t){var n,r;return((n=t==null?void 0:t.getSequenceNumber())!=null?n:0)>((r=e==null?void 0:e.getSequenceNumber())!=null?r:0)?t:e})}function s(e,t){var n=new(r("oz-player/manifests/OzSegmentOptions"));return e.getPredictedSegmentAfter({getData:function(){return null},getByteRange:function(){return null},getSequenceNumber:function(){return t-1},getTimeRange:function(){return{endTime:0,startTime:0}},getURI:function(){return new(r("oz-player/shims/OzURI"))("")},getOptions:function(){return n}})}function u(e){return e.getOptions().setSegmentNumDecisionTime(Date.now()),e}l.getMaxSegment=e,l.getSegmentForSequenceNumber=s,l.markSegmentCreateTime=u}),98); __d("oz-player/utils/OzTaggedTimeRanges",[],(function(t,n,r,o,a,i){var e=(function(){function e(e){this.$1=[],this.$2=0,this.$3=0,this.$4=e||function(e,t){return e===t}}var t=e.prototype;return t.add=function(t,n,r){if(!(n=this.$1[a].startTime&&(e=a+1),n<=this.$1[a].endTime&&(o=a),n=n.startTime&&(this.$1.splice(e-1,2,{startTime:r.startTime,endTime:Math.max(n.endTime,r.endTime),tag:n.tag}),e--):(r.endTime>n.startTime&&r.startTime===n.startTime?(this.$1.splice(e-1,1),e--):r.endTime>n.startTime&&this.$1.splice(e-1,1,{startTime:r.startTime,endTime:n.startTime,tag:r.tag}),r.endTime>n.endTime&&this.$1.splice(e+1,0,{startTime:n.endTime,endTime:r.endTime,tag:r.tag})));var o=null;e!==this.$1.length-1&&(o=this.$1[e+1]),o&&(this.$4(o.tag,n.tag)?o.startTime<=n.endTime&&this.$1.splice(e,2,{startTime:n.startTime,endTime:Math.max(o.endTime,n.endTime),tag:n.tag}):o.startTime<=n.endTime&&(o.endTime=this.$3?this.$2:0,n=null,r=e;r0)?n="no_reset_anchor":(n="reset_anchor",a.$OzMediaStream$p_41=Date.now(),a.$OzMediaStream$p_9!=null&&(a.$OzMediaStream$p_48(),a.$OzMediaStream$p_31=!1,a.$OzMediaStream$p_24&&a.$OzMediaStream$p_24.resolve())),a.$OzMediaStream$p_18.cloneContext().getOperationLogger("media_element_event").setInitiator("seeking").setLength(t*1e3).setReason(n).setUserInfo({streamAnchorSegmentNumber:String((e=a.$OzMediaStream$p_9)==null?void 0:e.getSequenceNumber())}).log()})),a.$OzMediaStream$p_40!=null&&a.$OzMediaStream$p_17.addSubscriptions(a.$OzMediaStream$p_40.onRepresentationBlocked(function(e){return a.$OzMediaStream$p_49(e)})),a.$OzMediaStream$p_21=o("oz-player/utils/OzMimeUtil").getMimeType(y.getMimeCodecs()),a.$OzMediaStream$p_30=new(r("oz-player/networks/OzStreamingTaskStateManager"))({mimeType:a.$OzMediaStream$p_21,priorityCalculator:a.$OzMediaStream$p_27,loggerProvider:a.$OzMediaStream$p_18,setCustomFetchStreamLoggingAttributes:a.$OzMediaStream$p_39,config:a.$OzMediaStream$p_1,bandwidthEstimator:a.$OzMediaStream$p_12.getBandwidthEstimator()}),a.$OzMediaStream$p_23=new(r("oz-player/streams/OzMediaStreamLoopDriver"))(a,a.$OzMediaStream$p_18),a.$OzMediaStream$p_50(y),a}babelHelpers.inheritsLoose(n,t);var a=n.prototype;return a.start=function(){this.$OzMediaStream$p_23.start()},a.getCurrentRepresentation=function(){return this.$OzMediaStream$p_8},a.switchRepresentation=function(t,n){n===void 0&&(n=null),this.$OzMediaStream$p_50(t,"user",n)},a.onError=function(t){return this.$OzMediaStream$p_33.onError(t)},a.updateRunTimeConfigs=function(t){var e=t.resetStreamAnchor,n=t.streamDataHandler;n!==void 0&&(this.$OzMediaStream$p_34=n),e===!0&&this.$OzMediaStream$p_8.canApproximateId()&&(this.$OzMediaStream$p_48(),this.$OzMediaStream$p_10=null)},a.$OzMediaStream$p_50=function(t,n,a){var e,i=this;if(n===void 0&&(n="internal"),a===void 0&&(a=null),t==null){if(this.$OzMediaStream$p_1.getBool("no_rep_to_switch_fallback_progressive")){var l=o("oz-player/utils/OzErrorUtils").createOzError({type:"OZ_NO_AVAILABLE_REP_TO_SWITCH",description:"No available representation to switch to because all are blocked"});this.$OzMediaStream$p_33.emitError(l)}return}n==="user"&&this.$OzMediaStream$p_48(),(e=this.$OzMediaStream$p_20)==null||e.remove(),this.$OzMediaStream$p_20=null;var s=this.$OzMediaStream$p_18.cloneContext().setType(this.$OzMediaStream$p_21+";init"),u=s.cloneContext().setRepresentationID(t.getID()),c=t.getInitSegment(),d=c.getData(),m=s.getOperationLogger("stream_switch").setPreviousRepresentationID(this.$OzMediaStream$p_8?this.$OzMediaStream$p_8.getID():null).setInitiator(n).setRepresentationID(t.getID()).setReason(n==="internal"?this.$OzMediaStream$p_16&&this.$OzMediaStream$p_16.getLastEvaluationReason():n).start();this.$OzMediaStream$p_8=t;var p=function(){var e;m.log(),i.$OzMediaStream$p_26.handleEvent("append_succeeded"),i.emit("initAppended"),(e=i.$OzMediaStream$p_14)==null||e.notifyRepresentationSwitched(i)},_=function(n){var e;if(m.setError(n).log(),i.$OzMediaStream$p_51(n),(e=i.$OzMediaStream$p_40)==null||e.handleError(t.getID(),n),t.getID()!==i.$OzMediaStream$p_8.getID()){var r;(r=i.$OzMediaStream$p_24)==null||r.resolve()}};if(d==null){var f=this.$OzMediaStream$p_12.request({debugName:"OzMediaStream/init/"+this.$OzMediaStream$p_44,segments:[c],pipeThroughRangeStreamProviders:[r("oz-player/networks/getOzBandwidthEstimatorPipeThroughReporter")(this.$OzMediaStream$p_21,this.$OzMediaStream$p_12.getBandwidthEstimator())],loggerProvider:u,requestOptions:null,mediaStreamType:this.$OzMediaStream$p_44,dataAppendedCallback:p,dataAppendedErrorCallback:_});d=f.getStream()}if(this.emit("switchRepresentation",n,t),this.$OzMediaStream$p_52({data:d,mimeCodecs:t.getMimeCodecs(),clearSourceBufferRange:a,dataAppendedCallback:p,dataAppendedErrorCallback:_,loggerProvider:u.cloneContext(),appendTarget:0}),a){var g=t.getSegmentByTime(a[0]);if(g){var h=this.$OzMediaStream$p_12.request({debugName:"OzMediaStream/startingSegment/"+this.$OzMediaStream$p_44,segments:[g],pipeThroughRangeStreamProviders:[r("oz-player/networks/getOzBandwidthEstimatorPipeThroughReporter")(this.$OzMediaStream$p_21,this.$OzMediaStream$p_12.getBandwidthEstimator())],loggerProvider:u,requestOptions:null,mediaStreamType:this.$OzMediaStream$p_44,dataAppendedCallback:p,dataAppendedErrorCallback:_}),y=h.getStream();this.$OzMediaStream$p_52({data:y,mimeCodecs:t.getMimeCodecs(),clearSourceBufferRange:null,dataAppendedCallback:p,dataAppendedErrorCallback:_,loggerProvider:u.cloneContext(),appendTarget:1})}}},a.getLoopInterval=function(){return this.$OzMediaStream$p_22},a.execute=function(){var e=this.$OzMediaStream$p_53();if(e){var t=this.$OzMediaStream$p_24=new(r("oz-player/shims/OzDeferred"))(r("oz-player/shims/OzMaybeNativePromise"));return e.then(function(){return t.resolve()}).catch(function(e){return t.reject(e)}),t.getPromise()}return null},a.$OzMediaStream$p_54=function(t){if(this.$OzMediaStream$p_16&&this.$OzMediaStream$p_29&&this.$OzMediaStream$p_15){var e=this.$OzMediaStream$p_16.getBestRepresentation(t);if(this.$OzMediaStream$p_8!==e)return e}return null},a.$OzMediaStream$p_55=function(t){var e=this.$OzMediaStream$p_6?this.$OzMediaStream$p_6.getSourceBufferState():null,n=this.$OzMediaStream$p_26.computeBufferTarget();if(n<=0)return null;var r=null;if(t&&(r=this.$OzMediaStream$p_8.getCustomFieldFirstSegment()),!r&&this.$OzMediaStream$p_8.canPredict()&&this.$OzMediaStream$p_36!=null){var a=this.$OzMediaStream$p_35&&this.$OzMediaStream$p_7.isPlaying();return this.$OzMediaStream$p_36.getSegment(this.$OzMediaStream$p_8,this.$OzMediaStream$p_7,n,e,this.$OzMediaStream$p_9,this.$OzMediaStream$p_10,this.$OzMediaStream$p_1,a,this.$OzMediaStream$p_21)}else if(r||(r=o("oz-player/streams/OzSegmentLocator").getSegment(this.$OzMediaStream$p_8,this.$OzMediaStream$p_7,n,e,this.$OzMediaStream$p_8,this.$OzMediaStream$p_9,this.$OzMediaStream$p_1,this.$OzMediaStream$p_32)),this.$OzMediaStream$p_8.canPredict()){var i=this.$OzMediaStream$p_10&&this.$OzMediaStream$p_10.getSequenceNumber()||0,l=r&&r.getSequenceNumber()||0;if(r&&this.$OzMediaStream$p_10&&i>=l){var s=o("oz-player/streams/OzSegmentLocator").getEndingSequenceNumber(this.$OzMediaStream$p_8);return(s||0)>=i?this.$OzMediaStream$p_10:null}}if(!r&&!this.$OzMediaStream$p_56()){var u=this.$OzMediaStream$p_8.getEndingSegment();if(u&&this.$OzMediaStream$p_8.isEndingSegment(u)){var c=u.getTimeRange().endTime,d=o("oz-player/streams/OzSegmentLocator").getTimeToQuery(this.$OzMediaStream$p_7,e,this.$OzMediaStream$p_9);d>=c&&!this.$OzMediaStream$p_56()&&(r=u)}}return r},a.$OzMediaStream$p_57=function(){return!this.$OzMediaStream$p_15},a.$OzMediaStream$p_58=function(t,n){var e,a,i=(e=n.fetchSingleSegment)!=null?e:!1,l=(a=n.preventRepresentationSwitch)!=null?a:!1,s=[];if(i)s=[t];else{var u=this.$OzMediaStream$p_28.computeMin(this.$OzMediaStream$p_7,t,this.$OzMediaStream$p_8);if(s=o("oz-player/strategies/OzStreamLengthStrategy").getStreamingSegments(this.$OzMediaStream$p_1,u,this.$OzMediaStream$p_8,this.$OzMediaStream$p_7,t),s=r("oz-player/networks/OzNetworkManager").getStreamableSegmentsRange(s),!l){var c=this.$OzMediaStream$p_54(s);if(c){this.$OzMediaStream$p_50(c);var d=this.$OzMediaStream$p_55(!1);return d?this.$OzMediaStream$p_58(d,{fetchSingleSegment:!1,preventRepresentationSwitch:!0}):[]}}}return s},a.$OzMediaStream$p_59=function(){var e=this,t=function(n){n==null||n.remove(),e.$OzMediaStream$p_20===n&&(e.$OzMediaStream$p_20=null)};t(this.$OzMediaStream$p_20);var n=null;return new(r("oz-player/shims/OzMaybeNativePromise"))(function(r,o){n=e.getCurrentRepresentation().addUpdateListener(function(){t(n),r()}),e.$OzMediaStream$p_20=n}).catch(function(e){throw t(n),e})},a.$OzMediaStream$p_53=function(){var t=this,n=this.$OzMediaStream$p_6?this.$OzMediaStream$p_6.getSourceBufferState():null;if(this.$OzMediaStream$p_8.canPredict()&&this.$OzMediaStream$p_10&&this.$OzMediaStream$p_8.isEndingSegment(this.$OzMediaStream$p_10)){this.endStream("pdash_ending_segment_had_error"),this.$OzMediaStream$p_18.cloneContext().getOperationLogger("media_loop_end").setInitiator("end1").setRepresentationID(this.$OzMediaStream$p_8.getID()).log();return}if(this.$OzMediaStream$p_8.canPredict()&&this.$OzMediaStream$p_9&&this.$OzMediaStream$p_8.isEndingSegment(this.$OzMediaStream$p_9)){this.endStream("pdash_anchor_segment_is_ending_segment"),this.$OzMediaStream$p_18.cloneContext().getOperationLogger("media_loop_end").setInitiator("end2").setRepresentationID(this.$OzMediaStream$p_8.getID()).log();return}var a=this.$OzMediaStream$p_57(),i=this.$OzMediaStream$p_55(a);if(this.$OzMediaStream$p_8.canPredict()&&this.$OzMediaStream$p_11!=null&&o("oz-player/manifests/IOzSegment").isSequenceNumberGreaterOrEqual(i,this.$OzMediaStream$p_11)){this.$OzMediaStream$p_18.cloneContext().getOperationLogger("media_loop_end").setInitiator("segment_end").setRepresentationID(this.$OzMediaStream$p_8.getID()).log();return}if(o("oz-player/manifests/IOzSegment").isSequenceNumberEqual(i,this.$OzMediaStream$p_37)?this.$OzMediaStream$p_38++:this.$OzMediaStream$p_38=0,this.$OzMediaStream$p_37=i,this.$OzMediaStream$p_7.isPlaying()&&this.$OzMediaStream$p_38>0&&this.$OzMediaStream$p_18.cloneContext().getOperationLogger("get_segment_to_stream_same_segment").setReason((i==null?void 0:i.getSequenceNumber())!=null?String(i==null?void 0:i.getSequenceNumber()):null).setLength(this.$OzMediaStream$p_38).setRepresentationID(this.$OzMediaStream$p_8.getID()).setSegmentStartTime(i==null?void 0:i.getTimeRange().startTime).setSegmentEndTime(i==null?void 0:i.getTimeRange().endTime).log(),this.$OzMediaStream$p_31){var l,s;return this.$OzMediaStream$p_22=e,this.$OzMediaStream$p_18.cloneContext().getOperationLogger("media_loop_end").setInitiator("ongoing_stream").setReason(((l=this.$OzMediaStream$p_9)==null?void 0:l.getSequenceNumber())!=null?String((s=this.$OzMediaStream$p_9)==null?void 0:s.getSequenceNumber()):null).setRepresentationID(this.$OzMediaStream$p_8.getID()).log(),null}if(!i||this.$OzMediaStream$p_31){if(this.$OzMediaStream$p_8.canPredict()&&this.$OzMediaStream$p_1.getBool("ms_promise_for_null")){var u=this.$OzMediaStream$p_1.getNumber("ms_promise_for_null_ms");return new(r("oz-player/shims/OzMaybeNativePromise"))(function(e,n){var o=r("oz-player/shims/ozSetTimeoutAcrossTransitions")(function(){r("oz-player/shims/ozClearTimeout")(o),e()},u||(t.$OzMediaStream$p_8.getMaxGopSec()||1)*1e3)})}return this.$OzMediaStream$p_22=e,this.$OzMediaStream$p_31||this.$OzMediaStream$p_30.finishTaskIfNoOngoingStream(),this.$OzMediaStream$p_59()}this.$OzMediaStream$p_22=0;var c=this.$OzMediaStream$p_58(i,{fetchSingleSegment:a});if(c.length===0){var d,m;return this.$OzMediaStream$p_18.cloneContext().getOperationLogger("media_loop_end").setInitiator("no_stream_segments").setReason(((d=this.$OzMediaStream$p_9)==null?void 0:d.getSequenceNumber())!=null?String((m=this.$OzMediaStream$p_9)==null?void 0:m.getSequenceNumber()):null).setRepresentationID(this.$OzMediaStream$p_8.getID()).log(),this.$OzMediaStream$p_59()}this.$OzMediaStream$p_15=!0;var p=c[c.length-1]||null,_=this.$OzMediaStream$p_8,f=function(){return _.isEndingSegment(p)};c.length!==0||r("oz-player/shims/ozvariant")(0,23148);var g=c[0],h=g.getTimeRange().startTime,y=p.getTimeRange().endTime,C={startTime:h,endTime:y,tag:{id:this.$OzMediaStream$p_8.getID()}},b=function(n){k.setAppendedBufferMs(Math.round(n.appendedSec*1e3)),k.log(),t.$OzMediaStream$p_26.handleEvent("append_succeeded"),c.forEach(function(e){t.emit("SegmentAppended",t.$OzMediaStream$p_60(e,C))}),f()&&t.endStream("appended_ending_segment"),t.$OzMediaStream$p_61(C,n)},v=function(n){k.setError(n).log();var e=L||R;e&&e.cancel(),t.$OzMediaStream$p_51(n)},S=this.$OzMediaStream$p_18.cloneContext();S.setRepresentationID(this.$OzMediaStream$p_8.getID()),S.setSegmentStartTime(h).setSegmentEndTime(y);var R,L;a?(R=this.$OzMediaStream$p_12.request({debugName:"OzMediaStream/streamableSegments/"+this.$OzMediaStream$p_44+"/prefetch",segments:c,pipeThroughRangeStreamProviders:[r("oz-player/networks/getOzBandwidthEstimatorPipeThroughReporter")(this.$OzMediaStream$p_21,this.$OzMediaStream$p_12.getBandwidthEstimator())],loggerProvider:S.cloneContext(),requestOptions:null,mediaStreamType:this.$OzMediaStream$p_44,dataAppendedCallback:b,dataAppendedErrorCallback:v}),this.$OzMediaStream$p_13=R):(L=this.$OzMediaStream$p_30.startStreamDeferred({debugName:"OzMediaStream/streamableSegments/"+this.$OzMediaStream$p_44,segments:c,networkManager:this.$OzMediaStream$p_12,sourceBufferState:n,playbackState:this.$OzMediaStream$p_7,segmentsLoggerProvider:S.cloneContext(),mediaStreamType:this.$OzMediaStream$p_44,dataAppendedCallback:b,dataAppendedErrorCallback:v}),this.$OzMediaStream$p_13=R),this.$OzMediaStream$p_31=!0;var E=this.$OzMediaStream$p_62(g,p,c.length),k=S.getOperationLogger("queued_append");k.start().setReason(this.$OzMediaStream$p_16&&this.$OzMediaStream$p_16.getLastEvaluationReason());var I=function(n,r){t.$OzMediaStream$p_52({data:n,mimeCodecs:r,clearSourceBufferRange:null,dataAppendedCallback:b,dataAppendedErrorCallback:v,loggerProvider:S.cloneContext(),appendTarget:E})},T;L||R||r("oz-player/shims/ozvariant")(0,23147);var D=this.$OzMediaStream$p_8.getMimeCodecs();L?(L.genStream().then(function(e){return I(e,D)}).catch(function(e){return t.$OzMediaStream$p_33.emitError(e)}),T=L.getStatusChangePromise()):R&&(I(R.getStream(),D),T=R.getStatusChangePromise()),T||r("oz-player/shims/ozvariant")(0,51928);var x=T.then(function(e){return t.$OzMediaStream$p_63(e,p),t.$OzMediaStream$p_64()}).then(function(){t.$OzMediaStream$p_2=0});return x.catch(function(e){var n,r=t.$OzMediaStream$p_9;return t.$OzMediaStream$p_65(p),(n=t.$OzMediaStream$p_40)==null||n.handleError(_.getID(),e),t.$OzMediaStream$p_66(e,p,r)})},a.handleError=function(t){var e=this.$OzMediaStream$p_18.getOperationLogger("media_stream_loop_error");return e.setError(t).setResult("failed").log(),this.$OzMediaStream$p_1.getNumber("loop_body_handle_error_interval_ms")},a.$OzMediaStream$p_66=function(t,n,a){var e=this;this.$OzMediaStream$p_31=!1;var i=new(r("oz-player/shims/OzDeferred"))(r("oz-player/shims/OzMaybeNativePromise")),l=o("oz-player/utils/OzErrorUtils").getNormalizedErrorAndCode(t),s=l[0],u=l[1],c=o("oz-player/utils/OzErrorUtils").getOzErrorWithMIMEType(s,this.$OzMediaStream$p_21),d=function(l){if(e.$OzMediaStream$p_2++,e.$OzMediaStream$p_18.getOperationLogger("media_stream").setInitiator("fetch_stream_"+(l.behavior!=null?l.behavior:"default")).setLength(l.timeoutMs).setReason(""+c.getDescription()).setError(c).setCode(u.length>0?Number.parseInt(u,10):null).setType(e.$OzMediaStream$p_21).log(),l.behavior==="retry_failed_request")e.$OzMediaStream$p_9=a;else if(l.behavior==="recover_failed_request"&&o("oz-player/utils/OzErrorUtils").isOzError(t)){var n,s=(n=t.getExtra())==null?void 0:n.headers,d=r("oz-player/shims/OzNetworkDiagnostics").getNextValidSegmentId(s);d!=null&&(e.$OzMediaStream$p_9=o("oz-player/streams/OzSegmentUtils").getSegmentForSequenceNumber(e.$OzMediaStream$p_8,d-1))}r("oz-player/shims/ozSetTimeoutAcrossTransitions")(function(){return e.emit("streamErrorRetry",c),i.resolve()},l.timeoutMs)};this.$OzMediaStream$p_4!==u?(this.$OzMediaStream$p_4=u,this.$OzMediaStream$p_3=1):this.$OzMediaStream$p_3++;var m=!0,p=function(){m=!1},_={consecutiveFailuresForErrorCode:this.$OzMediaStream$p_3,endStream:function(){p(),e.$OzMediaStream$p_10=n,e.$OzMediaStream$p_11=n,e.endStream("streamError_event_object"),i.resolve()},error:c,isInitialRequest:!1,retry:function(t){var e;p(),d({timeoutMs:(e=t==null?void 0:t.waitMs)!=null?e:0,behavior:t==null?void 0:t.behavior})},retryAttemptCount:this.$OzMediaStream$p_2};return this.emit("streamError",_),m&&(this.$OzMediaStream$p_33.emitError(c),this.$OzMediaStream$p_2=0,i.resolve()),i.getPromise()},a.$OzMediaStream$p_65=function(t){this.$OzMediaStream$p_48(),this.$OzMediaStream$p_10=t,this.$OzMediaStream$p_30.finishTaskIfNoOngoingStream();var e=this.$OzMediaStream$p_6;e&&e.cancelOperationAndCleanQueue(this.$OzMediaStream$p_18)},a.$OzMediaStream$p_63=function(t,n){t==="done"&&(this.$OzMediaStream$p_9=n)},a.$OzMediaStream$p_64=function(){this.$OzMediaStream$p_31=!1},a.$OzMediaStream$p_52=function(t){this.$OzMediaStream$p_19.push(t),this.$OzMediaStream$p_6&&this.$OzMediaStream$p_47()},a.$OzMediaStream$p_61=function(t,n){t!=null&&(this.$OzMediaStream$p_8.canPredict()&&n.startTime_UNSAFE&&n.endTime_UNSAFE?this.$OzMediaStream$p_25.add(n.startTime_UNSAFE,n.endTime_UNSAFE,t.tag):this.$OzMediaStream$p_25.add(t.startTime,t.endTime,t.tag))},a.$OzMediaStream$p_47=function(){var e=this;this.$OzMediaStream$p_19.forEach(function(t){var n=t.appendTarget,o=t.clearSourceBufferRange,a=t.data,i=t.dataAppendedCallback,l=t.dataAppendedErrorCallback,s=t.loggerProvider,u=t.mimeCodecs,c=a instanceof Uint8Array||e.$OzMediaStream$p_34==null?a:a.pipeThrough(new(r("oz-player/networks/OzReadableStreamDataReader"))(e.$OzMediaStream$p_34.bind(e,e.$OzMediaStream$p_8),e.$OzMediaStream$p_1));e.$OzMediaStream$p_6&&e.$OzMediaStream$p_6.queueData(c,u,o,s,n).then(function(e){e&&i(e)}).catch(function(e){l(e)})}),this.$OzMediaStream$p_19=[]},a.$OzMediaStream$p_67=function(){var e=this.$OzMediaStream$p_6;if(!e)return r("oz-player/shims/OzMaybeNativePromise").resolve();var t=this.$OzMediaStream$p_7.getCurrentTime(),n=[{fromTime:0,toTime:t}],o=this.$OzMediaStream$p_1.getNumber("clear_buffer_around_playhead_boundary_ms");if(o>0){var a=o/1e3,i=e.getSourceBufferState(),l=i.getBufferedRanges(),s=l.length>=1?l[l.length-1].endTime:t;n=[{fromTime:0,toTime:Math.max(0,t-a)}],t+a0){var a=t.getByteRange(),i=n.getByteRange();a&&i&&i.endByte!=null&&(e=Math.ceil((i.endByte-a.startByte+1)/(r*o)))}return e===0&&(e=this.$OzMediaStream$p_1.getNumber("append_byte_target_without_range")),e},a.getIsAdaptationEnabled=function(){return this.$OzMediaStream$p_29},a.enableAdaptation=function(){this.$OzMediaStream$p_29=!0},a.disableAdaptation=function(){this.$OzMediaStream$p_29=!1},a.destroy=function(){this.$OzMediaStream$p_23.stop(),this.$OzMediaStream$p_5.then(function(e){e.destroy()},function(){}).catch(function(e){r("oz-player/shims/ozReportUnexpectedError")(e,"OzMediaStream SBM promise then - destroy")}),this.$OzMediaStream$p_30.destroy(),this.$OzMediaStream$p_17.release(),this.$OzMediaStream$p_17.engage(),this.removeAllListeners(),this.$OzMediaStream$p_20&&(this.$OzMediaStream$p_20.remove(),this.$OzMediaStream$p_20=null)},a.getRepresentationIDAtTime=function(t){var e=this.$OzMediaStream$p_25.get(t);if(!e){var n=this.$OzMediaStream$p_8.getTimeRanges(),r=n[n.length-1],o=.001;r&&t>=r.endTime&&t<=this.$OzMediaStream$p_7.getDuration()+o&&(e=this.$OzMediaStream$p_25.get(r.endTime-o))}return e?e.id:null},a.endStream=function(t){var e;(e=this.$OzMediaStream$p_14)==null||e.notifyMediaStreamEnded(this,t),this.$OzMediaStream$p_69()},a.endStreamIfBufferedToEndTime=function(){var e=this.$OzMediaStream$p_8.getTimeRanges();if(e.length>0){var t=e[e.length-1].endTime;if(this.$OzMediaStream$p_6){var n=this.$OzMediaStream$p_6.getSourceBufferState().getBufferedRanges();n.length>0&&Math.abs(n[n.length-1].endTime-t)0&&(this.$OzMediaStream$p_32=e[e.length-1].endTime)}},a.$OzMediaStream$p_56=function(){return this.$OzMediaStream$p_32!==null},a.$OzMediaStream$p_49=function(t){this.$OzMediaStream$p_8.getID()===t&&this.$OzMediaStream$p_16!=null&&this.$OzMediaStream$p_50(this.$OzMediaStream$p_16.getBestRepresentation())},a.setEnableLiveheadCatchup=function(t){this.$OzMediaStream$p_35=t},a.clearSourceBufferRange=function(t,n){var e=this.$OzMediaStream$p_6;return e?e.clearRangeWithWait([{fromTime:t,toTime:n}]):r("oz-player/shims/OzMaybeNativePromise").resolve()},a.getDebug=function(){return{SourceBufferManager:this.$OzMediaStream$p_6,MediaStreamAbrManager:this.$OzMediaStream$p_16}},n})(r("oz-player/shims/OzEventEmitter"));l.default=c}),98); __d("oz-player/streams/OzPredictedSegmentLocator",["oz-player/streams/OzSegmentLocator","oz-player/streams/OzSegmentUtils","oz-player/utils/OzSourceBufferUtil"],(function(t,n,r,o,a,i,l){"use strict";function e(e,t){var n=0;for(var r in e){var o;r!==t&&(n=Math.max(n,(o=e[r].lastSkippedToSegmentNumber)!=null?o:0))}return n}function s(e,t){var n=null;for(var r in e)r!==t&&e[r].inBufferAheadTimeSince!=null&&(n=n!=null?Math.min(n,e[r].inBufferAheadTimeSince):e[r].inBufferAheadTimeSince);return n}var u=(function(){function t(e){this.$5={};var t=e.dynamicVideoLibrary,n=e.liveLatencyManager,r=e.loggerProvider,o=e.videoNode;this.$1=o,this.$2=n,this.$3=r,this.$4=t}var n=t.prototype;return n.getSegment=function(t,n,r,o,a,i,l,s,u){var e,c;this.$5[u]==null&&(this.$5[u]={lastSkippedToSegmentNumber:null,inBufferAheadTimeSince:null}),(e=this.$2)==null||e.setEnableCatchup(s);var d=this.$6(t,n,r,o,a,i,l,s,u);(c=d.segment)==null||c.getOptions().setSegmentNumDecisionTime(Date.now()),d.segment===null&&this.$3.getOperationLogger("segment_locator").setInitiator(d.initiator).setReason(d.reason).setType(u).setUserInfo(d.userInfo).log();var m=this.$4;if(d.segment&&m!=null){var p=d.segment.getOptions();p.setIsDVLEnabled(m.shouldRequestDynamicInfo(u))}return d.segment},n.$6=function(n,r,a,i,l,u,c,d,m){var t,p,_,f,g,h=r.getCurrentTime(),y=this.$2==null?!1:this.$2.shouldEnableCursorBasedCatchup(),C=i!=null?o("oz-player/utils/OzSourceBufferUtil").getTotalBufferAheadOfPosition(i.getBufferedRanges(),r.getCurrentTime(),c):{bufferAheadSec:0,bufferedOffset:0},b=C.bufferAheadSec,v=C.bufferedOffset,S=null,R=null,L=this.$2?this.$2.enabled():!0,E=n.getPredictedSegmentAfter(l),k=o("oz-player/streams/OzSegmentUtils").getSegmentForSequenceNumber(n,c.getNumber("pdash_download_cursor_between_catchups_seg")>0?e(this.$5):e(this.$5,m)),I=!0,T=null;if(y&&d&&((t=E)==null?void 0:t.getSequenceNumber())!=null&&((p=(_=E)==null?void 0:_.getSequenceNumber())!=null?p:0)<=((f=k==null?void 0:k.getSequenceNumber())!=null?f:0)){var D,x,$;E=k,S="paired_catchup",this.$3.getOperationLogger("segment_locator").setInitiator(S).setUserInfo({bufferAheadSec:String(b),bufferedOffset:String(v)}).setLength(((D=k==null?void 0:k.getSequenceNumber())!=null?D:0)-((x=($=E)==null?void 0:$.getSequenceNumber())!=null?x:0)).setType(m).log(),I=!1,T=S}else if(y&&d&&L&&E!=null&&(g=this.$2)!=null&&g.isBehindPreferredLiveHeadLatencyWithTolerance()){var P,N;if(this.$2&&b>this.$2.getPreferredLiveHeadLatencySec()&&v==0)return{segment:null,initiator:"catchup_pause",userInfo:{bufferAheadSec:String(b),bufferedOffset:String(v)}};var M=n.getEndingSegment(),w=o("oz-player/streams/OzSegmentUtils").getMaxSegment([M,E]),A=c.getNumber("pdash_download_cursor_between_catchups_seg")===0||((P=k==null?void 0:k.getSequenceNumber())!=null?P:0)+c.getNumber("pdash_download_cursor_between_catchups_seg")<((N=M==null?void 0:M.getSequenceNumber())!=null?N:0);if(A){var F,O,B;if(((F=w==null?void 0:w.getSequenceNumber())!=null?F:0)>((O=(B=E)==null?void 0:B.getSequenceNumber())!=null?O:0)){var W,q,U,V;this.$5[m].lastSkippedToSegmentNumber=(W=w==null?void 0:w.getSequenceNumber())!=null?W:0,this.$3.getOperationLogger("segment_locator").setInitiator("catchup").setUserInfo({bufferAheadSec:String(b),bufferedOffset:String(v)}).setLength(((q=w==null?void 0:w.getSequenceNumber())!=null?q:0)-((U=(V=E)==null?void 0:V.getSequenceNumber())!=null?U:0)).setType(m).log()}E=w,S="catchup",I=!1,T=S}}else if(l==null){var H,G;E=n.getSegmentByTime(h),S="1st_run";var z=n.getTimeRanges();R={approx:String(n.canApproximateId()),ranges:String(z.length),mpdStartTime:z.length>0?String(z[z.length-1].startTime):null,mpdEndTime:z.length>0?String(z[z.length-1].endTime):null},this.$5[m].lastSkippedToSegmentNumber=(H=(G=E)==null?void 0:G.getSequenceNumber())!=null?H:0}if(I&&(I=L,T="stream_state"),I&&b>a)return this.$5[m].inBufferAheadTimeSince==null&&(this.$5[m].inBufferAheadTimeSince=Date.now()),{segment:null,initiator:"buffer_ahead_rule",userInfo:{bufferAheadSec:String(b),bufferedOffset:String(v),lastMaxSegNum:String(e(this.$5,m)),segment:E?String(E.getSequenceNumber()):null,computedBufferAheadTarget:String(a)}};!I&&b>a&&this.$3.getOperationLogger("segment_locator").setUserInfo({bufferAheadSec:String(b),bufferedOffset:String(v),computedBufferAheadTarget:String(a)}).setReason("disabled_buffer_ahead_rule:"+(T||"")).setType(m).log();var j=u&&u.getSequenceNumber()||0,K=E&&E.getSequenceNumber()||0;if(E&&u&&j>=K){var Q=o("oz-player/streams/OzSegmentLocator").getEndingSequenceNumber(n);return(Q||0)>=j?{segment:u}:{segment:null,initiator:"mpd_refresh",userInfo:{leSegNum:String(j)}}}var X=i?o("oz-player/utils/OzSourceBufferUtil").getTotalInBufferedRanges(i.getBufferedRanges()):0,Y=i?o("oz-player/utils/OzSourceBufferUtil").getTotalBufferAheadOfPosition(i.getBufferedRanges(),r.getCurrentTime(),c).bufferAheadSec:0,J=s(this.$5,m),Z=Date.now();if(c.getNumber("download_cursor_total_buffer_max_sec")!=0&&c.getNumber("download_cursor_total_buffer_max_sec")0&&(n.$Player$p_61=new(r("oz-player/states/OzPositionToViewport"))(n.$Player$p_3,n.$Player$p_4)),n.$Player$p_72=ve,n.$Player$p_73=null,n.$Player$p_74={lang:null,role:null},n}babelHelpers.inheritsLoose(a,t);var i=a.prototype;return i.$Player$p_81=function(){this.$Player$p_70||(r("oz-player/shims/ozReportUnexpectedError")(o("oz-player/utils/OzErrorUtils").createOzError({type:"OZ_JAVASCRIPT_NATIVE",description:"ResourceTiming buffer is full"}),"ResourceTiming buffer is full","warn"),this.$Player$p_70=!0)},i.$Player$p_83=function(t){var e=this;this.$Player$p_84();var n=o("oz-player/loggings/OzLoggingUtils").executeOperationAndLog(this.$Player$p_16.cloneContext().setInitiator(this.$Player$p_49),"parse_manifest",function(n){var r,a,i=e.$Player$p_85(t),l=String((r=i.getCustomField("currentServerTimeMs"))!=null?r:""),s=String((a=i.getCustomField("lastVideoFrameTs"))!=null?a:""),u={currentServerTimeMs:l,ingestLastVideoFrameTs:s,nowMs:String(Date.now())},c=o("oz-player/utils/OzMpdUtils").getMpdLastTimeRange(i,e.$Player$p_4),d=c&&c.endTime!=0?c.endTime:null;return n.setLiveheadPosition(d).setLiveheadSeqNumMpd(o("oz-player/utils/OzMpdUtils").getMpdLastSequenceNumber(i)).setManifestType(i.isStaticMpd()?"static":"dynamic").setIsMixedCodecManifest(e.$Player$p_76).setIsTemplatedManifest(!!i.getCustomField("isLiveTemplated")).setUserInfo(u),i});this.$Player$p_86(n)},i.$Player$p_86=function(t){var e=this,n,a;if(this.$Player$p_9=s(t),this.$Player$p_4.getBool("player_emit_mpdparsed_early")&&this.emit("mpdParsed",t),this.$Player$p_26=this.$Player$p_87(),this.$Player$p_27=this.$Player$p_88(),this.$Player$p_67.setAvailableRepresentationsCount(t.getVideoRepresentations().length),this.$Player$p_18!=null){var i=new(r("oz-player/parsers/OzMpdUpdater"))(this.$Player$p_4,t,this.$Player$p_13,this.$Player$p_14,this.$Player$p_16,{mpdUrl:null,createXmlParser:this.$Player$p_89,customParsers:this.$Player$p_28,customRepresentationParsers:this.$Player$p_29,customSegmentTimelineParser:this.$Player$p_30},this.$Player$p_48,this.$Player$p_69,this.$Player$p_78);this.$Player$p_90(i),this.$Player$p_10.addSubscriptions(i.onError(this.$Player$p_11.emitError),i.addListener("manifestFetchError",function(t){return e.emit("manifestFetchError",t)}),i.addListener("manifestFetchErrorRetry",function(t){return e.emit("manifestFetchErrorRetry",t)}),i.addListener("streamTransitionToStatic",this.$Player$p_91),i.addListener("streamGone",this.$Player$p_92)),i.setupUpdateLoop(),this.$Player$p_21=i}this.$Player$p_4.getBool("use_live_latency_manager")?t.isStaticMpd()?this.$Player$p_37=this.$Player$p_37:(this.$Player$p_40=new(r("oz-player/playback_controls/OzLiveLatencyManager"))({config:this.$Player$p_4,mpd:t,playbackState:this.$Player$p_14,bufferingDetector:this.$Player$p_50,video:this.$Player$p_3,loggerProvider:this.$Player$p_16,getUserSelectedPlaybackRate:this.$Player$p_41}),this.$Player$p_37=this.$Player$p_40.getPreferredLiveHeadLatencySec()*-1):this.$Player$p_37=t.isStaticMpd()?this.$Player$p_37:this.$Player$p_93(t),this.$Player$p_19=new(r("oz-player/playback_controls/OzPlayheadManager"))({video:this.$Player$p_3,mpd:t,dynamicVideoLibrary:this.$Player$p_65,playheadCatchup:this.$Player$p_34,playbackState:this.$Player$p_14,config:this.$Player$p_4,perfLoggerProvider:this.$Player$p_16,seekHandler:this.$Player$p_36,initialPlaybackPosition:this.$Player$p_37,canSupportSkipVideobufferGaps:(n=(a=this.$Player$p_64)==null?void 0:a.getCurrentTimePropertyOverwriteSuccess())!=null?n:!1,liveLatencyManager:this.$Player$p_40}),this.$Player$p_20=new(r("oz-player/playback_controls/OzPlaybackTimeRangeManager"))({config:this.$Player$p_4,video:this.$Player$p_3,mpd:t,liveheadFallBehindBlockThreshold:this.$Player$p_39,liveheadFallBehindBlockMargin:this.$Player$p_42,playbackState:this.$Player$p_14,perfLoggerProvider:this.$Player$p_16}),this.$Player$p_94().catch(function(t){var n=o("oz-player/utils/OzErrorUtils").isOzError(t)?t:null;e.$Player$p_11.emitError(o("oz-player/utils/OzErrorUtils").createOzError({type:"OZ_INITIALIZATION",description:"Failed to setup streams: "+String(t),extra:babelHelpers.extends({},n==null?void 0:n.getExtra(),{originalError:t,code:r("oz-player/utils/OzCustomErrorCode").SETUP_STREAMS_PROMISE_REJECTION.toString()})}))}),this.emit("mpdReady",t)},i.load=function(t){var e=this;this.$Player$p_18=t;try{var n=this.$Player$p_8;n!=null?this.$Player$p_83(n):t!=null?this.$Player$p_95(t).then(function(t){if(e.$Player$p_60){e.$Player$p_60=!1,e.load(e.$Player$p_18);return}e.$Player$p_8=t,e.$Player$p_54=0,e.$Player$p_83(t)}).catch(function(n){if(e.$Player$p_60){e.$Player$p_60=!1,e.load(e.$Player$p_18);return}var r=o("oz-player/utils/OzErrorUtils").isOzError(n)?n:null,a=o("oz-player/utils/OzErrorUtils").createOzError({type:"OZ_INITIALIZATION",description:"Failed to setup player with fetched MPD: "+String(n),extra:babelHelpers.extends({},r==null?void 0:r.getExtra(),{originalError:n,url:t})});e.$Player$p_96(a,t)}):this.$Player$p_11.emitError(o("oz-player/utils/OzErrorUtils").createOzError({type:"OZ_INITIALIZATION",description:"Cannot start Oz without a raw mpd xml or mpd url"}))}catch(e){var r=o("oz-player/utils/OzErrorUtils").isOzError(e)?e:null;this.$Player$p_11.emitError(o("oz-player/utils/OzErrorUtils").createOzError({type:"OZ_INITIALIZATION",description:"Failed to setup player: "+String(e),extra:babelHelpers.extends({},r==null?void 0:r.getExtra(),{originalError:e})}))}},i.$Player$p_93=function(t){var e,n,r=(e=t.getVideoRepresentations()[0].getMaxGopSec())!=null?e:0,o=(n=t.getVideoRepresentations()[0].getEndingSegment())==null?void 0:n.getTimeRange(),a=o!=null?o.endTime-o.startTime:0;return a>0&&(r=a),Math.min(this.$Player$p_38+this.$Player$p_4.getNumber("dynamic_mpd_initial_playback_position_offset_modifier"),-1*r*this.$Player$p_4.getNumber("pdash_download_cursor_catchup_threshold_gop_multiplier"))},i.$Player$p_95=function(t){this.$Player$p_54++;var e=this.$Player$p_13.requestRawUrl({debugName:"OzPlayer/fetchMpdXml/mpd",url:t,options:null,loggerProvider:this.$Player$p_16}),n=e.getStream().getReader();return o("oz-player/utils/OzReadableStreamUtils").pumpString(n)},i.$Player$p_97=function(){this.$Player$p_55!=null&&(r("oz-player/shims/ozClearTimeout")(this.$Player$p_55),this.$Player$p_55=null)},i.$Player$p_96=function(t,n){var e=this,o=!0,a=this.$Player$p_54-1,i=t.getExtra().code;this.$Player$p_56!==i?(this.$Player$p_56=i,this.$Player$p_57=1):this.$Player$p_57++;var l=function(){o=!1},s={endStream:function(){l(),e.$Player$p_51=!0,e.emit("streamGoneBeforeStart")},consecutiveFailuresForErrorCode:this.$Player$p_57,error:t,isInitialRequest:!0,retry:function(o){l(),e.$Player$p_97(),e.$Player$p_55=r("oz-player/shims/ozSetTimeoutAcrossTransitions")(function(){e.$Player$p_97(),e.load(n)},(o==null?void 0:o.waitMs)!=null?o==null?void 0:o.waitMs:1e3)},retryAttemptCount:a};this.$Player$p_4.getNumber("initial_manifest_request_retry_count")>0&&this.emit("manifestFetchError",s),o&&this.$Player$p_11.emitError(t)},i.updatePlayerRunTimeConfig=function(t){var e=t.applicationStreamDataHandler,n=t.audioStreamDataHandler,r=t.manifestUrl,o=t.resetStreamAnchor,a=t.videoStreamDataHandler;if(a!==void 0){var i=this.$Player$p_5.get("video");i&&i.updateRunTimeConfigs({streamDataHandler:a})}if(o!==void 0){var l,s=this.$Player$p_5.get("video");s&&s.updateRunTimeConfigs({resetStreamAnchor:o});var u=this.$Player$p_5.get("audio");u&&u.updateRunTimeConfigs({resetStreamAnchor:o}),(l=this.$Player$p_19)==null||l.resetCurrentTime()}if(n!==void 0){var c=this.$Player$p_5.get("audio");c&&c.updateRunTimeConfigs({streamDataHandler:n})}if(e!==void 0){var d=this.$Player$p_5.get("caption");d&&d.updateRunTimeConfigs({streamDataHandler:e,resetStreamAnchor:o})}r!=null&&r!==""&&this.$Player$p_98(r)},i.$Player$p_99=function(t,n){var e=this,r=t.getMimeCodecs(),a=this.$Player$p_7.createSourceBufferManager(n+"/"+t.getMimeType()+"/"+t.getCodecs(),r,n,t.getInitSegment().getData());this.$Player$p_100(a,n,t);var i=a.then(function(t){return e.$Player$p_50&&n!=="caption"&&e.$Player$p_50.setSourceBufferState(n,t.getSourceBufferState()),t});return o("oz-player/loggings/OzLoggingUtils").monitorPromiseAndLogOperation(i,this.$Player$p_16,"source_attach",function(e){e.setType(n)}),i.then(function(t){if(n!=="caption"){var r;(r=e.$Player$p_19)==null||r.observeSourceBufferState(t.getSourceBufferState(),n)}})},i.isDrm=function(){var e=this.$Player$p_48;if(e!=null){var t=e.hasContentProtections();return t!=null?t:!1}return!1},i.$Player$p_84=function(){var e=this.$Player$p_47;if(e.length>0){var t=this.$Player$p_48=new(o("oz-player/drm/OzDrmManager")).OzDrmManager(this.$Player$p_16,this.$Player$p_3,{maxStartEMEAttempts:this.$Player$p_4.getNumber("max_start_eme_attempts"),throwNoLicenseError:!0});e.forEach(function(e){t.addProvider(e)}),this.$Player$p_10.addSubscriptions(t.onError(this.$Player$p_11.emitError))}},i.$Player$p_101=function(t){var e=this,n=s(this.$Player$p_9),o=[this.$Player$p_4,t,this.$Player$p_102(),this.$Player$p_31,this.$Player$p_14,window.devicePixelRatio||1,function(){return e.$Player$p_103()},n.isStaticMpd()?"static":"dynamic",this.$Player$p_16],a=this.$Player$p_35&&this.$Player$p_35.apply(this,o);return a!=null?a:babelHelpers.construct(r("oz-player/strategies/OzAbrManager"),o)},i.$Player$p_104=function(t){return t==="caption"},i.$Player$p_100=function(t,n,a){var e=this,i=s(this.$Player$p_9),l=this.$Player$p_6.get(n),u=new(r("oz-player/streams/OzMediaStream"))({config:this.$Player$p_4,sourceBufferManagerPromise:t,networkManager:this.$Player$p_13,playbackState:this.$Player$p_14,endOfStreamWatcher:n!=="caption"?this.$Player$p_15:null,bufferTargetCalculator:this.$Player$p_105(n),priorityCalculator:this.$Player$p_106(),streamSegmentsCountCalculator:this.$Player$p_107(n),abrManager:l,representation:a,loggerProvider:this.$Player$p_16.cloneContext().setType(n),segmentLocator:this.$Player$p_62,setCustomFetchStreamLoggingAttributes:this.$Player$p_63,blockedRepresentationsManager:this.$Player$p_67,dynamicVideoLibrary:this.$Player$p_65,shouldAppendOncePerStream:this.$Player$p_104(n),mediaStreamType:n,warningEmitter:this.$Player$p_12,mpd:i});this.$Player$p_37===0?u.start():(s(this.$Player$p_9),this.$Player$p_19&&this.$Player$p_10.addSubscriptions(this.$Player$p_19.addListener("initialPlaybackPositionSet",function(){u.start()}))),this.$Player$p_10.addSubscriptions(u.onError(this.$Player$p_11.emitError)),this.$Player$p_23&&this.$Player$p_10.addSubscriptions(this.$Player$p_23.listenToMediaStreamInitAppended(u)),n==="video"&&(this.$Player$p_33=new(r("oz-player/streams/OzHandleUserRepresentationSwitch"))(this.$Player$p_4,this.$Player$p_14,o("oz-player/utils/OzPlaybackRestrictionsUtils").applyVideoPlaybackRestrictions(this.$Player$p_31,this.$Player$p_103(),this.$Player$p_102()),u,t,this.$Player$p_71),this.$Player$p_10.addSubscriptions(this.$Player$p_33.onError(this.$Player$p_11.emitError))),this.$Player$p_5.set(n,u),this.$Player$p_10.addSubscriptions(u.addListener("switchRepresentation",function(){var t,r,o,a=u.getCurrentRepresentation();(t=e.$Player$p_23)==null||t.setTimeRangeProvider(a),(r=e.$Player$p_19)==null||r.setTimeRangeProvider(a),(o=e.$Player$p_20)==null||o.setTimeRangeProvider(a),n==="video"&&e.emit("switchVideoRepresentation")}),u.addListener("SegmentAppended",function(t){e.$Player$p_108("SegmentAppended",t)}),u.addListener("streamError",function(t){e.emit("streamError",t)}),u.addListener("streamErrorRetry",function(t){e.emit("streamErrorRetry",t)}))},i.$Player$p_109=function(){return this.$Player$p_66!=null?[new(r("oz-player/strategies/OzBufferEndLimitStrategy"))(this.$Player$p_3,this.$Player$p_66)]:[new(r("oz-player/strategies/OzStaleManifestBufferTargetStrategy"))(s(this.$Player$p_9),this.$Player$p_4),new(r("oz-player/strategies/OzStartupBufferTargetStrategy"))(this.$Player$p_14,this.$Player$p_4),new(r("oz-player/strategies/OzBufferAheadTargetStrategy"))(this.$Player$p_4)]},i.$Player$p_110=function(){return this.$Player$p_66==null?[new(r("oz-player/strategies/OzBufferTargetCalculatorQuotaExceededConstraint"))({config:this.$Player$p_4,minimumBufferTargetSec:this.$Player$p_4.getNumber("buffer_target_constraint_minimum_sec")})]:[]},i.$Player$p_111=function(){return this.$Player$p_66==null?[new(r("oz-player/strategies/OzBufferTargetCalculatorQuotaExceededConstraint"))({config:this.$Player$p_4,minimumBufferTargetSec:0})]:[]},i.$Player$p_87=function(){return new(r("oz-player/strategies/OzBufferTargetCalculator"))(this.$Player$p_109(),this.$Player$p_110())},i.$Player$p_88=function(){return this.$Player$p_1!=null?new(r("oz-player/strategies/OzBufferTargetCalculator"))([].concat(this.$Player$p_1,this.$Player$p_109()),this.$Player$p_111()):this.$Player$p_87()},i.$Player$p_105=function(t){var e=t==="caption"?this.$Player$p_27:this.$Player$p_26;return e||r("oz-player/shims/ozvariant")(0,76764,t),e},i.$Player$p_90=function(t){var e=this;if(this.$Player$p_4.getNumber("stream_interrupt_check_mpd_stale_count_threshold")>0){var n=this.$Player$p_50,o=new(r("oz-player/strategies/OzPlayheadAtInterruptionDetector"))(this.$Player$p_3,n);this.$Player$p_10.addSubscriptions(o.addListener("playheadAtInterruption",function(t){e.$Player$p_16.getOperationLogger("stream_interrupted").log(),e.emit("streamInterruptAt",t)}),t.addListener("streamInterruptAt",function(t){var n;(n=e.$Player$p_50)==null||n.notifyStreamInterrupted(),o.notifyStreamInterrupted(t)}),t.addListener("streamResumedAt",function(t){var n;e.$Player$p_16.getOperationLogger("stream_resumed").log(),(n=e.$Player$p_50)==null||n.notifyStreamResumed(),o.notifyStreamResumed(),e.emit("streamResumedAt",t)})),this.$Player$p_32=o}},i.$Player$p_106=function(){var e=[new(r("oz-player/strategies/OzPlayingStatePriorityStrategy"))(this.$Player$p_14),new(r("oz-player/strategies/OzBufferAheadPriorityStrategy"))(this.$Player$p_4,this.$Player$p_14)].concat(this.$Player$p_4.getNumber("pixels_below_viewport_to_observe")>0&&this.$Player$p_61!=null?new(r("oz-player/strategies/OzPositionToViewportPriorityStrategy"))(this.$Player$p_61,this.$Player$p_4):[]);return new(r("oz-player/strategies/OzPriorityCalculator"))(e)},i.$Player$p_107=function(t){var e=[new(r("oz-player/strategies/OzStaticStreamSegmentsStrategy"))(this.$Player$p_4),new(r("oz-player/strategies/OzBufferTargetBoundedStreamSegmentsCountStrategy"))(this.$Player$p_105(t),this.$Player$p_4)];return this.$Player$p_4.getNumber("paused_stream_segments_count")!==0&&e.push(new(r("oz-player/strategies/OzPausedStreamSegmentsCountStrategy"))(this.$Player$p_14,this.$Player$p_4)),t==="video"&&e.push(new(r("oz-player/strategies/OzBandwidthBoundaryStreamSegmentsCountStrategy"))(this.$Player$p_4,this.$Player$p_102())),new(r("oz-player/strategies/OzStreamSegmentsCountCalculator"))(e)},i.onError=function(t){return this.$Player$p_11.onError(t)},i.onWarning=function(t){return this.$Player$p_12.onError(t)},i.getSelectedVideoQuality=function(){var e=this.$Player$p_9;if(!e||this.$Player$p_2)return null;var t=this.$Player$p_5.get("video"),n=t&&t.getCurrentRepresentation();if(n instanceof r("oz-player/manifests/OzVideoRepresentation"))return n.getDisplayLabel();var o=this.$Player$p_102(),a=o[0];return a?a.getDisplayLabel():null},i.getTargetAudioTrack=function(){var e=this.$Player$p_9;if(!e)return null;var t=this.$Player$p_5.get("audio"),n=t&&t.getCurrentRepresentation();if(n){var r;return{id:n.getID(),displayLabel:n.getDisplayLabel(),lang:(r=n.getLang())!=null?r:null,role:n.getRole(),mimeCodecs:n.getMimeCodecs(),variantKey:n.getVariantKey()}}var o=this.$Player$p_112(),a=o[0];return a?a.getAudioTrack():null},i.getCurrentPlayingVideoVariant=function(){return this.$Player$p_73},i.getTargetVideoVariant=function(){return this.$Player$p_74},i.switchToVideoQuality=function(t){var e=this.$Player$p_102().find(function(e){return e.getDisplayLabel()===t});if(e){var n=this.$Player$p_5.get("video");n&&(n.switchRepresentation(e),n.disableAdaptation())}},i.switchToVideoVariant=function(t){var e,n,a,i;if(this.$Player$p_74=t===null?{lang:null,role:null}:t,this.$Player$p_74.lang===((e=(n=this.$Player$p_73)==null?void 0:n.lang)!=null?e:null)&&this.$Player$p_74.role===((a=(i=this.$Player$p_73)==null?void 0:i.role)!=null?a:null)){var l,s,u,c;r("oz-player/shims/ozReportUnexpectedError")(o("oz-player/utils/OzErrorUtils").createOzError({type:"OZ_SWITCH_VARIANT",description:"switchToVideoVariant switch to the same lang: "+((l=this.$Player$p_74.lang)!=null?l:"default lang")+", same role: "+((s=this.$Player$p_74.role)!=null?s:"default role")}),"switchToVideoVariant switch to the same lang: "+((u=this.$Player$p_74.lang)!=null?u:"default lang")+", same role: "+((c=this.$Player$p_74.role)!=null?c:"default role"),"warn");return}else if(this.$Player$p_9){if(!this.$Player$p_113(this.$Player$p_74.lang)){var d,m,p,_;r("oz-player/shims/ozReportUnexpectedError")(o("oz-player/utils/OzErrorUtils").createOzError({type:"OZ_SWITCH_VARIANT",description:"switchToVideoVariant lang not exist in mpd: "+((d=this.$Player$p_74.lang)!=null?d:"default lang")+", same role: "+((m=this.$Player$p_74.role)!=null?m:"default role")}),"switchToVideoVariant lang not exist in mpd: "+((p=this.$Player$p_74.lang)!=null?p:"default lang")+", same role: "+((_=this.$Player$p_74.role)!=null?_:"default role"),"warn");return}}else{r("oz-player/shims/ozReportUnexpectedError")(o("oz-player/utils/OzErrorUtils").createOzError({type:"OZ_SWITCH_VARIANT",description:"switchToVideoVariant mpd is void"}),"switchToVideoVariant mpd is void","warn");return}this.$Player$p_114(),this.$Player$p_4.getBool("enable_lip_sync_abr_select_quality")&&this.$Player$p_4.getBool("enable_alternative_audio_tracks")&&this.$Player$p_75&&this.$Player$p_115(),this.$Player$p_73=this.$Player$p_74},i.$Player$p_114=function(){var e=this.$Player$p_112()[0];if(e){var t=this.$Player$p_5.get("audio");t&&(t.switchRepresentation(e,[0,this.$Player$p_14.getDuration()]),t.disableAdaptation())}},i.$Player$p_115=function(){var e=this.$Player$p_5.get("video");if(e){var t=e.getCurrentRepresentation();if(!(t.getLang()===this.$Player$p_74.lang&&t.getRole()===this.$Player$p_74.role)){var n=this.$Player$p_102();if(n.length===0){r("oz-player/shims/ozReportUnexpectedError")(o("oz-player/utils/OzErrorUtils").createOzError({type:"OZ_SWITCH_VARIANT",description:"switchVideoByTargetVariant no representations with target variant: "+JSON.stringify(this.$Player$p_74)}),"switchVideoByTargetVariant no representations with target variant: "+JSON.stringify(this.$Player$p_74),"warn");return}var a,i=this.$Player$p_6.get("video");if(i?(i.updateRepresentations(n),a=i.getBestRepresentation()):a=n[0],!a){r("oz-player/shims/ozReportUnexpectedError")(o("oz-player/utils/OzErrorUtils").createOzError({type:"OZ_SWITCH_VARIANT",description:"switchVideoByTargetVariant unable to update representations given target variant: "+JSON.stringify(this.$Player$p_74)}),"switchVideoByTargetVariant unable to update representations given target variant: "+JSON.stringify(this.$Player$p_74));return}e.switchRepresentation(a,[0,this.$Player$p_14.getDuration()])}}},i.getIsVideoQualityAdaptationEnabled=function(){var e=this.$Player$p_5.get("video");return e?e.getIsAdaptationEnabled():!1},i.enableVideoQualityAdaptation=function(){var e=this.$Player$p_5.get("video");e&&e.enableAdaptation()},i.getVideoQualities=function(){var e=this,t=this.$Player$p_9;if(!t)return[];var n=this.$Player$p_102().filter(function(t){var n;return!((n=e.$Player$p_67)!=null&&n.isBlocked(t.getID()))}),r=n.some(function(e){return o("oz-player/utils/OzMimeUtil").getParsedCodecFamily(e.getCodecs())===u}),a=n.some(function(e){return o("oz-player/utils/OzMimeUtil").getParsedCodecFamily(e.getCodecs())===c}),i=r?n.filter(function(e){return o("oz-player/utils/OzMimeUtil").getParsedCodecFamily(e.getCodecs())===u}):a?n.filter(function(e){return o("oz-player/utils/OzMimeUtil").getParsedCodecFamily(e.getCodecs())===c}):n.filter(function(e){return o("oz-player/utils/OzMimeUtil").getParsedCodecFamily(e.getCodecs())===d});return i.sort(function(e,t){return e.getBandwidth()-t.getBandwidth()}).map(function(e){return e.getDisplayLabel()})},i.getVideoTracks=function(){var e=this,t=this.$Player$p_9;return t?this.$Player$p_102().filter(function(t){var n;return!((n=e.$Player$p_67)!=null&&n.isBlocked(t.getID()))}).map(function(e){return{mimeCodecs:e.getMimeCodecs(),codec:e.getCodecs(),codecFamily:o("oz-player/utils/OzMimeUtil").getParsedCodecFamily(e.getMimeCodecs()),displayLabel:e.getDisplayLabel(),qualityLabel:e.getDisplayLabel(),height:e.getHeight(),id:e.getID(),qualityScoreCurveString:e.getQualityScoreCurveString("csvqm"),width:e.getWidth(),lang:e.getLang(),role:e.getRole(),variantKey:e.getVariantKey()}}):[]},i.getAudioTracks=function(){var e=this,t=this.$Player$p_9;return t?t.getAudioRepresentations().filter(function(t){var n;return!((n=e.$Player$p_67)!=null&&n.isBlocked(t.getID()))}).map(function(e){return e.getAudioTrack()}):[]},i.setEnableLiveheadCatchup=function(t){var e;if(this.$Player$p_20){var n;t?this.$Player$p_16.getOperationLogger("live_catchup_enabled").setIsLatencyCachupEnabled(!0).log():this.$Player$p_16.getOperationLogger("live_catchup_disabled").setIsLatencyCachupEnabled(!1).log(),(n=this.$Player$p_20)==null||n.setTimelineBlockingEnabled(t)}this.$Player$p_5.forEach(function(e){e.setEnableLiveheadCatchup(t)}),(e=this.$Player$p_19)==null||e.setEnableLiveheadCatchup(t)},i.$Player$p_94=function(){var t=this;if(this.$Player$p_4.getBool("enable_alternative_audio_tracks")&&this.$Player$p_113(this.$Player$p_72)){var r;this.$Player$p_74=babelHelpers.extends({},this.$Player$p_74,{lang:(r=this.$Player$p_72)!=null?r:null,role:this.$Player$p_72!=null?"dub":null})}var a=this.$Player$p_102()[0];this.$Player$p_62=a&&a.canPredict()&&this.$Player$p_4.getBool("pdash_use_pdash_segmentlocator")||a&&a.canApproximateId()?new(o("oz-player/streams/OzPredictedSegmentLocator")).OzPredictedSegmentLocator({videoNode:this.$Player$p_3,liveLatencyManager:this.$Player$p_40,loggerProvider:this.$Player$p_16,dynamicVideoLibrary:this.$Player$p_65}):null;var i=this.$Player$p_2?[this.$Player$p_116({liveConfigsFromAudioStream:!0}),this.$Player$p_117()]:[this.$Player$p_118(),this.$Player$p_116({liveConfigsFromAudioStream:!1}),this.$Player$p_117()],l=[];return(e||(e=n("Promise"))).all(i).then(function(){var e=t.$Player$p_5.get("video"),n=t.$Player$p_5.get("audio"),r=t.$Player$p_5.get("caption");e&&l.push(e.getCurrentRepresentation()),n&&l.push(n.getCurrentRepresentation()),r&&l.push(r.getCurrentRepresentation()),l.forEach(function(e){t.$Player$p_10.addSubscriptions(e.addUpdateListener(function(){t.$Player$p_108("SegmentIndexesUpdated",l)}))}),t.$Player$p_108("InitialSegmentIndexes",l),t.$Player$p_3&&t.$Player$p_3.style&&(t.$Player$p_3.style.display=t.$Player$p_2?"none":"block"),t.$Player$p_73=t.$Player$p_74,t.emit("initialized")})},i.$Player$p_119=function(t){if(!t.getTimeRanges().length){this.$Player$p_16.getOperationLogger("playhead_adjustment").setInitiator("setup_initial_duration").setResult("failed").log();return}var e=t.getTimeRanges()[t.getTimeRanges().length-1].endTime;this.$Player$p_7.updateDuration(e,!0)},i.$Player$p_120=function(t){var e,n,o;this.$Player$p_23=new(r("oz-player/media_source/OzMediaSeekableRangeManager"))(this.$Player$p_7,this.$Player$p_4),this.$Player$p_119(t),(e=this.$Player$p_23)==null||e.setTimeRangeProvider(t),(n=this.$Player$p_19)==null||n.setTimeRangeProvider(t),(o=this.$Player$p_20)==null||o.setTimeRangeProvider(t)},i.$Player$p_118=function(){var e=this.$Player$p_102();if(!e.length)return r("oz-player/shims/OzMaybeNativePromise").reject(o("oz-player/utils/OzErrorUtils").createOzError({type:"OZ_INITIALIZATION",description:"No video representations in the manifest",extra:{code:r("oz-player/utils/OzCustomErrorCode").SETUP_STREAMS_PROMISE_REJECTION.toString()}}));var t=o("oz-player/utils/OzPlaybackRestrictionsUtils").applyVideoPlaybackRestrictions(this.$Player$p_31,this.$Player$p_103(),e);if(!t.length){var n=e.map(function(e){return e.getDisplayLabel()+"@"+e.getWidth()+"x"+e.getHeight()+"("+e.getMimeCodecs()+")"});return r("oz-player/shims/OzMaybeNativePromise").reject(o("oz-player/utils/OzErrorUtils").createOzError({type:"OZ_INITIALIZATION",description:"Restricted all video representations: "+n.join(", "),extra:{code:r("oz-player/utils/OzCustomErrorCode").SETUP_STREAMS_PROMISE_REJECTION.toString()}}))}this.$Player$p_120(t[0]);var a=this.$Player$p_121(t);a&&this.$Player$p_4.getBool("enable_abr_logging")&&this.$Player$p_16.getOperationLogger("video_stream_setup_initial_representation_from_prefetch").setResult("success").setReason("player_initialized").setRepresentationID(a.getID()).setPreviousRepresentationID(null).setUserInfo({initialRepresentationIDs:JSON.stringify(this.$Player$p_25)}).setType("video").setInitiator("Player").log();var i=this.$Player$p_101(a||t[0]);return this.$Player$p_6.set("video",i),a||(a=i.getBestRepresentation()),this.$Player$p_99(a||t[0],"video")},i.$Player$p_102=function(){var e=this.$Player$p_9;if(!e)return[];var t=e.getVideoRepresentations();if(this.$Player$p_4.getBool("enable_lip_sync_abr_select_quality")&&this.$Player$p_4.getBool("enable_alternative_audio_tracks")&&this.$Player$p_75){var n=e.getVideoRepresentationsByVariant(this.$Player$p_74);t=n.length>0?n:e.getVideoRepresentationsByVariant({lang:null,role:null})}var r=o("oz-player/utils/OzPlaybackRestrictionsUtils").applyVideoPlaybackRestrictions(this.$Player$p_31,this.$Player$p_103(),t);return t.filter(function(e){return r.includes(e)})},i.$Player$p_112=function(){var e=this.$Player$p_9;return e?this.$Player$p_4.getBool("enable_alternative_audio_tracks")?e.getAudioRepresentationsByVariant(this.$Player$p_74):e.getAudioRepresentations():[]},i.$Player$p_113=function(t){var e=this.$Player$p_9;if(!e)return!1;var n=e.getAudioRepresentations();if(t==null)return!0;if(this.$Player$p_4.getBool("enable_alternative_audio_tracks")&&e.isStaticMpd()){var r=-1;return r=n.findIndex(function(e){return e.getLang()===t}),r>-1}return!1},i.$Player$p_116=function(t){var e=this,n=t.liveConfigsFromAudioStream,o=n===void 0?!1:n,a=s(this.$Player$p_9),i=a.getAudioRepresentations();o&&this.$Player$p_120(i[0]);var l=-1;if(this.$Player$p_4.getBool("enable_alternative_audio_tracks")&&i.length>1&&a.isStaticMpd()&&this.$Player$p_72!=null&&(l=i.findIndex(function(t){return t.getLang()===e.$Player$p_72})),i.length){var u=l>-1?l:i.findIndex(function(e){return e.getLang()==null&&e.getRole()==null}),c=u>-1?u:0;return this.$Player$p_99(l>=0&&l1&&(a=o("oz-player/utils/OzIbrUtils").getInitialAudioRepresentation(t,this.$Player$p_4,this.$Player$p_16)),a||null},i.$Player$p_123=function(t){return null},i.$Player$p_85=function(t){var e=new(r("oz-player/parsers/OzMpdParser"))({config:this.$Player$p_4,ozParserContext:{mpdUrl:this.$Player$p_18,createXmlParser:this.$Player$p_89,customParsers:this.$Player$p_28,customRepresentationParsers:this.$Player$p_29,customSegmentTimelineParser:this.$Player$p_30},networkManager:this.$Player$p_13,perfLoggerProvider:this.$Player$p_16,drmManager:this.$Player$p_48,initialRepresentationIDs:this.$Player$p_25,blockedRepresentationsManager:this.$Player$p_67,enableAlternativeAudioTracks:this.$Player$p_4.getBool("enable_alternative_audio_tracks"),useManagedMediaSource:this.$Player$p_78}),n=e.parse(t);this.$Player$p_10.addSubscriptions(e.onError(this.$Player$p_11.emitError));var a=o("oz-player/utils/OzPlaybackRestrictionsUtils").applyVideoPlaybackRestrictions(this.$Player$p_31,this.$Player$p_103(),n.getVideoRepresentations());if(a.length>1){var i=o("oz-player/utils/OzMimeUtil").getParsedCodecFamily(a[0].getMimeCodecs());this.$Player$p_76=!a.reduce(function(e,t){return e&&o("oz-player/utils/OzMimeUtil").getParsedCodecFamily(t.getMimeCodecs())===i},!0)}return n},i.$Player$p_79=function(){var e=[];return this.$Player$p_17&&e.push(new(o("oz-player/loggings/OzDevConsolePerfLogger")).OzDevConsolePerfLoggerProvider),e},i.$Player$p_124=function(t,n){var e=this.$Player$p_5.get(n);return e?e.getRepresentationIDAtTime(t):null},i.getAudioRepresentationIDAtTime=function(t){return this.$Player$p_124(t,"audio")},i.getVideoRepresentationIDAtTime=function(t){return this.$Player$p_124(t,"video")},i.getCurrentVideoRepresentation=function(){return this.$Player$p_125("video")},i.getCurrentAudioRepresentation=function(){return this.$Player$p_125("audio")},i.getCurrentPlayingAudioTrackID=function(){var e=this.getCurrentAudioRepresentation();return e==null?void 0:e.getID()},i.$Player$p_125=function(t){var e,n=this.$Player$p_124(this.$Player$p_14.getCurrentTime(),t),r=this.$Player$p_9;if(!r)return null;var o=[];return t==="audio"?o=this.$Player$p_112():t==="video"&&(o=this.$Player$p_102()),(e=o.find(function(e){return e.getID()===n}))!=null?e:null},i.getSelectedVideoRepresentation=function(){var e=this.$Player$p_5.get("video");return e!=null?e.getCurrentRepresentation():null},i.getSelectedAudioRepresentation=function(){var e=this.$Player$p_5.get("audio");return e!=null?e.getCurrentRepresentation():null},i.getDebug=function(){var e=this,t=this.$Player$p_5.get("video"),n=this.$Player$p_5.get("audio"),r=this.$Player$p_5.get("caption"),o,a,i,l,u,c,d;if(t){var m,p;if(o=(m=t.getDebug())==null?void 0:m.MediaStreamAbrManager,a=(p=t.getDebug())==null?void 0:p.SourceBufferManager,a){var _;i=(_=a.getDebug())==null?void 0:_.SourceBuffer}}if(n){var f;if(l=(f=n.getDebug())==null?void 0:f.SourceBufferManager,l){var g;u=(g=l.getDebug())==null?void 0:g.SourceBuffer}}if(r){var h;if(c=(h=r.getDebug())==null?void 0:h.SourceBufferManager,c){var y;d=(y=c.getDebug())==null?void 0:y.SourceBuffer}}return{getManifest:function(){return s(e.$Player$p_9)},DashManifestParsed:this.$Player$p_9,VideoSourceStream:t,VideoAbrManager:o,VideoBufferManager:a,VideoSourceBuffer:i,AudioSourceStream:n,AudioBufferManager:l,AudioSourceBuffer:u,CaptionSourceStream:r,CaptionBufferManager:c,CaptionSourceBuffer:d}},i.injectExternalDebugEvent=function(t,n){this.$Player$p_108(t,n)},i.$Player$p_108=function(t,n){this.emit("debug/dashPlayerEvent",{detail:{type:t,event:n}})},i.$Player$p_82=function(){var e=this,t=new(r("oz-player/strategies/OzBufferingDetector"))(this.$Player$p_3,this.$Player$p_4.getLegacyConfig(),function(){return e.$Player$p_51?e.$Player$p_3.duration:1/0});return t.attachPerfLoggerProvider(this.$Player$p_16),this.$Player$p_10.addSubscriptions(t.addListener("enterBuffering",function(t){e.emit("enterBuffering",t)}),t.addListener("leaveBuffering",function(t){e.emit("leaveBuffering",t)})),t},i.$Player$p_103=function(){var e=this.$Player$p_52?this.$Player$p_52():{width:this.$Player$p_3.offsetWidth,height:this.$Player$p_3.offsetHeight};return e},i.getMpdUrl=function(){return this.$Player$p_18},i.$Player$p_98=function(t){var e=this;this.$Player$p_18=t;var n=this.$Player$p_9;if(n){n.updateLocation(t),this.$Player$p_43&&(this.$Player$p_10.releaseOne(this.$Player$p_43),this.$Player$p_43=null);var r=function(){e.$Player$p_43&&(e.$Player$p_10.releaseOne(e.$Player$p_43),e.$Player$p_43=null),e.$Player$p_5.forEach(function(t,r){var o=t.getCurrentRepresentation(),a=o.getDisplayLabel(),i=(r==="video"?e.$Player$p_102():n.getAudioRepresentations()).slice();if(r==="video"){var l=e.$Player$p_6.get(r);l&&l.updateRepresentations(e.$Player$p_102())}var s=i[0];i.forEach(function(e){var t=e.getDisplayLabel();t===a&&(s=e)}),t.switchRepresentation(s),t.restartLoopBody()})};this.$Player$p_43=n.addListener("updated",r),this.$Player$p_10.addSubscriptions(this.$Player$p_43)}else{this.$Player$p_60=!0;return}},i.getPerfLoggerProvider=function(){return this.$Player$p_16},i.getApproximateFBLSToPlayerDisplayLatency=function(){var e,t,n,r,o=Number((e=(t=this.$Player$p_9)==null?void 0:t.getCustomField("lastVideoFrameTs"))!=null?e:void 0),a=Number((n=(r=this.$Player$p_9)==null?void 0:r.getCustomField("currentServerTimeMs"))!=null?n:void 0),i=this.$Player$p_126(o,a),l=this.$Player$p_127(o,a);return{latencyFromClockSync:l,latencyFromMpdUpdate:i}},i.$Player$p_126=function(t,n){if(!this.$Player$p_14.getCurrentTime()||isNaN(t)||isNaN(n))return null;var e=0;this.$Player$p_58===t?e=(r("oz-player/shims/OzPerformance").now()-Number(this.$Player$p_59))/1e3:(this.$Player$p_59=r("oz-player/shims/OzPerformance").now(),this.$Player$p_58=t);var o=t/1e3+e-this.$Player$p_14.getCurrentTime();return o},i.$Player$p_127=function(t,n){var e;if(!this.$Player$p_14.getCurrentTime()||isNaN(t)||isNaN(n)||r("oz-player/networks/OzClientClock").getClientClockOffsetMs()==null||!r("oz-player/networks/OzClientClock").getClientClockOffsetMs())return null;var o=this.$Player$p_14.getCurrentTimeUpdateTime()+((e=r("oz-player/networks/OzClientClock").getClientClockOffsetMs())!=null?e:0),a=n,i=this.$Player$p_14.getCurrentTime()*1e3,l=t,s=(o-a-(i-l))/1e3;return s},i.$Player$p_80=function(){this.$Player$p_5.forEach(function(e){e.restartLoopBody();var t=e.getCurrentRepresentation();e.switchRepresentation(t)})},a})(r("oz-player/shims/OzEventEmitter"));l.default=m}),98); __d("oz-player",["oz-player/Player"],(function(t,n,r,o,a,i,l){"use strict";l.default=r("oz-player/Player")}),98); __d("oz-player/configs/OzConfigUtils",["oz-player/configs/OzPlayerConfig"],(function(t,n,r,o,a,i,l){"use strict";var e=new(r("oz-player/configs/OzPlayerConfig")),s=function(n){return{getBool:function(r){return n.getBool(r,e.getBool(r))},getNumber:function(r){return n.getNumber(r,e.getNumber(r))},getString:function(r){return n.getString(r,e.getString(r))},getLegacyConfig:function(){return n}}};l.provideConfigWithDefaults=s}),98); __d("oz-player/networks/OzClockSyncNetworkRequestStreamHandler",["oz-player/networks/OzClientClock","oz-player/networks/OzTransformStream"],(function(t,n,r,o,a,i,l){"use strict";var e=(function(){function e(){}var t=e.prototype;return t.onResponse=function(t,n){var e=t.headers;if(!e)return null;var o=new(r("oz-player/networks/OzTransformStream"));return o.addListener("writableClose",function(){r("oz-player/networks/OzClientClock").updateOffsetFromHeaderResponse(n,e)}),o},t.onError=function(t,n){return null},e})();l.default=e}),98); __d("reportOzError",["oz-player/utils/OzErrorUtils"],(function(t,n,r,o,a,i,l){"use strict";function e(e){if(o("oz-player/utils/OzErrorUtils").isOzError(e)){var t=e.getExtra();return{error:e.getType(),message:e.getDescription(),httpStatus:t.code,url:t.url,stack:e.stack}}else return{error:"OZ_JAVASCRIPT_NATIVE",message:e.name+" "+e.message,httpStatus:null,url:null,stack:e.stack}}l.default=e}),98); __d("VideoPlayerHTML5Oz",["Deferred","EventEmitter","EventListener","FBLogger","MaybeNativePromise","ODS","OzActiveActiveFailoverNetworkRequestStreamHandler","OzConfigurableRequestImplementation","OzCustomParsers","OzCustomRepresentationParsers","OzDashPrefetchCache","OzMaximumDimensionsRestriction","OzPredictedSegmentTimelineParser","OzVideoLiveTraceNetworkRequestStreamHandler","P2PPlaybackSessionLogger","Promise","SubscriptionsHandler","TimeRanges","URI","VideoPlayerConnectionQuality","VideoPlayerOzWWWConfig","VideoPlayerOzWWWGlobalConfig","VideoPlayerPlayLogger","VideoPlayerQualitiesArray","VideoPlayerShakaPerformanceLogger","asyncToGeneratorRuntime","getErrorSafe","getOzPlaybackRestrictions","gkx","handleOzManifestFetchErrorEvent","handleOzStreamErrorEvent","manifestHasUnsupportedCodecs","nullthrows","oz-player","oz-player/configs/OzConfigUtils","oz-player/networks/OzBandwidthEstimator","oz-player/networks/OzClockSyncNetworkRequestStreamHandler","oz-player/shims/OzStreams","oz-player/utils/OzErrorUtils","reportOzError","throttle"],(function(t,n,r,o,a,i,l){"use strict";var e,s,u,c=/(livestream-)?lookaside\.(facebook|workplace)\.com$/,d=function(t){return c.test(t.getDomain())},m=(function(t){function a(e,n,o){var a,i=o.OzDrmHelper,l=o.accessToken,s=o.config,u=o.desiredLatencyMs,c=o.disableLogging,d=o.graphApiVideoLicenseUri,m=o.height,p=o.isLive,_=o.isServableViaFbms,f=o.latencyToleranceMs,g=o.manifest,h=o.manifestUrl,y=o.minPlayQuality,C=o.p2pSettings,b=o.playerInstanceKey,v=o.playerOrigin,S=o.playerSuborigin,R=o.prefetchCache,L=o.resolutionConstraintMaxHeight,E=o.resolutionConstraintMaxWidth,k=o.seekHandler,I=o.startTimestamp,T=o.videoID,D=o.videoLicenseUriMap,x=o.videoLiveTrace,$=o.widevineCert,P=o.width;return a=t.call(this)||this,a.$VideoPlayerHTML5Oz$p_5=1,a.$VideoPlayerHTML5Oz$p_6=!1,a.$VideoPlayerHTML5Oz$p_7=null,a.$VideoPlayerHTML5Oz$p_8=null,a.$VideoPlayerHTML5Oz$p_16=null,a.$VideoPlayerHTML5Oz$p_23=!1,a.$VideoPlayerHTML5Oz$p_24=!1,a.$VideoPlayerHTML5Oz$p_25=null,a.$VideoPlayerHTML5Oz$p_26=null,a.$VideoPlayerHTML5Oz$p_27=!1,a.$VideoPlayerHTML5Oz$p_28=!1,a.$VideoPlayerHTML5Oz$p_31=!0,a.$VideoPlayerHTML5Oz$p_32=!1,a.$VideoPlayerHTML5Oz$p_43=null,a.$VideoPlayerHTML5Oz$p_47=null,a.$VideoPlayerHTML5Oz$p_48=!1,a.$VideoPlayerHTML5Oz$p_49=null,a.$VideoPlayerHTML5Oz$p_1=e,a.$VideoPlayerHTML5Oz$p_2=g,a.$VideoPlayerHTML5Oz$p_3=new(r("VideoPlayerOzWWWConfig"))(s),a.$VideoPlayerHTML5Oz$p_17=n,a.$VideoPlayerHTML5Oz$p_14=h,a.$VideoPlayerHTML5Oz$p_15=R,a.$VideoPlayerHTML5Oz$p_18=T,a.$VideoPlayerHTML5Oz$p_19=P,a.$VideoPlayerHTML5Oz$p_20=m,a.$VideoPlayerHTML5Oz$p_21=I,a.$VideoPlayerHTML5Oz$p_29=k,a.$VideoPlayerHTML5Oz$p_30=x,a.$VideoPlayerHTML5Oz$p_33=i,a.$VideoPlayerHTML5Oz$p_34=l,a.$VideoPlayerHTML5Oz$p_35=D,a.$VideoPlayerHTML5Oz$p_36=d,a.$VideoPlayerHTML5Oz$p_37=$,a.$VideoPlayerHTML5Oz$p_38=u,a.$VideoPlayerHTML5Oz$p_39=f,a.$VideoPlayerHTML5Oz$p_27=p,a.$VideoPlayerHTML5Oz$p_48=c!=null?c:!1,(typeof L=="number"||typeof E=="number")&&(a.$VideoPlayerHTML5Oz$p_16=new(r("OzMaximumDimensionsRestriction"))({maxHeight:(typeof L=="number"?L:null)||1/0,maxWidth:(typeof E=="number"?E:null)||1/0})),C&&(a.$VideoPlayerHTML5Oz$p_49=C.community_info,a.$VideoPlayerHTML5Oz$p_40=C.ticket,a.$VideoPlayerHTML5Oz$p_44=C.hive_initialization_options,a.$VideoPlayerHTML5Oz$p_41=C.config,a.$VideoPlayerHTML5Oz$p_41&&(a.$VideoPlayerHTML5Oz$p_41.delay_p2p_until_play=!1),a.$VideoPlayerHTML5Oz$p_50()),a.$VideoPlayerHTML5Oz$p_48?a.$VideoPlayerHTML5Oz$p_9=null:a.$VideoPlayerHTML5Oz$p_9=r("VideoPlayerShakaPerformanceLogger").shouldInitialize()?new(r("VideoPlayerShakaPerformanceLogger"))({videoID:T,video:e,representationId:null,isLive:p,isServableViaFbms:_,accessToken:l,playerOrigin:v,playerSuborigin:S,playerVersion:a.getPlayerVersion(),uniqueID:b,getBandwidthEstimate:function(t){return r("oz-player/networks/OzBandwidthEstimator").getAdjustedBandwidth(a.$VideoPlayerHTML5Oz$p_3)},getApproximateFBLSToPlayerDisplayLatency:function(){return null},isDrm:a.isDrm()}):null,a.$VideoPlayerHTML5Oz$p_9&&(a.$VideoPlayerHTML5Oz$p_22=new(r("VideoPlayerPlayLogger"))(a.$VideoPlayerHTML5Oz$p_1,a.$VideoPlayerHTML5Oz$p_9)),a.$VideoPlayerHTML5Oz$p_13=y,(!a.$VideoPlayerHTML5Oz$p_15||typeof a.$VideoPlayerHTML5Oz$p_15.getCachedRepresentations!="function")&&(a.$VideoPlayerHTML5Oz$p_15=null),!a.$VideoPlayerHTML5Oz$p_15&&a.$VideoPlayerHTML5Oz$p_3.getBool("use_prefetch_cache",!1)&&(a.$VideoPlayerHTML5Oz$p_15=new(r("OzDashPrefetchCache"))),a.$VideoPlayerHTML5Oz$p_51(),a}babelHelpers.inheritsLoose(a,t),a.isSupported=function(t){var e;return!t.hasDashManifest()&&!t.getLiveManifestUrl()?e="noDashManifest":window.MediaSource?window.fetch?!o("oz-player/shims/OzStreams").OzReadableStream||!o("oz-player/shims/OzStreams").OzReadableStream.prototype.pipeTo||!o("oz-player/shims/OzStreams").OzReadableStream.prototype.pipeThrough?e="noReadableStream":o("oz-player/shims/OzStreams").OzWritableStream?r("manifestHasUnsupportedCodecs")(t.getDashManifest(),!1)&&(e="codecNotSupported"):e="noWritableStream":e="noFetch":e="noMediaSourceSupport",e?((u||(u=o("ODS"))).bumpEntityKey(2966,"VideoPlayerHtml5Oz","fallback."+e),!1):!0},a.getEstimatedBandwidth=function(){return r("oz-player/networks/OzBandwidthEstimator").getBandwidth(r("VideoPlayerOzWWWGlobalConfig"))};var i=a.prototype;return i.$VideoPlayerHTML5Oz$p_51=function(){var e=this;this.$VideoPlayerHTML5Oz$p_12=new(r("SubscriptionsHandler")),this.$VideoPlayerHTML5Oz$p_52(),this.$VideoPlayerHTML5Oz$p_12.addSubscriptions(r("EventListener").listen(this.$VideoPlayerHTML5Oz$p_1,"timeupdate",function(t){e.$VideoPlayerHTML5Oz$p_53(t.target.currentTime)}))},i.setup=function(){var e=[];this.$VideoPlayerHTML5Oz$p_9&&e.push(this.$VideoPlayerHTML5Oz$p_9);var t=[];this.$VideoPlayerHTML5Oz$p_3.getBool("force_initial_representation",!1)&&(t=this.$VideoPlayerHTML5Oz$p_17),this.$VideoPlayerHTML5Oz$p_54({manifest:this.$VideoPlayerHTML5Oz$p_2,manifestUrl:this.$VideoPlayerHTML5Oz$p_14,loggerProviders:e,prefetchCache:this.$VideoPlayerHTML5Oz$p_15,initialRepresentations:t,videoID:this.$VideoPlayerHTML5Oz$p_18,width:this.$VideoPlayerHTML5Oz$p_19,height:this.$VideoPlayerHTML5Oz$p_20})},i.$VideoPlayerHTML5Oz$p_54=function(t){var e=this,n=t.initialRepresentations,a=t.loggerProviders,i=t.manifest,l=t.manifestUrl,s=t.prefetchCache,u=t.videoID,c=this.$VideoPlayerHTML5Oz$p_55(),m=null;switch(this.$VideoPlayerHTML5Oz$p_13){case"hd":case"HD":m="HD";break;case"sd":case"SD":m="SD";break;case"uhd":case"UHD":m="UHD";break}this.$VideoPlayerHTML5Oz$p_47=this.$VideoPlayerHTML5Oz$p_45?r("OzConfigurableRequestImplementation")(this.$VideoPlayerHTML5Oz$p_45.getRequestImplementation(),{inferResponseStatusIsOK:!0,inferResponseStatusIsOk2xx:!1}):null;var p=r("getOzPlaybackRestrictions")(m,this.$VideoPlayerHTML5Oz$p_3);this.$VideoPlayerHTML5Oz$p_16&&p.push(this.$VideoPlayerHTML5Oz$p_16);var _=this.$VideoPlayerHTML5Oz$p_4=new(r("oz-player"))({videoNode:this.$VideoPlayerHTML5Oz$p_1,config:o("oz-player/configs/OzConfigUtils").provideConfigWithDefaults(this.$VideoPlayerHTML5Oz$p_3),rawMpdXml:i===""&&this.$VideoPlayerHTML5Oz$p_3.getBool("blue_video_player_pass_inline_mpd_xml_empty_string_as_undefined",!1)?void 0:i,customSegmentTimelineParser:this.$VideoPlayerHTML5Oz$p_3.getBool("enable_predictive_dash",!1)?new(r("OzPredictedSegmentTimelineParser")):void 0,loggerConfig:{perfLoggerProviders:a,observedOperationLoggers:[],isOzDevConsoleEnabled:r("gkx")("24356")},prefetchCache:s,networkRequestStreamHandlers:[new(r("OzActiveActiveFailoverNetworkRequestStreamHandler"))(function(e,t){var n=e.headers,r=e.status,a=o("oz-player/utils/OzErrorUtils").createOzNetworkError({description:"Replica switch requested via HTTP headers",responseStatus:r,responseHeaders:n,requestUrl:t});throw a}),new(r("OzVideoLiveTraceNetworkRequestStreamHandler"))(function(t,n,r){e.$VideoPlayerHTML5Oz$p_30&&e.$VideoPlayerHTML5Oz$p_30.handleHeadersAndBody(t,n,r)},this.$VideoPlayerHTML5Oz$p_3.getBool("live_trace_parse_emsg",!1)),new(r("oz-player/networks/OzClockSyncNetworkRequestStreamHandler"))],getShouldIncludeCredentials:this.$VideoPlayerHTML5Oz$p_3.getBool("use_oz_credentials_provider",!1)?d:null,getOverrideOzRequestImplementation:function(){var t;return(t=e.$VideoPlayerHTML5Oz$p_47)!=null?t:null},initialRepresentationIDs:n||[],customParsers:o("OzCustomParsers").createOzCustomParser(),entityKey:u,videoPlaybackRestrictions:p,customRepresentationParsers:o("OzCustomRepresentationParsers").createOzCustomRepresentationParsers({ozConfig:this.$VideoPlayerHTML5Oz$p_3,startTimestamp:this.$VideoPlayerHTML5Oz$p_21}),seekHandler:this.$VideoPlayerHTML5Oz$p_29,initialPlaybackPositionForDynamicMpd:this.$VideoPlayerHTML5Oz$p_38!=null&&this.$VideoPlayerHTML5Oz$p_38>0?this.$VideoPlayerHTML5Oz$p_38/1e3*-1:this.$VideoPlayerHTML5Oz$p_3.getNumber("live_initial_playback_position",0),liveheadFallBehindBlockThreshold:this.$VideoPlayerHTML5Oz$p_38!=null&&this.$VideoPlayerHTML5Oz$p_38>0&&this.$VideoPlayerHTML5Oz$p_39!=null&&this.$VideoPlayerHTML5Oz$p_39>0?(this.$VideoPlayerHTML5Oz$p_38+this.$VideoPlayerHTML5Oz$p_39)/1e3:this.$VideoPlayerHTML5Oz$p_3.getNumber("livehead_fall_behind_block_threshold",0),liveheadFallBehindBlockMargin:this.$VideoPlayerHTML5Oz$p_38!=null&&this.$VideoPlayerHTML5Oz$p_38>0?this.$VideoPlayerHTML5Oz$p_38/2/1e3:this.$VideoPlayerHTML5Oz$p_3.getNumber("live_time_range_block_margin",0),startTimeStamp:this.$VideoPlayerHTML5Oz$p_3.getBool("fix_start_timestamp",!1)&&this.$VideoPlayerHTML5Oz$p_21||0,drmProviders:c,getVideoDimensions:function(){return{height:e.$VideoPlayerHTML5Oz$p_20,width:e.$VideoPlayerHTML5Oz$p_19}}});if(this.$VideoPlayerHTML5Oz$p_12.addSubscriptions(_.onError(function(t){return e.$VideoPlayerHTML5Oz$p_56(t)}),_.addListener("destroyed",function(){return e.$VideoPlayerHTML5Oz$p_57()}),_.addListener("debug/dashPlayerEvent",function(t){return e.$VideoPlayerHTML5Oz$p_58(t)}),_.addListener("streamEnd",function(){return e.$VideoPlayerHTML5Oz$p_59()}),_.addListener("manifestFetchError",function(t){r("handleOzManifestFetchErrorEvent")(e.$VideoPlayerHTML5Oz$p_3,t)}),_.addListener("streamError",function(t){return r("handleOzStreamErrorEvent")(e.$VideoPlayerHTML5Oz$p_3,t)})),this.$VideoPlayerHTML5Oz$p_12.addSubscriptions(_.addListener("enterBuffering",function(t){return e.$VideoPlayerHTML5Oz$p_60(t)}),_.addListener("leaveBuffering",function(){return e.$VideoPlayerHTML5Oz$p_61()})),this.$VideoPlayerHTML5Oz$p_40&&this.$VideoPlayerHTML5Oz$p_27&&this.$VideoPlayerHTML5Oz$p_41)if(!this.$VideoPlayerHTML5Oz$p_41.delay_p2p_until_play||this.$VideoPlayerHTML5Oz$p_42)this.$VideoPlayerHTML5Oz$p_62();else{var f=function(){e.$VideoPlayerHTML5Oz$p_1.removeEventListener("play",f),e.$VideoPlayerHTML5Oz$p_62()},g=function(){e.$VideoPlayerHTML5Oz$p_1.removeEventListener("ended",g),e.disableP2PPlayback()};this.$VideoPlayerHTML5Oz$p_1.addEventListener("play",f),this.$VideoPlayerHTML5Oz$p_1.addEventListener("ended",g)}this.$VideoPlayerHTML5Oz$p_12.addSubscriptions(_.addListener("mpdReady",function(t){e.$VideoPlayerHTML5Oz$p_63(t)})),this.$VideoPlayerHTML5Oz$p_43?this.$VideoPlayerHTML5Oz$p_43.then(function(){var t=e.$VideoPlayerHTML5Oz$p_14;_.load(t)}).catch(function(){e.$VideoPlayerHTML5Oz$p_14=l,e.disableP2PPlayback(),_.load(l)}):_.load(l)},i.$VideoPlayerHTML5Oz$p_63=function(t){this.ispDASH()&&(this.$VideoPlayerHTML5Oz$p_3.setContext("latency_level","predictive"),this.$VideoPlayerHTML5Oz$p_3.setContext("streaming_implementation","pdash")),this.$VideoPlayerHTML5Oz$p_64(this.$VideoPlayerHTML5Oz$p_4),this.$VideoPlayerHTML5Oz$p_65(t),this.$VideoPlayerHTML5Oz$p_30&&this.$VideoPlayerHTML5Oz$p_66(t),this.$VideoPlayerHTML5Oz$p_3.getBool("update_seekable_range",!1)&&this.$VideoPlayerHTML5Oz$p_67(t)},i.$VideoPlayerHTML5Oz$p_50=function(){var e=this,t=this.$VideoPlayerHTML5Oz$p_46;if(t==null){var n,o,a,i;this.$VideoPlayerHTML5Oz$p_46=t=new(r("P2PPlaybackSessionLogger"))(this.$VideoPlayerHTML5Oz$p_18,{communityId:(n=(o=this.$VideoPlayerHTML5Oz$p_49)==null?void 0:o.community_id)!=null?n:"unknowncustomer",communityName:(a=(i=this.$VideoPlayerHTML5Oz$p_49)==null?void 0:i.community_name)!=null?a:"Unknown Customer"})}try{var l,s;t.logEnableP2P();var u=this.$VideoPlayerHTML5Oz$p_44?this.$VideoPlayerHTML5Oz$p_44:{};u.debugLevel=(l=u.debugLevel)!=null?l:"debug",u.hiveTechOrder=(s=u.hiveTechOrder)!=null?s:["HiveJS","StatsJS","HiveJava"];var c=u.HiveJS?u.HiveJS:{};c.renderStatsCallback=function(t){e.emit("debug/dashPlayerEvent",{type:"P2PStats",event:t}),r("nullthrows")(e.$VideoPlayerHTML5Oz$p_46).setCurrentHiveStats(t)},u.onActiveSession=function(t){e.$VideoPlayerHTML5Oz$p_46&&e.$VideoPlayerHTML5Oz$p_46.logSessionActive(t.tech),e.emit("debug/dashPlayerEvent",{type:"P2PTech",event:t.tech})};var d=u.hiveTechOrder!=null?u.hiveTechOrder.indexOf("HiveJava"):-1,m=this.$VideoPlayerHTML5Oz$p_41;m&&(m.disable_hivejava_for_livevc&&this.$VideoPlayerHTML5Oz$p_14&&this.$VideoPlayerHTML5Oz$p_14.startsWith("https://livestream-lookaside")&&u.hiveTechOrder&&d!==-1&&u.hiveTechOrder.splice(d,1),u.HiveJS=c,u.telemetryId=t.getSessionID(),u.onError=function(t){return e.$VideoPlayerHTML5Oz$p_68(t)},this.$VideoPlayerHTML5Oz$p_45=new window.HiveOz(u))}catch(e){var p=r("getErrorSafe")(e);t.logError(p),this.$VideoPlayerHTML5Oz$p_42=void 0}},i.$VideoPlayerHTML5Oz$p_62=(function(){var e=n("asyncToGeneratorRuntime").asyncToGenerator(function*(){var e=this,t=this.$VideoPlayerHTML5Oz$p_45,n=this.$VideoPlayerHTML5Oz$p_46,o=new(r("Deferred"))(r("MaybeNativePromise"));try{if(t!=null){if(this.$VideoPlayerHTML5Oz$p_3.getBool("fix_oz_p2p_enable_failed",!1)||(this.$VideoPlayerHTML5Oz$p_43=o.getPromise()),window.HiveConfig.SensitiveInfo.restrictedConnectivityInfo=!0,!this.$VideoPlayerHTML5Oz$p_14)return;var a=this.$VideoPlayerHTML5Oz$p_14.substring(this.$VideoPlayerHTML5Oz$p_14.indexOf("?"));this.$VideoPlayerHTML5Oz$p_3.getBool("fix_oz_p2p_enable_failed",!1)&&(this.$VideoPlayerHTML5Oz$p_43=o.getPromise());var i=t.initSession(r("nullthrows")(this.$VideoPlayerHTML5Oz$p_40)+a,this.$VideoPlayerHTML5Oz$p_4,this.$VideoPlayerHTML5Oz$p_1),l=this.$VideoPlayerHTML5Oz$p_42=yield i;this.$VideoPlayerHTML5Oz$p_14=l.manifest,i.then(function(e){return o.resolve(e)},function(e){return o.reject(e)}).finally(function(){e.$VideoPlayerHTML5Oz$p_43=null}),l.manifest!=this.$VideoPlayerHTML5Oz$p_14&&n&&n.logManifestMismatch(l.manifest,this.$VideoPlayerHTML5Oz$p_14),n&&n.logSessionInit(l.tech,this.$VideoPlayerHTML5Oz$p_14)}}catch(e){var s=r("getErrorSafe")(e);this.$VideoPlayerHTML5Oz$p_3.getBool("fix_oz_p2p_enable_failed",!1)&&o.reject(s),n&&n.logError(s),this.$VideoPlayerHTML5Oz$p_42=void 0}});function t(){return e.apply(this,arguments)}return t})(),i.$VideoPlayerHTML5Oz$p_68=function(t){this.$VideoPlayerHTML5Oz$p_46&&this.$VideoPlayerHTML5Oz$p_46.logHiveError(t)},i.disableP2PPlayback=function(){try{this.$VideoPlayerHTML5Oz$p_46&&this.$VideoPlayerHTML5Oz$p_46.logEndSession(),this.$VideoPlayerHTML5Oz$p_45&&this.$VideoPlayerHTML5Oz$p_45.closeHiveSession()}catch(t){var e=r("getErrorSafe")(t);r("FBLogger")("www_p2p_playback").warn(e.message)}this.$VideoPlayerHTML5Oz$p_4&&this.$VideoPlayerHTML5Oz$p_3.getBool("unset_override_oz_request_implementation_on_hive_error",!1)&&(this.$VideoPlayerHTML5Oz$p_47=null),this.$VideoPlayerHTML5Oz$p_46=null,this.$VideoPlayerHTML5Oz$p_45=null,this.$VideoPlayerHTML5Oz$p_42=null,this.$VideoPlayerHTML5Oz$p_40=null},i.$VideoPlayerHTML5Oz$p_67=function(t){var e=this;this.$VideoPlayerHTML5Oz$p_12.addSubscriptions(t.addListener("updated",function(){e.emit("seekRangeChanged")}))},i.$VideoPlayerHTML5Oz$p_55=function(){var e=[];return this.$VideoPlayerHTML5Oz$p_33&&e.push(new this.$VideoPlayerHTML5Oz$p_33.OzWidevineDrmProviderModule(this.$VideoPlayerHTML5Oz$p_18,this.$VideoPlayerHTML5Oz$p_36,this.$VideoPlayerHTML5Oz$p_35,this.$VideoPlayerHTML5Oz$p_34,this.$VideoPlayerHTML5Oz$p_37)),e},i.$VideoPlayerHTML5Oz$p_69=function(){var e=this;return function(t,n){if(!(!e.$VideoPlayerHTML5Oz$p_6||!e.$VideoPlayerHTML5Oz$p_31))try{var o=t.getCustomField("timescale")||0;if(!o||typeof o!="number")return;e.emit("cea608CaptionsBytesReceived",{timescale:o,videoBytes:n})}catch(t){var a=r("getErrorSafe")(t);e.$VideoPlayerHTML5Oz$p_56(a)}}},i.$VideoPlayerHTML5Oz$p_53=function(t){if(!(this.$VideoPlayerHTML5Oz$p_3.getBool("fix_representation_ended_timing",!1)&&(this.$VideoPlayerHTML5Oz$p_1.paused||this.$VideoPlayerHTML5Oz$p_1.seeking))&&this.$VideoPlayerHTML5Oz$p_4){var e=this.$VideoPlayerHTML5Oz$p_4.getVideoRepresentationIDAtTime(t);if(e!=null&&e!==this.$VideoPlayerHTML5Oz$p_8){var n=this.$VideoPlayerHTML5Oz$p_8;this.$VideoPlayerHTML5Oz$p_8=e,n!=null&&this.emit("representation_ended",{representationID:n,nextRepresentationID:e})}if(this.$VideoPlayerHTML5Oz$p_4){var r=this.$VideoPlayerHTML5Oz$p_4.getAudioRepresentationIDAtTime(t);if(r!=null&&r!==this.$VideoPlayerHTML5Oz$p_7){var o=this.$VideoPlayerHTML5Oz$p_7;this.$VideoPlayerHTML5Oz$p_7=r,o!=null&&this.emit("representation_ended",{representationID:o,nextRepresentationID:r})}}}},i.$VideoPlayerHTML5Oz$p_52=function(){var e=this,t=this.$VideoPlayerHTML5Oz$p_3.getNumber("connection_quality_context_throttle_frequency",0);if(t!==0){var n=function(){e.$VideoPlayerHTML5Oz$p_3.setContext("connection_quality",o("VideoPlayerConnectionQuality").evaluate(a.getEstimatedBandwidth))};this.$VideoPlayerHTML5Oz$p_12.addSubscriptions(r("oz-player/networks/OzBandwidthEstimator").addListener("bandwidth_sampled",r("throttle")(n,t))),n()}},i.$VideoPlayerHTML5Oz$p_56=function(t){if(o("oz-player/utils/OzErrorUtils").isOzError(t)){var e=t.getExtra();this.disableP2PPlayback(),(e.code==="417"||e.code==="200")&&e.headers&&e.headers.has("x-fb-video-replica")?this.emit("replicaSwitch",{replica:parseInt(e.headers.get("x-fb-video-replica"),10),url:e.url,status:e.code,timestamp:new Date().valueOf()}):(this.emit("error",r("reportOzError")(t)),this.$VideoPlayerHTML5Oz$p_4&&this.$VideoPlayerHTML5Oz$p_4.destroy())}else this.emit("error",r("reportOzError")(t))},i.$VideoPlayerHTML5Oz$p_59=function(){this.$VideoPlayerHTML5Oz$p_28=!0},i.$VideoPlayerHTML5Oz$p_57=function(){this.$VideoPlayerHTML5Oz$p_4=null},i.$VideoPlayerHTML5Oz$p_58=function(t){this.emit("debug/dashPlayerEvent",t.detail)},i.$VideoPlayerHTML5Oz$p_70=function(){var e=1;return this.$VideoPlayerHTML5Oz$p_25!=null&&Math.abs(this.$VideoPlayerHTML5Oz$p_1.currentTime-this.$VideoPlayerHTML5Oz$p_25)0&&this.$VideoPlayerHTML5Oz$p_12.addSubscriptions(n.addListener("streamInterruptAt",function(t){e.$VideoPlayerHTML5Oz$p_25=t,e.$VideoPlayerHTML5Oz$p_23&&(e.emit("bufferingEnd"),e.$VideoPlayerHTML5Oz$p_10&&(e.$VideoPlayerHTML5Oz$p_10.log(),e.$VideoPlayerHTML5Oz$p_10=null)),e.$VideoPlayerHTML5Oz$p_74()}),n.addListener("streamResumedAt",function(t){e.$VideoPlayerHTML5Oz$p_26=t,e.$VideoPlayerHTML5Oz$p_24&&e.$VideoPlayerHTML5Oz$p_75()}))},i.$VideoPlayerHTML5Oz$p_74=function(){this.emit("streamInterrupted"),this.$VideoPlayerHTML5Oz$p_23=!1,this.$VideoPlayerHTML5Oz$p_24=!0,this.$VideoPlayerHTML5Oz$p_9&&(this.$VideoPlayerHTML5Oz$p_11=this.$VideoPlayerHTML5Oz$p_9.getOperationLogger("stream_interrupted"))},i.$VideoPlayerHTML5Oz$p_75=function(){this.emit("streamResumed"),this.$VideoPlayerHTML5Oz$p_11&&(this.$VideoPlayerHTML5Oz$p_11.log(),this.$VideoPlayerHTML5Oz$p_11=null),this.$VideoPlayerHTML5Oz$p_24=!1},i.play=function(){return this.$VideoPlayerHTML5Oz$p_22&&this.$VideoPlayerHTML5Oz$p_22.playStarted(),this.$VideoPlayerHTML5Oz$p_1.play()},i.pause=function(){this.$VideoPlayerHTML5Oz$p_1.pause()},i.reload=function(){return this.$VideoPlayerHTML5Oz$p_3.getBool("enable_abortload_and_reload",!1)?(this.$VideoPlayerHTML5Oz$p_51(),this.setup(),r("MaybeNativePromise").resolve()):(s||(s=n("Promise"))).reject()},i.unload=function(){this.$VideoPlayerHTML5Oz$p_12.release(),this.$VideoPlayerHTML5Oz$p_10&&(this.$VideoPlayerHTML5Oz$p_10.log(),this.$VideoPlayerHTML5Oz$p_10=null),this.$VideoPlayerHTML5Oz$p_11&&(this.$VideoPlayerHTML5Oz$p_11.log(),this.$VideoPlayerHTML5Oz$p_11=null),this.$VideoPlayerHTML5Oz$p_22&&this.$VideoPlayerHTML5Oz$p_22.unload();var e=(s||(s=n("Promise"))).resolve();return this.$VideoPlayerHTML5Oz$p_3.getBool("enable_abortload_and_reload",!1)&&(this.$VideoPlayerHTML5Oz$p_61(),this.$VideoPlayerHTML5Oz$p_4&&(e=this.$VideoPlayerHTML5Oz$p_4.destroy(),this.$VideoPlayerHTML5Oz$p_4=null)),e},i.getVideoStreamInfoIDForTimePosition=function(t){return this.$VideoPlayerHTML5Oz$p_4?this.$VideoPlayerHTML5Oz$p_4.getVideoRepresentationIDAtTime(t):null},i.getAudioStreamInfoIDForTimePosition=function(t){return this.$VideoPlayerHTML5Oz$p_4?this.$VideoPlayerHTML5Oz$p_4.getAudioRepresentationIDAtTime(t):null},i.getDashAudioConfiguration=function(){return""},i.getLocalEstimator=function(){return null},i.setDimensions=function(t,n){this.$VideoPlayerHTML5Oz$p_19=t,this.$VideoPlayerHTML5Oz$p_20=n},i.getLongestInitResponseTime=function(){return 0},i.setPlaybackRate=function(t){this.$VideoPlayerHTML5Oz$p_5=t,this.$VideoPlayerHTML5Oz$p_1.playbackRate=t},i.areInbandCaptionsExpected=function(){return this.$VideoPlayerHTML5Oz$p_6},i.areInbandCaptionsAutogenerated=function(){return this.$VideoPlayerHTML5Oz$p_32},i.setEnableInbandCaptionsParsing=function(t){this.$VideoPlayerHTML5Oz$p_31=t},i.setPreferredVideoQuality=function(t){this.$VideoPlayerHTML5Oz$p_4&&this.$VideoPlayerHTML5Oz$p_4.switchToVideoQuality(t)},i.setVideoStreamOffset=function(t){},i.getSelectedVideoQuality=function(){return this.$VideoPlayerHTML5Oz$p_4?this.$VideoPlayerHTML5Oz$p_4.getSelectedVideoQuality():null},i.unsetPreferredVideoQuality=function(){this.$VideoPlayerHTML5Oz$p_4&&this.$VideoPlayerHTML5Oz$p_4.enableVideoQualityAdaptation()},i.getAvailableVideoQualities=function(){return o("VideoPlayerQualitiesArray").ensureVideoPlayerQualitiesArray(this.$VideoPlayerHTML5Oz$p_4?this.$VideoPlayerHTML5Oz$p_4.getVideoQualities():[])},i.getIsAbrEnabled=function(){return this.$VideoPlayerHTML5Oz$p_3.getBool("enable_adaptation",!1)},i.canAutoSelectVideoQuality=function(){return!0},i.isDrm=function(){var e;return this.$VideoPlayerHTML5Oz$p_4&&(e=this.$VideoPlayerHTML5Oz$p_4.isDrm()),e==null&&this.$VideoPlayerHTML5Oz$p_2&&(e=this.$VideoPlayerHTML5Oz$p_2.indexOf("=0),e},i.setPreloadDisabled=function(t){},i.restoreStreamBufferSize=function(){},i.getDebug=function(){return{manifest:this.$VideoPlayerHTML5Oz$p_2,DashPlayer:this.$VideoPlayerHTML5Oz$p_4,AbrManager:this.$VideoPlayerHTML5Oz$p_4?this.$VideoPlayerHTML5Oz$p_4.getDebug().VideoAbrManager:null,BandwidthEstimator:r("oz-player/networks/OzBandwidthEstimator")}},i.getVideoProjection=function(){var e=this.$VideoPlayerHTML5Oz$p_4&&this.$VideoPlayerHTML5Oz$p_4.getMpd();return e?e.getCustomField("fbProjection"):null},i.setEnableLiveheadCatchup=function(t){this.$VideoPlayerHTML5Oz$p_4&&this.$VideoPlayerHTML5Oz$p_4.setEnableLiveheadCatchup(t)},i.isFBWasLive=function(){return!1},i.clearBufferAfterSeekingIfLowerQuality=function(t){},i.isFBIsLiveTemplated=function(){var e=this.$VideoPlayerHTML5Oz$p_4&&this.$VideoPlayerHTML5Oz$p_4.getMpd();if(!e)return!1;var t=e.getCustomField("isLiveTemplated");return!!t},i.isFBMS=function(){return!1},i.ispDASH=function(){var e,t=this.$VideoPlayerHTML5Oz$p_4&&this.$VideoPlayerHTML5Oz$p_4.getMpd();if(!t)return!1;var n=(e=t.getVideoRepresentations()[0])!=null?e:null;return n!==null&&n.canPredict()},i.isLiveheadCatchupEnabled=function(){return!1},i.getFbManifestIdentifier=function(){var e=this.$VideoPlayerHTML5Oz$p_4&&this.$VideoPlayerHTML5Oz$p_4.getMpd();if(!e)return"";var t=e.getCustomField("fbManifestIdentifier");return typeof t=="string"?t:""},i.getSeekableRanges=function(){var e=this.$VideoPlayerHTML5Oz$p_4&&this.$VideoPlayerHTML5Oz$p_4.getMpd();if(!e)return null;var t=e.getVideoRepresentations();if(t.length){var n=t[0],o=n.getTimeRanges();if(o.length){var a=o[0].startTime,i=Math.max(o[o.length-1].endTime-this.$VideoPlayerHTML5Oz$p_3.getNumber("live_rewind_seek_to_live_delta",8),a);return new(r("TimeRanges"))([{startTime:a,endTime:i}])}}},i.refreshDashManifest=function(){return(s||(s=n("Promise"))).reject()},i.switchReplicaSet=function(n){var t=new(e||(e=r("URI")))(this.$VideoPlayerHTML5Oz$p_14);t.addQueryData("replica",n),this.$VideoPlayerHTML5Oz$p_14=t.toString()},i.getPlaybackRate=function(){return 1},i.getPlayerVersion=function(){return"oz"},i.getManifestUrl=function(){return this.$VideoPlayerHTML5Oz$p_14},i.getBandwidthEstimate=function(){return a.getEstimatedBandwidth()},i.isDashPerfLoggingEnabled=function(){return this.$VideoPlayerHTML5Oz$p_9!=null},a})(r("EventEmitter"));l.default=m}),98);