@eluvio/elv-player-js 2.0.42 → 2.0.44
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.vite/manifest.json +17 -20
- package/dist/Analytics-BERz0XOY.mjs +1815 -0
- package/dist/Analytics-CrJ6Bi-J.js +22 -0
- package/dist/{dash.all.min-DkZVTBxQ.js → dash.all.min-CAGVU549.js} +1 -1
- package/dist/{dash.all.min-z4m1azuR.mjs → dash.all.min-DcN2DbEZ.mjs} +1 -1
- package/dist/elv-player-js.cjs.js +1 -1
- package/dist/elv-player-js.es.js +1 -1
- package/dist/{index-Ckkc2XhG.mjs → index---jn7V6s.mjs} +42 -40
- package/dist/{index-DX1NuRLC.js → index-CkPcE8ht.js} +1 -1
- package/dist/{index-BLNP47d-.mjs → index-D6c2QbKI.mjs} +1 -1
- package/dist/{index-B1oXzsxH.js → index-XoMPqzfs.js} +2 -2
- package/lib/player/Player.js +9 -1
- package/package.json +2 -2
- package/dist/Analytics-BhRv4ND0.js +0 -29
- package/dist/Analytics-DHo2QfUF.mjs +0 -1873
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const el=require("./index-
|
|
1
|
+
"use strict";const el=require("./index-XoMPqzfs.js");var Ko={exports:{}};/*! For license information please see dash.all.min.js.LICENSE.txt */(function(Wo,al){(function(ya,ui){Wo.exports=ui()})(self,function(){return function(){var ya={8107:function(ve,Lt){var M,ct,I,u,n,_=function(h){for(var g=[],r=0;r<h.length;++r){var m=h.charCodeAt(r);m<128?g.push(m):m<2048?(g.push(192|m>>6),g.push(128|63&m)):m<65536?(g.push(224|m>>12),g.push(128|63&m>>6),g.push(128|63&m)):(g.push(240|m>>18),g.push(128|63&m>>12),g.push(128|63&m>>6),g.push(128|63&m))}return g},y=function(h){for(var g=[],r=0;r<h.length;){var m=h[r++];m<128||(m<224?(m=(31&m)<<6,m|=63&h[r++]):m<240?(m=(15&m)<<12,m|=(63&h[r++])<<6,m|=63&h[r++]):(m=(7&m)<<18,m|=(63&h[r++])<<12,m|=(63&h[r++])<<6,m|=63&h[r++])),g.push(String.fromCharCode(m))}return g.join("")},i={};M="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ct=function(h){for(var g=0,r=[],m=0|h.length/3;0<m--;){var d=(h[g]<<16)+(h[g+1]<<8)+h[g+2];g+=3,r.push(M.charAt(63&d>>18)),r.push(M.charAt(63&d>>12)),r.push(M.charAt(63&d>>6)),r.push(M.charAt(63&d))}return h.length-g==2?(d=(h[g]<<16)+(h[g+1]<<8),r.push(M.charAt(63&d>>18)),r.push(M.charAt(63&d>>12)),r.push(M.charAt(63&d>>6)),r.push("=")):h.length-g==1&&(d=h[g]<<16,r.push(M.charAt(63&d>>18)),r.push(M.charAt(63&d>>12)),r.push("==")),r.join("")},I=function(){for(var h=[],g=0;g<64;++g)h[M.charCodeAt(g)]=g;return h[61]=0,h}(),u=function(h){for(var g=0,r=[],m=0|h.length/4;0<m--;){var d=(I[h.charCodeAt(g)]<<18)+(I[h.charCodeAt(g+1)]<<12)+(I[h.charCodeAt(g+2)]<<6)+I[h.charCodeAt(g+3)];r.push(255&d>>16),r.push(255&d>>8),r.push(255&d),g+=4}return r&&(h.charAt(g-2)=="="?(r.pop(),r.pop()):h.charAt(g-1)=="="&&r.pop()),r},n={encode:function(h){for(var g=[],r=0;r<h.length;++r)g.push(h.charCodeAt(r));return g},decode:function(h){for(var g=0;g<s.length;++g)a[g]=String.fromCharCode(a[g]);return a.join("")}},i.decodeArray=function(h){var g=u(h);return new Uint8Array(g)},i.encodeASCII=function(h){var g=n.encode(h);return ct(g)},i.decodeASCII=function(h){var g=u(h);return n.decode(g)},i.encode=function(h){var g=_(h);return ct(g)},i.decode=function(h){var g=u(h);return y(g)},Lt.decode=i.decode,Lt.decodeArray=i.decodeArray,Lt.encode=i.encode,Lt.encodeASCII=i.encodeASCII},4947:function(ve,Lt){(function(M){var ct={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,128:174,129:176,130:189,131:191,132:8482,133:162,134:163,135:9834,136:224,137:32,138:232,139:226,140:234,141:238,142:244,143:251,144:193,145:201,146:211,147:218,148:220,149:252,150:8216,151:161,152:42,153:8217,154:9473,155:169,156:8480,157:8226,158:8220,159:8221,160:192,161:194,162:199,163:200,164:202,165:203,166:235,167:206,168:207,169:239,170:212,171:217,172:249,173:219,174:171,175:187,176:195,177:227,178:205,179:204,180:236,181:210,182:242,183:213,184:245,185:123,186:125,187:92,188:94,189:95,190:124,191:8764,192:196,193:228,194:214,195:246,196:223,197:165,198:164,199:9475,200:197,201:229,202:216,203:248,204:9487,205:9491,206:9495,207:9499},I=function(O){var J=O;return ct.hasOwnProperty(O)&&(J=ct[O]),String.fromCharCode(J)},u=15,n=32,_={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},y={17:2,18:4,21:6,22:8,23:10,19:13,20:15},i={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},h={25:2,26:4,29:6,30:8,31:10,27:13,28:15},g=["white","green","blue","cyan","red","yellow","magenta","black","transparent"],r={verboseFilter:{DATA:3,DEBUG:3,INFO:2,WARNING:2,TEXT:1,ERROR:0},time:null,verboseLevel:0,setTime:function(O){this.time=O},log:function(O,J){var pt=this.verboseFilter[O];this.verboseLevel>=pt&&console.log(this.time+" ["+O+"] "+J)}},m=function(O){for(var J=[],pt=0;pt<O.length;pt++)J.push(O[pt].toString(16));return J},d=function(O,J,pt,G,X){this.foreground=O||"white",this.underline=J||!1,this.italics=pt||!1,this.background=G||"black",this.flash=X||!1};d.prototype={reset:function(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1},setStyles:function(O){for(var J=["foreground","underline","italics","background","flash"],pt=0;pt<J.length;pt++){var G=J[pt];O.hasOwnProperty(G)&&(this[G]=O[G])}},isDefault:function(){return this.foreground==="white"&&!this.underline&&!this.italics&&this.background==="black"&&!this.flash},equals:function(O){return this.foreground===O.foreground&&this.underline===O.underline&&this.italics===O.italics&&this.background===O.background&&this.flash===O.flash},copy:function(O){this.foreground=O.foreground,this.underline=O.underline,this.italics=O.italics,this.background=O.background,this.flash=O.flash},toString:function(){return"color="+this.foreground+", underline="+this.underline+", italics="+this.italics+", background="+this.background+", flash="+this.flash}};var T=function(O,J,pt,G,X,rt){this.uchar=O||" ",this.penState=new d(J,pt,G,X,rt)};T.prototype={reset:function(){this.uchar=" ",this.penState.reset()},setChar:function(O,J){this.uchar=O,this.penState.copy(J)},setPenState:function(O){this.penState.copy(O)},equals:function(O){return this.uchar===O.uchar&&this.penState.equals(O.penState)},copy:function(O){this.uchar=O.uchar,this.penState.copy(O.penState)},isEmpty:function(){return this.uchar===" "&&this.penState.isDefault()}};var q=function(){this.chars=[];for(var O=0;O<n;O++)this.chars.push(new T);this.pos=0,this.currPenState=new d};q.prototype={equals:function(O){for(var J=!0,pt=0;pt<n;pt++)if(!this.chars[pt].equals(O.chars[pt])){J=!1;break}return J},copy:function(O){for(var J=0;J<n;J++)this.chars[J].copy(O.chars[J])},isEmpty:function(){for(var O=!0,J=0;J<n;J++)if(!this.chars[J].isEmpty()){O=!1;break}return O},setCursor:function(O){this.pos!==O&&(this.pos=O),this.pos<0?(r.log("ERROR","Negative cursor position "+this.pos),this.pos=0):this.pos>n&&(r.log("ERROR","Too large cursor position "+this.pos),this.pos=n)},moveCursor:function(O){var J=this.pos+O;if(O>1)for(var pt=this.pos+1;pt<J+1;pt++)this.chars[pt].setPenState(this.currPenState);this.setCursor(J)},backSpace:function(){this.moveCursor(-1),this.chars[this.pos].setChar(" ",this.currPenState)},insertChar:function(O){O>=144&&this.backSpace();var J=I(O);this.pos>=n?r.log("ERROR","Cannot insert "+O.toString(16)+" ("+J+") at position "+this.pos+". Skipping it!"):(this.chars[this.pos].setChar(J,this.currPenState),this.moveCursor(1))},clearFromPos:function(O){var J;for(J=O;J<n;J++)this.chars[J].reset()},clear:function(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()},clearToEndOfRow:function(){this.clearFromPos(this.pos)},getTextString:function(){for(var O=[],J=!0,pt=0;pt<n;pt++){var G=this.chars[pt].uchar;G!==" "&&(J=!1),O.push(G)}return J?"":O.join("")},setPenStyles:function(O){this.currPenState.setStyles(O),this.chars[this.pos].setPenState(this.currPenState)}};var W=function(){this.rows=[];for(var O=0;O<u;O++)this.rows.push(new q);this.currRow=14,this.nrRollUpRows=null,this.reset()};W.prototype={reset:function(){for(var O=0;O<u;O++)this.rows[O].clear();this.currRow=14},equals:function(O){for(var J=!0,pt=0;pt<u;pt++)if(!this.rows[pt].equals(O.rows[pt])){J=!1;break}return J},copy:function(O){for(var J=0;J<u;J++)this.rows[J].copy(O.rows[J])},isEmpty:function(){for(var O=!0,J=0;J<u;J++)if(!this.rows[J].isEmpty()){O=!1;break}return O},backSpace:function(){this.rows[this.currRow].backSpace()},clearToEndOfRow:function(){this.rows[this.currRow].clearToEndOfRow()},insertChar:function(O){this.rows[this.currRow].insertChar(O)},setPen:function(O){this.rows[this.currRow].setPenStyles(O)},moveCursor:function(O){this.rows[this.currRow].moveCursor(O)},setCursor:function(O){r.log("INFO","setCursor: "+O),this.rows[this.currRow].setCursor(O)},setPAC:function(O){r.log("INFO","pacData = "+JSON.stringify(O));var J=O.row-1;this.nrRollUpRows&&J<this.nrRollUpRows-1&&(J=this.nrRollUpRows-1),this.currRow=J;var pt=this.rows[this.currRow];if(O.indent!==null){var G=O.indent,X=Math.max(G-1,0);pt.setCursor(O.indent),O.color=pt.chars[X].penState.foreground}var rt={foreground:O.color,underline:O.underline,italics:O.italics,background:"black",flash:!1};this.setPen(rt)},setBkgData:function(O){r.log("INFO","bkgData = "+JSON.stringify(O)),this.backSpace(),this.setPen(O),this.insertChar(32)},setRollUpRows:function(O){this.nrRollUpRows=O},rollUp:function(){if(this.nrRollUpRows!==null){r.log("TEXT",this.getDisplayText());var O=this.currRow+1-this.nrRollUpRows,J=this.rows.splice(O,1)[0];J.clear(),this.rows.splice(this.currRow,0,J),r.log("INFO","Rolling up")}else r.log("DEBUG","roll_up but nrRollUpRows not set yet")},getDisplayText:function(O){O=O||!1;for(var J=[],pt="",G=-1,X=0;X<u;X++){var rt=this.rows[X].getTextString();rt&&(G=X+1,O?J.push("Row "+G+': "'+rt+'"'):J.push(rt.trim()))}return J.length>0&&(pt=O?"["+J.join(" | ")+"]":J.join(`
|
|
2
2
|
`)),pt},getTextAndFormat:function(){return this.rows}};var x=function(O,J){this.chNr=O,this.outputFilter=J,this.mode=null,this.verbose=0,this.displayedMemory=new W,this.nonDisplayedMemory=new W,this.lastOutputScreen=new W,this.currRollUpRow=this.displayedMemory.rows[14],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null};x.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(O){this.outputFilter=O},setPAC:function(O){this.writeScreen.setPAC(O)},setBkgData:function(O){this.writeScreen.setBkgData(O)},setMode:function(O){O!==this.mode&&(this.mode=O,r.log("INFO","MODE="+O),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=O)},insertChars:function(O){for(var J=0;J<O.length;J++)this.writeScreen.insertChar(O[J]);var pt=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";r.log("INFO",pt+": "+this.writeScreen.getDisplayText(!0)),this.mode!=="MODE_PAINT-ON"&&this.mode!=="MODE_ROLL-UP"||(r.log("TEXT","DISPLAYED: "+this.displayedMemory.getDisplayText(!0)),this.outputDataUpdate())},cc_RCL:function(){r.log("INFO","RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")},cc_BS:function(){r.log("INFO","BS - BackSpace"),this.mode!=="MODE_TEXT"&&(this.writeScreen.backSpace(),this.writeScreen===this.displayedMemory&&this.outputDataUpdate())},cc_AOF:function(){},cc_AON:function(){},cc_DER:function(){r.log("INFO","DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()},cc_RU:function(O){r.log("INFO","RU("+O+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(O)},cc_FON:function(){r.log("INFO","FON - Flash On"),this.writeScreen.setPen({flash:!0})},cc_RDC:function(){r.log("INFO","RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")},cc_TR:function(){r.log("INFO","TR"),this.setMode("MODE_TEXT")},cc_RTD:function(){r.log("INFO","RTD"),this.setMode("MODE_TEXT")},cc_EDM:function(){r.log("INFO","EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate()},cc_CR:function(){r.log("CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate()},cc_ENM:function(){r.log("INFO","ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()},cc_EOC:function(){if(r.log("INFO","EOC - End Of Caption"),this.mode==="MODE_POP-ON"){var O=this.displayedMemory;this.displayedMemory=this.nonDisplayedMemory,this.nonDisplayedMemory=O,this.writeScreen=this.nonDisplayedMemory,r.log("TEXT","DISP: "+this.displayedMemory.getDisplayText())}this.outputDataUpdate()},cc_TO:function(O){r.log("INFO","TO("+O+") - Tab Offset"),this.writeScreen.moveCursor(O)},cc_MIDROW:function(O){var J={flash:!1};if(J.underline=O%2==1,J.italics=O>=46,J.italics)J.foreground="white";else{var pt=Math.floor(O/2)-16;J.foreground=["white","green","blue","cyan","red","yellow","magenta"][pt]}r.log("INFO","MIDROW: "+JSON.stringify(J)),this.writeScreen.setPen(J)},outputDataUpdate:function(){var O=r.time;O!==null&&this.outputFilter&&(this.outputFilter.updateData&&this.outputFilter.updateData(O,this.displayedMemory),this.cueStartTime!==null||this.displayedMemory.isEmpty()?this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,O,this.lastOutputScreen),this.cueStartTime=this.displayedMemory.isEmpty()?null:O):this.cueStartTime=O,this.lastOutputScreen.copy(this.displayedMemory))},cueSplitAtTime:function(O){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,O,this.displayedMemory),this.cueStartTime=O))}};var nt=function(O,J,pt){this.field=O||1,this.outputs=[J,pt],this.channels=[new x(1,J),new x(2,pt)],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}};nt.prototype={getHandler:function(O){return this.channels[O].getHandler()},setHandler:function(O,J){this.channels[O].setHandler(J)},addData:function(O,J){var pt,G,X,rt=!1;this.lastTime=O,r.setTime(O);for(var bt=0;bt<J.length;bt+=2)G=127&J[bt],X=127&J[bt+1],G>=16&&G<=31&&G===this.lastCmdA&&X===this.lastCmdB?(this.lastCmdA=null,this.lastCmdB=null,r.log("DEBUG","Repeated command ("+m([G,X])+") is dropped")):G!==0||X!==0?(r.log("DATA","["+m([J[bt],J[bt+1]])+"] -> ("+m([G,X])+")"),(pt=this.parseCmd(G,X))||(pt=this.parseMidrow(G,X)),pt||(pt=this.parsePAC(G,X)),pt||(pt=this.parseBackgroundAttributes(G,X)),pt||(rt=this.parseChars(G,X))&&(this.currChNr&&this.currChNr>=0?this.channels[this.currChNr-1].insertChars(rt):r.log("WARNING","No channel found yet. TEXT-MODE?")),pt?this.dataCounters.cmd+=2:rt?this.dataCounters.char+=2:(this.dataCounters.other+=2,r.log("WARNING","Couldn't parse cleaned data "+m([G,X])+" orig: "+m([J[bt],J[bt+1]])))):this.dataCounters.padding+=2},parseCmd:function(O,J){var pt;if(!((O===20||O===21||O===28||O===29)&&32<=J&&J<=47||(O===23||O===31)&&33<=J&&J<=35))return!1;pt=O===20||O===21||O===23?1:2;var G=this.channels[pt-1];return O===20||O===21||O===28||O===29?J===32?G.cc_RCL():J===33?G.cc_BS():J===34?G.cc_AOF():J===35?G.cc_AON():J===36?G.cc_DER():J===37?G.cc_RU(2):J===38?G.cc_RU(3):J===39?G.cc_RU(4):J===40?G.cc_FON():J===41?G.cc_RDC():J===42?G.cc_TR():J===43?G.cc_RTD():J===44?G.cc_EDM():J===45?G.cc_CR():J===46?G.cc_ENM():J===47&&G.cc_EOC():G.cc_TO(J-32),this.lastCmdA=O,this.lastCmdB=J,this.currChNr=pt,!0},parseMidrow:function(O,J){var pt=null;if((O===17||O===25)&&32<=J&&J<=47){if((pt=O===17?1:2)!==this.currChNr)return r.log("ERROR","Mismatch channel in midrow parsing"),!1;var G=this.channels[pt-1];return G.insertChars([32]),G.cc_MIDROW(J),r.log("DEBUG","MIDROW ("+m([O,J])+")"),this.lastCmdA=O,this.lastCmdB=J,!0}return!1},parsePAC:function(O,J){var pt,G;if(!((17<=O&&O<=23||25<=O&&O<=31)&&64<=J&&J<=127||(O===16||O===24)&&64<=J&&J<=95))return!1;pt=O<=23?1:2,G=64<=J&&J<=95?pt===1?_[O]:i[O]:pt===1?y[O]:h[O];var X=this.interpretPAC(G,J);return this.channels[pt-1].setPAC(X),this.lastCmdA=O,this.lastCmdB=J,this.currChNr=pt,!0},interpretPAC:function(O,J){var pt,G={color:null,italics:!1,indent:null,underline:!1,row:O};return pt=J>95?J-96:J-64,G.underline=!(1&~pt),pt<=13?G.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(pt/2)]:pt<=15?(G.italics=!0,G.color="white"):G.indent=4*Math.floor((pt-16)/2),G},parseChars:function(O,J){var pt=null,G=null,X=null;if(O>=25?(pt=2,X=O-8):(pt=1,X=O),17<=X&&X<=19){var rt;rt=X===17?J+80:X===18?J+112:J+144,r.log("INFO","Special char '"+I(rt)+"' in channel "+pt),G=[rt],this.lastCmdA=O,this.lastCmdB=J}else 32<=O&&O<=127&&(G=J===0?[O]:[O,J],this.lastCmdA=null,this.lastCmdB=null);if(G){var bt=m(G);r.log("DEBUG","Char codes = "+bt.join(","))}return G},parseBackgroundAttributes:function(O,J){var pt,G,X;return((O===16||O===24)&&32<=J&&J<=47||(O===23||O===31)&&45<=J&&J<=47)&&(pt={},O===16||O===24?(G=Math.floor((J-32)/2),pt.background=g[G],J%2==1&&(pt.background=pt.background+"_semi")):J===45?pt.background="transparent":(pt.foreground="black",J===47&&(pt.underline=!0)),X=O<24?1:2,this.channels[X-1].setBkgData(pt),this.lastCmdA=O,this.lastCmdB=J,!0)},reset:function(){for(var O=0;O<this.channels.length;O++)this.channels[O]&&this.channels[O].reset();this.lastCmdA=null,this.lastCmdB=null},cueSplitAtTime:function(O){for(var J=0;J<this.channels.length;J++)this.channels[J]&&this.channels[J].cueSplitAtTime(O)}},M.logger=r,M.PenState=d,M.CaptionScreen=W,M.Cea608Parser=nt,M.findCea608Nalus=function(O,J,pt){for(var G=0,X=J,rt=[],bt=function(St,Nt,Ht,ie){if(St!==4||Nt<8)return null;var It=Ht.getUint8(ie),Ot=Ht.getUint16(ie+1),fe=Ht.getUint32(ie+3),Ae=Ht.getUint8(ie+7);return It==181&&Ot==49&&fe==1195456820&&Ae==3};X<J+pt;){if(G=O.getUint32(X),(31&O.getUint8(X+4))==6)for(var Ut=X+5,mt=-1;Ut<X+4+G-1;){mt=0;for(var lt=255;lt===255;)mt+=lt=O.getUint8(Ut),Ut++;var jt=0;for(lt=255;lt===255;)jt+=lt=O.getUint8(Ut),Ut++;bt(mt,jt,O,Ut)&&rt.push([Ut,jt]),Ut+=jt}X+=G+4}return rt},M.extractCea608DataFromRange=function(O,J){var pt=J[0],G=[[],[]];pt+=8;var X=31&O.getUint8(pt);pt+=2;for(var rt=0;rt<X;rt++){var bt=O.getUint8(pt),Ut=4&bt,mt=3&bt;pt++;var lt=O.getUint8(pt);pt++;var jt=O.getUint8(pt);pt++,Ut&&(127<)+(127&jt)!=0&&(mt===0?(G[0].push(lt),G[0].push(jt)):mt===1&&(G[1].push(lt),G[1].push(jt)))}return G}})(Lt)},1229:function(ve,Lt,M){var ct=M(4716),I=M(5742),u=M(4413),n=M(6558),_=(M(8175),typeof window<"u"&&window||M.g),y=_.dashjs;y||(y=_.dashjs={}),y.MediaPlayer=ct.A,y.FactoryMaker=I.A,y.Debug=u.A,y.Version=(0,n.i)()},4413:function(ve,Lt,M){var ct=M(8366),I=M(4865),u=M(5742),n=1,_=2,y=3,i=4,h=5;function g(m){m=m||{};var d,T,q,W,x=this.context,nt=(0,ct.A)(x).getInstance(),O=m.settings,J=[];function pt(lt){return lt&<.bind?lt.bind(window.console):window.console.log.bind(window.console)}function G(){for(var lt=arguments.length,jt=new Array(lt),St=0;St<lt;St++)jt[St]=arguments[St];mt.apply(void 0,[n,this].concat(jt))}function X(){for(var lt=arguments.length,jt=new Array(lt),St=0;St<lt;St++)jt[St]=arguments[St];mt.apply(void 0,[_,this].concat(jt))}function rt(){for(var lt=arguments.length,jt=new Array(lt),St=0;St<lt;St++)jt[St]=arguments[St];mt.apply(void 0,[y,this].concat(jt))}function bt(){for(var lt=arguments.length,jt=new Array(lt),St=0;St<lt;St++)jt[St]=arguments[St];mt.apply(void 0,[i,this].concat(jt))}function Ut(){for(var lt=arguments.length,jt=new Array(lt),St=0;St<lt;St++)jt[St]=arguments[St];mt.apply(void 0,[h,this].concat(jt))}function mt(lt,jt){var St="",Nt=null;T&&(Nt=new Date().getTime(),St+="["+(Nt-W)+"]"),q&&jt&&jt.getClassName&&(St+="["+jt.getClassName()+"]",jt.getType&&(St+="["+jt.getType()+"]")),St.length>0&&(St+=" ");for(var Ht=arguments.length,ie=new Array(Ht>2?Ht-2:0),It=2;It<Ht;It++)ie[It-2]=arguments[It];Array.apply(null,ie).forEach(function(Ot){St+=Ot+" "}),J[lt]&&O&&O.get().debug.logLevel>=lt&&J[lt](St),O&&O.get().debug.dispatchEvent&&nt.trigger(I.A.LOG,{message:St,level:lt})}return d={getLogger:function(lt){return{fatal:G.bind(lt),error:X.bind(lt),warn:rt.bind(lt),info:bt.bind(lt),debug:Ut.bind(lt)}},setLogTimestampVisible:function(lt){T=lt},setCalleeNameVisible:function(lt){q=lt}},T=!0,q=!0,W=new Date().getTime(),typeof window<"u"&&window.console&&(J[n]=pt(window.console.error),J[_]=pt(window.console.error),J[y]=pt(window.console.warn),J[i]=pt(window.console.info),J[h]=pt(window.console.debug)),d}g.__dashjs_factory_name="Debug";var r=u.A.getSingletonFactory(g);r.LOG_LEVEL_NONE=0,r.LOG_LEVEL_FATAL=n,r.LOG_LEVEL_ERROR=_,r.LOG_LEVEL_WARNING=y,r.LOG_LEVEL_INFO=i,r.LOG_LEVEL_DEBUG=h,u.A.updateSingletonFactory(g.__dashjs_factory_name,r),Lt.A=r},8366:function(ve,Lt,M){var ct=M(5742),I=M(7547);function u(){var _={};function y(h,g,r){var m=-1;return _[h]&&_[h].some(function(d,T){if(d&&d.callback===g&&(!r||r===d.scope))return m=T,!0}),m}var i={on:function(h,g,r){var m=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};if(!h)throw new Error("event type cannot be null or undefined");if(!g||typeof g!="function")throw new Error("listener must be a function: "+g);var d=m.priority||0;if(!(y(h,g,r)>=0)){_[h]=_[h]||[];var T={callback:g,scope:r,priority:d};r&&r.getStreamId&&(T.streamId=r.getStreamId()),r&&r.getType&&(T.mediaType=r.getType()),m&&m.mode&&(T.mode=m.mode),_[h].some(function(q,W){if(q&&d>q.priority)return _[h].splice(W,0,T),!0})||_[h].push(T)}},off:function(h,g,r){if(h&&g&&_[h]){var m=y(h,g,r);m<0||(_[h][m]=null)}},trigger:function(h){var g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(h&&_[h]){if((g=g||{}).hasOwnProperty("type"))throw new Error("'type' is a reserved word for event dispatching");g.type=h,r.streamId&&(g.streamId=r.streamId),r.mediaType&&(g.mediaType=r.mediaType),_[h].filter(function(m){return!(!m||r.streamId&&m.streamId&&m.streamId!==r.streamId||r.mediaType&&m.mediaType&&m.mediaType!==r.mediaType||r.mode&&m.mode&&m.mode!==r.mode||!m.mode&&r.mode&&r.mode===I.A.EVENT_MODE_ON_RECEIVE)}).forEach(function(m){return m&&m.callback.call(m.scope,g)})}},reset:function(){_={}}};return i}u.__dashjs_factory_name="EventBus";var n=ct.A.getSingletonFactory(u);n.EVENT_PRIORITY_LOW=0,n.EVENT_PRIORITY_HIGH=5e3,ct.A.updateSingletonFactory(u.__dashjs_factory_name,n),Lt.A=n},5742:function(ve,Lt){var M=function(){var ct,I=[],u={},n={};function _(g,r){for(var m in I){var d=I[m];if(d.context===g&&d.name===r)return d.instance}return null}function y(g,r){return r[g]}function i(g,r,m){g in m&&(m[g]=r)}function h(g,r,m){var d,T=g.__dashjs_factory_name,q=r[T];if(q){var W=q.instance;if(!q.override)return W.apply({context:r,factory:ct},m);for(var x in d=g.apply({context:r},m),W=W.apply({context:r,factory:ct,parent:d},m))d.hasOwnProperty(x)&&(d[x]=W[x])}else d=g.apply({context:r},m);return d.getClassName=function(){return T},d}return ct={extend:function(g,r,m,d){!d[g]&&r&&(d[g]={instance:r,override:m})},getSingletonInstance:_,setSingletonInstance:function(g,r,m){for(var d in I){var T=I[d];if(T.context===g&&T.name===r)return void(I[d].instance=m)}I.push({name:r,context:g,instance:m})},deleteSingletonInstances:function(g){I=I.filter(function(r){return r.context!==g})},getSingletonFactory:function(g){var r=y(g.__dashjs_factory_name,u);return r||(r=function(m){var d;return m===void 0&&(m={}),{getInstance:function(){return d||(d=_(m,g.__dashjs_factory_name)),d||(d=h(g,m,arguments),I.push({name:g.__dashjs_factory_name,context:m,instance:d})),d}}},u[g.__dashjs_factory_name]=r),r},getSingletonFactoryByName:function(g){return y(g,u)},updateSingletonFactory:function(g,r){i(g,r,u)},getClassFactory:function(g){var r=y(g.__dashjs_factory_name,n);return r||(r=function(m){return m===void 0&&(m={}),{create:function(){return h(g,m,arguments)}}},n[g.__dashjs_factory_name]=r),r},getClassFactoryByName:function(g){return y(g,n)},updateClassFactory:function(g,r){i(g,r,n)}},ct}();Lt.A=M},1657:function(ve,Lt,M){var ct=M(5742),I=M(1739),u=M(4413),n=M(7256),_=M(2756),y=M(8366),i=M(4865);function h(d){return h=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(T){return typeof T}:function(T){return T&&typeof Symbol=="function"&&T.constructor===Symbol&&T!==Symbol.prototype?"symbol":typeof T},h(d)}function g(d,T,q){return(T=function(W){var x=function(nt){if(h(nt)!="object"||!nt)return nt;var O=nt[Symbol.toPrimitive];if(O!==void 0){var J=O.call(nt,"string");if(h(J)!="object")return J;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(nt)}(W);return h(x)=="symbol"?x:x+""}(T))in d?Object.defineProperty(d,T,{value:q,enumerable:!0,configurable:!0,writable:!0}):d[T]=q,d}function r(){var d=this.context,T=(0,y.A)(d).getInstance(),q={"streaming.delay.liveDelay":i.A.SETTING_UPDATED_LIVE_DELAY,"streaming.delay.liveDelayFragmentCount":i.A.SETTING_UPDATED_LIVE_DELAY_FRAGMENT_COUNT,"streaming.liveCatchup.enabled":i.A.SETTING_UPDATED_CATCHUP_ENABLED,"streaming.liveCatchup.playbackRate.min":i.A.SETTING_UPDATED_PLAYBACK_RATE_MIN,"streaming.liveCatchup.playbackRate.max":i.A.SETTING_UPDATED_PLAYBACK_RATE_MAX},W={debug:{logLevel:u.A.LOG_LEVEL_WARNING,dispatchEvent:!1},streaming:{abandonLoadTimeout:1e4,wallclockTimeUpdateInterval:100,manifestUpdateRetryInterval:100,liveUpdateTimeThresholdInMilliseconds:0,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,dispatchForManualRendering:!1,extendSegmentedCues:!0,imsc:{displayForcedOnlyMode:!1,enableRollUp:!0},webvtt:{customRenderingEnabled:!1}},liveCatchup:{maxDrift:NaN,playbackRate:{min:NaN,max:NaN},playbackBufferMin:.5,enabled:null,mode:n.A.LIVE_CATCHUP_MODE_DEFAULT},lastBitrateCachingInfo:{enabled:!0,ttl:36e4},lastMediaSettingsCachingInfo:{enabled:!0,ttl:36e4},saveLastMediaSettingsForCurrentStreamingSession:!0,cacheLoadThresholds:{video:50,audio:5},trackSwitchMode:{audio:n.A.TRACK_SWITCH_MODE_ALWAYS_REPLACE,video:n.A.TRACK_SWITCH_MODE_NEVER_REPLACE},selectionModeForInitialTrack:n.A.TRACK_SELECTION_MODE_HIGHEST_SELECTION_PRIORITY,fragmentRequestTimeout:2e4,fragmentRequestProgressTimeout:-1,manifestRequestTimeout:1e4,retryIntervals:g(g(g(g(g(g(g(g(g(g({},_.G.MPD_TYPE,500),_.G.XLINK_EXPANSION_TYPE,500),_.G.MEDIA_SEGMENT_TYPE,1e3),_.G.INIT_SEGMENT_TYPE,1e3),_.G.BITSTREAM_SWITCHING_SEGMENT_TYPE,1e3),_.G.INDEX_SEGMENT_TYPE,1e3),_.G.MSS_FRAGMENT_INFO_SEGMENT_TYPE,1e3),_.G.LICENSE,1e3),_.G.OTHER_TYPE,1e3),"lowLatencyReductionFactor",10),retryAttempts:g(g(g(g(g(g(g(g(g(g({},_.G.MPD_TYPE,3),_.G.XLINK_EXPANSION_TYPE,1),_.G.MEDIA_SEGMENT_TYPE,3),_.G.INIT_SEGMENT_TYPE,3),_.G.BITSTREAM_SWITCHING_SEGMENT_TYPE,3),_.G.INDEX_SEGMENT_TYPE,3),_.G.MSS_FRAGMENT_INFO_SEGMENT_TYPE,3),_.G.LICENSE,3),_.G.OTHER_TYPE,3),"lowLatencyMultiplyFactor",5),abr:{movingAverageMethod:n.A.MOVING_AVERAGE_SLIDING_WINDOW,ABRStrategy:n.A.ABR_STRATEGY_DYNAMIC,additionalAbrRules:{insufficientBufferRule:!0,switchHistoryRule:!0,droppedFramesRule:!0,abandonRequestsRule:!0},abrRulesParameters:{abandonRequestsRule:{graceTimeThreshold:500,abandonMultiplier:1.8,minLengthToAverage:5}},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:n.A.ABR_FETCH_THROUGHPUT_CALCULATION_MOOF_PARSING},cmcd:{enabled:!1,sid:null,cid:null,rtp:null,rtpSafetyFactor:5,mode:n.A.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}}},x=I.A.clone(W);function nt(O,J,pt){for(var G in O)O.hasOwnProperty(G)&&(J.hasOwnProperty(G)?h(O[G])!=="object"||O[G]instanceof Array||O[G]===null?(J[G]=I.A.clone(O[G]),q[pt+G]&&T.trigger(q[pt+G])):nt(O[G],J[G],pt.slice()+G+"."):console.error("Settings parameter "+pt+G+" is not supported"))}return{get:function(){return x},update:function(O){h(O)==="object"&&nt(O,x,"")},reset:function(){x=I.A.clone(W)}}}r.__dashjs_factory_name="Settings";var m=ct.A.getSingletonFactory(r);Lt.A=m},1739:function(ve,Lt,M){var ct=M(5684),I=M.n(ct),u=M(3785);function n(h){return n=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},n(h)}function _(h,g){for(var r=0;r<g.length;r++){var m=g[r];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(h,y(m.key),m)}}function y(h){var g=function(r){if(n(r)!="object"||!r)return r;var m=r[Symbol.toPrimitive];if(m!==void 0){var d=m.call(r,"string");if(n(d)!="object")return d;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(r)}(h);return n(g)=="symbol"?g:g+""}var i=function(){function h(){(function(m,d){if(!(m instanceof d))throw new TypeError("Cannot call a class as a function")})(this,h)}return g=h,r=[{key:"mixin",value:function(m,d,T){var q,W={};if(m)for(var x in d)d.hasOwnProperty(x)&&(q=d[x],x in m&&(m[x]===q||x in W&&W[x]===q)||(n(m[x])==="object"&&m[x]!==null?m[x]=h.mixin(m[x],q,T):m[x]=T(q)));return m}},{key:"clone",value:function(m){if(!m||n(m)!=="object")return m;var d;if(m instanceof Array){d=[];for(var T=0,q=m.length;T<q;++T)T in m&&d.push(h.clone(m[T]))}else d={};return h.mixin(d,m,h.clone)}},{key:"addAditionalQueryParameterToUrl",value:function(m,d){try{if(!d||d.length===0)return m;var T=new URL(m);return d.forEach(function(q){q.key&&q.value&&T.searchParams.set(q.key,q.value)}),T.href}catch{return m}}},{key:"parseHttpHeaders",value:function(m){var d={};if(!m)return d;for(var T=m.trim().split(`\r
|
|
3
3
|
`),q=0,W=T.length;q<W;q++){var x=T[q],nt=x.indexOf(": ");nt>0&&(d[x.substring(0,nt)]=x.substring(nt+2))}return d}},{key:"generateUuid",value:function(){var m=new Date().getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(d){var T=(m+16*Math.random())%16|0;return m=Math.floor(m/16),(d=="x"?T:3&T|8).toString(16)})}},{key:"generateHashCode",value:function(m){var d=0;if(m.length===0)return d;for(var T=0;T<m.length;T++)d=(d<<5)-d+m.charCodeAt(T),d|=0;return d}},{key:"getRelativeUrl",value:function(m,d){try{var T=new URL(m),q=new URL(d);if(T.protocol=q.protocol,T.origin!==q.origin)return d;var W=I().relative(T.pathname.substr(0,T.pathname.lastIndexOf("/")),q.pathname.substr(0,q.pathname.lastIndexOf("/"))),x=W.length===0?1:0;return W+=q.pathname.substr(q.pathname.lastIndexOf("/")+x,q.pathname.length-1),q.pathname.length<W.length?q.pathname:W}catch{return d}}},{key:"parseUserAgent",value:function(){var m=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null;try{var d=m===null&&typeof navigator<"u"?navigator.userAgent.toLowerCase():"";return(0,u.UAParser)(d)}catch{return{}}}},{key:"stringHasProtocol",value:function(m){return/(http(s?)):\/\//i.test(m)}}],r&&_(g,r),Object.defineProperty(g,"prototype",{writable:!1}),g;var g,r}();Lt.A=i},6558:function(ve,Lt,M){M.d(Lt,{i:function(){return I}});var ct="4.7.4";function I(){return ct}},1840:function(ve,Lt){function M(n){return M=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(_){return typeof _}:function(_){return _&&typeof Symbol=="function"&&_.constructor===Symbol&&_!==Symbol.prototype?"symbol":typeof _},M(n)}function ct(n,_){for(var y=0;y<_.length;y++){var i=_[y];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,I(i.key),i)}}function I(n){var _=function(y){if(M(y)!="object"||!y)return y;var i=y[Symbol.toPrimitive];if(i!==void 0){var h=i.call(y,"string");if(M(h)!="object")return h;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(y)}(n);return M(_)=="symbol"?_:_+""}var u=function(){return n=function y(){(function(i,h){if(!(i instanceof h))throw new TypeError("Cannot call a class as a function")})(this,y)},(_=[{key:"extend",value:function(y,i){if(y){var h=!!i&&i.override,g=!!i&&i.publicOnly;for(var r in y)!y.hasOwnProperty(r)||this[r]&&!h||g&&y[r].indexOf("public_")===-1||(this[r]=y[r])}}}])&&ct(n.prototype,_),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,_}();Lt.A=u},3426:function(ve,Lt,M){function ct(i){return ct=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(h){return typeof h}:function(h){return h&&typeof Symbol=="function"&&h.constructor===Symbol&&h!==Symbol.prototype?"symbol":typeof h},ct(i)}function I(i,h,g){return h=n(h),function(r,m){if(m&&(ct(m)=="object"||typeof m=="function"))return m;if(m!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(d){if(d===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d}(r)}(i,u()?Reflect.construct(h,[],n(i).constructor):h.apply(i,g))}function u(){try{var i=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(u=function(){return!!i})()}function n(i){return n=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(h){return h.__proto__||Object.getPrototypeOf(h)},n(i)}function _(i,h){return _=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(g,r){return g.__proto__=r,g},_(i,h)}var y=function(i){function h(){var r;return function(m,d){if(!(m instanceof d))throw new TypeError("Cannot call a class as a function")}(this,h),(r=I(this,h)).ATTEMPT_BACKGROUND_SYNC="attemptBackgroundSync",r.BUFFERING_COMPLETED="bufferingCompleted",r.BUFFER_CLEARED="bufferCleared",r.BYTES_APPENDED_END_FRAGMENT="bytesAppendedEndFragment",r.BUFFER_REPLACEMENT_STARTED="bufferReplacementStarted",r.CHECK_FOR_EXISTENCE_COMPLETED="checkForExistenceCompleted",r.CMSD_STATIC_HEADER="cmsdStaticHeader",r.CURRENT_TRACK_CHANGED="currentTrackChanged",r.DATA_UPDATE_COMPLETED="dataUpdateCompleted",r.INBAND_EVENTS="inbandEvents",r.INITIAL_STREAM_SWITCH="initialStreamSwitch",r.INIT_FRAGMENT_LOADED="initFragmentLoaded",r.INIT_FRAGMENT_NEEDED="initFragmentNeeded",r.INTERNAL_MANIFEST_LOADED="internalManifestLoaded",r.ORIGINAL_MANIFEST_LOADED="originalManifestLoaded",r.LOADING_COMPLETED="loadingCompleted",r.LOADING_PROGRESS="loadingProgress",r.LOADING_DATA_PROGRESS="loadingDataProgress",r.LOADING_ABANDONED="loadingAborted",r.MANIFEST_UPDATED="manifestUpdated",r.MEDIA_FRAGMENT_LOADED="mediaFragmentLoaded",r.MEDIA_FRAGMENT_NEEDED="mediaFragmentNeeded",r.QUOTA_EXCEEDED="quotaExceeded",r.SEGMENT_LOCATION_BLACKLIST_ADD="segmentLocationBlacklistAdd",r.SEGMENT_LOCATION_BLACKLIST_CHANGED="segmentLocationBlacklistChanged",r.SERVICE_LOCATION_BASE_URL_BLACKLIST_ADD="serviceLocationBlacklistAdd",r.SERVICE_LOCATION_BASE_URL_BLACKLIST_CHANGED="serviceLocationBlacklistChanged",r.SERVICE_LOCATION_LOCATION_BLACKLIST_ADD="serviceLocationLocationBlacklistAdd",r.SERVICE_LOCATION_LOCATION_BLACKLIST_CHANGED="serviceLocationLocationBlacklistChanged",r.SET_FRAGMENTED_TEXT_AFTER_DISABLED="setFragmentedTextAfterDisabled",r.SET_NON_FRAGMENTED_TEXT="setNonFragmentedText",r.SOURCE_BUFFER_ERROR="sourceBufferError",r.STREAMS_COMPOSED="streamsComposed",r.STREAM_BUFFERING_COMPLETED="streamBufferingCompleted",r.STREAM_REQUESTING_COMPLETED="streamRequestingCompleted",r.TEXT_TRACKS_QUEUE_INITIALIZED="textTracksQueueInitialized",r.TIME_SYNCHRONIZATION_COMPLETED="timeSynchronizationComplete",r.UPDATE_TIME_SYNC_OFFSET="updateTimeSyncOffset",r.URL_RESOLUTION_FAILED="urlResolutionFailed",r.VIDEO_CHUNK_RECEIVED="videoChunkReceived",r.WALLCLOCK_TIME_UPDATED="wallclockTimeUpdated",r.XLINK_ELEMENT_LOADED="xlinkElementLoaded",r.XLINK_READY="xlinkReady",r.SEEK_TARGET="seekTarget",r.SETTING_UPDATED_LIVE_DELAY="settingUpdatedLiveDelay",r.SETTING_UPDATED_LIVE_DELAY_FRAGMENT_COUNT="settingUpdatedLiveDelayFragmentCount",r.SETTING_UPDATED_CATCHUP_ENABLED="settingUpdatedCatchupEnabled",r.SETTING_UPDATED_PLAYBACK_RATE_MIN="settingUpdatedPlaybackRateMin",r.SETTING_UPDATED_PLAYBACK_RATE_MAX="settingUpdatedPlaybackRateMax",r}return function(r,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function");r.prototype=Object.create(m&&m.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),m&&_(r,m)}(h,i),g=h,Object.defineProperty(g,"prototype",{writable:!1}),g;var g}(M(9656).A);Lt.A=y},4865:function(ve,Lt,M){function ct(h){return ct=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},ct(h)}function I(h,g,r){return g=n(g),function(m,d){if(d&&(ct(d)=="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(T){if(T===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return T}(m)}(h,u()?Reflect.construct(g,r||[],n(h).constructor):g.apply(h,r))}function u(){try{var h=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(u=function(){return!!h})()}function n(h){return n=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(g){return g.__proto__||Object.getPrototypeOf(g)},n(h)}function _(h,g){return _=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,m){return r.__proto__=m,r},_(h,g)}var y=function(h){function g(){return function(m,d){if(!(m instanceof d))throw new TypeError("Cannot call a class as a function")}(this,g),I(this,g,arguments)}return function(m,d){if(typeof d!="function"&&d!==null)throw new TypeError("Super expression must either be null or a function");m.prototype=Object.create(d&&d.prototype,{constructor:{value:m,writable:!0,configurable:!0}}),Object.defineProperty(m,"prototype",{writable:!1}),d&&_(m,d)}(g,h),r=g,Object.defineProperty(r,"prototype",{writable:!1}),r;var r}(M(3426).A),i=new y;Lt.A=i},9656:function(ve,Lt){function M(n){return M=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(_){return typeof _}:function(_){return _&&typeof Symbol=="function"&&_.constructor===Symbol&&_!==Symbol.prototype?"symbol":typeof _},M(n)}function ct(n,_){for(var y=0;y<_.length;y++){var i=_[y];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,I(i.key),i)}}function I(n){var _=function(y){if(M(y)!="object"||!y)return y;var i=y[Symbol.toPrimitive];if(i!==void 0){var h=i.call(y,"string");if(M(h)!="object")return h;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(y)}(n);return M(_)=="symbol"?_:_+""}var u=function(){return n=function y(){(function(i,h){if(!(i instanceof h))throw new TypeError("Cannot call a class as a function")})(this,y)},(_=[{key:"extend",value:function(y,i){if(y){var h=!!i&&i.override,g=!!i&&i.publicOnly;for(var r in y)!y.hasOwnProperty(r)||this[r]&&!h||g&&y[r].indexOf("public_")===-1||(this[r]=y[r])}}}])&&ct(n.prototype,_),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,_}();Lt.A=u},2945:function(ve,Lt,M){var ct=M(2686),I=M(2756),u=M(5742),n=M(7547),_=M(284),y=M(5810);function i(h){var g,r,m,d,T,q=(h=h||{}).eventBus,W=h.debug,x=h.urlUtils,nt=h.type,O=h.streamInfo,J=h.segmentsController,pt=h.timelineConverter,G=h.baseURLController;function X(){return nt}function rt(){m=null}function bt(St,Nt,Ht){var ie,It,Ot=G.resolve(Ht.path),fe={};return Ot&&Nt!==Ot.url&&x.isRelative(Nt)?(ie=Ot.url,It=Ot.serviceLocation,fe=Ot.queryParams,Nt&&(ie=x.resolve(Nt,ie))):ie=Nt,!x.isRelative(ie)&&(St.url=ie,St.serviceLocation=It,St.queryParams=fe,!0)}function Ut(St,Nt){if(Nt==null)return null;var Ht=new ct.A,ie=Nt.representation,It=ie.adaptation.period.mpd.manifest.Period_asArray[ie.adaptation.period.index].AdaptationSet_asArray[ie.adaptation.index].Representation_asArray[ie.index].bandwidth,Ot=Nt.media;return Ot=(0,_.XX)(Ot,"Number",Nt.replacementNumber),Ot=(0,_.XX)(Ot,"Time",Nt.replacementTime),Ot=(0,_.XX)(Ot,"Bandwidth",It),Ot=(0,_.dD)(Ot,ie.id),Ot=(0,_.Dr)(Ot),Ht.mediaType=X(),Ht.type=I.G.MEDIA_SEGMENT_TYPE,Ht.range=Nt.mediaRange,Ht.startTime=Nt.presentationStartTime,Ht.mediaStartTime=Nt.mediaStartTime,Ht.duration=Nt.duration,Ht.timescale=ie.timescale,Ht.availabilityStartTime=Nt.availabilityStartTime,Ht.availabilityEndTime=Nt.availabilityEndTime,Ht.availabilityTimeComplete=ie.availabilityTimeComplete,Ht.wallStartTime=Nt.wallStartTime,Ht.quality=ie.index,Ht.index=Nt.index,Ht.mediaInfo=St,Ht.adaptationIndex=ie.adaptation.index,Ht.representationId=ie.id,bt(Ht,Ot,ie)?Ht:void 0}function mt(St,Nt,Ht){var ie=null;if(!Nt||!Nt.segmentInfoType)return ie;var It=J.getSegmentByTime(Nt,Ht);return It&&(m=It,r.debug("Index for time "+Ht+" is "+It.index),ie=Ut(St,It)),ie}function lt(St,Nt,Ht){var ie=null,It=J.getSegmentByIndex(Nt,Ht,m?m.mediaStartTime:-1);if(It)ie=Ut(St,It),m=It;else{if(d&&!T)return r.debug(X()+" No segment found at index: "+Ht+". Wait for next loop"),null;T=!0}return ie}function jt(){r.debug("Dynamic stream complete"),T=!0}return g={getCurrentIndex:function(){return m?m.index:-1},getInitRequest:function(St,Nt){return Nt?function(Ht,ie,It){var Ot=new ct.A,fe=ie.adaptation.period,Ae=fe.start;if(Ot.mediaType=It,Ot.type=I.G.INIT_SEGMENT_TYPE,Ot.range=ie.range,Ot.availabilityStartTime=pt.calcAvailabilityStartTimeFromPresentationTime(Ae,ie,d),Ot.availabilityEndTime=pt.calcAvailabilityEndTimeFromPresentationTime(Ae+fe.duration,ie,d),Ot.quality=ie.index,Ot.mediaInfo=Ht,Ot.representationId=ie.id,bt(Ot,ie.initialization,ie))return Ot.url=(0,_.XX)(Ot.url,"Bandwidth",ie.bandwidth),Ot}(St,Nt,X()):null},getNextSegmentRequest:function(St,Nt){return Nt&&Nt.segmentInfoType?lt(St,Nt,m?m.index+1:0):null},getNextSegmentRequestIdempotent:function(St,Nt){var Ht=m?m.index+1:0,ie=J.getSegmentByIndex(Nt,Ht,m?m.mediaStartTime:-1);return ie?Ut(St,ie):null},getSegmentRequestForTime:mt,getStreamId:function(){return O.id},getStreamInfo:function(){return O},getType:X,getValidTimeAheadOfTargetTime:function(St,Nt,Ht,ie){try{if(isNaN(St)||!Nt||!Ht)return NaN;if(St<0&&(St=0),isNaN(ie)&&(ie=.5),mt(Nt,Ht,St))return St;if(Ht.adaptation.period.start+Ht.adaptation.period.duration<St)return NaN;for(var It=isFinite(Ht.adaptation.period.duration)?Ht.adaptation.period.start+Ht.adaptation.period.duration:St+30,Ot=Math.min(St+ie,It),fe=NaN,Ae=null;Ot<=It;){var Re=null;if(Ot<=It&&(Re=mt(Nt,Ht,Ot)),Re){fe=Ot,Ae=Re;break}Ot+=ie}if(Ae){var Pe=Ae.startTime+Ae.duration;return St>Ae.startTime&&Pe-St>ie?St:!isNaN(Ae.startTime)&&St<Ae.startTime&&fe>Ae.startTime?Ae.startTime+.001:Math.min(Pe-ie,fe)}return fe}catch{return NaN}},initialize:function(St){d=St,T=!1,J.initialize(St)},isLastSegmentRequested:function(St,Nt){return!St||!m?!1:T?!0:!isFinite(St.adaptation.period.duration)||m.presentationStartTime+m.duration>Nt?!1:St.mediaFinishedInformation&&!isNaN(St.mediaFinishedInformation.numberOfSegments)&&!isNaN(m.index)&&m.index>=St.mediaFinishedInformation.numberOfSegments-1&&(!d||St.segmentInfoType===y.A.SEGMENT_TEMPLATE||d&&St.segmentInfoType===y.A.SEGMENT_LIST&&St.adaptation.period.nextPeriodId)?!0:!!(d&&St.adaptation.period.nextPeriodId&&St.segmentInfoType===y.A.SEGMENT_TIMELINE&&St.mediaFinishedInformation&&!isNaN(St.mediaFinishedInformation.mediaTimeOfLastSignaledSegment)&&m&&!isNaN(m.mediaStartTime)&&!isNaN(m.duration)&&m.mediaStartTime+m.duration>=St.mediaFinishedInformation.mediaTimeOfLastSignaledSegment-.05)},repeatSegmentRequest:function(St,Nt){return Nt&&Nt.segmentInfoType?lt(St,Nt,m?m.index:0):null},reset:function(){rt(),q.off(n.A.DYNAMIC_TO_STATIC,jt,g)}},r=W.getLogger(g),rt(),q.on(n.A.DYNAMIC_TO_STATIC,jt,g),g}i.__dashjs_factory_name="DashHandler",Lt.A=u.A.getClassFactory(i)},5810:function(ve,Lt){function M(n){return M=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(_){return typeof _}:function(_){return _&&typeof Symbol=="function"&&_.constructor===Symbol&&_!==Symbol.prototype?"symbol":typeof _},M(n)}function ct(n,_){for(var y=0;y<_.length;y++){var i=_[y];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,I(i.key),i)}}function I(n){var _=function(y){if(M(y)!="object"||!y)return y;var i=y[Symbol.toPrimitive];if(i!==void 0){var h=i.call(y,"string");if(M(h)!="object")return h;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(y)}(n);return M(_)=="symbol"?_:_+""}var u=new(function(){return n=function y(){(function(i,h){if(!(i instanceof h))throw new TypeError("Cannot call a class as a function")})(this,y),this.init()},(_=[{key:"init",value:function(){this.BASE_URL="BaseURL",this.SEGMENT_BASE="SegmentBase",this.SEGMENT_TEMPLATE="SegmentTemplate",this.SEGMENT_LIST="SegmentList",this.SEGMENT_URL="SegmentURL",this.SEGMENT_TIMELINE="SegmentTimeline",this.SEGMENT_PROFILES="segmentProfiles",this.ADAPTATION_SET="AdaptationSet",this.REPRESENTATION="Representation",this.REPRESENTATION_INDEX="RepresentationIndex",this.SUB_REPRESENTATION="SubRepresentation",this.INITIALIZATION="Initialization",this.INITIALIZATION_MINUS="initialization",this.MPD="MPD",this.PERIOD="Period",this.ASSET_IDENTIFIER="AssetIdentifier",this.EVENT_STREAM="EventStream",this.ID="id",this.PROFILES="profiles",this.SERVICE_LOCATION="serviceLocation",this.RANGE="range",this.INDEX="index",this.MEDIA="media",this.BYTE_RANGE="byteRange",this.INDEX_RANGE="indexRange",this.MEDIA_RANGE="mediaRange",this.VALUE="value",this.CONTENT_TYPE="contentType",this.MIME_TYPE="mimeType",this.BITSTREAM_SWITCHING="BitstreamSwitching",this.BITSTREAM_SWITCHING_MINUS="bitstreamSwitching",this.CODECS="codecs",this.DEPENDENCY_ID="dependencyId",this.MEDIA_STREAM_STRUCTURE_ID="mediaStreamStructureId",this.METRICS="Metrics",this.METRICS_MINUS="metrics",this.REPORTING="Reporting",this.WIDTH="width",this.HEIGHT="height",this.SAR="sar",this.FRAMERATE="frameRate",this.AUDIO_SAMPLING_RATE="audioSamplingRate",this.MAXIMUM_SAP_PERIOD="maximumSAPPeriod",this.START_WITH_SAP="startWithSAP",this.MAX_PLAYOUT_RATE="maxPlayoutRate",this.CODING_DEPENDENCY="codingDependency",this.SCAN_TYPE="scanType",this.FRAME_PACKING="FramePacking",this.AUDIO_CHANNEL_CONFIGURATION="AudioChannelConfiguration",this.CONTENT_PROTECTION="ContentProtection",this.ESSENTIAL_PROPERTY="EssentialProperty",this.ESSENTIAL_PROPERTY_ASARRAY="EssentialProperty_asArray",this.SUPPLEMENTAL_PROPERTY="SupplementalProperty",this.SUPPLEMENTAL_PROPERTY_ASARRAY="SupplementalProperty_asArray",this.INBAND_EVENT_STREAM="InbandEventStream",this.PRODUCER_REFERENCE_TIME="ProducerReferenceTime",this.INBAND="inband",this.TYPE="type",this.ACCESSIBILITY="Accessibility",this.ROLE="Role",this.RATING="Rating",this.CONTENT_COMPONENT="ContentComponent",this.SUBSET="Subset",this.LANG="lang",this.VIEWPOINT="Viewpoint",this.VIEWPOINT_ASARRAY="Viewpoint_asArray",this.ROLE_ASARRAY="Role_asArray",this.REPRESENTATION_ASARRAY="Representation_asArray",this.PRODUCERREFERENCETIME_ASARRAY="ProducerReferenceTime_asArray",this.ACCESSIBILITY_ASARRAY="Accessibility_asArray",this.AUDIOCHANNELCONFIGURATION_ASARRAY="AudioChannelConfiguration_asArray",this.CONTENTPROTECTION_ASARRAY="ContentProtection_asArray",this.MAIN="main",this.DYNAMIC="dynamic",this.STATIC="static",this.MEDIA_PRESENTATION_DURATION="mediaPresentationDuration",this.MINIMUM_UPDATE_PERIOD="minimumUpdatePeriod",this.CODEC_PRIVATE_DATA="codecPrivateData",this.BANDWITH="bandwidth",this.SOURCE_URL="sourceURL",this.TIMESCALE="timescale",this.DURATION="duration",this.START_NUMBER="startNumber",this.PRESENTATION_TIME_OFFSET="presentationTimeOffset",this.AVAILABILITY_START_TIME="availabilityStartTime",this.AVAILABILITY_END_TIME="availabilityEndTime",this.TIMESHIFT_BUFFER_DEPTH="timeShiftBufferDepth",this.MAX_SEGMENT_DURATION="maxSegmentDuration",this.PRESENTATION_TIME="presentationTime",this.MIN_BUFFER_TIME="minBufferTime",this.MAX_SUBSEGMENT_DURATION="maxSubsegmentDuration",this.START="start",this.AVAILABILITY_TIME_OFFSET="availabilityTimeOffset",this.AVAILABILITY_TIME_COMPLETE="availabilityTimeComplete",this.CENC_DEFAULT_KID="cenc:default_KID",this.DVB_PRIORITY="dvb:priority",this.DVB_WEIGHT="dvb:weight",this.DVB_URL="dvb:url",this.DVB_MIMETYPE="dvb:mimeType",this.DVB_FONTFAMILY="dvb:fontFamily",this.SUGGESTED_PRESENTATION_DELAY="suggestedPresentationDelay",this.SERVICE_DESCRIPTION="ServiceDescription",this.SERVICE_DESCRIPTION_SCOPE="Scope",this.SERVICE_DESCRIPTION_LATENCY="Latency",this.SERVICE_DESCRIPTION_PLAYBACK_RATE="PlaybackRate",this.SERVICE_DESCRIPTION_OPERATING_QUALITY="OperatingQuality",this.SERVICE_DESCRIPTION_OPERATING_BANDWIDTH="OperatingBandwidth",this.PATCH_LOCATION="PatchLocation",this.PATCH_LOCATION_AS_ARRAY="PatchLocation_asArray",this.LOCATION="Location",this.LOCATION_AS_ARRAY="Location_asArray",this.PUBLISH_TIME="publishTime",this.ORIGINAL_PUBLISH_TIME="originalPublishTime",this.ORIGINAL_MPD_ID="mpdId",this.WALL_CLOCK_TIME="wallClockTime",this.PRESENTATION_TIME="presentationTime",this.LABEL="Label",this.GROUP_LABEL="GroupLabel",this.CONTENT_STEERING="ContentSteering",this.CONTENT_STEERING_AS_ARRAY="ContentSteering_asArray",this.DEFAULT_SERVICE_LOCATION="defaultServiceLocation",this.QUERY_BEFORE_START="queryBeforeStart",this.CLIENT_REQUIREMENT="clientRequirement",this.TTL="ttl",this.CONTENT_STEERING_RESPONSE={VERSION:"VERSION",TTL:"TTL",RELOAD_URI:"RELOAD-URI",PATHWAY_PRIORITY:"PATHWAY-PRIORITY",PATHWAY_CLONES:"PATHWAY-CLONES",BASE_ID:"BASE-ID",ID:"ID",URI_REPLACEMENT:"URI-REPLACEMENT",HOST:"HOST",PARAMS:"PARAMS"},this.PRODUCER_REFERENCE_TIME_TYPE={ENCODER:"encoder",CAPTURED:"captured",APPLICATION:"application"},this.SEGMENT_ALIGNMENT="segmentAlignment",this.SUB_SEGMENT_ALIGNMENT="subsegmentAlignment"}}])&&ct(n.prototype,_),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,_}());Lt.A=u},6849:function(ve,Lt,M){var ct=M(5742),I=M(9569),u=M(9032),n=M(8610),_=M(8396);function y(h){h=h||{};var g,r,m=this.context,d=h.dashConstants,T=h.type,q=h.segmentBaseController;function W(x){return x?x.segments?r[d.SEGMENT_BASE]:r[x.segmentInfoType]:null}return g={initialize:function(x){r[d.SEGMENT_TIMELINE]=(0,I.A)(m).create(h,x),r[d.SEGMENT_TEMPLATE]=(0,u.A)(m).create(h,x),r[d.SEGMENT_LIST]=(0,n.A)(m).create(h,x),r[d.SEGMENT_BASE]=(0,_.A)(m).create(h,x)},updateInitData:function(x,nt){return nt?Promise.resolve():q.getSegmentBaseInitSegment({representation:x,mediaType:T})},updateSegmentData:function(x,nt){return nt?Promise.resolve():q.getSegmentList({mimeType:x.mimeType,representation:x,mediaType:T})},getSegmentByIndex:function(x,nt,O){var J=W(x);return J?J.getSegmentByIndex(x,nt,O):null},getSegmentByTime:function(x,nt){var O=W(x);return O?O.getSegmentByTime(x,nt):null},getMediaFinishedInformation:function(x){var nt=W(x);return nt?nt.getMediaFinishedInformation(x):{numberOfSegments:0,mediaTimeOfLastSignaledSegment:NaN}}},r={},g}y.__dashjs_factory_name="SegmentsController";var i=ct.A.getClassFactory(y);Lt.A=i},8610:function(ve,Lt,M){var ct=M(5742),I=M(7256),u=M(284);function n(y,i){var h=(y=y||{}).timelineConverter;function g(){if(!h||!h.hasOwnProperty("calcPeriodRelativeTimeFromMpdRelativeTime"))throw new Error(I.A.MISSING_CONFIG_ERROR)}function r(m,d){if(g(),!m)return null;var T=m.adaptation.period.mpd.manifest.Period_asArray[m.adaptation.period.index].AdaptationSet_asArray[m.adaptation.index].Representation_asArray[m.index].SegmentList,q=T.SegmentURL_asArray.length,W=m&&!isNaN(m.startNumber)?m.startNumber:1,x=Math.max(W-1,0),nt=Math.max(d-x,0),O=null;if(nt<q){var J=T.SegmentURL_asArray[nt];(O=(0,u.L$)(h,i,m,d))&&(O.replacementTime=(W+d-1)*m.segmentDuration,O.media=J.media?J.media:"",O.mediaRange=J.mediaRange,O.indexRange=J.indexRange)}return O}return{getSegmentByIndex:r,getSegmentByTime:function(m,d){if(g(),!m)return null;var T=m.segmentDuration;if(isNaN(T))return null;var q=h.calcPeriodRelativeTimeFromMpdRelativeTime(m,d);return r(m,Math.floor(q/T))},getMediaFinishedInformation:function(m){var d={numberOfSegments:0,mediaTimeOfLastSignaledSegment:NaN};if(!m)return d;var T=m.adaptation.period.mpd.manifest.Period_asArray[m.adaptation.period.index].AdaptationSet_asArray[m.adaptation.index].Representation_asArray[m.index].SegmentList,q=m&&!isNaN(m.startNumber)?m.startNumber:1,W=Math.max(q-1,0);return d.numberOfSegments=W+T.SegmentURL_asArray.length,d}}}n.__dashjs_factory_name="ListSegmentsGetter";var _=ct.A.getClassFactory(n);Lt.A=_},8396:function(ve,Lt,M){var ct=M(5742),I=M(7256);function u(_){var y=(_=_||{}).timelineConverter;function i(){if(!y||!y.hasOwnProperty("calcPeriodRelativeTimeFromMpdRelativeTime"))throw new Error(I.A.MISSING_CONFIG_ERROR)}function h(g,r){if(i(),!g)return null;var m,d=g.segments?g.segments.length:-1;if(r<d&&(m=g.segments[r])&&m.index===r)return m;for(var T=0;T<d;T++)if((m=g.segments[T])&&m.index===r)return m;return null}return{getSegmentByIndex:h,getSegmentByTime:function(g,r){i();var m=function(d,T){if(!d)return-1;var q,W,x,nt,O,J=d.segments,pt=J?J.length:null,G=-1;if(J&&pt>0){for(O=0;O<pt;O++)if(x=(W=J[O]).presentationStartTime,T+(q=(nt=W.duration)/2)>=x&&T-q<x+nt){G=W.index;break}}return G}(g,r);return h(g,m)},getMediaFinishedInformation:function(g){var r={numberOfSegments:0,mediaTimeOfLastSignaledSegment:NaN};return g&&g.segments&&(r.numberOfSegments=g.segments.length),r}}}u.__dashjs_factory_name="SegmentBaseGetter";var n=ct.A.getClassFactory(u);Lt.A=n},284:function(ve,Lt,M){M.d(Lt,{Dr:function(){return u},L$:function(){return h},W$:function(){return g},XX:function(){return _},dD:function(){return n}});var ct=M(5708);function I(r,m){for(;r.length<m;)r="0"+r;return r}function u(r){return r&&r.split("$$").join("$")}function n(r,m){if(!m||!r||r.indexOf("$RepresentationID$")===-1)return r;var d=m.toString();return r.split("$RepresentationID$").join(d)}function _(r,m,d){var T,q,W,x,nt,O,J=m.length;if(!r)return r;for(;;){if((T=r.indexOf("$"+m))<0||(q=r.indexOf("$",T+J))<0)return r;if((W=r.indexOf("%0",T+J))>T&&W<q)switch(x=r.charAt(q-1),nt=parseInt(r.substring(W+2,q-1),10),x){case"d":case"i":case"u":O=I(d.toString(),nt);break;case"x":O=I(d.toString(16),nt);break;case"X":O=I(d.toString(16),nt).toUpperCase();break;case"o":O=I(d.toString(8),nt);break;default:return r}else O=d;r=r.substring(0,T)+O+r.substring(q+1)}}function y(r,m,d,T,q,W,x,nt){var O,J=new ct.A;return J.representation=r,J.duration=m,J.presentationStartTime=d,J.mediaStartTime=T,J.availabilityStartTime=q.calcAvailabilityStartTimeFromPresentationTime(W,r,x),J.availabilityEndTime=q.calcAvailabilityEndTimeFromPresentationTime(W+m,r,x),J.wallStartTime=q.calcWallTimeForSegment(J,x),J.replacementNumber=(O=nt,J.representation.startNumber+O),J.index=nt,J}function i(r,m,d,T){var q=m.adaptation.period;if(isFinite(q.duration)&&q.start+q.duration<=d.presentationStartTime)return!1;if(T){if(m.availabilityTimeOffset==="INF")return!0;var W=r.getClientReferenceTime();return d.availabilityStartTime.getTime()<=W&&(!isFinite(d.availabilityEndTime)||d.availabilityEndTime.getTime()>=W)}return!0}function h(r,m,d,T){var q,W,x;q=d.segmentDuration,isNaN(q)&&(q=d.adaptation.period.duration),W=parseFloat((d.adaptation.period.start+T*q).toFixed(5)),x=parseFloat((W+q).toFixed(5));var nt=y(d,q,W,r.calcMediaTimeFromPresentationTime(W,d),r,x,m,T);return i(r,d,nt,m)?nt:null}function g(r,m,d,T,q,W,x,nt,O,J){var pt,G,X=T/W,rt=q/W;return pt=r.calcPresentationTimeFromMediaTime(X,d),i(r,d,G=y(d,rt,pt,X,r,pt+rt,m,O),m)?(G.replacementTime=J||T,x=_(x,"Number",G.replacementNumber),x=_(x,"Time",G.replacementTime),G.media=x,G.mediaRange=nt,G):null}},9032:function(ve,Lt,M){var ct=M(5742),I=M(7256),u=M(284);function n(y,i){var h=(y=y||{}).timelineConverter;function g(){if(!h||!h.hasOwnProperty("calcPeriodRelativeTimeFromMpdRelativeTime"))throw new Error(I.A.MISSING_CONFIG_ERROR)}function r(m,d){if(g(),!m)return null;var T=m.adaptation.period.mpd.manifest.Period_asArray[m.adaptation.period.index].AdaptationSet_asArray[m.adaptation.index].Representation_asArray[m.index].SegmentTemplate;d=Math.max(d,0);var q=(0,u.L$)(h,i,m,d);if(q){q.replacementTime=Math.round((d-1)*m.segmentDuration*m.timescale,10);var W=T.media;W=(0,u.XX)(W,"Number",q.replacementNumber),W=(0,u.XX)(W,"Time",q.replacementTime),q.media=W}return q}return{getSegmentByIndex:r,getSegmentByTime:function(m,d){if(g(),!m)return null;var T=m.segmentDuration;if(isNaN(T))return null;var q=h.calcPeriodRelativeTimeFromMpdRelativeTime(m,d);return r(m,Math.floor(q/T))},getMediaFinishedInformation:function(m){var d={numberOfSegments:0,mediaTimeOfLastSignaledSegment:NaN};if(!m)return d;var T=m.segmentDuration;return isNaN(T)?d.numberOfSegments=1:d.numberOfSegments=Math.ceil(m.adaptation.period.duration/T),d}}}n.__dashjs_factory_name="TemplateSegmentsGetter";var _=ct.A.getClassFactory(n);Lt.A=_},9569:function(ve,Lt,M){var ct=M(5742),I=M(7256),u=M(284);function n(y,i){var h=(y=y||{}).timelineConverter,g=y.dashMetrics;function r(){if(!h)throw new Error(I.A.MISSING_CONFIG_ERROR)}function m(T,q){var W,x,nt,O,J,pt,G,X=T.adaptation.period.mpd.manifest.Period_asArray[T.adaptation.period.index].AdaptationSet_asArray[T.adaptation.index].Representation_asArray[T.index].SegmentTemplate||T.adaptation.period.mpd.manifest.Period_asArray[T.adaptation.period.index].AdaptationSet_asArray[T.adaptation.index].Representation_asArray[T.index].SegmentList,rt=X.SegmentTimeline,bt=X.SegmentURL_asArray,Ut=0,mt=-1;G=T.timescale;var lt=!1;for(nt=0,O=(W=rt.S_asArray).length;nt<O&&!lt;nt++)for(pt=0,(x=W[nt]).hasOwnProperty("r")&&(pt=x.r),x.hasOwnProperty("t")&&(Ut=x.t),pt<0&&(pt=d(T,W[nt+1],x,G,Ut/G)),J=0;J<=pt&&!lt;J++)(lt=q(Ut,X,bt,x,G,++mt,nt))&&(T.segmentDuration=x.d/G),Ut+=x.d}function d(T,q,W,x,nt){var O;if(q&&q.hasOwnProperty("t"))O=q.t/x;else try{var J=0;if(isNaN(T.adaptation.period.start)||isNaN(T.adaptation.period.duration)||!isFinite(T.adaptation.period.duration)){var pt=g.getCurrentDVRInfo();J=isNaN(pt.end)?0:pt.end}else J=T.adaptation.period.start+T.adaptation.period.duration;O=h.calcMediaTimeFromPresentationTime(J,T),T.segmentDuration=W.d/x}catch{O=0}return Math.max(Math.ceil((O-nt)/(W.d/x))-1,0)}return{getSegmentByIndex:function(T,q,W){if(r(),!T)return null;var x=null,nt=!1;return m(T,function(O,J,pt,G,X,rt,bt){if(nt||W<0){var Ut=J.media,mt=G.mediaRange;return pt&&(Ut=pt[bt].media||"",mt=pt[bt].mediaRange),x=(0,u.W$)(h,i,T,O,G.d,X,Ut,mt,rt,G.tManifest),!0}return O>=W*X-.5*G.d&&(nt=!0),!1}),x},getSegmentByTime:function(T,q){if(r(),!T)return null;q===void 0&&(q=null);var W=null,x=h.calcMediaTimeFromPresentationTime(q,T);return m(T,function(nt,O,J,pt,G,X,rt){var bt=parseFloat((x*G).toPrecision(15));if(bt<nt+pt.d&&bt>=nt){var Ut=O.media,mt=pt.mediaRange;return J&&(Ut=J[rt].media||"",mt=J[rt].mediaRange),W=(0,u.W$)(h,i,T,nt,pt.d,G,Ut,mt,X,pt.tManifest),!0}return!1}),W},getMediaFinishedInformation:function(T){if(!T)return 0;var q,W,x,nt,O,J,pt,G=(T.adaptation.period.mpd.manifest.Period_asArray[T.adaptation.period.index].AdaptationSet_asArray[T.adaptation.index].Representation_asArray[T.index].SegmentTemplate||T.adaptation.period.mpd.manifest.Period_asArray[T.adaptation.period.index].AdaptationSet_asArray[T.adaptation.index].Representation_asArray[T.index].SegmentList).SegmentTimeline,X=0,rt=0,bt=0;for(pt=T.timescale,nt=(q=G.S_asArray).length,x=0;x<nt;x++)for(J=0,(W=q[x]).hasOwnProperty("r")&&(J=W.r),W.hasOwnProperty("t")&&(rt=(X=W.t)/pt),J<0&&(J=d(T,q[x+1],W,pt,rt)),O=0;O<=J;O++)bt++,rt=(X+=W.d)/pt;return{numberOfSegments:bt,mediaTimeOfLastSignaledSegment:rt}}}}n.__dashjs_factory_name="TimelineSegmentsGetter";var _=ct.A.getClassFactory(n);Lt.A=_},5708:function(ve,Lt){function M(I,u,n){return Object.defineProperty(I,"prototype",{writable:!1}),I}var ct=M(function I(){(function(u,n){if(!(u instanceof n))throw new TypeError("Cannot call a class as a function")})(this,I),this.indexRange=null,this.index=null,this.mediaRange=null,this.media=null,this.duration=NaN,this.replacementTime=null,this.replacementNumber=NaN,this.mediaStartTime=NaN,this.presentationStartTime=NaN,this.availabilityStartTime=NaN,this.availabilityEndTime=NaN,this.wallStartTime=NaN,this.representation=null});Lt.A=ct},289:function(ve,Lt){function M(I,u,n){return Object.defineProperty(I,"prototype",{writable:!1}),I}var ct=M(function I(){(function(u,n){if(!(u instanceof n))throw new TypeError("Cannot call a class as a function")})(this,I),this.schemeIdUri="",this.value=""});Lt.A=ct},4716:function(ve,Lt,M){M.d(Lt,{A:function(){return tl}});var ct=M(4947),I=M.n(ct),u=M(7256),n=M(5810),_=M(1991),y=M(8366),i=M(4865),h=M(5742),g=M(4413),r=M(7547);function m(){var e,t,o,l,p,C,b,F,U,H,B,w,j,k,st,it,ht,ot,et,Z,K,z,f,N,S,L=this.context,R=(0,y.A)(L).getInstance();function V(){$(),k=!1,H=0,B=0,ht=0,f=!1,ot=!0,et=!1,N=!1,Z=NaN,it=NaN,b&&(R.off(i.A.DATA_UPDATE_COMPLETED,ce,e),R.off(i.A.LOADING_PROGRESS,Ft,e),R.off(i.A.MANIFEST_UPDATED,le,e),R.off(i.A.STREAMS_COMPOSED,yt,e),R.off(r.A.PLAYBACK_ENDED,Ze,e),R.off(r.A.STREAM_INITIALIZING,xt,e),R.off(r.A.REPRESENTATION_SWITCH,Gt,e),R.off(r.A.BUFFER_LEVEL_STATE_CHANGED,he,e),Pt(),b.removeEventListener("canplay",Kt),b.removeEventListener("canplaythrough",ye),b.removeEventListener("play",de),b.removeEventListener("waiting",qe),b.removeEventListener("playing",Ye),b.removeEventListener("pause",sn),b.removeEventListener("error",pe),b.removeEventListener("seeking",ln),b.removeEventListener("seeked",kt),b.removeEventListener("timeupdate",ue),b.removeEventListener("progress",ee),b.removeEventListener("ratechange",ge),b.removeEventListener("loadedmetadata",De),b.removeEventListener("loadeddata",Ve),b.removeEventListener("stalled",se),b.removeEventListener("ended",Ge),b.removeEventListener("volumechange",Ke)),U=null,b=null,w=null,j=null}function dt(){return parseFloat((ut(arguments.length>0&&arguments[0]!==void 0?arguments[0]:null)-ft()).toFixed(5))}function ut(Tt){var Wt=Tt||w;return Wt.start+Wt.duration}function P(){var Tt=arguments.length>0&&arguments[0]!==void 0&&arguments[0];w&&b&&b.getElement()?(Tt&&j&&vt(ft()),b.play()):k=!0}function $(){w&&b&&b.pause()}function Y(Tt){var Wt=arguments.length>1&&arguments[1]!==void 0&&arguments[1],we=arguments.length>2&&arguments[2]!==void 0&&arguments[2],je=arguments.length>3&&arguments[3]!==void 0&&arguments[3];w&&b&&b.getElement()&&Tt!==(isNaN(Z)?b.getTime():Z)&&((K=we===!0)||(Z=Tt),t.info("Requesting seek to time: "+Tt+(K?" (internal)":"")),j&&je&&vt(Tt),b.setCurrentTime(Tt,Wt))}function gt(){if(w&&b&&j){var Tt=o&&o.hasVideoTrack()?u.A.VIDEO:u.A.AUDIO,Wt=p.getCurrentDVRInfo(Tt);return Wt&&Wt.range?Wt.range.end:0}}function vt(Tt){var Wt=new Date(F.getClientReferenceTime()),we=C.getRegularPeriods()[0],je=F.calcPresentationTimeFromWallTime(Wt,we);H=je-Tt}function ft(){return w&&b?b.getTime():null}function Ct(){return w&&b?b.isPaused():null}function Mt(){return w&&b?b.isSeeking():null}function Qt(){return w&&b?b.isStalled():null}function $t(){return w&&b?b.getPlaybackRate():null}function Zt(){return w&&b?b.getEnded():null}function ae(){return j}function Ne(){var Tt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null;if(!Ct()&&j&&b.getReadyState()!==0&&!Mt()&&!f){Tt||(Tt=o.hasVideoTrack()?u.A.VIDEO:u.A.AUDIO);var Wt=ft(),we=function(je,hn){var En=p.getCurrentDVRInfo(hn),dn=En?En.range:null;return dn?je>dn.end?Math.max(dn.end-H,dn.start):je>0&&je+.25<dn.start&&Math.abs(je-dn.start)<31536e4?et?Math.max(dn.end-H,dn.start):dn.start:je:NaN}(Wt,Tt);!isNaN(we)&&we!==Wt&&!Mt()&&(Qt()||z||b.getReadyState()===1)&&(t.debug("UpdateCurrentTime: Seek to actual time: ".concat(we," from currentTime: ").concat(Wt)),Y(we,!1,!1))}}function Et(){U===null&&(U=setInterval(function(){(function(){if(R.trigger(i.A.WALLCLOCK_TIME_UPDATED,{isDynamic:j,time:new Date}),ae()){var Tt=Date.now();(isNaN(it)||Tt>it+S.get().streaming.liveUpdateTimeThresholdInMilliseconds)&&(o.addDVRMetric(),Ct()?function(){var Wt=Date.now();(!st||Wt>st+500)&&(st=Wt,ue())}():Ne(),it=Tt)}})()},S.get().streaming.wallclockTimeUpdateInterval))}function Pt(){clearInterval(U),U=null}function ce(Tt){var Wt=C.convertRepresentationToRepresentationInfo(Tt.currentRepresentation),we=Wt?Wt.mediaInfo.streamInfo:null;we!==null&&w.id===we.id&&(w=we)}function Kt(){R.trigger(i.A.CAN_PLAY)}function ye(){R.trigger(i.A.CAN_PLAY_THROUGH)}function he(Tt){Tt.streamId===o.getActiveStreamInfo().id&&(z=Tt.state===_.A.BUFFER_EMPTY,S.get().streaming.buffer.setStallState&&b.setStallState(Tt.mediaType,Tt.state===_.A.BUFFER_EMPTY))}function de(){t.info("Native video element event: play"),Ne(),Et(),R.trigger(i.A.PLAYBACK_STARTED,{startTime:ft()})}function qe(){t.info("Native video element event: waiting"),R.trigger(i.A.PLAYBACK_WAITING,{playingTime:ft()})}function Ye(){t.info("Native video element event: playing"),K=!1,R.trigger(i.A.PLAYBACK_PLAYING,{playingTime:ft()})}function sn(){t.info("Native video element event: pause"),R.trigger(i.A.PLAYBACK_PAUSED,{ended:Zt()})}function ln(){if(!K){var Tt=ft();isNaN(Z)||Z===Tt||(Tt=Z),Z=NaN,t.info("Seeking to: "+Tt),Et(),R.trigger(i.A.PLAYBACK_SEEKING,{seekTime:Tt,streamId:w.id})}}function kt(){t.info("Native video element event: seeked"),K=!1,R.trigger(i.A.PLAYBACK_SEEKED)}function ue(){w&&R.trigger(i.A.PLAYBACK_TIME_UPDATED,{timeToEnd:dt(),time:ft(),streamId:w.id})}function ee(){R.trigger(i.A.PLAYBACK_PROGRESS,{streamId:w.id})}function ge(){var Tt=$t();t.info("Native video element event: ratechange: ",Tt),R.trigger(i.A.PLAYBACK_RATE_CHANGED,{playbackRate:Tt})}function De(){t.info("Native video element event: loadedmetadata"),R.trigger(i.A.PLAYBACK_METADATA_LOADED),Et()}function Ve(){t.info("Native video element event: loadeddata"),R.trigger(i.A.PLAYBACK_LOADED_DATA)}function Ge(){t.info("Native video element event: ended"),$(),Pt();var Tt=o?o.getActiveStreamInfo():null;Tt&&R.trigger(i.A.PLAYBACK_ENDED,{isLast:Tt.isLast})}function Ke(){R.trigger(i.A.PLAYBACK_VOLUME_CHANGED)}function Ze(Tt){if(U&&Tt.isLast){t.info("onPlaybackEnded -- PLAYBACK_ENDED but native video element didn't fire ended");var Wt=Tt.seekTime?Tt.seekTime:ut();b.setCurrentTime(Wt),$(),Pt()}}function pe(Tt){var Wt=Tt.target||Tt.srcElement;R.trigger(i.A.PLAYBACK_ERROR,{error:Wt.error})}function Oe(){j=!1}function Ft(Tt){if(Tt.stream===!1&&et&&!isNaN(Tt.request.duration)){var Wt=1.2*Tt.request.duration;Wt>H&&(t.warn("Browser does not support fetch API with StreamReader. Increasing live delay to be 20% higher than segment duration:",Wt.toFixed(2)),H=Wt,B=Wt)}}function se(Tt){R.trigger(i.A.PLAYBACK_STALLED,{e:Tt})}function xt(Tt){var Wt;(Wt=Tt.mediaInfo)&&Wt.supplementalProperties&&Wt.supplementalProperties[u.A.SUPPLEMENTAL_PROPERTY_DVB_LL_SCHEME]&&Wt.supplementalProperties[u.A.SUPPLEMENTAL_PROPERTY_DVB_LL_SCHEME].value==="true"&&(t.debug("Low Latency critical SupplementalProperty set: Enabling low Latency"),et=!0)}function Gt(Tt){var Wt=o.getActiveStreamInfo();Tt&&Wt&&Tt.currentRepresentation&&Tt.streamId&&Tt.streamId===Wt.id&&Tt.mediaType&&(Tt.mediaType===u.A.VIDEO||Tt.mediaType===u.A.AUDIO)&&(ot=Tt.currentRepresentation.availabilityTimeComplete,(et=!ot)&&!N&&(N=!0))}function le(){f=!0}function yt(){f=!1}return e={initialize:function(Tt,Wt){w=Tt,Wt!==!0&&(b.addEventListener("canplay",Kt),b.addEventListener("canplaythrough",ye),b.addEventListener("play",de),b.addEventListener("waiting",qe),b.addEventListener("playing",Ye),b.addEventListener("pause",sn),b.addEventListener("error",pe),b.addEventListener("seeking",ln),b.addEventListener("seeked",kt),b.addEventListener("timeupdate",ue),b.addEventListener("progress",ee),b.addEventListener("ratechange",ge),b.addEventListener("loadedmetadata",De),b.addEventListener("loadeddata",Ve),b.addEventListener("stalled",se),b.addEventListener("ended",Ge),b.addEventListener("volumechange",Ke),j=w.manifestInfo.isDynamic,z=!1,K=!1,R.on(i.A.DATA_UPDATE_COMPLETED,ce,e),R.on(i.A.LOADING_PROGRESS,Ft,e),R.on(i.A.MANIFEST_UPDATED,le,e),R.on(i.A.STREAMS_COMPOSED,yt,e),R.on(r.A.PLAYBACK_ENDED,Ze,e,{priority:y.A.EVENT_PRIORITY_HIGH}),R.on(r.A.STREAM_INITIALIZING,xt,e),R.on(r.A.REPRESENTATION_SWITCH,Gt,e),R.on(r.A.BUFFER_LEVEL_STATE_CHANGED,he,e),R.on(r.A.DYNAMIC_TO_STATIC,Oe,e),k&&(k=!1,P()))},setConfig:function(Tt){Tt&&(Tt.streamController&&(o=Tt.streamController),Tt.serviceDescriptionController&&(l=Tt.serviceDescriptionController),Tt.dashMetrics&&(p=Tt.dashMetrics),Tt.adapter&&(C=Tt.adapter),Tt.videoModel&&(b=Tt.videoModel),Tt.timelineConverter&&(F=Tt.timelineConverter),Tt.settings&&(S=Tt.settings))},getTimeToStreamEnd:dt,getBufferLevel:function(){var Tt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,Wt=null;return o.getActiveStreamProcessors().forEach(function(we){if(!Tt||Tt.length===0||Tt.indexOf(we.getType())===-1){var je=we.getBufferLevel();Wt=Wt===null?je:Math.min(Wt,je)}}),Wt},getPlaybackStalled:function(){return z},getTime:ft,getLowLatencyModeEnabled:function(){return et},getInitialCatchupModeActivated:function(){return N},getIsManifestUpdateInProgress:function(){return f},getPlaybackRate:$t,getPlayedRanges:function(){return w&&b?b.getPlayedRanges():null},getEnded:Zt,getIsDynamic:ae,getStreamController:function(){return o},computeAndSetLiveDelay:function(Tt,Wt){var we,je,hn,En=!isNaN(Tt)&&isFinite(Tt)?Tt:NaN,dn=C.getSuggestedPresentationDelay(),jn=l.getServiceDescriptionSettings();return we=isNaN(S.get().streaming.delay.liveDelay)?S.get().streaming.delay.liveDelayFragmentCount===null||isNaN(S.get().streaming.delay.liveDelayFragmentCount)||isNaN(En)?jn&&!isNaN(jn.liveDelay)&&jn.liveDelay>0?jn.liveDelay:S.get().streaming.delay.useSuggestedPresentationDelay===!0&&dn!==null&&!isNaN(dn)&&dn>0?dn:isNaN(En)?Wt&&!isNaN(Wt.minBufferTime)?4*Wt.minBufferTime:4*w.manifestInfo.minBufferTime:4*En:En*S.get().streaming.delay.liveDelayFragmentCount:S.get().streaming.delay.liveDelay,(hn=C.getAvailabilityStartTime())!==null&&(ht=hn),je=Wt&&Wt.dvrWindowSize>0?Math.min(we,Wt.dvrWindowSize):we,H=je,B=je,je},getLiveDelay:function(){return H},getOriginalLiveDelay:function(){return B},getCurrentLiveLatency:function(){if(!j||isNaN(ht))return NaN;var Tt=ft();if(isNaN(Tt)||Tt===0)return 0;var Wt=new Date().getTime()+1e3*F.getClientTimeOffset();return Math.max(((Wt-ht-1e3*Tt)/1e3).toFixed(3),0)},play:P,isPaused:Ct,isStalled:Qt,pause:$,isSeeking:Mt,getStreamEndTime:ut,seek:Y,seekToOriginalLive:function(){var Tt=arguments.length>0&&arguments[0]!==void 0&&arguments[0],Wt=arguments.length>1&&arguments[1]!==void 0&&arguments[1],we=arguments.length>2&&arguments[2]!==void 0&&arguments[2],je=gt();je!==0&&Y(je-(H=B),Tt,Wt,we)},seekToCurrentLive:function(){var Tt=arguments.length>0&&arguments[0]!==void 0&&arguments[0],Wt=arguments.length>1&&arguments[1]!==void 0&&arguments[1],we=arguments.length>2&&arguments[2]!==void 0&&arguments[2],je=gt();je!==0&&Y(je-H,Tt,Wt,we)},reset:V,updateCurrentTime:Ne,getAvailabilityStartTime:function(){return ht}},t=(0,g.A)(L).getInstance().getLogger(e),V(),e}m.__dashjs_factory_name="PlaybackController";var d=h.A.getSingletonFactory(m),T=M(2686),q="loading",W="executed",x="failed";function nt(e){var t,o,l,p,C=(e=e||{}).eventBus,b=e.events,F=e.dashMetrics,U=e.fragmentLoader,H=e.debug,B=e.streamInfo,w=e.type;function j(f){var N;return!!f&&(N=!1,l.some(function(S){if(L=f,R=S,!isNaN(L.index)&&L.startTime===R.startTime&&L.adaptationIndex===R.adaptationIndex&&L.type===R.type||function(V,dt){return isNaN(V.index)&&isNaN(dt.index)&&V.quality===dt.quality}(f,S)||function(V,dt){return V.action===T.A.ACTION_COMPLETE&&V.action===dt.action}(f,S))return N=!0;var L,R}),N)}function k(f){return isNaN(f.duration)?.25:Math.min(f.duration/8,.5)}function st(f){l=l.filter(function(N){var S=k(N);return isNaN(N.startTime)||f!==void 0&&N.startTime>=f-S})}function it(f,N){N<=f+.5||(l=l.filter(function(S){var L=k(S);return isNaN(S.startTime)||S.startTime>=N-L||isNaN(S.duration)||S.startTime+S.duration<=f+L}))}function ht(f,N,S){for(var L=f.length-1;L>=0;L--){var R=f[L],V=R.startTime,dt=V+R.duration;if(S=isNaN(S)?k(R):S,!isNaN(V)&&!isNaN(dt)&&N+S>=V&&N-S<dt||isNaN(V)&&isNaN(N))return R}return null}function ot(f,N){F.addSchedulingInfo(f,N),F.addRequestsQueue(f.mediaType,p,l)}function et(f){f.sender===U&&(p.splice(p.indexOf(f.request),1),f.response&&!f.error&&l.push(f.request),ot(f.request,f.error?x:W),C.trigger(b.FRAGMENT_LOADING_COMPLETED,{request:f.request,response:f.response,error:f.error,sender:this},{streamId:B.id,mediaType:w}))}function Z(f){f.sender===U&&C.trigger(b.FRAGMENT_LOADING_PROGRESS,{request:f.request,response:f.response,error:f.error,sender:this},{streamId:B.id,mediaType:w})}function K(f){f.sender===U&&C.trigger(b.FRAGMENT_LOADING_ABANDONED,{request:f.request},{streamId:B.id,mediaType:w})}function z(){l=[],p=[]}return t={getStreamId:function(){return B.id},getType:function(){return w},getRequests:function(f){var N=f?f.state instanceof Array?f.state:[f.state]:[],S=[];return N.forEach(function(L){var R=function(V){var dt;switch(V){case q:dt=p;break;case W:dt=l;break;default:dt=[]}return dt}(L);S=S.concat(function(V,dt){return dt.hasOwnProperty("time")?[ht(V,dt.time,dt.threshold)]:V.filter(function(ut){for(var P in dt)if(P!=="state"&&dt.hasOwnProperty(P)&&ut[P]!=dt[P])return!1;return!0})}(R,f))}),S},isFragmentLoaded:j,isFragmentLoadedOrPending:function(f){var N,S=!1,L=0;if(!(S=j(f)))for(L=0;L<p.length;L++)N=p[L],f.url===N.url&&f.startTime===N.startTime&&(S=!0);return S},removeExecutedRequestsBeforeTime:st,removeExecutedRequestsAfterTime:function(f){l=l.filter(function(N){return isNaN(N.startTime)||f!==void 0&&N.startTime<f})},syncExecutedRequestsWithBufferedRange:function(f,N){if(f&&f.length!==0){for(var S=0,L=0,R=f.length;L<R;L++)it(S,f.start(L)),S=f.end(L);N>0&&it(S,N)}else st()},abortRequests:function(){o.debug("abort requests"),U.abort(),p=[]},executeRequest:function(f){f.action===T.A.ACTION_DOWNLOAD?(ot(f,q),p.push(f),function(N){C.trigger(b.FRAGMENT_LOADING_STARTED,{request:N},{streamId:B.id,mediaType:w}),U.load(N)}(f)):o.warn("Unknown request action.")},reset:function(){C.off(b.LOADING_COMPLETED,et,this),C.off(b.LOADING_DATA_PROGRESS,Z,this),C.off(b.LOADING_ABANDONED,K,this),U&&U.reset(),z()},resetInitialSettings:z,addExecutedRequest:function(f){l.push(f)}},o=H.getLogger(t),z(),C.on(b.LOADING_COMPLETED,et,t),C.on(b.LOADING_DATA_PROGRESS,Z,t),C.on(b.LOADING_ABANDONED,K,t),t}nt.__dashjs_factory_name="FragmentModel";var O=h.A.getClassFactory(nt);O.FRAGMENT_MODEL_LOADING=q,O.FRAGMENT_MODEL_EXECUTED=W,O.FRAGMENT_MODEL_CANCELED="canceled",O.FRAGMENT_MODEL_FAILED=x,h.A.updateClassFactory(nt.__dashjs_factory_name,O);var J=O,pt=M(8324);function G(e){return G=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},G(e)}function X(e,t,o){return t=bt(t),function(l,p){if(p&&(G(p)=="object"||typeof p=="function"))return p;if(p!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(C){if(C===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return C}(l)}(e,rt()?Reflect.construct(t,[],bt(e).constructor):t.apply(e,o))}function rt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(rt=function(){return!!e})()}function bt(e){return bt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},bt(e)}function Ut(e,t){return Ut=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,l){return o.__proto__=l,o},Ut(e,t)}var mt=new(function(e){function t(){var l;return function(p,C){if(!(p instanceof C))throw new TypeError("Cannot call a class as a function")}(this,t),(l=X(this,t)).MANIFEST_LOADER_PARSING_FAILURE_ERROR_CODE=10,l.MANIFEST_LOADER_LOADING_FAILURE_ERROR_CODE=11,l.XLINK_LOADER_LOADING_FAILURE_ERROR_CODE=12,l.SEGMENT_BASE_LOADER_ERROR_CODE=15,l.TIME_SYNC_FAILED_ERROR_CODE=16,l.FRAGMENT_LOADER_LOADING_FAILURE_ERROR_CODE=17,l.FRAGMENT_LOADER_NULL_REQUEST_ERROR_CODE=18,l.URL_RESOLUTION_FAILED_GENERIC_ERROR_CODE=19,l.APPEND_ERROR_CODE=20,l.REMOVE_ERROR_CODE=21,l.DATA_UPDATE_FAILED_ERROR_CODE=22,l.CAPABILITY_MEDIASOURCE_ERROR_CODE=23,l.CAPABILITY_MEDIAKEYS_ERROR_CODE=24,l.DOWNLOAD_ERROR_ID_MANIFEST_CODE=25,l.DOWNLOAD_ERROR_ID_SIDX_CODE=26,l.DOWNLOAD_ERROR_ID_CONTENT_CODE=27,l.DOWNLOAD_ERROR_ID_INITIALIZATION_CODE=28,l.DOWNLOAD_ERROR_ID_XLINK_CODE=29,l.MANIFEST_ERROR_ID_PARSE_CODE=31,l.MANIFEST_ERROR_ID_NOSTREAMS_CODE=32,l.TIMED_TEXT_ERROR_ID_PARSE_CODE=33,l.MANIFEST_ERROR_ID_MULTIPLEXED_CODE=34,l.MEDIASOURCE_TYPE_UNSUPPORTED_CODE=35,l.MANIFEST_LOADER_PARSING_FAILURE_ERROR_MESSAGE="parsing failed for ",l.MANIFEST_LOADER_LOADING_FAILURE_ERROR_MESSAGE="Failed loading manifest: ",l.XLINK_LOADER_LOADING_FAILURE_ERROR_MESSAGE="Failed loading Xlink element: ",l.SEGMENTS_UPDATE_FAILED_ERROR_MESSAGE="Segments update failed",l.SEGMENTS_UNAVAILABLE_ERROR_MESSAGE="no segments are available yet",l.SEGMENT_BASE_LOADER_ERROR_MESSAGE="error loading segment ranges from sidx",l.TIME_SYNC_FAILED_ERROR_MESSAGE="Failed to synchronize client and server time",l.FRAGMENT_LOADER_NULL_REQUEST_ERROR_MESSAGE="request is null",l.URL_RESOLUTION_FAILED_GENERIC_ERROR_MESSAGE="Failed to resolve a valid URL",l.APPEND_ERROR_MESSAGE="chunk is not defined",l.REMOVE_ERROR_MESSAGE="Removing data from the SourceBuffer",l.DATA_UPDATE_FAILED_ERROR_MESSAGE="Data update failed",l.CAPABILITY_MEDIASOURCE_ERROR_MESSAGE="mediasource is not supported",l.CAPABILITY_MEDIAKEYS_ERROR_MESSAGE="mediakeys is not supported",l.TIMED_TEXT_ERROR_MESSAGE_PARSE="parsing error :",l.MEDIASOURCE_TYPE_UNSUPPORTED_MESSAGE="Error creating source buffer of type : ",l}return function(l,p){if(typeof p!="function"&&p!==null)throw new TypeError("Super expression must either be null or a function");l.prototype=Object.create(p&&p.prototype,{constructor:{value:l,writable:!0,configurable:!0}}),Object.defineProperty(l,"prototype",{writable:!1}),p&&Ut(l,p)}(t,e),o=t,Object.defineProperty(o,"prototype",{writable:!1}),o;var o}(M(1840).A)),lt=M(1657),jt=M(2756);function St(e){var t,o,l,p,C,b,F=this.context,U=(0,lt.A)(F).getInstance(),H=e.textController,B=e.eventBus,w=[],j=[],k=!1,st=e.mediaSource,it=null;function ht(R){return new Promise(function(V){L(function(){p.changeType&&p.changeType(R),V()})})}function ot(R){return p=H.getTextSourceBuffer(R),Promise.resolve()}function et(){if(typeof p.addEventListener=="function")try{p.addEventListener("updateend",N,!1),p.addEventListener("error",S,!1),p.addEventListener("abort",S,!1)}catch{b=setInterval(N,50)}else b=setInterval(N,50)}function Z(R){return new Promise(function(V){p&&U.get().streaming.buffer.useAppendWindow?L(function(){try{if(!p)return void V();var dt=st.duration,ut=0;R&&!isNaN(R.start)&&!isNaN(R.duration)&&isFinite(R.duration)&&(dt=R.start+R.duration),R&&!isNaN(R.start)&&(ut=R.start),p.appendWindowEnd===dt&&p.appendWindowStart===ut||(p.appendWindowStart=0,p.appendWindowEnd=dt+.01,p.appendWindowStart=Math.max(ut-.1,0),l.debug("Updated append window for ".concat(C.type,". Set start to ").concat(p.appendWindowStart," and end to ").concat(p.appendWindowEnd))),V()}catch{l.warn("Failed to set append window"),V()}}):V()})}function K(R){return new Promise(function(V){p?L(function(){try{p.timestampOffset===R||isNaN(R)||(p.timestampOffset=R,l.debug("Set MSE timestamp offset to ".concat(R))),V()}catch{V()}}):V()})}function z(){if(!k&&j.length>0){k=!0;var R=j[0];j.splice(0,1);var V=function(){k=!1,j.length>0&&z.call(this),R&&R.data&&R.data.segmentType&&R.data.segmentType!==jt.G.INIT_SEGMENT_TYPE&&delete R.data.bytes,R.promise.resolve({chunk:R.data})};try{it=R.request,R.data.bytes.byteLength===0?V.call(this):(p.appendBuffer?p.appendBuffer(R.data.bytes):p.append(R.data.bytes,R.data),L(V.bind(this)))}catch(dt){l.fatal('SourceBuffer append failed "'+dt+'"'),j.length>0?z():k=!1,delete R.data.bytes,R.promise.reject({chunk:R.data,error:new pt.A(dt.code,dt.message)})}}}function f(){w.length>0&&(p.updating||(w.shift()(),f()))}function N(){p.updating||f()}function S(R){var V,dt,ut=R.target||{};V=i.A.SOURCE_BUFFER_ERROR,dt={error:ut,lastRequestAppended:it},B.trigger(V,dt,{streamId:C.streamInfo.id,mediaType:o})}function L(R){w.push(R),p.updating||f()}return t={getType:function(){return o},getAllBufferRanges:function(){try{return p.buffered}catch(R){return l.error("getAllBufferRanges exception: "+R.message),null}},getBuffer:function(){return p},append:function(R){var V=this,dt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return new Promise(function(ut,P){R?(j.push({data:R,promise:{resolve:ut,reject:P},request:dt}),L(z.bind(V))):P({chunk:R,error:new pt.A(mt.APPEND_ERROR_CODE,mt.APPEND_ERROR_MESSAGE)})})},remove:function(R){return new Promise(function(V,dt){var ut=R.start,P=R.end;ut>=0&&P>ut?L(function(){try{p.remove(ut,P),L(function(){V({from:ut,to:P,unintended:!1}),R.resolve&&R.resolve()})}catch($){dt({from:ut,to:P,unintended:!1,error:new pt.A(mt.REMOVE_ERROR_CODE,mt.REMOVE_ERROR_MESSAGE)}),R.reject&&R.reject($)}}):V()})},abort:function(){return new Promise(function(R){try{j=[],st.readyState==="open"?L(function(){try{p&&p.abort(),R()}catch{R()}}):(p&&p.setTextTrack&&st.readyState==="ended"&&p.abort(),R())}catch{R()}})},reset:function(){if(p){try{w=[],function(){try{typeof p.removeEventListener=="function"&&(p.removeEventListener("updateend",N,!1),p.removeEventListener("error",S,!1),p.removeEventListener("abort",S,!1)),clearInterval(b)}catch(R){l.error(R)}}(),k=!1,j=[],p.getClassName&&p.getClassName()==="TextSourceBuffer"||(l.debug("Removing sourcebuffer from media source"),st.removeSourceBuffer(p))}catch{}p=null}it=null},updateTimestampOffset:K,initializeForStreamSwitch:function(R,V,dt){o=(C=R).type;var ut=C.codec;(function($){p=$.getBuffer()})(dt),et();var P=[];return P.push(new Promise(function($){L(function(){var Y=p.appendWindowStart,gt=p.appendWindowEnd;p&&(p.abort(),p.appendWindowStart=Y,p.appendWindowEnd=gt),$()})})),P.push(Z(C.streamInfo)),U.get().streaming.buffer.useChangeTypeForTrackSwitch&&P.push(ht(ut)),V&&V.MSETimeOffset!==void 0&&P.push(K(V.MSETimeOffset)),Promise.all(P)},initializeForFirstUse:function(R,V,dt){o=(C=V).type;var ut=C.codec;try{if(ut.match(/application\/mp4;\s*codecs="(stpp|wvtt).*"/i))return ot(R);p=st.addSourceBuffer(ut),et();var P=[];return P.push(Z(C.streamInfo)),dt&&dt.MSETimeOffset!==void 0&&P.push(K(dt.MSETimeOffset)),Promise.all(P)}catch($){return C.type==u.A.TEXT&&!C.isFragmented||ut.indexOf('codecs="stpp')!==-1||ut.indexOf('codecs="vtt')!==-1||ut.indexOf("text/vtt")!==-1?ot(R):Promise.reject($)}},updateAppendWindow:Z,changeType:ht},l=(0,g.A)(F).getInstance().getLogger(t),t}St.__dashjs_factory_name="SourceBufferSink";var Nt=h.A.getClassFactory(St);function Ht(e){var t,o,l,p=this.context,C=[],b=e;function F(U,H){return C=C.filter(function(B){return!((isNaN(H)||B.start<H)&&(isNaN(U)||B.end>U))}),Promise.resolve()}return t={getAllBufferRanges:function(){for(var U=[],H=0;H<C.length;H++){var B=C[H];U.length===0||B.start>U[U.length-1].end?U.push({start:B.start,end:B.end}):U[U.length-1].end=B.end}var w={start:function(j){return U[j].start},end:function(j){return U[j].end}};return Object.defineProperty(w,"length",{get:function(){return U.length}}),w},append:function(U){return U.segmentType!=="InitializationSegment"?(C.push(U),C.sort(function(H,B){return H.start-B.start}),l=null):l=U,o.debug("PreBufferSink appended chunk s: "+U.start+"; e: "+U.end),b&&b({chunk:U}),Promise.resolve()},remove:F,abort:function(){return Promise.resolve()},discharge:function(U,H){var B=function(w,j){return C.filter(function(k){return(isNaN(j)||k.start<j)&&(isNaN(w)||k.end>w)})}(U,H);return l&&(B.push(l),l=null),F(U,H),B},reset:function(){C=[],l=null,b=null},updateTimestampOffset:function(){return Promise.resolve()},waitForUpdateEnd:function(U){U()},getBuffer:function(){return this}},o=(0,g.A)(p).getInstance().getLogger(t),t}Ht.__dashjs_factory_name="PreBufferSink";var ie=h.A.getClassFactory(Ht);function It(){var e={};return{save:function(t){var o=t.streamId,l=t.representationId;e[o]=e[o]||{},e[o][l]=t},extract:function(t,o){return e&&e[t]&&e[t][o]?e[t][o]:null},reset:function(){e={}}}}It.__dashjs_factory_name="InitCache";var Ot=h.A.getSingletonFactory(It),fe=.01,Ae="BufferController";function Re(e){e=e||{};var t,o,l,p,C,b,F,U,H,B,w,j,k,st,it,ht,ot,et,Z,K,z,f=this.context,N=(0,y.A)(f).getInstance(),S=e.errHandler,L=e.fragmentModel,R=e.representationController,V=e.adapter,dt=e.textController,ut=e.abrController,P=e.playbackController,$=e.streamInfo,Y=e.type,gt=e.settings;function vt(xt){var Gt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return new Promise(function(le,yt){b=xt,H&&Gt&&typeof H.discharge=="function"?(B=H,Ct(Gt).then(function(){le()}).catch(function(Tt){yt(Tt)})):le()})}function ft(xt){return V.convertRepresentationToRepresentationInfo(R.getRepresentationForQuality(xt))}function Ct(xt){var Gt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return new Promise(function(le,yt){et&&xt?b?(w=!1,function(Tt,Wt){return new Promise(function(we,je){var hn=ut.getQualityFor(Y,$.id);H=Nt(f).create({mediaSource:b,textController:dt,eventBus:N}),function(En,dn,jn){var Pn=ft(jn);return dn&&dn[Y]&&(Y===u.A.VIDEO||Y===u.A.AUDIO)?H.initializeForStreamSwitch(En,Pn,dn[Y]):H.initializeForFirstUse($,En,Pn)}(Tt,Wt,hn).then(function(){return ge(ft(hn))}).then(function(){we(H)}).catch(function(En){o.fatal("Caught error on create SourceBuffer: "+En),S.error(new pt.A(mt.MEDIASOURCE_TYPE_UNSUPPORTED_CODE,mt.MEDIASOURCE_TYPE_UNSUPPORTED_MESSAGE+Y)),je(En)})})}(xt,Gt).then(function(Tt){le(Tt)}).catch(function(Tt){yt(Tt)})):(w=!0,function(){var Tt=this;return new Promise(function(Wt,we){var je=ut.getQualityFor(Y,$.id);H=ie(f).create(ae.bind(Tt)),ge(ft(je)).then(function(){Wt(H)}).catch(function(){we()})})}().then(function(Tt){le(Tt)}).catch(function(Tt){yt(Tt)})):le(null)})}function Mt(xt){gt.get().streaming.cacheInitSegments&&(o.info("Init fragment finished loading saving to",Y+"'s init cache"),et.save(xt.chunk)),o.debug("Append Init fragment",Y," with representationId:",xt.chunk.representationId," and quality:",xt.chunk.quality,", data size:",xt.chunk.bytes.byteLength),$t(xt.chunk)}function Qt(xt){$t(xt.chunk,xt.request)}function $t(xt){var Gt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;H&&(H.append(xt,Gt).then(function(le){ae(le)}).catch(function(le){ae(le)}),xt.mediaInfo.type===u.A.VIDEO&&Ft(i.A.VIDEO_CHUNK_RECEIVED,{chunk:xt}))}function Zt(xt){if(xt&&xt.length>0)for(var Gt=0,le=xt.length;Gt<le;Gt++)o.debug("Buffered range: "+xt.start(Gt)+" - "+xt.end(Gt)+", currentTime = ",P.getTime())}function ae(xt){if(xt.error)return xt.error.code===22&&function(){if(ot=!0,C=.8*Ze(),o.warn("Quota exceeded, Critical Buffer: "+C),C>0){var yt=Math.max(.2*C,1),Tt=C-yt,Wt=Math.min(gt.get().streaming.buffer.bufferTimeAtTopQuality,.9*Tt),we=Math.min(gt.get().streaming.buffer.bufferTimeAtTopQualityLongForm,.9*Tt),je={streaming:{buffer:{bufferToKeep:parseFloat(yt.toFixed(5)),bufferTimeAtTopQuality:parseFloat(Wt.toFixed(5)),bufferTimeAtTopQualityLongForm:parseFloat(we.toFixed(5))}}};gt.update(je)}}(),void(xt.error.code!==22&&Oe()||(o.warn("Clearing playback buffer to overcome quota exceed situation"),Ft(i.A.QUOTA_EXCEEDED,{criticalBufferLevel:C,quotaExceededTime:xt.chunk.start}),kt(ln())));if(H&&(he(),ot=!1,(st=xt.chunk)&&st.endFragment)){st&&!isNaN(st.index)&&(F=Math.max(st.index,F),de());var Gt=H.getAllBufferRanges();st.segmentType===jt.G.MEDIA_SEGMENT_TYPE&&(Zt(Gt),Pt(),function(){if(!isNaN(z)&&!w)if(Y===u.A.AUDIO||Y===u.A.VIDEO){var yt=P.getTime(),Tt=ye(yt,0),Wt=ye(z,0);if(Tt&&Wt&&Tt.start===Wt.start)z=NaN;else{var we=R.getCurrentRepresentation().segmentDuration,je=ye(z,we);je&&(gt.get().streaming.buffer.enableSeekDecorrelationFix&&Math.abs(yt-z)>we?z<=je.end&&P.seek(Math.max(z,je.start),!1,!0):yt<je.start&&P.seek(je.start,!1,!0))}}else z=NaN}());var le=!1;j&&(j.indexOf(st)>0&&(le=!0),j=null),st&&!le&&Ft(i.A.BYTES_APPENDED_END_FRAGMENT,{quality:st.quality,startTime:st.start,index:st.index,bufferedRanges:Gt,segmentType:st.segmentType,mediaType:Y})}}function Ne(){return new Promise(function(xt,Gt){var le=Et();if(!le||le.length===0)return Pt(),void xt();kt(le).then(function(){xt()}).catch(function(yt){Gt(yt)})})}function Et(xt){var Gt=[],le=H.getAllBufferRanges();if(!le||le.length===0)return Gt;if(!xt&&xt!==0||isNaN(xt))Gt.push({start:le.start(0),end:le.end(le.length-1)+.5});else{var yt=function(Wt,we){var je=gt.get().streaming.buffer.bufferToKeep,hn=we.start(0);if(Wt-hn>je){var En=Math.max(0,Wt-je),dn=L.getRequests({state:J.FRAGMENT_MODEL_EXECUTED,time:Wt,threshold:fe})[0];if(dn&&(En=Math.min(dn.startTime,En)),En>0)return{start:hn,end:En}}return null}(xt,le),Tt=function(Wt,we){var je=we.end(we.length-1)+.5,hn=pe(Wt),En=$.manifestInfo.duration>=gt.get().streaming.buffer.longFormContentDurationThreshold?gt.get().streaming.buffer.bufferTimeAtTopQualityLongForm:gt.get().streaming.buffer.bufferTimeAtTopQuality,dn=isNaN(hn)?Wt:Math.min(hn,Wt+En);if(dn>=we.end(we.length-1))return null;var jn=L.getRequests({state:J.FRAGMENT_MODEL_EXECUTED,time:Wt,threshold:fe})[0];if(jn&&(dn=Math.max(jn.startTime+jn.duration,dn)),gt.get().streaming.buffer.avoidCurrentTimeRangePruning){for(var Pn=0;Pn<we.length;Pn++)if(we.start(Pn)<=Wt&&Wt<=we.end(Pn)&&we.start(Pn)<=dn&&dn<=we.end(Pn)){var Zn=dn;dn=Pn+1<we.length?we.start(Pn+1):we.end(Pn)+1,o.debug("Buffered range ["+we.start(Pn)+", "+we.end(Pn)+"] overlaps with targetTime "+Wt+" and range to be pruned ["+Zn+", "+je+"], using ["+dn+", "+je+"] instead"+(dn<je?"":" (no actual pruning)"));break}}return dn<we.end(we.length-1)?{start:dn,end:je}:null}(xt,le);yt&&Gt.push(yt),Tt&&Gt.push(Tt)}return Gt}function Pt(){(!K||Y===u.A.TEXT&&dt.isTextEnabled())&&he()}function ce(){qe()}function Kt(){qe(),z=NaN}function ye(xt,Gt){if(!H)return null;var le,yt,Tt=H.getAllBufferRanges(),Wt=0,we=0,je=null,hn=null,En=0,dn=isNaN(Gt)?.15:Gt;if(Tt!=null){for(yt=0,le=Tt.length;yt<le;yt++)if(Wt=Tt.start(yt),we=Tt.end(yt),je===null)En=Math.abs(Wt-xt),(xt>=Wt&&xt<we||En<=dn)&&(je=Wt,hn=we);else{if(!((En=Wt-hn)<=dn))break;hn=we}if(je!==null)return{start:je,end:hn}}return null}function he(){if(P){var xt=P.getTime()||0;w&&(xt=isNaN(z)?0:z);var Gt=gt.get().streaming.gaps.jumpGaps&&!isNaN(gt.get().streaming.gaps.smallGapLimit)?gt.get().streaming.gaps.smallGapLimit:NaN;p=Math.max(function(le,yt){var Tt;return gt.get().streaming.gaps.jumpGaps&&(yt=gt.get().streaming.gaps.smallGapLimit),(Tt=ye(le,yt))===null?0:Tt.end-le}(xt,Gt),0),Ft(i.A.BUFFER_LEVEL_UPDATED,{mediaType:Y,bufferLevel:p}),qe()}}function de(){var xt=F>=U-1,Gt=P.getTimeToStreamEnd($)-p<1e-5;!xt&&!Gt||l||(Ke(!0),o.debug("checkIfBufferingCompleted trigger BUFFERING_COMPLETED for stream id ".concat($.id," and type ").concat(Y)))}function qe(){Y!==u.A.AUDIO&&Y!==u.A.VIDEO||((!P.getLowLatencyModeEnabled()&&p<gt.get().streaming.buffer.stallThreshold||p===0)&&!l?Ye(_.A.BUFFER_EMPTY):(l||p>=gt.get().streaming.buffer.stallThreshold||P.getLowLatencyModeEnabled()&&p>0)&&Ye(_.A.BUFFER_LOADED))}function Ye(xt){k===xt||xt===_.A.BUFFER_EMPTY&&P.getTime()===0||Y===u.A.TEXT&&!dt.isTextEnabled()||(k=xt,Ft(i.A.BUFFER_LEVEL_STATE_CHANGED,{state:xt}),Ft(xt===_.A.BUFFER_LOADED?i.A.BUFFER_LOADED:i.A.BUFFER_EMPTY),o.debug(xt===_.A.BUFFER_LOADED?"Got enough buffer to start":"Waiting for more buffer before starting playback"))}function sn(){H&&Y!==u.A.TEXT&&(l||kt(ln()))}function ln(){var xt=[],Gt=H.getAllBufferRanges();if(!Gt||Gt.length===0)return xt;var le=P.getTime(),yt=Math.max(0,le-gt.get().streaming.buffer.bufferToKeep),Tt=L.getRequests({state:J.FRAGMENT_MODEL_EXECUTED,time:le,threshold:fe})[0];if(Tt)yt=Math.min(Tt.startTime,yt);else if(le===0&&P.getIsDynamic())return[];if(Gt.start(0)<=yt){for(var Wt={start:0,end:yt},we=0;we<Gt.length&&Gt.end(we)<=yt;we++)Wt.end=Gt.end(we);Wt.start<Wt.end&&xt.push(Wt)}return xt}function kt(xt){return new Promise(function(Gt,le){if(xt&&H&&xt.length!==0){var yt=[];xt.forEach(function(Tt){yt.push(function(Wt){return new Promise(function(we,je){Wt.resolve=we,Wt.reject=je,Z.push(Wt)})}(Tt))}),ht||ue(),Promise.all(yt).then(function(){Gt()}).catch(function(Tt){le(Tt)})}else Gt()})}function ue(){try{if(Z.length===0||!H)return o.debug("Nothing to prune, halt pruning"),Z=[],void(ht=!1);var xt=H.getBuffer();if(!xt||!xt.buffered||xt.buffered.length===0)return o.debug("SourceBuffer is empty (or does not exist), halt pruning"),Z=[],void(ht=!1);var Gt=Z.shift();o.debug("".concat(Y,": Removing buffer from: ").concat(Gt.start," to ").concat(Gt.end)),ht=!0,P.getTime()<Gt.end&&Ke(!1),H.remove(Gt).then(function(le){ee(le)}).catch(function(le){ee(le)})}catch{ht=!1}}function ee(xt){o.debug("onRemoved buffer from:",xt.from,"to",xt.to),H&&(Zt(H.getAllBufferRanges()),Z.length===0&&(ht=!1,he()),xt.unintended&&(o.warn("Detected unintended removal from:",xt.from,"to",xt.to,"setting streamprocessor time to",xt.from),Ft(i.A.SEEK_TARGET,{time:xt.from})),ht?ue():(K?K=!1:he(),Ft(i.A.BUFFER_CLEARED,{from:xt.from,to:xt.to,unintended:xt.unintended,hasEnoughSpaceToAppend:Oe(),quotaExceeded:ot})))}function ge(xt){return new Promise(function(Gt){xt&&xt.MSETimeOffset!==void 0&&H&&H.updateTimestampOffset?H.updateTimestampOffset(xt.MSETimeOffset).then(function(){Gt()}).catch(function(){Gt()}):Gt()})}function De(){return H&&!l?H.updateAppendWindow($):Promise.resolve()}function Ve(){++it*(gt.get().streaming.wallclockTimeUpdateInterval/1e3)>=gt.get().streaming.buffer.bufferPruningInterval&&(it=0,sn())}function Ge(){qe()}function Ke(xt){(l=xt)?Ft(i.A.BUFFERING_COMPLETED):U=Number.POSITIVE_INFINITY}function Ze(){try{var xt,Gt,le=H.getAllBufferRanges(),yt=0;if(!le)return yt;for(Gt=0,xt=le.length;Gt<xt;Gt++)yt+=le.end(Gt)-le.start(Gt);return yt}catch{return 0}}function pe(xt){try{var Gt=xt,le=H.getAllBufferRanges();if(!le||le.length===0)return NaN;for(var yt=0;Gt===xt&&yt<le.length;){var Tt=le.start(yt),Wt=le.end(yt);Gt>=Tt&&Gt<=Wt&&(Gt=Wt),yt+=1}return Gt===xt?NaN:Gt}catch{}}function Oe(){var xt=Ze();return isNaN(xt)||xt<C}function Ft(xt,Gt){var le=Gt||{};N.trigger(xt,le,{streamId:$.id,mediaType:Y})}function se(xt,Gt){if(C=Number.POSITIVE_INFINITY,k=void 0,U=Number.POSITIVE_INFINITY,F=0,st=null,l=!1,ht=!1,ot=!1,p=0,it=0,Z=[],z=NaN,w=!1,H){var le=H;H=null,xt||Gt||le.abort().then(function(){le.reset(Gt),le=null})}K=!1}return t={initialize:function(xt){vt(xt),N.on(i.A.INIT_FRAGMENT_LOADED,Mt,t),N.on(i.A.MEDIA_FRAGMENT_LOADED,Qt,t),N.on(i.A.WALLCLOCK_TIME_UPDATED,Ve,t),N.on(r.A.PLAYBACK_PLAYING,Kt,t),N.on(r.A.PLAYBACK_PROGRESS,Pt,t),N.on(r.A.PLAYBACK_TIME_UPDATED,Pt,t),N.on(r.A.PLAYBACK_RATE_CHANGED,Ge,t),N.on(r.A.PLAYBACK_STALLED,ce,t)},getStreamId:function(){return $.id},getType:function(){return Y},getBufferControllerType:function(){return Ae},createBufferSink:Ct,dischargePreBuffer:function(){if(H&&B&&typeof B.discharge=="function"){var xt=B.getAllBufferRanges();if(xt.length>0){for(var Gt="Beginning "+Y+"PreBuffer discharge, adding buffer for:",le=0;le<xt.length;le++)Gt+=" start: "+xt.start(le)+", end: "+xt.end(le)+";";o.debug(Gt)}else o.debug("PreBuffer discharge requested, but there were no media segments in the PreBuffer.");j=[];for(var yt=B.discharge(),Tt=null,Wt=0;Wt<yt.length;Wt++){var we=yt[Wt];if(we.segmentType!==jt.G.INIT_SEGMENT_TYPE){var je=et.extract(we.streamId,we.representationId);je&&Tt!==je&&(j.push(je),H.append(je),Tt=je)}j.push(we),H.append(we)}B.reset(),B=null}},getBuffer:function(){return H},getBufferLevel:function(){return p},getRangeAt:ye,hasBufferAtTime:function(xt){try{var Gt=H.getAllBufferRanges();if(!Gt||Gt.length===0)return!1;for(var le=0;le<Gt.length;){var yt=Gt.start(le),Tt=Gt.end(le);if(xt>=yt&&xt<=Tt)return!0;le+=1}return!1}catch(Wt){return o.error(Wt),!1}},pruneBuffer:sn,setMediaSource:vt,getMediaSource:function(){return b},appendInitSegmentFromCache:function(xt){var Gt=et.extract($.id,xt);return!!Gt&&(o.info("Append Init fragment",Y," with representationId:",Gt.representationId," and quality:",Gt.quality,", data size:",Gt.bytes.byteLength),$t(Gt),!0)},getIsBufferingCompleted:function(){return l},setIsBufferingCompleted:Ke,getIsPruningInProgress:function(){return ht},reset:function(xt,Gt){N.off(i.A.INIT_FRAGMENT_LOADED,Mt,this),N.off(i.A.MEDIA_FRAGMENT_LOADED,Qt,this),N.off(i.A.WALLCLOCK_TIME_UPDATED,Ve,this),N.off(r.A.PLAYBACK_PLAYING,Kt,this),N.off(r.A.PLAYBACK_PROGRESS,Pt,this),N.off(r.A.PLAYBACK_TIME_UPDATED,Pt,this),N.off(r.A.PLAYBACK_RATE_CHANGED,Ge,this),N.off(r.A.PLAYBACK_STALLED,ce,this),se(xt,Gt)},prepareForPlaybackSeek:function(){return l&&Ke(!1),H.abort()},prepareForReplacementTrackSwitch:function(xt){return new Promise(function(Gt,le){H.abort().then(function(){return De()}).then(function(){return gt.get().streaming.buffer.useChangeTypeForTrackSwitch?H.changeType(xt):Promise.resolve()}).then(function(){return Ne()}).then(function(){Ke(!1),Gt()}).catch(function(yt){le(yt)})})},prepareForNonReplacementTrackSwitch:function(xt){return new Promise(function(Gt,le){De().then(function(){return gt.get().streaming.buffer.useChangeTypeForTrackSwitch?H.changeType(xt):Promise.resolve()}).then(function(){Gt()}).catch(function(yt){le(yt)})})},prepareForForceReplacementQualitySwitch:function(xt){return new Promise(function(Gt,le){H.abort().then(function(){return De()}).then(function(){return Ne()}).then(function(){return ge(xt)}).then(function(){Ke(!1),Gt()}).catch(function(yt){le(yt)})})},updateAppendWindow:De,getAllRangesWithSafetyFactor:Et,getContinuousBufferTimeForTargetTime:pe,clearBuffers:kt,pruneAllSafely:Ne,updateBufferTimestampOffset:ge,setSeekTarget:function(xt){z=xt},segmentRequestingCompleted:function(xt){isNaN(xt)||(U=xt,de())}},o=(0,g.A)(f).getInstance().getLogger(t),et=Ot(f).getInstance(),se(),t}Re.__dashjs_factory_name=Ae;var Pe=h.A.getClassFactory(Re),tt="NotFragmentedTextBufferController";function at(e){e=e||{};var t,o,l,p,C,b,F=this.context,U=(0,y.A)(F).getInstance(),H=e.textController,B=e.errHandler,w=e.streamInfo,j=e.type;function k(ht){p=ht}function st(ht){var ot,et;o!==ht&&(o=ht)&&(ot=i.A.BUFFERING_COMPLETED,et={},U.trigger(ot,et,{streamId:w.id,mediaType:j}))}function it(ht){ht.chunk.bytes&&!o&&(b.save(ht.chunk),C.append(ht.chunk),st(!0))}return t={initialize:function(ht){k(ht)},getStreamId:function(){return w.id},getType:function(){return j},getBufferControllerType:function(){return tt},createBufferSink:function(ht){return new Promise(function(ot,et){try{(C=Nt(F).create({mediaSource:p,textController:H,eventBus:U})).initializeForFirstUse(w,ht),l||(C.getBuffer()&&typeof C.getBuffer().initialize=="function"&&C.getBuffer().initialize(),l=!0),ot(C)}catch(Z){B.error(new pt.A(mt.MEDIASOURCE_TYPE_UNSUPPORTED_CODE,mt.MEDIASOURCE_TYPE_UNSUPPORTED_MESSAGE+j)),et(Z)}})},dischargePreBuffer:function(){},getBuffer:function(){return C},getBufferLevel:function(){return 0},getRangeAt:function(){return null},pruneBuffer:function(){},hasBufferAtTime:function(){return!0},getAllRangesWithSafetyFactor:function(){return[]},getContinuousBufferTimeForTargetTime:function(){return Number.POSITIVE_INFINITY},setMediaSource:k,getMediaSource:function(){return p},appendInitSegmentFromCache:function(ht){return b.extract(w.id,ht)!==null},getIsBufferingCompleted:function(){return o},setIsBufferingCompleted:st,getIsPruningInProgress:function(){return!1},reset:function(ht){U.off(i.A.INIT_FRAGMENT_LOADED,it,t),!ht&&C&&(C.abort(),C.reset(),C=null)},clearBuffers:function(){return Promise.resolve()},prepareForPlaybackSeek:function(){return Promise.resolve()},prepareForReplacementTrackSwitch:function(){return o=!1,Promise.resolve()},setSeekTarget:function(){},updateAppendWindow:function(){return Promise.resolve()},pruneAllSafely:function(){return Promise.resolve()},updateBufferTimestampOffset:function(){return Promise.resolve()},segmentRequestingCompleted:function(){}},l=!1,p=null,o=!1,b=Ot(F).getInstance(),U.on(i.A.INIT_FRAGMENT_LOADED,it,t),t}at.__dashjs_factory_name=tt;var qt=h.A.getClassFactory(at);function v(e){e=e||{};var t,o,l,p,C,b,F,U,H,B,w,j,k,st=this.context,it=(0,y.A)(st).getInstance(),ht=e.dashMetrics,ot=e.mediaPlayerModel,et=e.fragmentModel,Z=e.abrController,K=e.playbackController,z=e.textController,f=e.type,N=e.bufferController,S=e.representationController,L=e.settings;function R(){j=!0}function V(){j=!1}function dt(Qt){if(!N.getIsBufferingCompleted()){ut();var $t=isNaN(Qt)?0:Qt;C=setTimeout(P,$t)}}function ut(){C&&(clearTimeout(C),C=null)}function P(){try{if(function(){try{return f===u.A.TEXT&&!z.isTextEnabled()||K.isPaused()&&(!K.getStreamController().getInitialPlayback()||!K.getStreamController().getAutoPlay())&&!L.get().streaming.scheduling.scheduleWhilePaused}catch{return!1}}())return void ut();if(function(){try{return!!j&&S.getCurrentRepresentationInfo()&&(isNaN(H)||B||(Zt=o.id,ae=Z.getMaxAllowedIndexFor(f,Zt),!(!isNaN(U)&&U==ae||(l.info("Top quality "+f+" index has changed from "+U+" to "+ae),U=ae,0)))||function(){var Ne=S.getCurrentRepresentationInfo();return!f||!Ne||ht.getCurrentBufferLevel(f)<$()}())}catch{return!1}var Zt,ae}()){var Qt=!1;k&&(Qt=Z.checkPlaybackQuality(f,o.id)),Qt||($t=S.getCurrentRepresentationInfo(),w||$t.quality!==H||B?(B?(l.debug("Switch track for "+f+", representation id = "+$t.id),B=!1):l.debug("Quality has changed, get init request for representationid = "+$t.id),it.trigger(i.A.INIT_FRAGMENT_NEEDED,{representationId:$t.id,sender:t},{streamId:o.id,mediaType:f}),k=!1,w=!1):(l.debug("Media segment needed for ".concat(f," and stream id ").concat(o.id)),it.trigger(i.A.MEDIA_FRAGMENT_NEEDED,{},{streamId:o.id,mediaType:f}),k=!0))}else dt(K.getLowLatencyModeEnabled()?L.get().streaming.scheduling.lowLatencyTimeout:L.get().streaming.scheduling.defaultTimeout)}catch{dt(K.getLowLatencyModeEnabled()?L.get().streaming.scheduling.lowLatencyTimeout:L.get().streaming.scheduling.defaultTimeout)}var $t}function $(){var Qt=NaN,$t=S.getCurrentRepresentationInfo();return f&&$t&&(Qt=f===u.A.TEXT?function(){try{if(z.isTextEnabled()){var Zt=S.getCurrentRepresentationInfo();if(isNaN(Zt.fragmentDuration)){var ae=ht.getCurrentSchedulingInfo(_.A.SCHEDULING_INFO);return ae?ae.duration:0}return Zt.fragmentDuration}return 0}catch{return 0}}():f===u.A.AUDIO&&b?function(){try{var Zt=ht.getCurrentBufferLevel(u.A.VIDEO),ae=S.getCurrentRepresentationInfo();return isNaN(ae.fragmentDuration)?Zt+1:Math.max(Zt+1,ae.fragmentDuration)}catch{return 0}}():function(){try{var Zt=S.getCurrentRepresentationInfo().mediaInfo.streamInfo;return Z.isPlayingAtTopQuality(Zt)?Zt.manifestInfo.duration>=L.get().streaming.buffer.longFormContentDurationThreshold?L.get().streaming.buffer.bufferTimeAtTopQualityLongForm:L.get().streaming.buffer.bufferTimeAtTopQuality:ot.getStableBufferTime()}catch{return ot.getStableBufferTime()}}()),Qt}function Y(){gt(!0)}function gt(Qt){if(K&&et){var $t=et.getRequests({state:J.FRAGMENT_MODEL_EXECUTED,time:K.getTime(),threshold:0})[0];$t&&K.getTime()>=$t.startTime&&((!F.mediaInfo||$t.mediaInfo.type===F.mediaInfo.type&&$t.mediaInfo.index!==F.mediaInfo.index)&&Qt&&it.trigger(i.A.TRACK_CHANGE_RENDERED,{mediaType:f,oldMediaInfo:F.mediaInfo,newMediaInfo:$t.mediaInfo,streamId:o.id}),$t.quality===F.quality&&$t.adaptationIndex===F.adaptationIndex||!Qt||(l.debug("Quality change rendered for streamId ".concat(o.id," and type ").concat(f)),it.trigger(i.A.QUALITY_CHANGE_RENDERED,{mediaType:f,oldQuality:F.quality,newQuality:$t.quality,streamId:o.id})),F={mediaInfo:$t.mediaInfo,quality:$t.quality,adaptationIndex:$t.adaptationIndex})}}function vt(){et.abortRequests(),ut()}function ft(){L.get().streaming.scheduling.scheduleWhilePaused||dt()}function Ct(Qt){ht.updatePlayListTraceMetrics({playbackspeed:Qt.playbackRate.toString()})}function Mt(){k=!0,p=0,H=NaN,F={mediaInfo:void 0,quality:NaN,adaptationIndex:NaN},U=NaN,B=!1,w=!1,j=!0}return t={initialize:function(Qt){b=Qt,it.on(i.A.URL_RESOLUTION_FAILED,vt,t),it.on(r.A.PLAYBACK_STARTED,ft,t),it.on(r.A.PLAYBACK_RATE_CHANGED,Ct,t),it.on(r.A.PLAYBACK_TIME_UPDATED,Y,t),it.on(r.A.MANAGED_MEDIA_SOURCE_START_STREAMING,R,t),it.on(r.A.MANAGED_MEDIA_SOURCE_END_STREAMING,V,t)},getType:function(){return f},getStreamId:function(){return o.id},setTimeToLoadDelay:function(Qt){p=Qt},getTimeToLoadDelay:function(){return p},setSwitchTrack:function(Qt){B=Qt},getSwitchTrack:function(){return B},startScheduleTimer:dt,clearScheduleTimer:ut,reset:function(){it.off(i.A.URL_RESOLUTION_FAILED,vt,t),it.off(r.A.PLAYBACK_STARTED,ft,t),it.off(r.A.PLAYBACK_RATE_CHANGED,Ct,t),it.off(r.A.PLAYBACK_TIME_UPDATED,Y,t),it.off(r.A.MANAGED_MEDIA_SOURCE_START_STREAMING,R,t),it.off(r.A.MANAGED_MEDIA_SOURCE_END_STREAMING,V,t),ut(),gt(!1),Mt(),o=null},getBufferTarget:$,getPlaybackController:function(){return K},setCheckPlaybackQuality:function(Qt){k=Qt},setInitSegmentRequired:function(Qt){w=Qt},setLastInitializedQuality:function(Qt){H=Qt}},l=(0,g.A)(st).getInstance().getLogger(t),Mt(),o=e.streamInfo,t}v.__dashjs_factory_name="ScheduleController";var A=h.A.getClassFactory(v),c=M(284);function E(e){var t,o,l,p,C,b,F=(e=e||{}).eventBus,U=e.events,H=e.abrController,B=e.dashMetrics,w=e.playbackController,j=e.timelineConverter,k=e.type,st=e.streamInfo,it=e.dashConstants,ht=e.segmentsController,ot=e.isDynamic,et=e.adapter;function Z(){return k}function K(){return l}function z(){return b}function f(){o=null,l=!0,p=[],C=null}function N(ut){return new Promise(function(P,$){var Y=ut.hasInitialization(),gt=ut.hasSegments(),vt=[];vt.push(ht.updateInitData(ut,Y)),vt.push(ht.updateSegmentData(ut,gt)),Promise.all(vt).then(function(ft){var Ct;ft[0]&&!ft[0].error&&(ut=function(Mt,Qt){return Qt&&!Qt.error&&Qt.representation?Qt.representation:Mt}(ut,ft[0])),ft[1]&&!ft[1].error&&(ut=function(Mt,Qt){if(Qt&&!Qt.error){var $t,Zt,ae,Ne,Et=Qt.segments,Pt=[],ce=0;for($t=0,Zt=Et?Et.length:0;$t<Zt;$t++)ae=Et[$t],(Ne=(0,c.W$)(j,ot,Mt,ae.startTime,ae.duration,ae.timescale,ae.media,ae.mediaRange,ce))&&(Pt.push(Ne),Ne=null,ce++);return Pt.length>0&&(Mt.segments=Pt),Mt}}(ut,ft[1])),(Ct=ut).mediaFinishedInformation=ht.getMediaFinishedInformation(Ct),function(Mt){if(K()){var Qt,$t,Zt=B.getCurrentManifestUpdate(),ae=!1;if(Zt){for(var Ne=0;Ne<Zt.representationInfo.length;Ne++)if((Qt=Zt.representationInfo[Ne]).index===Mt.index&&Qt.mediaType===Z()){ae=!0;break}ae||B.addManifestUpdateRepresentationInfo(Mt,Z())}if(function(){for(var Pt=0,ce=p.length;Pt<ce;Pt++){var Kt=p[Pt].segmentInfoType;if(!p[Pt].hasInitialization()||(Kt===it.SEGMENT_BASE||Kt===it.BASE_URL)&&!p[Pt].segments)return!1}return!0}()){H.setPlaybackQuality(k,st,($t=b,p.indexOf($t)));var Et=B.getCurrentDVRInfo(k);Et&&B.updateManifestUpdateInfo({latency:Et.range.end-w.getTime()}),B.getCurrentRepresentationSwitch(z().adaptation.type)||S(),R()}}}(ut),P()}).catch(function(ft){$(ft)})})}function S(){(function(){if(!(H&&B&&w&&j))throw new Error(u.A.MISSING_CONFIG_ERROR)})();var ut=new Date,P=z(),$=1e3*w.getTime();P&&B.addRepresentationSwitch(P.adaptation.type,ut,$,P.id),F.trigger(r.A.REPRESENTATION_SWITCH,{mediaType:k,streamId:st.id,currentRepresentation:P,numberOfRepresentations:p.length},{streamId:st.id,mediaType:k})}function L(ut){return ut==null||ut>=p.length?null:p[ut]}function R(ut){l=!1,F.trigger(U.DATA_UPDATE_COMPLETED,{data:o,currentRepresentation:b,error:ut},{streamId:st.id,mediaType:k})}function V(ut){b=ut,C=et.convertRepresentationToRepresentationInfo(b)}function dt(ut){if(ut.newDuration){var P=z();P&&P.adaptation.period&&(P.adaptation.period.duration=ut.newDuration)}}return t={getStreamId:function(){return st.id},getType:Z,getData:function(){return o},isUpdating:K,updateData:function(ut,P,$,Y,gt){return new Promise(function(vt,ft){if(l=!0,p=P,o=ut,V(L(gt)),$!==u.A.VIDEO&&$!==u.A.AUDIO&&($!==u.A.TEXT||!Y))return R(),void vt();for(var Ct=[],Mt=0,Qt=p.length;Mt<Qt;Mt++){var $t=p[Mt];Ct.push(N($t))}Promise.all(Ct).then(function(){V(L(gt)),vt()}).catch(function(Zt){ft(Zt)})})},getCurrentRepresentation:z,getCurrentRepresentationInfo:function(){return C},getRepresentationForQuality:L,prepareQualityChange:function(ut){V(L(ut)),S()},reset:function(){F.off(r.A.MANIFEST_VALIDITY_CHANGED,dt,t),f()}},f(),F.on(r.A.MANIFEST_VALIDITY_CHANGED,dt,t),t}E.__dashjs_factory_name="RepresentationController";var Q=h.A.getClassFactory(E),D=M(7652),Bt=M(2945),Dt=M(9913),At=M(2187);function Rt(e,t,o){return Object.defineProperty(e,"prototype",{writable:!1}),e}function _t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var Yt=Rt(function e(){_t(this,e),this.start=null,this.mstart=null,this.starttype=null,this.trace=[]});Yt.INITIAL_PLAYOUT_START_REASON="initial_playout",Yt.SEEK_START_REASON="seek",Yt.RESUME_FROM_PAUSE_START_REASON="resume",Yt.METRICS_COLLECTION_START_REASON="metrics_collection_start";var Vt=Rt(function e(){_t(this,e),this.representationid=null,this.subreplevel=null,this.start=null,this.mstart=null,this.duration=null,this.playbackspeed=null,this.stopreason=null});Vt.REPRESENTATION_SWITCH_STOP_REASON="representation_switch",Vt.REBUFFERING_REASON="rebuffering",Vt.USER_REQUEST_STOP_REASON="user_request",Vt.END_OF_PERIOD_STOP_REASON="end_of_period",Vt.END_OF_CONTENT_STOP_REASON="end_of_content",Vt.METRICS_COLLECTION_STOP_REASON="metrics_collection_end",Vt.FAILURE_STOP_REASON="failure";var Xt=M(6849);function ne(){return{ntpToUTC:function(e){var t=new Date(Date.UTC(1900,0,1,0,0,0));return new Date(t.getTime()+e).getTime()}}}ne.__dashjs_factory_name="TimeUtils";var Te=h.A.getSingletonFactory(ne);function me(e){e=e||{};var t,o,l,p,C,b,F,U,H,B,w,j,k,st,it,ht=this.context,ot=(0,y.A)(ht).getInstance(),et=e.streamInfo,Z=e.type,K=e.errHandler,z=e.mimeType,f=e.timelineConverter,N=e.adapter,S=e.manifestModel,L=e.mediaPlayerModel,R=e.fragmentModel,V=e.abrController,dt=e.playbackController,ut=e.mediaController,P=e.textController,$=e.dashMetrics,Y=e.settings,gt=e.boxParser,vt=e.segmentBlacklistController;function ft(){return et.id}function Ct(){return Z}function Mt(){return N.getIsTextTrack(U.getData())}function Qt(){C=[],p=null,st=0,H=!1,B=!1,w=!1,it=null}function $t(Ft){return!isNaN(Ft)&&!isNaN(et.duration)&&isFinite(et.duration)&&Ft>=et.start+et.duration}function Zt(Ft){var se=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1];if(Ft.sender){if(dt.getIsManifestUpdateInProgress())Ne();else if((!Mt()||P.isTextEnabled())&&b&&Ft.representationId&&!b.appendInitSegmentFromCache(Ft.representationId)){var xt=U.getCurrentRepresentation();if(xt.range===0)return void ae();var Gt=j?j.getInitRequest(p,xt):null;Gt?R.executeRequest(Gt):se&&(F.setInitSegmentRequired(!0),Ne())}}}function ae(Ft){var se=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1];if(dt.getIsManifestUpdateInProgress()||b.getIsPruningInProgress())Ne();else{var xt=function(){var Gt,le=ge();if(isNaN(st)||Ct()===u.A.TEXT&&!P.isTextEnabled())return null;if(j){var yt=U&&le?U.getRepresentationForQuality(le.quality):null;Gt=H?j.getSegmentRequestForTime(p,yt,st):B?j.repeatSegmentRequest(p,yt):j.getNextSegmentRequest(p,yt)}return Gt}();xt?(H=!1,B=!1,function(Gt){isNaN(Gt.startTime+Gt.duration)||(st=Gt.startTime+Gt.duration),Gt.delayLoadingTime=new Date().getTime()+F.getTimeToLoadDelay(),F.setTimeToLoadDelay(0),function(le){var yt=le.url;return le.range&&(yt=yt.concat("_",le.range)),vt.contains(yt)}(Gt)?(o.warn("Fragment request url ".concat(Gt.url," for stream id ").concat(et.id," and media type ").concat(Z," is on the ignore list and will be skipped")),Ne()):(o.debug("Next fragment request url for stream id ".concat(et.id," and media type ").concat(Z," is ").concat(Gt.url)),R.executeRequest(Gt))}(xt)):function(Gt){var le,yt=U.getCurrentRepresentation();if(Y.get().streaming.gaps.enableSeekFix&&(H||dt.getTime()===0)&&(l?l&&yt.segmentInfoType===n.A.SEGMENT_TIMELINE&&(le=j.getValidTimeAheadOfTargetTime(st,p,yt,Y.get().streaming.gaps.threshold)):le=j.getValidTimeAheadOfTargetTime(st,p,yt,Y.get().streaming.gaps.threshold),!isNaN(le)&&le!==st))return void(dt.isSeeking()||dt.getTime()===0?(o.warn("Adjusting playback time ".concat(le," because of gap in the manifest. Seeking by ").concat(le-st)),dt.seek(le,!1,!1)):(o.warn("Adjusting buffering time ".concat(le," because of gap in the manifest. Adjusting time by ").concat(le-st)),Oe(le),Gt&&Ne()));if(j.isLastSegmentRequested(yt,st)){var Tt=j.getCurrentIndex();return o.debug("Segment requesting for stream ".concat(et.id," has finished")),ot.trigger(i.A.STREAM_REQUESTING_COMPLETED,{segmentIndex:Tt},{streamId:et.id,mediaType:Z}),b.segmentRequestingCompleted(Tt),void F.clearScheduleTimer()}Gt&&Ne()}(se)}}function Ne(){F.startScheduleTimer(dt.getLowLatencyModeEnabled()?Y.get().streaming.scheduling.lowLatencyTimeout:Y.get().streaming.scheduling.defaultTimeout)}function Et(Ft){Ft.error||b.getIsBufferingCompleted()||b.updateBufferTimestampOffset(Ft.currentRepresentation)}function Pt(Ft){$.addBufferState(Z,Ft.state,F.getBufferTarget()),Ft.state!==_.A.BUFFER_EMPTY||dt.isSeeking()||(o.info("Buffer is empty! Stalling!"),$.pushPlayListTraceMetrics(new Date,Vt.REBUFFERING_REASON))}function ce(Ft){R.syncExecutedRequestsWithBufferedRange(b.getBuffer().getAllBufferRanges(),et.duration),Ft.quotaExceeded&&Ft.from>dt.getTime()&&Oe(Ft.from),Ft.hasEnoughSpaceToAppend&&Ft.quotaExceeded&&F.startScheduleTimer()}function Kt(Ft){if(Ft&&Ft.lastRequestAppended&&Ft.lastRequestAppended.url){var se=Ft.lastRequestAppended.url;Ft.lastRequestAppended.range&&(se=se.concat("_",Ft.lastRequestAppended.range)),o.warn("Blacklisting segment with url ".concat(se)),vt.add(se)}}function ye(Ft){if(o.debug("Appended bytes for ".concat(Ft.mediaType," and stream id ").concat(Ft.streamId)),Ft.segmentType===jt.G.INIT_SEGMENT_TYPE){var se=Ft.quality;F.setLastInitializedQuality(se),o.info("["+Z+"] lastInitializedRepresentationInfo changed to "+Ft.quality)}it?he(it):F.startScheduleTimer(0)}function he(Ft){var se=R.getRequests({state:J.FRAGMENT_MODEL_LOADING});if(se&&se.length>0)return o.debug("Preparing for default quality switch: Waiting for ongoing segment request to be finished before applying switch."),void(it=Ft);b.updateBufferTimestampOffset(Ft).then(function(){F.setCheckPlaybackQuality(!1),p.segmentAlignment||p.subSegmentAlignment?F.startScheduleTimer():Ze(),it=null,w=!1}).catch(function(){it=null,w=!1})}function de(Ft){o.info("onFragmentLoadingAbandoned request: "+Ft.request.url+" has been aborted"),dt.isSeeking()||F.getSwitchTrack()||w||(o.info("onFragmentLoadingAbandoned request: "+Ft.request.url+" has to be downloaded again, origin is not seeking process or switch track call"),Ft.request&&Ft.request.isInitializationRequest()?F.setInitSegmentRequired(!0):Oe(Ft.request.startTime+Ft.request.duration/2),F.startScheduleTimer(0))}function qe(Ft){o.info("OnFragmentLoadingCompleted for stream id "+et.id+" and media type "+Z+" - Url:",Ft.request?Ft.request.url:"undefined",Ft.request.range?", Range:"+Ft.request.range:""),Mt()&&F.startScheduleTimer(0),Ft.error&&Ft.request.serviceLocation&&function(se){o.info("Fragment loading completed with an error"),se&&se.request&&se.request.type&&(se.request.type===jt.G.INIT_SEGMENT_TYPE?Zt({representationId:se.request.representationId,sender:{}},!1):se.request.type===jt.G.MEDIA_SEGMENT_TYPE&&(Oe(se.request.startTime+se.request.duration/2),ae({},!1)))}(Ft)}function Ye(){Oe(dt.getTime()),ee().startScheduleTimer()}function sn(Ft){var se=Ft.currentTrackInfo;if(se){var xt=C.find(function(Gt){return Gt.index===se.index&&Gt.lang===se.lang});xt&&ue(xt).then(function(){b.setIsBufferingCompleted(!1),Oe(dt.getTime()),F.setInitSegmentRequired(!0),F.startScheduleTimer()})}}function ln(Ft){Oe(Ft.quotaExceededTime),F.clearScheduleTimer()}function kt(){return b?b.getBuffer():null}function ue(Ft){Ft===p||Ft&&p&&Ft.type!==p.type||(p=Ft);var se=N.getRealAdaptation(et,p),xt=N.getVoRepresentations(p);if(U){var Gt,le=U.getData(),yt=V.getMaxAllowedIndexFor(Z,et.id),Tt=V.getMinAllowedIndexFor(Z,et.id),Wt=null;return le!==null&&le.id===se.id||Z===u.A.TEXT?Gt=V.getQualityFor(Z,et.id):(Wt=V.getThroughputHistory().getAverageThroughput(Z,l)||V.getInitialBitrateFor(Z,et.id),Gt=V.getQualityForBitrate(p,Wt,et.id)),Tt!==void 0&&Gt<Tt&&(Gt=Tt),Gt>yt&&(Gt=yt),U.updateData(se,xt,Z,p.isFragmented,Gt)}return Promise.resolve()}function ee(){return F}function ge(Ft){var se;return Ft!==void 0?((0,D.zQ)(Ft),se=U?U.getRepresentationForQuality(Ft):null):se=U?U.getCurrentRepresentation():null,N.convertRepresentationToRepresentationInfo(se)}function De(){return!!b&&b.getIsBufferingCompleted()}function Ve(Ft){if(Y.get().streaming.enableManifestTimescaleMismatchFix){var se=Ft.chunk,xt=se.bytes,Gt=ge(se.quality),le=U&&Gt?U.getRepresentationForQuality(Gt.quality):null;Gt&&le&&(le.timescale=gt.getMediaTimescaleFromMoov(xt))}}function Ge(Ft){var se=Ft.chunk,xt=se.bytes,Gt=se.quality,le=ge(Gt),yt=U&&le?U.getRepresentationForQuality(le.quality):null;if(le&&yt){var Tt;if(Y.get().streaming.parseInbandPrft&&Ft.request.type===jt.G.MEDIA_SEGMENT_TYPE){var Wt=function(dn,jn){var Pn=dn.getBoxes("prft"),Zn=[];return Pn.forEach(function(Ir){Zn.push(function(ir,cr){var tr="unknown";switch(ir.flags){case 0:tr=n.A.PRODUCER_REFERENCE_TIME_TYPE.ENCODER;break;case 16:tr=n.A.PRODUCER_REFERENCE_TIME_TYPE.APPLICATION;break;case 24:tr=n.A.PRODUCER_REFERENCE_TIME_TYPE.CAPTURED}var Rr=1e3*ir.ntp_timestamp_sec+ir.ntp_timestamp_frac/Math.pow(2,32)*1e3;return{type:tr,ntpTimestamp:Rr=Te(ht).getInstance().ntpToUTC(Rr),mediaTime:ir.media_time/cr}}(Ir,jn))}),Zn}(Tt=Tt||gt.parse(xt),yt.timescale);Wt&&Wt.length&&ot.trigger(r.A.INBAND_PRFT,{data:Wt},{streamId:et.id,mediaType:Z})}var we=N.getEventsFor(le.mediaInfo,null,et),je=N.getEventsFor(le,yt,et);if(we&&we.length>0||je&&je.length>0){var hn=R.getRequests({state:J.FRAGMENT_MODEL_EXECUTED,quality:Gt,index:se.index})[0],En=function(dn,jn,Pn,Zn){try{for(var Ir={},ir=[],cr=Pn.concat(Zn),tr=0,Rr=cr.length;tr<Rr;tr++)Ir[cr[tr].schemeIdUri+"/"+cr[tr].value]=cr[tr];var fr=dn.getBoxes("emsg");if(!fr||fr.length===0)return ir;for(var dr=dn.getBox("sidx"),Oi=!dr||isNaN(dr.earliest_presentation_time)||isNaN(dr.timescale)?jn&&!isNaN(jn.mediaStartTime)?jn.mediaStartTime:0:dr.earliest_presentation_time/dr.timescale,_r=Math.max(Oi,0),si=U.getCurrentRepresentation(),Br=0,Mi=fr.length;Br<Mi;Br++){var wr=N.getEvent(fr[Br],Ir,_r,si);wr&&ir.push(wr)}return ir}catch{return[]}}(Tt=Tt||gt.parse(xt),hn,we,je);ot.trigger(i.A.INBAND_EVENTS,{events:En},{streamId:et.id})}}}function Ke(){var Ft=dt.getTime();Y.get().streaming.buffer.flushBufferAtTrackSwitch&&dt.seek(Ft+.001,!1,!0),Oe(Ft),b.setSeekTarget(Ft),F.startScheduleTimer()}function Ze(){var Ft=dt.getTime(),se=b.getContinuousBufferTimeForTargetTime(Ft);Oe(isNaN(se)?Ft:se),F.startScheduleTimer()}function pe(Ft){Ft&&!isNaN(Ft.time)&&(Oe(Ft.time),b.setSeekTarget(Ft.time))}function Oe(Ft){st=Ft,H=!0}return t={initialize:function(Ft,se,xt){k=(0,Xt.A)(ht).create({events:i.A,eventBus:ot,streamInfo:et,timelineConverter:f,dashConstants:n.A,segmentBaseController:e.segmentBaseController,type:Z}),j=(0,Bt.A)(ht).create({streamInfo:et,type:Z,timelineConverter:f,dashMetrics:$,mediaPlayerModel:L,baseURLController:e.baseURLController,errHandler:K,segmentsController:k,settings:Y,boxParser:gt,events:i.A,eventBus:ot,errors:mt,debug:(0,g.A)(ht).getInstance(),requestModifier:(0,Dt.A)(ht).getInstance(),dashConstants:n.A,constants:u.A,urlUtils:(0,At.A)(ht).getInstance()}),l=et.manifestInfo.isDynamic,j.initialize(l),V.registerStreamType(Z,t),U=Q(ht).create({streamInfo:et,type:Z,abrController:V,dashMetrics:$,playbackController:dt,timelineConverter:f,dashConstants:n.A,events:i.A,eventBus:ot,errors:mt,isDynamic:l,adapter:N,segmentsController:k}),b=function(Gt,le){return Gt?Gt!==u.A.TEXT||le?Pe(ht).create({streamInfo:et,type:Gt,mediaPlayerModel:L,manifestModel:S,fragmentModel:R,errHandler:K,mediaController:ut,representationController:U,adapter:N,textController:P,abrController:V,playbackController:dt,settings:Y}):qt(ht).create({streamInfo:et,type:Gt,mimeType:z,fragmentModel:R,textController:P,errHandler:K,settings:Y}):(K.error(new pt.A(mt.MEDIASOURCE_TYPE_UNSUPPORTED_CODE,mt.MEDIASOURCE_TYPE_UNSUPPORTED_MESSAGE+"not properly defined")),null)}(Z,xt),b&&b.initialize(Ft),(F=A(ht).create({streamInfo:et,type:Z,mimeType:z,adapter:N,dashMetrics:$,mediaPlayerModel:L,fragmentModel:R,abrController:V,playbackController:dt,textController:P,mediaController:ut,bufferController:b,representationController:U,settings:Y})).initialize(se),st=0,H=!1,B=!1},getStreamId:ft,getType:Ct,isUpdating:function(){return!!U&&U.isUpdating()},getBufferController:function(){return b},dischargePreBuffer:function(){b.dischargePreBuffer()},getFragmentModel:function(){return R},getScheduleController:ee,getRepresentationController:function(){return U},getRepresentationInfo:ge,getBufferLevel:function(){return b?b.getBufferLevel():0},isBufferingCompleted:De,createBufferSinks:function(Ft){var se=kt();return se?Promise.resolve(se):b?b.createBufferSink(p,Ft):Promise.resolve(null)},updateStreamInfo:function(Ft){return et=Ft,De()?Promise.resolve():b.updateAppendWindow()},getStreamInfo:function(){return et},selectMediaInfo:ue,clearMediaInfoArray:function(){C=[]},addMediaInfo:function(Ft){C.indexOf(Ft)===-1&&C.push(Ft)},prepareTrackSwitch:function(){return new Promise(function(Ft){o.debug("Preparing track switch for type ".concat(Z));var se=Z===u.A.TEXT||Y.get().streaming.trackSwitchMode[Z]===u.A.TRACK_SWITCH_MODE_ALWAYS_REPLACE&&dt.getTimeToStreamEnd(et)>Y.get().streaming.buffer.stallThreshold;if(b.getIsBufferingCompleted()&&!se)return b.prepareForNonReplacementTrackSwitch(p.codec).then(function(){ot.trigger(i.A.BUFFERING_COMPLETED,{},{streamId:et.id,mediaType:Z})}).catch(function(){ot.trigger(i.A.BUFFERING_COMPLETED,{},{streamId:et.id,mediaType:Z})}),void Ft();F.clearScheduleTimer(),F.setSwitchTrack(!0),se?(ot.trigger(i.A.BUFFER_REPLACEMENT_STARTED,{mediaType:Z,streamId:et.id},{mediaType:Z,streamId:et.id}),R.abortRequests(),b.prepareForReplacementTrackSwitch(p.codec).then(function(){var xt=ge();return b.updateBufferTimestampOffset(xt)}).then(function(){Ke(),Ft()}).catch(function(){Ke(),Ft()})):b.prepareForNonReplacementTrackSwitch(p.codec).then(function(){Ze(),Ft()}).catch(function(){Ze(),Ft()})})},prepareQualityChange:function(Ft){it&&o.warn("Canceling queued representation switch to ".concat(it.quality," for ").concat(Z)),o.debug("Preparing quality switch for type ".concat(Z));var se=Ft.newQuality;w=!0,F.clearScheduleTimer(),U.prepareQualityChange(se);var xt=ge(se);Ft.reason&&Ft.reason.forceReplace?function(Gt){R.abortRequests(),ot.trigger(i.A.BUFFER_REPLACEMENT_STARTED,{mediaType:Z,streamId:et.id},{mediaType:Z,streamId:et.id}),F.setCheckPlaybackQuality(!1),b.prepareForForceReplacementQualitySwitch(Gt).then(function(){Ke(),it=null,w=!1}).catch(function(){Ke(),it=null,w=!1})}(xt):Ft&&Ft.reason&&Ft.reason.forceAbandon?function(Gt){b.updateBufferTimestampOffset(Gt).then(function(){R.abortRequests(),B=!0,F.setCheckPlaybackQuality(!1),F.startScheduleTimer(),w=!1,it=null}).catch(function(){it=null,w=!1})}(xt):Y.get().streaming.buffer.fastSwitchEnabled?function(Gt){var le=dt.getTime(),yt=1.5*(isNaN(Gt.fragmentDuration)?1:Gt.fragmentDuration),Tt=R.getRequests({state:J.FRAGMENT_MODEL_EXECUTED,time:le+yt,threshold:0})[0];if(Tt&&!Mt()){var Wt=b.getBufferLevel(),we=V.getAbandonmentStateFor(et.id,Z);Tt.quality<Gt.quality&&Wt>=yt&&we!==_.A.ABANDON_LOAD?b.updateBufferTimestampOffset(Gt).then(function(){R.abortRequests(),Oe(le+yt),F.setCheckPlaybackQuality(!1),F.startScheduleTimer(),w=!1}).catch(function(){w=!1}):he(Gt)}else he(Gt)}(xt):he(xt),$.pushPlayListTraceMetrics(new Date,Vt.REPRESENTATION_SWITCH_STOP_REASON),$.createPlaylistTraceMetrics(xt.id,1e3*dt.getTime(),dt.getPlaybackRate())},getMediaInfo:function(){return p},getMediaSource:function(){return b.getMediaSource()},setMediaSource:function(Ft){return b.setMediaSource(Ft,p)},getBuffer:kt,setExplicitBufferingTime:Oe,finalisePlayList:function(Ft,se){$.pushPlayListTraceMetrics(Ft,se)},probeNextRequest:function(){var Ft=ge(),se=U&&Ft?U.getRepresentationForQuality(Ft.quality):null;return j.getNextSegmentRequestIdempotent(p,se)},prepareInnerPeriodPlaybackSeeking:function(Ft){return new Promise(function(se){if(b.hasBufferAtTime(Ft.seekTime))return b.pruneBuffer(),$t(b.getContinuousBufferTimeForTargetTime(Ft.seekTime))&&b.setIsBufferingCompleted(!0),void se();F.clearScheduleTimer(),R.abortRequests(),b.prepareForPlaybackSeek().then(function(){var xt=b.getAllRangesWithSafetyFactor(Ft.seekTime);return b.clearBuffers(xt)}).then(function(){var xt=b.getContinuousBufferTimeForTargetTime(Ft.seekTime);if($t(xt))b.setIsBufferingCompleted(!0),se();else{var Gt=isNaN(xt)?Ft.seekTime:xt;Oe(Gt),b.setSeekTarget(Gt);var le=[];le.push(b.updateAppendWindow());var yt=ge();le.push(b.updateBufferTimestampOffset(yt)),Promise.all(le).then(function(){F.setInitSegmentRequired(!0),F.setCheckPlaybackQuality(!1),F.startScheduleTimer(),se()})}}).catch(function(xt){o.error(xt)})})},prepareOuterPeriodPlaybackSeeking:function(){return new Promise(function(Ft,se){try{F.clearScheduleTimer(),R.abortRequests(),b.prepareForPlaybackSeek().then(function(){return b.pruneAllSafely()}).then(function(){Ft()})}catch(xt){se(xt)}})},reset:function(Ft,se){j&&j.reset(),b&&(b.reset(Ft,se),b=null),F&&(F.reset(),F=null),U&&(U.reset(),U=null),k&&(k=null),V&&V.unRegisterStreamType(ft(),Z),ot.off(i.A.DATA_UPDATE_COMPLETED,Et,t),ot.off(i.A.INIT_FRAGMENT_NEEDED,Zt,t),ot.off(i.A.MEDIA_FRAGMENT_NEEDED,ae,t),ot.off(i.A.INIT_FRAGMENT_LOADED,Ve,t),ot.off(i.A.MEDIA_FRAGMENT_LOADED,Ge,t),ot.off(i.A.BUFFER_LEVEL_STATE_CHANGED,Pt,t),ot.off(i.A.BUFFER_CLEARED,ce,t),ot.off(i.A.SEEK_TARGET,pe,t),ot.off(i.A.FRAGMENT_LOADING_ABANDONED,de,t),ot.off(i.A.FRAGMENT_LOADING_COMPLETED,qe,t),ot.off(i.A.SET_FRAGMENTED_TEXT_AFTER_DISABLED,Ye,t),ot.off(i.A.SET_NON_FRAGMENTED_TEXT,sn,t),ot.off(i.A.QUOTA_EXCEEDED,ln,t),ot.off(i.A.SOURCE_BUFFER_ERROR,Kt,t),ot.off(i.A.BYTES_APPENDED_END_FRAGMENT,ye,t),Qt(),Z=null,et=null}},o=(0,g.A)(ht).getInstance().getLogger(t),Qt(),ot.on(i.A.DATA_UPDATE_COMPLETED,Et,t,{priority:y.A.EVENT_PRIORITY_HIGH}),ot.on(i.A.INIT_FRAGMENT_NEEDED,Zt,t),ot.on(i.A.MEDIA_FRAGMENT_NEEDED,ae,t),ot.on(i.A.INIT_FRAGMENT_LOADED,Ve,t),ot.on(i.A.MEDIA_FRAGMENT_LOADED,Ge,t),ot.on(i.A.BUFFER_LEVEL_STATE_CHANGED,Pt,t),ot.on(i.A.BUFFER_CLEARED,ce,t),ot.on(i.A.SEEK_TARGET,pe,t),ot.on(i.A.FRAGMENT_LOADING_ABANDONED,de,t),ot.on(i.A.FRAGMENT_LOADING_COMPLETED,qe,t),ot.on(i.A.QUOTA_EXCEEDED,ln,t),ot.on(i.A.SET_FRAGMENTED_TEXT_AFTER_DISABLED,Ye,t),ot.on(i.A.SET_NON_FRAGMENTED_TEXT,sn,t),ot.on(i.A.SOURCE_BUFFER_ERROR,Kt,t),ot.on(i.A.BYTES_APPENDED_END_FRAGMENT,ye,t),t}me.__dashjs_factory_name="StreamProcessor";var Ue=h.A.getClassFactory(me);function Me(e,t,o){return Object.defineProperty(e,"prototype",{writable:!1}),e}var ze=Me(function e(){(function(t,o){if(!(t instanceof o))throw new TypeError("Cannot call a class as a function")})(this,e),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}),Qe=M(2930);function nn(e,t){if(e){if(typeof e=="string")return yn(e,t);var o={}.toString.call(e).slice(8,-1);return o==="Object"&&e.constructor&&(o=e.constructor.name),o==="Map"||o==="Set"?Array.from(e):o==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?yn(e,t):void 0}}function yn(e,t){(t==null||t>e.length)&&(t=e.length);for(var o=0,l=Array(t);o<t;o++)l[o]=e[o];return l}function xn(e){e=e||{};var t,o,l=this.context,p=e.requestModifier,C=e.lowLatencyThroughputModel,b=e.boxParser,F=(0,lt.A)(l).getInstance();function U(w){var j,k=new Date,st=w.request,it=new Headers;if(st.range&&it.append("Range","bytes="+st.range),w.headers)for(var ht in w.headers){var ot=w.headers[ht];ot&&it.append(ht,ot)}st.requestStartDate||(st.requestStartDate=k),p&&p.modifyRequestHeader&&p.modifyRequestHeader({setRequestHeader:function(f,N){it.append(f,N)}},{url:w.url}),typeof window.AbortController=="function"&&(j=new AbortController,w.abortController=j,j.signal.onabort=w.onabort);var et={method:w.method,headers:it,credentials:w.withCredentials?"include":void 0,signal:j?j.signal:void 0},Z=F.get().streaming.abr.fetchThroughputCalculationMode,K=Date.now(),z=0;new Promise(function(f){if(Z===u.A.ABR_FETCH_THROUGHPUT_CALCULATION_AAST&&C&&(z=C.getThroughputCapacityDelayMS(st,1e3*o.getCurrentBufferLevel(st.mediaType))))return setTimeout(f,z);f()}).then(function(){var f=Date.now();fetch(w.url,et).then(function(N){w.response||(w.response={}),w.response.status=N.status,w.response.statusText=N.statusText,w.response.responseURL=N.url,N.ok||w.onerror();var S,L="",R=function(ye){var he=typeof Symbol<"u"&&ye[Symbol.iterator]||ye["@@iterator"];if(!he){if(Array.isArray(ye)||(he=nn(ye))){he&&(ye=he);var de=0,qe=function(){};return{s:qe,n:function(){return de>=ye.length?{done:!0}:{done:!1,value:ye[de++]}},e:function(kt){throw kt},f:qe}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
4
4
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var Ye,sn=!0,ln=!1;return{s:function(){he=he.call(ye)},n:function(){var kt=he.next();return sn=kt.done,kt},e:function(kt){ln=!0,Ye=kt},f:function(){try{sn||he.return==null||he.return()}finally{if(ln)throw Ye}}}}(N.headers.keys());try{for(R.s();!(S=R.n()).done;){var V=S.value;L+=V+": "+N.headers.get(V)+`\r
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-XoMPqzfs.js");exports.EluvioPlayerParameters=e.PlayerParameters;exports.InitializeEluvioPlayer=e.Initialize;
|
package/dist/elv-player-js.es.js
CHANGED
|
@@ -49714,7 +49714,7 @@ const ii = {
|
|
|
49714
49714
|
ElvCrypto: async () => {
|
|
49715
49715
|
try {
|
|
49716
49716
|
if (!ii.elvCrypto) {
|
|
49717
|
-
const n = (await import("./index-
|
|
49717
|
+
const n = (await import("./index-D6c2QbKI.mjs")).default;
|
|
49718
49718
|
ii.elvCrypto = await new n().init();
|
|
49719
49719
|
}
|
|
49720
49720
|
return ii.elvCrypto;
|
|
@@ -66002,7 +66002,7 @@ class o2 {
|
|
|
66002
66002
|
playoutParameters: h
|
|
66003
66003
|
}), this.__destroyed)
|
|
66004
66004
|
return;
|
|
66005
|
-
o === "hls" ? await this.__InitializeHLS({ playoutUrl: i, authorizationToken: m, drm: u, drms: c, multiviewOptions: p }) : await this.__InitializeDash({ playoutUrl: i, authorizationToken: m, drm: u, drms: c, multiviewOptions: p }), this.playerOptions.collectVideoAnalytics && import("./Analytics-
|
|
66005
|
+
o === "hls" ? await this.__InitializeHLS({ playoutUrl: i, authorizationToken: m, drm: u, drms: c, multiviewOptions: p }) : await this.__InitializeDash({ playoutUrl: i, authorizationToken: m, drm: u, drms: c, multiviewOptions: p }), this.playerOptions.collectVideoAnalytics && import("./Analytics-BERz0XOY.mjs").then(({ InitializeMuxMonitoring: w }) => w({
|
|
66006
66006
|
appName: this.playerOptions.appName || "elv-player-js",
|
|
66007
66007
|
elvPlayer: this,
|
|
66008
66008
|
playoutUrl: i,
|
|
@@ -66037,49 +66037,51 @@ class o2 {
|
|
|
66037
66037
|
}
|
|
66038
66038
|
}
|
|
66039
66039
|
async __InitializeHLS({ playoutUrl: e, authorizationToken: t, drm: r, drms: i, multiviewOptions: o }) {
|
|
66040
|
+
var c;
|
|
66040
66041
|
this.HLS = (await import("./hls-B5H4DmYt.mjs")).default;
|
|
66041
66042
|
const u = this.video.canPlayType("application/vnd.apple.mpegURL");
|
|
66042
66043
|
if (u && Xde && this.playerOptions.preferNativeHLS || [Ft.drms.FAIRPLAY, Ft.drms.SAMPLE_AES].includes(r) || !this.HLS.isSupported()) {
|
|
66043
66044
|
if (this.nativeHLS = !0, r === Ft.drms.FAIRPLAY ? hW({ playoutOptions: this.sourceOptions.playoutOptions, video: this.video }) : this.video.src = e.toString(), o.enabled) {
|
|
66044
|
-
const
|
|
66045
|
-
o.SwitchView = async (
|
|
66046
|
-
await
|
|
66045
|
+
const p = o.SwitchView;
|
|
66046
|
+
o.SwitchView = async (h) => {
|
|
66047
|
+
await p(h);
|
|
66047
66048
|
};
|
|
66048
66049
|
}
|
|
66049
66050
|
} else {
|
|
66050
66051
|
e.searchParams.delete("authorization");
|
|
66051
|
-
let
|
|
66052
|
-
(r === Ft.drms.PLAYREADY || r === Ft.drms.WIDEVINE) && (
|
|
66052
|
+
let p = {};
|
|
66053
|
+
(r === Ft.drms.PLAYREADY || r === Ft.drms.WIDEVINE) && (p = {
|
|
66053
66054
|
drmSystems: {},
|
|
66054
66055
|
emeEnabled: !0,
|
|
66055
|
-
licenseXhrSetup: (
|
|
66056
|
-
|
|
66056
|
+
licenseXhrSetup: (b, g) => {
|
|
66057
|
+
b.open("POST", g, !0), b.setRequestHeader("Authorization", `Bearer ${t}`);
|
|
66057
66058
|
}
|
|
66058
|
-
}, r === Ft.drms.PLAYREADY ?
|
|
66059
|
+
}, r === Ft.drms.PLAYREADY ? p.drmSystems = {
|
|
66059
66060
|
"com.microsoft.playready": {
|
|
66060
66061
|
licenseUrl: i[r].licenseServers[0]
|
|
66061
66062
|
}
|
|
66062
|
-
} : r === Ft.drms.WIDEVINE && (
|
|
66063
|
+
} : r === Ft.drms.WIDEVINE && (p.drmSystems = {
|
|
66063
66064
|
"com.widevine.alpha": {
|
|
66064
66065
|
licenseUrl: i[r].licenseServers[0]
|
|
66065
66066
|
}
|
|
66066
66067
|
}));
|
|
66067
|
-
|
|
66068
|
-
this.
|
|
66068
|
+
let h = (epe[this.playerOptions.playerProfile] || {}).hlsSettings || {};
|
|
66069
|
+
const m = this.playerOptions.playerProfile === Ft.playerProfile.CUSTOM ? this.customHLSOptions : {};
|
|
66070
|
+
(c = this.sourceOptions.playoutParameters) != null && c.channel && Object.keys(m).length === 0 && (h.maxBufferHole = 4.2), this.hlsOptions = {
|
|
66069
66071
|
capLevelToPlayerSize: this.playerOptions.capLevelToPlayerSize,
|
|
66070
|
-
xhrSetup: (
|
|
66071
|
-
...c,
|
|
66072
|
+
xhrSetup: (b) => (b.setRequestHeader("Authorization", `Bearer ${t}`), (this.playerOptions.hlsjsOptions || {}).xhrSetup && this.playerOptions.hlsjsOptions.xhrSetup(b), b),
|
|
66072
66073
|
...p,
|
|
66073
|
-
...h
|
|
66074
|
+
...h,
|
|
66075
|
+
...m
|
|
66074
66076
|
}, this.dvrAvailable && (delete this.hlsOptions.liveMaxLatencyDuration, delete this.hlsOptions.liveMaxLatencyDurationCount);
|
|
66075
|
-
const
|
|
66076
|
-
if (this.playerOptions.maxBitrate &&
|
|
66077
|
-
let
|
|
66078
|
-
|
|
66079
|
-
}),
|
|
66080
|
-
const
|
|
66081
|
-
o.SwitchView = async (
|
|
66082
|
-
await
|
|
66077
|
+
const w = new this.HLS(this.hlsOptions);
|
|
66078
|
+
if (this.playerOptions.maxBitrate && w.on(this.HLS.Events.MANIFEST_PARSED, (b, { levels: g, firstLevel: S }) => {
|
|
66079
|
+
let A = g.map((k, R) => k.bitrate > this.playerOptions.maxBitrate ? R : void 0).filter((k) => typeof k < "u").reverse();
|
|
66080
|
+
A.length === g.length && (this.Log(`Warning: Max bitrate '${this.playerOptions.maxBitrate}bps' is less than all available levels for this content.`), A = A.filter((k) => k > 0)), this.Log("Removing the following levels due to maxBitrate setting:"), this.Log(A.map((k) => [g[k].width, "x", g[k].height, ` (${(g[k].bitrate / 1e3 / 1e3).toFixed(1)}Mbps)`].join("")).join(", ")), A.find((k) => S === k) && (w.startLevel = g.map((k, R) => R).filter((k) => !A.includes(k)).reverse()[0]), A.map((k) => w.removeLevel(k));
|
|
66081
|
+
}), w.loadSource(e.toString()), w.attachMedia(this.video), this.controls && o.enabled) {
|
|
66082
|
+
const b = o.SwitchView;
|
|
66083
|
+
o.SwitchView = async (g) => {
|
|
66084
|
+
await b(g), w.nextLevel = w.currentLevel;
|
|
66083
66085
|
}, this.controls.InitializeMultiViewControls(o);
|
|
66084
66086
|
}
|
|
66085
66087
|
if ([
|
|
@@ -66090,19 +66092,19 @@ class o2 {
|
|
|
66090
66092
|
this.HLS.Events.AUDIO_TRACKS_UPDATED,
|
|
66091
66093
|
this.HLS.Events.AUDIO_TRACK_SWITCHED,
|
|
66092
66094
|
this.HLS.Events.MANIFEST_LOADED
|
|
66093
|
-
].map((
|
|
66095
|
+
].map((b) => w.on(b, () => this.__SettingsUpdate())), typeof this.sourceOptions.playoutParameters.audioTrackLabel < "u" && w.on(
|
|
66094
66096
|
this.HLS.Events.AUDIO_TRACKS_UPDATED,
|
|
66095
66097
|
() => {
|
|
66096
|
-
const
|
|
66097
|
-
|
|
66098
|
+
const b = (this.controls.GetAudioTracks().options || []).find((g) => g.label === this.sourceOptions.playoutParameters.audioTrackLabel);
|
|
66099
|
+
b && this.controls.SetAudioTrack(b.index);
|
|
66098
66100
|
}
|
|
66099
|
-
), this.SetPlayerProfile = async ({ profile:
|
|
66100
|
-
this.videoDuration = void 0, this.playerOptions.playerProfile =
|
|
66101
|
-
const
|
|
66101
|
+
), this.SetPlayerProfile = async ({ profile: b, customHLSOptions: g = {} }) => {
|
|
66102
|
+
this.videoDuration = void 0, this.playerOptions.playerProfile = b, this.customHLSOptions = g;
|
|
66103
|
+
const S = !this.video.paused, A = this.video.currentTime;
|
|
66102
66104
|
try {
|
|
66103
66105
|
this.hlsPlayer.destroy();
|
|
66104
|
-
} catch (
|
|
66105
|
-
this.Log("Failed to destroy HLS player", !0), this.Log(
|
|
66106
|
+
} catch (k) {
|
|
66107
|
+
this.Log("Failed to destroy HLS player", !0), this.Log(k, !0);
|
|
66106
66108
|
}
|
|
66107
66109
|
await this.__InitializeHLS({
|
|
66108
66110
|
playoutUrl: e,
|
|
@@ -66110,20 +66112,20 @@ class o2 {
|
|
|
66110
66112
|
drm: r,
|
|
66111
66113
|
drms: i,
|
|
66112
66114
|
multiviewOptions: o
|
|
66113
|
-
}),
|
|
66114
|
-
},
|
|
66115
|
+
}), S ? this.video.play() : this.video.pause(), this.isLive || (this.video.currentTime = A);
|
|
66116
|
+
}, w.on(
|
|
66115
66117
|
this.HLS.Events.FRAG_LOADED,
|
|
66116
66118
|
() => this.errors = 0
|
|
66117
|
-
),
|
|
66118
|
-
this.errors += 1, this.Log(`Encountered ${
|
|
66119
|
-
}), this.hlsPlayer =
|
|
66120
|
-
const
|
|
66121
|
-
|
|
66119
|
+
), w.on(this.HLS.Events.ERROR, async (b, g) => {
|
|
66120
|
+
this.errors += 1, this.Log(`Encountered ${g.details}`, !0), this.Log(g, !0), g.response && g.response.code === 403 ? this.SetErrorMessage("Insufficient permissions", g) : this.errors < 5 ? g.fatal && (g.data && g.data.type === this.HLS.ErrorTypes.MEDIA_ERROR ? (this.Log("Attempting to recover using hlsPlayer.recoverMediaError"), w.recoverMediaError()) : this.__HardReload(g)) : this.__HardReload(g);
|
|
66121
|
+
}), this.hlsPlayer = w, this.player = w, u) {
|
|
66122
|
+
const b = document.createElement("source");
|
|
66123
|
+
b.src = this.playoutUrl.toString(), this.video.appendChild(b), this.video.disableRemotePlayback = !1;
|
|
66122
66124
|
}
|
|
66123
66125
|
}
|
|
66124
66126
|
}
|
|
66125
66127
|
async __InitializeDash({ playoutUrl: e, authorizationToken: t, drm: r, drms: i }) {
|
|
66126
|
-
this.Dash = (await import("./dash.all.min-
|
|
66128
|
+
this.Dash = (await import("./dash.all.min-DcN2DbEZ.mjs").then((c) => c.d)).default;
|
|
66127
66129
|
const o = this.Dash.MediaPlayer().create(), u = this.playerOptions.dashjsOptions || {};
|
|
66128
66130
|
if (o.updateSettings({
|
|
66129
66131
|
...u,
|