;/*FB_PKG_DELIM*/ __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/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/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 d(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.getTotalInBufferedRanges=e,l.getEndBufferedTime=s,l.convertToBufferedTimeRangeArray=u,l.getBufferAheadInBufferedRanges=c,l.getTotalBufferAheadOfPosition=d}),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 instanceof Error&&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/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 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.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.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){var e=new RangeError("EbmlElement: Unsigned integer has too many bytes.");throw e.stack,e}if(this.$1.byteLength==8&&this.$1.getUint8(0)&224){var t=new RangeError("EbmlParser: Unsigned integer must be at most 53 bits.");throw t.stack,t}for(var n=0,r=0;r7){var t=new RangeError("EbmlParser: EBML ID must be at most 7 bytes.");throw t.stack,t}for(var n=0,r=0;r8){var r=new RangeError("EbmlParser: Variable sized integer must fit within 8 bytes.");throw r.stack,r}var o=new Uint8Array(t);o[0]=e;for(var a=1;a=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/parsers/OzXmlParserImplDOMParser",["oz-player/utils/OzErrorUtils"],(function(t,n,r,o,a,i,l){function e(){return{$:{}}}function s(t){for(var n=e(),r=t.attributes,o=0;o0?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/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/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}})}l.getMaxSegment=e,l.getSegmentForSequenceNumber=s}),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_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_123=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_123(t,"audio")},i.getVideoRepresentationIDAtTime=function(t){return this.$Player$p_123(t,"video")},i.getCurrentVideoRepresentation=function(){return this.$Player$p_124("video")},i.getCurrentAudioRepresentation=function(){return this.$Player$p_124("audio")},i.getCurrentPlayingAudioTrackID=function(){var e=this.getCurrentAudioRepresentation();return e==null?void 0:e.getID()},i.$Player$p_124=function(t){var e,n=this.$Player$p_123(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_125(o,a),l=this.$Player$p_126(o,a);return{latencyFromClockSync:l,latencyFromMpdUpdate:i}},i.$Player$p_125=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_126=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);