@eluvio/elv-player-js 2.0.39 → 2.0.40
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 -17
- package/dist/{Analytics-BASEfJkR.mjs → Analytics-1QZjV_dS.mjs} +1 -1
- package/dist/{Analytics-DeZ-NgkZ.js → Analytics-OoBeezGW.js} +1 -1
- package/dist/dash.all.min-B1r4FShk.js +26 -0
- package/dist/dash.all.min-BL_VlSvE.mjs +18042 -0
- package/dist/elv-player-js.cjs.js +1 -1
- package/dist/elv-player-js.es.js +1 -1
- package/dist/{index-CuC8ec78.js → index-C-bPzeta.js} +1 -1
- package/dist/{index-DOPJpqb1.mjs → index-DeBr9qMJ.mjs} +1 -1
- package/dist/{index-Df15HuhE.js → index-DyNFLGVd.js} +2 -2
- package/dist/{index-Bm4dQzG_.mjs → index-t_fADAi6.mjs} +4 -3
- package/lib/player/Player.js +3 -2
- package/package.json +1 -1
- package/dist/dash.all.min-DiOTJHXz.js +0 -26
- package/dist/dash.all.min-fyp1Uv1c.mjs +0 -18361
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
"use strict";const el=require("./index-Df15HuhE.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
|
-
`)),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
|
-
`),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
|
-
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
|
|
5
|
-
`}}catch(ye){R.e(ye)}finally{R.f()}if(w.response.responseHeaders=L,!N.body)return N.arrayBuffer().then(function(ye){w.response.response=ye;var he={loaded:ye.byteLength,total:ye.byteLength,stream:!1};w.progress(he),w.onload(),w.onend()});var dt,ut,P,$,Y=parseInt(N.headers.get("Content-Length"),10),gt=0,vt=!1,ft=new Uint8Array,Ct=0;if(Z===u.A.ABR_FETCH_THROUGHPUT_CALCULATION_AAST&&C){var Mt=f,Qt=0,$t=(P=N.body.tee(),$=2,function(ye){if(Array.isArray(ye))return ye}(P)||function(ye,he){var de=ye==null?null:typeof Symbol<"u"&&ye[Symbol.iterator]||ye["@@iterator"];if(de!=null){var qe,Ye,sn,ln,kt=[],ue=!0,ee=!1;try{if(sn=(de=de.call(ye)).next,he===0){if(Object(de)!==de)return;ue=!1}else for(;!(ue=(qe=sn.call(de)).done)&&(kt.push(qe.value),kt.length!==he);ue=!0);}catch(ge){ee=!0,Ye=ge}finally{try{if(!ue&&de.return!=null&&(ln=de.return(),Object(ln)!==ln))return}finally{if(ee)throw Ye}}return kt}}(P,$)||nn(P,$)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
6
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()),Zt=$t[0],ae=$t[1];dt=Zt.getReader(),ut=[],dt.read().then(function ye(he){var de=he.value,qe=he.done;if(Qt=Date.now(),de&&de.length){var Ye=Qt-Mt,sn=de.length;ut.push({chunkDownloadTimeRelativeMS:Qt-f,chunkDownloadDurationMS:Ye,chunkBytes:sn,kbps:Math.round(8*sn/(Ye/1e3)),bufferLevel:o.getCurrentBufferLevel(st.mediaType)})}if(qe){var ln=Qt-f,kt=ut.reduce(function(ue,ee){return ue+ee.chunkBytes},0);return C.addMeasurement(st,ln,ut,K,z,L),void w.progress({loaded:kt,total:kt,lengthComputable:!0,time:C.getEstimatedDownloadDurationMS(st),stream:!0})}return Mt=Date.now(),dt.read().then(ye)}),w.reader=ae.getReader()}else w.reader=N.body.getReader();var Ne=[],Et=[],Pt=[],ce=!0,Kt=function(ye){var he=ye.value;if(ye.done){if(ft){if(Z!==u.A.ABR_FETCH_THROUGHPUT_CALCULATION_AAST){var de=null,qe=null;Z===u.A.ABR_FETCH_THROUGHPUT_CALCULATION_MOOF_PARSING?(de=function(kt,ue){try{var ee,ge;ee=kt.filter(function(Oe,Ft){return Ft<kt.length-1}),ge=ue.filter(function(Oe,Ft){return Ft<ue.length-1});var De=[];if(ee.length>1){for(var Ve=0,Ge=0,Ke=0;Ke<ee.length;Ke++)if(ee[Ke]&&ge[Ke]){var Ze=ge[Ke].ts-ee[Ke].ts;if(Ze>1)De.push(8*ge[Ke].bytes/Ze),Ge=0;else{Ge===0&&(Ge=ee[Ke].ts,Ve=0);var pe=ge[Ke].ts-Ge;pe>1?(Ve+=ge[Ke].bytes,De.push(8*Ve/pe),Ge=0):Ve+=ge[Ke].bytes}}if(De.length>0)return De.reduce(function(Oe,Ft){return Oe+Ft},0)/De.length}return null}catch{return null}}(Et,Pt),de&&(qe=8*gt/de)):Z===u.A.ABR_FETCH_THROUGHPUT_CALCULATION_DOWNLOADED_DATA&&(qe=B(Ne,gt)),w.progress({loaded:gt,total:isNaN(Y)?gt:Y,lengthComputable:!0,time:qe,stream:!0})}w.response.response=ft.buffer}return w.onload(),void w.onend()}if(he&&he.length>0){ft=function(kt,ue){if(kt.length===0)return ue;var ee=new Uint8Array(kt.length+ue.length);return ee.set(kt),ee.set(ue,kt.length),ee}(ft,he),gt+=he.length,Ne.push({ts:Date.now(),bytes:he.length}),Z===u.A.ABR_FETCH_THROUGHPUT_CALCULATION_MOOF_PARSING&&ce&&b.findLastTopIsoBoxCompleted(["moof"],ft,Ct).found&&(ce=!1,Et.push({ts:performance.now(),bytes:he.length}));var Ye=b.findLastTopIsoBoxCompleted(["moov","mdat"],ft,Ct);if(Ye.found){var sn,ln=Ye.lastCompletedOffset+Ye.size;Z!==u.A.ABR_FETCH_THROUGHPUT_CALCULATION_MOOF_PARSING||ce||(ce=!0,Pt.push({ts:performance.now(),bytes:ft.length})),ln===ft.length?(sn=ft,ft=new Uint8Array):(sn=new Uint8Array(ft.subarray(0,ln)),ft=ft.subarray(ln)),w.progress({data:sn.buffer,lengthComputable:!1,noTrace:!0}),Ct=0}else Ct=Ye.lastCompletedOffset,vt||(w.progress({lengthComputable:!1,noTrace:!0}),vt=!0)}H(w,Kt)};H(w,Kt)}).catch(function(N){w.onerror&&w.onerror(N)})})}function H(w,j){w.reader.read().then(j).catch(function(k){w.onerror&&w.response.status===200&&w.onerror(k)})}function B(w,j){try{if((w=w.filter(function(it){return it.bytes>j/4/w.length})).length>1){var k=0,st=(w[w.length-1].ts-w[0].ts)/w.length;return w.forEach(function(it,ht){var ot=w[ht+1];if(ot){var et=ot.ts-it.ts;k+=et<st?et:0}}),k}return null}catch{return null}}return t={load:function(w){p&&p.modifyRequest?(0,Dt.W)(w,p).then(function(){return U(w)}):U(w)},abort:function(w){if(w.abortController)w.abortController.abort();else if(w.reader)try{w.reader.cancel(),w.onabort()}catch{}},calculateDownloadedTime:B,setup:function(w){o=w.dashMetrics}},t}xn.__dashjs_factory_name="FetchLoader";var Yn=h.A.getClassFactory(xn),An=M(7125);function Un(e){return Un=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},Un(e)}function Sn(e,t){for(var o=0;o<t.length;o++){var l=t[o];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(e,kn(l.key),l)}}function kn(e){var t=function(o){if(Un(o)!="object"||!o)return o;var l=o[Symbol.toPrimitive];if(l!==void 0){var p=l.call(o,"string");if(Un(p)!="object")return p;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(o)}(e);return Un(t)=="symbol"?t:t+""}var Hn=function(){return e=function o(){(function(l,p){if(!(l instanceof p))throw new TypeError("Cannot call a class as a function")})(this,o),this.id=null,this.index=-1,this.adaptation=null,this.segmentInfoType=null,this.initialization=null,this.codecs=null,this.mimeType=null,this.codecPrivateData=null,this.segmentDuration=NaN,this.timescale=1,this.startNumber=1,this.indexRange=null,this.range=null,this.presentationTimeOffset=0,this.MSETimeOffset=NaN,this.mediaFinishedInformation={numberOfSegments:0,mediaTimeOfLastSignaledSegment:NaN},this.bandwidth=NaN,this.width=NaN,this.height=NaN,this.scanType=null,this.maxPlayoutRate=NaN,this.availabilityTimeOffset=0,this.availabilityTimeComplete=!0,this.frameRate=null},(t=[{key:"hasInitialization",value:function(){return this.initialization!==null||this.range!==null}},{key:"hasSegments",value:function(){return this.segmentInfoType!==n.A.BASE_URL&&this.segmentInfoType!==n.A.SEGMENT_BASE&&!this.indexRange}}])&&Sn(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();function Kn(e,t,o){return Object.defineProperty(e,"prototype",{writable:!1}),e}var pr=Kn(function e(){(function(t,o){if(!(t instanceof o))throw new TypeError("Cannot call a class as a function")})(this,e),this.period=null,this.index=-1,this.type=null});function Nr(e,t,o){return Object.defineProperty(e,"prototype",{writable:!1}),e}var hr=Nr(function e(){(function(t,o){if(!(t instanceof o))throw new TypeError("Cannot call a class as a function")})(this,e),this.id=null,this.index=-1,this.duration=NaN,this.start=NaN,this.mpd=null,this.nextPeriodId=null});hr.DEFAULT_ID="defaultId";var sr=hr;function gr(e,t,o){return Object.defineProperty(e,"prototype",{writable:!1}),e}var kr=gr(function e(){(function(t,o){if(!(t instanceof o))throw new TypeError("Cannot call a class as a function")})(this,e),this.manifest=null,this.suggestedPresentationDelay=0,this.availabilityStartTime=null,this.availabilityEndTime=Number.POSITIVE_INFINITY,this.timeShiftBufferDepth=Number.POSITIVE_INFINITY,this.maxSegmentDuration=Number.POSITIVE_INFINITY,this.publishTime=null,this.minimumUpdatePeriod=NaN,this.mediaPresentationDuration=NaN}),Gr=M(289);function Ar(e,t,o){return Object.defineProperty(e,"prototype",{writable:!1}),e}var jr=Ar(function e(){(function(t,o){if(!(t instanceof o))throw new TypeError("Cannot call a class as a function")})(this,e),this.type="",this.duration=NaN,this.presentationTime=NaN,this.id=NaN,this.messageData="",this.eventStream=null,this.presentationTimeDelta=NaN});function Li(e,t,o){return Object.defineProperty(e,"prototype",{writable:!1}),e}var Cr=Li(function e(t,o,l,p){(function(C,b){if(!(C instanceof b))throw new TypeError("Cannot call a class as a function")})(this,e),this.url=t||"",this.serviceLocation=o||t||"",this.dvbPriority=l||1,this.dvbWeight=p||1,this.availabilityTimeOffset=0,this.availabilityTimeComplete=!0,this.queryParams={}});Cr.DEFAULT_DVB_PRIORITY=1,Cr.DEFAULT_DVB_WEIGHT=1;var Dr=Cr;function li(e,t,o){return Object.defineProperty(e,"prototype",{writable:!1}),e}var ci=li(function e(){(function(t,o){if(!(t instanceof o))throw new TypeError("Cannot call a class as a function")})(this,e),this.adaptionSet=null,this.representation=null,this.period=null,this.timescale=1,this.value="",this.schemeIdUri="",this.presentationTimeOffset=0});function fi(e,t,o){return Object.defineProperty(e,"prototype",{writable:!1}),e}var di=fi(function e(){(function(t,o){if(!(t instanceof o))throw new TypeError("Cannot call a class as a function")})(this,e),this.id=null,this.inband=!1,this.type="encoder",this.applicationScheme=null,this.wallClockTime=null,this.presentationTime=NaN,this.UTCTiming=null});function qr(e,t,o){return Object.defineProperty(e,"prototype",{writable:!1}),e}var Or=qr(function e(){(function(t,o){if(!(t instanceof o))throw new TypeError("Cannot call a class as a function")})(this,e),this.defaultServiceLocation=null,this.defaultServiceLocationArray=[],this.queryBeforeStart=!1,this.serverUrl=null,this.clientRequirement=!0});function vr(e){return vr=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},vr(e)}function oe(e,t){for(var o=0;o<t.length;o++){var l=t[o];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(e,te(l.key),l)}}function te(e){var t=function(o){if(vr(o)!="object"||!o)return o;var l=o[Symbol.toPrimitive];if(l!==void 0){var p=l.call(o,"string");if(vr(p)!="object")return p;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(o)}(e);return vr(t)=="symbol"?t:t+""}var re=function(){return e=function o(){(function(l,p){if(!(l instanceof p))throw new TypeError("Cannot call a class as a function")})(this,o),this.schemeIdUri=null,this.value=null,this.id=null},(t=[{key:"init",value:function(o){return o&&(this.schemeIdUri=o.schemeIdUri?o.schemeIdUri:null,this.value=o.value?o.value:null,this.id=o.id?o.id:null,o[n.A.DVB_URL]&&(this.dvbUrl=o[n.A.DVB_URL]),o[n.A.DVB_MIMETYPE]&&(this.dvbMimeType=o[n.A.DVB_MIMETYPE]),o[n.A.DVB_FONTFAMILY]&&(this.dvbFontFamily=o[n.A.DVB_FONTFAMILY])),this}}])&&oe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}(),wt=M(426),Jt=M.n(wt);function be(){return{areEqual:function(e,t){return Jt()(e,t)}}}be.__dashjs_factory_name="ObjectUtils";var Ee=h.A.getSingletonFactory(be),Be=M(6028);function xe(e,t,o){return Object.defineProperty(e,"prototype",{writable:!1}),e}var Xe=xe(function e(t,o){(function(l,p){if(!(l instanceof p))throw new TypeError("Cannot call a class as a function")})(this,e),this.url=t||"",this.serviceLocation=o||null,this.queryParams={}});function $e(e,t,o){return Object.defineProperty(e,"prototype",{writable:!1}),e}var ke=$e(function e(t,o,l){(function(p,C){if(!(p instanceof C))throw new TypeError("Cannot call a class as a function")})(this,e),this.url=t||"",this.serviceLocation=o||null,this.ttl=l||NaN,this.queryParams={}});function _e(e){return _e=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},_e(e)}function We(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);t&&(l=l.filter(function(p){return Object.getOwnPropertyDescriptor(e,p).enumerable})),o.push.apply(o,l)}return o}function He(e){for(var t=1;t<arguments.length;t++){var o=arguments[t]!=null?arguments[t]:{};t%2?We(Object(o),!0).forEach(function(l){an(e,l,o[l])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):We(Object(o)).forEach(function(l){Object.defineProperty(e,l,Object.getOwnPropertyDescriptor(o,l))})}return e}function an(e,t,o){return(t=function(l){var p=function(C){if(_e(C)!="object"||!C)return C;var b=C[Symbol.toPrimitive];if(b!==void 0){var F=b.call(C,"string");if(_e(F)!="object")return F;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(C)}(l);return _e(p)=="symbol"?p:p+""}(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function pn(e,t){var o=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!o){if(Array.isArray(e)||(o=vn(e))||t){o&&(e=o);var l=0,p=function(){};return{s:p,n:function(){return l>=e.length?{done:!0}:{done:!1,value:e[l++]}},e:function(U){throw U},f:p}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
7
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var C,b=!0,F=!1;return{s:function(){o=o.call(e)},n:function(){var U=o.next();return b=U.done,U},e:function(U){F=!0,C=U},f:function(){try{b||o.return==null||o.return()}finally{if(F)throw C}}}}function vn(e,t){if(e){if(typeof e=="string")return en(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)?en(e,t):void 0}}function en(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 Se(){var e,t,o,l,p=this.context,C=(0,At.A)(p).getInstance(),b=Number.isInteger||function(f){return typeof f=="number"&&isFinite(f)&&Math.floor(f)===f};function F(f,N){if(!f)throw new Error("adaptation is not defined");if(!N)throw new Error("type is not defined");if(f.Representation_asArray&&f.Representation_asArray.length){var S=ht(f.Representation_asArray[0]);if(S&&S.length>0&&Be._.indexOf(S[0].schemeIdUri)>=0)return N===u.A.IMAGE}if(f.ContentComponent_asArray&&f.ContentComponent_asArray.length>0){if(f.ContentComponent_asArray.length>1)return N===u.A.MUXED;if(f.ContentComponent_asArray[0].contentType===N)return!0}var L=N===u.A.TEXT?new RegExp("(ttml|vtt|wvtt|stpp)"):new RegExp(N);if(f.Representation_asArray&&f.Representation_asArray.length){var R=f.Representation_asArray[0].codecs;if(L.test(R))return!0}if(f.hasOwnProperty(n.A.MIME_TYPE))return L.test(f.mimeType);if(f.Representation_asArray){for(var V,dt=0;dt<f.Representation_asArray.length;dt++)if((V=f.Representation_asArray[dt]).hasOwnProperty(n.A.MIME_TYPE))return L.test(V.mimeType)}return!1}function U(f){if(!f)throw new Error("adaptation is not defined");if(f.hasOwnProperty(n.A.SEGMENT_TEMPLATE)||f.hasOwnProperty(n.A.SEGMENT_TIMELINE)||f.hasOwnProperty(n.A.SEGMENT_LIST)||f.hasOwnProperty(n.A.SEGMENT_BASE))return!0;if(f.Representation_asArray&&f.Representation_asArray.length>0){var N=f.Representation_asArray[0];if(N.hasOwnProperty(n.A.SEGMENT_TEMPLATE)||N.hasOwnProperty(n.A.SEGMENT_TIMELINE)||N.hasOwnProperty(n.A.SEGMENT_LIST)||N.hasOwnProperty(n.A.SEGMENT_BASE))return!0}return!1}function H(f){return F(f,u.A.VIDEO)}function B(f){return F(f,u.A.TEXT)}function w(f){return F(f,u.A.IMAGE)}function j(f){return f&&Array.isArray(f.Representation_asArray)&&f.Representation_asArray.sort(function(N,S){return N.bandwidth-S.bandwidth}),f}function k(f,N){return f&&f.Period_asArray&&b(N)&&f.Period_asArray[N]?f.Period_asArray[N].AdaptationSet_asArray:[]}function st(f){return f&&f.Period_asArray?f.Period_asArray:[]}function it(f){var N=!1;return f&&f.hasOwnProperty("type")&&(N=f.type===n.A.DYNAMIC),N}function ht(f){return f&&f.EssentialProperty_asArray&&f.EssentialProperty_asArray.length?f.EssentialProperty_asArray.map(function(N){return{schemeIdUri:N.schemeIdUri,value:N.value}}):null}function ot(f){if(!f||!f.S_asArray)return NaN;var N=f.S_asArray[0],S=f.S_asArray[1];return N.hasOwnProperty("d")?N.d:S.t-N.t}function et(f,N){if(!f)throw new Error("Period cannot be null or undefined");var S=sr.DEFAULT_ID+"_"+N;return f.hasOwnProperty(n.A.ID)&&f.id.length>0&&f.id!=="__proto__"&&(S=f.id),S}function Z(f,N,S){var L,R=[];if(!f)return R;for(L=0;L<f.length;L++){var V=new ci;if(V.timescale=1,V.representation=N,!f[L].hasOwnProperty(u.A.SCHEME_ID_URI))throw new Error("Invalid EventStream. SchemeIdUri has to be set");V.schemeIdUri=f[L].schemeIdUri,f[L].hasOwnProperty(n.A.TIMESCALE)&&(V.timescale=f[L].timescale),f[L].hasOwnProperty(n.A.VALUE)&&(V.value=f[L].value),R.push(V),V.period=S}return R}function K(f){var N=[],S=f.BaseURL_asArray||[f.baseUri],L=!1;return S.some(function(R){if(R){var V=new Dr,dt=R.__text||R;return C.isRelative(dt)&&(L=!0,f.baseUri&&(dt=C.resolve(dt,f.baseUri))),V.url=dt,R.hasOwnProperty(n.A.SERVICE_LOCATION)&&R.serviceLocation.length?V.serviceLocation=R.serviceLocation:V.serviceLocation=dt,R.hasOwnProperty(n.A.DVB_PRIORITY)&&(V.dvbPriority=R[n.A.DVB_PRIORITY]),R.hasOwnProperty(n.A.DVB_WEIGHT)&&(V.dvbWeight=R[n.A.DVB_WEIGHT]),R.hasOwnProperty(n.A.AVAILABILITY_TIME_OFFSET)&&(V.availabilityTimeOffset=R[n.A.AVAILABILITY_TIME_OFFSET]),R.hasOwnProperty(n.A.AVAILABILITY_TIME_COMPLETE)&&(V.availabilityTimeComplete=R[n.A.AVAILABILITY_TIME_COMPLETE]!=="false"),N.push(V),L}}),N}function z(f){var N=new Or;return N.serverUrl=f.__text,f.hasOwnProperty(n.A.DEFAULT_SERVICE_LOCATION)&&(N.defaultServiceLocation=f[n.A.DEFAULT_SERVICE_LOCATION],N.defaultServiceLocationArray=N.defaultServiceLocation.split(" ")),f.hasOwnProperty(n.A.QUERY_BEFORE_START)&&(N.queryBeforeStart=f[n.A.QUERY_BEFORE_START].toLowerCase()==="true"),f.hasOwnProperty(n.A.CLIENT_REQUIREMENT)&&(N.clientRequirement=f[n.A.CLIENT_REQUIREMENT].toLowerCase()!=="false"),N}return e={getIsTypeOf:F,getIsText:B,getIsFragmented:U,getProducerReferenceTimesForAdaptation:function(f){var N=f&&f.hasOwnProperty(n.A.PRODUCERREFERENCETIME_ASARRAY)?f[n.A.PRODUCERREFERENCETIME_ASARRAY]:[];(f&&f.hasOwnProperty(n.A.REPRESENTATION_ASARRAY)?f[n.A.REPRESENTATION_ASARRAY]:[]).forEach(function(L){var R;L.hasOwnProperty(n.A.PRODUCERREFERENCETIME_ASARRAY)&&N.push.apply(N,function(V){if(Array.isArray(V))return en(V)}(R=L[n.A.PRODUCERREFERENCETIME_ASARRAY])||function(V){if(typeof Symbol<"u"&&V[Symbol.iterator]!=null||V["@@iterator"]!=null)return Array.from(V)}(R)||vn(R)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
8
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}())});var S=[];return N.forEach(function(L){var R=new di;L.hasOwnProperty(n.A.ID)&&(R[n.A.ID]=L[n.A.ID],L.hasOwnProperty(n.A.WALL_CLOCK_TIME)&&(R[n.A.WALL_CLOCK_TIME]=L[n.A.WALL_CLOCK_TIME],L.hasOwnProperty(n.A.PRESENTATION_TIME)&&(R[n.A.PRESENTATION_TIME]=L[n.A.PRESENTATION_TIME],L.hasOwnProperty(n.A.INBAND)&&(R[n.A.INBAND]=L[n.A.INBAND]!=="false"),L.hasOwnProperty(n.A.TYPE)&&(R[n.A.TYPE]=L[n.A.TYPE]),S.push(R))))}),S},getLanguageForAdaptation:function(f){var N="";return f&&f.hasOwnProperty(n.A.LANG)&&(N=f.lang),N},getViewpointForAdaptation:function(f){return f&&f.hasOwnProperty(n.A.VIEWPOINT_ASARRAY)&&f[n.A.VIEWPOINT_ASARRAY].length?f[n.A.VIEWPOINT_ASARRAY].map(function(N){return new re().init(N)}):[]},getRolesForAdaptation:function(f){return f&&f.hasOwnProperty(n.A.ROLE_ASARRAY)&&f[n.A.ROLE_ASARRAY].length?f[n.A.ROLE_ASARRAY].map(function(N){return new re().init(N)}):[]},getAccessibilityForAdaptation:function(f){return f&&f.hasOwnProperty(n.A.ACCESSIBILITY_ASARRAY)&&f[n.A.ACCESSIBILITY_ASARRAY].length?f[n.A.ACCESSIBILITY_ASARRAY].map(function(N){return new re().init(N)}):[]},getAudioChannelConfigurationForAdaptation:function(f){return f&&f.hasOwnProperty(n.A.AUDIOCHANNELCONFIGURATION_ASARRAY)&&f[n.A.AUDIOCHANNELCONFIGURATION_ASARRAY].length?f[n.A.AUDIOCHANNELCONFIGURATION_ASARRAY].map(function(N){return new re().init(N)}):[]},getAudioChannelConfigurationForRepresentation:function(f){return f&&f.hasOwnProperty(n.A.AUDIOCHANNELCONFIGURATION_ASARRAY)&&f[n.A.AUDIOCHANNELCONFIGURATION_ASARRAY].length?f[n.A.AUDIOCHANNELCONFIGURATION_ASARRAY].map(function(N){return new re().init(N)}):[]},getAdaptationForIndex:function(f,N,S){var L=k(N,S);return L.length>0&&b(f)?L[f]:null},getIndexForAdaptation:function(f,N,S){if(!f)return-1;for(var L=k(N,S),R=0;R<L.length;R++)if(Ee(p).getInstance().areEqual(L[R],f))return R;return-1},getAdaptationForId:function(f,N,S){var L,R,V=k(N,S);for(L=0,R=V.length;L<R;L++)if(V[L].hasOwnProperty(n.A.ID)&&V[L].id===f)return V[L];return null},getAdaptationsForType:function(f,N,S){var L,R,V=k(f,N),dt=[];for(L=0,R=V.length;L<R;L++)F(V[L],S)&&dt.push(j(V[L]));return dt},getRealPeriods:st,getRealPeriodForIndex:function(f,N){var S=st(N);return S.length>0&&b(f)?S[f]:null},getCodec:function(f,N,S){var L=null;if(f&&f.Representation_asArray&&f.Representation_asArray.length>0){var R=b(N)&&N>=0&&N<f.Representation_asArray.length?f.Representation_asArray[N]:f.Representation_asArray[0];R&&(L=R.mimeType+';codecs="'+R.codecs+'"',S&&R.width!==void 0&&(L+=';width="'+R.width+'";height="'+R.height+'"'))}return L&&(L=L.replace(/\sprofiles=[^;]*/g,"")),L},getSelectionPriority:function(f){try{var N=f&&f.selectionPriority!==void 0?parseInt(f.selectionPriority):1;return isNaN(N)?1:N}catch{return 1}},getMimeType:function(f){return f&&f.Representation_asArray&&f.Representation_asArray.length>0?f.Representation_asArray[0].mimeType:null},getKID:function(f){return f&&f.hasOwnProperty(n.A.CENC_DEFAULT_KID)?f[n.A.CENC_DEFAULT_KID]:null},getLabelsForAdaptation:function(f){if(!f||!Array.isArray(f.Label_asArray))return[];for(var N=[],S=0;S<f.Label_asArray.length;S++)N.push({lang:f.Label_asArray[S].lang,text:f.Label_asArray[S].__text||f.Label_asArray[S]});return N},getContentProtectionData:function(f){return f&&f.hasOwnProperty(n.A.CONTENTPROTECTION_ASARRAY)&&f.ContentProtection_asArray.length!==0?f.ContentProtection_asArray:null},getIsDynamic:it,getId:function(f){return f&&f[n.A.ID]||null},hasProfile:function(f,N){var S=!1;return f&&f.profiles&&f.profiles.length>0&&(S=f.profiles.indexOf(N)!==-1),S},getDuration:function(f){return f&&f.hasOwnProperty(n.A.MEDIA_PRESENTATION_DURATION)?f.mediaPresentationDuration:f&&f.type=="dynamic"?Number.POSITIVE_INFINITY:Number.MAX_SAFE_INTEGER||Number.MAX_VALUE},getBandwidth:function(f){return f&&f.bandwidth?f.bandwidth:NaN},getManifestUpdatePeriod:function(f){var N=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,S=NaN;return f&&f.hasOwnProperty(n.A.MINIMUM_UPDATE_PERIOD)&&(S=f.minimumUpdatePeriod),isNaN(S)?S:Math.max(S-N,1)},getPublishTime:function(f){return f&&f.hasOwnProperty(n.A.PUBLISH_TIME)?new Date(f[n.A.PUBLISH_TIME]):null},getRepresentationCount:function(f){return f&&Array.isArray(f.Representation_asArray)?f.Representation_asArray.length:0},getBitrateListForAdaptation:function(f){var N=j(f);return(N&&Array.isArray(N.Representation_asArray)?N.Representation_asArray:[]).map(function(S){return{bandwidth:S.bandwidth,width:S.width||0,height:S.height||0,scanType:S.scanType||null,id:S.id||null}})},getRepresentationFor:function(f,N){return N&&N.Representation_asArray&&N.Representation_asArray.length>0&&b(f)?N.Representation_asArray[f]:null},getRepresentationsForAdaptation:function(f){var N,S,L,R,V=[],dt=function(ft){if(ft&&ft.period&&b(ft.period.index)){var Ct=ft.period.mpd.manifest.Period_asArray[ft.period.index];if(Ct&&Ct.AdaptationSet_asArray&&b(ft.index))return j(Ct.AdaptationSet_asArray[ft.index])}}(f);if(dt&&dt.Representation_asArray){if(f&&f.period&&b(f.period.index)){var ut=K(f.period.mpd.manifest);ut&&(S=ut[0])}for(var P=0,$=dt.Representation_asArray.length;P<$;++P){var Y=dt.Representation_asArray[P],gt=new Hn;if(gt.index=P,gt.adaptation=f,Y.hasOwnProperty(n.A.ID)&&(gt.id=Y.id),Y.hasOwnProperty(n.A.CODECS)&&(gt.codecs=Y.codecs),Y.hasOwnProperty(n.A.MIME_TYPE)&&(gt.mimeType=Y[n.A.MIME_TYPE]),Y.hasOwnProperty(n.A.CODEC_PRIVATE_DATA)&&(gt.codecPrivateData=Y.codecPrivateData),Y.hasOwnProperty(n.A.BANDWITH)&&(gt.bandwidth=Y.bandwidth),Y.hasOwnProperty(n.A.WIDTH)&&(gt.width=Y.width),Y.hasOwnProperty(n.A.HEIGHT)&&(gt.height=Y.height),Y.hasOwnProperty(n.A.SCAN_TYPE)&&(gt.scanType=Y.scanType),Y.hasOwnProperty(n.A.MAX_PLAYOUT_RATE)&&(gt.maxPlayoutRate=Y.maxPlayoutRate),Y.hasOwnProperty(n.A.SEGMENT_BASE)?(N=Y.SegmentBase,gt.segmentInfoType=n.A.SEGMENT_BASE):Y.hasOwnProperty(n.A.SEGMENT_LIST)?(N=Y.SegmentList).hasOwnProperty(n.A.SEGMENT_TIMELINE)?gt.segmentInfoType=n.A.SEGMENT_TIMELINE:gt.segmentInfoType=n.A.SEGMENT_LIST:Y.hasOwnProperty(n.A.SEGMENT_TEMPLATE)?((N=Y.SegmentTemplate).hasOwnProperty(n.A.SEGMENT_TIMELINE)?gt.segmentInfoType=n.A.SEGMENT_TIMELINE:gt.segmentInfoType=n.A.SEGMENT_TEMPLATE,N.hasOwnProperty(n.A.INITIALIZATION_MINUS)&&(gt.initialization=N.initialization.split("$Bandwidth$").join(Y.bandwidth).split("$RepresentationID$").join(Y.id))):gt.segmentInfoType=n.A.BASE_URL,gt.essentialProperties=ht(Y),N){if(N.hasOwnProperty(n.A.INITIALIZATION)){var vt=N.Initialization;vt.hasOwnProperty(n.A.SOURCE_URL)&&(gt.initialization=vt.sourceURL),vt.hasOwnProperty(n.A.RANGE)&&(gt.range=vt.range)}else B(dt)&&U(dt)&&dt.mimeType&&dt.mimeType.indexOf("application/mp4")===-1&&(gt.range=0);N.hasOwnProperty(n.A.TIMESCALE)&&(gt.timescale=N.timescale),N.hasOwnProperty(n.A.DURATION)?gt.segmentDuration=N.duration/gt.timescale:Y.hasOwnProperty(n.A.SEGMENT_TEMPLATE)&&(N=Y.SegmentTemplate).hasOwnProperty(n.A.SEGMENT_TIMELINE)&&(gt.segmentDuration=ot(N.SegmentTimeline)/gt.timescale),N.hasOwnProperty(n.A.MEDIA)&&(gt.media=N.media),N.hasOwnProperty(n.A.START_NUMBER)&&(gt.startNumber=N.startNumber),N.hasOwnProperty(n.A.INDEX_RANGE)&&(gt.indexRange=N.indexRange),N.hasOwnProperty(n.A.PRESENTATION_TIME_OFFSET)&&(gt.presentationTimeOffset=N.presentationTimeOffset/gt.timescale),N.hasOwnProperty(n.A.AVAILABILITY_TIME_OFFSET)?gt.availabilityTimeOffset=N.availabilityTimeOffset:S&&S.availabilityTimeOffset!==void 0&&(gt.availabilityTimeOffset=S.availabilityTimeOffset),N.hasOwnProperty(n.A.AVAILABILITY_TIME_COMPLETE)?gt.availabilityTimeComplete=N.availabilityTimeComplete!=="false":S&&S.availabilityTimeComplete!==void 0&&(gt.availabilityTimeComplete=S.availabilityTimeComplete)}gt.MSETimeOffset=(R=(L=gt).presentationTimeOffset,L.adaptation.period.start-R),gt.path=[f.period.index,f.index,P],V.push(gt)}}return V},getAdaptationsForPeriod:function(f){var N,S,L,R=f&&b(f.index)?f.mpd.manifest.Period_asArray[f.index]:null,V=[];if(R&&R.AdaptationSet_asArray)for(L=0;L<R.AdaptationSet_asArray.length;L++)S=R.AdaptationSet_asArray[L],N=new pr,S.hasOwnProperty(n.A.ID)&&(N.id=S.id),N.index=L,N.period=f,F(S,u.A.MUXED)?N.type=u.A.MUXED:F(S,u.A.AUDIO)?N.type=u.A.AUDIO:H(S)?N.type=u.A.VIDEO:B(S)?N.type=u.A.TEXT:w(S)?N.type=u.A.IMAGE:t.warn("Unknown Adaptation stream type"),V.push(N);return V},getRegularPeriods:function(f){var N,S,L=!!f&&it(f.manifest),R=[],V=null,dt=null,ut=null,P=null;for(S=0,N=f&&f.manifest&&f.manifest.Period_asArray?f.manifest.Period_asArray.length:0;S<N;S++)(dt=f.manifest.Period_asArray[S]).hasOwnProperty(n.A.START)?(P=new sr).start=dt.start:V!==null&&V.hasOwnProperty(n.A.DURATION)&&ut!==null?(P=new sr).start=parseFloat((ut.start+ut.duration).toFixed(5)):S!==0||L||((P=new sr).start=0),ut!==null&&isNaN(ut.duration)&&(P!==null?ut.duration=parseFloat((P.start-ut.start).toFixed(5)):t.warn("First period duration could not be calculated because lack of start and duration period properties. This will cause timing issues during playback")),P!==null&&(P.id=et(dt,S),P.index=S,P.mpd=f,dt.hasOwnProperty(n.A.DURATION)&&(P.duration=dt.duration),ut&&(ut.nextPeriodId=P.id),R.push(P),V=dt,ut=P),dt=null,P=null;return R.length===0||ut!==null&&isNaN(ut.duration)&&(ut.duration=parseFloat((function($){(function(){if(!o||!o.hasOwnProperty("error"))throw new Error(u.A.MISSING_CONFIG_ERROR)})();var Y,gt=it($.mpd.manifest);return $.mpd.manifest.mediaPresentationDuration?Y=$.mpd.manifest.mediaPresentationDuration:$.duration?Y=$.duration:gt?Y=Number.POSITIVE_INFINITY:o.error(new pt.A(mt.MANIFEST_ERROR_ID_PARSE_CODE,"Must have @mediaPresentationDuration on MPD or an explicit @duration on the last period.",$)),Y}(ut)-ut.start).toFixed(5))),R},getMpd:function(f){var N=new kr;return f&&(N.manifest=f,f.hasOwnProperty(n.A.AVAILABILITY_START_TIME)?N.availabilityStartTime=new Date(f.availabilityStartTime.getTime()):f.loadedTime&&(N.availabilityStartTime=new Date(f.loadedTime.getTime())),f.hasOwnProperty(n.A.AVAILABILITY_END_TIME)&&(N.availabilityEndTime=new Date(f.availabilityEndTime.getTime())),f.hasOwnProperty(n.A.MINIMUM_UPDATE_PERIOD)&&(N.minimumUpdatePeriod=f.minimumUpdatePeriod),f.hasOwnProperty(n.A.MEDIA_PRESENTATION_DURATION)&&(N.mediaPresentationDuration=f.mediaPresentationDuration),f.hasOwnProperty(n.A.SUGGESTED_PRESENTATION_DELAY)&&(N.suggestedPresentationDelay=f.suggestedPresentationDelay),f.hasOwnProperty(n.A.TIMESHIFT_BUFFER_DEPTH)&&(N.timeShiftBufferDepth=f.timeShiftBufferDepth),f.hasOwnProperty(n.A.MAX_SEGMENT_DURATION)&&(N.maxSegmentDuration=f.maxSegmentDuration),f.hasOwnProperty(n.A.PUBLISH_TIME)&&(N.publishTime=new Date(f.publishTime))),N},getEventsForPeriod:function(f){var N,S,L=f&&f.mpd&&f.mpd.manifest?f.mpd.manifest:null,R=L?L.Period_asArray:null,V=R&&f&&b(f.index)?R[f.index].EventStream_asArray:null,dt=[];if(V)for(N=0;N<V.length;N++){var ut=new ci;if(ut.period=f,ut.timescale=1,!V[N].hasOwnProperty(u.A.SCHEME_ID_URI))throw new Error("Invalid EventStream. SchemeIdUri has to be set");for(ut.schemeIdUri=V[N][u.A.SCHEME_ID_URI],V[N].hasOwnProperty(n.A.TIMESCALE)&&(ut.timescale=V[N][n.A.TIMESCALE]),V[N].hasOwnProperty(n.A.VALUE)&&(ut.value=V[N][n.A.VALUE]),V[N].hasOwnProperty(n.A.PRESENTATION_TIME_OFFSET)&&(ut.presentationTimeOffset=V[N][n.A.PRESENTATION_TIME_OFFSET]),S=0;V[N].Event_asArray&&S<V[N].Event_asArray.length;S++){var P=V[N].Event_asArray[S],$=new jr;$.presentationTime=0,$.eventStream=ut,P.hasOwnProperty(n.A.PRESENTATION_TIME)&&($.presentationTime=P.presentationTime);var Y=ut.presentationTimeOffset?ut.presentationTimeOffset/ut.timescale:0;$.calculatedPresentationTime=$.presentationTime/ut.timescale+f.start-Y,P.hasOwnProperty(n.A.DURATION)&&($.duration=P.duration/ut.timescale),P.hasOwnProperty(n.A.ID)?$.id=P.id:$.id=null,P.Signal&&P.Signal.Binary?$.messageData=l.decodeArray(P.Signal.Binary.toString()):$.messageData=P.messageData||P.__cdata||P.__text,dt.push($)}}return dt},getEssentialPropertiesForAdaptation:function(f){var N={};if(f&&f.hasOwnProperty(n.A.ESSENTIAL_PROPERTY_ASARRAY)){var S,L=pn(f.EssentialProperty_asArray);try{for(L.s();!(S=L.n()).done;){var R=S.value;R.hasOwnProperty(u.A.SCHEME_ID_URI)&&(N[R[u.A.SCHEME_ID_URI]]=He({},R))}}catch(V){L.e(V)}finally{L.f()}}return N},getEssentialPropertiesAsArrayForAdaptation:function(f){return f&&f.hasOwnProperty(n.A.ESSENTIAL_PROPERTY_ASARRAY)&&f.EssentialProperty_asArray.length?f.EssentialProperty_asArray.map(function(N){return new re().init(N)}):[]},getEssentialPropertiesForRepresentation:ht,getEventStreamForAdaptationSet:function(f,N,S){var L,R,V;return f&&f.Period_asArray&&N&&N.period&&b(N.period.index)&&(R=f.Period_asArray[N.period.index])&&R.AdaptationSet_asArray&&b(N.index)&&(V=R.AdaptationSet_asArray[N.index])&&(L=V.InbandEventStream_asArray),Z(L,null,S)},getEventStreamForRepresentation:function(f,N,S){var L,R,V,dt;return f&&f.Period_asArray&&N&&N.adaptation&&N.adaptation.period&&b(N.adaptation.period.index)&&(R=f.Period_asArray[N.adaptation.period.index])&&R.AdaptationSet_asArray&&b(N.adaptation.index)&&(V=R.AdaptationSet_asArray[N.adaptation.index])&&V.Representation_asArray&&b(N.index)&&(dt=V.Representation_asArray[N.index])&&(L=dt.InbandEventStream_asArray),Z(L,N,S)},getUTCTimingSources:function(f){var N=it(f),S=!!f&&f.hasOwnProperty(n.A.AVAILABILITY_START_TIME),L=f?f.UTCTiming_asArray:null,R=[];return(N||S)&&L&&L.forEach(function(V){var dt=new Gr.A;V.hasOwnProperty(u.A.SCHEME_ID_URI)&&(dt.schemeIdUri=V.schemeIdUri,V.hasOwnProperty(n.A.VALUE)&&(dt.value=V.value.toString(),R.push(dt)))}),R},getBaseURLsFromElement:K,getRepresentationSortFunction:function(){return function(f,N){return f.bandwidth-N.bandwidth}},getContentSteering:function(f){if(f&&f.hasOwnProperty(n.A.CONTENT_STEERING_AS_ARRAY))return z(f[n.A.CONTENT_STEERING_AS_ARRAY][0])},getLocation:function(f){return f&&f.hasOwnProperty(n.A.LOCATION_AS_ARRAY)?f[n.A.LOCATION_AS_ARRAY].map(function(N){var S=N.__text||N,L=N.hasOwnProperty(n.A.SERVICE_LOCATION)?N[n.A.SERVICE_LOCATION]:null;return new Xe(S,L)}):[]},getPatchLocation:function(f){return f&&f.hasOwnProperty(n.A.PATCH_LOCATION_AS_ARRAY)?f[n.A.PATCH_LOCATION_AS_ARRAY].map(function(N){var S=N.__text||N,L=N.hasOwnProperty(n.A.SERVICE_LOCATION)?N[n.A.SERVICE_LOCATION]:null,R=N.hasOwnProperty(n.A.TTL)?1e3*parseFloat(N[n.A.TTL]):NaN;return new ke(S,L,R)}):[]},getSuggestedPresentationDelay:function(f){return f&&f.hasOwnProperty(n.A.SUGGESTED_PRESENTATION_DELAY)?f.suggestedPresentationDelay:null},getAvailabilityStartTime:function(f){return f&&f.hasOwnProperty(n.A.AVAILABILITY_START_TIME)&&f.availabilityStartTime!==null?f.availabilityStartTime.getTime():null},getServiceDescriptions:function(f){var N=[];if(f&&f.hasOwnProperty(n.A.SERVICE_DESCRIPTION)){var S,L=pn(f.ServiceDescription_asArray);try{for(L.s();!(S=L.n()).done;){var R=S.value,V=null,dt=null,ut=null,P=null,$=null,Y=null,gt=null;for(var vt in R)R.hasOwnProperty(vt)&&(vt===n.A.ID?V=R[vt]:vt===n.A.SERVICE_DESCRIPTION_SCOPE?dt=R[vt].schemeIdUri:vt===n.A.SERVICE_DESCRIPTION_LATENCY?ut={target:parseInt(R[vt].target),max:parseInt(R[vt].max),min:parseInt(R[vt].min),referenceId:parseInt(R[vt].referenceId)}:vt===n.A.SERVICE_DESCRIPTION_PLAYBACK_RATE?P={max:parseFloat(R[vt].max),min:parseFloat(R[vt].min)}:vt===n.A.SERVICE_DESCRIPTION_OPERATING_QUALITY?$={mediaType:R[vt].mediaType,max:parseInt(R[vt].max),min:parseInt(R[vt].min),target:parseInt(R[vt].target),type:R[vt].type,maxQualityDifference:parseInt(R[vt].maxQualityDifference)}:vt===n.A.SERVICE_DESCRIPTION_OPERATING_BANDWIDTH?Y={mediaType:R[vt].mediaType,max:parseInt(R[vt].max),min:parseInt(R[vt].min),target:parseInt(R[vt].target)}:vt===n.A.CONTENT_STEERING&&(gt=z(R[vt])));N.push({id:V,schemeIdUri:dt,latency:ut,playbackRate:P,operatingQuality:$,operatingBandwidth:Y,contentSteering:gt})}}catch(ft){L.e(ft)}finally{L.f()}}return N},getSegmentAlignment:function(f){return!(!f||!f.hasOwnProperty(n.A.SEGMENT_ALIGNMENT))&&f[n.A.SEGMENT_ALIGNMENT]==="true"},getSubSegmentAlignment:function(f){return!(!f||!f.hasOwnProperty(n.A.SUB_SEGMENT_ALIGNMENT))&&f[n.A.SUB_SEGMENT_ALIGNMENT]==="true"},getSupplementalPropertiesForAdaptation:function(f){var N={};if(f&&f.hasOwnProperty(n.A.SUPPLEMENTAL_PROPERTY_ASARRAY)){var S,L=pn(f.SupplementalProperty_asArray);try{for(L.s();!(S=L.n()).done;){var R=S.value;R.hasOwnProperty(u.A.SCHEME_ID_URI)&&(N[R[u.A.SCHEME_ID_URI]]=He({},R))}}catch(V){L.e(V)}finally{L.f()}}return N},getSupplementalPropertiesAsArrayForAdaptation:function(f){return f&&f.hasOwnProperty(n.A.SUPPLEMENTAL_PROPERTY_ASARRAY)&&f.SupplementalProperty_asArray.length?f.SupplementalProperty_asArray.map(function(N){return new re().init(N)}):[]},getSupplementalPropertiesForRepresentation:function(f){var N={};if(f&&f.hasOwnProperty(n.A.SUPPLEMENTAL_PROPERTY_ASARRAY)){var S,L=pn(f.SupplementalProperty_asArray);try{for(L.s();!(S=L.n()).done;){var R=S.value;R.hasOwnProperty(u.A.SCHEME_ID_URI)&&(N[R[u.A.SCHEME_ID_URI]]=He({},R))}}catch(V){L.e(V)}finally{L.f()}}return N},getSupplementalPropertiesAsArrayForRepresentation:function(f){return f&&f.hasOwnProperty(n.A.SUPPLEMENTAL_PROPERTY_ASARRAY)&&f.SupplementalProperty_asArray.length?f.SupplementalProperty_asArray.map(function(N){return new re().init(N)}):[]},setConfig:function(f){f&&(f.errHandler&&(o=f.errHandler),f.BASE64&&(l=f.BASE64))}},t=(0,g.A)(p).getInstance().getLogger(e),e}Se.__dashjs_factory_name="DashManifestModel";var Ie=h.A.getSingletonFactory(Se),Fe=M(1739);function rn(e,t){var o=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!o){if(Array.isArray(e)||(o=function(U,H){if(U){if(typeof U=="string")return un(U,H);var B={}.toString.call(U).slice(8,-1);return B==="Object"&&U.constructor&&(B=U.constructor.name),B==="Map"||B==="Set"?Array.from(U):B==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(B)?un(U,H):void 0}}(e))||t){o&&(e=o);var l=0,p=function(){};return{s:p,n:function(){return l>=e.length?{done:!0}:{done:!1,value:e[l++]}},e:function(U){throw U},f:p}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
9
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var C,b=!0,F=!1;return{s:function(){o=o.call(e)},n:function(){var U=o.next();return b=U.done,U},e:function(U){F=!0,C=U},f:function(){try{b||o.return==null||o.return()}finally{if(F)throw C}}}}function un(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 _n(){var e,t,o,l,p,C,b,F,U,H,B=this.context,w=(0,y.A)(B).getInstance(),j=(0,lt.A)(B).getInstance();function k(){o={pr:1,nor:null,st:null,sf:null,sid:"".concat(Fe.A.generateUuid()),cid:null},U={},F={},H={},it()}function st(){it()}function it(){if(C){var R=C.getStreamController();if(R&&typeof R.getActiveStream=="function"){var V=R.getActiveStream();V&&(b=V.getProcessors())}}}function ht(R,V){var dt,ut={},P=rn(V);try{for(P.s();!(dt=P.n()).done;){var $=dt.value;R[$]&&(ut[$]=R[$])}}catch(Y){P.e(Y)}finally{P.f()}return ut}function ot(R){var V=j.get().streaming.cmcd.enabledKeys;return R.filter(function(dt){return V.includes(dt)})}function et(R){try{return R.type===jt.G.MPD_TYPE?((dt=Z()).ot="m",dt):R.type===jt.G.MEDIA_SEGMENT_TYPE?(V=R.mediaType,H.hasOwnProperty(V)||(H[V]=!1),F.hasOwnProperty(V)||(F[V]=!1),U.hasOwnProperty(V)||(U[V]=!1),function(ut){var P,$=Z(),Y=function(ae){try{var Ne=ae.quality,Et=ae.mediaInfo.bitrateList;return parseInt(Et[Ne].bandwidth/1e3)}catch{return null}}(ut),gt=function(ae){try{return isNaN(ae.duration)?NaN:Math.round(1e3*ae.duration)}catch{return null}}(ut),vt=function(ae){try{return 100*parseInt(l.getThroughputHistory().getSafeAverageThroughput(ae)/100)}catch{return null}}(ut.mediaType),ft=function(ae){try{var Ne=o.pr,Et=p.getCurrentBufferLevel(ae);return isNaN(Ne)||isNaN(Et)?null:100*parseInt(Et/Ne*10)}catch{return null}}(ut.mediaType),Ct=K(ut.mediaType),Mt=function(ae){try{var Ne=l.getTopBitrateInfoFor(ae);return Math.round(Ne.bitrate/1e3)}catch{return null}}(ut.mediaType),Qt=o.pr,$t=function(ae){if(b&&b.length!==0){var Ne,Et=rn(b);try{for(Et.s();!(Ne=Et.n()).done;){var Pt=Ne.value;if(Pt.getType()===ae)return Pt.probeNextRequest()}}catch(ce){Et.e(ce)}finally{Et.f()}}}(ut.mediaType);ut.mediaType===u.A.VIDEO&&(P="v"),ut.mediaType===u.A.AUDIO&&(P="a"),ut.mediaType===u.A.TEXT&&(P=ut.mediaInfo.mimeType==="application/mp4"?"tt":"c");var Zt=j.get().streaming.cmcd.rtp;return Zt||(Zt=function(ae){try{var Ne=C.getPlaybackRate();Ne||(Ne=1);var Et=ae.quality,Pt=ae.mediaType,ce=ae.mediaInfo,Kt=ae.duration;if(!ce)return NaN;var ye=K(Pt);ye===0&&(ye=500);var he=ce.bitrateList[Et].bandwidth*Kt/1e3/(ye/Ne/1e3),de=j.get().streaming.cmcd.rtpSafetyFactor&&!isNaN(j.get().streaming.cmcd.rtpSafetyFactor)?j.get().streaming.cmcd.rtpSafetyFactor:5;return 100*(parseInt(he*de/100)+1)}catch{return NaN}}(ut)),isNaN(Zt)||($.rtp=Zt),$t&&(ut.url!==$t.url?$.nor=encodeURIComponent(Fe.A.getRelativeUrl(ut.url,$t.url)):$t.range&&($.nrr=$t.range)),Y&&($.br=Y),P&&($.ot=P),isNaN(gt)||($.d=gt),isNaN(vt)||($.mtp=vt),isNaN(ft)||($.dl=ft),isNaN(Ct)||($.bl=Ct),isNaN(Mt)||($.tb=Mt),isNaN(Qt)||Qt===1||($.pr=Qt),U[ut.mediaType]&&($.bs=!0,U[ut.mediaType]=!1),!F[ut.mediaType]&&H[ut.mediaType]||($.su=!0,F[ut.mediaType]=!1,H[ut.mediaType]=!0),$}(R)):R.type===jt.G.INIT_SEGMENT_TYPE?function(){var ut=Z();return ut.ot="i",ut.su=!0,ut}():R.type===jt.G.OTHER_TYPE||R.type===jt.G.XLINK_EXPANSION_TYPE?function(){var ut=Z();return ut.ot="o",ut}():R.type===jt.G.LICENSE?function(){var ut=Z();return ut.ot="k",ut}():null}catch{return null}var V,dt}function Z(){var R={},V=j.get().streaming.cmcd.cid?j.get().streaming.cmcd.cid:o.cid;return R.v=1,R.sid=j.get().streaming.cmcd.sid?j.get().streaming.cmcd.sid:o.sid,R.sid="".concat(R.sid),V&&(R.cid="".concat(V)),isNaN(o.pr)||o.pr===1||o.pr===null||(R.pr=o.pr),o.st&&(R.st=o.st),o.sf&&(R.sf=o.sf),R}function K(R){try{var V=p.getCurrentBufferLevel(R);return isNaN(V)?null:100*parseInt(10*V)}catch{return null}}function z(R){try{o.pr=R.playbackRate}catch{}}function f(R){try{var V=e.getIsDynamic(R.data)?"l":"v",dt=R.protocol&&R.protocol==="MSS"?"s":"d";o.st="".concat(V),o.sf="".concat(dt)}catch{}}function N(R){try{R.state&&R.mediaType&&R.state===r.A.BUFFER_EMPTY&&(U[R.mediaType]||(U[R.mediaType]=!0),F[R.mediaType]||(F[R.mediaType]=!0))}catch{}}function S(){for(var R in U)U.hasOwnProperty(R)&&(U[R]=!0);for(var V in F)F.hasOwnProperty(V)&&(F[V]=!0)}function L(R){try{if(!R)return null;var V=Object.keys(R).sort(function(P,$){return P.localeCompare($)}),dt=V.length,ut=V.reduce(function(P,$,Y){return $==="v"&&R[$]===1||(typeof R[$]=="string"&&$!=="ot"&&$!=="sf"&&$!=="st"?P+="".concat($,"=").concat(JSON.stringify(R[$])):P+="".concat($,"=").concat(R[$]),Y<dt-1&&(P+=",")),P},"");return(ut=ut.replace(/=true/g,"")).replace(/,\s*$/,"")}catch{return null}}return t={getQueryParameter:function(R){try{if(j.get().streaming.cmcd&&j.get().streaming.cmcd.enabled){var V=et(R),dt=function(P){try{var $=j.get().streaming.cmcd.enabledKeys;return Object.keys(P).filter(function(Y){return $.includes(Y)}).reduce(function(Y,gt){return Y[gt]=P[gt],Y},{})}catch{return P}}(V),ut=L(dt);return w.trigger(An.A.CMCD_DATA_GENERATED,{url:R.url,mediaType:R.mediaType,cmcdData:V,cmcdString:ut}),{key:"CMCD",value:ut}}return null}catch{return null}},getHeaderParameters:function(R){try{if(j.get().streaming.cmcd&&j.get().streaming.cmcd.enabled){var V=et(R),dt=ht(V,ot(["br","d","ot","tb"])),ut=ht(V,ot(["bl","dl","mtp","nor","nrr","su"])),P=ht(V,ot(["bs","rtp"])),$=ht(V,ot(["cid","pr","sf","sid","st","v"])),Y={"CMCD-Object":L(dt),"CMCD-Request":L(ut),"CMCD-Status":L(P),"CMCD-Session":L($)};return w.trigger(An.A.CMCD_DATA_GENERATED,{url:R.url,mediaType:R.mediaType,cmcdData:V,headers:Y}),Y}return null}catch{return null}},setConfig:function(R){R&&(R.abrController&&(l=R.abrController),R.dashMetrics&&(p=R.dashMetrics),R.playbackController&&(C=R.playbackController))},reset:function(){w.off(r.A.PLAYBACK_RATE_CHANGED,z,this),w.off(r.A.MANIFEST_LOADED,f,this),w.off(r.A.BUFFER_LEVEL_STATE_CHANGED,N,t),w.off(r.A.PLAYBACK_SEEKED,S,t),k()},initialize:function(){w.on(r.A.PLAYBACK_RATE_CHANGED,z,t),w.on(r.A.MANIFEST_LOADED,f,t),w.on(r.A.BUFFER_LEVEL_STATE_CHANGED,N,t),w.on(r.A.PLAYBACK_SEEKED,S,t),w.on(r.A.PERIOD_SWITCH_COMPLETED,st,t)}},e=Ie(B).getInstance(),k(),t}_n.__dashjs_factory_name="CmcdModel";var Tn=h.A.getSingletonFactory(_n);function qn(e){return qn=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},qn(e)}function Vn(){Vn=function(p,C){return new o(p,void 0,C)};var e=RegExp.prototype,t=new WeakMap;function o(p,C,b){var F=RegExp(p,C);return t.set(F,b||t.get(p)),In(F,o.prototype)}function l(p,C){var b=t.get(C);return Object.keys(b).reduce(function(F,U){var H=b[U];if(typeof H=="number")F[U]=p[H];else{for(var B=0;p[H[B]]===void 0&&B+1<H.length;)B++;F[U]=p[H[B]]}return F},Object.create(null))}return function(p,C){if(typeof C!="function"&&C!==null)throw new TypeError("Super expression must either be null or a function");p.prototype=Object.create(C&&C.prototype,{constructor:{value:p,writable:!0,configurable:!0}}),Object.defineProperty(p,"prototype",{writable:!1}),C&&In(p,C)}(o,RegExp),o.prototype.exec=function(p){var C=e.exec.call(this,p);if(C){C.groups=l(C,this);var b=C.indices;b&&(b.groups=l(b,this))}return C},o.prototype[Symbol.replace]=function(p,C){if(typeof C=="string"){var b=t.get(this);return e[Symbol.replace].call(this,p,C.replace(/\$<([^>]+)>/g,function(U,H){var B=b[H];return"$"+(Array.isArray(B)?B.join("$"):B)}))}if(typeof C=="function"){var F=this;return e[Symbol.replace].call(this,p,function(){var U=arguments;return qn(U[U.length-1])!="object"&&(U=[].slice.call(U)).push(l(U,F)),C.apply(this,U)})}return e[Symbol.replace].call(this,p,C)},Vn.apply(this,arguments)}function In(e,t){return In=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,l){return o.__proto__=l,o},In(e,t)}var Bn="static",Ln="dynamic",Wn="cmsd-",Tr=Wn+Bn,mr=Wn+Ln,er="stream",Xn=["mb","st","sf","v"],pi={video:"v",audio:"a",text:"tt",stream:er},hi=/^[-0-9]/;function Yr(){var e,t,o,l,p=this.context,C=(0,y.A)(p).getInstance();function b(){o={},l={}}function F(k){k&&Object.keys(k).forEach(function(st){Xn.includes(st)||delete k[st]})}function U(k){return!k||k.toLowerCase()!=="false"&&(hi.test(k)?parseInt(k,10):k.replace(/["]+/g,""))}function H(k){try{for(var st={},it=k.split(","),ht=0;ht<it.length;ht++){var ot=it[ht].split("="),et=ot[0],Z=U(ot[1]);st[et]=Z}return st}catch(K){t.error("Failed to parse CMSD-Static response header value:",K)}}function B(k){try{for(var st={},it=k.split(","),ht=it[it.length-1].split(";"),ot=1;ot<ht.length;ot++){var et=ht[ot].split("="),Z=et[0],K=U(et[1]);st[Z]=K}return st}catch(z){return t.error("Failed to parse CMSD-Dynamic response header value:",z),[]}}function w(k){return pi[k]||"o"}function j(k,st,it){var ht=k===Bn?o:l,ot=ht[st]||{},et=ht[er]||{};return ot[it]||et[it]}return e={setConfig:function(){},initialize:function(){},reset:function(){b()},parseResponseHeaders:function(k,st){for(var it=null,ht=null,ot=k.split(`\r
|
|
10
|
-
`),et=ot.length-1;et>=0;et--){var Z=ot[et].match(Vn(/^([^:]*):\s*(.*)$/,{key:1,value:2}));if(Z&&Z.groups){var K=Z.groups.key.toLowerCase(),z=Z.groups.value;switch(K){case Tr:it=H(z),C.trigger(i.A.CMSD_STATIC_HEADER,it);break;case mr:ht||(ht=B(z))}}}var f=er;return it&&it.ot?f=it.ot:st&&(f=w(st)),F(o[f]),F(l[f]),it&&(o[f]=Object.assign(o[f]||{},it)),ht&&(l[f]=Object.assign(l[f]||{},ht)),{static:it,dynamic:ht}},getMaxBitrate:function(k){var st=w(k);return j(Ln,st,"mb")||-1},getEstimatedThroughput:function(k){var st=w(k);return j(Ln,st,"etp")||null},getResponseDelay:function(k){var st=w(k);return j(Ln,st,"rd")||null},getRoundTripTime:function(k){var st=w(k);return j(Ln,st,"rtt")||null}},t=(0,g.A)(p).getInstance().getLogger(e),b(),e}Yr.__dashjs_factory_name="CmsdModel";var Hr=h.A.getSingletonFactory(Yr);function Vr(){var e,t,o=this.context,l={};function p(){t=(0,g.A)(o).getInstance().getLogger(e)}function C(F){for(var U={},H=0,B=0,w=0,j=0,k=F.length,st=0;st<k;++st)H+=F[st].chunkDownloadTimeRelativeMS,B+=F[st].bufferLevel,w+=F[st].chunkDownloadTimeRelativeMS*F[st].bufferLevel,j+=F[st].chunkDownloadTimeRelativeMS*F[st].chunkDownloadTimeRelativeMS;return U.m=(w-H*B/k)/(j-H*H/k),U.b=B/k-U.m*H/k,function(it){return U.m*it+U.b}}function b(F){var U,H=!0,B=F.reduce(function(w,j){return w+j.bufferLevelAtSegmentEnd},0)/F.length;return F.forEach(function(w){Math.abs(w.bufferLevelAtSegmentEnd/w.bufferLevelAtSegmentStart)<.95&&(H=!1),w.bufferLevelAtSegmentEnd/B<.8&&(H=!1),U?U>w.bitrate&&(H=!1):U=w.bitrate}),H}return e={setup:p,addMeasurement:function(F,U,H,B,w){F&&F.mediaType&&!l[F.mediaType]&&(l[F.mediaType]=[]);var j=F.mediaInfo.bitrateList.find(function(k){return k.id===F.representationId});l[F.mediaType].push({index:F.index,repId:F.representationId,mediaType:F.mediaType,requestTimeMS:B,adjustedAvailabilityStartTimeMS:F.availabilityStartTime.getTime(),segDurationMS:1e3*F.duration,chunksDurationMS:H.reduce(function(k,st){return k+st.chunkDownloadDurationMS},0),segmentBytes:H.reduce(function(k,st){return k+st.chunkBytes},0),bitrate:j&&j.bandwidth,bitrateList:F.mediaInfo.bitrateList,chunkMeasurements:H,fetchDownloadDurationMS:U,throughputCapacityDelayMS:w,getEstimatedBufferLevel:C(H.slice(1))}),l[F.mediaType].length>10&&l[F.mediaType].shift()},getThroughputCapacityDelayMS:function(F,U){var H=l[F.mediaType]&&l[F.mediaType].slice(-3);return!H||H.length<3?0:b(H)?U/4>250?250:U/4:0},getEstimatedDownloadDurationMS:function(F){var U=l[F.mediaType].slice(-1).pop(),H=l[F.mediaType].slice(-3),B=U.chunkMeasurements.slice(-1).pop().chunkDownloadTimeRelativeMS;U.bufferLevelAtSegmentStart=U.getEstimatedBufferLevel(B/2),U.bufferLevelAtSegmentEnd=U.getEstimatedBufferLevel(B);var w=b(H),j=w?.6:.8;if(U.isBufferStable&&1.05*U.segDurationMS<U.fetchDownloadDurationMS)return U.fetchDownloadDurationMS;if(!w||U.segDurationMS<U.fetchDownloadDurationMS||U.adjustedAvailabilityStartTimeMS<=U.requestTimeMS+U.throughputCapacityDelayMS-U.segDurationMS)return .8*U.fetchDownloadDurationMS;for(var k=U.requestTimeMS+U.throughputCapacityDelayMS-U.adjustedAvailabilityStartTimeMS,st=0,it=0,ht=0,ot=0;ot<U.chunkMeasurements.length;ot++){var et=U.chunkMeasurements[ot];if(k<it+et.chunkDownloadDurationMS)break;it+=et.chunkDownloadDurationMS,st+=et.chunkBytes,ht++}if(k<0&&t.warn("request time was before adjusted availibitly start time"),st&&it&&ht>.2*U.chunkMeasurements.length){var Z=st/it,K=U.segmentBytes/Z;return U.fetchDownloadDurationMS<K?U.fetchDownloadDurationMS*j:K*j}var z=U.bitrate;return U.bitrateList.some(function(f){if(f.bandwidth>U.bitrate)return z=f.bandwidth,!0}),z===U.bitrate?U.fetchDownloadDurationMS*j:j*U.segmentBytes*8*1e3/z}},p(),e}Vr.__dashjs_factory_name="LowLatencyThroughputModel";var Kr=h.A.getSingletonFactory(Vr),Le=M(6890);function tn(e){return tn=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},tn(e)}function fn(e,t,o){return(t=function(l){var p=function(C){if(tn(C)!="object"||!C)return C;var b=C[Symbol.toPrimitive];if(b!==void 0){var F=b.call(C,"string");if(tn(F)!="object")return F;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(C)}(l);return tn(p)=="symbol"?p:p+""}(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function Fn(e){e=e||{};var t,o,l,p,C,b,F,U,H,B,w=this.context,j=e.errHandler,k=e.dashMetrics,st=e.mediaPlayerModel,it=e.requestModifier,ht=e.boxParser,ot=e.errors,et=e.requestTimeout||0,Z=(0,y.A)(w).getInstance(),K=(0,lt.A)(w).getInstance();function z(f,N){var S,L=f.request,R=[],V=!0,dt=!0,ut=new Date,P=ut,$=0,Y=null,gt=null;if(!it||!k||!j)throw new Error("config object is not correct or missing");var vt,ft=function(Kt){L.requestStartDate=ut,L.requestEndDate=new Date,L.firstByteDate=L.firstByteDate||ut,L.fileLoaderType=gt;var ye=S.response?S.response.responseURL:null,he=S.response?S.response.status:null,de=S.response&&S.response.getAllResponseHeaders?S.response.getAllResponseHeaders():S.response?S.response.responseHeaders:null,qe=de&&K.get().streaming.cmsd&&K.get().streaming.cmsd.enabled?F.parseResponseHeaders(de,L.mediaType):null;k.addHttpRequest(L,ye,he,de,Kt?R:null,qe)},Ct=function(Kt){dt=!1,ft(Kt),L.type===jt.G.MPD_TYPE&&(k.addManifestUpdate(L),Z.trigger(i.A.MANIFEST_LOADING_FINISHED,{request:L}))},Mt=function(){if(Y&&(clearTimeout(Y),Y=null),o.indexOf(S)!==-1&&(o.splice(o.indexOf(S),1),dt))if(Ct(!1),N>0){try{K.get().streaming.utcSynchronization.enableBackgroundSyncAfterSegmentDownloadError&&L.type===jt.G.MEDIA_SEGMENT_TYPE&&st.getRetryAttemptsForType(jt.G.MEDIA_SEGMENT_TYPE)===N&&Z.trigger(i.A.ATTEMPT_BACKGROUND_SYNC)}catch{}N--;var Kt={config:f};p.push(Kt),Kt.timeout=setTimeout(function(){p.indexOf(Kt)!==-1&&(p.splice(p.indexOf(Kt),1),z(f,N))},st.getRetryIntervalsForType(L.type))}else{if(L.type===jt.G.MSS_FRAGMENT_INFO_SEGMENT_TYPE)return;j.error(new pt.A(C[L.type],L.url+" is not available",{request:L,response:S.response})),f.error&&f.error(L,"error",S.response.statusText,S.response),f.complete&&f.complete(L,S.response.statusText)}};L.hasOwnProperty("availabilityTimeComplete")&&L.availabilityTimeComplete===!1&&window.fetch&&L.responseType==="arraybuffer"&&L.type===jt.G.MEDIA_SEGMENT_TYPE?((vt=Yn(w).create({requestModifier:it,lowLatencyThroughputModel:H,boxParser:ht})).setup({dashMetrics:k}),gt=u.A.FILE_LOADER_TYPES.FETCH):(vt=(0,Qe.A)(w).create({requestModifier:it}),gt=u.A.FILE_LOADER_TYPES.XHR);var Qt=null,$t=it.modifyRequestURL?it.modifyRequestURL(L.url):L.url;if(K.get().streaming.cmcd&&K.get().streaming.cmcd.enabled){var Zt=K.get().streaming.cmcd.mode;if(Zt===u.A.CMCD_MODE_QUERY){var ae=function(Kt){try{var ye=[],he=b.getQueryParameter(Kt);return he&&ye.push(he),ye}catch{return[]}}(L);$t=Fe.A.addAditionalQueryParameterToUrl($t,ae)}else Zt===u.A.CMCD_MODE_HEADER&&(Qt=b.getHeaderParameters(L))}var Ne=U.getXHRWithCredentialsForType(L.type);if(L.queryParams){var Et=Object.keys(L.queryParams).map(function(Kt){return{key:Kt,value:L.queryParams[Kt]}});$t=Fe.A.addAditionalQueryParameterToUrl($t,Et)}L.url=$t,S={url:$t,method:jt.G.GET,withCredentials:Ne,request:L,onload:function(){S.response.status>=200&&S.response.status<=299&&(Ct(!0),f.success&&f.success(S.response.response,S.response.statusText,S.response.responseURL),f.complete&&f.complete(L,S.response.statusText))},onend:Mt,onerror:Mt,progress:function(Kt){var ye=new Date;V&&(V=!1,(!Kt.lengthComputable||Kt.lengthComputable&&Kt.total!==Kt.loaded)&&(L.firstByteDate=ye)),Kt.lengthComputable&&(L.bytesLoaded=Kt.loaded,L.bytesTotal=Kt.total),Kt.noTrace||(R.push({s:P,d:Kt.time?Kt.time:ye.getTime()-P.getTime(),b:[Kt.loaded?Kt.loaded-$:0]}),P=ye,$=Kt.loaded),Y&&(clearTimeout(Y),Y=null),K.get().streaming.fragmentRequestProgressTimeout>0&&(Y=setTimeout(function(){B.warn("Abort request "+S.url+" due to progress timeout"),S.response.onabort=null,S.loader.abort(S),Mt()},K.get().streaming.fragmentRequestProgressTimeout)),f.progress&&Kt&&f.progress(Kt)},onabort:function(){ft(!0),Y&&(clearTimeout(Y),Y=null),f.abort&&f.abort(L)},ontimeout:function(Kt){var ye;if(Kt.lengthComputable){var he=Kt.loaded/Kt.total*100;ye="Request timeout: loaded: "+Kt.loaded+", out of: "+Kt.total+" : "+he.toFixed(3)+"% Completed"}else ye="Request timeout: non-computable download size";B.warn(ye)},loader:vt,timeout:et,headers:Qt};var Pt=new Date().getTime();if(isNaN(L.delayLoadingTime)||Pt>=L.delayLoadingTime)o.push(S),vt.load(S);else{var ce={httpRequest:S};l.push(ce),ce.delayTimeout=setTimeout(function(){if(l.indexOf(ce)!==-1){l.splice(l.indexOf(ce),1);try{ut=new Date,P=ut,o.push(ce.httpRequest),vt.load(ce.httpRequest)}catch{ce.httpRequest.onerror()}}},L.delayLoadingTime-Pt)}}return t={load:function(f){f.request?z(f,st.getRetryAttemptsForType(f.request.type)):f.error&&f.error(f.request,"error")},abort:function(){p.forEach(function(f){clearTimeout(f.timeout),f.config.request&&f.config.abort&&f.config.abort(f.config.request)}),p=[],l.forEach(function(f){return clearTimeout(f.delayTimeout)}),l=[],o.forEach(function(f){f.request.type!==jt.G.MSS_FRAGMENT_INFO_SEGMENT_TYPE&&(f.onloadend=f.onerror=f.onprogress=void 0,f.loader.abort(f))}),o=[]}},B=(0,g.A)(w).getInstance().getLogger(t),o=[],l=[],p=[],b=Tn(w).getInstance(),F=Hr(w).getInstance(),H=Kr(w).getInstance(),U=(0,Le.A)(w).getInstance(),C=fn(fn(fn(fn(fn(fn(fn({},jt.G.MPD_TYPE,ot.DOWNLOAD_ERROR_ID_MANIFEST_CODE),jt.G.XLINK_EXPANSION_TYPE,ot.DOWNLOAD_ERROR_ID_XLINK_CODE),jt.G.INIT_SEGMENT_TYPE,ot.DOWNLOAD_ERROR_ID_INITIALIZATION_CODE),jt.G.MEDIA_SEGMENT_TYPE,ot.DOWNLOAD_ERROR_ID_CONTENT_CODE),jt.G.INDEX_SEGMENT_TYPE,ot.DOWNLOAD_ERROR_ID_CONTENT_CODE),jt.G.BITSTREAM_SWITCHING_SEGMENT_TYPE,ot.DOWNLOAD_ERROR_ID_CONTENT_CODE),jt.G.OTHER_TYPE,ot.DOWNLOAD_ERROR_ID_CONTENT_CODE),t}Fn.__dashjs_factory_name="HTTPLoader";var On=h.A.getClassFactory(Fn);function Gn(){var e;function t(){e={}}function o(){t()}return o(),{getLoader:function(l){for(var p in e)if(e.hasOwnProperty(p)&&l.startsWith(p))return e[p];return On},registerLoader:function(l,p){e[l]=p},unregisterLoader:function(l){e[l]&&delete e[l]},unregisterAllLoader:t,reset:o}}Gn.__dashjs_factory_name="SchemeLoaderFactory";var bn=h.A.getSingletonFactory(Gn);function Jn(e){e=e||{};var t,o,l=this.context;return t=bn(l).getInstance(),{load:function(p){if(!o){var C=t.getLoader(p&&p.request?p.request.url:null);o=C(l).create({errHandler:e.errHandler,mediaPlayerModel:e.mediaPlayerModel,requestModifier:e.requestModifier,dashMetrics:e.dashMetrics,boxParser:e.boxParser?e.boxParser:null,constants:e.constants?e.constants:null,dashConstants:e.dashConstants?e.dashConstants:null,urlUtils:e.urlUtils?e.urlUtils:null,requestTimeout:isNaN(e.requestTimeout)?0:e.requestTimeout,errors:e.errors})}o.load(p)},abort:function(){o&&o.abort()}}}Jn.__dashjs_factory_name="URLLoader";var Mn=h.A.getClassFactory(Jn);function Rn(e){return Rn=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},Rn(e)}function rr(e,t,o){return t=nr(t),function(l,p){if(p&&(Rn(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,Qn()?Reflect.construct(t,o||[],nr(e).constructor):t.apply(e,o))}function Qn(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Qn=function(){return!!e})()}function nr(e){return nr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},nr(e)}function $n(e,t){return $n=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,l){return o.__proto__=l,o},$n(e,t)}var yr=function(e){function t(l){var p;return function(C,b){if(!(C instanceof b))throw new TypeError("Cannot call a class as a function")}(this,t),(p=rr(this,t,[l])).checkForExistenceOnly=!0,p}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&&$n(l,p)}(t,e),o=t,Object.defineProperty(o,"prototype",{writable:!1}),o;var o}(T.A);function ur(e){e=e||{};var t,o,l=this.context,p=e.eventBus,C=e.events,b=e.urlUtils,F=e.errors,U=e.streamId;return t={checkForExistence:function(H){var B=function(j){p.trigger(C.CHECK_FOR_EXISTENCE_COMPLETED,{request:H,exists:j})};if(H){var w=new yr(H.url);o.load({request:w,success:function(){B(!0)},error:function(){B(!1)}})}else B(!1)},load:function(H){var B=function(w,j){p.trigger(C.LOADING_COMPLETED,{request:H,response:w||null,error:j||null,sender:t})};H?o.load({request:H,progress:function(w){p.trigger(C.LOADING_PROGRESS,{request:H,stream:w.stream,streamId:U}),w.data&&p.trigger(C.LOADING_DATA_PROGRESS,{request:H,response:w.data||null,error:null,sender:t})},success:function(w){B(w)},error:function(w,j,k){B(void 0,new pt.A(F.FRAGMENT_LOADER_LOADING_FAILURE_ERROR_CODE,k,j))},abort:function(w){w&&p.trigger(C.LOADING_ABANDONED,{mediaType:w.mediaType,request:w,sender:t})}}):B(void 0,new pt.A(F.FRAGMENT_LOADER_NULL_REQUEST_ERROR_CODE,F.FRAGMENT_LOADER_NULL_REQUEST_ERROR_MESSAGE))},abort:function(){o&&o.abort()},reset:function(){o&&(o.abort(),o=null)}},o=Mn(l).create({errHandler:e.errHandler,errors:F,dashMetrics:e.dashMetrics,mediaPlayerModel:e.mediaPlayerModel,requestModifier:e.requestModifier,urlUtils:b,constants:u.A,boxParser:e.boxParser,dashConstants:e.dashConstants,requestTimeout:e.settings.get().streaming.fragmentRequestTimeout}),t}ur.__dashjs_factory_name="FragmentLoader";var gi=h.A.getClassFactory(ur);function br(){return{modifyResponseAsync:function(e){return Promise.resolve(e)}}}br.__dashjs_factory_name="SegmentResponseModifier";var Wr=h.A.getSingletonFactory(br);function zr(e){e=e||{};var t,o,l,p=this.context,C=(0,y.A)(p).getInstance(),b=e.errHandler,F=e.mediaPlayerModel,U=e.dashMetrics,H=(0,g.A)(p).getInstance(),B=Wr(p).getInstance(),w=e.streamInfo;function j(){return w.id}function k(){for(var it in l)l[it].reset();l={}}function st(it){if(it.sender){var ht=it.request,ot=it.response,et=ht.isInitializationRequest(),Z=ht.mediaInfo.streamInfo;if(it.error&&(ht.mediaType===u.A.AUDIO||ht.mediaType===u.A.VIDEO||ht.mediaType===u.A.TEXT&&ht.mediaInfo.isFragmented)&&C.trigger(i.A.SERVICE_LOCATION_BASE_URL_BLACKLIST_ADD,{entry:it.request.serviceLocation}),ot&&Z){var K=function(z,f,N,S){var L=new ze;return L.streamId=N,L.mediaInfo=f.mediaInfo,L.segmentType=f.type,L.start=f.startTime,L.duration=f.duration,L.end=L.start+L.duration,L.bytes=z,L.index=f.index,L.quality=f.quality,L.representationId=f.representationId,L.endFragment=S,L}(ot,ht,w.id,it.type!==i.A.FRAGMENT_LOADING_PROGRESS);B.modifyResponseAsync(K).then(function(z){C.trigger(et?i.A.INIT_FRAGMENT_LOADED:i.A.MEDIA_FRAGMENT_LOADED,{chunk:z,request:ht},{streamId:Z.id,mediaType:ht.mediaType})}).catch(function(z){o.error(z),C.trigger(et?i.A.INIT_FRAGMENT_LOADED:i.A.MEDIA_FRAGMENT_LOADED,{chunk:K,request:ht},{streamId:Z.id,mediaType:ht.mediaType})})}else o.warn("No "+ht.mediaType+" bytes to push or stream is inactive.")}}return t={getStreamId:j,getModel:function(it){var ht=l[it];return ht||(ht=J(p).create({streamInfo:w,type:it,dashMetrics:U,fragmentLoader:gi(p).create({dashMetrics:U,mediaPlayerModel:F,errHandler:b,requestModifier:(0,Dt.A)(p).getInstance(),settings:e.settings,boxParser:e.boxParser,eventBus:C,events:i.A,errors:mt,dashConstants:e.dashConstants,urlUtils:e.urlUtils,streamId:j()}),debug:H,eventBus:C,events:i.A}),l[it]=ht),ht},reset:function(){C.off(r.A.FRAGMENT_LOADING_COMPLETED,st,this),C.off(r.A.FRAGMENT_LOADING_PROGRESS,st,this),k()}},o=H.getLogger(t),k(),C.on(r.A.FRAGMENT_LOADING_COMPLETED,st,t),C.on(r.A.FRAGMENT_LOADING_PROGRESS,st,t),t}zr.__dashjs_factory_name="FragmentController";var Fi=h.A.getClassFactory(zr);function xi(e,t,o){return Object.defineProperty(e,"prototype",{writable:!1}),e}var Ui=xi(function e(){(function(t,o){if(!(t instanceof o))throw new TypeError("Cannot call a class as a function")})(this,e),this.url=null,this.width=null,this.height=null,this.x=null,this.y=null});function Bi(e,t,o){return Object.defineProperty(e,"prototype",{writable:!1}),e}var mi=Bi(function e(){(function(t,o){if(!(t instanceof o))throw new TypeError("Cannot call a class as a function")})(this,e),this.mediaType=null,this.bitrate=null,this.width=null,this.height=null,this.scanType=null,this.qualityIndex=NaN});function yi(e){var t,o,l=this.context,p=e.streamInfo;function C(F){o.setTrackByIndex(F)}function b(){o&&o.reset()}return t={getStreamId:function(){return p.id},initialize:function(){o.addTracks();var F=o.getTracks();F&&F.length>0&&C(0)},provide:function(F,U){if(typeof U=="function"){var H,B,w=o.getCurrentTrack();if(!w||w.segmentDuration<=0||F==null)U(null);else{(B=o.getThumbnailRequestForTime(F))&&(w.segmentDuration=B.duration),H=F%w.segmentDuration;var j=Math.floor(H*w.tilesHor*w.tilesVert/w.segmentDuration),k=new Ui;if(k.width=Math.floor(w.widthPerTile),k.height=Math.floor(w.heightPerTile),k.x=Math.floor(j%w.tilesHor)*w.widthPerTile,k.y=Math.floor(j/w.tilesHor)*w.heightPerTile,"readThumbnail"in w)return w.readThumbnail(F,function(it){k.url=it,U(k)});if(B)k.url=B.url,w.segmentDuration=NaN;else{var st=Math.floor(F/w.segmentDuration);k.url=function(it,ht){var ot=ht+it.startNumber,et=(0,c.XX)(it.templateUrl,"Number",ot);return et=(0,c.XX)(et,"Time",(ot-1)*it.segmentDuration*it.timescale),et=(0,c.XX)(et,"Bandwidth",it.bandwidth),(0,c.Dr)(et)}(w,st)}U(k)}}},setTrackByIndex:C,getCurrentTrackIndex:function(){return o.getCurrentTrackIndex()},getBitrateList:function(){var F=o.getTracks(),U=0;return F.map(function(H){var B=new mi;return B.mediaType=u.A.IMAGE,B.qualityIndex=U++,B.bitrate=H.bitrate,B.width=H.width,B.height=H.height,B})},reset:b},b(),o=(0,Be.A)(l).create({streamInfo:p,adapter:e.adapter,baseURLController:e.baseURLController,timelineConverter:e.timelineConverter,debug:e.debug,eventBus:e.eventBus,events:e.events,dashConstants:e.dashConstants,dashMetrics:e.dashMetrics,segmentBaseController:e.segmentBaseController}),t}yi.__dashjs_factory_name="ThumbnailController";var ki=h.A.getClassFactory(yi),Xr=M(255);function Qr(e){var t;e=e||{};var o=[],l=(0,y.A)(this.context).getInstance(),p=e.updateEventName,C=e.addBlacklistEventName;function b(F){o.indexOf(F)===-1&&(o.push(F),l.trigger(p,{entry:F}))}return t={add:b,contains:function(F){return!!(o.length&&F&&F.length)&&o.indexOf(F)!==-1},reset:function(){o=[]}},C&&l.on(C,function(F){b(F.entry)},t),t}Qr.__dashjs_factory_name="BlackListController";var $r=h.A.getClassFactory(Qr),Nn=[u.A.VIDEO,u.A.AUDIO,u.A.TEXT,u.A.MUXED,u.A.IMAGE];function Er(e){e=e||{};var t,o,l,p,C,b,F,U,H,B,w,j,k,st,it,ht,ot,et,Z=this.context,K=(0,y.A)(Z).getInstance(),z=(0,At.A)(Z).getInstance(),f=e.manifestModel,N=e.mediaPlayerModel,S=e.dashMetrics,L=e.manifestUpdater,R=e.adapter,V=e.timelineConverter,dt=e.capabilities,ut=e.errHandler,P=e.abrController,$=e.playbackController,Y=e.eventController,gt=e.mediaController,vt=e.protectionController,ft=e.textController,Ct=e.videoModel,Mt=e.streamInfo,Qt=e.settings;function $t(pe,Oe){return new Promise(function(Ft,se){he(),B=!0,qe();var xt=Ct.getElement(),Gt=[];Nn.forEach(function(le){(le!==u.A.TEXT||pe)&&(le!==u.A.VIDEO||!xt||xt&&/^VIDEO$/i.test(xt.nodeName))&&Gt.push(Zt(le,pe))}),Promise.all(Gt).then(function(){return le=Oe,new Promise(function(yt){var Tt={},Wt=l.map(function(we){return we.createBufferSinks(le)});Promise.all(Wt).then(function(we){we.forEach(function(je){je&&(Tt[je.getType()]=je)}),yt(Tt)}).catch(function(){yt(Tt)})});var le}).then(function(le){if(B=!1,l.length===0){var yt="No streams to play.";ut.error(new pt.A(mt.MANIFEST_ERROR_ID_NOSTREAMS_CODE,yt,f.getValue())),o.fatal(yt)}else Ye();pe&&ft.createTracks(Mt),Ft(le)}).catch(function(le){se(le)})})}function Zt(pe,Oe){var Ft,se=R.getAllMediaInfoForType(Mt,pe),xt=[],Gt=null;if(!se||se.length===0)return o.info("No "+pe+" data."),Promise.resolve();pe===u.A.VIDEO&&(F=!0),pe===u.A.AUDIO&&(U=!0);for(var le=0,yt=se.length;le<yt;le++)Gt=se[le],pe===u.A.TEXT&&Gt.isEmbedded&&(ft.addEmbeddedTrack(Mt,Gt),xt.push(Gt)),ae(Gt)&>.addTrack(Gt);if(xt.length>0&&(gt.setInitialMediaSettingsForType(pe,Mt),ft.addMediaInfosToBuffer(Mt,pe,xt)),se=se.filter(function(Wt){return!Wt.isEmbedded}),se.length===0)return Promise.resolve();if(pe===u.A.IMAGE)return(j=ki(Z).create({streamInfo:Mt,adapter:R,baseURLController:e.baseURLController,timelineConverter:e.timelineConverter,debug:ht,eventBus:K,events:i.A,dashConstants:n.A,dashMetrics:e.dashMetrics,segmentBaseController:e.segmentBaseController})).initialize(),Promise.resolve();K.trigger(i.A.STREAM_INITIALIZING,{streamInfo:Mt,mediaInfo:Gt}),gt.setInitialMediaSettingsForType(pe,Mt);var Tt=function(Wt,we){var je=Wt&&Wt.length>0?Wt[0]:null,hn=w.getModel(je?je.type:null),En=je?je.type:null,dn=je?je.mimeType:null,jn=je?je.isFragmented:null,Pn=Ue(Z).create({streamInfo:Mt,type:En,mimeType:dn,timelineConverter:V,adapter:R,manifestModel:f,mediaPlayerModel:N,fragmentModel:hn,dashMetrics:e.dashMetrics,baseURLController:e.baseURLController,segmentBaseController:e.segmentBaseController,abrController:P,playbackController:$,mediaController:gt,textController:ft,errHandler:ut,settings:Qt,boxParser:it,segmentBlacklistController:k});Pn.initialize(we,F,jn),l.push(Pn);for(var Zn=0;Zn<Wt.length;Zn++)Pn.addMediaInfo(Wt[Zn]);return En===u.A.TEXT&&ft.addMediaInfosToBuffer(Mt,En,Wt,hn),Pn}(se,Oe);return(Ft=gt.getCurrentTrackFor(pe,Mt.id))?(P.updateTopQualityIndex(Ft),Tt.selectMediaInfo(pe===u.A.TEXT&&Ft.isEmbedded?se[0]:Ft)):Promise.resolve()}function ae(pe){var Oe,Ft=pe?pe.type:null;return Ft===u.A.MUXED?(Oe="Multiplexed representations are intentionally not supported, as they are not compliant with the DASH-AVC/264 guidelines",o.fatal(Oe),ut.error(new pt.A(mt.MANIFEST_ERROR_ID_MULTIPLEXED_CODE,Oe,f.getValue())),!1):!(Ft!==u.A.TEXT&&Ft!==u.A.IMAGE&&pe.contentProtection&&!dt.supportsEncryptedMedia()&&(ut.error(new pt.A(mt.CAPABILITY_MEDIAKEYS_ERROR_CODE,mt.CAPABILITY_MEDIAKEYS_ERROR_MESSAGE)),1))}function Ne(pe){for(var Oe=l?l.length:0,Ft=0;Ft<Oe;Ft++){var se=l[Ft].getFragmentModel();se.abortRequests(),se.resetInitialSettings(),l[Ft].reset(!1,pe)}ft&&ft.deactivateStream(Mt),l=[],C=!1,b=!1,Ke(!1),Pt(!1),K.trigger(i.A.STREAM_DEACTIVATED,{streamInfo:Mt})}function Et(pe){Ne(pe),p=!1,F=!1,U=!1,H={},B=!1,ot=!1,et=[]}function Pt(pe){ot=pe}function ce(){return Mt?Mt.start:NaN}function Kt(){return Mt?Mt.id:null}function ye(){return Mt}function he(){if(!Ct||!P)throw new Error(u.A.MISSING_CONFIG_ERROR)}function de(pe){pe.error&&(ut.error(pe.error),o.fatal(pe.error.message))}function qe(){if(Y){var pe=R.getEventsFor(Mt);pe&&pe.length>0&&Y.addInlineEvents(pe,Mt.id)}}function Ye(){for(var pe=l.length,Oe=H.audio||H.video?new pt.A(mt.DATA_UPDATE_FAILED_ERROR_CODE,mt.DATA_UPDATE_FAILED_ERROR_MESSAGE):null,Ft=0;Ft<pe;Ft++)if(l[Ft].isUpdating()||B)return;if(vt){vt.clearMediaInfoArray();for(var se=0;se<pe&&l[se];se++){var xt=l[se].getType(),Gt=l[se].getMediaInfo();if(xt===u.A.AUDIO||xt===u.A.VIDEO||xt===u.A.TEXT&&Gt.isFragmented){var le=l[se].getMediaInfo();le&&vt.initializeForMedia(le)}}vt.handleKeySystemFromManifest()}Oe?ut.error(Oe):p||(p=!0,Ct.waitForReadyState(u.A.VIDEO_ELEMENT_READY_STATES.HAVE_METADATA,function(){K.trigger(i.A.STREAM_INITIALIZED,{streamInfo:Mt})}))}function sn(){var pe=ge(),Oe=pe.length;if(Oe!==0){for(var Ft=0;Ft<Oe;Ft++)if(!pe[Ft].isBufferingCompleted()&&(pe[Ft].getType()===u.A.AUDIO||pe[Ft].getType()===u.A.VIDEO))return void o.debug("onBufferingCompleted - One streamProcessor has finished but",pe[Ft].getType(),"one is not buffering completed");o.debug("onBufferingCompleted - trigger STREAM_BUFFERING_COMPLETED"),b=!0,K.trigger(i.A.STREAM_BUFFERING_COMPLETED,{streamInfo:Mt},{streamInfo:Mt})}else o.warn("onBufferingCompleted - can't trigger STREAM_BUFFERING_COMPLETED because no streamProcessor is defined")}function ln(pe){H[pe.mediaType]=pe.error,Ye()}function kt(pe){Y&&Y.addInbandEvents(pe.events,Mt.id)}function ue(pe){return pe&&pe.type?ee(pe.type):null}function ee(pe){return pe?ge().filter(function(Oe){return Oe.getType()===pe})[0]:null}function ge(){for(var pe,Oe,Ft=[],se=0;se<l.length;se++)(pe=(Oe=l[se]).getType())!==u.A.AUDIO&&pe!==u.A.VIDEO&&pe!==u.A.TEXT||Ft.push(Oe);return Ft}function De(pe,Oe){var Ft=ye(),se=Oe.getStreamInfo();if(!se||!Ft)return!0;var xt=R.getAdaptationForType(se.index,pe,se),Gt=R.getAdaptationForType(Ft.index,pe,Ft);return xt&&Gt?!(!Ve(Gt)&&Ve(xt)):!xt&&!Gt}function Ve(pe){return!!pe&&!!(pe.ContentProtection||pe.Representation_asArray&&pe.Representation_asArray.length>0&&pe.Representation_asArray[0].ContentProtection)}function Ge(pe,Oe){var Ft=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!pe||!pe.hasOwnProperty("getStreamInfo"))return!1;var se=pe.getStreamInfo(),xt=Ft?Ft.getStreamInfo():ye();if(!se||!xt)return!1;var Gt=R.getAdaptationForType(se.index,Oe,se),le=R.getAdaptationForType(xt.index,Oe,xt);if(!Gt||!le)return!Gt&&!le;var yt=Gt&&le&&Gt.mimeType===le.mimeType,Tt=le.Representation_asArray.map(function(hn){return hn.codecs}),Wt=Gt.Representation_asArray.map(function(hn){return hn.codecs}),we=Wt.some(function(hn){return Tt.indexOf(hn)>-1}),je=Wt.some(function(hn){return Tt.some(function(En){return dt.codecRootCompatibleWithCodec(En,hn)})});return we||je&&yt}function Ke(pe){st=pe}function Ze(){return st}return t={initialize:function(){K.on(i.A.BUFFERING_COMPLETED,sn,t),K.on(i.A.DATA_UPDATE_COMPLETED,ln,t),K.on(i.A.INBAND_EVENTS,kt,t),vt&&(K.on(i.A.KEY_ERROR,de,t),K.on(i.A.SERVER_CERTIFICATE_UPDATED,de,t),K.on(i.A.LICENSE_REQUEST_COMPLETE,de,t),K.on(i.A.KEY_SYSTEM_SELECTED,de,t),K.on(i.A.KEY_SESSION_CREATED,de,t),K.on(i.A.KEY_STATUSES_CHANGED,de,t)),ft.initializeForStream(Mt),K.trigger(i.A.STREAM_UPDATED,{streamInfo:Mt})},getStreamId:function(){return Mt?Mt.id:null},activate:function(pe,Oe){return new Promise(function(Ft,se){if(!C)return Ze()?(C=!0,K.trigger(i.A.STREAM_ACTIVATED,{streamInfo:Mt}),void Ft(Oe)):void function(xt,Gt){return $t(xt,Gt)}(pe,Oe).then(function(xt){C=!0,K.trigger(i.A.STREAM_ACTIVATED,{streamInfo:Mt}),Ft(xt)}).catch(function(xt){se(xt)});Ft(Oe)})},deactivate:Ne,getIsActive:function(){return C},getDuration:function(){return Mt?Mt.duration:NaN},getStartTime:ce,getId:Kt,getStreamInfo:ye,getHasAudioTrack:function(){return U},getHasVideoTrack:function(){return F},startPreloading:function(pe,Oe){return new Promise(function(Ft,se){Ze()?se():(o.info("[startPreloading] Preloading next stream with id ".concat(Kt())),Ke(!0),$t(pe,Oe).then(function(){for(var xt=0;xt<l.length&&l[xt];xt++)l[xt].setExplicitBufferingTime(ce()),l[xt].getScheduleController().startScheduleTimer();Ft()}).catch(function(){Ke(!1),se()}))})},initializeForTextWithMediaSource:function(pe){return new Promise(function(Oe,Ft){Zt(u.A.TEXT,pe).then(function(){return(se=ee(u.A.TEXT))?se.createBufferSinks():Promise.resolve();var se}).then(function(){ft.createTracks(Mt),Oe()}).catch(function(se){Ft(se)})})},getThumbnailController:function(){return j},getBitrateListFor:function(pe){if(he(),pe===u.A.IMAGE)return j?j.getBitrateList():[];var Oe=function(Ft){for(var se=null,xt=0;xt<l.length;xt++)if((se=l[xt]).getType()===Ft)return se.getMediaInfo();return null}(pe);return P.getBitrateList(Oe)},updateData:function(pe){return new Promise(function(Oe){B=!0,Mt=pe,Y&&qe();for(var Ft=[],se=0,xt=l.length;se<xt;se++){var Gt=l[se],le=Gt.getMediaInfo();Ft.push(Gt.updateStreamInfo(Mt));var yt=R.getAllMediaInfoForType(Mt,Gt.getType());if(yt=yt.filter(function(we){return!we.isEmbedded})){Gt.clearMediaInfoArray();for(var Tt=0;Tt<yt.length;Tt++){var Wt=yt[Tt];Gt.addMediaInfo(yt[Tt]),R.areMediaInfosEqual(le,Wt)&&(P.updateTopQualityIndex(Wt),Ft.push(Gt.selectMediaInfo(Wt)))}}}Promise.all(Ft).then(function(){for(Ft=[];et.length>0;){var we=et.pop(),je=we.newMediaInfo,hn=ue(we.oldMediaInfo);if(!hn)return;Ft.push(hn.prepareTrackSwitch()),Ft.push(hn.selectMediaInfo(je))}return Promise.all(Ft)}).then(function(){B=!1,Ye(),K.trigger(i.A.STREAM_UPDATED,{streamInfo:Mt}),Oe()})})},reset:function(pe){w&&(w.reset(),w=null),P&&Mt&&P.clearDataForStream(Mt.id),k&&(k.reset(),k=null),Et(pe),Mt=null,K.off(i.A.DATA_UPDATE_COMPLETED,ln,t),K.off(i.A.BUFFERING_COMPLETED,sn,t),K.off(i.A.INBAND_EVENTS,kt,t),vt&&(K.off(i.A.KEY_ERROR,de,t),K.off(i.A.SERVER_CERTIFICATE_UPDATED,de,t),K.off(i.A.LICENSE_REQUEST_COMPLETE,de,t),K.off(i.A.KEY_SYSTEM_SELECTED,de,t),K.off(i.A.KEY_SESSION_CREATED,de,t),K.off(i.A.KEY_STATUSES_CHANGED,de,t))},getProcessors:ge,setMediaSource:function(pe){return new Promise(function(Oe,Ft){for(var se=[],xt=0;xt<l.length;)ae(l[xt].getMediaInfo())?(se.push(l[xt].setMediaSource(pe)),xt++):(l[xt].reset(),l.splice(xt,1));Promise.all(se).then(function(){for(var Gt=0;Gt<l.length;Gt++)l[Gt].dischargePreBuffer();if(l.length===0){var le="No streams to play.";ut.error(new pt.A(mt.MANIFEST_ERROR_ID_NOSTREAMS_CODE,le+"nostreams",f.getValue())),o.fatal(le)}Oe()}).catch(function(Gt){o.error(Gt),Ft(Gt)})})},isMediaCodecCompatible:function(pe){var Oe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return Ge(pe,u.A.VIDEO,Oe)&&Ge(pe,u.A.AUDIO,Oe)},isProtectionCompatible:function(pe){return!pe||De(u.A.VIDEO,pe)&&De(u.A.AUDIO,pe)},getPreloaded:Ze,getIsEndedEventSignaled:function(){return ot},setIsEndedEventSignaled:Pt,getAdapter:function(){return R},getHasFinishedBuffering:function(){return b},setPreloaded:Ke,startScheduleControllers:function(){for(var pe=l.length,Oe=0;Oe<pe&&l[Oe];Oe++)l[Oe].getScheduleController().startScheduleTimer()},prepareTrackChange:function(pe){if(C&&Mt){b=!1;var Oe=pe.newMediaInfo,Ft=f.getValue();R.setCurrentMediaInfo(Mt.id,Oe.type,Oe);var se=ue(Oe);if(se){var xt=$.getTime();o.info("Stream - Process track changed at current time "+xt),Ft.refreshManifestOnSwitchTrack?(et.push(pe),L.getIsUpdating()||(o.debug("Stream - Refreshing manifest for switch track"),L.refreshManifest())):se.selectMediaInfo(Oe).then(function(){Oe.type!==u.A.VIDEO&&Oe.type!==u.A.AUDIO||P.updateTopQualityIndex(Oe),se.prepareTrackSwitch()})}}},prepareQualityChange:function(pe){var Oe=ee(pe.mediaType);Oe&&Oe.prepareQualityChange(pe)}},function(){try{ht=(0,g.A)(Z).getInstance(),o=ht.getLogger(t),Et(),it=(0,Xr.A)(Z).getInstance(),k=$r(Z).create({updateEventName:i.A.SEGMENT_LOCATION_BLACKLIST_CHANGED,addBlacklistEventName:i.A.SEGMENT_LOCATION_BLACKLIST_ADD}),w=Fi(Z).create({streamInfo:Mt,mediaPlayerModel:N,dashMetrics:S,errHandler:ut,settings:Qt,boxParser:it,dashConstants:n.A,urlUtils:z})}catch(pe){throw pe}}(),t}Er.__dashjs_factory_name="Stream";var Mr=h.A.getClassFactory(Er);function Sr(e,t,o){return Object.defineProperty(e,"prototype",{writable:!1}),e}var Gi=Sr(function e(t){(function(o,l){if(!(o instanceof l))throw new TypeError("Cannot call a class as a function")})(this,e),this.url=t||null,this.type=jt.G.CONTENT_STEERING_TYPE,this.responseType="json"});function ar(e,t,o){return Object.defineProperty(e,"prototype",{writable:!1}),e}var ji=ar(function e(){(function(t,o){if(!(t instanceof o))throw new TypeError("Cannot call a class as a function")})(this,e),this.version=null,this.ttl=300,this.reloadUri=null,this.pathwayPriority=[],this.pathwayClones=[]});function lr(){var e,t,o,l,p,C,b,F,U,H,B,w,j,k,st,it=this.context,ht=(0,At.A)(it).getInstance();function ot(P){f(P,"baseUrl")}function et(P){f(P,"location")}function Z(P){if(P&&P.request&&P.request.serviceLocation&&P.request.requestStartDate&&P.request.requestEndDate&&!isNaN(P.request.bytesTotal)){var $=P.request.serviceLocation,Y=P.request.requestEndDate.getTime()-P.request.requestStartDate.getTime();z($,parseInt(8*P.request.bytesTotal/Y*1e3))}}function K(P){P&&P.httpRequest&&P.httpRequest._serviceLocation&&!isNaN(P.throughput)&&z(P.httpRequest._serviceLocation,1e3*P.throughput)}function z(P,$){p[P]||(p[P]=[]),p[P].push($),p[P].length>4&&p[P].shift()}function f(P,$){if(P&&P.request&&P.request.serviceLocation){var Y=P.request.serviceLocation;l[$].all.indexOf(Y)===-1&&l[$].all.push(Y),l[$].current=Y}}function N(){var P=B.getValue(),$=st.getContentSteering(P);return $||($=j.getServiceDescriptionSettings().contentSteering),$}function S(){return new Promise(function(P){try{var $=N();if(!$||!$.serverUrl)return void P();var Y=function(vt){var ft=vt.serverUrl;o&&o.reloadUri&&(ft=ht.isRelative(o.reloadUri)?ht.resolve(o.reloadUri,vt.serverUrl):o.reloadUri);var Ct=[],Mt=l.baseUrl.all.concat(l.location.all);if(Mt.length>0){var Qt=Mt.map(function(ae){var Ne=function(Et){if(!Et||!p[Et]||p[Et].length===0)return-1;var Pt=p[Et].reduce(function(ce,Kt){return ce+Kt})/p[Et].length;return parseInt(Pt)}(ae);return{serviceLocation:ae,throughput:Ne}});Qt.sort(function(ae,Ne){return Ne.throughput-ae.throughput});var $t="",Zt="";Qt.forEach(function(ae,Ne){Ne!==0&&($t="".concat($t,","),ae.throughput>-1&&(Zt="".concat(Zt,","))),$t="".concat($t).concat(ae.serviceLocation),ae.throughput>-1&&(Zt="".concat(Zt).concat(ae.throughput))}),Ct.push({key:"_DASH_pathway",value:'"'.concat($t,'"')}),Ct.push({key:"_DASH_throughput",value:Zt})}return ft=Fe.A.addAditionalQueryParameterToUrl(ft,Ct)}($),gt=new Gi(Y);b.load({request:gt,success:function(vt){(function(ft){ft&&ft[n.A.CONTENT_STEERING_RESPONSE.VERSION]&&parseInt(ft[n.A.CONTENT_STEERING_RESPONSE.VERSION])===1&&((o=new ji).version=ft[n.A.CONTENT_STEERING_RESPONSE.VERSION],ft[n.A.CONTENT_STEERING_RESPONSE.TTL]&&!isNaN(ft[n.A.CONTENT_STEERING_RESPONSE.TTL])&&(o.ttl=ft[n.A.CONTENT_STEERING_RESPONSE.TTL]),ft[n.A.CONTENT_STEERING_RESPONSE.RELOAD_URI]&&(o.reloadUri=ft[n.A.CONTENT_STEERING_RESPONSE.RELOAD_URI]),ft[n.A.CONTENT_STEERING_RESPONSE.PATHWAY_PRIORITY]&&(o.pathwayPriority=ft[n.A.CONTENT_STEERING_RESPONSE.PATHWAY_PRIORITY]),ft[n.A.CONTENT_STEERING_RESPONSE.PATHWAY_CLONES]&&(o.pathwayClones=ft[n.A.CONTENT_STEERING_RESPONSE.PATHWAY_CLONES],o.pathwayClones=o.pathwayClones.filter(function(Ct){return function(Mt){return Mt[n.A.CONTENT_STEERING_RESPONSE.BASE_ID]&&Mt[n.A.CONTENT_STEERING_RESPONSE.ID]&&Mt[n.A.CONTENT_STEERING_RESPONSE.URI_REPLACEMENT]&&Mt[n.A.CONTENT_STEERING_RESPONSE.URI_REPLACEMENT][n.A.CONTENT_STEERING_RESPONSE.HOST]}(Ct)})),V())})(vt),k.trigger(r.A.CONTENT_STEERING_REQUEST_COMPLETED,{currentSteeringResponseData:o,url:Y}),P()},error:function(vt,ft,Ct,Mt){(function(Qt,$t){try{switch(t.warn("Error fetching data from content steering server",Qt),$t.status){case 410:break;case 429:var Zt=$t&&$t.getResponseHeader?$t.getResponseHeader("retry-after"):null;Zt!==null&&(o||(o={}),o.ttl=parseInt(Zt)),V();break;default:V()}}catch(ae){t.error(ae)}})(vt,Mt),P(vt)},complete:function(){l.baseUrl.all=L(l.baseUrl),l.location.all=L(l.location)}})}catch(vt){P(vt)}})}function L(P){return P.all&&P.all.length!==0&&P.current?P.all.filter(function($){return $===P.current}):[]}function R(P){try{var $=[];return P&&P.length!==0&&o&&o.pathwayClones&&o.pathwayClones.length!==0&&o.pathwayClones.forEach(function(Y){var gt=P.filter(function(Qt){return Y[n.A.CONTENT_STEERING_RESPONSE.BASE_ID]===Qt.serviceLocation}),vt=null;if(gt&>.length>0&&(vt=gt[0]),vt){var ft=new URL(vt.url),Ct=Y[n.A.CONTENT_STEERING_RESPONSE.URI_REPLACEMENT][n.A.CONTENT_STEERING_RESPONSE.HOST];Ct=Fe.A.stringHasProtocol(Ct)?Ct:"".concat(ft.protocol,"//").concat(Ct);var Mt={synthesizedUrl:"".concat(Ct).concat(ft.pathname),serviceLocation:Y[n.A.CONTENT_STEERING_RESPONSE.ID],queryParams:Y[n.A.CONTENT_STEERING_RESPONSE.URI_REPLACEMENT][n.A.CONTENT_STEERING_RESPONSE.PARAMS],reference:vt};$.push(Mt)}}),$}catch(Y){return t.error(Y),[]}}function V(){o&&o.ttl&&!isNaN(o.ttl)&&(C&&clearTimeout(C),C=setTimeout(function(){S()},1e3*o.ttl))}function dt(){C&&clearTimeout(C),C=null}function ut(){o=null,p={},l={baseUrl:{current:null,all:[]},location:{current:null,all:[]}},dt()}return e={reset:function(){ut(),k.off(r.A.FRAGMENT_LOADING_STARTED,ot,e),k.off(r.A.MANIFEST_LOADING_STARTED,et,e),k.off(r.A.MANIFEST_LOADING_FINISHED,Z,e),k.off(r.A.THROUGHPUT_MEASUREMENT_STORED,K,e)},setConfig:function(P){P&&(P.adapter&&(st=P.adapter),P.errHandler&&(F=P.errHandler),P.dashMetrics&&(U=P.dashMetrics),P.mediaPlayerModel&&(H=P.mediaPlayerModel),P.requestModifier&&(w=P.requestModifier),P.manifestModel&&(B=P.manifestModel),P.serviceDescriptionController&&(j=P.serviceDescriptionController),P.eventBus&&(k=P.eventBus))},loadSteeringData:S,getCurrentSteeringResponseData:function(){return o},shouldQueryBeforeStart:function(){var P=N();return!!P&&P.queryBeforeStart},getSteeringDataFromManifest:N,stopSteeringRequestTimer:dt,getSynthesizedBaseUrlElements:function(P){try{return R(P).map(function($){var Y=new Dr($.synthesizedUrl,$.serviceLocation);return Y.queryParams=$.queryParams,Y.dvbPriority=$.reference.dvbPriority,Y.dvbWeight=$.reference.dvbWeight,Y.availabilityTimeOffset=$.reference.availabilityTimeOffset,Y.availabilityTimeComplete=$.reference.availabilityTimeComplete,Y})}catch($){return t.error($),[]}},getSynthesizedLocationElements:function(P){try{return R(P).map(function($){var Y=new Xe($.synthesizedUrl,$.serviceLocation);return Y.queryParams=$.queryParams,Y})}catch($){return t.error($),[]}},initialize:function(){b=Mn(it).create({errHandler:F,dashMetrics:U,mediaPlayerModel:H,requestModifier:w,errors:mt}),k.on(r.A.FRAGMENT_LOADING_STARTED,ot,e),k.on(r.A.MANIFEST_LOADING_STARTED,et,e),k.on(r.A.MANIFEST_LOADING_FINISHED,Z,e),k.on(r.A.THROUGHPUT_MEASUREMENT_STORED,K,e)}},t=(0,g.A)(it).getInstance().getLogger(e),ut(),e}lr.__dashjs_factory_name="ContentSteeringController";var Jr=h.A.getSingletonFactory(lr);function _a(){var e,t,o,l=this.context,p=(0,lt.A)(l).getInstance();return e={select:function(C){if(!C||C.length===0)return null;var b=null;return p.get().streaming.applyContentSteering&&(b=function(F){var U=o.getCurrentSteeringResponseData();return U&&U.pathwayPriority&&U.pathwayPriority.length>0?function(){for(var H=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],B=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],w=0,j=null,k=function(){var st=H[w],it=B.findIndex(function(ht){return ht.serviceLocation&&ht.serviceLocation===st});if(it!==-1&&!t.contains(B[it].serviceLocation))return j=B[it],1;w+=1};w<H.length&&!k(););return j}(U.pathwayPriority,F):null}(C)),b||(b=function(F){return F[0]}(C)),b},setConfig:function(C){C.blacklistController&&(t=C.blacklistController),C.contentSteeringController&&(o=C.contentSteeringController)},reset:function(){t.reset()}},t=$r(l).create({updateEventName:i.A.SERVICE_LOCATION_LOCATION_BLACKLIST_CHANGED,addBlacklistEventName:i.A.SERVICE_LOCATION_LOCATION_BLACKLIST_ADD}),o=Jr(l).getInstance(),e}_a.__dashjs_factory_name="LocationSelector";var zo=h.A.getClassFactory(_a);function Aa(){var e,t,o,l,p,C,b,F,U,H,B,w,j,k,st=this.context,it=(0,y.A)(st).getInstance(),ht=(0,At.A)(st).getInstance();function ot(){o=NaN,b=!1,p=!0,C=!1,et()}function et(){l!==null&&(clearTimeout(l),l=null)}function Z(V){et(),C||(isNaN(V)&&!isNaN(o)&&(V=1e3*o),isNaN(V)||(t.debug("Refresh manifest in "+V+" milliseconds."),l=setTimeout(f,V)))}function K(){var V=arguments.length>0&&arguments[0]!==void 0&&arguments[0];b=!0;var dt=U.getValue(),ut=dt.url,P=null,$=B.getPatchLocation(dt),Y=H.select($),gt=null;if(Y&&!V)ut=Y.url,P=Y.serviceLocation,gt=Y.queryParams;else{var vt=function(Ct){var Mt=B.getLocation(Ct),Qt=j.getSynthesizedLocationElements(Mt);return Mt.concat(Qt)}(dt),ft=H.select(vt);ft&&(ut=ft.url,P=ft.serviceLocation,gt=ft.queryParams)}ht.isRelative(ut)&&(ut=ht.resolve(ut,dt.url)),F.load(ut,P,gt)}function z(V){if(V){if(B.getIsPatch(V)){var dt=V;V=U.getValue();var ut=B.isPatchValid(V,dt),P=ut;if(ut){var $=B.getPublishTime(V);P=B.applyPatchToManifest(V,dt);var Y=B.getPublishTime(V);P=$.getTime()!=Y.getTime()}if(!P)return t.debug("Patch provided is invalid, performing full manifest refresh"),void K(!0);V.loadedTime=new Date}}else(V=U.getValue()).loadedTime=new Date;if(U.getValue()&&U.getValue().type===n.A.DYNAMIC&&V.type===n.A.STATIC)return it.trigger(i.A.DYNAMIC_TO_STATIC),b=!1,void(C=!0);U.setValue(V);var gt=new Date,vt=(gt.getTime()-V.loadedTime.getTime())/1e3;1e3*(o=B.getManifestUpdatePeriod(V,vt))>2147483647&&(o=2147483647e-3),it.trigger(i.A.MANIFEST_UPDATED,{manifest:V}),t.info("Manifest has been refreshed at "+gt+"["+gt.getTime()/1e3+"] "),p||Z()}function f(){p||(b?Z(k.get().streaming.manifestUpdateRetryInterval):K())}function N(V){V.error?V.error.code===mt.MANIFEST_LOADER_PARSING_FAILURE_ERROR_CODE&&w.error(V.error):z(V.manifest)}function S(){p=!1,Z()}function L(){(p=!k.get().streaming.scheduling.scheduleWhilePaused)&&et()}function R(){b=!1}return e={initialize:function(){ot(),it.on(i.A.STREAMS_COMPOSED,R,this),it.on(r.A.PLAYBACK_STARTED,S,this),it.on(r.A.PLAYBACK_PAUSED,L,this),it.on(i.A.INTERNAL_MANIFEST_LOADED,N,this)},setManifest:function(V){z(V)},refreshManifest:K,getIsUpdating:function(){return b},setConfig:function(V){V&&(V.manifestModel&&(U=V.manifestModel),V.adapter&&(B=V.adapter),V.manifestLoader&&(F=V.manifestLoader),V.errHandler&&(w=V.errHandler),V.locationSelector&&(H=V.locationSelector),V.settings&&(k=V.settings),V.contentSteeringController&&(j=V.contentSteeringController))},reset:function(){it.off(r.A.PLAYBACK_STARTED,S,this),it.off(r.A.PLAYBACK_PAUSED,L,this),it.off(i.A.STREAMS_COMPOSED,R,this),it.off(i.A.INTERNAL_MANIFEST_LOADED,N,this),ot()}},t=(0,g.A)(st).getInstance().getLogger(e),H=zo(st).create(),e}Aa.__dashjs_factory_name="ManifestUpdater";var va=h.A.getClassFactory(Aa);function qi(){var e,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=(0,At.A)(ht).getInstance();function Z(){F=[],U=[],H=null,B=null,j=null,w=NaN,o=!1,l=!1,k=p.get().streaming.utcSynchronization.timeBetweenSyncAttempts}function K(){p.get().streaming.utcSynchronization.enabled&&!o&&!l&&j&&j.value&&j.schemeIdUri&&!isNaN(w)&&!isNaN(p.get().streaming.utcSynchronization.backgroundAttempts)&&(B&&(Date.now()-B)/1e3<30||(F=[],l=!0,z(isNaN(p.get().streaming.utcSynchronization.backgroundAttempts)?2:p.get().streaming.utcSynchronization.backgroundAttempts)))}function z(ft){try{if(ft<=0)return void gt();var Ct=Date.now();C[j.schemeIdUri](j.value,function(Mt){var Qt=Date.now(),$t=N(Ct,Qt,Mt);F.push($t),z(ft-1)},function(){gt()})}catch{gt()}}function f(){var ft=(arguments.length>0&&arguments[0]!==void 0?arguments[0]:null)||0;if(!U||U.length===0||ft>=U.length)S();else{var Ct=U[ft];if(Ct)if(C.hasOwnProperty(Ct.schemeIdUri)){var Mt=new Date().getTime();C[Ct.schemeIdUri](Ct.value,function(Qt){var $t=new Date().getTime(),Zt=N(Mt,$t,Qt);j=Ct,S(Zt)},function(){f(ft+1)})}else f(ft+1);else S()}}function N(ft,Ct,Mt){return Mt-(Ct-(Ct-ft)/2)}function S(){var ft,Ct,Mt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:NaN,Qt=isNaN(Mt);Qt&&p.get().streaming.utcSynchronization.useManifestDateHeaderTimeSource?(ft=b.getLatestMPDRequestHeaderValueByID("Date"),Ct=ft!==null?new Date(ft).getTime():Number.NaN,isNaN(Ct)?Y(!0):Y(!1,Ct-Date.now())):Y(Qt,Mt)}function L(ft){var Ct=Date.parse(ft);return isNaN(Ct)&&(Ct=function(Mt){var Qt,$t,Zt=/^([0-9]{4})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2})(?::([0-9]*)(\.[0-9]*)?)?(?:([+\-])([0-9]{2})([0-9]{2}))?/.exec(Mt);return Qt=Date.UTC(parseInt(Zt[1],10),parseInt(Zt[2],10)-1,parseInt(Zt[3],10),parseInt(Zt[4],10),parseInt(Zt[5],10),Zt[6]&&(parseInt(Zt[6],10)||0),Zt[7]&&1e3*parseFloat(Zt[7])||0),Zt[9]&&Zt[10]&&($t=60*parseInt(Zt[9],10)+parseInt(Zt[10],10),Qt+=(Zt[8]==="+"?-1:1)*$t*60*1e3),new Date(Qt).getTime()}(ft)),Ct}function R(ft){return Date.parse(ft)}function V(ft){return Date.parse(ft)}function dt(ft,Ct,Mt){Mt()}function ut(ft,Ct,Mt){var Qt=L(ft);isNaN(Qt)?Mt():Ct(Qt)}function P(ft,Ct,Mt,Qt,$t){var Zt,ae,Ne=!1,Et=new XMLHttpRequest,Pt=$t?jt.G.HEAD:jt.G.GET,ce=Ct.match(/\S+/g);if(Ct=ce.shift(),Zt=function(){Ne||(Ne=!0,ce.length?P(ft,ce.join(" "),Mt,Qt,$t):Qt())},ae=function(){var ye,he;Et.status===200&&(ye=$t?Et.getResponseHeader("Date"):Et.response,he=ft(ye),isNaN(he)||(Mt(he),Ne=!0))},et.isRelative(Ct)){var Kt=it.resolve();Kt&&(Ct=et.resolve(Ct,Kt.url))}Et.open(Pt,Ct),Et.timeout=5e3,Et.onload=ae,Et.onloadend=Zt,Et.send()}function $(ft,Ct,Mt){P(V,ft,Ct,Mt,!0)}function Y(ft,Ct){if(isNaN(w)||isNaN(Ct)||ft||function(Qt){try{var $t,Zt=vt(Qt),ae=isNaN(k)?30:k,Ne=isNaN(p.get().streaming.utcSynchronization.timeBetweenSyncAttemptsAdjustmentFactor)?2:p.get().streaming.utcSynchronization.timeBetweenSyncAttemptsAdjustmentFactor,Et=isNaN(p.get().streaming.utcSynchronization.maximumTimeBetweenSyncAttempts)?600:p.get().streaming.utcSynchronization.maximumTimeBetweenSyncAttempts,Pt=isNaN(p.get().streaming.utcSynchronization.minimumTimeBetweenSyncAttempts)?2:p.get().streaming.utcSynchronization.minimumTimeBetweenSyncAttempts;Zt?($t=Math.min(ae*Ne,Et),t.debug("Increasing timeBetweenSyncAttempts to ".concat($t))):($t=Math.max(ae/Ne,Pt),t.debug("Decreasing timeBetweenSyncAttempts to ".concat($t))),k=$t}catch{}}(Ct),!ft&&!isNaN(Ct)){H=Date.now(),o=!1;var Mt=isNaN(w);w=Ct,Mt&&K(),t.debug("Completed UTC sync. Setting client - server offset to ".concat(Ct))}ft&&(j=null,o=!1,st.error(new pt.A(mt.TIME_SYNC_FAILED_ERROR_CODE,mt.TIME_SYNC_FAILED_ERROR_MESSAGE))),ot.trigger(i.A.UPDATE_TIME_SYNC_OFFSET,{offset:Ct}),ot.trigger(i.A.TIME_SYNCHRONIZATION_COMPLETED)}function gt(){if(F&&F.length!==0){var ft=F.reduce(function(Ct,Mt){return Ct+Mt},0)/F.length;vt(ft)?t.debug("Completed background UTC sync. Offset is within allowed threshold and is not adjusted."):(t.debug("Completed background UTC sync. Setting client - server offset to ".concat(ft)),w=ft,ot.trigger(i.A.UPDATE_TIME_SYNC_OFFSET,{offset:w})),l=!1,B=Date.now()}}function vt(ft){try{if(isNaN(w))return!0;var Ct=p.get().streaming.utcSynchronization.maximumAllowedDrift&&!isNaN(p.get().streaming.utcSynchronization.maximumAllowedDrift)?p.get().streaming.utcSynchronization.maximumAllowedDrift:100;return ft>=w-Ct&&ft<=w+Ct}catch{return!0}}return e={initialize:function(){Z(),C={"urn:mpeg:dash:utc:http-head:2014":$,"urn:mpeg:dash:utc:http-xsdate:2014":P.bind(null,L),"urn:mpeg:dash:utc:http-iso:2014":P.bind(null,R),"urn:mpeg:dash:utc:direct:2014":ut,"urn:mpeg:dash:utc:http-head:2012":$,"urn:mpeg:dash:utc:http-xsdate:2012":P.bind(null,L),"urn:mpeg:dash:utc:http-iso:2012":P.bind(null,R),"urn:mpeg:dash:utc:direct:2012":ut,"urn:mpeg:dash:utc:http-ntp:2014":dt,"urn:mpeg:dash:utc:ntp:2014":dt,"urn:mpeg:dash:utc:sntp:2014":dt}},attemptSync:function(ft,Ct){U=ft,o||(function(Mt){try{if(!Mt||!p.get().streaming.utcSynchronization.enabled)return!1;var Qt=isNaN(k)?30:k;return!(H&&Qt&&!isNaN(Qt))||(Date.now()-H)/1e3>=Qt}catch{return!0}}(Ct)?(o=!0,f()):ot.trigger(i.A.TIME_SYNCHRONIZATION_COMPLETED))},setConfig:function(ft){ft&&(ft.dashMetrics&&(b=ft.dashMetrics),ft.baseURLController&&(it=ft.baseURLController),ft.errHandler&&(st=ft.errHandler),ft.settings&&(p=ft.settings))},reset:function(){Z(),ot.off(i.A.ATTEMPT_BACKGROUND_SYNC,K,e)}},t=(0,g.A)(ht).getInstance().getLogger(e),ot.on(i.A.ATTEMPT_BACKGROUND_SYNC,K,e),e}qi.__dashjs_factory_name="TimeSyncController";var Yi=h.A.getSingletonFactory(qi);Yi.HTTP_TIMEOUT_MS=5e3,h.A.updateSingletonFactory(qi.__dashjs_factory_name,Yi);var Xo=Yi;function Ta(){var e,t,o,l,p,C=this.context,b=(0,y.A)(C).getInstance();return e={attachMediaSource:function(F){var U=window.URL.createObjectURL(t);return F.setSource(U),l==="managedMediaSource"&&(F.setDisableRemotePlayback(!0),t.addEventListener("startstreaming",function(){b.trigger(r.A.MANAGED_MEDIA_SOURCE_START_STREAMING)}),t.addEventListener("endstreaming",function(){b.trigger(r.A.MANAGED_MEDIA_SOURCE_END_STREAMING)})),U},createMediaSource:function(){var F="WebKitMediaSource"in window,U="MediaSource"in window;return"ManagedMediaSource"in window?(t=new ManagedMediaSource,l="managedMediaSource",p.info("Created ManagedMediaSource")):U?(t=new MediaSource,l="mediaSource",p.info("Created MediaSource")):F&&(t=new WebKitMediaSource,p.info("Created WebkitMediaSource")),t},detachMediaSource:function(F){F.setSource(null)},setConfig:function(F){F&&F.settings&&(o=F.settings)},setDuration:function F(U){t&&t.readyState==="open"&&(U===null&&isNaN(U)||t.duration!==U&&(U!==1/0||o.get().streaming.buffer.mediaSourceDurationInfinity||(U=Math.pow(2,32)),function(H){for(var B=H.sourceBuffers,w=0;w<B.length;w++)if(B[w].updating)return!0;return!1}(t)?setTimeout(F.bind(null,U),50):(p.info("Set MediaSource duration:"+U),t.duration=U)))},setSeekable:function(F,U){t&&typeof t.setLiveSeekableRange=="function"&&typeof t.clearLiveSeekableRange=="function"&&t.readyState==="open"&&F>=0&&F<U&&(t.clearLiveSeekableRange(),t.setLiveSeekableRange(F,U))},signalEndOfStream:function(F){if(F&&F.readyState==="open"){for(var U=F.sourceBuffers,H=0;H<U.length;H++)if(U[H].updating||U[H].buffered.length===0)return;p.info("call to mediaSource endOfStream"),F.endOfStream()}}},p=(0,g.A)(C).getInstance().getLogger(e),e}Ta.__dashjs_factory_name="MediaSourceController";var Qo=h.A.getSingletonFactory(Ta);function ba(){var e,t,o,l,p,C,b,F,U,H,B,w="urn:mpeg:dash:event:2012",j=1,k="urn:mpeg:dash:event:callback:2015",st=1,it=300,ht="discarded",ot="updated",et="added",Z=this.context,K=(0,y.A)(Z).getInstance();function z(){if(!b||!F)throw new Error("setConfig function has to be called previously")}function f(){B=!1,o={},l={},p=null,H=!1,C=Date.now()/1e3}function N(){try{if(!H){H=!0;var Y=F.getTime(),gt=Y-C;gt=C>0?Math.max(0,gt):0,S(l,gt,Y),S(o,gt,Y),L(l),L(o),C=Y,H=!1}}catch(vt){H=!1,t.error(vt)}}function S(Y,gt,vt){try{ut(Y,function(ft){if(ft!==void 0){var Ct=isNaN(ft.duration)?0:ft.duration;ft.calculatedPresentationTime<=vt&&ft.calculatedPresentationTime+gt+Ct>=vt?$(ft,r.A.EVENT_MODE_ON_START):(P(vt,Ct+gt,ft.calculatedPresentationTime)||function(Mt){try{var Qt=Mt.eventStream.period.start+Mt.eventStream.period.duration;return Mt.calculatedPresentationTime>Qt}catch($t){return t.error($t),!1}}(ft))&&(t.debug("Removing event ".concat(ft.id," from period ").concat(ft.eventStream.period.id," as it is expired or invalid")),function(Mt,Qt){try{var $t=Qt.eventStream.schemeIdUri,Zt=Qt.eventStream.period.id,ae=Qt.eventStream.value,Ne=Qt.id;Mt[Zt][$t]=Mt[Zt][$t].filter(function(Et){return ae&&Et.eventStream.value&&Et.eventStream.value!==ae||Et.id!==Ne}),Mt[Zt][$t].length===0&&delete Mt[Zt][$t]}catch(Et){t.error(Et)}}(Y,ft))}})}catch(ft){t.error(ft)}}function L(Y){try{for(var gt in Y)Y.hasOwnProperty(gt)&&Object.keys(Y[gt]).length===0&&delete Y[gt]}catch(vt){t.error(vt)}}function R(Y,gt){var vt=arguments.length>2&&arguments[2]!==void 0&&arguments[2],ft=Y.eventStream.schemeIdUri,Ct=Y.eventStream.value,Mt=Y.id,Qt=ht;gt[ft]||(gt[ft]=[]);var $t=gt[ft].findIndex(function(ae){return(!Ct||ae.eventStream.value&&ae.eventStream.value===Ct)&&ae.id===Mt});if($t===-1)gt[ft].push(Y),Y.triggeredReceivedEvent=!1,Y.triggeredStartEvent=!1,Qt=et;else if(vt){var Zt=gt[ft][$t];Y.triggeredReceivedEvent=Zt.triggeredReceivedEvent,Y.triggeredStartEvent=Zt.triggeredStartEvent,gt[ft][$t]=Y,Qt=ot}return Qt}function V(Y){try{if(Y.eventStream.value==j){var gt,vt=Y.calculatedPresentationTime;gt=Y.calculatedPresentationTime==4294967295?NaN:Y.calculatedPresentationTime+Y.duration,K.trigger(r.A.MANIFEST_VALIDITY_CHANGED,{id:Y.id,validUntil:vt,newDuration:gt,newManifestValidAfter:NaN},{mode:r.A.EVENT_MODE_ON_START})}}catch(ft){t.error(ft)}}function dt(Y){try{var gt=F.getTime();ut(Y,function(vt){var ft=vt.eventStream&&vt.eventStream.period&&!isNaN(vt.eventStream.period.duration)?vt.eventStream.period.duration:NaN,Ct=vt.eventStream&&vt.eventStream.period&&!isNaN(vt.eventStream.period.start)?vt.eventStream.period.start:NaN;if(!isNaN(ft)&&!isNaN(Ct)){var Mt=vt.calculatedPresentationTime;Math.abs(Mt-gt)<it&&$(vt,r.A.EVENT_MODE_ON_START)}})}catch(vt){t.error(vt)}}function ut(Y,gt){try{if(Y)for(var vt=Object.keys(Y),ft=0;ft<vt.length;ft++)for(var Ct=Y[vt[ft]],Mt=Object.keys(Ct),Qt=0;Qt<Mt.length;Qt++)Ct[Mt[Qt]].forEach(function($t){$t!==void 0&>($t)})}catch($t){t.error($t)}}function P(Y,gt,vt){try{return Y-gt>vt}catch(ft){return t.error(ft),!1}}function $(Y,gt){try{var vt=F.getTime(),ft=Y.id;if(gt===r.A.EVENT_MODE_ON_RECEIVE&&!Y.triggeredReceivedEvent)return t.debug("Received event ".concat(ft)),Y.triggeredReceivedEvent=!0,void K.trigger(Y.eventStream.schemeIdUri,{event:Y},{mode:gt});Y.triggeredStartEvent||(Y.eventStream.schemeIdUri===w&&Y.eventStream.value==j?Y.duration===0&&Y.presentationTimeDelta===0||(t.debug("Starting manifest refresh event ".concat(ft," at ").concat(vt)),function(){try{z(),b.refreshManifest()}catch(Ct){t.error(Ct)}}()):Y.eventStream.schemeIdUri===k&&Y.eventStream.value==st?(t.debug("Starting callback event ".concat(ft," at ").concat(vt)),function(Ct){try{(0,Qe.A)(Z).create({}).load({method:"get",url:Ct,request:{responseType:"arraybuffer"}})}catch(Mt){t.error(Mt)}}(Y.messageData)):(t.debug("Starting event ".concat(ft," from period ").concat(Y.eventStream.period.id," at ").concat(vt)),K.trigger(Y.eventStream.schemeIdUri,{event:Y},{mode:gt})),Y.triggeredStartEvent=!0)}catch(Ct){t.error(Ct)}}return e={addInlineEvents:function(Y,gt){try{if(z(),o[gt]||(o[gt]={}),Y)for(var vt=0;vt<Y.length;vt++){var ft=Y[vt];if(!P(F.getTime(),isNaN(ft.duration)?0:ft.duration,ft.calculatedPresentationTime)){var Ct=R(ft,o[gt],!0);Ct===et?(t.debug("Added inline event with id ".concat(ft.id," from period ").concat(gt)),$(ft,r.A.EVENT_MODE_ON_RECEIVE)):Ct===ot&&t.debug("Updated inline event with id ".concat(ft.id," from period ").concat(gt))}}}catch(Mt){throw Mt}},addInbandEvents:function(Y,gt){try{z(),l[gt]||(l[gt]={});for(var vt=0;vt<Y.length;vt++){var ft=Y[vt];P(F.getTime(),isNaN(ft.duration)?0:ft.duration,ft.calculatedPresentationTime)||(R(ft,l[gt],!1)===et?(ft.eventStream.schemeIdUri===w&&V(ft),t.debug("Added inband event with id ".concat(ft.id," from period ").concat(gt)),$(ft,r.A.EVENT_MODE_ON_RECEIVE)):t.debug("Inband event with scheme_id_uri ".concat(ft.eventStream.schemeIdUri,", value ").concat(ft.eventStream.value,", period id ").concat(gt," and event id ").concat(ft.id," was ignored because it has been added before.")))}N()}catch(Ct){throw Ct}},getInbandEvents:function(){return l},getInlineEvents:function(){return o},start:function(){try{z(),t.debug("Start Event Controller");var Y=U.get().streaming.eventControllerRefreshDelay;B||isNaN(Y)||(B=!0,p=setInterval(N,Y))}catch(gt){throw gt}},setConfig:function(Y){try{if(!Y)return;Y.manifestUpdater&&(b=Y.manifestUpdater),Y.playbackController&&(F=Y.playbackController),Y.settings&&(U=Y.settings)}catch(gt){throw gt}},reset:function(){(function(){try{p!==null&&B&&(clearInterval(p),p=null,B=!1,function(){try{dt(l),dt(o)}catch(Y){t.error(Y)}}())}catch(Y){throw Y}})(),f()}},t=(0,g.A)(Z).getInstance().getLogger(e),f(),e}ba.__dashjs_factory_name="EventController";var $o=h.A.getSingletonFactory(ba),Pr={LEVELS:{SUGGESTION:"Suggestion",WARNING:"Warning",ERROR:"Error"},EVENTS:{NO_UTC_TIMING_ELEMENT:{key:"NO_UTC_TIMING_ELEMENT",message:"No UTCTiming element is present in the manifest. You may experience playback failures. For a detailed validation use https://conformance.dashif.org/"},NON_COMPLIANT_SMPTE_IMAGE_ATTRIBUTE:{key:"NON_COMPLIANT_SMPTE_IMAGE_ATTRIBUTE",message:'SMPTE 2052-1:2013 defines the attribute name as "imageType" and does not define "imagetype"'},INVALID_DVR_WINDOW:{key:"INVALID_DVR_WINDOW",message:"No valid segment found when applying a specification compliant DVR window calculation. Using SegmentTimeline entries as a fallback."}}};function Hi(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 Sa(){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,R,V,dt,ut,P,$,Y,gt,vt,ft,Ct,Mt,Qt,$t,Zt,ae,Ne,Et,Pt,ce,Kt,ye,he=this.context,de=(0,y.A)(he).getInstance();function qe(){if(!(C&&C.hasOwnProperty("load")&&K&&K.hasOwnProperty("initialize")&&K.hasOwnProperty("reset")&&K.hasOwnProperty("getClientTimeOffset")&&b&&Z&&U&&Y))throw new Error(u.A.MISSING_CONFIG_ERROR)}function Ye(){(function(){try{var zt=F.getStreamsInfo();if(!f&&zt.length===0)throw new Error("There are no periods in the MPD");f&&zt.length>0&&U.updateManifestUpdateInfo({currentTime:Y.getTime(),buffered:$.getBufferRange(),presentationStartTime:zt[0].start,clientTimeOffset:K.getClientTimeOffset()}),z.length>0&&function(gn){gn.length!==0?z=z.filter(function(cn){var Dn=gn.filter(function(wn){return wn.id===cn.getId()}).length>0||cn.getId()===f.getId();return Dn||(t.debug("Removing stream ".concat(cn.getId())),cn.reset(!0)),Dn}):t.warn("No periods included in the current manifest. Skipping the filtering of outdated stream objects.")}(zt);for(var Ce=[],Je=0,on=zt.length;Je<on;Je++){var mn=zt[Je];Ce.push(ln(mn)),U.addManifestUpdateStreamInfo(mn)}Promise.all(Ce).then(function(){return new Promise(function(gn,cn){f?gn():kt(zt,gn,cn)})}).then(function(){de.trigger(i.A.STREAMS_COMPOSED),je()}).catch(function(gn){throw gn})}catch(gn){Z.error(new pt.A(mt.MANIFEST_ERROR_ID_NOSTREAMS_CODE,gn.message+" nostreamscomposed",b.getValue())),ut=!0,wr()}})()}function sn(){Pt=!0}function ln(zt){var Ce=si(zt.id);return Ce?Ce.updateData(zt):(Ce=Mr(he).create({manifestModel:b,mediaPlayerModel:vt,dashMetrics:U,manifestUpdater:p,adapter:F,timelineConverter:K,capabilities:o,capabilitiesFilter:l,errHandler:Z,baseURLController:j,segmentBaseController:k,textController:S,abrController:it,playbackController:Y,eventController:ot,mediaController:ht,protectionController:N,videoModel:$,streamInfo:zt,settings:Et}),z.push(Ce),Ce.initialize(),Promise.resolve())}function kt(zt,Ce,Je){try{se();var on=U.getCurrentDVRInfo().range;if(on.end<on.start){ce&&clearTimeout(ce);var mn=Math.min(1e3*(-1*(on.end-on.start)+2),2147483647);return t.debug("Waiting for ".concat(mn," ms before playback can start")),de.trigger(i.A.AST_IN_FUTURE,{delay:mn}),void(ce=setTimeout(function(){kt(zt,Ce,Je)},mn))}Et.get().streaming.applyProducerReferenceTime&>.calculateProducerReferenceTimeOffsets(zt);var gn=zt[0].manifestInfo;if(Et.get().streaming.applyServiceDescription&>.applyServiceDescription(gn),F.getIsDynamic()){var cn=ir(zt,gn);Y.computeAndSetLiveDelay(cn,gn)}(Et.get().streaming.applyContentSteering&&w.shouldQueryBeforeStart()?w.loadSteeringData():Promise.resolve()).then(function(){var Dn=b.getValue();Dn&&j.update(Dn),ue(),Ce()}).catch(function(Dn){t.error(Dn),ue(),Ce()})}catch(Dn){Je(Dn)}}function ue(){var zt=function(){var on;if(F.getIsDynamic()){var mn=U.getCurrentDVRInfo();on=(mn&&mn.range?mn.range.end:0)-Y.getOriginalLiveDelay();var gn=mn?mn.range:null;if(gn){if(isNaN(Kt)&&Kt.toString().indexOf("posix:")===-1){var cn=Pn(!0);isNaN(cn)||(t.info("Start time from URI parameters: ".concat(cn)),on=Math.min(on,cn))}else{t.info("Start time provided by the app: ".concat(Kt));var Dn=Zn(!0,Kt);isNaN(Dn)||(on=Math.min(on,Dn))}var wn=Et.get().streaming.timeShiftBuffer.calcFromSegmentTimeline?.1:0;on=Math.max(on,gn.start+wn)}}else if(on=Pi()[0].getStreamInfo().start,isNaN(Kt)){var or=Pn(!1);isNaN(or)||(t.info("Start time from URI parameters: ".concat(or)),on=Math.max(on,or))}else{t.info("Start time provided by the app: ".concat(Kt));var Vo=Zn(!1,Kt);isNaN(Vo)||(on=Math.max(on,Vo))}return on}(),Ce=Ft(zt),Je=Ce!==null?Ce:z[0];de.trigger(i.A.INITIAL_STREAM_SWITCH,{startTime:zt}),ee(Je,null,zt),$t||($t=setInterval(function(){!V&&Y.getTimeToStreamEnd()<=0&&!Y.isSeeking()&&de.trigger(i.A.PLAYBACK_ENDED,{isLast:_r().isLast})},200))}function ee(zt,Ce,Je){try{if(V||!zt||Ce===zt&&zt.getIsActive())return;V=!0,de.trigger(i.A.PERIOD_SWITCH_STARTED,{fromStreamInfo:Ce?Ce.getStreamInfo():null,toStreamInfo:zt.getStreamInfo()});var on=!1;f=zt,Ce&&(on=pe(zt,Ce),Ce.deactivate(on)),Je=isNaN(Je)?!on&&Ce?zt.getStreamInfo().start:NaN:Je,t.info("Switch to stream ".concat(zt.getId(),". Seektime is ").concat(Je,", current playback time is ").concat(Y.getTime(),". Seamless period switch is set to ").concat(on)),ae=ae.filter(function(mn){return mn.getId()!==f.getId()}),Y.initialize(_r(),!!Ce),$.getElement()?ge(Je,on,!1):De(Je,on)}catch{V=!1}}function ge(zt,Ce){var Je,on=arguments.length>2&&arguments[2]!==void 0&&arguments[2];function mn(){if(P&&P.readyState==="open"){t.debug("MediaSource is open!"),window.URL.revokeObjectURL(Je),P.removeEventListener("sourceopen",mn),P.removeEventListener("webkitsourceopen",mn),jn();var cn=U.getCurrentDVRInfo();H.setSeekable(cn.range.start,cn.range.end),on?(isNaN(zt)||Y.seek(zt,!0,!0),f.setMediaSource(P).then(function(){f.initializeForTextWithMediaSource(P)})):De(zt,Ce)}}function gn(){P.addEventListener("sourceopen",mn,!1),P.addEventListener("webkitsourceopen",mn,!1),Je=H.attachMediaSource($),t.debug("MediaSource attached to element. Waiting on open...")}P?Ce?De(zt,Ce):(H.detachMediaSource($),gn()):(P=H.createMediaSource(),gn())}function De(zt,Ce){f.activate(P,Ce?Zt:void 0,zt).then(function(Je){if(Je){var on=Object.keys(Je);on.length>0&&Je[on[0]].getBuffer().changeType&&(Ne=!0),Zt=Je}isNaN(zt)||(de.trigger(i.A.SEEK_TARGET,{time:zt},{streamId:f.getId()}),Y.seek(zt,!1,!0),f.startScheduleControllers()),V=!1,de.trigger(i.A.PERIOD_SWITCH_COMPLETED,{toStreamInfo:_r()})})}function Ve(zt){var Ce=Ft(zt.seekTime);Ce&&Ce!==f?Ce&&Ce!==f&&(Ge(),function(Je,on){var mn=Je&&!isNaN(Je.seekTime)?Je.seekTime:NaN,gn=f.getProcessors().map(function(cn){return cn.prepareOuterPeriodPlaybackSeeking(Je)});Promise.all(gn).then(function(){ee(on,f,mn)}).catch(function(cn){Z.error(cn)})}(zt,Ce)):(Ge(),function(Je){f.getProcessors().forEach(function(on){return on.prepareInnerPeriodPlaybackSeeking(Je)}),fr(Vt.USER_REQUEST_STOP_REASON)}(zt)),dr(Yt.SEEK_START_REASON)}function Ge(){Ke()}function Ke(){ae&&ae.length>0&&(ae.forEach(function(zt){zt.deactivate(!0)}),ae=[])}function Ze(zt){if(zt.newMediaInfo.streamInfo.id===f.getId()){if(Ke(),Et.get().streaming.buffer.resetSourceBuffersForTrackSwitch&&zt.oldMediaInfo&&zt.oldMediaInfo.codec!==zt.newMediaInfo.codec){var Ce=Y.getTime();return f.deactivate(!1),void ge(Ce,!1,!1)}f.prepareTrackChange(zt)}}function pe(zt,Ce){try{return Et.get().streaming.buffer.reuseExistingSourceBuffers&&(Ce.isProtectionCompatible(zt)||Pt)&&(Ne&&Et.get().streaming.buffer.useChangeTypeForTrackSwitch||Ce.isMediaCodecCompatible(zt,Ce))}catch{return!1}}function Oe(zt){var Ce=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;P&&!zt.getPreloaded()&&pe(zt,Ce)&&zt.startPreloading(P,Zt).then(function(){ae.push(zt)})}function Ft(zt){if(isNaN(zt))return null;for(var Ce=z.length,Je=0;Je<Ce;Je++){var on=z[Je];if(zt<parseFloat((on.getStartTime()+on.getDuration()).toFixed(5)))return on}return null}function se(){try{var zt=F.getIsDynamic(),Ce=F.getStreamsInfo()[0].manifestInfo,Je=Y.getTime(),on=K.calcTimeShiftBufferWindow(z,zt),mn=En();if(on.start===void 0||on.end===void 0)return;mn&&mn.length!==0?mn.forEach(function(gn){U.addDVRInfo(gn.getType(),Je,Ce,on)}):U.addDVRInfo(u.A.VIDEO,Je,Ce,on)}catch{}}function xt(zt){if(Mt&&R){var Ce=vt.getInitialBufferLevel(),Je=[u.A.TEXT];(isNaN(Ce)||Ce<=Y.getBufferLevel(Je)||F.getIsDynamic()&&Ce>Y.getLiveDelay())&&(Mt=!1,dr(Yt.INITIAL_PLAYOUT_START_REASON),Y.play())}zt&&zt.mediaType&&U.addBufferLevel(zt.mediaType,new Date,1e3*zt.bufferLevel)}function Gt(zt){zt.streamInfo.id===f.getId()&&zt.reason&&zt.reason.forceReplace&&Ke(),si(zt.streamInfo.id).prepareQualityChange(zt)}function le(){if(F.getIsDynamic()&&Y.getOriginalLiveDelay()!==0&&f){var zt=F.getStreamsInfo();if(zt.length>0){var Ce=zt[0].manifestInfo,Je=ir(zt,Ce);Y.computeAndSetLiveDelay(Je,Ce)}}}function yt(){if(tr()){var zt=$.getPlaybackQuality();zt&&U.addDroppedFrames(zt)}}function Tt(){t.debug("[onPlaybackStarted]"),!Mt&&Ct&&dr(Yt.RESUME_FROM_PAUSE_START_REASON),Mt&&(Mt=!1),Qt&&(Qt=!1,Et.get().streaming.applyContentSteering&&!w.shouldQueryBeforeStart()&&w.loadSteeringData()),Ct=!1}function Wt(zt){t.debug("[onPlaybackPaused]"),zt.ended||(Ct=!0,fr(Vt.USER_REQUEST_STOP_REASON))}function we(zt){t.debug("Stream with id ".concat(zt.streamInfo.id," finished buffering"));var Ce=zt.streamInfo.isLast;P&&Ce?(t.info("[onStreamBufferingCompleted] calls signalEndOfStream of mediaSourceController."),H.signalEndOfStream(P)):je()}function je(){if(f&&f.getHasFinishedBuffering())for(var zt=function(){var mn=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null;try{var gn=mn||f||null;if(gn){var cn=gn.getStreamInfo();return z.filter(function(Dn){var wn=Dn.getStreamInfo();return wn.start>cn.start&&cn.id!==wn.id})}}catch{return[]}}(f),Ce=0;Ce<zt.length;){var Je=zt[Ce],on=Ce===0?f:zt[Ce-1];!Je.getPreloaded()&&on.getHasFinishedBuffering()&&P&&Oe(Je,on),Ce+=1}}function hn(){$t&&(clearInterval($t),$t=null)}function En(){return f?f.getProcessors():[]}function dn(zt){if(f&&!f.getIsEndedEventSignaled()){f.setIsEndedEventSignaled(!0);var Ce=function(){var Je=(arguments.length>0&&arguments[0]!==void 0?arguments[0]:null)||f||null;if(!Je)return null;for(var on=Je.getStreamInfo(),mn=on.start,gn=0,cn=-1,Dn=NaN;gn<z.length;){var wn=z[gn].getStreamInfo(),or=wn.start-mn;or>0&&(isNaN(Dn)||or<Dn)&&on.id!==wn.id&&(Dn=or,cn=gn),gn+=1}return cn>=0?z[cn]:null}();Ce?(t.debug("StreamController onEnded, found next stream with id ".concat(Ce.getStreamInfo().id,". Switching from ").concat(f.getStreamInfo().id," to ").concat(Ce.getStreamInfo().id)),ee(Ce,f,NaN)):(t.debug("StreamController no next stream found"),f.setIsEndedEventSignaled(!1)),fr(Ce?Vt.END_OF_PERIOD_STOP_REASON:Vt.END_OF_CONTENT_STOP_REASON)}zt&&zt.isLast&&(hn(),w.stopSteeringRequestTimer())}function jn(zt){var Ce=zt||_r().manifestInfo.duration;H.setDuration(Ce)}function Pn(zt){var Ce=st.getURIFragmentData();if(!Ce||!Ce.t)return NaN;var Je=Pi()[0].getStreamInfo().start;return Ce.t=Ce.t.split(",")[0],Ir(zt,Ce.t,Je)}function Zn(zt,Ce){var Je=0;return zt||(Je=Pi()[0].getStreamInfo().start),Ir(zt,Ce,Je)}function Ir(zt,Ce,Je){var on=F.getRegularPeriods()[0],mn=Ce.toString(),gn=mn.indexOf("posix:")!==-1?mn.substring(6)==="now"?Date.now()/1e3:parseFloat(mn.substring(6)):NaN;return zt&&!isNaN(gn)?K.calcPresentationTimeFromWallTime(new Date(1e3*gn),on):parseFloat(mn)+Je}function ir(zt,Ce){try{var Je=NaN;if(Ce&&!isNaN(Ce.maxFragmentDuration)&&isFinite(Ce.maxFragmentDuration))return Ce.maxFragmentDuration;if(zt&&zt.length===1){var on=zt[0],mn=[u.A.VIDEO,u.A.AUDIO,u.A.TEXT].reduce(function(cn,Dn){var wn=F.getMediaInfoForType(on,Dn);return wn&&wn.isFragmented!==!1&&cn.push(wn),cn},[]).reduce(function(cn,Dn){var wn=F.getVoRepresentations(Dn);return wn&&wn.length>0&&wn.forEach(function(or){or&&cn.push(or)}),cn},[]).reduce(function(cn,Dn){var wn=F.convertRepresentationToRepresentationInfo(Dn);return wn&&wn.fragmentDuration&&!isNaN(wn.fragmentDuration)&&cn.push(wn.fragmentDuration),cn},[]);Je=Math.max.apply(Math,function(cn){if(Array.isArray(cn))return Hi(cn)}(gn=mn)||function(cn){if(typeof Symbol<"u"&&cn[Symbol.iterator]!=null||cn["@@iterator"]!=null)return Array.from(cn)}(gn)||function(cn,Dn){if(cn){if(typeof cn=="string")return Hi(cn,Dn);var wn={}.toString.call(cn).slice(8,-1);return wn==="Object"&&cn.constructor&&(wn=cn.constructor.name),wn==="Map"||wn==="Set"?Array.from(cn):wn==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(wn)?Hi(cn,Dn):void 0}}(gn)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
11
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}())}return isFinite(Je)?Je:NaN}catch{return NaN}var gn}function cr(zt){if(zt.error)ut=!0,wr();else{t.info("Manifest updated... updating data system wide.");var Ce=zt.manifest;F.updatePeriods(Ce);var Je=F.getUTCTimingSources();!F.getIsDynamic()||Je&&Je.length!==0||de.trigger(r.A.CONFORMANCE_VIOLATION,{level:Pr.LEVELS.WARNING,event:Pr.EVENTS.NO_UTC_TIMING_ELEMENT});var on=F.getIsDynamic()?Je.concat(ft.getUTCTimingSources()):Je;l.filterUnsupportedFeatures(Ce).then(function(){j.initialize(Ce),B.attemptSync(on,F.getIsDynamic())})}}function tr(){return!!f&&f.getHasVideoTrack()}function Rr(){return!!f&&f.getHasAudioTrack()}function fr(zt,Ce){Ce=Ce||new Date,En().forEach(function(Je){Je.finalisePlayList(Ce,zt)}),U.addPlayList()}function dr(zt){U.createPlaylistMetrics(1e3*Y.getTime(),zt)}function Oi(zt){if(zt.error){var Ce="";switch(zt.error.code){case 1:Ce="MEDIA_ERR_ABORTED";break;case 2:Ce="MEDIA_ERR_NETWORK";break;case 3:Ce="MEDIA_ERR_DECODE",ye.counts.mediaErrorDecode+=1;break;case 4:Ce="MEDIA_ERR_SRC_NOT_SUPPORTED";break;case 5:Ce="MEDIA_ERR_ENCRYPTED";break;default:Ce="UNKNOWN"}Ce==="MEDIA_ERR_DECODE"&&Et.get().errors.recoverAttempts.mediaErrorDecode>=ye.counts.mediaErrorDecode?function(){t.warn("A MEDIA_ERR_DECODE occured: Resetting the MediaSource");var Je=Y.getTime();f.deactivate(!1),t.warn("MediaSource has been resetted. Resuming playback from time ".concat(Je)),ge(Je,!1,!1)}():(dt=!0,zt.error.message&&(Ce+=" ("+zt.error.message+")"),zt.error.msExtendedCode&&(Ce+=" (0x"+(zt.error.msExtendedCode>>>0).toString(16).toUpperCase()+")"),t.fatal("Video Element Error: "+Ce),zt.error&&t.fatal(zt.error),Z.error(new pt.A(zt.error.code,Ce)),wr())}}function _r(){return f?f.getStreamInfo():null}function si(zt){for(var Ce=0,Je=z.length;Ce<Je;Ce++)if(z[Ce].getId()===zt)return z[Ce];return null}function Br(zt){isNaN(zt.newDuration)||jn(zt.newDuration)}function Mi(){z=[],Kt=NaN,N=null,V=!1,f=null,dt=!1,ut=!1,Mt=!0,Qt=!0,Ct=!1,R=!0,$t=null,Pt=!1,Ne=!1,ae=[],ce=null,ye={counts:{mediaErrorDecode:0}}}function wr(){qe(),B.reset(),fr(dt||ut?Vt.FAILURE_STOP_REASON:Vt.USER_REQUEST_STOP_REASON);for(var zt=0,Ce=z?z.length:0;zt<Ce;zt++)z[zt].reset(dt);de.off(r.A.PLAYBACK_TIME_UPDATED,yt,e),de.off(r.A.PLAYBACK_SEEKING,Ve,e),de.off(r.A.PLAYBACK_ERROR,Oi,e),de.off(r.A.PLAYBACK_STARTED,Tt,e),de.off(r.A.PLAYBACK_PAUSED,Wt,e),de.off(r.A.PLAYBACK_ENDED,dn,e),de.off(r.A.METRIC_ADDED,ma,e),de.off(r.A.MANIFEST_VALIDITY_CHANGED,Br,e),de.off(r.A.BUFFER_LEVEL_UPDATED,xt,e),de.off(r.A.QUALITY_CHANGE_REQUESTED,Gt,e),i.A.KEY_SESSION_UPDATED&&de.off(i.A.KEY_SESSION_UPDATED,sn,e),de.off(i.A.MANIFEST_UPDATED,cr,e),de.off(i.A.STREAM_BUFFERING_COMPLETED,we,e),de.off(i.A.TIME_SYNCHRONIZATION_COMPLETED,Ye,e),de.off(i.A.CURRENT_TRACK_CHANGED,Ze,e),de.off(i.A.SETTING_UPDATED_LIVE_DELAY,le,e),de.off(i.A.SETTING_UPDATED_LIVE_DELAY_FRAGMENT_COUNT,le,e),j.reset(),p.reset(),ot.reset(),U.clearAllCurrentMetrics(),b.setValue(null),C.reset(),K.reset(),et.reset(),P&&(H.detachMediaSource($),P=null),$=null,N&&(N=null,L=null,b.getValue()&&de.trigger(i.A.PROTECTION_DESTROYED,{data:b.getValue().url})),hn(),de.trigger(i.A.STREAM_TEARDOWN_COMPLETE),Mi()}function ma(zt){if(zt.metric===_.A.DVR_INFO){var Ce=Rr()?u.A.AUDIO:u.A.VIDEO;zt.mediaType===Ce&&H.setSeekable(zt.value.range.start,zt.value.range.end)}}function Pi(){return z}return e={initialize:function(zt,Ce){qe(),R=zt,L=Ce,K.initialize(),(p=va(he).create()).setConfig({manifestModel:b,adapter:F,manifestLoader:C,errHandler:Z,settings:Et,contentSteeringController:w}),p.initialize(),(ot=$o(he).getInstance()).setConfig({manifestUpdater:p,playbackController:Y,settings:Et}),ot.start(),B.setConfig({dashMetrics:U,baseURLController:j,errHandler:Z,settings:Et}),B.initialize(),H.setConfig({settings:Et}),N&&(de.trigger(i.A.PROTECTION_CREATED,{controller:N}),N.setMediaElement($.getElement()),L&&N.setProtectionData(L)),de.on(r.A.PLAYBACK_TIME_UPDATED,yt,e),de.on(r.A.PLAYBACK_SEEKING,Ve,e),de.on(r.A.PLAYBACK_ERROR,Oi,e),de.on(r.A.PLAYBACK_STARTED,Tt,e),de.on(r.A.PLAYBACK_PAUSED,Wt,e),de.on(r.A.PLAYBACK_ENDED,dn,e),de.on(r.A.METRIC_ADDED,ma,e),de.on(r.A.MANIFEST_VALIDITY_CHANGED,Br,e),de.on(r.A.BUFFER_LEVEL_UPDATED,xt,e),de.on(r.A.QUALITY_CHANGE_REQUESTED,Gt,e),i.A.KEY_SESSION_UPDATED&&de.on(i.A.KEY_SESSION_UPDATED,sn,e),de.on(i.A.MANIFEST_UPDATED,cr,e),de.on(i.A.STREAM_BUFFERING_COMPLETED,we,e),de.on(i.A.TIME_SYNCHRONIZATION_COMPLETED,Ye,e),de.on(i.A.CURRENT_TRACK_CHANGED,Ze,e),de.on(i.A.SETTING_UPDATED_LIVE_DELAY,le,e),de.on(i.A.SETTING_UPDATED_LIVE_DELAY_FRAGMENT_COUNT,le,e)},getActiveStreamInfo:_r,addDVRMetric:se,hasVideoTrack:tr,hasAudioTrack:Rr,getStreamById:si,getStreamForTime:Ft,getTimeRelativeToStreamId:function(zt,Ce){for(var Je=null,on=0,mn=0,gn=null,cn=0;cn<z.length;cn++){if(mn=(Je=z[cn]).getStartTime(),gn=Je.getDuration(),Number.isFinite(mn)&&(on=mn),Je.getId()===Ce)return zt-on;Number.isFinite(gn)&&(on+=gn)}return null},load:function(zt){var Ce=arguments.length>1&&arguments[1]!==void 0?arguments[1]:NaN;qe(),Kt=Ce,C.load(zt)},loadWithManifest:function(zt){var Ce=arguments.length>1&&arguments[1]!==void 0?arguments[1]:NaN;(function(){if(!p||!p.hasOwnProperty("setManifest"))throw new Error("initialize function has to be called previously")})(),Kt=Ce,p.setManifest(zt)},getActiveStreamProcessors:En,setConfig:function(zt){zt&&(zt.capabilities&&(o=zt.capabilities),zt.capabilitiesFilter&&(l=zt.capabilitiesFilter),zt.manifestLoader&&(C=zt.manifestLoader),zt.manifestModel&&(b=zt.manifestModel),zt.mediaPlayerModel&&(vt=zt.mediaPlayerModel),zt.customParametersModel&&(ft=zt.customParametersModel),zt.protectionController&&(N=zt.protectionController),zt.adapter&&(F=zt.adapter),zt.dashMetrics&&(U=zt.dashMetrics),zt.errHandler&&(Z=zt.errHandler),zt.timelineConverter&&(K=zt.timelineConverter),zt.videoModel&&($=zt.videoModel),zt.playbackController&&(Y=zt.playbackController),zt.serviceDescriptionController&&(gt=zt.serviceDescriptionController),zt.contentSteeringController&&(w=zt.contentSteeringController),zt.textController&&(S=zt.textController),zt.abrController&&(it=zt.abrController),zt.mediaController&&(ht=zt.mediaController),zt.settings&&(Et=zt.settings),zt.baseURLController&&(j=zt.baseURLController),zt.uriFragmentModel&&(st=zt.uriFragmentModel),zt.segmentBaseController&&(k=zt.segmentBaseController),zt.manifestUpdater&&(p=zt.manifestUpdater))},setProtectionData:function(zt){L=zt,N&&N.setProtectionData(L)},getIsStreamSwitchInProgress:function(){return V},switchToVideoElement:function(zt){f&&(Y.initialize(_r()),ge(zt,!1,!0))},getHasMediaOrInitialisationError:function(){return dt||ut},getStreams:Pi,getActiveStream:function(){return f},getInitialPlayback:function(){return Mt},getAutoPlay:function(){return R},refreshManifest:function(){p.getIsUpdating()||p.refreshManifest()},reset:wr},t=(0,g.A)(he).getInstance().getLogger(e),B=Xo(he).getInstance(),H=Qo(he).getInstance(),et=Ot(he).getInstance(),Mi(),e}Sa.__dashjs_factory_name="StreamController";var Ia=h.A.getSingletonFactory(Sa);function Ra(){var e,t,o,l,p,C,b,F,U,H,B,w,j=this.context,k=(0,y.A)(j).getInstance();function st(){w.debug("Stopping the gap controller"),p&&(clearInterval(p),p=null),function(){k.off(i.A.WALLCLOCK_TIME_UPDATED,Z,this),k.off(i.A.INITIAL_STREAM_SWITCH,et,this),k.off(i.A.PLAYBACK_SEEKING,it,this),k.off(i.A.BUFFER_REPLACEMENT_STARTED,ht,e),k.off(i.A.TRACK_CHANGE_RENDERED,ot,e)}(),p=null,C=NaN,l=0,H=null,B={}}function it(){H&&(clearTimeout(H),H=null)}function ht(f){try{if(f.streamId!==F.getActiveStreamInfo().id||f.mediaType!==u.A.VIDEO&&f.mediaType!==u.A.AUDIO)return;f.streamId===F.getActiveStreamInfo().id&&(B[f.mediaType]=!0)}catch(N){w.error(N)}}function ot(f){f&&f.mediaType&&(B[f.mediaType]=!1)}function et(){p||function(){try{p||(w.debug("Starting the gap controller"),p=setInterval(function(){K()&&z(b.getTime())},100))}catch{}}()}function Z(){if(K(o.get().streaming.gaps.enableSeekFix)&&++l>=10){var f=b.getTime();t===f?z(f,!0):(t=f,C=NaN),l=0}}function K(){var f=arguments.length>0&&arguments[0]!==void 0&&arguments[0];if(!F.getActiveStream())return!1;var N,S,L=Object.keys(B).some(function(V){return B[V]}),R=!!f&&(N=F.getActiveStream(),S=parseFloat((N.getStartTime()+N.getDuration()).toFixed(5)),b.getTime()+o.get().streaming.gaps.threshold>=S);return!L&&o.get().streaming.gaps.jumpGaps&&F.getActiveStreamProcessors().length>0&&(!b.isSeeking()||R)&&!b.isPaused()&&!F.getIsStreamSwitchInProgress()&&!F.getHasMediaOrInitialisationError()}function z(f){var N,S=arguments.length>1&&arguments[1]!==void 0&&arguments[1],L=o.get().streaming.gaps.enableStallFix,R=o.get().streaming.gaps.stallSeek,V=o.get().streaming.gaps.smallGapLimit,dt=o.get().streaming.gaps.jumpLargeGaps,ut=U.getBufferRange(),P=NaN,$=!1;if(N=function(ae,Ne){try{if(!ae||ae.length<=1&&Ne>0)return NaN;for(var Et=NaN,Pt=0;isNaN(Et)&&Pt<ae.length;){var ce=Pt>0?ae.end(Pt-1):0;Ne<ae.start(Pt)&&ce-Ne<o.get().streaming.gaps.threshold&&(Et=Pt),Pt+=1}return Et}catch{return null}}(ut,f),!isNaN(N)){var Y=ut.start(N),gt=Y-f;gt>0&&(gt<=V||dt)&&(P=Y)}var vt=b.getTimeToStreamEnd();if(isNaN(P)&&S&&isFinite(vt)&&!isNaN(vt)&&vt<V&&(P=parseFloat(b.getStreamEndTime().toFixed(5)),$=!0),L&&isNaN(P)&&S&&isNaN(N)&&function(ae,Ne){for(var Et=0,Pt=ae.length;Et<Pt;Et++)if(Ne>=ae.start(Et)&&Ne<=ae.end(Et))return!0;return!1}(ut,f)&&(R===0?(w.warn("Toggle play pause to break stall"),U.pause(),U.play()):(w.warn("Jumping ".concat(R,"s to break stall")),P=f+R)),P>0&&C!==P&&P>f&&!H){var ft=P-f;if($){var Ct=F.getStreamForTime(P),Mt=Ct&&!!Ct.getPreloaded();w.warn("Jumping to end of stream because of gap from ".concat(f," to ").concat(P,". Gap duration: ").concat(ft)),b.seek(P,!0,Mt)}else{var Qt=b.getIsDynamic(),$t=N>0?ut.end(N-1):f,Zt=Qt?1e3*Math.max(0,ft-.1):0;H=window.setTimeout(function(){b.seek(P,!0,!0),w.warn("Jumping gap occuring in period ".concat(F.getActiveStream().getStreamId()," starting at ").concat($t," and ending at ").concat(P,". Jumping by: ").concat(P-$t)),H=null},Zt)}C=P}}return e={reset:st,setConfig:function(f){f&&(f.settings&&(o=f.settings),f.playbackController&&(b=f.playbackController),f.streamController&&(F=f.streamController),f.videoModel&&(U=f.videoModel))},initialize:function(){(function(){k.on(i.A.WALLCLOCK_TIME_UPDATED,Z,this),k.on(i.A.INITIAL_STREAM_SWITCH,et,this),k.on(i.A.PLAYBACK_SEEKING,it,this),k.on(i.A.BUFFER_REPLACEMENT_STARTED,ht,e),k.on(i.A.TRACK_CHANGE_RENDERED,ot,e)})()}},w=(0,g.A)(j).getInstance().getLogger(e),st(),e}Ra.__dashjs_factory_name="GapController";var Jo=h.A.getSingletonFactory(Ra);function wa(){var e,t,o,l,p,C,b,F,U,H,B=this.context,w=(0,y.A)(B).getInstance();function j(){t=!1;var z=Fe.A.parseUserAgent();o=z&&z.browser&&z.browser.name&&z.browser.name.toLowerCase()==="safari"}function k(){t=!1}function st(z){if(z.streamId===C.getActiveStreamInfo().id&&U){var f=b.getLiveDelay();b.getBufferLevel()>f/2&&(U=!1)}}function it(z){z.streamId===C.getActiveStreamInfo().id&&(U=z.state===_.A.BUFFER_EMPTY)}function ht(){F.getCatchupModeEnabled()||l.setPlaybackRate(1)}function ot(){b.getIsDynamic()&&F.getCatchupModeEnabled()&&(F.getCatchupPlaybackRates().max>0||F.getCatchupPlaybackRates().min<0)&&!b.isPaused()&&!b.isSeeking()&&function(){try{return!(!b.getTime()>0||t)&&(Z()===u.A.LIVE_CATCHUP_MODE_LOLP?function(z,f){try{return Math.abs(et())>0||z<f}catch{return!1}}(b.getBufferLevel(),p.get().streaming.liveCatchup.playbackBufferMin):function(){try{return Math.abs(et())>0}catch{return!1}}())}catch{return!1}}()&&function(){if(!t&&l){var z,f=l.getPlaybackRate(),N=F.getCatchupPlaybackRates(),S=b.getBufferLevel(),L=et(),R=F.getCatchupMaxDrift();if(!isNaN(R)&&R>0&&L>R)H.info("[CatchupController]: Low Latency catchup mechanism. Latency too high, doing a seek to live point"),t=!0,b.seekToCurrentLive(!0,!1);else{var V=b.getCurrentLiveLatency(),dt=b.getLiveDelay();z=Z()===u.A.LIVE_CATCHUP_MODE_LOLP?function(P,$,Y,gt,vt){var ft;if(vt<gt){var Ct=Math.abs(P.min),Mt=5*(vt-gt);ft=1-Ct+2*Ct/(1+Math.pow(Math.E,-Mt)),H.debug("[LoL+ playback control_buffer-based] bufferLevel: "+vt+", newRate: "+ft)}else{if(Math.abs($-Y)<=.02*Y)ft=1;else{var Qt=$-Y,$t=Qt<0?Math.abs(P.min):P.max,Zt=5*Qt;ft=1-$t+2*$t/(1+Math.pow(Math.E,-Zt))}H.debug("[LoL+ playback control_latency-based] latency: "+$+", newRate: "+ft)}return ft}(N,V,dt,p.get().streaming.liveCatchup.playbackBufferMin,S):function(P,$,Y,gt){if(U)return 1;var vt=$-Y,ft=vt<0?Math.abs(P.min):P.max,Ct=5*vt,Mt=1-ft+2*ft/(1+Math.pow(Math.E,-Ct));return b.getPlaybackStalled()&><=Y/2&&vt>0&&(Mt=1),Mt}(N,V,dt,S);var ut=o?.25:.02/(.5/N.max);z&&Math.abs(f-z)>=ut&&(H.debug("[CatchupController]: Setting playback rate to ".concat(z)),l.setPlaybackRate(z))}}}()}function et(){return b.getCurrentLiveLatency()-b.getLiveDelay()}function Z(){var z=p.get().streaming.liveCatchup.playbackBufferMin;return p.get().streaming.liveCatchup.mode!==u.A.LIVE_CATCHUP_MODE_LOLP||z===null||isNaN(z)?u.A.LIVE_CATCHUP_MODE_DEFAULT:u.A.LIVE_CATCHUP_MODE_LOLP}function K(){F.getCatchupPlaybackRates(!0)}return e={reset:function(){w.off(r.A.BUFFER_LEVEL_UPDATED,st,e),w.off(r.A.BUFFER_LEVEL_STATE_CHANGED,it,e),w.off(r.A.PLAYBACK_PROGRESS,ot,e),w.off(r.A.PLAYBACK_TIME_UPDATED,ot,e),w.off(r.A.PLAYBACK_SEEKED,k,e),w.off(i.A.SETTING_UPDATED_CATCHUP_ENABLED,ht,e),w.off(i.A.SETTING_UPDATED_PLAYBACK_RATE_MIN,K,e),w.off(i.A.SETTING_UPDATED_PLAYBACK_RATE_MAX,K,e),w.off(r.A.STREAM_INITIALIZED,K,e),j(),l.setPlaybackRate(1,!0)},setConfig:function(z){z&&(z.settings&&(p=z.settings),z.videoModel&&(l=z.videoModel),z.streamController&&(C=z.streamController),z.playbackController&&(b=z.playbackController),z.mediaPlayerModel&&(F=z.mediaPlayerModel))},initialize:function(){w.on(r.A.BUFFER_LEVEL_UPDATED,st,e),w.on(r.A.BUFFER_LEVEL_STATE_CHANGED,it,e),w.on(r.A.PLAYBACK_PROGRESS,ot,e),w.on(r.A.PLAYBACK_TIME_UPDATED,ot,e),w.on(r.A.PLAYBACK_SEEKED,k,e),w.on(i.A.SETTING_UPDATED_CATCHUP_ENABLED,ht,e),w.on(i.A.SETTING_UPDATED_PLAYBACK_RATE_MIN,K,e),w.on(i.A.SETTING_UPDATED_PLAYBACK_RATE_MAX,K,e),w.on(r.A.STREAM_INITIALIZED,K,e),K()}},H=(0,g.A)(B).getInstance().getLogger(e),j(),e}wa.__dashjs_factory_name="CatchupController";var Zo=h.A.getSingletonFactory(wa),ts=[u.A.SERVICE_DESCRIPTION_DVB_LL_SCHEME],Na="video",Ca="audio";function Da(){var e,t,o,l,p,C=this.context;function b(){t={liveDelay:NaN,liveCatchup:{maxDrift:NaN,playbackRate:{min:NaN,max:NaN}},minBitrate:{},maxBitrate:{},initialBitrate:{},contentSteering:null},o=[]}function F(U,H,B){try{t[U][H]=B/1e3}catch(w){l.error(w)}}return e={getServiceDescriptionSettings:function(){return t},getProducerReferenceTimeOffsets:function(){return o},calculateProducerReferenceTimeOffsets:function(U){try{var H=[];if(U&&U.length>0){var B=[u.A.VIDEO,u.A.AUDIO,u.A.TEXT],w=p.getAvailabilityStartTime()/1e3;U.forEach(function(j){var k=B.reduce(function(st,it){return st.concat(p.getAllMediaInfoForType(j,it))},[]).reduce(function(st,it){return p.getProducerReferenceTimes(j,it).forEach(function(ht){var ot=p.getVoRepresentations(it);if(ot&&ot.length>0&&ot[0].adaptation&&ot[0].segmentInfoType===n.A.SEGMENT_TEMPLATE){var et=ot[0],Z=new Date(ht[n.A.WALL_CLOCK_TIME]).getTime()/1e3-(ht[n.A.PRESENTATION_TIME]/et[n.A.TIMESCALE]-et[n.A.PRESENTATION_TIME_OFFSET]+j.start),K=w-Z;st.push({id:ht[n.A.ID],to:K})}}),st},[]);H=H.concat(k)})}o=H}catch(j){l.error(j),o=[]}},applyServiceDescription:function(U){if(U&&U.serviceDescriptions){var H=U.serviceDescriptions.filter(function(j){return ts.includes(j.schemeIdUri)}),B=U.serviceDescriptions.filter(function(j){return j.schemeIdUri==null}),w=H.length>0?H[H.length-1]:B[B.length-1];w&&(w.latency&&w.latency.target>0&&function(j){var k;if(j.schemeIdUri,u.A.SERVICE_DESCRIPTION_DVB_LL_SCHEME,k=function(ot){return{liveDelay:ot.latency.target/1e3,maxDrift:!isNaN(ot.latency.max)&&ot.latency.max>ot.latency.target?(ot.latency.max-ot.latency.target+500)/1e3:NaN,referenceId:ot.latency.referenceId||NaN}}(j),o.length>0){var st=function(ot){var et,Z=0,K=o.filter(function(z){return z.id===ot.referenceId});return K.length===0?(Z=o.length>0?o[0].to:0,et=o[0].id||NaN):(Z=K[0].to||0,et=K[0].id||NaN),{to:Z,id:et}}(k),it=st.to,ht=st.id;t.liveDelay=k.liveDelay-it,t.liveCatchup.maxDrift=k.maxDrift,l.debug(`
|
|
12
|
-
Found latency properties coming from service description. Applied time offset of `.concat(it," from ProducerReferenceTime element with id ").concat(ht,`.
|
|
13
|
-
Live Delay: `).concat(k.liveDelay-it,", Live catchup max drift: ").concat(k.maxDrift,`
|
|
14
|
-
`))}else t.liveDelay=k.liveDelay,t.liveCatchup.maxDrift=k.maxDrift,l.debug("Found latency properties coming from service description: Live Delay: ".concat(k.liveDelay,", Live catchup max drift: ").concat(k.maxDrift))}(w),w.playbackRate&&function(j){var k=j.playbackRate.min?Math.round(1e3*(j.playbackRate.min-1))/1e3:NaN,st=j.playbackRate.max?Math.round(1e3*(j.playbackRate.max-1))/1e3:NaN;t.liveCatchup.playbackRate.min=k,t.liveCatchup.playbackRate.max=st,l.debug("Found latency properties coming from service description: Live catchup min playback rate: ".concat(k)),l.debug("Found latency properties coming from service description: Live catchup max playback rate: ".concat(st))}(w),w.operatingQuality,w.operatingBandwidth&&function(j){if(j&&j.operatingBandwidth&&j.operatingBandwidth.mediaType&&j.operatingBandwidth.mediaType!=="all"){var k={};k.minBandwidth=j.operatingBandwidth.min,k.maxBandwidth=j.operatingBandwidth.max,k.targetBandwidth=j.operatingBandwidth.target;var st=[];j.operatingBandwidth.mediaType===Na||j.operatingBandwidth.mediaType===Ca?st.push(j.operatingBandwidth.mediaType):j.operatingBandwidth.mediaType==="any"&&(st.push(Ca),st.push(Na)),st.forEach(function(it){isNaN(k.minBandwidth)||F("minBitrate",it,k.minBandwidth),isNaN(k.maxBandwidth)||F("maxBitrate",it,k.maxBandwidth),isNaN(k.targetBandwidth)||F("initialBitrate",it,k.targetBandwidth)})}}(w),w.contentSteering&&function(j){t.contentSteering=j.contentSteering}(w))}},reset:function(){b()},setConfig:function(U){U&&U.adapter&&(p=U.adapter)}},l=(0,g.A)(C).getInstance().getLogger(e),b(),e}Da.__dashjs_factory_name="ServiceDescriptionController";var es=h.A.getSingletonFactory(Da);function Vi(){var e,t,o,l,p,C,b,F,U=this.context,H=(0,y.A)(U).getInstance();function B(P,$){return P&&o[$]&&o[$][P]?o[$][P].list:[]}function w(P,$){return P&&o[$]&&o[$][P]?o[$][P].current:null}function j(P){var $=arguments.length>1&&arguments[1]!==void 0&&arguments[1];if(P&&P.streamInfo){var Y=P.type,gt=P.streamInfo.id,vt=w(Y,gt);if(o[gt]&&o[gt][Y]&&(o[gt][Y].current=P,o[gt][Y].current&&(Y!==u.A.TEXT&&!it(P,vt)||Y===u.A.TEXT&&P.isFragmented)&&H.trigger(i.A.CURRENT_TRACK_CHANGED,{oldMediaInfo:vt,newMediaInfo:P,switchMode:l.get().streaming.trackSwitchMode[Y]},{streamId:gt}),!$)){var ft=function(Ct){var Mt={lang:Ct.lang,viewpoint:Ct.viewpoint,roles:Ct.roles,accessibility:Ct.accessibility,audioChannelConfiguration:Ct.audioChannelConfiguration,codec:Ct.codec};return Mt.lang||Mt.viewpoint||Mt.role&&Mt.role.length>0||Mt.accessibility&&Mt.accessibility.length>0||Mt.audioChannelConfiguration&&Mt.audioChannelConfiguration.length>0?Mt:null}(P);if(!ft||!o[gt][Y].storeLastSettings)return;ft.roles&&(ft.role=ft.roles[0],delete ft.roles),ft.accessibility&&(ft.accessibility=ft.accessibility[0]),ft.audioChannelConfiguration&&(ft.audioChannelConfiguration=ft.audioChannelConfiguration[0]),C[Y]=ft,F.setSavedMediaSettings(Y,ft)}}}function k(P,$){P&&$&&(p[P]=$)}function st(P){return P?p[P]:null}function it(P,$){if(!P&&!$)return!0;if(!P||!$)return!1;var Y=P.id===$.id,gt=P.viewpoint===$.viewpoint,vt=JSON.stringify(P.viewpointsWithSchemeIdUri)===JSON.stringify($.viewpointsWithSchemeIdUri),ft=P.lang===$.lang,Ct=P.codec===$.codec,Mt=P.roles.toString()===$.roles.toString(),Qt=JSON.stringify(P.rolesWithSchemeIdUri)===JSON.stringify($.rolesWithSchemeIdUri),$t=P.accessibility.toString()===$.accessibility.toString(),Zt=JSON.stringify(P.accessibilitiesWithSchemeIdUri)===JSON.stringify($.accessibilitiesWithSchemeIdUri),ae=P.audioChannelConfiguration.toString()===$.audioChannelConfiguration.toString(),Ne=JSON.stringify(P.audioChannelConfigurationsWithSchemeIdUri)===JSON.stringify($.audioChannelConfigurationsWithSchemeIdUri);return Y&&Ct&>&&vt&&ft&&Mt&&Qt&&$t&&Zt&&ae&&Ne}function ht(){o={},C={},p={audio:null,video:null,text:null}}function ot(P,$,Y){var gt=[];return P.forEach(function(vt){$(Y,vt)&>.push(vt)}),gt.length!==0?gt:P}function et(P,$){try{return!P.lang||$.lang.match(P.lang)}catch{return!1}}function Z(P,$){return P.index===void 0||P.index===null||$.index===P.index}function K(P,$){return!P.viewpoint||P.viewpoint===$.viewpoint}function z(P,$){var Y=arguments.length>2&&arguments[2]!==void 0&&arguments[2];return!P.role||!!$.roles.filter(function(gt){return gt===P.role})[0]||$.type===u.A.AUDIO&&Y}function f(P,$){return P.accessibility?!!$.accessibility.filter(function(Y){return Y===P.accessibility})[0]:!$.accessibility.length}function N(P,$){return!P.audioChannelConfiguration||!!$.audioChannelConfiguration.filter(function(Y){return Y===P.audioChannelConfiguration})[0]}function S(P,$){return!P.codec||P.codec===$.codec}function L(P){var $,Y=0,gt=[];return P.forEach(function(vt){($=Math.max.apply(Math,vt.bitrateList.map(function(ft){return ft.bandwidth})))>Y?(Y=$,gt=[vt]):$===Y&>.push(vt)}),gt}function R(P){var $,Y=1/0,gt=[];return P.forEach(function(vt){var ft=vt.bitrateList.reduce(function(Ct,Mt){var Qt=Math.max(1,Mt.width*Mt.height);return Ct+Mt.bandwidth/Qt},0);($=ft/vt.bitrateList.length)<Y?(Y=$,gt=[vt]):$===Y&>.push(vt)}),gt}function V(P){var $,Y=0,gt=[];return P.forEach(function(vt){($=vt.representationCount)>Y?(Y=$,gt=[vt]):$===Y&>.push(vt)}),gt}function dt(P,$){if(P===u.A.TEXT)return $[0];var Y,gt=l.get().streaming.selectionModeForInitialTrack,vt=b.getCustomInitialTrackSelectionFunction();if(vt&&typeof vt=="function")Y=vt($);else switch(gt){case u.A.TRACK_SELECTION_MODE_HIGHEST_SELECTION_PRIORITY:Y=function(ft){var Ct,Mt,Qt=(Ct=0,Mt=[],ft.forEach(function($t){isNaN($t.selectionPriority)||($t.selectionPriority>Ct?(Ct=$t.selectionPriority,Mt=[$t]):$t.selectionPriority===Ct&&Mt.push($t))}),Mt);return Qt.length>1&&(Qt=L(Qt)),Qt.length>1&&(Qt=V(Qt)),Qt}($);break;case u.A.TRACK_SELECTION_MODE_HIGHEST_BITRATE:Y=function(ft){var Ct=L(ft);return Ct.length>1&&(Ct=V(Ct)),Ct}($);break;case u.A.TRACK_SELECTION_MODE_FIRST_TRACK:Y=ut($);break;case u.A.TRACK_SELECTION_MODE_HIGHEST_EFFICIENCY:Y=function(ft){var Ct=R(ft);return Ct.length>1&&(Ct=L(Ct)),Ct}($);break;case u.A.TRACK_SELECTION_MODE_WIDEST_RANGE:Y=function(ft){var Ct=V(ft);return Ct.length>1&&(Ct=L(ft)),Ct}($);break;default:t.warn("Track selection mode ".concat(gt," is not supported. Falling back to TRACK_SELECTION_MODE_FIRST_TRACK")),Y=ut($)}return Y.length>0?Y[0]:$[0]}function ut(P){return P[0]}return e={setInitialMediaSettingsForType:function(P,$){var Y=C[P]||st(P),gt=B(P,$.id),vt=[];Y||((Y=F.getSavedMediaSettings(P))&&delete Y.codec,k(P,Y)),gt&>.length!==0&&(Y&&(vt=ot(vt=Array.from(gt),et,Y),vt=ot(vt,Z,Y),vt=ot(vt,K,Y),P===u.A.AUDIO&&C[P]||(vt=ot(vt,z,Y)),vt=ot(vt,f,Y),vt=ot(vt,N,Y),vt=ot(vt,S,Y)),vt.length===0?j(dt(P,gt),!0):vt.length>1?j(dt(P,vt)):j(vt[0]))},addTrack:function(P){if(P){var $=P.type;if((Y=$)===u.A.AUDIO||Y===u.A.VIDEO||Y===u.A.TEXT||Y===u.A.IMAGE){var Y,gt,vt=P.streamInfo.id;o[vt]||(o[vt]={audio:{list:[],storeLastSettings:gt=l.get().streaming.saveLastMediaSettingsForCurrentStreamingSession,current:null},video:{list:[],storeLastSettings:gt,current:null},text:{list:[],storeLastSettings:gt,current:null},image:{list:[],storeLastSettings:gt,current:null}});for(var ft=o[vt][$].list,Ct=0,Mt=ft.length;Ct<Mt;++Ct)if(it(ft[Ct],P))return;ft.push(P)}}},getTracksFor:B,getCurrentTrackFor:w,isCurrentTrack:function(P){if(!P)return!1;var $=P.type,Y=P.streamInfo.id;return o[Y]&&o[Y][$]&&it(o[Y][$].current,P)},setTrack:j,selectInitialTrack:dt,setInitialSettings:k,getInitialSettings:st,getTracksWithHighestBitrate:L,getTracksWithHighestEfficiency:R,getTracksWithWidestRange:V,isTracksEqual:it,matchSettings:function(P,$){var Y=arguments.length>2&&arguments[2]!==void 0&&arguments[2];try{var gt=!1;P.lang?P.lang instanceof RegExp?gt=$.lang.match(P.lang):$.lang!==""&&P.lang&&(gt=$.lang):gt=!0;var vt=P.index===void 0||P.index===null||$.index===P.index,ft=!P.viewpoint||P.viewpoint===$.viewpoint,Ct=!P.role||!!$.roles.filter(function($t){return $t===P.role})[0],Mt=!P.accessibility||!!$.accessibility.filter(function($t){return $t===P.accessibility})[0],Qt=!P.audioChannelConfiguration||!!$.audioChannelConfiguration.filter(function($t){return $t===P.audioChannelConfiguration})[0];return gt&&vt&&ft&&(Ct||$.type===u.A.AUDIO&&Y)&&Mt&&Qt}catch{return!1}},matchSettingsLang:et,matchSettingsIndex:Z,matchSettingsViewPoint:K,matchSettingsRole:z,matchSettingsAccessibility:f,matchSettingsAudioChannelConfig:N,saveTextSettingsDisabled:function(){F.setSavedMediaSettings(u.A.TEXT,null)},setConfig:function(P){P&&(P.domStorage&&(F=P.domStorage),P.settings&&(l=P.settings),P.customParametersModel&&(b=P.customParametersModel))},reset:ht},t=(0,g.A)(U).getInstance().getLogger(e),ht(),e}Vi.__dashjs_factory_name="MediaController";var Oa=h.A.getSingletonFactory(Vi);h.A.updateSingletonFactory(Vi.__dashjs_factory_name,Oa);var ns=Oa;function rs(e,t,o){return Object.defineProperty(e,"prototype",{writable:!1}),e}var Ei=NaN,Ma=rs(function e(t,o){(function(l,p){if(!(l instanceof p))throw new TypeError("Cannot call a class as a function")})(this,e),this.data={baseUrls:t||null,selectedIdx:o||Ei},this.children=[]});function Pa(){var e,t,o,l,p=this.context,C=Ee(p).getInstance();function b(B,w,j){var k=F(j);B[w]?C.areEqual(k,B[w].data.baseUrls)||(B[w].data.baseUrls=k,B[w].data.selectedIdx=Ei):B[w]=new Ma(k)}function F(B){var w=o.getBaseURLsFromElement(B),j=l.getSynthesizedBaseUrlElements(w);return j&&j.length>0&&(w=w.concat(j)),w}function U(B,w){var j=w||t;B(j.data),j.children&&j.children.forEach(function(k){return U(B,k)})}function H(){t=new Ma}return e={reset:H,update:function(B){(function(w){(function(){if(!o||!o.hasOwnProperty("getBaseURLsFromElement")||!o.hasOwnProperty("getRepresentationSortFunction"))throw new Error("setConfig function has to be called previously")})();var j=F(w);C.areEqual(j,t.data.baseUrls)||(t.data.baseUrls=j,t.data.selectedIdx=Ei),w&&w.Period_asArray&&w.Period_asArray.forEach(function(k,st){b(t.children,st,k),k.AdaptationSet_asArray&&k.AdaptationSet_asArray.forEach(function(it,ht){b(t.children[st].children,ht,it),it.Representation_asArray&&it.Representation_asArray.sort(o.getRepresentationSortFunction()).forEach(function(ot,et){b(t.children[st].children[ht].children,et,ot)})})})})(B)},getForPath:function(B){var w=t,j=[w.data];return B&&B.forEach(function(k){(w=w.children[k])&&j.push(w.data)}),j.filter(function(k){return k.baseUrls.length})},invalidateSelectedIndexes:function(B){U(function(w){isNaN(w.selectedIdx)||B===w.baseUrls[w.selectedIdx].serviceLocation&&(w.selectedIdx=Ei)})},setConfig:function(B){B.adapter&&(o=B.adapter),B.contentSteeringController&&(l=B.contentSteeringController)},getBaseUrls:function(B){return F(B)}},H(),e}Pa.__dashjs_factory_name="BaseURLTreeModel";var is=h.A.getClassFactory(Pa);function La(e){var t=(e=e||{}).blacklistController;return{select:function(o){return o&&function(p){var C,b,F=0,U=[],H=0;if((b=p.sort(function(B,w){var j=B.dvbPriority-w.dvbPriority;return isNaN(j)?0:j}).filter(function(B,w,j){return!w||j[0].dvbPriority&&B.dvbPriority&&j[0].dvbPriority===B.dvbPriority})).length)return b.length>1&&(b.forEach(function(B){F+=B.dvbWeight,U.push(F)}),C=Math.floor(Math.random()*(F-1)),U.every(function(B,w){return H=w,!(C<B)})),b[H]}((l=[],o.filter(function(p){return!t.contains(p.serviceLocation)||(p.dvbPriority&&l.push(p.dvbPriority),!1)}).filter(function(p){return!l.length||!p.dvbPriority||l.indexOf(p.dvbPriority)===-1})));var l}}}La.__dashjs_factory_name="DVBSelector";var as=h.A.getClassFactory(La);function Fa(e){var t=(e=e||{}).blacklistController;return{select:function(o){var l,p=0;return o&&o.some(function(C,b){return p=b,!t.contains(C.serviceLocation)})&&(l=o[p]),l}}}Fa.__dashjs_factory_name="BasicSelector";var os=h.A.getClassFactory(Fa);function xa(){var e,t,o,l=this.context;function p(){for(var C=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],F=0,U=NaN,H=function(){var B=C[F],w=b.findIndex(function(j){return j.serviceLocation&&j.serviceLocation===B});if(w!==-1&&!o.contains(b[w].serviceLocation))return U=w,1;F+=1};F<C.length&&!H(););return U}return e={selectBaseUrlIndex:function(C){var b=NaN;if(isNaN(C.selectedIdx)){var F=t.getSteeringDataFromManifest();F&&F.defaultServiceLocationArray.length>0&&(b=p(F.defaultServiceLocationArray,C.baseUrls))}var U=t.getCurrentSteeringResponseData();return C.baseUrls&&C.baseUrls.length&&U&&U.pathwayPriority&&U.pathwayPriority.length&&(b=p(U.pathwayPriority,C.baseUrls)),b},setConfig:function(C){C.blacklistController&&(o=C.blacklistController),C.contentSteeringController&&(t=C.contentSteeringController)}},t=Jr(l).getInstance(),e}xa.__dashjs_factory_name="ContentSteeringSelector";var ss=h.A.getClassFactory(xa);function Ua(){var e,t,o,l,p,C,b=this.context,F=(0,y.A)(b).getInstance(),U=(0,lt.A)(b).getInstance();function H(){t.reset()}return e={chooseSelector:function(B){(0,D.sq)(B,"boolean"),C=B?l:o},select:function(B){if(B){if(U.get().streaming.applyContentSteering){var w=p.selectBaseUrlIndex(B);isNaN(w)||w===-1||(B.selectedIdx=w)}if(!isNaN(B.selectedIdx))return B.baseUrls[B.selectedIdx];var j=C.select(B.baseUrls);return j?(B.selectedIdx=B.baseUrls.indexOf(j),j):(F.trigger(i.A.URL_RESOLUTION_FAILED,{error:new pt.A(mt.URL_RESOLUTION_FAILED_GENERIC_ERROR_CODE,mt.URL_RESOLUTION_FAILED_GENERIC_ERROR_MESSAGE)}),void(C===o&&H()))}},reset:H,setConfig:function(B){B.selector&&(C=B.selector),B.contentSteeringSelector&&(p=B.contentSteeringSelector)}},t=$r(b).create({updateEventName:i.A.SERVICE_LOCATION_BASE_URL_BLACKLIST_CHANGED,addBlacklistEventName:i.A.SERVICE_LOCATION_BASE_URL_BLACKLIST_ADD}),o=os(b).create({blacklistController:t}),l=as(b).create({blacklistController:t}),(p=ss(b).create()).setConfig({blacklistController:t}),C=o,e}Ua.__dashjs_factory_name="BaseURLSelector";var us=h.A.getClassFactory(Ua);function Ba(){var e,t,o,l,p,C=this.context,b=(0,y.A)(C).getInstance(),F=(0,At.A)(C).getInstance();function U(B){o.update(B),l.chooseSelector(t.getIsDVB(B)),b.trigger(r.A.BASE_URLS_UPDATED,{baseUrls:H(B)})}function H(B){return o.getBaseUrls(B)}return e={reset:function(){o.reset(),l.reset()},initialize:function(B){o.setConfig({adapter:t,contentSteeringController:p}),U(B)},resolve:function(B){var w=o.getForPath(B).reduce(function(j,k){var st=l.select(k);return st?(F.isRelative(st.url)?j.url=F.resolve(st.url,j.url):(j.url=st.url,j.serviceLocation=st.serviceLocation),j.availabilityTimeOffset=st.availabilityTimeOffset,j.availabilityTimeComplete=st.availabilityTimeComplete,j.queryParams=st.queryParams,j):new Dr},new Dr);if(!F.isRelative(w.url))return w},setConfig:function(B){B.baseURLTreeModel&&(o=B.baseURLTreeModel),B.baseURLSelector&&(l=B.baseURLSelector),B.adapter&&(t=B.adapter),B.contentSteeringController&&(p=B.contentSteeringController)},getBaseUrls:H,update:U},o=is(C).create(),l=us(C).create(),b.on(i.A.SERVICE_LOCATION_BASE_URL_BLACKLIST_CHANGED,function(B){o.invalidateSelectedIndexes(B.entry)},e),e}Ba.__dashjs_factory_name="BaseURLController";var ls=h.A.getClassFactory(Ba);function Ki(e){return Ki=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},Ki(e)}function cs(e,t,o){return t=_i(t),function(l,p){if(p&&(Ki(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,ka()?Reflect.construct(t,[],_i(e).constructor):t.apply(e,o))}function ka(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(ka=function(){return!!e})()}function _i(e){return _i=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},_i(e)}function Wi(e,t){return Wi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,l){return o.__proto__=l,o},Wi(e,t)}var Ga=function(e){function t(l,p){var C;return function(b,F){if(!(b instanceof F))throw new TypeError("Cannot call a class as a function")}(this,t),(C=cs(this,t)).url=l||null,C.type=p||null,C.mediaType=u.A.STREAM,C.responseType="",C}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&&Wi(l,p)}(t,e),o=t,Object.defineProperty(o,"prototype",{writable:!1}),o;var o}(T.A);function ja(e){e=e||{};var t=this.context,o=(0,y.A)(t).getInstance(),l=Mn(t).create({errHandler:e.errHandler,dashMetrics:e.dashMetrics,mediaPlayerModel:e.mediaPlayerModel,requestModifier:e.requestModifier,errors:mt});return{load:function(p,C,b){var F=function(H,B){C.resolved=!0,C.resolvedContent=H||null,o.trigger(i.A.XLINK_ELEMENT_LOADED,{element:C,resolveObject:b,error:H||B?null:new pt.A(mt.XLINK_LOADER_LOADING_FAILURE_ERROR_CODE,mt.XLINK_LOADER_LOADING_FAILURE_ERROR_MESSAGE+p)})};if(p==="urn:mpeg:dash:resolve-to-zero:2013")F(null,!0);else{var U=new Ga(p,jt.G.XLINK_EXPANSION_TYPE);l.load({request:U,success:function(H){F(H)},error:function(){F(null)}})}},reset:function(){l&&(l.abort(),l=null)}}}ja.__dashjs_factory_name="XlinkLoader";var fs=h.A.getClassFactory(ja),qa=function(e){(e=e||{}).escapeMode===void 0&&(e.escapeMode=!0),e.attributePrefix===void 0&&(e.attributePrefix="_"),e.arrayAccessForm=e.arrayAccessForm||"none",e.emptyNodeForm=e.emptyNodeForm||"text",e.enableToStringFunc===void 0&&(e.enableToStringFunc=!0),e.arrayAccessFormPaths=e.arrayAccessFormPaths||[],e.skipEmptyTextNodesForObj===void 0&&(e.skipEmptyTextNodesForObj=!0),e.stripWhitespaces===void 0&&(e.stripWhitespaces=!0),e.datetimeAccessFormPaths=e.datetimeAccessFormPaths||[],e.useDoubleQuotes===void 0&&(e.useDoubleQuotes=!1),e.xmlElementsFilter=e.xmlElementsFilter||[],e.jsonPropertiesFilter=e.jsonPropertiesFilter||[],e.keepCData===void 0&&(e.keepCData=!1),e.ignoreRoot===void 0&&(e.ignoreRoot=!1);var t={ELEMENT_NODE:1,TEXT_NODE:3,CDATA_SECTION_NODE:4,COMMENT_NODE:8,DOCUMENT_NODE:9};function o(Z){var K=Z.localName;return K==null&&(K=Z.baseName),K!=null&&K!=""||(K=Z.nodeName),K}function l(Z){return typeof Z=="string"?Z.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'"):Z}function p(Z,K,z,f){for(var N=0;N<Z.length;N++){var S=Z[N];if(typeof S=="string"){if(S==f)break}else if(S instanceof RegExp){if(S.test(f))break}else if(typeof S=="function"&&S(K,z,f))break}return N!=Z.length}function C(Z,K,z){e.arrayAccessForm==="property"&&(Z[K]instanceof Array?Z[K+"_asArray"]=Z[K]:Z[K+"_asArray"]=[Z[K]]),!(Z[K]instanceof Array)&&e.arrayAccessFormPaths.length>0&&p(e.arrayAccessFormPaths,Z,K,z)&&(Z[K]=[Z[K]])}function b(Z){var K=Z.split(/[-T:+Z]/g),z=new Date(K[0],K[1]-1,K[2]),f=K[5].split(".");if(z.setHours(K[3],K[4],f[0]),f.length>1&&z.setMilliseconds(f[1]),K[6]&&K[7]){var N=60*K[6]+Number(K[7]);N=0+((/\d\d-\d\d:\d\d$/.test(Z)?"-":"+")=="-"?-1*N:N),z.setMinutes(z.getMinutes()-N-z.getTimezoneOffset())}else Z.indexOf("Z",Z.length-1)!==-1&&(z=new Date(Date.UTC(z.getFullYear(),z.getMonth(),z.getDate(),z.getHours(),z.getMinutes(),z.getSeconds(),z.getMilliseconds())));return z}function F(Z,K,z,f){return!(K==t.ELEMENT_NODE&&e.xmlElementsFilter.length>0)||p(e.xmlElementsFilter,Z,z,f)}function U(Z,K){if(Z.nodeType==t.DOCUMENT_NODE){for(var z=new Object,f=Z.childNodes,N=0;N<f.length;N++)(L=f[N]).nodeType==t.ELEMENT_NODE&&(e.ignoreRoot?z=U(L):(z={})[R=o(L)]=U(L));return z}if(Z.nodeType==t.ELEMENT_NODE){(z=new Object).__cnt=0;var S=[];for(f=Z.childNodes,N=0;N<f.length;N++){var L,R=o(L=f[N]);if(L.nodeType!=t.COMMENT_NODE){var V=K+"."+R;if(F(z,L.nodeType,R,V))if(z.__cnt++,z[R]==null){var dt=U(L,V);(R!="#text"||/[^\s]/.test(dt))&&((ut={})[R]=dt,S.push(ut)),z[R]=dt,C(z,R,V)}else{var ut;z[R]!=null&&(z[R]instanceof Array||(z[R]=[z[R]],C(z,R,V))),dt=U(L,V),(R!="#text"||/[^\s]/.test(dt))&&((ut={})[R]=dt,S.push(ut)),z[R][z[R].length]=dt}}}z.__children=S;for(var P=o(Z),$=0;$<Z.attributes.length;$++){var Y=Z.attributes[$];z.__cnt++;for(var gt=Y.value,vt=0,ft=e.matchers.length;vt<ft;vt++){var Ct=e.matchers[vt];Ct.test(Y,P)&&(gt=Ct.converter(Y.value))}z[e.attributePrefix+Y.name]=gt}var Mt=function(Qt){return Qt.prefix}(Z);return Mt!=null&&Mt!=""&&(z.__cnt++,z.__prefix=Mt),z["#text"]!=null&&(z.__text=z["#text"],z.__text instanceof Array&&(z.__text=z.__text.join(`
|
|
15
|
-
`)),e.stripWhitespaces&&(z.__text=z.__text.trim()),delete z["#text"],e.arrayAccessForm=="property"&&delete z["#text_asArray"],z.__text=function(Qt,$t,Zt){if(e.datetimeAccessFormPaths.length>0){var ae=Zt.split(".#")[0];return p(e.datetimeAccessFormPaths,Qt,$t,ae)?b(Qt):Qt}return Qt}(z.__text,R,K+"."+R)),z["#cdata-section"]!=null&&(z.__cdata=z["#cdata-section"],delete z["#cdata-section"],e.arrayAccessForm=="property"&&delete z["#cdata-section_asArray"]),z.__cnt==0&&e.emptyNodeForm=="text"?z="":z.__cnt==1&&z.__text!=null?z=z.__text:z.__cnt!=1||z.__cdata==null||e.keepCData?z.__cnt>1&&z.__text!=null&&e.skipEmptyTextNodesForObj&&(e.stripWhitespaces&&z.__text==""||z.__text.trim()=="")&&delete z.__text:z=z.__cdata,delete z.__cnt,!e.enableToStringFunc||z.__text==null&&z.__cdata==null||(z.toString=function(){return(this.__text!=null?this.__text:"")+(this.__cdata!=null?this.__cdata:"")}),z}if(Z.nodeType==t.TEXT_NODE||Z.nodeType==t.CDATA_SECTION_NODE)return Z.nodeValue}function H(Z,K,z,f){var N="<"+(Z!=null&&Z.__prefix!=null?Z.__prefix+":":"")+K;if(z!=null)for(var S=0;S<z.length;S++){var L=z[S],R=Z[L];e.escapeMode&&(R=l(R)),N+=" "+L.substr(e.attributePrefix.length)+"=",e.useDoubleQuotes?N+='"'+R+'"':N+="'"+R+"'"}return N+(f?"/>":">")}function B(Z,K){return"</"+(Z.__prefix!=null?Z.__prefix+":":"")+K+">"}function w(Z,K){return e.arrayAccessForm=="property"&&(f="_asArray",(z=K.toString()).indexOf(f,z.length-8)!==-1)||K.toString().indexOf(e.attributePrefix)==0||K.toString().indexOf("__")==0||Z[K]instanceof Function;var z,f}function j(Z){var K=0;if(Z instanceof Object)for(var z in Z)w(Z,z)||K++;return K}function k(Z,K,z){return e.jsonPropertiesFilter.length==0||z==""||p(e.jsonPropertiesFilter,Z,K,z)}function st(Z){var K=[];if(Z instanceof Object)for(var z in Z)z.toString().indexOf("__")==-1&&z.toString().indexOf(e.attributePrefix)==0&&K.push(z);return K}function it(Z){var K="";return Z instanceof Object?K+=function(z){var f="";return z.__cdata!=null&&(f+="<![CDATA["+z.__cdata+"]]>"),z.__text!=null&&(e.escapeMode?f+=l(z.__text):f+=z.__text),f}(Z):Z!=null&&(e.escapeMode?K+=l(Z):K+=Z),K}function ht(Z,K){return Z===""?K:Z+"."+K}function ot(Z,K,z,f){var N="";if(Z.length==0)N+=H(Z,K,z,!0);else for(var S=0;S<Z.length;S++)N+=H(Z[S],K,st(Z[S]),!1),N+=et(Z[S],ht(f,K)),N+=B(Z[S],K);return N}function et(Z,K){var z="";if(j(Z)>0){for(var f in Z)if(!w(Z,f)&&(K==""||k(Z,f,ht(K,f)))){var N=Z[f],S=st(N);N==null||N==null?z+=H(N,f,S,!0):N instanceof Object?N instanceof Array?z+=ot(N,f,S,K):N instanceof Date?(z+=H(N,f,S,!1),z+=N.toISOString(),z+=B(N,f)):j(N)>0||N.__text!=null||N.__cdata!=null?(z+=H(N,f,S,!1),z+=et(N,ht(K,f)),z+=B(N,f)):z+=H(N,f,S,!0):(z+=H(N,f,S,!1),z+=it(N),z+=B(N,f))}}return z+it(Z)}this.parseXmlString=function(Z){var K;if(Z===void 0)return null;if(window.DOMParser){var z=new window.DOMParser;try{(K=z.parseFromString(Z,"text/xml")).getElementsByTagNameNS("*","parsererror").length>0&&(K=null)}catch{K=null}}else Z.indexOf("<?")==0&&(Z=Z.substr(Z.indexOf("?>")+2)),(K=new ActiveXObject("Microsoft.XMLDOM")).async="false",K.loadXML(Z);return K},this.asArray=function(Z){return Z===void 0||Z==null?[]:Z instanceof Array?Z:[Z]},this.toXmlDateTime=function(Z){return Z instanceof Date?Z.toISOString():typeof Z=="number"?new Date(Z).toISOString():null},this.asDateTime=function(Z){return typeof Z=="string"?b(Z):Z},this.xml2json=function(Z){return U(Z)},this.xml_str2json=function(Z){var K=this.parseXmlString(Z);return K!=null?this.xml2json(K):null},this.json2xml_str=function(Z){return et(Z,"")},this.json2xml=function(Z){var K=this.json2xml_str(Z);return this.parseXmlString(K)},this.getVersion=function(){return"1.2.0"}},Lr="onLoad";function Ya(e){e=e||{};var t,o,l,p,C,b,F=this.context,U=(0,y.A)(F).getInstance(),H=(0,At.A)(F).getInstance();function B(it,ht,ot){var et,Z,K={};K.elements=it,K.type=ht,K.resolveType=ot,K.elements.length===0&&j(K);for(var z=0;z<K.elements.length;z++)et=K.elements[z],Z=H.isHTTPURL(et.url)?et.url:et.originalContent.BaseURL+et.url,b.load(Z,et,K)}function w(it){var ht,ot,et="";if(ht=it.element,ot=it.resolveObject,ht.resolvedContent){var Z=0;ht.resolvedContent.indexOf("<?xml")===0&&(Z=ht.resolvedContent.indexOf("?>")+2),et=ht.resolvedContent.substr(0,Z)+"<response>"+ht.resolvedContent.substr(Z)+"</response>",ht.resolvedContent=C.xml_str2json(et)}(function(K){var z;for(z=0;z<K.elements.length;z++)if(K.elements[z].resolved===!1)return!1;return!0})(ot)&&j(ot)}function j(it){var ht,ot,et=[];if(function(Z){var K,z,f,N,S,L,R=[];for(N=Z.elements.length-1;N>=0;N--){if(z=(K=Z.elements[N]).type+"_asArray",K.resolvedContent){if(K.resolvedContent)for(S=0;S<K.resolvedContent[z].length;S++)f=K.resolvedContent[z][S],R.push(f)}else delete K.originalContent["xlink:actuate"],delete K.originalContent["xlink:href"],R.push(K.originalContent);for(K.parentElement[z].splice(K.index,1),L=0;L<R.length;L++)K.parentElement[z].splice(K.index+L,0,R[L]);R=[]}Z.elements.length>0&&l.run(p)}(it),it.resolveType==="onActuate"&&U.trigger(i.A.XLINK_READY,{manifest:p}),it.resolveType===Lr)switch(it.type){case n.A.PERIOD:for(ht=0;ht<p[n.A.PERIOD+"_asArray"].length;ht++)(ot=p[n.A.PERIOD+"_asArray"][ht]).hasOwnProperty(n.A.ADAPTATION_SET+"_asArray")&&(et=et.concat(k(ot[n.A.ADAPTATION_SET+"_asArray"],ot,n.A.ADAPTATION_SET,Lr))),ot.hasOwnProperty(n.A.EVENT_STREAM+"_asArray")&&(et=et.concat(k(ot[n.A.EVENT_STREAM+"_asArray"],ot,n.A.EVENT_STREAM,Lr)));B(et,n.A.ADAPTATION_SET,Lr);break;case n.A.ADAPTATION_SET:U.trigger(i.A.XLINK_READY,{manifest:p})}}function k(it,ht,ot,et){var Z,K,z,f=[];for(K=it.length-1;K>=0;K--)(Z=it[K]).hasOwnProperty("xlink:href")&&Z["xlink:href"]==="urn:mpeg:dash:resolve-to-zero:2013"&&it.splice(K,1);for(K=0;K<it.length;K++)(Z=it[K]).hasOwnProperty("xlink:href")&&Z.hasOwnProperty("xlink:actuate")&&Z["xlink:actuate"]===et&&(z=st(Z["xlink:href"],ht,ot,K,et,Z),f.push(z));return f}function st(it,ht,ot,et,Z,K){return{url:it,parentElement:ht,type:ot,index:et,resolveType:Z,originalContent:K,resolvedContent:null,resolved:!1}}return t={resolveManifestOnLoad:function(it){C=new qa({escapeMode:!1,attributePrefix:"",arrayAccessForm:"property",emptyNodeForm:"object",stripWhitespaces:!1,enableToStringFunc:!1,ignoreRoot:!0,matchers:o}),(p=it).Period_asArray?B(k(p.Period_asArray,p,n.A.PERIOD,Lr),n.A.PERIOD,Lr):U.trigger(i.A.XLINK_READY,{manifest:p})},setMatchers:function(it){it&&(o=it)},setIron:function(it){it&&(l=it)},reset:function(){U.off(i.A.XLINK_ELEMENT_LOADED,w,t),b&&(b.reset(),b=null)}},U.on(i.A.XLINK_ELEMENT_LOADED,w,t),b=fs(F).create({errHandler:e.errHandler,dashMetrics:e.dashMetrics,mediaPlayerModel:e.mediaPlayerModel,requestModifier:e.requestModifier,settings:e.settings}),t}Ya.__dashjs_factory_name="XlinkController";var ds=h.A.getClassFactory(Ya);function Zr(e){return Zr=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},Zr(e)}function Ha(e){function t(p,C){for(var b in p)C.hasOwnProperty(b)||(C[b]=p[b])}function o(p,C,b){for(var F=0,U=p.length;F<U;++F){var H=p[F];if(C[H.name])if(b[H.name]){if(H.merge){var B=C[H.name],w=b[H.name];Zr(B)==="object"&&Zr(w)==="object"?t(B,w):b[H.name]=B+w}}else b[H.name]=C[H.name]}}function l(p,C){for(var b=0,F=p.children.length;b<F;++b){var U=p.children[b],H=C[U.name+"_asArray"];if(H)for(var B=0,w=H.length;B<w;++B){var j=H[B];o(p.properties,C,j),l(U,j)}}}return{run:function(p){if(p===null||Zr(p)!=="object")return p;if(p.Period_asArray&&"period"in e)for(var C=e.period,b=p.Period_asArray,F=0,U=b.length;F<U;++F){var H=b[F];if(l(C,H),"adaptationset"in e){var B=H.AdaptationSet_asArray;if(B)for(var w=e.adaptationset,j=0,k=B.length;j<k;++j)l(w,B[j])}}return p}}}Ha.__dashjs_factory_name="ObjectIron";var ps=h.A.getClassFactory(Ha);function ti(e){return ti=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},ti(e)}function hs(e,t){for(var o=0;o<t.length;o++){var l=t[o];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(e,gs(l.key),l)}}function gs(e){var t=function(o){if(ti(o)!="object"||!o)return o;var l=o[Symbol.toPrimitive];if(l!==void 0){var p=l.call(o,"string");if(ti(p)!="object")return p;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(o)}(e);return ti(t)=="symbol"?t:t+""}var Ai=function(){return e=function o(l,p){(function(C,b){if(!(C instanceof b))throw new TypeError("Cannot call a class as a function")})(this,o),this._test=l,this._converter=p},(t=[{key:"test",get:function(){return this._test}},{key:"converter",get:function(){return this._converter}}])&&hs(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();function Fr(e){return Fr=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},Fr(e)}function Cn(e,t,o){return(t=ms(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function ms(e){var t=function(o){if(Fr(o)!="object"||!o)return o;var l=o[Symbol.toPrimitive];if(l!==void 0){var p=l.call(o,"string");if(Fr(p)!="object")return p;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(o)}(e);return Fr(t)=="symbol"?t:t+""}function ys(e,t,o){return t=vi(t),function(l,p){if(p&&(Fr(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,Va()?Reflect.construct(t,o||[],vi(e).constructor):t.apply(e,o))}function Va(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Va=function(){return!!e})()}function vi(e){return vi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},vi(e)}function zi(e,t){return zi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,l){return o.__proto__=l,o},zi(e,t)}var Es=function(e){function t(){return function(l,p){if(!(l instanceof p))throw new TypeError("Cannot call a class as a function")}(this,t),ys(this,t,[function(l,p){var C,b=(Cn(Cn(Cn(Cn(Cn(Cn(Cn(Cn(Cn(Cn(C={},n.A.MPD,[n.A.ID,n.A.PROFILES]),n.A.PERIOD,[n.A.ID]),n.A.BASE_URL,[n.A.SERVICE_LOCATION,n.A.BYTE_RANGE]),n.A.SEGMENT_BASE,[n.A.INDEX_RANGE]),n.A.INITIALIZATION,[n.A.RANGE]),n.A.REPRESENTATION_INDEX,[n.A.RANGE]),n.A.SEGMENT_LIST,[n.A.INDEX_RANGE]),n.A.BITSTREAM_SWITCHING,[n.A.RANGE]),n.A.SEGMENT_URL,[n.A.MEDIA_RANGE,n.A.INDEX_RANGE]),n.A.SEGMENT_TEMPLATE,[n.A.INDEX_RANGE,n.A.MEDIA,n.A.INDEX,n.A.INITIALIZATION_MINUS,n.A.BITSTREAM_SWITCHING_MINUS]),Cn(Cn(Cn(Cn(Cn(Cn(Cn(Cn(Cn(Cn(C,n.A.ASSET_IDENTIFIER,[n.A.VALUE,n.A.ID]),n.A.EVENT_STREAM,[n.A.VALUE]),n.A.ADAPTATION_SET,[n.A.PROFILES,n.A.MIME_TYPE,n.A.SEGMENT_PROFILES,n.A.CODECS,n.A.CONTENT_TYPE]),n.A.FRAME_PACKING,[n.A.VALUE,n.A.ID]),n.A.AUDIO_CHANNEL_CONFIGURATION,[n.A.VALUE,n.A.ID]),n.A.CONTENT_PROTECTION,[n.A.VALUE,n.A.ID]),n.A.ESSENTIAL_PROPERTY,[n.A.VALUE,n.A.ID]),n.A.SUPPLEMENTAL_PROPERTY,[n.A.VALUE,n.A.ID]),n.A.INBAND_EVENT_STREAM,[n.A.VALUE,n.A.ID]),n.A.ACCESSIBILITY,[n.A.VALUE,n.A.ID]),Cn(Cn(Cn(Cn(Cn(Cn(Cn(Cn(C,n.A.ROLE,[n.A.VALUE,n.A.ID]),n.A.RATING,[n.A.VALUE,n.A.ID]),n.A.VIEWPOINT,[n.A.VALUE,n.A.ID]),n.A.CONTENT_COMPONENT,[n.A.CONTENT_TYPE]),n.A.REPRESENTATION,[n.A.ID,n.A.DEPENDENCY_ID,n.A.MEDIA_STREAM_STRUCTURE_ID]),n.A.SUBSET,[n.A.ID]),n.A.METRICS,[n.A.METRICS_MINUS]),n.A.REPORTING,[n.A.VALUE,n.A.ID]));if(b.hasOwnProperty(p)){var F=b[p];return F!==void 0&&F.indexOf(l.name)>=0}return!1},function(l){return String(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&&zi(l,p)}(t,e),o=t,Object.defineProperty(o,"prototype",{writable:!1}),o;var o}(Ai);function Xi(e){return Xi=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},Xi(e)}function _s(e,t,o){return t=Ti(t),function(l,p){if(p&&(Xi(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,Ka()?Reflect.construct(t,o||[],Ti(e).constructor):t.apply(e,o))}function Ka(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Ka=function(){return!!e})()}function Ti(e){return Ti=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ti(e)}function Qi(e,t){return Qi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,l){return o.__proto__=l,o},Qi(e,t)}var Wa=/^([-])?P(([\d.]*)Y)?(([\d.]*)M)?(([\d.]*)D)?T?(([\d.]*)H)?(([\d.]*)M)?(([\d.]*)S)?/,As=function(e){function t(){return function(l,p){if(!(l instanceof p))throw new TypeError("Cannot call a class as a function")}(this,t),_s(this,t,[function(l){for(var p=[n.A.MIN_BUFFER_TIME,n.A.MEDIA_PRESENTATION_DURATION,n.A.MINIMUM_UPDATE_PERIOD,n.A.TIMESHIFT_BUFFER_DEPTH,n.A.MAX_SEGMENT_DURATION,n.A.MAX_SUBSEGMENT_DURATION,n.A.SUGGESTED_PRESENTATION_DELAY,n.A.START,u.A.START_TIME,n.A.DURATION],C=p.length,b=0;b<C;b++)if(l.nodeName===p[b])return Wa.test(l.value);return!1},function(l){var p=Wa.exec(l),C=31536e3*parseFloat(p[3]||0)+2592e3*parseFloat(p[5]||0)+86400*parseFloat(p[7]||0)+3600*parseFloat(p[9]||0)+60*parseFloat(p[11]||0)+parseFloat(p[13]||0);return p[1]!==void 0&&(C=-C),C}])}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&&Qi(l,p)}(t,e),o=t,Object.defineProperty(o,"prototype",{writable:!1}),o;var o}(Ai);function $i(e){return $i=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},$i(e)}function vs(e,t,o){return t=bi(t),function(l,p){if(p&&($i(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,za()?Reflect.construct(t,o||[],bi(e).constructor):t.apply(e,o))}function za(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(za=function(){return!!e})()}function bi(e){return bi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},bi(e)}function Ji(e,t){return Ji=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,l){return o.__proto__=l,o},Ji(e,t)}var Xa=/^([0-9]{4})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2})(?::([0-9]*)(\.[0-9]*)?)?(?:([+-])([0-9]{2})(?::?)([0-9]{2}))?/,Ts=function(e){function t(){return function(l,p){if(!(l instanceof p))throw new TypeError("Cannot call a class as a function")}(this,t),vs(this,t,[function(l){return Xa.test(l.value)},function(l){var p,C=Xa.exec(l);if(p=Date.UTC(parseInt(C[1],10),parseInt(C[2],10)-1,parseInt(C[3],10),parseInt(C[4],10),parseInt(C[5],10),C[6]&&parseInt(C[6],10)||0,C[7]&&1e3*parseFloat(C[7])||0),C[9]&&C[10]){var b=60*parseInt(C[9],10)+parseInt(C[10],10);p+=(C[8]==="+"?-1:1)*b*60*1e3}return new Date(p)}])}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&&Ji(l,p)}(t,e),o=t,Object.defineProperty(o,"prototype",{writable:!1}),o;var o}(Ai);function Zi(e){return Zi=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},Zi(e)}function bs(e,t,o){return t=Si(t),function(l,p){if(p&&(Zi(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,Qa()?Reflect.construct(t,o||[],Si(e).constructor):t.apply(e,o))}function Qa(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Qa=function(){return!!e})()}function Si(e){return Si=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Si(e)}function ta(e,t){return ta=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,l){return o.__proto__=l,o},ta(e,t)}var Ss=/^[-+]?[0-9]+[.]?[0-9]*([eE][-+]?[0-9]+)?$/,Is=function(e){function t(){return function(l,p){if(!(l instanceof p))throw new TypeError("Cannot call a class as a function")}(this,t),bs(this,t,[function(l){return Ss.test(l.value)},function(l){return parseFloat(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&&ta(l,p)}(t,e),o=t,Object.defineProperty(o,"prototype",{writable:!1}),o;var o}(Ai);function ei(e){return ei=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},ei(e)}function Rs(e,t){for(var o=0;o<t.length;o++){var l=t[o];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(e,ws(l.key),l)}}function ws(e){var t=function(o){if(ei(o)!="object"||!o)return o;var l=o[Symbol.toPrimitive];if(l!==void 0){var p=l.call(o,"string");if(ei(p)!="object")return p;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(o)}(e);return ei(t)=="symbol"?t:t+""}var Ns=function(){return e=function o(l){var p;(function(C,b){if(!(C instanceof b))throw new TypeError("Cannot call a class as a function")})(this,o),this._name=l,this._merge=(p=l)&&p.length&&p.charAt(0)===p.charAt(0).toUpperCase()},(t=[{key:"name",get:function(){return this._name}},{key:"merge",get:function(){return this._merge}}])&&Rs(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();function ni(e){return ni=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},ni(e)}function Cs(e,t){for(var o=0;o<t.length;o++){var l=t[o];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(e,Ds(l.key),l)}}function Ds(e){var t=function(o){if(ni(o)!="object"||!o)return o;var l=o[Symbol.toPrimitive];if(l!==void 0){var p=l.call(o,"string");if(ni(p)!="object")return p;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(o)}(e);return ni(t)=="symbol"?t:t+""}var xr=function(){return e=function o(l,p,C){var b=this;(function(F,U){if(!(F instanceof U))throw new TypeError("Cannot call a class as a function")})(this,o),this._name=l||"",this._properties=[],this._children=C||[],Array.isArray(p)&&p.forEach(function(F){b._properties.push(new Ns(F))})},(t=[{key:"name",get:function(){return this._name}},{key:"children",get:function(){return this._children}},{key:"properties",get:function(){return this._properties}}])&&Cs(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();function ea(e){return ea=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},ea(e)}function Os(e,t,o){return t=Ii(t),function(l,p){if(p&&(ea(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,$a()?Reflect.construct(t,o||[],Ii(e).constructor):t.apply(e,o))}function $a(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return($a=function(){return!!e})()}function Ii(e){return Ii=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ii(e)}function na(e,t){return na=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,l){return o.__proto__=l,o},na(e,t)}var Ms=function(e){function t(){(function(p,C){if(!(p instanceof C))throw new TypeError("Cannot call a class as a function")})(this,t);var l=[n.A.PROFILES,n.A.WIDTH,n.A.HEIGHT,n.A.SAR,n.A.FRAMERATE,n.A.AUDIO_SAMPLING_RATE,n.A.MIME_TYPE,n.A.SEGMENT_PROFILES,n.A.CODECS,n.A.MAXIMUM_SAP_PERIOD,n.A.START_WITH_SAP,n.A.MAX_PLAYOUT_RATE,n.A.CODING_DEPENDENCY,n.A.SCAN_TYPE,n.A.FRAME_PACKING,n.A.AUDIO_CHANNEL_CONFIGURATION,n.A.CONTENT_PROTECTION,n.A.ESSENTIAL_PROPERTY,n.A.ESSENTIAL_PROPERTY+"_asArray",n.A.SUPPLEMENTAL_PROPERTY,n.A.INBAND_EVENT_STREAM];return Os(this,t,[n.A.ADAPTATION_SET,l,[new xr(n.A.REPRESENTATION,l,[new xr(n.A.SUB_REPRESENTATION,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&&na(l,p)}(t,e),o=t,Object.defineProperty(o,"prototype",{writable:!1}),o;var o}(xr);function ra(e){return ra=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},ra(e)}function Ps(e,t,o){return t=Ri(t),function(l,p){if(p&&(ra(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,Ja()?Reflect.construct(t,o||[],Ri(e).constructor):t.apply(e,o))}function Ja(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Ja=function(){return!!e})()}function Ri(e){return Ri=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ri(e)}function ia(e,t){return ia=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,l){return o.__proto__=l,o},ia(e,t)}var Ls=function(e){function t(){(function(p,C){if(!(p instanceof C))throw new TypeError("Cannot call a class as a function")})(this,t);var l=[n.A.SEGMENT_BASE,n.A.SEGMENT_TEMPLATE,n.A.SEGMENT_LIST];return Ps(this,t,[n.A.PERIOD,l,[new xr(n.A.ADAPTATION_SET,l,[new xr(n.A.REPRESENTATION,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&&ia(l,p)}(t,e),o=t,Object.defineProperty(o,"prototype",{writable:!1}),o;var o}(xr);function Za(e){e=e||{};var t,o,l,p,C,b=this.context,F=e.debug;return t={parse:function(U){var H,B=window.performance.now();if(!(H=p.xml_str2json(U)))throw new Error("parsing the manifest failed");var w=window.performance.now();H.Patch?((H=H.Patch).add_asArray&&H.add_asArray.forEach(function(k){return C.run(k)}),H.replace_asArray&&H.replace_asArray.forEach(function(k){return C.run(k)})):(H=H.MPD,C.run(H));var j=window.performance.now();return o.info("Parsing complete: ( xml2json: "+(w-B).toPrecision(3)+"ms, objectiron: "+(j-w).toPrecision(3)+"ms, total: "+((j-B)/1e3).toPrecision(3)+"s)"),H.protocol="DASH",H},getMatchers:function(){return l},getIron:function(){return C}},o=F.getLogger(t),l=[new As,new Ts,new Is,new Es],p=new qa({escapeMode:!1,attributePrefix:"",arrayAccessForm:"property",emptyNodeForm:"object",stripWhitespaces:!1,enableToStringFunc:!0,ignoreRoot:!1,matchers:l}),C=ps(b).create({adaptationset:new Ms,period:new Ls}),t}Za.__dashjs_factory_name="DashParser";var Fs=h.A.getClassFactory(Za);function to(e){e=e||{};var t,o,l,p,C,b=this.context,F=e.debug,U=e.settings,H=(0,y.A)(b).getInstance(),B=(0,At.A)(b).getInstance(),w=e.mssHandler,j=e.errHandler;function k(st){H.trigger(i.A.INTERNAL_MANIFEST_LOADED,{manifest:st.manifest})}return t={load:function(st){var it=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,ht=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,ot=new Date,et=new Ga(st,jt.G.MPD_TYPE);it&&(et.serviceLocation=it),ht&&(et.queryParams=ht),et.requestStartDate||(et.requestStartDate=ot),H.trigger(i.A.MANIFEST_LOADING_STARTED,{request:et}),l.load({request:et,success:function(Z,K,z){var f,N,S;if(p)if(z&&z!==st?(N=B.parseBaseUrl(z),f=z):(B.isRelative(st)&&(st=B.resolve(st,window.location.href)),N=B.parseBaseUrl(st)),K!="No Content")if(C===null&&(C=function(R){var V=null;return R.indexOf("SmoothStreamingMedia")>-1?(w&&(V=w.createMssParser(),w.createMssFragmentProcessor(),w.registerEvents()),V):R.indexOf("MPD")>-1||R.indexOf("Patch")>-1?Fs(b).create({debug:F}):V}(Z)),C!==null){p.setMatchers(C.getMatchers()),p.setIron(C.getIron());try{S=C.parse(Z)}catch{return void H.trigger(i.A.INTERNAL_MANIFEST_LOADED,{manifest:null,error:new pt.A(mt.MANIFEST_LOADER_PARSING_FAILURE_ERROR_CODE,mt.MANIFEST_LOADER_PARSING_FAILURE_ERROR_MESSAGE+"".concat(st))})}if(S){if(S.url=f||st,S.originalUrl||(S.originalUrl=S.url),U&&U.get().streaming.enableManifestDurationMismatchFix&&S.mediaPresentationDuration&&S.Period_asArray.length>1){var L=S.Period_asArray.reduce(function(R,V){return R+V.duration},0);!isNaN(L)&&S.mediaPresentationDuration>L&&(o.warn("Media presentation duration greater than duration of all periods. Setting duration to total period duration"),S.mediaPresentationDuration=L)}S.baseUri=N,S.loadedTime=new Date,p.resolveManifestOnLoad(S),H.trigger(i.A.ORIGINAL_MANIFEST_LOADED,{originalManifest:Z})}else H.trigger(i.A.INTERNAL_MANIFEST_LOADED,{manifest:null,error:new pt.A(mt.MANIFEST_LOADER_PARSING_FAILURE_ERROR_CODE,mt.MANIFEST_LOADER_PARSING_FAILURE_ERROR_MESSAGE+"".concat(st))})}else H.trigger(i.A.INTERNAL_MANIFEST_LOADED,{manifest:null,error:new pt.A(mt.MANIFEST_LOADER_PARSING_FAILURE_ERROR_CODE,mt.MANIFEST_LOADER_PARSING_FAILURE_ERROR_MESSAGE+"".concat(st))});else H.trigger(i.A.INTERNAL_MANIFEST_LOADED,{manifest:null})},error:function(Z,K,z){H.trigger(i.A.INTERNAL_MANIFEST_LOADED,{manifest:null,error:new pt.A(mt.MANIFEST_LOADER_LOADING_FAILURE_ERROR_CODE,mt.MANIFEST_LOADER_LOADING_FAILURE_ERROR_MESSAGE+"".concat(st,", ").concat(z))})}})},reset:function(){H.off(i.A.XLINK_READY,k,t),w&&w.reset(),p&&(p.reset(),p=null),l&&(l.abort(),l=null)}},o=F.getLogger(t),H.on(i.A.XLINK_READY,k,t),l=Mn(b).create({errHandler:e.errHandler,dashMetrics:e.dashMetrics,mediaPlayerModel:e.mediaPlayerModel,requestModifier:e.requestModifier,urlUtils:B,constants:u.A,dashConstants:n.A,errors:mt,requestTimeout:e.settings.get().streaming.manifestRequestTimeout}),p=ds(b).create({errHandler:j,dashMetrics:e.dashMetrics,mediaPlayerModel:e.mediaPlayerModel,requestModifier:e.requestModifier,settings:e.settings}),C=null,t}to.__dashjs_factory_name="ManifestLoader";var xs=h.A.getClassFactory(to);function eo(){var e=this.context,t=(0,y.A)(e).getInstance();return{error:function(o){t.trigger(i.A.ERROR,{error:o})}}}eo.__dashjs_factory_name="ErrorHandler";var Us=h.A.getSingletonFactory(eo),no=M(6035);function ro(){var e,t,o,l,p,C,b=this.context,F=(0,y.A)(b).getInstance();function U(H,B){if(!B||!B.Period_asArray||B.Period_asArray.length===0)return Promise.resolve();var w=[];return B.Period_asArray.forEach(function(j){w.push(function(k,st){return new Promise(function(it){if(k&&k.AdaptationSet_asArray&&k.AdaptationSet_asArray.length!==0){var ht=[];k.AdaptationSet_asArray.forEach(function(ot){t.getIsTypeOf(ot,st)&&ht.push(function(et,Z){return new Promise(function(K){if(et.Representation_asArray&&et.Representation_asArray.length!==0){var z=[],f=[];et.Representation_asArray.forEach(function(N,S){var L=t.getCodec(et,S,!1),R=function(V,dt,ut){switch(V){case u.A.VIDEO:return function(P,$){return{codec:$,width:P.width||null,height:P.height||null,framerate:P.frameRate||null,bitrate:P.bandwidth||null}}(dt,ut);case u.A.AUDIO:return function(P,$){var Y=P.audioSamplingRate||null;return{codec:$,bitrate:P.bandwidth||null,samplerate:Y}}(dt,ut);default:return null}}(Z,N,L);f.push(R),z.push(o.supportsCodec(R,Z))}),Promise.all(z).then(function(N){et.Representation_asArray=et.Representation_asArray.filter(function(S,L){return N[L]||C.debug("[Stream] Codec ".concat(f[L].codec," not supported ")),N[L]}),K()}).catch(function(){K()})}else K()})}(ot,st))}),Promise.all(ht).then(function(){k.AdaptationSet_asArray=k.AdaptationSet_asArray.filter(function(ot){var et=ot.Representation_asArray&&ot.Representation_asArray.length>0;return et||(F.trigger(i.A.ADAPTATION_SET_REMOVED_NO_CAPABILITIES,{adaptationSet:ot}),C.warn("AdaptationSet has been removed because of no supported Representation")),et}),it()}).catch(function(){it()})}else it()})}(j,H))}),Promise.all(w)}return e={setConfig:function(H){H&&(H.adapter&&(t=H.adapter),H.capabilities&&(o=H.capabilities),H.settings&&(l=H.settings),H.customParametersModel&&(p=H.customParametersModel))},filterUnsupportedFeatures:function(H){return new Promise(function(B){var w=[];w.push(U(u.A.VIDEO,H)),w.push(U(u.A.AUDIO,H)),Promise.all(w).then(function(){l.get().streaming.capabilities.filterUnsupportedEssentialProperties&&function(j){j&&j.Period_asArray&&j.Period_asArray.length!==0&&j.Period_asArray.forEach(function(k){k.AdaptationSet_asArray=k.AdaptationSet_asArray.filter(function(st){return!st.Representation_asArray||st.Representation_asArray.length===0||(st.Representation_asArray=st.Representation_asArray.filter(function(it){var ht=t.getEssentialPropertiesForRepresentation(it);if(ht&&ht.length>0)for(var ot=0;ot<ht.length;){if(!o.supportsEssentialProperty(ht[ot]))return C.debug("[Stream] EssentialProperty not supported: "+ht[ot].schemeIdUri),!1;ot+=1}return!0}),st.Representation_asArray&&st.Representation_asArray.length>0)})})}(H),function(j){var k=p.getCustomCapabilitiesFilters();k&&k.length!==0&&j&&j.Period_asArray&&j.Period_asArray.length!==0&&j.Period_asArray.forEach(function(st){st.AdaptationSet_asArray=st.AdaptationSet_asArray.filter(function(it){return!it.Representation_asArray||it.Representation_asArray.length===0||(it.Representation_asArray=it.Representation_asArray.filter(function(ht){return!k.some(function(ot){return!ot(ht)})}),it.Representation_asArray&&it.Representation_asArray.length>0)})})}(H),B()}).catch(function(){B()})})}},C=(0,g.A)(b).getInstance().getLogger(e),e}ro.__dashjs_factory_name="CapabilitiesFilter";var Bs=h.A.getSingletonFactory(ro);function ks(e,t,o){return Object.defineProperty(e,"prototype",{writable:!1}),e}var Gs=ks(function e(){(function(t,o){if(!(t instanceof o))throw new TypeError("Cannot call a class as a function")})(this,e),this.t=null,this.xywh=null,this.track=null,this.id=null,this.s=null,this.r=null});function io(){var e;return{initialize:function(t){if(e=new Gs,!t)return null;var o=t.indexOf("#");if(o!==-1)for(var l=t.substr(o+1).split("&"),p=0,C=l.length;p<C;++p){var b=l[p],F=b.indexOf("=");if(F!==-1){var U=b.substring(0,F);e.hasOwnProperty(U)&&(e[U]=b.substr(F+1))}}},getURIFragmentData:function(){return e}}}io.__dashjs_factory_name="URIFragmentModel";var js=h.A.getSingletonFactory(io);function ao(){var e,t=this.context,o=(0,y.A)(t).getInstance();return{getValue:function(){return e},setValue:function(l){e=l,l&&o.trigger(i.A.MANIFEST_LOADED,{data:l})}}}ao.__dashjs_factory_name="ManifestModel";var qs=h.A.getSingletonFactory(ao),aa=-.5;function oo(){var e,t,o,l,p=this.context,C=(0,lt.A)(p).getInstance();function b(H,B){return isNaN(H)?0:H>0?(B&&t.warn("Supplied minimum playback rate is a positive value when it should be negative or 0. The supplied rate will not be applied and set to 0: 100% playback speed."),0):H<aa?(B&&t.warn("Supplied minimum playback rate is out of range and will be limited to ".concat(aa,": ").concat(-50,"% playback speed.")),aa):H}function F(H,B){return isNaN(H)?0:H<0?(B&&t.warn("Supplied maximum playback rate is a negative value when it should be negative or 0. The supplied rate will not be applied and set to 0: 100% playback speed."),0):H>1?(B&&t.warn("Supplied maximum playback rate is out of range and will be limited to ".concat(1,": ").concat(200,"% playback speed.")),1):H}function U(){var H=C.get().streaming.buffer.stableBufferTime>0?C.get().streaming.buffer.stableBufferTime:C.get().streaming.buffer.fastSwitchEnabled?20:12,B=o.getLiveDelay();return!isNaN(B)&&B>0?Math.min(H,B):H}return e={getCatchupMaxDrift:function(){if(!isNaN(C.get().streaming.liveCatchup.maxDrift)&&C.get().streaming.liveCatchup.maxDrift>0)return C.get().streaming.liveCatchup.maxDrift;var H=l.getServiceDescriptionSettings();return H&&H.liveCatchup&&!isNaN(H.liveCatchup.maxDrift)&&H.liveCatchup.maxDrift>0?H.liveCatchup.maxDrift:12},getCatchupModeEnabled:function(){return C.get().streaming.liveCatchup.enabled!==null?C.get().streaming.liveCatchup.enabled:o.getInitialCatchupModeActivated()},getStableBufferTime:U,getInitialBufferLevel:function(){var H=C.get().streaming.buffer.initialBufferLevel;return isNaN(H)||H<0?0:Math.min(U(),H)},getRetryAttemptsForType:function(H){var B=isNaN(C.get().streaming.retryAttempts.lowLatencyMultiplyFactor)?5:C.get().streaming.retryAttempts.lowLatencyMultiplyFactor;return o.getLowLatencyModeEnabled()?C.get().streaming.retryAttempts[H]*B:C.get().streaming.retryAttempts[H]},getRetryIntervalsForType:function(H){var B=isNaN(C.get().streaming.retryIntervals.lowLatencyReductionFactor)?10:C.get().streaming.retryIntervals.lowLatencyReductionFactor;return o.getLowLatencyModeEnabled()?C.get().streaming.retryIntervals[H]/B:C.get().streaming.retryIntervals[H]},getCatchupPlaybackRates:function(H){var B=C.get().streaming.liveCatchup.playbackRate;if(!isNaN(B.min)||!isNaN(B.max))return{min:b(B.min,H),max:F(B.max,H)};var w=l.getServiceDescriptionSettings();if(w&&w.liveCatchup&&(!isNaN(w.liveCatchup.playbackRate.min)||!isNaN(w.liveCatchup.playbackRate.max))){var j=w.liveCatchup.playbackRate;return{min:b(j.min,H),max:F(j.max,H)}}return{min:-.5,max:.5}},getAbrBitrateParameter:function(H,B){try{var w=C.get().streaming.abr[H][B];if(!isNaN(w)&&w!==-1)return w;var j=l.getServiceDescriptionSettings();return j&&j[H]&&!isNaN(j[H][B])?j[H][B]:-1}catch{return-1}},setConfig:function(H){H.playbackController&&(o=H.playbackController),H.serviceDescriptionController&&(l=H.serviceDescriptionController)},reset:function(){}},t=(0,g.A)(p).getInstance().getLogger(e),e}oo.__dashjs_factory_name="MediaPlayerModel";var Ys=h.A.getSingletonFactory(oo),Hs=M(2365);function so(e){var t=(e=e||{}).abrController,o=e.switchHistory,l=e.droppedFramesHistory,p=e.currentRequest,C=e.useBufferOccupancyABR,b=e.useL2AABR,F=e.useLoLPABR,U=e.streamProcessor?e.streamProcessor.getScheduleController():null,H=e.streamProcessor?e.streamProcessor.getRepresentationInfo():null,B=e.videoModel?e.videoModel:null;function w(){return H?H.mediaInfo:null}return{getMediaType:function(){var j=w();return j?j.type:null},getMediaInfo:w,getDroppedFramesHistory:function(){return l},getCurrentRequest:function(){return p},getSwitchHistory:function(){return o},getStreamInfo:function(){var j=w();return j?j.streamInfo:null},getScheduleController:function(){return U},getAbrController:function(){return t},getRepresentationInfo:function(){return H},useBufferOccupancyABR:function(){return C},useL2AABR:function(){return b},useLoLPABR:function(){return F},getVideoModel:function(){return B}}}so.__dashjs_factory_name="RulesContext";var uo=h.A.getClassFactory(so),wi=M(5066);function lo(){var e=[],t=[];return{push:function(o){o.newValue===wi.A.NO_CHANGE&&(o.newValue=o.oldValue),e[o.oldValue]||(e[o.oldValue]={noDrops:0,drops:0,dropSize:0});var l=o.newValue-o.oldValue,p=l<0?1:0,C=p?-l:0,b=p?0:1;if(e[o.oldValue].drops+=p,e[o.oldValue].dropSize+=C,e[o.oldValue].noDrops+=b,t.push({idx:o.oldValue,noDrop:b,drop:p,dropSize:C}),t.length>8){var F=t.shift();e[F.idx].drops-=F.drop,e[F.idx].dropSize-=F.dropSize,e[F.idx].noDrops-=F.noDrop}},getSwitchRequests:function(){return e},reset:function(){e=[],t=[]}}}lo.__dashjs_factory_name="SwitchRequestHistory";var Vs=h.A.getClassFactory(lo);function co(){var e={},t={},o={};return{push:function(l,p,C){if(p){e[l]||(e[l]=[],t[l]=0,o[l]=0);var b=C&&C.droppedVideoFrames?C.droppedVideoFrames:0,F=C&&C.totalVideoFrames?C.totalVideoFrames:0,U=b-t[l];t[l]=b;var H=F-o[l];o[l]=F;var B=e[l];isNaN(p)||(B[p]?(B[p].droppedVideoFrames+=U,B[p].totalVideoFrames+=H):B[p]={droppedVideoFrames:U,totalVideoFrames:H})}},getFrameHistory:function(l){return e[l]},clearForStream:function(l){try{delete e[l],delete t[l],delete o[l]}catch{}},reset:function(){e={},t={},o={}}}}co.__dashjs_factory_name="DroppedFramesHistory";var Ks=h.A.getClassFactory(co);function fo(e){var t,o,l,p,C,b=this.context,F=3,U=4,H=4,B=1.3,w=1.3,j=(e=e||{}).settings,k=(0,y.A)(b).getInstance();function st(K,z,f,N){var S=Math.pow(.5,f/N.fast);K.fastEstimate=(1-S)*z+S*K.fastEstimate;var L=Math.pow(.5,f/N.slow);K.slowEstimate=(1-L)*z+L*K.slowEstimate,K.totalWeight+=f}function it(K,z,f){return j.get().streaming.abr.movingAverageMethod!==u.A.MOVING_AVERAGE_SLIDING_WINDOW?function(N,S){var L=N?C.throughputHalfLife:C.latencyHalfLife,R=N?l[S]:p[S];if(!R||R.totalWeight<=0)return NaN;var V=R.fastEstimate/(1-Math.pow(.5,R.totalWeight/L.fast)),dt=R.slowEstimate/(1-Math.pow(.5,R.totalWeight/L.slow));return N?Math.min(V,dt):Math.max(V,dt)}(K,z):function(N,S,L){var R=function(dt,ut,P){var $,Y;if(dt?($=t[ut],Y=P?F:U):($=o[ut],Y=H),$){if(Y>=$.length)Y=$.length;else if(dt)for(var gt=1;gt<Y;++gt){var vt=$[$.length-gt]/$[$.length-gt-1];if((vt>=w||vt<=1/B)&&(Y+=1)===$.length)break}}else Y=0;return Y}(N,S,L),V=(N?t:o)[S];return R!==0&&V&&V.length!==0?(V=V.slice(-R)).reduce(function(dt,ut){return dt+ut})/V.length:NaN}(K,z,f)}function ht(K,z){return it(!0,K,z)}function ot(K){t[K]=t[K]||[],o[K]=o[K]||[],l[K]=l[K]||{fastEstimate:0,slowEstimate:0,totalWeight:0},p[K]=p[K]||{fastEstimate:0,slowEstimate:0,totalWeight:0}}function et(){t={},o={},l={},p={}}var Z={push:function(K,z,f){if(z.trace&&z.trace.length){var N,S=z.tresponse.getTime()-z.trequest.getTime()||1,L=z._tfinish.getTime()-z.tresponse.getTime()||1,R=z.trace.reduce(function(P,$){return P+$.b[0]},0),V=0;if((N=z._fileLoaderType&&z._fileLoaderType===u.A.FILE_LOADER_TYPES.FETCH?z.trace.reduce(function(P,$){return P+$.d},0):f?L:S+L)!==0&&(V=Math.round(8*R/N)),z.cmsd){var dt=z.cmsd.dynamic&&z.cmsd.dynamic.etp?z.cmsd.dynamic.etp:null;if(dt){var ut=j.get().streaming.cmsd.abr.etpWeightRatio;ut>0&&ut<=1&&(V=V*(1-ut)+dt*ut)}}if(ot(K),function(P,$,Y){return P===u.A.VIDEO?Y<j.get().streaming.cacheLoadThresholds[u.A.VIDEO]:P===u.A.AUDIO?Y<j.get().streaming.cacheLoadThresholds[u.A.AUDIO]:void 0}(K,0,L)){if(t[K].length>0&&!t[K].hasCachedEntries)return;t[K].hasCachedEntries=!0}else t[K]&&t[K].hasCachedEntries&&function(P){delete t[P],delete o[P],delete l[P],delete p[P],ot(P)}(K);t[K].push(V),k.trigger(r.A.THROUGHPUT_MEASUREMENT_STORED,{throughput:V,mediaType:K,httpRequest:z}),t[K].length>20&&t[K].shift(),o[K].push(S),o[K].length>20&&o[K].shift(),st(l[K],V,.001*L,C.throughputHalfLife),st(p[K],S,1,C.latencyHalfLife)}},getAverageThroughput:ht,getSafeAverageThroughput:function(K,z){var f=ht(K,z);return isNaN(f)||(f*=j.get().streaming.abr.bandwidthSafetyFactor),f},getAverageLatency:function(K){return it(!1,K)},reset:et};return C={throughputHalfLife:{fast:3,slow:8},latencyHalfLife:{fast:1,slow:2}},et(),Z}fo.__dashjs_factory_name="ThroughputHistory";var Ws=h.A.getClassFactory(fo);function oa(){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,R,V=this.context,dt=(0,g.A)(V).getInstance(),ut=(0,y.A)(V).getInstance();function P(){p={},C={},F={},b={},Z={},f={},N={},S={},H===void 0&&(H=!1),K&&K.reset(),et=void 0,K=void 0,z=void 0,clearTimeout(U),U=null}function $(Et){var Pt=Et.request.mediaType,ce=Et.streamId;if(Pt&&ce&&b[ce]&&R.get().streaming.abr.autoSwitchBitrate[Pt]){var Kt=b[ce][Pt];if(Kt){var ye=uo(V).create({abrController:e,streamProcessor:Kt,currentRequest:Et.request,useBufferOccupancyABR:f[Pt],useL2AABR:N[Pt],useLoLPABR:S[Pt],videoModel:k}),he=o.shouldAbandonFragment(ye,ce);he.quality>wi.A.NO_CHANGE&&Kt.getFragmentModel().getRequests({state:J.FRAGMENT_MODEL_LOADING,index:Et.request.index})[0]&&(F[ce][Pt].state=_.A.ABANDON_LOAD,Z[ce][Pt].reset(),Z[ce][Pt].push({oldValue:Ct(Pt,ce),newValue:he.quality,confidence:1,reason:he.reason}),Mt(Pt,l.getActiveStreamInfo(),he.quality,he.reason),clearTimeout(U),U=setTimeout(function(){F[ce][Pt].state=_.A.ALLOW_LOAD,U=null},R.get().streaming.abandonLoadTimeout))}}}function Y(Et){Et.mediaType===u.A.VIDEO&&(et!==void 0&&K.push(Et.streamId,et,k.getPlaybackQuality()),et=Et.newQuality)}function gt(Et){var Pt,ce;Et.metric!==_.A.HTTP_REQUEST||!Et.value||Et.value.type!==jt.G.MEDIA_SEGMENT_TYPE||Et.mediaType!==u.A.AUDIO&&Et.mediaType!==u.A.VIDEO||z.push(Et.mediaType,Et.value,R.get().streaming.abr.useDeadTimeLatency),Et.metric!==_.A.BUFFER_LEVEL||Et.mediaType!==u.A.AUDIO&&Et.mediaType!==u.A.VIDEO||(Pt=Et.mediaType,ce=.001*Et.value.level,R.get().streaming.abr.ABRStrategy===u.A.ABR_STRATEGY_DYNAMIC&&function(Kt,ye){try{var he=st.getStableBufferTime(),de=he,qe=.5*he,Ye=f[Kt],sn=ye>(Ye?qe:de);f[Kt]=sn,sn!==Ye&&(sn?t.info("["+Kt+"] switching from throughput to buffer occupancy ABR rule (buffer: "+ye.toFixed(3)+")."):t.info("["+Kt+"] switching from buffer occupancy to throughput ABR rule (buffer: "+ye.toFixed(3)+")."))}catch(ln){t.error(ln)}}(Pt,ce))}function vt(Et,Pt){try{var ce;return p[Pt]=p[Pt]||{},p[Pt].hasOwnProperty(Et)||(p[Pt][Et]=0),ce=function(Kt,ye){var he=p[ye][Kt],de=he;if(!b[ye]||!b[ye][Kt])return de;var qe=ft(Kt,ye);qe!==void 0&&(de=Math.max(he,qe));var Ye=function(sn,ln){try{var kt=st.getAbrBitrateParameter("maxBitrate",sn);return kt>-1?Zt(b[ln][sn].getMediaInfo(),kt,ln):void 0}catch{return}}(Kt,ye);return Ye!==void 0&&(de=Math.min(de,Ye)),de}(Et,Pt),ce=function(Kt,ye,he){var de=p[he][ye],qe=R.get().streaming.abr.maxRepresentationRatio[ye];return isNaN(qe)||qe>=1||qe<0?Kt:Math.min(Kt,Math.round(de*qe))}(ce,Et,Pt),ce=function(Kt,ye,he){if(ye!==u.A.VIDEO||!R.get().streaming.abr.limitBitrateByPortal||!b[he]||!b[he][ye])return Kt;H||Ne();var de=b[he][ye].getStreamInfo(),qe=j.getAdaptationForType(de.index,ye,de).Representation_asArray,Ye=Kt;if(B>0&&w>0){for(;Ye>0&&qe[Ye]&&B<qe[Ye].width&&B-qe[Ye-1].width<qe[Ye].width-B;)Ye-=1;for(;Ye<qe.length-1&&qe[Ye].width===qe[Ye+1].width;)Ye+=1}return Ye}(ce,Et,Pt),R.get().streaming.cmsd.enabled&&R.get().streaming.cmsd.abr.applyMb&&(ce=function(Kt,ye,he){if(ye!=="video")return Kt;var de=ht.getMaxBitrate(ye);if(de<0)return Kt;var qe=$t(he,"audio",Ct("audio",he));de-=qe?qe.bitrate/1e3:0;var Ye=Zt(b[he][ye].getMediaInfo(),de,he);return t.debug("Stream ID: "+he+" ["+ye+"] Apply max bit rate from CMSD: "+de),Math.min(Kt,Ye)}(ce,Et,Pt)),ce}catch{return}}function ft(Et,Pt){try{return function(ce,Kt){try{var ye=st.getAbrBitrateParameter("minBitrate",ce);if(ye>-1){var he=b[Kt][ce].getMediaInfo(),de=ae(he),qe=Zt(he,ye,Kt);return de[qe]&&qe<de.length-1&&de[qe].bitrate<1e3*ye&&qe++,qe}return}catch{return}}(Et,Pt)}catch{return}}function Ct(Et){var Pt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;try{return Pt||(Pt=l.getActiveStreamInfo().id),Et&&b[Pt]&&b[Pt][Et]&&Pt?(C[Pt]=C[Pt]||{},C[Pt].hasOwnProperty(Et)||(C[Pt][Et]=0),C[Pt][Et]):0}catch{return 0}}function Mt(Et,Pt,ce){var Kt=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;if(Pt&&Pt.id&&Et){var ye=Pt.id,he=Ct(Et,ye);(0,D.zQ)(ce);var de=vt(Et,ye);ce!==he&&ce>=0&&ce<=de&&Qt(Et,he,ce,de,Kt,ye)}}function Qt(Et,Pt,ce,Kt,ye,he){if(Et&&b[he]&&b[he][Et]){var de=b[he][Et].getStreamInfo(),qe=de&&de.manifestInfo&&de.manifestInfo.isDynamic,Ye=L.getCurrentBufferLevel(Et);t.info("Stream ID: "+he+" ["+Et+"] switch from "+Pt+" to "+ce+"/"+Kt+" (buffer: "+Ye+") "+(ye?JSON.stringify(ye):".")),C[he]=C[he]||{},C[he][Et]=ce;var sn=$t(he,Et,ce);ut.trigger(i.A.QUALITY_CHANGE_REQUESTED,{oldQuality:Pt,newQuality:ce,reason:ye,streamInfo:de,bitrateInfo:sn,maxIdx:Kt,mediaType:Et},{streamId:de.id,mediaType:Et});var ln=z.getAverageThroughput(Et,qe);isNaN(ln)||ot.setSavedBitrateSettings(Et,ln)}}function $t(Et,Pt,ce){if(Pt&&b&&b[Et]&&b[Et][Pt]){var Kt=ae(b[Et][Pt].getMediaInfo());return Kt[ce]?Kt[ce]:null}return null}function Zt(Et,Pt,ce){var Kt=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null,ye=Et&&Et.type?b[ce][Et.type].getRepresentationInfo():null;if(R.get().streaming.abr.useDeadTimeLatency&&Kt&&ye&&ye.fragmentDuration){Kt/=1e3;var he=ye.fragmentDuration;if(Kt>he)return 0;Pt*=1-Kt/he}for(var de=ae(Et),qe=de.length-1;qe>=0;qe--)if(1e3*Pt>=de[qe].bitrate)return qe;return 0}function ae(Et){var Pt=[];if(!Et||!Et.bitrateList)return Pt;for(var ce,Kt=Et.bitrateList,ye=Et.type,he=0,de=Kt.length;he<de;he++)(ce=new mi).mediaType=ye,ce.qualityIndex=he,ce.bitrate=Kt[he].bandwidth,ce.width=Kt[he].width,ce.height=Kt[he].height,ce.scanType=Kt[he].scanType,Pt.push(ce);return Pt}function Ne(){if(k){var Et=R.get().streaming.abr.usePixelRatioInLimitBitrateByPortal&&window.hasOwnProperty("devicePixelRatio")?window.devicePixelRatio:1;B=k.getClientWidth()*Et,w=k.getClientHeight()*Et}}return e={initialize:function(){K=Ks(V).create(),z=Ws(V).create({settings:R}),(o=(0,Hs.A)(V).create({dashMetrics:L,customParametersModel:it,mediaPlayerModel:st,settings:R})).initialize(),ut.on(r.A.QUALITY_CHANGE_RENDERED,Y,e),ut.on(r.A.METRIC_ADDED,gt,e),ut.on(i.A.LOADING_PROGRESS,$,e)},isPlayingAtTopQuality:function(Et){var Pt=Et?Et.id:null,ce=Ct(u.A.AUDIO,Pt),Kt=Ct(u.A.VIDEO,Pt);return ce===vt(u.A.AUDIO,Pt)&&Kt===vt(u.A.VIDEO,Pt)},updateTopQualityIndex:function(Et){var Pt=Et.type,ce=Et.streamInfo.id,Kt=Et.representationCount-1;return p[ce]=p[ce]||{},p[ce][Pt]=Kt,Kt},clearDataForStream:function(Et){K&&K.clearForStream(Et),b[Et]&&delete b[Et],Z[Et]&&delete Z[Et],F[Et]&&delete F[Et]},getThroughputHistory:function(){return z},getBitrateList:ae,getQualityForBitrate:Zt,getTopBitrateInfoFor:function(Et){var Pt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(Pt||(Pt=l.getActiveStreamInfo().id),Et&&b&&b[Pt]&&b[Pt][Et]){var ce=vt(Et,Pt),Kt=ae(b[Pt][Et].getMediaInfo());return Kt[ce]?Kt[ce]:null}return null},getMinAllowedIndexFor:ft,getMaxAllowedIndexFor:vt,getInitialBitrateFor:function(Et,Pt){if(function(){if(!ot||!ot.hasOwnProperty("getSavedBitrateSettings"))throw new Error(u.A.MISSING_CONFIG_ERROR)}(),Et===u.A.TEXT)return NaN;var ce=ot.getSavedBitrateSettings(Et),Kt=st.getAbrBitrateParameter("initialBitrate",Et),ye=R.get().streaming.abr.initialRepresentationRatio[Et];if(Kt===-1)if(ye>-1){var he=b[Pt][Et].getStreamInfo(),de=j.getAdaptationForType(he.index,Et,he).Representation_asArray;Kt=Array.isArray(de)?de[Math.max(Math.round(de.length*ye)-1,0)].bandwidth/1e3:0}else Kt=isNaN(ce)?Et===u.A.VIDEO?1e3:100:ce;return Kt},getQualityFor:Ct,getAbandonmentStateFor:function(Et,Pt){return F[Et]&&F[Et][Pt]?F[Et][Pt].state:null},setPlaybackQuality:Mt,checkPlaybackQuality:function(Et,Pt){try{if(!(Et&&b&&b[Pt]&&b[Pt][Et]))return!1;if(K){var ce=k.getPlaybackQuality();ce&&K.push(Pt,et,ce)}if(!R.get().streaming.abr.autoSwitchBitrate[Et])return!1;var Kt=Ct(Et,Pt),ye=uo(V).create({abrController:e,switchHistory:Z[Pt][Et],droppedFramesHistory:K,streamProcessor:b[Pt][Et],currentValue:Kt,useBufferOccupancyABR:f[Et],useL2AABR:N[Et],useLoLPABR:S[Et],videoModel:k}),he=ft(Et,Pt),de=vt(Et,Pt),qe=o.getMaxQuality(ye),Ye=qe.quality;return he!==void 0&&(Ye>wi.A.NO_CHANGE?Ye:Kt)<he&&(Ye=he),Ye>de&&(Ye=de),Z[Pt][Et].push({oldValue:Kt,newValue:Ye}),Ye>wi.A.NO_CHANGE&&Ye!==Kt&&(F[Pt][Et].state===_.A.ALLOW_LOAD||Ye<Kt)&&(Qt(Et,Kt,Ye,de,qe.reason,Pt),!0)}catch{return!1}},setElementSize:Ne,setWindowResizeEventCalled:function(Et){H=Et},registerStreamType:function(Et,Pt){var ce=Pt.getStreamInfo().id;b[ce]||(b[ce]={}),Z[ce]||(Z[ce]={}),F[ce]||(F[ce]={}),Z[ce][Et]=Vs(V).create(),b[ce][Et]=Pt,F[ce][Et]={},F[ce][Et].state=_.A.ALLOW_LOAD,function(Kt){var ye=R.get().streaming.abr.ABRStrategy;ye===u.A.ABR_STRATEGY_L2A?(f[Kt]=!1,S[Kt]=!1,N[Kt]=!0):ye===u.A.ABR_STRATEGY_LoLP?(f[Kt]=!1,S[Kt]=!0,N[Kt]=!1):ye===u.A.ABR_STRATEGY_BOLA?(f[Kt]=!0,S[Kt]=!1,N[Kt]=!1):ye===u.A.ABR_STRATEGY_THROUGHPUT?(f[Kt]=!1,S[Kt]=!1,N[Kt]=!1):ye===u.A.ABR_STRATEGY_DYNAMIC&&(f[Kt]=!(!f||!f[Kt])&&f[Kt],S[Kt]=!1,N[Kt]=!1)}(Et),Et===u.A.VIDEO&&Ne()},unRegisterStreamType:function(Et,Pt){try{b[Et]&&b[Et][Pt]&&delete b[Et][Pt],Z[Et]&&Z[Et][Pt]&&delete Z[Et][Pt],F[Et]&&F[Et][Pt]&&delete F[Et][Pt]}catch{}},setConfig:function(Et){Et&&(Et.streamController&&(l=Et.streamController),Et.domStorage&&(ot=Et.domStorage),Et.mediaPlayerModel&&(st=Et.mediaPlayerModel),Et.customParametersModel&&(it=Et.customParametersModel),Et.cmsdModel&&(ht=Et.cmsdModel),Et.dashMetrics&&(L=Et.dashMetrics),Et.adapter&&(j=Et.adapter),Et.videoModel&&(k=Et.videoModel),Et.settings&&(R=Et.settings))},reset:function(){P(),ut.off(i.A.LOADING_PROGRESS,$,e),ut.off(r.A.QUALITY_CHANGE_RENDERED,Y,e),ut.off(r.A.METRIC_ADDED,gt,e),o&&o.reset()}},t=dt.getLogger(e),P(),e}oa.__dashjs_factory_name="AbrController";var sa=h.A.getSingletonFactory(oa);sa.QUALITY_DEFAULT=0,h.A.updateSingletonFactory(oa.__dashjs_factory_name,sa);var zs=sa,Xs=new Map([[u.A.VIDEO_ELEMENT_READY_STATES.HAVE_METADATA,"loadedmetadata"],[u.A.VIDEO_ELEMENT_READY_STATES.HAVE_CURRENT_DATA,"loadeddata"],[u.A.VIDEO_ELEMENT_READY_STATES.HAVE_FUTURE_DATA,"canplay"],[u.A.VIDEO_ELEMENT_READY_STATES.HAVE_ENOUGH_DATA,"canplaythrough"]]);function po(){var e,t,o,l,p,C,b,F,U=this.context,H=(0,y.A)(U).getInstance(),B=[];function w(){o&&(o.playbackRate=1,o.removeEventListener("canplay",w))}function j(){return B.length>0}function k(){if(o&&j()&&o.playbackRate===0){var K=document.createEvent("Event");K.initEvent("waiting",!0,!1),o.dispatchEvent(K)}}function st(K,z){o&&o.addEventListener(K,z)}function it(K,z){o&&o.removeEventListener(K,z)}function ht(){return o?o.readyState:NaN}function ot(){return o?o.buffered:null}function et(K,z,f,N,S){if(o){for(var L=0;L<o.textTracks.length;L++)if(o.textTracks[L].kind===K&&(!z||o.textTracks[L].label==z)&&o.textTracks[L].language===f&&o.textTracks[L].isTTML===N&&o.textTracks[L].isEmbedded===S)return o.textTracks[L]}return null}function Z(K,z){return K===u.A.VIDEO_ELEMENT_READY_STATES.HAVE_NOTHING||ht()>=K?(z(),null):function(f,N){var S=function(){it(f,S),N(f)};return st(f,S),{func:S,event:f}}(Xs.get(K),z)}return e={addEventListener:st,addTextTrack:function(K,z,f,N,S){if(!o)return null;var L=et(K,z,f,N,S);return L||((L=o.addTextTrack(K,z,f)).isEmbedded=S,L.isTTML=N),L},appendChild:function(K){o&&(o.appendChild(K),K.isTTML!==void 0&&(o.textTracks[o.textTracks.length-1].isTTML=K.isTTML,o.textTracks[o.textTracks.length-1].isEmbedded=K.isEmbedded))},getBufferRange:ot,getClientHeight:function(){return o?o.clientHeight:NaN},getClientWidth:function(){return o?o.clientWidth:NaN},getElement:function(){return o},getEnded:function(){return o?o.ended:null},getPlaybackQuality:function(){if(!o)return null;var K="webkitDroppedFrameCount"in o&&"webkitDecodedFrameCount"in o,z=null;return"getVideoPlaybackQuality"in o?z=o.getVideoPlaybackQuality():K&&(z={droppedVideoFrames:o.webkitDroppedFrameCount,totalVideoFrames:o.webkitDroppedFrameCount+o.webkitDecodedFrameCount,creationTime:new Date}),z},getPlaybackRate:function(){return o?o.playbackRate:null},getPlayedRanges:function(){return o?o.played:null},getReadyState:ht,getSource:function(){return o?o.src:null},getTTMLRenderingDiv:function(){return C},getTextTrack:et,getTextTracks:function(){return o?o.textTracks:[]},getTime:function(){return o?isNaN(l)?o.currentTime:l:null},getVideoHeight:function(){return o?o.videoHeight:NaN},getVideoRelativeOffsetLeft:function(){if(o){var K=o.parentNode.host||o.parentNode;return K?o.getBoundingClientRect().left-K.getBoundingClientRect().left:NaN}return NaN},getVideoRelativeOffsetTop:function(){if(o){var K=o.parentNode.host||o.parentNode;return K?o.getBoundingClientRect().top-K.getBoundingClientRect().top:NaN}return NaN},getVideoWidth:function(){return o?o.videoWidth:NaN},getVttRenderingDiv:function(){return b},initialize:function(){H.on(i.A.PLAYBACK_PLAYING,k,this)},isPaused:function(){return o?o.paused:null},isSeeking:function(){return o?o.seeking||!isNaN(l):null},isStalled:j,pause:function(){o&&(o.pause(),o.autoplay=!1)},play:function(){if(o){o.autoplay=!0;var K=o.play();K&&K.catch&&typeof Promise<"u"&&K.catch(function(z){z.name==="NotAllowedError"&&H.trigger(i.A.PLAYBACK_NOT_ALLOWED),t.warn("Caught pending play exception - continuing (".concat(z,")"))})}},removeChild:function(K){o&&o.removeChild(K)},removeEventListener:it,reset:function(){clearTimeout(F),H.off(i.A.PLAYBACK_PLAYING,k,this)},setCurrentTime:function(K,z){o&&(p&&p.func&&p.event&&it(p.event,p.func),l=K,p=Z(u.A.VIDEO_ELEMENT_READY_STATES.HAVE_METADATA,function(){if(o)if(o.currentTime!==l)try{l=z?function(f){var N=ot(),S=f,L=9999999999;if(N)for(var R=0;R<N.length;R++){var V=N.start(R),dt=N.end(R),ut=Math.abs(V-f),P=Math.abs(dt-f);if(f>=V&&f<=dt)return f;ut<L&&(L=ut,S=V),P<L&&(L=P,S=dt)}return S}(l):l,isNaN(l)||(o.currentTime=l),l=NaN}catch(f){o.readyState===0&&f.code===f.INVALID_STATE_ERR&&(F=setTimeout(function(){o.currentTime=l,l=NaN},400))}else l=NaN}))},setElement:function(K){if(!(K==null||K&&/^(VIDEO|AUDIO)$/i.test(K.nodeName)))throw"element is not video or audio DOM type!";(o=K)&&(o.preload="auto")},setPlaybackRate:function(K){o&&(!(arguments.length>1&&arguments[1]!==void 0&&arguments[1])&&o.readyState<=2&&K>0?o.addEventListener("canplay",w):o.playbackRate=K)},setSource:function(K){o&&(K?o.src=K:(o.removeAttribute("src"),o.load()))},setStallState:function(K,z){(function(f,N){N?function(S){S!==null&&o&&!o.seeking&&B.indexOf(S)===-1&&B.push(S)}(f):function(S){var L=B.indexOf(S);S!==null&&L!==-1&&B.splice(L,1)}(f)})(K,z)},setTTMLRenderingDiv:function(K){(C=K).style.position="absolute",C.style.display="flex",C.style.overflow="hidden",C.style.pointerEvents="none",C.style.top=0,C.style.left=0},setVttRenderingDiv:function(K){b=K},waitForReadyState:Z,setDisableRemotePlayback:function(K){o&&(o.disableRemotePlayback=K)}},t=(0,g.A)(U).getInstance().getLogger(e),l=NaN,e}po.__dashjs_factory_name="VideoModel";var Qs=h.A.getSingletonFactory(po),$s=[{oldKey:"dashjs_vbitrate",newKey:"dashjs_video_bitrate"},{oldKey:"dashjs_abitrate",newKey:"dashjs_audio_bitrate"},{oldKey:"dashjs_vsettings",newKey:"dashjs_video_settings"},{oldKey:"dashjs_asettings",newKey:"dashjs_audio_settings"}],ho="dashjs_?_bitrate",go="dashjs_?_settings",Ur="localStorage",mo="lastBitrate",yo="lastMediaSettings";function Eo(e){e=e||{};var t,o,l,p=this.context,C=e.settings;function b(B){if(l!==void 0)return l;var w;l=!1;try{typeof window<"u"&&(w=window[B])}catch(j){return o.warn("DOMStorage access denied: "+j.message),l}if(!w||B!==Ur)return l;try{w.setItem("1","1"),w.removeItem("1"),l=!0}catch(j){o.warn("DOMStorage is supported, but cannot be used: "+j.message)}return l}function F(){var B=6e5;return Math.round(new Date().getTime()/B)*B}function U(B,w){return b(B)&&C.get().streaming[w+"CachingInfo"].enabled}function H(){if(!C)throw new Error(u.A.MISSING_CONFIG_ERROR)}return t={getSavedBitrateSettings:function(B){if(H(),!C.get().streaming.lastBitrateCachingInfo.enabled)return NaN;var w=NaN;if(U(Ur,mo)){var j=ho.replace(/\?/,B);try{var k=JSON.parse(localStorage.getItem(j))||{},st=new Date().getTime()-parseInt(k.timestamp,10)>=C.get().streaming.lastBitrateCachingInfo.ttl||!1,it=parseFloat(k.bitrate);isNaN(it)||st?st&&localStorage.removeItem(j):(w=it,o.debug("Last saved bitrate for "+B+" was "+it))}catch{return null}}return w},setSavedBitrateSettings:function(B,w){if(U(Ur,mo)&&w){var j=ho.replace(/\?/,B);try{localStorage.setItem(j,JSON.stringify({bitrate:w.toFixed(3),timestamp:F()}))}catch(k){o.error(k.message)}}},getSavedMediaSettings:function(B){if(H(),!C.get().streaming.lastMediaSettingsCachingInfo.enabled)return null;var w=null;if(U(Ur,yo)){var j=go.replace(/\?/,B);try{var k=JSON.parse(localStorage.getItem(j))||{},st=new Date().getTime()-parseInt(k.timestamp,10)>=C.get().streaming.lastMediaSettingsCachingInfo.ttl||!1;w=k.settings,st&&(localStorage.removeItem(j),w=null)}catch{return null}}return w},setSavedMediaSettings:function(B,w){if(U(Ur,yo)){var j=go.replace(/\?/,B);try{localStorage.setItem(j,JSON.stringify({settings:w,timestamp:F()}))}catch(k){o.error(k.message)}}}},o=(0,g.A)(p).getInstance().getLogger(t),b(Ur)&&$s.forEach(function(B){var w=localStorage.getItem(B.oldKey);if(w){localStorage.removeItem(B.oldKey);try{localStorage.setItem(B.newKey,w)}catch(j){o.error(j.message)}}}),t}Eo.__dashjs_factory_name="DOMStorage";var Js=h.A.getSingletonFactory(Eo),Zs=M(6558),_o=M(5708);function Ao(){var e,t,o,l,p,C,b,F,U,H,B,w,j,k=this.context;function st(et,Z,K,z){var f=null,N=et?j.resolve(et.path):null,S=z||{init:!0,url:N?N.url:void 0,range:{start:0,end:1500},searching:!1,bytesLoaded:0,bytesToLoad:1500,mediaType:Z};t.debug("Start searching for initialization.");var L=ot(S);F.load({request:L,success:function(R){if(S.bytesLoaded=S.range.end,!(f=l.findInitRange(R)))return S.range.end=S.bytesLoaded+S.bytesToLoad,st(et,Z,K,S);et.range=f,K(et)},error:function(){K(et)}}),t.debug("Perform init search: "+S.url)}function it(et,Z,K,z,f,N){if(K&&(K.start===void 0||K.end===void 0)){var S=K?K.toString().split("-"):null;K=S?{start:parseFloat(S[0]),end:parseFloat(S[1])}:null}f=f||ht;var L=null,R=null,V=!!K,dt=et?j.resolve(et.path):null,ut={init:!1,url:dt?dt.url:void 0,range:V?K:{start:0,end:1500},searching:!V,bytesLoaded:N?N.bytesLoaded:0,bytesToLoad:1500,mediaType:Z},P=ot(ut);F.load({request:P,success:function($){var Y=ut.bytesToLoad,gt=$.byteLength;if(ut.bytesLoaded=ut.range.end-ut.range.start,L=l.parse($),(R=L.getBox("sidx"))&&R.isComplete){var vt,ft,Ct=R.references;if(Ct!=null&&Ct.length>0&&(vt=Ct[0].reference_type===1),vt){var Mt,Qt,$t,Zt;t.debug("Initiate multiple SIDX load."),ut.range.end=ut.range.start+R.size;var ae=[],Ne=0,Et=(R.offset||ut.range.start)+R.size,Pt=function(Kt){Kt?(ae=ae.concat(Kt),++Ne>=Qt&&(ae.sort(function(ye,he){return ye.startTime-he.startTime<0?-1:0}),f(ae,et,z))):f(null,et,z)};for(Mt=0,Qt=Ct.length;Mt<Qt;Mt++)$t=Et,Zt=Et+Ct[Mt].referenced_size-1,Et+=Ct[Mt].referenced_size,it(et,Z,{start:$t,end:Zt},z,Pt,ut)}else t.debug("Parsing segments from SIDX. representation "+Z+" - id: "+et.id+" for range : "+ut.range.start+" - "+ut.range.end),ft=function(Kt,ye){for(var he,de,qe,Ye,sn=Kt.references,ln=sn.length,kt=Kt.timescale,ue=Kt.earliest_presentation_time,ee=ye.range.start+Kt.offset+Kt.first_offset+Kt.size,ge=[],De=0;De<ln;De++)qe=sn[De].subsegment_duration,Ye=sn[De].referenced_size,(he=new _o.A).duration=qe,he.startTime=ue,he.timescale=kt,de=ee+Ye-1,he.mediaRange=ee+"-"+de,ge.push(he),ue+=qe,ee+=Ye;return ge}(R,ut),f(ft,et,z)}else{if(R)ut.range.start=R.offset||ut.range.start,ut.range.end=ut.range.start+(R.size||Y);else{if(gt<ut.bytesLoaded)return void f(null,et,z);var ce=L.getLastBox();ce&&ce.size?(ut.range.start=ce.offset+ce.size,ut.range.end=ut.range.start+Y):ut.range.end+=Y}it(et,Z,ut.range,z,null,ut)}},error:function(){f(null,et,z)}}),t.debug("Perform SIDX load for type ".concat(Z," : ").concat(ut.url," with range ").concat(ut.range.start," - ").concat(ut.range.end))}function ht(et,Z,K){K({segments:et,representation:Z,error:et?void 0:new pt.A(U.SEGMENT_BASE_LOADER_ERROR_CODE,U.SEGMENT_BASE_LOADER_ERROR_MESSAGE)})}function ot(et){if(et.url){var Z=new T.A;return Z.setInfo(et),Z}}return e={setConfig:function(et){et.baseURLController&&(j=et.baseURLController),et.dashMetrics&&(C=et.dashMetrics),et.mediaPlayerModel&&(b=et.mediaPlayerModel),et.errHandler&&(o=et.errHandler),et.boxParser&&(l=et.boxParser),et.debug&&(t=et.debug.getLogger(e)),et.requestModifier&&(p=et.requestModifier),et.errors&&(U=et.errors),et.urlUtils&&(w=et.urlUtils),et.constants&&(H=et.constants),et.dashConstants&&(B=et.dashConstants)},initialize:function(){F=Mn(k).create({errHandler:o,dashMetrics:C,mediaPlayerModel:b,requestModifier:p,boxParser:l,errors:U,urlUtils:w,constants:H,dashConstants:B})},loadInitialization:function(et,Z){return new Promise(function(K){st(et,Z,K)})},loadSegments:function(et,Z,K){return new Promise(function(z){it(et,Z,K,z)})},reset:function(){F&&(F.abort(),F=null)}}}Ao.__dashjs_factory_name="SegmentBaseLoader";var tu=h.A.getSingletonFactory(Ao);function vo(e){var t;e=e||{};var o=new DataView(e.data),l=0;function p(b,F){var U=!0,H=0;if(F===void 0&&(F=!1),b.tag>16777215?(o.getUint32(l)!==b.tag&&(U=!1),H=4):b.tag>65535?(256*o.getUint16(l)+o.getUint8(l+2)!==b.tag&&(U=!1),H=3):b.tag>255?(o.getUint16(l)!==b.tag&&(U=!1),H=2):(o.getUint8(l)!==b.tag&&(U=!1),H=1),!U&&b.required&&!F)throw new Error("required tag not found");return U&&(l+=H),U}function C(b){var F=1,U=128,H=-1,B=0,w=o.getUint8(l),j=0;for(j=0;j<8;j+=1){if((w&U)===U){B=b===void 0?w&~U:w,H=j;break}U>>=1}for(j=0;j<H;j+=1,F+=1)B=B<<8|255&o.getUint8(l+F);return l+=F,B}return t={getPos:function(){return l},setPos:function(b){l=b},consumeTag:p,consumeTagAndSize:function(b,F){var U=p(b,F);return U&&C(),U},parseTag:function(b){var F;return p(b),F=C(),t[b.parse](F)},skipOverElement:function(b,F){var U,H=p(b,F);return H&&(U=C(),l+=U),H},getMatroskaCodedNum:C,getMatroskaFloat:function(b){var F;switch(b){case 4:F=o.getFloat32(l),l+=4;break;case 8:F=o.getFloat64(l),l+=8}return F},getMatroskaUint:function(b){if(b>4)return function(H){for(var B=Math.floor(Number.MAX_SAFE_INTEGER/256),w=0,j=0;j<H;j+=1){if(w>B)throw new Error("Value exceeds safe integer limit");w*=256;var k=o.getUint8(l+j);if(w>Number.MAX_SAFE_INTEGER-k)throw new Error("Value exceeds safe integer limit");w+=k}return l+=H,w}(b);for(var F=0,U=0;U<b;U+=1)F<<=8,F|=255&o.getUint8(l+U);return l+=b,F>>>0},moreData:function(){return l<o.byteLength}}}vo.__dashjs_factory_name="EBMLParser";var To=h.A.getClassFactory(vo);function bo(){var e,t,o,l,p,C,b,F,U,H,B=this.context;function w(j){var k=new T.A;return k.setInfo(j),k}return e={setConfig:function(j){if(!(j.baseURLController&&j.dashMetrics&&j.mediaPlayerModel&&j.errHandler))throw new Error(u.A.MISSING_CONFIG_ERROR);H=j.baseURLController,C=j.dashMetrics,b=j.mediaPlayerModel,l=j.errHandler,U=j.errors,t=j.debug.getLogger(e),p=j.requestModifier},initialize:function(){F=Mn(B).create({errHandler:l,dashMetrics:C,mediaPlayerModel:b,requestModifier:p,errors:U})},loadInitialization:function(j,k){return new Promise(function(st){var it=null,ht=j?H.resolve(j.path):null,ot=j?j.range.split("-"):null,et={range:{start:ot?parseFloat(ot[0]):null,end:ot?parseFloat(ot[1]):null},request:it,url:ht?ht.url:void 0,init:!0,mediaType:k};t.info("Start loading initialization."),it=w(et),F.load({request:it,success:function(){st(j)},error:function(){st(j)}}),t.debug("Perform init load: "+et.url)})},loadSegments:function(j,k,st){return new Promise(function(it){var ht=null,ot=j?H.resolve(j.path):null,et=ot?ot.url:void 0;ht=w({bytesLoaded:0,bytesToLoad:8192,range:{start:0,end:8192},request:ht,url:et,init:!1,mediaType:k}),t.debug("Parsing ebml header"),F.load({request:ht,success:function(Z){(function(K,z,f,N){if(K&&K.byteLength!==0){var S,L,R,V,dt=To(B).create({data:K}),ut=f?f.split("-"):null,P=null,$={url:z,range:{start:ut?parseFloat(ut[0]):null,end:ut?parseFloat(ut[1]):null},request:P};for(t.debug("Parse EBML header: "+$.url),dt.skipOverElement(o.EBML),dt.consumeTag(o.Segment),R=dt.getMatroskaCodedNum(),R+=dt.getPos(),V=dt.getPos();dt.moreData()&&!dt.consumeTagAndSize(o.Segment.Info,!0);)if(!(dt.skipOverElement(o.Segment.SeekHead,!0)||dt.skipOverElement(o.Segment.Tracks,!0)||dt.skipOverElement(o.Segment.Cues,!0)||dt.skipOverElement(o.Void,!0)))throw new Error("no valid top level element found");for(;S===void 0;){var Y=dt.getMatroskaCodedNum(!0),gt=dt.getMatroskaCodedNum();Y===o.Segment.Info.Duration.tag?S=dt[o.Segment.Info.Duration.parse](gt):dt.setPos(dt.getPos()+gt)}P=w($),F.load({request:P,success:function(vt){L=function(ft,Ct,Mt,Qt){var $t,Zt,ae,Ne,Et,Pt,ce,Kt;for(ae=[],Et=0,Pt=(Zt=function(ye){var he,de,qe=[],Ye=To(B).create({data:ye});for(Ye.consumeTagAndSize(o.Segment.Cues);Ye.moreData()&&Ye.consumeTagAndSize(o.Segment.Cues.CuePoint,!0);){for((he={}).CueTime=Ye.parseTag(o.Segment.Cues.CuePoint.CueTime),he.CueTracks=[];Ye.moreData()&&Ye.consumeTag(o.Segment.Cues.CuePoint.CueTrackPositions,!0);){var sn=Ye.getMatroskaCodedNum(),ln=Ye.getPos();if((de={}).Track=Ye.parseTag(o.Segment.Cues.CuePoint.CueTrackPositions.CueTrack),de.Track===0)throw new Error("Cue track cannot be 0");de.ClusterPosition=Ye.parseTag(o.Segment.Cues.CuePoint.CueTrackPositions.CueClusterPosition),he.CueTracks.push(de),Ye.setPos(ln+sn)}if(he.CueTracks.length===0)throw new Error("Mandatory cuetrack not found");qe.push(he)}if(qe.length===0)throw new Error("mandatory cuepoint not found");return qe}(ft)).length;Et<Pt;Et+=1)Ne=new _o.A,$t=Et<Zt.length-1?Zt[Et+1].CueTime-Zt[Et].CueTime:Qt-Zt[Et].CueTime,Ne.duration=$t,Ne.startTime=Zt[Et].CueTime,Ne.timescale=1e3,ce=Zt[Et].CueTracks[0].ClusterPosition+Ct,Kt=Et<Zt.length-1?Zt[Et+1].CueTracks[0].ClusterPosition+Ct-1:Mt-1,Ne.mediaRange=ce+"-"+Kt,ae.push(Ne);return t.debug("Parsed cues: "+ae.length+" cues."),ae}(vt,V,R,S),N(L)},error:function(){t.error("Download Error: Cues "+$.url),N(null)}}),t.debug("Perform cues load: "+$.url+" bytes="+$.range.start+"-"+$.range.end)}else N(null)})(Z,et,st,function(K){it({segments:K,representation:j,error:K?void 0:new pt.A(U.SEGMENT_BASE_LOADER_ERROR_CODE,U.SEGMENT_BASE_LOADER_ERROR_MESSAGE)})})},error:function(){it({representation:j,error:new pt.A(U.SEGMENT_BASE_LOADER_ERROR_CODE,U.SEGMENT_BASE_LOADER_ERROR_MESSAGE)})}})})},reset:function(){F&&(F.abort(),F=null)}},o={EBML:{tag:440786851,required:!0},Segment:{tag:408125543,required:!0,SeekHead:{tag:290298740,required:!0},Info:{tag:357149030,required:!0,TimecodeScale:{tag:2807729,required:!0,parse:"getMatroskaUint"},Duration:{tag:17545,required:!0,parse:"getMatroskaFloat"}},Tracks:{tag:374648427,required:!0},Cues:{tag:475249515,required:!0,CuePoint:{tag:187,required:!0,CueTime:{tag:179,required:!0,parse:"getMatroskaUint"},CueTrackPositions:{tag:183,required:!0,CueTrack:{tag:247,required:!0,parse:"getMatroskaUint"},CueClusterPosition:{tag:241,required:!0,parse:"getMatroskaUint"}}}}},Void:{tag:236,required:!0}},e}bo.__dashjs_factory_name="WebmSegmentBaseLoader";var eu=h.A.getSingletonFactory(bo);function So(e){e=e||{};var t,o,l,p=this.context,C=e.eventBus,b=e.events,F=e.dashMetrics,U=e.mediaPlayerModel,H=e.errHandler,B=e.baseURLController,w=e.debug,j=e.boxParser,k=e.requestModifier,st=e.errors;function it(ht){return(ht?ht.split("/")[1]:"").toLowerCase()==="webm"}return t={initialize:function(){o.initialize(),l.initialize()},getSegmentBaseInitSegment:function(ht){return it(ht.representation.mimeType)?l.loadInitialization(ht.representation,ht.mediaType):o.loadInitialization(ht.representation,ht.mediaType)},getSegmentList:function(ht){return it(ht.mimeType)?l.loadSegments(ht.representation,ht.mediaType,ht.representation?ht.representation.indexRange:null):o.loadSegments(ht.representation,ht.mediaType,ht.representation?ht.representation.indexRange:null)},reset:function(){o.reset(),l.reset()}},o=tu(p).getInstance(),l=eu(p).getInstance(),o.setConfig({baseURLController:B,dashMetrics:F,mediaPlayerModel:U,errHandler:H,eventBus:C,events:b,errors:st,debug:w,boxParser:j,requestModifier:k}),l.setConfig({baseURLController:B,dashMetrics:F,mediaPlayerModel:U,errHandler:H,eventBus:C,events:b,errors:st,debug:w,requestModifier:k}),t}So.__dashjs_factory_name="SegmentBaseController";var nu=h.A.getSingletonFactory(So);function ru(e,t,o){return Object.defineProperty(e,"prototype",{writable:!1}),e}var Io=ru(function e(){(function(t,o){if(!(t instanceof o))throw new TypeError("Cannot call a class as a function")})(this,e),this.id=null,this.quality=null,this.fragmentDuration=null,this.mediaInfo=null,this.MSETimeOffset=null});function iu(e,t,o){return Object.defineProperty(e,"prototype",{writable:!1}),e}var ua=iu(function e(){(function(t,o){if(!(t instanceof o))throw new TypeError("Cannot call a class as a function")})(this,e),this.id=null,this.index=null,this.type=null,this.streamInfo=null,this.representationCount=0,this.labels=null,this.lang=null,this.viewpoint=null,this.viewpointsWithSchemeIdUri=null,this.accessibility=null,this.accessibilitiesWithSchemeIdUri=null,this.audioChannelConfiguration=null,this.audioChannelConfigurationsWithSchemeIdUri=null,this.roles=null,this.rolesWithSchemeIdUri=null,this.codec=null,this.mimeType=null,this.contentProtection=null,this.isText=!1,this.KID=null,this.bitrateList=null,this.isFragmented=null,this.isEmbedded=null,this.selectionPriority=1,this.supplementalProperties={},this.supplementalPropertiesAsArray=[],this.essentialProperties={},this.essentialPropertiesAsArray=[],this.segmentAlignment=!1,this.subSegmentAlignment=!1});function au(e,t,o){return Object.defineProperty(e,"prototype",{writable:!1}),e}var Ro=au(function e(){(function(t,o){if(!(t instanceof o))throw new TypeError("Cannot call a class as a function")})(this,e),this.id=null,this.index=null,this.start=NaN,this.duration=NaN,this.manifestInfo=null,this.isLast=!0});function ou(e,t,o){return Object.defineProperty(e,"prototype",{writable:!1}),e}var su=ou(function e(){(function(t,o){if(!(t instanceof o))throw new TypeError("Cannot call a class as a function")})(this,e),this.dvrWindowSize=NaN,this.loadedTime=null,this.availableFrom=null,this.minBufferTime=NaN,this.duration=NaN,this.isDynamic=!1,this.maxFragmentDuration=null,this.serviceDescriptions=[],this.protocol=null});function ri(e){return ri=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},ri(e)}function uu(e,t){for(var o=0;o<t.length;o++){var l=t[o];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(e,lu(l.key),l)}}function lu(e){var t=function(o){if(ri(o)!="object"||!o)return o;var l=o[Symbol.toPrimitive];if(l!==void 0){var p=l.call(o,"string");if(ri(p)!="object")return p;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(o)}(e);return ri(t)=="symbol"?t:t+""}var cu=function(){return e=function o(l){var p=this;(function(C,b){if(!(C instanceof b))throw new TypeError("Cannot call a class as a function")})(this,o),this.valid=l[0]=="/",this.path=l.split("/").filter(function(C){return C.length!==0}).map(function(C){var b={name:C},F=C.indexOf("[");if(F!=-1){b.name=C.substring(0,F);var U=C.substring(F+1,C.length-1);p.valid=p.valid&&U.indexOf("[")==-1;var H=U.indexOf("=");H!=-1?(b.attribute={name:U.substring(1,H),value:U.substring(H+1)},["'",'"'].indexOf(b.attribute.value[0])!=-1&&(b.attribute.value=b.attribute.value.substring(1,b.attribute.value.length-1))):b.position=parseInt(U,10)-1}return b})},(t=[{key:"isValid",value:function(){return this.valid}},{key:"findsElement",value:function(){return!this.findsAttribute()}},{key:"findsAttribute",value:function(){return this.path[this.path.length-1].name.startsWith("@")}},{key:"findsTextReplace",value:function(){return this.path[this.path.length-1].name==="text()"}},{key:"getMpdTarget",value:function(o,l){for(var p=this,C=null,b=o,F=1,U="MPD",H=function(){C=b;var B=p.path[F];if(U=B.name,F!==p.path.length-1||!U.startsWith("@")&&U!=="text()"){var w=C[U+"_asArray"]||[];if(w.length===0&&C[U]&&w.push(C[U]),B.position)b=w[B.position]||null;else if(B.attribute){var j=B.attribute;b=w.filter(function(k){return k[j.name]==j.value})[0]||null}else b=w[0]||null}F++};F<this.path.length&&b!==null;)H();return b===null?null:U.startsWith("@")?{name:U.substring(1),leaf:b,target:b}:U==="text()"?{name:"__text",leaf:b,target:b}:{name:U,leaf:b,target:l?C:b}}}])&&uu(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();function ii(e){return ii=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},ii(e)}function fu(e,t){for(var o=0;o<t.length;o++){var l=t[o];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(e,du(l.key),l)}}function du(e){var t=function(o){if(ii(o)!="object"||!o)return o;var l=o[Symbol.toPrimitive];if(l!==void 0){var p=l.call(o,"string");if(ii(p)!="object")return p;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(o)}(e);return ii(t)=="symbol"?t:t+""}var pu=function(){return e=function o(l,p,C){(function(b,F){if(!(b instanceof F))throw new TypeError("Cannot call a class as a function")})(this,o),this.action=l,this.xpath=p,this.value=C,this.position=null},(t=[{key:"getMpdTarget",value:function(o){var l=this.action==="remove"||this.action==="replace"||this.position==="before"||this.position==="after";return this.xpath.getMpdTarget(o,l)}}])&&fu(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();function wo(){var e,t,o=this.context;return e={getIsPatch:function(l){return l&&l.hasOwnProperty(n.A.ORIGINAL_MPD_ID)||!1},getPublishTime:function(l){return l&&l.hasOwnProperty(n.A.PUBLISH_TIME)?new Date(l[n.A.PUBLISH_TIME]):null},getOriginalPublishTime:function(l){return l&&l.hasOwnProperty(n.A.ORIGINAL_PUBLISH_TIME)?new Date(l[n.A.ORIGINAL_PUBLISH_TIME]):null},getMpdId:function(l){return l&&l[n.A.ORIGINAL_MPD_ID]||null},getPatchOperations:function(l){return l?(l.__children||[]).map(function(p){var C=Object.keys(p)[0];if(C!=="add"&&C!=="remove"&&C!=="replace")return t.warn("Ignoring node of invalid action: ".concat(C)),null;var b=p[C],F=b.sel;if(C==="add"&&b.type){if(!b.type.startsWith("@"))return t.warn("Ignoring add action for prefixed namespace declaration: ".concat(b.type,"=").concat(b.__text)),null;F="".concat(F,"/").concat(b.type)}var U=new cu(F);if(!U.isValid())return t.warn("Ignoring action with invalid selector: ".concat(C," - ").concat(F)),null;var H=null;U.findsAttribute()||U.findsTextReplace()?H=b.__text||"":C!=="remove"&&(H=b.__children.reduce(function(w,j){var k=Object.keys(j)[0];return k!=="#text"&&(w[k]=w[k]||[],w[k].push(j[k])),w},{}));var B=new pu(C,U,H);return C==="add"&&(B.position=b.pos),B}).filter(function(p){return!!p}):[]}},t=(0,g.A)(o).getInstance().getLogger(e),e}wo.__dashjs_factory_name="PatchManifestModel";var hu=h.A.getSingletonFactory(wo);function No(){var e,t,o,l,p,C,b,F=this.context;function U(S,L,R){var V,dt=t.getAdaptationsForType(l[0].mpd.manifest,S,L);if(!dt||dt.length===0)return null;if(dt.length>1&&R){var ut=w(R,L);if(p[R.id]&&p[R.id][L]){for(var P=0,$=dt.length;P<$;P++)if(H(p[R.id][L],ut[P]))return dt[P]}for(var Y=0,gt=dt.length;Y<gt;Y++)if(V=dt[Y],t.getRolesForAdaptation(V).filter(function(vt){return vt.value===n.A.MAIN})[0])return dt[Y]}return dt[0]}function H(S,L){if(!S||!L)return!1;var R=S.id===L.id,V=S.codec===L.codec,dt=S.viewpoint===L.viewpoint,ut=JSON.stringify(S.viewpointsWithSchemeIdUri)===JSON.stringify(L.viewpointsWithSchemeIdUri),P=S.lang===L.lang,$=S.roles.toString()===L.roles.toString(),Y=JSON.stringify(S.rolesWithSchemeIdUri)===JSON.stringify(L.rolesWithSchemeIdUri),gt=S.accessibility.toString()===L.accessibility.toString(),vt=JSON.stringify(S.accessibilitiesWithSchemeIdUri)===JSON.stringify(L.accessibilitiesWithSchemeIdUri),ft=S.audioChannelConfiguration.toString()===L.audioChannelConfiguration.toString(),Ct=JSON.stringify(S.audioChannelConfigurationsWithSchemeIdUri)===JSON.stringify(L.audioChannelConfigurationsWithSchemeIdUri);return R&&V&&dt&&ut&&P&&$&&Y&>&&vt&&ft&&Ct}function B(S,L,R,V,dt,ut){var P,$,Y,gt,vt,ft,Ct=[];if(!V||V.length===0)return[];var Mt=t.getAdaptationsForPeriod(L);for(gt=0,ft=V.length;gt<ft;gt++)if(P=V[gt],$=et(Mt[Y=t.getIndexForAdaptation(P,S,R.index)]),ut){var Qt=$.accessibility.length;for(vt=0;vt<Qt;vt++)if($){var $t=$.accessibility[vt];if($t.indexOf("cea-608:")===0){var Zt=$t.substring(8).split(";");if(Zt[0].substring(0,2)==="CC")for(vt=0;vt<Zt.length;vt++)$||($=et.call(this,Mt[Y])),Z($,Zt[vt].substring(0,3),Zt[vt].substring(4)),Ct.push($),$=null;else for(vt=0;vt<Zt.length;vt++)$||($=et.call(this,Mt[Y])),Z($,"CC"+(vt+1),Zt[vt]),Ct.push($),$=null}else $t.indexOf("cea-608")===0&&(Z($,C.CC1,"eng"),Ct.push($),$=null)}}else dt===C.IMAGE?($.type=C.IMAGE,Ct.push($),$=null):$&&Ct.push($);return Ct}function w(S,L,R){var V=l,dt=R,ut=[];if(dt)z(),V=j(dt);else{if(!(l.length>0))return ut;dt=l[0].mpd.manifest}var P=ot(S,V),$=t.getAdaptationsForType(dt,S?S.index:null,L);return ut=B(dt,P,S,$,L),L===C.TEXT&&($=t.getAdaptationsForType(dt,S?S.index:null,C.VIDEO),ut=ut.concat(B(dt,P,S,$,L,!0))),ut}function j(S){var L=k(S);return t.getRegularPeriods(L)}function k(S){var L=it(S);return t.getMpd(L)}function st(){l=[],p={}}function it(S){return S||(l.length>0?l[0].mpd.manifest:null)}function ht(S){try{var L=ot(S.streamInfo,l),R=t.getAdaptationsForPeriod(L);return S&&S.streamInfo&&S.streamInfo.id!==void 0&&R?R[S.index]:null}catch{return null}}function ot(S,L){for(var R=L.length,V=0;V<R;V++){var dt=L[V];if(S&&S.id===dt.id)return dt}return null}function et(S){if(!S)return null;var L,R,V,dt,ut,P=new ua,$=S.period.mpd.manifest.Period_asArray[S.period.index].AdaptationSet_asArray[S.index];if(P.id=S.id,P.index=S.index,P.type=S.type,P.streamInfo=K(S.period),P.representationCount=t.getRepresentationCount($),P.labels=t.getLabelsForAdaptation($),P.lang=t.getLanguageForAdaptation($),P.segmentAlignment=t.getSegmentAlignment($),P.subSegmentAlignment=t.getSubSegmentAlignment($),L=t.getViewpointForAdaptation($),P.viewpoint=L.length?L[0].value:void 0,P.viewpointsWithSchemeIdUri=L,ut=t.getAccessibilityForAdaptation($),P.accessibility=ut.map(function(Ct){var Mt=Ct.value,Qt=Mt;return Ct.schemeIdUri&&Ct.schemeIdUri.search("cea-608")>=0&&b!==void 0&&(Qt=Mt?"cea-608:"+Mt:"cea-608",P.embeddedCaptions=!0),Qt}),P.accessibilitiesWithSchemeIdUri=ut,R=t.getAudioChannelConfigurationForAdaptation($),P.audioChannelConfiguration=R.map(function(Ct){return Ct.value}),P.audioChannelConfigurationsWithSchemeIdUri=R,P.audioChannelConfiguration.length===0&&Array.isArray($.Representation_asArray)&&$.Representation_asArray.length>0&&(V=t.getAudioChannelConfigurationForRepresentation($.Representation_asArray[0]),P.audioChannelConfiguration=V.map(function(Ct){return Ct.value}),P.audioChannelConfigurationsWithSchemeIdUri=V),dt=t.getRolesForAdaptation($),P.roles=dt.map(function(Ct){return Ct.value}),P.rolesWithSchemeIdUri=dt,P.codec=t.getCodec($),P.mimeType=t.getMimeType($),P.contentProtection=t.getContentProtectionData($),P.bitrateList=t.getBitrateListForAdaptation($),P.selectionPriority=t.getSelectionPriority($),P.contentProtection){var Y=P.contentProtection.map(function(Ct){return t.getKID(Ct)}).filter(function(Ct){return Ct!==null});if(Y.length){var gt=Y[0];P.contentProtection.forEach(function(Ct){Ct.keyId=gt})}}if(P.isText=t.getIsText($),P.supplementalProperties=t.getSupplementalPropertiesForAdaptation($),(!P.supplementalProperties||Object.keys(P.supplementalProperties).length===0)&&Array.isArray($.Representation_asArray)&&$.Representation_asArray.length>0){var vt=$.Representation_asArray.map(function(Ct){return t.getSupplementalPropertiesForRepresentation(Ct)});vt.every(function(Ct){return JSON.stringify(Ct)===JSON.stringify(vt[0])})&&(P.supplementalProperties=vt[0])}if(P.supplementalPropertiesAsArray=t.getSupplementalPropertiesAsArrayForAdaptation($),(!P.supplementalPropertiesAsArray||P.supplementalPropertiesAsArray.length===0)&&Array.isArray($.Representation_asArray)&&$.Representation_asArray.length>0){var ft=$.Representation_asArray.map(function(Ct){return t.getSupplementalPropertiesAsArrayForRepresentation(Ct)});ft.every(function(Ct){return JSON.stringify(Ct)===JSON.stringify(ft[0])})&&(P.supplementalPropertiesAsArray=ft[0])}return P.essentialProperties=t.getEssentialPropertiesForAdaptation($),P.essentialPropertiesAsArray=t.getEssentialPropertiesAsArrayForAdaptation($),P.isFragmented=t.getIsFragmented($),P.isEmbedded=!1,P}function Z(S,L,R){S.id=L,S.index=100+parseInt(L.substring(2,3)),S.type=C.TEXT,S.codec="cea-608-in-SEI",S.isEmbedded=!0,S.isFragmented=!1,S.lang=R,S.roles=["caption"],S.rolesWithSchemeIdUri=[{schemeIdUri:"urn:mpeg:dash:role:2011",value:"caption"}]}function K(S){var L,R,V=new Ro;return V.id=S.id,V.index=S.index,V.start=S.start,V.duration=S.duration,V.manifestInfo=(L=S.mpd,(R=new su).dvrWindowSize=L.timeShiftBufferDepth,R.loadedTime=L.manifest.loadedTime,R.availableFrom=L.availabilityStartTime,R.minBufferTime=L.manifest.minBufferTime,R.maxFragmentDuration=L.maxSegmentDuration,R.duration=t.getDuration(L.manifest),R.isDynamic=t.getIsDynamic(L.manifest),R.serviceDescriptions=t.getServiceDescriptions(L.manifest),R.protocol=L.manifest.protocol,R),V.isLast=S.mpd.manifest.Period_asArray.length===1||Math.abs(V.start+V.duration-V.manifestInfo.duration)<1,V}function z(){if(!C)throw new Error("setConfig function has to be called previously")}function f(S){return l.length>0?l[0].mpd.manifest.Period_asArray[S]:null}function N(S,L,R){var V,dt,ut,P,$;if(S){for(V=S.AdaptationSet_asArray,P=0;P<V.length;P+=1)for(ut=V[P].Representation_asArray,$=0;$<ut.length;$+=1)if(L===(dt=ut[$]).id)return R?$:dt}return null}return e={getBandwidthForRepresentation:function(S,L){var R;return(R=N(f(L),S))?R.bandwidth:null},getIndexForRepresentation:function(S,L){return function(R,V){var dt=N(R,V,!0);return dt!==null?dt:-1}(f(L),S)},getMaxIndexForBufferType:function(S,L){return function(R,V){var dt,ut,P,$;if(!R||!V)return-1;for(ut=R.AdaptationSet_asArray,$=0;$<ut.length;$+=1)if(P=(dt=ut[$]).Representation_asArray,t.getIsTypeOf(dt,V))return P.length;return-1}(f(L),S)},convertRepresentationToRepresentationInfo:function(S){if(S){var L=new Io,R=S.adaptation.period.mpd.manifest.Period_asArray[S.adaptation.period.index].AdaptationSet_asArray[S.adaptation.index],V=t.getRepresentationFor(S.index,R);return L.id=S.id,L.quality=S.index,L.bandwidth=t.getBandwidth(V),L.fragmentDuration=S.segmentDuration||(S.segments&&S.segments.length>0?S.segments[0].duration:NaN),L.MSETimeOffset=S.MSETimeOffset,L.mediaInfo=et(S.adaptation),L}return null},getStreamsInfo:function(S,L){var R=[],V=l;if(S&&(z(),V=j(S)),V.length>0){(!L||L>V.length)&&(L=V.length);for(var dt=0;dt<L;dt++)R.push(K(V[dt]))}return R},getMediaInfoForType:function(S,L){if(l.length===0||!S)return null;var R=ot(S,l);if(!R)return null;var V=t.getAdaptationsForPeriod(R),dt=U(S.index,L,S);return dt?et(V[t.getIndexForAdaptation(dt,l[0].mpd.manifest,S.index)]):null},getAllMediaInfoForType:w,getAdaptationForType:U,getRealAdaptation:function(S,L){var R,V,dt=ot(S,l);return R=L?L.id:null,l.length>0&&dt&&(V=R?t.getAdaptationForId(R,l[0].mpd.manifest,dt.index):t.getAdaptationForIndex(L?L.index:null,l[0].mpd.manifest,dt.index)),V},getProducerReferenceTimes:function(S,L){var R,V,dt=ot(S,l);return R=L?L.id:null,l.length>0&&dt&&(V=R?t.getAdaptationForId(R,l[0].mpd.manifest,dt.index):t.getAdaptationForIndex(L?L.index:null,l[0].mpd.manifest,dt.index)),V?t.getProducerReferenceTimesForAdaptation(V):[]},getRealPeriodByIndex:function(S){return t.getRealPeriodForIndex(S,l[0].mpd.manifest)},getEssentialPropertiesForRepresentation:function(S){try{return t.getEssentialPropertiesForRepresentation(S)}catch{return[]}},getVoRepresentations:function(S){var L=ht(S);return t.getRepresentationsForAdaptation(L)},getEventsFor:function(S,L,R){var V=[];if(l.length>0){var dt=l[0].mpd.manifest;if(S instanceof Ro){var ut=ot(S,l);V=t.getEventsForPeriod(ut)}else if(S instanceof ua){var P=ot(R,l);V=t.getEventStreamForAdaptationSet(dt,ht(S),P)}else if(S instanceof Io){var $=ot(R,l);V=t.getEventStreamForRepresentation(dt,L,$)}}return V},getEvent:function(S,L,R,V){try{if(!S||!L||isNaN(R)||!V)return null;var dt=S.scheme_id_uri,ut=S.value;if(!L[dt+"/"+ut])return null;var P,$=new jr,Y=S.timescale||1,gt=V.adaptation.period.start,vt=L[dt+"/"+ut],ft=isNaN(V.presentationTimeOffset)?isNaN(vt.presentationTimeOffset)?0:vt.presentationTimeOffset:V.presentationTimeOffset,Ct=S.presentation_time_delta/Y;P=S.version===0?gt+R-ft+Ct:gt-ft+Ct;var Mt=S.event_duration/Y,Qt=S.id,$t=S.message_data;return $.eventStream=vt,$.eventStream.value=ut,$.eventStream.timescale=Y,$.duration=Mt,$.id=Qt,$.calculatedPresentationTime=P,$.messageData=$t,$.presentationTimeDelta=Ct,$}catch{return null}},getMpd:k,setConfig:function(S){S&&(S.constants&&(C=S.constants),S.cea608parser&&(b=S.cea608parser),S.errHandler&&t.setConfig({errHandler:S.errHandler}),S.BASE64&&t.setConfig({BASE64:S.BASE64}))},updatePeriods:function(S){if(!S)return null;z(),l=j(S)},getIsTextTrack:function(S){return t.getIsText(S)},getUTCTimingSources:function(){var S=it();return t.getUTCTimingSources(S)},getSuggestedPresentationDelay:function(){var S=l.length>0?l[0].mpd:null;return t.getSuggestedPresentationDelay(S)},getAvailabilityStartTime:function(S){var L=k(S);return t.getAvailabilityStartTime(L)},getIsTypeOf:function(S,L){return t.getIsTypeOf(S,L)},getIsDynamic:function(S){var L=it(S);return t.getIsDynamic(L)},getDuration:function(S){var L=it(S);return t.getDuration(L)},getRegularPeriods:j,getContentSteering:function(S){return t.getContentSteering(S)},getLocation:function(S){return t.getLocation(S)},getPatchLocation:function(S){var L=t.getPatchLocation(S),R=t.getPublishTime(S);return L&&L.length!==0&&R?L.filter(function(V){return isNaN(V.ttl)||R.getTime()+V.ttl>new Date().getTime()}):[]},getManifestUpdatePeriod:function(S){var L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return t.getManifestUpdatePeriod(S,L)},getPublishTime:function(S){return t.getPublishTime(S)},getIsDVB:function(S){return t.hasProfile(S,"urn:dvb:dash:profile:dvb-dash:2014")},getIsPatch:function(S){return o.getIsPatch(S)},getBaseURLsFromElement:function(S){return t.getBaseURLsFromElement(S)},getRepresentationSortFunction:function(){return t.getRepresentationSortFunction()},getCodec:function(S,L,R){return t.getCodec(S,L,R)},getPeriodById:function(S){if(!S||l.length===0)return null;var L=l.filter(function(R){return R.id===S});return L&&L.length>0?L[0]:null},setCurrentMediaInfo:function(S,L,R){p[S]=p[S]||{},p[S][L]=p[S][L]||{},p[S][L]=R},isPatchValid:function(S,L){var R=t.getId(S),V=o.getMpdId(L),dt=t.getPublishTime(S),ut=o.getPublishTime(L),P=o.getOriginalPublishTime(L);return!!(R&&V&&R==V&&dt&&P&&dt.getTime()==P.getTime()&&ut&&dt.getTime()<ut.getTime())},applyPatchToManifest:function(S,L){o.getPatchOperations(L).forEach(function(R){var V=R.getMpdTarget(S);if(V!==null){var dt=V.name,ut=V.target,P=V.leaf;if(R.xpath.findsAttribute()||dt==="__text")switch(R.action){case"add":case"replace":ut[dt]=R.value;break;case"remove":delete ut[dt]}else{var $=(ut[dt+"_asArray"]||[]).indexOf(P),Y=R.position==="prepend"||R.position==="before";if((R.action==="remove"||R.action==="replace")&&(delete ut[dt],$!=-1)){var gt=ut[dt+"_asArray"];gt.splice($,1),gt.length>1?ut[dt]=gt:gt.length==1?ut[dt]=gt[0]:delete ut[dt+"_asArray"]}R.action!=="add"&&R.action!=="replace"||Object.keys(R.value).forEach(function(vt){var ft=R.value[vt],Ct=ut[vt+"_asArray"]||[];if(Ct.length===0&&ut[vt]&&Ct.push(ut[vt]),Ct.length===0)Ct=ft;else{var Mt=Ct.length;Mt=vt==dt&&$!=-1?$+(Y?0:1)+(R.action=="replace"?-1:0):Y?0:Ct.length,Ct.splice.apply(Ct,[Mt,0].concat(ft))}ut[vt+"_asArray"]=Ct,ut[vt]=Ct.length==1?Ct[0]:Ct})}}})},areMediaInfosEqual:H,reset:st},t=Ie(F).getInstance(),o=hu(F).getInstance(),st(),e}No.__dashjs_factory_name="DashAdapter";var gu=h.A.getSingletonFactory(No);function ai(e){return ai=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},ai(e)}function mu(e,t){for(var o=0;o<t.length;o++){var l=t[o];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(e,yu(l.key),l)}}function yu(e){var t=function(o){if(ai(o)!="object"||!o)return o;var l=o[Symbol.toPrimitive];if(l!==void 0){var p=l.call(o,"string");if(ai(p)!="object")return p;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(o)}(e);return ai(t)=="symbol"?t:t+""}var Eu=function(){return e=function o(){(function(l,p){if(!(l instanceof p))throw new TypeError("Cannot call a class as a function")})(this,o)},t=[{key:"round10",value:function(o,l){return function(p,C,b){return b===void 0||+b==0?Math[p](C):(b=+b,(C=+C)===null||isNaN(C)||typeof b!="number"||b%1!=0?NaN:(C=C.toString().split("e"),+((C=(C=Math[p](+(C[0]+"e"+(C[1]?+C[1]-b:-b)))).toString().split("e"))[0]+"e"+(C[1]?+C[1]+b:b))))}("round",o,l)}}],t&&mu(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();function _u(e,t,o){return Object.defineProperty(e,"prototype",{writable:!1}),e}var Au=_u(function e(){(function(t,o){if(!(t instanceof o))throw new TypeError("Cannot call a class as a function")})(this,e),this.TcpList=[],this.HttpList=[],this.RepSwitchList=[],this.BufferLevel=[],this.BufferState=[],this.PlayList=[],this.DroppedFrames=[],this.SchedulingInfo=[],this.DVRInfo=[],this.ManifestUpdate=[],this.RequestsQueue=null,this.DVBErrors=[]});function vu(e,t,o){return Object.defineProperty(e,"prototype",{writable:!1}),e}var Tu=vu(function e(){(function(t,o){if(!(t instanceof o))throw new TypeError("Cannot call a class as a function")})(this,e),this.t=null,this.mt=null,this.to=null,this.lto=null});function bu(e,t,o){return Object.defineProperty(e,"prototype",{writable:!1}),e}var Su=bu(function e(){(function(t,o){if(!(t instanceof o))throw new TypeError("Cannot call a class as a function")})(this,e),this.t=null,this.level=null});function Iu(e,t,o){return Object.defineProperty(e,"prototype",{writable:!1}),e}var Ru=Iu(function e(){(function(t,o){if(!(t instanceof o))throw new TypeError("Cannot call a class as a function")})(this,e),this.target=null,this.state=_.A.BUFFER_EMPTY});function wu(e,t,o){return Object.defineProperty(e,"prototype",{writable:!1}),e}var Nu=wu(function e(){(function(t,o){if(!(t instanceof o))throw new TypeError("Cannot call a class as a function")})(this,e),this.time=null,this.range=null,this.manifestInfo=null});function Cu(e,t,o){return Object.defineProperty(e,"prototype",{writable:!1}),e}var Du=Cu(function e(){(function(t,o){if(!(t instanceof o))throw new TypeError("Cannot call a class as a function")})(this,e),this.time=null,this.droppedFrames=null});function la(e,t,o){return Object.defineProperty(e,"prototype",{writable:!1}),e}function ca(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var Ou=la(function e(){ca(this,e),this.mediaType=null,this.type=null,this.requestTime=null,this.fetchTime=null,this.availabilityStartTime=null,this.presentationStartTime=0,this.clientTimeOffset=0,this.currentTime=null,this.buffered=null,this.latency=0,this.streamInfo=[],this.representationInfo=[]}),Mu=la(function e(){ca(this,e),this.id=null,this.index=null,this.start=null,this.duration=null}),Pu=la(function e(){ca(this,e),this.id=null,this.index=null,this.mediaType=null,this.streamIndex=null,this.presentationTimeOffset=null,this.startNumber=null,this.fragmentInfoType=null});function Lu(e,t,o){return Object.defineProperty(e,"prototype",{writable:!1}),e}var Fu=Lu(function e(){(function(t,o){if(!(t instanceof o))throw new TypeError("Cannot call a class as a function")})(this,e),this.mediaType=null,this.t=null,this.type=null,this.startTime=null,this.availabilityStartTime=null,this.duration=null,this.quality=null,this.range=null,this.state=null});function xu(e,t,o){return Object.defineProperty(e,"prototype",{writable:!1}),e}var Uu=xu(function e(){(function(t,o){if(!(t instanceof o))throw new TypeError("Cannot call a class as a function")})(this,e),this.loadingRequests=[],this.executedRequests=[]});function Co(e){var t,o,l=(e=e||{}).settings,p=this.context,C=(0,y.A)(p).getInstance();function b(){C.trigger(i.A.METRICS_CHANGED)}function F(k){C.trigger(i.A.METRIC_CHANGED,{mediaType:k}),b()}function U(k,st,it){C.trigger(i.A.METRIC_UPDATED,{mediaType:k,metric:st,value:it}),F(k)}function H(k,st,it){C.trigger(i.A.METRIC_ADDED,{mediaType:k,metric:st,value:it}),F(k)}function B(k,st){var it=null;return k&&(o.hasOwnProperty(k)?it=o[k]:st||(it=new Au,o[k]=it)),it}function w(k,st,it){var ht=B(k);ht!==null&&(ht[st].push(it),ht[st].length>l.get().streaming.metrics.maxListDepth&&ht[st].shift())}function j(k,st,it){w(k,st,it),H(k,st,it)}return t={clearCurrentMetricsForType:function(k){delete o[k],F(k)},clearAllCurrentMetrics:function(){o={},b()},getMetricsFor:B,addHttpRequest:function k(st,it,ht,ot,et,Z,K,z,f,N,S,L,R,V,dt,ut,P){var $=new jt.G;Z!=null&&Z!==ot&&(k(st,null,ht,ot,et,null,null,z,f,null,null,null,R,null,null,ut,P),$.actualurl=Z),$.tcpid=it,$.type=ht,$.url=ot,$.range=z,$.trequest=f,$.tresponse=N,$.responsecode=L,$.cmsd=P,$._tfinish=S,$._stream=st,$._mediaduration=R,$._quality=et,$._responseHeaders=V,$._serviceLocation=K,$._fileLoaderType=ut,dt?dt.forEach(function(Y){(function(gt,vt,ft,Ct){var Mt=new jt.N;Mt.s=vt,Mt.d=ft,Mt.b=Ct,gt.trace.push(Mt),gt.interval||(gt.interval=0),gt.interval+=ft})($,Y.s,Y.d,Y.b)}):(delete $.interval,delete $.trace),j(st,_.A.HTTP_REQUEST,$)},addRepresentationSwitch:function(k,st,it,ht,ot){var et=new Tu;et.t=st,et.mt=it,et.to=ht,ot?et.lto=ot:delete et.lto,j(k,_.A.TRACK_SWITCH,et)},addBufferLevel:function(k,st,it){var ht=new Su;ht.t=st,ht.level=it,j(k,_.A.BUFFER_LEVEL,ht)},addBufferState:function(k,st,it){var ht=new Ru;ht.target=it,ht.state=st,j(k,_.A.BUFFER_STATE,ht)},addDVRInfo:function(k,st,it,ht){var ot=new Nu;ot.time=st,ot.range=ht,ot.manifestInfo=it,j(k,_.A.DVR_INFO,ot)},addDroppedFrames:function(k,st){var it=new Du,ht=B(k).DroppedFrames;st&&(it.time=st.creationTime,it.droppedFrames=st.droppedVideoFrames,ht.length>0&&ht[ht.length-1]==it||j(k,_.A.DROPPED_FRAMES,it))},addSchedulingInfo:function(k,st,it,ht,ot,et,Z,K,z){var f=new Fu;f.mediaType=k,f.t=st,f.type=it,f.startTime=ht,f.availabilityStartTime=ot,f.duration=et,f.quality=Z,f.range=K,f.state=z,j(k,_.A.SCHEDULING_INFO,f)},addRequestsQueue:function(k,st,it){var ht=new Uu;ht.loadingRequests=st,ht.executedRequests=it,B(k).RequestsQueue=ht,H(k,_.A.REQUESTS_QUEUE,ht)},addManifestUpdate:function(k,st,it,ht,ot,et,Z,K,z,f){var N=new Ou;N.mediaType=k,N.type=st,N.requestTime=it,N.fetchTime=ht,N.availabilityStartTime=ot,N.presentationStartTime=et,N.clientTimeOffset=Z,N.currentTime=K,N.buffered=z,N.latency=f,w(u.A.STREAM,_.A.MANIFEST_UPDATE,N),H(k,_.A.MANIFEST_UPDATE,N)},updateManifestUpdateInfo:function(k,st){if(k){for(var it in st)k[it]=st[it];U(k.mediaType,_.A.MANIFEST_UPDATE,k)}},addManifestUpdateStreamInfo:function(k,st,it,ht,ot){if(k){var et=new Mu;et.id=st,et.index=it,et.start=ht,et.duration=ot,k.streamInfo.push(et),U(k.mediaType,_.A.MANIFEST_UPDATE_STREAM_INFO,k)}},addManifestUpdateRepresentationInfo:function(k,st,it,ht,ot,et,Z,K){if(k&&k.representationInfo){var z=new Pu;z.id=st,z.index=it,z.streamIndex=ht,z.mediaType=ot,z.startNumber=Z,z.fragmentInfoType=K,z.presentationTimeOffset=et,k.representationInfo.push(z),U(k.mediaType,_.A.MANIFEST_UPDATE_TRACK_INFO,k)}},addPlayList:function(k){k.trace&&Array.isArray(k.trace)?k.trace.forEach(function(st){st.hasOwnProperty("subreplevel")&&!st.subreplevel&&delete st.subreplevel}):delete k.trace,j(u.A.STREAM,_.A.PLAY_LIST,k)},addDVBErrors:function(k){j(u.A.STREAM,_.A.DVB_ERRORS,k)}},o={},t}Co.__dashjs_factory_name="MetricsModel";var Bu=h.A.getSingletonFactory(Co);function Do(e){e=e||{};var t,o,l,p,C=this.context,b=e.metricsModel;function F(B){var w=b.getMetricsFor(B,!0);if(!w)return null;var j,k=w.HttpList,st=null;if(!k||k.length<=0)return null;for(j=k.length-1;j>=0;){if(k[j].responsecode){st=k[j];break}j--}return st}function U(B){var w=b.getMetricsFor(B,!0);return w&&w.HttpList?w.HttpList:[]}function H(B,w){if(!B)return null;var j=B[w];return j&&j.length!==0?j[j.length-1]:null}return t={getCurrentRepresentationSwitch:function(B){return H(b.getMetricsFor(B,!0),_.A.TRACK_SWITCH)},getCurrentBufferState:function(B){return H(b.getMetricsFor(B,!0),_.A.BUFFER_STATE)},getCurrentBufferLevel:function(B){var w=H(b.getMetricsFor(B,!0),_.A.BUFFER_LEVEL);return w?Eu.round10(w.level/1e3,-3):0},getCurrentHttpRequest:F,getHttpRequests:U,getCurrentDroppedFrames:function(){return H(b.getMetricsFor(u.A.VIDEO,!0),_.A.DROPPED_FRAMES)},getCurrentSchedulingInfo:function(B){return H(b.getMetricsFor(B,!0),_.A.SCHEDULING_INFO)},getCurrentDVRInfo:function(B){return H(B?b.getMetricsFor(B,!0):b.getMetricsFor(u.A.VIDEO,!0)||b.getMetricsFor(u.A.AUDIO,!0),_.A.DVR_INFO)},getCurrentManifestUpdate:function(){return H(b.getMetricsFor(u.A.STREAM),_.A.MANIFEST_UPDATE)},getLatestFragmentRequestHeaderValueByID:function(B,w){if(!w)return null;var j={},k=F(B);k&&(j=Fe.A.parseHttpHeaders(k._responseHeaders));var st=j[w.toLowerCase()];return st===void 0?null:st},getLatestMPDRequestHeaderValueByID:function(B){if(!B)return null;var w,j,k,st={};for(k=(w=U(u.A.STREAM)).length-1;k>=0;k--)if((j=w[k]).type===jt.G.MPD_TYPE){st=Fe.A.parseHttpHeaders(j._responseHeaders);break}var it=st[B.toLowerCase()];return it===void 0?null:it},addRepresentationSwitch:function(B,w,j,k,st){b.addRepresentationSwitch(B,w,j,k,st)},addDVRInfo:function(B,w,j,k){b.addDVRInfo(B,w,j,k)},updateManifestUpdateInfo:function(B){var w=this.getCurrentManifestUpdate();b.updateManifestUpdateInfo(w,B)},addManifestUpdateStreamInfo:function(B){if(B){var w=this.getCurrentManifestUpdate();b.addManifestUpdateStreamInfo(w,B.id,B.index,B.start,B.duration)}},addManifestUpdateRepresentationInfo:function(B,w){if(B){var j=this.getCurrentManifestUpdate();b.addManifestUpdateRepresentationInfo(j,B.id,B.index,B.streamIndex,w,B.presentationTimeOffset,B.startNumber,B.fragmentInfoType)}},addManifestUpdate:function(B){b.addManifestUpdate(u.A.STREAM,B.type,B.requestStartDate,B.requestEndDate)},addHttpRequest:function(B,w,j,k,st,it){b.addHttpRequest(B.mediaType,null,B.type,B.url,B.quality,w,B.serviceLocation||null,B.range||null,B.requestStartDate,B.firstByteDate,B.requestEndDate,j,B.duration,k,st,B.fileLoaderType,it)},addSchedulingInfo:function(B,w){b.addSchedulingInfo(B.mediaType,new Date,B.type,B.startTime,B.availabilityStartTime,B.duration,B.quality,B.range,w)},addRequestsQueue:function(B,w,j){b.addRequestsQueue(B,w,j)},addBufferLevel:function(B,w,j){b.addBufferLevel(B,w,j)},addBufferState:function(B,w,j){b.addBufferState(B,w,j)},addDroppedFrames:function(B){b.addDroppedFrames(u.A.VIDEO,B)},addPlayList:function(){p&&(b.addPlayList(p),p=null)},addDVBErrors:function(B){b.addDVBErrors(B)},createPlaylistMetrics:function(B,w){(p=new Yt).start=new Date,p.mstart=B,p.starttype=w},createPlaylistTraceMetrics:function(B,w,j){o===!0&&(o=!1,(l=new Vt).representationid=B,l.start=new Date,l.mstart=w,l.playbackspeed=j!==null?j.toString():null)},updatePlayListTraceMetrics:function(B){if(l)for(var w in l)l[w]=B[w]},pushPlayListTraceMetrics:function(B,w){if(o===!1&&p&&l&&l.start){var j=l.start,k=B.getTime()-j.getTime();l.duration=k,l.stopreason=w,p.trace.push(l),o=!0}},clearAllCurrentMetrics:function(){b.clearAllCurrentMetrics()}},b=b||Bu(C).getInstance({settings:e.settings}),o=!0,l=null,p=null,t}Do.__dashjs_factory_name="DashMetrics";var ku=h.A.getSingletonFactory(Do);function Oo(){var e,t,o,l,p=this.context,C=(0,y.A)(p).getInstance(),b=(0,lt.A)(p).getInstance();function F(ot){l=ot}function U(ot,et,Z,K){var z,f=et.adaptation.period.mpd,N=f.availabilityStartTime;if(K)z=Z&&f.timeShiftBufferDepth!==Number.POSITIVE_INFINITY?new Date(N.getTime()+1e3*(ot+f.timeShiftBufferDepth)):f.availabilityEndTime;else if(Z){var S=et.availabilityTimeOffset;z=new Date(N.getTime()+1e3*(ot-S))}else z=N;return z}function H(ot,et){return(ot.getTime()-et.mpd.availabilityStartTime.getTime()+1e3*l)/1e3}function B(ot,et){return ot+(et.adaptation.period.start-et.presentationTimeOffset)}function w(ot){var et={start:NaN,end:NaN},Z=ot[0].getAdapter().getRegularPeriods()[0],K=H(new Date,Z);if(!ot||ot.length===0)return{range:et,now:K};ot.forEach(function(f){var N=f.getAdapter(),S=N.getMediaInfoForType(f.getStreamInfo(),u.A.VIDEO)||N.getMediaInfoForType(f.getStreamInfo(),u.A.AUDIO),L=N.getVoRepresentations(S)[0],R={start:NaN,end:NaN};if(L)if(L.segmentInfoType===n.A.SEGMENT_TIMELINE)R=function(dt){var ut,P,$,Y,gt=dt.adaptation.period.mpd.manifest.Period_asArray[dt.adaptation.period.index].AdaptationSet_asArray[dt.adaptation.index],vt=t.getRepresentationFor(dt.index,gt),ft=vt.SegmentTemplate||vt.SegmentList,Ct=ft.SegmentTimeline,Mt=ft.timescale,Qt=Ct.S_asArray,$t={start:0,end:0},Zt=Qt[0].t,ae=!isNaN(Zt),Ne=ae?Zt:0,Et=0;for(ae&&($t.start=B(Ne/Mt,dt)),$=0,Y=Qt.length;$<Y;$++)P=0,(ut=Qt[$]).hasOwnProperty("r")&&(P=ut.r),Et+=ut.d*(1+P);return $t.end=B((Ne+Et)/Mt,dt),$t}(L);else{var V=L.adaptation.period;R.start=V.start,R.end=Math.max(K,V.start+V.duration)}!isNaN(R.start)&&(isNaN(et.start)||et.start>R.start)&&(et.start=R.start),!isNaN(R.end)&&(isNaN(et.end)||et.end<R.end)&&(et.end=R.end)}),et.end=Math.min(K,et.end);var z=k(ot,et.end,!0);return et.end=isNaN(z)?et.end:z,et.start=Z&&Z.mpd&&Z.mpd.timeShiftBufferDepth&&!isNaN(Z.mpd.timeShiftBufferDepth)&&!isNaN(et.end)?Math.max(et.end-Z.mpd.timeShiftBufferDepth,et.start):et.start,et.start=k(ot,et.start),{range:et,now:K}}function j(ot,et){o=ot-et.end}function k(ot,et){var Z=arguments.length>2&&arguments[2]!==void 0&&arguments[2];try{for(var K=0,z=!1,f=NaN;!z&&K<ot.length;){var N=ot[K].getStreamInfo();N.start<=et&&(!isFinite(N.duration)||N.start+N.duration>=et)?(f=et,z=!0):!Z&&N.start>et&&(isNaN(f)||N.start<f)?f=N.start:Z&&N.start+N.duration<et&&(isNaN(f)||N.start+N.duration>f)&&(f=N.start+N.duration),K+=1}return f}catch{return et}}function st(ot){ot.offset===void 0||isNaN(ot.offset)||F(ot.offset/1e3)}function it(){l=0,o=0}function ht(){C.off(i.A.UPDATE_TIME_SYNC_OFFSET,st,this),it()}return e={initialize:function(){it(),C.on(i.A.UPDATE_TIME_SYNC_OFFSET,st,this)},getClientTimeOffset:function(){return l},setClientTimeOffset:F,getClientReferenceTime:function(){return Date.now()-1e3*o+1e3*l},calcAvailabilityStartTimeFromPresentationTime:function(ot,et,Z){return U(ot,et,Z)},calcAvailabilityEndTimeFromPresentationTime:function(ot,et,Z){return U(ot,et,Z,!0)},calcPresentationTimeFromWallTime:H,calcPresentationTimeFromMediaTime:B,calcPeriodRelativeTimeFromMpdRelativeTime:function(ot,et){return et-ot.adaptation.period.start},calcMediaTimeFromPresentationTime:function(ot,et){return ot-et.adaptation.period.start+et.presentationTimeOffset},calcWallTimeForSegment:function(ot,et){var Z,K,z;return et&&(Z=ot.representation.adaptation.period.mpd.suggestedPresentationDelay,K=ot.presentationStartTime+Z,z=new Date(ot.availabilityStartTime.getTime()+1e3*K)),z},calcTimeShiftBufferWindow:function(ot,et){if(!et)return function(K){var z={start:NaN,end:NaN},f=0,N=NaN;return K.forEach(function(S){var L=S.getStreamInfo();f+=L.duration,(isNaN(N)||L.start<N)&&(N=L.start)}),z.start=N,z.end=N+f,z}(ot);if(b.get().streaming.timeShiftBuffer.calcFromSegmentTimeline){var Z=w(ot);return j(Z.now,Z.range),Z.range}return function(K){var z={start:NaN,end:NaN};if(!K||K.length===0)return z;var f=K[0].getAdapter().getRegularPeriods()[0],N=H(new Date,f),S=f.mpd.timeShiftBufferDepth,L=isNaN(S)?0:N-S;if(z.start=k(K,L),z.end=!isNaN(z.start)&&N<z.start?N:k(K,N,!0),!isNaN(S)&&z.end<N-S&&(z.end=NaN),b.get().streaming.timeShiftBuffer.fallbackToSegmentTimeline){var R=w(K);if(R.range.end<z.start)return C.trigger(r.A.CONFORMANCE_VIOLATION,{level:Pr.LEVELS.WARNING,event:Pr.EVENTS.INVALID_DVR_WINDOW}),j(R.now,R.range),R.range}return z}(ot)},reset:ht},t=Ie(p).getInstance(),ht(),e}Oo.__dashjs_factory_name="TimelineConverter";var Gu=h.A.getSingletonFactory(Oo),fa=M(8107),Ni=M(8667);function da(e){return da=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},da(e)}function ju(e,t,o){return t=Ci(t),function(l,p){if(p&&(da(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,Mo()?Reflect.construct(t,[],Ci(e).constructor):t.apply(e,o))}function Mo(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Mo=function(){return!!e})()}function Ci(e){return Ci=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ci(e)}function pa(e,t){return pa=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,l){return o.__proto__=l,o},pa(e,t)}var qu=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=ju(this,t)).captionData=null,l.label=null,l.defaultTrack=!1,l.kind=null,l.isFragmented=!1,l.isEmbedded=!1,l.isTTML=null,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&&pa(l,p)}(t,e),o=t,Object.defineProperty(o,"prototype",{writable:!1}),o;var o}(ua),Yu=M(6877);function Po(){var e=0;function t(F){for(var U="",H=0;H<F.length;++H)U+=F[H].uchar;return U.length-U.replace(/^\s+/,"").length}function o(F){return"left: "+3.125*F.x+"%; top: "+6.66*F.y1+"%; width: "+(100-3.125*F.x)+"%; height: "+6.66*Math.max(F.y2-1-F.y1,1)+"%; align-items: flex-start; overflow: visible; -webkit-writing-mode: horizontal-tb;"}function l(F){return F==="red"?"rgb(255, 0, 0)":F==="green"?"rgb(0, 255, 0)":F==="blue"?"rgb(0, 0, 255)":F==="cyan"?"rgb(0, 255, 255)":F==="magenta"?"rgb(255, 0, 255)":F==="yellow"?"rgb(255, 255, 0)":F==="white"?"rgb(255, 255, 255)":F==="black"?"rgb(0, 0, 0)":F}function p(F,U){var H=F.videoHeight/15;return U?"font-size: "+H+"px; font-family: Menlo, Consolas, 'Cutive Mono', monospace; color: "+(U.foreground?l(U.foreground):"rgb(255, 255, 255)")+"; font-style: "+(U.italics?"italic":"normal")+"; text-decoration: "+(U.underline?"underline":"none")+"; white-space: pre; background-color: "+(U.background?l(U.background):"transparent")+";":"font-size: "+H+"px; font-family: Menlo, Consolas, 'Cutive Mono', monospace; justify-content: flex-start; text-align: left; color: rgb(255, 255, 255); font-style: normal; white-space: pre; line-height: normal; font-weight: normal; text-decoration: none; width: 100%; display: flex;"}function C(F){return F.replace(/^\s+/g,"")}function b(F){return F.replace(/\s+$/g,"")}return{createHTMLCaptionsFromScreen:function(F,U,H,B){var w,j,k=null,st=!1,it=-1,ht={start:U,end:H,spans:[]},ot="style_cea608_white_black",et={},Z={},K=[];for(w=0;w<15;++w){var z=B.rows[w],f="",N=null;if(z.isEmpty()===!1){var S=t(z.chars);k===null&&(k={x:S,y1:w,y2:w+1,p:[]}),S!==it&&st&&(k.p.push(ht),ht={start:U,end:H,spans:[]},k.y2=w,k.name="region_"+k.x+"_"+k.y1+"_"+k.y2,et.hasOwnProperty(k.name)===!1?(K.push(k),et[k.name]=k):et[k.name].p.contat(k.p),k={x:S,y1:w,y2:w+1,p:[]});for(var L=0;L<z.chars.length;++L){var R=z.chars[L],V=R.penState;if(N===null||!V.equals(N)){f.trim().length>0&&(ht.spans.push({name:ot,line:f,row:w}),f="");var dt="style_cea608_"+V.foreground+"_"+V.background;V.underline&&(dt+="_underline"),V.italics&&(dt+="_italics"),Z.hasOwnProperty(dt)||(Z[dt]=JSON.parse(JSON.stringify(V))),N=V,ot=dt}f+=R.uchar}f.trim().length>0&&ht.spans.push({name:ot,line:f,row:w}),st=!0,it=S}else st=!1,it=-1,k&&(k.p.push(ht),ht={start:U,end:H,spans:[]},k.y2=w,k.name="region_"+k.x+"_"+k.y1+"_"+k.y2,et.hasOwnProperty(k.name)===!1?(K.push(k),et[k.name]=k):et[k.name].p.contat(k.p),k=null)}k&&(k.p.push(ht),k.y2=w+1,k.name="region_"+k.x+"_"+k.y1+"_"+k.y2,et.hasOwnProperty(k.name)===!1?(K.push(k),et[k.name]=k):et[k.name].p.contat(k.p),k=null);var ut=[];for(w=0;w<K.length;++w){var P=K[w],$="sub_cea608_"+e++,Y=document.createElement("div");Y.id=$;var gt=o(P);Y.style.cssText="position: absolute; margin: 0; display: flex; box-sizing: border-box; pointer-events: none;"+gt;var vt=document.createElement("div");vt.className="paragraph bodyStyle",vt.style.cssText=p(F);var ft=document.createElement("div");ft.className="cueUniWrapper",ft.style.cssText="unicode-bidi: normal; direction: ltr;";for(var Ct=0;Ct<P.p.length;++Ct){var Mt=P.p[Ct],Qt=0;for(j=0;j<Mt.spans.length;++j){var $t=Mt.spans[j];if($t.line.length>0){if(j!==0&&Qt!=$t.row){var Zt=document.createElement("br");Zt.className="lineBreak",ft.appendChild(Zt)}var ae=!1;Qt===$t.row&&(ae=!0),Qt=$t.row;var Ne=Z[$t.name],Et=document.createElement("span");Et.className="spanPadding "+$t.name+" customSpanColor",Et.style.cssText=p(F,Ne),j!==0&&ae?j===Mt.spans.length-1?Et.textContent=b($t.line):Et.textContent=$t.line:Mt.spans.length>1&&j<Mt.spans.length-1&&$t.row===Mt.spans[j+1].row?Et.textContent=C($t.line):Et.textContent=$t.line.trim(),ft.appendChild(Et)}}}vt.appendChild(ft),Y.appendChild(vt);var Pt={bodyStyle:["%",90]};for(var ce in Z)Z.hasOwnProperty(ce)&&(Pt[ce]=["%",90]);ut.push({type:"html",start:U,end:H,cueHTMLElement:Y,cueID:$,cellResolution:[32,15],isFromCEA608:!0,fontSize:Pt,lineHeight:{},linePadding:{}})}return ut}}}Po.__dashjs_factory_name="EmbeddedTextHtmlRender";var Hu=h.A.getSingletonFactory(Po);function Lo(e){var t,o,l,p,C,b,F,U,H,B,w,j,k,st,it,ht,ot,et=e.errHandler,Z=e.manifestModel,K=e.mediaController,z=e.videoModel,f=e.textTracks,N=e.vttParser,S=e.vttCustomRenderingParser,L=e.ttmlParser,R=e.streamInfo,V=e.settings,dt=this.context,ut=(0,y.A)(dt).getInstance(),P=!1;function $(){b=null,U=NaN,H=[],B=null,F=!1,C=[],p=null}function Y(Zt){var ae=new qu;for(var Ne in Zt)ae[Ne]=Zt[Ne];ae.labels=Zt.labels,ae.defaultTrack=function(Et){var Pt=!1;return j.length>1&&Et.isEmbedded?Pt=Et.id&&Et.id===u.A.CC1:j.length===1?Et.id&&typeof Et.id=="string"&&Et.id.substring(0,2)==="CC"&&(Pt=!0):j.length===0&&(Pt=Et.index===C[0].index),Pt}(Zt),ae.isFragmented=Zt.isFragmented,ae.isEmbedded=!!Zt.isEmbedded,ae.isTTML=function(Et){return Et.codec&&Et.codec.search(u.A.STPP)>=0||Et.mimeType&&Et.mimeType.search(u.A.TTML)>=0}(Zt),ae.kind=function(Et,Pt){var ce=Et.roles&&Et.roles.length>0?Pt[Et.roles[0]]:Pt.caption;return ce=ce===Pt.caption||ce===Pt.subtitle?ce:Pt.caption}(Zt,{subtitle:"subtitles",caption:"captions"}),f.addTextTrack(ae)}function gt(Zt){var ae=Zt.chunk;ae.mediaInfo.embeddedCaptions&&ft(ae.bytes,ae)}function vt(Zt){w=Zt}function ft(Zt,ae){var Ne=ae.mediaInfo,Et=Ne.type,Pt=Ne.mimeType,ce=Ne.codec||Pt;ce?Ne.codec.indexOf("application/mp4")!==-1?function(Kt,ye,he){var de;if(ye.segmentType==="InitializationSegment")F=!0,U=l.getMediaTimescaleFromMoov(Kt);else{if(!F)return;(de=l.getSamplesInfo(Kt).sampleList).length>0&&(B=de[0].cts-ye.start*U),he.search(u.A.STPP)>=0?function(qe,Ye,sn){var ln,kt;for(p=p!==null?p:Qt(sn),ln=0;ln<Ye.length;ln++){var ue=Ye[ln],ee=ue.cts,ge=Mt(),De=ge+ee/U,Ve=De+ue.duration/U;t.buffered.add(De,Ve);var Ge=new DataView(qe,ue.offset,ue.subSizes[0]),Ke=Ni.Utils.dataViewToString(Ge,u.A.UTF8),Ze=[],pe=ue.offset+ue.subSizes[0];for(kt=1;kt<ue.subSizes.length;kt++){var Oe=new Uint8Array(qe,pe,ue.subSizes[kt]),Ft=String.fromCharCode.apply(null,Oe);Ze.push(Ft),pe+=ue.subSizes[kt]}try{var se=Z.getValue().ttmlTimeIsRelative?ee/U:0,xt=p.parse(Ke,se,ee/U,(ee+ue.duration)/U,Ze);f.addCaptions(w,ge,xt)}catch(Gt){b.removeExecutedRequestsBeforeTime(),this.remove(),o.error("TTML parser error: "+Gt.message)}}}(Kt,de,he):function(qe,Ye){var sn,ln,kt,ue=[];for(sn=0;sn<Ye.length;sn++){var ee=Ye[sn];ee.cts-=B;var ge=Mt()+ee.cts/U,De=ge+ee.duration/U;t.buffered.add(ge,De);var Ve=qe.slice(ee.offset,ee.offset+ee.size),Ge=Ni.parseBuffer(Ve);for(ln=0;ln<Ge.boxes.length;ln++){var Ke=Ge.boxes[ln];if(o.debug("VTT box1: "+Ke.type),Ke.type!=="vtte"&&Ke.type==="vttc"){o.debug("VTT vttc boxes.length = "+Ke.boxes.length);var Ze={styles:{}};for(kt=0;kt<Ke.boxes.length;kt++){var pe=Ke.boxes[kt];if(o.debug("VTT box2: "+pe.type),pe.type==="payl")Ze.start=ee.cts/U,Ze.end=(ee.cts+ee.duration)/U,Ze.data=pe.cue_text;else if(pe.type==="sttg"&&pe.settings&&pe.settings!=="")try{var Oe=pe.settings.split(" ");Ze.styles=N.getCaptionStyles(Oe)}catch{}}Ze&&Ze.data&&(ue.push(Ze),o.debug("VTT ".concat(Ze.start," - ").concat(Ze.end," : ").concat(Ze.data)))}}}ue.length>0&&f.addCaptions(w,0,ue)}(Kt,de)}}(Zt,ae,ce):Et===u.A.VIDEO?function(Kt,ye){var he,de;if(ye.segmentType===jt.G.INIT_SEGMENT_TYPE)k===0&&(k=l.getMediaTimescaleFromMoov(Kt));else if(ye.segmentType===jt.G.MEDIA_SEGMENT_TYPE){if(k===0)return void o.warn("CEA-608: No timescale for embeddedTextTrack yet");var qe=(de=l.getSamplesInfo(Kt)).lastSequenceNumber,Ye=Math.trunc(ye.start),sn=Math.trunc(ye.end);if(ht[0]||ht[1]||function(){for(var ge,De=0;De<j.length;De++){if((ge=f.getTrackIdxForId(j[De].id))===-1)return void o.warn("CEA-608: data before track is ready.");var Ve=Ct(ge);ht[De]=new(I()).Cea608Parser(De+1,{newCue:Ve},null)}}(),k){if(function(ge,De,Ve,Ge,Ke){return ge!==null&&De!==null&&Ge!==null&&Ke!==null&&(De===ge?Ge!==Ke:De!==ge+Ve)}(st,qe,de.numSequences,it,Ye))for(he=0;he<ht.length;he++)ht[he]&&ht[he].reset();for(var ln=function(ge,De){if(De.length===0)return null;for(var Ve={splits:[],fields:[[],[]]},Ge=new DataView(ge),Ke=0;Ke<De.length;Ke++)for(var Ze=De[Ke],pe=I().findCea608Nalus(Ge,Ze.offset,Ze.size),Oe=null,Ft=0,se=0;se<pe.length;se++)for(var xt=I().extractCea608DataFromRange(Ge,pe[se]),Gt=0;Gt<2;Gt++)if(xt[Gt].length>0){Ze.cts!==Oe?Ft=0:Ft+=1;var le=Mt();Ve.fields[Gt].push([Ze.cts+le*k,xt[Gt],Ft]),Oe=Ze.cts}return Ve.fields.forEach(function(yt){yt.sort(function(Tt,Wt){return Tt[0]===Wt[0]?Tt[2]-Wt[2]:Tt[0]-Wt[0]})}),Ve}(Kt,de.sampleList),kt=0;kt<ht.length;kt++){var ue=ln.fields[kt],ee=ht[kt];if(ee)for(he=0;he<ue.length;he++)ee.addData(ue[he][0]/k,ue[he][1])}st=qe,it=sn}}}(Zt,ae):function(Kt,ye,he){var de,qe,Ye=new DataView(Kt,0,Kt.byteLength);qe=Ni.Utils.dataViewToString(Ye,u.A.UTF8);try{de=Qt(he).parse(qe,0),f.addCaptions(f.getCurrentTrackIdx(),0,de),t.buffered&&t.buffered.add(ye.start,ye.end)}catch(sn){et.error(new pt.A(mt.TIMED_TEXT_ERROR_ID_PARSE_CODE,mt.TIMED_TEXT_ERROR_MESSAGE_PARSE+sn.message,qe))}}(Zt,ae,ce):o.error("No text type defined")}function Ct(Zt){return function(ae,Ne,Et){var Pt;(Pt=z.getTTMLRenderingDiv()?ot.createHTMLCaptionsFromScreen(z.getElement(),ae,Ne,Et):[{start:ae,end:Ne,data:Et.getDisplayText(),styles:{}}])&&f.addCaptions(Zt,0,Pt)}}function Mt(){return isNaN(t.timestampOffset)?0:t.timestampOffset}function Qt(Zt){var ae;return Zt.search(u.A.VTT)>=0?ae=V.get().streaming.text.webvtt.customRenderingEnabled&&S?S:N:(Zt.search(u.A.TTML)>=0||Zt.search(u.A.STPP)>=0)&&(ae=L),ae}function $t(Zt){j.forEach(function(ae){var Ne=f.getTrackIdxForId(ae.id);Ne>=0&&f.deleteCuesFromTrackIdx(Ne,Zt.from,Zt.to)})}return t={initialize:function(){P||(j=[],w=null,k=0,ht=[],st=null,it=null,P=!0,ot=Hu(dt).getInstance(),ut.on(i.A.VIDEO_CHUNK_RECEIVED,gt,t),ut.on(i.A.BUFFER_CLEARED,$t,t))},addMediaInfos:function(Zt,ae,Ne){if(C=C.concat(ae),Zt===u.A.TEXT&&ae[0].isFragmented&&!ae[0].isEmbedded){b=Ne,t.buffered=(0,Yu.A)(dt).create(),H=K.getTracksFor(u.A.TEXT,R.id).filter(function(Kt){return Kt.isFragmented});for(var Et=K.getCurrentTrackFor(u.A.TEXT,R.id),Pt=0;Pt<H.length;Pt++)if(H[Pt]===Et){vt(Pt);break}}for(var ce=0;ce<ae.length;ce++)Y(ae[ce])},resetMediaInfos:function(){C=[]},getStreamId:function(){return R.id},append:ft,abort:function(){},addEmbeddedTrack:function(Zt){if(P&&Zt)if(Zt.id===u.A.CC1||Zt.id===u.A.CC3){for(var ae=0;ae<j.length;ae++)if(j[ae].id===Zt.id)return;j.push(Zt)}else o.warn("Embedded track "+Zt.id+" not supported!")},resetEmbedded:function(){ut.off(i.A.VIDEO_CHUNK_RECEIVED,gt,t),ut.off(i.A.BUFFER_CLEARED,$t,t),f&&f.deleteAllTextTracks(),P=!1,j=[],ht=[null,null],st=null,it=null},getConfig:function(){return{fragmentModel:b,fragmentedTracks:H,videoModel:z}},setCurrentFragmentedTrackIdx:vt,remove:function(Zt,ae){Zt===void 0&&Zt===ae&&(Zt=t.buffered.start(0),ae=t.buffered.end(t.buffered.length-1)),t.buffered.remove(Zt,ae),f.deleteCuesFromTrackIdx(w,Zt,ae)},reset:function(){$(),C=[],l=null}},o=(0,g.A)(dt).getInstance().getLogger(t),l=(0,Xr.A)(dt).getInstance(),$(),t}Lo.__dashjs_factory_name="TextSourceBuffer";var Vu=h.A.getClassFactory(Lo),ha=M(6586);function Fo(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}var Ku=["text","align","fontSize","id","isd","line","lineAlign","lineHeight","linePadding","position","positionAlign","region","size","snapToLines","vertical"];function xo(e){var t,o,l,p,C,b,F,U,H,B,w,j,k,st,it,ht,ot,et,Z,K,z=this.context,f=(0,y.A)(z).getInstance(),N=e.videoModel,S=e.streamInfo,L=e.settings;function R(kt,ue,ee,ge,De,Ve){var Ge=0,Ke=0;kt/ue>ee/ge?Ge=(Ke=ue)/ge*ee:Ke=(Ge=kt)/ee*ge;var Ze,pe,Oe=0,Ft=0;return Ge/Ke>De?(Ft=Ke,Oe=Ke*De):(Oe=Ge,Ft=Ge/De),Ze=(kt-Oe)/2,pe=(ue-Ft)/2,Ve?{x:Ze+.1*Oe,y:pe+.1*Ft,w:.8*Oe,h:.8*Ft}:{x:Ze,y:pe,w:Oe,h:Ft}}function V(kt,ue){var ee=N.getClientWidth(),ge=N.getClientHeight(),De=N.getVideoWidth(),Ve=N.getVideoHeight(),Ge=N.getVideoRelativeOffsetTop(),Ke=N.getVideoRelativeOffsetLeft();if(De!==0&&Ve!==0){var Ze=De/Ve,pe=!1;kt.isFromCEA608&&(Ze=1.1666666666666667,pe=!0);var Oe=R.call(this,ee,ge,De,Ve,Ze,pe),Ft=Oe.w,se=Oe.h,xt=Oe.x,Gt=Oe.y;if(Ft!=H||se!=B||xt!=F||Gt!=U||ue){if(F=xt+Ke,U=Gt+Ge,H=Ft,B=se,w){var le=w.style;le&&(le.left=F+"px",le.top=U+"px",le.width=H+"px",le.height=B+"px",le.zIndex=st&&document[st]||it?ot:null,f.trigger(r.A.CAPTION_CONTAINER_RESIZE))}var yt=kt.activeCues;if(yt)for(var Tt=yt.length,Wt=0;Wt<Tt;++Wt){var we=yt[Wt];we.scaleCue(we)}}}}function dt(kt){var ue,ee,ge,De,Ve,Ge=H,Ke=B;if(kt.cellResolution){var Ze=[Ge/kt.cellResolution[0],Ke/kt.cellResolution[1]];if(kt.linePadding){for(ue in kt.linePadding)if(kt.linePadding.hasOwnProperty(ue)){ee=(kt.linePadding[ue]*Ze[0]).toString();for(var pe=document.getElementsByClassName("spanPadding"),Oe=0;Oe<pe.length;Oe++)pe[Oe].style.cssText=pe[Oe].style.cssText.replace(/(padding-left\s*:\s*)[\d.,]+(?=\s*px)/gi,"$1"+ee),pe[Oe].style.cssText=pe[Oe].style.cssText.replace(/(padding-right\s*:\s*)[\d.,]+(?=\s*px)/gi,"$1"+ee)}}if(kt.fontSize){for(ue in kt.fontSize)if(kt.fontSize.hasOwnProperty(ue)){kt.fontSize[ue][0]==="%"?ge=kt.fontSize[ue][1]/100:kt.fontSize[ue][0]==="c"&&(ge=kt.fontSize[ue][1]),ee=(ge*Ze[1]).toString(),Ve=ue!=="defaultFontSize"?document.getElementsByClassName(ue):document.getElementsByClassName("paragraph");for(var Ft=0;Ft<Ve.length;Ft++)Ve[Ft].style.cssText=Ve[Ft].style.cssText.replace(/(font-size\s*:\s*)[\d.,]+(?=\s*px)/gi,"$1"+ee)}if(kt.lineHeight){for(ue in kt.lineHeight)if(kt.lineHeight.hasOwnProperty(ue)){kt.lineHeight[ue][0]==="%"?De=kt.lineHeight[ue][1]/100:kt.fontSize[ue][0]==="c"&&(De=kt.lineHeight[ue][1]),ee=(De*Ze[1]).toString(),Ve=document.getElementsByClassName(ue);for(var se=0;se<Ve.length;se++)Ve[se].style.cssText=Ve[se].style.cssText.replace(/(line-height\s*:\s*)[\d.,]+(?=\s*px)/gi,"$1"+ee)}}}}if(kt.isd){var xt=document.getElementById(kt.cueID);xt&&w.removeChild(xt),P(kt)}}function ut(kt,ue){var ee=/^(urn:)(mpeg:[a-z0-9][a-z0-9-]{0,31}:)(subs:)([0-9]+)$/,ge=/^#(.*)$/;if(ee.test(ue)){var De=ee.exec(ue),Ve=parseInt(De[4],10)-1;return"data:image/png;base64,"+btoa(kt.images[Ve])}if(ge.test(ue)){var Ge=ge.exec(ue)[1];return"data:image/png;base64,"+kt.embeddedImages[Ge]}return ue}function P(kt){if(w){ln.call(this);var ue=document.createElement("div");w.appendChild(ue),ht=(0,ha.renderHTML)(kt.isd,ue,function(ee){return ut(kt,ee)},w.clientHeight,w.clientWidth,L.get().streaming.text.imsc.displayForcedOnlyMode,function(ee){o.info("renderCaption :",ee)},ht,L.get().streaming.text.imsc.enableRollUp),ue.id=kt.cueID,f.trigger(r.A.CAPTION_RENDERED,{captionDiv:ue,currentTrackIdx:b})}}function $(kt,ue){return!!ue&&ue.endTime>=kt.startTime}function Y(kt,ue){return!!L.get().streaming.text.extendSegmentedCues&&!!function(ee,ge,De){for(var Ve=0;Ve<De.length;Ve++){var Ge=De[Ve];if(JSON.stringify(ee[Ge])!==JSON.stringify(ge[Ge]))return!1}return!0}(ue,kt,Ku)&&(ue.endTime=Math.max(ue.endTime,kt.endTime),!0)}function gt(kt,ue){ue&&ue.forEach(function(ee){ee.kind&&ee.kind==="image"&&(ee.src=ut(kt,ee.src)),gt(kt,ee.contents)})}function vt(kt,ue,ee){var ge=Pt(kt),De=L.get().streaming.text.dispatchForManualRendering;if(ge&&Array.isArray(ee)&&ee.length!==0)for(var Ve=0;Ve<ee.length;Ve++){var Ge=null,Ke=ee[Ve];ge.cellResolution=Ke.cellResolution,ge.isFromCEA608=Ke.isFromCEA608,isNaN(Ke.start)||isNaN(Ke.end)||(De?Ge=ft(Ke,ue):Zt(Ke)&&w?Ge=Qt(Ke,ue,ge):Ke.data&&(Ge=$t(Ke,ue,ge)));try{if(Ge){if(!ye(ge,Ge))if(L.get().streaming.text.webvtt.customRenderingEnabled)ge.manualCueList||(ge.manualCueList=[]),ge.manualCueList.push(Ge);else{var Ze=void 0;ge.cues&&ge.cues.length!==0&&(Ze=ge.cues[ge.cues.length-1]),$(Ge,Ze)?Y(Ge,Ze)||(Ze.isd&&(Ze.onexit=function(){}),ge.mode!==u.A.TEXT_DISABLED&&ge.addCue(Ge)):ge.mode!==u.A.TEXT_DISABLED&&ge.addCue(Ge)}var pe=L.get().streaming.buffer.bufferToKeep;de(ge,0,N.getTime()-pe)}else o.error("Impossible to display subtitles. You might have missed setting a TTML rendering div via player.attachTTMLRenderingDiv(TTMLRenderingDiv)")}catch(Oe){throw qe(ge),ge.addCue(Ge),Oe}}}function ft(kt,ue){var ee=ae(kt,ue);return ee.onenter=function(){Zt(kt)&&K&&K.cueID!==ee.cueID&&Mt(K),delete ee.type,K=ee,Ct(ee)},ee.onexit=function(){Mt(ee),K=null},ee}function Ct(kt){f.trigger(r.A.CUE_ENTER,kt)}function Mt(kt){f.trigger(r.A.CUE_EXIT,{cueID:kt.cueID})}function Qt(kt,ue,ee){var ge=this,De=ae(kt,ue);return w.style.left=F+"px",w.style.top=U+"px",w.style.width=H+"px",w.style.height=B+"px",De.onenter=function(){var Ve=this;ee.mode===u.A.TEXT_SHOWING&&(this.isd?(Z?requestAnimationFrame(function(){return P(Ve)}):P(this),o.debug("Cue enter id:"+this.cueID)):(w.appendChild(this.cueHTMLElement),dt.call(ge,this),f.trigger(r.A.CAPTION_RENDERED,{captionDiv:this.cueHTMLElement,currentTrackIdx:b})))},De.onexit=function(){if(w)for(var Ve=w.childNodes,Ge=0;Ge<Ve.length;++Ge)Ve[Ge].id===this.cueID&&(o.debug("Cue exit id:"+Ve[Ge].id),w.removeChild(Ve[Ge]),--Ge)},De}function $t(kt,ue,ee){var ge=ae(kt,ue);if(ge.isActive=!1,kt.styles)try{kt.styles.align!==void 0&&"align"in ge&&(ge.align=kt.styles.align),kt.styles.line!==void 0&&"line"in ge&&(ge.line=kt.styles.line),kt.styles.snapToLines!==void 0&&"snapToLines"in ge&&(ge.snapToLines=kt.styles.snapToLines),kt.styles.position!==void 0&&"position"in ge&&(ge.position=kt.styles.position),kt.styles.size!==void 0&&"size"in ge&&(ge.size=kt.styles.size)}catch(De){o.error(De)}return ge.onenter=function(){ee.mode===u.A.TEXT_SHOWING&&f.trigger(r.A.CAPTION_RENDERED,{currentTrackIdx:b})},ge}function Zt(kt){return kt.type==="html"}function ae(kt,ue){return Zt(kt)?function(ee,ge){var De=new l(ee.start+ge,ee.end+ge,"");return De.cueHTMLElement=ee.cueHTMLElement,De.isd=ee.isd,De.images=ee.images,De.embeddedImages=ee.embeddedImages,De.cueID=ee.cueID,De.scaleCue=dt.bind(self),De.cellResolution=ee.cellResolution,De.lineHeight=ee.lineHeight,De.linePadding=ee.linePadding,De.fontSize=ee.fontSize,De.isd&>(De,De.isd.contents),De}(kt,ue):function(ee,ge){var De=new l(ee.start-ge,ee.end-ge,ee.data);return De.cueID="".concat(De.startTime,"_").concat(De.endTime),De}(kt,ue)}function Ne(kt){if(j)for(var ue=j.childNodes,ee=0;ee<ue.length;++ee)ue[ee].id===kt.cueID&&(j.removeChild(ue[ee]),--ee)}function Et(){var kt,ue=[],ee=function(De,Ve){var Ge=typeof Symbol<"u"&&De[Symbol.iterator]||De["@@iterator"];if(!Ge){if(Array.isArray(De)||(Ge=function(se,xt){if(se){if(typeof se=="string")return Fo(se,xt);var Gt={}.toString.call(se).slice(8,-1);return Gt==="Object"&&se.constructor&&(Gt=se.constructor.name),Gt==="Map"||Gt==="Set"?Array.from(se):Gt==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Gt)?Fo(se,xt):void 0}}(De))||Ve){Ge&&(De=Ge);var Ke=0,Ze=function(){};return{s:Ze,n:function(){return Ke>=De.length?{done:!0}:{done:!1,value:De[Ke++]}},e:function(se){throw se},f:Ze}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
16
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var pe,Oe=!0,Ft=!1;return{s:function(){Ge=Ge.call(De)},n:function(){var se=Ge.next();return Oe=se.done,se},e:function(se){Ft=!0,pe=se},f:function(){try{Oe||Ge.return==null||Ge.return()}finally{if(Ft)throw pe}}}}(N.getTextTracks());try{for(ee.s();!(kt=ee.n()).done;){var ge=kt.value;ge.manualMode===u.A.TEXT_SHOWING&&ue.push(ge)}}catch(De){ee.e(De)}finally{ee.f()}return ue}function Pt(kt){return kt>=0&&p[kt]?N.getTextTrack(p[kt].kind,p[kt].id,p[kt].lang,p[kt].isTTML,p[kt].isEmbedded):null}function ce(kt){var ue=this;if(kt!==b){var ee=Pt(b=kt);Kt.call(this,ee),k&&(clearInterval(k),k=null),ee&&ee.renderingType==="html"&&(V.call(this,ee,!0),window.ResizeObserver?(et=new window.ResizeObserver(function(){V.call(ue,ee,!0)})).observe(N.getElement()):k=setInterval(V.bind(this,ee),500))}}function Kt(kt){ln.call(this),kt&&kt.renderingType==="html"?Ye.call(this):sn.call(this)}function ye(kt,ue){if(!kt.cues)return!1;for(var ee=0;ee<kt.cues.length;ee++)if(kt.cues[ee].startTime===ue.startTime&&kt.cues[ee].endTime===ue.endTime)return!0;return!1}function he(kt,ue,ee){var ge=!(arguments.length>3&&arguments[3]!==void 0)||arguments[3];return!!kt&&(isNaN(ue)||(ge?kt.startTime:kt.endTime)>=ue)&&(isNaN(ee)||(ge?kt.endTime:kt.startTime)<=ee)}function de(kt,ue,ee){var ge,De;if(!(ee<ue)&&kt&&(kt.cues||kt.manualCueList)){var Ve=kt.cues&&kt.cues.length>0?"native":"custom",Ge=Ve==="native"?kt.cues:kt.manualCueList;if(!Ge||Ge.length===0)return;for(var Ke=Ge.length-1;Ke>=0;Ke--)!he(Ge[Ke],ue,ee,!0)||(ge=Ge[Ke],De=N.getTime(),ge.startTime>=De&&ge.endTime<=De)||(Ve==="native"?kt.removeCue(Ge[Ke]):(Ne(Ge[Ke]),delete kt.manualCueList[Ke]))}}function qe(kt,ue,ee){var ge=!(arguments.length>3&&arguments[3]!==void 0)||arguments[3];if(kt&&(kt.cues||kt.manualCueList)){var De=kt.cues&&kt.cues.length>0?"native":"custom",Ve=De==="native"?kt.cues:kt.manualCueList;if(!Ve||Ve.length===0)return;for(var Ge=Ve.length-1;Ge>=0;Ge--)he(Ve[Ge],ue,ee,ge)&&(De==="native"?(Ve[Ge].onexit&&Ve[Ge].onexit(),kt.removeCue(Ve[Ge])):(Ne(Ve[Ge]),delete kt.manualCueList[Ge]))}}function Ye(){var kt=document.getElementById("native-cue-style");if(!kt){(kt=document.createElement("style")).id="native-cue-style",document.head.appendChild(kt);var ue=kt.sheet,ee=N.getElement();try{ee&&(ee.id?ue.insertRule("#"+ee.id+"::cue {background: transparent}",0):ee.classList.length!==0?ue.insertRule("."+ee.className+"::cue {background: transparent}",0):ue.insertRule("video::cue {background: transparent}",0))}catch(ge){o.info(""+ge.message)}}}function sn(){var kt=document.getElementById("native-cue-style");kt&&document.head.removeChild(kt)}function ln(){if(w)for(;w.firstChild;)w.removeChild(w.firstChild)}return t={initialize:function(){typeof window<"u"&&typeof navigator<"u"&&(l=window.VTTCue||window.TextTrackCue,p=[],C=[],b=-1,F=0,U=0,H=0,B=0,w=null,j=null,k=null,it=!1,ot=2147483647,ht=null,Z="requestAnimationFrame"in window,document.fullscreenElement!==void 0?st="fullscreenElement":document.webkitIsFullScreen!==void 0?st="webkitIsFullScreen":document.msFullscreenElement?st="msFullscreenElement":document.mozFullScreen&&(st="mozFullScreen"))},getStreamId:function(){return S.id},addTextTrack:function(kt){p.push(kt)},addCaptions:vt,createTracks:function(){var kt=L.get().streaming.text.dispatchForManualRendering;p.sort(function(Gt,le){return Gt.index-le.index}),w=N.getTTMLRenderingDiv(),j=N.getVttRenderingDiv();for(var ue,ee,ge,De,Ve,Ge,Ke=-1,Ze=0;Ze<p.length;Ze++){var pe=(ee=(ue=p[Ze]).kind,ge=ue.id!==void 0?ue.id:ue.lang,De=ue.lang,Ve=ue.isTTML,Ge=ue.isEmbedded,N.addTextTrack(ee,ge,De,Ve,Ge));C.push(pe),p[Ze].defaultTrack&&(pe.default=!0,Ke=Ze);var Oe=Pt(Ze);Oe&&(Oe.mode=u.A.TEXT_SHOWING,w&&(p[Ze].isTTML||p[Ze].isEmbedded)?Oe.renderingType="html":Oe.renderingType="default"),vt(Ze,0,p[Ze].captionData),f.trigger(r.A.TEXT_TRACK_ADDED)}if(ce.call(this,Ke),Ke>=0){var Ft=function(){var Gt=Pt(Ke);Gt&&Gt.renderingType==="html"&&V.call(this,Gt,!0),f.off(r.A.PLAYBACK_METADATA_LOADED,Ft,this)};f.on(r.A.PLAYBACK_METADATA_LOADED,Ft,this);for(var se=0;se<p.length;se++){var xt=Pt(se);xt&&(xt.mode=se!==Ke||kt?u.A.TEXT_HIDDEN:u.A.TEXT_SHOWING,xt.manualMode=se===Ke?u.A.TEXT_SHOWING:u.A.TEXT_HIDDEN)}}f.trigger(i.A.TEXT_TRACKS_QUEUE_INITIALIZED,{index:b,tracks:p,streamId:S.id})},getCurrentTrackIdx:function(){return b},setCurrentTrackIdx:ce,getTrackIdxForId:function(kt){for(var ue=-1,ee=0;ee<p.length;ee++)if(p[ee].id===kt){ue=ee;break}return ue},getCurrentTrackInfo:function(){return p[b]},setModeForTrackIdx:function(kt,ue){var ee=Pt(kt);ee&&ee.mode!==ue&&(ee.mode=ue),ee&&ee.manualMode!==ue&&(ee.manualMode=ue)},deleteCuesFromTrackIdx:function(kt,ue,ee){var ge=Pt(kt);ge&&qe(ge,ue,ee)},deleteAllTextTracks:function(){for(var kt=C?C.length:0,ue=0;ue<kt;ue++){var ee=Pt(ue);ee&&qe.call(this,ee,S.start,S.start+S.duration,!1)}C=[],p=[],k&&(clearInterval(k),k=null),et&&N&&(et.unobserve(N.getElement()),et=null),b=-1,ln.call(this)},manualCueProcessing:function(kt){var ue=Et();if(ue&&ue.length>0){var ee=ue[0].manualCueList;ee&&ee.length>0&&ee.forEach(function(ge){ge.startTime<=kt&&ge.endTime>=kt&&!ge.isActive?(ge.isActive=!0,L.get().streaming.text.dispatchForManualRendering?Ct(ge):WebVTT.processCues(window,[ge],j,ge.cueID)):ge.isActive&&(ge.startTime>kt||ge.endTime<kt)&&(ge.isActive=!1,L.get().streaming.text.dispatchForManualRendering?Mt(ge):Ne(ge))})}},disableManualTracks:function(){var kt=Et();if(kt&&kt.length>0){var ue=kt[0].manualCueList;ue&&ue.length>0&&ue.forEach(function(ee){if(ee.isActive){if(ee.isActive=!1,L.get().streaming.text.dispatchForManualRendering)Mt(ee);else if(j)for(var ge=j.childNodes,De=0;De<ge.length;++De)ge[De].id===ee.cueID&&(j.removeChild(ge[De]),--De)}})}}},o=(0,g.A)(z).getInstance().getLogger(t),t}xo.__dashjs_factory_name="TextTracks";var Wu=h.A.getClassFactory(xo);function Uo(){var e,t,o,l,p,C,b=this.context;function F(w){var j=w.split(":"),k=j.length-1;return w=60*parseInt(j[k-1],10)+parseFloat(j[k]),k===2&&(w+=3600*parseInt(j[0],10)),w}function U(w){var j=w.split(l),k=j[1].split(C);return k.shift(),j[1]=k[0],k.shift(),{cuePoints:j,styles:H(k)}}function H(w){var j={};return w.forEach(function(k){if(k.split(/:/).length>1){var st=k.split(/:/)[1],it=!1;st&&st.search(/%/)!=-1&&(it=!0,st=parseInt(st.replace(/%/,""),10)),(k.match(/align/)||k.match(/A/))&&(j.align=st),(k.match(/line/)||k.match(/L/))&&(j.line=st==="auto"?st:parseInt(st,10),it&&(j.snapToLines=!1)),(k.match(/position/)||k.match(/P/))&&(j.position=st),(k.match(/size/)||k.match(/S/))&&(j.size=st)}}),j}function B(w,j){for(var k,st=j,it="",ht="";w[st]!==""&&st<w.length;)st++;if((k=st-j)>1)for(var ot=0;ot<k;ot++){if((ht=w[j+ot]).match(l)){it="";break}it+=ht,ot!==k-1&&(it+=`
|
|
17
|
-
`)}else(ht=w[j]).match(l)||(it=ht);return it}return e={parse:function(w){var j,k,st=[];if(!w)return st;j=(w=w.split(o)).length,k=-1;for(var it=0;it<j;it++){var ht=w[it];if(ht.length>0&&ht!=="WEBVTT"&&ht.match(l)){var ot=U(ht),et=ot.cuePoints,Z=ot.styles,K=B(w,it+1),z=F(et[0].replace(p,"")),f=F(et[1].replace(p,""));!isNaN(z)&&!isNaN(f)&&z>=k&&f>z?K!==""?(k=z,st.push({start:z,end:f,data:K,styles:Z})):t.error("Skipping cue due to empty/malformed cue text"):t.error("Skipping cue due to incorrect cue timing")}}return st},getCaptionStyles:H},t=(0,g.A)(b).getInstance().getLogger(e),o=/(?:\r\n|\r|\n)/gm,l=/-->/,p=/(^[\s]+|[\s]+$)/g,C=/\s\b/g,e}Uo.__dashjs_factory_name="VTTParser";var zu=h.A.getSingletonFactory(Uo);function Bo(){var e,t;return e={parse:function(o){var l=[];return t.oncue=function(p){p.start=p.startTime,p.end=p.endTime,p.data=p.text,p.styles={align:p.align,line:p.line,position:p.position,size:p.size},l.push(p)},t.parse(o),l}},function(){try{window&&window.WebVTT&&window.WebVTT.Parser&&(t=new window.WebVTT.Parser(window,window.vttjs,window.WebVTT.StringDecoder()))}catch{}}(),e}Bo.__dashjs_factory_name="VttCustomRenderingParser";var Xu=h.A.getSingletonFactory(Bo);function ko(){var e,t,o=this.context,l=(0,y.A)(o).getInstance(),p=0;return e={parse:function(C,b,F,U,H){var B,w,j,k="",st=[],it={},ht={},ot="",et="",Z={onOpenTag:function(S,L,R){if(R[" imagetype"]&&!R[" imageType"]&&(l.trigger(r.A.CONFORMANCE_VIOLATION,{level:Pr.LEVELS.ERROR,event:Pr.EVENTS.NON_COMPLIANT_SMPTE_IMAGE_ATTRIBUTE}),R[" imageType"]=R[" imagetype"]),L==="image"&&(S==="http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt"||S==="http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt")){if(!R[" imageType"]||R[" imageType"].value!=="PNG")return void t.warn("smpte-tt imageType != PNG. Discarded");ot=R["http://www.w3.org/XML/1998/namespace id"].value}},onCloseTag:function(){ot&&(ht[ot]=et.trim()),et="",ot=""},onText:function(S){ot&&(et+=S)}};if(!C)throw k="no ttml data to parse",new Error(k);it.data=C,l.trigger(i.A.TTML_TO_PARSE,it);var K=(0,ha.fromXML)(it.data,function(S){k=S},Z);l.trigger(i.A.TTML_PARSED,{ttmlString:it.data,ttmlDoc:K});var z,f=K.getMediaTimeEvents();for(j=0;j<f.length;j++){var N=(0,ha.generateISD)(K,f[j],function(S){k=S});N.contents.some(function(S){return S.contents.length})&&(B=f[j]+b)<(w=f[j+1]+b)&&st.push({start:B,end:w,type:"html",cueID:(z="cue_TTML_"+p,p++,z),isd:N,images:H,embeddedImages:ht})}if(k!=="")throw t.error(k),new Error(k);return st}},t=(0,g.A)(o).getInstance().getLogger(e),e}ko.__dashjs_factory_name="TTMLParser";var Qu=h.A.getSingletonFactory(ko);function oi(e){return oi=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},oi(e)}function Go(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);t&&(l=l.filter(function(p){return Object.getOwnPropertyDescriptor(e,p).enumerable})),o.push.apply(o,l)}return o}function jo(e){for(var t=1;t<arguments.length;t++){var o=arguments[t]!=null?arguments[t]:{};t%2?Go(Object(o),!0).forEach(function(l){$u(e,l,o[l])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):Go(Object(o)).forEach(function(l){Object.defineProperty(e,l,Object.getOwnPropertyDescriptor(o,l))})}return e}function $u(e,t,o){return(t=function(l){var p=function(C){if(oi(C)!="object"||!C)return C;var b=C[Symbol.toPrimitive];if(b!==void 0){var F=b.call(C,"string");if(oi(F)!="object")return F;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(C)}(l);return oi(p)=="symbol"?p:p+""}(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function qo(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 Yo(e){var t,o,l,p=this.context,C=(0,y.A)(p).getInstance(),b=(0,At.A)(p).getInstance(),F=e.adapter,U=e.baseURLController,H="error",B="loaded",w="unloaded";function j(it,ht){var ot,et,Z=!1;if(U.resolve()){var K=F.getVoRepresentations(it);K&&K.length>0&&(ot=U.resolve(K[0].path).url)}var z=it.essentialPropertiesAsArray.filter(function(N){return N.schemeIdUri&&N.schemeIdUri===u.A.FONT_DOWNLOAD_DVB_SCHEME}),f=it.supplementalPropertiesAsArray.filter(function(N){return N.schemeIdUri&&N.schemeIdUri===u.A.FONT_DOWNLOAD_DVB_SCHEME});z.length>0?(Z=!0,et=z):et=f,et.forEach(function(N){if(function(V){return!(!(V.value&&V.value==="1"&&V.dvbUrl&&V.dvbUrl.length>0&&V.dvbFontFamily&&V.dvbFontFamily.length>0&&V.dvbMimeType)||V.dvbMimeType!==u.A.OFF_MIMETYPE&&V.dvbMimeType!==u.A.WOFF_MIMETYPE)}(N)){var S=(L=N.dvbUrl,R=ot,b.isPathAbsolute(L)?L:b.isRelative(L)?R?b.resolve(L,R):b.resolve(L):L);l.push({fontFamily:N.dvbFontFamily,url:S,mimeType:N.dvbMimeType,trackId:it.id,streamId:ht,isEssential:Z,status:w,fontFace:new FontFace(N.dvbFontFamily,"url(".concat(S,")"),{display:"swap"})})}var L,R})}function k(it,ht){var ot=l[it];l[it]=jo(jo({},ot),{},{status:ht})}function st(){l=[]}return t={addFontsFromTracks:function(it,ht){if(it&&Array.isArray(it)&&ht)for(var ot=0;ot<it.length;ot++)j(it[ot],ht)},downloadFonts:function(){for(var it=function(ot){var et=l[ot];document.fonts.add(et.fontFace),C.trigger(r.A.DVB_FONT_DOWNLOAD_ADDED,et),et.fontFace.load().then(function(){k(ot,B),C.trigger(r.A.DVB_FONT_DOWNLOAD_COMPLETE,et)},function(Z){k(ot,H),o.debug("Font download error: ",Z),C.trigger(r.A.DVB_FONT_DOWNLOAD_FAILED,et)})},ht=0;ht<l.length;ht++)it(ht)},getFonts:function(){return l},getFontsForTrackId:function(it){return l.filter(function(ht){return ht.trackId&&ht.trackId===it})},reset:function(){(function(){var it,ht=function(Z,K){var z=typeof Symbol<"u"&&Z[Symbol.iterator]||Z["@@iterator"];if(!z){if(Array.isArray(Z)||(z=function(V,dt){if(V){if(typeof V=="string")return qo(V,dt);var ut={}.toString.call(V).slice(8,-1);return ut==="Object"&&V.constructor&&(ut=V.constructor.name),ut==="Map"||ut==="Set"?Array.from(V):ut==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(ut)?qo(V,dt):void 0}}(Z))||K){z&&(Z=z);var f=0,N=function(){};return{s:N,n:function(){return f>=Z.length?{done:!0}:{done:!1,value:Z[f++]}},e:function(V){throw V},f:N}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
18
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var S,L=!0,R=!1;return{s:function(){z=z.call(Z)},n:function(){var V=z.next();return L=V.done,V},e:function(V){R=!0,S=V},f:function(){try{L||z.return==null||z.return()}finally{if(R)throw S}}}}(l);try{for(ht.s();!(it=ht.n()).done;){var ot=it.value,et=document.fonts.delete(ot.fontFace);o.debug("Removal of fontFamily: ".concat(ot.fontFamily," was ").concat(et?"successful":"unsuccessful"))}}catch(Z){ht.e(Z)}finally{ht.f()}})(),st()}},o=(0,g.A)(p).getInstance().getLogger(t),st(),t}Yo.__dashjs_factory_name="DVBFonts";var Ju=h.A.getClassFactory(Yo);function Ho(e){var t,o,l,p,C,b,F,U,H,B,w,j,k,st,it=this.context,ht=e.adapter,ot=e.errHandler,et=e.manifestModel,Z=e.mediaController,K=e.baseURLController,z=e.videoModel,f=e.settings;function N(Y){if(st.error("Could not download ".concat(Y.isEssential?"an essential":"a"," font - fontFamily: ").concat(Y.fontFamily,", url: ").concat(Y.url)),Y.isEssential){var gt=p[Y.streamId].getTrackIdxForId(Y.trackId);p[Y.streamId].setModeForTrackIdx(gt,u.A.TEXT_DISABLED)}}function S(Y){if(st.debug("Successfully downloaded ".concat(Y.isEssential?"an essential":"a"," font - fontFamily: ").concat(Y.fontFamily,", url: ").concat(Y.url)),Y.isEssential){var gt=p[Y.streamId].getTrackIdxForId(Y.trackId);gt===p[Y.streamId].getCurrentTrackIdx()?p[Y.streamId].setModeForTrackIdx(gt,u.A.TEXT_SHOWING):p[Y.streamId].setModeForTrackIdx(gt,u.A.TEXT_HIDDEN)}}function L(Y){var gt=Y.tracks,vt=Y.index,ft=Y.streamId;if(f.get().streaming.text.defaultEnabled===!1&&!dt()||j)ut(ft,-1);else{var Ct=Z.getCurrentTrackFor(u.A.TEXT,ft);if(Ct){var Mt={lang:Ct.lang,role:Ct.roles[0],index:Ct.index,codec:Ct.codec,accessibility:Ct.accessibility[0]};gt.some(function(Qt,$t){if(Z.matchSettings(Mt,Qt))return ut(ft,$t),vt=$t,!0})}H=!1}o[ft].lastEnabledIndex=vt,U.trigger(r.A.TEXT_TRACKS_ADDED,{enabled:dt(),index:vt,tracks:gt,streamId:ft}),w=!0,k.addFontsFromTracks(gt,ft),k.getFonts().forEach(function(Qt){if(Qt.isEssential){var $t=p[Qt.streamId].getTrackIdxForId(Qt.trackId);p[Qt.streamId].setModeForTrackIdx($t,u.A.TEXT_DISABLED)}}),k.downloadFonts()}function R(Y){try{var gt=Y.streamId;if(!p[gt]||isNaN(Y.time))return;p[gt].manualCueProcessing(Y.time)}catch{}}function V(Y){try{var gt=Y.streamId;if(!p[gt])return;p[gt].disableManualTracks()}catch{}}function dt(){var Y=!0;return H&&!B&&(Y=!1),Y}function ut(Y,gt){(H=gt===-1)&&Z&&Z.saveTextSettingsDisabled();var vt=P(Y);if(vt!==gt&&p[Y]){p[Y].disableManualTracks();var ft=p[Y].getCurrentTrackInfo(),Ct=ft?z.getTextTrack(ft.kind,ft.id,ft.lang,ft.isTTML,ft.isEmbedded):null;Ct&&Ct.mode!==u.A.TEXT_DISABLED&&p[Y].setModeForTrackIdx(vt,u.A.TEXT_HIDDEN),p[Y].setCurrentTrackIdx(gt),ft=p[Y].getCurrentTrackInfo();var Mt=f.get().streaming.text.dispatchForManualRendering;ft&&!Mt&&ft.mode!==u.A.TEXT_DISABLED&&p[Y].setModeForTrackIdx(gt,u.A.TEXT_SHOWING),ft&&ft.isFragmented&&!ft.isEmbedded?function(Qt,$t,Zt){if(l[Qt])for(var ae=l[Qt].getConfig().fragmentedTracks,Ne=0;Ne<ae.length;Ne++){var Et=ae[Ne];if($t.lang===Et.lang&&(Et.id?$t.id===Et.id:$t.index===Et.index)){var Pt=Z.getCurrentTrackFor(u.A.TEXT,Qt);(Et.id?Pt.id!==Et.id:Pt.index!==Et.index)?(p[Qt].deleteCuesFromTrackIdx(Zt),l[Qt].setCurrentFragmentedTrackIdx(Ne)):Zt===-1&&U.trigger(i.A.SET_FRAGMENTED_TEXT_AFTER_DISABLED,{},{streamId:Qt,mediaType:u.A.TEXT})}}}(Y,ft,vt):ft&&!ft.isFragmented&&function(Qt,$t){U.trigger(i.A.SET_NON_FRAGMENTED_TEXT,{currentTrackInfo:$t},{streamId:Qt,mediaType:u.A.TEXT})}(Y,ft),Z.setTrack(ft)}}function P(Y){return p[Y].getCurrentTrackIdx()}function $(){l={},p={},o={},H=!0,w=!1,j=!1}return t={deactivateStream:function(Y){if(Y){var gt=Y.id;l[gt]&&l[gt].resetMediaInfos(),p[gt]&&p[gt].deleteAllTextTracks()}},initialize:function(){k=Ju(it).create({adapter:ht,baseURLController:K}),U.on(i.A.TEXT_TRACKS_QUEUE_INITIALIZED,L,t),U.on(i.A.DVB_FONT_DOWNLOAD_FAILED,N,t),U.on(i.A.DVB_FONT_DOWNLOAD_COMPLETE,S,t),f.get().streaming.text.webvtt.customRenderingEnabled&&(U.on(i.A.PLAYBACK_TIME_UPDATED,R,t),U.on(i.A.PLAYBACK_SEEKING,V,t))},initializeForStream:function(Y){var gt=Y.id,vt=Wu(it).create({videoModel:z,settings:f,streamInfo:Y});vt.initialize(),p[gt]=vt;var ft=Vu(it).create({errHandler:ot,adapter:ht,dvbFonts:k,manifestModel:et,mediaController:Z,videoModel:z,textTracks:vt,vttParser:C,vttCustomRenderingParser:b,ttmlParser:F,streamInfo:Y,settings:f});ft.initialize(),l[gt]=ft,o[gt]={},o[gt].lastEnabledIndex=-1},createTracks:function(Y){var gt=Y.id;p[gt]&&p[gt].createTracks()},getTextSourceBuffer:function(Y){var gt=Y.id;if(l&&l[gt])return l[gt]},getAllTracksAreDisabled:function(){return H},addEmbeddedTrack:function(Y,gt){var vt=Y.id;l[vt]&&l[vt].addEmbeddedTrack(gt)},enableText:function(Y,gt){return(0,D.sq)(gt,"boolean"),dt()!==gt&&(gt&&ut(Y,o[Y].lastEnabledIndex),gt||(o[Y].lastEnabledIndex=P(Y),w?ut(Y,-1):j=!0)),!0},isTextEnabled:dt,setTextTrack:ut,getCurrentTrackIdx:P,enableForcedTextStreaming:function(Y){return(0,D.sq)(Y,"boolean"),B=Y,!0},addMediaInfosToBuffer:function(Y,gt,vt){var ft=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null,Ct=Y.id;l[Ct]&&l[Ct].addMediaInfos(gt,vt,ft)},reset:function(){k.reset(),$(),U.off(i.A.TEXT_TRACKS_QUEUE_INITIALIZED,L,t),U.off(i.A.DVB_FONT_DOWNLOAD_FAILED,N,t),U.off(i.A.DVB_FONT_DOWNLOAD_COMPLETE,S,t),f.get().streaming.text.webvtt.customRenderingEnabled&&(U.off(i.A.PLAYBACK_TIME_UPDATED,R,t),U.off(i.A.PLAYBACK_SEEKING,V,t)),Object.keys(l).forEach(function(Y){l[Y].resetEmbedded(),l[Y].reset()})}},B=!1,w=!1,j=!1,C=zu(it).getInstance(),b=Xu(it).getInstance(),F=Qu(it).getInstance(),U=(0,y.A)(it).getInstance(),st=(0,g.A)(it).getInstance().getLogger(t),$(),t}Ho.__dashjs_factory_name="TextController";var Zu=h.A.getClassFactory(Ho);function ga(){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,R,V,dt,ut,P,$,Y,gt,vt,ft,Ct,Mt,Qt,$t="You must first call initialize() and set a source before calling this method",Zt="You must first call initialize() and set a valid source and view before calling this method",ae="You must first call attachView() to set the video element before calling this method",Ne="You must first call attachSource() with a valid source before calling this method",Et="MediaPlayer not initialized!",Pt=this.context,ce=(0,y.A)(Pt).getInstance(),Kt=(0,lt.A)(Pt).getInstance(),ye=(0,g.A)(Pt).getInstance({settings:Kt});function he(){Ze(null),Ge(null),l=null,k&&(k.reset(),k=null),st&&(st.reset(),st=null),Z&&Z.reset(),Kt.reset(),ht&&(ht.reset(),ht=null)}function de(){return!!o&&!!ft.getElement()}function qe(){return(0,Zs.i)()}function Ye(){if(!b)throw Zt;return V.isPaused()}function sn(){if(!b)throw Zt;return V.getIsDynamic()}function ln(yt){var Tt=S&&S.hasVideoTrack()?u.A.VIDEO:u.A.AUDIO,Wt=$.getCurrentDVRInfo(Tt);if(!Wt)return 0;var we=V.getOriginalLiveDelay(),je=Wt.range.start+yt;return je>Wt.range.end-we&&(je=Wt.range.end-we),je}function kt(yt){if(!b)throw Zt;var Tt=Ve().currentTime;if(yt!==void 0)Tt=S.getTimeRelativeToStreamId(Tt,yt);else if(V.getIsDynamic()){var Wt=S&&S.hasVideoTrack()?u.A.VIDEO:u.A.AUDIO,we=$.getCurrentDVRInfo(Wt);Tt=we===null||Tt===0?0:Math.max(0,Tt-we.range.start)}return Tt}function ue(){if(!b)throw Zt;var yt=Ve().duration;if(V.getIsDynamic()){var Tt=S&&S.hasVideoTrack()?u.A.VIDEO:u.A.AUDIO,Wt=$.getCurrentDVRInfo(Tt);yt=Wt?Wt.range.end-Wt.range.start:0}return yt}function ee(yt){(0,D.sq)(yt,"boolean"),F=yt}function ge(){Z.restoreDefaultUTCTimingSources()}function De(){return $}function Ve(){if(!ft.getElement())throw ae;return ft.getElement()}function Ge(yt){if(!p)throw Et;ft.setElement(yt),yt&&(se(),function(){if(!st){var Tt=dashjs.MetricsReporting;if(typeof Tt=="function"){var Wt=Tt(Pt).create();st=Wt.createMetricsReporting({debug:ye,eventBus:ce,mediaElement:Ve(),adapter:ot,dashMetrics:$,mediaPlayerModel:et,events:i.A,constants:u.A,metricsConstants:_.A})}}}(),function(){if(!it){var Tt=dashjs.MssHandler;typeof Tt=="function"&&(mt.extend(Tt.errors),it=Tt(Pt).create({eventBus:ce,mediaPlayerModel:et,dashMetrics:$,manifestModel:Y,playbackController:V,streamController:S,protectionController:k,baseURLController:z,errHandler:K,events:i.A,constants:u.A,debug:ye,initSegmentType:jt.G.INIT_SEGMENT_TYPE,BASE64:fa,ISOBoxer:Ni,settings:Kt}))}}(),S&&S.switchToVideoElement(U)),b&&Oe(),le(U)}function Ke(yt){if(!C)throw $t;var Tt=S.getActiveStreamInfo();return Tt?j.getTracksFor(yt,Tt.id):[]}function Ze(yt){var Tt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:NaN;if(!p)throw Et;typeof yt=="string"&&Ct.initialize(yt),Tt==null&&(Tt=NaN),isNaN(Tt)||(Tt=Math.max(0,Tt)),U=Tt,o=yt,(C||b)&&Oe(),de()&&le(U)}function pe(){if(!C)throw $t;var yt=S.getActiveStreamInfo();return yt?S.getStreamById(yt.id):null}function Oe(){b=!1,C=!1,ot.reset(),S.reset(),R.reset(),P.reset(),V.reset(),dt.reset(),ut.reset(),H.reset(),j.reset(),Qt.reset(),k&&(Kt.get().streaming.protection.keepProtectionMediaKeys?k.stop():(k.reset(),k=null,se())),L.reset(),gt.reset(),vt.reset()}function Ft(){return xs(Pt).create({debug:ye,errHandler:K,dashMetrics:$,mediaPlayerModel:et,requestModifier:(0,Dt.A)(Pt).getInstance(),mssHandler:it,settings:Kt})}function se(){if(k)return k;var yt=dashjs.Protection;if(typeof yt=="function"){var Tt=yt(Pt).create();return i.A.extend(yt.events),r.A.extend(yt.events,{publicOnly:!0}),mt.extend(yt.errors),f||(f=(0,no.A)(Pt).getInstance()),k=Tt.createProtectionSystem({debug:ye,errHandler:K,videoModel:ft,customParametersModel:Z,capabilities:f,eventBus:ce,events:i.A,BASE64:fa,constants:u.A,cmcdModel:gt,settings:Kt})}return null}function xt(){if(!p)throw Et;if(ht)return ht;var yt=dashjs.OfflineController;if(typeof yt=="function"){i.A.extend(yt.events),r.A.extend(yt.events,{publicOnly:!0}),mt.extend(yt.errors);var Tt=Ft(),Wt=va(Pt).create();return Wt.setConfig({manifestModel:Y,adapter:ot,manifestLoader:Tt,errHandler:K,contentSteeringController:ut}),ht=yt(Pt).create({debug:ye,manifestUpdater:Wt,baseURLController:z,manifestLoader:Tt,manifestModel:Y,mediaPlayerModel:et,abrController:H,playbackController:V,adapter:ot,errHandler:K,dashMetrics:$,timelineConverter:w,segmentBaseController:Qt,schemeLoaderFactory:B,eventBus:ce,events:i.A,errors:mt,constants:u.A,settings:Kt,dashConstants:n.A,urlUtils:(0,At.A)(Pt).getInstance()})}return null}function Gt(yt){var Tt=S&&S.hasVideoTrack()?u.A.VIDEO:u.A.AUDIO,Wt=$.getCurrentDVRInfo(Tt);return Wt?yt+(Wt.manifestInfo.availableFrom.getTime()/1e3+Wt.range.start):0}function le(){var yt,Tt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:NaN;ht&&ht.resetRecords(),!C&&o&&(C=!0,t.info("Streaming Initialized"),yt=Ft(),S||(S=Ia(Pt).getInstance()),L||(L=Zu(Pt).create({errHandler:K,manifestModel:Y,adapter:ot,mediaController:j,baseURLController:z,videoModel:ft,settings:Kt})),N.setConfig({capabilities:f,customParametersModel:Z,adapter:ot,settings:Kt,manifestModel:Y,errHandler:K}),S.setConfig({capabilities:f,capabilitiesFilter:N,manifestLoader:yt,manifestModel:Y,mediaPlayerModel:et,customParametersModel:Z,protectionController:k,textController:L,adapter:ot,dashMetrics:$,errHandler:K,timelineConverter:w,videoModel:ft,playbackController:V,serviceDescriptionController:dt,contentSteeringController:ut,abrController:H,mediaController:j,settings:Kt,baseURLController:z,uriFragmentModel:Ct,segmentBaseController:Qt}),R.setConfig({settings:Kt,playbackController:V,streamController:S,videoModel:ft,timelineConverter:w,adapter:ot}),V.setConfig({streamController:S,serviceDescriptionController:dt,dashMetrics:$,adapter:ot,videoModel:ft,timelineConverter:w,settings:Kt}),P.setConfig({streamController:S,playbackController:V,mediaPlayerModel:et,videoModel:ft,settings:Kt}),H.setConfig({streamController:S,domStorage:Mt,mediaPlayerModel:et,customParametersModel:Z,cmsdModel:vt,dashMetrics:$,adapter:ot,videoModel:ft,settings:Kt}),gt.setConfig({abrController:H,dashMetrics:$,playbackController:V}),vt.setConfig({}),H.initialize(),S.initialize(F,l),L.initialize(),R.initialize(),P.initialize(),gt.initialize(),vt.initialize(),ut.initialize(),Qt.initialize(),typeof o=="string"?S.load(o,Tt):S.loadWithManifest(o,Tt)),!b&&de()&&(b=!0,t.info("Playback Initialized"))}return e={initialize:function(yt,Tt,Wt){var we=arguments.length>3&&arguments[3]!==void 0?arguments[3]:NaN;f||(f=(0,no.A)(Pt).getInstance()).setConfig({settings:Kt}),K||(K=Us(Pt).getInstance()),f.supportsMediaSource()?(p||(p=!0,w=Gu(Pt).getInstance(),H||(H=zs(Pt).getInstance()).setConfig({settings:Kt}),B||(B=bn(Pt).getInstance()),V||(V=d(Pt).getInstance()),j||(j=ns(Pt).getInstance()),S||(S=Ia(Pt).getInstance()),R||(R=Jo(Pt).getInstance()),P||(P=Zo(Pt).getInstance()),dt||(dt=es(Pt).getInstance()),ut||(ut=Jr(Pt).getInstance()),N||(N=Bs(Pt).getInstance()),ot=gu(Pt).getInstance(),Y=qs(Pt).getInstance(),gt=Tn(Pt).getInstance(),vt=Hr(Pt).getInstance(),$=ku(Pt).getInstance({settings:Kt}),Mt=Js(Pt).getInstance({settings:Kt}),ot.setConfig({constants:u.A,cea608parser:I(),errHandler:K,BASE64:fa}),z||(z=ls(Pt).create()),z.setConfig({adapter:ot,contentSteeringController:ut}),dt.setConfig({adapter:ot}),Qt||(Qt=nu(Pt).getInstance({dashMetrics:$,mediaPlayerModel:et,errHandler:K,baseURLController:z,events:i.A,eventBus:ce,debug:ye,boxParser:(0,Xr.A)(Pt).getInstance(),requestModifier:(0,Dt.A)(Pt).getInstance(),errors:mt})),j.setConfig({domStorage:Mt,settings:Kt,customParametersModel:Z}),et.setConfig({playbackController:V,serviceDescriptionController:dt}),ut.setConfig({adapter:ot,errHandler:K,dashMetrics:$,mediaPlayerModel:et,manifestModel:Y,serviceDescriptionController:dt,eventBus:ce,requestModifier:(0,Dt.A)(Pt).getInstance()}),ge(),ee(Wt===void 0||Wt),xt()),yt&&Ge(yt),Tt&&Ze(Tt,we),t.info("[dash.js "+qe()+"] MediaPlayer has been initialized")):K.error(new pt.A(mt.CAPABILITY_MEDIASOURCE_ERROR_CODE,mt.CAPABILITY_MEDIASOURCE_ERROR_MESSAGE))},setConfig:function(yt){yt&&(yt.capabilities&&(f=yt.capabilities),yt.capabilitiesFilter&&(N=yt.capabilitiesFilter),yt.streamController&&(S=yt.streamController),yt.textController&&(L=yt.textController),yt.gapController&&(R=yt.gapController),yt.playbackController&&(V=yt.playbackController),yt.serviceDescriptionController&&(dt=yt.serviceDescriptionController),yt.contentSteeringController&&(ut=yt.contentSteeringController),yt.catchupController&&(P=yt.catchupController),yt.mediaPlayerModel&&(et=yt.mediaPlayerModel),yt.customParametersModel&&(Z=yt.customParametersModel),yt.abrController&&(H=yt.abrController),yt.schemeLoaderFactory&&(B=yt.schemeLoaderFactory),yt.mediaController&&(j=yt.mediaController),yt.settings&&(Kt=yt.settings))},on:function(yt,Tt,Wt,we){ce.on(yt,Tt,Wt,we)},off:function(yt,Tt,Wt){ce.off(yt,Tt,Wt)},extend:function(yt,Tt,Wt){h.A.extend(yt,Tt,Wt,Pt)},attachView:Ge,attachSource:Ze,refreshManifest:function(yt){if(!p)throw Et;if(!de())return yt(null,Ne);var Tt=this;if(typeof yt=="function"){var Wt=function(we){ce.off(i.A.INTERNAL_MANIFEST_LOADED,Wt,Tt),we.error?yt(null,we.error):yt(we.manifest)};ce.on(i.A.INTERNAL_MANIFEST_LOADED,Wt,Tt)}S.refreshManifest()},isReady:de,preload:function(){if(!ft.getElement()&&!C){if(!o)throw Ne;le(U)}},play:function(){if(!b)throw Zt;(!F||Ye()&&b)&&V.play(!0)},isPaused:Ye,pause:function(){if(!b)throw Zt;V.pause()},isSeeking:function(){if(!b)throw Zt;return V.isSeeking()},isDynamic:sn,getLowLatencyModeEnabled:function(){if(!b)throw Zt;return V.getLowLatencyModeEnabled()},seek:function(yt){if(!b)throw Zt;if((0,D.sq)(yt,"number"),isNaN(yt))throw u.A.BAD_ARGUMENT_ERROR;yt<0&&(yt=0);var Tt=V.getIsDynamic()?ln(yt):yt,Wt=Ve();!V.getIsDynamic()&&Wt.duration&&(Tt=Math.min(Wt.duration,Tt)),V.seek(Tt,!1,!1,!0)},seekToOriginalLive:function(){b&&sn()&&V.seekToOriginalLive()},setPlaybackRate:function(yt){Ve().playbackRate=yt},getPlaybackRate:function(){return Ve().playbackRate},setMute:function(yt){(0,D.sq)(yt,"boolean"),Ve().muted=yt},isMuted:function(){return Ve().muted},setVolume:function(yt){if(typeof yt!="number"||isNaN(yt)||yt<0||yt>1)throw u.A.BAD_ARGUMENT_ERROR;Ve().volume=yt},getVolume:function(){return Ve().volume},time:kt,duration:ue,timeAsUTC:function(){if(!b)throw Zt;return kt()<0?NaN:Gt(kt())},durationAsUTC:function(){if(!b)throw Zt;return Gt(ue())},getActiveStream:pe,getDVRWindowSize:function(){var yt=S&&S.hasVideoTrack()?u.A.VIDEO:u.A.AUDIO,Tt=$.getCurrentDVRInfo(yt);return Tt?Tt.manifestInfo.dvrWindowSize:0},getDVRSeekOffset:ln,getAvailableBaseUrls:function(){var yt=Y.getValue();return yt?z.getBaseUrls(yt):[]},getAvailableLocations:function(){var yt=Y.getValue();if(!yt)return[];var Tt=ot.getLocation(yt),Wt=ut.getSynthesizedLocationElements(Tt);return Tt.concat(Wt)},getTargetLiveDelay:function(){if(!b)throw Zt;return V.getOriginalLiveDelay()},convertToTimeCode:function(yt){yt=Math.max(yt,0);var Tt=Math.floor(yt/3600),Wt=Math.floor(yt%3600/60),we=Math.floor(yt%3600%60);return(Tt===0?"":Tt<10?"0"+Tt.toString()+":":Tt.toString()+":")+(Wt<10?"0"+Wt.toString():Wt.toString())+":"+(we<10?"0"+we.toString():we.toString())},formatUTC:function(yt,Tt,Wt){var we=arguments.length>3&&arguments[3]!==void 0&&arguments[3],je=new Date(1e3*yt),hn=je.toLocaleDateString(Tt),En=je.toLocaleTimeString(Tt,{hour12:Wt});return we?En+" "+hn:En},getVersion:qe,getDebug:function(){return ye},getBufferLength:function(yt){var Tt=[u.A.VIDEO,u.A.AUDIO,u.A.TEXT];if(yt)return Tt.indexOf(yt)!==-1?De().getCurrentBufferLevel(yt)||NaN:(t.warn("getBufferLength requested for invalid type"),NaN);var Wt=Tt.map(function(we){return Ke(we).length>0?De().getCurrentBufferLevel(we):Number.MAX_VALUE}).reduce(function(we,je){return Math.min(we,je)});return Wt===Number.MAX_VALUE?NaN:Wt},getTTMLRenderingDiv:function(){return ft?ft.getTTMLRenderingDiv():null},getVideoElement:Ve,getSource:function(){if(!o)throw Ne;return o},updateSource:function(yt){o=yt,S.load(o)},getCurrentLiveLatency:function(){if(!p)throw Et;return b?V.getCurrentLiveLatency():NaN},getTopBitrateInfoFor:function(yt){if(!C)throw $t;return H.getTopBitrateInfoFor(yt)},setAutoPlay:ee,getAutoPlay:function(){return F},getDashMetrics:De,getQualityFor:function(yt){if(!C)throw $t;if(yt===u.A.IMAGE){var Tt=pe();if(!Tt)return-1;var Wt=Tt.getThumbnailController();return Wt?Wt.getCurrentTrackIndex():-1}return H.getQualityFor(yt)},setQualityFor:function(yt,Tt){var Wt=arguments.length>2&&arguments[2]!==void 0&&arguments[2];if(!C)throw $t;if(yt===u.A.IMAGE){var we=pe();if(!we)return;var je=we.getThumbnailController();je&&je.setTrackByIndex(Tt)}H.setPlaybackQuality(yt,S.getActiveStreamInfo(),Tt,{forceReplace:Wt})},updatePortalSize:function(){H.setElementSize(),H.setWindowResizeEventCalled(!0)},enableText:function(yt){var Tt=S.getActiveStreamInfo();return!(!Tt||!L)&&L.enableText(Tt.id,yt)},enableForcedTextStreaming:function(yt){return!(!S.getActiveStreamInfo()||!L)&&L.enableForcedTextStreaming(yt)},isTextEnabled:function(){var yt=S.getActiveStreamInfo();return!(!yt||!L)&&L.isTextEnabled(yt)},setTextTrack:function(yt){if(!b)throw Zt;var Tt=S.getActiveStreamInfo();Tt&&L&&L.setTextTrack(Tt.id,yt)},getBitrateInfoListFor:function(yt){if(!C)throw $t;var Tt=pe();return Tt?Tt.getBitrateListFor(yt):[]},getStreamsFromManifest:function(yt){if(!C)throw $t;return ot.getStreamsInfo(yt)},getTracksFor:Ke,getTracksForTypeFromManifest:function(yt,Tt,Wt){if(!C)throw $t;return(Wt=Wt||ot.getStreamsInfo(Tt,1)[0])?ot.getAllMediaInfoForType(Wt,yt,Tt):[]},getCurrentTrackFor:function(yt){if(!C)throw $t;var Tt=S.getActiveStreamInfo();return j.getCurrentTrackFor(yt,Tt.id)},setInitialMediaSettingsFor:function(yt,Tt){if(!p)throw Et;j.setInitialSettings(yt,Tt)},getInitialMediaSettingsFor:function(yt){if(!p)throw Et;return j.getInitialSettings(yt)},setCurrentTrack:function(yt){var Tt=arguments.length>1&&arguments[1]!==void 0&&arguments[1];if(!C)throw $t;j.setTrack(yt,Tt)},addABRCustomRule:function(yt,Tt,Wt){Z.addAbrCustomRule(yt,Tt,Wt)},removeABRCustomRule:function(yt){Z.removeAbrCustomRule(yt)},removeAllABRCustomRule:function(){Z.removeAllAbrCustomRule()},getABRCustomRules:function(){return Z.getAbrCustomRules()},getAverageThroughput:function(yt){var Tt=H.getThroughputHistory(),Wt=V.getIsDynamic();return Tt?Tt.getAverageThroughput(yt,Wt):0},retrieveManifest:function(yt,Tt){var Wt=Ft(),we=this,je=function(hn){hn.error?Tt(null,hn.error):Tt(hn.manifest),ce.off(i.A.INTERNAL_MANIFEST_LOADED,je,we),Wt.reset()};ce.on(i.A.INTERNAL_MANIFEST_LOADED,je,we),Ct.initialize(yt),Wt.load(yt)},addUTCTimingSource:function(yt,Tt){Z.addUTCTimingSource(yt,Tt)},removeUTCTimingSource:function(yt,Tt){Z.removeUTCTimingSource(yt,Tt)},clearDefaultUTCTimingSources:function(){Z.clearDefaultUTCTimingSources()},restoreDefaultUTCTimingSources:ge,setXHRWithCredentialsForType:function(yt,Tt){Z.setXHRWithCredentialsForType(yt,Tt)},getXHRWithCredentialsForType:function(yt){return Z.getXHRWithCredentialsForType(yt)},getProtectionController:function(){return se()},attachProtectionController:function(yt){k=yt},setProtectionData:function(yt){l=yt,S&&S.setProtectionData(l)},registerLicenseRequestFilter:function(yt){Z.registerLicenseRequestFilter(yt)},registerLicenseResponseFilter:function(yt){Z.registerLicenseResponseFilter(yt)},unregisterLicenseRequestFilter:function(yt){Z.unregisterLicenseRequestFilter(yt)},unregisterLicenseResponseFilter:function(yt){Z.unregisterLicenseResponseFilter(yt)},registerCustomCapabilitiesFilter:function(yt){Z.registerCustomCapabilitiesFilter(yt)},unregisterCustomCapabilitiesFilter:function(yt){Z.unregisterCustomCapabilitiesFilter(yt)},setCustomInitialTrackSelectionFunction:function(yt){Z.setCustomInitialTrackSelectionFunction(yt)},resetCustomInitialTrackSelectionFunction:function(){Z.resetCustomInitialTrackSelectionFunction(null)},attachTTMLRenderingDiv:function(yt){if(!ft.getElement())throw ae;ft.setTTMLRenderingDiv(yt)},attachVttRenderingDiv:function(yt){if(!ft.getElement())throw ae;ft.setVttRenderingDiv(yt)},getCurrentTextTrackIndex:function(){var yt=S.getActiveStreamInfo();if(yt&&L)return L.getCurrentTrackIdx(yt.id)},provideThumbnail:function(yt,Tt){if(typeof Tt=="function")if(yt<0)Tt(null);else{var Wt=V.getIsDynamic()?ln(yt):yt,we=S.getStreamForTime(Wt);if(we!==null){var je=we.getThumbnailController();if(je)return je.provide(Wt,Tt);Tt(null)}else Tt(null)}},getDashAdapter:function(){return ot},getOfflineController:function(){return xt()},triggerSteeringRequest:function(){if(ut)return ut.loadSteeringData()},getCurrentSteeringResponseData:function(){if(ut)return ut.getCurrentSteeringResponseData()},getSettings:function(){return Kt.get()},updateSettings:function(yt){Kt.update(yt)},resetSettings:function(){Kt.reset()},reset:he,destroy:function(){he(),h.A.deleteSingletonInstances(Pt)}},t=ye.getLogger(e),p=!1,b=!1,C=!1,F=!0,U=NaN,k=null,ht=null,l=null,ot=null,Qt=null,i.A.extend(r.A),et=Ys(Pt).getInstance(),Z=(0,Le.A)(Pt).getInstance(),ft=Qs(Pt).getInstance(),Ct=js(Pt).getInstance(),e}ga.__dashjs_factory_name="MediaPlayer";var Di=h.A.getClassFactory(ga);Di.events=r.A,Di.errors=mt,h.A.updateClassFactory(ga.__dashjs_factory_name,Di);var tl=Di},7547: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=new(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)).AST_IN_FUTURE="astInFuture",r.BASE_URLS_UPDATED="baseUrlsUpdated",r.BUFFER_EMPTY="bufferStalled",r.BUFFER_LOADED="bufferLoaded",r.BUFFER_LEVEL_STATE_CHANGED="bufferStateChanged",r.BUFFER_LEVEL_UPDATED="bufferLevelUpdated",r.DVB_FONT_DOWNLOAD_ADDED="dvbFontDownloadAdded",r.DVB_FONT_DOWNLOAD_COMPLETE="dvbFontDownloadComplete",r.DVB_FONT_DOWNLOAD_FAILED="dvbFontDownloadFailed",r.DYNAMIC_TO_STATIC="dynamicToStatic",r.ERROR="error",r.FRAGMENT_LOADING_COMPLETED="fragmentLoadingCompleted",r.FRAGMENT_LOADING_PROGRESS="fragmentLoadingProgress",r.FRAGMENT_LOADING_STARTED="fragmentLoadingStarted",r.FRAGMENT_LOADING_ABANDONED="fragmentLoadingAbandoned",r.LOG="log",r.MANIFEST_LOADING_STARTED="manifestLoadingStarted",r.MANIFEST_LOADING_FINISHED="manifestLoadingFinished",r.MANIFEST_LOADED="manifestLoaded",r.METRICS_CHANGED="metricsChanged",r.METRIC_CHANGED="metricChanged",r.METRIC_ADDED="metricAdded",r.METRIC_UPDATED="metricUpdated",r.PERIOD_SWITCH_STARTED="periodSwitchStarted",r.PERIOD_SWITCH_COMPLETED="periodSwitchCompleted",r.QUALITY_CHANGE_REQUESTED="qualityChangeRequested",r.QUALITY_CHANGE_RENDERED="qualityChangeRendered",r.TRACK_CHANGE_RENDERED="trackChangeRendered",r.STREAM_INITIALIZING="streamInitializing",r.STREAM_UPDATED="streamUpdated",r.STREAM_ACTIVATED="streamActivated",r.STREAM_DEACTIVATED="streamDeactivated",r.STREAM_INITIALIZED="streamInitialized",r.STREAM_TEARDOWN_COMPLETE="streamTeardownComplete",r.TEXT_TRACKS_ADDED="allTextTracksAdded",r.TEXT_TRACK_ADDED="textTrackAdded",r.CUE_ENTER="cueEnter",r.CUE_EXIT="cueExit",r.THROUGHPUT_MEASUREMENT_STORED="throughputMeasurementStored",r.TTML_PARSED="ttmlParsed",r.TTML_TO_PARSE="ttmlToParse",r.CAPTION_RENDERED="captionRendered",r.CAPTION_CONTAINER_RESIZE="captionContainerResize",r.CAN_PLAY="canPlay",r.CAN_PLAY_THROUGH="canPlayThrough",r.PLAYBACK_ENDED="playbackEnded",r.PLAYBACK_ERROR="playbackError",r.PLAYBACK_NOT_ALLOWED="playbackNotAllowed",r.PLAYBACK_METADATA_LOADED="playbackMetaDataLoaded",r.PLAYBACK_LOADED_DATA="playbackLoadedData",r.PLAYBACK_PAUSED="playbackPaused",r.PLAYBACK_PLAYING="playbackPlaying",r.PLAYBACK_PROGRESS="playbackProgress",r.PLAYBACK_RATE_CHANGED="playbackRateChanged",r.PLAYBACK_SEEKED="playbackSeeked",r.PLAYBACK_SEEKING="playbackSeeking",r.PLAYBACK_STALLED="playbackStalled",r.PLAYBACK_STARTED="playbackStarted",r.PLAYBACK_TIME_UPDATED="playbackTimeUpdated",r.PLAYBACK_VOLUME_CHANGED="playbackVolumeChanged",r.PLAYBACK_WAITING="playbackWaiting",r.MANIFEST_VALIDITY_CHANGED="manifestValidityChanged",r.EVENT_MODE_ON_START="eventModeOnStart",r.EVENT_MODE_ON_RECEIVE="eventModeOnReceive",r.CONFORMANCE_VIOLATION="conformanceViolation",r.REPRESENTATION_SWITCH="representationSwitch",r.ADAPTATION_SET_REMOVED_NO_CAPABILITIES="adaptationSetRemovedNoCapabilities",r.CONTENT_STEERING_REQUEST_COMPLETED="contentSteeringRequestCompleted",r.INBAND_PRFT="inbandPrft",r.MANAGED_MEDIA_SOURCE_START_STREAMING="managedMediaSourceStartStreaming",r.MANAGED_MEDIA_SOURCE_END_STREAMING="managedMediaSourceEndStreaming",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},7256: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.STREAM="stream",this.VIDEO="video",this.AUDIO="audio",this.TEXT="text",this.MUXED="muxed",this.IMAGE="image",this.STPP="stpp",this.TTML="ttml",this.VTT="vtt",this.WVTT="wvtt",this.CONTENT_STEERING="contentSteering",this.ABR_STRATEGY_DYNAMIC="abrDynamic",this.ABR_STRATEGY_BOLA="abrBola",this.ABR_STRATEGY_L2A="abrL2A",this.ABR_STRATEGY_LoLP="abrLoLP",this.ABR_STRATEGY_THROUGHPUT="abrThroughput",this.ABR_FETCH_THROUGHPUT_CALCULATION_DOWNLOADED_DATA="abrFetchThroughputCalculationDownloadedData",this.ABR_FETCH_THROUGHPUT_CALCULATION_MOOF_PARSING="abrFetchThroughputCalculationMoofParsing",this.ABR_FETCH_THROUGHPUT_CALCULATION_AAST="abrFetchThroughputCalculationAAST",this.LIVE_CATCHUP_MODE_DEFAULT="liveCatchupModeDefault",this.LIVE_CATCHUP_MODE_LOLP="liveCatchupModeLoLP",this.MOVING_AVERAGE_SLIDING_WINDOW="slidingWindow",this.MOVING_AVERAGE_EWMA="ewma",this.BAD_ARGUMENT_ERROR="Invalid Arguments",this.MISSING_CONFIG_ERROR="Missing config parameter(s)",this.TRACK_SWITCH_MODE_ALWAYS_REPLACE="alwaysReplace",this.TRACK_SWITCH_MODE_NEVER_REPLACE="neverReplace",this.TRACK_SELECTION_MODE_FIRST_TRACK="firstTrack",this.TRACK_SELECTION_MODE_HIGHEST_BITRATE="highestBitrate",this.TRACK_SELECTION_MODE_HIGHEST_EFFICIENCY="highestEfficiency",this.TRACK_SELECTION_MODE_WIDEST_RANGE="widestRange",this.TRACK_SELECTION_MODE_HIGHEST_SELECTION_PRIORITY="highestSelectionPriority",this.CMCD_MODE_QUERY="query",this.CMCD_MODE_HEADER="header",this.INITIALIZE="initialize",this.TEXT_SHOWING="showing",this.TEXT_HIDDEN="hidden",this.TEXT_DISABLED="disabled",this.CC1="CC1",this.CC3="CC3",this.UTF8="utf-8",this.SCHEME_ID_URI="schemeIdUri",this.START_TIME="starttime",this.SERVICE_DESCRIPTION_DVB_LL_SCHEME="urn:dvb:dash:lowlatency:scope:2019",this.SUPPLEMENTAL_PROPERTY_DVB_LL_SCHEME="urn:dvb:dash:lowlatency:critical:2019",this.FONT_DOWNLOAD_DVB_SCHEME="urn:dvb:dash:fontdownload:2014",this.XML="XML",this.ARRAY_BUFFER="ArrayBuffer",this.DVB_REPORTING_URL="dvb:reportingUrl",this.DVB_PROBABILITY="dvb:probability",this.OFF_MIMETYPE="application/font-sfnt",this.WOFF_MIMETYPE="application/font-woff",this.VIDEO_ELEMENT_READY_STATES={HAVE_NOTHING:0,HAVE_METADATA:1,HAVE_CURRENT_DATA:2,HAVE_FUTURE_DATA:3,HAVE_ENOUGH_DATA:4},this.FILE_LOADER_TYPES={FETCH:"fetch_loader",XHR:"xhr_loader"}}}])&&ct(n.prototype,_),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,_}());Lt.A=u},1991: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.TCP_CONNECTION="TcpList",this.HTTP_REQUEST="HttpList",this.TRACK_SWITCH="RepSwitchList",this.BUFFER_LEVEL="BufferLevel",this.BUFFER_LOADED="bufferLoaded",this.ABANDON_LOAD="abandonload",this.ALLOW_LOAD="allowload",this.BUFFER_EMPTY="bufferStalled",this.BUFFER_STATE="BufferState",this.DVR_INFO="DVRInfo",this.DROPPED_FRAMES="DroppedFrames",this.SCHEDULING_INFO="SchedulingInfo",this.REQUESTS_QUEUE="RequestsQueue",this.MANIFEST_UPDATE="ManifestUpdate",this.MANIFEST_UPDATE_STREAM_INFO="ManifestUpdatePeriodInfo",this.MANIFEST_UPDATE_TRACK_INFO="ManifestUpdateRepresentationInfo",this.PLAY_LIST="PlayList",this.DVB_ERRORS="DVBErrors",this.HTTP_REQUEST_DVB_REPORTING_TYPE="DVBReporting"}}])&&ct(n.prototype,_),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,_}());Lt.A=u},1648:function(ve,Lt,M){function ct(Dt,At,Rt){return Object.defineProperty(Dt,"prototype",{writable:!1}),Dt}M.d(Lt,{default:function(){return Bt}});var I=ct(function Dt(){(function(At,Rt){if(!(At instanceof Rt))throw new TypeError("Cannot call a class as a function")})(this,Dt),this.mpdurl=null,this.errorcode=null,this.terror=null,this.url=null,this.ipaddress=null,this.servicelocation=null});I.SSL_CONNECTION_FAILED_PREFIX="SSL",I.DNS_RESOLUTION_FAILED="C00",I.HOST_UNREACHABLE="C01",I.CONNECTION_REFUSED="C02",I.CONNECTION_ERROR="C03",I.CORRUPT_MEDIA_ISOBMFF="M00",I.CORRUPT_MEDIA_OTHER="M01",I.BASE_URL_CHANGED="F00",I.BECAME_REPORTER="S00";var u=I,n=M(7125);function _(Dt){var At,Rt,_t=(Dt=Dt||{}).eventBus,Yt=Dt.dashMetrics,Vt=Dt.metricsConstants,Xt=Dt.events;function ne(Qe){var nn=new u;if(Rt){for(var yn in Qe)Qe.hasOwnProperty(yn)&&(nn[yn]=Qe[yn]);nn.mpdurl||(nn.mpdurl=Rt.originalUrl||Rt.url),nn.terror||(nn.terror=new Date),Yt.addDVBErrors(nn)}}function Te(Qe){Qe.error||(Rt=Qe.manifest)}function me(Qe){ne({errorcode:u.BASE_URL_CHANGED,servicelocation:Qe.entry})}function Ue(){ne({errorcode:u.BECAME_REPORTER})}function Me(Qe){var nn;Qe.metric===Vt.HTTP_REQUEST&&((nn=Qe.value).responsecode===0||nn.responsecode==null||nn.responsecode>=400||nn.responsecode<100||nn.responsecode>=600)&&ne({errorcode:nn.responsecode||u.CONNECTION_ERROR,url:nn.url,terror:nn.tresponse,servicelocation:nn._serviceLocation})}function ze(Qe){var nn;switch(Qe.error?Qe.error.code:0){case MediaError.MEDIA_ERR_NETWORK:nn=u.CONNECTION_ERROR;break;case MediaError.MEDIA_ERR_DECODE:nn=u.CORRUPT_MEDIA_OTHER;break;default:return}ne({errorcode:nn})}return At={initialize:function(){_t.on(Xt.MANIFEST_UPDATED,Te,At),_t.on(Xt.SERVICE_LOCATION_BASE_URL_BLACKLIST_CHANGED,me,At),_t.on(Xt.METRIC_ADDED,Me,At),_t.on(Xt.METRIC_UPDATED,Me,At),_t.on(Xt.PLAYBACK_ERROR,ze,At),_t.on(n.A.BECAME_REPORTING_PLAYER,Ue,At)},reset:function(){_t.off(Xt.MANIFEST_UPDATED,Te,At),_t.off(Xt.SERVICE_LOCATION_BASE_URL_BLACKLIST_CHANGED,me,At),_t.off(Xt.METRIC_ADDED,Me,At),_t.off(Xt.METRIC_UPDATED,Me,At),_t.off(Xt.PLAYBACK_ERROR,ze,At),_t.off(n.A.BECAME_REPORTING_PLAYER,Ue,At)}}}_.__dashjs_factory_name="DVBErrorsTranslator";var y=dashjs.FactoryMaker.getSingletonFactory(_),i=M(6877);function h(Dt){Dt=Dt||{};var At,Rt,_t=!1,Yt=this.context,Vt=Dt.mediaElement;return At={initialize:function(Xt){Xt&&Xt.length&&(Xt.forEach(function(ne){var Te=ne.starttime,me=Te+ne.duration;Rt.add(Te,me)}),_t=!!Xt[0]._useWallClockTime)},reset:function(){Rt.clear()},isEnabled:function(){var Xt,ne=Rt.length;if(!ne)return!0;Xt=_t?new Date().getTime()/1e3:Vt.currentTime;for(var Te=0;Te<ne;Te+=1){var me=Rt.start(Te),Ue=Rt.end(Te);if(me<=Xt&&Xt<Ue)return!0}return!1}},Rt=(0,i.A)(Yt).create(),At}h.__dashjs_factory_name="RangeController";var g=dashjs.FactoryMaker.getClassFactory(h);function r(){return{serialise:function Dt(At){var Rt,_t,Yt=[],Vt=[];for(Rt in At)if(At.hasOwnProperty(Rt)&&Rt.indexOf("_")!==0){if((_t=At[Rt])==null&&(_t=""),Array.isArray(_t)){if(!_t.length)continue;Vt=[],_t.forEach(function(Xt){var ne=Object.prototype.toString.call(Xt).slice(8,-1)!=="Object";Vt.push(ne?Xt:Dt(Xt))}),_t=Vt.map(encodeURIComponent).join(",")}else typeof _t=="string"?_t=encodeURIComponent(_t):_t instanceof Date?_t=_t.toISOString():typeof _t=="number"&&(_t=Math.round(_t));Yt.push(Rt+"="+_t)}return Yt.join("&")}}}r.__dashjs_factory_name="MetricSerialiser";var m=dashjs.FactoryMaker.getSingletonFactory(r);function d(){var Dt,At,Rt,_t=window.crypto||window.msCrypto,Yt=Uint32Array,Vt=Math.pow(2,8*Yt.BYTES_PER_ELEMENT)-1;function Xt(){_t&&(Dt||(Dt=new Yt(10)),_t.getRandomValues(Dt),At=0)}return Rt={random:function(ne,Te){var me;return ne||(ne=0),Te||(Te=1),_t?(At===Dt.length&&Xt(),me=Dt[At]/Vt,At+=1):me=Math.random(),me*(Te-ne)+ne}},Xt(),Rt}d.__dashjs_factory_name="RNG";var T=dashjs.FactoryMaker.getSingletonFactory(d),q=M(6890);function W(Dt){var At;Dt=Dt||{};var Rt,_t,Yt,Vt,Xt,ne,Te,me=this.context,Ue=[],Me=Dt.metricsConstants;function ze(){Vt=!1,Xt=!1,ne=null,Te=null}return At={report:function(Qe,nn){Array.isArray(nn)||(nn=[nn]),Xt&&Te.isEnabled()&&nn.forEach(function(yn){var xn=Rt.serialise(yn);Qe!==Me.DVB_ERRORS&&(xn="metricname=".concat(Qe,"&").concat(xn)),function(Yn,An,Un){var Sn=new XMLHttpRequest;Sn.withCredentials=_t.getXHRWithCredentialsForType(Me.HTTP_REQUEST_DVB_REPORTING_TYPE);var kn=function(){var Hn=Ue.indexOf(Sn);Hn!==-1&&(Ue.splice(Hn,1),!(Sn.status>=200&&Sn.status<300)&&Un&&Un())};Ue.push(Sn);try{Sn.open("GET",Yn),Sn.onloadend=kn,Sn.onerror=kn,Sn.send()}catch{Sn.onerror()}}(xn="".concat(ne,"?").concat(xn),0,function(){Xt=!1})})},initialize:function(Qe,nn){var yn;if(Te=nn,!(ne=Qe.dvbReportingUrl))throw new Error("required parameter missing (dvb:reportingUrl)");Vt||((yn=Qe.dvbProbability)&&(yn===1e3||yn/1e3>=Yt.random())&&(Xt=!0),Vt=!0)},reset:function(){ze()}},Rt=m(me).getInstance(),Yt=T(me).getInstance(),_t=(0,q.A)(me).getInstance(),ze(),At}W.__dashjs_factory_name="DVBReporting";var x=dashjs.FactoryMaker.getClassFactory(W);function nt(Dt){Dt=Dt||{};var At,Rt={"urn:dvb:dash:reporting:2014":x},_t=this.context,Yt=Dt.debug?Dt.debug.getLogger(At):{},Vt=Dt.metricsConstants,Xt=Dt.mediaPlayerModel||{};return{create:function(ne,Te){var me;try{(me=Rt[ne.schemeIdUri](_t).create({metricsConstants:Vt,mediaPlayerModel:Xt})).initialize(ne,Te)}catch(Ue){me=null,Yt.error("ReportingFactory: could not create Reporting with schemeIdUri ".concat(ne.schemeIdUri," (").concat(Ue.message,")"))}return me},register:function(ne,Te){Rt[ne]=Te},unregister:function(ne){delete Rt[ne]}}}nt.__dashjs_factory_name="ReportingFactory";var O=dashjs.FactoryMaker.getSingletonFactory(nt);function J(Dt){var At=[],Rt=O(this.context).getInstance(Dt);return{initialize:function(_t,Yt){_t.some(function(Vt){var Xt=Rt.create(Vt,Yt);if(Xt)return At.push(Xt),!0})},reset:function(){At.forEach(function(_t){return _t.reset()}),At=[]},report:function(_t,Yt){At.forEach(function(Vt){return Vt.report(_t,Yt)})}}}J.__dashjs_factory_name="ReportingController";var pt=dashjs.FactoryMaker.getClassFactory(J);function G(){return{reconstructFullMetricName:function(Dt,At,Rt){var _t=Dt;return At&&(_t+="("+At,Rt&&Rt.length&&(_t+=","+Rt),_t+=")"),_t},validateN:function(Dt){if(!Dt)throw new Error("missing n");if(isNaN(Dt))throw new Error("n is NaN");if(Dt<0)throw new Error("n must be positive");return Dt}}}G.__dashjs_factory_name="HandlerHelpers";var X=dashjs.FactoryMaker.getSingletonFactory(G);function rt(Dt){var At,Rt,_t,Yt,Vt;Dt=Dt||{};var Xt=this.context,ne=X(Xt).getInstance(),Te=[],me=Dt.metricsConstants;function Ue(){var Me=function(){try{return Object.keys(Te).map(function(ze){return Te[ze]}).reduce(function(ze,Qe){return ze.level<Qe.level?ze:Qe})}catch{return}}();Me&&Vt!==Me.t&&(Vt=Me.t,At.report(_t,Me))}return{initialize:function(Me,ze,Qe){ze&&(Rt=ne.validateN(Qe),At=ze,_t=ne.reconstructFullMetricName(Me,Qe),Yt=setInterval(Ue,Rt))},reset:function(){clearInterval(Yt),Yt=null,Rt=0,At=null,Vt=null},handleNewMetric:function(Me,ze,Qe){Me===me.BUFFER_LEVEL&&(Te[Qe]=ze)}}}rt.__dashjs_factory_name="BufferLevelHandler";var bt=dashjs.FactoryMaker.getClassFactory(rt),Ut=dashjs.FactoryMaker.getClassFactory(function(Dt){var At,Rt=(Dt=Dt||{}).eventBus,_t=Dt.metricsConstants;function Yt(){Rt.off(n.A.METRICS_INITIALISATION_COMPLETE,Yt,this),Rt.trigger(n.A.BECAME_REPORTING_PLAYER)}return{initialize:function(Vt,Xt){Xt&&(At=Xt,Rt.on(n.A.METRICS_INITIALISATION_COMPLETE,Yt,this))},reset:function(){At=null},handleNewMetric:function(Vt,Xt){Vt===_t.DVB_ERRORS&&At&&At.report(Vt,Xt)}}});function mt(Dt){var At,Rt,_t,Yt,Vt;Dt=Dt||{};var Xt=[],ne=X(this.context).getInstance(),Te=Dt.metricsConstants;function me(){var Ue=Xt;Ue.length&&At&&At.report(Yt,Ue),Xt=[]}return{initialize:function(Ue,Me,ze,Qe){Me&&(Rt=ne.validateN(ze),At=Me,Qe&&Qe.length&&(_t=Qe),Yt=ne.reconstructFullMetricName(Ue,ze,Qe),Vt=setInterval(me,Rt))},reset:function(){clearInterval(Vt),Vt=null,Rt=null,_t=null,Xt=[],At=null},handleNewMetric:function(Ue,Me){Ue===Te.HTTP_REQUEST&&(_t&&_t!==Me.type||Xt.push(Me))}}}mt.__dashjs_factory_name="HttpListHandler";var lt=dashjs.FactoryMaker.getClassFactory(mt);function jt(){var Dt,At;return{initialize:function(Rt,_t){Dt=Rt,At=_t},reset:function(){At=null,Dt=void 0},handleNewMetric:function(Rt,_t){Rt===Dt&&At&&At.report(Dt,_t)}}}jt.__dashjs_factory_name="GenericMetricHandler";var St=dashjs.FactoryMaker.getClassFactory(jt);function Nt(Dt){var At,Rt=(Dt=Dt||{}).debug?Dt.debug.getLogger(At):{},_t=/([a-zA-Z]*)(\(([0-9]*)(\,\s*([a-zA-Z]*))?\))?/,Yt=this.context,Vt={BufferLevel:bt,DVBErrors:Ut,HttpList:lt,PlayList:St,RepSwitchList:St,TcpList:St};return{create:function(Xt,ne){var Te,me=Xt.match(_t);if(me){try{(Te=Vt[me[1]](Yt).create({eventBus:Dt.eventBus,metricsConstants:Dt.metricsConstants})).initialize(me[1],ne,me[3],me[5])}catch(Ue){Te=null,Rt.error("MetricsHandlerFactory: Could not create handler for type ".concat(me[1]," with args ").concat(me[3],", ").concat(me[5]," (").concat(Ue.message,")"))}return Te}},register:function(Xt,ne){Vt[Xt]=ne},unregister:function(Xt){delete Vt[Xt]}}}Nt.__dashjs_factory_name="MetricsHandlerFactory";var Ht=dashjs.FactoryMaker.getSingletonFactory(Nt);function ie(Dt){Dt=Dt||{};var At,Rt=[],_t=this.context,Yt=Dt.eventBus,Vt=Dt.events,Xt=Ht(_t).getInstance({debug:Dt.debug,eventBus:Dt.eventBus,metricsConstants:Dt.metricsConstants});function ne(Te){Rt.forEach(function(me){me.handleNewMetric(Te.metric,Te.value,Te.mediaType)})}return At={initialize:function(Te,me){Te.split(",").forEach(function(Ue,Me,ze){var Qe;if(Ue.indexOf("(")!==-1&&Ue.indexOf(")")===-1){var nn=ze[Me+1];nn&&nn.indexOf("(")===-1&&nn.indexOf(")")!==-1&&(Ue+=","+nn,delete ze[Me+1])}(Qe=Xt.create(Ue,me))&&Rt.push(Qe)}),Yt.on(Vt.METRIC_ADDED,ne,At),Yt.on(Vt.METRIC_UPDATED,ne,At)},reset:function(){Yt.off(Vt.METRIC_ADDED,ne,At),Yt.off(Vt.METRIC_UPDATED,ne,At),Rt.forEach(function(Te){return Te.reset()}),Rt=[]}}}ie.__dashjs_factory_name="MetricsHandlersController";var It=dashjs.FactoryMaker.getClassFactory(ie);function Ot(Dt){var At,Rt,_t;Dt=Dt||{};var Yt=this.context;function Vt(){At&&At.reset(),Rt&&Rt.reset(),_t&&_t.reset()}return{initialize:function(Xt){try{(_t=g(Yt).create({mediaElement:Dt.mediaElement})).initialize(Xt.Range),(Rt=pt(Yt).create({debug:Dt.debug,metricsConstants:Dt.metricsConstants,mediaPlayerModel:Dt.mediaPlayerModel})).initialize(Xt.Reporting,_t),(At=It(Yt).create({debug:Dt.debug,eventBus:Dt.eventBus,metricsConstants:Dt.metricsConstants,events:Dt.events})).initialize(Xt.metrics,Rt)}catch(ne){throw Vt(),ne}},reset:Vt}}Ot.__dashjs_factory_name="MetricsController";var fe=dashjs.FactoryMaker.getClassFactory(Ot);function Ae(Dt,At,Rt){return Object.defineProperty(Dt,"prototype",{writable:!1}),Dt}var Re=Ae(function Dt(){(function(At,Rt){if(!(At instanceof Rt))throw new TypeError("Cannot call a class as a function")})(this,Dt),this.metrics="",this.Range=[],this.Reporting=[]});function Pe(Dt,At,Rt){return Object.defineProperty(Dt,"prototype",{writable:!1}),Dt}var tt=Pe(function Dt(){(function(At,Rt){if(!(At instanceof Rt))throw new TypeError("Cannot call a class as a function")})(this,Dt),this.starttime=0,this.duration=1/0,this._useWallClockTime=!1});function at(Dt,At,Rt){return Object.defineProperty(Dt,"prototype",{writable:!1}),Dt}var qt=at(function Dt(){(function(At,Rt){if(!(At instanceof Rt))throw new TypeError("Cannot call a class as a function")})(this,Dt),this.schemeIdUri="",this.value="",this.dvbReportingUrl="",this.dvbProbability=1e3});function v(Dt){var At=(Dt=Dt||{}).adapter,Rt=Dt.constants;return{getMetrics:function(_t){var Yt=[];return _t&&_t.Metrics_asArray&&_t.Metrics_asArray.forEach(function(Vt){var Xt=new Re,ne=At.getIsDynamic(_t);Vt.hasOwnProperty("metrics")&&(Xt.metrics=Vt.metrics,Vt.Range_asArray&&Vt.Range_asArray.forEach(function(Te){var me=new tt;me.starttime=function(Ue,Me,ze){var Qe,nn,yn=0;return Me?yn=At.getAvailabilityStartTime(Ue)/1e3:(Qe=At.getRegularPeriods(Ue)).length&&(yn=Qe[0].start),nn=yn,ze&&ze.hasOwnProperty(Rt.START_TIME)&&(nn+=ze.starttime),nn}(_t,ne,Te),Te.hasOwnProperty("duration")?me.duration=Te.duration:me.duration=At.getDuration(_t),me._useWallClockTime=ne,Xt.Range.push(me)}),Vt.Reporting_asArray&&(Vt.Reporting_asArray.forEach(function(Te){var me=new qt;Te.hasOwnProperty(Rt.SCHEME_ID_URI)&&(me.schemeIdUri=Te.schemeIdUri,Te.hasOwnProperty("value")&&(me.value=Te.value),Te.hasOwnProperty(Rt.DVB_REPORTING_URL)&&(me.dvbReportingUrl=Te[Rt.DVB_REPORTING_URL]),Te.hasOwnProperty(Rt.DVB_PROBABILITY)&&(me.dvbProbability=Te[Rt.DVB_PROBABILITY]),Xt.Reporting.push(me))}),Yt.push(Xt)))}),Yt}}}v.__dashjs_factory_name="ManifestParsing";var A=dashjs.FactoryMaker.getSingletonFactory(v);function c(Dt){var At;Dt=Dt||{};var Rt={},_t=this.context,Yt=Dt.eventBus,Vt=Dt.events;function Xt(Te){if(!Te.error){var me=Object.keys(Rt);A(_t).getInstance({adapter:Dt.adapter,constants:Dt.constants}).getMetrics(Te.manifest).forEach(function(Ue){var Me=JSON.stringify(Ue);if(Rt.hasOwnProperty(Me))me.splice(Me,1);else try{var ze=fe(_t).create(Dt);ze.initialize(Ue),Rt[Me]=ze}catch{}}),me.forEach(function(Ue){Rt[Ue].reset(),delete Rt[Ue]}),Yt.trigger(n.A.METRICS_INITIALISATION_COMPLETE)}}function ne(){Object.keys(Rt).forEach(function(Te){Rt[Te].reset()}),Rt={}}return At={reset:function(){Yt.off(Vt.MANIFEST_UPDATED,Xt,At),Yt.off(Vt.STREAM_TEARDOWN_COMPLETE,ne,At)}},Yt.on(Vt.MANIFEST_UPDATED,Xt,At),Yt.on(Vt.STREAM_TEARDOWN_COMPLETE,ne,At),At}c.__dashjs_factory_name="MetricsCollectionController";var E=dashjs.FactoryMaker.getClassFactory(c);function Q(){var Dt=this.context;return{createMetricsReporting:function(At){return y(Dt).getInstance({eventBus:At.eventBus,dashMetrics:At.dashMetrics,metricsConstants:At.metricsConstants,events:At.events}).initialize(),E(Dt).create(At)},getReportingFactory:function(){return O(Dt).getInstance()},getMetricsHandlerFactory:function(){return Ht(Dt).getInstance()}}}Q.__dashjs_factory_name="MetricsReporting";var D=dashjs.FactoryMaker.getClassFactory(Q);D.events=n.A,dashjs.FactoryMaker.updateClassFactory(Q.__dashjs_factory_name,D);var Bt=D},7125: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=new(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)).METRICS_INITIALISATION_COMPLETE="internal_metricsReportingInitialized",r.BECAME_REPORTING_PLAYER="internal_becameReportingPlayer",r.CMCD_DATA_GENERATED="cmcdDataGenerated",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},6890:function(ve,Lt,M){var ct=M(289),I=M(5742),u=M(1657),n=M(7652),_=M(2365),y=M(7256);function i(){var h,g,r,m,d,T,q,W,x=this.context,nt=(0,u.A)(x).getInstance();function O(){m=[],d=[],T=[],W=[],q=null,g=[]}function J(rt,bt){var Ut=-1;rt.some(function(mt,lt){if(mt===bt)return Ut=lt,!0}),Ut<0||rt.splice(Ut,1)}function pt(rt){var bt;for(bt=0;bt<W.length;bt++)if(W[bt].rulename===rt)return bt;return-1}function G(rt,bt){X(rt,bt);var Ut=new ct.A;Ut.schemeIdUri=rt,Ut.value=bt,g.push(Ut)}function X(rt,bt){(0,n.sq)(rt,"string"),(0,n.sq)(bt,"string"),g.forEach(function(Ut,mt){Ut.schemeIdUri===rt&&Ut.value===bt&&g.splice(mt,1)})}return h={getCustomInitialTrackSelectionFunction:function(){return q},setCustomInitialTrackSelectionFunction:function(rt){q=rt},resetCustomInitialTrackSelectionFunction:function(){q=null},getLicenseResponseFilters:function(){return d},getLicenseRequestFilters:function(){return m},getCustomCapabilitiesFilters:function(){return T},registerCustomCapabilitiesFilter:function(rt){T.push(rt)},registerLicenseResponseFilter:function(rt){d.push(rt)},registerLicenseRequestFilter:function(rt){m.push(rt)},unregisterCustomCapabilitiesFilter:function(rt){J(T,rt)},unregisterLicenseResponseFilter:function(rt){J(d,rt)},unregisterLicenseRequestFilter:function(rt){J(m,rt)},addAbrCustomRule:function(rt,bt,Ut){if(typeof rt!="string"||rt!==_.A.ABANDON_FRAGMENT_RULES&&rt!==_.A.QUALITY_SWITCH_RULES||typeof bt!="string")throw y.A.BAD_ARGUMENT_ERROR;var mt=pt(bt);mt===-1?W.push({type:rt,rulename:bt,rule:Ut}):(W[mt].type=rt,W[mt].rule=Ut)},removeAllAbrCustomRule:function(){W=[]},removeAbrCustomRule:function(rt){if(rt){var bt=pt(rt);bt!==-1&&W.splice(bt,1)}else W=[]},getAbrCustomRules:function(){return W},addUTCTimingSource:G,removeUTCTimingSource:X,getUTCTimingSources:function(){return g},clearDefaultUTCTimingSources:function(){g=[]},restoreDefaultUTCTimingSources:function(){var rt=nt.get().streaming.utcSynchronization.defaultTimingSource;G(rt.scheme,rt.value)},setXHRWithCredentialsForType:function rt(bt,Ut){bt?r[bt]=!!Ut:Object.keys(r).forEach(function(mt){rt(mt,Ut)})},getXHRWithCredentialsForType:function(rt){var bt=r[rt];return bt===void 0?r.default:bt},setConfig:function(){},reset:function(){O()}},r={default:!1},O(),h}i.__dashjs_factory_name="CustomParametersModel",Lt.A=I.A.getSingletonFactory(i)},2930:function(ve,Lt,M){var ct=M(5742),I=M(9913);function u(_){var y=(_=_||{}).requestModifier;function i(h){var g=new Date,r=h.request,m=new XMLHttpRequest;if(m.open(h.method,h.url,!0),r.responseType&&(m.responseType=r.responseType),r.range&&m.setRequestHeader("Range","bytes="+r.range),r.requestStartDate||(r.requestStartDate=g),y&&y.modifyRequestHeader&&(m=y.modifyRequestHeader(m,{url:h.url})),h.headers)for(var d in h.headers){var T=h.headers[d];T&&m.setRequestHeader(d,T)}m.withCredentials=h.withCredentials,m.onload=h.onload,m.onloadend=h.onend,m.onerror=h.onerror,m.onprogress=h.progress,m.onabort=h.onabort,m.ontimeout=h.ontimeout,m.timeout=h.timeout,m.send(),h.response=m}return{load:function(h){y&&y.modifyRequest?(0,I.W)(h,y).then(function(){return i(h)}):i(h)},abort:function(h){var g=h.response;g.onloadend=g.onerror=g.onprogress=void 0,g.abort()}}}u.__dashjs_factory_name="XHRLoader";var n=ct.A.getClassFactory(u);Lt.A=n},8496:function(ve,Lt,M){function ct(oe){return ct=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(te){return typeof te}:function(te){return te&&typeof Symbol=="function"&&te.constructor===Symbol&&te!==Symbol.prototype?"symbol":typeof te},ct(oe)}function I(oe,te){for(var re=0;re<te.length;re++){var wt=te[re];wt.enumerable=wt.enumerable||!1,wt.configurable=!0,"value"in wt&&(wt.writable=!0),Object.defineProperty(oe,u(wt.key),wt)}}function u(oe){var te=function(re){if(ct(re)!="object"||!re)return re;var wt=re[Symbol.toPrimitive];if(wt!==void 0){var Jt=wt.call(re,"string");if(ct(Jt)!="object")return Jt;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(re)}(oe);return ct(te)=="symbol"?te:te+""}M.d(Lt,{default:function(){return vr}});var n={attributes:["Laurl","laurl"],prefixes:["clearkey","dashif"]},_=function(){function oe(){(function(wt,Jt){if(!(wt instanceof Jt))throw new TypeError("Cannot call a class as a function")})(this,oe)}return te=oe,re=[{key:"findCencContentProtection",value:function(wt){for(var Jt=null,be=0;be<wt.length;++be){var Ee=wt[be];Ee.schemeIdUri.toLowerCase()!=="urn:mpeg:dash:mp4protection:2011"||Ee.value.toLowerCase()!=="cenc"&&Ee.value.toLowerCase()!=="cbcs"||(Jt=Ee)}return Jt}},{key:"getPSSHData",value:function(wt){var Jt=8,be=new DataView(wt),Ee=be.getUint8(Jt);return Jt+=20,Ee>0&&(Jt+=4+16*be.getUint32(Jt)),Jt+=4,wt.slice(Jt)}},{key:"getPSSHForKeySystem",value:function(wt,Jt){var be=oe.parsePSSHList(Jt);return wt&&be.hasOwnProperty(wt.uuid.toLowerCase())?be[wt.uuid.toLowerCase()]:null}},{key:"parseInitDataFromContentProtection",value:function(wt,Jt){return"pssh"in wt?(wt.pssh.__text=wt.pssh.__text.replace(/\r?\n|\r/g,"").replace(/\s+/g,""),Jt.decodeArray(wt.pssh.__text).buffer):null}},{key:"parsePSSHList",value:function(wt){if(wt==null)return[];for(var Jt=new DataView(wt.buffer||wt),be={},Ee=0;;){var Be,xe,Xe=void 0,$e=Ee;if(Ee>=Jt.buffer.byteLength)break;if(Be=Ee+Jt.getUint32(Ee),Ee+=4,Jt.getUint32(Ee)===1886614376)if(Ee+=4,(xe=Jt.getUint8(Ee))===0||xe===1){Ee++,Ee+=3,Xe="";var ke=void 0,_e=void 0;for(ke=0;ke<4;ke++)Xe+=(_e=Jt.getUint8(Ee+ke).toString(16)).length===1?"0"+_e:_e;for(Ee+=4,Xe+="-",ke=0;ke<2;ke++)Xe+=(_e=Jt.getUint8(Ee+ke).toString(16)).length===1?"0"+_e:_e;for(Ee+=2,Xe+="-",ke=0;ke<2;ke++)Xe+=(_e=Jt.getUint8(Ee+ke).toString(16)).length===1?"0"+_e:_e;for(Ee+=2,Xe+="-",ke=0;ke<2;ke++)Xe+=(_e=Jt.getUint8(Ee+ke).toString(16)).length===1?"0"+_e:_e;for(Ee+=2,Xe+="-",ke=0;ke<6;ke++)Xe+=(_e=Jt.getUint8(Ee+ke).toString(16)).length===1?"0"+_e:_e;Ee+=6,Ee+=4,be[Xe=Xe.toLowerCase()]=Jt.buffer.slice($e,Be),Ee=Be}else Ee=Be;else Ee=Be}return be}},{key:"getLicenseServerUrlFromMediaInfo",value:function(wt,Jt){try{if(!wt||wt.length===0)return null;for(var be=0,Ee=null;be<wt.length&&!Ee;){var Be=wt[be];if(Be&&Be.contentProtection&&Be.contentProtection.length>0){var xe=Be.contentProtection.filter(function(an){return an.schemeIdUri&&an.schemeIdUri===Jt});if(xe&&xe.length>0)for(var Xe=0;Xe<xe.length&&!Ee;){for(var $e=xe[Xe],ke=0;ke<n.attributes.length&&!Ee;){for(var _e=0,We=n.attributes[ke];_e<n.prefixes.length&&!Ee;){var He=n.prefixes[_e];$e[We]&&$e[We].__prefix&&$e[We].__prefix===He&&$e[We].__text&&(Ee=$e[We].__text),_e+=1}ke+=1}Xe+=1}}be+=1}return Ee}catch{return null}}}],re&&I(te,re),Object.defineProperty(te,"prototype",{writable:!1}),te;var te,re}();function y(oe,te,re){return Object.defineProperty(oe,"prototype",{writable:!1}),oe}var i=y(function oe(te,re){(function(wt,Jt){if(!(wt instanceof Jt))throw new TypeError("Cannot call a class as a function")})(this,oe),this.contentType=te,this.robustness=re});function h(oe,te,re){return Object.defineProperty(oe,"prototype",{writable:!1}),oe}var g=h(function oe(te,re,wt,Jt,be){(function(Ee,Be){if(!(Ee instanceof Be))throw new TypeError("Cannot call a class as a function")})(this,oe),this.initDataTypes=["cenc"],te&&te.length&&(this.audioCapabilities=te),re&&re.length&&(this.videoCapabilities=re),this.distinctiveIdentifier=wt,this.persistentState=Jt,this.sessionTypes=be});function r(oe){return r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(te){return typeof te}:function(te){return te&&typeof Symbol=="function"&&te.constructor===Symbol&&te!==Symbol.prototype?"symbol":typeof te},r(oe)}function m(oe,te,re){return te=T(te),function(wt,Jt){if(Jt&&(r(Jt)=="object"||typeof Jt=="function"))return Jt;if(Jt!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(be){if(be===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return be}(wt)}(oe,d()?Reflect.construct(te,[],T(oe).constructor):te.apply(oe,re))}function d(){try{var oe=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(d=function(){return!!oe})()}function T(oe){return T=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(te){return te.__proto__||Object.getPrototypeOf(te)},T(oe)}function q(oe,te){return q=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(re,wt){return re.__proto__=wt,re},q(oe,te)}var W=new(function(oe){function te(){var wt;return function(Jt,be){if(!(Jt instanceof be))throw new TypeError("Cannot call a class as a function")}(this,te),(wt=m(this,te)).MEDIA_KEYERR_CODE=100,wt.MEDIA_KEYERR_UNKNOWN_CODE=101,wt.MEDIA_KEYERR_CLIENT_CODE=102,wt.MEDIA_KEYERR_SERVICE_CODE=103,wt.MEDIA_KEYERR_OUTPUT_CODE=104,wt.MEDIA_KEYERR_HARDWARECHANGE_CODE=105,wt.MEDIA_KEYERR_DOMAIN_CODE=106,wt.MEDIA_KEY_MESSAGE_ERROR_CODE=107,wt.MEDIA_KEY_MESSAGE_NO_CHALLENGE_ERROR_CODE=108,wt.SERVER_CERTIFICATE_UPDATED_ERROR_CODE=109,wt.KEY_STATUS_CHANGED_EXPIRED_ERROR_CODE=110,wt.MEDIA_KEY_MESSAGE_NO_LICENSE_SERVER_URL_ERROR_CODE=111,wt.KEY_SYSTEM_ACCESS_DENIED_ERROR_CODE=112,wt.KEY_SESSION_CREATED_ERROR_CODE=113,wt.MEDIA_KEY_MESSAGE_LICENSER_ERROR_CODE=114,wt.MEDIA_KEYERR_UNKNOWN_MESSAGE="An unspecified error occurred. This value is used for errors that don't match any of the other codes.",wt.MEDIA_KEYERR_CLIENT_MESSAGE="The Key System could not be installed or updated.",wt.MEDIA_KEYERR_SERVICE_MESSAGE="The message passed into update indicated an error from the license service.",wt.MEDIA_KEYERR_OUTPUT_MESSAGE="There is no available output device with the required characteristics for the content protection system.",wt.MEDIA_KEYERR_HARDWARECHANGE_MESSAGE="A hardware configuration change caused a content protection error.",wt.MEDIA_KEYERR_DOMAIN_MESSAGE="An error occurred in a multi-device domain licensing configuration. The most common error is a failure to join the domain.",wt.MEDIA_KEY_MESSAGE_ERROR_MESSAGE="Multiple key sessions were creates with a user-agent that does not support sessionIDs!! Unpredictable behavior ahead!",wt.MEDIA_KEY_MESSAGE_NO_CHALLENGE_ERROR_MESSAGE="DRM: Empty key message from CDM",wt.SERVER_CERTIFICATE_UPDATED_ERROR_MESSAGE="Error updating server certificate -- ",wt.KEY_STATUS_CHANGED_EXPIRED_ERROR_MESSAGE="DRM: KeyStatusChange error! -- License has expired",wt.MEDIA_KEY_MESSAGE_NO_LICENSE_SERVER_URL_ERROR_MESSAGE="DRM: No license server URL specified!",wt.KEY_SYSTEM_ACCESS_DENIED_ERROR_MESSAGE="DRM: KeySystem Access Denied! -- ",wt.KEY_SESSION_CREATED_ERROR_MESSAGE="DRM: unable to create session! --",wt.MEDIA_KEY_MESSAGE_LICENSER_ERROR_MESSAGE="DRM: licenser error! --",wt}return function(wt,Jt){if(typeof Jt!="function"&&Jt!==null)throw new TypeError("Super expression must either be null or a function");wt.prototype=Object.create(Jt&&Jt.prototype,{constructor:{value:wt,writable:!0,configurable:!0}}),Object.defineProperty(wt,"prototype",{writable:!1}),Jt&&q(wt,Jt)}(te,oe),re=te,Object.defineProperty(re,"prototype",{writable:!1}),re;var re}(M(1840).A)),x=M(8324);function nt(oe,te,re){return Object.defineProperty(oe,"prototype",{writable:!1}),oe}var O=nt(function oe(te,re,wt,Jt,be,Ee,Be,xe){(function(Xe,$e){if(!(Xe instanceof $e))throw new TypeError("Cannot call a class as a function")})(this,oe),this.url=te,this.method=re,this.responseType=wt,this.headers=Jt,this.withCredentials=be,this.messageType=Ee,this.sessionId=Be,this.data=xe});function J(oe,te,re){return Object.defineProperty(oe,"prototype",{writable:!1}),oe}var pt=J(function oe(te,re,wt){(function(Jt,be){if(!(Jt instanceof be))throw new TypeError("Cannot call a class as a function")})(this,oe),this.url=te,this.headers=re,this.data=wt}),G=M(2756),X=M(1739),rt=M(7256),bt=M(5742);function Ut(oe){return Ut=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(te){return typeof te}:function(te){return te&&typeof Symbol=="function"&&te.constructor===Symbol&&te!==Symbol.prototype?"symbol":typeof te},Ut(oe)}function mt(oe){var te,re,wt,Jt,be,Ee,Be,xe,Xe,$e,ke,_e=(oe=oe||{}).protectionKeyController,We=oe.protectionModel,He=oe.eventBus,an=oe.events,pn=oe.debug,vn=oe.BASE64,en=oe.constants,Se=[],Ie=oe.cmcdModel,Fe=oe.settings,rn=oe.customParametersModel;function un(){if(!(He&&He.hasOwnProperty("on")&&_e&&_e.hasOwnProperty("getSupportedKeySystemsFromContentProtection")))throw new Error("Missing config parameter(s)")}function _n(Le,tn){xe||Xe?xe&&Tn():function(fn,Fn){if(!Xe){Xe=!0;var On,Gn=[];fn=fn.sort(function(Mn,Rn){return(be&&be[Mn.ks.systemString]&&be[Mn.ks.systemString].priority>=0?be[Mn.ks.systemString].priority:fn.length)-(be&&be[Rn.ks.systemString]&&be[Rn.ks.systemString].priority>=0?be[Rn.ks.systemString].priority:fn.length)});for(var bn=0;bn<fn.length;bn++){var Jn=Tr(fn[bn]);Gn.push({ks:fn[bn].ks,configs:[Jn],protData:fn[bn].protData})}We.requestKeySystemAccess(Gn).then(function(Mn){var Rn=(On=Mn.data).mksa&&On.mksa.selectedSystemString?On.mksa.selectedSystemString:On.keySystem.systemString;return re.info("DRM: KeySystem Access Granted for system string ("+Rn+")! Selecting key system..."),We.selectKeySystem(On)}).then(function(Mn){if(xe=Mn,Xe=!1,We){He.trigger(an.KEY_SYSTEM_SELECTED,{data:On});var Rn=Bn(xe);Rn&&Rn.serverCertificate&&Rn.serverCertificate.length>0&&We.setServerCertificate(vn.decodeArray(Rn.serverCertificate).buffer),Tn()}}).catch(function(Mn){xe=null,Xe=!1,Fn||He.trigger(an.KEY_SYSTEM_SELECTED,{data:null,error:new x.A(W.KEY_SYSTEM_ACCESS_DENIED_ERROR_CODE,W.KEY_SYSTEM_ACCESS_DENIED_ERROR_MESSAGE+"Error selecting key system! -- "+Mn.error)})})}}(Le,tn)}function Tn(){for(var Le,tn=0;tn<wt.length;tn++)for(Le=0;Le<wt[tn].length;Le++)if(xe===wt[tn][Le].ks){qn(wt[tn][Le]);break}wt=[]}function qn(Le){if(_e.isClearKey(xe)&&Le.protData&&Le.protData.hasOwnProperty("clearkeys")&&Object.keys(Le.protData.clearkeys).length!==0){var tn={kids:Object.keys(Le.protData.clearkeys)};Le.initData=new TextEncoder().encode(JSON.stringify(tn))}Le.sessionId?Vn(Le):Le.initData!==null&&In(Le)}function Vn(Le){un(),We.loadKeySession(Le)}function In(Le){var tn=_.getPSSHForKeySystem(xe,Le?Le.initData:null);if(tn){if(function(fn){if(!fn)return!1;try{for(var Fn=We.getSessions(),On=0;On<Fn.length;On++)if(Fn[On].getKeyId()===fn)return!0;return!1}catch{return!1}}(Le.keyId)||Ln(tn))return;try{Le.initData=tn,We.createKeySession(Le)}catch(fn){He.trigger(an.KEY_SESSION_CREATED,{data:null,error:new x.A(W.KEY_SESSION_CREATED_ERROR_CODE,W.KEY_SESSION_CREATED_ERROR_MESSAGE+fn.message)})}}else Le&&Le.initData?We.createKeySession(Le):He.trigger(an.KEY_SESSION_CREATED,{data:null,error:new x.A(W.KEY_SESSION_CREATED_ERROR_CODE,W.KEY_SESSION_CREATED_ERROR_MESSAGE+"Selected key system is "+(xe?xe.systemString:null)+". needkey/encrypted event contains no initData corresponding to that key system!")})}function Bn(Le){if(Le){var tn=Le.systemString;if(be)return tn in be?be[tn]:null}return null}function Ln(Le){if(!Le)return!1;try{for(var tn=We.getAllInitData(),fn=0;fn<tn.length;fn++)if(_e.initDataEquals(Le,tn[fn]))return re.debug("DRM: Ignoring initData because we have already seen it!"),!0;return!1}catch{return!1}}function Wn(Le){un(),Le?(We.setMediaElement(Le),He.on(an.NEED_KEY,Kr,te)):Le===null&&(We.setMediaElement(Le),He.off(an.NEED_KEY,Kr,te))}function Tr(Le){var tn=Le.protData,fn=[],Fn=[],On=tn&&tn.audioRobustness&&tn.audioRobustness.length>0?tn.audioRobustness:Be,Gn=tn&&tn.videoRobustness&&tn.videoRobustness.length>0?tn.videoRobustness:Be,bn=Le.sessionType,Jn=tn&&tn.distinctiveIdentifier?tn.distinctiveIdentifier:"optional",Mn=tn&&tn.persistentState?tn.persistentState:bn==="temporary"?"optional":"required";return Jt.forEach(function(Rn){Rn.type===en.AUDIO?fn.push(new i(Rn.codec,On)):Rn.type===en.VIDEO&&Fn.push(new i(Rn.codec,Gn))}),new g(fn,Fn,Jn,Mn,[bn])}function mr(Le){Le.error?He.trigger(an.KEY_STATUSES_CHANGED,{data:null,error:Le.error}):re.debug("DRM: key status = "+Le.status)}function er(Le){re.debug("DRM: onKeyMessage");var tn=Le.data;He.trigger(an.KEY_MESSAGE,{data:tn});var fn=tn.messageType?tn.messageType:"license-request",Fn=tn.message,On=tn.sessionToken,Gn=Bn(xe),bn=_e.getLicenseServerModelInstance(xe,Gn,fn),Jn={sessionToken:On,messageType:fn};if(Fn&&Fn.byteLength!==0){if(!bn)return re.debug("DRM: License server request not required for this message (type = "+Le.data.messageType+"). Session ID = "+On.getSessionId()),void Xn(Jn);if(_e.isClearKey(xe)){var Mn=_e.processClearKeyLicenseRequest(xe,Gn,Fn);if(Mn&&Mn.keyPairs&&Mn.keyPairs.length>0)return re.debug("DRM: ClearKey license request handled by application!"),Xn(Jn),void We.updateKeySession(On,Mn)}(function(Rn,rr,Qn){var nr=Rn.sessionToken,$n=Rn.messageType?Rn.messageType:"license-request",yr={sessionToken:nr,messageType:$n},ur=xe?xe.systemString:null,gi=function(Nn,Er,Mr,Sr,Gi){var ar=null,ji=Sr.message;if(Nn&&Nn.serverURL){var lr=Nn.serverURL;typeof lr=="string"&&lr!==""?ar=lr:Ut(lr)==="object"&&lr.hasOwnProperty(Er)&&(ar=lr[Er])}else if(Nn&&Nn.laURL&&Nn.laURL!=="")ar=Nn.laURL;else if(!(ar=_.getLicenseServerUrlFromMediaInfo(Jt,xe.schemeIdURI))&&!_e.isClearKey(xe)){var Jr=_.getPSSHData(Mr.initData);(ar=xe.getLicenseServerURLFromInitData(Jr))||(ar=Sr.laURL)}return ar=Gi.getServerURLFromMessage(ar,ji,Er)}(Qn,$n,nr,Rn,rr);if(gi){var br={},Wr=!1;Qn&&Yr(br,Qn.httpRequestHeaders);var zr=Rn.message;Yr(br,xe.getRequestHeadersFromMessage(zr)),Object.keys(br).forEach(function(Nn){Nn.toLowerCase()==="authorization"&&(Wr=!0)}),Qn&&typeof Qn.withCredentials=="boolean"&&(Wr=Qn.withCredentials);var Fi=function(Nn){if(We)if(Nn.status>=200&&Nn.status<=299){var Er=X.A.parseHttpHeaders(Nn.getAllResponseHeaders?Nn.getAllResponseHeaders():null),Mr=new pt(Nn.responseURL,Er,Nn.response);Vr(rn.getLicenseResponseFilters(),Mr).then(function(){var Sr=rr.getLicenseMessage(Mr.data,ur,$n);Sr!==null?(Xn(yr),We.updateKeySession(nr,Sr)):Hr(Nn,yr,ur,$n,rr)})}else Hr(Nn,yr,ur,$n,rr)},xi=function(Nn){Xn(yr,new x.A(W.MEDIA_KEY_MESSAGE_LICENSER_ERROR_CODE,W.MEDIA_KEY_MESSAGE_LICENSER_ERROR_MESSAGE+ur+' update, XHR aborted. status is "'+Nn.statusText+'" ('+Nn.status+"), readyState is "+Nn.readyState))},Ui=function(Nn){Xn(yr,new x.A(W.MEDIA_KEY_MESSAGE_LICENSER_ERROR_CODE,W.MEDIA_KEY_MESSAGE_LICENSER_ERROR_MESSAGE+ur+' update, XHR error. status is "'+Nn.statusText+'" ('+Nn.status+"), readyState is "+Nn.readyState))},Bi=xe.getLicenseRequestFromMessage(zr),mi=rr.getHTTPMethod($n),yi=rr.getResponseType(ur,$n),ki=Qn&&!isNaN(Qn.httpTimeout)?Qn.httpTimeout:8e3,Xr=nr.getSessionId()||null,Qr=new O(gi,mi,yi,br,Wr,$n,Xr,Bi),$r=isNaN(Fe.get().streaming.retryAttempts[G.G.LICENSE])?3:Fe.get().streaming.retryAttempts[G.G.LICENSE];Vr(rn.getLicenseRequestFilters(),Qr).then(function(){pi(Qr,$r,ki,Fi,xi,Ui)})}else Xn(yr,new x.A(W.MEDIA_KEY_MESSAGE_NO_LICENSE_SERVER_URL_ERROR_CODE,W.MEDIA_KEY_MESSAGE_NO_LICENSE_SERVER_URL_ERROR_MESSAGE))})(tn,bn,Gn)}else Xn(Jn,new x.A(W.MEDIA_KEY_MESSAGE_NO_CHALLENGE_ERROR_CODE,W.MEDIA_KEY_MESSAGE_NO_CHALLENGE_ERROR_MESSAGE))}function Xn(Le,tn){He.trigger(an.LICENSE_REQUEST_COMPLETE,{data:Le,error:tn})}function pi(Le,tn,fn,Fn,On,Gn){var bn=new XMLHttpRequest;if(Fe.get().streaming.cmcd&&Fe.get().streaming.cmcd.enabled&&Fe.get().streaming.cmcd.mode===rt.A.CMCD_MODE_QUERY){var Jn=Ie.getQueryParameter({url:Le.url,type:G.G.LICENSE});Jn&&(Le.url=X.A.addAditionalQueryParameterToUrl(Le.url,[Jn]))}for(var Mn in bn.open(Le.method,Le.url,!0),bn.responseType=Le.responseType,bn.withCredentials=Le.withCredentials,fn>0&&(bn.timeout=fn),Le.headers)bn.setRequestHeader(Mn,Le.headers[Mn]);if(Fe.get().streaming.cmcd&&Fe.get().streaming.cmcd.enabled&&Fe.get().streaming.cmcd.mode===rt.A.CMCD_MODE_HEADER){var Rn=Ie.getHeaderParameters({url:Le.url,type:G.G.LICENSE});if(Rn)for(var rr in Rn){var Qn=Rn[rr];Qn&&bn.setRequestHeader(rr,Qn)}}var nr=function(){tn--;var $n=isNaN(Fe.get().streaming.retryIntervals[G.G.LICENSE])?1e3:Fe.get().streaming.retryIntervals[G.G.LICENSE];ke=setTimeout(function(){pi(Le,tn,fn,Fn,On,Gn)},$n)};bn.onload=function(){$e=null,this.status>=200&&this.status<=299||tn<=0?Fn(this):(re.warn("License request failed ("+this.status+"). Retrying it... Pending retries: "+tn),nr())},bn.ontimeout=bn.onerror=function(){$e=null,tn<=0?Gn(this):(re.warn("License request network request failed . Retrying it... Pending retries: "+tn),nr())},bn.onabort=function(){On(this)},He.trigger(an.LICENSE_REQUEST_SENDING,{url:Le.url,headers:Le.headers,payload:Le.data,sessionId:Le.sessionId}),$e=bn,bn.send(Le.data)}function hi(){$e&&($e.onloadend=$e.onerror=$e.onprogress=void 0,$e.abort(),$e=null),ke&&(clearTimeout(ke),ke=null)}function Yr(Le,tn){if(tn)for(var fn in tn)Le[fn]=tn[fn]}function Hr(Le,tn,fn,Fn,On){var Gn="NONE",bn=null;Le.response&&(Gn=On.getErrorResponse(Le.response,fn,Fn),bn={serverResponse:Le.response||null,responseCode:Le.status||null,responseText:Le.statusText||null}),Xn(tn,new x.A(W.MEDIA_KEY_MESSAGE_LICENSER_ERROR_CODE,W.MEDIA_KEY_MESSAGE_LICENSER_ERROR_MESSAGE+fn+' update, XHR complete. status is "'+Le.statusText+'" ('+Le.status+"), readyState is "+Le.readyState+". Response is "+Gn,bn))}function Vr(Le,tn){return Le?Le.reduce(function(fn,Fn){return fn.then(function(){return Fn(tn)})},Promise.resolve()):Promise.resolve()}function Kr(Le,tn){if(!Fe.get().streaming.protection.ignoreEmeEncryptedEvent){if(re.debug("DRM: onNeedKey"),Le.key.initDataType!=="cenc")return void re.warn("DRM: Only 'cenc' initData is supported! Ignoring initData of type: "+Le.key.initDataType);if(Jt.length===0&&(re.warn("DRM: onNeedKey called before initializeForMedia, wait until initialized"),(tn=tn===void 0?1:tn+1)<5))return void Se.push(setTimeout(function(){Kr(Le,tn)},500));var fn=Le.key.initData;if(ArrayBuffer.isView(fn)&&(fn=fn.buffer),xe){var Fn=_.getPSSHForKeySystem(xe,fn);if(Fn&&Ln(Fn))return}re.debug("DRM: initData:",String.fromCharCode.apply(null,new Uint8Array(fn)));var On=_e.getSupportedKeySystemsFromSegmentPssh(fn,be,Ee);if(On.length===0)return void re.debug("DRM: Received needkey event with initData, but we don't support any of the key systems!");(function(Gn){wt.push(Gn),_n(Gn,!1)})(On)}}return te={initializeForMedia:function(Le){if(!Le)throw new Error("mediaInfo can not be null or undefined");un(),Jt.push(Le)},clearMediaInfoArray:function(){Jt=[]},handleKeySystemFromManifest:function(){if(Jt&&Jt.length!==0){var Le=[];Jt.forEach(function(tn){var fn=_e.getSupportedKeySystemsFromContentProtection(tn.contentProtection,be,Ee);fn.length>0&&(Le.length===0&&(Le=fn),wt.push(fn))}),Le&&Le.length>0&&_n(Le,!0)}},createKeySession:In,loadKeySession:Vn,removeKeySession:function(Le){un(),We.removeKeySession(Le)},closeKeySession:function(Le){un(),We.closeKeySession(Le)},setServerCertificate:function(Le){un(),We.setServerCertificate(Le)},setMediaElement:Wn,setSessionType:function(Le){Ee=Le},setRobustnessLevel:function(Le){Be=Le},setProtectionData:function(Le){be=Le,_e.setProtectionData(Le)},getSupportedKeySystemsFromContentProtection:function(Le){return un(),_e.getSupportedKeySystemsFromContentProtection(Le,be,Ee)},getKeySystems:function(){return _e?_e.getKeySystems():[]},setKeySystems:function(Le){_e&&_e.setKeySystems(Le)},stop:function(){hi(),We&&We.stop()},reset:function(){He.off(an.INTERNAL_KEY_MESSAGE,er,te),He.off(an.INTERNAL_KEY_STATUS_CHANGED,mr,te),un(),hi(),Wn(null),xe=null,Xe=!1,We&&(We.reset(),We=null),Se.forEach(function(Le){return clearTimeout(Le)}),Se=[],Jt=[],wt=[]}},re=pn.getLogger(te),wt=[],Jt=[],Ee="temporary",Be="",$e=null,ke=null,He.on(an.INTERNAL_KEY_MESSAGE,er,te),He.on(an.INTERNAL_KEY_STATUS_CHANGED,mr,te),te}mt.__dashjs_factory_name="ProtectionController";var lt=bt.A.getClassFactory(mt);function jt(oe,te,re){return Object.defineProperty(oe,"prototype",{writable:!1}),oe}var St=jt(function oe(te,re){(function(wt,Jt){if(!(wt instanceof Jt))throw new TypeError("Cannot call a class as a function")})(this,oe),this.keyID=te,this.key=re});function Nt(oe){return Nt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(te){return typeof te}:function(te){return te&&typeof Symbol=="function"&&te.constructor===Symbol&&te!==Symbol.prototype?"symbol":typeof te},Nt(oe)}function Ht(oe,te){for(var re=0;re<te.length;re++){var wt=te[re];wt.enumerable=wt.enumerable||!1,wt.configurable=!0,"value"in wt&&(wt.writable=!0),Object.defineProperty(oe,ie(wt.key),wt)}}function ie(oe){var te=function(re){if(Nt(re)!="object"||!re)return re;var wt=re[Symbol.toPrimitive];if(wt!==void 0){var Jt=wt.call(re,"string");if(Nt(Jt)!="object")return Jt;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(re)}(oe);return Nt(te)=="symbol"?te:te+""}var It=function(){return oe=function re(wt,Jt){if(function(be,Ee){if(!(be instanceof Ee))throw new TypeError("Cannot call a class as a function")}(this,re),Jt&&Jt!=="persistent"&&Jt!=="temporary")throw new Error("Invalid ClearKey key set type! Must be one of 'persistent' or 'temporary'");this.keyPairs=wt,this.type=Jt},(te=[{key:"toJWK",value:function(){var re,wt=this.keyPairs.length,Jt={keys:[]};for(re=0;re<wt;re++){var be={kty:"oct",alg:"A128KW",kid:this.keyPairs[re].keyID,k:this.keyPairs[re].key};Jt.keys.push(be)}this.type&&(Jt.type=this.type);var Ee=JSON.stringify(Jt),Be=Ee.length,xe=new ArrayBuffer(Be),Xe=new Uint8Array(xe);for(re=0;re<Be;re++)Xe[re]=Ee.charCodeAt(re);return xe}}])&&Ht(oe.prototype,te),Object.defineProperty(oe,"prototype",{writable:!1}),oe;var oe,te}();function Ot(oe){return Ot=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(te){return typeof te}:function(te){return te&&typeof Symbol=="function"&&te.constructor===Symbol&&te!==Symbol.prototype?"symbol":typeof te},Ot(oe)}function fe(oe,te){for(var re=0;re<te.length;re++){var wt=te[re];wt.enumerable=wt.enumerable||!1,wt.configurable=!0,"value"in wt&&(wt.writable=!0),Object.defineProperty(oe,Ae(wt.key),wt)}}function Ae(oe){var te=function(re){if(Ot(re)!="object"||!re)return re;var wt=re[Symbol.toPrimitive];if(wt!==void 0){var Jt=wt.call(re,"string");if(Ot(Jt)!="object")return Jt;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(re)}(oe);return Ot(te)=="symbol"?te:te+""}var Re=new(function(){return oe=function re(){(function(wt,Jt){if(!(wt instanceof Jt))throw new TypeError("Cannot call a class as a function")})(this,re),this.init()},(te=[{key:"init",value:function(){this.CLEARKEY_KEYSTEM_STRING="org.w3.clearkey",this.WIDEVINE_KEYSTEM_STRING="com.widevine.alpha",this.PLAYREADY_KEYSTEM_STRING="com.microsoft.playready",this.PLAYREADY_RECOMMENDATION_KEYSTEM_STRING="com.microsoft.playready.recommendation",this.INITIALIZATION_DATA_TYPE_CENC="cenc",this.INITIALIZATION_DATA_TYPE_KEYIDS="keyids",this.INITIALIZATION_DATA_TYPE_WEBM="webm"}}])&&fe(oe.prototype,te),Object.defineProperty(oe,"prototype",{writable:!1}),oe;var oe,te}()),Pe="e2719d58-a985-b3c9-781a-b030af78d30e",tt=Re.CLEARKEY_KEYSTEM_STRING,at="urn:uuid:"+Pe;function qt(oe){var te=(oe=oe||{}).BASE64;return{uuid:Pe,schemeIdURI:at,systemString:tt,getInitData:function(re,wt){try{var Jt=_.parseInitDataFromContentProtection(re,te);if(!Jt&&wt){var be={kids:[function(Ee){try{var Be=Ee.replace(/-/g,"");return(Be=btoa(Be.match(/\w{2}/g).map(function(xe){return String.fromCharCode(parseInt(xe,16))}).join(""))).replace(/=/g,"").replace(/\//g,"_").replace(/\+/g,"-")}catch{return null}}(wt["cenc:default_KID"])]};Jt=new TextEncoder().encode(JSON.stringify(be))}return Jt}catch{return null}},getRequestHeadersFromMessage:function(){return{"Content-Type":"application/json"}},getLicenseRequestFromMessage:function(re){return JSON.stringify(JSON.parse(String.fromCharCode.apply(null,new Uint8Array(re))))},getLicenseServerURLFromInitData:function(){return null},getCDMData:function(){return null},getClearKeysFromProtectionData:function(re,wt){var Jt=null;if(re){for(var be=JSON.parse(String.fromCharCode.apply(null,new Uint8Array(wt))),Ee=[],Be=0;Be<be.kids.length;Be++){var xe=be.kids[Be],Xe=re.clearkeys&&re.clearkeys.hasOwnProperty(xe)?re.clearkeys[xe]:null;if(!Xe)throw new Error("DRM: ClearKey keyID ("+xe+") is not known!");Ee.push(new St(xe,Xe))}Jt=new It(Ee)}return Jt}}}qt.__dashjs_factory_name="KeySystemClearKey";var v=dashjs.FactoryMaker.getSingletonFactory(qt),A="1077efec-c0b2-4d02-ace3-3c1e52e2fb4b",c=Re.CLEARKEY_KEYSTEM_STRING,E="urn:uuid:"+A;function Q(oe){var te,re=oe.BASE64,wt=oe.debug.getLogger(te);return{uuid:A,schemeIdURI:E,systemString:c,getInitData:function(Jt){return _.parseInitDataFromContentProtection(Jt,re)},getRequestHeadersFromMessage:function(){return null},getLicenseRequestFromMessage:function(Jt){return new Uint8Array(Jt)},getLicenseServerURLFromInitData:function(){return null},getCDMData:function(){return null},getClearKeysFromProtectionData:function(Jt,be){var Ee=null;if(Jt){for(var Be=JSON.parse(String.fromCharCode.apply(null,new Uint8Array(be))),xe=[],Xe=0;Xe<Be.kids.length;Xe++){var $e=Be.kids[Xe],ke=Jt.clearkeys&&Jt.clearkeys.hasOwnProperty($e)?Jt.clearkeys[$e]:null;if(!ke)throw new Error("DRM: ClearKey keyID ("+$e+") is not known!");xe.push(new St($e,ke))}Ee=new It(xe),wt.warn("ClearKey schemeIdURI is using W3C Common PSSH systemID (1077efec-c0b2-4d02-ace3-3c1e52e2fb4b) in Content Protection. See DASH-IF IOP v4.1 section 7.6.2.4")}return Ee}}}Q.__dashjs_factory_name="KeySystemW3CClearKey";var D=dashjs.FactoryMaker.getSingletonFactory(Q),Bt="edef8ba9-79d6-4ace-a3c8-27dcd51d21ed",Dt=Re.WIDEVINE_KEYSTEM_STRING,At="urn:uuid:"+Bt;function Rt(oe){var te=(oe=oe||{}).BASE64;return{uuid:Bt,schemeIdURI:At,systemString:Dt,getInitData:function(re){return _.parseInitDataFromContentProtection(re,te)},getRequestHeadersFromMessage:function(){return null},getLicenseRequestFromMessage:function(re){return new Uint8Array(re)},getLicenseServerURLFromInitData:function(){return null},getCDMData:function(){return null}}}Rt.__dashjs_factory_name="KeySystemWidevine";var _t=dashjs.FactoryMaker.getSingletonFactory(Rt),Yt="9a04f079-9840-4286-ab92-e65be0885f95",Vt=Re.PLAYREADY_KEYSTEM_STRING,Xt="urn:uuid:"+Yt;function ne(oe){var te="utf-16",re=(oe=oe||{}).BASE64,wt=oe.settings;function Jt(){if(!re||!re.hasOwnProperty("decodeArray")||!re.hasOwnProperty("decodeArray"))throw new Error("Missing config parameter(s)")}return{uuid:Yt,schemeIdURI:Xt,systemString:Vt,getInitData:function(be){var Ee,Be,xe,Xe,$e,ke=new Uint8Array([112,115,115,104,0,0,0,0]),_e=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]),We=0,He=null;if(Jt(),!be)return null;if("pssh"in be)return _.parseInitDataFromContentProtection(be,re);if("pro"in be)He=re.decodeArray(be.pro.__text);else{if(!("prheader"in be))return null;He=re.decodeArray(be.prheader.__text)}return Ee=He.length,Be=4+ke.length+_e.length+4+Ee,xe=new ArrayBuffer(Be),Xe=new Uint8Array(xe),($e=new DataView(xe)).setUint32(We,Be),We+=4,Xe.set(ke,We),We+=ke.length,Xe.set(_e,We),We+=_e.length,$e.setUint32(We,Ee),We+=4,Xe.set(He,We),We+=Ee,Xe.buffer},getRequestHeadersFromMessage:function(be){var Ee,Be,xe={},Xe=new DOMParser;if(wt&&wt.get().streaming.protection.detectPlayreadyMessageFormat&&te==="utf-16"&&be&&be.byteLength%2==1)return xe["Content-Type"]="text/xml; charset=utf-8",xe;var $e=te==="utf-16"?new Uint16Array(be):new Uint8Array(be);Ee=String.fromCharCode.apply(null,$e);for(var ke=(Be=Xe.parseFromString(Ee,"application/xml")).getElementsByTagName("name"),_e=Be.getElementsByTagName("value"),We=0;We<ke.length;We++)xe[ke[We].childNodes[0].nodeValue]=_e[We].childNodes[0].nodeValue;return xe.hasOwnProperty("Content")&&(xe["Content-Type"]=xe.Content,delete xe.Content),xe.hasOwnProperty("Content-Type")||(xe["Content-Type"]="text/xml; charset=utf-8"),xe},getLicenseRequestFromMessage:function(be){var Ee=null,Be=new DOMParser;if(wt&&wt.get().streaming.protection.detectPlayreadyMessageFormat&&te==="utf-16"&&be&&be.byteLength%2==1)return be;var xe=te==="utf-16"?new Uint16Array(be):new Uint8Array(be);Jt();var Xe=String.fromCharCode.apply(null,xe),$e=Be.parseFromString(Xe,"application/xml");if(!$e.getElementsByTagName("PlayReadyKeyMessage")[0])return be;var ke=$e.getElementsByTagName("Challenge")[0].childNodes[0].nodeValue;return ke&&(Ee=re.decode(ke)),Ee},getLicenseServerURLFromInitData:function(be){if(be)for(var Ee=new DataView(be),Be=Ee.getUint16(4,!0),xe=6,Xe=new DOMParser,$e=0;$e<Be;$e++){var ke=Ee.getUint16(xe,!0);xe+=2;var _e=Ee.getUint16(xe,!0);if(xe+=2,ke===1){var We=be.slice(xe,xe+_e),He=String.fromCharCode.apply(null,new Uint16Array(We)),an=Xe.parseFromString(He,"application/xml");if(an.getElementsByTagName("LA_URL")[0]){var pn=an.getElementsByTagName("LA_URL")[0].childNodes[0].nodeValue;if(pn)return pn}if(an.getElementsByTagName("LUI_URL")[0]){var vn=an.getElementsByTagName("LUI_URL")[0].childNodes[0].nodeValue;if(vn)return vn}}else xe+=_e}return null},getCDMData:function(be){var Ee,Be,xe,Xe;if(Jt(),!be)return null;for(Ee=[],Xe=0;Xe<be.length;++Xe)Ee.push(be.charCodeAt(Xe)),Ee.push(0);for(Ee=String.fromCharCode.apply(null,Ee),Ee=re.encode(Ee),Be='<PlayReadyCDMData type="LicenseAcquisition"><LicenseAcquisition version="1.0" Proactive="false"><CustomData encoding="base64encoded">%CUSTOMDATA%</CustomData></LicenseAcquisition></PlayReadyCDMData>'.replace("%CUSTOMDATA%",Ee),xe=[],Xe=0;Xe<Be.length;++Xe)xe.push(Be.charCodeAt(Xe)),xe.push(0);return new Uint8Array(xe).buffer},setPlayReadyMessageFormat:function(be){if(be!=="utf-8"&&be!=="utf-16")throw new Error('Specified message format is not one of "utf-8" or "utf-16"');te=be}}}ne.__dashjs_factory_name="KeySystemPlayReady";var Te=dashjs.FactoryMaker.getSingletonFactory(ne);function me(oe){var te=(oe=oe||{}).BASE64,re={};return re[Re.WIDEVINE_KEYSTEM_STRING]={responseType:"json",getLicenseMessage:function(wt){return te.decodeArray(wt.license)},getErrorResponse:function(wt){return wt}},re[Re.PLAYREADY_KEYSTEM_STRING]={responseType:"arraybuffer",getLicenseMessage:function(wt){return wt},getErrorResponse:function(wt){return String.fromCharCode.apply(null,new Uint8Array(wt))}},{getServerURLFromMessage:function(wt){return wt},getHTTPMethod:function(){return"POST"},getResponseType:function(wt){return re[wt].responseType},getLicenseMessage:function(wt,Jt){return function(){if(!te||!te.hasOwnProperty("decodeArray"))throw new Error("Missing config parameter(s)")}(),re[Jt].getLicenseMessage(wt)},getErrorResponse:function(wt,Jt){return re[Jt].getErrorResponse(wt)}}}me.__dashjs_factory_name="DRMToday";var Ue=dashjs.FactoryMaker.getSingletonFactory(me);function Me(){var oe="http://schemas.xmlsoap.org/soap/envelope/";function te(Jt){var be=String.fromCharCode.apply(null,new Uint8Array(Jt));return decodeURIComponent(escape(be))}function re(Jt){if(window.DOMParser){var be=te(Jt),Ee=new window.DOMParser().parseFromString(be,"text/xml"),Be=Ee?Ee.getElementsByTagNameNS(oe,"Envelope")[0]:null,xe=Be?Be.getElementsByTagNameNS(oe,"Body")[0]:null;if(xe&&xe.getElementsByTagNameNS(oe,"Fault")[0])return null}return Jt}function wt(Jt){var be="",Ee="",Be="",xe=-1,Xe=-1;if(window.DOMParser){var $e=te(Jt),ke=new window.DOMParser().parseFromString($e,"text/xml"),_e=ke?ke.getElementsByTagNameNS(oe,"Envelope")[0]:null,We=_e?_e.getElementsByTagNameNS(oe,"Body")[0]:null,He=We?We.getElementsByTagNameNS(oe,"Fault")[0]:null,an=He?He.getElementsByTagName("detail")[0]:null,pn=an?an.getElementsByTagName("Exception")[0]:null,vn=null;if(He===null)return $e;be=(vn=He.getElementsByTagName("faultstring")[0].firstChild)?vn.nodeValue:null,pn!==null&&(Ee=(vn=pn.getElementsByTagName("StatusCode")[0])?vn.firstChild.nodeValue:null,xe=(Be=(vn=pn.getElementsByTagName("Message")[0])?vn.firstChild.nodeValue:null)?Be.lastIndexOf("[")+1:-1,Xe=Be?Be.indexOf("]"):-1,Be=Be?Be.substring(xe,Xe):"")}var en="code: ".concat(Ee,", name: ").concat(be);return Be&&(en+=", message: ".concat(Be)),en}return{getServerURLFromMessage:function(Jt){return Jt},getHTTPMethod:function(){return"POST"},getResponseType:function(){return"arraybuffer"},getLicenseMessage:function(Jt){return re.call(this,Jt)},getErrorResponse:function(Jt){return wt.call(this,Jt)}}}Me.__dashjs_factory_name="PlayReady";var ze=bt.A.getSingletonFactory(Me);function Qe(){return{getServerURLFromMessage:function(oe){return oe},getHTTPMethod:function(){return"POST"},getResponseType:function(){return"arraybuffer"},getLicenseMessage:function(oe){return oe},getErrorResponse:function(oe){return String.fromCharCode.apply(null,new Uint8Array(oe))}}}Qe.__dashjs_factory_name="Widevine";var nn=dashjs.FactoryMaker.getSingletonFactory(Qe);function yn(){return{getServerURLFromMessage:function(oe){return oe},getHTTPMethod:function(){return"POST"},getResponseType:function(){return"json"},getLicenseMessage:function(oe){if(!oe.hasOwnProperty("keys"))return null;for(var te=[],re=0;re<oe.keys.length;re++){var wt=oe.keys[re],Jt=wt.kid.replace(/=/g,""),be=wt.k.replace(/=/g,"");te.push(new St(Jt,be))}return new It(te)},getErrorResponse:function(oe){return String.fromCharCode.apply(null,new Uint8Array(oe))}}}yn.__dashjs_factory_name="ClearKey";var xn=dashjs.FactoryMaker.getSingletonFactory(yn);function Yn(){var oe,te,re,wt,Jt,be,Ee,Be,xe=this.context;function Xe(_e,We){return We&&_e in We?We[_e]:null}function $e(_e,We){return _e&&_e.sessionId?_e.sessionId:We&&We.sessionId?We.sessionId:null}function ke(_e,We){return _e&&_e.sessionType?_e.sessionType:We}return oe={initialize:function(){var _e;wt=[],_e=Te(xe).getInstance({BASE64:Jt,settings:be}),wt.push(_e),_e=_t(xe).getInstance({BASE64:Jt}),wt.push(_e),_e=v(xe).getInstance({BASE64:Jt}),wt.push(_e),Ee=_e,_e=D(xe).getInstance({BASE64:Jt,debug:te}),wt.push(_e),Be=_e},setProtectionData:function(_e){for(var We,He,an=0;an<wt.length;an++){var pn=wt[an];pn.hasOwnProperty("init")&&pn.init((We=pn.systemString,He=void 0,He=null,_e&&(He=We in _e?_e[We]:null),He))}},isClearKey:function(_e){return _e===Ee||_e===Be},initDataEquals:function(_e,We){if(_e.byteLength===We.byteLength){for(var He=new Uint8Array(_e),an=new Uint8Array(We),pn=0;pn<He.length;pn++)if(He[pn]!==an[pn])return!1;return!0}return!1},getKeySystems:function(){return wt},setKeySystems:function(_e){wt=_e},getKeySystemBySystemString:function(_e){for(var We=0;We<wt.length;We++)if(wt[We].systemString===_e)return wt[We];return null},getSupportedKeySystemsFromContentProtection:function(_e,We,He){var an,pn,vn,en,Se=[];if(_e){var Ie=_.findCencContentProtection(_e);for(vn=0;vn<wt.length;++vn){var Fe=Xe((pn=wt[vn]).systemString,We);for(en=0;en<_e.length;++en)if((an=_e[en]).schemeIdUri.toLowerCase()===pn.schemeIdURI){var rn=pn.getInitData(an,Ie);Se.push({ks:wt[vn],keyId:an.keyId,initData:rn,protData:Fe,cdmData:pn.getCDMData(Fe?Fe.cdmData:null),sessionId:$e(Fe,an),sessionType:ke(Fe,He)})}}}return Se},getSupportedKeySystemsFromSegmentPssh:function(_e,We,He){for(var an,pn=[],vn=_.parsePSSHList(_e),en=0;en<wt.length;++en){var Se=Xe((an=wt[en]).systemString,We);an.uuid in vn&&pn.push({ks:an,initData:vn[an.uuid],protData:Se,cdmData:an.getCDMData(Se?Se.cdmData:null),sessionId:$e(Se),sessionType:ke(Se,He)})}return pn},getLicenseServerModelInstance:function(_e,We,He){if(He==="license-release"||He==="individualization-request")return null;var an=null;return We&&We.hasOwnProperty("drmtoday")?an=Ue(xe).getInstance({BASE64:Jt}):_e.systemString===Re.WIDEVINE_KEYSTEM_STRING?an=nn(xe).getInstance():_e.systemString===Re.PLAYREADY_KEYSTEM_STRING?an=ze(xe).getInstance():_e.systemString===Re.CLEARKEY_KEYSTEM_STRING&&(an=xn(xe).getInstance()),an},processClearKeyLicenseRequest:function(_e,We,He){try{return _e.getClearKeysFromProtectionData(We,He)}catch{return re.error("Failed to retrieve clearkeys from ProtectionData"),null}},setConfig:function(_e){_e&&(_e.debug&&(te=_e.debug,re=te.getLogger(oe)),_e.BASE64&&(Jt=_e.BASE64),_e.settings&&(be=_e.settings))}},oe}Yn.__dashjs_factory_name="ProtectionKeyController";var An=dashjs.FactoryMaker.getSingletonFactory(Yn);function Un(oe){return Un=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(te){return typeof te}:function(te){return te&&typeof Symbol=="function"&&te.constructor===Symbol&&te!==Symbol.prototype?"symbol":typeof te},Un(oe)}function Sn(oe,te,re){return te=Hn(te),function(wt,Jt){if(Jt&&(Un(Jt)=="object"||typeof Jt=="function"))return Jt;if(Jt!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(be){if(be===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return be}(wt)}(oe,kn()?Reflect.construct(te,[],Hn(oe).constructor):te.apply(oe,re))}function kn(){try{var oe=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(kn=function(){return!!oe})()}function Hn(oe){return Hn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(te){return te.__proto__||Object.getPrototypeOf(te)},Hn(oe)}function Kn(oe,te){return Kn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(re,wt){return re.__proto__=wt,re},Kn(oe,te)}var pr=new(function(oe){function te(){var wt;return function(Jt,be){if(!(Jt instanceof be))throw new TypeError("Cannot call a class as a function")}(this,te),(wt=Sn(this,te)).INTERNAL_KEY_MESSAGE="internalKeyMessage",wt.INTERNAL_KEY_STATUS_CHANGED="internalkeyStatusChanged",wt.KEY_ADDED="public_keyAdded",wt.KEY_ERROR="public_keyError",wt.KEY_MESSAGE="public_keyMessage",wt.KEY_SESSION_CLOSED="public_keySessionClosed",wt.KEY_SESSION_CREATED="public_keySessionCreated",wt.KEY_SESSION_REMOVED="public_keySessionRemoved",wt.KEY_STATUSES_CHANGED="public_keyStatusesChanged",wt.KEY_SYSTEM_ACCESS_COMPLETE="public_keySystemAccessComplete",wt.KEY_SYSTEM_SELECTED="public_keySystemSelected",wt.LICENSE_REQUEST_COMPLETE="public_licenseRequestComplete",wt.LICENSE_REQUEST_SENDING="public_licenseRequestSending",wt.NEED_KEY="needkey",wt.PROTECTION_CREATED="public_protectioncreated",wt.PROTECTION_DESTROYED="public_protectiondestroyed",wt.SERVER_CERTIFICATE_UPDATED="serverCertificateUpdated",wt.TEARDOWN_COMPLETE="protectionTeardownComplete",wt.VIDEO_ELEMENT_SELECTED="videoElementSelected",wt.KEY_SESSION_UPDATED="public_keySessionUpdated",wt}return function(wt,Jt){if(typeof Jt!="function"&&Jt!==null)throw new TypeError("Super expression must either be null or a function");wt.prototype=Object.create(Jt&&Jt.prototype,{constructor:{value:wt,writable:!0,configurable:!0}}),Object.defineProperty(wt,"prototype",{writable:!1}),Jt&&Kn(wt,Jt)}(te,oe),re=te,Object.defineProperty(re,"prototype",{writable:!1}),re;var re}(M(9656).A));function Nr(oe,te,re){return Object.defineProperty(oe,"prototype",{writable:!1}),oe}var hr=Nr(function oe(te,re){(function(wt,Jt){if(!(wt instanceof Jt))throw new TypeError("Cannot call a class as a function")})(this,oe),this.initData=te,this.initDataType=re});function sr(oe,te,re){return Object.defineProperty(oe,"prototype",{writable:!1}),oe}var gr=sr(function oe(te,re,wt,Jt){(function(be,Ee){if(!(be instanceof Ee))throw new TypeError("Cannot call a class as a function")})(this,oe),this.sessionToken=te,this.message=re,this.defaultURL=wt,this.messageType=Jt||"license-request"});function kr(oe,te,re){return Object.defineProperty(oe,"prototype",{writable:!1}),oe}var Gr=kr(function oe(te,re){(function(wt,Jt){if(!(wt instanceof Jt))throw new TypeError("Cannot call a class as a function")})(this,oe),this.keySystem=te,this.ksConfiguration=re}),Ar={};function jr(oe){oe=oe||{};var te,re,wt,Jt,be,Ee,Be,xe,Xe=this.context,$e=oe.eventBus,ke=oe.events,_e=oe.debug;function We(Se,Ie,Fe,rn){if(navigator.requestMediaKeySystemAccess===void 0||typeof navigator.requestMediaKeySystemAccess!="function"){var un="Insecure origins are not allowed";return $e.trigger(ke.KEY_SYSTEM_ACCESS_COMPLETE,{error:un}),void rn({error:un})}var _n=Se[Ie].protData&&Se[Ie].protData.systemStringPriority?Se[Ie].protData.systemStringPriority:null,Tn=Se[Ie].configs,qn=Se[Ie].ks,Vn=qn.systemString;(function(In,Bn){return new Promise(function(Ln,Wn){He(In,Bn,0,Ln,Wn)})})(_n||(Ar[Vn]?Ar[Vn]:[Vn]),Tn).then(function(In){var Bn=typeof In.getConfiguration=="function"?In.getConfiguration():null,Ln=new Gr(qn,Bn);Ln.mksa=In,$e.trigger(ke.KEY_SYSTEM_ACCESS_COMPLETE,{data:Ln}),Fe({data:Ln})}).catch(function(In){if(Ie+1<Se.length)We(Se,Ie+1,Fe,rn);else{var Bn="Key system access denied! ";$e.trigger(ke.KEY_SYSTEM_ACCESS_COMPLETE,{error:Bn+In.message}),rn({error:Bn+In.message})}})}function He(Se,Ie,Fe,rn,un){var _n=Se[Fe];re.debug("Requesting key system access for system string ".concat(_n)),navigator.requestMediaKeySystemAccess(_n,Ie).then(function(Tn){Tn.selectedSystemString=_n,rn(Tn)}).catch(function(Tn){Fe+1<Se.length?He(Se,Ie,Fe+1,rn,un):un(Tn)})}function an(Se){if(!Se||!Se.session)return Promise.resolve;var Ie=Se.session;return Ie.removeEventListener("keystatuseschange",Se),Ie.removeEventListener("message",Se),Ie.close()}function pn(Se){for(var Ie=0;Ie<Ee.length;Ie++)if(Ee[Ie]===Se){Ee.splice(Ie,1);break}}function vn(Se){var Ie,Fe;return Se&&Se.length>0&&(Se[0]&&(typeof Se[0]=="string"?Ie=Se[0]:Fe=Se[0]),Se[1]&&(typeof Se[1]=="string"?Ie=Se[1]:Fe=Se[1])),{status:Ie,keyId:Fe}}function en(Se,Ie){var Fe={session:Se,keyId:Ie.keyId,initData:Ie.initData,sessionId:Ie.sessionId,sessionType:Ie.sessionType,handleEvent:function(rn){switch(rn.type){case"keystatuseschange":$e.trigger(ke.KEY_STATUSES_CHANGED,{data:this}),rn.target.keyStatuses.forEach(function(){var _n=vn(arguments);_n.status==="expired"?$e.trigger(ke.INTERNAL_KEY_STATUS_CHANGED,{error:new x.A(W.KEY_STATUS_CHANGED_EXPIRED_ERROR_CODE,W.KEY_STATUS_CHANGED_EXPIRED_ERROR_MESSAGE)}):$e.trigger(ke.INTERNAL_KEY_STATUS_CHANGED,_n)});break;case"message":var un=ArrayBuffer.isView(rn.message)?rn.message.buffer:rn.message;$e.trigger(ke.INTERNAL_KEY_MESSAGE,{data:new gr(this,un,void 0,rn.messageType)})}},getKeyId:function(){return this.keyId},getSessionId:function(){return Se.sessionId},getSessionType:function(){return this.sessionType},getExpirationTime:function(){return Se.expiration},getKeyStatuses:function(){return Se.keyStatuses},getUsable:function(){var rn=!1;return Se.keyStatuses.forEach(function(){vn(arguments).status==="usable"&&(rn=!0)}),rn}};return Se.addEventListener("keystatuseschange",Fe),Se.addEventListener("message",Fe),Se.closed.then(function(){pn(Fe),re.debug("DRM: Session closed. SessionID = "+Fe.getSessionId()),$e.trigger(ke.KEY_SESSION_CLOSED,{data:Fe.getSessionId()})}),Ee.push(Fe),Fe}return te={getAllInitData:function(){for(var Se=[],Ie=0;Ie<Ee.length;Ie++)Ee[Ie].initData&&Se.push(Ee[Ie].initData);return Se},getSessions:function(){return Ee},requestKeySystemAccess:function(Se){return new Promise(function(Ie,Fe){We(Se,0,Ie,Fe)})},selectKeySystem:function(Se){return new Promise(function(Ie,Fe){Se.mksa.createMediaKeys().then(function(rn){return wt=Se.keySystem,be=rn,Jt?Jt.setMediaKeys(be):Promise.resolve()}).then(function(){Ie(wt)}).catch(function(){Fe({error:"Error selecting keys system ("+Se.keySystem.systemString+")! Could not create MediaKeys -- TODO"})})})},setMediaElement:function(Se){Jt!==Se&&(Jt&&(Jt.removeEventListener("encrypted",Be),Jt.setMediaKeys&&Jt.setMediaKeys(null)),(Jt=Se)&&(Jt.addEventListener("encrypted",Be),Jt.setMediaKeys&&be&&Jt.setMediaKeys(be)))},setServerCertificate:function(Se){if(!wt||!be)throw new Error("Can not set server certificate until you have selected a key system");be.setServerCertificate(Se).then(function(){re.info("DRM: License server certificate successfully updated."),$e.trigger(ke.SERVER_CERTIFICATE_UPDATED)}).catch(function(Ie){$e.trigger(ke.SERVER_CERTIFICATE_UPDATED,{error:new x.A(W.SERVER_CERTIFICATE_UPDATED_ERROR_CODE,W.SERVER_CERTIFICATE_UPDATED_ERROR_MESSAGE+Ie.name)})})},createKeySession:function(Se){if(!wt||!be)throw new Error("Can not create sessions until you have selected a key system");var Ie=be.createSession(Se.sessionType),Fe=en(Ie,Se),rn=wt.systemString===Re.CLEARKEY_KEYSTEM_STRING&&(Se.initData||Se.protData&&Se.protData.clearkeys)?Re.INITIALIZATION_DATA_TYPE_KEYIDS:Re.INITIALIZATION_DATA_TYPE_CENC;Ie.generateRequest(rn,Se.initData).then(function(){re.debug("DRM: Session created. SessionID = "+Fe.getSessionId()),$e.trigger(ke.KEY_SESSION_CREATED,{data:Fe})}).catch(function(un){pn(Fe),$e.trigger(ke.KEY_SESSION_CREATED,{data:null,error:new x.A(W.KEY_SESSION_CREATED_ERROR_CODE,W.KEY_SESSION_CREATED_ERROR_MESSAGE+"Error generating key request -- "+un.name)})})},updateKeySession:function(Se,Ie){var Fe=Se.session;xe.isClearKey(wt)&&(Ie=Ie.toJWK()),Fe.update(Ie).then(function(){$e.trigger(ke.KEY_SESSION_UPDATED)}).catch(function(rn){$e.trigger(ke.KEY_ERROR,{error:new x.A(W.MEDIA_KEYERR_CODE,"Error sending update() message! "+rn.name,Se)})})},loadKeySession:function(Se){if(!wt||!be)throw new Error("Can not load sessions until you have selected a key system");for(var Ie=Se.sessionId,Fe=0;Fe<Ee.length;Fe++)if(Ie===Ee[Fe].sessionId)return void re.warn("DRM: Ignoring session ID because we have already seen it!");var rn=be.createSession(Se.sessionType),un=en(rn,Se);rn.load(Ie).then(function(_n){_n?(re.debug("DRM: Session loaded. SessionID = "+un.getSessionId()),$e.trigger(ke.KEY_SESSION_CREATED,{data:un})):(pn(un),$e.trigger(ke.KEY_SESSION_CREATED,{data:null,error:new x.A(W.KEY_SESSION_CREATED_ERROR_CODE,W.KEY_SESSION_CREATED_ERROR_MESSAGE+"Could not load session! Invalid Session ID ("+Ie+")")}))}).catch(function(_n){pn(un),$e.trigger(ke.KEY_SESSION_CREATED,{data:null,error:new x.A(W.KEY_SESSION_CREATED_ERROR_CODE,W.KEY_SESSION_CREATED_ERROR_MESSAGE+"Could not load session ("+Ie+")! "+_n.name)})})},removeKeySession:function(Se){Se.session.remove().then(function(){re.debug("DRM: Session removed. SessionID = "+Se.getSessionId()),$e.trigger(ke.KEY_SESSION_REMOVED,{data:Se.getSessionId()})},function(Ie){$e.trigger(ke.KEY_SESSION_REMOVED,{data:null,error:"Error removing session ("+Se.getSessionId()+"). "+Ie.name})})},closeKeySession:function(Se){an(Se).catch(function(Ie){pn(Se),$e.trigger(ke.KEY_SESSION_CLOSED,{data:null,error:"Error closing session ("+Se.getSessionId()+") "+Ie.name})})},stop:function(){for(var Se,Ie=0;Ie<Ee.length;Ie++)(Se=Ee[Ie]).getUsable()||(an(Se),pn(Se))},reset:function(){var Se,Ie=Ee.length;if(Ie!==0)for(var Fe=function(un){pn(un),Ee.length===0&&(Jt?(Jt.removeEventListener("encrypted",Be),Jt.setMediaKeys(null).then(function(){$e.trigger(ke.TEARDOWN_COMPLETE)})):$e.trigger(ke.TEARDOWN_COMPLETE))},rn=0;rn<Ie;rn++)(function(un){an(Se),Fe(un)})(Se=Ee[rn]);else $e.trigger(ke.TEARDOWN_COMPLETE)}},re=_e.getLogger(te),wt=null,Jt=null,be=null,Ee=[],xe=An(Xe).getInstance(),Be={handleEvent:function(Se){if(Se.type==="encrypted"&&Se.initData){var Ie=ArrayBuffer.isView(Se.initData)?Se.initData.buffer:Se.initData;$e.trigger(ke.NEED_KEY,{key:new hr(Ie,Se.initDataType)})}}},te}Ar[Re.PLAYREADY_KEYSTEM_STRING]=[Re.PLAYREADY_KEYSTEM_STRING,Re.PLAYREADY_RECOMMENDATION_KEYSTEM_STRING],Ar[Re.WIDEVINE_KEYSTEM_STRING]=[Re.WIDEVINE_KEYSTEM_STRING],Ar[Re.CLEARKEY_KEYSTEM_STRING]=[Re.CLEARKEY_KEYSTEM_STRING],jr.__dashjs_factory_name="ProtectionModel_21Jan2015";var Li=dashjs.FactoryMaker.getClassFactory(jr);function Cr(oe){oe=oe||{};var te,re,wt,Jt,be,Ee,Be,xe,Xe,$e=this.context,ke=oe.eventBus,_e=oe.events,We=oe.debug,He=oe.api;function an(){try{for(var en=0;en<Be.length;en++)pn(Be[en]);wt&&wt.removeEventListener(He.needkey,xe),ke.trigger(_e.TEARDOWN_COMPLETE)}catch(Se){ke.trigger(_e.TEARDOWN_COMPLETE,{error:"Error tearing down key sessions and MediaKeys! -- "+Se.message})}}function pn(en){var Se=en.session;Se.removeEventListener(He.error,en),Se.removeEventListener(He.message,en),Se.removeEventListener(He.ready,en),Se.removeEventListener(He.close,en);for(var Ie=0;Ie<Be.length;Ie++)if(Be[Ie]===en){Be.splice(Ie,1);break}Se[He.release]()}function vn(){var en=null,Se=function(){wt.removeEventListener("loadedmetadata",en),wt[He.setMediaKeys](be),ke.trigger(_e.VIDEO_ELEMENT_SELECTED)};wt.readyState>=1?Se():(en=Se.bind(this),wt.addEventListener("loadedmetadata",en))}return te={getAllInitData:function(){for(var en=[],Se=0;Se<Be.length;Se++)en.push(Be[Se].initData);return en},getSessions:function(){return Be},requestKeySystemAccess:function(en){return new Promise(function(Se,Ie){for(var Fe=!1,rn=0;rn<en.length;rn++)for(var un=en[rn].ks.systemString,_n=en[rn].configs,Tn=null,qn=null,Vn=0;Vn<_n.length;Vn++){var In=_n[Vn].audioCapabilities,Bn=_n[Vn].videoCapabilities;if(In&&In.length!==0){Tn=[];for(var Ln=0;Ln<In.length;Ln++)window[He.MediaKeys].isTypeSupported(un,In[Ln].contentType)&&Tn.push(In[Ln])}if(Bn&&Bn.length!==0){qn=[];for(var Wn=0;Wn<Bn.length;Wn++)window[He.MediaKeys].isTypeSupported(un,Bn[Wn].contentType)&&qn.push(Bn[Wn])}if(!(!Tn&&!qn||Tn&&Tn.length===0||qn&&qn.length===0)){Fe=!0;var Tr=new g(Tn,qn),mr=Xe.getKeySystemBySystemString(un),er=new Gr(mr,Tr);ke.trigger(_e.KEY_SYSTEM_ACCESS_COMPLETE,{data:er}),Se({data:er});break}}if(!Fe){var Xn="Key system access denied! -- No valid audio/video content configurations detected!";ke.trigger(_e.KEY_SYSTEM_ACCESS_COMPLETE,{error:Xn}),Ie({error:Xn})}})},selectKeySystem:function(en){return new Promise(function(Se,Ie){try{be=en.mediaKeys=new window[He.MediaKeys](en.keySystem.systemString),Jt=en.keySystem,Ee=en,wt&&vn(),Se(Jt)}catch{Ie({error:"Error selecting keys system ("+Jt.systemString+")! Could not create MediaKeys -- TODO"})}})},setMediaElement:function(en){wt!==en&&(wt&&wt.removeEventListener(He.needkey,xe),(wt=en)&&(wt.addEventListener(He.needkey,xe),be&&vn()))},createKeySession:function(en){if(!Jt||!be||!Ee)throw new Error("Can not create sessions until you have selected a key system");var Se=null;if(Ee.ksConfiguration.videoCapabilities&&Ee.ksConfiguration.videoCapabilities.length>0&&(Se=Ee.ksConfiguration.videoCapabilities[0]),Se===null&&Ee.ksConfiguration.audioCapabilities&&Ee.ksConfiguration.audioCapabilities.length>0&&(Se=Ee.ksConfiguration.audioCapabilities[0]),Se===null)throw new Error("Can not create sessions for unknown content types.");var Ie=Se.contentType,Fe=be.createSession(Ie,new Uint8Array(en.initData),en.cdmData?new Uint8Array(en.cdmData):null),rn=function(un,_n){return{session:un,keyId:_n.keyId,initData:_n.initData,getKeyId:function(){return this.keyId},getSessionId:function(){return this.session.sessionId},getExpirationTime:function(){return NaN},getSessionType:function(){return"temporary"},handleEvent:function(Tn){switch(Tn.type){case He.error:ke.trigger(_e.KEY_ERROR,{error:new x.A(W.MEDIA_KEYERR_CODE,"KeyError",this)});break;case He.message:var qn=ArrayBuffer.isView(Tn.message)?Tn.message.buffer:Tn.message;ke.trigger(_e.INTERNAL_KEY_MESSAGE,{data:new gr(this,qn,Tn.destinationURL)});break;case He.ready:re.debug("DRM: Key added."),ke.trigger(_e.KEY_ADDED);break;case He.close:re.debug("DRM: Session closed. SessionID = "+this.getSessionId()),ke.trigger(_e.KEY_SESSION_CLOSED,{data:this.getSessionId()})}}}}(Fe,en);Fe.addEventListener(He.error,rn),Fe.addEventListener(He.message,rn),Fe.addEventListener(He.ready,rn),Fe.addEventListener(He.close,rn),Be.push(rn),re.debug("DRM: Session created. SessionID = "+rn.getSessionId()),ke.trigger(_e.KEY_SESSION_CREATED,{data:rn})},updateKeySession:function(en,Se){var Ie=en.session;Xe.isClearKey(Jt)?Ie.update(new Uint8Array(Se.toJWK())):Ie.update(new Uint8Array(Se)),ke.trigger(_e.KEY_SESSION_UPDATED)},closeKeySession:pn,setServerCertificate:function(){},loadKeySession:function(){},removeKeySession:function(){},stop:an,reset:an},re=We.getLogger(te),wt=null,Jt=null,be=null,Ee=null,Be=[],Xe=An($e).getInstance(),xe={handleEvent:function(en){if(en.type===He.needkey&&en.initData){var Se=ArrayBuffer.isView(en.initData)?en.initData.buffer:en.initData;ke.trigger(_e.NEED_KEY,{key:new hr(Se,"cenc")})}}},te}Cr.__dashjs_factory_name="ProtectionModel_3Feb2014";var Dr=dashjs.FactoryMaker.getClassFactory(Cr);function li(oe){oe=oe||{};var te,re,wt,Jt,be,Ee,Be,xe,Xe,$e=this.context,ke=oe.eventBus,_e=oe.events,We=oe.debug,He=oe.api,an=oe.errHandler;function pn(){wt&&Se();for(var Ie=0;Ie<Be.length;Ie++)vn(Be[Ie]);ke.trigger(_e.TEARDOWN_COMPLETE)}function vn(Ie){try{wt[He.cancelKeyRequest](Jt.systemString,Ie.sessionId)}catch(Fe){ke.trigger(_e.KEY_SESSION_CLOSED,{data:null,error:"Error closing session ("+Ie.sessionId+") "+Fe.message})}}function en(Ie,Fe){if(Fe&&Ie){for(var rn=Ie.length,un=0;un<rn;un++)if(Ie[un].sessionId==Fe)return Ie[un];return null}return null}function Se(){wt.removeEventListener(He.keyerror,Xe),wt.removeEventListener(He.needkey,Xe),wt.removeEventListener(He.keymessage,Xe),wt.removeEventListener(He.keyadded,Xe)}return te={getAllInitData:function(){for(var Ie=[],Fe=0;Fe<Ee.length;Fe++)Ie.push(Ee[Fe].initData);for(var rn=0;rn<Be.length;rn++)Ie.push(Be[rn].initData);return Ie},getSessions:function(){return Be.concat(Ee)},requestKeySystemAccess:function(Ie){return new Promise(function(Fe,rn){var un=wt;un||(un=document.createElement("video"));for(var _n=!1,Tn=0;Tn<Ie.length;Tn++)for(var qn=Ie[Tn].ks.systemString,Vn=Ie[Tn].configs,In=null,Bn=0;Bn<Vn.length;Bn++){var Ln=Vn[Bn].videoCapabilities;if(Ln&&Ln.length!==0){In=[];for(var Wn=0;Wn<Ln.length;Wn++)un.canPlayType(Ln[Wn].contentType,qn)!==""&&In.push(Ln[Wn])}if(In&&(!In||In.length!==0)){_n=!0;var Tr=new g(null,In),mr=be.getKeySystemBySystemString(qn),er=new Gr(mr,Tr);ke.trigger(_e.KEY_SYSTEM_ACCESS_COMPLETE,{data:er}),Fe({data:er});break}}if(!_n){var Xn="Key system access denied! -- No valid audio/video content configurations detected!";ke.trigger(_e.KEY_SYSTEM_ACCESS_COMPLETE,{error:Xn}),rn({error:Xn})}})},selectKeySystem:function(Ie){return Jt=Ie.keySystem,Promise.resolve(Jt)},setMediaElement:function(Ie){if(wt!==Ie){if(wt){Se();for(var Fe=0;Fe<Be.length;Fe++)vn(Be[Fe]);Be=[]}(wt=Ie)&&(wt.addEventListener(He.keyerror,Xe),wt.addEventListener(He.needkey,Xe),wt.addEventListener(He.keymessage,Xe),wt.addEventListener(He.keyadded,Xe),ke.trigger(_e.VIDEO_ELEMENT_SELECTED))}},createKeySession:function(Ie){if(!Jt)throw new Error("Can not create sessions until you have selected a key system");if(xe||Be.length===0){var Fe={sessionId:null,keyId:Ie.keyId,initData:Ie.initData,getKeyId:function(){return this.keyId},getSessionId:function(){return this.sessionId},getExpirationTime:function(){return NaN},getSessionType:function(){return"temporary"}};return Ee.push(Fe),wt[He.generateKeyRequest](Jt.systemString,new Uint8Array(Ie.initData)),Fe}throw new Error("Multiple sessions not allowed!")},updateKeySession:function(Ie,Fe){var rn=Ie.sessionId;if(be.isClearKey(Jt))for(var un=0;un<Fe.keyPairs.length;un++)wt[He.addKey](Jt.systemString,Fe.keyPairs[un].key,Fe.keyPairs[un].keyID,rn);else wt[He.addKey](Jt.systemString,new Uint8Array(Fe),new Uint8Array(Ie.initData),rn);ke.trigger(_e.KEY_SESSION_UPDATED)},closeKeySession:vn,setServerCertificate:function(){},loadKeySession:function(){},removeKeySession:function(){},stop:pn,reset:pn},re=We.getLogger(te),wt=null,Jt=null,Ee=[],Be=[],be=An($e).getInstance(),Xe={handleEvent:function(Ie){var Fe=null;switch(Ie.type){case He.needkey:var rn=ArrayBuffer.isView(Ie.initData)?Ie.initData.buffer:Ie.initData;ke.trigger(_e.NEED_KEY,{key:new hr(rn,"cenc")});break;case He.keyerror:if((Fe=en(Be,Ie.sessionId))||(Fe=en(Ee,Ie.sessionId)),Fe){var un=W.MEDIA_KEYERR_CODE,_n="";switch(Ie.errorCode.code){case 1:un=W.MEDIA_KEYERR_UNKNOWN_CODE,_n+="MEDIA_KEYERR_UNKNOWN - "+W.MEDIA_KEYERR_UNKNOWN_MESSAGE;break;case 2:un=W.MEDIA_KEYERR_CLIENT_CODE,_n+="MEDIA_KEYERR_CLIENT - "+W.MEDIA_KEYERR_CLIENT_MESSAGE;break;case 3:un=W.MEDIA_KEYERR_SERVICE_CODE,_n+="MEDIA_KEYERR_SERVICE - "+W.MEDIA_KEYERR_SERVICE_MESSAGE;break;case 4:un=W.MEDIA_KEYERR_OUTPUT_CODE,_n+="MEDIA_KEYERR_OUTPUT - "+W.MEDIA_KEYERR_OUTPUT_MESSAGE;break;case 5:un=W.MEDIA_KEYERR_HARDWARECHANGE_CODE,_n+="MEDIA_KEYERR_HARDWARECHANGE - "+W.MEDIA_KEYERR_HARDWARECHANGE_MESSAGE;break;case 6:un=W.MEDIA_KEYERR_DOMAIN_CODE,_n+="MEDIA_KEYERR_DOMAIN - "+W.MEDIA_KEYERR_DOMAIN_MESSAGE}_n+=" System Code = "+Ie.systemCode,ke.trigger(_e.KEY_ERROR,{error:new x.A(un,_n,Fe)})}else re.error("No session token found for key error");break;case He.keyadded:(Fe=en(Be,Ie.sessionId))||(Fe=en(Ee,Ie.sessionId)),Fe?(re.debug("DRM: Key added."),ke.trigger(_e.KEY_ADDED,{data:Fe})):re.debug("No session token found for key added");break;case He.keymessage:if((xe=Ie.sessionId!==null&&Ie.sessionId!==void 0)?!(Fe=en(Be,Ie.sessionId))&&Ee.length>0&&(Fe=Ee.shift(),Be.push(Fe),Fe.sessionId=Ie.sessionId,ke.trigger(_e.KEY_SESSION_CREATED,{data:Fe})):Ee.length>0&&(Fe=Ee.shift(),Be.push(Fe),Ee.length!==0&&an.error(new x.A(W.MEDIA_KEY_MESSAGE_ERROR_CODE,W.MEDIA_KEY_MESSAGE_ERROR_MESSAGE))),Fe){var Tn=ArrayBuffer.isView(Ie.message)?Ie.message.buffer:Ie.message;Fe.keyMessage=Tn,ke.trigger(_e.INTERNAL_KEY_MESSAGE,{data:new gr(Fe,Tn,Ie.defaultURL)})}else re.warn("No session token found for key message")}}},te}li.__dashjs_factory_name="ProtectionModel_01b";var ci=dashjs.FactoryMaker.getClassFactory(li),fi=[{generateKeyRequest:"generateKeyRequest",addKey:"addKey",cancelKeyRequest:"cancelKeyRequest",needkey:"needkey",keyerror:"keyerror",keyadded:"keyadded",keymessage:"keymessage"},{generateKeyRequest:"webkitGenerateKeyRequest",addKey:"webkitAddKey",cancelKeyRequest:"webkitCancelKeyRequest",needkey:"webkitneedkey",keyerror:"webkitkeyerror",keyadded:"webkitkeyadded",keymessage:"webkitkeymessage"}],di=[{setMediaKeys:"setMediaKeys",MediaKeys:"MediaKeys",release:"close",needkey:"needkey",error:"keyerror",message:"keymessage",ready:"keyadded",close:"keyclose"},{setMediaKeys:"msSetMediaKeys",MediaKeys:"MSMediaKeys",release:"close",needkey:"msneedkey",error:"mskeyerror",message:"mskeymessage",ready:"mskeyadded",close:"mskeyclose"}];function qr(){var oe,te=this.context;function re(wt,Jt){for(var be=0;be<Jt.length;be++){var Ee=Jt[be];if(typeof wt[Ee[Object.keys(Ee)[0]]]=="function")return Ee}return null}return oe={createProtectionSystem:function(wt){var Jt=null,be=An(te).getInstance();be.setConfig({debug:wt.debug,BASE64:wt.BASE64,settings:wt.settings}),be.initialize();var Ee=function(Be){var xe=Be.debug,Xe=xe.getLogger(oe),$e=Be.eventBus,ke=Be.errHandler,_e=Be.videoModel?Be.videoModel.getElement():null;return _e&&_e.onencrypted===void 0||_e&&_e.mediaKeys===void 0?re(_e,di)?(Xe.info("EME detected on this user agent! (ProtectionModel_3Feb2014)"),Dr(te).create({debug:xe,eventBus:$e,events:Be.events,api:re(_e,di)})):re(_e,fi)?(Xe.info("EME detected on this user agent! (ProtectionModel_01b)"),ci(te).create({debug:xe,eventBus:$e,errHandler:ke,events:Be.events,api:re(_e,fi)})):(Xe.warn("No supported version of EME detected on this user agent! - Attempts to play encrypted content will fail!"),null):(Xe.info("EME detected on this user agent! (ProtectionModel_21Jan2015)"),Li(te).create({debug:xe,eventBus:$e,events:Be.events}))}(wt);return!Jt&&Ee&&(Jt=lt(te).create({protectionModel:Ee,protectionKeyController:be,eventBus:wt.eventBus,debug:wt.debug,events:wt.events,BASE64:wt.BASE64,constants:wt.constants,cmcdModel:wt.cmcdModel,customParametersModel:wt.customParametersModel,settings:wt.settings}),wt.capabilities.setEncryptedMediaSupported(!0)),Jt}}}qr.__dashjs_factory_name="Protection";var Or=dashjs.FactoryMaker.getClassFactory(qr);Or.events=pr,Or.errors=W,dashjs.FactoryMaker.updateClassFactory(qr.__dashjs_factory_name,Or);var vr=Or},5066:function(ve,Lt,M){var ct=M(5742),I={DEFAULT:.5,STRONG:1,WEAK:0};function u(_,y,i){var h,g;return h=_===void 0?-1:_,g=function(r){var m=I.DEFAULT;return r!==I.DEFAULT&&r!==I.STRONG&&r!==I.WEAK||(m=r),m}(i),{quality:h,reason:y===void 0?null:y,priority:g}}u.__dashjs_factory_name="SwitchRequest";var n=ct.A.getClassFactory(u);n.NO_CHANGE=-1,n.PRIORITY=I,ct.A.updateClassFactory(u.__dashjs_factory_name,n),Lt.A=n},2365:function(ve,Lt,M){var ct=M(1499),I=M(8008),u=M(6918),n=M(7933),_=M(549),y=M(3469),i=M(2244),h=M(6050),g=M(5742),r=M(5066),m=M(7256),d="qualitySwitchRules",T="abandonFragmentRules";function q(x){x=x||{};var nt,O,J=this.context,pt=x.mediaPlayerModel,G=x.customParametersModel,X=x.dashMetrics,rt=x.settings;function bt(mt){return mt.filter(function(lt){return lt.quality>r.A.NO_CHANGE})}function Ut(mt){var lt,jt,St,Nt,Ht,ie={},It=null;if(mt.length!==0){for(ie[r.A.PRIORITY.STRONG]={quality:r.A.NO_CHANGE,reason:null},ie[r.A.PRIORITY.WEAK]={quality:r.A.NO_CHANGE,reason:null},ie[r.A.PRIORITY.DEFAULT]={quality:r.A.NO_CHANGE,reason:null},lt=0,jt=mt.length;lt<jt;lt+=1)(St=mt[lt]).quality!==r.A.NO_CHANGE&&(ie[St.priority].quality===r.A.NO_CHANGE||ie[St.priority].quality>St.quality)&&(ie[St.priority].quality=St.quality,ie[St.priority].reason=St.reason||null);return ie[r.A.PRIORITY.WEAK].quality!==r.A.NO_CHANGE&&(It=ie[r.A.PRIORITY.WEAK]),ie[r.A.PRIORITY.DEFAULT].quality!==r.A.NO_CHANGE&&(It=ie[r.A.PRIORITY.DEFAULT]),ie[r.A.PRIORITY.STRONG].quality!==r.A.NO_CHANGE&&(It=ie[r.A.PRIORITY.STRONG]),It&&(Nt=It.quality,Ht=It.reason),(0,r.A)(J).create(Nt,Ht)}}return{initialize:function(){nt=[],O=[],rt.get().streaming.abr.useDefaultABRRules&&(rt.get().streaming.abr.ABRStrategy===m.A.ABR_STRATEGY_L2A?nt.push((0,i.A)(J).create({dashMetrics:X,settings:rt})):rt.get().streaming.abr.ABRStrategy===m.A.ABR_STRATEGY_LoLP?nt.push((0,h.A)(J).create({dashMetrics:X})):(nt.push((0,y.A)(J).create({dashMetrics:X,mediaPlayerModel:pt,settings:rt})),nt.push((0,ct.A)(J).create({dashMetrics:X})),rt.get().streaming.abr.additionalAbrRules.insufficientBufferRule&&nt.push((0,I.A)(J).create({dashMetrics:X,settings:rt})),rt.get().streaming.abr.additionalAbrRules.switchHistoryRule&&nt.push((0,_.A)(J).create()),rt.get().streaming.abr.additionalAbrRules.droppedFramesRule&&nt.push((0,n.A)(J).create()),rt.get().streaming.abr.additionalAbrRules.abandonRequestsRule&&O.push((0,u.A)(J).create({dashMetrics:X,mediaPlayerModel:pt,settings:rt})))),G.getAbrCustomRules().forEach(function(mt){mt.type===d&&nt.push(mt.rule(J).create()),mt.type===T&&O.push(mt.rule(J).create())})},reset:function(){[nt,O].forEach(function(mt){mt&&mt.length&&mt.forEach(function(lt){return lt.reset&<.reset()})}),nt=[],O=[]},getMaxQuality:function(mt){return Ut(bt(nt.map(function(lt){return lt.getMaxIndex(mt)})))||(0,r.A)(J).create()},getMinSwitchRequest:Ut,shouldAbandonFragment:function(mt,lt){var jt=Ut(bt(O.map(function(St){return St.shouldAbandon(mt,lt)})));return jt&&(jt.reason.forceAbandon=!0),jt||(0,r.A)(J).create()},getQualitySwitchRules:function(){return nt}}}q.__dashjs_factory_name="ABRRulesCollection";var W=g.A.getClassFactory(q);W.QUALITY_SWITCH_RULES=d,W.ABANDON_FRAGMENT_RULES=T,g.A.updateSingletonFactory(q.__dashjs_factory_name,W),Lt.A=W},6918:function(ve,Lt,M){var ct=M(5066),I=M(5742),u=M(4413);function n(_){_=_||{};var y,i,h,g,r,m=this.context,d=_.mediaPlayerModel,T=_.dashMetrics,q=_.settings;function W(){h={},g={},r=[]}return y={shouldAbandon:function(x){var nt=(0,ct.A)(m).create(ct.A.NO_CHANGE,{name:n.__dashjs_factory_name});if(!(x&&x.hasOwnProperty("getMediaInfo")&&x.hasOwnProperty("getMediaType")&&x.hasOwnProperty("getCurrentRequest")&&x.hasOwnProperty("getRepresentationInfo")&&x.hasOwnProperty("getAbrController")))return nt;var O,J,pt=x.getMediaInfo(),G=x.getMediaType(),X=x.getStreamInfo(),rt=X?X.id:null,bt=x.getCurrentRequest();if(!isNaN(bt.index)){O=G,J=bt.index,h[O]=h[O]||{},h[O][J]=h[O][J]||{};var Ut=d.getStableBufferTime();if(T.getCurrentBufferLevel(G)>Ut)return nt;var mt=h[G][bt.index];if(mt===null||bt.firstByteDate===null||g.hasOwnProperty(mt.id))return nt;if(mt.firstByteTime===void 0&&(r[G]=[],mt.firstByteTime=bt.firstByteDate.getTime(),mt.segmentDuration=bt.duration,mt.bytesTotal=bt.bytesTotal,mt.id=bt.index),mt.bytesLoaded=bt.bytesLoaded,mt.elapsedTime=new Date().getTime()-mt.firstByteTime,mt.bytesLoaded>0&&mt.elapsedTime>0&&function(Ot,fe){r[Ot]=r[Ot]||[],r[Ot].push(fe)}(G,Math.round(8*mt.bytesLoaded/mt.elapsedTime)),r[G].length>=q.get().streaming.abr.abrRulesParameters.abandonRequestsRule.minLengthToAverage&&mt.elapsedTime>q.get().streaming.abr.abrRulesParameters.abandonRequestsRule.graceTimeThreshold&&mt.bytesLoaded<mt.bytesTotal){var lt=r[G].reduce(function(Ot,fe){return Ot+fe},0);if(mt.measuredBandwidthInKbps=Math.round(lt/r[G].length),mt.estimatedTimeOfDownload=+(8*mt.bytesTotal/mt.measuredBandwidthInKbps/1e3).toFixed(2),mt.estimatedTimeOfDownload<mt.segmentDuration*q.get().streaming.abr.abrRulesParameters.abandonRequestsRule.abandonMultiplier||x.getRepresentationInfo().quality===0)return nt;if(!g.hasOwnProperty(mt.id)){var jt=x.getAbrController(),St=mt.bytesTotal-mt.bytesLoaded,Nt=jt.getBitrateList(pt),Ht=jt.getQualityForBitrate(pt,mt.measuredBandwidthInKbps*q.get().streaming.abr.bandwidthSafetyFactor,rt),ie=jt.getMinAllowedIndexFor(G,rt),It=ie!==void 0?Math.max(ie,Ht):Ht;St>mt.bytesTotal*Nt[It].bitrate/Nt[jt.getQualityFor(G,rt)].bitrate&&(nt.quality=It,nt.reason.throughput=mt.measuredBandwidthInKbps,nt.reason.fragmentID=mt.id,nt.reason.rule=this.getClassName(),g[mt.id]=mt,i.debug("["+G+"] frag id",mt.id," is asking to abandon and switch to quality to ",It," measured bandwidth was",mt.measuredBandwidthInKbps),delete h[G][mt.id])}}else mt.bytesLoaded===mt.bytesTotal&&delete h[G][mt.id]}return nt},reset:W},i=(0,u.A)(m).getInstance().getLogger(y),W(),y}n.__dashjs_factory_name="AbandonRequestsRule",Lt.A=I.A.getClassFactory(n)},3469:function(ve,Lt,M){var ct=M(1991),I=M(5066),u=M(5742),n=M(2756),_=M(8366),y=M(4865),i=M(4413),h=M(7547),g=M(7256),r=10;function m(d){d=d||{};var T,q,W,x=this.context,nt=d.dashMetrics,O=d.mediaPlayerModel,J=(0,_.A)(x).getInstance();function pt(It,Ot,fe){var Ae=fe.reduce(function(tt,at,qt){return at>fe[tt]?qt:tt},0);if(Ae===0)return null;var Re=Math.max(It,r+2*Ot.length),Pe=(fe[Ae]-1)/(Re/r-1);return{gp:Pe,Vp:r/Pe}}function G(It){It.placeholderBuffer=0,It.mostAdvancedSegmentStart=NaN,It.lastSegmentWasReplacement=!1,It.lastSegmentStart=NaN,It.lastSegmentDurationS=NaN,It.lastSegmentRequestTimeMs=NaN,It.lastSegmentFinishTimeMs=NaN}function X(It,Ot){var fe=O.getStableBufferTime();if(It.stableBufferTime!==fe){var Ae=pt(fe,It.bitrates,It.utilities);if(Ae.Vp!==It.Vp||Ae.gp!==It.gp){var Re=nt.getCurrentBufferLevel(Ot),Pe=Re+It.placeholderBuffer;Pe-=r,Pe*=Ae.Vp/It.Vp,Pe+=r,It.stableBufferTime=fe,It.Vp=Ae.Vp,It.gp=Ae.gp,It.placeholderBuffer=Math.max(0,Pe-Re)}}}function rt(It,Ot){return It.Vp*(It.utilities[Ot]+It.gp)}function bt(It,Ot){for(var fe=It.bitrates[Ot],Ae=It.utilities[Ot],Re=0,Pe=Ot-1;Pe>=0;--Pe)if(It.utilities[Pe]<It.utilities[Ot]){var tt=It.bitrates[Pe],at=It.utilities[Pe],qt=It.Vp*(It.gp+(fe*at-tt*Ae)/(fe-tt));Re=Math.max(Re,qt)}return Re}function Ut(It){var Ot=It.mediaType===g.A.AUDIO?[g.A.AUDIO]:W;for(var fe in Ot)W.hasOwnProperty(fe)&&W[fe].state===2&&(W[fe].placeholderBuffer=0)}function mt(){for(var It in W)if(W.hasOwnProperty(It)){var Ot=W[It];Ot.state!==0&&(Ot.state=1,G(Ot))}}function lt(It){if(It&&It.chunk&&It.chunk.mediaInfo){var Ot=W[It.chunk.mediaInfo.type];if(Ot&&Ot.state!==0){var fe=It.chunk.start;isNaN(Ot.mostAdvancedSegmentStart)||fe>Ot.mostAdvancedSegmentStart?(Ot.mostAdvancedSegmentStart=fe,Ot.lastSegmentWasReplacement=!1):Ot.lastSegmentWasReplacement=!0,Ot.lastSegmentStart=fe,Ot.lastSegmentDurationS=It.chunk.duration,Ot.lastQuality=It.chunk.quality,St(Ot,It.chunk.mediaInfo.type)}}}function jt(It){if(It&&It.metric===ct.A.HTTP_REQUEST&&It.value&&It.value.type===n.G.MEDIA_SEGMENT_TYPE&&It.value.trace&&It.value.trace.length){var Ot=W[It.mediaType];Ot&&Ot.state!==0&&(Ot.lastSegmentRequestTimeMs=It.value.trequest.getTime(),Ot.lastSegmentFinishTimeMs=It.value._tfinish.getTime(),St(Ot,It.mediaType))}}function St(It,Ot){if(!isNaN(It.lastSegmentStart)&&!isNaN(It.lastSegmentRequestTimeMs)&&!isNaN(It.placeholderBuffer)){if(It.placeholderBuffer*=.99,!isNaN(It.lastSegmentFinishTimeMs)){var fe=nt.getCurrentBufferLevel(Ot)+.001*(It.lastSegmentFinishTimeMs-It.lastSegmentRequestTimeMs),Ae=rt(It,It.lastQuality),Re=Math.max(0,Ae-fe);It.placeholderBuffer=Math.min(Re,It.placeholderBuffer)}It.lastSegmentWasReplacement&&!isNaN(It.lastSegmentDurationS)&&(It.placeholderBuffer+=It.lastSegmentDurationS),It.lastSegmentStart=NaN,It.lastSegmentRequestTimeMs=NaN}}function Nt(It){if(It){var Ot=W[It.mediaType];Ot&&Ot.state!==0&&(Ot.abrQuality=It.newQuality)}}function Ht(It){if(It){var Ot=W[It.mediaType];if(Ot&&Ot.state!==0){var fe,Ae=nt.getCurrentBufferLevel(It.mediaType);fe=Ot.abrQuality>0?bt(Ot,Ot.abrQuality):r;var Re=Math.max(0,fe-Ae);Ot.placeholderBuffer=Math.min(Ot.placeholderBuffer,Re)}}}function ie(){W={}}return T={getMaxIndex:function(It){var Ot=(0,I.A)(x).create();if(!(It&&It.hasOwnProperty("getMediaInfo")&&It.hasOwnProperty("getMediaType")&&It.hasOwnProperty("getScheduleController")&&It.hasOwnProperty("getStreamInfo")&&It.hasOwnProperty("getAbrController")&&It.hasOwnProperty("useBufferOccupancyABR")))return Ot;var fe=It.getMediaInfo(),Ae=It.getMediaType(),Re=It.getScheduleController(),Pe=It.getStreamInfo(),tt=It.getAbrController(),at=tt.getThroughputHistory(),qt=Pe?Pe.id:null,v=Pe&&Pe.manifestInfo&&Pe.manifestInfo.isDynamic,A=It.useBufferOccupancyABR();if(Ot.reason=Ot.reason||{},!A)return Ot;Re.setTimeToLoadDelay(0);var c=function(_t){var Yt=_t.getMediaType(),Vt=W[Yt];return Vt?Vt.state!==0&&X(Vt,Yt):(Vt=function(Xt){var ne={},Te=Xt.getMediaInfo().bitrateList.map(function(ze){return ze.bandwidth}),me=function(ze){return ze.map(function(Qe){return Math.log(Qe)})}(Te);me=me.map(function(ze){return ze-me[0]+1});var Ue=O.getStableBufferTime(),Me=pt(Ue,Te,me);return Me?(ne.state=1,ne.bitrates=Te,ne.utilities=me,ne.stableBufferTime=Ue,ne.Vp=Me.Vp,ne.gp=Me.gp,ne.lastQuality=0,G(ne)):ne.state=0,ne}(_t),W[Yt]=Vt),Vt}(It);if(c.state===0)return Ot;var E,Q=nt.getCurrentBufferLevel(Ae),D=at.getAverageThroughput(Ae,v),Bt=at.getSafeAverageThroughput(Ae,v),Dt=at.getAverageLatency(Ae);if(Ot.reason.state=c.state,Ot.reason.throughput=D,Ot.reason.latency=Dt,isNaN(D))return Ot;switch(c.state){case 1:E=tt.getQualityForBitrate(fe,Bt,qt,Dt),Ot.quality=E,Ot.reason.throughput=Bt,c.placeholderBuffer=Math.max(0,bt(c,E)-Q),c.lastQuality=E,!isNaN(c.lastSegmentDurationS)&&Q>=c.lastSegmentDurationS&&(c.state=2);break;case 2:(function(_t,Yt){var Vt=Date.now();if(isNaN(_t.lastSegmentFinishTimeMs)){if(!isNaN(_t.lastCallTimeMs)){var Xt=.001*(Vt-_t.lastCallTimeMs);_t.placeholderBuffer+=Math.max(0,Xt)}}else{var ne=.001*(Vt-_t.lastSegmentFinishTimeMs);_t.placeholderBuffer+=Math.max(0,ne)}_t.lastCallTimeMs=Vt,_t.lastSegmentStart=NaN,_t.lastSegmentRequestTimeMs=NaN,_t.lastSegmentFinishTimeMs=NaN,X(_t,Yt)})(c,Ae),E=function(_t,Yt){for(var Vt=_t.bitrates.length,Xt=NaN,ne=NaN,Te=0;Te<Vt;++Te){var me=(_t.Vp*(_t.utilities[Te]+_t.gp)-Yt)/_t.bitrates[Te];(isNaN(ne)||me>=ne)&&(ne=me,Xt=Te)}return Xt}(c,Q+c.placeholderBuffer);var At=tt.getQualityForBitrate(fe,Bt,qt,Dt);E>c.lastQuality&&E>At&&(E=Math.max(At,c.lastQuality));var Rt=Math.max(0,Q+c.placeholderBuffer-rt(c,E));Rt<=c.placeholderBuffer?(c.placeholderBuffer-=Rt,Rt=0):(Rt-=c.placeholderBuffer,c.placeholderBuffer=0,E<tt.getMaxAllowedIndexFor(Ae,qt)?Re.setTimeToLoadDelay(1e3*Rt):Rt=0),Ot.quality=E,Ot.reason.throughput=D,Ot.reason.latency=Dt,Ot.reason.bufferLevel=Q,Ot.reason.placeholderBuffer=c.placeholderBuffer,Ot.reason.delay=Rt,c.lastQuality=E;break;default:q.debug("BOLA ABR rule invoked in bad state."),Ot.quality=tt.getQualityForBitrate(fe,Bt,qt,Dt),Ot.reason.state=c.state,Ot.reason.throughput=Bt,Ot.reason.latency=Dt,c.state=1,G(c)}return Ot},reset:function(){ie(),J.off(h.A.BUFFER_EMPTY,Ut,T),J.off(h.A.PLAYBACK_SEEKING,mt,T),J.off(h.A.METRIC_ADDED,jt,T),J.off(h.A.QUALITY_CHANGE_REQUESTED,Nt,T),J.off(h.A.FRAGMENT_LOADING_ABANDONED,Ht,T),J.off(y.A.MEDIA_FRAGMENT_LOADED,lt,T)}},q=(0,i.A)(x).getInstance().getLogger(T),ie(),J.on(h.A.BUFFER_EMPTY,Ut,T),J.on(h.A.PLAYBACK_SEEKING,mt,T),J.on(h.A.METRIC_ADDED,jt,T),J.on(h.A.QUALITY_CHANGE_REQUESTED,Nt,T),J.on(h.A.FRAGMENT_LOADING_ABANDONED,Ht,T),J.on(y.A.MEDIA_FRAGMENT_LOADED,lt,T),T}m.__dashjs_factory_name="BolaRule",Lt.A=u.A.getClassFactory(m)},7933:function(ve,Lt,M){var ct=M(5742),I=M(5066),u=M(4413);function n(){var _,y,i=this.context;return _={getMaxIndex:function(h){var g=(0,I.A)(i).create();if(!h||!h.hasOwnProperty("getDroppedFramesHistory"))return g;var r=h.getDroppedFramesHistory(),m=h.getStreamInfo().id;if(r){var d=r.getFrameHistory(m);if(!d||d.length===0)return g;for(var T=0,q=0,W=I.A.NO_CHANGE,x=1;x<d.length;x++)if(d[x]&&(T=d[x].droppedVideoFrames,(q=d[x].totalVideoFrames)>375&&T/q>.15)){W=x-1,y.debug("index: "+W+" Dropped Frames: "+T+" Total Frames: "+q);break}return(0,I.A)(i).create(W,{droppedFrames:T})}return g}},y=(0,u.A)(i).getInstance().getLogger(_),_}n.__dashjs_factory_name="DroppedFramesRule",Lt.A=ct.A.getClassFactory(n)},8008:function(ve,Lt,M){var ct=M(8366),I=M(4865),u=M(5742),n=M(4413),_=M(5066),y=M(7256),i=M(1991),h=M(7547);function g(r){r=r||{};var m,d,T,q=2,W=this.context,x=(0,ct.A)(W).getInstance(),nt=r.dashMetrics;function O(){(T={})[y.A.VIDEO]={ignoreCount:q},T[y.A.AUDIO]={ignoreCount:q}}function J(){O()}function pt(G){isNaN(G.startTime)||G.mediaType!==y.A.AUDIO&&G.mediaType!==y.A.VIDEO||T[G.mediaType].ignoreCount>0&&T[G.mediaType].ignoreCount--}return m={getMaxIndex:function(G){var X=(0,_.A)(W).create();if(!G||!G.hasOwnProperty("getMediaType"))return X;(function(){if(!nt||!nt.hasOwnProperty("getCurrentBufferLevel")||!nt.hasOwnProperty("getCurrentBufferState"))throw new Error(y.A.MISSING_CONFIG_ERROR)})();var rt=G.getMediaType(),bt=nt.getCurrentBufferState(rt),Ut=G.getRepresentationInfo().fragmentDuration,mt=G.getStreamInfo(),lt=mt?mt.id:null,jt=G.getScheduleController(),St=mt&&mt.manifestInfo&&mt.manifestInfo.isDynamic;if(function(Re,Pe){return!Re&&T[Pe].ignoreCount>0}(jt.getPlaybackController().getLowLatencyModeEnabled(),rt)||!Ut)return X;if(bt&&bt.state===i.A.BUFFER_EMPTY)d.debug("["+rt+"] Switch to index 0; buffer is empty."),X.quality=0,X.reason="InsufficientBufferRule: Buffer is empty";else{var Nt=G.getMediaInfo(),Ht=G.getAbrController(),ie=Ht.getThroughputHistory(),It=nt.getCurrentBufferLevel(rt),Ot=ie.getAverageThroughput(rt,St),fe=ie.getAverageLatency(rt),Ae=Ot*(It/Ut)*.5;X.quality=Ht.getQualityForBitrate(Nt,Ae,lt,fe),X.reason="InsufficientBufferRule: being conservative to avoid immediate rebuffering"}return X},reset:function(){O(),x.off(h.A.PLAYBACK_SEEKING,J,m),x.off(I.A.BYTES_APPENDED_END_FRAGMENT,pt,m)}},d=(0,n.A)(W).getInstance().getLogger(m),O(),x.on(h.A.PLAYBACK_SEEKING,J,m),x.on(I.A.BYTES_APPENDED_END_FRAGMENT,pt,m),m}g.__dashjs_factory_name="InsufficientBufferRule",Lt.A=u.A.getClassFactory(g)},2244:function(ve,Lt,M){var ct=M(1991),I=M(5066),u=M(5742),n=M(2756),_=M(8366),y=M(4865),i=M(4413),h=M(7256);function g(r){r=r||{};var m,d,T,q,W=this.context,x=r.dashMetrics,nt=(0,_.A)(W).getInstance();function O(mt){mt.placeholderBuffer=0,mt.mostAdvancedSegmentStart=NaN,mt.lastSegmentWasReplacement=!1,mt.lastSegmentStart=NaN,mt.lastSegmentDurationS=NaN,mt.lastSegmentRequestTimeMs=NaN,mt.lastSegmentFinishTimeMs=NaN,mt.lastSegmentUrl=""}function J(){for(var mt in d)if(d.hasOwnProperty(mt)){var lt=d[mt];lt.state!==0&&(lt.state=1,O(lt))}}function pt(mt){if(mt&&mt.chunk&&mt.chunk.mediaInfo){var lt=d[mt.chunk.mediaInfo.type],jt=T[mt.chunk.mediaInfo.type];if(lt&<.state!==0){var St=mt.chunk.start;isNaN(lt.mostAdvancedSegmentStart)||St>lt.mostAdvancedSegmentStart?(lt.mostAdvancedSegmentStart=St,lt.lastSegmentWasReplacement=!1):lt.lastSegmentWasReplacement=!0,lt.lastSegmentStart=St,lt.lastSegmentDurationS=mt.chunk.duration,lt.lastQuality=mt.chunk.quality,X(lt,jt)}}}function G(mt){if(mt&&mt.metric===ct.A.HTTP_REQUEST&&mt.value&&mt.value.type===n.G.MEDIA_SEGMENT_TYPE&&mt.value.trace&&mt.value.trace.length){var lt=d[mt.mediaType],jt=T[mt.mediaType];lt&<.state!==0&&(lt.lastSegmentRequestTimeMs=mt.value.trequest.getTime(),lt.lastSegmentFinishTimeMs=mt.value._tfinish.getTime(),X(lt,jt))}}function X(mt,lt){isNaN(mt.lastSegmentStart)||isNaN(mt.lastSegmentRequestTimeMs)||(lt.segment_request_start_s=.001*mt.lastSegmentRequestTimeMs,lt.segment_download_finish_s=.001*mt.lastSegmentFinishTimeMs,mt.lastSegmentStart=NaN,mt.lastSegmentRequestTimeMs=NaN)}function rt(mt){if(mt&&mt.mediaType){var lt=d[mt.mediaType];lt&<.state!==0&&(lt.abrQuality=mt.newQuality)}}function bt(mt,lt){if(mt.length!==lt.length)return-1;for(var jt=0,St=0;St<mt.length;St++)jt+=mt[St]*lt[St];return jt}function Ut(){d={},T={}}return m={getMaxIndex:function(mt){var lt,jt=(0,I.A)(W).create(),St=Math.pow(4,.99),Nt=Math.max(Math.pow(4,1),St*Math.sqrt(4)),Ht=mt.getMediaInfo(),ie=mt.getMediaType(),It=Ht.bitrateList.map(function(Me){return Me.bandwidth}),Ot=It.length,fe=mt.getScheduleController(),Ae=mt.getStreamInfo(),Re=mt.getAbrController(),Pe=Re.getThroughputHistory(),tt=Ae&&Ae.manifestInfo&&Ae.manifestInfo.isDynamic,at=mt.useL2AABR(),qt=x.getCurrentBufferLevel(ie,!0),v=Pe.getSafeAverageThroughput(ie,tt),A=Pe.getAverageThroughput(ie,tt),c=Pe.getAverageLatency(ie),E=mt.getVideoModel().getPlaybackRate();if(!(mt&&mt.hasOwnProperty("getMediaInfo")&&mt.hasOwnProperty("getMediaType")&&mt.hasOwnProperty("getScheduleController")&&mt.hasOwnProperty("getStreamInfo")&&mt.hasOwnProperty("getAbrController")&&mt.hasOwnProperty("useL2AABR"))||(jt.reason=jt.reason||{},!at||ie===h.A.AUDIO))return jt;fe.setTimeToLoadDelay(0);var Q=function(Me){var ze=Me.getMediaType(),Qe=d[ze];return Qe||(Qe=function(nn){var yn={},xn=nn.getMediaInfo(),Yn=xn.bitrateList.map(function(An){return An.bandwidth/1e3});return yn.state=1,yn.bitrates=Yn,yn.lastQuality=0,function(An){An&&An.type&&(T[An.type]={},T[An.type].w=[],T[An.type].prev_w=[],T[An.type].Q=0,T[An.type].segment_request_start_s=0,T[An.type].segment_download_finish_s=0,T[An.type].B_target=1.5)}(xn),O(yn),yn}(Me),d[ze]=Qe),Qe}(mt);if(Q.state===0)return jt;var D=T[ie];if(!D||(jt.reason.state=Q.state,jt.reason.throughput=A,jt.reason.latency=c,isNaN(A)))return jt;switch(Q.state){case 1:if(lt=Re.getQualityForBitrate(Ht,v,Ae.id,c),jt.quality=lt,jt.reason.throughput=v,Q.lastQuality=lt,!isNaN(Q.lastSegmentDurationS)&&qt>=D.B_target){Q.state=2,D.Q=St;for(var Bt=0;Bt<Ot;++Bt)Bt===Q.lastQuality?D.prev_w[Bt]=1:D.prev_w[Bt]=0}break;case 2:var Dt=[],At=x.getCurrentHttpRequest(ie).trace.reduce(function(Me,ze){return Me+ze.d},0),Rt=x.getCurrentHttpRequest(ie).trace.reduce(function(Me,ze){return Me+ze.b[0]},0),_t=Math.round(8*Rt/At),Yt=x.getCurrentHttpRequest(ie);if(_t<1&&(_t=1),Yt.url===Q.lastSegmentUrl||Yt.type===n.G.INIT_SEGMENT_TYPE)lt=Q.lastQuality;else{for(var Vt=Q.lastSegmentDurationS,Xt=1,ne=0;ne<Ot;++ne)It[ne]=It[ne]/1e3,E*It[ne]>_t&&(Xt=-1),D.w[ne]=D.prev_w[ne]+Xt*(Vt/(2*Nt))*((D.Q+St)*(E*It[ne]/_t));D.w=function(Me){for(var ze=Me.length,Qe=!1,nn=[],yn=0;yn<ze;++yn)nn[yn]=Me[yn];for(var xn=Me.sort(function(Hn,Kn){return Kn-Hn}),Yn=0,An=0,Un=[],Sn=0;Sn<ze-1;++Sn)if((An=((Yn+=xn[Sn])-1)/(Sn+1))>=xn[Sn+1]){Qe=!0;break}Qe||(An=(Yn+xn[ze-1]-1)/ze);for(var kn=0;kn<ze;++kn)Un[kn]=Math.max(nn[kn]-An,0);return Un}(D.w);for(var Te=0;Te<Ot;++Te)Dt[Te]=D.w[Te]-D.prev_w[Te],D.prev_w[Te]=D.w[Te];D.Q=Math.max(0,D.Q-Vt+Vt*E*((bt(It,D.prev_w)+bt(It,Dt))/_t));for(var me=[],Ue=0;Ue<Ot;++Ue)me[Ue]=Math.abs(It[Ue]-bt(D.w,It));(lt=me.indexOf(Math.min.apply(Math,me)))>Q.lastQuality&&It[Q.lastQuality+1]<=_t&&(lt=Q.lastQuality+1),It[lt]>=_t&&(D.Q=2*Math.max(St,D.Q)),Q.lastSegmentUrl=Yt.url}jt.quality=lt,jt.reason.throughput=A,jt.reason.latency=c,jt.reason.bufferLevel=qt,Q.lastQuality=jt.quality;break;default:q.debug("L2A ABR rule invoked in bad state."),jt.quality=Re.getQualityForBitrate(Ht,v,Ae.id,c),jt.reason.state=Q.state,jt.reason.throughput=v,jt.reason.latency=c,Q.state=1,O(Q)}return jt},reset:function(){Ut(),nt.off(y.A.PLAYBACK_SEEKING,J,m),nt.off(y.A.MEDIA_FRAGMENT_LOADED,pt,m),nt.off(y.A.METRIC_ADDED,G,m),nt.off(y.A.QUALITY_CHANGE_REQUESTED,rt,m)}},q=(0,i.A)(W).getInstance().getLogger(m),Ut(),nt.on(y.A.PLAYBACK_SEEKING,J,m),nt.on(y.A.MEDIA_FRAGMENT_LOADED,pt,m),nt.on(y.A.METRIC_ADDED,G,m),nt.on(y.A.QUALITY_CHANGE_REQUESTED,rt,m),m}g.__dashjs_factory_name="L2ARule",Lt.A=u.A.getClassFactory(g)},549:function(ve,Lt,M){var ct=M(5742),I=M(4413),u=M(5066);function n(){var _,y,i=this.context;return _={getMaxIndex:function(h){for(var g=h?h.getSwitchHistory():null,r=g?g.getSwitchRequests():[],m=0,d=0,T=0,q=(0,u.A)(i).create(),W=0;W<r.length;W++)if(r[W]!==void 0&&(m+=r[W].drops,d+=r[W].noDrops,T+=r[W].dropSize,m+d>=6&&m/d>.075)){q.quality=W>0&&r[W].drops>0?W-1:W,q.reason={index:q.quality,drops:m,noDrops:d,dropSize:T},y.debug("Switch history rule index: "+q.quality+" samples: "+(m+d)+" drops: "+m);break}return q}},y=(0,I.A)(i).getInstance().getLogger(_),_}n.__dashjs_factory_name="SwitchHistoryRule",Lt.A=ct.A.getClassFactory(n)},1499:function(ve,Lt,M){var ct=M(5742),I=M(5066),u=M(7256),n=M(1991);function _(y){y=y||{};var i=this.context,h=y.dashMetrics;return{getMaxIndex:function(g){var r=(0,I.A)(i).create();if(!(g&&g.hasOwnProperty("getMediaInfo")&&g.hasOwnProperty("getMediaType")&&g.hasOwnProperty("useBufferOccupancyABR")&&g.hasOwnProperty("getAbrController")&&g.hasOwnProperty("getScheduleController")))return r;(function(){if(!h||!h.hasOwnProperty("getCurrentBufferState"))throw new Error(u.A.MISSING_CONFIG_ERROR)})();var m=g.getMediaInfo(),d=g.getMediaType(),T=h.getCurrentBufferState(d),q=g.getScheduleController(),W=g.getAbrController(),x=g.getStreamInfo(),nt=x?x.id:null,O=x&&x.manifestInfo?x.manifestInfo.isDynamic:null,J=W.getThroughputHistory(),pt=J.getSafeAverageThroughput(d,O),G=J.getAverageLatency(d),X=g.useBufferOccupancyABR();return isNaN(pt)||!T||X||W.getAbandonmentStateFor(nt,d)!==n.A.ABANDON_LOAD&&(T.state===n.A.BUFFER_LOADED||O)&&(r.quality=W.getQualityForBitrate(m,pt,nt,G),q.setTimeToLoadDelay(0),r.reason={throughput:pt,latency:G}),r},reset:function(){}}}_.__dashjs_factory_name="ThroughputRule",Lt.A=ct.A.getClassFactory(_)},5892:function(ve,Lt,M){var ct=M(5742),I=M(4413);function u(){var n,_,y,i,h,g,r,m,d,T=this.context;function q(){y=null,i=1,h=100,g=0,r=null,m=null,d="dynamic_weight_selection"}function W(){var pt=0;if(y)for(var G=0;G<y.length;G++){var X=y[G];X.state.throughput>pt&&(pt=X.state.throughput)}return pt}function x(pt,G,X){var rt=pt.map(function(bt,Ut){return X[Ut]*Math.pow(bt-G[Ut],2)}).reduce(function(bt,Ut){return bt+Ut});return(rt<0?-1:1)*Math.sqrt(Math.abs(rt))}function nt(pt,G){return x([pt.state.throughput,pt.state.latency,pt.state.rebuffer,pt.state.switch],[G.state.throughput,G.state.latency,G.state.rebuffer,G.state.switch],[1,1,1,1])}function O(pt,G,X){for(var rt=0;rt<G.length;rt++){var bt=G[rt],Ut=nt(bt,pt);J(bt,X,Math.exp(-1*Math.pow(Ut,2)/(2*Math.pow(.1,2))))}}function J(pt,G,X){var rt=pt.state,bt=[.01,.01,.01,.01];rt.throughput=rt.throughput+(G[0]-rt.throughput)*bt[0]*X,rt.latency=rt.latency+(G[1]-rt.latency)*bt[1]*X,rt.rebuffer=rt.rebuffer+(G[2]-rt.rebuffer)*bt[2]*X,rt.switch=rt.switch+(G[3]-rt.switch)*bt[3]*X}return n={getNextQuality:function(pt,G,X,rt,bt,Ut,mt){var lt=X,jt=rt,St=G,Nt=function(D){if(!y){y=[];var Bt=D.bitrateList,Dt=[];g=Bt[0].bandwidth,Bt.forEach(function(Yt){Dt.push(Yt.bandwidth),Yt.bandwidth<g&&(g=Yt.bandwidth)}),_t=Dt.map(function(Yt){return Math.pow(Yt,2)}).reduce(function(Yt,Vt){return Yt+Vt}),i=Math.sqrt(_t);for(var At=0;At<Bt.length;At++){var Rt={qualityIndex:At,bitrate:Bt[At].bandwidth,state:{throughput:Bt[At].bandwidth/i,latency:0,rebuffer:0,switch:0}};y.push(Rt)}m=function(Yt){var Vt=[],Xt=function(hr){for(var sr=[],gr=0;gr<hr;gr++){var kr=[Math.random()*W(),Math.random(),Math.random(),Math.random()];sr.push(kr)}return sr}(Math.pow(Yt.length,2));Vt.push(Xt[0]);for(var ne=[1,1,1,1],Te=1;Te<Yt.length;Te++){for(var me=null,Ue=null,Me=0;Me<Xt.length;Me++){for(var ze=Xt[Me],Qe=null,nn=0;nn<Vt.length;nn++){var yn=x(ze,Vt[nn],ne);(Qe===null||yn<Qe)&&(Qe=yn)}(Ue===null||Qe>Ue)&&(me=ze,Ue=Qe)}Vt.push(me)}for(var xn=null,Yn=null,An=0;An<Vt.length;An++){for(var Un=0,Sn=0;Sn<Vt.length;Sn++)An!==Sn&&(Un+=x(Vt[An],Vt[Sn],ne));(xn===null||Un>xn)&&(xn=Un,Yn=An)}var kn=[];for(kn.push(Vt[Yn]),Vt.splice(Yn,1);Vt.length>0;){for(var Hn=null,Kn=null,pr=0;pr<Vt.length;pr++){var Nr=x(kn[0],Vt[pr],ne);(Hn===null||Nr<Hn)&&(Hn=Nr,Kn=pr)}kn.push(Vt[Kn]),Vt.splice(Kn,1)}return kn}(y)}var _t;return y}(pt),Ht=G/i;Ht>1&&(Ht=W()),X/=h,_.debug("getNextQuality called throughput:".concat(Ht," latency:").concat(X," bufferSize:").concat(rt," currentQualityIndex:").concat(Ut," playbackRate:").concat(bt));var ie=Nt[Ut],It=ie.bitrate*mt.getSegmentDuration()/St,Ot=Math.max(0,It-jt);if(jt-It<mt.getMinBuffer())return _.debug("Buffer is low for bitrate= ".concat(ie.bitrate," downloadTime=").concat(It," currentBuffer=").concat(jt," rebuffer=").concat(Ot)),function(D,Bt){var Dt=0,At=D;if(y)for(var Rt=0;Rt<y.length;Rt++){var _t=y[Rt];_t.bitrate<D.bitrate&&_t.bitrate>Dt&&Bt>_t.bitrate&&(Dt=_t.bitrate,At=_t)}return At}(ie,St).qualityIndex;switch(d){case"manual_weight_selection":r=[.4,.4,.4,.4];break;case"random_weight_selection":(function(D){r=function(Bt){for(var Dt=[],At=Math.sqrt(2/Bt),Rt=0;Rt<4;Rt++)Dt.push(Math.random()*At);return r=Dt}(D.length)})(Nt);break;default:(function(D,Bt,Dt,At,Rt,_t,Yt){r||(r=m[m.length-1]);var Vt=D.findWeightVector(Bt,Dt,At,Rt,_t,Yt);Vt!==null&&Vt!==-1&&(r=Vt)})(mt,Nt,lt,jt,Ot,St,bt)}for(var fe=null,Ae=null,Re=null,Pe=0;Pe<Nt.length;Pe++){var tt=Nt[Pe],at=tt.state,qt=[at.throughput,at.latency,at.rebuffer,at.switch],v=r.slice(),A=mt.getNextBufferWithBitrate(tt.bitrate,jt,St),c=A<mt.getMinBuffer();c&&_.debug("Buffer is low for bitrate=".concat(tt.bitrate," downloadTime=").concat(It," currentBuffer=").concat(jt," nextBuffer=").concat(A)),(tt.bitrate>G-1e4||c)&&tt.bitrate!==g&&(v[0]=100);var E=x(qt,[Ht,0,0,0],v);(fe===null||E<fe)&&(fe=E,Ae=tt.qualityIndex,Re=tt)}var Q=Math.abs(ie.bitrate-Re.bitrate)/i;return O(ie,Nt,[Ht,X,Ot,Q]),O(Re,Nt,[Ht,0,0,Q]),Ae},reset:function(){q()}},_=(0,I.A)(T).getInstance().getLogger(n),q(),n}u.__dashjs_factory_name="LearningAbrController",Lt.A=ct.A.getClassFactory(u)},8692:function(ve,Lt,M){var ct=M(5742),I=M(7202);function u(){var n,_,y,i,h;function g(){_=null,y=null,i=null,h=null}function r(d,T,q,W){var x=new I.A;return x.type=d,x.weights.bitrateReward=T||1,x.weights.bitrateSwitchPenalty=1,x.weights.rebufferPenalty=q||1e3,x.weights.latencyPenalty=[],x.weights.latencyPenalty.push({threshold:1.1,penalty:.05*W}),x.weights.latencyPenalty.push({threshold:1e8,penalty:.1*q}),x.weights.playbackSpeedPenalty=W||200,x}function m(d,T,q,W,x){x.bitrateWSum+=x.weights.bitrateReward*d,x.lastBitrate&&(x.bitrateSwitchWSum+=x.weights.bitrateSwitchPenalty*Math.abs(d-x.lastBitrate)),x.lastBitrate=d,x.rebufferWSum+=x.weights.rebufferPenalty*T;for(var nt=0;nt<x.weights.latencyPenalty.length;nt++){var O=x.weights.latencyPenalty[nt];if(q<=O.threshold){x.latencyWSum+=O.penalty*q;break}}x.playbackSpeedWSum+=x.weights.playbackSpeedPenalty*Math.abs(1-W),x.totalQoe=x.bitrateWSum-x.bitrateSwitchWSum-x.rebufferWSum-x.latencyWSum-x.playbackSpeedWSum}return n={setupPerSegmentQoe:function(d,T,q){_=r("segment",d,T,q),y=d,i=T,h=q},logSegmentMetrics:function(d,T,q,W){_&&m(d,T,q,W,_)},getPerSegmentQoe:function(){return _},calculateSingleUseQoe:function(d,T,q,W){var x=null;return y&&i&&h&&(x=r("segment",y,i,h)),x?(m(d,T,q,W,x),x.totalQoe):0},reset:function(){g()}},g(),n}u.__dashjs_factory_name="LoLpQoeEvaluator",Lt.A=ct.A.getClassFactory(u)},6050:function(ve,Lt,M){var ct=M(4413),I=M(5742),u=M(5892),n=M(8692),_=M(5066),y=M(1991),i=M(3173),h=M(7256);function g(r){var m,d,T,q,W=(r=r||{}).dashMetrics,x=this.context;return d={getMaxIndex:function(nt){try{var O=(0,_.A)(x).create(),J=nt.getMediaInfo().type,pt=nt.getAbrController(),G=nt.getStreamInfo(),X=pt.getQualityFor(J,G.id),rt=nt.getMediaInfo(),bt=W.getCurrentBufferState(J),Ut=nt.getScheduleController(),mt=W.getCurrentBufferLevel(J,!0),lt=G&&G.manifestInfo?G.manifestInfo.isDynamic:null,jt=Ut.getPlaybackController(),St=jt.getCurrentLiveLatency();if(!nt.useLoLPABR()||J===h.A.AUDIO)return O;St||(St=0);var Nt=jt.getPlaybackRate(),Ht=pt.getThroughputHistory().getSafeAverageThroughput(J,lt);if(m.debug("Throughput ".concat(Math.round(Ht)," kbps")),isNaN(Ht)||!bt||pt.getAbandonmentStateFor(G.id,J)===y.A.ABANDON_LOAD)return O;for(var ie=rt.bitrateList,It=nt.getRepresentationInfo().fragmentDuration,Ot=ie[0].bandwidth/1e3,fe=ie[ie.length-1].bandwidth/1e3,Ae=0;Ae<ie.length;Ae++){var Re=ie[Ae].bandwidth/1e3;Re>fe?fe=Re:Re<Ot&&(Ot=Re)}var Pe=ie[X].bandwidth/1e3,tt=W.getCurrentHttpRequest(J,!0),at=(tt.tresponse.getTime()-tt.trequest.getTime())/1e3,qt=at>It?at-It:0;q.setupPerSegmentQoe(It,fe,Ot),q.logSegmentMetrics(Pe,qt,St,Nt);var v=(0,i.A)(x).create({targetLatency:1.5,bufferMin:.3,segmentDuration:It,qoeEvaluator:q});return O.quality=T.getNextQuality(rt,1e3*Ht,St,mt,Nt,X,v),O.reason={throughput:Ht,latency:St},O.priority=_.A.PRIORITY.STRONG,Ut.setTimeToLoadDelay(0),O.quality!==X&&m.debug("[TgcLearningRule]["+J+"] requesting switch to index: ",O.quality,"Average throughput",Math.round(Ht),"kbps"),O}catch(A){throw A}},reset:function(){T.reset(),q.reset()}},m=(0,ct.A)(x).getInstance().getLogger(d),T=(0,u.A)(x).create(),q=(0,n.A)(x).create(),d}g.__dashjs_factory_name="LoLPRule",Lt.A=I.A.getClassFactory(g)},3173:function(ve,Lt,M){var ct=M(5742);function I(u){var n,_,y,i,h,g,r=u.targetLatency,m=u.bufferMin,d=u.segmentDuration,T=u.qoeEvaluator;function q(){return d}function W(x,nt){var O=q();return nt>O?x-O:x+O-nt}return n={getMinBuffer:function(){return m},getSegmentDuration:q,getNextBufferWithBitrate:function(x,nt,O){return W(nt,x*d/O)},getNextBuffer:W,findWeightVector:function(x,nt,O,J,pt,G){var X=null,rt=null,bt=null,Ut=Math.abs(nt-y);return x.forEach(function(mt){_.forEach(function(lt){lt[0];var jt=lt[1],St=lt[2],Nt=(lt[3],mt.bitrate*d/pt),Ht=W(O,Nt),ie=(St===0?10:1/St)*Math.max(1e-5,Nt-Ht),It=(jt===0?10:1/jt)*mt.state.latency,Ot=T.calculateSingleUseQoe(mt.bitrate,ie,It,G);(X===null||Ot>X)&&function(fe,Ae,Re){return!(fe>r+Re)&&Ae>=m}(nt,Ht,Ut)&&(X=Ot,rt=lt,bt=mt.bitrate)})}),rt===null&&bt===null&&(rt=-1),y=nt,rt}},h=(i=[.2,.4,.6,.8,1]).map(function(x){return[x]}),_=(g=function(x,nt,O){if(O===nt)return x;for(var J=x.length,pt=0;pt<J;pt++)for(var G=x.shift(),X=0;X<i.length;X++)x.push(G.concat(i[X]));return g(x,nt,O+1)})(h,4,1),y=0,n}I.__dashjs_factory_name="LoLpWeightSelector",Lt.A=ct.A.getClassFactory(I)},7202: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.type=null,this.lastBitrate=null,this.weights={},this.weights.bitrateReward=null,this.weights.bitrateSwitchPenalty=null,this.weights.rebufferPenalty=null,this.weights.latencyPenalty=null,this.weights.playbackSpeedPenalty=null,this.bitrateWSum=0,this.bitrateSwitchWSum=0,this.rebufferWSum=0,this.latencyWSum=0,this.playbackSpeedWSum=0,this.totalQoe=0});Lt.A=ct},6028:function(ve,Lt,M){M.d(Lt,{_:function(){return m}});var ct=M(7256),I=M(5810),u=M(5742),n=M(8584),_=M(2187),y=M(284),i=M(255),h=M(2930),g=M(2945),r=M(6849),m=["http://dashif.org/thumbnail_tile","http://dashif.org/guidelines/thumbnail_tile"];function d(T){var q,W,x,nt,O,J,pt,G,X=this.context,rt=T.adapter,bt=T.baseURLController,Ut=T.streamInfo,mt=T.timelineConverter,lt=T.debug,jt=T.eventBus,St=T.events,Nt=T.dashConstants,Ht=(0,_.A)(X).getInstance();function ie(Ot,fe){var Ae=new n.A;Ae.id=Ot.id,Ae.bitrate=Ot.bandwidth,Ae.width=Ot.width,Ae.height=Ot.height,Ae.tilesHor=1,Ae.tilesVert=1,Ot.essentialProperties&&Ot.essentialProperties.forEach(function(Re){if(m.indexOf(Re.schemeIdUri)>=0&&Re.value){var Pe=Re.value.split("x");Pe.length!==2||isNaN(Pe[0])||isNaN(Pe[1])||(Ae.tilesHor=parseInt(Pe[0],10),Ae.tilesVert=parseInt(Pe[1],10))}}),fe?J.updateSegmentData(Ot).then(function(Re){(function(Pe,tt,at){var qt=[],v=function(A,c){var E,Q,D,Bt,Dt=[],At=0;for(E=0,Q=A.segments.length;E<Q;E++)D=A.segments[E],(Bt=(0,y.W$)(mt,rt.getIsDynamic(),c,D.startTime,D.duration,D.timescale,D.media,D.mediaRange,At))&&(Dt.push(Bt),Bt=null,At++);return Dt}(at,tt);tt.segments=v,Pe.segmentDuration=tt.segments[0].duration,Pe.readThumbnail=function(A,c){var E=null;qt.some(function(Q){if(Q.start<=A&&Q.end>A)return E=Q.url,!0}),E?c(E):tt.segments.some(function(Q){if(Q.mediaStartTime<=A&&Q.mediaStartTime+Q.duration>A){var D=bt.resolve(tt.path);return pt.load({method:"get",url:D.url,request:{range:Q.mediaRange,responseType:"arraybuffer"},onload:function(Bt){var Dt=G.getSamplesInfo(Bt.target.response),At=new Blob([Bt.target.response.slice(Dt.sampleList[0].offset,Dt.sampleList[0].offset+Dt.sampleList[0].size)],{type:"image/jpeg"}),Rt=window.URL.createObjectURL(At);qt.push({start:Q.mediaStartTime,end:Q.mediaStartTime+Q.duration,url:Rt}),c&&c(Rt)}}),!0}})}})(Ae,Ot,Re)}):(Ae.startNumber=Ot.startNumber,Ae.segmentDuration=Ot.segmentDuration,Ae.timescale=Ot.timescale,Ae.templateUrl=function(Re){var Pe=Ht.isRelative(Re.media)?Ht.resolve(Re.media,bt.resolve(Re.path).url):Re.media;return Pe?(0,y.dD)(Pe,Re.id):""}(Ot)),Ae.tilesHor>0&&Ae.tilesVert>0&&(Ae.widthPerTile=Ae.width/Ae.tilesHor,Ae.heightPerTile=Ae.height/Ae.tilesVert,W.push(Ae))}function It(){W=[],nt=-1,O=null}return q={getTracks:function(){return W},addTracks:function(){if(Ut&&rt&&(O=rt.getMediaInfoForType(Ut,ct.A.IMAGE))){var Ot=rt.getVoRepresentations(O);Ot&&Ot.length>0&&Ot.forEach(function(fe){(fe.segmentInfoType===I.A.SEGMENT_TEMPLATE&&fe.segmentDuration>0&&fe.media||fe.segmentInfoType===I.A.SEGMENT_TIMELINE)&&ie(fe),fe.segmentInfoType===I.A.SEGMENT_BASE&&ie(fe,!0)}),W.length>0&&W.sort(function(fe,Ae){return fe.bitrate-Ae.bitrate})}},reset:It,setTrackByIndex:function(Ot){W&&W.length!==0&&(Ot>=W.length&&(Ot=W.length-1),nt=Ot)},getCurrentTrack:function(){return nt<0?null:W[nt]},getCurrentTrackIndex:function(){return nt},getThumbnailRequestForTime:function(Ot){for(var fe,Ae=rt.getVoRepresentations(O),Re=0;Re<Ae.length;Re++)if(W[nt].id===Ae[Re].id){fe=Ae[Re];break}return x.getSegmentRequestForTime(O,fe,Ot)}},It(),pt=(0,h.A)(X).create({}),G=(0,i.A)(X).getInstance(),J=(0,r.A)(X).create({events:St,eventBus:jt,streamInfo:Ut,timelineConverter:mt,dashConstants:Nt,dashMetrics:T.dashMetrics,segmentBaseController:T.segmentBaseController,type:ct.A.IMAGE}),(x=(0,g.A)(X).create({streamInfo:Ut,type:ct.A.IMAGE,timelineConverter:mt,segmentsController:J,baseURLController:bt,debug:lt,eventBus:jt,events:St,dashConstants:Nt,urlUtils:Ht})).initialize(!!rt&&rt.getIsDynamic()),q}d.__dashjs_factory_name="ThumbnailTracks",Lt.A=u.A.getClassFactory(d)},255:function(ve,Lt,M){var ct=M(4413),I=M(246),u=M(5742),n=M(8667),_=M(1465);function y(){var i,h,g=this.context;function r(T){if(!T)return null;T.fileStart===void 0&&(T.fileStart=0);var q=n.parseBuffer(T),W=(0,I.A)(g).create();return W.setData(q),W}function m(T,q){return T[q+3]>>>0|T[q+2]<<8>>>0|T[q+1]<<16>>>0|T[q]<<24>>>0}function d(T,q){return String.fromCharCode(T[q++])+String.fromCharCode(T[q++])+String.fromCharCode(T[q++])+String.fromCharCode(T[q])}return h={parse:r,findLastTopIsoBoxCompleted:function(T,q,W){if(W===void 0&&(W=0),!q||W+8>=q.byteLength)return new _.A(0,!1);for(var x,nt=q instanceof ArrayBuffer?new Uint8Array(q):q,O=0;W<nt.byteLength;){var J=m(nt,W),pt=d(nt,W+4);if(J===0)break;W+J<=nt.byteLength&&(T.indexOf(pt)>=0?x=new _.A(W,!0,J):O=W+J),W+=J}return x||new _.A(O,!1)},getMediaTimescaleFromMoov:function(T){var q=r(T),W=q?q.getBox("mdhd"):void 0;return W?W.timescale:NaN},getSamplesInfo:function(T){if(!T||T.byteLength===0)return{sampleList:[],lastSequenceNumber:NaN,totalDuration:NaN,numSequences:NaN};var q,W,x,nt,O,J,pt,G,X,rt,bt,Ut,mt,lt,jt,St,Nt=r(T),Ht=Nt.getBoxes("moof"),ie=Nt.getBoxes("mfhd");jt=Nt.getBoxes("moof").length,lt=ie[ie.length-1].sequence_number,W=0,O=[];var It=-1,Ot=-1;for(rt=0;rt<Ht.length;rt++){var fe=Ht[rt],Ae=fe.getChildBoxes("traf");for(G=0;G<Ae.length;G++){var Re=Ae[G],Pe=Re.getChildBox("tfhd"),tt=Re.getChildBox("tfdt");nt=tt.baseMediaDecodeTime;var at=Re.getChildBoxes("trun"),qt=Re.getChildBoxes("subs");for(X=0;X<at.length;X++){var v=at[X];for(W=v.sample_count,mt=(Pe.base_data_offset||0)+(v.data_offset||0),pt=0;pt<W;pt++){q=(J=v.samples[pt]).sample_duration!==void 0?J.sample_duration:Pe.default_sample_duration,x=J.sample_size!==void 0?J.sample_size:Pe.default_sample_size;var A={dts:nt,cts:nt+(J.sample_composition_time_offset!==void 0?J.sample_composition_time_offset:0),duration:q,offset:fe.offset+mt,size:x,subSizes:[x]};if(qt)for(bt=0;bt<qt.length;bt++){var c=qt[bt];if(It<c.entry_count-1&&pt>Ot&&(It++,Ot+=c.entries[It].sample_delta),pt==Ot){A.subSizes=[];var E=c.entries[It];for(Ut=0;Ut<E.subsample_count;Ut++)A.subSizes.push(E.subsamples[Ut].subsample_size)}}O.push(A),mt+=x,nt+=q}}St=nt-tt.baseMediaDecodeTime}}return{sampleList:O,lastSequenceNumber:lt,totalDuration:St,numSequences:jt}},findInitRange:function(T){var q=null,W=r(T);if(!W)return q;var x=W.getBox("ftyp"),nt=W.getBox("moov");return i.debug("Searching for initialization."),nt&&nt.isComplete&&(q=(x?x.offset:nt.offset)+"-"+(nt.offset+nt.size-1),i.debug("Found the initialization. Range: "+q)),q},parsePayload:function(T,q,W){if(W===void 0&&(W=0),!q||W+8>=q.byteLength)return new _.A(0,!1);for(var x,nt=q instanceof ArrayBuffer?new Uint8Array(q):q,O=0;W<nt.byteLength;){var J=m(nt,W),pt=d(nt,W+4);if(J===0)break;W+J<=nt.byteLength&&(T.indexOf(pt)>=0?x=new _.A(W,!0,J,pt):O=W+J),W+=J}return x||new _.A(O,!1)}},i=(0,ct.A)(g).getInstance().getLogger(h),h}y.__dashjs_factory_name="BoxParser",Lt.A=u.A.getSingletonFactory(y)},6035:function(ve,Lt,M){M.d(Lt,{a:function(){return _}});var ct=M(5742),I=M(6028),u=M(7256),n=[{codec:"avc1",compatibleCodecs:["avc3"]},{codec:"avc3",compatibleCodecs:["avc1"]}];function _(){var i="ManagedMediaSource"in window,h="WebKitMediaSource"in window,g="MediaSource"in window;return i||h||g}function y(){var i,h,g;return i={setConfig:function(r){r&&r.settings&&(h=r.settings)},supportsMediaSource:_,supportsEncryptedMedia:function(){return g},supportsCodec:function(r,m){return m!==u.A.AUDIO&&m!==u.A.VIDEO?Promise.resolve(!0):function(d,T){return h.get().streaming.capabilities.useMediaCapabilitiesApi&&navigator.mediaCapabilities&&navigator.mediaCapabilities.decodingInfo&&(d.codec&&T===u.A.AUDIO||T===u.A.VIDEO&&d.codec&&d.width&&d.height&&d.bitrate&&d.framerate)}(r,m)?function(d,T){return new Promise(function(q){if(d&&d.codec){var W={type:"media-source"};W[T]={},W[T].contentType=d.codec,W[T].width=d.width,W[T].height=d.height,W[T].bitrate=parseInt(d.bitrate),W[T].framerate=parseFloat(d.framerate),navigator.mediaCapabilities.decodingInfo(W).then(function(x){q(x.supported)}).catch(function(){q(!1)})}else q(!1)})}(r,m):function(d){return new Promise(function(T){if(d&&d.codec){var q=d.codec;d.width&&d.height&&(q+=';width="'+d.width+'";height="'+d.height+'"'),"ManagedMediaSource"in window&&ManagedMediaSource.isTypeSupported(q)||"MediaSource"in window&&MediaSource.isTypeSupported(q)||"WebKitMediaSource"in window&&WebKitMediaSource.isTypeSupported(q)?T(!0):T(!1)}else T(!1)})}(r)},setEncryptedMediaSupported:function(r){g=r},supportsEssentialProperty:function(r){try{return I._.indexOf(r.schemeIdUri)!==-1||u.A.FONT_DOWNLOAD_DVB_SCHEME===r.schemeIdUri}catch{return!0}},codecRootCompatibleWithCodec:function(r,m){for(var d,T=r.split(".")[0],q=m.indexOf(T)===0,W=0;W<n.length;W++)if(n[W].codec===T){d=n[W];break}return d?q||d.compatibleCodecs.some(function(x){return m.indexOf(x)===0}):q}},g=!1,i}y.__dashjs_factory_name="Capabilities",Lt.A=ct.A.getSingletonFactory(y)},6877:function(ve,Lt,M){var ct=M(5742),I=M(7652);function u(){return{customTimeRangeArray:[],length:0,add:function(n,_){var y;for(y=0;y<this.customTimeRangeArray.length&&n>this.customTimeRangeArray[y].start;y++);for(this.customTimeRangeArray.splice(y,0,{start:n,end:_}),y=0;y<this.customTimeRangeArray.length-1;y++)this.mergeRanges(y,y+1)&&y--;this.length=this.customTimeRangeArray.length},clear:function(){this.customTimeRangeArray=[],this.length=0},remove:function(n,_){for(var y=0;y<this.customTimeRangeArray.length;y++)if(n<=this.customTimeRangeArray[y].start&&_>=this.customTimeRangeArray[y].end)this.customTimeRangeArray.splice(y,1),y--;else{if(n>this.customTimeRangeArray[y].start&&_<this.customTimeRangeArray[y].end){this.customTimeRangeArray.splice(y+1,0,{start:_,end:this.customTimeRangeArray[y].end}),this.customTimeRangeArray[y].end=n;break}n>this.customTimeRangeArray[y].start&&n<this.customTimeRangeArray[y].end?this.customTimeRangeArray[y].end=n:_>this.customTimeRangeArray[y].start&&_<this.customTimeRangeArray[y].end&&(this.customTimeRangeArray[y].start=_)}this.length=this.customTimeRangeArray.length},mergeRanges:function(n,_){var y=this.customTimeRangeArray[n],i=this.customTimeRangeArray[_];return y.start<=i.start&&i.start<=y.end&&y.end<=i.end?(y.end=i.end,this.customTimeRangeArray.splice(_,1),!0):i.start<=y.start&&y.start<=i.end&&i.end<=y.end?(y.start=i.start,this.customTimeRangeArray.splice(_,1),!0):i.start<=y.start&&y.start<=i.end&&y.end<=i.end?(this.customTimeRangeArray.splice(n,1),!0):y.start<=i.start&&i.start<=y.end&&i.end<=y.end&&(this.customTimeRangeArray.splice(_,1),!0)},start:function(n){return(0,I.zQ)(n),n>=this.customTimeRangeArray.length||n<0?NaN:this.customTimeRangeArray[n].start},end:function(n){return(0,I.zQ)(n),n>=this.customTimeRangeArray.length||n<0?NaN:this.customTimeRangeArray[n].end}}}u.__dashjs_factory_name="CustomTimeRanges",Lt.A=ct.A.getClassFactory(u)},206:function(ve,Lt,M){var ct=M(5742);function I(){var u,n=/^[a-z][a-z0-9+\-_.]*:/i,_=/^https?:\/\//i,y=/^https:\/\//i,i=/^([a-z][a-z0-9+\-_.]*:\/\/[^\/]+)\/?/i,h=function(x,nt){try{return new window.URL(x,nt).toString()}catch{return x}},g=function(x,nt){var O=r;if(!nt||!T(x))return x;q(x)&&(O=m),W(x)&&(O=d);var J=O(nt),pt=J.charAt(J.length-1)!=="/"&&x.charAt(0)!=="/"?"/":"";return[J,x].join(pt)};function r(x){var nt=x.indexOf("/"),O=x.lastIndexOf("/");return nt!==-1?O===nt+1?x:(x.indexOf("?")!==-1&&(x=x.substring(0,x.indexOf("?"))),x.substring(0,O+1)):""}function m(x){var nt=x.match(i);return nt?nt[1]:""}function d(x){var nt=x.match(n);return nt?nt[0]:""}function T(x){return!n.test(x)}function q(x){return T(x)&&x.charAt(0)==="/"}function W(x){return x.indexOf("//")===0}return function(){try{new window.URL("x","http://y"),u=h}catch{}finally{u=u||g}}(),{parseBaseUrl:r,parseOrigin:m,parseScheme:d,isRelative:T,isPathAbsolute:q,isSchemeRelative:W,isHTTPURL:function(x){return _.test(x)},isHTTPS:function(x){return y.test(x)},removeHostname:function(x){return/^(?:\w+\:\/\/)?([^\/]+)(.*)$/.exec(x)[2].substring(1)},resolve:function(x,nt){return u(x,nt)}}}I.__dashjs_factory_name="DefaultURLUtils",Lt.A=ct.A.getSingletonFactory(I)},246:function(ve,Lt,M){var ct=M(9705),I=M(5742);function u(){var n;function _(i){var h=[];if(!i||!n||typeof n.fetchAll!="function")return h;for(var g,r=n.fetchAll(i),m=0,d=r.length;m<d;m++)(g=y(r[m]))&&h.push(g);return h}function y(i){if(!i)return null;var h=new ct.A(i);return i.hasOwnProperty("_incomplete")&&(h.isComplete=!i._incomplete),h}return{getBox:function(i){return i&&n&&n.boxes&&n.boxes.length!==0&&typeof n.fetch=="function"?y(n.fetch(i)):null},getBoxes:_,setData:function(i){n=i},getLastBox:function(){if(!n||!n.boxes||!n.boxes.length)return null;var i=_(n.boxes[n.boxes.length-1].type);return i.length>0?i[i.length-1]:null}}}u.__dashjs_factory_name="IsoFile",Lt.A=I.A.getClassFactory(u)},9913:function(ve,Lt,M){M.d(Lt,{W:function(){return I}});var ct=M(5742);function I(n,_){var y={url:n.url,method:n.method,headers:Object.assign({},n.headers),credentials:n.withCredentials?"include":void 0,range:n.request.range};return Promise.resolve(_.modifyRequest(y)).then(function(){return Object.assign(n,y,{withCredentials:y.credentials==="include"})})}function u(){return{modifyRequest:null,modifyRequestURL:function(n){return n},modifyRequestHeader:function(n,_){return _.url,n}}}u.__dashjs_factory_name="RequestModifier",Lt.A=ct.A.getSingletonFactory(u)},7652:function(ve,Lt,M){M.d(Lt,{sq:function(){return u},zQ:function(){return n}});var ct=M(7256);function I(_){return I=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(y){return typeof y}:function(y){return y&&typeof Symbol=="function"&&y.constructor===Symbol&&y!==Symbol.prototype?"symbol":typeof y},I(_)}function u(_,y){if(I(_)!==y)throw ct.A.BAD_ARGUMENT_ERROR}function n(_){if(_===null||isNaN(_)||_%1!=0)throw ct.A.BAD_ARGUMENT_ERROR+" : argument is not an integer"}},2187:function(ve,Lt,M){var ct=M(5742),I=M(206);function u(){var _,y=[],i=this.context;function h(g,r,m){var d=function(T){var q;for(q=0;q<y.length;q++)if(y[q].regex.test(T))return y[q].utils;return _}(m||r);return d&&typeof d[g]=="function"?d[g](r,m):_[g](r,m)}return _=(0,I.A)(i).getInstance(),{registerUrlRegex:function(g,r){y.push({regex:g,utils:r})},parseBaseUrl:function(g){return h("parseBaseUrl",g)},parseOrigin:function(g){return h("parseOrigin",g)},parseScheme:function(g){return h("parseScheme",g)},isRelative:function(g){return h("isRelative",g)},isPathAbsolute:function(g){return h("isPathAbsolute",g)},isSchemeRelative:function(g){return h("isSchemeRelative",g)},isHTTPURL:function(g){return h("isHTTPURL",g)},isHTTPS:function(g){return h("isHTTPS",g)},removeHostname:function(g){return h("removeHostname",g)},resolve:function(g,r){return h("resolve",g,r)}}}u.__dashjs_factory_name="URLUtils";var n=ct.A.getSingletonFactory(u);Lt.A=n},8324:function(ve,Lt){function M(I,u,n){return Object.defineProperty(I,"prototype",{writable:!1}),I}var ct=M(function I(u,n,_){(function(y,i){if(!(y instanceof i))throw new TypeError("Cannot call a class as a function")})(this,I),this.code=u||null,this.message=n||null,this.data=_||null});Lt.A=ct},2686:function(ve,Lt,M){var ct=M(2756);function I(y){return I=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},I(y)}function u(y,i){for(var h=0;h<i.length;h++){var g=i[h];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(y,n(g.key),g)}}function n(y){var i=function(h){if(I(h)!="object"||!h)return h;var g=h[Symbol.toPrimitive];if(g!==void 0){var r=g.call(h,"string");if(I(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(h)}(y);return I(i)=="symbol"?i:i+""}var _=function(){return y=function h(g){(function(r,m){if(!(r instanceof m))throw new TypeError("Cannot call a class as a function")})(this,h),this.action=h.ACTION_DOWNLOAD,this.startTime=NaN,this.mediaStartTime=NaN,this.mediaType=null,this.mediaInfo=null,this.type=null,this.duration=NaN,this.timescale=NaN,this.range=null,this.url=g||null,this.serviceLocation=null,this.requestStartDate=null,this.firstByteDate=null,this.requestEndDate=null,this.quality=NaN,this.index=NaN,this.availabilityStartTime=null,this.availabilityEndTime=null,this.wallStartTime=null,this.bytesLoaded=NaN,this.bytesTotal=NaN,this.delayLoadingTime=NaN,this.responseType="arraybuffer",this.representationId=null},(i=[{key:"isInitializationRequest",value:function(){return this.type&&this.type===ct.G.INIT_SEGMENT_TYPE}},{key:"setInfo",value:function(h){this.type=h&&h.init?ct.G.INIT_SEGMENT_TYPE:ct.G.MEDIA_SEGMENT_TYPE,this.url=h&&h.url?h.url:null,this.range=h&&h.range?h.range.start+"-"+h.range.end:null,this.mediaType=h&&h.mediaType?h.mediaType:null}}])&&u(y.prototype,i),Object.defineProperty(y,"prototype",{writable:!1}),y;var y,i}();_.ACTION_DOWNLOAD="download",_.ACTION_COMPLETE="complete",Lt.A=_},9705: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(i){if(function(q,W){if(!(q instanceof W))throw new TypeError("Cannot call a class as a function")}(this,y),this.offset=i._offset,this.type=i.type,this.size=i.size,this.boxes=[],i.boxes)for(var h=0;h<i.boxes.length;h++)this.boxes.push(new y(i.boxes[h]));switch(this.isComplete=!0,i.type){case"sidx":if(this.timescale=i.timescale,this.earliest_presentation_time=i.earliest_presentation_time,this.first_offset=i.first_offset,this.references=i.references,i.references){this.references=[];for(var g=0;g<i.references.length;g++){var r={reference_type:i.references[g].reference_type,referenced_size:i.references[g].referenced_size,subsegment_duration:i.references[g].subsegment_duration};this.references.push(r)}}break;case"emsg":this.id=i.id,this.version=i.version===1?1:0,this.value=i.value,this.timescale=i.timescale,this.scheme_id_uri=i.scheme_id_uri,this.presentation_time_delta=i.version===1?i.presentation_time:i.presentation_time_delta,this.event_duration=i.event_duration,this.message_data=i.message_data;break;case"mdhd":this.timescale=i.timescale;break;case"mfhd":this.sequence_number=i.sequence_number;break;case"subs":this.entry_count=i.entry_count,this.entries=i.entries;break;case"tfhd":this.base_data_offset=i.base_data_offset,this.sample_description_index=i.sample_description_index,this.default_sample_duration=i.default_sample_duration,this.default_sample_size=i.default_sample_size,this.default_sample_flags=i.default_sample_flags,this.flags=i.flags;break;case"tfdt":this.version=i.version,this.baseMediaDecodeTime=i.baseMediaDecodeTime,this.flags=i.flags;break;case"trun":if(this.sample_count=i.sample_count,this.first_sample_flags=i.first_sample_flags,this.data_offset=i.data_offset,this.flags=i.flags,this.samples=i.samples,i.samples){this.samples=[];for(var m=0,d=i.samples.length;m<d;m++){var T={sample_size:i.samples[m].sample_size,sample_duration:i.samples[m].sample_duration,sample_composition_time_offset:i.samples[m].sample_composition_time_offset};this.samples.push(T)}}break;case"prft":this.version=i.version,this.reference_track_ID=i.reference_track_ID,this.ntp_timestamp_sec=i.ntp_timestamp_sec,this.ntp_timestamp_frac=i.ntp_timestamp_frac,this.media_time=i.media_time,this.flags=i.flags}},(_=[{key:"getChildBox",value:function(y){for(var i=0;i<this.boxes.length;i++)if(this.boxes[i].type===y)return this.boxes[i]}},{key:"getChildBoxes",value:function(y){for(var i=[],h=0;h<this.boxes.length;h++)this.boxes[h].type===y&&i.push(this.boxes[h]);return i}}])&&ct(n.prototype,_),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,_}();Lt.A=u},1465:function(ve,Lt){function M(I,u,n){return Object.defineProperty(I,"prototype",{writable:!1}),I}var ct=M(function I(u,n,_){(function(y,i){if(!(y instanceof i))throw new TypeError("Cannot call a class as a function")})(this,I),this.lastCompletedOffset=u,this.found=n,this.size=_});Lt.A=ct},8584: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.bitrate=0,this.width=0,this.height=0,this.tilesHor=0,this.tilesVert=0,this.widthPerTile=0,this.heightPerTile=0,this.startNumber=0,this.segmentDuration=0,this.timescale=0,this.templateUrl="",this.id=""});Lt.A=ct},2756:function(ve,Lt,M){function ct(_,y,i){return Object.defineProperty(_,"prototype",{writable:!1}),_}function I(_,y){if(!(_ instanceof y))throw new TypeError("Cannot call a class as a function")}M.d(Lt,{G:function(){return u},N:function(){return n}});var u=ct(function _(){I(this,_),this.tcpid=null,this.type=null,this.url=null,this.actualurl=null,this.range=null,this.trequest=null,this.tresponse=null,this.responsecode=null,this.interval=null,this.trace=[],this.cmsd=null,this._stream=null,this._tfinish=null,this._mediaduration=null,this._quality=null,this._responseHeaders=null,this._serviceLocation=null,this._fileLoaderType=null}),n=ct(function _(){I(this,_),this.s=null,this.d=null,this.b=[]});u.GET="GET",u.HEAD="HEAD",u.MPD_TYPE="MPD",u.XLINK_EXPANSION_TYPE="XLinkExpansion",u.INIT_SEGMENT_TYPE="InitializationSegment",u.INDEX_SEGMENT_TYPE="IndexSegment",u.MEDIA_SEGMENT_TYPE="MediaSegment",u.BITSTREAM_SWITCHING_SEGMENT_TYPE="BitstreamSwitchingSegment",u.MSS_FRAGMENT_INFO_SEGMENT_TYPE="FragmentInfoSegment",u.DVB_REPORTING_TYPE="DVBReporting",u.LICENSE="license",u.CONTENT_STEERING_TYPE="ContentSteering",u.OTHER_TYPE="other"},2541:function(ve,Lt){Lt.byteLength=function(i){var h=_(i),g=h[0],r=h[1];return 3*(g+r)/4-r},Lt.toByteArray=function(i){var h,g,r=_(i),m=r[0],d=r[1],T=new I(function(x,nt,O){return 3*(nt+O)/4-O}(0,m,d)),q=0,W=d>0?m-4:m;for(g=0;g<W;g+=4)h=ct[i.charCodeAt(g)]<<18|ct[i.charCodeAt(g+1)]<<12|ct[i.charCodeAt(g+2)]<<6|ct[i.charCodeAt(g+3)],T[q++]=h>>16&255,T[q++]=h>>8&255,T[q++]=255&h;return d===2&&(h=ct[i.charCodeAt(g)]<<2|ct[i.charCodeAt(g+1)]>>4,T[q++]=255&h),d===1&&(h=ct[i.charCodeAt(g)]<<10|ct[i.charCodeAt(g+1)]<<4|ct[i.charCodeAt(g+2)]>>2,T[q++]=h>>8&255,T[q++]=255&h),T},Lt.fromByteArray=function(i){for(var h,g=i.length,r=g%3,m=[],d=16383,T=0,q=g-r;T<q;T+=d)m.push(y(i,T,T+d>q?q:T+d));return r===1?(h=i[g-1],m.push(M[h>>2]+M[h<<4&63]+"==")):r===2&&(h=(i[g-2]<<8)+i[g-1],m.push(M[h>>10]+M[h>>4&63]+M[h<<2&63]+"=")),m.join("")};for(var M=[],ct=[],I=typeof Uint8Array<"u"?Uint8Array:Array,u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n=0;n<64;++n)M[n]=u[n],ct[u.charCodeAt(n)]=n;function _(i){var h=i.length;if(h%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var g=i.indexOf("=");return g===-1&&(g=h),[g,g===h?0:4-g%4]}function y(i,h,g){for(var r,m,d=[],T=h;T<g;T+=3)r=(i[T]<<16&16711680)+(i[T+1]<<8&65280)+(255&i[T+2]),d.push(M[(m=r)>>18&63]+M[m>>12&63]+M[m>>6&63]+M[63&m]);return d.join("")}ct[45]=62,ct[95]=63},4910:function(ve,Lt,M){var ct=M(2541),I=M(5156),u=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;Lt.Buffer=y,Lt.SlowBuffer=function(v){return+v!=v&&(v=0),y.alloc(+v)},Lt.INSPECT_MAX_BYTES=50;var n=2147483647;function _(v){if(v>n)throw new RangeError('The value "'+v+'" is invalid for option "size"');var A=new Uint8Array(v);return Object.setPrototypeOf(A,y.prototype),A}function y(v,A,c){if(typeof v=="number"){if(typeof A=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return g(v)}return i(v,A,c)}function i(v,A,c){if(typeof v=="string")return function(D,Bt){if(typeof Bt=="string"&&Bt!==""||(Bt="utf8"),!y.isEncoding(Bt))throw new TypeError("Unknown encoding: "+Bt);var Dt=0|T(D,Bt),At=_(Dt),Rt=At.write(D,Bt);return Rt!==Dt&&(At=At.slice(0,Rt)),At}(v,A);if(ArrayBuffer.isView(v))return function(D){if(tt(D,Uint8Array)){var Bt=new Uint8Array(D);return m(Bt.buffer,Bt.byteOffset,Bt.byteLength)}return r(D)}(v);if(v==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof v);if(tt(v,ArrayBuffer)||v&&tt(v.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(tt(v,SharedArrayBuffer)||v&&tt(v.buffer,SharedArrayBuffer)))return m(v,A,c);if(typeof v=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var E=v.valueOf&&v.valueOf();if(E!=null&&E!==v)return y.from(E,A,c);var Q=function(D){if(y.isBuffer(D)){var Bt=0|d(D.length),Dt=_(Bt);return Dt.length===0||D.copy(Dt,0,0,Bt),Dt}return D.length!==void 0?typeof D.length!="number"||at(D.length)?_(0):r(D):D.type==="Buffer"&&Array.isArray(D.data)?r(D.data):void 0}(v);if(Q)return Q;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof v[Symbol.toPrimitive]=="function")return y.from(v[Symbol.toPrimitive]("string"),A,c);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof v)}function h(v){if(typeof v!="number")throw new TypeError('"size" argument must be of type number');if(v<0)throw new RangeError('The value "'+v+'" is invalid for option "size"')}function g(v){return h(v),_(v<0?0:0|d(v))}function r(v){for(var A=v.length<0?0:0|d(v.length),c=_(A),E=0;E<A;E+=1)c[E]=255&v[E];return c}function m(v,A,c){if(A<0||v.byteLength<A)throw new RangeError('"offset" is outside of buffer bounds');if(v.byteLength<A+(c||0))throw new RangeError('"length" is outside of buffer bounds');var E;return E=A===void 0&&c===void 0?new Uint8Array(v):c===void 0?new Uint8Array(v,A):new Uint8Array(v,A,c),Object.setPrototypeOf(E,y.prototype),E}function d(v){if(v>=n)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+n.toString(16)+" bytes");return 0|v}function T(v,A){if(y.isBuffer(v))return v.length;if(ArrayBuffer.isView(v)||tt(v,ArrayBuffer))return v.byteLength;if(typeof v!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof v);var c=v.length,E=arguments.length>2&&arguments[2]===!0;if(!E&&c===0)return 0;for(var Q=!1;;)switch(A){case"ascii":case"latin1":case"binary":return c;case"utf8":case"utf-8":return Ae(v).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*c;case"hex":return c>>>1;case"base64":return Re(v).length;default:if(Q)return E?-1:Ae(v).length;A=(""+A).toLowerCase(),Q=!0}}function q(v,A,c){var E=!1;if((A===void 0||A<0)&&(A=0),A>this.length||((c===void 0||c>this.length)&&(c=this.length),c<=0)||(c>>>=0)<=(A>>>=0))return"";for(v||(v="utf8");;)switch(v){case"hex":return jt(this,A,c);case"utf8":case"utf-8":return bt(this,A,c);case"ascii":return mt(this,A,c);case"latin1":case"binary":return lt(this,A,c);case"base64":return rt(this,A,c);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return St(this,A,c);default:if(E)throw new TypeError("Unknown encoding: "+v);v=(v+"").toLowerCase(),E=!0}}function W(v,A,c){var E=v[A];v[A]=v[c],v[c]=E}function x(v,A,c,E,Q){if(v.length===0)return-1;if(typeof c=="string"?(E=c,c=0):c>2147483647?c=2147483647:c<-2147483648&&(c=-2147483648),at(c=+c)&&(c=Q?0:v.length-1),c<0&&(c=v.length+c),c>=v.length){if(Q)return-1;c=v.length-1}else if(c<0){if(!Q)return-1;c=0}if(typeof A=="string"&&(A=y.from(A,E)),y.isBuffer(A))return A.length===0?-1:nt(v,A,c,E,Q);if(typeof A=="number")return A&=255,typeof Uint8Array.prototype.indexOf=="function"?Q?Uint8Array.prototype.indexOf.call(v,A,c):Uint8Array.prototype.lastIndexOf.call(v,A,c):nt(v,[A],c,E,Q);throw new TypeError("val must be string, number or Buffer")}function nt(v,A,c,E,Q){var D,Bt=1,Dt=v.length,At=A.length;if(E!==void 0&&((E=String(E).toLowerCase())==="ucs2"||E==="ucs-2"||E==="utf16le"||E==="utf-16le")){if(v.length<2||A.length<2)return-1;Bt=2,Dt/=2,At/=2,c/=2}function Rt(Xt,ne){return Bt===1?Xt[ne]:Xt.readUInt16BE(ne*Bt)}if(Q){var _t=-1;for(D=c;D<Dt;D++)if(Rt(v,D)===Rt(A,_t===-1?0:D-_t)){if(_t===-1&&(_t=D),D-_t+1===At)return _t*Bt}else _t!==-1&&(D-=D-_t),_t=-1}else for(c+At>Dt&&(c=Dt-At),D=c;D>=0;D--){for(var Yt=!0,Vt=0;Vt<At;Vt++)if(Rt(v,D+Vt)!==Rt(A,Vt)){Yt=!1;break}if(Yt)return D}return-1}function O(v,A,c,E){c=Number(c)||0;var Q=v.length-c;E?(E=Number(E))>Q&&(E=Q):E=Q;var D=A.length;E>D/2&&(E=D/2);for(var Bt=0;Bt<E;++Bt){var Dt=parseInt(A.substr(2*Bt,2),16);if(at(Dt))return Bt;v[c+Bt]=Dt}return Bt}function J(v,A,c,E){return Pe(Ae(A,v.length-c),v,c,E)}function pt(v,A,c,E){return Pe(function(Q){for(var D=[],Bt=0;Bt<Q.length;++Bt)D.push(255&Q.charCodeAt(Bt));return D}(A),v,c,E)}function G(v,A,c,E){return Pe(Re(A),v,c,E)}function X(v,A,c,E){return Pe(function(Q,D){for(var Bt,Dt,At,Rt=[],_t=0;_t<Q.length&&!((D-=2)<0);++_t)Dt=(Bt=Q.charCodeAt(_t))>>8,At=Bt%256,Rt.push(At),Rt.push(Dt);return Rt}(A,v.length-c),v,c,E)}function rt(v,A,c){return A===0&&c===v.length?ct.fromByteArray(v):ct.fromByteArray(v.slice(A,c))}function bt(v,A,c){c=Math.min(v.length,c);for(var E=[],Q=A;Q<c;){var D,Bt,Dt,At,Rt=v[Q],_t=null,Yt=Rt>239?4:Rt>223?3:Rt>191?2:1;if(Q+Yt<=c)switch(Yt){case 1:Rt<128&&(_t=Rt);break;case 2:(192&(D=v[Q+1]))==128&&(At=(31&Rt)<<6|63&D)>127&&(_t=At);break;case 3:D=v[Q+1],Bt=v[Q+2],(192&D)==128&&(192&Bt)==128&&(At=(15&Rt)<<12|(63&D)<<6|63&Bt)>2047&&(At<55296||At>57343)&&(_t=At);break;case 4:D=v[Q+1],Bt=v[Q+2],Dt=v[Q+3],(192&D)==128&&(192&Bt)==128&&(192&Dt)==128&&(At=(15&Rt)<<18|(63&D)<<12|(63&Bt)<<6|63&Dt)>65535&&At<1114112&&(_t=At)}_t===null?(_t=65533,Yt=1):_t>65535&&(_t-=65536,E.push(_t>>>10&1023|55296),_t=56320|1023&_t),E.push(_t),Q+=Yt}return function(Vt){var Xt=Vt.length;if(Xt<=Ut)return String.fromCharCode.apply(String,Vt);for(var ne="",Te=0;Te<Xt;)ne+=String.fromCharCode.apply(String,Vt.slice(Te,Te+=Ut));return ne}(E)}Lt.kMaxLength=n,y.TYPED_ARRAY_SUPPORT=function(){try{var v=new Uint8Array(1),A={foo:function(){return 42}};return Object.setPrototypeOf(A,Uint8Array.prototype),Object.setPrototypeOf(v,A),v.foo()===42}catch{return!1}}(),y.TYPED_ARRAY_SUPPORT||typeof console>"u"||typeof console.error!="function"||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(y.prototype,"parent",{enumerable:!0,get:function(){if(y.isBuffer(this))return this.buffer}}),Object.defineProperty(y.prototype,"offset",{enumerable:!0,get:function(){if(y.isBuffer(this))return this.byteOffset}}),y.poolSize=8192,y.from=function(v,A,c){return i(v,A,c)},Object.setPrototypeOf(y.prototype,Uint8Array.prototype),Object.setPrototypeOf(y,Uint8Array),y.alloc=function(v,A,c){return function(E,Q,D){return h(E),E<=0?_(E):Q!==void 0?typeof D=="string"?_(E).fill(Q,D):_(E).fill(Q):_(E)}(v,A,c)},y.allocUnsafe=function(v){return g(v)},y.allocUnsafeSlow=function(v){return g(v)},y.isBuffer=function(v){return v!=null&&v._isBuffer===!0&&v!==y.prototype},y.compare=function(v,A){if(tt(v,Uint8Array)&&(v=y.from(v,v.offset,v.byteLength)),tt(A,Uint8Array)&&(A=y.from(A,A.offset,A.byteLength)),!y.isBuffer(v)||!y.isBuffer(A))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(v===A)return 0;for(var c=v.length,E=A.length,Q=0,D=Math.min(c,E);Q<D;++Q)if(v[Q]!==A[Q]){c=v[Q],E=A[Q];break}return c<E?-1:E<c?1:0},y.isEncoding=function(v){switch(String(v).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},y.concat=function(v,A){if(!Array.isArray(v))throw new TypeError('"list" argument must be an Array of Buffers');if(v.length===0)return y.alloc(0);var c;if(A===void 0)for(A=0,c=0;c<v.length;++c)A+=v[c].length;var E=y.allocUnsafe(A),Q=0;for(c=0;c<v.length;++c){var D=v[c];if(tt(D,Uint8Array))Q+D.length>E.length?y.from(D).copy(E,Q):Uint8Array.prototype.set.call(E,D,Q);else{if(!y.isBuffer(D))throw new TypeError('"list" argument must be an Array of Buffers');D.copy(E,Q)}Q+=D.length}return E},y.byteLength=T,y.prototype._isBuffer=!0,y.prototype.swap16=function(){var v=this.length;if(v%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var A=0;A<v;A+=2)W(this,A,A+1);return this},y.prototype.swap32=function(){var v=this.length;if(v%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var A=0;A<v;A+=4)W(this,A,A+3),W(this,A+1,A+2);return this},y.prototype.swap64=function(){var v=this.length;if(v%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var A=0;A<v;A+=8)W(this,A,A+7),W(this,A+1,A+6),W(this,A+2,A+5),W(this,A+3,A+4);return this},y.prototype.toString=function(){var v=this.length;return v===0?"":arguments.length===0?bt(this,0,v):q.apply(this,arguments)},y.prototype.toLocaleString=y.prototype.toString,y.prototype.equals=function(v){if(!y.isBuffer(v))throw new TypeError("Argument must be a Buffer");return this===v||y.compare(this,v)===0},y.prototype.inspect=function(){var v="",A=Lt.INSPECT_MAX_BYTES;return v=this.toString("hex",0,A).replace(/(.{2})/g,"$1 ").trim(),this.length>A&&(v+=" ... "),"<Buffer "+v+">"},u&&(y.prototype[u]=y.prototype.inspect),y.prototype.compare=function(v,A,c,E,Q){if(tt(v,Uint8Array)&&(v=y.from(v,v.offset,v.byteLength)),!y.isBuffer(v))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof v);if(A===void 0&&(A=0),c===void 0&&(c=v?v.length:0),E===void 0&&(E=0),Q===void 0&&(Q=this.length),A<0||c>v.length||E<0||Q>this.length)throw new RangeError("out of range index");if(E>=Q&&A>=c)return 0;if(E>=Q)return-1;if(A>=c)return 1;if(this===v)return 0;for(var D=(Q>>>=0)-(E>>>=0),Bt=(c>>>=0)-(A>>>=0),Dt=Math.min(D,Bt),At=this.slice(E,Q),Rt=v.slice(A,c),_t=0;_t<Dt;++_t)if(At[_t]!==Rt[_t]){D=At[_t],Bt=Rt[_t];break}return D<Bt?-1:Bt<D?1:0},y.prototype.includes=function(v,A,c){return this.indexOf(v,A,c)!==-1},y.prototype.indexOf=function(v,A,c){return x(this,v,A,c,!0)},y.prototype.lastIndexOf=function(v,A,c){return x(this,v,A,c,!1)},y.prototype.write=function(v,A,c,E){if(A===void 0)E="utf8",c=this.length,A=0;else if(c===void 0&&typeof A=="string")E=A,c=this.length,A=0;else{if(!isFinite(A))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");A>>>=0,isFinite(c)?(c>>>=0,E===void 0&&(E="utf8")):(E=c,c=void 0)}var Q=this.length-A;if((c===void 0||c>Q)&&(c=Q),v.length>0&&(c<0||A<0)||A>this.length)throw new RangeError("Attempt to write outside buffer bounds");E||(E="utf8");for(var D=!1;;)switch(E){case"hex":return O(this,v,A,c);case"utf8":case"utf-8":return J(this,v,A,c);case"ascii":case"latin1":case"binary":return pt(this,v,A,c);case"base64":return G(this,v,A,c);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return X(this,v,A,c);default:if(D)throw new TypeError("Unknown encoding: "+E);E=(""+E).toLowerCase(),D=!0}},y.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var Ut=4096;function mt(v,A,c){var E="";c=Math.min(v.length,c);for(var Q=A;Q<c;++Q)E+=String.fromCharCode(127&v[Q]);return E}function lt(v,A,c){var E="";c=Math.min(v.length,c);for(var Q=A;Q<c;++Q)E+=String.fromCharCode(v[Q]);return E}function jt(v,A,c){var E=v.length;(!A||A<0)&&(A=0),(!c||c<0||c>E)&&(c=E);for(var Q="",D=A;D<c;++D)Q+=qt[v[D]];return Q}function St(v,A,c){for(var E=v.slice(A,c),Q="",D=0;D<E.length-1;D+=2)Q+=String.fromCharCode(E[D]+256*E[D+1]);return Q}function Nt(v,A,c){if(v%1!=0||v<0)throw new RangeError("offset is not uint");if(v+A>c)throw new RangeError("Trying to access beyond buffer length")}function Ht(v,A,c,E,Q,D){if(!y.isBuffer(v))throw new TypeError('"buffer" argument must be a Buffer instance');if(A>Q||A<D)throw new RangeError('"value" argument is out of bounds');if(c+E>v.length)throw new RangeError("Index out of range")}function ie(v,A,c,E,Q,D){if(c+E>v.length)throw new RangeError("Index out of range");if(c<0)throw new RangeError("Index out of range")}function It(v,A,c,E,Q){return A=+A,c>>>=0,Q||ie(v,0,c,4),I.write(v,A,c,E,23,4),c+4}function Ot(v,A,c,E,Q){return A=+A,c>>>=0,Q||ie(v,0,c,8),I.write(v,A,c,E,52,8),c+8}y.prototype.slice=function(v,A){var c=this.length;(v=~~v)<0?(v+=c)<0&&(v=0):v>c&&(v=c),(A=A===void 0?c:~~A)<0?(A+=c)<0&&(A=0):A>c&&(A=c),A<v&&(A=v);var E=this.subarray(v,A);return Object.setPrototypeOf(E,y.prototype),E},y.prototype.readUintLE=y.prototype.readUIntLE=function(v,A,c){v>>>=0,A>>>=0,c||Nt(v,A,this.length);for(var E=this[v],Q=1,D=0;++D<A&&(Q*=256);)E+=this[v+D]*Q;return E},y.prototype.readUintBE=y.prototype.readUIntBE=function(v,A,c){v>>>=0,A>>>=0,c||Nt(v,A,this.length);for(var E=this[v+--A],Q=1;A>0&&(Q*=256);)E+=this[v+--A]*Q;return E},y.prototype.readUint8=y.prototype.readUInt8=function(v,A){return v>>>=0,A||Nt(v,1,this.length),this[v]},y.prototype.readUint16LE=y.prototype.readUInt16LE=function(v,A){return v>>>=0,A||Nt(v,2,this.length),this[v]|this[v+1]<<8},y.prototype.readUint16BE=y.prototype.readUInt16BE=function(v,A){return v>>>=0,A||Nt(v,2,this.length),this[v]<<8|this[v+1]},y.prototype.readUint32LE=y.prototype.readUInt32LE=function(v,A){return v>>>=0,A||Nt(v,4,this.length),(this[v]|this[v+1]<<8|this[v+2]<<16)+16777216*this[v+3]},y.prototype.readUint32BE=y.prototype.readUInt32BE=function(v,A){return v>>>=0,A||Nt(v,4,this.length),16777216*this[v]+(this[v+1]<<16|this[v+2]<<8|this[v+3])},y.prototype.readIntLE=function(v,A,c){v>>>=0,A>>>=0,c||Nt(v,A,this.length);for(var E=this[v],Q=1,D=0;++D<A&&(Q*=256);)E+=this[v+D]*Q;return E>=(Q*=128)&&(E-=Math.pow(2,8*A)),E},y.prototype.readIntBE=function(v,A,c){v>>>=0,A>>>=0,c||Nt(v,A,this.length);for(var E=A,Q=1,D=this[v+--E];E>0&&(Q*=256);)D+=this[v+--E]*Q;return D>=(Q*=128)&&(D-=Math.pow(2,8*A)),D},y.prototype.readInt8=function(v,A){return v>>>=0,A||Nt(v,1,this.length),128&this[v]?-1*(255-this[v]+1):this[v]},y.prototype.readInt16LE=function(v,A){v>>>=0,A||Nt(v,2,this.length);var c=this[v]|this[v+1]<<8;return 32768&c?4294901760|c:c},y.prototype.readInt16BE=function(v,A){v>>>=0,A||Nt(v,2,this.length);var c=this[v+1]|this[v]<<8;return 32768&c?4294901760|c:c},y.prototype.readInt32LE=function(v,A){return v>>>=0,A||Nt(v,4,this.length),this[v]|this[v+1]<<8|this[v+2]<<16|this[v+3]<<24},y.prototype.readInt32BE=function(v,A){return v>>>=0,A||Nt(v,4,this.length),this[v]<<24|this[v+1]<<16|this[v+2]<<8|this[v+3]},y.prototype.readFloatLE=function(v,A){return v>>>=0,A||Nt(v,4,this.length),I.read(this,v,!0,23,4)},y.prototype.readFloatBE=function(v,A){return v>>>=0,A||Nt(v,4,this.length),I.read(this,v,!1,23,4)},y.prototype.readDoubleLE=function(v,A){return v>>>=0,A||Nt(v,8,this.length),I.read(this,v,!0,52,8)},y.prototype.readDoubleBE=function(v,A){return v>>>=0,A||Nt(v,8,this.length),I.read(this,v,!1,52,8)},y.prototype.writeUintLE=y.prototype.writeUIntLE=function(v,A,c,E){v=+v,A>>>=0,c>>>=0,E||Ht(this,v,A,c,Math.pow(2,8*c)-1,0);var Q=1,D=0;for(this[A]=255&v;++D<c&&(Q*=256);)this[A+D]=v/Q&255;return A+c},y.prototype.writeUintBE=y.prototype.writeUIntBE=function(v,A,c,E){v=+v,A>>>=0,c>>>=0,E||Ht(this,v,A,c,Math.pow(2,8*c)-1,0);var Q=c-1,D=1;for(this[A+Q]=255&v;--Q>=0&&(D*=256);)this[A+Q]=v/D&255;return A+c},y.prototype.writeUint8=y.prototype.writeUInt8=function(v,A,c){return v=+v,A>>>=0,c||Ht(this,v,A,1,255,0),this[A]=255&v,A+1},y.prototype.writeUint16LE=y.prototype.writeUInt16LE=function(v,A,c){return v=+v,A>>>=0,c||Ht(this,v,A,2,65535,0),this[A]=255&v,this[A+1]=v>>>8,A+2},y.prototype.writeUint16BE=y.prototype.writeUInt16BE=function(v,A,c){return v=+v,A>>>=0,c||Ht(this,v,A,2,65535,0),this[A]=v>>>8,this[A+1]=255&v,A+2},y.prototype.writeUint32LE=y.prototype.writeUInt32LE=function(v,A,c){return v=+v,A>>>=0,c||Ht(this,v,A,4,4294967295,0),this[A+3]=v>>>24,this[A+2]=v>>>16,this[A+1]=v>>>8,this[A]=255&v,A+4},y.prototype.writeUint32BE=y.prototype.writeUInt32BE=function(v,A,c){return v=+v,A>>>=0,c||Ht(this,v,A,4,4294967295,0),this[A]=v>>>24,this[A+1]=v>>>16,this[A+2]=v>>>8,this[A+3]=255&v,A+4},y.prototype.writeIntLE=function(v,A,c,E){if(v=+v,A>>>=0,!E){var Q=Math.pow(2,8*c-1);Ht(this,v,A,c,Q-1,-Q)}var D=0,Bt=1,Dt=0;for(this[A]=255&v;++D<c&&(Bt*=256);)v<0&&Dt===0&&this[A+D-1]!==0&&(Dt=1),this[A+D]=(v/Bt|0)-Dt&255;return A+c},y.prototype.writeIntBE=function(v,A,c,E){if(v=+v,A>>>=0,!E){var Q=Math.pow(2,8*c-1);Ht(this,v,A,c,Q-1,-Q)}var D=c-1,Bt=1,Dt=0;for(this[A+D]=255&v;--D>=0&&(Bt*=256);)v<0&&Dt===0&&this[A+D+1]!==0&&(Dt=1),this[A+D]=(v/Bt|0)-Dt&255;return A+c},y.prototype.writeInt8=function(v,A,c){return v=+v,A>>>=0,c||Ht(this,v,A,1,127,-128),v<0&&(v=255+v+1),this[A]=255&v,A+1},y.prototype.writeInt16LE=function(v,A,c){return v=+v,A>>>=0,c||Ht(this,v,A,2,32767,-32768),this[A]=255&v,this[A+1]=v>>>8,A+2},y.prototype.writeInt16BE=function(v,A,c){return v=+v,A>>>=0,c||Ht(this,v,A,2,32767,-32768),this[A]=v>>>8,this[A+1]=255&v,A+2},y.prototype.writeInt32LE=function(v,A,c){return v=+v,A>>>=0,c||Ht(this,v,A,4,2147483647,-2147483648),this[A]=255&v,this[A+1]=v>>>8,this[A+2]=v>>>16,this[A+3]=v>>>24,A+4},y.prototype.writeInt32BE=function(v,A,c){return v=+v,A>>>=0,c||Ht(this,v,A,4,2147483647,-2147483648),v<0&&(v=4294967295+v+1),this[A]=v>>>24,this[A+1]=v>>>16,this[A+2]=v>>>8,this[A+3]=255&v,A+4},y.prototype.writeFloatLE=function(v,A,c){return It(this,v,A,!0,c)},y.prototype.writeFloatBE=function(v,A,c){return It(this,v,A,!1,c)},y.prototype.writeDoubleLE=function(v,A,c){return Ot(this,v,A,!0,c)},y.prototype.writeDoubleBE=function(v,A,c){return Ot(this,v,A,!1,c)},y.prototype.copy=function(v,A,c,E){if(!y.isBuffer(v))throw new TypeError("argument should be a Buffer");if(c||(c=0),E||E===0||(E=this.length),A>=v.length&&(A=v.length),A||(A=0),E>0&&E<c&&(E=c),E===c||v.length===0||this.length===0)return 0;if(A<0)throw new RangeError("targetStart out of bounds");if(c<0||c>=this.length)throw new RangeError("Index out of range");if(E<0)throw new RangeError("sourceEnd out of bounds");E>this.length&&(E=this.length),v.length-A<E-c&&(E=v.length-A+c);var Q=E-c;return this===v&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(A,c,E):Uint8Array.prototype.set.call(v,this.subarray(c,E),A),Q},y.prototype.fill=function(v,A,c,E){if(typeof v=="string"){if(typeof A=="string"?(E=A,A=0,c=this.length):typeof c=="string"&&(E=c,c=this.length),E!==void 0&&typeof E!="string")throw new TypeError("encoding must be a string");if(typeof E=="string"&&!y.isEncoding(E))throw new TypeError("Unknown encoding: "+E);if(v.length===1){var Q=v.charCodeAt(0);(E==="utf8"&&Q<128||E==="latin1")&&(v=Q)}}else typeof v=="number"?v&=255:typeof v=="boolean"&&(v=Number(v));if(A<0||this.length<A||this.length<c)throw new RangeError("Out of range index");if(c<=A)return this;var D;if(A>>>=0,c=c===void 0?this.length:c>>>0,v||(v=0),typeof v=="number")for(D=A;D<c;++D)this[D]=v;else{var Bt=y.isBuffer(v)?v:y.from(v,E),Dt=Bt.length;if(Dt===0)throw new TypeError('The value "'+v+'" is invalid for argument "value"');for(D=0;D<c-A;++D)this[D+A]=Bt[D%Dt]}return this};var fe=/[^+/0-9A-Za-z-_]/g;function Ae(v,A){var c;A=A||1/0;for(var E=v.length,Q=null,D=[],Bt=0;Bt<E;++Bt){if((c=v.charCodeAt(Bt))>55295&&c<57344){if(!Q){if(c>56319){(A-=3)>-1&&D.push(239,191,189);continue}if(Bt+1===E){(A-=3)>-1&&D.push(239,191,189);continue}Q=c;continue}if(c<56320){(A-=3)>-1&&D.push(239,191,189),Q=c;continue}c=65536+(Q-55296<<10|c-56320)}else Q&&(A-=3)>-1&&D.push(239,191,189);if(Q=null,c<128){if((A-=1)<0)break;D.push(c)}else if(c<2048){if((A-=2)<0)break;D.push(c>>6|192,63&c|128)}else if(c<65536){if((A-=3)<0)break;D.push(c>>12|224,c>>6&63|128,63&c|128)}else{if(!(c<1114112))throw new Error("Invalid code point");if((A-=4)<0)break;D.push(c>>18|240,c>>12&63|128,c>>6&63|128,63&c|128)}}return D}function Re(v){return ct.toByteArray(function(A){if((A=(A=A.split("=")[0]).trim().replace(fe,"")).length<2)return"";for(;A.length%4!=0;)A+="=";return A}(v))}function Pe(v,A,c,E){for(var Q=0;Q<E&&!(Q+c>=A.length||Q>=v.length);++Q)A[Q+c]=v[Q];return Q}function tt(v,A){return v instanceof A||v!=null&&v.constructor!=null&&v.constructor.name!=null&&v.constructor.name===A.name}function at(v){return v!=v}var qt=function(){for(var v="0123456789abcdef",A=new Array(256),c=0;c<16;++c)for(var E=16*c,Q=0;Q<16;++Q)A[E+Q]=v[c]+v[Q];return A}()},8667:function(ve,Lt){var M={parseBuffer:function(u){return new ct(u).parse()},addBoxProcessor:function(u,n){typeof u=="string"&&typeof n=="function"&&(I.prototype._boxProcessors[u]=n)},createFile:function(){return new ct},createBox:function(u,n,_){var y=I.create(u);return n&&n.append(y,_),y},createFullBox:function(u,n,_){var y=M.createBox(u,n,_);return y.version=0,y.flags=0,y},Utils:{}};M.Utils.dataViewToString=function(u,n){var _=n||"utf-8";if(typeof TextDecoder<"u")return new TextDecoder(_).decode(u);var y=[],i=0;if(_==="utf-8")for(;i<u.byteLength;){var h=u.getUint8(i++);h<128||(h<224?(h=(31&h)<<6,h|=63&u.getUint8(i++)):h<240?(h=(15&h)<<12,h|=(63&u.getUint8(i++))<<6,h|=63&u.getUint8(i++)):(h=(7&h)<<18,h|=(63&u.getUint8(i++))<<12,h|=(63&u.getUint8(i++))<<6,h|=63&u.getUint8(i++))),y.push(String.fromCharCode(h))}else for(;i<u.byteLength;)y.push(String.fromCharCode(u.getUint8(i++)));return y.join("")},M.Utils.utf8ToByteArray=function(u){var n,_;if(typeof TextEncoder<"u")n=new TextEncoder().encode(u);else for(n=[],_=0;_<u.length;++_){var y=u.charCodeAt(_);y<128?n.push(y):y<2048?(n.push(192|y>>6),n.push(128|63&y)):y<65536?(n.push(224|y>>12),n.push(128|63&y>>6),n.push(128|63&y)):(n.push(240|y>>18),n.push(128|63&y>>12),n.push(128|63&y>>6),n.push(128|63&y))}return n},M.Utils.appendBox=function(u,n,_){if(n._offset=u._cursor.offset,n._root=u._root?u._root:u,n._raw=u._raw,n._parent=u,_!==-1)if(_!=null){var y,i=-1;if(typeof _=="number")i=_;else{if(typeof _=="string")y=_;else{if(typeof _!="object"||!_.type)return void u.boxes.push(n);y=_.type}for(var h=0;h<u.boxes.length;h++)if(y===u.boxes[h].type){i=h+1;break}}u.boxes.splice(i,0,n)}else u.boxes.push(n)},Lt.parseBuffer=M.parseBuffer,Lt.addBoxProcessor=M.addBoxProcessor,Lt.createFile=M.createFile,Lt.createBox=M.createBox,Lt.createFullBox=M.createFullBox,Lt.Utils=M.Utils,M.Cursor=function(u){this.offset=u===void 0?0:u};var ct=function(u){this._cursor=new M.Cursor,this.boxes=[],u&&(this._raw=new DataView(u))};ct.prototype.fetch=function(u){var n=this.fetchAll(u,!0);return n.length?n[0]:null},ct.prototype.fetchAll=function(u,n){var _=[];return ct._sweep.call(this,u,_,n),_},ct.prototype.parse=function(){for(this._cursor.offset=0,this.boxes=[];this._cursor.offset<this._raw.byteLength;){var u=I.parse(this);if(u.type===void 0)break;this.boxes.push(u)}return this},ct._sweep=function(u,n,_){for(var y in this.type&&this.type==u&&n.push(this),this.boxes){if(n.length&&_)return;ct._sweep.call(this.boxes[y],u,n,_)}},ct.prototype.write=function(){var u,n=0;for(u=0;u<this.boxes.length;u++)n+=this.boxes[u].getLength(!1);var _=new Uint8Array(n);for(this._rawo=new DataView(_.buffer),this.bytes=_,this._cursor.offset=0,u=0;u<this.boxes.length;u++)this.boxes[u].write();return _.buffer},ct.prototype.append=function(u,n){M.Utils.appendBox(this,u,n)};var I=function(){this._cursor=new M.Cursor};I.parse=function(u){var n=new I;return n._offset=u._cursor.offset,n._root=u._root?u._root:u,n._raw=u._raw,n._parent=u,n._parseBox(),u._cursor.offset=n._raw.byteOffset+n._raw.byteLength,n},I.create=function(u){var n=new I;return n.type=u,n.boxes=[],n},I.prototype._boxContainers=["dinf","edts","mdia","meco","mfra","minf","moof","moov","mvex","stbl","strk","traf","trak","tref","udta","vttc","sinf","schi","encv","enca"],I.prototype._boxProcessors={},I.prototype._procField=function(u,n,_){this._parsing?this[u]=this._readField(n,_):this._writeField(n,_,this[u])},I.prototype._procFieldArray=function(u,n,_,y){var i;if(this._parsing)for(this[u]=[],i=0;i<n;i++)this[u][i]=this._readField(_,y);else for(i=0;i<this[u].length;i++)this._writeField(_,y,this[u][i])},I.prototype._procFullBox=function(){this._procField("version","uint",8),this._procField("flags","uint",24)},I.prototype._procEntries=function(u,n,_){var y;if(this._parsing)for(this[u]=[],y=0;y<n;y++)this[u].push({}),_.call(this,this[u][y]);else for(y=0;y<n;y++)_.call(this,this[u][y])},I.prototype._procSubEntries=function(u,n,_,y){var i;if(this._parsing)for(u[n]=[],i=0;i<_;i++)u[n].push({}),y.call(this,u[n][i]);else for(i=0;i<_;i++)y.call(this,u[n][i])},I.prototype._procEntryField=function(u,n,_,y){this._parsing?u[n]=this._readField(_,y):this._writeField(_,y,u[n])},I.prototype._procSubBoxes=function(u,n){var _;if(this._parsing)for(this[u]=[],_=0;_<n;_++)this[u].push(I.parse(this));else for(_=0;_<n;_++)this._rawo?this[u][_].write():this.size+=this[u][_].getLength()},I.prototype._readField=function(u,n){switch(u){case"uint":return this._readUint(n);case"int":return this._readInt(n);case"template":return this._readTemplate(n);case"string":return n===-1?this._readTerminatedString():this._readString(n);case"data":return this._readData(n);case"utf8":return this._readUTF8String();default:return-1}},I.prototype._readInt=function(u){var n=null,_=this._cursor.offset-this._raw.byteOffset;switch(u){case 8:n=this._raw.getInt8(_);break;case 16:n=this._raw.getInt16(_);break;case 32:n=this._raw.getInt32(_);break;case 64:var y=this._raw.getInt32(_),i=this._raw.getInt32(_+4);n=y*Math.pow(2,32)+i}return this._cursor.offset+=u>>3,n},I.prototype._readUint=function(u){var n,_,y=null,i=this._cursor.offset-this._raw.byteOffset;switch(u){case 8:y=this._raw.getUint8(i);break;case 16:y=this._raw.getUint16(i);break;case 24:y=((n=this._raw.getUint16(i))<<8)+(_=this._raw.getUint8(i+2));break;case 32:y=this._raw.getUint32(i);break;case 64:n=this._raw.getUint32(i),_=this._raw.getUint32(i+4),y=n*Math.pow(2,32)+_}return this._cursor.offset+=u>>3,y},I.prototype._readString=function(u){for(var n="",_=0;_<u;_++){var y=this._readUint(8);n+=String.fromCharCode(y)}return n},I.prototype._readTemplate=function(u){return this._readUint(u/2)+this._readUint(u/2)/Math.pow(2,u/2)},I.prototype._readTerminatedString=function(){for(var u="";this._cursor.offset-this._offset<this._raw.byteLength;){var n=this._readUint(8);if(n===0)break;u+=String.fromCharCode(n)}return u},I.prototype._readData=function(u){var n=u>0?u:this._raw.byteLength-(this._cursor.offset-this._offset);if(n>0){var _=new Uint8Array(this._raw.buffer,this._cursor.offset,n);return this._cursor.offset+=n,_}return null},I.prototype._readUTF8String=function(){var u=this._raw.byteLength-(this._cursor.offset-this._offset),n=null;return u>0&&(n=new DataView(this._raw.buffer,this._cursor.offset,u),this._cursor.offset+=u),n&&M.Utils.dataViewToString(n)},I.prototype._parseBox=function(){if(this._parsing=!0,this._cursor.offset=this._offset,this._offset+8>this._raw.buffer.byteLength)this._root._incomplete=!0;else{switch(this._procField("size","uint",32),this._procField("type","string",4),this.size===1&&this._procField("largesize","uint",64),this.type==="uuid"&&this._procFieldArray("usertype",16,"uint",8),this.size){case 0:this._raw=new DataView(this._raw.buffer,this._offset);break;case 1:this._offset+this.size>this._raw.buffer.byteLength?(this._incomplete=!0,this._root._incomplete=!0):this._raw=new DataView(this._raw.buffer,this._offset,this.largesize);break;default:this._offset+this.size>this._raw.buffer.byteLength?(this._incomplete=!0,this._root._incomplete=!0):this._raw=new DataView(this._raw.buffer,this._offset,this.size)}this._incomplete||(this._boxProcessors[this.type]&&this._boxProcessors[this.type].call(this),this._boxContainers.indexOf(this.type)!==-1?this._parseContainerBox():this._data=this._readData())}},I.prototype._parseFullBox=function(){this.version=this._readUint(8),this.flags=this._readUint(24)},I.prototype._parseContainerBox=function(){for(this.boxes=[];this._cursor.offset-this._raw.byteOffset<this._raw.byteLength;)this.boxes.push(I.parse(this))},I.prototype.append=function(u,n){M.Utils.appendBox(this,u,n)},I.prototype.getLength=function(){if(this._parsing=!1,this._rawo=null,this.size=0,this._procField("size","uint",32),this._procField("type","string",4),this.size===1&&this._procField("largesize","uint",64),this.type==="uuid"&&this._procFieldArray("usertype",16,"uint",8),this._boxProcessors[this.type]&&this._boxProcessors[this.type].call(this),this._boxContainers.indexOf(this.type)!==-1)for(var u=0;u<this.boxes.length;u++)this.size+=this.boxes[u].getLength();return this._data&&this._writeData(this._data),this.size},I.prototype.write=function(){switch(this._parsing=!1,this._cursor.offset=this._parent._cursor.offset,this.size){case 0:this._rawo=new DataView(this._parent._rawo.buffer,this._cursor.offset,this.parent._rawo.byteLength-this._cursor.offset);break;case 1:this._rawo=new DataView(this._parent._rawo.buffer,this._cursor.offset,this.largesize);break;default:this._rawo=new DataView(this._parent._rawo.buffer,this._cursor.offset,this.size)}if(this._procField("size","uint",32),this._procField("type","string",4),this.size===1&&this._procField("largesize","uint",64),this.type==="uuid"&&this._procFieldArray("usertype",16,"uint",8),this._boxProcessors[this.type]&&this._boxProcessors[this.type].call(this),this._boxContainers.indexOf(this.type)!==-1)for(var u=0;u<this.boxes.length;u++)this.boxes[u].write();return this._data&&this._writeData(this._data),this._parent._cursor.offset+=this.size,this.size},I.prototype._writeInt=function(u,n){if(this._rawo){var _=this._cursor.offset-this._rawo.byteOffset;switch(u){case 8:this._rawo.setInt8(_,n);break;case 16:this._rawo.setInt16(_,n);break;case 32:this._rawo.setInt32(_,n);break;case 64:var y=Math.floor(n/Math.pow(2,32)),i=n-y*Math.pow(2,32);this._rawo.setUint32(_,y),this._rawo.setUint32(_+4,i)}this._cursor.offset+=u>>3}else this.size+=u>>3},I.prototype._writeUint=function(u,n){if(this._rawo){var _,y,i=this._cursor.offset-this._rawo.byteOffset;switch(u){case 8:this._rawo.setUint8(i,n);break;case 16:this._rawo.setUint16(i,n);break;case 24:_=(16776960&n)>>8,y=255&n,this._rawo.setUint16(i,_),this._rawo.setUint8(i+2,y);break;case 32:this._rawo.setUint32(i,n);break;case 64:y=n-(_=Math.floor(n/Math.pow(2,32)))*Math.pow(2,32),this._rawo.setUint32(i,_),this._rawo.setUint32(i+4,y)}this._cursor.offset+=u>>3}else this.size+=u>>3},I.prototype._writeString=function(u,n){for(var _=0;_<u;_++)this._writeUint(8,n.charCodeAt(_))},I.prototype._writeTerminatedString=function(u){if(u.length!==0){for(var n=0;n<u.length;n++)this._writeUint(8,u.charCodeAt(n));this._writeUint(8,0)}},I.prototype._writeTemplate=function(u,n){var _=Math.floor(n),y=(n-_)*Math.pow(2,u/2);this._writeUint(u/2,_),this._writeUint(u/2,y)},I.prototype._writeData=function(u){if(u)if(this._rawo){if(u instanceof Array){for(var n=this._cursor.offset-this._rawo.byteOffset,_=0;_<u.length;_++)this._rawo.setInt8(n+_,u[_]);this._cursor.offset+=u.length}u instanceof Uint8Array&&(this._root.bytes.set(u,this._cursor.offset),this._cursor.offset+=u.length)}else this.size+=u.length},I.prototype._writeUTF8String=function(u){var n=M.Utils.utf8ToByteArray(u);if(this._rawo)for(var _=new DataView(this._rawo.buffer,this._cursor.offset,n.length),y=0;y<n.length;y++)_.setUint8(y,n[y]);else this.size+=n.length},I.prototype._writeField=function(u,n,_){switch(u){case"uint":this._writeUint(n,_);break;case"int":this._writeInt(n,_);break;case"template":this._writeTemplate(n,_);break;case"string":n==-1?this._writeTerminatedString(_):this._writeString(n,_);break;case"data":this._writeData(_);break;case"utf8":this._writeUTF8String(_)}},I.prototype._boxProcessors.avc1=I.prototype._boxProcessors.avc2=I.prototype._boxProcessors.avc3=I.prototype._boxProcessors.avc4=I.prototype._boxProcessors.hvc1=I.prototype._boxProcessors.hev1=I.prototype._boxProcessors.encv=function(){this._procFieldArray("reserved1",6,"uint",8),this._procField("data_reference_index","uint",16),this._procField("pre_defined1","uint",16),this._procField("reserved2","uint",16),this._procFieldArray("pre_defined2",3,"uint",32),this._procField("width","uint",16),this._procField("height","uint",16),this._procField("horizresolution","template",32),this._procField("vertresolution","template",32),this._procField("reserved3","uint",32),this._procField("frame_count","uint",16),this._procFieldArray("compressorname",32,"uint",8),this._procField("depth","uint",16),this._procField("pre_defined3","int",16),this._procField("config","data",-1)},I.prototype._boxProcessors.ctts=function(){this._procFullBox(),this._procField("entry_count","uint",32),this._procEntries("entries",this.entry_count,function(u){this._procEntryField(u,"sample_count","uint",32),this._procEntryField(u,"sample_offset",this.version===1?"int":"uint",32)})},I.prototype._boxProcessors.dref=function(){this._procFullBox(),this._procField("entry_count","uint",32),this._procSubBoxes("entries",this.entry_count)},I.prototype._boxProcessors.elst=function(){this._procFullBox(),this._procField("entry_count","uint",32),this._procEntries("entries",this.entry_count,function(u){this._procEntryField(u,"segment_duration","uint",this.version===1?64:32),this._procEntryField(u,"media_time","int",this.version===1?64:32),this._procEntryField(u,"media_rate_integer","int",16),this._procEntryField(u,"media_rate_fraction","int",16)})},I.prototype._boxProcessors.emsg=function(){this._procFullBox(),this.version==1?(this._procField("timescale","uint",32),this._procField("presentation_time","uint",64),this._procField("event_duration","uint",32),this._procField("id","uint",32),this._procField("scheme_id_uri","string",-1),this._procField("value","string",-1)):(this._procField("scheme_id_uri","string",-1),this._procField("value","string",-1),this._procField("timescale","uint",32),this._procField("presentation_time_delta","uint",32),this._procField("event_duration","uint",32),this._procField("id","uint",32)),this._procField("message_data","data",-1)},I.prototype._boxProcessors.free=I.prototype._boxProcessors.skip=function(){this._procField("data","data",-1)},I.prototype._boxProcessors.frma=function(){this._procField("data_format","uint",32)},I.prototype._boxProcessors.ftyp=I.prototype._boxProcessors.styp=function(){this._procField("major_brand","string",4),this._procField("minor_version","uint",32);var u=-1;this._parsing&&(u=(this._raw.byteLength-(this._cursor.offset-this._raw.byteOffset))/4),this._procFieldArray("compatible_brands",u,"string",4)},I.prototype._boxProcessors.hdlr=function(){this._procFullBox(),this._procField("pre_defined","uint",32),this._procField("handler_type","string",4),this._procFieldArray("reserved",3,"uint",32),this._procField("name","string",-1)},I.prototype._boxProcessors.mdat=function(){this._procField("data","data",-1)},I.prototype._boxProcessors.mdhd=function(){this._procFullBox(),this._procField("creation_time","uint",this.version==1?64:32),this._procField("modification_time","uint",this.version==1?64:32),this._procField("timescale","uint",32),this._procField("duration","uint",this.version==1?64:32),this._parsing||typeof this.language!="string"||(this.language=this.language.charCodeAt(0)-96<<10|this.language.charCodeAt(1)-96<<5|this.language.charCodeAt(2)-96),this._procField("language","uint",16),this._parsing&&(this.language=String.fromCharCode(96+(this.language>>10&31),96+(this.language>>5&31),96+(31&this.language))),this._procField("pre_defined","uint",16)},I.prototype._boxProcessors.mehd=function(){this._procFullBox(),this._procField("fragment_duration","uint",this.version==1?64:32)},I.prototype._boxProcessors.mfhd=function(){this._procFullBox(),this._procField("sequence_number","uint",32)},I.prototype._boxProcessors.mfro=function(){this._procFullBox(),this._procField("mfra_size","uint",32)},I.prototype._boxProcessors.mp4a=I.prototype._boxProcessors.enca=function(){this._procFieldArray("reserved1",6,"uint",8),this._procField("data_reference_index","uint",16),this._procFieldArray("reserved2",2,"uint",32),this._procField("channelcount","uint",16),this._procField("samplesize","uint",16),this._procField("pre_defined","uint",16),this._procField("reserved3","uint",16),this._procField("samplerate","template",32),this._procField("esds","data",-1)},I.prototype._boxProcessors.mvhd=function(){this._procFullBox(),this._procField("creation_time","uint",this.version==1?64:32),this._procField("modification_time","uint",this.version==1?64:32),this._procField("timescale","uint",32),this._procField("duration","uint",this.version==1?64:32),this._procField("rate","template",32),this._procField("volume","template",16),this._procField("reserved1","uint",16),this._procFieldArray("reserved2",2,"uint",32),this._procFieldArray("matrix",9,"template",32),this._procFieldArray("pre_defined",6,"uint",32),this._procField("next_track_ID","uint",32)},I.prototype._boxProcessors.payl=function(){this._procField("cue_text","utf8")},I.prototype._boxProcessors.prft=function(){this._procFullBox(),this._procField("reference_track_ID","uint",32),this._procField("ntp_timestamp_sec","uint",32),this._procField("ntp_timestamp_frac","uint",32),this._procField("media_time","uint",this.version==1?64:32)},I.prototype._boxProcessors.pssh=function(){this._procFullBox(),this._procFieldArray("SystemID",16,"uint",8),this._procField("DataSize","uint",32),this._procFieldArray("Data",this.DataSize,"uint",8)},I.prototype._boxProcessors.schm=function(){this._procFullBox(),this._procField("scheme_type","uint",32),this._procField("scheme_version","uint",32),1&this.flags&&this._procField("scheme_uri","string",-1)},I.prototype._boxProcessors.sdtp=function(){this._procFullBox();var u=-1;this._parsing&&(u=this._raw.byteLength-(this._cursor.offset-this._raw.byteOffset)),this._procFieldArray("sample_dependency_table",u,"uint",8)},I.prototype._boxProcessors.sidx=function(){this._procFullBox(),this._procField("reference_ID","uint",32),this._procField("timescale","uint",32),this._procField("earliest_presentation_time","uint",this.version==1?64:32),this._procField("first_offset","uint",this.version==1?64:32),this._procField("reserved","uint",16),this._procField("reference_count","uint",16),this._procEntries("references",this.reference_count,function(u){this._parsing||(u.reference=(1&u.reference_type)<<31,u.reference|=2147483647&u.referenced_size,u.sap=(1&u.starts_with_SAP)<<31,u.sap|=(3&u.SAP_type)<<28,u.sap|=268435455&u.SAP_delta_time),this._procEntryField(u,"reference","uint",32),this._procEntryField(u,"subsegment_duration","uint",32),this._procEntryField(u,"sap","uint",32),this._parsing&&(u.reference_type=u.reference>>31&1,u.referenced_size=2147483647&u.reference,u.starts_with_SAP=u.sap>>31&1,u.SAP_type=u.sap>>28&7,u.SAP_delta_time=268435455&u.sap)})},I.prototype._boxProcessors.smhd=function(){this._procFullBox(),this._procField("balance","uint",16),this._procField("reserved","uint",16)},I.prototype._boxProcessors.ssix=function(){this._procFullBox(),this._procField("subsegment_count","uint",32),this._procEntries("subsegments",this.subsegment_count,function(u){this._procEntryField(u,"ranges_count","uint",32),this._procSubEntries(u,"ranges",u.ranges_count,function(n){this._procEntryField(n,"level","uint",8),this._procEntryField(n,"range_size","uint",24)})})},I.prototype._boxProcessors.stsd=function(){this._procFullBox(),this._procField("entry_count","uint",32),this._procSubBoxes("entries",this.entry_count)},I.prototype._boxProcessors.sttg=function(){this._procField("settings","utf8")},I.prototype._boxProcessors.stts=function(){this._procFullBox(),this._procField("entry_count","uint",32),this._procEntries("entries",this.entry_count,function(u){this._procEntryField(u,"sample_count","uint",32),this._procEntryField(u,"sample_delta","uint",32)})},I.prototype._boxProcessors.subs=function(){this._procFullBox(),this._procField("entry_count","uint",32),this._procEntries("entries",this.entry_count,function(u){this._procEntryField(u,"sample_delta","uint",32),this._procEntryField(u,"subsample_count","uint",16),this._procSubEntries(u,"subsamples",u.subsample_count,function(n){this._procEntryField(n,"subsample_size","uint",this.version===1?32:16),this._procEntryField(n,"subsample_priority","uint",8),this._procEntryField(n,"discardable","uint",8),this._procEntryField(n,"codec_specific_parameters","uint",32)})})},I.prototype._boxProcessors.tenc=function(){this._procFullBox(),this._procField("default_IsEncrypted","uint",24),this._procField("default_IV_size","uint",8),this._procFieldArray("default_KID",16,"uint",8)},I.prototype._boxProcessors.tfdt=function(){this._procFullBox(),this._procField("baseMediaDecodeTime","uint",this.version==1?64:32)},I.prototype._boxProcessors.tfhd=function(){this._procFullBox(),this._procField("track_ID","uint",32),1&this.flags&&this._procField("base_data_offset","uint",64),2&this.flags&&this._procField("sample_description_offset","uint",32),8&this.flags&&this._procField("default_sample_duration","uint",32),16&this.flags&&this._procField("default_sample_size","uint",32),32&this.flags&&this._procField("default_sample_flags","uint",32)},I.prototype._boxProcessors.tfra=function(){this._procFullBox(),this._procField("track_ID","uint",32),this._parsing||(this.reserved=0,this.reserved|=(48&this.length_size_of_traf_num)<<4,this.reserved|=(12&this.length_size_of_trun_num)<<2,this.reserved|=3&this.length_size_of_sample_num),this._procField("reserved","uint",32),this._parsing&&(this.length_size_of_traf_num=(48&this.reserved)>>4,this.length_size_of_trun_num=(12&this.reserved)>>2,this.length_size_of_sample_num=3&this.reserved),this._procField("number_of_entry","uint",32),this._procEntries("entries",this.number_of_entry,function(u){this._procEntryField(u,"time","uint",this.version===1?64:32),this._procEntryField(u,"moof_offset","uint",this.version===1?64:32),this._procEntryField(u,"traf_number","uint",8*(this.length_size_of_traf_num+1)),this._procEntryField(u,"trun_number","uint",8*(this.length_size_of_trun_num+1)),this._procEntryField(u,"sample_number","uint",8*(this.length_size_of_sample_num+1))})},I.prototype._boxProcessors.tkhd=function(){this._procFullBox(),this._procField("creation_time","uint",this.version==1?64:32),this._procField("modification_time","uint",this.version==1?64:32),this._procField("track_ID","uint",32),this._procField("reserved1","uint",32),this._procField("duration","uint",this.version==1?64:32),this._procFieldArray("reserved2",2,"uint",32),this._procField("layer","uint",16),this._procField("alternate_group","uint",16),this._procField("volume","template",16),this._procField("reserved3","uint",16),this._procFieldArray("matrix",9,"template",32),this._procField("width","template",32),this._procField("height","template",32)},I.prototype._boxProcessors.trex=function(){this._procFullBox(),this._procField("track_ID","uint",32),this._procField("default_sample_description_index","uint",32),this._procField("default_sample_duration","uint",32),this._procField("default_sample_size","uint",32),this._procField("default_sample_flags","uint",32)},I.prototype._boxProcessors.trun=function(){this._procFullBox(),this._procField("sample_count","uint",32),1&this.flags&&this._procField("data_offset","int",32),4&this.flags&&this._procField("first_sample_flags","uint",32),this._procEntries("samples",this.sample_count,function(u){256&this.flags&&this._procEntryField(u,"sample_duration","uint",32),512&this.flags&&this._procEntryField(u,"sample_size","uint",32),1024&this.flags&&this._procEntryField(u,"sample_flags","uint",32),2048&this.flags&&this._procEntryField(u,"sample_composition_time_offset",this.version===1?"int":"uint",32)})},I.prototype._boxProcessors["url "]=I.prototype._boxProcessors["urn "]=function(){this._procFullBox(),this.type==="urn "&&this._procField("name","string",-1),this._procField("location","string",-1)},I.prototype._boxProcessors.vlab=function(){this._procField("source_label","utf8")},I.prototype._boxProcessors.vmhd=function(){this._procFullBox(),this._procField("graphicsmode","uint",16),this._procFieldArray("opcolor",3,"uint",16)},I.prototype._boxProcessors.vttC=function(){this._procField("config","utf8")},I.prototype._boxProcessors.vtte=function(){}},8175:function(ve,Lt,M){ve.exports=M(7365).polyfill()},7365:function(ve,Lt,M){ve.exports=function(){function ct(tt){return typeof tt=="function"}var I=Array.isArray?Array.isArray:function(tt){return Object.prototype.toString.call(tt)==="[object Array]"},u=0,n=void 0,_=void 0,y=function(tt,at){T[u]=tt,T[u+1]=at,(u+=2)===2&&(_?_(q):J())},i=typeof window<"u"?window:void 0,h=i||{},g=h.MutationObserver||h.WebKitMutationObserver,r=typeof self>"u"&&typeof process<"u"&&{}.toString.call(process)==="[object process]",m=typeof Uint8ClampedArray<"u"&&typeof importScripts<"u"&&typeof MessageChannel<"u";function d(){var tt=setTimeout;return function(){return tt(q,1)}}var T=new Array(1e3);function q(){for(var tt=0;tt<u;tt+=2)(0,T[tt])(T[tt+1]),T[tt]=void 0,T[tt+1]=void 0;u=0}var W,x,nt,O,J=void 0;function pt(tt,at){var qt=this,v=new this.constructor(rt);v[X]===void 0&&Ae(v);var A=qt._state;if(A){var c=arguments[A-1];y(function(){return Ot(A,v,c,qt._result)})}else ie(qt,v,tt,at);return v}function G(tt){if(tt&&typeof tt=="object"&&tt.constructor===this)return tt;var at=new this(rt);return jt(at,tt),at}J=r?function(){return process.nextTick(q)}:g?(x=0,nt=new g(q),O=document.createTextNode(""),nt.observe(O,{characterData:!0}),function(){O.data=x=++x%2}):m?((W=new MessageChannel).port1.onmessage=q,function(){return W.port2.postMessage(0)}):i===void 0?function(){try{var tt=Function("return this")().require("vertx");return(n=tt.runOnLoop||tt.runOnContext)!==void 0?function(){n(q)}:d()}catch{return d()}}():d();var X=Math.random().toString(36).substring(2);function rt(){}var bt=void 0,Ut=1,mt=2;function lt(tt,at,qt){at.constructor===tt.constructor&&qt===pt&&at.constructor.resolve===G?function(v,A){A._state===Ut?Nt(v,A._result):A._state===mt?Ht(v,A._result):ie(A,void 0,function(c){return jt(v,c)},function(c){return Ht(v,c)})}(tt,at):qt===void 0?Nt(tt,at):ct(qt)?function(v,A,c){y(function(E){var Q=!1,D=function(Bt,Dt,At,Rt){try{Bt.call(Dt,At,Rt)}catch(_t){return _t}}(c,A,function(Bt){Q||(Q=!0,A!==Bt?jt(E,Bt):Nt(E,Bt))},function(Bt){Q||(Q=!0,Ht(E,Bt))},E._label);!Q&&D&&(Q=!0,Ht(E,D))},v)}(tt,at,qt):Nt(tt,at)}function jt(tt,at){if(tt===at)Ht(tt,new TypeError("You cannot resolve a promise with itself"));else if(A=typeof(v=at),v===null||A!=="object"&&A!=="function")Nt(tt,at);else{var qt=void 0;try{qt=at.then}catch(c){return void Ht(tt,c)}lt(tt,at,qt)}var v,A}function St(tt){tt._onerror&&tt._onerror(tt._result),It(tt)}function Nt(tt,at){tt._state===bt&&(tt._result=at,tt._state=Ut,tt._subscribers.length!==0&&y(It,tt))}function Ht(tt,at){tt._state===bt&&(tt._state=mt,tt._result=at,y(St,tt))}function ie(tt,at,qt,v){var A=tt._subscribers,c=A.length;tt._onerror=null,A[c]=at,A[c+Ut]=qt,A[c+mt]=v,c===0&&tt._state&&y(It,tt)}function It(tt){var at=tt._subscribers,qt=tt._state;if(at.length!==0){for(var v=void 0,A=void 0,c=tt._result,E=0;E<at.length;E+=3)v=at[E],A=at[E+qt],v?Ot(qt,v,A,c):A(c);tt._subscribers.length=0}}function Ot(tt,at,qt,v){var A=ct(qt),c=void 0,E=void 0,Q=!0;if(A){try{c=qt(v)}catch(D){Q=!1,E=D}if(at===c)return void Ht(at,new TypeError("A promises callback cannot return that same promise."))}else c=v;at._state!==bt||(A&&Q?jt(at,c):Q===!1?Ht(at,E):tt===Ut?Nt(at,c):tt===mt&&Ht(at,c))}var fe=0;function Ae(tt){tt[X]=fe++,tt._state=void 0,tt._result=void 0,tt._subscribers=[]}var Re=function(){function tt(at,qt){this._instanceConstructor=at,this.promise=new at(rt),this.promise[X]||Ae(this.promise),I(qt)?(this.length=qt.length,this._remaining=qt.length,this._result=new Array(this.length),this.length===0?Nt(this.promise,this._result):(this.length=this.length||0,this._enumerate(qt),this._remaining===0&&Nt(this.promise,this._result))):Ht(this.promise,new Error("Array Methods must be provided an Array"))}return tt.prototype._enumerate=function(at){for(var qt=0;this._state===bt&&qt<at.length;qt++)this._eachEntry(at[qt],qt)},tt.prototype._eachEntry=function(at,qt){var v=this._instanceConstructor,A=v.resolve;if(A===G){var c=void 0,E=void 0,Q=!1;try{c=at.then}catch(Bt){Q=!0,E=Bt}if(c===pt&&at._state!==bt)this._settledAt(at._state,qt,at._result);else if(typeof c!="function")this._remaining--,this._result[qt]=at;else if(v===Pe){var D=new v(rt);Q?Ht(D,E):lt(D,at,c),this._willSettleAt(D,qt)}else this._willSettleAt(new v(function(Bt){return Bt(at)}),qt)}else this._willSettleAt(A(at),qt)},tt.prototype._settledAt=function(at,qt,v){var A=this.promise;A._state===bt&&(this._remaining--,at===mt?Ht(A,v):this._result[qt]=v),this._remaining===0&&Nt(A,this._result)},tt.prototype._willSettleAt=function(at,qt){var v=this;ie(at,void 0,function(A){return v._settledAt(Ut,qt,A)},function(A){return v._settledAt(mt,qt,A)})},tt}(),Pe=function(){function tt(at){this[X]=fe++,this._result=this._state=void 0,this._subscribers=[],rt!==at&&(typeof at!="function"&&function(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}(),this instanceof tt?function(qt,v){try{v(function(A){jt(qt,A)},function(A){Ht(qt,A)})}catch(A){Ht(qt,A)}}(this,at):function(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}())}return tt.prototype.catch=function(at){return this.then(null,at)},tt.prototype.finally=function(at){var qt=this,v=qt.constructor;return ct(at)?qt.then(function(A){return v.resolve(at()).then(function(){return A})},function(A){return v.resolve(at()).then(function(){throw A})}):qt.then(at,at)},tt}();return Pe.prototype.then=pt,Pe.all=function(tt){return new Re(this,tt).promise},Pe.race=function(tt){var at=this;return I(tt)?new at(function(qt,v){for(var A=tt.length,c=0;c<A;c++)at.resolve(tt[c]).then(qt,v)}):new at(function(qt,v){return v(new TypeError("You must pass an array to race."))})},Pe.resolve=G,Pe.reject=function(tt){var at=new this(rt);return Ht(at,tt),at},Pe._setScheduler=function(tt){_=tt},Pe._setAsap=function(tt){y=tt},Pe._asap=y,Pe.polyfill=function(){var tt=void 0;if(M.g!==void 0)tt=M.g;else if(typeof self<"u")tt=self;else try{tt=Function("return this")()}catch{throw new Error("polyfill failed because global object is unavailable in this environment")}var at=tt.Promise;if(at){var qt=null;try{qt=Object.prototype.toString.call(at.resolve())}catch{}if(qt==="[object Promise]"&&!at.cast)return}tt.Promise=Pe},Pe.Promise=Pe,Pe}()},5572:function(ve){var Lt,M=typeof Reflect=="object"?Reflect:null,ct=M&&typeof M.apply=="function"?M.apply:function(q,W,x){return Function.prototype.apply.call(q,W,x)};Lt=M&&typeof M.ownKeys=="function"?M.ownKeys:Object.getOwnPropertySymbols?function(q){return Object.getOwnPropertyNames(q).concat(Object.getOwnPropertySymbols(q))}:function(q){return Object.getOwnPropertyNames(q)};var I=Number.isNaN||function(q){return q!=q};function u(){u.init.call(this)}ve.exports=u,ve.exports.once=function(q,W){return new Promise(function(x,nt){function O(pt){q.removeListener(W,J),nt(pt)}function J(){typeof q.removeListener=="function"&&q.removeListener("error",O),x([].slice.call(arguments))}T(q,W,J,{once:!0}),W!=="error"&&function(pt,G){typeof pt.on=="function"&&T(pt,"error",G,{once:!0})}(q,O)})},u.EventEmitter=u,u.prototype._events=void 0,u.prototype._eventsCount=0,u.prototype._maxListeners=void 0;var n=10;function _(q){if(typeof q!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof q)}function y(q){return q._maxListeners===void 0?u.defaultMaxListeners:q._maxListeners}function i(q,W,x,nt){var O,J,pt,G;if(_(x),(J=q._events)===void 0?(J=q._events=Object.create(null),q._eventsCount=0):(J.newListener!==void 0&&(q.emit("newListener",W,x.listener?x.listener:x),J=q._events),pt=J[W]),pt===void 0)pt=J[W]=x,++q._eventsCount;else if(typeof pt=="function"?pt=J[W]=nt?[x,pt]:[pt,x]:nt?pt.unshift(x):pt.push(x),(O=y(q))>0&&pt.length>O&&!pt.warned){pt.warned=!0;var X=new Error("Possible EventEmitter memory leak detected. "+pt.length+" "+String(W)+" listeners added. Use emitter.setMaxListeners() to increase limit");X.name="MaxListenersExceededWarning",X.emitter=q,X.type=W,X.count=pt.length,G=X,console&&console.warn&&console.warn(G)}return q}function h(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function g(q,W,x){var nt={fired:!1,wrapFn:void 0,target:q,type:W,listener:x},O=h.bind(nt);return O.listener=x,nt.wrapFn=O,O}function r(q,W,x){var nt=q._events;if(nt===void 0)return[];var O=nt[W];return O===void 0?[]:typeof O=="function"?x?[O.listener||O]:[O]:x?function(J){for(var pt=new Array(J.length),G=0;G<pt.length;++G)pt[G]=J[G].listener||J[G];return pt}(O):d(O,O.length)}function m(q){var W=this._events;if(W!==void 0){var x=W[q];if(typeof x=="function")return 1;if(x!==void 0)return x.length}return 0}function d(q,W){for(var x=new Array(W),nt=0;nt<W;++nt)x[nt]=q[nt];return x}function T(q,W,x,nt){if(typeof q.on=="function")nt.once?q.once(W,x):q.on(W,x);else{if(typeof q.addEventListener!="function")throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof q);q.addEventListener(W,function O(J){nt.once&&q.removeEventListener(W,O),x(J)})}}Object.defineProperty(u,"defaultMaxListeners",{enumerable:!0,get:function(){return n},set:function(q){if(typeof q!="number"||q<0||I(q))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+q+".");n=q}}),u.init=function(){this._events!==void 0&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},u.prototype.setMaxListeners=function(q){if(typeof q!="number"||q<0||I(q))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+q+".");return this._maxListeners=q,this},u.prototype.getMaxListeners=function(){return y(this)},u.prototype.emit=function(q){for(var W=[],x=1;x<arguments.length;x++)W.push(arguments[x]);var nt=q==="error",O=this._events;if(O!==void 0)nt=nt&&O.error===void 0;else if(!nt)return!1;if(nt){var J;if(W.length>0&&(J=W[0]),J instanceof Error)throw J;var pt=new Error("Unhandled error."+(J?" ("+J.message+")":""));throw pt.context=J,pt}var G=O[q];if(G===void 0)return!1;if(typeof G=="function")ct(G,this,W);else{var X=G.length,rt=d(G,X);for(x=0;x<X;++x)ct(rt[x],this,W)}return!0},u.prototype.addListener=function(q,W){return i(this,q,W,!1)},u.prototype.on=u.prototype.addListener,u.prototype.prependListener=function(q,W){return i(this,q,W,!0)},u.prototype.once=function(q,W){return _(W),this.on(q,g(this,q,W)),this},u.prototype.prependOnceListener=function(q,W){return _(W),this.prependListener(q,g(this,q,W)),this},u.prototype.removeListener=function(q,W){var x,nt,O,J,pt;if(_(W),(nt=this._events)===void 0)return this;if((x=nt[q])===void 0)return this;if(x===W||x.listener===W)--this._eventsCount==0?this._events=Object.create(null):(delete nt[q],nt.removeListener&&this.emit("removeListener",q,x.listener||W));else if(typeof x!="function"){for(O=-1,J=x.length-1;J>=0;J--)if(x[J]===W||x[J].listener===W){pt=x[J].listener,O=J;break}if(O<0)return this;O===0?x.shift():function(G,X){for(;X+1<G.length;X++)G[X]=G[X+1];G.pop()}(x,O),x.length===1&&(nt[q]=x[0]),nt.removeListener!==void 0&&this.emit("removeListener",q,pt||W)}return this},u.prototype.off=u.prototype.removeListener,u.prototype.removeAllListeners=function(q){var W,x,nt;if((x=this._events)===void 0)return this;if(x.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):x[q]!==void 0&&(--this._eventsCount==0?this._events=Object.create(null):delete x[q]),this;if(arguments.length===0){var O,J=Object.keys(x);for(nt=0;nt<J.length;++nt)(O=J[nt])!=="removeListener"&&this.removeAllListeners(O);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(typeof(W=x[q])=="function")this.removeListener(q,W);else if(W!==void 0)for(nt=W.length-1;nt>=0;nt--)this.removeListener(q,W[nt]);return this},u.prototype.listeners=function(q){return r(this,q,!0)},u.prototype.rawListeners=function(q){return r(this,q,!1)},u.listenerCount=function(q,W){return typeof q.listenerCount=="function"?q.listenerCount(W):m.call(q,W)},u.prototype.listenerCount=m,u.prototype.eventNames=function(){return this._eventsCount>0?Lt(this._events):[]}},426:function(ve){var Lt=Array.isArray,M=Object.keys,ct=Object.prototype.hasOwnProperty;ve.exports=function I(u,n){if(u===n)return!0;if(u&&n&&typeof u=="object"&&typeof n=="object"){var _,y,i,h=Lt(u),g=Lt(n);if(h&&g){if((y=u.length)!=n.length)return!1;for(_=y;_--!=0;)if(!I(u[_],n[_]))return!1;return!0}if(h!=g)return!1;var r=u instanceof Date,m=n instanceof Date;if(r!=m)return!1;if(r&&m)return u.getTime()==n.getTime();var d=u instanceof RegExp,T=n instanceof RegExp;if(d!=T)return!1;if(d&&T)return u.toString()==n.toString();var q=M(u);if((y=q.length)!==M(n).length)return!1;for(_=y;_--!=0;)if(!ct.call(n,q[_]))return!1;for(_=y;_--!=0;)if(!I(u[i=q[_]],n[i]))return!1;return!0}return u!=u&&n!=n}},5156:function(ve,Lt){Lt.read=function(M,ct,I,u,n){var _,y,i=8*n-u-1,h=(1<<i)-1,g=h>>1,r=-7,m=I?n-1:0,d=I?-1:1,T=M[ct+m];for(m+=d,_=T&(1<<-r)-1,T>>=-r,r+=i;r>0;_=256*_+M[ct+m],m+=d,r-=8);for(y=_&(1<<-r)-1,_>>=-r,r+=u;r>0;y=256*y+M[ct+m],m+=d,r-=8);if(_===0)_=1-g;else{if(_===h)return y?NaN:1/0*(T?-1:1);y+=Math.pow(2,u),_-=g}return(T?-1:1)*y*Math.pow(2,_-u)},Lt.write=function(M,ct,I,u,n,_){var y,i,h,g=8*_-n-1,r=(1<<g)-1,m=r>>1,d=n===23?Math.pow(2,-24)-Math.pow(2,-77):0,T=u?0:_-1,q=u?1:-1,W=ct<0||ct===0&&1/ct<0?1:0;for(ct=Math.abs(ct),isNaN(ct)||ct===1/0?(i=isNaN(ct)?1:0,y=r):(y=Math.floor(Math.log(ct)/Math.LN2),ct*(h=Math.pow(2,-y))<1&&(y--,h*=2),(ct+=y+m>=1?d/h:d*Math.pow(2,1-m))*h>=2&&(y++,h/=2),y+m>=r?(i=0,y=r):y+m>=1?(i=(ct*h-1)*Math.pow(2,n),y+=m):(i=ct*Math.pow(2,m-1)*Math.pow(2,n),y=0));n>=8;M[I+T]=255&i,T+=q,i/=256,n-=8);for(y=y<<n|i,g+=n;g>0;M[I+T]=255&y,T+=q,y/=256,g-=8);M[I+T-q]|=128*W}},288:function(ve,Lt,M){(function(ct){ct.parser=function(c,E){return new n(c,E)},ct.SAXParser=n,ct.SAXStream=y,ct.createStream=function(c,E){return new y(c,E)},ct.MAX_BUFFER_LENGTH=65536;var I,u=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];function n(c,E){if(!(this instanceof n))return new n(c,E);var Q=this;(function(D){for(var Bt=0,Dt=u.length;Bt<Dt;Bt++)D[u[Bt]]=""})(Q),Q.q=Q.c="",Q.bufferCheckPosition=ct.MAX_BUFFER_LENGTH,Q.opt=E||{},Q.opt.lowercase=Q.opt.lowercase||Q.opt.lowercasetags,Q.looseCase=Q.opt.lowercase?"toLowerCase":"toUpperCase",Q.tags=[],Q.closed=Q.closedRoot=Q.sawRoot=!1,Q.tag=Q.error=null,Q.strict=!!c,Q.noscript=!(!c&&!Q.opt.noscript),Q.state=lt.BEGIN,Q.strictEntities=Q.opt.strictEntities,Q.ENTITIES=Q.strictEntities?Object.create(ct.XML_ENTITIES):Object.create(ct.ENTITIES),Q.attribList=[],Q.opt.xmlns&&(Q.ns=Object.create(x)),Q.trackPosition=Q.opt.position!==!1,Q.trackPosition&&(Q.position=Q.line=Q.column=0),St(Q,"onready")}ct.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"],Object.create||(Object.create=function(c){function E(){}return E.prototype=c,new E}),Object.keys||(Object.keys=function(c){var E=[];for(var Q in c)c.hasOwnProperty(Q)&&E.push(Q);return E}),n.prototype={end:function(){Ot(this)},write:function(c){var E=this;if(this.error)throw this.error;if(E.closed)return It(E,"Cannot write after close. Assign an onready handler.");if(c===null)return Ot(E);typeof c=="object"&&(c=c.toString());for(var Q=0,D="";D=A(c,Q++),E.c=D,D;)switch(E.trackPosition&&(E.position++,D===`
|
|
19
|
-
`?(E.line++,E.column=0):E.column++),E.state){case lt.BEGIN:if(E.state=lt.BEGIN_WHITESPACE,D==="\uFEFF")continue;v(E,D);continue;case lt.BEGIN_WHITESPACE:v(E,D);continue;case lt.TEXT:if(E.sawRoot&&!E.closedRoot){for(var Bt=Q-1;D&&D!=="<"&&D!=="&";)(D=A(c,Q++))&&E.trackPosition&&(E.position++,D===`
|
|
20
|
-
`?(E.line++,E.column=0):E.column++);E.textNode+=c.substring(Bt,Q-1)}D!=="<"||E.sawRoot&&E.closedRoot&&!E.strict?(!rt(i,D)||E.sawRoot&&!E.closedRoot||fe(E,"Text data outside of root node."),D==="&"?E.state=lt.TEXT_ENTITY:E.textNode+=D):(E.state=lt.OPEN_WAKA,E.startTagPosition=E.position);continue;case lt.SCRIPT:D==="<"?E.state=lt.SCRIPT_ENDING:E.script+=D;continue;case lt.SCRIPT_ENDING:D==="/"?E.state=lt.CLOSE_TAG:(E.script+="<"+D,E.state=lt.SCRIPT);continue;case lt.OPEN_WAKA:if(D==="!")E.state=lt.SGML_DECL,E.sgmlDecl="";else if(!X(i,D))if(X(nt,D))E.state=lt.OPEN_TAG,E.tagName=D;else if(D==="/")E.state=lt.CLOSE_TAG,E.tagName="";else if(D==="?")E.state=lt.PROC_INST,E.procInstName=E.procInstBody="";else{if(fe(E,"Unencoded <"),E.startTagPosition+1<E.position){var Dt=E.position-E.startTagPosition;D=new Array(Dt).join(" ")+D}E.textNode+="<"+D,E.state=lt.TEXT}continue;case lt.SGML_DECL:(E.sgmlDecl+D).toUpperCase()===d?(Nt(E,"onopencdata"),E.state=lt.CDATA,E.sgmlDecl="",E.cdata=""):E.sgmlDecl+D==="--"?(E.state=lt.COMMENT,E.comment="",E.sgmlDecl=""):(E.sgmlDecl+D).toUpperCase()===T?(E.state=lt.DOCTYPE,(E.doctype||E.sawRoot)&&fe(E,"Inappropriately located doctype declaration"),E.doctype="",E.sgmlDecl=""):D===">"?(Nt(E,"onsgmldeclaration",E.sgmlDecl),E.sgmlDecl="",E.state=lt.TEXT):(X(r,D)&&(E.state=lt.SGML_DECL_QUOTED),E.sgmlDecl+=D);continue;case lt.SGML_DECL_QUOTED:D===E.q&&(E.state=lt.SGML_DECL,E.q=""),E.sgmlDecl+=D;continue;case lt.DOCTYPE:D===">"?(E.state=lt.TEXT,Nt(E,"ondoctype",E.doctype),E.doctype=!0):(E.doctype+=D,D==="["?E.state=lt.DOCTYPE_DTD:X(r,D)&&(E.state=lt.DOCTYPE_QUOTED,E.q=D));continue;case lt.DOCTYPE_QUOTED:E.doctype+=D,D===E.q&&(E.q="",E.state=lt.DOCTYPE);continue;case lt.DOCTYPE_DTD:E.doctype+=D,D==="]"?E.state=lt.DOCTYPE:X(r,D)&&(E.state=lt.DOCTYPE_DTD_QUOTED,E.q=D);continue;case lt.DOCTYPE_DTD_QUOTED:E.doctype+=D,D===E.q&&(E.state=lt.DOCTYPE_DTD,E.q="");continue;case lt.COMMENT:D==="-"?E.state=lt.COMMENT_ENDING:E.comment+=D;continue;case lt.COMMENT_ENDING:D==="-"?(E.state=lt.COMMENT_ENDED,E.comment=ie(E.opt,E.comment),E.comment&&Nt(E,"oncomment",E.comment),E.comment=""):(E.comment+="-"+D,E.state=lt.COMMENT);continue;case lt.COMMENT_ENDED:D!==">"?(fe(E,"Malformed comment"),E.comment+="--"+D,E.state=lt.COMMENT):E.state=lt.TEXT;continue;case lt.CDATA:D==="]"?E.state=lt.CDATA_ENDING:E.cdata+=D;continue;case lt.CDATA_ENDING:D==="]"?E.state=lt.CDATA_ENDING_2:(E.cdata+="]"+D,E.state=lt.CDATA);continue;case lt.CDATA_ENDING_2:D===">"?(E.cdata&&Nt(E,"oncdata",E.cdata),Nt(E,"onclosecdata"),E.cdata="",E.state=lt.TEXT):D==="]"?E.cdata+="]":(E.cdata+="]]"+D,E.state=lt.CDATA);continue;case lt.PROC_INST:D==="?"?E.state=lt.PROC_INST_ENDING:X(i,D)?E.state=lt.PROC_INST_BODY:E.procInstName+=D;continue;case lt.PROC_INST_BODY:if(!E.procInstBody&&X(i,D))continue;D==="?"?E.state=lt.PROC_INST_ENDING:E.procInstBody+=D;continue;case lt.PROC_INST_ENDING:D===">"?(Nt(E,"onprocessinginstruction",{name:E.procInstName,body:E.procInstBody}),E.procInstName=E.procInstBody="",E.state=lt.TEXT):(E.procInstBody+="?"+D,E.state=lt.PROC_INST_BODY);continue;case lt.OPEN_TAG:X(O,D)?E.tagName+=D:(Ae(E),D===">"?tt(E):D==="/"?E.state=lt.OPEN_TAG_SLASH:(rt(i,D)&&fe(E,"Invalid character in tag name"),E.state=lt.ATTRIB));continue;case lt.OPEN_TAG_SLASH:D===">"?(tt(E,!0),at(E)):(fe(E,"Forward-slash in opening tag not followed by >"),E.state=lt.ATTRIB);continue;case lt.ATTRIB:if(X(i,D))continue;D===">"?tt(E):D==="/"?E.state=lt.OPEN_TAG_SLASH:X(nt,D)?(E.attribName=D,E.attribValue="",E.state=lt.ATTRIB_NAME):fe(E,"Invalid attribute name");continue;case lt.ATTRIB_NAME:D==="="?E.state=lt.ATTRIB_VALUE:D===">"?(fe(E,"Attribute without value"),E.attribValue=E.attribName,Pe(E),tt(E)):X(i,D)?E.state=lt.ATTRIB_NAME_SAW_WHITE:X(O,D)?E.attribName+=D:fe(E,"Invalid attribute name");continue;case lt.ATTRIB_NAME_SAW_WHITE:if(D==="=")E.state=lt.ATTRIB_VALUE;else{if(X(i,D))continue;fe(E,"Attribute without value"),E.tag.attributes[E.attribName]="",E.attribValue="",Nt(E,"onattribute",{name:E.attribName,value:""}),E.attribName="",D===">"?tt(E):X(nt,D)?(E.attribName=D,E.state=lt.ATTRIB_NAME):(fe(E,"Invalid attribute name"),E.state=lt.ATTRIB)}continue;case lt.ATTRIB_VALUE:if(X(i,D))continue;X(r,D)?(E.q=D,E.state=lt.ATTRIB_VALUE_QUOTED):(fe(E,"Unquoted attribute value"),E.state=lt.ATTRIB_VALUE_UNQUOTED,E.attribValue=D);continue;case lt.ATTRIB_VALUE_QUOTED:if(D!==E.q){D==="&"?E.state=lt.ATTRIB_VALUE_ENTITY_Q:E.attribValue+=D;continue}Pe(E),E.q="",E.state=lt.ATTRIB_VALUE_CLOSED;continue;case lt.ATTRIB_VALUE_CLOSED:X(i,D)?E.state=lt.ATTRIB:D===">"?tt(E):D==="/"?E.state=lt.OPEN_TAG_SLASH:X(nt,D)?(fe(E,"No whitespace between attributes"),E.attribName=D,E.attribValue="",E.state=lt.ATTRIB_NAME):fe(E,"Invalid attribute name");continue;case lt.ATTRIB_VALUE_UNQUOTED:if(rt(m,D)){D==="&"?E.state=lt.ATTRIB_VALUE_ENTITY_U:E.attribValue+=D;continue}Pe(E),D===">"?tt(E):E.state=lt.ATTRIB;continue;case lt.CLOSE_TAG:if(E.tagName)D===">"?at(E):X(O,D)?E.tagName+=D:E.script?(E.script+="</"+E.tagName,E.tagName="",E.state=lt.SCRIPT):(rt(i,D)&&fe(E,"Invalid tagname in closing tag"),E.state=lt.CLOSE_TAG_SAW_WHITE);else{if(X(i,D))continue;rt(nt,D)?E.script?(E.script+="</"+D,E.state=lt.SCRIPT):fe(E,"Invalid tagname in closing tag."):E.tagName=D}continue;case lt.CLOSE_TAG_SAW_WHITE:if(X(i,D))continue;D===">"?at(E):fe(E,"Invalid characters in closing tag");continue;case lt.TEXT_ENTITY:case lt.ATTRIB_VALUE_ENTITY_Q:case lt.ATTRIB_VALUE_ENTITY_U:var At,Rt;switch(E.state){case lt.TEXT_ENTITY:At=lt.TEXT,Rt="textNode";break;case lt.ATTRIB_VALUE_ENTITY_Q:At=lt.ATTRIB_VALUE_QUOTED,Rt="attribValue";break;case lt.ATTRIB_VALUE_ENTITY_U:At=lt.ATTRIB_VALUE_UNQUOTED,Rt="attribValue"}D===";"?(E[Rt]+=qt(E),E.entity="",E.state=At):X(E.entity.length?pt:J,D)?E.entity+=D:(fe(E,"Invalid character in entity name"),E[Rt]+="&"+E.entity+D,E.entity="",E.state=At);continue;default:throw new Error(E,"Unknown state: "+E.state)}return E.position>=E.bufferCheckPosition&&function(_t){for(var Yt=Math.max(ct.MAX_BUFFER_LENGTH,10),Vt=0,Xt=0,ne=u.length;Xt<ne;Xt++){var Te=_t[u[Xt]].length;if(Te>Yt)switch(u[Xt]){case"textNode":Ht(_t);break;case"cdata":Nt(_t,"oncdata",_t.cdata),_t.cdata="";break;case"script":Nt(_t,"onscript",_t.script),_t.script="";break;default:It(_t,"Max buffer length exceeded: "+u[Xt])}Vt=Math.max(Vt,Te)}var me=ct.MAX_BUFFER_LENGTH-Vt;_t.bufferCheckPosition=me+_t.position}(E),E},resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){var c;Ht(c=this),c.cdata!==""&&(Nt(c,"oncdata",c.cdata),c.cdata=""),c.script!==""&&(Nt(c,"onscript",c.script),c.script="")}};try{I=M(7205).Stream}catch{I=function(){}}var _=ct.EVENTS.filter(function(c){return c!=="error"&&c!=="end"});function y(c,E){if(!(this instanceof y))return new y(c,E);I.apply(this),this._parser=new n(c,E),this.writable=!0,this.readable=!0;var Q=this;this._parser.onend=function(){Q.emit("end")},this._parser.onerror=function(D){Q.emit("error",D),Q._parser.error=null},this._decoder=null,_.forEach(function(D){Object.defineProperty(Q,"on"+D,{get:function(){return Q._parser["on"+D]},set:function(Bt){if(!Bt)return Q.removeAllListeners(D),Q._parser["on"+D]=Bt,Bt;Q.on(D,Bt)},enumerable:!0,configurable:!1})})}y.prototype=Object.create(I.prototype,{constructor:{value:y}}),y.prototype.write=function(c){if(typeof Buffer=="function"&&typeof Buffer.isBuffer=="function"&&Buffer.isBuffer(c)){if(!this._decoder){var E=M(950).I;this._decoder=new E("utf8")}c=this._decoder.write(c)}return this._parser.write(c.toString()),this.emit("data",c),!0},y.prototype.end=function(c){return c&&c.length&&this.write(c),this._parser.end(),!0},y.prototype.on=function(c,E){var Q=this;return Q._parser["on"+c]||_.indexOf(c)===-1||(Q._parser["on"+c]=function(){var D=arguments.length===1?[arguments[0]]:Array.apply(null,arguments);D.splice(0,0,c),Q.emit.apply(Q,D)}),I.prototype.on.call(Q,c,E)};var i=`\r
|
|
21
|
-
`,h="0124356789",g="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",r=`'"`,m=i+">",d="[CDATA[",T="DOCTYPE",q="http://www.w3.org/XML/1998/namespace",W="http://www.w3.org/2000/xmlns/",x={xml:q,xmlns:W};i=G(i),h=G(h),g=G(g);var nt=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,O=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040\.\d-]/,J=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,pt=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040\.\d-]/;function G(c){return c.split("").reduce(function(E,Q){return E[Q]=!0,E},{})}function X(c,E){return function(Q){return Object.prototype.toString.call(Q)==="[object RegExp]"}(c)?!!E.match(c):c[E]}function rt(c,E){return!X(c,E)}r=G(r),m=G(m);var bt,Ut,mt,lt=0;for(var jt in ct.STATE={BEGIN:lt++,BEGIN_WHITESPACE:lt++,TEXT:lt++,TEXT_ENTITY:lt++,OPEN_WAKA:lt++,SGML_DECL:lt++,SGML_DECL_QUOTED:lt++,DOCTYPE:lt++,DOCTYPE_QUOTED:lt++,DOCTYPE_DTD:lt++,DOCTYPE_DTD_QUOTED:lt++,COMMENT_STARTING:lt++,COMMENT:lt++,COMMENT_ENDING:lt++,COMMENT_ENDED:lt++,CDATA:lt++,CDATA_ENDING:lt++,CDATA_ENDING_2:lt++,PROC_INST:lt++,PROC_INST_BODY:lt++,PROC_INST_ENDING:lt++,OPEN_TAG:lt++,OPEN_TAG_SLASH:lt++,ATTRIB:lt++,ATTRIB_NAME:lt++,ATTRIB_NAME_SAW_WHITE:lt++,ATTRIB_VALUE:lt++,ATTRIB_VALUE_QUOTED:lt++,ATTRIB_VALUE_CLOSED:lt++,ATTRIB_VALUE_UNQUOTED:lt++,ATTRIB_VALUE_ENTITY_Q:lt++,ATTRIB_VALUE_ENTITY_U:lt++,CLOSE_TAG:lt++,CLOSE_TAG_SAW_WHITE:lt++,SCRIPT:lt++,SCRIPT_ENDING:lt++},ct.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},ct.ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830},Object.keys(ct.ENTITIES).forEach(function(c){var E=ct.ENTITIES[c],Q=typeof E=="number"?String.fromCharCode(E):E;ct.ENTITIES[c]=Q}),ct.STATE)ct.STATE[ct.STATE[jt]]=jt;function St(c,E,Q){c[E]&&c[E](Q)}function Nt(c,E,Q){c.textNode&&Ht(c),St(c,E,Q)}function Ht(c){c.textNode=ie(c.opt,c.textNode),c.textNode&&St(c,"ontext",c.textNode),c.textNode=""}function ie(c,E){return c.trim&&(E=E.trim()),c.normalize&&(E=E.replace(/\s+/g," ")),E}function It(c,E){return Ht(c),c.trackPosition&&(E+=`
|
|
22
|
-
Line: `+c.line+`
|
|
23
|
-
Column: `+c.column+`
|
|
24
|
-
Char: `+c.c),E=new Error(E),c.error=E,St(c,"onerror",E),c}function Ot(c){return c.sawRoot&&!c.closedRoot&&fe(c,"Unclosed root tag"),c.state!==lt.BEGIN&&c.state!==lt.BEGIN_WHITESPACE&&c.state!==lt.TEXT&&It(c,"Unexpected end"),Ht(c),c.c="",c.closed=!0,St(c,"onend"),n.call(c,c.strict,c.opt),c}function fe(c,E){if(typeof c!="object"||!(c instanceof n))throw new Error("bad call to strictFail");c.strict&&It(c,E)}function Ae(c){c.strict||(c.tagName=c.tagName[c.looseCase]());var E=c.tags[c.tags.length-1]||c,Q=c.tag={name:c.tagName,attributes:{}};c.opt.xmlns&&(Q.ns=E.ns),c.attribList.length=0,Nt(c,"onopentagstart",Q)}function Re(c,E){var Q=c.indexOf(":")<0?["",c]:c.split(":"),D=Q[0],Bt=Q[1];return E&&c==="xmlns"&&(D="xmlns",Bt=""),{prefix:D,local:Bt}}function Pe(c){if(c.strict||(c.attribName=c.attribName[c.looseCase]()),c.attribList.indexOf(c.attribName)!==-1||c.tag.attributes.hasOwnProperty(c.attribName))c.attribName=c.attribValue="";else{if(c.opt.xmlns){var E=Re(c.attribName,!0),Q=E.prefix,D=E.local;if(Q==="xmlns")if(D==="xml"&&c.attribValue!==q)fe(c,"xml: prefix must be bound to "+q+`
|
|
25
|
-
Actual: `+c.attribValue);else if(D==="xmlns"&&c.attribValue!==W)fe(c,"xmlns: prefix must be bound to "+W+`
|
|
26
|
-
Actual: `+c.attribValue);else{var Bt=c.tag,Dt=c.tags[c.tags.length-1]||c;Bt.ns===Dt.ns&&(Bt.ns=Object.create(Dt.ns)),Bt.ns[D]=c.attribValue}c.attribList.push([c.attribName,c.attribValue])}else c.tag.attributes[c.attribName]=c.attribValue,Nt(c,"onattribute",{name:c.attribName,value:c.attribValue});c.attribName=c.attribValue=""}}function tt(c,E){if(c.opt.xmlns){var Q=c.tag,D=Re(c.tagName);Q.prefix=D.prefix,Q.local=D.local,Q.uri=Q.ns[D.prefix]||"",Q.prefix&&!Q.uri&&(fe(c,"Unbound namespace prefix: "+JSON.stringify(c.tagName)),Q.uri=D.prefix);var Bt=c.tags[c.tags.length-1]||c;Q.ns&&Bt.ns!==Q.ns&&Object.keys(Q.ns).forEach(function(Ue){Nt(c,"onopennamespace",{prefix:Ue,uri:Q.ns[Ue]})});for(var Dt=0,At=c.attribList.length;Dt<At;Dt++){var Rt=c.attribList[Dt],_t=Rt[0],Yt=Rt[1],Vt=Re(_t,!0),Xt=Vt.prefix,ne=Vt.local,Te=Xt===""?"":Q.ns[Xt]||"",me={name:_t,value:Yt,prefix:Xt,local:ne,uri:Te};Xt&&Xt!=="xmlns"&&!Te&&(fe(c,"Unbound namespace prefix: "+JSON.stringify(Xt)),me.uri=Xt),c.tag.attributes[_t]=me,Nt(c,"onattribute",me)}c.attribList.length=0}c.tag.isSelfClosing=!!E,c.sawRoot=!0,c.tags.push(c.tag),Nt(c,"onopentag",c.tag),E||(c.noscript||c.tagName.toLowerCase()!=="script"?c.state=lt.TEXT:c.state=lt.SCRIPT,c.tag=null,c.tagName=""),c.attribName=c.attribValue="",c.attribList.length=0}function at(c){if(!c.tagName)return fe(c,"Weird empty close tag."),c.textNode+="</>",void(c.state=lt.TEXT);if(c.script){if(c.tagName!=="script")return c.script+="</"+c.tagName+">",c.tagName="",void(c.state=lt.SCRIPT);Nt(c,"onscript",c.script),c.script=""}var E=c.tags.length,Q=c.tagName;c.strict||(Q=Q[c.looseCase]());for(var D=Q;E--&&c.tags[E].name!==D;)fe(c,"Unexpected close tag");if(E<0)return fe(c,"Unmatched closing tag: "+c.tagName),c.textNode+="</"+c.tagName+">",void(c.state=lt.TEXT);c.tagName=Q;for(var Bt=c.tags.length;Bt-- >E;){var Dt=c.tag=c.tags.pop();c.tagName=c.tag.name,Nt(c,"onclosetag",c.tagName);var At={};for(var Rt in Dt.ns)At[Rt]=Dt.ns[Rt];var _t=c.tags[c.tags.length-1]||c;c.opt.xmlns&&Dt.ns!==_t.ns&&Object.keys(Dt.ns).forEach(function(Yt){var Vt=Dt.ns[Yt];Nt(c,"onclosenamespace",{prefix:Yt,uri:Vt})})}E===0&&(c.closedRoot=!0),c.tagName=c.attribValue=c.attribName="",c.attribList.length=0,c.state=lt.TEXT}function qt(c){var E,Q=c.entity,D=Q.toLowerCase(),Bt="";return c.ENTITIES[Q]?c.ENTITIES[Q]:c.ENTITIES[D]?c.ENTITIES[D]:((Q=D).charAt(0)==="#"&&(Q.charAt(1)==="x"?(Q=Q.slice(2),Bt=(E=parseInt(Q,16)).toString(16)):(Q=Q.slice(1),Bt=(E=parseInt(Q,10)).toString(10))),Q=Q.replace(/^0+/,""),Bt.toLowerCase()!==Q?(fe(c,"Invalid character entity"),"&"+c.entity+";"):String.fromCodePoint(E))}function v(c,E){E==="<"?(c.state=lt.OPEN_WAKA,c.startTagPosition=c.position):rt(i,E)&&(fe(c,"Non-whitespace before first tag."),c.textNode=E,c.state=lt.TEXT)}function A(c,E){var Q="";return E<c.length&&(Q=c.charAt(E)),Q}lt=ct.STATE,String.fromCodePoint||(bt=String.fromCharCode,Ut=Math.floor,mt=function(){var c,E,Q=[],D=-1,Bt=arguments.length;if(!Bt)return"";for(var Dt="";++D<Bt;){var At=Number(arguments[D]);if(!isFinite(At)||At<0||At>1114111||Ut(At)!==At)throw RangeError("Invalid code point: "+At);At<=65535?Q.push(At):(c=55296+((At-=65536)>>10),E=At%1024+56320,Q.push(c,E)),(D+1===Bt||Q.length>16384)&&(Dt+=bt.apply(null,Q),Q.length=0)}return Dt},Object.defineProperty?Object.defineProperty(String,"fromCodePoint",{value:mt,configurable:!0,writable:!0}):String.fromCodePoint=mt)})(Lt)},4421:function(ve,Lt,M){(function(ct,I,u,n,_){function y(A){if("contents"in A)for(var c=("styleAttrs"in A)?A.styleAttrs[n.byName.ruby.qname]:null,E=A.kind==="span"&&(c==="container"||c==="textContainer"||c==="baseContainer"),Q=A.contents.length-1;Q>=0;Q--)!E||"styleAttrs"in A.contents[Q]&&n.byName.ruby.qname in A.contents[Q].styleAttrs?y(A.contents[Q]):delete A.contents[Q]}function i(A,c,E,Q){var D=Q&&Q.timeContainer==="seq",Bt=0;Q&&(Bt=D&&E?E.end:Q.begin),c.begin=c.explicit_begin?c.explicit_begin+Bt:Bt;var Dt=c.begin,At=null;if("sets"in c)for(var Rt=0;Rt<c.sets.length;Rt++)i(A,c.sets[Rt],At,c),Dt=c.timeContainer==="seq"?c.sets[Rt].end:Math.max(Dt,c.sets[Rt].end),At=c.sets[Rt];if("contents"in c){if("contents"in c)for(var _t=0;_t<c.contents.length;_t++)i(A,c.contents[_t],At,c),Dt=c.timeContainer==="seq"?c.contents[_t].end:Math.max(Dt,c.contents[_t].end),At=c.contents[_t]}else Dt=D?c.begin:Number.POSITIVE_INFINITY;c.explicit_end!==null&&c.explicit_dur!==null?c.end=Math.min(c.begin+c.explicit_dur,Bt+c.explicit_end):c.explicit_end===null&&c.explicit_dur!==null?c.end=c.begin+c.explicit_dur:c.explicit_end!==null&&c.explicit_dur===null?c.end=Bt+c.explicit_end:c.end=Dt,delete c.explicit_begin,delete c.explicit_dur,delete c.explicit_end,A._registerEvent(c)}function h(A){this.node=A}function g(){this.events=[],this.head=new r,this.body=null}function r(){this.styling=new m,this.layout=new q}function m(){this.styles={},this.initials={}}function d(){this.id=null,this.styleAttrs=null,this.styleRefs=null}function T(){this.styleAttrs=null}function q(){this.regions={}}function W(A,c){x.call(this,"image"),this.src=A,this.type=c}function x(A){this.kind=A}function nt(A){this.id=A}function O(A){this.regionID=A}function J(A){this.styleAttrs=A}function pt(A){this.sets=A}function G(A){this.contents=A}function X(A,c,E){this.explicit_begin=A,this.explicit_end=c,this.explicit_dur=E}function rt(){x.call(this,"body")}function bt(){x.call(this,"div")}function Ut(){x.call(this,"p")}function mt(){x.call(this,"span")}function lt(){x.call(this,"span")}function jt(){x.call(this,"br")}function St(){}function Nt(){}function Ht(A){return A&&"xml:id"in A.attributes&&A.attributes["xml:id"].value||null}function ie(A){return A&&"style"in A.attributes?A.attributes.style.value.split(" "):[]}function It(A,c){var E={};if(A!==null)for(var Q in A.attributes){var D=A.attributes[Q].uri+" "+A.attributes[Q].local,Bt=n.byQName[D];if(Bt!==void 0){var Dt=Bt.parse(A.attributes[Q].value);Dt!==null?(E[D]=Dt,Bt===n.byName.zIndex&&tt(c,"zIndex attribute present but not used by IMSC1 since regions do not overlap")):at(c,"Cannot parse styling attribute "+D+" --> "+A.attributes[Q].value)}}return E}function Ot(A,c,E){for(var Q in A.attributes)if(A.attributes[Q].uri===c&&A.attributes[Q].local===E)return A.attributes[Q].value;return null}function fe(A,c,E){var Q,D=null;return(Q=/^(\d+(?:\.\d+)?)f$/.exec(E))!==null?c!==null&&(D=parseFloat(Q[1])/c):(Q=/^(\d+(?:\.\d+)?)t$/.exec(E))!==null?A!==null&&(D=parseFloat(Q[1])/A):(Q=/^(\d+(?:\.\d+)?)ms$/.exec(E))!==null?D=parseFloat(Q[1])/1e3:(Q=/^(\d+(?:\.\d+)?)s$/.exec(E))!==null?D=parseFloat(Q[1]):(Q=/^(\d+(?:\.\d+)?)h$/.exec(E))!==null?D=3600*parseFloat(Q[1]):(Q=/^(\d+(?:\.\d+)?)m$/.exec(E))!==null?D=60*parseFloat(Q[1]):(Q=/^(\d{2,}):(\d\d):(\d\d(?:\.\d+)?)$/.exec(E))!==null?D=3600*parseInt(Q[1])+60*parseInt(Q[2])+parseFloat(Q[3]):(Q=/^(\d{2,}):(\d\d):(\d\d)\:(\d{2,})$/.exec(E))!==null&&c!==null&&(D=3600*parseInt(Q[1])+60*parseInt(Q[2])+parseInt(Q[3])+(Q[4]===null?0:parseInt(Q[4])/c)),D}function Ae(A,c,E){for(;c.styleRefs.length>0;){var Q=c.styleRefs.pop();Q in A.styles?(Ae(A,A.styles[Q],E),Pe(A.styles[Q].styleAttrs,c.styleAttrs)):at(E,"Non-existant style id referenced")}}function Re(A,c,E,Q){for(var D=c.length-1;D>=0;D--){var Bt=c[D];Bt in A.styles?Pe(A.styles[Bt].styleAttrs,E):at(Q,"Non-existant style id referenced")}}function Pe(A,c){for(var E in A)A.hasOwnProperty(E)&&(E in c||(c[E]=A[E]))}function tt(A,c){if(A&&A.warn&&A.warn(c))throw c}function at(A,c){if(A&&A.error&&A.error(c))throw c}function qt(A,c){throw A&&A.fatal&&A.fatal(c),c}function v(A,c){for(var E,Q=0,D=A.length-1;Q<=D;){var Bt=A[E=Math.floor((Q+D)/2)];if(Bt<c)Q=E+1;else{if(!(Bt>c))return{found:!0,index:E};D=E-1}}return{found:!1,index:Q}}ct.fromXML=function(A,c,E){var Q=I.parser(!0,{xmlns:!0}),D=[],Bt=[],Dt=[],At=0,Rt=null;Q.onclosetag=function(ne){if(D[0]instanceof St)Rt.head!==null&&Rt.head.styling!==null&&Re(Rt.head.styling,D[0].styleRefs,D[0].styleAttrs,c),delete D[0].styleRefs;else if(D[0]instanceof m)for(var Te in D[0].styles)D[0].styles.hasOwnProperty(Te)&&Ae(D[0],D[0].styles[Te],c);else if(D[0]instanceof Ut||D[0]instanceof mt){if(D[0].contents.length>1){var me,Ue=[D[0].contents[0]];for(me=1;me<D[0].contents.length;me++)D[0].contents[me]instanceof lt&&Ue[Ue.length-1]instanceof lt?Ue[Ue.length-1].text+=D[0].contents[me].text:Ue.push(D[0].contents[me]);D[0].contents=Ue}D[0]instanceof mt&&D[0].contents.length===1&&D[0].contents[0]instanceof lt&&(D[0].text=D[0].contents[0].text,delete D[0].contents)}else D[0]instanceof h&&(D[0].node.uri===u.ns_tt&&D[0].node.local==="metadata"?At--:At>0&&E&&"onCloseTag"in E&&E.onCloseTag());Dt.shift(),Bt.shift(),D.shift()},Q.ontext=function(ne){if(D[0]!==void 0)if(D[0]instanceof mt||D[0]instanceof Ut){if(D[0]instanceof mt){var Te=D[0].styleAttrs[n.byName.ruby.qname];if(Te==="container"||Te==="textContainer"||Te==="baseContainer")return}var me=new lt;me.initFromText(Rt,D[0],ne,Bt[0],Dt[0],c),D[0].contents.push(me)}else D[0]instanceof h&&At>0&&E&&"onText"in E&&E.onText(ne)},Q.onopentag=function(ne){var Te=ne.attributes["xml:space"];Te?Dt.unshift(Te.value):Dt.length===0?Dt.unshift("default"):Dt.unshift(Dt[0]);var me=ne.attributes["xml:lang"];if(me?Bt.unshift(me.value):Bt.length===0?Bt.unshift(""):Bt.unshift(Bt[0]),ne.uri===u.ns_tt)if(ne.local==="tt")Rt!==null&&qt(c,"Two <tt> elements at ("+this.line+","+this.column+")"),(Rt=new g).initFromNode(ne,Bt[0],c),D.unshift(Rt);else if(ne.local==="head")D[0]instanceof g||qt(c,"Parent of <head> element is not <tt> at ("+this.line+","+this.column+")"),D.unshift(Rt.head);else if(ne.local==="styling")D[0]instanceof r||qt(c,"Parent of <styling> element is not <head> at ("+this.line+","+this.column+")"),D.unshift(Rt.head.styling);else if(ne.local==="style"){var Ue;D[0]instanceof m?((Ue=new d).initFromNode(ne,c),Ue.id?Rt.head.styling.styles[Ue.id]=Ue:at(c,"<style> element missing @id attribute"),D.unshift(Ue)):D[0]instanceof St?((Ue=new d).initFromNode(ne,c),Pe(Ue.styleAttrs,D[0].styleAttrs),D.unshift(Ue)):qt(c,"Parent of <style> element is not <styling> or <region> at ("+this.line+","+this.column+")")}else if(ne.local==="initial"){var Me;if(D[0]instanceof m){for(var ze in(Me=new T).initFromNode(ne,c),Me.styleAttrs)Me.styleAttrs.hasOwnProperty(ze)&&(Rt.head.styling.initials[ze]=Me.styleAttrs[ze]);D.unshift(Me)}else qt(c,"Parent of <initial> element is not <styling> at ("+this.line+","+this.column+")")}else if(ne.local==="layout")D[0]instanceof r||qt(c,"Parent of <layout> element is not <head> at "+this.line+","+this.column+")"),D.unshift(Rt.head.layout);else if(ne.local==="region"){D[0]instanceof q||qt(c,"Parent of <region> element is not <layout> at "+this.line+","+this.column+")");var Qe=new St;Qe.initFromNode(Rt,ne,Bt[0],c),!Qe.id||Qe.id in Rt.head.layout.regions?at(c,"Ignoring <region> with duplicate or missing @id at "+this.line+","+this.column+")"):Rt.head.layout.regions[Qe.id]=Qe,D.unshift(Qe)}else if(ne.local==="body"){D[0]instanceof g||qt(c,"Parent of <body> element is not <tt> at "+this.line+","+this.column+")"),Rt.body!==null&&qt(c,"Second <body> element at "+this.line+","+this.column+")");var nn=new rt;nn.initFromNode(Rt,ne,Bt[0],c),Rt.body=nn,D.unshift(nn)}else if(ne.local==="div"){D[0]instanceof bt||D[0]instanceof rt||qt(c,"Parent of <div> element is not <body> or <div> at "+this.line+","+this.column+")");var yn=new bt;yn.initFromNode(Rt,D[0],ne,Bt[0],c);var xn=yn.styleAttrs[n.byName.backgroundImage.qname];xn&&(yn.contents.push(new W(xn)),delete yn.styleAttrs[n.byName.backgroundImage.qname]),D[0].contents.push(yn),D.unshift(yn)}else if(ne.local==="image"){D[0]instanceof bt||qt(c,"Parent of <image> element is not <div> at "+this.line+","+this.column+")");var Yn=new W;Yn.initFromNode(Rt,D[0],ne,Bt[0],c),D[0].contents.push(Yn),D.unshift(Yn)}else if(ne.local==="p"){D[0]instanceof bt||qt(c,"Parent of <p> element is not <div> at "+this.line+","+this.column+")");var An=new Ut;An.initFromNode(Rt,D[0],ne,Bt[0],c),D[0].contents.push(An),D.unshift(An)}else if(ne.local==="span"){D[0]instanceof mt||D[0]instanceof Ut||qt(c,"Parent of <span> element is not <span> or <p> at "+this.line+","+this.column+")");var Un=new mt;Un.initFromNode(Rt,D[0],ne,Bt[0],Dt[0],c),D[0].contents.push(Un),D.unshift(Un)}else if(ne.local==="br"){D[0]instanceof mt||D[0]instanceof Ut||qt(c,"Parent of <br> element is not <span> or <p> at "+this.line+","+this.column+")");var Sn=new jt;Sn.initFromNode(Rt,D[0],ne,Bt[0],c),D[0].contents.push(Sn),D.unshift(Sn)}else if(ne.local==="set"){D[0]instanceof mt||D[0]instanceof Ut||D[0]instanceof bt||D[0]instanceof rt||D[0]instanceof St||D[0]instanceof jt||qt(c,"Parent of <set> element is not a content element or a region at "+this.line+","+this.column+")");var kn=new Nt;kn.initFromNode(Rt,D[0],ne,c),D[0].sets.push(kn),D.unshift(kn)}else D.unshift(new h(ne));else D.unshift(new h(ne));if(D[0]instanceof h){if(ne.uri===u.ns_tt&&ne.local==="metadata")At++;else if(At>0&&E&&"onOpenTag"in E){var Hn=[];for(var Kn in ne.attributes)Hn[ne.attributes[Kn].uri+" "+ne.attributes[Kn].local]={uri:ne.attributes[Kn].uri,local:ne.attributes[Kn].local,value:ne.attributes[Kn].value};E.onOpenTag(ne.uri,ne.local,Hn)}}},Q.write(A).close(),delete Rt.head.styling.styles;var _t=!1;for(var Yt in Rt.head.layout.regions)if(Rt.head.layout.regions.hasOwnProperty(Yt)){_t=!0;break}if(!_t){var Vt=St.prototype.createDefaultRegion(Rt.lang);Rt.head.layout.regions[Vt.id]=Vt}for(var Xt in Rt.head.layout.regions)Rt.head.layout.regions.hasOwnProperty(Xt)&&i(Rt,Rt.head.layout.regions[Xt],null,null);return Rt.body&&i(Rt,Rt.body,null,null),Rt.body&&y(Rt.body),Rt},g.prototype.initFromNode=function(A,c,E){var Q=function(At,Rt){var _t=Ot(At,u.ns_ttp,"cellResolution"),Yt=15,Vt=32;if(_t!==null){var Xt=/(\d+) (\d+)/.exec(_t);Xt!==null?(Vt=parseInt(Xt[1]),Yt=parseInt(Xt[2])):tt(Rt,"Malformed cellResolution value (using initial value instead)")}return{w:Vt,h:Yt}}(A,E);this.cellLength={h:new _.ComputedLength(0,1/Q.h),w:new _.ComputedLength(1/Q.w,0)};var D=function(At,Rt){var _t,Yt=Ot(At,u.ns_ttp,"frameRate"),Vt=30;Yt!==null&&((_t=/(\d+)/.exec(Yt))!==null?Vt=parseInt(_t[1]):tt(Rt,"Malformed frame rate attribute (using initial value instead)"));var Xt=Ot(At,u.ns_ttp,"frameRateMultiplier"),ne=1;Xt!==null&&((_t=/(\d+) (\d+)/.exec(Xt))!==null?ne=parseInt(_t[1])/parseInt(_t[2]):tt(Rt,"Malformed frame rate multiplier attribute (using initial value instead)"));var Te=ne*Vt,me=1,Ue=Ot(At,u.ns_ttp,"tickRate");return Ue===null?Yt!==null&&(me=Te):(_t=/(\d+)/.exec(Ue))!==null?me=parseInt(_t[1]):tt(Rt,"Malformed tick rate attribute (using initial value instead)"),{effectiveFrameRate:Te,tickRate:me}}(A,E);this.effectiveFrameRate=D.effectiveFrameRate,this.tickRate=D.tickRate,this.aspectRatio=function(At,Rt){var _t=Ot(At,u.ns_ittp,"aspectRatio");_t===null&&(_t=Ot(At,u.ns_ttp,"displayAspectRatio"));var Yt=null;if(_t!==null){var Vt=/(\d+)\s+(\d+)/.exec(_t);if(Vt!==null){var Xt=parseInt(Vt[1]),ne=parseInt(Vt[2]);Xt!==0&&ne!==0?Yt=Xt/ne:at(Rt,"Illegal aspectRatio values (ignoring)")}else at(Rt,"Malformed aspectRatio attribute (ignoring)")}return Yt}(A,E);var Bt=Ot(A,u.ns_ttp,"timeBase");Bt!==null&&Bt!=="media"&&qt(E,"Unsupported time base");var Dt=function(At,Rt){var _t=Ot(At,u.ns_tts,"extent");if(_t===null)return null;var Yt=_t.split(" ");if(Yt.length!==2)return tt(Rt,"Malformed extent (ignoring)"),null;var Vt=_.parseLength(Yt[0]),Xt=_.parseLength(Yt[1]);return Xt&&Vt?{h:Xt,w:Vt}:(tt(Rt,"Malformed extent values (ignoring)"),null)}(A,E);Dt===null?this.pxLength={h:null,w:null}:(Dt.h.unit==="px"&&Dt.w.unit==="px"||qt(E,"Extent on TT must be in px or absent"),this.pxLength={h:new _.ComputedLength(0,1/Dt.h.value),w:new _.ComputedLength(1/Dt.w.value,0)}),this.dimensions={h:new _.ComputedLength(0,1),w:new _.ComputedLength(1,0)},this.lang=c},g.prototype._registerEvent=function(A){if(!(A.end<=A.begin)){var c=v(this.events,A.begin);if(c.found||this.events.splice(c.index,0,A.begin),A.end!==Number.POSITIVE_INFINITY){var E=v(this.events,A.end);E.found||this.events.splice(E.index,0,A.end)}}},g.prototype.getMediaTimeRange=function(){return[this.events[0],this.events[this.events.length-1]]},g.prototype.getMediaTimeEvents=function(){return this.events},d.prototype.initFromNode=function(A,c){this.id=Ht(A),this.styleAttrs=It(A,c),this.styleRefs=ie(A)},T.prototype.initFromNode=function(A,c){for(var E in this.styleAttrs={},A.attributes)if(A.attributes[E].uri===u.ns_itts||A.attributes[E].uri===u.ns_ebutts||A.attributes[E].uri===u.ns_tts){var Q=A.attributes[E].uri+" "+A.attributes[E].local;this.styleAttrs[Q]=A.attributes[E].value}},W.prototype.initFromNode=function(A,c,E,Q,D){this.src="src"in E.attributes?E.attributes.src.value:null,this.src||at(D,"Invalid image@src attribute"),this.type="type"in E.attributes?E.attributes.type.value:null,this.type||at(D,"Invalid image@type attribute"),J.prototype.initFromNode.call(this,A,c,E,D),X.prototype.initFromNode.call(this,A,c,E,D),pt.prototype.initFromNode.call(this,A,c,E,D),O.prototype.initFromNode.call(this,A,c,E,D),this.lang=Q},nt.prototype.initFromNode=function(A,c,E,Q){this.id=Ht(E)},O.prototype.initFromNode=function(A,c,E,Q){this.regionID=function(D){return D&&"region"in D.attributes?D.attributes.region.value:""}(E)},J.prototype.initFromNode=function(A,c,E,Q){this.styleAttrs=It(E,Q),A.head!==null&&A.head.styling!==null&&Re(A.head.styling,ie(E),this.styleAttrs,Q)},pt.prototype.initFromNode=function(A,c,E,Q){this.sets=[]},G.prototype.initFromNode=function(A,c,E,Q){this.contents=[]},X.prototype.initFromNode=function(A,c,E,Q){var D=function(Bt,Dt,At,Rt){var _t=null;At&&"begin"in At.attributes&&(_t=fe(Bt.tickRate,Bt.effectiveFrameRate,At.attributes.begin.value))===null&&tt(Rt,"Malformed begin value "+At.attributes.begin.value+" (using 0)");var Yt=null;At&&"dur"in At.attributes&&(Yt=fe(Bt.tickRate,Bt.effectiveFrameRate,At.attributes.dur.value))===null&&tt(Rt,"Malformed dur value "+At.attributes.dur.value+" (ignoring)");var Vt=null;return At&&"end"in At.attributes&&(Vt=fe(Bt.tickRate,Bt.effectiveFrameRate,At.attributes.end.value))===null&&tt(Rt,"Malformed end value (ignoring)"),{explicit_begin:_t,explicit_end:Vt,explicit_dur:Yt}}(A,0,E,Q);this.explicit_begin=D.explicit_begin,this.explicit_end=D.explicit_end,this.explicit_dur=D.explicit_dur,this.timeContainer=function(Bt,Dt){var At=Bt&&"timeContainer"in Bt.attributes?Bt.attributes.timeContainer.value:null;return At&&At!=="par"?At==="seq"?"seq":(at(Dt,"Illegal value of timeContainer (assuming 'par')"),"par"):"par"}(E,Q)},rt.prototype.initFromNode=function(A,c,E,Q){J.prototype.initFromNode.call(this,A,null,c,Q),X.prototype.initFromNode.call(this,A,null,c,Q),pt.prototype.initFromNode.call(this,A,null,c,Q),O.prototype.initFromNode.call(this,A,null,c,Q),G.prototype.initFromNode.call(this,A,null,c,Q),this.lang=E},bt.prototype.initFromNode=function(A,c,E,Q,D){J.prototype.initFromNode.call(this,A,c,E,D),X.prototype.initFromNode.call(this,A,c,E,D),pt.prototype.initFromNode.call(this,A,c,E,D),O.prototype.initFromNode.call(this,A,c,E,D),G.prototype.initFromNode.call(this,A,c,E,D),this.lang=Q},Ut.prototype.initFromNode=function(A,c,E,Q,D){J.prototype.initFromNode.call(this,A,c,E,D),X.prototype.initFromNode.call(this,A,c,E,D),pt.prototype.initFromNode.call(this,A,c,E,D),O.prototype.initFromNode.call(this,A,c,E,D),G.prototype.initFromNode.call(this,A,c,E,D),this.lang=Q},mt.prototype.initFromNode=function(A,c,E,Q,D,Bt){J.prototype.initFromNode.call(this,A,c,E,Bt),X.prototype.initFromNode.call(this,A,c,E,Bt),pt.prototype.initFromNode.call(this,A,c,E,Bt),O.prototype.initFromNode.call(this,A,c,E,Bt),G.prototype.initFromNode.call(this,A,c,E,Bt),this.space=D,this.lang=Q},lt.prototype.initFromText=function(A,c,E,Q,D,Bt){X.prototype.initFromNode.call(this,A,c,null,Bt),this.text=E,this.space=D,this.lang=Q},jt.prototype.initFromNode=function(A,c,E,Q,D){O.prototype.initFromNode.call(this,A,c,E,D),X.prototype.initFromNode.call(this,A,c,E,D),this.lang=Q},St.prototype.createDefaultRegion=function(A){var c=new St;return nt.call(c,""),J.call(c,{}),pt.call(c,[]),X.call(c,0,Number.POSITIVE_INFINITY,null),this.lang=A,c},St.prototype.initFromNode=function(A,c,E,Q){nt.prototype.initFromNode.call(this,A,null,c,Q),X.prototype.initFromNode.call(this,A,null,c,Q),pt.prototype.initFromNode.call(this,A,null,c,Q),this.styleAttrs=It(c,Q),this.styleRefs=ie(c),this.lang=E},Nt.prototype.initFromNode=function(A,c,E,Q){X.prototype.initFromNode.call(this,A,c,E,Q);var D=It(E,Q);for(var Bt in this.qname=null,this.value=null,D)if(D.hasOwnProperty(Bt)){if(this.qname){at(Q,"More than one style specified on set");break}this.qname=Bt,this.value=D[Bt]}}})(Lt,typeof sax>"u"?M(288):sax,typeof imscNames>"u"?M(7019):imscNames,typeof imscStyles>"u"?M(7073):imscStyles,typeof imscUtils>"u"?M(346):imscUtils)},978:function(ve,Lt,M){var ct=/firefox/i.test(navigator.userAgent);(function(I,u,n){function _(G,X,rt,bt){var Ut;if(rt.kind==="region")(Ut=document.createElement("div")).style.position="absolute";else if(rt.kind==="body")Ut=document.createElement("div");else if(rt.kind==="div")Ut=document.createElement("div");else if(rt.kind==="image"){if(Ut=document.createElement("img"),G.imgResolver!==null&&rt.src!==null){var mt=G.imgResolver(rt.src,Ut);mt&&(Ut.src=mt),Ut.height=G.regionH,Ut.width=G.regionW}}else if(rt.kind==="p")Ut=document.createElement("p");else if(rt.kind==="span")if(rt.styleAttrs[n.byName.ruby.qname]==="container")Ut=document.createElement("ruby"),G.ruby=!0;else if(rt.styleAttrs[n.byName.ruby.qname]==="base")Ut=document.createElement("span");else if(rt.styleAttrs[n.byName.ruby.qname]==="text")Ut=document.createElement("rt");else if(rt.styleAttrs[n.byName.ruby.qname]==="baseContainer")Ut=document.createElement("rbc");else if(rt.styleAttrs[n.byName.ruby.qname]==="textContainer")Ut=document.createElement("rtc");else{if(rt.styleAttrs[n.byName.ruby.qname]==="delimiter")return;Ut=document.createElement("span")}else rt.kind==="br"&&(Ut=document.createElement("br"));if(Ut){if(rt.lang&&(rt.kind!=="region"&&rt.lang===bt.lang||(Ut.lang=rt.lang)),X.appendChild(Ut),Ut.style.margin="0",rt.kind==="region"){var lt=rt.styleAttrs[n.byName.writingMode.qname];lt==="lrtb"||lt==="lr"?(G.ipd="lr",G.bpd="tb"):lt==="rltb"||lt==="rl"?(G.ipd="rl",G.bpd="tb"):lt==="tblr"?(G.ipd="tb",G.bpd="lr"):lt!=="tbrl"&<!=="tb"||(G.ipd="tb",G.bpd="rl")}else if(rt.kind==="p"&&G.bpd==="tb"){var jt=rt.styleAttrs[n.byName.direction.qname];G.ipd=jt==="ltr"?"lr":"rl"}for(var St=0;St<T.length;St++){var Nt=T[St],Ht=rt.styleAttrs[Nt.qname];Ht!==void 0&&Nt.map!==null&&Nt.map(G,Ut,rt,Ht)}var ie=Ut,It=rt.styleAttrs[n.byName.linePadding.qname];if(It&&!It.isZero()){var Ot=It.toUsedLength(G.w,G.h);if(Ot>0){var fe=Math.ceil(Ot)+"px";G.bpd==="tb"?(ie.style.paddingLeft=fe,ie.style.paddingRight=fe):(ie.style.paddingTop=fe,ie.style.paddingBottom=fe),G.lp=It}}var Ae=rt.styleAttrs[n.byName.multiRowAlign.qname];if(Ae&&Ae!=="auto"){var Re=document.createElement("span");Re.style.display="inline-block",Re.style.textAlign=Ae,Ut.appendChild(Re),ie=Re,G.mra=Ae}var Pe=rt.styleAttrs[n.byName.rubyReserve.qname];if(Pe&&Pe[0]!=="none"&&(G.rubyReserve=Pe),rt.styleAttrs[n.byName.fillLineGap.qname]&&(G.flg=!0),rt.kind==="span"&&rt.text){var tt=rt.styleAttrs[n.byName.textEmphasis.qname];if(tt&&tt.style!=="none"&&(G.textEmphasis=!0),n.byName.textCombine.qname in rt.styleAttrs&&rt.styleAttrs[n.byName.textCombine.qname]==="all")Ut.textContent=rt.text,Ut._isd_element=rt,tt&&m(G,Ut,0,tt);else for(var at="",qt=0;qt<rt.text.length;qt++){at+=rt.text.charAt(qt);var v=rt.text.charCodeAt(qt);if(v<55296||v>56319||qt===rt.text.length-1){var A=document.createElement("span");A.textContent=at,tt&&m(G,A,0,tt),Ut.appendChild(A),at="",A._isd_element=rt}}}if("contents"in rt)for(var c=0;c<rt.contents.length;c++)_(G,ie,rt.contents[c],rt);var E=[];if(rt.kind==="p"&&(r(G,ie,E,null),G.rubyReserve&&(function(At,Rt){for(var _t=0;_t<At.length;_t++){var Yt,Vt,Xt=document.createElement("ruby"),ne=document.createElement("span");ne.textContent="",Xt.appendChild(ne);var Te,me=Rt.rubyReserve[1].toUsedLength(Rt.w,Rt.h)+"px";Rt.rubyReserve[0]==="both"||Rt.rubyReserve[0]==="outside"&&At.length==1?((Yt=document.createElement("rtc")).style[nt]=x?"after":"under",Yt.textContent="",Yt.style.fontSize=me,(Vt=document.createElement("rtc")).style[nt]=x?"before":"over",Vt.textContent="",Vt.style.fontSize=me,Xt.appendChild(Yt),Xt.appendChild(Vt)):((Yt=document.createElement("rtc")).textContent="",Yt.style.fontSize=me,Te=Rt.rubyReserve[0]==="after"||Rt.rubyReserve[0]==="outside"&&_t>0?x?"after":Rt.bpd==="tb"||Rt.bpd==="rl"?"under":"over":x?"before":Rt.bpd==="tb"||Rt.bpd==="rl"?"over":"under",Yt.style[nt]=Te,Xt.appendChild(Yt));for(var Ue=null,Me=0;Me<At[_t].rbc.length;Me++)if(At[_t].rbc[Me].localName==="ruby"){Ue=At[_t].rbc[Me];for(var ze=0;ze<Ue.style.length;ze++)Xt.style.setProperty(Ue.style.item(ze),Ue.style.getPropertyValue(Ue.style.item(ze)));break}(Ue=Ue||At[_t].elements[0].node).parentElement.insertBefore(Xt,Ue)}}(E,G),G.rubyReserve=null),(G.ruby||G.rubyReserve)&&(function(At,Rt){for(var _t=0;_t<At.length;_t++)for(var Yt=0;Yt<At[_t].rbc.length;Yt++){var Vt;At[_t].rbc[Yt].style[nt]||(Vt=x?_t===0?"before":"after":Rt.bpd==="tb"||Rt.bpd==="rl"?_t===0?"over":"under":_t===0?"under":"over",At[_t].rbc[Yt].style[nt]=Vt)}}(E,G),G.ruby=null),G.textEmphasis&&(function(At,Rt){for(var _t=0;_t<At.length;_t++)for(var Yt=0;Yt<At[_t].te.length;Yt++){var Vt;At[_t].te[Yt].style[J]&&At[_t].te[Yt].style[J]!=="none"||(Vt=Rt.bpd==="tb"?_t===0?"left over":"left under":Rt.bpd==="rl"?_t===0?"right under":"left under":_t===0?"left under":"right under",At[_t].te[Yt].style[J]=Vt)}}(E,G),G.textEmphasis=null),G.mra&&(function(At){for(var Rt=0;Rt<At.length-1;Rt++){var _t=At[Rt].elements.length;if(_t!==0&&At[Rt].br===!1){var Yt=document.createElement("br"),Vt=At[Rt].elements[_t-1].node;Vt.parentElement.insertBefore(Yt,Vt.nextSibling)}}}(E),G.mra=null),G.lp&&(function(At,Rt,_t){if(At!==null)for(var Yt=0;Yt<At.length;Yt++){var Vt=At[Yt].elements.length,Xt=Math.ceil(Rt)+"px",ne="-"+Math.ceil(Rt)+"px";if(Vt!==0){var Te=At[Yt].elements[At[Yt].start_elem],me=At[Yt].elements[At[Yt].end_elem];if(Te===me){var Ue=Te.node.getBoundingClientRect();if(Ue.width==0||Ue.height==0)continue}_t.ipd==="lr"?(Te.node.style.marginLeft=ne,Te.node.style.paddingLeft=Xt):_t.ipd==="rl"?(Te.node.style.paddingRight=Xt,Te.node.style.marginRight=ne):_t.ipd==="tb"&&(Te.node.style.paddingTop=Xt,Te.node.style.marginTop=ne),_t.ipd==="lr"?(ct||(me.node.style.marginRight=ne),me.node.style.paddingRight=Xt):_t.ipd==="rl"?(me.node.style.paddingLeft=Xt,ct||(me.node.style.marginLeft=ne)):_t.ipd==="tb"&&(me.node.style.paddingBottom=Xt,me.node.style.marginBottom=ne)}}}(E,G.lp.toUsedLength(G.w,G.h),G),G.lp=null),function(At,Rt){for(var _t=0;_t<At.length;_t++)for(var Yt=At[_t],Vt=1;Vt<Yt.elements.length;){var Xt=Yt.elements[Vt-1],ne=Yt.elements[Vt];i(Xt.node,ne.node,Rt)?Yt.elements.splice(Vt,1):Vt++}for(var Te,me,Ue=[],Me=0;Me<At.length;Me++)for(var ze=0;ze<At[Me].elements.length;ze++)(me=y(Te=At[Me].elements[ze].node,Ue,!1))&&(Te.style.backgroundColor=me);for(var Qe=0;Qe<Ue.length;Qe++)Ue[Qe].style.backgroundColor=""}(E,G),G.flg)){var Q=g(ie.getBoundingClientRect(),G);(function(At,Rt,_t,Yt){for(var Vt=Math.sign(_t-Rt),Xt=0;Xt<=At.length;Xt++){var ne,Te,me,Ue;if(ne=Xt===0?Math.round(Rt):Xt===At.length?Math.round(_t):Math.round((At[Xt-1].after+At[Xt].before)/2),Xt>0&&At[Xt-1])for(me=0;me<At[Xt-1].elements.length;me++)Te=Vt*(ne-(Ue=At[Xt-1].elements[me]).after)+"px",Yt.bpd==="lr"?Ue.node.style.paddingRight=Te:Yt.bpd==="rl"?Ue.node.style.paddingLeft=Te:Yt.bpd==="tb"&&(Ue.node.style.paddingBottom=Te);if(Xt<At.length)for(me=0;me<At[Xt].elements.length;me++)Te=Vt*((Ue=At[Xt].elements[me]).before-ne)+"px",Yt.bpd==="lr"?Ue.node.style.paddingLeft=Te:Yt.bpd==="rl"?Ue.node.style.paddingRight=Te:Yt.bpd==="tb"&&(Ue.node.style.paddingTop=Te)}})(E,Q.before,Q.after,G),G.flg=null}if(rt.kind==="region"&&G.bpd==="tb"&&G.enableRollUp&&rt.contents.length>0&&rt.styleAttrs[n.byName.displayAlign.qname]==="after"){r(G,ie,E,null);var D=new h(rt.id===""?"_":rt.id,E);if(G.currentISDState[D.id]=D,G.previousISDState&&D.id in G.previousISDState&&G.previousISDState[D.id].plist.length>0&&D.plist.length>1&&D.plist[D.plist.length-2].text===G.previousISDState[D.id].plist[G.previousISDState[D.id].plist.length-1].text){var Bt=Ut.firstElementChild,Dt=D.plist[D.plist.length-1].after-D.plist[D.plist.length-1].before;Bt.style.bottom="-"+Dt+"px",Bt.style.transition="transform 0.4s",Bt.style.position="relative",Bt.style.transform="translateY(-"+Dt+"px)"}}}else pt(G.errorHandler,"Error processing ISD element kind: "+rt.kind)}function y(G,X,rt){return G.style.backgroundColor?(rt&&!X.includes(G)&&X.push(G),G.style.backgroundColor):G.parentElement.nodeName==="SPAN"||G.parentElement.nodeName==="RUBY"||G.parentElement.nodeName==="RBC"||G.parentElement.nodeName==="RTC"||G.parentElement.nodeName==="RT"?y(G.parentElement,X,!0):void 0}function i(G,X,rt){if(G.tagName==="SPAN"&&X.tagName==="SPAN"&&G._isd_element===X._isd_element){if(!G._isd_element)return pt(rt.errorHandler,"Internal error: HTML span is not linked to a source element; cannot merge spans."),!1;G.textContent+=X.textContent;for(var bt=0;bt<X.style.length;bt++){var Ut=X.style[bt];(Ut.indexOf("border")>=0||Ut.indexOf("padding")>=0||Ut.indexOf("margin")>=0)&&(G.style[Ut]=X.style[Ut])}return X.parentElement.removeChild(X),!0}return!1}function h(G,X){this.id=G,this.plist=X}function g(G,X){var rt={before:null,after:null,start:null,end:null};return X.bpd==="tb"?(rt.before=G.top,rt.after=G.bottom,X.ipd==="lr"?(rt.start=G.left,rt.end=G.right):(rt.start=G.right,rt.end=G.left)):X.bpd==="lr"?(rt.before=G.left,rt.after=G.right,rt.start=G.top,rt.end=G.bottom):X.bpd==="rl"&&(rt.before=G.right,rt.after=G.left,rt.start=G.top,rt.end=G.bottom),rt}function r(G,X,rt,bt){if(X.localName!=="rt"&&X.localName!=="rtc"){var Ut,mt,lt,jt,St=X.style.backgroundColor||bt;if(X.childElementCount===0)if(X.localName==="span"||X.localName==="rb"){var Nt=g(X.getBoundingClientRect(),G);if(rt.length!==0&&(Ut=Nt.before,mt=Nt.after,lt=rt[rt.length-1].before,mt<(jt=rt[rt.length-1].after)&&Ut>lt||jt<=mt&<>=Ut)){var Ht=Math.sign(Nt.after-Nt.before),ie=Math.sign(Nt.end-Nt.start);Ht*(Nt.before-rt[rt.length-1].before)<0&&(rt[rt.length-1].before=Nt.before),Ht*(Nt.after-rt[rt.length-1].after)>0&&(rt[rt.length-1].after=Nt.after),ie*(Nt.start-rt[rt.length-1].start)<0&&(rt[rt.length-1].start=Nt.start,rt[rt.length-1].start_elem=rt[rt.length-1].elements.length),ie*(Nt.end-rt[rt.length-1].end)>0&&(rt[rt.length-1].end=Nt.end,rt[rt.length-1].end_elem=rt[rt.length-1].elements.length)}else rt.push({before:Nt.before,after:Nt.after,start:Nt.start,end:Nt.end,start_elem:0,end_elem:0,elements:[],rbc:[],te:[],text:"",br:!1});rt[rt.length-1].text+=X.textContent,rt[rt.length-1].elements.push({node:X,bgcolor:St,before:Nt.before,after:Nt.after})}else X.localName==="br"&&rt.length!==0&&(rt[rt.length-1].br=!0);else for(var It=X.firstChild;It;)It.nodeType===Node.ELEMENT_NODE&&(r(G,It,rt,St),It.localName==="ruby"||It.localName==="rtc"?rt.length>0&&rt[rt.length-1].rbc.push(It):It.localName==="span"&&It.style[O]&&It.style[O]!=="none"&&rt.length>0&&rt[rt.length-1].te.push(It)),It=It.nextSibling}}function m(G,X,rt,bt){var Ut;bt.style!=="none"&&(bt.style==="auto"?X.style[O]="filled":X.style[O]=bt.style+" "+bt.symbol,(bt.position==="before"||bt.position==="after")&&(Ut=G.bpd==="tb"?bt.position==="before"?"left over":"left under":G.bpd==="rl"?bt.position==="before"?"right under":"left under":bt.position==="before"?"left under":"right under",X.style[J]=Ut))}function d(G,X){this.qname=G,this.map=X}I.render=function(G,X,rt,bt,Ut,mt,lt,jt,St){var Nt=bt||X.clientHeight,Ht=Ut||X.clientWidth;if(G.aspectRatio!==null){var ie=Nt*G.aspectRatio;ie>Ht?Nt=Math.round(Ht/G.aspectRatio):Ht=ie}var It=document.createElement("div");It.style.position="relative",It.style.width=Ht+"px",It.style.height=Nt+"px",It.style.margin="auto",It.style.top=0,It.style.bottom=0,It.style.left=0,It.style.right=0,It.style.zIndex=0;var Ot={h:Nt,w:Ht,regionH:null,regionW:null,imgResolver:rt,displayForcedOnlyMode:mt||!1,isd:G,errorHandler:lt,previousISDState:jt,enableRollUp:St||!1,currentISDState:{},flg:null,lp:null,mra:null,ipd:null,bpd:null,ruby:null,textEmphasis:null,rubyReserve:null};if(X.appendChild(It),"contents"in G)for(var fe=0;fe<G.contents.length;fe++)_(Ot,It,G.contents[fe],G);return Ot.currentISDState};for(var T=[new d("http://www.w3.org/ns/ttml#styling backgroundColor",function(G,X,rt,bt){bt[3]!==0&&(X.style.backgroundColor="rgba("+bt[0].toString()+","+bt[1].toString()+","+bt[2].toString()+","+(bt[3]/255).toString()+")")}),new d("http://www.w3.org/ns/ttml#styling color",function(G,X,rt,bt){X.style.color="rgba("+bt[0].toString()+","+bt[1].toString()+","+bt[2].toString()+","+(bt[3]/255).toString()+")"}),new d("http://www.w3.org/ns/ttml#styling direction",function(G,X,rt,bt){X.style.direction=bt}),new d("http://www.w3.org/ns/ttml#styling display",function(G,X,rt,bt){}),new d("http://www.w3.org/ns/ttml#styling displayAlign",function(G,X,rt,bt){X.style.display="flex",X.style.flexDirection="column",bt==="before"?X.style.justifyContent="flex-start":bt==="center"?X.style.justifyContent="center":bt==="after"&&(X.style.justifyContent="flex-end")}),new d("http://www.w3.org/ns/ttml#styling extent",function(G,X,rt,bt){G.regionH=bt.h.toUsedLength(G.w,G.h),G.regionW=bt.w.toUsedLength(G.w,G.h);var Ut=0,mt=0,lt=rt.styleAttrs["http://www.w3.org/ns/ttml#styling padding"];lt&&(Ut=lt[0].toUsedLength(G.w,G.h)+lt[2].toUsedLength(G.w,G.h),mt=lt[1].toUsedLength(G.w,G.h)+lt[3].toUsedLength(G.w,G.h)),X.style.height=G.regionH-Ut+"px",X.style.width=G.regionW-mt+"px"}),new d("http://www.w3.org/ns/ttml#styling fontFamily",function(G,X,rt,bt){for(var Ut=[],mt=0;mt<bt.length;mt++)bt[mt]=bt[mt].trim(),bt[mt]==="monospaceSerif"?(Ut.push("Courier New"),Ut.push('"Liberation Mono"'),Ut.push("Courier"),Ut.push("monospace")):bt[mt]==="proportionalSansSerif"?(Ut.push("Arial"),Ut.push("Helvetica"),Ut.push('"Liberation Sans"'),Ut.push("sans-serif")):bt[mt]==="monospace"?Ut.push("monospace"):bt[mt]==="sansSerif"?Ut.push("sans-serif"):bt[mt]==="serif"?Ut.push("serif"):bt[mt]==="monospaceSansSerif"?(Ut.push("Consolas"),Ut.push("monospace")):bt[mt]==="proportionalSerif"?Ut.push("serif"):Ut.push(bt[mt]);if(Ut.length>0){for(var lt=[Ut[0]],jt=1;jt<Ut.length;jt++)lt.indexOf(Ut[jt])==-1&<.push(Ut[jt]);Ut=lt}X.style.fontFamily=Ut.join(",")}),new d("http://www.w3.org/ns/ttml#styling shear",function(G,X,rt,bt){if(bt!==0){var Ut=-.9*bt;G.bpd==="tb"?X.style.transform="skewX("+Ut+"deg)":X.style.transform="skewY("+Ut+"deg)"}}),new d("http://www.w3.org/ns/ttml#styling fontSize",function(G,X,rt,bt){X.style.fontSize=bt.toUsedLength(G.w,G.h)+"px"}),new d("http://www.w3.org/ns/ttml#styling fontStyle",function(G,X,rt,bt){X.style.fontStyle=bt}),new d("http://www.w3.org/ns/ttml#styling fontWeight",function(G,X,rt,bt){X.style.fontWeight=bt}),new d("http://www.w3.org/ns/ttml#styling lineHeight",function(G,X,rt,bt){X.style.lineHeight=bt==="normal"?"normal":bt.toUsedLength(G.w,G.h)+"px"}),new d("http://www.w3.org/ns/ttml#styling opacity",function(G,X,rt,bt){X.style.opacity=bt}),new d("http://www.w3.org/ns/ttml#styling origin",function(G,X,rt,bt){X.style.top=bt.h.toUsedLength(G.w,G.h)+"px",X.style.left=bt.w.toUsedLength(G.w,G.h)+"px"}),new d("http://www.w3.org/ns/ttml#styling overflow",function(G,X,rt,bt){X.style.overflow=bt}),new d("http://www.w3.org/ns/ttml#styling padding",function(G,X,rt,bt){var Ut=[];Ut[0]=bt[0].toUsedLength(G.w,G.h)+"px",Ut[1]=bt[3].toUsedLength(G.w,G.h)+"px",Ut[2]=bt[2].toUsedLength(G.w,G.h)+"px",Ut[3]=bt[1].toUsedLength(G.w,G.h)+"px",X.style.padding=Ut.join(" ")}),new d("http://www.w3.org/ns/ttml#styling position",function(G,X,rt,bt){X.style.top=bt.h.toUsedLength(G.w,G.h)+"px",X.style.left=bt.w.toUsedLength(G.w,G.h)+"px"}),new d("http://www.w3.org/ns/ttml#styling rubyAlign",function(G,X,rt,bt){X.style.rubyAlign=bt==="spaceAround"?"space-around":"center"}),new d("http://www.w3.org/ns/ttml#styling rubyPosition",function(G,X,rt,bt){var Ut;bt!=="before"&&bt!=="after"||(Ut=x?bt:G.bpd==="tb"||G.bpd==="rl"?bt==="before"?"over":"under":bt==="before"?"under":"over",X.parentElement.style[nt]=Ut)}),new d("http://www.w3.org/ns/ttml#styling showBackground",null),new d("http://www.w3.org/ns/ttml#styling textAlign",function(G,X,rt,bt){var Ut;Ut=bt==="start"?G.ipd==="rl"?"right":"left":bt==="end"?G.ipd==="rl"?"left":"right":bt,X.style.textAlign=Ut}),new d("http://www.w3.org/ns/ttml#styling textDecoration",function(G,X,rt,bt){X.style.textDecoration=bt.join(" ").replace("lineThrough","line-through")}),new d("http://www.w3.org/ns/ttml#styling textOutline",function(G,X,rt,bt){}),new d("http://www.w3.org/ns/ttml#styling textShadow",function(G,X,rt,bt){var Ut=rt.styleAttrs[n.byName.textOutline.qname];if(bt==="none"&&Ut==="none")X.style.textShadow="";else{var mt=[];if(Ut!=="none"){var lt="rgba("+Ut.color[0].toString()+","+Ut.color[1].toString()+","+Ut.color[2].toString()+","+(Ut.color[3]/255).toString()+")";mt.push("1px 1px 1px "+lt),mt.push("-1px 1px 1px "+lt),mt.push("1px -1px 1px "+lt),mt.push("-1px -1px 1px "+lt)}if(bt!=="none")for(var jt=0;jt<bt.length;jt++)mt.push(bt[jt].x_off.toUsedLength(G.w,G.h)+"px "+bt[jt].y_off.toUsedLength(G.w,G.h)+"px "+bt[jt].b_radius.toUsedLength(G.w,G.h)+"px rgba("+bt[jt].color[0].toString()+","+bt[jt].color[1].toString()+","+bt[jt].color[2].toString()+","+(bt[jt].color[3]/255).toString()+")");X.style.textShadow=mt.join(",")}}),new d("http://www.w3.org/ns/ttml#styling textCombine",function(G,X,rt,bt){X.style.textCombineUpright=bt}),new d("http://www.w3.org/ns/ttml#styling textEmphasis",function(G,X,rt,bt){}),new d("http://www.w3.org/ns/ttml#styling unicodeBidi",function(G,X,rt,bt){var Ut;Ut=bt==="bidiOverride"?"bidi-override":bt,X.style.unicodeBidi=Ut}),new d("http://www.w3.org/ns/ttml#styling visibility",function(G,X,rt,bt){X.style.visibility=bt}),new d("http://www.w3.org/ns/ttml#styling wrapOption",function(G,X,rt,bt){bt==="wrap"?rt.space==="preserve"?X.style.whiteSpace="pre-wrap":X.style.whiteSpace="normal":rt.space==="preserve"?X.style.whiteSpace="pre":X.style.whiteSpace="noWrap"}),new d("http://www.w3.org/ns/ttml#styling writingMode",function(G,X,rt,bt){bt==="lrtb"||bt==="lr"||bt==="rltb"||bt==="rl"?X.style.writingMode="horizontal-tb":bt==="tblr"?X.style.writingMode="vertical-lr":bt!=="tbrl"&&bt!=="tb"||(X.style.writingMode="vertical-rl")}),new d("http://www.w3.org/ns/ttml#styling zIndex",function(G,X,rt,bt){X.style.zIndex=bt}),new d("http://www.w3.org/ns/ttml/profile/imsc1#styling forcedDisplay",function(G,X,rt,bt){G.displayForcedOnlyMode&&bt===!1&&(X.style.visibility="hidden")})],q={},W=0;W<T.length;W++)q[T[W].qname]=T[W];var x="webkitRubyPosition"in window.getComputedStyle(document.documentElement),nt=x?"webkitRubyPosition":"rubyPosition",O="webkitTextEmphasisStyle"in window.getComputedStyle(document.documentElement)?"webkitTextEmphasisStyle":"textEmphasisStyle",J="webkitTextEmphasisPosition"in window.getComputedStyle(document.documentElement)?"webkitTextEmphasisPosition":"textEmphasisPosition";function pt(G,X){if(G&&G.error&&G.error(X))throw X}})(Lt,typeof imscNames>"u"?M(7019):imscNames,typeof imscStyles>"u"?M(7073):imscStyles,typeof imscUtils>"u"?M(346):imscUtils)},5223:function(ve,Lt,M){(function(ct,I,u,n){ct.generateISD=function(d,T,q){var W,x=new g(d),nt={},O={},J=d.head.styling.initials[u.byName.showBackground.qname],pt=d.head.styling.initials[u.byName.backgroundColor.qname];for(var G in d.head.layout.regions)if(d.head.layout.regions.hasOwnProperty(G)){var X=d.head.layout.regions[G],rt=X.styleAttrs[u.byName.showBackground.qname]||J,bt=X.styleAttrs[u.byName.backgroundColor.qname]||pt;O[X.id]=(rt==="always"||rt===void 0)&&bt!==void 0&&!(T<X.begin||T>=X.end)}for(var Ut in d.body&&d.body.regionID&&(O[d.body.regionID]=!0),W=d.body!==null?function lt(jt,St){if(St.contents){var Nt={};for(var Ht in St)St.hasOwnProperty(Ht)&&(Nt[Ht]=St[Ht]);return Nt.contents=[],St.contents.filter(function(ie){return!(jt<ie.begin||jt>=ie.end)}).forEach(function(ie){var It=lt(jt,ie);It.regionID&&(O[It.regionID]=!0),It!==null&&Nt.contents.push(It)}),Nt}return St}(T,d.body):null,O[""]!==void 0&&(O[""]=!0),O)if(O[Ut]){var mt=y(d,T,d.head.layout.regions[Ut],W,null,"",d.head.layout.regions[Ut],q,nt);mt!==null&&x.contents.push(mt.element)}return x};var _=[u.byName.color.qname,u.byName.textCombine.qname,u.byName.textDecoration.qname,u.byName.textEmphasis.qname,u.byName.textOutline.qname,u.byName.textShadow.qname];function y(d,T,q,W,x,nt,O,J,pt){if(T<O.begin||T>=O.end)return null;var G="regionID"in O&&O.regionID!==""?O.regionID:nt;if(x!==null&&G!==q.id&&(!("contents"in O)||"contents"in O&&O.contents.length===0||G!==""))return null;var X=new r(O);if("sets"in O)for(var rt=0;rt<O.sets.length;rt++)T<O.sets[rt].begin||T>=O.sets[rt].end||(X.styleAttrs[O.sets[rt].qname]=O.sets[rt].value);var bt={};for(var Ut in X.styleAttrs)if(X.styleAttrs.hasOwnProperty(Ut)&&(bt[Ut]=!0,X.kind==="region"&&Ut===u.byName.writingMode.qname&&!(u.byName.direction.qname in X.styleAttrs))){var mt=X.styleAttrs[Ut];mt==="lrtb"||mt==="lr"?X.styleAttrs[u.byName.direction.qname]="ltr":mt!=="rltb"&&mt!=="rl"||(X.styleAttrs[u.byName.direction.qname]="rtl")}if(x!==null)for(var lt=0;lt<u.all.length;lt++){var jt=u.all[lt];if(jt.qname===u.byName.textDecoration.qname){var St=x.styleAttrs[jt.qname],Nt=X.styleAttrs[jt.qname],Ht=[];Nt===void 0?Ht=St:Nt.indexOf("none")===-1?((Nt.indexOf("noUnderline")===-1&&St.indexOf("underline")!==-1||Nt.indexOf("underline")!==-1)&&Ht.push("underline"),(Nt.indexOf("noLineThrough")===-1&&St.indexOf("lineThrough")!==-1||Nt.indexOf("lineThrough")!==-1)&&Ht.push("lineThrough"),(Nt.indexOf("noOverline")===-1&&St.indexOf("overline")!==-1||Nt.indexOf("overline")!==-1)&&Ht.push("overline")):Ht.push("none"),X.styleAttrs[jt.qname]=Ht}else if(jt.qname!==u.byName.fontSize.qname||jt.qname in X.styleAttrs||X.kind!=="span"||X.styleAttrs[u.byName.ruby.qname]!=="textContainer")if(jt.qname!==u.byName.fontSize.qname||jt.qname in X.styleAttrs||X.kind!=="span"||X.styleAttrs[u.byName.ruby.qname]!=="text")jt.inherit&&jt.qname in x.styleAttrs&&!(jt.qname in X.styleAttrs)&&(X.styleAttrs[jt.qname]=x.styleAttrs[jt.qname]);else{var ie=x.styleAttrs[u.byName.fontSize.qname];x.styleAttrs[u.byName.ruby.qname]==="textContainer"?X.styleAttrs[jt.qname]=ie:X.styleAttrs[jt.qname]=new n.ComputedLength(.5*ie.rw,.5*ie.rh)}else{var It=x.styleAttrs[u.byName.fontSize.qname];X.styleAttrs[jt.qname]=new n.ComputedLength(.5*It.rw,.5*It.rh)}}for(var Ot=0;Ot<u.all.length;Ot++){var fe=u.all[Ot];if(!(fe.qname in X.styleAttrs)&&!(fe.qname===u.byName.position.qname&&u.byName.origin.qname in X.styleAttrs||fe.qname===u.byName.origin.qname&&u.byName.position.qname in X.styleAttrs)){var Ae=d.head.styling.initials[fe.qname]||fe.initial;if(Ae!==null&&(X.kind==="region"||fe.inherit===!1&&Ae!==null)){var Re=fe.parse(Ae);Re!==null?(X.styleAttrs[fe.qname]=Re,bt[fe.qname]=!0):m(J,"Invalid initial value for '"+fe.qname+"' on element '"+X.kind)}}}for(var Pe=0;Pe<u.all.length;Pe++){var tt=u.all[Pe];if(tt.qname in bt&&tt.compute!==null){var at=tt.compute(d,x,X,X.styleAttrs[tt.qname],pt);at!==null?X.styleAttrs[tt.qname]=at:(X.styleAttrs[tt.qname]=tt.compute(d,x,X,tt.parse(tt.initial),pt),m(J,"Style '"+tt.qname+"' on element '"+X.kind+"' cannot be computed"))}}if(X.styleAttrs[u.byName.display.qname]==="none")return null;var qt=null;x===null?qt=W===null?[]:[W]:"contents"in O&&(qt=O.contents);for(var v=0;qt!==null&&v<qt.length;v++){var A=y(d,T,q,W,X,G,qt[v],J,pt);A!==null&&X.contents.push(A.element)}for(var c in X.styleAttrs)if(X.styleAttrs.hasOwnProperty(c)){var E=!1;if(X.kind==="span"){var Q=X.styleAttrs[u.byName.ruby.qname];(E=(Q==="container"||Q==="textContainer"||Q==="baseContainer")&&_.indexOf(c)!==-1)||(E=Q!=="container"&&c===u.byName.rubyAlign.qname),E||(E=!(Q==="textContainer"||Q==="text")&&c===u.byName.rubyPosition.qname)}if(!E){var D=u.byQName[c];"applies"in D&&(E=D.applies.indexOf(X.kind)===-1)}E&&delete X.styleAttrs[c]}var Bt=X.styleAttrs[u.byName.ruby.qname];if(X.kind==="p"||X.kind==="span"&&(Bt==="textContainer"||Bt==="text")){var Dt=[];i(X,Dt),function(At){for(var Rt,_t=0;_t<At.length;)if((Rt=At[_t]).kind!=="br"&&Rt.space!=="preserve"){var Yt=Rt.text.replace(/[\t\r\n ]+/g," ");/^[ ]/.test(Yt)&&(_t===0||(Vt=At[_t-1]).kind==="br"||/[\r\n\t ]$/.test(Vt.text))&&(Yt=Yt.substring(1)),Rt.text=Yt,Yt.length===0?At.splice(_t,1):_t++}else _t++;var Vt,Xt;for(_t=0;_t<At.length;_t++)(Rt=At[_t]).kind!=="br"&&Rt.space!=="preserve"?/[ ]$/.test(Rt.text)&&(_t===At.length-1||(Xt=At[_t+1]).kind==="br"||Xt.space==="preserve"&&/^[\r\n]/.test(Xt.text))&&(Rt.text=Rt.text.slice(0,-1)):_t++}(Dt),h(X)}return X.kind==="div"&&u.byName.backgroundImage.qname in X.styleAttrs||X.kind==="br"||X.kind==="image"||"contents"in X&&X.contents.length>0||X.kind==="span"&&X.text!==null||X.kind==="region"&&X.styleAttrs[u.byName.showBackground.qname]==="always"?{region_id:G,element:X}:null}function i(d,T){if("contents"in d)for(var q=0;q<d.contents.length;q++){var W=d.contents[q],x=W.styleAttrs[u.byName.ruby.qname];(W.kind!=="span"||x!=="textContainer"&&x!=="text")&&("contents"in W?i(W,T):(W.kind==="span"&&W.text.length!==0||W.kind==="br")&&T.push(W))}}function h(d){if(d.kind==="br")return!1;if("text"in d)return d.text.length===0;if("contents"in d){for(var T=d.contents.length;T--;)h(d.contents[T])&&d.contents.splice(T,1);return d.contents.length===0}}function g(d){this.contents=[],this.aspectRatio=d.aspectRatio,this.lang=d.lang}function r(d){for(var T in this.kind=d.kind||"region",this.lang=d.lang,d.id&&(this.id=d.id),this.styleAttrs={},d.styleAttrs)d.styleAttrs.hasOwnProperty(T)&&(this.styleAttrs[T]=d.styleAttrs[T]);"src"in d&&(this.src=d.src),"type"in d&&(this.type=d.type),"text"in d?this.text=d.text:(this.kind==="region"||"contents"in d)&&(this.contents=[]),"space"in d&&(this.space=d.space)}function m(d,T){if(d&&d.error&&d.error(T))throw T}})(Lt,typeof imscNames>"u"?M(7019):imscNames,typeof imscStyles>"u"?M(7073):imscStyles,typeof imscUtils>"u"?M(346):imscUtils)},6586:function(ve,Lt,M){Lt.generateISD=M(5223).generateISD,Lt.fromXML=M(4421).fromXML,Lt.renderHTML=M(978).render},7019:function(ve,Lt){(function(M){M.ns_tt="http://www.w3.org/ns/ttml",M.ns_tts="http://www.w3.org/ns/ttml#styling",M.ns_ttp="http://www.w3.org/ns/ttml#parameter",M.ns_xml="http://www.w3.org/XML/1998/namespace",M.ns_itts="http://www.w3.org/ns/ttml/profile/imsc1#styling",M.ns_ittp="http://www.w3.org/ns/ttml/profile/imsc1#parameter",M.ns_smpte="http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt",M.ns_ebutts="urn:ebu:tt:style"})(Lt)},7073:function(ve,Lt,M){(function(ct,I,u){function n(i,h,g,r,m,d,T,q){this.name=h,this.ns=i,this.qname=i+" "+h,this.inherit=m,this.animatable=d,this.initial=g,this.applies=r,this.parse=T,this.compute=q}for(var _ in ct.all=[new n(I.ns_tts,"backgroundColor","transparent",["body","div","p","region","span"],!1,!0,u.parseColor,null),new n(I.ns_tts,"color","white",["span"],!0,!0,u.parseColor,null),new n(I.ns_tts,"direction","ltr",["p","span"],!0,!0,function(i){return i},null),new n(I.ns_tts,"display","auto",["body","div","p","region","span"],!1,!0,function(i){return i},null),new n(I.ns_tts,"displayAlign","before",["region"],!1,!0,function(i){return i},null),new n(I.ns_tts,"extent","auto",["tt","region"],!1,!0,function(i){if(i==="auto")return i;var h=i.split(" ");if(h.length!==2)return null;var g=u.parseLength(h[0]),r=u.parseLength(h[1]);return r&&g?{h:r,w:g}:null},function(i,h,g,r,m){var d,T;if(r==="auto")d=new u.ComputedLength(0,1);else if((d=u.toComputedLength(r.h.value,r.h.unit,null,i.dimensions.h,null,i.pxLength.h))===null)return null;if(r==="auto")T=new u.ComputedLength(1,0);else if((T=u.toComputedLength(r.w.value,r.w.unit,null,i.dimensions.w,null,i.pxLength.w))===null)return null;return{h:d,w:T}}),new n(I.ns_tts,"fontFamily","default",["span","p"],!0,!0,function(i){for(var h=i.split(","),g=[],r=0;r<h.length;r++)h[r]=h[r].trim(),h[r].charAt(0)!=="'"&&h[r].charAt(0)!=='"'&&h[r]==="default"?g.push("monospaceSerif"):g.push(h[r]);return g},null),new n(I.ns_tts,"shear","0%",["p"],!0,!0,u.parseLength,function(i,h,g,r){return r.unit!=="%"?null:Math.abs(r.value)>100?100*Math.sign(r.value):r.value}),new n(I.ns_tts,"fontSize","1c",["span","p"],!0,!0,u.parseLength,function(i,h,g,r,m){return u.toComputedLength(r.value,r.unit,h!==null?h.styleAttrs[ct.byName.fontSize.qname]:i.cellLength.h,h!==null?h.styleAttrs[ct.byName.fontSize.qname]:i.cellLength.h,i.cellLength.h,i.pxLength.h)}),new n(I.ns_tts,"fontStyle","normal",["span","p"],!0,!0,function(i){return i},null),new n(I.ns_tts,"fontWeight","normal",["span","p"],!0,!0,function(i){return i},null),new n(I.ns_tts,"lineHeight","normal",["p"],!0,!0,function(i){return i==="normal"?i:u.parseLength(i)},function(i,h,g,r,m){var d;if(r==="normal")d=r;else if((d=u.toComputedLength(r.value,r.unit,g.styleAttrs[ct.byName.fontSize.qname],g.styleAttrs[ct.byName.fontSize.qname],i.cellLength.h,i.pxLength.h))===null)return null;return d}),new n(I.ns_tts,"opacity",1,["region"],!1,!0,parseFloat,null),new n(I.ns_tts,"origin","auto",["region"],!1,!0,function(i){if(i==="auto")return i;var h=i.split(" ");if(h.length!==2)return null;var g=u.parseLength(h[0]),r=u.parseLength(h[1]);return r&&g?{h:r,w:g}:null},function(i,h,g,r,m){var d,T;if(r==="auto")d=new u.ComputedLength(0,0);else if((d=u.toComputedLength(r.h.value,r.h.unit,null,i.dimensions.h,null,i.pxLength.h))===null)return null;if(r==="auto")T=new u.ComputedLength(0,0);else if((T=u.toComputedLength(r.w.value,r.w.unit,null,i.dimensions.w,null,i.pxLength.w))===null)return null;return{h:d,w:T}}),new n(I.ns_tts,"overflow","hidden",["region"],!1,!0,function(i){return i},null),new n(I.ns_tts,"padding","0px",["region"],!1,!0,function(i){var h=i.split(" ");if(h.length>4)return null;for(var g=[],r=0;r<h.length;r++){var m=u.parseLength(h[r]);if(!m)return null;g.push(m)}return g},function(i,h,g,r,m){var d;if(r.length===1)d=[r[0],r[0],r[0],r[0]];else if(r.length===2)d=[r[0],r[1],r[0],r[1]];else if(r.length===3)d=[r[0],r[1],r[2],r[1]];else{if(r.length!==4)return null;d=[r[0],r[1],r[2],r[3]]}var T=g.styleAttrs[ct.byName.writingMode.qname];if(T==="lrtb"||T==="lr")d=[d[0],d[3],d[2],d[1]];else if(T==="rltb"||T==="rl")d=[d[0],d[1],d[2],d[3]];else if(T==="tblr")d=[d[3],d[0],d[1],d[2]];else{if(T!=="tbrl"&&T!=="tb")return null;d=[d[3],d[2],d[1],d[0]]}for(var q=[],W=0;W<d.length;W++)if(d[W].value===0)q[W]=new u.ComputedLength(0,0);else if(q[W]=u.toComputedLength(d[W].value,d[W].unit,g.styleAttrs[ct.byName.fontSize.qname],W===0||W===2?g.styleAttrs[ct.byName.extent.qname].h:g.styleAttrs[ct.byName.extent.qname].w,W===0||W===2?i.cellLength.h:i.cellLength.w,W===0||W===2?i.pxLength.h:i.pxLength.w),q[W]===null)return null;return q}),new n(I.ns_tts,"position","top left",["region"],!1,!0,function(i){return u.parsePosition(i)},function(i,h,g,r){var m,d;return(m=u.toComputedLength(r.v.offset.value,r.v.offset.unit,null,new u.ComputedLength(-g.styleAttrs[ct.byName.extent.qname].h.rw,i.dimensions.h.rh-g.styleAttrs[ct.byName.extent.qname].h.rh),null,i.pxLength.h))===null?null:(r.v.edge==="bottom"&&(m=new u.ComputedLength(-m.rw-g.styleAttrs[ct.byName.extent.qname].h.rw,i.dimensions.h.rh-m.rh-g.styleAttrs[ct.byName.extent.qname].h.rh)),d=u.toComputedLength(r.h.offset.value,r.h.offset.unit,null,new u.ComputedLength(i.dimensions.w.rw-g.styleAttrs[ct.byName.extent.qname].w.rw,-g.styleAttrs[ct.byName.extent.qname].w.rh),null,i.pxLength.w),m===null?null:(r.h.edge==="right"&&(d=new u.ComputedLength(i.dimensions.w.rw-d.rw-g.styleAttrs[ct.byName.extent.qname].w.rw,-d.rh-g.styleAttrs[ct.byName.extent.qname].w.rh)),{h:m,w:d}))}),new n(I.ns_tts,"ruby","none",["span"],!1,!0,function(i){return i},null),new n(I.ns_tts,"rubyAlign","center",["span"],!0,!0,function(i){return i!=="center"&&i!=="spaceAround"?null:i},null),new n(I.ns_tts,"rubyPosition","outside",["span"],!0,!0,function(i){return i},null),new n(I.ns_tts,"rubyReserve","none",["p"],!0,!0,function(i){var h=i.split(" "),g=[null,null];if(h.length===0||h.length>2||h[0]!=="none"&&h[0]!=="both"&&h[0]!=="after"&&h[0]!=="before"&&h[0]!=="outside")return null;if(g[0]=h[0],h.length===2&&h[0]!=="none"){var r=u.parseLength(h[1]);if(!r)return null;g[1]=r}return g},function(i,h,g,r,m){if(r[0]==="none")return r;var d;return(d=r[1]===null?new u.ComputedLength(.5*g.styleAttrs[ct.byName.fontSize.qname].rw,.5*g.styleAttrs[ct.byName.fontSize.qname].rh):u.toComputedLength(r[1].value,r[1].unit,g.styleAttrs[ct.byName.fontSize.qname],g.styleAttrs[ct.byName.fontSize.qname],i.cellLength.h,i.pxLength.h))===null?null:[r[0],d]}),new n(I.ns_tts,"showBackground","always",["region"],!1,!0,function(i){return i},null),new n(I.ns_tts,"textAlign","start",["p"],!0,!0,function(i){return i},function(i,h,g,r,m){return r==="left"?"start":r==="right"?"end":r}),new n(I.ns_tts,"textCombine","none",["span"],!0,!0,function(i){return i==="none"||i==="all"?i:null},null),new n(I.ns_tts,"textDecoration","none",["span"],!0,!0,function(i){return i.split(" ")},null),new n(I.ns_tts,"textEmphasis","none",["span"],!0,!0,function(i){for(var h=i.split(" "),g={style:null,symbol:null,color:null,position:null},r=0;r<h.length;r++)if(h[r]==="none"||h[r]==="auto")g.style=h[r];else if(h[r]==="filled"||h[r]==="open")g.style=h[r];else if(h[r]==="circle"||h[r]==="dot"||h[r]==="sesame")g.symbol=h[r];else if(h[r]==="current")g.color=h[r];else if(h[r]==="outside"||h[r]==="before"||h[r]==="after")g.position=h[r];else if(g.color=u.parseColor(h[r]),g.color===null)return null;return g.style==null&&g.symbol==null?g.style="auto":(g.symbol=g.symbol||"circle",g.style=g.style||"filled"),g.position=g.position||"outside",g.color=g.color||"current",g},null),new n(I.ns_tts,"textOutline","none",["span"],!0,!0,function(i){if(i==="none")return i;var h={},g=i.split(" ");if(g.length===0||g.length>2)return null;var r=u.parseColor(g[0]);if(h.color=r,r!==null&&g.shift(),g.length!==1)return null;var m=u.parseLength(g[0]);return m?(h.thickness=m,h):null},function(i,h,g,r,m){if(r==="none")return r;var d={};return r.color===null?d.color=g.styleAttrs[ct.byName.color.qname]:d.color=r.color,d.thickness=u.toComputedLength(r.thickness.value,r.thickness.unit,g.styleAttrs[ct.byName.fontSize.qname],g.styleAttrs[ct.byName.fontSize.qname],i.cellLength.h,i.pxLength.h),d.thickness===null?null:d}),new n(I.ns_tts,"textShadow","none",["span"],!0,!0,u.parseTextShadow,function(i,h,g,r){if(r==="none")return r;for(var m=[],d=0;d<r.length;d++){var T={};if(T.x_off=u.toComputedLength(r[d][0].value,r[d][0].unit,null,g.styleAttrs[ct.byName.fontSize.qname],null,i.pxLength.w),T.x_off===null||(T.y_off=u.toComputedLength(r[d][1].value,r[d][1].unit,null,g.styleAttrs[ct.byName.fontSize.qname],null,i.pxLength.h),T.y_off===null))return null;if(r[d][2]===null)T.b_radius=0;else if(T.b_radius=u.toComputedLength(r[d][2].value,r[d][2].unit,null,g.styleAttrs[ct.byName.fontSize.qname],null,i.pxLength.h),T.b_radius===null)return null;r[d][3]===null?T.color=g.styleAttrs[ct.byName.color.qname]:T.color=r[d][3],m.push(T)}return m}),new n(I.ns_tts,"unicodeBidi","normal",["span","p"],!1,!0,function(i){return i},null),new n(I.ns_tts,"visibility","visible",["body","div","p","region","span"],!0,!0,function(i){return i},null),new n(I.ns_tts,"wrapOption","wrap",["span"],!0,!0,function(i){return i},null),new n(I.ns_tts,"writingMode","lrtb",["region"],!1,!0,function(i){return i},null),new n(I.ns_tts,"zIndex","auto",["region"],!1,!0,function(i){var h;return i==="auto"?h=i:(h=parseInt(i),isNaN(h)&&(h=null)),h},null),new n(I.ns_ebutts,"linePadding","0c",["p"],!0,!1,u.parseLength,function(i,h,g,r,m){return u.toComputedLength(r.value,r.unit,null,null,i.cellLength.w,null)}),new n(I.ns_ebutts,"multiRowAlign","auto",["p"],!0,!1,function(i){return i},null),new n(I.ns_smpte,"backgroundImage",null,["div"],!1,!1,function(i){return i},null),new n(I.ns_itts,"forcedDisplay","false",["body","div","p","region","span"],!0,!0,function(i){return i==="true"},null),new n(I.ns_itts,"fillLineGap","false",["p"],!0,!0,function(i){return i==="true"},null)],ct.byQName={},ct.all)ct.byQName[ct.all[_].qname]=ct.all[_];for(var y in ct.byName={},ct.all)ct.byName[ct.all[y].name]=ct.all[y]})(Lt,typeof imscNames>"u"?M(7019):imscNames,typeof imscUtils>"u"?M(346):imscUtils)},346:function(ve,Lt){(function(M){var ct=/#([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})?/,I=/rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/,u=/rgba\(\s*(\d+),\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/,n={transparent:[0,0,0,0],black:[0,0,0,255],silver:[192,192,192,255],gray:[128,128,128,255],white:[255,255,255,255],maroon:[128,0,0,255],red:[255,0,0,255],purple:[128,0,128,255],fuchsia:[255,0,255,255],magenta:[255,0,255,255],green:[0,128,0,255],lime:[0,255,0,255],olive:[128,128,0,255],yellow:[255,255,0,255],navy:[0,0,128,255],blue:[0,0,255,255],teal:[0,128,128,255],aqua:[0,255,255,255],cyan:[0,255,255,255]};M.parseColor=function(y){var i,h=null,g=n[y.toLowerCase()];return g!==void 0?h=g:(i=ct.exec(y))!==null?h=[parseInt(i[1],16),parseInt(i[2],16),parseInt(i[3],16),i[4]!==void 0?parseInt(i[4],16):255]:(i=I.exec(y))!==null?h=[parseInt(i[1]),parseInt(i[2]),parseInt(i[3]),255]:(i=u.exec(y))!==null&&(h=[parseInt(i[1]),parseInt(i[2]),parseInt(i[3]),parseInt(i[4])]),h};var _=/^((?:\+|\-)?\d*(?:\.\d+)?)(px|em|c|%|rh|rw)$/;M.parseLength=function(y){var i,h=null;return(i=_.exec(y))!==null&&(h={value:parseFloat(i[1]),unit:i[2]}),h},M.parseTextShadow=function(y){for(var i=y.match(/([^\(,\)]|\([^\)]+\))+/g),h=[],g=0;g<i.length;g++){var r=i[g].split(" ");if(r.length===1&&r[0]==="none")return"none";if(r.length>1&&r.length<5){var m=[null,null,null,null],d=M.parseLength(r.shift());if(d===null||(m[0]=d,(d=M.parseLength(r.shift()))===null))return null;if(m[1]=d,r.length===0){h.push(m);continue}if((d=M.parseLength(r[0]))!==null&&(m[2]=d,r.shift()),r.length===0){h.push(m);continue}var T=M.parseColor(r[0]);if(T===null)return null;m[3]=T,h.push(m)}}return h},M.parsePosition=function(y){var i=y.split(" "),h=function(W){return W==="center"||W==="left"||W==="top"||W==="bottom"||W==="right"};if(i.length>4)return null;for(var g=0;g<i.length;g++)if(!h(i[g])){var r=M.parseLength(i[g]);if(r===null)return null;i[g]=r}for(var m={h:{edge:"left",offset:{value:50,unit:"%"}},v:{edge:"top",offset:{value:50,unit:"%"}}},d=0;d<i.length;){var T=i[d++];if(h(T)){var q={value:0,unit:"%"};i.length!==2&&d<i.length&&!h(i[d])&&(q=i[d++]),T==="right"?(m.h.edge=T,m.h.offset=q):T==="bottom"?(m.v.edge=T,m.v.offset=q):T==="left"?m.h.offset=q:T==="top"&&(m.v.offset=q)}else{if(i.length!==1&&i.length!==2)return null;d===1?m.h.offset=T:m.v.offset=T}}return m},M.ComputedLength=function(y,i){this.rw=y,this.rh=i},M.ComputedLength.prototype.toUsedLength=function(y,i){return y*this.rw+i*this.rh},M.ComputedLength.prototype.isZero=function(){return this.rw===0&&this.rh===0},M.toComputedLength=function(y,i,h,g,r,m){return i==="%"&&g?new M.ComputedLength(g.rw*y/100,g.rh*y/100):i==="em"&&h?new M.ComputedLength(h.rw*y,h.rh*y):i==="c"&&r?new M.ComputedLength(y*r.rw,y*r.rh):i==="px"&&m?new M.ComputedLength(y*m.rw,y*m.rh):i==="rh"?new M.ComputedLength(0,y/100):i==="rw"?new M.ComputedLength(y/100,0):null}})(Lt)},4633:function(ve){typeof Object.create=="function"?ve.exports=function(Lt,M){M&&(Lt.super_=M,Lt.prototype=Object.create(M.prototype,{constructor:{value:Lt,enumerable:!1,writable:!0,configurable:!0}}))}:ve.exports=function(Lt,M){if(M){Lt.super_=M;var ct=function(){};ct.prototype=M.prototype,Lt.prototype=new ct,Lt.prototype.constructor=Lt}}},5684:function(ve){function Lt(I){if(typeof I!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(I))}function M(I,u){for(var n,_="",y=0,i=-1,h=0,g=0;g<=I.length;++g){if(g<I.length)n=I.charCodeAt(g);else{if(n===47)break;n=47}if(n===47){if(!(i===g-1||h===1))if(i!==g-1&&h===2){if(_.length<2||y!==2||_.charCodeAt(_.length-1)!==46||_.charCodeAt(_.length-2)!==46){if(_.length>2){var r=_.lastIndexOf("/");if(r!==_.length-1){r===-1?(_="",y=0):y=(_=_.slice(0,r)).length-1-_.lastIndexOf("/"),i=g,h=0;continue}}else if(_.length===2||_.length===1){_="",y=0,i=g,h=0;continue}}u&&(_.length>0?_+="/..":_="..",y=2)}else _.length>0?_+="/"+I.slice(i+1,g):_=I.slice(i+1,g),y=g-i-1;i=g,h=0}else n===46&&h!==-1?++h:h=-1}return _}var ct={resolve:function(){for(var I,u="",n=!1,_=arguments.length-1;_>=-1&&!n;_--){var y;_>=0?y=arguments[_]:(I===void 0&&(I=process.cwd()),y=I),Lt(y),y.length!==0&&(u=y+"/"+u,n=y.charCodeAt(0)===47)}return u=M(u,!n),n?u.length>0?"/"+u:"/":u.length>0?u:"."},normalize:function(I){if(Lt(I),I.length===0)return".";var u=I.charCodeAt(0)===47,n=I.charCodeAt(I.length-1)===47;return(I=M(I,!u)).length!==0||u||(I="."),I.length>0&&n&&(I+="/"),u?"/"+I:I},isAbsolute:function(I){return Lt(I),I.length>0&&I.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var I,u=0;u<arguments.length;++u){var n=arguments[u];Lt(n),n.length>0&&(I===void 0?I=n:I+="/"+n)}return I===void 0?".":ct.normalize(I)},relative:function(I,u){if(Lt(I),Lt(u),I===u||(I=ct.resolve(I))===(u=ct.resolve(u)))return"";for(var n=1;n<I.length&&I.charCodeAt(n)===47;++n);for(var _=I.length,y=_-n,i=1;i<u.length&&u.charCodeAt(i)===47;++i);for(var h=u.length-i,g=y<h?y:h,r=-1,m=0;m<=g;++m){if(m===g){if(h>g){if(u.charCodeAt(i+m)===47)return u.slice(i+m+1);if(m===0)return u.slice(i+m)}else y>g&&(I.charCodeAt(n+m)===47?r=m:m===0&&(r=0));break}var d=I.charCodeAt(n+m);if(d!==u.charCodeAt(i+m))break;d===47&&(r=m)}var T="";for(m=n+r+1;m<=_;++m)m!==_&&I.charCodeAt(m)!==47||(T.length===0?T+="..":T+="/..");return T.length>0?T+u.slice(i+r):(i+=r,u.charCodeAt(i)===47&&++i,u.slice(i))},_makeLong:function(I){return I},dirname:function(I){if(Lt(I),I.length===0)return".";for(var u=I.charCodeAt(0),n=u===47,_=-1,y=!0,i=I.length-1;i>=1;--i)if((u=I.charCodeAt(i))===47){if(!y){_=i;break}}else y=!1;return _===-1?n?"/":".":n&&_===1?"//":I.slice(0,_)},basename:function(I,u){if(u!==void 0&&typeof u!="string")throw new TypeError('"ext" argument must be a string');Lt(I);var n,_=0,y=-1,i=!0;if(u!==void 0&&u.length>0&&u.length<=I.length){if(u.length===I.length&&u===I)return"";var h=u.length-1,g=-1;for(n=I.length-1;n>=0;--n){var r=I.charCodeAt(n);if(r===47){if(!i){_=n+1;break}}else g===-1&&(i=!1,g=n+1),h>=0&&(r===u.charCodeAt(h)?--h==-1&&(y=n):(h=-1,y=g))}return _===y?y=g:y===-1&&(y=I.length),I.slice(_,y)}for(n=I.length-1;n>=0;--n)if(I.charCodeAt(n)===47){if(!i){_=n+1;break}}else y===-1&&(i=!1,y=n+1);return y===-1?"":I.slice(_,y)},extname:function(I){Lt(I);for(var u=-1,n=0,_=-1,y=!0,i=0,h=I.length-1;h>=0;--h){var g=I.charCodeAt(h);if(g!==47)_===-1&&(y=!1,_=h+1),g===46?u===-1?u=h:i!==1&&(i=1):u!==-1&&(i=-1);else if(!y){n=h+1;break}}return u===-1||_===-1||i===0||i===1&&u===_-1&&u===n+1?"":I.slice(u,_)},format:function(I){if(I===null||typeof I!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof I);return function(u,n){var _=n.dir||n.root,y=n.base||(n.name||"")+(n.ext||"");return _?_===n.root?_+y:_+"/"+y:y}(0,I)},parse:function(I){Lt(I);var u={root:"",dir:"",base:"",ext:"",name:""};if(I.length===0)return u;var n,_=I.charCodeAt(0),y=_===47;y?(u.root="/",n=1):n=0;for(var i=-1,h=0,g=-1,r=!0,m=I.length-1,d=0;m>=n;--m)if((_=I.charCodeAt(m))!==47)g===-1&&(r=!1,g=m+1),_===46?i===-1?i=m:d!==1&&(d=1):i!==-1&&(d=-1);else if(!r){h=m+1;break}return i===-1||g===-1||d===0||d===1&&i===g-1&&i===h+1?g!==-1&&(u.base=u.name=h===0&&y?I.slice(1,g):I.slice(h,g)):(h===0&&y?(u.name=I.slice(1,i),u.base=I.slice(1,g)):(u.name=I.slice(h,i),u.base=I.slice(h,g)),u.ext=I.slice(i,g)),h>0?u.dir=I.slice(0,h-1):y&&(u.dir="/"),u},sep:"/",delimiter:":",win32:null,posix:null};ct.posix=ct,ve.exports=ct},7205:function(ve,Lt,M){ve.exports=I;var ct=M(5572).EventEmitter;function I(){ct.call(this)}M(4633)(I,ct),I.Readable=M(996),I.Writable=M(9220),I.Duplex=M(7510),I.Transform=M(5570),I.PassThrough=M(3408),I.finished=M(7182),I.pipeline=M(8734),I.Stream=I,I.prototype.pipe=function(u,n){var _=this;function y(T){u.writable&&u.write(T)===!1&&_.pause&&_.pause()}function i(){_.readable&&_.resume&&_.resume()}_.on("data",y),u.on("drain",i),u._isStdio||n&&n.end===!1||(_.on("end",g),_.on("close",r));var h=!1;function g(){h||(h=!0,u.end())}function r(){h||(h=!0,typeof u.destroy=="function"&&u.destroy())}function m(T){if(d(),ct.listenerCount(this,"error")===0)throw T}function d(){_.removeListener("data",y),u.removeListener("drain",i),_.removeListener("end",g),_.removeListener("close",r),_.removeListener("error",m),u.removeListener("error",m),_.removeListener("end",d),_.removeListener("close",d),u.removeListener("close",d)}return _.on("error",m),u.on("error",m),_.on("end",d),_.on("close",d),u.on("close",d),u.emit("pipe",_),u}},2528:function(ve){var Lt={};function M(I,u,n){n||(n=Error);var _=function(y){var i,h;function g(r,m,d){return y.call(this,function(T,q,W){return typeof u=="string"?u:u(T,q,W)}(r,m,d))||this}return h=y,(i=g).prototype=Object.create(h.prototype),i.prototype.constructor=i,i.__proto__=h,g}(n);_.prototype.name=n.name,_.prototype.code=I,Lt[I]=_}function ct(I,u){if(Array.isArray(I)){var n=I.length;return I=I.map(function(_){return String(_)}),n>2?"one of ".concat(u," ").concat(I.slice(0,n-1).join(", "),", or ")+I[n-1]:n===2?"one of ".concat(u," ").concat(I[0]," or ").concat(I[1]):"of ".concat(u," ").concat(I[0])}return"of ".concat(u," ").concat(String(I))}M("ERR_INVALID_OPT_VALUE",function(I,u){return'The value "'+u+'" is invalid for option "'+I+'"'},TypeError),M("ERR_INVALID_ARG_TYPE",function(I,u,n){var _,y,i,h,g;if(typeof u=="string"&&(y="not ",u.substr(0,4)===y)?(_="must not be",u=u.replace(/^not /,"")):_="must be",function(m,d,T){return(T===void 0||T>m.length)&&(T=m.length),m.substring(T-9,T)===d}(I," argument"))i="The ".concat(I," ").concat(_," ").concat(ct(u,"type"));else{var r=(typeof g!="number"&&(g=0),g+1>(h=I).length||h.indexOf(".",g)===-1?"argument":"property");i='The "'.concat(I,'" ').concat(r," ").concat(_," ").concat(ct(u,"type"))}return i+". Received type ".concat(typeof n)},TypeError),M("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),M("ERR_METHOD_NOT_IMPLEMENTED",function(I){return"The "+I+" method is not implemented"}),M("ERR_STREAM_PREMATURE_CLOSE","Premature close"),M("ERR_STREAM_DESTROYED",function(I){return"Cannot call "+I+" after a stream was destroyed"}),M("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),M("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),M("ERR_STREAM_WRITE_AFTER_END","write after end"),M("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),M("ERR_UNKNOWN_ENCODING",function(I){return"Unknown encoding: "+I},TypeError),M("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),ve.exports.F=Lt},7510:function(ve,Lt,M){var ct=Object.keys||function(r){var m=[];for(var d in r)m.push(d);return m};ve.exports=i;var I=M(996),u=M(9220);M(4633)(i,I);for(var n=ct(u.prototype),_=0;_<n.length;_++){var y=n[_];i.prototype[y]||(i.prototype[y]=u.prototype[y])}function i(r){if(!(this instanceof i))return new i(r);I.call(this,r),u.call(this,r),this.allowHalfOpen=!0,r&&(r.readable===!1&&(this.readable=!1),r.writable===!1&&(this.writable=!1),r.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",h)))}function h(){this._writableState.ended||process.nextTick(g,this)}function g(r){r.end()}Object.defineProperty(i.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(i.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(i.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(i.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState!==void 0&&this._writableState!==void 0&&this._readableState.destroyed&&this._writableState.destroyed},set:function(r){this._readableState!==void 0&&this._writableState!==void 0&&(this._readableState.destroyed=r,this._writableState.destroyed=r)}})},3408:function(ve,Lt,M){ve.exports=I;var ct=M(5570);function I(u){if(!(this instanceof I))return new I(u);ct.call(this,u)}M(4633)(I,ct),I.prototype._transform=function(u,n,_){_(null,u)}},996:function(ve,Lt,M){var ct;ve.exports=X,X.ReadableState=G,M(5572).EventEmitter;var I,u=function(tt,at){return tt.listeners(at).length},n=M(5369),_=M(4910).Buffer,y=(M.g!==void 0?M.g:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){},i=M(7199);I=i&&i.debuglog?i.debuglog("stream"):function(){};var h,g,r,m=M(3209),d=M(4232),T=M(5099).getHighWaterMark,q=M(2528).F,W=q.ERR_INVALID_ARG_TYPE,x=q.ERR_STREAM_PUSH_AFTER_EOF,nt=q.ERR_METHOD_NOT_IMPLEMENTED,O=q.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;M(4633)(X,n);var J=d.errorOrDestroy,pt=["error","close","destroy","pause","resume"];function G(tt,at,qt){ct=ct||M(7510),tt=tt||{},typeof qt!="boolean"&&(qt=at instanceof ct),this.objectMode=!!tt.objectMode,qt&&(this.objectMode=this.objectMode||!!tt.readableObjectMode),this.highWaterMark=T(this,tt,"readableHighWaterMark",qt),this.buffer=new m,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=tt.emitClose!==!1,this.autoDestroy=!!tt.autoDestroy,this.destroyed=!1,this.defaultEncoding=tt.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,tt.encoding&&(h||(h=M(950).I),this.decoder=new h(tt.encoding),this.encoding=tt.encoding)}function X(tt){if(ct=ct||M(7510),!(this instanceof X))return new X(tt);var at=this instanceof ct;this._readableState=new G(tt,this,at),this.readable=!0,tt&&(typeof tt.read=="function"&&(this._read=tt.read),typeof tt.destroy=="function"&&(this._destroy=tt.destroy)),n.call(this)}function rt(tt,at,qt,v,A){I("readableAddChunk",at);var c,E=tt._readableState;if(at===null)E.reading=!1,function(Q,D){if(I("onEofChunk"),!D.ended){if(D.decoder){var Bt=D.decoder.end();Bt&&Bt.length&&(D.buffer.push(Bt),D.length+=D.objectMode?1:Bt.length)}D.ended=!0,D.sync?lt(Q):(D.needReadable=!1,D.emittedReadable||(D.emittedReadable=!0,jt(Q)))}}(tt,E);else if(A||(c=function(Q,D){var Bt,Dt;return Dt=D,_.isBuffer(Dt)||Dt instanceof y||typeof D=="string"||D===void 0||Q.objectMode||(Bt=new W("chunk",["string","Buffer","Uint8Array"],D)),Bt}(E,at)),c)J(tt,c);else if(E.objectMode||at&&at.length>0)if(typeof at=="string"||E.objectMode||Object.getPrototypeOf(at)===_.prototype||(at=function(Q){return _.from(Q)}(at)),v)E.endEmitted?J(tt,new O):bt(tt,E,at,!0);else if(E.ended)J(tt,new x);else{if(E.destroyed)return!1;E.reading=!1,E.decoder&&!qt?(at=E.decoder.write(at),E.objectMode||at.length!==0?bt(tt,E,at,!1):St(tt,E)):bt(tt,E,at,!1)}else v||(E.reading=!1,St(tt,E));return!E.ended&&(E.length<E.highWaterMark||E.length===0)}function bt(tt,at,qt,v){at.flowing&&at.length===0&&!at.sync?(at.awaitDrain=0,tt.emit("data",qt)):(at.length+=at.objectMode?1:qt.length,v?at.buffer.unshift(qt):at.buffer.push(qt),at.needReadable&<(tt)),St(tt,at)}Object.defineProperty(X.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState!==void 0&&this._readableState.destroyed},set:function(tt){this._readableState&&(this._readableState.destroyed=tt)}}),X.prototype.destroy=d.destroy,X.prototype._undestroy=d.undestroy,X.prototype._destroy=function(tt,at){at(tt)},X.prototype.push=function(tt,at){var qt,v=this._readableState;return v.objectMode?qt=!0:typeof tt=="string"&&((at=at||v.defaultEncoding)!==v.encoding&&(tt=_.from(tt,at),at=""),qt=!0),rt(this,tt,at,!1,qt)},X.prototype.unshift=function(tt){return rt(this,tt,null,!0,!1)},X.prototype.isPaused=function(){return this._readableState.flowing===!1},X.prototype.setEncoding=function(tt){h||(h=M(950).I);var at=new h(tt);this._readableState.decoder=at,this._readableState.encoding=this._readableState.decoder.encoding;for(var qt=this._readableState.buffer.head,v="";qt!==null;)v+=at.write(qt.data),qt=qt.next;return this._readableState.buffer.clear(),v!==""&&this._readableState.buffer.push(v),this._readableState.length=v.length,this};var Ut=1073741824;function mt(tt,at){return tt<=0||at.length===0&&at.ended?0:at.objectMode?1:tt!=tt?at.flowing&&at.length?at.buffer.head.data.length:at.length:(tt>at.highWaterMark&&(at.highWaterMark=function(qt){return qt>=Ut?qt=Ut:(qt--,qt|=qt>>>1,qt|=qt>>>2,qt|=qt>>>4,qt|=qt>>>8,qt|=qt>>>16,qt++),qt}(tt)),tt<=at.length?tt:at.ended?at.length:(at.needReadable=!0,0))}function lt(tt){var at=tt._readableState;I("emitReadable",at.needReadable,at.emittedReadable),at.needReadable=!1,at.emittedReadable||(I("emitReadable",at.flowing),at.emittedReadable=!0,process.nextTick(jt,tt))}function jt(tt){var at=tt._readableState;I("emitReadable_",at.destroyed,at.length,at.ended),at.destroyed||!at.length&&!at.ended||(tt.emit("readable"),at.emittedReadable=!1),at.needReadable=!at.flowing&&!at.ended&&at.length<=at.highWaterMark,Ot(tt)}function St(tt,at){at.readingMore||(at.readingMore=!0,process.nextTick(Nt,tt,at))}function Nt(tt,at){for(;!at.reading&&!at.ended&&(at.length<at.highWaterMark||at.flowing&&at.length===0);){var qt=at.length;if(I("maybeReadMore read 0"),tt.read(0),qt===at.length)break}at.readingMore=!1}function Ht(tt){var at=tt._readableState;at.readableListening=tt.listenerCount("readable")>0,at.resumeScheduled&&!at.paused?at.flowing=!0:tt.listenerCount("data")>0&&tt.resume()}function ie(tt){I("readable nexttick read 0"),tt.read(0)}function It(tt,at){I("resume",at.reading),at.reading||tt.read(0),at.resumeScheduled=!1,tt.emit("resume"),Ot(tt),at.flowing&&!at.reading&&tt.read(0)}function Ot(tt){var at=tt._readableState;for(I("flow",at.flowing);at.flowing&&tt.read()!==null;);}function fe(tt,at){return at.length===0?null:(at.objectMode?qt=at.buffer.shift():!tt||tt>=at.length?(qt=at.decoder?at.buffer.join(""):at.buffer.length===1?at.buffer.first():at.buffer.concat(at.length),at.buffer.clear()):qt=at.buffer.consume(tt,at.decoder),qt);var qt}function Ae(tt){var at=tt._readableState;I("endReadable",at.endEmitted),at.endEmitted||(at.ended=!0,process.nextTick(Re,at,tt))}function Re(tt,at){if(I("endReadableNT",tt.endEmitted,tt.length),!tt.endEmitted&&tt.length===0&&(tt.endEmitted=!0,at.readable=!1,at.emit("end"),tt.autoDestroy)){var qt=at._writableState;(!qt||qt.autoDestroy&&qt.finished)&&at.destroy()}}function Pe(tt,at){for(var qt=0,v=tt.length;qt<v;qt++)if(tt[qt]===at)return qt;return-1}X.prototype.read=function(tt){I("read",tt),tt=parseInt(tt,10);var at=this._readableState,qt=tt;if(tt!==0&&(at.emittedReadable=!1),tt===0&&at.needReadable&&((at.highWaterMark!==0?at.length>=at.highWaterMark:at.length>0)||at.ended))return I("read: emitReadable",at.length,at.ended),at.length===0&&at.ended?Ae(this):lt(this),null;if((tt=mt(tt,at))===0&&at.ended)return at.length===0&&Ae(this),null;var v,A=at.needReadable;return I("need readable",A),(at.length===0||at.length-tt<at.highWaterMark)&&I("length less than watermark",A=!0),at.ended||at.reading?I("reading or ended",A=!1):A&&(I("do read"),at.reading=!0,at.sync=!0,at.length===0&&(at.needReadable=!0),this._read(at.highWaterMark),at.sync=!1,at.reading||(tt=mt(qt,at))),(v=tt>0?fe(tt,at):null)===null?(at.needReadable=at.length<=at.highWaterMark,tt=0):(at.length-=tt,at.awaitDrain=0),at.length===0&&(at.ended||(at.needReadable=!0),qt!==tt&&at.ended&&Ae(this)),v!==null&&this.emit("data",v),v},X.prototype._read=function(tt){J(this,new nt("_read()"))},X.prototype.pipe=function(tt,at){var qt=this,v=this._readableState;switch(v.pipesCount){case 0:v.pipes=tt;break;case 1:v.pipes=[v.pipes,tt];break;default:v.pipes.push(tt)}v.pipesCount+=1,I("pipe count=%d opts=%j",v.pipesCount,at);var A=at&&at.end===!1||tt===process.stdout||tt===process.stderr?Rt:c;function c(){I("onend"),tt.end()}v.endEmitted?process.nextTick(A):qt.once("end",A),tt.on("unpipe",function _t(Yt,Vt){I("onunpipe"),Yt===qt&&Vt&&Vt.hasUnpiped===!1&&(Vt.hasUnpiped=!0,I("cleanup"),tt.removeListener("close",Dt),tt.removeListener("finish",At),tt.removeListener("drain",E),tt.removeListener("error",Bt),tt.removeListener("unpipe",_t),qt.removeListener("end",c),qt.removeListener("end",Rt),qt.removeListener("data",D),Q=!0,!v.awaitDrain||tt._writableState&&!tt._writableState.needDrain||E())});var E=function(_t){return function(){var Yt=_t._readableState;I("pipeOnDrain",Yt.awaitDrain),Yt.awaitDrain&&Yt.awaitDrain--,Yt.awaitDrain===0&&u(_t,"data")&&(Yt.flowing=!0,Ot(_t))}}(qt);tt.on("drain",E);var Q=!1;function D(_t){I("ondata");var Yt=tt.write(_t);I("dest.write",Yt),Yt===!1&&((v.pipesCount===1&&v.pipes===tt||v.pipesCount>1&&Pe(v.pipes,tt)!==-1)&&!Q&&(I("false write response, pause",v.awaitDrain),v.awaitDrain++),qt.pause())}function Bt(_t){I("onerror",_t),Rt(),tt.removeListener("error",Bt),u(tt,"error")===0&&J(tt,_t)}function Dt(){tt.removeListener("finish",At),Rt()}function At(){I("onfinish"),tt.removeListener("close",Dt),Rt()}function Rt(){I("unpipe"),qt.unpipe(tt)}return qt.on("data",D),function(_t,Yt,Vt){if(typeof _t.prependListener=="function")return _t.prependListener(Yt,Vt);_t._events&&_t._events[Yt]?Array.isArray(_t._events[Yt])?_t._events[Yt].unshift(Vt):_t._events[Yt]=[Vt,_t._events[Yt]]:_t.on(Yt,Vt)}(tt,"error",Bt),tt.once("close",Dt),tt.once("finish",At),tt.emit("pipe",qt),v.flowing||(I("pipe resume"),qt.resume()),tt},X.prototype.unpipe=function(tt){var at=this._readableState,qt={hasUnpiped:!1};if(at.pipesCount===0)return this;if(at.pipesCount===1)return tt&&tt!==at.pipes||(tt||(tt=at.pipes),at.pipes=null,at.pipesCount=0,at.flowing=!1,tt&&tt.emit("unpipe",this,qt)),this;if(!tt){var v=at.pipes,A=at.pipesCount;at.pipes=null,at.pipesCount=0,at.flowing=!1;for(var c=0;c<A;c++)v[c].emit("unpipe",this,{hasUnpiped:!1});return this}var E=Pe(at.pipes,tt);return E===-1||(at.pipes.splice(E,1),at.pipesCount-=1,at.pipesCount===1&&(at.pipes=at.pipes[0]),tt.emit("unpipe",this,qt)),this},X.prototype.on=function(tt,at){var qt=n.prototype.on.call(this,tt,at),v=this._readableState;return tt==="data"?(v.readableListening=this.listenerCount("readable")>0,v.flowing!==!1&&this.resume()):tt==="readable"&&(v.endEmitted||v.readableListening||(v.readableListening=v.needReadable=!0,v.flowing=!1,v.emittedReadable=!1,I("on readable",v.length,v.reading),v.length?lt(this):v.reading||process.nextTick(ie,this))),qt},X.prototype.addListener=X.prototype.on,X.prototype.removeListener=function(tt,at){var qt=n.prototype.removeListener.call(this,tt,at);return tt==="readable"&&process.nextTick(Ht,this),qt},X.prototype.removeAllListeners=function(tt){var at=n.prototype.removeAllListeners.apply(this,arguments);return tt!=="readable"&&tt!==void 0||process.nextTick(Ht,this),at},X.prototype.resume=function(){var tt=this._readableState;return tt.flowing||(I("resume"),tt.flowing=!tt.readableListening,function(at,qt){qt.resumeScheduled||(qt.resumeScheduled=!0,process.nextTick(It,at,qt))}(this,tt)),tt.paused=!1,this},X.prototype.pause=function(){return I("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(I("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},X.prototype.wrap=function(tt){var at=this,qt=this._readableState,v=!1;for(var A in tt.on("end",function(){if(I("wrapped end"),qt.decoder&&!qt.ended){var E=qt.decoder.end();E&&E.length&&at.push(E)}at.push(null)}),tt.on("data",function(E){I("wrapped data"),qt.decoder&&(E=qt.decoder.write(E)),qt.objectMode&&E==null||(qt.objectMode||E&&E.length)&&(at.push(E)||(v=!0,tt.pause()))}),tt)this[A]===void 0&&typeof tt[A]=="function"&&(this[A]=function(E){return function(){return tt[E].apply(tt,arguments)}}(A));for(var c=0;c<pt.length;c++)tt.on(pt[c],this.emit.bind(this,pt[c]));return this._read=function(E){I("wrapped _read",E),v&&(v=!1,tt.resume())},this},typeof Symbol=="function"&&(X.prototype[Symbol.asyncIterator]=function(){return g===void 0&&(g=M(3355)),g(this)}),Object.defineProperty(X.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(X.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(X.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(tt){this._readableState&&(this._readableState.flowing=tt)}}),X._fromList=fe,Object.defineProperty(X.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),typeof Symbol=="function"&&(X.from=function(tt,at){return r===void 0&&(r=M(2421)),r(X,tt,at)})},5570:function(ve,Lt,M){ve.exports=h;var ct=M(2528).F,I=ct.ERR_METHOD_NOT_IMPLEMENTED,u=ct.ERR_MULTIPLE_CALLBACK,n=ct.ERR_TRANSFORM_ALREADY_TRANSFORMING,_=ct.ERR_TRANSFORM_WITH_LENGTH_0,y=M(7510);function i(m,d){var T=this._transformState;T.transforming=!1;var q=T.writecb;if(q===null)return this.emit("error",new u);T.writechunk=null,T.writecb=null,d!=null&&this.push(d),q(m);var W=this._readableState;W.reading=!1,(W.needReadable||W.length<W.highWaterMark)&&this._read(W.highWaterMark)}function h(m){if(!(this instanceof h))return new h(m);y.call(this,m),this._transformState={afterTransform:i.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,m&&(typeof m.transform=="function"&&(this._transform=m.transform),typeof m.flush=="function"&&(this._flush=m.flush)),this.on("prefinish",g)}function g(){var m=this;typeof this._flush!="function"||this._readableState.destroyed?r(this,null,null):this._flush(function(d,T){r(m,d,T)})}function r(m,d,T){if(d)return m.emit("error",d);if(T!=null&&m.push(T),m._writableState.length)throw new _;if(m._transformState.transforming)throw new n;return m.push(null)}M(4633)(h,y),h.prototype.push=function(m,d){return this._transformState.needTransform=!1,y.prototype.push.call(this,m,d)},h.prototype._transform=function(m,d,T){T(new I("_transform()"))},h.prototype._write=function(m,d,T){var q=this._transformState;if(q.writecb=T,q.writechunk=m,q.writeencoding=d,!q.transforming){var W=this._readableState;(q.needTransform||W.needReadable||W.length<W.highWaterMark)&&this._read(W.highWaterMark)}},h.prototype._read=function(m){var d=this._transformState;d.writechunk===null||d.transforming?d.needTransform=!0:(d.transforming=!0,this._transform(d.writechunk,d.writeencoding,d.afterTransform))},h.prototype._destroy=function(m,d){y.prototype._destroy.call(this,m,function(T){d(T)})}},9220:function(ve,Lt,M){function ct(St){var Nt=this;this.next=null,this.entry=null,this.finish=function(){(function(Ht,ie){var It=Ht.entry;for(Ht.entry=null;It;){var Ot=It.callback;ie.pendingcb--,Ot(void 0),It=It.next}ie.corkedRequestsFree.next=Ht})(Nt,St)}}var I;ve.exports=X,X.WritableState=G;var u,n={deprecate:M(8214)},_=M(5369),y=M(4910).Buffer,i=(M.g!==void 0?M.g:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){},h=M(4232),g=M(5099).getHighWaterMark,r=M(2528).F,m=r.ERR_INVALID_ARG_TYPE,d=r.ERR_METHOD_NOT_IMPLEMENTED,T=r.ERR_MULTIPLE_CALLBACK,q=r.ERR_STREAM_CANNOT_PIPE,W=r.ERR_STREAM_DESTROYED,x=r.ERR_STREAM_NULL_VALUES,nt=r.ERR_STREAM_WRITE_AFTER_END,O=r.ERR_UNKNOWN_ENCODING,J=h.errorOrDestroy;function pt(){}function G(St,Nt,Ht){I=I||M(7510),St=St||{},typeof Ht!="boolean"&&(Ht=Nt instanceof I),this.objectMode=!!St.objectMode,Ht&&(this.objectMode=this.objectMode||!!St.writableObjectMode),this.highWaterMark=g(this,St,"writableHighWaterMark",Ht),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var ie=St.decodeStrings===!1;this.decodeStrings=!ie,this.defaultEncoding=St.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(It){(function(Ot,fe){var Ae=Ot._writableState,Re=Ae.sync,Pe=Ae.writecb;if(typeof Pe!="function")throw new T;if(function(at){at.writing=!1,at.writecb=null,at.length-=at.writelen,at.writelen=0}(Ae),fe)(function(at,qt,v,A,c){--qt.pendingcb,v?(process.nextTick(c,A),process.nextTick(jt,at,qt),at._writableState.errorEmitted=!0,J(at,A)):(c(A),at._writableState.errorEmitted=!0,J(at,A),jt(at,qt))})(Ot,Ae,Re,fe,Pe);else{var tt=mt(Ae)||Ot.destroyed;tt||Ae.corked||Ae.bufferProcessing||!Ae.bufferedRequest||Ut(Ot,Ae),Re?process.nextTick(bt,Ot,Ae,tt,Pe):bt(Ot,Ae,tt,Pe)}})(Nt,It)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=St.emitClose!==!1,this.autoDestroy=!!St.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new ct(this)}function X(St){var Nt=this instanceof(I=I||M(7510));if(!Nt&&!u.call(X,this))return new X(St);this._writableState=new G(St,this,Nt),this.writable=!0,St&&(typeof St.write=="function"&&(this._write=St.write),typeof St.writev=="function"&&(this._writev=St.writev),typeof St.destroy=="function"&&(this._destroy=St.destroy),typeof St.final=="function"&&(this._final=St.final)),_.call(this)}function rt(St,Nt,Ht,ie,It,Ot,fe){Nt.writelen=ie,Nt.writecb=fe,Nt.writing=!0,Nt.sync=!0,Nt.destroyed?Nt.onwrite(new W("write")):Ht?St._writev(It,Nt.onwrite):St._write(It,Ot,Nt.onwrite),Nt.sync=!1}function bt(St,Nt,Ht,ie){Ht||function(It,Ot){Ot.length===0&&Ot.needDrain&&(Ot.needDrain=!1,It.emit("drain"))}(St,Nt),Nt.pendingcb--,ie(),jt(St,Nt)}function Ut(St,Nt){Nt.bufferProcessing=!0;var Ht=Nt.bufferedRequest;if(St._writev&&Ht&&Ht.next){var ie=Nt.bufferedRequestCount,It=new Array(ie),Ot=Nt.corkedRequestsFree;Ot.entry=Ht;for(var fe=0,Ae=!0;Ht;)It[fe]=Ht,Ht.isBuf||(Ae=!1),Ht=Ht.next,fe+=1;It.allBuffers=Ae,rt(St,Nt,!0,Nt.length,It,"",Ot.finish),Nt.pendingcb++,Nt.lastBufferedRequest=null,Ot.next?(Nt.corkedRequestsFree=Ot.next,Ot.next=null):Nt.corkedRequestsFree=new ct(Nt),Nt.bufferedRequestCount=0}else{for(;Ht;){var Re=Ht.chunk,Pe=Ht.encoding,tt=Ht.callback;if(rt(St,Nt,!1,Nt.objectMode?1:Re.length,Re,Pe,tt),Ht=Ht.next,Nt.bufferedRequestCount--,Nt.writing)break}Ht===null&&(Nt.lastBufferedRequest=null)}Nt.bufferedRequest=Ht,Nt.bufferProcessing=!1}function mt(St){return St.ending&&St.length===0&&St.bufferedRequest===null&&!St.finished&&!St.writing}function lt(St,Nt){St._final(function(Ht){Nt.pendingcb--,Ht&&J(St,Ht),Nt.prefinished=!0,St.emit("prefinish"),jt(St,Nt)})}function jt(St,Nt){var Ht=mt(Nt);if(Ht&&(function(It,Ot){Ot.prefinished||Ot.finalCalled||(typeof It._final!="function"||Ot.destroyed?(Ot.prefinished=!0,It.emit("prefinish")):(Ot.pendingcb++,Ot.finalCalled=!0,process.nextTick(lt,It,Ot)))}(St,Nt),Nt.pendingcb===0&&(Nt.finished=!0,St.emit("finish"),Nt.autoDestroy))){var ie=St._readableState;(!ie||ie.autoDestroy&&ie.endEmitted)&&St.destroy()}return Ht}M(4633)(X,_),G.prototype.getBuffer=function(){for(var St=this.bufferedRequest,Nt=[];St;)Nt.push(St),St=St.next;return Nt},function(){try{Object.defineProperty(G.prototype,"buffer",{get:n.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}(),typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(u=Function.prototype[Symbol.hasInstance],Object.defineProperty(X,Symbol.hasInstance,{value:function(St){return!!u.call(this,St)||this===X&&St&&St._writableState instanceof G}})):u=function(St){return St instanceof this},X.prototype.pipe=function(){J(this,new q)},X.prototype.write=function(St,Nt,Ht){var ie,It=this._writableState,Ot=!1,fe=!It.objectMode&&(ie=St,y.isBuffer(ie)||ie instanceof i);return fe&&!y.isBuffer(St)&&(St=function(Ae){return y.from(Ae)}(St)),typeof Nt=="function"&&(Ht=Nt,Nt=null),fe?Nt="buffer":Nt||(Nt=It.defaultEncoding),typeof Ht!="function"&&(Ht=pt),It.ending?function(Ae,Re){var Pe=new nt;J(Ae,Pe),process.nextTick(Re,Pe)}(this,Ht):(fe||function(Ae,Re,Pe,tt){var at;return Pe===null?at=new x:typeof Pe=="string"||Re.objectMode||(at=new m("chunk",["string","Buffer"],Pe)),!at||(J(Ae,at),process.nextTick(tt,at),!1)}(this,It,St,Ht))&&(It.pendingcb++,Ot=function(Ae,Re,Pe,tt,at,qt){if(!Pe){var v=function(Q,D,Bt){return Q.objectMode||Q.decodeStrings===!1||typeof D!="string"||(D=y.from(D,Bt)),D}(Re,tt,at);tt!==v&&(Pe=!0,at="buffer",tt=v)}var A=Re.objectMode?1:tt.length;Re.length+=A;var c=Re.length<Re.highWaterMark;if(c||(Re.needDrain=!0),Re.writing||Re.corked){var E=Re.lastBufferedRequest;Re.lastBufferedRequest={chunk:tt,encoding:at,isBuf:Pe,callback:qt,next:null},E?E.next=Re.lastBufferedRequest:Re.bufferedRequest=Re.lastBufferedRequest,Re.bufferedRequestCount+=1}else rt(Ae,Re,!1,A,tt,at,qt);return c}(this,It,fe,St,Nt,Ht)),Ot},X.prototype.cork=function(){this._writableState.corked++},X.prototype.uncork=function(){var St=this._writableState;St.corked&&(St.corked--,St.writing||St.corked||St.bufferProcessing||!St.bufferedRequest||Ut(this,St))},X.prototype.setDefaultEncoding=function(St){if(typeof St=="string"&&(St=St.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((St+"").toLowerCase())>-1))throw new O(St);return this._writableState.defaultEncoding=St,this},Object.defineProperty(X.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(X.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),X.prototype._write=function(St,Nt,Ht){Ht(new d("_write()"))},X.prototype._writev=null,X.prototype.end=function(St,Nt,Ht){var ie=this._writableState;return typeof St=="function"?(Ht=St,St=null,Nt=null):typeof Nt=="function"&&(Ht=Nt,Nt=null),St!=null&&this.write(St,Nt),ie.corked&&(ie.corked=1,this.uncork()),ie.ending||function(It,Ot,fe){Ot.ending=!0,jt(It,Ot),fe&&(Ot.finished?process.nextTick(fe):It.once("finish",fe)),Ot.ended=!0,It.writable=!1}(this,ie,Ht),this},Object.defineProperty(X.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(X.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState!==void 0&&this._writableState.destroyed},set:function(St){this._writableState&&(this._writableState.destroyed=St)}}),X.prototype.destroy=h.destroy,X.prototype._undestroy=h.undestroy,X.prototype._destroy=function(St,Nt){Nt(St)}},3355:function(ve,Lt,M){var ct;function I(x,nt,O){return(nt=function(J){var pt=function(G){if(typeof G!="object"||G===null)return G;var X=G[Symbol.toPrimitive];if(X!==void 0){var rt=X.call(G,"string");if(typeof rt!="object")return rt;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(G)}(J);return typeof pt=="symbol"?pt:String(pt)}(nt))in x?Object.defineProperty(x,nt,{value:O,enumerable:!0,configurable:!0,writable:!0}):x[nt]=O,x}var u=M(7182),n=Symbol("lastResolve"),_=Symbol("lastReject"),y=Symbol("error"),i=Symbol("ended"),h=Symbol("lastPromise"),g=Symbol("handlePromise"),r=Symbol("stream");function m(x,nt){return{value:x,done:nt}}function d(x){var nt=x[n];if(nt!==null){var O=x[r].read();O!==null&&(x[h]=null,x[n]=null,x[_]=null,nt(m(O,!1)))}}function T(x){process.nextTick(d,x)}var q=Object.getPrototypeOf(function(){}),W=Object.setPrototypeOf((I(ct={get stream(){return this[r]},next:function(){var x=this,nt=this[y];if(nt!==null)return Promise.reject(nt);if(this[i])return Promise.resolve(m(void 0,!0));if(this[r].destroyed)return new Promise(function(G,X){process.nextTick(function(){x[y]?X(x[y]):G(m(void 0,!0))})});var O,J=this[h];if(J)O=new Promise(function(G,X){return function(rt,bt){G.then(function(){X[i]?rt(m(void 0,!0)):X[g](rt,bt)},bt)}}(J,this));else{var pt=this[r].read();if(pt!==null)return Promise.resolve(m(pt,!1));O=new Promise(this[g])}return this[h]=O,O}},Symbol.asyncIterator,function(){return this}),I(ct,"return",function(){var x=this;return new Promise(function(nt,O){x[r].destroy(null,function(J){J?O(J):nt(m(void 0,!0))})})}),ct),q);ve.exports=function(x){var nt,O=Object.create(W,(I(nt={},r,{value:x,writable:!0}),I(nt,n,{value:null,writable:!0}),I(nt,_,{value:null,writable:!0}),I(nt,y,{value:null,writable:!0}),I(nt,i,{value:x._readableState.endEmitted,writable:!0}),I(nt,g,{value:function(J,pt){var G=O[r].read();G?(O[h]=null,O[n]=null,O[_]=null,J(m(G,!1))):(O[n]=J,O[_]=pt)},writable:!0}),nt));return O[h]=null,u(x,function(J){if(J&&J.code!=="ERR_STREAM_PREMATURE_CLOSE"){var pt=O[_];return pt!==null&&(O[h]=null,O[n]=null,O[_]=null,pt(J)),void(O[y]=J)}var G=O[n];G!==null&&(O[h]=null,O[n]=null,O[_]=null,G(m(void 0,!0))),O[i]=!0}),x.on("readable",T.bind(null,O)),O}},3209:function(ve,Lt,M){function ct(g,r){var m=Object.keys(g);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(g);r&&(d=d.filter(function(T){return Object.getOwnPropertyDescriptor(g,T).enumerable})),m.push.apply(m,d)}return m}function I(g){for(var r=1;r<arguments.length;r++){var m=arguments[r]!=null?arguments[r]:{};r%2?ct(Object(m),!0).forEach(function(d){u(g,d,m[d])}):Object.getOwnPropertyDescriptors?Object.defineProperties(g,Object.getOwnPropertyDescriptors(m)):ct(Object(m)).forEach(function(d){Object.defineProperty(g,d,Object.getOwnPropertyDescriptor(m,d))})}return g}function u(g,r,m){return(r=_(r))in g?Object.defineProperty(g,r,{value:m,enumerable:!0,configurable:!0,writable:!0}):g[r]=m,g}function n(g,r){for(var m=0;m<r.length;m++){var d=r[m];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(g,_(d.key),d)}}function _(g){var r=function(m){if(typeof m!="object"||m===null)return m;var d=m[Symbol.toPrimitive];if(d!==void 0){var T=d.call(m,"string");if(typeof T!="object")return T;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(m)}(g);return typeof r=="symbol"?r:String(r)}var y=M(4910).Buffer,i=M(3779).inspect,h=i&&i.custom||"inspect";ve.exports=function(){function g(){(function(d,T){if(!(d instanceof T))throw new TypeError("Cannot call a class as a function")})(this,g),this.head=null,this.tail=null,this.length=0}var r,m;return r=g,(m=[{key:"push",value:function(d){var T={data:d,next:null};this.length>0?this.tail.next=T:this.head=T,this.tail=T,++this.length}},{key:"unshift",value:function(d){var T={data:d,next:this.head};this.length===0&&(this.tail=T),this.head=T,++this.length}},{key:"shift",value:function(){if(this.length!==0){var d=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,d}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(d){if(this.length===0)return"";for(var T=this.head,q=""+T.data;T=T.next;)q+=d+T.data;return q}},{key:"concat",value:function(d){if(this.length===0)return y.alloc(0);for(var T,q,W,x=y.allocUnsafe(d>>>0),nt=this.head,O=0;nt;)T=nt.data,q=x,W=O,y.prototype.copy.call(T,q,W),O+=nt.data.length,nt=nt.next;return x}},{key:"consume",value:function(d,T){var q;return d<this.head.data.length?(q=this.head.data.slice(0,d),this.head.data=this.head.data.slice(d)):q=d===this.head.data.length?this.shift():T?this._getString(d):this._getBuffer(d),q}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(d){var T=this.head,q=1,W=T.data;for(d-=W.length;T=T.next;){var x=T.data,nt=d>x.length?x.length:d;if(nt===x.length?W+=x:W+=x.slice(0,d),(d-=nt)==0){nt===x.length?(++q,T.next?this.head=T.next:this.head=this.tail=null):(this.head=T,T.data=x.slice(nt));break}++q}return this.length-=q,W}},{key:"_getBuffer",value:function(d){var T=y.allocUnsafe(d),q=this.head,W=1;for(q.data.copy(T),d-=q.data.length;q=q.next;){var x=q.data,nt=d>x.length?x.length:d;if(x.copy(T,T.length-d,0,nt),(d-=nt)==0){nt===x.length?(++W,q.next?this.head=q.next:this.head=this.tail=null):(this.head=q,q.data=x.slice(nt));break}++W}return this.length-=W,T}},{key:h,value:function(d,T){return i(this,I(I({},T),{},{depth:0,customInspect:!1}))}}])&&n(r.prototype,m),Object.defineProperty(r,"prototype",{writable:!1}),g}()},4232:function(ve){function Lt(I,u){ct(I,u),M(I)}function M(I){I._writableState&&!I._writableState.emitClose||I._readableState&&!I._readableState.emitClose||I.emit("close")}function ct(I,u){I.emit("error",u)}ve.exports={destroy:function(I,u){var n=this,_=this._readableState&&this._readableState.destroyed,y=this._writableState&&this._writableState.destroyed;return _||y?(u?u(I):I&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(ct,this,I)):process.nextTick(ct,this,I)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(I||null,function(i){!u&&i?n._writableState?n._writableState.errorEmitted?process.nextTick(M,n):(n._writableState.errorEmitted=!0,process.nextTick(Lt,n,i)):process.nextTick(Lt,n,i):u?(process.nextTick(M,n),u(i)):process.nextTick(M,n)}),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(I,u){var n=I._readableState,_=I._writableState;n&&n.autoDestroy||_&&_.autoDestroy?I.destroy(u):I.emit("error",u)}}},7182:function(ve,Lt,M){var ct=M(2528).F.ERR_STREAM_PREMATURE_CLOSE;function I(){}ve.exports=function u(n,_,y){if(typeof _=="function")return u(n,null,_);_||(_={}),y=function(nt){var O=!1;return function(){if(!O){O=!0;for(var J=arguments.length,pt=new Array(J),G=0;G<J;G++)pt[G]=arguments[G];nt.apply(this,pt)}}}(y||I);var i=_.readable||_.readable!==!1&&n.readable,h=_.writable||_.writable!==!1&&n.writable,g=function(){n.writable||m()},r=n._writableState&&n._writableState.finished,m=function(){h=!1,r=!0,i||y.call(n)},d=n._readableState&&n._readableState.endEmitted,T=function(){i=!1,d=!0,h||y.call(n)},q=function(nt){y.call(n,nt)},W=function(){var nt;return i&&!d?(n._readableState&&n._readableState.ended||(nt=new ct),y.call(n,nt)):h&&!r?(n._writableState&&n._writableState.ended||(nt=new ct),y.call(n,nt)):void 0},x=function(){n.req.on("finish",m)};return function(nt){return nt.setHeader&&typeof nt.abort=="function"}(n)?(n.on("complete",m),n.on("abort",W),n.req?x():n.on("request",x)):h&&!n._writableState&&(n.on("end",g),n.on("close",g)),n.on("end",T),n.on("finish",m),_.error!==!1&&n.on("error",q),n.on("close",W),function(){n.removeListener("complete",m),n.removeListener("abort",W),n.removeListener("request",x),n.req&&n.req.removeListener("finish",m),n.removeListener("end",g),n.removeListener("close",g),n.removeListener("finish",m),n.removeListener("end",T),n.removeListener("error",q),n.removeListener("close",W)}}},2421:function(ve){ve.exports=function(){throw new Error("Readable.from is not available in the browser")}},8734:function(ve,Lt,M){var ct,I=M(2528).F,u=I.ERR_MISSING_ARGS,n=I.ERR_STREAM_DESTROYED;function _(h){if(h)throw h}function y(h){h()}function i(h,g){return h.pipe(g)}ve.exports=function(){for(var h=arguments.length,g=new Array(h),r=0;r<h;r++)g[r]=arguments[r];var m,d=function(q){return q.length?typeof q[q.length-1]!="function"?_:q.pop():_}(g);if(Array.isArray(g[0])&&(g=g[0]),g.length<2)throw new u("streams");var T=g.map(function(q,W){var x=W<g.length-1;return function(nt,O,J,pt){pt=function(rt){var bt=!1;return function(){bt||(bt=!0,rt.apply(void 0,arguments))}}(pt);var G=!1;nt.on("close",function(){G=!0}),ct===void 0&&(ct=M(7182)),ct(nt,{readable:O,writable:J},function(rt){if(rt)return pt(rt);G=!0,pt()});var X=!1;return function(rt){if(!G&&!X)return X=!0,function(bt){return bt.setHeader&&typeof bt.abort=="function"}(nt)?nt.abort():typeof nt.destroy=="function"?nt.destroy():void pt(rt||new n("pipe"))}}(q,x,W>0,function(nt){m||(m=nt),nt&&T.forEach(y),x||(T.forEach(y),d(m))})});return g.reduce(i)}},5099:function(ve,Lt,M){var ct=M(2528).F.ERR_INVALID_OPT_VALUE;ve.exports={getHighWaterMark:function(I,u,n,_){var y=function(i,h,g){return i.highWaterMark!=null?i.highWaterMark:h?i[g]:null}(u,_,n);if(y!=null){if(!isFinite(y)||Math.floor(y)!==y||y<0)throw new ct(_?n:"highWaterMark",y);return Math.floor(y)}return I.objectMode?16:16384}}},5369:function(ve,Lt,M){ve.exports=M(5572).EventEmitter},950:function(ve,Lt,M){var ct=M(6640).Buffer,I=ct.isEncoding||function(d){switch((d=""+d)&&d.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function u(d){var T;switch(this.encoding=function(q){var W=function(x){if(!x)return"utf8";for(var nt;;)switch(x){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return x;default:if(nt)return;x=(""+x).toLowerCase(),nt=!0}}(q);if(typeof W!="string"&&(ct.isEncoding===I||!I(q)))throw new Error("Unknown encoding: "+q);return W||q}(d),this.encoding){case"utf16le":this.text=y,this.end=i,T=4;break;case"utf8":this.fillLast=_,T=4;break;case"base64":this.text=h,this.end=g,T=3;break;default:return this.write=r,void(this.end=m)}this.lastNeed=0,this.lastTotal=0,this.lastChar=ct.allocUnsafe(T)}function n(d){return d<=127?0:d>>5==6?2:d>>4==14?3:d>>3==30?4:d>>6==2?-1:-2}function _(d){var T=this.lastTotal-this.lastNeed,q=function(W,x){if((192&x[0])!=128)return W.lastNeed=0,"�";if(W.lastNeed>1&&x.length>1){if((192&x[1])!=128)return W.lastNeed=1,"�";if(W.lastNeed>2&&x.length>2&&(192&x[2])!=128)return W.lastNeed=2,"�"}}(this,d);return q!==void 0?q:this.lastNeed<=d.length?(d.copy(this.lastChar,T,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(d.copy(this.lastChar,T,0,d.length),void(this.lastNeed-=d.length))}function y(d,T){if((d.length-T)%2==0){var q=d.toString("utf16le",T);if(q){var W=q.charCodeAt(q.length-1);if(W>=55296&&W<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=d[d.length-2],this.lastChar[1]=d[d.length-1],q.slice(0,-1)}return q}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=d[d.length-1],d.toString("utf16le",T,d.length-1)}function i(d){var T=d&&d.length?this.write(d):"";if(this.lastNeed){var q=this.lastTotal-this.lastNeed;return T+this.lastChar.toString("utf16le",0,q)}return T}function h(d,T){var q=(d.length-T)%3;return q===0?d.toString("base64",T):(this.lastNeed=3-q,this.lastTotal=3,q===1?this.lastChar[0]=d[d.length-1]:(this.lastChar[0]=d[d.length-2],this.lastChar[1]=d[d.length-1]),d.toString("base64",T,d.length-q))}function g(d){var T=d&&d.length?this.write(d):"";return this.lastNeed?T+this.lastChar.toString("base64",0,3-this.lastNeed):T}function r(d){return d.toString(this.encoding)}function m(d){return d&&d.length?this.write(d):""}Lt.I=u,u.prototype.write=function(d){if(d.length===0)return"";var T,q;if(this.lastNeed){if((T=this.fillLast(d))===void 0)return"";q=this.lastNeed,this.lastNeed=0}else q=0;return q<d.length?T?T+this.text(d,q):this.text(d,q):T||""},u.prototype.end=function(d){var T=d&&d.length?this.write(d):"";return this.lastNeed?T+"�":T},u.prototype.text=function(d,T){var q=function(x,nt,O){var J=nt.length-1;if(J<O)return 0;var pt=n(nt[J]);return pt>=0?(pt>0&&(x.lastNeed=pt-1),pt):--J<O||pt===-2?0:(pt=n(nt[J]))>=0?(pt>0&&(x.lastNeed=pt-2),pt):--J<O||pt===-2?0:(pt=n(nt[J]))>=0?(pt>0&&(pt===2?pt=0:x.lastNeed=pt-3),pt):0}(this,d,T);if(!this.lastNeed)return d.toString("utf8",T);this.lastTotal=q;var W=d.length-(q-this.lastNeed);return d.copy(this.lastChar,0,W),d.toString("utf8",T,W)},u.prototype.fillLast=function(d){if(this.lastNeed<=d.length)return d.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);d.copy(this.lastChar,this.lastTotal-this.lastNeed,0,d.length),this.lastNeed-=d.length}},6640:function(ve,Lt,M){var ct=M(4910),I=ct.Buffer;function u(_,y){for(var i in _)y[i]=_[i]}function n(_,y,i){return I(_,y,i)}I.from&&I.alloc&&I.allocUnsafe&&I.allocUnsafeSlow?ve.exports=ct:(u(ct,Lt),Lt.Buffer=n),u(I,n),n.from=function(_,y,i){if(typeof _=="number")throw new TypeError("Argument must not be a number");return I(_,y,i)},n.alloc=function(_,y,i){if(typeof _!="number")throw new TypeError("Argument must be a number");var h=I(_);return y!==void 0?typeof i=="string"?h.fill(y,i):h.fill(y):h.fill(0),h},n.allocUnsafe=function(_){if(typeof _!="number")throw new TypeError("Argument must be a number");return I(_)},n.allocUnsafeSlow=function(_){if(typeof _!="number")throw new TypeError("Argument must be a number");return ct.SlowBuffer(_)}},3785:function(ve,Lt,M){var ct;(function(I,u){var n="function",_="undefined",y="object",i="string",h="major",g="model",r="name",m="type",d="vendor",T="version",q="architecture",W="console",x="mobile",nt="tablet",O="smarttv",J="wearable",pt="embedded",G="Amazon",X="Apple",rt="ASUS",bt="BlackBerry",Ut="Browser",mt="Chrome",lt="Firefox",jt="Google",St="Huawei",Nt="LG",Ht="Microsoft",ie="Motorola",It="Opera",Ot="Samsung",fe="Sharp",Ae="Sony",Re="Xiaomi",Pe="Zebra",tt="Facebook",at="Chromium OS",qt="Mac OS",v=function(Yt){for(var Vt={},Xt=0;Xt<Yt.length;Xt++)Vt[Yt[Xt].toUpperCase()]=Yt[Xt];return Vt},A=function(Yt,Vt){return typeof Yt===i&&c(Vt).indexOf(c(Yt))!==-1},c=function(Yt){return Yt.toLowerCase()},E=function(Yt,Vt){if(typeof Yt===i)return Yt=Yt.replace(/^\s\s*/,""),typeof Vt===_?Yt:Yt.substring(0,500)},Q=function(Yt,Vt){for(var Xt,ne,Te,me,Ue,Me,ze=0;ze<Vt.length&&!Ue;){var Qe=Vt[ze],nn=Vt[ze+1];for(Xt=ne=0;Xt<Qe.length&&!Ue&&Qe[Xt];)if(Ue=Qe[Xt++].exec(Yt))for(Te=0;Te<nn.length;Te++)Me=Ue[++ne],typeof(me=nn[Te])===y&&me.length>0?me.length===2?typeof me[1]==n?this[me[0]]=me[1].call(this,Me):this[me[0]]=me[1]:me.length===3?typeof me[1]!==n||me[1].exec&&me[1].test?this[me[0]]=Me?Me.replace(me[1],me[2]):u:this[me[0]]=Me?me[1].call(this,Me,me[2]):u:me.length===4&&(this[me[0]]=Me?me[3].call(this,Me.replace(me[1],me[2])):u):this[me]=Me||u;ze+=2}},D=function(Yt,Vt){for(var Xt in Vt)if(typeof Vt[Xt]===y&&Vt[Xt].length>0){for(var ne=0;ne<Vt[Xt].length;ne++)if(A(Vt[Xt][ne],Yt))return Xt==="?"?u:Xt}else if(A(Vt[Xt],Yt))return Xt==="?"?u:Xt;return Yt},Bt={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},Dt={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[T,[r,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[T,[r,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[r,T],[/opios[\/ ]+([\w\.]+)/i],[T,[r,It+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[T,[r,It+" GX"]],[/\bopr\/([\w\.]+)/i],[T,[r,It]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[T,[r,"Baidu"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim)\s?(?:browser)?[\/ ]?([\w\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|qq|duckduckgo)\/([-\w\.]+)/i,/(heytap|ovi)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[r,T],[/\bddg\/([\w\.]+)/i],[T,[r,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[T,[r,"UC"+Ut]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[T,[r,"WeChat"]],[/konqueror\/([\w\.]+)/i],[T,[r,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[T,[r,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[T,[r,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[T,[r,"Smart Lenovo "+Ut]],[/(avast|avg)\/([\w\.]+)/i],[[r,/(.+)/,"$1 Secure "+Ut],T],[/\bfocus\/([\w\.]+)/i],[T,[r,lt+" Focus"]],[/\bopt\/([\w\.]+)/i],[T,[r,It+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[T,[r,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[T,[r,"Dolphin"]],[/coast\/([\w\.]+)/i],[T,[r,It+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[T,[r,"MIUI "+Ut]],[/fxios\/([-\w\.]+)/i],[T,[r,lt]],[/\bqihu|(qi?ho?o?|360)browser/i],[[r,"360 "+Ut]],[/(oculus|sailfish|huawei|vivo)browser\/([\w\.]+)/i],[[r,/(.+)/,"$1 "+Ut],T],[/samsungbrowser\/([\w\.]+)/i],[T,[r,Ot+" Internet"]],[/(comodo_dragon)\/([\w\.]+)/i],[[r,/_/g," "],T],[/metasr[\/ ]?([\d\.]+)/i],[T,[r,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[r,"Sogou Mobile"],T],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345Explorer)[\/ ]?([\w\.]+)/i],[r,T],[/(lbbrowser)/i,/\[(linkedin)app\]/i],[r],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[r,tt],T],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i],[r,T],[/\bgsa\/([\w\.]+) .*safari\//i],[T,[r,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[T,[r,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[T,[r,mt+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[r,mt+" WebView"],T],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[T,[r,"Android "+Ut]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[r,T],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[T,[r,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[T,r],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[r,[T,D,{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}]],[/(webkit|khtml)\/([\w\.]+)/i],[r,T],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[r,"Netscape"],T],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[T,[r,lt+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i,/panasonic;(viera)/i],[r,T],[/(cobalt)\/([\w\.]+)/i],[r,[T,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[q,"amd64"]],[/(ia32(?=;))/i],[[q,c]],[/((?:i[346]|x)86)[;\)]/i],[[q,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[q,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[q,"armhf"]],[/windows (ce|mobile); ppc;/i],[[q,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[q,/ower/,"",c]],[/(sun4\w)[;\)]/i],[[q,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[q,c]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[g,[d,Ot],[m,nt]],[/\b((?:s[cgp]h|gt|sm)-\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[g,[d,Ot],[m,x]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[g,[d,X],[m,x]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[g,[d,X],[m,nt]],[/(macintosh);/i],[g,[d,X]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[g,[d,fe],[m,x]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[g,[d,St],[m,nt]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[g,[d,St],[m,x]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i],[[g,/_/g," "],[d,Re],[m,x]],[/oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i,/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[g,/_/g," "],[d,Re],[m,nt]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[g,[d,"OPPO"],[m,x]],[/\b(opd2\d{3}a?) bui/i],[g,[d,"OPPO"],[m,nt]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[g,[d,"Vivo"],[m,x]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[g,[d,"Realme"],[m,x]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[g,[d,ie],[m,x]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[g,[d,ie],[m,nt]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[g,[d,Nt],[m,nt]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[g,[d,Nt],[m,x]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[g,[d,"Lenovo"],[m,nt]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[g,/_/g," "],[d,"Nokia"],[m,x]],[/(pixel c)\b/i],[g,[d,jt],[m,nt]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[g,[d,jt],[m,x]],[/droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[g,[d,Ae],[m,x]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[g,"Xperia Tablet"],[d,Ae],[m,nt]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[g,[d,"OnePlus"],[m,x]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[g,[d,G],[m,nt]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[g,/(.+)/g,"Fire Phone $1"],[d,G],[m,x]],[/(playbook);[-\w\),; ]+(rim)/i],[g,d,[m,nt]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[g,[d,bt],[m,x]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[g,[d,rt],[m,nt]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[g,[d,rt],[m,x]],[/(nexus 9)/i],[g,[d,"HTC"],[m,nt]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[d,[g,/_/g," "],[m,x]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[g,[d,"Acer"],[m,nt]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[g,[d,"Meizu"],[m,x]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[g,[d,"Ulefone"],[m,x]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron|infinix|tecno)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[d,g,[m,x]],[/(kobo)\s(ereader|touch)/i,/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[d,g,[m,nt]],[/(surface duo)/i],[g,[d,Ht],[m,nt]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[g,[d,"Fairphone"],[m,x]],[/(u304aa)/i],[g,[d,"AT&T"],[m,x]],[/\bsie-(\w*)/i],[g,[d,"Siemens"],[m,x]],[/\b(rct\w+) b/i],[g,[d,"RCA"],[m,nt]],[/\b(venue[\d ]{2,7}) b/i],[g,[d,"Dell"],[m,nt]],[/\b(q(?:mv|ta)\w+) b/i],[g,[d,"Verizon"],[m,nt]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[g,[d,"Barnes & Noble"],[m,nt]],[/\b(tm\d{3}\w+) b/i],[g,[d,"NuVision"],[m,nt]],[/\b(k88) b/i],[g,[d,"ZTE"],[m,nt]],[/\b(nx\d{3}j) b/i],[g,[d,"ZTE"],[m,x]],[/\b(gen\d{3}) b.+49h/i],[g,[d,"Swiss"],[m,x]],[/\b(zur\d{3}) b/i],[g,[d,"Swiss"],[m,nt]],[/\b((zeki)?tb.*\b) b/i],[g,[d,"Zeki"],[m,nt]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[d,"Dragon Touch"],g,[m,nt]],[/\b(ns-?\w{0,9}) b/i],[g,[d,"Insignia"],[m,nt]],[/\b((nxa|next)-?\w{0,9}) b/i],[g,[d,"NextBook"],[m,nt]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[d,"Voice"],g,[m,x]],[/\b(lvtel\-)?(v1[12]) b/i],[[d,"LvTel"],g,[m,x]],[/\b(ph-1) /i],[g,[d,"Essential"],[m,x]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[g,[d,"Envizen"],[m,nt]],[/\b(trio[-\w\. ]+) b/i],[g,[d,"MachSpeed"],[m,nt]],[/\btu_(1491) b/i],[g,[d,"Rotor"],[m,nt]],[/(shield[\w ]+) b/i],[g,[d,"Nvidia"],[m,nt]],[/(sprint) (\w+)/i],[d,g,[m,x]],[/(kin\.[onetw]{3})/i],[[g,/\./g," "],[d,Ht],[m,x]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[g,[d,Pe],[m,nt]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[g,[d,Pe],[m,x]],[/smart-tv.+(samsung)/i],[d,[m,O]],[/hbbtv.+maple;(\d+)/i],[[g,/^/,"SmartTV"],[d,Ot],[m,O]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[d,Nt],[m,O]],[/(apple) ?tv/i],[d,[g,X+" TV"],[m,O]],[/crkey/i],[[g,mt+"cast"],[d,jt],[m,O]],[/droid.+aft(\w+)( bui|\))/i],[g,[d,G],[m,O]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[g,[d,fe],[m,O]],[/(bravia[\w ]+)( bui|\))/i],[g,[d,Ae],[m,O]],[/(mitv-\w{5}) bui/i],[g,[d,Re],[m,O]],[/Hbbtv.*(technisat) (.*);/i],[d,g,[m,O]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[d,E],[g,E],[m,O]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[m,O]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[d,g,[m,W]],[/droid.+; (shield) bui/i],[g,[d,"Nvidia"],[m,W]],[/(playstation [345portablevi]+)/i],[g,[d,Ae],[m,W]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[g,[d,Ht],[m,W]],[/((pebble))app/i],[d,g,[m,J]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[g,[d,X],[m,J]],[/droid.+; (glass) \d/i],[g,[d,jt],[m,J]],[/droid.+; (wt63?0{2,3})\)/i],[g,[d,Pe],[m,J]],[/(quest( \d| pro)?)/i],[g,[d,tt],[m,J]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[d,[m,pt]],[/(aeobc)\b/i],[g,[d,G],[m,pt]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[g,[m,x]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[g,[m,nt]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[m,nt]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[m,x]],[/(android[-\w\. ]{0,9});.+buil/i],[g,[d,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[T,[r,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[T,[r,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[r,T],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[T,r]],os:[[/microsoft (windows) (vista|xp)/i],[r,T],[/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i],[r,[T,D,Bt]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[T,D,Bt],[r,"Windows"]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[T,/_/g,"."],[r,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[r,qt],[T,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[T,r],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[r,T],[/\(bb(10);/i],[T,[r,bt]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[T,[r,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[T,[r,lt+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[T,[r,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[T,[r,"watchOS"]],[/crkey\/([\d\.]+)/i],[T,[r,mt+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[r,at],T],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[r,T],[/(sunos) ?([\w\.\d]*)/i],[[r,"Solaris"],T],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[r,T]]},At=function(Yt,Vt){if(typeof Yt===y&&(Vt=Yt,Yt=u),!(this instanceof At))return new At(Yt,Vt).getResult();var Xt=typeof I!==_&&I.navigator?I.navigator:u,ne=Yt||(Xt&&Xt.userAgent?Xt.userAgent:""),Te=Xt&&Xt.userAgentData?Xt.userAgentData:u,me=Vt?function(Me,ze){var Qe={};for(var nn in Me)ze[nn]&&ze[nn].length%2==0?Qe[nn]=ze[nn].concat(Me[nn]):Qe[nn]=Me[nn];return Qe}(Dt,Vt):Dt,Ue=Xt&&Xt.userAgent==ne;return this.getBrowser=function(){var Me,ze={};return ze[r]=u,ze[T]=u,Q.call(ze,ne,me.browser),ze[h]=typeof(Me=ze[T])===i?Me.replace(/[^\d\.]/g,"").split(".")[0]:u,Ue&&Xt&&Xt.brave&&typeof Xt.brave.isBrave==n&&(ze[r]="Brave"),ze},this.getCPU=function(){var Me={};return Me[q]=u,Q.call(Me,ne,me.cpu),Me},this.getDevice=function(){var Me={};return Me[d]=u,Me[g]=u,Me[m]=u,Q.call(Me,ne,me.device),Ue&&!Me[m]&&Te&&Te.mobile&&(Me[m]=x),Ue&&Me[g]=="Macintosh"&&Xt&&typeof Xt.standalone!==_&&Xt.maxTouchPoints&&Xt.maxTouchPoints>2&&(Me[g]="iPad",Me[m]=nt),Me},this.getEngine=function(){var Me={};return Me[r]=u,Me[T]=u,Q.call(Me,ne,me.engine),Me},this.getOS=function(){var Me={};return Me[r]=u,Me[T]=u,Q.call(Me,ne,me.os),Ue&&!Me[r]&&Te&&Te.platform&&Te.platform!="Unknown"&&(Me[r]=Te.platform.replace(/chrome os/i,at).replace(/macos/i,qt)),Me},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return ne},this.setUA=function(Me){return ne=typeof Me===i&&Me.length>500?E(Me,500):Me,this},this.setUA(ne),this};At.VERSION="1.0.38",At.BROWSER=v([r,T,h]),At.CPU=v([q]),At.DEVICE=v([g,d,m,W,x,O,nt,J,pt]),At.ENGINE=At.OS=v([r,T]),typeof Lt!==_?(ve.exports&&(Lt=ve.exports=At),Lt.UAParser=At):M.amdO?(ct=(function(){return At}).call(Lt,M,Lt,ve))===u||(ve.exports=ct):typeof I!==_&&(I.UAParser=At);var Rt=typeof I!==_&&(I.jQuery||I.Zepto);if(Rt&&!Rt.ua){var _t=new At;Rt.ua=_t.getResult(),Rt.ua.get=function(){return _t.getUA()},Rt.ua.set=function(Yt){_t.setUA(Yt);var Vt=_t.getResult();for(var Xt in Vt)Rt.ua[Xt]=Vt[Xt]}}})(typeof window=="object"?window:this)},8214:function(ve,Lt,M){function ct(I){try{if(!M.g.localStorage)return!1}catch{return!1}var u=M.g.localStorage[I];return u!=null&&String(u).toLowerCase()==="true"}ve.exports=function(I,u){if(ct("noDeprecation"))return I;var n=!1;return function(){if(!n){if(ct("throwDeprecation"))throw new Error(u);ct("traceDeprecation")?console.trace(u):console.warn(u),n=!0}return I.apply(this,arguments)}}},3779:function(){},7199:function(){}},ui={};function zn(ve){var Lt=ui[ve];if(Lt!==void 0)return Lt.exports;var M=ui[ve]={exports:{}};return ya[ve].call(M.exports,M,M.exports,zn),M.exports}zn.amdO={},zn.n=function(ve){var Lt=ve&&ve.__esModule?function(){return ve.default}:function(){return ve};return zn.d(Lt,{a:Lt}),Lt},zn.d=function(ve,Lt){for(var M in Lt)zn.o(Lt,M)&&!zn.o(ve,M)&&Object.defineProperty(ve,M,{enumerable:!0,get:Lt[M]})},zn.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}(),zn.o=function(ve,Lt){return Object.prototype.hasOwnProperty.call(ve,Lt)};var Ea={};return function(){zn.d(Ea,{default:function(){return y}}),zn(1229);var ve,Lt=zn(6035),M=zn(1648),ct=zn(8496),I=zn(4716),u=function(){var i,h="application/dash+xml";function g(m,d,T){if(!m||!/^VIDEO$/i.test(m.nodeName))return null;if(m._dashjs_player)return m._dashjs_player;var q,W=m.id||m.name||"video element";if(!(d=d||[].slice.call(m.querySelectorAll("source")).filter(function(x){return x.type==h})[0])&&m.src)(d=document.createElement("source")).src=m.src;else if(!d&&!m.src)return null;return T=T||{},(q=(0,I.A)(T).create()).initialize(m,d.src,m.autoplay),i||(i=q.getDebug().getLogger()),i.debug("Converted "+W+" to dash.js player and added content: "+d.src),m._dashjs_player=q,q}function r(m){return/^VIDEO$/i.test(m.nodeName)?m:r(m.parentNode)}return{create:g,createAll:function(m,d){var T=[];m=m||"[data-dashjs-player]";for(var q=(d=d||document).querySelectorAll(m),W=0;W<q.length;W++){var x=g(q[W],null);T.push(x)}for(var nt=d.querySelectorAll('source[type="'+h+'"]'),O=0;O<nt.length;O++){var J=g(r(nt[O]),null);T.push(J)}return T}}}();!(typeof window<"u"&&window&&window.dashjs&&window.dashjs.skipAutoCreate)&&typeof window<"u"&&window&&window.addEventListener&&(window.document.readyState==="complete"?window.dashjs?u.createAll():ve=window.setInterval(function(){window.dashjs&&(window.clearInterval(ve),u.createAll())},500):window.addEventListener("load",function i(){window.removeEventListener("load",i),u.createAll()}));var n=u,_=zn(4413);dashjs.Protection=ct.default,dashjs.MetricsReporting=M.default,dashjs.MediaPlayerFactory=n,dashjs.Debug=_.A,dashjs.supportsMediaSource=Lt.a;var y=dashjs}(),Ea.default}()})})(Ko);var nl=Ko.exports;const rl=el.getDefaultExportFromCjs(nl),il=Object.freeze(Object.defineProperty({__proto__:null,default:rl},Symbol.toStringTag,{value:"Module"}));exports.dash_all_min=il;
|