import{r as yr,j as iu}from"./main-239552ae.js";import{bK as au,bL as ou,bM as su,bN as uu,bO as lu}from"./user-profile-link-0c8224d9.js";import"./OpenInNew-32d7773a.js";var yo={exports:{}};/*! For license information please see dash.all.min.js.LICENSE.txt */(function($n,or){(function(Dr,Rr){$n.exports=Rr()})(self,function(){return function(){var Dr={4593:function($e,we){var O,ie,T,t,e,p=function(g){for(var E=[],n=0;n>6),E.push(128|63&l)):l<65536?(E.push(224|l>>12),E.push(128|63&l>>6),E.push(128|63&l)):(E.push(240|l>>18),E.push(128|63&l>>12),E.push(128|63&l>>6),E.push(128|63&l))}return E},y=function(g){for(var E=[],n=0;n>18)),n.push(O.charAt(63&d>>12)),n.push(O.charAt(63&d>>6)),n.push(O.charAt(63&d))}return g.length-E==2?(d=(g[E]<<16)+(g[E+1]<<8),n.push(O.charAt(63&d>>18)),n.push(O.charAt(63&d>>12)),n.push(O.charAt(63&d>>6)),n.push("=")):g.length-E==1&&(d=g[E]<<16,n.push(O.charAt(63&d>>18)),n.push(O.charAt(63&d>>12)),n.push("==")),n.join("")},T=function(){for(var g=[],E=0;E=U&&console.log(this.time+" ["+M+"] "+A)}},l=function(M){for(var A=[],U=0;Ue&&(n.log("ERROR","Too large cursor position "+this.pos),this.pos=e)},moveCursor:function(M){var A=this.pos+M;if(M>1)for(var U=this.pos+1;U=144&&this.backSpace();var A=T(M);this.pos>=e?n.log("ERROR","Cannot insert "+M.toString(16)+" ("+A+") at position "+this.pos+". Skipping it!"):(this.chars[this.pos].setChar(A,this.currPenState),this.moveCursor(1))},clearFromPos:function(M){var A;for(A=M;A0&&(U=M?"["+A.join(" | ")+"]":A.join(` `)),U},getTextAndFormat:function(){return this.rows}};var F=function(M,A){this.chNr=M,this.outputFilter=A,this.mode=null,this.verbose=0,this.displayedMemory=new k,this.nonDisplayedMemory=new k,this.lastOutputScreen=new k,this.currRollUpRow=this.displayedMemory.rows[14],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null};F.prototype={modes:["MODE_ROLL-UP","MODE_POP-ON","MODE_PAINT-ON","MODE_TEXT"],reset:function(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.currRollUpRow=this.displayedMemory.rows[14],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.lastCueEndTime=null},getHandler:function(){return this.outputFilter},setHandler:function(M){this.outputFilter=M},setPAC:function(M){this.writeScreen.setPAC(M)},setBkgData:function(M){this.writeScreen.setBkgData(M)},setMode:function(M){M!==this.mode&&(this.mode=M,n.log("INFO","MODE="+M),this.mode=="MODE_POP-ON"?this.writeScreen=this.nonDisplayedMemory:(this.writeScreen=this.displayedMemory,this.writeScreen.reset()),this.mode!=="MODE_ROLL-UP"&&(this.displayedMemory.nrRollUpRows=null,this.nonDisplayedMemory.nrRollUpRows=null),this.mode=M)},insertChars:function(M){for(var A=0;A=46,A.italics)A.foreground="white";else{var U=Math.floor(M/2)-16;A.foreground=["white","green","blue","cyan","red","yellow","magenta"][U]}n.log("INFO","MIDROW: "+JSON.stringify(A)),this.writeScreen.setPen(A)},outputDataUpdate:function(){var M=n.time;M!==null&&this.outputFilter&&(this.outputFilter.updateData&&this.outputFilter.updateData(M,this.displayedMemory),this.cueStartTime!==null||this.displayedMemory.isEmpty()?this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,M,this.lastOutputScreen),this.cueStartTime=this.displayedMemory.isEmpty()?null:M):this.cueStartTime=M,this.lastOutputScreen.copy(this.displayedMemory))},cueSplitAtTime:function(M){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,M,this.displayedMemory),this.cueStartTime=M))}};var ee=function(M,A,U){this.field=M||1,this.outputs=[A,U],this.channels=[new F(1,A),new F(2,U)],this.currChNr=-1,this.lastCmdA=null,this.lastCmdB=null,this.bufferedData=[],this.startTime=null,this.lastTime=null,this.dataCounters={padding:0,char:0,cmd:0,other:0}};ee.prototype={getHandler:function(M){return this.channels[M].getHandler()},setHandler:function(M,A){this.channels[M].setHandler(A)},addData:function(M,A){var U,J,$,Ee=!1;this.lastTime=M,n.setTime(M);for(var Je=0;Je=16&&J<=31&&J===this.lastCmdA&&$===this.lastCmdB?(this.lastCmdA=null,this.lastCmdB=null,n.log("DEBUG","Repeated command ("+l([J,$])+") is dropped")):J!==0||$!==0?(n.log("DATA","["+l([A[Je],A[Je+1]])+"] -> ("+l([J,$])+")"),(U=this.parseCmd(J,$))||(U=this.parseMidrow(J,$)),U||(U=this.parsePAC(J,$)),U||(U=this.parseBackgroundAttributes(J,$)),U||(Ee=this.parseChars(J,$))&&(this.currChNr&&this.currChNr>=0?this.channels[this.currChNr-1].insertChars(Ee):n.log("WARNING","No channel found yet. TEXT-MODE?")),U?this.dataCounters.cmd+=2:Ee?this.dataCounters.char+=2:(this.dataCounters.other+=2,n.log("WARNING","Couldn't parse cleaned data "+l([J,$])+" orig: "+l([A[Je],A[Je+1]])))):this.dataCounters.padding+=2},parseCmd:function(M,A){var U;if(!((M===20||M===21||M===28||M===29)&&32<=A&&A<=47||(M===23||M===31)&&33<=A&&A<=35))return!1;U=M===20||M===21||M===23?1:2;var J=this.channels[U-1];return M===20||M===21||M===28||M===29?A===32?J.cc_RCL():A===33?J.cc_BS():A===34?J.cc_AOF():A===35?J.cc_AON():A===36?J.cc_DER():A===37?J.cc_RU(2):A===38?J.cc_RU(3):A===39?J.cc_RU(4):A===40?J.cc_FON():A===41?J.cc_RDC():A===42?J.cc_TR():A===43?J.cc_RTD():A===44?J.cc_EDM():A===45?J.cc_CR():A===46?J.cc_ENM():A===47&&J.cc_EOC():J.cc_TO(A-32),this.lastCmdA=M,this.lastCmdB=A,this.currChNr=U,!0},parseMidrow:function(M,A){var U=null;if((M===17||M===25)&&32<=A&&A<=47){if((U=M===17?1:2)!==this.currChNr)return n.log("ERROR","Mismatch channel in midrow parsing"),!1;var J=this.channels[U-1];return J.insertChars([32]),J.cc_MIDROW(A),n.log("DEBUG","MIDROW ("+l([M,A])+")"),this.lastCmdA=M,this.lastCmdB=A,!0}return!1},parsePAC:function(M,A){var U,J;if(!((17<=M&&M<=23||25<=M&&M<=31)&&64<=A&&A<=127||(M===16||M===24)&&64<=A&&A<=95))return!1;U=M<=23?1:2,J=64<=A&&A<=95?U===1?p[M]:u[M]:U===1?y[M]:g[M];var $=this.interpretPAC(J,A);return this.channels[U-1].setPAC($),this.lastCmdA=M,this.lastCmdB=A,this.currChNr=U,!0},interpretPAC:function(M,A){var U,J={color:null,italics:!1,indent:null,underline:!1,row:M};return U=A>95?A-96:A-64,J.underline=(1&U)==1,U<=13?J.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(U/2)]:U<=15?(J.italics=!0,J.color="white"):J.indent=4*Math.floor((U-16)/2),J},parseChars:function(M,A){var U=null,J=null,$=null;if(M>=25?(U=2,$=M-8):(U=1,$=M),17<=$&&$<=19){var Ee;Ee=$===17?A+80:$===18?A+112:A+144,n.log("INFO","Special char '"+T(Ee)+"' in channel "+U),J=[Ee],this.lastCmdA=M,this.lastCmdB=A}else 32<=M&&M<=127&&(J=A===0?[M]:[M,A],this.lastCmdA=null,this.lastCmdB=null);if(J){var Je=l(J);n.log("DEBUG","Char codes = "+Je.join(","))}return J},parseBackgroundAttributes:function(M,A){var U,J,$;return((M===16||M===24)&&32<=A&&A<=47||(M===23||M===31)&&45<=A&&A<=47)&&(U={},M===16||M===24?(J=Math.floor((A-32)/2),U.background=E[J],A%2==1&&(U.background=U.background+"_semi")):A===45?U.background="transparent":(U.foreground="black",A===47&&(U.underline=!0)),$=M<24?1:2,this.channels[$-1].setBkgData(U),this.lastCmdA=M,this.lastCmdB=A,!0)},reset:function(){for(var M=0;M0&&(ve+=" ");for(var Be=arguments.length,ct=new Array(Be>2?Be-2:0),_e=2;_e=He&&A[He](ve),M&&M.get().debug.dispatchEvent&&ee.trigger(T.Z.LOG,{message:ve,level:He})}return d={getLogger:function(He){return{fatal:J.bind(He),error:$.bind(He),warn:Ee.bind(He),info:Je.bind(He),debug:oe.bind(He)}},setLogTimestampVisible:function(He){D=He},setCalleeNameVisible:function(He){Z=He}},D=!0,Z=!0,k=new Date().getTime(),typeof window<"u"&&window.console&&(A[e]=U(window.console.error),A[p]=U(window.console.error),A[y]=U(window.console.warn),A[u]=U(window.console.info),A[g]=U(window.console.debug)),d}E.__dashjs_factory_name="Debug";var n=t.Z.getSingletonFactory(E);n.LOG_LEVEL_NONE=0,n.LOG_LEVEL_FATAL=e,n.LOG_LEVEL_ERROR=p,n.LOG_LEVEL_WARNING=y,n.LOG_LEVEL_INFO=u,n.LOG_LEVEL_DEBUG=g,t.Z.updateSingletonFactory(E.__dashjs_factory_name,n),we.Z=n},5595:function($e,we,O){var ie=O(5448),T=O(8825);function t(){var p={};function y(g,E,n){var l=-1;return p[g]&&p[g].some(function(d,D){if(d&&d.callback===E&&(!n||n===d.scope))return l=D,!0}),l}var u={on:function(g,E,n){var l=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};if(!g)throw new Error("event type cannot be null or undefined");if(!E||typeof E!="function")throw new Error("listener must be a function: "+E);var d=l.priority||0;if(!(y(g,E,n)>=0)){p[g]=p[g]||[];var D={callback:E,scope:n,priority:d};n&&n.getStreamId&&(D.streamId=n.getStreamId()),n&&n.getType&&(D.mediaType=n.getType()),l&&l.mode&&(D.mode=l.mode);var Z=p[g].some(function(k,F){if(k&&d>k.priority)return p[g].splice(F,0,D),!0});Z||p[g].push(D)}},off:function(g,E,n){if(g&&E&&p[g]){var l=y(g,E,n);l<0||(p[g][l]=null)}},trigger:function(g){var E=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(g&&p[g]){if((E=E||{}).hasOwnProperty("type"))throw new Error("'type' is a reserved word for event dispatching");E.type=g,n.streamId&&(E.streamId=n.streamId),n.mediaType&&(E.mediaType=n.mediaType),p[g].filter(function(l){return!(!l||n.streamId&&l.streamId&&l.streamId!==n.streamId||n.mediaType&&l.mediaType&&l.mediaType!==n.mediaType||n.mode&&l.mode&&l.mode!==n.mode||!l.mode&&n.mode&&n.mode===T.Z.EVENT_MODE_ON_RECEIVE)}).forEach(function(l){return l&&l.callback.call(l.scope,E)})}},reset:function(){p={}}};return u}t.__dashjs_factory_name="EventBus";var e=ie.Z.getSingletonFactory(t);e.EVENT_PRIORITY_LOW=0,e.EVENT_PRIORITY_HIGH=5e3,ie.Z.updateSingletonFactory(t.__dashjs_factory_name,e),we.Z=e},5448:function($e,we){var O=function(){var ie,T=[],t={},e={};function p(E,n){for(var l in T){var d=T[l];if(d.context===E&&d.name===n)return d.instance}return null}function y(E,n){return n[E]}function u(E,n,l){E in l&&(l[E]=n)}function g(E,n,l){var d,D=E.__dashjs_factory_name,Z=n[D];if(Z){var k=Z.instance;if(!Z.override)return k.apply({context:n,factory:ie},l);for(var F in d=E.apply({context:n},l),k=k.apply({context:n,factory:ie,parent:d},l))d.hasOwnProperty(F)&&(d[F]=k[F])}else d=E.apply({context:n},l);return d.getClassName=function(){return D},d}return ie={extend:function(E,n,l,d){!d[E]&&n&&(d[E]={instance:n,override:l})},getSingletonInstance:p,setSingletonInstance:function(E,n,l){for(var d in T){var D=T[d];if(D.context===E&&D.name===n)return void(T[d].instance=l)}T.push({name:n,context:E,instance:l})},deleteSingletonInstances:function(E){T=T.filter(function(n){return n.context!==E})},getSingletonFactory:function(E){var n=y(E.__dashjs_factory_name,t);return n||(n=function(l){var d;return l===void 0&&(l={}),{getInstance:function(){return d||(d=p(l,E.__dashjs_factory_name)),d||(d=g(E,l,arguments),T.push({name:E.__dashjs_factory_name,context:l,instance:d})),d}}},t[E.__dashjs_factory_name]=n),n},getSingletonFactoryByName:function(E){return y(E,t)},updateSingletonFactory:function(E,n){u(E,n,t)},getClassFactory:function(E){var n=y(E.__dashjs_factory_name,e);return n||(n=function(l){return l===void 0&&(l={}),{create:function(){return g(E,l,arguments)}}},e[E.__dashjs_factory_name]=n),n},getClassFactoryByName:function(E){return y(E,e)},updateClassFactory:function(E,n){u(E,n,e)}},ie}();we.Z=O},1264:function($e,we,O){var ie=O(5448),T=O(703),t=O(6398),e=O(3393),p=O(7855),y=O(5595),u=O(8512);function g(d){return g=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(D){return typeof D}:function(D){return D&&typeof Symbol=="function"&&D.constructor===Symbol&&D!==Symbol.prototype?"symbol":typeof D},g(d)}function E(d,D,Z){return D in d?Object.defineProperty(d,D,{value:Z,enumerable:!0,configurable:!0,writable:!0}):d[D]=Z,d}function n(){var d,D,Z=this.context,k=(0,y.Z)(Z).getInstance(),F={"streaming.delay.liveDelay":u.Z.SETTING_UPDATED_LIVE_DELAY,"streaming.delay.liveDelayFragmentCount":u.Z.SETTING_UPDATED_LIVE_DELAY_FRAGMENT_COUNT,"streaming.liveCatchup.enabled":u.Z.SETTING_UPDATED_CATCHUP_ENABLED,"streaming.liveCatchup.playbackRate.min":u.Z.SETTING_UPDATED_PLAYBACK_RATE_MIN,"streaming.liveCatchup.playbackRate.max":u.Z.SETTING_UPDATED_PLAYBACK_RATE_MAX},ee={debug:{logLevel:t.Z.LOG_LEVEL_WARNING,dispatchEvent:!1},streaming:{abandonLoadTimeout:1e4,wallclockTimeUpdateInterval:100,manifestUpdateRetryInterval:100,cacheInitSegments:!1,applyServiceDescription:!0,applyProducerReferenceTime:!0,applyContentSteering:!0,eventControllerRefreshDelay:100,enableManifestDurationMismatchFix:!0,parseInbandPrft:!1,enableManifestTimescaleMismatchFix:!1,capabilities:{filterUnsupportedEssentialProperties:!0,useMediaCapabilitiesApi:!1},timeShiftBuffer:{calcFromSegmentTimeline:!1,fallbackToSegmentTimeline:!0},metrics:{maxListDepth:100},delay:{liveDelayFragmentCount:NaN,liveDelay:NaN,useSuggestedPresentationDelay:!0},protection:{keepProtectionMediaKeys:!1,ignoreEmeEncryptedEvent:!1,detectPlayreadyMessageFormat:!0},buffer:{enableSeekDecorrelationFix:!1,fastSwitchEnabled:!0,flushBufferAtTrackSwitch:!1,reuseExistingSourceBuffers:!0,bufferPruningInterval:10,bufferToKeep:20,bufferTimeAtTopQuality:30,bufferTimeAtTopQualityLongForm:60,initialBufferLevel:NaN,stableBufferTime:12,longFormContentDurationThreshold:600,stallThreshold:.3,useAppendWindow:!0,setStallState:!0,avoidCurrentTimeRangePruning:!1,useChangeTypeForTrackSwitch:!0,mediaSourceDurationInfinity:!0,resetSourceBuffersForTrackSwitch:!1},gaps:{jumpGaps:!0,jumpLargeGaps:!0,smallGapLimit:1.5,threshold:.3,enableSeekFix:!0,enableStallFix:!1,stallSeek:.1},utcSynchronization:{enabled:!0,useManifestDateHeaderTimeSource:!0,backgroundAttempts:2,timeBetweenSyncAttempts:30,maximumTimeBetweenSyncAttempts:600,minimumTimeBetweenSyncAttempts:2,timeBetweenSyncAttemptsAdjustmentFactor:2,maximumAllowedDrift:100,enableBackgroundSyncAfterSegmentDownloadError:!0,defaultTimingSource:{scheme:"urn:mpeg:dash:utc:http-xsdate:2014",value:"https://time.akamai.com/?iso&ms"}},scheduling:{defaultTimeout:500,lowLatencyTimeout:0,scheduleWhilePaused:!0},text:{defaultEnabled:!0,extendSegmentedCues:!0,webvtt:{customRenderingEnabled:!1}},liveCatchup:{maxDrift:NaN,playbackRate:{min:NaN,max:NaN},playbackBufferMin:.5,enabled:null,mode:e.Z.LIVE_CATCHUP_MODE_DEFAULT},lastBitrateCachingInfo:{enabled:!0,ttl:36e4},lastMediaSettingsCachingInfo:{enabled:!0,ttl:36e4},saveLastMediaSettingsForCurrentStreamingSession:!0,cacheLoadThresholds:{video:50,audio:5},trackSwitchMode:{audio:e.Z.TRACK_SWITCH_MODE_ALWAYS_REPLACE,video:e.Z.TRACK_SWITCH_MODE_NEVER_REPLACE},selectionModeForInitialTrack:e.Z.TRACK_SELECTION_MODE_HIGHEST_SELECTION_PRIORITY,fragmentRequestTimeout:2e4,fragmentRequestProgressTimeout:-1,manifestRequestTimeout:1e4,retryIntervals:(d={},E(d,p.w.MPD_TYPE,500),E(d,p.w.XLINK_EXPANSION_TYPE,500),E(d,p.w.MEDIA_SEGMENT_TYPE,1e3),E(d,p.w.INIT_SEGMENT_TYPE,1e3),E(d,p.w.BITSTREAM_SWITCHING_SEGMENT_TYPE,1e3),E(d,p.w.INDEX_SEGMENT_TYPE,1e3),E(d,p.w.MSS_FRAGMENT_INFO_SEGMENT_TYPE,1e3),E(d,p.w.LICENSE,1e3),E(d,p.w.OTHER_TYPE,1e3),E(d,"lowLatencyReductionFactor",10),d),retryAttempts:(D={},E(D,p.w.MPD_TYPE,3),E(D,p.w.XLINK_EXPANSION_TYPE,1),E(D,p.w.MEDIA_SEGMENT_TYPE,3),E(D,p.w.INIT_SEGMENT_TYPE,3),E(D,p.w.BITSTREAM_SWITCHING_SEGMENT_TYPE,3),E(D,p.w.INDEX_SEGMENT_TYPE,3),E(D,p.w.MSS_FRAGMENT_INFO_SEGMENT_TYPE,3),E(D,p.w.LICENSE,3),E(D,p.w.OTHER_TYPE,3),E(D,"lowLatencyMultiplyFactor",5),D),abr:{movingAverageMethod:e.Z.MOVING_AVERAGE_SLIDING_WINDOW,ABRStrategy:e.Z.ABR_STRATEGY_DYNAMIC,additionalAbrRules:{insufficientBufferRule:!0,switchHistoryRule:!0,droppedFramesRule:!0,abandonRequestsRule:!0},bandwidthSafetyFactor:.9,useDefaultABRRules:!0,useDeadTimeLatency:!0,limitBitrateByPortal:!1,usePixelRatioInLimitBitrateByPortal:!1,maxBitrate:{audio:-1,video:-1},minBitrate:{audio:-1,video:-1},maxRepresentationRatio:{audio:1,video:1},initialBitrate:{audio:-1,video:-1},initialRepresentationRatio:{audio:-1,video:-1},autoSwitchBitrate:{audio:!0,video:!0},fetchThroughputCalculationMode:e.Z.ABR_FETCH_THROUGHPUT_CALCULATION_MOOF_PARSING},cmcd:{enabled:!1,sid:null,cid:null,rtp:null,rtpSafetyFactor:5,mode:e.Z.CMCD_MODE_QUERY,enabledKeys:["br","d","ot","tb","bl","dl","mtp","nor","nrr","su","bs","rtp","cid","pr","sf","sid","st","v"]},cmsd:{enabled:!1,abr:{applyMb:!1,etpWeightRatio:0}}},errors:{recoverAttempts:{mediaErrorDecode:5}}},M=T.Z.clone(ee);function A(U,J,$){for(var Ee in U)U.hasOwnProperty(Ee)&&(J.hasOwnProperty(Ee)?g(U[Ee])!=="object"||U[Ee]instanceof Array||U[Ee]===null?(J[Ee]=T.Z.clone(U[Ee]),F[$+Ee]&&k.trigger(F[$+Ee])):A(U[Ee],J[Ee],$.slice()+Ee+"."):console.error("Settings parameter "+$+Ee+" is not supported"))}return{get:function(){return M},update:function(U){g(U)==="object"&&A(U,M,"")},reset:function(){M=T.Z.clone(ee)}}}n.__dashjs_factory_name="Settings";var l=ie.Z.getSingletonFactory(n);we.Z=l},703:function($e,we,O){var ie=O(3875),T=O.n(ie),t=O(1067);function e(u){return e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(g){return typeof g}:function(g){return g&&typeof Symbol=="function"&&g.constructor===Symbol&&g!==Symbol.prototype?"symbol":typeof g},e(u)}function p(u,g){for(var E=0;E0&&(l[k.substring(0,F)]=k.substring(F+2))}return l}},{key:"generateUuid",value:function(){var n=new Date().getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(l){var d=(n+16*Math.random())%16|0;return n=Math.floor(n/16),(l=="x"?d:3&d|8).toString(16)})}},{key:"generateHashCode",value:function(n){var l=0;if(n.length===0)return l;for(var d=0;d0&&arguments[0]!==void 0?arguments[0]:null;try{var l=n===null&&typeof navigator<"u"?navigator.userAgent.toLowerCase():"";return(0,t.UAParser)(l)}catch{return{}}}},{key:"stringHasProtocol",value:function(n){return/(http(s?)):\/\//i.test(n)}}],E&&p(g,E),u}();we.Z=y},2032:function($e,we,O){function ie(){return"4.7.2"}O.d(we,{e:function(){return ie}})},2230:function($e,we){function O(T,t){for(var e=0;e"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var l,d=e(u);if(g){var D=e(this).constructor;l=Reflect.construct(d,arguments,D)}else l=d.apply(this,arguments);return t(this,l)});function n(){var l;return function(d,D){if(!(d instanceof D))throw new TypeError("Cannot call a class as a function")}(this,n),(l=E.call(this)).ATTEMPT_BACKGROUND_SYNC="attemptBackgroundSync",l.BUFFERING_COMPLETED="bufferingCompleted",l.BUFFER_CLEARED="bufferCleared",l.BYTES_APPENDED_END_FRAGMENT="bytesAppendedEndFragment",l.BUFFER_REPLACEMENT_STARTED="bufferReplacementStarted",l.CHECK_FOR_EXISTENCE_COMPLETED="checkForExistenceCompleted",l.CMSD_STATIC_HEADER="cmsdStaticHeader",l.CURRENT_TRACK_CHANGED="currentTrackChanged",l.DATA_UPDATE_COMPLETED="dataUpdateCompleted",l.INBAND_EVENTS="inbandEvents",l.INITIAL_STREAM_SWITCH="initialStreamSwitch",l.INIT_FRAGMENT_LOADED="initFragmentLoaded",l.INIT_FRAGMENT_NEEDED="initFragmentNeeded",l.INTERNAL_MANIFEST_LOADED="internalManifestLoaded",l.ORIGINAL_MANIFEST_LOADED="originalManifestLoaded",l.LOADING_COMPLETED="loadingCompleted",l.LOADING_PROGRESS="loadingProgress",l.LOADING_DATA_PROGRESS="loadingDataProgress",l.LOADING_ABANDONED="loadingAborted",l.MANIFEST_UPDATED="manifestUpdated",l.MEDIA_FRAGMENT_LOADED="mediaFragmentLoaded",l.MEDIA_FRAGMENT_NEEDED="mediaFragmentNeeded",l.QUOTA_EXCEEDED="quotaExceeded",l.SEGMENT_LOCATION_BLACKLIST_ADD="segmentLocationBlacklistAdd",l.SEGMENT_LOCATION_BLACKLIST_CHANGED="segmentLocationBlacklistChanged",l.SERVICE_LOCATION_BASE_URL_BLACKLIST_ADD="serviceLocationBlacklistAdd",l.SERVICE_LOCATION_BASE_URL_BLACKLIST_CHANGED="serviceLocationBlacklistChanged",l.SERVICE_LOCATION_LOCATION_BLACKLIST_ADD="serviceLocationLocationBlacklistAdd",l.SERVICE_LOCATION_LOCATION_BLACKLIST_CHANGED="serviceLocationLocationBlacklistChanged",l.SET_FRAGMENTED_TEXT_AFTER_DISABLED="setFragmentedTextAfterDisabled",l.SET_NON_FRAGMENTED_TEXT="setNonFragmentedText",l.SOURCE_BUFFER_ERROR="sourceBufferError",l.STREAMS_COMPOSED="streamsComposed",l.STREAM_BUFFERING_COMPLETED="streamBufferingCompleted",l.STREAM_REQUESTING_COMPLETED="streamRequestingCompleted",l.TEXT_TRACKS_QUEUE_INITIALIZED="textTracksQueueInitialized",l.TIME_SYNCHRONIZATION_COMPLETED="timeSynchronizationComplete",l.UPDATE_TIME_SYNC_OFFSET="updateTimeSyncOffset",l.URL_RESOLUTION_FAILED="urlResolutionFailed",l.VIDEO_CHUNK_RECEIVED="videoChunkReceived",l.WALLCLOCK_TIME_UPDATED="wallclockTimeUpdated",l.XLINK_ELEMENT_LOADED="xlinkElementLoaded",l.XLINK_READY="xlinkReady",l.SEEK_TARGET="seekTarget",l.SETTING_UPDATED_LIVE_DELAY="settingUpdatedLiveDelay",l.SETTING_UPDATED_LIVE_DELAY_FRAGMENT_COUNT="settingUpdatedLiveDelayFragmentCount",l.SETTING_UPDATED_CATCHUP_ENABLED="settingUpdatedCatchupEnabled",l.SETTING_UPDATED_PLAYBACK_RATE_MIN="settingUpdatedPlaybackRateMin",l.SETTING_UPDATED_PLAYBACK_RATE_MAX="settingUpdatedPlaybackRateMax",l}return n}(O(8342).Z);we.Z=p},8512:function($e,we,O){function ie(g){return ie=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(E){return typeof E}:function(E){return E&&typeof Symbol=="function"&&E.constructor===Symbol&&E!==Symbol.prototype?"symbol":typeof E},ie(g)}function T(g,E){if(!(g instanceof E))throw new TypeError("Cannot call a class as a function")}function t(g,E){return t=Object.setPrototypeOf||function(n,l){return n.__proto__=l,n},t(g,E)}function e(g,E){return!E||ie(E)!=="object"&&typeof E!="function"?function(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}(g):E}function p(g){return p=Object.setPrototypeOf?Object.getPrototypeOf:function(E){return E.__proto__||Object.getPrototypeOf(E)},p(g)}var y=function(g){(function(D,Z){if(typeof Z!="function"&&Z!==null)throw new TypeError("Super expression must either be null or a function");D.prototype=Object.create(Z&&Z.prototype,{constructor:{value:D,writable:!0,configurable:!0}}),Z&&t(D,Z)})(d,g);var E,n,l=(E=d,n=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var D,Z=p(E);if(n){var k=p(this).constructor;D=Reflect.construct(Z,arguments,k)}else D=Z.apply(this,arguments);return e(this,D)});function d(){return T(this,d),l.apply(this,arguments)}return d}(O(4351).Z),u=new y;we.Z=u},8342:function($e,we){function O(T,t){for(var e=0;eve?!1:Le.mediaFinishedInformation&&!isNaN(Le.mediaFinishedInformation.numberOfSegments)&&!isNaN(l.index)&&l.index>=Le.mediaFinishedInformation.numberOfSegments-1&&(!d||Le.segmentInfoType===y.Z.SEGMENT_TEMPLATE||d&&Le.segmentInfoType===y.Z.SEGMENT_LIST&&Le.adaptation.period.nextPeriodId)?!0:!!(d&&Le.adaptation.period.nextPeriodId&&Le.segmentInfoType===y.Z.SEGMENT_TIMELINE&&Le.mediaFinishedInformation&&!isNaN(Le.mediaFinishedInformation.mediaTimeOfLastSignaledSegment)&&l&&!isNaN(l.mediaStartTime)&&!isNaN(l.duration)&&l.mediaStartTime+l.duration>=Le.mediaFinishedInformation.mediaTimeOfLastSignaledSegment-.05)},reset:function(){Ee(),Z.off(e.Z.DYNAMIC_TO_STATIC,He,E)},getNextSegmentRequestIdempotent:function(Le,ve){var Ue=l?l.index+1:0,Be=A.getSegmentByIndex(ve,Ue,l?l.mediaStartTime:-1);return Be?oe(Le,Be):null},getValidTimeAheadOfTargetTime:function(Le,ve,Ue,Be){try{if(isNaN(Le)||!ve||!Ue)return NaN;if(Le<0&&(Le=0),isNaN(Be)&&(Be=.5),Ce(ve,Ue,Le))return Le;if(Ue.adaptation.period.start+Ue.adaptation.period.durationvt.startTime&&qe-Le>Be?Le:!isNaN(vt.startTime)&&Levt.startTime?vt.startTime+.001:Math.min(qe-Be,Ge)}return Ge}catch{return NaN}}},n=k.getLogger(E),Ee(),Z.on(e.Z.DYNAMIC_TO_STATIC,He,E),E}u.__dashjs_factory_name="DashHandler",we.Z=t.Z.getClassFactory(u)},1553:function($e,we){function O(T,t){for(var e=0;e0){for(M=0;M=F&&D-ZD&&k=k)}return!0}function g(n,l,d,D){var Z,k,F;Z=d.segmentDuration,isNaN(Z)&&(Z=d.adaptation.period.duration),k=parseFloat((d.adaptation.period.start+D*Z).toFixed(5)),F=parseFloat((k+Z).toFixed(5));var ee=y(d,Z,k,n.calcMediaTimeFromPresentationTime(k,d),n,F,l,D);return u(n,d,ee,l)?ee:null}function E(n,l,d,D,Z,k,F,ee,M,A){var U,J,$=D/k,Ee=Z/k;return U=n.calcPresentationTimeFromMediaTime($,d),u(n,d,J=y(d,Ee,U,$,n,U+Ee,l,M),l)?(J.replacementTime=A||D,F=p(F,"Number",J.replacementNumber),F=p(F,"Time",J.replacementTime),J.media=F,J.mediaRange=ee,J):null}},3636:function($e,we,O){var ie=O(5448),T=O(3393),t=O(7387);function e(y,u){var g=(y=y||{}).timelineConverter;function E(){if(!g||!g.hasOwnProperty("calcPeriodRelativeTimeFromMpdRelativeTime"))throw new Error(T.Z.MISSING_CONFIG_ERROR)}function n(l,d){if(E(),!l)return null;var D=l.adaptation.period.mpd.manifest.Period_asArray[l.adaptation.period.index].AdaptationSet_asArray[l.adaptation.index].Representation_asArray[l.index].SegmentTemplate;d=Math.max(d,0);var Z=(0,t.NF)(g,u,l,d);if(Z){Z.replacementTime=Math.round((d-1)*l.segmentDuration*l.timescale,10);var k=D.media;k=(0,t.vi)(k,"Number",Z.replacementNumber),k=(0,t.vi)(k,"Time",Z.replacementTime),Z.media=k}return Z}return{getSegmentByIndex:n,getSegmentByTime:function(l,d){if(E(),!l)return null;var D=l.segmentDuration;if(isNaN(D))return null;var Z=g.calcPeriodRelativeTimeFromMpdRelativeTime(l,d);return n(l,Math.floor(Z/D))},getMediaFinishedInformation:function(l){var d={numberOfSegments:0,mediaTimeOfLastSignaledSegment:NaN};if(!l)return d;var D=l.segmentDuration;return isNaN(D)?d.numberOfSegments=1:d.numberOfSegments=Math.ceil(l.adaptation.period.duration/D),d}}}e.__dashjs_factory_name="TemplateSegmentsGetter";var p=ie.Z.getClassFactory(e);we.Z=p},1724:function($e,we,O){var ie=O(5448),T=O(3393),t=O(7387);function e(y,u){var g=(y=y||{}).timelineConverter,E=y.dashMetrics;function n(){if(!g)throw new Error(T.Z.MISSING_CONFIG_ERROR)}function l(D,Z){var k,F,ee,M,A,U,J,$=D.adaptation.period.mpd.manifest.Period_asArray[D.adaptation.period.index].AdaptationSet_asArray[D.adaptation.index].Representation_asArray[D.index].SegmentTemplate||D.adaptation.period.mpd.manifest.Period_asArray[D.adaptation.period.index].AdaptationSet_asArray[D.adaptation.index].Representation_asArray[D.index].SegmentList,Ee=$.SegmentTimeline,Je=$.SegmentURL_asArray,oe=0,Ce=-1;J=D.timescale;var He=!1;for(ee=0,M=(k=Ee.S_asArray).length;ee=k*$-.5*J.d&&(ee=!0),!1}),F},getSegmentByTime:function(D,Z){if(n(),!D)return null;Z===void 0&&(Z=null);var k=null,F=g.calcMediaTimeFromPresentationTime(Z,D);return l(D,function(ee,M,A,U,J,$,Ee){var Je=parseFloat((F*J).toPrecision(15));if(Je=ee){var oe=M.media,Ce=U.mediaRange;return A&&(oe=A[Ee].media||"",Ce=A[Ee].mediaRange),k=(0,t.TJ)(g,u,D,ee,U.d,J,oe,Ce,$,U.tManifest),!0}return!1}),k},getMediaFinishedInformation:function(D){if(!D)return 0;var Z,k,F,ee,M,A,U,J=(D.adaptation.period.mpd.manifest.Period_asArray[D.adaptation.period.index].AdaptationSet_asArray[D.adaptation.index].Representation_asArray[D.index].SegmentTemplate||D.adaptation.period.mpd.manifest.Period_asArray[D.adaptation.period.index].AdaptationSet_asArray[D.adaptation.index].Representation_asArray[D.index].SegmentList).SegmentTimeline,$=0,Ee=0,Je=0;for(U=D.timescale,ee=(Z=J.S_asArray).length,F=0;F0&&arguments[0]!==void 0?arguments[0]:null;return parseFloat((K(Re)-Pe()).toFixed(5))}function K(Re){var ae=Re||C;return ae.start+ae.duration}function te(){var Re=arguments.length>0&&arguments[0]!==void 0&&arguments[0];C&&h&&h.getElement()?(Re&&j&&ye(Pe()),h.play()):q=!0}function X(){C&&h&&h.pause()}function P(Re){var ae=arguments.length>1&&arguments[1]!==void 0&&arguments[1],Fe=arguments.length>2&&arguments[2]!==void 0&&arguments[2],at=arguments.length>3&&arguments[3]!==void 0&&arguments[3];if(C&&h&&h.getElement()){var Rt=isNaN(Y)?h.getTime():Y;Re!==Rt&&((ue=Fe===!0)||(Y=Re),r.info("Requesting seek to time: "+Re+(ue?" (internal)":"")),j&&at&&ye(Re),h.setCurrentTime(Re,ae))}}function le(){if(C&&h&&j){var Re=c&&c.hasVideoTrack()?t.Z.VIDEO:t.Z.AUDIO,ae=I.getCurrentDVRInfo(Re);return ae&&ae.range?ae.range.end:0}}function ye(Re){var ae=new Date(w.getClientReferenceTime()),Fe=b.getRegularPeriods()[0],at=w.calcPresentationTimeFromWallTime(ae,Fe);H=at-Re}function Pe(){return C&&h?h.getTime():null}function be(){return C&&h?h.isPaused():null}function Ae(){return C&&h?h.isSeeking():null}function Ie(){return C&&h?h.isStalled():null}function st(){return C&&h?h.getPlaybackRate():null}function ut(){return C&&h?h.getEnded():null}function rt(){return j}function nt(){var Re=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null;if(!be()&&j&&h.getReadyState()!==0&&!Ae()&&!re){Re||(Re=c.hasVideoTrack()?t.Z.VIDEO:t.Z.AUDIO);var ae=Pe(),Fe=Ot(ae,Re),at=!isNaN(Fe)&&Fe!==ae;at&&!Ae()&&(Ie()||Q||h.getReadyState()===1)&&(r.debug("UpdateCurrentTime: Seek to actual time: ".concat(Fe," from currentTime: ").concat(ae)),P(Fe,!1,!1))}}function Ot(Re,ae){var Fe=I.getCurrentDVRInfo(ae),at=Fe?Fe.range:null;return at?Re>at.end?Math.max(at.end-H,at.start):Re>0&&Re+.25fe+500)&&(fe=Re,jt())):nt())},x.get().streaming.wallclockTimeUpdateInterval))}function ke(){clearInterval(G),G=null}function me(Re){var ae=b.convertRepresentationToRepresentationInfo(Re.currentRepresentation),Fe=ae?ae.mediaInfo.streamInfo:null;Fe!==null&&C.id===Fe.id&&(C=Fe)}function pe(){N.trigger(u.Z.CAN_PLAY)}function De(){N.trigger(u.Z.CAN_PLAY_THROUGH)}function xe(Re){Re.streamId===c.getActiveStreamInfo().id&&(Q=Re.state===p.Z.BUFFER_EMPTY,x.get().streaming.buffer.setStallState&&h.setStallState(Re.mediaType,Re.state===p.Z.BUFFER_EMPTY))}function Ze(){r.info("Native video element event: play"),nt(),Te(),N.trigger(u.Z.PLAYBACK_STARTED,{startTime:Pe()})}function mt(){r.info("Native video element event: waiting"),N.trigger(u.Z.PLAYBACK_WAITING,{playingTime:Pe()})}function dt(){r.info("Native video element event: playing"),ue=!1,N.trigger(u.Z.PLAYBACK_PLAYING,{playingTime:Pe()})}function Pt(){r.info("Native video element event: pause"),N.trigger(u.Z.PLAYBACK_PAUSED,{ended:ut()})}function zt(){if(!ue){var Re=Pe();isNaN(Y)||Y===Re||(Re=Y),Y=NaN,r.info("Seeking to: "+Re),Te(),N.trigger(u.Z.PLAYBACK_SEEKING,{seekTime:Re,streamId:C.id})}}function Yt(){r.info("Native video element event: seeked"),ue=!1,N.trigger(u.Z.PLAYBACK_SEEKED)}function jt(){C&&N.trigger(u.Z.PLAYBACK_TIME_UPDATED,{timeToEnd:z(),time:Pe(),streamId:C.id})}function Vt(){N.trigger(u.Z.PLAYBACK_PROGRESS,{streamId:C.id})}function Wt(){var Re=st();r.info("Native video element event: ratechange: ",Re),N.trigger(u.Z.PLAYBACK_RATE_CHANGED,{playbackRate:Re})}function Xt(){r.info("Native video element event: loadedmetadata"),N.trigger(u.Z.PLAYBACK_METADATA_LOADED),Te()}function en(){r.info("Native video element event: loadeddata"),N.trigger(u.Z.PLAYBACK_LOADED_DATA)}function fn(){r.info("Native video element event: ended"),X(),ke();var Re=c?c.getActiveStreamInfo():null;Re&&N.trigger(u.Z.PLAYBACK_ENDED,{isLast:Re.isLast})}function on(){N.trigger(u.Z.PLAYBACK_VOLUME_CHANGED)}function cn(Re){if(G&&Re.isLast){r.info("onPlaybackEnded -- PLAYBACK_ENDED but native video element didn't fire ended");var ae=Re.seekTime?Re.seekTime:K();h.setCurrentTime(ae),X(),ke()}}function lt(Re){var ae=Re.target||Re.srcElement;N.trigger(u.Z.PLAYBACK_ERROR,{error:ae.error})}function Zt(Re){if(Re.stream===!1&&ce&&!isNaN(Re.request.duration)){var ae=1.2*Re.request.duration;ae>H&&(r.warn("Browser does not support fetch API with StreamReader. Increasing live delay to be 20% higher than segment duration:",ae.toFixed(2)),H=ae,B=ae)}}function Gt(Re){N.trigger(u.Z.PLAYBACK_STALLED,{e:Re})}function kt(Re){var ae;(ae=Re.mediaInfo)&&ae.supplementalProperties&&ae.supplementalProperties[t.Z.SUPPLEMENTAL_PROPERTY_DVB_LL_SCHEME]==="true"&&(r.debug("Low Latency critical SupplementalProperty set: Enabling low Latency"),ce=!0)}function ze(Re){var ae=c.getActiveStreamInfo();Re&&ae&&Re.currentRepresentation&&Re.streamId&&Re.streamId===ae.id&&Re.mediaType&&(Re.mediaType===t.Z.VIDEO||Re.mediaType===t.Z.AUDIO)&&(se=Re.currentRepresentation.availabilityTimeComplete,(ce=!se)&&!m&&(m=!0))}function ht(){re=!0}function je(){re=!1}return o={initialize:function(Re,ae){C=Re,ae!==!0&&(h.addEventListener("canplay",pe),h.addEventListener("canplaythrough",De),h.addEventListener("play",Ze),h.addEventListener("waiting",mt),h.addEventListener("playing",dt),h.addEventListener("pause",Pt),h.addEventListener("error",lt),h.addEventListener("seeking",zt),h.addEventListener("seeked",Yt),h.addEventListener("timeupdate",jt),h.addEventListener("progress",Vt),h.addEventListener("ratechange",Wt),h.addEventListener("loadedmetadata",Xt),h.addEventListener("loadeddata",en),h.addEventListener("stalled",Gt),h.addEventListener("ended",fn),h.addEventListener("volumechange",on),j=C.manifestInfo.isDynamic,Q=!1,ue=!1,N.on(u.Z.DATA_UPDATE_COMPLETED,me,o),N.on(u.Z.LOADING_PROGRESS,Zt,o),N.on(u.Z.MANIFEST_UPDATED,ht,o),N.on(u.Z.STREAMS_COMPOSED,je,o),N.on(n.Z.PLAYBACK_ENDED,cn,o,{priority:y.Z.EVENT_PRIORITY_HIGH}),N.on(n.Z.STREAM_INITIALIZING,kt,o),N.on(n.Z.REPRESENTATION_SWITCH,ze,o),N.on(n.Z.BUFFER_LEVEL_STATE_CHANGED,xe,o),q&&(q=!1,te()))},setConfig:function(Re){Re&&(Re.streamController&&(c=Re.streamController),Re.serviceDescriptionController&&(_=Re.serviceDescriptionController),Re.dashMetrics&&(I=Re.dashMetrics),Re.adapter&&(b=Re.adapter),Re.videoModel&&(h=Re.videoModel),Re.timelineConverter&&(w=Re.timelineConverter),Re.settings&&(x=Re.settings))},getTimeToStreamEnd:z,getBufferLevel:function(){var Re=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,ae=null;return c.getActiveStreamProcessors().forEach(function(Fe){if(!Re||Re.length===0||Re.indexOf(Fe.getType())===-1){var at=Fe.getBufferLevel();ae=ae===null?at:Math.min(ae,at)}}),ae},getPlaybackStalled:function(){return Q},getTime:Pe,getLowLatencyModeEnabled:function(){return ce},getInitialCatchupModeActivated:function(){return m},getIsManifestUpdateInProgress:function(){return re},getPlaybackRate:st,getPlayedRanges:function(){return C&&h?h.getPlayedRanges():null},getEnded:ut,getIsDynamic:rt,getStreamController:function(){return c},computeAndSetLiveDelay:function(Re,ae){var Fe,at,Rt,xt=!isNaN(Re)&&isFinite(Re)?Re:NaN,an=b.getSuggestedPresentationDelay(),Rn=_.getServiceDescriptionSettings();return Fe=isNaN(x.get().streaming.delay.liveDelay)?x.get().streaming.delay.liveDelayFragmentCount===null||isNaN(x.get().streaming.delay.liveDelayFragmentCount)||isNaN(xt)?Rn&&!isNaN(Rn.liveDelay)&&Rn.liveDelay>0?Rn.liveDelay:x.get().streaming.delay.useSuggestedPresentationDelay===!0&&an!==null&&!isNaN(an)&&an>0?an:isNaN(xt)?ae&&!isNaN(ae.minBufferTime)?4*ae.minBufferTime:4*C.manifestInfo.minBufferTime:4*xt:xt*x.get().streaming.delay.liveDelayFragmentCount:x.get().streaming.delay.liveDelay,(Rt=b.getAvailabilityStartTime())!==null&&(ne=Rt),at=ae&&ae.dvrWindowSize>0?Math.min(Fe,ae.dvrWindowSize):Fe,H=at,B=at,at},getLiveDelay:function(){return H},getOriginalLiveDelay:function(){return B},getCurrentLiveLatency:function(){if(!j||isNaN(ne))return NaN;var Re=Pe();if(isNaN(Re)||Re===0)return 0;var ae=new Date().getTime()+1e3*w.getClientTimeOffset();return Math.max(((ae-ne-1e3*Re)/1e3).toFixed(3),0)},play:te,isPaused:be,isStalled:Ie,pause:X,isSeeking:Ae,getStreamEndTime:K,seek:P,seekToOriginalLive:function(){var Re=arguments.length>0&&arguments[0]!==void 0&&arguments[0],ae=arguments.length>1&&arguments[1]!==void 0&&arguments[1],Fe=arguments.length>2&&arguments[2]!==void 0&&arguments[2],at=le();if(at!==0){var Rt=at-(H=B);P(Rt,Re,ae,Fe)}},seekToCurrentLive:function(){var Re=arguments.length>0&&arguments[0]!==void 0&&arguments[0],ae=arguments.length>1&&arguments[1]!==void 0&&arguments[1],Fe=arguments.length>2&&arguments[2]!==void 0&&arguments[2],at=le();if(at!==0){var Rt=at-H;P(Rt,Re,ae,Fe)}},reset:R,updateCurrentTime:nt,getAvailabilityStartTime:function(){return ne}},r=(0,E.Z)(L).getInstance().getLogger(o),R(),o}l.__dashjs_factory_name="PlaybackController";var d=g.Z.getSingletonFactory(l),D=O(3186),Z="loading",k="executed",F="failed";function ee(o){var r,c,_,I,b=(o=o||{}).eventBus,h=o.events,w=o.dashMetrics,G=o.fragmentLoader,H=o.debug,B=o.streamInfo,C=o.type;function j(m){var x;return!!m&&(x=!1,_.some(function(L){if(N=m,R=L,!isNaN(N.index)&&N.startTime===R.startTime&&N.adaptationIndex===R.adaptationIndex&&N.type===R.type||function(z,K){return isNaN(z.index)&&isNaN(K.index)&&z.quality===K.quality}(m,L)||function(z,K){return z.action===D.Z.ACTION_COMPLETE&&z.action===K.action}(m,L))return x=!0;var N,R}),x)}function q(m){return isNaN(m.duration)?.25:Math.min(m.duration/8,.5)}function fe(m){_=_.filter(function(x){var L=q(x);return isNaN(x.startTime)||m!==void 0&&x.startTime>=m-L})}function ne(m,x){x<=m+.5||(_=_.filter(function(L){var N=q(L);return isNaN(L.startTime)||L.startTime>=x-N||isNaN(L.duration)||L.startTime+L.duration<=m+N}))}function se(m,x,L){for(var N=m.length-1;N>=0;N--){var R=m[N],z=R.startTime,K=z+R.duration;if(L=isNaN(L)?q(R):L,!isNaN(z)&&!isNaN(K)&&x+L>=z&&x-L0&&ne(L,x)}else fe()},abortRequests:function(){c.debug("abort requests"),G.abort(),I=[]},executeRequest:function(m){m.action===D.Z.ACTION_DOWNLOAD?(ce(m,Z),I.push(m),function(x){b.trigger(h.FRAGMENT_LOADING_STARTED,{request:x},{streamId:B.id,mediaType:C}),G.load(x)}(m)):c.warn("Unknown request action.")},reset:function(){b.off(h.LOADING_COMPLETED,Y,this),b.off(h.LOADING_DATA_PROGRESS,ue,this),b.off(h.LOADING_ABANDONED,Q,this),G&&G.reset(),re()},resetInitialSettings:re,addExecutedRequest:function(m){_.push(m)}},c=H.getLogger(r),re(),b.on(h.LOADING_COMPLETED,Y,r),b.on(h.LOADING_DATA_PROGRESS,ue,r),b.on(h.LOADING_ABANDONED,Q,r),r}ee.__dashjs_factory_name="FragmentModel";var M=g.Z.getClassFactory(ee);M.FRAGMENT_MODEL_LOADING=Z,M.FRAGMENT_MODEL_EXECUTED=k,M.FRAGMENT_MODEL_CANCELED="canceled",M.FRAGMENT_MODEL_FAILED=F,g.Z.updateClassFactory(ee.__dashjs_factory_name,M);var A=M,U=O(5459);function J(o){return J=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},J(o)}function $(o,r){return $=Object.setPrototypeOf||function(c,_){return c.__proto__=_,c},$(o,r)}function Ee(o,r){return!r||J(r)!=="object"&&typeof r!="function"?function(c){if(c===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return c}(o):r}function Je(o){return Je=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},Je(o)}var oe=new(function(o){(function(b,h){if(typeof h!="function"&&h!==null)throw new TypeError("Super expression must either be null or a function");b.prototype=Object.create(h&&h.prototype,{constructor:{value:b,writable:!0,configurable:!0}}),h&&$(b,h)})(I,o);var r,c,_=(r=I,c=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var b,h=Je(r);if(c){var w=Je(this).constructor;b=Reflect.construct(h,arguments,w)}else b=h.apply(this,arguments);return Ee(this,b)});function I(){var b;return function(h,w){if(!(h instanceof w))throw new TypeError("Cannot call a class as a function")}(this,I),(b=_.call(this)).MANIFEST_LOADER_PARSING_FAILURE_ERROR_CODE=10,b.MANIFEST_LOADER_LOADING_FAILURE_ERROR_CODE=11,b.XLINK_LOADER_LOADING_FAILURE_ERROR_CODE=12,b.SEGMENT_BASE_LOADER_ERROR_CODE=15,b.TIME_SYNC_FAILED_ERROR_CODE=16,b.FRAGMENT_LOADER_LOADING_FAILURE_ERROR_CODE=17,b.FRAGMENT_LOADER_NULL_REQUEST_ERROR_CODE=18,b.URL_RESOLUTION_FAILED_GENERIC_ERROR_CODE=19,b.APPEND_ERROR_CODE=20,b.REMOVE_ERROR_CODE=21,b.DATA_UPDATE_FAILED_ERROR_CODE=22,b.CAPABILITY_MEDIASOURCE_ERROR_CODE=23,b.CAPABILITY_MEDIAKEYS_ERROR_CODE=24,b.DOWNLOAD_ERROR_ID_MANIFEST_CODE=25,b.DOWNLOAD_ERROR_ID_SIDX_CODE=26,b.DOWNLOAD_ERROR_ID_CONTENT_CODE=27,b.DOWNLOAD_ERROR_ID_INITIALIZATION_CODE=28,b.DOWNLOAD_ERROR_ID_XLINK_CODE=29,b.MANIFEST_ERROR_ID_PARSE_CODE=31,b.MANIFEST_ERROR_ID_NOSTREAMS_CODE=32,b.TIMED_TEXT_ERROR_ID_PARSE_CODE=33,b.MANIFEST_ERROR_ID_MULTIPLEXED_CODE=34,b.MEDIASOURCE_TYPE_UNSUPPORTED_CODE=35,b.MANIFEST_LOADER_PARSING_FAILURE_ERROR_MESSAGE="parsing failed for ",b.MANIFEST_LOADER_LOADING_FAILURE_ERROR_MESSAGE="Failed loading manifest: ",b.XLINK_LOADER_LOADING_FAILURE_ERROR_MESSAGE="Failed loading Xlink element: ",b.SEGMENTS_UPDATE_FAILED_ERROR_MESSAGE="Segments update failed",b.SEGMENTS_UNAVAILABLE_ERROR_MESSAGE="no segments are available yet",b.SEGMENT_BASE_LOADER_ERROR_MESSAGE="error loading segment ranges from sidx",b.TIME_SYNC_FAILED_ERROR_MESSAGE="Failed to synchronize client and server time",b.FRAGMENT_LOADER_NULL_REQUEST_ERROR_MESSAGE="request is null",b.URL_RESOLUTION_FAILED_GENERIC_ERROR_MESSAGE="Failed to resolve a valid URL",b.APPEND_ERROR_MESSAGE="chunk is not defined",b.REMOVE_ERROR_MESSAGE="Removing data from the SourceBuffer",b.DATA_UPDATE_FAILED_ERROR_MESSAGE="Data update failed",b.CAPABILITY_MEDIASOURCE_ERROR_MESSAGE="mediasource is not supported",b.CAPABILITY_MEDIAKEYS_ERROR_MESSAGE="mediakeys is not supported",b.TIMED_TEXT_ERROR_MESSAGE_PARSE="parsing error :",b.MEDIASOURCE_TYPE_UNSUPPORTED_MESSAGE="Error creating source buffer of type : ",b}return I}(O(2230).Z)),Ce=O(1264),He=O(7855);function Le(o){var r,c,_,I,b,h,w=this.context,G=(0,Ce.Z)(w).getInstance(),H=o.textController,B=o.eventBus,C=[],j=[],q=!1,fe=o.mediaSource,ne=null;function se(R){return new Promise(function(z){N(function(){I.changeType&&I.changeType(R),z()})})}function ce(R){return I=H.getTextSourceBuffer(R),Promise.resolve()}function Y(){if(typeof I.addEventListener=="function")try{I.addEventListener("updateend",x,!1),I.addEventListener("error",L,!1),I.addEventListener("abort",L,!1)}catch{h=setInterval(x,50)}else h=setInterval(x,50)}function ue(R){return new Promise(function(z){I&&G.get().streaming.buffer.useAppendWindow?N(function(){try{if(!I)return void z();var K=fe.duration,te=0;R&&!isNaN(R.start)&&!isNaN(R.duration)&&isFinite(R.duration)&&(K=R.start+R.duration),R&&!isNaN(R.start)&&(te=R.start),I.appendWindowEnd===K&&I.appendWindowStart===te||(I.appendWindowStart=0,I.appendWindowEnd=K+.01,I.appendWindowStart=Math.max(te-.1,0),_.debug("Updated append window for ".concat(b.type,". Set start to ").concat(I.appendWindowStart," and end to ").concat(I.appendWindowEnd))),z()}catch{_.warn("Failed to set append window"),z()}}):z()})}function Q(R){return new Promise(function(z){I?N(function(){try{I.timestampOffset===R||isNaN(R)||(I.timestampOffset=R,_.debug("Set MSE timestamp offset to ".concat(R))),z()}catch{z()}}):z()})}function re(){if(!q&&j.length>0){q=!0;var R=j[0];j.splice(0,1);var z=function(){q=!1,j.length>0&&re.call(this),R&&R.data&&R.data.segmentType&&R.data.segmentType!==He.w.INIT_SEGMENT_TYPE&&delete R.data.bytes,R.promise.resolve({chunk:R.data})};try{ne=R.request,R.data.bytes.byteLength===0?z.call(this):(I.appendBuffer?I.appendBuffer(R.data.bytes):I.append(R.data.bytes,R.data),N(z.bind(this)))}catch(K){_.fatal('SourceBuffer append failed "'+K+'"'),j.length>0?re():q=!1,delete R.data.bytes,R.promise.reject({chunk:R.data,error:new U.Z(K.code,K.message)})}}}function m(){C.length>0&&(I.updating||(C.shift()(),m()))}function x(){I.updating||m()}function L(R){var z,K,te=R.target||{};z=u.Z.SOURCE_BUFFER_ERROR,K={error:te,lastRequestAppended:ne},B.trigger(z,K,{streamId:b.streamInfo.id,mediaType:c})}function N(R){C.push(R),I.updating||m()}return r={getType:function(){return c},getAllBufferRanges:function(){try{return I.buffered}catch(R){return _.error("getAllBufferRanges exception: "+R.message),null}},getBuffer:function(){return I},append:function(R){var z=this,K=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return new Promise(function(te,X){R?(j.push({data:R,promise:{resolve:te,reject:X},request:K}),N(re.bind(z))):X({chunk:R,error:new U.Z(oe.APPEND_ERROR_CODE,oe.APPEND_ERROR_MESSAGE)})})},remove:function(R){return new Promise(function(z,K){var te=R.start,X=R.end;te>=0&&X>te?N(function(){try{I.remove(te,X),N(function(){z({from:te,to:X,unintended:!1}),R.resolve&&R.resolve()})}catch(P){K({from:te,to:X,unintended:!1,error:new U.Z(oe.REMOVE_ERROR_CODE,oe.REMOVE_ERROR_MESSAGE)}),R.reject&&R.reject(P)}}):z()})},abort:function(){return new Promise(function(R){try{j=[],fe.readyState==="open"?N(function(){try{I&&I.abort(),R()}catch{R()}}):(I&&I.setTextTrack&&fe.readyState==="ended"&&I.abort(),R())}catch{R()}})},reset:function(){if(I){try{C=[],function(){try{typeof I.removeEventListener=="function"&&(I.removeEventListener("updateend",x,!1),I.removeEventListener("error",L,!1),I.removeEventListener("abort",L,!1)),clearInterval(h)}catch(R){_.error(R)}}(),q=!1,j=[],I.getClassName&&I.getClassName()==="TextSourceBuffer"||(_.debug("Removing sourcebuffer from media source"),fe.removeSourceBuffer(I))}catch{}I=null}ne=null},updateTimestampOffset:Q,initializeForStreamSwitch:function(R,z,K){c=(b=R).type;var te=b.codec;(function(P){I=P.getBuffer()})(K),Y();var X=[];return X.push(new Promise(function(P){N(function(){var le=I.appendWindowStart,ye=I.appendWindowEnd;I&&(I.abort(),I.appendWindowStart=le,I.appendWindowEnd=ye),P()})})),X.push(ue(b.streamInfo)),G.get().streaming.buffer.useChangeTypeForTrackSwitch&&X.push(se(te)),z&&z.MSETimeOffset!==void 0&&X.push(Q(z.MSETimeOffset)),Promise.all(X)},initializeForFirstUse:function(R,z,K){c=(b=z).type;var te=b.codec;try{if(te.match(/application\/mp4;\s*codecs="(stpp|wvtt).*"/i))return ce(R);I=fe.addSourceBuffer(te),Y();var X=[];return X.push(ue(b.streamInfo)),K&&K.MSETimeOffset!==void 0&&X.push(Q(K.MSETimeOffset)),Promise.all(X)}catch(P){return b.type==t.Z.TEXT&&!b.isFragmented||te.indexOf('codecs="stpp')!==-1||te.indexOf('codecs="vtt')!==-1||te.indexOf("text/vtt")!==-1?ce(R):Promise.reject(P)}},updateAppendWindow:ue,changeType:se},_=(0,E.Z)(w).getInstance().getLogger(r),r}Le.__dashjs_factory_name="SourceBufferSink";var ve=g.Z.getClassFactory(Le);function Ue(o){var r,c,_,I=this.context,b=[],h=o;function w(G,H){return b=b.filter(function(B){return!((isNaN(H)||B.startG))}),Promise.resolve()}return r={getAllBufferRanges:function(){for(var G=[],H=0;HG[G.length-1].end?G.push({start:B.start,end:B.end}):G[G.length-1].end=B.end}var C={start:function(j){return G[j].start},end:function(j){return G[j].end}};return Object.defineProperty(C,"length",{get:function(){return G.length}}),C},append:function(G){return G.segmentType!=="InitializationSegment"?(b.push(G),b.sort(function(H,B){return H.start-B.start}),_=null):_=G,c.debug("PreBufferSink appended chunk s: "+G.start+"; e: "+G.end),h&&h({chunk:G}),Promise.resolve()},remove:w,abort:function(){return Promise.resolve()},discharge:function(G,H){var B=function(C,j){return b.filter(function(q){return(isNaN(j)||q.startC)})}(G,H);return _&&(B.push(_),_=null),w(G,H),B},reset:function(){b=[],_=null,h=null},updateTimestampOffset:function(){return Promise.resolve()},waitForUpdateEnd:function(G){G()},getBuffer:function(){return this}},c=(0,E.Z)(I).getInstance().getLogger(r),r}Ue.__dashjs_factory_name="PreBufferSink";var Be=g.Z.getClassFactory(Ue);function ct(){var o={};return{save:function(r){var c=r.streamId,_=r.representationId;o[c]=o[c]||{},o[c][_]=r},extract:function(r,c){return o&&o[r]&&o[r][c]?o[r][c]:null},reset:function(){o={}}}}ct.__dashjs_factory_name="InitCache";var _e=g.Z.getSingletonFactory(ct),Ge=.01,vt="BufferController";function ft(o){o=o||{};var r,c,_,I,b,h,w,G,H,B,C,j,q,fe,ne,se,ce,Y,ue,Q,re,m=this.context,x=(0,y.Z)(m).getInstance(),L=o.errHandler,N=o.fragmentModel,R=o.representationController,z=o.adapter,K=o.textController,te=o.abrController,X=o.playbackController,P=o.streamInfo,le=o.type,ye=o.settings;function Pe(je){var Re=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return new Promise(function(ae,Fe){h=je,H&&Re&&typeof H.discharge=="function"?(B=H,Ae(Re).then(function(){ae()}).catch(function(at){Fe(at)})):ae()})}function be(je){return z.convertRepresentationToRepresentationInfo(R.getRepresentationForQuality(je))}function Ae(je){var Re=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return new Promise(function(ae,Fe){Y&&je?h?(C=!1,st(je,Re).then(function(at){ae(at)}).catch(function(at){Fe(at)})):(C=!0,Ie().then(function(at){ae(at)}).catch(function(at){Fe(at)})):ae(null)})}function Ie(){var je=this;return new Promise(function(Re,ae){var Fe=te.getQualityFor(le,P.id);H=Be(m).create(Te.bind(je)),en(be(Fe)).then(function(){Re(H)}).catch(function(){ae()})})}function st(je,Re){return new Promise(function(ae,Fe){var at=te.getQualityFor(le,P.id);H=ve(m).create({mediaSource:h,textController:K,eventBus:x}),function(Rt,xt,an){var Rn=be(an);return xt&&xt[le]&&(le===t.Z.VIDEO||le===t.Z.AUDIO)?H.initializeForStreamSwitch(Rt,Rn,xt[le]):H.initializeForFirstUse(P,Rt,Rn)}(je,Re,at).then(function(){return en(be(at))}).then(function(){ae(H)}).catch(function(Rt){c.fatal("Caught error on create SourceBuffer: "+Rt),L.error(new U.Z(oe.MEDIASOURCE_TYPE_UNSUPPORTED_CODE,oe.MEDIASOURCE_TYPE_UNSUPPORTED_MESSAGE+le)),Fe(Rt)})})}function ut(je){ye.get().streaming.cacheInitSegments&&(c.info("Init fragment finished loading saving to",le+"'s init cache"),Y.save(je.chunk)),c.debug("Append Init fragment",le," with representationId:",je.chunk.representationId," and quality:",je.chunk.quality,", data size:",je.chunk.bytes.byteLength),nt(je.chunk)}function rt(je){nt(je.chunk,je.request)}function nt(je){var Re=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;H&&(H.append(je,Re).then(function(ae){Te(ae)}).catch(function(ae){Te(ae)}),je.mediaInfo.type===t.Z.VIDEO&&ze(u.Z.VIDEO_CHUNK_RECEIVED,{chunk:je}))}function Ot(je){if(je&&je.length>0)for(var Re=0,ae=je.length;Re0){var Fe=Math.max(.2*b,1),at=b-Fe,Rt=Math.min(ye.get().streaming.buffer.bufferTimeAtTopQuality,.9*at),xt=Math.min(ye.get().streaming.buffer.bufferTimeAtTopQualityLongForm,.9*at),an={streaming:{buffer:{bufferToKeep:parseFloat(Fe.toFixed(5)),bufferTimeAtTopQuality:parseFloat(Rt.toFixed(5)),bufferTimeAtTopQualityLongForm:parseFloat(xt.toFixed(5))}}};ye.update(an)}}(),void(je.error.code!==22&&kt()||(c.warn("Clearing playback buffer to overcome quota exceed situation"),ze(u.Z.QUOTA_EXCEEDED,{criticalBufferLevel:b,quotaExceededTime:je.chunk.start}),Vt(jt())));if(H&&(mt(),ce=!1,(fe=je.chunk)&&fe.endFragment)){fe&&!isNaN(fe.index)&&(w=Math.max(fe.index,w),dt());var Re=H.getAllBufferRanges();fe.segmentType===He.w.MEDIA_SEGMENT_TYPE&&(Ot(Re),pe(),function(){if(!isNaN(re)&&!C)if(le===t.Z.AUDIO||le===t.Z.VIDEO){var Fe=X.getTime(),at=Ze(Fe,0),Rt=Ze(re,0);if(at&&Rt&&at.start===Rt.start)re=NaN;else{var xt=R.getCurrentRepresentation().segmentDuration,an=Ze(re,xt);an&&(ye.get().streaming.buffer.enableSeekDecorrelationFix&&Math.abs(Fe-re)>xt?re<=an.end&&X.seek(Math.max(re,an.start),!1,!0):Fe0&&(ae=!0),j=null),fe&&!ae&&ze(u.Z.BYTES_APPENDED_END_FRAGMENT,{quality:fe.quality,startTime:fe.start,index:fe.index,bufferedRanges:Re,segmentType:fe.segmentType,mediaType:le})}}function ke(){return new Promise(function(je,Re){var ae=me();if(!ae||ae.length===0)return pe(),void je();Vt(ae).then(function(){je()}).catch(function(Fe){Re(Fe)})})}function me(je){var Re=[],ae=H.getAllBufferRanges();if(!ae||ae.length===0)return Re;if(!je&&je!==0||isNaN(je))Re.push({start:ae.start(0),end:ae.end(ae.length-1)+.5});else{var Fe=function(Rt,xt){var an=ye.get().streaming.buffer.bufferToKeep,Rn=xt.start(0);if(Rt-Rn>an){var Wn=Math.max(0,Rt-an),Sn=N.getRequests({state:A.FRAGMENT_MODEL_EXECUTED,time:Rt,threshold:Ge})[0];if(Sn&&(Wn=Math.min(Sn.startTime,Wn)),Wn>0)return{start:Rn,end:Wn}}return null}(je,ae),at=function(Rt,xt){var an=xt.end(xt.length-1)+.5,Rn=Gt(Rt),Wn=P.manifestInfo.duration>=ye.get().streaming.buffer.longFormContentDurationThreshold?ye.get().streaming.buffer.bufferTimeAtTopQualityLongForm:ye.get().streaming.buffer.bufferTimeAtTopQuality,Sn=isNaN(Rn)?Rt:Math.min(Rn,Rt+Wn);if(Sn>=xt.end(xt.length-1))return null;var Xn=N.getRequests({state:A.FRAGMENT_MODEL_EXECUTED,time:Rt,threshold:Ge})[0];if(Xn&&(Sn=Math.max(Xn.startTime+Xn.duration,Sn)),ye.get().streaming.buffer.avoidCurrentTimeRangePruning){for(var Yn=0;Yn=Rt&&je=G-1,Re=X.getTimeToStreamEnd(P)-I<1e-5;!je&&!Re||_||(lt(!0),c.debug("checkIfBufferingCompleted trigger BUFFERING_COMPLETED for stream id ".concat(P.id," and type ").concat(le)))}function Pt(){le!==t.Z.AUDIO&&le!==t.Z.VIDEO||((!X.getLowLatencyModeEnabled()&&I=ye.get().streaming.buffer.stallThreshold||X.getLowLatencyModeEnabled()&&I>0)&&zt(p.Z.BUFFER_LOADED))}function zt(je){q===je||je===p.Z.BUFFER_EMPTY&&X.getTime()===0||le===t.Z.TEXT&&!K.isTextEnabled()||(q=je,ze(u.Z.BUFFER_LEVEL_STATE_CHANGED,{state:je}),ze(je===p.Z.BUFFER_LOADED?u.Z.BUFFER_LOADED:u.Z.BUFFER_EMPTY),c.debug(je===p.Z.BUFFER_LOADED?"Got enough buffer to start":"Waiting for more buffer before starting playback"))}function Yt(){H&&le!==t.Z.TEXT&&(_||Vt(jt()))}function jt(){var je=[],Re=H.getAllBufferRanges();if(!Re||Re.length===0)return je;var ae=X.getTime(),Fe=Math.max(0,ae-ye.get().streaming.buffer.bufferToKeep),at=N.getRequests({state:A.FRAGMENT_MODEL_EXECUTED,time:ae,threshold:Ge})[0];if(at)Fe=Math.min(at.startTime,Fe);else if(ae===0&&X.getIsDynamic())return[];if(Re.start(0)<=Fe){for(var Rt={start:0,end:Fe},xt=0;xt=ye.get().streaming.buffer.bufferPruningInterval&&(ne=0,Yt())}function cn(){Pt()}function lt(je){(_=je)?ze(u.Z.BUFFERING_COMPLETED):G=Number.POSITIVE_INFINITY}function Zt(){try{var je,Re,ae=H.getAllBufferRanges(),Fe=0;if(!ae)return Fe;for(Re=0,je=ae.length;Re=at&&Re<=Rt&&(Re=Rt),Fe+=1}return Re===je?NaN:Re}catch{}}function kt(){var je=Zt();return isNaN(je)||je0){for(var Re="Beginning "+le+"PreBuffer discharge, adding buffer for:",ae=0;ae=Fe&&je<=at)return!0;ae+=1}return!1}catch(Rt){return c.error(Rt),!1}},pruneBuffer:Yt,setMediaSource:Pe,getMediaSource:function(){return h},appendInitSegmentFromCache:function(je){var Re=Y.extract(P.id,je);return!!Re&&(c.info("Append Init fragment",le," with representationId:",Re.representationId," and quality:",Re.quality,", data size:",Re.bytes.byteLength),nt(Re),!0)},getIsBufferingCompleted:function(){return _},setIsBufferingCompleted:lt,getIsPruningInProgress:function(){return se},reset:function(je,Re){x.off(u.Z.INIT_FRAGMENT_LOADED,ut,this),x.off(u.Z.MEDIA_FRAGMENT_LOADED,rt,this),x.off(u.Z.WALLCLOCK_TIME_UPDATED,on,this),x.off(n.Z.PLAYBACK_PLAYING,xe,this),x.off(n.Z.PLAYBACK_PROGRESS,pe,this),x.off(n.Z.PLAYBACK_TIME_UPDATED,pe,this),x.off(n.Z.PLAYBACK_RATE_CHANGED,cn,this),x.off(n.Z.PLAYBACK_STALLED,De,this),ht(je,Re)},prepareForPlaybackSeek:function(){return _&<(!1),H.abort()},prepareForReplacementTrackSwitch:function(je){return new Promise(function(Re,ae){H.abort().then(function(){return fn()}).then(function(){return ye.get().streaming.buffer.useChangeTypeForTrackSwitch?H.changeType(je):Promise.resolve()}).then(function(){return ke()}).then(function(){lt(!1),Re()}).catch(function(Fe){ae(Fe)})})},prepareForNonReplacementTrackSwitch:function(je){return new Promise(function(Re,ae){fn().then(function(){return ye.get().streaming.buffer.useChangeTypeForTrackSwitch?H.changeType(je):Promise.resolve()}).then(function(){Re()}).catch(function(Fe){ae(Fe)})})},prepareForForceReplacementQualitySwitch:function(je){return new Promise(function(Re,ae){H.abort().then(function(){return fn()}).then(function(){return ke()}).then(function(){return en(je)}).then(function(){lt(!1),Re()}).catch(function(Fe){ae(Fe)})})},updateAppendWindow:fn,getAllRangesWithSafetyFactor:me,getContinuousBufferTimeForTargetTime:Gt,clearBuffers:Vt,pruneAllSafely:ke,updateBufferTimestampOffset:en,setSeekTarget:function(je){re=je},segmentRequestingCompleted:function(je){isNaN(je)||(G=je,dt())}},c=(0,E.Z)(m).getInstance().getLogger(r),Y=_e(m).getInstance(),ht(),r}ft.__dashjs_factory_name=vt;var qe=g.Z.getClassFactory(ft),et="NotFragmentedTextBufferController";function de(o){o=o||{};var r,c,_,I,b,h,w=this.context,G=(0,y.Z)(w).getInstance(),H=o.textController,B=o.errHandler,C=o.streamInfo,j=o.type;function q(se){I=se}function fe(se){var ce,Y;c!==se&&(c=se)&&(ce=u.Z.BUFFERING_COMPLETED,Y={},G.trigger(ce,Y,{streamId:C.id,mediaType:j}))}function ne(se){se.chunk.bytes&&!c&&(h.save(se.chunk),b.append(se.chunk),fe(!0))}return r={initialize:function(se){q(se)},getStreamId:function(){return C.id},getType:function(){return j},getBufferControllerType:function(){return et},createBufferSink:function(se){return new Promise(function(ce,Y){try{(b=ve(w).create({mediaSource:I,textController:H,eventBus:G})).initializeForFirstUse(C,se),_||(b.getBuffer()&&typeof b.getBuffer().initialize=="function"&&b.getBuffer().initialize(),_=!0),ce(b)}catch(ue){B.error(new U.Z(oe.MEDIASOURCE_TYPE_UNSUPPORTED_CODE,oe.MEDIASOURCE_TYPE_UNSUPPORTED_MESSAGE+j)),Y(ue)}})},dischargePreBuffer:function(){},getBuffer:function(){return b},getBufferLevel:function(){return 0},getRangeAt:function(){return null},pruneBuffer:function(){},hasBufferAtTime:function(){return!0},getAllRangesWithSafetyFactor:function(){return[]},getContinuousBufferTimeForTargetTime:function(){return Number.POSITIVE_INFINITY},setMediaSource:q,getMediaSource:function(){return I},appendInitSegmentFromCache:function(se){return h.extract(C.id,se)!==null},getIsBufferingCompleted:function(){return c},setIsBufferingCompleted:fe,getIsPruningInProgress:function(){return!1},reset:function(se){G.off(u.Z.INIT_FRAGMENT_LOADED,ne,r),!se&&b&&(b.abort(),b.reset(),b=null)},clearBuffers:function(){return Promise.resolve()},prepareForPlaybackSeek:function(){return Promise.resolve()},prepareForReplacementTrackSwitch:function(){return c=!1,Promise.resolve()},setSeekTarget:function(){},updateAppendWindow:function(){return Promise.resolve()},pruneAllSafely:function(){return Promise.resolve()},updateBufferTimestampOffset:function(){return Promise.resolve()},segmentRequestingCompleted:function(){}},_=!1,I=null,c=!1,h=_e(w).getInstance(),G.on(u.Z.INIT_FRAGMENT_LOADED,ne,r),r}de.__dashjs_factory_name=et;var ge=g.Z.getClassFactory(de);function Ve(o){o=o||{};var r,c,_,I,b,h,w,G,H,B,C,j,q=this.context,fe=(0,y.Z)(q).getInstance(),ne=o.dashMetrics,se=o.mediaPlayerModel,ce=o.fragmentModel,Y=o.abrController,ue=o.playbackController,Q=o.textController,re=o.type,m=o.bufferController,x=o.representationController,L=o.settings;function N(be){if(!m.getIsBufferingCompleted()){R();var Ae=isNaN(be)?0:be;b=setTimeout(z,Ae)}}function R(){b&&(clearTimeout(b),b=null)}function z(){try{if(function(){try{return re===t.Z.TEXT&&!Q.isTextEnabled()||ue.isPaused()&&(!ue.getStreamController().getInitialPlayback()||!ue.getStreamController().getAutoPlay())&&!L.get().streaming.scheduling.scheduleWhilePaused}catch{return!1}}())return void R();if(function(){try{return x.getCurrentRepresentationInfo()&&(isNaN(H)||B||(Ie=c.id,st=Y.getMaxAllowedIndexFor(re,Ie),!(!isNaN(G)&&G==st||(_.info("Top quality "+re+" index has changed from "+G+" to "+st),G=st,0)))||function(){var ut=x.getCurrentRepresentationInfo();return!re||!ut||ne.getCurrentBufferLevel(re)=L.get().streaming.buffer.longFormContentDurationThreshold?L.get().streaming.buffer.bufferTimeAtTopQualityLongForm:L.get().streaming.buffer.bufferTimeAtTopQuality:se.getStableBufferTime()}catch{return se.getStableBufferTime()}}()),be}function te(){X(!0)}function X(be){if(ue&&ce){var Ae=ce.getRequests({state:A.FRAGMENT_MODEL_EXECUTED,time:ue.getTime(),threshold:0})[0];Ae&&ue.getTime()>=Ae.startTime&&((!w.mediaInfo||Ae.mediaInfo.type===w.mediaInfo.type&&Ae.mediaInfo.index!==w.mediaInfo.index)&&be&&fe.trigger(u.Z.TRACK_CHANGE_RENDERED,{mediaType:re,oldMediaInfo:w.mediaInfo,newMediaInfo:Ae.mediaInfo,streamId:c.id}),Ae.quality===w.quality&&Ae.adaptationIndex===w.adaptationIndex||!be||(_.debug("Quality change rendered for streamId ".concat(c.id," and type ").concat(re)),fe.trigger(u.Z.QUALITY_CHANGE_RENDERED,{mediaType:re,oldQuality:w.quality,newQuality:Ae.quality,streamId:c.id})),w={mediaInfo:Ae.mediaInfo,quality:Ae.quality,adaptationIndex:Ae.adaptationIndex})}}function P(){ce.abortRequests(),R()}function le(){L.get().streaming.scheduling.scheduleWhilePaused||N()}function ye(be){ne.updatePlayListTraceMetrics({playbackspeed:be.playbackRate.toString()})}function Pe(){j=!0,I=0,H=NaN,w={mediaInfo:void 0,quality:NaN,adaptationIndex:NaN},G=NaN,B=!1,C=!1}return r={initialize:function(be){h=be,fe.on(u.Z.URL_RESOLUTION_FAILED,P,r),fe.on(n.Z.PLAYBACK_STARTED,le,r),fe.on(n.Z.PLAYBACK_RATE_CHANGED,ye,r),fe.on(n.Z.PLAYBACK_TIME_UPDATED,te,r)},getType:function(){return re},getStreamId:function(){return c.id},setTimeToLoadDelay:function(be){I=be},getTimeToLoadDelay:function(){return I},setSwitchTrack:function(be){B=be},getSwitchTrack:function(){return B},startScheduleTimer:N,clearScheduleTimer:R,reset:function(){fe.off(u.Z.URL_RESOLUTION_FAILED,P,r),fe.off(n.Z.PLAYBACK_STARTED,le,r),fe.off(n.Z.PLAYBACK_RATE_CHANGED,ye,r),fe.off(n.Z.PLAYBACK_TIME_UPDATED,te,r),R(),X(!1),Pe(),c=null},getBufferTarget:K,getPlaybackController:function(){return ue},setCheckPlaybackQuality:function(be){j=be},setInitSegmentRequired:function(be){C=be},setLastInitializedQuality:function(be){H=be}},_=(0,E.Z)(q).getInstance().getLogger(r),Pe(),c=o.streamInfo,r}Ve.__dashjs_factory_name="ScheduleController";var f=g.Z.getClassFactory(Ve),i=O(7387);function v(o){var r,c,_,I,b,h,w=(o=o||{}).eventBus,G=o.events,H=o.abrController,B=o.dashMetrics,C=o.playbackController,j=o.timelineConverter,q=o.type,fe=o.streamInfo,ne=o.dashConstants,se=o.segmentsController,ce=o.isDynamic,Y=o.adapter;function ue(){return q}function Q(){return _}function re(){return h}function m(){c=null,_=!0,I=[],b=null}function x(te){return new Promise(function(X,P){var le=te.hasInitialization(),ye=te.hasSegments(),Pe=[];Pe.push(se.updateInitData(te,le)),Pe.push(se.updateSegmentData(te,ye)),Promise.all(Pe).then(function(be){var Ae;be[0]&&!be[0].error&&(te=function(Ie,st){return st&&!st.error&&st.representation?st.representation:Ie}(te,be[0])),be[1]&&!be[1].error&&(te=function(Ie,st){if(st&&!st.error){var ut,rt,nt,Ot,Te=st.segments,ke=[],me=0;for(ut=0,rt=Te?Te.length:0;ut0&&(Ie.segments=ke),Ie}}(te,be[1])),(Ae=te).mediaFinishedInformation=se.getMediaFinishedInformation(Ae),function(Ie){if(Q()){var st,ut,rt=B.getCurrentManifestUpdate(),nt=!1;if(rt){for(var Ot=0;Ot=I.length?null:I[te]}function R(te){_=!1,w.trigger(G.DATA_UPDATE_COMPLETED,{data:c,currentRepresentation:h,error:te},{streamId:fe.id,mediaType:q})}function z(te){h=te,b=Y.convertRepresentationToRepresentationInfo(h)}function K(te){if(te.newDuration){var X=re();X&&X.adaptation.period&&(X.adaptation.period.duration=te.newDuration)}}return r={getStreamId:function(){return fe.id},getType:ue,getData:function(){return c},isUpdating:Q,updateData:function(te,X,P,le,ye){return new Promise(function(Pe,be){if(_=!0,I=X,c=te,z(N(ye)),P!==t.Z.VIDEO&&P!==t.Z.AUDIO&&(P!==t.Z.TEXT||!le))return R(),void Pe();for(var Ae=[],Ie=0,st=I.length;Ie=ce.start+ce.duration}function ut(ze){var ht=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1];if(ze.sender){if(z.getIsManifestUpdateInProgress())ke();else if((!Ae()||te.isTextEnabled())&&h&&ze.representationId&&!h.appendInitSegmentFromCache(ze.representationId)){var je=G.getCurrentRepresentation();if(je.range===0)return void rt();var Re=C?C.getInitRequest(I,je):null;Re?N.executeRequest(Re):ht&&(w.setInitSegmentRequired(!0),ke())}}}function rt(ze){var ht=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1];if(z.getIsManifestUpdateInProgress()||h.getIsPruningInProgress())ke();else{var je=Te();je?(H=!1,nt(je)):Ot(ht)}}function nt(ze){isNaN(ze.startTime+ze.duration)||(q=ze.startTime+ze.duration),ze.delayLoadingTime=new Date().getTime()+w.getTimeToLoadDelay(),w.setTimeToLoadDelay(0),function(ht){var je=ht.url;return ht.range&&(je=je.concat("_",ht.range)),ye.contains(je)}(ze)?(c.warn("Fragment request url ".concat(ze.url," for stream id ").concat(ce.id," and media type ").concat(Y," is on the ignore list and will be skipped")),ke()):(c.debug("Next fragment request url for stream id ".concat(ce.id," and media type ").concat(Y," is ").concat(ze.url)),N.executeRequest(ze))}function Ot(ze){var ht,je=G.getCurrentRepresentation();if(!P.get().streaming.gaps.enableSeekFix||!H&&z.getTime()!==0||(_?_&&je.segmentInfoType===e.Z.SEGMENT_TIMELINE&&(ht=C.getValidTimeAheadOfTargetTime(q,I,je,P.get().streaming.gaps.threshold)):ht=C.getValidTimeAheadOfTargetTime(q,I,je,P.get().streaming.gaps.threshold),isNaN(ht)||ht===q)){if(C.isLastSegmentRequested(je,q)){var Re=C.getCurrentIndex();return c.debug("Segment requesting for stream ".concat(ce.id," has finished")),se.trigger(u.Z.STREAM_REQUESTING_COMPLETED,{segmentIndex:Re},{streamId:ce.id,mediaType:Y}),h.segmentRequestingCompleted(Re),void w.clearScheduleTimer()}ze&&ke()}else z.isSeeking()||z.getTime()===0?(c.warn("Adjusting playback time ".concat(ht," because of gap in the manifest. Seeking by ").concat(ht-q)),z.seek(ht,!1,!1)):(c.warn("Adjusting buffering time ".concat(ht," because of gap in the manifest. Adjusting time by ").concat(ht-q)),kt(ht),ze&&ke())}function Te(){var ze,ht=en();if(isNaN(q)||be()===t.Z.TEXT&&!te.isTextEnabled())return null;if(C){var je=G&&ht?G.getRepresentationForQuality(ht.quality):null;ze=H?C.getSegmentRequestForTime(I,je,q):C.getNextSegmentRequest(I,je)}return ze}function ke(){w.startScheduleTimer(z.getLowLatencyModeEnabled()?P.get().streaming.scheduling.lowLatencyTimeout:P.get().streaming.scheduling.defaultTimeout)}function me(ze){ze.error||h.getIsBufferingCompleted()||h.updateBufferTimestampOffset(ze.currentRepresentation)}function pe(ze){X.addBufferState(Y,ze.state,w.getBufferTarget()),ze.state!==p.Z.BUFFER_EMPTY||z.isSeeking()||(c.info("Buffer is empty! Stalling!"),X.pushPlayListTraceMetrics(new Date,Ne.REBUFFERING_REASON))}function De(ze){N.syncExecutedRequestsWithBufferedRange(h.getBuffer().getAllBufferRanges(),ce.duration),ze.quotaExceeded&&ze.from>z.getTime()&&kt(ze.from),ze.hasEnoughSpaceToAppend&&ze.quotaExceeded&&w.startScheduleTimer()}function xe(ze){if(ze&&ze.lastRequestAppended&&ze.lastRequestAppended.url){var ht=ze.lastRequestAppended.url;ze.lastRequestAppended.range&&(ht=ht.concat("_",ze.lastRequestAppended.range)),c.warn("Blacklisting segment with url ".concat(ht)),ye.add(ht)}}function Ze(ze){if(c.debug("Appended bytes for ".concat(ze.mediaType," and stream id ").concat(ze.streamId)),ze.segmentType===He.w.INIT_SEGMENT_TYPE){var ht=ze.quality;w.setLastInitializedQuality(ht),c.info("["+Y+"] lastInitializedRepresentationInfo changed to "+ze.quality)}fe?mt(fe):w.startScheduleTimer(0)}function mt(ze){var ht=N.getRequests({state:A.FRAGMENT_MODEL_LOADING});if(ht&&ht.length>0)return c.debug("Preparing for default quality switch: Waiting for ongoing segment request to be finished before applying switch."),void(fe=ze);h.updateBufferTimestampOffset(ze).then(function(){I.segmentAlignment||I.subSegmentAlignment?w.startScheduleTimer():Zt(),fe=null,B=!1}).catch(function(){fe=null,B=!1})}function dt(ze){c.info("onFragmentLoadingAbandoned request: "+ze.request.url+" has been aborted"),z.isSeeking()||w.getSwitchTrack()||B||(c.info("onFragmentLoadingAbandoned request: "+ze.request.url+" has to be downloaded again, origin is not seeking process or switch track call"),ze.request&&ze.request.isInitializationRequest()?w.setInitSegmentRequired(!0):kt(ze.request.startTime+ze.request.duration/2),w.startScheduleTimer(0))}function Pt(ze){c.info("OnFragmentLoadingCompleted for stream id "+ce.id+" and media type "+Y+" - Url:",ze.request?ze.request.url:"undefined",ze.request.range?", Range:"+ze.request.range:""),Ae()&&w.startScheduleTimer(0),ze.error&&ze.request.serviceLocation&&function(ht){c.info("Fragment loading completed with an error"),ht&&ht.request&&ht.request.type&&(ht.request.type===He.w.INIT_SEGMENT_TYPE?ut({representationId:ht.request.representationId,sender:{}},!1):ht.request.type===He.w.MEDIA_SEGMENT_TYPE&&(kt(ht.request.startTime+ht.request.duration/2),rt({},!1)))}(ze)}function zt(){kt(z.getTime()),Xt().startScheduleTimer()}function Yt(ze){var ht=ze.currentTrackInfo;if(ht){var je=b.find(function(Re){return Re.index===ht.index&&Re.lang===ht.lang});je&&Wt(je).then(function(){h.setIsBufferingCompleted(!1),kt(z.getTime()),w.setInitSegmentRequired(!0),w.startScheduleTimer()})}}function jt(ze){kt(ze.quotaExceededTime),w.clearScheduleTimer()}function Vt(){return h?h.getBuffer():null}function Wt(ze){ze===I||ze&&I&&ze.type!==I.type||(I=ze);var ht=m.getRealAdaptation(ce,I),je=m.getVoRepresentations(I);if(G){var Re,ae=G.getData(),Fe=R.getMaxAllowedIndexFor(Y,ce.id),at=R.getMinAllowedIndexFor(Y,ce.id),Rt=null;return ae!==null&&ae.id===ht.id||Y===t.Z.TEXT?Re=R.getQualityFor(Y,ce.id):(Rt=R.getThroughputHistory().getAverageThroughput(Y,_)||R.getInitialBitrateFor(Y,ce.id),Re=R.getQualityForBitrate(I,Rt,ce.id)),at!==void 0&&ReFe&&(Re=Fe),G.updateData(ht,je,Y,I.isFragmented,Re)}return Promise.resolve()}function Xt(){return w}function en(ze){var ht;return ze!==void 0?((0,W.SE)(ze),ht=G?G.getRepresentationForQuality(ze):null):ht=G?G.getCurrentRepresentation():null,m.convertRepresentationToRepresentationInfo(ht)}function fn(){return!!h&&h.getIsBufferingCompleted()}function on(ze){if(P.get().streaming.enableManifestTimescaleMismatchFix){var ht=ze.chunk,je=ht.bytes,Re=en(ht.quality),ae=G&&Re?G.getRepresentationForQuality(Re.quality):null;Re&&ae&&(ae.timescale=le.getMediaTimescaleFromMoov(je))}}function cn(ze){var ht=ze.chunk,je=ht.bytes,Re=ht.quality,ae=en(Re),Fe=G&&ae?G.getRepresentationForQuality(ae.quality):null;if(ae&&Fe){var at;if(P.get().streaming.parseInbandPrft&&ze.request.type===He.w.MEDIA_SEGMENT_TYPE){var Rt=function(Sn,Xn){var Yn=Sn.getBoxes("prft"),gr=[];return Yn.forEach(function(Cr){gr.push(function(lr,hr){var nr="unknown";switch(lr.flags){case 0:nr=e.Z.PRODUCER_REFERENCE_TIME_TYPE.ENCODER;break;case 16:nr=e.Z.PRODUCER_REFERENCE_TIME_TYPE.APPLICATION;break;case 24:nr=e.Z.PRODUCER_REFERENCE_TIME_TYPE.CAPTURED}var mr=1e3*lr.ntp_timestamp_sec+lr.ntp_timestamp_frac/Math.pow(2,32)*1e3;return{type:nr,ntpTimestamp:mr=At(ne).getInstance().ntpToUTC(mr),mediaTime:lr.media_time/hr}}(Cr,Xn))}),gr}(at=at||le.parse(je),Fe.timescale);Rt&&Rt.length&&se.trigger(n.Z.INBAND_PRFT,{data:Rt},{streamId:ce.id,mediaType:Y})}var xt=m.getEventsFor(ae.mediaInfo,null,ce),an=m.getEventsFor(ae,Fe,ce);if(xt&&xt.length>0||an&&an.length>0){var Rn=N.getRequests({state:A.FRAGMENT_MODEL_EXECUTED,quality:Re,index:ht.index})[0],Wn=function(Sn,Xn,Yn,gr){try{for(var Cr={},lr=[],hr=Yn.concat(gr),nr=0,mr=hr.length;nrP.get().streaming.buffer.stallThreshold;if(h.getIsBufferingCompleted()&&!ht)return h.prepareForNonReplacementTrackSwitch(I.codec).then(function(){se.trigger(u.Z.BUFFERING_COMPLETED,{},{streamId:ce.id,mediaType:Y})}).catch(function(){se.trigger(u.Z.BUFFERING_COMPLETED,{},{streamId:ce.id,mediaType:Y})}),void ze();w.clearScheduleTimer(),w.setSwitchTrack(!0),ht?(se.trigger(u.Z.BUFFER_REPLACEMENT_STARTED,{mediaType:Y,streamId:ce.id},{mediaType:Y,streamId:ce.id}),N.abortRequests(),h.prepareForReplacementTrackSwitch(I.codec).then(function(){var je=en();return h.updateBufferTimestampOffset(je)}).then(function(){lt(),ze()}).catch(function(){lt(),ze()})):h.prepareForNonReplacementTrackSwitch(I.codec).then(function(){Zt(),ze()}).catch(function(){Zt(),ze()})})},prepareQualityChange:function(ze){fe&&c.warning("Canceling queued representation switch to ".concat(fe.quality," for ").concat(Y)),c.debug("Preparing quality switch for type ".concat(Y));var ht=ze.newQuality;B=!0,w.clearScheduleTimer(),G.prepareQualityChange(ht);var je=en(ht);ze.reason&&ze.reason.forceReplace?function(Re){N.abortRequests(),se.trigger(u.Z.BUFFER_REPLACEMENT_STARTED,{mediaType:Y,streamId:ce.id},{mediaType:Y,streamId:ce.id}),h.prepareForForceReplacementQualitySwitch(Re).then(function(){lt(),B=!1}).catch(function(){lt(),B=!1})}(je):P.get().streaming.buffer.fastSwitchEnabled?function(Re){var ae=z.getTime(),Fe=1.5*(isNaN(Re.fragmentDuration)?1:Re.fragmentDuration),at=N.getRequests({state:A.FRAGMENT_MODEL_EXECUTED,time:ae+Fe,threshold:0})[0];if(at&&!Ae()){var Rt=h.getBufferLevel(),xt=R.getAbandonmentStateFor(ce.id,Y);at.quality=Fe&&xt!==p.Z.ABANDON_LOAD?h.updateBufferTimestampOffset(Re).then(function(){N.abortRequests(),kt(ae+Fe),w.setCheckPlaybackQuality(!1),w.startScheduleTimer(),B=!1}).catch(function(){B=!1}):mt(Re)}else w.startScheduleTimer(),B=!1}(je):mt(je),X.pushPlayListTraceMetrics(new Date,Ne.REPRESENTATION_SWITCH_STOP_REASON),X.createPlaylistTraceMetrics(je.id,1e3*z.getTime(),z.getPlaybackRate())},getMediaInfo:function(){return I},getMediaSource:function(){return h.getMediaSource()},setMediaSource:function(ze){return h.setMediaSource(ze,I)},getBuffer:Vt,setExplicitBufferingTime:kt,finalisePlayList:function(ze,ht){X.pushPlayListTraceMetrics(ze,ht)},probeNextRequest:function(){var ze=en(),ht=G&&ze?G.getRepresentationForQuality(ze.quality):null;return C.getNextSegmentRequestIdempotent(I,ht)},prepareInnerPeriodPlaybackSeeking:function(ze){return new Promise(function(ht){if(h.hasBufferAtTime(ze.seekTime))return h.pruneBuffer(),st(h.getContinuousBufferTimeForTargetTime(ze.seekTime))&&h.setIsBufferingCompleted(!0),void ht();w.clearScheduleTimer(),N.abortRequests(),h.prepareForPlaybackSeek().then(function(){var je=h.getAllRangesWithSafetyFactor(ze.seekTime);return h.clearBuffers(je)}).then(function(){var je=h.getContinuousBufferTimeForTargetTime(ze.seekTime);if(st(je))h.setIsBufferingCompleted(!0),ht();else{var Re=isNaN(je)?ze.seekTime:je;kt(Re),h.setSeekTarget(Re);var ae=[];ae.push(h.updateAppendWindow());var Fe=en();ae.push(h.updateBufferTimestampOffset(Fe)),Promise.all(ae).then(function(){w.setInitSegmentRequired(!0),w.setCheckPlaybackQuality(!1),w.startScheduleTimer(),ht()})}}).catch(function(je){c.error(je)})})},prepareOuterPeriodPlaybackSeeking:function(){return new Promise(function(ze,ht){try{w.clearScheduleTimer(),N.abortRequests(),h.prepareForPlaybackSeek().then(function(){return h.pruneAllSafely()}).then(function(){ze()})}catch(je){ht(je)}})},reset:function(ze,ht){C&&C.reset(),h&&(h.reset(ze,ht),h=null),w&&(w.reset(),w=null),G&&(G.reset(),G=null),j&&(j=null),R&&R.unRegisterStreamType(Pe(),Y),se.off(u.Z.DATA_UPDATE_COMPLETED,me,r),se.off(u.Z.INIT_FRAGMENT_NEEDED,ut,r),se.off(u.Z.MEDIA_FRAGMENT_NEEDED,rt,r),se.off(u.Z.INIT_FRAGMENT_LOADED,on,r),se.off(u.Z.MEDIA_FRAGMENT_LOADED,cn,r),se.off(u.Z.BUFFER_LEVEL_STATE_CHANGED,pe,r),se.off(u.Z.BUFFER_CLEARED,De,r),se.off(u.Z.SEEK_TARGET,Gt,r),se.off(u.Z.FRAGMENT_LOADING_ABANDONED,dt,r),se.off(u.Z.FRAGMENT_LOADING_COMPLETED,Pt,r),se.off(u.Z.SET_FRAGMENTED_TEXT_AFTER_DISABLED,zt,r),se.off(u.Z.SET_NON_FRAGMENTED_TEXT,Yt,r),se.off(u.Z.QUOTA_EXCEEDED,jt,r),se.off(u.Z.SOURCE_BUFFER_ERROR,xe,r),se.off(u.Z.BYTES_APPENDED_END_FRAGMENT,Ze,r),Ie(),Y=null,ce=null}},c=(0,E.Z)(ne).getInstance().getLogger(r),Ie(),se.on(u.Z.DATA_UPDATE_COMPLETED,me,r,{priority:y.Z.EVENT_PRIORITY_HIGH}),se.on(u.Z.INIT_FRAGMENT_NEEDED,ut,r),se.on(u.Z.MEDIA_FRAGMENT_NEEDED,rt,r),se.on(u.Z.INIT_FRAGMENT_LOADED,on,r),se.on(u.Z.MEDIA_FRAGMENT_LOADED,cn,r),se.on(u.Z.BUFFER_LEVEL_STATE_CHANGED,pe,r),se.on(u.Z.BUFFER_CLEARED,De,r),se.on(u.Z.SEEK_TARGET,Gt,r),se.on(u.Z.FRAGMENT_LOADING_ABANDONED,dt,r),se.on(u.Z.FRAGMENT_LOADING_COMPLETED,Pt,r),se.on(u.Z.QUOTA_EXCEEDED,jt,r),se.on(u.Z.SET_FRAGMENTED_TEXT_AFTER_DISABLED,zt,r),se.on(u.Z.SET_NON_FRAGMENTED_TEXT,Yt,r),se.on(u.Z.SOURCE_BUFFER_ERROR,xe,r),se.on(u.Z.BYTES_APPENDED_END_FRAGMENT,Ze,r),r}tt.__dashjs_factory_name="StreamProcessor";var Dt=g.Z.getClassFactory(tt),Mt=function o(){(function(r,c){if(!(r instanceof c))throw new TypeError("Cannot call a class as a function")})(this,o),this.streamId=null,this.mediaInfo=null,this.segmentType=null,this.quality=NaN,this.index=NaN,this.bytes=null,this.start=NaN,this.end=NaN,this.duration=NaN,this.representationId=null,this.endFragment=null},Ut=O(9032);function ln(o,r){if(o){if(typeof o=="string")return mn(o,r);var c=Object.prototype.toString.call(o).slice(8,-1);return c==="Object"&&o.constructor&&(c=o.constructor.name),c==="Map"||c==="Set"?Array.from(o):c==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(c)?mn(o,r):void 0}}function mn(o,r){(r==null||r>o.length)&&(r=o.length);for(var c=0,_=new Array(r);c"u"||pe[Symbol.iterator]==null){if(Array.isArray(pe)||(xe=ln(pe))){xe&&(pe=xe);var Ze=0,mt=function(){};return{s:mt,n:function(){return Ze>=pe.length?{done:!0}:{done:!1,value:pe[Ze++]}},e:function(Yt){throw Yt},f:mt}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var dt,Pt=!0,zt=!1;return{s:function(){xe=pe[Symbol.iterator]()},n:function(){var Yt=xe.next();return Pt=Yt.done,Yt},e:function(Yt){zt=!0,dt=Yt},f:function(){try{Pt||xe.return==null||xe.return()}finally{if(zt)throw dt}}}}(x.headers.keys());try{for(R.s();!(L=R.n()).done;){var z=L.value;N+=z+": "+x.headers.get(z)+`\r `}}catch(pe){R.e(pe)}finally{R.f()}if(C.response.responseHeaders=N,!x.body)return x.arrayBuffer().then(function(pe){C.response.response=pe;var De={loaded:pe.byteLength,total:pe.byteLength,stream:!1};C.progress(De),C.onload(),C.onend()});var K,te,X,P,le=parseInt(x.headers.get("Content-Length"),10),ye=0,Pe=!1,be=new Uint8Array,Ae=0;if(ue===t.Z.ABR_FETCH_THROUGHPUT_CALCULATION_AAST&&b){var Ie=m,st=0,ut=(X=x.body.tee(),P=2,function(pe){if(Array.isArray(pe))return pe}(X)||function(pe,De){if(typeof Symbol<"u"&&Symbol.iterator in Object(pe)){var xe=[],Ze=!0,mt=!1,dt=void 0;try{for(var Pt,zt=pe[Symbol.iterator]();!(Ze=(Pt=zt.next()).done)&&(xe.push(Pt.value),!De||xe.length!==De);Ze=!0);}catch(Yt){mt=!0,dt=Yt}finally{try{Ze||zt.return==null||zt.return()}finally{if(mt)throw dt}}return xe}}(X,P)||ln(X,P)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()),rt=ut[0],nt=ut[1];K=rt.getReader(),te=[],K.read().then(function pe(De){var xe=De.value,Ze=De.done;if(st=Date.now(),xe&&xe.length){var mt=st-Ie,dt=xe.length;te.push({chunkDownloadTimeRelativeMS:st-m,chunkDownloadDurationMS:mt,chunkBytes:dt,kbps:Math.round(8*dt/(mt/1e3)),bufferLevel:c.getCurrentBufferLevel(fe.mediaType)})}if(Ze){var Pt=st-m,zt=te.reduce(function(Yt,jt){return Yt+jt.chunkBytes},0);return b.addMeasurement(fe,Pt,te,Q,re,N),void C.progress({loaded:zt,total:zt,lengthComputable:!0,time:b.getEstimatedDownloadDurationMS(fe),stream:!0})}return Ie=Date.now(),K.read().then(pe)}),C.reader=nt.getReader()}else C.reader=x.body.getReader();var Ot=[],Te=[],ke=[],me=!0;H(C,function pe(De){var xe=De.value;if(De.done){if(be){if(ue!==t.Z.ABR_FETCH_THROUGHPUT_CALCULATION_AAST){var Ze=null,mt=null;ue===t.Z.ABR_FETCH_THROUGHPUT_CALCULATION_MOOF_PARSING?(Ze=function(Yt,jt){try{var Vt,Wt;Vt=Yt.filter(function(Zt,Gt){return Gt1){for(var en=0,fn=0,on=0;on1)Xt.push(8*Wt[on].bytes/cn),fn=0;else{fn===0&&(fn=Vt[on].ts,en=0);var lt=Wt[on].ts-fn;lt>1?(en+=Wt[on].bytes,Xt.push(8*en/lt),fn=0):en+=Wt[on].bytes}}if(Xt.length>0)return Xt.reduce(function(Zt,Gt){return Zt+Gt},0)/Xt.length}return null}catch{return null}}(Te,ke),Ze&&(mt=8*ye/Ze)):ue===t.Z.ABR_FETCH_THROUGHPUT_CALCULATION_DOWNLOADED_DATA&&(mt=B(Ot,ye)),C.progress({loaded:ye,total:isNaN(le)?ye:le,lengthComputable:!0,time:mt,stream:!0})}C.response.response=be.buffer}return C.onload(),void C.onend()}if(xe&&xe.length>0){be=function(Yt,jt){if(Yt.length===0)return jt;var Vt=new Uint8Array(Yt.length+jt.length);return Vt.set(Yt),Vt.set(jt,Yt.length),Vt}(be,xe),ye+=xe.length,Ot.push({ts:Date.now(),bytes:xe.length}),ue===t.Z.ABR_FETCH_THROUGHPUT_CALCULATION_MOOF_PARSING&&me&&h.findLastTopIsoBoxCompleted(["moof"],be,Ae).found&&(me=!1,Te.push({ts:performance.now(),bytes:xe.length}));var dt=h.findLastTopIsoBoxCompleted(["moov","mdat"],be,Ae);if(dt.found){var Pt,zt=dt.lastCompletedOffset+dt.size;ue!==t.Z.ABR_FETCH_THROUGHPUT_CALCULATION_MOOF_PARSING||me||(me=!0,ke.push({ts:performance.now(),bytes:be.length})),zt===be.length?(Pt=be,be=new Uint8Array):(Pt=new Uint8Array(be.subarray(0,zt)),be=be.subarray(zt)),C.progress({data:Pt.buffer,lengthComputable:!1,noTrace:!0}),Ae=0}else Ae=dt.lastCompletedOffset,Pe||(C.progress({lengthComputable:!1,noTrace:!0}),Pe=!0)}H(C,pe)})}).catch(function(x){C.onerror&&C.onerror(x)})})}function H(C,j){C.reader.read().then(j).catch(function(q){C.onerror&&C.response.status===200&&C.onerror(q)})}function B(C,j){try{if((C=C.filter(function(ne){return ne.bytes>j/4/C.length})).length>1){var q=0,fe=(C[C.length-1].ts-C[0].ts)/C.length;return C.forEach(function(ne,se){var ce=C[se+1];if(ce){var Y=ce.ts-ne.ts;q+=Y"u"||o[Symbol.iterator]==null){if(Array.isArray(o)||(c=gt(o))||r&&o&&typeof o.length=="number"){c&&(o=c);var _=0,I=function(){};return{s:I,n:function(){return _>=o.length?{done:!0}:{done:!1,value:o[_++]}},e:function(G){throw G},f:I}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var b,h=!0,w=!1;return{s:function(){c=o[Symbol.iterator]()},n:function(){var G=c.next();return h=G.done,G},e:function(G){w=!0,b=G},f:function(){try{h||c.return==null||c.return()}finally{if(w)throw b}}}}function gt(o,r){if(o){if(typeof o=="string")return Ft(o,r);var c=Object.prototype.toString.call(o).slice(8,-1);return c==="Object"&&o.constructor&&(c=o.constructor.name),c==="Map"||c==="Set"?Array.from(o):c==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(c)?Ft(o,r):void 0}}function Ft(o,r){(r==null||r>o.length)&&(r=o.length);for(var c=0,_=new Array(r);c0&&wt.Y.indexOf(L[0].schemeIdUri)>=0)return x===t.Z.IMAGE}if(m.ContentComponent_asArray&&m.ContentComponent_asArray.length>0){if(m.ContentComponent_asArray.length>1)return x===t.Z.MUXED;if(m.ContentComponent_asArray[0].contentType===x)return!0}var N=x===t.Z.TEXT?new RegExp("(ttml|vtt|wvtt|stpp)"):new RegExp(x);if(m.Representation_asArray&&m.Representation_asArray.length){var R=m.Representation_asArray[0].codecs;if(N.test(R))return!0}if(m.hasOwnProperty(e.Z.MIME_TYPE))return N.test(m.mimeType);if(m.Representation_asArray){for(var z,K=0;K0){var x=m.Representation_asArray[0];if(x.hasOwnProperty(e.Z.SEGMENT_TEMPLATE)||x.hasOwnProperty(e.Z.SEGMENT_TIMELINE)||x.hasOwnProperty(e.Z.SEGMENT_LIST)||x.hasOwnProperty(e.Z.SEGMENT_BASE))return!0}return!1}function H(m){return w(m,t.Z.VIDEO)}function B(m){return w(m,t.Z.TEXT)}function C(m){return w(m,t.Z.IMAGE)}function j(m){return m&&Array.isArray(m.Representation_asArray)&&m.Representation_asArray.sort(function(x,L){return x.bandwidth-L.bandwidth}),m}function q(m,x){return m&&m.Period_asArray&&h(x)&&m.Period_asArray[x]?m.Period_asArray[x].AdaptationSet_asArray:[]}function fe(m){return m&&m.Period_asArray?m.Period_asArray:[]}function ne(m){var x=!1;return m&&m.hasOwnProperty("type")&&(x=m.type===e.Z.DYNAMIC),x}function se(m){return m&&m.EssentialProperty_asArray&&m.EssentialProperty_asArray.length?m.EssentialProperty_asArray.map(function(x){return{schemeIdUri:x.schemeIdUri,value:x.value}}):null}function ce(m){if(!m||!m.S_asArray)return NaN;var x=m.S_asArray[0],L=m.S_asArray[1];return x.hasOwnProperty("d")?x.d:L.t-x.t}function Y(m,x){if(!m)throw new Error("Period cannot be null or undefined");var L=xn.DEFAULT_ID+"_"+x;return m.hasOwnProperty(e.Z.ID)&&m.id.length>0&&m.id!=="__proto__"&&(L=m.id),L}function ue(m,x,L){var N,R=[];if(!m)return R;for(N=0;N0&&h(m)?N[m]:null},getIndexForAdaptation:function(m,x,L){if(!m)return-1;for(var N=q(x,L),R=0;R0&&h(m)?L[m]:null},getCodec:function(m,x,L){var N=null;if(m&&m.Representation_asArray&&m.Representation_asArray.length>0){var R=h(x)&&x>=0&&x0?m.Representation_asArray[0].mimeType:null},getKID:function(m){return m&&m.hasOwnProperty(e.Z.CENC_DEFAULT_KID)?m[e.Z.CENC_DEFAULT_KID]:null},getLabelsForAdaptation:function(m){if(!m||!Array.isArray(m.Label_asArray))return[];for(var x=[],L=0;L0&&(L=m.profiles.indexOf(x)!==-1),L},getDuration:function(m){return m&&m.hasOwnProperty(e.Z.MEDIA_PRESENTATION_DURATION)?m.mediaPresentationDuration:m&&m.type=="dynamic"?Number.POSITIVE_INFINITY:Number.MAX_SAFE_INTEGER||Number.MAX_VALUE},getBandwidth:function(m){return m&&m.bandwidth?m.bandwidth:NaN},getManifestUpdatePeriod:function(m){var x=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,L=NaN;return m&&m.hasOwnProperty(e.Z.MINIMUM_UPDATE_PERIOD)&&(L=m.minimumUpdatePeriod),isNaN(L)?L:Math.max(L-x,1)},getPublishTime:function(m){return m&&m.hasOwnProperty(e.Z.PUBLISH_TIME)?new Date(m[e.Z.PUBLISH_TIME]):null},getRepresentationCount:function(m){return m&&Array.isArray(m.Representation_asArray)?m.Representation_asArray.length:0},getBitrateListForAdaptation:function(m){var x=j(m);return(x&&Array.isArray(x.Representation_asArray)?x.Representation_asArray:[]).map(function(L){return{bandwidth:L.bandwidth,width:L.width||0,height:L.height||0,scanType:L.scanType||null,id:L.id||null}})},getRepresentationFor:function(m,x){return x&&x.Representation_asArray&&x.Representation_asArray.length>0&&h(m)?x.Representation_asArray[m]:null},getRepresentationsForAdaptation:function(m){var x,L,N,R,z=[],K=function(be){if(be&&be.period&&h(be.period.index)){var Ae=be.period.mpd.manifest.Period_asArray[be.period.index];if(Ae&&Ae.AdaptationSet_asArray&&h(be.index))return j(Ae.AdaptationSet_asArray[be.index])}}(m);if(K&&K.Representation_asArray){if(m&&m.period&&h(m.period.index)){var te=Q(m.period.mpd.manifest);te&&(L=te[0])}for(var X=0,P=K.Representation_asArray.length;X"u"||o[Symbol.iterator]==null){if(Array.isArray(o)||(c=function(G,H){if(G){if(typeof G=="string")return Qt(G,H);var B=Object.prototype.toString.call(G).slice(8,-1);return B==="Object"&&G.constructor&&(B=G.constructor.name),B==="Map"||B==="Set"?Array.from(G):B==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(B)?Qt(G,H):void 0}}(o))||r&&o&&typeof o.length=="number"){c&&(o=c);var _=0,I=function(){};return{s:I,n:function(){return _>=o.length?{done:!0}:{done:!1,value:o[_++]}},e:function(G){throw G},f:I}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var b,h=!0,w=!1;return{s:function(){c=o[Symbol.iterator]()},n:function(){var G=c.next();return h=G.done,G},e:function(G){w=!0,b=G},f:function(){try{h||c.return==null||c.return()}finally{if(w)throw b}}}}function Qt(o,r){(r==null||r>o.length)&&(r=o.length);for(var c=0,_=new Array(r);c]+)>/g,function(C,j){return"$"+H[j]}))}if(typeof G=="function"){var B=this;return _[Symbol.replace].call(this,w,function(){var C=[];return C.push.apply(C,arguments),Nt(C[C.length-1])!=="object"&&C.push(h(C,B)),G.apply(this,C)})}return _[Symbol.replace].call(this,w,G)},Jt.apply(this,arguments)}function nn(o,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(r&&r.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),r&&Zn(o,r)}function hn(o){var r=typeof Map=="function"?new Map:void 0;return hn=function(c){if(c===null||(_=c,Function.toString.call(_).indexOf("[native code]")===-1))return c;var _;if(typeof c!="function")throw new TypeError("Super expression must either be null or a function");if(r!==void 0){if(r.has(c))return r.get(c);r.set(c,I)}function I(){return yn(c,arguments,wn(this).constructor)}return I.prototype=Object.create(c.prototype,{constructor:{value:I,enumerable:!1,writable:!0,configurable:!0}}),Zn(I,c)},hn(o)}function yn(o,r,c){return yn=qn()?Reflect.construct:function(_,I,b){var h=[null];h.push.apply(h,I);var w=new(Function.bind.apply(_,h));return b&&Zn(w,b.prototype),w},yn.apply(null,arguments)}function qn(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Zn(o,r){return Zn=Object.setPrototypeOf||function(c,_){return c.__proto__=_,c},Zn(o,r)}function wn(o){return wn=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},wn(o)}var Fn="static",Mn="dynamic",Vn="cmsd-",wr=Vn+Fn,Er=Vn+Mn,ar="stream",Qn=["mb","st","sf","v"],ei={video:"v",audio:"a",text:"tt",stream:ar},ti=/^[-0-9]/;function Br(){var o,r,c,_,I=this.context,b=(0,y.Z)(I).getInstance();function h(){c={},_={}}function w(q){q&&Object.keys(q).forEach(function(fe){Qn.includes(fe)||delete q[fe]})}function G(q){return!q||q.toLowerCase()!=="false"&&(ti.test(q)?parseInt(q,10):q.replace(/["]+/g,""))}function H(q){try{for(var fe={},ne=q.split(","),se=0;se=0;Y--){var ue=ce[Y].match(Jt(/^((?:(?!:)[\s\S])*):[\t-\r \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]*(.*)$/,{key:1,value:2}));if(ue&&ue.groups){var Q=ue.groups.key.toLowerCase(),re=ue.groups.value;switch(Q){case wr:ne=H(re),b.trigger(u.Z.CMSD_STATIC_HEADER,ne);break;case Er:se||(se=B(re))}}}var m=ar;return ne&&ne.ot?m=ne.ot:fe&&(m=C(fe)),w(c[m]),w(_[m]),ne&&(c[m]=Object.assign(c[m]||{},ne)),se&&(_[m]=Object.assign(_[m]||{},se)),{static:ne,dynamic:se}},getMaxBitrate:function(q){var fe=C(q);return j(Mn,fe,"mb")||-1},getEstimatedThroughput:function(q){var fe=C(q);return j(Mn,fe,"etp")||null},getResponseDelay:function(q){var fe=C(q);return j(Mn,fe,"rd")||null},getRoundTripTime:function(q){var fe=C(q);return j(Mn,fe,"rtt")||null}},r=(0,E.Z)(I).getInstance().getLogger(o),h(),o}Br.__dashjs_factory_name="CmsdModel";var Gr=g.Z.getSingletonFactory(Br);function qr(){var o,r,c=this.context,_={};function I(){r=(0,E.Z)(c).getInstance().getLogger(o)}function b(w){for(var G={},H=0,B=0,C=0,j=0,q=w.length,fe=0;feC.bitrate&&(H=!1):G=C.bitrate}),H}return o={setup:I,addMeasurement:function(w,G,H,B,C){w&&w.mediaType&&!_[w.mediaType]&&(_[w.mediaType]=[]);var j=w.mediaInfo.bitrateList.find(function(q){return q.id===w.representationId});_[w.mediaType].push({index:w.index,repId:w.representationId,mediaType:w.mediaType,requestTimeMS:B,adjustedAvailabilityStartTimeMS:w.availabilityStartTime.getTime(),segDurationMS:1e3*w.duration,chunksDurationMS:H.reduce(function(q,fe){return q+fe.chunkDownloadDurationMS},0),segmentBytes:H.reduce(function(q,fe){return q+fe.chunkBytes},0),bitrate:j&&j.bandwidth,bitrateList:w.mediaInfo.bitrateList,chunkMeasurements:H,fetchDownloadDurationMS:G,throughputCapacityDelayMS:C,getEstimatedBufferLevel:b(H.slice(1))}),_[w.mediaType].length>10&&_[w.mediaType].shift()},getThroughputCapacityDelayMS:function(w,G){var H=_[w.mediaType]&&_[w.mediaType].slice(-3);return!H||H.length<3?0:h(H)?G/4>250?250:G/4:0},getEstimatedDownloadDurationMS:function(w){var G=_[w.mediaType].slice(-1).pop(),H=_[w.mediaType].slice(-3),B=G.chunkMeasurements.slice(-1).pop().chunkDownloadTimeRelativeMS;G.bufferLevelAtSegmentStart=G.getEstimatedBufferLevel(B/2),G.bufferLevelAtSegmentEnd=G.getEstimatedBufferLevel(B);var C=h(H),j=C?.6:.8;if(G.isBufferStable&&1.05*G.segDurationMS.2*G.chunkMeasurements.length){var ue=fe/ne,Q=G.segmentBytes/ue;return G.fetchDownloadDurationMSG.bitrate)return re=m.bandwidth,!0}),re===G.bitrate?G.fetchDownloadDurationMS*j:j*G.segmentBytes*8*1e3/re}},I(),o}qr.__dashjs_factory_name="LowLatencyThroughputModel";var Yr=g.Z.getSingletonFactory(qr),bt=O(5717);function Kt(o,r,c){return r in o?Object.defineProperty(o,r,{value:c,enumerable:!0,configurable:!0,writable:!0}):o[r]=c,o}function un(o){o=o||{};var r,c,_,I,b,h,w,G,H,B,C,j=this.context,q=o.errHandler,fe=o.dashMetrics,ne=o.mediaPlayerModel,se=o.requestModifier,ce=o.boxParser,Y=o.errors,ue=o.requestTimeout||0,Q=(0,y.Z)(j).getInstance(),re=(0,Ce.Z)(j).getInstance();function m(x,L){var N,R=x.request,z=[],K=!0,te=!0,X=new Date,P=X,le=0,ye=null,Pe=null;if(!se||!fe||!q)throw new Error("config object is not correct or missing");var be,Ae=function(De){R.requestStartDate=X,R.requestEndDate=new Date,R.firstByteDate=R.firstByteDate||X,R.fileLoaderType=Pe;var xe=N.response?N.response.responseURL:null,Ze=N.response?N.response.status:null,mt=N.response&&N.response.getAllResponseHeaders?N.response.getAllResponseHeaders():N.response?N.response.responseHeaders:null,dt=mt&&re.get().streaming.cmsd&&re.get().streaming.cmsd.enabled?w.parseResponseHeaders(mt,R.mediaType):null;fe.addHttpRequest(R,xe,Ze,mt,De?z:null,dt)},Ie=function(De){te=!1,Ae(De),R.type===He.w.MPD_TYPE&&(fe.addManifestUpdate(R),Q.trigger(u.Z.MANIFEST_LOADING_FINISHED,{request:R}))},st=function(){if(ye&&(clearTimeout(ye),ye=null),c.indexOf(N)!==-1&&(c.splice(c.indexOf(N),1),te))if(Ie(!1),L>0){try{re.get().streaming.utcSynchronization.enableBackgroundSyncAfterSegmentDownloadError&&R.type===He.w.MEDIA_SEGMENT_TYPE&&ne.getRetryAttemptsForType(He.w.MEDIA_SEGMENT_TYPE)===L&&Q.trigger(u.Z.ATTEMPT_BACKGROUND_SYNC)}catch{}L--;var De={config:x};I.push(De),De.timeout=setTimeout(function(){I.indexOf(De)!==-1&&(I.splice(I.indexOf(De),1),m(x,L))},ne.getRetryIntervalsForType(R.type))}else{if(R.type===He.w.MSS_FRAGMENT_INFO_SEGMENT_TYPE)return;q.error(new U.Z(b[R.type],R.url+" is not available",{request:R,response:N.response})),x.error&&x.error(R,"error",N.response.statusText,N.response),x.complete&&x.complete(R,N.response.statusText)}};R.hasOwnProperty("availabilityTimeComplete")&&R.availabilityTimeComplete===!1&&window.fetch&&R.responseType==="arraybuffer"&&R.type===He.w.MEDIA_SEGMENT_TYPE?((be=Un(j).create({requestModifier:se,lowLatencyThroughputModel:H,boxParser:ce})).setup({dashMetrics:fe}),Pe=t.Z.FILE_LOADER_TYPES.FETCH):(be=(0,Ut.Z)(j).create({requestModifier:se}),Pe=t.Z.FILE_LOADER_TYPES.XHR);var ut=null,rt=se.modifyRequestURL?se.modifyRequestURL(R.url):R.url;if(re.get().streaming.cmcd&&re.get().streaming.cmcd.enabled){var nt=re.get().streaming.cmcd.mode;if(nt===t.Z.CMCD_MODE_QUERY){var Ot=function(De){try{var xe=[],Ze=h.getQueryParameter(De);return Ze&&xe.push(Ze),xe}catch{return[]}}(R);rt=sn.Z.addAditionalQueryParameterToUrl(rt,Ot)}else nt===t.Z.CMCD_MODE_HEADER&&(ut=h.getHeaderParameters(R))}var Te=G.getXHRWithCredentialsForType(R.type);if(R.queryParams){var ke=Object.keys(R.queryParams).map(function(De){return{key:De,value:R.queryParams[De]}});rt=sn.Z.addAditionalQueryParameterToUrl(rt,ke)}R.url=rt,N={url:rt,method:He.w.GET,withCredentials:Te,request:R,onload:function(){N.response.status>=200&&N.response.status<=299&&(Ie(!0),x.success&&x.success(N.response.response,N.response.statusText,N.response.responseURL),x.complete&&x.complete(R,N.response.statusText))},onend:st,onerror:st,progress:function(De){var xe=new Date;K&&(K=!1,(!De.lengthComputable||De.lengthComputable&&De.total!==De.loaded)&&(R.firstByteDate=xe)),De.lengthComputable&&(R.bytesLoaded=De.loaded,R.bytesTotal=De.total),De.noTrace||(z.push({s:P,d:De.time?De.time:xe.getTime()-P.getTime(),b:[De.loaded?De.loaded-le:0]}),P=xe,le=De.loaded),ye&&(clearTimeout(ye),ye=null),re.get().streaming.fragmentRequestProgressTimeout>0&&(ye=setTimeout(function(){B.warn("Abort request "+N.url+" due to progress timeout"),N.response.onabort=null,N.loader.abort(N),st()},re.get().streaming.fragmentRequestProgressTimeout)),x.progress&&De&&x.progress(De)},onabort:function(){Ae(!0),ye&&(clearTimeout(ye),ye=null),x.abort&&x.abort(R)},ontimeout:function(De){var xe;if(De.lengthComputable){var Ze=De.loaded/De.total*100;xe="Request timeout: loaded: "+De.loaded+", out of: "+De.total+" : "+Ze.toFixed(3)+"% Completed"}else xe="Request timeout: non-computable download size";B.warn(xe)},loader:be,timeout:ue,headers:ut};var me=new Date().getTime();if(isNaN(R.delayLoadingTime)||me>=R.delayLoadingTime)c.push(N),be.load(N);else{var pe={httpRequest:N};_.push(pe),pe.delayTimeout=setTimeout(function(){if(_.indexOf(pe)!==-1){_.splice(_.indexOf(pe),1);try{X=new Date,P=X,c.push(pe.httpRequest),be.load(pe.httpRequest)}catch{pe.httpRequest.onerror()}}},R.delayLoadingTime-me)}}return r={load:function(x){x.request?m(x,ne.getRetryAttemptsForType(x.request.type)):x.error&&x.error(x.request,"error")},abort:function(){I.forEach(function(x){clearTimeout(x.timeout),x.config.request&&x.config.abort&&x.config.abort(x.config.request)}),I=[],_.forEach(function(x){return clearTimeout(x.delayTimeout)}),_=[],c.forEach(function(x){x.request.type!==He.w.MSS_FRAGMENT_INFO_SEGMENT_TYPE&&(x.onloadend=x.onerror=x.onprogress=void 0,x.loader.abort(x))}),c=[]}},B=(0,E.Z)(j).getInstance().getLogger(r),c=[],_=[],I=[],h=Tt(j).getInstance(),w=Gr(j).getInstance(),H=Yr(j).getInstance(),G=(0,bt.Z)(j).getInstance(),Kt(C={},He.w.MPD_TYPE,Y.DOWNLOAD_ERROR_ID_MANIFEST_CODE),Kt(C,He.w.XLINK_EXPANSION_TYPE,Y.DOWNLOAD_ERROR_ID_XLINK_CODE),Kt(C,He.w.INIT_SEGMENT_TYPE,Y.DOWNLOAD_ERROR_ID_INITIALIZATION_CODE),Kt(C,He.w.MEDIA_SEGMENT_TYPE,Y.DOWNLOAD_ERROR_ID_CONTENT_CODE),Kt(C,He.w.INDEX_SEGMENT_TYPE,Y.DOWNLOAD_ERROR_ID_CONTENT_CODE),Kt(C,He.w.BITSTREAM_SWITCHING_SEGMENT_TYPE,Y.DOWNLOAD_ERROR_ID_CONTENT_CODE),Kt(C,He.w.OTHER_TYPE,Y.DOWNLOAD_ERROR_ID_CONTENT_CODE),b=C,r}un.__dashjs_factory_name="HTTPLoader";var Pn=g.Z.getClassFactory(un);function On(){var o;function r(){o={}}function c(){r()}return c(),{getLoader:function(_){for(var I in o)if(o.hasOwnProperty(I)&&_.startsWith(I))return o[I];return Pn},registerLoader:function(_,I){o[_]=I},unregisterLoader:function(_){o[_]&&delete o[_]},unregisterAllLoader:r,reset:c}}On.__dashjs_factory_name="SchemeLoaderFactory";var kn=g.Z.getSingletonFactory(On);function Tn(o){o=o||{};var r,c,_=this.context;return r=kn(_).getInstance(),{load:function(I){if(!c){var b=r.getLoader(I&&I.request?I.request.url:null);c=b(_).create({errHandler:o.errHandler,mediaPlayerModel:o.mediaPlayerModel,requestModifier:o.requestModifier,dashMetrics:o.dashMetrics,boxParser:o.boxParser?o.boxParser:null,constants:o.constants?o.constants:null,dashConstants:o.dashConstants?o.dashConstants:null,urlUtils:o.urlUtils?o.urlUtils:null,requestTimeout:isNaN(o.requestTimeout)?0:o.requestTimeout,errors:o.errors})}c.load(I)},abort:function(){c&&c.abort()}}}Tn.__dashjs_factory_name="URLLoader";var Kn=g.Z.getClassFactory(Tn);function Ln(o){return Ln=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Ln(o)}function In(o,r){return In=Object.setPrototypeOf||function(c,_){return c.__proto__=_,c},In(o,r)}function sr(o,r){return!r||Ln(r)!=="object"&&typeof r!="function"?function(c){if(c===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return c}(o):r}function zn(o){return zn=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},zn(o)}var fr=function(o){(function(b,h){if(typeof h!="function"&&h!==null)throw new TypeError("Super expression must either be null or a function");b.prototype=Object.create(h&&h.prototype,{constructor:{value:b,writable:!0,configurable:!0}}),h&&In(b,h)})(I,o);var r,c,_=(r=I,c=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var b,h=zn(r);if(c){var w=zn(this).constructor;b=Reflect.construct(h,arguments,w)}else b=h.apply(this,arguments);return sr(this,b)});function I(b){var h;return function(w,G){if(!(w instanceof G))throw new TypeError("Cannot call a class as a function")}(this,I),(h=_.call(this,b)).checkForExistenceOnly=!0,h}return I}(D.Z);function tr(o){o=o||{};var r,c,_=this.context,I=o.eventBus,b=o.events,h=o.urlUtils,w=o.errors,G=o.streamId;return r={checkForExistence:function(H){var B=function(j){I.trigger(b.CHECK_FOR_EXISTENCE_COMPLETED,{request:H,exists:j})};if(H){var C=new fr(H.url);c.load({request:C,success:function(){B(!0)},error:function(){B(!1)}})}else B(!1)},load:function(H){var B=function(C,j){I.trigger(b.LOADING_COMPLETED,{request:H,response:C||null,error:j||null,sender:r})};H?c.load({request:H,progress:function(C){I.trigger(b.LOADING_PROGRESS,{request:H,stream:C.stream,streamId:G}),C.data&&I.trigger(b.LOADING_DATA_PROGRESS,{request:H,response:C.data||null,error:null,sender:r})},success:function(C){B(C)},error:function(C,j,q){B(void 0,new U.Z(w.FRAGMENT_LOADER_LOADING_FAILURE_ERROR_CODE,q,j))},abort:function(C){C&&I.trigger(b.LOADING_ABANDONED,{mediaType:C.mediaType,request:C,sender:r})}}):B(void 0,new U.Z(w.FRAGMENT_LOADER_NULL_REQUEST_ERROR_CODE,w.FRAGMENT_LOADER_NULL_REQUEST_ERROR_MESSAGE))},abort:function(){c&&c.abort()},reset:function(){c&&(c.abort(),c=null)}},c=Kn(_).create({errHandler:o.errHandler,errors:w,dashMetrics:o.dashMetrics,mediaPlayerModel:o.mediaPlayerModel,requestModifier:o.requestModifier,urlUtils:h,constants:t.Z,boxParser:o.boxParser,dashConstants:o.dashConstants,requestTimeout:o.settings.get().streaming.fragmentRequestTimeout}),r}tr.__dashjs_factory_name="FragmentLoader";var vr=g.Z.getClassFactory(tr);function dr(){return{modifyResponseAsync:function(o){return Promise.resolve(o)}}}dr.__dashjs_factory_name="SegmentResponseModifier";var ni=g.Z.getSingletonFactory(dr);function Nr(o){o=o||{};var r,c,_,I=this.context,b=(0,y.Z)(I).getInstance(),h=o.errHandler,w=o.mediaPlayerModel,G=o.dashMetrics,H=(0,E.Z)(I).getInstance(),B=ni(I).getInstance(),C=o.streamInfo;function j(){return C.id}function q(){for(var ne in _)_[ne].reset();_={}}function fe(ne){if(ne.sender){var se=ne.request,ce=ne.response,Y=se.isInitializationRequest(),ue=se.mediaInfo.streamInfo;if(ne.error&&(se.mediaType===t.Z.AUDIO||se.mediaType===t.Z.VIDEO||se.mediaType===t.Z.TEXT&&se.mediaInfo.isFragmented)&&b.trigger(u.Z.SERVICE_LOCATION_BASE_URL_BLACKLIST_ADD,{entry:ne.request.serviceLocation}),ce&&ue){var Q=function(re,m,x,L){var N=new Mt;return N.streamId=x,N.mediaInfo=m.mediaInfo,N.segmentType=m.type,N.start=m.startTime,N.duration=m.duration,N.end=N.start+N.duration,N.bytes=re,N.index=m.index,N.quality=m.quality,N.representationId=m.representationId,N.endFragment=L,N}(ce,se,C.id,ne.type!==u.Z.FRAGMENT_LOADING_PROGRESS);B.modifyResponseAsync(Q).then(function(re){b.trigger(Y?u.Z.INIT_FRAGMENT_LOADED:u.Z.MEDIA_FRAGMENT_LOADED,{chunk:re,request:se},{streamId:ue.id,mediaType:se.mediaType})}).catch(function(re){c.error(re),b.trigger(Y?u.Z.INIT_FRAGMENT_LOADED:u.Z.MEDIA_FRAGMENT_LOADED,{chunk:Q,request:se},{streamId:ue.id,mediaType:se.mediaType})})}else c.warn("No "+se.mediaType+" bytes to push or stream is inactive.")}}return r={getStreamId:j,getModel:function(ne){var se=_[ne];return se||(se=A(I).create({streamInfo:C,type:ne,dashMetrics:G,fragmentLoader:vr(I).create({dashMetrics:G,mediaPlayerModel:w,errHandler:h,requestModifier:(0,he.Z)(I).getInstance(),settings:o.settings,boxParser:o.boxParser,eventBus:b,events:u.Z,errors:oe,dashConstants:o.dashConstants,urlUtils:o.urlUtils,streamId:j()}),debug:H,eventBus:b,events:u.Z}),_[ne]=se),se},reset:function(){b.off(n.Z.FRAGMENT_LOADING_COMPLETED,fe,this),b.off(n.Z.FRAGMENT_LOADING_PROGRESS,fe,this),q()}},c=H.getLogger(r),q(),b.on(n.Z.FRAGMENT_LOADING_COMPLETED,fe,r),b.on(n.Z.FRAGMENT_LOADING_PROGRESS,fe,r),r}Nr.__dashjs_factory_name="FragmentController";var jr=g.Z.getClassFactory(Nr),ri=function o(){(function(r,c){if(!(r instanceof c))throw new TypeError("Cannot call a class as a function")})(this,o),this.url=null,this.width=null,this.height=null,this.x=null,this.y=null},ii=function o(){(function(r,c){if(!(r instanceof c))throw new TypeError("Cannot call a class as a function")})(this,o),this.mediaType=null,this.bitrate=null,this.width=null,this.height=null,this.scanType=null,this.qualityIndex=NaN};function ai(o){var r,c,_=this.context,I=o.streamInfo;function b(w){c.setTrackByIndex(w)}function h(){c&&c.reset()}return r={getStreamId:function(){return I.id},initialize:function(){c.addTracks();var w=c.getTracks();w&&w.length>0&&b(0)},provide:function(w,G){if(typeof G=="function"){var H,B,C=c.getCurrentTrack();if(!C||C.segmentDuration<=0||w==null)G(null);else{(B=c.getThumbnailRequestForTime(w))&&(C.segmentDuration=B.duration),H=w%C.segmentDuration;var j=Math.floor(H*C.tilesHor*C.tilesVert/C.segmentDuration),q=new ri;if(q.width=Math.floor(C.widthPerTile),q.height=Math.floor(C.heightPerTile),q.x=Math.floor(j%C.tilesHor)*C.widthPerTile,q.y=Math.floor(j/C.tilesHor)*C.heightPerTile,"readThumbnail"in C)return C.readThumbnail(w,function(ne){q.url=ne,G(q)});if(B)q.url=B.url,C.segmentDuration=NaN;else{var fe=Math.floor(w/C.segmentDuration);q.url=function(ne,se){var ce=se+ne.startNumber,Y=(0,i.vi)(ne.templateUrl,"Number",ce);return Y=(0,i.vi)(Y,"Time",(ce-1)*ne.segmentDuration*ne.timescale),Y=(0,i.vi)(Y,"Bandwidth",ne.bandwidth),(0,i.eR)(Y)}(C,fe)}G(q)}}},setTrackByIndex:b,getCurrentTrackIndex:function(){return c.getCurrentTrackIndex()},getBitrateList:function(){var w=c.getTracks(),G=0;return w.map(function(H){var B=new ii;return B.mediaType=t.Z.IMAGE,B.qualityIndex=G++,B.bitrate=H.bitrate,B.width=H.width,B.height=H.height,B})},reset:h},h(),c=(0,wt.Z)(_).create({streamInfo:I,adapter:o.adapter,baseURLController:o.baseURLController,timelineConverter:o.timelineConverter,debug:o.debug,eventBus:o.eventBus,events:o.events,dashConstants:o.dashConstants,dashMetrics:o.dashMetrics,segmentBaseController:o.segmentBaseController}),r}ai.__dashjs_factory_name="ThumbnailController";var Ri=g.Z.getClassFactory(ai),Hr=O(7417);function oi(o){var r;o=o||{};var c=[],_=(0,y.Z)(this.context).getInstance(),I=o.updateEventName,b=o.addBlacklistEventName;function h(w){c.indexOf(w)===-1&&(c.push(w),_.trigger(I,{entry:w}))}return r={add:h,contains:function(w){return!!(c.length&&w&&w.length)&&c.indexOf(w)!==-1},reset:function(){c=[]}},b&&_.on(b,function(w){h(w.entry)},r),r}oi.__dashjs_factory_name="BlackListController";var Vr=g.Z.getClassFactory(oi),wi=[t.Z.VIDEO,t.Z.AUDIO,t.Z.TEXT,t.Z.MUXED,t.Z.IMAGE];function si(o){o=o||{};var r,c,_,I,b,h,w,G,H,B,C,j,q,fe,ne,se,ce,Y,ue=this.context,Q=(0,y.Z)(ue).getInstance(),re=(0,Me.Z)(ue).getInstance(),m=o.manifestModel,x=o.mediaPlayerModel,L=o.dashMetrics,N=o.manifestUpdater,R=o.adapter,z=o.timelineConverter,K=o.capabilities,te=o.errHandler,X=o.abrController,P=o.playbackController,le=o.eventController,ye=o.mediaController,Pe=o.protectionController,be=o.textController,Ae=o.videoModel,Ie=o.streamInfo,st=o.settings;function ut(lt,Zt){return new Promise(function(Gt,kt){xe(),B=!0,mt();var ze=Ae.getElement(),ht=[];wi.forEach(function(je){(je!==t.Z.TEXT||lt)&&(je!==t.Z.VIDEO||!ze||ze&&/^VIDEO$/i.test(ze.nodeName))&&ht.push(rt(je,lt))}),Promise.all(ht).then(function(){return je=Zt,new Promise(function(Re){var ae={},Fe=_.map(function(at){return at.createBufferSinks(je)});Promise.all(Fe).then(function(at){at.forEach(function(Rt){Rt&&(ae[Rt.getType()]=Rt)}),Re(ae)}).catch(function(){Re(ae)})});var je}).then(function(je){if(B=!1,_.length===0){var Re="No streams to play.";te.error(new U.Z(oe.MANIFEST_ERROR_ID_NOSTREAMS_CODE,Re,m.getValue())),c.fatal(Re)}else dt();lt&&be.createTracks(Ie),Gt(je)}).catch(function(je){kt(je)})})}function rt(lt,Zt){var Gt,kt=R.getAllMediaInfoForType(Ie,lt),ze=[],ht=null;if(!kt||kt.length===0)return c.info("No "+lt+" data."),Promise.resolve();lt===t.Z.VIDEO&&(w=!0),lt===t.Z.AUDIO&&(G=!0);for(var je=0,Re=kt.length;je0&&(ye.setInitialMediaSettingsForType(lt,Ie),be.addMediaInfosToBuffer(Ie,lt,ze)),kt=kt.filter(function(Fe){return!Fe.isEmbedded}),kt.length===0)return Promise.resolve();if(lt===t.Z.IMAGE)return(j=Ri(ue).create({streamInfo:Ie,adapter:R,baseURLController:o.baseURLController,timelineConverter:o.timelineConverter,debug:se,eventBus:Q,events:u.Z,dashConstants:e.Z,dashMetrics:o.dashMetrics,segmentBaseController:o.segmentBaseController})).initialize(),Promise.resolve();Q.trigger(u.Z.STREAM_INITIALIZING,{streamInfo:Ie,mediaInfo:ht}),ye.setInitialMediaSettingsForType(lt,Ie);var ae=function(Fe,at){var Rt=Fe&&Fe.length>0?Fe[0]:null,xt=C.getModel(Rt?Rt.type:null),an=Rt?Rt.type:null,Rn=Rt?Rt.mimeType:null,Wn=Rt?Rt.isFragmented:null,Sn=Dt(ue).create({streamInfo:Ie,type:an,mimeType:Rn,timelineConverter:z,adapter:R,manifestModel:m,mediaPlayerModel:x,fragmentModel:xt,dashMetrics:o.dashMetrics,baseURLController:o.baseURLController,segmentBaseController:o.segmentBaseController,abrController:X,playbackController:P,mediaController:ye,textController:be,errHandler:te,settings:st,boxParser:ne,segmentBlacklistController:q});Sn.initialize(at,w,Wn),_.push(Sn);for(var Xn=0;Xn0&&le.addInlineEvents(lt,Ie.id)}}function dt(){for(var lt=_.length,Zt=H.audio||H.video?new U.Z(oe.DATA_UPDATE_FAILED_ERROR_CODE,oe.DATA_UPDATE_FAILED_ERROR_MESSAGE):null,Gt=0;Gt0&<.Representation_asArray[0].ContentProtection)}function fn(lt,Zt){var Gt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!lt||!lt.hasOwnProperty("getStreamInfo"))return!1;var kt=lt.getStreamInfo(),ze=Gt?Gt.getStreamInfo():De();if(!kt||!ze)return!1;var ht=R.getAdaptationForType(kt.index,Zt,kt),je=R.getAdaptationForType(ze.index,Zt,ze);if(!ht||!je)return!ht&&!je;var Re=ht&&je&&ht.mimeType===je.mimeType,ae=je.Representation_asArray.map(function(xt){return xt.codecs}),Fe=ht.Representation_asArray.map(function(xt){return xt.codecs}),at=Fe.some(function(xt){return ae.indexOf(xt)>-1}),Rt=Fe.some(function(xt){return ae.some(function(an){return K.codecRootCompatibleWithCodec(an,xt)})});return at||Rt&&Re}function on(lt){fe=lt}function cn(){return fe}return r={initialize:function(){Q.on(u.Z.BUFFERING_COMPLETED,Pt,r),Q.on(u.Z.DATA_UPDATE_COMPLETED,zt,r),Q.on(u.Z.INBAND_EVENTS,Yt,r),Pe&&(Q.on(u.Z.KEY_ERROR,Ze,r),Q.on(u.Z.SERVER_CERTIFICATE_UPDATED,Ze,r),Q.on(u.Z.LICENSE_REQUEST_COMPLETE,Ze,r),Q.on(u.Z.KEY_SYSTEM_SELECTED,Ze,r),Q.on(u.Z.KEY_SESSION_CREATED,Ze,r),Q.on(u.Z.KEY_STATUSES_CHANGED,Ze,r)),be.initializeForStream(Ie),Q.trigger(u.Z.STREAM_UPDATED,{streamInfo:Ie})},getStreamId:function(){return Ie?Ie.id:null},activate:function(lt,Zt){return new Promise(function(Gt,kt){if(!b)return cn()?(b=!0,Q.trigger(u.Z.STREAM_ACTIVATED,{streamInfo:Ie}),void Gt(Zt)):void function(ze,ht){return ut(ze,ht)}(lt,Zt).then(function(ze){b=!0,Q.trigger(u.Z.STREAM_ACTIVATED,{streamInfo:Ie}),Gt(ze)}).catch(function(ze){kt(ze)});Gt(Zt)})},deactivate:Ot,getIsActive:function(){return b},getDuration:function(){return Ie?Ie.duration:NaN},getStartTime:me,getId:pe,getStreamInfo:De,getHasAudioTrack:function(){return G},getHasVideoTrack:function(){return w},startPreloading:function(lt,Zt){return new Promise(function(Gt,kt){cn()?kt():(c.info("[startPreloading] Preloading next stream with id ".concat(pe())),on(!0),ut(lt,Zt).then(function(){for(var ze=0;ze<_.length&&_[ze];ze++)_[ze].setExplicitBufferingTime(me()),_[ze].getScheduleController().startScheduleTimer();Gt()}).catch(function(){on(!1),kt()}))})},initializeForTextWithMediaSource:function(lt){return new Promise(function(Zt,Gt){rt(t.Z.TEXT,lt).then(function(){return(kt=Vt(t.Z.TEXT))?kt.createBufferSinks():Promise.resolve();var kt}).then(function(){be.createTracks(Ie),Zt()}).catch(function(kt){Gt(kt)})})},getThumbnailController:function(){return j},getBitrateListFor:function(lt){if(xe(),lt===t.Z.IMAGE)return j?j.getBitrateList():[];var Zt=function(Gt){for(var kt=null,ze=0;ze<_.length;ze++)if((kt=_[ze]).getType()===Gt)return kt.getMediaInfo();return null}(lt);return X.getBitrateList(Zt)},updateData:function(lt){return new Promise(function(Zt){B=!0,Ie=lt,le&&mt();for(var Gt=[],kt=0,ze=_.length;kt0;){var at=Y.pop(),Rt=at.newMediaInfo,xt=jt(at.oldMediaInfo);if(!xt)return;Gt.push(xt.prepareTrackSwitch()),Gt.push(xt.selectMediaInfo(Rt))}return Promise.all(Gt)}).then(function(){B=!1,dt(),Q.trigger(u.Z.STREAM_UPDATED,{streamInfo:Ie}),Zt()})})},reset:function(lt){C&&(C.reset(),C=null),X&&Ie&&X.clearDataForStream(Ie.id),q&&(q.reset(),q=null),Te(lt),Ie=null,Q.off(u.Z.DATA_UPDATE_COMPLETED,zt,r),Q.off(u.Z.BUFFERING_COMPLETED,Pt,r),Q.off(u.Z.INBAND_EVENTS,Yt,r),Pe&&(Q.off(u.Z.KEY_ERROR,Ze,r),Q.off(u.Z.SERVER_CERTIFICATE_UPDATED,Ze,r),Q.off(u.Z.LICENSE_REQUEST_COMPLETE,Ze,r),Q.off(u.Z.KEY_SYSTEM_SELECTED,Ze,r),Q.off(u.Z.KEY_SESSION_CREATED,Ze,r),Q.off(u.Z.KEY_STATUSES_CHANGED,Ze,r))},getProcessors:Wt,setMediaSource:function(lt){return new Promise(function(Zt,Gt){for(var kt=[],ze=0;ze<_.length;)nt(_[ze].getMediaInfo())?(kt.push(_[ze].setMediaSource(lt)),ze++):(_[ze].reset(),_.splice(ze,1));Promise.all(kt).then(function(){for(var ht=0;ht<_.length;ht++)_[ht].dischargePreBuffer();if(_.length===0){var je="No streams to play.";te.error(new U.Z(oe.MANIFEST_ERROR_ID_NOSTREAMS_CODE,je+"nostreams",m.getValue())),c.fatal(je)}Zt()}).catch(function(ht){c.error(ht),Gt(ht)})})},isMediaCodecCompatible:function(lt){var Zt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return fn(lt,t.Z.VIDEO,Zt)&&fn(lt,t.Z.AUDIO,Zt)},isProtectionCompatible:function(lt){return!lt||Xt(t.Z.VIDEO,lt)&&Xt(t.Z.AUDIO,lt)},getPreloaded:cn,getIsEndedEventSignaled:function(){return ce},setIsEndedEventSignaled:ke,getAdapter:function(){return R},getHasFinishedBuffering:function(){return h},setPreloaded:on,startScheduleControllers:function(){for(var lt=_.length,Zt=0;Zt4&&I[X].shift()}function m(X,P){if(X&&X.request&&X.request.serviceLocation){var le=X.request.serviceLocation;_[P].all.indexOf(le)===-1&&_[P].all.push(le),_[P].current=le}}function x(){var X=B.getValue(),P=fe.getContentSteering(X);return P||(P=j.getServiceDescriptionSettings().contentSteering),P}function L(){return new Promise(function(X){try{var P=x();if(!P||!P.serverUrl)return void X();var le=function(Pe){var be=Pe.serverUrl;c&&c.reloadUri&&(be=se.isRelative(c.reloadUri)?se.resolve(c.reloadUri,Pe.serverUrl):c.reloadUri);var Ae=[],Ie=_.baseUrl.all.concat(_.location.all);if(Ie.length>0){var st=Ie.map(function(nt){var Ot=function(Te){if(!Te||!I[Te]||I[Te].length===0)return-1;var ke=I[Te].reduce(function(me,pe){return me+pe})/I[Te].length;return parseInt(ke)}(nt);return{serviceLocation:nt,throughput:Ot}});st.sort(function(nt,Ot){return Ot.throughput-nt.throughput});var ut="",rt="";st.forEach(function(nt,Ot){Ot!==0&&(ut="".concat(ut,","),nt.throughput>-1&&(rt="".concat(rt,","))),ut="".concat(ut).concat(nt.serviceLocation),nt.throughput>-1&&(rt="".concat(rt).concat(nt.throughput))}),Ae.push({key:"_DASH_pathway",value:'"'.concat(ut,'"')}),Ae.push({key:"_DASH_throughput",value:rt})}return be=sn.Z.addAditionalQueryParameterToUrl(be,Ae)}(P),ye=new Ni(le);h.load({request:ye,success:function(Pe){(function(be){be&&be[e.Z.CONTENT_STEERING_RESPONSE.VERSION]&&parseInt(be[e.Z.CONTENT_STEERING_RESPONSE.VERSION])===1&&((c=new Nn).version=be[e.Z.CONTENT_STEERING_RESPONSE.VERSION],be[e.Z.CONTENT_STEERING_RESPONSE.TTL]&&!isNaN(be[e.Z.CONTENT_STEERING_RESPONSE.TTL])&&(c.ttl=be[e.Z.CONTENT_STEERING_RESPONSE.TTL]),be[e.Z.CONTENT_STEERING_RESPONSE.RELOAD_URI]&&(c.reloadUri=be[e.Z.CONTENT_STEERING_RESPONSE.RELOAD_URI]),be[e.Z.CONTENT_STEERING_RESPONSE.PATHWAY_PRIORITY]&&(c.pathwayPriority=be[e.Z.CONTENT_STEERING_RESPONSE.PATHWAY_PRIORITY]),be[e.Z.CONTENT_STEERING_RESPONSE.PATHWAY_CLONES]&&(c.pathwayClones=be[e.Z.CONTENT_STEERING_RESPONSE.PATHWAY_CLONES],c.pathwayClones=c.pathwayClones.filter(function(Ae){return function(Ie){return Ie[e.Z.CONTENT_STEERING_RESPONSE.BASE_ID]&&Ie[e.Z.CONTENT_STEERING_RESPONSE.ID]&&Ie[e.Z.CONTENT_STEERING_RESPONSE.URI_REPLACEMENT]&&Ie[e.Z.CONTENT_STEERING_RESPONSE.URI_REPLACEMENT][e.Z.CONTENT_STEERING_RESPONSE.HOST]}(Ae)})),z())})(Pe),q.trigger(n.Z.CONTENT_STEERING_REQUEST_COMPLETED,{currentSteeringResponseData:c,url:le}),X()},error:function(Pe,be,Ae,Ie){(function(st,ut){try{switch(r.warn("Error fetching data from content steering server",st),ut.status){case 410:break;case 429:var rt=ut&&ut.getResponseHeader?ut.getResponseHeader("retry-after"):null;rt!==null&&(c||(c={}),c.ttl=parseInt(rt)),z();break;default:z()}}catch(nt){r.error(nt)}})(Pe,Ie),X(Pe)},complete:function(){_.baseUrl.all=N(_.baseUrl),_.location.all=N(_.location)}})}catch(Pe){X(Pe)}})}function N(X){return X.all&&X.all.length!==0&&X.current?X.all.filter(function(P){return P===X.current}):[]}function R(X){try{var P=[];return X&&X.length!==0&&c&&c.pathwayClones&&c.pathwayClones.length!==0&&c.pathwayClones.forEach(function(le){var ye=X.filter(function(st){return le[e.Z.CONTENT_STEERING_RESPONSE.BASE_ID]===st.serviceLocation}),Pe=null;if(ye&&ye.length>0&&(Pe=ye[0]),Pe){var be=new URL(Pe.url),Ae=le[e.Z.CONTENT_STEERING_RESPONSE.URI_REPLACEMENT][e.Z.CONTENT_STEERING_RESPONSE.HOST];Ae=sn.Z.stringHasProtocol(Ae)?Ae:"".concat(be.protocol,"//").concat(Ae);var Ie={synthesizedUrl:"".concat(Ae).concat(be.pathname),serviceLocation:le[e.Z.CONTENT_STEERING_RESPONSE.ID],queryParams:le[e.Z.CONTENT_STEERING_RESPONSE.URI_REPLACEMENT][e.Z.CONTENT_STEERING_RESPONSE.PARAMS],reference:Pe};P.push(Ie)}}),P}catch(le){return r.error(le),[]}}function z(){c&&c.ttl&&!isNaN(c.ttl)&&(b&&clearTimeout(b),b=setTimeout(function(){L()},1e3*c.ttl))}function K(){b&&clearTimeout(b),b=null}function te(){c=null,I={},_={baseUrl:{current:null,all:[]},location:{current:null,all:[]}},K()}return o={reset:function(){te(),q.off(n.Z.FRAGMENT_LOADING_STARTED,ce,o),q.off(n.Z.MANIFEST_LOADING_STARTED,Y,o),q.off(n.Z.MANIFEST_LOADING_FINISHED,ue,o),q.off(n.Z.THROUGHPUT_MEASUREMENT_STORED,Q,o)},setConfig:function(X){X&&(X.adapter&&(fe=X.adapter),X.errHandler&&(w=X.errHandler),X.dashMetrics&&(G=X.dashMetrics),X.mediaPlayerModel&&(H=X.mediaPlayerModel),X.requestModifier&&(C=X.requestModifier),X.manifestModel&&(B=X.manifestModel),X.serviceDescriptionController&&(j=X.serviceDescriptionController),X.eventBus&&(q=X.eventBus))},loadSteeringData:L,getCurrentSteeringResponseData:function(){return c},shouldQueryBeforeStart:function(){var X=x();return!!X&&X.queryBeforeStart},getSteeringDataFromManifest:x,stopSteeringRequestTimer:K,getSynthesizedBaseUrlElements:function(X){try{return R(X).map(function(P){var le=new ir(P.synthesizedUrl,P.serviceLocation);return le.queryParams=P.queryParams,le.dvb_priority=P.reference.dvb_priority,le.dvb_weight=P.reference.dvb_weight,le.availabilityTimeOffset=P.reference.availabilityTimeOffset,le.availabilityTimeComplete=P.reference.availabilityTimeComplete,le})}catch(P){return r.error(P),[]}},getSynthesizedLocationElements:function(X){try{return R(X).map(function(P){var le=new Bt(P.synthesizedUrl,P.serviceLocation);return le.queryParams=P.queryParams,le})}catch(P){return r.error(P),[]}},initialize:function(){h=Kn(ne).create({errHandler:w,dashMetrics:G,mediaPlayerModel:H,requestModifier:C,errors:oe}),q.on(n.Z.FRAGMENT_LOADING_STARTED,ce,o),q.on(n.Z.MANIFEST_LOADING_STARTED,Y,o),q.on(n.Z.MANIFEST_LOADING_FINISHED,ue,o),q.on(n.Z.THROUGHPUT_MEASUREMENT_STORED,Q,o)}},r=(0,E.Z)(ne).getInstance().getLogger(o),te(),o}_r.__dashjs_factory_name="ContentSteeringController";var Tr=g.Z.getSingletonFactory(_r);function Sr(){var o,r,c,_=this.context,I=(0,Ce.Z)(_).getInstance();return o={select:function(b){if(!b||b.length===0)return null;var h=null;return I.get().streaming.applyContentSteering&&(h=function(w){var G=c.getCurrentSteeringResponseData();return G&&G.pathwayPriority&&G.pathwayPriority.length>0?function(){for(var H=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],B=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],C=0,j=null,q=function(){var fe=H[C],ne=B.findIndex(function(se){return se.serviceLocation&&se.serviceLocation===fe});if(ne!==-1&&!r.contains(B[ne].serviceLocation))return j=B[ne],"break";C+=1};C0&&arguments[0]!==void 0&&arguments[0];h=!0;var te=G.getValue(),X=te.url,P=null,le=B.getPatchLocation(te),ye=H.select(le),Pe=null;if(ye&&!K)X=ye.url,P=ye.serviceLocation,Pe=ye.queryParams;else{var be=re(te),Ae=H.select(be);Ae&&(X=Ae.url,P=Ae.serviceLocation,Pe=Ae.queryParams)}se.isRelative(X)&&(X=se.resolve(X,te.url)),w.load(X,P,Pe)}function re(K){var te=B.getLocation(K),X=j.getSynthesizedLocationElements(te);return te.concat(X)}function m(K){if(K){if(B.getIsPatch(K)){var te=K;K=G.getValue();var X=B.isPatchValid(K,te),P=X;if(X){var le=B.getPublishTime(K);P=B.applyPatchToManifest(K,te);var ye=B.getPublishTime(K);P=le.getTime()!=ye.getTime()}if(!P)return r.debug("Patch provided is invalid, performing full manifest refresh"),void Q(!0);K.loadedTime=new Date}}else(K=G.getValue()).loadedTime=new Date;if(G.getValue()&&G.getValue().type===e.Z.DYNAMIC&&K.type===e.Z.STATIC)return ne.trigger(u.Z.DYNAMIC_TO_STATIC),h=!1,void(b=!0);G.setValue(K);var Pe=new Date,be=(Pe.getTime()-K.loadedTime.getTime())/1e3;1e3*(c=B.getManifestUpdatePeriod(K,be))>2147483647&&(c=2147483647e-3),ne.trigger(u.Z.MANIFEST_UPDATED,{manifest:K}),r.info("Manifest has been refreshed at "+Pe+"["+Pe.getTime()/1e3+"] "),I||ue()}function x(){I||(h?ue(q.get().streaming.manifestUpdateRetryInterval):Q())}function L(K){K.error?K.error.code===oe.MANIFEST_LOADER_PARSING_FAILURE_ERROR_CODE&&C.error(K.error):m(K.manifest)}function N(){I=!1,ue()}function R(){(I=!q.get().streaming.scheduling.scheduleWhilePaused)&&Y()}function z(){h=!1}return o={initialize:function(){ce(),ne.on(u.Z.STREAMS_COMPOSED,z,this),ne.on(n.Z.PLAYBACK_STARTED,N,this),ne.on(n.Z.PLAYBACK_PAUSED,R,this),ne.on(u.Z.INTERNAL_MANIFEST_LOADED,L,this)},setManifest:function(K){m(K)},refreshManifest:Q,getIsUpdating:function(){return h},setConfig:function(K){K&&(K.manifestModel&&(G=K.manifestModel),K.adapter&&(B=K.adapter),K.manifestLoader&&(w=K.manifestLoader),K.errHandler&&(C=K.errHandler),K.locationSelector&&(H=K.locationSelector),K.settings&&(q=K.settings),K.contentSteeringController&&(j=K.contentSteeringController))},reset:function(){ne.off(n.Z.PLAYBACK_STARTED,N,this),ne.off(n.Z.PLAYBACK_PAUSED,R,this),ne.off(u.Z.STREAMS_COMPOSED,z,this),ne.off(u.Z.INTERNAL_MANIFEST_LOADED,L,this),ce()}},r=(0,E.Z)(fe).getInstance().getLogger(o),H=Ci(fe).create(),o}ur.__dashjs_factory_name="ManifestUpdater";var li=g.Z.getClassFactory(ur);function cr(){var o,r,c,_,I,b,h,w,G,H,B,C,j,q,fe,ne,se=this.context,ce=(0,y.Z)(se).getInstance(),Y=(0,Me.Z)(se).getInstance();function ue(){w=[],G=[],H=null,B=null,j=null,C=NaN,c=!1,_=!1,q=I.get().streaming.utcSynchronization.timeBetweenSyncAttempts}function Q(){I.get().streaming.utcSynchronization.enabled&&!c&&!_&&j&&j.value&&j.schemeIdUri&&!isNaN(C)&&!isNaN(I.get().streaming.utcSynchronization.backgroundAttempts)&&(B&&(Date.now()-B)/1e3<30||(w=[],_=!0,re(isNaN(I.get().streaming.utcSynchronization.backgroundAttempts)?2:I.get().streaming.utcSynchronization.backgroundAttempts)))}function re(Ae){try{if(Ae<=0)return void Pe();var Ie=Date.now();b[j.schemeIdUri](j.value,function(st){var ut=Date.now(),rt=x(Ie,ut,st);w.push(rt),re(Ae-1)},function(){Pe()})}catch{Pe()}}function m(){var Ae=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,Ie=Ae||0;if(!G||G.length===0||Ie>=G.length)L();else{var st=G[Ie];if(st)if(b.hasOwnProperty(st.schemeIdUri)){var ut=new Date().getTime();b[st.schemeIdUri](st.value,function(rt){var nt=new Date().getTime(),Ot=x(ut,nt,rt);j=st,L(Ot)},function(){m(Ie+1)})}else m(Ie+1);else L()}}function x(Ae,Ie,st){return st-(Ie-(Ie-Ae)/2)}function L(){var Ae=arguments.length>0&&arguments[0]!==void 0?arguments[0]:NaN,Ie=isNaN(Ae);Ie&&I.get().streaming.utcSynchronization.useManifestDateHeaderTimeSource?le():ye(Ie,Ae)}function N(Ae){var Ie=Date.parse(Ae);return isNaN(Ie)&&(Ie=function(st){var ut,rt,nt=/^([0-9]{4})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2})(?::([0-9]*)(\.[0-9]*)?)?(?:([+\-])([0-9]{2})([0-9]{2}))?/.exec(st);return ut=Date.UTC(parseInt(nt[1],10),parseInt(nt[2],10)-1,parseInt(nt[3],10),parseInt(nt[4],10),parseInt(nt[5],10),nt[6]&&(parseInt(nt[6],10)||0),nt[7]&&1e3*parseFloat(nt[7])||0),nt[9]&&nt[10]&&(rt=60*parseInt(nt[9],10)+parseInt(nt[10],10),ut+=(nt[8]==="+"?-1:1)*rt*60*1e3),new Date(ut).getTime()}(Ae)),Ie}function R(Ae){return Date.parse(Ae)}function z(Ae){return Date.parse(Ae)}function K(Ae,Ie,st){st()}function te(Ae,Ie,st){var ut=N(Ae);isNaN(ut)?st():Ie(ut)}function X(Ae,Ie,st,ut,rt){var nt,Ot,Te=!1,ke=new XMLHttpRequest,me=rt?He.w.HEAD:He.w.GET,pe=Ie.match(/\S+/g);if(Ie=pe.shift(),nt=function(){Te||(Te=!0,pe.length?X(Ae,pe.join(" "),st,ut,rt):ut())},Ot=function(){var xe,Ze;ke.status===200&&(xe=rt?ke.getResponseHeader("Date"):ke.response,Ze=Ae(xe),isNaN(Ze)||(st(Ze),Te=!0))},Y.isRelative(Ie)){var De=ne.resolve();De&&(Ie=Y.resolve(Ie,De.url))}ke.open(me,Ie),ke.timeout=5e3,ke.onload=Ot,ke.onloadend=nt,ke.send()}function P(Ae,Ie,st){X(z,Ae,Ie,st,!0)}function le(){var Ae=h.getLatestMPDRequestHeaderValueByID("Date"),Ie=Ae!==null?new Date(Ae).getTime():Number.NaN;isNaN(Ie)?ye(!0):ye(!1,Ie-Date.now())}function ye(Ae,Ie){if(isNaN(C)||isNaN(Ie)||Ae||function(ut){try{var rt,nt=be(ut),Ot=isNaN(q)?30:q,Te=isNaN(I.get().streaming.utcSynchronization.timeBetweenSyncAttemptsAdjustmentFactor)?2:I.get().streaming.utcSynchronization.timeBetweenSyncAttemptsAdjustmentFactor,ke=isNaN(I.get().streaming.utcSynchronization.maximumTimeBetweenSyncAttempts)?600:I.get().streaming.utcSynchronization.maximumTimeBetweenSyncAttempts,me=isNaN(I.get().streaming.utcSynchronization.minimumTimeBetweenSyncAttempts)?2:I.get().streaming.utcSynchronization.minimumTimeBetweenSyncAttempts;nt?(rt=Math.min(Ot*Te,ke),r.debug("Increasing timeBetweenSyncAttempts to ".concat(rt))):(rt=Math.max(Ot/Te,me),r.debug("Decreasing timeBetweenSyncAttempts to ".concat(rt))),q=rt}catch{}}(Ie),!Ae&&!isNaN(Ie)){H=Date.now(),c=!1;var st=isNaN(C);C=Ie,st&&Q(),r.debug("Completed UTC sync. Setting client - server offset to ".concat(Ie))}Ae&&(j=null,c=!1,fe.error(new U.Z(oe.TIME_SYNC_FAILED_ERROR_CODE,oe.TIME_SYNC_FAILED_ERROR_MESSAGE))),ce.trigger(u.Z.UPDATE_TIME_SYNC_OFFSET,{offset:Ie}),ce.trigger(u.Z.TIME_SYNCHRONIZATION_COMPLETED)}function Pe(){if(w&&w.length!==0){var Ae=w.reduce(function(Ie,st){return Ie+st},0)/w.length;be(Ae)?r.debug("Completed background UTC sync. Offset is within allowed threshold and is not adjusted."):(r.debug("Completed background UTC sync. Setting client - server offset to ".concat(Ae)),C=Ae,ce.trigger(u.Z.UPDATE_TIME_SYNC_OFFSET,{offset:C})),_=!1,B=Date.now()}}function be(Ae){try{if(isNaN(C))return!0;var Ie=I.get().streaming.utcSynchronization.maximumAllowedDrift&&!isNaN(I.get().streaming.utcSynchronization.maximumAllowedDrift)?I.get().streaming.utcSynchronization.maximumAllowedDrift:100;return Ae>=C-Ie&&Ae<=C+Ie}catch{return!0}}return o={initialize:function(){ue(),b={"urn:mpeg:dash:utc:http-head:2014":P,"urn:mpeg:dash:utc:http-xsdate:2014":X.bind(null,N),"urn:mpeg:dash:utc:http-iso:2014":X.bind(null,R),"urn:mpeg:dash:utc:direct:2014":te,"urn:mpeg:dash:utc:http-head:2012":P,"urn:mpeg:dash:utc:http-xsdate:2012":X.bind(null,N),"urn:mpeg:dash:utc:http-iso:2012":X.bind(null,R),"urn:mpeg:dash:utc:direct:2012":te,"urn:mpeg:dash:utc:http-ntp:2014":K,"urn:mpeg:dash:utc:ntp:2014":K,"urn:mpeg:dash:utc:sntp:2014":K}},attemptSync:function(Ae,Ie){G=Ae,c||(function(st){try{if(!st||!I.get().streaming.utcSynchronization.enabled)return!1;var ut=isNaN(q)?30:q;return!(H&&ut&&!isNaN(ut))||(Date.now()-H)/1e3>=ut}catch{return!0}}(Ie)?(c=!0,m()):ce.trigger(u.Z.TIME_SYNCHRONIZATION_COMPLETED))},setConfig:function(Ae){Ae&&(Ae.dashMetrics&&(h=Ae.dashMetrics),Ae.baseURLController&&(ne=Ae.baseURLController),Ae.errHandler&&(fe=Ae.errHandler),Ae.settings&&(I=Ae.settings))},reset:function(){ue(),ce.off(u.Z.ATTEMPT_BACKGROUND_SYNC,Q,o)}},r=(0,E.Z)(se).getInstance().getLogger(o),ce.on(u.Z.ATTEMPT_BACKGROUND_SYNC,Q,o),o}cr.__dashjs_factory_name="TimeSyncController";var Kr=g.Z.getSingletonFactory(cr);Kr.HTTP_TIMEOUT_MS=5e3,g.Z.updateSingletonFactory(cr.__dashjs_factory_name,Kr);var Eo=Kr;function ia(){var o,r,c,_,I=this.context;return o={createMediaSource:function(){var b="WebKitMediaSource"in window;return"MediaSource"in window?r=new MediaSource:b&&(r=new WebKitMediaSource),r},attachMediaSource:function(b){var h=window.URL.createObjectURL(r);return b.setSource(h),h},detachMediaSource:function(b){b.setSource(null)},setDuration:function b(h){r&&r.readyState==="open"&&(h===null&&isNaN(h)||r.duration!==h&&(h!==1/0||c.get().streaming.buffer.mediaSourceDurationInfinity||(h=Math.pow(2,32)),function(w){for(var G=w.sourceBuffers,H=0;H=0&&b0?Math.max(0,te):0,Q(_,te,K),Q(c,te,K),re(_),re(c),b=K,H=!1}}catch(X){H=!1,r.error(X)}}function Q(K,te,X){try{N(K,function(P){if(P!==void 0){var le=isNaN(P.duration)?0:P.duration;P.calculatedPresentationTime<=X&&P.calculatedPresentationTime+te+le>=X?z(P,n.Z.EVENT_MODE_ON_START):(R(X,le+te,P.calculatedPresentationTime)||function(ye){try{var Pe=ye.eventStream.period.start+ye.eventStream.period.duration;return ye.calculatedPresentationTime>Pe}catch(be){return r.error(be),!1}}(P))&&(r.debug("Removing event ".concat(P.id," from period ").concat(P.eventStream.period.id," as it is expired or invalid")),function(ye,Pe){try{var be=Pe.eventStream.schemeIdUri,Ae=Pe.eventStream.period.id,Ie=Pe.eventStream.value,st=Pe.id;ye[Ae][be]=ye[Ae][be].filter(function(ut){return Ie&&ut.eventStream.value&&ut.eventStream.value!==Ie||ut.id!==st}),ye[Ae][be].length===0&&delete ye[Ae][be]}catch(ut){r.error(ut)}}(K,P))}})}catch(P){r.error(P)}}function re(K){try{for(var te in K)K.hasOwnProperty(te)&&Object.keys(K[te]).length===0&&delete K[te]}catch(X){r.error(X)}}function m(K,te){var X=arguments.length>2&&arguments[2]!==void 0&&arguments[2],P=K.eventStream.schemeIdUri,le=K.eventStream.value,ye=K.id,Pe=j;te[P]||(te[P]=[]);var be=te[P].findIndex(function(Ie){return(!le||Ie.eventStream.value&&Ie.eventStream.value===le)&&Ie.id===ye});if(be===-1)te[P].push(K),K.triggeredReceivedEvent=!1,K.triggeredStartEvent=!1,Pe=fe;else if(X){var Ae=te[P][be];K.triggeredReceivedEvent=Ae.triggeredReceivedEvent,K.triggeredStartEvent=Ae.triggeredStartEvent,te[P][be]=K,Pe=q}return Pe}function x(K){try{if(K.eventStream.value==1){var te,X=K.calculatedPresentationTime;te=K.calculatedPresentationTime==4294967295?NaN:K.calculatedPresentationTime+K.duration,se.trigger(n.Z.MANIFEST_VALIDITY_CHANGED,{id:K.id,validUntil:X,newDuration:te,newManifestValidAfter:NaN},{mode:n.Z.EVENT_MODE_ON_START})}}catch(P){r.error(P)}}function L(K){try{var te=w.getTime();N(K,function(X){var P=X.eventStream&&X.eventStream.period&&!isNaN(X.eventStream.period.duration)?X.eventStream.period.duration:NaN,le=X.eventStream&&X.eventStream.period&&!isNaN(X.eventStream.period.start)?X.eventStream.period.start:NaN;if(!isNaN(P)&&!isNaN(le)){var ye=X.calculatedPresentationTime;Math.abs(ye-te)<300&&z(X,n.Z.EVENT_MODE_ON_START)}})}catch(X){r.error(X)}}function N(K,te){try{if(K)for(var X=Object.keys(K),P=0;PX}catch(P){return r.error(P),!1}}function z(K,te){try{var X=w.getTime(),P=K.id;if(te===n.Z.EVENT_MODE_ON_RECEIVE&&!K.triggeredReceivedEvent)return r.debug("Received event ".concat(P)),K.triggeredReceivedEvent=!0,void se.trigger(K.eventStream.schemeIdUri,{event:K},{mode:te});K.triggeredStartEvent||(K.eventStream.schemeIdUri===C&&K.eventStream.value==1?K.duration===0&&K.presentationTimeDelta===0||(r.debug("Starting manifest refresh event ".concat(P," at ").concat(X)),function(){try{ce(),h.refreshManifest()}catch(le){r.error(le)}}()):K.eventStream.schemeIdUri==="urn:mpeg:dash:event:callback:2015"&&K.eventStream.value==1?(r.debug("Starting callback event ".concat(P," at ").concat(X)),function(le){try{(0,Ut.Z)(ne).create({}).load({method:"get",url:le,request:{responseType:"arraybuffer"}})}catch(ye){r.error(ye)}}(K.messageData)):(r.debug("Starting event ".concat(P," from period ").concat(K.eventStream.period.id," at ").concat(X)),se.trigger(K.eventStream.schemeIdUri,{event:K},{mode:te})),K.triggeredStartEvent=!0)}catch(le){r.error(le)}}return o={addInlineEvents:function(K,te){try{if(ce(),c[te]||(c[te]={}),K)for(var X=0;Xo.length)&&(r=o.length);for(var c=0,_=new Array(r);c0&&G.updateManifestUpdateInfo({currentTime:le.getTime(),buffered:P.getBufferRange(),presentationStartTime:Xe[0].start,clientTimeOffset:Q.getClientTimeOffset()}),re.length>0&&function(gn){gn.length!==0?re=re.filter(function(rn){var Dn=gn.filter(function(bn){return bn.id===rn.getId()}).length>0||rn.getId()===m.getId();return Dn||(r.debug("Removing stream ".concat(rn.getId())),rn.reset(!0)),Dn}):r.warn("No periods included in the current manifest. Skipping the filtering of outdated stream objects.")}(Xe);for(var St=[],Ht=0,tn=Xe.length;Ht2&&arguments[2]!==void 0&&arguments[2];function dn(){if(X&&X.readyState==="open"){r.debug("MediaSource is open!"),window.URL.revokeObjectURL(Ht),X.removeEventListener("sourceopen",dn),X.removeEventListener("webkitsourceopen",dn),Sn();var rn=G.getCurrentDVRInfo();H.setSeekable(rn.range.start,rn.range.end),tn?(isNaN(Xe)||le.seek(Xe,!0,!0),m.setMediaSource(X).then(function(){m.initializeForTextWithMediaSource(X)})):en(Xe,St)}}function gn(){X.addEventListener("sourceopen",dn,!1),X.addEventListener("webkitsourceopen",dn,!1),Ht=H.attachMediaSource(P),r.debug("MediaSource attached to element. Waiting on open...")}X?St?en(Xe,St):(H.detachMediaSource(P),gn()):(X=H.createMediaSource(),gn())}function en(Xe,St){m.activate(X,St?rt:void 0,Xe).then(function(Ht){if(Ht){var tn=Object.keys(Ht);tn.length>0&&Ht[tn[0]].getBuffer().changeType&&(Ot=!0),rt=Ht}isNaN(Xe)||(Ze.trigger(u.Z.SEEK_TARGET,{time:Xe},{streamId:m.getId()}),le.seek(Xe,!1,!0),m.startScheduleControllers()),z=!1,Ze.trigger(u.Z.PERIOD_SWITCH_COMPLETED,{toStreamInfo:Ir()})})}function fn(Xe){var St=kt(Xe.seekTime);St&&St!==m?St&&St!==m&&(on(),function(Ht,tn){var dn=Ht&&!isNaN(Ht.seekTime)?Ht.seekTime:NaN,gn=m.getProcessors().map(function(rn){return rn.prepareOuterPeriodPlaybackSeeking(Ht)});Promise.all(gn).then(function(){Wt(tn,m,dn)}).catch(function(rn){ue.error(rn)})}(Xe,St)):(on(),function(Ht){m.getProcessors().forEach(function(tn){return tn.prepareInnerPeriodPlaybackSeeking(Ht)}),mr(Ne.USER_REQUEST_STOP_REASON)}(Xe)),br(Se.SEEK_START_REASON)}function on(){cn()}function cn(){nt&&nt.length>0&&(nt.forEach(function(Xe){Xe.deactivate(!0)}),nt=[])}function lt(Xe){if(Xe.newMediaInfo.streamInfo.id===m.getId()){if(cn(),Te.get().streaming.buffer.resetSourceBuffersForTrackSwitch&&Xe.oldMediaInfo&&Xe.oldMediaInfo.codec!==Xe.newMediaInfo.codec){var St=le.getTime();return m.deactivate(!1),void Xt(St,!1,!1)}m.prepareTrackChange(Xe)}}function Zt(Xe,St){try{return Te.get().streaming.buffer.reuseExistingSourceBuffers&&(St.isProtectionCompatible(Xe)||ke)&&(Ot&&Te.get().streaming.buffer.useChangeTypeForTrackSwitch||St.isMediaCodecCompatible(Xe,St))}catch{return!1}}function Gt(Xe){var St=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(X&&!Xe.getPreloaded()){var Ht=Zt(Xe,St);Ht&&Xe.startPreloading(X,rt).then(function(){nt.push(Xe)})}}function kt(Xe){if(isNaN(Xe))return null;for(var St=re.length,Ht=0;Htle.getLiveDelay())&&(Ie=!1,br(Se.INITIAL_PLAYOUT_START_REASON),le.play())}Xe&&Xe.mediaType&&G.addBufferLevel(Xe.mediaType,new Date,1e3*Xe.bufferLevel)}function je(Xe){Xe.streamInfo.id===m.getId()&&Xe.reason&&Xe.reason.forceReplace&&cn(),Xr(Xe.streamInfo.id).prepareQualityChange(Xe)}function Re(){if(w.getIsDynamic()&&le.getOriginalLiveDelay()!==0&&m){var Xe=w.getStreamsInfo();if(Xe.length>0){var St=Xe[0].manifestInfo,Ht=Cr(Xe,St);le.computeAndSetLiveDelay(Ht,St)}}}function ae(){if(hr()){var Xe=P.getPlaybackQuality();Xe&&G.addDroppedFrames(Xe)}}function Fe(){r.debug("[onPlaybackStarted]"),!Ie&&Ae&&br(Se.RESUME_FROM_PAUSE_START_REASON),Ie&&(Ie=!1),st&&(st=!1,Te.get().streaming.applyContentSteering&&!C.shouldQueryBeforeStart()&&C.loadSteeringData()),Ae=!1}function at(Xe){r.debug("[onPlaybackPaused]"),Xe.ended||(Ae=!0,mr(Ne.USER_REQUEST_STOP_REASON))}function Rt(Xe){r.debug("Stream with id ".concat(Xe.streamInfo.id," finished buffering"));var St=Xe.streamInfo.isLast;X&&St?(r.info("[onStreamBufferingCompleted] calls signalEndOfStream of mediaSourceController."),H.signalEndOfStream(X)):xt()}function xt(){if(m&&m.getHasFinishedBuffering())for(var Xe=function(){var dn=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null;try{var gn=dn||m||null;if(gn){var rn=gn.getStreamInfo();return re.filter(function(Dn){var bn=Dn.getStreamInfo();return bn.start>rn.start&&rn.id!==bn.id})}}catch{return[]}}(m),St=0;St0&&arguments[0]!==void 0?arguments[0]:null,tn=Ht||m||null;if(!tn)return null;for(var dn=tn.getStreamInfo(),gn=dn.start,rn=0,Dn=-1,bn=NaN;rn0&&(isNaN(bn)||Zr=0?re[Dn]:null}();St?(r.debug("StreamController onEnded, found next stream with id ".concat(St.getStreamInfo().id,". Switching from ").concat(m.getStreamInfo().id," to ").concat(St.getStreamInfo().id)),Wt(St,m,NaN)):(r.debug("StreamController no next stream found"),m.setIsEndedEventSignaled(!1)),mr(St?Ne.END_OF_PERIOD_STOP_REASON:Ne.END_OF_CONTENT_STOP_REASON)}Xe&&Xe.isLast&&(an(),C.stopSteeringRequestTimer())}function Sn(Xe){var St=Xe||Ir().manifestInfo.duration;H.setDuration(St)}function Xn(Xe){var St=fe.getURIFragmentData();if(!St||!St.t)return NaN;var Ht=$r()[0].getStreamInfo().start;return St.t=St.t.split(",")[0],gr(Xe,St.t,Ht)}function Yn(Xe,St){var Ht=0;return Xe||(Ht=$r()[0].getStreamInfo().start),gr(Xe,St,Ht)}function gr(Xe,St,Ht){var tn=w.getRegularPeriods()[0],dn=St.toString(),gn=dn.indexOf("posix:")!==-1?dn.substring(6)==="now"?Date.now()/1e3:parseFloat(dn.substring(6)):NaN;return Xe&&!isNaN(gn)?Q.calcPresentationTimeFromWallTime(new Date(1e3*gn),tn):parseFloat(dn)+Ht}function Cr(Xe,St){try{var Ht=NaN;if(St&&!isNaN(St.maxFragmentDuration)&&isFinite(St.maxFragmentDuration))return St.maxFragmentDuration;if(Xe&&Xe.length===1){var tn=Xe[0],dn=[t.Z.VIDEO,t.Z.AUDIO,t.Z.TEXT].reduce(function(rn,Dn){var bn=w.getMediaInfoForType(tn,Dn);return bn&&bn.isFragmented!==!1&&rn.push(bn),rn},[]).reduce(function(rn,Dn){var bn=w.getVoRepresentations(Dn);return bn&&bn.length>0&&bn.forEach(function(pr){pr&&rn.push(pr)}),rn},[]).reduce(function(rn,Dn){var bn=w.convertRepresentationToRepresentationInfo(Dn);return bn&&bn.fragmentDuration&&!isNaN(bn.fragmentDuration)&&rn.push(bn.fragmentDuration),rn},[]);Ht=Math.max.apply(Math,function(rn){if(Array.isArray(rn))return Di(rn)}(gn=dn)||function(rn){if(typeof Symbol<"u"&&Symbol.iterator in Object(rn))return Array.from(rn)}(gn)||function(rn,Dn){if(rn){if(typeof rn=="string")return Di(rn,Dn);var bn=Object.prototype.toString.call(rn).slice(8,-1);return bn==="Object"&&rn.constructor&&(bn=rn.constructor.name),bn==="Map"||bn==="Set"?Array.from(rn):bn==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(bn)?Di(rn,Dn):void 0}}(gn)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}())}return isFinite(Ht)?Ht:NaN}catch{return NaN}var gn}function lr(Xe){if(Xe.error)te=!0,kr();else{r.info("Manifest updated... updating data system wide.");var St=Xe.manifest;w.updatePeriods(St);var Ht=w.getUTCTimingSources();!w.getIsDynamic()||Ht&&Ht.length!==0||Ze.trigger(n.Z.CONFORMANCE_VIOLATION,{level:Mr.LEVELS.WARNING,event:Mr.EVENTS.NO_UTC_TIMING_ELEMENT});var tn=w.getIsDynamic()?Ht.concat(be.getUTCTimingSources()):Ht;_.filterUnsupportedFeatures(St).then(function(){j.initialize(St),B.attemptSync(tn,w.getIsDynamic())})}}function hr(){return!!m&&m.getHasVideoTrack()}function nr(){return!!m&&m.getHasAudioTrack()}function mr(Xe,St){St=St||new Date,Rn().forEach(function(Ht){Ht.finalisePlayList(St,Xe)}),G.addPlayList()}function br(Xe){G.createPlaylistMetrics(1e3*le.getTime(),Xe)}function Ar(Xe){if(Xe.error){var St="";switch(Xe.error.code){case 1:St="MEDIA_ERR_ABORTED";break;case 2:St="MEDIA_ERR_NETWORK";break;case 3:St="MEDIA_ERR_DECODE",De.counts.mediaErrorDecode+=1;break;case 4:St="MEDIA_ERR_SRC_NOT_SUPPORTED";break;case 5:St="MEDIA_ERR_ENCRYPTED";break;default:St="UNKNOWN"}St==="MEDIA_ERR_DECODE"&&Te.get().errors.recoverAttempts.mediaErrorDecode>=De.counts.mediaErrorDecode?function(){r.warn("A MEDIA_ERR_DECODE occured: Resetting the MediaSource");var Ht=le.getTime();m.deactivate(!1),r.warn("MediaSource has been resetted. Resuming playback from time ".concat(Ht)),Xt(Ht,!1,!1)}():(K=!0,Xe.error.message&&(St+=" ("+Xe.error.message+")"),Xe.error.msExtendedCode&&(St+=" (0x"+(Xe.error.msExtendedCode>>>0).toString(16).toUpperCase()+")"),r.fatal("Video Element Error: "+St),Xe.error&&r.fatal(Xe.error),ue.error(new U.Z(Xe.error.code,St)),kr())}}function Ir(){return m?m.getStreamInfo():null}function Xr(Xe){for(var St=0,Ht=re.length;St1&&arguments[1]!==void 0?arguments[1]:NaN;mt(),pe=St,b.load(Xe)},loadWithManifest:function(Xe){var St=arguments.length>1&&arguments[1]!==void 0?arguments[1]:NaN;dt(),pe=St,I.setManifest(Xe)},getActiveStreamProcessors:Rn,setConfig:function(Xe){Xe&&(Xe.capabilities&&(c=Xe.capabilities),Xe.capabilitiesFilter&&(_=Xe.capabilitiesFilter),Xe.manifestLoader&&(b=Xe.manifestLoader),Xe.manifestModel&&(h=Xe.manifestModel),Xe.mediaPlayerModel&&(Pe=Xe.mediaPlayerModel),Xe.customParametersModel&&(be=Xe.customParametersModel),Xe.protectionController&&(x=Xe.protectionController),Xe.adapter&&(w=Xe.adapter),Xe.dashMetrics&&(G=Xe.dashMetrics),Xe.errHandler&&(ue=Xe.errHandler),Xe.timelineConverter&&(Q=Xe.timelineConverter),Xe.videoModel&&(P=Xe.videoModel),Xe.playbackController&&(le=Xe.playbackController),Xe.serviceDescriptionController&&(ye=Xe.serviceDescriptionController),Xe.contentSteeringController&&(C=Xe.contentSteeringController),Xe.textController&&(L=Xe.textController),Xe.abrController&&(ne=Xe.abrController),Xe.mediaController&&(se=Xe.mediaController),Xe.settings&&(Te=Xe.settings),Xe.baseURLController&&(j=Xe.baseURLController),Xe.uriFragmentModel&&(fe=Xe.uriFragmentModel),Xe.segmentBaseController&&(q=Xe.segmentBaseController))},setProtectionData:function(Xe){N=Xe,x&&x.setProtectionData(N)},getIsStreamSwitchInProgress:function(){return z},switchToVideoElement:function(Xe){m&&(le.initialize(Ir()),Xt(Xe,!1,!0))},getHasMediaOrInitialisationError:function(){return K||te},getStreams:$r,getActiveStream:function(){return m},getInitialPlayback:function(){return Ie},getAutoPlay:function(){return R},reset:kr},r=(0,E.Z)(xe).getInstance().getLogger(o),B=Eo(xe).getInstance(),H=vo(xe).getInstance(),Y=_e(xe).getInstance(),Fr(),o}oa.__dashjs_factory_name="StreamController";var sa=g.Z.getSingletonFactory(oa);function ua(){var o,r,c,_,I,b,h,w,G,H,B,C,j=this.context,q=(0,y.Z)(j).getInstance();function fe(){C.debug("Stopping the gap controller"),I&&(clearInterval(I),I=null),function(){q.off(u.Z.WALLCLOCK_TIME_UPDATED,ue,this),q.off(u.Z.INITIAL_STREAM_SWITCH,Y,this),q.off(u.Z.PLAYBACK_SEEKING,ne,this),q.off(u.Z.BUFFER_REPLACEMENT_STARTED,se,o),q.off(u.Z.TRACK_CHANGE_RENDERED,ce,o)}(),I=null,b=NaN,_=0,H=null,B={}}function ne(){H&&(clearTimeout(H),H=null)}function se(N){try{if(N.streamId!==w.getActiveStreamInfo().id||N.mediaType!==t.Z.VIDEO&&N.mediaType!==t.Z.AUDIO)return;N.streamId===w.getActiveStreamInfo().id&&(B[N.mediaType]=!0)}catch(R){C.error(R)}}function ce(N){N&&N.mediaType&&(B[N.mediaType]=!1)}function Y(){I||function(){try{I||(C.debug("Starting the gap controller"),I=setInterval(function(){Q()&&L(h.getTime())},100))}catch{}}()}function ue(){if(Q(c.get().streaming.gaps.enableSeekFix)&&++_>=10){var N=h.getTime();r===N?L(N,!0):(r=N,b=NaN),_=0}}function Q(){var N=arguments.length>0&&arguments[0]!==void 0&&arguments[0];if(!w.getActiveStream())return!1;var R=Object.keys(B).some(function(K){return B[K]}),z=!!N&&re();return!R&&c.get().streaming.gaps.jumpGaps&&w.getActiveStreamProcessors().length>0&&(!h.isSeeking()||z)&&!h.isPaused()&&!w.getIsStreamSwitchInProgress()&&!w.getHasMediaOrInitialisationError()}function re(){var N=w.getActiveStream(),R=parseFloat((N.getStartTime()+N.getDuration()).toFixed(5));return h.getTime()+c.get().streaming.gaps.threshold>=R}function m(N,R){try{if(!N||N.length<=1&&R>0)return NaN;for(var z=NaN,K=0;isNaN(z)&&K0?N.end(K-1):0;R=N.start(z)&&R<=N.end(z))return!0;return!1}function L(N){var R,z=arguments.length>1&&arguments[1]!==void 0&&arguments[1],K=c.get().streaming.gaps.enableStallFix,te=c.get().streaming.gaps.stallSeek,X=c.get().streaming.gaps.smallGapLimit,P=c.get().streaming.gaps.jumpLargeGaps,le=G.getBufferRange(),ye=NaN,Pe=!1;if(R=m(le,N),!isNaN(R)){var be=le.start(R),Ae=be-N;Ae>0&&(Ae<=X||P)&&(ye=be)}var Ie=h.getTimeToStreamEnd();if(isNaN(ye)&&z&&isFinite(Ie)&&!isNaN(Ie)&&Ie0&&b!==ye&&ye>N&&!H){var st=ye-N;if(Pe){var ut=w.getStreamForTime(ye),rt=ut&&!!ut.getPreloaded();C.warn("Jumping to end of stream because of gap from ".concat(N," to ").concat(ye,". Gap duration: ").concat(st)),h.seek(ye,!0,rt)}else{var nt=h.getIsDynamic(),Ot=R>0?le.end(R-1):N,Te=nt?1e3*Math.max(0,st-.1):0;H=window.setTimeout(function(){h.seek(ye,!0,!0),C.warn("Jumping gap occuring in period ".concat(w.getActiveStream().getStreamId()," starting at ").concat(Ot," and ending at ").concat(ye,". Jumping by: ").concat(ye-Ot)),H=null},Te)}b=ye}}return o={reset:fe,setConfig:function(N){N&&(N.settings&&(c=N.settings),N.playbackController&&(h=N.playbackController),N.streamController&&(w=N.streamController),N.videoModel&&(G=N.videoModel))},initialize:function(){(function(){q.on(u.Z.WALLCLOCK_TIME_UPDATED,ue,this),q.on(u.Z.INITIAL_STREAM_SWITCH,Y,this),q.on(u.Z.PLAYBACK_SEEKING,ne,this),q.on(u.Z.BUFFER_REPLACEMENT_STARTED,se,o),q.on(u.Z.TRACK_CHANGE_RENDERED,ce,o)})()}},C=(0,E.Z)(j).getInstance().getLogger(o),fe(),o}ua.__dashjs_factory_name="GapController";var To=g.Z.getSingletonFactory(ua);function la(){var o,r,c,_,I,b,h,w,G,H,B=this.context,C=(0,y.Z)(B).getInstance();function j(){r=!1;var re=sn.Z.parseUserAgent();c=re&&re.browser&&re.browser.name&&re.browser.name.toLowerCase()==="safari"}function q(){r=!1}function fe(re){if(re.streamId===b.getActiveStreamInfo().id&&G){var m=h.getLiveDelay();h.getBufferLevel()>m/2&&(G=!1)}}function ne(re){re.streamId===b.getActiveStreamInfo().id&&(G=re.state===p.Z.BUFFER_EMPTY)}function se(){w.getCatchupModeEnabled()||_.setPlaybackRate(1)}function ce(){h.getIsDynamic()&&w.getCatchupModeEnabled()&&(w.getCatchupPlaybackRates().max>0||w.getCatchupPlaybackRates().min<0)&&!h.isPaused()&&!h.isSeeking()&&function(){try{return!(!h.getTime()>0||r)&&(ue()===t.Z.LIVE_CATCHUP_MODE_LOLP?function(re,m){try{return Math.abs(Y())>0||re0}catch{return!1}}())}catch{return!1}}()&&function(){if(!r&&_){var re,m=_.getPlaybackRate(),x=w.getCatchupPlaybackRates(),L=h.getBufferLevel(),N=Y(),R=w.getCatchupMaxDrift();if(!isNaN(R)&&R>0&&N>R)H.info("[CatchupController]: Low Latency catchup mechanism. Latency too high, doing a seek to live point"),r=!0,h.seekToCurrentLive(!0,!1);else{var z=h.getCurrentLiveLatency(),K=h.getLiveDelay();re=ue()===t.Z.LIVE_CATCHUP_MODE_LOLP?function(X,P,le,ye,Pe){var be;if(Pe0&&(Ie=1),Ie}(x,z,K,L);var te=c?.25:.02/(.5/x.max);re&&Math.abs(m-re)>=te&&(H.debug("[CatchupController]: Setting playback rate to ".concat(re)),_.setPlaybackRate(re))}}}()}function Y(){return h.getCurrentLiveLatency()-h.getLiveDelay()}function ue(){var re=I.get().streaming.liveCatchup.playbackBufferMin;return I.get().streaming.liveCatchup.mode!==t.Z.LIVE_CATCHUP_MODE_LOLP||re===null||isNaN(re)?t.Z.LIVE_CATCHUP_MODE_DEFAULT:t.Z.LIVE_CATCHUP_MODE_LOLP}function Q(){w.getCatchupPlaybackRates(!0)}return o={reset:function(){C.off(n.Z.BUFFER_LEVEL_UPDATED,fe,o),C.off(n.Z.BUFFER_LEVEL_STATE_CHANGED,ne,o),C.off(n.Z.PLAYBACK_PROGRESS,ce,o),C.off(n.Z.PLAYBACK_TIME_UPDATED,ce,o),C.off(n.Z.PLAYBACK_SEEKED,q,o),C.off(u.Z.SETTING_UPDATED_CATCHUP_ENABLED,se,o),C.off(u.Z.SETTING_UPDATED_PLAYBACK_RATE_MIN,Q,o),C.off(u.Z.SETTING_UPDATED_PLAYBACK_RATE_MAX,Q,o),C.off(n.Z.STREAM_INITIALIZED,Q,o),j(),_.setPlaybackRate(1,!0)},setConfig:function(re){re&&(re.settings&&(I=re.settings),re.videoModel&&(_=re.videoModel),re.streamController&&(b=re.streamController),re.playbackController&&(h=re.playbackController),re.mediaPlayerModel&&(w=re.mediaPlayerModel))},initialize:function(){C.on(n.Z.BUFFER_LEVEL_UPDATED,fe,o),C.on(n.Z.BUFFER_LEVEL_STATE_CHANGED,ne,o),C.on(n.Z.PLAYBACK_PROGRESS,ce,o),C.on(n.Z.PLAYBACK_TIME_UPDATED,ce,o),C.on(n.Z.PLAYBACK_SEEKED,q,o),C.on(u.Z.SETTING_UPDATED_CATCHUP_ENABLED,se,o),C.on(u.Z.SETTING_UPDATED_PLAYBACK_RATE_MIN,Q,o),C.on(u.Z.SETTING_UPDATED_PLAYBACK_RATE_MAX,Q,o),C.on(n.Z.STREAM_INITIALIZED,Q,o),Q()}},H=(0,E.Z)(B).getInstance().getLogger(o),j(),o}la.__dashjs_factory_name="CatchupController";var So=g.Z.getSingletonFactory(la),bo=[t.Z.SERVICE_DESCRIPTION_DVB_LL_SCHEME],ca="video",fa="audio";function da(){var o,r,c,_,I,b=this.context;function h(){r={liveDelay:NaN,liveCatchup:{maxDrift:NaN,playbackRate:{min:NaN,max:NaN}},minBitrate:{},maxBitrate:{},initialBitrate:{},contentSteering:null},c=[]}function w(G,H,B){try{r[G][H]=B/1e3}catch(C){_.error(C)}}return o={getServiceDescriptionSettings:function(){return r},getProducerReferenceTimeOffsets:function(){return c},calculateProducerReferenceTimeOffsets:function(G){try{var H=[];if(G&&G.length>0){var B=[t.Z.VIDEO,t.Z.AUDIO,t.Z.TEXT],C=I.getAvailabilityStartTime()/1e3;G.forEach(function(j){var q=B.reduce(function(fe,ne){return fe.concat(I.getAllMediaInfoForType(j,ne))},[]).reduce(function(fe,ne){return I.getProducerReferenceTimes(j,ne).forEach(function(se){var ce=I.getVoRepresentations(ne);if(ce&&ce.length>0&&ce[0].adaptation&&ce[0].segmentInfoType===e.Z.SEGMENT_TEMPLATE){var Y=ce[0],ue=new Date(se[e.Z.WALL_CLOCK_TIME]).getTime()/1e3-(se[e.Z.PRESENTATION_TIME]/Y[e.Z.TIMESCALE]-Y[e.Z.PRESENTATION_TIME_OFFSET]+j.start),Q=C-ue;fe.push({id:se[e.Z.ID],to:Q})}}),fe},[]);H=H.concat(q)})}c=H}catch(j){_.error(j),c=[]}},applyServiceDescription:function(G){if(G&&G.serviceDescriptions){var H=G.serviceDescriptions.filter(function(j){return bo.includes(j.schemeIdUri)}),B=G.serviceDescriptions.filter(function(j){return j.schemeIdUri==null}),C=H.length>0?H[H.length-1]:B[B.length-1];C&&(C.latency&&C.latency.target>0&&function(j){var q;if(j.schemeIdUri,t.Z.SERVICE_DESCRIPTION_DVB_LL_SCHEME,q=function(ce){return{liveDelay:ce.latency.target/1e3,maxDrift:!isNaN(ce.latency.max)&&ce.latency.max>ce.latency.target?(ce.latency.max-ce.latency.target+500)/1e3:NaN,referenceId:ce.latency.referenceId||NaN}}(j),c.length>0){var fe=function(ce){var Y,ue=0,Q=c.filter(function(re){return re.id===ce.referenceId});return Q.length===0?(ue=c.length>0?c[0].to:0,Y=c[0].id||NaN):(ue=Q[0].to||0,Y=Q[0].id||NaN),{to:ue,id:Y}}(q),ne=fe.to,se=fe.id;r.liveDelay=q.liveDelay-ne,r.liveCatchup.maxDrift=q.maxDrift,_.debug(` Found latency properties coming from service description. Applied time offset of `.concat(ne," from ProducerReferenceTime element with id ").concat(se,`. Live Delay: `).concat(q.liveDelay-ne,", Live catchup max drift: ").concat(q.maxDrift,` `))}else r.liveDelay=q.liveDelay,r.liveCatchup.maxDrift=q.maxDrift,_.debug("Found latency properties coming from service description: Live Delay: ".concat(q.liveDelay,", Live catchup max drift: ").concat(q.maxDrift))}(C),C.playbackRate&&function(j){var q=j.playbackRate.min?Math.round(1e3*(j.playbackRate.min-1))/1e3:NaN,fe=j.playbackRate.max?Math.round(1e3*(j.playbackRate.max-1))/1e3:NaN;r.liveCatchup.playbackRate.min=q,r.liveCatchup.playbackRate.max=fe,_.debug("Found latency properties coming from service description: Live catchup min playback rate: ".concat(q)),_.debug("Found latency properties coming from service description: Live catchup max playback rate: ".concat(fe))}(C),C.operatingQuality,C.operatingBandwidth&&function(j){if(j&&j.operatingBandwidth&&j.operatingBandwidth.mediaType&&j.operatingBandwidth.mediaType!=="all"){var q={};q.minBandwidth=j.operatingBandwidth.min,q.maxBandwidth=j.operatingBandwidth.max,q.targetBandwidth=j.operatingBandwidth.target;var fe=[];j.operatingBandwidth.mediaType===ca||j.operatingBandwidth.mediaType===fa?fe.push(j.operatingBandwidth.mediaType):j.operatingBandwidth.mediaType==="any"&&(fe.push(fa),fe.push(ca)),fe.forEach(function(ne){isNaN(q.minBandwidth)||w("minBitrate",ne,q.minBandwidth),isNaN(q.maxBandwidth)||w("maxBitrate",ne,q.maxBandwidth),isNaN(q.targetBandwidth)||w("initialBitrate",ne,q.targetBandwidth)})}}(C),C.contentSteering&&function(j){r.contentSteering=j.contentSteering}(C))}},reset:function(){h()},setConfig:function(G){G&&G.adapter&&(I=G.adapter)}},_=(0,E.Z)(b).getInstance().getLogger(o),h(),o}da.__dashjs_factory_name="ServiceDescriptionController";var Ao=g.Z.getSingletonFactory(da),Io=O(3973),ci=O.n(Io),ga=O(3039);function Oi(){var o,r,c,_,I,b,h,w,G=this.context,H=(0,y.Z)(G).getInstance();function B(P,le){return P&&c[le]&&c[le][P]?c[le][P].list:[]}function C(P,le){return P&&c[le]&&c[le][P]?c[le][P].current:null}function j(P){var le=arguments.length>1&&arguments[1]!==void 0&&arguments[1];if(P&&P.streamInfo){var ye=P.type,Pe=P.streamInfo,be=Pe.id,Ae=C(ye,be);if(c[be]&&c[be][ye]&&(c[be][ye].current=P,c[be][ye].current&&(ye!==t.Z.TEXT&&!ne(P,Ae)||ye===t.Z.TEXT&&P.isFragmented)&&H.trigger(u.Z.CURRENT_TRACK_CHANGED,{oldMediaInfo:Ae,newMediaInfo:P,switchMode:_.get().streaming.trackSwitchMode[ye]},{streamId:be}),!le)){var Ie=ce(P);if(!Ie||!c[be][ye].storeLastSettings)return;Ie.roles&&(Ie.role=Ie.roles[0],delete Ie.roles),Ie.accessibility&&(Ie.accessibility=Ie.accessibility[0]),Ie.audioChannelConfiguration&&(Ie.audioChannelConfiguration=Ie.audioChannelConfiguration[0]),b[ye]=Ie,w.setSavedMediaSettings(ye,Ie)}}}function q(P,le){P&&le&&(I[P]=le)}function fe(P){return P?I[P]:null}function ne(P,le){if(!P&&!le)return!0;if(!P||!le)return!1;var ye=P.id===le.id,Pe=P.viewpoint===le.viewpoint,be=JSON.stringify(P.viewpointsWithSchemeIdUri)===JSON.stringify(le.viewpointsWithSchemeIdUri),Ae=P.lang===le.lang,Ie=P.codec===le.codec,st=P.roles.toString()===le.roles.toString(),ut=JSON.stringify(P.rolesWithSchemeIdUri)===JSON.stringify(le.rolesWithSchemeIdUri),rt=P.accessibility.toString()===le.accessibility.toString(),nt=JSON.stringify(P.accessibilitiesWithSchemeIdUri)===JSON.stringify(le.accessibilitiesWithSchemeIdUri),Ot=P.audioChannelConfiguration.toString()===le.audioChannelConfiguration.toString(),Te=JSON.stringify(P.audioChannelConfigurationsWithSchemeIdUri)===JSON.stringify(le.audioChannelConfigurationsWithSchemeIdUri);return ye&&Ie&&Pe&&be&&Ae&&st&&ut&&rt&&nt&&Ot&&Te}function se(){c={},b={},I={audio:null,video:null,text:null}}function ce(P){var le={lang:P.lang,viewpoint:P.viewpoint,roles:P.roles,accessibility:P.accessibility,audioChannelConfiguration:P.audioChannelConfiguration,codec:P.codec};return le.lang||le.viewpoint||le.role&&le.role.length>0||le.accessibility&&le.accessibility.length>0||le.audioChannelConfiguration&&le.audioChannelConfiguration.length>0?le:null}function Y(P,le,ye){var Pe=[];return P.forEach(function(be){le(ye,be)&&Pe.push(be)}),Pe.length!==0?Pe:P}function ue(P,le){return!P.lang||P.lang instanceof RegExp?le.lang.match(P.lang):le.lang!==""&&(0,ga.extendedFilter)(le.lang,ci()(P.lang)).length>0}function Q(P,le){return P.index===void 0||P.index===null||le.index===P.index}function re(P,le){return!P.viewpoint||P.viewpoint===le.viewpoint}function m(P,le){var ye=arguments.length>2&&arguments[2]!==void 0&&arguments[2],Pe=!P.role||!!le.roles.filter(function(be){return be===P.role})[0];return Pe||le.type===t.Z.AUDIO&&ye}function x(P,le){return P.accessibility?!!le.accessibility.filter(function(ye){return ye===P.accessibility})[0]:!le.accessibility.length}function L(P,le){return!P.audioChannelConfiguration||!!le.audioChannelConfiguration.filter(function(ye){return ye===P.audioChannelConfiguration})[0]}function N(P,le){return!P.codec||P.codec===le.codec}function R(P){var le,ye=0,Pe=[];return P.forEach(function(be){(le=Math.max.apply(Math,be.bitrateList.map(function(Ae){return Ae.bandwidth})))>ye?(ye=le,Pe=[be]):le===ye&&Pe.push(be)}),Pe}function z(P){var le,ye=1/0,Pe=[];return P.forEach(function(be){var Ae=be.bitrateList.reduce(function(Ie,st){var ut=Math.max(1,st.width*st.height);return Ie+st.bandwidth/ut},0);(le=Ae/be.bitrateList.length)ye?(ye=le,Pe=[be]):le===ye&&Pe.push(be)}),Pe}function te(P,le){if(P===t.Z.TEXT)return le[0];var ye,Pe=_.get().streaming.selectionModeForInitialTrack,be=h.getCustomInitialTrackSelectionFunction();if(be&&typeof be=="function")ye=be(le);else switch(Pe){case t.Z.TRACK_SELECTION_MODE_HIGHEST_SELECTION_PRIORITY:ye=function(Ae){var Ie,st,ut=(Ie=0,st=[],Ae.forEach(function(rt){isNaN(rt.selectionPriority)||(rt.selectionPriority>Ie?(Ie=rt.selectionPriority,st=[rt]):rt.selectionPriority===Ie&&st.push(rt))}),st);return ut.length>1&&(ut=R(ut)),ut.length>1&&(ut=K(ut)),ut}(le);break;case t.Z.TRACK_SELECTION_MODE_HIGHEST_BITRATE:ye=function(Ae){var Ie=R(Ae);return Ie.length>1&&(Ie=K(Ie)),Ie}(le);break;case t.Z.TRACK_SELECTION_MODE_FIRST_TRACK:ye=X(le);break;case t.Z.TRACK_SELECTION_MODE_HIGHEST_EFFICIENCY:ye=function(Ae){var Ie=z(Ae);return Ie.length>1&&(Ie=R(Ie)),Ie}(le);break;case t.Z.TRACK_SELECTION_MODE_WIDEST_RANGE:ye=function(Ae){var Ie=K(Ae);return Ie.length>1&&(Ie=R(Ae)),Ie}(le);break;default:r.warn("Track selection mode ".concat(Pe," is not supported. Falling back to TRACK_SELECTION_MODE_FIRST_TRACK")),ye=X(le)}return ye.length>0?ye[0]:le[0]}function X(P){return P[0]}return o={setInitialMediaSettingsForType:function(P,le){var ye=b[P]||fe(P),Pe=B(P,le.id),be=[];ye||((ye=w.getSavedMediaSettings(P))&&delete ye.codec,q(P,ye)),Pe&&Pe.length!==0&&(ye&&(be=Y(be=Array.from(Pe),ue,ye),be=Y(be,Q,ye),be=Y(be,re,ye),P===t.Z.AUDIO&&b[P]||(be=Y(be,m,ye)),be=Y(be,x,ye),be=Y(be,L,ye),be=Y(be,N,ye)),be.length===0?j(te(P,Pe),!0):be.length>1?j(te(P,be)):j(be[0]))},addTrack:function(P){if(P){var le=P.type;if((ye=le)===t.Z.AUDIO||ye===t.Z.VIDEO||ye===t.Z.TEXT||ye===t.Z.IMAGE){var ye,Pe,be=P.streamInfo.id;c[be]||(c[be]={audio:{list:[],storeLastSettings:Pe=_.get().streaming.saveLastMediaSettingsForCurrentStreamingSession,current:null},video:{list:[],storeLastSettings:Pe,current:null},text:{list:[],storeLastSettings:Pe,current:null},image:{list:[],storeLastSettings:Pe,current:null}});for(var Ae=c[be][le].list,Ie=0,st=Ae.length;Ie2&&arguments[2]!==void 0&&arguments[2];try{var Pe=!1;if(P.lang){if(P.lang instanceof RegExp)Pe=le.lang.match(P.lang);else if(le.lang!==""){var be=ci()(P.lang);be&&(Pe=(0,ga.extendedFilter)(le.lang,be).length>0)}}else Pe=!0;var Ae=P.index===void 0||P.index===null||le.index===P.index,Ie=!P.viewpoint||P.viewpoint===le.viewpoint,st=!P.role||!!le.roles.filter(function(nt){return nt===P.role})[0],ut=!P.accessibility||!!le.accessibility.filter(function(nt){return nt===P.accessibility})[0],rt=!P.audioChannelConfiguration||!!le.audioChannelConfiguration.filter(function(nt){return nt===P.audioChannelConfiguration})[0];return Pe&&Ae&&Ie&&(st||le.type===t.Z.AUDIO&&ye)&&ut&&rt}catch{return!1}},matchSettingsLang:ue,matchSettingsIndex:Q,matchSettingsViewPoint:re,matchSettingsRole:m,matchSettingsAccessibility:x,matchSettingsAudioChannelConfig:L,saveTextSettingsDisabled:function(){w.setSavedMediaSettings(t.Z.TEXT,null)},setConfig:function(P){P&&(P.domStorage&&(w=P.domStorage),P.settings&&(_=P.settings),P.customParametersModel&&(h=P.customParametersModel))},reset:se},r=(0,E.Z)(G).getInstance().getLogger(o),se(),o}Oi.__dashjs_factory_name="MediaController";var ha=g.Z.getSingletonFactory(Oi);g.Z.updateSingletonFactory(Oi.__dashjs_factory_name,ha);var Ro=ha,fi=NaN,ma=function o(r,c){(function(_,I){if(!(_ instanceof I))throw new TypeError("Cannot call a class as a function")})(this,o),this.data={baseUrls:r||null,selectedIdx:c||fi},this.children=[]};function pa(){var o,r,c,_,I=this.context,b=It(I).getInstance();function h(B,C,j){var q=w(j);B[C]?b.areEqual(q,B[C].data.baseUrls)||(B[C].data.baseUrls=q,B[C].data.selectedIdx=fi):B[C]=new ma(q)}function w(B){var C=c.getBaseURLsFromElement(B),j=_.getSynthesizedBaseUrlElements(C);return j&&j.length>0&&(C=C.concat(j)),C}function G(B,C){var j=C||r;B(j.data),j.children&&j.children.forEach(function(q){return G(B,q)})}function H(){r=new ma}return o={reset:H,update:function(B){(function(C){(function(){if(!c||!c.hasOwnProperty("getBaseURLsFromElement")||!c.hasOwnProperty("getRepresentationSortFunction"))throw new Error("setConfig function has to be called previously")})();var j=w(C);b.areEqual(j,r.data.baseUrls)||(r.data.baseUrls=j,r.data.selectedIdx=fi),C&&C.Period_asArray&&C.Period_asArray.forEach(function(q,fe){h(r.children,fe,q),q.AdaptationSet_asArray&&q.AdaptationSet_asArray.forEach(function(ne,se){h(r.children[fe].children,se,ne),ne.Representation_asArray&&ne.Representation_asArray.sort(c.getRepresentationSortFunction()).forEach(function(ce,Y){h(r.children[fe].children[se].children,Y,ce)})})})})(B)},getForPath:function(B){var C=r,j=[C.data];return B&&B.forEach(function(q){(C=C.children[q])&&j.push(C.data)}),j.filter(function(q){return q.baseUrls.length})},invalidateSelectedIndexes:function(B){G(function(C){isNaN(C.selectedIdx)||B===C.baseUrls[C.selectedIdx].serviceLocation&&(C.selectedIdx=fi)})},setConfig:function(B){B.adapter&&(c=B.adapter),B.contentSteeringController&&(_=B.contentSteeringController)},getBaseUrls:function(B){return w(B)}},H(),o}pa.__dashjs_factory_name="BaseURLTreeModel";var wo=g.Z.getClassFactory(pa);function ya(o){var r=(o=o||{}).blacklistController;return{select:function(c){return c&&function(I){var b,h,w=0,G=[],H=0;if((h=I.sort(function(B,C){var j=B.dvb_priority-C.dvb_priority;return isNaN(j)?0:j}).filter(function(B,C,j){return!C||j[0].dvb_priority&&B.dvb_priority&&j[0].dvb_priority===B.dvb_priority})).length)return h.length>1&&(h.forEach(function(B){w+=B.dvb_weight,G.push(w)}),b=Math.floor(Math.random()*(w-1)),G.every(function(B,C){return H=C,!(b0&&arguments[0]!==void 0?arguments[0]:[],h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],w=0,G=NaN,H=function(){var C=b[w],j=h.findIndex(function(q){return q.serviceLocation&&q.serviceLocation===C});if(j!==-1&&!c.contains(h[j].serviceLocation))return G=j,"break";w+=1};w0&&(h=I(w.defaultServiceLocationArray,b.baseUrls))}var G=r.getCurrentSteeringResponseData();return b.baseUrls&&b.baseUrls.length&&G&&G.pathwayPriority&&G.pathwayPriority.length&&(h=I(G.pathwayPriority,b.baseUrls)),h},setConfig:function(b){b.blacklistController&&(c=b.blacklistController),b.contentSteeringController&&(r=b.contentSteeringController)}},r=Tr(_).getInstance(),o}va.__dashjs_factory_name="ContentSteeringSelector";var Do=g.Z.getClassFactory(va);function _a(){var o,r,c,_,I,b,h=this.context,w=(0,y.Z)(h).getInstance(),G=(0,Ce.Z)(h).getInstance();function H(){r.reset()}return o={chooseSelector:function(B){(0,W.PS)(B,"boolean"),b=B?_:c},select:function(B){if(B){if(G.get().streaming.applyContentSteering){var C=I.selectBaseUrlIndex(B);isNaN(C)||C===-1||(B.selectedIdx=C)}if(!isNaN(B.selectedIdx))return B.baseUrls[B.selectedIdx];var j=b.select(B.baseUrls);return j?(B.selectedIdx=B.baseUrls.indexOf(j),j):(w.trigger(u.Z.URL_RESOLUTION_FAILED,{error:new U.Z(oe.URL_RESOLUTION_FAILED_GENERIC_ERROR_CODE,oe.URL_RESOLUTION_FAILED_GENERIC_ERROR_MESSAGE)}),void(b===c&&H()))}},reset:H,setConfig:function(B){B.selector&&(b=B.selector),B.contentSteeringSelector&&(I=B.contentSteeringSelector)}},r=Vr(h).create({updateEventName:u.Z.SERVICE_LOCATION_BASE_URL_BLACKLIST_CHANGED,addBlacklistEventName:u.Z.SERVICE_LOCATION_BASE_URL_BLACKLIST_ADD}),c=Co(h).create({blacklistController:r}),_=No(h).create({blacklistController:r}),(I=Do(h).create()).setConfig({blacklistController:r}),b=c,o}_a.__dashjs_factory_name="BaseURLSelector";var Oo=g.Z.getClassFactory(_a);function Ta(){var o,r,c,_,I,b=this.context,h=(0,y.Z)(b).getInstance(),w=(0,Me.Z)(b).getInstance();function G(B){c.update(B),_.chooseSelector(r.getIsDVB(B)),h.trigger(n.Z.BASE_URLS_UPDATED,{baseUrls:H(B)})}function H(B){return c.getBaseUrls(B)}return o={reset:function(){c.reset(),_.reset()},initialize:function(B){c.setConfig({adapter:r,contentSteeringController:I}),G(B)},resolve:function(B){var C=c.getForPath(B).reduce(function(j,q){var fe=_.select(q);return fe?(w.isRelative(fe.url)?j.url=w.resolve(fe.url,j.url):(j.url=fe.url,j.serviceLocation=fe.serviceLocation),j.availabilityTimeOffset=fe.availabilityTimeOffset,j.availabilityTimeComplete=fe.availabilityTimeComplete,j.queryParams=fe.queryParams,j):new ir},new ir);if(!w.isRelative(C.url))return C},setConfig:function(B){B.baseURLTreeModel&&(c=B.baseURLTreeModel),B.baseURLSelector&&(_=B.baseURLSelector),B.adapter&&(r=B.adapter),B.contentSteeringController&&(I=B.contentSteeringController)},getBaseUrls:H,update:G},c=wo(b).create(),_=Oo(b).create(),h.on(u.Z.SERVICE_LOCATION_BASE_URL_BLACKLIST_CHANGED,function(B){c.invalidateSelectedIndexes(B.entry)},o),o}Ta.__dashjs_factory_name="BaseURLController";var Mo=g.Z.getClassFactory(Ta);function Mi(o){return Mi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Mi(o)}function Pi(o,r){return Pi=Object.setPrototypeOf||function(c,_){return c.__proto__=_,c},Pi(o,r)}function Po(o,r){return!r||Mi(r)!=="object"&&typeof r!="function"?function(c){if(c===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return c}(o):r}function di(o){return di=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},di(o)}var Sa=function(o){(function(b,h){if(typeof h!="function"&&h!==null)throw new TypeError("Super expression must either be null or a function");b.prototype=Object.create(h&&h.prototype,{constructor:{value:b,writable:!0,configurable:!0}}),h&&Pi(b,h)})(I,o);var r,c,_=(r=I,c=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var b,h=di(r);if(c){var w=di(this).constructor;b=Reflect.construct(h,arguments,w)}else b=h.apply(this,arguments);return Po(this,b)});function I(b,h){var w;return function(G,H){if(!(G instanceof H))throw new TypeError("Cannot call a class as a function")}(this,I),(w=_.call(this)).url=b||null,w.type=h||null,w.mediaType=t.Z.STREAM,w.responseType="",w}return I}(D.Z);function ba(o){o=o||{};var r=this.context,c=(0,y.Z)(r).getInstance(),_=Kn(r).create({errHandler:o.errHandler,dashMetrics:o.dashMetrics,mediaPlayerModel:o.mediaPlayerModel,requestModifier:o.requestModifier,errors:oe});return{load:function(I,b,h){var w=function(H,B){b.resolved=!0,b.resolvedContent=H||null,c.trigger(u.Z.XLINK_ELEMENT_LOADED,{element:b,resolveObject:h,error:H||B?null:new U.Z(oe.XLINK_LOADER_LOADING_FAILURE_ERROR_CODE,oe.XLINK_LOADER_LOADING_FAILURE_ERROR_MESSAGE+I)})};if(I==="urn:mpeg:dash:resolve-to-zero:2013")w(null,!0);else{var G=new Sa(I,He.w.XLINK_EXPANSION_TYPE);_.load({request:G,success:function(H){w(H)},error:function(){w(null)}})}},reset:function(){_&&(_.abort(),_=null)}}}ba.__dashjs_factory_name="XlinkLoader";var Lo=g.Z.getClassFactory(ba),Aa=function(o){(o=o||{}).escapeMode===void 0&&(o.escapeMode=!0),o.attributePrefix===void 0&&(o.attributePrefix="_"),o.arrayAccessForm=o.arrayAccessForm||"none",o.emptyNodeForm=o.emptyNodeForm||"text",o.enableToStringFunc===void 0&&(o.enableToStringFunc=!0),o.arrayAccessFormPaths=o.arrayAccessFormPaths||[],o.skipEmptyTextNodesForObj===void 0&&(o.skipEmptyTextNodesForObj=!0),o.stripWhitespaces===void 0&&(o.stripWhitespaces=!0),o.datetimeAccessFormPaths=o.datetimeAccessFormPaths||[],o.useDoubleQuotes===void 0&&(o.useDoubleQuotes=!1),o.xmlElementsFilter=o.xmlElementsFilter||[],o.jsonPropertiesFilter=o.jsonPropertiesFilter||[],o.keepCData===void 0&&(o.keepCData=!1),o.ignoreRoot===void 0&&(o.ignoreRoot=!1);function r(Y){var ue=Y.localName;return ue==null&&(ue=Y.baseName),ue!=null&&ue!=""||(ue=Y.nodeName),ue}function c(Y){return typeof Y=="string"?Y.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'"):Y}function _(Y,ue,Q,re){for(var m=0;m0&&_(o.arrayAccessFormPaths,Y,ue,Q)&&(Y[ue]=[Y[ue]])}function b(Y){var ue=Y.split(/[-T:+Z]/g),Q=new Date(ue[0],ue[1]-1,ue[2]),re=ue[5].split(".");if(Q.setHours(ue[3],ue[4],re[0]),re.length>1&&Q.setMilliseconds(re[1]),ue[6]&&ue[7]){var m=60*ue[6]+Number(ue[7]);m=0+((/\d\d-\d\d:\d\d$/.test(Y)?"-":"+")=="-"?-1*m:m),Q.setMinutes(Q.getMinutes()-m-Q.getTimezoneOffset())}else Y.indexOf("Z",Y.length-1)!==-1&&(Q=new Date(Date.UTC(Q.getFullYear(),Q.getMonth(),Q.getDate(),Q.getHours(),Q.getMinutes(),Q.getSeconds(),Q.getMilliseconds())));return Q}function h(Y,ue,Q,re){return!(ue==1&&o.xmlElementsFilter.length>0)||_(o.xmlElementsFilter,Y,Q,re)}function w(Y,ue){if(Y.nodeType==9){for(var Q=new Object,re=Y.childNodes,m=0;m0){var rt=ut.split(".#")[0];return _(o.datetimeAccessFormPaths,Ie,st,rt)?b(Ie):Ie}return Ie}(Q.__text,N,ue+"."+N)),Q["#cdata-section"]!=null&&(Q.__cdata=Q["#cdata-section"],delete Q["#cdata-section"],o.arrayAccessForm=="property"&&delete Q["#cdata-section_asArray"]),Q.__cnt==0&&o.emptyNodeForm=="text"?Q="":Q.__cnt==1&&Q.__text!=null?Q=Q.__text:Q.__cnt!=1||Q.__cdata==null||o.keepCData?Q.__cnt>1&&Q.__text!=null&&o.skipEmptyTextNodesForObj&&(o.stripWhitespaces&&Q.__text==""||Q.__text.trim()=="")&&delete Q.__text:Q=Q.__cdata,delete Q.__cnt,!o.enableToStringFunc||Q.__text==null&&Q.__cdata==null||(Q.toString=function(){return(this.__text!=null?this.__text:"")+(this.__cdata!=null?this.__cdata:"")}),Q}if(Y.nodeType==3||Y.nodeType==4)return Y.nodeValue}function G(Y,ue,Q,re){var m="<"+(Y!=null&&Y.__prefix!=null?Y.__prefix+":":"")+ue;if(Q!=null)for(var x=0;x":">")}function H(Y,ue){return""}function B(Y,ue){return o.arrayAccessForm=="property"&&(re="_asArray",(Q=ue.toString()).indexOf(re,Q.length-re.length)!==-1)||ue.toString().indexOf(o.attributePrefix)==0||ue.toString().indexOf("__")==0||Y[ue]instanceof Function;var Q,re}function C(Y){var ue=0;if(Y instanceof Object)for(var Q in Y)B(Y,Q)||ue++;return ue}function j(Y,ue,Q){return o.jsonPropertiesFilter.length==0||Q==""||_(o.jsonPropertiesFilter,Y,ue,Q)}function q(Y){var ue=[];if(Y instanceof Object)for(var Q in Y)Q.toString().indexOf("__")==-1&&Q.toString().indexOf(o.attributePrefix)==0&&ue.push(Q);return ue}function fe(Y){var ue="";return Y instanceof Object?ue+=function(Q){var re="";return Q.__cdata!=null&&(re+=""),Q.__text!=null&&(o.escapeMode?re+=c(Q.__text):re+=Q.__text),re}(Y):Y!=null&&(o.escapeMode?ue+=c(Y):ue+=Y),ue}function ne(Y,ue){return Y===""?ue:Y+"."+ue}function se(Y,ue,Q,re){var m="";if(Y.length==0)m+=G(Y,ue,Q,!0);else for(var x=0;x0){for(var re in Y)if(!B(Y,re)&&(ue==""||j(Y,re,ne(ue,re)))){var m=Y[re],x=q(m);m==null||m==null?Q+=G(m,re,x,!0):m instanceof Object?m instanceof Array?Q+=se(m,re,x,ue):m instanceof Date?(Q+=G(m,re,x,!1),Q+=m.toISOString(),Q+=H(m,re)):C(m)>0||m.__text!=null||m.__cdata!=null?(Q+=G(m,re,x,!1),Q+=ce(m,ne(ue,re)),Q+=H(m,re)):Q+=G(m,re,x,!0):(Q+=G(m,re,x,!1),Q+=fe(m),Q+=H(m,re))}}return Q+fe(Y)}this.parseXmlString=function(Y){var ue;if(Y===void 0)return null;if(window.DOMParser){var Q=new window.DOMParser;try{(ue=Q.parseFromString(Y,"text/xml")).getElementsByTagNameNS("*","parsererror").length>0&&(ue=null)}catch{ue=null}}else Y.indexOf("")+2)),(ue=new ActiveXObject("Microsoft.XMLDOM")).async="false",ue.loadXML(Y);return ue},this.asArray=function(Y){return Y===void 0||Y==null?[]:Y instanceof Array?Y:[Y]},this.toXmlDateTime=function(Y){return Y instanceof Date?Y.toISOString():typeof Y=="number"?new Date(Y).toISOString():null},this.asDateTime=function(Y){return typeof Y=="string"?b(Y):Y},this.xml2json=function(Y){return w(Y)},this.xml_str2json=function(Y){var ue=this.parseXmlString(Y);return ue!=null?this.xml2json(ue):null},this.json2xml_str=function(Y){return ce(Y,"")},this.json2xml=function(Y){var ue=this.json2xml_str(Y);return this.parseXmlString(ue)},this.getVersion=function(){return"1.2.0"}},Pr="onLoad";function Ia(o){o=o||{};var r,c,_,I,b,h,w=this.context,G=(0,y.Z)(w).getInstance(),H=(0,Me.Z)(w).getInstance();function B(ne,se,ce){var Y,ue,Q={};Q.elements=ne,Q.type=se,Q.resolveType=ce,Q.elements.length===0&&j(Q);for(var re=0;re")+2),Y=se.resolvedContent.substr(0,ue)+""+se.resolvedContent.substr(ue)+"",se.resolvedContent=b.xml_str2json(Y)}(function(Q){var re;for(re=0;re=0;x--){if(re=(Q=ue.elements[x]).type+"_asArray",Q.resolvedContent){if(Q.resolvedContent)for(L=0;L0&&_.run(I)}(ne),ne.resolveType==="onActuate"&&G.trigger(u.Z.XLINK_READY,{manifest:I}),ne.resolveType===Pr)switch(ne.type){case e.Z.PERIOD:for(se=0;se=0;Q--)(ue=ne[Q]).hasOwnProperty("xlink:href")&&ue["xlink:href"]==="urn:mpeg:dash:resolve-to-zero:2013"&&ne.splice(Q,1);for(Q=0;Q"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var b,h=gi(r);if(c){var w=gi(this).constructor;b=Reflect.construct(h,arguments,w)}else b=h.apply(this,arguments);return Zo(this,b)});function I(){return function(b,h){if(!(b instanceof h))throw new TypeError("Cannot call a class as a function")}(this,I),_.call(this,function(b,h){var w,G=(Cn(w={},e.Z.MPD,[e.Z.ID,e.Z.PROFILES]),Cn(w,e.Z.PERIOD,[e.Z.ID]),Cn(w,e.Z.BASE_URL,[e.Z.SERVICE_LOCATION,e.Z.BYTE_RANGE]),Cn(w,e.Z.SEGMENT_BASE,[e.Z.INDEX_RANGE]),Cn(w,e.Z.INITIALIZATION,[e.Z.RANGE]),Cn(w,e.Z.REPRESENTATION_INDEX,[e.Z.RANGE]),Cn(w,e.Z.SEGMENT_LIST,[e.Z.INDEX_RANGE]),Cn(w,e.Z.BITSTREAM_SWITCHING,[e.Z.RANGE]),Cn(w,e.Z.SEGMENT_URL,[e.Z.MEDIA_RANGE,e.Z.INDEX_RANGE]),Cn(w,e.Z.SEGMENT_TEMPLATE,[e.Z.INDEX_RANGE,e.Z.MEDIA,e.Z.INDEX,e.Z.INITIALIZATION_MINUS,e.Z.BITSTREAM_SWITCHING_MINUS]),Cn(w,e.Z.ASSET_IDENTIFIER,[e.Z.VALUE,e.Z.ID]),Cn(w,e.Z.EVENT_STREAM,[e.Z.VALUE]),Cn(w,e.Z.ADAPTATION_SET,[e.Z.PROFILES,e.Z.MIME_TYPE,e.Z.SEGMENT_PROFILES,e.Z.CODECS,e.Z.CONTENT_TYPE]),Cn(w,e.Z.FRAME_PACKING,[e.Z.VALUE,e.Z.ID]),Cn(w,e.Z.AUDIO_CHANNEL_CONFIGURATION,[e.Z.VALUE,e.Z.ID]),Cn(w,e.Z.CONTENT_PROTECTION,[e.Z.VALUE,e.Z.ID]),Cn(w,e.Z.ESSENTIAL_PROPERTY,[e.Z.VALUE,e.Z.ID]),Cn(w,e.Z.SUPPLEMENTAL_PROPERTY,[e.Z.VALUE,e.Z.ID]),Cn(w,e.Z.INBAND_EVENT_STREAM,[e.Z.VALUE,e.Z.ID]),Cn(w,e.Z.ACCESSIBILITY,[e.Z.VALUE,e.Z.ID]),Cn(w,e.Z.ROLE,[e.Z.VALUE,e.Z.ID]),Cn(w,e.Z.RATING,[e.Z.VALUE,e.Z.ID]),Cn(w,e.Z.VIEWPOINT,[e.Z.VALUE,e.Z.ID]),Cn(w,e.Z.CONTENT_COMPONENT,[e.Z.CONTENT_TYPE]),Cn(w,e.Z.REPRESENTATION,[e.Z.ID,e.Z.DEPENDENCY_ID,e.Z.MEDIA_STREAM_STRUCTURE_ID]),Cn(w,e.Z.SUBSET,[e.Z.ID]),Cn(w,e.Z.METRICS,[e.Z.METRICS_MINUS]),Cn(w,e.Z.REPORTING,[e.Z.VALUE,e.Z.ID]),w);if(G.hasOwnProperty(h)){var H=G[h];return H!==void 0&&H.indexOf(b.name)>=0}return!1},function(b){return String(b)})}return I}(Wr);function Fi(o){return Fi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Fi(o)}function ki(o,r){return ki=Object.setPrototypeOf||function(c,_){return c.__proto__=_,c},ki(o,r)}function Bo(o,r){return!r||Fi(r)!=="object"&&typeof r!="function"?function(c){if(c===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return c}(o):r}function hi(o){return hi=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},hi(o)}var wa=/^([-])?P(([\d.]*)Y)?(([\d.]*)M)?(([\d.]*)D)?T?(([\d.]*)H)?(([\d.]*)M)?(([\d.]*)S)?/,Go=function(o){(function(b,h){if(typeof h!="function"&&h!==null)throw new TypeError("Super expression must either be null or a function");b.prototype=Object.create(h&&h.prototype,{constructor:{value:b,writable:!0,configurable:!0}}),h&&ki(b,h)})(I,o);var r,c,_=(r=I,c=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var b,h=hi(r);if(c){var w=hi(this).constructor;b=Reflect.construct(h,arguments,w)}else b=h.apply(this,arguments);return Bo(this,b)});function I(){return function(b,h){if(!(b instanceof h))throw new TypeError("Cannot call a class as a function")}(this,I),_.call(this,function(b){for(var h=[e.Z.MIN_BUFFER_TIME,e.Z.MEDIA_PRESENTATION_DURATION,e.Z.MINIMUM_UPDATE_PERIOD,e.Z.TIMESHIFT_BUFFER_DEPTH,e.Z.MAX_SEGMENT_DURATION,e.Z.MAX_SUBSEGMENT_DURATION,e.Z.SUGGESTED_PRESENTATION_DELAY,e.Z.START,t.Z.START_TIME,e.Z.DURATION],w=h.length,G=0;G"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var b,h=mi(r);if(c){var w=mi(this).constructor;b=Reflect.construct(h,arguments,w)}else b=h.apply(this,arguments);return qo(this,b)});function I(){return function(b,h){if(!(b instanceof h))throw new TypeError("Cannot call a class as a function")}(this,I),_.call(this,function(b){return Na.test(b.value)},function(b){var h,w=Na.exec(b);if(h=Date.UTC(parseInt(w[1],10),parseInt(w[2],10)-1,parseInt(w[3],10),parseInt(w[4],10),parseInt(w[5],10),w[6]&&parseInt(w[6],10)||0,w[7]&&1e3*parseFloat(w[7])||0),w[9]&&w[10]){var G=60*parseInt(w[9],10)+parseInt(w[10],10);h+=(w[8]==="+"?-1:1)*G*60*1e3}return new Date(h)})}return I}(Wr);function Bi(o){return Bi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Bi(o)}function Gi(o,r){return Gi=Object.setPrototypeOf||function(c,_){return c.__proto__=_,c},Gi(o,r)}function jo(o,r){return!r||Bi(r)!=="object"&&typeof r!="function"?function(c){if(c===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return c}(o):r}function pi(o){return pi=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},pi(o)}var Ho=/^[-+]?[0-9]+[.]?[0-9]*([eE][-+]?[0-9]+)?$/,Vo=function(o){(function(b,h){if(typeof h!="function"&&h!==null)throw new TypeError("Super expression must either be null or a function");b.prototype=Object.create(h&&h.prototype,{constructor:{value:b,writable:!0,configurable:!0}}),h&&Gi(b,h)})(I,o);var r,c,_=(r=I,c=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var b,h=pi(r);if(c){var w=pi(this).constructor;b=Reflect.construct(h,arguments,w)}else b=h.apply(this,arguments);return jo(this,b)});function I(){return function(b,h){if(!(b instanceof h))throw new TypeError("Cannot call a class as a function")}(this,I),_.call(this,function(b){return Ho.test(b.value)},function(b){return parseFloat(b)})}return I}(Wr);function qi(o){return qi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},qi(o)}function Qr(o,r,c){return r in o?Object.defineProperty(o,r,{value:c,enumerable:!0,configurable:!0,writable:!0}):o[r]=c,o}function Yi(o,r){return Yi=Object.setPrototypeOf||function(c,_){return c.__proto__=_,c},Yi(o,r)}function Ko(o,r){return!r||qi(r)!=="object"&&typeof r!="function"?function(c){if(c===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return c}(o):r}function yi(o){return yi=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},yi(o)}var zo=function(o){(function(b,h){if(typeof h!="function"&&h!==null)throw new TypeError("Super expression must either be null or a function");b.prototype=Object.create(h&&h.prototype,{constructor:{value:b,writable:!0,configurable:!0}}),h&&Yi(b,h)})(I,o);var r,c,_=(r=I,c=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var b,h=yi(r);if(c){var w=yi(this).constructor;b=Reflect.construct(h,arguments,w)}else b=h.apply(this,arguments);return Ko(this,b)});function I(){return function(b,h){if(!(b instanceof h))throw new TypeError("Cannot call a class as a function")}(this,I),_.call(this,function(b,h){var w,G=(Qr(w={},e.Z.ADAPTATION_SET,[e.Z.LANG]),Qr(w,e.Z.REPRESENTATION,[e.Z.LANG]),Qr(w,e.Z.CONTENT_COMPONENT,[e.Z.LANG]),Qr(w,e.Z.LABEL,[e.Z.LANG]),Qr(w,e.Z.GROUP_LABEL,[e.Z.LANG]),w);if(G.hasOwnProperty(h)){var H=G[h];return H!==void 0&&H.indexOf(b.name)>=0}return!1},function(b){var h=ci()(b);return h!==void 0?h:String(b)})}return I}(Wr);function Wo(o,r){for(var c=0;c"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var b,h=Ei(r);if(c){var w=Ei(this).constructor;b=Reflect.construct(h,arguments,w)}else b=h.apply(this,arguments);return Jo(this,b)});function I(){(function(h,w){if(!(h instanceof w))throw new TypeError("Cannot call a class as a function")})(this,I);var b=[e.Z.PROFILES,e.Z.WIDTH,e.Z.HEIGHT,e.Z.SAR,e.Z.FRAMERATE,e.Z.AUDIO_SAMPLING_RATE,e.Z.MIME_TYPE,e.Z.SEGMENT_PROFILES,e.Z.CODECS,e.Z.MAXIMUM_SAP_PERIOD,e.Z.START_WITH_SAP,e.Z.MAX_PLAYOUT_RATE,e.Z.CODING_DEPENDENCY,e.Z.SCAN_TYPE,e.Z.FRAME_PACKING,e.Z.AUDIO_CHANNEL_CONFIGURATION,e.Z.CONTENT_PROTECTION,e.Z.ESSENTIAL_PROPERTY,e.Z.ESSENTIAL_PROPERTY+"_asArray",e.Z.SUPPLEMENTAL_PROPERTY,e.Z.INBAND_EVENT_STREAM];return _.call(this,e.Z.ADAPTATION_SET,b,[new Lr(e.Z.REPRESENTATION,b,[new Lr(e.Z.SUB_REPRESENTATION,b)])])}return I}(Lr);function Vi(o){return Vi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Vi(o)}function Ki(o,r){return Ki=Object.setPrototypeOf||function(c,_){return c.__proto__=_,c},Ki(o,r)}function es(o,r){return!r||Vi(r)!=="object"&&typeof r!="function"?function(c){if(c===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return c}(o):r}function vi(o){return vi=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},vi(o)}var ts=function(o){(function(b,h){if(typeof h!="function"&&h!==null)throw new TypeError("Super expression must either be null or a function");b.prototype=Object.create(h&&h.prototype,{constructor:{value:b,writable:!0,configurable:!0}}),h&&Ki(b,h)})(I,o);var r,c,_=(r=I,c=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var b,h=vi(r);if(c){var w=vi(this).constructor;b=Reflect.construct(h,arguments,w)}else b=h.apply(this,arguments);return es(this,b)});function I(){(function(h,w){if(!(h instanceof w))throw new TypeError("Cannot call a class as a function")})(this,I);var b=[e.Z.SEGMENT_BASE,e.Z.SEGMENT_TEMPLATE,e.Z.SEGMENT_LIST];return _.call(this,e.Z.PERIOD,b,[new Lr(e.Z.ADAPTATION_SET,b,[new Lr(e.Z.REPRESENTATION,b)])])}return I}(Lr);function Ca(o){o=o||{};var r,c,_,I,b,h=this.context,w=o.debug;return r={parse:function(G){var H,B=window.performance.now();if(!(H=I.xml_str2json(G)))throw new Error("parsing the manifest failed");var C=window.performance.now();H.Patch?((H=H.Patch).add_asArray&&H.add_asArray.forEach(function(q){return b.run(q)}),H.replace_asArray&&H.replace_asArray.forEach(function(q){return b.run(q)})):(H=H.MPD,b.run(H));var j=window.performance.now();return c.info("Parsing complete: ( xml2json: "+(C-B).toPrecision(3)+"ms, objectiron: "+(j-C).toPrecision(3)+"ms, total: "+((j-B)/1e3).toPrecision(3)+"s)"),H.protocol="DASH",H},getMatchers:function(){return _},getIron:function(){return b}},c=w.getLogger(r),_=[new Go,new Yo,new Vo,new zo,new Uo],I=new Aa({escapeMode:!1,attributePrefix:"",arrayAccessForm:"property",emptyNodeForm:"object",stripWhitespaces:!1,enableToStringFunc:!0,ignoreRoot:!1,matchers:_}),b=Fo(h).create({adaptationset:new $o,period:new ts}),r}Ca.__dashjs_factory_name="DashParser";var ns=g.Z.getClassFactory(Ca);function Da(o){o=o||{};var r,c,_,I,b,h=this.context,w=o.debug,G=o.settings,H=(0,y.Z)(h).getInstance(),B=(0,Me.Z)(h).getInstance(),C=o.mssHandler,j=o.errHandler;function q(ne){H.trigger(u.Z.INTERNAL_MANIFEST_LOADED,{manifest:ne.manifest})}function fe(ne){var se=null;return ne.indexOf("SmoothStreamingMedia")>-1?(C&&(se=C.createMssParser(),C.createMssFragmentProcessor(),C.registerEvents()),se):ne.indexOf("MPD")>-1||ne.indexOf("Patch")>-1?ns(h).create({debug:w}):se}return r={load:function(ne){var se=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,ce=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,Y=new Date,ue=new Sa(ne,He.w.MPD_TYPE);se&&(ue.serviceLocation=se),ce&&(ue.queryParams=ce),ue.requestStartDate||(ue.requestStartDate=Y),H.trigger(u.Z.MANIFEST_LOADING_STARTED,{request:ue}),_.load({request:ue,success:function(Q,re,m){var x,L,N;if(I)if(m&&m!==ne?(L=B.parseBaseUrl(m),x=m):(B.isRelative(ne)&&(ne=B.resolve(ne,window.location.href)),L=B.parseBaseUrl(ne)),re!="No Content")if(b===null&&(b=fe(Q)),b!==null){I.setMatchers(b.getMatchers()),I.setIron(b.getIron());try{N=b.parse(Q)}catch{return void H.trigger(u.Z.INTERNAL_MANIFEST_LOADED,{manifest:null,error:new U.Z(oe.MANIFEST_LOADER_PARSING_FAILURE_ERROR_CODE,oe.MANIFEST_LOADER_PARSING_FAILURE_ERROR_MESSAGE+"".concat(ne))})}if(N){if(N.url=x||ne,N.originalUrl||(N.originalUrl=N.url),G&&G.get().streaming.enableManifestDurationMismatchFix&&N.mediaPresentationDuration&&N.Period_asArray.length>1){var R=N.Period_asArray.reduce(function(z,K){return z+K.duration},0);!isNaN(R)&&N.mediaPresentationDuration>R&&(c.warn("Media presentation duration greater than duration of all periods. Setting duration to total period duration"),N.mediaPresentationDuration=R)}N.baseUri=L,N.loadedTime=new Date,I.resolveManifestOnLoad(N),H.trigger(u.Z.ORIGINAL_MANIFEST_LOADED,{originalManifest:Q})}else H.trigger(u.Z.INTERNAL_MANIFEST_LOADED,{manifest:null,error:new U.Z(oe.MANIFEST_LOADER_PARSING_FAILURE_ERROR_CODE,oe.MANIFEST_LOADER_PARSING_FAILURE_ERROR_MESSAGE+"".concat(ne))})}else H.trigger(u.Z.INTERNAL_MANIFEST_LOADED,{manifest:null,error:new U.Z(oe.MANIFEST_LOADER_PARSING_FAILURE_ERROR_CODE,oe.MANIFEST_LOADER_PARSING_FAILURE_ERROR_MESSAGE+"".concat(ne))});else H.trigger(u.Z.INTERNAL_MANIFEST_LOADED,{manifest:null})},error:function(Q,re,m){H.trigger(u.Z.INTERNAL_MANIFEST_LOADED,{manifest:null,error:new U.Z(oe.MANIFEST_LOADER_LOADING_FAILURE_ERROR_CODE,oe.MANIFEST_LOADER_LOADING_FAILURE_ERROR_MESSAGE+"".concat(ne,", ").concat(m))})}})},reset:function(){H.off(u.Z.XLINK_READY,q,r),C&&C.reset(),I&&(I.reset(),I=null),_&&(_.abort(),_=null)}},c=w.getLogger(r),H.on(u.Z.XLINK_READY,q,r),_=Kn(h).create({errHandler:o.errHandler,dashMetrics:o.dashMetrics,mediaPlayerModel:o.mediaPlayerModel,requestModifier:o.requestModifier,urlUtils:B,constants:t.Z,dashConstants:e.Z,errors:oe,requestTimeout:o.settings.get().streaming.manifestRequestTimeout}),I=xo(h).create({errHandler:j,dashMetrics:o.dashMetrics,mediaPlayerModel:o.mediaPlayerModel,requestModifier:o.requestModifier,settings:o.settings}),b=null,r}Da.__dashjs_factory_name="ManifestLoader";var rs=g.Z.getClassFactory(Da);function Oa(){var o=this.context,r=(0,y.Z)(o).getInstance();return{error:function(c){r.trigger(u.Z.ERROR,{error:c})}}}Oa.__dashjs_factory_name="ErrorHandler";var is=g.Z.getSingletonFactory(Oa),Ma=O(1715);function Pa(){var o,r,c,_,I,b,h=this.context,w=(0,y.Z)(h).getInstance();function G(H,B){if(!B||!B.Period_asArray||B.Period_asArray.length===0)return Promise.resolve();var C=[];return B.Period_asArray.forEach(function(j){C.push(function(q,fe){return new Promise(function(ne){if(q&&q.AdaptationSet_asArray&&q.AdaptationSet_asArray.length!==0){var se=[];q.AdaptationSet_asArray.forEach(function(ce){r.getIsTypeOf(ce,fe)&&se.push(function(Y,ue){return new Promise(function(Q){if(Y.Representation_asArray&&Y.Representation_asArray.length!==0){var re=[],m=[];Y.Representation_asArray.forEach(function(x,L){var N=r.getCodec(Y,L,!1),R=function(z,K,te){switch(z){case t.Z.VIDEO:return function(X,P){return{codec:P,width:X.width||null,height:X.height||null,framerate:X.frameRate||null,bitrate:X.bandwidth||null}}(K,te);case t.Z.AUDIO:return function(X,P){var le=X.audioSamplingRate||null;return{codec:P,bitrate:X.bandwidth||null,samplerate:le}}(K,te);default:return null}}(ue,x,N);m.push(R),re.push(c.supportsCodec(R,ue))}),Promise.all(re).then(function(x){Y.Representation_asArray=Y.Representation_asArray.filter(function(L,N){return x[N]||b.debug("[Stream] Codec ".concat(m[N].codec," not supported ")),x[N]}),Q()}).catch(function(){Q()})}else Q()})}(ce,fe))}),Promise.all(se).then(function(){q.AdaptationSet_asArray=q.AdaptationSet_asArray.filter(function(ce){var Y=ce.Representation_asArray&&ce.Representation_asArray.length>0;return Y||(w.trigger(u.Z.ADAPTATION_SET_REMOVED_NO_CAPABILITIES,{adaptationSet:ce}),b.warn("AdaptationSet has been removed because of no supported Representation")),Y}),ne()}).catch(function(){ne()})}else ne()})}(j,H))}),Promise.all(C)}return o={setConfig:function(H){H&&(H.adapter&&(r=H.adapter),H.capabilities&&(c=H.capabilities),H.settings&&(_=H.settings),H.customParametersModel&&(I=H.customParametersModel))},filterUnsupportedFeatures:function(H){return new Promise(function(B){var C=[];C.push(G(t.Z.VIDEO,H)),C.push(G(t.Z.AUDIO,H)),Promise.all(C).then(function(){_.get().streaming.capabilities.filterUnsupportedEssentialProperties&&function(j){j&&j.Period_asArray&&j.Period_asArray.length!==0&&j.Period_asArray.forEach(function(q){q.AdaptationSet_asArray=q.AdaptationSet_asArray.filter(function(fe){return!fe.Representation_asArray||fe.Representation_asArray.length===0||(fe.Representation_asArray=fe.Representation_asArray.filter(function(ne){var se=r.getEssentialPropertiesForRepresentation(ne);if(se&&se.length>0)for(var ce=0;ce0)})})}(H),function(j){var q=I.getCustomCapabilitiesFilters();q&&q.length!==0&&j&&j.Period_asArray&&j.Period_asArray.length!==0&&j.Period_asArray.forEach(function(fe){fe.AdaptationSet_asArray=fe.AdaptationSet_asArray.filter(function(ne){return!ne.Representation_asArray||ne.Representation_asArray.length===0||(ne.Representation_asArray=ne.Representation_asArray.filter(function(se){return!q.some(function(ce){return!ce(se)})}),ne.Representation_asArray&&ne.Representation_asArray.length>0)})})}(H),B()}).catch(function(){B()})})}},b=(0,E.Z)(h).getInstance().getLogger(o),o}Pa.__dashjs_factory_name="CapabilitiesFilter";var as=g.Z.getSingletonFactory(Pa),os=function o(){(function(r,c){if(!(r instanceof c))throw new TypeError("Cannot call a class as a function")})(this,o),this.t=null,this.xywh=null,this.track=null,this.id=null,this.s=null,this.r=null};function La(){var o;return{initialize:function(r){if(o=new os,!r)return null;var c=r.indexOf("#");if(c!==-1)for(var _=r.substr(c+1).split("&"),I=0,b=_.length;I0?(B&&r.warn("Supplied minimum playback rate is a positive value when it should be negative or 0. The supplied rate will not be applied and set to 0: 100% playback speed."),0):H1?(B&&r.warn("Supplied maximum playback rate is out of range and will be limited to ".concat(1,": ").concat(200,"% playback speed.")),1):H}function G(){var H=b.get().streaming.buffer.stableBufferTime>0?b.get().streaming.buffer.stableBufferTime:b.get().streaming.buffer.fastSwitchEnabled?20:12,B=c.getLiveDelay();return!isNaN(B)&&B>0?Math.min(H,B):H}return o={getCatchupMaxDrift:function(){if(!isNaN(b.get().streaming.liveCatchup.maxDrift)&&b.get().streaming.liveCatchup.maxDrift>0)return b.get().streaming.liveCatchup.maxDrift;var H=_.getServiceDescriptionSettings();return H&&H.liveCatchup&&!isNaN(H.liveCatchup.maxDrift)&&H.liveCatchup.maxDrift>0?H.liveCatchup.maxDrift:12},getCatchupModeEnabled:function(){return b.get().streaming.liveCatchup.enabled!==null?b.get().streaming.liveCatchup.enabled:c.getInitialCatchupModeActivated()},getStableBufferTime:G,getInitialBufferLevel:function(){var H=b.get().streaming.buffer.initialBufferLevel;return isNaN(H)||H<0?0:Math.min(G(),H)},getRetryAttemptsForType:function(H){var B=isNaN(b.get().streaming.retryAttempts.lowLatencyMultiplyFactor)?5:b.get().streaming.retryAttempts.lowLatencyMultiplyFactor;return c.getLowLatencyModeEnabled()?b.get().streaming.retryAttempts[H]*B:b.get().streaming.retryAttempts[H]},getRetryIntervalsForType:function(H){var B=isNaN(b.get().streaming.retryIntervals.lowLatencyReductionFactor)?10:b.get().streaming.retryIntervals.lowLatencyReductionFactor;return c.getLowLatencyModeEnabled()?b.get().streaming.retryIntervals[H]/B:b.get().streaming.retryIntervals[H]},getCatchupPlaybackRates:function(H){var B=b.get().streaming.liveCatchup.playbackRate;if(!isNaN(B.min)||!isNaN(B.max))return{min:h(B.min,H),max:w(B.max,H)};var C=_.getServiceDescriptionSettings();if(C&&C.liveCatchup&&(!isNaN(C.liveCatchup.playbackRate.min)||!isNaN(C.liveCatchup.playbackRate.max))){var j=C.liveCatchup.playbackRate;return{min:h(j.min,H),max:w(j.max,H)}}return{min:-.5,max:.5}},getAbrBitrateParameter:function(H,B){try{var C=b.get().streaming.abr[H][B];if(!isNaN(C)&&C!==-1)return C;var j=_.getServiceDescriptionSettings();return j&&j[H]&&!isNaN(j[H][B])?j[H][B]:-1}catch{return-1}},setConfig:function(H){H.playbackController&&(c=H.playbackController),H.serviceDescriptionController&&(_=H.serviceDescriptionController)},reset:function(){}},r=(0,E.Z)(I).getInstance().getLogger(o),o}Fa.__dashjs_factory_name="MediaPlayerModel";var ls=g.Z.getSingletonFactory(Fa),cs=O(1767);function ka(o){var r=(o=o||{}).abrController,c=o.switchHistory,_=o.droppedFramesHistory,I=o.currentRequest,b=o.useBufferOccupancyABR,h=o.useL2AABR,w=o.useLoLPABR,G=o.streamProcessor?o.streamProcessor.getScheduleController():null,H=o.streamProcessor?o.streamProcessor.getRepresentationInfo():null,B=o.videoModel?o.videoModel:null;function C(){return H?H.mediaInfo:null}return{getMediaType:function(){var j=C();return j?j.type:null},getMediaInfo:C,getDroppedFramesHistory:function(){return _},getCurrentRequest:function(){return I},getSwitchHistory:function(){return c},getStreamInfo:function(){var j=C();return j?j.streamInfo:null},getScheduleController:function(){return G},getAbrController:function(){return r},getRepresentationInfo:function(){return H},useBufferOccupancyABR:function(){return b},useL2AABR:function(){return h},useLoLPABR:function(){return w},getVideoModel:function(){return B}}}ka.__dashjs_factory_name="RulesContext";var Za=g.Z.getClassFactory(ka),_i=O(2068);function Ua(){var o=[],r=[];return{push:function(c){c.newValue===_i.Z.NO_CHANGE&&(c.newValue=c.oldValue),o[c.oldValue]||(o[c.oldValue]={noDrops:0,drops:0,dropSize:0});var _=c.newValue-c.oldValue,I=_<0?1:0,b=I?-_:0,h=I?0:1;if(o[c.oldValue].drops+=I,o[c.oldValue].dropSize+=b,o[c.oldValue].noDrops+=h,r.push({idx:c.oldValue,noDrop:h,drop:I,dropSize:b}),r.length>8){var w=r.shift();o[w.idx].drops-=w.drop,o[w.idx].dropSize-=w.dropSize,o[w.idx].noDrops-=w.noDrop}},getSwitchRequests:function(){return o},reset:function(){o=[],r=[]}}}Ua.__dashjs_factory_name="SwitchRequestHistory";var fs=g.Z.getClassFactory(Ua);function Ba(){var o={},r={},c={};return{push:function(_,I,b){if(I){o[_]||(o[_]=[],r[_]=0,c[_]=0);var h=b&&b.droppedVideoFrames?b.droppedVideoFrames:0,w=b&&b.totalVideoFrames?b.totalVideoFrames:0,G=h-r[_];r[_]=h;var H=w-c[_];c[_]=w;var B=o[_];isNaN(I)||(B[I]?(B[I].droppedVideoFrames+=G,B[I].totalVideoFrames+=H):B[I]={droppedVideoFrames:G,totalVideoFrames:H})}},getFrameHistory:function(_){return o[_]},clearForStream:function(_){try{delete o[_],delete r[_],delete c[_]}catch{}},reset:function(){o={},r={},c={}}}}Ba.__dashjs_factory_name="DroppedFramesHistory";var ds=g.Z.getClassFactory(Ba);function Ga(o){var r,c,_,I,b,h=this.context,w=(o=o||{}).settings,G=(0,y.Z)(h).getInstance();function H(ne,se,ce,Y){var ue=Math.pow(.5,ce/Y.fast);ne.fastEstimate=(1-ue)*se+ue*ne.fastEstimate;var Q=Math.pow(.5,ce/Y.slow);ne.slowEstimate=(1-Q)*se+Q*ne.slowEstimate,ne.totalWeight+=ce}function B(ne,se,ce){return w.get().streaming.abr.movingAverageMethod!==t.Z.MOVING_AVERAGE_SLIDING_WINDOW?function(Y,ue){var Q=Y?b.throughputHalfLife:b.latencyHalfLife,re=Y?_[ue]:I[ue];if(!re||re.totalWeight<=0)return NaN;var m=re.fastEstimate/(1-Math.pow(.5,re.totalWeight/Q.fast)),x=re.slowEstimate/(1-Math.pow(.5,re.totalWeight/Q.slow));return Y?Math.min(m,x):Math.max(m,x)}(ne,se):function(Y,ue,Q){var re=function(x,L,N){var R,z;if(x?(R=r[L],z=N?3:4):(R=c[L],z=4),R){if(z>=R.length)z=R.length;else if(x)for(var K=1;K=1.3||te<=.7692307692307692)&&(z+=1)===R.length)break}}else z=0;return z}(Y,ue,Q),m=(Y?r:c)[ue];return re!==0&&m&&m.length!==0?(m=m.slice(-re)).reduce(function(x,L){return x+L})/m.length:NaN}(ne,se,ce)}function C(ne,se){return B(!0,ne,se)}function j(ne){r[ne]=r[ne]||[],c[ne]=c[ne]||[],_[ne]=_[ne]||{fastEstimate:0,slowEstimate:0,totalWeight:0},I[ne]=I[ne]||{fastEstimate:0,slowEstimate:0,totalWeight:0}}function q(){r={},c={},_={},I={}}var fe={push:function(ne,se,ce){if(se.trace&&se.trace.length){var Y,ue=se.tresponse.getTime()-se.trequest.getTime()||1,Q=se._tfinish.getTime()-se.tresponse.getTime()||1,re=se.trace.reduce(function(N,R){return N+R.b[0]},0),m=0;if((Y=se._fileLoaderType&&se._fileLoaderType===t.Z.FILE_LOADER_TYPES.FETCH?se.trace.reduce(function(N,R){return N+R.d},0):ce?Q:ue+Q)!==0&&(m=Math.round(8*re/Y)),se.cmsd){var x=se.cmsd.dynamic&&se.cmsd.dynamic.etp?se.cmsd.dynamic.etp:null;if(x){var L=w.get().streaming.cmsd.abr.etpWeightRatio;L>0&&L<=1&&(m=m*(1-L)+x*L)}}if(j(ne),function(N,R,z){return N===t.Z.VIDEO?z0&&!r[ne].hasCachedEntries)return;r[ne].hasCachedEntries=!0}else r[ne]&&r[ne].hasCachedEntries&&function(N){delete r[N],delete c[N],delete _[N],delete I[N],j(N)}(ne);r[ne].push(m),G.trigger(n.Z.THROUGHPUT_MEASUREMENT_STORED,{throughput:m,mediaType:ne,httpRequest:se}),r[ne].length>20&&r[ne].shift(),c[ne].push(ue),c[ne].length>20&&c[ne].shift(),H(_[ne],m,.001*Q,b.throughputHalfLife),H(I[ne],ue,1,b.latencyHalfLife)}},getAverageThroughput:C,getSafeAverageThroughput:function(ne,se){var ce=C(ne,se);return isNaN(ce)||(ce*=w.get().streaming.abr.bandwidthSafetyFactor),ce},getAverageLatency:function(ne){return B(!1,ne)},reset:q};return b={throughputHalfLife:{fast:3,slow:8},latencyHalfLife:{fast:1,slow:2}},q(),fe}Ga.__dashjs_factory_name="ThroughputHistory";var gs=g.Z.getClassFactory(Ga);function Wi(){var o,r,c,_,I,b,h,w,G,H,B,C,j,q,fe,ne,se,ce,Y,ue,Q,re,m,x,L,N,R,z=this.context,K=(0,E.Z)(z).getInstance(),te=(0,y.Z)(z).getInstance();function X(){I={},b={},w={},h={},ue={},m={},x={},L={},H===void 0&&(H=!1),Q&&Q.reset(),Y=void 0,Q=void 0,re=void 0,clearTimeout(G),G=null}function P(Te){var ke=Te.request.mediaType,me=Te.streamId;if(ke&&me&&h[me]&&R.get().streaming.abr.autoSwitchBitrate[ke]){var pe=h[me][ke];if(pe){var De=Za(z).create({abrController:o,streamProcessor:pe,currentRequest:Te.request,useBufferOccupancyABR:m[ke],useL2AABR:x[ke],useLoLPABR:L[ke],videoModel:q}),xe=c.shouldAbandonFragment(De,me);xe.quality>_i.Z.NO_CHANGE&&pe.getFragmentModel().getRequests({state:A.FRAGMENT_MODEL_LOADING,index:Te.request.index})[0]&&(w[me][ke].state=p.Z.ABANDON_LOAD,ue[me][ke].reset(),ue[me][ke].push({oldValue:Ae(ke,me),newValue:xe.quality,confidence:1,reason:xe.reason}),Ie(ke,_.getActiveStreamInfo(),xe.quality,xe.reason),clearTimeout(G),G=setTimeout(function(){w[me][ke].state=p.Z.ALLOW_LOAD,G=null},R.get().streaming.abandonLoadTimeout))}}}function le(Te){Te.mediaType===t.Z.VIDEO&&(Y!==void 0&&Q.push(Te.streamId,Y,q.getPlaybackQuality()),Y=Te.newQuality)}function ye(Te){var ke,me;Te.metric!==p.Z.HTTP_REQUEST||!Te.value||Te.value.type!==He.w.MEDIA_SEGMENT_TYPE||Te.mediaType!==t.Z.AUDIO&&Te.mediaType!==t.Z.VIDEO||re.push(Te.mediaType,Te.value,R.get().streaming.abr.useDeadTimeLatency),Te.metric!==p.Z.BUFFER_LEVEL||Te.mediaType!==t.Z.AUDIO&&Te.mediaType!==t.Z.VIDEO||(ke=Te.mediaType,me=.001*Te.value.level,R.get().streaming.abr.ABRStrategy===t.Z.ABR_STRATEGY_DYNAMIC&&function(pe,De){try{var xe=fe.getStableBufferTime(),Ze=xe,mt=.5*xe,dt=m[pe],Pt=De>(dt?mt:Ze);m[pe]=Pt,Pt!==dt&&(Pt?r.info("["+pe+"] switching from throughput to buffer occupancy ABR rule (buffer: "+De.toFixed(3)+")."):r.info("["+pe+"] switching from buffer occupancy to throughput ABR rule (buffer: "+De.toFixed(3)+")."))}catch(zt){r.error(zt)}}(ke,me))}function Pe(Te,ke){try{var me;return I[ke]=I[ke]||{},I[ke].hasOwnProperty(Te)||(I[ke][Te]=0),me=function(pe,De){var xe=I[De][pe],Ze=xe;if(!h[De]||!h[De][pe])return Ze;var mt=be(pe,De);mt!==void 0&&(Ze=Math.max(xe,mt));var dt=function(Pt,zt){try{var Yt=fe.getAbrBitrateParameter("maxBitrate",Pt);return Yt>-1?rt(h[zt][Pt].getMediaInfo(),Yt,zt):void 0}catch{return}}(pe,De);return dt!==void 0&&(Ze=Math.min(Ze,dt)),Ze}(Te,ke),me=function(pe,De,xe){var Ze=I[xe][De],mt=R.get().streaming.abr.maxRepresentationRatio[De];return isNaN(mt)||mt>=1||mt<0?pe:Math.min(pe,Math.round(Ze*mt))}(me,Te,ke),me=function(pe,De,xe){if(De!==t.Z.VIDEO||!R.get().streaming.abr.limitBitrateByPortal||!h[xe]||!h[xe][De])return pe;H||Ot();var Ze=h[xe][De].getStreamInfo(),mt=j.getAdaptationForType(Ze.index,De,Ze).Representation_asArray,dt=pe;if(B>0&&C>0){for(;dt>0&&mt[dt]&&B-1){var xe=h[pe][me].getMediaInfo(),Ze=nt(xe),mt=rt(xe,De,pe);return Ze[mt]&&mt1&&arguments[1]!==void 0?arguments[1]:null;try{return ke||(ke=_.getActiveStreamInfo().id),Te&&h[ke]&&h[ke][Te]&&ke?(b[ke]=b[ke]||{},b[ke].hasOwnProperty(Te)||(b[ke][Te]=0),b[ke][Te]):0}catch{return 0}}function Ie(Te,ke,me){var pe=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;if(ke&&ke.id&&Te){var De=ke.id,xe=Ae(Te,De);(0,W.SE)(me);var Ze=Pe(Te,De);me!==xe&&me>=0&&me<=Ze&&st(Te,xe,me,Ze,pe,De)}}function st(Te,ke,me,pe,De,xe){if(Te&&h[xe]&&h[xe][Te]){var Ze=h[xe][Te].getStreamInfo(),mt=Ze&&Ze.manifestInfo&&Ze.manifestInfo.isDynamic,dt=N.getCurrentBufferLevel(Te);r.info("Stream ID: "+xe+" ["+Te+"] switch from "+ke+" to "+me+"/"+pe+" (buffer: "+dt+") "+(De?JSON.stringify(De):".")),b[xe]=b[xe]||{},b[xe][Te]=me;var Pt=ut(xe,Te,me);te.trigger(u.Z.QUALITY_CHANGE_REQUESTED,{oldQuality:ke,newQuality:me,reason:De,streamInfo:Ze,bitrateInfo:Pt,maxIdx:pe,mediaType:Te},{streamId:Ze.id,mediaType:Te});var zt=re.getAverageThroughput(Te,mt);isNaN(zt)||ce.setSavedBitrateSettings(Te,zt)}}function ut(Te,ke,me){if(ke&&h&&h[Te]&&h[Te][ke]){var pe=nt(h[Te][ke].getMediaInfo());return pe[me]?pe[me]:null}return null}function rt(Te,ke,me){var pe=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null,De=Te&&Te.type?h[me][Te.type].getRepresentationInfo():null;if(R.get().streaming.abr.useDeadTimeLatency&&pe&&De&&De.fragmentDuration){pe/=1e3;var xe=De.fragmentDuration;if(pe>xe)return 0;var Ze=pe/xe;ke*=1-Ze}for(var mt=nt(Te),dt=mt.length-1;dt>=0;dt--){var Pt=mt[dt];if(1e3*ke>=Pt.bitrate)return dt}return 0}function nt(Te){var ke=[];if(!Te||!Te.bitrateList)return ke;for(var me,pe=Te.bitrateList,De=Te.type,xe=0,Ze=pe.length;xe1&&arguments[1]!==void 0?arguments[1]:null;if(ke||(ke=_.getActiveStreamInfo().id),Te&&h&&h[ke]&&h[ke][Te]){var me=Pe(Te,ke),pe=nt(h[ke][Te].getMediaInfo());return pe[me]?pe[me]:null}return null},getMinAllowedIndexFor:be,getMaxAllowedIndexFor:Pe,getInitialBitrateFor:function(Te,ke){if(function(){if(!ce||!ce.hasOwnProperty("getSavedBitrateSettings"))throw new Error(t.Z.MISSING_CONFIG_ERROR)}(),Te===t.Z.TEXT)return NaN;var me=ce.getSavedBitrateSettings(Te),pe=fe.getAbrBitrateParameter("initialBitrate",Te),De=R.get().streaming.abr.initialRepresentationRatio[Te];if(pe===-1)if(De>-1){var xe=h[ke][Te].getStreamInfo(),Ze=j.getAdaptationForType(xe.index,Te,xe).Representation_asArray;pe=Array.isArray(Ze)?Ze[Math.max(Math.round(Ze.length*De)-1,0)].bandwidth/1e3:0}else pe=isNaN(me)?Te===t.Z.VIDEO?1e3:100:me;return pe},getQualityFor:Ae,getAbandonmentStateFor:function(Te,ke){return w[Te]&&w[Te][ke]?w[Te][ke].state:null},setPlaybackQuality:Ie,checkPlaybackQuality:function(Te,ke){try{if(!(Te&&h&&h[ke]&&h[ke][Te]))return!1;if(Q){var me=q.getPlaybackQuality();me&&Q.push(ke,Y,me)}if(!R.get().streaming.abr.autoSwitchBitrate[Te])return!1;var pe=Ae(Te,ke),De=Za(z).create({abrController:o,switchHistory:ue[ke][Te],droppedFramesHistory:Q,streamProcessor:h[ke][Te],currentValue:pe,useBufferOccupancyABR:m[Te],useL2AABR:x[Te],useLoLPABR:L[Te],videoModel:q}),xe=be(Te,ke),Ze=Pe(Te,ke),mt=c.getMaxQuality(De),dt=mt.quality;return xe!==void 0&&(dt>_i.Z.NO_CHANGE?dt:pe)Ze&&(dt=Ze),ue[ke][Te].push({oldValue:pe,newValue:dt}),dt>_i.Z.NO_CHANGE&&dt!==pe&&(w[ke][Te].state===p.Z.ALLOW_LOAD||dt0}function q(){if(c&&j()&&c.playbackRate===0){var Q=document.createEvent("Event");Q.initEvent("waiting",!0,!1),c.dispatchEvent(Q)}}function fe(Q,re){c&&c.addEventListener(Q,re)}function ne(Q,re){c&&c.removeEventListener(Q,re)}function se(){return c?c.readyState:NaN}function ce(){return c?c.buffered:null}function Y(Q,re,m,x,L){if(c){for(var N=0;N=Q?(re(),null):function(m,x){var L=function N(){ne(m,N),x(m)};return fe(m,L),{func:L,event:m}}(ms.get(Q),re)}return o={addEventListener:fe,addTextTrack:function(Q,re,m,x,L){if(!c)return null;var N=Y(Q,re,m,x,L);return N||((N=c.addTextTrack(Q,re,m)).isEmbedded=L,N.isTTML=x),N},appendChild:function(Q){c&&(c.appendChild(Q),Q.isTTML!==void 0&&(c.textTracks[c.textTracks.length-1].isTTML=Q.isTTML,c.textTracks[c.textTracks.length-1].isEmbedded=Q.isEmbedded))},getBufferRange:ce,getClientHeight:function(){return c?c.clientHeight:NaN},getClientWidth:function(){return c?c.clientWidth:NaN},getElement:function(){return c},getEnded:function(){return c?c.ended:null},getPlaybackQuality:function(){if(!c)return null;var Q="webkitDroppedFrameCount"in c&&"webkitDecodedFrameCount"in c,re=null;return"getVideoPlaybackQuality"in c?re=c.getVideoPlaybackQuality():Q&&(re={droppedVideoFrames:c.webkitDroppedFrameCount,totalVideoFrames:c.webkitDroppedFrameCount+c.webkitDecodedFrameCount,creationTime:new Date}),re},getPlaybackRate:function(){return c?c.playbackRate:null},getPlayedRanges:function(){return c?c.played:null},getReadyState:se,getSource:function(){return c?c.src:null},getTTMLRenderingDiv:function(){return b},getTextTrack:Y,getTextTracks:function(){return c?c.textTracks:[]},getTime:function(){return c?isNaN(_)?c.currentTime:_:null},getVideoHeight:function(){return c?c.videoHeight:NaN},getVideoRelativeOffsetLeft:function(){if(c){var Q=c.parentNode.host||c.parentNode;return Q?c.getBoundingClientRect().left-Q.getBoundingClientRect().left:NaN}return NaN},getVideoRelativeOffsetTop:function(){if(c){var Q=c.parentNode.host||c.parentNode;return Q?c.getBoundingClientRect().top-Q.getBoundingClientRect().top:NaN}return NaN},getVideoWidth:function(){return c?c.videoWidth:NaN},getVttRenderingDiv:function(){return h},initialize:function(){H.on(u.Z.PLAYBACK_PLAYING,q,this)},isPaused:function(){return c?c.paused:null},isSeeking:function(){return c?c.seeking||!isNaN(_):null},isStalled:j,pause:function(){c&&(c.pause(),c.autoplay=!1)},play:function(){if(c){c.autoplay=!0;var Q=c.play();Q&&Q.catch&&typeof Promise<"u"&&Q.catch(function(re){re.name==="NotAllowedError"&&H.trigger(u.Z.PLAYBACK_NOT_ALLOWED),r.warn("Caught pending play exception - continuing (".concat(re,")"))})}},removeChild:function(Q){c&&c.removeChild(Q)},removeEventListener:ne,reset:function(){clearTimeout(w),H.off(u.Z.PLAYBACK_PLAYING,q,this)},setCurrentTime:function(Q,re){c&&(I&&I.func&&I.event&&ne(I.event,I.func),_=Q,I=ue(t.Z.VIDEO_ELEMENT_READY_STATES.HAVE_METADATA,function(){if(c)if(c.currentTime!==_)try{_=re?function(m){var x=ce(),L=m,N=9999999999;if(x)for(var R=0;R=z&&m<=K)return m;te1&&arguments[1]!==void 0&&arguments[1];c&&(!re&&c.readyState<=2&&Q>0?c.addEventListener("canplay",C):c.playbackRate=Q)},setSource:function(Q){c&&(Q?c.src=Q:(c.removeAttribute("src"),c.load()))},setStallState:function(Q,re){(function(m,x){x?function(L){L!==null&&c&&!c.seeking&&B.indexOf(L)===-1&&B.push(L)}(m):function(L){var N=B.indexOf(L);L!==null&&N!==-1&&B.splice(N,1)}(m)})(Q,re)},setTTMLRenderingDiv:function(Q){(b=Q).style.position="absolute",b.style.display="flex",b.style.overflow="hidden",b.style.pointerEvents="none",b.style.top=0,b.style.left=0},setVttRenderingDiv:function(Q){h=Q},waitForReadyState:ue},r=(0,E.Z)(G).getInstance().getLogger(o),_=NaN,o}qa.__dashjs_factory_name="VideoModel";var ps=g.Z.getSingletonFactory(qa),ys=[{oldKey:"dashjs_vbitrate",newKey:"dashjs_video_bitrate"},{oldKey:"dashjs_abitrate",newKey:"dashjs_audio_bitrate"},{oldKey:"dashjs_vsettings",newKey:"dashjs_video_settings"},{oldKey:"dashjs_asettings",newKey:"dashjs_audio_settings"}],Ya="dashjs_?_bitrate",ja="dashjs_?_settings",xr="localStorage",Ha="lastBitrate",Va="lastMediaSettings";function Ka(o){o=o||{};var r,c,_,I=this.context,b=o.settings;function h(B){if(_!==void 0)return _;var C;_=!1;try{typeof window<"u"&&(C=window[B])}catch(j){return c.warn("DOMStorage access denied: "+j.message),_}if(!C||B!==xr&&B!=="sessionStorage")return _;try{C.setItem("1","1"),C.removeItem("1"),_=!0}catch(j){c.warn("DOMStorage is supported, but cannot be used: "+j.message)}return _}function w(){var B=6e5;return Math.round(new Date().getTime()/B)*B}function G(B,C){return h(B)&&b.get().streaming[C+"CachingInfo"].enabled}function H(){if(!b)throw new Error(t.Z.MISSING_CONFIG_ERROR)}return r={getSavedBitrateSettings:function(B){if(H(),!b.get().streaming.lastBitrateCachingInfo.enabled)return NaN;var C=NaN;if(G(xr,Ha)){var j=Ya.replace(/\?/,B);try{var q=JSON.parse(localStorage.getItem(j))||{},fe=new Date().getTime()-parseInt(q.timestamp,10)>=b.get().streaming.lastBitrateCachingInfo.ttl||!1,ne=parseFloat(q.bitrate);isNaN(ne)||fe?fe&&localStorage.removeItem(j):(C=ne,c.debug("Last saved bitrate for "+B+" was "+ne))}catch{return null}}return C},setSavedBitrateSettings:function(B,C){if(G(xr,Ha)&&C){var j=Ya.replace(/\?/,B);try{localStorage.setItem(j,JSON.stringify({bitrate:C.toFixed(3),timestamp:w()}))}catch(q){c.error(q.message)}}},getSavedMediaSettings:function(B){if(H(),!b.get().streaming.lastMediaSettingsCachingInfo.enabled)return null;var C=null;if(G(xr,Va)){var j=ja.replace(/\?/,B);try{var q=JSON.parse(localStorage.getItem(j))||{},fe=new Date().getTime()-parseInt(q.timestamp,10)>=b.get().streaming.lastMediaSettingsCachingInfo.ttl||!1;C=q.settings,fe&&(localStorage.removeItem(j),C=null)}catch{return null}}return C},setSavedMediaSettings:function(B,C){if(G(xr,Va)){var j=ja.replace(/\?/,B);try{localStorage.setItem(j,JSON.stringify({settings:C,timestamp:w()}))}catch(q){c.error(q.message)}}}},c=(0,E.Z)(I).getInstance().getLogger(r),h(xr)&&ys.forEach(function(B){var C=localStorage.getItem(B.oldKey);if(C){localStorage.removeItem(B.oldKey);try{localStorage.setItem(B.newKey,C)}catch(j){c.error(j.message)}}}),r}Ka.__dashjs_factory_name="DOMStorage";var Es=g.Z.getSingletonFactory(Ka),vs=O(2032),za=O(2011);function Wa(){var o,r,c,_,I,b,h,w,G,H,B,C,j,q=this.context;function fe(Y,ue,Q,re){var m=null,x=Y?j.resolve(Y.path):null,L=re||{init:!0,url:x?x.url:void 0,range:{start:0,end:1500},searching:!1,bytesLoaded:0,bytesToLoad:1500,mediaType:ue};r.debug("Start searching for initialization.");var N=ce(L);w.load({request:N,success:function(R){if(L.bytesLoaded=L.range.end,!(m=_.findInitRange(R)))return L.range.end=L.bytesLoaded+L.bytesToLoad,fe(Y,ue,Q,L);Y.range=m,Q(Y)},error:function(){Q(Y)}}),r.debug("Perform init search: "+L.url)}function ne(Y,ue,Q,re,m,x){if(Q&&(Q.start===void 0||Q.end===void 0)){var L=Q?Q.toString().split("-"):null;Q=L?{start:parseFloat(L[0]),end:parseFloat(L[1])}:null}m=m||se;var N=null,R=null,z=!!Q,K=Y?j.resolve(Y.path):null,te={init:!1,url:K?K.url:void 0,range:z?Q:{start:0,end:1500},searching:!z,bytesLoaded:x?x.bytesLoaded:0,bytesToLoad:1500,mediaType:ue},X=ce(te);w.load({request:X,success:function(P){var le=te.bytesToLoad,ye=P.byteLength;if(te.bytesLoaded=te.range.end-te.range.start,N=_.parse(P),(R=N.getBox("sidx"))&&R.isComplete){var Pe,be,Ae=R.references;if(Ae!=null&&Ae.length>0&&(Pe=Ae[0].reference_type===1),Pe){var Ie,st,ut,rt;r.debug("Initiate multiple SIDX load."),te.range.end=te.range.start+R.size;var nt=[],Ot=0,Te=(R.offset||te.range.start)+R.size,ke=function(pe){pe?(nt=nt.concat(pe),++Ot>=st&&(nt.sort(function(De,xe){return De.startTime-xe.startTime<0?-1:0}),m(nt,Y,re))):m(null,Y,re)};for(Ie=0,st=Ae.length;Ie16777215?(c.getUint32(_)!==h.tag&&(G=!1),H=4):h.tag>65535?(256*c.getUint16(_)+c.getUint8(_+2)!==h.tag&&(G=!1),H=3):h.tag>255?(c.getUint16(_)!==h.tag&&(G=!1),H=2):(c.getUint8(_)!==h.tag&&(G=!1),H=1),!G&&h.required&&!w)throw new Error("required tag not found");return G&&(_+=H),G}function b(h){var w=1,G=128,H=-1,B=0,C=c.getUint8(_),j=0;for(j=0;j<8;j+=1){if((C&G)===G){B=h===void 0?C&~G:C,H=j;break}G>>=1}for(j=0;j4)return function(H){for(var B=Math.floor(Number.MAX_SAFE_INTEGER/256),C=0,j=0;jB)throw new Error("Value exceeds safe integer limit");C*=256;var q=c.getUint8(_+j);if(C>Number.MAX_SAFE_INTEGER-q)throw new Error("Value exceeds safe integer limit");C+=q}return _+=H,C}(h);for(var w=0,G=0;G>>0},moreData:function(){return _1&&R){var te=C(R,N);if(I[R.id]&&I[R.id][N]){for(var X=0,P=K.length;X0))return te;K=_[0].mpd.manifest}var X=ce(L,z),P=r.getAdaptationsForType(K,L?L.index:null,N);return te=B(K,X,L,P,N),N===b.TEXT&&(P=r.getAdaptationsForType(K,L?L.index:null,b.VIDEO),te=te.concat(B(K,X,L,P,N,!0))),te}function j(L){var N=q(L);return r.getRegularPeriods(N)}function q(L){var N=ne(L);return r.getMpd(N)}function fe(){_=[],I={}}function ne(L){return L||(_.length>0?_[0].mpd.manifest:null)}function se(L){try{var N=ce(L.streamInfo,_),R=r.getAdaptationsForPeriod(N);return L&&L.streamInfo&&L.streamInfo.id!==void 0&&R?R[L.index]:null}catch{return null}}function ce(L,N){for(var R=N.length,z=0;z=0&&h!==void 0&&(st=Ie?"cea-608:"+Ie:"cea-608",X.embeddedCaptions=!0),st}),X.accessibilitiesWithSchemeIdUri=te,R=r.getAudioChannelConfigurationForAdaptation(P),X.audioChannelConfiguration=R.map(function(Ae){return Ae.value}),X.audioChannelConfigurationsWithSchemeIdUri=R,X.audioChannelConfiguration.length===0&&Array.isArray(P.Representation_asArray)&&P.Representation_asArray.length>0&&(z=r.getAudioChannelConfigurationForRepresentation(P.Representation_asArray[0]),X.audioChannelConfiguration=z.map(function(Ae){return Ae.value}),X.audioChannelConfigurationsWithSchemeIdUri=z),K=r.getRolesForAdaptation(P),X.roles=K.map(function(Ae){return Ae.value}),X.rolesWithSchemeIdUri=K,X.codec=r.getCodec(P),X.mimeType=r.getMimeType(P),X.contentProtection=r.getContentProtectionData(P),X.bitrateList=r.getBitrateListForAdaptation(P),X.selectionPriority=r.getSelectionPriority(P),X.contentProtection){var le=X.contentProtection.map(function(Ae){return r.getKID(Ae)}).filter(function(Ae){return Ae!==null});if(le.length){var ye=le[0];X.contentProtection.forEach(function(Ae){Ae.keyId=ye})}}if(X.isText=r.getIsText(P),X.supplementalProperties=r.getSupplementalPropertiesForAdaptation(P),(!X.supplementalProperties||Object.keys(X.supplementalProperties).length===0)&&Array.isArray(P.Representation_asArray)&&P.Representation_asArray.length>0){var Pe=P.Representation_asArray.map(function(Ae){return r.getSupplementalPropertiesForRepresentation(Ae)});Pe.every(function(Ae){return JSON.stringify(Ae)===JSON.stringify(Pe[0])})&&(X.supplementalProperties=Pe[0])}if(X.supplementalPropertiesAsArray=r.getSupplementalPropertiesAsArrayForAdaptation(P),(!X.supplementalPropertiesAsArray||X.supplementalPropertiesAsArray.length===0)&&Array.isArray(P.Representation_asArray)&&P.Representation_asArray.length>0){var be=P.Representation_asArray.map(function(Ae){return r.getSupplementalPropertiesAsArrayForRepresentation(Ae)});be.every(function(Ae){return JSON.stringify(Ae)===JSON.stringify(be[0])})&&(X.supplementalPropertiesAsArray=be[0])}return X.isFragmented=r.getIsFragmented(P),X.isEmbedded=!1,X}function ue(L,N,R){L.id=N,L.index=100+parseInt(N.substring(2,3)),L.type=b.TEXT,L.codec="cea-608-in-SEI",L.isEmbedded=!0,L.isFragmented=!1,L.lang=ci()(R),L.roles=["caption"],L.rolesWithSchemeIdUri=[{schemeIdUri:"urn:mpeg:dash:role:2011",value:"caption"}]}function Q(L){var N,R,z=new to;return z.id=L.id,z.index=L.index,z.start=L.start,z.duration=L.duration,z.manifestInfo=(N=L.mpd,(R=new bs).dvrWindowSize=N.timeShiftBufferDepth,R.loadedTime=N.manifest.loadedTime,R.availableFrom=N.availabilityStartTime,R.minBufferTime=N.manifest.minBufferTime,R.maxFragmentDuration=N.maxSegmentDuration,R.duration=r.getDuration(N.manifest),R.isDynamic=r.getIsDynamic(N.manifest),R.serviceDescriptions=r.getServiceDescriptions(N.manifest),R.protocol=N.manifest.protocol,R),z.isLast=L.mpd.manifest.Period_asArray.length===1||Math.abs(z.start+z.duration-z.manifestInfo.duration)<1,z}function re(){if(!b)throw new Error("setConfig function has to be called previously")}function m(L){return _.length>0?_[0].mpd.manifest.Period_asArray[L]:null}function x(L,N,R){var z,K,te,X,P;if(L){for(z=L.AdaptationSet_asArray,X=0;X0?L.segments[0].duration:NaN),N.MSETimeOffset=L.MSETimeOffset,N.mediaInfo=Y(L.adaptation),N}return null},getStreamsInfo:function(L,N){var R=[],z=_;if(L&&(re(),z=j(L)),z.length>0){(!N||N>z.length)&&(N=z.length);for(var K=0;K0&&K&&(z=R?r.getAdaptationForId(R,_[0].mpd.manifest,K.index):r.getAdaptationForIndex(N?N.index:null,_[0].mpd.manifest,K.index)),z},getProducerReferenceTimes:function(L,N){var R,z,K=ce(L,_);return R=N?N.id:null,_.length>0&&K&&(z=R?r.getAdaptationForId(R,_[0].mpd.manifest,K.index):r.getAdaptationForIndex(N?N.index:null,_[0].mpd.manifest,K.index)),z?r.getProducerReferenceTimesForAdaptation(z):[]},getRealPeriodByIndex:function(L){return r.getRealPeriodForIndex(L,_[0].mpd.manifest)},getEssentialPropertiesForRepresentation:function(L){try{return r.getEssentialPropertiesForRepresentation(L)}catch{return[]}},getVoRepresentations:function(L){var N=se(L);return r.getRepresentationsForAdaptation(N)},getEventsFor:function(L,N,R){var z=[];if(_.length>0){var K=_[0].mpd.manifest;if(L instanceof to){var te=ce(L,_);z=r.getEventsForPeriod(te)}else if(L instanceof Xi){var X=ce(R,_);z=r.getEventStreamForAdaptationSet(K,se(L),X)}else if(L instanceof eo){var P=ce(R,_);z=r.getEventStreamForRepresentation(K,N,P)}}return z},getEvent:function(L,N,R,z){try{if(!L||!N||isNaN(R)||!z)return null;var K=L.scheme_id_uri,te=L.value;if(!N[K+"/"+te])return null;var X,P=new Hn,le=L.timescale||1,ye=z.adaptation.period.start,Pe=N[K+"/"+te],be=isNaN(z.presentationTimeOffset)?isNaN(Pe.presentationTimeOffset)?0:Pe.presentationTimeOffset:z.presentationTimeOffset,Ae=L.presentation_time_delta/le;X=L.version===0?ye+R-be+Ae:ye-be+Ae;var Ie=L.event_duration/le,st=L.id,ut=L.message_data;return P.eventStream=Pe,P.eventStream.value=te,P.eventStream.timescale=le,P.duration=Ie,P.id=st,P.calculatedPresentationTime=X,P.messageData=ut,P.presentationTimeDelta=Ae,P}catch{return null}},getMpd:q,setConfig:function(L){L&&(L.constants&&(b=L.constants),L.cea608parser&&(h=L.cea608parser),L.errHandler&&r.setConfig({errHandler:L.errHandler}),L.BASE64&&r.setConfig({BASE64:L.BASE64}))},updatePeriods:function(L){if(!L)return null;re(),_=j(L)},getIsTextTrack:function(L){return r.getIsText(L)},getUTCTimingSources:function(){var L=ne();return r.getUTCTimingSources(L)},getSuggestedPresentationDelay:function(){var L=_.length>0?_[0].mpd:null;return r.getSuggestedPresentationDelay(L)},getAvailabilityStartTime:function(L){var N=q(L);return r.getAvailabilityStartTime(N)},getIsTypeOf:function(L,N){return r.getIsTypeOf(L,N)},getIsDynamic:function(L){var N=ne(L);return r.getIsDynamic(N)},getDuration:function(L){var N=ne(L);return r.getDuration(N)},getRegularPeriods:j,getContentSteering:function(L){return r.getContentSteering(L)},getLocation:function(L){return r.getLocation(L)},getPatchLocation:function(L){var N=r.getPatchLocation(L),R=r.getPublishTime(L);return N&&N.length!==0&&R?N.filter(function(z){return isNaN(z.ttl)||R.getTime()+z.ttl>new Date().getTime()}):[]},getManifestUpdatePeriod:function(L){var N=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return r.getManifestUpdatePeriod(L,N)},getPublishTime:function(L){return r.getPublishTime(L)},getIsDVB:function(L){return r.hasProfile(L,"urn:dvb:dash:profile:dvb-dash:2014")},getIsPatch:function(L){return c.getIsPatch(L)},getBaseURLsFromElement:function(L){return r.getBaseURLsFromElement(L)},getRepresentationSortFunction:function(){return r.getRepresentationSortFunction()},getCodec:function(L,N,R){return r.getCodec(L,N,R)},getPeriodById:function(L){if(!L||_.length===0)return null;var N=_.filter(function(R){return R.id===L});return N&&N.length>0?N[0]:null},setCurrentMediaInfo:function(L,N,R){I[L]=I[L]||{},I[L][N]=I[L][N]||{},I[L][N]=R},isPatchValid:function(L,N){var R=r.getId(L),z=c.getMpdId(N),K=r.getPublishTime(L),te=c.getPublishTime(N),X=c.getOriginalPublishTime(N);return!!(R&&z&&R==z&&K&&X&&K.getTime()==X.getTime()&&te&&K.getTime()1?te[K]=ye:ye.length==1?te[K]=ye[0]:delete te[K+"_asArray"]}R.action!=="add"&&R.action!=="replace"||Object.keys(R.value).forEach(function(Pe){var be=R.value[Pe],Ae=te[Pe+"_asArray"]||[];if(Ae.length===0&&te[Pe]&&Ae.push(te[Pe]),Ae.length===0)Ae=be;else{var Ie=Ae.length;Ie=Pe==K&&P!=-1?P+(le?0:1)+(R.action=="replace"?-1:0):le?0:Ae.length,Ae.splice.apply(Ae,[Ie,0].concat(be))}te[Pe+"_asArray"]=Ae,te[Pe]=Ae.length==1?Ae[0]:Ae})}}})},areMediaInfosEqual:H,reset:fe},r=$t(w).getInstance(),c=Ns(w).getInstance(),fe(),o}ro.__dashjs_factory_name="DashAdapter";var Cs=g.Z.getSingletonFactory(ro);function Ds(o,r){for(var c=0;c_.get().streaming.metrics.maxListDepth&&se[fe].shift())}function j(q,fe,ne){C(q,fe,ne),H(q,fe,ne)}return r={clearCurrentMetricsForType:function(q){delete c[q],w(q)},clearAllCurrentMetrics:function(){c={},h()},getMetricsFor:B,addHttpRequest:function q(fe,ne,se,ce,Y,ue,Q,re,m,x,L,N,R,z,K,te,X){var P=new He.w;ue&&ue!==ce&&(q(fe,null,se,ce,Y,null,null,re,m,null,null,null,R,null,null,te,X),P.actualurl=ue),P.tcpid=ne,P.type=se,P.url=ce,P.range=re,P.trequest=m,P.tresponse=x,P.responsecode=N,P.cmsd=X,P._tfinish=L,P._stream=fe,P._mediaduration=R,P._quality=Y,P._responseHeaders=z,P._serviceLocation=Q,P._fileLoaderType=te,K?K.forEach(function(le){(function(ye,Pe,be,Ae){var Ie=new He.O;Ie.s=Pe,Ie.d=be,Ie.b=Ae,ye.trace.push(Ie),ye.interval||(ye.interval=0),ye.interval+=be})(P,le.s,le.d,le.b)}):(delete P.interval,delete P.trace),j(fe,p.Z.HTTP_REQUEST,P)},addRepresentationSwitch:function(q,fe,ne,se,ce){var Y=new Ps;Y.t=fe,Y.mt=ne,Y.to=se,ce?Y.lto=ce:delete Y.lto,j(q,p.Z.TRACK_SWITCH,Y)},addBufferLevel:function(q,fe,ne){var se=new Ls;se.t=fe,se.level=ne,j(q,p.Z.BUFFER_LEVEL,se)},addBufferState:function(q,fe,ne){var se=new xs;se.target=ne,se.state=fe,j(q,p.Z.BUFFER_STATE,se)},addDVRInfo:function(q,fe,ne,se){var ce=new Fs;ce.time=fe,ce.range=se,ce.manifestInfo=ne,j(q,p.Z.DVR_INFO,ce)},addDroppedFrames:function(q,fe){var ne=new ks,se=B(q).DroppedFrames;fe&&(ne.time=fe.creationTime,ne.droppedFrames=fe.droppedVideoFrames,se.length>0&&se[se.length-1]==ne||j(q,p.Z.DROPPED_FRAMES,ne))},addSchedulingInfo:function(q,fe,ne,se,ce,Y,ue,Q,re){var m=new Gs;m.mediaType=q,m.t=fe,m.type=ne,m.startTime=se,m.availabilityStartTime=ce,m.duration=Y,m.quality=ue,m.range=Q,m.state=re,j(q,p.Z.SCHEDULING_INFO,m)},addRequestsQueue:function(q,fe,ne){var se=new qs;se.loadingRequests=fe,se.executedRequests=ne,B(q).RequestsQueue=se,H(q,p.Z.REQUESTS_QUEUE,se)},addManifestUpdate:function(q,fe,ne,se,ce,Y,ue,Q,re,m){var x=new Zs;x.mediaType=q,x.type=fe,x.requestTime=ne,x.fetchTime=se,x.availabilityStartTime=ce,x.presentationStartTime=Y,x.clientTimeOffset=ue,x.currentTime=Q,x.buffered=re,x.latency=m,C(t.Z.STREAM,p.Z.MANIFEST_UPDATE,x),H(q,p.Z.MANIFEST_UPDATE,x)},updateManifestUpdateInfo:function(q,fe){if(q){for(var ne in fe)q[ne]=fe[ne];G(q.mediaType,p.Z.MANIFEST_UPDATE,q)}},addManifestUpdateStreamInfo:function(q,fe,ne,se,ce){if(q){var Y=new Us;Y.id=fe,Y.index=ne,Y.start=se,Y.duration=ce,q.streamInfo.push(Y),G(q.mediaType,p.Z.MANIFEST_UPDATE_STREAM_INFO,q)}},addManifestUpdateRepresentationInfo:function(q,fe,ne,se,ce,Y,ue,Q){if(q&&q.representationInfo){var re=new Bs;re.id=fe,re.index=ne,re.streamIndex=se,re.mediaType=ce,re.startNumber=ue,re.fragmentInfoType=Q,re.presentationTimeOffset=Y,q.representationInfo.push(re),G(q.mediaType,p.Z.MANIFEST_UPDATE_TRACK_INFO,q)}},addPlayList:function(q){q.trace&&Array.isArray(q.trace)?q.trace.forEach(function(fe){fe.hasOwnProperty("subreplevel")&&!fe.subreplevel&&delete fe.subreplevel}):delete q.trace,j(t.Z.STREAM,p.Z.PLAY_LIST,q)},addDVBErrors:function(q){j(t.Z.STREAM,p.Z.DVB_ERRORS,q)}},c={},r}io.__dashjs_factory_name="MetricsModel";var Ys=g.Z.getSingletonFactory(io);function ao(o){o=o||{};var r,c,_,I,b=this.context,h=o.metricsModel;function w(B){var C=h.getMetricsFor(B,!0);if(!C)return null;var j,q=C.HttpList,fe=null;if(!q||q.length<=0)return null;for(j=q.length-1;j>=0;){if(q[j].responsecode){fe=q[j];break}j--}return fe}function G(B){var C=h.getMetricsFor(B,!0);return C&&C.HttpList?C.HttpList:[]}function H(B,C){if(!B)return null;var j=B[C];return j&&j.length!==0?j[j.length-1]:null}return r={getCurrentRepresentationSwitch:function(B){return H(h.getMetricsFor(B,!0),p.Z.TRACK_SWITCH)},getCurrentBufferState:function(B){return H(h.getMetricsFor(B,!0),p.Z.BUFFER_STATE)},getCurrentBufferLevel:function(B){var C=H(h.getMetricsFor(B,!0),p.Z.BUFFER_LEVEL);return C?Os.round10(C.level/1e3,-3):0},getCurrentHttpRequest:w,getHttpRequests:G,getCurrentDroppedFrames:function(){return H(h.getMetricsFor(t.Z.VIDEO,!0),p.Z.DROPPED_FRAMES)},getCurrentSchedulingInfo:function(B){return H(h.getMetricsFor(B,!0),p.Z.SCHEDULING_INFO)},getCurrentDVRInfo:function(B){return H(B?h.getMetricsFor(B,!0):h.getMetricsFor(t.Z.VIDEO,!0)||h.getMetricsFor(t.Z.AUDIO,!0),p.Z.DVR_INFO)},getCurrentManifestUpdate:function(){return H(h.getMetricsFor(t.Z.STREAM),p.Z.MANIFEST_UPDATE)},getLatestFragmentRequestHeaderValueByID:function(B,C){if(!C)return null;var j={},q=w(B);q&&(j=sn.Z.parseHttpHeaders(q._responseHeaders));var fe=j[C.toLowerCase()];return fe===void 0?null:fe},getLatestMPDRequestHeaderValueByID:function(B){if(!B)return null;var C,j,q,fe={};for(q=(C=G(t.Z.STREAM)).length-1;q>=0;q--)if((j=C[q]).type===He.w.MPD_TYPE){fe=sn.Z.parseHttpHeaders(j._responseHeaders);break}var ne=fe[B.toLowerCase()];return ne===void 0?null:ne},addRepresentationSwitch:function(B,C,j,q,fe){h.addRepresentationSwitch(B,C,j,q,fe)},addDVRInfo:function(B,C,j,q){h.addDVRInfo(B,C,j,q)},updateManifestUpdateInfo:function(B){var C=this.getCurrentManifestUpdate();h.updateManifestUpdateInfo(C,B)},addManifestUpdateStreamInfo:function(B){if(B){var C=this.getCurrentManifestUpdate();h.addManifestUpdateStreamInfo(C,B.id,B.index,B.start,B.duration)}},addManifestUpdateRepresentationInfo:function(B,C){if(B){var j=this.getCurrentManifestUpdate();h.addManifestUpdateRepresentationInfo(j,B.id,B.index,B.streamIndex,C,B.presentationTimeOffset,B.startNumber,B.fragmentInfoType)}},addManifestUpdate:function(B){h.addManifestUpdate(t.Z.STREAM,B.type,B.requestStartDate,B.requestEndDate)},addHttpRequest:function(B,C,j,q,fe,ne){h.addHttpRequest(B.mediaType,null,B.type,B.url,B.quality,C,B.serviceLocation||null,B.range||null,B.requestStartDate,B.firstByteDate,B.requestEndDate,j,B.duration,q,fe,B.fileLoaderType,ne)},addSchedulingInfo:function(B,C){h.addSchedulingInfo(B.mediaType,new Date,B.type,B.startTime,B.availabilityStartTime,B.duration,B.quality,B.range,C)},addRequestsQueue:function(B,C,j){h.addRequestsQueue(B,C,j)},addBufferLevel:function(B,C,j){h.addBufferLevel(B,C,j)},addBufferState:function(B,C,j){h.addBufferState(B,C,j)},addDroppedFrames:function(B){h.addDroppedFrames(t.Z.VIDEO,B)},addPlayList:function(){I&&(h.addPlayList(I),I=null)},addDVBErrors:function(B){h.addDVBErrors(B)},createPlaylistMetrics:function(B,C){(I=new Se).start=new Date,I.mstart=B,I.starttype=C},createPlaylistTraceMetrics:function(B,C,j){c===!0&&(c=!1,(_=new Ne).representationid=B,_.start=new Date,_.mstart=C,_.playbackspeed=j!==null?j.toString():null)},updatePlayListTraceMetrics:function(B){if(_)for(var C in _)_[C]=B[C]},pushPlayListTraceMetrics:function(B,C){if(c===!1&&I&&_&&_.start){var j=_.start,q=B.getTime()-j.getTime();_.duration=q,_.stopreason=C,I.trace.push(_),c=!0}},clearAllCurrentMetrics:function(){h.clearAllCurrentMetrics()}},h=h||Ys(b).getInstance({settings:o.settings}),c=!0,_=null,I=null,r}ao.__dashjs_factory_name="DashMetrics";var js=g.Z.getSingletonFactory(ao);function oo(){var o,r,c,_,I=this.context,b=(0,y.Z)(I).getInstance(),h=(0,Ce.Z)(I).getInstance();function w(ce){_=ce}function G(ce,Y,ue,Q){var re,m=Y.adaptation.period.mpd,x=m.availabilityStartTime;if(Q)re=ue&&m.timeShiftBufferDepth!==Number.POSITIVE_INFINITY?new Date(x.getTime()+1e3*(ce+m.timeShiftBufferDepth)):m.availabilityEndTime;else if(ue){var L=Y.availabilityTimeOffset;re=new Date(x.getTime()+1e3*(ce-L))}else re=x;return re}function H(ce,Y){return(ce.getTime()-Y.mpd.availabilityStartTime.getTime()+1e3*_)/1e3}function B(ce,Y){return ce+(Y.adaptation.period.start-Y.presentationTimeOffset)}function C(ce){var Y={start:NaN,end:NaN},ue=ce[0].getAdapter().getRegularPeriods()[0],Q=H(new Date,ue);if(!ce||ce.length===0)return{range:Y,now:Q};ce.forEach(function(m){var x=m.getAdapter(),L=x.getMediaInfoForType(m.getStreamInfo(),t.Z.VIDEO)||x.getMediaInfoForType(m.getStreamInfo(),t.Z.AUDIO),N=x.getVoRepresentations(L)[0],R={start:NaN,end:NaN};if(N)if(N.segmentInfoType===e.Z.SEGMENT_TIMELINE)R=function(K){var te,X,P,le,ye=K.adaptation.period.mpd.manifest.Period_asArray[K.adaptation.period.index].AdaptationSet_asArray[K.adaptation.index],Pe=r.getRepresentationFor(K.index,ye),be=Pe.SegmentTemplate||Pe.SegmentList,Ae=be.SegmentTimeline,Ie=be.timescale,st=Ae.S_asArray,ut={start:0,end:0},rt=st[0].t,nt=!isNaN(rt),Ot=nt?rt:0,Te=0;for(nt&&(ut.start=B(Ot/Ie,K)),P=0,le=st.length;PR.start)&&(Y.start=R.start),!isNaN(R.end)&&(isNaN(Y.end)||Y.end2&&arguments[2]!==void 0&&arguments[2];try{for(var Q=0,re=!1,m=NaN;!re&&Q=Y)?(m=Y,re=!0):!ue&&x.start>Y&&(isNaN(m)||x.startm)&&(m=x.start+x.duration),Q+=1}return m}catch{return Y}}function fe(ce){ce.offset===void 0||isNaN(ce.offset)||w(ce.offset/1e3)}function ne(){_=0,c=0}function se(){b.off(u.Z.UPDATE_TIME_SYNC_OFFSET,fe,this),ne()}return o={initialize:function(){ne(),b.on(u.Z.UPDATE_TIME_SYNC_OFFSET,fe,this)},getClientTimeOffset:function(){return _},setClientTimeOffset:w,getClientReferenceTime:function(){return Date.now()-1e3*c+1e3*_},calcAvailabilityStartTimeFromPresentationTime:function(ce,Y,ue){return G(ce,Y,ue)},calcAvailabilityEndTimeFromPresentationTime:function(ce,Y,ue){return G(ce,Y,ue,!0)},calcPresentationTimeFromWallTime:H,calcPresentationTimeFromMediaTime:B,calcPeriodRelativeTimeFromMpdRelativeTime:function(ce,Y){return Y-ce.adaptation.period.start},calcMediaTimeFromPresentationTime:function(ce,Y){return ce-Y.adaptation.period.start+Y.presentationTimeOffset},calcWallTimeForSegment:function(ce,Y){var ue,Q,re;return Y&&(ue=ce.representation.adaptation.period.mpd.suggestedPresentationDelay,Q=ce.presentationStartTime+ue,re=new Date(ce.availabilityStartTime.getTime()+1e3*Q)),re},calcTimeShiftBufferWindow:function(ce,Y){if(!Y)return function(Q){var re={start:NaN,end:NaN},m=0,x=NaN;return Q.forEach(function(L){var N=L.getStreamInfo();m+=N.duration,(isNaN(x)||N.start"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var b,h=Si(r);if(c){var w=Si(this).constructor;b=Reflect.construct(h,arguments,w)}else b=h.apply(this,arguments);return Vs(this,b)});function I(){var b;return function(h,w){if(!(h instanceof w))throw new TypeError("Cannot call a class as a function")}(this,I),(b=_.call(this)).captionData=null,b.label=null,b.defaultTrack=!1,b.kind=null,b.isFragmented=!1,b.isEmbedded=!1,b.isTTML=null,b}return I}(Xi),zs=O(2295);function so(){var o=0;function r(w){for(var G="",H=0;H0&&(se.spans.push({name:ce,line:m,row:C}),m="");var K="style_cea608_"+z.foreground+"_"+z.background;z.underline&&(K+="_underline"),z.italics&&(K+="_italics"),ue.hasOwnProperty(K)||(ue[K]=JSON.parse(JSON.stringify(z))),x=z,ce=K}m+=R.uchar}m.trim().length>0&&se.spans.push({name:ce,line:m,row:C}),fe=!0,ne=L}else fe=!1,ne=-1,q&&(q.p.push(se),se={start:G,end:H,spans:[]},q.y2=C,q.name="region_"+q.x+"_"+q.y1+"_"+q.y2,Y.hasOwnProperty(q.name)===!1?(Q.push(q),Y[q.name]=q):Y[q.name].p.contat(q.p),q=null)}q&&(q.p.push(se),q.y2=C+1,q.name="region_"+q.x+"_"+q.y1+"_"+q.y2,Y.hasOwnProperty(q.name)===!1?(Q.push(q),Y[q.name]=q):Y[q.name].p.contat(q.p),q=null);var te=[];for(C=0;C0){if(j!==0&&st!=ut.row){var rt=document.createElement("br");rt.className="lineBreak",be.appendChild(rt)}var nt=!1;st===ut.row&&(nt=!0),st=ut.row;var Ot=ue[ut.name],Te=document.createElement("span");Te.className="spanPadding "+ut.name+" customSpanColor",Te.style.cssText=I(w,Ot),j!==0&&nt?j===Ie.spans.length-1?Te.textContent=h(ut.line):Te.textContent=ut.line:Ie.spans.length>1&&j1&&Te.isEmbedded?ke=Te.id&&Te.id===t.Z.CC1:j.length===1?Te.id&&typeof Te.id=="string"&&Te.id.substring(0,2)==="CC"&&(ke=!0):j.length===0&&(ke=Te.index===b[0].index),ke}(rt),nt.isFragmented=rt.isFragmented,nt.isEmbedded=!!rt.isEmbedded,nt.isTTML=function(Te){return Te.codec&&Te.codec.search(t.Z.STPP)>=0||Te.mimeType&&Te.mimeType.search(t.Z.TTML)>=0}(rt),nt.kind=function(Te,ke){var me=Te.roles&&Te.roles.length>0?ke[Te.roles[0]]:ke.caption;return me=me===ke.caption||me===ke.subtitle?me:ke.caption}(rt,{subtitle:"subtitles",caption:"captions"}),m.addTextTrack(nt)}function ye(rt){var nt=rt.chunk;nt.mediaInfo.embeddedCaptions&&be(nt.bytes,nt)}function Pe(rt){C=rt}function be(rt,nt){var Ot=nt.mediaInfo,Te=Ot.type,ke=Ot.mimeType,me=Ot.codec||ke;me?Ot.codec.indexOf("application/mp4")!==-1?function(pe,De,xe){var Ze;if(De.segmentType==="InitializationSegment")w=!0,G=_.getMediaTimescaleFromMoov(pe);else{if(!w)return;(Ze=_.getSamplesInfo(pe).sampleList).length>0&&(B=Ze[0].cts-De.start*G),xe.search(t.Z.STPP)>=0?function(mt,dt,Pt){var zt,Yt;for(I=I!==null?I:st(Pt),zt=0;zt0&&m.addCaptions(C,0,jt)}(pe,Ze)}}(rt,nt,me):Te===t.Z.VIDEO?function(pe,De){var xe,Ze;if(De.segmentType===He.w.INIT_SEGMENT_TYPE)q===0&&(q=_.getMediaTimescaleFromMoov(pe));else if(De.segmentType===He.w.MEDIA_SEGMENT_TYPE){if(q===0)return void c.warn("CEA-608: No timescale for embeddedTextTrack yet");var mt=(Ze=_.getSamplesInfo(pe)).lastSequenceNumber,dt=Math.trunc(De.start),Pt=Math.trunc(De.end);if(se[0]||se[1]||function(){for(var Wt,Xt=0;Xt0){cn.cts!==Zt?Gt=0:Gt+=1;var je=Ie();en.fields[ht].push([cn.cts+je*q,ze[ht],Gt]),Zt=cn.cts}return en.fields.forEach(function(Re){Re.sort(function(ae,Fe){return ae[0]===Fe[0]?ae[2]-Fe[2]:ae[0]-Fe[0]})}),en}(pe,Ze.sampleList),Yt=0;Yt=0?nt=z.get().streaming.text.webvtt.customRenderingEnabled&&L?L:x:(rt.search(t.Z.TTML)>=0||rt.search(t.Z.STPP)>=0)&&(nt=N),nt}function ut(rt){j.forEach(function(nt){var Ot=m.getTrackIdxForId(nt.id);Ot>=0&&m.deleteCuesFromTrackIdx(Ot,rt.from,rt.to)})}return r={initialize:function(){X||(j=[],C=null,q=0,se=[],fe=null,ne=null,X=!0,ce=Ws(K).getInstance(),te.on(u.Z.VIDEO_CHUNK_RECEIVED,ye,r),te.on(u.Z.BUFFER_CLEARED,ut,r))},addMediaInfos:function(rt,nt,Ot){if(b=b.concat(nt),rt===t.Z.TEXT&&nt[0].isFragmented&&!nt[0].isEmbedded){h=Ot,r.buffered=(0,zs.Z)(K).create(),H=Q.getTracksFor(t.Z.TEXT,R.id).filter(function(pe){return pe.isFragmented});for(var Te=Q.getCurrentTrackFor(t.Z.TEXT,R.id),ke=0;keo.length)&&(r=o.length);for(var c=0,_=new Array(r);cDe/xe?dt=(Pt=pe)/xe*De:Pt=(dt=me)/De*xe;var zt,Yt,jt=0,Vt=0;return dt/Pt>Ze?(Vt=Pt,jt=Pt*Ze):(jt=dt,Vt=dt/Ze),zt=(me-jt)/2,Yt=(pe-Vt)/2,mt?{x:zt+.1*jt,y:Yt+.1*Vt,w:.8*jt,h:.8*Vt}:{x:zt,y:Yt,w:jt,h:Vt}}function N(me,pe){var De=re.getClientWidth(),xe=re.getClientHeight(),Ze=re.getVideoWidth(),mt=re.getVideoHeight(),dt=re.getVideoRelativeOffsetTop(),Pt=re.getVideoRelativeOffsetLeft();if(Ze!==0&&mt!==0){var zt=Ze/mt,Yt=!1;me.isFromCEA608&&(zt=1.1666666666666667,Yt=!0);var jt=L.call(this,De,xe,Ze,mt,zt,Yt),Vt=jt.w,Wt=jt.h,Xt=jt.x,en=jt.y;if(Vt!=H||Wt!=B||Xt!=w||en!=G||pe){if(w=Xt+Pt,G=en+dt,H=Vt,B=Wt,C){var fn=C.style;fn&&(fn.left=w+"px",fn.top=G+"px",fn.width=H+"px",fn.height=B+"px",fn.zIndex=fe&&document[fe]||ne?ce:null,Q.trigger(n.Z.CAPTION_CONTAINER_RESIZE))}var on=me.activeCues;if(on)for(var cn=on.length,lt=0;lt"u"||Ze[Symbol.iterator]==null){if(Array.isArray(Ze)||(dt=function(Wt,Xt){if(Wt){if(typeof Wt=="string")return lo(Wt,Xt);var en=Object.prototype.toString.call(Wt).slice(8,-1);return en==="Object"&&Wt.constructor&&(en=Wt.constructor.name),en==="Map"||en==="Set"?Array.from(Wt):en==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(en)?lo(Wt,Xt):void 0}}(Ze))||mt&&Ze&&typeof Ze.length=="number"){dt&&(Ze=dt);var Pt=0,zt=function(){};return{s:zt,n:function(){return Pt>=Ze.length?{done:!0}:{done:!1,value:Ze[Pt++]}},e:function(Wt){throw Wt},f:zt}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var Yt,jt=!0,Vt=!1;return{s:function(){dt=Ze[Symbol.iterator]()},n:function(){var Wt=dt.next();return jt=Wt.done,Wt},e:function(Wt){Vt=!0,Yt=Wt},f:function(){try{jt||dt.return==null||dt.return()}finally{if(Vt)throw Yt}}}}(re.getTextTracks());try{for(De.s();!(me=De.n()).done;){var xe=me.value;xe.manualMode===t.Z.TEXT_SHOWING&&pe.push(xe)}}catch(Ze){De.e(Ze)}finally{De.f()}return pe}function Ae(me){return me>=0&&I[me]?re.getTextTrack(I[me].kind,I[me].id,I[me].lang,I[me].isTTML,I[me].isEmbedded):null}function Ie(me){var pe=this;if(me!==h){var De=Ae(h=me);st.call(this,De),q&&(clearInterval(q),q=null),De&&De.renderingType==="html"&&(N.call(this,De,!0),window.ResizeObserver?(Y=new window.ResizeObserver(function(){N.call(pe,De,!0)})).observe(re.getElement()):q=setInterval(N.bind(this,De),500))}}function st(me){ke.call(this),me&&me.renderingType==="html"?Ot.call(this):Te.call(this)}function ut(me,pe){if(!me.cues)return!1;for(var De=0;De3&&arguments[3]!==void 0)||arguments[3];return!!me&&(isNaN(pe)||(xe?me.startTime:me.endTime)>=pe)&&(isNaN(De)||(xe?me.endTime:me.startTime)<=De)}function nt(me,pe,De){var xe=!(arguments.length>3&&arguments[3]!==void 0)||arguments[3];if(me&&(me.cues||me.manualCueList)){var Ze=me.cues&&me.cues.length>0?"native":"custom",mt=Ze==="native"?me.cues:me.manualCueList;if(!mt||mt.length===0)return;for(var dt=mt.length-1,Pt=dt;Pt>=0;Pt--)rt(mt[Pt],pe,De,xe)&&(Ze==="native"?(mt[Pt].onexit&&mt[Pt].onexit(),me.removeCue(mt[Pt])):(Pe(mt[Pt]),delete me.manualCueList[Pt]))}}function Ot(){var me=document.getElementById("native-cue-style");if(!me){(me=document.createElement("style")).id="native-cue-style",document.head.appendChild(me);var pe=me.sheet,De=re.getElement();try{De&&(De.id?pe.insertRule("#"+De.id+"::cue {background: transparent}",0):De.classList.length!==0?pe.insertRule("."+De.className+"::cue {background: transparent}",0):pe.insertRule("video::cue {background: transparent}",0))}catch(xe){c.info(""+xe.message)}}}function Te(){var me=document.getElementById("native-cue-style");me&&document.head.removeChild(me)}function ke(){if(C)for(;C.firstChild;)C.removeChild(C.firstChild)}return r={initialize:function(){typeof window<"u"&&typeof navigator<"u"&&(_=window.VTTCue||window.TextTrackCue,I=[],b=[],h=-1,w=0,G=0,H=0,B=0,C=null,j=null,q=null,ne=!1,ce=2147483647,se=null,document.fullscreenElement!==void 0?fe="fullscreenElement":document.webkitIsFullScreen!==void 0?fe="webkitIsFullScreen":document.msFullscreenElement?fe="msFullscreenElement":document.mozFullScreen&&(fe="mozFullScreen"))},getStreamId:function(){return m.id},addTextTrack:function(me){I.push(me)},addCaptions:P,createTracks:function(){I.sort(function(Wt,Xt){return Wt.index-Xt.index}),C=re.getTTMLRenderingDiv(),j=re.getVttRenderingDiv();for(var me,pe,De,xe,Ze,mt,dt=-1,Pt=0;Pt=0){Q.on(n.Z.PLAYBACK_METADATA_LOADED,function Wt(){var Xt=Ae(dt);Xt&&Xt.renderingType==="html"&&N.call(this,Xt,!0),Q.off(n.Z.PLAYBACK_METADATA_LOADED,Wt,this)},this);for(var jt=0;jt0){var De=pe[0].manualCueList;De&&De.length>0&&De.forEach(function(xe){xe.startTime<=me&&xe.endTime>=me&&!xe.isActive?(xe.isActive=!0,WebVTT.processCues(window,[xe],j,xe.cueID)):xe.isActive&&(xe.startTime>me||xe.endTime0){var pe=me[0].manualCueList;pe&&pe.length>0&&pe.forEach(function(De){if(De.isActive&&(De.isActive=!1,j))for(var xe=j.childNodes,Ze=0;Ze1){var fe=q.split(/:/)[1],ne=!1;fe&&fe.search(/%/)!=-1&&(ne=!0,fe=parseInt(fe.replace(/%/,""),10)),(q.match(/align/)||q.match(/A/))&&(j.align=fe),(q.match(/line/)||q.match(/L/))&&(j.line=fe==="auto"?fe:parseInt(fe,10),ne&&(j.snapToLines=!1)),(q.match(/position/)||q.match(/P/))&&(j.position=fe),(q.match(/size/)||q.match(/S/))&&(j.size=fe)}}),j}function B(C,j){for(var q,fe=j,ne="",se="";C[fe]!==""&&fe1)for(var ce=0;ce0&&se!=="WEBVTT"&&se.match(_)){var ce=G(se),Y=ce.cuePoints,ue=ce.styles,Q=B(C,ne+1),re=w(Y[0].replace(I,"")),m=w(Y[1].replace(I,""));!isNaN(re)&&!isNaN(m)&&re>=q&&m>re?Q!==""?(q=re,fe.push({start:re,end:m,data:Q,styles:ue})):r.error("Skipping cue due to empty/malformed cue text"):r.error("Skipping cue due to incorrect cue timing")}}return fe},getCaptionStyles:H},r=(0,E.Z)(h).getInstance().getLogger(o),c=/(?:\r\n|\r|\n)/gm,_=/-->/,I=/(^[\s]+|[\s]+$)/g,b=/\s\b/g,o}fo.__dashjs_factory_name="VTTParser";var $s=g.Z.getSingletonFactory(fo);function go(){var o,r;return o={parse:function(c){var _=[];return r.oncue=function(I){I.start=I.startTime,I.end=I.endTime,I.data=I.text,I.styles={align:I.align,line:I.line,position:I.position,size:I.size},_.push(I)},r.parse(c),_}},function(){try{window&&window.WebVTT&&window.WebVTT.Parser&&(r=new window.WebVTT.Parser(window,window.vttjs,window.WebVTT.StringDecoder()))}catch{}}(),o}go.__dashjs_factory_name="VttCustomRenderingParser";var eu=g.Z.getSingletonFactory(go);function ho(){var o,r,c=this.context,_=(0,y.Z)(c).getInstance(),I=0;return o={parse:function(b,h,w,G,H){var B,C,j,q="",fe=[],ne={},se={},ce="",Y="",ue={onOpenTag:function(L,N,R){if(R[" imagetype"]&&!R[" imageType"]&&(_.trigger(n.Z.CONFORMANCE_VIOLATION,{level:Mr.LEVELS.ERROR,event:Mr.EVENTS.NON_COMPLIANT_SMPTE_IMAGE_ATTRIBUTE}),R[" imageType"]=R[" imagetype"]),N==="image"&&(L==="http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt"||L==="http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt")){if(!R[" imageType"]||R[" imageType"].value!=="PNG")return void r.warn("smpte-tt imageType != PNG. Discarded");ce=R["http://www.w3.org/XML/1998/namespace id"].value}},onCloseTag:function(){ce&&(se[ce]=Y.trim()),Y="",ce=""},onText:function(L){ce&&(Y+=L)}};if(!b)throw q="no ttml data to parse",new Error(q);ne.data=b,_.trigger(u.Z.TTML_TO_PARSE,ne);var Q=(0,na.fromXML)(ne.data,function(L){q=L},ue);_.trigger(u.Z.TTML_PARSED,{ttmlString:ne.data,ttmlDoc:Q});var re,m=Q.getMediaTimeEvents();for(j=0;j3&&arguments[3]!==void 0?arguments[3]:null,P=z.id;_[P]&&_[P].addMediaInfos(K,te,X)},reset:function(){R(),G.off(u.Z.TEXT_TRACKS_QUEUE_INITIALIZED,Q,r),ue.get().streaming.text.webvtt.customRenderingEnabled&&(G.off(u.Z.PLAYBACK_TIME_UPDATED,re,r),G.off(u.Z.PLAYBACK_SEEKING,m,r)),Object.keys(_).forEach(function(z){_[z].resetEmbedded(),_[z].reset()})}},B=!1,C=!1,j=!1,b=$s(q).getInstance(),h=eu(q).getInstance(),w=tu(q).getInstance(),G=(0,y.Z)(q).getInstance(),R(),r}mo.__dashjs_factory_name="TextController";var nu=g.Z.getClassFactory(mo);function ra(){var o,r,c,_,I,b,h,w,G,H,B,C,j,q,fe,ne,se,ce,Y,ue,Q,re,m,x,L,N,R,z,K,te,X,P,le,ye,Pe,be,Ae,Ie,st,ut="You must first call initialize() and set a source before calling this method",rt="You must first call initialize() and set a valid source and view before calling this method",nt="You must first call attachView() to set the video element before calling this method",Ot="You must first call attachSource() with a valid source before calling this method",Te="MediaPlayer not initialized!",ke=this.context,me=(0,y.Z)(ke).getInstance(),pe=(0,Ce.Z)(ke).getInstance(),De=(0,E.Z)(ke).getInstance({settings:pe});function xe(){cn(null),fn(null),_=null,q&&(q.reset(),q=null),fe&&(fe.reset(),fe=null),ue&&ue.reset(),pe.reset(),se&&(se.reset(),se=null)}function Ze(){return!!c&&!!be.getElement()}function mt(){return(0,vs.e)()}function dt(){if(!h)throw rt;return z.isPaused()}function Pt(){if(!h)throw rt;return z.getIsDynamic()}function zt(ae){var Fe=L&&L.hasVideoTrack()?t.Z.VIDEO:t.Z.AUDIO,at=P.getCurrentDVRInfo(Fe);if(!at)return 0;var Rt=z.getOriginalLiveDelay(),xt=at.range.start+ae;return xt>at.range.end-Rt&&(xt=at.range.end-Rt),xt}function Yt(ae){if(!h)throw rt;var Fe=en().currentTime;if(ae!==void 0)Fe=L.getTimeRelativeToStreamId(Fe,ae);else if(z.getIsDynamic()){var at=L&&L.hasVideoTrack()?t.Z.VIDEO:t.Z.AUDIO,Rt=P.getCurrentDVRInfo(at);Fe=Rt===null||Fe===0?0:Math.max(0,Fe-Rt.range.start)}return Fe}function jt(){if(!h)throw rt;var ae=en().duration;if(z.getIsDynamic()){var Fe=L&&L.hasVideoTrack()?t.Z.VIDEO:t.Z.AUDIO,at=P.getCurrentDVRInfo(Fe);ae=at?at.range.end-at.range.start:0}return ae}function Vt(ae){(0,W.PS)(ae,"boolean"),w=ae}function Wt(){ue.restoreDefaultUTCTimingSources()}function Xt(){return P}function en(){if(!be.getElement())throw nt;return be.getElement()}function fn(ae){if(!I)throw Te;be.setElement(ae),ae&&(ze(),function(){if(!fe){var Fe=dashjs.MetricsReporting;if(typeof Fe=="function"){var at=Fe(ke).create();fe=at.createMetricsReporting({debug:De,eventBus:me,mediaElement:en(),adapter:ce,dashMetrics:P,mediaPlayerModel:Y,events:u.Z,constants:t.Z,metricsConstants:p.Z})}}}(),function(){if(!ne){var Fe=dashjs.MssHandler;typeof Fe=="function"&&(oe.extend(Fe.errors),ne=Fe(ke).create({eventBus:me,mediaPlayerModel:Y,dashMetrics:P,manifestModel:le,playbackController:z,streamController:L,protectionController:q,baseURLController:re,errHandler:Q,events:u.Z,constants:t.Z,debug:De,initSegmentType:He.w.INIT_SEGMENT_TYPE,BASE64:$i,ISOBoxer:Ti,settings:pe}))}}(),L&&L.switchToVideoElement(G)),h&&Zt(),Re(G)}function on(ae){if(!b)throw ut;var Fe=L.getActiveStreamInfo();return Fe?j.getTracksFor(ae,Fe.id):[]}function cn(ae){var Fe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:NaN;if(!I)throw Te;typeof ae=="string"&&Ae.initialize(ae),Fe==null&&(Fe=NaN),isNaN(Fe)||(Fe=Math.max(0,Fe)),G=Fe,c=ae,(b||h)&&Zt(),Ze()&&Re(G)}function lt(){if(!b)throw ut;var ae=L.getActiveStreamInfo();return ae?L.getStreamById(ae.id):null}function Zt(){h=!1,b=!1,ce.reset(),L.reset(),R.reset(),X.reset(),z.reset(),K.reset(),te.reset(),H.reset(),j.reset(),st.reset(),q&&(pe.get().streaming.protection.keepProtectionMediaKeys?q.stop():(q.reset(),q=null,ze())),N.reset(),ye.reset(),Pe.reset()}function Gt(){var ae=kt();L||(L=sa(ke).getInstance()),N||(N=nu(ke).create({errHandler:Q,manifestModel:le,adapter:ce,mediaController:j,videoModel:be,settings:pe})),x.setConfig({capabilities:m,customParametersModel:ue,adapter:ce,settings:pe,manifestModel:le,errHandler:Q}),L.setConfig({capabilities:m,capabilitiesFilter:x,manifestLoader:ae,manifestModel:le,mediaPlayerModel:Y,customParametersModel:ue,protectionController:q,textController:N,adapter:ce,dashMetrics:P,errHandler:Q,timelineConverter:C,videoModel:be,playbackController:z,serviceDescriptionController:K,contentSteeringController:te,abrController:H,mediaController:j,settings:pe,baseURLController:re,uriFragmentModel:Ae,segmentBaseController:st}),R.setConfig({settings:pe,playbackController:z,streamController:L,videoModel:be,timelineConverter:C,adapter:ce}),z.setConfig({streamController:L,serviceDescriptionController:K,dashMetrics:P,adapter:ce,videoModel:be,timelineConverter:C,settings:pe}),X.setConfig({streamController:L,playbackController:z,mediaPlayerModel:Y,videoModel:be,settings:pe}),H.setConfig({streamController:L,domStorage:Ie,mediaPlayerModel:Y,customParametersModel:ue,cmsdModel:Pe,dashMetrics:P,adapter:ce,videoModel:be,settings:pe}),ye.setConfig({abrController:H,dashMetrics:P,playbackController:z}),Pe.setConfig({}),H.initialize(),L.initialize(w,_),N.initialize(),R.initialize(),X.initialize(),ye.initialize(),Pe.initialize(),te.initialize(),st.initialize()}function kt(){return rs(ke).create({debug:De,errHandler:Q,dashMetrics:P,mediaPlayerModel:Y,requestModifier:(0,he.Z)(ke).getInstance(),mssHandler:ne,settings:pe})}function ze(){if(q)return q;var ae=dashjs.Protection;if(typeof ae=="function"){var Fe=ae(ke).create();return u.Z.extend(ae.events),n.Z.extend(ae.events,{publicOnly:!0}),oe.extend(ae.errors),m||(m=(0,Ma.Z)(ke).getInstance()),q=Fe.createProtectionSystem({debug:De,errHandler:Q,videoModel:be,customParametersModel:ue,capabilities:m,eventBus:me,events:u.Z,BASE64:$i,constants:t.Z,cmcdModel:ye,settings:pe})}return null}function ht(){if(!I)throw Te;if(se)return se;var ae=dashjs.OfflineController;if(typeof ae=="function"){u.Z.extend(ae.events),n.Z.extend(ae.events,{publicOnly:!0}),oe.extend(ae.errors);var Fe=kt(),at=li(ke).create();return at.setConfig({manifestModel:le,adapter:ce,manifestLoader:Fe,errHandler:Q,contentSteeringController:te}),se=ae(ke).create({debug:De,manifestUpdater:at,baseURLController:re,manifestLoader:Fe,manifestModel:le,mediaPlayerModel:Y,abrController:H,playbackController:z,adapter:ce,errHandler:Q,dashMetrics:P,timelineConverter:C,segmentBaseController:st,schemeLoaderFactory:B,eventBus:me,events:u.Z,errors:oe,constants:t.Z,settings:pe,dashConstants:e.Z,urlUtils:(0,Me.Z)(ke).getInstance()})}return null}function je(ae){var Fe=L&&L.hasVideoTrack()?t.Z.VIDEO:t.Z.AUDIO,at=P.getCurrentDVRInfo(Fe);return at?ae+(at.manifestInfo.availableFrom.getTime()/1e3+at.range.start):0}function Re(){var ae=arguments.length>0&&arguments[0]!==void 0?arguments[0]:NaN;se&&se.resetRecords(),!b&&c&&(b=!0,r.info("Streaming Initialized"),Gt(),typeof c=="string"?L.load(c,ae):L.loadWithManifest(c,ae)),!h&&Ze()&&(h=!0,r.info("Playback Initialized"))}return o={initialize:function(ae,Fe,at){var Rt=arguments.length>3&&arguments[3]!==void 0?arguments[3]:NaN;m||(m=(0,Ma.Z)(ke).getInstance()).setConfig({settings:pe}),Q||(Q=is(ke).getInstance()),m.supportsMediaSource()?(I||(I=!0,C=Hs(ke).getInstance(),H||(H=hs(ke).getInstance()).setConfig({settings:pe}),B||(B=kn(ke).getInstance()),z||(z=d(ke).getInstance()),j||(j=Ro(ke).getInstance()),L||(L=sa(ke).getInstance()),R||(R=To(ke).getInstance()),X||(X=So(ke).getInstance()),K||(K=Ao(ke).getInstance()),te||(te=Tr(ke).getInstance()),x||(x=as(ke).getInstance()),ce=Cs(ke).getInstance(),le=us(ke).getInstance(),ye=Tt(ke).getInstance(),Pe=Gr(ke).getInstance(),P=js(ke).getInstance({settings:pe}),Ie=Es(ke).getInstance({settings:pe}),ce.setConfig({constants:t.Z,cea608parser:T(),errHandler:Q,BASE64:$i}),re||(re=Mo(ke).create()),re.setConfig({adapter:ce,contentSteeringController:te}),K.setConfig({adapter:ce}),st||(st=Ss(ke).getInstance({dashMetrics:P,mediaPlayerModel:Y,errHandler:Q,baseURLController:re,events:u.Z,eventBus:me,debug:De,boxParser:(0,Hr.Z)(ke).getInstance(),requestModifier:(0,he.Z)(ke).getInstance(),errors:oe})),j.setConfig({domStorage:Ie,settings:pe,customParametersModel:ue}),Y.setConfig({playbackController:z,serviceDescriptionController:K}),te.setConfig({adapter:ce,errHandler:Q,dashMetrics:P,mediaPlayerModel:Y,manifestModel:le,serviceDescriptionController:K,eventBus:me,requestModifier:(0,he.Z)(ke).getInstance()}),Wt(),Vt(at===void 0||at),ht()),ae&&fn(ae),Fe&&cn(Fe,Rt),r.info("[dash.js "+mt()+"] MediaPlayer has been initialized")):Q.error(new U.Z(oe.CAPABILITY_MEDIASOURCE_ERROR_CODE,oe.CAPABILITY_MEDIASOURCE_ERROR_MESSAGE))},setConfig:function(ae){ae&&(ae.capabilities&&(m=ae.capabilities),ae.capabilitiesFilter&&(x=ae.capabilitiesFilter),ae.streamController&&(L=ae.streamController),ae.textController&&(N=ae.textController),ae.gapController&&(R=ae.gapController),ae.playbackController&&(z=ae.playbackController),ae.serviceDescriptionController&&(K=ae.serviceDescriptionController),ae.contentSteeringController&&(te=ae.contentSteeringController),ae.catchupController&&(X=ae.catchupController),ae.mediaPlayerModel&&(Y=ae.mediaPlayerModel),ae.customParametersModel&&(ue=ae.customParametersModel),ae.abrController&&(H=ae.abrController),ae.schemeLoaderFactory&&(B=ae.schemeLoaderFactory),ae.mediaController&&(j=ae.mediaController),ae.settings&&(pe=ae.settings))},on:function(ae,Fe,at,Rt){me.on(ae,Fe,at,Rt)},off:function(ae,Fe,at){me.off(ae,Fe,at)},extend:function(ae,Fe,at){g.Z.extend(ae,Fe,at,ke)},attachView:fn,attachSource:cn,isReady:Ze,preload:function(){if(!be.getElement()&&!b){if(!c)throw Ot;Re(G)}},play:function(){if(!h)throw rt;(!w||dt()&&h)&&z.play(!0)},isPaused:dt,pause:function(){if(!h)throw rt;z.pause()},isSeeking:function(){if(!h)throw rt;return z.isSeeking()},isDynamic:Pt,getLowLatencyModeEnabled:function(){if(!h)throw rt;return z.getLowLatencyModeEnabled()},seek:function(ae){if(!h)throw rt;if((0,W.PS)(ae,"number"),isNaN(ae))throw t.Z.BAD_ARGUMENT_ERROR;ae<0&&(ae=0);var Fe=z.getIsDynamic()?zt(ae):ae,at=en();!z.getIsDynamic()&&at.duration&&(Fe=Math.min(at.duration,Fe)),z.seek(Fe,!1,!1,!0)},seekToOriginalLive:function(){h&&Pt()&&z.seekToOriginalLive()},setPlaybackRate:function(ae){en().playbackRate=ae},getPlaybackRate:function(){return en().playbackRate},setMute:function(ae){(0,W.PS)(ae,"boolean"),en().muted=ae},isMuted:function(){return en().muted},setVolume:function(ae){if(typeof ae!="number"||isNaN(ae)||ae<0||ae>1)throw t.Z.BAD_ARGUMENT_ERROR;en().volume=ae},getVolume:function(){return en().volume},time:Yt,duration:jt,timeAsUTC:function(){if(!h)throw rt;return Yt()<0?NaN:je(Yt())},durationAsUTC:function(){if(!h)throw rt;return je(jt())},getActiveStream:lt,getDVRWindowSize:function(){var ae=L&&L.hasVideoTrack()?t.Z.VIDEO:t.Z.AUDIO,Fe=P.getCurrentDVRInfo(ae);return Fe?Fe.manifestInfo.dvrWindowSize:0},getDVRSeekOffset:zt,getAvailableBaseUrls:function(){var ae=le.getValue();return ae?re.getBaseUrls(ae):[]},getAvailableLocations:function(){var ae=le.getValue();if(!ae)return[];var Fe=ce.getLocation(ae),at=te.getSynthesizedLocationElements(Fe);return Fe.concat(at)},getTargetLiveDelay:function(){if(!h)throw rt;return z.getOriginalLiveDelay()},convertToTimeCode:function(ae){ae=Math.max(ae,0);var Fe=Math.floor(ae/3600),at=Math.floor(ae%3600/60),Rt=Math.floor(ae%3600%60);return(Fe===0?"":Fe<10?"0"+Fe.toString()+":":Fe.toString()+":")+(at<10?"0"+at.toString():at.toString())+":"+(Rt<10?"0"+Rt.toString():Rt.toString())},formatUTC:function(ae,Fe,at){var Rt=arguments.length>3&&arguments[3]!==void 0&&arguments[3],xt=new Date(1e3*ae),an=xt.toLocaleDateString(Fe),Rn=xt.toLocaleTimeString(Fe,{hour12:at});return Rt?Rn+" "+an:Rn},getVersion:mt,getDebug:function(){return De},getBufferLength:function(ae){var Fe=[t.Z.VIDEO,t.Z.AUDIO,t.Z.TEXT];if(ae)return Fe.indexOf(ae)!==-1?Xt().getCurrentBufferLevel(ae)||NaN:(r.warn("getBufferLength requested for invalid type"),NaN);var at=Fe.map(function(Rt){return on(Rt).length>0?Xt().getCurrentBufferLevel(Rt):Number.MAX_VALUE}).reduce(function(Rt,xt){return Math.min(Rt,xt)});return at===Number.MAX_VALUE?NaN:at},getTTMLRenderingDiv:function(){return be?be.getTTMLRenderingDiv():null},getVideoElement:en,getSource:function(){if(!c)throw Ot;return c},updateSource:function(ae){c=ae,L.load(c)},getCurrentLiveLatency:function(){if(!I)throw Te;return h?z.getCurrentLiveLatency():NaN},getTopBitrateInfoFor:function(ae){if(!b)throw ut;return H.getTopBitrateInfoFor(ae)},setAutoPlay:Vt,getAutoPlay:function(){return w},getDashMetrics:Xt,getQualityFor:function(ae){if(!b)throw ut;if(ae===t.Z.IMAGE){var Fe=lt();if(!Fe)return-1;var at=Fe.getThumbnailController();return at?at.getCurrentTrackIndex():-1}return H.getQualityFor(ae)},setQualityFor:function(ae,Fe){var at=arguments.length>2&&arguments[2]!==void 0&&arguments[2];if(!b)throw ut;if(ae===t.Z.IMAGE){var Rt=lt();if(!Rt)return;var xt=Rt.getThumbnailController();xt&&xt.setTrackByIndex(Fe)}H.setPlaybackQuality(ae,L.getActiveStreamInfo(),Fe,{forceReplace:at})},updatePortalSize:function(){H.setElementSize(),H.setWindowResizeEventCalled(!0)},enableText:function(ae){var Fe=L.getActiveStreamInfo();return!(!Fe||!N)&&N.enableText(Fe.id,ae)},enableForcedTextStreaming:function(ae){return!(!L.getActiveStreamInfo()||!N)&&N.enableForcedTextStreaming(ae)},isTextEnabled:function(){var ae=L.getActiveStreamInfo();return!(!ae||!N)&&N.isTextEnabled(ae)},setTextTrack:function(ae){if(!h)throw rt;var Fe=L.getActiveStreamInfo();Fe&&N&&N.setTextTrack(Fe.id,ae)},getBitrateInfoListFor:function(ae){if(!b)throw ut;var Fe=lt();return Fe?Fe.getBitrateListFor(ae):[]},getStreamsFromManifest:function(ae){if(!b)throw ut;return ce.getStreamsInfo(ae)},getTracksFor:on,getTracksForTypeFromManifest:function(ae,Fe,at){if(!b)throw ut;return(at=at||ce.getStreamsInfo(Fe,1)[0])?ce.getAllMediaInfoForType(at,ae,Fe):[]},getCurrentTrackFor:function(ae){if(!b)throw ut;var Fe=L.getActiveStreamInfo();return j.getCurrentTrackFor(ae,Fe.id)},setInitialMediaSettingsFor:function(ae,Fe){if(!I)throw Te;j.setInitialSettings(ae,Fe)},getInitialMediaSettingsFor:function(ae){if(!I)throw Te;return j.getInitialSettings(ae)},setCurrentTrack:function(ae){var Fe=arguments.length>1&&arguments[1]!==void 0&&arguments[1];if(!b)throw ut;j.setTrack(ae,Fe)},addABRCustomRule:function(ae,Fe,at){ue.addAbrCustomRule(ae,Fe,at)},removeABRCustomRule:function(ae){ue.removeAbrCustomRule(ae)},removeAllABRCustomRule:function(){ue.removeAllAbrCustomRule()},getABRCustomRules:function(){return ue.getAbrCustomRules()},getAverageThroughput:function(ae){var Fe=H.getThroughputHistory(),at=z.getIsDynamic();return Fe?Fe.getAverageThroughput(ae,at):0},retrieveManifest:function(ae,Fe){var at=kt(),Rt=this;me.on(u.Z.INTERNAL_MANIFEST_LOADED,function xt(an){an.error?Fe(null,an.error):Fe(an.manifest),me.off(u.Z.INTERNAL_MANIFEST_LOADED,xt,Rt),at.reset()},Rt),Ae.initialize(ae),at.load(ae)},addUTCTimingSource:function(ae,Fe){ue.addUTCTimingSource(ae,Fe)},removeUTCTimingSource:function(ae,Fe){ue.removeUTCTimingSource(ae,Fe)},clearDefaultUTCTimingSources:function(){ue.clearDefaultUTCTimingSources()},restoreDefaultUTCTimingSources:Wt,setXHRWithCredentialsForType:function(ae,Fe){ue.setXHRWithCredentialsForType(ae,Fe)},getXHRWithCredentialsForType:function(ae){return ue.getXHRWithCredentialsForType(ae)},getProtectionController:function(){return ze()},attachProtectionController:function(ae){q=ae},setProtectionData:function(ae){_=ae,L&&L.setProtectionData(_)},registerLicenseRequestFilter:function(ae){ue.registerLicenseRequestFilter(ae)},registerLicenseResponseFilter:function(ae){ue.registerLicenseResponseFilter(ae)},unregisterLicenseRequestFilter:function(ae){ue.unregisterLicenseRequestFilter(ae)},unregisterLicenseResponseFilter:function(ae){ue.unregisterLicenseResponseFilter(ae)},registerCustomCapabilitiesFilter:function(ae){ue.registerCustomCapabilitiesFilter(ae)},unregisterCustomCapabilitiesFilter:function(ae){ue.unregisterCustomCapabilitiesFilter(ae)},setCustomInitialTrackSelectionFunction:function(ae){ue.setCustomInitialTrackSelectionFunction(ae)},resetCustomInitialTrackSelectionFunction:function(){ue.resetCustomInitialTrackSelectionFunction(null)},attachTTMLRenderingDiv:function(ae){if(!be.getElement())throw nt;be.setTTMLRenderingDiv(ae)},attachVttRenderingDiv:function(ae){if(!be.getElement())throw nt;be.setVttRenderingDiv(ae)},getCurrentTextTrackIndex:function(){var ae=L.getActiveStreamInfo();if(ae&&N)return N.getCurrentTrackIdx(ae.id)},provideThumbnail:function(ae,Fe){if(typeof Fe=="function")if(ae<0)Fe(null);else{var at=z.getIsDynamic()?zt(ae):ae,Rt=L.getStreamForTime(at);if(Rt!==null){var xt=Rt.getThumbnailController();if(xt)return xt.provide(at,Fe);Fe(null)}else Fe(null)}},getDashAdapter:function(){return ce},getOfflineController:function(){return ht()},triggerSteeringRequest:function(){if(te)return te.loadSteeringData()},getCurrentSteeringResponseData:function(){if(te)return te.getCurrentSteeringResponseData()},getSettings:function(){return pe.get()},updateSettings:function(ae){pe.update(ae)},resetSettings:function(){pe.reset()},reset:xe,destroy:function(){xe(),g.Z.deleteSingletonInstances(ke)}},r=De.getLogger(o),I=!1,h=!1,b=!1,w=!0,G=NaN,q=null,se=null,_=null,ce=null,st=null,u.Z.extend(n.Z),Y=ls(ke).getInstance(),ue=(0,bt.Z)(ke).getInstance(),be=ps(ke).getInstance(),Ae=ss(ke).getInstance(),o}ra.__dashjs_factory_name="MediaPlayer";var bi=g.Z.getClassFactory(ra);bi.events=n.Z,bi.errors=oe,g.Z.updateClassFactory(ra.__dashjs_factory_name,bi);var ru=bi},8825:function($e,we,O){function ie(y){return ie=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(u){return typeof u}:function(u){return u&&typeof Symbol=="function"&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u},ie(y)}function T(y,u){return T=Object.setPrototypeOf||function(g,E){return g.__proto__=E,g},T(y,u)}function t(y,u){return!u||ie(u)!=="object"&&typeof u!="function"?function(g){if(g===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g}(y):u}function e(y){return e=Object.setPrototypeOf?Object.getPrototypeOf:function(u){return u.__proto__||Object.getPrototypeOf(u)},e(y)}var p=new(function(y){(function(l,d){if(typeof d!="function"&&d!==null)throw new TypeError("Super expression must either be null or a function");l.prototype=Object.create(d&&d.prototype,{constructor:{value:l,writable:!0,configurable:!0}}),d&&T(l,d)})(n,y);var u,g,E=(u=n,g=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var l,d=e(u);if(g){var D=e(this).constructor;l=Reflect.construct(d,arguments,D)}else l=d.apply(this,arguments);return t(this,l)});function n(){var l;return function(d,D){if(!(d instanceof D))throw new TypeError("Cannot call a class as a function")}(this,n),(l=E.call(this)).AST_IN_FUTURE="astInFuture",l.BASE_URLS_UPDATED="baseUrlsUpdated",l.BUFFER_EMPTY="bufferStalled",l.BUFFER_LOADED="bufferLoaded",l.BUFFER_LEVEL_STATE_CHANGED="bufferStateChanged",l.BUFFER_LEVEL_UPDATED="bufferLevelUpdated",l.DYNAMIC_TO_STATIC="dynamicToStatic",l.ERROR="error",l.FRAGMENT_LOADING_COMPLETED="fragmentLoadingCompleted",l.FRAGMENT_LOADING_PROGRESS="fragmentLoadingProgress",l.FRAGMENT_LOADING_STARTED="fragmentLoadingStarted",l.FRAGMENT_LOADING_ABANDONED="fragmentLoadingAbandoned",l.LOG="log",l.MANIFEST_LOADING_STARTED="manifestLoadingStarted",l.MANIFEST_LOADING_FINISHED="manifestLoadingFinished",l.MANIFEST_LOADED="manifestLoaded",l.METRICS_CHANGED="metricsChanged",l.METRIC_CHANGED="metricChanged",l.METRIC_ADDED="metricAdded",l.METRIC_UPDATED="metricUpdated",l.PERIOD_SWITCH_STARTED="periodSwitchStarted",l.PERIOD_SWITCH_COMPLETED="periodSwitchCompleted",l.QUALITY_CHANGE_REQUESTED="qualityChangeRequested",l.QUALITY_CHANGE_RENDERED="qualityChangeRendered",l.TRACK_CHANGE_RENDERED="trackChangeRendered",l.STREAM_INITIALIZING="streamInitializing",l.STREAM_UPDATED="streamUpdated",l.STREAM_ACTIVATED="streamActivated",l.STREAM_DEACTIVATED="streamDeactivated",l.STREAM_INITIALIZED="streamInitialized",l.STREAM_TEARDOWN_COMPLETE="streamTeardownComplete",l.TEXT_TRACKS_ADDED="allTextTracksAdded",l.TEXT_TRACK_ADDED="textTrackAdded",l.THROUGHPUT_MEASUREMENT_STORED="throughputMeasurementStored",l.TTML_PARSED="ttmlParsed",l.TTML_TO_PARSE="ttmlToParse",l.CAPTION_RENDERED="captionRendered",l.CAPTION_CONTAINER_RESIZE="captionContainerResize",l.CAN_PLAY="canPlay",l.CAN_PLAY_THROUGH="canPlayThrough",l.PLAYBACK_ENDED="playbackEnded",l.PLAYBACK_ERROR="playbackError",l.PLAYBACK_NOT_ALLOWED="playbackNotAllowed",l.PLAYBACK_METADATA_LOADED="playbackMetaDataLoaded",l.PLAYBACK_LOADED_DATA="playbackLoadedData",l.PLAYBACK_PAUSED="playbackPaused",l.PLAYBACK_PLAYING="playbackPlaying",l.PLAYBACK_PROGRESS="playbackProgress",l.PLAYBACK_RATE_CHANGED="playbackRateChanged",l.PLAYBACK_SEEKED="playbackSeeked",l.PLAYBACK_SEEKING="playbackSeeking",l.PLAYBACK_STALLED="playbackStalled",l.PLAYBACK_STARTED="playbackStarted",l.PLAYBACK_TIME_UPDATED="playbackTimeUpdated",l.PLAYBACK_VOLUME_CHANGED="playbackVolumeChanged",l.PLAYBACK_WAITING="playbackWaiting",l.MANIFEST_VALIDITY_CHANGED="manifestValidityChanged",l.EVENT_MODE_ON_START="eventModeOnStart",l.EVENT_MODE_ON_RECEIVE="eventModeOnReceive",l.CONFORMANCE_VIOLATION="conformanceViolation",l.REPRESENTATION_SWITCH="representationSwitch",l.ADAPTATION_SET_REMOVED_NO_CAPABILITIES="adaptationSetRemovedNoCapabilities",l.CONTENT_STEERING_REQUEST_COMPLETED="contentSteeringRequestCompleted",l.INBAND_PRFT="inbandPrft",l}return n}(O(8342).Z));we.Z=p},3393:function($e,we){function O(T,t){for(var e=0;e=400||Ut.responsecode<100||Ut.responsecode>=600)&&Ne({errorcode:Ut.responsecode||T.CONNECTION_ERROR,url:Ut.url,terror:Ut.tresponse,servicelocation:Ut._serviceLocation})}function Dt(Mt){var Ut;switch(Mt.error?Mt.error.code:0){case MediaError.MEDIA_ERR_NETWORK:Ut=T.CONNECTION_ERROR;break;case MediaError.MEDIA_ERR_DECODE:Ut=T.CORRUPT_MEDIA_OTHER;break;default:return}Ne({errorcode:Ut})}return W={initialize:function(){he.on(Se.MANIFEST_UPDATED,Ke,W),he.on(Se.SERVICE_LOCATION_BASE_URL_BLACKLIST_CHANGED,We,W),he.on(Se.METRIC_ADDED,tt,W),he.on(Se.METRIC_UPDATED,tt,W),he.on(Se.PLAYBACK_ERROR,Dt,W),he.on(t.Z.BECAME_REPORTING_PLAYER,At,W)},reset:function(){he.off(Se.MANIFEST_UPDATED,Ke,W),he.off(Se.SERVICE_LOCATION_BASE_URL_BLACKLIST_CHANGED,We,W),he.off(Se.METRIC_ADDED,tt,W),he.off(Se.METRIC_UPDATED,tt,W),he.off(Se.PLAYBACK_ERROR,Dt,W),he.off(t.Z.BECAME_REPORTING_PLAYER,At,W)}}}e.__dashjs_factory_name="DVBErrorsTranslator";var p=dashjs.FactoryMaker.getSingletonFactory(e),y=O(2295);function u(S){S=S||{};var W,V,he=!1,Me=this.context,Oe=S.mediaElement;return W={initialize:function(Se){Se&&Se.length&&(Se.forEach(function(Ne){var Ke=Ne.starttime,We=Ke+Ne.duration;V.add(Ke,We)}),he=!!Se[0]._useWallClockTime)},reset:function(){V.clear()},isEnabled:function(){var Se,Ne=V.length;if(!Ne)return!0;Se=he?new Date().getTime()/1e3:Oe.currentTime;for(var Ke=0;Ke=200&&An.status<300)&&vn&&vn())};At.push(An);try{An.open("GET",_n),An.onloadend=Bn,An.onerror=Bn,An.send()}catch{An.onerror()}}(mn="".concat(Ne,"?").concat(mn),0,function(){Se=!1})})},initialize:function(Mt,Ut){var ln;if(Ke=Ut,!(Ne=Mt.dvb_reportingUrl))throw new Error("required parameter missing (dvb:reportingUrl)");Oe||((ln=Mt.dvb_probability)&&(ln===1e3||ln/1e3>=Me.random())&&(Se=!0),Oe=!0)},reset:function(){Dt()}},V=n(We).getInstance(),Me=d(We).getInstance(),he=(0,D.Z)(We).getInstance(),Dt(),W}Z.__dashjs_factory_name="DVBReporting";var k=dashjs.FactoryMaker.getClassFactory(Z);function F(S){S=S||{};var W,V={"urn:dvb:dash:reporting:2014":k},he=this.context,Me=S.debug?S.debug.getLogger(W):{},Oe=S.metricsConstants,Se=S.mediaPlayerModel||{};return{create:function(Ne,Ke){var We;try{(We=V[Ne.schemeIdUri](he).create({metricsConstants:Oe,mediaPlayerModel:Se})).initialize(Ne,Ke)}catch(At){We=null,Me.error("ReportingFactory: could not create Reporting with schemeIdUri ".concat(Ne.schemeIdUri," (").concat(At.message,")"))}return We},register:function(Ne,Ke){V[Ne]=Ke},unregister:function(Ne){delete V[Ne]}}}F.__dashjs_factory_name="ReportingFactory";var ee=dashjs.FactoryMaker.getSingletonFactory(F);function M(S){var W=[],V=ee(this.context).getInstance(S);return{initialize:function(he,Me){he.some(function(Oe){var Se=V.create(Oe,Me);if(Se)return W.push(Se),!0})},reset:function(){W.forEach(function(he){return he.reset()}),W=[]},report:function(he,Me){W.forEach(function(Oe){return Oe.report(he,Me)})}}}M.__dashjs_factory_name="ReportingController";var A=dashjs.FactoryMaker.getClassFactory(M);function U(){return{reconstructFullMetricName:function(S,W,V){var he=S;return W&&(he+="("+W,V&&V.length&&(he+=","+V),he+=")"),he},validateN:function(S){if(!S)throw new Error("missing n");if(isNaN(S))throw new Error("n is NaN");if(S<0)throw new Error("n must be positive");return S}}}U.__dashjs_factory_name="HandlerHelpers";var J=dashjs.FactoryMaker.getSingletonFactory(U);function $(S){var W,V,he,Me,Oe;S=S||{};var Se=this.context,Ne=J(Se).getInstance(),Ke=[],We=S.metricsConstants;function At(){var tt=function(){try{return Object.keys(Ke).map(function(Dt){return Ke[Dt]}).reduce(function(Dt,Mt){return Dt.level"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var l,d=e(u);if(g){var D=e(this).constructor;l=Reflect.construct(d,arguments,D)}else l=d.apply(this,arguments);return t(this,l)});function n(){var l;return function(d,D){if(!(d instanceof D))throw new TypeError("Cannot call a class as a function")}(this,n),(l=E.call(this)).METRICS_INITIALISATION_COMPLETE="internal_metricsReportingInitialized",l.BECAME_REPORTING_PLAYER="internal_becameReportingPlayer",l.CMCD_DATA_GENERATED="cmcdDataGenerated",l}return n}(O(8342).Z));we.Z=p},5717:function($e,we,O){var ie=O(2610),T=O(5448),t=O(1264),e=O(3106),p=O(1767),y=O(3393);function u(){var g,E,n,l,d,D,Z,k,F=this.context,ee=(0,t.Z)(F).getInstance();function M(){l=[],d=[],D=[],k=[],Z=null,E=[]}function A(Ee,Je){var oe=-1;Ee.some(function(Ce,He){if(Ce===Je)return oe=He,!0}),oe<0||Ee.splice(oe,1)}function U(Ee){var Je;for(Je=0;Je0&&(ot+=4+16*Qe.getUint32(ot)),ot+=4,Ye.slice(ot)}},{key:"getPSSHForKeySystem",value:function(Ye,ot){var Qe=_t.parsePSSHList(ot);return Ye&&Qe.hasOwnProperty(Ye.uuid.toLowerCase())?Qe[Ye.uuid.toLowerCase()]:null}},{key:"parseInitDataFromContentProtection",value:function(Ye,ot){return"pssh"in Ye?(Ye.pssh.__text=Ye.pssh.__text.replace(/\r?\n|\r/g,"").replace(/\s+/g,""),ot.decodeArray(Ye.pssh.__text).buffer):null}},{key:"parsePSSHList",value:function(Ye){if(Ye==null)return[];for(var ot=new DataView(Ye.buffer||Ye),Qe={},it=0;;){var It,wt,Bt=void 0,qt=it;if(it>=ot.buffer.byteLength)break;if(It=it+ot.getUint32(it),it+=4,ot.getUint32(it)===1886614376)if(it+=4,(wt=ot.getUint8(it))===0||wt===1){it++,it+=3,Bt="";var Ct=void 0,gt=void 0;for(Ct=0;Ct<4;Ct++)Bt+=(gt=ot.getUint8(it+Ct).toString(16)).length===1?"0"+gt:gt;for(it+=4,Bt+="-",Ct=0;Ct<2;Ct++)Bt+=(gt=ot.getUint8(it+Ct).toString(16)).length===1?"0"+gt:gt;for(it+=2,Bt+="-",Ct=0;Ct<2;Ct++)Bt+=(gt=ot.getUint8(it+Ct).toString(16)).length===1?"0"+gt:gt;for(it+=2,Bt+="-",Ct=0;Ct<2;Ct++)Bt+=(gt=ot.getUint8(it+Ct).toString(16)).length===1?"0"+gt:gt;for(it+=2,Bt+="-",Ct=0;Ct<6;Ct++)Bt+=(gt=ot.getUint8(it+Ct).toString(16)).length===1?"0"+gt:gt;it+=6,it+=4,Qe[Bt=Bt.toLowerCase()]=ot.buffer.slice(qt,It),it=It}else it=It;else it=It}return Qe}},{key:"getLicenseServerUrlFromMediaInfo",value:function(Ye,ot){try{if(!Ye||Ye.length===0)return null;for(var Qe=0,it=null;Qe0){var wt=It.contentProtection.filter(function($t){return $t.schemeIdUri&&$t.schemeIdUri===ot});if(wt&&wt.length>0)for(var Bt=0;Bt"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var Qe,it=E(pt);if(yt){var It=E(this).constructor;Qe=Reflect.construct(it,arguments,It)}else Qe=it.apply(this,arguments);return g(this,Qe)});function ot(){var Qe;return function(it,It){if(!(it instanceof It))throw new TypeError("Cannot call a class as a function")}(this,ot),(Qe=Ye.call(this)).MEDIA_KEYERR_CODE=100,Qe.MEDIA_KEYERR_UNKNOWN_CODE=101,Qe.MEDIA_KEYERR_CLIENT_CODE=102,Qe.MEDIA_KEYERR_SERVICE_CODE=103,Qe.MEDIA_KEYERR_OUTPUT_CODE=104,Qe.MEDIA_KEYERR_HARDWARECHANGE_CODE=105,Qe.MEDIA_KEYERR_DOMAIN_CODE=106,Qe.MEDIA_KEY_MESSAGE_ERROR_CODE=107,Qe.MEDIA_KEY_MESSAGE_NO_CHALLENGE_ERROR_CODE=108,Qe.SERVER_CERTIFICATE_UPDATED_ERROR_CODE=109,Qe.KEY_STATUS_CHANGED_EXPIRED_ERROR_CODE=110,Qe.MEDIA_KEY_MESSAGE_NO_LICENSE_SERVER_URL_ERROR_CODE=111,Qe.KEY_SYSTEM_ACCESS_DENIED_ERROR_CODE=112,Qe.KEY_SESSION_CREATED_ERROR_CODE=113,Qe.MEDIA_KEY_MESSAGE_LICENSER_ERROR_CODE=114,Qe.MEDIA_KEYERR_UNKNOWN_MESSAGE="An unspecified error occurred. This value is used for errors that don't match any of the other codes.",Qe.MEDIA_KEYERR_CLIENT_MESSAGE="The Key System could not be installed or updated.",Qe.MEDIA_KEYERR_SERVICE_MESSAGE="The message passed into update indicated an error from the license service.",Qe.MEDIA_KEYERR_OUTPUT_MESSAGE="There is no available output device with the required characteristics for the content protection system.",Qe.MEDIA_KEYERR_HARDWARECHANGE_MESSAGE="A hardware configuration change caused a content protection error.",Qe.MEDIA_KEYERR_DOMAIN_MESSAGE="An error occurred in a multi-device domain licensing configuration. The most common error is a failure to join the domain.",Qe.MEDIA_KEY_MESSAGE_ERROR_MESSAGE="Multiple key sessions were creates with a user-agent that does not support sessionIDs!! Unpredictable behavior ahead!",Qe.MEDIA_KEY_MESSAGE_NO_CHALLENGE_ERROR_MESSAGE="DRM: Empty key message from CDM",Qe.SERVER_CERTIFICATE_UPDATED_ERROR_MESSAGE="Error updating server certificate -- ",Qe.KEY_STATUS_CHANGED_EXPIRED_ERROR_MESSAGE="DRM: KeyStatusChange error! -- License has expired",Qe.MEDIA_KEY_MESSAGE_NO_LICENSE_SERVER_URL_ERROR_MESSAGE="DRM: No license server URL specified!",Qe.KEY_SYSTEM_ACCESS_DENIED_ERROR_MESSAGE="DRM: KeySystem Access Denied! -- ",Qe.KEY_SESSION_CREATED_ERROR_MESSAGE="DRM: unable to create session! --",Qe.MEDIA_KEY_MESSAGE_LICENSER_ERROR_MESSAGE="DRM: licenser error! --",Qe}return ot}(O(2230).Z)),l=O(5459),d=function _t(pt,yt,Ye,ot,Qe,it,It,wt){(function(Bt,qt){if(!(Bt instanceof qt))throw new TypeError("Cannot call a class as a function")})(this,_t),this.url=pt,this.method=yt,this.responseType=Ye,this.headers=ot,this.withCredentials=Qe,this.messageType=it,this.sessionId=It,this.data=wt},D=function _t(pt,yt,Ye){(function(ot,Qe){if(!(ot instanceof Qe))throw new TypeError("Cannot call a class as a function")})(this,_t),this.url=pt,this.headers=yt,this.data=Ye},Z=O(7855),k=O(703),F=O(3393),ee=O(5448);function M(_t){return M=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(pt){return typeof pt}:function(pt){return pt&&typeof Symbol=="function"&&pt.constructor===Symbol&&pt!==Symbol.prototype?"symbol":typeof pt},M(_t)}function A(_t){var pt,yt,Ye,ot,Qe,it,It,wt,Bt,qt,Ct,gt=(_t=_t||{}).protectionKeyController,Ft=_t.protectionModel,Lt=_t.eventBus,$t=_t.events,sn=_t.debug,En=_t.BASE64,Qt=_t.constants,Et=[],Tt=_t.cmcdModel,Nt=_t.settings,Jt=_t.customParametersModel;function nn(){if(!(Lt&&Lt.hasOwnProperty("on")&>&>.hasOwnProperty("getSupportedKeySystemsFromContentProtection")))throw new Error("Missing config parameter(s)")}function hn(bt,Kt){wt||Bt?wt&&yn():function(un,Pn){if(!Bt){Bt=!0;var On,kn=[];un=un.sort(function(Ln,In){return(Qe&&Qe[Ln.ks.systemString]&&Qe[Ln.ks.systemString].priority>=0?Qe[Ln.ks.systemString].priority:un.length)-(Qe&&Qe[In.ks.systemString]&&Qe[In.ks.systemString].priority>=0?Qe[In.ks.systemString].priority:un.length)});for(var Tn=0;Tn0&&Ft.setServerCertificate(En.decodeArray(In.serverCertificate).buffer),yn()}}).catch(function(Ln){wt=null,Bt=!1,Pn||Lt.trigger($t.KEY_SYSTEM_SELECTED,{data:null,error:new l.Z(n.KEY_SYSTEM_ACCESS_DENIED_ERROR_CODE,n.KEY_SYSTEM_ACCESS_DENIED_ERROR_MESSAGE+"Error selecting key system! -- "+Ln.error)})})}}(bt,Kt)}function yn(){for(var bt,Kt=0;Kt0?Kt.audioRobustness:It,kn=Kt&&Kt.videoRobustness&&Kt.videoRobustness.length>0?Kt.videoRobustness:It,Tn=bt.sessionType,Kn=Kt&&Kt.distinctiveIdentifier?Kt.distinctiveIdentifier:"optional",Ln=Kt&&Kt.persistentState?Kt.persistentState:Tn==="temporary"?"optional":"required";return ot.forEach(function(In){In.type===Qt.AUDIO?un.push(new e(In.codec,On)):In.type===Qt.VIDEO&&Pn.push(new e(In.codec,kn))}),new p(un,Pn,Kn,Ln,[Tn])}function Er(bt){bt.error?Lt.trigger($t.KEY_STATUSES_CHANGED,{data:null,error:bt.error}):yt.debug("DRM: key status = "+bt.status)}function ar(bt){yt.debug("DRM: onKeyMessage");var Kt=bt.data;Lt.trigger($t.KEY_MESSAGE,{data:Kt});var un=Kt.messageType?Kt.messageType:"license-request",Pn=Kt.message,On=Kt.sessionToken,kn=Fn(wt),Tn=gt.getLicenseServerModelInstance(wt,kn,un),Kn={sessionToken:On,messageType:un};if(Pn&&Pn.byteLength!==0){if(!Tn)return yt.debug("DRM: License server request not required for this message (type = "+bt.data.messageType+"). Session ID = "+On.getSessionId()),void Qn(Kn);if(gt.isClearKey(wt)){var Ln=gt.processClearKeyLicenseRequest(wt,kn,Pn);if(Ln&&Ln.keyPairs&&Ln.keyPairs.length>0)return yt.debug("DRM: ClearKey license request handled by application!"),Qn(Kn),void Ft.updateKeySession(On,Ln)}(function(In,sr,zn){var fr=In.sessionToken,tr=In.messageType?In.messageType:"license-request",vr={sessionToken:fr,messageType:tr},dr=wt?wt.systemString:null,ni=function(Nn,_r,Tr,Sr,Ci){var ur=null,li=Sr.message;if(Nn&&Nn.serverURL){var cr=Nn.serverURL;typeof cr=="string"&&cr!==""?ur=cr:M(cr)==="object"&&cr.hasOwnProperty(_r)&&(ur=cr[_r])}else if(Nn&&Nn.laURL&&Nn.laURL!=="")ur=Nn.laURL;else if(!(ur=t.getLicenseServerUrlFromMediaInfo(ot,wt.schemeIdURI))&&!gt.isClearKey(wt)){var Kr=t.getPSSHData(Tr.initData);(ur=wt.getLicenseServerURLFromInitData(Kr))||(ur=Sr.laURL)}return ur=Ci.getServerURLFromMessage(ur,li,_r)}(zn,tr,fr,In,sr);if(ni){var Nr={},jr=!1;zn&&Br(Nr,zn.httpRequestHeaders);var ri=In.message;Br(Nr,wt.getRequestHeadersFromMessage(ri)),Object.keys(Nr).forEach(function(Nn){Nn.toLowerCase()==="authorization"&&(jr=!0)}),zn&&typeof zn.withCredentials=="boolean"&&(jr=zn.withCredentials);var ii=function(Nn){if(Ft)if(Nn.status>=200&&Nn.status<=299){var _r=k.Z.parseHttpHeaders(Nn.getAllResponseHeaders?Nn.getAllResponseHeaders():null),Tr=new D(Nn.responseURL,_r,Nn.response);qr(Jt.getLicenseResponseFilters(),Tr).then(function(){var Sr=sr.getLicenseMessage(Tr.data,dr,tr);Sr!==null?(Qn(vr),Ft.updateKeySession(fr,Sr)):Gr(Nn,vr,dr,tr,sr)})}else Gr(Nn,vr,dr,tr,sr)},ai=function(Nn){Qn(vr,new l.Z(n.MEDIA_KEY_MESSAGE_LICENSER_ERROR_CODE,n.MEDIA_KEY_MESSAGE_LICENSER_ERROR_MESSAGE+dr+' update, XHR aborted. status is "'+Nn.statusText+'" ('+Nn.status+"), readyState is "+Nn.readyState))},Ri=function(Nn){Qn(vr,new l.Z(n.MEDIA_KEY_MESSAGE_LICENSER_ERROR_CODE,n.MEDIA_KEY_MESSAGE_LICENSER_ERROR_MESSAGE+dr+' update, XHR error. status is "'+Nn.statusText+'" ('+Nn.status+"), readyState is "+Nn.readyState))},Hr=wt.getLicenseRequestFromMessage(ri),oi=sr.getHTTPMethod(tr),Vr=sr.getResponseType(dr,tr),wi=zn&&!isNaN(zn.httpTimeout)?zn.httpTimeout:8e3,si=fr.getSessionId()||null,ui=new d(ni,oi,Vr,Nr,jr,tr,si,Hr),Ni=isNaN(Nt.get().streaming.retryAttempts[Z.w.LICENSE])?3:Nt.get().streaming.retryAttempts[Z.w.LICENSE];qr(Jt.getLicenseRequestFilters(),ui).then(function(){ei(ui,Ni,wi,ii,ai,Ri)})}else Qn(vr,new l.Z(n.MEDIA_KEY_MESSAGE_NO_LICENSE_SERVER_URL_ERROR_CODE,n.MEDIA_KEY_MESSAGE_NO_LICENSE_SERVER_URL_ERROR_MESSAGE))})(Kt,Tn,kn)}else Qn(Kn,new l.Z(n.MEDIA_KEY_MESSAGE_NO_CHALLENGE_ERROR_CODE,n.MEDIA_KEY_MESSAGE_NO_CHALLENGE_ERROR_MESSAGE))}function Qn(bt,Kt){Lt.trigger($t.LICENSE_REQUEST_COMPLETE,{data:bt,error:Kt})}function ei(bt,Kt,un,Pn,On,kn){var Tn=new XMLHttpRequest;if(Nt.get().streaming.cmcd&&Nt.get().streaming.cmcd.enabled&&Nt.get().streaming.cmcd.mode===F.Z.CMCD_MODE_QUERY){var Kn=Tt.getQueryParameter({url:bt.url,type:Z.w.LICENSE});Kn&&(bt.url=k.Z.addAditionalQueryParameterToUrl(bt.url,[Kn]))}for(var Ln in Tn.open(bt.method,bt.url,!0),Tn.responseType=bt.responseType,Tn.withCredentials=bt.withCredentials,un>0&&(Tn.timeout=un),bt.headers)Tn.setRequestHeader(Ln,bt.headers[Ln]);if(Nt.get().streaming.cmcd&&Nt.get().streaming.cmcd.enabled&&Nt.get().streaming.cmcd.mode===F.Z.CMCD_MODE_HEADER){var In=Tt.getHeaderParameters({url:bt.url,type:Z.w.LICENSE});if(In)for(var sr in In){var zn=In[sr];zn&&Tn.setRequestHeader(sr,zn)}}var fr=function(){Kt--;var tr=isNaN(Nt.get().streaming.retryIntervals[Z.w.LICENSE])?1e3:Nt.get().streaming.retryIntervals[Z.w.LICENSE];Ct=setTimeout(function(){ei(bt,Kt,un,Pn,On,kn)},tr)};Tn.onload=function(){qt=null,this.status>=200&&this.status<=299||Kt<=0?Pn(this):(yt.warn("License request failed ("+this.status+"). Retrying it... Pending retries: "+Kt),fr())},Tn.ontimeout=Tn.onerror=function(){qt=null,Kt<=0?kn(this):(yt.warn("License request network request failed . Retrying it... Pending retries: "+Kt),fr())},Tn.onabort=function(){On(this)},Lt.trigger($t.LICENSE_REQUEST_SENDING,{url:bt.url,headers:bt.headers,payload:bt.data,sessionId:bt.sessionId}),qt=Tn,Tn.send(bt.data)}function ti(){qt&&(qt.onloadend=qt.onerror=qt.onprogress=void 0,qt.abort(),qt=null),Ct&&(clearTimeout(Ct),Ct=null)}function Br(bt,Kt){if(Kt)for(var un in Kt)bt[un]=Kt[un]}function Gr(bt,Kt,un,Pn,On){var kn="NONE",Tn=null;bt.response&&(kn=On.getErrorResponse(bt.response,un,Pn),Tn={serverResponse:bt.response||null,responseCode:bt.status||null,responseText:bt.statusText||null}),Qn(Kt,new l.Z(n.MEDIA_KEY_MESSAGE_LICENSER_ERROR_CODE,n.MEDIA_KEY_MESSAGE_LICENSER_ERROR_MESSAGE+un+' update, XHR complete. status is "'+bt.statusText+'" ('+bt.status+"), readyState is "+bt.readyState+". Response is "+kn,Tn))}function qr(bt,Kt){return bt?bt.reduce(function(un,Pn){return un.then(function(){return Pn(Kt)})},Promise.resolve()):Promise.resolve()}function Yr(bt,Kt){if(!Nt.get().streaming.protection.ignoreEmeEncryptedEvent){if(yt.debug("DRM: onNeedKey"),bt.key.initDataType!=="cenc")return void yt.warn("DRM: Only 'cenc' initData is supported! Ignoring initData of type: "+bt.key.initDataType);if(ot.length===0&&(yt.warn("DRM: onNeedKey called before initializeForMedia, wait until initialized"),(Kt=Kt===void 0?1:Kt+1)<5))return void Et.push(setTimeout(function(){Yr(bt,Kt)},500));var un=bt.key.initData;if(ArrayBuffer.isView(un)&&(un=un.buffer),wt){var Pn=t.getPSSHForKeySystem(wt,un);if(Pn&&Mn(Pn))return}yt.debug("DRM: initData:",String.fromCharCode.apply(null,new Uint8Array(un)));var On=gt.getSupportedKeySystemsFromSegmentPssh(un,Qe,it);if(On.length===0)return void yt.debug("DRM: Received needkey event with initData, but we don't support any of the key systems!");(function(kn){Ye.push(kn),hn(kn,!1)})(On)}}return pt={initializeForMedia:function(bt){if(!bt)throw new Error("mediaInfo can not be null or undefined");nn(),ot.push(bt)},clearMediaInfoArray:function(){ot=[]},handleKeySystemFromManifest:function(){if(ot&&ot.length!==0){var bt=[];ot.forEach(function(Kt){var un=gt.getSupportedKeySystemsFromContentProtection(Kt.contentProtection,Qe,it);un.length>0&&(bt.length===0&&(bt=un),Ye.push(un))}),bt&&bt.length>0&&hn(bt,!0)}},createKeySession:wn,loadKeySession:Zn,removeKeySession:function(bt){nn(),Ft.removeKeySession(bt)},closeKeySession:function(bt){nn(),Ft.closeKeySession(bt)},setServerCertificate:function(bt){nn(),Ft.setServerCertificate(bt)},setMediaElement:Vn,setSessionType:function(bt){it=bt},setRobustnessLevel:function(bt){It=bt},setProtectionData:function(bt){Qe=bt,gt.setProtectionData(bt)},getSupportedKeySystemsFromContentProtection:function(bt){return nn(),gt.getSupportedKeySystemsFromContentProtection(bt,Qe,it)},getKeySystems:function(){return gt?gt.getKeySystems():[]},setKeySystems:function(bt){gt&>.setKeySystems(bt)},stop:function(){ti(),Ft&&Ft.stop()},reset:function(){Lt.off($t.INTERNAL_KEY_MESSAGE,ar,pt),Lt.off($t.INTERNAL_KEY_STATUS_CHANGED,Er,pt),nn(),ti(),Vn(null),wt=null,Bt=!1,Ft&&(Ft.reset(),Ft=null),Et.forEach(function(bt){return clearTimeout(bt)}),Et=[],ot=[],Ye=[]}},yt=sn.getLogger(pt),Ye=[],ot=[],it="temporary",It="",qt=null,Ct=null,Lt.on($t.INTERNAL_KEY_MESSAGE,ar,pt),Lt.on($t.INTERNAL_KEY_STATUS_CHANGED,Er,pt),pt}A.__dashjs_factory_name="ProtectionController";var U=ee.Z.getClassFactory(A),J=function _t(pt,yt){(function(Ye,ot){if(!(Ye instanceof ot))throw new TypeError("Cannot call a class as a function")})(this,_t),this.keyID=pt,this.key=yt};function $(_t,pt){for(var yt=0;yt%CUSTOMDATA%'.replace("%CUSTOMDATA%",it),wt=[],Bt=0;Bt"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var Qe,it=Ut(pt);if(yt){var It=Ut(this).constructor;Qe=Reflect.construct(it,arguments,It)}else Qe=it.apply(this,arguments);return Mt(this,Qe)});function ot(){var Qe;return function(it,It){if(!(it instanceof It))throw new TypeError("Cannot call a class as a function")}(this,ot),(Qe=Ye.call(this)).INTERNAL_KEY_MESSAGE="internalKeyMessage",Qe.INTERNAL_KEY_STATUS_CHANGED="internalkeyStatusChanged",Qe.KEY_ADDED="public_keyAdded",Qe.KEY_ERROR="public_keyError",Qe.KEY_MESSAGE="public_keyMessage",Qe.KEY_SESSION_CLOSED="public_keySessionClosed",Qe.KEY_SESSION_CREATED="public_keySessionCreated",Qe.KEY_SESSION_REMOVED="public_keySessionRemoved",Qe.KEY_STATUSES_CHANGED="public_keyStatusesChanged",Qe.KEY_SYSTEM_ACCESS_COMPLETE="public_keySystemAccessComplete",Qe.KEY_SYSTEM_SELECTED="public_keySystemSelected",Qe.LICENSE_REQUEST_COMPLETE="public_licenseRequestComplete",Qe.LICENSE_REQUEST_SENDING="public_licenseRequestSending",Qe.NEED_KEY="needkey",Qe.PROTECTION_CREATED="public_protectioncreated",Qe.PROTECTION_DESTROYED="public_protectiondestroyed",Qe.SERVER_CERTIFICATE_UPDATED="serverCertificateUpdated",Qe.TEARDOWN_COMPLETE="protectionTeardownComplete",Qe.VIDEO_ELEMENT_SELECTED="videoElementSelected",Qe.KEY_SESSION_UPDATED="public_keySessionUpdated",Qe}return ot}(O(8342).Z)),mn=function _t(pt,yt){(function(Ye,ot){if(!(Ye instanceof ot))throw new TypeError("Cannot call a class as a function")})(this,_t),this.initData=pt,this.initDataType=yt},_n=function _t(pt,yt,Ye,ot){(function(Qe,it){if(!(Qe instanceof it))throw new TypeError("Cannot call a class as a function")})(this,_t),this.sessionToken=pt,this.message=yt,this.defaultURL=Ye,this.messageType=ot||"license-request"},Un=function _t(pt,yt){(function(Ye,ot){if(!(Ye instanceof ot))throw new TypeError("Cannot call a class as a function")})(this,_t),this.keySystem=pt,this.ksConfiguration=yt},vn={};function An(_t){_t=_t||{};var pt,yt,Ye,ot,Qe,it,It,wt,Bt=this.context,qt=_t.eventBus,Ct=_t.events,gt=_t.debug;function Ft(Et,Tt,Nt,Jt){if(navigator.requestMediaKeySystemAccess===void 0||typeof navigator.requestMediaKeySystemAccess!="function"){var nn="Insecure origins are not allowed";return qt.trigger(Ct.KEY_SYSTEM_ACCESS_COMPLETE,{error:nn}),void Jt({error:nn})}var hn=Et[Tt].protData&&Et[Tt].protData.systemStringPriority?Et[Tt].protData.systemStringPriority:null,yn=Et[Tt].configs,qn=Et[Tt].ks,Zn=qn.systemString;(function(wn,Fn){return new Promise(function(Mn,Vn){Lt(wn,Fn,0,Mn,Vn)})})(hn||(vn[Zn]?vn[Zn]:[Zn]),yn).then(function(wn){var Fn=typeof wn.getConfiguration=="function"?wn.getConfiguration():null,Mn=new Un(qn,Fn);Mn.mksa=wn,qt.trigger(Ct.KEY_SYSTEM_ACCESS_COMPLETE,{data:Mn}),Nt({data:Mn})}).catch(function(wn){if(Tt+10&&(Et[0]&&(typeof Et[0]=="string"?Tt=Et[0]:Nt=Et[0]),Et[1]&&(typeof Et[1]=="string"?Tt=Et[1]:Nt=Et[1])),{status:Tt,keyId:Nt}}function Qt(Et,Tt){var Nt={session:Et,keyId:Tt.keyId,initData:Tt.initData,sessionId:Tt.sessionId,sessionType:Tt.sessionType,handleEvent:function(Jt){switch(Jt.type){case"keystatuseschange":qt.trigger(Ct.KEY_STATUSES_CHANGED,{data:this}),Jt.target.keyStatuses.forEach(function(){var hn=En(arguments);hn.status==="expired"?qt.trigger(Ct.INTERNAL_KEY_STATUS_CHANGED,{error:new l.Z(n.KEY_STATUS_CHANGED_EXPIRED_ERROR_CODE,n.KEY_STATUS_CHANGED_EXPIRED_ERROR_MESSAGE)}):qt.trigger(Ct.INTERNAL_KEY_STATUS_CHANGED,hn)});break;case"message":var nn=ArrayBuffer.isView(Jt.message)?Jt.message.buffer:Jt.message;qt.trigger(Ct.INTERNAL_KEY_MESSAGE,{data:new _n(this,nn,void 0,Jt.messageType)})}},getKeyId:function(){return this.keyId},getSessionId:function(){return Et.sessionId},getSessionType:function(){return this.sessionType},getExpirationTime:function(){return Et.expiration},getKeyStatuses:function(){return Et.keyStatuses},getUsable:function(){var Jt=!1;return Et.keyStatuses.forEach(function(){var nn=En(arguments);nn.status==="usable"&&(Jt=!0)}),Jt}};return Et.addEventListener("keystatuseschange",Nt),Et.addEventListener("message",Nt),Et.closed.then(function(){sn(Nt),yt.debug("DRM: Session closed. SessionID = "+Nt.getSessionId()),qt.trigger(Ct.KEY_SESSION_CLOSED,{data:Nt.getSessionId()})}),it.push(Nt),Nt}return pt={getAllInitData:function(){for(var Et=[],Tt=0;Tt=1?Et():(Qt=Et.bind(this),Ye.addEventListener("loadedmetadata",Qt))}return pt={getAllInitData:function(){for(var Qt=[],Et=0;Et0&&(Et=it.ksConfiguration.videoCapabilities[0]),Et===null&&it.ksConfiguration.audioCapabilities&&it.ksConfiguration.audioCapabilities.length>0&&(Et=it.ksConfiguration.audioCapabilities[0]),Et===null)throw new Error("Can not create sessions for unknown content types.");var Tt=Et.contentType,Nt=Qe.createSession(Tt,new Uint8Array(Qt.initData),Qt.cdmData?new Uint8Array(Qt.cdmData):null),Jt=function(nn,hn){return{session:nn,keyId:hn.keyId,initData:hn.initData,getKeyId:function(){return this.keyId},getSessionId:function(){return this.session.sessionId},getExpirationTime:function(){return NaN},getSessionType:function(){return"temporary"},handleEvent:function(yn){switch(yn.type){case Lt.error:Ct.trigger(gt.KEY_ERROR,{error:new l.Z(n.MEDIA_KEYERR_CODE,"KeyError",this)});break;case Lt.message:var qn=ArrayBuffer.isView(yn.message)?yn.message.buffer:yn.message;Ct.trigger(gt.INTERNAL_KEY_MESSAGE,{data:new _n(this,qn,yn.destinationURL)});break;case Lt.ready:yt.debug("DRM: Key added."),Ct.trigger(gt.KEY_ADDED);break;case Lt.close:yt.debug("DRM: Session closed. SessionID = "+this.getSessionId()),Ct.trigger(gt.KEY_SESSION_CLOSED,{data:this.getSessionId()})}}}}(Nt,Qt);Nt.addEventListener(Lt.error,Jt),Nt.addEventListener(Lt.message,Jt),Nt.addEventListener(Lt.ready,Jt),Nt.addEventListener(Lt.close,Jt),It.push(Jt),yt.debug("DRM: Session created. SessionID = "+Jt.getSessionId()),Ct.trigger(gt.KEY_SESSION_CREATED,{data:Jt})},updateKeySession:function(Qt,Et){var Tt=Qt.session;Bt.isClearKey(ot)?Tt.update(new Uint8Array(Et.toJWK())):Tt.update(new Uint8Array(Et)),Ct.trigger(gt.KEY_SESSION_UPDATED)},closeKeySession:sn,setServerCertificate:function(){},loadKeySession:function(){},removeKeySession:function(){},stop:$t,reset:$t},yt=Ft.getLogger(pt),Ye=null,ot=null,Qe=null,it=null,It=[],Bt=At(qt).getInstance(),wt={handleEvent:function(Qt){if(Qt.type===Lt.needkey&&Qt.initData){var Et=ArrayBuffer.isView(Qt.initData)?Qt.initData.buffer:Qt.initData;Ct.trigger(gt.NEED_KEY,{key:new mn(Et,"cenc")})}}},pt}pn.__dashjs_factory_name="ProtectionModel_3Feb2014";var Jn=dashjs.FactoryMaker.getClassFactory(pn);function xn(_t){_t=_t||{};var pt,yt,Ye,ot,Qe,it,It,wt,Bt,qt=this.context,Ct=_t.eventBus,gt=_t.events,Ft=_t.debug,Lt=_t.api,$t=_t.errHandler;function sn(){Ye&&Et();for(var Tt=0;Tt0&&(Nt=it.shift(),It.push(Nt),Nt.sessionId=Tt.sessionId,Ct.trigger(gt.KEY_SESSION_CREATED,{data:Nt})):it.length>0&&(Nt=it.shift(),It.push(Nt),it.length!==0&&$t.error(new l.Z(n.MEDIA_KEY_MESSAGE_ERROR_CODE,n.MEDIA_KEY_MESSAGE_ERROR_MESSAGE))),Nt){var yn=ArrayBuffer.isView(Tt.message)?Tt.message.buffer:Tt.message;Nt.keyMessage=yn,Ct.trigger(gt.INTERNAL_KEY_MESSAGE,{data:new _n(Nt,yn,Tt.defaultURL)})}else yt.warn("No session token found for key message")}}},pt}xn.__dashjs_factory_name="ProtectionModel_01b";var jn=dashjs.FactoryMaker.getClassFactory(xn),er=[{generateKeyRequest:"generateKeyRequest",addKey:"addKey",cancelKeyRequest:"cancelKeyRequest",needkey:"needkey",keyerror:"keyerror",keyadded:"keyadded",keymessage:"keymessage"},{generateKeyRequest:"webkitGenerateKeyRequest",addKey:"webkitAddKey",cancelKeyRequest:"webkitCancelKeyRequest",needkey:"webkitneedkey",keyerror:"webkitkeyerror",keyadded:"webkitkeyadded",keymessage:"webkitkeymessage"}],Hn=[{setMediaKeys:"setMediaKeys",MediaKeys:"MediaKeys",release:"close",needkey:"needkey",error:"keyerror",message:"keymessage",ready:"keyadded",close:"keyclose"},{setMediaKeys:"msSetMediaKeys",MediaKeys:"MSMediaKeys",release:"close",needkey:"msneedkey",error:"mskeyerror",message:"mskeymessage",ready:"mskeyadded",close:"mskeyclose"}];function rr(){var _t,pt=this.context;function yt(Ye,ot){for(var Qe=0;Qen.Z.NO_CHANGE})}function oe(Ce){var He,Le,ve,Ue,Be,ct={},_e=null;if(Ce.length!==0){for(ct[n.Z.PRIORITY.STRONG]={quality:n.Z.NO_CHANGE,reason:null},ct[n.Z.PRIORITY.WEAK]={quality:n.Z.NO_CHANGE,reason:null},ct[n.Z.PRIORITY.DEFAULT]={quality:n.Z.NO_CHANGE,reason:null},He=0,Le=Ce.length;Heve.quality)&&(ct[ve.priority].quality=ve.quality,ct[ve.priority].reason=ve.reason||null);return ct[n.Z.PRIORITY.WEAK].quality!==n.Z.NO_CHANGE&&(_e=ct[n.Z.PRIORITY.WEAK]),ct[n.Z.PRIORITY.DEFAULT].quality!==n.Z.NO_CHANGE&&(_e=ct[n.Z.PRIORITY.DEFAULT]),ct[n.Z.PRIORITY.STRONG].quality!==n.Z.NO_CHANGE&&(_e=ct[n.Z.PRIORITY.STRONG]),_e&&(Ue=_e.quality,Be=_e.reason),(0,n.Z)(A).create(Ue,Be)}}return{initialize:function(){ee=[],M=[],Ee.get().streaming.abr.useDefaultABRRules&&(Ee.get().streaming.abr.ABRStrategy===l.Z.ABR_STRATEGY_L2A?ee.push((0,u.Z)(A).create({dashMetrics:$,settings:Ee})):Ee.get().streaming.abr.ABRStrategy===l.Z.ABR_STRATEGY_LoLP?ee.push((0,g.Z)(A).create({dashMetrics:$})):(ee.push((0,y.Z)(A).create({dashMetrics:$,mediaPlayerModel:U,settings:Ee})),ee.push((0,ie.Z)(A).create({dashMetrics:$})),Ee.get().streaming.abr.additionalAbrRules.insufficientBufferRule&&ee.push((0,T.Z)(A).create({dashMetrics:$,settings:Ee})),Ee.get().streaming.abr.additionalAbrRules.switchHistoryRule&&ee.push((0,p.Z)(A).create()),Ee.get().streaming.abr.additionalAbrRules.droppedFramesRule&&ee.push((0,e.Z)(A).create()),Ee.get().streaming.abr.additionalAbrRules.abandonRequestsRule&&M.push((0,t.Z)(A).create({dashMetrics:$,mediaPlayerModel:U,settings:Ee})))),J.getAbrCustomRules().forEach(function(Ce){Ce.type===d&&ee.push(Ce.rule(A).create()),Ce.type===D&&M.push(Ce.rule(A).create())})},reset:function(){[ee,M].forEach(function(Ce){Ce&&Ce.length&&Ce.forEach(function(He){return He.reset&&He.reset()})}),ee=[],M=[]},getMaxQuality:function(Ce){return oe(Je(ee.map(function(He){return He.getMaxIndex(Ce)})))||(0,n.Z)(A).create()},getMinSwitchRequest:oe,shouldAbandonFragment:function(Ce,He){return oe(Je(M.map(function(Le){return Le.shouldAbandon(Ce,He)})))||(0,n.Z)(A).create()},getQualitySwitchRules:function(){return ee}}}Z.__dashjs_factory_name="ABRRulesCollection";var k=E.Z.getClassFactory(Z);k.QUALITY_SWITCH_RULES=d,k.ABANDON_FRAGMENT_RULES=D,E.Z.updateSingletonFactory(Z.__dashjs_factory_name,k),we.Z=k},7423:function($e,we,O){var ie=O(2068),T=O(5448),t=O(6398);function e(p){p=p||{};var y,u,g,E,n,l=this.context,d=p.mediaPlayerModel,D=p.dashMetrics,Z=p.settings;function k(){g={},E={},n=[]}return y={shouldAbandon:function(F){var ee=(0,ie.Z)(l).create(ie.Z.NO_CHANGE,{name:e.__dashjs_factory_name});if(!(F&&F.hasOwnProperty("getMediaInfo")&&F.hasOwnProperty("getMediaType")&&F.hasOwnProperty("getCurrentRequest")&&F.hasOwnProperty("getRepresentationInfo")&&F.hasOwnProperty("getAbrController")))return ee;var M,A,U=F.getMediaInfo(),J=F.getMediaType(),$=F.getStreamInfo(),Ee=$?$.id:null,Je=F.getCurrentRequest();if(!isNaN(Je.index)){M=J,A=Je.index,g[M]=g[M]||{},g[M][A]=g[M][A]||{};var oe=d.getStableBufferTime();if(D.getCurrentBufferLevel(J)>oe)return ee;var Ce=g[J][Je.index];if(Ce===null||Je.firstByteDate===null||E.hasOwnProperty(Ce.id))return ee;if(Ce.firstByteTime===void 0&&(n[J]=[],Ce.firstByteTime=Je.firstByteDate.getTime(),Ce.segmentDuration=Je.duration,Ce.bytesTotal=Je.bytesTotal,Ce.id=Je.index),Ce.bytesLoaded=Je.bytesLoaded,Ce.elapsedTime=new Date().getTime()-Ce.firstByteTime,Ce.bytesLoaded>0&&Ce.elapsedTime>0&&function(Ge,vt){n[Ge]=n[Ge]||[],n[Ge].push(vt)}(J,Math.round(8*Ce.bytesLoaded/Ce.elapsedTime)),n[J].length>=5&&Ce.elapsedTime>500&&Ce.bytesLoadedCe.bytesTotal*Ue[_e].bitrate/Ue[Le.getQualityFor(J,Ee)].bitrate&&(ee.quality=_e,ee.reason.throughput=Ce.measuredBandwidthInKbps,ee.reason.fragmentID=Ce.id,ee.reason.rule=this.getClassName(),E[Ce.id]=Ce,u.debug("["+J+"] frag id",Ce.id," is asking to abandon and switch to quality to ",_e," measured bandwidth was",Ce.measuredBandwidthInKbps),delete g[J][Ce.id])}}else Ce.bytesLoaded===Ce.bytesTotal&&delete g[J][Ce.id]}return ee},reset:k},u=(0,t.Z)(l).getInstance().getLogger(y),k(),y}e.__dashjs_factory_name="AbandonRequestsRule",we.Z=T.Z.getClassFactory(e)},3112:function($e,we,O){var ie=O(3860),T=O(2068),t=O(5448),e=O(7855),p=O(5595),y=O(8512),u=O(6398),g=O(8825),E=O(3393),n=10;function l(d){d=d||{};var D,Z,k,F=this.context,ee=d.dashMetrics,M=d.mediaPlayerModel,A=(0,p.Z)(F).getInstance();function U(_e,Ge,vt){var ft=vt.reduce(function(de,ge,Ve){return ge>vt[de]?Ve:de},0);if(ft===0)return null;var qe=Math.max(_e,n+2*Ge.length),et=(vt[ft]-1)/(qe/n-1);return{gp:et,Vp:n/et}}function J(_e){_e.placeholderBuffer=0,_e.mostAdvancedSegmentStart=NaN,_e.lastSegmentWasReplacement=!1,_e.lastSegmentStart=NaN,_e.lastSegmentDurationS=NaN,_e.lastSegmentRequestTimeMs=NaN,_e.lastSegmentFinishTimeMs=NaN}function $(_e,Ge){var vt=M.getStableBufferTime();if(_e.stableBufferTime!==vt){var ft=U(vt,_e.bitrates,_e.utilities);if(ft.Vp!==_e.Vp||ft.gp!==_e.gp){var qe=ee.getCurrentBufferLevel(Ge),et=qe+_e.placeholderBuffer;et-=n,et*=ft.Vp/_e.Vp,et+=n,_e.stableBufferTime=vt,_e.Vp=ft.Vp,_e.gp=ft.gp,_e.placeholderBuffer=Math.max(0,et-qe)}}}function Ee(_e,Ge){return _e.Vp*(_e.utilities[Ge]+_e.gp)}function Je(_e,Ge){for(var vt=_e.bitrates[Ge],ft=_e.utilities[Ge],qe=0,et=Ge-1;et>=0;--et)if(_e.utilities[et]<_e.utilities[Ge]){var de=_e.bitrates[et],ge=_e.utilities[et],Ve=_e.Vp*(_e.gp+(vt*ge-de*ft)/(vt-de));qe=Math.max(qe,Ve)}return qe}function oe(_e){var Ge=_e.mediaType===E.Z.AUDIO?[E.Z.AUDIO]:k;for(var vt in Ge)k.hasOwnProperty(vt)&&k[vt].state===2&&(k[vt].placeholderBuffer=0)}function Ce(){for(var _e in k)if(k.hasOwnProperty(_e)){var Ge=k[_e];Ge.state!==0&&(Ge.state=1,J(Ge))}}function He(_e){if(_e&&_e.chunk&&_e.chunk.mediaInfo){var Ge=k[_e.chunk.mediaInfo.type];if(Ge&&Ge.state!==0){var vt=_e.chunk.start;isNaN(Ge.mostAdvancedSegmentStart)||vt>Ge.mostAdvancedSegmentStart?(Ge.mostAdvancedSegmentStart=vt,Ge.lastSegmentWasReplacement=!1):Ge.lastSegmentWasReplacement=!0,Ge.lastSegmentStart=vt,Ge.lastSegmentDurationS=_e.chunk.duration,Ge.lastQuality=_e.chunk.quality,ve(Ge,_e.chunk.mediaInfo.type)}}}function Le(_e){if(_e&&_e.metric===ie.Z.HTTP_REQUEST&&_e.value&&_e.value.type===e.w.MEDIA_SEGMENT_TYPE&&_e.value.trace&&_e.value.trace.length){var Ge=k[_e.mediaType];Ge&&Ge.state!==0&&(Ge.lastSegmentRequestTimeMs=_e.value.trequest.getTime(),Ge.lastSegmentFinishTimeMs=_e.value._tfinish.getTime(),ve(Ge,_e.mediaType))}}function ve(_e,Ge){if(!isNaN(_e.lastSegmentStart)&&!isNaN(_e.lastSegmentRequestTimeMs)&&!isNaN(_e.placeholderBuffer)){if(_e.placeholderBuffer*=.99,!isNaN(_e.lastSegmentFinishTimeMs)){var vt=ee.getCurrentBufferLevel(Ge)+.001*(_e.lastSegmentFinishTimeMs-_e.lastSegmentRequestTimeMs),ft=Ee(_e,_e.lastQuality),qe=Math.max(0,ft-vt);_e.placeholderBuffer=Math.min(qe,_e.placeholderBuffer)}_e.lastSegmentWasReplacement&&!isNaN(_e.lastSegmentDurationS)&&(_e.placeholderBuffer+=_e.lastSegmentDurationS),_e.lastSegmentStart=NaN,_e.lastSegmentRequestTimeMs=NaN}}function Ue(_e){if(_e){var Ge=k[_e.mediaType];Ge&&Ge.state!==0&&(Ge.abrQuality=_e.newQuality)}}function Be(_e){if(_e){var Ge=k[_e.mediaType];if(Ge&&Ge.state!==0){var vt,ft=ee.getCurrentBufferLevel(_e.mediaType);vt=Ge.abrQuality>0?Je(Ge,Ge.abrQuality):n;var qe=Math.max(0,vt-ft);Ge.placeholderBuffer=Math.min(Ge.placeholderBuffer,qe)}}}function ct(){k={}}return D={getMaxIndex:function(_e){var Ge=(0,T.Z)(F).create();if(!(_e&&_e.hasOwnProperty("getMediaInfo")&&_e.hasOwnProperty("getMediaType")&&_e.hasOwnProperty("getScheduleController")&&_e.hasOwnProperty("getStreamInfo")&&_e.hasOwnProperty("getAbrController")&&_e.hasOwnProperty("useBufferOccupancyABR")))return Ge;var vt=_e.getMediaInfo(),ft=_e.getMediaType(),qe=_e.getScheduleController(),et=_e.getStreamInfo(),de=_e.getAbrController(),ge=de.getThroughputHistory(),Ve=et?et.id:null,f=et&&et.manifestInfo&&et.manifestInfo.isDynamic,i=_e.useBufferOccupancyABR();if(Ge.reason=Ge.reason||{},!i)return Ge;qe.setTimeToLoadDelay(0);var v=function(Ne){var Ke=Ne.getMediaType(),We=k[Ke];return We?We.state!==0&&$(We,Ke):(We=function(At){var tt={},Dt=At.getMediaInfo().bitrateList.map(function(mn){return mn.bandwidth}),Mt=function(mn){return mn.map(function(_n){return Math.log(_n)})}(Dt);Mt=Mt.map(function(mn){return mn-Mt[0]+1});var Ut=M.getStableBufferTime(),ln=U(Ut,Dt,Mt);return ln?(tt.state=1,tt.bitrates=Dt,tt.utilities=Mt,tt.stableBufferTime=Ut,tt.Vp=ln.Vp,tt.gp=ln.gp,tt.lastQuality=0,J(tt)):tt.state=0,tt}(Ne),k[Ke]=We),We}(_e);if(v.state===0)return Ge;var S,W=ee.getCurrentBufferLevel(ft),V=ge.getAverageThroughput(ft,f),he=ge.getSafeAverageThroughput(ft,f),Me=ge.getAverageLatency(ft);if(Ge.reason.state=v.state,Ge.reason.throughput=V,Ge.reason.latency=Me,isNaN(V))return Ge;switch(v.state){case 1:S=de.getQualityForBitrate(vt,he,Ve,Me),Ge.quality=S,Ge.reason.throughput=he,v.placeholderBuffer=Math.max(0,Je(v,S)-W),v.lastQuality=S,!isNaN(v.lastSegmentDurationS)&&W>=v.lastSegmentDurationS&&(v.state=2);break;case 2:(function(Ne,Ke){var We=Date.now();if(isNaN(Ne.lastSegmentFinishTimeMs)){if(!isNaN(Ne.lastCallTimeMs)){var At=.001*(We-Ne.lastCallTimeMs);Ne.placeholderBuffer+=Math.max(0,At)}}else{var tt=.001*(We-Ne.lastSegmentFinishTimeMs);Ne.placeholderBuffer+=Math.max(0,tt)}Ne.lastCallTimeMs=We,Ne.lastSegmentStart=NaN,Ne.lastSegmentRequestTimeMs=NaN,Ne.lastSegmentFinishTimeMs=NaN,$(Ne,Ke)})(v,ft),S=function(Ne,Ke){for(var We=Ne.bitrates.length,At=NaN,tt=NaN,Dt=0;Dt=tt)&&(tt=Mt,At=Dt)}return At}(v,W+v.placeholderBuffer);var Oe=de.getQualityForBitrate(vt,he,Ve,Me);S>v.lastQuality&&S>Oe&&(S=Math.max(Oe,v.lastQuality));var Se=Math.max(0,W+v.placeholderBuffer-Ee(v,S));Se<=v.placeholderBuffer?(v.placeholderBuffer-=Se,Se=0):(Se-=v.placeholderBuffer,v.placeholderBuffer=0,S375&&D/Z>.15)){k=F-1,y.debug("index: "+k+" Dropped Frames: "+D+" Total Frames: "+Z);break}return(0,T.Z)(u).create(k,{droppedFrames:D})}return E}},y=(0,t.Z)(u).getInstance().getLogger(p),p}e.__dashjs_factory_name="DroppedFramesRule",we.Z=ie.Z.getClassFactory(e)},6535:function($e,we,O){var ie=O(5595),T=O(8512),t=O(5448),e=O(6398),p=O(2068),y=O(3393),u=O(3860),g=O(8825);function E(n){n=n||{};var l,d,D,Z=this.context,k=(0,ie.Z)(Z).getInstance(),F=n.dashMetrics;function ee(){(D={})[y.Z.VIDEO]={ignoreCount:2},D[y.Z.AUDIO]={ignoreCount:2}}function M(){ee()}function A(U){isNaN(U.startTime)||U.mediaType!==y.Z.AUDIO&&U.mediaType!==y.Z.VIDEO||D[U.mediaType].ignoreCount>0&&D[U.mediaType].ignoreCount--}return l={getMaxIndex:function(U){var J=(0,p.Z)(Z).create();if(!U||!U.hasOwnProperty("getMediaType"))return J;(function(){if(!F||!F.hasOwnProperty("getCurrentBufferLevel")||!F.hasOwnProperty("getCurrentBufferState"))throw new Error(y.Z.MISSING_CONFIG_ERROR)})();var $=U.getMediaType(),Ee=F.getCurrentBufferState($),Je=U.getRepresentationInfo().fragmentDuration,oe=U.getStreamInfo(),Ce=oe?oe.id:null,He=U.getScheduleController(),Le=oe&&oe.manifestInfo&&oe.manifestInfo.isDynamic;if(function(ft,qe){return!ft&&D[qe].ignoreCount>0}(He.getPlaybackController().getLowLatencyModeEnabled(),$)||!Je)return J;if(Ee&&Ee.state===u.Z.BUFFER_EMPTY)d.debug("["+$+"] Switch to index 0; buffer is empty."),J.quality=0,J.reason="InsufficientBufferRule: Buffer is empty";else{var ve=U.getMediaInfo(),Ue=U.getAbrController(),Be=Ue.getThroughputHistory(),ct=F.getCurrentBufferLevel($),_e=Be.getAverageThroughput($,Le),Ge=Be.getAverageLatency($),vt=_e*(ct/Je)*.5;J.quality=Ue.getQualityForBitrate(ve,vt,Ce,Ge),J.reason="InsufficientBufferRule: being conservative to avoid immediate rebuffering"}return J},reset:function(){ee(),k.off(g.Z.PLAYBACK_SEEKING,M,l),k.off(T.Z.BYTES_APPENDED_END_FRAGMENT,A,l)}},d=(0,e.Z)(Z).getInstance().getLogger(l),ee(),k.on(g.Z.PLAYBACK_SEEKING,M,l),k.on(T.Z.BYTES_APPENDED_END_FRAGMENT,A,l),l}E.__dashjs_factory_name="InsufficientBufferRule",we.Z=t.Z.getClassFactory(E)},1914:function($e,we,O){var ie=O(3860),T=O(2068),t=O(5448),e=O(7855),p=O(5595),y=O(8512),u=O(6398),g=O(3393);function E(n){n=n||{};var l,d,D,Z,k=this.context,F=n.dashMetrics,ee=(0,p.Z)(k).getInstance();function M(Ce){Ce.placeholderBuffer=0,Ce.mostAdvancedSegmentStart=NaN,Ce.lastSegmentWasReplacement=!1,Ce.lastSegmentStart=NaN,Ce.lastSegmentDurationS=NaN,Ce.lastSegmentRequestTimeMs=NaN,Ce.lastSegmentFinishTimeMs=NaN,Ce.lastSegmentUrl=""}function A(){for(var Ce in d)if(d.hasOwnProperty(Ce)){var He=d[Ce];He.state!==0&&(He.state=1,M(He))}}function U(Ce){if(Ce&&Ce.chunk&&Ce.chunk.mediaInfo){var He=d[Ce.chunk.mediaInfo.type],Le=D[Ce.chunk.mediaInfo.type];if(He&&He.state!==0){var ve=Ce.chunk.start;isNaN(He.mostAdvancedSegmentStart)||ve>He.mostAdvancedSegmentStart?(He.mostAdvancedSegmentStart=ve,He.lastSegmentWasReplacement=!1):He.lastSegmentWasReplacement=!0,He.lastSegmentStart=ve,He.lastSegmentDurationS=Ce.chunk.duration,He.lastQuality=Ce.chunk.quality,$(He,Le)}}}function J(Ce){if(Ce&&Ce.metric===ie.Z.HTTP_REQUEST&&Ce.value&&Ce.value.type===e.w.MEDIA_SEGMENT_TYPE&&Ce.value.trace&&Ce.value.trace.length){var He=d[Ce.mediaType],Le=D[Ce.mediaType];He&&He.state!==0&&(He.lastSegmentRequestTimeMs=Ce.value.trequest.getTime(),He.lastSegmentFinishTimeMs=Ce.value._tfinish.getTime(),$(He,Le))}}function $(Ce,He){isNaN(Ce.lastSegmentStart)||isNaN(Ce.lastSegmentRequestTimeMs)||(He.segment_request_start_s=.001*Ce.lastSegmentRequestTimeMs,He.segment_download_finish_s=.001*Ce.lastSegmentFinishTimeMs,Ce.lastSegmentStart=NaN,Ce.lastSegmentRequestTimeMs=NaN)}function Ee(Ce){if(Ce&&Ce.mediaType){var He=d[Ce.mediaType];He&&He.state!==0&&(He.abrQuality=Ce.newQuality)}}function Je(Ce,He){if(Ce.length!==He.length)return-1;for(var Le=0,ve=0;ve=V.B_target){W.state=2,V.Q=ve;for(var he=0;heNe&&(At=-1),V.w[tt]=V.prev_w[tt]+At*(We/(2*Ue))*((V.Q+ve)*(S*_e[tt]/Ne));V.w=function(ln){for(var mn=ln.length,_n=!1,Un=[],vn=0;vn=An[xn+1]){_n=!0;break}_n||(pn=(Bn+An[mn-1]-1)/mn);for(var jn=0;jnW.lastQuality&&_e[W.lastQuality+1]<=Ne&&(He=W.lastQuality+1),_e[He]>=Ne&&(V.Q=2*Math.max(ve,V.Q)),W.lastSegmentUrl=Ke.url}Le.quality=He,Le.reason.throughput=i,Le.reason.latency=v,Le.reason.bufferLevel=Ve,W.lastQuality=Le.quality;break;default:Z.debug("L2A ABR rule invoked in bad state."),Le.quality=qe.getQualityForBitrate(Be,f,ft.id,v),Le.reason.state=W.state,Le.reason.throughput=f,Le.reason.latency=v,W.state=1,M(W)}return Le},reset:function(){oe(),ee.off(y.Z.PLAYBACK_SEEKING,A,l),ee.off(y.Z.MEDIA_FRAGMENT_LOADED,U,l),ee.off(y.Z.METRIC_ADDED,J,l),ee.off(y.Z.QUALITY_CHANGE_REQUESTED,Ee,l)}},Z=(0,u.Z)(k).getInstance().getLogger(l),oe(),ee.on(y.Z.PLAYBACK_SEEKING,A,l),ee.on(y.Z.MEDIA_FRAGMENT_LOADED,U,l),ee.on(y.Z.METRIC_ADDED,J,l),ee.on(y.Z.QUALITY_CHANGE_REQUESTED,Ee,l),l}E.__dashjs_factory_name="L2ARule",we.Z=t.Z.getClassFactory(E)},6070:function($e,we,O){var ie=O(5448),T=O(6398),t=O(2068);function e(){var p,y,u=this.context;return p={getMaxIndex:function(g){for(var E=g?g.getSwitchHistory():null,n=E?E.getSwitchRequests():[],l=0,d=0,D=0,Z=(0,t.Z)(u).create(),k=0;k=6&&l/d>.075)){Z.quality=k>0&&n[k].drops>0?k-1:k,Z.reason={index:Z.quality,drops:l,noDrops:d,dropSize:D},y.debug("Switch history rule index: "+Z.quality+" samples: "+(l+d)+" drops: "+l);break}return Z}},y=(0,T.Z)(u).getInstance().getLogger(p),p}e.__dashjs_factory_name="SwitchHistoryRule",we.Z=ie.Z.getClassFactory(e)},5628:function($e,we,O){var ie=O(5448),T=O(2068),t=O(3393),e=O(3860);function p(y){y=y||{};var u=this.context,g=y.dashMetrics;return{getMaxIndex:function(E){var n=(0,T.Z)(u).create();if(!(E&&E.hasOwnProperty("getMediaInfo")&&E.hasOwnProperty("getMediaType")&&E.hasOwnProperty("useBufferOccupancyABR")&&E.hasOwnProperty("getAbrController")&&E.hasOwnProperty("getScheduleController")))return n;(function(){if(!g||!g.hasOwnProperty("getCurrentBufferState"))throw new Error(t.Z.MISSING_CONFIG_ERROR)})();var l=E.getMediaInfo(),d=E.getMediaType(),D=g.getCurrentBufferState(d),Z=E.getScheduleController(),k=E.getAbrController(),F=E.getStreamInfo(),ee=F?F.id:null,M=F&&F.manifestInfo?F.manifestInfo.isDynamic:null,A=k.getThroughputHistory(),U=A.getSafeAverageThroughput(d,M),J=A.getAverageLatency(d),$=E.useBufferOccupancyABR();return isNaN(U)||!D||$||k.getAbandonmentStateFor(ee,d)!==e.Z.ABANDON_LOAD&&(D.state===e.Z.BUFFER_LOADED||M)&&(n.quality=k.getQualityForBitrate(l,U,ee,J),Z.setTimeToLoadDelay(0),n.reason={throughput:U,latency:J}),n},reset:function(){}}}p.__dashjs_factory_name="ThroughputRule",we.Z=ie.Z.getClassFactory(p)},4722:function($e,we,O){var ie=O(5448),T=O(6398);function t(){var e,p,y,u,g,E,n,l,d,D=this.context;function Z(){y=null,u=1,g=100,E=0,n=null,l=null,d="dynamic_weight_selection"}function k(){var U=0;if(y)for(var J=0;JU&&(U=$.state.throughput)}return U}function F(U,J,$){var Ee=U.map(function(Je,oe){return $[oe]*Math.pow(Je-J[oe],2)}).reduce(function(Je,oe){return Je+oe});return(Ee<0?-1:1)*Math.sqrt(Math.abs(Ee))}function ee(U,J){return F([U.state.throughput,U.state.latency,U.state.rebuffer,U.state.switch],[J.state.throughput,J.state.latency,J.state.rebuffer,J.state.switch],[1,1,1,1])}function M(U,J,$){for(var Ee=0;EeUt)&&(Mt=mn,Ut=_n)}We.push(Mt)}for(var An=null,Bn=null,pn=0;pnAn)&&(An=Jn,Bn=pn)}var jn=[];for(jn.push(We[Bn]),We.splice(Bn,1);We.length>0;){for(var er=null,Hn=null,rr=0;rr1&&(Be=k()),$/=g,p.debug("getNextQuality called throughput:".concat(Be," latency:").concat($," bufferSize:").concat(Ee," currentQualityIndex:").concat(oe," playbackRate:").concat(Je));var ct=Ue[oe],_e=ct.bitrate*Ce.getSegmentDuration()/ve,Ge=Math.max(0,_e-Le);if(Le-_evt?vt=qe:qe_e?ge-_e:0;Z.setupPerSegmentQoe(_e,vt,Ge),Z.logSegmentMetrics(et,Ve,ve,Ue);var f=(0,u.Z)(F).create({targetLatency:1.5,bufferMin:.3,segmentDuration:_e,qoeEvaluator:Z});return M.quality=D.getNextQuality(Ee,1e3*Be,ve,Ce,Ue,$,f),M.reason={throughput:Be,latency:ve},M.priority=p.Z.PRIORITY.STRONG,oe.setTimeToLoadDelay(0),M.quality!==$&&l.debug("[TgcLearningRule]["+A+"] requesting switch to index: ",M.quality,"Average throughput",Math.round(Be),"kbps"),M}catch(i){throw i}},reset:function(){D.reset(),Z.reset()}},l=(0,ie.Z)(F).getInstance().getLogger(d),D=(0,t.Z)(F).create(),Z=(0,e.Z)(F).create(),d}E.__dashjs_factory_name="LoLPRule",we.Z=T.Z.getClassFactory(E)},6523:function($e,we,O){var ie=O(5448);function T(t){var e,p,y,u,g=t.targetLatency,E=t.bufferMin,n=t.segmentDuration,l=t.qoeEvaluator;function d(){return n}function D(Z,k){var F=d();return k>F?Z-F:Z+F-k}return e={getMinBuffer:function(){return E},getSegmentDuration:d,getNextBufferWithBitrate:function(Z,k,F){return D(k,Z*n/F)},getNextBuffer:D,findWeightVector:function(Z,k,F,ee,M,A){var U=null,J=null,$=null,Ee=Math.abs(k-y);return Z.forEach(function(Je){p.forEach(function(oe){oe[0];var Ce=oe[1],He=oe[2],Le=(oe[3],Je.bitrate*n/M),ve=D(F,Le),Ue=(He===0?10:1/He)*Math.max(1e-5,Le-ve),Be=(Ce===0?10:1/Ce)*Je.state.latency,ct=l.calculateSingleUseQoe(Je.bitrate,Ue,Be,A);(U===null||ct>U)&&function(_e,Ge,vt){return!(_e>g+vt)&&Ge>=E}(k,ve,Ee)&&(U=ct,J=oe,$=Je.bitrate)})}),J===null&&$===null&&(J=-1),y=k,J}},p=function Z(k,F,ee){if(ee===F)return k;for(var M=k.length,A=0;A=0&&qe.value){var et=qe.value.split("x");et.length!==2||isNaN(et[0])||isNaN(et[1])||(ft.tilesHor=parseInt(et[0],10),ft.tilesVert=parseInt(et[1],10))}}),vt?A.updateSegmentData(Ge).then(function(qe){(function(et,de,ge){var Ve=[],f=function(i,v){var S,W,V,he,Me=[],Oe=0;for(S=0,W=i.segments.length;Si)return S=W.url,!0}),S?v(S):de.segments.some(function(W){if(W.mediaStartTime<=i&&W.mediaStartTime+W.duration>i){var V=Je.resolve(de.path);return U.load({method:"get",url:V.url,request:{range:W.mediaRange,responseType:"arraybuffer"},onload:function(he){var Me=J.getSamplesInfo(he.target.response),Oe=new Blob([he.target.response.slice(Me.sampleList[0].offset,Me.sampleList[0].offset+Me.sampleList[0].size)],{type:"image/jpeg"}),Se=window.URL.createObjectURL(Oe);Ve.push({start:W.mediaStartTime,end:W.mediaStartTime+W.duration,url:Se}),v&&v(Se)}}),!0}})}})(ft,Ge,qe)}):(ft.startNumber=Ge.startNumber,ft.segmentDuration=Ge.segmentDuration,ft.timescale=Ge.timescale,ft.templateUrl=function(qe){var et=Be.isRelative(qe.media)?Be.resolve(qe.media,Je.resolve(qe.path).url):qe.media;return et?(0,y.Aj)(et,qe.id):""}(Ge)),ft.tilesHor>0&&ft.tilesVert>0&&(ft.widthPerTile=ft.width/ft.tilesHor,ft.heightPerTile=ft.height/ft.tilesVert,k.push(ft))}function _e(){k=[],ee=-1,M=null}return Z={getTracks:function(){return k},addTracks:function(){if(oe&&Ee&&(M=Ee.getMediaInfoForType(oe,ie.Z.IMAGE))){var Ge=Ee.getVoRepresentations(M);Ge&&Ge.length>0&&Ge.forEach(function(vt){(vt.segmentInfoType===T.Z.SEGMENT_TEMPLATE&&vt.segmentDuration>0&&vt.media||vt.segmentInfoType===T.Z.SEGMENT_TIMELINE)&&ct(vt),vt.segmentInfoType===T.Z.SEGMENT_BASE&&ct(vt,!0)}),k.length>0&&k.sort(function(vt,ft){return vt.bitrate-ft.bitrate})}},reset:_e,setTrackByIndex:function(Ge){k&&k.length!==0&&(Ge>=k.length&&(Ge=k.length-1),ee=Ge)},getCurrentTrack:function(){return ee<0?null:k[ee]},getCurrentTrackIndex:function(){return ee},getThumbnailRequestForTime:function(Ge){for(var vt,ft=Ee.getVoRepresentations(M),qe=0;qe>>0|D[Z+2]<<8>>>0|D[Z+1]<<16>>>0|D[Z]<<24>>>0}function d(D,Z){return String.fromCharCode(D[Z++])+String.fromCharCode(D[Z++])+String.fromCharCode(D[Z++])+String.fromCharCode(D[Z])}return g={parse:n,findLastTopIsoBoxCompleted:function(D,Z,k){if(k===void 0&&(k=0),!Z||k+8>=Z.byteLength)return new p.Z(0,!1);for(var F,ee=Z instanceof ArrayBuffer?new Uint8Array(Z):Z,M=0;k=0?F=new p.Z(k,!0,A):M=k+A),k+=A}return F||new p.Z(M,!1)},getMediaTimescaleFromMoov:function(D){var Z=n(D),k=Z?Z.getBox("mdhd"):void 0;return k?k.timescale:NaN},getSamplesInfo:function(D){if(!D||D.byteLength===0)return{sampleList:[],lastSequenceNumber:NaN,totalDuration:NaN,numSequences:NaN};var Z,k,F,ee,M,A,U,J,$,Ee,Je,oe,Ce,He,Le,ve,Ue=n(D),Be=Ue.getBoxes("moof"),ct=Ue.getBoxes("mfhd");Le=Ue.getBoxes("moof").length,He=ct[ct.length-1].sequence_number,k=0,M=[];var _e=-1,Ge=-1;for(Ee=0;EeGe&&(_e++,Ge+=v.entries[_e].sample_delta),U==Ge){i.subSizes=[];var S=v.entries[_e];for(oe=0;oe=Z.byteLength)return new p.Z(0,!1);for(var F,ee=Z instanceof ArrayBuffer?new Uint8Array(Z):Z,M=0;k=0?F=new p.Z(k,!0,A,U):M=k+A),k+=A}return F||new p.Z(M,!1)}},u=(0,ie.Z)(E).getInstance().getLogger(g),g}y.__dashjs_factory_name="BoxParser",we.Z=t.Z.getSingletonFactory(y)},1715:function($e,we,O){O.d(we,{B:function(){return p}});var ie=O(5448),T=O(7803),t=O(3393),e=[{codec:"avc1",compatibleCodecs:["avc3"]},{codec:"avc3",compatibleCodecs:["avc1"]}];function p(){var u="WebKitMediaSource"in window,g="MediaSource"in window;return u||g}function y(){var u,g,E;return u={setConfig:function(n){n&&n.settings&&(g=n.settings)},supportsMediaSource:p,supportsEncryptedMedia:function(){return E},supportsCodec:function(n,l){return l!==t.Z.AUDIO&&l!==t.Z.VIDEO?Promise.resolve(!0):function(d,D){return g.get().streaming.capabilities.useMediaCapabilitiesApi&&navigator.mediaCapabilities&&navigator.mediaCapabilities.decodingInfo&&(d.codec&&D===t.Z.AUDIO||D===t.Z.VIDEO&&d.codec&&d.width&&d.height&&d.bitrate&&d.framerate)}(n,l)?function(d,D){return new Promise(function(Z){if(d&&d.codec){var k={type:"media-source"};k[D]={},k[D].contentType=d.codec,k[D].width=d.width,k[D].height=d.height,k[D].bitrate=parseInt(d.bitrate),k[D].framerate=parseFloat(d.framerate),navigator.mediaCapabilities.decodingInfo(k).then(function(F){Z(F.supported)}).catch(function(){Z(!1)})}else Z(!1)})}(n,l):function(d){return new Promise(function(D){if(d&&d.codec){var Z=d.codec;d.width&&d.height&&(Z+=';width="'+d.width+'";height="'+d.height+'"'),"MediaSource"in window&&MediaSource.isTypeSupported(Z)||"WebKitMediaSource"in window&&WebKitMediaSource.isTypeSupported(Z)?D(!0):D(!1)}else D(!1)})}(n)},setEncryptedMediaSupported:function(n){E=n},supportsEssentialProperty:function(n){try{return T.Y.indexOf(n.schemeIdUri)!==-1}catch{return!0}},codecRootCompatibleWithCodec:function(n,l){for(var d,D=n.split(".")[0],Z=l.indexOf(D)===0,k=0;kthis.customTimeRangeArray[y].start;y++);for(this.customTimeRangeArray.splice(y,0,{start:e,end:p}),y=0;y=this.customTimeRangeArray[y].end)this.customTimeRangeArray.splice(y,1),y--;else{if(e>this.customTimeRangeArray[y].start&&pthis.customTimeRangeArray[y].start&&ethis.customTimeRangeArray[y].start&&p=this.customTimeRangeArray.length||e<0?NaN:this.customTimeRangeArray[e].start},end:function(e){return(0,T.SE)(e),e>=this.customTimeRangeArray.length||e<0?NaN:this.customTimeRangeArray[e].end}}}t.__dashjs_factory_name="CustomTimeRanges",we.Z=ie.Z.getClassFactory(t)},5:function($e,we,O){var ie=O(5448);function T(){var t,e=/^[a-z][a-z0-9+\-_.]*:/i,p=/^https?:\/\//i,y=/^https:\/\//i,u=/^([a-z][a-z0-9+\-_.]*:\/\/[^\/]+)\/?/i,g=function(F,ee){try{return new window.URL(F,ee).toString()}catch{return F}},E=function(F,ee){var M=n;if(!ee||!D(F))return F;Z(F)&&(M=l),k(F)&&(M=d);var A=M(ee),U=A.charAt(A.length-1)!=="/"&&F.charAt(0)!=="/"?"/":"";return[A,F].join(U)};function n(F){var ee=F.indexOf("/"),M=F.lastIndexOf("/");return ee!==-1?M===ee+1?F:(F.indexOf("?")!==-1&&(F=F.substring(0,F.indexOf("?"))),F.substring(0,M+1)):""}function l(F){var ee=F.match(u);return ee?ee[1]:""}function d(F){var ee=F.match(e);return ee?ee[0]:""}function D(F){return!e.test(F)}function Z(F){return D(F)&&F.charAt(0)==="/"}function k(F){return F.indexOf("//")===0}return function(){try{new window.URL("x","http://y"),t=g}catch{}finally{t=t||E}}(),{parseBaseUrl:n,parseOrigin:l,parseScheme:d,isRelative:D,isPathAbsolute:Z,isSchemeRelative:k,isHTTPURL:function(F){return p.test(F)},isHTTPS:function(F){return y.test(F)},removeHostname:function(F){return/^(?:\w+\:\/\/)?([^\/]+)(.*)$/.exec(F)[2].substring(1)},resolve:function(F,ee){return t(F,ee)}}}T.__dashjs_factory_name="DefaultURLUtils",we.Z=ie.Z.getSingletonFactory(T)},8260:function($e,we,O){var ie=O(2839),T=O(5448);function t(){var e;function p(u){var g=[];if(!u||!e||typeof e.fetchAll!="function")return g;for(var E,n=e.fetchAll(u),l=0,d=n.length;l0?u[u.length-1]:null}}}t.__dashjs_factory_name="IsoFile",we.Z=T.Z.getClassFactory(t)},7473:function($e,we,O){O.d(we,{k:function(){return T}});var ie=O(5448);function T(e,p){var y={url:e.url,method:e.method,headers:Object.assign({},e.headers),credentials:e.withCredentials?"include":void 0};return Promise.resolve(p.modifyRequest(y)).then(function(){return Object.assign(e,y,{withCredentials:y.credentials==="include"})})}function t(){return{modifyRequest:null,modifyRequestURL:function(e){return e},modifyRequestHeader:function(e,p){return p.url,e}}}t.__dashjs_factory_name="RequestModifier",we.Z=ie.Z.getSingletonFactory(t)},3106:function($e,we,O){O.d(we,{PS:function(){return t},SE:function(){return e}});var ie=O(3393);function T(p){return T=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(y){return typeof y}:function(y){return y&&typeof Symbol=="function"&&y.constructor===Symbol&&y!==Symbol.prototype?"symbol":typeof y},T(p)}function t(p,y){if(T(p)!==y)throw ie.Z.BAD_ARGUMENT_ERROR}function e(p){if(p===null||isNaN(p)||p%1!=0)throw ie.Z.BAD_ARGUMENT_ERROR+" : argument is not an integer"}},2594:function($e,we,O){var ie=O(5448),T=O(5);function t(){var p,y=[],u=this.context;function g(E,n,l){var d=function(D){var Z;for(Z=0;Z-1},!0),we.extendedFilter=O(function(T,t){var e=T.split("-"),p=t.split("-"),y=0,u=0;if(p[u]!=="*"&&e[y]!==p[u])return!1;for(y++,u++;u-1||!Z[ee]||!Z[ee].length)&&d(Z,ee,A[ee])}function l(Z,k,F){var ee,M,A,U,J=!1;if(F){if(M=ee=Z[k],ee&&typeof ee=="object")for(M=[],A=-1;++A1&&ee<9){if(Z.language=k.slice(0,ee),ee<4)for(l=0;F.charCodeAt(ee)===45&&T(F.charCodeAt(ee+1))&&T(F.charCodeAt(ee+2))&&T(F.charCodeAt(ee+3))&&!T(F.charCodeAt(ee+4));){if(l>2)return M(ee,3,"Too many extended language subtags, expected at most 3 subtags");Z.extendedLanguageSubtags.push(k.slice(ee+1,ee+4)),ee+=4,l++}for(F.charCodeAt(ee)===45&&T(F.charCodeAt(ee+1))&&T(F.charCodeAt(ee+2))&&T(F.charCodeAt(ee+3))&&T(F.charCodeAt(ee+4))&&!T(F.charCodeAt(ee+5))&&(Z.script=k.slice(ee+1,ee+5),ee+=5),F.charCodeAt(ee)===45&&(T(F.charCodeAt(ee+1))&&T(F.charCodeAt(ee+2))&&!T(F.charCodeAt(ee+3))?(Z.region=k.slice(ee+1,ee+3),ee+=3):t(F.charCodeAt(ee+1))&&t(F.charCodeAt(ee+2))&&t(F.charCodeAt(ee+3))&&!t(F.charCodeAt(ee+4))&&(Z.region=k.slice(ee+1,ee+4),ee+=4));F.charCodeAt(ee)===45;){for(d=n=ee+1;ie(F.charCodeAt(d));){if(d-n>7)return M(d,1,"Too long variant, expected at most 8 characters");d++}if(!(d-n>4||d-n>3&&t(F.charCodeAt(n))))break;Z.variants.push(k.slice(n,d)),ee=d}for(;F.charCodeAt(ee)===45&&F.charCodeAt(ee+1)!==120&&ie(F.charCodeAt(ee+1))&&F.charCodeAt(ee+2)===45&&ie(F.charCodeAt(ee+3));){for(d=ee+2,l=0;F.charCodeAt(d)===45&&ie(F.charCodeAt(d+1))&&ie(F.charCodeAt(d+2));)for(d=(n=d+1)+2,l++;ie(F.charCodeAt(d));){if(d-n>7)return M(d,2,"Too long extension, expected at most 8 characters");d++}if(!l)return M(d,4,"Empty extension, extensions must have at least 2 characters of content");Z.extensions.push({singleton:k.charAt(ee+1),extensions:k.slice(ee+3,d).split("-")}),ee=d}}else ee=0;if(ee===0&&F.charCodeAt(ee)===120||F.charCodeAt(ee)===45&&F.charCodeAt(ee+1)===120)for(d=ee=ee?ee+2:1;F.charCodeAt(d)===45&&ie(F.charCodeAt(d+1));){for(d=n=ee+1;ie(F.charCodeAt(d));){if(d-n>7)return M(d,5,"Too long private-use area, expected at most 8 characters");d++}Z.privateuse.push(k.slice(ee+1,d)),ee=d}return ee!==k.length?M(ee,6,"Found superfluous content after tag"):Z;function M(A,U,J){return D.warning&&D.warning(J,U,A),D.forgiving?Z:{language:null,extendedLanguageSubtags:[],script:null,region:null,variants:[],extensions:[],privateuse:[],irregular:null,regular:null}}};var y={}.hasOwnProperty},6713:function($e){$e.exports=function(we){var O,ie,T,t=we||{},e=[];if(t.irregular||t.regular)return t.irregular||t.regular;if(t.language)for(e=e.concat(t.language,t.extendedLanguageSubtags||[],t.script||[],t.region||[],t.variants||[]),O=t.extensions||[],ie=-1;++iee)throw new RangeError('The value "'+f+'" is invalid for option "size"');var i=new Uint8Array(f);return Object.setPrototypeOf(i,y.prototype),i}function y(f,i,v){if(typeof f=="number"){if(typeof i=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return E(f)}return u(f,i,v)}function u(f,i,v){if(typeof f=="string")return function(V,he){if(typeof he=="string"&&he!==""||(he="utf8"),!y.isEncoding(he))throw new TypeError("Unknown encoding: "+he);var Me=0|D(V,he),Oe=p(Me),Se=Oe.write(V,he);return Se!==Me&&(Oe=Oe.slice(0,Se)),Oe}(f,i);if(ArrayBuffer.isView(f))return function(V){if(de(V,Uint8Array)){var he=new Uint8Array(V);return l(he.buffer,he.byteOffset,he.byteLength)}return n(V)}(f);if(f==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof f);if(de(f,ArrayBuffer)||f&&de(f.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(de(f,SharedArrayBuffer)||f&&de(f.buffer,SharedArrayBuffer)))return l(f,i,v);if(typeof f=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var S=f.valueOf&&f.valueOf();if(S!=null&&S!==f)return y.from(S,i,v);var W=function(V){if(y.isBuffer(V)){var he=0|d(V.length),Me=p(he);return Me.length===0||V.copy(Me,0,0,he),Me}return V.length!==void 0?typeof V.length!="number"||ge(V.length)?p(0):n(V):V.type==="Buffer"&&Array.isArray(V.data)?n(V.data):void 0}(f);if(W)return W;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof f[Symbol.toPrimitive]=="function")return y.from(f[Symbol.toPrimitive]("string"),i,v);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof f)}function g(f){if(typeof f!="number")throw new TypeError('"size" argument must be of type number');if(f<0)throw new RangeError('The value "'+f+'" is invalid for option "size"')}function E(f){return g(f),p(f<0?0:0|d(f))}function n(f){for(var i=f.length<0?0:0|d(f.length),v=p(i),S=0;S=e)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+e.toString(16)+" bytes");return 0|f}function D(f,i){if(y.isBuffer(f))return f.length;if(ArrayBuffer.isView(f)||de(f,ArrayBuffer))return f.byteLength;if(typeof f!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof f);var v=f.length,S=arguments.length>2&&arguments[2]===!0;if(!S&&v===0)return 0;for(var W=!1;;)switch(i){case"ascii":case"latin1":case"binary":return v;case"utf8":case"utf-8":return ft(f).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*v;case"hex":return v>>>1;case"base64":return qe(f).length;default:if(W)return S?-1:ft(f).length;i=(""+i).toLowerCase(),W=!0}}function Z(f,i,v){var S=!1;if((i===void 0||i<0)&&(i=0),i>this.length||((v===void 0||v>this.length)&&(v=this.length),v<=0)||(v>>>=0)<=(i>>>=0))return"";for(f||(f="utf8");;)switch(f){case"hex":return Le(this,i,v);case"utf8":case"utf-8":return Je(this,i,v);case"ascii":return Ce(this,i,v);case"latin1":case"binary":return He(this,i,v);case"base64":return Ee(this,i,v);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ve(this,i,v);default:if(S)throw new TypeError("Unknown encoding: "+f);f=(f+"").toLowerCase(),S=!0}}function k(f,i,v){var S=f[i];f[i]=f[v],f[v]=S}function F(f,i,v,S,W){if(f.length===0)return-1;if(typeof v=="string"?(S=v,v=0):v>2147483647?v=2147483647:v<-2147483648&&(v=-2147483648),ge(v=+v)&&(v=W?0:f.length-1),v<0&&(v=f.length+v),v>=f.length){if(W)return-1;v=f.length-1}else if(v<0){if(!W)return-1;v=0}if(typeof i=="string"&&(i=y.from(i,S)),y.isBuffer(i))return i.length===0?-1:ee(f,i,v,S,W);if(typeof i=="number")return i&=255,typeof Uint8Array.prototype.indexOf=="function"?W?Uint8Array.prototype.indexOf.call(f,i,v):Uint8Array.prototype.lastIndexOf.call(f,i,v):ee(f,[i],v,S,W);throw new TypeError("val must be string, number or Buffer")}function ee(f,i,v,S,W){var V,he=1,Me=f.length,Oe=i.length;if(S!==void 0&&((S=String(S).toLowerCase())==="ucs2"||S==="ucs-2"||S==="utf16le"||S==="utf-16le")){if(f.length<2||i.length<2)return-1;he=2,Me/=2,Oe/=2,v/=2}function Se(At,tt){return he===1?At[tt]:At.readUInt16BE(tt*he)}if(W){var Ne=-1;for(V=v;VMe&&(v=Me-Oe),V=v;V>=0;V--){for(var Ke=!0,We=0;WeW&&(S=W):S=W;var V=i.length;S>V/2&&(S=V/2);for(var he=0;he>8,Oe=he%256,Se.push(Oe),Se.push(Me);return Se}(i,f.length-v),f,v,S)}function Ee(f,i,v){return i===0&&v===f.length?ie.fromByteArray(f):ie.fromByteArray(f.slice(i,v))}function Je(f,i,v){v=Math.min(f.length,v);for(var S=[],W=i;W239?4:Se>223?3:Se>191?2:1;if(W+Ke<=v)switch(Ke){case 1:Se<128&&(Ne=Se);break;case 2:(192&(V=f[W+1]))==128&&(Oe=(31&Se)<<6|63&V)>127&&(Ne=Oe);break;case 3:V=f[W+1],he=f[W+2],(192&V)==128&&(192&he)==128&&(Oe=(15&Se)<<12|(63&V)<<6|63&he)>2047&&(Oe<55296||Oe>57343)&&(Ne=Oe);break;case 4:V=f[W+1],he=f[W+2],Me=f[W+3],(192&V)==128&&(192&he)==128&&(192&Me)==128&&(Oe=(15&Se)<<18|(63&V)<<12|(63&he)<<6|63&Me)>65535&&Oe<1114112&&(Ne=Oe)}Ne===null?(Ne=65533,Ke=1):Ne>65535&&(Ne-=65536,S.push(Ne>>>10&1023|55296),Ne=56320|1023&Ne),S.push(Ne),W+=Ke}return function(We){var At=We.length;if(At<=oe)return String.fromCharCode.apply(String,We);for(var tt="",Dt=0;Dt"u"||typeof console.error!="function"||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(y.prototype,"parent",{enumerable:!0,get:function(){if(y.isBuffer(this))return this.buffer}}),Object.defineProperty(y.prototype,"offset",{enumerable:!0,get:function(){if(y.isBuffer(this))return this.byteOffset}}),y.poolSize=8192,y.from=function(f,i,v){return u(f,i,v)},Object.setPrototypeOf(y.prototype,Uint8Array.prototype),Object.setPrototypeOf(y,Uint8Array),y.alloc=function(f,i,v){return function(S,W,V){return g(S),S<=0?p(S):W!==void 0?typeof V=="string"?p(S).fill(W,V):p(S).fill(W):p(S)}(f,i,v)},y.allocUnsafe=function(f){return E(f)},y.allocUnsafeSlow=function(f){return E(f)},y.isBuffer=function(f){return f!=null&&f._isBuffer===!0&&f!==y.prototype},y.compare=function(f,i){if(de(f,Uint8Array)&&(f=y.from(f,f.offset,f.byteLength)),de(i,Uint8Array)&&(i=y.from(i,i.offset,i.byteLength)),!y.isBuffer(f)||!y.isBuffer(i))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(f===i)return 0;for(var v=f.length,S=i.length,W=0,V=Math.min(v,S);WS.length?y.from(V).copy(S,W):Uint8Array.prototype.set.call(S,V,W);else{if(!y.isBuffer(V))throw new TypeError('"list" argument must be an Array of Buffers');V.copy(S,W)}W+=V.length}return S},y.byteLength=D,y.prototype._isBuffer=!0,y.prototype.swap16=function(){var f=this.length;if(f%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var i=0;ii&&(f+=" ... "),""},t&&(y.prototype[t]=y.prototype.inspect),y.prototype.compare=function(f,i,v,S,W){if(de(f,Uint8Array)&&(f=y.from(f,f.offset,f.byteLength)),!y.isBuffer(f))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof f);if(i===void 0&&(i=0),v===void 0&&(v=f?f.length:0),S===void 0&&(S=0),W===void 0&&(W=this.length),i<0||v>f.length||S<0||W>this.length)throw new RangeError("out of range index");if(S>=W&&i>=v)return 0;if(S>=W)return-1;if(i>=v)return 1;if(this===f)return 0;for(var V=(W>>>=0)-(S>>>=0),he=(v>>>=0)-(i>>>=0),Me=Math.min(V,he),Oe=this.slice(S,W),Se=f.slice(i,v),Ne=0;Ne>>=0,isFinite(v)?(v>>>=0,S===void 0&&(S="utf8")):(S=v,v=void 0)}var W=this.length-i;if((v===void 0||v>W)&&(v=W),f.length>0&&(v<0||i<0)||i>this.length)throw new RangeError("Attempt to write outside buffer bounds");S||(S="utf8");for(var V=!1;;)switch(S){case"hex":return M(this,f,i,v);case"utf8":case"utf-8":return A(this,f,i,v);case"ascii":case"latin1":case"binary":return U(this,f,i,v);case"base64":return J(this,f,i,v);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return $(this,f,i,v);default:if(V)throw new TypeError("Unknown encoding: "+S);S=(""+S).toLowerCase(),V=!0}},y.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var oe=4096;function Ce(f,i,v){var S="";v=Math.min(f.length,v);for(var W=i;WS)&&(v=S);for(var W="",V=i;Vv)throw new RangeError("Trying to access beyond buffer length")}function Be(f,i,v,S,W,V){if(!y.isBuffer(f))throw new TypeError('"buffer" argument must be a Buffer instance');if(i>W||if.length)throw new RangeError("Index out of range")}function ct(f,i,v,S,W,V){if(v+S>f.length)throw new RangeError("Index out of range");if(v<0)throw new RangeError("Index out of range")}function _e(f,i,v,S,W){return i=+i,v>>>=0,W||ct(f,0,v,4),T.write(f,i,v,S,23,4),v+4}function Ge(f,i,v,S,W){return i=+i,v>>>=0,W||ct(f,0,v,8),T.write(f,i,v,S,52,8),v+8}y.prototype.slice=function(f,i){var v=this.length;(f=~~f)<0?(f+=v)<0&&(f=0):f>v&&(f=v),(i=i===void 0?v:~~i)<0?(i+=v)<0&&(i=0):i>v&&(i=v),i>>=0,i>>>=0,v||Ue(f,i,this.length);for(var S=this[f],W=1,V=0;++V>>=0,i>>>=0,v||Ue(f,i,this.length);for(var S=this[f+--i],W=1;i>0&&(W*=256);)S+=this[f+--i]*W;return S},y.prototype.readUint8=y.prototype.readUInt8=function(f,i){return f>>>=0,i||Ue(f,1,this.length),this[f]},y.prototype.readUint16LE=y.prototype.readUInt16LE=function(f,i){return f>>>=0,i||Ue(f,2,this.length),this[f]|this[f+1]<<8},y.prototype.readUint16BE=y.prototype.readUInt16BE=function(f,i){return f>>>=0,i||Ue(f,2,this.length),this[f]<<8|this[f+1]},y.prototype.readUint32LE=y.prototype.readUInt32LE=function(f,i){return f>>>=0,i||Ue(f,4,this.length),(this[f]|this[f+1]<<8|this[f+2]<<16)+16777216*this[f+3]},y.prototype.readUint32BE=y.prototype.readUInt32BE=function(f,i){return f>>>=0,i||Ue(f,4,this.length),16777216*this[f]+(this[f+1]<<16|this[f+2]<<8|this[f+3])},y.prototype.readIntLE=function(f,i,v){f>>>=0,i>>>=0,v||Ue(f,i,this.length);for(var S=this[f],W=1,V=0;++V=(W*=128)&&(S-=Math.pow(2,8*i)),S},y.prototype.readIntBE=function(f,i,v){f>>>=0,i>>>=0,v||Ue(f,i,this.length);for(var S=i,W=1,V=this[f+--S];S>0&&(W*=256);)V+=this[f+--S]*W;return V>=(W*=128)&&(V-=Math.pow(2,8*i)),V},y.prototype.readInt8=function(f,i){return f>>>=0,i||Ue(f,1,this.length),128&this[f]?-1*(255-this[f]+1):this[f]},y.prototype.readInt16LE=function(f,i){f>>>=0,i||Ue(f,2,this.length);var v=this[f]|this[f+1]<<8;return 32768&v?4294901760|v:v},y.prototype.readInt16BE=function(f,i){f>>>=0,i||Ue(f,2,this.length);var v=this[f+1]|this[f]<<8;return 32768&v?4294901760|v:v},y.prototype.readInt32LE=function(f,i){return f>>>=0,i||Ue(f,4,this.length),this[f]|this[f+1]<<8|this[f+2]<<16|this[f+3]<<24},y.prototype.readInt32BE=function(f,i){return f>>>=0,i||Ue(f,4,this.length),this[f]<<24|this[f+1]<<16|this[f+2]<<8|this[f+3]},y.prototype.readFloatLE=function(f,i){return f>>>=0,i||Ue(f,4,this.length),T.read(this,f,!0,23,4)},y.prototype.readFloatBE=function(f,i){return f>>>=0,i||Ue(f,4,this.length),T.read(this,f,!1,23,4)},y.prototype.readDoubleLE=function(f,i){return f>>>=0,i||Ue(f,8,this.length),T.read(this,f,!0,52,8)},y.prototype.readDoubleBE=function(f,i){return f>>>=0,i||Ue(f,8,this.length),T.read(this,f,!1,52,8)},y.prototype.writeUintLE=y.prototype.writeUIntLE=function(f,i,v,S){f=+f,i>>>=0,v>>>=0,S||Be(this,f,i,v,Math.pow(2,8*v)-1,0);var W=1,V=0;for(this[i]=255&f;++V>>=0,v>>>=0,S||Be(this,f,i,v,Math.pow(2,8*v)-1,0);var W=v-1,V=1;for(this[i+W]=255&f;--W>=0&&(V*=256);)this[i+W]=f/V&255;return i+v},y.prototype.writeUint8=y.prototype.writeUInt8=function(f,i,v){return f=+f,i>>>=0,v||Be(this,f,i,1,255,0),this[i]=255&f,i+1},y.prototype.writeUint16LE=y.prototype.writeUInt16LE=function(f,i,v){return f=+f,i>>>=0,v||Be(this,f,i,2,65535,0),this[i]=255&f,this[i+1]=f>>>8,i+2},y.prototype.writeUint16BE=y.prototype.writeUInt16BE=function(f,i,v){return f=+f,i>>>=0,v||Be(this,f,i,2,65535,0),this[i]=f>>>8,this[i+1]=255&f,i+2},y.prototype.writeUint32LE=y.prototype.writeUInt32LE=function(f,i,v){return f=+f,i>>>=0,v||Be(this,f,i,4,4294967295,0),this[i+3]=f>>>24,this[i+2]=f>>>16,this[i+1]=f>>>8,this[i]=255&f,i+4},y.prototype.writeUint32BE=y.prototype.writeUInt32BE=function(f,i,v){return f=+f,i>>>=0,v||Be(this,f,i,4,4294967295,0),this[i]=f>>>24,this[i+1]=f>>>16,this[i+2]=f>>>8,this[i+3]=255&f,i+4},y.prototype.writeIntLE=function(f,i,v,S){if(f=+f,i>>>=0,!S){var W=Math.pow(2,8*v-1);Be(this,f,i,v,W-1,-W)}var V=0,he=1,Me=0;for(this[i]=255&f;++V>0)-Me&255;return i+v},y.prototype.writeIntBE=function(f,i,v,S){if(f=+f,i>>>=0,!S){var W=Math.pow(2,8*v-1);Be(this,f,i,v,W-1,-W)}var V=v-1,he=1,Me=0;for(this[i+V]=255&f;--V>=0&&(he*=256);)f<0&&Me===0&&this[i+V+1]!==0&&(Me=1),this[i+V]=(f/he>>0)-Me&255;return i+v},y.prototype.writeInt8=function(f,i,v){return f=+f,i>>>=0,v||Be(this,f,i,1,127,-128),f<0&&(f=255+f+1),this[i]=255&f,i+1},y.prototype.writeInt16LE=function(f,i,v){return f=+f,i>>>=0,v||Be(this,f,i,2,32767,-32768),this[i]=255&f,this[i+1]=f>>>8,i+2},y.prototype.writeInt16BE=function(f,i,v){return f=+f,i>>>=0,v||Be(this,f,i,2,32767,-32768),this[i]=f>>>8,this[i+1]=255&f,i+2},y.prototype.writeInt32LE=function(f,i,v){return f=+f,i>>>=0,v||Be(this,f,i,4,2147483647,-2147483648),this[i]=255&f,this[i+1]=f>>>8,this[i+2]=f>>>16,this[i+3]=f>>>24,i+4},y.prototype.writeInt32BE=function(f,i,v){return f=+f,i>>>=0,v||Be(this,f,i,4,2147483647,-2147483648),f<0&&(f=4294967295+f+1),this[i]=f>>>24,this[i+1]=f>>>16,this[i+2]=f>>>8,this[i+3]=255&f,i+4},y.prototype.writeFloatLE=function(f,i,v){return _e(this,f,i,!0,v)},y.prototype.writeFloatBE=function(f,i,v){return _e(this,f,i,!1,v)},y.prototype.writeDoubleLE=function(f,i,v){return Ge(this,f,i,!0,v)},y.prototype.writeDoubleBE=function(f,i,v){return Ge(this,f,i,!1,v)},y.prototype.copy=function(f,i,v,S){if(!y.isBuffer(f))throw new TypeError("argument should be a Buffer");if(v||(v=0),S||S===0||(S=this.length),i>=f.length&&(i=f.length),i||(i=0),S>0&&S=this.length)throw new RangeError("Index out of range");if(S<0)throw new RangeError("sourceEnd out of bounds");S>this.length&&(S=this.length),f.length-i>>=0,v=v===void 0?this.length:v>>>0,f||(f=0),typeof f=="number")for(V=i;V55295&&v<57344){if(!W){if(v>56319){(i-=3)>-1&&V.push(239,191,189);continue}if(he+1===S){(i-=3)>-1&&V.push(239,191,189);continue}W=v;continue}if(v<56320){(i-=3)>-1&&V.push(239,191,189),W=v;continue}v=65536+(W-55296<<10|v-56320)}else W&&(i-=3)>-1&&V.push(239,191,189);if(W=null,v<128){if((i-=1)<0)break;V.push(v)}else if(v<2048){if((i-=2)<0)break;V.push(v>>6|192,63&v|128)}else if(v<65536){if((i-=3)<0)break;V.push(v>>12|224,v>>6&63|128,63&v|128)}else{if(!(v<1114112))throw new Error("Invalid code point");if((i-=4)<0)break;V.push(v>>18|240,v>>12&63|128,v>>6&63|128,63&v|128)}}return V}function qe(f){return ie.toByteArray(function(i){if((i=(i=i.split("=")[0]).trim().replace(vt,"")).length<2)return"";for(;i.length%4!=0;)i+="=";return i}(f))}function et(f,i,v,S){for(var W=0;W=i.length||W>=f.length);++W)i[W+v]=f[W];return W}function de(f,i){return f instanceof i||f!=null&&f.constructor!=null&&f.constructor.name!=null&&f.constructor.name===i.name}function ge(f){return f!=f}var Ve=function(){for(var f="0123456789abcdef",i=new Array(256),v=0;v<16;++v)for(var S=16*v,W=0;W<16;++W)i[S+W]=f[v]+f[W];return i}()},6693:function($e,we){we.byteLength=function(g){var E=y(g),n=E[0],l=E[1];return 3*(n+l)/4-l},we.toByteArray=function(g){var E,n,l=y(g),d=l[0],D=l[1],Z=new T(function(ee,M,A){return 3*(M+A)/4-A}(0,d,D)),k=0,F=D>0?d-4:d;for(n=0;n>16&255,Z[k++]=E>>8&255,Z[k++]=255&E;return D===2&&(E=ie[g.charCodeAt(n)]<<2|ie[g.charCodeAt(n+1)]>>4,Z[k++]=255&E),D===1&&(E=ie[g.charCodeAt(n)]<<10|ie[g.charCodeAt(n+1)]<<4|ie[g.charCodeAt(n+2)]>>2,Z[k++]=E>>8&255,Z[k++]=255&E),Z},we.fromByteArray=function(g){for(var E,n=g.length,l=n%3,d=[],D=16383,Z=0,k=n-l;Zk?k:Z+D));return l===1?(E=g[n-1],d.push(O[E>>2]+O[E<<4&63]+"==")):l===2&&(E=(g[n-2]<<8)+g[n-1],d.push(O[E>>10]+O[E>>4&63]+O[E<<2&63]+"=")),d.join("")};for(var O=[],ie=[],T=typeof Uint8Array<"u"?Uint8Array:Array,t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e=0,p=t.length;e0)throw new Error("Invalid string. Length must be a multiple of 4");var n=g.indexOf("=");return n===-1&&(n=E),[n,n===E?0:4-n%4]}function u(g,E,n){for(var l,d,D=[],Z=E;Z>18&63]+O[d>>12&63]+O[d>>6&63]+O[63&d]);return D.join("")}ie["-".charCodeAt(0)]=62,ie["_".charCodeAt(0)]=63},2165:function($e,we){we.read=function(O,ie,T,t,e){var p,y,u=8*e-t-1,g=(1<>1,n=-7,l=T?e-1:0,d=T?-1:1,D=O[ie+l];for(l+=d,p=D&(1<<-n)-1,D>>=-n,n+=u;n>0;p=256*p+O[ie+l],l+=d,n-=8);for(y=p&(1<<-n)-1,p>>=-n,n+=t;n>0;y=256*y+O[ie+l],l+=d,n-=8);if(p===0)p=1-E;else{if(p===g)return y?NaN:1/0*(D?-1:1);y+=Math.pow(2,t),p-=E}return(D?-1:1)*y*Math.pow(2,p-t)},we.write=function(O,ie,T,t,e,p){var y,u,g,E=8*p-e-1,n=(1<>1,d=e===23?Math.pow(2,-24)-Math.pow(2,-77):0,D=t?0:p-1,Z=t?1:-1,k=ie<0||ie===0&&1/ie<0?1:0;for(ie=Math.abs(ie),isNaN(ie)||ie===1/0?(u=isNaN(ie)?1:0,y=n):(y=Math.floor(Math.log(ie)/Math.LN2),ie*(g=Math.pow(2,-y))<1&&(y--,g*=2),(ie+=y+l>=1?d/g:d*Math.pow(2,1-l))*g>=2&&(y++,g/=2),y+l>=n?(u=0,y=n):y+l>=1?(u=(ie*g-1)*Math.pow(2,e),y+=l):(u=ie*Math.pow(2,l-1)*Math.pow(2,e),y=0));e>=8;O[T+D]=255&u,D+=Z,u/=256,e-=8);for(y=y<0;O[T+D]=255&y,D+=Z,y/=256,E-=8);O[T+D-Z]|=128*k}},6934:function($e,we){var O={parseBuffer:function(t){return new ie(t).parse()},addBoxProcessor:function(t,e){typeof t=="string"&&typeof e=="function"&&(T.prototype._boxProcessors[t]=e)},createFile:function(){return new ie},createBox:function(t,e,p){var y=T.create(t);return e&&e.append(y,p),y},createFullBox:function(t,e,p){var y=O.createBox(t,e,p);return y.version=0,y.flags=0,y},Utils:{}};O.Utils.dataViewToString=function(t,e){var p=e||"utf-8";if(typeof TextDecoder<"u")return new TextDecoder(p).decode(t);var y=[],u=0;if(p==="utf-8")for(;u>6),e.push(128|63&y)):y<65536?(e.push(224|y>>12),e.push(128|63&y>>6),e.push(128|63&y)):(e.push(240|y>>18),e.push(128|63&y>>12),e.push(128|63&y>>6),e.push(128|63&y))}return e},O.Utils.appendBox=function(t,e,p){if(e._offset=t._cursor.offset,e._root=t._root?t._root:t,e._raw=t._raw,e._parent=t,p!==-1)if(p!=null){var y,u=-1;if(typeof p=="number")u=p;else{if(typeof p=="string")y=p;else{if(typeof p!="object"||!p.type)return void t.boxes.push(e);y=p.type}for(var g=0;g>3,e},T.prototype._readUint=function(t){var e,p,y=null,u=this._cursor.offset-this._raw.byteOffset;switch(t){case 8:y=this._raw.getUint8(u);break;case 16:y=this._raw.getUint16(u);break;case 24:y=((e=this._raw.getUint16(u))<<8)+(p=this._raw.getUint8(u+2));break;case 32:y=this._raw.getUint32(u);break;case 64:e=this._raw.getUint32(u),p=this._raw.getUint32(u+4),y=e*Math.pow(2,32)+p}return this._cursor.offset+=t>>3,y},T.prototype._readString=function(t){for(var e="",p=0;p0?t:this._raw.byteLength-(this._cursor.offset-this._offset);if(e>0){var p=new Uint8Array(this._raw.buffer,this._cursor.offset,e);return this._cursor.offset+=e,p}return null},T.prototype._readUTF8String=function(){var t=this._raw.byteLength-(this._cursor.offset-this._offset),e=null;return t>0&&(e=new DataView(this._raw.buffer,this._cursor.offset,t),this._cursor.offset+=t),e&&O.Utils.dataViewToString(e)},T.prototype._parseBox=function(){if(this._parsing=!0,this._cursor.offset=this._offset,this._offset+8>this._raw.buffer.byteLength)this._root._incomplete=!0;else{switch(this._procField("size","uint",32),this._procField("type","string",4),this.size===1&&this._procField("largesize","uint",64),this.type==="uuid"&&this._procFieldArray("usertype",16,"uint",8),this.size){case 0:this._raw=new DataView(this._raw.buffer,this._offset);break;case 1:this._offset+this.size>this._raw.buffer.byteLength?(this._incomplete=!0,this._root._incomplete=!0):this._raw=new DataView(this._raw.buffer,this._offset,this.largesize);break;default:this._offset+this.size>this._raw.buffer.byteLength?(this._incomplete=!0,this._root._incomplete=!0):this._raw=new DataView(this._raw.buffer,this._offset,this.size)}this._incomplete||(this._boxProcessors[this.type]&&this._boxProcessors[this.type].call(this),this._boxContainers.indexOf(this.type)!==-1?this._parseContainerBox():this._data=this._readData())}},T.prototype._parseFullBox=function(){this.version=this._readUint(8),this.flags=this._readUint(24)},T.prototype._parseContainerBox=function(){for(this.boxes=[];this._cursor.offset-this._raw.byteOffset>3}else this.size+=t>>3},T.prototype._writeUint=function(t,e){if(this._rawo){var p,y,u=this._cursor.offset-this._rawo.byteOffset;switch(t){case 8:this._rawo.setUint8(u,e);break;case 16:this._rawo.setUint16(u,e);break;case 24:p=(16776960&e)>>8,y=255&e,this._rawo.setUint16(u,p),this._rawo.setUint8(u+2,y);break;case 32:this._rawo.setUint32(u,e);break;case 64:y=e-(p=Math.floor(e/Math.pow(2,32)))*Math.pow(2,32),this._rawo.setUint32(u,p),this._rawo.setUint32(u+4,y)}this._cursor.offset+=t>>3}else this.size+=t>>3},T.prototype._writeString=function(t,e){for(var p=0;p>10&31),96+(this.language>>5&31),96+(31&this.language))),this._procField("pre_defined","uint",16)},T.prototype._boxProcessors.mehd=function(){this._procFullBox(),this._procField("fragment_duration","uint",this.version==1?64:32)},T.prototype._boxProcessors.mfhd=function(){this._procFullBox(),this._procField("sequence_number","uint",32)},T.prototype._boxProcessors.mfro=function(){this._procFullBox(),this._procField("mfra_size","uint",32)},T.prototype._boxProcessors.mp4a=T.prototype._boxProcessors.enca=function(){this._procFieldArray("reserved1",6,"uint",8),this._procField("data_reference_index","uint",16),this._procFieldArray("reserved2",2,"uint",32),this._procField("channelcount","uint",16),this._procField("samplesize","uint",16),this._procField("pre_defined","uint",16),this._procField("reserved3","uint",16),this._procField("samplerate","template",32),this._procField("esds","data",-1)},T.prototype._boxProcessors.mvhd=function(){this._procFullBox(),this._procField("creation_time","uint",this.version==1?64:32),this._procField("modification_time","uint",this.version==1?64:32),this._procField("timescale","uint",32),this._procField("duration","uint",this.version==1?64:32),this._procField("rate","template",32),this._procField("volume","template",16),this._procField("reserved1","uint",16),this._procFieldArray("reserved2",2,"uint",32),this._procFieldArray("matrix",9,"template",32),this._procFieldArray("pre_defined",6,"uint",32),this._procField("next_track_ID","uint",32)},T.prototype._boxProcessors.payl=function(){this._procField("cue_text","utf8")},T.prototype._boxProcessors.prft=function(){this._procFullBox(),this._procField("reference_track_ID","uint",32),this._procField("ntp_timestamp_sec","uint",32),this._procField("ntp_timestamp_frac","uint",32),this._procField("media_time","uint",this.version==1?64:32)},T.prototype._boxProcessors.pssh=function(){this._procFullBox(),this._procFieldArray("SystemID",16,"uint",8),this._procField("DataSize","uint",32),this._procFieldArray("Data",this.DataSize,"uint",8)},T.prototype._boxProcessors.schm=function(){this._procFullBox(),this._procField("scheme_type","uint",32),this._procField("scheme_version","uint",32),1&this.flags&&this._procField("scheme_uri","string",-1)},T.prototype._boxProcessors.sdtp=function(){this._procFullBox();var t=-1;this._parsing&&(t=this._raw.byteLength-(this._cursor.offset-this._raw.byteOffset)),this._procFieldArray("sample_dependency_table",t,"uint",8)},T.prototype._boxProcessors.sidx=function(){this._procFullBox(),this._procField("reference_ID","uint",32),this._procField("timescale","uint",32),this._procField("earliest_presentation_time","uint",this.version==1?64:32),this._procField("first_offset","uint",this.version==1?64:32),this._procField("reserved","uint",16),this._procField("reference_count","uint",16),this._procEntries("references",this.reference_count,function(t){this._parsing||(t.reference=(1&t.reference_type)<<31,t.reference|=2147483647&t.referenced_size,t.sap=(1&t.starts_with_SAP)<<31,t.sap|=(3&t.SAP_type)<<28,t.sap|=268435455&t.SAP_delta_time),this._procEntryField(t,"reference","uint",32),this._procEntryField(t,"subsegment_duration","uint",32),this._procEntryField(t,"sap","uint",32),this._parsing&&(t.reference_type=t.reference>>31&1,t.referenced_size=2147483647&t.reference,t.starts_with_SAP=t.sap>>31&1,t.SAP_type=t.sap>>28&7,t.SAP_delta_time=268435455&t.sap)})},T.prototype._boxProcessors.smhd=function(){this._procFullBox(),this._procField("balance","uint",16),this._procField("reserved","uint",16)},T.prototype._boxProcessors.ssix=function(){this._procFullBox(),this._procField("subsegment_count","uint",32),this._procEntries("subsegments",this.subsegment_count,function(t){this._procEntryField(t,"ranges_count","uint",32),this._procSubEntries(t,"ranges",t.ranges_count,function(e){this._procEntryField(e,"level","uint",8),this._procEntryField(e,"range_size","uint",24)})})},T.prototype._boxProcessors.stsd=function(){this._procFullBox(),this._procField("entry_count","uint",32),this._procSubBoxes("entries",this.entry_count)},T.prototype._boxProcessors.sttg=function(){this._procField("settings","utf8")},T.prototype._boxProcessors.stts=function(){this._procFullBox(),this._procField("entry_count","uint",32),this._procEntries("entries",this.entry_count,function(t){this._procEntryField(t,"sample_count","uint",32),this._procEntryField(t,"sample_delta","uint",32)})},T.prototype._boxProcessors.subs=function(){this._procFullBox(),this._procField("entry_count","uint",32),this._procEntries("entries",this.entry_count,function(t){this._procEntryField(t,"sample_delta","uint",32),this._procEntryField(t,"subsample_count","uint",16),this._procSubEntries(t,"subsamples",t.subsample_count,function(e){this._procEntryField(e,"subsample_size","uint",this.version===1?32:16),this._procEntryField(e,"subsample_priority","uint",8),this._procEntryField(e,"discardable","uint",8),this._procEntryField(e,"codec_specific_parameters","uint",32)})})},T.prototype._boxProcessors.tenc=function(){this._procFullBox(),this._procField("default_IsEncrypted","uint",24),this._procField("default_IV_size","uint",8),this._procFieldArray("default_KID",16,"uint",8)},T.prototype._boxProcessors.tfdt=function(){this._procFullBox(),this._procField("baseMediaDecodeTime","uint",this.version==1?64:32)},T.prototype._boxProcessors.tfhd=function(){this._procFullBox(),this._procField("track_ID","uint",32),1&this.flags&&this._procField("base_data_offset","uint",64),2&this.flags&&this._procField("sample_description_offset","uint",32),8&this.flags&&this._procField("default_sample_duration","uint",32),16&this.flags&&this._procField("default_sample_size","uint",32),32&this.flags&&this._procField("default_sample_flags","uint",32)},T.prototype._boxProcessors.tfra=function(){this._procFullBox(),this._procField("track_ID","uint",32),this._parsing||(this.reserved=0,this.reserved|=(48&this.length_size_of_traf_num)<<4,this.reserved|=(12&this.length_size_of_trun_num)<<2,this.reserved|=3&this.length_size_of_sample_num),this._procField("reserved","uint",32),this._parsing&&(this.length_size_of_traf_num=(48&this.reserved)>>4,this.length_size_of_trun_num=(12&this.reserved)>>2,this.length_size_of_sample_num=3&this.reserved),this._procField("number_of_entry","uint",32),this._procEntries("entries",this.number_of_entry,function(t){this._procEntryField(t,"time","uint",this.version===1?64:32),this._procEntryField(t,"moof_offset","uint",this.version===1?64:32),this._procEntryField(t,"traf_number","uint",8*(this.length_size_of_traf_num+1)),this._procEntryField(t,"trun_number","uint",8*(this.length_size_of_trun_num+1)),this._procEntryField(t,"sample_number","uint",8*(this.length_size_of_sample_num+1))})},T.prototype._boxProcessors.tkhd=function(){this._procFullBox(),this._procField("creation_time","uint",this.version==1?64:32),this._procField("modification_time","uint",this.version==1?64:32),this._procField("track_ID","uint",32),this._procField("reserved1","uint",32),this._procField("duration","uint",this.version==1?64:32),this._procFieldArray("reserved2",2,"uint",32),this._procField("layer","uint",16),this._procField("alternate_group","uint",16),this._procField("volume","template",16),this._procField("reserved3","uint",16),this._procFieldArray("matrix",9,"template",32),this._procField("width","template",32),this._procField("height","template",32)},T.prototype._boxProcessors.trex=function(){this._procFullBox(),this._procField("track_ID","uint",32),this._procField("default_sample_description_index","uint",32),this._procField("default_sample_duration","uint",32),this._procField("default_sample_size","uint",32),this._procField("default_sample_flags","uint",32)},T.prototype._boxProcessors.trun=function(){this._procFullBox(),this._procField("sample_count","uint",32),1&this.flags&&this._procField("data_offset","int",32),4&this.flags&&this._procField("first_sample_flags","uint",32),this._procEntries("samples",this.sample_count,function(t){256&this.flags&&this._procEntryField(t,"sample_duration","uint",32),512&this.flags&&this._procEntryField(t,"sample_size","uint",32),1024&this.flags&&this._procEntryField(t,"sample_flags","uint",32),2048&this.flags&&this._procEntryField(t,"sample_composition_time_offset",this.version===1?"int":"uint",32)})},T.prototype._boxProcessors["url "]=T.prototype._boxProcessors["urn "]=function(){this._procFullBox(),this.type==="urn "&&this._procField("name","string",-1),this._procField("location","string",-1)},T.prototype._boxProcessors.vlab=function(){this._procField("source_label","utf8")},T.prototype._boxProcessors.vmhd=function(){this._procFullBox(),this._procField("graphicsmode","uint",16),this._procFieldArray("opcolor",3,"uint",16)},T.prototype._boxProcessors.vttC=function(){this._procField("config","utf8")},T.prototype._boxProcessors.vtte=function(){}},5530:function($e,we,O){$e.exports=O(6146).polyfill()},6146:function($e,we,O){$e.exports=function(){function ie(qe){return typeof qe=="function"}var T=Array.isArray?Array.isArray:function(qe){return Object.prototype.toString.call(qe)==="[object Array]"},t=0,e=void 0,p=void 0,y=function(qe,et){D[t]=qe,D[t+1]=et,(t+=2)===2&&(p?p(Z):A())},u=typeof window<"u"?window:void 0,g=u||{},E=g.MutationObserver||g.WebKitMutationObserver,n=typeof self>"u"&&typeof process<"u"&&{}.toString.call(process)==="[object process]",l=typeof Uint8ClampedArray<"u"&&typeof importScripts<"u"&&typeof MessageChannel<"u";function d(){var qe=setTimeout;return function(){return qe(Z,1)}}var D=new Array(1e3);function Z(){for(var qe=0;qe0&&U.length>M&&!U.warned){U.warned=!0;var $=new Error("Possible EventEmitter memory leak detected. "+U.length+" "+String(k)+" listeners added. Use emitter.setMaxListeners() to increase limit");$.name="MaxListenersExceededWarning",$.emitter=Z,$.type=k,$.count=U.length,J=$,console&&console.warn&&console.warn(J)}return Z}function g(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function E(Z,k,F){var ee={fired:!1,wrapFn:void 0,target:Z,type:k,listener:F},M=g.bind(ee);return M.listener=F,ee.wrapFn=M,M}function n(Z,k,F){var ee=Z._events;if(ee===void 0)return[];var M=ee[k];return M===void 0?[]:typeof M=="function"?F?[M.listener||M]:[M]:F?function(A){for(var U=new Array(A.length),J=0;J0&&(A=k[0]),A instanceof Error)throw A;var U=new Error("Unhandled error."+(A?" ("+A.message+")":""));throw U.context=A,U}var J=M[Z];if(J===void 0)return!1;if(typeof J=="function")ie(J,this,k);else{var $=J.length,Ee=d(J,$);for(F=0;F<$;++F)ie(Ee[F],this,k)}return!0},t.prototype.addListener=function(Z,k){return u(this,Z,k,!1)},t.prototype.on=t.prototype.addListener,t.prototype.prependListener=function(Z,k){return u(this,Z,k,!0)},t.prototype.once=function(Z,k){return p(k),this.on(Z,E(this,Z,k)),this},t.prototype.prependOnceListener=function(Z,k){return p(k),this.prependListener(Z,E(this,Z,k)),this},t.prototype.removeListener=function(Z,k){var F,ee,M,A,U;if(p(k),(ee=this._events)===void 0)return this;if((F=ee[Z])===void 0)return this;if(F===k||F.listener===k)--this._eventsCount==0?this._events=Object.create(null):(delete ee[Z],ee.removeListener&&this.emit("removeListener",Z,F.listener||k));else if(typeof F!="function"){for(M=-1,A=F.length-1;A>=0;A--)if(F[A]===k||F[A].listener===k){U=F[A].listener,M=A;break}if(M<0)return this;M===0?F.shift():function(J,$){for(;$+1=0;ee--)this.removeListener(Z,k[ee]);return this},t.prototype.listeners=function(Z){return n(this,Z,!0)},t.prototype.rawListeners=function(Z){return n(this,Z,!1)},t.listenerCount=function(Z,k){return typeof Z.listenerCount=="function"?Z.listenerCount(k):l.call(Z,k)},t.prototype.listenerCount=l,t.prototype.eventNames=function(){return this._eventsCount>0?we(this._events):[]}},3101:function($e){var we=Array.isArray,O=Object.keys,ie=Object.prototype.hasOwnProperty;$e.exports=function T(t,e){if(t===e)return!0;if(t&&e&&typeof t=="object"&&typeof e=="object"){var p,y,u,g=we(t),E=we(e);if(g&&E){if((y=t.length)!=e.length)return!1;for(p=y;p--!=0;)if(!T(t[p],e[p]))return!1;return!0}if(g!=E)return!1;var n=t instanceof Date,l=e instanceof Date;if(n!=l)return!1;if(n&&l)return t.getTime()==e.getTime();var d=t instanceof RegExp,D=e instanceof RegExp;if(d!=D)return!1;if(d&&D)return t.toString()==e.toString();var Z=O(t);if((y=Z.length)!==O(e).length)return!1;for(p=y;p--!=0;)if(!ie.call(e,Z[p]))return!1;for(p=y;p--!=0;)if(!T(t[u=Z[p]],e[u]))return!1;return!0}return t!=t&&e!=e}},3362:function($e,we,O){(function(ie,T,t,e,p){function y(i){if("contents"in i)for(var v=("styleAttrs"in i)?i.styleAttrs[e.byName.ruby.qname]:null,S=i.kind==="span"&&(v==="container"||v==="textContainer"||v==="baseContainer"),W=i.contents.length-1;W>=0;W--)!S||"styleAttrs"in i.contents[W]&&e.byName.ruby.qname in i.contents[W].styleAttrs?y(i.contents[W]):delete i.contents[W]}function u(i,v,S,W){var V=W&&W.timeContainer==="seq",he=0;W&&(he=V&&S?S.end:W.begin),v.begin=v.explicit_begin?v.explicit_begin+he:he;var Me=v.begin,Oe=null;if("sets"in v)for(var Se=0;Se "+i.attributes[W].value)}}return S}function Ge(i,v,S){for(var W in i.attributes)if(i.attributes[W].uri===v&&i.attributes[W].local===S)return i.attributes[W].value;return null}function vt(i,v,S){var W,V=null;return(W=/^(\d+(?:\.\d+)?)f$/.exec(S))!==null?v!==null&&(V=parseFloat(W[1])/v):(W=/^(\d+(?:\.\d+)?)t$/.exec(S))!==null?i!==null&&(V=parseFloat(W[1])/i):(W=/^(\d+(?:\.\d+)?)ms$/.exec(S))!==null?V=parseFloat(W[1])/1e3:(W=/^(\d+(?:\.\d+)?)s$/.exec(S))!==null?V=parseFloat(W[1]):(W=/^(\d+(?:\.\d+)?)h$/.exec(S))!==null?V=3600*parseFloat(W[1]):(W=/^(\d+(?:\.\d+)?)m$/.exec(S))!==null?V=60*parseFloat(W[1]):(W=/^(\d{2,}):(\d\d):(\d\d(?:\.\d+)?)$/.exec(S))!==null?V=3600*parseInt(W[1])+60*parseInt(W[2])+parseFloat(W[3]):(W=/^(\d{2,}):(\d\d):(\d\d)\:(\d{2,})$/.exec(S))!==null&&v!==null&&(V=3600*parseInt(W[1])+60*parseInt(W[2])+parseInt(W[3])+(W[4]===null?0:parseInt(W[4])/v)),V}function ft(i,v,S){for(;v.styleRefs.length>0;){var W=v.styleRefs.pop();W in i.styles?(ft(i,i.styles[W],S),et(i.styles[W].styleAttrs,v.styleAttrs)):ge(S,"Non-existant style id referenced")}}function qe(i,v,S,W){for(var V=v.length-1;V>=0;V--){var he=v[V];he in i.styles?et(i.styles[he].styleAttrs,S):ge(W,"Non-existant style id referenced")}}function et(i,v){for(var S in i)i.hasOwnProperty(S)&&(S in v||(v[S]=i[S]))}function de(i,v){if(i&&i.warn&&i.warn(v))throw v}function ge(i,v){if(i&&i.error&&i.error(v))throw v}function Ve(i,v){throw i&&i.fatal&&i.fatal(v),v}function f(i,v){for(var S,W=0,V=i.length-1;W<=V;){var he=i[S=Math.floor((W+V)/2)];if(hev))return{found:!0,index:S};V=S-1}}return{found:!1,index:W}}ie.fromXML=function(i,v,S){var W=T.parser(!0,{xmlns:!0}),V=[],he=[],Me=[],Oe=0,Se=null;W.onclosetag=function(tt){if(V[0]instanceof ve)Se.head!==null&&Se.head.styling!==null&&qe(Se.head.styling,V[0].styleRefs,V[0].styleAttrs,v),delete V[0].styleRefs;else if(V[0]instanceof l)for(var Dt in V[0].styles)V[0].styles.hasOwnProperty(Dt)&&ft(V[0],V[0].styles[Dt],v);else if(V[0]instanceof oe||V[0]instanceof Ce){if(V[0].contents.length>1){var Mt,Ut=[V[0].contents[0]];for(Mt=1;Mt0&&S&&"onCloseTag"in S&&S.onCloseTag());Me.shift(),he.shift(),V.shift()},W.ontext=function(tt){if(V[0]!==void 0)if(V[0]instanceof Ce||V[0]instanceof oe){if(V[0]instanceof Ce){var Dt=V[0].styleAttrs[e.byName.ruby.qname];if(Dt==="container"||Dt==="textContainer"||Dt==="baseContainer")return}var Mt=new He;Mt.initFromText(Se,V[0],tt,he[0],Me[0],v),V[0].contents.push(Mt)}else V[0]instanceof g&&Oe>0&&S&&"onText"in S&&S.onText(tt)},W.onopentag=function(tt){var Dt=tt.attributes["xml:space"];Dt?Me.unshift(Dt.value):Me.length===0?Me.unshift("default"):Me.unshift(Me[0]);var Mt=tt.attributes["xml:lang"];if(Mt?he.unshift(Mt.value):he.length===0?he.unshift(""):he.unshift(he[0]),tt.uri===t.ns_tt)if(tt.local==="tt")Se!==null&&Ve(v,"Two elements at ("+this.line+","+this.column+")"),(Se=new E).initFromNode(tt,he[0],v),V.unshift(Se);else if(tt.local==="head")V[0]instanceof E||Ve(v,"Parent of element is not at ("+this.line+","+this.column+")"),V.unshift(Se.head);else if(tt.local==="styling")V[0]instanceof n||Ve(v,"Parent of element is not at ("+this.line+","+this.column+")"),V.unshift(Se.head.styling);else if(tt.local==="style"){var Ut;V[0]instanceof l?((Ut=new d).initFromNode(tt,v),Ut.id?Se.head.styling.styles[Ut.id]=Ut:ge(v,"