@eluvio/elv-player-js 2.1.20 → 2.1.21

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.
@@ -1,21 +1,21 @@
1
- "use strict";const nl=require("./index-DjBMku6v.js");var ya={exports:{}};/*! For license information please see dash.all.min.js.LICENSE.txt */var Wo;function rl(){return Wo||(Wo=1,(function(zo,sl){(function(Ea,ui){zo.exports=ui()})(self,(function(){return(function(){var Ea={8107:function(vt,Le){var M,ce,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+/",ce=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 ce(g)},i.decodeASCII=function(h){var g=u(h);return n.decode(g)},i.encode=function(h){var g=_(h);return ce(g)},i.decode=function(h){var g=u(h);return y(g)},Le.decode=i.decode,Le.decodeArray=i.decodeArray,Le.encode=i.encode,Le.encodeASCII=i.encodeASCII},4947:function(vt,Le){(function(M){var ce={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 ce.hasOwnProperty(O)&&(J=ce[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 pe=this.verboseFilter[O];this.verboseLevel>=pe&&console.log(this.time+" ["+O+"] "+J)}},m=function(O){for(var J=[],pe=0;pe<O.length;pe++)J.push(O[pe].toString(16));return J},d=function(O,J,pe,G,X){this.foreground=O||"white",this.underline=J||!1,this.italics=pe||!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"],pe=0;pe<J.length;pe++){var G=J[pe];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,pe,G,X,re){this.uchar=O||" ",this.penState=new d(J,pe,G,X,re)};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,pe=0;pe<n;pe++)if(!this.chars[pe].equals(O.chars[pe])){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 pe=this.pos+1;pe<J+1;pe++)this.chars[pe].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,pe=0;pe<n;pe++){var G=this.chars[pe].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,pe=0;pe<u;pe++)if(!this.rows[pe].equals(O.rows[pe])){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 pe=this.rows[this.currRow];if(O.indent!==null){var G=O.indent,X=Math.max(G-1,0);pe.setCursor(O.indent),O.color=pe.chars[X].penState.foreground}var re={foreground:O.color,underline:O.underline,italics:O.italics,background:"black",flash:!1};this.setPen(re)},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=[],pe="",G=-1,X=0;X<u;X++){var re=this.rows[X].getTextString();re&&(G=X+1,O?J.push("Row "+G+': "'+re+'"'):J.push(re.trim()))}return J.length>0&&(pe=O?"["+J.join(" | ")+"]":J.join(`
1
+ "use strict";const il=require("./index-Cy05VtkV.js");function al(qr,Ui){for(var Cr=0;Cr<Ui.length;Cr++){const ar=Ui[Cr];if(typeof ar!="string"&&!Array.isArray(ar)){for(const Bn in ar)if(Bn!=="default"&&!(Bn in qr)){const Dr=Object.getOwnPropertyDescriptor(ar,Bn);Dr&&Object.defineProperty(qr,Bn,Dr.get?Dr:{enumerable:!0,get:()=>ar[Bn]})}}}return Object.freeze(Object.defineProperty(qr,Symbol.toStringTag,{value:"Module"}))}var va={exports:{}};/*! For license information please see dash.all.min.js.LICENSE.txt */var Xo;function ol(){return Xo||(Xo=1,(function(qr,Ui){(function(Cr,ar){qr.exports=ar()})(self,(function(){return(function(){var Cr={8107:function(vt,Le){var M,ce,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+/",ce=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 ce(g)},i.decodeASCII=function(h){var g=u(h);return n.decode(g)},i.encode=function(h){var g=_(h);return ce(g)},i.decode=function(h){var g=u(h);return y(g)},Le.decode=i.decode,Le.decodeArray=i.decodeArray,Le.encode=i.encode,Le.encodeASCII=i.encodeASCII},4947:function(vt,Le){(function(M){var ce={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 ce.hasOwnProperty(O)&&(J=ce[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 pe=this.verboseFilter[O];this.verboseLevel>=pe&&console.log(this.time+" ["+O+"] "+J)}},m=function(O){for(var J=[],pe=0;pe<O.length;pe++)J.push(O[pe].toString(16));return J},d=function(O,J,pe,G,X){this.foreground=O||"white",this.underline=J||!1,this.italics=pe||!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"],pe=0;pe<J.length;pe++){var G=J[pe];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,pe,G,X,re){this.uchar=O||" ",this.penState=new d(J,pe,G,X,re)};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,pe=0;pe<n;pe++)if(!this.chars[pe].equals(O.chars[pe])){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 pe=this.pos+1;pe<J+1;pe++)this.chars[pe].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,pe=0;pe<n;pe++){var G=this.chars[pe].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,pe=0;pe<u;pe++)if(!this.rows[pe].equals(O.rows[pe])){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 pe=this.rows[this.currRow];if(O.indent!==null){var G=O.indent,X=Math.max(G-1,0);pe.setCursor(O.indent),O.color=pe.chars[X].penState.foreground}var re={foreground:O.color,underline:O.underline,italics:O.italics,background:"black",flash:!1};this.setPen(re)},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=[],pe="",G=-1,X=0;X<u;X++){var re=this.rows[X].getTextString();re&&(G=X+1,O?J.push("Row "+G+': "'+re+'"'):J.push(re.trim()))}return J.length>0&&(pe=O?"["+J.join(" | ")+"]":J.join(`
2
2
  `)),pe},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 pe=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";r.log("INFO",pe+": "+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 pe=Math.floor(O/2)-16;J.foreground=["white","green","blue","cyan","red","yellow","magenta"][pe]}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 ne=function(O,J,pe){this.field=O||1,this.outputs=[J,pe],this.channels=[new x(1,J),new x(2,pe)],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}};ne.prototype={getHandler:function(O){return this.channels[O].getHandler()},setHandler:function(O,J){this.channels[O].setHandler(J)},addData:function(O,J){var pe,G,X,re=!1;this.lastTime=O,r.setTime(O);for(var be=0;be<J.length;be+=2)G=127&J[be],X=127&J[be+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[be],J[be+1]])+"] -> ("+m([G,X])+")"),(pe=this.parseCmd(G,X))||(pe=this.parseMidrow(G,X)),pe||(pe=this.parsePAC(G,X)),pe||(pe=this.parseBackgroundAttributes(G,X)),pe||(re=this.parseChars(G,X))&&(this.currChNr&&this.currChNr>=0?this.channels[this.currChNr-1].insertChars(re):r.log("WARNING","No channel found yet. TEXT-MODE?")),pe?this.dataCounters.cmd+=2:re?this.dataCounters.char+=2:(this.dataCounters.other+=2,r.log("WARNING","Couldn't parse cleaned data "+m([G,X])+" orig: "+m([J[be],J[be+1]])))):this.dataCounters.padding+=2},parseCmd:function(O,J){var pe;if(!((O===20||O===21||O===28||O===29)&&32<=J&&J<=47||(O===23||O===31)&&33<=J&&J<=35))return!1;pe=O===20||O===21||O===23?1:2;var G=this.channels[pe-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=pe,!0},parseMidrow:function(O,J){var pe=null;if((O===17||O===25)&&32<=J&&J<=47){if((pe=O===17?1:2)!==this.currChNr)return r.log("ERROR","Mismatch channel in midrow parsing"),!1;var G=this.channels[pe-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 pe,G;if(!((17<=O&&O<=23||25<=O&&O<=31)&&64<=J&&J<=127||(O===16||O===24)&&64<=J&&J<=95))return!1;pe=O<=23?1:2,G=64<=J&&J<=95?pe===1?_[O]:i[O]:pe===1?y[O]:h[O];var X=this.interpretPAC(G,J);return this.channels[pe-1].setPAC(X),this.lastCmdA=O,this.lastCmdB=J,this.currChNr=pe,!0},interpretPAC:function(O,J){var pe,G={color:null,italics:!1,indent:null,underline:!1,row:O};return pe=J>95?J-96:J-64,G.underline=!(1&~pe),pe<=13?G.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(pe/2)]:pe<=15?(G.italics=!0,G.color="white"):G.indent=4*Math.floor((pe-16)/2),G},parseChars:function(O,J){var pe=null,G=null,X=null;if(O>=25?(pe=2,X=O-8):(pe=1,X=O),17<=X&&X<=19){var re;re=X===17?J+80:X===18?J+112:J+144,r.log("INFO","Special char '"+I(re)+"' in channel "+pe),G=[re],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 be=m(G);r.log("DEBUG","Char codes = "+be.join(","))}return G},parseBackgroundAttributes:function(O,J){var pe,G,X;return((O===16||O===24)&&32<=J&&J<=47||(O===23||O===31)&&45<=J&&J<=47)&&(pe={},O===16||O===24?(G=Math.floor((J-32)/2),pe.background=g[G],J%2==1&&(pe.background=pe.background+"_semi")):J===45?pe.background="transparent":(pe.foreground="black",J===47&&(pe.underline=!0)),X=O<24?1:2,this.channels[X-1].setBkgData(pe),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=ne,M.findCea608Nalus=function(O,J,pe){for(var G=0,X=J,re=[],be=function(Se,Ne,He,it){if(Se!==4||Ne<8)return null;var Ie=He.getUint8(it),Oe=He.getUint16(it+1),ft=He.getUint32(it+3),At=He.getUint8(it+7);return Ie==181&&Oe==49&&ft==1195456820&&At==3};X<J+pe;){if(G=O.getUint32(X),(31&O.getUint8(X+4))==6)for(var Ue=X+5,me=-1;Ue<X+4+G-1;){me=0;for(var le=255;le===255;)me+=le=O.getUint8(Ue),Ue++;var je=0;for(le=255;le===255;)je+=le=O.getUint8(Ue),Ue++;be(me,je,O,Ue)&&re.push([Ue,je]),Ue+=je}X+=G+4}return re},M.extractCea608DataFromRange=function(O,J){var pe=J[0],G=[[],[]];pe+=8;var X=31&O.getUint8(pe);pe+=2;for(var re=0;re<X;re++){var be=O.getUint8(pe),Ue=4&be,me=3&be;pe++;var le=O.getUint8(pe);pe++;var je=O.getUint8(pe);pe++,Ue&&(127&le)+(127&je)!=0&&(me===0?(G[0].push(le),G[0].push(je)):me===1&&(G[1].push(le),G[1].push(je)))}return G}})(Le)},1229:function(vt,Le,M){var ce=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=ce.A,y.FactoryMaker=I.A,y.Debug=u.A,y.Version=(0,n.i)()},4413:function(vt,Le,M){var ce=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,ne=(0,ce.A)(x).getInstance(),O=m.settings,J=[];function pe(le){return le&&le.bind?le.bind(window.console):window.console.log.bind(window.console)}function G(){for(var le=arguments.length,je=new Array(le),Se=0;Se<le;Se++)je[Se]=arguments[Se];me.apply(void 0,[n,this].concat(je))}function X(){for(var le=arguments.length,je=new Array(le),Se=0;Se<le;Se++)je[Se]=arguments[Se];me.apply(void 0,[_,this].concat(je))}function re(){for(var le=arguments.length,je=new Array(le),Se=0;Se<le;Se++)je[Se]=arguments[Se];me.apply(void 0,[y,this].concat(je))}function be(){for(var le=arguments.length,je=new Array(le),Se=0;Se<le;Se++)je[Se]=arguments[Se];me.apply(void 0,[i,this].concat(je))}function Ue(){for(var le=arguments.length,je=new Array(le),Se=0;Se<le;Se++)je[Se]=arguments[Se];me.apply(void 0,[h,this].concat(je))}function me(le,je){var Se="",Ne=null;T&&(Ne=new Date().getTime(),Se+="["+(Ne-W)+"]"),q&&je&&je.getClassName&&(Se+="["+je.getClassName()+"]",je.getType&&(Se+="["+je.getType()+"]")),Se.length>0&&(Se+=" ");for(var He=arguments.length,it=new Array(He>2?He-2:0),Ie=2;Ie<He;Ie++)it[Ie-2]=arguments[Ie];Array.apply(null,it).forEach((function(Oe){Se+=Oe+" "})),J[le]&&O&&O.get().debug.logLevel>=le&&J[le](Se),O&&O.get().debug.dispatchEvent&&ne.trigger(I.A.LOG,{message:Se,level:le})}return d={getLogger:function(le){return{fatal:G.bind(le),error:X.bind(le),warn:re.bind(le),info:be.bind(le),debug:Ue.bind(le)}},setLogTimestampVisible:function(le){T=le},setCalleeNameVisible:function(le){q=le}},T=!0,q=!0,W=new Date().getTime(),typeof window<"u"&&window.console&&(J[n]=pe(window.console.error),J[_]=pe(window.console.error),J[y]=pe(window.console.warn),J[i]=pe(window.console.info),J[h]=pe(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),Le.A=r},8366:function(vt,Le,M){var ce=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=ce.A.getSingletonFactory(u);n.EVENT_PRIORITY_LOW=0,n.EVENT_PRIORITY_HIGH=5e3,ce.A.updateSingletonFactory(u.__dashjs_factory_name,n),Le.A=n},5742:function(vt,Le){var M=(function(){var ce,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:ce},m);for(var x in d=g.apply({context:r},m),W=W.apply({context:r,factory:ce,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 ce={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)}},ce})();Le.A=M},1657:function(vt,Le,M){var ce=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(ne){if(h(ne)!="object"||!ne)return ne;var O=ne[Symbol.toPrimitive];if(O!==void 0){var J=O.call(ne,"string");if(h(J)!="object")return J;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(ne)})(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 ne(O,J,pe){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[pe+G]&&T.trigger(q[pe+G])):ne(O[G],J[G],pe.slice()+G+"."):console.error("Settings parameter "+pe+G+" is not supported"))}return{get:function(){return x},update:function(O){h(O)==="object"&&ne(O,x,"")},reset:function(){x=I.A.clone(W)}}}r.__dashjs_factory_name="Settings";var m=ce.A.getSingletonFactory(r);Le.A=m},1739:function(vt,Le,M){var ce=M(5684),I=M.n(ce),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],ne=x.indexOf(": ");ne>0&&(d[x.substring(0,ne)]=x.substring(ne+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})();Le.A=i},6558:function(vt,Le,M){M.d(Le,{i:function(){return I}});var ce="4.7.4";function I(){return ce}},1840:function(vt,Le){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 ce(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])}}}])&&ce(n.prototype,_),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,_})();Le.A=u},3426:function(vt,Le,M){function ce(i){return ce=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},ce(i)}function I(i,h,g){return h=n(h),(function(r,m){if(m&&(ce(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);Le.A=y},4865:function(vt,Le,M){function ce(h){return ce=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},ce(h)}function I(h,g,r){return g=n(g),(function(m,d){if(d&&(ce(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;Le.A=i},9656:function(vt,Le){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 ce(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])}}}])&&ce(n.prototype,_),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,_})();Le.A=u},2945:function(vt,Le,M){var ce=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,ne=h.type,O=h.streamInfo,J=h.segmentsController,pe=h.timelineConverter,G=h.baseURLController;function X(){return ne}function re(){m=null}function be(Se,Ne,He){var it,Ie,Oe=G.resolve(He.path),ft={};return Oe&&Ne!==Oe.url&&x.isRelative(Ne)?(it=Oe.url,Ie=Oe.serviceLocation,ft=Oe.queryParams,Ne&&(it=x.resolve(Ne,it))):it=Ne,!x.isRelative(it)&&(Se.url=it,Se.serviceLocation=Ie,Se.queryParams=ft,!0)}function Ue(Se,Ne){if(Ne==null)return null;var He=new ce.A,it=Ne.representation,Ie=it.adaptation.period.mpd.manifest.Period_asArray[it.adaptation.period.index].AdaptationSet_asArray[it.adaptation.index].Representation_asArray[it.index].bandwidth,Oe=Ne.media;return Oe=(0,_.XX)(Oe,"Number",Ne.replacementNumber),Oe=(0,_.XX)(Oe,"Time",Ne.replacementTime),Oe=(0,_.XX)(Oe,"Bandwidth",Ie),Oe=(0,_.dD)(Oe,it.id),Oe=(0,_.Dr)(Oe),He.mediaType=X(),He.type=I.G.MEDIA_SEGMENT_TYPE,He.range=Ne.mediaRange,He.startTime=Ne.presentationStartTime,He.mediaStartTime=Ne.mediaStartTime,He.duration=Ne.duration,He.timescale=it.timescale,He.availabilityStartTime=Ne.availabilityStartTime,He.availabilityEndTime=Ne.availabilityEndTime,He.availabilityTimeComplete=it.availabilityTimeComplete,He.wallStartTime=Ne.wallStartTime,He.quality=it.index,He.index=Ne.index,He.mediaInfo=Se,He.adaptationIndex=it.adaptation.index,He.representationId=it.id,be(He,Oe,it)?He:void 0}function me(Se,Ne,He){var it=null;if(!Ne||!Ne.segmentInfoType)return it;var Ie=J.getSegmentByTime(Ne,He);return Ie&&(m=Ie,r.debug("Index for time "+He+" is "+Ie.index),it=Ue(Se,Ie)),it}function le(Se,Ne,He){var it=null,Ie=J.getSegmentByIndex(Ne,He,m?m.mediaStartTime:-1);if(Ie)it=Ue(Se,Ie),m=Ie;else{if(d&&!T)return r.debug(X()+" No segment found at index: "+He+". Wait for next loop"),null;T=!0}return it}function je(){r.debug("Dynamic stream complete"),T=!0}return g={getCurrentIndex:function(){return m?m.index:-1},getInitRequest:function(Se,Ne){return Ne?(function(He,it,Ie){var Oe=new ce.A,ft=it.adaptation.period,At=ft.start;if(Oe.mediaType=Ie,Oe.type=I.G.INIT_SEGMENT_TYPE,Oe.range=it.range,Oe.availabilityStartTime=pe.calcAvailabilityStartTimeFromPresentationTime(At,it,d),Oe.availabilityEndTime=pe.calcAvailabilityEndTimeFromPresentationTime(At+ft.duration,it,d),Oe.quality=it.index,Oe.mediaInfo=He,Oe.representationId=it.id,be(Oe,it.initialization,it))return Oe.url=(0,_.XX)(Oe.url,"Bandwidth",it.bandwidth),Oe})(Se,Ne,X()):null},getNextSegmentRequest:function(Se,Ne){return Ne&&Ne.segmentInfoType?le(Se,Ne,m?m.index+1:0):null},getNextSegmentRequestIdempotent:function(Se,Ne){var He=m?m.index+1:0,it=J.getSegmentByIndex(Ne,He,m?m.mediaStartTime:-1);return it?Ue(Se,it):null},getSegmentRequestForTime:me,getStreamId:function(){return O.id},getStreamInfo:function(){return O},getType:X,getValidTimeAheadOfTargetTime:function(Se,Ne,He,it){try{if(isNaN(Se)||!Ne||!He)return NaN;if(Se<0&&(Se=0),isNaN(it)&&(it=.5),me(Ne,He,Se))return Se;if(He.adaptation.period.start+He.adaptation.period.duration<Se)return NaN;for(var Ie=isFinite(He.adaptation.period.duration)?He.adaptation.period.start+He.adaptation.period.duration:Se+30,Oe=Math.min(Se+it,Ie),ft=NaN,At=null;Oe<=Ie;){var Rt=null;if(Oe<=Ie&&(Rt=me(Ne,He,Oe)),Rt){ft=Oe,At=Rt;break}Oe+=it}if(At){var Pt=At.startTime+At.duration;return Se>At.startTime&&Pt-Se>it?Se:!isNaN(At.startTime)&&Se<At.startTime&&ft>At.startTime?At.startTime+.001:Math.min(Pt-it,ft)}return ft}catch{return NaN}},initialize:function(Se){d=Se,T=!1,J.initialize(Se)},isLastSegmentRequested:function(Se,Ne){return!Se||!m?!1:T?!0:!isFinite(Se.adaptation.period.duration)||m.presentationStartTime+m.duration>Ne?!1:Se.mediaFinishedInformation&&!isNaN(Se.mediaFinishedInformation.numberOfSegments)&&!isNaN(m.index)&&m.index>=Se.mediaFinishedInformation.numberOfSegments-1&&(!d||Se.segmentInfoType===y.A.SEGMENT_TEMPLATE||d&&Se.segmentInfoType===y.A.SEGMENT_LIST&&Se.adaptation.period.nextPeriodId)?!0:!!(d&&Se.adaptation.period.nextPeriodId&&Se.segmentInfoType===y.A.SEGMENT_TIMELINE&&Se.mediaFinishedInformation&&!isNaN(Se.mediaFinishedInformation.mediaTimeOfLastSignaledSegment)&&m&&!isNaN(m.mediaStartTime)&&!isNaN(m.duration)&&m.mediaStartTime+m.duration>=Se.mediaFinishedInformation.mediaTimeOfLastSignaledSegment-.05)},repeatSegmentRequest:function(Se,Ne){return Ne&&Ne.segmentInfoType?le(Se,Ne,m?m.index:0):null},reset:function(){re(),q.off(n.A.DYNAMIC_TO_STATIC,je,g)}},r=W.getLogger(g),re(),q.on(n.A.DYNAMIC_TO_STATIC,je,g),g}i.__dashjs_factory_name="DashHandler",Le.A=u.A.getClassFactory(i)},5810:function(vt,Le){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 ce(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"}}])&&ce(n.prototype,_),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,_})());Le.A=u},6849:function(vt,Le,M){var ce=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,ne){return ne?Promise.resolve():q.getSegmentBaseInitSegment({representation:x,mediaType:T})},updateSegmentData:function(x,ne){return ne?Promise.resolve():q.getSegmentList({mimeType:x.mimeType,representation:x,mediaType:T})},getSegmentByIndex:function(x,ne,O){var J=W(x);return J?J.getSegmentByIndex(x,ne,O):null},getSegmentByTime:function(x,ne){var O=W(x);return O?O.getSegmentByTime(x,ne):null},getMediaFinishedInformation:function(x){var ne=W(x);return ne?ne.getMediaFinishedInformation(x):{numberOfSegments:0,mediaTimeOfLastSignaledSegment:NaN}}},r={},g}y.__dashjs_factory_name="SegmentsController";var i=ce.A.getClassFactory(y);Le.A=i},8610:function(vt,Le,M){var ce=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),ne=Math.max(d-x,0),O=null;if(ne<q){var J=T.SegmentURL_asArray[ne];(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 _=ce.A.getClassFactory(n);Le.A=_},8396:function(vt,Le,M){var ce=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,ne,O,J=d.segments,pe=J?J.length:null,G=-1;if(J&&pe>0){for(O=0;O<pe;O++)if(x=(W=J[O]).presentationStartTime,T+(q=(ne=W.duration)/2)>=x&&T-q<x+ne){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=ce.A.getClassFactory(u);Le.A=n},284:function(vt,Le,M){M.d(Le,{Dr:function(){return u},L$:function(){return h},W$:function(){return g},XX:function(){return _},dD:function(){return n}});var ce=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,ne,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),ne=parseInt(r.substring(W+2,q-1),10),x){case"d":case"i":case"u":O=I(d.toString(),ne);break;case"x":O=I(d.toString(16),ne);break;case"X":O=I(d.toString(16),ne).toUpperCase();break;case"o":O=I(d.toString(8),ne);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,ne){var O,J=new ce.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=ne,J.representation.startNumber+O),J.index=ne,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 ne=y(d,q,W,r.calcMediaTimeFromPresentationTime(W,d),r,x,m,T);return i(r,d,ne,m)?ne:null}function g(r,m,d,T,q,W,x,ne,O,J){var pe,G,X=T/W,re=q/W;return pe=r.calcPresentationTimeFromMediaTime(X,d),i(r,d,G=y(d,re,pe,X,r,pe+re,m,O),m)?(G.replacementTime=J||T,x=_(x,"Number",G.replacementNumber),x=_(x,"Time",G.replacementTime),G.media=x,G.mediaRange=ne,G):null}},9032:function(vt,Le,M){var ce=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 _=ce.A.getClassFactory(n);Le.A=_},9569:function(vt,Le,M){var ce=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,ne,O,J,pe,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,re=X.SegmentTimeline,be=X.SegmentURL_asArray,Ue=0,me=-1;G=T.timescale;var le=!1;for(ne=0,O=(W=re.S_asArray).length;ne<O&&!le;ne++)for(pe=0,(x=W[ne]).hasOwnProperty("r")&&(pe=x.r),x.hasOwnProperty("t")&&(Ue=x.t),pe<0&&(pe=d(T,W[ne+1],x,G,Ue/G)),J=0;J<=pe&&!le;J++)(le=q(Ue,X,be,x,G,++me,ne))&&(T.segmentDuration=x.d/G),Ue+=x.d}function d(T,q,W,x,ne){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 pe=g.getCurrentDVRInfo();J=isNaN(pe.end)?0:pe.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-ne)/(W.d/x))-1,0)}return{getSegmentByIndex:function(T,q,W){if(r(),!T)return null;var x=null,ne=!1;return m(T,(function(O,J,pe,G,X,re,be){if(ne||W<0){var Ue=J.media,me=G.mediaRange;return pe&&(Ue=pe[be].media||"",me=pe[be].mediaRange),x=(0,u.W$)(h,i,T,O,G.d,X,Ue,me,re,G.tManifest),!0}return O>=W*X-.5*G.d&&(ne=!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(ne,O,J,pe,G,X,re){var be=parseFloat((x*G).toPrecision(15));if(be<ne+pe.d&&be>=ne){var Ue=O.media,me=pe.mediaRange;return J&&(Ue=J[re].media||"",me=J[re].mediaRange),W=(0,u.W$)(h,i,T,ne,pe.d,G,Ue,me,X,pe.tManifest),!0}return!1})),W},getMediaFinishedInformation:function(T){if(!T)return 0;var q,W,x,ne,O,J,pe,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,re=0,be=0;for(pe=T.timescale,ne=(q=G.S_asArray).length,x=0;x<ne;x++)for(J=0,(W=q[x]).hasOwnProperty("r")&&(J=W.r),W.hasOwnProperty("t")&&(re=(X=W.t)/pe),J<0&&(J=d(T,q[x+1],W,pe,re)),O=0;O<=J;O++)be++,re=(X+=W.d)/pe;return{numberOfSegments:be,mediaTimeOfLastSignaledSegment:re}}}}n.__dashjs_factory_name="TimelineSegmentsGetter";var _=ce.A.getClassFactory(n);Le.A=_},5708:function(vt,Le){function M(I,u,n){return Object.defineProperty(I,"prototype",{writable:!1}),I}var ce=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}));Le.A=ce},289:function(vt,Le){function M(I,u,n){return Object.defineProperty(I,"prototype",{writable:!1}),I}var ce=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=""}));Le.A=ce},4716:function(vt,Le,M){M.d(Le,{A:function(){return tl}});var ce=M(4947),I=M.n(ce),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 t,e,o,l,p,C,b,F,U,H,B,w,j,k,se,ie,he,oe,te,Z,K,z,f,N,S,L=this.context,R=(0,y.A)(L).getInstance();function V(){$(),k=!1,H=0,B=0,he=0,f=!1,oe=!0,te=!1,N=!1,Z=NaN,ie=NaN,b&&(R.off(i.A.DATA_UPDATE_COMPLETED,ct,t),R.off(i.A.LOADING_PROGRESS,Fe,t),R.off(i.A.MANIFEST_UPDATED,lt,t),R.off(i.A.STREAMS_COMPOSED,ye,t),R.off(r.A.PLAYBACK_ENDED,Zt,t),R.off(r.A.STREAM_INITIALIZING,xe,t),R.off(r.A.REPRESENTATION_SWITCH,Ge,t),R.off(r.A.BUFFER_LEVEL_STATE_CHANGED,ht,t),Pe(),b.removeEventListener("canplay",Ke),b.removeEventListener("canplaythrough",yt),b.removeEventListener("play",dt),b.removeEventListener("waiting",qt),b.removeEventListener("playing",Yt),b.removeEventListener("pause",sn),b.removeEventListener("error",pt),b.removeEventListener("seeking",ln),b.removeEventListener("seeked",ke),b.removeEventListener("timeupdate",ut),b.removeEventListener("progress",tt),b.removeEventListener("ratechange",gt),b.removeEventListener("loadedmetadata",Dt),b.removeEventListener("loadeddata",Vt),b.removeEventListener("stalled",st),b.removeEventListener("ended",Gt),b.removeEventListener("volumechange",Kt)),U=null,b=null,w=null,j=null}function de(){return parseFloat((ue(arguments.length>0&&arguments[0]!==void 0?arguments[0]:null)-fe()).toFixed(5))}function ue(Te){var We=Te||w;return We.start+We.duration}function P(){var Te=arguments.length>0&&arguments[0]!==void 0&&arguments[0];w&&b&&b.getElement()?(Te&&j&&ve(fe()),b.play()):k=!0}function $(){w&&b&&b.pause()}function Y(Te){var We=arguments.length>1&&arguments[1]!==void 0&&arguments[1],wt=arguments.length>2&&arguments[2]!==void 0&&arguments[2],jt=arguments.length>3&&arguments[3]!==void 0&&arguments[3];w&&b&&b.getElement()&&Te!==(isNaN(Z)?b.getTime():Z)&&((K=wt===!0)||(Z=Te),e.info("Requesting seek to time: "+Te+(K?" (internal)":"")),j&&jt&&ve(Te),b.setCurrentTime(Te,We))}function ge(){if(w&&b&&j){var Te=o&&o.hasVideoTrack()?u.A.VIDEO:u.A.AUDIO,We=p.getCurrentDVRInfo(Te);return We&&We.range?We.range.end:0}}function ve(Te){var We=new Date(F.getClientReferenceTime()),wt=C.getRegularPeriods()[0],jt=F.calcPresentationTimeFromWallTime(We,wt);H=jt-Te}function fe(){return w&&b?b.getTime():null}function Ce(){return w&&b?b.isPaused():null}function Me(){return w&&b?b.isSeeking():null}function Qe(){return w&&b?b.isStalled():null}function $e(){return w&&b?b.getPlaybackRate():null}function Ze(){return w&&b?b.getEnded():null}function at(){return j}function Nt(){var Te=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null;if(!Ce()&&j&&b.getReadyState()!==0&&!Me()&&!f){Te||(Te=o.hasVideoTrack()?u.A.VIDEO:u.A.AUDIO);var We=fe(),wt=(function(jt,hn){var En=p.getCurrentDVRInfo(hn),dn=En?En.range:null;return dn?jt>dn.end?Math.max(dn.end-H,dn.start):jt>0&&jt+.25<dn.start&&Math.abs(jt-dn.start)<31536e4?te?Math.max(dn.end-H,dn.start):dn.start:jt:NaN})(We,Te);!isNaN(wt)&&wt!==We&&!Me()&&(Qe()||z||b.getReadyState()===1)&&(e.debug("UpdateCurrentTime: Seek to actual time: ".concat(wt," from currentTime: ").concat(We)),Y(wt,!1,!1))}}function Ee(){U===null&&(U=setInterval((function(){(function(){if(R.trigger(i.A.WALLCLOCK_TIME_UPDATED,{isDynamic:j,time:new Date}),at()){var Te=Date.now();(isNaN(ie)||Te>ie+S.get().streaming.liveUpdateTimeThresholdInMilliseconds)&&(o.addDVRMetric(),Ce()?(function(){var We=Date.now();(!se||We>se+500)&&(se=We,ut())})():Nt(),ie=Te)}})()}),S.get().streaming.wallclockTimeUpdateInterval))}function Pe(){clearInterval(U),U=null}function ct(Te){var We=C.convertRepresentationToRepresentationInfo(Te.currentRepresentation),wt=We?We.mediaInfo.streamInfo:null;wt!==null&&w.id===wt.id&&(w=wt)}function Ke(){R.trigger(i.A.CAN_PLAY)}function yt(){R.trigger(i.A.CAN_PLAY_THROUGH)}function ht(Te){Te.streamId===o.getActiveStreamInfo().id&&(z=Te.state===_.A.BUFFER_EMPTY,S.get().streaming.buffer.setStallState&&b.setStallState(Te.mediaType,Te.state===_.A.BUFFER_EMPTY))}function dt(){e.info("Native video element event: play"),Nt(),Ee(),R.trigger(i.A.PLAYBACK_STARTED,{startTime:fe()})}function qt(){e.info("Native video element event: waiting"),R.trigger(i.A.PLAYBACK_WAITING,{playingTime:fe()})}function Yt(){e.info("Native video element event: playing"),K=!1,R.trigger(i.A.PLAYBACK_PLAYING,{playingTime:fe()})}function sn(){e.info("Native video element event: pause"),R.trigger(i.A.PLAYBACK_PAUSED,{ended:Ze()})}function ln(){if(!K){var Te=fe();isNaN(Z)||Z===Te||(Te=Z),Z=NaN,e.info("Seeking to: "+Te),Ee(),R.trigger(i.A.PLAYBACK_SEEKING,{seekTime:Te,streamId:w.id})}}function ke(){e.info("Native video element event: seeked"),K=!1,R.trigger(i.A.PLAYBACK_SEEKED)}function ut(){w&&R.trigger(i.A.PLAYBACK_TIME_UPDATED,{timeToEnd:de(),time:fe(),streamId:w.id})}function tt(){R.trigger(i.A.PLAYBACK_PROGRESS,{streamId:w.id})}function gt(){var Te=$e();e.info("Native video element event: ratechange: ",Te),R.trigger(i.A.PLAYBACK_RATE_CHANGED,{playbackRate:Te})}function Dt(){e.info("Native video element event: loadedmetadata"),R.trigger(i.A.PLAYBACK_METADATA_LOADED),Ee()}function Vt(){e.info("Native video element event: loadeddata"),R.trigger(i.A.PLAYBACK_LOADED_DATA)}function Gt(){e.info("Native video element event: ended"),$(),Pe();var Te=o?o.getActiveStreamInfo():null;Te&&R.trigger(i.A.PLAYBACK_ENDED,{isLast:Te.isLast})}function Kt(){R.trigger(i.A.PLAYBACK_VOLUME_CHANGED)}function Zt(Te){if(U&&Te.isLast){e.info("onPlaybackEnded -- PLAYBACK_ENDED but native video element didn't fire ended");var We=Te.seekTime?Te.seekTime:ue();b.setCurrentTime(We),$(),Pe()}}function pt(Te){var We=Te.target||Te.srcElement;R.trigger(i.A.PLAYBACK_ERROR,{error:We.error})}function Ot(){j=!1}function Fe(Te){if(Te.stream===!1&&te&&!isNaN(Te.request.duration)){var We=1.2*Te.request.duration;We>H&&(e.warn("Browser does not support fetch API with StreamReader. Increasing live delay to be 20% higher than segment duration:",We.toFixed(2)),H=We,B=We)}}function st(Te){R.trigger(i.A.PLAYBACK_STALLED,{e:Te})}function xe(Te){var We;(We=Te.mediaInfo)&&We.supplementalProperties&&We.supplementalProperties[u.A.SUPPLEMENTAL_PROPERTY_DVB_LL_SCHEME]&&We.supplementalProperties[u.A.SUPPLEMENTAL_PROPERTY_DVB_LL_SCHEME].value==="true"&&(e.debug("Low Latency critical SupplementalProperty set: Enabling low Latency"),te=!0)}function Ge(Te){var We=o.getActiveStreamInfo();Te&&We&&Te.currentRepresentation&&Te.streamId&&Te.streamId===We.id&&Te.mediaType&&(Te.mediaType===u.A.VIDEO||Te.mediaType===u.A.AUDIO)&&(oe=Te.currentRepresentation.availabilityTimeComplete,(te=!oe)&&!N&&(N=!0))}function lt(){f=!0}function ye(){f=!1}return t={initialize:function(Te,We){w=Te,We!==!0&&(b.addEventListener("canplay",Ke),b.addEventListener("canplaythrough",yt),b.addEventListener("play",dt),b.addEventListener("waiting",qt),b.addEventListener("playing",Yt),b.addEventListener("pause",sn),b.addEventListener("error",pt),b.addEventListener("seeking",ln),b.addEventListener("seeked",ke),b.addEventListener("timeupdate",ut),b.addEventListener("progress",tt),b.addEventListener("ratechange",gt),b.addEventListener("loadedmetadata",Dt),b.addEventListener("loadeddata",Vt),b.addEventListener("stalled",st),b.addEventListener("ended",Gt),b.addEventListener("volumechange",Kt),j=w.manifestInfo.isDynamic,z=!1,K=!1,R.on(i.A.DATA_UPDATE_COMPLETED,ct,t),R.on(i.A.LOADING_PROGRESS,Fe,t),R.on(i.A.MANIFEST_UPDATED,lt,t),R.on(i.A.STREAMS_COMPOSED,ye,t),R.on(r.A.PLAYBACK_ENDED,Zt,t,{priority:y.A.EVENT_PRIORITY_HIGH}),R.on(r.A.STREAM_INITIALIZING,xe,t),R.on(r.A.REPRESENTATION_SWITCH,Ge,t),R.on(r.A.BUFFER_LEVEL_STATE_CHANGED,ht,t),R.on(r.A.DYNAMIC_TO_STATIC,Ot,t),k&&(k=!1,P()))},setConfig:function(Te){Te&&(Te.streamController&&(o=Te.streamController),Te.serviceDescriptionController&&(l=Te.serviceDescriptionController),Te.dashMetrics&&(p=Te.dashMetrics),Te.adapter&&(C=Te.adapter),Te.videoModel&&(b=Te.videoModel),Te.timelineConverter&&(F=Te.timelineConverter),Te.settings&&(S=Te.settings))},getTimeToStreamEnd:de,getBufferLevel:function(){var Te=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,We=null;return o.getActiveStreamProcessors().forEach((function(wt){if(!Te||Te.length===0||Te.indexOf(wt.getType())===-1){var jt=wt.getBufferLevel();We=We===null?jt:Math.min(We,jt)}})),We},getPlaybackStalled:function(){return z},getTime:fe,getLowLatencyModeEnabled:function(){return te},getInitialCatchupModeActivated:function(){return N},getIsManifestUpdateInProgress:function(){return f},getPlaybackRate:$e,getPlayedRanges:function(){return w&&b?b.getPlayedRanges():null},getEnded:Ze,getIsDynamic:at,getStreamController:function(){return o},computeAndSetLiveDelay:function(Te,We){var wt,jt,hn,En=!isNaN(Te)&&isFinite(Te)?Te:NaN,dn=C.getSuggestedPresentationDelay(),jn=l.getServiceDescriptionSettings();return wt=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)?We&&!isNaN(We.minBufferTime)?4*We.minBufferTime:4*w.manifestInfo.minBufferTime:4*En:En*S.get().streaming.delay.liveDelayFragmentCount:S.get().streaming.delay.liveDelay,(hn=C.getAvailabilityStartTime())!==null&&(he=hn),jt=We&&We.dvrWindowSize>0?Math.min(wt,We.dvrWindowSize):wt,H=jt,B=jt,jt},getLiveDelay:function(){return H},getOriginalLiveDelay:function(){return B},getCurrentLiveLatency:function(){if(!j||isNaN(he))return NaN;var Te=fe();if(isNaN(Te)||Te===0)return 0;var We=new Date().getTime()+1e3*F.getClientTimeOffset();return Math.max(((We-he-1e3*Te)/1e3).toFixed(3),0)},play:P,isPaused:Ce,isStalled:Qe,pause:$,isSeeking:Me,getStreamEndTime:ue,seek:Y,seekToOriginalLive:function(){var Te=arguments.length>0&&arguments[0]!==void 0&&arguments[0],We=arguments.length>1&&arguments[1]!==void 0&&arguments[1],wt=arguments.length>2&&arguments[2]!==void 0&&arguments[2],jt=ge();jt!==0&&Y(jt-(H=B),Te,We,wt)},seekToCurrentLive:function(){var Te=arguments.length>0&&arguments[0]!==void 0&&arguments[0],We=arguments.length>1&&arguments[1]!==void 0&&arguments[1],wt=arguments.length>2&&arguments[2]!==void 0&&arguments[2],jt=ge();jt!==0&&Y(jt-H,Te,We,wt)},reset:V,updateCurrentTime:Nt,getAvailabilityStartTime:function(){return he}},e=(0,g.A)(L).getInstance().getLogger(t),V(),t}m.__dashjs_factory_name="PlaybackController";var d=h.A.getSingletonFactory(m),T=M(2686),q="loading",W="executed",x="failed";function ne(t){var e,o,l,p,C=(t=t||{}).eventBus,b=t.events,F=t.dashMetrics,U=t.fragmentLoader,H=t.debug,B=t.streamInfo,w=t.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,de){return isNaN(V.index)&&isNaN(de.index)&&V.quality===de.quality})(f,S)||(function(V,de){return V.action===T.A.ACTION_COMPLETE&&V.action===de.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 se(f){l=l.filter((function(N){var S=k(N);return isNaN(N.startTime)||f!==void 0&&N.startTime>=f-S}))}function ie(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 he(f,N,S){for(var L=f.length-1;L>=0;L--){var R=f[L],V=R.startTime,de=V+R.duration;if(S=isNaN(S)?k(R):S,!isNaN(V)&&!isNaN(de)&&N+S>=V&&N-S<de||isNaN(V)&&isNaN(N))return R}return null}function oe(f,N){F.addSchedulingInfo(f,N),F.addRequestsQueue(f.mediaType,p,l)}function te(f){f.sender===U&&(p.splice(p.indexOf(f.request),1),f.response&&!f.error&&l.push(f.request),oe(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 e={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 de;switch(V){case q:de=p;break;case W:de=l;break;default:de=[]}return de})(L);S=S.concat((function(V,de){return de.hasOwnProperty("time")?[he(V,de.time,de.threshold)]:V.filter((function(ue){for(var P in de)if(P!=="state"&&de.hasOwnProperty(P)&&ue[P]!=de[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:se,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++)ie(S,f.start(L)),S=f.end(L);N>0&&ie(S,N)}else se()},abortRequests:function(){o.debug("abort requests"),U.abort(),p=[]},executeRequest:function(f){f.action===T.A.ACTION_DOWNLOAD?(oe(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,te,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(e),z(),C.on(b.LOADING_COMPLETED,te,e),C.on(b.LOADING_DATA_PROGRESS,Z,e),C.on(b.LOADING_ABANDONED,K,e),e}ne.__dashjs_factory_name="FragmentModel";var O=h.A.getClassFactory(ne);O.FRAGMENT_MODEL_LOADING=q,O.FRAGMENT_MODEL_EXECUTED=W,O.FRAGMENT_MODEL_CANCELED="canceled",O.FRAGMENT_MODEL_FAILED=x,h.A.updateClassFactory(ne.__dashjs_factory_name,O);var J=O,pe=M(8324);function G(t){return G=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},G(t)}function X(t,e,o){return e=be(e),(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)})(t,re()?Reflect.construct(e,[],be(t).constructor):e.apply(t,o))}function re(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(re=function(){return!!t})()}function be(t){return be=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},be(t)}function Ue(t,e){return Ue=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,l){return o.__proto__=l,o},Ue(t,e)}var me=new((function(t){function e(){var l;return(function(p,C){if(!(p instanceof C))throw new TypeError("Cannot call a class as a function")})(this,e),(l=X(this,e)).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&&Ue(l,p)})(e,t),o=e,Object.defineProperty(o,"prototype",{writable:!1}),o;var o})(M(1840).A)),le=M(1657),je=M(2756);function Se(t){var e,o,l,p,C,b,F=this.context,U=(0,le.A)(F).getInstance(),H=t.textController,B=t.eventBus,w=[],j=[],k=!1,se=t.mediaSource,ie=null;function he(R){return new Promise((function(V){L((function(){p.changeType&&p.changeType(R),V()}))}))}function oe(R){return p=H.getTextSourceBuffer(R),Promise.resolve()}function te(){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 de=se.duration,ue=0;R&&!isNaN(R.start)&&!isNaN(R.duration)&&isFinite(R.duration)&&(de=R.start+R.duration),R&&!isNaN(R.start)&&(ue=R.start),p.appendWindowEnd===de&&p.appendWindowStart===ue||(p.appendWindowStart=0,p.appendWindowEnd=de+.01,p.appendWindowStart=Math.max(ue-.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!==je.G.INIT_SEGMENT_TYPE&&delete R.data.bytes,R.promise.resolve({chunk:R.data})};try{ie=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(de){l.fatal('SourceBuffer append failed "'+de+'"'),j.length>0?z():k=!1,delete R.data.bytes,R.promise.reject({chunk:R.data,error:new pe.A(de.code,de.message)})}}}function f(){w.length>0&&(p.updating||(w.shift()(),f()))}function N(){p.updating||f()}function S(R){var V,de,ue=R.target||{};V=i.A.SOURCE_BUFFER_ERROR,de={error:ue,lastRequestAppended:ie},B.trigger(V,de,{streamId:C.streamInfo.id,mediaType:o})}function L(R){w.push(R),p.updating||f()}return e={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,de=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return new Promise((function(ue,P){R?(j.push({data:R,promise:{resolve:ue,reject:P},request:de}),L(z.bind(V))):P({chunk:R,error:new pe.A(me.APPEND_ERROR_CODE,me.APPEND_ERROR_MESSAGE)})}))},remove:function(R){return new Promise((function(V,de){var ue=R.start,P=R.end;ue>=0&&P>ue?L((function(){try{p.remove(ue,P),L((function(){V({from:ue,to:P,unintended:!1}),R.resolve&&R.resolve()}))}catch($){de({from:ue,to:P,unintended:!1,error:new pe.A(me.REMOVE_ERROR_CODE,me.REMOVE_ERROR_MESSAGE)}),R.reject&&R.reject($)}})):V()}))},abort:function(){return new Promise((function(R){try{j=[],se.readyState==="open"?L((function(){try{p&&p.abort(),R()}catch{R()}})):(p&&p.setTextTrack&&se.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"),se.removeSourceBuffer(p))}catch{}p=null}ie=null},updateTimestampOffset:K,initializeForStreamSwitch:function(R,V,de){o=(C=R).type;var ue=C.codec;(function($){p=$.getBuffer()})(de),te();var P=[];return P.push(new Promise((function($){L((function(){var Y=p.appendWindowStart,ge=p.appendWindowEnd;p&&(p.abort(),p.appendWindowStart=Y,p.appendWindowEnd=ge),$()}))}))),P.push(Z(C.streamInfo)),U.get().streaming.buffer.useChangeTypeForTrackSwitch&&P.push(he(ue)),V&&V.MSETimeOffset!==void 0&&P.push(K(V.MSETimeOffset)),Promise.all(P)},initializeForFirstUse:function(R,V,de){o=(C=V).type;var ue=C.codec;try{if(ue.match(/application\/mp4;\s*codecs="(stpp|wvtt).*"/i))return oe(R);p=se.addSourceBuffer(ue),te();var P=[];return P.push(Z(C.streamInfo)),de&&de.MSETimeOffset!==void 0&&P.push(K(de.MSETimeOffset)),Promise.all(P)}catch($){return C.type==u.A.TEXT&&!C.isFragmented||ue.indexOf('codecs="stpp')!==-1||ue.indexOf('codecs="vtt')!==-1||ue.indexOf("text/vtt")!==-1?oe(R):Promise.reject($)}},updateAppendWindow:Z,changeType:he},l=(0,g.A)(F).getInstance().getLogger(e),e}Se.__dashjs_factory_name="SourceBufferSink";var Ne=h.A.getClassFactory(Se);function He(t){var e,o,l,p=this.context,C=[],b=t;function F(U,H){return C=C.filter((function(B){return!((isNaN(H)||B.start<H)&&(isNaN(U)||B.end>U))})),Promise.resolve()}return e={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(e),e}He.__dashjs_factory_name="PreBufferSink";var it=h.A.getClassFactory(He);function Ie(){var t={};return{save:function(e){var o=e.streamId,l=e.representationId;t[o]=t[o]||{},t[o][l]=e},extract:function(e,o){return t&&t[e]&&t[e][o]?t[e][o]:null},reset:function(){t={}}}}Ie.__dashjs_factory_name="InitCache";var Oe=h.A.getSingletonFactory(Ie),ft=.01,At="BufferController";function Rt(t){t=t||{};var e,o,l,p,C,b,F,U,H,B,w,j,k,se,ie,he,oe,te,Z,K,z,f=this.context,N=(0,y.A)(f).getInstance(),S=t.errHandler,L=t.fragmentModel,R=t.representationController,V=t.adapter,de=t.textController,ue=t.abrController,P=t.playbackController,$=t.streamInfo,Y=t.type,ge=t.settings;function ve(xe){var Ge=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return new Promise((function(lt,ye){b=xe,H&&Ge&&typeof H.discharge=="function"?(B=H,Ce(Ge).then((function(){lt()})).catch((function(Te){ye(Te)}))):lt()}))}function fe(xe){return V.convertRepresentationToRepresentationInfo(R.getRepresentationForQuality(xe))}function Ce(xe){var Ge=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return new Promise((function(lt,ye){te&&xe?b?(w=!1,(function(Te,We){return new Promise((function(wt,jt){var hn=ue.getQualityFor(Y,$.id);H=Ne(f).create({mediaSource:b,textController:de,eventBus:N}),(function(En,dn,jn){var Pn=fe(jn);return dn&&dn[Y]&&(Y===u.A.VIDEO||Y===u.A.AUDIO)?H.initializeForStreamSwitch(En,Pn,dn[Y]):H.initializeForFirstUse($,En,Pn)})(Te,We,hn).then((function(){return gt(fe(hn))})).then((function(){wt(H)})).catch((function(En){o.fatal("Caught error on create SourceBuffer: "+En),S.error(new pe.A(me.MEDIASOURCE_TYPE_UNSUPPORTED_CODE,me.MEDIASOURCE_TYPE_UNSUPPORTED_MESSAGE+Y)),jt(En)}))}))})(xe,Ge).then((function(Te){lt(Te)})).catch((function(Te){ye(Te)}))):(w=!0,(function(){var Te=this;return new Promise((function(We,wt){var jt=ue.getQualityFor(Y,$.id);H=it(f).create(at.bind(Te)),gt(fe(jt)).then((function(){We(H)})).catch((function(){wt()}))}))})().then((function(Te){lt(Te)})).catch((function(Te){ye(Te)}))):lt(null)}))}function Me(xe){ge.get().streaming.cacheInitSegments&&(o.info("Init fragment finished loading saving to",Y+"'s init cache"),te.save(xe.chunk)),o.debug("Append Init fragment",Y," with representationId:",xe.chunk.representationId," and quality:",xe.chunk.quality,", data size:",xe.chunk.bytes.byteLength),$e(xe.chunk)}function Qe(xe){$e(xe.chunk,xe.request)}function $e(xe){var Ge=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;H&&(H.append(xe,Ge).then((function(lt){at(lt)})).catch((function(lt){at(lt)})),xe.mediaInfo.type===u.A.VIDEO&&Fe(i.A.VIDEO_CHUNK_RECEIVED,{chunk:xe}))}function Ze(xe){if(xe&&xe.length>0)for(var Ge=0,lt=xe.length;Ge<lt;Ge++)o.debug("Buffered range: "+xe.start(Ge)+" - "+xe.end(Ge)+", currentTime = ",P.getTime())}function at(xe){if(xe.error)return xe.error.code===22&&(function(){if(oe=!0,C=.8*Zt(),o.warn("Quota exceeded, Critical Buffer: "+C),C>0){var ye=Math.max(.2*C,1),Te=C-ye,We=Math.min(ge.get().streaming.buffer.bufferTimeAtTopQuality,.9*Te),wt=Math.min(ge.get().streaming.buffer.bufferTimeAtTopQualityLongForm,.9*Te),jt={streaming:{buffer:{bufferToKeep:parseFloat(ye.toFixed(5)),bufferTimeAtTopQuality:parseFloat(We.toFixed(5)),bufferTimeAtTopQualityLongForm:parseFloat(wt.toFixed(5))}}};ge.update(jt)}})(),void(xe.error.code!==22&&Ot()||(o.warn("Clearing playback buffer to overcome quota exceed situation"),Fe(i.A.QUOTA_EXCEEDED,{criticalBufferLevel:C,quotaExceededTime:xe.chunk.start}),ke(ln())));if(H&&(ht(),oe=!1,(se=xe.chunk)&&se.endFragment)){se&&!isNaN(se.index)&&(F=Math.max(se.index,F),dt());var Ge=H.getAllBufferRanges();se.segmentType===je.G.MEDIA_SEGMENT_TYPE&&(Ze(Ge),Pe(),(function(){if(!isNaN(z)&&!w)if(Y===u.A.AUDIO||Y===u.A.VIDEO){var ye=P.getTime(),Te=yt(ye,0),We=yt(z,0);if(Te&&We&&Te.start===We.start)z=NaN;else{var wt=R.getCurrentRepresentation().segmentDuration,jt=yt(z,wt);jt&&(ge.get().streaming.buffer.enableSeekDecorrelationFix&&Math.abs(ye-z)>wt?z<=jt.end&&P.seek(Math.max(z,jt.start),!1,!0):ye<jt.start&&P.seek(jt.start,!1,!0))}}else z=NaN})());var lt=!1;j&&(j.indexOf(se)>0&&(lt=!0),j=null),se&&!lt&&Fe(i.A.BYTES_APPENDED_END_FRAGMENT,{quality:se.quality,startTime:se.start,index:se.index,bufferedRanges:Ge,segmentType:se.segmentType,mediaType:Y})}}function Nt(){return new Promise((function(xe,Ge){var lt=Ee();if(!lt||lt.length===0)return Pe(),void xe();ke(lt).then((function(){xe()})).catch((function(ye){Ge(ye)}))}))}function Ee(xe){var Ge=[],lt=H.getAllBufferRanges();if(!lt||lt.length===0)return Ge;if(!xe&&xe!==0||isNaN(xe))Ge.push({start:lt.start(0),end:lt.end(lt.length-1)+.5});else{var ye=(function(We,wt){var jt=ge.get().streaming.buffer.bufferToKeep,hn=wt.start(0);if(We-hn>jt){var En=Math.max(0,We-jt),dn=L.getRequests({state:J.FRAGMENT_MODEL_EXECUTED,time:We,threshold:ft})[0];if(dn&&(En=Math.min(dn.startTime,En)),En>0)return{start:hn,end:En}}return null})(xe,lt),Te=(function(We,wt){var jt=wt.end(wt.length-1)+.5,hn=pt(We),En=$.manifestInfo.duration>=ge.get().streaming.buffer.longFormContentDurationThreshold?ge.get().streaming.buffer.bufferTimeAtTopQualityLongForm:ge.get().streaming.buffer.bufferTimeAtTopQuality,dn=isNaN(hn)?We:Math.min(hn,We+En);if(dn>=wt.end(wt.length-1))return null;var jn=L.getRequests({state:J.FRAGMENT_MODEL_EXECUTED,time:We,threshold:ft})[0];if(jn&&(dn=Math.max(jn.startTime+jn.duration,dn)),ge.get().streaming.buffer.avoidCurrentTimeRangePruning){for(var Pn=0;Pn<wt.length;Pn++)if(wt.start(Pn)<=We&&We<=wt.end(Pn)&&wt.start(Pn)<=dn&&dn<=wt.end(Pn)){var Zn=dn;dn=Pn+1<wt.length?wt.start(Pn+1):wt.end(Pn)+1,o.debug("Buffered range ["+wt.start(Pn)+", "+wt.end(Pn)+"] overlaps with targetTime "+We+" and range to be pruned ["+Zn+", "+jt+"], using ["+dn+", "+jt+"] instead"+(dn<jt?"":" (no actual pruning)"));break}}return dn<wt.end(wt.length-1)?{start:dn,end:jt}:null})(xe,lt);ye&&Ge.push(ye),Te&&Ge.push(Te)}return Ge}function Pe(){(!K||Y===u.A.TEXT&&de.isTextEnabled())&&ht()}function ct(){qt()}function Ke(){qt(),z=NaN}function yt(xe,Ge){if(!H)return null;var lt,ye,Te=H.getAllBufferRanges(),We=0,wt=0,jt=null,hn=null,En=0,dn=isNaN(Ge)?.15:Ge;if(Te!=null){for(ye=0,lt=Te.length;ye<lt;ye++)if(We=Te.start(ye),wt=Te.end(ye),jt===null)En=Math.abs(We-xe),(xe>=We&&xe<wt||En<=dn)&&(jt=We,hn=wt);else{if(!((En=We-hn)<=dn))break;hn=wt}if(jt!==null)return{start:jt,end:hn}}return null}function ht(){if(P){var xe=P.getTime()||0;w&&(xe=isNaN(z)?0:z);var Ge=ge.get().streaming.gaps.jumpGaps&&!isNaN(ge.get().streaming.gaps.smallGapLimit)?ge.get().streaming.gaps.smallGapLimit:NaN;p=Math.max((function(lt,ye){var Te;return ge.get().streaming.gaps.jumpGaps&&(ye=ge.get().streaming.gaps.smallGapLimit),(Te=yt(lt,ye))===null?0:Te.end-lt})(xe,Ge),0),Fe(i.A.BUFFER_LEVEL_UPDATED,{mediaType:Y,bufferLevel:p}),qt()}}function dt(){var xe=F>=U-1,Ge=P.getTimeToStreamEnd($)-p<1e-5;!xe&&!Ge||l||(Kt(!0),o.debug("checkIfBufferingCompleted trigger BUFFERING_COMPLETED for stream id ".concat($.id," and type ").concat(Y)))}function qt(){Y!==u.A.AUDIO&&Y!==u.A.VIDEO||((!P.getLowLatencyModeEnabled()&&p<ge.get().streaming.buffer.stallThreshold||p===0)&&!l?Yt(_.A.BUFFER_EMPTY):(l||p>=ge.get().streaming.buffer.stallThreshold||P.getLowLatencyModeEnabled()&&p>0)&&Yt(_.A.BUFFER_LOADED))}function Yt(xe){k===xe||xe===_.A.BUFFER_EMPTY&&P.getTime()===0||Y===u.A.TEXT&&!de.isTextEnabled()||(k=xe,Fe(i.A.BUFFER_LEVEL_STATE_CHANGED,{state:xe}),Fe(xe===_.A.BUFFER_LOADED?i.A.BUFFER_LOADED:i.A.BUFFER_EMPTY),o.debug(xe===_.A.BUFFER_LOADED?"Got enough buffer to start":"Waiting for more buffer before starting playback"))}function sn(){H&&Y!==u.A.TEXT&&(l||ke(ln()))}function ln(){var xe=[],Ge=H.getAllBufferRanges();if(!Ge||Ge.length===0)return xe;var lt=P.getTime(),ye=Math.max(0,lt-ge.get().streaming.buffer.bufferToKeep),Te=L.getRequests({state:J.FRAGMENT_MODEL_EXECUTED,time:lt,threshold:ft})[0];if(Te)ye=Math.min(Te.startTime,ye);else if(lt===0&&P.getIsDynamic())return[];if(Ge.start(0)<=ye){for(var We={start:0,end:ye},wt=0;wt<Ge.length&&Ge.end(wt)<=ye;wt++)We.end=Ge.end(wt);We.start<We.end&&xe.push(We)}return xe}function ke(xe){return new Promise((function(Ge,lt){if(xe&&H&&xe.length!==0){var ye=[];xe.forEach((function(Te){ye.push((function(We){return new Promise((function(wt,jt){We.resolve=wt,We.reject=jt,Z.push(We)}))})(Te))})),he||ut(),Promise.all(ye).then((function(){Ge()})).catch((function(Te){lt(Te)}))}else Ge()}))}function ut(){try{if(Z.length===0||!H)return o.debug("Nothing to prune, halt pruning"),Z=[],void(he=!1);var xe=H.getBuffer();if(!xe||!xe.buffered||xe.buffered.length===0)return o.debug("SourceBuffer is empty (or does not exist), halt pruning"),Z=[],void(he=!1);var Ge=Z.shift();o.debug("".concat(Y,": Removing buffer from: ").concat(Ge.start," to ").concat(Ge.end)),he=!0,P.getTime()<Ge.end&&Kt(!1),H.remove(Ge).then((function(lt){tt(lt)})).catch((function(lt){tt(lt)}))}catch{he=!1}}function tt(xe){o.debug("onRemoved buffer from:",xe.from,"to",xe.to),H&&(Ze(H.getAllBufferRanges()),Z.length===0&&(he=!1,ht()),xe.unintended&&(o.warn("Detected unintended removal from:",xe.from,"to",xe.to,"setting streamprocessor time to",xe.from),Fe(i.A.SEEK_TARGET,{time:xe.from})),he?ut():(K?K=!1:ht(),Fe(i.A.BUFFER_CLEARED,{from:xe.from,to:xe.to,unintended:xe.unintended,hasEnoughSpaceToAppend:Ot(),quotaExceeded:oe})))}function gt(xe){return new Promise((function(Ge){xe&&xe.MSETimeOffset!==void 0&&H&&H.updateTimestampOffset?H.updateTimestampOffset(xe.MSETimeOffset).then((function(){Ge()})).catch((function(){Ge()})):Ge()}))}function Dt(){return H&&!l?H.updateAppendWindow($):Promise.resolve()}function Vt(){++ie*(ge.get().streaming.wallclockTimeUpdateInterval/1e3)>=ge.get().streaming.buffer.bufferPruningInterval&&(ie=0,sn())}function Gt(){qt()}function Kt(xe){(l=xe)?Fe(i.A.BUFFERING_COMPLETED):U=Number.POSITIVE_INFINITY}function Zt(){try{var xe,Ge,lt=H.getAllBufferRanges(),ye=0;if(!lt)return ye;for(Ge=0,xe=lt.length;Ge<xe;Ge++)ye+=lt.end(Ge)-lt.start(Ge);return ye}catch{return 0}}function pt(xe){try{var Ge=xe,lt=H.getAllBufferRanges();if(!lt||lt.length===0)return NaN;for(var ye=0;Ge===xe&&ye<lt.length;){var Te=lt.start(ye),We=lt.end(ye);Ge>=Te&&Ge<=We&&(Ge=We),ye+=1}return Ge===xe?NaN:Ge}catch{}}function Ot(){var xe=Zt();return isNaN(xe)||xe<C}function Fe(xe,Ge){var lt=Ge||{};N.trigger(xe,lt,{streamId:$.id,mediaType:Y})}function st(xe,Ge){if(C=Number.POSITIVE_INFINITY,k=void 0,U=Number.POSITIVE_INFINITY,F=0,se=null,l=!1,he=!1,oe=!1,p=0,ie=0,Z=[],z=NaN,w=!1,H){var lt=H;H=null,xe||Ge||lt.abort().then((function(){lt.reset(Ge),lt=null}))}K=!1}return e={initialize:function(xe){ve(xe),N.on(i.A.INIT_FRAGMENT_LOADED,Me,e),N.on(i.A.MEDIA_FRAGMENT_LOADED,Qe,e),N.on(i.A.WALLCLOCK_TIME_UPDATED,Vt,e),N.on(r.A.PLAYBACK_PLAYING,Ke,e),N.on(r.A.PLAYBACK_PROGRESS,Pe,e),N.on(r.A.PLAYBACK_TIME_UPDATED,Pe,e),N.on(r.A.PLAYBACK_RATE_CHANGED,Gt,e),N.on(r.A.PLAYBACK_STALLED,ct,e)},getStreamId:function(){return $.id},getType:function(){return Y},getBufferControllerType:function(){return At},createBufferSink:Ce,dischargePreBuffer:function(){if(H&&B&&typeof B.discharge=="function"){var xe=B.getAllBufferRanges();if(xe.length>0){for(var Ge="Beginning "+Y+"PreBuffer discharge, adding buffer for:",lt=0;lt<xe.length;lt++)Ge+=" start: "+xe.start(lt)+", end: "+xe.end(lt)+";";o.debug(Ge)}else o.debug("PreBuffer discharge requested, but there were no media segments in the PreBuffer.");j=[];for(var ye=B.discharge(),Te=null,We=0;We<ye.length;We++){var wt=ye[We];if(wt.segmentType!==je.G.INIT_SEGMENT_TYPE){var jt=te.extract(wt.streamId,wt.representationId);jt&&Te!==jt&&(j.push(jt),H.append(jt),Te=jt)}j.push(wt),H.append(wt)}B.reset(),B=null}},getBuffer:function(){return H},getBufferLevel:function(){return p},getRangeAt:yt,hasBufferAtTime:function(xe){try{var Ge=H.getAllBufferRanges();if(!Ge||Ge.length===0)return!1;for(var lt=0;lt<Ge.length;){var ye=Ge.start(lt),Te=Ge.end(lt);if(xe>=ye&&xe<=Te)return!0;lt+=1}return!1}catch(We){return o.error(We),!1}},pruneBuffer:sn,setMediaSource:ve,getMediaSource:function(){return b},appendInitSegmentFromCache:function(xe){var Ge=te.extract($.id,xe);return!!Ge&&(o.info("Append Init fragment",Y," with representationId:",Ge.representationId," and quality:",Ge.quality,", data size:",Ge.bytes.byteLength),$e(Ge),!0)},getIsBufferingCompleted:function(){return l},setIsBufferingCompleted:Kt,getIsPruningInProgress:function(){return he},reset:function(xe,Ge){N.off(i.A.INIT_FRAGMENT_LOADED,Me,this),N.off(i.A.MEDIA_FRAGMENT_LOADED,Qe,this),N.off(i.A.WALLCLOCK_TIME_UPDATED,Vt,this),N.off(r.A.PLAYBACK_PLAYING,Ke,this),N.off(r.A.PLAYBACK_PROGRESS,Pe,this),N.off(r.A.PLAYBACK_TIME_UPDATED,Pe,this),N.off(r.A.PLAYBACK_RATE_CHANGED,Gt,this),N.off(r.A.PLAYBACK_STALLED,ct,this),st(xe,Ge)},prepareForPlaybackSeek:function(){return l&&Kt(!1),H.abort()},prepareForReplacementTrackSwitch:function(xe){return new Promise((function(Ge,lt){H.abort().then((function(){return Dt()})).then((function(){return ge.get().streaming.buffer.useChangeTypeForTrackSwitch?H.changeType(xe):Promise.resolve()})).then((function(){return Nt()})).then((function(){Kt(!1),Ge()})).catch((function(ye){lt(ye)}))}))},prepareForNonReplacementTrackSwitch:function(xe){return new Promise((function(Ge,lt){Dt().then((function(){return ge.get().streaming.buffer.useChangeTypeForTrackSwitch?H.changeType(xe):Promise.resolve()})).then((function(){Ge()})).catch((function(ye){lt(ye)}))}))},prepareForForceReplacementQualitySwitch:function(xe){return new Promise((function(Ge,lt){H.abort().then((function(){return Dt()})).then((function(){return Nt()})).then((function(){return gt(xe)})).then((function(){Kt(!1),Ge()})).catch((function(ye){lt(ye)}))}))},updateAppendWindow:Dt,getAllRangesWithSafetyFactor:Ee,getContinuousBufferTimeForTargetTime:pt,clearBuffers:ke,pruneAllSafely:Nt,updateBufferTimestampOffset:gt,setSeekTarget:function(xe){z=xe},segmentRequestingCompleted:function(xe){isNaN(xe)||(U=xe,dt())}},o=(0,g.A)(f).getInstance().getLogger(e),te=Oe(f).getInstance(),st(),e}Rt.__dashjs_factory_name=At;var Pt=h.A.getClassFactory(Rt),ee="NotFragmentedTextBufferController";function ae(t){t=t||{};var e,o,l,p,C,b,F=this.context,U=(0,y.A)(F).getInstance(),H=t.textController,B=t.errHandler,w=t.streamInfo,j=t.type;function k(he){p=he}function se(he){var oe,te;o!==he&&(o=he)&&(oe=i.A.BUFFERING_COMPLETED,te={},U.trigger(oe,te,{streamId:w.id,mediaType:j}))}function ie(he){he.chunk.bytes&&!o&&(b.save(he.chunk),C.append(he.chunk),se(!0))}return e={initialize:function(he){k(he)},getStreamId:function(){return w.id},getType:function(){return j},getBufferControllerType:function(){return ee},createBufferSink:function(he){return new Promise((function(oe,te){try{(C=Ne(F).create({mediaSource:p,textController:H,eventBus:U})).initializeForFirstUse(w,he),l||(C.getBuffer()&&typeof C.getBuffer().initialize=="function"&&C.getBuffer().initialize(),l=!0),oe(C)}catch(Z){B.error(new pe.A(me.MEDIASOURCE_TYPE_UNSUPPORTED_CODE,me.MEDIASOURCE_TYPE_UNSUPPORTED_MESSAGE+j)),te(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(he){return b.extract(w.id,he)!==null},getIsBufferingCompleted:function(){return o},setIsBufferingCompleted:se,getIsPruningInProgress:function(){return!1},reset:function(he){U.off(i.A.INIT_FRAGMENT_LOADED,ie,e),!he&&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=Oe(F).getInstance(),U.on(i.A.INIT_FRAGMENT_LOADED,ie,e),e}ae.__dashjs_factory_name=ee;var qe=h.A.getClassFactory(ae);function v(t){t=t||{};var e,o,l,p,C,b,F,U,H,B,w,j,k,se=this.context,ie=(0,y.A)(se).getInstance(),he=t.dashMetrics,oe=t.mediaPlayerModel,te=t.fragmentModel,Z=t.abrController,K=t.playbackController,z=t.textController,f=t.type,N=t.bufferController,S=t.representationController,L=t.settings;function R(){j=!0}function V(){j=!1}function de(Qe){if(!N.getIsBufferingCompleted()){ue();var $e=isNaN(Qe)?0:Qe;C=setTimeout(P,$e)}}function ue(){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 ue();if((function(){try{return!!j&&S.getCurrentRepresentationInfo()&&(isNaN(H)||B||(Ze=o.id,at=Z.getMaxAllowedIndexFor(f,Ze),!(!isNaN(U)&&U==at||(l.info("Top quality "+f+" index has changed from "+U+" to "+at),U=at,0)))||(function(){var Nt=S.getCurrentRepresentationInfo();return!f||!Nt||he.getCurrentBufferLevel(f)<$()})())}catch{return!1}var Ze,at})()){var Qe=!1;k&&(Qe=Z.checkPlaybackQuality(f,o.id)),Qe||($e=S.getCurrentRepresentationInfo(),w||$e.quality!==H||B?(B?(l.debug("Switch track for "+f+", representation id = "+$e.id),B=!1):l.debug("Quality has changed, get init request for representationid = "+$e.id),ie.trigger(i.A.INIT_FRAGMENT_NEEDED,{representationId:$e.id,sender:e},{streamId:o.id,mediaType:f}),k=!1,w=!1):(l.debug("Media segment needed for ".concat(f," and stream id ").concat(o.id)),ie.trigger(i.A.MEDIA_FRAGMENT_NEEDED,{},{streamId:o.id,mediaType:f}),k=!0))}else de(K.getLowLatencyModeEnabled()?L.get().streaming.scheduling.lowLatencyTimeout:L.get().streaming.scheduling.defaultTimeout)}catch{de(K.getLowLatencyModeEnabled()?L.get().streaming.scheduling.lowLatencyTimeout:L.get().streaming.scheduling.defaultTimeout)}var $e}function $(){var Qe=NaN,$e=S.getCurrentRepresentationInfo();return f&&$e&&(Qe=f===u.A.TEXT?(function(){try{if(z.isTextEnabled()){var Ze=S.getCurrentRepresentationInfo();if(isNaN(Ze.fragmentDuration)){var at=he.getCurrentSchedulingInfo(_.A.SCHEDULING_INFO);return at?at.duration:0}return Ze.fragmentDuration}return 0}catch{return 0}})():f===u.A.AUDIO&&b?(function(){try{var Ze=he.getCurrentBufferLevel(u.A.VIDEO),at=S.getCurrentRepresentationInfo();return isNaN(at.fragmentDuration)?Ze+1:Math.max(Ze+1,at.fragmentDuration)}catch{return 0}})():(function(){try{var Ze=S.getCurrentRepresentationInfo().mediaInfo.streamInfo;return Z.isPlayingAtTopQuality(Ze)?Ze.manifestInfo.duration>=L.get().streaming.buffer.longFormContentDurationThreshold?L.get().streaming.buffer.bufferTimeAtTopQualityLongForm:L.get().streaming.buffer.bufferTimeAtTopQuality:oe.getStableBufferTime()}catch{return oe.getStableBufferTime()}})()),Qe}function Y(){ge(!0)}function ge(Qe){if(K&&te){var $e=te.getRequests({state:J.FRAGMENT_MODEL_EXECUTED,time:K.getTime(),threshold:0})[0];$e&&K.getTime()>=$e.startTime&&((!F.mediaInfo||$e.mediaInfo.type===F.mediaInfo.type&&$e.mediaInfo.index!==F.mediaInfo.index)&&Qe&&ie.trigger(i.A.TRACK_CHANGE_RENDERED,{mediaType:f,oldMediaInfo:F.mediaInfo,newMediaInfo:$e.mediaInfo,streamId:o.id}),$e.quality===F.quality&&$e.adaptationIndex===F.adaptationIndex||!Qe||(l.debug("Quality change rendered for streamId ".concat(o.id," and type ").concat(f)),ie.trigger(i.A.QUALITY_CHANGE_RENDERED,{mediaType:f,oldQuality:F.quality,newQuality:$e.quality,streamId:o.id})),F={mediaInfo:$e.mediaInfo,quality:$e.quality,adaptationIndex:$e.adaptationIndex})}}function ve(){te.abortRequests(),ue()}function fe(){L.get().streaming.scheduling.scheduleWhilePaused||de()}function Ce(Qe){he.updatePlayListTraceMetrics({playbackspeed:Qe.playbackRate.toString()})}function Me(){k=!0,p=0,H=NaN,F={mediaInfo:void 0,quality:NaN,adaptationIndex:NaN},U=NaN,B=!1,w=!1,j=!0}return e={initialize:function(Qe){b=Qe,ie.on(i.A.URL_RESOLUTION_FAILED,ve,e),ie.on(r.A.PLAYBACK_STARTED,fe,e),ie.on(r.A.PLAYBACK_RATE_CHANGED,Ce,e),ie.on(r.A.PLAYBACK_TIME_UPDATED,Y,e),ie.on(r.A.MANAGED_MEDIA_SOURCE_START_STREAMING,R,e),ie.on(r.A.MANAGED_MEDIA_SOURCE_END_STREAMING,V,e)},getType:function(){return f},getStreamId:function(){return o.id},setTimeToLoadDelay:function(Qe){p=Qe},getTimeToLoadDelay:function(){return p},setSwitchTrack:function(Qe){B=Qe},getSwitchTrack:function(){return B},startScheduleTimer:de,clearScheduleTimer:ue,reset:function(){ie.off(i.A.URL_RESOLUTION_FAILED,ve,e),ie.off(r.A.PLAYBACK_STARTED,fe,e),ie.off(r.A.PLAYBACK_RATE_CHANGED,Ce,e),ie.off(r.A.PLAYBACK_TIME_UPDATED,Y,e),ie.off(r.A.MANAGED_MEDIA_SOURCE_START_STREAMING,R,e),ie.off(r.A.MANAGED_MEDIA_SOURCE_END_STREAMING,V,e),ue(),ge(!1),Me(),o=null},getBufferTarget:$,getPlaybackController:function(){return K},setCheckPlaybackQuality:function(Qe){k=Qe},setInitSegmentRequired:function(Qe){w=Qe},setLastInitializedQuality:function(Qe){H=Qe}},l=(0,g.A)(se).getInstance().getLogger(e),Me(),o=t.streamInfo,e}v.__dashjs_factory_name="ScheduleController";var A=h.A.getClassFactory(v),c=M(284);function E(t){var e,o,l,p,C,b,F=(t=t||{}).eventBus,U=t.events,H=t.abrController,B=t.dashMetrics,w=t.playbackController,j=t.timelineConverter,k=t.type,se=t.streamInfo,ie=t.dashConstants,he=t.segmentsController,oe=t.isDynamic,te=t.adapter;function Z(){return k}function K(){return l}function z(){return b}function f(){o=null,l=!0,p=[],C=null}function N(ue){return new Promise((function(P,$){var Y=ue.hasInitialization(),ge=ue.hasSegments(),ve=[];ve.push(he.updateInitData(ue,Y)),ve.push(he.updateSegmentData(ue,ge)),Promise.all(ve).then((function(fe){var Ce;fe[0]&&!fe[0].error&&(ue=(function(Me,Qe){return Qe&&!Qe.error&&Qe.representation?Qe.representation:Me})(ue,fe[0])),fe[1]&&!fe[1].error&&(ue=(function(Me,Qe){if(Qe&&!Qe.error){var $e,Ze,at,Nt,Ee=Qe.segments,Pe=[],ct=0;for($e=0,Ze=Ee?Ee.length:0;$e<Ze;$e++)at=Ee[$e],(Nt=(0,c.W$)(j,oe,Me,at.startTime,at.duration,at.timescale,at.media,at.mediaRange,ct))&&(Pe.push(Nt),Nt=null,ct++);return Pe.length>0&&(Me.segments=Pe),Me}})(ue,fe[1])),(Ce=ue).mediaFinishedInformation=he.getMediaFinishedInformation(Ce),(function(Me){if(K()){var Qe,$e,Ze=B.getCurrentManifestUpdate(),at=!1;if(Ze){for(var Nt=0;Nt<Ze.representationInfo.length;Nt++)if((Qe=Ze.representationInfo[Nt]).index===Me.index&&Qe.mediaType===Z()){at=!0;break}at||B.addManifestUpdateRepresentationInfo(Me,Z())}if((function(){for(var Pe=0,ct=p.length;Pe<ct;Pe++){var Ke=p[Pe].segmentInfoType;if(!p[Pe].hasInitialization()||(Ke===ie.SEGMENT_BASE||Ke===ie.BASE_URL)&&!p[Pe].segments)return!1}return!0})()){H.setPlaybackQuality(k,se,($e=b,p.indexOf($e)));var Ee=B.getCurrentDVRInfo(k);Ee&&B.updateManifestUpdateInfo({latency:Ee.range.end-w.getTime()}),B.getCurrentRepresentationSwitch(z().adaptation.type)||S(),R()}}})(ue),P()})).catch((function(fe){$(fe)}))}))}function S(){(function(){if(!(H&&B&&w&&j))throw new Error(u.A.MISSING_CONFIG_ERROR)})();var ue=new Date,P=z(),$=1e3*w.getTime();P&&B.addRepresentationSwitch(P.adaptation.type,ue,$,P.id),F.trigger(r.A.REPRESENTATION_SWITCH,{mediaType:k,streamId:se.id,currentRepresentation:P,numberOfRepresentations:p.length},{streamId:se.id,mediaType:k})}function L(ue){return ue==null||ue>=p.length?null:p[ue]}function R(ue){l=!1,F.trigger(U.DATA_UPDATE_COMPLETED,{data:o,currentRepresentation:b,error:ue},{streamId:se.id,mediaType:k})}function V(ue){b=ue,C=te.convertRepresentationToRepresentationInfo(b)}function de(ue){if(ue.newDuration){var P=z();P&&P.adaptation.period&&(P.adaptation.period.duration=ue.newDuration)}}return e={getStreamId:function(){return se.id},getType:Z,getData:function(){return o},isUpdating:K,updateData:function(ue,P,$,Y,ge){return new Promise((function(ve,fe){if(l=!0,p=P,o=ue,V(L(ge)),$!==u.A.VIDEO&&$!==u.A.AUDIO&&($!==u.A.TEXT||!Y))return R(),void ve();for(var Ce=[],Me=0,Qe=p.length;Me<Qe;Me++){var $e=p[Me];Ce.push(N($e))}Promise.all(Ce).then((function(){V(L(ge)),ve()})).catch((function(Ze){fe(Ze)}))}))},getCurrentRepresentation:z,getCurrentRepresentationInfo:function(){return C},getRepresentationForQuality:L,prepareQualityChange:function(ue){V(L(ue)),S()},reset:function(){F.off(r.A.MANIFEST_VALIDITY_CHANGED,de,e),f()}},f(),F.on(r.A.MANIFEST_VALIDITY_CHANGED,de,e),e}E.__dashjs_factory_name="RepresentationController";var Q=h.A.getClassFactory(E),D=M(7652),Be=M(2945),De=M(9913),Ae=M(2187);function Re(t,e,o){return Object.defineProperty(t,"prototype",{writable:!1}),t}function _e(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var Ye=Re((function t(){_e(this,t),this.start=null,this.mstart=null,this.starttype=null,this.trace=[]}));Ye.INITIAL_PLAYOUT_START_REASON="initial_playout",Ye.SEEK_START_REASON="seek",Ye.RESUME_FROM_PAUSE_START_REASON="resume",Ye.METRICS_COLLECTION_START_REASON="metrics_collection_start";var Ve=Re((function t(){_e(this,t),this.representationid=null,this.subreplevel=null,this.start=null,this.mstart=null,this.duration=null,this.playbackspeed=null,this.stopreason=null}));Ve.REPRESENTATION_SWITCH_STOP_REASON="representation_switch",Ve.REBUFFERING_REASON="rebuffering",Ve.USER_REQUEST_STOP_REASON="user_request",Ve.END_OF_PERIOD_STOP_REASON="end_of_period",Ve.END_OF_CONTENT_STOP_REASON="end_of_content",Ve.METRICS_COLLECTION_STOP_REASON="metrics_collection_end",Ve.FAILURE_STOP_REASON="failure";var Xe=M(6849);function nt(){return{ntpToUTC:function(t){var e=new Date(Date.UTC(1900,0,1,0,0,0));return new Date(e.getTime()+t).getTime()}}}nt.__dashjs_factory_name="TimeUtils";var Tt=h.A.getSingletonFactory(nt);function mt(t){t=t||{};var e,o,l,p,C,b,F,U,H,B,w,j,k,se,ie,he=this.context,oe=(0,y.A)(he).getInstance(),te=t.streamInfo,Z=t.type,K=t.errHandler,z=t.mimeType,f=t.timelineConverter,N=t.adapter,S=t.manifestModel,L=t.mediaPlayerModel,R=t.fragmentModel,V=t.abrController,de=t.playbackController,ue=t.mediaController,P=t.textController,$=t.dashMetrics,Y=t.settings,ge=t.boxParser,ve=t.segmentBlacklistController;function fe(){return te.id}function Ce(){return Z}function Me(){return N.getIsTextTrack(U.getData())}function Qe(){C=[],p=null,se=0,H=!1,B=!1,w=!1,ie=null}function $e(Fe){return!isNaN(Fe)&&!isNaN(te.duration)&&isFinite(te.duration)&&Fe>=te.start+te.duration}function Ze(Fe){var st=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1];if(Fe.sender){if(de.getIsManifestUpdateInProgress())Nt();else if((!Me()||P.isTextEnabled())&&b&&Fe.representationId&&!b.appendInitSegmentFromCache(Fe.representationId)){var xe=U.getCurrentRepresentation();if(xe.range===0)return void at();var Ge=j?j.getInitRequest(p,xe):null;Ge?R.executeRequest(Ge):st&&(F.setInitSegmentRequired(!0),Nt())}}}function at(Fe){var st=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1];if(de.getIsManifestUpdateInProgress()||b.getIsPruningInProgress())Nt();else{var xe=(function(){var Ge,lt=gt();if(isNaN(se)||Ce()===u.A.TEXT&&!P.isTextEnabled())return null;if(j){var ye=U&&lt?U.getRepresentationForQuality(lt.quality):null;Ge=H?j.getSegmentRequestForTime(p,ye,se):B?j.repeatSegmentRequest(p,ye):j.getNextSegmentRequest(p,ye)}return Ge})();xe?(H=!1,B=!1,(function(Ge){isNaN(Ge.startTime+Ge.duration)||(se=Ge.startTime+Ge.duration),Ge.delayLoadingTime=new Date().getTime()+F.getTimeToLoadDelay(),F.setTimeToLoadDelay(0),(function(lt){var ye=lt.url;return lt.range&&(ye=ye.concat("_",lt.range)),ve.contains(ye)})(Ge)?(o.warn("Fragment request url ".concat(Ge.url," for stream id ").concat(te.id," and media type ").concat(Z," is on the ignore list and will be skipped")),Nt()):(o.debug("Next fragment request url for stream id ".concat(te.id," and media type ").concat(Z," is ").concat(Ge.url)),R.executeRequest(Ge))})(xe)):(function(Ge){var lt,ye=U.getCurrentRepresentation();if(Y.get().streaming.gaps.enableSeekFix&&(H||de.getTime()===0)&&(l?l&&ye.segmentInfoType===n.A.SEGMENT_TIMELINE&&(lt=j.getValidTimeAheadOfTargetTime(se,p,ye,Y.get().streaming.gaps.threshold)):lt=j.getValidTimeAheadOfTargetTime(se,p,ye,Y.get().streaming.gaps.threshold),!isNaN(lt)&&lt!==se))return void(de.isSeeking()||de.getTime()===0?(o.warn("Adjusting playback time ".concat(lt," because of gap in the manifest. Seeking by ").concat(lt-se)),de.seek(lt,!1,!1)):(o.warn("Adjusting buffering time ".concat(lt," because of gap in the manifest. Adjusting time by ").concat(lt-se)),Ot(lt),Ge&&Nt()));if(j.isLastSegmentRequested(ye,se)){var Te=j.getCurrentIndex();return o.debug("Segment requesting for stream ".concat(te.id," has finished")),oe.trigger(i.A.STREAM_REQUESTING_COMPLETED,{segmentIndex:Te},{streamId:te.id,mediaType:Z}),b.segmentRequestingCompleted(Te),void F.clearScheduleTimer()}Ge&&Nt()})(st)}}function Nt(){F.startScheduleTimer(de.getLowLatencyModeEnabled()?Y.get().streaming.scheduling.lowLatencyTimeout:Y.get().streaming.scheduling.defaultTimeout)}function Ee(Fe){Fe.error||b.getIsBufferingCompleted()||b.updateBufferTimestampOffset(Fe.currentRepresentation)}function Pe(Fe){$.addBufferState(Z,Fe.state,F.getBufferTarget()),Fe.state!==_.A.BUFFER_EMPTY||de.isSeeking()||(o.info("Buffer is empty! Stalling!"),$.pushPlayListTraceMetrics(new Date,Ve.REBUFFERING_REASON))}function ct(Fe){R.syncExecutedRequestsWithBufferedRange(b.getBuffer().getAllBufferRanges(),te.duration),Fe.quotaExceeded&&Fe.from>de.getTime()&&Ot(Fe.from),Fe.hasEnoughSpaceToAppend&&Fe.quotaExceeded&&F.startScheduleTimer()}function Ke(Fe){if(Fe&&Fe.lastRequestAppended&&Fe.lastRequestAppended.url){var st=Fe.lastRequestAppended.url;Fe.lastRequestAppended.range&&(st=st.concat("_",Fe.lastRequestAppended.range)),o.warn("Blacklisting segment with url ".concat(st)),ve.add(st)}}function yt(Fe){if(o.debug("Appended bytes for ".concat(Fe.mediaType," and stream id ").concat(Fe.streamId)),Fe.segmentType===je.G.INIT_SEGMENT_TYPE){var st=Fe.quality;F.setLastInitializedQuality(st),o.info("["+Z+"] lastInitializedRepresentationInfo changed to "+Fe.quality)}ie?ht(ie):F.startScheduleTimer(0)}function ht(Fe){var st=R.getRequests({state:J.FRAGMENT_MODEL_LOADING});if(st&&st.length>0)return o.debug("Preparing for default quality switch: Waiting for ongoing segment request to be finished before applying switch."),void(ie=Fe);b.updateBufferTimestampOffset(Fe).then((function(){F.setCheckPlaybackQuality(!1),p.segmentAlignment||p.subSegmentAlignment?F.startScheduleTimer():Zt(),ie=null,w=!1})).catch((function(){ie=null,w=!1}))}function dt(Fe){o.info("onFragmentLoadingAbandoned request: "+Fe.request.url+" has been aborted"),de.isSeeking()||F.getSwitchTrack()||w||(o.info("onFragmentLoadingAbandoned request: "+Fe.request.url+" has to be downloaded again, origin is not seeking process or switch track call"),Fe.request&&Fe.request.isInitializationRequest()?F.setInitSegmentRequired(!0):Ot(Fe.request.startTime+Fe.request.duration/2),F.startScheduleTimer(0))}function qt(Fe){o.info("OnFragmentLoadingCompleted for stream id "+te.id+" and media type "+Z+" - Url:",Fe.request?Fe.request.url:"undefined",Fe.request.range?", Range:"+Fe.request.range:""),Me()&&F.startScheduleTimer(0),Fe.error&&Fe.request.serviceLocation&&(function(st){o.info("Fragment loading completed with an error"),st&&st.request&&st.request.type&&(st.request.type===je.G.INIT_SEGMENT_TYPE?Ze({representationId:st.request.representationId,sender:{}},!1):st.request.type===je.G.MEDIA_SEGMENT_TYPE&&(Ot(st.request.startTime+st.request.duration/2),at({},!1)))})(Fe)}function Yt(){Ot(de.getTime()),tt().startScheduleTimer()}function sn(Fe){var st=Fe.currentTrackInfo;if(st){var xe=C.find((function(Ge){return Ge.index===st.index&&Ge.lang===st.lang}));xe&&ut(xe).then((function(){b.setIsBufferingCompleted(!1),Ot(de.getTime()),F.setInitSegmentRequired(!0),F.startScheduleTimer()}))}}function ln(Fe){Ot(Fe.quotaExceededTime),F.clearScheduleTimer()}function ke(){return b?b.getBuffer():null}function ut(Fe){Fe===p||Fe&&p&&Fe.type!==p.type||(p=Fe);var st=N.getRealAdaptation(te,p),xe=N.getVoRepresentations(p);if(U){var Ge,lt=U.getData(),ye=V.getMaxAllowedIndexFor(Z,te.id),Te=V.getMinAllowedIndexFor(Z,te.id),We=null;return lt!==null&&lt.id===st.id||Z===u.A.TEXT?Ge=V.getQualityFor(Z,te.id):(We=V.getThroughputHistory().getAverageThroughput(Z,l)||V.getInitialBitrateFor(Z,te.id),Ge=V.getQualityForBitrate(p,We,te.id)),Te!==void 0&&Ge<Te&&(Ge=Te),Ge>ye&&(Ge=ye),U.updateData(st,xe,Z,p.isFragmented,Ge)}return Promise.resolve()}function tt(){return F}function gt(Fe){var st;return Fe!==void 0?((0,D.zQ)(Fe),st=U?U.getRepresentationForQuality(Fe):null):st=U?U.getCurrentRepresentation():null,N.convertRepresentationToRepresentationInfo(st)}function Dt(){return!!b&&b.getIsBufferingCompleted()}function Vt(Fe){if(Y.get().streaming.enableManifestTimescaleMismatchFix){var st=Fe.chunk,xe=st.bytes,Ge=gt(st.quality),lt=U&&Ge?U.getRepresentationForQuality(Ge.quality):null;Ge&&lt&&(lt.timescale=ge.getMediaTimescaleFromMoov(xe))}}function Gt(Fe){var st=Fe.chunk,xe=st.bytes,Ge=st.quality,lt=gt(Ge),ye=U&&lt?U.getRepresentationForQuality(lt.quality):null;if(lt&&ye){var Te;if(Y.get().streaming.parseInbandPrft&&Fe.request.type===je.G.MEDIA_SEGMENT_TYPE){var We=(function(dn,jn){var Pn=dn.getBoxes("prft"),Zn=[];return Pn.forEach((function(Ir){Zn.push((function(ir,cr){var er="unknown";switch(ir.flags){case 0:er=n.A.PRODUCER_REFERENCE_TIME_TYPE.ENCODER;break;case 16:er=n.A.PRODUCER_REFERENCE_TIME_TYPE.APPLICATION;break;case 24:er=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:er,ntpTimestamp:Rr=Tt(he).getInstance().ntpToUTC(Rr),mediaTime:ir.media_time/cr}})(Ir,jn))})),Zn})(Te=Te||ge.parse(xe),ye.timescale);We&&We.length&&oe.trigger(r.A.INBAND_PRFT,{data:We},{streamId:te.id,mediaType:Z})}var wt=N.getEventsFor(lt.mediaInfo,null,te),jt=N.getEventsFor(lt,ye,te);if(wt&&wt.length>0||jt&&jt.length>0){var hn=R.getRequests({state:J.FRAGMENT_MODEL_EXECUTED,quality:Ge,index:st.index})[0],En=(function(dn,jn,Pn,Zn){try{for(var Ir={},ir=[],cr=Pn.concat(Zn),er=0,Rr=cr.length;er<Rr;er++)Ir[cr[er].schemeIdUri+"/"+cr[er].value]=cr[er];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[]}})(Te=Te||ge.parse(xe),hn,wt,jt);oe.trigger(i.A.INBAND_EVENTS,{events:En},{streamId:te.id})}}}function Kt(){var Fe=de.getTime();Y.get().streaming.buffer.flushBufferAtTrackSwitch&&de.seek(Fe+.001,!1,!0),Ot(Fe),b.setSeekTarget(Fe),F.startScheduleTimer()}function Zt(){var Fe=de.getTime(),st=b.getContinuousBufferTimeForTargetTime(Fe);Ot(isNaN(st)?Fe:st),F.startScheduleTimer()}function pt(Fe){Fe&&!isNaN(Fe.time)&&(Ot(Fe.time),b.setSeekTarget(Fe.time))}function Ot(Fe){se=Fe,H=!0}return e={initialize:function(Fe,st,xe){k=(0,Xe.A)(he).create({events:i.A,eventBus:oe,streamInfo:te,timelineConverter:f,dashConstants:n.A,segmentBaseController:t.segmentBaseController,type:Z}),j=(0,Be.A)(he).create({streamInfo:te,type:Z,timelineConverter:f,dashMetrics:$,mediaPlayerModel:L,baseURLController:t.baseURLController,errHandler:K,segmentsController:k,settings:Y,boxParser:ge,events:i.A,eventBus:oe,errors:me,debug:(0,g.A)(he).getInstance(),requestModifier:(0,De.A)(he).getInstance(),dashConstants:n.A,constants:u.A,urlUtils:(0,Ae.A)(he).getInstance()}),l=te.manifestInfo.isDynamic,j.initialize(l),V.registerStreamType(Z,e),U=Q(he).create({streamInfo:te,type:Z,abrController:V,dashMetrics:$,playbackController:de,timelineConverter:f,dashConstants:n.A,events:i.A,eventBus:oe,errors:me,isDynamic:l,adapter:N,segmentsController:k}),b=(function(Ge,lt){return Ge?Ge!==u.A.TEXT||lt?Pt(he).create({streamInfo:te,type:Ge,mediaPlayerModel:L,manifestModel:S,fragmentModel:R,errHandler:K,mediaController:ue,representationController:U,adapter:N,textController:P,abrController:V,playbackController:de,settings:Y}):qe(he).create({streamInfo:te,type:Ge,mimeType:z,fragmentModel:R,textController:P,errHandler:K,settings:Y}):(K.error(new pe.A(me.MEDIASOURCE_TYPE_UNSUPPORTED_CODE,me.MEDIASOURCE_TYPE_UNSUPPORTED_MESSAGE+"not properly defined")),null)})(Z,xe),b&&b.initialize(Fe),(F=A(he).create({streamInfo:te,type:Z,mimeType:z,adapter:N,dashMetrics:$,mediaPlayerModel:L,fragmentModel:R,abrController:V,playbackController:de,textController:P,mediaController:ue,bufferController:b,representationController:U,settings:Y})).initialize(st),se=0,H=!1,B=!1},getStreamId:fe,getType:Ce,isUpdating:function(){return!!U&&U.isUpdating()},getBufferController:function(){return b},dischargePreBuffer:function(){b.dischargePreBuffer()},getFragmentModel:function(){return R},getScheduleController:tt,getRepresentationController:function(){return U},getRepresentationInfo:gt,getBufferLevel:function(){return b?b.getBufferLevel():0},isBufferingCompleted:Dt,createBufferSinks:function(Fe){var st=ke();return st?Promise.resolve(st):b?b.createBufferSink(p,Fe):Promise.resolve(null)},updateStreamInfo:function(Fe){return te=Fe,Dt()?Promise.resolve():b.updateAppendWindow()},getStreamInfo:function(){return te},selectMediaInfo:ut,clearMediaInfoArray:function(){C=[]},addMediaInfo:function(Fe){C.indexOf(Fe)===-1&&C.push(Fe)},prepareTrackSwitch:function(){return new Promise((function(Fe){o.debug("Preparing track switch for type ".concat(Z));var st=Z===u.A.TEXT||Y.get().streaming.trackSwitchMode[Z]===u.A.TRACK_SWITCH_MODE_ALWAYS_REPLACE&&de.getTimeToStreamEnd(te)>Y.get().streaming.buffer.stallThreshold;if(b.getIsBufferingCompleted()&&!st)return b.prepareForNonReplacementTrackSwitch(p.codec).then((function(){oe.trigger(i.A.BUFFERING_COMPLETED,{},{streamId:te.id,mediaType:Z})})).catch((function(){oe.trigger(i.A.BUFFERING_COMPLETED,{},{streamId:te.id,mediaType:Z})})),void Fe();F.clearScheduleTimer(),F.setSwitchTrack(!0),st?(oe.trigger(i.A.BUFFER_REPLACEMENT_STARTED,{mediaType:Z,streamId:te.id},{mediaType:Z,streamId:te.id}),R.abortRequests(),b.prepareForReplacementTrackSwitch(p.codec).then((function(){var xe=gt();return b.updateBufferTimestampOffset(xe)})).then((function(){Kt(),Fe()})).catch((function(){Kt(),Fe()}))):b.prepareForNonReplacementTrackSwitch(p.codec).then((function(){Zt(),Fe()})).catch((function(){Zt(),Fe()}))}))},prepareQualityChange:function(Fe){ie&&o.warn("Canceling queued representation switch to ".concat(ie.quality," for ").concat(Z)),o.debug("Preparing quality switch for type ".concat(Z));var st=Fe.newQuality;w=!0,F.clearScheduleTimer(),U.prepareQualityChange(st);var xe=gt(st);Fe.reason&&Fe.reason.forceReplace?(function(Ge){R.abortRequests(),oe.trigger(i.A.BUFFER_REPLACEMENT_STARTED,{mediaType:Z,streamId:te.id},{mediaType:Z,streamId:te.id}),F.setCheckPlaybackQuality(!1),b.prepareForForceReplacementQualitySwitch(Ge).then((function(){Kt(),ie=null,w=!1})).catch((function(){Kt(),ie=null,w=!1}))})(xe):Fe&&Fe.reason&&Fe.reason.forceAbandon?(function(Ge){b.updateBufferTimestampOffset(Ge).then((function(){R.abortRequests(),B=!0,F.setCheckPlaybackQuality(!1),F.startScheduleTimer(),w=!1,ie=null})).catch((function(){ie=null,w=!1}))})(xe):Y.get().streaming.buffer.fastSwitchEnabled?(function(Ge){var lt=de.getTime(),ye=1.5*(isNaN(Ge.fragmentDuration)?1:Ge.fragmentDuration),Te=R.getRequests({state:J.FRAGMENT_MODEL_EXECUTED,time:lt+ye,threshold:0})[0];if(Te&&!Me()){var We=b.getBufferLevel(),wt=V.getAbandonmentStateFor(te.id,Z);Te.quality<Ge.quality&&We>=ye&&wt!==_.A.ABANDON_LOAD?b.updateBufferTimestampOffset(Ge).then((function(){R.abortRequests(),Ot(lt+ye),F.setCheckPlaybackQuality(!1),F.startScheduleTimer(),w=!1})).catch((function(){w=!1})):ht(Ge)}else ht(Ge)})(xe):ht(xe),$.pushPlayListTraceMetrics(new Date,Ve.REPRESENTATION_SWITCH_STOP_REASON),$.createPlaylistTraceMetrics(xe.id,1e3*de.getTime(),de.getPlaybackRate())},getMediaInfo:function(){return p},getMediaSource:function(){return b.getMediaSource()},setMediaSource:function(Fe){return b.setMediaSource(Fe,p)},getBuffer:ke,setExplicitBufferingTime:Ot,finalisePlayList:function(Fe,st){$.pushPlayListTraceMetrics(Fe,st)},probeNextRequest:function(){var Fe=gt(),st=U&&Fe?U.getRepresentationForQuality(Fe.quality):null;return j.getNextSegmentRequestIdempotent(p,st)},prepareInnerPeriodPlaybackSeeking:function(Fe){return new Promise((function(st){if(b.hasBufferAtTime(Fe.seekTime))return b.pruneBuffer(),$e(b.getContinuousBufferTimeForTargetTime(Fe.seekTime))&&b.setIsBufferingCompleted(!0),void st();F.clearScheduleTimer(),R.abortRequests(),b.prepareForPlaybackSeek().then((function(){var xe=b.getAllRangesWithSafetyFactor(Fe.seekTime);return b.clearBuffers(xe)})).then((function(){var xe=b.getContinuousBufferTimeForTargetTime(Fe.seekTime);if($e(xe))b.setIsBufferingCompleted(!0),st();else{var Ge=isNaN(xe)?Fe.seekTime:xe;Ot(Ge),b.setSeekTarget(Ge);var lt=[];lt.push(b.updateAppendWindow());var ye=gt();lt.push(b.updateBufferTimestampOffset(ye)),Promise.all(lt).then((function(){F.setInitSegmentRequired(!0),F.setCheckPlaybackQuality(!1),F.startScheduleTimer(),st()}))}})).catch((function(xe){o.error(xe)}))}))},prepareOuterPeriodPlaybackSeeking:function(){return new Promise((function(Fe,st){try{F.clearScheduleTimer(),R.abortRequests(),b.prepareForPlaybackSeek().then((function(){return b.pruneAllSafely()})).then((function(){Fe()}))}catch(xe){st(xe)}}))},reset:function(Fe,st){j&&j.reset(),b&&(b.reset(Fe,st),b=null),F&&(F.reset(),F=null),U&&(U.reset(),U=null),k&&(k=null),V&&V.unRegisterStreamType(fe(),Z),oe.off(i.A.DATA_UPDATE_COMPLETED,Ee,e),oe.off(i.A.INIT_FRAGMENT_NEEDED,Ze,e),oe.off(i.A.MEDIA_FRAGMENT_NEEDED,at,e),oe.off(i.A.INIT_FRAGMENT_LOADED,Vt,e),oe.off(i.A.MEDIA_FRAGMENT_LOADED,Gt,e),oe.off(i.A.BUFFER_LEVEL_STATE_CHANGED,Pe,e),oe.off(i.A.BUFFER_CLEARED,ct,e),oe.off(i.A.SEEK_TARGET,pt,e),oe.off(i.A.FRAGMENT_LOADING_ABANDONED,dt,e),oe.off(i.A.FRAGMENT_LOADING_COMPLETED,qt,e),oe.off(i.A.SET_FRAGMENTED_TEXT_AFTER_DISABLED,Yt,e),oe.off(i.A.SET_NON_FRAGMENTED_TEXT,sn,e),oe.off(i.A.QUOTA_EXCEEDED,ln,e),oe.off(i.A.SOURCE_BUFFER_ERROR,Ke,e),oe.off(i.A.BYTES_APPENDED_END_FRAGMENT,yt,e),Qe(),Z=null,te=null}},o=(0,g.A)(he).getInstance().getLogger(e),Qe(),oe.on(i.A.DATA_UPDATE_COMPLETED,Ee,e,{priority:y.A.EVENT_PRIORITY_HIGH}),oe.on(i.A.INIT_FRAGMENT_NEEDED,Ze,e),oe.on(i.A.MEDIA_FRAGMENT_NEEDED,at,e),oe.on(i.A.INIT_FRAGMENT_LOADED,Vt,e),oe.on(i.A.MEDIA_FRAGMENT_LOADED,Gt,e),oe.on(i.A.BUFFER_LEVEL_STATE_CHANGED,Pe,e),oe.on(i.A.BUFFER_CLEARED,ct,e),oe.on(i.A.SEEK_TARGET,pt,e),oe.on(i.A.FRAGMENT_LOADING_ABANDONED,dt,e),oe.on(i.A.FRAGMENT_LOADING_COMPLETED,qt,e),oe.on(i.A.QUOTA_EXCEEDED,ln,e),oe.on(i.A.SET_FRAGMENTED_TEXT_AFTER_DISABLED,Yt,e),oe.on(i.A.SET_NON_FRAGMENTED_TEXT,sn,e),oe.on(i.A.SOURCE_BUFFER_ERROR,Ke,e),oe.on(i.A.BYTES_APPENDED_END_FRAGMENT,yt,e),e}mt.__dashjs_factory_name="StreamProcessor";var Ut=h.A.getClassFactory(mt);function Mt(t,e,o){return Object.defineProperty(t,"prototype",{writable:!1}),t}var zt=Mt((function t(){(function(e,o){if(!(e instanceof o))throw new TypeError("Cannot call a class as a function")})(this,t),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})),Qt=M(2930);function nn(t,e){if(t){if(typeof t=="string")return yn(t,e);var o={}.toString.call(t).slice(8,-1);return o==="Object"&&t.constructor&&(o=t.constructor.name),o==="Map"||o==="Set"?Array.from(t):o==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?yn(t,e):void 0}}function yn(t,e){(e==null||e>t.length)&&(e=t.length);for(var o=0,l=Array(e);o<e;o++)l[o]=t[o];return l}function xn(t){t=t||{};var e,o,l=this.context,p=t.requestModifier,C=t.lowLatencyThroughputModel,b=t.boxParser,F=(0,le.A)(l).getInstance();function U(w){var j,k=new Date,se=w.request,ie=new Headers;if(se.range&&ie.append("Range","bytes="+se.range),w.headers)for(var he in w.headers){var oe=w.headers[he];oe&&ie.append(he,oe)}se.requestStartDate||(se.requestStartDate=k),p&&p.modifyRequestHeader&&p.modifyRequestHeader({setRequestHeader:function(f,N){ie.append(f,N)}},{url:w.url}),typeof window.AbortController=="function"&&(j=new AbortController,w.abortController=j,j.signal.onabort=w.onabort);var te={method:w.method,headers:ie,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(se,1e3*o.getCurrentBufferLevel(se.mediaType))))return setTimeout(f,z);f()})).then((function(){var f=Date.now();fetch(w.url,te).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(yt){var ht=typeof Symbol<"u"&&yt[Symbol.iterator]||yt["@@iterator"];if(!ht){if(Array.isArray(yt)||(ht=nn(yt))){ht&&(yt=ht);var dt=0,qt=function(){};return{s:qt,n:function(){return dt>=yt.length?{done:!0}:{done:!1,value:yt[dt++]}},e:function(ke){throw ke},f:qt}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
3
+ `),q=0,W=T.length;q<W;q++){var x=T[q],ne=x.indexOf(": ");ne>0&&(d[x.substring(0,ne)]=x.substring(ne+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})();Le.A=i},6558:function(vt,Le,M){M.d(Le,{i:function(){return I}});var ce="4.7.4";function I(){return ce}},1840:function(vt,Le){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 ce(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])}}}])&&ce(n.prototype,_),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,_})();Le.A=u},3426:function(vt,Le,M){function ce(i){return ce=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},ce(i)}function I(i,h,g){return h=n(h),(function(r,m){if(m&&(ce(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);Le.A=y},4865:function(vt,Le,M){function ce(h){return ce=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},ce(h)}function I(h,g,r){return g=n(g),(function(m,d){if(d&&(ce(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;Le.A=i},9656:function(vt,Le){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 ce(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])}}}])&&ce(n.prototype,_),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,_})();Le.A=u},2945:function(vt,Le,M){var ce=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,ne=h.type,O=h.streamInfo,J=h.segmentsController,pe=h.timelineConverter,G=h.baseURLController;function X(){return ne}function re(){m=null}function be(Se,Ne,He){var it,Ie,Oe=G.resolve(He.path),ft={};return Oe&&Ne!==Oe.url&&x.isRelative(Ne)?(it=Oe.url,Ie=Oe.serviceLocation,ft=Oe.queryParams,Ne&&(it=x.resolve(Ne,it))):it=Ne,!x.isRelative(it)&&(Se.url=it,Se.serviceLocation=Ie,Se.queryParams=ft,!0)}function Ue(Se,Ne){if(Ne==null)return null;var He=new ce.A,it=Ne.representation,Ie=it.adaptation.period.mpd.manifest.Period_asArray[it.adaptation.period.index].AdaptationSet_asArray[it.adaptation.index].Representation_asArray[it.index].bandwidth,Oe=Ne.media;return Oe=(0,_.XX)(Oe,"Number",Ne.replacementNumber),Oe=(0,_.XX)(Oe,"Time",Ne.replacementTime),Oe=(0,_.XX)(Oe,"Bandwidth",Ie),Oe=(0,_.dD)(Oe,it.id),Oe=(0,_.Dr)(Oe),He.mediaType=X(),He.type=I.G.MEDIA_SEGMENT_TYPE,He.range=Ne.mediaRange,He.startTime=Ne.presentationStartTime,He.mediaStartTime=Ne.mediaStartTime,He.duration=Ne.duration,He.timescale=it.timescale,He.availabilityStartTime=Ne.availabilityStartTime,He.availabilityEndTime=Ne.availabilityEndTime,He.availabilityTimeComplete=it.availabilityTimeComplete,He.wallStartTime=Ne.wallStartTime,He.quality=it.index,He.index=Ne.index,He.mediaInfo=Se,He.adaptationIndex=it.adaptation.index,He.representationId=it.id,be(He,Oe,it)?He:void 0}function me(Se,Ne,He){var it=null;if(!Ne||!Ne.segmentInfoType)return it;var Ie=J.getSegmentByTime(Ne,He);return Ie&&(m=Ie,r.debug("Index for time "+He+" is "+Ie.index),it=Ue(Se,Ie)),it}function le(Se,Ne,He){var it=null,Ie=J.getSegmentByIndex(Ne,He,m?m.mediaStartTime:-1);if(Ie)it=Ue(Se,Ie),m=Ie;else{if(d&&!T)return r.debug(X()+" No segment found at index: "+He+". Wait for next loop"),null;T=!0}return it}function je(){r.debug("Dynamic stream complete"),T=!0}return g={getCurrentIndex:function(){return m?m.index:-1},getInitRequest:function(Se,Ne){return Ne?(function(He,it,Ie){var Oe=new ce.A,ft=it.adaptation.period,At=ft.start;if(Oe.mediaType=Ie,Oe.type=I.G.INIT_SEGMENT_TYPE,Oe.range=it.range,Oe.availabilityStartTime=pe.calcAvailabilityStartTimeFromPresentationTime(At,it,d),Oe.availabilityEndTime=pe.calcAvailabilityEndTimeFromPresentationTime(At+ft.duration,it,d),Oe.quality=it.index,Oe.mediaInfo=He,Oe.representationId=it.id,be(Oe,it.initialization,it))return Oe.url=(0,_.XX)(Oe.url,"Bandwidth",it.bandwidth),Oe})(Se,Ne,X()):null},getNextSegmentRequest:function(Se,Ne){return Ne&&Ne.segmentInfoType?le(Se,Ne,m?m.index+1:0):null},getNextSegmentRequestIdempotent:function(Se,Ne){var He=m?m.index+1:0,it=J.getSegmentByIndex(Ne,He,m?m.mediaStartTime:-1);return it?Ue(Se,it):null},getSegmentRequestForTime:me,getStreamId:function(){return O.id},getStreamInfo:function(){return O},getType:X,getValidTimeAheadOfTargetTime:function(Se,Ne,He,it){try{if(isNaN(Se)||!Ne||!He)return NaN;if(Se<0&&(Se=0),isNaN(it)&&(it=.5),me(Ne,He,Se))return Se;if(He.adaptation.period.start+He.adaptation.period.duration<Se)return NaN;for(var Ie=isFinite(He.adaptation.period.duration)?He.adaptation.period.start+He.adaptation.period.duration:Se+30,Oe=Math.min(Se+it,Ie),ft=NaN,At=null;Oe<=Ie;){var Rt=null;if(Oe<=Ie&&(Rt=me(Ne,He,Oe)),Rt){ft=Oe,At=Rt;break}Oe+=it}if(At){var Pt=At.startTime+At.duration;return Se>At.startTime&&Pt-Se>it?Se:!isNaN(At.startTime)&&Se<At.startTime&&ft>At.startTime?At.startTime+.001:Math.min(Pt-it,ft)}return ft}catch{return NaN}},initialize:function(Se){d=Se,T=!1,J.initialize(Se)},isLastSegmentRequested:function(Se,Ne){return!Se||!m?!1:T?!0:!isFinite(Se.adaptation.period.duration)||m.presentationStartTime+m.duration>Ne?!1:Se.mediaFinishedInformation&&!isNaN(Se.mediaFinishedInformation.numberOfSegments)&&!isNaN(m.index)&&m.index>=Se.mediaFinishedInformation.numberOfSegments-1&&(!d||Se.segmentInfoType===y.A.SEGMENT_TEMPLATE||d&&Se.segmentInfoType===y.A.SEGMENT_LIST&&Se.adaptation.period.nextPeriodId)?!0:!!(d&&Se.adaptation.period.nextPeriodId&&Se.segmentInfoType===y.A.SEGMENT_TIMELINE&&Se.mediaFinishedInformation&&!isNaN(Se.mediaFinishedInformation.mediaTimeOfLastSignaledSegment)&&m&&!isNaN(m.mediaStartTime)&&!isNaN(m.duration)&&m.mediaStartTime+m.duration>=Se.mediaFinishedInformation.mediaTimeOfLastSignaledSegment-.05)},repeatSegmentRequest:function(Se,Ne){return Ne&&Ne.segmentInfoType?le(Se,Ne,m?m.index:0):null},reset:function(){re(),q.off(n.A.DYNAMIC_TO_STATIC,je,g)}},r=W.getLogger(g),re(),q.on(n.A.DYNAMIC_TO_STATIC,je,g),g}i.__dashjs_factory_name="DashHandler",Le.A=u.A.getClassFactory(i)},5810:function(vt,Le){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 ce(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"}}])&&ce(n.prototype,_),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,_})());Le.A=u},6849:function(vt,Le,M){var ce=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,ne){return ne?Promise.resolve():q.getSegmentBaseInitSegment({representation:x,mediaType:T})},updateSegmentData:function(x,ne){return ne?Promise.resolve():q.getSegmentList({mimeType:x.mimeType,representation:x,mediaType:T})},getSegmentByIndex:function(x,ne,O){var J=W(x);return J?J.getSegmentByIndex(x,ne,O):null},getSegmentByTime:function(x,ne){var O=W(x);return O?O.getSegmentByTime(x,ne):null},getMediaFinishedInformation:function(x){var ne=W(x);return ne?ne.getMediaFinishedInformation(x):{numberOfSegments:0,mediaTimeOfLastSignaledSegment:NaN}}},r={},g}y.__dashjs_factory_name="SegmentsController";var i=ce.A.getClassFactory(y);Le.A=i},8610:function(vt,Le,M){var ce=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),ne=Math.max(d-x,0),O=null;if(ne<q){var J=T.SegmentURL_asArray[ne];(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 _=ce.A.getClassFactory(n);Le.A=_},8396:function(vt,Le,M){var ce=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,ne,O,J=d.segments,pe=J?J.length:null,G=-1;if(J&&pe>0){for(O=0;O<pe;O++)if(x=(W=J[O]).presentationStartTime,T+(q=(ne=W.duration)/2)>=x&&T-q<x+ne){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=ce.A.getClassFactory(u);Le.A=n},284:function(vt,Le,M){M.d(Le,{Dr:function(){return u},L$:function(){return h},W$:function(){return g},XX:function(){return _},dD:function(){return n}});var ce=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,ne,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),ne=parseInt(r.substring(W+2,q-1),10),x){case"d":case"i":case"u":O=I(d.toString(),ne);break;case"x":O=I(d.toString(16),ne);break;case"X":O=I(d.toString(16),ne).toUpperCase();break;case"o":O=I(d.toString(8),ne);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,ne){var O,J=new ce.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=ne,J.representation.startNumber+O),J.index=ne,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 ne=y(d,q,W,r.calcMediaTimeFromPresentationTime(W,d),r,x,m,T);return i(r,d,ne,m)?ne:null}function g(r,m,d,T,q,W,x,ne,O,J){var pe,G,X=T/W,re=q/W;return pe=r.calcPresentationTimeFromMediaTime(X,d),i(r,d,G=y(d,re,pe,X,r,pe+re,m,O),m)?(G.replacementTime=J||T,x=_(x,"Number",G.replacementNumber),x=_(x,"Time",G.replacementTime),G.media=x,G.mediaRange=ne,G):null}},9032:function(vt,Le,M){var ce=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 _=ce.A.getClassFactory(n);Le.A=_},9569:function(vt,Le,M){var ce=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,ne,O,J,pe,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,re=X.SegmentTimeline,be=X.SegmentURL_asArray,Ue=0,me=-1;G=T.timescale;var le=!1;for(ne=0,O=(W=re.S_asArray).length;ne<O&&!le;ne++)for(pe=0,(x=W[ne]).hasOwnProperty("r")&&(pe=x.r),x.hasOwnProperty("t")&&(Ue=x.t),pe<0&&(pe=d(T,W[ne+1],x,G,Ue/G)),J=0;J<=pe&&!le;J++)(le=q(Ue,X,be,x,G,++me,ne))&&(T.segmentDuration=x.d/G),Ue+=x.d}function d(T,q,W,x,ne){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 pe=g.getCurrentDVRInfo();J=isNaN(pe.end)?0:pe.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-ne)/(W.d/x))-1,0)}return{getSegmentByIndex:function(T,q,W){if(r(),!T)return null;var x=null,ne=!1;return m(T,(function(O,J,pe,G,X,re,be){if(ne||W<0){var Ue=J.media,me=G.mediaRange;return pe&&(Ue=pe[be].media||"",me=pe[be].mediaRange),x=(0,u.W$)(h,i,T,O,G.d,X,Ue,me,re,G.tManifest),!0}return O>=W*X-.5*G.d&&(ne=!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(ne,O,J,pe,G,X,re){var be=parseFloat((x*G).toPrecision(15));if(be<ne+pe.d&&be>=ne){var Ue=O.media,me=pe.mediaRange;return J&&(Ue=J[re].media||"",me=J[re].mediaRange),W=(0,u.W$)(h,i,T,ne,pe.d,G,Ue,me,X,pe.tManifest),!0}return!1})),W},getMediaFinishedInformation:function(T){if(!T)return 0;var q,W,x,ne,O,J,pe,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,re=0,be=0;for(pe=T.timescale,ne=(q=G.S_asArray).length,x=0;x<ne;x++)for(J=0,(W=q[x]).hasOwnProperty("r")&&(J=W.r),W.hasOwnProperty("t")&&(re=(X=W.t)/pe),J<0&&(J=d(T,q[x+1],W,pe,re)),O=0;O<=J;O++)be++,re=(X+=W.d)/pe;return{numberOfSegments:be,mediaTimeOfLastSignaledSegment:re}}}}n.__dashjs_factory_name="TimelineSegmentsGetter";var _=ce.A.getClassFactory(n);Le.A=_},5708:function(vt,Le){function M(I,u,n){return Object.defineProperty(I,"prototype",{writable:!1}),I}var ce=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}));Le.A=ce},289:function(vt,Le){function M(I,u,n){return Object.defineProperty(I,"prototype",{writable:!1}),I}var ce=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=""}));Le.A=ce},4716:function(vt,Le,M){M.d(Le,{A:function(){return rl}});var ce=M(4947),I=M.n(ce),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 t,e,o,l,p,C,b,F,U,H,B,w,j,k,se,ie,he,oe,te,Z,K,z,f,N,S,L=this.context,R=(0,y.A)(L).getInstance();function V(){$(),k=!1,H=0,B=0,he=0,f=!1,oe=!0,te=!1,N=!1,Z=NaN,ie=NaN,b&&(R.off(i.A.DATA_UPDATE_COMPLETED,ct,t),R.off(i.A.LOADING_PROGRESS,Fe,t),R.off(i.A.MANIFEST_UPDATED,lt,t),R.off(i.A.STREAMS_COMPOSED,ye,t),R.off(r.A.PLAYBACK_ENDED,Zt,t),R.off(r.A.STREAM_INITIALIZING,xe,t),R.off(r.A.REPRESENTATION_SWITCH,Ge,t),R.off(r.A.BUFFER_LEVEL_STATE_CHANGED,ht,t),Pe(),b.removeEventListener("canplay",Ke),b.removeEventListener("canplaythrough",yt),b.removeEventListener("play",dt),b.removeEventListener("waiting",qt),b.removeEventListener("playing",Yt),b.removeEventListener("pause",sn),b.removeEventListener("error",pt),b.removeEventListener("seeking",ln),b.removeEventListener("seeked",ke),b.removeEventListener("timeupdate",ut),b.removeEventListener("progress",tt),b.removeEventListener("ratechange",gt),b.removeEventListener("loadedmetadata",Dt),b.removeEventListener("loadeddata",Vt),b.removeEventListener("stalled",st),b.removeEventListener("ended",Gt),b.removeEventListener("volumechange",Kt)),U=null,b=null,w=null,j=null}function de(){return parseFloat((ue(arguments.length>0&&arguments[0]!==void 0?arguments[0]:null)-fe()).toFixed(5))}function ue(Te){var We=Te||w;return We.start+We.duration}function P(){var Te=arguments.length>0&&arguments[0]!==void 0&&arguments[0];w&&b&&b.getElement()?(Te&&j&&ve(fe()),b.play()):k=!0}function $(){w&&b&&b.pause()}function Y(Te){var We=arguments.length>1&&arguments[1]!==void 0&&arguments[1],wt=arguments.length>2&&arguments[2]!==void 0&&arguments[2],jt=arguments.length>3&&arguments[3]!==void 0&&arguments[3];w&&b&&b.getElement()&&Te!==(isNaN(Z)?b.getTime():Z)&&((K=wt===!0)||(Z=Te),e.info("Requesting seek to time: "+Te+(K?" (internal)":"")),j&&jt&&ve(Te),b.setCurrentTime(Te,We))}function ge(){if(w&&b&&j){var Te=o&&o.hasVideoTrack()?u.A.VIDEO:u.A.AUDIO,We=p.getCurrentDVRInfo(Te);return We&&We.range?We.range.end:0}}function ve(Te){var We=new Date(F.getClientReferenceTime()),wt=C.getRegularPeriods()[0],jt=F.calcPresentationTimeFromWallTime(We,wt);H=jt-Te}function fe(){return w&&b?b.getTime():null}function Ce(){return w&&b?b.isPaused():null}function Me(){return w&&b?b.isSeeking():null}function Qe(){return w&&b?b.isStalled():null}function $e(){return w&&b?b.getPlaybackRate():null}function Ze(){return w&&b?b.getEnded():null}function at(){return j}function Nt(){var Te=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null;if(!Ce()&&j&&b.getReadyState()!==0&&!Me()&&!f){Te||(Te=o.hasVideoTrack()?u.A.VIDEO:u.A.AUDIO);var We=fe(),wt=(function(jt,hn){var En=p.getCurrentDVRInfo(hn),dn=En?En.range:null;return dn?jt>dn.end?Math.max(dn.end-H,dn.start):jt>0&&jt+.25<dn.start&&Math.abs(jt-dn.start)<31536e4?te?Math.max(dn.end-H,dn.start):dn.start:jt:NaN})(We,Te);!isNaN(wt)&&wt!==We&&!Me()&&(Qe()||z||b.getReadyState()===1)&&(e.debug("UpdateCurrentTime: Seek to actual time: ".concat(wt," from currentTime: ").concat(We)),Y(wt,!1,!1))}}function Ee(){U===null&&(U=setInterval((function(){(function(){if(R.trigger(i.A.WALLCLOCK_TIME_UPDATED,{isDynamic:j,time:new Date}),at()){var Te=Date.now();(isNaN(ie)||Te>ie+S.get().streaming.liveUpdateTimeThresholdInMilliseconds)&&(o.addDVRMetric(),Ce()?(function(){var We=Date.now();(!se||We>se+500)&&(se=We,ut())})():Nt(),ie=Te)}})()}),S.get().streaming.wallclockTimeUpdateInterval))}function Pe(){clearInterval(U),U=null}function ct(Te){var We=C.convertRepresentationToRepresentationInfo(Te.currentRepresentation),wt=We?We.mediaInfo.streamInfo:null;wt!==null&&w.id===wt.id&&(w=wt)}function Ke(){R.trigger(i.A.CAN_PLAY)}function yt(){R.trigger(i.A.CAN_PLAY_THROUGH)}function ht(Te){Te.streamId===o.getActiveStreamInfo().id&&(z=Te.state===_.A.BUFFER_EMPTY,S.get().streaming.buffer.setStallState&&b.setStallState(Te.mediaType,Te.state===_.A.BUFFER_EMPTY))}function dt(){e.info("Native video element event: play"),Nt(),Ee(),R.trigger(i.A.PLAYBACK_STARTED,{startTime:fe()})}function qt(){e.info("Native video element event: waiting"),R.trigger(i.A.PLAYBACK_WAITING,{playingTime:fe()})}function Yt(){e.info("Native video element event: playing"),K=!1,R.trigger(i.A.PLAYBACK_PLAYING,{playingTime:fe()})}function sn(){e.info("Native video element event: pause"),R.trigger(i.A.PLAYBACK_PAUSED,{ended:Ze()})}function ln(){if(!K){var Te=fe();isNaN(Z)||Z===Te||(Te=Z),Z=NaN,e.info("Seeking to: "+Te),Ee(),R.trigger(i.A.PLAYBACK_SEEKING,{seekTime:Te,streamId:w.id})}}function ke(){e.info("Native video element event: seeked"),K=!1,R.trigger(i.A.PLAYBACK_SEEKED)}function ut(){w&&R.trigger(i.A.PLAYBACK_TIME_UPDATED,{timeToEnd:de(),time:fe(),streamId:w.id})}function tt(){R.trigger(i.A.PLAYBACK_PROGRESS,{streamId:w.id})}function gt(){var Te=$e();e.info("Native video element event: ratechange: ",Te),R.trigger(i.A.PLAYBACK_RATE_CHANGED,{playbackRate:Te})}function Dt(){e.info("Native video element event: loadedmetadata"),R.trigger(i.A.PLAYBACK_METADATA_LOADED),Ee()}function Vt(){e.info("Native video element event: loadeddata"),R.trigger(i.A.PLAYBACK_LOADED_DATA)}function Gt(){e.info("Native video element event: ended"),$(),Pe();var Te=o?o.getActiveStreamInfo():null;Te&&R.trigger(i.A.PLAYBACK_ENDED,{isLast:Te.isLast})}function Kt(){R.trigger(i.A.PLAYBACK_VOLUME_CHANGED)}function Zt(Te){if(U&&Te.isLast){e.info("onPlaybackEnded -- PLAYBACK_ENDED but native video element didn't fire ended");var We=Te.seekTime?Te.seekTime:ue();b.setCurrentTime(We),$(),Pe()}}function pt(Te){var We=Te.target||Te.srcElement;R.trigger(i.A.PLAYBACK_ERROR,{error:We.error})}function Ot(){j=!1}function Fe(Te){if(Te.stream===!1&&te&&!isNaN(Te.request.duration)){var We=1.2*Te.request.duration;We>H&&(e.warn("Browser does not support fetch API with StreamReader. Increasing live delay to be 20% higher than segment duration:",We.toFixed(2)),H=We,B=We)}}function st(Te){R.trigger(i.A.PLAYBACK_STALLED,{e:Te})}function xe(Te){var We;(We=Te.mediaInfo)&&We.supplementalProperties&&We.supplementalProperties[u.A.SUPPLEMENTAL_PROPERTY_DVB_LL_SCHEME]&&We.supplementalProperties[u.A.SUPPLEMENTAL_PROPERTY_DVB_LL_SCHEME].value==="true"&&(e.debug("Low Latency critical SupplementalProperty set: Enabling low Latency"),te=!0)}function Ge(Te){var We=o.getActiveStreamInfo();Te&&We&&Te.currentRepresentation&&Te.streamId&&Te.streamId===We.id&&Te.mediaType&&(Te.mediaType===u.A.VIDEO||Te.mediaType===u.A.AUDIO)&&(oe=Te.currentRepresentation.availabilityTimeComplete,(te=!oe)&&!N&&(N=!0))}function lt(){f=!0}function ye(){f=!1}return t={initialize:function(Te,We){w=Te,We!==!0&&(b.addEventListener("canplay",Ke),b.addEventListener("canplaythrough",yt),b.addEventListener("play",dt),b.addEventListener("waiting",qt),b.addEventListener("playing",Yt),b.addEventListener("pause",sn),b.addEventListener("error",pt),b.addEventListener("seeking",ln),b.addEventListener("seeked",ke),b.addEventListener("timeupdate",ut),b.addEventListener("progress",tt),b.addEventListener("ratechange",gt),b.addEventListener("loadedmetadata",Dt),b.addEventListener("loadeddata",Vt),b.addEventListener("stalled",st),b.addEventListener("ended",Gt),b.addEventListener("volumechange",Kt),j=w.manifestInfo.isDynamic,z=!1,K=!1,R.on(i.A.DATA_UPDATE_COMPLETED,ct,t),R.on(i.A.LOADING_PROGRESS,Fe,t),R.on(i.A.MANIFEST_UPDATED,lt,t),R.on(i.A.STREAMS_COMPOSED,ye,t),R.on(r.A.PLAYBACK_ENDED,Zt,t,{priority:y.A.EVENT_PRIORITY_HIGH}),R.on(r.A.STREAM_INITIALIZING,xe,t),R.on(r.A.REPRESENTATION_SWITCH,Ge,t),R.on(r.A.BUFFER_LEVEL_STATE_CHANGED,ht,t),R.on(r.A.DYNAMIC_TO_STATIC,Ot,t),k&&(k=!1,P()))},setConfig:function(Te){Te&&(Te.streamController&&(o=Te.streamController),Te.serviceDescriptionController&&(l=Te.serviceDescriptionController),Te.dashMetrics&&(p=Te.dashMetrics),Te.adapter&&(C=Te.adapter),Te.videoModel&&(b=Te.videoModel),Te.timelineConverter&&(F=Te.timelineConverter),Te.settings&&(S=Te.settings))},getTimeToStreamEnd:de,getBufferLevel:function(){var Te=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,We=null;return o.getActiveStreamProcessors().forEach((function(wt){if(!Te||Te.length===0||Te.indexOf(wt.getType())===-1){var jt=wt.getBufferLevel();We=We===null?jt:Math.min(We,jt)}})),We},getPlaybackStalled:function(){return z},getTime:fe,getLowLatencyModeEnabled:function(){return te},getInitialCatchupModeActivated:function(){return N},getIsManifestUpdateInProgress:function(){return f},getPlaybackRate:$e,getPlayedRanges:function(){return w&&b?b.getPlayedRanges():null},getEnded:Ze,getIsDynamic:at,getStreamController:function(){return o},computeAndSetLiveDelay:function(Te,We){var wt,jt,hn,En=!isNaN(Te)&&isFinite(Te)?Te:NaN,dn=C.getSuggestedPresentationDelay(),qn=l.getServiceDescriptionSettings();return wt=isNaN(S.get().streaming.delay.liveDelay)?S.get().streaming.delay.liveDelayFragmentCount===null||isNaN(S.get().streaming.delay.liveDelayFragmentCount)||isNaN(En)?qn&&!isNaN(qn.liveDelay)&&qn.liveDelay>0?qn.liveDelay:S.get().streaming.delay.useSuggestedPresentationDelay===!0&&dn!==null&&!isNaN(dn)&&dn>0?dn:isNaN(En)?We&&!isNaN(We.minBufferTime)?4*We.minBufferTime:4*w.manifestInfo.minBufferTime:4*En:En*S.get().streaming.delay.liveDelayFragmentCount:S.get().streaming.delay.liveDelay,(hn=C.getAvailabilityStartTime())!==null&&(he=hn),jt=We&&We.dvrWindowSize>0?Math.min(wt,We.dvrWindowSize):wt,H=jt,B=jt,jt},getLiveDelay:function(){return H},getOriginalLiveDelay:function(){return B},getCurrentLiveLatency:function(){if(!j||isNaN(he))return NaN;var Te=fe();if(isNaN(Te)||Te===0)return 0;var We=new Date().getTime()+1e3*F.getClientTimeOffset();return Math.max(((We-he-1e3*Te)/1e3).toFixed(3),0)},play:P,isPaused:Ce,isStalled:Qe,pause:$,isSeeking:Me,getStreamEndTime:ue,seek:Y,seekToOriginalLive:function(){var Te=arguments.length>0&&arguments[0]!==void 0&&arguments[0],We=arguments.length>1&&arguments[1]!==void 0&&arguments[1],wt=arguments.length>2&&arguments[2]!==void 0&&arguments[2],jt=ge();jt!==0&&Y(jt-(H=B),Te,We,wt)},seekToCurrentLive:function(){var Te=arguments.length>0&&arguments[0]!==void 0&&arguments[0],We=arguments.length>1&&arguments[1]!==void 0&&arguments[1],wt=arguments.length>2&&arguments[2]!==void 0&&arguments[2],jt=ge();jt!==0&&Y(jt-H,Te,We,wt)},reset:V,updateCurrentTime:Nt,getAvailabilityStartTime:function(){return he}},e=(0,g.A)(L).getInstance().getLogger(t),V(),t}m.__dashjs_factory_name="PlaybackController";var d=h.A.getSingletonFactory(m),T=M(2686),q="loading",W="executed",x="failed";function ne(t){var e,o,l,p,C=(t=t||{}).eventBus,b=t.events,F=t.dashMetrics,U=t.fragmentLoader,H=t.debug,B=t.streamInfo,w=t.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,de){return isNaN(V.index)&&isNaN(de.index)&&V.quality===de.quality})(f,S)||(function(V,de){return V.action===T.A.ACTION_COMPLETE&&V.action===de.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 se(f){l=l.filter((function(N){var S=k(N);return isNaN(N.startTime)||f!==void 0&&N.startTime>=f-S}))}function ie(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 he(f,N,S){for(var L=f.length-1;L>=0;L--){var R=f[L],V=R.startTime,de=V+R.duration;if(S=isNaN(S)?k(R):S,!isNaN(V)&&!isNaN(de)&&N+S>=V&&N-S<de||isNaN(V)&&isNaN(N))return R}return null}function oe(f,N){F.addSchedulingInfo(f,N),F.addRequestsQueue(f.mediaType,p,l)}function te(f){f.sender===U&&(p.splice(p.indexOf(f.request),1),f.response&&!f.error&&l.push(f.request),oe(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 e={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 de;switch(V){case q:de=p;break;case W:de=l;break;default:de=[]}return de})(L);S=S.concat((function(V,de){return de.hasOwnProperty("time")?[he(V,de.time,de.threshold)]:V.filter((function(ue){for(var P in de)if(P!=="state"&&de.hasOwnProperty(P)&&ue[P]!=de[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:se,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++)ie(S,f.start(L)),S=f.end(L);N>0&&ie(S,N)}else se()},abortRequests:function(){o.debug("abort requests"),U.abort(),p=[]},executeRequest:function(f){f.action===T.A.ACTION_DOWNLOAD?(oe(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,te,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(e),z(),C.on(b.LOADING_COMPLETED,te,e),C.on(b.LOADING_DATA_PROGRESS,Z,e),C.on(b.LOADING_ABANDONED,K,e),e}ne.__dashjs_factory_name="FragmentModel";var O=h.A.getClassFactory(ne);O.FRAGMENT_MODEL_LOADING=q,O.FRAGMENT_MODEL_EXECUTED=W,O.FRAGMENT_MODEL_CANCELED="canceled",O.FRAGMENT_MODEL_FAILED=x,h.A.updateClassFactory(ne.__dashjs_factory_name,O);var J=O,pe=M(8324);function G(t){return G=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},G(t)}function X(t,e,o){return e=be(e),(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)})(t,re()?Reflect.construct(e,[],be(t).constructor):e.apply(t,o))}function re(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(re=function(){return!!t})()}function be(t){return be=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},be(t)}function Ue(t,e){return Ue=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,l){return o.__proto__=l,o},Ue(t,e)}var me=new((function(t){function e(){var l;return(function(p,C){if(!(p instanceof C))throw new TypeError("Cannot call a class as a function")})(this,e),(l=X(this,e)).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&&Ue(l,p)})(e,t),o=e,Object.defineProperty(o,"prototype",{writable:!1}),o;var o})(M(1840).A)),le=M(1657),je=M(2756);function Se(t){var e,o,l,p,C,b,F=this.context,U=(0,le.A)(F).getInstance(),H=t.textController,B=t.eventBus,w=[],j=[],k=!1,se=t.mediaSource,ie=null;function he(R){return new Promise((function(V){L((function(){p.changeType&&p.changeType(R),V()}))}))}function oe(R){return p=H.getTextSourceBuffer(R),Promise.resolve()}function te(){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 de=se.duration,ue=0;R&&!isNaN(R.start)&&!isNaN(R.duration)&&isFinite(R.duration)&&(de=R.start+R.duration),R&&!isNaN(R.start)&&(ue=R.start),p.appendWindowEnd===de&&p.appendWindowStart===ue||(p.appendWindowStart=0,p.appendWindowEnd=de+.01,p.appendWindowStart=Math.max(ue-.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!==je.G.INIT_SEGMENT_TYPE&&delete R.data.bytes,R.promise.resolve({chunk:R.data})};try{ie=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(de){l.fatal('SourceBuffer append failed "'+de+'"'),j.length>0?z():k=!1,delete R.data.bytes,R.promise.reject({chunk:R.data,error:new pe.A(de.code,de.message)})}}}function f(){w.length>0&&(p.updating||(w.shift()(),f()))}function N(){p.updating||f()}function S(R){var V,de,ue=R.target||{};V=i.A.SOURCE_BUFFER_ERROR,de={error:ue,lastRequestAppended:ie},B.trigger(V,de,{streamId:C.streamInfo.id,mediaType:o})}function L(R){w.push(R),p.updating||f()}return e={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,de=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return new Promise((function(ue,P){R?(j.push({data:R,promise:{resolve:ue,reject:P},request:de}),L(z.bind(V))):P({chunk:R,error:new pe.A(me.APPEND_ERROR_CODE,me.APPEND_ERROR_MESSAGE)})}))},remove:function(R){return new Promise((function(V,de){var ue=R.start,P=R.end;ue>=0&&P>ue?L((function(){try{p.remove(ue,P),L((function(){V({from:ue,to:P,unintended:!1}),R.resolve&&R.resolve()}))}catch($){de({from:ue,to:P,unintended:!1,error:new pe.A(me.REMOVE_ERROR_CODE,me.REMOVE_ERROR_MESSAGE)}),R.reject&&R.reject($)}})):V()}))},abort:function(){return new Promise((function(R){try{j=[],se.readyState==="open"?L((function(){try{p&&p.abort(),R()}catch{R()}})):(p&&p.setTextTrack&&se.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"),se.removeSourceBuffer(p))}catch{}p=null}ie=null},updateTimestampOffset:K,initializeForStreamSwitch:function(R,V,de){o=(C=R).type;var ue=C.codec;(function($){p=$.getBuffer()})(de),te();var P=[];return P.push(new Promise((function($){L((function(){var Y=p.appendWindowStart,ge=p.appendWindowEnd;p&&(p.abort(),p.appendWindowStart=Y,p.appendWindowEnd=ge),$()}))}))),P.push(Z(C.streamInfo)),U.get().streaming.buffer.useChangeTypeForTrackSwitch&&P.push(he(ue)),V&&V.MSETimeOffset!==void 0&&P.push(K(V.MSETimeOffset)),Promise.all(P)},initializeForFirstUse:function(R,V,de){o=(C=V).type;var ue=C.codec;try{if(ue.match(/application\/mp4;\s*codecs="(stpp|wvtt).*"/i))return oe(R);p=se.addSourceBuffer(ue),te();var P=[];return P.push(Z(C.streamInfo)),de&&de.MSETimeOffset!==void 0&&P.push(K(de.MSETimeOffset)),Promise.all(P)}catch($){return C.type==u.A.TEXT&&!C.isFragmented||ue.indexOf('codecs="stpp')!==-1||ue.indexOf('codecs="vtt')!==-1||ue.indexOf("text/vtt")!==-1?oe(R):Promise.reject($)}},updateAppendWindow:Z,changeType:he},l=(0,g.A)(F).getInstance().getLogger(e),e}Se.__dashjs_factory_name="SourceBufferSink";var Ne=h.A.getClassFactory(Se);function He(t){var e,o,l,p=this.context,C=[],b=t;function F(U,H){return C=C.filter((function(B){return!((isNaN(H)||B.start<H)&&(isNaN(U)||B.end>U))})),Promise.resolve()}return e={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(e),e}He.__dashjs_factory_name="PreBufferSink";var it=h.A.getClassFactory(He);function Ie(){var t={};return{save:function(e){var o=e.streamId,l=e.representationId;t[o]=t[o]||{},t[o][l]=e},extract:function(e,o){return t&&t[e]&&t[e][o]?t[e][o]:null},reset:function(){t={}}}}Ie.__dashjs_factory_name="InitCache";var Oe=h.A.getSingletonFactory(Ie),ft=.01,At="BufferController";function Rt(t){t=t||{};var e,o,l,p,C,b,F,U,H,B,w,j,k,se,ie,he,oe,te,Z,K,z,f=this.context,N=(0,y.A)(f).getInstance(),S=t.errHandler,L=t.fragmentModel,R=t.representationController,V=t.adapter,de=t.textController,ue=t.abrController,P=t.playbackController,$=t.streamInfo,Y=t.type,ge=t.settings;function ve(xe){var Ge=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return new Promise((function(lt,ye){b=xe,H&&Ge&&typeof H.discharge=="function"?(B=H,Ce(Ge).then((function(){lt()})).catch((function(Te){ye(Te)}))):lt()}))}function fe(xe){return V.convertRepresentationToRepresentationInfo(R.getRepresentationForQuality(xe))}function Ce(xe){var Ge=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return new Promise((function(lt,ye){te&&xe?b?(w=!1,(function(Te,We){return new Promise((function(wt,jt){var hn=ue.getQualityFor(Y,$.id);H=Ne(f).create({mediaSource:b,textController:de,eventBus:N}),(function(En,dn,qn){var Pn=fe(qn);return dn&&dn[Y]&&(Y===u.A.VIDEO||Y===u.A.AUDIO)?H.initializeForStreamSwitch(En,Pn,dn[Y]):H.initializeForFirstUse($,En,Pn)})(Te,We,hn).then((function(){return gt(fe(hn))})).then((function(){wt(H)})).catch((function(En){o.fatal("Caught error on create SourceBuffer: "+En),S.error(new pe.A(me.MEDIASOURCE_TYPE_UNSUPPORTED_CODE,me.MEDIASOURCE_TYPE_UNSUPPORTED_MESSAGE+Y)),jt(En)}))}))})(xe,Ge).then((function(Te){lt(Te)})).catch((function(Te){ye(Te)}))):(w=!0,(function(){var Te=this;return new Promise((function(We,wt){var jt=ue.getQualityFor(Y,$.id);H=it(f).create(at.bind(Te)),gt(fe(jt)).then((function(){We(H)})).catch((function(){wt()}))}))})().then((function(Te){lt(Te)})).catch((function(Te){ye(Te)}))):lt(null)}))}function Me(xe){ge.get().streaming.cacheInitSegments&&(o.info("Init fragment finished loading saving to",Y+"'s init cache"),te.save(xe.chunk)),o.debug("Append Init fragment",Y," with representationId:",xe.chunk.representationId," and quality:",xe.chunk.quality,", data size:",xe.chunk.bytes.byteLength),$e(xe.chunk)}function Qe(xe){$e(xe.chunk,xe.request)}function $e(xe){var Ge=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;H&&(H.append(xe,Ge).then((function(lt){at(lt)})).catch((function(lt){at(lt)})),xe.mediaInfo.type===u.A.VIDEO&&Fe(i.A.VIDEO_CHUNK_RECEIVED,{chunk:xe}))}function Ze(xe){if(xe&&xe.length>0)for(var Ge=0,lt=xe.length;Ge<lt;Ge++)o.debug("Buffered range: "+xe.start(Ge)+" - "+xe.end(Ge)+", currentTime = ",P.getTime())}function at(xe){if(xe.error)return xe.error.code===22&&(function(){if(oe=!0,C=.8*Zt(),o.warn("Quota exceeded, Critical Buffer: "+C),C>0){var ye=Math.max(.2*C,1),Te=C-ye,We=Math.min(ge.get().streaming.buffer.bufferTimeAtTopQuality,.9*Te),wt=Math.min(ge.get().streaming.buffer.bufferTimeAtTopQualityLongForm,.9*Te),jt={streaming:{buffer:{bufferToKeep:parseFloat(ye.toFixed(5)),bufferTimeAtTopQuality:parseFloat(We.toFixed(5)),bufferTimeAtTopQualityLongForm:parseFloat(wt.toFixed(5))}}};ge.update(jt)}})(),void(xe.error.code!==22&&Ot()||(o.warn("Clearing playback buffer to overcome quota exceed situation"),Fe(i.A.QUOTA_EXCEEDED,{criticalBufferLevel:C,quotaExceededTime:xe.chunk.start}),ke(ln())));if(H&&(ht(),oe=!1,(se=xe.chunk)&&se.endFragment)){se&&!isNaN(se.index)&&(F=Math.max(se.index,F),dt());var Ge=H.getAllBufferRanges();se.segmentType===je.G.MEDIA_SEGMENT_TYPE&&(Ze(Ge),Pe(),(function(){if(!isNaN(z)&&!w)if(Y===u.A.AUDIO||Y===u.A.VIDEO){var ye=P.getTime(),Te=yt(ye,0),We=yt(z,0);if(Te&&We&&Te.start===We.start)z=NaN;else{var wt=R.getCurrentRepresentation().segmentDuration,jt=yt(z,wt);jt&&(ge.get().streaming.buffer.enableSeekDecorrelationFix&&Math.abs(ye-z)>wt?z<=jt.end&&P.seek(Math.max(z,jt.start),!1,!0):ye<jt.start&&P.seek(jt.start,!1,!0))}}else z=NaN})());var lt=!1;j&&(j.indexOf(se)>0&&(lt=!0),j=null),se&&!lt&&Fe(i.A.BYTES_APPENDED_END_FRAGMENT,{quality:se.quality,startTime:se.start,index:se.index,bufferedRanges:Ge,segmentType:se.segmentType,mediaType:Y})}}function Nt(){return new Promise((function(xe,Ge){var lt=Ee();if(!lt||lt.length===0)return Pe(),void xe();ke(lt).then((function(){xe()})).catch((function(ye){Ge(ye)}))}))}function Ee(xe){var Ge=[],lt=H.getAllBufferRanges();if(!lt||lt.length===0)return Ge;if(!xe&&xe!==0||isNaN(xe))Ge.push({start:lt.start(0),end:lt.end(lt.length-1)+.5});else{var ye=(function(We,wt){var jt=ge.get().streaming.buffer.bufferToKeep,hn=wt.start(0);if(We-hn>jt){var En=Math.max(0,We-jt),dn=L.getRequests({state:J.FRAGMENT_MODEL_EXECUTED,time:We,threshold:ft})[0];if(dn&&(En=Math.min(dn.startTime,En)),En>0)return{start:hn,end:En}}return null})(xe,lt),Te=(function(We,wt){var jt=wt.end(wt.length-1)+.5,hn=pt(We),En=$.manifestInfo.duration>=ge.get().streaming.buffer.longFormContentDurationThreshold?ge.get().streaming.buffer.bufferTimeAtTopQualityLongForm:ge.get().streaming.buffer.bufferTimeAtTopQuality,dn=isNaN(hn)?We:Math.min(hn,We+En);if(dn>=wt.end(wt.length-1))return null;var qn=L.getRequests({state:J.FRAGMENT_MODEL_EXECUTED,time:We,threshold:ft})[0];if(qn&&(dn=Math.max(qn.startTime+qn.duration,dn)),ge.get().streaming.buffer.avoidCurrentTimeRangePruning){for(var Pn=0;Pn<wt.length;Pn++)if(wt.start(Pn)<=We&&We<=wt.end(Pn)&&wt.start(Pn)<=dn&&dn<=wt.end(Pn)){var Zn=dn;dn=Pn+1<wt.length?wt.start(Pn+1):wt.end(Pn)+1,o.debug("Buffered range ["+wt.start(Pn)+", "+wt.end(Pn)+"] overlaps with targetTime "+We+" and range to be pruned ["+Zn+", "+jt+"], using ["+dn+", "+jt+"] instead"+(dn<jt?"":" (no actual pruning)"));break}}return dn<wt.end(wt.length-1)?{start:dn,end:jt}:null})(xe,lt);ye&&Ge.push(ye),Te&&Ge.push(Te)}return Ge}function Pe(){(!K||Y===u.A.TEXT&&de.isTextEnabled())&&ht()}function ct(){qt()}function Ke(){qt(),z=NaN}function yt(xe,Ge){if(!H)return null;var lt,ye,Te=H.getAllBufferRanges(),We=0,wt=0,jt=null,hn=null,En=0,dn=isNaN(Ge)?.15:Ge;if(Te!=null){for(ye=0,lt=Te.length;ye<lt;ye++)if(We=Te.start(ye),wt=Te.end(ye),jt===null)En=Math.abs(We-xe),(xe>=We&&xe<wt||En<=dn)&&(jt=We,hn=wt);else{if(!((En=We-hn)<=dn))break;hn=wt}if(jt!==null)return{start:jt,end:hn}}return null}function ht(){if(P){var xe=P.getTime()||0;w&&(xe=isNaN(z)?0:z);var Ge=ge.get().streaming.gaps.jumpGaps&&!isNaN(ge.get().streaming.gaps.smallGapLimit)?ge.get().streaming.gaps.smallGapLimit:NaN;p=Math.max((function(lt,ye){var Te;return ge.get().streaming.gaps.jumpGaps&&(ye=ge.get().streaming.gaps.smallGapLimit),(Te=yt(lt,ye))===null?0:Te.end-lt})(xe,Ge),0),Fe(i.A.BUFFER_LEVEL_UPDATED,{mediaType:Y,bufferLevel:p}),qt()}}function dt(){var xe=F>=U-1,Ge=P.getTimeToStreamEnd($)-p<1e-5;!xe&&!Ge||l||(Kt(!0),o.debug("checkIfBufferingCompleted trigger BUFFERING_COMPLETED for stream id ".concat($.id," and type ").concat(Y)))}function qt(){Y!==u.A.AUDIO&&Y!==u.A.VIDEO||((!P.getLowLatencyModeEnabled()&&p<ge.get().streaming.buffer.stallThreshold||p===0)&&!l?Yt(_.A.BUFFER_EMPTY):(l||p>=ge.get().streaming.buffer.stallThreshold||P.getLowLatencyModeEnabled()&&p>0)&&Yt(_.A.BUFFER_LOADED))}function Yt(xe){k===xe||xe===_.A.BUFFER_EMPTY&&P.getTime()===0||Y===u.A.TEXT&&!de.isTextEnabled()||(k=xe,Fe(i.A.BUFFER_LEVEL_STATE_CHANGED,{state:xe}),Fe(xe===_.A.BUFFER_LOADED?i.A.BUFFER_LOADED:i.A.BUFFER_EMPTY),o.debug(xe===_.A.BUFFER_LOADED?"Got enough buffer to start":"Waiting for more buffer before starting playback"))}function sn(){H&&Y!==u.A.TEXT&&(l||ke(ln()))}function ln(){var xe=[],Ge=H.getAllBufferRanges();if(!Ge||Ge.length===0)return xe;var lt=P.getTime(),ye=Math.max(0,lt-ge.get().streaming.buffer.bufferToKeep),Te=L.getRequests({state:J.FRAGMENT_MODEL_EXECUTED,time:lt,threshold:ft})[0];if(Te)ye=Math.min(Te.startTime,ye);else if(lt===0&&P.getIsDynamic())return[];if(Ge.start(0)<=ye){for(var We={start:0,end:ye},wt=0;wt<Ge.length&&Ge.end(wt)<=ye;wt++)We.end=Ge.end(wt);We.start<We.end&&xe.push(We)}return xe}function ke(xe){return new Promise((function(Ge,lt){if(xe&&H&&xe.length!==0){var ye=[];xe.forEach((function(Te){ye.push((function(We){return new Promise((function(wt,jt){We.resolve=wt,We.reject=jt,Z.push(We)}))})(Te))})),he||ut(),Promise.all(ye).then((function(){Ge()})).catch((function(Te){lt(Te)}))}else Ge()}))}function ut(){try{if(Z.length===0||!H)return o.debug("Nothing to prune, halt pruning"),Z=[],void(he=!1);var xe=H.getBuffer();if(!xe||!xe.buffered||xe.buffered.length===0)return o.debug("SourceBuffer is empty (or does not exist), halt pruning"),Z=[],void(he=!1);var Ge=Z.shift();o.debug("".concat(Y,": Removing buffer from: ").concat(Ge.start," to ").concat(Ge.end)),he=!0,P.getTime()<Ge.end&&Kt(!1),H.remove(Ge).then((function(lt){tt(lt)})).catch((function(lt){tt(lt)}))}catch{he=!1}}function tt(xe){o.debug("onRemoved buffer from:",xe.from,"to",xe.to),H&&(Ze(H.getAllBufferRanges()),Z.length===0&&(he=!1,ht()),xe.unintended&&(o.warn("Detected unintended removal from:",xe.from,"to",xe.to,"setting streamprocessor time to",xe.from),Fe(i.A.SEEK_TARGET,{time:xe.from})),he?ut():(K?K=!1:ht(),Fe(i.A.BUFFER_CLEARED,{from:xe.from,to:xe.to,unintended:xe.unintended,hasEnoughSpaceToAppend:Ot(),quotaExceeded:oe})))}function gt(xe){return new Promise((function(Ge){xe&&xe.MSETimeOffset!==void 0&&H&&H.updateTimestampOffset?H.updateTimestampOffset(xe.MSETimeOffset).then((function(){Ge()})).catch((function(){Ge()})):Ge()}))}function Dt(){return H&&!l?H.updateAppendWindow($):Promise.resolve()}function Vt(){++ie*(ge.get().streaming.wallclockTimeUpdateInterval/1e3)>=ge.get().streaming.buffer.bufferPruningInterval&&(ie=0,sn())}function Gt(){qt()}function Kt(xe){(l=xe)?Fe(i.A.BUFFERING_COMPLETED):U=Number.POSITIVE_INFINITY}function Zt(){try{var xe,Ge,lt=H.getAllBufferRanges(),ye=0;if(!lt)return ye;for(Ge=0,xe=lt.length;Ge<xe;Ge++)ye+=lt.end(Ge)-lt.start(Ge);return ye}catch{return 0}}function pt(xe){try{var Ge=xe,lt=H.getAllBufferRanges();if(!lt||lt.length===0)return NaN;for(var ye=0;Ge===xe&&ye<lt.length;){var Te=lt.start(ye),We=lt.end(ye);Ge>=Te&&Ge<=We&&(Ge=We),ye+=1}return Ge===xe?NaN:Ge}catch{}}function Ot(){var xe=Zt();return isNaN(xe)||xe<C}function Fe(xe,Ge){var lt=Ge||{};N.trigger(xe,lt,{streamId:$.id,mediaType:Y})}function st(xe,Ge){if(C=Number.POSITIVE_INFINITY,k=void 0,U=Number.POSITIVE_INFINITY,F=0,se=null,l=!1,he=!1,oe=!1,p=0,ie=0,Z=[],z=NaN,w=!1,H){var lt=H;H=null,xe||Ge||lt.abort().then((function(){lt.reset(Ge),lt=null}))}K=!1}return e={initialize:function(xe){ve(xe),N.on(i.A.INIT_FRAGMENT_LOADED,Me,e),N.on(i.A.MEDIA_FRAGMENT_LOADED,Qe,e),N.on(i.A.WALLCLOCK_TIME_UPDATED,Vt,e),N.on(r.A.PLAYBACK_PLAYING,Ke,e),N.on(r.A.PLAYBACK_PROGRESS,Pe,e),N.on(r.A.PLAYBACK_TIME_UPDATED,Pe,e),N.on(r.A.PLAYBACK_RATE_CHANGED,Gt,e),N.on(r.A.PLAYBACK_STALLED,ct,e)},getStreamId:function(){return $.id},getType:function(){return Y},getBufferControllerType:function(){return At},createBufferSink:Ce,dischargePreBuffer:function(){if(H&&B&&typeof B.discharge=="function"){var xe=B.getAllBufferRanges();if(xe.length>0){for(var Ge="Beginning "+Y+"PreBuffer discharge, adding buffer for:",lt=0;lt<xe.length;lt++)Ge+=" start: "+xe.start(lt)+", end: "+xe.end(lt)+";";o.debug(Ge)}else o.debug("PreBuffer discharge requested, but there were no media segments in the PreBuffer.");j=[];for(var ye=B.discharge(),Te=null,We=0;We<ye.length;We++){var wt=ye[We];if(wt.segmentType!==je.G.INIT_SEGMENT_TYPE){var jt=te.extract(wt.streamId,wt.representationId);jt&&Te!==jt&&(j.push(jt),H.append(jt),Te=jt)}j.push(wt),H.append(wt)}B.reset(),B=null}},getBuffer:function(){return H},getBufferLevel:function(){return p},getRangeAt:yt,hasBufferAtTime:function(xe){try{var Ge=H.getAllBufferRanges();if(!Ge||Ge.length===0)return!1;for(var lt=0;lt<Ge.length;){var ye=Ge.start(lt),Te=Ge.end(lt);if(xe>=ye&&xe<=Te)return!0;lt+=1}return!1}catch(We){return o.error(We),!1}},pruneBuffer:sn,setMediaSource:ve,getMediaSource:function(){return b},appendInitSegmentFromCache:function(xe){var Ge=te.extract($.id,xe);return!!Ge&&(o.info("Append Init fragment",Y," with representationId:",Ge.representationId," and quality:",Ge.quality,", data size:",Ge.bytes.byteLength),$e(Ge),!0)},getIsBufferingCompleted:function(){return l},setIsBufferingCompleted:Kt,getIsPruningInProgress:function(){return he},reset:function(xe,Ge){N.off(i.A.INIT_FRAGMENT_LOADED,Me,this),N.off(i.A.MEDIA_FRAGMENT_LOADED,Qe,this),N.off(i.A.WALLCLOCK_TIME_UPDATED,Vt,this),N.off(r.A.PLAYBACK_PLAYING,Ke,this),N.off(r.A.PLAYBACK_PROGRESS,Pe,this),N.off(r.A.PLAYBACK_TIME_UPDATED,Pe,this),N.off(r.A.PLAYBACK_RATE_CHANGED,Gt,this),N.off(r.A.PLAYBACK_STALLED,ct,this),st(xe,Ge)},prepareForPlaybackSeek:function(){return l&&Kt(!1),H.abort()},prepareForReplacementTrackSwitch:function(xe){return new Promise((function(Ge,lt){H.abort().then((function(){return Dt()})).then((function(){return ge.get().streaming.buffer.useChangeTypeForTrackSwitch?H.changeType(xe):Promise.resolve()})).then((function(){return Nt()})).then((function(){Kt(!1),Ge()})).catch((function(ye){lt(ye)}))}))},prepareForNonReplacementTrackSwitch:function(xe){return new Promise((function(Ge,lt){Dt().then((function(){return ge.get().streaming.buffer.useChangeTypeForTrackSwitch?H.changeType(xe):Promise.resolve()})).then((function(){Ge()})).catch((function(ye){lt(ye)}))}))},prepareForForceReplacementQualitySwitch:function(xe){return new Promise((function(Ge,lt){H.abort().then((function(){return Dt()})).then((function(){return Nt()})).then((function(){return gt(xe)})).then((function(){Kt(!1),Ge()})).catch((function(ye){lt(ye)}))}))},updateAppendWindow:Dt,getAllRangesWithSafetyFactor:Ee,getContinuousBufferTimeForTargetTime:pt,clearBuffers:ke,pruneAllSafely:Nt,updateBufferTimestampOffset:gt,setSeekTarget:function(xe){z=xe},segmentRequestingCompleted:function(xe){isNaN(xe)||(U=xe,dt())}},o=(0,g.A)(f).getInstance().getLogger(e),te=Oe(f).getInstance(),st(),e}Rt.__dashjs_factory_name=At;var Pt=h.A.getClassFactory(Rt),ee="NotFragmentedTextBufferController";function ae(t){t=t||{};var e,o,l,p,C,b,F=this.context,U=(0,y.A)(F).getInstance(),H=t.textController,B=t.errHandler,w=t.streamInfo,j=t.type;function k(he){p=he}function se(he){var oe,te;o!==he&&(o=he)&&(oe=i.A.BUFFERING_COMPLETED,te={},U.trigger(oe,te,{streamId:w.id,mediaType:j}))}function ie(he){he.chunk.bytes&&!o&&(b.save(he.chunk),C.append(he.chunk),se(!0))}return e={initialize:function(he){k(he)},getStreamId:function(){return w.id},getType:function(){return j},getBufferControllerType:function(){return ee},createBufferSink:function(he){return new Promise((function(oe,te){try{(C=Ne(F).create({mediaSource:p,textController:H,eventBus:U})).initializeForFirstUse(w,he),l||(C.getBuffer()&&typeof C.getBuffer().initialize=="function"&&C.getBuffer().initialize(),l=!0),oe(C)}catch(Z){B.error(new pe.A(me.MEDIASOURCE_TYPE_UNSUPPORTED_CODE,me.MEDIASOURCE_TYPE_UNSUPPORTED_MESSAGE+j)),te(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(he){return b.extract(w.id,he)!==null},getIsBufferingCompleted:function(){return o},setIsBufferingCompleted:se,getIsPruningInProgress:function(){return!1},reset:function(he){U.off(i.A.INIT_FRAGMENT_LOADED,ie,e),!he&&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=Oe(F).getInstance(),U.on(i.A.INIT_FRAGMENT_LOADED,ie,e),e}ae.__dashjs_factory_name=ee;var qe=h.A.getClassFactory(ae);function v(t){t=t||{};var e,o,l,p,C,b,F,U,H,B,w,j,k,se=this.context,ie=(0,y.A)(se).getInstance(),he=t.dashMetrics,oe=t.mediaPlayerModel,te=t.fragmentModel,Z=t.abrController,K=t.playbackController,z=t.textController,f=t.type,N=t.bufferController,S=t.representationController,L=t.settings;function R(){j=!0}function V(){j=!1}function de(Qe){if(!N.getIsBufferingCompleted()){ue();var $e=isNaN(Qe)?0:Qe;C=setTimeout(P,$e)}}function ue(){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 ue();if((function(){try{return!!j&&S.getCurrentRepresentationInfo()&&(isNaN(H)||B||(Ze=o.id,at=Z.getMaxAllowedIndexFor(f,Ze),!(!isNaN(U)&&U==at||(l.info("Top quality "+f+" index has changed from "+U+" to "+at),U=at,0)))||(function(){var Nt=S.getCurrentRepresentationInfo();return!f||!Nt||he.getCurrentBufferLevel(f)<$()})())}catch{return!1}var Ze,at})()){var Qe=!1;k&&(Qe=Z.checkPlaybackQuality(f,o.id)),Qe||($e=S.getCurrentRepresentationInfo(),w||$e.quality!==H||B?(B?(l.debug("Switch track for "+f+", representation id = "+$e.id),B=!1):l.debug("Quality has changed, get init request for representationid = "+$e.id),ie.trigger(i.A.INIT_FRAGMENT_NEEDED,{representationId:$e.id,sender:e},{streamId:o.id,mediaType:f}),k=!1,w=!1):(l.debug("Media segment needed for ".concat(f," and stream id ").concat(o.id)),ie.trigger(i.A.MEDIA_FRAGMENT_NEEDED,{},{streamId:o.id,mediaType:f}),k=!0))}else de(K.getLowLatencyModeEnabled()?L.get().streaming.scheduling.lowLatencyTimeout:L.get().streaming.scheduling.defaultTimeout)}catch{de(K.getLowLatencyModeEnabled()?L.get().streaming.scheduling.lowLatencyTimeout:L.get().streaming.scheduling.defaultTimeout)}var $e}function $(){var Qe=NaN,$e=S.getCurrentRepresentationInfo();return f&&$e&&(Qe=f===u.A.TEXT?(function(){try{if(z.isTextEnabled()){var Ze=S.getCurrentRepresentationInfo();if(isNaN(Ze.fragmentDuration)){var at=he.getCurrentSchedulingInfo(_.A.SCHEDULING_INFO);return at?at.duration:0}return Ze.fragmentDuration}return 0}catch{return 0}})():f===u.A.AUDIO&&b?(function(){try{var Ze=he.getCurrentBufferLevel(u.A.VIDEO),at=S.getCurrentRepresentationInfo();return isNaN(at.fragmentDuration)?Ze+1:Math.max(Ze+1,at.fragmentDuration)}catch{return 0}})():(function(){try{var Ze=S.getCurrentRepresentationInfo().mediaInfo.streamInfo;return Z.isPlayingAtTopQuality(Ze)?Ze.manifestInfo.duration>=L.get().streaming.buffer.longFormContentDurationThreshold?L.get().streaming.buffer.bufferTimeAtTopQualityLongForm:L.get().streaming.buffer.bufferTimeAtTopQuality:oe.getStableBufferTime()}catch{return oe.getStableBufferTime()}})()),Qe}function Y(){ge(!0)}function ge(Qe){if(K&&te){var $e=te.getRequests({state:J.FRAGMENT_MODEL_EXECUTED,time:K.getTime(),threshold:0})[0];$e&&K.getTime()>=$e.startTime&&((!F.mediaInfo||$e.mediaInfo.type===F.mediaInfo.type&&$e.mediaInfo.index!==F.mediaInfo.index)&&Qe&&ie.trigger(i.A.TRACK_CHANGE_RENDERED,{mediaType:f,oldMediaInfo:F.mediaInfo,newMediaInfo:$e.mediaInfo,streamId:o.id}),$e.quality===F.quality&&$e.adaptationIndex===F.adaptationIndex||!Qe||(l.debug("Quality change rendered for streamId ".concat(o.id," and type ").concat(f)),ie.trigger(i.A.QUALITY_CHANGE_RENDERED,{mediaType:f,oldQuality:F.quality,newQuality:$e.quality,streamId:o.id})),F={mediaInfo:$e.mediaInfo,quality:$e.quality,adaptationIndex:$e.adaptationIndex})}}function ve(){te.abortRequests(),ue()}function fe(){L.get().streaming.scheduling.scheduleWhilePaused||de()}function Ce(Qe){he.updatePlayListTraceMetrics({playbackspeed:Qe.playbackRate.toString()})}function Me(){k=!0,p=0,H=NaN,F={mediaInfo:void 0,quality:NaN,adaptationIndex:NaN},U=NaN,B=!1,w=!1,j=!0}return e={initialize:function(Qe){b=Qe,ie.on(i.A.URL_RESOLUTION_FAILED,ve,e),ie.on(r.A.PLAYBACK_STARTED,fe,e),ie.on(r.A.PLAYBACK_RATE_CHANGED,Ce,e),ie.on(r.A.PLAYBACK_TIME_UPDATED,Y,e),ie.on(r.A.MANAGED_MEDIA_SOURCE_START_STREAMING,R,e),ie.on(r.A.MANAGED_MEDIA_SOURCE_END_STREAMING,V,e)},getType:function(){return f},getStreamId:function(){return o.id},setTimeToLoadDelay:function(Qe){p=Qe},getTimeToLoadDelay:function(){return p},setSwitchTrack:function(Qe){B=Qe},getSwitchTrack:function(){return B},startScheduleTimer:de,clearScheduleTimer:ue,reset:function(){ie.off(i.A.URL_RESOLUTION_FAILED,ve,e),ie.off(r.A.PLAYBACK_STARTED,fe,e),ie.off(r.A.PLAYBACK_RATE_CHANGED,Ce,e),ie.off(r.A.PLAYBACK_TIME_UPDATED,Y,e),ie.off(r.A.MANAGED_MEDIA_SOURCE_START_STREAMING,R,e),ie.off(r.A.MANAGED_MEDIA_SOURCE_END_STREAMING,V,e),ue(),ge(!1),Me(),o=null},getBufferTarget:$,getPlaybackController:function(){return K},setCheckPlaybackQuality:function(Qe){k=Qe},setInitSegmentRequired:function(Qe){w=Qe},setLastInitializedQuality:function(Qe){H=Qe}},l=(0,g.A)(se).getInstance().getLogger(e),Me(),o=t.streamInfo,e}v.__dashjs_factory_name="ScheduleController";var A=h.A.getClassFactory(v),c=M(284);function E(t){var e,o,l,p,C,b,F=(t=t||{}).eventBus,U=t.events,H=t.abrController,B=t.dashMetrics,w=t.playbackController,j=t.timelineConverter,k=t.type,se=t.streamInfo,ie=t.dashConstants,he=t.segmentsController,oe=t.isDynamic,te=t.adapter;function Z(){return k}function K(){return l}function z(){return b}function f(){o=null,l=!0,p=[],C=null}function N(ue){return new Promise((function(P,$){var Y=ue.hasInitialization(),ge=ue.hasSegments(),ve=[];ve.push(he.updateInitData(ue,Y)),ve.push(he.updateSegmentData(ue,ge)),Promise.all(ve).then((function(fe){var Ce;fe[0]&&!fe[0].error&&(ue=(function(Me,Qe){return Qe&&!Qe.error&&Qe.representation?Qe.representation:Me})(ue,fe[0])),fe[1]&&!fe[1].error&&(ue=(function(Me,Qe){if(Qe&&!Qe.error){var $e,Ze,at,Nt,Ee=Qe.segments,Pe=[],ct=0;for($e=0,Ze=Ee?Ee.length:0;$e<Ze;$e++)at=Ee[$e],(Nt=(0,c.W$)(j,oe,Me,at.startTime,at.duration,at.timescale,at.media,at.mediaRange,ct))&&(Pe.push(Nt),Nt=null,ct++);return Pe.length>0&&(Me.segments=Pe),Me}})(ue,fe[1])),(Ce=ue).mediaFinishedInformation=he.getMediaFinishedInformation(Ce),(function(Me){if(K()){var Qe,$e,Ze=B.getCurrentManifestUpdate(),at=!1;if(Ze){for(var Nt=0;Nt<Ze.representationInfo.length;Nt++)if((Qe=Ze.representationInfo[Nt]).index===Me.index&&Qe.mediaType===Z()){at=!0;break}at||B.addManifestUpdateRepresentationInfo(Me,Z())}if((function(){for(var Pe=0,ct=p.length;Pe<ct;Pe++){var Ke=p[Pe].segmentInfoType;if(!p[Pe].hasInitialization()||(Ke===ie.SEGMENT_BASE||Ke===ie.BASE_URL)&&!p[Pe].segments)return!1}return!0})()){H.setPlaybackQuality(k,se,($e=b,p.indexOf($e)));var Ee=B.getCurrentDVRInfo(k);Ee&&B.updateManifestUpdateInfo({latency:Ee.range.end-w.getTime()}),B.getCurrentRepresentationSwitch(z().adaptation.type)||S(),R()}}})(ue),P()})).catch((function(fe){$(fe)}))}))}function S(){(function(){if(!(H&&B&&w&&j))throw new Error(u.A.MISSING_CONFIG_ERROR)})();var ue=new Date,P=z(),$=1e3*w.getTime();P&&B.addRepresentationSwitch(P.adaptation.type,ue,$,P.id),F.trigger(r.A.REPRESENTATION_SWITCH,{mediaType:k,streamId:se.id,currentRepresentation:P,numberOfRepresentations:p.length},{streamId:se.id,mediaType:k})}function L(ue){return ue==null||ue>=p.length?null:p[ue]}function R(ue){l=!1,F.trigger(U.DATA_UPDATE_COMPLETED,{data:o,currentRepresentation:b,error:ue},{streamId:se.id,mediaType:k})}function V(ue){b=ue,C=te.convertRepresentationToRepresentationInfo(b)}function de(ue){if(ue.newDuration){var P=z();P&&P.adaptation.period&&(P.adaptation.period.duration=ue.newDuration)}}return e={getStreamId:function(){return se.id},getType:Z,getData:function(){return o},isUpdating:K,updateData:function(ue,P,$,Y,ge){return new Promise((function(ve,fe){if(l=!0,p=P,o=ue,V(L(ge)),$!==u.A.VIDEO&&$!==u.A.AUDIO&&($!==u.A.TEXT||!Y))return R(),void ve();for(var Ce=[],Me=0,Qe=p.length;Me<Qe;Me++){var $e=p[Me];Ce.push(N($e))}Promise.all(Ce).then((function(){V(L(ge)),ve()})).catch((function(Ze){fe(Ze)}))}))},getCurrentRepresentation:z,getCurrentRepresentationInfo:function(){return C},getRepresentationForQuality:L,prepareQualityChange:function(ue){V(L(ue)),S()},reset:function(){F.off(r.A.MANIFEST_VALIDITY_CHANGED,de,e),f()}},f(),F.on(r.A.MANIFEST_VALIDITY_CHANGED,de,e),e}E.__dashjs_factory_name="RepresentationController";var Q=h.A.getClassFactory(E),D=M(7652),Be=M(2945),De=M(9913),Ae=M(2187);function Re(t,e,o){return Object.defineProperty(t,"prototype",{writable:!1}),t}function _e(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var Ye=Re((function t(){_e(this,t),this.start=null,this.mstart=null,this.starttype=null,this.trace=[]}));Ye.INITIAL_PLAYOUT_START_REASON="initial_playout",Ye.SEEK_START_REASON="seek",Ye.RESUME_FROM_PAUSE_START_REASON="resume",Ye.METRICS_COLLECTION_START_REASON="metrics_collection_start";var Ve=Re((function t(){_e(this,t),this.representationid=null,this.subreplevel=null,this.start=null,this.mstart=null,this.duration=null,this.playbackspeed=null,this.stopreason=null}));Ve.REPRESENTATION_SWITCH_STOP_REASON="representation_switch",Ve.REBUFFERING_REASON="rebuffering",Ve.USER_REQUEST_STOP_REASON="user_request",Ve.END_OF_PERIOD_STOP_REASON="end_of_period",Ve.END_OF_CONTENT_STOP_REASON="end_of_content",Ve.METRICS_COLLECTION_STOP_REASON="metrics_collection_end",Ve.FAILURE_STOP_REASON="failure";var Xe=M(6849);function nt(){return{ntpToUTC:function(t){var e=new Date(Date.UTC(1900,0,1,0,0,0));return new Date(e.getTime()+t).getTime()}}}nt.__dashjs_factory_name="TimeUtils";var Tt=h.A.getSingletonFactory(nt);function mt(t){t=t||{};var e,o,l,p,C,b,F,U,H,B,w,j,k,se,ie,he=this.context,oe=(0,y.A)(he).getInstance(),te=t.streamInfo,Z=t.type,K=t.errHandler,z=t.mimeType,f=t.timelineConverter,N=t.adapter,S=t.manifestModel,L=t.mediaPlayerModel,R=t.fragmentModel,V=t.abrController,de=t.playbackController,ue=t.mediaController,P=t.textController,$=t.dashMetrics,Y=t.settings,ge=t.boxParser,ve=t.segmentBlacklistController;function fe(){return te.id}function Ce(){return Z}function Me(){return N.getIsTextTrack(U.getData())}function Qe(){C=[],p=null,se=0,H=!1,B=!1,w=!1,ie=null}function $e(Fe){return!isNaN(Fe)&&!isNaN(te.duration)&&isFinite(te.duration)&&Fe>=te.start+te.duration}function Ze(Fe){var st=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1];if(Fe.sender){if(de.getIsManifestUpdateInProgress())Nt();else if((!Me()||P.isTextEnabled())&&b&&Fe.representationId&&!b.appendInitSegmentFromCache(Fe.representationId)){var xe=U.getCurrentRepresentation();if(xe.range===0)return void at();var Ge=j?j.getInitRequest(p,xe):null;Ge?R.executeRequest(Ge):st&&(F.setInitSegmentRequired(!0),Nt())}}}function at(Fe){var st=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1];if(de.getIsManifestUpdateInProgress()||b.getIsPruningInProgress())Nt();else{var xe=(function(){var Ge,lt=gt();if(isNaN(se)||Ce()===u.A.TEXT&&!P.isTextEnabled())return null;if(j){var ye=U&&lt?U.getRepresentationForQuality(lt.quality):null;Ge=H?j.getSegmentRequestForTime(p,ye,se):B?j.repeatSegmentRequest(p,ye):j.getNextSegmentRequest(p,ye)}return Ge})();xe?(H=!1,B=!1,(function(Ge){isNaN(Ge.startTime+Ge.duration)||(se=Ge.startTime+Ge.duration),Ge.delayLoadingTime=new Date().getTime()+F.getTimeToLoadDelay(),F.setTimeToLoadDelay(0),(function(lt){var ye=lt.url;return lt.range&&(ye=ye.concat("_",lt.range)),ve.contains(ye)})(Ge)?(o.warn("Fragment request url ".concat(Ge.url," for stream id ").concat(te.id," and media type ").concat(Z," is on the ignore list and will be skipped")),Nt()):(o.debug("Next fragment request url for stream id ".concat(te.id," and media type ").concat(Z," is ").concat(Ge.url)),R.executeRequest(Ge))})(xe)):(function(Ge){var lt,ye=U.getCurrentRepresentation();if(Y.get().streaming.gaps.enableSeekFix&&(H||de.getTime()===0)&&(l?l&&ye.segmentInfoType===n.A.SEGMENT_TIMELINE&&(lt=j.getValidTimeAheadOfTargetTime(se,p,ye,Y.get().streaming.gaps.threshold)):lt=j.getValidTimeAheadOfTargetTime(se,p,ye,Y.get().streaming.gaps.threshold),!isNaN(lt)&&lt!==se))return void(de.isSeeking()||de.getTime()===0?(o.warn("Adjusting playback time ".concat(lt," because of gap in the manifest. Seeking by ").concat(lt-se)),de.seek(lt,!1,!1)):(o.warn("Adjusting buffering time ".concat(lt," because of gap in the manifest. Adjusting time by ").concat(lt-se)),Ot(lt),Ge&&Nt()));if(j.isLastSegmentRequested(ye,se)){var Te=j.getCurrentIndex();return o.debug("Segment requesting for stream ".concat(te.id," has finished")),oe.trigger(i.A.STREAM_REQUESTING_COMPLETED,{segmentIndex:Te},{streamId:te.id,mediaType:Z}),b.segmentRequestingCompleted(Te),void F.clearScheduleTimer()}Ge&&Nt()})(st)}}function Nt(){F.startScheduleTimer(de.getLowLatencyModeEnabled()?Y.get().streaming.scheduling.lowLatencyTimeout:Y.get().streaming.scheduling.defaultTimeout)}function Ee(Fe){Fe.error||b.getIsBufferingCompleted()||b.updateBufferTimestampOffset(Fe.currentRepresentation)}function Pe(Fe){$.addBufferState(Z,Fe.state,F.getBufferTarget()),Fe.state!==_.A.BUFFER_EMPTY||de.isSeeking()||(o.info("Buffer is empty! Stalling!"),$.pushPlayListTraceMetrics(new Date,Ve.REBUFFERING_REASON))}function ct(Fe){R.syncExecutedRequestsWithBufferedRange(b.getBuffer().getAllBufferRanges(),te.duration),Fe.quotaExceeded&&Fe.from>de.getTime()&&Ot(Fe.from),Fe.hasEnoughSpaceToAppend&&Fe.quotaExceeded&&F.startScheduleTimer()}function Ke(Fe){if(Fe&&Fe.lastRequestAppended&&Fe.lastRequestAppended.url){var st=Fe.lastRequestAppended.url;Fe.lastRequestAppended.range&&(st=st.concat("_",Fe.lastRequestAppended.range)),o.warn("Blacklisting segment with url ".concat(st)),ve.add(st)}}function yt(Fe){if(o.debug("Appended bytes for ".concat(Fe.mediaType," and stream id ").concat(Fe.streamId)),Fe.segmentType===je.G.INIT_SEGMENT_TYPE){var st=Fe.quality;F.setLastInitializedQuality(st),o.info("["+Z+"] lastInitializedRepresentationInfo changed to "+Fe.quality)}ie?ht(ie):F.startScheduleTimer(0)}function ht(Fe){var st=R.getRequests({state:J.FRAGMENT_MODEL_LOADING});if(st&&st.length>0)return o.debug("Preparing for default quality switch: Waiting for ongoing segment request to be finished before applying switch."),void(ie=Fe);b.updateBufferTimestampOffset(Fe).then((function(){F.setCheckPlaybackQuality(!1),p.segmentAlignment||p.subSegmentAlignment?F.startScheduleTimer():Zt(),ie=null,w=!1})).catch((function(){ie=null,w=!1}))}function dt(Fe){o.info("onFragmentLoadingAbandoned request: "+Fe.request.url+" has been aborted"),de.isSeeking()||F.getSwitchTrack()||w||(o.info("onFragmentLoadingAbandoned request: "+Fe.request.url+" has to be downloaded again, origin is not seeking process or switch track call"),Fe.request&&Fe.request.isInitializationRequest()?F.setInitSegmentRequired(!0):Ot(Fe.request.startTime+Fe.request.duration/2),F.startScheduleTimer(0))}function qt(Fe){o.info("OnFragmentLoadingCompleted for stream id "+te.id+" and media type "+Z+" - Url:",Fe.request?Fe.request.url:"undefined",Fe.request.range?", Range:"+Fe.request.range:""),Me()&&F.startScheduleTimer(0),Fe.error&&Fe.request.serviceLocation&&(function(st){o.info("Fragment loading completed with an error"),st&&st.request&&st.request.type&&(st.request.type===je.G.INIT_SEGMENT_TYPE?Ze({representationId:st.request.representationId,sender:{}},!1):st.request.type===je.G.MEDIA_SEGMENT_TYPE&&(Ot(st.request.startTime+st.request.duration/2),at({},!1)))})(Fe)}function Yt(){Ot(de.getTime()),tt().startScheduleTimer()}function sn(Fe){var st=Fe.currentTrackInfo;if(st){var xe=C.find((function(Ge){return Ge.index===st.index&&Ge.lang===st.lang}));xe&&ut(xe).then((function(){b.setIsBufferingCompleted(!1),Ot(de.getTime()),F.setInitSegmentRequired(!0),F.startScheduleTimer()}))}}function ln(Fe){Ot(Fe.quotaExceededTime),F.clearScheduleTimer()}function ke(){return b?b.getBuffer():null}function ut(Fe){Fe===p||Fe&&p&&Fe.type!==p.type||(p=Fe);var st=N.getRealAdaptation(te,p),xe=N.getVoRepresentations(p);if(U){var Ge,lt=U.getData(),ye=V.getMaxAllowedIndexFor(Z,te.id),Te=V.getMinAllowedIndexFor(Z,te.id),We=null;return lt!==null&&lt.id===st.id||Z===u.A.TEXT?Ge=V.getQualityFor(Z,te.id):(We=V.getThroughputHistory().getAverageThroughput(Z,l)||V.getInitialBitrateFor(Z,te.id),Ge=V.getQualityForBitrate(p,We,te.id)),Te!==void 0&&Ge<Te&&(Ge=Te),Ge>ye&&(Ge=ye),U.updateData(st,xe,Z,p.isFragmented,Ge)}return Promise.resolve()}function tt(){return F}function gt(Fe){var st;return Fe!==void 0?((0,D.zQ)(Fe),st=U?U.getRepresentationForQuality(Fe):null):st=U?U.getCurrentRepresentation():null,N.convertRepresentationToRepresentationInfo(st)}function Dt(){return!!b&&b.getIsBufferingCompleted()}function Vt(Fe){if(Y.get().streaming.enableManifestTimescaleMismatchFix){var st=Fe.chunk,xe=st.bytes,Ge=gt(st.quality),lt=U&&Ge?U.getRepresentationForQuality(Ge.quality):null;Ge&&lt&&(lt.timescale=ge.getMediaTimescaleFromMoov(xe))}}function Gt(Fe){var st=Fe.chunk,xe=st.bytes,Ge=st.quality,lt=gt(Ge),ye=U&&lt?U.getRepresentationForQuality(lt.quality):null;if(lt&&ye){var Te;if(Y.get().streaming.parseInbandPrft&&Fe.request.type===je.G.MEDIA_SEGMENT_TYPE){var We=(function(dn,qn){var Pn=dn.getBoxes("prft"),Zn=[];return Pn.forEach((function(Rr){Zn.push((function(ir,fr){var er="unknown";switch(ir.flags){case 0:er=n.A.PRODUCER_REFERENCE_TIME_TYPE.ENCODER;break;case 16:er=n.A.PRODUCER_REFERENCE_TIME_TYPE.APPLICATION;break;case 24:er=n.A.PRODUCER_REFERENCE_TIME_TYPE.CAPTURED}var wr=1e3*ir.ntp_timestamp_sec+ir.ntp_timestamp_frac/Math.pow(2,32)*1e3;return{type:er,ntpTimestamp:wr=Tt(he).getInstance().ntpToUTC(wr),mediaTime:ir.media_time/fr}})(Rr,qn))})),Zn})(Te=Te||ge.parse(xe),ye.timescale);We&&We.length&&oe.trigger(r.A.INBAND_PRFT,{data:We},{streamId:te.id,mediaType:Z})}var wt=N.getEventsFor(lt.mediaInfo,null,te),jt=N.getEventsFor(lt,ye,te);if(wt&&wt.length>0||jt&&jt.length>0){var hn=R.getRequests({state:J.FRAGMENT_MODEL_EXECUTED,quality:Ge,index:st.index})[0],En=(function(dn,qn,Pn,Zn){try{for(var Rr={},ir=[],fr=Pn.concat(Zn),er=0,wr=fr.length;er<wr;er++)Rr[fr[er].schemeIdUri+"/"+fr[er].value]=fr[er];var dr=dn.getBoxes("emsg");if(!dr||dr.length===0)return ir;for(var pr=dn.getBox("sidx"),Li=!pr||isNaN(pr.earliest_presentation_time)||isNaN(pr.timescale)?qn&&!isNaN(qn.mediaStartTime)?qn.mediaStartTime:0:pr.earliest_presentation_time/pr.timescale,Ar=Math.max(Li,0),fi=U.getCurrentRepresentation(),jr=0,Fi=dr.length;jr<Fi;jr++){var Nr=N.getEvent(dr[jr],Rr,Ar,fi);Nr&&ir.push(Nr)}return ir}catch{return[]}})(Te=Te||ge.parse(xe),hn,wt,jt);oe.trigger(i.A.INBAND_EVENTS,{events:En},{streamId:te.id})}}}function Kt(){var Fe=de.getTime();Y.get().streaming.buffer.flushBufferAtTrackSwitch&&de.seek(Fe+.001,!1,!0),Ot(Fe),b.setSeekTarget(Fe),F.startScheduleTimer()}function Zt(){var Fe=de.getTime(),st=b.getContinuousBufferTimeForTargetTime(Fe);Ot(isNaN(st)?Fe:st),F.startScheduleTimer()}function pt(Fe){Fe&&!isNaN(Fe.time)&&(Ot(Fe.time),b.setSeekTarget(Fe.time))}function Ot(Fe){se=Fe,H=!0}return e={initialize:function(Fe,st,xe){k=(0,Xe.A)(he).create({events:i.A,eventBus:oe,streamInfo:te,timelineConverter:f,dashConstants:n.A,segmentBaseController:t.segmentBaseController,type:Z}),j=(0,Be.A)(he).create({streamInfo:te,type:Z,timelineConverter:f,dashMetrics:$,mediaPlayerModel:L,baseURLController:t.baseURLController,errHandler:K,segmentsController:k,settings:Y,boxParser:ge,events:i.A,eventBus:oe,errors:me,debug:(0,g.A)(he).getInstance(),requestModifier:(0,De.A)(he).getInstance(),dashConstants:n.A,constants:u.A,urlUtils:(0,Ae.A)(he).getInstance()}),l=te.manifestInfo.isDynamic,j.initialize(l),V.registerStreamType(Z,e),U=Q(he).create({streamInfo:te,type:Z,abrController:V,dashMetrics:$,playbackController:de,timelineConverter:f,dashConstants:n.A,events:i.A,eventBus:oe,errors:me,isDynamic:l,adapter:N,segmentsController:k}),b=(function(Ge,lt){return Ge?Ge!==u.A.TEXT||lt?Pt(he).create({streamInfo:te,type:Ge,mediaPlayerModel:L,manifestModel:S,fragmentModel:R,errHandler:K,mediaController:ue,representationController:U,adapter:N,textController:P,abrController:V,playbackController:de,settings:Y}):qe(he).create({streamInfo:te,type:Ge,mimeType:z,fragmentModel:R,textController:P,errHandler:K,settings:Y}):(K.error(new pe.A(me.MEDIASOURCE_TYPE_UNSUPPORTED_CODE,me.MEDIASOURCE_TYPE_UNSUPPORTED_MESSAGE+"not properly defined")),null)})(Z,xe),b&&b.initialize(Fe),(F=A(he).create({streamInfo:te,type:Z,mimeType:z,adapter:N,dashMetrics:$,mediaPlayerModel:L,fragmentModel:R,abrController:V,playbackController:de,textController:P,mediaController:ue,bufferController:b,representationController:U,settings:Y})).initialize(st),se=0,H=!1,B=!1},getStreamId:fe,getType:Ce,isUpdating:function(){return!!U&&U.isUpdating()},getBufferController:function(){return b},dischargePreBuffer:function(){b.dischargePreBuffer()},getFragmentModel:function(){return R},getScheduleController:tt,getRepresentationController:function(){return U},getRepresentationInfo:gt,getBufferLevel:function(){return b?b.getBufferLevel():0},isBufferingCompleted:Dt,createBufferSinks:function(Fe){var st=ke();return st?Promise.resolve(st):b?b.createBufferSink(p,Fe):Promise.resolve(null)},updateStreamInfo:function(Fe){return te=Fe,Dt()?Promise.resolve():b.updateAppendWindow()},getStreamInfo:function(){return te},selectMediaInfo:ut,clearMediaInfoArray:function(){C=[]},addMediaInfo:function(Fe){C.indexOf(Fe)===-1&&C.push(Fe)},prepareTrackSwitch:function(){return new Promise((function(Fe){o.debug("Preparing track switch for type ".concat(Z));var st=Z===u.A.TEXT||Y.get().streaming.trackSwitchMode[Z]===u.A.TRACK_SWITCH_MODE_ALWAYS_REPLACE&&de.getTimeToStreamEnd(te)>Y.get().streaming.buffer.stallThreshold;if(b.getIsBufferingCompleted()&&!st)return b.prepareForNonReplacementTrackSwitch(p.codec).then((function(){oe.trigger(i.A.BUFFERING_COMPLETED,{},{streamId:te.id,mediaType:Z})})).catch((function(){oe.trigger(i.A.BUFFERING_COMPLETED,{},{streamId:te.id,mediaType:Z})})),void Fe();F.clearScheduleTimer(),F.setSwitchTrack(!0),st?(oe.trigger(i.A.BUFFER_REPLACEMENT_STARTED,{mediaType:Z,streamId:te.id},{mediaType:Z,streamId:te.id}),R.abortRequests(),b.prepareForReplacementTrackSwitch(p.codec).then((function(){var xe=gt();return b.updateBufferTimestampOffset(xe)})).then((function(){Kt(),Fe()})).catch((function(){Kt(),Fe()}))):b.prepareForNonReplacementTrackSwitch(p.codec).then((function(){Zt(),Fe()})).catch((function(){Zt(),Fe()}))}))},prepareQualityChange:function(Fe){ie&&o.warn("Canceling queued representation switch to ".concat(ie.quality," for ").concat(Z)),o.debug("Preparing quality switch for type ".concat(Z));var st=Fe.newQuality;w=!0,F.clearScheduleTimer(),U.prepareQualityChange(st);var xe=gt(st);Fe.reason&&Fe.reason.forceReplace?(function(Ge){R.abortRequests(),oe.trigger(i.A.BUFFER_REPLACEMENT_STARTED,{mediaType:Z,streamId:te.id},{mediaType:Z,streamId:te.id}),F.setCheckPlaybackQuality(!1),b.prepareForForceReplacementQualitySwitch(Ge).then((function(){Kt(),ie=null,w=!1})).catch((function(){Kt(),ie=null,w=!1}))})(xe):Fe&&Fe.reason&&Fe.reason.forceAbandon?(function(Ge){b.updateBufferTimestampOffset(Ge).then((function(){R.abortRequests(),B=!0,F.setCheckPlaybackQuality(!1),F.startScheduleTimer(),w=!1,ie=null})).catch((function(){ie=null,w=!1}))})(xe):Y.get().streaming.buffer.fastSwitchEnabled?(function(Ge){var lt=de.getTime(),ye=1.5*(isNaN(Ge.fragmentDuration)?1:Ge.fragmentDuration),Te=R.getRequests({state:J.FRAGMENT_MODEL_EXECUTED,time:lt+ye,threshold:0})[0];if(Te&&!Me()){var We=b.getBufferLevel(),wt=V.getAbandonmentStateFor(te.id,Z);Te.quality<Ge.quality&&We>=ye&&wt!==_.A.ABANDON_LOAD?b.updateBufferTimestampOffset(Ge).then((function(){R.abortRequests(),Ot(lt+ye),F.setCheckPlaybackQuality(!1),F.startScheduleTimer(),w=!1})).catch((function(){w=!1})):ht(Ge)}else ht(Ge)})(xe):ht(xe),$.pushPlayListTraceMetrics(new Date,Ve.REPRESENTATION_SWITCH_STOP_REASON),$.createPlaylistTraceMetrics(xe.id,1e3*de.getTime(),de.getPlaybackRate())},getMediaInfo:function(){return p},getMediaSource:function(){return b.getMediaSource()},setMediaSource:function(Fe){return b.setMediaSource(Fe,p)},getBuffer:ke,setExplicitBufferingTime:Ot,finalisePlayList:function(Fe,st){$.pushPlayListTraceMetrics(Fe,st)},probeNextRequest:function(){var Fe=gt(),st=U&&Fe?U.getRepresentationForQuality(Fe.quality):null;return j.getNextSegmentRequestIdempotent(p,st)},prepareInnerPeriodPlaybackSeeking:function(Fe){return new Promise((function(st){if(b.hasBufferAtTime(Fe.seekTime))return b.pruneBuffer(),$e(b.getContinuousBufferTimeForTargetTime(Fe.seekTime))&&b.setIsBufferingCompleted(!0),void st();F.clearScheduleTimer(),R.abortRequests(),b.prepareForPlaybackSeek().then((function(){var xe=b.getAllRangesWithSafetyFactor(Fe.seekTime);return b.clearBuffers(xe)})).then((function(){var xe=b.getContinuousBufferTimeForTargetTime(Fe.seekTime);if($e(xe))b.setIsBufferingCompleted(!0),st();else{var Ge=isNaN(xe)?Fe.seekTime:xe;Ot(Ge),b.setSeekTarget(Ge);var lt=[];lt.push(b.updateAppendWindow());var ye=gt();lt.push(b.updateBufferTimestampOffset(ye)),Promise.all(lt).then((function(){F.setInitSegmentRequired(!0),F.setCheckPlaybackQuality(!1),F.startScheduleTimer(),st()}))}})).catch((function(xe){o.error(xe)}))}))},prepareOuterPeriodPlaybackSeeking:function(){return new Promise((function(Fe,st){try{F.clearScheduleTimer(),R.abortRequests(),b.prepareForPlaybackSeek().then((function(){return b.pruneAllSafely()})).then((function(){Fe()}))}catch(xe){st(xe)}}))},reset:function(Fe,st){j&&j.reset(),b&&(b.reset(Fe,st),b=null),F&&(F.reset(),F=null),U&&(U.reset(),U=null),k&&(k=null),V&&V.unRegisterStreamType(fe(),Z),oe.off(i.A.DATA_UPDATE_COMPLETED,Ee,e),oe.off(i.A.INIT_FRAGMENT_NEEDED,Ze,e),oe.off(i.A.MEDIA_FRAGMENT_NEEDED,at,e),oe.off(i.A.INIT_FRAGMENT_LOADED,Vt,e),oe.off(i.A.MEDIA_FRAGMENT_LOADED,Gt,e),oe.off(i.A.BUFFER_LEVEL_STATE_CHANGED,Pe,e),oe.off(i.A.BUFFER_CLEARED,ct,e),oe.off(i.A.SEEK_TARGET,pt,e),oe.off(i.A.FRAGMENT_LOADING_ABANDONED,dt,e),oe.off(i.A.FRAGMENT_LOADING_COMPLETED,qt,e),oe.off(i.A.SET_FRAGMENTED_TEXT_AFTER_DISABLED,Yt,e),oe.off(i.A.SET_NON_FRAGMENTED_TEXT,sn,e),oe.off(i.A.QUOTA_EXCEEDED,ln,e),oe.off(i.A.SOURCE_BUFFER_ERROR,Ke,e),oe.off(i.A.BYTES_APPENDED_END_FRAGMENT,yt,e),Qe(),Z=null,te=null}},o=(0,g.A)(he).getInstance().getLogger(e),Qe(),oe.on(i.A.DATA_UPDATE_COMPLETED,Ee,e,{priority:y.A.EVENT_PRIORITY_HIGH}),oe.on(i.A.INIT_FRAGMENT_NEEDED,Ze,e),oe.on(i.A.MEDIA_FRAGMENT_NEEDED,at,e),oe.on(i.A.INIT_FRAGMENT_LOADED,Vt,e),oe.on(i.A.MEDIA_FRAGMENT_LOADED,Gt,e),oe.on(i.A.BUFFER_LEVEL_STATE_CHANGED,Pe,e),oe.on(i.A.BUFFER_CLEARED,ct,e),oe.on(i.A.SEEK_TARGET,pt,e),oe.on(i.A.FRAGMENT_LOADING_ABANDONED,dt,e),oe.on(i.A.FRAGMENT_LOADING_COMPLETED,qt,e),oe.on(i.A.QUOTA_EXCEEDED,ln,e),oe.on(i.A.SET_FRAGMENTED_TEXT_AFTER_DISABLED,Yt,e),oe.on(i.A.SET_NON_FRAGMENTED_TEXT,sn,e),oe.on(i.A.SOURCE_BUFFER_ERROR,Ke,e),oe.on(i.A.BYTES_APPENDED_END_FRAGMENT,yt,e),e}mt.__dashjs_factory_name="StreamProcessor";var Ut=h.A.getClassFactory(mt);function Mt(t,e,o){return Object.defineProperty(t,"prototype",{writable:!1}),t}var zt=Mt((function t(){(function(e,o){if(!(e instanceof o))throw new TypeError("Cannot call a class as a function")})(this,t),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})),Qt=M(2930);function nn(t,e){if(t){if(typeof t=="string")return yn(t,e);var o={}.toString.call(t).slice(8,-1);return o==="Object"&&t.constructor&&(o=t.constructor.name),o==="Map"||o==="Set"?Array.from(t):o==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?yn(t,e):void 0}}function yn(t,e){(e==null||e>t.length)&&(e=t.length);for(var o=0,l=Array(e);o<e;o++)l[o]=t[o];return l}function xn(t){t=t||{};var e,o,l=this.context,p=t.requestModifier,C=t.lowLatencyThroughputModel,b=t.boxParser,F=(0,le.A)(l).getInstance();function U(w){var j,k=new Date,se=w.request,ie=new Headers;if(se.range&&ie.append("Range","bytes="+se.range),w.headers)for(var he in w.headers){var oe=w.headers[he];oe&&ie.append(he,oe)}se.requestStartDate||(se.requestStartDate=k),p&&p.modifyRequestHeader&&p.modifyRequestHeader({setRequestHeader:function(f,N){ie.append(f,N)}},{url:w.url}),typeof window.AbortController=="function"&&(j=new AbortController,w.abortController=j,j.signal.onabort=w.onabort);var te={method:w.method,headers:ie,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(se,1e3*o.getCurrentBufferLevel(se.mediaType))))return setTimeout(f,z);f()})).then((function(){var f=Date.now();fetch(w.url,te).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(yt){var ht=typeof Symbol<"u"&&yt[Symbol.iterator]||yt["@@iterator"];if(!ht){if(Array.isArray(yt)||(ht=nn(yt))){ht&&(yt=ht);var dt=0,qt=function(){};return{s:qt,n:function(){return dt>=yt.length?{done:!0}:{done:!1,value:yt[dt++]}},e:function(ke){throw ke},f:qt}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
4
4
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var Yt,sn=!0,ln=!1;return{s:function(){ht=ht.call(yt)},n:function(){var ke=ht.next();return sn=ke.done,ke},e:function(ke){ln=!0,Yt=ke},f:function(){try{sn||ht.return==null||ht.return()}finally{if(ln)throw Yt}}}})(N.headers.keys());try{for(R.s();!(S=R.n()).done;){var V=S.value;L+=V+": "+N.headers.get(V)+`\r
5
5
  `}}catch(yt){R.e(yt)}finally{R.f()}if(w.response.responseHeaders=L,!N.body)return N.arrayBuffer().then((function(yt){w.response.response=yt;var ht={loaded:yt.byteLength,total:yt.byteLength,stream:!1};w.progress(ht),w.onload(),w.onend()}));var de,ue,P,$,Y=parseInt(N.headers.get("Content-Length"),10),ge=0,ve=!1,fe=new Uint8Array,Ce=0;if(Z===u.A.ABR_FETCH_THROUGHPUT_CALCULATION_AAST&&C){var Me=f,Qe=0,$e=(P=N.body.tee(),$=2,(function(yt){if(Array.isArray(yt))return yt})(P)||(function(yt,ht){var dt=yt==null?null:typeof Symbol<"u"&&yt[Symbol.iterator]||yt["@@iterator"];if(dt!=null){var qt,Yt,sn,ln,ke=[],ut=!0,tt=!1;try{if(sn=(dt=dt.call(yt)).next,ht===0){if(Object(dt)!==dt)return;ut=!1}else for(;!(ut=(qt=sn.call(dt)).done)&&(ke.push(qt.value),ke.length!==ht);ut=!0);}catch(gt){tt=!0,Yt=gt}finally{try{if(!ut&&dt.return!=null&&(ln=dt.return(),Object(ln)!==ln))return}finally{if(tt)throw Yt}}return ke}})(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.`)})()),Ze=$e[0],at=$e[1];de=Ze.getReader(),ue=[],de.read().then((function yt(ht){var dt=ht.value,qt=ht.done;if(Qe=Date.now(),dt&&dt.length){var Yt=Qe-Me,sn=dt.length;ue.push({chunkDownloadTimeRelativeMS:Qe-f,chunkDownloadDurationMS:Yt,chunkBytes:sn,kbps:Math.round(8*sn/(Yt/1e3)),bufferLevel:o.getCurrentBufferLevel(se.mediaType)})}if(qt){var ln=Qe-f,ke=ue.reduce((function(ut,tt){return ut+tt.chunkBytes}),0);return C.addMeasurement(se,ln,ue,K,z,L),void w.progress({loaded:ke,total:ke,lengthComputable:!0,time:C.getEstimatedDownloadDurationMS(se),stream:!0})}return Me=Date.now(),de.read().then(yt)})),w.reader=at.getReader()}else w.reader=N.body.getReader();var Nt=[],Ee=[],Pe=[],ct=!0,Ke=function(yt){var ht=yt.value;if(yt.done){if(fe){if(Z!==u.A.ABR_FETCH_THROUGHPUT_CALCULATION_AAST){var dt=null,qt=null;Z===u.A.ABR_FETCH_THROUGHPUT_CALCULATION_MOOF_PARSING?(dt=(function(ke,ut){try{var tt,gt;tt=ke.filter((function(Ot,Fe){return Fe<ke.length-1})),gt=ut.filter((function(Ot,Fe){return Fe<ut.length-1}));var Dt=[];if(tt.length>1){for(var Vt=0,Gt=0,Kt=0;Kt<tt.length;Kt++)if(tt[Kt]&&gt[Kt]){var Zt=gt[Kt].ts-tt[Kt].ts;if(Zt>1)Dt.push(8*gt[Kt].bytes/Zt),Gt=0;else{Gt===0&&(Gt=tt[Kt].ts,Vt=0);var pt=gt[Kt].ts-Gt;pt>1?(Vt+=gt[Kt].bytes,Dt.push(8*Vt/pt),Gt=0):Vt+=gt[Kt].bytes}}if(Dt.length>0)return Dt.reduce((function(Ot,Fe){return Ot+Fe}),0)/Dt.length}return null}catch{return null}})(Ee,Pe),dt&&(qt=8*ge/dt)):Z===u.A.ABR_FETCH_THROUGHPUT_CALCULATION_DOWNLOADED_DATA&&(qt=B(Nt,ge)),w.progress({loaded:ge,total:isNaN(Y)?ge:Y,lengthComputable:!0,time:qt,stream:!0})}w.response.response=fe.buffer}return w.onload(),void w.onend()}if(ht&&ht.length>0){fe=(function(ke,ut){if(ke.length===0)return ut;var tt=new Uint8Array(ke.length+ut.length);return tt.set(ke),tt.set(ut,ke.length),tt})(fe,ht),ge+=ht.length,Nt.push({ts:Date.now(),bytes:ht.length}),Z===u.A.ABR_FETCH_THROUGHPUT_CALCULATION_MOOF_PARSING&&ct&&b.findLastTopIsoBoxCompleted(["moof"],fe,Ce).found&&(ct=!1,Ee.push({ts:performance.now(),bytes:ht.length}));var Yt=b.findLastTopIsoBoxCompleted(["moov","mdat"],fe,Ce);if(Yt.found){var sn,ln=Yt.lastCompletedOffset+Yt.size;Z!==u.A.ABR_FETCH_THROUGHPUT_CALCULATION_MOOF_PARSING||ct||(ct=!0,Pe.push({ts:performance.now(),bytes:fe.length})),ln===fe.length?(sn=fe,fe=new Uint8Array):(sn=new Uint8Array(fe.subarray(0,ln)),fe=fe.subarray(ln)),w.progress({data:sn.buffer,lengthComputable:!1,noTrace:!0}),Ce=0}else Ce=Yt.lastCompletedOffset,ve||(w.progress({lengthComputable:!1,noTrace:!0}),ve=!0)}H(w,Ke)};H(w,Ke)})).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(ie){return ie.bytes>j/4/w.length}))).length>1){var k=0,se=(w[w.length-1].ts-w[0].ts)/w.length;return w.forEach((function(ie,he){var oe=w[he+1];if(oe){var te=oe.ts-ie.ts;k+=te<se?te:0}})),k}return null}catch{return null}}return e={load:function(w){p&&p.modifyRequest?(0,De.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}},e}xn.__dashjs_factory_name="FetchLoader";var Yn=h.A.getClassFactory(xn),An=M(7125);function Un(t){return Un=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Un(t)}function Sn(t,e){for(var o=0;o<e.length;o++){var l=e[o];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(t,kn(l.key),l)}}function kn(t){var e=(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)})(t);return Un(e)=="symbol"?e:e+""}var Hn=(function(){return t=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},(e=[{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(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e})();function Kn(t,e,o){return Object.defineProperty(t,"prototype",{writable:!1}),t}var pr=Kn((function t(){(function(e,o){if(!(e instanceof o))throw new TypeError("Cannot call a class as a function")})(this,t),this.period=null,this.index=-1,this.type=null}));function Nr(t,e,o){return Object.defineProperty(t,"prototype",{writable:!1}),t}var hr=Nr((function t(){(function(e,o){if(!(e instanceof o))throw new TypeError("Cannot call a class as a function")})(this,t),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(t,e,o){return Object.defineProperty(t,"prototype",{writable:!1}),t}var kr=gr((function t(){(function(e,o){if(!(e instanceof o))throw new TypeError("Cannot call a class as a function")})(this,t),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(t,e,o){return Object.defineProperty(t,"prototype",{writable:!1}),t}var jr=Ar((function t(){(function(e,o){if(!(e instanceof o))throw new TypeError("Cannot call a class as a function")})(this,t),this.type="",this.duration=NaN,this.presentationTime=NaN,this.id=NaN,this.messageData="",this.eventStream=null,this.presentationTimeDelta=NaN}));function Li(t,e,o){return Object.defineProperty(t,"prototype",{writable:!1}),t}var Cr=Li((function t(e,o,l,p){(function(C,b){if(!(C instanceof b))throw new TypeError("Cannot call a class as a function")})(this,t),this.url=e||"",this.serviceLocation=o||e||"",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(t,e,o){return Object.defineProperty(t,"prototype",{writable:!1}),t}var ci=li((function t(){(function(e,o){if(!(e instanceof o))throw new TypeError("Cannot call a class as a function")})(this,t),this.adaptionSet=null,this.representation=null,this.period=null,this.timescale=1,this.value="",this.schemeIdUri="",this.presentationTimeOffset=0}));function fi(t,e,o){return Object.defineProperty(t,"prototype",{writable:!1}),t}var di=fi((function t(){(function(e,o){if(!(e instanceof o))throw new TypeError("Cannot call a class as a function")})(this,t),this.id=null,this.inband=!1,this.type="encoder",this.applicationScheme=null,this.wallClockTime=null,this.presentationTime=NaN,this.UTCTiming=null}));function qr(t,e,o){return Object.defineProperty(t,"prototype",{writable:!1}),t}var Or=qr((function t(){(function(e,o){if(!(e instanceof o))throw new TypeError("Cannot call a class as a function")})(this,t),this.defaultServiceLocation=null,this.defaultServiceLocationArray=[],this.queryBeforeStart=!1,this.serverUrl=null,this.clientRequirement=!0}));function vr(t){return vr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},vr(t)}function ot(t,e){for(var o=0;o<e.length;o++){var l=e[o];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(t,et(l.key),l)}}function et(t){var e=(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)})(t);return vr(e)=="symbol"?e:e+""}var rt=(function(){return t=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},(e=[{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}}])&&ot(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e})(),we=M(426),Je=M.n(we);function bt(){return{areEqual:function(t,e){return Je()(t,e)}}}bt.__dashjs_factory_name="ObjectUtils";var Et=h.A.getSingletonFactory(bt),Bt=M(6028);function xt(t,e,o){return Object.defineProperty(t,"prototype",{writable:!1}),t}var Xt=xt((function t(e,o){(function(l,p){if(!(l instanceof p))throw new TypeError("Cannot call a class as a function")})(this,t),this.url=e||"",this.serviceLocation=o||null,this.queryParams={}}));function $t(t,e,o){return Object.defineProperty(t,"prototype",{writable:!1}),t}var kt=$t((function t(e,o,l){(function(p,C){if(!(p instanceof C))throw new TypeError("Cannot call a class as a function")})(this,t),this.url=e||"",this.serviceLocation=o||null,this.ttl=l||NaN,this.queryParams={}}));function _t(t){return _t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_t(t)}function Wt(t,e){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(t);e&&(l=l.filter((function(p){return Object.getOwnPropertyDescriptor(t,p).enumerable}))),o.push.apply(o,l)}return o}function Ht(t){for(var e=1;e<arguments.length;e++){var o=arguments[e]!=null?arguments[e]:{};e%2?Wt(Object(o),!0).forEach((function(l){an(t,l,o[l])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):Wt(Object(o)).forEach((function(l){Object.defineProperty(t,l,Object.getOwnPropertyDescriptor(o,l))}))}return t}function an(t,e,o){return(e=(function(l){var p=(function(C){if(_t(C)!="object"||!C)return C;var b=C[Symbol.toPrimitive];if(b!==void 0){var F=b.call(C,"string");if(_t(F)!="object")return F;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(C)})(l);return _t(p)=="symbol"?p:p+""})(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}function pn(t,e){var o=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!o){if(Array.isArray(t)||(o=vn(t))||e){o&&(t=o);var l=0,p=function(){};return{s:p,n:function(){return l>=t.length?{done:!0}:{done:!1,value:t[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(t)},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(t,e){if(t){if(typeof t=="string")return tn(t,e);var o={}.toString.call(t).slice(8,-1);return o==="Object"&&t.constructor&&(o=t.constructor.name),o==="Map"||o==="Set"?Array.from(t):o==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?tn(t,e):void 0}}function tn(t,e){(e==null||e>t.length)&&(e=t.length);for(var o=0,l=Array(e);o<e;o++)l[o]=t[o];return l}function St(){var t,e,o,l,p=this.context,C=(0,Ae.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=he(f.Representation_asArray[0]);if(S&&S.length>0&&Bt._.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,de=0;de<f.Representation_asArray.length;de++)if((V=f.Representation_asArray[de]).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 se(f){return f&&f.Period_asArray?f.Period_asArray:[]}function ie(f){var N=!1;return f&&f.hasOwnProperty("type")&&(N=f.type===n.A.DYNAMIC),N}function he(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 oe(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 te(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,de=R.__text||R;return C.isRelative(de)&&(L=!0,f.baseUri&&(de=C.resolve(de,f.baseUri))),V.url=de,R.hasOwnProperty(n.A.SERVICE_LOCATION)&&R.serviceLocation.length?V.serviceLocation=R.serviceLocation:V.serviceLocation=de,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 t={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 tn(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 rt().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 rt().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 rt().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 rt().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 rt().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(Et(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),de=[];for(L=0,R=V.length;L<R;L++)F(V[L],S)&&de.push(j(V[L]));return de},getRealPeriods:se,getRealPeriodForIndex:function(f,N){var S=se(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:ie,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=[],de=(function(fe){if(fe&&fe.period&&b(fe.period.index)){var Ce=fe.period.mpd.manifest.Period_asArray[fe.period.index];if(Ce&&Ce.AdaptationSet_asArray&&b(fe.index))return j(Ce.AdaptationSet_asArray[fe.index])}})(f);if(de&&de.Representation_asArray){if(f&&f.period&&b(f.period.index)){var ue=K(f.period.mpd.manifest);ue&&(S=ue[0])}for(var P=0,$=de.Representation_asArray.length;P<$;++P){var Y=de.Representation_asArray[P],ge=new Hn;if(ge.index=P,ge.adaptation=f,Y.hasOwnProperty(n.A.ID)&&(ge.id=Y.id),Y.hasOwnProperty(n.A.CODECS)&&(ge.codecs=Y.codecs),Y.hasOwnProperty(n.A.MIME_TYPE)&&(ge.mimeType=Y[n.A.MIME_TYPE]),Y.hasOwnProperty(n.A.CODEC_PRIVATE_DATA)&&(ge.codecPrivateData=Y.codecPrivateData),Y.hasOwnProperty(n.A.BANDWITH)&&(ge.bandwidth=Y.bandwidth),Y.hasOwnProperty(n.A.WIDTH)&&(ge.width=Y.width),Y.hasOwnProperty(n.A.HEIGHT)&&(ge.height=Y.height),Y.hasOwnProperty(n.A.SCAN_TYPE)&&(ge.scanType=Y.scanType),Y.hasOwnProperty(n.A.MAX_PLAYOUT_RATE)&&(ge.maxPlayoutRate=Y.maxPlayoutRate),Y.hasOwnProperty(n.A.SEGMENT_BASE)?(N=Y.SegmentBase,ge.segmentInfoType=n.A.SEGMENT_BASE):Y.hasOwnProperty(n.A.SEGMENT_LIST)?(N=Y.SegmentList).hasOwnProperty(n.A.SEGMENT_TIMELINE)?ge.segmentInfoType=n.A.SEGMENT_TIMELINE:ge.segmentInfoType=n.A.SEGMENT_LIST:Y.hasOwnProperty(n.A.SEGMENT_TEMPLATE)?((N=Y.SegmentTemplate).hasOwnProperty(n.A.SEGMENT_TIMELINE)?ge.segmentInfoType=n.A.SEGMENT_TIMELINE:ge.segmentInfoType=n.A.SEGMENT_TEMPLATE,N.hasOwnProperty(n.A.INITIALIZATION_MINUS)&&(ge.initialization=N.initialization.split("$Bandwidth$").join(Y.bandwidth).split("$RepresentationID$").join(Y.id))):ge.segmentInfoType=n.A.BASE_URL,ge.essentialProperties=he(Y),N){if(N.hasOwnProperty(n.A.INITIALIZATION)){var ve=N.Initialization;ve.hasOwnProperty(n.A.SOURCE_URL)&&(ge.initialization=ve.sourceURL),ve.hasOwnProperty(n.A.RANGE)&&(ge.range=ve.range)}else B(de)&&U(de)&&de.mimeType&&de.mimeType.indexOf("application/mp4")===-1&&(ge.range=0);N.hasOwnProperty(n.A.TIMESCALE)&&(ge.timescale=N.timescale),N.hasOwnProperty(n.A.DURATION)?ge.segmentDuration=N.duration/ge.timescale:Y.hasOwnProperty(n.A.SEGMENT_TEMPLATE)&&(N=Y.SegmentTemplate).hasOwnProperty(n.A.SEGMENT_TIMELINE)&&(ge.segmentDuration=oe(N.SegmentTimeline)/ge.timescale),N.hasOwnProperty(n.A.MEDIA)&&(ge.media=N.media),N.hasOwnProperty(n.A.START_NUMBER)&&(ge.startNumber=N.startNumber),N.hasOwnProperty(n.A.INDEX_RANGE)&&(ge.indexRange=N.indexRange),N.hasOwnProperty(n.A.PRESENTATION_TIME_OFFSET)&&(ge.presentationTimeOffset=N.presentationTimeOffset/ge.timescale),N.hasOwnProperty(n.A.AVAILABILITY_TIME_OFFSET)?ge.availabilityTimeOffset=N.availabilityTimeOffset:S&&S.availabilityTimeOffset!==void 0&&(ge.availabilityTimeOffset=S.availabilityTimeOffset),N.hasOwnProperty(n.A.AVAILABILITY_TIME_COMPLETE)?ge.availabilityTimeComplete=N.availabilityTimeComplete!=="false":S&&S.availabilityTimeComplete!==void 0&&(ge.availabilityTimeComplete=S.availabilityTimeComplete)}ge.MSETimeOffset=(R=(L=ge).presentationTimeOffset,L.adaptation.period.start-R),ge.path=[f.period.index,f.index,P],V.push(ge)}}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:e.warn("Unknown Adaptation stream type"),V.push(N);return V},getRegularPeriods:function(f){var N,S,L=!!f&&ie(f.manifest),R=[],V=null,de=null,ue=null,P=null;for(S=0,N=f&&f.manifest&&f.manifest.Period_asArray?f.manifest.Period_asArray.length:0;S<N;S++)(de=f.manifest.Period_asArray[S]).hasOwnProperty(n.A.START)?(P=new sr).start=de.start:V!==null&&V.hasOwnProperty(n.A.DURATION)&&ue!==null?(P=new sr).start=parseFloat((ue.start+ue.duration).toFixed(5)):S!==0||L||((P=new sr).start=0),ue!==null&&isNaN(ue.duration)&&(P!==null?ue.duration=parseFloat((P.start-ue.start).toFixed(5)):e.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=te(de,S),P.index=S,P.mpd=f,de.hasOwnProperty(n.A.DURATION)&&(P.duration=de.duration),ue&&(ue.nextPeriodId=P.id),R.push(P),V=de,ue=P),de=null,P=null;return R.length===0||ue!==null&&isNaN(ue.duration)&&(ue.duration=parseFloat(((function($){(function(){if(!o||!o.hasOwnProperty("error"))throw new Error(u.A.MISSING_CONFIG_ERROR)})();var Y,ge=ie($.mpd.manifest);return $.mpd.manifest.mediaPresentationDuration?Y=$.mpd.manifest.mediaPresentationDuration:$.duration?Y=$.duration:ge?Y=Number.POSITIVE_INFINITY:o.error(new pe.A(me.MANIFEST_ERROR_ID_PARSE_CODE,"Must have @mediaPresentationDuration on MPD or an explicit @duration on the last period.",$)),Y})(ue)-ue.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,de=[];if(V)for(N=0;N<V.length;N++){var ue=new ci;if(ue.period=f,ue.timescale=1,!V[N].hasOwnProperty(u.A.SCHEME_ID_URI))throw new Error("Invalid EventStream. SchemeIdUri has to be set");for(ue.schemeIdUri=V[N][u.A.SCHEME_ID_URI],V[N].hasOwnProperty(n.A.TIMESCALE)&&(ue.timescale=V[N][n.A.TIMESCALE]),V[N].hasOwnProperty(n.A.VALUE)&&(ue.value=V[N][n.A.VALUE]),V[N].hasOwnProperty(n.A.PRESENTATION_TIME_OFFSET)&&(ue.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=ue,P.hasOwnProperty(n.A.PRESENTATION_TIME)&&($.presentationTime=P.presentationTime);var Y=ue.presentationTimeOffset?ue.presentationTimeOffset/ue.timescale:0;$.calculatedPresentationTime=$.presentationTime/ue.timescale+f.start-Y,P.hasOwnProperty(n.A.DURATION)&&($.duration=P.duration/ue.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,de.push($)}}return de},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]]=Ht({},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 rt().init(N)})):[]},getEssentialPropertiesForRepresentation:he,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,de;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)&&(de=V.Representation_asArray[N.index])&&(L=de.InbandEventStream_asArray),Z(L,N,S)},getUTCTimingSources:function(f){var N=ie(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 de=new Gr.A;V.hasOwnProperty(u.A.SCHEME_ID_URI)&&(de.schemeIdUri=V.schemeIdUri,V.hasOwnProperty(n.A.VALUE)&&(de.value=V.value.toString(),R.push(de)))})),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 Xt(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 kt(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,de=null,ue=null,P=null,$=null,Y=null,ge=null;for(var ve in R)R.hasOwnProperty(ve)&&(ve===n.A.ID?V=R[ve]:ve===n.A.SERVICE_DESCRIPTION_SCOPE?de=R[ve].schemeIdUri:ve===n.A.SERVICE_DESCRIPTION_LATENCY?ue={target:parseInt(R[ve].target),max:parseInt(R[ve].max),min:parseInt(R[ve].min),referenceId:parseInt(R[ve].referenceId)}:ve===n.A.SERVICE_DESCRIPTION_PLAYBACK_RATE?P={max:parseFloat(R[ve].max),min:parseFloat(R[ve].min)}:ve===n.A.SERVICE_DESCRIPTION_OPERATING_QUALITY?$={mediaType:R[ve].mediaType,max:parseInt(R[ve].max),min:parseInt(R[ve].min),target:parseInt(R[ve].target),type:R[ve].type,maxQualityDifference:parseInt(R[ve].maxQualityDifference)}:ve===n.A.SERVICE_DESCRIPTION_OPERATING_BANDWIDTH?Y={mediaType:R[ve].mediaType,max:parseInt(R[ve].max),min:parseInt(R[ve].min),target:parseInt(R[ve].target)}:ve===n.A.CONTENT_STEERING&&(ge=z(R[ve])));N.push({id:V,schemeIdUri:de,latency:ue,playbackRate:P,operatingQuality:$,operatingBandwidth:Y,contentSteering:ge})}}catch(fe){L.e(fe)}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]]=Ht({},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 rt().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]]=Ht({},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 rt().init(N)})):[]},setConfig:function(f){f&&(f.errHandler&&(o=f.errHandler),f.BASE64&&(l=f.BASE64))}},e=(0,g.A)(p).getInstance().getLogger(t),t}St.__dashjs_factory_name="DashManifestModel";var It=h.A.getSingletonFactory(St),Ft=M(1739);function rn(t,e){var o=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!o){if(Array.isArray(t)||(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}})(t))||e){o&&(t=o);var l=0,p=function(){};return{s:p,n:function(){return l>=t.length?{done:!0}:{done:!1,value:t[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(t)},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(t,e){(e==null||e>t.length)&&(e=t.length);for(var o=0,l=Array(e);o<e;o++)l[o]=t[o];return l}function _n(){var t,e,o,l,p,C,b,F,U,H,B=this.context,w=(0,y.A)(B).getInstance(),j=(0,le.A)(B).getInstance();function k(){o={pr:1,nor:null,st:null,sf:null,sid:"".concat(Ft.A.generateUuid()),cid:null},U={},F={},H={},ie()}function se(){ie()}function ie(){if(C){var R=C.getStreamController();if(R&&typeof R.getActiveStream=="function"){var V=R.getActiveStream();V&&(b=V.getProcessors())}}}function he(R,V){var de,ue={},P=rn(V);try{for(P.s();!(de=P.n()).done;){var $=de.value;R[$]&&(ue[$]=R[$])}}catch(Y){P.e(Y)}finally{P.f()}return ue}function oe(R){var V=j.get().streaming.cmcd.enabledKeys;return R.filter((function(de){return V.includes(de)}))}function te(R){try{return R.type===je.G.MPD_TYPE?((de=Z()).ot="m",de):R.type===je.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(ue){var P,$=Z(),Y=(function(at){try{var Nt=at.quality,Ee=at.mediaInfo.bitrateList;return parseInt(Ee[Nt].bandwidth/1e3)}catch{return null}})(ue),ge=(function(at){try{return isNaN(at.duration)?NaN:Math.round(1e3*at.duration)}catch{return null}})(ue),ve=(function(at){try{return 100*parseInt(l.getThroughputHistory().getSafeAverageThroughput(at)/100)}catch{return null}})(ue.mediaType),fe=(function(at){try{var Nt=o.pr,Ee=p.getCurrentBufferLevel(at);return isNaN(Nt)||isNaN(Ee)?null:100*parseInt(Ee/Nt*10)}catch{return null}})(ue.mediaType),Ce=K(ue.mediaType),Me=(function(at){try{var Nt=l.getTopBitrateInfoFor(at);return Math.round(Nt.bitrate/1e3)}catch{return null}})(ue.mediaType),Qe=o.pr,$e=(function(at){if(b&&b.length!==0){var Nt,Ee=rn(b);try{for(Ee.s();!(Nt=Ee.n()).done;){var Pe=Nt.value;if(Pe.getType()===at)return Pe.probeNextRequest()}}catch(ct){Ee.e(ct)}finally{Ee.f()}}})(ue.mediaType);ue.mediaType===u.A.VIDEO&&(P="v"),ue.mediaType===u.A.AUDIO&&(P="a"),ue.mediaType===u.A.TEXT&&(P=ue.mediaInfo.mimeType==="application/mp4"?"tt":"c");var Ze=j.get().streaming.cmcd.rtp;return Ze||(Ze=(function(at){try{var Nt=C.getPlaybackRate();Nt||(Nt=1);var Ee=at.quality,Pe=at.mediaType,ct=at.mediaInfo,Ke=at.duration;if(!ct)return NaN;var yt=K(Pe);yt===0&&(yt=500);var ht=ct.bitrateList[Ee].bandwidth*Ke/1e3/(yt/Nt/1e3),dt=j.get().streaming.cmcd.rtpSafetyFactor&&!isNaN(j.get().streaming.cmcd.rtpSafetyFactor)?j.get().streaming.cmcd.rtpSafetyFactor:5;return 100*(parseInt(ht*dt/100)+1)}catch{return NaN}})(ue)),isNaN(Ze)||($.rtp=Ze),$e&&(ue.url!==$e.url?$.nor=encodeURIComponent(Ft.A.getRelativeUrl(ue.url,$e.url)):$e.range&&($.nrr=$e.range)),Y&&($.br=Y),P&&($.ot=P),isNaN(ge)||($.d=ge),isNaN(ve)||($.mtp=ve),isNaN(fe)||($.dl=fe),isNaN(Ce)||($.bl=Ce),isNaN(Me)||($.tb=Me),isNaN(Qe)||Qe===1||($.pr=Qe),U[ue.mediaType]&&($.bs=!0,U[ue.mediaType]=!1),!F[ue.mediaType]&&H[ue.mediaType]||($.su=!0,F[ue.mediaType]=!1,H[ue.mediaType]=!0),$})(R)):R.type===je.G.INIT_SEGMENT_TYPE?(function(){var ue=Z();return ue.ot="i",ue.su=!0,ue})():R.type===je.G.OTHER_TYPE||R.type===je.G.XLINK_EXPANSION_TYPE?(function(){var ue=Z();return ue.ot="o",ue})():R.type===je.G.LICENSE?(function(){var ue=Z();return ue.ot="k",ue})():null}catch{return null}var V,de}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=t.getIsDynamic(R.data)?"l":"v",de=R.protocol&&R.protocol==="MSS"?"s":"d";o.st="".concat(V),o.sf="".concat(de)}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($)})),de=V.length,ue=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<de-1&&(P+=",")),P}),"");return(ue=ue.replace(/=true/g,"")).replace(/,\s*$/,"")}catch{return null}}return e={getQueryParameter:function(R){try{if(j.get().streaming.cmcd&&j.get().streaming.cmcd.enabled){var V=te(R),de=(function(P){try{var $=j.get().streaming.cmcd.enabledKeys;return Object.keys(P).filter((function(Y){return $.includes(Y)})).reduce((function(Y,ge){return Y[ge]=P[ge],Y}),{})}catch{return P}})(V),ue=L(de);return w.trigger(An.A.CMCD_DATA_GENERATED,{url:R.url,mediaType:R.mediaType,cmcdData:V,cmcdString:ue}),{key:"CMCD",value:ue}}return null}catch{return null}},getHeaderParameters:function(R){try{if(j.get().streaming.cmcd&&j.get().streaming.cmcd.enabled){var V=te(R),de=he(V,oe(["br","d","ot","tb"])),ue=he(V,oe(["bl","dl","mtp","nor","nrr","su"])),P=he(V,oe(["bs","rtp"])),$=he(V,oe(["cid","pr","sf","sid","st","v"])),Y={"CMCD-Object":L(de),"CMCD-Request":L(ue),"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,e),w.off(r.A.PLAYBACK_SEEKED,S,e),k()},initialize:function(){w.on(r.A.PLAYBACK_RATE_CHANGED,z,e),w.on(r.A.MANIFEST_LOADED,f,e),w.on(r.A.BUFFER_LEVEL_STATE_CHANGED,N,e),w.on(r.A.PLAYBACK_SEEKED,S,e),w.on(r.A.PERIOD_SWITCH_COMPLETED,se,e)}},t=It(B).getInstance(),k(),e}_n.__dashjs_factory_name="CmcdModel";var Tn=h.A.getSingletonFactory(_n);function qn(t){return qn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},qn(t)}function Vn(){Vn=function(p,C){return new o(p,void 0,C)};var t=RegExp.prototype,e=new WeakMap;function o(p,C,b){var F=RegExp(p,C);return e.set(F,b||e.get(p)),In(F,o.prototype)}function l(p,C){var b=e.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=t.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=e.get(this);return t[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 t[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 t[Symbol.replace].call(this,p,C)},Vn.apply(this,arguments)}function In(t,e){return In=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,l){return o.__proto__=l,o},In(t,e)}var Bn="static",Ln="dynamic",Wn="cmsd-",Tr=Wn+Bn,mr=Wn+Ln,tr="stream",Xn=["mb","st","sf","v"],pi={video:"v",audio:"a",text:"tt",stream:tr},hi=/^[-0-9]/;function Yr(){var t,e,o,l,p=this.context,C=(0,y.A)(p).getInstance();function b(){o={},l={}}function F(k){k&&Object.keys(k).forEach((function(se){Xn.includes(se)||delete k[se]}))}function U(k){return!k||k.toLowerCase()!=="false"&&(hi.test(k)?parseInt(k,10):k.replace(/["]+/g,""))}function H(k){try{for(var se={},ie=k.split(","),he=0;he<ie.length;he++){var oe=ie[he].split("="),te=oe[0],Z=U(oe[1]);se[te]=Z}return se}catch(K){e.error("Failed to parse CMSD-Static response header value:",K)}}function B(k){try{for(var se={},ie=k.split(","),he=ie[ie.length-1].split(";"),oe=1;oe<he.length;oe++){var te=he[oe].split("="),Z=te[0],K=U(te[1]);se[Z]=K}return se}catch(z){return e.error("Failed to parse CMSD-Dynamic response header value:",z),[]}}function w(k){return pi[k]||"o"}function j(k,se,ie){var he=k===Bn?o:l,oe=he[se]||{},te=he[tr]||{};return oe[ie]||te[ie]}return t={setConfig:function(){},initialize:function(){},reset:function(){b()},parseResponseHeaders:function(k,se){for(var ie=null,he=null,oe=k.split(`\r
10
- `),te=oe.length-1;te>=0;te--){var Z=oe[te].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:ie=H(z),C.trigger(i.A.CMSD_STATIC_HEADER,ie);break;case mr:he||(he=B(z))}}}var f=tr;return ie&&ie.ot?f=ie.ot:se&&(f=w(se)),F(o[f]),F(l[f]),ie&&(o[f]=Object.assign(o[f]||{},ie)),he&&(l[f]=Object.assign(l[f]||{},he)),{static:ie,dynamic:he}},getMaxBitrate:function(k){var se=w(k);return j(Ln,se,"mb")||-1},getEstimatedThroughput:function(k){var se=w(k);return j(Ln,se,"etp")||null},getResponseDelay:function(k){var se=w(k);return j(Ln,se,"rd")||null},getRoundTripTime:function(k){var se=w(k);return j(Ln,se,"rtt")||null}},e=(0,g.A)(p).getInstance().getLogger(t),b(),t}Yr.__dashjs_factory_name="CmsdModel";var Hr=h.A.getSingletonFactory(Yr);function Vr(){var t,e,o=this.context,l={};function p(){e=(0,g.A)(o).getInstance().getLogger(t)}function C(F){for(var U={},H=0,B=0,w=0,j=0,k=F.length,se=0;se<k;++se)H+=F[se].chunkDownloadTimeRelativeMS,B+=F[se].bufferLevel,w+=F[se].chunkDownloadTimeRelativeMS*F[se].bufferLevel,j+=F[se].chunkDownloadTimeRelativeMS*F[se].chunkDownloadTimeRelativeMS;return U.m=(w-H*B/k)/(j-H*H/k),U.b=B/k-U.m*H/k,function(ie){return U.m*ie+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 t={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,se){return k+se.chunkDownloadDurationMS}),0),segmentBytes:H.reduce((function(k,se){return k+se.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,se=0,ie=0,he=0,oe=0;oe<U.chunkMeasurements.length;oe++){var te=U.chunkMeasurements[oe];if(k<ie+te.chunkDownloadDurationMS)break;ie+=te.chunkDownloadDurationMS,se+=te.chunkBytes,he++}if(k<0&&e.warn("request time was before adjusted availibitly start time"),se&&ie&&he>.2*U.chunkMeasurements.length){var Z=se/ie,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(),t}Vr.__dashjs_factory_name="LowLatencyThroughputModel";var Kr=h.A.getSingletonFactory(Vr),Lt=M(6890);function en(t){return en=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},en(t)}function fn(t,e,o){return(e=(function(l){var p=(function(C){if(en(C)!="object"||!C)return C;var b=C[Symbol.toPrimitive];if(b!==void 0){var F=b.call(C,"string");if(en(F)!="object")return F;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(C)})(l);return en(p)=="symbol"?p:p+""})(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}function Fn(t){t=t||{};var e,o,l,p,C,b,F,U,H,B,w=this.context,j=t.errHandler,k=t.dashMetrics,se=t.mediaPlayerModel,ie=t.requestModifier,he=t.boxParser,oe=t.errors,te=t.requestTimeout||0,Z=(0,y.A)(w).getInstance(),K=(0,le.A)(w).getInstance();function z(f,N){var S,L=f.request,R=[],V=!0,de=!0,ue=new Date,P=ue,$=0,Y=null,ge=null;if(!ie||!k||!j)throw new Error("config object is not correct or missing");var ve,fe=function(Ke){L.requestStartDate=ue,L.requestEndDate=new Date,L.firstByteDate=L.firstByteDate||ue,L.fileLoaderType=ge;var yt=S.response?S.response.responseURL:null,ht=S.response?S.response.status:null,dt=S.response&&S.response.getAllResponseHeaders?S.response.getAllResponseHeaders():S.response?S.response.responseHeaders:null,qt=dt&&K.get().streaming.cmsd&&K.get().streaming.cmsd.enabled?F.parseResponseHeaders(dt,L.mediaType):null;k.addHttpRequest(L,yt,ht,dt,Ke?R:null,qt)},Ce=function(Ke){de=!1,fe(Ke),L.type===je.G.MPD_TYPE&&(k.addManifestUpdate(L),Z.trigger(i.A.MANIFEST_LOADING_FINISHED,{request:L}))},Me=function(){if(Y&&(clearTimeout(Y),Y=null),o.indexOf(S)!==-1&&(o.splice(o.indexOf(S),1),de))if(Ce(!1),N>0){try{K.get().streaming.utcSynchronization.enableBackgroundSyncAfterSegmentDownloadError&&L.type===je.G.MEDIA_SEGMENT_TYPE&&se.getRetryAttemptsForType(je.G.MEDIA_SEGMENT_TYPE)===N&&Z.trigger(i.A.ATTEMPT_BACKGROUND_SYNC)}catch{}N--;var Ke={config:f};p.push(Ke),Ke.timeout=setTimeout((function(){p.indexOf(Ke)!==-1&&(p.splice(p.indexOf(Ke),1),z(f,N))}),se.getRetryIntervalsForType(L.type))}else{if(L.type===je.G.MSS_FRAGMENT_INFO_SEGMENT_TYPE)return;j.error(new pe.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===je.G.MEDIA_SEGMENT_TYPE?((ve=Yn(w).create({requestModifier:ie,lowLatencyThroughputModel:H,boxParser:he})).setup({dashMetrics:k}),ge=u.A.FILE_LOADER_TYPES.FETCH):(ve=(0,Qt.A)(w).create({requestModifier:ie}),ge=u.A.FILE_LOADER_TYPES.XHR);var Qe=null,$e=ie.modifyRequestURL?ie.modifyRequestURL(L.url):L.url;if(K.get().streaming.cmcd&&K.get().streaming.cmcd.enabled){var Ze=K.get().streaming.cmcd.mode;if(Ze===u.A.CMCD_MODE_QUERY){var at=(function(Ke){try{var yt=[],ht=b.getQueryParameter(Ke);return ht&&yt.push(ht),yt}catch{return[]}})(L);$e=Ft.A.addAditionalQueryParameterToUrl($e,at)}else Ze===u.A.CMCD_MODE_HEADER&&(Qe=b.getHeaderParameters(L))}var Nt=U.getXHRWithCredentialsForType(L.type);if(L.queryParams){var Ee=Object.keys(L.queryParams).map((function(Ke){return{key:Ke,value:L.queryParams[Ke]}}));$e=Ft.A.addAditionalQueryParameterToUrl($e,Ee)}L.url=$e,S={url:$e,method:je.G.GET,withCredentials:Nt,request:L,onload:function(){S.response.status>=200&&S.response.status<=299&&(Ce(!0),f.success&&f.success(S.response.response,S.response.statusText,S.response.responseURL),f.complete&&f.complete(L,S.response.statusText))},onend:Me,onerror:Me,progress:function(Ke){var yt=new Date;V&&(V=!1,(!Ke.lengthComputable||Ke.lengthComputable&&Ke.total!==Ke.loaded)&&(L.firstByteDate=yt)),Ke.lengthComputable&&(L.bytesLoaded=Ke.loaded,L.bytesTotal=Ke.total),Ke.noTrace||(R.push({s:P,d:Ke.time?Ke.time:yt.getTime()-P.getTime(),b:[Ke.loaded?Ke.loaded-$:0]}),P=yt,$=Ke.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),Me()}),K.get().streaming.fragmentRequestProgressTimeout)),f.progress&&Ke&&f.progress(Ke)},onabort:function(){fe(!0),Y&&(clearTimeout(Y),Y=null),f.abort&&f.abort(L)},ontimeout:function(Ke){var yt;if(Ke.lengthComputable){var ht=Ke.loaded/Ke.total*100;yt="Request timeout: loaded: "+Ke.loaded+", out of: "+Ke.total+" : "+ht.toFixed(3)+"% Completed"}else yt="Request timeout: non-computable download size";B.warn(yt)},loader:ve,timeout:te,headers:Qe};var Pe=new Date().getTime();if(isNaN(L.delayLoadingTime)||Pe>=L.delayLoadingTime)o.push(S),ve.load(S);else{var ct={httpRequest:S};l.push(ct),ct.delayTimeout=setTimeout((function(){if(l.indexOf(ct)!==-1){l.splice(l.indexOf(ct),1);try{ue=new Date,P=ue,o.push(ct.httpRequest),ve.load(ct.httpRequest)}catch{ct.httpRequest.onerror()}}}),L.delayLoadingTime-Pe)}}return e={load:function(f){f.request?z(f,se.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!==je.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(e),o=[],l=[],p=[],b=Tn(w).getInstance(),F=Hr(w).getInstance(),H=Kr(w).getInstance(),U=(0,Lt.A)(w).getInstance(),C=fn(fn(fn(fn(fn(fn(fn({},je.G.MPD_TYPE,oe.DOWNLOAD_ERROR_ID_MANIFEST_CODE),je.G.XLINK_EXPANSION_TYPE,oe.DOWNLOAD_ERROR_ID_XLINK_CODE),je.G.INIT_SEGMENT_TYPE,oe.DOWNLOAD_ERROR_ID_INITIALIZATION_CODE),je.G.MEDIA_SEGMENT_TYPE,oe.DOWNLOAD_ERROR_ID_CONTENT_CODE),je.G.INDEX_SEGMENT_TYPE,oe.DOWNLOAD_ERROR_ID_CONTENT_CODE),je.G.BITSTREAM_SWITCHING_SEGMENT_TYPE,oe.DOWNLOAD_ERROR_ID_CONTENT_CODE),je.G.OTHER_TYPE,oe.DOWNLOAD_ERROR_ID_CONTENT_CODE),e}Fn.__dashjs_factory_name="HTTPLoader";var On=h.A.getClassFactory(Fn);function Gn(){var t;function e(){t={}}function o(){e()}return o(),{getLoader:function(l){for(var p in t)if(t.hasOwnProperty(p)&&l.startsWith(p))return t[p];return On},registerLoader:function(l,p){t[l]=p},unregisterLoader:function(l){t[l]&&delete t[l]},unregisterAllLoader:e,reset:o}}Gn.__dashjs_factory_name="SchemeLoaderFactory";var bn=h.A.getSingletonFactory(Gn);function Jn(t){t=t||{};var e,o,l=this.context;return e=bn(l).getInstance(),{load:function(p){if(!o){var C=e.getLoader(p&&p.request?p.request.url:null);o=C(l).create({errHandler:t.errHandler,mediaPlayerModel:t.mediaPlayerModel,requestModifier:t.requestModifier,dashMetrics:t.dashMetrics,boxParser:t.boxParser?t.boxParser:null,constants:t.constants?t.constants:null,dashConstants:t.dashConstants?t.dashConstants:null,urlUtils:t.urlUtils?t.urlUtils:null,requestTimeout:isNaN(t.requestTimeout)?0:t.requestTimeout,errors:t.errors})}o.load(p)},abort:function(){o&&o.abort()}}}Jn.__dashjs_factory_name="URLLoader";var Mn=h.A.getClassFactory(Jn);function Rn(t){return Rn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Rn(t)}function rr(t,e,o){return e=nr(e),(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)})(t,Qn()?Reflect.construct(e,o||[],nr(t).constructor):e.apply(t,o))}function Qn(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Qn=function(){return!!t})()}function nr(t){return nr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},nr(t)}function $n(t,e){return $n=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,l){return o.__proto__=l,o},$n(t,e)}var yr=(function(t){function e(l){var p;return(function(C,b){if(!(C instanceof b))throw new TypeError("Cannot call a class as a function")})(this,e),(p=rr(this,e,[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)})(e,t),o=e,Object.defineProperty(o,"prototype",{writable:!1}),o;var o})(T.A);function ur(t){t=t||{};var e,o,l=this.context,p=t.eventBus,C=t.events,b=t.urlUtils,F=t.errors,U=t.streamId;return e={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:e})};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:e})},success:function(w){B(w)},error:function(w,j,k){B(void 0,new pe.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:e})}}):B(void 0,new pe.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:t.errHandler,errors:F,dashMetrics:t.dashMetrics,mediaPlayerModel:t.mediaPlayerModel,requestModifier:t.requestModifier,urlUtils:b,constants:u.A,boxParser:t.boxParser,dashConstants:t.dashConstants,requestTimeout:t.settings.get().streaming.fragmentRequestTimeout}),e}ur.__dashjs_factory_name="FragmentLoader";var gi=h.A.getClassFactory(ur);function br(){return{modifyResponseAsync:function(t){return Promise.resolve(t)}}}br.__dashjs_factory_name="SegmentResponseModifier";var Wr=h.A.getSingletonFactory(br);function zr(t){t=t||{};var e,o,l,p=this.context,C=(0,y.A)(p).getInstance(),b=t.errHandler,F=t.mediaPlayerModel,U=t.dashMetrics,H=(0,g.A)(p).getInstance(),B=Wr(p).getInstance(),w=t.streamInfo;function j(){return w.id}function k(){for(var ie in l)l[ie].reset();l={}}function se(ie){if(ie.sender){var he=ie.request,oe=ie.response,te=he.isInitializationRequest(),Z=he.mediaInfo.streamInfo;if(ie.error&&(he.mediaType===u.A.AUDIO||he.mediaType===u.A.VIDEO||he.mediaType===u.A.TEXT&&he.mediaInfo.isFragmented)&&C.trigger(i.A.SERVICE_LOCATION_BASE_URL_BLACKLIST_ADD,{entry:ie.request.serviceLocation}),oe&&Z){var K=(function(z,f,N,S){var L=new zt;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})(oe,he,w.id,ie.type!==i.A.FRAGMENT_LOADING_PROGRESS);B.modifyResponseAsync(K).then((function(z){C.trigger(te?i.A.INIT_FRAGMENT_LOADED:i.A.MEDIA_FRAGMENT_LOADED,{chunk:z,request:he},{streamId:Z.id,mediaType:he.mediaType})})).catch((function(z){o.error(z),C.trigger(te?i.A.INIT_FRAGMENT_LOADED:i.A.MEDIA_FRAGMENT_LOADED,{chunk:K,request:he},{streamId:Z.id,mediaType:he.mediaType})}))}else o.warn("No "+he.mediaType+" bytes to push or stream is inactive.")}}return e={getStreamId:j,getModel:function(ie){var he=l[ie];return he||(he=J(p).create({streamInfo:w,type:ie,dashMetrics:U,fragmentLoader:gi(p).create({dashMetrics:U,mediaPlayerModel:F,errHandler:b,requestModifier:(0,De.A)(p).getInstance(),settings:t.settings,boxParser:t.boxParser,eventBus:C,events:i.A,errors:me,dashConstants:t.dashConstants,urlUtils:t.urlUtils,streamId:j()}),debug:H,eventBus:C,events:i.A}),l[ie]=he),he},reset:function(){C.off(r.A.FRAGMENT_LOADING_COMPLETED,se,this),C.off(r.A.FRAGMENT_LOADING_PROGRESS,se,this),k()}},o=H.getLogger(e),k(),C.on(r.A.FRAGMENT_LOADING_COMPLETED,se,e),C.on(r.A.FRAGMENT_LOADING_PROGRESS,se,e),e}zr.__dashjs_factory_name="FragmentController";var Fi=h.A.getClassFactory(zr);function xi(t,e,o){return Object.defineProperty(t,"prototype",{writable:!1}),t}var Ui=xi((function t(){(function(e,o){if(!(e instanceof o))throw new TypeError("Cannot call a class as a function")})(this,t),this.url=null,this.width=null,this.height=null,this.x=null,this.y=null}));function Bi(t,e,o){return Object.defineProperty(t,"prototype",{writable:!1}),t}var mi=Bi((function t(){(function(e,o){if(!(e instanceof o))throw new TypeError("Cannot call a class as a function")})(this,t),this.mediaType=null,this.bitrate=null,this.width=null,this.height=null,this.scanType=null,this.qualityIndex=NaN}));function yi(t){var e,o,l=this.context,p=t.streamInfo;function C(F){o.setTrackByIndex(F)}function b(){o&&o.reset()}return e={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(ie){k.url=ie,U(k)}));if(B)k.url=B.url,w.segmentDuration=NaN;else{var se=Math.floor(F/w.segmentDuration);k.url=(function(ie,he){var oe=he+ie.startNumber,te=(0,c.XX)(ie.templateUrl,"Number",oe);return te=(0,c.XX)(te,"Time",(oe-1)*ie.segmentDuration*ie.timescale),te=(0,c.XX)(te,"Bandwidth",ie.bandwidth),(0,c.Dr)(te)})(w,se)}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,Bt.A)(l).create({streamInfo:p,adapter:t.adapter,baseURLController:t.baseURLController,timelineConverter:t.timelineConverter,debug:t.debug,eventBus:t.eventBus,events:t.events,dashConstants:t.dashConstants,dashMetrics:t.dashMetrics,segmentBaseController:t.segmentBaseController}),e}yi.__dashjs_factory_name="ThumbnailController";var ki=h.A.getClassFactory(yi),Xr=M(255);function Qr(t){var e;t=t||{};var o=[],l=(0,y.A)(this.context).getInstance(),p=t.updateEventName,C=t.addBlacklistEventName;function b(F){o.indexOf(F)===-1&&(o.push(F),l.trigger(p,{entry:F}))}return e={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)}),e),e}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(t){t=t||{};var e,o,l,p,C,b,F,U,H,B,w,j,k,se,ie,he,oe,te,Z=this.context,K=(0,y.A)(Z).getInstance(),z=(0,Ae.A)(Z).getInstance(),f=t.manifestModel,N=t.mediaPlayerModel,S=t.dashMetrics,L=t.manifestUpdater,R=t.adapter,V=t.timelineConverter,de=t.capabilities,ue=t.errHandler,P=t.abrController,$=t.playbackController,Y=t.eventController,ge=t.mediaController,ve=t.protectionController,fe=t.textController,Ce=t.videoModel,Me=t.streamInfo,Qe=t.settings;function $e(pt,Ot){return new Promise((function(Fe,st){ht(),B=!0,qt();var xe=Ce.getElement(),Ge=[];Nn.forEach((function(lt){(lt!==u.A.TEXT||pt)&&(lt!==u.A.VIDEO||!xe||xe&&/^VIDEO$/i.test(xe.nodeName))&&Ge.push(Ze(lt,pt))})),Promise.all(Ge).then((function(){return lt=Ot,new Promise((function(ye){var Te={},We=l.map((function(wt){return wt.createBufferSinks(lt)}));Promise.all(We).then((function(wt){wt.forEach((function(jt){jt&&(Te[jt.getType()]=jt)})),ye(Te)})).catch((function(){ye(Te)}))}));var lt})).then((function(lt){if(B=!1,l.length===0){var ye="No streams to play.";ue.error(new pe.A(me.MANIFEST_ERROR_ID_NOSTREAMS_CODE,ye,f.getValue())),o.fatal(ye)}else Yt();pt&&fe.createTracks(Me),Fe(lt)})).catch((function(lt){st(lt)}))}))}function Ze(pt,Ot){var Fe,st=R.getAllMediaInfoForType(Me,pt),xe=[],Ge=null;if(!st||st.length===0)return o.info("No "+pt+" data."),Promise.resolve();pt===u.A.VIDEO&&(F=!0),pt===u.A.AUDIO&&(U=!0);for(var lt=0,ye=st.length;lt<ye;lt++)Ge=st[lt],pt===u.A.TEXT&&Ge.isEmbedded&&(fe.addEmbeddedTrack(Me,Ge),xe.push(Ge)),at(Ge)&&ge.addTrack(Ge);if(xe.length>0&&(ge.setInitialMediaSettingsForType(pt,Me),fe.addMediaInfosToBuffer(Me,pt,xe)),st=st.filter((function(We){return!We.isEmbedded})),st.length===0)return Promise.resolve();if(pt===u.A.IMAGE)return(j=ki(Z).create({streamInfo:Me,adapter:R,baseURLController:t.baseURLController,timelineConverter:t.timelineConverter,debug:he,eventBus:K,events:i.A,dashConstants:n.A,dashMetrics:t.dashMetrics,segmentBaseController:t.segmentBaseController})).initialize(),Promise.resolve();K.trigger(i.A.STREAM_INITIALIZING,{streamInfo:Me,mediaInfo:Ge}),ge.setInitialMediaSettingsForType(pt,Me);var Te=(function(We,wt){var jt=We&&We.length>0?We[0]:null,hn=w.getModel(jt?jt.type:null),En=jt?jt.type:null,dn=jt?jt.mimeType:null,jn=jt?jt.isFragmented:null,Pn=Ut(Z).create({streamInfo:Me,type:En,mimeType:dn,timelineConverter:V,adapter:R,manifestModel:f,mediaPlayerModel:N,fragmentModel:hn,dashMetrics:t.dashMetrics,baseURLController:t.baseURLController,segmentBaseController:t.segmentBaseController,abrController:P,playbackController:$,mediaController:ge,textController:fe,errHandler:ue,settings:Qe,boxParser:ie,segmentBlacklistController:k});Pn.initialize(wt,F,jn),l.push(Pn);for(var Zn=0;Zn<We.length;Zn++)Pn.addMediaInfo(We[Zn]);return En===u.A.TEXT&&fe.addMediaInfosToBuffer(Me,En,We,hn),Pn})(st,Ot);return(Fe=ge.getCurrentTrackFor(pt,Me.id))?(P.updateTopQualityIndex(Fe),Te.selectMediaInfo(pt===u.A.TEXT&&Fe.isEmbedded?st[0]:Fe)):Promise.resolve()}function at(pt){var Ot,Fe=pt?pt.type:null;return Fe===u.A.MUXED?(Ot="Multiplexed representations are intentionally not supported, as they are not compliant with the DASH-AVC/264 guidelines",o.fatal(Ot),ue.error(new pe.A(me.MANIFEST_ERROR_ID_MULTIPLEXED_CODE,Ot,f.getValue())),!1):!(Fe!==u.A.TEXT&&Fe!==u.A.IMAGE&&pt.contentProtection&&!de.supportsEncryptedMedia()&&(ue.error(new pe.A(me.CAPABILITY_MEDIAKEYS_ERROR_CODE,me.CAPABILITY_MEDIAKEYS_ERROR_MESSAGE)),1))}function Nt(pt){for(var Ot=l?l.length:0,Fe=0;Fe<Ot;Fe++){var st=l[Fe].getFragmentModel();st.abortRequests(),st.resetInitialSettings(),l[Fe].reset(!1,pt)}fe&&fe.deactivateStream(Me),l=[],C=!1,b=!1,Kt(!1),Pe(!1),K.trigger(i.A.STREAM_DEACTIVATED,{streamInfo:Me})}function Ee(pt){Nt(pt),p=!1,F=!1,U=!1,H={},B=!1,oe=!1,te=[]}function Pe(pt){oe=pt}function ct(){return Me?Me.start:NaN}function Ke(){return Me?Me.id:null}function yt(){return Me}function ht(){if(!Ce||!P)throw new Error(u.A.MISSING_CONFIG_ERROR)}function dt(pt){pt.error&&(ue.error(pt.error),o.fatal(pt.error.message))}function qt(){if(Y){var pt=R.getEventsFor(Me);pt&&pt.length>0&&Y.addInlineEvents(pt,Me.id)}}function Yt(){for(var pt=l.length,Ot=H.audio||H.video?new pe.A(me.DATA_UPDATE_FAILED_ERROR_CODE,me.DATA_UPDATE_FAILED_ERROR_MESSAGE):null,Fe=0;Fe<pt;Fe++)if(l[Fe].isUpdating()||B)return;if(ve){ve.clearMediaInfoArray();for(var st=0;st<pt&&l[st];st++){var xe=l[st].getType(),Ge=l[st].getMediaInfo();if(xe===u.A.AUDIO||xe===u.A.VIDEO||xe===u.A.TEXT&&Ge.isFragmented){var lt=l[st].getMediaInfo();lt&&ve.initializeForMedia(lt)}}ve.handleKeySystemFromManifest()}Ot?ue.error(Ot):p||(p=!0,Ce.waitForReadyState(u.A.VIDEO_ELEMENT_READY_STATES.HAVE_METADATA,(function(){K.trigger(i.A.STREAM_INITIALIZED,{streamInfo:Me})})))}function sn(){var pt=gt(),Ot=pt.length;if(Ot!==0){for(var Fe=0;Fe<Ot;Fe++)if(!pt[Fe].isBufferingCompleted()&&(pt[Fe].getType()===u.A.AUDIO||pt[Fe].getType()===u.A.VIDEO))return void o.debug("onBufferingCompleted - One streamProcessor has finished but",pt[Fe].getType(),"one is not buffering completed");o.debug("onBufferingCompleted - trigger STREAM_BUFFERING_COMPLETED"),b=!0,K.trigger(i.A.STREAM_BUFFERING_COMPLETED,{streamInfo:Me},{streamInfo:Me})}else o.warn("onBufferingCompleted - can't trigger STREAM_BUFFERING_COMPLETED because no streamProcessor is defined")}function ln(pt){H[pt.mediaType]=pt.error,Yt()}function ke(pt){Y&&Y.addInbandEvents(pt.events,Me.id)}function ut(pt){return pt&&pt.type?tt(pt.type):null}function tt(pt){return pt?gt().filter((function(Ot){return Ot.getType()===pt}))[0]:null}function gt(){for(var pt,Ot,Fe=[],st=0;st<l.length;st++)(pt=(Ot=l[st]).getType())!==u.A.AUDIO&&pt!==u.A.VIDEO&&pt!==u.A.TEXT||Fe.push(Ot);return Fe}function Dt(pt,Ot){var Fe=yt(),st=Ot.getStreamInfo();if(!st||!Fe)return!0;var xe=R.getAdaptationForType(st.index,pt,st),Ge=R.getAdaptationForType(Fe.index,pt,Fe);return xe&&Ge?!(!Vt(Ge)&&Vt(xe)):!xe&&!Ge}function Vt(pt){return!!pt&&!!(pt.ContentProtection||pt.Representation_asArray&&pt.Representation_asArray.length>0&&pt.Representation_asArray[0].ContentProtection)}function Gt(pt,Ot){var Fe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!pt||!pt.hasOwnProperty("getStreamInfo"))return!1;var st=pt.getStreamInfo(),xe=Fe?Fe.getStreamInfo():yt();if(!st||!xe)return!1;var Ge=R.getAdaptationForType(st.index,Ot,st),lt=R.getAdaptationForType(xe.index,Ot,xe);if(!Ge||!lt)return!Ge&&!lt;var ye=Ge&&lt&&Ge.mimeType===lt.mimeType,Te=lt.Representation_asArray.map((function(hn){return hn.codecs})),We=Ge.Representation_asArray.map((function(hn){return hn.codecs})),wt=We.some((function(hn){return Te.indexOf(hn)>-1})),jt=We.some((function(hn){return Te.some((function(En){return de.codecRootCompatibleWithCodec(En,hn)}))}));return wt||jt&&ye}function Kt(pt){se=pt}function Zt(){return se}return e={initialize:function(){K.on(i.A.BUFFERING_COMPLETED,sn,e),K.on(i.A.DATA_UPDATE_COMPLETED,ln,e),K.on(i.A.INBAND_EVENTS,ke,e),ve&&(K.on(i.A.KEY_ERROR,dt,e),K.on(i.A.SERVER_CERTIFICATE_UPDATED,dt,e),K.on(i.A.LICENSE_REQUEST_COMPLETE,dt,e),K.on(i.A.KEY_SYSTEM_SELECTED,dt,e),K.on(i.A.KEY_SESSION_CREATED,dt,e),K.on(i.A.KEY_STATUSES_CHANGED,dt,e)),fe.initializeForStream(Me),K.trigger(i.A.STREAM_UPDATED,{streamInfo:Me})},getStreamId:function(){return Me?Me.id:null},activate:function(pt,Ot){return new Promise((function(Fe,st){if(!C)return Zt()?(C=!0,K.trigger(i.A.STREAM_ACTIVATED,{streamInfo:Me}),void Fe(Ot)):void(function(xe,Ge){return $e(xe,Ge)})(pt,Ot).then((function(xe){C=!0,K.trigger(i.A.STREAM_ACTIVATED,{streamInfo:Me}),Fe(xe)})).catch((function(xe){st(xe)}));Fe(Ot)}))},deactivate:Nt,getIsActive:function(){return C},getDuration:function(){return Me?Me.duration:NaN},getStartTime:ct,getId:Ke,getStreamInfo:yt,getHasAudioTrack:function(){return U},getHasVideoTrack:function(){return F},startPreloading:function(pt,Ot){return new Promise((function(Fe,st){Zt()?st():(o.info("[startPreloading] Preloading next stream with id ".concat(Ke())),Kt(!0),$e(pt,Ot).then((function(){for(var xe=0;xe<l.length&&l[xe];xe++)l[xe].setExplicitBufferingTime(ct()),l[xe].getScheduleController().startScheduleTimer();Fe()})).catch((function(){Kt(!1),st()})))}))},initializeForTextWithMediaSource:function(pt){return new Promise((function(Ot,Fe){Ze(u.A.TEXT,pt).then((function(){return(st=tt(u.A.TEXT))?st.createBufferSinks():Promise.resolve();var st})).then((function(){fe.createTracks(Me),Ot()})).catch((function(st){Fe(st)}))}))},getThumbnailController:function(){return j},getBitrateListFor:function(pt){if(ht(),pt===u.A.IMAGE)return j?j.getBitrateList():[];var Ot=(function(Fe){for(var st=null,xe=0;xe<l.length;xe++)if((st=l[xe]).getType()===Fe)return st.getMediaInfo();return null})(pt);return P.getBitrateList(Ot)},updateData:function(pt){return new Promise((function(Ot){B=!0,Me=pt,Y&&qt();for(var Fe=[],st=0,xe=l.length;st<xe;st++){var Ge=l[st],lt=Ge.getMediaInfo();Fe.push(Ge.updateStreamInfo(Me));var ye=R.getAllMediaInfoForType(Me,Ge.getType());if(ye=ye.filter((function(wt){return!wt.isEmbedded}))){Ge.clearMediaInfoArray();for(var Te=0;Te<ye.length;Te++){var We=ye[Te];Ge.addMediaInfo(ye[Te]),R.areMediaInfosEqual(lt,We)&&(P.updateTopQualityIndex(We),Fe.push(Ge.selectMediaInfo(We)))}}}Promise.all(Fe).then((function(){for(Fe=[];te.length>0;){var wt=te.pop(),jt=wt.newMediaInfo,hn=ut(wt.oldMediaInfo);if(!hn)return;Fe.push(hn.prepareTrackSwitch()),Fe.push(hn.selectMediaInfo(jt))}return Promise.all(Fe)})).then((function(){B=!1,Yt(),K.trigger(i.A.STREAM_UPDATED,{streamInfo:Me}),Ot()}))}))},reset:function(pt){w&&(w.reset(),w=null),P&&Me&&P.clearDataForStream(Me.id),k&&(k.reset(),k=null),Ee(pt),Me=null,K.off(i.A.DATA_UPDATE_COMPLETED,ln,e),K.off(i.A.BUFFERING_COMPLETED,sn,e),K.off(i.A.INBAND_EVENTS,ke,e),ve&&(K.off(i.A.KEY_ERROR,dt,e),K.off(i.A.SERVER_CERTIFICATE_UPDATED,dt,e),K.off(i.A.LICENSE_REQUEST_COMPLETE,dt,e),K.off(i.A.KEY_SYSTEM_SELECTED,dt,e),K.off(i.A.KEY_SESSION_CREATED,dt,e),K.off(i.A.KEY_STATUSES_CHANGED,dt,e))},getProcessors:gt,setMediaSource:function(pt){return new Promise((function(Ot,Fe){for(var st=[],xe=0;xe<l.length;)at(l[xe].getMediaInfo())?(st.push(l[xe].setMediaSource(pt)),xe++):(l[xe].reset(),l.splice(xe,1));Promise.all(st).then((function(){for(var Ge=0;Ge<l.length;Ge++)l[Ge].dischargePreBuffer();if(l.length===0){var lt="No streams to play.";ue.error(new pe.A(me.MANIFEST_ERROR_ID_NOSTREAMS_CODE,lt+"nostreams",f.getValue())),o.fatal(lt)}Ot()})).catch((function(Ge){o.error(Ge),Fe(Ge)}))}))},isMediaCodecCompatible:function(pt){var Ot=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return Gt(pt,u.A.VIDEO,Ot)&&Gt(pt,u.A.AUDIO,Ot)},isProtectionCompatible:function(pt){return!pt||Dt(u.A.VIDEO,pt)&&Dt(u.A.AUDIO,pt)},getPreloaded:Zt,getIsEndedEventSignaled:function(){return oe},setIsEndedEventSignaled:Pe,getAdapter:function(){return R},getHasFinishedBuffering:function(){return b},setPreloaded:Kt,startScheduleControllers:function(){for(var pt=l.length,Ot=0;Ot<pt&&l[Ot];Ot++)l[Ot].getScheduleController().startScheduleTimer()},prepareTrackChange:function(pt){if(C&&Me){b=!1;var Ot=pt.newMediaInfo,Fe=f.getValue();R.setCurrentMediaInfo(Me.id,Ot.type,Ot);var st=ut(Ot);if(st){var xe=$.getTime();o.info("Stream - Process track changed at current time "+xe),Fe.refreshManifestOnSwitchTrack?(te.push(pt),L.getIsUpdating()||(o.debug("Stream - Refreshing manifest for switch track"),L.refreshManifest())):st.selectMediaInfo(Ot).then((function(){Ot.type!==u.A.VIDEO&&Ot.type!==u.A.AUDIO||P.updateTopQualityIndex(Ot),st.prepareTrackSwitch()}))}}},prepareQualityChange:function(pt){var Ot=tt(pt.mediaType);Ot&&Ot.prepareQualityChange(pt)}},(function(){try{he=(0,g.A)(Z).getInstance(),o=he.getLogger(e),Ee(),ie=(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:Me,mediaPlayerModel:N,dashMetrics:S,errHandler:ue,settings:Qe,boxParser:ie,dashConstants:n.A,urlUtils:z})}catch(pt){throw pt}})(),e}Er.__dashjs_factory_name="Stream";var Mr=h.A.getClassFactory(Er);function Sr(t,e,o){return Object.defineProperty(t,"prototype",{writable:!1}),t}var Gi=Sr((function t(e){(function(o,l){if(!(o instanceof l))throw new TypeError("Cannot call a class as a function")})(this,t),this.url=e||null,this.type=je.G.CONTENT_STEERING_TYPE,this.responseType="json"}));function ar(t,e,o){return Object.defineProperty(t,"prototype",{writable:!1}),t}var ji=ar((function t(){(function(e,o){if(!(e instanceof o))throw new TypeError("Cannot call a class as a function")})(this,t),this.version=null,this.ttl=300,this.reloadUri=null,this.pathwayPriority=[],this.pathwayClones=[]}));function lr(){var t,e,o,l,p,C,b,F,U,H,B,w,j,k,se,ie=this.context,he=(0,Ae.A)(ie).getInstance();function oe(P){f(P,"baseUrl")}function te(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(),$=se.getContentSteering(P);return $||($=j.getServiceDescriptionSettings().contentSteering),$}function S(){return new Promise((function(P){try{var $=N();if(!$||!$.serverUrl)return void P();var Y=(function(ve){var fe=ve.serverUrl;o&&o.reloadUri&&(fe=he.isRelative(o.reloadUri)?he.resolve(o.reloadUri,ve.serverUrl):o.reloadUri);var Ce=[],Me=l.baseUrl.all.concat(l.location.all);if(Me.length>0){var Qe=Me.map((function(at){var Nt=(function(Ee){if(!Ee||!p[Ee]||p[Ee].length===0)return-1;var Pe=p[Ee].reduce((function(ct,Ke){return ct+Ke}))/p[Ee].length;return parseInt(Pe)})(at);return{serviceLocation:at,throughput:Nt}}));Qe.sort((function(at,Nt){return Nt.throughput-at.throughput}));var $e="",Ze="";Qe.forEach((function(at,Nt){Nt!==0&&($e="".concat($e,","),at.throughput>-1&&(Ze="".concat(Ze,","))),$e="".concat($e).concat(at.serviceLocation),at.throughput>-1&&(Ze="".concat(Ze).concat(at.throughput))})),Ce.push({key:"_DASH_pathway",value:'"'.concat($e,'"')}),Ce.push({key:"_DASH_throughput",value:Ze})}return fe=Ft.A.addAditionalQueryParameterToUrl(fe,Ce)})($),ge=new Gi(Y);b.load({request:ge,success:function(ve){(function(fe){fe&&fe[n.A.CONTENT_STEERING_RESPONSE.VERSION]&&parseInt(fe[n.A.CONTENT_STEERING_RESPONSE.VERSION])===1&&((o=new ji).version=fe[n.A.CONTENT_STEERING_RESPONSE.VERSION],fe[n.A.CONTENT_STEERING_RESPONSE.TTL]&&!isNaN(fe[n.A.CONTENT_STEERING_RESPONSE.TTL])&&(o.ttl=fe[n.A.CONTENT_STEERING_RESPONSE.TTL]),fe[n.A.CONTENT_STEERING_RESPONSE.RELOAD_URI]&&(o.reloadUri=fe[n.A.CONTENT_STEERING_RESPONSE.RELOAD_URI]),fe[n.A.CONTENT_STEERING_RESPONSE.PATHWAY_PRIORITY]&&(o.pathwayPriority=fe[n.A.CONTENT_STEERING_RESPONSE.PATHWAY_PRIORITY]),fe[n.A.CONTENT_STEERING_RESPONSE.PATHWAY_CLONES]&&(o.pathwayClones=fe[n.A.CONTENT_STEERING_RESPONSE.PATHWAY_CLONES],o.pathwayClones=o.pathwayClones.filter((function(Ce){return(function(Me){return Me[n.A.CONTENT_STEERING_RESPONSE.BASE_ID]&&Me[n.A.CONTENT_STEERING_RESPONSE.ID]&&Me[n.A.CONTENT_STEERING_RESPONSE.URI_REPLACEMENT]&&Me[n.A.CONTENT_STEERING_RESPONSE.URI_REPLACEMENT][n.A.CONTENT_STEERING_RESPONSE.HOST]})(Ce)}))),V())})(ve),k.trigger(r.A.CONTENT_STEERING_REQUEST_COMPLETED,{currentSteeringResponseData:o,url:Y}),P()},error:function(ve,fe,Ce,Me){(function(Qe,$e){try{switch(e.warn("Error fetching data from content steering server",Qe),$e.status){case 410:break;case 429:var Ze=$e&&$e.getResponseHeader?$e.getResponseHeader("retry-after"):null;Ze!==null&&(o||(o={}),o.ttl=parseInt(Ze)),V();break;default:V()}}catch(at){e.error(at)}})(ve,Me),P(ve)},complete:function(){l.baseUrl.all=L(l.baseUrl),l.location.all=L(l.location)}})}catch(ve){P(ve)}}))}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 ge=P.filter((function(Qe){return Y[n.A.CONTENT_STEERING_RESPONSE.BASE_ID]===Qe.serviceLocation})),ve=null;if(ge&&ge.length>0&&(ve=ge[0]),ve){var fe=new URL(ve.url),Ce=Y[n.A.CONTENT_STEERING_RESPONSE.URI_REPLACEMENT][n.A.CONTENT_STEERING_RESPONSE.HOST];Ce=Ft.A.stringHasProtocol(Ce)?Ce:"".concat(fe.protocol,"//").concat(Ce);var Me={synthesizedUrl:"".concat(Ce).concat(fe.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:ve};$.push(Me)}})),$}catch(Y){return e.error(Y),[]}}function V(){o&&o.ttl&&!isNaN(o.ttl)&&(C&&clearTimeout(C),C=setTimeout((function(){S()}),1e3*o.ttl))}function de(){C&&clearTimeout(C),C=null}function ue(){o=null,p={},l={baseUrl:{current:null,all:[]},location:{current:null,all:[]}},de()}return t={reset:function(){ue(),k.off(r.A.FRAGMENT_LOADING_STARTED,oe,t),k.off(r.A.MANIFEST_LOADING_STARTED,te,t),k.off(r.A.MANIFEST_LOADING_FINISHED,Z,t),k.off(r.A.THROUGHPUT_MEASUREMENT_STORED,K,t)},setConfig:function(P){P&&(P.adapter&&(se=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:de,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 e.error($),[]}},getSynthesizedLocationElements:function(P){try{return R(P).map((function($){var Y=new Xt($.synthesizedUrl,$.serviceLocation);return Y.queryParams=$.queryParams,Y}))}catch($){return e.error($),[]}},initialize:function(){b=Mn(ie).create({errHandler:F,dashMetrics:U,mediaPlayerModel:H,requestModifier:w,errors:me}),k.on(r.A.FRAGMENT_LOADING_STARTED,oe,t),k.on(r.A.MANIFEST_LOADING_STARTED,te,t),k.on(r.A.MANIFEST_LOADING_FINISHED,Z,t),k.on(r.A.THROUGHPUT_MEASUREMENT_STORED,K,t)}},e=(0,g.A)(ie).getInstance().getLogger(t),ue(),t}lr.__dashjs_factory_name="ContentSteeringController";var Jr=h.A.getSingletonFactory(lr);function Aa(){var t,e,o,l=this.context,p=(0,le.A)(l).getInstance();return t={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 se=H[w],ie=B.findIndex((function(he){return he.serviceLocation&&he.serviceLocation===se}));if(ie!==-1&&!e.contains(B[ie].serviceLocation))return j=B[ie],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&&(e=C.blacklistController),C.contentSteeringController&&(o=C.contentSteeringController)},reset:function(){e.reset()}},e=$r(l).create({updateEventName:i.A.SERVICE_LOCATION_LOCATION_BLACKLIST_CHANGED,addBlacklistEventName:i.A.SERVICE_LOCATION_LOCATION_BLACKLIST_ADD}),o=Jr(l).getInstance(),t}Aa.__dashjs_factory_name="LocationSelector";var Xo=h.A.getClassFactory(Aa);function va(){var t,e,o,l,p,C,b,F,U,H,B,w,j,k,se=this.context,ie=(0,y.A)(se).getInstance(),he=(0,Ae.A)(se).getInstance();function oe(){o=NaN,b=!1,p=!0,C=!1,te()}function te(){l!==null&&(clearTimeout(l),l=null)}function Z(V){te(),C||(isNaN(V)&&!isNaN(o)&&(V=1e3*o),isNaN(V)||(e.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 de=U.getValue(),ue=de.url,P=null,$=B.getPatchLocation(de),Y=H.select($),ge=null;if(Y&&!V)ue=Y.url,P=Y.serviceLocation,ge=Y.queryParams;else{var ve=(function(Ce){var Me=B.getLocation(Ce),Qe=j.getSynthesizedLocationElements(Me);return Me.concat(Qe)})(de),fe=H.select(ve);fe&&(ue=fe.url,P=fe.serviceLocation,ge=fe.queryParams)}he.isRelative(ue)&&(ue=he.resolve(ue,de.url)),F.load(ue,P,ge)}function z(V){if(V){if(B.getIsPatch(V)){var de=V;V=U.getValue();var ue=B.isPatchValid(V,de),P=ue;if(ue){var $=B.getPublishTime(V);P=B.applyPatchToManifest(V,de);var Y=B.getPublishTime(V);P=$.getTime()!=Y.getTime()}if(!P)return e.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 ie.trigger(i.A.DYNAMIC_TO_STATIC),b=!1,void(C=!0);U.setValue(V);var ge=new Date,ve=(ge.getTime()-V.loadedTime.getTime())/1e3;1e3*(o=B.getManifestUpdatePeriod(V,ve))>2147483647&&(o=2147483647e-3),ie.trigger(i.A.MANIFEST_UPDATED,{manifest:V}),e.info("Manifest has been refreshed at "+ge+"["+ge.getTime()/1e3+"] "),p||Z()}function f(){p||(b?Z(k.get().streaming.manifestUpdateRetryInterval):K())}function N(V){V.error?V.error.code===me.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)&&te()}function R(){b=!1}return t={initialize:function(){oe(),ie.on(i.A.STREAMS_COMPOSED,R,this),ie.on(r.A.PLAYBACK_STARTED,S,this),ie.on(r.A.PLAYBACK_PAUSED,L,this),ie.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(){ie.off(r.A.PLAYBACK_STARTED,S,this),ie.off(r.A.PLAYBACK_PAUSED,L,this),ie.off(i.A.STREAMS_COMPOSED,R,this),ie.off(i.A.INTERNAL_MANIFEST_LOADED,N,this),oe()}},e=(0,g.A)(se).getInstance().getLogger(t),H=Xo(se).create(),t}va.__dashjs_factory_name="ManifestUpdater";var Ta=h.A.getClassFactory(va);function qi(){var t,e,o,l,p,C,b,F,U,H,B,w,j,k,se,ie,he=this.context,oe=(0,y.A)(he).getInstance(),te=(0,Ae.A)(he).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(fe){try{if(fe<=0)return void ge();var Ce=Date.now();C[j.schemeIdUri](j.value,(function(Me){var Qe=Date.now(),$e=N(Ce,Qe,Me);F.push($e),z(fe-1)}),(function(){ge()}))}catch{ge()}}function f(){var fe=(arguments.length>0&&arguments[0]!==void 0?arguments[0]:null)||0;if(!U||U.length===0||fe>=U.length)S();else{var Ce=U[fe];if(Ce)if(C.hasOwnProperty(Ce.schemeIdUri)){var Me=new Date().getTime();C[Ce.schemeIdUri](Ce.value,(function(Qe){var $e=new Date().getTime(),Ze=N(Me,$e,Qe);j=Ce,S(Ze)}),(function(){f(fe+1)}))}else f(fe+1);else S()}}function N(fe,Ce,Me){return Me-(Ce-(Ce-fe)/2)}function S(){var fe,Ce,Me=arguments.length>0&&arguments[0]!==void 0?arguments[0]:NaN,Qe=isNaN(Me);Qe&&p.get().streaming.utcSynchronization.useManifestDateHeaderTimeSource?(fe=b.getLatestMPDRequestHeaderValueByID("Date"),Ce=fe!==null?new Date(fe).getTime():Number.NaN,isNaN(Ce)?Y(!0):Y(!1,Ce-Date.now())):Y(Qe,Me)}function L(fe){var Ce=Date.parse(fe);return isNaN(Ce)&&(Ce=(function(Me){var Qe,$e,Ze=/^([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(Me);return Qe=Date.UTC(parseInt(Ze[1],10),parseInt(Ze[2],10)-1,parseInt(Ze[3],10),parseInt(Ze[4],10),parseInt(Ze[5],10),Ze[6]&&(parseInt(Ze[6],10)||0),Ze[7]&&1e3*parseFloat(Ze[7])||0),Ze[9]&&Ze[10]&&($e=60*parseInt(Ze[9],10)+parseInt(Ze[10],10),Qe+=(Ze[8]==="+"?-1:1)*$e*60*1e3),new Date(Qe).getTime()})(fe)),Ce}function R(fe){return Date.parse(fe)}function V(fe){return Date.parse(fe)}function de(fe,Ce,Me){Me()}function ue(fe,Ce,Me){var Qe=L(fe);isNaN(Qe)?Me():Ce(Qe)}function P(fe,Ce,Me,Qe,$e){var Ze,at,Nt=!1,Ee=new XMLHttpRequest,Pe=$e?je.G.HEAD:je.G.GET,ct=Ce.match(/\S+/g);if(Ce=ct.shift(),Ze=function(){Nt||(Nt=!0,ct.length?P(fe,ct.join(" "),Me,Qe,$e):Qe())},at=function(){var yt,ht;Ee.status===200&&(yt=$e?Ee.getResponseHeader("Date"):Ee.response,ht=fe(yt),isNaN(ht)||(Me(ht),Nt=!0))},te.isRelative(Ce)){var Ke=ie.resolve();Ke&&(Ce=te.resolve(Ce,Ke.url))}Ee.open(Pe,Ce),Ee.timeout=5e3,Ee.onload=at,Ee.onloadend=Ze,Ee.send()}function $(fe,Ce,Me){P(V,fe,Ce,Me,!0)}function Y(fe,Ce){if(isNaN(w)||isNaN(Ce)||fe||(function(Qe){try{var $e,Ze=ve(Qe),at=isNaN(k)?30:k,Nt=isNaN(p.get().streaming.utcSynchronization.timeBetweenSyncAttemptsAdjustmentFactor)?2:p.get().streaming.utcSynchronization.timeBetweenSyncAttemptsAdjustmentFactor,Ee=isNaN(p.get().streaming.utcSynchronization.maximumTimeBetweenSyncAttempts)?600:p.get().streaming.utcSynchronization.maximumTimeBetweenSyncAttempts,Pe=isNaN(p.get().streaming.utcSynchronization.minimumTimeBetweenSyncAttempts)?2:p.get().streaming.utcSynchronization.minimumTimeBetweenSyncAttempts;Ze?($e=Math.min(at*Nt,Ee),e.debug("Increasing timeBetweenSyncAttempts to ".concat($e))):($e=Math.max(at/Nt,Pe),e.debug("Decreasing timeBetweenSyncAttempts to ".concat($e))),k=$e}catch{}})(Ce),!fe&&!isNaN(Ce)){H=Date.now(),o=!1;var Me=isNaN(w);w=Ce,Me&&K(),e.debug("Completed UTC sync. Setting client - server offset to ".concat(Ce))}fe&&(j=null,o=!1,se.error(new pe.A(me.TIME_SYNC_FAILED_ERROR_CODE,me.TIME_SYNC_FAILED_ERROR_MESSAGE))),oe.trigger(i.A.UPDATE_TIME_SYNC_OFFSET,{offset:Ce}),oe.trigger(i.A.TIME_SYNCHRONIZATION_COMPLETED)}function ge(){if(F&&F.length!==0){var fe=F.reduce((function(Ce,Me){return Ce+Me}),0)/F.length;ve(fe)?e.debug("Completed background UTC sync. Offset is within allowed threshold and is not adjusted."):(e.debug("Completed background UTC sync. Setting client - server offset to ".concat(fe)),w=fe,oe.trigger(i.A.UPDATE_TIME_SYNC_OFFSET,{offset:w})),l=!1,B=Date.now()}}function ve(fe){try{if(isNaN(w))return!0;var Ce=p.get().streaming.utcSynchronization.maximumAllowedDrift&&!isNaN(p.get().streaming.utcSynchronization.maximumAllowedDrift)?p.get().streaming.utcSynchronization.maximumAllowedDrift:100;return fe>=w-Ce&&fe<=w+Ce}catch{return!0}}return t={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":ue,"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":ue,"urn:mpeg:dash:utc:http-ntp:2014":de,"urn:mpeg:dash:utc:ntp:2014":de,"urn:mpeg:dash:utc:sntp:2014":de}},attemptSync:function(fe,Ce){U=fe,o||((function(Me){try{if(!Me||!p.get().streaming.utcSynchronization.enabled)return!1;var Qe=isNaN(k)?30:k;return!(H&&Qe&&!isNaN(Qe))||(Date.now()-H)/1e3>=Qe}catch{return!0}})(Ce)?(o=!0,f()):oe.trigger(i.A.TIME_SYNCHRONIZATION_COMPLETED))},setConfig:function(fe){fe&&(fe.dashMetrics&&(b=fe.dashMetrics),fe.baseURLController&&(ie=fe.baseURLController),fe.errHandler&&(se=fe.errHandler),fe.settings&&(p=fe.settings))},reset:function(){Z(),oe.off(i.A.ATTEMPT_BACKGROUND_SYNC,K,t)}},e=(0,g.A)(he).getInstance().getLogger(t),oe.on(i.A.ATTEMPT_BACKGROUND_SYNC,K,t),t}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 Qo=Yi;function ba(){var t,e,o,l,p,C=this.context,b=(0,y.A)(C).getInstance();return t={attachMediaSource:function(F){var U=window.URL.createObjectURL(e);return F.setSource(U),l==="managedMediaSource"&&(F.setDisableRemotePlayback(!0),e.addEventListener("startstreaming",(function(){b.trigger(r.A.MANAGED_MEDIA_SOURCE_START_STREAMING)})),e.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?(e=new ManagedMediaSource,l="managedMediaSource",p.info("Created ManagedMediaSource")):U?(e=new MediaSource,l="mediaSource",p.info("Created MediaSource")):F&&(e=new WebKitMediaSource,p.info("Created WebkitMediaSource")),e},detachMediaSource:function(F){F.setSource(null)},setConfig:function(F){F&&F.settings&&(o=F.settings)},setDuration:function F(U){e&&e.readyState==="open"&&(U===null&&isNaN(U)||e.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})(e)?setTimeout(F.bind(null,U),50):(p.info("Set MediaSource duration:"+U),e.duration=U)))},setSeekable:function(F,U){e&&typeof e.setLiveSeekableRange=="function"&&typeof e.clearLiveSeekableRange=="function"&&e.readyState==="open"&&F>=0&&F<U&&(e.clearLiveSeekableRange(),e.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(t),t}ba.__dashjs_factory_name="MediaSourceController";var $o=h.A.getSingletonFactory(ba);function Sa(){var t,e,o,l,p,C,b,F,U,H,B,w="urn:mpeg:dash:event:2012",j=1,k="urn:mpeg:dash:event:callback:2015",se=1,ie=300,he="discarded",oe="updated",te="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(),ge=Y-C;ge=C>0?Math.max(0,ge):0,S(l,ge,Y),S(o,ge,Y),L(l),L(o),C=Y,H=!1}}catch(ve){H=!1,e.error(ve)}}function S(Y,ge,ve){try{ue(Y,(function(fe){if(fe!==void 0){var Ce=isNaN(fe.duration)?0:fe.duration;fe.calculatedPresentationTime<=ve&&fe.calculatedPresentationTime+ge+Ce>=ve?$(fe,r.A.EVENT_MODE_ON_START):(P(ve,Ce+ge,fe.calculatedPresentationTime)||(function(Me){try{var Qe=Me.eventStream.period.start+Me.eventStream.period.duration;return Me.calculatedPresentationTime>Qe}catch($e){return e.error($e),!1}})(fe))&&(e.debug("Removing event ".concat(fe.id," from period ").concat(fe.eventStream.period.id," as it is expired or invalid")),(function(Me,Qe){try{var $e=Qe.eventStream.schemeIdUri,Ze=Qe.eventStream.period.id,at=Qe.eventStream.value,Nt=Qe.id;Me[Ze][$e]=Me[Ze][$e].filter((function(Ee){return at&&Ee.eventStream.value&&Ee.eventStream.value!==at||Ee.id!==Nt})),Me[Ze][$e].length===0&&delete Me[Ze][$e]}catch(Ee){e.error(Ee)}})(Y,fe))}}))}catch(fe){e.error(fe)}}function L(Y){try{for(var ge in Y)Y.hasOwnProperty(ge)&&Object.keys(Y[ge]).length===0&&delete Y[ge]}catch(ve){e.error(ve)}}function R(Y,ge){var ve=arguments.length>2&&arguments[2]!==void 0&&arguments[2],fe=Y.eventStream.schemeIdUri,Ce=Y.eventStream.value,Me=Y.id,Qe=he;ge[fe]||(ge[fe]=[]);var $e=ge[fe].findIndex((function(at){return(!Ce||at.eventStream.value&&at.eventStream.value===Ce)&&at.id===Me}));if($e===-1)ge[fe].push(Y),Y.triggeredReceivedEvent=!1,Y.triggeredStartEvent=!1,Qe=te;else if(ve){var Ze=ge[fe][$e];Y.triggeredReceivedEvent=Ze.triggeredReceivedEvent,Y.triggeredStartEvent=Ze.triggeredStartEvent,ge[fe][$e]=Y,Qe=oe}return Qe}function V(Y){try{if(Y.eventStream.value==j){var ge,ve=Y.calculatedPresentationTime;ge=Y.calculatedPresentationTime==4294967295?NaN:Y.calculatedPresentationTime+Y.duration,K.trigger(r.A.MANIFEST_VALIDITY_CHANGED,{id:Y.id,validUntil:ve,newDuration:ge,newManifestValidAfter:NaN},{mode:r.A.EVENT_MODE_ON_START})}}catch(fe){e.error(fe)}}function de(Y){try{var ge=F.getTime();ue(Y,(function(ve){var fe=ve.eventStream&&ve.eventStream.period&&!isNaN(ve.eventStream.period.duration)?ve.eventStream.period.duration:NaN,Ce=ve.eventStream&&ve.eventStream.period&&!isNaN(ve.eventStream.period.start)?ve.eventStream.period.start:NaN;if(!isNaN(fe)&&!isNaN(Ce)){var Me=ve.calculatedPresentationTime;Math.abs(Me-ge)<ie&&$(ve,r.A.EVENT_MODE_ON_START)}}))}catch(ve){e.error(ve)}}function ue(Y,ge){try{if(Y)for(var ve=Object.keys(Y),fe=0;fe<ve.length;fe++)for(var Ce=Y[ve[fe]],Me=Object.keys(Ce),Qe=0;Qe<Me.length;Qe++)Ce[Me[Qe]].forEach((function($e){$e!==void 0&&ge($e)}))}catch($e){e.error($e)}}function P(Y,ge,ve){try{return Y-ge>ve}catch(fe){return e.error(fe),!1}}function $(Y,ge){try{var ve=F.getTime(),fe=Y.id;if(ge===r.A.EVENT_MODE_ON_RECEIVE&&!Y.triggeredReceivedEvent)return e.debug("Received event ".concat(fe)),Y.triggeredReceivedEvent=!0,void K.trigger(Y.eventStream.schemeIdUri,{event:Y},{mode:ge});Y.triggeredStartEvent||(Y.eventStream.schemeIdUri===w&&Y.eventStream.value==j?Y.duration===0&&Y.presentationTimeDelta===0||(e.debug("Starting manifest refresh event ".concat(fe," at ").concat(ve)),(function(){try{z(),b.refreshManifest()}catch(Ce){e.error(Ce)}})()):Y.eventStream.schemeIdUri===k&&Y.eventStream.value==se?(e.debug("Starting callback event ".concat(fe," at ").concat(ve)),(function(Ce){try{(0,Qt.A)(Z).create({}).load({method:"get",url:Ce,request:{responseType:"arraybuffer"}})}catch(Me){e.error(Me)}})(Y.messageData)):(e.debug("Starting event ".concat(fe," from period ").concat(Y.eventStream.period.id," at ").concat(ve)),K.trigger(Y.eventStream.schemeIdUri,{event:Y},{mode:ge})),Y.triggeredStartEvent=!0)}catch(Ce){e.error(Ce)}}return t={addInlineEvents:function(Y,ge){try{if(z(),o[ge]||(o[ge]={}),Y)for(var ve=0;ve<Y.length;ve++){var fe=Y[ve];if(!P(F.getTime(),isNaN(fe.duration)?0:fe.duration,fe.calculatedPresentationTime)){var Ce=R(fe,o[ge],!0);Ce===te?(e.debug("Added inline event with id ".concat(fe.id," from period ").concat(ge)),$(fe,r.A.EVENT_MODE_ON_RECEIVE)):Ce===oe&&e.debug("Updated inline event with id ".concat(fe.id," from period ").concat(ge))}}}catch(Me){throw Me}},addInbandEvents:function(Y,ge){try{z(),l[ge]||(l[ge]={});for(var ve=0;ve<Y.length;ve++){var fe=Y[ve];P(F.getTime(),isNaN(fe.duration)?0:fe.duration,fe.calculatedPresentationTime)||(R(fe,l[ge],!1)===te?(fe.eventStream.schemeIdUri===w&&V(fe),e.debug("Added inband event with id ".concat(fe.id," from period ").concat(ge)),$(fe,r.A.EVENT_MODE_ON_RECEIVE)):e.debug("Inband event with scheme_id_uri ".concat(fe.eventStream.schemeIdUri,", value ").concat(fe.eventStream.value,", period id ").concat(ge," and event id ").concat(fe.id," was ignored because it has been added before.")))}N()}catch(Ce){throw Ce}},getInbandEvents:function(){return l},getInlineEvents:function(){return o},start:function(){try{z(),e.debug("Start Event Controller");var Y=U.get().streaming.eventControllerRefreshDelay;B||isNaN(Y)||(B=!0,p=setInterval(N,Y))}catch(ge){throw ge}},setConfig:function(Y){try{if(!Y)return;Y.manifestUpdater&&(b=Y.manifestUpdater),Y.playbackController&&(F=Y.playbackController),Y.settings&&(U=Y.settings)}catch(ge){throw ge}},reset:function(){(function(){try{p!==null&&B&&(clearInterval(p),p=null,B=!1,(function(){try{de(l),de(o)}catch(Y){e.error(Y)}})())}catch(Y){throw Y}})(),f()}},e=(0,g.A)(Z).getInstance().getLogger(t),f(),t}Sa.__dashjs_factory_name="EventController";var Jo=h.A.getSingletonFactory(Sa),Pr={LEVELS:{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(t,e){(e==null||e>t.length)&&(e=t.length);for(var o=0,l=Array(e);o<e;o++)l[o]=t[o];return l}function Ia(){var t,e,o,l,p,C,b,F,U,H,B,w,j,k,se,ie,he,oe,te,Z,K,z,f,N,S,L,R,V,de,ue,P,$,Y,ge,ve,fe,Ce,Me,Qe,$e,Ze,at,Nt,Ee,Pe,ct,Ke,yt,ht=this.context,dt=(0,y.A)(ht).getInstance();function qt(){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 Yt(){(function(){try{var ze=F.getStreamsInfo();if(!f&&ze.length===0)throw new Error("There are no periods in the MPD");f&&ze.length>0&&U.updateManifestUpdateInfo({currentTime:Y.getTime(),buffered:$.getBufferRange(),presentationStartTime:ze[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||(e.debug("Removing stream ".concat(cn.getId())),cn.reset(!0)),Dn})):e.warn("No periods included in the current manifest. Skipping the filtering of outdated stream objects.")})(ze);for(var Ct=[],Jt=0,on=ze.length;Jt<on;Jt++){var mn=ze[Jt];Ct.push(ln(mn)),U.addManifestUpdateStreamInfo(mn)}Promise.all(Ct).then((function(){return new Promise((function(gn,cn){f?gn():ke(ze,gn,cn)}))})).then((function(){dt.trigger(i.A.STREAMS_COMPOSED),jt()})).catch((function(gn){throw gn}))}catch(gn){Z.error(new pe.A(me.MANIFEST_ERROR_ID_NOSTREAMS_CODE,gn.message+" nostreamscomposed",b.getValue())),ue=!0,wr()}})()}function sn(){Pe=!0}function ln(ze){var Ct=si(ze.id);return Ct?Ct.updateData(ze):(Ct=Mr(ht).create({manifestModel:b,mediaPlayerModel:ve,dashMetrics:U,manifestUpdater:p,adapter:F,timelineConverter:K,capabilities:o,capabilitiesFilter:l,errHandler:Z,baseURLController:j,segmentBaseController:k,textController:S,abrController:ie,playbackController:Y,eventController:oe,mediaController:he,protectionController:N,videoModel:$,streamInfo:ze,settings:Ee}),z.push(Ct),Ct.initialize(),Promise.resolve())}function ke(ze,Ct,Jt){try{st();var on=U.getCurrentDVRInfo().range;if(on.end<on.start){ct&&clearTimeout(ct);var mn=Math.min(1e3*(-1*(on.end-on.start)+2),2147483647);return e.debug("Waiting for ".concat(mn," ms before playback can start")),dt.trigger(i.A.AST_IN_FUTURE,{delay:mn}),void(ct=setTimeout((function(){ke(ze,Ct,Jt)}),mn))}Ee.get().streaming.applyProducerReferenceTime&&ge.calculateProducerReferenceTimeOffsets(ze);var gn=ze[0].manifestInfo;if(Ee.get().streaming.applyServiceDescription&&ge.applyServiceDescription(gn),F.getIsDynamic()){var cn=ir(ze,gn);Y.computeAndSetLiveDelay(cn,gn)}(Ee.get().streaming.applyContentSteering&&w.shouldQueryBeforeStart()?w.loadSteeringData():Promise.resolve()).then((function(){var Dn=b.getValue();Dn&&j.update(Dn),ut(),Ct()})).catch((function(Dn){e.error(Dn),ut(),Ct()}))}catch(Dn){Jt(Dn)}}function ut(){var ze=(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(Ke)&&Ke.toString().indexOf("posix:")===-1){var cn=Pn(!0);isNaN(cn)||(e.info("Start time from URI parameters: ".concat(cn)),on=Math.min(on,cn))}else{e.info("Start time provided by the app: ".concat(Ke));var Dn=Zn(!0,Ke);isNaN(Dn)||(on=Math.min(on,Dn))}var wn=Ee.get().streaming.timeShiftBuffer.calcFromSegmentTimeline?.1:0;on=Math.max(on,gn.start+wn)}}else if(on=Pi()[0].getStreamInfo().start,isNaN(Ke)){var or=Pn(!1);isNaN(or)||(e.info("Start time from URI parameters: ".concat(or)),on=Math.max(on,or))}else{e.info("Start time provided by the app: ".concat(Ke));var Ko=Zn(!1,Ke);isNaN(Ko)||(on=Math.max(on,Ko))}return on})(),Ct=Fe(ze),Jt=Ct!==null?Ct:z[0];dt.trigger(i.A.INITIAL_STREAM_SWITCH,{startTime:ze}),tt(Jt,null,ze),$e||($e=setInterval((function(){!V&&Y.getTimeToStreamEnd()<=0&&!Y.isSeeking()&&dt.trigger(i.A.PLAYBACK_ENDED,{isLast:_r().isLast})}),200))}function tt(ze,Ct,Jt){try{if(V||!ze||Ct===ze&&ze.getIsActive())return;V=!0,dt.trigger(i.A.PERIOD_SWITCH_STARTED,{fromStreamInfo:Ct?Ct.getStreamInfo():null,toStreamInfo:ze.getStreamInfo()});var on=!1;f=ze,Ct&&(on=pt(ze,Ct),Ct.deactivate(on)),Jt=isNaN(Jt)?!on&&Ct?ze.getStreamInfo().start:NaN:Jt,e.info("Switch to stream ".concat(ze.getId(),". Seektime is ").concat(Jt,", current playback time is ").concat(Y.getTime(),". Seamless period switch is set to ").concat(on)),at=at.filter((function(mn){return mn.getId()!==f.getId()})),Y.initialize(_r(),!!Ct),$.getElement()?gt(Jt,on,!1):Dt(Jt,on)}catch{V=!1}}function gt(ze,Ct){var Jt,on=arguments.length>2&&arguments[2]!==void 0&&arguments[2];function mn(){if(P&&P.readyState==="open"){e.debug("MediaSource is open!"),window.URL.revokeObjectURL(Jt),P.removeEventListener("sourceopen",mn),P.removeEventListener("webkitsourceopen",mn),jn();var cn=U.getCurrentDVRInfo();H.setSeekable(cn.range.start,cn.range.end),on?(isNaN(ze)||Y.seek(ze,!0,!0),f.setMediaSource(P).then((function(){f.initializeForTextWithMediaSource(P)}))):Dt(ze,Ct)}}function gn(){P.addEventListener("sourceopen",mn,!1),P.addEventListener("webkitsourceopen",mn,!1),Jt=H.attachMediaSource($),e.debug("MediaSource attached to element. Waiting on open...")}P?Ct?Dt(ze,Ct):(H.detachMediaSource($),gn()):(P=H.createMediaSource(),gn())}function Dt(ze,Ct){f.activate(P,Ct?Ze:void 0,ze).then((function(Jt){if(Jt){var on=Object.keys(Jt);on.length>0&&Jt[on[0]].getBuffer().changeType&&(Nt=!0),Ze=Jt}isNaN(ze)||(dt.trigger(i.A.SEEK_TARGET,{time:ze},{streamId:f.getId()}),Y.seek(ze,!1,!0),f.startScheduleControllers()),V=!1,dt.trigger(i.A.PERIOD_SWITCH_COMPLETED,{toStreamInfo:_r()})}))}function Vt(ze){var Ct=Fe(ze.seekTime);Ct&&Ct!==f?Ct&&Ct!==f&&(Gt(),(function(Jt,on){var mn=Jt&&!isNaN(Jt.seekTime)?Jt.seekTime:NaN,gn=f.getProcessors().map((function(cn){return cn.prepareOuterPeriodPlaybackSeeking(Jt)}));Promise.all(gn).then((function(){tt(on,f,mn)})).catch((function(cn){Z.error(cn)}))})(ze,Ct)):(Gt(),(function(Jt){f.getProcessors().forEach((function(on){return on.prepareInnerPeriodPlaybackSeeking(Jt)})),fr(Ve.USER_REQUEST_STOP_REASON)})(ze)),dr(Ye.SEEK_START_REASON)}function Gt(){Kt()}function Kt(){at&&at.length>0&&(at.forEach((function(ze){ze.deactivate(!0)})),at=[])}function Zt(ze){if(ze.newMediaInfo.streamInfo.id===f.getId()){if(Kt(),Ee.get().streaming.buffer.resetSourceBuffersForTrackSwitch&&ze.oldMediaInfo&&ze.oldMediaInfo.codec!==ze.newMediaInfo.codec){var Ct=Y.getTime();return f.deactivate(!1),void gt(Ct,!1,!1)}f.prepareTrackChange(ze)}}function pt(ze,Ct){try{return Ee.get().streaming.buffer.reuseExistingSourceBuffers&&(Ct.isProtectionCompatible(ze)||Pe)&&(Nt&&Ee.get().streaming.buffer.useChangeTypeForTrackSwitch||Ct.isMediaCodecCompatible(ze,Ct))}catch{return!1}}function Ot(ze){var Ct=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;P&&!ze.getPreloaded()&&pt(ze,Ct)&&ze.startPreloading(P,Ze).then((function(){at.push(ze)}))}function Fe(ze){if(isNaN(ze))return null;for(var Ct=z.length,Jt=0;Jt<Ct;Jt++){var on=z[Jt];if(ze<parseFloat((on.getStartTime()+on.getDuration()).toFixed(5)))return on}return null}function st(){try{var ze=F.getIsDynamic(),Ct=F.getStreamsInfo()[0].manifestInfo,Jt=Y.getTime(),on=K.calcTimeShiftBufferWindow(z,ze),mn=En();if(on.start===void 0||on.end===void 0)return;mn&&mn.length!==0?mn.forEach((function(gn){U.addDVRInfo(gn.getType(),Jt,Ct,on)})):U.addDVRInfo(u.A.VIDEO,Jt,Ct,on)}catch{}}function xe(ze){if(Me&&R){var Ct=ve.getInitialBufferLevel(),Jt=[u.A.TEXT];(isNaN(Ct)||Ct<=Y.getBufferLevel(Jt)||F.getIsDynamic()&&Ct>Y.getLiveDelay())&&(Me=!1,dr(Ye.INITIAL_PLAYOUT_START_REASON),Y.play())}ze&&ze.mediaType&&U.addBufferLevel(ze.mediaType,new Date,1e3*ze.bufferLevel)}function Ge(ze){ze.streamInfo.id===f.getId()&&ze.reason&&ze.reason.forceReplace&&Kt(),si(ze.streamInfo.id).prepareQualityChange(ze)}function lt(){if(F.getIsDynamic()&&Y.getOriginalLiveDelay()!==0&&f){var ze=F.getStreamsInfo();if(ze.length>0){var Ct=ze[0].manifestInfo,Jt=ir(ze,Ct);Y.computeAndSetLiveDelay(Jt,Ct)}}}function ye(){if(er()){var ze=$.getPlaybackQuality();ze&&U.addDroppedFrames(ze)}}function Te(){e.debug("[onPlaybackStarted]"),!Me&&Ce&&dr(Ye.RESUME_FROM_PAUSE_START_REASON),Me&&(Me=!1),Qe&&(Qe=!1,Ee.get().streaming.applyContentSteering&&!w.shouldQueryBeforeStart()&&w.loadSteeringData()),Ce=!1}function We(ze){e.debug("[onPlaybackPaused]"),ze.ended||(Ce=!0,fr(Ve.USER_REQUEST_STOP_REASON))}function wt(ze){e.debug("Stream with id ".concat(ze.streamInfo.id," finished buffering"));var Ct=ze.streamInfo.isLast;P&&Ct?(e.info("[onStreamBufferingCompleted] calls signalEndOfStream of mediaSourceController."),H.signalEndOfStream(P)):jt()}function jt(){if(f&&f.getHasFinishedBuffering())for(var ze=(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),Ct=0;Ct<ze.length;){var Jt=ze[Ct],on=Ct===0?f:ze[Ct-1];!Jt.getPreloaded()&&on.getHasFinishedBuffering()&&P&&Ot(Jt,on),Ct+=1}}function hn(){$e&&(clearInterval($e),$e=null)}function En(){return f?f.getProcessors():[]}function dn(ze){if(f&&!f.getIsEndedEventSignaled()){f.setIsEndedEventSignaled(!0);var Ct=(function(){var Jt=(arguments.length>0&&arguments[0]!==void 0?arguments[0]:null)||f||null;if(!Jt)return null;for(var on=Jt.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})();Ct?(e.debug("StreamController onEnded, found next stream with id ".concat(Ct.getStreamInfo().id,". Switching from ").concat(f.getStreamInfo().id," to ").concat(Ct.getStreamInfo().id)),tt(Ct,f,NaN)):(e.debug("StreamController no next stream found"),f.setIsEndedEventSignaled(!1)),fr(Ct?Ve.END_OF_PERIOD_STOP_REASON:Ve.END_OF_CONTENT_STOP_REASON)}ze&&ze.isLast&&(hn(),w.stopSteeringRequestTimer())}function jn(ze){var Ct=ze||_r().manifestInfo.duration;H.setDuration(Ct)}function Pn(ze){var Ct=se.getURIFragmentData();if(!Ct||!Ct.t)return NaN;var Jt=Pi()[0].getStreamInfo().start;return Ct.t=Ct.t.split(",")[0],Ir(ze,Ct.t,Jt)}function Zn(ze,Ct){var Jt=0;return ze||(Jt=Pi()[0].getStreamInfo().start),Ir(ze,Ct,Jt)}function Ir(ze,Ct,Jt){var on=F.getRegularPeriods()[0],mn=Ct.toString(),gn=mn.indexOf("posix:")!==-1?mn.substring(6)==="now"?Date.now()/1e3:parseFloat(mn.substring(6)):NaN;return ze&&!isNaN(gn)?K.calcPresentationTimeFromWallTime(new Date(1e3*gn),on):parseFloat(mn)+Jt}function ir(ze,Ct){try{var Jt=NaN;if(Ct&&!isNaN(Ct.maxFragmentDuration)&&isFinite(Ct.maxFragmentDuration))return Ct.maxFragmentDuration;if(ze&&ze.length===1){var on=ze[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}),[]);Jt=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(Jt)?Jt:NaN}catch{return NaN}var gn}function cr(ze){if(ze.error)ue=!0,wr();else{e.info("Manifest updated... updating data system wide.");var Ct=ze.manifest;F.updatePeriods(Ct);var Jt=F.getUTCTimingSources();!F.getIsDynamic()||Jt&&Jt.length!==0||dt.trigger(r.A.CONFORMANCE_VIOLATION,{level:Pr.LEVELS.WARNING,event:Pr.EVENTS.NO_UTC_TIMING_ELEMENT});var on=F.getIsDynamic()?Jt.concat(fe.getUTCTimingSources()):Jt;l.filterUnsupportedFeatures(Ct).then((function(){j.initialize(Ct),B.attemptSync(on,F.getIsDynamic())}))}}function er(){return!!f&&f.getHasVideoTrack()}function Rr(){return!!f&&f.getHasAudioTrack()}function fr(ze,Ct){Ct=Ct||new Date,En().forEach((function(Jt){Jt.finalisePlayList(Ct,ze)})),U.addPlayList()}function dr(ze){U.createPlaylistMetrics(1e3*Y.getTime(),ze)}function Oi(ze){if(ze.error){var Ct="";switch(ze.error.code){case 1:Ct="MEDIA_ERR_ABORTED";break;case 2:Ct="MEDIA_ERR_NETWORK";break;case 3:Ct="MEDIA_ERR_DECODE",yt.counts.mediaErrorDecode+=1;break;case 4:Ct="MEDIA_ERR_SRC_NOT_SUPPORTED";break;case 5:Ct="MEDIA_ERR_ENCRYPTED";break;default:Ct="UNKNOWN"}Ct==="MEDIA_ERR_DECODE"&&Ee.get().errors.recoverAttempts.mediaErrorDecode>=yt.counts.mediaErrorDecode?(function(){e.warn("A MEDIA_ERR_DECODE occured: Resetting the MediaSource");var Jt=Y.getTime();f.deactivate(!1),e.warn("MediaSource has been resetted. Resuming playback from time ".concat(Jt)),gt(Jt,!1,!1)})():(de=!0,ze.error.message&&(Ct+=" ("+ze.error.message+")"),ze.error.msExtendedCode&&(Ct+=" (0x"+(ze.error.msExtendedCode>>>0).toString(16).toUpperCase()+")"),e.fatal("Video Element Error: "+Ct),ze.error&&e.fatal(ze.error),Z.error(new pe.A(ze.error.code,Ct)),wr())}}function _r(){return f?f.getStreamInfo():null}function si(ze){for(var Ct=0,Jt=z.length;Ct<Jt;Ct++)if(z[Ct].getId()===ze)return z[Ct];return null}function Br(ze){isNaN(ze.newDuration)||jn(ze.newDuration)}function Mi(){z=[],Ke=NaN,N=null,V=!1,f=null,de=!1,ue=!1,Me=!0,Qe=!0,Ce=!1,R=!0,$e=null,Pe=!1,Nt=!1,at=[],ct=null,yt={counts:{mediaErrorDecode:0}}}function wr(){qt(),B.reset(),fr(de||ue?Ve.FAILURE_STOP_REASON:Ve.USER_REQUEST_STOP_REASON);for(var ze=0,Ct=z?z.length:0;ze<Ct;ze++)z[ze].reset(de);dt.off(r.A.PLAYBACK_TIME_UPDATED,ye,t),dt.off(r.A.PLAYBACK_SEEKING,Vt,t),dt.off(r.A.PLAYBACK_ERROR,Oi,t),dt.off(r.A.PLAYBACK_STARTED,Te,t),dt.off(r.A.PLAYBACK_PAUSED,We,t),dt.off(r.A.PLAYBACK_ENDED,dn,t),dt.off(r.A.METRIC_ADDED,ma,t),dt.off(r.A.MANIFEST_VALIDITY_CHANGED,Br,t),dt.off(r.A.BUFFER_LEVEL_UPDATED,xe,t),dt.off(r.A.QUALITY_CHANGE_REQUESTED,Ge,t),i.A.KEY_SESSION_UPDATED&&dt.off(i.A.KEY_SESSION_UPDATED,sn,t),dt.off(i.A.MANIFEST_UPDATED,cr,t),dt.off(i.A.STREAM_BUFFERING_COMPLETED,wt,t),dt.off(i.A.TIME_SYNCHRONIZATION_COMPLETED,Yt,t),dt.off(i.A.CURRENT_TRACK_CHANGED,Zt,t),dt.off(i.A.SETTING_UPDATED_LIVE_DELAY,lt,t),dt.off(i.A.SETTING_UPDATED_LIVE_DELAY_FRAGMENT_COUNT,lt,t),j.reset(),p.reset(),oe.reset(),U.clearAllCurrentMetrics(),b.setValue(null),C.reset(),K.reset(),te.reset(),P&&(H.detachMediaSource($),P=null),$=null,N&&(N=null,L=null,b.getValue()&&dt.trigger(i.A.PROTECTION_DESTROYED,{data:b.getValue().url})),hn(),dt.trigger(i.A.STREAM_TEARDOWN_COMPLETE),Mi()}function ma(ze){if(ze.metric===_.A.DVR_INFO){var Ct=Rr()?u.A.AUDIO:u.A.VIDEO;ze.mediaType===Ct&&H.setSeekable(ze.value.range.start,ze.value.range.end)}}function Pi(){return z}return t={initialize:function(ze,Ct){qt(),R=ze,L=Ct,K.initialize(),(p=Ta(ht).create()).setConfig({manifestModel:b,adapter:F,manifestLoader:C,errHandler:Z,settings:Ee,contentSteeringController:w}),p.initialize(),(oe=Jo(ht).getInstance()).setConfig({manifestUpdater:p,playbackController:Y,settings:Ee}),oe.start(),B.setConfig({dashMetrics:U,baseURLController:j,errHandler:Z,settings:Ee}),B.initialize(),H.setConfig({settings:Ee}),N&&(dt.trigger(i.A.PROTECTION_CREATED,{controller:N}),N.setMediaElement($.getElement()),L&&N.setProtectionData(L)),dt.on(r.A.PLAYBACK_TIME_UPDATED,ye,t),dt.on(r.A.PLAYBACK_SEEKING,Vt,t),dt.on(r.A.PLAYBACK_ERROR,Oi,t),dt.on(r.A.PLAYBACK_STARTED,Te,t),dt.on(r.A.PLAYBACK_PAUSED,We,t),dt.on(r.A.PLAYBACK_ENDED,dn,t),dt.on(r.A.METRIC_ADDED,ma,t),dt.on(r.A.MANIFEST_VALIDITY_CHANGED,Br,t),dt.on(r.A.BUFFER_LEVEL_UPDATED,xe,t),dt.on(r.A.QUALITY_CHANGE_REQUESTED,Ge,t),i.A.KEY_SESSION_UPDATED&&dt.on(i.A.KEY_SESSION_UPDATED,sn,t),dt.on(i.A.MANIFEST_UPDATED,cr,t),dt.on(i.A.STREAM_BUFFERING_COMPLETED,wt,t),dt.on(i.A.TIME_SYNCHRONIZATION_COMPLETED,Yt,t),dt.on(i.A.CURRENT_TRACK_CHANGED,Zt,t),dt.on(i.A.SETTING_UPDATED_LIVE_DELAY,lt,t),dt.on(i.A.SETTING_UPDATED_LIVE_DELAY_FRAGMENT_COUNT,lt,t)},getActiveStreamInfo:_r,addDVRMetric:st,hasVideoTrack:er,hasAudioTrack:Rr,getStreamById:si,getStreamForTime:Fe,getTimeRelativeToStreamId:function(ze,Ct){for(var Jt=null,on=0,mn=0,gn=null,cn=0;cn<z.length;cn++){if(mn=(Jt=z[cn]).getStartTime(),gn=Jt.getDuration(),Number.isFinite(mn)&&(on=mn),Jt.getId()===Ct)return ze-on;Number.isFinite(gn)&&(on+=gn)}return null},load:function(ze){var Ct=arguments.length>1&&arguments[1]!==void 0?arguments[1]:NaN;qt(),Ke=Ct,C.load(ze)},loadWithManifest:function(ze){var Ct=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")})(),Ke=Ct,p.setManifest(ze)},getActiveStreamProcessors:En,setConfig:function(ze){ze&&(ze.capabilities&&(o=ze.capabilities),ze.capabilitiesFilter&&(l=ze.capabilitiesFilter),ze.manifestLoader&&(C=ze.manifestLoader),ze.manifestModel&&(b=ze.manifestModel),ze.mediaPlayerModel&&(ve=ze.mediaPlayerModel),ze.customParametersModel&&(fe=ze.customParametersModel),ze.protectionController&&(N=ze.protectionController),ze.adapter&&(F=ze.adapter),ze.dashMetrics&&(U=ze.dashMetrics),ze.errHandler&&(Z=ze.errHandler),ze.timelineConverter&&(K=ze.timelineConverter),ze.videoModel&&($=ze.videoModel),ze.playbackController&&(Y=ze.playbackController),ze.serviceDescriptionController&&(ge=ze.serviceDescriptionController),ze.contentSteeringController&&(w=ze.contentSteeringController),ze.textController&&(S=ze.textController),ze.abrController&&(ie=ze.abrController),ze.mediaController&&(he=ze.mediaController),ze.settings&&(Ee=ze.settings),ze.baseURLController&&(j=ze.baseURLController),ze.uriFragmentModel&&(se=ze.uriFragmentModel),ze.segmentBaseController&&(k=ze.segmentBaseController),ze.manifestUpdater&&(p=ze.manifestUpdater))},setProtectionData:function(ze){L=ze,N&&N.setProtectionData(L)},getIsStreamSwitchInProgress:function(){return V},switchToVideoElement:function(ze){f&&(Y.initialize(_r()),gt(ze,!1,!0))},getHasMediaOrInitialisationError:function(){return de||ue},getStreams:Pi,getActiveStream:function(){return f},getInitialPlayback:function(){return Me},getAutoPlay:function(){return R},refreshManifest:function(){p.getIsUpdating()||p.refreshManifest()},reset:wr},e=(0,g.A)(ht).getInstance().getLogger(t),B=Qo(ht).getInstance(),H=$o(ht).getInstance(),te=Oe(ht).getInstance(),Mi(),t}Ia.__dashjs_factory_name="StreamController";var Ra=h.A.getSingletonFactory(Ia);function wa(){var t,e,o,l,p,C,b,F,U,H,B,w,j=this.context,k=(0,y.A)(j).getInstance();function se(){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,te,this),k.off(i.A.PLAYBACK_SEEKING,ie,this),k.off(i.A.BUFFER_REPLACEMENT_STARTED,he,t),k.off(i.A.TRACK_CHANGE_RENDERED,oe,t)})(),p=null,C=NaN,l=0,H=null,B={}}function ie(){H&&(clearTimeout(H),H=null)}function he(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 oe(f){f&&f.mediaType&&(B[f.mediaType]=!1)}function te(){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();e===f?z(f,!0):(e=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,de=o.get().streaming.gaps.jumpLargeGaps,ue=U.getBufferRange(),P=NaN,$=!1;if(N=(function(at,Nt){try{if(!at||at.length<=1&&Nt>0)return NaN;for(var Ee=NaN,Pe=0;isNaN(Ee)&&Pe<at.length;){var ct=Pe>0?at.end(Pe-1):0;Nt<at.start(Pe)&&ct-Nt<o.get().streaming.gaps.threshold&&(Ee=Pe),Pe+=1}return Ee}catch{return null}})(ue,f),!isNaN(N)){var Y=ue.start(N),ge=Y-f;ge>0&&(ge<=V||de)&&(P=Y)}var ve=b.getTimeToStreamEnd();if(isNaN(P)&&S&&isFinite(ve)&&!isNaN(ve)&&ve<V&&(P=parseFloat(b.getStreamEndTime().toFixed(5)),$=!0),L&&isNaN(P)&&S&&isNaN(N)&&(function(at,Nt){for(var Ee=0,Pe=at.length;Ee<Pe;Ee++)if(Nt>=at.start(Ee)&&Nt<=at.end(Ee))return!0;return!1})(ue,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 fe=P-f;if($){var Ce=F.getStreamForTime(P),Me=Ce&&!!Ce.getPreloaded();w.warn("Jumping to end of stream because of gap from ".concat(f," to ").concat(P,". Gap duration: ").concat(fe)),b.seek(P,!0,Me)}else{var Qe=b.getIsDynamic(),$e=N>0?ue.end(N-1):f,Ze=Qe?1e3*Math.max(0,fe-.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($e," and ending at ").concat(P,". Jumping by: ").concat(P-$e)),H=null}),Ze)}C=P}}return t={reset:se,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,te,this),k.on(i.A.PLAYBACK_SEEKING,ie,this),k.on(i.A.BUFFER_REPLACEMENT_STARTED,he,t),k.on(i.A.TRACK_CHANGE_RENDERED,oe,t)})()}},w=(0,g.A)(j).getInstance().getLogger(t),se(),t}wa.__dashjs_factory_name="GapController";var Zo=h.A.getSingletonFactory(wa);function Na(){var t,e,o,l,p,C,b,F,U,H,B=this.context,w=(0,y.A)(B).getInstance();function j(){e=!1;var z=Ft.A.parseUserAgent();o=z&&z.browser&&z.browser.name&&z.browser.name.toLowerCase()==="safari"}function k(){e=!1}function se(z){if(z.streamId===C.getActiveStreamInfo().id&&U){var f=b.getLiveDelay();b.getBufferLevel()>f/2&&(U=!1)}}function ie(z){z.streamId===C.getActiveStreamInfo().id&&(U=z.state===_.A.BUFFER_EMPTY)}function he(){F.getCatchupModeEnabled()||l.setPlaybackRate(1)}function oe(){b.getIsDynamic()&&F.getCatchupModeEnabled()&&(F.getCatchupPlaybackRates().max>0||F.getCatchupPlaybackRates().min<0)&&!b.isPaused()&&!b.isSeeking()&&(function(){try{return!(!b.getTime()>0||e)&&(Z()===u.A.LIVE_CATCHUP_MODE_LOLP?(function(z,f){try{return Math.abs(te())>0||z<f}catch{return!1}})(b.getBufferLevel(),p.get().streaming.liveCatchup.playbackBufferMin):(function(){try{return Math.abs(te())>0}catch{return!1}})())}catch{return!1}})()&&(function(){if(!e&&l){var z,f=l.getPlaybackRate(),N=F.getCatchupPlaybackRates(),S=b.getBufferLevel(),L=te(),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"),e=!0,b.seekToCurrentLive(!0,!1);else{var V=b.getCurrentLiveLatency(),de=b.getLiveDelay();z=Z()===u.A.LIVE_CATCHUP_MODE_LOLP?(function(P,$,Y,ge,ve){var fe;if(ve<ge){var Ce=Math.abs(P.min),Me=5*(ve-ge);fe=1-Ce+2*Ce/(1+Math.pow(Math.E,-Me)),H.debug("[LoL+ playback control_buffer-based] bufferLevel: "+ve+", newRate: "+fe)}else{if(Math.abs($-Y)<=.02*Y)fe=1;else{var Qe=$-Y,$e=Qe<0?Math.abs(P.min):P.max,Ze=5*Qe;fe=1-$e+2*$e/(1+Math.pow(Math.E,-Ze))}H.debug("[LoL+ playback control_latency-based] latency: "+$+", newRate: "+fe)}return fe})(N,V,de,p.get().streaming.liveCatchup.playbackBufferMin,S):(function(P,$,Y,ge){if(U)return 1;var ve=$-Y,fe=ve<0?Math.abs(P.min):P.max,Ce=5*ve,Me=1-fe+2*fe/(1+Math.pow(Math.E,-Ce));return b.getPlaybackStalled()&&ge<=Y/2&&ve>0&&(Me=1),Me})(N,V,de,S);var ue=o?.25:.02/(.5/N.max);z&&Math.abs(f-z)>=ue&&(H.debug("[CatchupController]: Setting playback rate to ".concat(z)),l.setPlaybackRate(z))}}})()}function te(){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 t={reset:function(){w.off(r.A.BUFFER_LEVEL_UPDATED,se,t),w.off(r.A.BUFFER_LEVEL_STATE_CHANGED,ie,t),w.off(r.A.PLAYBACK_PROGRESS,oe,t),w.off(r.A.PLAYBACK_TIME_UPDATED,oe,t),w.off(r.A.PLAYBACK_SEEKED,k,t),w.off(i.A.SETTING_UPDATED_CATCHUP_ENABLED,he,t),w.off(i.A.SETTING_UPDATED_PLAYBACK_RATE_MIN,K,t),w.off(i.A.SETTING_UPDATED_PLAYBACK_RATE_MAX,K,t),w.off(r.A.STREAM_INITIALIZED,K,t),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,se,t),w.on(r.A.BUFFER_LEVEL_STATE_CHANGED,ie,t),w.on(r.A.PLAYBACK_PROGRESS,oe,t),w.on(r.A.PLAYBACK_TIME_UPDATED,oe,t),w.on(r.A.PLAYBACK_SEEKED,k,t),w.on(i.A.SETTING_UPDATED_CATCHUP_ENABLED,he,t),w.on(i.A.SETTING_UPDATED_PLAYBACK_RATE_MIN,K,t),w.on(i.A.SETTING_UPDATED_PLAYBACK_RATE_MAX,K,t),w.on(r.A.STREAM_INITIALIZED,K,t),K()}},H=(0,g.A)(B).getInstance().getLogger(t),j(),t}Na.__dashjs_factory_name="CatchupController";var es=h.A.getSingletonFactory(Na),ts=[u.A.SERVICE_DESCRIPTION_DVB_LL_SCHEME],Ca="video",Da="audio";function Oa(){var t,e,o,l,p,C=this.context;function b(){e={liveDelay:NaN,liveCatchup:{maxDrift:NaN,playbackRate:{min:NaN,max:NaN}},minBitrate:{},maxBitrate:{},initialBitrate:{},contentSteering:null},o=[]}function F(U,H,B){try{e[U][H]=B/1e3}catch(w){l.error(w)}}return t={getServiceDescriptionSettings:function(){return e},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(se,ie){return se.concat(p.getAllMediaInfoForType(j,ie))}),[]).reduce((function(se,ie){return p.getProducerReferenceTimes(j,ie).forEach((function(he){var oe=p.getVoRepresentations(ie);if(oe&&oe.length>0&&oe[0].adaptation&&oe[0].segmentInfoType===n.A.SEGMENT_TEMPLATE){var te=oe[0],Z=new Date(he[n.A.WALL_CLOCK_TIME]).getTime()/1e3-(he[n.A.PRESENTATION_TIME]/te[n.A.TIMESCALE]-te[n.A.PRESENTATION_TIME_OFFSET]+j.start),K=w-Z;se.push({id:he[n.A.ID],to:K})}})),se}),[]);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(oe){return{liveDelay:oe.latency.target/1e3,maxDrift:!isNaN(oe.latency.max)&&oe.latency.max>oe.latency.target?(oe.latency.max-oe.latency.target+500)/1e3:NaN,referenceId:oe.latency.referenceId||NaN}})(j),o.length>0){var se=(function(oe){var te,Z=0,K=o.filter((function(z){return z.id===oe.referenceId}));return K.length===0?(Z=o.length>0?o[0].to:0,te=o[0].id||NaN):(Z=K[0].to||0,te=K[0].id||NaN),{to:Z,id:te}})(k),ie=se.to,he=se.id;e.liveDelay=k.liveDelay-ie,e.liveCatchup.maxDrift=k.maxDrift,l.debug(`
6
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()),Ze=$e[0],at=$e[1];de=Ze.getReader(),ue=[],de.read().then((function yt(ht){var dt=ht.value,qt=ht.done;if(Qe=Date.now(),dt&&dt.length){var Yt=Qe-Me,sn=dt.length;ue.push({chunkDownloadTimeRelativeMS:Qe-f,chunkDownloadDurationMS:Yt,chunkBytes:sn,kbps:Math.round(8*sn/(Yt/1e3)),bufferLevel:o.getCurrentBufferLevel(se.mediaType)})}if(qt){var ln=Qe-f,ke=ue.reduce((function(ut,tt){return ut+tt.chunkBytes}),0);return C.addMeasurement(se,ln,ue,K,z,L),void w.progress({loaded:ke,total:ke,lengthComputable:!0,time:C.getEstimatedDownloadDurationMS(se),stream:!0})}return Me=Date.now(),de.read().then(yt)})),w.reader=at.getReader()}else w.reader=N.body.getReader();var Nt=[],Ee=[],Pe=[],ct=!0,Ke=function(yt){var ht=yt.value;if(yt.done){if(fe){if(Z!==u.A.ABR_FETCH_THROUGHPUT_CALCULATION_AAST){var dt=null,qt=null;Z===u.A.ABR_FETCH_THROUGHPUT_CALCULATION_MOOF_PARSING?(dt=(function(ke,ut){try{var tt,gt;tt=ke.filter((function(Ot,Fe){return Fe<ke.length-1})),gt=ut.filter((function(Ot,Fe){return Fe<ut.length-1}));var Dt=[];if(tt.length>1){for(var Vt=0,Gt=0,Kt=0;Kt<tt.length;Kt++)if(tt[Kt]&&gt[Kt]){var Zt=gt[Kt].ts-tt[Kt].ts;if(Zt>1)Dt.push(8*gt[Kt].bytes/Zt),Gt=0;else{Gt===0&&(Gt=tt[Kt].ts,Vt=0);var pt=gt[Kt].ts-Gt;pt>1?(Vt+=gt[Kt].bytes,Dt.push(8*Vt/pt),Gt=0):Vt+=gt[Kt].bytes}}if(Dt.length>0)return Dt.reduce((function(Ot,Fe){return Ot+Fe}),0)/Dt.length}return null}catch{return null}})(Ee,Pe),dt&&(qt=8*ge/dt)):Z===u.A.ABR_FETCH_THROUGHPUT_CALCULATION_DOWNLOADED_DATA&&(qt=B(Nt,ge)),w.progress({loaded:ge,total:isNaN(Y)?ge:Y,lengthComputable:!0,time:qt,stream:!0})}w.response.response=fe.buffer}return w.onload(),void w.onend()}if(ht&&ht.length>0){fe=(function(ke,ut){if(ke.length===0)return ut;var tt=new Uint8Array(ke.length+ut.length);return tt.set(ke),tt.set(ut,ke.length),tt})(fe,ht),ge+=ht.length,Nt.push({ts:Date.now(),bytes:ht.length}),Z===u.A.ABR_FETCH_THROUGHPUT_CALCULATION_MOOF_PARSING&&ct&&b.findLastTopIsoBoxCompleted(["moof"],fe,Ce).found&&(ct=!1,Ee.push({ts:performance.now(),bytes:ht.length}));var Yt=b.findLastTopIsoBoxCompleted(["moov","mdat"],fe,Ce);if(Yt.found){var sn,ln=Yt.lastCompletedOffset+Yt.size;Z!==u.A.ABR_FETCH_THROUGHPUT_CALCULATION_MOOF_PARSING||ct||(ct=!0,Pe.push({ts:performance.now(),bytes:fe.length})),ln===fe.length?(sn=fe,fe=new Uint8Array):(sn=new Uint8Array(fe.subarray(0,ln)),fe=fe.subarray(ln)),w.progress({data:sn.buffer,lengthComputable:!1,noTrace:!0}),Ce=0}else Ce=Yt.lastCompletedOffset,ve||(w.progress({lengthComputable:!1,noTrace:!0}),ve=!0)}H(w,Ke)};H(w,Ke)})).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(ie){return ie.bytes>j/4/w.length}))).length>1){var k=0,se=(w[w.length-1].ts-w[0].ts)/w.length;return w.forEach((function(ie,he){var oe=w[he+1];if(oe){var te=oe.ts-ie.ts;k+=te<se?te:0}})),k}return null}catch{return null}}return e={load:function(w){p&&p.modifyRequest?(0,De.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}},e}xn.__dashjs_factory_name="FetchLoader";var Hn=h.A.getClassFactory(xn),An=M(7125);function Un(t){return Un=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Un(t)}function Sn(t,e){for(var o=0;o<e.length;o++){var l=e[o];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(t,Gn(l.key),l)}}function Gn(t){var e=(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)})(t);return Un(e)=="symbol"?e:e+""}var Vn=(function(){return t=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},(e=[{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(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e})();function Wn(t,e,o){return Object.defineProperty(t,"prototype",{writable:!1}),t}var hr=Wn((function t(){(function(e,o){if(!(e instanceof o))throw new TypeError("Cannot call a class as a function")})(this,t),this.period=null,this.index=-1,this.type=null}));function Or(t,e,o){return Object.defineProperty(t,"prototype",{writable:!1}),t}var gr=Or((function t(){(function(e,o){if(!(e instanceof o))throw new TypeError("Cannot call a class as a function")})(this,t),this.id=null,this.index=-1,this.duration=NaN,this.start=NaN,this.mpd=null,this.nextPeriodId=null}));gr.DEFAULT_ID="defaultId";var ur=gr;function mr(t,e,o){return Object.defineProperty(t,"prototype",{writable:!1}),t}var Yr=mr((function t(){(function(e,o){if(!(e instanceof o))throw new TypeError("Cannot call a class as a function")})(this,t),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})),Hr=M(289);function vr(t,e,o){return Object.defineProperty(t,"prototype",{writable:!1}),t}var Vr=vr((function t(){(function(e,o){if(!(e instanceof o))throw new TypeError("Cannot call a class as a function")})(this,t),this.type="",this.duration=NaN,this.presentationTime=NaN,this.id=NaN,this.messageData="",this.eventStream=null,this.presentationTimeDelta=NaN}));function Bi(t,e,o){return Object.defineProperty(t,"prototype",{writable:!1}),t}var Mr=Bi((function t(e,o,l,p){(function(C,b){if(!(C instanceof b))throw new TypeError("Cannot call a class as a function")})(this,t),this.url=e||"",this.serviceLocation=o||e||"",this.dvbPriority=l||1,this.dvbWeight=p||1,this.availabilityTimeOffset=0,this.availabilityTimeComplete=!0,this.queryParams={}}));Mr.DEFAULT_DVB_PRIORITY=1,Mr.DEFAULT_DVB_WEIGHT=1;var Pr=Mr;function di(t,e,o){return Object.defineProperty(t,"prototype",{writable:!1}),t}var pi=di((function t(){(function(e,o){if(!(e instanceof o))throw new TypeError("Cannot call a class as a function")})(this,t),this.adaptionSet=null,this.representation=null,this.period=null,this.timescale=1,this.value="",this.schemeIdUri="",this.presentationTimeOffset=0}));function hi(t,e,o){return Object.defineProperty(t,"prototype",{writable:!1}),t}var gi=hi((function t(){(function(e,o){if(!(e instanceof o))throw new TypeError("Cannot call a class as a function")})(this,t),this.id=null,this.inband=!1,this.type="encoder",this.applicationScheme=null,this.wallClockTime=null,this.presentationTime=NaN,this.UTCTiming=null}));function Kr(t,e,o){return Object.defineProperty(t,"prototype",{writable:!1}),t}var Lr=Kr((function t(){(function(e,o){if(!(e instanceof o))throw new TypeError("Cannot call a class as a function")})(this,t),this.defaultServiceLocation=null,this.defaultServiceLocationArray=[],this.queryBeforeStart=!1,this.serverUrl=null,this.clientRequirement=!0}));function Tr(t){return Tr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Tr(t)}function ot(t,e){for(var o=0;o<e.length;o++){var l=e[o];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(t,et(l.key),l)}}function et(t){var e=(function(o){if(Tr(o)!="object"||!o)return o;var l=o[Symbol.toPrimitive];if(l!==void 0){var p=l.call(o,"string");if(Tr(p)!="object")return p;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(o)})(t);return Tr(e)=="symbol"?e:e+""}var rt=(function(){return t=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},(e=[{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}}])&&ot(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e})(),we=M(426),Je=M.n(we);function bt(){return{areEqual:function(t,e){return Je()(t,e)}}}bt.__dashjs_factory_name="ObjectUtils";var Et=h.A.getSingletonFactory(bt),Bt=M(6028);function xt(t,e,o){return Object.defineProperty(t,"prototype",{writable:!1}),t}var Xt=xt((function t(e,o){(function(l,p){if(!(l instanceof p))throw new TypeError("Cannot call a class as a function")})(this,t),this.url=e||"",this.serviceLocation=o||null,this.queryParams={}}));function $t(t,e,o){return Object.defineProperty(t,"prototype",{writable:!1}),t}var kt=$t((function t(e,o,l){(function(p,C){if(!(p instanceof C))throw new TypeError("Cannot call a class as a function")})(this,t),this.url=e||"",this.serviceLocation=o||null,this.ttl=l||NaN,this.queryParams={}}));function _t(t){return _t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_t(t)}function Wt(t,e){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(t);e&&(l=l.filter((function(p){return Object.getOwnPropertyDescriptor(t,p).enumerable}))),o.push.apply(o,l)}return o}function Ht(t){for(var e=1;e<arguments.length;e++){var o=arguments[e]!=null?arguments[e]:{};e%2?Wt(Object(o),!0).forEach((function(l){an(t,l,o[l])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):Wt(Object(o)).forEach((function(l){Object.defineProperty(t,l,Object.getOwnPropertyDescriptor(o,l))}))}return t}function an(t,e,o){return(e=(function(l){var p=(function(C){if(_t(C)!="object"||!C)return C;var b=C[Symbol.toPrimitive];if(b!==void 0){var F=b.call(C,"string");if(_t(F)!="object")return F;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(C)})(l);return _t(p)=="symbol"?p:p+""})(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}function pn(t,e){var o=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!o){if(Array.isArray(t)||(o=vn(t))||e){o&&(t=o);var l=0,p=function(){};return{s:p,n:function(){return l>=t.length?{done:!0}:{done:!1,value:t[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(t)},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(t,e){if(t){if(typeof t=="string")return tn(t,e);var o={}.toString.call(t).slice(8,-1);return o==="Object"&&t.constructor&&(o=t.constructor.name),o==="Map"||o==="Set"?Array.from(t):o==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?tn(t,e):void 0}}function tn(t,e){(e==null||e>t.length)&&(e=t.length);for(var o=0,l=Array(e);o<e;o++)l[o]=t[o];return l}function St(){var t,e,o,l,p=this.context,C=(0,Ae.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=he(f.Representation_asArray[0]);if(S&&S.length>0&&Bt._.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,de=0;de<f.Representation_asArray.length;de++)if((V=f.Representation_asArray[de]).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 se(f){return f&&f.Period_asArray?f.Period_asArray:[]}function ie(f){var N=!1;return f&&f.hasOwnProperty("type")&&(N=f.type===n.A.DYNAMIC),N}function he(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 oe(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 te(f,N){if(!f)throw new Error("Period cannot be null or undefined");var S=ur.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 pi;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 Pr,de=R.__text||R;return C.isRelative(de)&&(L=!0,f.baseUri&&(de=C.resolve(de,f.baseUri))),V.url=de,R.hasOwnProperty(n.A.SERVICE_LOCATION)&&R.serviceLocation.length?V.serviceLocation=R.serviceLocation:V.serviceLocation=de,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 Lr;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 t={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 tn(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 gi;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 rt().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 rt().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 rt().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 rt().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 rt().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(Et(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),de=[];for(L=0,R=V.length;L<R;L++)F(V[L],S)&&de.push(j(V[L]));return de},getRealPeriods:se,getRealPeriodForIndex:function(f,N){var S=se(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:ie,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=[],de=(function(fe){if(fe&&fe.period&&b(fe.period.index)){var Ce=fe.period.mpd.manifest.Period_asArray[fe.period.index];if(Ce&&Ce.AdaptationSet_asArray&&b(fe.index))return j(Ce.AdaptationSet_asArray[fe.index])}})(f);if(de&&de.Representation_asArray){if(f&&f.period&&b(f.period.index)){var ue=K(f.period.mpd.manifest);ue&&(S=ue[0])}for(var P=0,$=de.Representation_asArray.length;P<$;++P){var Y=de.Representation_asArray[P],ge=new Vn;if(ge.index=P,ge.adaptation=f,Y.hasOwnProperty(n.A.ID)&&(ge.id=Y.id),Y.hasOwnProperty(n.A.CODECS)&&(ge.codecs=Y.codecs),Y.hasOwnProperty(n.A.MIME_TYPE)&&(ge.mimeType=Y[n.A.MIME_TYPE]),Y.hasOwnProperty(n.A.CODEC_PRIVATE_DATA)&&(ge.codecPrivateData=Y.codecPrivateData),Y.hasOwnProperty(n.A.BANDWITH)&&(ge.bandwidth=Y.bandwidth),Y.hasOwnProperty(n.A.WIDTH)&&(ge.width=Y.width),Y.hasOwnProperty(n.A.HEIGHT)&&(ge.height=Y.height),Y.hasOwnProperty(n.A.SCAN_TYPE)&&(ge.scanType=Y.scanType),Y.hasOwnProperty(n.A.MAX_PLAYOUT_RATE)&&(ge.maxPlayoutRate=Y.maxPlayoutRate),Y.hasOwnProperty(n.A.SEGMENT_BASE)?(N=Y.SegmentBase,ge.segmentInfoType=n.A.SEGMENT_BASE):Y.hasOwnProperty(n.A.SEGMENT_LIST)?(N=Y.SegmentList).hasOwnProperty(n.A.SEGMENT_TIMELINE)?ge.segmentInfoType=n.A.SEGMENT_TIMELINE:ge.segmentInfoType=n.A.SEGMENT_LIST:Y.hasOwnProperty(n.A.SEGMENT_TEMPLATE)?((N=Y.SegmentTemplate).hasOwnProperty(n.A.SEGMENT_TIMELINE)?ge.segmentInfoType=n.A.SEGMENT_TIMELINE:ge.segmentInfoType=n.A.SEGMENT_TEMPLATE,N.hasOwnProperty(n.A.INITIALIZATION_MINUS)&&(ge.initialization=N.initialization.split("$Bandwidth$").join(Y.bandwidth).split("$RepresentationID$").join(Y.id))):ge.segmentInfoType=n.A.BASE_URL,ge.essentialProperties=he(Y),N){if(N.hasOwnProperty(n.A.INITIALIZATION)){var ve=N.Initialization;ve.hasOwnProperty(n.A.SOURCE_URL)&&(ge.initialization=ve.sourceURL),ve.hasOwnProperty(n.A.RANGE)&&(ge.range=ve.range)}else B(de)&&U(de)&&de.mimeType&&de.mimeType.indexOf("application/mp4")===-1&&(ge.range=0);N.hasOwnProperty(n.A.TIMESCALE)&&(ge.timescale=N.timescale),N.hasOwnProperty(n.A.DURATION)?ge.segmentDuration=N.duration/ge.timescale:Y.hasOwnProperty(n.A.SEGMENT_TEMPLATE)&&(N=Y.SegmentTemplate).hasOwnProperty(n.A.SEGMENT_TIMELINE)&&(ge.segmentDuration=oe(N.SegmentTimeline)/ge.timescale),N.hasOwnProperty(n.A.MEDIA)&&(ge.media=N.media),N.hasOwnProperty(n.A.START_NUMBER)&&(ge.startNumber=N.startNumber),N.hasOwnProperty(n.A.INDEX_RANGE)&&(ge.indexRange=N.indexRange),N.hasOwnProperty(n.A.PRESENTATION_TIME_OFFSET)&&(ge.presentationTimeOffset=N.presentationTimeOffset/ge.timescale),N.hasOwnProperty(n.A.AVAILABILITY_TIME_OFFSET)?ge.availabilityTimeOffset=N.availabilityTimeOffset:S&&S.availabilityTimeOffset!==void 0&&(ge.availabilityTimeOffset=S.availabilityTimeOffset),N.hasOwnProperty(n.A.AVAILABILITY_TIME_COMPLETE)?ge.availabilityTimeComplete=N.availabilityTimeComplete!=="false":S&&S.availabilityTimeComplete!==void 0&&(ge.availabilityTimeComplete=S.availabilityTimeComplete)}ge.MSETimeOffset=(R=(L=ge).presentationTimeOffset,L.adaptation.period.start-R),ge.path=[f.period.index,f.index,P],V.push(ge)}}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 hr,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:e.warn("Unknown Adaptation stream type"),V.push(N);return V},getRegularPeriods:function(f){var N,S,L=!!f&&ie(f.manifest),R=[],V=null,de=null,ue=null,P=null;for(S=0,N=f&&f.manifest&&f.manifest.Period_asArray?f.manifest.Period_asArray.length:0;S<N;S++)(de=f.manifest.Period_asArray[S]).hasOwnProperty(n.A.START)?(P=new ur).start=de.start:V!==null&&V.hasOwnProperty(n.A.DURATION)&&ue!==null?(P=new ur).start=parseFloat((ue.start+ue.duration).toFixed(5)):S!==0||L||((P=new ur).start=0),ue!==null&&isNaN(ue.duration)&&(P!==null?ue.duration=parseFloat((P.start-ue.start).toFixed(5)):e.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=te(de,S),P.index=S,P.mpd=f,de.hasOwnProperty(n.A.DURATION)&&(P.duration=de.duration),ue&&(ue.nextPeriodId=P.id),R.push(P),V=de,ue=P),de=null,P=null;return R.length===0||ue!==null&&isNaN(ue.duration)&&(ue.duration=parseFloat(((function($){(function(){if(!o||!o.hasOwnProperty("error"))throw new Error(u.A.MISSING_CONFIG_ERROR)})();var Y,ge=ie($.mpd.manifest);return $.mpd.manifest.mediaPresentationDuration?Y=$.mpd.manifest.mediaPresentationDuration:$.duration?Y=$.duration:ge?Y=Number.POSITIVE_INFINITY:o.error(new pe.A(me.MANIFEST_ERROR_ID_PARSE_CODE,"Must have @mediaPresentationDuration on MPD or an explicit @duration on the last period.",$)),Y})(ue)-ue.start).toFixed(5))),R},getMpd:function(f){var N=new Yr;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,de=[];if(V)for(N=0;N<V.length;N++){var ue=new pi;if(ue.period=f,ue.timescale=1,!V[N].hasOwnProperty(u.A.SCHEME_ID_URI))throw new Error("Invalid EventStream. SchemeIdUri has to be set");for(ue.schemeIdUri=V[N][u.A.SCHEME_ID_URI],V[N].hasOwnProperty(n.A.TIMESCALE)&&(ue.timescale=V[N][n.A.TIMESCALE]),V[N].hasOwnProperty(n.A.VALUE)&&(ue.value=V[N][n.A.VALUE]),V[N].hasOwnProperty(n.A.PRESENTATION_TIME_OFFSET)&&(ue.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 Vr;$.presentationTime=0,$.eventStream=ue,P.hasOwnProperty(n.A.PRESENTATION_TIME)&&($.presentationTime=P.presentationTime);var Y=ue.presentationTimeOffset?ue.presentationTimeOffset/ue.timescale:0;$.calculatedPresentationTime=$.presentationTime/ue.timescale+f.start-Y,P.hasOwnProperty(n.A.DURATION)&&($.duration=P.duration/ue.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,de.push($)}}return de},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]]=Ht({},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 rt().init(N)})):[]},getEssentialPropertiesForRepresentation:he,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,de;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)&&(de=V.Representation_asArray[N.index])&&(L=de.InbandEventStream_asArray),Z(L,N,S)},getUTCTimingSources:function(f){var N=ie(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 de=new Hr.A;V.hasOwnProperty(u.A.SCHEME_ID_URI)&&(de.schemeIdUri=V.schemeIdUri,V.hasOwnProperty(n.A.VALUE)&&(de.value=V.value.toString(),R.push(de)))})),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 Xt(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 kt(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,de=null,ue=null,P=null,$=null,Y=null,ge=null;for(var ve in R)R.hasOwnProperty(ve)&&(ve===n.A.ID?V=R[ve]:ve===n.A.SERVICE_DESCRIPTION_SCOPE?de=R[ve].schemeIdUri:ve===n.A.SERVICE_DESCRIPTION_LATENCY?ue={target:parseInt(R[ve].target),max:parseInt(R[ve].max),min:parseInt(R[ve].min),referenceId:parseInt(R[ve].referenceId)}:ve===n.A.SERVICE_DESCRIPTION_PLAYBACK_RATE?P={max:parseFloat(R[ve].max),min:parseFloat(R[ve].min)}:ve===n.A.SERVICE_DESCRIPTION_OPERATING_QUALITY?$={mediaType:R[ve].mediaType,max:parseInt(R[ve].max),min:parseInt(R[ve].min),target:parseInt(R[ve].target),type:R[ve].type,maxQualityDifference:parseInt(R[ve].maxQualityDifference)}:ve===n.A.SERVICE_DESCRIPTION_OPERATING_BANDWIDTH?Y={mediaType:R[ve].mediaType,max:parseInt(R[ve].max),min:parseInt(R[ve].min),target:parseInt(R[ve].target)}:ve===n.A.CONTENT_STEERING&&(ge=z(R[ve])));N.push({id:V,schemeIdUri:de,latency:ue,playbackRate:P,operatingQuality:$,operatingBandwidth:Y,contentSteering:ge})}}catch(fe){L.e(fe)}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]]=Ht({},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 rt().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]]=Ht({},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 rt().init(N)})):[]},setConfig:function(f){f&&(f.errHandler&&(o=f.errHandler),f.BASE64&&(l=f.BASE64))}},e=(0,g.A)(p).getInstance().getLogger(t),t}St.__dashjs_factory_name="DashManifestModel";var It=h.A.getSingletonFactory(St),Ft=M(1739);function rn(t,e){var o=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!o){if(Array.isArray(t)||(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}})(t))||e){o&&(t=o);var l=0,p=function(){};return{s:p,n:function(){return l>=t.length?{done:!0}:{done:!1,value:t[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(t)},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(t,e){(e==null||e>t.length)&&(e=t.length);for(var o=0,l=Array(e);o<e;o++)l[o]=t[o];return l}function _n(){var t,e,o,l,p,C,b,F,U,H,B=this.context,w=(0,y.A)(B).getInstance(),j=(0,le.A)(B).getInstance();function k(){o={pr:1,nor:null,st:null,sf:null,sid:"".concat(Ft.A.generateUuid()),cid:null},U={},F={},H={},ie()}function se(){ie()}function ie(){if(C){var R=C.getStreamController();if(R&&typeof R.getActiveStream=="function"){var V=R.getActiveStream();V&&(b=V.getProcessors())}}}function he(R,V){var de,ue={},P=rn(V);try{for(P.s();!(de=P.n()).done;){var $=de.value;R[$]&&(ue[$]=R[$])}}catch(Y){P.e(Y)}finally{P.f()}return ue}function oe(R){var V=j.get().streaming.cmcd.enabledKeys;return R.filter((function(de){return V.includes(de)}))}function te(R){try{return R.type===je.G.MPD_TYPE?((de=Z()).ot="m",de):R.type===je.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(ue){var P,$=Z(),Y=(function(at){try{var Nt=at.quality,Ee=at.mediaInfo.bitrateList;return parseInt(Ee[Nt].bandwidth/1e3)}catch{return null}})(ue),ge=(function(at){try{return isNaN(at.duration)?NaN:Math.round(1e3*at.duration)}catch{return null}})(ue),ve=(function(at){try{return 100*parseInt(l.getThroughputHistory().getSafeAverageThroughput(at)/100)}catch{return null}})(ue.mediaType),fe=(function(at){try{var Nt=o.pr,Ee=p.getCurrentBufferLevel(at);return isNaN(Nt)||isNaN(Ee)?null:100*parseInt(Ee/Nt*10)}catch{return null}})(ue.mediaType),Ce=K(ue.mediaType),Me=(function(at){try{var Nt=l.getTopBitrateInfoFor(at);return Math.round(Nt.bitrate/1e3)}catch{return null}})(ue.mediaType),Qe=o.pr,$e=(function(at){if(b&&b.length!==0){var Nt,Ee=rn(b);try{for(Ee.s();!(Nt=Ee.n()).done;){var Pe=Nt.value;if(Pe.getType()===at)return Pe.probeNextRequest()}}catch(ct){Ee.e(ct)}finally{Ee.f()}}})(ue.mediaType);ue.mediaType===u.A.VIDEO&&(P="v"),ue.mediaType===u.A.AUDIO&&(P="a"),ue.mediaType===u.A.TEXT&&(P=ue.mediaInfo.mimeType==="application/mp4"?"tt":"c");var Ze=j.get().streaming.cmcd.rtp;return Ze||(Ze=(function(at){try{var Nt=C.getPlaybackRate();Nt||(Nt=1);var Ee=at.quality,Pe=at.mediaType,ct=at.mediaInfo,Ke=at.duration;if(!ct)return NaN;var yt=K(Pe);yt===0&&(yt=500);var ht=ct.bitrateList[Ee].bandwidth*Ke/1e3/(yt/Nt/1e3),dt=j.get().streaming.cmcd.rtpSafetyFactor&&!isNaN(j.get().streaming.cmcd.rtpSafetyFactor)?j.get().streaming.cmcd.rtpSafetyFactor:5;return 100*(parseInt(ht*dt/100)+1)}catch{return NaN}})(ue)),isNaN(Ze)||($.rtp=Ze),$e&&(ue.url!==$e.url?$.nor=encodeURIComponent(Ft.A.getRelativeUrl(ue.url,$e.url)):$e.range&&($.nrr=$e.range)),Y&&($.br=Y),P&&($.ot=P),isNaN(ge)||($.d=ge),isNaN(ve)||($.mtp=ve),isNaN(fe)||($.dl=fe),isNaN(Ce)||($.bl=Ce),isNaN(Me)||($.tb=Me),isNaN(Qe)||Qe===1||($.pr=Qe),U[ue.mediaType]&&($.bs=!0,U[ue.mediaType]=!1),!F[ue.mediaType]&&H[ue.mediaType]||($.su=!0,F[ue.mediaType]=!1,H[ue.mediaType]=!0),$})(R)):R.type===je.G.INIT_SEGMENT_TYPE?(function(){var ue=Z();return ue.ot="i",ue.su=!0,ue})():R.type===je.G.OTHER_TYPE||R.type===je.G.XLINK_EXPANSION_TYPE?(function(){var ue=Z();return ue.ot="o",ue})():R.type===je.G.LICENSE?(function(){var ue=Z();return ue.ot="k",ue})():null}catch{return null}var V,de}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=t.getIsDynamic(R.data)?"l":"v",de=R.protocol&&R.protocol==="MSS"?"s":"d";o.st="".concat(V),o.sf="".concat(de)}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($)})),de=V.length,ue=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<de-1&&(P+=",")),P}),"");return(ue=ue.replace(/=true/g,"")).replace(/,\s*$/,"")}catch{return null}}return e={getQueryParameter:function(R){try{if(j.get().streaming.cmcd&&j.get().streaming.cmcd.enabled){var V=te(R),de=(function(P){try{var $=j.get().streaming.cmcd.enabledKeys;return Object.keys(P).filter((function(Y){return $.includes(Y)})).reduce((function(Y,ge){return Y[ge]=P[ge],Y}),{})}catch{return P}})(V),ue=L(de);return w.trigger(An.A.CMCD_DATA_GENERATED,{url:R.url,mediaType:R.mediaType,cmcdData:V,cmcdString:ue}),{key:"CMCD",value:ue}}return null}catch{return null}},getHeaderParameters:function(R){try{if(j.get().streaming.cmcd&&j.get().streaming.cmcd.enabled){var V=te(R),de=he(V,oe(["br","d","ot","tb"])),ue=he(V,oe(["bl","dl","mtp","nor","nrr","su"])),P=he(V,oe(["bs","rtp"])),$=he(V,oe(["cid","pr","sf","sid","st","v"])),Y={"CMCD-Object":L(de),"CMCD-Request":L(ue),"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,e),w.off(r.A.PLAYBACK_SEEKED,S,e),k()},initialize:function(){w.on(r.A.PLAYBACK_RATE_CHANGED,z,e),w.on(r.A.MANIFEST_LOADED,f,e),w.on(r.A.BUFFER_LEVEL_STATE_CHANGED,N,e),w.on(r.A.PLAYBACK_SEEKED,S,e),w.on(r.A.PERIOD_SWITCH_COMPLETED,se,e)}},t=It(B).getInstance(),k(),e}_n.__dashjs_factory_name="CmcdModel";var Tn=h.A.getSingletonFactory(_n);function Yn(t){return Yn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Yn(t)}function Kn(){Kn=function(p,C){return new o(p,void 0,C)};var t=RegExp.prototype,e=new WeakMap;function o(p,C,b){var F=RegExp(p,C);return e.set(F,b||e.get(p)),In(F,o.prototype)}function l(p,C){var b=e.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=t.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=e.get(this);return t[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 t[Symbol.replace].call(this,p,(function(){var U=arguments;return Yn(U[U.length-1])!="object"&&(U=[].slice.call(U)).push(l(U,F)),C.apply(this,U)}))}return t[Symbol.replace].call(this,p,C)},Kn.apply(this,arguments)}function In(t,e){return In=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,l){return o.__proto__=l,o},In(t,e)}var kn="static",Ln="dynamic",zn="cmsd-",br=zn+kn,yr=zn+Ln,tr="stream",Xn=["mb","st","sf","v"],mi={video:"v",audio:"a",text:"tt",stream:tr},yi=/^[-0-9]/;function Wr(){var t,e,o,l,p=this.context,C=(0,y.A)(p).getInstance();function b(){o={},l={}}function F(k){k&&Object.keys(k).forEach((function(se){Xn.includes(se)||delete k[se]}))}function U(k){return!k||k.toLowerCase()!=="false"&&(yi.test(k)?parseInt(k,10):k.replace(/["]+/g,""))}function H(k){try{for(var se={},ie=k.split(","),he=0;he<ie.length;he++){var oe=ie[he].split("="),te=oe[0],Z=U(oe[1]);se[te]=Z}return se}catch(K){e.error("Failed to parse CMSD-Static response header value:",K)}}function B(k){try{for(var se={},ie=k.split(","),he=ie[ie.length-1].split(";"),oe=1;oe<he.length;oe++){var te=he[oe].split("="),Z=te[0],K=U(te[1]);se[Z]=K}return se}catch(z){return e.error("Failed to parse CMSD-Dynamic response header value:",z),[]}}function w(k){return mi[k]||"o"}function j(k,se,ie){var he=k===kn?o:l,oe=he[se]||{},te=he[tr]||{};return oe[ie]||te[ie]}return t={setConfig:function(){},initialize:function(){},reset:function(){b()},parseResponseHeaders:function(k,se){for(var ie=null,he=null,oe=k.split(`\r
10
+ `),te=oe.length-1;te>=0;te--){var Z=oe[te].match(Kn(/^([^:]*):\s*(.*)$/,{key:1,value:2}));if(Z&&Z.groups){var K=Z.groups.key.toLowerCase(),z=Z.groups.value;switch(K){case br:ie=H(z),C.trigger(i.A.CMSD_STATIC_HEADER,ie);break;case yr:he||(he=B(z))}}}var f=tr;return ie&&ie.ot?f=ie.ot:se&&(f=w(se)),F(o[f]),F(l[f]),ie&&(o[f]=Object.assign(o[f]||{},ie)),he&&(l[f]=Object.assign(l[f]||{},he)),{static:ie,dynamic:he}},getMaxBitrate:function(k){var se=w(k);return j(Ln,se,"mb")||-1},getEstimatedThroughput:function(k){var se=w(k);return j(Ln,se,"etp")||null},getResponseDelay:function(k){var se=w(k);return j(Ln,se,"rd")||null},getRoundTripTime:function(k){var se=w(k);return j(Ln,se,"rtt")||null}},e=(0,g.A)(p).getInstance().getLogger(t),b(),t}Wr.__dashjs_factory_name="CmsdModel";var zr=h.A.getSingletonFactory(Wr);function Xr(){var t,e,o=this.context,l={};function p(){e=(0,g.A)(o).getInstance().getLogger(t)}function C(F){for(var U={},H=0,B=0,w=0,j=0,k=F.length,se=0;se<k;++se)H+=F[se].chunkDownloadTimeRelativeMS,B+=F[se].bufferLevel,w+=F[se].chunkDownloadTimeRelativeMS*F[se].bufferLevel,j+=F[se].chunkDownloadTimeRelativeMS*F[se].chunkDownloadTimeRelativeMS;return U.m=(w-H*B/k)/(j-H*H/k),U.b=B/k-U.m*H/k,function(ie){return U.m*ie+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 t={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,se){return k+se.chunkDownloadDurationMS}),0),segmentBytes:H.reduce((function(k,se){return k+se.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,se=0,ie=0,he=0,oe=0;oe<U.chunkMeasurements.length;oe++){var te=U.chunkMeasurements[oe];if(k<ie+te.chunkDownloadDurationMS)break;ie+=te.chunkDownloadDurationMS,se+=te.chunkBytes,he++}if(k<0&&e.warn("request time was before adjusted availibitly start time"),se&&ie&&he>.2*U.chunkMeasurements.length){var Z=se/ie,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(),t}Xr.__dashjs_factory_name="LowLatencyThroughputModel";var Qr=h.A.getSingletonFactory(Xr),Lt=M(6890);function en(t){return en=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},en(t)}function fn(t,e,o){return(e=(function(l){var p=(function(C){if(en(C)!="object"||!C)return C;var b=C[Symbol.toPrimitive];if(b!==void 0){var F=b.call(C,"string");if(en(F)!="object")return F;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(C)})(l);return en(p)=="symbol"?p:p+""})(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}function Fn(t){t=t||{};var e,o,l,p,C,b,F,U,H,B,w=this.context,j=t.errHandler,k=t.dashMetrics,se=t.mediaPlayerModel,ie=t.requestModifier,he=t.boxParser,oe=t.errors,te=t.requestTimeout||0,Z=(0,y.A)(w).getInstance(),K=(0,le.A)(w).getInstance();function z(f,N){var S,L=f.request,R=[],V=!0,de=!0,ue=new Date,P=ue,$=0,Y=null,ge=null;if(!ie||!k||!j)throw new Error("config object is not correct or missing");var ve,fe=function(Ke){L.requestStartDate=ue,L.requestEndDate=new Date,L.firstByteDate=L.firstByteDate||ue,L.fileLoaderType=ge;var yt=S.response?S.response.responseURL:null,ht=S.response?S.response.status:null,dt=S.response&&S.response.getAllResponseHeaders?S.response.getAllResponseHeaders():S.response?S.response.responseHeaders:null,qt=dt&&K.get().streaming.cmsd&&K.get().streaming.cmsd.enabled?F.parseResponseHeaders(dt,L.mediaType):null;k.addHttpRequest(L,yt,ht,dt,Ke?R:null,qt)},Ce=function(Ke){de=!1,fe(Ke),L.type===je.G.MPD_TYPE&&(k.addManifestUpdate(L),Z.trigger(i.A.MANIFEST_LOADING_FINISHED,{request:L}))},Me=function(){if(Y&&(clearTimeout(Y),Y=null),o.indexOf(S)!==-1&&(o.splice(o.indexOf(S),1),de))if(Ce(!1),N>0){try{K.get().streaming.utcSynchronization.enableBackgroundSyncAfterSegmentDownloadError&&L.type===je.G.MEDIA_SEGMENT_TYPE&&se.getRetryAttemptsForType(je.G.MEDIA_SEGMENT_TYPE)===N&&Z.trigger(i.A.ATTEMPT_BACKGROUND_SYNC)}catch{}N--;var Ke={config:f};p.push(Ke),Ke.timeout=setTimeout((function(){p.indexOf(Ke)!==-1&&(p.splice(p.indexOf(Ke),1),z(f,N))}),se.getRetryIntervalsForType(L.type))}else{if(L.type===je.G.MSS_FRAGMENT_INFO_SEGMENT_TYPE)return;j.error(new pe.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===je.G.MEDIA_SEGMENT_TYPE?((ve=Hn(w).create({requestModifier:ie,lowLatencyThroughputModel:H,boxParser:he})).setup({dashMetrics:k}),ge=u.A.FILE_LOADER_TYPES.FETCH):(ve=(0,Qt.A)(w).create({requestModifier:ie}),ge=u.A.FILE_LOADER_TYPES.XHR);var Qe=null,$e=ie.modifyRequestURL?ie.modifyRequestURL(L.url):L.url;if(K.get().streaming.cmcd&&K.get().streaming.cmcd.enabled){var Ze=K.get().streaming.cmcd.mode;if(Ze===u.A.CMCD_MODE_QUERY){var at=(function(Ke){try{var yt=[],ht=b.getQueryParameter(Ke);return ht&&yt.push(ht),yt}catch{return[]}})(L);$e=Ft.A.addAditionalQueryParameterToUrl($e,at)}else Ze===u.A.CMCD_MODE_HEADER&&(Qe=b.getHeaderParameters(L))}var Nt=U.getXHRWithCredentialsForType(L.type);if(L.queryParams){var Ee=Object.keys(L.queryParams).map((function(Ke){return{key:Ke,value:L.queryParams[Ke]}}));$e=Ft.A.addAditionalQueryParameterToUrl($e,Ee)}L.url=$e,S={url:$e,method:je.G.GET,withCredentials:Nt,request:L,onload:function(){S.response.status>=200&&S.response.status<=299&&(Ce(!0),f.success&&f.success(S.response.response,S.response.statusText,S.response.responseURL),f.complete&&f.complete(L,S.response.statusText))},onend:Me,onerror:Me,progress:function(Ke){var yt=new Date;V&&(V=!1,(!Ke.lengthComputable||Ke.lengthComputable&&Ke.total!==Ke.loaded)&&(L.firstByteDate=yt)),Ke.lengthComputable&&(L.bytesLoaded=Ke.loaded,L.bytesTotal=Ke.total),Ke.noTrace||(R.push({s:P,d:Ke.time?Ke.time:yt.getTime()-P.getTime(),b:[Ke.loaded?Ke.loaded-$:0]}),P=yt,$=Ke.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),Me()}),K.get().streaming.fragmentRequestProgressTimeout)),f.progress&&Ke&&f.progress(Ke)},onabort:function(){fe(!0),Y&&(clearTimeout(Y),Y=null),f.abort&&f.abort(L)},ontimeout:function(Ke){var yt;if(Ke.lengthComputable){var ht=Ke.loaded/Ke.total*100;yt="Request timeout: loaded: "+Ke.loaded+", out of: "+Ke.total+" : "+ht.toFixed(3)+"% Completed"}else yt="Request timeout: non-computable download size";B.warn(yt)},loader:ve,timeout:te,headers:Qe};var Pe=new Date().getTime();if(isNaN(L.delayLoadingTime)||Pe>=L.delayLoadingTime)o.push(S),ve.load(S);else{var ct={httpRequest:S};l.push(ct),ct.delayTimeout=setTimeout((function(){if(l.indexOf(ct)!==-1){l.splice(l.indexOf(ct),1);try{ue=new Date,P=ue,o.push(ct.httpRequest),ve.load(ct.httpRequest)}catch{ct.httpRequest.onerror()}}}),L.delayLoadingTime-Pe)}}return e={load:function(f){f.request?z(f,se.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!==je.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(e),o=[],l=[],p=[],b=Tn(w).getInstance(),F=zr(w).getInstance(),H=Qr(w).getInstance(),U=(0,Lt.A)(w).getInstance(),C=fn(fn(fn(fn(fn(fn(fn({},je.G.MPD_TYPE,oe.DOWNLOAD_ERROR_ID_MANIFEST_CODE),je.G.XLINK_EXPANSION_TYPE,oe.DOWNLOAD_ERROR_ID_XLINK_CODE),je.G.INIT_SEGMENT_TYPE,oe.DOWNLOAD_ERROR_ID_INITIALIZATION_CODE),je.G.MEDIA_SEGMENT_TYPE,oe.DOWNLOAD_ERROR_ID_CONTENT_CODE),je.G.INDEX_SEGMENT_TYPE,oe.DOWNLOAD_ERROR_ID_CONTENT_CODE),je.G.BITSTREAM_SWITCHING_SEGMENT_TYPE,oe.DOWNLOAD_ERROR_ID_CONTENT_CODE),je.G.OTHER_TYPE,oe.DOWNLOAD_ERROR_ID_CONTENT_CODE),e}Fn.__dashjs_factory_name="HTTPLoader";var On=h.A.getClassFactory(Fn);function jn(){var t;function e(){t={}}function o(){e()}return o(),{getLoader:function(l){for(var p in t)if(t.hasOwnProperty(p)&&l.startsWith(p))return t[p];return On},registerLoader:function(l,p){t[l]=p},unregisterLoader:function(l){t[l]&&delete t[l]},unregisterAllLoader:e,reset:o}}jn.__dashjs_factory_name="SchemeLoaderFactory";var bn=h.A.getSingletonFactory(jn);function Jn(t){t=t||{};var e,o,l=this.context;return e=bn(l).getInstance(),{load:function(p){if(!o){var C=e.getLoader(p&&p.request?p.request.url:null);o=C(l).create({errHandler:t.errHandler,mediaPlayerModel:t.mediaPlayerModel,requestModifier:t.requestModifier,dashMetrics:t.dashMetrics,boxParser:t.boxParser?t.boxParser:null,constants:t.constants?t.constants:null,dashConstants:t.dashConstants?t.dashConstants:null,urlUtils:t.urlUtils?t.urlUtils:null,requestTimeout:isNaN(t.requestTimeout)?0:t.requestTimeout,errors:t.errors})}o.load(p)},abort:function(){o&&o.abort()}}}Jn.__dashjs_factory_name="URLLoader";var Mn=h.A.getClassFactory(Jn);function Rn(t){return Rn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Rn(t)}function rr(t,e,o){return e=nr(e),(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)})(t,Qn()?Reflect.construct(e,o||[],nr(t).constructor):e.apply(t,o))}function Qn(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Qn=function(){return!!t})()}function nr(t){return nr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},nr(t)}function $n(t,e){return $n=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,l){return o.__proto__=l,o},$n(t,e)}var Er=(function(t){function e(l){var p;return(function(C,b){if(!(C instanceof b))throw new TypeError("Cannot call a class as a function")})(this,e),(p=rr(this,e,[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)})(e,t),o=e,Object.defineProperty(o,"prototype",{writable:!1}),o;var o})(T.A);function lr(t){t=t||{};var e,o,l=this.context,p=t.eventBus,C=t.events,b=t.urlUtils,F=t.errors,U=t.streamId;return e={checkForExistence:function(H){var B=function(j){p.trigger(C.CHECK_FOR_EXISTENCE_COMPLETED,{request:H,exists:j})};if(H){var w=new Er(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:e})};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:e})},success:function(w){B(w)},error:function(w,j,k){B(void 0,new pe.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:e})}}):B(void 0,new pe.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:t.errHandler,errors:F,dashMetrics:t.dashMetrics,mediaPlayerModel:t.mediaPlayerModel,requestModifier:t.requestModifier,urlUtils:b,constants:u.A,boxParser:t.boxParser,dashConstants:t.dashConstants,requestTimeout:t.settings.get().streaming.fragmentRequestTimeout}),e}lr.__dashjs_factory_name="FragmentLoader";var Ei=h.A.getClassFactory(lr);function Sr(){return{modifyResponseAsync:function(t){return Promise.resolve(t)}}}Sr.__dashjs_factory_name="SegmentResponseModifier";var $r=h.A.getSingletonFactory(Sr);function Jr(t){t=t||{};var e,o,l,p=this.context,C=(0,y.A)(p).getInstance(),b=t.errHandler,F=t.mediaPlayerModel,U=t.dashMetrics,H=(0,g.A)(p).getInstance(),B=$r(p).getInstance(),w=t.streamInfo;function j(){return w.id}function k(){for(var ie in l)l[ie].reset();l={}}function se(ie){if(ie.sender){var he=ie.request,oe=ie.response,te=he.isInitializationRequest(),Z=he.mediaInfo.streamInfo;if(ie.error&&(he.mediaType===u.A.AUDIO||he.mediaType===u.A.VIDEO||he.mediaType===u.A.TEXT&&he.mediaInfo.isFragmented)&&C.trigger(i.A.SERVICE_LOCATION_BASE_URL_BLACKLIST_ADD,{entry:ie.request.serviceLocation}),oe&&Z){var K=(function(z,f,N,S){var L=new zt;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})(oe,he,w.id,ie.type!==i.A.FRAGMENT_LOADING_PROGRESS);B.modifyResponseAsync(K).then((function(z){C.trigger(te?i.A.INIT_FRAGMENT_LOADED:i.A.MEDIA_FRAGMENT_LOADED,{chunk:z,request:he},{streamId:Z.id,mediaType:he.mediaType})})).catch((function(z){o.error(z),C.trigger(te?i.A.INIT_FRAGMENT_LOADED:i.A.MEDIA_FRAGMENT_LOADED,{chunk:K,request:he},{streamId:Z.id,mediaType:he.mediaType})}))}else o.warn("No "+he.mediaType+" bytes to push or stream is inactive.")}}return e={getStreamId:j,getModel:function(ie){var he=l[ie];return he||(he=J(p).create({streamInfo:w,type:ie,dashMetrics:U,fragmentLoader:Ei(p).create({dashMetrics:U,mediaPlayerModel:F,errHandler:b,requestModifier:(0,De.A)(p).getInstance(),settings:t.settings,boxParser:t.boxParser,eventBus:C,events:i.A,errors:me,dashConstants:t.dashConstants,urlUtils:t.urlUtils,streamId:j()}),debug:H,eventBus:C,events:i.A}),l[ie]=he),he},reset:function(){C.off(r.A.FRAGMENT_LOADING_COMPLETED,se,this),C.off(r.A.FRAGMENT_LOADING_PROGRESS,se,this),k()}},o=H.getLogger(e),k(),C.on(r.A.FRAGMENT_LOADING_COMPLETED,se,e),C.on(r.A.FRAGMENT_LOADING_PROGRESS,se,e),e}Jr.__dashjs_factory_name="FragmentController";var ki=h.A.getClassFactory(Jr);function Gi(t,e,o){return Object.defineProperty(t,"prototype",{writable:!1}),t}var ji=Gi((function t(){(function(e,o){if(!(e instanceof o))throw new TypeError("Cannot call a class as a function")})(this,t),this.url=null,this.width=null,this.height=null,this.x=null,this.y=null}));function qi(t,e,o){return Object.defineProperty(t,"prototype",{writable:!1}),t}var _i=qi((function t(){(function(e,o){if(!(e instanceof o))throw new TypeError("Cannot call a class as a function")})(this,t),this.mediaType=null,this.bitrate=null,this.width=null,this.height=null,this.scanType=null,this.qualityIndex=NaN}));function Ai(t){var e,o,l=this.context,p=t.streamInfo;function C(F){o.setTrackByIndex(F)}function b(){o&&o.reset()}return e={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 ji;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(ie){k.url=ie,U(k)}));if(B)k.url=B.url,w.segmentDuration=NaN;else{var se=Math.floor(F/w.segmentDuration);k.url=(function(ie,he){var oe=he+ie.startNumber,te=(0,c.XX)(ie.templateUrl,"Number",oe);return te=(0,c.XX)(te,"Time",(oe-1)*ie.segmentDuration*ie.timescale),te=(0,c.XX)(te,"Bandwidth",ie.bandwidth),(0,c.Dr)(te)})(w,se)}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 _i;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,Bt.A)(l).create({streamInfo:p,adapter:t.adapter,baseURLController:t.baseURLController,timelineConverter:t.timelineConverter,debug:t.debug,eventBus:t.eventBus,events:t.events,dashConstants:t.dashConstants,dashMetrics:t.dashMetrics,segmentBaseController:t.segmentBaseController}),e}Ai.__dashjs_factory_name="ThumbnailController";var Yi=h.A.getClassFactory(Ai),Zr=M(255);function ei(t){var e;t=t||{};var o=[],l=(0,y.A)(this.context).getInstance(),p=t.updateEventName,C=t.addBlacklistEventName;function b(F){o.indexOf(F)===-1&&(o.push(F),l.trigger(p,{entry:F}))}return e={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)}),e),e}ei.__dashjs_factory_name="BlackListController";var ti=h.A.getClassFactory(ei),Nn=[u.A.VIDEO,u.A.AUDIO,u.A.TEXT,u.A.MUXED,u.A.IMAGE];function _r(t){t=t||{};var e,o,l,p,C,b,F,U,H,B,w,j,k,se,ie,he,oe,te,Z=this.context,K=(0,y.A)(Z).getInstance(),z=(0,Ae.A)(Z).getInstance(),f=t.manifestModel,N=t.mediaPlayerModel,S=t.dashMetrics,L=t.manifestUpdater,R=t.adapter,V=t.timelineConverter,de=t.capabilities,ue=t.errHandler,P=t.abrController,$=t.playbackController,Y=t.eventController,ge=t.mediaController,ve=t.protectionController,fe=t.textController,Ce=t.videoModel,Me=t.streamInfo,Qe=t.settings;function $e(pt,Ot){return new Promise((function(Fe,st){ht(),B=!0,qt();var xe=Ce.getElement(),Ge=[];Nn.forEach((function(lt){(lt!==u.A.TEXT||pt)&&(lt!==u.A.VIDEO||!xe||xe&&/^VIDEO$/i.test(xe.nodeName))&&Ge.push(Ze(lt,pt))})),Promise.all(Ge).then((function(){return lt=Ot,new Promise((function(ye){var Te={},We=l.map((function(wt){return wt.createBufferSinks(lt)}));Promise.all(We).then((function(wt){wt.forEach((function(jt){jt&&(Te[jt.getType()]=jt)})),ye(Te)})).catch((function(){ye(Te)}))}));var lt})).then((function(lt){if(B=!1,l.length===0){var ye="No streams to play.";ue.error(new pe.A(me.MANIFEST_ERROR_ID_NOSTREAMS_CODE,ye,f.getValue())),o.fatal(ye)}else Yt();pt&&fe.createTracks(Me),Fe(lt)})).catch((function(lt){st(lt)}))}))}function Ze(pt,Ot){var Fe,st=R.getAllMediaInfoForType(Me,pt),xe=[],Ge=null;if(!st||st.length===0)return o.info("No "+pt+" data."),Promise.resolve();pt===u.A.VIDEO&&(F=!0),pt===u.A.AUDIO&&(U=!0);for(var lt=0,ye=st.length;lt<ye;lt++)Ge=st[lt],pt===u.A.TEXT&&Ge.isEmbedded&&(fe.addEmbeddedTrack(Me,Ge),xe.push(Ge)),at(Ge)&&ge.addTrack(Ge);if(xe.length>0&&(ge.setInitialMediaSettingsForType(pt,Me),fe.addMediaInfosToBuffer(Me,pt,xe)),st=st.filter((function(We){return!We.isEmbedded})),st.length===0)return Promise.resolve();if(pt===u.A.IMAGE)return(j=Yi(Z).create({streamInfo:Me,adapter:R,baseURLController:t.baseURLController,timelineConverter:t.timelineConverter,debug:he,eventBus:K,events:i.A,dashConstants:n.A,dashMetrics:t.dashMetrics,segmentBaseController:t.segmentBaseController})).initialize(),Promise.resolve();K.trigger(i.A.STREAM_INITIALIZING,{streamInfo:Me,mediaInfo:Ge}),ge.setInitialMediaSettingsForType(pt,Me);var Te=(function(We,wt){var jt=We&&We.length>0?We[0]:null,hn=w.getModel(jt?jt.type:null),En=jt?jt.type:null,dn=jt?jt.mimeType:null,qn=jt?jt.isFragmented:null,Pn=Ut(Z).create({streamInfo:Me,type:En,mimeType:dn,timelineConverter:V,adapter:R,manifestModel:f,mediaPlayerModel:N,fragmentModel:hn,dashMetrics:t.dashMetrics,baseURLController:t.baseURLController,segmentBaseController:t.segmentBaseController,abrController:P,playbackController:$,mediaController:ge,textController:fe,errHandler:ue,settings:Qe,boxParser:ie,segmentBlacklistController:k});Pn.initialize(wt,F,qn),l.push(Pn);for(var Zn=0;Zn<We.length;Zn++)Pn.addMediaInfo(We[Zn]);return En===u.A.TEXT&&fe.addMediaInfosToBuffer(Me,En,We,hn),Pn})(st,Ot);return(Fe=ge.getCurrentTrackFor(pt,Me.id))?(P.updateTopQualityIndex(Fe),Te.selectMediaInfo(pt===u.A.TEXT&&Fe.isEmbedded?st[0]:Fe)):Promise.resolve()}function at(pt){var Ot,Fe=pt?pt.type:null;return Fe===u.A.MUXED?(Ot="Multiplexed representations are intentionally not supported, as they are not compliant with the DASH-AVC/264 guidelines",o.fatal(Ot),ue.error(new pe.A(me.MANIFEST_ERROR_ID_MULTIPLEXED_CODE,Ot,f.getValue())),!1):!(Fe!==u.A.TEXT&&Fe!==u.A.IMAGE&&pt.contentProtection&&!de.supportsEncryptedMedia()&&(ue.error(new pe.A(me.CAPABILITY_MEDIAKEYS_ERROR_CODE,me.CAPABILITY_MEDIAKEYS_ERROR_MESSAGE)),1))}function Nt(pt){for(var Ot=l?l.length:0,Fe=0;Fe<Ot;Fe++){var st=l[Fe].getFragmentModel();st.abortRequests(),st.resetInitialSettings(),l[Fe].reset(!1,pt)}fe&&fe.deactivateStream(Me),l=[],C=!1,b=!1,Kt(!1),Pe(!1),K.trigger(i.A.STREAM_DEACTIVATED,{streamInfo:Me})}function Ee(pt){Nt(pt),p=!1,F=!1,U=!1,H={},B=!1,oe=!1,te=[]}function Pe(pt){oe=pt}function ct(){return Me?Me.start:NaN}function Ke(){return Me?Me.id:null}function yt(){return Me}function ht(){if(!Ce||!P)throw new Error(u.A.MISSING_CONFIG_ERROR)}function dt(pt){pt.error&&(ue.error(pt.error),o.fatal(pt.error.message))}function qt(){if(Y){var pt=R.getEventsFor(Me);pt&&pt.length>0&&Y.addInlineEvents(pt,Me.id)}}function Yt(){for(var pt=l.length,Ot=H.audio||H.video?new pe.A(me.DATA_UPDATE_FAILED_ERROR_CODE,me.DATA_UPDATE_FAILED_ERROR_MESSAGE):null,Fe=0;Fe<pt;Fe++)if(l[Fe].isUpdating()||B)return;if(ve){ve.clearMediaInfoArray();for(var st=0;st<pt&&l[st];st++){var xe=l[st].getType(),Ge=l[st].getMediaInfo();if(xe===u.A.AUDIO||xe===u.A.VIDEO||xe===u.A.TEXT&&Ge.isFragmented){var lt=l[st].getMediaInfo();lt&&ve.initializeForMedia(lt)}}ve.handleKeySystemFromManifest()}Ot?ue.error(Ot):p||(p=!0,Ce.waitForReadyState(u.A.VIDEO_ELEMENT_READY_STATES.HAVE_METADATA,(function(){K.trigger(i.A.STREAM_INITIALIZED,{streamInfo:Me})})))}function sn(){var pt=gt(),Ot=pt.length;if(Ot!==0){for(var Fe=0;Fe<Ot;Fe++)if(!pt[Fe].isBufferingCompleted()&&(pt[Fe].getType()===u.A.AUDIO||pt[Fe].getType()===u.A.VIDEO))return void o.debug("onBufferingCompleted - One streamProcessor has finished but",pt[Fe].getType(),"one is not buffering completed");o.debug("onBufferingCompleted - trigger STREAM_BUFFERING_COMPLETED"),b=!0,K.trigger(i.A.STREAM_BUFFERING_COMPLETED,{streamInfo:Me},{streamInfo:Me})}else o.warn("onBufferingCompleted - can't trigger STREAM_BUFFERING_COMPLETED because no streamProcessor is defined")}function ln(pt){H[pt.mediaType]=pt.error,Yt()}function ke(pt){Y&&Y.addInbandEvents(pt.events,Me.id)}function ut(pt){return pt&&pt.type?tt(pt.type):null}function tt(pt){return pt?gt().filter((function(Ot){return Ot.getType()===pt}))[0]:null}function gt(){for(var pt,Ot,Fe=[],st=0;st<l.length;st++)(pt=(Ot=l[st]).getType())!==u.A.AUDIO&&pt!==u.A.VIDEO&&pt!==u.A.TEXT||Fe.push(Ot);return Fe}function Dt(pt,Ot){var Fe=yt(),st=Ot.getStreamInfo();if(!st||!Fe)return!0;var xe=R.getAdaptationForType(st.index,pt,st),Ge=R.getAdaptationForType(Fe.index,pt,Fe);return xe&&Ge?!(!Vt(Ge)&&Vt(xe)):!xe&&!Ge}function Vt(pt){return!!pt&&!!(pt.ContentProtection||pt.Representation_asArray&&pt.Representation_asArray.length>0&&pt.Representation_asArray[0].ContentProtection)}function Gt(pt,Ot){var Fe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!pt||!pt.hasOwnProperty("getStreamInfo"))return!1;var st=pt.getStreamInfo(),xe=Fe?Fe.getStreamInfo():yt();if(!st||!xe)return!1;var Ge=R.getAdaptationForType(st.index,Ot,st),lt=R.getAdaptationForType(xe.index,Ot,xe);if(!Ge||!lt)return!Ge&&!lt;var ye=Ge&&lt&&Ge.mimeType===lt.mimeType,Te=lt.Representation_asArray.map((function(hn){return hn.codecs})),We=Ge.Representation_asArray.map((function(hn){return hn.codecs})),wt=We.some((function(hn){return Te.indexOf(hn)>-1})),jt=We.some((function(hn){return Te.some((function(En){return de.codecRootCompatibleWithCodec(En,hn)}))}));return wt||jt&&ye}function Kt(pt){se=pt}function Zt(){return se}return e={initialize:function(){K.on(i.A.BUFFERING_COMPLETED,sn,e),K.on(i.A.DATA_UPDATE_COMPLETED,ln,e),K.on(i.A.INBAND_EVENTS,ke,e),ve&&(K.on(i.A.KEY_ERROR,dt,e),K.on(i.A.SERVER_CERTIFICATE_UPDATED,dt,e),K.on(i.A.LICENSE_REQUEST_COMPLETE,dt,e),K.on(i.A.KEY_SYSTEM_SELECTED,dt,e),K.on(i.A.KEY_SESSION_CREATED,dt,e),K.on(i.A.KEY_STATUSES_CHANGED,dt,e)),fe.initializeForStream(Me),K.trigger(i.A.STREAM_UPDATED,{streamInfo:Me})},getStreamId:function(){return Me?Me.id:null},activate:function(pt,Ot){return new Promise((function(Fe,st){if(!C)return Zt()?(C=!0,K.trigger(i.A.STREAM_ACTIVATED,{streamInfo:Me}),void Fe(Ot)):void(function(xe,Ge){return $e(xe,Ge)})(pt,Ot).then((function(xe){C=!0,K.trigger(i.A.STREAM_ACTIVATED,{streamInfo:Me}),Fe(xe)})).catch((function(xe){st(xe)}));Fe(Ot)}))},deactivate:Nt,getIsActive:function(){return C},getDuration:function(){return Me?Me.duration:NaN},getStartTime:ct,getId:Ke,getStreamInfo:yt,getHasAudioTrack:function(){return U},getHasVideoTrack:function(){return F},startPreloading:function(pt,Ot){return new Promise((function(Fe,st){Zt()?st():(o.info("[startPreloading] Preloading next stream with id ".concat(Ke())),Kt(!0),$e(pt,Ot).then((function(){for(var xe=0;xe<l.length&&l[xe];xe++)l[xe].setExplicitBufferingTime(ct()),l[xe].getScheduleController().startScheduleTimer();Fe()})).catch((function(){Kt(!1),st()})))}))},initializeForTextWithMediaSource:function(pt){return new Promise((function(Ot,Fe){Ze(u.A.TEXT,pt).then((function(){return(st=tt(u.A.TEXT))?st.createBufferSinks():Promise.resolve();var st})).then((function(){fe.createTracks(Me),Ot()})).catch((function(st){Fe(st)}))}))},getThumbnailController:function(){return j},getBitrateListFor:function(pt){if(ht(),pt===u.A.IMAGE)return j?j.getBitrateList():[];var Ot=(function(Fe){for(var st=null,xe=0;xe<l.length;xe++)if((st=l[xe]).getType()===Fe)return st.getMediaInfo();return null})(pt);return P.getBitrateList(Ot)},updateData:function(pt){return new Promise((function(Ot){B=!0,Me=pt,Y&&qt();for(var Fe=[],st=0,xe=l.length;st<xe;st++){var Ge=l[st],lt=Ge.getMediaInfo();Fe.push(Ge.updateStreamInfo(Me));var ye=R.getAllMediaInfoForType(Me,Ge.getType());if(ye=ye.filter((function(wt){return!wt.isEmbedded}))){Ge.clearMediaInfoArray();for(var Te=0;Te<ye.length;Te++){var We=ye[Te];Ge.addMediaInfo(ye[Te]),R.areMediaInfosEqual(lt,We)&&(P.updateTopQualityIndex(We),Fe.push(Ge.selectMediaInfo(We)))}}}Promise.all(Fe).then((function(){for(Fe=[];te.length>0;){var wt=te.pop(),jt=wt.newMediaInfo,hn=ut(wt.oldMediaInfo);if(!hn)return;Fe.push(hn.prepareTrackSwitch()),Fe.push(hn.selectMediaInfo(jt))}return Promise.all(Fe)})).then((function(){B=!1,Yt(),K.trigger(i.A.STREAM_UPDATED,{streamInfo:Me}),Ot()}))}))},reset:function(pt){w&&(w.reset(),w=null),P&&Me&&P.clearDataForStream(Me.id),k&&(k.reset(),k=null),Ee(pt),Me=null,K.off(i.A.DATA_UPDATE_COMPLETED,ln,e),K.off(i.A.BUFFERING_COMPLETED,sn,e),K.off(i.A.INBAND_EVENTS,ke,e),ve&&(K.off(i.A.KEY_ERROR,dt,e),K.off(i.A.SERVER_CERTIFICATE_UPDATED,dt,e),K.off(i.A.LICENSE_REQUEST_COMPLETE,dt,e),K.off(i.A.KEY_SYSTEM_SELECTED,dt,e),K.off(i.A.KEY_SESSION_CREATED,dt,e),K.off(i.A.KEY_STATUSES_CHANGED,dt,e))},getProcessors:gt,setMediaSource:function(pt){return new Promise((function(Ot,Fe){for(var st=[],xe=0;xe<l.length;)at(l[xe].getMediaInfo())?(st.push(l[xe].setMediaSource(pt)),xe++):(l[xe].reset(),l.splice(xe,1));Promise.all(st).then((function(){for(var Ge=0;Ge<l.length;Ge++)l[Ge].dischargePreBuffer();if(l.length===0){var lt="No streams to play.";ue.error(new pe.A(me.MANIFEST_ERROR_ID_NOSTREAMS_CODE,lt+"nostreams",f.getValue())),o.fatal(lt)}Ot()})).catch((function(Ge){o.error(Ge),Fe(Ge)}))}))},isMediaCodecCompatible:function(pt){var Ot=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return Gt(pt,u.A.VIDEO,Ot)&&Gt(pt,u.A.AUDIO,Ot)},isProtectionCompatible:function(pt){return!pt||Dt(u.A.VIDEO,pt)&&Dt(u.A.AUDIO,pt)},getPreloaded:Zt,getIsEndedEventSignaled:function(){return oe},setIsEndedEventSignaled:Pe,getAdapter:function(){return R},getHasFinishedBuffering:function(){return b},setPreloaded:Kt,startScheduleControllers:function(){for(var pt=l.length,Ot=0;Ot<pt&&l[Ot];Ot++)l[Ot].getScheduleController().startScheduleTimer()},prepareTrackChange:function(pt){if(C&&Me){b=!1;var Ot=pt.newMediaInfo,Fe=f.getValue();R.setCurrentMediaInfo(Me.id,Ot.type,Ot);var st=ut(Ot);if(st){var xe=$.getTime();o.info("Stream - Process track changed at current time "+xe),Fe.refreshManifestOnSwitchTrack?(te.push(pt),L.getIsUpdating()||(o.debug("Stream - Refreshing manifest for switch track"),L.refreshManifest())):st.selectMediaInfo(Ot).then((function(){Ot.type!==u.A.VIDEO&&Ot.type!==u.A.AUDIO||P.updateTopQualityIndex(Ot),st.prepareTrackSwitch()}))}}},prepareQualityChange:function(pt){var Ot=tt(pt.mediaType);Ot&&Ot.prepareQualityChange(pt)}},(function(){try{he=(0,g.A)(Z).getInstance(),o=he.getLogger(e),Ee(),ie=(0,Zr.A)(Z).getInstance(),k=ti(Z).create({updateEventName:i.A.SEGMENT_LOCATION_BLACKLIST_CHANGED,addBlacklistEventName:i.A.SEGMENT_LOCATION_BLACKLIST_ADD}),w=ki(Z).create({streamInfo:Me,mediaPlayerModel:N,dashMetrics:S,errHandler:ue,settings:Qe,boxParser:ie,dashConstants:n.A,urlUtils:z})}catch(pt){throw pt}})(),e}_r.__dashjs_factory_name="Stream";var Fr=h.A.getClassFactory(_r);function Ir(t,e,o){return Object.defineProperty(t,"prototype",{writable:!1}),t}var Hi=Ir((function t(e){(function(o,l){if(!(o instanceof l))throw new TypeError("Cannot call a class as a function")})(this,t),this.url=e||null,this.type=je.G.CONTENT_STEERING_TYPE,this.responseType="json"}));function or(t,e,o){return Object.defineProperty(t,"prototype",{writable:!1}),t}var Vi=or((function t(){(function(e,o){if(!(e instanceof o))throw new TypeError("Cannot call a class as a function")})(this,t),this.version=null,this.ttl=300,this.reloadUri=null,this.pathwayPriority=[],this.pathwayClones=[]}));function cr(){var t,e,o,l,p,C,b,F,U,H,B,w,j,k,se,ie=this.context,he=(0,Ae.A)(ie).getInstance();function oe(P){f(P,"baseUrl")}function te(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(),$=se.getContentSteering(P);return $||($=j.getServiceDescriptionSettings().contentSteering),$}function S(){return new Promise((function(P){try{var $=N();if(!$||!$.serverUrl)return void P();var Y=(function(ve){var fe=ve.serverUrl;o&&o.reloadUri&&(fe=he.isRelative(o.reloadUri)?he.resolve(o.reloadUri,ve.serverUrl):o.reloadUri);var Ce=[],Me=l.baseUrl.all.concat(l.location.all);if(Me.length>0){var Qe=Me.map((function(at){var Nt=(function(Ee){if(!Ee||!p[Ee]||p[Ee].length===0)return-1;var Pe=p[Ee].reduce((function(ct,Ke){return ct+Ke}))/p[Ee].length;return parseInt(Pe)})(at);return{serviceLocation:at,throughput:Nt}}));Qe.sort((function(at,Nt){return Nt.throughput-at.throughput}));var $e="",Ze="";Qe.forEach((function(at,Nt){Nt!==0&&($e="".concat($e,","),at.throughput>-1&&(Ze="".concat(Ze,","))),$e="".concat($e).concat(at.serviceLocation),at.throughput>-1&&(Ze="".concat(Ze).concat(at.throughput))})),Ce.push({key:"_DASH_pathway",value:'"'.concat($e,'"')}),Ce.push({key:"_DASH_throughput",value:Ze})}return fe=Ft.A.addAditionalQueryParameterToUrl(fe,Ce)})($),ge=new Hi(Y);b.load({request:ge,success:function(ve){(function(fe){fe&&fe[n.A.CONTENT_STEERING_RESPONSE.VERSION]&&parseInt(fe[n.A.CONTENT_STEERING_RESPONSE.VERSION])===1&&((o=new Vi).version=fe[n.A.CONTENT_STEERING_RESPONSE.VERSION],fe[n.A.CONTENT_STEERING_RESPONSE.TTL]&&!isNaN(fe[n.A.CONTENT_STEERING_RESPONSE.TTL])&&(o.ttl=fe[n.A.CONTENT_STEERING_RESPONSE.TTL]),fe[n.A.CONTENT_STEERING_RESPONSE.RELOAD_URI]&&(o.reloadUri=fe[n.A.CONTENT_STEERING_RESPONSE.RELOAD_URI]),fe[n.A.CONTENT_STEERING_RESPONSE.PATHWAY_PRIORITY]&&(o.pathwayPriority=fe[n.A.CONTENT_STEERING_RESPONSE.PATHWAY_PRIORITY]),fe[n.A.CONTENT_STEERING_RESPONSE.PATHWAY_CLONES]&&(o.pathwayClones=fe[n.A.CONTENT_STEERING_RESPONSE.PATHWAY_CLONES],o.pathwayClones=o.pathwayClones.filter((function(Ce){return(function(Me){return Me[n.A.CONTENT_STEERING_RESPONSE.BASE_ID]&&Me[n.A.CONTENT_STEERING_RESPONSE.ID]&&Me[n.A.CONTENT_STEERING_RESPONSE.URI_REPLACEMENT]&&Me[n.A.CONTENT_STEERING_RESPONSE.URI_REPLACEMENT][n.A.CONTENT_STEERING_RESPONSE.HOST]})(Ce)}))),V())})(ve),k.trigger(r.A.CONTENT_STEERING_REQUEST_COMPLETED,{currentSteeringResponseData:o,url:Y}),P()},error:function(ve,fe,Ce,Me){(function(Qe,$e){try{switch(e.warn("Error fetching data from content steering server",Qe),$e.status){case 410:break;case 429:var Ze=$e&&$e.getResponseHeader?$e.getResponseHeader("retry-after"):null;Ze!==null&&(o||(o={}),o.ttl=parseInt(Ze)),V();break;default:V()}}catch(at){e.error(at)}})(ve,Me),P(ve)},complete:function(){l.baseUrl.all=L(l.baseUrl),l.location.all=L(l.location)}})}catch(ve){P(ve)}}))}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 ge=P.filter((function(Qe){return Y[n.A.CONTENT_STEERING_RESPONSE.BASE_ID]===Qe.serviceLocation})),ve=null;if(ge&&ge.length>0&&(ve=ge[0]),ve){var fe=new URL(ve.url),Ce=Y[n.A.CONTENT_STEERING_RESPONSE.URI_REPLACEMENT][n.A.CONTENT_STEERING_RESPONSE.HOST];Ce=Ft.A.stringHasProtocol(Ce)?Ce:"".concat(fe.protocol,"//").concat(Ce);var Me={synthesizedUrl:"".concat(Ce).concat(fe.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:ve};$.push(Me)}})),$}catch(Y){return e.error(Y),[]}}function V(){o&&o.ttl&&!isNaN(o.ttl)&&(C&&clearTimeout(C),C=setTimeout((function(){S()}),1e3*o.ttl))}function de(){C&&clearTimeout(C),C=null}function ue(){o=null,p={},l={baseUrl:{current:null,all:[]},location:{current:null,all:[]}},de()}return t={reset:function(){ue(),k.off(r.A.FRAGMENT_LOADING_STARTED,oe,t),k.off(r.A.MANIFEST_LOADING_STARTED,te,t),k.off(r.A.MANIFEST_LOADING_FINISHED,Z,t),k.off(r.A.THROUGHPUT_MEASUREMENT_STORED,K,t)},setConfig:function(P){P&&(P.adapter&&(se=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:de,getSynthesizedBaseUrlElements:function(P){try{return R(P).map((function($){var Y=new Pr($.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 e.error($),[]}},getSynthesizedLocationElements:function(P){try{return R(P).map((function($){var Y=new Xt($.synthesizedUrl,$.serviceLocation);return Y.queryParams=$.queryParams,Y}))}catch($){return e.error($),[]}},initialize:function(){b=Mn(ie).create({errHandler:F,dashMetrics:U,mediaPlayerModel:H,requestModifier:w,errors:me}),k.on(r.A.FRAGMENT_LOADING_STARTED,oe,t),k.on(r.A.MANIFEST_LOADING_STARTED,te,t),k.on(r.A.MANIFEST_LOADING_FINISHED,Z,t),k.on(r.A.THROUGHPUT_MEASUREMENT_STORED,K,t)}},e=(0,g.A)(ie).getInstance().getLogger(t),ue(),t}cr.__dashjs_factory_name="ContentSteeringController";var ni=h.A.getSingletonFactory(cr);function Ta(){var t,e,o,l=this.context,p=(0,le.A)(l).getInstance();return t={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 se=H[w],ie=B.findIndex((function(he){return he.serviceLocation&&he.serviceLocation===se}));if(ie!==-1&&!e.contains(B[ie].serviceLocation))return j=B[ie],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&&(e=C.blacklistController),C.contentSteeringController&&(o=C.contentSteeringController)},reset:function(){e.reset()}},e=ti(l).create({updateEventName:i.A.SERVICE_LOCATION_LOCATION_BLACKLIST_CHANGED,addBlacklistEventName:i.A.SERVICE_LOCATION_LOCATION_BLACKLIST_ADD}),o=ni(l).getInstance(),t}Ta.__dashjs_factory_name="LocationSelector";var $o=h.A.getClassFactory(Ta);function ba(){var t,e,o,l,p,C,b,F,U,H,B,w,j,k,se=this.context,ie=(0,y.A)(se).getInstance(),he=(0,Ae.A)(se).getInstance();function oe(){o=NaN,b=!1,p=!0,C=!1,te()}function te(){l!==null&&(clearTimeout(l),l=null)}function Z(V){te(),C||(isNaN(V)&&!isNaN(o)&&(V=1e3*o),isNaN(V)||(e.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 de=U.getValue(),ue=de.url,P=null,$=B.getPatchLocation(de),Y=H.select($),ge=null;if(Y&&!V)ue=Y.url,P=Y.serviceLocation,ge=Y.queryParams;else{var ve=(function(Ce){var Me=B.getLocation(Ce),Qe=j.getSynthesizedLocationElements(Me);return Me.concat(Qe)})(de),fe=H.select(ve);fe&&(ue=fe.url,P=fe.serviceLocation,ge=fe.queryParams)}he.isRelative(ue)&&(ue=he.resolve(ue,de.url)),F.load(ue,P,ge)}function z(V){if(V){if(B.getIsPatch(V)){var de=V;V=U.getValue();var ue=B.isPatchValid(V,de),P=ue;if(ue){var $=B.getPublishTime(V);P=B.applyPatchToManifest(V,de);var Y=B.getPublishTime(V);P=$.getTime()!=Y.getTime()}if(!P)return e.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 ie.trigger(i.A.DYNAMIC_TO_STATIC),b=!1,void(C=!0);U.setValue(V);var ge=new Date,ve=(ge.getTime()-V.loadedTime.getTime())/1e3;1e3*(o=B.getManifestUpdatePeriod(V,ve))>2147483647&&(o=2147483647e-3),ie.trigger(i.A.MANIFEST_UPDATED,{manifest:V}),e.info("Manifest has been refreshed at "+ge+"["+ge.getTime()/1e3+"] "),p||Z()}function f(){p||(b?Z(k.get().streaming.manifestUpdateRetryInterval):K())}function N(V){V.error?V.error.code===me.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)&&te()}function R(){b=!1}return t={initialize:function(){oe(),ie.on(i.A.STREAMS_COMPOSED,R,this),ie.on(r.A.PLAYBACK_STARTED,S,this),ie.on(r.A.PLAYBACK_PAUSED,L,this),ie.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(){ie.off(r.A.PLAYBACK_STARTED,S,this),ie.off(r.A.PLAYBACK_PAUSED,L,this),ie.off(i.A.STREAMS_COMPOSED,R,this),ie.off(i.A.INTERNAL_MANIFEST_LOADED,N,this),oe()}},e=(0,g.A)(se).getInstance().getLogger(t),H=$o(se).create(),t}ba.__dashjs_factory_name="ManifestUpdater";var Sa=h.A.getClassFactory(ba);function Ki(){var t,e,o,l,p,C,b,F,U,H,B,w,j,k,se,ie,he=this.context,oe=(0,y.A)(he).getInstance(),te=(0,Ae.A)(he).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(fe){try{if(fe<=0)return void ge();var Ce=Date.now();C[j.schemeIdUri](j.value,(function(Me){var Qe=Date.now(),$e=N(Ce,Qe,Me);F.push($e),z(fe-1)}),(function(){ge()}))}catch{ge()}}function f(){var fe=(arguments.length>0&&arguments[0]!==void 0?arguments[0]:null)||0;if(!U||U.length===0||fe>=U.length)S();else{var Ce=U[fe];if(Ce)if(C.hasOwnProperty(Ce.schemeIdUri)){var Me=new Date().getTime();C[Ce.schemeIdUri](Ce.value,(function(Qe){var $e=new Date().getTime(),Ze=N(Me,$e,Qe);j=Ce,S(Ze)}),(function(){f(fe+1)}))}else f(fe+1);else S()}}function N(fe,Ce,Me){return Me-(Ce-(Ce-fe)/2)}function S(){var fe,Ce,Me=arguments.length>0&&arguments[0]!==void 0?arguments[0]:NaN,Qe=isNaN(Me);Qe&&p.get().streaming.utcSynchronization.useManifestDateHeaderTimeSource?(fe=b.getLatestMPDRequestHeaderValueByID("Date"),Ce=fe!==null?new Date(fe).getTime():Number.NaN,isNaN(Ce)?Y(!0):Y(!1,Ce-Date.now())):Y(Qe,Me)}function L(fe){var Ce=Date.parse(fe);return isNaN(Ce)&&(Ce=(function(Me){var Qe,$e,Ze=/^([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(Me);return Qe=Date.UTC(parseInt(Ze[1],10),parseInt(Ze[2],10)-1,parseInt(Ze[3],10),parseInt(Ze[4],10),parseInt(Ze[5],10),Ze[6]&&(parseInt(Ze[6],10)||0),Ze[7]&&1e3*parseFloat(Ze[7])||0),Ze[9]&&Ze[10]&&($e=60*parseInt(Ze[9],10)+parseInt(Ze[10],10),Qe+=(Ze[8]==="+"?-1:1)*$e*60*1e3),new Date(Qe).getTime()})(fe)),Ce}function R(fe){return Date.parse(fe)}function V(fe){return Date.parse(fe)}function de(fe,Ce,Me){Me()}function ue(fe,Ce,Me){var Qe=L(fe);isNaN(Qe)?Me():Ce(Qe)}function P(fe,Ce,Me,Qe,$e){var Ze,at,Nt=!1,Ee=new XMLHttpRequest,Pe=$e?je.G.HEAD:je.G.GET,ct=Ce.match(/\S+/g);if(Ce=ct.shift(),Ze=function(){Nt||(Nt=!0,ct.length?P(fe,ct.join(" "),Me,Qe,$e):Qe())},at=function(){var yt,ht;Ee.status===200&&(yt=$e?Ee.getResponseHeader("Date"):Ee.response,ht=fe(yt),isNaN(ht)||(Me(ht),Nt=!0))},te.isRelative(Ce)){var Ke=ie.resolve();Ke&&(Ce=te.resolve(Ce,Ke.url))}Ee.open(Pe,Ce),Ee.timeout=5e3,Ee.onload=at,Ee.onloadend=Ze,Ee.send()}function $(fe,Ce,Me){P(V,fe,Ce,Me,!0)}function Y(fe,Ce){if(isNaN(w)||isNaN(Ce)||fe||(function(Qe){try{var $e,Ze=ve(Qe),at=isNaN(k)?30:k,Nt=isNaN(p.get().streaming.utcSynchronization.timeBetweenSyncAttemptsAdjustmentFactor)?2:p.get().streaming.utcSynchronization.timeBetweenSyncAttemptsAdjustmentFactor,Ee=isNaN(p.get().streaming.utcSynchronization.maximumTimeBetweenSyncAttempts)?600:p.get().streaming.utcSynchronization.maximumTimeBetweenSyncAttempts,Pe=isNaN(p.get().streaming.utcSynchronization.minimumTimeBetweenSyncAttempts)?2:p.get().streaming.utcSynchronization.minimumTimeBetweenSyncAttempts;Ze?($e=Math.min(at*Nt,Ee),e.debug("Increasing timeBetweenSyncAttempts to ".concat($e))):($e=Math.max(at/Nt,Pe),e.debug("Decreasing timeBetweenSyncAttempts to ".concat($e))),k=$e}catch{}})(Ce),!fe&&!isNaN(Ce)){H=Date.now(),o=!1;var Me=isNaN(w);w=Ce,Me&&K(),e.debug("Completed UTC sync. Setting client - server offset to ".concat(Ce))}fe&&(j=null,o=!1,se.error(new pe.A(me.TIME_SYNC_FAILED_ERROR_CODE,me.TIME_SYNC_FAILED_ERROR_MESSAGE))),oe.trigger(i.A.UPDATE_TIME_SYNC_OFFSET,{offset:Ce}),oe.trigger(i.A.TIME_SYNCHRONIZATION_COMPLETED)}function ge(){if(F&&F.length!==0){var fe=F.reduce((function(Ce,Me){return Ce+Me}),0)/F.length;ve(fe)?e.debug("Completed background UTC sync. Offset is within allowed threshold and is not adjusted."):(e.debug("Completed background UTC sync. Setting client - server offset to ".concat(fe)),w=fe,oe.trigger(i.A.UPDATE_TIME_SYNC_OFFSET,{offset:w})),l=!1,B=Date.now()}}function ve(fe){try{if(isNaN(w))return!0;var Ce=p.get().streaming.utcSynchronization.maximumAllowedDrift&&!isNaN(p.get().streaming.utcSynchronization.maximumAllowedDrift)?p.get().streaming.utcSynchronization.maximumAllowedDrift:100;return fe>=w-Ce&&fe<=w+Ce}catch{return!0}}return t={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":ue,"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":ue,"urn:mpeg:dash:utc:http-ntp:2014":de,"urn:mpeg:dash:utc:ntp:2014":de,"urn:mpeg:dash:utc:sntp:2014":de}},attemptSync:function(fe,Ce){U=fe,o||((function(Me){try{if(!Me||!p.get().streaming.utcSynchronization.enabled)return!1;var Qe=isNaN(k)?30:k;return!(H&&Qe&&!isNaN(Qe))||(Date.now()-H)/1e3>=Qe}catch{return!0}})(Ce)?(o=!0,f()):oe.trigger(i.A.TIME_SYNCHRONIZATION_COMPLETED))},setConfig:function(fe){fe&&(fe.dashMetrics&&(b=fe.dashMetrics),fe.baseURLController&&(ie=fe.baseURLController),fe.errHandler&&(se=fe.errHandler),fe.settings&&(p=fe.settings))},reset:function(){Z(),oe.off(i.A.ATTEMPT_BACKGROUND_SYNC,K,t)}},e=(0,g.A)(he).getInstance().getLogger(t),oe.on(i.A.ATTEMPT_BACKGROUND_SYNC,K,t),t}Ki.__dashjs_factory_name="TimeSyncController";var Wi=h.A.getSingletonFactory(Ki);Wi.HTTP_TIMEOUT_MS=5e3,h.A.updateSingletonFactory(Ki.__dashjs_factory_name,Wi);var Jo=Wi;function Ia(){var t,e,o,l,p,C=this.context,b=(0,y.A)(C).getInstance();return t={attachMediaSource:function(F){var U=window.URL.createObjectURL(e);return F.setSource(U),l==="managedMediaSource"&&(F.setDisableRemotePlayback(!0),e.addEventListener("startstreaming",(function(){b.trigger(r.A.MANAGED_MEDIA_SOURCE_START_STREAMING)})),e.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?(e=new ManagedMediaSource,l="managedMediaSource",p.info("Created ManagedMediaSource")):U?(e=new MediaSource,l="mediaSource",p.info("Created MediaSource")):F&&(e=new WebKitMediaSource,p.info("Created WebkitMediaSource")),e},detachMediaSource:function(F){F.setSource(null)},setConfig:function(F){F&&F.settings&&(o=F.settings)},setDuration:function F(U){e&&e.readyState==="open"&&(U===null&&isNaN(U)||e.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})(e)?setTimeout(F.bind(null,U),50):(p.info("Set MediaSource duration:"+U),e.duration=U)))},setSeekable:function(F,U){e&&typeof e.setLiveSeekableRange=="function"&&typeof e.clearLiveSeekableRange=="function"&&e.readyState==="open"&&F>=0&&F<U&&(e.clearLiveSeekableRange(),e.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(t),t}Ia.__dashjs_factory_name="MediaSourceController";var Zo=h.A.getSingletonFactory(Ia);function Ra(){var t,e,o,l,p,C,b,F,U,H,B,w="urn:mpeg:dash:event:2012",j=1,k="urn:mpeg:dash:event:callback:2015",se=1,ie=300,he="discarded",oe="updated",te="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(),ge=Y-C;ge=C>0?Math.max(0,ge):0,S(l,ge,Y),S(o,ge,Y),L(l),L(o),C=Y,H=!1}}catch(ve){H=!1,e.error(ve)}}function S(Y,ge,ve){try{ue(Y,(function(fe){if(fe!==void 0){var Ce=isNaN(fe.duration)?0:fe.duration;fe.calculatedPresentationTime<=ve&&fe.calculatedPresentationTime+ge+Ce>=ve?$(fe,r.A.EVENT_MODE_ON_START):(P(ve,Ce+ge,fe.calculatedPresentationTime)||(function(Me){try{var Qe=Me.eventStream.period.start+Me.eventStream.period.duration;return Me.calculatedPresentationTime>Qe}catch($e){return e.error($e),!1}})(fe))&&(e.debug("Removing event ".concat(fe.id," from period ").concat(fe.eventStream.period.id," as it is expired or invalid")),(function(Me,Qe){try{var $e=Qe.eventStream.schemeIdUri,Ze=Qe.eventStream.period.id,at=Qe.eventStream.value,Nt=Qe.id;Me[Ze][$e]=Me[Ze][$e].filter((function(Ee){return at&&Ee.eventStream.value&&Ee.eventStream.value!==at||Ee.id!==Nt})),Me[Ze][$e].length===0&&delete Me[Ze][$e]}catch(Ee){e.error(Ee)}})(Y,fe))}}))}catch(fe){e.error(fe)}}function L(Y){try{for(var ge in Y)Y.hasOwnProperty(ge)&&Object.keys(Y[ge]).length===0&&delete Y[ge]}catch(ve){e.error(ve)}}function R(Y,ge){var ve=arguments.length>2&&arguments[2]!==void 0&&arguments[2],fe=Y.eventStream.schemeIdUri,Ce=Y.eventStream.value,Me=Y.id,Qe=he;ge[fe]||(ge[fe]=[]);var $e=ge[fe].findIndex((function(at){return(!Ce||at.eventStream.value&&at.eventStream.value===Ce)&&at.id===Me}));if($e===-1)ge[fe].push(Y),Y.triggeredReceivedEvent=!1,Y.triggeredStartEvent=!1,Qe=te;else if(ve){var Ze=ge[fe][$e];Y.triggeredReceivedEvent=Ze.triggeredReceivedEvent,Y.triggeredStartEvent=Ze.triggeredStartEvent,ge[fe][$e]=Y,Qe=oe}return Qe}function V(Y){try{if(Y.eventStream.value==j){var ge,ve=Y.calculatedPresentationTime;ge=Y.calculatedPresentationTime==4294967295?NaN:Y.calculatedPresentationTime+Y.duration,K.trigger(r.A.MANIFEST_VALIDITY_CHANGED,{id:Y.id,validUntil:ve,newDuration:ge,newManifestValidAfter:NaN},{mode:r.A.EVENT_MODE_ON_START})}}catch(fe){e.error(fe)}}function de(Y){try{var ge=F.getTime();ue(Y,(function(ve){var fe=ve.eventStream&&ve.eventStream.period&&!isNaN(ve.eventStream.period.duration)?ve.eventStream.period.duration:NaN,Ce=ve.eventStream&&ve.eventStream.period&&!isNaN(ve.eventStream.period.start)?ve.eventStream.period.start:NaN;if(!isNaN(fe)&&!isNaN(Ce)){var Me=ve.calculatedPresentationTime;Math.abs(Me-ge)<ie&&$(ve,r.A.EVENT_MODE_ON_START)}}))}catch(ve){e.error(ve)}}function ue(Y,ge){try{if(Y)for(var ve=Object.keys(Y),fe=0;fe<ve.length;fe++)for(var Ce=Y[ve[fe]],Me=Object.keys(Ce),Qe=0;Qe<Me.length;Qe++)Ce[Me[Qe]].forEach((function($e){$e!==void 0&&ge($e)}))}catch($e){e.error($e)}}function P(Y,ge,ve){try{return Y-ge>ve}catch(fe){return e.error(fe),!1}}function $(Y,ge){try{var ve=F.getTime(),fe=Y.id;if(ge===r.A.EVENT_MODE_ON_RECEIVE&&!Y.triggeredReceivedEvent)return e.debug("Received event ".concat(fe)),Y.triggeredReceivedEvent=!0,void K.trigger(Y.eventStream.schemeIdUri,{event:Y},{mode:ge});Y.triggeredStartEvent||(Y.eventStream.schemeIdUri===w&&Y.eventStream.value==j?Y.duration===0&&Y.presentationTimeDelta===0||(e.debug("Starting manifest refresh event ".concat(fe," at ").concat(ve)),(function(){try{z(),b.refreshManifest()}catch(Ce){e.error(Ce)}})()):Y.eventStream.schemeIdUri===k&&Y.eventStream.value==se?(e.debug("Starting callback event ".concat(fe," at ").concat(ve)),(function(Ce){try{(0,Qt.A)(Z).create({}).load({method:"get",url:Ce,request:{responseType:"arraybuffer"}})}catch(Me){e.error(Me)}})(Y.messageData)):(e.debug("Starting event ".concat(fe," from period ").concat(Y.eventStream.period.id," at ").concat(ve)),K.trigger(Y.eventStream.schemeIdUri,{event:Y},{mode:ge})),Y.triggeredStartEvent=!0)}catch(Ce){e.error(Ce)}}return t={addInlineEvents:function(Y,ge){try{if(z(),o[ge]||(o[ge]={}),Y)for(var ve=0;ve<Y.length;ve++){var fe=Y[ve];if(!P(F.getTime(),isNaN(fe.duration)?0:fe.duration,fe.calculatedPresentationTime)){var Ce=R(fe,o[ge],!0);Ce===te?(e.debug("Added inline event with id ".concat(fe.id," from period ").concat(ge)),$(fe,r.A.EVENT_MODE_ON_RECEIVE)):Ce===oe&&e.debug("Updated inline event with id ".concat(fe.id," from period ").concat(ge))}}}catch(Me){throw Me}},addInbandEvents:function(Y,ge){try{z(),l[ge]||(l[ge]={});for(var ve=0;ve<Y.length;ve++){var fe=Y[ve];P(F.getTime(),isNaN(fe.duration)?0:fe.duration,fe.calculatedPresentationTime)||(R(fe,l[ge],!1)===te?(fe.eventStream.schemeIdUri===w&&V(fe),e.debug("Added inband event with id ".concat(fe.id," from period ").concat(ge)),$(fe,r.A.EVENT_MODE_ON_RECEIVE)):e.debug("Inband event with scheme_id_uri ".concat(fe.eventStream.schemeIdUri,", value ").concat(fe.eventStream.value,", period id ").concat(ge," and event id ").concat(fe.id," was ignored because it has been added before.")))}N()}catch(Ce){throw Ce}},getInbandEvents:function(){return l},getInlineEvents:function(){return o},start:function(){try{z(),e.debug("Start Event Controller");var Y=U.get().streaming.eventControllerRefreshDelay;B||isNaN(Y)||(B=!0,p=setInterval(N,Y))}catch(ge){throw ge}},setConfig:function(Y){try{if(!Y)return;Y.manifestUpdater&&(b=Y.manifestUpdater),Y.playbackController&&(F=Y.playbackController),Y.settings&&(U=Y.settings)}catch(ge){throw ge}},reset:function(){(function(){try{p!==null&&B&&(clearInterval(p),p=null,B=!1,(function(){try{de(l),de(o)}catch(Y){e.error(Y)}})())}catch(Y){throw Y}})(),f()}},e=(0,g.A)(Z).getInstance().getLogger(t),f(),t}Ra.__dashjs_factory_name="EventController";var es=h.A.getSingletonFactory(Ra),xr={LEVELS:{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 zi(t,e){(e==null||e>t.length)&&(e=t.length);for(var o=0,l=Array(e);o<e;o++)l[o]=t[o];return l}function wa(){var t,e,o,l,p,C,b,F,U,H,B,w,j,k,se,ie,he,oe,te,Z,K,z,f,N,S,L,R,V,de,ue,P,$,Y,ge,ve,fe,Ce,Me,Qe,$e,Ze,at,Nt,Ee,Pe,ct,Ke,yt,ht=this.context,dt=(0,y.A)(ht).getInstance();function qt(){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 Yt(){(function(){try{var ze=F.getStreamsInfo();if(!f&&ze.length===0)throw new Error("There are no periods in the MPD");f&&ze.length>0&&U.updateManifestUpdateInfo({currentTime:Y.getTime(),buffered:$.getBufferRange(),presentationStartTime:ze[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||(e.debug("Removing stream ".concat(cn.getId())),cn.reset(!0)),Dn})):e.warn("No periods included in the current manifest. Skipping the filtering of outdated stream objects.")})(ze);for(var Ct=[],Jt=0,on=ze.length;Jt<on;Jt++){var mn=ze[Jt];Ct.push(ln(mn)),U.addManifestUpdateStreamInfo(mn)}Promise.all(Ct).then((function(){return new Promise((function(gn,cn){f?gn():ke(ze,gn,cn)}))})).then((function(){dt.trigger(i.A.STREAMS_COMPOSED),jt()})).catch((function(gn){throw gn}))}catch(gn){Z.error(new pe.A(me.MANIFEST_ERROR_ID_NOSTREAMS_CODE,gn.message+" nostreamscomposed",b.getValue())),ue=!0,Nr()}})()}function sn(){Pe=!0}function ln(ze){var Ct=fi(ze.id);return Ct?Ct.updateData(ze):(Ct=Fr(ht).create({manifestModel:b,mediaPlayerModel:ve,dashMetrics:U,manifestUpdater:p,adapter:F,timelineConverter:K,capabilities:o,capabilitiesFilter:l,errHandler:Z,baseURLController:j,segmentBaseController:k,textController:S,abrController:ie,playbackController:Y,eventController:oe,mediaController:he,protectionController:N,videoModel:$,streamInfo:ze,settings:Ee}),z.push(Ct),Ct.initialize(),Promise.resolve())}function ke(ze,Ct,Jt){try{st();var on=U.getCurrentDVRInfo().range;if(on.end<on.start){ct&&clearTimeout(ct);var mn=Math.min(1e3*(-1*(on.end-on.start)+2),2147483647);return e.debug("Waiting for ".concat(mn," ms before playback can start")),dt.trigger(i.A.AST_IN_FUTURE,{delay:mn}),void(ct=setTimeout((function(){ke(ze,Ct,Jt)}),mn))}Ee.get().streaming.applyProducerReferenceTime&&ge.calculateProducerReferenceTimeOffsets(ze);var gn=ze[0].manifestInfo;if(Ee.get().streaming.applyServiceDescription&&ge.applyServiceDescription(gn),F.getIsDynamic()){var cn=ir(ze,gn);Y.computeAndSetLiveDelay(cn,gn)}(Ee.get().streaming.applyContentSteering&&w.shouldQueryBeforeStart()?w.loadSteeringData():Promise.resolve()).then((function(){var Dn=b.getValue();Dn&&j.update(Dn),ut(),Ct()})).catch((function(Dn){e.error(Dn),ut(),Ct()}))}catch(Dn){Jt(Dn)}}function ut(){var ze=(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(Ke)&&Ke.toString().indexOf("posix:")===-1){var cn=Pn(!0);isNaN(cn)||(e.info("Start time from URI parameters: ".concat(cn)),on=Math.min(on,cn))}else{e.info("Start time provided by the app: ".concat(Ke));var Dn=Zn(!0,Ke);isNaN(Dn)||(on=Math.min(on,Dn))}var wn=Ee.get().streaming.timeShiftBuffer.calcFromSegmentTimeline?.1:0;on=Math.max(on,gn.start+wn)}}else if(on=xi()[0].getStreamInfo().start,isNaN(Ke)){var sr=Pn(!1);isNaN(sr)||(e.info("Start time from URI parameters: ".concat(sr)),on=Math.max(on,sr))}else{e.info("Start time provided by the app: ".concat(Ke));var zo=Zn(!1,Ke);isNaN(zo)||(on=Math.max(on,zo))}return on})(),Ct=Fe(ze),Jt=Ct!==null?Ct:z[0];dt.trigger(i.A.INITIAL_STREAM_SWITCH,{startTime:ze}),tt(Jt,null,ze),$e||($e=setInterval((function(){!V&&Y.getTimeToStreamEnd()<=0&&!Y.isSeeking()&&dt.trigger(i.A.PLAYBACK_ENDED,{isLast:Ar().isLast})}),200))}function tt(ze,Ct,Jt){try{if(V||!ze||Ct===ze&&ze.getIsActive())return;V=!0,dt.trigger(i.A.PERIOD_SWITCH_STARTED,{fromStreamInfo:Ct?Ct.getStreamInfo():null,toStreamInfo:ze.getStreamInfo()});var on=!1;f=ze,Ct&&(on=pt(ze,Ct),Ct.deactivate(on)),Jt=isNaN(Jt)?!on&&Ct?ze.getStreamInfo().start:NaN:Jt,e.info("Switch to stream ".concat(ze.getId(),". Seektime is ").concat(Jt,", current playback time is ").concat(Y.getTime(),". Seamless period switch is set to ").concat(on)),at=at.filter((function(mn){return mn.getId()!==f.getId()})),Y.initialize(Ar(),!!Ct),$.getElement()?gt(Jt,on,!1):Dt(Jt,on)}catch{V=!1}}function gt(ze,Ct){var Jt,on=arguments.length>2&&arguments[2]!==void 0&&arguments[2];function mn(){if(P&&P.readyState==="open"){e.debug("MediaSource is open!"),window.URL.revokeObjectURL(Jt),P.removeEventListener("sourceopen",mn),P.removeEventListener("webkitsourceopen",mn),qn();var cn=U.getCurrentDVRInfo();H.setSeekable(cn.range.start,cn.range.end),on?(isNaN(ze)||Y.seek(ze,!0,!0),f.setMediaSource(P).then((function(){f.initializeForTextWithMediaSource(P)}))):Dt(ze,Ct)}}function gn(){P.addEventListener("sourceopen",mn,!1),P.addEventListener("webkitsourceopen",mn,!1),Jt=H.attachMediaSource($),e.debug("MediaSource attached to element. Waiting on open...")}P?Ct?Dt(ze,Ct):(H.detachMediaSource($),gn()):(P=H.createMediaSource(),gn())}function Dt(ze,Ct){f.activate(P,Ct?Ze:void 0,ze).then((function(Jt){if(Jt){var on=Object.keys(Jt);on.length>0&&Jt[on[0]].getBuffer().changeType&&(Nt=!0),Ze=Jt}isNaN(ze)||(dt.trigger(i.A.SEEK_TARGET,{time:ze},{streamId:f.getId()}),Y.seek(ze,!1,!0),f.startScheduleControllers()),V=!1,dt.trigger(i.A.PERIOD_SWITCH_COMPLETED,{toStreamInfo:Ar()})}))}function Vt(ze){var Ct=Fe(ze.seekTime);Ct&&Ct!==f?Ct&&Ct!==f&&(Gt(),(function(Jt,on){var mn=Jt&&!isNaN(Jt.seekTime)?Jt.seekTime:NaN,gn=f.getProcessors().map((function(cn){return cn.prepareOuterPeriodPlaybackSeeking(Jt)}));Promise.all(gn).then((function(){tt(on,f,mn)})).catch((function(cn){Z.error(cn)}))})(ze,Ct)):(Gt(),(function(Jt){f.getProcessors().forEach((function(on){return on.prepareInnerPeriodPlaybackSeeking(Jt)})),dr(Ve.USER_REQUEST_STOP_REASON)})(ze)),pr(Ye.SEEK_START_REASON)}function Gt(){Kt()}function Kt(){at&&at.length>0&&(at.forEach((function(ze){ze.deactivate(!0)})),at=[])}function Zt(ze){if(ze.newMediaInfo.streamInfo.id===f.getId()){if(Kt(),Ee.get().streaming.buffer.resetSourceBuffersForTrackSwitch&&ze.oldMediaInfo&&ze.oldMediaInfo.codec!==ze.newMediaInfo.codec){var Ct=Y.getTime();return f.deactivate(!1),void gt(Ct,!1,!1)}f.prepareTrackChange(ze)}}function pt(ze,Ct){try{return Ee.get().streaming.buffer.reuseExistingSourceBuffers&&(Ct.isProtectionCompatible(ze)||Pe)&&(Nt&&Ee.get().streaming.buffer.useChangeTypeForTrackSwitch||Ct.isMediaCodecCompatible(ze,Ct))}catch{return!1}}function Ot(ze){var Ct=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;P&&!ze.getPreloaded()&&pt(ze,Ct)&&ze.startPreloading(P,Ze).then((function(){at.push(ze)}))}function Fe(ze){if(isNaN(ze))return null;for(var Ct=z.length,Jt=0;Jt<Ct;Jt++){var on=z[Jt];if(ze<parseFloat((on.getStartTime()+on.getDuration()).toFixed(5)))return on}return null}function st(){try{var ze=F.getIsDynamic(),Ct=F.getStreamsInfo()[0].manifestInfo,Jt=Y.getTime(),on=K.calcTimeShiftBufferWindow(z,ze),mn=En();if(on.start===void 0||on.end===void 0)return;mn&&mn.length!==0?mn.forEach((function(gn){U.addDVRInfo(gn.getType(),Jt,Ct,on)})):U.addDVRInfo(u.A.VIDEO,Jt,Ct,on)}catch{}}function xe(ze){if(Me&&R){var Ct=ve.getInitialBufferLevel(),Jt=[u.A.TEXT];(isNaN(Ct)||Ct<=Y.getBufferLevel(Jt)||F.getIsDynamic()&&Ct>Y.getLiveDelay())&&(Me=!1,pr(Ye.INITIAL_PLAYOUT_START_REASON),Y.play())}ze&&ze.mediaType&&U.addBufferLevel(ze.mediaType,new Date,1e3*ze.bufferLevel)}function Ge(ze){ze.streamInfo.id===f.getId()&&ze.reason&&ze.reason.forceReplace&&Kt(),fi(ze.streamInfo.id).prepareQualityChange(ze)}function lt(){if(F.getIsDynamic()&&Y.getOriginalLiveDelay()!==0&&f){var ze=F.getStreamsInfo();if(ze.length>0){var Ct=ze[0].manifestInfo,Jt=ir(ze,Ct);Y.computeAndSetLiveDelay(Jt,Ct)}}}function ye(){if(er()){var ze=$.getPlaybackQuality();ze&&U.addDroppedFrames(ze)}}function Te(){e.debug("[onPlaybackStarted]"),!Me&&Ce&&pr(Ye.RESUME_FROM_PAUSE_START_REASON),Me&&(Me=!1),Qe&&(Qe=!1,Ee.get().streaming.applyContentSteering&&!w.shouldQueryBeforeStart()&&w.loadSteeringData()),Ce=!1}function We(ze){e.debug("[onPlaybackPaused]"),ze.ended||(Ce=!0,dr(Ve.USER_REQUEST_STOP_REASON))}function wt(ze){e.debug("Stream with id ".concat(ze.streamInfo.id," finished buffering"));var Ct=ze.streamInfo.isLast;P&&Ct?(e.info("[onStreamBufferingCompleted] calls signalEndOfStream of mediaSourceController."),H.signalEndOfStream(P)):jt()}function jt(){if(f&&f.getHasFinishedBuffering())for(var ze=(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),Ct=0;Ct<ze.length;){var Jt=ze[Ct],on=Ct===0?f:ze[Ct-1];!Jt.getPreloaded()&&on.getHasFinishedBuffering()&&P&&Ot(Jt,on),Ct+=1}}function hn(){$e&&(clearInterval($e),$e=null)}function En(){return f?f.getProcessors():[]}function dn(ze){if(f&&!f.getIsEndedEventSignaled()){f.setIsEndedEventSignaled(!0);var Ct=(function(){var Jt=(arguments.length>0&&arguments[0]!==void 0?arguments[0]:null)||f||null;if(!Jt)return null;for(var on=Jt.getStreamInfo(),mn=on.start,gn=0,cn=-1,Dn=NaN;gn<z.length;){var wn=z[gn].getStreamInfo(),sr=wn.start-mn;sr>0&&(isNaN(Dn)||sr<Dn)&&on.id!==wn.id&&(Dn=sr,cn=gn),gn+=1}return cn>=0?z[cn]:null})();Ct?(e.debug("StreamController onEnded, found next stream with id ".concat(Ct.getStreamInfo().id,". Switching from ").concat(f.getStreamInfo().id," to ").concat(Ct.getStreamInfo().id)),tt(Ct,f,NaN)):(e.debug("StreamController no next stream found"),f.setIsEndedEventSignaled(!1)),dr(Ct?Ve.END_OF_PERIOD_STOP_REASON:Ve.END_OF_CONTENT_STOP_REASON)}ze&&ze.isLast&&(hn(),w.stopSteeringRequestTimer())}function qn(ze){var Ct=ze||Ar().manifestInfo.duration;H.setDuration(Ct)}function Pn(ze){var Ct=se.getURIFragmentData();if(!Ct||!Ct.t)return NaN;var Jt=xi()[0].getStreamInfo().start;return Ct.t=Ct.t.split(",")[0],Rr(ze,Ct.t,Jt)}function Zn(ze,Ct){var Jt=0;return ze||(Jt=xi()[0].getStreamInfo().start),Rr(ze,Ct,Jt)}function Rr(ze,Ct,Jt){var on=F.getRegularPeriods()[0],mn=Ct.toString(),gn=mn.indexOf("posix:")!==-1?mn.substring(6)==="now"?Date.now()/1e3:parseFloat(mn.substring(6)):NaN;return ze&&!isNaN(gn)?K.calcPresentationTimeFromWallTime(new Date(1e3*gn),on):parseFloat(mn)+Jt}function ir(ze,Ct){try{var Jt=NaN;if(Ct&&!isNaN(Ct.maxFragmentDuration)&&isFinite(Ct.maxFragmentDuration))return Ct.maxFragmentDuration;if(ze&&ze.length===1){var on=ze[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(sr){sr&&cn.push(sr)})),cn}),[]).reduce((function(cn,Dn){var wn=F.convertRepresentationToRepresentationInfo(Dn);return wn&&wn.fragmentDuration&&!isNaN(wn.fragmentDuration)&&cn.push(wn.fragmentDuration),cn}),[]);Jt=Math.max.apply(Math,(function(cn){if(Array.isArray(cn))return zi(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 zi(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)?zi(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(Jt)?Jt:NaN}catch{return NaN}var gn}function fr(ze){if(ze.error)ue=!0,Nr();else{e.info("Manifest updated... updating data system wide.");var Ct=ze.manifest;F.updatePeriods(Ct);var Jt=F.getUTCTimingSources();!F.getIsDynamic()||Jt&&Jt.length!==0||dt.trigger(r.A.CONFORMANCE_VIOLATION,{level:xr.LEVELS.WARNING,event:xr.EVENTS.NO_UTC_TIMING_ELEMENT});var on=F.getIsDynamic()?Jt.concat(fe.getUTCTimingSources()):Jt;l.filterUnsupportedFeatures(Ct).then((function(){j.initialize(Ct),B.attemptSync(on,F.getIsDynamic())}))}}function er(){return!!f&&f.getHasVideoTrack()}function wr(){return!!f&&f.getHasAudioTrack()}function dr(ze,Ct){Ct=Ct||new Date,En().forEach((function(Jt){Jt.finalisePlayList(Ct,ze)})),U.addPlayList()}function pr(ze){U.createPlaylistMetrics(1e3*Y.getTime(),ze)}function Li(ze){if(ze.error){var Ct="";switch(ze.error.code){case 1:Ct="MEDIA_ERR_ABORTED";break;case 2:Ct="MEDIA_ERR_NETWORK";break;case 3:Ct="MEDIA_ERR_DECODE",yt.counts.mediaErrorDecode+=1;break;case 4:Ct="MEDIA_ERR_SRC_NOT_SUPPORTED";break;case 5:Ct="MEDIA_ERR_ENCRYPTED";break;default:Ct="UNKNOWN"}Ct==="MEDIA_ERR_DECODE"&&Ee.get().errors.recoverAttempts.mediaErrorDecode>=yt.counts.mediaErrorDecode?(function(){e.warn("A MEDIA_ERR_DECODE occured: Resetting the MediaSource");var Jt=Y.getTime();f.deactivate(!1),e.warn("MediaSource has been resetted. Resuming playback from time ".concat(Jt)),gt(Jt,!1,!1)})():(de=!0,ze.error.message&&(Ct+=" ("+ze.error.message+")"),ze.error.msExtendedCode&&(Ct+=" (0x"+(ze.error.msExtendedCode>>>0).toString(16).toUpperCase()+")"),e.fatal("Video Element Error: "+Ct),ze.error&&e.fatal(ze.error),Z.error(new pe.A(ze.error.code,Ct)),Nr())}}function Ar(){return f?f.getStreamInfo():null}function fi(ze){for(var Ct=0,Jt=z.length;Ct<Jt;Ct++)if(z[Ct].getId()===ze)return z[Ct];return null}function jr(ze){isNaN(ze.newDuration)||qn(ze.newDuration)}function Fi(){z=[],Ke=NaN,N=null,V=!1,f=null,de=!1,ue=!1,Me=!0,Qe=!0,Ce=!1,R=!0,$e=null,Pe=!1,Nt=!1,at=[],ct=null,yt={counts:{mediaErrorDecode:0}}}function Nr(){qt(),B.reset(),dr(de||ue?Ve.FAILURE_STOP_REASON:Ve.USER_REQUEST_STOP_REASON);for(var ze=0,Ct=z?z.length:0;ze<Ct;ze++)z[ze].reset(de);dt.off(r.A.PLAYBACK_TIME_UPDATED,ye,t),dt.off(r.A.PLAYBACK_SEEKING,Vt,t),dt.off(r.A.PLAYBACK_ERROR,Li,t),dt.off(r.A.PLAYBACK_STARTED,Te,t),dt.off(r.A.PLAYBACK_PAUSED,We,t),dt.off(r.A.PLAYBACK_ENDED,dn,t),dt.off(r.A.METRIC_ADDED,Aa,t),dt.off(r.A.MANIFEST_VALIDITY_CHANGED,jr,t),dt.off(r.A.BUFFER_LEVEL_UPDATED,xe,t),dt.off(r.A.QUALITY_CHANGE_REQUESTED,Ge,t),i.A.KEY_SESSION_UPDATED&&dt.off(i.A.KEY_SESSION_UPDATED,sn,t),dt.off(i.A.MANIFEST_UPDATED,fr,t),dt.off(i.A.STREAM_BUFFERING_COMPLETED,wt,t),dt.off(i.A.TIME_SYNCHRONIZATION_COMPLETED,Yt,t),dt.off(i.A.CURRENT_TRACK_CHANGED,Zt,t),dt.off(i.A.SETTING_UPDATED_LIVE_DELAY,lt,t),dt.off(i.A.SETTING_UPDATED_LIVE_DELAY_FRAGMENT_COUNT,lt,t),j.reset(),p.reset(),oe.reset(),U.clearAllCurrentMetrics(),b.setValue(null),C.reset(),K.reset(),te.reset(),P&&(H.detachMediaSource($),P=null),$=null,N&&(N=null,L=null,b.getValue()&&dt.trigger(i.A.PROTECTION_DESTROYED,{data:b.getValue().url})),hn(),dt.trigger(i.A.STREAM_TEARDOWN_COMPLETE),Fi()}function Aa(ze){if(ze.metric===_.A.DVR_INFO){var Ct=wr()?u.A.AUDIO:u.A.VIDEO;ze.mediaType===Ct&&H.setSeekable(ze.value.range.start,ze.value.range.end)}}function xi(){return z}return t={initialize:function(ze,Ct){qt(),R=ze,L=Ct,K.initialize(),(p=Sa(ht).create()).setConfig({manifestModel:b,adapter:F,manifestLoader:C,errHandler:Z,settings:Ee,contentSteeringController:w}),p.initialize(),(oe=es(ht).getInstance()).setConfig({manifestUpdater:p,playbackController:Y,settings:Ee}),oe.start(),B.setConfig({dashMetrics:U,baseURLController:j,errHandler:Z,settings:Ee}),B.initialize(),H.setConfig({settings:Ee}),N&&(dt.trigger(i.A.PROTECTION_CREATED,{controller:N}),N.setMediaElement($.getElement()),L&&N.setProtectionData(L)),dt.on(r.A.PLAYBACK_TIME_UPDATED,ye,t),dt.on(r.A.PLAYBACK_SEEKING,Vt,t),dt.on(r.A.PLAYBACK_ERROR,Li,t),dt.on(r.A.PLAYBACK_STARTED,Te,t),dt.on(r.A.PLAYBACK_PAUSED,We,t),dt.on(r.A.PLAYBACK_ENDED,dn,t),dt.on(r.A.METRIC_ADDED,Aa,t),dt.on(r.A.MANIFEST_VALIDITY_CHANGED,jr,t),dt.on(r.A.BUFFER_LEVEL_UPDATED,xe,t),dt.on(r.A.QUALITY_CHANGE_REQUESTED,Ge,t),i.A.KEY_SESSION_UPDATED&&dt.on(i.A.KEY_SESSION_UPDATED,sn,t),dt.on(i.A.MANIFEST_UPDATED,fr,t),dt.on(i.A.STREAM_BUFFERING_COMPLETED,wt,t),dt.on(i.A.TIME_SYNCHRONIZATION_COMPLETED,Yt,t),dt.on(i.A.CURRENT_TRACK_CHANGED,Zt,t),dt.on(i.A.SETTING_UPDATED_LIVE_DELAY,lt,t),dt.on(i.A.SETTING_UPDATED_LIVE_DELAY_FRAGMENT_COUNT,lt,t)},getActiveStreamInfo:Ar,addDVRMetric:st,hasVideoTrack:er,hasAudioTrack:wr,getStreamById:fi,getStreamForTime:Fe,getTimeRelativeToStreamId:function(ze,Ct){for(var Jt=null,on=0,mn=0,gn=null,cn=0;cn<z.length;cn++){if(mn=(Jt=z[cn]).getStartTime(),gn=Jt.getDuration(),Number.isFinite(mn)&&(on=mn),Jt.getId()===Ct)return ze-on;Number.isFinite(gn)&&(on+=gn)}return null},load:function(ze){var Ct=arguments.length>1&&arguments[1]!==void 0?arguments[1]:NaN;qt(),Ke=Ct,C.load(ze)},loadWithManifest:function(ze){var Ct=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")})(),Ke=Ct,p.setManifest(ze)},getActiveStreamProcessors:En,setConfig:function(ze){ze&&(ze.capabilities&&(o=ze.capabilities),ze.capabilitiesFilter&&(l=ze.capabilitiesFilter),ze.manifestLoader&&(C=ze.manifestLoader),ze.manifestModel&&(b=ze.manifestModel),ze.mediaPlayerModel&&(ve=ze.mediaPlayerModel),ze.customParametersModel&&(fe=ze.customParametersModel),ze.protectionController&&(N=ze.protectionController),ze.adapter&&(F=ze.adapter),ze.dashMetrics&&(U=ze.dashMetrics),ze.errHandler&&(Z=ze.errHandler),ze.timelineConverter&&(K=ze.timelineConverter),ze.videoModel&&($=ze.videoModel),ze.playbackController&&(Y=ze.playbackController),ze.serviceDescriptionController&&(ge=ze.serviceDescriptionController),ze.contentSteeringController&&(w=ze.contentSteeringController),ze.textController&&(S=ze.textController),ze.abrController&&(ie=ze.abrController),ze.mediaController&&(he=ze.mediaController),ze.settings&&(Ee=ze.settings),ze.baseURLController&&(j=ze.baseURLController),ze.uriFragmentModel&&(se=ze.uriFragmentModel),ze.segmentBaseController&&(k=ze.segmentBaseController),ze.manifestUpdater&&(p=ze.manifestUpdater))},setProtectionData:function(ze){L=ze,N&&N.setProtectionData(L)},getIsStreamSwitchInProgress:function(){return V},switchToVideoElement:function(ze){f&&(Y.initialize(Ar()),gt(ze,!1,!0))},getHasMediaOrInitialisationError:function(){return de||ue},getStreams:xi,getActiveStream:function(){return f},getInitialPlayback:function(){return Me},getAutoPlay:function(){return R},refreshManifest:function(){p.getIsUpdating()||p.refreshManifest()},reset:Nr},e=(0,g.A)(ht).getInstance().getLogger(t),B=Jo(ht).getInstance(),H=Zo(ht).getInstance(),te=Oe(ht).getInstance(),Fi(),t}wa.__dashjs_factory_name="StreamController";var Na=h.A.getSingletonFactory(wa);function Ca(){var t,e,o,l,p,C,b,F,U,H,B,w,j=this.context,k=(0,y.A)(j).getInstance();function se(){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,te,this),k.off(i.A.PLAYBACK_SEEKING,ie,this),k.off(i.A.BUFFER_REPLACEMENT_STARTED,he,t),k.off(i.A.TRACK_CHANGE_RENDERED,oe,t)})(),p=null,C=NaN,l=0,H=null,B={}}function ie(){H&&(clearTimeout(H),H=null)}function he(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 oe(f){f&&f.mediaType&&(B[f.mediaType]=!1)}function te(){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();e===f?z(f,!0):(e=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,de=o.get().streaming.gaps.jumpLargeGaps,ue=U.getBufferRange(),P=NaN,$=!1;if(N=(function(at,Nt){try{if(!at||at.length<=1&&Nt>0)return NaN;for(var Ee=NaN,Pe=0;isNaN(Ee)&&Pe<at.length;){var ct=Pe>0?at.end(Pe-1):0;Nt<at.start(Pe)&&ct-Nt<o.get().streaming.gaps.threshold&&(Ee=Pe),Pe+=1}return Ee}catch{return null}})(ue,f),!isNaN(N)){var Y=ue.start(N),ge=Y-f;ge>0&&(ge<=V||de)&&(P=Y)}var ve=b.getTimeToStreamEnd();if(isNaN(P)&&S&&isFinite(ve)&&!isNaN(ve)&&ve<V&&(P=parseFloat(b.getStreamEndTime().toFixed(5)),$=!0),L&&isNaN(P)&&S&&isNaN(N)&&(function(at,Nt){for(var Ee=0,Pe=at.length;Ee<Pe;Ee++)if(Nt>=at.start(Ee)&&Nt<=at.end(Ee))return!0;return!1})(ue,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 fe=P-f;if($){var Ce=F.getStreamForTime(P),Me=Ce&&!!Ce.getPreloaded();w.warn("Jumping to end of stream because of gap from ".concat(f," to ").concat(P,". Gap duration: ").concat(fe)),b.seek(P,!0,Me)}else{var Qe=b.getIsDynamic(),$e=N>0?ue.end(N-1):f,Ze=Qe?1e3*Math.max(0,fe-.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($e," and ending at ").concat(P,". Jumping by: ").concat(P-$e)),H=null}),Ze)}C=P}}return t={reset:se,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,te,this),k.on(i.A.PLAYBACK_SEEKING,ie,this),k.on(i.A.BUFFER_REPLACEMENT_STARTED,he,t),k.on(i.A.TRACK_CHANGE_RENDERED,oe,t)})()}},w=(0,g.A)(j).getInstance().getLogger(t),se(),t}Ca.__dashjs_factory_name="GapController";var ts=h.A.getSingletonFactory(Ca);function Da(){var t,e,o,l,p,C,b,F,U,H,B=this.context,w=(0,y.A)(B).getInstance();function j(){e=!1;var z=Ft.A.parseUserAgent();o=z&&z.browser&&z.browser.name&&z.browser.name.toLowerCase()==="safari"}function k(){e=!1}function se(z){if(z.streamId===C.getActiveStreamInfo().id&&U){var f=b.getLiveDelay();b.getBufferLevel()>f/2&&(U=!1)}}function ie(z){z.streamId===C.getActiveStreamInfo().id&&(U=z.state===_.A.BUFFER_EMPTY)}function he(){F.getCatchupModeEnabled()||l.setPlaybackRate(1)}function oe(){b.getIsDynamic()&&F.getCatchupModeEnabled()&&(F.getCatchupPlaybackRates().max>0||F.getCatchupPlaybackRates().min<0)&&!b.isPaused()&&!b.isSeeking()&&(function(){try{return!(!b.getTime()>0||e)&&(Z()===u.A.LIVE_CATCHUP_MODE_LOLP?(function(z,f){try{return Math.abs(te())>0||z<f}catch{return!1}})(b.getBufferLevel(),p.get().streaming.liveCatchup.playbackBufferMin):(function(){try{return Math.abs(te())>0}catch{return!1}})())}catch{return!1}})()&&(function(){if(!e&&l){var z,f=l.getPlaybackRate(),N=F.getCatchupPlaybackRates(),S=b.getBufferLevel(),L=te(),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"),e=!0,b.seekToCurrentLive(!0,!1);else{var V=b.getCurrentLiveLatency(),de=b.getLiveDelay();z=Z()===u.A.LIVE_CATCHUP_MODE_LOLP?(function(P,$,Y,ge,ve){var fe;if(ve<ge){var Ce=Math.abs(P.min),Me=5*(ve-ge);fe=1-Ce+2*Ce/(1+Math.pow(Math.E,-Me)),H.debug("[LoL+ playback control_buffer-based] bufferLevel: "+ve+", newRate: "+fe)}else{if(Math.abs($-Y)<=.02*Y)fe=1;else{var Qe=$-Y,$e=Qe<0?Math.abs(P.min):P.max,Ze=5*Qe;fe=1-$e+2*$e/(1+Math.pow(Math.E,-Ze))}H.debug("[LoL+ playback control_latency-based] latency: "+$+", newRate: "+fe)}return fe})(N,V,de,p.get().streaming.liveCatchup.playbackBufferMin,S):(function(P,$,Y,ge){if(U)return 1;var ve=$-Y,fe=ve<0?Math.abs(P.min):P.max,Ce=5*ve,Me=1-fe+2*fe/(1+Math.pow(Math.E,-Ce));return b.getPlaybackStalled()&&ge<=Y/2&&ve>0&&(Me=1),Me})(N,V,de,S);var ue=o?.25:.02/(.5/N.max);z&&Math.abs(f-z)>=ue&&(H.debug("[CatchupController]: Setting playback rate to ".concat(z)),l.setPlaybackRate(z))}}})()}function te(){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 t={reset:function(){w.off(r.A.BUFFER_LEVEL_UPDATED,se,t),w.off(r.A.BUFFER_LEVEL_STATE_CHANGED,ie,t),w.off(r.A.PLAYBACK_PROGRESS,oe,t),w.off(r.A.PLAYBACK_TIME_UPDATED,oe,t),w.off(r.A.PLAYBACK_SEEKED,k,t),w.off(i.A.SETTING_UPDATED_CATCHUP_ENABLED,he,t),w.off(i.A.SETTING_UPDATED_PLAYBACK_RATE_MIN,K,t),w.off(i.A.SETTING_UPDATED_PLAYBACK_RATE_MAX,K,t),w.off(r.A.STREAM_INITIALIZED,K,t),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,se,t),w.on(r.A.BUFFER_LEVEL_STATE_CHANGED,ie,t),w.on(r.A.PLAYBACK_PROGRESS,oe,t),w.on(r.A.PLAYBACK_TIME_UPDATED,oe,t),w.on(r.A.PLAYBACK_SEEKED,k,t),w.on(i.A.SETTING_UPDATED_CATCHUP_ENABLED,he,t),w.on(i.A.SETTING_UPDATED_PLAYBACK_RATE_MIN,K,t),w.on(i.A.SETTING_UPDATED_PLAYBACK_RATE_MAX,K,t),w.on(r.A.STREAM_INITIALIZED,K,t),K()}},H=(0,g.A)(B).getInstance().getLogger(t),j(),t}Da.__dashjs_factory_name="CatchupController";var ns=h.A.getSingletonFactory(Da),rs=[u.A.SERVICE_DESCRIPTION_DVB_LL_SCHEME],Oa="video",Ma="audio";function Pa(){var t,e,o,l,p,C=this.context;function b(){e={liveDelay:NaN,liveCatchup:{maxDrift:NaN,playbackRate:{min:NaN,max:NaN}},minBitrate:{},maxBitrate:{},initialBitrate:{},contentSteering:null},o=[]}function F(U,H,B){try{e[U][H]=B/1e3}catch(w){l.error(w)}}return t={getServiceDescriptionSettings:function(){return e},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(se,ie){return se.concat(p.getAllMediaInfoForType(j,ie))}),[]).reduce((function(se,ie){return p.getProducerReferenceTimes(j,ie).forEach((function(he){var oe=p.getVoRepresentations(ie);if(oe&&oe.length>0&&oe[0].adaptation&&oe[0].segmentInfoType===n.A.SEGMENT_TEMPLATE){var te=oe[0],Z=new Date(he[n.A.WALL_CLOCK_TIME]).getTime()/1e3-(he[n.A.PRESENTATION_TIME]/te[n.A.TIMESCALE]-te[n.A.PRESENTATION_TIME_OFFSET]+j.start),K=w-Z;se.push({id:he[n.A.ID],to:K})}})),se}),[]);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 rs.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(oe){return{liveDelay:oe.latency.target/1e3,maxDrift:!isNaN(oe.latency.max)&&oe.latency.max>oe.latency.target?(oe.latency.max-oe.latency.target+500)/1e3:NaN,referenceId:oe.latency.referenceId||NaN}})(j),o.length>0){var se=(function(oe){var te,Z=0,K=o.filter((function(z){return z.id===oe.referenceId}));return K.length===0?(Z=o.length>0?o[0].to:0,te=o[0].id||NaN):(Z=K[0].to||0,te=K[0].id||NaN),{to:Z,id:te}})(k),ie=se.to,he=se.id;e.liveDelay=k.liveDelay-ie,e.liveCatchup.maxDrift=k.maxDrift,l.debug(`
12
12
  Found latency properties coming from service description. Applied time offset of `.concat(ie," from ProducerReferenceTime element with id ").concat(he,`.
13
13
  Live Delay: `).concat(k.liveDelay-ie,", Live catchup max drift: ").concat(k.maxDrift,`
14
- `))}else e.liveDelay=k.liveDelay,e.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,se=j.playbackRate.max?Math.round(1e3*(j.playbackRate.max-1))/1e3:NaN;e.liveCatchup.playbackRate.min=k,e.liveCatchup.playbackRate.max=se,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(se))})(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 se=[];j.operatingBandwidth.mediaType===Ca||j.operatingBandwidth.mediaType===Da?se.push(j.operatingBandwidth.mediaType):j.operatingBandwidth.mediaType==="any"&&(se.push(Da),se.push(Ca)),se.forEach((function(ie){isNaN(k.minBandwidth)||F("minBitrate",ie,k.minBandwidth),isNaN(k.maxBandwidth)||F("maxBitrate",ie,k.maxBandwidth),isNaN(k.targetBandwidth)||F("initialBitrate",ie,k.targetBandwidth)}))}})(w),w.contentSteering&&(function(j){e.contentSteering=j.contentSteering})(w))}},reset:function(){b()},setConfig:function(U){U&&U.adapter&&(p=U.adapter)}},l=(0,g.A)(C).getInstance().getLogger(t),b(),t}Oa.__dashjs_factory_name="ServiceDescriptionController";var ns=h.A.getSingletonFactory(Oa);function Vi(){var t,e,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,ge=P.streamInfo.id,ve=w(Y,ge);if(o[ge]&&o[ge][Y]&&(o[ge][Y].current=P,o[ge][Y].current&&(Y!==u.A.TEXT&&!ie(P,ve)||Y===u.A.TEXT&&P.isFragmented)&&H.trigger(i.A.CURRENT_TRACK_CHANGED,{oldMediaInfo:ve,newMediaInfo:P,switchMode:l.get().streaming.trackSwitchMode[Y]},{streamId:ge}),!$)){var fe=(function(Ce){var Me={lang:Ce.lang,viewpoint:Ce.viewpoint,roles:Ce.roles,accessibility:Ce.accessibility,audioChannelConfiguration:Ce.audioChannelConfiguration,codec:Ce.codec};return Me.lang||Me.viewpoint||Me.role&&Me.role.length>0||Me.accessibility&&Me.accessibility.length>0||Me.audioChannelConfiguration&&Me.audioChannelConfiguration.length>0?Me:null})(P);if(!fe||!o[ge][Y].storeLastSettings)return;fe.roles&&(fe.role=fe.roles[0],delete fe.roles),fe.accessibility&&(fe.accessibility=fe.accessibility[0]),fe.audioChannelConfiguration&&(fe.audioChannelConfiguration=fe.audioChannelConfiguration[0]),C[Y]=fe,F.setSavedMediaSettings(Y,fe)}}}function k(P,$){P&&$&&(p[P]=$)}function se(P){return P?p[P]:null}function ie(P,$){if(!P&&!$)return!0;if(!P||!$)return!1;var Y=P.id===$.id,ge=P.viewpoint===$.viewpoint,ve=JSON.stringify(P.viewpointsWithSchemeIdUri)===JSON.stringify($.viewpointsWithSchemeIdUri),fe=P.lang===$.lang,Ce=P.codec===$.codec,Me=P.roles.toString()===$.roles.toString(),Qe=JSON.stringify(P.rolesWithSchemeIdUri)===JSON.stringify($.rolesWithSchemeIdUri),$e=P.accessibility.toString()===$.accessibility.toString(),Ze=JSON.stringify(P.accessibilitiesWithSchemeIdUri)===JSON.stringify($.accessibilitiesWithSchemeIdUri),at=P.audioChannelConfiguration.toString()===$.audioChannelConfiguration.toString(),Nt=JSON.stringify(P.audioChannelConfigurationsWithSchemeIdUri)===JSON.stringify($.audioChannelConfigurationsWithSchemeIdUri);return Y&&Ce&&ge&&ve&&fe&&Me&&Qe&&$e&&Ze&&at&&Nt}function he(){o={},C={},p={audio:null,video:null,text:null}}function oe(P,$,Y){var ge=[];return P.forEach((function(ve){$(Y,ve)&&ge.push(ve)})),ge.length!==0?ge:P}function te(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(ge){return ge===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,ge=[];return P.forEach((function(ve){($=Math.max.apply(Math,ve.bitrateList.map((function(fe){return fe.bandwidth}))))>Y?(Y=$,ge=[ve]):$===Y&&ge.push(ve)})),ge}function R(P){var $,Y=1/0,ge=[];return P.forEach((function(ve){var fe=ve.bitrateList.reduce((function(Ce,Me){var Qe=Math.max(1,Me.width*Me.height);return Ce+Me.bandwidth/Qe}),0);($=fe/ve.bitrateList.length)<Y?(Y=$,ge=[ve]):$===Y&&ge.push(ve)})),ge}function V(P){var $,Y=0,ge=[];return P.forEach((function(ve){($=ve.representationCount)>Y?(Y=$,ge=[ve]):$===Y&&ge.push(ve)})),ge}function de(P,$){if(P===u.A.TEXT)return $[0];var Y,ge=l.get().streaming.selectionModeForInitialTrack,ve=b.getCustomInitialTrackSelectionFunction();if(ve&&typeof ve=="function")Y=ve($);else switch(ge){case u.A.TRACK_SELECTION_MODE_HIGHEST_SELECTION_PRIORITY:Y=(function(fe){var Ce,Me,Qe=(Ce=0,Me=[],fe.forEach((function($e){isNaN($e.selectionPriority)||($e.selectionPriority>Ce?(Ce=$e.selectionPriority,Me=[$e]):$e.selectionPriority===Ce&&Me.push($e))})),Me);return Qe.length>1&&(Qe=L(Qe)),Qe.length>1&&(Qe=V(Qe)),Qe})($);break;case u.A.TRACK_SELECTION_MODE_HIGHEST_BITRATE:Y=(function(fe){var Ce=L(fe);return Ce.length>1&&(Ce=V(Ce)),Ce})($);break;case u.A.TRACK_SELECTION_MODE_FIRST_TRACK:Y=ue($);break;case u.A.TRACK_SELECTION_MODE_HIGHEST_EFFICIENCY:Y=(function(fe){var Ce=R(fe);return Ce.length>1&&(Ce=L(Ce)),Ce})($);break;case u.A.TRACK_SELECTION_MODE_WIDEST_RANGE:Y=(function(fe){var Ce=V(fe);return Ce.length>1&&(Ce=L(fe)),Ce})($);break;default:e.warn("Track selection mode ".concat(ge," is not supported. Falling back to TRACK_SELECTION_MODE_FIRST_TRACK")),Y=ue($)}return Y.length>0?Y[0]:$[0]}function ue(P){return P[0]}return t={setInitialMediaSettingsForType:function(P,$){var Y=C[P]||se(P),ge=B(P,$.id),ve=[];Y||((Y=F.getSavedMediaSettings(P))&&delete Y.codec,k(P,Y)),ge&&ge.length!==0&&(Y&&(ve=oe(ve=Array.from(ge),te,Y),ve=oe(ve,Z,Y),ve=oe(ve,K,Y),P===u.A.AUDIO&&C[P]||(ve=oe(ve,z,Y)),ve=oe(ve,f,Y),ve=oe(ve,N,Y),ve=oe(ve,S,Y)),ve.length===0?j(de(P,ge),!0):ve.length>1?j(de(P,ve)):j(ve[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,ge,ve=P.streamInfo.id;o[ve]||(o[ve]={audio:{list:[],storeLastSettings:ge=l.get().streaming.saveLastMediaSettingsForCurrentStreamingSession,current:null},video:{list:[],storeLastSettings:ge,current:null},text:{list:[],storeLastSettings:ge,current:null},image:{list:[],storeLastSettings:ge,current:null}});for(var fe=o[ve][$].list,Ce=0,Me=fe.length;Ce<Me;++Ce)if(ie(fe[Ce],P))return;fe.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][$]&&ie(o[Y][$].current,P)},setTrack:j,selectInitialTrack:de,setInitialSettings:k,getInitialSettings:se,getTracksWithHighestBitrate:L,getTracksWithHighestEfficiency:R,getTracksWithWidestRange:V,isTracksEqual:ie,matchSettings:function(P,$){var Y=arguments.length>2&&arguments[2]!==void 0&&arguments[2];try{var ge=!1;P.lang?P.lang instanceof RegExp?ge=$.lang.match(P.lang):$.lang!==""&&P.lang&&(ge=$.lang):ge=!0;var ve=P.index===void 0||P.index===null||$.index===P.index,fe=!P.viewpoint||P.viewpoint===$.viewpoint,Ce=!P.role||!!$.roles.filter((function($e){return $e===P.role}))[0],Me=!P.accessibility||!!$.accessibility.filter((function($e){return $e===P.accessibility}))[0],Qe=!P.audioChannelConfiguration||!!$.audioChannelConfiguration.filter((function($e){return $e===P.audioChannelConfiguration}))[0];return ge&&ve&&fe&&(Ce||$.type===u.A.AUDIO&&Y)&&Me&&Qe}catch{return!1}},matchSettingsLang:te,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:he},e=(0,g.A)(U).getInstance().getLogger(t),he(),t}Vi.__dashjs_factory_name="MediaController";var Ma=h.A.getSingletonFactory(Vi);h.A.updateSingletonFactory(Vi.__dashjs_factory_name,Ma);var rs=Ma;function is(t,e,o){return Object.defineProperty(t,"prototype",{writable:!1}),t}var Ei=NaN,Pa=is((function t(e,o){(function(l,p){if(!(l instanceof p))throw new TypeError("Cannot call a class as a function")})(this,t),this.data={baseUrls:e||null,selectedIdx:o||Ei},this.children=[]}));function La(){var t,e,o,l,p=this.context,C=Et(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 Pa(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||e;B(j.data),j.children&&j.children.forEach((function(k){return U(B,k)}))}function H(){e=new Pa}return t={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,e.data.baseUrls)||(e.data.baseUrls=j,e.data.selectedIdx=Ei),w&&w.Period_asArray&&w.Period_asArray.forEach((function(k,se){b(e.children,se,k),k.AdaptationSet_asArray&&k.AdaptationSet_asArray.forEach((function(ie,he){b(e.children[se].children,he,ie),ie.Representation_asArray&&ie.Representation_asArray.sort(o.getRepresentationSortFunction()).forEach((function(oe,te){b(e.children[se].children[he].children,te,oe)}))}))}))})(B)},getForPath:function(B){var w=e,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(),t}La.__dashjs_factory_name="BaseURLTreeModel";var as=h.A.getClassFactory(La);function Fa(t){var e=(t=t||{}).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!e.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}}}Fa.__dashjs_factory_name="DVBSelector";var os=h.A.getClassFactory(Fa);function xa(t){var e=(t=t||{}).blacklistController;return{select:function(o){var l,p=0;return o&&o.some((function(C,b){return p=b,!e.contains(C.serviceLocation)}))&&(l=o[p]),l}}}xa.__dashjs_factory_name="BasicSelector";var ss=h.A.getClassFactory(xa);function Ua(){var t,e,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 t={selectBaseUrlIndex:function(C){var b=NaN;if(isNaN(C.selectedIdx)){var F=e.getSteeringDataFromManifest();F&&F.defaultServiceLocationArray.length>0&&(b=p(F.defaultServiceLocationArray,C.baseUrls))}var U=e.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&&(e=C.contentSteeringController)}},e=Jr(l).getInstance(),t}Ua.__dashjs_factory_name="ContentSteeringSelector";var us=h.A.getClassFactory(Ua);function Ba(){var t,e,o,l,p,C,b=this.context,F=(0,y.A)(b).getInstance(),U=(0,le.A)(b).getInstance();function H(){e.reset()}return t={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 pe.A(me.URL_RESOLUTION_FAILED_GENERIC_ERROR_CODE,me.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)}},e=$r(b).create({updateEventName:i.A.SERVICE_LOCATION_BASE_URL_BLACKLIST_CHANGED,addBlacklistEventName:i.A.SERVICE_LOCATION_BASE_URL_BLACKLIST_ADD}),o=ss(b).create({blacklistController:e}),l=os(b).create({blacklistController:e}),(p=us(b).create()).setConfig({blacklistController:e}),C=o,t}Ba.__dashjs_factory_name="BaseURLSelector";var ls=h.A.getClassFactory(Ba);function ka(){var t,e,o,l,p,C=this.context,b=(0,y.A)(C).getInstance(),F=(0,Ae.A)(C).getInstance();function U(B){o.update(B),l.chooseSelector(e.getIsDVB(B)),b.trigger(r.A.BASE_URLS_UPDATED,{baseUrls:H(B)})}function H(B){return o.getBaseUrls(B)}return t={reset:function(){o.reset(),l.reset()},initialize:function(B){o.setConfig({adapter:e,contentSteeringController:p}),U(B)},resolve:function(B){var w=o.getForPath(B).reduce((function(j,k){var se=l.select(k);return se?(F.isRelative(se.url)?j.url=F.resolve(se.url,j.url):(j.url=se.url,j.serviceLocation=se.serviceLocation),j.availabilityTimeOffset=se.availabilityTimeOffset,j.availabilityTimeComplete=se.availabilityTimeComplete,j.queryParams=se.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&&(e=B.adapter),B.contentSteeringController&&(p=B.contentSteeringController)},getBaseUrls:H,update:U},o=as(C).create(),l=ls(C).create(),b.on(i.A.SERVICE_LOCATION_BASE_URL_BLACKLIST_CHANGED,(function(B){o.invalidateSelectedIndexes(B.entry)}),t),t}ka.__dashjs_factory_name="BaseURLController";var cs=h.A.getClassFactory(ka);function Ki(t){return Ki=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ki(t)}function fs(t,e,o){return e=_i(e),(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)})(t,Ga()?Reflect.construct(e,[],_i(t).constructor):e.apply(t,o))}function Ga(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Ga=function(){return!!t})()}function _i(t){return _i=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},_i(t)}function Wi(t,e){return Wi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,l){return o.__proto__=l,o},Wi(t,e)}var ja=(function(t){function e(l,p){var C;return(function(b,F){if(!(b instanceof F))throw new TypeError("Cannot call a class as a function")})(this,e),(C=fs(this,e)).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)})(e,t),o=e,Object.defineProperty(o,"prototype",{writable:!1}),o;var o})(T.A);function qa(t){t=t||{};var e=this.context,o=(0,y.A)(e).getInstance(),l=Mn(e).create({errHandler:t.errHandler,dashMetrics:t.dashMetrics,mediaPlayerModel:t.mediaPlayerModel,requestModifier:t.requestModifier,errors:me});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 pe.A(me.XLINK_LOADER_LOADING_FAILURE_ERROR_CODE,me.XLINK_LOADER_LOADING_FAILURE_ERROR_MESSAGE+p)})};if(p==="urn:mpeg:dash:resolve-to-zero:2013")F(null,!0);else{var U=new ja(p,je.G.XLINK_EXPANSION_TYPE);l.load({request:U,success:function(H){F(H)},error:function(){F(null)}})}},reset:function(){l&&(l.abort(),l=null)}}}qa.__dashjs_factory_name="XlinkLoader";var ds=h.A.getClassFactory(qa),Ya=function(t){(t=t||{}).escapeMode===void 0&&(t.escapeMode=!0),t.attributePrefix===void 0&&(t.attributePrefix="_"),t.arrayAccessForm=t.arrayAccessForm||"none",t.emptyNodeForm=t.emptyNodeForm||"text",t.enableToStringFunc===void 0&&(t.enableToStringFunc=!0),t.arrayAccessFormPaths=t.arrayAccessFormPaths||[],t.skipEmptyTextNodesForObj===void 0&&(t.skipEmptyTextNodesForObj=!0),t.stripWhitespaces===void 0&&(t.stripWhitespaces=!0),t.datetimeAccessFormPaths=t.datetimeAccessFormPaths||[],t.useDoubleQuotes===void 0&&(t.useDoubleQuotes=!1),t.xmlElementsFilter=t.xmlElementsFilter||[],t.jsonPropertiesFilter=t.jsonPropertiesFilter||[],t.keepCData===void 0&&(t.keepCData=!1),t.ignoreRoot===void 0&&(t.ignoreRoot=!1);var e={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,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;"):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){t.arrayAccessForm==="property"&&(Z[K]instanceof Array?Z[K+"_asArray"]=Z[K]:Z[K+"_asArray"]=[Z[K]]),!(Z[K]instanceof Array)&&t.arrayAccessFormPaths.length>0&&p(t.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==e.ELEMENT_NODE&&t.xmlElementsFilter.length>0)||p(t.xmlElementsFilter,Z,z,f)}function U(Z,K){if(Z.nodeType==e.DOCUMENT_NODE){for(var z=new Object,f=Z.childNodes,N=0;N<f.length;N++)(L=f[N]).nodeType==e.ELEMENT_NODE&&(t.ignoreRoot?z=U(L):(z={})[R=o(L)]=U(L));return z}if(Z.nodeType==e.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!=e.COMMENT_NODE){var V=K+"."+R;if(F(z,L.nodeType,R,V))if(z.__cnt++,z[R]==null){var de=U(L,V);(R!="#text"||/[^\s]/.test(de))&&((ue={})[R]=de,S.push(ue)),z[R]=de,C(z,R,V)}else{var ue;z[R]!=null&&(z[R]instanceof Array||(z[R]=[z[R]],C(z,R,V))),de=U(L,V),(R!="#text"||/[^\s]/.test(de))&&((ue={})[R]=de,S.push(ue)),z[R][z[R].length]=de}}}z.__children=S;for(var P=o(Z),$=0;$<Z.attributes.length;$++){var Y=Z.attributes[$];z.__cnt++;for(var ge=Y.value,ve=0,fe=t.matchers.length;ve<fe;ve++){var Ce=t.matchers[ve];Ce.test(Y,P)&&(ge=Ce.converter(Y.value))}z[t.attributePrefix+Y.name]=ge}var Me=(function(Qe){return Qe.prefix})(Z);return Me!=null&&Me!=""&&(z.__cnt++,z.__prefix=Me),z["#text"]!=null&&(z.__text=z["#text"],z.__text instanceof Array&&(z.__text=z.__text.join(`
15
- `)),t.stripWhitespaces&&(z.__text=z.__text.trim()),delete z["#text"],t.arrayAccessForm=="property"&&delete z["#text_asArray"],z.__text=(function(Qe,$e,Ze){if(t.datetimeAccessFormPaths.length>0){var at=Ze.split(".#")[0];return p(t.datetimeAccessFormPaths,Qe,$e,at)?b(Qe):Qe}return Qe})(z.__text,R,K+"."+R)),z["#cdata-section"]!=null&&(z.__cdata=z["#cdata-section"],delete z["#cdata-section"],t.arrayAccessForm=="property"&&delete z["#cdata-section_asArray"]),z.__cnt==0&&t.emptyNodeForm=="text"?z="":z.__cnt==1&&z.__text!=null?z=z.__text:z.__cnt!=1||z.__cdata==null||t.keepCData?z.__cnt>1&&z.__text!=null&&t.skipEmptyTextNodesForObj&&(t.stripWhitespaces&&z.__text==""||z.__text.trim()=="")&&delete z.__text:z=z.__cdata,delete z.__cnt,!t.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==e.TEXT_NODE||Z.nodeType==e.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];t.escapeMode&&(R=l(R)),N+=" "+L.substr(t.attributePrefix.length)+"=",t.useDoubleQuotes?N+='"'+R+'"':N+="'"+R+"'"}return N+(f?"/>":">")}function B(Z,K){return"</"+(Z.__prefix!=null?Z.__prefix+":":"")+K+">"}function w(Z,K){return t.arrayAccessForm=="property"&&(f="_asArray",(z=K.toString()).indexOf(f,z.length-8)!==-1)||K.toString().indexOf(t.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 t.jsonPropertiesFilter.length==0||z==""||p(t.jsonPropertiesFilter,Z,K,z)}function se(Z){var K=[];if(Z instanceof Object)for(var z in Z)z.toString().indexOf("__")==-1&&z.toString().indexOf(t.attributePrefix)==0&&K.push(z);return K}function ie(Z){var K="";return Z instanceof Object?K+=(function(z){var f="";return z.__cdata!=null&&(f+="<![CDATA["+z.__cdata+"]]>"),z.__text!=null&&(t.escapeMode?f+=l(z.__text):f+=z.__text),f})(Z):Z!=null&&(t.escapeMode?K+=l(Z):K+=Z),K}function he(Z,K){return Z===""?K:Z+"."+K}function oe(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,se(Z[S]),!1),N+=te(Z[S],he(f,K)),N+=B(Z[S],K);return N}function te(Z,K){var z="";if(j(Z)>0){for(var f in Z)if(!w(Z,f)&&(K==""||k(Z,f,he(K,f)))){var N=Z[f],S=se(N);N==null||N==null?z+=H(N,f,S,!0):N instanceof Object?N instanceof Array?z+=oe(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+=te(N,he(K,f)),z+=B(N,f)):z+=H(N,f,S,!0):(z+=H(N,f,S,!1),z+=ie(N),z+=B(N,f))}}return z+ie(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 te(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 Ha(t){t=t||{};var e,o,l,p,C,b,F=this.context,U=(0,y.A)(F).getInstance(),H=(0,Ae.A)(F).getInstance();function B(ie,he,oe){var te,Z,K={};K.elements=ie,K.type=he,K.resolveType=oe,K.elements.length===0&&j(K);for(var z=0;z<K.elements.length;z++)te=K.elements[z],Z=H.isHTTPURL(te.url)?te.url:te.originalContent.BaseURL+te.url,b.load(Z,te,K)}function w(ie){var he,oe,te="";if(he=ie.element,oe=ie.resolveObject,he.resolvedContent){var Z=0;he.resolvedContent.indexOf("<?xml")===0&&(Z=he.resolvedContent.indexOf("?>")+2),te=he.resolvedContent.substr(0,Z)+"<response>"+he.resolvedContent.substr(Z)+"</response>",he.resolvedContent=C.xml_str2json(te)}(function(K){var z;for(z=0;z<K.elements.length;z++)if(K.elements[z].resolved===!1)return!1;return!0})(oe)&&j(oe)}function j(ie){var he,oe,te=[];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)})(ie),ie.resolveType==="onActuate"&&U.trigger(i.A.XLINK_READY,{manifest:p}),ie.resolveType===Lr)switch(ie.type){case n.A.PERIOD:for(he=0;he<p[n.A.PERIOD+"_asArray"].length;he++)(oe=p[n.A.PERIOD+"_asArray"][he]).hasOwnProperty(n.A.ADAPTATION_SET+"_asArray")&&(te=te.concat(k(oe[n.A.ADAPTATION_SET+"_asArray"],oe,n.A.ADAPTATION_SET,Lr))),oe.hasOwnProperty(n.A.EVENT_STREAM+"_asArray")&&(te=te.concat(k(oe[n.A.EVENT_STREAM+"_asArray"],oe,n.A.EVENT_STREAM,Lr)));B(te,n.A.ADAPTATION_SET,Lr);break;case n.A.ADAPTATION_SET:U.trigger(i.A.XLINK_READY,{manifest:p})}}function k(ie,he,oe,te){var Z,K,z,f=[];for(K=ie.length-1;K>=0;K--)(Z=ie[K]).hasOwnProperty("xlink:href")&&Z["xlink:href"]==="urn:mpeg:dash:resolve-to-zero:2013"&&ie.splice(K,1);for(K=0;K<ie.length;K++)(Z=ie[K]).hasOwnProperty("xlink:href")&&Z.hasOwnProperty("xlink:actuate")&&Z["xlink:actuate"]===te&&(z=se(Z["xlink:href"],he,oe,K,te,Z),f.push(z));return f}function se(ie,he,oe,te,Z,K){return{url:ie,parentElement:he,type:oe,index:te,resolveType:Z,originalContent:K,resolvedContent:null,resolved:!1}}return e={resolveManifestOnLoad:function(ie){C=new Ya({escapeMode:!1,attributePrefix:"",arrayAccessForm:"property",emptyNodeForm:"object",stripWhitespaces:!1,enableToStringFunc:!1,ignoreRoot:!0,matchers:o}),(p=ie).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(ie){ie&&(o=ie)},setIron:function(ie){ie&&(l=ie)},reset:function(){U.off(i.A.XLINK_ELEMENT_LOADED,w,e),b&&(b.reset(),b=null)}},U.on(i.A.XLINK_ELEMENT_LOADED,w,e),b=ds(F).create({errHandler:t.errHandler,dashMetrics:t.dashMetrics,mediaPlayerModel:t.mediaPlayerModel,requestModifier:t.requestModifier,settings:t.settings}),e}Ha.__dashjs_factory_name="XlinkController";var ps=h.A.getClassFactory(Ha);function Zr(t){return Zr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Zr(t)}function Va(t){function e(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"?e(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 t)for(var C=t.period,b=p.Period_asArray,F=0,U=b.length;F<U;++F){var H=b[F];if(l(C,H),"adaptationset"in t){var B=H.AdaptationSet_asArray;if(B)for(var w=t.adaptationset,j=0,k=B.length;j<k;++j)l(w,B[j])}}return p}}}Va.__dashjs_factory_name="ObjectIron";var hs=h.A.getClassFactory(Va);function ei(t){return ei=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ei(t)}function gs(t,e){for(var o=0;o<e.length;o++){var l=e[o];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(t,ms(l.key),l)}}function ms(t){var e=(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)})(t);return ei(e)=="symbol"?e:e+""}var Ai=(function(){return t=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},(e=[{key:"test",get:function(){return this._test}},{key:"converter",get:function(){return this._converter}}])&&gs(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e})();function Fr(t){return Fr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Fr(t)}function Cn(t,e,o){return(e=ys(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}function ys(t){var e=(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)})(t);return Fr(e)=="symbol"?e:e+""}function Es(t,e,o){return e=vi(e),(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)})(t,Ka()?Reflect.construct(e,o||[],vi(t).constructor):e.apply(t,o))}function Ka(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Ka=function(){return!!t})()}function vi(t){return vi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},vi(t)}function zi(t,e){return zi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,l){return o.__proto__=l,o},zi(t,e)}var _s=(function(t){function e(){return(function(l,p){if(!(l instanceof p))throw new TypeError("Cannot call a class as a function")})(this,e),Es(this,e,[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)})(e,t),o=e,Object.defineProperty(o,"prototype",{writable:!1}),o;var o})(Ai);function Xi(t){return Xi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Xi(t)}function As(t,e,o){return e=Ti(e),(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)})(t,Wa()?Reflect.construct(e,o||[],Ti(t).constructor):e.apply(t,o))}function Wa(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Wa=function(){return!!t})()}function Ti(t){return Ti=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ti(t)}function Qi(t,e){return Qi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,l){return o.__proto__=l,o},Qi(t,e)}var za=/^([-])?P(([\d.]*)Y)?(([\d.]*)M)?(([\d.]*)D)?T?(([\d.]*)H)?(([\d.]*)M)?(([\d.]*)S)?/,vs=(function(t){function e(){return(function(l,p){if(!(l instanceof p))throw new TypeError("Cannot call a class as a function")})(this,e),As(this,e,[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 za.test(l.value);return!1},function(l){var p=za.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)})(e,t),o=e,Object.defineProperty(o,"prototype",{writable:!1}),o;var o})(Ai);function $i(t){return $i=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},$i(t)}function Ts(t,e,o){return e=bi(e),(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)})(t,Xa()?Reflect.construct(e,o||[],bi(t).constructor):e.apply(t,o))}function Xa(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Xa=function(){return!!t})()}function bi(t){return bi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},bi(t)}function Ji(t,e){return Ji=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,l){return o.__proto__=l,o},Ji(t,e)}var Qa=/^([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}))?/,bs=(function(t){function e(){return(function(l,p){if(!(l instanceof p))throw new TypeError("Cannot call a class as a function")})(this,e),Ts(this,e,[function(l){return Qa.test(l.value)},function(l){var p,C=Qa.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)})(e,t),o=e,Object.defineProperty(o,"prototype",{writable:!1}),o;var o})(Ai);function Zi(t){return Zi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Zi(t)}function Ss(t,e,o){return e=Si(e),(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)})(t,$a()?Reflect.construct(e,o||[],Si(t).constructor):e.apply(t,o))}function $a(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return($a=function(){return!!t})()}function Si(t){return Si=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Si(t)}function ea(t,e){return ea=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,l){return o.__proto__=l,o},ea(t,e)}var Is=/^[-+]?[0-9]+[.]?[0-9]*([eE][-+]?[0-9]+)?$/,Rs=(function(t){function e(){return(function(l,p){if(!(l instanceof p))throw new TypeError("Cannot call a class as a function")})(this,e),Ss(this,e,[function(l){return Is.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&&ea(l,p)})(e,t),o=e,Object.defineProperty(o,"prototype",{writable:!1}),o;var o})(Ai);function ti(t){return ti=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ti(t)}function ws(t,e){for(var o=0;o<e.length;o++){var l=e[o];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(t,Ns(l.key),l)}}function Ns(t){var e=(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)})(t);return ti(e)=="symbol"?e:e+""}var Cs=(function(){return t=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()},(e=[{key:"name",get:function(){return this._name}},{key:"merge",get:function(){return this._merge}}])&&ws(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e})();function ni(t){return ni=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ni(t)}function Ds(t,e){for(var o=0;o<e.length;o++){var l=e[o];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(t,Os(l.key),l)}}function Os(t){var e=(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)})(t);return ni(e)=="symbol"?e:e+""}var xr=(function(){return t=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 Cs(F))}))},(e=[{key:"name",get:function(){return this._name}},{key:"children",get:function(){return this._children}},{key:"properties",get:function(){return this._properties}}])&&Ds(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e})();function ta(t){return ta=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ta(t)}function Ms(t,e,o){return e=Ii(e),(function(l,p){if(p&&(ta(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)})(t,Ja()?Reflect.construct(e,o||[],Ii(t).constructor):e.apply(t,o))}function Ja(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Ja=function(){return!!t})()}function Ii(t){return Ii=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ii(t)}function na(t,e){return na=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,l){return o.__proto__=l,o},na(t,e)}var Ps=(function(t){function e(){(function(p,C){if(!(p instanceof C))throw new TypeError("Cannot call a class as a function")})(this,e);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 Ms(this,e,[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)})(e,t),o=e,Object.defineProperty(o,"prototype",{writable:!1}),o;var o})(xr);function ra(t){return ra=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ra(t)}function Ls(t,e,o){return e=Ri(e),(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)})(t,Za()?Reflect.construct(e,o||[],Ri(t).constructor):e.apply(t,o))}function Za(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Za=function(){return!!t})()}function Ri(t){return Ri=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ri(t)}function ia(t,e){return ia=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,l){return o.__proto__=l,o},ia(t,e)}var Fs=(function(t){function e(){(function(p,C){if(!(p instanceof C))throw new TypeError("Cannot call a class as a function")})(this,e);var l=[n.A.SEGMENT_BASE,n.A.SEGMENT_TEMPLATE,n.A.SEGMENT_LIST];return Ls(this,e,[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)})(e,t),o=e,Object.defineProperty(o,"prototype",{writable:!1}),o;var o})(xr);function eo(t){t=t||{};var e,o,l,p,C,b=this.context,F=t.debug;return e={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(e),l=[new vs,new bs,new Rs,new _s],p=new Ya({escapeMode:!1,attributePrefix:"",arrayAccessForm:"property",emptyNodeForm:"object",stripWhitespaces:!1,enableToStringFunc:!0,ignoreRoot:!1,matchers:l}),C=hs(b).create({adaptationset:new Ps,period:new Fs}),e}eo.__dashjs_factory_name="DashParser";var xs=h.A.getClassFactory(eo);function to(t){t=t||{};var e,o,l,p,C,b=this.context,F=t.debug,U=t.settings,H=(0,y.A)(b).getInstance(),B=(0,Ae.A)(b).getInstance(),w=t.mssHandler,j=t.errHandler;function k(se){H.trigger(i.A.INTERNAL_MANIFEST_LOADED,{manifest:se.manifest})}return e={load:function(se){var ie=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,he=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,oe=new Date,te=new ja(se,je.G.MPD_TYPE);ie&&(te.serviceLocation=ie),he&&(te.queryParams=he),te.requestStartDate||(te.requestStartDate=oe),H.trigger(i.A.MANIFEST_LOADING_STARTED,{request:te}),l.load({request:te,success:function(Z,K,z){var f,N,S;if(p)if(z&&z!==se?(N=B.parseBaseUrl(z),f=z):(B.isRelative(se)&&(se=B.resolve(se,window.location.href)),N=B.parseBaseUrl(se)),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?xs(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 pe.A(me.MANIFEST_LOADER_PARSING_FAILURE_ERROR_CODE,me.MANIFEST_LOADER_PARSING_FAILURE_ERROR_MESSAGE+"".concat(se))})}if(S){if(S.url=f||se,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 pe.A(me.MANIFEST_LOADER_PARSING_FAILURE_ERROR_CODE,me.MANIFEST_LOADER_PARSING_FAILURE_ERROR_MESSAGE+"".concat(se))})}else H.trigger(i.A.INTERNAL_MANIFEST_LOADED,{manifest:null,error:new pe.A(me.MANIFEST_LOADER_PARSING_FAILURE_ERROR_CODE,me.MANIFEST_LOADER_PARSING_FAILURE_ERROR_MESSAGE+"".concat(se))});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 pe.A(me.MANIFEST_LOADER_LOADING_FAILURE_ERROR_CODE,me.MANIFEST_LOADER_LOADING_FAILURE_ERROR_MESSAGE+"".concat(se,", ").concat(z))})}})},reset:function(){H.off(i.A.XLINK_READY,k,e),w&&w.reset(),p&&(p.reset(),p=null),l&&(l.abort(),l=null)}},o=F.getLogger(e),H.on(i.A.XLINK_READY,k,e),l=Mn(b).create({errHandler:t.errHandler,dashMetrics:t.dashMetrics,mediaPlayerModel:t.mediaPlayerModel,requestModifier:t.requestModifier,urlUtils:B,constants:u.A,dashConstants:n.A,errors:me,requestTimeout:t.settings.get().streaming.manifestRequestTimeout}),p=ps(b).create({errHandler:j,dashMetrics:t.dashMetrics,mediaPlayerModel:t.mediaPlayerModel,requestModifier:t.requestModifier,settings:t.settings}),C=null,e}to.__dashjs_factory_name="ManifestLoader";var Us=h.A.getClassFactory(to);function no(){var t=this.context,e=(0,y.A)(t).getInstance();return{error:function(o){e.trigger(i.A.ERROR,{error:o})}}}no.__dashjs_factory_name="ErrorHandler";var Bs=h.A.getSingletonFactory(no),ro=M(6035);function io(){var t,e,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,se){return new Promise((function(ie){if(k&&k.AdaptationSet_asArray&&k.AdaptationSet_asArray.length!==0){var he=[];k.AdaptationSet_asArray.forEach((function(oe){e.getIsTypeOf(oe,se)&&he.push((function(te,Z){return new Promise((function(K){if(te.Representation_asArray&&te.Representation_asArray.length!==0){var z=[],f=[];te.Representation_asArray.forEach((function(N,S){var L=e.getCodec(te,S,!1),R=(function(V,de,ue){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}})(de,ue);case u.A.AUDIO:return(function(P,$){var Y=P.audioSamplingRate||null;return{codec:$,bitrate:P.bandwidth||null,samplerate:Y}})(de,ue);default:return null}})(Z,N,L);f.push(R),z.push(o.supportsCodec(R,Z))})),Promise.all(z).then((function(N){te.Representation_asArray=te.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()}))})(oe,se))})),Promise.all(he).then((function(){k.AdaptationSet_asArray=k.AdaptationSet_asArray.filter((function(oe){var te=oe.Representation_asArray&&oe.Representation_asArray.length>0;return te||(F.trigger(i.A.ADAPTATION_SET_REMOVED_NO_CAPABILITIES,{adaptationSet:oe}),C.warn("AdaptationSet has been removed because of no supported Representation")),te})),ie()})).catch((function(){ie()}))}else ie()}))})(j,H))})),Promise.all(w)}return t={setConfig:function(H){H&&(H.adapter&&(e=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(se){return!se.Representation_asArray||se.Representation_asArray.length===0||(se.Representation_asArray=se.Representation_asArray.filter((function(ie){var he=e.getEssentialPropertiesForRepresentation(ie);if(he&&he.length>0)for(var oe=0;oe<he.length;){if(!o.supportsEssentialProperty(he[oe]))return C.debug("[Stream] EssentialProperty not supported: "+he[oe].schemeIdUri),!1;oe+=1}return!0})),se.Representation_asArray&&se.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(se){se.AdaptationSet_asArray=se.AdaptationSet_asArray.filter((function(ie){return!ie.Representation_asArray||ie.Representation_asArray.length===0||(ie.Representation_asArray=ie.Representation_asArray.filter((function(he){return!k.some((function(oe){return!oe(he)}))})),ie.Representation_asArray&&ie.Representation_asArray.length>0)}))}))})(H),B()})).catch((function(){B()}))}))}},C=(0,g.A)(b).getInstance().getLogger(t),t}io.__dashjs_factory_name="CapabilitiesFilter";var ks=h.A.getSingletonFactory(io);function Gs(t,e,o){return Object.defineProperty(t,"prototype",{writable:!1}),t}var js=Gs((function t(){(function(e,o){if(!(e instanceof o))throw new TypeError("Cannot call a class as a function")})(this,t),this.t=null,this.xywh=null,this.track=null,this.id=null,this.s=null,this.r=null}));function ao(){var t;return{initialize:function(e){if(t=new js,!e)return null;var o=e.indexOf("#");if(o!==-1)for(var l=e.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);t.hasOwnProperty(U)&&(t[U]=b.substr(F+1))}}},getURIFragmentData:function(){return t}}}ao.__dashjs_factory_name="URIFragmentModel";var qs=h.A.getSingletonFactory(ao);function oo(){var t,e=this.context,o=(0,y.A)(e).getInstance();return{getValue:function(){return t},setValue:function(l){t=l,l&&o.trigger(i.A.MANIFEST_LOADED,{data:l})}}}oo.__dashjs_factory_name="ManifestModel";var Ys=h.A.getSingletonFactory(oo),aa=-.5;function so(){var t,e,o,l,p=this.context,C=(0,le.A)(p).getInstance();function b(H,B){return isNaN(H)?0:H>0?(B&&e.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&&e.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&&e.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&&e.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 t={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(){}},e=(0,g.A)(p).getInstance().getLogger(t),t}so.__dashjs_factory_name="MediaPlayerModel";var Hs=h.A.getSingletonFactory(so),Vs=M(2365);function uo(t){var e=(t=t||{}).abrController,o=t.switchHistory,l=t.droppedFramesHistory,p=t.currentRequest,C=t.useBufferOccupancyABR,b=t.useL2AABR,F=t.useLoLPABR,U=t.streamProcessor?t.streamProcessor.getScheduleController():null,H=t.streamProcessor?t.streamProcessor.getRepresentationInfo():null,B=t.videoModel?t.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 e},getRepresentationInfo:function(){return H},useBufferOccupancyABR:function(){return C},useL2AABR:function(){return b},useLoLPABR:function(){return F},getVideoModel:function(){return B}}}uo.__dashjs_factory_name="RulesContext";var lo=h.A.getClassFactory(uo),wi=M(5066);function co(){var t=[],e=[];return{push:function(o){o.newValue===wi.A.NO_CHANGE&&(o.newValue=o.oldValue),t[o.oldValue]||(t[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(t[o.oldValue].drops+=p,t[o.oldValue].dropSize+=C,t[o.oldValue].noDrops+=b,e.push({idx:o.oldValue,noDrop:b,drop:p,dropSize:C}),e.length>8){var F=e.shift();t[F.idx].drops-=F.drop,t[F.idx].dropSize-=F.dropSize,t[F.idx].noDrops-=F.noDrop}},getSwitchRequests:function(){return t},reset:function(){t=[],e=[]}}}co.__dashjs_factory_name="SwitchRequestHistory";var Ks=h.A.getClassFactory(co);function fo(){var t={},e={},o={};return{push:function(l,p,C){if(p){t[l]||(t[l]=[],e[l]=0,o[l]=0);var b=C&&C.droppedVideoFrames?C.droppedVideoFrames:0,F=C&&C.totalVideoFrames?C.totalVideoFrames:0,U=b-e[l];e[l]=b;var H=F-o[l];o[l]=F;var B=t[l];isNaN(p)||(B[p]?(B[p].droppedVideoFrames+=U,B[p].totalVideoFrames+=H):B[p]={droppedVideoFrames:U,totalVideoFrames:H})}},getFrameHistory:function(l){return t[l]},clearForStream:function(l){try{delete t[l],delete e[l],delete o[l]}catch{}},reset:function(){t={},e={},o={}}}}fo.__dashjs_factory_name="DroppedFramesHistory";var Ws=h.A.getClassFactory(fo);function po(t){var e,o,l,p,C,b=this.context,F=3,U=4,H=4,B=1.3,w=1.3,j=(t=t||{}).settings,k=(0,y.A)(b).getInstance();function se(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 ie(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)),de=R.slowEstimate/(1-Math.pow(.5,R.totalWeight/L.slow));return N?Math.min(V,de):Math.max(V,de)})(K,z):(function(N,S,L){var R=(function(de,ue,P){var $,Y;if(de?($=e[ue],Y=P?F:U):($=o[ue],Y=H),$){if(Y>=$.length)Y=$.length;else if(de)for(var ge=1;ge<Y;++ge){var ve=$[$.length-ge]/$[$.length-ge-1];if((ve>=w||ve<=1/B)&&(Y+=1)===$.length)break}}else Y=0;return Y})(N,S,L),V=(N?e:o)[S];return R!==0&&V&&V.length!==0?(V=V.slice(-R)).reduce((function(de,ue){return de+ue}))/V.length:NaN})(K,z,f)}function he(K,z){return ie(!0,K,z)}function oe(K){e[K]=e[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 te(){e={},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 de=z.cmsd.dynamic&&z.cmsd.dynamic.etp?z.cmsd.dynamic.etp:null;if(de){var ue=j.get().streaming.cmsd.abr.etpWeightRatio;ue>0&&ue<=1&&(V=V*(1-ue)+de*ue)}}if(oe(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(e[K].length>0&&!e[K].hasCachedEntries)return;e[K].hasCachedEntries=!0}else e[K]&&e[K].hasCachedEntries&&(function(P){delete e[P],delete o[P],delete l[P],delete p[P],oe(P)})(K);e[K].push(V),k.trigger(r.A.THROUGHPUT_MEASUREMENT_STORED,{throughput:V,mediaType:K,httpRequest:z}),e[K].length>20&&e[K].shift(),o[K].push(S),o[K].length>20&&o[K].shift(),se(l[K],V,.001*L,C.throughputHalfLife),se(p[K],S,1,C.latencyHalfLife)}},getAverageThroughput:he,getSafeAverageThroughput:function(K,z){var f=he(K,z);return isNaN(f)||(f*=j.get().streaming.abr.bandwidthSafetyFactor),f},getAverageLatency:function(K){return ie(!1,K)},reset:te};return C={throughputHalfLife:{fast:3,slow:8},latencyHalfLife:{fast:1,slow:2}},te(),Z}po.__dashjs_factory_name="ThroughputHistory";var zs=h.A.getClassFactory(po);function oa(){var t,e,o,l,p,C,b,F,U,H,B,w,j,k,se,ie,he,oe,te,Z,K,z,f,N,S,L,R,V=this.context,de=(0,g.A)(V).getInstance(),ue=(0,y.A)(V).getInstance();function P(){p={},C={},F={},b={},Z={},f={},N={},S={},H===void 0&&(H=!1),K&&K.reset(),te=void 0,K=void 0,z=void 0,clearTimeout(U),U=null}function $(Ee){var Pe=Ee.request.mediaType,ct=Ee.streamId;if(Pe&&ct&&b[ct]&&R.get().streaming.abr.autoSwitchBitrate[Pe]){var Ke=b[ct][Pe];if(Ke){var yt=lo(V).create({abrController:t,streamProcessor:Ke,currentRequest:Ee.request,useBufferOccupancyABR:f[Pe],useL2AABR:N[Pe],useLoLPABR:S[Pe],videoModel:k}),ht=o.shouldAbandonFragment(yt,ct);ht.quality>wi.A.NO_CHANGE&&Ke.getFragmentModel().getRequests({state:J.FRAGMENT_MODEL_LOADING,index:Ee.request.index})[0]&&(F[ct][Pe].state=_.A.ABANDON_LOAD,Z[ct][Pe].reset(),Z[ct][Pe].push({oldValue:Ce(Pe,ct),newValue:ht.quality,confidence:1,reason:ht.reason}),Me(Pe,l.getActiveStreamInfo(),ht.quality,ht.reason),clearTimeout(U),U=setTimeout((function(){F[ct][Pe].state=_.A.ALLOW_LOAD,U=null}),R.get().streaming.abandonLoadTimeout))}}}function Y(Ee){Ee.mediaType===u.A.VIDEO&&(te!==void 0&&K.push(Ee.streamId,te,k.getPlaybackQuality()),te=Ee.newQuality)}function ge(Ee){var Pe,ct;Ee.metric!==_.A.HTTP_REQUEST||!Ee.value||Ee.value.type!==je.G.MEDIA_SEGMENT_TYPE||Ee.mediaType!==u.A.AUDIO&&Ee.mediaType!==u.A.VIDEO||z.push(Ee.mediaType,Ee.value,R.get().streaming.abr.useDeadTimeLatency),Ee.metric!==_.A.BUFFER_LEVEL||Ee.mediaType!==u.A.AUDIO&&Ee.mediaType!==u.A.VIDEO||(Pe=Ee.mediaType,ct=.001*Ee.value.level,R.get().streaming.abr.ABRStrategy===u.A.ABR_STRATEGY_DYNAMIC&&(function(Ke,yt){try{var ht=se.getStableBufferTime(),dt=ht,qt=.5*ht,Yt=f[Ke],sn=yt>(Yt?qt:dt);f[Ke]=sn,sn!==Yt&&(sn?e.info("["+Ke+"] switching from throughput to buffer occupancy ABR rule (buffer: "+yt.toFixed(3)+")."):e.info("["+Ke+"] switching from buffer occupancy to throughput ABR rule (buffer: "+yt.toFixed(3)+")."))}catch(ln){e.error(ln)}})(Pe,ct))}function ve(Ee,Pe){try{var ct;return p[Pe]=p[Pe]||{},p[Pe].hasOwnProperty(Ee)||(p[Pe][Ee]=0),ct=(function(Ke,yt){var ht=p[yt][Ke],dt=ht;if(!b[yt]||!b[yt][Ke])return dt;var qt=fe(Ke,yt);qt!==void 0&&(dt=Math.max(ht,qt));var Yt=(function(sn,ln){try{var ke=se.getAbrBitrateParameter("maxBitrate",sn);return ke>-1?Ze(b[ln][sn].getMediaInfo(),ke,ln):void 0}catch{return}})(Ke,yt);return Yt!==void 0&&(dt=Math.min(dt,Yt)),dt})(Ee,Pe),ct=(function(Ke,yt,ht){var dt=p[ht][yt],qt=R.get().streaming.abr.maxRepresentationRatio[yt];return isNaN(qt)||qt>=1||qt<0?Ke:Math.min(Ke,Math.round(dt*qt))})(ct,Ee,Pe),ct=(function(Ke,yt,ht){if(yt!==u.A.VIDEO||!R.get().streaming.abr.limitBitrateByPortal||!b[ht]||!b[ht][yt])return Ke;H||Nt();var dt=b[ht][yt].getStreamInfo(),qt=j.getAdaptationForType(dt.index,yt,dt).Representation_asArray,Yt=Ke;if(B>0&&w>0){for(;Yt>0&&qt[Yt]&&B<qt[Yt].width&&B-qt[Yt-1].width<qt[Yt].width-B;)Yt-=1;for(;Yt<qt.length-1&&qt[Yt].width===qt[Yt+1].width;)Yt+=1}return Yt})(ct,Ee,Pe),R.get().streaming.cmsd.enabled&&R.get().streaming.cmsd.abr.applyMb&&(ct=(function(Ke,yt,ht){if(yt!=="video")return Ke;var dt=he.getMaxBitrate(yt);if(dt<0)return Ke;var qt=$e(ht,"audio",Ce("audio",ht));dt-=qt?qt.bitrate/1e3:0;var Yt=Ze(b[ht][yt].getMediaInfo(),dt,ht);return e.debug("Stream ID: "+ht+" ["+yt+"] Apply max bit rate from CMSD: "+dt),Math.min(Ke,Yt)})(ct,Ee,Pe)),ct}catch{return}}function fe(Ee,Pe){try{return(function(ct,Ke){try{var yt=se.getAbrBitrateParameter("minBitrate",ct);if(yt>-1){var ht=b[Ke][ct].getMediaInfo(),dt=at(ht),qt=Ze(ht,yt,Ke);return dt[qt]&&qt<dt.length-1&&dt[qt].bitrate<1e3*yt&&qt++,qt}return}catch{return}})(Ee,Pe)}catch{return}}function Ce(Ee){var Pe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;try{return Pe||(Pe=l.getActiveStreamInfo().id),Ee&&b[Pe]&&b[Pe][Ee]&&Pe?(C[Pe]=C[Pe]||{},C[Pe].hasOwnProperty(Ee)||(C[Pe][Ee]=0),C[Pe][Ee]):0}catch{return 0}}function Me(Ee,Pe,ct){var Ke=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;if(Pe&&Pe.id&&Ee){var yt=Pe.id,ht=Ce(Ee,yt);(0,D.zQ)(ct);var dt=ve(Ee,yt);ct!==ht&&ct>=0&&ct<=dt&&Qe(Ee,ht,ct,dt,Ke,yt)}}function Qe(Ee,Pe,ct,Ke,yt,ht){if(Ee&&b[ht]&&b[ht][Ee]){var dt=b[ht][Ee].getStreamInfo(),qt=dt&&dt.manifestInfo&&dt.manifestInfo.isDynamic,Yt=L.getCurrentBufferLevel(Ee);e.info("Stream ID: "+ht+" ["+Ee+"] switch from "+Pe+" to "+ct+"/"+Ke+" (buffer: "+Yt+") "+(yt?JSON.stringify(yt):".")),C[ht]=C[ht]||{},C[ht][Ee]=ct;var sn=$e(ht,Ee,ct);ue.trigger(i.A.QUALITY_CHANGE_REQUESTED,{oldQuality:Pe,newQuality:ct,reason:yt,streamInfo:dt,bitrateInfo:sn,maxIdx:Ke,mediaType:Ee},{streamId:dt.id,mediaType:Ee});var ln=z.getAverageThroughput(Ee,qt);isNaN(ln)||oe.setSavedBitrateSettings(Ee,ln)}}function $e(Ee,Pe,ct){if(Pe&&b&&b[Ee]&&b[Ee][Pe]){var Ke=at(b[Ee][Pe].getMediaInfo());return Ke[ct]?Ke[ct]:null}return null}function Ze(Ee,Pe,ct){var Ke=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null,yt=Ee&&Ee.type?b[ct][Ee.type].getRepresentationInfo():null;if(R.get().streaming.abr.useDeadTimeLatency&&Ke&&yt&&yt.fragmentDuration){Ke/=1e3;var ht=yt.fragmentDuration;if(Ke>ht)return 0;Pe*=1-Ke/ht}for(var dt=at(Ee),qt=dt.length-1;qt>=0;qt--)if(1e3*Pe>=dt[qt].bitrate)return qt;return 0}function at(Ee){var Pe=[];if(!Ee||!Ee.bitrateList)return Pe;for(var ct,Ke=Ee.bitrateList,yt=Ee.type,ht=0,dt=Ke.length;ht<dt;ht++)(ct=new mi).mediaType=yt,ct.qualityIndex=ht,ct.bitrate=Ke[ht].bandwidth,ct.width=Ke[ht].width,ct.height=Ke[ht].height,ct.scanType=Ke[ht].scanType,Pe.push(ct);return Pe}function Nt(){if(k){var Ee=R.get().streaming.abr.usePixelRatioInLimitBitrateByPortal&&window.hasOwnProperty("devicePixelRatio")?window.devicePixelRatio:1;B=k.getClientWidth()*Ee,w=k.getClientHeight()*Ee}}return t={initialize:function(){K=Ws(V).create(),z=zs(V).create({settings:R}),(o=(0,Vs.A)(V).create({dashMetrics:L,customParametersModel:ie,mediaPlayerModel:se,settings:R})).initialize(),ue.on(r.A.QUALITY_CHANGE_RENDERED,Y,t),ue.on(r.A.METRIC_ADDED,ge,t),ue.on(i.A.LOADING_PROGRESS,$,t)},isPlayingAtTopQuality:function(Ee){var Pe=Ee?Ee.id:null,ct=Ce(u.A.AUDIO,Pe),Ke=Ce(u.A.VIDEO,Pe);return ct===ve(u.A.AUDIO,Pe)&&Ke===ve(u.A.VIDEO,Pe)},updateTopQualityIndex:function(Ee){var Pe=Ee.type,ct=Ee.streamInfo.id,Ke=Ee.representationCount-1;return p[ct]=p[ct]||{},p[ct][Pe]=Ke,Ke},clearDataForStream:function(Ee){K&&K.clearForStream(Ee),b[Ee]&&delete b[Ee],Z[Ee]&&delete Z[Ee],F[Ee]&&delete F[Ee]},getThroughputHistory:function(){return z},getBitrateList:at,getQualityForBitrate:Ze,getTopBitrateInfoFor:function(Ee){var Pe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(Pe||(Pe=l.getActiveStreamInfo().id),Ee&&b&&b[Pe]&&b[Pe][Ee]){var ct=ve(Ee,Pe),Ke=at(b[Pe][Ee].getMediaInfo());return Ke[ct]?Ke[ct]:null}return null},getMinAllowedIndexFor:fe,getMaxAllowedIndexFor:ve,getInitialBitrateFor:function(Ee,Pe){if((function(){if(!oe||!oe.hasOwnProperty("getSavedBitrateSettings"))throw new Error(u.A.MISSING_CONFIG_ERROR)})(),Ee===u.A.TEXT)return NaN;var ct=oe.getSavedBitrateSettings(Ee),Ke=se.getAbrBitrateParameter("initialBitrate",Ee),yt=R.get().streaming.abr.initialRepresentationRatio[Ee];if(Ke===-1)if(yt>-1){var ht=b[Pe][Ee].getStreamInfo(),dt=j.getAdaptationForType(ht.index,Ee,ht).Representation_asArray;Ke=Array.isArray(dt)?dt[Math.max(Math.round(dt.length*yt)-1,0)].bandwidth/1e3:0}else Ke=isNaN(ct)?Ee===u.A.VIDEO?1e3:100:ct;return Ke},getQualityFor:Ce,getAbandonmentStateFor:function(Ee,Pe){return F[Ee]&&F[Ee][Pe]?F[Ee][Pe].state:null},setPlaybackQuality:Me,checkPlaybackQuality:function(Ee,Pe){try{if(!(Ee&&b&&b[Pe]&&b[Pe][Ee]))return!1;if(K){var ct=k.getPlaybackQuality();ct&&K.push(Pe,te,ct)}if(!R.get().streaming.abr.autoSwitchBitrate[Ee])return!1;var Ke=Ce(Ee,Pe),yt=lo(V).create({abrController:t,switchHistory:Z[Pe][Ee],droppedFramesHistory:K,streamProcessor:b[Pe][Ee],currentValue:Ke,useBufferOccupancyABR:f[Ee],useL2AABR:N[Ee],useLoLPABR:S[Ee],videoModel:k}),ht=fe(Ee,Pe),dt=ve(Ee,Pe),qt=o.getMaxQuality(yt),Yt=qt.quality;return ht!==void 0&&(Yt>wi.A.NO_CHANGE?Yt:Ke)<ht&&(Yt=ht),Yt>dt&&(Yt=dt),Z[Pe][Ee].push({oldValue:Ke,newValue:Yt}),Yt>wi.A.NO_CHANGE&&Yt!==Ke&&(F[Pe][Ee].state===_.A.ALLOW_LOAD||Yt<Ke)&&(Qe(Ee,Ke,Yt,dt,qt.reason,Pe),!0)}catch{return!1}},setElementSize:Nt,setWindowResizeEventCalled:function(Ee){H=Ee},registerStreamType:function(Ee,Pe){var ct=Pe.getStreamInfo().id;b[ct]||(b[ct]={}),Z[ct]||(Z[ct]={}),F[ct]||(F[ct]={}),Z[ct][Ee]=Ks(V).create(),b[ct][Ee]=Pe,F[ct][Ee]={},F[ct][Ee].state=_.A.ALLOW_LOAD,(function(Ke){var yt=R.get().streaming.abr.ABRStrategy;yt===u.A.ABR_STRATEGY_L2A?(f[Ke]=!1,S[Ke]=!1,N[Ke]=!0):yt===u.A.ABR_STRATEGY_LoLP?(f[Ke]=!1,S[Ke]=!0,N[Ke]=!1):yt===u.A.ABR_STRATEGY_BOLA?(f[Ke]=!0,S[Ke]=!1,N[Ke]=!1):yt===u.A.ABR_STRATEGY_THROUGHPUT?(f[Ke]=!1,S[Ke]=!1,N[Ke]=!1):yt===u.A.ABR_STRATEGY_DYNAMIC&&(f[Ke]=!(!f||!f[Ke])&&f[Ke],S[Ke]=!1,N[Ke]=!1)})(Ee),Ee===u.A.VIDEO&&Nt()},unRegisterStreamType:function(Ee,Pe){try{b[Ee]&&b[Ee][Pe]&&delete b[Ee][Pe],Z[Ee]&&Z[Ee][Pe]&&delete Z[Ee][Pe],F[Ee]&&F[Ee][Pe]&&delete F[Ee][Pe]}catch{}},setConfig:function(Ee){Ee&&(Ee.streamController&&(l=Ee.streamController),Ee.domStorage&&(oe=Ee.domStorage),Ee.mediaPlayerModel&&(se=Ee.mediaPlayerModel),Ee.customParametersModel&&(ie=Ee.customParametersModel),Ee.cmsdModel&&(he=Ee.cmsdModel),Ee.dashMetrics&&(L=Ee.dashMetrics),Ee.adapter&&(j=Ee.adapter),Ee.videoModel&&(k=Ee.videoModel),Ee.settings&&(R=Ee.settings))},reset:function(){P(),ue.off(i.A.LOADING_PROGRESS,$,t),ue.off(r.A.QUALITY_CHANGE_RENDERED,Y,t),ue.off(r.A.METRIC_ADDED,ge,t),o&&o.reset()}},e=de.getLogger(t),P(),t}oa.__dashjs_factory_name="AbrController";var sa=h.A.getSingletonFactory(oa);sa.QUALITY_DEFAULT=0,h.A.updateSingletonFactory(oa.__dashjs_factory_name,sa);var Xs=sa,Qs=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 ho(){var t,e,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 se(K,z){o&&o.addEventListener(K,z)}function ie(K,z){o&&o.removeEventListener(K,z)}function he(){return o?o.readyState:NaN}function oe(){return o?o.buffered:null}function te(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||he()>=K?(z(),null):(function(f,N){var S=function(){ie(f,S),N(f)};return se(f,S),{func:S,event:f}})(Qs.get(K),z)}return t={addEventListener:se,addTextTrack:function(K,z,f,N,S){if(!o)return null;var L=te(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:oe,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:he,getSource:function(){return o?o.src:null},getTTMLRenderingDiv:function(){return C},getTextTrack:te,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),e.warn("Caught pending play exception - continuing (".concat(z,")"))}))}},removeChild:function(K){o&&o.removeChild(K)},removeEventListener:ie,reset:function(){clearTimeout(F),H.off(i.A.PLAYBACK_PLAYING,k,this)},setCurrentTime:function(K,z){o&&(p&&p.func&&p.event&&ie(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=oe(),S=f,L=9999999999;if(N)for(var R=0;R<N.length;R++){var V=N.start(R),de=N.end(R),ue=Math.abs(V-f),P=Math.abs(de-f);if(f>=V&&f<=de)return f;ue<L&&(L=ue,S=V),P<L&&(L=P,S=de)}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)}},e=(0,g.A)(U).getInstance().getLogger(t),l=NaN,t}ho.__dashjs_factory_name="VideoModel";var $s=h.A.getSingletonFactory(ho),Js=[{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"}],go="dashjs_?_bitrate",mo="dashjs_?_settings",Ur="localStorage",yo="lastBitrate",Eo="lastMediaSettings";function _o(t){t=t||{};var e,o,l,p=this.context,C=t.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 e={getSavedBitrateSettings:function(B){if(H(),!C.get().streaming.lastBitrateCachingInfo.enabled)return NaN;var w=NaN;if(U(Ur,yo)){var j=go.replace(/\?/,B);try{var k=JSON.parse(localStorage.getItem(j))||{},se=new Date().getTime()-parseInt(k.timestamp,10)>=C.get().streaming.lastBitrateCachingInfo.ttl||!1,ie=parseFloat(k.bitrate);isNaN(ie)||se?se&&localStorage.removeItem(j):(w=ie,o.debug("Last saved bitrate for "+B+" was "+ie))}catch{return null}}return w},setSavedBitrateSettings:function(B,w){if(U(Ur,yo)&&w){var j=go.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,Eo)){var j=mo.replace(/\?/,B);try{var k=JSON.parse(localStorage.getItem(j))||{},se=new Date().getTime()-parseInt(k.timestamp,10)>=C.get().streaming.lastMediaSettingsCachingInfo.ttl||!1;w=k.settings,se&&(localStorage.removeItem(j),w=null)}catch{return null}}return w},setSavedMediaSettings:function(B,w){if(U(Ur,Eo)){var j=mo.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(e),b(Ur)&&Js.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)}}})),e}_o.__dashjs_factory_name="DOMStorage";var Zs=h.A.getSingletonFactory(_o),eu=M(6558),Ao=M(5708);function vo(){var t,e,o,l,p,C,b,F,U,H,B,w,j,k=this.context;function se(te,Z,K,z){var f=null,N=te?j.resolve(te.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};e.debug("Start searching for initialization.");var L=oe(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,se(te,Z,K,S);te.range=f,K(te)},error:function(){K(te)}}),e.debug("Perform init search: "+S.url)}function ie(te,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||he;var L=null,R=null,V=!!K,de=te?j.resolve(te.path):null,ue={init:!1,url:de?de.url:void 0,range:V?K:{start:0,end:1500},searching:!V,bytesLoaded:N?N.bytesLoaded:0,bytesToLoad:1500,mediaType:Z},P=oe(ue);F.load({request:P,success:function($){var Y=ue.bytesToLoad,ge=$.byteLength;if(ue.bytesLoaded=ue.range.end-ue.range.start,L=l.parse($),(R=L.getBox("sidx"))&&R.isComplete){var ve,fe,Ce=R.references;if(Ce!=null&&Ce.length>0&&(ve=Ce[0].reference_type===1),ve){var Me,Qe,$e,Ze;e.debug("Initiate multiple SIDX load."),ue.range.end=ue.range.start+R.size;var at=[],Nt=0,Ee=(R.offset||ue.range.start)+R.size,Pe=function(Ke){Ke?(at=at.concat(Ke),++Nt>=Qe&&(at.sort((function(yt,ht){return yt.startTime-ht.startTime<0?-1:0})),f(at,te,z))):f(null,te,z)};for(Me=0,Qe=Ce.length;Me<Qe;Me++)$e=Ee,Ze=Ee+Ce[Me].referenced_size-1,Ee+=Ce[Me].referenced_size,ie(te,Z,{start:$e,end:Ze},z,Pe,ue)}else e.debug("Parsing segments from SIDX. representation "+Z+" - id: "+te.id+" for range : "+ue.range.start+" - "+ue.range.end),fe=(function(Ke,yt){for(var ht,dt,qt,Yt,sn=Ke.references,ln=sn.length,ke=Ke.timescale,ut=Ke.earliest_presentation_time,tt=yt.range.start+Ke.offset+Ke.first_offset+Ke.size,gt=[],Dt=0;Dt<ln;Dt++)qt=sn[Dt].subsegment_duration,Yt=sn[Dt].referenced_size,(ht=new Ao.A).duration=qt,ht.startTime=ut,ht.timescale=ke,dt=tt+Yt-1,ht.mediaRange=tt+"-"+dt,gt.push(ht),ut+=qt,tt+=Yt;return gt})(R,ue),f(fe,te,z)}else{if(R)ue.range.start=R.offset||ue.range.start,ue.range.end=ue.range.start+(R.size||Y);else{if(ge<ue.bytesLoaded)return void f(null,te,z);var ct=L.getLastBox();ct&&ct.size?(ue.range.start=ct.offset+ct.size,ue.range.end=ue.range.start+Y):ue.range.end+=Y}ie(te,Z,ue.range,z,null,ue)}},error:function(){f(null,te,z)}}),e.debug("Perform SIDX load for type ".concat(Z," : ").concat(ue.url," with range ").concat(ue.range.start," - ").concat(ue.range.end))}function he(te,Z,K){K({segments:te,representation:Z,error:te?void 0:new pe.A(U.SEGMENT_BASE_LOADER_ERROR_CODE,U.SEGMENT_BASE_LOADER_ERROR_MESSAGE)})}function oe(te){if(te.url){var Z=new T.A;return Z.setInfo(te),Z}}return t={setConfig:function(te){te.baseURLController&&(j=te.baseURLController),te.dashMetrics&&(C=te.dashMetrics),te.mediaPlayerModel&&(b=te.mediaPlayerModel),te.errHandler&&(o=te.errHandler),te.boxParser&&(l=te.boxParser),te.debug&&(e=te.debug.getLogger(t)),te.requestModifier&&(p=te.requestModifier),te.errors&&(U=te.errors),te.urlUtils&&(w=te.urlUtils),te.constants&&(H=te.constants),te.dashConstants&&(B=te.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(te,Z){return new Promise((function(K){se(te,Z,K)}))},loadSegments:function(te,Z,K){return new Promise((function(z){ie(te,Z,K,z)}))},reset:function(){F&&(F.abort(),F=null)}}}vo.__dashjs_factory_name="SegmentBaseLoader";var tu=h.A.getSingletonFactory(vo);function To(t){var e;t=t||{};var o=new DataView(t.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 e={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(),e[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}}}To.__dashjs_factory_name="EBMLParser";var bo=h.A.getClassFactory(To);function So(){var t,e,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 t={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,e=j.debug.getLogger(t),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(se){var ie=null,he=j?H.resolve(j.path):null,oe=j?j.range.split("-"):null,te={range:{start:oe?parseFloat(oe[0]):null,end:oe?parseFloat(oe[1]):null},request:ie,url:he?he.url:void 0,init:!0,mediaType:k};e.info("Start loading initialization."),ie=w(te),F.load({request:ie,success:function(){se(j)},error:function(){se(j)}}),e.debug("Perform init load: "+te.url)}))},loadSegments:function(j,k,se){return new Promise((function(ie){var he=null,oe=j?H.resolve(j.path):null,te=oe?oe.url:void 0;he=w({bytesLoaded:0,bytesToLoad:8192,range:{start:0,end:8192},request:he,url:te,init:!1,mediaType:k}),e.debug("Parsing ebml header"),F.load({request:he,success:function(Z){(function(K,z,f,N){if(K&&K.byteLength!==0){var S,L,R,V,de=bo(B).create({data:K}),ue=f?f.split("-"):null,P=null,$={url:z,range:{start:ue?parseFloat(ue[0]):null,end:ue?parseFloat(ue[1]):null},request:P};for(e.debug("Parse EBML header: "+$.url),de.skipOverElement(o.EBML),de.consumeTag(o.Segment),R=de.getMatroskaCodedNum(),R+=de.getPos(),V=de.getPos();de.moreData()&&!de.consumeTagAndSize(o.Segment.Info,!0);)if(!(de.skipOverElement(o.Segment.SeekHead,!0)||de.skipOverElement(o.Segment.Tracks,!0)||de.skipOverElement(o.Segment.Cues,!0)||de.skipOverElement(o.Void,!0)))throw new Error("no valid top level element found");for(;S===void 0;){var Y=de.getMatroskaCodedNum(!0),ge=de.getMatroskaCodedNum();Y===o.Segment.Info.Duration.tag?S=de[o.Segment.Info.Duration.parse](ge):de.setPos(de.getPos()+ge)}P=w($),F.load({request:P,success:function(ve){L=(function(fe,Ce,Me,Qe){var $e,Ze,at,Nt,Ee,Pe,ct,Ke;for(at=[],Ee=0,Pe=(Ze=(function(yt){var ht,dt,qt=[],Yt=bo(B).create({data:yt});for(Yt.consumeTagAndSize(o.Segment.Cues);Yt.moreData()&&Yt.consumeTagAndSize(o.Segment.Cues.CuePoint,!0);){for((ht={}).CueTime=Yt.parseTag(o.Segment.Cues.CuePoint.CueTime),ht.CueTracks=[];Yt.moreData()&&Yt.consumeTag(o.Segment.Cues.CuePoint.CueTrackPositions,!0);){var sn=Yt.getMatroskaCodedNum(),ln=Yt.getPos();if((dt={}).Track=Yt.parseTag(o.Segment.Cues.CuePoint.CueTrackPositions.CueTrack),dt.Track===0)throw new Error("Cue track cannot be 0");dt.ClusterPosition=Yt.parseTag(o.Segment.Cues.CuePoint.CueTrackPositions.CueClusterPosition),ht.CueTracks.push(dt),Yt.setPos(ln+sn)}if(ht.CueTracks.length===0)throw new Error("Mandatory cuetrack not found");qt.push(ht)}if(qt.length===0)throw new Error("mandatory cuepoint not found");return qt})(fe)).length;Ee<Pe;Ee+=1)Nt=new Ao.A,$e=Ee<Ze.length-1?Ze[Ee+1].CueTime-Ze[Ee].CueTime:Qe-Ze[Ee].CueTime,Nt.duration=$e,Nt.startTime=Ze[Ee].CueTime,Nt.timescale=1e3,ct=Ze[Ee].CueTracks[0].ClusterPosition+Ce,Ke=Ee<Ze.length-1?Ze[Ee+1].CueTracks[0].ClusterPosition+Ce-1:Me-1,Nt.mediaRange=ct+"-"+Ke,at.push(Nt);return e.debug("Parsed cues: "+at.length+" cues."),at})(ve,V,R,S),N(L)},error:function(){e.error("Download Error: Cues "+$.url),N(null)}}),e.debug("Perform cues load: "+$.url+" bytes="+$.range.start+"-"+$.range.end)}else N(null)})(Z,te,se,(function(K){ie({segments:K,representation:j,error:K?void 0:new pe.A(U.SEGMENT_BASE_LOADER_ERROR_CODE,U.SEGMENT_BASE_LOADER_ERROR_MESSAGE)})}))},error:function(){ie({representation:j,error:new pe.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}},t}So.__dashjs_factory_name="WebmSegmentBaseLoader";var nu=h.A.getSingletonFactory(So);function Io(t){t=t||{};var e,o,l,p=this.context,C=t.eventBus,b=t.events,F=t.dashMetrics,U=t.mediaPlayerModel,H=t.errHandler,B=t.baseURLController,w=t.debug,j=t.boxParser,k=t.requestModifier,se=t.errors;function ie(he){return(he?he.split("/")[1]:"").toLowerCase()==="webm"}return e={initialize:function(){o.initialize(),l.initialize()},getSegmentBaseInitSegment:function(he){return ie(he.representation.mimeType)?l.loadInitialization(he.representation,he.mediaType):o.loadInitialization(he.representation,he.mediaType)},getSegmentList:function(he){return ie(he.mimeType)?l.loadSegments(he.representation,he.mediaType,he.representation?he.representation.indexRange:null):o.loadSegments(he.representation,he.mediaType,he.representation?he.representation.indexRange:null)},reset:function(){o.reset(),l.reset()}},o=tu(p).getInstance(),l=nu(p).getInstance(),o.setConfig({baseURLController:B,dashMetrics:F,mediaPlayerModel:U,errHandler:H,eventBus:C,events:b,errors:se,debug:w,boxParser:j,requestModifier:k}),l.setConfig({baseURLController:B,dashMetrics:F,mediaPlayerModel:U,errHandler:H,eventBus:C,events:b,errors:se,debug:w,requestModifier:k}),e}Io.__dashjs_factory_name="SegmentBaseController";var ru=h.A.getSingletonFactory(Io);function iu(t,e,o){return Object.defineProperty(t,"prototype",{writable:!1}),t}var Ro=iu((function t(){(function(e,o){if(!(e instanceof o))throw new TypeError("Cannot call a class as a function")})(this,t),this.id=null,this.quality=null,this.fragmentDuration=null,this.mediaInfo=null,this.MSETimeOffset=null}));function au(t,e,o){return Object.defineProperty(t,"prototype",{writable:!1}),t}var ua=au((function t(){(function(e,o){if(!(e instanceof o))throw new TypeError("Cannot call a class as a function")})(this,t),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 ou(t,e,o){return Object.defineProperty(t,"prototype",{writable:!1}),t}var wo=ou((function t(){(function(e,o){if(!(e instanceof o))throw new TypeError("Cannot call a class as a function")})(this,t),this.id=null,this.index=null,this.start=NaN,this.duration=NaN,this.manifestInfo=null,this.isLast=!0}));function su(t,e,o){return Object.defineProperty(t,"prototype",{writable:!1}),t}var uu=su((function t(){(function(e,o){if(!(e instanceof o))throw new TypeError("Cannot call a class as a function")})(this,t),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(t){return ri=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ri(t)}function lu(t,e){for(var o=0;o<e.length;o++){var l=e[o];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(t,cu(l.key),l)}}function cu(t){var e=(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)})(t);return ri(e)=="symbol"?e:e+""}var fu=(function(){return t=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}))},(e=[{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}}}])&&lu(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e})();function ii(t){return ii=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ii(t)}function du(t,e){for(var o=0;o<e.length;o++){var l=e[o];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(t,pu(l.key),l)}}function pu(t){var e=(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)})(t);return ii(e)=="symbol"?e:e+""}var hu=(function(){return t=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},(e=[{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)}}])&&du(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e})();function No(){var t,e,o=this.context;return t={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 e.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 e.warn("Ignoring add action for prefixed namespace declaration: ".concat(b.type,"=").concat(b.__text)),null;F="".concat(F,"/").concat(b.type)}var U=new fu(F);if(!U.isValid())return e.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 hu(C,U,H);return C==="add"&&(B.position=b.pos),B})).filter((function(p){return!!p})):[]}},e=(0,g.A)(o).getInstance().getLogger(t),t}No.__dashjs_factory_name="PatchManifestModel";var gu=h.A.getSingletonFactory(No);function Co(){var t,e,o,l,p,C,b,F=this.context;function U(S,L,R){var V,de=e.getAdaptationsForType(l[0].mpd.manifest,S,L);if(!de||de.length===0)return null;if(de.length>1&&R){var ue=w(R,L);if(p[R.id]&&p[R.id][L]){for(var P=0,$=de.length;P<$;P++)if(H(p[R.id][L],ue[P]))return de[P]}for(var Y=0,ge=de.length;Y<ge;Y++)if(V=de[Y],e.getRolesForAdaptation(V).filter((function(ve){return ve.value===n.A.MAIN}))[0])return de[Y]}return de[0]}function H(S,L){if(!S||!L)return!1;var R=S.id===L.id,V=S.codec===L.codec,de=S.viewpoint===L.viewpoint,ue=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),ge=S.accessibility.toString()===L.accessibility.toString(),ve=JSON.stringify(S.accessibilitiesWithSchemeIdUri)===JSON.stringify(L.accessibilitiesWithSchemeIdUri),fe=S.audioChannelConfiguration.toString()===L.audioChannelConfiguration.toString(),Ce=JSON.stringify(S.audioChannelConfigurationsWithSchemeIdUri)===JSON.stringify(L.audioChannelConfigurationsWithSchemeIdUri);return R&&V&&de&&ue&&P&&$&&Y&&ge&&ve&&fe&&Ce}function B(S,L,R,V,de,ue){var P,$,Y,ge,ve,fe,Ce=[];if(!V||V.length===0)return[];var Me=e.getAdaptationsForPeriod(L);for(ge=0,fe=V.length;ge<fe;ge++)if(P=V[ge],$=te(Me[Y=e.getIndexForAdaptation(P,S,R.index)]),ue){var Qe=$.accessibility.length;for(ve=0;ve<Qe;ve++)if($){var $e=$.accessibility[ve];if($e.indexOf("cea-608:")===0){var Ze=$e.substring(8).split(";");if(Ze[0].substring(0,2)==="CC")for(ve=0;ve<Ze.length;ve++)$||($=te.call(this,Me[Y])),Z($,Ze[ve].substring(0,3),Ze[ve].substring(4)),Ce.push($),$=null;else for(ve=0;ve<Ze.length;ve++)$||($=te.call(this,Me[Y])),Z($,"CC"+(ve+1),Ze[ve]),Ce.push($),$=null}else $e.indexOf("cea-608")===0&&(Z($,C.CC1,"eng"),Ce.push($),$=null)}}else de===C.IMAGE?($.type=C.IMAGE,Ce.push($),$=null):$&&Ce.push($);return Ce}function w(S,L,R){var V=l,de=R,ue=[];if(de)z(),V=j(de);else{if(!(l.length>0))return ue;de=l[0].mpd.manifest}var P=oe(S,V),$=e.getAdaptationsForType(de,S?S.index:null,L);return ue=B(de,P,S,$,L),L===C.TEXT&&($=e.getAdaptationsForType(de,S?S.index:null,C.VIDEO),ue=ue.concat(B(de,P,S,$,L,!0))),ue}function j(S){var L=k(S);return e.getRegularPeriods(L)}function k(S){var L=ie(S);return e.getMpd(L)}function se(){l=[],p={}}function ie(S){return S||(l.length>0?l[0].mpd.manifest:null)}function he(S){try{var L=oe(S.streamInfo,l),R=e.getAdaptationsForPeriod(L);return S&&S.streamInfo&&S.streamInfo.id!==void 0&&R?R[S.index]:null}catch{return null}}function oe(S,L){for(var R=L.length,V=0;V<R;V++){var de=L[V];if(S&&S.id===de.id)return de}return null}function te(S){if(!S)return null;var L,R,V,de,ue,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=e.getRepresentationCount($),P.labels=e.getLabelsForAdaptation($),P.lang=e.getLanguageForAdaptation($),P.segmentAlignment=e.getSegmentAlignment($),P.subSegmentAlignment=e.getSubSegmentAlignment($),L=e.getViewpointForAdaptation($),P.viewpoint=L.length?L[0].value:void 0,P.viewpointsWithSchemeIdUri=L,ue=e.getAccessibilityForAdaptation($),P.accessibility=ue.map((function(Ce){var Me=Ce.value,Qe=Me;return Ce.schemeIdUri&&Ce.schemeIdUri.search("cea-608")>=0&&b!==void 0&&(Qe=Me?"cea-608:"+Me:"cea-608",P.embeddedCaptions=!0),Qe})),P.accessibilitiesWithSchemeIdUri=ue,R=e.getAudioChannelConfigurationForAdaptation($),P.audioChannelConfiguration=R.map((function(Ce){return Ce.value})),P.audioChannelConfigurationsWithSchemeIdUri=R,P.audioChannelConfiguration.length===0&&Array.isArray($.Representation_asArray)&&$.Representation_asArray.length>0&&(V=e.getAudioChannelConfigurationForRepresentation($.Representation_asArray[0]),P.audioChannelConfiguration=V.map((function(Ce){return Ce.value})),P.audioChannelConfigurationsWithSchemeIdUri=V),de=e.getRolesForAdaptation($),P.roles=de.map((function(Ce){return Ce.value})),P.rolesWithSchemeIdUri=de,P.codec=e.getCodec($),P.mimeType=e.getMimeType($),P.contentProtection=e.getContentProtectionData($),P.bitrateList=e.getBitrateListForAdaptation($),P.selectionPriority=e.getSelectionPriority($),P.contentProtection){var Y=P.contentProtection.map((function(Ce){return e.getKID(Ce)})).filter((function(Ce){return Ce!==null}));if(Y.length){var ge=Y[0];P.contentProtection.forEach((function(Ce){Ce.keyId=ge}))}}if(P.isText=e.getIsText($),P.supplementalProperties=e.getSupplementalPropertiesForAdaptation($),(!P.supplementalProperties||Object.keys(P.supplementalProperties).length===0)&&Array.isArray($.Representation_asArray)&&$.Representation_asArray.length>0){var ve=$.Representation_asArray.map((function(Ce){return e.getSupplementalPropertiesForRepresentation(Ce)}));ve.every((function(Ce){return JSON.stringify(Ce)===JSON.stringify(ve[0])}))&&(P.supplementalProperties=ve[0])}if(P.supplementalPropertiesAsArray=e.getSupplementalPropertiesAsArrayForAdaptation($),(!P.supplementalPropertiesAsArray||P.supplementalPropertiesAsArray.length===0)&&Array.isArray($.Representation_asArray)&&$.Representation_asArray.length>0){var fe=$.Representation_asArray.map((function(Ce){return e.getSupplementalPropertiesAsArrayForRepresentation(Ce)}));fe.every((function(Ce){return JSON.stringify(Ce)===JSON.stringify(fe[0])}))&&(P.supplementalPropertiesAsArray=fe[0])}return P.essentialProperties=e.getEssentialPropertiesForAdaptation($),P.essentialPropertiesAsArray=e.getEssentialPropertiesAsArrayForAdaptation($),P.isFragmented=e.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 wo;return V.id=S.id,V.index=S.index,V.start=S.start,V.duration=S.duration,V.manifestInfo=(L=S.mpd,(R=new uu).dvrWindowSize=L.timeShiftBufferDepth,R.loadedTime=L.manifest.loadedTime,R.availableFrom=L.availabilityStartTime,R.minBufferTime=L.manifest.minBufferTime,R.maxFragmentDuration=L.maxSegmentDuration,R.duration=e.getDuration(L.manifest),R.isDynamic=e.getIsDynamic(L.manifest),R.serviceDescriptions=e.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,de,ue,P,$;if(S){for(V=S.AdaptationSet_asArray,P=0;P<V.length;P+=1)for(ue=V[P].Representation_asArray,$=0;$<ue.length;$+=1)if(L===(de=ue[$]).id)return R?$:de}return null}return t={getBandwidthForRepresentation:function(S,L){var R;return(R=N(f(L),S))?R.bandwidth:null},getIndexForRepresentation:function(S,L){return(function(R,V){var de=N(R,V,!0);return de!==null?de:-1})(f(L),S)},getMaxIndexForBufferType:function(S,L){return(function(R,V){var de,ue,P,$;if(!R||!V)return-1;for(ue=R.AdaptationSet_asArray,$=0;$<ue.length;$+=1)if(P=(de=ue[$]).Representation_asArray,e.getIsTypeOf(de,V))return P.length;return-1})(f(L),S)},convertRepresentationToRepresentationInfo:function(S){if(S){var L=new Ro,R=S.adaptation.period.mpd.manifest.Period_asArray[S.adaptation.period.index].AdaptationSet_asArray[S.adaptation.index],V=e.getRepresentationFor(S.index,R);return L.id=S.id,L.quality=S.index,L.bandwidth=e.getBandwidth(V),L.fragmentDuration=S.segmentDuration||(S.segments&&S.segments.length>0?S.segments[0].duration:NaN),L.MSETimeOffset=S.MSETimeOffset,L.mediaInfo=te(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 de=0;de<L;de++)R.push(K(V[de]))}return R},getMediaInfoForType:function(S,L){if(l.length===0||!S)return null;var R=oe(S,l);if(!R)return null;var V=e.getAdaptationsForPeriod(R),de=U(S.index,L,S);return de?te(V[e.getIndexForAdaptation(de,l[0].mpd.manifest,S.index)]):null},getAllMediaInfoForType:w,getAdaptationForType:U,getRealAdaptation:function(S,L){var R,V,de=oe(S,l);return R=L?L.id:null,l.length>0&&de&&(V=R?e.getAdaptationForId(R,l[0].mpd.manifest,de.index):e.getAdaptationForIndex(L?L.index:null,l[0].mpd.manifest,de.index)),V},getProducerReferenceTimes:function(S,L){var R,V,de=oe(S,l);return R=L?L.id:null,l.length>0&&de&&(V=R?e.getAdaptationForId(R,l[0].mpd.manifest,de.index):e.getAdaptationForIndex(L?L.index:null,l[0].mpd.manifest,de.index)),V?e.getProducerReferenceTimesForAdaptation(V):[]},getRealPeriodByIndex:function(S){return e.getRealPeriodForIndex(S,l[0].mpd.manifest)},getEssentialPropertiesForRepresentation:function(S){try{return e.getEssentialPropertiesForRepresentation(S)}catch{return[]}},getVoRepresentations:function(S){var L=he(S);return e.getRepresentationsForAdaptation(L)},getEventsFor:function(S,L,R){var V=[];if(l.length>0){var de=l[0].mpd.manifest;if(S instanceof wo){var ue=oe(S,l);V=e.getEventsForPeriod(ue)}else if(S instanceof ua){var P=oe(R,l);V=e.getEventStreamForAdaptationSet(de,he(S),P)}else if(S instanceof Ro){var $=oe(R,l);V=e.getEventStreamForRepresentation(de,L,$)}}return V},getEvent:function(S,L,R,V){try{if(!S||!L||isNaN(R)||!V)return null;var de=S.scheme_id_uri,ue=S.value;if(!L[de+"/"+ue])return null;var P,$=new jr,Y=S.timescale||1,ge=V.adaptation.period.start,ve=L[de+"/"+ue],fe=isNaN(V.presentationTimeOffset)?isNaN(ve.presentationTimeOffset)?0:ve.presentationTimeOffset:V.presentationTimeOffset,Ce=S.presentation_time_delta/Y;P=S.version===0?ge+R-fe+Ce:ge-fe+Ce;var Me=S.event_duration/Y,Qe=S.id,$e=S.message_data;return $.eventStream=ve,$.eventStream.value=ue,$.eventStream.timescale=Y,$.duration=Me,$.id=Qe,$.calculatedPresentationTime=P,$.messageData=$e,$.presentationTimeDelta=Ce,$}catch{return null}},getMpd:k,setConfig:function(S){S&&(S.constants&&(C=S.constants),S.cea608parser&&(b=S.cea608parser),S.errHandler&&e.setConfig({errHandler:S.errHandler}),S.BASE64&&e.setConfig({BASE64:S.BASE64}))},updatePeriods:function(S){if(!S)return null;z(),l=j(S)},getIsTextTrack:function(S){return e.getIsText(S)},getUTCTimingSources:function(){var S=ie();return e.getUTCTimingSources(S)},getSuggestedPresentationDelay:function(){var S=l.length>0?l[0].mpd:null;return e.getSuggestedPresentationDelay(S)},getAvailabilityStartTime:function(S){var L=k(S);return e.getAvailabilityStartTime(L)},getIsTypeOf:function(S,L){return e.getIsTypeOf(S,L)},getIsDynamic:function(S){var L=ie(S);return e.getIsDynamic(L)},getDuration:function(S){var L=ie(S);return e.getDuration(L)},getRegularPeriods:j,getContentSteering:function(S){return e.getContentSteering(S)},getLocation:function(S){return e.getLocation(S)},getPatchLocation:function(S){var L=e.getPatchLocation(S),R=e.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 e.getManifestUpdatePeriod(S,L)},getPublishTime:function(S){return e.getPublishTime(S)},getIsDVB:function(S){return e.hasProfile(S,"urn:dvb:dash:profile:dvb-dash:2014")},getIsPatch:function(S){return o.getIsPatch(S)},getBaseURLsFromElement:function(S){return e.getBaseURLsFromElement(S)},getRepresentationSortFunction:function(){return e.getRepresentationSortFunction()},getCodec:function(S,L,R){return e.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=e.getId(S),V=o.getMpdId(L),de=e.getPublishTime(S),ue=o.getPublishTime(L),P=o.getOriginalPublishTime(L);return!!(R&&V&&R==V&&de&&P&&de.getTime()==P.getTime()&&ue&&de.getTime()<ue.getTime())},applyPatchToManifest:function(S,L){o.getPatchOperations(L).forEach((function(R){var V=R.getMpdTarget(S);if(V!==null){var de=V.name,ue=V.target,P=V.leaf;if(R.xpath.findsAttribute()||de==="__text")switch(R.action){case"add":case"replace":ue[de]=R.value;break;case"remove":delete ue[de]}else{var $=(ue[de+"_asArray"]||[]).indexOf(P),Y=R.position==="prepend"||R.position==="before";if((R.action==="remove"||R.action==="replace")&&(delete ue[de],$!=-1)){var ge=ue[de+"_asArray"];ge.splice($,1),ge.length>1?ue[de]=ge:ge.length==1?ue[de]=ge[0]:delete ue[de+"_asArray"]}R.action!=="add"&&R.action!=="replace"||Object.keys(R.value).forEach((function(ve){var fe=R.value[ve],Ce=ue[ve+"_asArray"]||[];if(Ce.length===0&&ue[ve]&&Ce.push(ue[ve]),Ce.length===0)Ce=fe;else{var Me=Ce.length;Me=ve==de&&$!=-1?$+(Y?0:1)+(R.action=="replace"?-1:0):Y?0:Ce.length,Ce.splice.apply(Ce,[Me,0].concat(fe))}ue[ve+"_asArray"]=Ce,ue[ve]=Ce.length==1?Ce[0]:Ce}))}}}))},areMediaInfosEqual:H,reset:se},e=It(F).getInstance(),o=gu(F).getInstance(),se(),t}Co.__dashjs_factory_name="DashAdapter";var mu=h.A.getSingletonFactory(Co);function ai(t){return ai=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ai(t)}function yu(t,e){for(var o=0;o<e.length;o++){var l=e[o];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(t,Eu(l.key),l)}}function Eu(t){var e=(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)})(t);return ai(e)=="symbol"?e:e+""}var _u=(function(){return t=function o(){(function(l,p){if(!(l instanceof p))throw new TypeError("Cannot call a class as a function")})(this,o)},e=[{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)}}],e&&yu(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e})();function Au(t,e,o){return Object.defineProperty(t,"prototype",{writable:!1}),t}var vu=Au((function t(){(function(e,o){if(!(e instanceof o))throw new TypeError("Cannot call a class as a function")})(this,t),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 Tu(t,e,o){return Object.defineProperty(t,"prototype",{writable:!1}),t}var bu=Tu((function t(){(function(e,o){if(!(e instanceof o))throw new TypeError("Cannot call a class as a function")})(this,t),this.t=null,this.mt=null,this.to=null,this.lto=null}));function Su(t,e,o){return Object.defineProperty(t,"prototype",{writable:!1}),t}var Iu=Su((function t(){(function(e,o){if(!(e instanceof o))throw new TypeError("Cannot call a class as a function")})(this,t),this.t=null,this.level=null}));function Ru(t,e,o){return Object.defineProperty(t,"prototype",{writable:!1}),t}var wu=Ru((function t(){(function(e,o){if(!(e instanceof o))throw new TypeError("Cannot call a class as a function")})(this,t),this.target=null,this.state=_.A.BUFFER_EMPTY}));function Nu(t,e,o){return Object.defineProperty(t,"prototype",{writable:!1}),t}var Cu=Nu((function t(){(function(e,o){if(!(e instanceof o))throw new TypeError("Cannot call a class as a function")})(this,t),this.time=null,this.range=null,this.manifestInfo=null}));function Du(t,e,o){return Object.defineProperty(t,"prototype",{writable:!1}),t}var Ou=Du((function t(){(function(e,o){if(!(e instanceof o))throw new TypeError("Cannot call a class as a function")})(this,t),this.time=null,this.droppedFrames=null}));function la(t,e,o){return Object.defineProperty(t,"prototype",{writable:!1}),t}function ca(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var Mu=la((function t(){ca(this,t),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=[]})),Pu=la((function t(){ca(this,t),this.id=null,this.index=null,this.start=null,this.duration=null})),Lu=la((function t(){ca(this,t),this.id=null,this.index=null,this.mediaType=null,this.streamIndex=null,this.presentationTimeOffset=null,this.startNumber=null,this.fragmentInfoType=null}));function Fu(t,e,o){return Object.defineProperty(t,"prototype",{writable:!1}),t}var xu=Fu((function t(){(function(e,o){if(!(e instanceof o))throw new TypeError("Cannot call a class as a function")})(this,t),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 Uu(t,e,o){return Object.defineProperty(t,"prototype",{writable:!1}),t}var Bu=Uu((function t(){(function(e,o){if(!(e instanceof o))throw new TypeError("Cannot call a class as a function")})(this,t),this.loadingRequests=[],this.executedRequests=[]}));function Do(t){var e,o,l=(t=t||{}).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,se,ie){C.trigger(i.A.METRIC_UPDATED,{mediaType:k,metric:se,value:ie}),F(k)}function H(k,se,ie){C.trigger(i.A.METRIC_ADDED,{mediaType:k,metric:se,value:ie}),F(k)}function B(k,se){var ie=null;return k&&(o.hasOwnProperty(k)?ie=o[k]:se||(ie=new vu,o[k]=ie)),ie}function w(k,se,ie){var he=B(k);he!==null&&(he[se].push(ie),he[se].length>l.get().streaming.metrics.maxListDepth&&he[se].shift())}function j(k,se,ie){w(k,se,ie),H(k,se,ie)}return e={clearCurrentMetricsForType:function(k){delete o[k],F(k)},clearAllCurrentMetrics:function(){o={},b()},getMetricsFor:B,addHttpRequest:function k(se,ie,he,oe,te,Z,K,z,f,N,S,L,R,V,de,ue,P){var $=new je.G;Z!=null&&Z!==oe&&(k(se,null,he,oe,te,null,null,z,f,null,null,null,R,null,null,ue,P),$.actualurl=Z),$.tcpid=ie,$.type=he,$.url=oe,$.range=z,$.trequest=f,$.tresponse=N,$.responsecode=L,$.cmsd=P,$._tfinish=S,$._stream=se,$._mediaduration=R,$._quality=te,$._responseHeaders=V,$._serviceLocation=K,$._fileLoaderType=ue,de?de.forEach((function(Y){(function(ge,ve,fe,Ce){var Me=new je.N;Me.s=ve,Me.d=fe,Me.b=Ce,ge.trace.push(Me),ge.interval||(ge.interval=0),ge.interval+=fe})($,Y.s,Y.d,Y.b)})):(delete $.interval,delete $.trace),j(se,_.A.HTTP_REQUEST,$)},addRepresentationSwitch:function(k,se,ie,he,oe){var te=new bu;te.t=se,te.mt=ie,te.to=he,oe?te.lto=oe:delete te.lto,j(k,_.A.TRACK_SWITCH,te)},addBufferLevel:function(k,se,ie){var he=new Iu;he.t=se,he.level=ie,j(k,_.A.BUFFER_LEVEL,he)},addBufferState:function(k,se,ie){var he=new wu;he.target=ie,he.state=se,j(k,_.A.BUFFER_STATE,he)},addDVRInfo:function(k,se,ie,he){var oe=new Cu;oe.time=se,oe.range=he,oe.manifestInfo=ie,j(k,_.A.DVR_INFO,oe)},addDroppedFrames:function(k,se){var ie=new Ou,he=B(k).DroppedFrames;se&&(ie.time=se.creationTime,ie.droppedFrames=se.droppedVideoFrames,he.length>0&&he[he.length-1]==ie||j(k,_.A.DROPPED_FRAMES,ie))},addSchedulingInfo:function(k,se,ie,he,oe,te,Z,K,z){var f=new xu;f.mediaType=k,f.t=se,f.type=ie,f.startTime=he,f.availabilityStartTime=oe,f.duration=te,f.quality=Z,f.range=K,f.state=z,j(k,_.A.SCHEDULING_INFO,f)},addRequestsQueue:function(k,se,ie){var he=new Bu;he.loadingRequests=se,he.executedRequests=ie,B(k).RequestsQueue=he,H(k,_.A.REQUESTS_QUEUE,he)},addManifestUpdate:function(k,se,ie,he,oe,te,Z,K,z,f){var N=new Mu;N.mediaType=k,N.type=se,N.requestTime=ie,N.fetchTime=he,N.availabilityStartTime=oe,N.presentationStartTime=te,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,se){if(k){for(var ie in se)k[ie]=se[ie];U(k.mediaType,_.A.MANIFEST_UPDATE,k)}},addManifestUpdateStreamInfo:function(k,se,ie,he,oe){if(k){var te=new Pu;te.id=se,te.index=ie,te.start=he,te.duration=oe,k.streamInfo.push(te),U(k.mediaType,_.A.MANIFEST_UPDATE_STREAM_INFO,k)}},addManifestUpdateRepresentationInfo:function(k,se,ie,he,oe,te,Z,K){if(k&&k.representationInfo){var z=new Lu;z.id=se,z.index=ie,z.streamIndex=he,z.mediaType=oe,z.startNumber=Z,z.fragmentInfoType=K,z.presentationTimeOffset=te,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(se){se.hasOwnProperty("subreplevel")&&!se.subreplevel&&delete se.subreplevel})):delete k.trace,j(u.A.STREAM,_.A.PLAY_LIST,k)},addDVBErrors:function(k){j(u.A.STREAM,_.A.DVB_ERRORS,k)}},o={},e}Do.__dashjs_factory_name="MetricsModel";var ku=h.A.getSingletonFactory(Do);function Oo(t){t=t||{};var e,o,l,p,C=this.context,b=t.metricsModel;function F(B){var w=b.getMetricsFor(B,!0);if(!w)return null;var j,k=w.HttpList,se=null;if(!k||k.length<=0)return null;for(j=k.length-1;j>=0;){if(k[j].responsecode){se=k[j];break}j--}return se}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 e={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?_u.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=Ft.A.parseHttpHeaders(k._responseHeaders));var se=j[w.toLowerCase()];return se===void 0?null:se},getLatestMPDRequestHeaderValueByID:function(B){if(!B)return null;var w,j,k,se={};for(k=(w=U(u.A.STREAM)).length-1;k>=0;k--)if((j=w[k]).type===je.G.MPD_TYPE){se=Ft.A.parseHttpHeaders(j._responseHeaders);break}var ie=se[B.toLowerCase()];return ie===void 0?null:ie},addRepresentationSwitch:function(B,w,j,k,se){b.addRepresentationSwitch(B,w,j,k,se)},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,se,ie){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,se,B.fileLoaderType,ie)},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 Ye).start=new Date,p.mstart=B,p.starttype=w},createPlaylistTraceMetrics:function(B,w,j){o===!0&&(o=!1,(l=new Ve).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||ku(C).getInstance({settings:t.settings}),o=!0,l=null,p=null,e}Oo.__dashjs_factory_name="DashMetrics";var Gu=h.A.getSingletonFactory(Oo);function Mo(){var t,e,o,l,p=this.context,C=(0,y.A)(p).getInstance(),b=(0,le.A)(p).getInstance();function F(oe){l=oe}function U(oe,te,Z,K){var z,f=te.adaptation.period.mpd,N=f.availabilityStartTime;if(K)z=Z&&f.timeShiftBufferDepth!==Number.POSITIVE_INFINITY?new Date(N.getTime()+1e3*(oe+f.timeShiftBufferDepth)):f.availabilityEndTime;else if(Z){var S=te.availabilityTimeOffset;z=new Date(N.getTime()+1e3*(oe-S))}else z=N;return z}function H(oe,te){return(oe.getTime()-te.mpd.availabilityStartTime.getTime()+1e3*l)/1e3}function B(oe,te){return oe+(te.adaptation.period.start-te.presentationTimeOffset)}function w(oe){var te={start:NaN,end:NaN},Z=oe[0].getAdapter().getRegularPeriods()[0],K=H(new Date,Z);if(!oe||oe.length===0)return{range:te,now:K};oe.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(de){var ue,P,$,Y,ge=de.adaptation.period.mpd.manifest.Period_asArray[de.adaptation.period.index].AdaptationSet_asArray[de.adaptation.index],ve=e.getRepresentationFor(de.index,ge),fe=ve.SegmentTemplate||ve.SegmentList,Ce=fe.SegmentTimeline,Me=fe.timescale,Qe=Ce.S_asArray,$e={start:0,end:0},Ze=Qe[0].t,at=!isNaN(Ze),Nt=at?Ze:0,Ee=0;for(at&&($e.start=B(Nt/Me,de)),$=0,Y=Qe.length;$<Y;$++)P=0,(ue=Qe[$]).hasOwnProperty("r")&&(P=ue.r),Ee+=ue.d*(1+P);return $e.end=B((Nt+Ee)/Me,de),$e})(L);else{var V=L.adaptation.period;R.start=V.start,R.end=Math.max(K,V.start+V.duration)}!isNaN(R.start)&&(isNaN(te.start)||te.start>R.start)&&(te.start=R.start),!isNaN(R.end)&&(isNaN(te.end)||te.end<R.end)&&(te.end=R.end)})),te.end=Math.min(K,te.end);var z=k(oe,te.end,!0);return te.end=isNaN(z)?te.end:z,te.start=Z&&Z.mpd&&Z.mpd.timeShiftBufferDepth&&!isNaN(Z.mpd.timeShiftBufferDepth)&&!isNaN(te.end)?Math.max(te.end-Z.mpd.timeShiftBufferDepth,te.start):te.start,te.start=k(oe,te.start),{range:te,now:K}}function j(oe,te){o=oe-te.end}function k(oe,te){var Z=arguments.length>2&&arguments[2]!==void 0&&arguments[2];try{for(var K=0,z=!1,f=NaN;!z&&K<oe.length;){var N=oe[K].getStreamInfo();N.start<=te&&(!isFinite(N.duration)||N.start+N.duration>=te)?(f=te,z=!0):!Z&&N.start>te&&(isNaN(f)||N.start<f)?f=N.start:Z&&N.start+N.duration<te&&(isNaN(f)||N.start+N.duration>f)&&(f=N.start+N.duration),K+=1}return f}catch{return te}}function se(oe){oe.offset===void 0||isNaN(oe.offset)||F(oe.offset/1e3)}function ie(){l=0,o=0}function he(){C.off(i.A.UPDATE_TIME_SYNC_OFFSET,se,this),ie()}return t={initialize:function(){ie(),C.on(i.A.UPDATE_TIME_SYNC_OFFSET,se,this)},getClientTimeOffset:function(){return l},setClientTimeOffset:F,getClientReferenceTime:function(){return Date.now()-1e3*o+1e3*l},calcAvailabilityStartTimeFromPresentationTime:function(oe,te,Z){return U(oe,te,Z)},calcAvailabilityEndTimeFromPresentationTime:function(oe,te,Z){return U(oe,te,Z,!0)},calcPresentationTimeFromWallTime:H,calcPresentationTimeFromMediaTime:B,calcPeriodRelativeTimeFromMpdRelativeTime:function(oe,te){return te-oe.adaptation.period.start},calcMediaTimeFromPresentationTime:function(oe,te){return oe-te.adaptation.period.start+te.presentationTimeOffset},calcWallTimeForSegment:function(oe,te){var Z,K,z;return te&&(Z=oe.representation.adaptation.period.mpd.suggestedPresentationDelay,K=oe.presentationStartTime+Z,z=new Date(oe.availabilityStartTime.getTime()+1e3*K)),z},calcTimeShiftBufferWindow:function(oe,te){if(!te)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})(oe);if(b.get().streaming.timeShiftBuffer.calcFromSegmentTimeline){var Z=w(oe);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})(oe)},reset:he},e=It(p).getInstance(),he(),t}Mo.__dashjs_factory_name="TimelineConverter";var ju=h.A.getSingletonFactory(Mo),fa=M(8107),Ni=M(8667);function da(t){return da=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},da(t)}function qu(t,e,o){return e=Ci(e),(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)})(t,Po()?Reflect.construct(e,[],Ci(t).constructor):e.apply(t,o))}function Po(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Po=function(){return!!t})()}function Ci(t){return Ci=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ci(t)}function pa(t,e){return pa=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,l){return o.__proto__=l,o},pa(t,e)}var Yu=(function(t){function e(){var l;return(function(p,C){if(!(p instanceof C))throw new TypeError("Cannot call a class as a function")})(this,e),(l=qu(this,e)).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)})(e,t),o=e,Object.defineProperty(o,"prototype",{writable:!1}),o;var o})(ua),Hu=M(6877);function Lo(){var t=0;function e(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,se=!1,ie=-1,he={start:U,end:H,spans:[]},oe="style_cea608_white_black",te={},Z={},K=[];for(w=0;w<15;++w){var z=B.rows[w],f="",N=null;if(z.isEmpty()===!1){var S=e(z.chars);k===null&&(k={x:S,y1:w,y2:w+1,p:[]}),S!==ie&&se&&(k.p.push(he),he={start:U,end:H,spans:[]},k.y2=w,k.name="region_"+k.x+"_"+k.y1+"_"+k.y2,te.hasOwnProperty(k.name)===!1?(K.push(k),te[k.name]=k):te[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&&(he.spans.push({name:oe,line:f,row:w}),f="");var de="style_cea608_"+V.foreground+"_"+V.background;V.underline&&(de+="_underline"),V.italics&&(de+="_italics"),Z.hasOwnProperty(de)||(Z[de]=JSON.parse(JSON.stringify(V))),N=V,oe=de}f+=R.uchar}f.trim().length>0&&he.spans.push({name:oe,line:f,row:w}),se=!0,ie=S}else se=!1,ie=-1,k&&(k.p.push(he),he={start:U,end:H,spans:[]},k.y2=w,k.name="region_"+k.x+"_"+k.y1+"_"+k.y2,te.hasOwnProperty(k.name)===!1?(K.push(k),te[k.name]=k):te[k.name].p.contat(k.p),k=null)}k&&(k.p.push(he),k.y2=w+1,k.name="region_"+k.x+"_"+k.y1+"_"+k.y2,te.hasOwnProperty(k.name)===!1?(K.push(k),te[k.name]=k):te[k.name].p.contat(k.p),k=null);var ue=[];for(w=0;w<K.length;++w){var P=K[w],$="sub_cea608_"+t++,Y=document.createElement("div");Y.id=$;var ge=o(P);Y.style.cssText="position: absolute; margin: 0; display: flex; box-sizing: border-box; pointer-events: none;"+ge;var ve=document.createElement("div");ve.className="paragraph bodyStyle",ve.style.cssText=p(F);var fe=document.createElement("div");fe.className="cueUniWrapper",fe.style.cssText="unicode-bidi: normal; direction: ltr;";for(var Ce=0;Ce<P.p.length;++Ce){var Me=P.p[Ce],Qe=0;for(j=0;j<Me.spans.length;++j){var $e=Me.spans[j];if($e.line.length>0){if(j!==0&&Qe!=$e.row){var Ze=document.createElement("br");Ze.className="lineBreak",fe.appendChild(Ze)}var at=!1;Qe===$e.row&&(at=!0),Qe=$e.row;var Nt=Z[$e.name],Ee=document.createElement("span");Ee.className="spanPadding "+$e.name+" customSpanColor",Ee.style.cssText=p(F,Nt),j!==0&&at?j===Me.spans.length-1?Ee.textContent=b($e.line):Ee.textContent=$e.line:Me.spans.length>1&&j<Me.spans.length-1&&$e.row===Me.spans[j+1].row?Ee.textContent=C($e.line):Ee.textContent=$e.line.trim(),fe.appendChild(Ee)}}}ve.appendChild(fe),Y.appendChild(ve);var Pe={bodyStyle:["%",90]};for(var ct in Z)Z.hasOwnProperty(ct)&&(Pe[ct]=["%",90]);ue.push({type:"html",start:U,end:H,cueHTMLElement:Y,cueID:$,cellResolution:[32,15],isFromCEA608:!0,fontSize:Pe,lineHeight:{},linePadding:{}})}return ue}}}Lo.__dashjs_factory_name="EmbeddedTextHtmlRender";var Vu=h.A.getSingletonFactory(Lo);function Fo(t){var e,o,l,p,C,b,F,U,H,B,w,j,k,se,ie,he,oe,te=t.errHandler,Z=t.manifestModel,K=t.mediaController,z=t.videoModel,f=t.textTracks,N=t.vttParser,S=t.vttCustomRenderingParser,L=t.ttmlParser,R=t.streamInfo,V=t.settings,de=this.context,ue=(0,y.A)(de).getInstance(),P=!1;function $(){b=null,U=NaN,H=[],B=null,F=!1,C=[],p=null}function Y(Ze){var at=new Yu;for(var Nt in Ze)at[Nt]=Ze[Nt];at.labels=Ze.labels,at.defaultTrack=(function(Ee){var Pe=!1;return j.length>1&&Ee.isEmbedded?Pe=Ee.id&&Ee.id===u.A.CC1:j.length===1?Ee.id&&typeof Ee.id=="string"&&Ee.id.substring(0,2)==="CC"&&(Pe=!0):j.length===0&&(Pe=Ee.index===C[0].index),Pe})(Ze),at.isFragmented=Ze.isFragmented,at.isEmbedded=!!Ze.isEmbedded,at.isTTML=(function(Ee){return Ee.codec&&Ee.codec.search(u.A.STPP)>=0||Ee.mimeType&&Ee.mimeType.search(u.A.TTML)>=0})(Ze),at.kind=(function(Ee,Pe){var ct=Ee.roles&&Ee.roles.length>0?Pe[Ee.roles[0]]:Pe.caption;return ct=ct===Pe.caption||ct===Pe.subtitle?ct:Pe.caption})(Ze,{subtitle:"subtitles",caption:"captions"}),f.addTextTrack(at)}function ge(Ze){var at=Ze.chunk;at.mediaInfo.embeddedCaptions&&fe(at.bytes,at)}function ve(Ze){w=Ze}function fe(Ze,at){var Nt=at.mediaInfo,Ee=Nt.type,Pe=Nt.mimeType,ct=Nt.codec||Pe;ct?Nt.codec.indexOf("application/mp4")!==-1?(function(Ke,yt,ht){var dt;if(yt.segmentType==="InitializationSegment")F=!0,U=l.getMediaTimescaleFromMoov(Ke);else{if(!F)return;(dt=l.getSamplesInfo(Ke).sampleList).length>0&&(B=dt[0].cts-yt.start*U),ht.search(u.A.STPP)>=0?(function(qt,Yt,sn){var ln,ke;for(p=p!==null?p:Qe(sn),ln=0;ln<Yt.length;ln++){var ut=Yt[ln],tt=ut.cts,gt=Me(),Dt=gt+tt/U,Vt=Dt+ut.duration/U;e.buffered.add(Dt,Vt);var Gt=new DataView(qt,ut.offset,ut.subSizes[0]),Kt=Ni.Utils.dataViewToString(Gt,u.A.UTF8),Zt=[],pt=ut.offset+ut.subSizes[0];for(ke=1;ke<ut.subSizes.length;ke++){var Ot=new Uint8Array(qt,pt,ut.subSizes[ke]),Fe=String.fromCharCode.apply(null,Ot);Zt.push(Fe),pt+=ut.subSizes[ke]}try{var st=Z.getValue().ttmlTimeIsRelative?tt/U:0,xe=p.parse(Kt,st,tt/U,(tt+ut.duration)/U,Zt);f.addCaptions(w,gt,xe)}catch(Ge){b.removeExecutedRequestsBeforeTime(),this.remove(),o.error("TTML parser error: "+Ge.message)}}})(Ke,dt,ht):(function(qt,Yt){var sn,ln,ke,ut=[];for(sn=0;sn<Yt.length;sn++){var tt=Yt[sn];tt.cts-=B;var gt=Me()+tt.cts/U,Dt=gt+tt.duration/U;e.buffered.add(gt,Dt);var Vt=qt.slice(tt.offset,tt.offset+tt.size),Gt=Ni.parseBuffer(Vt);for(ln=0;ln<Gt.boxes.length;ln++){var Kt=Gt.boxes[ln];if(o.debug("VTT box1: "+Kt.type),Kt.type!=="vtte"&&Kt.type==="vttc"){o.debug("VTT vttc boxes.length = "+Kt.boxes.length);var Zt={styles:{}};for(ke=0;ke<Kt.boxes.length;ke++){var pt=Kt.boxes[ke];if(o.debug("VTT box2: "+pt.type),pt.type==="payl")Zt.start=tt.cts/U,Zt.end=(tt.cts+tt.duration)/U,Zt.data=pt.cue_text;else if(pt.type==="sttg"&&pt.settings&&pt.settings!=="")try{var Ot=pt.settings.split(" ");Zt.styles=N.getCaptionStyles(Ot)}catch{}}Zt&&Zt.data&&(ut.push(Zt),o.debug("VTT ".concat(Zt.start," - ").concat(Zt.end," : ").concat(Zt.data)))}}}ut.length>0&&f.addCaptions(w,0,ut)})(Ke,dt)}})(Ze,at,ct):Ee===u.A.VIDEO?(function(Ke,yt){var ht,dt;if(yt.segmentType===je.G.INIT_SEGMENT_TYPE)k===0&&(k=l.getMediaTimescaleFromMoov(Ke));else if(yt.segmentType===je.G.MEDIA_SEGMENT_TYPE){if(k===0)return void o.warn("CEA-608: No timescale for embeddedTextTrack yet");var qt=(dt=l.getSamplesInfo(Ke)).lastSequenceNumber,Yt=Math.trunc(yt.start),sn=Math.trunc(yt.end);if(he[0]||he[1]||(function(){for(var gt,Dt=0;Dt<j.length;Dt++){if((gt=f.getTrackIdxForId(j[Dt].id))===-1)return void o.warn("CEA-608: data before track is ready.");var Vt=Ce(gt);he[Dt]=new(I()).Cea608Parser(Dt+1,{newCue:Vt},null)}})(),k){if((function(gt,Dt,Vt,Gt,Kt){return gt!==null&&Dt!==null&&Gt!==null&&Kt!==null&&(Dt===gt?Gt!==Kt:Dt!==gt+Vt)})(se,qt,dt.numSequences,ie,Yt))for(ht=0;ht<he.length;ht++)he[ht]&&he[ht].reset();for(var ln=(function(gt,Dt){if(Dt.length===0)return null;for(var Vt={splits:[],fields:[[],[]]},Gt=new DataView(gt),Kt=0;Kt<Dt.length;Kt++)for(var Zt=Dt[Kt],pt=I().findCea608Nalus(Gt,Zt.offset,Zt.size),Ot=null,Fe=0,st=0;st<pt.length;st++)for(var xe=I().extractCea608DataFromRange(Gt,pt[st]),Ge=0;Ge<2;Ge++)if(xe[Ge].length>0){Zt.cts!==Ot?Fe=0:Fe+=1;var lt=Me();Vt.fields[Ge].push([Zt.cts+lt*k,xe[Ge],Fe]),Ot=Zt.cts}return Vt.fields.forEach((function(ye){ye.sort((function(Te,We){return Te[0]===We[0]?Te[2]-We[2]:Te[0]-We[0]}))})),Vt})(Ke,dt.sampleList),ke=0;ke<he.length;ke++){var ut=ln.fields[ke],tt=he[ke];if(tt)for(ht=0;ht<ut.length;ht++)tt.addData(ut[ht][0]/k,ut[ht][1])}se=qt,ie=sn}}})(Ze,at):(function(Ke,yt,ht){var dt,qt,Yt=new DataView(Ke,0,Ke.byteLength);qt=Ni.Utils.dataViewToString(Yt,u.A.UTF8);try{dt=Qe(ht).parse(qt,0),f.addCaptions(f.getCurrentTrackIdx(),0,dt),e.buffered&&e.buffered.add(yt.start,yt.end)}catch(sn){te.error(new pe.A(me.TIMED_TEXT_ERROR_ID_PARSE_CODE,me.TIMED_TEXT_ERROR_MESSAGE_PARSE+sn.message,qt))}})(Ze,at,ct):o.error("No text type defined")}function Ce(Ze){return function(at,Nt,Ee){var Pe;(Pe=z.getTTMLRenderingDiv()?oe.createHTMLCaptionsFromScreen(z.getElement(),at,Nt,Ee):[{start:at,end:Nt,data:Ee.getDisplayText(),styles:{}}])&&f.addCaptions(Ze,0,Pe)}}function Me(){return isNaN(e.timestampOffset)?0:e.timestampOffset}function Qe(Ze){var at;return Ze.search(u.A.VTT)>=0?at=V.get().streaming.text.webvtt.customRenderingEnabled&&S?S:N:(Ze.search(u.A.TTML)>=0||Ze.search(u.A.STPP)>=0)&&(at=L),at}function $e(Ze){j.forEach((function(at){var Nt=f.getTrackIdxForId(at.id);Nt>=0&&f.deleteCuesFromTrackIdx(Nt,Ze.from,Ze.to)}))}return e={initialize:function(){P||(j=[],w=null,k=0,he=[],se=null,ie=null,P=!0,oe=Vu(de).getInstance(),ue.on(i.A.VIDEO_CHUNK_RECEIVED,ge,e),ue.on(i.A.BUFFER_CLEARED,$e,e))},addMediaInfos:function(Ze,at,Nt){if(C=C.concat(at),Ze===u.A.TEXT&&at[0].isFragmented&&!at[0].isEmbedded){b=Nt,e.buffered=(0,Hu.A)(de).create(),H=K.getTracksFor(u.A.TEXT,R.id).filter((function(Ke){return Ke.isFragmented}));for(var Ee=K.getCurrentTrackFor(u.A.TEXT,R.id),Pe=0;Pe<H.length;Pe++)if(H[Pe]===Ee){ve(Pe);break}}for(var ct=0;ct<at.length;ct++)Y(at[ct])},resetMediaInfos:function(){C=[]},getStreamId:function(){return R.id},append:fe,abort:function(){},addEmbeddedTrack:function(Ze){if(P&&Ze)if(Ze.id===u.A.CC1||Ze.id===u.A.CC3){for(var at=0;at<j.length;at++)if(j[at].id===Ze.id)return;j.push(Ze)}else o.warn("Embedded track "+Ze.id+" not supported!")},resetEmbedded:function(){ue.off(i.A.VIDEO_CHUNK_RECEIVED,ge,e),ue.off(i.A.BUFFER_CLEARED,$e,e),f&&f.deleteAllTextTracks(),P=!1,j=[],he=[null,null],se=null,ie=null},getConfig:function(){return{fragmentModel:b,fragmentedTracks:H,videoModel:z}},setCurrentFragmentedTrackIdx:ve,remove:function(Ze,at){Ze===void 0&&Ze===at&&(Ze=e.buffered.start(0),at=e.buffered.end(e.buffered.length-1)),e.buffered.remove(Ze,at),f.deleteCuesFromTrackIdx(w,Ze,at)},reset:function(){$(),C=[],l=null}},o=(0,g.A)(de).getInstance().getLogger(e),l=(0,Xr.A)(de).getInstance(),$(),e}Fo.__dashjs_factory_name="TextSourceBuffer";var Ku=h.A.getClassFactory(Fo),ha=M(6586);function xo(t,e){(e==null||e>t.length)&&(e=t.length);for(var o=0,l=Array(e);o<e;o++)l[o]=t[o];return l}var Wu=["text","align","fontSize","id","isd","line","lineAlign","lineHeight","linePadding","position","positionAlign","region","size","snapToLines","vertical"];function Uo(t){var e,o,l,p,C,b,F,U,H,B,w,j,k,se,ie,he,oe,te,Z,K,z=this.context,f=(0,y.A)(z).getInstance(),N=t.videoModel,S=t.streamInfo,L=t.settings;function R(ke,ut,tt,gt,Dt,Vt){var Gt=0,Kt=0;ke/ut>tt/gt?Gt=(Kt=ut)/gt*tt:Kt=(Gt=ke)/tt*gt;var Zt,pt,Ot=0,Fe=0;return Gt/Kt>Dt?(Fe=Kt,Ot=Kt*Dt):(Ot=Gt,Fe=Gt/Dt),Zt=(ke-Ot)/2,pt=(ut-Fe)/2,Vt?{x:Zt+.1*Ot,y:pt+.1*Fe,w:.8*Ot,h:.8*Fe}:{x:Zt,y:pt,w:Ot,h:Fe}}function V(ke,ut){var tt=N.getClientWidth(),gt=N.getClientHeight(),Dt=N.getVideoWidth(),Vt=N.getVideoHeight(),Gt=N.getVideoRelativeOffsetTop(),Kt=N.getVideoRelativeOffsetLeft();if(Dt!==0&&Vt!==0){var Zt=Dt/Vt,pt=!1;ke.isFromCEA608&&(Zt=1.1666666666666667,pt=!0);var Ot=R.call(this,tt,gt,Dt,Vt,Zt,pt),Fe=Ot.w,st=Ot.h,xe=Ot.x,Ge=Ot.y;if(Fe!=H||st!=B||xe!=F||Ge!=U||ut){if(F=xe+Kt,U=Ge+Gt,H=Fe,B=st,w){var lt=w.style;lt&&(lt.left=F+"px",lt.top=U+"px",lt.width=H+"px",lt.height=B+"px",lt.zIndex=se&&document[se]||ie?oe:null,f.trigger(r.A.CAPTION_CONTAINER_RESIZE))}var ye=ke.activeCues;if(ye)for(var Te=ye.length,We=0;We<Te;++We){var wt=ye[We];wt.scaleCue(wt)}}}}function de(ke){var ut,tt,gt,Dt,Vt,Gt=H,Kt=B;if(ke.cellResolution){var Zt=[Gt/ke.cellResolution[0],Kt/ke.cellResolution[1]];if(ke.linePadding){for(ut in ke.linePadding)if(ke.linePadding.hasOwnProperty(ut)){tt=(ke.linePadding[ut]*Zt[0]).toString();for(var pt=document.getElementsByClassName("spanPadding"),Ot=0;Ot<pt.length;Ot++)pt[Ot].style.cssText=pt[Ot].style.cssText.replace(/(padding-left\s*:\s*)[\d.,]+(?=\s*px)/gi,"$1"+tt),pt[Ot].style.cssText=pt[Ot].style.cssText.replace(/(padding-right\s*:\s*)[\d.,]+(?=\s*px)/gi,"$1"+tt)}}if(ke.fontSize){for(ut in ke.fontSize)if(ke.fontSize.hasOwnProperty(ut)){ke.fontSize[ut][0]==="%"?gt=ke.fontSize[ut][1]/100:ke.fontSize[ut][0]==="c"&&(gt=ke.fontSize[ut][1]),tt=(gt*Zt[1]).toString(),Vt=ut!=="defaultFontSize"?document.getElementsByClassName(ut):document.getElementsByClassName("paragraph");for(var Fe=0;Fe<Vt.length;Fe++)Vt[Fe].style.cssText=Vt[Fe].style.cssText.replace(/(font-size\s*:\s*)[\d.,]+(?=\s*px)/gi,"$1"+tt)}if(ke.lineHeight){for(ut in ke.lineHeight)if(ke.lineHeight.hasOwnProperty(ut)){ke.lineHeight[ut][0]==="%"?Dt=ke.lineHeight[ut][1]/100:ke.fontSize[ut][0]==="c"&&(Dt=ke.lineHeight[ut][1]),tt=(Dt*Zt[1]).toString(),Vt=document.getElementsByClassName(ut);for(var st=0;st<Vt.length;st++)Vt[st].style.cssText=Vt[st].style.cssText.replace(/(line-height\s*:\s*)[\d.,]+(?=\s*px)/gi,"$1"+tt)}}}}if(ke.isd){var xe=document.getElementById(ke.cueID);xe&&w.removeChild(xe),P(ke)}}function ue(ke,ut){var tt=/^(urn:)(mpeg:[a-z0-9][a-z0-9-]{0,31}:)(subs:)([0-9]+)$/,gt=/^#(.*)$/;if(tt.test(ut)){var Dt=tt.exec(ut),Vt=parseInt(Dt[4],10)-1;return"data:image/png;base64,"+btoa(ke.images[Vt])}if(gt.test(ut)){var Gt=gt.exec(ut)[1];return"data:image/png;base64,"+ke.embeddedImages[Gt]}return ut}function P(ke){if(w){ln.call(this);var ut=document.createElement("div");w.appendChild(ut),he=(0,ha.renderHTML)(ke.isd,ut,(function(tt){return ue(ke,tt)}),w.clientHeight,w.clientWidth,L.get().streaming.text.imsc.displayForcedOnlyMode,(function(tt){o.info("renderCaption :",tt)}),he,L.get().streaming.text.imsc.enableRollUp),ut.id=ke.cueID,f.trigger(r.A.CAPTION_RENDERED,{captionDiv:ut,currentTrackIdx:b})}}function $(ke,ut){return!!ut&&ut.endTime>=ke.startTime}function Y(ke,ut){return!!L.get().streaming.text.extendSegmentedCues&&!!(function(tt,gt,Dt){for(var Vt=0;Vt<Dt.length;Vt++){var Gt=Dt[Vt];if(JSON.stringify(tt[Gt])!==JSON.stringify(gt[Gt]))return!1}return!0})(ut,ke,Wu)&&(ut.endTime=Math.max(ut.endTime,ke.endTime),!0)}function ge(ke,ut){ut&&ut.forEach((function(tt){tt.kind&&tt.kind==="image"&&(tt.src=ue(ke,tt.src)),ge(ke,tt.contents)}))}function ve(ke,ut,tt){var gt=Pe(ke),Dt=L.get().streaming.text.dispatchForManualRendering;if(gt&&Array.isArray(tt)&&tt.length!==0)for(var Vt=0;Vt<tt.length;Vt++){var Gt=null,Kt=tt[Vt];gt.cellResolution=Kt.cellResolution,gt.isFromCEA608=Kt.isFromCEA608,isNaN(Kt.start)||isNaN(Kt.end)||(Dt?Gt=fe(Kt,ut):Ze(Kt)&&w?Gt=Qe(Kt,ut,gt):Kt.data&&(Gt=$e(Kt,ut,gt)));try{if(Gt){if(!yt(gt,Gt))if(L.get().streaming.text.webvtt.customRenderingEnabled)gt.manualCueList||(gt.manualCueList=[]),gt.manualCueList.push(Gt);else{var Zt=void 0;gt.cues&&gt.cues.length!==0&&(Zt=gt.cues[gt.cues.length-1]),$(Gt,Zt)?Y(Gt,Zt)||(Zt.isd&&(Zt.onexit=function(){}),gt.mode!==u.A.TEXT_DISABLED&&gt.addCue(Gt)):gt.mode!==u.A.TEXT_DISABLED&&gt.addCue(Gt)}var pt=L.get().streaming.buffer.bufferToKeep;dt(gt,0,N.getTime()-pt)}else o.error("Impossible to display subtitles. You might have missed setting a TTML rendering div via player.attachTTMLRenderingDiv(TTMLRenderingDiv)")}catch(Ot){throw qt(gt),gt.addCue(Gt),Ot}}}function fe(ke,ut){var tt=at(ke,ut);return tt.onenter=function(){Ze(ke)&&K&&K.cueID!==tt.cueID&&Me(K),delete tt.type,K=tt,Ce(tt)},tt.onexit=function(){Me(tt),K=null},tt}function Ce(ke){f.trigger(r.A.CUE_ENTER,ke)}function Me(ke){f.trigger(r.A.CUE_EXIT,{cueID:ke.cueID})}function Qe(ke,ut,tt){var gt=this,Dt=at(ke,ut);return w.style.left=F+"px",w.style.top=U+"px",w.style.width=H+"px",w.style.height=B+"px",Dt.onenter=function(){var Vt=this;tt.mode===u.A.TEXT_SHOWING&&(this.isd?(Z?requestAnimationFrame((function(){return P(Vt)})):P(this),o.debug("Cue enter id:"+this.cueID)):(w.appendChild(this.cueHTMLElement),de.call(gt,this),f.trigger(r.A.CAPTION_RENDERED,{captionDiv:this.cueHTMLElement,currentTrackIdx:b})))},Dt.onexit=function(){if(w)for(var Vt=w.childNodes,Gt=0;Gt<Vt.length;++Gt)Vt[Gt].id===this.cueID&&(o.debug("Cue exit id:"+Vt[Gt].id),w.removeChild(Vt[Gt]),--Gt)},Dt}function $e(ke,ut,tt){var gt=at(ke,ut);if(gt.isActive=!1,ke.styles)try{ke.styles.align!==void 0&&"align"in gt&&(gt.align=ke.styles.align),ke.styles.line!==void 0&&"line"in gt&&(gt.line=ke.styles.line),ke.styles.snapToLines!==void 0&&"snapToLines"in gt&&(gt.snapToLines=ke.styles.snapToLines),ke.styles.position!==void 0&&"position"in gt&&(gt.position=ke.styles.position),ke.styles.size!==void 0&&"size"in gt&&(gt.size=ke.styles.size)}catch(Dt){o.error(Dt)}return gt.onenter=function(){tt.mode===u.A.TEXT_SHOWING&&f.trigger(r.A.CAPTION_RENDERED,{currentTrackIdx:b})},gt}function Ze(ke){return ke.type==="html"}function at(ke,ut){return Ze(ke)?(function(tt,gt){var Dt=new l(tt.start+gt,tt.end+gt,"");return Dt.cueHTMLElement=tt.cueHTMLElement,Dt.isd=tt.isd,Dt.images=tt.images,Dt.embeddedImages=tt.embeddedImages,Dt.cueID=tt.cueID,Dt.scaleCue=de.bind(self),Dt.cellResolution=tt.cellResolution,Dt.lineHeight=tt.lineHeight,Dt.linePadding=tt.linePadding,Dt.fontSize=tt.fontSize,Dt.isd&&ge(Dt,Dt.isd.contents),Dt})(ke,ut):(function(tt,gt){var Dt=new l(tt.start-gt,tt.end-gt,tt.data);return Dt.cueID="".concat(Dt.startTime,"_").concat(Dt.endTime),Dt})(ke,ut)}function Nt(ke){if(j)for(var ut=j.childNodes,tt=0;tt<ut.length;++tt)ut[tt].id===ke.cueID&&(j.removeChild(ut[tt]),--tt)}function Ee(){var ke,ut=[],tt=(function(Dt,Vt){var Gt=typeof Symbol<"u"&&Dt[Symbol.iterator]||Dt["@@iterator"];if(!Gt){if(Array.isArray(Dt)||(Gt=(function(st,xe){if(st){if(typeof st=="string")return xo(st,xe);var Ge={}.toString.call(st).slice(8,-1);return Ge==="Object"&&st.constructor&&(Ge=st.constructor.name),Ge==="Map"||Ge==="Set"?Array.from(st):Ge==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Ge)?xo(st,xe):void 0}})(Dt))||Vt){Gt&&(Dt=Gt);var Kt=0,Zt=function(){};return{s:Zt,n:function(){return Kt>=Dt.length?{done:!0}:{done:!1,value:Dt[Kt++]}},e:function(st){throw st},f:Zt}}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 pt,Ot=!0,Fe=!1;return{s:function(){Gt=Gt.call(Dt)},n:function(){var st=Gt.next();return Ot=st.done,st},e:function(st){Fe=!0,pt=st},f:function(){try{Ot||Gt.return==null||Gt.return()}finally{if(Fe)throw pt}}}})(N.getTextTracks());try{for(tt.s();!(ke=tt.n()).done;){var gt=ke.value;gt.manualMode===u.A.TEXT_SHOWING&&ut.push(gt)}}catch(Dt){tt.e(Dt)}finally{tt.f()}return ut}function Pe(ke){return ke>=0&&p[ke]?N.getTextTrack(p[ke].kind,p[ke].id,p[ke].lang,p[ke].isTTML,p[ke].isEmbedded):null}function ct(ke){var ut=this;if(ke!==b){var tt=Pe(b=ke);Ke.call(this,tt),k&&(clearInterval(k),k=null),tt&&tt.renderingType==="html"&&(V.call(this,tt,!0),window.ResizeObserver?(te=new window.ResizeObserver((function(){V.call(ut,tt,!0)}))).observe(N.getElement()):k=setInterval(V.bind(this,tt),500))}}function Ke(ke){ln.call(this),ke&&ke.renderingType==="html"?Yt.call(this):sn.call(this)}function yt(ke,ut){if(!ke.cues)return!1;for(var tt=0;tt<ke.cues.length;tt++)if(ke.cues[tt].startTime===ut.startTime&&ke.cues[tt].endTime===ut.endTime)return!0;return!1}function ht(ke,ut,tt){var gt=!(arguments.length>3&&arguments[3]!==void 0)||arguments[3];return!!ke&&(isNaN(ut)||(gt?ke.startTime:ke.endTime)>=ut)&&(isNaN(tt)||(gt?ke.endTime:ke.startTime)<=tt)}function dt(ke,ut,tt){var gt,Dt;if(!(tt<ut)&&ke&&(ke.cues||ke.manualCueList)){var Vt=ke.cues&&ke.cues.length>0?"native":"custom",Gt=Vt==="native"?ke.cues:ke.manualCueList;if(!Gt||Gt.length===0)return;for(var Kt=Gt.length-1;Kt>=0;Kt--)!ht(Gt[Kt],ut,tt,!0)||(gt=Gt[Kt],Dt=N.getTime(),gt.startTime>=Dt&&gt.endTime<=Dt)||(Vt==="native"?ke.removeCue(Gt[Kt]):(Nt(Gt[Kt]),delete ke.manualCueList[Kt]))}}function qt(ke,ut,tt){var gt=!(arguments.length>3&&arguments[3]!==void 0)||arguments[3];if(ke&&(ke.cues||ke.manualCueList)){var Dt=ke.cues&&ke.cues.length>0?"native":"custom",Vt=Dt==="native"?ke.cues:ke.manualCueList;if(!Vt||Vt.length===0)return;for(var Gt=Vt.length-1;Gt>=0;Gt--)ht(Vt[Gt],ut,tt,gt)&&(Dt==="native"?(Vt[Gt].onexit&&Vt[Gt].onexit(),ke.removeCue(Vt[Gt])):(Nt(Vt[Gt]),delete ke.manualCueList[Gt]))}}function Yt(){var ke=document.getElementById("native-cue-style");if(!ke){(ke=document.createElement("style")).id="native-cue-style",document.head.appendChild(ke);var ut=ke.sheet,tt=N.getElement();try{tt&&(tt.id?ut.insertRule("#"+tt.id+"::cue {background: transparent}",0):tt.classList.length!==0?ut.insertRule("."+tt.className+"::cue {background: transparent}",0):ut.insertRule("video::cue {background: transparent}",0))}catch(gt){o.info(""+gt.message)}}}function sn(){var ke=document.getElementById("native-cue-style");ke&&document.head.removeChild(ke)}function ln(){if(w)for(;w.firstChild;)w.removeChild(w.firstChild)}return e={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,ie=!1,oe=2147483647,he=null,Z="requestAnimationFrame"in window,document.fullscreenElement!==void 0?se="fullscreenElement":document.webkitIsFullScreen!==void 0?se="webkitIsFullScreen":document.msFullscreenElement?se="msFullscreenElement":document.mozFullScreen&&(se="mozFullScreen"))},getStreamId:function(){return S.id},addTextTrack:function(ke){p.push(ke)},addCaptions:ve,createTracks:function(){var ke=L.get().streaming.text.dispatchForManualRendering;p.sort((function(Ge,lt){return Ge.index-lt.index})),w=N.getTTMLRenderingDiv(),j=N.getVttRenderingDiv();for(var ut,tt,gt,Dt,Vt,Gt,Kt=-1,Zt=0;Zt<p.length;Zt++){var pt=(tt=(ut=p[Zt]).kind,gt=ut.id!==void 0?ut.id:ut.lang,Dt=ut.lang,Vt=ut.isTTML,Gt=ut.isEmbedded,N.addTextTrack(tt,gt,Dt,Vt,Gt));C.push(pt),p[Zt].defaultTrack&&(pt.default=!0,Kt=Zt);var Ot=Pe(Zt);Ot&&(Ot.mode=u.A.TEXT_SHOWING,w&&(p[Zt].isTTML||p[Zt].isEmbedded)?Ot.renderingType="html":Ot.renderingType="default"),ve(Zt,0,p[Zt].captionData),f.trigger(r.A.TEXT_TRACK_ADDED)}if(ct.call(this,Kt),Kt>=0){var Fe=function(){var Ge=Pe(Kt);Ge&&Ge.renderingType==="html"&&V.call(this,Ge,!0),f.off(r.A.PLAYBACK_METADATA_LOADED,Fe,this)};f.on(r.A.PLAYBACK_METADATA_LOADED,Fe,this);for(var st=0;st<p.length;st++){var xe=Pe(st);xe&&(xe.mode=st!==Kt||ke?u.A.TEXT_HIDDEN:u.A.TEXT_SHOWING,xe.manualMode=st===Kt?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:ct,getTrackIdxForId:function(ke){for(var ut=-1,tt=0;tt<p.length;tt++)if(p[tt].id===ke){ut=tt;break}return ut},getCurrentTrackInfo:function(){return p[b]},setModeForTrackIdx:function(ke,ut){var tt=Pe(ke);tt&&tt.mode!==ut&&(tt.mode=ut),tt&&tt.manualMode!==ut&&(tt.manualMode=ut)},deleteCuesFromTrackIdx:function(ke,ut,tt){var gt=Pe(ke);gt&&qt(gt,ut,tt)},deleteAllTextTracks:function(){for(var ke=C?C.length:0,ut=0;ut<ke;ut++){var tt=Pe(ut);tt&&qt.call(this,tt,S.start,S.start+S.duration,!1)}C=[],p=[],k&&(clearInterval(k),k=null),te&&N&&(te.unobserve(N.getElement()),te=null),b=-1,ln.call(this)},manualCueProcessing:function(ke){var ut=Ee();if(ut&&ut.length>0){var tt=ut[0].manualCueList;tt&&tt.length>0&&tt.forEach((function(gt){gt.startTime<=ke&&gt.endTime>=ke&&!gt.isActive?(gt.isActive=!0,L.get().streaming.text.dispatchForManualRendering?Ce(gt):WebVTT.processCues(window,[gt],j,gt.cueID)):gt.isActive&&(gt.startTime>ke||gt.endTime<ke)&&(gt.isActive=!1,L.get().streaming.text.dispatchForManualRendering?Me(gt):Nt(gt))}))}},disableManualTracks:function(){var ke=Ee();if(ke&&ke.length>0){var ut=ke[0].manualCueList;ut&&ut.length>0&&ut.forEach((function(tt){if(tt.isActive){if(tt.isActive=!1,L.get().streaming.text.dispatchForManualRendering)Me(tt);else if(j)for(var gt=j.childNodes,Dt=0;Dt<gt.length;++Dt)gt[Dt].id===tt.cueID&&(j.removeChild(gt[Dt]),--Dt)}}))}}},o=(0,g.A)(z).getInstance().getLogger(e),e}Uo.__dashjs_factory_name="TextTracks";var zu=h.A.getClassFactory(Uo);function Bo(){var t,e,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 se=k.split(/:/)[1],ie=!1;se&&se.search(/%/)!=-1&&(ie=!0,se=parseInt(se.replace(/%/,""),10)),(k.match(/align/)||k.match(/A/))&&(j.align=se),(k.match(/line/)||k.match(/L/))&&(j.line=se==="auto"?se:parseInt(se,10),ie&&(j.snapToLines=!1)),(k.match(/position/)||k.match(/P/))&&(j.position=se),(k.match(/size/)||k.match(/S/))&&(j.size=se)}})),j}function B(w,j){for(var k,se=j,ie="",he="";w[se]!==""&&se<w.length;)se++;if((k=se-j)>1)for(var oe=0;oe<k;oe++){if((he=w[j+oe]).match(l)){ie="";break}ie+=he,oe!==k-1&&(ie+=`
17
- `)}else(he=w[j]).match(l)||(ie=he);return ie}return t={parse:function(w){var j,k,se=[];if(!w)return se;j=(w=w.split(o)).length,k=-1;for(var ie=0;ie<j;ie++){var he=w[ie];if(he.length>0&&he!=="WEBVTT"&&he.match(l)){var oe=U(he),te=oe.cuePoints,Z=oe.styles,K=B(w,ie+1),z=F(te[0].replace(p,"")),f=F(te[1].replace(p,""));!isNaN(z)&&!isNaN(f)&&z>=k&&f>z?K!==""?(k=z,se.push({start:z,end:f,data:K,styles:Z})):e.error("Skipping cue due to empty/malformed cue text"):e.error("Skipping cue due to incorrect cue timing")}}return se},getCaptionStyles:H},e=(0,g.A)(b).getInstance().getLogger(t),o=/(?:\r\n|\r|\n)/gm,l=/-->/,p=/(^[\s]+|[\s]+$)/g,C=/\s\b/g,t}Bo.__dashjs_factory_name="VTTParser";var Xu=h.A.getSingletonFactory(Bo);function ko(){var t,e;return t={parse:function(o){var l=[];return e.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)},e.parse(o),l}},(function(){try{window&&window.WebVTT&&window.WebVTT.Parser&&(e=new window.WebVTT.Parser(window,window.vttjs,window.WebVTT.StringDecoder()))}catch{}})(),t}ko.__dashjs_factory_name="VttCustomRenderingParser";var Qu=h.A.getSingletonFactory(ko);function Go(){var t,e,o=this.context,l=(0,y.A)(o).getInstance(),p=0;return t={parse:function(C,b,F,U,H){var B,w,j,k="",se=[],ie={},he={},oe="",te="",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 e.warn("smpte-tt imageType != PNG. Discarded");oe=R["http://www.w3.org/XML/1998/namespace id"].value}},onCloseTag:function(){oe&&(he[oe]=te.trim()),te="",oe=""},onText:function(S){oe&&(te+=S)}};if(!C)throw k="no ttml data to parse",new Error(k);ie.data=C,l.trigger(i.A.TTML_TO_PARSE,ie);var K=(0,ha.fromXML)(ie.data,(function(S){k=S}),Z);l.trigger(i.A.TTML_PARSED,{ttmlString:ie.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)&&se.push({start:B,end:w,type:"html",cueID:(z="cue_TTML_"+p,p++,z),isd:N,images:H,embeddedImages:he})}if(k!=="")throw e.error(k),new Error(k);return se}},e=(0,g.A)(o).getInstance().getLogger(t),t}Go.__dashjs_factory_name="TTMLParser";var $u=h.A.getSingletonFactory(Go);function oi(t){return oi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},oi(t)}function jo(t,e){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(t);e&&(l=l.filter((function(p){return Object.getOwnPropertyDescriptor(t,p).enumerable}))),o.push.apply(o,l)}return o}function qo(t){for(var e=1;e<arguments.length;e++){var o=arguments[e]!=null?arguments[e]:{};e%2?jo(Object(o),!0).forEach((function(l){Ju(t,l,o[l])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):jo(Object(o)).forEach((function(l){Object.defineProperty(t,l,Object.getOwnPropertyDescriptor(o,l))}))}return t}function Ju(t,e,o){return(e=(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+""})(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}function Yo(t,e){(e==null||e>t.length)&&(e=t.length);for(var o=0,l=Array(e);o<e;o++)l[o]=t[o];return l}function Ho(t){var e,o,l,p=this.context,C=(0,y.A)(p).getInstance(),b=(0,Ae.A)(p).getInstance(),F=t.adapter,U=t.baseURLController,H="error",B="loaded",w="unloaded";function j(ie,he){var oe,te,Z=!1;if(U.resolve()){var K=F.getVoRepresentations(ie);K&&K.length>0&&(oe=U.resolve(K[0].path).url)}var z=ie.essentialPropertiesAsArray.filter((function(N){return N.schemeIdUri&&N.schemeIdUri===u.A.FONT_DOWNLOAD_DVB_SCHEME})),f=ie.supplementalPropertiesAsArray.filter((function(N){return N.schemeIdUri&&N.schemeIdUri===u.A.FONT_DOWNLOAD_DVB_SCHEME}));z.length>0?(Z=!0,te=z):te=f,te.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=oe,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:ie.id,streamId:he,isEssential:Z,status:w,fontFace:new FontFace(N.dvbFontFamily,"url(".concat(S,")"),{display:"swap"})})}var L,R}))}function k(ie,he){var oe=l[ie];l[ie]=qo(qo({},oe),{},{status:he})}function se(){l=[]}return e={addFontsFromTracks:function(ie,he){if(ie&&Array.isArray(ie)&&he)for(var oe=0;oe<ie.length;oe++)j(ie[oe],he)},downloadFonts:function(){for(var ie=function(oe){var te=l[oe];document.fonts.add(te.fontFace),C.trigger(r.A.DVB_FONT_DOWNLOAD_ADDED,te),te.fontFace.load().then((function(){k(oe,B),C.trigger(r.A.DVB_FONT_DOWNLOAD_COMPLETE,te)}),(function(Z){k(oe,H),o.debug("Font download error: ",Z),C.trigger(r.A.DVB_FONT_DOWNLOAD_FAILED,te)}))},he=0;he<l.length;he++)ie(he)},getFonts:function(){return l},getFontsForTrackId:function(ie){return l.filter((function(he){return he.trackId&&he.trackId===ie}))},reset:function(){(function(){var ie,he=(function(Z,K){var z=typeof Symbol<"u"&&Z[Symbol.iterator]||Z["@@iterator"];if(!z){if(Array.isArray(Z)||(z=(function(V,de){if(V){if(typeof V=="string")return Yo(V,de);var ue={}.toString.call(V).slice(8,-1);return ue==="Object"&&V.constructor&&(ue=V.constructor.name),ue==="Map"||ue==="Set"?Array.from(V):ue==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(ue)?Yo(V,de):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(he.s();!(ie=he.n()).done;){var oe=ie.value,te=document.fonts.delete(oe.fontFace);o.debug("Removal of fontFamily: ".concat(oe.fontFamily," was ").concat(te?"successful":"unsuccessful"))}}catch(Z){he.e(Z)}finally{he.f()}})(),se()}},o=(0,g.A)(p).getInstance().getLogger(e),se(),e}Ho.__dashjs_factory_name="DVBFonts";var Zu=h.A.getClassFactory(Ho);function Vo(t){var e,o,l,p,C,b,F,U,H,B,w,j,k,se,ie=this.context,he=t.adapter,oe=t.errHandler,te=t.manifestModel,Z=t.mediaController,K=t.baseURLController,z=t.videoModel,f=t.settings;function N(Y){if(se.error("Could not download ".concat(Y.isEssential?"an essential":"a"," font - fontFamily: ").concat(Y.fontFamily,", url: ").concat(Y.url)),Y.isEssential){var ge=p[Y.streamId].getTrackIdxForId(Y.trackId);p[Y.streamId].setModeForTrackIdx(ge,u.A.TEXT_DISABLED)}}function S(Y){if(se.debug("Successfully downloaded ".concat(Y.isEssential?"an essential":"a"," font - fontFamily: ").concat(Y.fontFamily,", url: ").concat(Y.url)),Y.isEssential){var ge=p[Y.streamId].getTrackIdxForId(Y.trackId);ge===p[Y.streamId].getCurrentTrackIdx()?p[Y.streamId].setModeForTrackIdx(ge,u.A.TEXT_SHOWING):p[Y.streamId].setModeForTrackIdx(ge,u.A.TEXT_HIDDEN)}}function L(Y){var ge=Y.tracks,ve=Y.index,fe=Y.streamId;if(f.get().streaming.text.defaultEnabled===!1&&!de()||j)ue(fe,-1);else{var Ce=Z.getCurrentTrackFor(u.A.TEXT,fe);if(Ce){var Me={lang:Ce.lang,role:Ce.roles[0],index:Ce.index,codec:Ce.codec,accessibility:Ce.accessibility[0]};ge.some((function(Qe,$e){if(Z.matchSettings(Me,Qe))return ue(fe,$e),ve=$e,!0}))}H=!1}o[fe].lastEnabledIndex=ve,U.trigger(r.A.TEXT_TRACKS_ADDED,{enabled:de(),index:ve,tracks:ge,streamId:fe}),w=!0,k.addFontsFromTracks(ge,fe),k.getFonts().forEach((function(Qe){if(Qe.isEssential){var $e=p[Qe.streamId].getTrackIdxForId(Qe.trackId);p[Qe.streamId].setModeForTrackIdx($e,u.A.TEXT_DISABLED)}})),k.downloadFonts()}function R(Y){try{var ge=Y.streamId;if(!p[ge]||isNaN(Y.time))return;p[ge].manualCueProcessing(Y.time)}catch{}}function V(Y){try{var ge=Y.streamId;if(!p[ge])return;p[ge].disableManualTracks()}catch{}}function de(){var Y=!0;return H&&!B&&(Y=!1),Y}function ue(Y,ge){(H=ge===-1)&&Z&&Z.saveTextSettingsDisabled();var ve=P(Y);if(ve!==ge&&p[Y]){p[Y].disableManualTracks();var fe=p[Y].getCurrentTrackInfo(),Ce=fe?z.getTextTrack(fe.kind,fe.id,fe.lang,fe.isTTML,fe.isEmbedded):null;Ce&&Ce.mode!==u.A.TEXT_DISABLED&&p[Y].setModeForTrackIdx(ve,u.A.TEXT_HIDDEN),p[Y].setCurrentTrackIdx(ge),fe=p[Y].getCurrentTrackInfo();var Me=f.get().streaming.text.dispatchForManualRendering;fe&&!Me&&fe.mode!==u.A.TEXT_DISABLED&&p[Y].setModeForTrackIdx(ge,u.A.TEXT_SHOWING),fe&&fe.isFragmented&&!fe.isEmbedded?(function(Qe,$e,Ze){if(l[Qe])for(var at=l[Qe].getConfig().fragmentedTracks,Nt=0;Nt<at.length;Nt++){var Ee=at[Nt];if($e.lang===Ee.lang&&(Ee.id?$e.id===Ee.id:$e.index===Ee.index)){var Pe=Z.getCurrentTrackFor(u.A.TEXT,Qe);(Ee.id?Pe.id!==Ee.id:Pe.index!==Ee.index)?(p[Qe].deleteCuesFromTrackIdx(Ze),l[Qe].setCurrentFragmentedTrackIdx(Nt)):Ze===-1&&U.trigger(i.A.SET_FRAGMENTED_TEXT_AFTER_DISABLED,{},{streamId:Qe,mediaType:u.A.TEXT})}}})(Y,fe,ve):fe&&!fe.isFragmented&&(function(Qe,$e){U.trigger(i.A.SET_NON_FRAGMENTED_TEXT,{currentTrackInfo:$e},{streamId:Qe,mediaType:u.A.TEXT})})(Y,fe),Z.setTrack(fe)}}function P(Y){return p[Y].getCurrentTrackIdx()}function $(){l={},p={},o={},H=!0,w=!1,j=!1}return e={deactivateStream:function(Y){if(Y){var ge=Y.id;l[ge]&&l[ge].resetMediaInfos(),p[ge]&&p[ge].deleteAllTextTracks()}},initialize:function(){k=Zu(ie).create({adapter:he,baseURLController:K}),U.on(i.A.TEXT_TRACKS_QUEUE_INITIALIZED,L,e),U.on(i.A.DVB_FONT_DOWNLOAD_FAILED,N,e),U.on(i.A.DVB_FONT_DOWNLOAD_COMPLETE,S,e),f.get().streaming.text.webvtt.customRenderingEnabled&&(U.on(i.A.PLAYBACK_TIME_UPDATED,R,e),U.on(i.A.PLAYBACK_SEEKING,V,e))},initializeForStream:function(Y){var ge=Y.id,ve=zu(ie).create({videoModel:z,settings:f,streamInfo:Y});ve.initialize(),p[ge]=ve;var fe=Ku(ie).create({errHandler:oe,adapter:he,dvbFonts:k,manifestModel:te,mediaController:Z,videoModel:z,textTracks:ve,vttParser:C,vttCustomRenderingParser:b,ttmlParser:F,streamInfo:Y,settings:f});fe.initialize(),l[ge]=fe,o[ge]={},o[ge].lastEnabledIndex=-1},createTracks:function(Y){var ge=Y.id;p[ge]&&p[ge].createTracks()},getTextSourceBuffer:function(Y){var ge=Y.id;if(l&&l[ge])return l[ge]},getAllTracksAreDisabled:function(){return H},addEmbeddedTrack:function(Y,ge){var ve=Y.id;l[ve]&&l[ve].addEmbeddedTrack(ge)},enableText:function(Y,ge){return(0,D.sq)(ge,"boolean"),de()!==ge&&(ge&&ue(Y,o[Y].lastEnabledIndex),ge||(o[Y].lastEnabledIndex=P(Y),w?ue(Y,-1):j=!0)),!0},isTextEnabled:de,setTextTrack:ue,getCurrentTrackIdx:P,enableForcedTextStreaming:function(Y){return(0,D.sq)(Y,"boolean"),B=Y,!0},addMediaInfosToBuffer:function(Y,ge,ve){var fe=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null,Ce=Y.id;l[Ce]&&l[Ce].addMediaInfos(ge,ve,fe)},reset:function(){k.reset(),$(),U.off(i.A.TEXT_TRACKS_QUEUE_INITIALIZED,L,e),U.off(i.A.DVB_FONT_DOWNLOAD_FAILED,N,e),U.off(i.A.DVB_FONT_DOWNLOAD_COMPLETE,S,e),f.get().streaming.text.webvtt.customRenderingEnabled&&(U.off(i.A.PLAYBACK_TIME_UPDATED,R,e),U.off(i.A.PLAYBACK_SEEKING,V,e)),Object.keys(l).forEach((function(Y){l[Y].resetEmbedded(),l[Y].reset()}))}},B=!1,w=!1,j=!1,C=Xu(ie).getInstance(),b=Qu(ie).getInstance(),F=$u(ie).getInstance(),U=(0,y.A)(ie).getInstance(),se=(0,g.A)(ie).getInstance().getLogger(e),$(),e}Vo.__dashjs_factory_name="TextController";var el=h.A.getClassFactory(Vo);function ga(){var t,e,o,l,p,C,b,F,U,H,B,w,j,k,se,ie,he,oe,te,Z,K,z,f,N,S,L,R,V,de,ue,P,$,Y,ge,ve,fe,Ce,Me,Qe,$e="You must first call initialize() and set a source before calling this method",Ze="You must first call initialize() and set a valid source and view before calling this method",at="You must first call attachView() to set the video element before calling this method",Nt="You must first call attachSource() with a valid source before calling this method",Ee="MediaPlayer not initialized!",Pe=this.context,ct=(0,y.A)(Pe).getInstance(),Ke=(0,le.A)(Pe).getInstance(),yt=(0,g.A)(Pe).getInstance({settings:Ke});function ht(){Zt(null),Gt(null),l=null,k&&(k.reset(),k=null),se&&(se.reset(),se=null),Z&&Z.reset(),Ke.reset(),he&&(he.reset(),he=null)}function dt(){return!!o&&!!fe.getElement()}function qt(){return(0,eu.i)()}function Yt(){if(!b)throw Ze;return V.isPaused()}function sn(){if(!b)throw Ze;return V.getIsDynamic()}function ln(ye){var Te=S&&S.hasVideoTrack()?u.A.VIDEO:u.A.AUDIO,We=$.getCurrentDVRInfo(Te);if(!We)return 0;var wt=V.getOriginalLiveDelay(),jt=We.range.start+ye;return jt>We.range.end-wt&&(jt=We.range.end-wt),jt}function ke(ye){if(!b)throw Ze;var Te=Vt().currentTime;if(ye!==void 0)Te=S.getTimeRelativeToStreamId(Te,ye);else if(V.getIsDynamic()){var We=S&&S.hasVideoTrack()?u.A.VIDEO:u.A.AUDIO,wt=$.getCurrentDVRInfo(We);Te=wt===null||Te===0?0:Math.max(0,Te-wt.range.start)}return Te}function ut(){if(!b)throw Ze;var ye=Vt().duration;if(V.getIsDynamic()){var Te=S&&S.hasVideoTrack()?u.A.VIDEO:u.A.AUDIO,We=$.getCurrentDVRInfo(Te);ye=We?We.range.end-We.range.start:0}return ye}function tt(ye){(0,D.sq)(ye,"boolean"),F=ye}function gt(){Z.restoreDefaultUTCTimingSources()}function Dt(){return $}function Vt(){if(!fe.getElement())throw at;return fe.getElement()}function Gt(ye){if(!p)throw Ee;fe.setElement(ye),ye&&(st(),(function(){if(!se){var Te=dashjs.MetricsReporting;if(typeof Te=="function"){var We=Te(Pe).create();se=We.createMetricsReporting({debug:yt,eventBus:ct,mediaElement:Vt(),adapter:oe,dashMetrics:$,mediaPlayerModel:te,events:i.A,constants:u.A,metricsConstants:_.A})}}})(),(function(){if(!ie){var Te=dashjs.MssHandler;typeof Te=="function"&&(me.extend(Te.errors),ie=Te(Pe).create({eventBus:ct,mediaPlayerModel:te,dashMetrics:$,manifestModel:Y,playbackController:V,streamController:S,protectionController:k,baseURLController:z,errHandler:K,events:i.A,constants:u.A,debug:yt,initSegmentType:je.G.INIT_SEGMENT_TYPE,BASE64:fa,ISOBoxer:Ni,settings:Ke}))}})(),S&&S.switchToVideoElement(U)),b&&Ot(),lt(U)}function Kt(ye){if(!C)throw $e;var Te=S.getActiveStreamInfo();return Te?j.getTracksFor(ye,Te.id):[]}function Zt(ye){var Te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:NaN;if(!p)throw Ee;typeof ye=="string"&&Ce.initialize(ye),Te==null&&(Te=NaN),isNaN(Te)||(Te=Math.max(0,Te)),U=Te,o=ye,(C||b)&&Ot(),dt()&&lt(U)}function pt(){if(!C)throw $e;var ye=S.getActiveStreamInfo();return ye?S.getStreamById(ye.id):null}function Ot(){b=!1,C=!1,oe.reset(),S.reset(),R.reset(),P.reset(),V.reset(),de.reset(),ue.reset(),H.reset(),j.reset(),Qe.reset(),k&&(Ke.get().streaming.protection.keepProtectionMediaKeys?k.stop():(k.reset(),k=null,st())),L.reset(),ge.reset(),ve.reset()}function Fe(){return Us(Pe).create({debug:yt,errHandler:K,dashMetrics:$,mediaPlayerModel:te,requestModifier:(0,De.A)(Pe).getInstance(),mssHandler:ie,settings:Ke})}function st(){if(k)return k;var ye=dashjs.Protection;if(typeof ye=="function"){var Te=ye(Pe).create();return i.A.extend(ye.events),r.A.extend(ye.events,{publicOnly:!0}),me.extend(ye.errors),f||(f=(0,ro.A)(Pe).getInstance()),k=Te.createProtectionSystem({debug:yt,errHandler:K,videoModel:fe,customParametersModel:Z,capabilities:f,eventBus:ct,events:i.A,BASE64:fa,constants:u.A,cmcdModel:ge,settings:Ke})}return null}function xe(){if(!p)throw Ee;if(he)return he;var ye=dashjs.OfflineController;if(typeof ye=="function"){i.A.extend(ye.events),r.A.extend(ye.events,{publicOnly:!0}),me.extend(ye.errors);var Te=Fe(),We=Ta(Pe).create();return We.setConfig({manifestModel:Y,adapter:oe,manifestLoader:Te,errHandler:K,contentSteeringController:ue}),he=ye(Pe).create({debug:yt,manifestUpdater:We,baseURLController:z,manifestLoader:Te,manifestModel:Y,mediaPlayerModel:te,abrController:H,playbackController:V,adapter:oe,errHandler:K,dashMetrics:$,timelineConverter:w,segmentBaseController:Qe,schemeLoaderFactory:B,eventBus:ct,events:i.A,errors:me,constants:u.A,settings:Ke,dashConstants:n.A,urlUtils:(0,Ae.A)(Pe).getInstance()})}return null}function Ge(ye){var Te=S&&S.hasVideoTrack()?u.A.VIDEO:u.A.AUDIO,We=$.getCurrentDVRInfo(Te);return We?ye+(We.manifestInfo.availableFrom.getTime()/1e3+We.range.start):0}function lt(){var ye,Te=arguments.length>0&&arguments[0]!==void 0?arguments[0]:NaN;he&&he.resetRecords(),!C&&o&&(C=!0,e.info("Streaming Initialized"),ye=Fe(),S||(S=Ra(Pe).getInstance()),L||(L=el(Pe).create({errHandler:K,manifestModel:Y,adapter:oe,mediaController:j,baseURLController:z,videoModel:fe,settings:Ke})),N.setConfig({capabilities:f,customParametersModel:Z,adapter:oe,settings:Ke,manifestModel:Y,errHandler:K}),S.setConfig({capabilities:f,capabilitiesFilter:N,manifestLoader:ye,manifestModel:Y,mediaPlayerModel:te,customParametersModel:Z,protectionController:k,textController:L,adapter:oe,dashMetrics:$,errHandler:K,timelineConverter:w,videoModel:fe,playbackController:V,serviceDescriptionController:de,contentSteeringController:ue,abrController:H,mediaController:j,settings:Ke,baseURLController:z,uriFragmentModel:Ce,segmentBaseController:Qe}),R.setConfig({settings:Ke,playbackController:V,streamController:S,videoModel:fe,timelineConverter:w,adapter:oe}),V.setConfig({streamController:S,serviceDescriptionController:de,dashMetrics:$,adapter:oe,videoModel:fe,timelineConverter:w,settings:Ke}),P.setConfig({streamController:S,playbackController:V,mediaPlayerModel:te,videoModel:fe,settings:Ke}),H.setConfig({streamController:S,domStorage:Me,mediaPlayerModel:te,customParametersModel:Z,cmsdModel:ve,dashMetrics:$,adapter:oe,videoModel:fe,settings:Ke}),ge.setConfig({abrController:H,dashMetrics:$,playbackController:V}),ve.setConfig({}),H.initialize(),S.initialize(F,l),L.initialize(),R.initialize(),P.initialize(),ge.initialize(),ve.initialize(),ue.initialize(),Qe.initialize(),typeof o=="string"?S.load(o,Te):S.loadWithManifest(o,Te)),!b&&dt()&&(b=!0,e.info("Playback Initialized"))}return t={initialize:function(ye,Te,We){var wt=arguments.length>3&&arguments[3]!==void 0?arguments[3]:NaN;f||(f=(0,ro.A)(Pe).getInstance()).setConfig({settings:Ke}),K||(K=Bs(Pe).getInstance()),f.supportsMediaSource()?(p||(p=!0,w=ju(Pe).getInstance(),H||(H=Xs(Pe).getInstance()).setConfig({settings:Ke}),B||(B=bn(Pe).getInstance()),V||(V=d(Pe).getInstance()),j||(j=rs(Pe).getInstance()),S||(S=Ra(Pe).getInstance()),R||(R=Zo(Pe).getInstance()),P||(P=es(Pe).getInstance()),de||(de=ns(Pe).getInstance()),ue||(ue=Jr(Pe).getInstance()),N||(N=ks(Pe).getInstance()),oe=mu(Pe).getInstance(),Y=Ys(Pe).getInstance(),ge=Tn(Pe).getInstance(),ve=Hr(Pe).getInstance(),$=Gu(Pe).getInstance({settings:Ke}),Me=Zs(Pe).getInstance({settings:Ke}),oe.setConfig({constants:u.A,cea608parser:I(),errHandler:K,BASE64:fa}),z||(z=cs(Pe).create()),z.setConfig({adapter:oe,contentSteeringController:ue}),de.setConfig({adapter:oe}),Qe||(Qe=ru(Pe).getInstance({dashMetrics:$,mediaPlayerModel:te,errHandler:K,baseURLController:z,events:i.A,eventBus:ct,debug:yt,boxParser:(0,Xr.A)(Pe).getInstance(),requestModifier:(0,De.A)(Pe).getInstance(),errors:me})),j.setConfig({domStorage:Me,settings:Ke,customParametersModel:Z}),te.setConfig({playbackController:V,serviceDescriptionController:de}),ue.setConfig({adapter:oe,errHandler:K,dashMetrics:$,mediaPlayerModel:te,manifestModel:Y,serviceDescriptionController:de,eventBus:ct,requestModifier:(0,De.A)(Pe).getInstance()}),gt(),tt(We===void 0||We),xe()),ye&&Gt(ye),Te&&Zt(Te,wt),e.info("[dash.js "+qt()+"] MediaPlayer has been initialized")):K.error(new pe.A(me.CAPABILITY_MEDIASOURCE_ERROR_CODE,me.CAPABILITY_MEDIASOURCE_ERROR_MESSAGE))},setConfig:function(ye){ye&&(ye.capabilities&&(f=ye.capabilities),ye.capabilitiesFilter&&(N=ye.capabilitiesFilter),ye.streamController&&(S=ye.streamController),ye.textController&&(L=ye.textController),ye.gapController&&(R=ye.gapController),ye.playbackController&&(V=ye.playbackController),ye.serviceDescriptionController&&(de=ye.serviceDescriptionController),ye.contentSteeringController&&(ue=ye.contentSteeringController),ye.catchupController&&(P=ye.catchupController),ye.mediaPlayerModel&&(te=ye.mediaPlayerModel),ye.customParametersModel&&(Z=ye.customParametersModel),ye.abrController&&(H=ye.abrController),ye.schemeLoaderFactory&&(B=ye.schemeLoaderFactory),ye.mediaController&&(j=ye.mediaController),ye.settings&&(Ke=ye.settings))},on:function(ye,Te,We,wt){ct.on(ye,Te,We,wt)},off:function(ye,Te,We){ct.off(ye,Te,We)},extend:function(ye,Te,We){h.A.extend(ye,Te,We,Pe)},attachView:Gt,attachSource:Zt,refreshManifest:function(ye){if(!p)throw Ee;if(!dt())return ye(null,Nt);var Te=this;if(typeof ye=="function"){var We=function(wt){ct.off(i.A.INTERNAL_MANIFEST_LOADED,We,Te),wt.error?ye(null,wt.error):ye(wt.manifest)};ct.on(i.A.INTERNAL_MANIFEST_LOADED,We,Te)}S.refreshManifest()},isReady:dt,preload:function(){if(!fe.getElement()&&!C){if(!o)throw Nt;lt(U)}},play:function(){if(!b)throw Ze;(!F||Yt()&&b)&&V.play(!0)},isPaused:Yt,pause:function(){if(!b)throw Ze;V.pause()},isSeeking:function(){if(!b)throw Ze;return V.isSeeking()},isDynamic:sn,getLowLatencyModeEnabled:function(){if(!b)throw Ze;return V.getLowLatencyModeEnabled()},seek:function(ye){if(!b)throw Ze;if((0,D.sq)(ye,"number"),isNaN(ye))throw u.A.BAD_ARGUMENT_ERROR;ye<0&&(ye=0);var Te=V.getIsDynamic()?ln(ye):ye,We=Vt();!V.getIsDynamic()&&We.duration&&(Te=Math.min(We.duration,Te)),V.seek(Te,!1,!1,!0)},seekToOriginalLive:function(){b&&sn()&&V.seekToOriginalLive()},setPlaybackRate:function(ye){Vt().playbackRate=ye},getPlaybackRate:function(){return Vt().playbackRate},setMute:function(ye){(0,D.sq)(ye,"boolean"),Vt().muted=ye},isMuted:function(){return Vt().muted},setVolume:function(ye){if(typeof ye!="number"||isNaN(ye)||ye<0||ye>1)throw u.A.BAD_ARGUMENT_ERROR;Vt().volume=ye},getVolume:function(){return Vt().volume},time:ke,duration:ut,timeAsUTC:function(){if(!b)throw Ze;return ke()<0?NaN:Ge(ke())},durationAsUTC:function(){if(!b)throw Ze;return Ge(ut())},getActiveStream:pt,getDVRWindowSize:function(){var ye=S&&S.hasVideoTrack()?u.A.VIDEO:u.A.AUDIO,Te=$.getCurrentDVRInfo(ye);return Te?Te.manifestInfo.dvrWindowSize:0},getDVRSeekOffset:ln,getAvailableBaseUrls:function(){var ye=Y.getValue();return ye?z.getBaseUrls(ye):[]},getAvailableLocations:function(){var ye=Y.getValue();if(!ye)return[];var Te=oe.getLocation(ye),We=ue.getSynthesizedLocationElements(Te);return Te.concat(We)},getTargetLiveDelay:function(){if(!b)throw Ze;return V.getOriginalLiveDelay()},convertToTimeCode:function(ye){ye=Math.max(ye,0);var Te=Math.floor(ye/3600),We=Math.floor(ye%3600/60),wt=Math.floor(ye%3600%60);return(Te===0?"":Te<10?"0"+Te.toString()+":":Te.toString()+":")+(We<10?"0"+We.toString():We.toString())+":"+(wt<10?"0"+wt.toString():wt.toString())},formatUTC:function(ye,Te,We){var wt=arguments.length>3&&arguments[3]!==void 0&&arguments[3],jt=new Date(1e3*ye),hn=jt.toLocaleDateString(Te),En=jt.toLocaleTimeString(Te,{hour12:We});return wt?En+" "+hn:En},getVersion:qt,getDebug:function(){return yt},getBufferLength:function(ye){var Te=[u.A.VIDEO,u.A.AUDIO,u.A.TEXT];if(ye)return Te.indexOf(ye)!==-1?Dt().getCurrentBufferLevel(ye)||NaN:(e.warn("getBufferLength requested for invalid type"),NaN);var We=Te.map((function(wt){return Kt(wt).length>0?Dt().getCurrentBufferLevel(wt):Number.MAX_VALUE})).reduce((function(wt,jt){return Math.min(wt,jt)}));return We===Number.MAX_VALUE?NaN:We},getTTMLRenderingDiv:function(){return fe?fe.getTTMLRenderingDiv():null},getVideoElement:Vt,getSource:function(){if(!o)throw Nt;return o},updateSource:function(ye){o=ye,S.load(o)},getCurrentLiveLatency:function(){if(!p)throw Ee;return b?V.getCurrentLiveLatency():NaN},getTopBitrateInfoFor:function(ye){if(!C)throw $e;return H.getTopBitrateInfoFor(ye)},setAutoPlay:tt,getAutoPlay:function(){return F},getDashMetrics:Dt,getQualityFor:function(ye){if(!C)throw $e;if(ye===u.A.IMAGE){var Te=pt();if(!Te)return-1;var We=Te.getThumbnailController();return We?We.getCurrentTrackIndex():-1}return H.getQualityFor(ye)},setQualityFor:function(ye,Te){var We=arguments.length>2&&arguments[2]!==void 0&&arguments[2];if(!C)throw $e;if(ye===u.A.IMAGE){var wt=pt();if(!wt)return;var jt=wt.getThumbnailController();jt&&jt.setTrackByIndex(Te)}H.setPlaybackQuality(ye,S.getActiveStreamInfo(),Te,{forceReplace:We})},updatePortalSize:function(){H.setElementSize(),H.setWindowResizeEventCalled(!0)},enableText:function(ye){var Te=S.getActiveStreamInfo();return!(!Te||!L)&&L.enableText(Te.id,ye)},enableForcedTextStreaming:function(ye){return!(!S.getActiveStreamInfo()||!L)&&L.enableForcedTextStreaming(ye)},isTextEnabled:function(){var ye=S.getActiveStreamInfo();return!(!ye||!L)&&L.isTextEnabled(ye)},setTextTrack:function(ye){if(!b)throw Ze;var Te=S.getActiveStreamInfo();Te&&L&&L.setTextTrack(Te.id,ye)},getBitrateInfoListFor:function(ye){if(!C)throw $e;var Te=pt();return Te?Te.getBitrateListFor(ye):[]},getStreamsFromManifest:function(ye){if(!C)throw $e;return oe.getStreamsInfo(ye)},getTracksFor:Kt,getTracksForTypeFromManifest:function(ye,Te,We){if(!C)throw $e;return(We=We||oe.getStreamsInfo(Te,1)[0])?oe.getAllMediaInfoForType(We,ye,Te):[]},getCurrentTrackFor:function(ye){if(!C)throw $e;var Te=S.getActiveStreamInfo();return j.getCurrentTrackFor(ye,Te.id)},setInitialMediaSettingsFor:function(ye,Te){if(!p)throw Ee;j.setInitialSettings(ye,Te)},getInitialMediaSettingsFor:function(ye){if(!p)throw Ee;return j.getInitialSettings(ye)},setCurrentTrack:function(ye){var Te=arguments.length>1&&arguments[1]!==void 0&&arguments[1];if(!C)throw $e;j.setTrack(ye,Te)},addABRCustomRule:function(ye,Te,We){Z.addAbrCustomRule(ye,Te,We)},removeABRCustomRule:function(ye){Z.removeAbrCustomRule(ye)},removeAllABRCustomRule:function(){Z.removeAllAbrCustomRule()},getABRCustomRules:function(){return Z.getAbrCustomRules()},getAverageThroughput:function(ye){var Te=H.getThroughputHistory(),We=V.getIsDynamic();return Te?Te.getAverageThroughput(ye,We):0},retrieveManifest:function(ye,Te){var We=Fe(),wt=this,jt=function(hn){hn.error?Te(null,hn.error):Te(hn.manifest),ct.off(i.A.INTERNAL_MANIFEST_LOADED,jt,wt),We.reset()};ct.on(i.A.INTERNAL_MANIFEST_LOADED,jt,wt),Ce.initialize(ye),We.load(ye)},addUTCTimingSource:function(ye,Te){Z.addUTCTimingSource(ye,Te)},removeUTCTimingSource:function(ye,Te){Z.removeUTCTimingSource(ye,Te)},clearDefaultUTCTimingSources:function(){Z.clearDefaultUTCTimingSources()},restoreDefaultUTCTimingSources:gt,setXHRWithCredentialsForType:function(ye,Te){Z.setXHRWithCredentialsForType(ye,Te)},getXHRWithCredentialsForType:function(ye){return Z.getXHRWithCredentialsForType(ye)},getProtectionController:function(){return st()},attachProtectionController:function(ye){k=ye},setProtectionData:function(ye){l=ye,S&&S.setProtectionData(l)},registerLicenseRequestFilter:function(ye){Z.registerLicenseRequestFilter(ye)},registerLicenseResponseFilter:function(ye){Z.registerLicenseResponseFilter(ye)},unregisterLicenseRequestFilter:function(ye){Z.unregisterLicenseRequestFilter(ye)},unregisterLicenseResponseFilter:function(ye){Z.unregisterLicenseResponseFilter(ye)},registerCustomCapabilitiesFilter:function(ye){Z.registerCustomCapabilitiesFilter(ye)},unregisterCustomCapabilitiesFilter:function(ye){Z.unregisterCustomCapabilitiesFilter(ye)},setCustomInitialTrackSelectionFunction:function(ye){Z.setCustomInitialTrackSelectionFunction(ye)},resetCustomInitialTrackSelectionFunction:function(){Z.resetCustomInitialTrackSelectionFunction(null)},attachTTMLRenderingDiv:function(ye){if(!fe.getElement())throw at;fe.setTTMLRenderingDiv(ye)},attachVttRenderingDiv:function(ye){if(!fe.getElement())throw at;fe.setVttRenderingDiv(ye)},getCurrentTextTrackIndex:function(){var ye=S.getActiveStreamInfo();if(ye&&L)return L.getCurrentTrackIdx(ye.id)},provideThumbnail:function(ye,Te){if(typeof Te=="function")if(ye<0)Te(null);else{var We=V.getIsDynamic()?ln(ye):ye,wt=S.getStreamForTime(We);if(wt!==null){var jt=wt.getThumbnailController();if(jt)return jt.provide(We,Te);Te(null)}else Te(null)}},getDashAdapter:function(){return oe},getOfflineController:function(){return xe()},triggerSteeringRequest:function(){if(ue)return ue.loadSteeringData()},getCurrentSteeringResponseData:function(){if(ue)return ue.getCurrentSteeringResponseData()},getSettings:function(){return Ke.get()},updateSettings:function(ye){Ke.update(ye)},resetSettings:function(){Ke.reset()},reset:ht,destroy:function(){ht(),h.A.deleteSingletonInstances(Pe)}},e=yt.getLogger(t),p=!1,b=!1,C=!1,F=!0,U=NaN,k=null,he=null,l=null,oe=null,Qe=null,i.A.extend(r.A),te=Hs(Pe).getInstance(),Z=(0,Lt.A)(Pe).getInstance(),fe=$s(Pe).getInstance(),Ce=qs(Pe).getInstance(),t}ga.__dashjs_factory_name="MediaPlayer";var Di=h.A.getClassFactory(ga);Di.events=r.A,Di.errors=me,h.A.updateClassFactory(ga.__dashjs_factory_name,Di);var tl=Di},7547:function(vt,Le,M){function ce(i){return ce=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},ce(i)}function I(i,h,g){return h=n(h),(function(r,m){if(m&&(ce(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));Le.A=y},7256:function(vt,Le){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 ce(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"}}}])&&ce(n.prototype,_),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,_})());Le.A=u},1991:function(vt,Le){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 ce(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"}}])&&ce(n.prototype,_),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,_})());Le.A=u},1648:function(vt,Le,M){function ce(De,Ae,Re){return Object.defineProperty(De,"prototype",{writable:!1}),De}M.d(Le,{default:function(){return Be}});var I=ce((function De(){(function(Ae,Re){if(!(Ae instanceof Re))throw new TypeError("Cannot call a class as a function")})(this,De),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 _(De){var Ae,Re,_e=(De=De||{}).eventBus,Ye=De.dashMetrics,Ve=De.metricsConstants,Xe=De.events;function nt(Qt){var nn=new u;if(Re){for(var yn in Qt)Qt.hasOwnProperty(yn)&&(nn[yn]=Qt[yn]);nn.mpdurl||(nn.mpdurl=Re.originalUrl||Re.url),nn.terror||(nn.terror=new Date),Ye.addDVBErrors(nn)}}function Tt(Qt){Qt.error||(Re=Qt.manifest)}function mt(Qt){nt({errorcode:u.BASE_URL_CHANGED,servicelocation:Qt.entry})}function Ut(){nt({errorcode:u.BECAME_REPORTER})}function Mt(Qt){var nn;Qt.metric===Ve.HTTP_REQUEST&&((nn=Qt.value).responsecode===0||nn.responsecode==null||nn.responsecode>=400||nn.responsecode<100||nn.responsecode>=600)&&nt({errorcode:nn.responsecode||u.CONNECTION_ERROR,url:nn.url,terror:nn.tresponse,servicelocation:nn._serviceLocation})}function zt(Qt){var nn;switch(Qt.error?Qt.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}nt({errorcode:nn})}return Ae={initialize:function(){_e.on(Xe.MANIFEST_UPDATED,Tt,Ae),_e.on(Xe.SERVICE_LOCATION_BASE_URL_BLACKLIST_CHANGED,mt,Ae),_e.on(Xe.METRIC_ADDED,Mt,Ae),_e.on(Xe.METRIC_UPDATED,Mt,Ae),_e.on(Xe.PLAYBACK_ERROR,zt,Ae),_e.on(n.A.BECAME_REPORTING_PLAYER,Ut,Ae)},reset:function(){_e.off(Xe.MANIFEST_UPDATED,Tt,Ae),_e.off(Xe.SERVICE_LOCATION_BASE_URL_BLACKLIST_CHANGED,mt,Ae),_e.off(Xe.METRIC_ADDED,Mt,Ae),_e.off(Xe.METRIC_UPDATED,Mt,Ae),_e.off(Xe.PLAYBACK_ERROR,zt,Ae),_e.off(n.A.BECAME_REPORTING_PLAYER,Ut,Ae)}}}_.__dashjs_factory_name="DVBErrorsTranslator";var y=dashjs.FactoryMaker.getSingletonFactory(_),i=M(6877);function h(De){De=De||{};var Ae,Re,_e=!1,Ye=this.context,Ve=De.mediaElement;return Ae={initialize:function(Xe){Xe&&Xe.length&&(Xe.forEach((function(nt){var Tt=nt.starttime,mt=Tt+nt.duration;Re.add(Tt,mt)})),_e=!!Xe[0]._useWallClockTime)},reset:function(){Re.clear()},isEnabled:function(){var Xe,nt=Re.length;if(!nt)return!0;Xe=_e?new Date().getTime()/1e3:Ve.currentTime;for(var Tt=0;Tt<nt;Tt+=1){var mt=Re.start(Tt),Ut=Re.end(Tt);if(mt<=Xe&&Xe<Ut)return!0}return!1}},Re=(0,i.A)(Ye).create(),Ae}h.__dashjs_factory_name="RangeController";var g=dashjs.FactoryMaker.getClassFactory(h);function r(){return{serialise:function De(Ae){var Re,_e,Ye=[],Ve=[];for(Re in Ae)if(Ae.hasOwnProperty(Re)&&Re.indexOf("_")!==0){if((_e=Ae[Re])==null&&(_e=""),Array.isArray(_e)){if(!_e.length)continue;Ve=[],_e.forEach((function(Xe){var nt=Object.prototype.toString.call(Xe).slice(8,-1)!=="Object";Ve.push(nt?Xe:De(Xe))})),_e=Ve.map(encodeURIComponent).join(",")}else typeof _e=="string"?_e=encodeURIComponent(_e):_e instanceof Date?_e=_e.toISOString():typeof _e=="number"&&(_e=Math.round(_e));Ye.push(Re+"="+_e)}return Ye.join("&")}}}r.__dashjs_factory_name="MetricSerialiser";var m=dashjs.FactoryMaker.getSingletonFactory(r);function d(){var De,Ae,Re,_e=window.crypto||window.msCrypto,Ye=Uint32Array,Ve=Math.pow(2,8*Ye.BYTES_PER_ELEMENT)-1;function Xe(){_e&&(De||(De=new Ye(10)),_e.getRandomValues(De),Ae=0)}return Re={random:function(nt,Tt){var mt;return nt||(nt=0),Tt||(Tt=1),_e?(Ae===De.length&&Xe(),mt=De[Ae]/Ve,Ae+=1):mt=Math.random(),mt*(Tt-nt)+nt}},Xe(),Re}d.__dashjs_factory_name="RNG";var T=dashjs.FactoryMaker.getSingletonFactory(d),q=M(6890);function W(De){var Ae;De=De||{};var Re,_e,Ye,Ve,Xe,nt,Tt,mt=this.context,Ut=[],Mt=De.metricsConstants;function zt(){Ve=!1,Xe=!1,nt=null,Tt=null}return Ae={report:function(Qt,nn){Array.isArray(nn)||(nn=[nn]),Xe&&Tt.isEnabled()&&nn.forEach((function(yn){var xn=Re.serialise(yn);Qt!==Mt.DVB_ERRORS&&(xn="metricname=".concat(Qt,"&").concat(xn)),(function(Yn,An,Un){var Sn=new XMLHttpRequest;Sn.withCredentials=_e.getXHRWithCredentialsForType(Mt.HTTP_REQUEST_DVB_REPORTING_TYPE);var kn=function(){var Hn=Ut.indexOf(Sn);Hn!==-1&&(Ut.splice(Hn,1),!(Sn.status>=200&&Sn.status<300)&&Un&&Un())};Ut.push(Sn);try{Sn.open("GET",Yn),Sn.onloadend=kn,Sn.onerror=kn,Sn.send()}catch{Sn.onerror()}})(xn="".concat(nt,"?").concat(xn),0,(function(){Xe=!1}))}))},initialize:function(Qt,nn){var yn;if(Tt=nn,!(nt=Qt.dvbReportingUrl))throw new Error("required parameter missing (dvb:reportingUrl)");Ve||((yn=Qt.dvbProbability)&&(yn===1e3||yn/1e3>=Ye.random())&&(Xe=!0),Ve=!0)},reset:function(){zt()}},Re=m(mt).getInstance(),Ye=T(mt).getInstance(),_e=(0,q.A)(mt).getInstance(),zt(),Ae}W.__dashjs_factory_name="DVBReporting";var x=dashjs.FactoryMaker.getClassFactory(W);function ne(De){De=De||{};var Ae,Re={"urn:dvb:dash:reporting:2014":x},_e=this.context,Ye=De.debug?De.debug.getLogger(Ae):{},Ve=De.metricsConstants,Xe=De.mediaPlayerModel||{};return{create:function(nt,Tt){var mt;try{(mt=Re[nt.schemeIdUri](_e).create({metricsConstants:Ve,mediaPlayerModel:Xe})).initialize(nt,Tt)}catch(Ut){mt=null,Ye.error("ReportingFactory: could not create Reporting with schemeIdUri ".concat(nt.schemeIdUri," (").concat(Ut.message,")"))}return mt},register:function(nt,Tt){Re[nt]=Tt},unregister:function(nt){delete Re[nt]}}}ne.__dashjs_factory_name="ReportingFactory";var O=dashjs.FactoryMaker.getSingletonFactory(ne);function J(De){var Ae=[],Re=O(this.context).getInstance(De);return{initialize:function(_e,Ye){_e.some((function(Ve){var Xe=Re.create(Ve,Ye);if(Xe)return Ae.push(Xe),!0}))},reset:function(){Ae.forEach((function(_e){return _e.reset()})),Ae=[]},report:function(_e,Ye){Ae.forEach((function(Ve){return Ve.report(_e,Ye)}))}}}J.__dashjs_factory_name="ReportingController";var pe=dashjs.FactoryMaker.getClassFactory(J);function G(){return{reconstructFullMetricName:function(De,Ae,Re){var _e=De;return Ae&&(_e+="("+Ae,Re&&Re.length&&(_e+=","+Re),_e+=")"),_e},validateN:function(De){if(!De)throw new Error("missing n");if(isNaN(De))throw new Error("n is NaN");if(De<0)throw new Error("n must be positive");return De}}}G.__dashjs_factory_name="HandlerHelpers";var X=dashjs.FactoryMaker.getSingletonFactory(G);function re(De){var Ae,Re,_e,Ye,Ve;De=De||{};var Xe=this.context,nt=X(Xe).getInstance(),Tt=[],mt=De.metricsConstants;function Ut(){var Mt=(function(){try{return Object.keys(Tt).map((function(zt){return Tt[zt]})).reduce((function(zt,Qt){return zt.level<Qt.level?zt:Qt}))}catch{return}})();Mt&&Ve!==Mt.t&&(Ve=Mt.t,Ae.report(_e,Mt))}return{initialize:function(Mt,zt,Qt){zt&&(Re=nt.validateN(Qt),Ae=zt,_e=nt.reconstructFullMetricName(Mt,Qt),Ye=setInterval(Ut,Re))},reset:function(){clearInterval(Ye),Ye=null,Re=0,Ae=null,Ve=null},handleNewMetric:function(Mt,zt,Qt){Mt===mt.BUFFER_LEVEL&&(Tt[Qt]=zt)}}}re.__dashjs_factory_name="BufferLevelHandler";var be=dashjs.FactoryMaker.getClassFactory(re),Ue=dashjs.FactoryMaker.getClassFactory((function(De){var Ae,Re=(De=De||{}).eventBus,_e=De.metricsConstants;function Ye(){Re.off(n.A.METRICS_INITIALISATION_COMPLETE,Ye,this),Re.trigger(n.A.BECAME_REPORTING_PLAYER)}return{initialize:function(Ve,Xe){Xe&&(Ae=Xe,Re.on(n.A.METRICS_INITIALISATION_COMPLETE,Ye,this))},reset:function(){Ae=null},handleNewMetric:function(Ve,Xe){Ve===_e.DVB_ERRORS&&Ae&&Ae.report(Ve,Xe)}}}));function me(De){var Ae,Re,_e,Ye,Ve;De=De||{};var Xe=[],nt=X(this.context).getInstance(),Tt=De.metricsConstants;function mt(){var Ut=Xe;Ut.length&&Ae&&Ae.report(Ye,Ut),Xe=[]}return{initialize:function(Ut,Mt,zt,Qt){Mt&&(Re=nt.validateN(zt),Ae=Mt,Qt&&Qt.length&&(_e=Qt),Ye=nt.reconstructFullMetricName(Ut,zt,Qt),Ve=setInterval(mt,Re))},reset:function(){clearInterval(Ve),Ve=null,Re=null,_e=null,Xe=[],Ae=null},handleNewMetric:function(Ut,Mt){Ut===Tt.HTTP_REQUEST&&(_e&&_e!==Mt.type||Xe.push(Mt))}}}me.__dashjs_factory_name="HttpListHandler";var le=dashjs.FactoryMaker.getClassFactory(me);function je(){var De,Ae;return{initialize:function(Re,_e){De=Re,Ae=_e},reset:function(){Ae=null,De=void 0},handleNewMetric:function(Re,_e){Re===De&&Ae&&Ae.report(De,_e)}}}je.__dashjs_factory_name="GenericMetricHandler";var Se=dashjs.FactoryMaker.getClassFactory(je);function Ne(De){var Ae,Re=(De=De||{}).debug?De.debug.getLogger(Ae):{},_e=/([a-zA-Z]*)(\(([0-9]*)(\,\s*([a-zA-Z]*))?\))?/,Ye=this.context,Ve={BufferLevel:be,DVBErrors:Ue,HttpList:le,PlayList:Se,RepSwitchList:Se,TcpList:Se};return{create:function(Xe,nt){var Tt,mt=Xe.match(_e);if(mt){try{(Tt=Ve[mt[1]](Ye).create({eventBus:De.eventBus,metricsConstants:De.metricsConstants})).initialize(mt[1],nt,mt[3],mt[5])}catch(Ut){Tt=null,Re.error("MetricsHandlerFactory: Could not create handler for type ".concat(mt[1]," with args ").concat(mt[3],", ").concat(mt[5]," (").concat(Ut.message,")"))}return Tt}},register:function(Xe,nt){Ve[Xe]=nt},unregister:function(Xe){delete Ve[Xe]}}}Ne.__dashjs_factory_name="MetricsHandlerFactory";var He=dashjs.FactoryMaker.getSingletonFactory(Ne);function it(De){De=De||{};var Ae,Re=[],_e=this.context,Ye=De.eventBus,Ve=De.events,Xe=He(_e).getInstance({debug:De.debug,eventBus:De.eventBus,metricsConstants:De.metricsConstants});function nt(Tt){Re.forEach((function(mt){mt.handleNewMetric(Tt.metric,Tt.value,Tt.mediaType)}))}return Ae={initialize:function(Tt,mt){Tt.split(",").forEach((function(Ut,Mt,zt){var Qt;if(Ut.indexOf("(")!==-1&&Ut.indexOf(")")===-1){var nn=zt[Mt+1];nn&&nn.indexOf("(")===-1&&nn.indexOf(")")!==-1&&(Ut+=","+nn,delete zt[Mt+1])}(Qt=Xe.create(Ut,mt))&&Re.push(Qt)})),Ye.on(Ve.METRIC_ADDED,nt,Ae),Ye.on(Ve.METRIC_UPDATED,nt,Ae)},reset:function(){Ye.off(Ve.METRIC_ADDED,nt,Ae),Ye.off(Ve.METRIC_UPDATED,nt,Ae),Re.forEach((function(Tt){return Tt.reset()})),Re=[]}}}it.__dashjs_factory_name="MetricsHandlersController";var Ie=dashjs.FactoryMaker.getClassFactory(it);function Oe(De){var Ae,Re,_e;De=De||{};var Ye=this.context;function Ve(){Ae&&Ae.reset(),Re&&Re.reset(),_e&&_e.reset()}return{initialize:function(Xe){try{(_e=g(Ye).create({mediaElement:De.mediaElement})).initialize(Xe.Range),(Re=pe(Ye).create({debug:De.debug,metricsConstants:De.metricsConstants,mediaPlayerModel:De.mediaPlayerModel})).initialize(Xe.Reporting,_e),(Ae=Ie(Ye).create({debug:De.debug,eventBus:De.eventBus,metricsConstants:De.metricsConstants,events:De.events})).initialize(Xe.metrics,Re)}catch(nt){throw Ve(),nt}},reset:Ve}}Oe.__dashjs_factory_name="MetricsController";var ft=dashjs.FactoryMaker.getClassFactory(Oe);function At(De,Ae,Re){return Object.defineProperty(De,"prototype",{writable:!1}),De}var Rt=At((function De(){(function(Ae,Re){if(!(Ae instanceof Re))throw new TypeError("Cannot call a class as a function")})(this,De),this.metrics="",this.Range=[],this.Reporting=[]}));function Pt(De,Ae,Re){return Object.defineProperty(De,"prototype",{writable:!1}),De}var ee=Pt((function De(){(function(Ae,Re){if(!(Ae instanceof Re))throw new TypeError("Cannot call a class as a function")})(this,De),this.starttime=0,this.duration=1/0,this._useWallClockTime=!1}));function ae(De,Ae,Re){return Object.defineProperty(De,"prototype",{writable:!1}),De}var qe=ae((function De(){(function(Ae,Re){if(!(Ae instanceof Re))throw new TypeError("Cannot call a class as a function")})(this,De),this.schemeIdUri="",this.value="",this.dvbReportingUrl="",this.dvbProbability=1e3}));function v(De){var Ae=(De=De||{}).adapter,Re=De.constants;return{getMetrics:function(_e){var Ye=[];return _e&&_e.Metrics_asArray&&_e.Metrics_asArray.forEach((function(Ve){var Xe=new Rt,nt=Ae.getIsDynamic(_e);Ve.hasOwnProperty("metrics")&&(Xe.metrics=Ve.metrics,Ve.Range_asArray&&Ve.Range_asArray.forEach((function(Tt){var mt=new ee;mt.starttime=(function(Ut,Mt,zt){var Qt,nn,yn=0;return Mt?yn=Ae.getAvailabilityStartTime(Ut)/1e3:(Qt=Ae.getRegularPeriods(Ut)).length&&(yn=Qt[0].start),nn=yn,zt&&zt.hasOwnProperty(Re.START_TIME)&&(nn+=zt.starttime),nn})(_e,nt,Tt),Tt.hasOwnProperty("duration")?mt.duration=Tt.duration:mt.duration=Ae.getDuration(_e),mt._useWallClockTime=nt,Xe.Range.push(mt)})),Ve.Reporting_asArray&&(Ve.Reporting_asArray.forEach((function(Tt){var mt=new qe;Tt.hasOwnProperty(Re.SCHEME_ID_URI)&&(mt.schemeIdUri=Tt.schemeIdUri,Tt.hasOwnProperty("value")&&(mt.value=Tt.value),Tt.hasOwnProperty(Re.DVB_REPORTING_URL)&&(mt.dvbReportingUrl=Tt[Re.DVB_REPORTING_URL]),Tt.hasOwnProperty(Re.DVB_PROBABILITY)&&(mt.dvbProbability=Tt[Re.DVB_PROBABILITY]),Xe.Reporting.push(mt))})),Ye.push(Xe)))})),Ye}}}v.__dashjs_factory_name="ManifestParsing";var A=dashjs.FactoryMaker.getSingletonFactory(v);function c(De){var Ae;De=De||{};var Re={},_e=this.context,Ye=De.eventBus,Ve=De.events;function Xe(Tt){if(!Tt.error){var mt=Object.keys(Re);A(_e).getInstance({adapter:De.adapter,constants:De.constants}).getMetrics(Tt.manifest).forEach((function(Ut){var Mt=JSON.stringify(Ut);if(Re.hasOwnProperty(Mt))mt.splice(Mt,1);else try{var zt=ft(_e).create(De);zt.initialize(Ut),Re[Mt]=zt}catch{}})),mt.forEach((function(Ut){Re[Ut].reset(),delete Re[Ut]})),Ye.trigger(n.A.METRICS_INITIALISATION_COMPLETE)}}function nt(){Object.keys(Re).forEach((function(Tt){Re[Tt].reset()})),Re={}}return Ae={reset:function(){Ye.off(Ve.MANIFEST_UPDATED,Xe,Ae),Ye.off(Ve.STREAM_TEARDOWN_COMPLETE,nt,Ae)}},Ye.on(Ve.MANIFEST_UPDATED,Xe,Ae),Ye.on(Ve.STREAM_TEARDOWN_COMPLETE,nt,Ae),Ae}c.__dashjs_factory_name="MetricsCollectionController";var E=dashjs.FactoryMaker.getClassFactory(c);function Q(){var De=this.context;return{createMetricsReporting:function(Ae){return y(De).getInstance({eventBus:Ae.eventBus,dashMetrics:Ae.dashMetrics,metricsConstants:Ae.metricsConstants,events:Ae.events}).initialize(),E(De).create(Ae)},getReportingFactory:function(){return O(De).getInstance()},getMetricsHandlerFactory:function(){return He(De).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 Be=D},7125:function(vt,Le,M){function ce(i){return ce=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},ce(i)}function I(i,h,g){return h=n(h),(function(r,m){if(m&&(ce(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));Le.A=y},6890:function(vt,Le,M){var ce=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,ne=(0,u.A)(x).getInstance();function O(){m=[],d=[],T=[],W=[],q=null,g=[]}function J(re,be){var Ue=-1;re.some((function(me,le){if(me===be)return Ue=le,!0})),Ue<0||re.splice(Ue,1)}function pe(re){var be;for(be=0;be<W.length;be++)if(W[be].rulename===re)return be;return-1}function G(re,be){X(re,be);var Ue=new ce.A;Ue.schemeIdUri=re,Ue.value=be,g.push(Ue)}function X(re,be){(0,n.sq)(re,"string"),(0,n.sq)(be,"string"),g.forEach((function(Ue,me){Ue.schemeIdUri===re&&Ue.value===be&&g.splice(me,1)}))}return h={getCustomInitialTrackSelectionFunction:function(){return q},setCustomInitialTrackSelectionFunction:function(re){q=re},resetCustomInitialTrackSelectionFunction:function(){q=null},getLicenseResponseFilters:function(){return d},getLicenseRequestFilters:function(){return m},getCustomCapabilitiesFilters:function(){return T},registerCustomCapabilitiesFilter:function(re){T.push(re)},registerLicenseResponseFilter:function(re){d.push(re)},registerLicenseRequestFilter:function(re){m.push(re)},unregisterCustomCapabilitiesFilter:function(re){J(T,re)},unregisterLicenseResponseFilter:function(re){J(d,re)},unregisterLicenseRequestFilter:function(re){J(m,re)},addAbrCustomRule:function(re,be,Ue){if(typeof re!="string"||re!==_.A.ABANDON_FRAGMENT_RULES&&re!==_.A.QUALITY_SWITCH_RULES||typeof be!="string")throw y.A.BAD_ARGUMENT_ERROR;var me=pe(be);me===-1?W.push({type:re,rulename:be,rule:Ue}):(W[me].type=re,W[me].rule=Ue)},removeAllAbrCustomRule:function(){W=[]},removeAbrCustomRule:function(re){if(re){var be=pe(re);be!==-1&&W.splice(be,1)}else W=[]},getAbrCustomRules:function(){return W},addUTCTimingSource:G,removeUTCTimingSource:X,getUTCTimingSources:function(){return g},clearDefaultUTCTimingSources:function(){g=[]},restoreDefaultUTCTimingSources:function(){var re=ne.get().streaming.utcSynchronization.defaultTimingSource;G(re.scheme,re.value)},setXHRWithCredentialsForType:function re(be,Ue){be?r[be]=!!Ue:Object.keys(r).forEach((function(me){re(me,Ue)}))},getXHRWithCredentialsForType:function(re){var be=r[re];return be===void 0?r.default:be},setConfig:function(){},reset:function(){O()}},r={default:!1},O(),h}i.__dashjs_factory_name="CustomParametersModel",Le.A=I.A.getSingletonFactory(i)},2930:function(vt,Le,M){var ce=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=ce.A.getClassFactory(u);Le.A=n},8496:function(vt,Le,M){function ce(ot){return ce=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(et){return typeof et}:function(et){return et&&typeof Symbol=="function"&&et.constructor===Symbol&&et!==Symbol.prototype?"symbol":typeof et},ce(ot)}function I(ot,et){for(var rt=0;rt<et.length;rt++){var we=et[rt];we.enumerable=we.enumerable||!1,we.configurable=!0,"value"in we&&(we.writable=!0),Object.defineProperty(ot,u(we.key),we)}}function u(ot){var et=(function(rt){if(ce(rt)!="object"||!rt)return rt;var we=rt[Symbol.toPrimitive];if(we!==void 0){var Je=we.call(rt,"string");if(ce(Je)!="object")return Je;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(rt)})(ot);return ce(et)=="symbol"?et:et+""}M.d(Le,{default:function(){return vr}});var n={attributes:["Laurl","laurl"],prefixes:["clearkey","dashif"]},_=(function(){function ot(){(function(we,Je){if(!(we instanceof Je))throw new TypeError("Cannot call a class as a function")})(this,ot)}return et=ot,rt=[{key:"findCencContentProtection",value:function(we){for(var Je=null,bt=0;bt<we.length;++bt){var Et=we[bt];Et.schemeIdUri.toLowerCase()!=="urn:mpeg:dash:mp4protection:2011"||Et.value.toLowerCase()!=="cenc"&&Et.value.toLowerCase()!=="cbcs"||(Je=Et)}return Je}},{key:"getPSSHData",value:function(we){var Je=8,bt=new DataView(we),Et=bt.getUint8(Je);return Je+=20,Et>0&&(Je+=4+16*bt.getUint32(Je)),Je+=4,we.slice(Je)}},{key:"getPSSHForKeySystem",value:function(we,Je){var bt=ot.parsePSSHList(Je);return we&&bt.hasOwnProperty(we.uuid.toLowerCase())?bt[we.uuid.toLowerCase()]:null}},{key:"parseInitDataFromContentProtection",value:function(we,Je){return"pssh"in we?(we.pssh.__text=we.pssh.__text.replace(/\r?\n|\r/g,"").replace(/\s+/g,""),Je.decodeArray(we.pssh.__text).buffer):null}},{key:"parsePSSHList",value:function(we){if(we==null)return[];for(var Je=new DataView(we.buffer||we),bt={},Et=0;;){var Bt,xt,Xt=void 0,$t=Et;if(Et>=Je.buffer.byteLength)break;if(Bt=Et+Je.getUint32(Et),Et+=4,Je.getUint32(Et)===1886614376)if(Et+=4,(xt=Je.getUint8(Et))===0||xt===1){Et++,Et+=3,Xt="";var kt=void 0,_t=void 0;for(kt=0;kt<4;kt++)Xt+=(_t=Je.getUint8(Et+kt).toString(16)).length===1?"0"+_t:_t;for(Et+=4,Xt+="-",kt=0;kt<2;kt++)Xt+=(_t=Je.getUint8(Et+kt).toString(16)).length===1?"0"+_t:_t;for(Et+=2,Xt+="-",kt=0;kt<2;kt++)Xt+=(_t=Je.getUint8(Et+kt).toString(16)).length===1?"0"+_t:_t;for(Et+=2,Xt+="-",kt=0;kt<2;kt++)Xt+=(_t=Je.getUint8(Et+kt).toString(16)).length===1?"0"+_t:_t;for(Et+=2,Xt+="-",kt=0;kt<6;kt++)Xt+=(_t=Je.getUint8(Et+kt).toString(16)).length===1?"0"+_t:_t;Et+=6,Et+=4,bt[Xt=Xt.toLowerCase()]=Je.buffer.slice($t,Bt),Et=Bt}else Et=Bt;else Et=Bt}return bt}},{key:"getLicenseServerUrlFromMediaInfo",value:function(we,Je){try{if(!we||we.length===0)return null;for(var bt=0,Et=null;bt<we.length&&!Et;){var Bt=we[bt];if(Bt&&Bt.contentProtection&&Bt.contentProtection.length>0){var xt=Bt.contentProtection.filter((function(an){return an.schemeIdUri&&an.schemeIdUri===Je}));if(xt&&xt.length>0)for(var Xt=0;Xt<xt.length&&!Et;){for(var $t=xt[Xt],kt=0;kt<n.attributes.length&&!Et;){for(var _t=0,Wt=n.attributes[kt];_t<n.prefixes.length&&!Et;){var Ht=n.prefixes[_t];$t[Wt]&&$t[Wt].__prefix&&$t[Wt].__prefix===Ht&&$t[Wt].__text&&(Et=$t[Wt].__text),_t+=1}kt+=1}Xt+=1}}bt+=1}return Et}catch{return null}}}],rt&&I(et,rt),Object.defineProperty(et,"prototype",{writable:!1}),et;var et,rt})();function y(ot,et,rt){return Object.defineProperty(ot,"prototype",{writable:!1}),ot}var i=y((function ot(et,rt){(function(we,Je){if(!(we instanceof Je))throw new TypeError("Cannot call a class as a function")})(this,ot),this.contentType=et,this.robustness=rt}));function h(ot,et,rt){return Object.defineProperty(ot,"prototype",{writable:!1}),ot}var g=h((function ot(et,rt,we,Je,bt){(function(Et,Bt){if(!(Et instanceof Bt))throw new TypeError("Cannot call a class as a function")})(this,ot),this.initDataTypes=["cenc"],et&&et.length&&(this.audioCapabilities=et),rt&&rt.length&&(this.videoCapabilities=rt),this.distinctiveIdentifier=we,this.persistentState=Je,this.sessionTypes=bt}));function r(ot){return r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(et){return typeof et}:function(et){return et&&typeof Symbol=="function"&&et.constructor===Symbol&&et!==Symbol.prototype?"symbol":typeof et},r(ot)}function m(ot,et,rt){return et=T(et),(function(we,Je){if(Je&&(r(Je)=="object"||typeof Je=="function"))return Je;if(Je!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(bt){if(bt===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return bt})(we)})(ot,d()?Reflect.construct(et,[],T(ot).constructor):et.apply(ot,rt))}function d(){try{var ot=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(d=function(){return!!ot})()}function T(ot){return T=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(et){return et.__proto__||Object.getPrototypeOf(et)},T(ot)}function q(ot,et){return q=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(rt,we){return rt.__proto__=we,rt},q(ot,et)}var W=new((function(ot){function et(){var we;return(function(Je,bt){if(!(Je instanceof bt))throw new TypeError("Cannot call a class as a function")})(this,et),(we=m(this,et)).MEDIA_KEYERR_CODE=100,we.MEDIA_KEYERR_UNKNOWN_CODE=101,we.MEDIA_KEYERR_CLIENT_CODE=102,we.MEDIA_KEYERR_SERVICE_CODE=103,we.MEDIA_KEYERR_OUTPUT_CODE=104,we.MEDIA_KEYERR_HARDWARECHANGE_CODE=105,we.MEDIA_KEYERR_DOMAIN_CODE=106,we.MEDIA_KEY_MESSAGE_ERROR_CODE=107,we.MEDIA_KEY_MESSAGE_NO_CHALLENGE_ERROR_CODE=108,we.SERVER_CERTIFICATE_UPDATED_ERROR_CODE=109,we.KEY_STATUS_CHANGED_EXPIRED_ERROR_CODE=110,we.MEDIA_KEY_MESSAGE_NO_LICENSE_SERVER_URL_ERROR_CODE=111,we.KEY_SYSTEM_ACCESS_DENIED_ERROR_CODE=112,we.KEY_SESSION_CREATED_ERROR_CODE=113,we.MEDIA_KEY_MESSAGE_LICENSER_ERROR_CODE=114,we.MEDIA_KEYERR_UNKNOWN_MESSAGE="An unspecified error occurred. This value is used for errors that don't match any of the other codes.",we.MEDIA_KEYERR_CLIENT_MESSAGE="The Key System could not be installed or updated.",we.MEDIA_KEYERR_SERVICE_MESSAGE="The message passed into update indicated an error from the license service.",we.MEDIA_KEYERR_OUTPUT_MESSAGE="There is no available output device with the required characteristics for the content protection system.",we.MEDIA_KEYERR_HARDWARECHANGE_MESSAGE="A hardware configuration change caused a content protection error.",we.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.",we.MEDIA_KEY_MESSAGE_ERROR_MESSAGE="Multiple key sessions were creates with a user-agent that does not support sessionIDs!! Unpredictable behavior ahead!",we.MEDIA_KEY_MESSAGE_NO_CHALLENGE_ERROR_MESSAGE="DRM: Empty key message from CDM",we.SERVER_CERTIFICATE_UPDATED_ERROR_MESSAGE="Error updating server certificate -- ",we.KEY_STATUS_CHANGED_EXPIRED_ERROR_MESSAGE="DRM: KeyStatusChange error! -- License has expired",we.MEDIA_KEY_MESSAGE_NO_LICENSE_SERVER_URL_ERROR_MESSAGE="DRM: No license server URL specified!",we.KEY_SYSTEM_ACCESS_DENIED_ERROR_MESSAGE="DRM: KeySystem Access Denied! -- ",we.KEY_SESSION_CREATED_ERROR_MESSAGE="DRM: unable to create session! --",we.MEDIA_KEY_MESSAGE_LICENSER_ERROR_MESSAGE="DRM: licenser error! --",we}return(function(we,Je){if(typeof Je!="function"&&Je!==null)throw new TypeError("Super expression must either be null or a function");we.prototype=Object.create(Je&&Je.prototype,{constructor:{value:we,writable:!0,configurable:!0}}),Object.defineProperty(we,"prototype",{writable:!1}),Je&&q(we,Je)})(et,ot),rt=et,Object.defineProperty(rt,"prototype",{writable:!1}),rt;var rt})(M(1840).A)),x=M(8324);function ne(ot,et,rt){return Object.defineProperty(ot,"prototype",{writable:!1}),ot}var O=ne((function ot(et,rt,we,Je,bt,Et,Bt,xt){(function(Xt,$t){if(!(Xt instanceof $t))throw new TypeError("Cannot call a class as a function")})(this,ot),this.url=et,this.method=rt,this.responseType=we,this.headers=Je,this.withCredentials=bt,this.messageType=Et,this.sessionId=Bt,this.data=xt}));function J(ot,et,rt){return Object.defineProperty(ot,"prototype",{writable:!1}),ot}var pe=J((function ot(et,rt,we){(function(Je,bt){if(!(Je instanceof bt))throw new TypeError("Cannot call a class as a function")})(this,ot),this.url=et,this.headers=rt,this.data=we})),G=M(2756),X=M(1739),re=M(7256),be=M(5742);function Ue(ot){return Ue=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(et){return typeof et}:function(et){return et&&typeof Symbol=="function"&&et.constructor===Symbol&&et!==Symbol.prototype?"symbol":typeof et},Ue(ot)}function me(ot){var et,rt,we,Je,bt,Et,Bt,xt,Xt,$t,kt,_t=(ot=ot||{}).protectionKeyController,Wt=ot.protectionModel,Ht=ot.eventBus,an=ot.events,pn=ot.debug,vn=ot.BASE64,tn=ot.constants,St=[],It=ot.cmcdModel,Ft=ot.settings,rn=ot.customParametersModel;function un(){if(!(Ht&&Ht.hasOwnProperty("on")&&_t&&_t.hasOwnProperty("getSupportedKeySystemsFromContentProtection")))throw new Error("Missing config parameter(s)")}function _n(Lt,en){xt||Xt?xt&&Tn():(function(fn,Fn){if(!Xt){Xt=!0;var On,Gn=[];fn=fn.sort((function(Mn,Rn){return(bt&&bt[Mn.ks.systemString]&&bt[Mn.ks.systemString].priority>=0?bt[Mn.ks.systemString].priority:fn.length)-(bt&&bt[Rn.ks.systemString]&&bt[Rn.ks.systemString].priority>=0?bt[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})}Wt.requestKeySystemAccess(Gn).then((function(Mn){var Rn=(On=Mn.data).mksa&&On.mksa.selectedSystemString?On.mksa.selectedSystemString:On.keySystem.systemString;return rt.info("DRM: KeySystem Access Granted for system string ("+Rn+")! Selecting key system..."),Wt.selectKeySystem(On)})).then((function(Mn){if(xt=Mn,Xt=!1,Wt){Ht.trigger(an.KEY_SYSTEM_SELECTED,{data:On});var Rn=Bn(xt);Rn&&Rn.serverCertificate&&Rn.serverCertificate.length>0&&Wt.setServerCertificate(vn.decodeArray(Rn.serverCertificate).buffer),Tn()}})).catch((function(Mn){xt=null,Xt=!1,Fn||Ht.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)})}))}})(Lt,en)}function Tn(){for(var Lt,en=0;en<we.length;en++)for(Lt=0;Lt<we[en].length;Lt++)if(xt===we[en][Lt].ks){qn(we[en][Lt]);break}we=[]}function qn(Lt){if(_t.isClearKey(xt)&&Lt.protData&&Lt.protData.hasOwnProperty("clearkeys")&&Object.keys(Lt.protData.clearkeys).length!==0){var en={kids:Object.keys(Lt.protData.clearkeys)};Lt.initData=new TextEncoder().encode(JSON.stringify(en))}Lt.sessionId?Vn(Lt):Lt.initData!==null&&In(Lt)}function Vn(Lt){un(),Wt.loadKeySession(Lt)}function In(Lt){var en=_.getPSSHForKeySystem(xt,Lt?Lt.initData:null);if(en){if((function(fn){if(!fn)return!1;try{for(var Fn=Wt.getSessions(),On=0;On<Fn.length;On++)if(Fn[On].getKeyId()===fn)return!0;return!1}catch{return!1}})(Lt.keyId)||Ln(en))return;try{Lt.initData=en,Wt.createKeySession(Lt)}catch(fn){Ht.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 Lt&&Lt.initData?Wt.createKeySession(Lt):Ht.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 "+(xt?xt.systemString:null)+". needkey/encrypted event contains no initData corresponding to that key system!")})}function Bn(Lt){if(Lt){var en=Lt.systemString;if(bt)return en in bt?bt[en]:null}return null}function Ln(Lt){if(!Lt)return!1;try{for(var en=Wt.getAllInitData(),fn=0;fn<en.length;fn++)if(_t.initDataEquals(Lt,en[fn]))return rt.debug("DRM: Ignoring initData because we have already seen it!"),!0;return!1}catch{return!1}}function Wn(Lt){un(),Lt?(Wt.setMediaElement(Lt),Ht.on(an.NEED_KEY,Kr,et)):Lt===null&&(Wt.setMediaElement(Lt),Ht.off(an.NEED_KEY,Kr,et))}function Tr(Lt){var en=Lt.protData,fn=[],Fn=[],On=en&&en.audioRobustness&&en.audioRobustness.length>0?en.audioRobustness:Bt,Gn=en&&en.videoRobustness&&en.videoRobustness.length>0?en.videoRobustness:Bt,bn=Lt.sessionType,Jn=en&&en.distinctiveIdentifier?en.distinctiveIdentifier:"optional",Mn=en&&en.persistentState?en.persistentState:bn==="temporary"?"optional":"required";return Je.forEach((function(Rn){Rn.type===tn.AUDIO?fn.push(new i(Rn.codec,On)):Rn.type===tn.VIDEO&&Fn.push(new i(Rn.codec,Gn))})),new g(fn,Fn,Jn,Mn,[bn])}function mr(Lt){Lt.error?Ht.trigger(an.KEY_STATUSES_CHANGED,{data:null,error:Lt.error}):rt.debug("DRM: key status = "+Lt.status)}function tr(Lt){rt.debug("DRM: onKeyMessage");var en=Lt.data;Ht.trigger(an.KEY_MESSAGE,{data:en});var fn=en.messageType?en.messageType:"license-request",Fn=en.message,On=en.sessionToken,Gn=Bn(xt),bn=_t.getLicenseServerModelInstance(xt,Gn,fn),Jn={sessionToken:On,messageType:fn};if(Fn&&Fn.byteLength!==0){if(!bn)return rt.debug("DRM: License server request not required for this message (type = "+Lt.data.messageType+"). Session ID = "+On.getSessionId()),void Xn(Jn);if(_t.isClearKey(xt)){var Mn=_t.processClearKeyLicenseRequest(xt,Gn,Fn);if(Mn&&Mn.keyPairs&&Mn.keyPairs.length>0)return rt.debug("DRM: ClearKey license request handled by application!"),Xn(Jn),void Wt.updateKeySession(On,Mn)}(function(Rn,rr,Qn){var nr=Rn.sessionToken,$n=Rn.messageType?Rn.messageType:"license-request",yr={sessionToken:nr,messageType:$n},ur=xt?xt.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:Ue(lr)==="object"&&lr.hasOwnProperty(Er)&&(ar=lr[Er])}else if(Nn&&Nn.laURL&&Nn.laURL!=="")ar=Nn.laURL;else if(!(ar=_.getLicenseServerUrlFromMediaInfo(Je,xt.schemeIdURI))&&!_t.isClearKey(xt)){var Jr=_.getPSSHData(Mr.initData);(ar=xt.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,xt.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(Wt)if(Nn.status>=200&&Nn.status<=299){var Er=X.A.parseHttpHeaders(Nn.getAllResponseHeaders?Nn.getAllResponseHeaders():null),Mr=new pe(Nn.responseURL,Er,Nn.response);Vr(rn.getLicenseResponseFilters(),Mr).then((function(){var Sr=rr.getLicenseMessage(Mr.data,ur,$n);Sr!==null?(Xn(yr),Wt.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=xt.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(Ft.get().streaming.retryAttempts[G.G.LICENSE])?3:Ft.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))})(en,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(Lt,en){Ht.trigger(an.LICENSE_REQUEST_COMPLETE,{data:Lt,error:en})}function pi(Lt,en,fn,Fn,On,Gn){var bn=new XMLHttpRequest;if(Ft.get().streaming.cmcd&&Ft.get().streaming.cmcd.enabled&&Ft.get().streaming.cmcd.mode===re.A.CMCD_MODE_QUERY){var Jn=It.getQueryParameter({url:Lt.url,type:G.G.LICENSE});Jn&&(Lt.url=X.A.addAditionalQueryParameterToUrl(Lt.url,[Jn]))}for(var Mn in bn.open(Lt.method,Lt.url,!0),bn.responseType=Lt.responseType,bn.withCredentials=Lt.withCredentials,fn>0&&(bn.timeout=fn),Lt.headers)bn.setRequestHeader(Mn,Lt.headers[Mn]);if(Ft.get().streaming.cmcd&&Ft.get().streaming.cmcd.enabled&&Ft.get().streaming.cmcd.mode===re.A.CMCD_MODE_HEADER){var Rn=It.getHeaderParameters({url:Lt.url,type:G.G.LICENSE});if(Rn)for(var rr in Rn){var Qn=Rn[rr];Qn&&bn.setRequestHeader(rr,Qn)}}var nr=function(){en--;var $n=isNaN(Ft.get().streaming.retryIntervals[G.G.LICENSE])?1e3:Ft.get().streaming.retryIntervals[G.G.LICENSE];kt=setTimeout((function(){pi(Lt,en,fn,Fn,On,Gn)}),$n)};bn.onload=function(){$t=null,this.status>=200&&this.status<=299||en<=0?Fn(this):(rt.warn("License request failed ("+this.status+"). Retrying it... Pending retries: "+en),nr())},bn.ontimeout=bn.onerror=function(){$t=null,en<=0?Gn(this):(rt.warn("License request network request failed . Retrying it... Pending retries: "+en),nr())},bn.onabort=function(){On(this)},Ht.trigger(an.LICENSE_REQUEST_SENDING,{url:Lt.url,headers:Lt.headers,payload:Lt.data,sessionId:Lt.sessionId}),$t=bn,bn.send(Lt.data)}function hi(){$t&&($t.onloadend=$t.onerror=$t.onprogress=void 0,$t.abort(),$t=null),kt&&(clearTimeout(kt),kt=null)}function Yr(Lt,en){if(en)for(var fn in en)Lt[fn]=en[fn]}function Hr(Lt,en,fn,Fn,On){var Gn="NONE",bn=null;Lt.response&&(Gn=On.getErrorResponse(Lt.response,fn,Fn),bn={serverResponse:Lt.response||null,responseCode:Lt.status||null,responseText:Lt.statusText||null}),Xn(en,new x.A(W.MEDIA_KEY_MESSAGE_LICENSER_ERROR_CODE,W.MEDIA_KEY_MESSAGE_LICENSER_ERROR_MESSAGE+fn+' update, XHR complete. status is "'+Lt.statusText+'" ('+Lt.status+"), readyState is "+Lt.readyState+". Response is "+Gn,bn))}function Vr(Lt,en){return Lt?Lt.reduce((function(fn,Fn){return fn.then((function(){return Fn(en)}))}),Promise.resolve()):Promise.resolve()}function Kr(Lt,en){if(!Ft.get().streaming.protection.ignoreEmeEncryptedEvent){if(rt.debug("DRM: onNeedKey"),Lt.key.initDataType!=="cenc")return void rt.warn("DRM: Only 'cenc' initData is supported! Ignoring initData of type: "+Lt.key.initDataType);if(Je.length===0&&(rt.warn("DRM: onNeedKey called before initializeForMedia, wait until initialized"),(en=en===void 0?1:en+1)<5))return void St.push(setTimeout((function(){Kr(Lt,en)}),500));var fn=Lt.key.initData;if(ArrayBuffer.isView(fn)&&(fn=fn.buffer),xt){var Fn=_.getPSSHForKeySystem(xt,fn);if(Fn&&Ln(Fn))return}rt.debug("DRM: initData:",String.fromCharCode.apply(null,new Uint8Array(fn)));var On=_t.getSupportedKeySystemsFromSegmentPssh(fn,bt,Et);if(On.length===0)return void rt.debug("DRM: Received needkey event with initData, but we don't support any of the key systems!");(function(Gn){we.push(Gn),_n(Gn,!1)})(On)}}return et={initializeForMedia:function(Lt){if(!Lt)throw new Error("mediaInfo can not be null or undefined");un(),Je.push(Lt)},clearMediaInfoArray:function(){Je=[]},handleKeySystemFromManifest:function(){if(Je&&Je.length!==0){var Lt=[];Je.forEach((function(en){var fn=_t.getSupportedKeySystemsFromContentProtection(en.contentProtection,bt,Et);fn.length>0&&(Lt.length===0&&(Lt=fn),we.push(fn))})),Lt&&Lt.length>0&&_n(Lt,!0)}},createKeySession:In,loadKeySession:Vn,removeKeySession:function(Lt){un(),Wt.removeKeySession(Lt)},closeKeySession:function(Lt){un(),Wt.closeKeySession(Lt)},setServerCertificate:function(Lt){un(),Wt.setServerCertificate(Lt)},setMediaElement:Wn,setSessionType:function(Lt){Et=Lt},setRobustnessLevel:function(Lt){Bt=Lt},setProtectionData:function(Lt){bt=Lt,_t.setProtectionData(Lt)},getSupportedKeySystemsFromContentProtection:function(Lt){return un(),_t.getSupportedKeySystemsFromContentProtection(Lt,bt,Et)},getKeySystems:function(){return _t?_t.getKeySystems():[]},setKeySystems:function(Lt){_t&&_t.setKeySystems(Lt)},stop:function(){hi(),Wt&&Wt.stop()},reset:function(){Ht.off(an.INTERNAL_KEY_MESSAGE,tr,et),Ht.off(an.INTERNAL_KEY_STATUS_CHANGED,mr,et),un(),hi(),Wn(null),xt=null,Xt=!1,Wt&&(Wt.reset(),Wt=null),St.forEach((function(Lt){return clearTimeout(Lt)})),St=[],Je=[],we=[]}},rt=pn.getLogger(et),we=[],Je=[],Et="temporary",Bt="",$t=null,kt=null,Ht.on(an.INTERNAL_KEY_MESSAGE,tr,et),Ht.on(an.INTERNAL_KEY_STATUS_CHANGED,mr,et),et}me.__dashjs_factory_name="ProtectionController";var le=be.A.getClassFactory(me);function je(ot,et,rt){return Object.defineProperty(ot,"prototype",{writable:!1}),ot}var Se=je((function ot(et,rt){(function(we,Je){if(!(we instanceof Je))throw new TypeError("Cannot call a class as a function")})(this,ot),this.keyID=et,this.key=rt}));function Ne(ot){return Ne=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(et){return typeof et}:function(et){return et&&typeof Symbol=="function"&&et.constructor===Symbol&&et!==Symbol.prototype?"symbol":typeof et},Ne(ot)}function He(ot,et){for(var rt=0;rt<et.length;rt++){var we=et[rt];we.enumerable=we.enumerable||!1,we.configurable=!0,"value"in we&&(we.writable=!0),Object.defineProperty(ot,it(we.key),we)}}function it(ot){var et=(function(rt){if(Ne(rt)!="object"||!rt)return rt;var we=rt[Symbol.toPrimitive];if(we!==void 0){var Je=we.call(rt,"string");if(Ne(Je)!="object")return Je;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(rt)})(ot);return Ne(et)=="symbol"?et:et+""}var Ie=(function(){return ot=function rt(we,Je){if((function(bt,Et){if(!(bt instanceof Et))throw new TypeError("Cannot call a class as a function")})(this,rt),Je&&Je!=="persistent"&&Je!=="temporary")throw new Error("Invalid ClearKey key set type! Must be one of 'persistent' or 'temporary'");this.keyPairs=we,this.type=Je},(et=[{key:"toJWK",value:function(){var rt,we=this.keyPairs.length,Je={keys:[]};for(rt=0;rt<we;rt++){var bt={kty:"oct",alg:"A128KW",kid:this.keyPairs[rt].keyID,k:this.keyPairs[rt].key};Je.keys.push(bt)}this.type&&(Je.type=this.type);var Et=JSON.stringify(Je),Bt=Et.length,xt=new ArrayBuffer(Bt),Xt=new Uint8Array(xt);for(rt=0;rt<Bt;rt++)Xt[rt]=Et.charCodeAt(rt);return xt}}])&&He(ot.prototype,et),Object.defineProperty(ot,"prototype",{writable:!1}),ot;var ot,et})();function Oe(ot){return Oe=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(et){return typeof et}:function(et){return et&&typeof Symbol=="function"&&et.constructor===Symbol&&et!==Symbol.prototype?"symbol":typeof et},Oe(ot)}function ft(ot,et){for(var rt=0;rt<et.length;rt++){var we=et[rt];we.enumerable=we.enumerable||!1,we.configurable=!0,"value"in we&&(we.writable=!0),Object.defineProperty(ot,At(we.key),we)}}function At(ot){var et=(function(rt){if(Oe(rt)!="object"||!rt)return rt;var we=rt[Symbol.toPrimitive];if(we!==void 0){var Je=we.call(rt,"string");if(Oe(Je)!="object")return Je;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(rt)})(ot);return Oe(et)=="symbol"?et:et+""}var Rt=new((function(){return ot=function rt(){(function(we,Je){if(!(we instanceof Je))throw new TypeError("Cannot call a class as a function")})(this,rt),this.init()},(et=[{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"}}])&&ft(ot.prototype,et),Object.defineProperty(ot,"prototype",{writable:!1}),ot;var ot,et})()),Pt="e2719d58-a985-b3c9-781a-b030af78d30e",ee=Rt.CLEARKEY_KEYSTEM_STRING,ae="urn:uuid:"+Pt;function qe(ot){var et=(ot=ot||{}).BASE64;return{uuid:Pt,schemeIdURI:ae,systemString:ee,getInitData:function(rt,we){try{var Je=_.parseInitDataFromContentProtection(rt,et);if(!Je&&we){var bt={kids:[(function(Et){try{var Bt=Et.replace(/-/g,"");return(Bt=btoa(Bt.match(/\w{2}/g).map((function(xt){return String.fromCharCode(parseInt(xt,16))})).join(""))).replace(/=/g,"").replace(/\//g,"_").replace(/\+/g,"-")}catch{return null}})(we["cenc:default_KID"])]};Je=new TextEncoder().encode(JSON.stringify(bt))}return Je}catch{return null}},getRequestHeadersFromMessage:function(){return{"Content-Type":"application/json"}},getLicenseRequestFromMessage:function(rt){return JSON.stringify(JSON.parse(String.fromCharCode.apply(null,new Uint8Array(rt))))},getLicenseServerURLFromInitData:function(){return null},getCDMData:function(){return null},getClearKeysFromProtectionData:function(rt,we){var Je=null;if(rt){for(var bt=JSON.parse(String.fromCharCode.apply(null,new Uint8Array(we))),Et=[],Bt=0;Bt<bt.kids.length;Bt++){var xt=bt.kids[Bt],Xt=rt.clearkeys&&rt.clearkeys.hasOwnProperty(xt)?rt.clearkeys[xt]:null;if(!Xt)throw new Error("DRM: ClearKey keyID ("+xt+") is not known!");Et.push(new Se(xt,Xt))}Je=new Ie(Et)}return Je}}}qe.__dashjs_factory_name="KeySystemClearKey";var v=dashjs.FactoryMaker.getSingletonFactory(qe),A="1077efec-c0b2-4d02-ace3-3c1e52e2fb4b",c=Rt.CLEARKEY_KEYSTEM_STRING,E="urn:uuid:"+A;function Q(ot){var et,rt=ot.BASE64,we=ot.debug.getLogger(et);return{uuid:A,schemeIdURI:E,systemString:c,getInitData:function(Je){return _.parseInitDataFromContentProtection(Je,rt)},getRequestHeadersFromMessage:function(){return null},getLicenseRequestFromMessage:function(Je){return new Uint8Array(Je)},getLicenseServerURLFromInitData:function(){return null},getCDMData:function(){return null},getClearKeysFromProtectionData:function(Je,bt){var Et=null;if(Je){for(var Bt=JSON.parse(String.fromCharCode.apply(null,new Uint8Array(bt))),xt=[],Xt=0;Xt<Bt.kids.length;Xt++){var $t=Bt.kids[Xt],kt=Je.clearkeys&&Je.clearkeys.hasOwnProperty($t)?Je.clearkeys[$t]:null;if(!kt)throw new Error("DRM: ClearKey keyID ("+$t+") is not known!");xt.push(new Se($t,kt))}Et=new Ie(xt),we.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 Et}}}Q.__dashjs_factory_name="KeySystemW3CClearKey";var D=dashjs.FactoryMaker.getSingletonFactory(Q),Be="edef8ba9-79d6-4ace-a3c8-27dcd51d21ed",De=Rt.WIDEVINE_KEYSTEM_STRING,Ae="urn:uuid:"+Be;function Re(ot){var et=(ot=ot||{}).BASE64;return{uuid:Be,schemeIdURI:Ae,systemString:De,getInitData:function(rt){return _.parseInitDataFromContentProtection(rt,et)},getRequestHeadersFromMessage:function(){return null},getLicenseRequestFromMessage:function(rt){return new Uint8Array(rt)},getLicenseServerURLFromInitData:function(){return null},getCDMData:function(){return null}}}Re.__dashjs_factory_name="KeySystemWidevine";var _e=dashjs.FactoryMaker.getSingletonFactory(Re),Ye="9a04f079-9840-4286-ab92-e65be0885f95",Ve=Rt.PLAYREADY_KEYSTEM_STRING,Xe="urn:uuid:"+Ye;function nt(ot){var et="utf-16",rt=(ot=ot||{}).BASE64,we=ot.settings;function Je(){if(!rt||!rt.hasOwnProperty("decodeArray")||!rt.hasOwnProperty("decodeArray"))throw new Error("Missing config parameter(s)")}return{uuid:Ye,schemeIdURI:Xe,systemString:Ve,getInitData:function(bt){var Et,Bt,xt,Xt,$t,kt=new Uint8Array([112,115,115,104,0,0,0,0]),_t=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]),Wt=0,Ht=null;if(Je(),!bt)return null;if("pssh"in bt)return _.parseInitDataFromContentProtection(bt,rt);if("pro"in bt)Ht=rt.decodeArray(bt.pro.__text);else{if(!("prheader"in bt))return null;Ht=rt.decodeArray(bt.prheader.__text)}return Et=Ht.length,Bt=4+kt.length+_t.length+4+Et,xt=new ArrayBuffer(Bt),Xt=new Uint8Array(xt),($t=new DataView(xt)).setUint32(Wt,Bt),Wt+=4,Xt.set(kt,Wt),Wt+=kt.length,Xt.set(_t,Wt),Wt+=_t.length,$t.setUint32(Wt,Et),Wt+=4,Xt.set(Ht,Wt),Wt+=Et,Xt.buffer},getRequestHeadersFromMessage:function(bt){var Et,Bt,xt={},Xt=new DOMParser;if(we&&we.get().streaming.protection.detectPlayreadyMessageFormat&&et==="utf-16"&&bt&&bt.byteLength%2==1)return xt["Content-Type"]="text/xml; charset=utf-8",xt;var $t=et==="utf-16"?new Uint16Array(bt):new Uint8Array(bt);Et=String.fromCharCode.apply(null,$t);for(var kt=(Bt=Xt.parseFromString(Et,"application/xml")).getElementsByTagName("name"),_t=Bt.getElementsByTagName("value"),Wt=0;Wt<kt.length;Wt++)xt[kt[Wt].childNodes[0].nodeValue]=_t[Wt].childNodes[0].nodeValue;return xt.hasOwnProperty("Content")&&(xt["Content-Type"]=xt.Content,delete xt.Content),xt.hasOwnProperty("Content-Type")||(xt["Content-Type"]="text/xml; charset=utf-8"),xt},getLicenseRequestFromMessage:function(bt){var Et=null,Bt=new DOMParser;if(we&&we.get().streaming.protection.detectPlayreadyMessageFormat&&et==="utf-16"&&bt&&bt.byteLength%2==1)return bt;var xt=et==="utf-16"?new Uint16Array(bt):new Uint8Array(bt);Je();var Xt=String.fromCharCode.apply(null,xt),$t=Bt.parseFromString(Xt,"application/xml");if(!$t.getElementsByTagName("PlayReadyKeyMessage")[0])return bt;var kt=$t.getElementsByTagName("Challenge")[0].childNodes[0].nodeValue;return kt&&(Et=rt.decode(kt)),Et},getLicenseServerURLFromInitData:function(bt){if(bt)for(var Et=new DataView(bt),Bt=Et.getUint16(4,!0),xt=6,Xt=new DOMParser,$t=0;$t<Bt;$t++){var kt=Et.getUint16(xt,!0);xt+=2;var _t=Et.getUint16(xt,!0);if(xt+=2,kt===1){var Wt=bt.slice(xt,xt+_t),Ht=String.fromCharCode.apply(null,new Uint16Array(Wt)),an=Xt.parseFromString(Ht,"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 xt+=_t}return null},getCDMData:function(bt){var Et,Bt,xt,Xt;if(Je(),!bt)return null;for(Et=[],Xt=0;Xt<bt.length;++Xt)Et.push(bt.charCodeAt(Xt)),Et.push(0);for(Et=String.fromCharCode.apply(null,Et),Et=rt.encode(Et),Bt='<PlayReadyCDMData type="LicenseAcquisition"><LicenseAcquisition version="1.0" Proactive="false"><CustomData encoding="base64encoded">%CUSTOMDATA%</CustomData></LicenseAcquisition></PlayReadyCDMData>'.replace("%CUSTOMDATA%",Et),xt=[],Xt=0;Xt<Bt.length;++Xt)xt.push(Bt.charCodeAt(Xt)),xt.push(0);return new Uint8Array(xt).buffer},setPlayReadyMessageFormat:function(bt){if(bt!=="utf-8"&&bt!=="utf-16")throw new Error('Specified message format is not one of "utf-8" or "utf-16"');et=bt}}}nt.__dashjs_factory_name="KeySystemPlayReady";var Tt=dashjs.FactoryMaker.getSingletonFactory(nt);function mt(ot){var et=(ot=ot||{}).BASE64,rt={};return rt[Rt.WIDEVINE_KEYSTEM_STRING]={responseType:"json",getLicenseMessage:function(we){return et.decodeArray(we.license)},getErrorResponse:function(we){return we}},rt[Rt.PLAYREADY_KEYSTEM_STRING]={responseType:"arraybuffer",getLicenseMessage:function(we){return we},getErrorResponse:function(we){return String.fromCharCode.apply(null,new Uint8Array(we))}},{getServerURLFromMessage:function(we){return we},getHTTPMethod:function(){return"POST"},getResponseType:function(we){return rt[we].responseType},getLicenseMessage:function(we,Je){return(function(){if(!et||!et.hasOwnProperty("decodeArray"))throw new Error("Missing config parameter(s)")})(),rt[Je].getLicenseMessage(we)},getErrorResponse:function(we,Je){return rt[Je].getErrorResponse(we)}}}mt.__dashjs_factory_name="DRMToday";var Ut=dashjs.FactoryMaker.getSingletonFactory(mt);function Mt(){var ot="http://schemas.xmlsoap.org/soap/envelope/";function et(Je){var bt=String.fromCharCode.apply(null,new Uint8Array(Je));return decodeURIComponent(escape(bt))}function rt(Je){if(window.DOMParser){var bt=et(Je),Et=new window.DOMParser().parseFromString(bt,"text/xml"),Bt=Et?Et.getElementsByTagNameNS(ot,"Envelope")[0]:null,xt=Bt?Bt.getElementsByTagNameNS(ot,"Body")[0]:null;if(xt&&xt.getElementsByTagNameNS(ot,"Fault")[0])return null}return Je}function we(Je){var bt="",Et="",Bt="",xt=-1,Xt=-1;if(window.DOMParser){var $t=et(Je),kt=new window.DOMParser().parseFromString($t,"text/xml"),_t=kt?kt.getElementsByTagNameNS(ot,"Envelope")[0]:null,Wt=_t?_t.getElementsByTagNameNS(ot,"Body")[0]:null,Ht=Wt?Wt.getElementsByTagNameNS(ot,"Fault")[0]:null,an=Ht?Ht.getElementsByTagName("detail")[0]:null,pn=an?an.getElementsByTagName("Exception")[0]:null,vn=null;if(Ht===null)return $t;bt=(vn=Ht.getElementsByTagName("faultstring")[0].firstChild)?vn.nodeValue:null,pn!==null&&(Et=(vn=pn.getElementsByTagName("StatusCode")[0])?vn.firstChild.nodeValue:null,xt=(Bt=(vn=pn.getElementsByTagName("Message")[0])?vn.firstChild.nodeValue:null)?Bt.lastIndexOf("[")+1:-1,Xt=Bt?Bt.indexOf("]"):-1,Bt=Bt?Bt.substring(xt,Xt):"")}var tn="code: ".concat(Et,", name: ").concat(bt);return Bt&&(tn+=", message: ".concat(Bt)),tn}return{getServerURLFromMessage:function(Je){return Je},getHTTPMethod:function(){return"POST"},getResponseType:function(){return"arraybuffer"},getLicenseMessage:function(Je){return rt.call(this,Je)},getErrorResponse:function(Je){return we.call(this,Je)}}}Mt.__dashjs_factory_name="PlayReady";var zt=be.A.getSingletonFactory(Mt);function Qt(){return{getServerURLFromMessage:function(ot){return ot},getHTTPMethod:function(){return"POST"},getResponseType:function(){return"arraybuffer"},getLicenseMessage:function(ot){return ot},getErrorResponse:function(ot){return String.fromCharCode.apply(null,new Uint8Array(ot))}}}Qt.__dashjs_factory_name="Widevine";var nn=dashjs.FactoryMaker.getSingletonFactory(Qt);function yn(){return{getServerURLFromMessage:function(ot){return ot},getHTTPMethod:function(){return"POST"},getResponseType:function(){return"json"},getLicenseMessage:function(ot){if(!ot.hasOwnProperty("keys"))return null;for(var et=[],rt=0;rt<ot.keys.length;rt++){var we=ot.keys[rt],Je=we.kid.replace(/=/g,""),bt=we.k.replace(/=/g,"");et.push(new Se(Je,bt))}return new Ie(et)},getErrorResponse:function(ot){return String.fromCharCode.apply(null,new Uint8Array(ot))}}}yn.__dashjs_factory_name="ClearKey";var xn=dashjs.FactoryMaker.getSingletonFactory(yn);function Yn(){var ot,et,rt,we,Je,bt,Et,Bt,xt=this.context;function Xt(_t,Wt){return Wt&&_t in Wt?Wt[_t]:null}function $t(_t,Wt){return _t&&_t.sessionId?_t.sessionId:Wt&&Wt.sessionId?Wt.sessionId:null}function kt(_t,Wt){return _t&&_t.sessionType?_t.sessionType:Wt}return ot={initialize:function(){var _t;we=[],_t=Tt(xt).getInstance({BASE64:Je,settings:bt}),we.push(_t),_t=_e(xt).getInstance({BASE64:Je}),we.push(_t),_t=v(xt).getInstance({BASE64:Je}),we.push(_t),Et=_t,_t=D(xt).getInstance({BASE64:Je,debug:et}),we.push(_t),Bt=_t},setProtectionData:function(_t){for(var Wt,Ht,an=0;an<we.length;an++){var pn=we[an];pn.hasOwnProperty("init")&&pn.init((Wt=pn.systemString,Ht=void 0,Ht=null,_t&&(Ht=Wt in _t?_t[Wt]:null),Ht))}},isClearKey:function(_t){return _t===Et||_t===Bt},initDataEquals:function(_t,Wt){if(_t.byteLength===Wt.byteLength){for(var Ht=new Uint8Array(_t),an=new Uint8Array(Wt),pn=0;pn<Ht.length;pn++)if(Ht[pn]!==an[pn])return!1;return!0}return!1},getKeySystems:function(){return we},setKeySystems:function(_t){we=_t},getKeySystemBySystemString:function(_t){for(var Wt=0;Wt<we.length;Wt++)if(we[Wt].systemString===_t)return we[Wt];return null},getSupportedKeySystemsFromContentProtection:function(_t,Wt,Ht){var an,pn,vn,tn,St=[];if(_t){var It=_.findCencContentProtection(_t);for(vn=0;vn<we.length;++vn){var Ft=Xt((pn=we[vn]).systemString,Wt);for(tn=0;tn<_t.length;++tn)if((an=_t[tn]).schemeIdUri.toLowerCase()===pn.schemeIdURI){var rn=pn.getInitData(an,It);St.push({ks:we[vn],keyId:an.keyId,initData:rn,protData:Ft,cdmData:pn.getCDMData(Ft?Ft.cdmData:null),sessionId:$t(Ft,an),sessionType:kt(Ft,Ht)})}}}return St},getSupportedKeySystemsFromSegmentPssh:function(_t,Wt,Ht){for(var an,pn=[],vn=_.parsePSSHList(_t),tn=0;tn<we.length;++tn){var St=Xt((an=we[tn]).systemString,Wt);an.uuid in vn&&pn.push({ks:an,initData:vn[an.uuid],protData:St,cdmData:an.getCDMData(St?St.cdmData:null),sessionId:$t(St),sessionType:kt(St,Ht)})}return pn},getLicenseServerModelInstance:function(_t,Wt,Ht){if(Ht==="license-release"||Ht==="individualization-request")return null;var an=null;return Wt&&Wt.hasOwnProperty("drmtoday")?an=Ut(xt).getInstance({BASE64:Je}):_t.systemString===Rt.WIDEVINE_KEYSTEM_STRING?an=nn(xt).getInstance():_t.systemString===Rt.PLAYREADY_KEYSTEM_STRING?an=zt(xt).getInstance():_t.systemString===Rt.CLEARKEY_KEYSTEM_STRING&&(an=xn(xt).getInstance()),an},processClearKeyLicenseRequest:function(_t,Wt,Ht){try{return _t.getClearKeysFromProtectionData(Wt,Ht)}catch{return rt.error("Failed to retrieve clearkeys from ProtectionData"),null}},setConfig:function(_t){_t&&(_t.debug&&(et=_t.debug,rt=et.getLogger(ot)),_t.BASE64&&(Je=_t.BASE64),_t.settings&&(bt=_t.settings))}},ot}Yn.__dashjs_factory_name="ProtectionKeyController";var An=dashjs.FactoryMaker.getSingletonFactory(Yn);function Un(ot){return Un=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(et){return typeof et}:function(et){return et&&typeof Symbol=="function"&&et.constructor===Symbol&&et!==Symbol.prototype?"symbol":typeof et},Un(ot)}function Sn(ot,et,rt){return et=Hn(et),(function(we,Je){if(Je&&(Un(Je)=="object"||typeof Je=="function"))return Je;if(Je!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(bt){if(bt===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return bt})(we)})(ot,kn()?Reflect.construct(et,[],Hn(ot).constructor):et.apply(ot,rt))}function kn(){try{var ot=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(kn=function(){return!!ot})()}function Hn(ot){return Hn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(et){return et.__proto__||Object.getPrototypeOf(et)},Hn(ot)}function Kn(ot,et){return Kn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(rt,we){return rt.__proto__=we,rt},Kn(ot,et)}var pr=new((function(ot){function et(){var we;return(function(Je,bt){if(!(Je instanceof bt))throw new TypeError("Cannot call a class as a function")})(this,et),(we=Sn(this,et)).INTERNAL_KEY_MESSAGE="internalKeyMessage",we.INTERNAL_KEY_STATUS_CHANGED="internalkeyStatusChanged",we.KEY_ADDED="public_keyAdded",we.KEY_ERROR="public_keyError",we.KEY_MESSAGE="public_keyMessage",we.KEY_SESSION_CLOSED="public_keySessionClosed",we.KEY_SESSION_CREATED="public_keySessionCreated",we.KEY_SESSION_REMOVED="public_keySessionRemoved",we.KEY_STATUSES_CHANGED="public_keyStatusesChanged",we.KEY_SYSTEM_ACCESS_COMPLETE="public_keySystemAccessComplete",we.KEY_SYSTEM_SELECTED="public_keySystemSelected",we.LICENSE_REQUEST_COMPLETE="public_licenseRequestComplete",we.LICENSE_REQUEST_SENDING="public_licenseRequestSending",we.NEED_KEY="needkey",we.PROTECTION_CREATED="public_protectioncreated",we.PROTECTION_DESTROYED="public_protectiondestroyed",we.SERVER_CERTIFICATE_UPDATED="serverCertificateUpdated",we.TEARDOWN_COMPLETE="protectionTeardownComplete",we.VIDEO_ELEMENT_SELECTED="videoElementSelected",we.KEY_SESSION_UPDATED="public_keySessionUpdated",we}return(function(we,Je){if(typeof Je!="function"&&Je!==null)throw new TypeError("Super expression must either be null or a function");we.prototype=Object.create(Je&&Je.prototype,{constructor:{value:we,writable:!0,configurable:!0}}),Object.defineProperty(we,"prototype",{writable:!1}),Je&&Kn(we,Je)})(et,ot),rt=et,Object.defineProperty(rt,"prototype",{writable:!1}),rt;var rt})(M(9656).A));function Nr(ot,et,rt){return Object.defineProperty(ot,"prototype",{writable:!1}),ot}var hr=Nr((function ot(et,rt){(function(we,Je){if(!(we instanceof Je))throw new TypeError("Cannot call a class as a function")})(this,ot),this.initData=et,this.initDataType=rt}));function sr(ot,et,rt){return Object.defineProperty(ot,"prototype",{writable:!1}),ot}var gr=sr((function ot(et,rt,we,Je){(function(bt,Et){if(!(bt instanceof Et))throw new TypeError("Cannot call a class as a function")})(this,ot),this.sessionToken=et,this.message=rt,this.defaultURL=we,this.messageType=Je||"license-request"}));function kr(ot,et,rt){return Object.defineProperty(ot,"prototype",{writable:!1}),ot}var Gr=kr((function ot(et,rt){(function(we,Je){if(!(we instanceof Je))throw new TypeError("Cannot call a class as a function")})(this,ot),this.keySystem=et,this.ksConfiguration=rt})),Ar={};function jr(ot){ot=ot||{};var et,rt,we,Je,bt,Et,Bt,xt,Xt=this.context,$t=ot.eventBus,kt=ot.events,_t=ot.debug;function Wt(St,It,Ft,rn){if(navigator.requestMediaKeySystemAccess===void 0||typeof navigator.requestMediaKeySystemAccess!="function"){var un="Insecure origins are not allowed";return $t.trigger(kt.KEY_SYSTEM_ACCESS_COMPLETE,{error:un}),void rn({error:un})}var _n=St[It].protData&&St[It].protData.systemStringPriority?St[It].protData.systemStringPriority:null,Tn=St[It].configs,qn=St[It].ks,Vn=qn.systemString;(function(In,Bn){return new Promise((function(Ln,Wn){Ht(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,$t.trigger(kt.KEY_SYSTEM_ACCESS_COMPLETE,{data:Ln}),Ft({data:Ln})})).catch((function(In){if(It+1<St.length)Wt(St,It+1,Ft,rn);else{var Bn="Key system access denied! ";$t.trigger(kt.KEY_SYSTEM_ACCESS_COMPLETE,{error:Bn+In.message}),rn({error:Bn+In.message})}}))}function Ht(St,It,Ft,rn,un){var _n=St[Ft];rt.debug("Requesting key system access for system string ".concat(_n)),navigator.requestMediaKeySystemAccess(_n,It).then((function(Tn){Tn.selectedSystemString=_n,rn(Tn)})).catch((function(Tn){Ft+1<St.length?Ht(St,It,Ft+1,rn,un):un(Tn)}))}function an(St){if(!St||!St.session)return Promise.resolve;var It=St.session;return It.removeEventListener("keystatuseschange",St),It.removeEventListener("message",St),It.close()}function pn(St){for(var It=0;It<Et.length;It++)if(Et[It]===St){Et.splice(It,1);break}}function vn(St){var It,Ft;return St&&St.length>0&&(St[0]&&(typeof St[0]=="string"?It=St[0]:Ft=St[0]),St[1]&&(typeof St[1]=="string"?It=St[1]:Ft=St[1])),{status:It,keyId:Ft}}function tn(St,It){var Ft={session:St,keyId:It.keyId,initData:It.initData,sessionId:It.sessionId,sessionType:It.sessionType,handleEvent:function(rn){switch(rn.type){case"keystatuseschange":$t.trigger(kt.KEY_STATUSES_CHANGED,{data:this}),rn.target.keyStatuses.forEach((function(){var _n=vn(arguments);_n.status==="expired"?$t.trigger(kt.INTERNAL_KEY_STATUS_CHANGED,{error:new x.A(W.KEY_STATUS_CHANGED_EXPIRED_ERROR_CODE,W.KEY_STATUS_CHANGED_EXPIRED_ERROR_MESSAGE)}):$t.trigger(kt.INTERNAL_KEY_STATUS_CHANGED,_n)}));break;case"message":var un=ArrayBuffer.isView(rn.message)?rn.message.buffer:rn.message;$t.trigger(kt.INTERNAL_KEY_MESSAGE,{data:new gr(this,un,void 0,rn.messageType)})}},getKeyId:function(){return this.keyId},getSessionId:function(){return St.sessionId},getSessionType:function(){return this.sessionType},getExpirationTime:function(){return St.expiration},getKeyStatuses:function(){return St.keyStatuses},getUsable:function(){var rn=!1;return St.keyStatuses.forEach((function(){vn(arguments).status==="usable"&&(rn=!0)})),rn}};return St.addEventListener("keystatuseschange",Ft),St.addEventListener("message",Ft),St.closed.then((function(){pn(Ft),rt.debug("DRM: Session closed. SessionID = "+Ft.getSessionId()),$t.trigger(kt.KEY_SESSION_CLOSED,{data:Ft.getSessionId()})})),Et.push(Ft),Ft}return et={getAllInitData:function(){for(var St=[],It=0;It<Et.length;It++)Et[It].initData&&St.push(Et[It].initData);return St},getSessions:function(){return Et},requestKeySystemAccess:function(St){return new Promise((function(It,Ft){Wt(St,0,It,Ft)}))},selectKeySystem:function(St){return new Promise((function(It,Ft){St.mksa.createMediaKeys().then((function(rn){return we=St.keySystem,bt=rn,Je?Je.setMediaKeys(bt):Promise.resolve()})).then((function(){It(we)})).catch((function(){Ft({error:"Error selecting keys system ("+St.keySystem.systemString+")! Could not create MediaKeys -- TODO"})}))}))},setMediaElement:function(St){Je!==St&&(Je&&(Je.removeEventListener("encrypted",Bt),Je.setMediaKeys&&Je.setMediaKeys(null)),(Je=St)&&(Je.addEventListener("encrypted",Bt),Je.setMediaKeys&&bt&&Je.setMediaKeys(bt)))},setServerCertificate:function(St){if(!we||!bt)throw new Error("Can not set server certificate until you have selected a key system");bt.setServerCertificate(St).then((function(){rt.info("DRM: License server certificate successfully updated."),$t.trigger(kt.SERVER_CERTIFICATE_UPDATED)})).catch((function(It){$t.trigger(kt.SERVER_CERTIFICATE_UPDATED,{error:new x.A(W.SERVER_CERTIFICATE_UPDATED_ERROR_CODE,W.SERVER_CERTIFICATE_UPDATED_ERROR_MESSAGE+It.name)})}))},createKeySession:function(St){if(!we||!bt)throw new Error("Can not create sessions until you have selected a key system");var It=bt.createSession(St.sessionType),Ft=tn(It,St),rn=we.systemString===Rt.CLEARKEY_KEYSTEM_STRING&&(St.initData||St.protData&&St.protData.clearkeys)?Rt.INITIALIZATION_DATA_TYPE_KEYIDS:Rt.INITIALIZATION_DATA_TYPE_CENC;It.generateRequest(rn,St.initData).then((function(){rt.debug("DRM: Session created. SessionID = "+Ft.getSessionId()),$t.trigger(kt.KEY_SESSION_CREATED,{data:Ft})})).catch((function(un){pn(Ft),$t.trigger(kt.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(St,It){var Ft=St.session;xt.isClearKey(we)&&(It=It.toJWK()),Ft.update(It).then((function(){$t.trigger(kt.KEY_SESSION_UPDATED)})).catch((function(rn){$t.trigger(kt.KEY_ERROR,{error:new x.A(W.MEDIA_KEYERR_CODE,"Error sending update() message! "+rn.name,St)})}))},loadKeySession:function(St){if(!we||!bt)throw new Error("Can not load sessions until you have selected a key system");for(var It=St.sessionId,Ft=0;Ft<Et.length;Ft++)if(It===Et[Ft].sessionId)return void rt.warn("DRM: Ignoring session ID because we have already seen it!");var rn=bt.createSession(St.sessionType),un=tn(rn,St);rn.load(It).then((function(_n){_n?(rt.debug("DRM: Session loaded. SessionID = "+un.getSessionId()),$t.trigger(kt.KEY_SESSION_CREATED,{data:un})):(pn(un),$t.trigger(kt.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 ("+It+")")}))})).catch((function(_n){pn(un),$t.trigger(kt.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 ("+It+")! "+_n.name)})}))},removeKeySession:function(St){St.session.remove().then((function(){rt.debug("DRM: Session removed. SessionID = "+St.getSessionId()),$t.trigger(kt.KEY_SESSION_REMOVED,{data:St.getSessionId()})}),(function(It){$t.trigger(kt.KEY_SESSION_REMOVED,{data:null,error:"Error removing session ("+St.getSessionId()+"). "+It.name})}))},closeKeySession:function(St){an(St).catch((function(It){pn(St),$t.trigger(kt.KEY_SESSION_CLOSED,{data:null,error:"Error closing session ("+St.getSessionId()+") "+It.name})}))},stop:function(){for(var St,It=0;It<Et.length;It++)(St=Et[It]).getUsable()||(an(St),pn(St))},reset:function(){var St,It=Et.length;if(It!==0)for(var Ft=function(un){pn(un),Et.length===0&&(Je?(Je.removeEventListener("encrypted",Bt),Je.setMediaKeys(null).then((function(){$t.trigger(kt.TEARDOWN_COMPLETE)}))):$t.trigger(kt.TEARDOWN_COMPLETE))},rn=0;rn<It;rn++)(function(un){an(St),Ft(un)})(St=Et[rn]);else $t.trigger(kt.TEARDOWN_COMPLETE)}},rt=_t.getLogger(et),we=null,Je=null,bt=null,Et=[],xt=An(Xt).getInstance(),Bt={handleEvent:function(St){if(St.type==="encrypted"&&St.initData){var It=ArrayBuffer.isView(St.initData)?St.initData.buffer:St.initData;$t.trigger(kt.NEED_KEY,{key:new hr(It,St.initDataType)})}}},et}Ar[Rt.PLAYREADY_KEYSTEM_STRING]=[Rt.PLAYREADY_KEYSTEM_STRING,Rt.PLAYREADY_RECOMMENDATION_KEYSTEM_STRING],Ar[Rt.WIDEVINE_KEYSTEM_STRING]=[Rt.WIDEVINE_KEYSTEM_STRING],Ar[Rt.CLEARKEY_KEYSTEM_STRING]=[Rt.CLEARKEY_KEYSTEM_STRING],jr.__dashjs_factory_name="ProtectionModel_21Jan2015";var Li=dashjs.FactoryMaker.getClassFactory(jr);function Cr(ot){ot=ot||{};var et,rt,we,Je,bt,Et,Bt,xt,Xt,$t=this.context,kt=ot.eventBus,_t=ot.events,Wt=ot.debug,Ht=ot.api;function an(){try{for(var tn=0;tn<Bt.length;tn++)pn(Bt[tn]);we&&we.removeEventListener(Ht.needkey,xt),kt.trigger(_t.TEARDOWN_COMPLETE)}catch(St){kt.trigger(_t.TEARDOWN_COMPLETE,{error:"Error tearing down key sessions and MediaKeys! -- "+St.message})}}function pn(tn){var St=tn.session;St.removeEventListener(Ht.error,tn),St.removeEventListener(Ht.message,tn),St.removeEventListener(Ht.ready,tn),St.removeEventListener(Ht.close,tn);for(var It=0;It<Bt.length;It++)if(Bt[It]===tn){Bt.splice(It,1);break}St[Ht.release]()}function vn(){var tn=null,St=function(){we.removeEventListener("loadedmetadata",tn),we[Ht.setMediaKeys](bt),kt.trigger(_t.VIDEO_ELEMENT_SELECTED)};we.readyState>=1?St():(tn=St.bind(this),we.addEventListener("loadedmetadata",tn))}return et={getAllInitData:function(){for(var tn=[],St=0;St<Bt.length;St++)tn.push(Bt[St].initData);return tn},getSessions:function(){return Bt},requestKeySystemAccess:function(tn){return new Promise((function(St,It){for(var Ft=!1,rn=0;rn<tn.length;rn++)for(var un=tn[rn].ks.systemString,_n=tn[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[Ht.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[Ht.MediaKeys].isTypeSupported(un,Bn[Wn].contentType)&&qn.push(Bn[Wn])}if(!(!Tn&&!qn||Tn&&Tn.length===0||qn&&qn.length===0)){Ft=!0;var Tr=new g(Tn,qn),mr=Xt.getKeySystemBySystemString(un),tr=new Gr(mr,Tr);kt.trigger(_t.KEY_SYSTEM_ACCESS_COMPLETE,{data:tr}),St({data:tr});break}}if(!Ft){var Xn="Key system access denied! -- No valid audio/video content configurations detected!";kt.trigger(_t.KEY_SYSTEM_ACCESS_COMPLETE,{error:Xn}),It({error:Xn})}}))},selectKeySystem:function(tn){return new Promise((function(St,It){try{bt=tn.mediaKeys=new window[Ht.MediaKeys](tn.keySystem.systemString),Je=tn.keySystem,Et=tn,we&&vn(),St(Je)}catch{It({error:"Error selecting keys system ("+Je.systemString+")! Could not create MediaKeys -- TODO"})}}))},setMediaElement:function(tn){we!==tn&&(we&&we.removeEventListener(Ht.needkey,xt),(we=tn)&&(we.addEventListener(Ht.needkey,xt),bt&&vn()))},createKeySession:function(tn){if(!Je||!bt||!Et)throw new Error("Can not create sessions until you have selected a key system");var St=null;if(Et.ksConfiguration.videoCapabilities&&Et.ksConfiguration.videoCapabilities.length>0&&(St=Et.ksConfiguration.videoCapabilities[0]),St===null&&Et.ksConfiguration.audioCapabilities&&Et.ksConfiguration.audioCapabilities.length>0&&(St=Et.ksConfiguration.audioCapabilities[0]),St===null)throw new Error("Can not create sessions for unknown content types.");var It=St.contentType,Ft=bt.createSession(It,new Uint8Array(tn.initData),tn.cdmData?new Uint8Array(tn.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 Ht.error:kt.trigger(_t.KEY_ERROR,{error:new x.A(W.MEDIA_KEYERR_CODE,"KeyError",this)});break;case Ht.message:var qn=ArrayBuffer.isView(Tn.message)?Tn.message.buffer:Tn.message;kt.trigger(_t.INTERNAL_KEY_MESSAGE,{data:new gr(this,qn,Tn.destinationURL)});break;case Ht.ready:rt.debug("DRM: Key added."),kt.trigger(_t.KEY_ADDED);break;case Ht.close:rt.debug("DRM: Session closed. SessionID = "+this.getSessionId()),kt.trigger(_t.KEY_SESSION_CLOSED,{data:this.getSessionId()})}}}})(Ft,tn);Ft.addEventListener(Ht.error,rn),Ft.addEventListener(Ht.message,rn),Ft.addEventListener(Ht.ready,rn),Ft.addEventListener(Ht.close,rn),Bt.push(rn),rt.debug("DRM: Session created. SessionID = "+rn.getSessionId()),kt.trigger(_t.KEY_SESSION_CREATED,{data:rn})},updateKeySession:function(tn,St){var It=tn.session;Xt.isClearKey(Je)?It.update(new Uint8Array(St.toJWK())):It.update(new Uint8Array(St)),kt.trigger(_t.KEY_SESSION_UPDATED)},closeKeySession:pn,setServerCertificate:function(){},loadKeySession:function(){},removeKeySession:function(){},stop:an,reset:an},rt=Wt.getLogger(et),we=null,Je=null,bt=null,Et=null,Bt=[],Xt=An($t).getInstance(),xt={handleEvent:function(tn){if(tn.type===Ht.needkey&&tn.initData){var St=ArrayBuffer.isView(tn.initData)?tn.initData.buffer:tn.initData;kt.trigger(_t.NEED_KEY,{key:new hr(St,"cenc")})}}},et}Cr.__dashjs_factory_name="ProtectionModel_3Feb2014";var Dr=dashjs.FactoryMaker.getClassFactory(Cr);function li(ot){ot=ot||{};var et,rt,we,Je,bt,Et,Bt,xt,Xt,$t=this.context,kt=ot.eventBus,_t=ot.events,Wt=ot.debug,Ht=ot.api,an=ot.errHandler;function pn(){we&&St();for(var It=0;It<Bt.length;It++)vn(Bt[It]);kt.trigger(_t.TEARDOWN_COMPLETE)}function vn(It){try{we[Ht.cancelKeyRequest](Je.systemString,It.sessionId)}catch(Ft){kt.trigger(_t.KEY_SESSION_CLOSED,{data:null,error:"Error closing session ("+It.sessionId+") "+Ft.message})}}function tn(It,Ft){if(Ft&&It){for(var rn=It.length,un=0;un<rn;un++)if(It[un].sessionId==Ft)return It[un];return null}return null}function St(){we.removeEventListener(Ht.keyerror,Xt),we.removeEventListener(Ht.needkey,Xt),we.removeEventListener(Ht.keymessage,Xt),we.removeEventListener(Ht.keyadded,Xt)}return et={getAllInitData:function(){for(var It=[],Ft=0;Ft<Et.length;Ft++)It.push(Et[Ft].initData);for(var rn=0;rn<Bt.length;rn++)It.push(Bt[rn].initData);return It},getSessions:function(){return Bt.concat(Et)},requestKeySystemAccess:function(It){return new Promise((function(Ft,rn){var un=we;un||(un=document.createElement("video"));for(var _n=!1,Tn=0;Tn<It.length;Tn++)for(var qn=It[Tn].ks.systemString,Vn=It[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=bt.getKeySystemBySystemString(qn),tr=new Gr(mr,Tr);kt.trigger(_t.KEY_SYSTEM_ACCESS_COMPLETE,{data:tr}),Ft({data:tr});break}}if(!_n){var Xn="Key system access denied! -- No valid audio/video content configurations detected!";kt.trigger(_t.KEY_SYSTEM_ACCESS_COMPLETE,{error:Xn}),rn({error:Xn})}}))},selectKeySystem:function(It){return Je=It.keySystem,Promise.resolve(Je)},setMediaElement:function(It){if(we!==It){if(we){St();for(var Ft=0;Ft<Bt.length;Ft++)vn(Bt[Ft]);Bt=[]}(we=It)&&(we.addEventListener(Ht.keyerror,Xt),we.addEventListener(Ht.needkey,Xt),we.addEventListener(Ht.keymessage,Xt),we.addEventListener(Ht.keyadded,Xt),kt.trigger(_t.VIDEO_ELEMENT_SELECTED))}},createKeySession:function(It){if(!Je)throw new Error("Can not create sessions until you have selected a key system");if(xt||Bt.length===0){var Ft={sessionId:null,keyId:It.keyId,initData:It.initData,getKeyId:function(){return this.keyId},getSessionId:function(){return this.sessionId},getExpirationTime:function(){return NaN},getSessionType:function(){return"temporary"}};return Et.push(Ft),we[Ht.generateKeyRequest](Je.systemString,new Uint8Array(It.initData)),Ft}throw new Error("Multiple sessions not allowed!")},updateKeySession:function(It,Ft){var rn=It.sessionId;if(bt.isClearKey(Je))for(var un=0;un<Ft.keyPairs.length;un++)we[Ht.addKey](Je.systemString,Ft.keyPairs[un].key,Ft.keyPairs[un].keyID,rn);else we[Ht.addKey](Je.systemString,new Uint8Array(Ft),new Uint8Array(It.initData),rn);kt.trigger(_t.KEY_SESSION_UPDATED)},closeKeySession:vn,setServerCertificate:function(){},loadKeySession:function(){},removeKeySession:function(){},stop:pn,reset:pn},rt=Wt.getLogger(et),we=null,Je=null,Et=[],Bt=[],bt=An($t).getInstance(),Xt={handleEvent:function(It){var Ft=null;switch(It.type){case Ht.needkey:var rn=ArrayBuffer.isView(It.initData)?It.initData.buffer:It.initData;kt.trigger(_t.NEED_KEY,{key:new hr(rn,"cenc")});break;case Ht.keyerror:if((Ft=tn(Bt,It.sessionId))||(Ft=tn(Et,It.sessionId)),Ft){var un=W.MEDIA_KEYERR_CODE,_n="";switch(It.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 = "+It.systemCode,kt.trigger(_t.KEY_ERROR,{error:new x.A(un,_n,Ft)})}else rt.error("No session token found for key error");break;case Ht.keyadded:(Ft=tn(Bt,It.sessionId))||(Ft=tn(Et,It.sessionId)),Ft?(rt.debug("DRM: Key added."),kt.trigger(_t.KEY_ADDED,{data:Ft})):rt.debug("No session token found for key added");break;case Ht.keymessage:if((xt=It.sessionId!==null&&It.sessionId!==void 0)?!(Ft=tn(Bt,It.sessionId))&&Et.length>0&&(Ft=Et.shift(),Bt.push(Ft),Ft.sessionId=It.sessionId,kt.trigger(_t.KEY_SESSION_CREATED,{data:Ft})):Et.length>0&&(Ft=Et.shift(),Bt.push(Ft),Et.length!==0&&an.error(new x.A(W.MEDIA_KEY_MESSAGE_ERROR_CODE,W.MEDIA_KEY_MESSAGE_ERROR_MESSAGE))),Ft){var Tn=ArrayBuffer.isView(It.message)?It.message.buffer:It.message;Ft.keyMessage=Tn,kt.trigger(_t.INTERNAL_KEY_MESSAGE,{data:new gr(Ft,Tn,It.defaultURL)})}else rt.warn("No session token found for key message")}}},et}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 ot,et=this.context;function rt(we,Je){for(var bt=0;bt<Je.length;bt++){var Et=Je[bt];if(typeof we[Et[Object.keys(Et)[0]]]=="function")return Et}return null}return ot={createProtectionSystem:function(we){var Je=null,bt=An(et).getInstance();bt.setConfig({debug:we.debug,BASE64:we.BASE64,settings:we.settings}),bt.initialize();var Et=(function(Bt){var xt=Bt.debug,Xt=xt.getLogger(ot),$t=Bt.eventBus,kt=Bt.errHandler,_t=Bt.videoModel?Bt.videoModel.getElement():null;return _t&&_t.onencrypted===void 0||_t&&_t.mediaKeys===void 0?rt(_t,di)?(Xt.info("EME detected on this user agent! (ProtectionModel_3Feb2014)"),Dr(et).create({debug:xt,eventBus:$t,events:Bt.events,api:rt(_t,di)})):rt(_t,fi)?(Xt.info("EME detected on this user agent! (ProtectionModel_01b)"),ci(et).create({debug:xt,eventBus:$t,errHandler:kt,events:Bt.events,api:rt(_t,fi)})):(Xt.warn("No supported version of EME detected on this user agent! - Attempts to play encrypted content will fail!"),null):(Xt.info("EME detected on this user agent! (ProtectionModel_21Jan2015)"),Li(et).create({debug:xt,eventBus:$t,events:Bt.events}))})(we);return!Je&&Et&&(Je=le(et).create({protectionModel:Et,protectionKeyController:bt,eventBus:we.eventBus,debug:we.debug,events:we.events,BASE64:we.BASE64,constants:we.constants,cmcdModel:we.cmcdModel,customParametersModel:we.customParametersModel,settings:we.settings}),we.capabilities.setEncryptedMediaSupported(!0)),Je}}}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(vt,Le,M){var ce=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=ce.A.getClassFactory(u);n.NO_CHANGE=-1,n.PRIORITY=I,ce.A.updateClassFactory(u.__dashjs_factory_name,n),Le.A=n},2365:function(vt,Le,M){var ce=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 ne,O,J=this.context,pe=x.mediaPlayerModel,G=x.customParametersModel,X=x.dashMetrics,re=x.settings;function be(me){return me.filter((function(le){return le.quality>r.A.NO_CHANGE}))}function Ue(me){var le,je,Se,Ne,He,it={},Ie=null;if(me.length!==0){for(it[r.A.PRIORITY.STRONG]={quality:r.A.NO_CHANGE,reason:null},it[r.A.PRIORITY.WEAK]={quality:r.A.NO_CHANGE,reason:null},it[r.A.PRIORITY.DEFAULT]={quality:r.A.NO_CHANGE,reason:null},le=0,je=me.length;le<je;le+=1)(Se=me[le]).quality!==r.A.NO_CHANGE&&(it[Se.priority].quality===r.A.NO_CHANGE||it[Se.priority].quality>Se.quality)&&(it[Se.priority].quality=Se.quality,it[Se.priority].reason=Se.reason||null);return it[r.A.PRIORITY.WEAK].quality!==r.A.NO_CHANGE&&(Ie=it[r.A.PRIORITY.WEAK]),it[r.A.PRIORITY.DEFAULT].quality!==r.A.NO_CHANGE&&(Ie=it[r.A.PRIORITY.DEFAULT]),it[r.A.PRIORITY.STRONG].quality!==r.A.NO_CHANGE&&(Ie=it[r.A.PRIORITY.STRONG]),Ie&&(Ne=Ie.quality,He=Ie.reason),(0,r.A)(J).create(Ne,He)}}return{initialize:function(){ne=[],O=[],re.get().streaming.abr.useDefaultABRRules&&(re.get().streaming.abr.ABRStrategy===m.A.ABR_STRATEGY_L2A?ne.push((0,i.A)(J).create({dashMetrics:X,settings:re})):re.get().streaming.abr.ABRStrategy===m.A.ABR_STRATEGY_LoLP?ne.push((0,h.A)(J).create({dashMetrics:X})):(ne.push((0,y.A)(J).create({dashMetrics:X,mediaPlayerModel:pe,settings:re})),ne.push((0,ce.A)(J).create({dashMetrics:X})),re.get().streaming.abr.additionalAbrRules.insufficientBufferRule&&ne.push((0,I.A)(J).create({dashMetrics:X,settings:re})),re.get().streaming.abr.additionalAbrRules.switchHistoryRule&&ne.push((0,_.A)(J).create()),re.get().streaming.abr.additionalAbrRules.droppedFramesRule&&ne.push((0,n.A)(J).create()),re.get().streaming.abr.additionalAbrRules.abandonRequestsRule&&O.push((0,u.A)(J).create({dashMetrics:X,mediaPlayerModel:pe,settings:re})))),G.getAbrCustomRules().forEach((function(me){me.type===d&&ne.push(me.rule(J).create()),me.type===T&&O.push(me.rule(J).create())}))},reset:function(){[ne,O].forEach((function(me){me&&me.length&&me.forEach((function(le){return le.reset&&le.reset()}))})),ne=[],O=[]},getMaxQuality:function(me){return Ue(be(ne.map((function(le){return le.getMaxIndex(me)}))))||(0,r.A)(J).create()},getMinSwitchRequest:Ue,shouldAbandonFragment:function(me,le){var je=Ue(be(O.map((function(Se){return Se.shouldAbandon(me,le)}))));return je&&(je.reason.forceAbandon=!0),je||(0,r.A)(J).create()},getQualitySwitchRules:function(){return ne}}}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),Le.A=W},6918:function(vt,Le,M){var ce=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 ne=(0,ce.A)(m).create(ce.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 ne;var O,J,pe=x.getMediaInfo(),G=x.getMediaType(),X=x.getStreamInfo(),re=X?X.id:null,be=x.getCurrentRequest();if(!isNaN(be.index)){O=G,J=be.index,h[O]=h[O]||{},h[O][J]=h[O][J]||{};var Ue=d.getStableBufferTime();if(T.getCurrentBufferLevel(G)>Ue)return ne;var me=h[G][be.index];if(me===null||be.firstByteDate===null||g.hasOwnProperty(me.id))return ne;if(me.firstByteTime===void 0&&(r[G]=[],me.firstByteTime=be.firstByteDate.getTime(),me.segmentDuration=be.duration,me.bytesTotal=be.bytesTotal,me.id=be.index),me.bytesLoaded=be.bytesLoaded,me.elapsedTime=new Date().getTime()-me.firstByteTime,me.bytesLoaded>0&&me.elapsedTime>0&&(function(Oe,ft){r[Oe]=r[Oe]||[],r[Oe].push(ft)})(G,Math.round(8*me.bytesLoaded/me.elapsedTime)),r[G].length>=q.get().streaming.abr.abrRulesParameters.abandonRequestsRule.minLengthToAverage&&me.elapsedTime>q.get().streaming.abr.abrRulesParameters.abandonRequestsRule.graceTimeThreshold&&me.bytesLoaded<me.bytesTotal){var le=r[G].reduce((function(Oe,ft){return Oe+ft}),0);if(me.measuredBandwidthInKbps=Math.round(le/r[G].length),me.estimatedTimeOfDownload=+(8*me.bytesTotal/me.measuredBandwidthInKbps/1e3).toFixed(2),me.estimatedTimeOfDownload<me.segmentDuration*q.get().streaming.abr.abrRulesParameters.abandonRequestsRule.abandonMultiplier||x.getRepresentationInfo().quality===0)return ne;if(!g.hasOwnProperty(me.id)){var je=x.getAbrController(),Se=me.bytesTotal-me.bytesLoaded,Ne=je.getBitrateList(pe),He=je.getQualityForBitrate(pe,me.measuredBandwidthInKbps*q.get().streaming.abr.bandwidthSafetyFactor,re),it=je.getMinAllowedIndexFor(G,re),Ie=it!==void 0?Math.max(it,He):He;Se>me.bytesTotal*Ne[Ie].bitrate/Ne[je.getQualityFor(G,re)].bitrate&&(ne.quality=Ie,ne.reason.throughput=me.measuredBandwidthInKbps,ne.reason.fragmentID=me.id,ne.reason.rule=this.getClassName(),g[me.id]=me,i.debug("["+G+"] frag id",me.id," is asking to abandon and switch to quality to ",Ie," measured bandwidth was",me.measuredBandwidthInKbps),delete h[G][me.id])}}else me.bytesLoaded===me.bytesTotal&&delete h[G][me.id]}return ne},reset:W},i=(0,u.A)(m).getInstance().getLogger(y),W(),y}n.__dashjs_factory_name="AbandonRequestsRule",Le.A=I.A.getClassFactory(n)},3469:function(vt,Le,M){var ce=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,ne=d.dashMetrics,O=d.mediaPlayerModel,J=(0,_.A)(x).getInstance();function pe(Ie,Oe,ft){var At=ft.reduce((function(ee,ae,qe){return ae>ft[ee]?qe:ee}),0);if(At===0)return null;var Rt=Math.max(Ie,r+2*Oe.length),Pt=(ft[At]-1)/(Rt/r-1);return{gp:Pt,Vp:r/Pt}}function G(Ie){Ie.placeholderBuffer=0,Ie.mostAdvancedSegmentStart=NaN,Ie.lastSegmentWasReplacement=!1,Ie.lastSegmentStart=NaN,Ie.lastSegmentDurationS=NaN,Ie.lastSegmentRequestTimeMs=NaN,Ie.lastSegmentFinishTimeMs=NaN}function X(Ie,Oe){var ft=O.getStableBufferTime();if(Ie.stableBufferTime!==ft){var At=pe(ft,Ie.bitrates,Ie.utilities);if(At.Vp!==Ie.Vp||At.gp!==Ie.gp){var Rt=ne.getCurrentBufferLevel(Oe),Pt=Rt+Ie.placeholderBuffer;Pt-=r,Pt*=At.Vp/Ie.Vp,Pt+=r,Ie.stableBufferTime=ft,Ie.Vp=At.Vp,Ie.gp=At.gp,Ie.placeholderBuffer=Math.max(0,Pt-Rt)}}}function re(Ie,Oe){return Ie.Vp*(Ie.utilities[Oe]+Ie.gp)}function be(Ie,Oe){for(var ft=Ie.bitrates[Oe],At=Ie.utilities[Oe],Rt=0,Pt=Oe-1;Pt>=0;--Pt)if(Ie.utilities[Pt]<Ie.utilities[Oe]){var ee=Ie.bitrates[Pt],ae=Ie.utilities[Pt],qe=Ie.Vp*(Ie.gp+(ft*ae-ee*At)/(ft-ee));Rt=Math.max(Rt,qe)}return Rt}function Ue(Ie){var Oe=Ie.mediaType===g.A.AUDIO?[g.A.AUDIO]:W;for(var ft in Oe)W.hasOwnProperty(ft)&&W[ft].state===2&&(W[ft].placeholderBuffer=0)}function me(){for(var Ie in W)if(W.hasOwnProperty(Ie)){var Oe=W[Ie];Oe.state!==0&&(Oe.state=1,G(Oe))}}function le(Ie){if(Ie&&Ie.chunk&&Ie.chunk.mediaInfo){var Oe=W[Ie.chunk.mediaInfo.type];if(Oe&&Oe.state!==0){var ft=Ie.chunk.start;isNaN(Oe.mostAdvancedSegmentStart)||ft>Oe.mostAdvancedSegmentStart?(Oe.mostAdvancedSegmentStart=ft,Oe.lastSegmentWasReplacement=!1):Oe.lastSegmentWasReplacement=!0,Oe.lastSegmentStart=ft,Oe.lastSegmentDurationS=Ie.chunk.duration,Oe.lastQuality=Ie.chunk.quality,Se(Oe,Ie.chunk.mediaInfo.type)}}}function je(Ie){if(Ie&&Ie.metric===ce.A.HTTP_REQUEST&&Ie.value&&Ie.value.type===n.G.MEDIA_SEGMENT_TYPE&&Ie.value.trace&&Ie.value.trace.length){var Oe=W[Ie.mediaType];Oe&&Oe.state!==0&&(Oe.lastSegmentRequestTimeMs=Ie.value.trequest.getTime(),Oe.lastSegmentFinishTimeMs=Ie.value._tfinish.getTime(),Se(Oe,Ie.mediaType))}}function Se(Ie,Oe){if(!isNaN(Ie.lastSegmentStart)&&!isNaN(Ie.lastSegmentRequestTimeMs)&&!isNaN(Ie.placeholderBuffer)){if(Ie.placeholderBuffer*=.99,!isNaN(Ie.lastSegmentFinishTimeMs)){var ft=ne.getCurrentBufferLevel(Oe)+.001*(Ie.lastSegmentFinishTimeMs-Ie.lastSegmentRequestTimeMs),At=re(Ie,Ie.lastQuality),Rt=Math.max(0,At-ft);Ie.placeholderBuffer=Math.min(Rt,Ie.placeholderBuffer)}Ie.lastSegmentWasReplacement&&!isNaN(Ie.lastSegmentDurationS)&&(Ie.placeholderBuffer+=Ie.lastSegmentDurationS),Ie.lastSegmentStart=NaN,Ie.lastSegmentRequestTimeMs=NaN}}function Ne(Ie){if(Ie){var Oe=W[Ie.mediaType];Oe&&Oe.state!==0&&(Oe.abrQuality=Ie.newQuality)}}function He(Ie){if(Ie){var Oe=W[Ie.mediaType];if(Oe&&Oe.state!==0){var ft,At=ne.getCurrentBufferLevel(Ie.mediaType);ft=Oe.abrQuality>0?be(Oe,Oe.abrQuality):r;var Rt=Math.max(0,ft-At);Oe.placeholderBuffer=Math.min(Oe.placeholderBuffer,Rt)}}}function it(){W={}}return T={getMaxIndex:function(Ie){var Oe=(0,I.A)(x).create();if(!(Ie&&Ie.hasOwnProperty("getMediaInfo")&&Ie.hasOwnProperty("getMediaType")&&Ie.hasOwnProperty("getScheduleController")&&Ie.hasOwnProperty("getStreamInfo")&&Ie.hasOwnProperty("getAbrController")&&Ie.hasOwnProperty("useBufferOccupancyABR")))return Oe;var ft=Ie.getMediaInfo(),At=Ie.getMediaType(),Rt=Ie.getScheduleController(),Pt=Ie.getStreamInfo(),ee=Ie.getAbrController(),ae=ee.getThroughputHistory(),qe=Pt?Pt.id:null,v=Pt&&Pt.manifestInfo&&Pt.manifestInfo.isDynamic,A=Ie.useBufferOccupancyABR();if(Oe.reason=Oe.reason||{},!A)return Oe;Rt.setTimeToLoadDelay(0);var c=(function(_e){var Ye=_e.getMediaType(),Ve=W[Ye];return Ve?Ve.state!==0&&X(Ve,Ye):(Ve=(function(Xe){var nt={},Tt=Xe.getMediaInfo().bitrateList.map((function(zt){return zt.bandwidth})),mt=(function(zt){return zt.map((function(Qt){return Math.log(Qt)}))})(Tt);mt=mt.map((function(zt){return zt-mt[0]+1}));var Ut=O.getStableBufferTime(),Mt=pe(Ut,Tt,mt);return Mt?(nt.state=1,nt.bitrates=Tt,nt.utilities=mt,nt.stableBufferTime=Ut,nt.Vp=Mt.Vp,nt.gp=Mt.gp,nt.lastQuality=0,G(nt)):nt.state=0,nt})(_e),W[Ye]=Ve),Ve})(Ie);if(c.state===0)return Oe;var E,Q=ne.getCurrentBufferLevel(At),D=ae.getAverageThroughput(At,v),Be=ae.getSafeAverageThroughput(At,v),De=ae.getAverageLatency(At);if(Oe.reason.state=c.state,Oe.reason.throughput=D,Oe.reason.latency=De,isNaN(D))return Oe;switch(c.state){case 1:E=ee.getQualityForBitrate(ft,Be,qe,De),Oe.quality=E,Oe.reason.throughput=Be,c.placeholderBuffer=Math.max(0,be(c,E)-Q),c.lastQuality=E,!isNaN(c.lastSegmentDurationS)&&Q>=c.lastSegmentDurationS&&(c.state=2);break;case 2:(function(_e,Ye){var Ve=Date.now();if(isNaN(_e.lastSegmentFinishTimeMs)){if(!isNaN(_e.lastCallTimeMs)){var Xe=.001*(Ve-_e.lastCallTimeMs);_e.placeholderBuffer+=Math.max(0,Xe)}}else{var nt=.001*(Ve-_e.lastSegmentFinishTimeMs);_e.placeholderBuffer+=Math.max(0,nt)}_e.lastCallTimeMs=Ve,_e.lastSegmentStart=NaN,_e.lastSegmentRequestTimeMs=NaN,_e.lastSegmentFinishTimeMs=NaN,X(_e,Ye)})(c,At),E=(function(_e,Ye){for(var Ve=_e.bitrates.length,Xe=NaN,nt=NaN,Tt=0;Tt<Ve;++Tt){var mt=(_e.Vp*(_e.utilities[Tt]+_e.gp)-Ye)/_e.bitrates[Tt];(isNaN(nt)||mt>=nt)&&(nt=mt,Xe=Tt)}return Xe})(c,Q+c.placeholderBuffer);var Ae=ee.getQualityForBitrate(ft,Be,qe,De);E>c.lastQuality&&E>Ae&&(E=Math.max(Ae,c.lastQuality));var Re=Math.max(0,Q+c.placeholderBuffer-re(c,E));Re<=c.placeholderBuffer?(c.placeholderBuffer-=Re,Re=0):(Re-=c.placeholderBuffer,c.placeholderBuffer=0,E<ee.getMaxAllowedIndexFor(At,qe)?Rt.setTimeToLoadDelay(1e3*Re):Re=0),Oe.quality=E,Oe.reason.throughput=D,Oe.reason.latency=De,Oe.reason.bufferLevel=Q,Oe.reason.placeholderBuffer=c.placeholderBuffer,Oe.reason.delay=Re,c.lastQuality=E;break;default:q.debug("BOLA ABR rule invoked in bad state."),Oe.quality=ee.getQualityForBitrate(ft,Be,qe,De),Oe.reason.state=c.state,Oe.reason.throughput=Be,Oe.reason.latency=De,c.state=1,G(c)}return Oe},reset:function(){it(),J.off(h.A.BUFFER_EMPTY,Ue,T),J.off(h.A.PLAYBACK_SEEKING,me,T),J.off(h.A.METRIC_ADDED,je,T),J.off(h.A.QUALITY_CHANGE_REQUESTED,Ne,T),J.off(h.A.FRAGMENT_LOADING_ABANDONED,He,T),J.off(y.A.MEDIA_FRAGMENT_LOADED,le,T)}},q=(0,i.A)(x).getInstance().getLogger(T),it(),J.on(h.A.BUFFER_EMPTY,Ue,T),J.on(h.A.PLAYBACK_SEEKING,me,T),J.on(h.A.METRIC_ADDED,je,T),J.on(h.A.QUALITY_CHANGE_REQUESTED,Ne,T),J.on(h.A.FRAGMENT_LOADING_ABANDONED,He,T),J.on(y.A.MEDIA_FRAGMENT_LOADED,le,T),T}m.__dashjs_factory_name="BolaRule",Le.A=u.A.getClassFactory(m)},7933:function(vt,Le,M){var ce=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",Le.A=ce.A.getClassFactory(n)},8008:function(vt,Le,M){var ce=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,ce.A)(W).getInstance(),ne=r.dashMetrics;function O(){(T={})[y.A.VIDEO]={ignoreCount:q},T[y.A.AUDIO]={ignoreCount:q}}function J(){O()}function pe(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(!ne||!ne.hasOwnProperty("getCurrentBufferLevel")||!ne.hasOwnProperty("getCurrentBufferState"))throw new Error(y.A.MISSING_CONFIG_ERROR)})();var re=G.getMediaType(),be=ne.getCurrentBufferState(re),Ue=G.getRepresentationInfo().fragmentDuration,me=G.getStreamInfo(),le=me?me.id:null,je=G.getScheduleController(),Se=me&&me.manifestInfo&&me.manifestInfo.isDynamic;if((function(Rt,Pt){return!Rt&&T[Pt].ignoreCount>0})(je.getPlaybackController().getLowLatencyModeEnabled(),re)||!Ue)return X;if(be&&be.state===i.A.BUFFER_EMPTY)d.debug("["+re+"] Switch to index 0; buffer is empty."),X.quality=0,X.reason="InsufficientBufferRule: Buffer is empty";else{var Ne=G.getMediaInfo(),He=G.getAbrController(),it=He.getThroughputHistory(),Ie=ne.getCurrentBufferLevel(re),Oe=it.getAverageThroughput(re,Se),ft=it.getAverageLatency(re),At=Oe*(Ie/Ue)*.5;X.quality=He.getQualityForBitrate(Ne,At,le,ft),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,pe,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,pe,m),m}g.__dashjs_factory_name="InsufficientBufferRule",Le.A=u.A.getClassFactory(g)},2244:function(vt,Le,M){var ce=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,ne=(0,_.A)(W).getInstance();function O(me){me.placeholderBuffer=0,me.mostAdvancedSegmentStart=NaN,me.lastSegmentWasReplacement=!1,me.lastSegmentStart=NaN,me.lastSegmentDurationS=NaN,me.lastSegmentRequestTimeMs=NaN,me.lastSegmentFinishTimeMs=NaN,me.lastSegmentUrl=""}function J(){for(var me in d)if(d.hasOwnProperty(me)){var le=d[me];le.state!==0&&(le.state=1,O(le))}}function pe(me){if(me&&me.chunk&&me.chunk.mediaInfo){var le=d[me.chunk.mediaInfo.type],je=T[me.chunk.mediaInfo.type];if(le&&le.state!==0){var Se=me.chunk.start;isNaN(le.mostAdvancedSegmentStart)||Se>le.mostAdvancedSegmentStart?(le.mostAdvancedSegmentStart=Se,le.lastSegmentWasReplacement=!1):le.lastSegmentWasReplacement=!0,le.lastSegmentStart=Se,le.lastSegmentDurationS=me.chunk.duration,le.lastQuality=me.chunk.quality,X(le,je)}}}function G(me){if(me&&me.metric===ce.A.HTTP_REQUEST&&me.value&&me.value.type===n.G.MEDIA_SEGMENT_TYPE&&me.value.trace&&me.value.trace.length){var le=d[me.mediaType],je=T[me.mediaType];le&&le.state!==0&&(le.lastSegmentRequestTimeMs=me.value.trequest.getTime(),le.lastSegmentFinishTimeMs=me.value._tfinish.getTime(),X(le,je))}}function X(me,le){isNaN(me.lastSegmentStart)||isNaN(me.lastSegmentRequestTimeMs)||(le.segment_request_start_s=.001*me.lastSegmentRequestTimeMs,le.segment_download_finish_s=.001*me.lastSegmentFinishTimeMs,me.lastSegmentStart=NaN,me.lastSegmentRequestTimeMs=NaN)}function re(me){if(me&&me.mediaType){var le=d[me.mediaType];le&&le.state!==0&&(le.abrQuality=me.newQuality)}}function be(me,le){if(me.length!==le.length)return-1;for(var je=0,Se=0;Se<me.length;Se++)je+=me[Se]*le[Se];return je}function Ue(){d={},T={}}return m={getMaxIndex:function(me){var le,je=(0,I.A)(W).create(),Se=Math.pow(4,.99),Ne=Math.max(Math.pow(4,1),Se*Math.sqrt(4)),He=me.getMediaInfo(),it=me.getMediaType(),Ie=He.bitrateList.map((function(Mt){return Mt.bandwidth})),Oe=Ie.length,ft=me.getScheduleController(),At=me.getStreamInfo(),Rt=me.getAbrController(),Pt=Rt.getThroughputHistory(),ee=At&&At.manifestInfo&&At.manifestInfo.isDynamic,ae=me.useL2AABR(),qe=x.getCurrentBufferLevel(it,!0),v=Pt.getSafeAverageThroughput(it,ee),A=Pt.getAverageThroughput(it,ee),c=Pt.getAverageLatency(it),E=me.getVideoModel().getPlaybackRate();if(!(me&&me.hasOwnProperty("getMediaInfo")&&me.hasOwnProperty("getMediaType")&&me.hasOwnProperty("getScheduleController")&&me.hasOwnProperty("getStreamInfo")&&me.hasOwnProperty("getAbrController")&&me.hasOwnProperty("useL2AABR"))||(je.reason=je.reason||{},!ae||it===h.A.AUDIO))return je;ft.setTimeToLoadDelay(0);var Q=(function(Mt){var zt=Mt.getMediaType(),Qt=d[zt];return Qt||(Qt=(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})(Mt),d[zt]=Qt),Qt})(me);if(Q.state===0)return je;var D=T[it];if(!D||(je.reason.state=Q.state,je.reason.throughput=A,je.reason.latency=c,isNaN(A)))return je;switch(Q.state){case 1:if(le=Rt.getQualityForBitrate(He,v,At.id,c),je.quality=le,je.reason.throughput=v,Q.lastQuality=le,!isNaN(Q.lastSegmentDurationS)&&qe>=D.B_target){Q.state=2,D.Q=Se;for(var Be=0;Be<Oe;++Be)Be===Q.lastQuality?D.prev_w[Be]=1:D.prev_w[Be]=0}break;case 2:var De=[],Ae=x.getCurrentHttpRequest(it).trace.reduce((function(Mt,zt){return Mt+zt.d}),0),Re=x.getCurrentHttpRequest(it).trace.reduce((function(Mt,zt){return Mt+zt.b[0]}),0),_e=Math.round(8*Re/Ae),Ye=x.getCurrentHttpRequest(it);if(_e<1&&(_e=1),Ye.url===Q.lastSegmentUrl||Ye.type===n.G.INIT_SEGMENT_TYPE)le=Q.lastQuality;else{for(var Ve=Q.lastSegmentDurationS,Xe=1,nt=0;nt<Oe;++nt)Ie[nt]=Ie[nt]/1e3,E*Ie[nt]>_e&&(Xe=-1),D.w[nt]=D.prev_w[nt]+Xe*(Ve/(2*Ne))*((D.Q+Se)*(E*Ie[nt]/_e));D.w=(function(Mt){for(var zt=Mt.length,Qt=!1,nn=[],yn=0;yn<zt;++yn)nn[yn]=Mt[yn];for(var xn=Mt.sort((function(Hn,Kn){return Kn-Hn})),Yn=0,An=0,Un=[],Sn=0;Sn<zt-1;++Sn)if((An=((Yn+=xn[Sn])-1)/(Sn+1))>=xn[Sn+1]){Qt=!0;break}Qt||(An=(Yn+xn[zt-1]-1)/zt);for(var kn=0;kn<zt;++kn)Un[kn]=Math.max(nn[kn]-An,0);return Un})(D.w);for(var Tt=0;Tt<Oe;++Tt)De[Tt]=D.w[Tt]-D.prev_w[Tt],D.prev_w[Tt]=D.w[Tt];D.Q=Math.max(0,D.Q-Ve+Ve*E*((be(Ie,D.prev_w)+be(Ie,De))/_e));for(var mt=[],Ut=0;Ut<Oe;++Ut)mt[Ut]=Math.abs(Ie[Ut]-be(D.w,Ie));(le=mt.indexOf(Math.min.apply(Math,mt)))>Q.lastQuality&&Ie[Q.lastQuality+1]<=_e&&(le=Q.lastQuality+1),Ie[le]>=_e&&(D.Q=2*Math.max(Se,D.Q)),Q.lastSegmentUrl=Ye.url}je.quality=le,je.reason.throughput=A,je.reason.latency=c,je.reason.bufferLevel=qe,Q.lastQuality=je.quality;break;default:q.debug("L2A ABR rule invoked in bad state."),je.quality=Rt.getQualityForBitrate(He,v,At.id,c),je.reason.state=Q.state,je.reason.throughput=v,je.reason.latency=c,Q.state=1,O(Q)}return je},reset:function(){Ue(),ne.off(y.A.PLAYBACK_SEEKING,J,m),ne.off(y.A.MEDIA_FRAGMENT_LOADED,pe,m),ne.off(y.A.METRIC_ADDED,G,m),ne.off(y.A.QUALITY_CHANGE_REQUESTED,re,m)}},q=(0,i.A)(W).getInstance().getLogger(m),Ue(),ne.on(y.A.PLAYBACK_SEEKING,J,m),ne.on(y.A.MEDIA_FRAGMENT_LOADED,pe,m),ne.on(y.A.METRIC_ADDED,G,m),ne.on(y.A.QUALITY_CHANGE_REQUESTED,re,m),m}g.__dashjs_factory_name="L2ARule",Le.A=u.A.getClassFactory(g)},549:function(vt,Le,M){var ce=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",Le.A=ce.A.getClassFactory(n)},1499:function(vt,Le,M){var ce=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(),ne=x?x.id:null,O=x&&x.manifestInfo?x.manifestInfo.isDynamic:null,J=W.getThroughputHistory(),pe=J.getSafeAverageThroughput(d,O),G=J.getAverageLatency(d),X=g.useBufferOccupancyABR();return isNaN(pe)||!T||X||W.getAbandonmentStateFor(ne,d)!==n.A.ABANDON_LOAD&&(T.state===n.A.BUFFER_LOADED||O)&&(r.quality=W.getQualityForBitrate(m,pe,ne,G),q.setTimeToLoadDelay(0),r.reason={throughput:pe,latency:G}),r},reset:function(){}}}_.__dashjs_factory_name="ThroughputRule",Le.A=ce.A.getClassFactory(_)},5892:function(vt,Le,M){var ce=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 pe=0;if(y)for(var G=0;G<y.length;G++){var X=y[G];X.state.throughput>pe&&(pe=X.state.throughput)}return pe}function x(pe,G,X){var re=pe.map((function(be,Ue){return X[Ue]*Math.pow(be-G[Ue],2)})).reduce((function(be,Ue){return be+Ue}));return(re<0?-1:1)*Math.sqrt(Math.abs(re))}function ne(pe,G){return x([pe.state.throughput,pe.state.latency,pe.state.rebuffer,pe.state.switch],[G.state.throughput,G.state.latency,G.state.rebuffer,G.state.switch],[1,1,1,1])}function O(pe,G,X){for(var re=0;re<G.length;re++){var be=G[re],Ue=ne(be,pe);J(be,X,Math.exp(-1*Math.pow(Ue,2)/(2*Math.pow(.1,2))))}}function J(pe,G,X){var re=pe.state,be=[.01,.01,.01,.01];re.throughput=re.throughput+(G[0]-re.throughput)*be[0]*X,re.latency=re.latency+(G[1]-re.latency)*be[1]*X,re.rebuffer=re.rebuffer+(G[2]-re.rebuffer)*be[2]*X,re.switch=re.switch+(G[3]-re.switch)*be[3]*X}return n={getNextQuality:function(pe,G,X,re,be,Ue,me){var le=X,je=re,Se=G,Ne=(function(D){if(!y){y=[];var Be=D.bitrateList,De=[];g=Be[0].bandwidth,Be.forEach((function(Ye){De.push(Ye.bandwidth),Ye.bandwidth<g&&(g=Ye.bandwidth)})),_e=De.map((function(Ye){return Math.pow(Ye,2)})).reduce((function(Ye,Ve){return Ye+Ve})),i=Math.sqrt(_e);for(var Ae=0;Ae<Be.length;Ae++){var Re={qualityIndex:Ae,bitrate:Be[Ae].bandwidth,state:{throughput:Be[Ae].bandwidth/i,latency:0,rebuffer:0,switch:0}};y.push(Re)}m=(function(Ye){var Ve=[],Xe=(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(Ye.length,2));Ve.push(Xe[0]);for(var nt=[1,1,1,1],Tt=1;Tt<Ye.length;Tt++){for(var mt=null,Ut=null,Mt=0;Mt<Xe.length;Mt++){for(var zt=Xe[Mt],Qt=null,nn=0;nn<Ve.length;nn++){var yn=x(zt,Ve[nn],nt);(Qt===null||yn<Qt)&&(Qt=yn)}(Ut===null||Qt>Ut)&&(mt=zt,Ut=Qt)}Ve.push(mt)}for(var xn=null,Yn=null,An=0;An<Ve.length;An++){for(var Un=0,Sn=0;Sn<Ve.length;Sn++)An!==Sn&&(Un+=x(Ve[An],Ve[Sn],nt));(xn===null||Un>xn)&&(xn=Un,Yn=An)}var kn=[];for(kn.push(Ve[Yn]),Ve.splice(Yn,1);Ve.length>0;){for(var Hn=null,Kn=null,pr=0;pr<Ve.length;pr++){var Nr=x(kn[0],Ve[pr],nt);(Hn===null||Nr<Hn)&&(Hn=Nr,Kn=pr)}kn.push(Ve[Kn]),Ve.splice(Kn,1)}return kn})(y)}var _e;return y})(pe),He=G/i;He>1&&(He=W()),X/=h,_.debug("getNextQuality called throughput:".concat(He," latency:").concat(X," bufferSize:").concat(re," currentQualityIndex:").concat(Ue," playbackRate:").concat(be));var it=Ne[Ue],Ie=it.bitrate*me.getSegmentDuration()/Se,Oe=Math.max(0,Ie-je);if(je-Ie<me.getMinBuffer())return _.debug("Buffer is low for bitrate= ".concat(it.bitrate," downloadTime=").concat(Ie," currentBuffer=").concat(je," rebuffer=").concat(Oe)),(function(D,Be){var De=0,Ae=D;if(y)for(var Re=0;Re<y.length;Re++){var _e=y[Re];_e.bitrate<D.bitrate&&_e.bitrate>De&&Be>_e.bitrate&&(De=_e.bitrate,Ae=_e)}return Ae})(it,Se).qualityIndex;switch(d){case"manual_weight_selection":r=[.4,.4,.4,.4];break;case"random_weight_selection":(function(D){r=(function(Be){for(var De=[],Ae=Math.sqrt(2/Be),Re=0;Re<4;Re++)De.push(Math.random()*Ae);return r=De})(D.length)})(Ne);break;default:(function(D,Be,De,Ae,Re,_e,Ye){r||(r=m[m.length-1]);var Ve=D.findWeightVector(Be,De,Ae,Re,_e,Ye);Ve!==null&&Ve!==-1&&(r=Ve)})(me,Ne,le,je,Oe,Se,be)}for(var ft=null,At=null,Rt=null,Pt=0;Pt<Ne.length;Pt++){var ee=Ne[Pt],ae=ee.state,qe=[ae.throughput,ae.latency,ae.rebuffer,ae.switch],v=r.slice(),A=me.getNextBufferWithBitrate(ee.bitrate,je,Se),c=A<me.getMinBuffer();c&&_.debug("Buffer is low for bitrate=".concat(ee.bitrate," downloadTime=").concat(Ie," currentBuffer=").concat(je," nextBuffer=").concat(A)),(ee.bitrate>G-1e4||c)&&ee.bitrate!==g&&(v[0]=100);var E=x(qe,[He,0,0,0],v);(ft===null||E<ft)&&(ft=E,At=ee.qualityIndex,Rt=ee)}var Q=Math.abs(it.bitrate-Rt.bitrate)/i;return O(it,Ne,[He,X,Oe,Q]),O(Rt,Ne,[He,0,0,Q]),At},reset:function(){q()}},_=(0,I.A)(T).getInstance().getLogger(n),q(),n}u.__dashjs_factory_name="LearningAbrController",Le.A=ce.A.getClassFactory(u)},8692:function(vt,Le,M){var ce=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 ne=0;ne<x.weights.latencyPenalty.length;ne++){var O=x.weights.latencyPenalty[ne];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",Le.A=ce.A.getClassFactory(u)},6050:function(vt,Le,M){var ce=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(ne){try{var O=(0,_.A)(x).create(),J=ne.getMediaInfo().type,pe=ne.getAbrController(),G=ne.getStreamInfo(),X=pe.getQualityFor(J,G.id),re=ne.getMediaInfo(),be=W.getCurrentBufferState(J),Ue=ne.getScheduleController(),me=W.getCurrentBufferLevel(J,!0),le=G&&G.manifestInfo?G.manifestInfo.isDynamic:null,je=Ue.getPlaybackController(),Se=je.getCurrentLiveLatency();if(!ne.useLoLPABR()||J===h.A.AUDIO)return O;Se||(Se=0);var Ne=je.getPlaybackRate(),He=pe.getThroughputHistory().getSafeAverageThroughput(J,le);if(m.debug("Throughput ".concat(Math.round(He)," kbps")),isNaN(He)||!be||pe.getAbandonmentStateFor(G.id,J)===y.A.ABANDON_LOAD)return O;for(var it=re.bitrateList,Ie=ne.getRepresentationInfo().fragmentDuration,Oe=it[0].bandwidth/1e3,ft=it[it.length-1].bandwidth/1e3,At=0;At<it.length;At++){var Rt=it[At].bandwidth/1e3;Rt>ft?ft=Rt:Rt<Oe&&(Oe=Rt)}var Pt=it[X].bandwidth/1e3,ee=W.getCurrentHttpRequest(J,!0),ae=(ee.tresponse.getTime()-ee.trequest.getTime())/1e3,qe=ae>Ie?ae-Ie:0;q.setupPerSegmentQoe(Ie,ft,Oe),q.logSegmentMetrics(Pt,qe,Se,Ne);var v=(0,i.A)(x).create({targetLatency:1.5,bufferMin:.3,segmentDuration:Ie,qoeEvaluator:q});return O.quality=T.getNextQuality(re,1e3*He,Se,me,Ne,X,v),O.reason={throughput:He,latency:Se},O.priority=_.A.PRIORITY.STRONG,Ue.setTimeToLoadDelay(0),O.quality!==X&&m.debug("[TgcLearningRule]["+J+"] requesting switch to index: ",O.quality,"Average throughput",Math.round(He),"kbps"),O}catch(A){throw A}},reset:function(){T.reset(),q.reset()}},m=(0,ce.A)(x).getInstance().getLogger(d),T=(0,u.A)(x).create(),q=(0,n.A)(x).create(),d}g.__dashjs_factory_name="LoLPRule",Le.A=I.A.getClassFactory(g)},3173:function(vt,Le,M){var ce=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,ne){var O=q();return ne>O?x-O:x+O-ne}return n={getMinBuffer:function(){return m},getSegmentDuration:q,getNextBufferWithBitrate:function(x,ne,O){return W(ne,x*d/O)},getNextBuffer:W,findWeightVector:function(x,ne,O,J,pe,G){var X=null,re=null,be=null,Ue=Math.abs(ne-y);return x.forEach((function(me){_.forEach((function(le){le[0];var je=le[1],Se=le[2],Ne=(le[3],me.bitrate*d/pe),He=W(O,Ne),it=(Se===0?10:1/Se)*Math.max(1e-5,Ne-He),Ie=(je===0?10:1/je)*me.state.latency,Oe=T.calculateSingleUseQoe(me.bitrate,it,Ie,G);(X===null||Oe>X)&&(function(ft,At,Rt){return!(ft>r+Rt)&&At>=m})(ne,He,Ue)&&(X=Oe,re=le,be=me.bitrate)}))})),re===null&&be===null&&(re=-1),y=ne,re}},h=(i=[.2,.4,.6,.8,1]).map((function(x){return[x]})),_=(g=function(x,ne,O){if(O===ne)return x;for(var J=x.length,pe=0;pe<J;pe++)for(var G=x.shift(),X=0;X<i.length;X++)x.push(G.concat(i[X]));return g(x,ne,O+1)})(h,4,1),y=0,n}I.__dashjs_factory_name="LoLpWeightSelector",Le.A=ce.A.getClassFactory(I)},7202:function(vt,Le){function M(I,u,n){return Object.defineProperty(I,"prototype",{writable:!1}),I}var ce=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}));Le.A=ce},6028:function(vt,Le,M){M.d(Le,{_:function(){return m}});var ce=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,ne,O,J,pe,G,X=this.context,re=T.adapter,be=T.baseURLController,Ue=T.streamInfo,me=T.timelineConverter,le=T.debug,je=T.eventBus,Se=T.events,Ne=T.dashConstants,He=(0,_.A)(X).getInstance();function it(Oe,ft){var At=new n.A;At.id=Oe.id,At.bitrate=Oe.bandwidth,At.width=Oe.width,At.height=Oe.height,At.tilesHor=1,At.tilesVert=1,Oe.essentialProperties&&Oe.essentialProperties.forEach((function(Rt){if(m.indexOf(Rt.schemeIdUri)>=0&&Rt.value){var Pt=Rt.value.split("x");Pt.length!==2||isNaN(Pt[0])||isNaN(Pt[1])||(At.tilesHor=parseInt(Pt[0],10),At.tilesVert=parseInt(Pt[1],10))}})),ft?J.updateSegmentData(Oe).then((function(Rt){(function(Pt,ee,ae){var qe=[],v=(function(A,c){var E,Q,D,Be,De=[],Ae=0;for(E=0,Q=A.segments.length;E<Q;E++)D=A.segments[E],(Be=(0,y.W$)(me,re.getIsDynamic(),c,D.startTime,D.duration,D.timescale,D.media,D.mediaRange,Ae))&&(De.push(Be),Be=null,Ae++);return De})(ae,ee);ee.segments=v,Pt.segmentDuration=ee.segments[0].duration,Pt.readThumbnail=function(A,c){var E=null;qe.some((function(Q){if(Q.start<=A&&Q.end>A)return E=Q.url,!0})),E?c(E):ee.segments.some((function(Q){if(Q.mediaStartTime<=A&&Q.mediaStartTime+Q.duration>A){var D=be.resolve(ee.path);return pe.load({method:"get",url:D.url,request:{range:Q.mediaRange,responseType:"arraybuffer"},onload:function(Be){var De=G.getSamplesInfo(Be.target.response),Ae=new Blob([Be.target.response.slice(De.sampleList[0].offset,De.sampleList[0].offset+De.sampleList[0].size)],{type:"image/jpeg"}),Re=window.URL.createObjectURL(Ae);qe.push({start:Q.mediaStartTime,end:Q.mediaStartTime+Q.duration,url:Re}),c&&c(Re)}}),!0}}))}})(At,Oe,Rt)})):(At.startNumber=Oe.startNumber,At.segmentDuration=Oe.segmentDuration,At.timescale=Oe.timescale,At.templateUrl=(function(Rt){var Pt=He.isRelative(Rt.media)?He.resolve(Rt.media,be.resolve(Rt.path).url):Rt.media;return Pt?(0,y.dD)(Pt,Rt.id):""})(Oe)),At.tilesHor>0&&At.tilesVert>0&&(At.widthPerTile=At.width/At.tilesHor,At.heightPerTile=At.height/At.tilesVert,W.push(At))}function Ie(){W=[],ne=-1,O=null}return q={getTracks:function(){return W},addTracks:function(){if(Ue&&re&&(O=re.getMediaInfoForType(Ue,ce.A.IMAGE))){var Oe=re.getVoRepresentations(O);Oe&&Oe.length>0&&Oe.forEach((function(ft){(ft.segmentInfoType===I.A.SEGMENT_TEMPLATE&&ft.segmentDuration>0&&ft.media||ft.segmentInfoType===I.A.SEGMENT_TIMELINE)&&it(ft),ft.segmentInfoType===I.A.SEGMENT_BASE&&it(ft,!0)})),W.length>0&&W.sort((function(ft,At){return ft.bitrate-At.bitrate}))}},reset:Ie,setTrackByIndex:function(Oe){W&&W.length!==0&&(Oe>=W.length&&(Oe=W.length-1),ne=Oe)},getCurrentTrack:function(){return ne<0?null:W[ne]},getCurrentTrackIndex:function(){return ne},getThumbnailRequestForTime:function(Oe){for(var ft,At=re.getVoRepresentations(O),Rt=0;Rt<At.length;Rt++)if(W[ne].id===At[Rt].id){ft=At[Rt];break}return x.getSegmentRequestForTime(O,ft,Oe)}},Ie(),pe=(0,h.A)(X).create({}),G=(0,i.A)(X).getInstance(),J=(0,r.A)(X).create({events:Se,eventBus:je,streamInfo:Ue,timelineConverter:me,dashConstants:Ne,dashMetrics:T.dashMetrics,segmentBaseController:T.segmentBaseController,type:ce.A.IMAGE}),(x=(0,g.A)(X).create({streamInfo:Ue,type:ce.A.IMAGE,timelineConverter:me,segmentsController:J,baseURLController:be,debug:le,eventBus:je,events:Se,dashConstants:Ne,urlUtils:He})).initialize(!!re&&re.getIsDynamic()),q}d.__dashjs_factory_name="ThumbnailTracks",Le.A=u.A.getClassFactory(d)},255:function(vt,Le,M){var ce=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,ne=q instanceof ArrayBuffer?new Uint8Array(q):q,O=0;W<ne.byteLength;){var J=m(ne,W),pe=d(ne,W+4);if(J===0)break;W+J<=ne.byteLength&&(T.indexOf(pe)>=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,ne,O,J,pe,G,X,re,be,Ue,me,le,je,Se,Ne=r(T),He=Ne.getBoxes("moof"),it=Ne.getBoxes("mfhd");je=Ne.getBoxes("moof").length,le=it[it.length-1].sequence_number,W=0,O=[];var Ie=-1,Oe=-1;for(re=0;re<He.length;re++){var ft=He[re],At=ft.getChildBoxes("traf");for(G=0;G<At.length;G++){var Rt=At[G],Pt=Rt.getChildBox("tfhd"),ee=Rt.getChildBox("tfdt");ne=ee.baseMediaDecodeTime;var ae=Rt.getChildBoxes("trun"),qe=Rt.getChildBoxes("subs");for(X=0;X<ae.length;X++){var v=ae[X];for(W=v.sample_count,me=(Pt.base_data_offset||0)+(v.data_offset||0),pe=0;pe<W;pe++){q=(J=v.samples[pe]).sample_duration!==void 0?J.sample_duration:Pt.default_sample_duration,x=J.sample_size!==void 0?J.sample_size:Pt.default_sample_size;var A={dts:ne,cts:ne+(J.sample_composition_time_offset!==void 0?J.sample_composition_time_offset:0),duration:q,offset:ft.offset+me,size:x,subSizes:[x]};if(qe)for(be=0;be<qe.length;be++){var c=qe[be];if(Ie<c.entry_count-1&&pe>Oe&&(Ie++,Oe+=c.entries[Ie].sample_delta),pe==Oe){A.subSizes=[];var E=c.entries[Ie];for(Ue=0;Ue<E.subsample_count;Ue++)A.subSizes.push(E.subsamples[Ue].subsample_size)}}O.push(A),me+=x,ne+=q}}Se=ne-ee.baseMediaDecodeTime}}return{sampleList:O,lastSequenceNumber:le,totalDuration:Se,numSequences:je}},findInitRange:function(T){var q=null,W=r(T);if(!W)return q;var x=W.getBox("ftyp"),ne=W.getBox("moov");return i.debug("Searching for initialization."),ne&&ne.isComplete&&(q=(x?x.offset:ne.offset)+"-"+(ne.offset+ne.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,ne=q instanceof ArrayBuffer?new Uint8Array(q):q,O=0;W<ne.byteLength;){var J=m(ne,W),pe=d(ne,W+4);if(J===0)break;W+J<=ne.byteLength&&(T.indexOf(pe)>=0?x=new _.A(W,!0,J,pe):O=W+J),W+=J}return x||new _.A(O,!1)}},i=(0,ce.A)(g).getInstance().getLogger(h),h}y.__dashjs_factory_name="BoxParser",Le.A=u.A.getSingletonFactory(y)},6035:function(vt,Le,M){M.d(Le,{a:function(){return _}});var ce=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",Le.A=ce.A.getSingletonFactory(y)},6877:function(vt,Le,M){var ce=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",Le.A=ce.A.getClassFactory(u)},206:function(vt,Le,M){var ce=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,ne){try{return new window.URL(x,ne).toString()}catch{return x}},g=function(x,ne){var O=r;if(!ne||!T(x))return x;q(x)&&(O=m),W(x)&&(O=d);var J=O(ne),pe=J.charAt(J.length-1)!=="/"&&x.charAt(0)!=="/"?"/":"";return[J,x].join(pe)};function r(x){var ne=x.indexOf("/"),O=x.lastIndexOf("/");return ne!==-1?O===ne+1?x:(x.indexOf("?")!==-1&&(x=x.substring(0,x.indexOf("?"))),x.substring(0,O+1)):""}function m(x){var ne=x.match(i);return ne?ne[1]:""}function d(x){var ne=x.match(n);return ne?ne[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,ne){return u(x,ne)}}}I.__dashjs_factory_name="DefaultURLUtils",Le.A=ce.A.getSingletonFactory(I)},246:function(vt,Le,M){var ce=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 ce.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",Le.A=I.A.getClassFactory(u)},9913:function(vt,Le,M){M.d(Le,{W:function(){return I}});var ce=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",Le.A=ce.A.getSingletonFactory(u)},7652:function(vt,Le,M){M.d(Le,{sq:function(){return u},zQ:function(){return n}});var ce=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 ce.A.BAD_ARGUMENT_ERROR}function n(_){if(_===null||isNaN(_)||_%1!=0)throw ce.A.BAD_ARGUMENT_ERROR+" : argument is not an integer"}},2187:function(vt,Le,M){var ce=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=ce.A.getSingletonFactory(u);Le.A=n},8324:function(vt,Le){function M(I,u,n){return Object.defineProperty(I,"prototype",{writable:!1}),I}var ce=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}));Le.A=ce},2686:function(vt,Le,M){var ce=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===ce.G.INIT_SEGMENT_TYPE}},{key:"setInfo",value:function(h){this.type=h&&h.init?ce.G.INIT_SEGMENT_TYPE:ce.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",Le.A=_},9705:function(vt,Le){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 ce(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}}])&&ce(n.prototype,_),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,_})();Le.A=u},1465:function(vt,Le){function M(I,u,n){return Object.defineProperty(I,"prototype",{writable:!1}),I}var ce=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=_}));Le.A=ce},8584:function(vt,Le){function M(I,u,n){return Object.defineProperty(I,"prototype",{writable:!1}),I}var ce=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=""}));Le.A=ce},2756:function(vt,Le,M){function ce(_,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(Le,{G:function(){return u},N:function(){return n}});var u=ce((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=ce((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(vt,Le){Le.byteLength=function(i){var h=_(i),g=h[0],r=h[1];return 3*(g+r)/4-r},Le.toByteArray=function(i){var h,g,r=_(i),m=r[0],d=r[1],T=new I((function(x,ne,O){return 3*(ne+O)/4-O})(0,m,d)),q=0,W=d>0?m-4:m;for(g=0;g<W;g+=4)h=ce[i.charCodeAt(g)]<<18|ce[i.charCodeAt(g+1)]<<12|ce[i.charCodeAt(g+2)]<<6|ce[i.charCodeAt(g+3)],T[q++]=h>>16&255,T[q++]=h>>8&255,T[q++]=255&h;return d===2&&(h=ce[i.charCodeAt(g)]<<2|ce[i.charCodeAt(g+1)]>>4,T[q++]=255&h),d===1&&(h=ce[i.charCodeAt(g)]<<10|ce[i.charCodeAt(g+1)]<<4|ce[i.charCodeAt(g+2)]>>2,T[q++]=h>>8&255,T[q++]=255&h),T},Le.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=[],ce=[],I=typeof Uint8Array<"u"?Uint8Array:Array,u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n=0;n<64;++n)M[n]=u[n],ce[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("")}ce[45]=62,ce[95]=63},4910:function(vt,Le,M){var ce=M(2541),I=M(5156),u=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;Le.Buffer=y,Le.SlowBuffer=function(v){return+v!=v&&(v=0),y.alloc(+v)},Le.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,Be){if(typeof Be=="string"&&Be!==""||(Be="utf8"),!y.isEncoding(Be))throw new TypeError("Unknown encoding: "+Be);var De=0|T(D,Be),Ae=_(De),Re=Ae.write(D,Be);return Re!==De&&(Ae=Ae.slice(0,Re)),Ae})(v,A);if(ArrayBuffer.isView(v))return(function(D){if(ee(D,Uint8Array)){var Be=new Uint8Array(D);return m(Be.buffer,Be.byteOffset,Be.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(ee(v,ArrayBuffer)||v&&ee(v.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(ee(v,SharedArrayBuffer)||v&&ee(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 Be=0|d(D.length),De=_(Be);return De.length===0||D.copy(De,0,0,Be),De}return D.length!==void 0?typeof D.length!="number"||ae(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)||ee(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 At(v).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*c;case"hex":return c>>>1;case"base64":return Rt(v).length;default:if(Q)return E?-1:At(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 je(this,A,c);case"utf8":case"utf-8":return be(this,A,c);case"ascii":return me(this,A,c);case"latin1":case"binary":return le(this,A,c);case"base64":return re(this,A,c);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Se(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),ae(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:ne(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):ne(v,[A],c,E,Q);throw new TypeError("val must be string, number or Buffer")}function ne(v,A,c,E,Q){var D,Be=1,De=v.length,Ae=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;Be=2,De/=2,Ae/=2,c/=2}function Re(Xe,nt){return Be===1?Xe[nt]:Xe.readUInt16BE(nt*Be)}if(Q){var _e=-1;for(D=c;D<De;D++)if(Re(v,D)===Re(A,_e===-1?0:D-_e)){if(_e===-1&&(_e=D),D-_e+1===Ae)return _e*Be}else _e!==-1&&(D-=D-_e),_e=-1}else for(c+Ae>De&&(c=De-Ae),D=c;D>=0;D--){for(var Ye=!0,Ve=0;Ve<Ae;Ve++)if(Re(v,D+Ve)!==Re(A,Ve)){Ye=!1;break}if(Ye)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 Be=0;Be<E;++Be){var De=parseInt(A.substr(2*Be,2),16);if(ae(De))return Be;v[c+Be]=De}return Be}function J(v,A,c,E){return Pt(At(A,v.length-c),v,c,E)}function pe(v,A,c,E){return Pt((function(Q){for(var D=[],Be=0;Be<Q.length;++Be)D.push(255&Q.charCodeAt(Be));return D})(A),v,c,E)}function G(v,A,c,E){return Pt(Rt(A),v,c,E)}function X(v,A,c,E){return Pt((function(Q,D){for(var Be,De,Ae,Re=[],_e=0;_e<Q.length&&!((D-=2)<0);++_e)De=(Be=Q.charCodeAt(_e))>>8,Ae=Be%256,Re.push(Ae),Re.push(De);return Re})(A,v.length-c),v,c,E)}function re(v,A,c){return A===0&&c===v.length?ce.fromByteArray(v):ce.fromByteArray(v.slice(A,c))}function be(v,A,c){c=Math.min(v.length,c);for(var E=[],Q=A;Q<c;){var D,Be,De,Ae,Re=v[Q],_e=null,Ye=Re>239?4:Re>223?3:Re>191?2:1;if(Q+Ye<=c)switch(Ye){case 1:Re<128&&(_e=Re);break;case 2:(192&(D=v[Q+1]))==128&&(Ae=(31&Re)<<6|63&D)>127&&(_e=Ae);break;case 3:D=v[Q+1],Be=v[Q+2],(192&D)==128&&(192&Be)==128&&(Ae=(15&Re)<<12|(63&D)<<6|63&Be)>2047&&(Ae<55296||Ae>57343)&&(_e=Ae);break;case 4:D=v[Q+1],Be=v[Q+2],De=v[Q+3],(192&D)==128&&(192&Be)==128&&(192&De)==128&&(Ae=(15&Re)<<18|(63&D)<<12|(63&Be)<<6|63&De)>65535&&Ae<1114112&&(_e=Ae)}_e===null?(_e=65533,Ye=1):_e>65535&&(_e-=65536,E.push(_e>>>10&1023|55296),_e=56320|1023&_e),E.push(_e),Q+=Ye}return(function(Ve){var Xe=Ve.length;if(Xe<=Ue)return String.fromCharCode.apply(String,Ve);for(var nt="",Tt=0;Tt<Xe;)nt+=String.fromCharCode.apply(String,Ve.slice(Tt,Tt+=Ue));return nt})(E)}Le.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(ee(v,Uint8Array)&&(v=y.from(v,v.offset,v.byteLength)),ee(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(ee(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?be(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=Le.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(ee(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),Be=(c>>>=0)-(A>>>=0),De=Math.min(D,Be),Ae=this.slice(E,Q),Re=v.slice(A,c),_e=0;_e<De;++_e)if(Ae[_e]!==Re[_e]){D=Ae[_e],Be=Re[_e];break}return D<Be?-1:Be<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 pe(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 Ue=4096;function me(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 le(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 je(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+=qe[v[D]];return Q}function Se(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 Ne(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 He(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 it(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 Ie(v,A,c,E,Q){return A=+A,c>>>=0,Q||it(v,0,c,4),I.write(v,A,c,E,23,4),c+4}function Oe(v,A,c,E,Q){return A=+A,c>>>=0,Q||it(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||Ne(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||Ne(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||Ne(v,1,this.length),this[v]},y.prototype.readUint16LE=y.prototype.readUInt16LE=function(v,A){return v>>>=0,A||Ne(v,2,this.length),this[v]|this[v+1]<<8},y.prototype.readUint16BE=y.prototype.readUInt16BE=function(v,A){return v>>>=0,A||Ne(v,2,this.length),this[v]<<8|this[v+1]},y.prototype.readUint32LE=y.prototype.readUInt32LE=function(v,A){return v>>>=0,A||Ne(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||Ne(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||Ne(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||Ne(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||Ne(v,1,this.length),128&this[v]?-1*(255-this[v]+1):this[v]},y.prototype.readInt16LE=function(v,A){v>>>=0,A||Ne(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||Ne(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||Ne(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||Ne(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||Ne(v,4,this.length),I.read(this,v,!0,23,4)},y.prototype.readFloatBE=function(v,A){return v>>>=0,A||Ne(v,4,this.length),I.read(this,v,!1,23,4)},y.prototype.readDoubleLE=function(v,A){return v>>>=0,A||Ne(v,8,this.length),I.read(this,v,!0,52,8)},y.prototype.readDoubleBE=function(v,A){return v>>>=0,A||Ne(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||He(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||He(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||He(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||He(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||He(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||He(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||He(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);He(this,v,A,c,Q-1,-Q)}var D=0,Be=1,De=0;for(this[A]=255&v;++D<c&&(Be*=256);)v<0&&De===0&&this[A+D-1]!==0&&(De=1),this[A+D]=(v/Be|0)-De&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);He(this,v,A,c,Q-1,-Q)}var D=c-1,Be=1,De=0;for(this[A+D]=255&v;--D>=0&&(Be*=256);)v<0&&De===0&&this[A+D+1]!==0&&(De=1),this[A+D]=(v/Be|0)-De&255;return A+c},y.prototype.writeInt8=function(v,A,c){return v=+v,A>>>=0,c||He(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||He(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||He(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||He(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||He(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 Ie(this,v,A,!0,c)},y.prototype.writeFloatBE=function(v,A,c){return Ie(this,v,A,!1,c)},y.prototype.writeDoubleLE=function(v,A,c){return Oe(this,v,A,!0,c)},y.prototype.writeDoubleBE=function(v,A,c){return Oe(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 Be=y.isBuffer(v)?v:y.from(v,E),De=Be.length;if(De===0)throw new TypeError('The value "'+v+'" is invalid for argument "value"');for(D=0;D<c-A;++D)this[D+A]=Be[D%De]}return this};var ft=/[^+/0-9A-Za-z-_]/g;function At(v,A){var c;A=A||1/0;for(var E=v.length,Q=null,D=[],Be=0;Be<E;++Be){if((c=v.charCodeAt(Be))>55295&&c<57344){if(!Q){if(c>56319){(A-=3)>-1&&D.push(239,191,189);continue}if(Be+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 Rt(v){return ce.toByteArray((function(A){if((A=(A=A.split("=")[0]).trim().replace(ft,"")).length<2)return"";for(;A.length%4!=0;)A+="=";return A})(v))}function Pt(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 ee(v,A){return v instanceof A||v!=null&&v.constructor!=null&&v.constructor.name!=null&&v.constructor.name===A.name}function ae(v){return v!=v}var qe=(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(vt,Le){var M={parseBuffer:function(u){return new ce(u).parse()},addBoxProcessor:function(u,n){typeof u=="string"&&typeof n=="function"&&(I.prototype._boxProcessors[u]=n)},createFile:function(){return new ce},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)},Le.parseBuffer=M.parseBuffer,Le.addBoxProcessor=M.addBoxProcessor,Le.createFile=M.createFile,Le.createBox=M.createBox,Le.createFullBox=M.createFullBox,Le.Utils=M.Utils,M.Cursor=function(u){this.offset=u===void 0?0:u};var ce=function(u){this._cursor=new M.Cursor,this.boxes=[],u&&(this._raw=new DataView(u))};ce.prototype.fetch=function(u){var n=this.fetchAll(u,!0);return n.length?n[0]:null},ce.prototype.fetchAll=function(u,n){var _=[];return ce._sweep.call(this,u,_,n),_},ce.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},ce._sweep=function(u,n,_){for(var y in this.type&&this.type==u&&n.push(this),this.boxes){if(n.length&&_)return;ce._sweep.call(this.boxes[y],u,n,_)}},ce.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},ce.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(vt,Le,M){vt.exports=M(7365).polyfill()},7365:function(vt,Le,M){vt.exports=(function(){function ce(ee){return typeof ee=="function"}var I=Array.isArray?Array.isArray:function(ee){return Object.prototype.toString.call(ee)==="[object Array]"},u=0,n=void 0,_=void 0,y=function(ee,ae){T[u]=ee,T[u+1]=ae,(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 ee=setTimeout;return function(){return ee(q,1)}}var T=new Array(1e3);function q(){for(var ee=0;ee<u;ee+=2)(0,T[ee])(T[ee+1]),T[ee]=void 0,T[ee+1]=void 0;u=0}var W,x,ne,O,J=void 0;function pe(ee,ae){var qe=this,v=new this.constructor(re);v[X]===void 0&&At(v);var A=qe._state;if(A){var c=arguments[A-1];y((function(){return Oe(A,v,c,qe._result)}))}else it(qe,v,ee,ae);return v}function G(ee){if(ee&&typeof ee=="object"&&ee.constructor===this)return ee;var ae=new this(re);return je(ae,ee),ae}J=r?function(){return process.nextTick(q)}:g?(x=0,ne=new g(q),O=document.createTextNode(""),ne.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 ee=Function("return this")().require("vertx");return(n=ee.runOnLoop||ee.runOnContext)!==void 0?function(){n(q)}:d()}catch{return d()}})():d();var X=Math.random().toString(36).substring(2);function re(){}var be=void 0,Ue=1,me=2;function le(ee,ae,qe){ae.constructor===ee.constructor&&qe===pe&&ae.constructor.resolve===G?(function(v,A){A._state===Ue?Ne(v,A._result):A._state===me?He(v,A._result):it(A,void 0,(function(c){return je(v,c)}),(function(c){return He(v,c)}))})(ee,ae):qe===void 0?Ne(ee,ae):ce(qe)?(function(v,A,c){y((function(E){var Q=!1,D=(function(Be,De,Ae,Re){try{Be.call(De,Ae,Re)}catch(_e){return _e}})(c,A,(function(Be){Q||(Q=!0,A!==Be?je(E,Be):Ne(E,Be))}),(function(Be){Q||(Q=!0,He(E,Be))}),E._label);!Q&&D&&(Q=!0,He(E,D))}),v)})(ee,ae,qe):Ne(ee,ae)}function je(ee,ae){if(ee===ae)He(ee,new TypeError("You cannot resolve a promise with itself"));else if(A=typeof(v=ae),v===null||A!=="object"&&A!=="function")Ne(ee,ae);else{var qe=void 0;try{qe=ae.then}catch(c){return void He(ee,c)}le(ee,ae,qe)}var v,A}function Se(ee){ee._onerror&&ee._onerror(ee._result),Ie(ee)}function Ne(ee,ae){ee._state===be&&(ee._result=ae,ee._state=Ue,ee._subscribers.length!==0&&y(Ie,ee))}function He(ee,ae){ee._state===be&&(ee._state=me,ee._result=ae,y(Se,ee))}function it(ee,ae,qe,v){var A=ee._subscribers,c=A.length;ee._onerror=null,A[c]=ae,A[c+Ue]=qe,A[c+me]=v,c===0&&ee._state&&y(Ie,ee)}function Ie(ee){var ae=ee._subscribers,qe=ee._state;if(ae.length!==0){for(var v=void 0,A=void 0,c=ee._result,E=0;E<ae.length;E+=3)v=ae[E],A=ae[E+qe],v?Oe(qe,v,A,c):A(c);ee._subscribers.length=0}}function Oe(ee,ae,qe,v){var A=ce(qe),c=void 0,E=void 0,Q=!0;if(A){try{c=qe(v)}catch(D){Q=!1,E=D}if(ae===c)return void He(ae,new TypeError("A promises callback cannot return that same promise."))}else c=v;ae._state!==be||(A&&Q?je(ae,c):Q===!1?He(ae,E):ee===Ue?Ne(ae,c):ee===me&&He(ae,c))}var ft=0;function At(ee){ee[X]=ft++,ee._state=void 0,ee._result=void 0,ee._subscribers=[]}var Rt=(function(){function ee(ae,qe){this._instanceConstructor=ae,this.promise=new ae(re),this.promise[X]||At(this.promise),I(qe)?(this.length=qe.length,this._remaining=qe.length,this._result=new Array(this.length),this.length===0?Ne(this.promise,this._result):(this.length=this.length||0,this._enumerate(qe),this._remaining===0&&Ne(this.promise,this._result))):He(this.promise,new Error("Array Methods must be provided an Array"))}return ee.prototype._enumerate=function(ae){for(var qe=0;this._state===be&&qe<ae.length;qe++)this._eachEntry(ae[qe],qe)},ee.prototype._eachEntry=function(ae,qe){var v=this._instanceConstructor,A=v.resolve;if(A===G){var c=void 0,E=void 0,Q=!1;try{c=ae.then}catch(Be){Q=!0,E=Be}if(c===pe&&ae._state!==be)this._settledAt(ae._state,qe,ae._result);else if(typeof c!="function")this._remaining--,this._result[qe]=ae;else if(v===Pt){var D=new v(re);Q?He(D,E):le(D,ae,c),this._willSettleAt(D,qe)}else this._willSettleAt(new v((function(Be){return Be(ae)})),qe)}else this._willSettleAt(A(ae),qe)},ee.prototype._settledAt=function(ae,qe,v){var A=this.promise;A._state===be&&(this._remaining--,ae===me?He(A,v):this._result[qe]=v),this._remaining===0&&Ne(A,this._result)},ee.prototype._willSettleAt=function(ae,qe){var v=this;it(ae,void 0,(function(A){return v._settledAt(Ue,qe,A)}),(function(A){return v._settledAt(me,qe,A)}))},ee})(),Pt=(function(){function ee(ae){this[X]=ft++,this._result=this._state=void 0,this._subscribers=[],re!==ae&&(typeof ae!="function"&&(function(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")})(),this instanceof ee?(function(qe,v){try{v((function(A){je(qe,A)}),(function(A){He(qe,A)}))}catch(A){He(qe,A)}})(this,ae):(function(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")})())}return ee.prototype.catch=function(ae){return this.then(null,ae)},ee.prototype.finally=function(ae){var qe=this,v=qe.constructor;return ce(ae)?qe.then((function(A){return v.resolve(ae()).then((function(){return A}))}),(function(A){return v.resolve(ae()).then((function(){throw A}))})):qe.then(ae,ae)},ee})();return Pt.prototype.then=pe,Pt.all=function(ee){return new Rt(this,ee).promise},Pt.race=function(ee){var ae=this;return I(ee)?new ae((function(qe,v){for(var A=ee.length,c=0;c<A;c++)ae.resolve(ee[c]).then(qe,v)})):new ae((function(qe,v){return v(new TypeError("You must pass an array to race."))}))},Pt.resolve=G,Pt.reject=function(ee){var ae=new this(re);return He(ae,ee),ae},Pt._setScheduler=function(ee){_=ee},Pt._setAsap=function(ee){y=ee},Pt._asap=y,Pt.polyfill=function(){var ee=void 0;if(M.g!==void 0)ee=M.g;else if(typeof self<"u")ee=self;else try{ee=Function("return this")()}catch{throw new Error("polyfill failed because global object is unavailable in this environment")}var ae=ee.Promise;if(ae){var qe=null;try{qe=Object.prototype.toString.call(ae.resolve())}catch{}if(qe==="[object Promise]"&&!ae.cast)return}ee.Promise=Pt},Pt.Promise=Pt,Pt})()},5572:function(vt){var Le,M=typeof Reflect=="object"?Reflect:null,ce=M&&typeof M.apply=="function"?M.apply:function(q,W,x){return Function.prototype.apply.call(q,W,x)};Le=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)}vt.exports=u,vt.exports.once=function(q,W){return new Promise((function(x,ne){function O(pe){q.removeListener(W,J),ne(pe)}function J(){typeof q.removeListener=="function"&&q.removeListener("error",O),x([].slice.call(arguments))}T(q,W,J,{once:!0}),W!=="error"&&(function(pe,G){typeof pe.on=="function"&&T(pe,"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,ne){var O,J,pe,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),pe=J[W]),pe===void 0)pe=J[W]=x,++q._eventsCount;else if(typeof pe=="function"?pe=J[W]=ne?[x,pe]:[pe,x]:ne?pe.unshift(x):pe.push(x),(O=y(q))>0&&pe.length>O&&!pe.warned){pe.warned=!0;var X=new Error("Possible EventEmitter memory leak detected. "+pe.length+" "+String(W)+" listeners added. Use emitter.setMaxListeners() to increase limit");X.name="MaxListenersExceededWarning",X.emitter=q,X.type=W,X.count=pe.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 ne={fired:!1,wrapFn:void 0,target:q,type:W,listener:x},O=h.bind(ne);return O.listener=x,ne.wrapFn=O,O}function r(q,W,x){var ne=q._events;if(ne===void 0)return[];var O=ne[W];return O===void 0?[]:typeof O=="function"?x?[O.listener||O]:[O]:x?(function(J){for(var pe=new Array(J.length),G=0;G<pe.length;++G)pe[G]=J[G].listener||J[G];return pe})(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),ne=0;ne<W;++ne)x[ne]=q[ne];return x}function T(q,W,x,ne){if(typeof q.on=="function")ne.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){ne.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 ne=q==="error",O=this._events;if(O!==void 0)ne=ne&&O.error===void 0;else if(!ne)return!1;if(ne){var J;if(W.length>0&&(J=W[0]),J instanceof Error)throw J;var pe=new Error("Unhandled error."+(J?" ("+J.message+")":""));throw pe.context=J,pe}var G=O[q];if(G===void 0)return!1;if(typeof G=="function")ce(G,this,W);else{var X=G.length,re=d(G,X);for(x=0;x<X;++x)ce(re[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,ne,O,J,pe;if(_(W),(ne=this._events)===void 0)return this;if((x=ne[q])===void 0)return this;if(x===W||x.listener===W)--this._eventsCount==0?this._events=Object.create(null):(delete ne[q],ne.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){pe=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&&(ne[q]=x[0]),ne.removeListener!==void 0&&this.emit("removeListener",q,pe||W)}return this},u.prototype.off=u.prototype.removeListener,u.prototype.removeAllListeners=function(q){var W,x,ne;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(ne=0;ne<J.length;++ne)(O=J[ne])!=="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(ne=W.length-1;ne>=0;ne--)this.removeListener(q,W[ne]);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?Le(this._events):[]}},426:function(vt){var Le=Array.isArray,M=Object.keys,ce=Object.prototype.hasOwnProperty;vt.exports=function I(u,n){if(u===n)return!0;if(u&&n&&typeof u=="object"&&typeof n=="object"){var _,y,i,h=Le(u),g=Le(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(!ce.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(vt,Le){Le.read=function(M,ce,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[ce+m];for(m+=d,_=T&(1<<-r)-1,T>>=-r,r+=i;r>0;_=256*_+M[ce+m],m+=d,r-=8);for(y=_&(1<<-r)-1,_>>=-r,r+=u;r>0;y=256*y+M[ce+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)},Le.write=function(M,ce,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=ce<0||ce===0&&1/ce<0?1:0;for(ce=Math.abs(ce),isNaN(ce)||ce===1/0?(i=isNaN(ce)?1:0,y=r):(y=Math.floor(Math.log(ce)/Math.LN2),ce*(h=Math.pow(2,-y))<1&&(y--,h*=2),(ce+=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=(ce*h-1)*Math.pow(2,n),y+=m):(i=ce*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(vt,Le,M){(function(ce){ce.parser=function(c,E){return new n(c,E)},ce.SAXParser=n,ce.SAXStream=y,ce.createStream=function(c,E){return new y(c,E)},ce.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 Be=0,De=u.length;Be<De;Be++)D[u[Be]]=""})(Q),Q.q=Q.c="",Q.bufferCheckPosition=ce.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=le.BEGIN,Q.strictEntities=Q.opt.strictEntities,Q.ENTITIES=Q.strictEntities?Object.create(ce.XML_ENTITIES):Object.create(ce.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),Se(Q,"onready")}ce.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(){Oe(this)},write:function(c){var E=this;if(this.error)throw this.error;if(E.closed)return Ie(E,"Cannot write after close. Assign an onready handler.");if(c===null)return Oe(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===`
14
+ `))}else e.liveDelay=k.liveDelay,e.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,se=j.playbackRate.max?Math.round(1e3*(j.playbackRate.max-1))/1e3:NaN;e.liveCatchup.playbackRate.min=k,e.liveCatchup.playbackRate.max=se,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(se))})(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 se=[];j.operatingBandwidth.mediaType===Oa||j.operatingBandwidth.mediaType===Ma?se.push(j.operatingBandwidth.mediaType):j.operatingBandwidth.mediaType==="any"&&(se.push(Ma),se.push(Oa)),se.forEach((function(ie){isNaN(k.minBandwidth)||F("minBitrate",ie,k.minBandwidth),isNaN(k.maxBandwidth)||F("maxBitrate",ie,k.maxBandwidth),isNaN(k.targetBandwidth)||F("initialBitrate",ie,k.targetBandwidth)}))}})(w),w.contentSteering&&(function(j){e.contentSteering=j.contentSteering})(w))}},reset:function(){b()},setConfig:function(U){U&&U.adapter&&(p=U.adapter)}},l=(0,g.A)(C).getInstance().getLogger(t),b(),t}Pa.__dashjs_factory_name="ServiceDescriptionController";var is=h.A.getSingletonFactory(Pa);function Xi(){var t,e,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,ge=P.streamInfo.id,ve=w(Y,ge);if(o[ge]&&o[ge][Y]&&(o[ge][Y].current=P,o[ge][Y].current&&(Y!==u.A.TEXT&&!ie(P,ve)||Y===u.A.TEXT&&P.isFragmented)&&H.trigger(i.A.CURRENT_TRACK_CHANGED,{oldMediaInfo:ve,newMediaInfo:P,switchMode:l.get().streaming.trackSwitchMode[Y]},{streamId:ge}),!$)){var fe=(function(Ce){var Me={lang:Ce.lang,viewpoint:Ce.viewpoint,roles:Ce.roles,accessibility:Ce.accessibility,audioChannelConfiguration:Ce.audioChannelConfiguration,codec:Ce.codec};return Me.lang||Me.viewpoint||Me.role&&Me.role.length>0||Me.accessibility&&Me.accessibility.length>0||Me.audioChannelConfiguration&&Me.audioChannelConfiguration.length>0?Me:null})(P);if(!fe||!o[ge][Y].storeLastSettings)return;fe.roles&&(fe.role=fe.roles[0],delete fe.roles),fe.accessibility&&(fe.accessibility=fe.accessibility[0]),fe.audioChannelConfiguration&&(fe.audioChannelConfiguration=fe.audioChannelConfiguration[0]),C[Y]=fe,F.setSavedMediaSettings(Y,fe)}}}function k(P,$){P&&$&&(p[P]=$)}function se(P){return P?p[P]:null}function ie(P,$){if(!P&&!$)return!0;if(!P||!$)return!1;var Y=P.id===$.id,ge=P.viewpoint===$.viewpoint,ve=JSON.stringify(P.viewpointsWithSchemeIdUri)===JSON.stringify($.viewpointsWithSchemeIdUri),fe=P.lang===$.lang,Ce=P.codec===$.codec,Me=P.roles.toString()===$.roles.toString(),Qe=JSON.stringify(P.rolesWithSchemeIdUri)===JSON.stringify($.rolesWithSchemeIdUri),$e=P.accessibility.toString()===$.accessibility.toString(),Ze=JSON.stringify(P.accessibilitiesWithSchemeIdUri)===JSON.stringify($.accessibilitiesWithSchemeIdUri),at=P.audioChannelConfiguration.toString()===$.audioChannelConfiguration.toString(),Nt=JSON.stringify(P.audioChannelConfigurationsWithSchemeIdUri)===JSON.stringify($.audioChannelConfigurationsWithSchemeIdUri);return Y&&Ce&&ge&&ve&&fe&&Me&&Qe&&$e&&Ze&&at&&Nt}function he(){o={},C={},p={audio:null,video:null,text:null}}function oe(P,$,Y){var ge=[];return P.forEach((function(ve){$(Y,ve)&&ge.push(ve)})),ge.length!==0?ge:P}function te(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(ge){return ge===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,ge=[];return P.forEach((function(ve){($=Math.max.apply(Math,ve.bitrateList.map((function(fe){return fe.bandwidth}))))>Y?(Y=$,ge=[ve]):$===Y&&ge.push(ve)})),ge}function R(P){var $,Y=1/0,ge=[];return P.forEach((function(ve){var fe=ve.bitrateList.reduce((function(Ce,Me){var Qe=Math.max(1,Me.width*Me.height);return Ce+Me.bandwidth/Qe}),0);($=fe/ve.bitrateList.length)<Y?(Y=$,ge=[ve]):$===Y&&ge.push(ve)})),ge}function V(P){var $,Y=0,ge=[];return P.forEach((function(ve){($=ve.representationCount)>Y?(Y=$,ge=[ve]):$===Y&&ge.push(ve)})),ge}function de(P,$){if(P===u.A.TEXT)return $[0];var Y,ge=l.get().streaming.selectionModeForInitialTrack,ve=b.getCustomInitialTrackSelectionFunction();if(ve&&typeof ve=="function")Y=ve($);else switch(ge){case u.A.TRACK_SELECTION_MODE_HIGHEST_SELECTION_PRIORITY:Y=(function(fe){var Ce,Me,Qe=(Ce=0,Me=[],fe.forEach((function($e){isNaN($e.selectionPriority)||($e.selectionPriority>Ce?(Ce=$e.selectionPriority,Me=[$e]):$e.selectionPriority===Ce&&Me.push($e))})),Me);return Qe.length>1&&(Qe=L(Qe)),Qe.length>1&&(Qe=V(Qe)),Qe})($);break;case u.A.TRACK_SELECTION_MODE_HIGHEST_BITRATE:Y=(function(fe){var Ce=L(fe);return Ce.length>1&&(Ce=V(Ce)),Ce})($);break;case u.A.TRACK_SELECTION_MODE_FIRST_TRACK:Y=ue($);break;case u.A.TRACK_SELECTION_MODE_HIGHEST_EFFICIENCY:Y=(function(fe){var Ce=R(fe);return Ce.length>1&&(Ce=L(Ce)),Ce})($);break;case u.A.TRACK_SELECTION_MODE_WIDEST_RANGE:Y=(function(fe){var Ce=V(fe);return Ce.length>1&&(Ce=L(fe)),Ce})($);break;default:e.warn("Track selection mode ".concat(ge," is not supported. Falling back to TRACK_SELECTION_MODE_FIRST_TRACK")),Y=ue($)}return Y.length>0?Y[0]:$[0]}function ue(P){return P[0]}return t={setInitialMediaSettingsForType:function(P,$){var Y=C[P]||se(P),ge=B(P,$.id),ve=[];Y||((Y=F.getSavedMediaSettings(P))&&delete Y.codec,k(P,Y)),ge&&ge.length!==0&&(Y&&(ve=oe(ve=Array.from(ge),te,Y),ve=oe(ve,Z,Y),ve=oe(ve,K,Y),P===u.A.AUDIO&&C[P]||(ve=oe(ve,z,Y)),ve=oe(ve,f,Y),ve=oe(ve,N,Y),ve=oe(ve,S,Y)),ve.length===0?j(de(P,ge),!0):ve.length>1?j(de(P,ve)):j(ve[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,ge,ve=P.streamInfo.id;o[ve]||(o[ve]={audio:{list:[],storeLastSettings:ge=l.get().streaming.saveLastMediaSettingsForCurrentStreamingSession,current:null},video:{list:[],storeLastSettings:ge,current:null},text:{list:[],storeLastSettings:ge,current:null},image:{list:[],storeLastSettings:ge,current:null}});for(var fe=o[ve][$].list,Ce=0,Me=fe.length;Ce<Me;++Ce)if(ie(fe[Ce],P))return;fe.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][$]&&ie(o[Y][$].current,P)},setTrack:j,selectInitialTrack:de,setInitialSettings:k,getInitialSettings:se,getTracksWithHighestBitrate:L,getTracksWithHighestEfficiency:R,getTracksWithWidestRange:V,isTracksEqual:ie,matchSettings:function(P,$){var Y=arguments.length>2&&arguments[2]!==void 0&&arguments[2];try{var ge=!1;P.lang?P.lang instanceof RegExp?ge=$.lang.match(P.lang):$.lang!==""&&P.lang&&(ge=$.lang):ge=!0;var ve=P.index===void 0||P.index===null||$.index===P.index,fe=!P.viewpoint||P.viewpoint===$.viewpoint,Ce=!P.role||!!$.roles.filter((function($e){return $e===P.role}))[0],Me=!P.accessibility||!!$.accessibility.filter((function($e){return $e===P.accessibility}))[0],Qe=!P.audioChannelConfiguration||!!$.audioChannelConfiguration.filter((function($e){return $e===P.audioChannelConfiguration}))[0];return ge&&ve&&fe&&(Ce||$.type===u.A.AUDIO&&Y)&&Me&&Qe}catch{return!1}},matchSettingsLang:te,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:he},e=(0,g.A)(U).getInstance().getLogger(t),he(),t}Xi.__dashjs_factory_name="MediaController";var La=h.A.getSingletonFactory(Xi);h.A.updateSingletonFactory(Xi.__dashjs_factory_name,La);var as=La;function os(t,e,o){return Object.defineProperty(t,"prototype",{writable:!1}),t}var vi=NaN,Fa=os((function t(e,o){(function(l,p){if(!(l instanceof p))throw new TypeError("Cannot call a class as a function")})(this,t),this.data={baseUrls:e||null,selectedIdx:o||vi},this.children=[]}));function xa(){var t,e,o,l,p=this.context,C=Et(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=vi):B[w]=new Fa(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||e;B(j.data),j.children&&j.children.forEach((function(k){return U(B,k)}))}function H(){e=new Fa}return t={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,e.data.baseUrls)||(e.data.baseUrls=j,e.data.selectedIdx=vi),w&&w.Period_asArray&&w.Period_asArray.forEach((function(k,se){b(e.children,se,k),k.AdaptationSet_asArray&&k.AdaptationSet_asArray.forEach((function(ie,he){b(e.children[se].children,he,ie),ie.Representation_asArray&&ie.Representation_asArray.sort(o.getRepresentationSortFunction()).forEach((function(oe,te){b(e.children[se].children[he].children,te,oe)}))}))}))})(B)},getForPath:function(B){var w=e,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=vi)}))},setConfig:function(B){B.adapter&&(o=B.adapter),B.contentSteeringController&&(l=B.contentSteeringController)},getBaseUrls:function(B){return F(B)}},H(),t}xa.__dashjs_factory_name="BaseURLTreeModel";var ss=h.A.getClassFactory(xa);function Ua(t){var e=(t=t||{}).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!e.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}}}Ua.__dashjs_factory_name="DVBSelector";var us=h.A.getClassFactory(Ua);function Ba(t){var e=(t=t||{}).blacklistController;return{select:function(o){var l,p=0;return o&&o.some((function(C,b){return p=b,!e.contains(C.serviceLocation)}))&&(l=o[p]),l}}}Ba.__dashjs_factory_name="BasicSelector";var ls=h.A.getClassFactory(Ba);function ka(){var t,e,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 t={selectBaseUrlIndex:function(C){var b=NaN;if(isNaN(C.selectedIdx)){var F=e.getSteeringDataFromManifest();F&&F.defaultServiceLocationArray.length>0&&(b=p(F.defaultServiceLocationArray,C.baseUrls))}var U=e.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&&(e=C.contentSteeringController)}},e=ni(l).getInstance(),t}ka.__dashjs_factory_name="ContentSteeringSelector";var cs=h.A.getClassFactory(ka);function Ga(){var t,e,o,l,p,C,b=this.context,F=(0,y.A)(b).getInstance(),U=(0,le.A)(b).getInstance();function H(){e.reset()}return t={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 pe.A(me.URL_RESOLUTION_FAILED_GENERIC_ERROR_CODE,me.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)}},e=ti(b).create({updateEventName:i.A.SERVICE_LOCATION_BASE_URL_BLACKLIST_CHANGED,addBlacklistEventName:i.A.SERVICE_LOCATION_BASE_URL_BLACKLIST_ADD}),o=ls(b).create({blacklistController:e}),l=us(b).create({blacklistController:e}),(p=cs(b).create()).setConfig({blacklistController:e}),C=o,t}Ga.__dashjs_factory_name="BaseURLSelector";var fs=h.A.getClassFactory(Ga);function ja(){var t,e,o,l,p,C=this.context,b=(0,y.A)(C).getInstance(),F=(0,Ae.A)(C).getInstance();function U(B){o.update(B),l.chooseSelector(e.getIsDVB(B)),b.trigger(r.A.BASE_URLS_UPDATED,{baseUrls:H(B)})}function H(B){return o.getBaseUrls(B)}return t={reset:function(){o.reset(),l.reset()},initialize:function(B){o.setConfig({adapter:e,contentSteeringController:p}),U(B)},resolve:function(B){var w=o.getForPath(B).reduce((function(j,k){var se=l.select(k);return se?(F.isRelative(se.url)?j.url=F.resolve(se.url,j.url):(j.url=se.url,j.serviceLocation=se.serviceLocation),j.availabilityTimeOffset=se.availabilityTimeOffset,j.availabilityTimeComplete=se.availabilityTimeComplete,j.queryParams=se.queryParams,j):new Pr}),new Pr);if(!F.isRelative(w.url))return w},setConfig:function(B){B.baseURLTreeModel&&(o=B.baseURLTreeModel),B.baseURLSelector&&(l=B.baseURLSelector),B.adapter&&(e=B.adapter),B.contentSteeringController&&(p=B.contentSteeringController)},getBaseUrls:H,update:U},o=ss(C).create(),l=fs(C).create(),b.on(i.A.SERVICE_LOCATION_BASE_URL_BLACKLIST_CHANGED,(function(B){o.invalidateSelectedIndexes(B.entry)}),t),t}ja.__dashjs_factory_name="BaseURLController";var ds=h.A.getClassFactory(ja);function Qi(t){return Qi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Qi(t)}function ps(t,e,o){return e=Ti(e),(function(l,p){if(p&&(Qi(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)})(t,qa()?Reflect.construct(e,[],Ti(t).constructor):e.apply(t,o))}function qa(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(qa=function(){return!!t})()}function Ti(t){return Ti=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ti(t)}function $i(t,e){return $i=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,l){return o.__proto__=l,o},$i(t,e)}var Ya=(function(t){function e(l,p){var C;return(function(b,F){if(!(b instanceof F))throw new TypeError("Cannot call a class as a function")})(this,e),(C=ps(this,e)).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&&$i(l,p)})(e,t),o=e,Object.defineProperty(o,"prototype",{writable:!1}),o;var o})(T.A);function Ha(t){t=t||{};var e=this.context,o=(0,y.A)(e).getInstance(),l=Mn(e).create({errHandler:t.errHandler,dashMetrics:t.dashMetrics,mediaPlayerModel:t.mediaPlayerModel,requestModifier:t.requestModifier,errors:me});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 pe.A(me.XLINK_LOADER_LOADING_FAILURE_ERROR_CODE,me.XLINK_LOADER_LOADING_FAILURE_ERROR_MESSAGE+p)})};if(p==="urn:mpeg:dash:resolve-to-zero:2013")F(null,!0);else{var U=new Ya(p,je.G.XLINK_EXPANSION_TYPE);l.load({request:U,success:function(H){F(H)},error:function(){F(null)}})}},reset:function(){l&&(l.abort(),l=null)}}}Ha.__dashjs_factory_name="XlinkLoader";var hs=h.A.getClassFactory(Ha),Va=function(t){(t=t||{}).escapeMode===void 0&&(t.escapeMode=!0),t.attributePrefix===void 0&&(t.attributePrefix="_"),t.arrayAccessForm=t.arrayAccessForm||"none",t.emptyNodeForm=t.emptyNodeForm||"text",t.enableToStringFunc===void 0&&(t.enableToStringFunc=!0),t.arrayAccessFormPaths=t.arrayAccessFormPaths||[],t.skipEmptyTextNodesForObj===void 0&&(t.skipEmptyTextNodesForObj=!0),t.stripWhitespaces===void 0&&(t.stripWhitespaces=!0),t.datetimeAccessFormPaths=t.datetimeAccessFormPaths||[],t.useDoubleQuotes===void 0&&(t.useDoubleQuotes=!1),t.xmlElementsFilter=t.xmlElementsFilter||[],t.jsonPropertiesFilter=t.jsonPropertiesFilter||[],t.keepCData===void 0&&(t.keepCData=!1),t.ignoreRoot===void 0&&(t.ignoreRoot=!1);var e={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,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;"):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){t.arrayAccessForm==="property"&&(Z[K]instanceof Array?Z[K+"_asArray"]=Z[K]:Z[K+"_asArray"]=[Z[K]]),!(Z[K]instanceof Array)&&t.arrayAccessFormPaths.length>0&&p(t.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==e.ELEMENT_NODE&&t.xmlElementsFilter.length>0)||p(t.xmlElementsFilter,Z,z,f)}function U(Z,K){if(Z.nodeType==e.DOCUMENT_NODE){for(var z=new Object,f=Z.childNodes,N=0;N<f.length;N++)(L=f[N]).nodeType==e.ELEMENT_NODE&&(t.ignoreRoot?z=U(L):(z={})[R=o(L)]=U(L));return z}if(Z.nodeType==e.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!=e.COMMENT_NODE){var V=K+"."+R;if(F(z,L.nodeType,R,V))if(z.__cnt++,z[R]==null){var de=U(L,V);(R!="#text"||/[^\s]/.test(de))&&((ue={})[R]=de,S.push(ue)),z[R]=de,C(z,R,V)}else{var ue;z[R]!=null&&(z[R]instanceof Array||(z[R]=[z[R]],C(z,R,V))),de=U(L,V),(R!="#text"||/[^\s]/.test(de))&&((ue={})[R]=de,S.push(ue)),z[R][z[R].length]=de}}}z.__children=S;for(var P=o(Z),$=0;$<Z.attributes.length;$++){var Y=Z.attributes[$];z.__cnt++;for(var ge=Y.value,ve=0,fe=t.matchers.length;ve<fe;ve++){var Ce=t.matchers[ve];Ce.test(Y,P)&&(ge=Ce.converter(Y.value))}z[t.attributePrefix+Y.name]=ge}var Me=(function(Qe){return Qe.prefix})(Z);return Me!=null&&Me!=""&&(z.__cnt++,z.__prefix=Me),z["#text"]!=null&&(z.__text=z["#text"],z.__text instanceof Array&&(z.__text=z.__text.join(`
15
+ `)),t.stripWhitespaces&&(z.__text=z.__text.trim()),delete z["#text"],t.arrayAccessForm=="property"&&delete z["#text_asArray"],z.__text=(function(Qe,$e,Ze){if(t.datetimeAccessFormPaths.length>0){var at=Ze.split(".#")[0];return p(t.datetimeAccessFormPaths,Qe,$e,at)?b(Qe):Qe}return Qe})(z.__text,R,K+"."+R)),z["#cdata-section"]!=null&&(z.__cdata=z["#cdata-section"],delete z["#cdata-section"],t.arrayAccessForm=="property"&&delete z["#cdata-section_asArray"]),z.__cnt==0&&t.emptyNodeForm=="text"?z="":z.__cnt==1&&z.__text!=null?z=z.__text:z.__cnt!=1||z.__cdata==null||t.keepCData?z.__cnt>1&&z.__text!=null&&t.skipEmptyTextNodesForObj&&(t.stripWhitespaces&&z.__text==""||z.__text.trim()=="")&&delete z.__text:z=z.__cdata,delete z.__cnt,!t.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==e.TEXT_NODE||Z.nodeType==e.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];t.escapeMode&&(R=l(R)),N+=" "+L.substr(t.attributePrefix.length)+"=",t.useDoubleQuotes?N+='"'+R+'"':N+="'"+R+"'"}return N+(f?"/>":">")}function B(Z,K){return"</"+(Z.__prefix!=null?Z.__prefix+":":"")+K+">"}function w(Z,K){return t.arrayAccessForm=="property"&&(f="_asArray",(z=K.toString()).indexOf(f,z.length-8)!==-1)||K.toString().indexOf(t.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 t.jsonPropertiesFilter.length==0||z==""||p(t.jsonPropertiesFilter,Z,K,z)}function se(Z){var K=[];if(Z instanceof Object)for(var z in Z)z.toString().indexOf("__")==-1&&z.toString().indexOf(t.attributePrefix)==0&&K.push(z);return K}function ie(Z){var K="";return Z instanceof Object?K+=(function(z){var f="";return z.__cdata!=null&&(f+="<![CDATA["+z.__cdata+"]]>"),z.__text!=null&&(t.escapeMode?f+=l(z.__text):f+=z.__text),f})(Z):Z!=null&&(t.escapeMode?K+=l(Z):K+=Z),K}function he(Z,K){return Z===""?K:Z+"."+K}function oe(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,se(Z[S]),!1),N+=te(Z[S],he(f,K)),N+=B(Z[S],K);return N}function te(Z,K){var z="";if(j(Z)>0){for(var f in Z)if(!w(Z,f)&&(K==""||k(Z,f,he(K,f)))){var N=Z[f],S=se(N);N==null||N==null?z+=H(N,f,S,!0):N instanceof Object?N instanceof Array?z+=oe(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+=te(N,he(K,f)),z+=B(N,f)):z+=H(N,f,S,!0):(z+=H(N,f,S,!1),z+=ie(N),z+=B(N,f))}}return z+ie(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 te(Z,"")},this.json2xml=function(Z){var K=this.json2xml_str(Z);return this.parseXmlString(K)},this.getVersion=function(){return"1.2.0"}},Ur="onLoad";function Ka(t){t=t||{};var e,o,l,p,C,b,F=this.context,U=(0,y.A)(F).getInstance(),H=(0,Ae.A)(F).getInstance();function B(ie,he,oe){var te,Z,K={};K.elements=ie,K.type=he,K.resolveType=oe,K.elements.length===0&&j(K);for(var z=0;z<K.elements.length;z++)te=K.elements[z],Z=H.isHTTPURL(te.url)?te.url:te.originalContent.BaseURL+te.url,b.load(Z,te,K)}function w(ie){var he,oe,te="";if(he=ie.element,oe=ie.resolveObject,he.resolvedContent){var Z=0;he.resolvedContent.indexOf("<?xml")===0&&(Z=he.resolvedContent.indexOf("?>")+2),te=he.resolvedContent.substr(0,Z)+"<response>"+he.resolvedContent.substr(Z)+"</response>",he.resolvedContent=C.xml_str2json(te)}(function(K){var z;for(z=0;z<K.elements.length;z++)if(K.elements[z].resolved===!1)return!1;return!0})(oe)&&j(oe)}function j(ie){var he,oe,te=[];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)})(ie),ie.resolveType==="onActuate"&&U.trigger(i.A.XLINK_READY,{manifest:p}),ie.resolveType===Ur)switch(ie.type){case n.A.PERIOD:for(he=0;he<p[n.A.PERIOD+"_asArray"].length;he++)(oe=p[n.A.PERIOD+"_asArray"][he]).hasOwnProperty(n.A.ADAPTATION_SET+"_asArray")&&(te=te.concat(k(oe[n.A.ADAPTATION_SET+"_asArray"],oe,n.A.ADAPTATION_SET,Ur))),oe.hasOwnProperty(n.A.EVENT_STREAM+"_asArray")&&(te=te.concat(k(oe[n.A.EVENT_STREAM+"_asArray"],oe,n.A.EVENT_STREAM,Ur)));B(te,n.A.ADAPTATION_SET,Ur);break;case n.A.ADAPTATION_SET:U.trigger(i.A.XLINK_READY,{manifest:p})}}function k(ie,he,oe,te){var Z,K,z,f=[];for(K=ie.length-1;K>=0;K--)(Z=ie[K]).hasOwnProperty("xlink:href")&&Z["xlink:href"]==="urn:mpeg:dash:resolve-to-zero:2013"&&ie.splice(K,1);for(K=0;K<ie.length;K++)(Z=ie[K]).hasOwnProperty("xlink:href")&&Z.hasOwnProperty("xlink:actuate")&&Z["xlink:actuate"]===te&&(z=se(Z["xlink:href"],he,oe,K,te,Z),f.push(z));return f}function se(ie,he,oe,te,Z,K){return{url:ie,parentElement:he,type:oe,index:te,resolveType:Z,originalContent:K,resolvedContent:null,resolved:!1}}return e={resolveManifestOnLoad:function(ie){C=new Va({escapeMode:!1,attributePrefix:"",arrayAccessForm:"property",emptyNodeForm:"object",stripWhitespaces:!1,enableToStringFunc:!1,ignoreRoot:!0,matchers:o}),(p=ie).Period_asArray?B(k(p.Period_asArray,p,n.A.PERIOD,Ur),n.A.PERIOD,Ur):U.trigger(i.A.XLINK_READY,{manifest:p})},setMatchers:function(ie){ie&&(o=ie)},setIron:function(ie){ie&&(l=ie)},reset:function(){U.off(i.A.XLINK_ELEMENT_LOADED,w,e),b&&(b.reset(),b=null)}},U.on(i.A.XLINK_ELEMENT_LOADED,w,e),b=hs(F).create({errHandler:t.errHandler,dashMetrics:t.dashMetrics,mediaPlayerModel:t.mediaPlayerModel,requestModifier:t.requestModifier,settings:t.settings}),e}Ka.__dashjs_factory_name="XlinkController";var gs=h.A.getClassFactory(Ka);function ri(t){return ri=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ri(t)}function Wa(t){function e(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];ri(B)==="object"&&ri(w)==="object"?e(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||ri(p)!=="object")return p;if(p.Period_asArray&&"period"in t)for(var C=t.period,b=p.Period_asArray,F=0,U=b.length;F<U;++F){var H=b[F];if(l(C,H),"adaptationset"in t){var B=H.AdaptationSet_asArray;if(B)for(var w=t.adaptationset,j=0,k=B.length;j<k;++j)l(w,B[j])}}return p}}}Wa.__dashjs_factory_name="ObjectIron";var ms=h.A.getClassFactory(Wa);function ii(t){return ii=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ii(t)}function ys(t,e){for(var o=0;o<e.length;o++){var l=e[o];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(t,Es(l.key),l)}}function Es(t){var e=(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)})(t);return ii(e)=="symbol"?e:e+""}var bi=(function(){return t=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},(e=[{key:"test",get:function(){return this._test}},{key:"converter",get:function(){return this._converter}}])&&ys(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e})();function Br(t){return Br=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Br(t)}function Cn(t,e,o){return(e=_s(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}function _s(t){var e=(function(o){if(Br(o)!="object"||!o)return o;var l=o[Symbol.toPrimitive];if(l!==void 0){var p=l.call(o,"string");if(Br(p)!="object")return p;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(o)})(t);return Br(e)=="symbol"?e:e+""}function As(t,e,o){return e=Si(e),(function(l,p){if(p&&(Br(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)})(t,za()?Reflect.construct(e,o||[],Si(t).constructor):e.apply(t,o))}function za(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(za=function(){return!!t})()}function Si(t){return Si=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Si(t)}function Ji(t,e){return Ji=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,l){return o.__proto__=l,o},Ji(t,e)}var vs=(function(t){function e(){return(function(l,p){if(!(l instanceof p))throw new TypeError("Cannot call a class as a function")})(this,e),As(this,e,[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&&Ji(l,p)})(e,t),o=e,Object.defineProperty(o,"prototype",{writable:!1}),o;var o})(bi);function Zi(t){return Zi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Zi(t)}function Ts(t,e,o){return e=Ii(e),(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)})(t,Xa()?Reflect.construct(e,o||[],Ii(t).constructor):e.apply(t,o))}function Xa(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Xa=function(){return!!t})()}function Ii(t){return Ii=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ii(t)}function ea(t,e){return ea=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,l){return o.__proto__=l,o},ea(t,e)}var Qa=/^([-])?P(([\d.]*)Y)?(([\d.]*)M)?(([\d.]*)D)?T?(([\d.]*)H)?(([\d.]*)M)?(([\d.]*)S)?/,bs=(function(t){function e(){return(function(l,p){if(!(l instanceof p))throw new TypeError("Cannot call a class as a function")})(this,e),Ts(this,e,[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 Qa.test(l.value);return!1},function(l){var p=Qa.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&&ea(l,p)})(e,t),o=e,Object.defineProperty(o,"prototype",{writable:!1}),o;var o})(bi);function ta(t){return ta=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ta(t)}function Ss(t,e,o){return e=Ri(e),(function(l,p){if(p&&(ta(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)})(t,$a()?Reflect.construct(e,o||[],Ri(t).constructor):e.apply(t,o))}function $a(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return($a=function(){return!!t})()}function Ri(t){return Ri=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ri(t)}function na(t,e){return na=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,l){return o.__proto__=l,o},na(t,e)}var Ja=/^([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}))?/,Is=(function(t){function e(){return(function(l,p){if(!(l instanceof p))throw new TypeError("Cannot call a class as a function")})(this,e),Ss(this,e,[function(l){return Ja.test(l.value)},function(l){var p,C=Ja.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&&na(l,p)})(e,t),o=e,Object.defineProperty(o,"prototype",{writable:!1}),o;var o})(bi);function ra(t){return ra=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ra(t)}function Rs(t,e,o){return e=wi(e),(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)})(t,Za()?Reflect.construct(e,o||[],wi(t).constructor):e.apply(t,o))}function Za(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Za=function(){return!!t})()}function wi(t){return wi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},wi(t)}function ia(t,e){return ia=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,l){return o.__proto__=l,o},ia(t,e)}var ws=/^[-+]?[0-9]+[.]?[0-9]*([eE][-+]?[0-9]+)?$/,Ns=(function(t){function e(){return(function(l,p){if(!(l instanceof p))throw new TypeError("Cannot call a class as a function")})(this,e),Rs(this,e,[function(l){return ws.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&&ia(l,p)})(e,t),o=e,Object.defineProperty(o,"prototype",{writable:!1}),o;var o})(bi);function ai(t){return ai=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ai(t)}function Cs(t,e){for(var o=0;o<e.length;o++){var l=e[o];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(t,Ds(l.key),l)}}function Ds(t){var e=(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)})(t);return ai(e)=="symbol"?e:e+""}var Os=(function(){return t=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()},(e=[{key:"name",get:function(){return this._name}},{key:"merge",get:function(){return this._merge}}])&&Cs(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e})();function oi(t){return oi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},oi(t)}function Ms(t,e){for(var o=0;o<e.length;o++){var l=e[o];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(t,Ps(l.key),l)}}function Ps(t){var e=(function(o){if(oi(o)!="object"||!o)return o;var l=o[Symbol.toPrimitive];if(l!==void 0){var p=l.call(o,"string");if(oi(p)!="object")return p;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(o)})(t);return oi(e)=="symbol"?e:e+""}var kr=(function(){return t=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 Os(F))}))},(e=[{key:"name",get:function(){return this._name}},{key:"children",get:function(){return this._children}},{key:"properties",get:function(){return this._properties}}])&&Ms(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e})();function aa(t){return aa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},aa(t)}function Ls(t,e,o){return e=Ni(e),(function(l,p){if(p&&(aa(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)})(t,eo()?Reflect.construct(e,o||[],Ni(t).constructor):e.apply(t,o))}function eo(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(eo=function(){return!!t})()}function Ni(t){return Ni=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ni(t)}function oa(t,e){return oa=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,l){return o.__proto__=l,o},oa(t,e)}var Fs=(function(t){function e(){(function(p,C){if(!(p instanceof C))throw new TypeError("Cannot call a class as a function")})(this,e);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 Ls(this,e,[n.A.ADAPTATION_SET,l,[new kr(n.A.REPRESENTATION,l,[new kr(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&&oa(l,p)})(e,t),o=e,Object.defineProperty(o,"prototype",{writable:!1}),o;var o})(kr);function sa(t){return sa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},sa(t)}function xs(t,e,o){return e=Ci(e),(function(l,p){if(p&&(sa(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)})(t,to()?Reflect.construct(e,o||[],Ci(t).constructor):e.apply(t,o))}function to(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(to=function(){return!!t})()}function Ci(t){return Ci=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ci(t)}function ua(t,e){return ua=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,l){return o.__proto__=l,o},ua(t,e)}var Us=(function(t){function e(){(function(p,C){if(!(p instanceof C))throw new TypeError("Cannot call a class as a function")})(this,e);var l=[n.A.SEGMENT_BASE,n.A.SEGMENT_TEMPLATE,n.A.SEGMENT_LIST];return xs(this,e,[n.A.PERIOD,l,[new kr(n.A.ADAPTATION_SET,l,[new kr(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&&ua(l,p)})(e,t),o=e,Object.defineProperty(o,"prototype",{writable:!1}),o;var o})(kr);function no(t){t=t||{};var e,o,l,p,C,b=this.context,F=t.debug;return e={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(e),l=[new bs,new Is,new Ns,new vs],p=new Va({escapeMode:!1,attributePrefix:"",arrayAccessForm:"property",emptyNodeForm:"object",stripWhitespaces:!1,enableToStringFunc:!0,ignoreRoot:!1,matchers:l}),C=ms(b).create({adaptationset:new Fs,period:new Us}),e}no.__dashjs_factory_name="DashParser";var Bs=h.A.getClassFactory(no);function ro(t){t=t||{};var e,o,l,p,C,b=this.context,F=t.debug,U=t.settings,H=(0,y.A)(b).getInstance(),B=(0,Ae.A)(b).getInstance(),w=t.mssHandler,j=t.errHandler;function k(se){H.trigger(i.A.INTERNAL_MANIFEST_LOADED,{manifest:se.manifest})}return e={load:function(se){var ie=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,he=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,oe=new Date,te=new Ya(se,je.G.MPD_TYPE);ie&&(te.serviceLocation=ie),he&&(te.queryParams=he),te.requestStartDate||(te.requestStartDate=oe),H.trigger(i.A.MANIFEST_LOADING_STARTED,{request:te}),l.load({request:te,success:function(Z,K,z){var f,N,S;if(p)if(z&&z!==se?(N=B.parseBaseUrl(z),f=z):(B.isRelative(se)&&(se=B.resolve(se,window.location.href)),N=B.parseBaseUrl(se)),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?Bs(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 pe.A(me.MANIFEST_LOADER_PARSING_FAILURE_ERROR_CODE,me.MANIFEST_LOADER_PARSING_FAILURE_ERROR_MESSAGE+"".concat(se))})}if(S){if(S.url=f||se,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 pe.A(me.MANIFEST_LOADER_PARSING_FAILURE_ERROR_CODE,me.MANIFEST_LOADER_PARSING_FAILURE_ERROR_MESSAGE+"".concat(se))})}else H.trigger(i.A.INTERNAL_MANIFEST_LOADED,{manifest:null,error:new pe.A(me.MANIFEST_LOADER_PARSING_FAILURE_ERROR_CODE,me.MANIFEST_LOADER_PARSING_FAILURE_ERROR_MESSAGE+"".concat(se))});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 pe.A(me.MANIFEST_LOADER_LOADING_FAILURE_ERROR_CODE,me.MANIFEST_LOADER_LOADING_FAILURE_ERROR_MESSAGE+"".concat(se,", ").concat(z))})}})},reset:function(){H.off(i.A.XLINK_READY,k,e),w&&w.reset(),p&&(p.reset(),p=null),l&&(l.abort(),l=null)}},o=F.getLogger(e),H.on(i.A.XLINK_READY,k,e),l=Mn(b).create({errHandler:t.errHandler,dashMetrics:t.dashMetrics,mediaPlayerModel:t.mediaPlayerModel,requestModifier:t.requestModifier,urlUtils:B,constants:u.A,dashConstants:n.A,errors:me,requestTimeout:t.settings.get().streaming.manifestRequestTimeout}),p=gs(b).create({errHandler:j,dashMetrics:t.dashMetrics,mediaPlayerModel:t.mediaPlayerModel,requestModifier:t.requestModifier,settings:t.settings}),C=null,e}ro.__dashjs_factory_name="ManifestLoader";var ks=h.A.getClassFactory(ro);function io(){var t=this.context,e=(0,y.A)(t).getInstance();return{error:function(o){e.trigger(i.A.ERROR,{error:o})}}}io.__dashjs_factory_name="ErrorHandler";var Gs=h.A.getSingletonFactory(io),ao=M(6035);function oo(){var t,e,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,se){return new Promise((function(ie){if(k&&k.AdaptationSet_asArray&&k.AdaptationSet_asArray.length!==0){var he=[];k.AdaptationSet_asArray.forEach((function(oe){e.getIsTypeOf(oe,se)&&he.push((function(te,Z){return new Promise((function(K){if(te.Representation_asArray&&te.Representation_asArray.length!==0){var z=[],f=[];te.Representation_asArray.forEach((function(N,S){var L=e.getCodec(te,S,!1),R=(function(V,de,ue){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}})(de,ue);case u.A.AUDIO:return(function(P,$){var Y=P.audioSamplingRate||null;return{codec:$,bitrate:P.bandwidth||null,samplerate:Y}})(de,ue);default:return null}})(Z,N,L);f.push(R),z.push(o.supportsCodec(R,Z))})),Promise.all(z).then((function(N){te.Representation_asArray=te.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()}))})(oe,se))})),Promise.all(he).then((function(){k.AdaptationSet_asArray=k.AdaptationSet_asArray.filter((function(oe){var te=oe.Representation_asArray&&oe.Representation_asArray.length>0;return te||(F.trigger(i.A.ADAPTATION_SET_REMOVED_NO_CAPABILITIES,{adaptationSet:oe}),C.warn("AdaptationSet has been removed because of no supported Representation")),te})),ie()})).catch((function(){ie()}))}else ie()}))})(j,H))})),Promise.all(w)}return t={setConfig:function(H){H&&(H.adapter&&(e=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(se){return!se.Representation_asArray||se.Representation_asArray.length===0||(se.Representation_asArray=se.Representation_asArray.filter((function(ie){var he=e.getEssentialPropertiesForRepresentation(ie);if(he&&he.length>0)for(var oe=0;oe<he.length;){if(!o.supportsEssentialProperty(he[oe]))return C.debug("[Stream] EssentialProperty not supported: "+he[oe].schemeIdUri),!1;oe+=1}return!0})),se.Representation_asArray&&se.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(se){se.AdaptationSet_asArray=se.AdaptationSet_asArray.filter((function(ie){return!ie.Representation_asArray||ie.Representation_asArray.length===0||(ie.Representation_asArray=ie.Representation_asArray.filter((function(he){return!k.some((function(oe){return!oe(he)}))})),ie.Representation_asArray&&ie.Representation_asArray.length>0)}))}))})(H),B()})).catch((function(){B()}))}))}},C=(0,g.A)(b).getInstance().getLogger(t),t}oo.__dashjs_factory_name="CapabilitiesFilter";var js=h.A.getSingletonFactory(oo);function qs(t,e,o){return Object.defineProperty(t,"prototype",{writable:!1}),t}var Ys=qs((function t(){(function(e,o){if(!(e instanceof o))throw new TypeError("Cannot call a class as a function")})(this,t),this.t=null,this.xywh=null,this.track=null,this.id=null,this.s=null,this.r=null}));function so(){var t;return{initialize:function(e){if(t=new Ys,!e)return null;var o=e.indexOf("#");if(o!==-1)for(var l=e.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);t.hasOwnProperty(U)&&(t[U]=b.substr(F+1))}}},getURIFragmentData:function(){return t}}}so.__dashjs_factory_name="URIFragmentModel";var Hs=h.A.getSingletonFactory(so);function uo(){var t,e=this.context,o=(0,y.A)(e).getInstance();return{getValue:function(){return t},setValue:function(l){t=l,l&&o.trigger(i.A.MANIFEST_LOADED,{data:l})}}}uo.__dashjs_factory_name="ManifestModel";var Vs=h.A.getSingletonFactory(uo),la=-.5;function lo(){var t,e,o,l,p=this.context,C=(0,le.A)(p).getInstance();function b(H,B){return isNaN(H)?0:H>0?(B&&e.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<la?(B&&e.warn("Supplied minimum playback rate is out of range and will be limited to ".concat(la,": ").concat(-50,"% playback speed.")),la):H}function F(H,B){return isNaN(H)?0:H<0?(B&&e.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&&e.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 t={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(){}},e=(0,g.A)(p).getInstance().getLogger(t),t}lo.__dashjs_factory_name="MediaPlayerModel";var Ks=h.A.getSingletonFactory(lo),Ws=M(2365);function co(t){var e=(t=t||{}).abrController,o=t.switchHistory,l=t.droppedFramesHistory,p=t.currentRequest,C=t.useBufferOccupancyABR,b=t.useL2AABR,F=t.useLoLPABR,U=t.streamProcessor?t.streamProcessor.getScheduleController():null,H=t.streamProcessor?t.streamProcessor.getRepresentationInfo():null,B=t.videoModel?t.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 e},getRepresentationInfo:function(){return H},useBufferOccupancyABR:function(){return C},useL2AABR:function(){return b},useLoLPABR:function(){return F},getVideoModel:function(){return B}}}co.__dashjs_factory_name="RulesContext";var fo=h.A.getClassFactory(co),Di=M(5066);function po(){var t=[],e=[];return{push:function(o){o.newValue===Di.A.NO_CHANGE&&(o.newValue=o.oldValue),t[o.oldValue]||(t[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(t[o.oldValue].drops+=p,t[o.oldValue].dropSize+=C,t[o.oldValue].noDrops+=b,e.push({idx:o.oldValue,noDrop:b,drop:p,dropSize:C}),e.length>8){var F=e.shift();t[F.idx].drops-=F.drop,t[F.idx].dropSize-=F.dropSize,t[F.idx].noDrops-=F.noDrop}},getSwitchRequests:function(){return t},reset:function(){t=[],e=[]}}}po.__dashjs_factory_name="SwitchRequestHistory";var zs=h.A.getClassFactory(po);function ho(){var t={},e={},o={};return{push:function(l,p,C){if(p){t[l]||(t[l]=[],e[l]=0,o[l]=0);var b=C&&C.droppedVideoFrames?C.droppedVideoFrames:0,F=C&&C.totalVideoFrames?C.totalVideoFrames:0,U=b-e[l];e[l]=b;var H=F-o[l];o[l]=F;var B=t[l];isNaN(p)||(B[p]?(B[p].droppedVideoFrames+=U,B[p].totalVideoFrames+=H):B[p]={droppedVideoFrames:U,totalVideoFrames:H})}},getFrameHistory:function(l){return t[l]},clearForStream:function(l){try{delete t[l],delete e[l],delete o[l]}catch{}},reset:function(){t={},e={},o={}}}}ho.__dashjs_factory_name="DroppedFramesHistory";var Xs=h.A.getClassFactory(ho);function go(t){var e,o,l,p,C,b=this.context,F=3,U=4,H=4,B=1.3,w=1.3,j=(t=t||{}).settings,k=(0,y.A)(b).getInstance();function se(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 ie(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)),de=R.slowEstimate/(1-Math.pow(.5,R.totalWeight/L.slow));return N?Math.min(V,de):Math.max(V,de)})(K,z):(function(N,S,L){var R=(function(de,ue,P){var $,Y;if(de?($=e[ue],Y=P?F:U):($=o[ue],Y=H),$){if(Y>=$.length)Y=$.length;else if(de)for(var ge=1;ge<Y;++ge){var ve=$[$.length-ge]/$[$.length-ge-1];if((ve>=w||ve<=1/B)&&(Y+=1)===$.length)break}}else Y=0;return Y})(N,S,L),V=(N?e:o)[S];return R!==0&&V&&V.length!==0?(V=V.slice(-R)).reduce((function(de,ue){return de+ue}))/V.length:NaN})(K,z,f)}function he(K,z){return ie(!0,K,z)}function oe(K){e[K]=e[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 te(){e={},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 de=z.cmsd.dynamic&&z.cmsd.dynamic.etp?z.cmsd.dynamic.etp:null;if(de){var ue=j.get().streaming.cmsd.abr.etpWeightRatio;ue>0&&ue<=1&&(V=V*(1-ue)+de*ue)}}if(oe(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(e[K].length>0&&!e[K].hasCachedEntries)return;e[K].hasCachedEntries=!0}else e[K]&&e[K].hasCachedEntries&&(function(P){delete e[P],delete o[P],delete l[P],delete p[P],oe(P)})(K);e[K].push(V),k.trigger(r.A.THROUGHPUT_MEASUREMENT_STORED,{throughput:V,mediaType:K,httpRequest:z}),e[K].length>20&&e[K].shift(),o[K].push(S),o[K].length>20&&o[K].shift(),se(l[K],V,.001*L,C.throughputHalfLife),se(p[K],S,1,C.latencyHalfLife)}},getAverageThroughput:he,getSafeAverageThroughput:function(K,z){var f=he(K,z);return isNaN(f)||(f*=j.get().streaming.abr.bandwidthSafetyFactor),f},getAverageLatency:function(K){return ie(!1,K)},reset:te};return C={throughputHalfLife:{fast:3,slow:8},latencyHalfLife:{fast:1,slow:2}},te(),Z}go.__dashjs_factory_name="ThroughputHistory";var Qs=h.A.getClassFactory(go);function ca(){var t,e,o,l,p,C,b,F,U,H,B,w,j,k,se,ie,he,oe,te,Z,K,z,f,N,S,L,R,V=this.context,de=(0,g.A)(V).getInstance(),ue=(0,y.A)(V).getInstance();function P(){p={},C={},F={},b={},Z={},f={},N={},S={},H===void 0&&(H=!1),K&&K.reset(),te=void 0,K=void 0,z=void 0,clearTimeout(U),U=null}function $(Ee){var Pe=Ee.request.mediaType,ct=Ee.streamId;if(Pe&&ct&&b[ct]&&R.get().streaming.abr.autoSwitchBitrate[Pe]){var Ke=b[ct][Pe];if(Ke){var yt=fo(V).create({abrController:t,streamProcessor:Ke,currentRequest:Ee.request,useBufferOccupancyABR:f[Pe],useL2AABR:N[Pe],useLoLPABR:S[Pe],videoModel:k}),ht=o.shouldAbandonFragment(yt,ct);ht.quality>Di.A.NO_CHANGE&&Ke.getFragmentModel().getRequests({state:J.FRAGMENT_MODEL_LOADING,index:Ee.request.index})[0]&&(F[ct][Pe].state=_.A.ABANDON_LOAD,Z[ct][Pe].reset(),Z[ct][Pe].push({oldValue:Ce(Pe,ct),newValue:ht.quality,confidence:1,reason:ht.reason}),Me(Pe,l.getActiveStreamInfo(),ht.quality,ht.reason),clearTimeout(U),U=setTimeout((function(){F[ct][Pe].state=_.A.ALLOW_LOAD,U=null}),R.get().streaming.abandonLoadTimeout))}}}function Y(Ee){Ee.mediaType===u.A.VIDEO&&(te!==void 0&&K.push(Ee.streamId,te,k.getPlaybackQuality()),te=Ee.newQuality)}function ge(Ee){var Pe,ct;Ee.metric!==_.A.HTTP_REQUEST||!Ee.value||Ee.value.type!==je.G.MEDIA_SEGMENT_TYPE||Ee.mediaType!==u.A.AUDIO&&Ee.mediaType!==u.A.VIDEO||z.push(Ee.mediaType,Ee.value,R.get().streaming.abr.useDeadTimeLatency),Ee.metric!==_.A.BUFFER_LEVEL||Ee.mediaType!==u.A.AUDIO&&Ee.mediaType!==u.A.VIDEO||(Pe=Ee.mediaType,ct=.001*Ee.value.level,R.get().streaming.abr.ABRStrategy===u.A.ABR_STRATEGY_DYNAMIC&&(function(Ke,yt){try{var ht=se.getStableBufferTime(),dt=ht,qt=.5*ht,Yt=f[Ke],sn=yt>(Yt?qt:dt);f[Ke]=sn,sn!==Yt&&(sn?e.info("["+Ke+"] switching from throughput to buffer occupancy ABR rule (buffer: "+yt.toFixed(3)+")."):e.info("["+Ke+"] switching from buffer occupancy to throughput ABR rule (buffer: "+yt.toFixed(3)+")."))}catch(ln){e.error(ln)}})(Pe,ct))}function ve(Ee,Pe){try{var ct;return p[Pe]=p[Pe]||{},p[Pe].hasOwnProperty(Ee)||(p[Pe][Ee]=0),ct=(function(Ke,yt){var ht=p[yt][Ke],dt=ht;if(!b[yt]||!b[yt][Ke])return dt;var qt=fe(Ke,yt);qt!==void 0&&(dt=Math.max(ht,qt));var Yt=(function(sn,ln){try{var ke=se.getAbrBitrateParameter("maxBitrate",sn);return ke>-1?Ze(b[ln][sn].getMediaInfo(),ke,ln):void 0}catch{return}})(Ke,yt);return Yt!==void 0&&(dt=Math.min(dt,Yt)),dt})(Ee,Pe),ct=(function(Ke,yt,ht){var dt=p[ht][yt],qt=R.get().streaming.abr.maxRepresentationRatio[yt];return isNaN(qt)||qt>=1||qt<0?Ke:Math.min(Ke,Math.round(dt*qt))})(ct,Ee,Pe),ct=(function(Ke,yt,ht){if(yt!==u.A.VIDEO||!R.get().streaming.abr.limitBitrateByPortal||!b[ht]||!b[ht][yt])return Ke;H||Nt();var dt=b[ht][yt].getStreamInfo(),qt=j.getAdaptationForType(dt.index,yt,dt).Representation_asArray,Yt=Ke;if(B>0&&w>0){for(;Yt>0&&qt[Yt]&&B<qt[Yt].width&&B-qt[Yt-1].width<qt[Yt].width-B;)Yt-=1;for(;Yt<qt.length-1&&qt[Yt].width===qt[Yt+1].width;)Yt+=1}return Yt})(ct,Ee,Pe),R.get().streaming.cmsd.enabled&&R.get().streaming.cmsd.abr.applyMb&&(ct=(function(Ke,yt,ht){if(yt!=="video")return Ke;var dt=he.getMaxBitrate(yt);if(dt<0)return Ke;var qt=$e(ht,"audio",Ce("audio",ht));dt-=qt?qt.bitrate/1e3:0;var Yt=Ze(b[ht][yt].getMediaInfo(),dt,ht);return e.debug("Stream ID: "+ht+" ["+yt+"] Apply max bit rate from CMSD: "+dt),Math.min(Ke,Yt)})(ct,Ee,Pe)),ct}catch{return}}function fe(Ee,Pe){try{return(function(ct,Ke){try{var yt=se.getAbrBitrateParameter("minBitrate",ct);if(yt>-1){var ht=b[Ke][ct].getMediaInfo(),dt=at(ht),qt=Ze(ht,yt,Ke);return dt[qt]&&qt<dt.length-1&&dt[qt].bitrate<1e3*yt&&qt++,qt}return}catch{return}})(Ee,Pe)}catch{return}}function Ce(Ee){var Pe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;try{return Pe||(Pe=l.getActiveStreamInfo().id),Ee&&b[Pe]&&b[Pe][Ee]&&Pe?(C[Pe]=C[Pe]||{},C[Pe].hasOwnProperty(Ee)||(C[Pe][Ee]=0),C[Pe][Ee]):0}catch{return 0}}function Me(Ee,Pe,ct){var Ke=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;if(Pe&&Pe.id&&Ee){var yt=Pe.id,ht=Ce(Ee,yt);(0,D.zQ)(ct);var dt=ve(Ee,yt);ct!==ht&&ct>=0&&ct<=dt&&Qe(Ee,ht,ct,dt,Ke,yt)}}function Qe(Ee,Pe,ct,Ke,yt,ht){if(Ee&&b[ht]&&b[ht][Ee]){var dt=b[ht][Ee].getStreamInfo(),qt=dt&&dt.manifestInfo&&dt.manifestInfo.isDynamic,Yt=L.getCurrentBufferLevel(Ee);e.info("Stream ID: "+ht+" ["+Ee+"] switch from "+Pe+" to "+ct+"/"+Ke+" (buffer: "+Yt+") "+(yt?JSON.stringify(yt):".")),C[ht]=C[ht]||{},C[ht][Ee]=ct;var sn=$e(ht,Ee,ct);ue.trigger(i.A.QUALITY_CHANGE_REQUESTED,{oldQuality:Pe,newQuality:ct,reason:yt,streamInfo:dt,bitrateInfo:sn,maxIdx:Ke,mediaType:Ee},{streamId:dt.id,mediaType:Ee});var ln=z.getAverageThroughput(Ee,qt);isNaN(ln)||oe.setSavedBitrateSettings(Ee,ln)}}function $e(Ee,Pe,ct){if(Pe&&b&&b[Ee]&&b[Ee][Pe]){var Ke=at(b[Ee][Pe].getMediaInfo());return Ke[ct]?Ke[ct]:null}return null}function Ze(Ee,Pe,ct){var Ke=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null,yt=Ee&&Ee.type?b[ct][Ee.type].getRepresentationInfo():null;if(R.get().streaming.abr.useDeadTimeLatency&&Ke&&yt&&yt.fragmentDuration){Ke/=1e3;var ht=yt.fragmentDuration;if(Ke>ht)return 0;Pe*=1-Ke/ht}for(var dt=at(Ee),qt=dt.length-1;qt>=0;qt--)if(1e3*Pe>=dt[qt].bitrate)return qt;return 0}function at(Ee){var Pe=[];if(!Ee||!Ee.bitrateList)return Pe;for(var ct,Ke=Ee.bitrateList,yt=Ee.type,ht=0,dt=Ke.length;ht<dt;ht++)(ct=new _i).mediaType=yt,ct.qualityIndex=ht,ct.bitrate=Ke[ht].bandwidth,ct.width=Ke[ht].width,ct.height=Ke[ht].height,ct.scanType=Ke[ht].scanType,Pe.push(ct);return Pe}function Nt(){if(k){var Ee=R.get().streaming.abr.usePixelRatioInLimitBitrateByPortal&&window.hasOwnProperty("devicePixelRatio")?window.devicePixelRatio:1;B=k.getClientWidth()*Ee,w=k.getClientHeight()*Ee}}return t={initialize:function(){K=Xs(V).create(),z=Qs(V).create({settings:R}),(o=(0,Ws.A)(V).create({dashMetrics:L,customParametersModel:ie,mediaPlayerModel:se,settings:R})).initialize(),ue.on(r.A.QUALITY_CHANGE_RENDERED,Y,t),ue.on(r.A.METRIC_ADDED,ge,t),ue.on(i.A.LOADING_PROGRESS,$,t)},isPlayingAtTopQuality:function(Ee){var Pe=Ee?Ee.id:null,ct=Ce(u.A.AUDIO,Pe),Ke=Ce(u.A.VIDEO,Pe);return ct===ve(u.A.AUDIO,Pe)&&Ke===ve(u.A.VIDEO,Pe)},updateTopQualityIndex:function(Ee){var Pe=Ee.type,ct=Ee.streamInfo.id,Ke=Ee.representationCount-1;return p[ct]=p[ct]||{},p[ct][Pe]=Ke,Ke},clearDataForStream:function(Ee){K&&K.clearForStream(Ee),b[Ee]&&delete b[Ee],Z[Ee]&&delete Z[Ee],F[Ee]&&delete F[Ee]},getThroughputHistory:function(){return z},getBitrateList:at,getQualityForBitrate:Ze,getTopBitrateInfoFor:function(Ee){var Pe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(Pe||(Pe=l.getActiveStreamInfo().id),Ee&&b&&b[Pe]&&b[Pe][Ee]){var ct=ve(Ee,Pe),Ke=at(b[Pe][Ee].getMediaInfo());return Ke[ct]?Ke[ct]:null}return null},getMinAllowedIndexFor:fe,getMaxAllowedIndexFor:ve,getInitialBitrateFor:function(Ee,Pe){if((function(){if(!oe||!oe.hasOwnProperty("getSavedBitrateSettings"))throw new Error(u.A.MISSING_CONFIG_ERROR)})(),Ee===u.A.TEXT)return NaN;var ct=oe.getSavedBitrateSettings(Ee),Ke=se.getAbrBitrateParameter("initialBitrate",Ee),yt=R.get().streaming.abr.initialRepresentationRatio[Ee];if(Ke===-1)if(yt>-1){var ht=b[Pe][Ee].getStreamInfo(),dt=j.getAdaptationForType(ht.index,Ee,ht).Representation_asArray;Ke=Array.isArray(dt)?dt[Math.max(Math.round(dt.length*yt)-1,0)].bandwidth/1e3:0}else Ke=isNaN(ct)?Ee===u.A.VIDEO?1e3:100:ct;return Ke},getQualityFor:Ce,getAbandonmentStateFor:function(Ee,Pe){return F[Ee]&&F[Ee][Pe]?F[Ee][Pe].state:null},setPlaybackQuality:Me,checkPlaybackQuality:function(Ee,Pe){try{if(!(Ee&&b&&b[Pe]&&b[Pe][Ee]))return!1;if(K){var ct=k.getPlaybackQuality();ct&&K.push(Pe,te,ct)}if(!R.get().streaming.abr.autoSwitchBitrate[Ee])return!1;var Ke=Ce(Ee,Pe),yt=fo(V).create({abrController:t,switchHistory:Z[Pe][Ee],droppedFramesHistory:K,streamProcessor:b[Pe][Ee],currentValue:Ke,useBufferOccupancyABR:f[Ee],useL2AABR:N[Ee],useLoLPABR:S[Ee],videoModel:k}),ht=fe(Ee,Pe),dt=ve(Ee,Pe),qt=o.getMaxQuality(yt),Yt=qt.quality;return ht!==void 0&&(Yt>Di.A.NO_CHANGE?Yt:Ke)<ht&&(Yt=ht),Yt>dt&&(Yt=dt),Z[Pe][Ee].push({oldValue:Ke,newValue:Yt}),Yt>Di.A.NO_CHANGE&&Yt!==Ke&&(F[Pe][Ee].state===_.A.ALLOW_LOAD||Yt<Ke)&&(Qe(Ee,Ke,Yt,dt,qt.reason,Pe),!0)}catch{return!1}},setElementSize:Nt,setWindowResizeEventCalled:function(Ee){H=Ee},registerStreamType:function(Ee,Pe){var ct=Pe.getStreamInfo().id;b[ct]||(b[ct]={}),Z[ct]||(Z[ct]={}),F[ct]||(F[ct]={}),Z[ct][Ee]=zs(V).create(),b[ct][Ee]=Pe,F[ct][Ee]={},F[ct][Ee].state=_.A.ALLOW_LOAD,(function(Ke){var yt=R.get().streaming.abr.ABRStrategy;yt===u.A.ABR_STRATEGY_L2A?(f[Ke]=!1,S[Ke]=!1,N[Ke]=!0):yt===u.A.ABR_STRATEGY_LoLP?(f[Ke]=!1,S[Ke]=!0,N[Ke]=!1):yt===u.A.ABR_STRATEGY_BOLA?(f[Ke]=!0,S[Ke]=!1,N[Ke]=!1):yt===u.A.ABR_STRATEGY_THROUGHPUT?(f[Ke]=!1,S[Ke]=!1,N[Ke]=!1):yt===u.A.ABR_STRATEGY_DYNAMIC&&(f[Ke]=!(!f||!f[Ke])&&f[Ke],S[Ke]=!1,N[Ke]=!1)})(Ee),Ee===u.A.VIDEO&&Nt()},unRegisterStreamType:function(Ee,Pe){try{b[Ee]&&b[Ee][Pe]&&delete b[Ee][Pe],Z[Ee]&&Z[Ee][Pe]&&delete Z[Ee][Pe],F[Ee]&&F[Ee][Pe]&&delete F[Ee][Pe]}catch{}},setConfig:function(Ee){Ee&&(Ee.streamController&&(l=Ee.streamController),Ee.domStorage&&(oe=Ee.domStorage),Ee.mediaPlayerModel&&(se=Ee.mediaPlayerModel),Ee.customParametersModel&&(ie=Ee.customParametersModel),Ee.cmsdModel&&(he=Ee.cmsdModel),Ee.dashMetrics&&(L=Ee.dashMetrics),Ee.adapter&&(j=Ee.adapter),Ee.videoModel&&(k=Ee.videoModel),Ee.settings&&(R=Ee.settings))},reset:function(){P(),ue.off(i.A.LOADING_PROGRESS,$,t),ue.off(r.A.QUALITY_CHANGE_RENDERED,Y,t),ue.off(r.A.METRIC_ADDED,ge,t),o&&o.reset()}},e=de.getLogger(t),P(),t}ca.__dashjs_factory_name="AbrController";var fa=h.A.getSingletonFactory(ca);fa.QUALITY_DEFAULT=0,h.A.updateSingletonFactory(ca.__dashjs_factory_name,fa);var $s=fa,Js=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 mo(){var t,e,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 se(K,z){o&&o.addEventListener(K,z)}function ie(K,z){o&&o.removeEventListener(K,z)}function he(){return o?o.readyState:NaN}function oe(){return o?o.buffered:null}function te(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||he()>=K?(z(),null):(function(f,N){var S=function(){ie(f,S),N(f)};return se(f,S),{func:S,event:f}})(Js.get(K),z)}return t={addEventListener:se,addTextTrack:function(K,z,f,N,S){if(!o)return null;var L=te(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:oe,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:he,getSource:function(){return o?o.src:null},getTTMLRenderingDiv:function(){return C},getTextTrack:te,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),e.warn("Caught pending play exception - continuing (".concat(z,")"))}))}},removeChild:function(K){o&&o.removeChild(K)},removeEventListener:ie,reset:function(){clearTimeout(F),H.off(i.A.PLAYBACK_PLAYING,k,this)},setCurrentTime:function(K,z){o&&(p&&p.func&&p.event&&ie(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=oe(),S=f,L=9999999999;if(N)for(var R=0;R<N.length;R++){var V=N.start(R),de=N.end(R),ue=Math.abs(V-f),P=Math.abs(de-f);if(f>=V&&f<=de)return f;ue<L&&(L=ue,S=V),P<L&&(L=P,S=de)}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)}},e=(0,g.A)(U).getInstance().getLogger(t),l=NaN,t}mo.__dashjs_factory_name="VideoModel";var Zs=h.A.getSingletonFactory(mo),eu=[{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"}],yo="dashjs_?_bitrate",Eo="dashjs_?_settings",Gr="localStorage",_o="lastBitrate",Ao="lastMediaSettings";function vo(t){t=t||{};var e,o,l,p=this.context,C=t.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!==Gr)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 e={getSavedBitrateSettings:function(B){if(H(),!C.get().streaming.lastBitrateCachingInfo.enabled)return NaN;var w=NaN;if(U(Gr,_o)){var j=yo.replace(/\?/,B);try{var k=JSON.parse(localStorage.getItem(j))||{},se=new Date().getTime()-parseInt(k.timestamp,10)>=C.get().streaming.lastBitrateCachingInfo.ttl||!1,ie=parseFloat(k.bitrate);isNaN(ie)||se?se&&localStorage.removeItem(j):(w=ie,o.debug("Last saved bitrate for "+B+" was "+ie))}catch{return null}}return w},setSavedBitrateSettings:function(B,w){if(U(Gr,_o)&&w){var j=yo.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(Gr,Ao)){var j=Eo.replace(/\?/,B);try{var k=JSON.parse(localStorage.getItem(j))||{},se=new Date().getTime()-parseInt(k.timestamp,10)>=C.get().streaming.lastMediaSettingsCachingInfo.ttl||!1;w=k.settings,se&&(localStorage.removeItem(j),w=null)}catch{return null}}return w},setSavedMediaSettings:function(B,w){if(U(Gr,Ao)){var j=Eo.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(e),b(Gr)&&eu.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)}}})),e}vo.__dashjs_factory_name="DOMStorage";var tu=h.A.getSingletonFactory(vo),nu=M(6558),To=M(5708);function bo(){var t,e,o,l,p,C,b,F,U,H,B,w,j,k=this.context;function se(te,Z,K,z){var f=null,N=te?j.resolve(te.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};e.debug("Start searching for initialization.");var L=oe(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,se(te,Z,K,S);te.range=f,K(te)},error:function(){K(te)}}),e.debug("Perform init search: "+S.url)}function ie(te,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||he;var L=null,R=null,V=!!K,de=te?j.resolve(te.path):null,ue={init:!1,url:de?de.url:void 0,range:V?K:{start:0,end:1500},searching:!V,bytesLoaded:N?N.bytesLoaded:0,bytesToLoad:1500,mediaType:Z},P=oe(ue);F.load({request:P,success:function($){var Y=ue.bytesToLoad,ge=$.byteLength;if(ue.bytesLoaded=ue.range.end-ue.range.start,L=l.parse($),(R=L.getBox("sidx"))&&R.isComplete){var ve,fe,Ce=R.references;if(Ce!=null&&Ce.length>0&&(ve=Ce[0].reference_type===1),ve){var Me,Qe,$e,Ze;e.debug("Initiate multiple SIDX load."),ue.range.end=ue.range.start+R.size;var at=[],Nt=0,Ee=(R.offset||ue.range.start)+R.size,Pe=function(Ke){Ke?(at=at.concat(Ke),++Nt>=Qe&&(at.sort((function(yt,ht){return yt.startTime-ht.startTime<0?-1:0})),f(at,te,z))):f(null,te,z)};for(Me=0,Qe=Ce.length;Me<Qe;Me++)$e=Ee,Ze=Ee+Ce[Me].referenced_size-1,Ee+=Ce[Me].referenced_size,ie(te,Z,{start:$e,end:Ze},z,Pe,ue)}else e.debug("Parsing segments from SIDX. representation "+Z+" - id: "+te.id+" for range : "+ue.range.start+" - "+ue.range.end),fe=(function(Ke,yt){for(var ht,dt,qt,Yt,sn=Ke.references,ln=sn.length,ke=Ke.timescale,ut=Ke.earliest_presentation_time,tt=yt.range.start+Ke.offset+Ke.first_offset+Ke.size,gt=[],Dt=0;Dt<ln;Dt++)qt=sn[Dt].subsegment_duration,Yt=sn[Dt].referenced_size,(ht=new To.A).duration=qt,ht.startTime=ut,ht.timescale=ke,dt=tt+Yt-1,ht.mediaRange=tt+"-"+dt,gt.push(ht),ut+=qt,tt+=Yt;return gt})(R,ue),f(fe,te,z)}else{if(R)ue.range.start=R.offset||ue.range.start,ue.range.end=ue.range.start+(R.size||Y);else{if(ge<ue.bytesLoaded)return void f(null,te,z);var ct=L.getLastBox();ct&&ct.size?(ue.range.start=ct.offset+ct.size,ue.range.end=ue.range.start+Y):ue.range.end+=Y}ie(te,Z,ue.range,z,null,ue)}},error:function(){f(null,te,z)}}),e.debug("Perform SIDX load for type ".concat(Z," : ").concat(ue.url," with range ").concat(ue.range.start," - ").concat(ue.range.end))}function he(te,Z,K){K({segments:te,representation:Z,error:te?void 0:new pe.A(U.SEGMENT_BASE_LOADER_ERROR_CODE,U.SEGMENT_BASE_LOADER_ERROR_MESSAGE)})}function oe(te){if(te.url){var Z=new T.A;return Z.setInfo(te),Z}}return t={setConfig:function(te){te.baseURLController&&(j=te.baseURLController),te.dashMetrics&&(C=te.dashMetrics),te.mediaPlayerModel&&(b=te.mediaPlayerModel),te.errHandler&&(o=te.errHandler),te.boxParser&&(l=te.boxParser),te.debug&&(e=te.debug.getLogger(t)),te.requestModifier&&(p=te.requestModifier),te.errors&&(U=te.errors),te.urlUtils&&(w=te.urlUtils),te.constants&&(H=te.constants),te.dashConstants&&(B=te.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(te,Z){return new Promise((function(K){se(te,Z,K)}))},loadSegments:function(te,Z,K){return new Promise((function(z){ie(te,Z,K,z)}))},reset:function(){F&&(F.abort(),F=null)}}}bo.__dashjs_factory_name="SegmentBaseLoader";var ru=h.A.getSingletonFactory(bo);function So(t){var e;t=t||{};var o=new DataView(t.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 e={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(),e[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}}}So.__dashjs_factory_name="EBMLParser";var Io=h.A.getClassFactory(So);function Ro(){var t,e,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 t={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,e=j.debug.getLogger(t),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(se){var ie=null,he=j?H.resolve(j.path):null,oe=j?j.range.split("-"):null,te={range:{start:oe?parseFloat(oe[0]):null,end:oe?parseFloat(oe[1]):null},request:ie,url:he?he.url:void 0,init:!0,mediaType:k};e.info("Start loading initialization."),ie=w(te),F.load({request:ie,success:function(){se(j)},error:function(){se(j)}}),e.debug("Perform init load: "+te.url)}))},loadSegments:function(j,k,se){return new Promise((function(ie){var he=null,oe=j?H.resolve(j.path):null,te=oe?oe.url:void 0;he=w({bytesLoaded:0,bytesToLoad:8192,range:{start:0,end:8192},request:he,url:te,init:!1,mediaType:k}),e.debug("Parsing ebml header"),F.load({request:he,success:function(Z){(function(K,z,f,N){if(K&&K.byteLength!==0){var S,L,R,V,de=Io(B).create({data:K}),ue=f?f.split("-"):null,P=null,$={url:z,range:{start:ue?parseFloat(ue[0]):null,end:ue?parseFloat(ue[1]):null},request:P};for(e.debug("Parse EBML header: "+$.url),de.skipOverElement(o.EBML),de.consumeTag(o.Segment),R=de.getMatroskaCodedNum(),R+=de.getPos(),V=de.getPos();de.moreData()&&!de.consumeTagAndSize(o.Segment.Info,!0);)if(!(de.skipOverElement(o.Segment.SeekHead,!0)||de.skipOverElement(o.Segment.Tracks,!0)||de.skipOverElement(o.Segment.Cues,!0)||de.skipOverElement(o.Void,!0)))throw new Error("no valid top level element found");for(;S===void 0;){var Y=de.getMatroskaCodedNum(!0),ge=de.getMatroskaCodedNum();Y===o.Segment.Info.Duration.tag?S=de[o.Segment.Info.Duration.parse](ge):de.setPos(de.getPos()+ge)}P=w($),F.load({request:P,success:function(ve){L=(function(fe,Ce,Me,Qe){var $e,Ze,at,Nt,Ee,Pe,ct,Ke;for(at=[],Ee=0,Pe=(Ze=(function(yt){var ht,dt,qt=[],Yt=Io(B).create({data:yt});for(Yt.consumeTagAndSize(o.Segment.Cues);Yt.moreData()&&Yt.consumeTagAndSize(o.Segment.Cues.CuePoint,!0);){for((ht={}).CueTime=Yt.parseTag(o.Segment.Cues.CuePoint.CueTime),ht.CueTracks=[];Yt.moreData()&&Yt.consumeTag(o.Segment.Cues.CuePoint.CueTrackPositions,!0);){var sn=Yt.getMatroskaCodedNum(),ln=Yt.getPos();if((dt={}).Track=Yt.parseTag(o.Segment.Cues.CuePoint.CueTrackPositions.CueTrack),dt.Track===0)throw new Error("Cue track cannot be 0");dt.ClusterPosition=Yt.parseTag(o.Segment.Cues.CuePoint.CueTrackPositions.CueClusterPosition),ht.CueTracks.push(dt),Yt.setPos(ln+sn)}if(ht.CueTracks.length===0)throw new Error("Mandatory cuetrack not found");qt.push(ht)}if(qt.length===0)throw new Error("mandatory cuepoint not found");return qt})(fe)).length;Ee<Pe;Ee+=1)Nt=new To.A,$e=Ee<Ze.length-1?Ze[Ee+1].CueTime-Ze[Ee].CueTime:Qe-Ze[Ee].CueTime,Nt.duration=$e,Nt.startTime=Ze[Ee].CueTime,Nt.timescale=1e3,ct=Ze[Ee].CueTracks[0].ClusterPosition+Ce,Ke=Ee<Ze.length-1?Ze[Ee+1].CueTracks[0].ClusterPosition+Ce-1:Me-1,Nt.mediaRange=ct+"-"+Ke,at.push(Nt);return e.debug("Parsed cues: "+at.length+" cues."),at})(ve,V,R,S),N(L)},error:function(){e.error("Download Error: Cues "+$.url),N(null)}}),e.debug("Perform cues load: "+$.url+" bytes="+$.range.start+"-"+$.range.end)}else N(null)})(Z,te,se,(function(K){ie({segments:K,representation:j,error:K?void 0:new pe.A(U.SEGMENT_BASE_LOADER_ERROR_CODE,U.SEGMENT_BASE_LOADER_ERROR_MESSAGE)})}))},error:function(){ie({representation:j,error:new pe.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}},t}Ro.__dashjs_factory_name="WebmSegmentBaseLoader";var iu=h.A.getSingletonFactory(Ro);function wo(t){t=t||{};var e,o,l,p=this.context,C=t.eventBus,b=t.events,F=t.dashMetrics,U=t.mediaPlayerModel,H=t.errHandler,B=t.baseURLController,w=t.debug,j=t.boxParser,k=t.requestModifier,se=t.errors;function ie(he){return(he?he.split("/")[1]:"").toLowerCase()==="webm"}return e={initialize:function(){o.initialize(),l.initialize()},getSegmentBaseInitSegment:function(he){return ie(he.representation.mimeType)?l.loadInitialization(he.representation,he.mediaType):o.loadInitialization(he.representation,he.mediaType)},getSegmentList:function(he){return ie(he.mimeType)?l.loadSegments(he.representation,he.mediaType,he.representation?he.representation.indexRange:null):o.loadSegments(he.representation,he.mediaType,he.representation?he.representation.indexRange:null)},reset:function(){o.reset(),l.reset()}},o=ru(p).getInstance(),l=iu(p).getInstance(),o.setConfig({baseURLController:B,dashMetrics:F,mediaPlayerModel:U,errHandler:H,eventBus:C,events:b,errors:se,debug:w,boxParser:j,requestModifier:k}),l.setConfig({baseURLController:B,dashMetrics:F,mediaPlayerModel:U,errHandler:H,eventBus:C,events:b,errors:se,debug:w,requestModifier:k}),e}wo.__dashjs_factory_name="SegmentBaseController";var au=h.A.getSingletonFactory(wo);function ou(t,e,o){return Object.defineProperty(t,"prototype",{writable:!1}),t}var No=ou((function t(){(function(e,o){if(!(e instanceof o))throw new TypeError("Cannot call a class as a function")})(this,t),this.id=null,this.quality=null,this.fragmentDuration=null,this.mediaInfo=null,this.MSETimeOffset=null}));function su(t,e,o){return Object.defineProperty(t,"prototype",{writable:!1}),t}var da=su((function t(){(function(e,o){if(!(e instanceof o))throw new TypeError("Cannot call a class as a function")})(this,t),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 uu(t,e,o){return Object.defineProperty(t,"prototype",{writable:!1}),t}var Co=uu((function t(){(function(e,o){if(!(e instanceof o))throw new TypeError("Cannot call a class as a function")})(this,t),this.id=null,this.index=null,this.start=NaN,this.duration=NaN,this.manifestInfo=null,this.isLast=!0}));function lu(t,e,o){return Object.defineProperty(t,"prototype",{writable:!1}),t}var cu=lu((function t(){(function(e,o){if(!(e instanceof o))throw new TypeError("Cannot call a class as a function")})(this,t),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 si(t){return si=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},si(t)}function fu(t,e){for(var o=0;o<e.length;o++){var l=e[o];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(t,du(l.key),l)}}function du(t){var e=(function(o){if(si(o)!="object"||!o)return o;var l=o[Symbol.toPrimitive];if(l!==void 0){var p=l.call(o,"string");if(si(p)!="object")return p;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(o)})(t);return si(e)=="symbol"?e:e+""}var pu=(function(){return t=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}))},(e=[{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}}}])&&fu(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e})();function ui(t){return ui=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ui(t)}function hu(t,e){for(var o=0;o<e.length;o++){var l=e[o];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(t,gu(l.key),l)}}function gu(t){var e=(function(o){if(ui(o)!="object"||!o)return o;var l=o[Symbol.toPrimitive];if(l!==void 0){var p=l.call(o,"string");if(ui(p)!="object")return p;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(o)})(t);return ui(e)=="symbol"?e:e+""}var mu=(function(){return t=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},(e=[{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)}}])&&hu(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e})();function Do(){var t,e,o=this.context;return t={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 e.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 e.warn("Ignoring add action for prefixed namespace declaration: ".concat(b.type,"=").concat(b.__text)),null;F="".concat(F,"/").concat(b.type)}var U=new pu(F);if(!U.isValid())return e.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 mu(C,U,H);return C==="add"&&(B.position=b.pos),B})).filter((function(p){return!!p})):[]}},e=(0,g.A)(o).getInstance().getLogger(t),t}Do.__dashjs_factory_name="PatchManifestModel";var yu=h.A.getSingletonFactory(Do);function Oo(){var t,e,o,l,p,C,b,F=this.context;function U(S,L,R){var V,de=e.getAdaptationsForType(l[0].mpd.manifest,S,L);if(!de||de.length===0)return null;if(de.length>1&&R){var ue=w(R,L);if(p[R.id]&&p[R.id][L]){for(var P=0,$=de.length;P<$;P++)if(H(p[R.id][L],ue[P]))return de[P]}for(var Y=0,ge=de.length;Y<ge;Y++)if(V=de[Y],e.getRolesForAdaptation(V).filter((function(ve){return ve.value===n.A.MAIN}))[0])return de[Y]}return de[0]}function H(S,L){if(!S||!L)return!1;var R=S.id===L.id,V=S.codec===L.codec,de=S.viewpoint===L.viewpoint,ue=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),ge=S.accessibility.toString()===L.accessibility.toString(),ve=JSON.stringify(S.accessibilitiesWithSchemeIdUri)===JSON.stringify(L.accessibilitiesWithSchemeIdUri),fe=S.audioChannelConfiguration.toString()===L.audioChannelConfiguration.toString(),Ce=JSON.stringify(S.audioChannelConfigurationsWithSchemeIdUri)===JSON.stringify(L.audioChannelConfigurationsWithSchemeIdUri);return R&&V&&de&&ue&&P&&$&&Y&&ge&&ve&&fe&&Ce}function B(S,L,R,V,de,ue){var P,$,Y,ge,ve,fe,Ce=[];if(!V||V.length===0)return[];var Me=e.getAdaptationsForPeriod(L);for(ge=0,fe=V.length;ge<fe;ge++)if(P=V[ge],$=te(Me[Y=e.getIndexForAdaptation(P,S,R.index)]),ue){var Qe=$.accessibility.length;for(ve=0;ve<Qe;ve++)if($){var $e=$.accessibility[ve];if($e.indexOf("cea-608:")===0){var Ze=$e.substring(8).split(";");if(Ze[0].substring(0,2)==="CC")for(ve=0;ve<Ze.length;ve++)$||($=te.call(this,Me[Y])),Z($,Ze[ve].substring(0,3),Ze[ve].substring(4)),Ce.push($),$=null;else for(ve=0;ve<Ze.length;ve++)$||($=te.call(this,Me[Y])),Z($,"CC"+(ve+1),Ze[ve]),Ce.push($),$=null}else $e.indexOf("cea-608")===0&&(Z($,C.CC1,"eng"),Ce.push($),$=null)}}else de===C.IMAGE?($.type=C.IMAGE,Ce.push($),$=null):$&&Ce.push($);return Ce}function w(S,L,R){var V=l,de=R,ue=[];if(de)z(),V=j(de);else{if(!(l.length>0))return ue;de=l[0].mpd.manifest}var P=oe(S,V),$=e.getAdaptationsForType(de,S?S.index:null,L);return ue=B(de,P,S,$,L),L===C.TEXT&&($=e.getAdaptationsForType(de,S?S.index:null,C.VIDEO),ue=ue.concat(B(de,P,S,$,L,!0))),ue}function j(S){var L=k(S);return e.getRegularPeriods(L)}function k(S){var L=ie(S);return e.getMpd(L)}function se(){l=[],p={}}function ie(S){return S||(l.length>0?l[0].mpd.manifest:null)}function he(S){try{var L=oe(S.streamInfo,l),R=e.getAdaptationsForPeriod(L);return S&&S.streamInfo&&S.streamInfo.id!==void 0&&R?R[S.index]:null}catch{return null}}function oe(S,L){for(var R=L.length,V=0;V<R;V++){var de=L[V];if(S&&S.id===de.id)return de}return null}function te(S){if(!S)return null;var L,R,V,de,ue,P=new da,$=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=e.getRepresentationCount($),P.labels=e.getLabelsForAdaptation($),P.lang=e.getLanguageForAdaptation($),P.segmentAlignment=e.getSegmentAlignment($),P.subSegmentAlignment=e.getSubSegmentAlignment($),L=e.getViewpointForAdaptation($),P.viewpoint=L.length?L[0].value:void 0,P.viewpointsWithSchemeIdUri=L,ue=e.getAccessibilityForAdaptation($),P.accessibility=ue.map((function(Ce){var Me=Ce.value,Qe=Me;return Ce.schemeIdUri&&Ce.schemeIdUri.search("cea-608")>=0&&b!==void 0&&(Qe=Me?"cea-608:"+Me:"cea-608",P.embeddedCaptions=!0),Qe})),P.accessibilitiesWithSchemeIdUri=ue,R=e.getAudioChannelConfigurationForAdaptation($),P.audioChannelConfiguration=R.map((function(Ce){return Ce.value})),P.audioChannelConfigurationsWithSchemeIdUri=R,P.audioChannelConfiguration.length===0&&Array.isArray($.Representation_asArray)&&$.Representation_asArray.length>0&&(V=e.getAudioChannelConfigurationForRepresentation($.Representation_asArray[0]),P.audioChannelConfiguration=V.map((function(Ce){return Ce.value})),P.audioChannelConfigurationsWithSchemeIdUri=V),de=e.getRolesForAdaptation($),P.roles=de.map((function(Ce){return Ce.value})),P.rolesWithSchemeIdUri=de,P.codec=e.getCodec($),P.mimeType=e.getMimeType($),P.contentProtection=e.getContentProtectionData($),P.bitrateList=e.getBitrateListForAdaptation($),P.selectionPriority=e.getSelectionPriority($),P.contentProtection){var Y=P.contentProtection.map((function(Ce){return e.getKID(Ce)})).filter((function(Ce){return Ce!==null}));if(Y.length){var ge=Y[0];P.contentProtection.forEach((function(Ce){Ce.keyId=ge}))}}if(P.isText=e.getIsText($),P.supplementalProperties=e.getSupplementalPropertiesForAdaptation($),(!P.supplementalProperties||Object.keys(P.supplementalProperties).length===0)&&Array.isArray($.Representation_asArray)&&$.Representation_asArray.length>0){var ve=$.Representation_asArray.map((function(Ce){return e.getSupplementalPropertiesForRepresentation(Ce)}));ve.every((function(Ce){return JSON.stringify(Ce)===JSON.stringify(ve[0])}))&&(P.supplementalProperties=ve[0])}if(P.supplementalPropertiesAsArray=e.getSupplementalPropertiesAsArrayForAdaptation($),(!P.supplementalPropertiesAsArray||P.supplementalPropertiesAsArray.length===0)&&Array.isArray($.Representation_asArray)&&$.Representation_asArray.length>0){var fe=$.Representation_asArray.map((function(Ce){return e.getSupplementalPropertiesAsArrayForRepresentation(Ce)}));fe.every((function(Ce){return JSON.stringify(Ce)===JSON.stringify(fe[0])}))&&(P.supplementalPropertiesAsArray=fe[0])}return P.essentialProperties=e.getEssentialPropertiesForAdaptation($),P.essentialPropertiesAsArray=e.getEssentialPropertiesAsArrayForAdaptation($),P.isFragmented=e.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 Co;return V.id=S.id,V.index=S.index,V.start=S.start,V.duration=S.duration,V.manifestInfo=(L=S.mpd,(R=new cu).dvrWindowSize=L.timeShiftBufferDepth,R.loadedTime=L.manifest.loadedTime,R.availableFrom=L.availabilityStartTime,R.minBufferTime=L.manifest.minBufferTime,R.maxFragmentDuration=L.maxSegmentDuration,R.duration=e.getDuration(L.manifest),R.isDynamic=e.getIsDynamic(L.manifest),R.serviceDescriptions=e.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,de,ue,P,$;if(S){for(V=S.AdaptationSet_asArray,P=0;P<V.length;P+=1)for(ue=V[P].Representation_asArray,$=0;$<ue.length;$+=1)if(L===(de=ue[$]).id)return R?$:de}return null}return t={getBandwidthForRepresentation:function(S,L){var R;return(R=N(f(L),S))?R.bandwidth:null},getIndexForRepresentation:function(S,L){return(function(R,V){var de=N(R,V,!0);return de!==null?de:-1})(f(L),S)},getMaxIndexForBufferType:function(S,L){return(function(R,V){var de,ue,P,$;if(!R||!V)return-1;for(ue=R.AdaptationSet_asArray,$=0;$<ue.length;$+=1)if(P=(de=ue[$]).Representation_asArray,e.getIsTypeOf(de,V))return P.length;return-1})(f(L),S)},convertRepresentationToRepresentationInfo:function(S){if(S){var L=new No,R=S.adaptation.period.mpd.manifest.Period_asArray[S.adaptation.period.index].AdaptationSet_asArray[S.adaptation.index],V=e.getRepresentationFor(S.index,R);return L.id=S.id,L.quality=S.index,L.bandwidth=e.getBandwidth(V),L.fragmentDuration=S.segmentDuration||(S.segments&&S.segments.length>0?S.segments[0].duration:NaN),L.MSETimeOffset=S.MSETimeOffset,L.mediaInfo=te(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 de=0;de<L;de++)R.push(K(V[de]))}return R},getMediaInfoForType:function(S,L){if(l.length===0||!S)return null;var R=oe(S,l);if(!R)return null;var V=e.getAdaptationsForPeriod(R),de=U(S.index,L,S);return de?te(V[e.getIndexForAdaptation(de,l[0].mpd.manifest,S.index)]):null},getAllMediaInfoForType:w,getAdaptationForType:U,getRealAdaptation:function(S,L){var R,V,de=oe(S,l);return R=L?L.id:null,l.length>0&&de&&(V=R?e.getAdaptationForId(R,l[0].mpd.manifest,de.index):e.getAdaptationForIndex(L?L.index:null,l[0].mpd.manifest,de.index)),V},getProducerReferenceTimes:function(S,L){var R,V,de=oe(S,l);return R=L?L.id:null,l.length>0&&de&&(V=R?e.getAdaptationForId(R,l[0].mpd.manifest,de.index):e.getAdaptationForIndex(L?L.index:null,l[0].mpd.manifest,de.index)),V?e.getProducerReferenceTimesForAdaptation(V):[]},getRealPeriodByIndex:function(S){return e.getRealPeriodForIndex(S,l[0].mpd.manifest)},getEssentialPropertiesForRepresentation:function(S){try{return e.getEssentialPropertiesForRepresentation(S)}catch{return[]}},getVoRepresentations:function(S){var L=he(S);return e.getRepresentationsForAdaptation(L)},getEventsFor:function(S,L,R){var V=[];if(l.length>0){var de=l[0].mpd.manifest;if(S instanceof Co){var ue=oe(S,l);V=e.getEventsForPeriod(ue)}else if(S instanceof da){var P=oe(R,l);V=e.getEventStreamForAdaptationSet(de,he(S),P)}else if(S instanceof No){var $=oe(R,l);V=e.getEventStreamForRepresentation(de,L,$)}}return V},getEvent:function(S,L,R,V){try{if(!S||!L||isNaN(R)||!V)return null;var de=S.scheme_id_uri,ue=S.value;if(!L[de+"/"+ue])return null;var P,$=new Vr,Y=S.timescale||1,ge=V.adaptation.period.start,ve=L[de+"/"+ue],fe=isNaN(V.presentationTimeOffset)?isNaN(ve.presentationTimeOffset)?0:ve.presentationTimeOffset:V.presentationTimeOffset,Ce=S.presentation_time_delta/Y;P=S.version===0?ge+R-fe+Ce:ge-fe+Ce;var Me=S.event_duration/Y,Qe=S.id,$e=S.message_data;return $.eventStream=ve,$.eventStream.value=ue,$.eventStream.timescale=Y,$.duration=Me,$.id=Qe,$.calculatedPresentationTime=P,$.messageData=$e,$.presentationTimeDelta=Ce,$}catch{return null}},getMpd:k,setConfig:function(S){S&&(S.constants&&(C=S.constants),S.cea608parser&&(b=S.cea608parser),S.errHandler&&e.setConfig({errHandler:S.errHandler}),S.BASE64&&e.setConfig({BASE64:S.BASE64}))},updatePeriods:function(S){if(!S)return null;z(),l=j(S)},getIsTextTrack:function(S){return e.getIsText(S)},getUTCTimingSources:function(){var S=ie();return e.getUTCTimingSources(S)},getSuggestedPresentationDelay:function(){var S=l.length>0?l[0].mpd:null;return e.getSuggestedPresentationDelay(S)},getAvailabilityStartTime:function(S){var L=k(S);return e.getAvailabilityStartTime(L)},getIsTypeOf:function(S,L){return e.getIsTypeOf(S,L)},getIsDynamic:function(S){var L=ie(S);return e.getIsDynamic(L)},getDuration:function(S){var L=ie(S);return e.getDuration(L)},getRegularPeriods:j,getContentSteering:function(S){return e.getContentSteering(S)},getLocation:function(S){return e.getLocation(S)},getPatchLocation:function(S){var L=e.getPatchLocation(S),R=e.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 e.getManifestUpdatePeriod(S,L)},getPublishTime:function(S){return e.getPublishTime(S)},getIsDVB:function(S){return e.hasProfile(S,"urn:dvb:dash:profile:dvb-dash:2014")},getIsPatch:function(S){return o.getIsPatch(S)},getBaseURLsFromElement:function(S){return e.getBaseURLsFromElement(S)},getRepresentationSortFunction:function(){return e.getRepresentationSortFunction()},getCodec:function(S,L,R){return e.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=e.getId(S),V=o.getMpdId(L),de=e.getPublishTime(S),ue=o.getPublishTime(L),P=o.getOriginalPublishTime(L);return!!(R&&V&&R==V&&de&&P&&de.getTime()==P.getTime()&&ue&&de.getTime()<ue.getTime())},applyPatchToManifest:function(S,L){o.getPatchOperations(L).forEach((function(R){var V=R.getMpdTarget(S);if(V!==null){var de=V.name,ue=V.target,P=V.leaf;if(R.xpath.findsAttribute()||de==="__text")switch(R.action){case"add":case"replace":ue[de]=R.value;break;case"remove":delete ue[de]}else{var $=(ue[de+"_asArray"]||[]).indexOf(P),Y=R.position==="prepend"||R.position==="before";if((R.action==="remove"||R.action==="replace")&&(delete ue[de],$!=-1)){var ge=ue[de+"_asArray"];ge.splice($,1),ge.length>1?ue[de]=ge:ge.length==1?ue[de]=ge[0]:delete ue[de+"_asArray"]}R.action!=="add"&&R.action!=="replace"||Object.keys(R.value).forEach((function(ve){var fe=R.value[ve],Ce=ue[ve+"_asArray"]||[];if(Ce.length===0&&ue[ve]&&Ce.push(ue[ve]),Ce.length===0)Ce=fe;else{var Me=Ce.length;Me=ve==de&&$!=-1?$+(Y?0:1)+(R.action=="replace"?-1:0):Y?0:Ce.length,Ce.splice.apply(Ce,[Me,0].concat(fe))}ue[ve+"_asArray"]=Ce,ue[ve]=Ce.length==1?Ce[0]:Ce}))}}}))},areMediaInfosEqual:H,reset:se},e=It(F).getInstance(),o=yu(F).getInstance(),se(),t}Oo.__dashjs_factory_name="DashAdapter";var Eu=h.A.getSingletonFactory(Oo);function li(t){return li=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},li(t)}function _u(t,e){for(var o=0;o<e.length;o++){var l=e[o];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(t,Au(l.key),l)}}function Au(t){var e=(function(o){if(li(o)!="object"||!o)return o;var l=o[Symbol.toPrimitive];if(l!==void 0){var p=l.call(o,"string");if(li(p)!="object")return p;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(o)})(t);return li(e)=="symbol"?e:e+""}var vu=(function(){return t=function o(){(function(l,p){if(!(l instanceof p))throw new TypeError("Cannot call a class as a function")})(this,o)},e=[{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)}}],e&&_u(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e})();function Tu(t,e,o){return Object.defineProperty(t,"prototype",{writable:!1}),t}var bu=Tu((function t(){(function(e,o){if(!(e instanceof o))throw new TypeError("Cannot call a class as a function")})(this,t),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 Su(t,e,o){return Object.defineProperty(t,"prototype",{writable:!1}),t}var Iu=Su((function t(){(function(e,o){if(!(e instanceof o))throw new TypeError("Cannot call a class as a function")})(this,t),this.t=null,this.mt=null,this.to=null,this.lto=null}));function Ru(t,e,o){return Object.defineProperty(t,"prototype",{writable:!1}),t}var wu=Ru((function t(){(function(e,o){if(!(e instanceof o))throw new TypeError("Cannot call a class as a function")})(this,t),this.t=null,this.level=null}));function Nu(t,e,o){return Object.defineProperty(t,"prototype",{writable:!1}),t}var Cu=Nu((function t(){(function(e,o){if(!(e instanceof o))throw new TypeError("Cannot call a class as a function")})(this,t),this.target=null,this.state=_.A.BUFFER_EMPTY}));function Du(t,e,o){return Object.defineProperty(t,"prototype",{writable:!1}),t}var Ou=Du((function t(){(function(e,o){if(!(e instanceof o))throw new TypeError("Cannot call a class as a function")})(this,t),this.time=null,this.range=null,this.manifestInfo=null}));function Mu(t,e,o){return Object.defineProperty(t,"prototype",{writable:!1}),t}var Pu=Mu((function t(){(function(e,o){if(!(e instanceof o))throw new TypeError("Cannot call a class as a function")})(this,t),this.time=null,this.droppedFrames=null}));function pa(t,e,o){return Object.defineProperty(t,"prototype",{writable:!1}),t}function ha(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var Lu=pa((function t(){ha(this,t),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=[]})),Fu=pa((function t(){ha(this,t),this.id=null,this.index=null,this.start=null,this.duration=null})),xu=pa((function t(){ha(this,t),this.id=null,this.index=null,this.mediaType=null,this.streamIndex=null,this.presentationTimeOffset=null,this.startNumber=null,this.fragmentInfoType=null}));function Uu(t,e,o){return Object.defineProperty(t,"prototype",{writable:!1}),t}var Bu=Uu((function t(){(function(e,o){if(!(e instanceof o))throw new TypeError("Cannot call a class as a function")})(this,t),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 ku(t,e,o){return Object.defineProperty(t,"prototype",{writable:!1}),t}var Gu=ku((function t(){(function(e,o){if(!(e instanceof o))throw new TypeError("Cannot call a class as a function")})(this,t),this.loadingRequests=[],this.executedRequests=[]}));function Mo(t){var e,o,l=(t=t||{}).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,se,ie){C.trigger(i.A.METRIC_UPDATED,{mediaType:k,metric:se,value:ie}),F(k)}function H(k,se,ie){C.trigger(i.A.METRIC_ADDED,{mediaType:k,metric:se,value:ie}),F(k)}function B(k,se){var ie=null;return k&&(o.hasOwnProperty(k)?ie=o[k]:se||(ie=new bu,o[k]=ie)),ie}function w(k,se,ie){var he=B(k);he!==null&&(he[se].push(ie),he[se].length>l.get().streaming.metrics.maxListDepth&&he[se].shift())}function j(k,se,ie){w(k,se,ie),H(k,se,ie)}return e={clearCurrentMetricsForType:function(k){delete o[k],F(k)},clearAllCurrentMetrics:function(){o={},b()},getMetricsFor:B,addHttpRequest:function k(se,ie,he,oe,te,Z,K,z,f,N,S,L,R,V,de,ue,P){var $=new je.G;Z!=null&&Z!==oe&&(k(se,null,he,oe,te,null,null,z,f,null,null,null,R,null,null,ue,P),$.actualurl=Z),$.tcpid=ie,$.type=he,$.url=oe,$.range=z,$.trequest=f,$.tresponse=N,$.responsecode=L,$.cmsd=P,$._tfinish=S,$._stream=se,$._mediaduration=R,$._quality=te,$._responseHeaders=V,$._serviceLocation=K,$._fileLoaderType=ue,de?de.forEach((function(Y){(function(ge,ve,fe,Ce){var Me=new je.N;Me.s=ve,Me.d=fe,Me.b=Ce,ge.trace.push(Me),ge.interval||(ge.interval=0),ge.interval+=fe})($,Y.s,Y.d,Y.b)})):(delete $.interval,delete $.trace),j(se,_.A.HTTP_REQUEST,$)},addRepresentationSwitch:function(k,se,ie,he,oe){var te=new Iu;te.t=se,te.mt=ie,te.to=he,oe?te.lto=oe:delete te.lto,j(k,_.A.TRACK_SWITCH,te)},addBufferLevel:function(k,se,ie){var he=new wu;he.t=se,he.level=ie,j(k,_.A.BUFFER_LEVEL,he)},addBufferState:function(k,se,ie){var he=new Cu;he.target=ie,he.state=se,j(k,_.A.BUFFER_STATE,he)},addDVRInfo:function(k,se,ie,he){var oe=new Ou;oe.time=se,oe.range=he,oe.manifestInfo=ie,j(k,_.A.DVR_INFO,oe)},addDroppedFrames:function(k,se){var ie=new Pu,he=B(k).DroppedFrames;se&&(ie.time=se.creationTime,ie.droppedFrames=se.droppedVideoFrames,he.length>0&&he[he.length-1]==ie||j(k,_.A.DROPPED_FRAMES,ie))},addSchedulingInfo:function(k,se,ie,he,oe,te,Z,K,z){var f=new Bu;f.mediaType=k,f.t=se,f.type=ie,f.startTime=he,f.availabilityStartTime=oe,f.duration=te,f.quality=Z,f.range=K,f.state=z,j(k,_.A.SCHEDULING_INFO,f)},addRequestsQueue:function(k,se,ie){var he=new Gu;he.loadingRequests=se,he.executedRequests=ie,B(k).RequestsQueue=he,H(k,_.A.REQUESTS_QUEUE,he)},addManifestUpdate:function(k,se,ie,he,oe,te,Z,K,z,f){var N=new Lu;N.mediaType=k,N.type=se,N.requestTime=ie,N.fetchTime=he,N.availabilityStartTime=oe,N.presentationStartTime=te,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,se){if(k){for(var ie in se)k[ie]=se[ie];U(k.mediaType,_.A.MANIFEST_UPDATE,k)}},addManifestUpdateStreamInfo:function(k,se,ie,he,oe){if(k){var te=new Fu;te.id=se,te.index=ie,te.start=he,te.duration=oe,k.streamInfo.push(te),U(k.mediaType,_.A.MANIFEST_UPDATE_STREAM_INFO,k)}},addManifestUpdateRepresentationInfo:function(k,se,ie,he,oe,te,Z,K){if(k&&k.representationInfo){var z=new xu;z.id=se,z.index=ie,z.streamIndex=he,z.mediaType=oe,z.startNumber=Z,z.fragmentInfoType=K,z.presentationTimeOffset=te,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(se){se.hasOwnProperty("subreplevel")&&!se.subreplevel&&delete se.subreplevel})):delete k.trace,j(u.A.STREAM,_.A.PLAY_LIST,k)},addDVBErrors:function(k){j(u.A.STREAM,_.A.DVB_ERRORS,k)}},o={},e}Mo.__dashjs_factory_name="MetricsModel";var ju=h.A.getSingletonFactory(Mo);function Po(t){t=t||{};var e,o,l,p,C=this.context,b=t.metricsModel;function F(B){var w=b.getMetricsFor(B,!0);if(!w)return null;var j,k=w.HttpList,se=null;if(!k||k.length<=0)return null;for(j=k.length-1;j>=0;){if(k[j].responsecode){se=k[j];break}j--}return se}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 e={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?vu.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=Ft.A.parseHttpHeaders(k._responseHeaders));var se=j[w.toLowerCase()];return se===void 0?null:se},getLatestMPDRequestHeaderValueByID:function(B){if(!B)return null;var w,j,k,se={};for(k=(w=U(u.A.STREAM)).length-1;k>=0;k--)if((j=w[k]).type===je.G.MPD_TYPE){se=Ft.A.parseHttpHeaders(j._responseHeaders);break}var ie=se[B.toLowerCase()];return ie===void 0?null:ie},addRepresentationSwitch:function(B,w,j,k,se){b.addRepresentationSwitch(B,w,j,k,se)},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,se,ie){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,se,B.fileLoaderType,ie)},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 Ye).start=new Date,p.mstart=B,p.starttype=w},createPlaylistTraceMetrics:function(B,w,j){o===!0&&(o=!1,(l=new Ve).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||ju(C).getInstance({settings:t.settings}),o=!0,l=null,p=null,e}Po.__dashjs_factory_name="DashMetrics";var qu=h.A.getSingletonFactory(Po);function Lo(){var t,e,o,l,p=this.context,C=(0,y.A)(p).getInstance(),b=(0,le.A)(p).getInstance();function F(oe){l=oe}function U(oe,te,Z,K){var z,f=te.adaptation.period.mpd,N=f.availabilityStartTime;if(K)z=Z&&f.timeShiftBufferDepth!==Number.POSITIVE_INFINITY?new Date(N.getTime()+1e3*(oe+f.timeShiftBufferDepth)):f.availabilityEndTime;else if(Z){var S=te.availabilityTimeOffset;z=new Date(N.getTime()+1e3*(oe-S))}else z=N;return z}function H(oe,te){return(oe.getTime()-te.mpd.availabilityStartTime.getTime()+1e3*l)/1e3}function B(oe,te){return oe+(te.adaptation.period.start-te.presentationTimeOffset)}function w(oe){var te={start:NaN,end:NaN},Z=oe[0].getAdapter().getRegularPeriods()[0],K=H(new Date,Z);if(!oe||oe.length===0)return{range:te,now:K};oe.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(de){var ue,P,$,Y,ge=de.adaptation.period.mpd.manifest.Period_asArray[de.adaptation.period.index].AdaptationSet_asArray[de.adaptation.index],ve=e.getRepresentationFor(de.index,ge),fe=ve.SegmentTemplate||ve.SegmentList,Ce=fe.SegmentTimeline,Me=fe.timescale,Qe=Ce.S_asArray,$e={start:0,end:0},Ze=Qe[0].t,at=!isNaN(Ze),Nt=at?Ze:0,Ee=0;for(at&&($e.start=B(Nt/Me,de)),$=0,Y=Qe.length;$<Y;$++)P=0,(ue=Qe[$]).hasOwnProperty("r")&&(P=ue.r),Ee+=ue.d*(1+P);return $e.end=B((Nt+Ee)/Me,de),$e})(L);else{var V=L.adaptation.period;R.start=V.start,R.end=Math.max(K,V.start+V.duration)}!isNaN(R.start)&&(isNaN(te.start)||te.start>R.start)&&(te.start=R.start),!isNaN(R.end)&&(isNaN(te.end)||te.end<R.end)&&(te.end=R.end)})),te.end=Math.min(K,te.end);var z=k(oe,te.end,!0);return te.end=isNaN(z)?te.end:z,te.start=Z&&Z.mpd&&Z.mpd.timeShiftBufferDepth&&!isNaN(Z.mpd.timeShiftBufferDepth)&&!isNaN(te.end)?Math.max(te.end-Z.mpd.timeShiftBufferDepth,te.start):te.start,te.start=k(oe,te.start),{range:te,now:K}}function j(oe,te){o=oe-te.end}function k(oe,te){var Z=arguments.length>2&&arguments[2]!==void 0&&arguments[2];try{for(var K=0,z=!1,f=NaN;!z&&K<oe.length;){var N=oe[K].getStreamInfo();N.start<=te&&(!isFinite(N.duration)||N.start+N.duration>=te)?(f=te,z=!0):!Z&&N.start>te&&(isNaN(f)||N.start<f)?f=N.start:Z&&N.start+N.duration<te&&(isNaN(f)||N.start+N.duration>f)&&(f=N.start+N.duration),K+=1}return f}catch{return te}}function se(oe){oe.offset===void 0||isNaN(oe.offset)||F(oe.offset/1e3)}function ie(){l=0,o=0}function he(){C.off(i.A.UPDATE_TIME_SYNC_OFFSET,se,this),ie()}return t={initialize:function(){ie(),C.on(i.A.UPDATE_TIME_SYNC_OFFSET,se,this)},getClientTimeOffset:function(){return l},setClientTimeOffset:F,getClientReferenceTime:function(){return Date.now()-1e3*o+1e3*l},calcAvailabilityStartTimeFromPresentationTime:function(oe,te,Z){return U(oe,te,Z)},calcAvailabilityEndTimeFromPresentationTime:function(oe,te,Z){return U(oe,te,Z,!0)},calcPresentationTimeFromWallTime:H,calcPresentationTimeFromMediaTime:B,calcPeriodRelativeTimeFromMpdRelativeTime:function(oe,te){return te-oe.adaptation.period.start},calcMediaTimeFromPresentationTime:function(oe,te){return oe-te.adaptation.period.start+te.presentationTimeOffset},calcWallTimeForSegment:function(oe,te){var Z,K,z;return te&&(Z=oe.representation.adaptation.period.mpd.suggestedPresentationDelay,K=oe.presentationStartTime+Z,z=new Date(oe.availabilityStartTime.getTime()+1e3*K)),z},calcTimeShiftBufferWindow:function(oe,te){if(!te)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})(oe);if(b.get().streaming.timeShiftBuffer.calcFromSegmentTimeline){var Z=w(oe);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:xr.LEVELS.WARNING,event:xr.EVENTS.INVALID_DVR_WINDOW}),j(R.now,R.range),R.range}return z})(oe)},reset:he},e=It(p).getInstance(),he(),t}Lo.__dashjs_factory_name="TimelineConverter";var Yu=h.A.getSingletonFactory(Lo),ga=M(8107),Oi=M(8667);function ma(t){return ma=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ma(t)}function Hu(t,e,o){return e=Mi(e),(function(l,p){if(p&&(ma(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)})(t,Fo()?Reflect.construct(e,[],Mi(t).constructor):e.apply(t,o))}function Fo(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Fo=function(){return!!t})()}function Mi(t){return Mi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Mi(t)}function ya(t,e){return ya=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,l){return o.__proto__=l,o},ya(t,e)}var Vu=(function(t){function e(){var l;return(function(p,C){if(!(p instanceof C))throw new TypeError("Cannot call a class as a function")})(this,e),(l=Hu(this,e)).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&&ya(l,p)})(e,t),o=e,Object.defineProperty(o,"prototype",{writable:!1}),o;var o})(da),Ku=M(6877);function xo(){var t=0;function e(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,se=!1,ie=-1,he={start:U,end:H,spans:[]},oe="style_cea608_white_black",te={},Z={},K=[];for(w=0;w<15;++w){var z=B.rows[w],f="",N=null;if(z.isEmpty()===!1){var S=e(z.chars);k===null&&(k={x:S,y1:w,y2:w+1,p:[]}),S!==ie&&se&&(k.p.push(he),he={start:U,end:H,spans:[]},k.y2=w,k.name="region_"+k.x+"_"+k.y1+"_"+k.y2,te.hasOwnProperty(k.name)===!1?(K.push(k),te[k.name]=k):te[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&&(he.spans.push({name:oe,line:f,row:w}),f="");var de="style_cea608_"+V.foreground+"_"+V.background;V.underline&&(de+="_underline"),V.italics&&(de+="_italics"),Z.hasOwnProperty(de)||(Z[de]=JSON.parse(JSON.stringify(V))),N=V,oe=de}f+=R.uchar}f.trim().length>0&&he.spans.push({name:oe,line:f,row:w}),se=!0,ie=S}else se=!1,ie=-1,k&&(k.p.push(he),he={start:U,end:H,spans:[]},k.y2=w,k.name="region_"+k.x+"_"+k.y1+"_"+k.y2,te.hasOwnProperty(k.name)===!1?(K.push(k),te[k.name]=k):te[k.name].p.contat(k.p),k=null)}k&&(k.p.push(he),k.y2=w+1,k.name="region_"+k.x+"_"+k.y1+"_"+k.y2,te.hasOwnProperty(k.name)===!1?(K.push(k),te[k.name]=k):te[k.name].p.contat(k.p),k=null);var ue=[];for(w=0;w<K.length;++w){var P=K[w],$="sub_cea608_"+t++,Y=document.createElement("div");Y.id=$;var ge=o(P);Y.style.cssText="position: absolute; margin: 0; display: flex; box-sizing: border-box; pointer-events: none;"+ge;var ve=document.createElement("div");ve.className="paragraph bodyStyle",ve.style.cssText=p(F);var fe=document.createElement("div");fe.className="cueUniWrapper",fe.style.cssText="unicode-bidi: normal; direction: ltr;";for(var Ce=0;Ce<P.p.length;++Ce){var Me=P.p[Ce],Qe=0;for(j=0;j<Me.spans.length;++j){var $e=Me.spans[j];if($e.line.length>0){if(j!==0&&Qe!=$e.row){var Ze=document.createElement("br");Ze.className="lineBreak",fe.appendChild(Ze)}var at=!1;Qe===$e.row&&(at=!0),Qe=$e.row;var Nt=Z[$e.name],Ee=document.createElement("span");Ee.className="spanPadding "+$e.name+" customSpanColor",Ee.style.cssText=p(F,Nt),j!==0&&at?j===Me.spans.length-1?Ee.textContent=b($e.line):Ee.textContent=$e.line:Me.spans.length>1&&j<Me.spans.length-1&&$e.row===Me.spans[j+1].row?Ee.textContent=C($e.line):Ee.textContent=$e.line.trim(),fe.appendChild(Ee)}}}ve.appendChild(fe),Y.appendChild(ve);var Pe={bodyStyle:["%",90]};for(var ct in Z)Z.hasOwnProperty(ct)&&(Pe[ct]=["%",90]);ue.push({type:"html",start:U,end:H,cueHTMLElement:Y,cueID:$,cellResolution:[32,15],isFromCEA608:!0,fontSize:Pe,lineHeight:{},linePadding:{}})}return ue}}}xo.__dashjs_factory_name="EmbeddedTextHtmlRender";var Wu=h.A.getSingletonFactory(xo);function Uo(t){var e,o,l,p,C,b,F,U,H,B,w,j,k,se,ie,he,oe,te=t.errHandler,Z=t.manifestModel,K=t.mediaController,z=t.videoModel,f=t.textTracks,N=t.vttParser,S=t.vttCustomRenderingParser,L=t.ttmlParser,R=t.streamInfo,V=t.settings,de=this.context,ue=(0,y.A)(de).getInstance(),P=!1;function $(){b=null,U=NaN,H=[],B=null,F=!1,C=[],p=null}function Y(Ze){var at=new Vu;for(var Nt in Ze)at[Nt]=Ze[Nt];at.labels=Ze.labels,at.defaultTrack=(function(Ee){var Pe=!1;return j.length>1&&Ee.isEmbedded?Pe=Ee.id&&Ee.id===u.A.CC1:j.length===1?Ee.id&&typeof Ee.id=="string"&&Ee.id.substring(0,2)==="CC"&&(Pe=!0):j.length===0&&(Pe=Ee.index===C[0].index),Pe})(Ze),at.isFragmented=Ze.isFragmented,at.isEmbedded=!!Ze.isEmbedded,at.isTTML=(function(Ee){return Ee.codec&&Ee.codec.search(u.A.STPP)>=0||Ee.mimeType&&Ee.mimeType.search(u.A.TTML)>=0})(Ze),at.kind=(function(Ee,Pe){var ct=Ee.roles&&Ee.roles.length>0?Pe[Ee.roles[0]]:Pe.caption;return ct=ct===Pe.caption||ct===Pe.subtitle?ct:Pe.caption})(Ze,{subtitle:"subtitles",caption:"captions"}),f.addTextTrack(at)}function ge(Ze){var at=Ze.chunk;at.mediaInfo.embeddedCaptions&&fe(at.bytes,at)}function ve(Ze){w=Ze}function fe(Ze,at){var Nt=at.mediaInfo,Ee=Nt.type,Pe=Nt.mimeType,ct=Nt.codec||Pe;ct?Nt.codec.indexOf("application/mp4")!==-1?(function(Ke,yt,ht){var dt;if(yt.segmentType==="InitializationSegment")F=!0,U=l.getMediaTimescaleFromMoov(Ke);else{if(!F)return;(dt=l.getSamplesInfo(Ke).sampleList).length>0&&(B=dt[0].cts-yt.start*U),ht.search(u.A.STPP)>=0?(function(qt,Yt,sn){var ln,ke;for(p=p!==null?p:Qe(sn),ln=0;ln<Yt.length;ln++){var ut=Yt[ln],tt=ut.cts,gt=Me(),Dt=gt+tt/U,Vt=Dt+ut.duration/U;e.buffered.add(Dt,Vt);var Gt=new DataView(qt,ut.offset,ut.subSizes[0]),Kt=Oi.Utils.dataViewToString(Gt,u.A.UTF8),Zt=[],pt=ut.offset+ut.subSizes[0];for(ke=1;ke<ut.subSizes.length;ke++){var Ot=new Uint8Array(qt,pt,ut.subSizes[ke]),Fe=String.fromCharCode.apply(null,Ot);Zt.push(Fe),pt+=ut.subSizes[ke]}try{var st=Z.getValue().ttmlTimeIsRelative?tt/U:0,xe=p.parse(Kt,st,tt/U,(tt+ut.duration)/U,Zt);f.addCaptions(w,gt,xe)}catch(Ge){b.removeExecutedRequestsBeforeTime(),this.remove(),o.error("TTML parser error: "+Ge.message)}}})(Ke,dt,ht):(function(qt,Yt){var sn,ln,ke,ut=[];for(sn=0;sn<Yt.length;sn++){var tt=Yt[sn];tt.cts-=B;var gt=Me()+tt.cts/U,Dt=gt+tt.duration/U;e.buffered.add(gt,Dt);var Vt=qt.slice(tt.offset,tt.offset+tt.size),Gt=Oi.parseBuffer(Vt);for(ln=0;ln<Gt.boxes.length;ln++){var Kt=Gt.boxes[ln];if(o.debug("VTT box1: "+Kt.type),Kt.type!=="vtte"&&Kt.type==="vttc"){o.debug("VTT vttc boxes.length = "+Kt.boxes.length);var Zt={styles:{}};for(ke=0;ke<Kt.boxes.length;ke++){var pt=Kt.boxes[ke];if(o.debug("VTT box2: "+pt.type),pt.type==="payl")Zt.start=tt.cts/U,Zt.end=(tt.cts+tt.duration)/U,Zt.data=pt.cue_text;else if(pt.type==="sttg"&&pt.settings&&pt.settings!=="")try{var Ot=pt.settings.split(" ");Zt.styles=N.getCaptionStyles(Ot)}catch{}}Zt&&Zt.data&&(ut.push(Zt),o.debug("VTT ".concat(Zt.start," - ").concat(Zt.end," : ").concat(Zt.data)))}}}ut.length>0&&f.addCaptions(w,0,ut)})(Ke,dt)}})(Ze,at,ct):Ee===u.A.VIDEO?(function(Ke,yt){var ht,dt;if(yt.segmentType===je.G.INIT_SEGMENT_TYPE)k===0&&(k=l.getMediaTimescaleFromMoov(Ke));else if(yt.segmentType===je.G.MEDIA_SEGMENT_TYPE){if(k===0)return void o.warn("CEA-608: No timescale for embeddedTextTrack yet");var qt=(dt=l.getSamplesInfo(Ke)).lastSequenceNumber,Yt=Math.trunc(yt.start),sn=Math.trunc(yt.end);if(he[0]||he[1]||(function(){for(var gt,Dt=0;Dt<j.length;Dt++){if((gt=f.getTrackIdxForId(j[Dt].id))===-1)return void o.warn("CEA-608: data before track is ready.");var Vt=Ce(gt);he[Dt]=new(I()).Cea608Parser(Dt+1,{newCue:Vt},null)}})(),k){if((function(gt,Dt,Vt,Gt,Kt){return gt!==null&&Dt!==null&&Gt!==null&&Kt!==null&&(Dt===gt?Gt!==Kt:Dt!==gt+Vt)})(se,qt,dt.numSequences,ie,Yt))for(ht=0;ht<he.length;ht++)he[ht]&&he[ht].reset();for(var ln=(function(gt,Dt){if(Dt.length===0)return null;for(var Vt={splits:[],fields:[[],[]]},Gt=new DataView(gt),Kt=0;Kt<Dt.length;Kt++)for(var Zt=Dt[Kt],pt=I().findCea608Nalus(Gt,Zt.offset,Zt.size),Ot=null,Fe=0,st=0;st<pt.length;st++)for(var xe=I().extractCea608DataFromRange(Gt,pt[st]),Ge=0;Ge<2;Ge++)if(xe[Ge].length>0){Zt.cts!==Ot?Fe=0:Fe+=1;var lt=Me();Vt.fields[Ge].push([Zt.cts+lt*k,xe[Ge],Fe]),Ot=Zt.cts}return Vt.fields.forEach((function(ye){ye.sort((function(Te,We){return Te[0]===We[0]?Te[2]-We[2]:Te[0]-We[0]}))})),Vt})(Ke,dt.sampleList),ke=0;ke<he.length;ke++){var ut=ln.fields[ke],tt=he[ke];if(tt)for(ht=0;ht<ut.length;ht++)tt.addData(ut[ht][0]/k,ut[ht][1])}se=qt,ie=sn}}})(Ze,at):(function(Ke,yt,ht){var dt,qt,Yt=new DataView(Ke,0,Ke.byteLength);qt=Oi.Utils.dataViewToString(Yt,u.A.UTF8);try{dt=Qe(ht).parse(qt,0),f.addCaptions(f.getCurrentTrackIdx(),0,dt),e.buffered&&e.buffered.add(yt.start,yt.end)}catch(sn){te.error(new pe.A(me.TIMED_TEXT_ERROR_ID_PARSE_CODE,me.TIMED_TEXT_ERROR_MESSAGE_PARSE+sn.message,qt))}})(Ze,at,ct):o.error("No text type defined")}function Ce(Ze){return function(at,Nt,Ee){var Pe;(Pe=z.getTTMLRenderingDiv()?oe.createHTMLCaptionsFromScreen(z.getElement(),at,Nt,Ee):[{start:at,end:Nt,data:Ee.getDisplayText(),styles:{}}])&&f.addCaptions(Ze,0,Pe)}}function Me(){return isNaN(e.timestampOffset)?0:e.timestampOffset}function Qe(Ze){var at;return Ze.search(u.A.VTT)>=0?at=V.get().streaming.text.webvtt.customRenderingEnabled&&S?S:N:(Ze.search(u.A.TTML)>=0||Ze.search(u.A.STPP)>=0)&&(at=L),at}function $e(Ze){j.forEach((function(at){var Nt=f.getTrackIdxForId(at.id);Nt>=0&&f.deleteCuesFromTrackIdx(Nt,Ze.from,Ze.to)}))}return e={initialize:function(){P||(j=[],w=null,k=0,he=[],se=null,ie=null,P=!0,oe=Wu(de).getInstance(),ue.on(i.A.VIDEO_CHUNK_RECEIVED,ge,e),ue.on(i.A.BUFFER_CLEARED,$e,e))},addMediaInfos:function(Ze,at,Nt){if(C=C.concat(at),Ze===u.A.TEXT&&at[0].isFragmented&&!at[0].isEmbedded){b=Nt,e.buffered=(0,Ku.A)(de).create(),H=K.getTracksFor(u.A.TEXT,R.id).filter((function(Ke){return Ke.isFragmented}));for(var Ee=K.getCurrentTrackFor(u.A.TEXT,R.id),Pe=0;Pe<H.length;Pe++)if(H[Pe]===Ee){ve(Pe);break}}for(var ct=0;ct<at.length;ct++)Y(at[ct])},resetMediaInfos:function(){C=[]},getStreamId:function(){return R.id},append:fe,abort:function(){},addEmbeddedTrack:function(Ze){if(P&&Ze)if(Ze.id===u.A.CC1||Ze.id===u.A.CC3){for(var at=0;at<j.length;at++)if(j[at].id===Ze.id)return;j.push(Ze)}else o.warn("Embedded track "+Ze.id+" not supported!")},resetEmbedded:function(){ue.off(i.A.VIDEO_CHUNK_RECEIVED,ge,e),ue.off(i.A.BUFFER_CLEARED,$e,e),f&&f.deleteAllTextTracks(),P=!1,j=[],he=[null,null],se=null,ie=null},getConfig:function(){return{fragmentModel:b,fragmentedTracks:H,videoModel:z}},setCurrentFragmentedTrackIdx:ve,remove:function(Ze,at){Ze===void 0&&Ze===at&&(Ze=e.buffered.start(0),at=e.buffered.end(e.buffered.length-1)),e.buffered.remove(Ze,at),f.deleteCuesFromTrackIdx(w,Ze,at)},reset:function(){$(),C=[],l=null}},o=(0,g.A)(de).getInstance().getLogger(e),l=(0,Zr.A)(de).getInstance(),$(),e}Uo.__dashjs_factory_name="TextSourceBuffer";var zu=h.A.getClassFactory(Uo),Ea=M(6586);function Bo(t,e){(e==null||e>t.length)&&(e=t.length);for(var o=0,l=Array(e);o<e;o++)l[o]=t[o];return l}var Xu=["text","align","fontSize","id","isd","line","lineAlign","lineHeight","linePadding","position","positionAlign","region","size","snapToLines","vertical"];function ko(t){var e,o,l,p,C,b,F,U,H,B,w,j,k,se,ie,he,oe,te,Z,K,z=this.context,f=(0,y.A)(z).getInstance(),N=t.videoModel,S=t.streamInfo,L=t.settings;function R(ke,ut,tt,gt,Dt,Vt){var Gt=0,Kt=0;ke/ut>tt/gt?Gt=(Kt=ut)/gt*tt:Kt=(Gt=ke)/tt*gt;var Zt,pt,Ot=0,Fe=0;return Gt/Kt>Dt?(Fe=Kt,Ot=Kt*Dt):(Ot=Gt,Fe=Gt/Dt),Zt=(ke-Ot)/2,pt=(ut-Fe)/2,Vt?{x:Zt+.1*Ot,y:pt+.1*Fe,w:.8*Ot,h:.8*Fe}:{x:Zt,y:pt,w:Ot,h:Fe}}function V(ke,ut){var tt=N.getClientWidth(),gt=N.getClientHeight(),Dt=N.getVideoWidth(),Vt=N.getVideoHeight(),Gt=N.getVideoRelativeOffsetTop(),Kt=N.getVideoRelativeOffsetLeft();if(Dt!==0&&Vt!==0){var Zt=Dt/Vt,pt=!1;ke.isFromCEA608&&(Zt=1.1666666666666667,pt=!0);var Ot=R.call(this,tt,gt,Dt,Vt,Zt,pt),Fe=Ot.w,st=Ot.h,xe=Ot.x,Ge=Ot.y;if(Fe!=H||st!=B||xe!=F||Ge!=U||ut){if(F=xe+Kt,U=Ge+Gt,H=Fe,B=st,w){var lt=w.style;lt&&(lt.left=F+"px",lt.top=U+"px",lt.width=H+"px",lt.height=B+"px",lt.zIndex=se&&document[se]||ie?oe:null,f.trigger(r.A.CAPTION_CONTAINER_RESIZE))}var ye=ke.activeCues;if(ye)for(var Te=ye.length,We=0;We<Te;++We){var wt=ye[We];wt.scaleCue(wt)}}}}function de(ke){var ut,tt,gt,Dt,Vt,Gt=H,Kt=B;if(ke.cellResolution){var Zt=[Gt/ke.cellResolution[0],Kt/ke.cellResolution[1]];if(ke.linePadding){for(ut in ke.linePadding)if(ke.linePadding.hasOwnProperty(ut)){tt=(ke.linePadding[ut]*Zt[0]).toString();for(var pt=document.getElementsByClassName("spanPadding"),Ot=0;Ot<pt.length;Ot++)pt[Ot].style.cssText=pt[Ot].style.cssText.replace(/(padding-left\s*:\s*)[\d.,]+(?=\s*px)/gi,"$1"+tt),pt[Ot].style.cssText=pt[Ot].style.cssText.replace(/(padding-right\s*:\s*)[\d.,]+(?=\s*px)/gi,"$1"+tt)}}if(ke.fontSize){for(ut in ke.fontSize)if(ke.fontSize.hasOwnProperty(ut)){ke.fontSize[ut][0]==="%"?gt=ke.fontSize[ut][1]/100:ke.fontSize[ut][0]==="c"&&(gt=ke.fontSize[ut][1]),tt=(gt*Zt[1]).toString(),Vt=ut!=="defaultFontSize"?document.getElementsByClassName(ut):document.getElementsByClassName("paragraph");for(var Fe=0;Fe<Vt.length;Fe++)Vt[Fe].style.cssText=Vt[Fe].style.cssText.replace(/(font-size\s*:\s*)[\d.,]+(?=\s*px)/gi,"$1"+tt)}if(ke.lineHeight){for(ut in ke.lineHeight)if(ke.lineHeight.hasOwnProperty(ut)){ke.lineHeight[ut][0]==="%"?Dt=ke.lineHeight[ut][1]/100:ke.fontSize[ut][0]==="c"&&(Dt=ke.lineHeight[ut][1]),tt=(Dt*Zt[1]).toString(),Vt=document.getElementsByClassName(ut);for(var st=0;st<Vt.length;st++)Vt[st].style.cssText=Vt[st].style.cssText.replace(/(line-height\s*:\s*)[\d.,]+(?=\s*px)/gi,"$1"+tt)}}}}if(ke.isd){var xe=document.getElementById(ke.cueID);xe&&w.removeChild(xe),P(ke)}}function ue(ke,ut){var tt=/^(urn:)(mpeg:[a-z0-9][a-z0-9-]{0,31}:)(subs:)([0-9]+)$/,gt=/^#(.*)$/;if(tt.test(ut)){var Dt=tt.exec(ut),Vt=parseInt(Dt[4],10)-1;return"data:image/png;base64,"+btoa(ke.images[Vt])}if(gt.test(ut)){var Gt=gt.exec(ut)[1];return"data:image/png;base64,"+ke.embeddedImages[Gt]}return ut}function P(ke){if(w){ln.call(this);var ut=document.createElement("div");w.appendChild(ut),he=(0,Ea.renderHTML)(ke.isd,ut,(function(tt){return ue(ke,tt)}),w.clientHeight,w.clientWidth,L.get().streaming.text.imsc.displayForcedOnlyMode,(function(tt){o.info("renderCaption :",tt)}),he,L.get().streaming.text.imsc.enableRollUp),ut.id=ke.cueID,f.trigger(r.A.CAPTION_RENDERED,{captionDiv:ut,currentTrackIdx:b})}}function $(ke,ut){return!!ut&&ut.endTime>=ke.startTime}function Y(ke,ut){return!!L.get().streaming.text.extendSegmentedCues&&!!(function(tt,gt,Dt){for(var Vt=0;Vt<Dt.length;Vt++){var Gt=Dt[Vt];if(JSON.stringify(tt[Gt])!==JSON.stringify(gt[Gt]))return!1}return!0})(ut,ke,Xu)&&(ut.endTime=Math.max(ut.endTime,ke.endTime),!0)}function ge(ke,ut){ut&&ut.forEach((function(tt){tt.kind&&tt.kind==="image"&&(tt.src=ue(ke,tt.src)),ge(ke,tt.contents)}))}function ve(ke,ut,tt){var gt=Pe(ke),Dt=L.get().streaming.text.dispatchForManualRendering;if(gt&&Array.isArray(tt)&&tt.length!==0)for(var Vt=0;Vt<tt.length;Vt++){var Gt=null,Kt=tt[Vt];gt.cellResolution=Kt.cellResolution,gt.isFromCEA608=Kt.isFromCEA608,isNaN(Kt.start)||isNaN(Kt.end)||(Dt?Gt=fe(Kt,ut):Ze(Kt)&&w?Gt=Qe(Kt,ut,gt):Kt.data&&(Gt=$e(Kt,ut,gt)));try{if(Gt){if(!yt(gt,Gt))if(L.get().streaming.text.webvtt.customRenderingEnabled)gt.manualCueList||(gt.manualCueList=[]),gt.manualCueList.push(Gt);else{var Zt=void 0;gt.cues&&gt.cues.length!==0&&(Zt=gt.cues[gt.cues.length-1]),$(Gt,Zt)?Y(Gt,Zt)||(Zt.isd&&(Zt.onexit=function(){}),gt.mode!==u.A.TEXT_DISABLED&&gt.addCue(Gt)):gt.mode!==u.A.TEXT_DISABLED&&gt.addCue(Gt)}var pt=L.get().streaming.buffer.bufferToKeep;dt(gt,0,N.getTime()-pt)}else o.error("Impossible to display subtitles. You might have missed setting a TTML rendering div via player.attachTTMLRenderingDiv(TTMLRenderingDiv)")}catch(Ot){throw qt(gt),gt.addCue(Gt),Ot}}}function fe(ke,ut){var tt=at(ke,ut);return tt.onenter=function(){Ze(ke)&&K&&K.cueID!==tt.cueID&&Me(K),delete tt.type,K=tt,Ce(tt)},tt.onexit=function(){Me(tt),K=null},tt}function Ce(ke){f.trigger(r.A.CUE_ENTER,ke)}function Me(ke){f.trigger(r.A.CUE_EXIT,{cueID:ke.cueID})}function Qe(ke,ut,tt){var gt=this,Dt=at(ke,ut);return w.style.left=F+"px",w.style.top=U+"px",w.style.width=H+"px",w.style.height=B+"px",Dt.onenter=function(){var Vt=this;tt.mode===u.A.TEXT_SHOWING&&(this.isd?(Z?requestAnimationFrame((function(){return P(Vt)})):P(this),o.debug("Cue enter id:"+this.cueID)):(w.appendChild(this.cueHTMLElement),de.call(gt,this),f.trigger(r.A.CAPTION_RENDERED,{captionDiv:this.cueHTMLElement,currentTrackIdx:b})))},Dt.onexit=function(){if(w)for(var Vt=w.childNodes,Gt=0;Gt<Vt.length;++Gt)Vt[Gt].id===this.cueID&&(o.debug("Cue exit id:"+Vt[Gt].id),w.removeChild(Vt[Gt]),--Gt)},Dt}function $e(ke,ut,tt){var gt=at(ke,ut);if(gt.isActive=!1,ke.styles)try{ke.styles.align!==void 0&&"align"in gt&&(gt.align=ke.styles.align),ke.styles.line!==void 0&&"line"in gt&&(gt.line=ke.styles.line),ke.styles.snapToLines!==void 0&&"snapToLines"in gt&&(gt.snapToLines=ke.styles.snapToLines),ke.styles.position!==void 0&&"position"in gt&&(gt.position=ke.styles.position),ke.styles.size!==void 0&&"size"in gt&&(gt.size=ke.styles.size)}catch(Dt){o.error(Dt)}return gt.onenter=function(){tt.mode===u.A.TEXT_SHOWING&&f.trigger(r.A.CAPTION_RENDERED,{currentTrackIdx:b})},gt}function Ze(ke){return ke.type==="html"}function at(ke,ut){return Ze(ke)?(function(tt,gt){var Dt=new l(tt.start+gt,tt.end+gt,"");return Dt.cueHTMLElement=tt.cueHTMLElement,Dt.isd=tt.isd,Dt.images=tt.images,Dt.embeddedImages=tt.embeddedImages,Dt.cueID=tt.cueID,Dt.scaleCue=de.bind(self),Dt.cellResolution=tt.cellResolution,Dt.lineHeight=tt.lineHeight,Dt.linePadding=tt.linePadding,Dt.fontSize=tt.fontSize,Dt.isd&&ge(Dt,Dt.isd.contents),Dt})(ke,ut):(function(tt,gt){var Dt=new l(tt.start-gt,tt.end-gt,tt.data);return Dt.cueID="".concat(Dt.startTime,"_").concat(Dt.endTime),Dt})(ke,ut)}function Nt(ke){if(j)for(var ut=j.childNodes,tt=0;tt<ut.length;++tt)ut[tt].id===ke.cueID&&(j.removeChild(ut[tt]),--tt)}function Ee(){var ke,ut=[],tt=(function(Dt,Vt){var Gt=typeof Symbol<"u"&&Dt[Symbol.iterator]||Dt["@@iterator"];if(!Gt){if(Array.isArray(Dt)||(Gt=(function(st,xe){if(st){if(typeof st=="string")return Bo(st,xe);var Ge={}.toString.call(st).slice(8,-1);return Ge==="Object"&&st.constructor&&(Ge=st.constructor.name),Ge==="Map"||Ge==="Set"?Array.from(st):Ge==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Ge)?Bo(st,xe):void 0}})(Dt))||Vt){Gt&&(Dt=Gt);var Kt=0,Zt=function(){};return{s:Zt,n:function(){return Kt>=Dt.length?{done:!0}:{done:!1,value:Dt[Kt++]}},e:function(st){throw st},f:Zt}}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 pt,Ot=!0,Fe=!1;return{s:function(){Gt=Gt.call(Dt)},n:function(){var st=Gt.next();return Ot=st.done,st},e:function(st){Fe=!0,pt=st},f:function(){try{Ot||Gt.return==null||Gt.return()}finally{if(Fe)throw pt}}}})(N.getTextTracks());try{for(tt.s();!(ke=tt.n()).done;){var gt=ke.value;gt.manualMode===u.A.TEXT_SHOWING&&ut.push(gt)}}catch(Dt){tt.e(Dt)}finally{tt.f()}return ut}function Pe(ke){return ke>=0&&p[ke]?N.getTextTrack(p[ke].kind,p[ke].id,p[ke].lang,p[ke].isTTML,p[ke].isEmbedded):null}function ct(ke){var ut=this;if(ke!==b){var tt=Pe(b=ke);Ke.call(this,tt),k&&(clearInterval(k),k=null),tt&&tt.renderingType==="html"&&(V.call(this,tt,!0),window.ResizeObserver?(te=new window.ResizeObserver((function(){V.call(ut,tt,!0)}))).observe(N.getElement()):k=setInterval(V.bind(this,tt),500))}}function Ke(ke){ln.call(this),ke&&ke.renderingType==="html"?Yt.call(this):sn.call(this)}function yt(ke,ut){if(!ke.cues)return!1;for(var tt=0;tt<ke.cues.length;tt++)if(ke.cues[tt].startTime===ut.startTime&&ke.cues[tt].endTime===ut.endTime)return!0;return!1}function ht(ke,ut,tt){var gt=!(arguments.length>3&&arguments[3]!==void 0)||arguments[3];return!!ke&&(isNaN(ut)||(gt?ke.startTime:ke.endTime)>=ut)&&(isNaN(tt)||(gt?ke.endTime:ke.startTime)<=tt)}function dt(ke,ut,tt){var gt,Dt;if(!(tt<ut)&&ke&&(ke.cues||ke.manualCueList)){var Vt=ke.cues&&ke.cues.length>0?"native":"custom",Gt=Vt==="native"?ke.cues:ke.manualCueList;if(!Gt||Gt.length===0)return;for(var Kt=Gt.length-1;Kt>=0;Kt--)!ht(Gt[Kt],ut,tt,!0)||(gt=Gt[Kt],Dt=N.getTime(),gt.startTime>=Dt&&gt.endTime<=Dt)||(Vt==="native"?ke.removeCue(Gt[Kt]):(Nt(Gt[Kt]),delete ke.manualCueList[Kt]))}}function qt(ke,ut,tt){var gt=!(arguments.length>3&&arguments[3]!==void 0)||arguments[3];if(ke&&(ke.cues||ke.manualCueList)){var Dt=ke.cues&&ke.cues.length>0?"native":"custom",Vt=Dt==="native"?ke.cues:ke.manualCueList;if(!Vt||Vt.length===0)return;for(var Gt=Vt.length-1;Gt>=0;Gt--)ht(Vt[Gt],ut,tt,gt)&&(Dt==="native"?(Vt[Gt].onexit&&Vt[Gt].onexit(),ke.removeCue(Vt[Gt])):(Nt(Vt[Gt]),delete ke.manualCueList[Gt]))}}function Yt(){var ke=document.getElementById("native-cue-style");if(!ke){(ke=document.createElement("style")).id="native-cue-style",document.head.appendChild(ke);var ut=ke.sheet,tt=N.getElement();try{tt&&(tt.id?ut.insertRule("#"+tt.id+"::cue {background: transparent}",0):tt.classList.length!==0?ut.insertRule("."+tt.className+"::cue {background: transparent}",0):ut.insertRule("video::cue {background: transparent}",0))}catch(gt){o.info(""+gt.message)}}}function sn(){var ke=document.getElementById("native-cue-style");ke&&document.head.removeChild(ke)}function ln(){if(w)for(;w.firstChild;)w.removeChild(w.firstChild)}return e={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,ie=!1,oe=2147483647,he=null,Z="requestAnimationFrame"in window,document.fullscreenElement!==void 0?se="fullscreenElement":document.webkitIsFullScreen!==void 0?se="webkitIsFullScreen":document.msFullscreenElement?se="msFullscreenElement":document.mozFullScreen&&(se="mozFullScreen"))},getStreamId:function(){return S.id},addTextTrack:function(ke){p.push(ke)},addCaptions:ve,createTracks:function(){var ke=L.get().streaming.text.dispatchForManualRendering;p.sort((function(Ge,lt){return Ge.index-lt.index})),w=N.getTTMLRenderingDiv(),j=N.getVttRenderingDiv();for(var ut,tt,gt,Dt,Vt,Gt,Kt=-1,Zt=0;Zt<p.length;Zt++){var pt=(tt=(ut=p[Zt]).kind,gt=ut.id!==void 0?ut.id:ut.lang,Dt=ut.lang,Vt=ut.isTTML,Gt=ut.isEmbedded,N.addTextTrack(tt,gt,Dt,Vt,Gt));C.push(pt),p[Zt].defaultTrack&&(pt.default=!0,Kt=Zt);var Ot=Pe(Zt);Ot&&(Ot.mode=u.A.TEXT_SHOWING,w&&(p[Zt].isTTML||p[Zt].isEmbedded)?Ot.renderingType="html":Ot.renderingType="default"),ve(Zt,0,p[Zt].captionData),f.trigger(r.A.TEXT_TRACK_ADDED)}if(ct.call(this,Kt),Kt>=0){var Fe=function(){var Ge=Pe(Kt);Ge&&Ge.renderingType==="html"&&V.call(this,Ge,!0),f.off(r.A.PLAYBACK_METADATA_LOADED,Fe,this)};f.on(r.A.PLAYBACK_METADATA_LOADED,Fe,this);for(var st=0;st<p.length;st++){var xe=Pe(st);xe&&(xe.mode=st!==Kt||ke?u.A.TEXT_HIDDEN:u.A.TEXT_SHOWING,xe.manualMode=st===Kt?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:ct,getTrackIdxForId:function(ke){for(var ut=-1,tt=0;tt<p.length;tt++)if(p[tt].id===ke){ut=tt;break}return ut},getCurrentTrackInfo:function(){return p[b]},setModeForTrackIdx:function(ke,ut){var tt=Pe(ke);tt&&tt.mode!==ut&&(tt.mode=ut),tt&&tt.manualMode!==ut&&(tt.manualMode=ut)},deleteCuesFromTrackIdx:function(ke,ut,tt){var gt=Pe(ke);gt&&qt(gt,ut,tt)},deleteAllTextTracks:function(){for(var ke=C?C.length:0,ut=0;ut<ke;ut++){var tt=Pe(ut);tt&&qt.call(this,tt,S.start,S.start+S.duration,!1)}C=[],p=[],k&&(clearInterval(k),k=null),te&&N&&(te.unobserve(N.getElement()),te=null),b=-1,ln.call(this)},manualCueProcessing:function(ke){var ut=Ee();if(ut&&ut.length>0){var tt=ut[0].manualCueList;tt&&tt.length>0&&tt.forEach((function(gt){gt.startTime<=ke&&gt.endTime>=ke&&!gt.isActive?(gt.isActive=!0,L.get().streaming.text.dispatchForManualRendering?Ce(gt):WebVTT.processCues(window,[gt],j,gt.cueID)):gt.isActive&&(gt.startTime>ke||gt.endTime<ke)&&(gt.isActive=!1,L.get().streaming.text.dispatchForManualRendering?Me(gt):Nt(gt))}))}},disableManualTracks:function(){var ke=Ee();if(ke&&ke.length>0){var ut=ke[0].manualCueList;ut&&ut.length>0&&ut.forEach((function(tt){if(tt.isActive){if(tt.isActive=!1,L.get().streaming.text.dispatchForManualRendering)Me(tt);else if(j)for(var gt=j.childNodes,Dt=0;Dt<gt.length;++Dt)gt[Dt].id===tt.cueID&&(j.removeChild(gt[Dt]),--Dt)}}))}}},o=(0,g.A)(z).getInstance().getLogger(e),e}ko.__dashjs_factory_name="TextTracks";var Qu=h.A.getClassFactory(ko);function Go(){var t,e,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 se=k.split(/:/)[1],ie=!1;se&&se.search(/%/)!=-1&&(ie=!0,se=parseInt(se.replace(/%/,""),10)),(k.match(/align/)||k.match(/A/))&&(j.align=se),(k.match(/line/)||k.match(/L/))&&(j.line=se==="auto"?se:parseInt(se,10),ie&&(j.snapToLines=!1)),(k.match(/position/)||k.match(/P/))&&(j.position=se),(k.match(/size/)||k.match(/S/))&&(j.size=se)}})),j}function B(w,j){for(var k,se=j,ie="",he="";w[se]!==""&&se<w.length;)se++;if((k=se-j)>1)for(var oe=0;oe<k;oe++){if((he=w[j+oe]).match(l)){ie="";break}ie+=he,oe!==k-1&&(ie+=`
17
+ `)}else(he=w[j]).match(l)||(ie=he);return ie}return t={parse:function(w){var j,k,se=[];if(!w)return se;j=(w=w.split(o)).length,k=-1;for(var ie=0;ie<j;ie++){var he=w[ie];if(he.length>0&&he!=="WEBVTT"&&he.match(l)){var oe=U(he),te=oe.cuePoints,Z=oe.styles,K=B(w,ie+1),z=F(te[0].replace(p,"")),f=F(te[1].replace(p,""));!isNaN(z)&&!isNaN(f)&&z>=k&&f>z?K!==""?(k=z,se.push({start:z,end:f,data:K,styles:Z})):e.error("Skipping cue due to empty/malformed cue text"):e.error("Skipping cue due to incorrect cue timing")}}return se},getCaptionStyles:H},e=(0,g.A)(b).getInstance().getLogger(t),o=/(?:\r\n|\r|\n)/gm,l=/-->/,p=/(^[\s]+|[\s]+$)/g,C=/\s\b/g,t}Go.__dashjs_factory_name="VTTParser";var $u=h.A.getSingletonFactory(Go);function jo(){var t,e;return t={parse:function(o){var l=[];return e.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)},e.parse(o),l}},(function(){try{window&&window.WebVTT&&window.WebVTT.Parser&&(e=new window.WebVTT.Parser(window,window.vttjs,window.WebVTT.StringDecoder()))}catch{}})(),t}jo.__dashjs_factory_name="VttCustomRenderingParser";var Ju=h.A.getSingletonFactory(jo);function qo(){var t,e,o=this.context,l=(0,y.A)(o).getInstance(),p=0;return t={parse:function(C,b,F,U,H){var B,w,j,k="",se=[],ie={},he={},oe="",te="",Z={onOpenTag:function(S,L,R){if(R[" imagetype"]&&!R[" imageType"]&&(l.trigger(r.A.CONFORMANCE_VIOLATION,{level:xr.LEVELS.ERROR,event:xr.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 e.warn("smpte-tt imageType != PNG. Discarded");oe=R["http://www.w3.org/XML/1998/namespace id"].value}},onCloseTag:function(){oe&&(he[oe]=te.trim()),te="",oe=""},onText:function(S){oe&&(te+=S)}};if(!C)throw k="no ttml data to parse",new Error(k);ie.data=C,l.trigger(i.A.TTML_TO_PARSE,ie);var K=(0,Ea.fromXML)(ie.data,(function(S){k=S}),Z);l.trigger(i.A.TTML_PARSED,{ttmlString:ie.data,ttmlDoc:K});var z,f=K.getMediaTimeEvents();for(j=0;j<f.length;j++){var N=(0,Ea.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)&&se.push({start:B,end:w,type:"html",cueID:(z="cue_TTML_"+p,p++,z),isd:N,images:H,embeddedImages:he})}if(k!=="")throw e.error(k),new Error(k);return se}},e=(0,g.A)(o).getInstance().getLogger(t),t}qo.__dashjs_factory_name="TTMLParser";var Zu=h.A.getSingletonFactory(qo);function ci(t){return ci=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ci(t)}function Yo(t,e){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(t);e&&(l=l.filter((function(p){return Object.getOwnPropertyDescriptor(t,p).enumerable}))),o.push.apply(o,l)}return o}function Ho(t){for(var e=1;e<arguments.length;e++){var o=arguments[e]!=null?arguments[e]:{};e%2?Yo(Object(o),!0).forEach((function(l){el(t,l,o[l])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):Yo(Object(o)).forEach((function(l){Object.defineProperty(t,l,Object.getOwnPropertyDescriptor(o,l))}))}return t}function el(t,e,o){return(e=(function(l){var p=(function(C){if(ci(C)!="object"||!C)return C;var b=C[Symbol.toPrimitive];if(b!==void 0){var F=b.call(C,"string");if(ci(F)!="object")return F;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(C)})(l);return ci(p)=="symbol"?p:p+""})(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}function Vo(t,e){(e==null||e>t.length)&&(e=t.length);for(var o=0,l=Array(e);o<e;o++)l[o]=t[o];return l}function Ko(t){var e,o,l,p=this.context,C=(0,y.A)(p).getInstance(),b=(0,Ae.A)(p).getInstance(),F=t.adapter,U=t.baseURLController,H="error",B="loaded",w="unloaded";function j(ie,he){var oe,te,Z=!1;if(U.resolve()){var K=F.getVoRepresentations(ie);K&&K.length>0&&(oe=U.resolve(K[0].path).url)}var z=ie.essentialPropertiesAsArray.filter((function(N){return N.schemeIdUri&&N.schemeIdUri===u.A.FONT_DOWNLOAD_DVB_SCHEME})),f=ie.supplementalPropertiesAsArray.filter((function(N){return N.schemeIdUri&&N.schemeIdUri===u.A.FONT_DOWNLOAD_DVB_SCHEME}));z.length>0?(Z=!0,te=z):te=f,te.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=oe,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:ie.id,streamId:he,isEssential:Z,status:w,fontFace:new FontFace(N.dvbFontFamily,"url(".concat(S,")"),{display:"swap"})})}var L,R}))}function k(ie,he){var oe=l[ie];l[ie]=Ho(Ho({},oe),{},{status:he})}function se(){l=[]}return e={addFontsFromTracks:function(ie,he){if(ie&&Array.isArray(ie)&&he)for(var oe=0;oe<ie.length;oe++)j(ie[oe],he)},downloadFonts:function(){for(var ie=function(oe){var te=l[oe];document.fonts.add(te.fontFace),C.trigger(r.A.DVB_FONT_DOWNLOAD_ADDED,te),te.fontFace.load().then((function(){k(oe,B),C.trigger(r.A.DVB_FONT_DOWNLOAD_COMPLETE,te)}),(function(Z){k(oe,H),o.debug("Font download error: ",Z),C.trigger(r.A.DVB_FONT_DOWNLOAD_FAILED,te)}))},he=0;he<l.length;he++)ie(he)},getFonts:function(){return l},getFontsForTrackId:function(ie){return l.filter((function(he){return he.trackId&&he.trackId===ie}))},reset:function(){(function(){var ie,he=(function(Z,K){var z=typeof Symbol<"u"&&Z[Symbol.iterator]||Z["@@iterator"];if(!z){if(Array.isArray(Z)||(z=(function(V,de){if(V){if(typeof V=="string")return Vo(V,de);var ue={}.toString.call(V).slice(8,-1);return ue==="Object"&&V.constructor&&(ue=V.constructor.name),ue==="Map"||ue==="Set"?Array.from(V):ue==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(ue)?Vo(V,de):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(he.s();!(ie=he.n()).done;){var oe=ie.value,te=document.fonts.delete(oe.fontFace);o.debug("Removal of fontFamily: ".concat(oe.fontFamily," was ").concat(te?"successful":"unsuccessful"))}}catch(Z){he.e(Z)}finally{he.f()}})(),se()}},o=(0,g.A)(p).getInstance().getLogger(e),se(),e}Ko.__dashjs_factory_name="DVBFonts";var tl=h.A.getClassFactory(Ko);function Wo(t){var e,o,l,p,C,b,F,U,H,B,w,j,k,se,ie=this.context,he=t.adapter,oe=t.errHandler,te=t.manifestModel,Z=t.mediaController,K=t.baseURLController,z=t.videoModel,f=t.settings;function N(Y){if(se.error("Could not download ".concat(Y.isEssential?"an essential":"a"," font - fontFamily: ").concat(Y.fontFamily,", url: ").concat(Y.url)),Y.isEssential){var ge=p[Y.streamId].getTrackIdxForId(Y.trackId);p[Y.streamId].setModeForTrackIdx(ge,u.A.TEXT_DISABLED)}}function S(Y){if(se.debug("Successfully downloaded ".concat(Y.isEssential?"an essential":"a"," font - fontFamily: ").concat(Y.fontFamily,", url: ").concat(Y.url)),Y.isEssential){var ge=p[Y.streamId].getTrackIdxForId(Y.trackId);ge===p[Y.streamId].getCurrentTrackIdx()?p[Y.streamId].setModeForTrackIdx(ge,u.A.TEXT_SHOWING):p[Y.streamId].setModeForTrackIdx(ge,u.A.TEXT_HIDDEN)}}function L(Y){var ge=Y.tracks,ve=Y.index,fe=Y.streamId;if(f.get().streaming.text.defaultEnabled===!1&&!de()||j)ue(fe,-1);else{var Ce=Z.getCurrentTrackFor(u.A.TEXT,fe);if(Ce){var Me={lang:Ce.lang,role:Ce.roles[0],index:Ce.index,codec:Ce.codec,accessibility:Ce.accessibility[0]};ge.some((function(Qe,$e){if(Z.matchSettings(Me,Qe))return ue(fe,$e),ve=$e,!0}))}H=!1}o[fe].lastEnabledIndex=ve,U.trigger(r.A.TEXT_TRACKS_ADDED,{enabled:de(),index:ve,tracks:ge,streamId:fe}),w=!0,k.addFontsFromTracks(ge,fe),k.getFonts().forEach((function(Qe){if(Qe.isEssential){var $e=p[Qe.streamId].getTrackIdxForId(Qe.trackId);p[Qe.streamId].setModeForTrackIdx($e,u.A.TEXT_DISABLED)}})),k.downloadFonts()}function R(Y){try{var ge=Y.streamId;if(!p[ge]||isNaN(Y.time))return;p[ge].manualCueProcessing(Y.time)}catch{}}function V(Y){try{var ge=Y.streamId;if(!p[ge])return;p[ge].disableManualTracks()}catch{}}function de(){var Y=!0;return H&&!B&&(Y=!1),Y}function ue(Y,ge){(H=ge===-1)&&Z&&Z.saveTextSettingsDisabled();var ve=P(Y);if(ve!==ge&&p[Y]){p[Y].disableManualTracks();var fe=p[Y].getCurrentTrackInfo(),Ce=fe?z.getTextTrack(fe.kind,fe.id,fe.lang,fe.isTTML,fe.isEmbedded):null;Ce&&Ce.mode!==u.A.TEXT_DISABLED&&p[Y].setModeForTrackIdx(ve,u.A.TEXT_HIDDEN),p[Y].setCurrentTrackIdx(ge),fe=p[Y].getCurrentTrackInfo();var Me=f.get().streaming.text.dispatchForManualRendering;fe&&!Me&&fe.mode!==u.A.TEXT_DISABLED&&p[Y].setModeForTrackIdx(ge,u.A.TEXT_SHOWING),fe&&fe.isFragmented&&!fe.isEmbedded?(function(Qe,$e,Ze){if(l[Qe])for(var at=l[Qe].getConfig().fragmentedTracks,Nt=0;Nt<at.length;Nt++){var Ee=at[Nt];if($e.lang===Ee.lang&&(Ee.id?$e.id===Ee.id:$e.index===Ee.index)){var Pe=Z.getCurrentTrackFor(u.A.TEXT,Qe);(Ee.id?Pe.id!==Ee.id:Pe.index!==Ee.index)?(p[Qe].deleteCuesFromTrackIdx(Ze),l[Qe].setCurrentFragmentedTrackIdx(Nt)):Ze===-1&&U.trigger(i.A.SET_FRAGMENTED_TEXT_AFTER_DISABLED,{},{streamId:Qe,mediaType:u.A.TEXT})}}})(Y,fe,ve):fe&&!fe.isFragmented&&(function(Qe,$e){U.trigger(i.A.SET_NON_FRAGMENTED_TEXT,{currentTrackInfo:$e},{streamId:Qe,mediaType:u.A.TEXT})})(Y,fe),Z.setTrack(fe)}}function P(Y){return p[Y].getCurrentTrackIdx()}function $(){l={},p={},o={},H=!0,w=!1,j=!1}return e={deactivateStream:function(Y){if(Y){var ge=Y.id;l[ge]&&l[ge].resetMediaInfos(),p[ge]&&p[ge].deleteAllTextTracks()}},initialize:function(){k=tl(ie).create({adapter:he,baseURLController:K}),U.on(i.A.TEXT_TRACKS_QUEUE_INITIALIZED,L,e),U.on(i.A.DVB_FONT_DOWNLOAD_FAILED,N,e),U.on(i.A.DVB_FONT_DOWNLOAD_COMPLETE,S,e),f.get().streaming.text.webvtt.customRenderingEnabled&&(U.on(i.A.PLAYBACK_TIME_UPDATED,R,e),U.on(i.A.PLAYBACK_SEEKING,V,e))},initializeForStream:function(Y){var ge=Y.id,ve=Qu(ie).create({videoModel:z,settings:f,streamInfo:Y});ve.initialize(),p[ge]=ve;var fe=zu(ie).create({errHandler:oe,adapter:he,dvbFonts:k,manifestModel:te,mediaController:Z,videoModel:z,textTracks:ve,vttParser:C,vttCustomRenderingParser:b,ttmlParser:F,streamInfo:Y,settings:f});fe.initialize(),l[ge]=fe,o[ge]={},o[ge].lastEnabledIndex=-1},createTracks:function(Y){var ge=Y.id;p[ge]&&p[ge].createTracks()},getTextSourceBuffer:function(Y){var ge=Y.id;if(l&&l[ge])return l[ge]},getAllTracksAreDisabled:function(){return H},addEmbeddedTrack:function(Y,ge){var ve=Y.id;l[ve]&&l[ve].addEmbeddedTrack(ge)},enableText:function(Y,ge){return(0,D.sq)(ge,"boolean"),de()!==ge&&(ge&&ue(Y,o[Y].lastEnabledIndex),ge||(o[Y].lastEnabledIndex=P(Y),w?ue(Y,-1):j=!0)),!0},isTextEnabled:de,setTextTrack:ue,getCurrentTrackIdx:P,enableForcedTextStreaming:function(Y){return(0,D.sq)(Y,"boolean"),B=Y,!0},addMediaInfosToBuffer:function(Y,ge,ve){var fe=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null,Ce=Y.id;l[Ce]&&l[Ce].addMediaInfos(ge,ve,fe)},reset:function(){k.reset(),$(),U.off(i.A.TEXT_TRACKS_QUEUE_INITIALIZED,L,e),U.off(i.A.DVB_FONT_DOWNLOAD_FAILED,N,e),U.off(i.A.DVB_FONT_DOWNLOAD_COMPLETE,S,e),f.get().streaming.text.webvtt.customRenderingEnabled&&(U.off(i.A.PLAYBACK_TIME_UPDATED,R,e),U.off(i.A.PLAYBACK_SEEKING,V,e)),Object.keys(l).forEach((function(Y){l[Y].resetEmbedded(),l[Y].reset()}))}},B=!1,w=!1,j=!1,C=$u(ie).getInstance(),b=Ju(ie).getInstance(),F=Zu(ie).getInstance(),U=(0,y.A)(ie).getInstance(),se=(0,g.A)(ie).getInstance().getLogger(e),$(),e}Wo.__dashjs_factory_name="TextController";var nl=h.A.getClassFactory(Wo);function _a(){var t,e,o,l,p,C,b,F,U,H,B,w,j,k,se,ie,he,oe,te,Z,K,z,f,N,S,L,R,V,de,ue,P,$,Y,ge,ve,fe,Ce,Me,Qe,$e="You must first call initialize() and set a source before calling this method",Ze="You must first call initialize() and set a valid source and view before calling this method",at="You must first call attachView() to set the video element before calling this method",Nt="You must first call attachSource() with a valid source before calling this method",Ee="MediaPlayer not initialized!",Pe=this.context,ct=(0,y.A)(Pe).getInstance(),Ke=(0,le.A)(Pe).getInstance(),yt=(0,g.A)(Pe).getInstance({settings:Ke});function ht(){Zt(null),Gt(null),l=null,k&&(k.reset(),k=null),se&&(se.reset(),se=null),Z&&Z.reset(),Ke.reset(),he&&(he.reset(),he=null)}function dt(){return!!o&&!!fe.getElement()}function qt(){return(0,nu.i)()}function Yt(){if(!b)throw Ze;return V.isPaused()}function sn(){if(!b)throw Ze;return V.getIsDynamic()}function ln(ye){var Te=S&&S.hasVideoTrack()?u.A.VIDEO:u.A.AUDIO,We=$.getCurrentDVRInfo(Te);if(!We)return 0;var wt=V.getOriginalLiveDelay(),jt=We.range.start+ye;return jt>We.range.end-wt&&(jt=We.range.end-wt),jt}function ke(ye){if(!b)throw Ze;var Te=Vt().currentTime;if(ye!==void 0)Te=S.getTimeRelativeToStreamId(Te,ye);else if(V.getIsDynamic()){var We=S&&S.hasVideoTrack()?u.A.VIDEO:u.A.AUDIO,wt=$.getCurrentDVRInfo(We);Te=wt===null||Te===0?0:Math.max(0,Te-wt.range.start)}return Te}function ut(){if(!b)throw Ze;var ye=Vt().duration;if(V.getIsDynamic()){var Te=S&&S.hasVideoTrack()?u.A.VIDEO:u.A.AUDIO,We=$.getCurrentDVRInfo(Te);ye=We?We.range.end-We.range.start:0}return ye}function tt(ye){(0,D.sq)(ye,"boolean"),F=ye}function gt(){Z.restoreDefaultUTCTimingSources()}function Dt(){return $}function Vt(){if(!fe.getElement())throw at;return fe.getElement()}function Gt(ye){if(!p)throw Ee;fe.setElement(ye),ye&&(st(),(function(){if(!se){var Te=dashjs.MetricsReporting;if(typeof Te=="function"){var We=Te(Pe).create();se=We.createMetricsReporting({debug:yt,eventBus:ct,mediaElement:Vt(),adapter:oe,dashMetrics:$,mediaPlayerModel:te,events:i.A,constants:u.A,metricsConstants:_.A})}}})(),(function(){if(!ie){var Te=dashjs.MssHandler;typeof Te=="function"&&(me.extend(Te.errors),ie=Te(Pe).create({eventBus:ct,mediaPlayerModel:te,dashMetrics:$,manifestModel:Y,playbackController:V,streamController:S,protectionController:k,baseURLController:z,errHandler:K,events:i.A,constants:u.A,debug:yt,initSegmentType:je.G.INIT_SEGMENT_TYPE,BASE64:ga,ISOBoxer:Oi,settings:Ke}))}})(),S&&S.switchToVideoElement(U)),b&&Ot(),lt(U)}function Kt(ye){if(!C)throw $e;var Te=S.getActiveStreamInfo();return Te?j.getTracksFor(ye,Te.id):[]}function Zt(ye){var Te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:NaN;if(!p)throw Ee;typeof ye=="string"&&Ce.initialize(ye),Te==null&&(Te=NaN),isNaN(Te)||(Te=Math.max(0,Te)),U=Te,o=ye,(C||b)&&Ot(),dt()&&lt(U)}function pt(){if(!C)throw $e;var ye=S.getActiveStreamInfo();return ye?S.getStreamById(ye.id):null}function Ot(){b=!1,C=!1,oe.reset(),S.reset(),R.reset(),P.reset(),V.reset(),de.reset(),ue.reset(),H.reset(),j.reset(),Qe.reset(),k&&(Ke.get().streaming.protection.keepProtectionMediaKeys?k.stop():(k.reset(),k=null,st())),L.reset(),ge.reset(),ve.reset()}function Fe(){return ks(Pe).create({debug:yt,errHandler:K,dashMetrics:$,mediaPlayerModel:te,requestModifier:(0,De.A)(Pe).getInstance(),mssHandler:ie,settings:Ke})}function st(){if(k)return k;var ye=dashjs.Protection;if(typeof ye=="function"){var Te=ye(Pe).create();return i.A.extend(ye.events),r.A.extend(ye.events,{publicOnly:!0}),me.extend(ye.errors),f||(f=(0,ao.A)(Pe).getInstance()),k=Te.createProtectionSystem({debug:yt,errHandler:K,videoModel:fe,customParametersModel:Z,capabilities:f,eventBus:ct,events:i.A,BASE64:ga,constants:u.A,cmcdModel:ge,settings:Ke})}return null}function xe(){if(!p)throw Ee;if(he)return he;var ye=dashjs.OfflineController;if(typeof ye=="function"){i.A.extend(ye.events),r.A.extend(ye.events,{publicOnly:!0}),me.extend(ye.errors);var Te=Fe(),We=Sa(Pe).create();return We.setConfig({manifestModel:Y,adapter:oe,manifestLoader:Te,errHandler:K,contentSteeringController:ue}),he=ye(Pe).create({debug:yt,manifestUpdater:We,baseURLController:z,manifestLoader:Te,manifestModel:Y,mediaPlayerModel:te,abrController:H,playbackController:V,adapter:oe,errHandler:K,dashMetrics:$,timelineConverter:w,segmentBaseController:Qe,schemeLoaderFactory:B,eventBus:ct,events:i.A,errors:me,constants:u.A,settings:Ke,dashConstants:n.A,urlUtils:(0,Ae.A)(Pe).getInstance()})}return null}function Ge(ye){var Te=S&&S.hasVideoTrack()?u.A.VIDEO:u.A.AUDIO,We=$.getCurrentDVRInfo(Te);return We?ye+(We.manifestInfo.availableFrom.getTime()/1e3+We.range.start):0}function lt(){var ye,Te=arguments.length>0&&arguments[0]!==void 0?arguments[0]:NaN;he&&he.resetRecords(),!C&&o&&(C=!0,e.info("Streaming Initialized"),ye=Fe(),S||(S=Na(Pe).getInstance()),L||(L=nl(Pe).create({errHandler:K,manifestModel:Y,adapter:oe,mediaController:j,baseURLController:z,videoModel:fe,settings:Ke})),N.setConfig({capabilities:f,customParametersModel:Z,adapter:oe,settings:Ke,manifestModel:Y,errHandler:K}),S.setConfig({capabilities:f,capabilitiesFilter:N,manifestLoader:ye,manifestModel:Y,mediaPlayerModel:te,customParametersModel:Z,protectionController:k,textController:L,adapter:oe,dashMetrics:$,errHandler:K,timelineConverter:w,videoModel:fe,playbackController:V,serviceDescriptionController:de,contentSteeringController:ue,abrController:H,mediaController:j,settings:Ke,baseURLController:z,uriFragmentModel:Ce,segmentBaseController:Qe}),R.setConfig({settings:Ke,playbackController:V,streamController:S,videoModel:fe,timelineConverter:w,adapter:oe}),V.setConfig({streamController:S,serviceDescriptionController:de,dashMetrics:$,adapter:oe,videoModel:fe,timelineConverter:w,settings:Ke}),P.setConfig({streamController:S,playbackController:V,mediaPlayerModel:te,videoModel:fe,settings:Ke}),H.setConfig({streamController:S,domStorage:Me,mediaPlayerModel:te,customParametersModel:Z,cmsdModel:ve,dashMetrics:$,adapter:oe,videoModel:fe,settings:Ke}),ge.setConfig({abrController:H,dashMetrics:$,playbackController:V}),ve.setConfig({}),H.initialize(),S.initialize(F,l),L.initialize(),R.initialize(),P.initialize(),ge.initialize(),ve.initialize(),ue.initialize(),Qe.initialize(),typeof o=="string"?S.load(o,Te):S.loadWithManifest(o,Te)),!b&&dt()&&(b=!0,e.info("Playback Initialized"))}return t={initialize:function(ye,Te,We){var wt=arguments.length>3&&arguments[3]!==void 0?arguments[3]:NaN;f||(f=(0,ao.A)(Pe).getInstance()).setConfig({settings:Ke}),K||(K=Gs(Pe).getInstance()),f.supportsMediaSource()?(p||(p=!0,w=Yu(Pe).getInstance(),H||(H=$s(Pe).getInstance()).setConfig({settings:Ke}),B||(B=bn(Pe).getInstance()),V||(V=d(Pe).getInstance()),j||(j=as(Pe).getInstance()),S||(S=Na(Pe).getInstance()),R||(R=ts(Pe).getInstance()),P||(P=ns(Pe).getInstance()),de||(de=is(Pe).getInstance()),ue||(ue=ni(Pe).getInstance()),N||(N=js(Pe).getInstance()),oe=Eu(Pe).getInstance(),Y=Vs(Pe).getInstance(),ge=Tn(Pe).getInstance(),ve=zr(Pe).getInstance(),$=qu(Pe).getInstance({settings:Ke}),Me=tu(Pe).getInstance({settings:Ke}),oe.setConfig({constants:u.A,cea608parser:I(),errHandler:K,BASE64:ga}),z||(z=ds(Pe).create()),z.setConfig({adapter:oe,contentSteeringController:ue}),de.setConfig({adapter:oe}),Qe||(Qe=au(Pe).getInstance({dashMetrics:$,mediaPlayerModel:te,errHandler:K,baseURLController:z,events:i.A,eventBus:ct,debug:yt,boxParser:(0,Zr.A)(Pe).getInstance(),requestModifier:(0,De.A)(Pe).getInstance(),errors:me})),j.setConfig({domStorage:Me,settings:Ke,customParametersModel:Z}),te.setConfig({playbackController:V,serviceDescriptionController:de}),ue.setConfig({adapter:oe,errHandler:K,dashMetrics:$,mediaPlayerModel:te,manifestModel:Y,serviceDescriptionController:de,eventBus:ct,requestModifier:(0,De.A)(Pe).getInstance()}),gt(),tt(We===void 0||We),xe()),ye&&Gt(ye),Te&&Zt(Te,wt),e.info("[dash.js "+qt()+"] MediaPlayer has been initialized")):K.error(new pe.A(me.CAPABILITY_MEDIASOURCE_ERROR_CODE,me.CAPABILITY_MEDIASOURCE_ERROR_MESSAGE))},setConfig:function(ye){ye&&(ye.capabilities&&(f=ye.capabilities),ye.capabilitiesFilter&&(N=ye.capabilitiesFilter),ye.streamController&&(S=ye.streamController),ye.textController&&(L=ye.textController),ye.gapController&&(R=ye.gapController),ye.playbackController&&(V=ye.playbackController),ye.serviceDescriptionController&&(de=ye.serviceDescriptionController),ye.contentSteeringController&&(ue=ye.contentSteeringController),ye.catchupController&&(P=ye.catchupController),ye.mediaPlayerModel&&(te=ye.mediaPlayerModel),ye.customParametersModel&&(Z=ye.customParametersModel),ye.abrController&&(H=ye.abrController),ye.schemeLoaderFactory&&(B=ye.schemeLoaderFactory),ye.mediaController&&(j=ye.mediaController),ye.settings&&(Ke=ye.settings))},on:function(ye,Te,We,wt){ct.on(ye,Te,We,wt)},off:function(ye,Te,We){ct.off(ye,Te,We)},extend:function(ye,Te,We){h.A.extend(ye,Te,We,Pe)},attachView:Gt,attachSource:Zt,refreshManifest:function(ye){if(!p)throw Ee;if(!dt())return ye(null,Nt);var Te=this;if(typeof ye=="function"){var We=function(wt){ct.off(i.A.INTERNAL_MANIFEST_LOADED,We,Te),wt.error?ye(null,wt.error):ye(wt.manifest)};ct.on(i.A.INTERNAL_MANIFEST_LOADED,We,Te)}S.refreshManifest()},isReady:dt,preload:function(){if(!fe.getElement()&&!C){if(!o)throw Nt;lt(U)}},play:function(){if(!b)throw Ze;(!F||Yt()&&b)&&V.play(!0)},isPaused:Yt,pause:function(){if(!b)throw Ze;V.pause()},isSeeking:function(){if(!b)throw Ze;return V.isSeeking()},isDynamic:sn,getLowLatencyModeEnabled:function(){if(!b)throw Ze;return V.getLowLatencyModeEnabled()},seek:function(ye){if(!b)throw Ze;if((0,D.sq)(ye,"number"),isNaN(ye))throw u.A.BAD_ARGUMENT_ERROR;ye<0&&(ye=0);var Te=V.getIsDynamic()?ln(ye):ye,We=Vt();!V.getIsDynamic()&&We.duration&&(Te=Math.min(We.duration,Te)),V.seek(Te,!1,!1,!0)},seekToOriginalLive:function(){b&&sn()&&V.seekToOriginalLive()},setPlaybackRate:function(ye){Vt().playbackRate=ye},getPlaybackRate:function(){return Vt().playbackRate},setMute:function(ye){(0,D.sq)(ye,"boolean"),Vt().muted=ye},isMuted:function(){return Vt().muted},setVolume:function(ye){if(typeof ye!="number"||isNaN(ye)||ye<0||ye>1)throw u.A.BAD_ARGUMENT_ERROR;Vt().volume=ye},getVolume:function(){return Vt().volume},time:ke,duration:ut,timeAsUTC:function(){if(!b)throw Ze;return ke()<0?NaN:Ge(ke())},durationAsUTC:function(){if(!b)throw Ze;return Ge(ut())},getActiveStream:pt,getDVRWindowSize:function(){var ye=S&&S.hasVideoTrack()?u.A.VIDEO:u.A.AUDIO,Te=$.getCurrentDVRInfo(ye);return Te?Te.manifestInfo.dvrWindowSize:0},getDVRSeekOffset:ln,getAvailableBaseUrls:function(){var ye=Y.getValue();return ye?z.getBaseUrls(ye):[]},getAvailableLocations:function(){var ye=Y.getValue();if(!ye)return[];var Te=oe.getLocation(ye),We=ue.getSynthesizedLocationElements(Te);return Te.concat(We)},getTargetLiveDelay:function(){if(!b)throw Ze;return V.getOriginalLiveDelay()},convertToTimeCode:function(ye){ye=Math.max(ye,0);var Te=Math.floor(ye/3600),We=Math.floor(ye%3600/60),wt=Math.floor(ye%3600%60);return(Te===0?"":Te<10?"0"+Te.toString()+":":Te.toString()+":")+(We<10?"0"+We.toString():We.toString())+":"+(wt<10?"0"+wt.toString():wt.toString())},formatUTC:function(ye,Te,We){var wt=arguments.length>3&&arguments[3]!==void 0&&arguments[3],jt=new Date(1e3*ye),hn=jt.toLocaleDateString(Te),En=jt.toLocaleTimeString(Te,{hour12:We});return wt?En+" "+hn:En},getVersion:qt,getDebug:function(){return yt},getBufferLength:function(ye){var Te=[u.A.VIDEO,u.A.AUDIO,u.A.TEXT];if(ye)return Te.indexOf(ye)!==-1?Dt().getCurrentBufferLevel(ye)||NaN:(e.warn("getBufferLength requested for invalid type"),NaN);var We=Te.map((function(wt){return Kt(wt).length>0?Dt().getCurrentBufferLevel(wt):Number.MAX_VALUE})).reduce((function(wt,jt){return Math.min(wt,jt)}));return We===Number.MAX_VALUE?NaN:We},getTTMLRenderingDiv:function(){return fe?fe.getTTMLRenderingDiv():null},getVideoElement:Vt,getSource:function(){if(!o)throw Nt;return o},updateSource:function(ye){o=ye,S.load(o)},getCurrentLiveLatency:function(){if(!p)throw Ee;return b?V.getCurrentLiveLatency():NaN},getTopBitrateInfoFor:function(ye){if(!C)throw $e;return H.getTopBitrateInfoFor(ye)},setAutoPlay:tt,getAutoPlay:function(){return F},getDashMetrics:Dt,getQualityFor:function(ye){if(!C)throw $e;if(ye===u.A.IMAGE){var Te=pt();if(!Te)return-1;var We=Te.getThumbnailController();return We?We.getCurrentTrackIndex():-1}return H.getQualityFor(ye)},setQualityFor:function(ye,Te){var We=arguments.length>2&&arguments[2]!==void 0&&arguments[2];if(!C)throw $e;if(ye===u.A.IMAGE){var wt=pt();if(!wt)return;var jt=wt.getThumbnailController();jt&&jt.setTrackByIndex(Te)}H.setPlaybackQuality(ye,S.getActiveStreamInfo(),Te,{forceReplace:We})},updatePortalSize:function(){H.setElementSize(),H.setWindowResizeEventCalled(!0)},enableText:function(ye){var Te=S.getActiveStreamInfo();return!(!Te||!L)&&L.enableText(Te.id,ye)},enableForcedTextStreaming:function(ye){return!(!S.getActiveStreamInfo()||!L)&&L.enableForcedTextStreaming(ye)},isTextEnabled:function(){var ye=S.getActiveStreamInfo();return!(!ye||!L)&&L.isTextEnabled(ye)},setTextTrack:function(ye){if(!b)throw Ze;var Te=S.getActiveStreamInfo();Te&&L&&L.setTextTrack(Te.id,ye)},getBitrateInfoListFor:function(ye){if(!C)throw $e;var Te=pt();return Te?Te.getBitrateListFor(ye):[]},getStreamsFromManifest:function(ye){if(!C)throw $e;return oe.getStreamsInfo(ye)},getTracksFor:Kt,getTracksForTypeFromManifest:function(ye,Te,We){if(!C)throw $e;return(We=We||oe.getStreamsInfo(Te,1)[0])?oe.getAllMediaInfoForType(We,ye,Te):[]},getCurrentTrackFor:function(ye){if(!C)throw $e;var Te=S.getActiveStreamInfo();return j.getCurrentTrackFor(ye,Te.id)},setInitialMediaSettingsFor:function(ye,Te){if(!p)throw Ee;j.setInitialSettings(ye,Te)},getInitialMediaSettingsFor:function(ye){if(!p)throw Ee;return j.getInitialSettings(ye)},setCurrentTrack:function(ye){var Te=arguments.length>1&&arguments[1]!==void 0&&arguments[1];if(!C)throw $e;j.setTrack(ye,Te)},addABRCustomRule:function(ye,Te,We){Z.addAbrCustomRule(ye,Te,We)},removeABRCustomRule:function(ye){Z.removeAbrCustomRule(ye)},removeAllABRCustomRule:function(){Z.removeAllAbrCustomRule()},getABRCustomRules:function(){return Z.getAbrCustomRules()},getAverageThroughput:function(ye){var Te=H.getThroughputHistory(),We=V.getIsDynamic();return Te?Te.getAverageThroughput(ye,We):0},retrieveManifest:function(ye,Te){var We=Fe(),wt=this,jt=function(hn){hn.error?Te(null,hn.error):Te(hn.manifest),ct.off(i.A.INTERNAL_MANIFEST_LOADED,jt,wt),We.reset()};ct.on(i.A.INTERNAL_MANIFEST_LOADED,jt,wt),Ce.initialize(ye),We.load(ye)},addUTCTimingSource:function(ye,Te){Z.addUTCTimingSource(ye,Te)},removeUTCTimingSource:function(ye,Te){Z.removeUTCTimingSource(ye,Te)},clearDefaultUTCTimingSources:function(){Z.clearDefaultUTCTimingSources()},restoreDefaultUTCTimingSources:gt,setXHRWithCredentialsForType:function(ye,Te){Z.setXHRWithCredentialsForType(ye,Te)},getXHRWithCredentialsForType:function(ye){return Z.getXHRWithCredentialsForType(ye)},getProtectionController:function(){return st()},attachProtectionController:function(ye){k=ye},setProtectionData:function(ye){l=ye,S&&S.setProtectionData(l)},registerLicenseRequestFilter:function(ye){Z.registerLicenseRequestFilter(ye)},registerLicenseResponseFilter:function(ye){Z.registerLicenseResponseFilter(ye)},unregisterLicenseRequestFilter:function(ye){Z.unregisterLicenseRequestFilter(ye)},unregisterLicenseResponseFilter:function(ye){Z.unregisterLicenseResponseFilter(ye)},registerCustomCapabilitiesFilter:function(ye){Z.registerCustomCapabilitiesFilter(ye)},unregisterCustomCapabilitiesFilter:function(ye){Z.unregisterCustomCapabilitiesFilter(ye)},setCustomInitialTrackSelectionFunction:function(ye){Z.setCustomInitialTrackSelectionFunction(ye)},resetCustomInitialTrackSelectionFunction:function(){Z.resetCustomInitialTrackSelectionFunction(null)},attachTTMLRenderingDiv:function(ye){if(!fe.getElement())throw at;fe.setTTMLRenderingDiv(ye)},attachVttRenderingDiv:function(ye){if(!fe.getElement())throw at;fe.setVttRenderingDiv(ye)},getCurrentTextTrackIndex:function(){var ye=S.getActiveStreamInfo();if(ye&&L)return L.getCurrentTrackIdx(ye.id)},provideThumbnail:function(ye,Te){if(typeof Te=="function")if(ye<0)Te(null);else{var We=V.getIsDynamic()?ln(ye):ye,wt=S.getStreamForTime(We);if(wt!==null){var jt=wt.getThumbnailController();if(jt)return jt.provide(We,Te);Te(null)}else Te(null)}},getDashAdapter:function(){return oe},getOfflineController:function(){return xe()},triggerSteeringRequest:function(){if(ue)return ue.loadSteeringData()},getCurrentSteeringResponseData:function(){if(ue)return ue.getCurrentSteeringResponseData()},getSettings:function(){return Ke.get()},updateSettings:function(ye){Ke.update(ye)},resetSettings:function(){Ke.reset()},reset:ht,destroy:function(){ht(),h.A.deleteSingletonInstances(Pe)}},e=yt.getLogger(t),p=!1,b=!1,C=!1,F=!0,U=NaN,k=null,he=null,l=null,oe=null,Qe=null,i.A.extend(r.A),te=Ks(Pe).getInstance(),Z=(0,Lt.A)(Pe).getInstance(),fe=Zs(Pe).getInstance(),Ce=Hs(Pe).getInstance(),t}_a.__dashjs_factory_name="MediaPlayer";var Pi=h.A.getClassFactory(_a);Pi.events=r.A,Pi.errors=me,h.A.updateClassFactory(_a.__dashjs_factory_name,Pi);var rl=Pi},7547:function(vt,Le,M){function ce(i){return ce=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},ce(i)}function I(i,h,g){return h=n(h),(function(r,m){if(m&&(ce(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));Le.A=y},7256:function(vt,Le){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 ce(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"}}}])&&ce(n.prototype,_),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,_})());Le.A=u},1991:function(vt,Le){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 ce(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"}}])&&ce(n.prototype,_),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,_})());Le.A=u},1648:function(vt,Le,M){function ce(De,Ae,Re){return Object.defineProperty(De,"prototype",{writable:!1}),De}M.d(Le,{default:function(){return Be}});var I=ce((function De(){(function(Ae,Re){if(!(Ae instanceof Re))throw new TypeError("Cannot call a class as a function")})(this,De),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 _(De){var Ae,Re,_e=(De=De||{}).eventBus,Ye=De.dashMetrics,Ve=De.metricsConstants,Xe=De.events;function nt(Qt){var nn=new u;if(Re){for(var yn in Qt)Qt.hasOwnProperty(yn)&&(nn[yn]=Qt[yn]);nn.mpdurl||(nn.mpdurl=Re.originalUrl||Re.url),nn.terror||(nn.terror=new Date),Ye.addDVBErrors(nn)}}function Tt(Qt){Qt.error||(Re=Qt.manifest)}function mt(Qt){nt({errorcode:u.BASE_URL_CHANGED,servicelocation:Qt.entry})}function Ut(){nt({errorcode:u.BECAME_REPORTER})}function Mt(Qt){var nn;Qt.metric===Ve.HTTP_REQUEST&&((nn=Qt.value).responsecode===0||nn.responsecode==null||nn.responsecode>=400||nn.responsecode<100||nn.responsecode>=600)&&nt({errorcode:nn.responsecode||u.CONNECTION_ERROR,url:nn.url,terror:nn.tresponse,servicelocation:nn._serviceLocation})}function zt(Qt){var nn;switch(Qt.error?Qt.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}nt({errorcode:nn})}return Ae={initialize:function(){_e.on(Xe.MANIFEST_UPDATED,Tt,Ae),_e.on(Xe.SERVICE_LOCATION_BASE_URL_BLACKLIST_CHANGED,mt,Ae),_e.on(Xe.METRIC_ADDED,Mt,Ae),_e.on(Xe.METRIC_UPDATED,Mt,Ae),_e.on(Xe.PLAYBACK_ERROR,zt,Ae),_e.on(n.A.BECAME_REPORTING_PLAYER,Ut,Ae)},reset:function(){_e.off(Xe.MANIFEST_UPDATED,Tt,Ae),_e.off(Xe.SERVICE_LOCATION_BASE_URL_BLACKLIST_CHANGED,mt,Ae),_e.off(Xe.METRIC_ADDED,Mt,Ae),_e.off(Xe.METRIC_UPDATED,Mt,Ae),_e.off(Xe.PLAYBACK_ERROR,zt,Ae),_e.off(n.A.BECAME_REPORTING_PLAYER,Ut,Ae)}}}_.__dashjs_factory_name="DVBErrorsTranslator";var y=dashjs.FactoryMaker.getSingletonFactory(_),i=M(6877);function h(De){De=De||{};var Ae,Re,_e=!1,Ye=this.context,Ve=De.mediaElement;return Ae={initialize:function(Xe){Xe&&Xe.length&&(Xe.forEach((function(nt){var Tt=nt.starttime,mt=Tt+nt.duration;Re.add(Tt,mt)})),_e=!!Xe[0]._useWallClockTime)},reset:function(){Re.clear()},isEnabled:function(){var Xe,nt=Re.length;if(!nt)return!0;Xe=_e?new Date().getTime()/1e3:Ve.currentTime;for(var Tt=0;Tt<nt;Tt+=1){var mt=Re.start(Tt),Ut=Re.end(Tt);if(mt<=Xe&&Xe<Ut)return!0}return!1}},Re=(0,i.A)(Ye).create(),Ae}h.__dashjs_factory_name="RangeController";var g=dashjs.FactoryMaker.getClassFactory(h);function r(){return{serialise:function De(Ae){var Re,_e,Ye=[],Ve=[];for(Re in Ae)if(Ae.hasOwnProperty(Re)&&Re.indexOf("_")!==0){if((_e=Ae[Re])==null&&(_e=""),Array.isArray(_e)){if(!_e.length)continue;Ve=[],_e.forEach((function(Xe){var nt=Object.prototype.toString.call(Xe).slice(8,-1)!=="Object";Ve.push(nt?Xe:De(Xe))})),_e=Ve.map(encodeURIComponent).join(",")}else typeof _e=="string"?_e=encodeURIComponent(_e):_e instanceof Date?_e=_e.toISOString():typeof _e=="number"&&(_e=Math.round(_e));Ye.push(Re+"="+_e)}return Ye.join("&")}}}r.__dashjs_factory_name="MetricSerialiser";var m=dashjs.FactoryMaker.getSingletonFactory(r);function d(){var De,Ae,Re,_e=window.crypto||window.msCrypto,Ye=Uint32Array,Ve=Math.pow(2,8*Ye.BYTES_PER_ELEMENT)-1;function Xe(){_e&&(De||(De=new Ye(10)),_e.getRandomValues(De),Ae=0)}return Re={random:function(nt,Tt){var mt;return nt||(nt=0),Tt||(Tt=1),_e?(Ae===De.length&&Xe(),mt=De[Ae]/Ve,Ae+=1):mt=Math.random(),mt*(Tt-nt)+nt}},Xe(),Re}d.__dashjs_factory_name="RNG";var T=dashjs.FactoryMaker.getSingletonFactory(d),q=M(6890);function W(De){var Ae;De=De||{};var Re,_e,Ye,Ve,Xe,nt,Tt,mt=this.context,Ut=[],Mt=De.metricsConstants;function zt(){Ve=!1,Xe=!1,nt=null,Tt=null}return Ae={report:function(Qt,nn){Array.isArray(nn)||(nn=[nn]),Xe&&Tt.isEnabled()&&nn.forEach((function(yn){var xn=Re.serialise(yn);Qt!==Mt.DVB_ERRORS&&(xn="metricname=".concat(Qt,"&").concat(xn)),(function(Hn,An,Un){var Sn=new XMLHttpRequest;Sn.withCredentials=_e.getXHRWithCredentialsForType(Mt.HTTP_REQUEST_DVB_REPORTING_TYPE);var Gn=function(){var Vn=Ut.indexOf(Sn);Vn!==-1&&(Ut.splice(Vn,1),!(Sn.status>=200&&Sn.status<300)&&Un&&Un())};Ut.push(Sn);try{Sn.open("GET",Hn),Sn.onloadend=Gn,Sn.onerror=Gn,Sn.send()}catch{Sn.onerror()}})(xn="".concat(nt,"?").concat(xn),0,(function(){Xe=!1}))}))},initialize:function(Qt,nn){var yn;if(Tt=nn,!(nt=Qt.dvbReportingUrl))throw new Error("required parameter missing (dvb:reportingUrl)");Ve||((yn=Qt.dvbProbability)&&(yn===1e3||yn/1e3>=Ye.random())&&(Xe=!0),Ve=!0)},reset:function(){zt()}},Re=m(mt).getInstance(),Ye=T(mt).getInstance(),_e=(0,q.A)(mt).getInstance(),zt(),Ae}W.__dashjs_factory_name="DVBReporting";var x=dashjs.FactoryMaker.getClassFactory(W);function ne(De){De=De||{};var Ae,Re={"urn:dvb:dash:reporting:2014":x},_e=this.context,Ye=De.debug?De.debug.getLogger(Ae):{},Ve=De.metricsConstants,Xe=De.mediaPlayerModel||{};return{create:function(nt,Tt){var mt;try{(mt=Re[nt.schemeIdUri](_e).create({metricsConstants:Ve,mediaPlayerModel:Xe})).initialize(nt,Tt)}catch(Ut){mt=null,Ye.error("ReportingFactory: could not create Reporting with schemeIdUri ".concat(nt.schemeIdUri," (").concat(Ut.message,")"))}return mt},register:function(nt,Tt){Re[nt]=Tt},unregister:function(nt){delete Re[nt]}}}ne.__dashjs_factory_name="ReportingFactory";var O=dashjs.FactoryMaker.getSingletonFactory(ne);function J(De){var Ae=[],Re=O(this.context).getInstance(De);return{initialize:function(_e,Ye){_e.some((function(Ve){var Xe=Re.create(Ve,Ye);if(Xe)return Ae.push(Xe),!0}))},reset:function(){Ae.forEach((function(_e){return _e.reset()})),Ae=[]},report:function(_e,Ye){Ae.forEach((function(Ve){return Ve.report(_e,Ye)}))}}}J.__dashjs_factory_name="ReportingController";var pe=dashjs.FactoryMaker.getClassFactory(J);function G(){return{reconstructFullMetricName:function(De,Ae,Re){var _e=De;return Ae&&(_e+="("+Ae,Re&&Re.length&&(_e+=","+Re),_e+=")"),_e},validateN:function(De){if(!De)throw new Error("missing n");if(isNaN(De))throw new Error("n is NaN");if(De<0)throw new Error("n must be positive");return De}}}G.__dashjs_factory_name="HandlerHelpers";var X=dashjs.FactoryMaker.getSingletonFactory(G);function re(De){var Ae,Re,_e,Ye,Ve;De=De||{};var Xe=this.context,nt=X(Xe).getInstance(),Tt=[],mt=De.metricsConstants;function Ut(){var Mt=(function(){try{return Object.keys(Tt).map((function(zt){return Tt[zt]})).reduce((function(zt,Qt){return zt.level<Qt.level?zt:Qt}))}catch{return}})();Mt&&Ve!==Mt.t&&(Ve=Mt.t,Ae.report(_e,Mt))}return{initialize:function(Mt,zt,Qt){zt&&(Re=nt.validateN(Qt),Ae=zt,_e=nt.reconstructFullMetricName(Mt,Qt),Ye=setInterval(Ut,Re))},reset:function(){clearInterval(Ye),Ye=null,Re=0,Ae=null,Ve=null},handleNewMetric:function(Mt,zt,Qt){Mt===mt.BUFFER_LEVEL&&(Tt[Qt]=zt)}}}re.__dashjs_factory_name="BufferLevelHandler";var be=dashjs.FactoryMaker.getClassFactory(re),Ue=dashjs.FactoryMaker.getClassFactory((function(De){var Ae,Re=(De=De||{}).eventBus,_e=De.metricsConstants;function Ye(){Re.off(n.A.METRICS_INITIALISATION_COMPLETE,Ye,this),Re.trigger(n.A.BECAME_REPORTING_PLAYER)}return{initialize:function(Ve,Xe){Xe&&(Ae=Xe,Re.on(n.A.METRICS_INITIALISATION_COMPLETE,Ye,this))},reset:function(){Ae=null},handleNewMetric:function(Ve,Xe){Ve===_e.DVB_ERRORS&&Ae&&Ae.report(Ve,Xe)}}}));function me(De){var Ae,Re,_e,Ye,Ve;De=De||{};var Xe=[],nt=X(this.context).getInstance(),Tt=De.metricsConstants;function mt(){var Ut=Xe;Ut.length&&Ae&&Ae.report(Ye,Ut),Xe=[]}return{initialize:function(Ut,Mt,zt,Qt){Mt&&(Re=nt.validateN(zt),Ae=Mt,Qt&&Qt.length&&(_e=Qt),Ye=nt.reconstructFullMetricName(Ut,zt,Qt),Ve=setInterval(mt,Re))},reset:function(){clearInterval(Ve),Ve=null,Re=null,_e=null,Xe=[],Ae=null},handleNewMetric:function(Ut,Mt){Ut===Tt.HTTP_REQUEST&&(_e&&_e!==Mt.type||Xe.push(Mt))}}}me.__dashjs_factory_name="HttpListHandler";var le=dashjs.FactoryMaker.getClassFactory(me);function je(){var De,Ae;return{initialize:function(Re,_e){De=Re,Ae=_e},reset:function(){Ae=null,De=void 0},handleNewMetric:function(Re,_e){Re===De&&Ae&&Ae.report(De,_e)}}}je.__dashjs_factory_name="GenericMetricHandler";var Se=dashjs.FactoryMaker.getClassFactory(je);function Ne(De){var Ae,Re=(De=De||{}).debug?De.debug.getLogger(Ae):{},_e=/([a-zA-Z]*)(\(([0-9]*)(\,\s*([a-zA-Z]*))?\))?/,Ye=this.context,Ve={BufferLevel:be,DVBErrors:Ue,HttpList:le,PlayList:Se,RepSwitchList:Se,TcpList:Se};return{create:function(Xe,nt){var Tt,mt=Xe.match(_e);if(mt){try{(Tt=Ve[mt[1]](Ye).create({eventBus:De.eventBus,metricsConstants:De.metricsConstants})).initialize(mt[1],nt,mt[3],mt[5])}catch(Ut){Tt=null,Re.error("MetricsHandlerFactory: Could not create handler for type ".concat(mt[1]," with args ").concat(mt[3],", ").concat(mt[5]," (").concat(Ut.message,")"))}return Tt}},register:function(Xe,nt){Ve[Xe]=nt},unregister:function(Xe){delete Ve[Xe]}}}Ne.__dashjs_factory_name="MetricsHandlerFactory";var He=dashjs.FactoryMaker.getSingletonFactory(Ne);function it(De){De=De||{};var Ae,Re=[],_e=this.context,Ye=De.eventBus,Ve=De.events,Xe=He(_e).getInstance({debug:De.debug,eventBus:De.eventBus,metricsConstants:De.metricsConstants});function nt(Tt){Re.forEach((function(mt){mt.handleNewMetric(Tt.metric,Tt.value,Tt.mediaType)}))}return Ae={initialize:function(Tt,mt){Tt.split(",").forEach((function(Ut,Mt,zt){var Qt;if(Ut.indexOf("(")!==-1&&Ut.indexOf(")")===-1){var nn=zt[Mt+1];nn&&nn.indexOf("(")===-1&&nn.indexOf(")")!==-1&&(Ut+=","+nn,delete zt[Mt+1])}(Qt=Xe.create(Ut,mt))&&Re.push(Qt)})),Ye.on(Ve.METRIC_ADDED,nt,Ae),Ye.on(Ve.METRIC_UPDATED,nt,Ae)},reset:function(){Ye.off(Ve.METRIC_ADDED,nt,Ae),Ye.off(Ve.METRIC_UPDATED,nt,Ae),Re.forEach((function(Tt){return Tt.reset()})),Re=[]}}}it.__dashjs_factory_name="MetricsHandlersController";var Ie=dashjs.FactoryMaker.getClassFactory(it);function Oe(De){var Ae,Re,_e;De=De||{};var Ye=this.context;function Ve(){Ae&&Ae.reset(),Re&&Re.reset(),_e&&_e.reset()}return{initialize:function(Xe){try{(_e=g(Ye).create({mediaElement:De.mediaElement})).initialize(Xe.Range),(Re=pe(Ye).create({debug:De.debug,metricsConstants:De.metricsConstants,mediaPlayerModel:De.mediaPlayerModel})).initialize(Xe.Reporting,_e),(Ae=Ie(Ye).create({debug:De.debug,eventBus:De.eventBus,metricsConstants:De.metricsConstants,events:De.events})).initialize(Xe.metrics,Re)}catch(nt){throw Ve(),nt}},reset:Ve}}Oe.__dashjs_factory_name="MetricsController";var ft=dashjs.FactoryMaker.getClassFactory(Oe);function At(De,Ae,Re){return Object.defineProperty(De,"prototype",{writable:!1}),De}var Rt=At((function De(){(function(Ae,Re){if(!(Ae instanceof Re))throw new TypeError("Cannot call a class as a function")})(this,De),this.metrics="",this.Range=[],this.Reporting=[]}));function Pt(De,Ae,Re){return Object.defineProperty(De,"prototype",{writable:!1}),De}var ee=Pt((function De(){(function(Ae,Re){if(!(Ae instanceof Re))throw new TypeError("Cannot call a class as a function")})(this,De),this.starttime=0,this.duration=1/0,this._useWallClockTime=!1}));function ae(De,Ae,Re){return Object.defineProperty(De,"prototype",{writable:!1}),De}var qe=ae((function De(){(function(Ae,Re){if(!(Ae instanceof Re))throw new TypeError("Cannot call a class as a function")})(this,De),this.schemeIdUri="",this.value="",this.dvbReportingUrl="",this.dvbProbability=1e3}));function v(De){var Ae=(De=De||{}).adapter,Re=De.constants;return{getMetrics:function(_e){var Ye=[];return _e&&_e.Metrics_asArray&&_e.Metrics_asArray.forEach((function(Ve){var Xe=new Rt,nt=Ae.getIsDynamic(_e);Ve.hasOwnProperty("metrics")&&(Xe.metrics=Ve.metrics,Ve.Range_asArray&&Ve.Range_asArray.forEach((function(Tt){var mt=new ee;mt.starttime=(function(Ut,Mt,zt){var Qt,nn,yn=0;return Mt?yn=Ae.getAvailabilityStartTime(Ut)/1e3:(Qt=Ae.getRegularPeriods(Ut)).length&&(yn=Qt[0].start),nn=yn,zt&&zt.hasOwnProperty(Re.START_TIME)&&(nn+=zt.starttime),nn})(_e,nt,Tt),Tt.hasOwnProperty("duration")?mt.duration=Tt.duration:mt.duration=Ae.getDuration(_e),mt._useWallClockTime=nt,Xe.Range.push(mt)})),Ve.Reporting_asArray&&(Ve.Reporting_asArray.forEach((function(Tt){var mt=new qe;Tt.hasOwnProperty(Re.SCHEME_ID_URI)&&(mt.schemeIdUri=Tt.schemeIdUri,Tt.hasOwnProperty("value")&&(mt.value=Tt.value),Tt.hasOwnProperty(Re.DVB_REPORTING_URL)&&(mt.dvbReportingUrl=Tt[Re.DVB_REPORTING_URL]),Tt.hasOwnProperty(Re.DVB_PROBABILITY)&&(mt.dvbProbability=Tt[Re.DVB_PROBABILITY]),Xe.Reporting.push(mt))})),Ye.push(Xe)))})),Ye}}}v.__dashjs_factory_name="ManifestParsing";var A=dashjs.FactoryMaker.getSingletonFactory(v);function c(De){var Ae;De=De||{};var Re={},_e=this.context,Ye=De.eventBus,Ve=De.events;function Xe(Tt){if(!Tt.error){var mt=Object.keys(Re);A(_e).getInstance({adapter:De.adapter,constants:De.constants}).getMetrics(Tt.manifest).forEach((function(Ut){var Mt=JSON.stringify(Ut);if(Re.hasOwnProperty(Mt))mt.splice(Mt,1);else try{var zt=ft(_e).create(De);zt.initialize(Ut),Re[Mt]=zt}catch{}})),mt.forEach((function(Ut){Re[Ut].reset(),delete Re[Ut]})),Ye.trigger(n.A.METRICS_INITIALISATION_COMPLETE)}}function nt(){Object.keys(Re).forEach((function(Tt){Re[Tt].reset()})),Re={}}return Ae={reset:function(){Ye.off(Ve.MANIFEST_UPDATED,Xe,Ae),Ye.off(Ve.STREAM_TEARDOWN_COMPLETE,nt,Ae)}},Ye.on(Ve.MANIFEST_UPDATED,Xe,Ae),Ye.on(Ve.STREAM_TEARDOWN_COMPLETE,nt,Ae),Ae}c.__dashjs_factory_name="MetricsCollectionController";var E=dashjs.FactoryMaker.getClassFactory(c);function Q(){var De=this.context;return{createMetricsReporting:function(Ae){return y(De).getInstance({eventBus:Ae.eventBus,dashMetrics:Ae.dashMetrics,metricsConstants:Ae.metricsConstants,events:Ae.events}).initialize(),E(De).create(Ae)},getReportingFactory:function(){return O(De).getInstance()},getMetricsHandlerFactory:function(){return He(De).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 Be=D},7125:function(vt,Le,M){function ce(i){return ce=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},ce(i)}function I(i,h,g){return h=n(h),(function(r,m){if(m&&(ce(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));Le.A=y},6890:function(vt,Le,M){var ce=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,ne=(0,u.A)(x).getInstance();function O(){m=[],d=[],T=[],W=[],q=null,g=[]}function J(re,be){var Ue=-1;re.some((function(me,le){if(me===be)return Ue=le,!0})),Ue<0||re.splice(Ue,1)}function pe(re){var be;for(be=0;be<W.length;be++)if(W[be].rulename===re)return be;return-1}function G(re,be){X(re,be);var Ue=new ce.A;Ue.schemeIdUri=re,Ue.value=be,g.push(Ue)}function X(re,be){(0,n.sq)(re,"string"),(0,n.sq)(be,"string"),g.forEach((function(Ue,me){Ue.schemeIdUri===re&&Ue.value===be&&g.splice(me,1)}))}return h={getCustomInitialTrackSelectionFunction:function(){return q},setCustomInitialTrackSelectionFunction:function(re){q=re},resetCustomInitialTrackSelectionFunction:function(){q=null},getLicenseResponseFilters:function(){return d},getLicenseRequestFilters:function(){return m},getCustomCapabilitiesFilters:function(){return T},registerCustomCapabilitiesFilter:function(re){T.push(re)},registerLicenseResponseFilter:function(re){d.push(re)},registerLicenseRequestFilter:function(re){m.push(re)},unregisterCustomCapabilitiesFilter:function(re){J(T,re)},unregisterLicenseResponseFilter:function(re){J(d,re)},unregisterLicenseRequestFilter:function(re){J(m,re)},addAbrCustomRule:function(re,be,Ue){if(typeof re!="string"||re!==_.A.ABANDON_FRAGMENT_RULES&&re!==_.A.QUALITY_SWITCH_RULES||typeof be!="string")throw y.A.BAD_ARGUMENT_ERROR;var me=pe(be);me===-1?W.push({type:re,rulename:be,rule:Ue}):(W[me].type=re,W[me].rule=Ue)},removeAllAbrCustomRule:function(){W=[]},removeAbrCustomRule:function(re){if(re){var be=pe(re);be!==-1&&W.splice(be,1)}else W=[]},getAbrCustomRules:function(){return W},addUTCTimingSource:G,removeUTCTimingSource:X,getUTCTimingSources:function(){return g},clearDefaultUTCTimingSources:function(){g=[]},restoreDefaultUTCTimingSources:function(){var re=ne.get().streaming.utcSynchronization.defaultTimingSource;G(re.scheme,re.value)},setXHRWithCredentialsForType:function re(be,Ue){be?r[be]=!!Ue:Object.keys(r).forEach((function(me){re(me,Ue)}))},getXHRWithCredentialsForType:function(re){var be=r[re];return be===void 0?r.default:be},setConfig:function(){},reset:function(){O()}},r={default:!1},O(),h}i.__dashjs_factory_name="CustomParametersModel",Le.A=I.A.getSingletonFactory(i)},2930:function(vt,Le,M){var ce=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=ce.A.getClassFactory(u);Le.A=n},8496:function(vt,Le,M){function ce(ot){return ce=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(et){return typeof et}:function(et){return et&&typeof Symbol=="function"&&et.constructor===Symbol&&et!==Symbol.prototype?"symbol":typeof et},ce(ot)}function I(ot,et){for(var rt=0;rt<et.length;rt++){var we=et[rt];we.enumerable=we.enumerable||!1,we.configurable=!0,"value"in we&&(we.writable=!0),Object.defineProperty(ot,u(we.key),we)}}function u(ot){var et=(function(rt){if(ce(rt)!="object"||!rt)return rt;var we=rt[Symbol.toPrimitive];if(we!==void 0){var Je=we.call(rt,"string");if(ce(Je)!="object")return Je;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(rt)})(ot);return ce(et)=="symbol"?et:et+""}M.d(Le,{default:function(){return Tr}});var n={attributes:["Laurl","laurl"],prefixes:["clearkey","dashif"]},_=(function(){function ot(){(function(we,Je){if(!(we instanceof Je))throw new TypeError("Cannot call a class as a function")})(this,ot)}return et=ot,rt=[{key:"findCencContentProtection",value:function(we){for(var Je=null,bt=0;bt<we.length;++bt){var Et=we[bt];Et.schemeIdUri.toLowerCase()!=="urn:mpeg:dash:mp4protection:2011"||Et.value.toLowerCase()!=="cenc"&&Et.value.toLowerCase()!=="cbcs"||(Je=Et)}return Je}},{key:"getPSSHData",value:function(we){var Je=8,bt=new DataView(we),Et=bt.getUint8(Je);return Je+=20,Et>0&&(Je+=4+16*bt.getUint32(Je)),Je+=4,we.slice(Je)}},{key:"getPSSHForKeySystem",value:function(we,Je){var bt=ot.parsePSSHList(Je);return we&&bt.hasOwnProperty(we.uuid.toLowerCase())?bt[we.uuid.toLowerCase()]:null}},{key:"parseInitDataFromContentProtection",value:function(we,Je){return"pssh"in we?(we.pssh.__text=we.pssh.__text.replace(/\r?\n|\r/g,"").replace(/\s+/g,""),Je.decodeArray(we.pssh.__text).buffer):null}},{key:"parsePSSHList",value:function(we){if(we==null)return[];for(var Je=new DataView(we.buffer||we),bt={},Et=0;;){var Bt,xt,Xt=void 0,$t=Et;if(Et>=Je.buffer.byteLength)break;if(Bt=Et+Je.getUint32(Et),Et+=4,Je.getUint32(Et)===1886614376)if(Et+=4,(xt=Je.getUint8(Et))===0||xt===1){Et++,Et+=3,Xt="";var kt=void 0,_t=void 0;for(kt=0;kt<4;kt++)Xt+=(_t=Je.getUint8(Et+kt).toString(16)).length===1?"0"+_t:_t;for(Et+=4,Xt+="-",kt=0;kt<2;kt++)Xt+=(_t=Je.getUint8(Et+kt).toString(16)).length===1?"0"+_t:_t;for(Et+=2,Xt+="-",kt=0;kt<2;kt++)Xt+=(_t=Je.getUint8(Et+kt).toString(16)).length===1?"0"+_t:_t;for(Et+=2,Xt+="-",kt=0;kt<2;kt++)Xt+=(_t=Je.getUint8(Et+kt).toString(16)).length===1?"0"+_t:_t;for(Et+=2,Xt+="-",kt=0;kt<6;kt++)Xt+=(_t=Je.getUint8(Et+kt).toString(16)).length===1?"0"+_t:_t;Et+=6,Et+=4,bt[Xt=Xt.toLowerCase()]=Je.buffer.slice($t,Bt),Et=Bt}else Et=Bt;else Et=Bt}return bt}},{key:"getLicenseServerUrlFromMediaInfo",value:function(we,Je){try{if(!we||we.length===0)return null;for(var bt=0,Et=null;bt<we.length&&!Et;){var Bt=we[bt];if(Bt&&Bt.contentProtection&&Bt.contentProtection.length>0){var xt=Bt.contentProtection.filter((function(an){return an.schemeIdUri&&an.schemeIdUri===Je}));if(xt&&xt.length>0)for(var Xt=0;Xt<xt.length&&!Et;){for(var $t=xt[Xt],kt=0;kt<n.attributes.length&&!Et;){for(var _t=0,Wt=n.attributes[kt];_t<n.prefixes.length&&!Et;){var Ht=n.prefixes[_t];$t[Wt]&&$t[Wt].__prefix&&$t[Wt].__prefix===Ht&&$t[Wt].__text&&(Et=$t[Wt].__text),_t+=1}kt+=1}Xt+=1}}bt+=1}return Et}catch{return null}}}],rt&&I(et,rt),Object.defineProperty(et,"prototype",{writable:!1}),et;var et,rt})();function y(ot,et,rt){return Object.defineProperty(ot,"prototype",{writable:!1}),ot}var i=y((function ot(et,rt){(function(we,Je){if(!(we instanceof Je))throw new TypeError("Cannot call a class as a function")})(this,ot),this.contentType=et,this.robustness=rt}));function h(ot,et,rt){return Object.defineProperty(ot,"prototype",{writable:!1}),ot}var g=h((function ot(et,rt,we,Je,bt){(function(Et,Bt){if(!(Et instanceof Bt))throw new TypeError("Cannot call a class as a function")})(this,ot),this.initDataTypes=["cenc"],et&&et.length&&(this.audioCapabilities=et),rt&&rt.length&&(this.videoCapabilities=rt),this.distinctiveIdentifier=we,this.persistentState=Je,this.sessionTypes=bt}));function r(ot){return r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(et){return typeof et}:function(et){return et&&typeof Symbol=="function"&&et.constructor===Symbol&&et!==Symbol.prototype?"symbol":typeof et},r(ot)}function m(ot,et,rt){return et=T(et),(function(we,Je){if(Je&&(r(Je)=="object"||typeof Je=="function"))return Je;if(Je!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(bt){if(bt===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return bt})(we)})(ot,d()?Reflect.construct(et,[],T(ot).constructor):et.apply(ot,rt))}function d(){try{var ot=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(d=function(){return!!ot})()}function T(ot){return T=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(et){return et.__proto__||Object.getPrototypeOf(et)},T(ot)}function q(ot,et){return q=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(rt,we){return rt.__proto__=we,rt},q(ot,et)}var W=new((function(ot){function et(){var we;return(function(Je,bt){if(!(Je instanceof bt))throw new TypeError("Cannot call a class as a function")})(this,et),(we=m(this,et)).MEDIA_KEYERR_CODE=100,we.MEDIA_KEYERR_UNKNOWN_CODE=101,we.MEDIA_KEYERR_CLIENT_CODE=102,we.MEDIA_KEYERR_SERVICE_CODE=103,we.MEDIA_KEYERR_OUTPUT_CODE=104,we.MEDIA_KEYERR_HARDWARECHANGE_CODE=105,we.MEDIA_KEYERR_DOMAIN_CODE=106,we.MEDIA_KEY_MESSAGE_ERROR_CODE=107,we.MEDIA_KEY_MESSAGE_NO_CHALLENGE_ERROR_CODE=108,we.SERVER_CERTIFICATE_UPDATED_ERROR_CODE=109,we.KEY_STATUS_CHANGED_EXPIRED_ERROR_CODE=110,we.MEDIA_KEY_MESSAGE_NO_LICENSE_SERVER_URL_ERROR_CODE=111,we.KEY_SYSTEM_ACCESS_DENIED_ERROR_CODE=112,we.KEY_SESSION_CREATED_ERROR_CODE=113,we.MEDIA_KEY_MESSAGE_LICENSER_ERROR_CODE=114,we.MEDIA_KEYERR_UNKNOWN_MESSAGE="An unspecified error occurred. This value is used for errors that don't match any of the other codes.",we.MEDIA_KEYERR_CLIENT_MESSAGE="The Key System could not be installed or updated.",we.MEDIA_KEYERR_SERVICE_MESSAGE="The message passed into update indicated an error from the license service.",we.MEDIA_KEYERR_OUTPUT_MESSAGE="There is no available output device with the required characteristics for the content protection system.",we.MEDIA_KEYERR_HARDWARECHANGE_MESSAGE="A hardware configuration change caused a content protection error.",we.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.",we.MEDIA_KEY_MESSAGE_ERROR_MESSAGE="Multiple key sessions were creates with a user-agent that does not support sessionIDs!! Unpredictable behavior ahead!",we.MEDIA_KEY_MESSAGE_NO_CHALLENGE_ERROR_MESSAGE="DRM: Empty key message from CDM",we.SERVER_CERTIFICATE_UPDATED_ERROR_MESSAGE="Error updating server certificate -- ",we.KEY_STATUS_CHANGED_EXPIRED_ERROR_MESSAGE="DRM: KeyStatusChange error! -- License has expired",we.MEDIA_KEY_MESSAGE_NO_LICENSE_SERVER_URL_ERROR_MESSAGE="DRM: No license server URL specified!",we.KEY_SYSTEM_ACCESS_DENIED_ERROR_MESSAGE="DRM: KeySystem Access Denied! -- ",we.KEY_SESSION_CREATED_ERROR_MESSAGE="DRM: unable to create session! --",we.MEDIA_KEY_MESSAGE_LICENSER_ERROR_MESSAGE="DRM: licenser error! --",we}return(function(we,Je){if(typeof Je!="function"&&Je!==null)throw new TypeError("Super expression must either be null or a function");we.prototype=Object.create(Je&&Je.prototype,{constructor:{value:we,writable:!0,configurable:!0}}),Object.defineProperty(we,"prototype",{writable:!1}),Je&&q(we,Je)})(et,ot),rt=et,Object.defineProperty(rt,"prototype",{writable:!1}),rt;var rt})(M(1840).A)),x=M(8324);function ne(ot,et,rt){return Object.defineProperty(ot,"prototype",{writable:!1}),ot}var O=ne((function ot(et,rt,we,Je,bt,Et,Bt,xt){(function(Xt,$t){if(!(Xt instanceof $t))throw new TypeError("Cannot call a class as a function")})(this,ot),this.url=et,this.method=rt,this.responseType=we,this.headers=Je,this.withCredentials=bt,this.messageType=Et,this.sessionId=Bt,this.data=xt}));function J(ot,et,rt){return Object.defineProperty(ot,"prototype",{writable:!1}),ot}var pe=J((function ot(et,rt,we){(function(Je,bt){if(!(Je instanceof bt))throw new TypeError("Cannot call a class as a function")})(this,ot),this.url=et,this.headers=rt,this.data=we})),G=M(2756),X=M(1739),re=M(7256),be=M(5742);function Ue(ot){return Ue=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(et){return typeof et}:function(et){return et&&typeof Symbol=="function"&&et.constructor===Symbol&&et!==Symbol.prototype?"symbol":typeof et},Ue(ot)}function me(ot){var et,rt,we,Je,bt,Et,Bt,xt,Xt,$t,kt,_t=(ot=ot||{}).protectionKeyController,Wt=ot.protectionModel,Ht=ot.eventBus,an=ot.events,pn=ot.debug,vn=ot.BASE64,tn=ot.constants,St=[],It=ot.cmcdModel,Ft=ot.settings,rn=ot.customParametersModel;function un(){if(!(Ht&&Ht.hasOwnProperty("on")&&_t&&_t.hasOwnProperty("getSupportedKeySystemsFromContentProtection")))throw new Error("Missing config parameter(s)")}function _n(Lt,en){xt||Xt?xt&&Tn():(function(fn,Fn){if(!Xt){Xt=!0;var On,jn=[];fn=fn.sort((function(Mn,Rn){return(bt&&bt[Mn.ks.systemString]&&bt[Mn.ks.systemString].priority>=0?bt[Mn.ks.systemString].priority:fn.length)-(bt&&bt[Rn.ks.systemString]&&bt[Rn.ks.systemString].priority>=0?bt[Rn.ks.systemString].priority:fn.length)}));for(var bn=0;bn<fn.length;bn++){var Jn=br(fn[bn]);jn.push({ks:fn[bn].ks,configs:[Jn],protData:fn[bn].protData})}Wt.requestKeySystemAccess(jn).then((function(Mn){var Rn=(On=Mn.data).mksa&&On.mksa.selectedSystemString?On.mksa.selectedSystemString:On.keySystem.systemString;return rt.info("DRM: KeySystem Access Granted for system string ("+Rn+")! Selecting key system..."),Wt.selectKeySystem(On)})).then((function(Mn){if(xt=Mn,Xt=!1,Wt){Ht.trigger(an.KEY_SYSTEM_SELECTED,{data:On});var Rn=kn(xt);Rn&&Rn.serverCertificate&&Rn.serverCertificate.length>0&&Wt.setServerCertificate(vn.decodeArray(Rn.serverCertificate).buffer),Tn()}})).catch((function(Mn){xt=null,Xt=!1,Fn||Ht.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)})}))}})(Lt,en)}function Tn(){for(var Lt,en=0;en<we.length;en++)for(Lt=0;Lt<we[en].length;Lt++)if(xt===we[en][Lt].ks){Yn(we[en][Lt]);break}we=[]}function Yn(Lt){if(_t.isClearKey(xt)&&Lt.protData&&Lt.protData.hasOwnProperty("clearkeys")&&Object.keys(Lt.protData.clearkeys).length!==0){var en={kids:Object.keys(Lt.protData.clearkeys)};Lt.initData=new TextEncoder().encode(JSON.stringify(en))}Lt.sessionId?Kn(Lt):Lt.initData!==null&&In(Lt)}function Kn(Lt){un(),Wt.loadKeySession(Lt)}function In(Lt){var en=_.getPSSHForKeySystem(xt,Lt?Lt.initData:null);if(en){if((function(fn){if(!fn)return!1;try{for(var Fn=Wt.getSessions(),On=0;On<Fn.length;On++)if(Fn[On].getKeyId()===fn)return!0;return!1}catch{return!1}})(Lt.keyId)||Ln(en))return;try{Lt.initData=en,Wt.createKeySession(Lt)}catch(fn){Ht.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 Lt&&Lt.initData?Wt.createKeySession(Lt):Ht.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 "+(xt?xt.systemString:null)+". needkey/encrypted event contains no initData corresponding to that key system!")})}function kn(Lt){if(Lt){var en=Lt.systemString;if(bt)return en in bt?bt[en]:null}return null}function Ln(Lt){if(!Lt)return!1;try{for(var en=Wt.getAllInitData(),fn=0;fn<en.length;fn++)if(_t.initDataEquals(Lt,en[fn]))return rt.debug("DRM: Ignoring initData because we have already seen it!"),!0;return!1}catch{return!1}}function zn(Lt){un(),Lt?(Wt.setMediaElement(Lt),Ht.on(an.NEED_KEY,Qr,et)):Lt===null&&(Wt.setMediaElement(Lt),Ht.off(an.NEED_KEY,Qr,et))}function br(Lt){var en=Lt.protData,fn=[],Fn=[],On=en&&en.audioRobustness&&en.audioRobustness.length>0?en.audioRobustness:Bt,jn=en&&en.videoRobustness&&en.videoRobustness.length>0?en.videoRobustness:Bt,bn=Lt.sessionType,Jn=en&&en.distinctiveIdentifier?en.distinctiveIdentifier:"optional",Mn=en&&en.persistentState?en.persistentState:bn==="temporary"?"optional":"required";return Je.forEach((function(Rn){Rn.type===tn.AUDIO?fn.push(new i(Rn.codec,On)):Rn.type===tn.VIDEO&&Fn.push(new i(Rn.codec,jn))})),new g(fn,Fn,Jn,Mn,[bn])}function yr(Lt){Lt.error?Ht.trigger(an.KEY_STATUSES_CHANGED,{data:null,error:Lt.error}):rt.debug("DRM: key status = "+Lt.status)}function tr(Lt){rt.debug("DRM: onKeyMessage");var en=Lt.data;Ht.trigger(an.KEY_MESSAGE,{data:en});var fn=en.messageType?en.messageType:"license-request",Fn=en.message,On=en.sessionToken,jn=kn(xt),bn=_t.getLicenseServerModelInstance(xt,jn,fn),Jn={sessionToken:On,messageType:fn};if(Fn&&Fn.byteLength!==0){if(!bn)return rt.debug("DRM: License server request not required for this message (type = "+Lt.data.messageType+"). Session ID = "+On.getSessionId()),void Xn(Jn);if(_t.isClearKey(xt)){var Mn=_t.processClearKeyLicenseRequest(xt,jn,Fn);if(Mn&&Mn.keyPairs&&Mn.keyPairs.length>0)return rt.debug("DRM: ClearKey license request handled by application!"),Xn(Jn),void Wt.updateKeySession(On,Mn)}(function(Rn,rr,Qn){var nr=Rn.sessionToken,$n=Rn.messageType?Rn.messageType:"license-request",Er={sessionToken:nr,messageType:$n},lr=xt?xt.systemString:null,Ei=(function(Nn,_r,Fr,Ir,Hi){var or=null,Vi=Ir.message;if(Nn&&Nn.serverURL){var cr=Nn.serverURL;typeof cr=="string"&&cr!==""?or=cr:Ue(cr)==="object"&&cr.hasOwnProperty(_r)&&(or=cr[_r])}else if(Nn&&Nn.laURL&&Nn.laURL!=="")or=Nn.laURL;else if(!(or=_.getLicenseServerUrlFromMediaInfo(Je,xt.schemeIdURI))&&!_t.isClearKey(xt)){var ni=_.getPSSHData(Fr.initData);(or=xt.getLicenseServerURLFromInitData(ni))||(or=Ir.laURL)}return or=Hi.getServerURLFromMessage(or,Vi,_r)})(Qn,$n,nr,Rn,rr);if(Ei){var Sr={},$r=!1;Qn&&Wr(Sr,Qn.httpRequestHeaders);var Jr=Rn.message;Wr(Sr,xt.getRequestHeadersFromMessage(Jr)),Object.keys(Sr).forEach((function(Nn){Nn.toLowerCase()==="authorization"&&($r=!0)})),Qn&&typeof Qn.withCredentials=="boolean"&&($r=Qn.withCredentials);var ki=function(Nn){if(Wt)if(Nn.status>=200&&Nn.status<=299){var _r=X.A.parseHttpHeaders(Nn.getAllResponseHeaders?Nn.getAllResponseHeaders():null),Fr=new pe(Nn.responseURL,_r,Nn.response);Xr(rn.getLicenseResponseFilters(),Fr).then((function(){var Ir=rr.getLicenseMessage(Fr.data,lr,$n);Ir!==null?(Xn(Er),Wt.updateKeySession(nr,Ir)):zr(Nn,Er,lr,$n,rr)}))}else zr(Nn,Er,lr,$n,rr)},Gi=function(Nn){Xn(Er,new x.A(W.MEDIA_KEY_MESSAGE_LICENSER_ERROR_CODE,W.MEDIA_KEY_MESSAGE_LICENSER_ERROR_MESSAGE+lr+' update, XHR aborted. status is "'+Nn.statusText+'" ('+Nn.status+"), readyState is "+Nn.readyState))},ji=function(Nn){Xn(Er,new x.A(W.MEDIA_KEY_MESSAGE_LICENSER_ERROR_CODE,W.MEDIA_KEY_MESSAGE_LICENSER_ERROR_MESSAGE+lr+' update, XHR error. status is "'+Nn.statusText+'" ('+Nn.status+"), readyState is "+Nn.readyState))},qi=xt.getLicenseRequestFromMessage(Jr),_i=rr.getHTTPMethod($n),Ai=rr.getResponseType(lr,$n),Yi=Qn&&!isNaN(Qn.httpTimeout)?Qn.httpTimeout:8e3,Zr=nr.getSessionId()||null,ei=new O(Ei,_i,Ai,Sr,$r,$n,Zr,qi),ti=isNaN(Ft.get().streaming.retryAttempts[G.G.LICENSE])?3:Ft.get().streaming.retryAttempts[G.G.LICENSE];Xr(rn.getLicenseRequestFilters(),ei).then((function(){mi(ei,ti,Yi,ki,Gi,ji)}))}else Xn(Er,new x.A(W.MEDIA_KEY_MESSAGE_NO_LICENSE_SERVER_URL_ERROR_CODE,W.MEDIA_KEY_MESSAGE_NO_LICENSE_SERVER_URL_ERROR_MESSAGE))})(en,bn,jn)}else Xn(Jn,new x.A(W.MEDIA_KEY_MESSAGE_NO_CHALLENGE_ERROR_CODE,W.MEDIA_KEY_MESSAGE_NO_CHALLENGE_ERROR_MESSAGE))}function Xn(Lt,en){Ht.trigger(an.LICENSE_REQUEST_COMPLETE,{data:Lt,error:en})}function mi(Lt,en,fn,Fn,On,jn){var bn=new XMLHttpRequest;if(Ft.get().streaming.cmcd&&Ft.get().streaming.cmcd.enabled&&Ft.get().streaming.cmcd.mode===re.A.CMCD_MODE_QUERY){var Jn=It.getQueryParameter({url:Lt.url,type:G.G.LICENSE});Jn&&(Lt.url=X.A.addAditionalQueryParameterToUrl(Lt.url,[Jn]))}for(var Mn in bn.open(Lt.method,Lt.url,!0),bn.responseType=Lt.responseType,bn.withCredentials=Lt.withCredentials,fn>0&&(bn.timeout=fn),Lt.headers)bn.setRequestHeader(Mn,Lt.headers[Mn]);if(Ft.get().streaming.cmcd&&Ft.get().streaming.cmcd.enabled&&Ft.get().streaming.cmcd.mode===re.A.CMCD_MODE_HEADER){var Rn=It.getHeaderParameters({url:Lt.url,type:G.G.LICENSE});if(Rn)for(var rr in Rn){var Qn=Rn[rr];Qn&&bn.setRequestHeader(rr,Qn)}}var nr=function(){en--;var $n=isNaN(Ft.get().streaming.retryIntervals[G.G.LICENSE])?1e3:Ft.get().streaming.retryIntervals[G.G.LICENSE];kt=setTimeout((function(){mi(Lt,en,fn,Fn,On,jn)}),$n)};bn.onload=function(){$t=null,this.status>=200&&this.status<=299||en<=0?Fn(this):(rt.warn("License request failed ("+this.status+"). Retrying it... Pending retries: "+en),nr())},bn.ontimeout=bn.onerror=function(){$t=null,en<=0?jn(this):(rt.warn("License request network request failed . Retrying it... Pending retries: "+en),nr())},bn.onabort=function(){On(this)},Ht.trigger(an.LICENSE_REQUEST_SENDING,{url:Lt.url,headers:Lt.headers,payload:Lt.data,sessionId:Lt.sessionId}),$t=bn,bn.send(Lt.data)}function yi(){$t&&($t.onloadend=$t.onerror=$t.onprogress=void 0,$t.abort(),$t=null),kt&&(clearTimeout(kt),kt=null)}function Wr(Lt,en){if(en)for(var fn in en)Lt[fn]=en[fn]}function zr(Lt,en,fn,Fn,On){var jn="NONE",bn=null;Lt.response&&(jn=On.getErrorResponse(Lt.response,fn,Fn),bn={serverResponse:Lt.response||null,responseCode:Lt.status||null,responseText:Lt.statusText||null}),Xn(en,new x.A(W.MEDIA_KEY_MESSAGE_LICENSER_ERROR_CODE,W.MEDIA_KEY_MESSAGE_LICENSER_ERROR_MESSAGE+fn+' update, XHR complete. status is "'+Lt.statusText+'" ('+Lt.status+"), readyState is "+Lt.readyState+". Response is "+jn,bn))}function Xr(Lt,en){return Lt?Lt.reduce((function(fn,Fn){return fn.then((function(){return Fn(en)}))}),Promise.resolve()):Promise.resolve()}function Qr(Lt,en){if(!Ft.get().streaming.protection.ignoreEmeEncryptedEvent){if(rt.debug("DRM: onNeedKey"),Lt.key.initDataType!=="cenc")return void rt.warn("DRM: Only 'cenc' initData is supported! Ignoring initData of type: "+Lt.key.initDataType);if(Je.length===0&&(rt.warn("DRM: onNeedKey called before initializeForMedia, wait until initialized"),(en=en===void 0?1:en+1)<5))return void St.push(setTimeout((function(){Qr(Lt,en)}),500));var fn=Lt.key.initData;if(ArrayBuffer.isView(fn)&&(fn=fn.buffer),xt){var Fn=_.getPSSHForKeySystem(xt,fn);if(Fn&&Ln(Fn))return}rt.debug("DRM: initData:",String.fromCharCode.apply(null,new Uint8Array(fn)));var On=_t.getSupportedKeySystemsFromSegmentPssh(fn,bt,Et);if(On.length===0)return void rt.debug("DRM: Received needkey event with initData, but we don't support any of the key systems!");(function(jn){we.push(jn),_n(jn,!1)})(On)}}return et={initializeForMedia:function(Lt){if(!Lt)throw new Error("mediaInfo can not be null or undefined");un(),Je.push(Lt)},clearMediaInfoArray:function(){Je=[]},handleKeySystemFromManifest:function(){if(Je&&Je.length!==0){var Lt=[];Je.forEach((function(en){var fn=_t.getSupportedKeySystemsFromContentProtection(en.contentProtection,bt,Et);fn.length>0&&(Lt.length===0&&(Lt=fn),we.push(fn))})),Lt&&Lt.length>0&&_n(Lt,!0)}},createKeySession:In,loadKeySession:Kn,removeKeySession:function(Lt){un(),Wt.removeKeySession(Lt)},closeKeySession:function(Lt){un(),Wt.closeKeySession(Lt)},setServerCertificate:function(Lt){un(),Wt.setServerCertificate(Lt)},setMediaElement:zn,setSessionType:function(Lt){Et=Lt},setRobustnessLevel:function(Lt){Bt=Lt},setProtectionData:function(Lt){bt=Lt,_t.setProtectionData(Lt)},getSupportedKeySystemsFromContentProtection:function(Lt){return un(),_t.getSupportedKeySystemsFromContentProtection(Lt,bt,Et)},getKeySystems:function(){return _t?_t.getKeySystems():[]},setKeySystems:function(Lt){_t&&_t.setKeySystems(Lt)},stop:function(){yi(),Wt&&Wt.stop()},reset:function(){Ht.off(an.INTERNAL_KEY_MESSAGE,tr,et),Ht.off(an.INTERNAL_KEY_STATUS_CHANGED,yr,et),un(),yi(),zn(null),xt=null,Xt=!1,Wt&&(Wt.reset(),Wt=null),St.forEach((function(Lt){return clearTimeout(Lt)})),St=[],Je=[],we=[]}},rt=pn.getLogger(et),we=[],Je=[],Et="temporary",Bt="",$t=null,kt=null,Ht.on(an.INTERNAL_KEY_MESSAGE,tr,et),Ht.on(an.INTERNAL_KEY_STATUS_CHANGED,yr,et),et}me.__dashjs_factory_name="ProtectionController";var le=be.A.getClassFactory(me);function je(ot,et,rt){return Object.defineProperty(ot,"prototype",{writable:!1}),ot}var Se=je((function ot(et,rt){(function(we,Je){if(!(we instanceof Je))throw new TypeError("Cannot call a class as a function")})(this,ot),this.keyID=et,this.key=rt}));function Ne(ot){return Ne=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(et){return typeof et}:function(et){return et&&typeof Symbol=="function"&&et.constructor===Symbol&&et!==Symbol.prototype?"symbol":typeof et},Ne(ot)}function He(ot,et){for(var rt=0;rt<et.length;rt++){var we=et[rt];we.enumerable=we.enumerable||!1,we.configurable=!0,"value"in we&&(we.writable=!0),Object.defineProperty(ot,it(we.key),we)}}function it(ot){var et=(function(rt){if(Ne(rt)!="object"||!rt)return rt;var we=rt[Symbol.toPrimitive];if(we!==void 0){var Je=we.call(rt,"string");if(Ne(Je)!="object")return Je;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(rt)})(ot);return Ne(et)=="symbol"?et:et+""}var Ie=(function(){return ot=function rt(we,Je){if((function(bt,Et){if(!(bt instanceof Et))throw new TypeError("Cannot call a class as a function")})(this,rt),Je&&Je!=="persistent"&&Je!=="temporary")throw new Error("Invalid ClearKey key set type! Must be one of 'persistent' or 'temporary'");this.keyPairs=we,this.type=Je},(et=[{key:"toJWK",value:function(){var rt,we=this.keyPairs.length,Je={keys:[]};for(rt=0;rt<we;rt++){var bt={kty:"oct",alg:"A128KW",kid:this.keyPairs[rt].keyID,k:this.keyPairs[rt].key};Je.keys.push(bt)}this.type&&(Je.type=this.type);var Et=JSON.stringify(Je),Bt=Et.length,xt=new ArrayBuffer(Bt),Xt=new Uint8Array(xt);for(rt=0;rt<Bt;rt++)Xt[rt]=Et.charCodeAt(rt);return xt}}])&&He(ot.prototype,et),Object.defineProperty(ot,"prototype",{writable:!1}),ot;var ot,et})();function Oe(ot){return Oe=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(et){return typeof et}:function(et){return et&&typeof Symbol=="function"&&et.constructor===Symbol&&et!==Symbol.prototype?"symbol":typeof et},Oe(ot)}function ft(ot,et){for(var rt=0;rt<et.length;rt++){var we=et[rt];we.enumerable=we.enumerable||!1,we.configurable=!0,"value"in we&&(we.writable=!0),Object.defineProperty(ot,At(we.key),we)}}function At(ot){var et=(function(rt){if(Oe(rt)!="object"||!rt)return rt;var we=rt[Symbol.toPrimitive];if(we!==void 0){var Je=we.call(rt,"string");if(Oe(Je)!="object")return Je;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(rt)})(ot);return Oe(et)=="symbol"?et:et+""}var Rt=new((function(){return ot=function rt(){(function(we,Je){if(!(we instanceof Je))throw new TypeError("Cannot call a class as a function")})(this,rt),this.init()},(et=[{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"}}])&&ft(ot.prototype,et),Object.defineProperty(ot,"prototype",{writable:!1}),ot;var ot,et})()),Pt="e2719d58-a985-b3c9-781a-b030af78d30e",ee=Rt.CLEARKEY_KEYSTEM_STRING,ae="urn:uuid:"+Pt;function qe(ot){var et=(ot=ot||{}).BASE64;return{uuid:Pt,schemeIdURI:ae,systemString:ee,getInitData:function(rt,we){try{var Je=_.parseInitDataFromContentProtection(rt,et);if(!Je&&we){var bt={kids:[(function(Et){try{var Bt=Et.replace(/-/g,"");return(Bt=btoa(Bt.match(/\w{2}/g).map((function(xt){return String.fromCharCode(parseInt(xt,16))})).join(""))).replace(/=/g,"").replace(/\//g,"_").replace(/\+/g,"-")}catch{return null}})(we["cenc:default_KID"])]};Je=new TextEncoder().encode(JSON.stringify(bt))}return Je}catch{return null}},getRequestHeadersFromMessage:function(){return{"Content-Type":"application/json"}},getLicenseRequestFromMessage:function(rt){return JSON.stringify(JSON.parse(String.fromCharCode.apply(null,new Uint8Array(rt))))},getLicenseServerURLFromInitData:function(){return null},getCDMData:function(){return null},getClearKeysFromProtectionData:function(rt,we){var Je=null;if(rt){for(var bt=JSON.parse(String.fromCharCode.apply(null,new Uint8Array(we))),Et=[],Bt=0;Bt<bt.kids.length;Bt++){var xt=bt.kids[Bt],Xt=rt.clearkeys&&rt.clearkeys.hasOwnProperty(xt)?rt.clearkeys[xt]:null;if(!Xt)throw new Error("DRM: ClearKey keyID ("+xt+") is not known!");Et.push(new Se(xt,Xt))}Je=new Ie(Et)}return Je}}}qe.__dashjs_factory_name="KeySystemClearKey";var v=dashjs.FactoryMaker.getSingletonFactory(qe),A="1077efec-c0b2-4d02-ace3-3c1e52e2fb4b",c=Rt.CLEARKEY_KEYSTEM_STRING,E="urn:uuid:"+A;function Q(ot){var et,rt=ot.BASE64,we=ot.debug.getLogger(et);return{uuid:A,schemeIdURI:E,systemString:c,getInitData:function(Je){return _.parseInitDataFromContentProtection(Je,rt)},getRequestHeadersFromMessage:function(){return null},getLicenseRequestFromMessage:function(Je){return new Uint8Array(Je)},getLicenseServerURLFromInitData:function(){return null},getCDMData:function(){return null},getClearKeysFromProtectionData:function(Je,bt){var Et=null;if(Je){for(var Bt=JSON.parse(String.fromCharCode.apply(null,new Uint8Array(bt))),xt=[],Xt=0;Xt<Bt.kids.length;Xt++){var $t=Bt.kids[Xt],kt=Je.clearkeys&&Je.clearkeys.hasOwnProperty($t)?Je.clearkeys[$t]:null;if(!kt)throw new Error("DRM: ClearKey keyID ("+$t+") is not known!");xt.push(new Se($t,kt))}Et=new Ie(xt),we.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 Et}}}Q.__dashjs_factory_name="KeySystemW3CClearKey";var D=dashjs.FactoryMaker.getSingletonFactory(Q),Be="edef8ba9-79d6-4ace-a3c8-27dcd51d21ed",De=Rt.WIDEVINE_KEYSTEM_STRING,Ae="urn:uuid:"+Be;function Re(ot){var et=(ot=ot||{}).BASE64;return{uuid:Be,schemeIdURI:Ae,systemString:De,getInitData:function(rt){return _.parseInitDataFromContentProtection(rt,et)},getRequestHeadersFromMessage:function(){return null},getLicenseRequestFromMessage:function(rt){return new Uint8Array(rt)},getLicenseServerURLFromInitData:function(){return null},getCDMData:function(){return null}}}Re.__dashjs_factory_name="KeySystemWidevine";var _e=dashjs.FactoryMaker.getSingletonFactory(Re),Ye="9a04f079-9840-4286-ab92-e65be0885f95",Ve=Rt.PLAYREADY_KEYSTEM_STRING,Xe="urn:uuid:"+Ye;function nt(ot){var et="utf-16",rt=(ot=ot||{}).BASE64,we=ot.settings;function Je(){if(!rt||!rt.hasOwnProperty("decodeArray")||!rt.hasOwnProperty("decodeArray"))throw new Error("Missing config parameter(s)")}return{uuid:Ye,schemeIdURI:Xe,systemString:Ve,getInitData:function(bt){var Et,Bt,xt,Xt,$t,kt=new Uint8Array([112,115,115,104,0,0,0,0]),_t=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]),Wt=0,Ht=null;if(Je(),!bt)return null;if("pssh"in bt)return _.parseInitDataFromContentProtection(bt,rt);if("pro"in bt)Ht=rt.decodeArray(bt.pro.__text);else{if(!("prheader"in bt))return null;Ht=rt.decodeArray(bt.prheader.__text)}return Et=Ht.length,Bt=4+kt.length+_t.length+4+Et,xt=new ArrayBuffer(Bt),Xt=new Uint8Array(xt),($t=new DataView(xt)).setUint32(Wt,Bt),Wt+=4,Xt.set(kt,Wt),Wt+=kt.length,Xt.set(_t,Wt),Wt+=_t.length,$t.setUint32(Wt,Et),Wt+=4,Xt.set(Ht,Wt),Wt+=Et,Xt.buffer},getRequestHeadersFromMessage:function(bt){var Et,Bt,xt={},Xt=new DOMParser;if(we&&we.get().streaming.protection.detectPlayreadyMessageFormat&&et==="utf-16"&&bt&&bt.byteLength%2==1)return xt["Content-Type"]="text/xml; charset=utf-8",xt;var $t=et==="utf-16"?new Uint16Array(bt):new Uint8Array(bt);Et=String.fromCharCode.apply(null,$t);for(var kt=(Bt=Xt.parseFromString(Et,"application/xml")).getElementsByTagName("name"),_t=Bt.getElementsByTagName("value"),Wt=0;Wt<kt.length;Wt++)xt[kt[Wt].childNodes[0].nodeValue]=_t[Wt].childNodes[0].nodeValue;return xt.hasOwnProperty("Content")&&(xt["Content-Type"]=xt.Content,delete xt.Content),xt.hasOwnProperty("Content-Type")||(xt["Content-Type"]="text/xml; charset=utf-8"),xt},getLicenseRequestFromMessage:function(bt){var Et=null,Bt=new DOMParser;if(we&&we.get().streaming.protection.detectPlayreadyMessageFormat&&et==="utf-16"&&bt&&bt.byteLength%2==1)return bt;var xt=et==="utf-16"?new Uint16Array(bt):new Uint8Array(bt);Je();var Xt=String.fromCharCode.apply(null,xt),$t=Bt.parseFromString(Xt,"application/xml");if(!$t.getElementsByTagName("PlayReadyKeyMessage")[0])return bt;var kt=$t.getElementsByTagName("Challenge")[0].childNodes[0].nodeValue;return kt&&(Et=rt.decode(kt)),Et},getLicenseServerURLFromInitData:function(bt){if(bt)for(var Et=new DataView(bt),Bt=Et.getUint16(4,!0),xt=6,Xt=new DOMParser,$t=0;$t<Bt;$t++){var kt=Et.getUint16(xt,!0);xt+=2;var _t=Et.getUint16(xt,!0);if(xt+=2,kt===1){var Wt=bt.slice(xt,xt+_t),Ht=String.fromCharCode.apply(null,new Uint16Array(Wt)),an=Xt.parseFromString(Ht,"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 xt+=_t}return null},getCDMData:function(bt){var Et,Bt,xt,Xt;if(Je(),!bt)return null;for(Et=[],Xt=0;Xt<bt.length;++Xt)Et.push(bt.charCodeAt(Xt)),Et.push(0);for(Et=String.fromCharCode.apply(null,Et),Et=rt.encode(Et),Bt='<PlayReadyCDMData type="LicenseAcquisition"><LicenseAcquisition version="1.0" Proactive="false"><CustomData encoding="base64encoded">%CUSTOMDATA%</CustomData></LicenseAcquisition></PlayReadyCDMData>'.replace("%CUSTOMDATA%",Et),xt=[],Xt=0;Xt<Bt.length;++Xt)xt.push(Bt.charCodeAt(Xt)),xt.push(0);return new Uint8Array(xt).buffer},setPlayReadyMessageFormat:function(bt){if(bt!=="utf-8"&&bt!=="utf-16")throw new Error('Specified message format is not one of "utf-8" or "utf-16"');et=bt}}}nt.__dashjs_factory_name="KeySystemPlayReady";var Tt=dashjs.FactoryMaker.getSingletonFactory(nt);function mt(ot){var et=(ot=ot||{}).BASE64,rt={};return rt[Rt.WIDEVINE_KEYSTEM_STRING]={responseType:"json",getLicenseMessage:function(we){return et.decodeArray(we.license)},getErrorResponse:function(we){return we}},rt[Rt.PLAYREADY_KEYSTEM_STRING]={responseType:"arraybuffer",getLicenseMessage:function(we){return we},getErrorResponse:function(we){return String.fromCharCode.apply(null,new Uint8Array(we))}},{getServerURLFromMessage:function(we){return we},getHTTPMethod:function(){return"POST"},getResponseType:function(we){return rt[we].responseType},getLicenseMessage:function(we,Je){return(function(){if(!et||!et.hasOwnProperty("decodeArray"))throw new Error("Missing config parameter(s)")})(),rt[Je].getLicenseMessage(we)},getErrorResponse:function(we,Je){return rt[Je].getErrorResponse(we)}}}mt.__dashjs_factory_name="DRMToday";var Ut=dashjs.FactoryMaker.getSingletonFactory(mt);function Mt(){var ot="http://schemas.xmlsoap.org/soap/envelope/";function et(Je){var bt=String.fromCharCode.apply(null,new Uint8Array(Je));return decodeURIComponent(escape(bt))}function rt(Je){if(window.DOMParser){var bt=et(Je),Et=new window.DOMParser().parseFromString(bt,"text/xml"),Bt=Et?Et.getElementsByTagNameNS(ot,"Envelope")[0]:null,xt=Bt?Bt.getElementsByTagNameNS(ot,"Body")[0]:null;if(xt&&xt.getElementsByTagNameNS(ot,"Fault")[0])return null}return Je}function we(Je){var bt="",Et="",Bt="",xt=-1,Xt=-1;if(window.DOMParser){var $t=et(Je),kt=new window.DOMParser().parseFromString($t,"text/xml"),_t=kt?kt.getElementsByTagNameNS(ot,"Envelope")[0]:null,Wt=_t?_t.getElementsByTagNameNS(ot,"Body")[0]:null,Ht=Wt?Wt.getElementsByTagNameNS(ot,"Fault")[0]:null,an=Ht?Ht.getElementsByTagName("detail")[0]:null,pn=an?an.getElementsByTagName("Exception")[0]:null,vn=null;if(Ht===null)return $t;bt=(vn=Ht.getElementsByTagName("faultstring")[0].firstChild)?vn.nodeValue:null,pn!==null&&(Et=(vn=pn.getElementsByTagName("StatusCode")[0])?vn.firstChild.nodeValue:null,xt=(Bt=(vn=pn.getElementsByTagName("Message")[0])?vn.firstChild.nodeValue:null)?Bt.lastIndexOf("[")+1:-1,Xt=Bt?Bt.indexOf("]"):-1,Bt=Bt?Bt.substring(xt,Xt):"")}var tn="code: ".concat(Et,", name: ").concat(bt);return Bt&&(tn+=", message: ".concat(Bt)),tn}return{getServerURLFromMessage:function(Je){return Je},getHTTPMethod:function(){return"POST"},getResponseType:function(){return"arraybuffer"},getLicenseMessage:function(Je){return rt.call(this,Je)},getErrorResponse:function(Je){return we.call(this,Je)}}}Mt.__dashjs_factory_name="PlayReady";var zt=be.A.getSingletonFactory(Mt);function Qt(){return{getServerURLFromMessage:function(ot){return ot},getHTTPMethod:function(){return"POST"},getResponseType:function(){return"arraybuffer"},getLicenseMessage:function(ot){return ot},getErrorResponse:function(ot){return String.fromCharCode.apply(null,new Uint8Array(ot))}}}Qt.__dashjs_factory_name="Widevine";var nn=dashjs.FactoryMaker.getSingletonFactory(Qt);function yn(){return{getServerURLFromMessage:function(ot){return ot},getHTTPMethod:function(){return"POST"},getResponseType:function(){return"json"},getLicenseMessage:function(ot){if(!ot.hasOwnProperty("keys"))return null;for(var et=[],rt=0;rt<ot.keys.length;rt++){var we=ot.keys[rt],Je=we.kid.replace(/=/g,""),bt=we.k.replace(/=/g,"");et.push(new Se(Je,bt))}return new Ie(et)},getErrorResponse:function(ot){return String.fromCharCode.apply(null,new Uint8Array(ot))}}}yn.__dashjs_factory_name="ClearKey";var xn=dashjs.FactoryMaker.getSingletonFactory(yn);function Hn(){var ot,et,rt,we,Je,bt,Et,Bt,xt=this.context;function Xt(_t,Wt){return Wt&&_t in Wt?Wt[_t]:null}function $t(_t,Wt){return _t&&_t.sessionId?_t.sessionId:Wt&&Wt.sessionId?Wt.sessionId:null}function kt(_t,Wt){return _t&&_t.sessionType?_t.sessionType:Wt}return ot={initialize:function(){var _t;we=[],_t=Tt(xt).getInstance({BASE64:Je,settings:bt}),we.push(_t),_t=_e(xt).getInstance({BASE64:Je}),we.push(_t),_t=v(xt).getInstance({BASE64:Je}),we.push(_t),Et=_t,_t=D(xt).getInstance({BASE64:Je,debug:et}),we.push(_t),Bt=_t},setProtectionData:function(_t){for(var Wt,Ht,an=0;an<we.length;an++){var pn=we[an];pn.hasOwnProperty("init")&&pn.init((Wt=pn.systemString,Ht=void 0,Ht=null,_t&&(Ht=Wt in _t?_t[Wt]:null),Ht))}},isClearKey:function(_t){return _t===Et||_t===Bt},initDataEquals:function(_t,Wt){if(_t.byteLength===Wt.byteLength){for(var Ht=new Uint8Array(_t),an=new Uint8Array(Wt),pn=0;pn<Ht.length;pn++)if(Ht[pn]!==an[pn])return!1;return!0}return!1},getKeySystems:function(){return we},setKeySystems:function(_t){we=_t},getKeySystemBySystemString:function(_t){for(var Wt=0;Wt<we.length;Wt++)if(we[Wt].systemString===_t)return we[Wt];return null},getSupportedKeySystemsFromContentProtection:function(_t,Wt,Ht){var an,pn,vn,tn,St=[];if(_t){var It=_.findCencContentProtection(_t);for(vn=0;vn<we.length;++vn){var Ft=Xt((pn=we[vn]).systemString,Wt);for(tn=0;tn<_t.length;++tn)if((an=_t[tn]).schemeIdUri.toLowerCase()===pn.schemeIdURI){var rn=pn.getInitData(an,It);St.push({ks:we[vn],keyId:an.keyId,initData:rn,protData:Ft,cdmData:pn.getCDMData(Ft?Ft.cdmData:null),sessionId:$t(Ft,an),sessionType:kt(Ft,Ht)})}}}return St},getSupportedKeySystemsFromSegmentPssh:function(_t,Wt,Ht){for(var an,pn=[],vn=_.parsePSSHList(_t),tn=0;tn<we.length;++tn){var St=Xt((an=we[tn]).systemString,Wt);an.uuid in vn&&pn.push({ks:an,initData:vn[an.uuid],protData:St,cdmData:an.getCDMData(St?St.cdmData:null),sessionId:$t(St),sessionType:kt(St,Ht)})}return pn},getLicenseServerModelInstance:function(_t,Wt,Ht){if(Ht==="license-release"||Ht==="individualization-request")return null;var an=null;return Wt&&Wt.hasOwnProperty("drmtoday")?an=Ut(xt).getInstance({BASE64:Je}):_t.systemString===Rt.WIDEVINE_KEYSTEM_STRING?an=nn(xt).getInstance():_t.systemString===Rt.PLAYREADY_KEYSTEM_STRING?an=zt(xt).getInstance():_t.systemString===Rt.CLEARKEY_KEYSTEM_STRING&&(an=xn(xt).getInstance()),an},processClearKeyLicenseRequest:function(_t,Wt,Ht){try{return _t.getClearKeysFromProtectionData(Wt,Ht)}catch{return rt.error("Failed to retrieve clearkeys from ProtectionData"),null}},setConfig:function(_t){_t&&(_t.debug&&(et=_t.debug,rt=et.getLogger(ot)),_t.BASE64&&(Je=_t.BASE64),_t.settings&&(bt=_t.settings))}},ot}Hn.__dashjs_factory_name="ProtectionKeyController";var An=dashjs.FactoryMaker.getSingletonFactory(Hn);function Un(ot){return Un=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(et){return typeof et}:function(et){return et&&typeof Symbol=="function"&&et.constructor===Symbol&&et!==Symbol.prototype?"symbol":typeof et},Un(ot)}function Sn(ot,et,rt){return et=Vn(et),(function(we,Je){if(Je&&(Un(Je)=="object"||typeof Je=="function"))return Je;if(Je!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(bt){if(bt===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return bt})(we)})(ot,Gn()?Reflect.construct(et,[],Vn(ot).constructor):et.apply(ot,rt))}function Gn(){try{var ot=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Gn=function(){return!!ot})()}function Vn(ot){return Vn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(et){return et.__proto__||Object.getPrototypeOf(et)},Vn(ot)}function Wn(ot,et){return Wn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(rt,we){return rt.__proto__=we,rt},Wn(ot,et)}var hr=new((function(ot){function et(){var we;return(function(Je,bt){if(!(Je instanceof bt))throw new TypeError("Cannot call a class as a function")})(this,et),(we=Sn(this,et)).INTERNAL_KEY_MESSAGE="internalKeyMessage",we.INTERNAL_KEY_STATUS_CHANGED="internalkeyStatusChanged",we.KEY_ADDED="public_keyAdded",we.KEY_ERROR="public_keyError",we.KEY_MESSAGE="public_keyMessage",we.KEY_SESSION_CLOSED="public_keySessionClosed",we.KEY_SESSION_CREATED="public_keySessionCreated",we.KEY_SESSION_REMOVED="public_keySessionRemoved",we.KEY_STATUSES_CHANGED="public_keyStatusesChanged",we.KEY_SYSTEM_ACCESS_COMPLETE="public_keySystemAccessComplete",we.KEY_SYSTEM_SELECTED="public_keySystemSelected",we.LICENSE_REQUEST_COMPLETE="public_licenseRequestComplete",we.LICENSE_REQUEST_SENDING="public_licenseRequestSending",we.NEED_KEY="needkey",we.PROTECTION_CREATED="public_protectioncreated",we.PROTECTION_DESTROYED="public_protectiondestroyed",we.SERVER_CERTIFICATE_UPDATED="serverCertificateUpdated",we.TEARDOWN_COMPLETE="protectionTeardownComplete",we.VIDEO_ELEMENT_SELECTED="videoElementSelected",we.KEY_SESSION_UPDATED="public_keySessionUpdated",we}return(function(we,Je){if(typeof Je!="function"&&Je!==null)throw new TypeError("Super expression must either be null or a function");we.prototype=Object.create(Je&&Je.prototype,{constructor:{value:we,writable:!0,configurable:!0}}),Object.defineProperty(we,"prototype",{writable:!1}),Je&&Wn(we,Je)})(et,ot),rt=et,Object.defineProperty(rt,"prototype",{writable:!1}),rt;var rt})(M(9656).A));function Or(ot,et,rt){return Object.defineProperty(ot,"prototype",{writable:!1}),ot}var gr=Or((function ot(et,rt){(function(we,Je){if(!(we instanceof Je))throw new TypeError("Cannot call a class as a function")})(this,ot),this.initData=et,this.initDataType=rt}));function ur(ot,et,rt){return Object.defineProperty(ot,"prototype",{writable:!1}),ot}var mr=ur((function ot(et,rt,we,Je){(function(bt,Et){if(!(bt instanceof Et))throw new TypeError("Cannot call a class as a function")})(this,ot),this.sessionToken=et,this.message=rt,this.defaultURL=we,this.messageType=Je||"license-request"}));function Yr(ot,et,rt){return Object.defineProperty(ot,"prototype",{writable:!1}),ot}var Hr=Yr((function ot(et,rt){(function(we,Je){if(!(we instanceof Je))throw new TypeError("Cannot call a class as a function")})(this,ot),this.keySystem=et,this.ksConfiguration=rt})),vr={};function Vr(ot){ot=ot||{};var et,rt,we,Je,bt,Et,Bt,xt,Xt=this.context,$t=ot.eventBus,kt=ot.events,_t=ot.debug;function Wt(St,It,Ft,rn){if(navigator.requestMediaKeySystemAccess===void 0||typeof navigator.requestMediaKeySystemAccess!="function"){var un="Insecure origins are not allowed";return $t.trigger(kt.KEY_SYSTEM_ACCESS_COMPLETE,{error:un}),void rn({error:un})}var _n=St[It].protData&&St[It].protData.systemStringPriority?St[It].protData.systemStringPriority:null,Tn=St[It].configs,Yn=St[It].ks,Kn=Yn.systemString;(function(In,kn){return new Promise((function(Ln,zn){Ht(In,kn,0,Ln,zn)}))})(_n||(vr[Kn]?vr[Kn]:[Kn]),Tn).then((function(In){var kn=typeof In.getConfiguration=="function"?In.getConfiguration():null,Ln=new Hr(Yn,kn);Ln.mksa=In,$t.trigger(kt.KEY_SYSTEM_ACCESS_COMPLETE,{data:Ln}),Ft({data:Ln})})).catch((function(In){if(It+1<St.length)Wt(St,It+1,Ft,rn);else{var kn="Key system access denied! ";$t.trigger(kt.KEY_SYSTEM_ACCESS_COMPLETE,{error:kn+In.message}),rn({error:kn+In.message})}}))}function Ht(St,It,Ft,rn,un){var _n=St[Ft];rt.debug("Requesting key system access for system string ".concat(_n)),navigator.requestMediaKeySystemAccess(_n,It).then((function(Tn){Tn.selectedSystemString=_n,rn(Tn)})).catch((function(Tn){Ft+1<St.length?Ht(St,It,Ft+1,rn,un):un(Tn)}))}function an(St){if(!St||!St.session)return Promise.resolve;var It=St.session;return It.removeEventListener("keystatuseschange",St),It.removeEventListener("message",St),It.close()}function pn(St){for(var It=0;It<Et.length;It++)if(Et[It]===St){Et.splice(It,1);break}}function vn(St){var It,Ft;return St&&St.length>0&&(St[0]&&(typeof St[0]=="string"?It=St[0]:Ft=St[0]),St[1]&&(typeof St[1]=="string"?It=St[1]:Ft=St[1])),{status:It,keyId:Ft}}function tn(St,It){var Ft={session:St,keyId:It.keyId,initData:It.initData,sessionId:It.sessionId,sessionType:It.sessionType,handleEvent:function(rn){switch(rn.type){case"keystatuseschange":$t.trigger(kt.KEY_STATUSES_CHANGED,{data:this}),rn.target.keyStatuses.forEach((function(){var _n=vn(arguments);_n.status==="expired"?$t.trigger(kt.INTERNAL_KEY_STATUS_CHANGED,{error:new x.A(W.KEY_STATUS_CHANGED_EXPIRED_ERROR_CODE,W.KEY_STATUS_CHANGED_EXPIRED_ERROR_MESSAGE)}):$t.trigger(kt.INTERNAL_KEY_STATUS_CHANGED,_n)}));break;case"message":var un=ArrayBuffer.isView(rn.message)?rn.message.buffer:rn.message;$t.trigger(kt.INTERNAL_KEY_MESSAGE,{data:new mr(this,un,void 0,rn.messageType)})}},getKeyId:function(){return this.keyId},getSessionId:function(){return St.sessionId},getSessionType:function(){return this.sessionType},getExpirationTime:function(){return St.expiration},getKeyStatuses:function(){return St.keyStatuses},getUsable:function(){var rn=!1;return St.keyStatuses.forEach((function(){vn(arguments).status==="usable"&&(rn=!0)})),rn}};return St.addEventListener("keystatuseschange",Ft),St.addEventListener("message",Ft),St.closed.then((function(){pn(Ft),rt.debug("DRM: Session closed. SessionID = "+Ft.getSessionId()),$t.trigger(kt.KEY_SESSION_CLOSED,{data:Ft.getSessionId()})})),Et.push(Ft),Ft}return et={getAllInitData:function(){for(var St=[],It=0;It<Et.length;It++)Et[It].initData&&St.push(Et[It].initData);return St},getSessions:function(){return Et},requestKeySystemAccess:function(St){return new Promise((function(It,Ft){Wt(St,0,It,Ft)}))},selectKeySystem:function(St){return new Promise((function(It,Ft){St.mksa.createMediaKeys().then((function(rn){return we=St.keySystem,bt=rn,Je?Je.setMediaKeys(bt):Promise.resolve()})).then((function(){It(we)})).catch((function(){Ft({error:"Error selecting keys system ("+St.keySystem.systemString+")! Could not create MediaKeys -- TODO"})}))}))},setMediaElement:function(St){Je!==St&&(Je&&(Je.removeEventListener("encrypted",Bt),Je.setMediaKeys&&Je.setMediaKeys(null)),(Je=St)&&(Je.addEventListener("encrypted",Bt),Je.setMediaKeys&&bt&&Je.setMediaKeys(bt)))},setServerCertificate:function(St){if(!we||!bt)throw new Error("Can not set server certificate until you have selected a key system");bt.setServerCertificate(St).then((function(){rt.info("DRM: License server certificate successfully updated."),$t.trigger(kt.SERVER_CERTIFICATE_UPDATED)})).catch((function(It){$t.trigger(kt.SERVER_CERTIFICATE_UPDATED,{error:new x.A(W.SERVER_CERTIFICATE_UPDATED_ERROR_CODE,W.SERVER_CERTIFICATE_UPDATED_ERROR_MESSAGE+It.name)})}))},createKeySession:function(St){if(!we||!bt)throw new Error("Can not create sessions until you have selected a key system");var It=bt.createSession(St.sessionType),Ft=tn(It,St),rn=we.systemString===Rt.CLEARKEY_KEYSTEM_STRING&&(St.initData||St.protData&&St.protData.clearkeys)?Rt.INITIALIZATION_DATA_TYPE_KEYIDS:Rt.INITIALIZATION_DATA_TYPE_CENC;It.generateRequest(rn,St.initData).then((function(){rt.debug("DRM: Session created. SessionID = "+Ft.getSessionId()),$t.trigger(kt.KEY_SESSION_CREATED,{data:Ft})})).catch((function(un){pn(Ft),$t.trigger(kt.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(St,It){var Ft=St.session;xt.isClearKey(we)&&(It=It.toJWK()),Ft.update(It).then((function(){$t.trigger(kt.KEY_SESSION_UPDATED)})).catch((function(rn){$t.trigger(kt.KEY_ERROR,{error:new x.A(W.MEDIA_KEYERR_CODE,"Error sending update() message! "+rn.name,St)})}))},loadKeySession:function(St){if(!we||!bt)throw new Error("Can not load sessions until you have selected a key system");for(var It=St.sessionId,Ft=0;Ft<Et.length;Ft++)if(It===Et[Ft].sessionId)return void rt.warn("DRM: Ignoring session ID because we have already seen it!");var rn=bt.createSession(St.sessionType),un=tn(rn,St);rn.load(It).then((function(_n){_n?(rt.debug("DRM: Session loaded. SessionID = "+un.getSessionId()),$t.trigger(kt.KEY_SESSION_CREATED,{data:un})):(pn(un),$t.trigger(kt.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 ("+It+")")}))})).catch((function(_n){pn(un),$t.trigger(kt.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 ("+It+")! "+_n.name)})}))},removeKeySession:function(St){St.session.remove().then((function(){rt.debug("DRM: Session removed. SessionID = "+St.getSessionId()),$t.trigger(kt.KEY_SESSION_REMOVED,{data:St.getSessionId()})}),(function(It){$t.trigger(kt.KEY_SESSION_REMOVED,{data:null,error:"Error removing session ("+St.getSessionId()+"). "+It.name})}))},closeKeySession:function(St){an(St).catch((function(It){pn(St),$t.trigger(kt.KEY_SESSION_CLOSED,{data:null,error:"Error closing session ("+St.getSessionId()+") "+It.name})}))},stop:function(){for(var St,It=0;It<Et.length;It++)(St=Et[It]).getUsable()||(an(St),pn(St))},reset:function(){var St,It=Et.length;if(It!==0)for(var Ft=function(un){pn(un),Et.length===0&&(Je?(Je.removeEventListener("encrypted",Bt),Je.setMediaKeys(null).then((function(){$t.trigger(kt.TEARDOWN_COMPLETE)}))):$t.trigger(kt.TEARDOWN_COMPLETE))},rn=0;rn<It;rn++)(function(un){an(St),Ft(un)})(St=Et[rn]);else $t.trigger(kt.TEARDOWN_COMPLETE)}},rt=_t.getLogger(et),we=null,Je=null,bt=null,Et=[],xt=An(Xt).getInstance(),Bt={handleEvent:function(St){if(St.type==="encrypted"&&St.initData){var It=ArrayBuffer.isView(St.initData)?St.initData.buffer:St.initData;$t.trigger(kt.NEED_KEY,{key:new gr(It,St.initDataType)})}}},et}vr[Rt.PLAYREADY_KEYSTEM_STRING]=[Rt.PLAYREADY_KEYSTEM_STRING,Rt.PLAYREADY_RECOMMENDATION_KEYSTEM_STRING],vr[Rt.WIDEVINE_KEYSTEM_STRING]=[Rt.WIDEVINE_KEYSTEM_STRING],vr[Rt.CLEARKEY_KEYSTEM_STRING]=[Rt.CLEARKEY_KEYSTEM_STRING],Vr.__dashjs_factory_name="ProtectionModel_21Jan2015";var Bi=dashjs.FactoryMaker.getClassFactory(Vr);function Mr(ot){ot=ot||{};var et,rt,we,Je,bt,Et,Bt,xt,Xt,$t=this.context,kt=ot.eventBus,_t=ot.events,Wt=ot.debug,Ht=ot.api;function an(){try{for(var tn=0;tn<Bt.length;tn++)pn(Bt[tn]);we&&we.removeEventListener(Ht.needkey,xt),kt.trigger(_t.TEARDOWN_COMPLETE)}catch(St){kt.trigger(_t.TEARDOWN_COMPLETE,{error:"Error tearing down key sessions and MediaKeys! -- "+St.message})}}function pn(tn){var St=tn.session;St.removeEventListener(Ht.error,tn),St.removeEventListener(Ht.message,tn),St.removeEventListener(Ht.ready,tn),St.removeEventListener(Ht.close,tn);for(var It=0;It<Bt.length;It++)if(Bt[It]===tn){Bt.splice(It,1);break}St[Ht.release]()}function vn(){var tn=null,St=function(){we.removeEventListener("loadedmetadata",tn),we[Ht.setMediaKeys](bt),kt.trigger(_t.VIDEO_ELEMENT_SELECTED)};we.readyState>=1?St():(tn=St.bind(this),we.addEventListener("loadedmetadata",tn))}return et={getAllInitData:function(){for(var tn=[],St=0;St<Bt.length;St++)tn.push(Bt[St].initData);return tn},getSessions:function(){return Bt},requestKeySystemAccess:function(tn){return new Promise((function(St,It){for(var Ft=!1,rn=0;rn<tn.length;rn++)for(var un=tn[rn].ks.systemString,_n=tn[rn].configs,Tn=null,Yn=null,Kn=0;Kn<_n.length;Kn++){var In=_n[Kn].audioCapabilities,kn=_n[Kn].videoCapabilities;if(In&&In.length!==0){Tn=[];for(var Ln=0;Ln<In.length;Ln++)window[Ht.MediaKeys].isTypeSupported(un,In[Ln].contentType)&&Tn.push(In[Ln])}if(kn&&kn.length!==0){Yn=[];for(var zn=0;zn<kn.length;zn++)window[Ht.MediaKeys].isTypeSupported(un,kn[zn].contentType)&&Yn.push(kn[zn])}if(!(!Tn&&!Yn||Tn&&Tn.length===0||Yn&&Yn.length===0)){Ft=!0;var br=new g(Tn,Yn),yr=Xt.getKeySystemBySystemString(un),tr=new Hr(yr,br);kt.trigger(_t.KEY_SYSTEM_ACCESS_COMPLETE,{data:tr}),St({data:tr});break}}if(!Ft){var Xn="Key system access denied! -- No valid audio/video content configurations detected!";kt.trigger(_t.KEY_SYSTEM_ACCESS_COMPLETE,{error:Xn}),It({error:Xn})}}))},selectKeySystem:function(tn){return new Promise((function(St,It){try{bt=tn.mediaKeys=new window[Ht.MediaKeys](tn.keySystem.systemString),Je=tn.keySystem,Et=tn,we&&vn(),St(Je)}catch{It({error:"Error selecting keys system ("+Je.systemString+")! Could not create MediaKeys -- TODO"})}}))},setMediaElement:function(tn){we!==tn&&(we&&we.removeEventListener(Ht.needkey,xt),(we=tn)&&(we.addEventListener(Ht.needkey,xt),bt&&vn()))},createKeySession:function(tn){if(!Je||!bt||!Et)throw new Error("Can not create sessions until you have selected a key system");var St=null;if(Et.ksConfiguration.videoCapabilities&&Et.ksConfiguration.videoCapabilities.length>0&&(St=Et.ksConfiguration.videoCapabilities[0]),St===null&&Et.ksConfiguration.audioCapabilities&&Et.ksConfiguration.audioCapabilities.length>0&&(St=Et.ksConfiguration.audioCapabilities[0]),St===null)throw new Error("Can not create sessions for unknown content types.");var It=St.contentType,Ft=bt.createSession(It,new Uint8Array(tn.initData),tn.cdmData?new Uint8Array(tn.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 Ht.error:kt.trigger(_t.KEY_ERROR,{error:new x.A(W.MEDIA_KEYERR_CODE,"KeyError",this)});break;case Ht.message:var Yn=ArrayBuffer.isView(Tn.message)?Tn.message.buffer:Tn.message;kt.trigger(_t.INTERNAL_KEY_MESSAGE,{data:new mr(this,Yn,Tn.destinationURL)});break;case Ht.ready:rt.debug("DRM: Key added."),kt.trigger(_t.KEY_ADDED);break;case Ht.close:rt.debug("DRM: Session closed. SessionID = "+this.getSessionId()),kt.trigger(_t.KEY_SESSION_CLOSED,{data:this.getSessionId()})}}}})(Ft,tn);Ft.addEventListener(Ht.error,rn),Ft.addEventListener(Ht.message,rn),Ft.addEventListener(Ht.ready,rn),Ft.addEventListener(Ht.close,rn),Bt.push(rn),rt.debug("DRM: Session created. SessionID = "+rn.getSessionId()),kt.trigger(_t.KEY_SESSION_CREATED,{data:rn})},updateKeySession:function(tn,St){var It=tn.session;Xt.isClearKey(Je)?It.update(new Uint8Array(St.toJWK())):It.update(new Uint8Array(St)),kt.trigger(_t.KEY_SESSION_UPDATED)},closeKeySession:pn,setServerCertificate:function(){},loadKeySession:function(){},removeKeySession:function(){},stop:an,reset:an},rt=Wt.getLogger(et),we=null,Je=null,bt=null,Et=null,Bt=[],Xt=An($t).getInstance(),xt={handleEvent:function(tn){if(tn.type===Ht.needkey&&tn.initData){var St=ArrayBuffer.isView(tn.initData)?tn.initData.buffer:tn.initData;kt.trigger(_t.NEED_KEY,{key:new gr(St,"cenc")})}}},et}Mr.__dashjs_factory_name="ProtectionModel_3Feb2014";var Pr=dashjs.FactoryMaker.getClassFactory(Mr);function di(ot){ot=ot||{};var et,rt,we,Je,bt,Et,Bt,xt,Xt,$t=this.context,kt=ot.eventBus,_t=ot.events,Wt=ot.debug,Ht=ot.api,an=ot.errHandler;function pn(){we&&St();for(var It=0;It<Bt.length;It++)vn(Bt[It]);kt.trigger(_t.TEARDOWN_COMPLETE)}function vn(It){try{we[Ht.cancelKeyRequest](Je.systemString,It.sessionId)}catch(Ft){kt.trigger(_t.KEY_SESSION_CLOSED,{data:null,error:"Error closing session ("+It.sessionId+") "+Ft.message})}}function tn(It,Ft){if(Ft&&It){for(var rn=It.length,un=0;un<rn;un++)if(It[un].sessionId==Ft)return It[un];return null}return null}function St(){we.removeEventListener(Ht.keyerror,Xt),we.removeEventListener(Ht.needkey,Xt),we.removeEventListener(Ht.keymessage,Xt),we.removeEventListener(Ht.keyadded,Xt)}return et={getAllInitData:function(){for(var It=[],Ft=0;Ft<Et.length;Ft++)It.push(Et[Ft].initData);for(var rn=0;rn<Bt.length;rn++)It.push(Bt[rn].initData);return It},getSessions:function(){return Bt.concat(Et)},requestKeySystemAccess:function(It){return new Promise((function(Ft,rn){var un=we;un||(un=document.createElement("video"));for(var _n=!1,Tn=0;Tn<It.length;Tn++)for(var Yn=It[Tn].ks.systemString,Kn=It[Tn].configs,In=null,kn=0;kn<Kn.length;kn++){var Ln=Kn[kn].videoCapabilities;if(Ln&&Ln.length!==0){In=[];for(var zn=0;zn<Ln.length;zn++)un.canPlayType(Ln[zn].contentType,Yn)!==""&&In.push(Ln[zn])}if(In&&(!In||In.length!==0)){_n=!0;var br=new g(null,In),yr=bt.getKeySystemBySystemString(Yn),tr=new Hr(yr,br);kt.trigger(_t.KEY_SYSTEM_ACCESS_COMPLETE,{data:tr}),Ft({data:tr});break}}if(!_n){var Xn="Key system access denied! -- No valid audio/video content configurations detected!";kt.trigger(_t.KEY_SYSTEM_ACCESS_COMPLETE,{error:Xn}),rn({error:Xn})}}))},selectKeySystem:function(It){return Je=It.keySystem,Promise.resolve(Je)},setMediaElement:function(It){if(we!==It){if(we){St();for(var Ft=0;Ft<Bt.length;Ft++)vn(Bt[Ft]);Bt=[]}(we=It)&&(we.addEventListener(Ht.keyerror,Xt),we.addEventListener(Ht.needkey,Xt),we.addEventListener(Ht.keymessage,Xt),we.addEventListener(Ht.keyadded,Xt),kt.trigger(_t.VIDEO_ELEMENT_SELECTED))}},createKeySession:function(It){if(!Je)throw new Error("Can not create sessions until you have selected a key system");if(xt||Bt.length===0){var Ft={sessionId:null,keyId:It.keyId,initData:It.initData,getKeyId:function(){return this.keyId},getSessionId:function(){return this.sessionId},getExpirationTime:function(){return NaN},getSessionType:function(){return"temporary"}};return Et.push(Ft),we[Ht.generateKeyRequest](Je.systemString,new Uint8Array(It.initData)),Ft}throw new Error("Multiple sessions not allowed!")},updateKeySession:function(It,Ft){var rn=It.sessionId;if(bt.isClearKey(Je))for(var un=0;un<Ft.keyPairs.length;un++)we[Ht.addKey](Je.systemString,Ft.keyPairs[un].key,Ft.keyPairs[un].keyID,rn);else we[Ht.addKey](Je.systemString,new Uint8Array(Ft),new Uint8Array(It.initData),rn);kt.trigger(_t.KEY_SESSION_UPDATED)},closeKeySession:vn,setServerCertificate:function(){},loadKeySession:function(){},removeKeySession:function(){},stop:pn,reset:pn},rt=Wt.getLogger(et),we=null,Je=null,Et=[],Bt=[],bt=An($t).getInstance(),Xt={handleEvent:function(It){var Ft=null;switch(It.type){case Ht.needkey:var rn=ArrayBuffer.isView(It.initData)?It.initData.buffer:It.initData;kt.trigger(_t.NEED_KEY,{key:new gr(rn,"cenc")});break;case Ht.keyerror:if((Ft=tn(Bt,It.sessionId))||(Ft=tn(Et,It.sessionId)),Ft){var un=W.MEDIA_KEYERR_CODE,_n="";switch(It.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 = "+It.systemCode,kt.trigger(_t.KEY_ERROR,{error:new x.A(un,_n,Ft)})}else rt.error("No session token found for key error");break;case Ht.keyadded:(Ft=tn(Bt,It.sessionId))||(Ft=tn(Et,It.sessionId)),Ft?(rt.debug("DRM: Key added."),kt.trigger(_t.KEY_ADDED,{data:Ft})):rt.debug("No session token found for key added");break;case Ht.keymessage:if((xt=It.sessionId!==null&&It.sessionId!==void 0)?!(Ft=tn(Bt,It.sessionId))&&Et.length>0&&(Ft=Et.shift(),Bt.push(Ft),Ft.sessionId=It.sessionId,kt.trigger(_t.KEY_SESSION_CREATED,{data:Ft})):Et.length>0&&(Ft=Et.shift(),Bt.push(Ft),Et.length!==0&&an.error(new x.A(W.MEDIA_KEY_MESSAGE_ERROR_CODE,W.MEDIA_KEY_MESSAGE_ERROR_MESSAGE))),Ft){var Tn=ArrayBuffer.isView(It.message)?It.message.buffer:It.message;Ft.keyMessage=Tn,kt.trigger(_t.INTERNAL_KEY_MESSAGE,{data:new mr(Ft,Tn,It.defaultURL)})}else rt.warn("No session token found for key message")}}},et}di.__dashjs_factory_name="ProtectionModel_01b";var pi=dashjs.FactoryMaker.getClassFactory(di),hi=[{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"}],gi=[{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 Kr(){var ot,et=this.context;function rt(we,Je){for(var bt=0;bt<Je.length;bt++){var Et=Je[bt];if(typeof we[Et[Object.keys(Et)[0]]]=="function")return Et}return null}return ot={createProtectionSystem:function(we){var Je=null,bt=An(et).getInstance();bt.setConfig({debug:we.debug,BASE64:we.BASE64,settings:we.settings}),bt.initialize();var Et=(function(Bt){var xt=Bt.debug,Xt=xt.getLogger(ot),$t=Bt.eventBus,kt=Bt.errHandler,_t=Bt.videoModel?Bt.videoModel.getElement():null;return _t&&_t.onencrypted===void 0||_t&&_t.mediaKeys===void 0?rt(_t,gi)?(Xt.info("EME detected on this user agent! (ProtectionModel_3Feb2014)"),Pr(et).create({debug:xt,eventBus:$t,events:Bt.events,api:rt(_t,gi)})):rt(_t,hi)?(Xt.info("EME detected on this user agent! (ProtectionModel_01b)"),pi(et).create({debug:xt,eventBus:$t,errHandler:kt,events:Bt.events,api:rt(_t,hi)})):(Xt.warn("No supported version of EME detected on this user agent! - Attempts to play encrypted content will fail!"),null):(Xt.info("EME detected on this user agent! (ProtectionModel_21Jan2015)"),Bi(et).create({debug:xt,eventBus:$t,events:Bt.events}))})(we);return!Je&&Et&&(Je=le(et).create({protectionModel:Et,protectionKeyController:bt,eventBus:we.eventBus,debug:we.debug,events:we.events,BASE64:we.BASE64,constants:we.constants,cmcdModel:we.cmcdModel,customParametersModel:we.customParametersModel,settings:we.settings}),we.capabilities.setEncryptedMediaSupported(!0)),Je}}}Kr.__dashjs_factory_name="Protection";var Lr=dashjs.FactoryMaker.getClassFactory(Kr);Lr.events=hr,Lr.errors=W,dashjs.FactoryMaker.updateClassFactory(Kr.__dashjs_factory_name,Lr);var Tr=Lr},5066:function(vt,Le,M){var ce=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=ce.A.getClassFactory(u);n.NO_CHANGE=-1,n.PRIORITY=I,ce.A.updateClassFactory(u.__dashjs_factory_name,n),Le.A=n},2365:function(vt,Le,M){var ce=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 ne,O,J=this.context,pe=x.mediaPlayerModel,G=x.customParametersModel,X=x.dashMetrics,re=x.settings;function be(me){return me.filter((function(le){return le.quality>r.A.NO_CHANGE}))}function Ue(me){var le,je,Se,Ne,He,it={},Ie=null;if(me.length!==0){for(it[r.A.PRIORITY.STRONG]={quality:r.A.NO_CHANGE,reason:null},it[r.A.PRIORITY.WEAK]={quality:r.A.NO_CHANGE,reason:null},it[r.A.PRIORITY.DEFAULT]={quality:r.A.NO_CHANGE,reason:null},le=0,je=me.length;le<je;le+=1)(Se=me[le]).quality!==r.A.NO_CHANGE&&(it[Se.priority].quality===r.A.NO_CHANGE||it[Se.priority].quality>Se.quality)&&(it[Se.priority].quality=Se.quality,it[Se.priority].reason=Se.reason||null);return it[r.A.PRIORITY.WEAK].quality!==r.A.NO_CHANGE&&(Ie=it[r.A.PRIORITY.WEAK]),it[r.A.PRIORITY.DEFAULT].quality!==r.A.NO_CHANGE&&(Ie=it[r.A.PRIORITY.DEFAULT]),it[r.A.PRIORITY.STRONG].quality!==r.A.NO_CHANGE&&(Ie=it[r.A.PRIORITY.STRONG]),Ie&&(Ne=Ie.quality,He=Ie.reason),(0,r.A)(J).create(Ne,He)}}return{initialize:function(){ne=[],O=[],re.get().streaming.abr.useDefaultABRRules&&(re.get().streaming.abr.ABRStrategy===m.A.ABR_STRATEGY_L2A?ne.push((0,i.A)(J).create({dashMetrics:X,settings:re})):re.get().streaming.abr.ABRStrategy===m.A.ABR_STRATEGY_LoLP?ne.push((0,h.A)(J).create({dashMetrics:X})):(ne.push((0,y.A)(J).create({dashMetrics:X,mediaPlayerModel:pe,settings:re})),ne.push((0,ce.A)(J).create({dashMetrics:X})),re.get().streaming.abr.additionalAbrRules.insufficientBufferRule&&ne.push((0,I.A)(J).create({dashMetrics:X,settings:re})),re.get().streaming.abr.additionalAbrRules.switchHistoryRule&&ne.push((0,_.A)(J).create()),re.get().streaming.abr.additionalAbrRules.droppedFramesRule&&ne.push((0,n.A)(J).create()),re.get().streaming.abr.additionalAbrRules.abandonRequestsRule&&O.push((0,u.A)(J).create({dashMetrics:X,mediaPlayerModel:pe,settings:re})))),G.getAbrCustomRules().forEach((function(me){me.type===d&&ne.push(me.rule(J).create()),me.type===T&&O.push(me.rule(J).create())}))},reset:function(){[ne,O].forEach((function(me){me&&me.length&&me.forEach((function(le){return le.reset&&le.reset()}))})),ne=[],O=[]},getMaxQuality:function(me){return Ue(be(ne.map((function(le){return le.getMaxIndex(me)}))))||(0,r.A)(J).create()},getMinSwitchRequest:Ue,shouldAbandonFragment:function(me,le){var je=Ue(be(O.map((function(Se){return Se.shouldAbandon(me,le)}))));return je&&(je.reason.forceAbandon=!0),je||(0,r.A)(J).create()},getQualitySwitchRules:function(){return ne}}}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),Le.A=W},6918:function(vt,Le,M){var ce=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 ne=(0,ce.A)(m).create(ce.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 ne;var O,J,pe=x.getMediaInfo(),G=x.getMediaType(),X=x.getStreamInfo(),re=X?X.id:null,be=x.getCurrentRequest();if(!isNaN(be.index)){O=G,J=be.index,h[O]=h[O]||{},h[O][J]=h[O][J]||{};var Ue=d.getStableBufferTime();if(T.getCurrentBufferLevel(G)>Ue)return ne;var me=h[G][be.index];if(me===null||be.firstByteDate===null||g.hasOwnProperty(me.id))return ne;if(me.firstByteTime===void 0&&(r[G]=[],me.firstByteTime=be.firstByteDate.getTime(),me.segmentDuration=be.duration,me.bytesTotal=be.bytesTotal,me.id=be.index),me.bytesLoaded=be.bytesLoaded,me.elapsedTime=new Date().getTime()-me.firstByteTime,me.bytesLoaded>0&&me.elapsedTime>0&&(function(Oe,ft){r[Oe]=r[Oe]||[],r[Oe].push(ft)})(G,Math.round(8*me.bytesLoaded/me.elapsedTime)),r[G].length>=q.get().streaming.abr.abrRulesParameters.abandonRequestsRule.minLengthToAverage&&me.elapsedTime>q.get().streaming.abr.abrRulesParameters.abandonRequestsRule.graceTimeThreshold&&me.bytesLoaded<me.bytesTotal){var le=r[G].reduce((function(Oe,ft){return Oe+ft}),0);if(me.measuredBandwidthInKbps=Math.round(le/r[G].length),me.estimatedTimeOfDownload=+(8*me.bytesTotal/me.measuredBandwidthInKbps/1e3).toFixed(2),me.estimatedTimeOfDownload<me.segmentDuration*q.get().streaming.abr.abrRulesParameters.abandonRequestsRule.abandonMultiplier||x.getRepresentationInfo().quality===0)return ne;if(!g.hasOwnProperty(me.id)){var je=x.getAbrController(),Se=me.bytesTotal-me.bytesLoaded,Ne=je.getBitrateList(pe),He=je.getQualityForBitrate(pe,me.measuredBandwidthInKbps*q.get().streaming.abr.bandwidthSafetyFactor,re),it=je.getMinAllowedIndexFor(G,re),Ie=it!==void 0?Math.max(it,He):He;Se>me.bytesTotal*Ne[Ie].bitrate/Ne[je.getQualityFor(G,re)].bitrate&&(ne.quality=Ie,ne.reason.throughput=me.measuredBandwidthInKbps,ne.reason.fragmentID=me.id,ne.reason.rule=this.getClassName(),g[me.id]=me,i.debug("["+G+"] frag id",me.id," is asking to abandon and switch to quality to ",Ie," measured bandwidth was",me.measuredBandwidthInKbps),delete h[G][me.id])}}else me.bytesLoaded===me.bytesTotal&&delete h[G][me.id]}return ne},reset:W},i=(0,u.A)(m).getInstance().getLogger(y),W(),y}n.__dashjs_factory_name="AbandonRequestsRule",Le.A=I.A.getClassFactory(n)},3469:function(vt,Le,M){var ce=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,ne=d.dashMetrics,O=d.mediaPlayerModel,J=(0,_.A)(x).getInstance();function pe(Ie,Oe,ft){var At=ft.reduce((function(ee,ae,qe){return ae>ft[ee]?qe:ee}),0);if(At===0)return null;var Rt=Math.max(Ie,r+2*Oe.length),Pt=(ft[At]-1)/(Rt/r-1);return{gp:Pt,Vp:r/Pt}}function G(Ie){Ie.placeholderBuffer=0,Ie.mostAdvancedSegmentStart=NaN,Ie.lastSegmentWasReplacement=!1,Ie.lastSegmentStart=NaN,Ie.lastSegmentDurationS=NaN,Ie.lastSegmentRequestTimeMs=NaN,Ie.lastSegmentFinishTimeMs=NaN}function X(Ie,Oe){var ft=O.getStableBufferTime();if(Ie.stableBufferTime!==ft){var At=pe(ft,Ie.bitrates,Ie.utilities);if(At.Vp!==Ie.Vp||At.gp!==Ie.gp){var Rt=ne.getCurrentBufferLevel(Oe),Pt=Rt+Ie.placeholderBuffer;Pt-=r,Pt*=At.Vp/Ie.Vp,Pt+=r,Ie.stableBufferTime=ft,Ie.Vp=At.Vp,Ie.gp=At.gp,Ie.placeholderBuffer=Math.max(0,Pt-Rt)}}}function re(Ie,Oe){return Ie.Vp*(Ie.utilities[Oe]+Ie.gp)}function be(Ie,Oe){for(var ft=Ie.bitrates[Oe],At=Ie.utilities[Oe],Rt=0,Pt=Oe-1;Pt>=0;--Pt)if(Ie.utilities[Pt]<Ie.utilities[Oe]){var ee=Ie.bitrates[Pt],ae=Ie.utilities[Pt],qe=Ie.Vp*(Ie.gp+(ft*ae-ee*At)/(ft-ee));Rt=Math.max(Rt,qe)}return Rt}function Ue(Ie){var Oe=Ie.mediaType===g.A.AUDIO?[g.A.AUDIO]:W;for(var ft in Oe)W.hasOwnProperty(ft)&&W[ft].state===2&&(W[ft].placeholderBuffer=0)}function me(){for(var Ie in W)if(W.hasOwnProperty(Ie)){var Oe=W[Ie];Oe.state!==0&&(Oe.state=1,G(Oe))}}function le(Ie){if(Ie&&Ie.chunk&&Ie.chunk.mediaInfo){var Oe=W[Ie.chunk.mediaInfo.type];if(Oe&&Oe.state!==0){var ft=Ie.chunk.start;isNaN(Oe.mostAdvancedSegmentStart)||ft>Oe.mostAdvancedSegmentStart?(Oe.mostAdvancedSegmentStart=ft,Oe.lastSegmentWasReplacement=!1):Oe.lastSegmentWasReplacement=!0,Oe.lastSegmentStart=ft,Oe.lastSegmentDurationS=Ie.chunk.duration,Oe.lastQuality=Ie.chunk.quality,Se(Oe,Ie.chunk.mediaInfo.type)}}}function je(Ie){if(Ie&&Ie.metric===ce.A.HTTP_REQUEST&&Ie.value&&Ie.value.type===n.G.MEDIA_SEGMENT_TYPE&&Ie.value.trace&&Ie.value.trace.length){var Oe=W[Ie.mediaType];Oe&&Oe.state!==0&&(Oe.lastSegmentRequestTimeMs=Ie.value.trequest.getTime(),Oe.lastSegmentFinishTimeMs=Ie.value._tfinish.getTime(),Se(Oe,Ie.mediaType))}}function Se(Ie,Oe){if(!isNaN(Ie.lastSegmentStart)&&!isNaN(Ie.lastSegmentRequestTimeMs)&&!isNaN(Ie.placeholderBuffer)){if(Ie.placeholderBuffer*=.99,!isNaN(Ie.lastSegmentFinishTimeMs)){var ft=ne.getCurrentBufferLevel(Oe)+.001*(Ie.lastSegmentFinishTimeMs-Ie.lastSegmentRequestTimeMs),At=re(Ie,Ie.lastQuality),Rt=Math.max(0,At-ft);Ie.placeholderBuffer=Math.min(Rt,Ie.placeholderBuffer)}Ie.lastSegmentWasReplacement&&!isNaN(Ie.lastSegmentDurationS)&&(Ie.placeholderBuffer+=Ie.lastSegmentDurationS),Ie.lastSegmentStart=NaN,Ie.lastSegmentRequestTimeMs=NaN}}function Ne(Ie){if(Ie){var Oe=W[Ie.mediaType];Oe&&Oe.state!==0&&(Oe.abrQuality=Ie.newQuality)}}function He(Ie){if(Ie){var Oe=W[Ie.mediaType];if(Oe&&Oe.state!==0){var ft,At=ne.getCurrentBufferLevel(Ie.mediaType);ft=Oe.abrQuality>0?be(Oe,Oe.abrQuality):r;var Rt=Math.max(0,ft-At);Oe.placeholderBuffer=Math.min(Oe.placeholderBuffer,Rt)}}}function it(){W={}}return T={getMaxIndex:function(Ie){var Oe=(0,I.A)(x).create();if(!(Ie&&Ie.hasOwnProperty("getMediaInfo")&&Ie.hasOwnProperty("getMediaType")&&Ie.hasOwnProperty("getScheduleController")&&Ie.hasOwnProperty("getStreamInfo")&&Ie.hasOwnProperty("getAbrController")&&Ie.hasOwnProperty("useBufferOccupancyABR")))return Oe;var ft=Ie.getMediaInfo(),At=Ie.getMediaType(),Rt=Ie.getScheduleController(),Pt=Ie.getStreamInfo(),ee=Ie.getAbrController(),ae=ee.getThroughputHistory(),qe=Pt?Pt.id:null,v=Pt&&Pt.manifestInfo&&Pt.manifestInfo.isDynamic,A=Ie.useBufferOccupancyABR();if(Oe.reason=Oe.reason||{},!A)return Oe;Rt.setTimeToLoadDelay(0);var c=(function(_e){var Ye=_e.getMediaType(),Ve=W[Ye];return Ve?Ve.state!==0&&X(Ve,Ye):(Ve=(function(Xe){var nt={},Tt=Xe.getMediaInfo().bitrateList.map((function(zt){return zt.bandwidth})),mt=(function(zt){return zt.map((function(Qt){return Math.log(Qt)}))})(Tt);mt=mt.map((function(zt){return zt-mt[0]+1}));var Ut=O.getStableBufferTime(),Mt=pe(Ut,Tt,mt);return Mt?(nt.state=1,nt.bitrates=Tt,nt.utilities=mt,nt.stableBufferTime=Ut,nt.Vp=Mt.Vp,nt.gp=Mt.gp,nt.lastQuality=0,G(nt)):nt.state=0,nt})(_e),W[Ye]=Ve),Ve})(Ie);if(c.state===0)return Oe;var E,Q=ne.getCurrentBufferLevel(At),D=ae.getAverageThroughput(At,v),Be=ae.getSafeAverageThroughput(At,v),De=ae.getAverageLatency(At);if(Oe.reason.state=c.state,Oe.reason.throughput=D,Oe.reason.latency=De,isNaN(D))return Oe;switch(c.state){case 1:E=ee.getQualityForBitrate(ft,Be,qe,De),Oe.quality=E,Oe.reason.throughput=Be,c.placeholderBuffer=Math.max(0,be(c,E)-Q),c.lastQuality=E,!isNaN(c.lastSegmentDurationS)&&Q>=c.lastSegmentDurationS&&(c.state=2);break;case 2:(function(_e,Ye){var Ve=Date.now();if(isNaN(_e.lastSegmentFinishTimeMs)){if(!isNaN(_e.lastCallTimeMs)){var Xe=.001*(Ve-_e.lastCallTimeMs);_e.placeholderBuffer+=Math.max(0,Xe)}}else{var nt=.001*(Ve-_e.lastSegmentFinishTimeMs);_e.placeholderBuffer+=Math.max(0,nt)}_e.lastCallTimeMs=Ve,_e.lastSegmentStart=NaN,_e.lastSegmentRequestTimeMs=NaN,_e.lastSegmentFinishTimeMs=NaN,X(_e,Ye)})(c,At),E=(function(_e,Ye){for(var Ve=_e.bitrates.length,Xe=NaN,nt=NaN,Tt=0;Tt<Ve;++Tt){var mt=(_e.Vp*(_e.utilities[Tt]+_e.gp)-Ye)/_e.bitrates[Tt];(isNaN(nt)||mt>=nt)&&(nt=mt,Xe=Tt)}return Xe})(c,Q+c.placeholderBuffer);var Ae=ee.getQualityForBitrate(ft,Be,qe,De);E>c.lastQuality&&E>Ae&&(E=Math.max(Ae,c.lastQuality));var Re=Math.max(0,Q+c.placeholderBuffer-re(c,E));Re<=c.placeholderBuffer?(c.placeholderBuffer-=Re,Re=0):(Re-=c.placeholderBuffer,c.placeholderBuffer=0,E<ee.getMaxAllowedIndexFor(At,qe)?Rt.setTimeToLoadDelay(1e3*Re):Re=0),Oe.quality=E,Oe.reason.throughput=D,Oe.reason.latency=De,Oe.reason.bufferLevel=Q,Oe.reason.placeholderBuffer=c.placeholderBuffer,Oe.reason.delay=Re,c.lastQuality=E;break;default:q.debug("BOLA ABR rule invoked in bad state."),Oe.quality=ee.getQualityForBitrate(ft,Be,qe,De),Oe.reason.state=c.state,Oe.reason.throughput=Be,Oe.reason.latency=De,c.state=1,G(c)}return Oe},reset:function(){it(),J.off(h.A.BUFFER_EMPTY,Ue,T),J.off(h.A.PLAYBACK_SEEKING,me,T),J.off(h.A.METRIC_ADDED,je,T),J.off(h.A.QUALITY_CHANGE_REQUESTED,Ne,T),J.off(h.A.FRAGMENT_LOADING_ABANDONED,He,T),J.off(y.A.MEDIA_FRAGMENT_LOADED,le,T)}},q=(0,i.A)(x).getInstance().getLogger(T),it(),J.on(h.A.BUFFER_EMPTY,Ue,T),J.on(h.A.PLAYBACK_SEEKING,me,T),J.on(h.A.METRIC_ADDED,je,T),J.on(h.A.QUALITY_CHANGE_REQUESTED,Ne,T),J.on(h.A.FRAGMENT_LOADING_ABANDONED,He,T),J.on(y.A.MEDIA_FRAGMENT_LOADED,le,T),T}m.__dashjs_factory_name="BolaRule",Le.A=u.A.getClassFactory(m)},7933:function(vt,Le,M){var ce=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",Le.A=ce.A.getClassFactory(n)},8008:function(vt,Le,M){var ce=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,ce.A)(W).getInstance(),ne=r.dashMetrics;function O(){(T={})[y.A.VIDEO]={ignoreCount:q},T[y.A.AUDIO]={ignoreCount:q}}function J(){O()}function pe(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(!ne||!ne.hasOwnProperty("getCurrentBufferLevel")||!ne.hasOwnProperty("getCurrentBufferState"))throw new Error(y.A.MISSING_CONFIG_ERROR)})();var re=G.getMediaType(),be=ne.getCurrentBufferState(re),Ue=G.getRepresentationInfo().fragmentDuration,me=G.getStreamInfo(),le=me?me.id:null,je=G.getScheduleController(),Se=me&&me.manifestInfo&&me.manifestInfo.isDynamic;if((function(Rt,Pt){return!Rt&&T[Pt].ignoreCount>0})(je.getPlaybackController().getLowLatencyModeEnabled(),re)||!Ue)return X;if(be&&be.state===i.A.BUFFER_EMPTY)d.debug("["+re+"] Switch to index 0; buffer is empty."),X.quality=0,X.reason="InsufficientBufferRule: Buffer is empty";else{var Ne=G.getMediaInfo(),He=G.getAbrController(),it=He.getThroughputHistory(),Ie=ne.getCurrentBufferLevel(re),Oe=it.getAverageThroughput(re,Se),ft=it.getAverageLatency(re),At=Oe*(Ie/Ue)*.5;X.quality=He.getQualityForBitrate(Ne,At,le,ft),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,pe,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,pe,m),m}g.__dashjs_factory_name="InsufficientBufferRule",Le.A=u.A.getClassFactory(g)},2244:function(vt,Le,M){var ce=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,ne=(0,_.A)(W).getInstance();function O(me){me.placeholderBuffer=0,me.mostAdvancedSegmentStart=NaN,me.lastSegmentWasReplacement=!1,me.lastSegmentStart=NaN,me.lastSegmentDurationS=NaN,me.lastSegmentRequestTimeMs=NaN,me.lastSegmentFinishTimeMs=NaN,me.lastSegmentUrl=""}function J(){for(var me in d)if(d.hasOwnProperty(me)){var le=d[me];le.state!==0&&(le.state=1,O(le))}}function pe(me){if(me&&me.chunk&&me.chunk.mediaInfo){var le=d[me.chunk.mediaInfo.type],je=T[me.chunk.mediaInfo.type];if(le&&le.state!==0){var Se=me.chunk.start;isNaN(le.mostAdvancedSegmentStart)||Se>le.mostAdvancedSegmentStart?(le.mostAdvancedSegmentStart=Se,le.lastSegmentWasReplacement=!1):le.lastSegmentWasReplacement=!0,le.lastSegmentStart=Se,le.lastSegmentDurationS=me.chunk.duration,le.lastQuality=me.chunk.quality,X(le,je)}}}function G(me){if(me&&me.metric===ce.A.HTTP_REQUEST&&me.value&&me.value.type===n.G.MEDIA_SEGMENT_TYPE&&me.value.trace&&me.value.trace.length){var le=d[me.mediaType],je=T[me.mediaType];le&&le.state!==0&&(le.lastSegmentRequestTimeMs=me.value.trequest.getTime(),le.lastSegmentFinishTimeMs=me.value._tfinish.getTime(),X(le,je))}}function X(me,le){isNaN(me.lastSegmentStart)||isNaN(me.lastSegmentRequestTimeMs)||(le.segment_request_start_s=.001*me.lastSegmentRequestTimeMs,le.segment_download_finish_s=.001*me.lastSegmentFinishTimeMs,me.lastSegmentStart=NaN,me.lastSegmentRequestTimeMs=NaN)}function re(me){if(me&&me.mediaType){var le=d[me.mediaType];le&&le.state!==0&&(le.abrQuality=me.newQuality)}}function be(me,le){if(me.length!==le.length)return-1;for(var je=0,Se=0;Se<me.length;Se++)je+=me[Se]*le[Se];return je}function Ue(){d={},T={}}return m={getMaxIndex:function(me){var le,je=(0,I.A)(W).create(),Se=Math.pow(4,.99),Ne=Math.max(Math.pow(4,1),Se*Math.sqrt(4)),He=me.getMediaInfo(),it=me.getMediaType(),Ie=He.bitrateList.map((function(Mt){return Mt.bandwidth})),Oe=Ie.length,ft=me.getScheduleController(),At=me.getStreamInfo(),Rt=me.getAbrController(),Pt=Rt.getThroughputHistory(),ee=At&&At.manifestInfo&&At.manifestInfo.isDynamic,ae=me.useL2AABR(),qe=x.getCurrentBufferLevel(it,!0),v=Pt.getSafeAverageThroughput(it,ee),A=Pt.getAverageThroughput(it,ee),c=Pt.getAverageLatency(it),E=me.getVideoModel().getPlaybackRate();if(!(me&&me.hasOwnProperty("getMediaInfo")&&me.hasOwnProperty("getMediaType")&&me.hasOwnProperty("getScheduleController")&&me.hasOwnProperty("getStreamInfo")&&me.hasOwnProperty("getAbrController")&&me.hasOwnProperty("useL2AABR"))||(je.reason=je.reason||{},!ae||it===h.A.AUDIO))return je;ft.setTimeToLoadDelay(0);var Q=(function(Mt){var zt=Mt.getMediaType(),Qt=d[zt];return Qt||(Qt=(function(nn){var yn={},xn=nn.getMediaInfo(),Hn=xn.bitrateList.map((function(An){return An.bandwidth/1e3}));return yn.state=1,yn.bitrates=Hn,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})(Mt),d[zt]=Qt),Qt})(me);if(Q.state===0)return je;var D=T[it];if(!D||(je.reason.state=Q.state,je.reason.throughput=A,je.reason.latency=c,isNaN(A)))return je;switch(Q.state){case 1:if(le=Rt.getQualityForBitrate(He,v,At.id,c),je.quality=le,je.reason.throughput=v,Q.lastQuality=le,!isNaN(Q.lastSegmentDurationS)&&qe>=D.B_target){Q.state=2,D.Q=Se;for(var Be=0;Be<Oe;++Be)Be===Q.lastQuality?D.prev_w[Be]=1:D.prev_w[Be]=0}break;case 2:var De=[],Ae=x.getCurrentHttpRequest(it).trace.reduce((function(Mt,zt){return Mt+zt.d}),0),Re=x.getCurrentHttpRequest(it).trace.reduce((function(Mt,zt){return Mt+zt.b[0]}),0),_e=Math.round(8*Re/Ae),Ye=x.getCurrentHttpRequest(it);if(_e<1&&(_e=1),Ye.url===Q.lastSegmentUrl||Ye.type===n.G.INIT_SEGMENT_TYPE)le=Q.lastQuality;else{for(var Ve=Q.lastSegmentDurationS,Xe=1,nt=0;nt<Oe;++nt)Ie[nt]=Ie[nt]/1e3,E*Ie[nt]>_e&&(Xe=-1),D.w[nt]=D.prev_w[nt]+Xe*(Ve/(2*Ne))*((D.Q+Se)*(E*Ie[nt]/_e));D.w=(function(Mt){for(var zt=Mt.length,Qt=!1,nn=[],yn=0;yn<zt;++yn)nn[yn]=Mt[yn];for(var xn=Mt.sort((function(Vn,Wn){return Wn-Vn})),Hn=0,An=0,Un=[],Sn=0;Sn<zt-1;++Sn)if((An=((Hn+=xn[Sn])-1)/(Sn+1))>=xn[Sn+1]){Qt=!0;break}Qt||(An=(Hn+xn[zt-1]-1)/zt);for(var Gn=0;Gn<zt;++Gn)Un[Gn]=Math.max(nn[Gn]-An,0);return Un})(D.w);for(var Tt=0;Tt<Oe;++Tt)De[Tt]=D.w[Tt]-D.prev_w[Tt],D.prev_w[Tt]=D.w[Tt];D.Q=Math.max(0,D.Q-Ve+Ve*E*((be(Ie,D.prev_w)+be(Ie,De))/_e));for(var mt=[],Ut=0;Ut<Oe;++Ut)mt[Ut]=Math.abs(Ie[Ut]-be(D.w,Ie));(le=mt.indexOf(Math.min.apply(Math,mt)))>Q.lastQuality&&Ie[Q.lastQuality+1]<=_e&&(le=Q.lastQuality+1),Ie[le]>=_e&&(D.Q=2*Math.max(Se,D.Q)),Q.lastSegmentUrl=Ye.url}je.quality=le,je.reason.throughput=A,je.reason.latency=c,je.reason.bufferLevel=qe,Q.lastQuality=je.quality;break;default:q.debug("L2A ABR rule invoked in bad state."),je.quality=Rt.getQualityForBitrate(He,v,At.id,c),je.reason.state=Q.state,je.reason.throughput=v,je.reason.latency=c,Q.state=1,O(Q)}return je},reset:function(){Ue(),ne.off(y.A.PLAYBACK_SEEKING,J,m),ne.off(y.A.MEDIA_FRAGMENT_LOADED,pe,m),ne.off(y.A.METRIC_ADDED,G,m),ne.off(y.A.QUALITY_CHANGE_REQUESTED,re,m)}},q=(0,i.A)(W).getInstance().getLogger(m),Ue(),ne.on(y.A.PLAYBACK_SEEKING,J,m),ne.on(y.A.MEDIA_FRAGMENT_LOADED,pe,m),ne.on(y.A.METRIC_ADDED,G,m),ne.on(y.A.QUALITY_CHANGE_REQUESTED,re,m),m}g.__dashjs_factory_name="L2ARule",Le.A=u.A.getClassFactory(g)},549:function(vt,Le,M){var ce=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",Le.A=ce.A.getClassFactory(n)},1499:function(vt,Le,M){var ce=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(),ne=x?x.id:null,O=x&&x.manifestInfo?x.manifestInfo.isDynamic:null,J=W.getThroughputHistory(),pe=J.getSafeAverageThroughput(d,O),G=J.getAverageLatency(d),X=g.useBufferOccupancyABR();return isNaN(pe)||!T||X||W.getAbandonmentStateFor(ne,d)!==n.A.ABANDON_LOAD&&(T.state===n.A.BUFFER_LOADED||O)&&(r.quality=W.getQualityForBitrate(m,pe,ne,G),q.setTimeToLoadDelay(0),r.reason={throughput:pe,latency:G}),r},reset:function(){}}}_.__dashjs_factory_name="ThroughputRule",Le.A=ce.A.getClassFactory(_)},5892:function(vt,Le,M){var ce=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 pe=0;if(y)for(var G=0;G<y.length;G++){var X=y[G];X.state.throughput>pe&&(pe=X.state.throughput)}return pe}function x(pe,G,X){var re=pe.map((function(be,Ue){return X[Ue]*Math.pow(be-G[Ue],2)})).reduce((function(be,Ue){return be+Ue}));return(re<0?-1:1)*Math.sqrt(Math.abs(re))}function ne(pe,G){return x([pe.state.throughput,pe.state.latency,pe.state.rebuffer,pe.state.switch],[G.state.throughput,G.state.latency,G.state.rebuffer,G.state.switch],[1,1,1,1])}function O(pe,G,X){for(var re=0;re<G.length;re++){var be=G[re],Ue=ne(be,pe);J(be,X,Math.exp(-1*Math.pow(Ue,2)/(2*Math.pow(.1,2))))}}function J(pe,G,X){var re=pe.state,be=[.01,.01,.01,.01];re.throughput=re.throughput+(G[0]-re.throughput)*be[0]*X,re.latency=re.latency+(G[1]-re.latency)*be[1]*X,re.rebuffer=re.rebuffer+(G[2]-re.rebuffer)*be[2]*X,re.switch=re.switch+(G[3]-re.switch)*be[3]*X}return n={getNextQuality:function(pe,G,X,re,be,Ue,me){var le=X,je=re,Se=G,Ne=(function(D){if(!y){y=[];var Be=D.bitrateList,De=[];g=Be[0].bandwidth,Be.forEach((function(Ye){De.push(Ye.bandwidth),Ye.bandwidth<g&&(g=Ye.bandwidth)})),_e=De.map((function(Ye){return Math.pow(Ye,2)})).reduce((function(Ye,Ve){return Ye+Ve})),i=Math.sqrt(_e);for(var Ae=0;Ae<Be.length;Ae++){var Re={qualityIndex:Ae,bitrate:Be[Ae].bandwidth,state:{throughput:Be[Ae].bandwidth/i,latency:0,rebuffer:0,switch:0}};y.push(Re)}m=(function(Ye){var Ve=[],Xe=(function(gr){for(var ur=[],mr=0;mr<gr;mr++){var Yr=[Math.random()*W(),Math.random(),Math.random(),Math.random()];ur.push(Yr)}return ur})(Math.pow(Ye.length,2));Ve.push(Xe[0]);for(var nt=[1,1,1,1],Tt=1;Tt<Ye.length;Tt++){for(var mt=null,Ut=null,Mt=0;Mt<Xe.length;Mt++){for(var zt=Xe[Mt],Qt=null,nn=0;nn<Ve.length;nn++){var yn=x(zt,Ve[nn],nt);(Qt===null||yn<Qt)&&(Qt=yn)}(Ut===null||Qt>Ut)&&(mt=zt,Ut=Qt)}Ve.push(mt)}for(var xn=null,Hn=null,An=0;An<Ve.length;An++){for(var Un=0,Sn=0;Sn<Ve.length;Sn++)An!==Sn&&(Un+=x(Ve[An],Ve[Sn],nt));(xn===null||Un>xn)&&(xn=Un,Hn=An)}var Gn=[];for(Gn.push(Ve[Hn]),Ve.splice(Hn,1);Ve.length>0;){for(var Vn=null,Wn=null,hr=0;hr<Ve.length;hr++){var Or=x(Gn[0],Ve[hr],nt);(Vn===null||Or<Vn)&&(Vn=Or,Wn=hr)}Gn.push(Ve[Wn]),Ve.splice(Wn,1)}return Gn})(y)}var _e;return y})(pe),He=G/i;He>1&&(He=W()),X/=h,_.debug("getNextQuality called throughput:".concat(He," latency:").concat(X," bufferSize:").concat(re," currentQualityIndex:").concat(Ue," playbackRate:").concat(be));var it=Ne[Ue],Ie=it.bitrate*me.getSegmentDuration()/Se,Oe=Math.max(0,Ie-je);if(je-Ie<me.getMinBuffer())return _.debug("Buffer is low for bitrate= ".concat(it.bitrate," downloadTime=").concat(Ie," currentBuffer=").concat(je," rebuffer=").concat(Oe)),(function(D,Be){var De=0,Ae=D;if(y)for(var Re=0;Re<y.length;Re++){var _e=y[Re];_e.bitrate<D.bitrate&&_e.bitrate>De&&Be>_e.bitrate&&(De=_e.bitrate,Ae=_e)}return Ae})(it,Se).qualityIndex;switch(d){case"manual_weight_selection":r=[.4,.4,.4,.4];break;case"random_weight_selection":(function(D){r=(function(Be){for(var De=[],Ae=Math.sqrt(2/Be),Re=0;Re<4;Re++)De.push(Math.random()*Ae);return r=De})(D.length)})(Ne);break;default:(function(D,Be,De,Ae,Re,_e,Ye){r||(r=m[m.length-1]);var Ve=D.findWeightVector(Be,De,Ae,Re,_e,Ye);Ve!==null&&Ve!==-1&&(r=Ve)})(me,Ne,le,je,Oe,Se,be)}for(var ft=null,At=null,Rt=null,Pt=0;Pt<Ne.length;Pt++){var ee=Ne[Pt],ae=ee.state,qe=[ae.throughput,ae.latency,ae.rebuffer,ae.switch],v=r.slice(),A=me.getNextBufferWithBitrate(ee.bitrate,je,Se),c=A<me.getMinBuffer();c&&_.debug("Buffer is low for bitrate=".concat(ee.bitrate," downloadTime=").concat(Ie," currentBuffer=").concat(je," nextBuffer=").concat(A)),(ee.bitrate>G-1e4||c)&&ee.bitrate!==g&&(v[0]=100);var E=x(qe,[He,0,0,0],v);(ft===null||E<ft)&&(ft=E,At=ee.qualityIndex,Rt=ee)}var Q=Math.abs(it.bitrate-Rt.bitrate)/i;return O(it,Ne,[He,X,Oe,Q]),O(Rt,Ne,[He,0,0,Q]),At},reset:function(){q()}},_=(0,I.A)(T).getInstance().getLogger(n),q(),n}u.__dashjs_factory_name="LearningAbrController",Le.A=ce.A.getClassFactory(u)},8692:function(vt,Le,M){var ce=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 ne=0;ne<x.weights.latencyPenalty.length;ne++){var O=x.weights.latencyPenalty[ne];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",Le.A=ce.A.getClassFactory(u)},6050:function(vt,Le,M){var ce=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(ne){try{var O=(0,_.A)(x).create(),J=ne.getMediaInfo().type,pe=ne.getAbrController(),G=ne.getStreamInfo(),X=pe.getQualityFor(J,G.id),re=ne.getMediaInfo(),be=W.getCurrentBufferState(J),Ue=ne.getScheduleController(),me=W.getCurrentBufferLevel(J,!0),le=G&&G.manifestInfo?G.manifestInfo.isDynamic:null,je=Ue.getPlaybackController(),Se=je.getCurrentLiveLatency();if(!ne.useLoLPABR()||J===h.A.AUDIO)return O;Se||(Se=0);var Ne=je.getPlaybackRate(),He=pe.getThroughputHistory().getSafeAverageThroughput(J,le);if(m.debug("Throughput ".concat(Math.round(He)," kbps")),isNaN(He)||!be||pe.getAbandonmentStateFor(G.id,J)===y.A.ABANDON_LOAD)return O;for(var it=re.bitrateList,Ie=ne.getRepresentationInfo().fragmentDuration,Oe=it[0].bandwidth/1e3,ft=it[it.length-1].bandwidth/1e3,At=0;At<it.length;At++){var Rt=it[At].bandwidth/1e3;Rt>ft?ft=Rt:Rt<Oe&&(Oe=Rt)}var Pt=it[X].bandwidth/1e3,ee=W.getCurrentHttpRequest(J,!0),ae=(ee.tresponse.getTime()-ee.trequest.getTime())/1e3,qe=ae>Ie?ae-Ie:0;q.setupPerSegmentQoe(Ie,ft,Oe),q.logSegmentMetrics(Pt,qe,Se,Ne);var v=(0,i.A)(x).create({targetLatency:1.5,bufferMin:.3,segmentDuration:Ie,qoeEvaluator:q});return O.quality=T.getNextQuality(re,1e3*He,Se,me,Ne,X,v),O.reason={throughput:He,latency:Se},O.priority=_.A.PRIORITY.STRONG,Ue.setTimeToLoadDelay(0),O.quality!==X&&m.debug("[TgcLearningRule]["+J+"] requesting switch to index: ",O.quality,"Average throughput",Math.round(He),"kbps"),O}catch(A){throw A}},reset:function(){T.reset(),q.reset()}},m=(0,ce.A)(x).getInstance().getLogger(d),T=(0,u.A)(x).create(),q=(0,n.A)(x).create(),d}g.__dashjs_factory_name="LoLPRule",Le.A=I.A.getClassFactory(g)},3173:function(vt,Le,M){var ce=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,ne){var O=q();return ne>O?x-O:x+O-ne}return n={getMinBuffer:function(){return m},getSegmentDuration:q,getNextBufferWithBitrate:function(x,ne,O){return W(ne,x*d/O)},getNextBuffer:W,findWeightVector:function(x,ne,O,J,pe,G){var X=null,re=null,be=null,Ue=Math.abs(ne-y);return x.forEach((function(me){_.forEach((function(le){le[0];var je=le[1],Se=le[2],Ne=(le[3],me.bitrate*d/pe),He=W(O,Ne),it=(Se===0?10:1/Se)*Math.max(1e-5,Ne-He),Ie=(je===0?10:1/je)*me.state.latency,Oe=T.calculateSingleUseQoe(me.bitrate,it,Ie,G);(X===null||Oe>X)&&(function(ft,At,Rt){return!(ft>r+Rt)&&At>=m})(ne,He,Ue)&&(X=Oe,re=le,be=me.bitrate)}))})),re===null&&be===null&&(re=-1),y=ne,re}},h=(i=[.2,.4,.6,.8,1]).map((function(x){return[x]})),_=(g=function(x,ne,O){if(O===ne)return x;for(var J=x.length,pe=0;pe<J;pe++)for(var G=x.shift(),X=0;X<i.length;X++)x.push(G.concat(i[X]));return g(x,ne,O+1)})(h,4,1),y=0,n}I.__dashjs_factory_name="LoLpWeightSelector",Le.A=ce.A.getClassFactory(I)},7202:function(vt,Le){function M(I,u,n){return Object.defineProperty(I,"prototype",{writable:!1}),I}var ce=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}));Le.A=ce},6028:function(vt,Le,M){M.d(Le,{_:function(){return m}});var ce=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,ne,O,J,pe,G,X=this.context,re=T.adapter,be=T.baseURLController,Ue=T.streamInfo,me=T.timelineConverter,le=T.debug,je=T.eventBus,Se=T.events,Ne=T.dashConstants,He=(0,_.A)(X).getInstance();function it(Oe,ft){var At=new n.A;At.id=Oe.id,At.bitrate=Oe.bandwidth,At.width=Oe.width,At.height=Oe.height,At.tilesHor=1,At.tilesVert=1,Oe.essentialProperties&&Oe.essentialProperties.forEach((function(Rt){if(m.indexOf(Rt.schemeIdUri)>=0&&Rt.value){var Pt=Rt.value.split("x");Pt.length!==2||isNaN(Pt[0])||isNaN(Pt[1])||(At.tilesHor=parseInt(Pt[0],10),At.tilesVert=parseInt(Pt[1],10))}})),ft?J.updateSegmentData(Oe).then((function(Rt){(function(Pt,ee,ae){var qe=[],v=(function(A,c){var E,Q,D,Be,De=[],Ae=0;for(E=0,Q=A.segments.length;E<Q;E++)D=A.segments[E],(Be=(0,y.W$)(me,re.getIsDynamic(),c,D.startTime,D.duration,D.timescale,D.media,D.mediaRange,Ae))&&(De.push(Be),Be=null,Ae++);return De})(ae,ee);ee.segments=v,Pt.segmentDuration=ee.segments[0].duration,Pt.readThumbnail=function(A,c){var E=null;qe.some((function(Q){if(Q.start<=A&&Q.end>A)return E=Q.url,!0})),E?c(E):ee.segments.some((function(Q){if(Q.mediaStartTime<=A&&Q.mediaStartTime+Q.duration>A){var D=be.resolve(ee.path);return pe.load({method:"get",url:D.url,request:{range:Q.mediaRange,responseType:"arraybuffer"},onload:function(Be){var De=G.getSamplesInfo(Be.target.response),Ae=new Blob([Be.target.response.slice(De.sampleList[0].offset,De.sampleList[0].offset+De.sampleList[0].size)],{type:"image/jpeg"}),Re=window.URL.createObjectURL(Ae);qe.push({start:Q.mediaStartTime,end:Q.mediaStartTime+Q.duration,url:Re}),c&&c(Re)}}),!0}}))}})(At,Oe,Rt)})):(At.startNumber=Oe.startNumber,At.segmentDuration=Oe.segmentDuration,At.timescale=Oe.timescale,At.templateUrl=(function(Rt){var Pt=He.isRelative(Rt.media)?He.resolve(Rt.media,be.resolve(Rt.path).url):Rt.media;return Pt?(0,y.dD)(Pt,Rt.id):""})(Oe)),At.tilesHor>0&&At.tilesVert>0&&(At.widthPerTile=At.width/At.tilesHor,At.heightPerTile=At.height/At.tilesVert,W.push(At))}function Ie(){W=[],ne=-1,O=null}return q={getTracks:function(){return W},addTracks:function(){if(Ue&&re&&(O=re.getMediaInfoForType(Ue,ce.A.IMAGE))){var Oe=re.getVoRepresentations(O);Oe&&Oe.length>0&&Oe.forEach((function(ft){(ft.segmentInfoType===I.A.SEGMENT_TEMPLATE&&ft.segmentDuration>0&&ft.media||ft.segmentInfoType===I.A.SEGMENT_TIMELINE)&&it(ft),ft.segmentInfoType===I.A.SEGMENT_BASE&&it(ft,!0)})),W.length>0&&W.sort((function(ft,At){return ft.bitrate-At.bitrate}))}},reset:Ie,setTrackByIndex:function(Oe){W&&W.length!==0&&(Oe>=W.length&&(Oe=W.length-1),ne=Oe)},getCurrentTrack:function(){return ne<0?null:W[ne]},getCurrentTrackIndex:function(){return ne},getThumbnailRequestForTime:function(Oe){for(var ft,At=re.getVoRepresentations(O),Rt=0;Rt<At.length;Rt++)if(W[ne].id===At[Rt].id){ft=At[Rt];break}return x.getSegmentRequestForTime(O,ft,Oe)}},Ie(),pe=(0,h.A)(X).create({}),G=(0,i.A)(X).getInstance(),J=(0,r.A)(X).create({events:Se,eventBus:je,streamInfo:Ue,timelineConverter:me,dashConstants:Ne,dashMetrics:T.dashMetrics,segmentBaseController:T.segmentBaseController,type:ce.A.IMAGE}),(x=(0,g.A)(X).create({streamInfo:Ue,type:ce.A.IMAGE,timelineConverter:me,segmentsController:J,baseURLController:be,debug:le,eventBus:je,events:Se,dashConstants:Ne,urlUtils:He})).initialize(!!re&&re.getIsDynamic()),q}d.__dashjs_factory_name="ThumbnailTracks",Le.A=u.A.getClassFactory(d)},255:function(vt,Le,M){var ce=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,ne=q instanceof ArrayBuffer?new Uint8Array(q):q,O=0;W<ne.byteLength;){var J=m(ne,W),pe=d(ne,W+4);if(J===0)break;W+J<=ne.byteLength&&(T.indexOf(pe)>=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,ne,O,J,pe,G,X,re,be,Ue,me,le,je,Se,Ne=r(T),He=Ne.getBoxes("moof"),it=Ne.getBoxes("mfhd");je=Ne.getBoxes("moof").length,le=it[it.length-1].sequence_number,W=0,O=[];var Ie=-1,Oe=-1;for(re=0;re<He.length;re++){var ft=He[re],At=ft.getChildBoxes("traf");for(G=0;G<At.length;G++){var Rt=At[G],Pt=Rt.getChildBox("tfhd"),ee=Rt.getChildBox("tfdt");ne=ee.baseMediaDecodeTime;var ae=Rt.getChildBoxes("trun"),qe=Rt.getChildBoxes("subs");for(X=0;X<ae.length;X++){var v=ae[X];for(W=v.sample_count,me=(Pt.base_data_offset||0)+(v.data_offset||0),pe=0;pe<W;pe++){q=(J=v.samples[pe]).sample_duration!==void 0?J.sample_duration:Pt.default_sample_duration,x=J.sample_size!==void 0?J.sample_size:Pt.default_sample_size;var A={dts:ne,cts:ne+(J.sample_composition_time_offset!==void 0?J.sample_composition_time_offset:0),duration:q,offset:ft.offset+me,size:x,subSizes:[x]};if(qe)for(be=0;be<qe.length;be++){var c=qe[be];if(Ie<c.entry_count-1&&pe>Oe&&(Ie++,Oe+=c.entries[Ie].sample_delta),pe==Oe){A.subSizes=[];var E=c.entries[Ie];for(Ue=0;Ue<E.subsample_count;Ue++)A.subSizes.push(E.subsamples[Ue].subsample_size)}}O.push(A),me+=x,ne+=q}}Se=ne-ee.baseMediaDecodeTime}}return{sampleList:O,lastSequenceNumber:le,totalDuration:Se,numSequences:je}},findInitRange:function(T){var q=null,W=r(T);if(!W)return q;var x=W.getBox("ftyp"),ne=W.getBox("moov");return i.debug("Searching for initialization."),ne&&ne.isComplete&&(q=(x?x.offset:ne.offset)+"-"+(ne.offset+ne.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,ne=q instanceof ArrayBuffer?new Uint8Array(q):q,O=0;W<ne.byteLength;){var J=m(ne,W),pe=d(ne,W+4);if(J===0)break;W+J<=ne.byteLength&&(T.indexOf(pe)>=0?x=new _.A(W,!0,J,pe):O=W+J),W+=J}return x||new _.A(O,!1)}},i=(0,ce.A)(g).getInstance().getLogger(h),h}y.__dashjs_factory_name="BoxParser",Le.A=u.A.getSingletonFactory(y)},6035:function(vt,Le,M){M.d(Le,{a:function(){return _}});var ce=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",Le.A=ce.A.getSingletonFactory(y)},6877:function(vt,Le,M){var ce=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",Le.A=ce.A.getClassFactory(u)},206:function(vt,Le,M){var ce=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,ne){try{return new window.URL(x,ne).toString()}catch{return x}},g=function(x,ne){var O=r;if(!ne||!T(x))return x;q(x)&&(O=m),W(x)&&(O=d);var J=O(ne),pe=J.charAt(J.length-1)!=="/"&&x.charAt(0)!=="/"?"/":"";return[J,x].join(pe)};function r(x){var ne=x.indexOf("/"),O=x.lastIndexOf("/");return ne!==-1?O===ne+1?x:(x.indexOf("?")!==-1&&(x=x.substring(0,x.indexOf("?"))),x.substring(0,O+1)):""}function m(x){var ne=x.match(i);return ne?ne[1]:""}function d(x){var ne=x.match(n);return ne?ne[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,ne){return u(x,ne)}}}I.__dashjs_factory_name="DefaultURLUtils",Le.A=ce.A.getSingletonFactory(I)},246:function(vt,Le,M){var ce=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 ce.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",Le.A=I.A.getClassFactory(u)},9913:function(vt,Le,M){M.d(Le,{W:function(){return I}});var ce=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",Le.A=ce.A.getSingletonFactory(u)},7652:function(vt,Le,M){M.d(Le,{sq:function(){return u},zQ:function(){return n}});var ce=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 ce.A.BAD_ARGUMENT_ERROR}function n(_){if(_===null||isNaN(_)||_%1!=0)throw ce.A.BAD_ARGUMENT_ERROR+" : argument is not an integer"}},2187:function(vt,Le,M){var ce=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=ce.A.getSingletonFactory(u);Le.A=n},8324:function(vt,Le){function M(I,u,n){return Object.defineProperty(I,"prototype",{writable:!1}),I}var ce=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}));Le.A=ce},2686:function(vt,Le,M){var ce=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===ce.G.INIT_SEGMENT_TYPE}},{key:"setInfo",value:function(h){this.type=h&&h.init?ce.G.INIT_SEGMENT_TYPE:ce.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",Le.A=_},9705:function(vt,Le){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 ce(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}}])&&ce(n.prototype,_),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,_})();Le.A=u},1465:function(vt,Le){function M(I,u,n){return Object.defineProperty(I,"prototype",{writable:!1}),I}var ce=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=_}));Le.A=ce},8584:function(vt,Le){function M(I,u,n){return Object.defineProperty(I,"prototype",{writable:!1}),I}var ce=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=""}));Le.A=ce},2756:function(vt,Le,M){function ce(_,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(Le,{G:function(){return u},N:function(){return n}});var u=ce((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=ce((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(vt,Le){Le.byteLength=function(i){var h=_(i),g=h[0],r=h[1];return 3*(g+r)/4-r},Le.toByteArray=function(i){var h,g,r=_(i),m=r[0],d=r[1],T=new I((function(x,ne,O){return 3*(ne+O)/4-O})(0,m,d)),q=0,W=d>0?m-4:m;for(g=0;g<W;g+=4)h=ce[i.charCodeAt(g)]<<18|ce[i.charCodeAt(g+1)]<<12|ce[i.charCodeAt(g+2)]<<6|ce[i.charCodeAt(g+3)],T[q++]=h>>16&255,T[q++]=h>>8&255,T[q++]=255&h;return d===2&&(h=ce[i.charCodeAt(g)]<<2|ce[i.charCodeAt(g+1)]>>4,T[q++]=255&h),d===1&&(h=ce[i.charCodeAt(g)]<<10|ce[i.charCodeAt(g+1)]<<4|ce[i.charCodeAt(g+2)]>>2,T[q++]=h>>8&255,T[q++]=255&h),T},Le.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=[],ce=[],I=typeof Uint8Array<"u"?Uint8Array:Array,u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n=0;n<64;++n)M[n]=u[n],ce[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("")}ce[45]=62,ce[95]=63},4910:function(vt,Le,M){var ce=M(2541),I=M(5156),u=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;Le.Buffer=y,Le.SlowBuffer=function(v){return+v!=v&&(v=0),y.alloc(+v)},Le.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,Be){if(typeof Be=="string"&&Be!==""||(Be="utf8"),!y.isEncoding(Be))throw new TypeError("Unknown encoding: "+Be);var De=0|T(D,Be),Ae=_(De),Re=Ae.write(D,Be);return Re!==De&&(Ae=Ae.slice(0,Re)),Ae})(v,A);if(ArrayBuffer.isView(v))return(function(D){if(ee(D,Uint8Array)){var Be=new Uint8Array(D);return m(Be.buffer,Be.byteOffset,Be.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(ee(v,ArrayBuffer)||v&&ee(v.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(ee(v,SharedArrayBuffer)||v&&ee(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 Be=0|d(D.length),De=_(Be);return De.length===0||D.copy(De,0,0,Be),De}return D.length!==void 0?typeof D.length!="number"||ae(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)||ee(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 At(v).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*c;case"hex":return c>>>1;case"base64":return Rt(v).length;default:if(Q)return E?-1:At(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 je(this,A,c);case"utf8":case"utf-8":return be(this,A,c);case"ascii":return me(this,A,c);case"latin1":case"binary":return le(this,A,c);case"base64":return re(this,A,c);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Se(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),ae(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:ne(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):ne(v,[A],c,E,Q);throw new TypeError("val must be string, number or Buffer")}function ne(v,A,c,E,Q){var D,Be=1,De=v.length,Ae=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;Be=2,De/=2,Ae/=2,c/=2}function Re(Xe,nt){return Be===1?Xe[nt]:Xe.readUInt16BE(nt*Be)}if(Q){var _e=-1;for(D=c;D<De;D++)if(Re(v,D)===Re(A,_e===-1?0:D-_e)){if(_e===-1&&(_e=D),D-_e+1===Ae)return _e*Be}else _e!==-1&&(D-=D-_e),_e=-1}else for(c+Ae>De&&(c=De-Ae),D=c;D>=0;D--){for(var Ye=!0,Ve=0;Ve<Ae;Ve++)if(Re(v,D+Ve)!==Re(A,Ve)){Ye=!1;break}if(Ye)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 Be=0;Be<E;++Be){var De=parseInt(A.substr(2*Be,2),16);if(ae(De))return Be;v[c+Be]=De}return Be}function J(v,A,c,E){return Pt(At(A,v.length-c),v,c,E)}function pe(v,A,c,E){return Pt((function(Q){for(var D=[],Be=0;Be<Q.length;++Be)D.push(255&Q.charCodeAt(Be));return D})(A),v,c,E)}function G(v,A,c,E){return Pt(Rt(A),v,c,E)}function X(v,A,c,E){return Pt((function(Q,D){for(var Be,De,Ae,Re=[],_e=0;_e<Q.length&&!((D-=2)<0);++_e)De=(Be=Q.charCodeAt(_e))>>8,Ae=Be%256,Re.push(Ae),Re.push(De);return Re})(A,v.length-c),v,c,E)}function re(v,A,c){return A===0&&c===v.length?ce.fromByteArray(v):ce.fromByteArray(v.slice(A,c))}function be(v,A,c){c=Math.min(v.length,c);for(var E=[],Q=A;Q<c;){var D,Be,De,Ae,Re=v[Q],_e=null,Ye=Re>239?4:Re>223?3:Re>191?2:1;if(Q+Ye<=c)switch(Ye){case 1:Re<128&&(_e=Re);break;case 2:(192&(D=v[Q+1]))==128&&(Ae=(31&Re)<<6|63&D)>127&&(_e=Ae);break;case 3:D=v[Q+1],Be=v[Q+2],(192&D)==128&&(192&Be)==128&&(Ae=(15&Re)<<12|(63&D)<<6|63&Be)>2047&&(Ae<55296||Ae>57343)&&(_e=Ae);break;case 4:D=v[Q+1],Be=v[Q+2],De=v[Q+3],(192&D)==128&&(192&Be)==128&&(192&De)==128&&(Ae=(15&Re)<<18|(63&D)<<12|(63&Be)<<6|63&De)>65535&&Ae<1114112&&(_e=Ae)}_e===null?(_e=65533,Ye=1):_e>65535&&(_e-=65536,E.push(_e>>>10&1023|55296),_e=56320|1023&_e),E.push(_e),Q+=Ye}return(function(Ve){var Xe=Ve.length;if(Xe<=Ue)return String.fromCharCode.apply(String,Ve);for(var nt="",Tt=0;Tt<Xe;)nt+=String.fromCharCode.apply(String,Ve.slice(Tt,Tt+=Ue));return nt})(E)}Le.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(ee(v,Uint8Array)&&(v=y.from(v,v.offset,v.byteLength)),ee(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(ee(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?be(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=Le.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(ee(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),Be=(c>>>=0)-(A>>>=0),De=Math.min(D,Be),Ae=this.slice(E,Q),Re=v.slice(A,c),_e=0;_e<De;++_e)if(Ae[_e]!==Re[_e]){D=Ae[_e],Be=Re[_e];break}return D<Be?-1:Be<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 pe(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 Ue=4096;function me(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 le(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 je(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+=qe[v[D]];return Q}function Se(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 Ne(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 He(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 it(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 Ie(v,A,c,E,Q){return A=+A,c>>>=0,Q||it(v,0,c,4),I.write(v,A,c,E,23,4),c+4}function Oe(v,A,c,E,Q){return A=+A,c>>>=0,Q||it(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||Ne(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||Ne(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||Ne(v,1,this.length),this[v]},y.prototype.readUint16LE=y.prototype.readUInt16LE=function(v,A){return v>>>=0,A||Ne(v,2,this.length),this[v]|this[v+1]<<8},y.prototype.readUint16BE=y.prototype.readUInt16BE=function(v,A){return v>>>=0,A||Ne(v,2,this.length),this[v]<<8|this[v+1]},y.prototype.readUint32LE=y.prototype.readUInt32LE=function(v,A){return v>>>=0,A||Ne(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||Ne(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||Ne(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||Ne(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||Ne(v,1,this.length),128&this[v]?-1*(255-this[v]+1):this[v]},y.prototype.readInt16LE=function(v,A){v>>>=0,A||Ne(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||Ne(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||Ne(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||Ne(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||Ne(v,4,this.length),I.read(this,v,!0,23,4)},y.prototype.readFloatBE=function(v,A){return v>>>=0,A||Ne(v,4,this.length),I.read(this,v,!1,23,4)},y.prototype.readDoubleLE=function(v,A){return v>>>=0,A||Ne(v,8,this.length),I.read(this,v,!0,52,8)},y.prototype.readDoubleBE=function(v,A){return v>>>=0,A||Ne(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||He(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||He(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||He(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||He(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||He(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||He(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||He(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);He(this,v,A,c,Q-1,-Q)}var D=0,Be=1,De=0;for(this[A]=255&v;++D<c&&(Be*=256);)v<0&&De===0&&this[A+D-1]!==0&&(De=1),this[A+D]=(v/Be|0)-De&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);He(this,v,A,c,Q-1,-Q)}var D=c-1,Be=1,De=0;for(this[A+D]=255&v;--D>=0&&(Be*=256);)v<0&&De===0&&this[A+D+1]!==0&&(De=1),this[A+D]=(v/Be|0)-De&255;return A+c},y.prototype.writeInt8=function(v,A,c){return v=+v,A>>>=0,c||He(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||He(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||He(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||He(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||He(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 Ie(this,v,A,!0,c)},y.prototype.writeFloatBE=function(v,A,c){return Ie(this,v,A,!1,c)},y.prototype.writeDoubleLE=function(v,A,c){return Oe(this,v,A,!0,c)},y.prototype.writeDoubleBE=function(v,A,c){return Oe(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 Be=y.isBuffer(v)?v:y.from(v,E),De=Be.length;if(De===0)throw new TypeError('The value "'+v+'" is invalid for argument "value"');for(D=0;D<c-A;++D)this[D+A]=Be[D%De]}return this};var ft=/[^+/0-9A-Za-z-_]/g;function At(v,A){var c;A=A||1/0;for(var E=v.length,Q=null,D=[],Be=0;Be<E;++Be){if((c=v.charCodeAt(Be))>55295&&c<57344){if(!Q){if(c>56319){(A-=3)>-1&&D.push(239,191,189);continue}if(Be+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 Rt(v){return ce.toByteArray((function(A){if((A=(A=A.split("=")[0]).trim().replace(ft,"")).length<2)return"";for(;A.length%4!=0;)A+="=";return A})(v))}function Pt(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 ee(v,A){return v instanceof A||v!=null&&v.constructor!=null&&v.constructor.name!=null&&v.constructor.name===A.name}function ae(v){return v!=v}var qe=(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(vt,Le){var M={parseBuffer:function(u){return new ce(u).parse()},addBoxProcessor:function(u,n){typeof u=="string"&&typeof n=="function"&&(I.prototype._boxProcessors[u]=n)},createFile:function(){return new ce},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)},Le.parseBuffer=M.parseBuffer,Le.addBoxProcessor=M.addBoxProcessor,Le.createFile=M.createFile,Le.createBox=M.createBox,Le.createFullBox=M.createFullBox,Le.Utils=M.Utils,M.Cursor=function(u){this.offset=u===void 0?0:u};var ce=function(u){this._cursor=new M.Cursor,this.boxes=[],u&&(this._raw=new DataView(u))};ce.prototype.fetch=function(u){var n=this.fetchAll(u,!0);return n.length?n[0]:null},ce.prototype.fetchAll=function(u,n){var _=[];return ce._sweep.call(this,u,_,n),_},ce.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},ce._sweep=function(u,n,_){for(var y in this.type&&this.type==u&&n.push(this),this.boxes){if(n.length&&_)return;ce._sweep.call(this.boxes[y],u,n,_)}},ce.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},ce.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(vt,Le,M){vt.exports=M(7365).polyfill()},7365:function(vt,Le,M){vt.exports=(function(){function ce(ee){return typeof ee=="function"}var I=Array.isArray?Array.isArray:function(ee){return Object.prototype.toString.call(ee)==="[object Array]"},u=0,n=void 0,_=void 0,y=function(ee,ae){T[u]=ee,T[u+1]=ae,(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 ee=setTimeout;return function(){return ee(q,1)}}var T=new Array(1e3);function q(){for(var ee=0;ee<u;ee+=2)(0,T[ee])(T[ee+1]),T[ee]=void 0,T[ee+1]=void 0;u=0}var W,x,ne,O,J=void 0;function pe(ee,ae){var qe=this,v=new this.constructor(re);v[X]===void 0&&At(v);var A=qe._state;if(A){var c=arguments[A-1];y((function(){return Oe(A,v,c,qe._result)}))}else it(qe,v,ee,ae);return v}function G(ee){if(ee&&typeof ee=="object"&&ee.constructor===this)return ee;var ae=new this(re);return je(ae,ee),ae}J=r?function(){return process.nextTick(q)}:g?(x=0,ne=new g(q),O=document.createTextNode(""),ne.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 ee=Function("return this")().require("vertx");return(n=ee.runOnLoop||ee.runOnContext)!==void 0?function(){n(q)}:d()}catch{return d()}})():d();var X=Math.random().toString(36).substring(2);function re(){}var be=void 0,Ue=1,me=2;function le(ee,ae,qe){ae.constructor===ee.constructor&&qe===pe&&ae.constructor.resolve===G?(function(v,A){A._state===Ue?Ne(v,A._result):A._state===me?He(v,A._result):it(A,void 0,(function(c){return je(v,c)}),(function(c){return He(v,c)}))})(ee,ae):qe===void 0?Ne(ee,ae):ce(qe)?(function(v,A,c){y((function(E){var Q=!1,D=(function(Be,De,Ae,Re){try{Be.call(De,Ae,Re)}catch(_e){return _e}})(c,A,(function(Be){Q||(Q=!0,A!==Be?je(E,Be):Ne(E,Be))}),(function(Be){Q||(Q=!0,He(E,Be))}),E._label);!Q&&D&&(Q=!0,He(E,D))}),v)})(ee,ae,qe):Ne(ee,ae)}function je(ee,ae){if(ee===ae)He(ee,new TypeError("You cannot resolve a promise with itself"));else if(A=typeof(v=ae),v===null||A!=="object"&&A!=="function")Ne(ee,ae);else{var qe=void 0;try{qe=ae.then}catch(c){return void He(ee,c)}le(ee,ae,qe)}var v,A}function Se(ee){ee._onerror&&ee._onerror(ee._result),Ie(ee)}function Ne(ee,ae){ee._state===be&&(ee._result=ae,ee._state=Ue,ee._subscribers.length!==0&&y(Ie,ee))}function He(ee,ae){ee._state===be&&(ee._state=me,ee._result=ae,y(Se,ee))}function it(ee,ae,qe,v){var A=ee._subscribers,c=A.length;ee._onerror=null,A[c]=ae,A[c+Ue]=qe,A[c+me]=v,c===0&&ee._state&&y(Ie,ee)}function Ie(ee){var ae=ee._subscribers,qe=ee._state;if(ae.length!==0){for(var v=void 0,A=void 0,c=ee._result,E=0;E<ae.length;E+=3)v=ae[E],A=ae[E+qe],v?Oe(qe,v,A,c):A(c);ee._subscribers.length=0}}function Oe(ee,ae,qe,v){var A=ce(qe),c=void 0,E=void 0,Q=!0;if(A){try{c=qe(v)}catch(D){Q=!1,E=D}if(ae===c)return void He(ae,new TypeError("A promises callback cannot return that same promise."))}else c=v;ae._state!==be||(A&&Q?je(ae,c):Q===!1?He(ae,E):ee===Ue?Ne(ae,c):ee===me&&He(ae,c))}var ft=0;function At(ee){ee[X]=ft++,ee._state=void 0,ee._result=void 0,ee._subscribers=[]}var Rt=(function(){function ee(ae,qe){this._instanceConstructor=ae,this.promise=new ae(re),this.promise[X]||At(this.promise),I(qe)?(this.length=qe.length,this._remaining=qe.length,this._result=new Array(this.length),this.length===0?Ne(this.promise,this._result):(this.length=this.length||0,this._enumerate(qe),this._remaining===0&&Ne(this.promise,this._result))):He(this.promise,new Error("Array Methods must be provided an Array"))}return ee.prototype._enumerate=function(ae){for(var qe=0;this._state===be&&qe<ae.length;qe++)this._eachEntry(ae[qe],qe)},ee.prototype._eachEntry=function(ae,qe){var v=this._instanceConstructor,A=v.resolve;if(A===G){var c=void 0,E=void 0,Q=!1;try{c=ae.then}catch(Be){Q=!0,E=Be}if(c===pe&&ae._state!==be)this._settledAt(ae._state,qe,ae._result);else if(typeof c!="function")this._remaining--,this._result[qe]=ae;else if(v===Pt){var D=new v(re);Q?He(D,E):le(D,ae,c),this._willSettleAt(D,qe)}else this._willSettleAt(new v((function(Be){return Be(ae)})),qe)}else this._willSettleAt(A(ae),qe)},ee.prototype._settledAt=function(ae,qe,v){var A=this.promise;A._state===be&&(this._remaining--,ae===me?He(A,v):this._result[qe]=v),this._remaining===0&&Ne(A,this._result)},ee.prototype._willSettleAt=function(ae,qe){var v=this;it(ae,void 0,(function(A){return v._settledAt(Ue,qe,A)}),(function(A){return v._settledAt(me,qe,A)}))},ee})(),Pt=(function(){function ee(ae){this[X]=ft++,this._result=this._state=void 0,this._subscribers=[],re!==ae&&(typeof ae!="function"&&(function(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")})(),this instanceof ee?(function(qe,v){try{v((function(A){je(qe,A)}),(function(A){He(qe,A)}))}catch(A){He(qe,A)}})(this,ae):(function(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")})())}return ee.prototype.catch=function(ae){return this.then(null,ae)},ee.prototype.finally=function(ae){var qe=this,v=qe.constructor;return ce(ae)?qe.then((function(A){return v.resolve(ae()).then((function(){return A}))}),(function(A){return v.resolve(ae()).then((function(){throw A}))})):qe.then(ae,ae)},ee})();return Pt.prototype.then=pe,Pt.all=function(ee){return new Rt(this,ee).promise},Pt.race=function(ee){var ae=this;return I(ee)?new ae((function(qe,v){for(var A=ee.length,c=0;c<A;c++)ae.resolve(ee[c]).then(qe,v)})):new ae((function(qe,v){return v(new TypeError("You must pass an array to race."))}))},Pt.resolve=G,Pt.reject=function(ee){var ae=new this(re);return He(ae,ee),ae},Pt._setScheduler=function(ee){_=ee},Pt._setAsap=function(ee){y=ee},Pt._asap=y,Pt.polyfill=function(){var ee=void 0;if(M.g!==void 0)ee=M.g;else if(typeof self<"u")ee=self;else try{ee=Function("return this")()}catch{throw new Error("polyfill failed because global object is unavailable in this environment")}var ae=ee.Promise;if(ae){var qe=null;try{qe=Object.prototype.toString.call(ae.resolve())}catch{}if(qe==="[object Promise]"&&!ae.cast)return}ee.Promise=Pt},Pt.Promise=Pt,Pt})()},5572:function(vt){var Le,M=typeof Reflect=="object"?Reflect:null,ce=M&&typeof M.apply=="function"?M.apply:function(q,W,x){return Function.prototype.apply.call(q,W,x)};Le=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)}vt.exports=u,vt.exports.once=function(q,W){return new Promise((function(x,ne){function O(pe){q.removeListener(W,J),ne(pe)}function J(){typeof q.removeListener=="function"&&q.removeListener("error",O),x([].slice.call(arguments))}T(q,W,J,{once:!0}),W!=="error"&&(function(pe,G){typeof pe.on=="function"&&T(pe,"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,ne){var O,J,pe,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),pe=J[W]),pe===void 0)pe=J[W]=x,++q._eventsCount;else if(typeof pe=="function"?pe=J[W]=ne?[x,pe]:[pe,x]:ne?pe.unshift(x):pe.push(x),(O=y(q))>0&&pe.length>O&&!pe.warned){pe.warned=!0;var X=new Error("Possible EventEmitter memory leak detected. "+pe.length+" "+String(W)+" listeners added. Use emitter.setMaxListeners() to increase limit");X.name="MaxListenersExceededWarning",X.emitter=q,X.type=W,X.count=pe.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 ne={fired:!1,wrapFn:void 0,target:q,type:W,listener:x},O=h.bind(ne);return O.listener=x,ne.wrapFn=O,O}function r(q,W,x){var ne=q._events;if(ne===void 0)return[];var O=ne[W];return O===void 0?[]:typeof O=="function"?x?[O.listener||O]:[O]:x?(function(J){for(var pe=new Array(J.length),G=0;G<pe.length;++G)pe[G]=J[G].listener||J[G];return pe})(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),ne=0;ne<W;++ne)x[ne]=q[ne];return x}function T(q,W,x,ne){if(typeof q.on=="function")ne.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){ne.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 ne=q==="error",O=this._events;if(O!==void 0)ne=ne&&O.error===void 0;else if(!ne)return!1;if(ne){var J;if(W.length>0&&(J=W[0]),J instanceof Error)throw J;var pe=new Error("Unhandled error."+(J?" ("+J.message+")":""));throw pe.context=J,pe}var G=O[q];if(G===void 0)return!1;if(typeof G=="function")ce(G,this,W);else{var X=G.length,re=d(G,X);for(x=0;x<X;++x)ce(re[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,ne,O,J,pe;if(_(W),(ne=this._events)===void 0)return this;if((x=ne[q])===void 0)return this;if(x===W||x.listener===W)--this._eventsCount==0?this._events=Object.create(null):(delete ne[q],ne.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){pe=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&&(ne[q]=x[0]),ne.removeListener!==void 0&&this.emit("removeListener",q,pe||W)}return this},u.prototype.off=u.prototype.removeListener,u.prototype.removeAllListeners=function(q){var W,x,ne;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(ne=0;ne<J.length;++ne)(O=J[ne])!=="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(ne=W.length-1;ne>=0;ne--)this.removeListener(q,W[ne]);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?Le(this._events):[]}},426:function(vt){var Le=Array.isArray,M=Object.keys,ce=Object.prototype.hasOwnProperty;vt.exports=function I(u,n){if(u===n)return!0;if(u&&n&&typeof u=="object"&&typeof n=="object"){var _,y,i,h=Le(u),g=Le(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(!ce.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(vt,Le){Le.read=function(M,ce,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[ce+m];for(m+=d,_=T&(1<<-r)-1,T>>=-r,r+=i;r>0;_=256*_+M[ce+m],m+=d,r-=8);for(y=_&(1<<-r)-1,_>>=-r,r+=u;r>0;y=256*y+M[ce+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)},Le.write=function(M,ce,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=ce<0||ce===0&&1/ce<0?1:0;for(ce=Math.abs(ce),isNaN(ce)||ce===1/0?(i=isNaN(ce)?1:0,y=r):(y=Math.floor(Math.log(ce)/Math.LN2),ce*(h=Math.pow(2,-y))<1&&(y--,h*=2),(ce+=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=(ce*h-1)*Math.pow(2,n),y+=m):(i=ce*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(vt,Le,M){(function(ce){ce.parser=function(c,E){return new n(c,E)},ce.SAXParser=n,ce.SAXStream=y,ce.createStream=function(c,E){return new y(c,E)},ce.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 Be=0,De=u.length;Be<De;Be++)D[u[Be]]=""})(Q),Q.q=Q.c="",Q.bufferCheckPosition=ce.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=le.BEGIN,Q.strictEntities=Q.opt.strictEntities,Q.ENTITIES=Q.strictEntities?Object.create(ce.XML_ENTITIES):Object.create(ce.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),Se(Q,"onready")}ce.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(){Oe(this)},write:function(c){var E=this;if(this.error)throw this.error;if(E.closed)return Ie(E,"Cannot write after close. Assign an onready handler.");if(c===null)return Oe(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
19
  `?(E.line++,E.column=0):E.column++),E.state){case le.BEGIN:if(E.state=le.BEGIN_WHITESPACE,D==="\uFEFF")continue;v(E,D);continue;case le.BEGIN_WHITESPACE:v(E,D);continue;case le.TEXT:if(E.sawRoot&&!E.closedRoot){for(var Be=Q-1;D&&D!=="<"&&D!=="&";)(D=A(c,Q++))&&E.trackPosition&&(E.position++,D===`
20
20
  `?(E.line++,E.column=0):E.column++);E.textNode+=c.substring(Be,Q-1)}D!=="<"||E.sawRoot&&E.closedRoot&&!E.strict?(!re(i,D)||E.sawRoot&&!E.closedRoot||ft(E,"Text data outside of root node."),D==="&"?E.state=le.TEXT_ENTITY:E.textNode+=D):(E.state=le.OPEN_WAKA,E.startTagPosition=E.position);continue;case le.SCRIPT:D==="<"?E.state=le.SCRIPT_ENDING:E.script+=D;continue;case le.SCRIPT_ENDING:D==="/"?E.state=le.CLOSE_TAG:(E.script+="<"+D,E.state=le.SCRIPT);continue;case le.OPEN_WAKA:if(D==="!")E.state=le.SGML_DECL,E.sgmlDecl="";else if(!X(i,D))if(X(ne,D))E.state=le.OPEN_TAG,E.tagName=D;else if(D==="/")E.state=le.CLOSE_TAG,E.tagName="";else if(D==="?")E.state=le.PROC_INST,E.procInstName=E.procInstBody="";else{if(ft(E,"Unencoded <"),E.startTagPosition+1<E.position){var De=E.position-E.startTagPosition;D=new Array(De).join(" ")+D}E.textNode+="<"+D,E.state=le.TEXT}continue;case le.SGML_DECL:(E.sgmlDecl+D).toUpperCase()===d?(Ne(E,"onopencdata"),E.state=le.CDATA,E.sgmlDecl="",E.cdata=""):E.sgmlDecl+D==="--"?(E.state=le.COMMENT,E.comment="",E.sgmlDecl=""):(E.sgmlDecl+D).toUpperCase()===T?(E.state=le.DOCTYPE,(E.doctype||E.sawRoot)&&ft(E,"Inappropriately located doctype declaration"),E.doctype="",E.sgmlDecl=""):D===">"?(Ne(E,"onsgmldeclaration",E.sgmlDecl),E.sgmlDecl="",E.state=le.TEXT):(X(r,D)&&(E.state=le.SGML_DECL_QUOTED),E.sgmlDecl+=D);continue;case le.SGML_DECL_QUOTED:D===E.q&&(E.state=le.SGML_DECL,E.q=""),E.sgmlDecl+=D;continue;case le.DOCTYPE:D===">"?(E.state=le.TEXT,Ne(E,"ondoctype",E.doctype),E.doctype=!0):(E.doctype+=D,D==="["?E.state=le.DOCTYPE_DTD:X(r,D)&&(E.state=le.DOCTYPE_QUOTED,E.q=D));continue;case le.DOCTYPE_QUOTED:E.doctype+=D,D===E.q&&(E.q="",E.state=le.DOCTYPE);continue;case le.DOCTYPE_DTD:E.doctype+=D,D==="]"?E.state=le.DOCTYPE:X(r,D)&&(E.state=le.DOCTYPE_DTD_QUOTED,E.q=D);continue;case le.DOCTYPE_DTD_QUOTED:E.doctype+=D,D===E.q&&(E.state=le.DOCTYPE_DTD,E.q="");continue;case le.COMMENT:D==="-"?E.state=le.COMMENT_ENDING:E.comment+=D;continue;case le.COMMENT_ENDING:D==="-"?(E.state=le.COMMENT_ENDED,E.comment=it(E.opt,E.comment),E.comment&&Ne(E,"oncomment",E.comment),E.comment=""):(E.comment+="-"+D,E.state=le.COMMENT);continue;case le.COMMENT_ENDED:D!==">"?(ft(E,"Malformed comment"),E.comment+="--"+D,E.state=le.COMMENT):E.state=le.TEXT;continue;case le.CDATA:D==="]"?E.state=le.CDATA_ENDING:E.cdata+=D;continue;case le.CDATA_ENDING:D==="]"?E.state=le.CDATA_ENDING_2:(E.cdata+="]"+D,E.state=le.CDATA);continue;case le.CDATA_ENDING_2:D===">"?(E.cdata&&Ne(E,"oncdata",E.cdata),Ne(E,"onclosecdata"),E.cdata="",E.state=le.TEXT):D==="]"?E.cdata+="]":(E.cdata+="]]"+D,E.state=le.CDATA);continue;case le.PROC_INST:D==="?"?E.state=le.PROC_INST_ENDING:X(i,D)?E.state=le.PROC_INST_BODY:E.procInstName+=D;continue;case le.PROC_INST_BODY:if(!E.procInstBody&&X(i,D))continue;D==="?"?E.state=le.PROC_INST_ENDING:E.procInstBody+=D;continue;case le.PROC_INST_ENDING:D===">"?(Ne(E,"onprocessinginstruction",{name:E.procInstName,body:E.procInstBody}),E.procInstName=E.procInstBody="",E.state=le.TEXT):(E.procInstBody+="?"+D,E.state=le.PROC_INST_BODY);continue;case le.OPEN_TAG:X(O,D)?E.tagName+=D:(At(E),D===">"?ee(E):D==="/"?E.state=le.OPEN_TAG_SLASH:(re(i,D)&&ft(E,"Invalid character in tag name"),E.state=le.ATTRIB));continue;case le.OPEN_TAG_SLASH:D===">"?(ee(E,!0),ae(E)):(ft(E,"Forward-slash in opening tag not followed by >"),E.state=le.ATTRIB);continue;case le.ATTRIB:if(X(i,D))continue;D===">"?ee(E):D==="/"?E.state=le.OPEN_TAG_SLASH:X(ne,D)?(E.attribName=D,E.attribValue="",E.state=le.ATTRIB_NAME):ft(E,"Invalid attribute name");continue;case le.ATTRIB_NAME:D==="="?E.state=le.ATTRIB_VALUE:D===">"?(ft(E,"Attribute without value"),E.attribValue=E.attribName,Pt(E),ee(E)):X(i,D)?E.state=le.ATTRIB_NAME_SAW_WHITE:X(O,D)?E.attribName+=D:ft(E,"Invalid attribute name");continue;case le.ATTRIB_NAME_SAW_WHITE:if(D==="=")E.state=le.ATTRIB_VALUE;else{if(X(i,D))continue;ft(E,"Attribute without value"),E.tag.attributes[E.attribName]="",E.attribValue="",Ne(E,"onattribute",{name:E.attribName,value:""}),E.attribName="",D===">"?ee(E):X(ne,D)?(E.attribName=D,E.state=le.ATTRIB_NAME):(ft(E,"Invalid attribute name"),E.state=le.ATTRIB)}continue;case le.ATTRIB_VALUE:if(X(i,D))continue;X(r,D)?(E.q=D,E.state=le.ATTRIB_VALUE_QUOTED):(ft(E,"Unquoted attribute value"),E.state=le.ATTRIB_VALUE_UNQUOTED,E.attribValue=D);continue;case le.ATTRIB_VALUE_QUOTED:if(D!==E.q){D==="&"?E.state=le.ATTRIB_VALUE_ENTITY_Q:E.attribValue+=D;continue}Pt(E),E.q="",E.state=le.ATTRIB_VALUE_CLOSED;continue;case le.ATTRIB_VALUE_CLOSED:X(i,D)?E.state=le.ATTRIB:D===">"?ee(E):D==="/"?E.state=le.OPEN_TAG_SLASH:X(ne,D)?(ft(E,"No whitespace between attributes"),E.attribName=D,E.attribValue="",E.state=le.ATTRIB_NAME):ft(E,"Invalid attribute name");continue;case le.ATTRIB_VALUE_UNQUOTED:if(re(m,D)){D==="&"?E.state=le.ATTRIB_VALUE_ENTITY_U:E.attribValue+=D;continue}Pt(E),D===">"?ee(E):E.state=le.ATTRIB;continue;case le.CLOSE_TAG:if(E.tagName)D===">"?ae(E):X(O,D)?E.tagName+=D:E.script?(E.script+="</"+E.tagName,E.tagName="",E.state=le.SCRIPT):(re(i,D)&&ft(E,"Invalid tagname in closing tag"),E.state=le.CLOSE_TAG_SAW_WHITE);else{if(X(i,D))continue;re(ne,D)?E.script?(E.script+="</"+D,E.state=le.SCRIPT):ft(E,"Invalid tagname in closing tag."):E.tagName=D}continue;case le.CLOSE_TAG_SAW_WHITE:if(X(i,D))continue;D===">"?ae(E):ft(E,"Invalid characters in closing tag");continue;case le.TEXT_ENTITY:case le.ATTRIB_VALUE_ENTITY_Q:case le.ATTRIB_VALUE_ENTITY_U:var Ae,Re;switch(E.state){case le.TEXT_ENTITY:Ae=le.TEXT,Re="textNode";break;case le.ATTRIB_VALUE_ENTITY_Q:Ae=le.ATTRIB_VALUE_QUOTED,Re="attribValue";break;case le.ATTRIB_VALUE_ENTITY_U:Ae=le.ATTRIB_VALUE_UNQUOTED,Re="attribValue"}D===";"?(E[Re]+=qe(E),E.entity="",E.state=Ae):X(E.entity.length?pe:J,D)?E.entity+=D:(ft(E,"Invalid character in entity name"),E[Re]+="&"+E.entity+D,E.entity="",E.state=Ae);continue;default:throw new Error(E,"Unknown state: "+E.state)}return E.position>=E.bufferCheckPosition&&(function(_e){for(var Ye=Math.max(ce.MAX_BUFFER_LENGTH,10),Ve=0,Xe=0,nt=u.length;Xe<nt;Xe++){var Tt=_e[u[Xe]].length;if(Tt>Ye)switch(u[Xe]){case"textNode":He(_e);break;case"cdata":Ne(_e,"oncdata",_e.cdata),_e.cdata="";break;case"script":Ne(_e,"onscript",_e.script),_e.script="";break;default:Ie(_e,"Max buffer length exceeded: "+u[Xe])}Ve=Math.max(Ve,Tt)}var mt=ce.MAX_BUFFER_LENGTH-Ve;_e.bufferCheckPosition=mt+_e.position})(E),E},resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){var c;He(c=this),c.cdata!==""&&(Ne(c,"oncdata",c.cdata),c.cdata=""),c.script!==""&&(Ne(c,"onscript",c.script),c.script="")}};try{I=M(7205).Stream}catch{I=function(){}}var _=ce.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(Be){if(!Be)return Q.removeAllListeners(D),Q._parser["on"+D]=Be,Be;Q.on(D,Be)},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
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 ne=/[:_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]/,pe=/[#:_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 re(c,E){return!X(c,E)}r=G(r),m=G(m);var be,Ue,me,le=0;for(var je in ce.STATE={BEGIN:le++,BEGIN_WHITESPACE:le++,TEXT:le++,TEXT_ENTITY:le++,OPEN_WAKA:le++,SGML_DECL:le++,SGML_DECL_QUOTED:le++,DOCTYPE:le++,DOCTYPE_QUOTED:le++,DOCTYPE_DTD:le++,DOCTYPE_DTD_QUOTED:le++,COMMENT_STARTING:le++,COMMENT:le++,COMMENT_ENDING:le++,COMMENT_ENDED:le++,CDATA:le++,CDATA_ENDING:le++,CDATA_ENDING_2:le++,PROC_INST:le++,PROC_INST_BODY:le++,PROC_INST_ENDING:le++,OPEN_TAG:le++,OPEN_TAG_SLASH:le++,ATTRIB:le++,ATTRIB_NAME:le++,ATTRIB_NAME_SAW_WHITE:le++,ATTRIB_VALUE:le++,ATTRIB_VALUE_QUOTED:le++,ATTRIB_VALUE_CLOSED:le++,ATTRIB_VALUE_UNQUOTED:le++,ATTRIB_VALUE_ENTITY_Q:le++,ATTRIB_VALUE_ENTITY_U:le++,CLOSE_TAG:le++,CLOSE_TAG_SAW_WHITE:le++,SCRIPT:le++,SCRIPT_ENDING:le++},ce.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},ce.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(ce.ENTITIES).forEach((function(c){var E=ce.ENTITIES[c],Q=typeof E=="number"?String.fromCharCode(E):E;ce.ENTITIES[c]=Q})),ce.STATE)ce.STATE[ce.STATE[je]]=je;function Se(c,E,Q){c[E]&&c[E](Q)}function Ne(c,E,Q){c.textNode&&He(c),Se(c,E,Q)}function He(c){c.textNode=it(c.opt,c.textNode),c.textNode&&Se(c,"ontext",c.textNode),c.textNode=""}function it(c,E){return c.trim&&(E=E.trim()),c.normalize&&(E=E.replace(/\s+/g," ")),E}function Ie(c,E){return He(c),c.trackPosition&&(E+=`
@@ -23,4 +23,4 @@ Line: `+c.line+`
23
23
  Column: `+c.column+`
24
24
  Char: `+c.c),E=new Error(E),c.error=E,Se(c,"onerror",E),c}function Oe(c){return c.sawRoot&&!c.closedRoot&&ft(c,"Unclosed root tag"),c.state!==le.BEGIN&&c.state!==le.BEGIN_WHITESPACE&&c.state!==le.TEXT&&Ie(c,"Unexpected end"),He(c),c.c="",c.closed=!0,Se(c,"onend"),n.call(c,c.strict,c.opt),c}function ft(c,E){if(typeof c!="object"||!(c instanceof n))throw new Error("bad call to strictFail");c.strict&&Ie(c,E)}function At(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,Ne(c,"onopentagstart",Q)}function Rt(c,E){var Q=c.indexOf(":")<0?["",c]:c.split(":"),D=Q[0],Be=Q[1];return E&&c==="xmlns"&&(D="xmlns",Be=""),{prefix:D,local:Be}}function Pt(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=Rt(c.attribName,!0),Q=E.prefix,D=E.local;if(Q==="xmlns")if(D==="xml"&&c.attribValue!==q)ft(c,"xml: prefix must be bound to "+q+`
25
25
  Actual: `+c.attribValue);else if(D==="xmlns"&&c.attribValue!==W)ft(c,"xmlns: prefix must be bound to "+W+`
26
- Actual: `+c.attribValue);else{var Be=c.tag,De=c.tags[c.tags.length-1]||c;Be.ns===De.ns&&(Be.ns=Object.create(De.ns)),Be.ns[D]=c.attribValue}c.attribList.push([c.attribName,c.attribValue])}else c.tag.attributes[c.attribName]=c.attribValue,Ne(c,"onattribute",{name:c.attribName,value:c.attribValue});c.attribName=c.attribValue=""}}function ee(c,E){if(c.opt.xmlns){var Q=c.tag,D=Rt(c.tagName);Q.prefix=D.prefix,Q.local=D.local,Q.uri=Q.ns[D.prefix]||"",Q.prefix&&!Q.uri&&(ft(c,"Unbound namespace prefix: "+JSON.stringify(c.tagName)),Q.uri=D.prefix);var Be=c.tags[c.tags.length-1]||c;Q.ns&&Be.ns!==Q.ns&&Object.keys(Q.ns).forEach((function(Ut){Ne(c,"onopennamespace",{prefix:Ut,uri:Q.ns[Ut]})}));for(var De=0,Ae=c.attribList.length;De<Ae;De++){var Re=c.attribList[De],_e=Re[0],Ye=Re[1],Ve=Rt(_e,!0),Xe=Ve.prefix,nt=Ve.local,Tt=Xe===""?"":Q.ns[Xe]||"",mt={name:_e,value:Ye,prefix:Xe,local:nt,uri:Tt};Xe&&Xe!=="xmlns"&&!Tt&&(ft(c,"Unbound namespace prefix: "+JSON.stringify(Xe)),mt.uri=Xe),c.tag.attributes[_e]=mt,Ne(c,"onattribute",mt)}c.attribList.length=0}c.tag.isSelfClosing=!!E,c.sawRoot=!0,c.tags.push(c.tag),Ne(c,"onopentag",c.tag),E||(c.noscript||c.tagName.toLowerCase()!=="script"?c.state=le.TEXT:c.state=le.SCRIPT,c.tag=null,c.tagName=""),c.attribName=c.attribValue="",c.attribList.length=0}function ae(c){if(!c.tagName)return ft(c,"Weird empty close tag."),c.textNode+="</>",void(c.state=le.TEXT);if(c.script){if(c.tagName!=="script")return c.script+="</"+c.tagName+">",c.tagName="",void(c.state=le.SCRIPT);Ne(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;)ft(c,"Unexpected close tag");if(E<0)return ft(c,"Unmatched closing tag: "+c.tagName),c.textNode+="</"+c.tagName+">",void(c.state=le.TEXT);c.tagName=Q;for(var Be=c.tags.length;Be-- >E;){var De=c.tag=c.tags.pop();c.tagName=c.tag.name,Ne(c,"onclosetag",c.tagName);var Ae={};for(var Re in De.ns)Ae[Re]=De.ns[Re];var _e=c.tags[c.tags.length-1]||c;c.opt.xmlns&&De.ns!==_e.ns&&Object.keys(De.ns).forEach((function(Ye){var Ve=De.ns[Ye];Ne(c,"onclosenamespace",{prefix:Ye,uri:Ve})}))}E===0&&(c.closedRoot=!0),c.tagName=c.attribValue=c.attribName="",c.attribList.length=0,c.state=le.TEXT}function qe(c){var E,Q=c.entity,D=Q.toLowerCase(),Be="";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),Be=(E=parseInt(Q,16)).toString(16)):(Q=Q.slice(1),Be=(E=parseInt(Q,10)).toString(10))),Q=Q.replace(/^0+/,""),Be.toLowerCase()!==Q?(ft(c,"Invalid character entity"),"&"+c.entity+";"):String.fromCodePoint(E))}function v(c,E){E==="<"?(c.state=le.OPEN_WAKA,c.startTagPosition=c.position):re(i,E)&&(ft(c,"Non-whitespace before first tag."),c.textNode=E,c.state=le.TEXT)}function A(c,E){var Q="";return E<c.length&&(Q=c.charAt(E)),Q}le=ce.STATE,String.fromCodePoint||(be=String.fromCharCode,Ue=Math.floor,me=function(){var c,E,Q=[],D=-1,Be=arguments.length;if(!Be)return"";for(var De="";++D<Be;){var Ae=Number(arguments[D]);if(!isFinite(Ae)||Ae<0||Ae>1114111||Ue(Ae)!==Ae)throw RangeError("Invalid code point: "+Ae);Ae<=65535?Q.push(Ae):(c=55296+((Ae-=65536)>>10),E=Ae%1024+56320,Q.push(c,E)),(D+1===Be||Q.length>16384)&&(De+=be.apply(null,Q),Q.length=0)}return De},Object.defineProperty?Object.defineProperty(String,"fromCodePoint",{value:me,configurable:!0,writable:!0}):String.fromCodePoint=me)})(Le)},4421:function(vt,Le,M){(function(ce,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",Be=0;Q&&(Be=D&&E?E.end:Q.begin),c.begin=c.explicit_begin?c.explicit_begin+Be:Be;var De=c.begin,Ae=null;if("sets"in c)for(var Re=0;Re<c.sets.length;Re++)i(A,c.sets[Re],Ae,c),De=c.timeContainer==="seq"?c.sets[Re].end:Math.max(De,c.sets[Re].end),Ae=c.sets[Re];if("contents"in c){if("contents"in c)for(var _e=0;_e<c.contents.length;_e++)i(A,c.contents[_e],Ae,c),De=c.timeContainer==="seq"?c.contents[_e].end:Math.max(De,c.contents[_e].end),Ae=c.contents[_e]}else De=D?c.begin:Number.POSITIVE_INFINITY;c.explicit_end!==null&&c.explicit_dur!==null?c.end=Math.min(c.begin+c.explicit_dur,Be+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=Be+c.explicit_end:c.end=De,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 ne(A){this.id=A}function O(A){this.regionID=A}function J(A){this.styleAttrs=A}function pe(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 re(){x.call(this,"body")}function be(){x.call(this,"div")}function Ue(){x.call(this,"p")}function me(){x.call(this,"span")}function le(){x.call(this,"span")}function je(){x.call(this,"br")}function Se(){}function Ne(){}function He(A){return A&&"xml:id"in A.attributes&&A.attributes["xml:id"].value||null}function it(A){return A&&"style"in A.attributes?A.attributes.style.value.split(" "):[]}function Ie(A,c){var E={};if(A!==null)for(var Q in A.attributes){var D=A.attributes[Q].uri+" "+A.attributes[Q].local,Be=n.byQName[D];if(Be!==void 0){var De=Be.parse(A.attributes[Q].value);De!==null?(E[D]=De,Be===n.byName.zIndex&&ee(c,"zIndex attribute present but not used by IMSC1 since regions do not overlap")):ae(c,"Cannot parse styling attribute "+D+" --> "+A.attributes[Q].value)}}return E}function Oe(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 ft(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 At(A,c,E){for(;c.styleRefs.length>0;){var Q=c.styleRefs.pop();Q in A.styles?(At(A,A.styles[Q],E),Pt(A.styles[Q].styleAttrs,c.styleAttrs)):ae(E,"Non-existant style id referenced")}}function Rt(A,c,E,Q){for(var D=c.length-1;D>=0;D--){var Be=c[D];Be in A.styles?Pt(A.styles[Be].styleAttrs,E):ae(Q,"Non-existant style id referenced")}}function Pt(A,c){for(var E in A)A.hasOwnProperty(E)&&(E in c||(c[E]=A[E]))}function ee(A,c){if(A&&A.warn&&A.warn(c))throw c}function ae(A,c){if(A&&A.error&&A.error(c))throw c}function qe(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 Be=A[E=Math.floor((Q+D)/2)];if(Be<c)Q=E+1;else{if(!(Be>c))return{found:!0,index:E};D=E-1}}return{found:!1,index:Q}}ce.fromXML=function(A,c,E){var Q=I.parser(!0,{xmlns:!0}),D=[],Be=[],De=[],Ae=0,Re=null;Q.onclosetag=function(nt){if(D[0]instanceof Se)Re.head!==null&&Re.head.styling!==null&&Rt(Re.head.styling,D[0].styleRefs,D[0].styleAttrs,c),delete D[0].styleRefs;else if(D[0]instanceof m)for(var Tt in D[0].styles)D[0].styles.hasOwnProperty(Tt)&&At(D[0],D[0].styles[Tt],c);else if(D[0]instanceof Ue||D[0]instanceof me){if(D[0].contents.length>1){var mt,Ut=[D[0].contents[0]];for(mt=1;mt<D[0].contents.length;mt++)D[0].contents[mt]instanceof le&&Ut[Ut.length-1]instanceof le?Ut[Ut.length-1].text+=D[0].contents[mt].text:Ut.push(D[0].contents[mt]);D[0].contents=Ut}D[0]instanceof me&&D[0].contents.length===1&&D[0].contents[0]instanceof le&&(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"?Ae--:Ae>0&&E&&"onCloseTag"in E&&E.onCloseTag());De.shift(),Be.shift(),D.shift()},Q.ontext=function(nt){if(D[0]!==void 0)if(D[0]instanceof me||D[0]instanceof Ue){if(D[0]instanceof me){var Tt=D[0].styleAttrs[n.byName.ruby.qname];if(Tt==="container"||Tt==="textContainer"||Tt==="baseContainer")return}var mt=new le;mt.initFromText(Re,D[0],nt,Be[0],De[0],c),D[0].contents.push(mt)}else D[0]instanceof h&&Ae>0&&E&&"onText"in E&&E.onText(nt)},Q.onopentag=function(nt){var Tt=nt.attributes["xml:space"];Tt?De.unshift(Tt.value):De.length===0?De.unshift("default"):De.unshift(De[0]);var mt=nt.attributes["xml:lang"];if(mt?Be.unshift(mt.value):Be.length===0?Be.unshift(""):Be.unshift(Be[0]),nt.uri===u.ns_tt)if(nt.local==="tt")Re!==null&&qe(c,"Two <tt> elements at ("+this.line+","+this.column+")"),(Re=new g).initFromNode(nt,Be[0],c),D.unshift(Re);else if(nt.local==="head")D[0]instanceof g||qe(c,"Parent of <head> element is not <tt> at ("+this.line+","+this.column+")"),D.unshift(Re.head);else if(nt.local==="styling")D[0]instanceof r||qe(c,"Parent of <styling> element is not <head> at ("+this.line+","+this.column+")"),D.unshift(Re.head.styling);else if(nt.local==="style"){var Ut;D[0]instanceof m?((Ut=new d).initFromNode(nt,c),Ut.id?Re.head.styling.styles[Ut.id]=Ut:ae(c,"<style> element missing @id attribute"),D.unshift(Ut)):D[0]instanceof Se?((Ut=new d).initFromNode(nt,c),Pt(Ut.styleAttrs,D[0].styleAttrs),D.unshift(Ut)):qe(c,"Parent of <style> element is not <styling> or <region> at ("+this.line+","+this.column+")")}else if(nt.local==="initial"){var Mt;if(D[0]instanceof m){for(var zt in(Mt=new T).initFromNode(nt,c),Mt.styleAttrs)Mt.styleAttrs.hasOwnProperty(zt)&&(Re.head.styling.initials[zt]=Mt.styleAttrs[zt]);D.unshift(Mt)}else qe(c,"Parent of <initial> element is not <styling> at ("+this.line+","+this.column+")")}else if(nt.local==="layout")D[0]instanceof r||qe(c,"Parent of <layout> element is not <head> at "+this.line+","+this.column+")"),D.unshift(Re.head.layout);else if(nt.local==="region"){D[0]instanceof q||qe(c,"Parent of <region> element is not <layout> at "+this.line+","+this.column+")");var Qt=new Se;Qt.initFromNode(Re,nt,Be[0],c),!Qt.id||Qt.id in Re.head.layout.regions?ae(c,"Ignoring <region> with duplicate or missing @id at "+this.line+","+this.column+")"):Re.head.layout.regions[Qt.id]=Qt,D.unshift(Qt)}else if(nt.local==="body"){D[0]instanceof g||qe(c,"Parent of <body> element is not <tt> at "+this.line+","+this.column+")"),Re.body!==null&&qe(c,"Second <body> element at "+this.line+","+this.column+")");var nn=new re;nn.initFromNode(Re,nt,Be[0],c),Re.body=nn,D.unshift(nn)}else if(nt.local==="div"){D[0]instanceof be||D[0]instanceof re||qe(c,"Parent of <div> element is not <body> or <div> at "+this.line+","+this.column+")");var yn=new be;yn.initFromNode(Re,D[0],nt,Be[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(nt.local==="image"){D[0]instanceof be||qe(c,"Parent of <image> element is not <div> at "+this.line+","+this.column+")");var Yn=new W;Yn.initFromNode(Re,D[0],nt,Be[0],c),D[0].contents.push(Yn),D.unshift(Yn)}else if(nt.local==="p"){D[0]instanceof be||qe(c,"Parent of <p> element is not <div> at "+this.line+","+this.column+")");var An=new Ue;An.initFromNode(Re,D[0],nt,Be[0],c),D[0].contents.push(An),D.unshift(An)}else if(nt.local==="span"){D[0]instanceof me||D[0]instanceof Ue||qe(c,"Parent of <span> element is not <span> or <p> at "+this.line+","+this.column+")");var Un=new me;Un.initFromNode(Re,D[0],nt,Be[0],De[0],c),D[0].contents.push(Un),D.unshift(Un)}else if(nt.local==="br"){D[0]instanceof me||D[0]instanceof Ue||qe(c,"Parent of <br> element is not <span> or <p> at "+this.line+","+this.column+")");var Sn=new je;Sn.initFromNode(Re,D[0],nt,Be[0],c),D[0].contents.push(Sn),D.unshift(Sn)}else if(nt.local==="set"){D[0]instanceof me||D[0]instanceof Ue||D[0]instanceof be||D[0]instanceof re||D[0]instanceof Se||D[0]instanceof je||qe(c,"Parent of <set> element is not a content element or a region at "+this.line+","+this.column+")");var kn=new Ne;kn.initFromNode(Re,D[0],nt,c),D[0].sets.push(kn),D.unshift(kn)}else D.unshift(new h(nt));else D.unshift(new h(nt));if(D[0]instanceof h){if(nt.uri===u.ns_tt&&nt.local==="metadata")Ae++;else if(Ae>0&&E&&"onOpenTag"in E){var Hn=[];for(var Kn in nt.attributes)Hn[nt.attributes[Kn].uri+" "+nt.attributes[Kn].local]={uri:nt.attributes[Kn].uri,local:nt.attributes[Kn].local,value:nt.attributes[Kn].value};E.onOpenTag(nt.uri,nt.local,Hn)}}},Q.write(A).close(),delete Re.head.styling.styles;var _e=!1;for(var Ye in Re.head.layout.regions)if(Re.head.layout.regions.hasOwnProperty(Ye)){_e=!0;break}if(!_e){var Ve=Se.prototype.createDefaultRegion(Re.lang);Re.head.layout.regions[Ve.id]=Ve}for(var Xe in Re.head.layout.regions)Re.head.layout.regions.hasOwnProperty(Xe)&&i(Re,Re.head.layout.regions[Xe],null,null);return Re.body&&i(Re,Re.body,null,null),Re.body&&y(Re.body),Re},g.prototype.initFromNode=function(A,c,E){var Q=(function(Ae,Re){var _e=Oe(Ae,u.ns_ttp,"cellResolution"),Ye=15,Ve=32;if(_e!==null){var Xe=/(\d+) (\d+)/.exec(_e);Xe!==null?(Ve=parseInt(Xe[1]),Ye=parseInt(Xe[2])):ee(Re,"Malformed cellResolution value (using initial value instead)")}return{w:Ve,h:Ye}})(A,E);this.cellLength={h:new _.ComputedLength(0,1/Q.h),w:new _.ComputedLength(1/Q.w,0)};var D=(function(Ae,Re){var _e,Ye=Oe(Ae,u.ns_ttp,"frameRate"),Ve=30;Ye!==null&&((_e=/(\d+)/.exec(Ye))!==null?Ve=parseInt(_e[1]):ee(Re,"Malformed frame rate attribute (using initial value instead)"));var Xe=Oe(Ae,u.ns_ttp,"frameRateMultiplier"),nt=1;Xe!==null&&((_e=/(\d+) (\d+)/.exec(Xe))!==null?nt=parseInt(_e[1])/parseInt(_e[2]):ee(Re,"Malformed frame rate multiplier attribute (using initial value instead)"));var Tt=nt*Ve,mt=1,Ut=Oe(Ae,u.ns_ttp,"tickRate");return Ut===null?Ye!==null&&(mt=Tt):(_e=/(\d+)/.exec(Ut))!==null?mt=parseInt(_e[1]):ee(Re,"Malformed tick rate attribute (using initial value instead)"),{effectiveFrameRate:Tt,tickRate:mt}})(A,E);this.effectiveFrameRate=D.effectiveFrameRate,this.tickRate=D.tickRate,this.aspectRatio=(function(Ae,Re){var _e=Oe(Ae,u.ns_ittp,"aspectRatio");_e===null&&(_e=Oe(Ae,u.ns_ttp,"displayAspectRatio"));var Ye=null;if(_e!==null){var Ve=/(\d+)\s+(\d+)/.exec(_e);if(Ve!==null){var Xe=parseInt(Ve[1]),nt=parseInt(Ve[2]);Xe!==0&&nt!==0?Ye=Xe/nt:ae(Re,"Illegal aspectRatio values (ignoring)")}else ae(Re,"Malformed aspectRatio attribute (ignoring)")}return Ye})(A,E);var Be=Oe(A,u.ns_ttp,"timeBase");Be!==null&&Be!=="media"&&qe(E,"Unsupported time base");var De=(function(Ae,Re){var _e=Oe(Ae,u.ns_tts,"extent");if(_e===null)return null;var Ye=_e.split(" ");if(Ye.length!==2)return ee(Re,"Malformed extent (ignoring)"),null;var Ve=_.parseLength(Ye[0]),Xe=_.parseLength(Ye[1]);return Xe&&Ve?{h:Xe,w:Ve}:(ee(Re,"Malformed extent values (ignoring)"),null)})(A,E);De===null?this.pxLength={h:null,w:null}:(De.h.unit==="px"&&De.w.unit==="px"||qe(E,"Extent on TT must be in px or absent"),this.pxLength={h:new _.ComputedLength(0,1/De.h.value),w:new _.ComputedLength(1/De.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=He(A),this.styleAttrs=Ie(A,c),this.styleRefs=it(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||ae(D,"Invalid image@src attribute"),this.type="type"in E.attributes?E.attributes.type.value:null,this.type||ae(D,"Invalid image@type attribute"),J.prototype.initFromNode.call(this,A,c,E,D),X.prototype.initFromNode.call(this,A,c,E,D),pe.prototype.initFromNode.call(this,A,c,E,D),O.prototype.initFromNode.call(this,A,c,E,D),this.lang=Q},ne.prototype.initFromNode=function(A,c,E,Q){this.id=He(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=Ie(E,Q),A.head!==null&&A.head.styling!==null&&Rt(A.head.styling,it(E),this.styleAttrs,Q)},pe.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(Be,De,Ae,Re){var _e=null;Ae&&"begin"in Ae.attributes&&(_e=ft(Be.tickRate,Be.effectiveFrameRate,Ae.attributes.begin.value))===null&&ee(Re,"Malformed begin value "+Ae.attributes.begin.value+" (using 0)");var Ye=null;Ae&&"dur"in Ae.attributes&&(Ye=ft(Be.tickRate,Be.effectiveFrameRate,Ae.attributes.dur.value))===null&&ee(Re,"Malformed dur value "+Ae.attributes.dur.value+" (ignoring)");var Ve=null;return Ae&&"end"in Ae.attributes&&(Ve=ft(Be.tickRate,Be.effectiveFrameRate,Ae.attributes.end.value))===null&&ee(Re,"Malformed end value (ignoring)"),{explicit_begin:_e,explicit_end:Ve,explicit_dur:Ye}})(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(Be,De){var Ae=Be&&"timeContainer"in Be.attributes?Be.attributes.timeContainer.value:null;return Ae&&Ae!=="par"?Ae==="seq"?"seq":(ae(De,"Illegal value of timeContainer (assuming 'par')"),"par"):"par"})(E,Q)},re.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),pe.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},be.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),pe.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},Ue.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),pe.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},me.prototype.initFromNode=function(A,c,E,Q,D,Be){J.prototype.initFromNode.call(this,A,c,E,Be),X.prototype.initFromNode.call(this,A,c,E,Be),pe.prototype.initFromNode.call(this,A,c,E,Be),O.prototype.initFromNode.call(this,A,c,E,Be),G.prototype.initFromNode.call(this,A,c,E,Be),this.space=D,this.lang=Q},le.prototype.initFromText=function(A,c,E,Q,D,Be){X.prototype.initFromNode.call(this,A,c,null,Be),this.text=E,this.space=D,this.lang=Q},je.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},Se.prototype.createDefaultRegion=function(A){var c=new Se;return ne.call(c,""),J.call(c,{}),pe.call(c,[]),X.call(c,0,Number.POSITIVE_INFINITY,null),this.lang=A,c},Se.prototype.initFromNode=function(A,c,E,Q){ne.prototype.initFromNode.call(this,A,null,c,Q),X.prototype.initFromNode.call(this,A,null,c,Q),pe.prototype.initFromNode.call(this,A,null,c,Q),this.styleAttrs=Ie(c,Q),this.styleRefs=it(c),this.lang=E},Ne.prototype.initFromNode=function(A,c,E,Q){X.prototype.initFromNode.call(this,A,c,E,Q);var D=Ie(E,Q);for(var Be in this.qname=null,this.value=null,D)if(D.hasOwnProperty(Be)){if(this.qname){ae(Q,"More than one style specified on set");break}this.qname=Be,this.value=D[Be]}}})(Le,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(vt,Le,M){var ce=/firefox/i.test(navigator.userAgent);(function(I,u,n){function _(G,X,re,be){var Ue;if(re.kind==="region")(Ue=document.createElement("div")).style.position="absolute";else if(re.kind==="body")Ue=document.createElement("div");else if(re.kind==="div")Ue=document.createElement("div");else if(re.kind==="image"){if(Ue=document.createElement("img"),G.imgResolver!==null&&re.src!==null){var me=G.imgResolver(re.src,Ue);me&&(Ue.src=me),Ue.height=G.regionH,Ue.width=G.regionW}}else if(re.kind==="p")Ue=document.createElement("p");else if(re.kind==="span")if(re.styleAttrs[n.byName.ruby.qname]==="container")Ue=document.createElement("ruby"),G.ruby=!0;else if(re.styleAttrs[n.byName.ruby.qname]==="base")Ue=document.createElement("span");else if(re.styleAttrs[n.byName.ruby.qname]==="text")Ue=document.createElement("rt");else if(re.styleAttrs[n.byName.ruby.qname]==="baseContainer")Ue=document.createElement("rbc");else if(re.styleAttrs[n.byName.ruby.qname]==="textContainer")Ue=document.createElement("rtc");else{if(re.styleAttrs[n.byName.ruby.qname]==="delimiter")return;Ue=document.createElement("span")}else re.kind==="br"&&(Ue=document.createElement("br"));if(Ue){if(re.lang&&(re.kind!=="region"&&re.lang===be.lang||(Ue.lang=re.lang)),X.appendChild(Ue),Ue.style.margin="0",re.kind==="region"){var le=re.styleAttrs[n.byName.writingMode.qname];le==="lrtb"||le==="lr"?(G.ipd="lr",G.bpd="tb"):le==="rltb"||le==="rl"?(G.ipd="rl",G.bpd="tb"):le==="tblr"?(G.ipd="tb",G.bpd="lr"):le!=="tbrl"&&le!=="tb"||(G.ipd="tb",G.bpd="rl")}else if(re.kind==="p"&&G.bpd==="tb"){var je=re.styleAttrs[n.byName.direction.qname];G.ipd=je==="ltr"?"lr":"rl"}for(var Se=0;Se<T.length;Se++){var Ne=T[Se],He=re.styleAttrs[Ne.qname];He!==void 0&&Ne.map!==null&&Ne.map(G,Ue,re,He)}var it=Ue,Ie=re.styleAttrs[n.byName.linePadding.qname];if(Ie&&!Ie.isZero()){var Oe=Ie.toUsedLength(G.w,G.h);if(Oe>0){var ft=Math.ceil(Oe)+"px";G.bpd==="tb"?(it.style.paddingLeft=ft,it.style.paddingRight=ft):(it.style.paddingTop=ft,it.style.paddingBottom=ft),G.lp=Ie}}var At=re.styleAttrs[n.byName.multiRowAlign.qname];if(At&&At!=="auto"){var Rt=document.createElement("span");Rt.style.display="inline-block",Rt.style.textAlign=At,Ue.appendChild(Rt),it=Rt,G.mra=At}var Pt=re.styleAttrs[n.byName.rubyReserve.qname];if(Pt&&Pt[0]!=="none"&&(G.rubyReserve=Pt),re.styleAttrs[n.byName.fillLineGap.qname]&&(G.flg=!0),re.kind==="span"&&re.text){var ee=re.styleAttrs[n.byName.textEmphasis.qname];if(ee&&ee.style!=="none"&&(G.textEmphasis=!0),n.byName.textCombine.qname in re.styleAttrs&&re.styleAttrs[n.byName.textCombine.qname]==="all")Ue.textContent=re.text,Ue._isd_element=re,ee&&m(G,Ue,0,ee);else for(var ae="",qe=0;qe<re.text.length;qe++){ae+=re.text.charAt(qe);var v=re.text.charCodeAt(qe);if(v<55296||v>56319||qe===re.text.length-1){var A=document.createElement("span");A.textContent=ae,ee&&m(G,A,0,ee),Ue.appendChild(A),ae="",A._isd_element=re}}}if("contents"in re)for(var c=0;c<re.contents.length;c++)_(G,it,re.contents[c],re);var E=[];if(re.kind==="p"&&(r(G,it,E,null),G.rubyReserve&&((function(Ae,Re){for(var _e=0;_e<Ae.length;_e++){var Ye,Ve,Xe=document.createElement("ruby"),nt=document.createElement("span");nt.textContent="​",Xe.appendChild(nt);var Tt,mt=Re.rubyReserve[1].toUsedLength(Re.w,Re.h)+"px";Re.rubyReserve[0]==="both"||Re.rubyReserve[0]==="outside"&&Ae.length==1?((Ye=document.createElement("rtc")).style[ne]=x?"after":"under",Ye.textContent="​",Ye.style.fontSize=mt,(Ve=document.createElement("rtc")).style[ne]=x?"before":"over",Ve.textContent="​",Ve.style.fontSize=mt,Xe.appendChild(Ye),Xe.appendChild(Ve)):((Ye=document.createElement("rtc")).textContent="​",Ye.style.fontSize=mt,Tt=Re.rubyReserve[0]==="after"||Re.rubyReserve[0]==="outside"&&_e>0?x?"after":Re.bpd==="tb"||Re.bpd==="rl"?"under":"over":x?"before":Re.bpd==="tb"||Re.bpd==="rl"?"over":"under",Ye.style[ne]=Tt,Xe.appendChild(Ye));for(var Ut=null,Mt=0;Mt<Ae[_e].rbc.length;Mt++)if(Ae[_e].rbc[Mt].localName==="ruby"){Ut=Ae[_e].rbc[Mt];for(var zt=0;zt<Ut.style.length;zt++)Xe.style.setProperty(Ut.style.item(zt),Ut.style.getPropertyValue(Ut.style.item(zt)));break}(Ut=Ut||Ae[_e].elements[0].node).parentElement.insertBefore(Xe,Ut)}})(E,G),G.rubyReserve=null),(G.ruby||G.rubyReserve)&&((function(Ae,Re){for(var _e=0;_e<Ae.length;_e++)for(var Ye=0;Ye<Ae[_e].rbc.length;Ye++){var Ve;Ae[_e].rbc[Ye].style[ne]||(Ve=x?_e===0?"before":"after":Re.bpd==="tb"||Re.bpd==="rl"?_e===0?"over":"under":_e===0?"under":"over",Ae[_e].rbc[Ye].style[ne]=Ve)}})(E,G),G.ruby=null),G.textEmphasis&&((function(Ae,Re){for(var _e=0;_e<Ae.length;_e++)for(var Ye=0;Ye<Ae[_e].te.length;Ye++){var Ve;Ae[_e].te[Ye].style[J]&&Ae[_e].te[Ye].style[J]!=="none"||(Ve=Re.bpd==="tb"?_e===0?"left over":"left under":Re.bpd==="rl"?_e===0?"right under":"left under":_e===0?"left under":"right under",Ae[_e].te[Ye].style[J]=Ve)}})(E,G),G.textEmphasis=null),G.mra&&((function(Ae){for(var Re=0;Re<Ae.length-1;Re++){var _e=Ae[Re].elements.length;if(_e!==0&&Ae[Re].br===!1){var Ye=document.createElement("br"),Ve=Ae[Re].elements[_e-1].node;Ve.parentElement.insertBefore(Ye,Ve.nextSibling)}}})(E),G.mra=null),G.lp&&((function(Ae,Re,_e){if(Ae!==null)for(var Ye=0;Ye<Ae.length;Ye++){var Ve=Ae[Ye].elements.length,Xe=Math.ceil(Re)+"px",nt="-"+Math.ceil(Re)+"px";if(Ve!==0){var Tt=Ae[Ye].elements[Ae[Ye].start_elem],mt=Ae[Ye].elements[Ae[Ye].end_elem];if(Tt===mt){var Ut=Tt.node.getBoundingClientRect();if(Ut.width==0||Ut.height==0)continue}_e.ipd==="lr"?(Tt.node.style.marginLeft=nt,Tt.node.style.paddingLeft=Xe):_e.ipd==="rl"?(Tt.node.style.paddingRight=Xe,Tt.node.style.marginRight=nt):_e.ipd==="tb"&&(Tt.node.style.paddingTop=Xe,Tt.node.style.marginTop=nt),_e.ipd==="lr"?(ce||(mt.node.style.marginRight=nt),mt.node.style.paddingRight=Xe):_e.ipd==="rl"?(mt.node.style.paddingLeft=Xe,ce||(mt.node.style.marginLeft=nt)):_e.ipd==="tb"&&(mt.node.style.paddingBottom=Xe,mt.node.style.marginBottom=nt)}}})(E,G.lp.toUsedLength(G.w,G.h),G),G.lp=null),(function(Ae,Re){for(var _e=0;_e<Ae.length;_e++)for(var Ye=Ae[_e],Ve=1;Ve<Ye.elements.length;){var Xe=Ye.elements[Ve-1],nt=Ye.elements[Ve];i(Xe.node,nt.node,Re)?Ye.elements.splice(Ve,1):Ve++}for(var Tt,mt,Ut=[],Mt=0;Mt<Ae.length;Mt++)for(var zt=0;zt<Ae[Mt].elements.length;zt++)(mt=y(Tt=Ae[Mt].elements[zt].node,Ut,!1))&&(Tt.style.backgroundColor=mt);for(var Qt=0;Qt<Ut.length;Qt++)Ut[Qt].style.backgroundColor=""})(E,G),G.flg)){var Q=g(it.getBoundingClientRect(),G);(function(Ae,Re,_e,Ye){for(var Ve=Math.sign(_e-Re),Xe=0;Xe<=Ae.length;Xe++){var nt,Tt,mt,Ut;if(nt=Xe===0?Math.round(Re):Xe===Ae.length?Math.round(_e):Math.round((Ae[Xe-1].after+Ae[Xe].before)/2),Xe>0&&Ae[Xe-1])for(mt=0;mt<Ae[Xe-1].elements.length;mt++)Tt=Ve*(nt-(Ut=Ae[Xe-1].elements[mt]).after)+"px",Ye.bpd==="lr"?Ut.node.style.paddingRight=Tt:Ye.bpd==="rl"?Ut.node.style.paddingLeft=Tt:Ye.bpd==="tb"&&(Ut.node.style.paddingBottom=Tt);if(Xe<Ae.length)for(mt=0;mt<Ae[Xe].elements.length;mt++)Tt=Ve*((Ut=Ae[Xe].elements[mt]).before-nt)+"px",Ye.bpd==="lr"?Ut.node.style.paddingLeft=Tt:Ye.bpd==="rl"?Ut.node.style.paddingRight=Tt:Ye.bpd==="tb"&&(Ut.node.style.paddingTop=Tt)}})(E,Q.before,Q.after,G),G.flg=null}if(re.kind==="region"&&G.bpd==="tb"&&G.enableRollUp&&re.contents.length>0&&re.styleAttrs[n.byName.displayAlign.qname]==="after"){r(G,it,E,null);var D=new h(re.id===""?"_":re.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 Be=Ue.firstElementChild,De=D.plist[D.plist.length-1].after-D.plist[D.plist.length-1].before;Be.style.bottom="-"+De+"px",Be.style.transition="transform 0.4s",Be.style.position="relative",Be.style.transform="translateY(-"+De+"px)"}}}else pe(G.errorHandler,"Error processing ISD element kind: "+re.kind)}function y(G,X,re){return G.style.backgroundColor?(re&&!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,re){if(G.tagName==="SPAN"&&X.tagName==="SPAN"&&G._isd_element===X._isd_element){if(!G._isd_element)return pe(re.errorHandler,"Internal error: HTML span is not linked to a source element; cannot merge spans."),!1;G.textContent+=X.textContent;for(var be=0;be<X.style.length;be++){var Ue=X.style[be];(Ue.indexOf("border")>=0||Ue.indexOf("padding")>=0||Ue.indexOf("margin")>=0)&&(G.style[Ue]=X.style[Ue])}return X.parentElement.removeChild(X),!0}return!1}function h(G,X){this.id=G,this.plist=X}function g(G,X){var re={before:null,after:null,start:null,end:null};return X.bpd==="tb"?(re.before=G.top,re.after=G.bottom,X.ipd==="lr"?(re.start=G.left,re.end=G.right):(re.start=G.right,re.end=G.left)):X.bpd==="lr"?(re.before=G.left,re.after=G.right,re.start=G.top,re.end=G.bottom):X.bpd==="rl"&&(re.before=G.right,re.after=G.left,re.start=G.top,re.end=G.bottom),re}function r(G,X,re,be){if(X.localName!=="rt"&&X.localName!=="rtc"){var Ue,me,le,je,Se=X.style.backgroundColor||be;if(X.childElementCount===0)if(X.localName==="span"||X.localName==="rb"){var Ne=g(X.getBoundingClientRect(),G);if(re.length!==0&&(Ue=Ne.before,me=Ne.after,le=re[re.length-1].before,me<(je=re[re.length-1].after)&&Ue>le||je<=me&&le>=Ue)){var He=Math.sign(Ne.after-Ne.before),it=Math.sign(Ne.end-Ne.start);He*(Ne.before-re[re.length-1].before)<0&&(re[re.length-1].before=Ne.before),He*(Ne.after-re[re.length-1].after)>0&&(re[re.length-1].after=Ne.after),it*(Ne.start-re[re.length-1].start)<0&&(re[re.length-1].start=Ne.start,re[re.length-1].start_elem=re[re.length-1].elements.length),it*(Ne.end-re[re.length-1].end)>0&&(re[re.length-1].end=Ne.end,re[re.length-1].end_elem=re[re.length-1].elements.length)}else re.push({before:Ne.before,after:Ne.after,start:Ne.start,end:Ne.end,start_elem:0,end_elem:0,elements:[],rbc:[],te:[],text:"",br:!1});re[re.length-1].text+=X.textContent,re[re.length-1].elements.push({node:X,bgcolor:Se,before:Ne.before,after:Ne.after})}else X.localName==="br"&&re.length!==0&&(re[re.length-1].br=!0);else for(var Ie=X.firstChild;Ie;)Ie.nodeType===Node.ELEMENT_NODE&&(r(G,Ie,re,Se),Ie.localName==="ruby"||Ie.localName==="rtc"?re.length>0&&re[re.length-1].rbc.push(Ie):Ie.localName==="span"&&Ie.style[O]&&Ie.style[O]!=="none"&&re.length>0&&re[re.length-1].te.push(Ie)),Ie=Ie.nextSibling}}function m(G,X,re,be){var Ue;be.style!=="none"&&(be.style==="auto"?X.style[O]="filled":X.style[O]=be.style+" "+be.symbol,(be.position==="before"||be.position==="after")&&(Ue=G.bpd==="tb"?be.position==="before"?"left over":"left under":G.bpd==="rl"?be.position==="before"?"right under":"left under":be.position==="before"?"left under":"right under",X.style[J]=Ue))}function d(G,X){this.qname=G,this.map=X}I.render=function(G,X,re,be,Ue,me,le,je,Se){var Ne=be||X.clientHeight,He=Ue||X.clientWidth;if(G.aspectRatio!==null){var it=Ne*G.aspectRatio;it>He?Ne=Math.round(He/G.aspectRatio):He=it}var Ie=document.createElement("div");Ie.style.position="relative",Ie.style.width=He+"px",Ie.style.height=Ne+"px",Ie.style.margin="auto",Ie.style.top=0,Ie.style.bottom=0,Ie.style.left=0,Ie.style.right=0,Ie.style.zIndex=0;var Oe={h:Ne,w:He,regionH:null,regionW:null,imgResolver:re,displayForcedOnlyMode:me||!1,isd:G,errorHandler:le,previousISDState:je,enableRollUp:Se||!1,currentISDState:{},flg:null,lp:null,mra:null,ipd:null,bpd:null,ruby:null,textEmphasis:null,rubyReserve:null};if(X.appendChild(Ie),"contents"in G)for(var ft=0;ft<G.contents.length;ft++)_(Oe,Ie,G.contents[ft],G);return Oe.currentISDState};for(var T=[new d("http://www.w3.org/ns/ttml#styling backgroundColor",(function(G,X,re,be){be[3]!==0&&(X.style.backgroundColor="rgba("+be[0].toString()+","+be[1].toString()+","+be[2].toString()+","+(be[3]/255).toString()+")")})),new d("http://www.w3.org/ns/ttml#styling color",(function(G,X,re,be){X.style.color="rgba("+be[0].toString()+","+be[1].toString()+","+be[2].toString()+","+(be[3]/255).toString()+")"})),new d("http://www.w3.org/ns/ttml#styling direction",(function(G,X,re,be){X.style.direction=be})),new d("http://www.w3.org/ns/ttml#styling display",(function(G,X,re,be){})),new d("http://www.w3.org/ns/ttml#styling displayAlign",(function(G,X,re,be){X.style.display="flex",X.style.flexDirection="column",be==="before"?X.style.justifyContent="flex-start":be==="center"?X.style.justifyContent="center":be==="after"&&(X.style.justifyContent="flex-end")})),new d("http://www.w3.org/ns/ttml#styling extent",(function(G,X,re,be){G.regionH=be.h.toUsedLength(G.w,G.h),G.regionW=be.w.toUsedLength(G.w,G.h);var Ue=0,me=0,le=re.styleAttrs["http://www.w3.org/ns/ttml#styling padding"];le&&(Ue=le[0].toUsedLength(G.w,G.h)+le[2].toUsedLength(G.w,G.h),me=le[1].toUsedLength(G.w,G.h)+le[3].toUsedLength(G.w,G.h)),X.style.height=G.regionH-Ue+"px",X.style.width=G.regionW-me+"px"})),new d("http://www.w3.org/ns/ttml#styling fontFamily",(function(G,X,re,be){for(var Ue=[],me=0;me<be.length;me++)be[me]=be[me].trim(),be[me]==="monospaceSerif"?(Ue.push("Courier New"),Ue.push('"Liberation Mono"'),Ue.push("Courier"),Ue.push("monospace")):be[me]==="proportionalSansSerif"?(Ue.push("Arial"),Ue.push("Helvetica"),Ue.push('"Liberation Sans"'),Ue.push("sans-serif")):be[me]==="monospace"?Ue.push("monospace"):be[me]==="sansSerif"?Ue.push("sans-serif"):be[me]==="serif"?Ue.push("serif"):be[me]==="monospaceSansSerif"?(Ue.push("Consolas"),Ue.push("monospace")):be[me]==="proportionalSerif"?Ue.push("serif"):Ue.push(be[me]);if(Ue.length>0){for(var le=[Ue[0]],je=1;je<Ue.length;je++)le.indexOf(Ue[je])==-1&&le.push(Ue[je]);Ue=le}X.style.fontFamily=Ue.join(",")})),new d("http://www.w3.org/ns/ttml#styling shear",(function(G,X,re,be){if(be!==0){var Ue=-.9*be;G.bpd==="tb"?X.style.transform="skewX("+Ue+"deg)":X.style.transform="skewY("+Ue+"deg)"}})),new d("http://www.w3.org/ns/ttml#styling fontSize",(function(G,X,re,be){X.style.fontSize=be.toUsedLength(G.w,G.h)+"px"})),new d("http://www.w3.org/ns/ttml#styling fontStyle",(function(G,X,re,be){X.style.fontStyle=be})),new d("http://www.w3.org/ns/ttml#styling fontWeight",(function(G,X,re,be){X.style.fontWeight=be})),new d("http://www.w3.org/ns/ttml#styling lineHeight",(function(G,X,re,be){X.style.lineHeight=be==="normal"?"normal":be.toUsedLength(G.w,G.h)+"px"})),new d("http://www.w3.org/ns/ttml#styling opacity",(function(G,X,re,be){X.style.opacity=be})),new d("http://www.w3.org/ns/ttml#styling origin",(function(G,X,re,be){X.style.top=be.h.toUsedLength(G.w,G.h)+"px",X.style.left=be.w.toUsedLength(G.w,G.h)+"px"})),new d("http://www.w3.org/ns/ttml#styling overflow",(function(G,X,re,be){X.style.overflow=be})),new d("http://www.w3.org/ns/ttml#styling padding",(function(G,X,re,be){var Ue=[];Ue[0]=be[0].toUsedLength(G.w,G.h)+"px",Ue[1]=be[3].toUsedLength(G.w,G.h)+"px",Ue[2]=be[2].toUsedLength(G.w,G.h)+"px",Ue[3]=be[1].toUsedLength(G.w,G.h)+"px",X.style.padding=Ue.join(" ")})),new d("http://www.w3.org/ns/ttml#styling position",(function(G,X,re,be){X.style.top=be.h.toUsedLength(G.w,G.h)+"px",X.style.left=be.w.toUsedLength(G.w,G.h)+"px"})),new d("http://www.w3.org/ns/ttml#styling rubyAlign",(function(G,X,re,be){X.style.rubyAlign=be==="spaceAround"?"space-around":"center"})),new d("http://www.w3.org/ns/ttml#styling rubyPosition",(function(G,X,re,be){var Ue;be!=="before"&&be!=="after"||(Ue=x?be:G.bpd==="tb"||G.bpd==="rl"?be==="before"?"over":"under":be==="before"?"under":"over",X.parentElement.style[ne]=Ue)})),new d("http://www.w3.org/ns/ttml#styling showBackground",null),new d("http://www.w3.org/ns/ttml#styling textAlign",(function(G,X,re,be){var Ue;Ue=be==="start"?G.ipd==="rl"?"right":"left":be==="end"?G.ipd==="rl"?"left":"right":be,X.style.textAlign=Ue})),new d("http://www.w3.org/ns/ttml#styling textDecoration",(function(G,X,re,be){X.style.textDecoration=be.join(" ").replace("lineThrough","line-through")})),new d("http://www.w3.org/ns/ttml#styling textOutline",(function(G,X,re,be){})),new d("http://www.w3.org/ns/ttml#styling textShadow",(function(G,X,re,be){var Ue=re.styleAttrs[n.byName.textOutline.qname];if(be==="none"&&Ue==="none")X.style.textShadow="";else{var me=[];if(Ue!=="none"){var le="rgba("+Ue.color[0].toString()+","+Ue.color[1].toString()+","+Ue.color[2].toString()+","+(Ue.color[3]/255).toString()+")";me.push("1px 1px 1px "+le),me.push("-1px 1px 1px "+le),me.push("1px -1px 1px "+le),me.push("-1px -1px 1px "+le)}if(be!=="none")for(var je=0;je<be.length;je++)me.push(be[je].x_off.toUsedLength(G.w,G.h)+"px "+be[je].y_off.toUsedLength(G.w,G.h)+"px "+be[je].b_radius.toUsedLength(G.w,G.h)+"px rgba("+be[je].color[0].toString()+","+be[je].color[1].toString()+","+be[je].color[2].toString()+","+(be[je].color[3]/255).toString()+")");X.style.textShadow=me.join(",")}})),new d("http://www.w3.org/ns/ttml#styling textCombine",(function(G,X,re,be){X.style.textCombineUpright=be})),new d("http://www.w3.org/ns/ttml#styling textEmphasis",(function(G,X,re,be){})),new d("http://www.w3.org/ns/ttml#styling unicodeBidi",(function(G,X,re,be){var Ue;Ue=be==="bidiOverride"?"bidi-override":be,X.style.unicodeBidi=Ue})),new d("http://www.w3.org/ns/ttml#styling visibility",(function(G,X,re,be){X.style.visibility=be})),new d("http://www.w3.org/ns/ttml#styling wrapOption",(function(G,X,re,be){be==="wrap"?re.space==="preserve"?X.style.whiteSpace="pre-wrap":X.style.whiteSpace="normal":re.space==="preserve"?X.style.whiteSpace="pre":X.style.whiteSpace="noWrap"})),new d("http://www.w3.org/ns/ttml#styling writingMode",(function(G,X,re,be){be==="lrtb"||be==="lr"||be==="rltb"||be==="rl"?X.style.writingMode="horizontal-tb":be==="tblr"?X.style.writingMode="vertical-lr":be!=="tbrl"&&be!=="tb"||(X.style.writingMode="vertical-rl")})),new d("http://www.w3.org/ns/ttml#styling zIndex",(function(G,X,re,be){X.style.zIndex=be})),new d("http://www.w3.org/ns/ttml/profile/imsc1#styling forcedDisplay",(function(G,X,re,be){G.displayForcedOnlyMode&&be===!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),ne=x?"webkitRubyPosition":"rubyPosition",O="webkitTextEmphasisStyle"in window.getComputedStyle(document.documentElement)?"webkitTextEmphasisStyle":"textEmphasisStyle",J="webkitTextEmphasisPosition"in window.getComputedStyle(document.documentElement)?"webkitTextEmphasisPosition":"textEmphasisPosition";function pe(G,X){if(G&&G.error&&G.error(X))throw X}})(Le,typeof imscNames>"u"?M(7019):imscNames,typeof imscStyles>"u"?M(7073):imscStyles,typeof imscUtils>"u"?M(346):imscUtils)},5223:function(vt,Le,M){(function(ce,I,u,n){ce.generateISD=function(d,T,q){var W,x=new g(d),ne={},O={},J=d.head.styling.initials[u.byName.showBackground.qname],pe=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],re=X.styleAttrs[u.byName.showBackground.qname]||J,be=X.styleAttrs[u.byName.backgroundColor.qname]||pe;O[X.id]=(re==="always"||re===void 0)&&be!==void 0&&!(T<X.begin||T>=X.end)}for(var Ue in d.body&&d.body.regionID&&(O[d.body.regionID]=!0),W=d.body!==null?(function le(je,Se){if(Se.contents){var Ne={};for(var He in Se)Se.hasOwnProperty(He)&&(Ne[He]=Se[He]);return Ne.contents=[],Se.contents.filter((function(it){return!(je<it.begin||je>=it.end)})).forEach((function(it){var Ie=le(je,it);Ie.regionID&&(O[Ie.regionID]=!0),Ie!==null&&Ne.contents.push(Ie)})),Ne}return Se})(T,d.body):null,O[""]!==void 0&&(O[""]=!0),O)if(O[Ue]){var me=y(d,T,d.head.layout.regions[Ue],W,null,"",d.head.layout.regions[Ue],q,ne);me!==null&&x.contents.push(me.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,ne,O,J,pe){if(T<O.begin||T>=O.end)return null;var G="regionID"in O&&O.regionID!==""?O.regionID:ne;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 re=0;re<O.sets.length;re++)T<O.sets[re].begin||T>=O.sets[re].end||(X.styleAttrs[O.sets[re].qname]=O.sets[re].value);var be={};for(var Ue in X.styleAttrs)if(X.styleAttrs.hasOwnProperty(Ue)&&(be[Ue]=!0,X.kind==="region"&&Ue===u.byName.writingMode.qname&&!(u.byName.direction.qname in X.styleAttrs))){var me=X.styleAttrs[Ue];me==="lrtb"||me==="lr"?X.styleAttrs[u.byName.direction.qname]="ltr":me!=="rltb"&&me!=="rl"||(X.styleAttrs[u.byName.direction.qname]="rtl")}if(x!==null)for(var le=0;le<u.all.length;le++){var je=u.all[le];if(je.qname===u.byName.textDecoration.qname){var Se=x.styleAttrs[je.qname],Ne=X.styleAttrs[je.qname],He=[];Ne===void 0?He=Se:Ne.indexOf("none")===-1?((Ne.indexOf("noUnderline")===-1&&Se.indexOf("underline")!==-1||Ne.indexOf("underline")!==-1)&&He.push("underline"),(Ne.indexOf("noLineThrough")===-1&&Se.indexOf("lineThrough")!==-1||Ne.indexOf("lineThrough")!==-1)&&He.push("lineThrough"),(Ne.indexOf("noOverline")===-1&&Se.indexOf("overline")!==-1||Ne.indexOf("overline")!==-1)&&He.push("overline")):He.push("none"),X.styleAttrs[je.qname]=He}else if(je.qname!==u.byName.fontSize.qname||je.qname in X.styleAttrs||X.kind!=="span"||X.styleAttrs[u.byName.ruby.qname]!=="textContainer")if(je.qname!==u.byName.fontSize.qname||je.qname in X.styleAttrs||X.kind!=="span"||X.styleAttrs[u.byName.ruby.qname]!=="text")je.inherit&&je.qname in x.styleAttrs&&!(je.qname in X.styleAttrs)&&(X.styleAttrs[je.qname]=x.styleAttrs[je.qname]);else{var it=x.styleAttrs[u.byName.fontSize.qname];x.styleAttrs[u.byName.ruby.qname]==="textContainer"?X.styleAttrs[je.qname]=it:X.styleAttrs[je.qname]=new n.ComputedLength(.5*it.rw,.5*it.rh)}else{var Ie=x.styleAttrs[u.byName.fontSize.qname];X.styleAttrs[je.qname]=new n.ComputedLength(.5*Ie.rw,.5*Ie.rh)}}for(var Oe=0;Oe<u.all.length;Oe++){var ft=u.all[Oe];if(!(ft.qname in X.styleAttrs)&&!(ft.qname===u.byName.position.qname&&u.byName.origin.qname in X.styleAttrs||ft.qname===u.byName.origin.qname&&u.byName.position.qname in X.styleAttrs)){var At=d.head.styling.initials[ft.qname]||ft.initial;if(At!==null&&(X.kind==="region"||ft.inherit===!1&&At!==null)){var Rt=ft.parse(At);Rt!==null?(X.styleAttrs[ft.qname]=Rt,be[ft.qname]=!0):m(J,"Invalid initial value for '"+ft.qname+"' on element '"+X.kind)}}}for(var Pt=0;Pt<u.all.length;Pt++){var ee=u.all[Pt];if(ee.qname in be&&ee.compute!==null){var ae=ee.compute(d,x,X,X.styleAttrs[ee.qname],pe);ae!==null?X.styleAttrs[ee.qname]=ae:(X.styleAttrs[ee.qname]=ee.compute(d,x,X,ee.parse(ee.initial),pe),m(J,"Style '"+ee.qname+"' on element '"+X.kind+"' cannot be computed"))}}if(X.styleAttrs[u.byName.display.qname]==="none")return null;var qe=null;x===null?qe=W===null?[]:[W]:"contents"in O&&(qe=O.contents);for(var v=0;qe!==null&&v<qe.length;v++){var A=y(d,T,q,W,X,G,qe[v],J,pe);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 Be=X.styleAttrs[u.byName.ruby.qname];if(X.kind==="p"||X.kind==="span"&&(Be==="textContainer"||Be==="text")){var De=[];i(X,De),(function(Ae){for(var Re,_e=0;_e<Ae.length;)if((Re=Ae[_e]).kind!=="br"&&Re.space!=="preserve"){var Ye=Re.text.replace(/[\t\r\n ]+/g," ");/^[ ]/.test(Ye)&&(_e===0||(Ve=Ae[_e-1]).kind==="br"||/[\r\n\t ]$/.test(Ve.text))&&(Ye=Ye.substring(1)),Re.text=Ye,Ye.length===0?Ae.splice(_e,1):_e++}else _e++;var Ve,Xe;for(_e=0;_e<Ae.length;_e++)(Re=Ae[_e]).kind!=="br"&&Re.space!=="preserve"?/[ ]$/.test(Re.text)&&(_e===Ae.length-1||(Xe=Ae[_e+1]).kind==="br"||Xe.space==="preserve"&&/^[\r\n]/.test(Xe.text))&&(Re.text=Re.text.slice(0,-1)):_e++})(De),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}})(Le,typeof imscNames>"u"?M(7019):imscNames,typeof imscStyles>"u"?M(7073):imscStyles,typeof imscUtils>"u"?M(346):imscUtils)},6586:function(vt,Le,M){Le.generateISD=M(5223).generateISD,Le.fromXML=M(4421).fromXML,Le.renderHTML=M(978).render},7019:function(vt,Le){(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"})(Le)},7073:function(vt,Le,M){(function(ce,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 ce.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[ce.byName.fontSize.qname]:i.cellLength.h,h!==null?h.styleAttrs[ce.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[ce.byName.fontSize.qname],g.styleAttrs[ce.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[ce.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[ce.byName.fontSize.qname],W===0||W===2?g.styleAttrs[ce.byName.extent.qname].h:g.styleAttrs[ce.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[ce.byName.extent.qname].h.rw,i.dimensions.h.rh-g.styleAttrs[ce.byName.extent.qname].h.rh),null,i.pxLength.h))===null?null:(r.v.edge==="bottom"&&(m=new u.ComputedLength(-m.rw-g.styleAttrs[ce.byName.extent.qname].h.rw,i.dimensions.h.rh-m.rh-g.styleAttrs[ce.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[ce.byName.extent.qname].w.rw,-g.styleAttrs[ce.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[ce.byName.extent.qname].w.rw,-d.rh-g.styleAttrs[ce.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[ce.byName.fontSize.qname].rw,.5*g.styleAttrs[ce.byName.fontSize.qname].rh):u.toComputedLength(r[1].value,r[1].unit,g.styleAttrs[ce.byName.fontSize.qname],g.styleAttrs[ce.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[ce.byName.color.qname]:d.color=r.color,d.thickness=u.toComputedLength(r.thickness.value,r.thickness.unit,g.styleAttrs[ce.byName.fontSize.qname],g.styleAttrs[ce.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[ce.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[ce.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[ce.byName.fontSize.qname],null,i.pxLength.h),T.b_radius===null)return null;r[d][3]===null?T.color=g.styleAttrs[ce.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)],ce.byQName={},ce.all)ce.byQName[ce.all[_].qname]=ce.all[_];for(var y in ce.byName={},ce.all)ce.byName[ce.all[y].name]=ce.all[y]})(Le,typeof imscNames>"u"?M(7019):imscNames,typeof imscUtils>"u"?M(346):imscUtils)},346:function(vt,Le){(function(M){var ce=/#([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=ce.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}})(Le)},4633:function(vt){typeof Object.create=="function"?vt.exports=function(Le,M){M&&(Le.super_=M,Le.prototype=Object.create(M.prototype,{constructor:{value:Le,enumerable:!1,writable:!0,configurable:!0}}))}:vt.exports=function(Le,M){if(M){Le.super_=M;var ce=function(){};ce.prototype=M.prototype,Le.prototype=new ce,Le.prototype.constructor=Le}}},5684:function(vt){function Le(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 ce={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),Le(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(Le(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 Le(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];Le(n),n.length>0&&(I===void 0?I=n:I+="/"+n)}return I===void 0?".":ce.normalize(I)},relative:function(I,u){if(Le(I),Le(u),I===u||(I=ce.resolve(I))===(u=ce.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(Le(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');Le(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){Le(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){Le(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};ce.posix=ce,vt.exports=ce},7205:function(vt,Le,M){vt.exports=I;var ce=M(5572).EventEmitter;function I(){ce.call(this)}M(4633)(I,ce),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(),ce.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(vt){var Le={};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,Le[I]=_}function ce(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(ce(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(ce(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"),vt.exports.F=Le},7510:function(vt,Le,M){var ce=Object.keys||function(r){var m=[];for(var d in r)m.push(d);return m};vt.exports=i;var I=M(996),u=M(9220);M(4633)(i,I);for(var n=ce(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(vt,Le,M){vt.exports=I;var ce=M(5570);function I(u){if(!(this instanceof I))return new I(u);ce.call(this,u)}M(4633)(I,ce),I.prototype._transform=function(u,n,_){_(null,u)}},996:function(vt,Le,M){var ce;vt.exports=X,X.ReadableState=G,M(5572).EventEmitter;var I,u=function(ee,ae){return ee.listeners(ae).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,ne=q.ERR_METHOD_NOT_IMPLEMENTED,O=q.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;M(4633)(X,n);var J=d.errorOrDestroy,pe=["error","close","destroy","pause","resume"];function G(ee,ae,qe){ce=ce||M(7510),ee=ee||{},typeof qe!="boolean"&&(qe=ae instanceof ce),this.objectMode=!!ee.objectMode,qe&&(this.objectMode=this.objectMode||!!ee.readableObjectMode),this.highWaterMark=T(this,ee,"readableHighWaterMark",qe),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=ee.emitClose!==!1,this.autoDestroy=!!ee.autoDestroy,this.destroyed=!1,this.defaultEncoding=ee.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,ee.encoding&&(h||(h=M(950).I),this.decoder=new h(ee.encoding),this.encoding=ee.encoding)}function X(ee){if(ce=ce||M(7510),!(this instanceof X))return new X(ee);var ae=this instanceof ce;this._readableState=new G(ee,this,ae),this.readable=!0,ee&&(typeof ee.read=="function"&&(this._read=ee.read),typeof ee.destroy=="function"&&(this._destroy=ee.destroy)),n.call(this)}function re(ee,ae,qe,v,A){I("readableAddChunk",ae);var c,E=ee._readableState;if(ae===null)E.reading=!1,(function(Q,D){if(I("onEofChunk"),!D.ended){if(D.decoder){var Be=D.decoder.end();Be&&Be.length&&(D.buffer.push(Be),D.length+=D.objectMode?1:Be.length)}D.ended=!0,D.sync?le(Q):(D.needReadable=!1,D.emittedReadable||(D.emittedReadable=!0,je(Q)))}})(ee,E);else if(A||(c=(function(Q,D){var Be,De;return De=D,_.isBuffer(De)||De instanceof y||typeof D=="string"||D===void 0||Q.objectMode||(Be=new W("chunk",["string","Buffer","Uint8Array"],D)),Be})(E,ae)),c)J(ee,c);else if(E.objectMode||ae&&ae.length>0)if(typeof ae=="string"||E.objectMode||Object.getPrototypeOf(ae)===_.prototype||(ae=(function(Q){return _.from(Q)})(ae)),v)E.endEmitted?J(ee,new O):be(ee,E,ae,!0);else if(E.ended)J(ee,new x);else{if(E.destroyed)return!1;E.reading=!1,E.decoder&&!qe?(ae=E.decoder.write(ae),E.objectMode||ae.length!==0?be(ee,E,ae,!1):Se(ee,E)):be(ee,E,ae,!1)}else v||(E.reading=!1,Se(ee,E));return!E.ended&&(E.length<E.highWaterMark||E.length===0)}function be(ee,ae,qe,v){ae.flowing&&ae.length===0&&!ae.sync?(ae.awaitDrain=0,ee.emit("data",qe)):(ae.length+=ae.objectMode?1:qe.length,v?ae.buffer.unshift(qe):ae.buffer.push(qe),ae.needReadable&&le(ee)),Se(ee,ae)}Object.defineProperty(X.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState!==void 0&&this._readableState.destroyed},set:function(ee){this._readableState&&(this._readableState.destroyed=ee)}}),X.prototype.destroy=d.destroy,X.prototype._undestroy=d.undestroy,X.prototype._destroy=function(ee,ae){ae(ee)},X.prototype.push=function(ee,ae){var qe,v=this._readableState;return v.objectMode?qe=!0:typeof ee=="string"&&((ae=ae||v.defaultEncoding)!==v.encoding&&(ee=_.from(ee,ae),ae=""),qe=!0),re(this,ee,ae,!1,qe)},X.prototype.unshift=function(ee){return re(this,ee,null,!0,!1)},X.prototype.isPaused=function(){return this._readableState.flowing===!1},X.prototype.setEncoding=function(ee){h||(h=M(950).I);var ae=new h(ee);this._readableState.decoder=ae,this._readableState.encoding=this._readableState.decoder.encoding;for(var qe=this._readableState.buffer.head,v="";qe!==null;)v+=ae.write(qe.data),qe=qe.next;return this._readableState.buffer.clear(),v!==""&&this._readableState.buffer.push(v),this._readableState.length=v.length,this};var Ue=1073741824;function me(ee,ae){return ee<=0||ae.length===0&&ae.ended?0:ae.objectMode?1:ee!=ee?ae.flowing&&ae.length?ae.buffer.head.data.length:ae.length:(ee>ae.highWaterMark&&(ae.highWaterMark=(function(qe){return qe>=Ue?qe=Ue:(qe--,qe|=qe>>>1,qe|=qe>>>2,qe|=qe>>>4,qe|=qe>>>8,qe|=qe>>>16,qe++),qe})(ee)),ee<=ae.length?ee:ae.ended?ae.length:(ae.needReadable=!0,0))}function le(ee){var ae=ee._readableState;I("emitReadable",ae.needReadable,ae.emittedReadable),ae.needReadable=!1,ae.emittedReadable||(I("emitReadable",ae.flowing),ae.emittedReadable=!0,process.nextTick(je,ee))}function je(ee){var ae=ee._readableState;I("emitReadable_",ae.destroyed,ae.length,ae.ended),ae.destroyed||!ae.length&&!ae.ended||(ee.emit("readable"),ae.emittedReadable=!1),ae.needReadable=!ae.flowing&&!ae.ended&&ae.length<=ae.highWaterMark,Oe(ee)}function Se(ee,ae){ae.readingMore||(ae.readingMore=!0,process.nextTick(Ne,ee,ae))}function Ne(ee,ae){for(;!ae.reading&&!ae.ended&&(ae.length<ae.highWaterMark||ae.flowing&&ae.length===0);){var qe=ae.length;if(I("maybeReadMore read 0"),ee.read(0),qe===ae.length)break}ae.readingMore=!1}function He(ee){var ae=ee._readableState;ae.readableListening=ee.listenerCount("readable")>0,ae.resumeScheduled&&!ae.paused?ae.flowing=!0:ee.listenerCount("data")>0&&ee.resume()}function it(ee){I("readable nexttick read 0"),ee.read(0)}function Ie(ee,ae){I("resume",ae.reading),ae.reading||ee.read(0),ae.resumeScheduled=!1,ee.emit("resume"),Oe(ee),ae.flowing&&!ae.reading&&ee.read(0)}function Oe(ee){var ae=ee._readableState;for(I("flow",ae.flowing);ae.flowing&&ee.read()!==null;);}function ft(ee,ae){return ae.length===0?null:(ae.objectMode?qe=ae.buffer.shift():!ee||ee>=ae.length?(qe=ae.decoder?ae.buffer.join(""):ae.buffer.length===1?ae.buffer.first():ae.buffer.concat(ae.length),ae.buffer.clear()):qe=ae.buffer.consume(ee,ae.decoder),qe);var qe}function At(ee){var ae=ee._readableState;I("endReadable",ae.endEmitted),ae.endEmitted||(ae.ended=!0,process.nextTick(Rt,ae,ee))}function Rt(ee,ae){if(I("endReadableNT",ee.endEmitted,ee.length),!ee.endEmitted&&ee.length===0&&(ee.endEmitted=!0,ae.readable=!1,ae.emit("end"),ee.autoDestroy)){var qe=ae._writableState;(!qe||qe.autoDestroy&&qe.finished)&&ae.destroy()}}function Pt(ee,ae){for(var qe=0,v=ee.length;qe<v;qe++)if(ee[qe]===ae)return qe;return-1}X.prototype.read=function(ee){I("read",ee),ee=parseInt(ee,10);var ae=this._readableState,qe=ee;if(ee!==0&&(ae.emittedReadable=!1),ee===0&&ae.needReadable&&((ae.highWaterMark!==0?ae.length>=ae.highWaterMark:ae.length>0)||ae.ended))return I("read: emitReadable",ae.length,ae.ended),ae.length===0&&ae.ended?At(this):le(this),null;if((ee=me(ee,ae))===0&&ae.ended)return ae.length===0&&At(this),null;var v,A=ae.needReadable;return I("need readable",A),(ae.length===0||ae.length-ee<ae.highWaterMark)&&I("length less than watermark",A=!0),ae.ended||ae.reading?I("reading or ended",A=!1):A&&(I("do read"),ae.reading=!0,ae.sync=!0,ae.length===0&&(ae.needReadable=!0),this._read(ae.highWaterMark),ae.sync=!1,ae.reading||(ee=me(qe,ae))),(v=ee>0?ft(ee,ae):null)===null?(ae.needReadable=ae.length<=ae.highWaterMark,ee=0):(ae.length-=ee,ae.awaitDrain=0),ae.length===0&&(ae.ended||(ae.needReadable=!0),qe!==ee&&ae.ended&&At(this)),v!==null&&this.emit("data",v),v},X.prototype._read=function(ee){J(this,new ne("_read()"))},X.prototype.pipe=function(ee,ae){var qe=this,v=this._readableState;switch(v.pipesCount){case 0:v.pipes=ee;break;case 1:v.pipes=[v.pipes,ee];break;default:v.pipes.push(ee)}v.pipesCount+=1,I("pipe count=%d opts=%j",v.pipesCount,ae);var A=ae&&ae.end===!1||ee===process.stdout||ee===process.stderr?Re:c;function c(){I("onend"),ee.end()}v.endEmitted?process.nextTick(A):qe.once("end",A),ee.on("unpipe",(function _e(Ye,Ve){I("onunpipe"),Ye===qe&&Ve&&Ve.hasUnpiped===!1&&(Ve.hasUnpiped=!0,I("cleanup"),ee.removeListener("close",De),ee.removeListener("finish",Ae),ee.removeListener("drain",E),ee.removeListener("error",Be),ee.removeListener("unpipe",_e),qe.removeListener("end",c),qe.removeListener("end",Re),qe.removeListener("data",D),Q=!0,!v.awaitDrain||ee._writableState&&!ee._writableState.needDrain||E())}));var E=(function(_e){return function(){var Ye=_e._readableState;I("pipeOnDrain",Ye.awaitDrain),Ye.awaitDrain&&Ye.awaitDrain--,Ye.awaitDrain===0&&u(_e,"data")&&(Ye.flowing=!0,Oe(_e))}})(qe);ee.on("drain",E);var Q=!1;function D(_e){I("ondata");var Ye=ee.write(_e);I("dest.write",Ye),Ye===!1&&((v.pipesCount===1&&v.pipes===ee||v.pipesCount>1&&Pt(v.pipes,ee)!==-1)&&!Q&&(I("false write response, pause",v.awaitDrain),v.awaitDrain++),qe.pause())}function Be(_e){I("onerror",_e),Re(),ee.removeListener("error",Be),u(ee,"error")===0&&J(ee,_e)}function De(){ee.removeListener("finish",Ae),Re()}function Ae(){I("onfinish"),ee.removeListener("close",De),Re()}function Re(){I("unpipe"),qe.unpipe(ee)}return qe.on("data",D),(function(_e,Ye,Ve){if(typeof _e.prependListener=="function")return _e.prependListener(Ye,Ve);_e._events&&_e._events[Ye]?Array.isArray(_e._events[Ye])?_e._events[Ye].unshift(Ve):_e._events[Ye]=[Ve,_e._events[Ye]]:_e.on(Ye,Ve)})(ee,"error",Be),ee.once("close",De),ee.once("finish",Ae),ee.emit("pipe",qe),v.flowing||(I("pipe resume"),qe.resume()),ee},X.prototype.unpipe=function(ee){var ae=this._readableState,qe={hasUnpiped:!1};if(ae.pipesCount===0)return this;if(ae.pipesCount===1)return ee&&ee!==ae.pipes||(ee||(ee=ae.pipes),ae.pipes=null,ae.pipesCount=0,ae.flowing=!1,ee&&ee.emit("unpipe",this,qe)),this;if(!ee){var v=ae.pipes,A=ae.pipesCount;ae.pipes=null,ae.pipesCount=0,ae.flowing=!1;for(var c=0;c<A;c++)v[c].emit("unpipe",this,{hasUnpiped:!1});return this}var E=Pt(ae.pipes,ee);return E===-1||(ae.pipes.splice(E,1),ae.pipesCount-=1,ae.pipesCount===1&&(ae.pipes=ae.pipes[0]),ee.emit("unpipe",this,qe)),this},X.prototype.on=function(ee,ae){var qe=n.prototype.on.call(this,ee,ae),v=this._readableState;return ee==="data"?(v.readableListening=this.listenerCount("readable")>0,v.flowing!==!1&&this.resume()):ee==="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?le(this):v.reading||process.nextTick(it,this))),qe},X.prototype.addListener=X.prototype.on,X.prototype.removeListener=function(ee,ae){var qe=n.prototype.removeListener.call(this,ee,ae);return ee==="readable"&&process.nextTick(He,this),qe},X.prototype.removeAllListeners=function(ee){var ae=n.prototype.removeAllListeners.apply(this,arguments);return ee!=="readable"&&ee!==void 0||process.nextTick(He,this),ae},X.prototype.resume=function(){var ee=this._readableState;return ee.flowing||(I("resume"),ee.flowing=!ee.readableListening,(function(ae,qe){qe.resumeScheduled||(qe.resumeScheduled=!0,process.nextTick(Ie,ae,qe))})(this,ee)),ee.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(ee){var ae=this,qe=this._readableState,v=!1;for(var A in ee.on("end",(function(){if(I("wrapped end"),qe.decoder&&!qe.ended){var E=qe.decoder.end();E&&E.length&&ae.push(E)}ae.push(null)})),ee.on("data",(function(E){I("wrapped data"),qe.decoder&&(E=qe.decoder.write(E)),qe.objectMode&&E==null||(qe.objectMode||E&&E.length)&&(ae.push(E)||(v=!0,ee.pause()))})),ee)this[A]===void 0&&typeof ee[A]=="function"&&(this[A]=(function(E){return function(){return ee[E].apply(ee,arguments)}})(A));for(var c=0;c<pe.length;c++)ee.on(pe[c],this.emit.bind(this,pe[c]));return this._read=function(E){I("wrapped _read",E),v&&(v=!1,ee.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(ee){this._readableState&&(this._readableState.flowing=ee)}}),X._fromList=ft,Object.defineProperty(X.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),typeof Symbol=="function"&&(X.from=function(ee,ae){return r===void 0&&(r=M(2421)),r(X,ee,ae)})},5570:function(vt,Le,M){vt.exports=h;var ce=M(2528).F,I=ce.ERR_METHOD_NOT_IMPLEMENTED,u=ce.ERR_MULTIPLE_CALLBACK,n=ce.ERR_TRANSFORM_ALREADY_TRANSFORMING,_=ce.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(vt,Le,M){function ce(Se){var Ne=this;this.next=null,this.entry=null,this.finish=function(){(function(He,it){var Ie=He.entry;for(He.entry=null;Ie;){var Oe=Ie.callback;it.pendingcb--,Oe(void 0),Ie=Ie.next}it.corkedRequestsFree.next=He})(Ne,Se)}}var I;vt.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,ne=r.ERR_STREAM_WRITE_AFTER_END,O=r.ERR_UNKNOWN_ENCODING,J=h.errorOrDestroy;function pe(){}function G(Se,Ne,He){I=I||M(7510),Se=Se||{},typeof He!="boolean"&&(He=Ne instanceof I),this.objectMode=!!Se.objectMode,He&&(this.objectMode=this.objectMode||!!Se.writableObjectMode),this.highWaterMark=g(this,Se,"writableHighWaterMark",He),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var it=Se.decodeStrings===!1;this.decodeStrings=!it,this.defaultEncoding=Se.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(Ie){(function(Oe,ft){var At=Oe._writableState,Rt=At.sync,Pt=At.writecb;if(typeof Pt!="function")throw new T;if((function(ae){ae.writing=!1,ae.writecb=null,ae.length-=ae.writelen,ae.writelen=0})(At),ft)(function(ae,qe,v,A,c){--qe.pendingcb,v?(process.nextTick(c,A),process.nextTick(je,ae,qe),ae._writableState.errorEmitted=!0,J(ae,A)):(c(A),ae._writableState.errorEmitted=!0,J(ae,A),je(ae,qe))})(Oe,At,Rt,ft,Pt);else{var ee=me(At)||Oe.destroyed;ee||At.corked||At.bufferProcessing||!At.bufferedRequest||Ue(Oe,At),Rt?process.nextTick(be,Oe,At,ee,Pt):be(Oe,At,ee,Pt)}})(Ne,Ie)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=Se.emitClose!==!1,this.autoDestroy=!!Se.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new ce(this)}function X(Se){var Ne=this instanceof(I=I||M(7510));if(!Ne&&!u.call(X,this))return new X(Se);this._writableState=new G(Se,this,Ne),this.writable=!0,Se&&(typeof Se.write=="function"&&(this._write=Se.write),typeof Se.writev=="function"&&(this._writev=Se.writev),typeof Se.destroy=="function"&&(this._destroy=Se.destroy),typeof Se.final=="function"&&(this._final=Se.final)),_.call(this)}function re(Se,Ne,He,it,Ie,Oe,ft){Ne.writelen=it,Ne.writecb=ft,Ne.writing=!0,Ne.sync=!0,Ne.destroyed?Ne.onwrite(new W("write")):He?Se._writev(Ie,Ne.onwrite):Se._write(Ie,Oe,Ne.onwrite),Ne.sync=!1}function be(Se,Ne,He,it){He||(function(Ie,Oe){Oe.length===0&&Oe.needDrain&&(Oe.needDrain=!1,Ie.emit("drain"))})(Se,Ne),Ne.pendingcb--,it(),je(Se,Ne)}function Ue(Se,Ne){Ne.bufferProcessing=!0;var He=Ne.bufferedRequest;if(Se._writev&&He&&He.next){var it=Ne.bufferedRequestCount,Ie=new Array(it),Oe=Ne.corkedRequestsFree;Oe.entry=He;for(var ft=0,At=!0;He;)Ie[ft]=He,He.isBuf||(At=!1),He=He.next,ft+=1;Ie.allBuffers=At,re(Se,Ne,!0,Ne.length,Ie,"",Oe.finish),Ne.pendingcb++,Ne.lastBufferedRequest=null,Oe.next?(Ne.corkedRequestsFree=Oe.next,Oe.next=null):Ne.corkedRequestsFree=new ce(Ne),Ne.bufferedRequestCount=0}else{for(;He;){var Rt=He.chunk,Pt=He.encoding,ee=He.callback;if(re(Se,Ne,!1,Ne.objectMode?1:Rt.length,Rt,Pt,ee),He=He.next,Ne.bufferedRequestCount--,Ne.writing)break}He===null&&(Ne.lastBufferedRequest=null)}Ne.bufferedRequest=He,Ne.bufferProcessing=!1}function me(Se){return Se.ending&&Se.length===0&&Se.bufferedRequest===null&&!Se.finished&&!Se.writing}function le(Se,Ne){Se._final((function(He){Ne.pendingcb--,He&&J(Se,He),Ne.prefinished=!0,Se.emit("prefinish"),je(Se,Ne)}))}function je(Se,Ne){var He=me(Ne);if(He&&((function(Ie,Oe){Oe.prefinished||Oe.finalCalled||(typeof Ie._final!="function"||Oe.destroyed?(Oe.prefinished=!0,Ie.emit("prefinish")):(Oe.pendingcb++,Oe.finalCalled=!0,process.nextTick(le,Ie,Oe)))})(Se,Ne),Ne.pendingcb===0&&(Ne.finished=!0,Se.emit("finish"),Ne.autoDestroy))){var it=Se._readableState;(!it||it.autoDestroy&&it.endEmitted)&&Se.destroy()}return He}M(4633)(X,_),G.prototype.getBuffer=function(){for(var Se=this.bufferedRequest,Ne=[];Se;)Ne.push(Se),Se=Se.next;return Ne},(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(Se){return!!u.call(this,Se)||this===X&&Se&&Se._writableState instanceof G}})):u=function(Se){return Se instanceof this},X.prototype.pipe=function(){J(this,new q)},X.prototype.write=function(Se,Ne,He){var it,Ie=this._writableState,Oe=!1,ft=!Ie.objectMode&&(it=Se,y.isBuffer(it)||it instanceof i);return ft&&!y.isBuffer(Se)&&(Se=(function(At){return y.from(At)})(Se)),typeof Ne=="function"&&(He=Ne,Ne=null),ft?Ne="buffer":Ne||(Ne=Ie.defaultEncoding),typeof He!="function"&&(He=pe),Ie.ending?(function(At,Rt){var Pt=new ne;J(At,Pt),process.nextTick(Rt,Pt)})(this,He):(ft||(function(At,Rt,Pt,ee){var ae;return Pt===null?ae=new x:typeof Pt=="string"||Rt.objectMode||(ae=new m("chunk",["string","Buffer"],Pt)),!ae||(J(At,ae),process.nextTick(ee,ae),!1)})(this,Ie,Se,He))&&(Ie.pendingcb++,Oe=(function(At,Rt,Pt,ee,ae,qe){if(!Pt){var v=(function(Q,D,Be){return Q.objectMode||Q.decodeStrings===!1||typeof D!="string"||(D=y.from(D,Be)),D})(Rt,ee,ae);ee!==v&&(Pt=!0,ae="buffer",ee=v)}var A=Rt.objectMode?1:ee.length;Rt.length+=A;var c=Rt.length<Rt.highWaterMark;if(c||(Rt.needDrain=!0),Rt.writing||Rt.corked){var E=Rt.lastBufferedRequest;Rt.lastBufferedRequest={chunk:ee,encoding:ae,isBuf:Pt,callback:qe,next:null},E?E.next=Rt.lastBufferedRequest:Rt.bufferedRequest=Rt.lastBufferedRequest,Rt.bufferedRequestCount+=1}else re(At,Rt,!1,A,ee,ae,qe);return c})(this,Ie,ft,Se,Ne,He)),Oe},X.prototype.cork=function(){this._writableState.corked++},X.prototype.uncork=function(){var Se=this._writableState;Se.corked&&(Se.corked--,Se.writing||Se.corked||Se.bufferProcessing||!Se.bufferedRequest||Ue(this,Se))},X.prototype.setDefaultEncoding=function(Se){if(typeof Se=="string"&&(Se=Se.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((Se+"").toLowerCase())>-1))throw new O(Se);return this._writableState.defaultEncoding=Se,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(Se,Ne,He){He(new d("_write()"))},X.prototype._writev=null,X.prototype.end=function(Se,Ne,He){var it=this._writableState;return typeof Se=="function"?(He=Se,Se=null,Ne=null):typeof Ne=="function"&&(He=Ne,Ne=null),Se!=null&&this.write(Se,Ne),it.corked&&(it.corked=1,this.uncork()),it.ending||(function(Ie,Oe,ft){Oe.ending=!0,je(Ie,Oe),ft&&(Oe.finished?process.nextTick(ft):Ie.once("finish",ft)),Oe.ended=!0,Ie.writable=!1})(this,it,He),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(Se){this._writableState&&(this._writableState.destroyed=Se)}}),X.prototype.destroy=h.destroy,X.prototype._undestroy=h.undestroy,X.prototype._destroy=function(Se,Ne){Ne(Se)}},3355:function(vt,Le,M){var ce;function I(x,ne,O){return(ne=(function(J){var pe=(function(G){if(typeof G!="object"||G===null)return G;var X=G[Symbol.toPrimitive];if(X!==void 0){var re=X.call(G,"string");if(typeof re!="object")return re;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(G)})(J);return typeof pe=="symbol"?pe:String(pe)})(ne))in x?Object.defineProperty(x,ne,{value:O,enumerable:!0,configurable:!0,writable:!0}):x[ne]=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,ne){return{value:x,done:ne}}function d(x){var ne=x[n];if(ne!==null){var O=x[r].read();O!==null&&(x[h]=null,x[n]=null,x[_]=null,ne(m(O,!1)))}}function T(x){process.nextTick(d,x)}var q=Object.getPrototypeOf((function(){})),W=Object.setPrototypeOf((I(ce={get stream(){return this[r]},next:function(){var x=this,ne=this[y];if(ne!==null)return Promise.reject(ne);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(re,be){G.then((function(){X[i]?re(m(void 0,!0)):X[g](re,be)}),be)}})(J,this));else{var pe=this[r].read();if(pe!==null)return Promise.resolve(m(pe,!1));O=new Promise(this[g])}return this[h]=O,O}},Symbol.asyncIterator,(function(){return this})),I(ce,"return",(function(){var x=this;return new Promise((function(ne,O){x[r].destroy(null,(function(J){J?O(J):ne(m(void 0,!0))}))}))})),ce),q);vt.exports=function(x){var ne,O=Object.create(W,(I(ne={},r,{value:x,writable:!0}),I(ne,n,{value:null,writable:!0}),I(ne,_,{value:null,writable:!0}),I(ne,y,{value:null,writable:!0}),I(ne,i,{value:x._readableState.endEmitted,writable:!0}),I(ne,g,{value:function(J,pe){var G=O[r].read();G?(O[h]=null,O[n]=null,O[_]=null,J(m(G,!1))):(O[n]=J,O[_]=pe)},writable:!0}),ne));return O[h]=null,u(x,(function(J){if(J&&J.code!=="ERR_STREAM_PREMATURE_CLOSE"){var pe=O[_];return pe!==null&&(O[h]=null,O[n]=null,O[_]=null,pe(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(vt,Le,M){function ce(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?ce(Object(m),!0).forEach((function(d){u(g,d,m[d])})):Object.getOwnPropertyDescriptors?Object.defineProperties(g,Object.getOwnPropertyDescriptors(m)):ce(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";vt.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),ne=this.head,O=0;ne;)T=ne.data,q=x,W=O,y.prototype.copy.call(T,q,W),O+=ne.data.length,ne=ne.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,ne=d>x.length?x.length:d;if(ne===x.length?W+=x:W+=x.slice(0,d),(d-=ne)==0){ne===x.length?(++q,T.next?this.head=T.next:this.head=this.tail=null):(this.head=T,T.data=x.slice(ne));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,ne=d>x.length?x.length:d;if(x.copy(T,T.length-d,0,ne),(d-=ne)==0){ne===x.length?(++W,q.next?this.head=q.next:this.head=this.tail=null):(this.head=q,q.data=x.slice(ne));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(vt){function Le(I,u){ce(I,u),M(I)}function M(I){I._writableState&&!I._writableState.emitClose||I._readableState&&!I._readableState.emitClose||I.emit("close")}function ce(I,u){I.emit("error",u)}vt.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(ce,this,I)):process.nextTick(ce,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(Le,n,i)):process.nextTick(Le,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(vt,Le,M){var ce=M(2528).F.ERR_STREAM_PREMATURE_CLOSE;function I(){}vt.exports=function u(n,_,y){if(typeof _=="function")return u(n,null,_);_||(_={}),y=(function(ne){var O=!1;return function(){if(!O){O=!0;for(var J=arguments.length,pe=new Array(J),G=0;G<J;G++)pe[G]=arguments[G];ne.apply(this,pe)}}})(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(ne){y.call(n,ne)},W=function(){var ne;return i&&!d?(n._readableState&&n._readableState.ended||(ne=new ce),y.call(n,ne)):h&&!r?(n._writableState&&n._writableState.ended||(ne=new ce),y.call(n,ne)):void 0},x=function(){n.req.on("finish",m)};return(function(ne){return ne.setHeader&&typeof ne.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(vt){vt.exports=function(){throw new Error("Readable.from is not available in the browser")}},8734:function(vt,Le,M){var ce,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)}vt.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(ne,O,J,pe){pe=(function(re){var be=!1;return function(){be||(be=!0,re.apply(void 0,arguments))}})(pe);var G=!1;ne.on("close",(function(){G=!0})),ce===void 0&&(ce=M(7182)),ce(ne,{readable:O,writable:J},(function(re){if(re)return pe(re);G=!0,pe()}));var X=!1;return function(re){if(!G&&!X)return X=!0,(function(be){return be.setHeader&&typeof be.abort=="function"})(ne)?ne.abort():typeof ne.destroy=="function"?ne.destroy():void pe(re||new n("pipe"))}})(q,x,W>0,(function(ne){m||(m=ne),ne&&T.forEach(y),x||(T.forEach(y),d(m))}))}));return g.reduce(i)}},5099:function(vt,Le,M){var ce=M(2528).F.ERR_INVALID_OPT_VALUE;vt.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 ce(_?n:"highWaterMark",y);return Math.floor(y)}return I.objectMode?16:16384}}},5369:function(vt,Le,M){vt.exports=M(5572).EventEmitter},950:function(vt,Le,M){var ce=M(6640).Buffer,I=ce.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 ne;;)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(ne)return;x=(""+x).toLowerCase(),ne=!0}})(q);if(typeof W!="string"&&(ce.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=ce.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):""}Le.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,ne,O){var J=ne.length-1;if(J<O)return 0;var pe=n(ne[J]);return pe>=0?(pe>0&&(x.lastNeed=pe-1),pe):--J<O||pe===-2?0:(pe=n(ne[J]))>=0?(pe>0&&(x.lastNeed=pe-2),pe):--J<O||pe===-2?0:(pe=n(ne[J]))>=0?(pe>0&&(pe===2?pe=0:x.lastNeed=pe-3),pe):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(vt,Le,M){var ce=M(4910),I=ce.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?vt.exports=ce:(u(ce,Le),Le.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 ce.SlowBuffer(_)}},3785:function(vt,Le,M){var ce;(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",ne="tablet",O="smarttv",J="wearable",pe="embedded",G="Amazon",X="Apple",re="ASUS",be="BlackBerry",Ue="Browser",me="Chrome",le="Firefox",je="Google",Se="Huawei",Ne="LG",He="Microsoft",it="Motorola",Ie="Opera",Oe="Samsung",ft="Sharp",At="Sony",Rt="Xiaomi",Pt="Zebra",ee="Facebook",ae="Chromium OS",qe="Mac OS",v=function(Ye){for(var Ve={},Xe=0;Xe<Ye.length;Xe++)Ve[Ye[Xe].toUpperCase()]=Ye[Xe];return Ve},A=function(Ye,Ve){return typeof Ye===i&&c(Ve).indexOf(c(Ye))!==-1},c=function(Ye){return Ye.toLowerCase()},E=function(Ye,Ve){if(typeof Ye===i)return Ye=Ye.replace(/^\s\s*/,""),typeof Ve===_?Ye:Ye.substring(0,500)},Q=function(Ye,Ve){for(var Xe,nt,Tt,mt,Ut,Mt,zt=0;zt<Ve.length&&!Ut;){var Qt=Ve[zt],nn=Ve[zt+1];for(Xe=nt=0;Xe<Qt.length&&!Ut&&Qt[Xe];)if(Ut=Qt[Xe++].exec(Ye))for(Tt=0;Tt<nn.length;Tt++)Mt=Ut[++nt],typeof(mt=nn[Tt])===y&&mt.length>0?mt.length===2?typeof mt[1]==n?this[mt[0]]=mt[1].call(this,Mt):this[mt[0]]=mt[1]:mt.length===3?typeof mt[1]!==n||mt[1].exec&&mt[1].test?this[mt[0]]=Mt?Mt.replace(mt[1],mt[2]):u:this[mt[0]]=Mt?mt[1].call(this,Mt,mt[2]):u:mt.length===4&&(this[mt[0]]=Mt?mt[3].call(this,Mt.replace(mt[1],mt[2])):u):this[mt]=Mt||u;zt+=2}},D=function(Ye,Ve){for(var Xe in Ve)if(typeof Ve[Xe]===y&&Ve[Xe].length>0){for(var nt=0;nt<Ve[Xe].length;nt++)if(A(Ve[Xe][nt],Ye))return Xe==="?"?u:Xe}else if(A(Ve[Xe],Ye))return Xe==="?"?u:Xe;return Ye},Be={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"},De={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,Ie+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[T,[r,Ie+" GX"]],[/\bopr\/([\w\.]+)/i],[T,[r,Ie]],[/\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"+Ue]],[/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 "+Ue]],[/(avast|avg)\/([\w\.]+)/i],[[r,/(.+)/,"$1 Secure "+Ue],T],[/\bfocus\/([\w\.]+)/i],[T,[r,le+" Focus"]],[/\bopt\/([\w\.]+)/i],[T,[r,Ie+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[T,[r,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[T,[r,"Dolphin"]],[/coast\/([\w\.]+)/i],[T,[r,Ie+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[T,[r,"MIUI "+Ue]],[/fxios\/([-\w\.]+)/i],[T,[r,le]],[/\bqihu|(qi?ho?o?|360)browser/i],[[r,"360 "+Ue]],[/(oculus|sailfish|huawei|vivo)browser\/([\w\.]+)/i],[[r,/(.+)/,"$1 "+Ue],T],[/samsungbrowser\/([\w\.]+)/i],[T,[r,Oe+" 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,ee],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,me+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[r,me+" WebView"],T],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[T,[r,"Android "+Ue]],[/(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,le+" 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,Oe],[m,ne]],[/\b((?:s[cgp]h|gt|sm)-\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[g,[d,Oe],[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,ne]],[/(macintosh);/i],[g,[d,X]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[g,[d,ft],[m,x]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[g,[d,Se],[m,ne]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[g,[d,Se],[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,Rt],[m,x]],[/oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i,/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[g,/_/g," "],[d,Rt],[m,ne]],[/; (\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,ne]],[/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,it],[m,x]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[g,[d,it],[m,ne]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[g,[d,Ne],[m,ne]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[g,[d,Ne],[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,ne]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[g,/_/g," "],[d,"Nokia"],[m,x]],[/(pixel c)\b/i],[g,[d,je],[m,ne]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[g,[d,je],[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,At],[m,x]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[g,"Xperia Tablet"],[d,At],[m,ne]],[/ (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,ne]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[g,/(.+)/g,"Fire Phone $1"],[d,G],[m,x]],[/(playbook);[-\w\),; ]+(rim)/i],[g,d,[m,ne]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[g,[d,be],[m,x]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[g,[d,re],[m,ne]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[g,[d,re],[m,x]],[/(nexus 9)/i],[g,[d,"HTC"],[m,ne]],[/(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,ne]],[/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,ne]],[/(surface duo)/i],[g,[d,He],[m,ne]],[/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,ne]],[/\b(venue[\d ]{2,7}) b/i],[g,[d,"Dell"],[m,ne]],[/\b(q(?:mv|ta)\w+) b/i],[g,[d,"Verizon"],[m,ne]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[g,[d,"Barnes & Noble"],[m,ne]],[/\b(tm\d{3}\w+) b/i],[g,[d,"NuVision"],[m,ne]],[/\b(k88) b/i],[g,[d,"ZTE"],[m,ne]],[/\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,ne]],[/\b((zeki)?tb.*\b) b/i],[g,[d,"Zeki"],[m,ne]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[d,"Dragon Touch"],g,[m,ne]],[/\b(ns-?\w{0,9}) b/i],[g,[d,"Insignia"],[m,ne]],[/\b((nxa|next)-?\w{0,9}) b/i],[g,[d,"NextBook"],[m,ne]],[/\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,ne]],[/\b(trio[-\w\. ]+) b/i],[g,[d,"MachSpeed"],[m,ne]],[/\btu_(1491) b/i],[g,[d,"Rotor"],[m,ne]],[/(shield[\w ]+) b/i],[g,[d,"Nvidia"],[m,ne]],[/(sprint) (\w+)/i],[d,g,[m,x]],[/(kin\.[onetw]{3})/i],[[g,/\./g," "],[d,He],[m,x]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[g,[d,Pt],[m,ne]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[g,[d,Pt],[m,x]],[/smart-tv.+(samsung)/i],[d,[m,O]],[/hbbtv.+maple;(\d+)/i],[[g,/^/,"SmartTV"],[d,Oe],[m,O]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[d,Ne],[m,O]],[/(apple) ?tv/i],[d,[g,X+" TV"],[m,O]],[/crkey/i],[[g,me+"cast"],[d,je],[m,O]],[/droid.+aft(\w+)( bui|\))/i],[g,[d,G],[m,O]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[g,[d,ft],[m,O]],[/(bravia[\w ]+)( bui|\))/i],[g,[d,At],[m,O]],[/(mitv-\w{5}) bui/i],[g,[d,Rt],[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,At],[m,W]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[g,[d,He],[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,je],[m,J]],[/droid.+; (wt63?0{2,3})\)/i],[g,[d,Pt],[m,J]],[/(quest( \d| pro)?)/i],[g,[d,ee],[m,J]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[d,[m,pe]],[/(aeobc)\b/i],[g,[d,G],[m,pe]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[g,[m,x]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[g,[m,ne]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[m,ne]],[/(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,Be]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[T,D,Be],[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,qe],[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,be]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[T,[r,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[T,[r,le+" 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,me+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[r,ae],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]]},Ae=function(Ye,Ve){if(typeof Ye===y&&(Ve=Ye,Ye=u),!(this instanceof Ae))return new Ae(Ye,Ve).getResult();var Xe=typeof I!==_&&I.navigator?I.navigator:u,nt=Ye||(Xe&&Xe.userAgent?Xe.userAgent:""),Tt=Xe&&Xe.userAgentData?Xe.userAgentData:u,mt=Ve?(function(Mt,zt){var Qt={};for(var nn in Mt)zt[nn]&&zt[nn].length%2==0?Qt[nn]=zt[nn].concat(Mt[nn]):Qt[nn]=Mt[nn];return Qt})(De,Ve):De,Ut=Xe&&Xe.userAgent==nt;return this.getBrowser=function(){var Mt,zt={};return zt[r]=u,zt[T]=u,Q.call(zt,nt,mt.browser),zt[h]=typeof(Mt=zt[T])===i?Mt.replace(/[^\d\.]/g,"").split(".")[0]:u,Ut&&Xe&&Xe.brave&&typeof Xe.brave.isBrave==n&&(zt[r]="Brave"),zt},this.getCPU=function(){var Mt={};return Mt[q]=u,Q.call(Mt,nt,mt.cpu),Mt},this.getDevice=function(){var Mt={};return Mt[d]=u,Mt[g]=u,Mt[m]=u,Q.call(Mt,nt,mt.device),Ut&&!Mt[m]&&Tt&&Tt.mobile&&(Mt[m]=x),Ut&&Mt[g]=="Macintosh"&&Xe&&typeof Xe.standalone!==_&&Xe.maxTouchPoints&&Xe.maxTouchPoints>2&&(Mt[g]="iPad",Mt[m]=ne),Mt},this.getEngine=function(){var Mt={};return Mt[r]=u,Mt[T]=u,Q.call(Mt,nt,mt.engine),Mt},this.getOS=function(){var Mt={};return Mt[r]=u,Mt[T]=u,Q.call(Mt,nt,mt.os),Ut&&!Mt[r]&&Tt&&Tt.platform&&Tt.platform!="Unknown"&&(Mt[r]=Tt.platform.replace(/chrome os/i,ae).replace(/macos/i,qe)),Mt},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 nt},this.setUA=function(Mt){return nt=typeof Mt===i&&Mt.length>500?E(Mt,500):Mt,this},this.setUA(nt),this};Ae.VERSION="1.0.38",Ae.BROWSER=v([r,T,h]),Ae.CPU=v([q]),Ae.DEVICE=v([g,d,m,W,x,O,ne,J,pe]),Ae.ENGINE=Ae.OS=v([r,T]),typeof Le!==_?(vt.exports&&(Le=vt.exports=Ae),Le.UAParser=Ae):M.amdO?(ce=(function(){return Ae}).call(Le,M,Le,vt))===u||(vt.exports=ce):typeof I!==_&&(I.UAParser=Ae);var Re=typeof I!==_&&(I.jQuery||I.Zepto);if(Re&&!Re.ua){var _e=new Ae;Re.ua=_e.getResult(),Re.ua.get=function(){return _e.getUA()},Re.ua.set=function(Ye){_e.setUA(Ye);var Ve=_e.getResult();for(var Xe in Ve)Re.ua[Xe]=Ve[Xe]}}})(typeof window=="object"?window:this)},8214:function(vt,Le,M){function ce(I){try{if(!M.g.localStorage)return!1}catch{return!1}var u=M.g.localStorage[I];return u!=null&&String(u).toLowerCase()==="true"}vt.exports=function(I,u){if(ce("noDeprecation"))return I;var n=!1;return function(){if(!n){if(ce("throwDeprecation"))throw new Error(u);ce("traceDeprecation")?console.trace(u):console.warn(u),n=!0}return I.apply(this,arguments)}}},3779:function(){},7199:function(){}},ui={};function zn(vt){var Le=ui[vt];if(Le!==void 0)return Le.exports;var M=ui[vt]={exports:{}};return Ea[vt].call(M.exports,M,M.exports,zn),M.exports}zn.amdO={},zn.n=function(vt){var Le=vt&&vt.__esModule?function(){return vt.default}:function(){return vt};return zn.d(Le,{a:Le}),Le},zn.d=function(vt,Le){for(var M in Le)zn.o(Le,M)&&!zn.o(vt,M)&&Object.defineProperty(vt,M,{enumerable:!0,get:Le[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(vt,Le){return Object.prototype.hasOwnProperty.call(vt,Le)};var _a={};return(function(){zn.d(_a,{default:function(){return y}}),zn(1229);var vt,Le=zn(6035),M=zn(1648),ce=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 ne=d.querySelectorAll('source[type="'+h+'"]'),O=0;O<ne.length;O++){var J=g(r(ne[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():vt=window.setInterval((function(){window.dashjs&&(window.clearInterval(vt),u.createAll())}),500):window.addEventListener("load",(function i(){window.removeEventListener("load",i),u.createAll()})));var n=u,_=zn(4413);dashjs.Protection=ce.default,dashjs.MetricsReporting=M.default,dashjs.MediaPlayerFactory=n,dashjs.Debug=_.A,dashjs.supportsMediaSource=Le.a;var y=dashjs})(),_a.default})()}))})(ya)),ya.exports}var il=rl();const al=nl.getDefaultExportFromCjs(il),ol=Object.freeze(Object.defineProperty({__proto__:null,default:al},Symbol.toStringTag,{value:"Module"}));exports.dash_all_min=ol;
26
+ Actual: `+c.attribValue);else{var Be=c.tag,De=c.tags[c.tags.length-1]||c;Be.ns===De.ns&&(Be.ns=Object.create(De.ns)),Be.ns[D]=c.attribValue}c.attribList.push([c.attribName,c.attribValue])}else c.tag.attributes[c.attribName]=c.attribValue,Ne(c,"onattribute",{name:c.attribName,value:c.attribValue});c.attribName=c.attribValue=""}}function ee(c,E){if(c.opt.xmlns){var Q=c.tag,D=Rt(c.tagName);Q.prefix=D.prefix,Q.local=D.local,Q.uri=Q.ns[D.prefix]||"",Q.prefix&&!Q.uri&&(ft(c,"Unbound namespace prefix: "+JSON.stringify(c.tagName)),Q.uri=D.prefix);var Be=c.tags[c.tags.length-1]||c;Q.ns&&Be.ns!==Q.ns&&Object.keys(Q.ns).forEach((function(Ut){Ne(c,"onopennamespace",{prefix:Ut,uri:Q.ns[Ut]})}));for(var De=0,Ae=c.attribList.length;De<Ae;De++){var Re=c.attribList[De],_e=Re[0],Ye=Re[1],Ve=Rt(_e,!0),Xe=Ve.prefix,nt=Ve.local,Tt=Xe===""?"":Q.ns[Xe]||"",mt={name:_e,value:Ye,prefix:Xe,local:nt,uri:Tt};Xe&&Xe!=="xmlns"&&!Tt&&(ft(c,"Unbound namespace prefix: "+JSON.stringify(Xe)),mt.uri=Xe),c.tag.attributes[_e]=mt,Ne(c,"onattribute",mt)}c.attribList.length=0}c.tag.isSelfClosing=!!E,c.sawRoot=!0,c.tags.push(c.tag),Ne(c,"onopentag",c.tag),E||(c.noscript||c.tagName.toLowerCase()!=="script"?c.state=le.TEXT:c.state=le.SCRIPT,c.tag=null,c.tagName=""),c.attribName=c.attribValue="",c.attribList.length=0}function ae(c){if(!c.tagName)return ft(c,"Weird empty close tag."),c.textNode+="</>",void(c.state=le.TEXT);if(c.script){if(c.tagName!=="script")return c.script+="</"+c.tagName+">",c.tagName="",void(c.state=le.SCRIPT);Ne(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;)ft(c,"Unexpected close tag");if(E<0)return ft(c,"Unmatched closing tag: "+c.tagName),c.textNode+="</"+c.tagName+">",void(c.state=le.TEXT);c.tagName=Q;for(var Be=c.tags.length;Be-- >E;){var De=c.tag=c.tags.pop();c.tagName=c.tag.name,Ne(c,"onclosetag",c.tagName);var Ae={};for(var Re in De.ns)Ae[Re]=De.ns[Re];var _e=c.tags[c.tags.length-1]||c;c.opt.xmlns&&De.ns!==_e.ns&&Object.keys(De.ns).forEach((function(Ye){var Ve=De.ns[Ye];Ne(c,"onclosenamespace",{prefix:Ye,uri:Ve})}))}E===0&&(c.closedRoot=!0),c.tagName=c.attribValue=c.attribName="",c.attribList.length=0,c.state=le.TEXT}function qe(c){var E,Q=c.entity,D=Q.toLowerCase(),Be="";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),Be=(E=parseInt(Q,16)).toString(16)):(Q=Q.slice(1),Be=(E=parseInt(Q,10)).toString(10))),Q=Q.replace(/^0+/,""),Be.toLowerCase()!==Q?(ft(c,"Invalid character entity"),"&"+c.entity+";"):String.fromCodePoint(E))}function v(c,E){E==="<"?(c.state=le.OPEN_WAKA,c.startTagPosition=c.position):re(i,E)&&(ft(c,"Non-whitespace before first tag."),c.textNode=E,c.state=le.TEXT)}function A(c,E){var Q="";return E<c.length&&(Q=c.charAt(E)),Q}le=ce.STATE,String.fromCodePoint||(be=String.fromCharCode,Ue=Math.floor,me=function(){var c,E,Q=[],D=-1,Be=arguments.length;if(!Be)return"";for(var De="";++D<Be;){var Ae=Number(arguments[D]);if(!isFinite(Ae)||Ae<0||Ae>1114111||Ue(Ae)!==Ae)throw RangeError("Invalid code point: "+Ae);Ae<=65535?Q.push(Ae):(c=55296+((Ae-=65536)>>10),E=Ae%1024+56320,Q.push(c,E)),(D+1===Be||Q.length>16384)&&(De+=be.apply(null,Q),Q.length=0)}return De},Object.defineProperty?Object.defineProperty(String,"fromCodePoint",{value:me,configurable:!0,writable:!0}):String.fromCodePoint=me)})(Le)},4421:function(vt,Le,M){(function(ce,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",Be=0;Q&&(Be=D&&E?E.end:Q.begin),c.begin=c.explicit_begin?c.explicit_begin+Be:Be;var De=c.begin,Ae=null;if("sets"in c)for(var Re=0;Re<c.sets.length;Re++)i(A,c.sets[Re],Ae,c),De=c.timeContainer==="seq"?c.sets[Re].end:Math.max(De,c.sets[Re].end),Ae=c.sets[Re];if("contents"in c){if("contents"in c)for(var _e=0;_e<c.contents.length;_e++)i(A,c.contents[_e],Ae,c),De=c.timeContainer==="seq"?c.contents[_e].end:Math.max(De,c.contents[_e].end),Ae=c.contents[_e]}else De=D?c.begin:Number.POSITIVE_INFINITY;c.explicit_end!==null&&c.explicit_dur!==null?c.end=Math.min(c.begin+c.explicit_dur,Be+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=Be+c.explicit_end:c.end=De,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 ne(A){this.id=A}function O(A){this.regionID=A}function J(A){this.styleAttrs=A}function pe(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 re(){x.call(this,"body")}function be(){x.call(this,"div")}function Ue(){x.call(this,"p")}function me(){x.call(this,"span")}function le(){x.call(this,"span")}function je(){x.call(this,"br")}function Se(){}function Ne(){}function He(A){return A&&"xml:id"in A.attributes&&A.attributes["xml:id"].value||null}function it(A){return A&&"style"in A.attributes?A.attributes.style.value.split(" "):[]}function Ie(A,c){var E={};if(A!==null)for(var Q in A.attributes){var D=A.attributes[Q].uri+" "+A.attributes[Q].local,Be=n.byQName[D];if(Be!==void 0){var De=Be.parse(A.attributes[Q].value);De!==null?(E[D]=De,Be===n.byName.zIndex&&ee(c,"zIndex attribute present but not used by IMSC1 since regions do not overlap")):ae(c,"Cannot parse styling attribute "+D+" --> "+A.attributes[Q].value)}}return E}function Oe(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 ft(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 At(A,c,E){for(;c.styleRefs.length>0;){var Q=c.styleRefs.pop();Q in A.styles?(At(A,A.styles[Q],E),Pt(A.styles[Q].styleAttrs,c.styleAttrs)):ae(E,"Non-existant style id referenced")}}function Rt(A,c,E,Q){for(var D=c.length-1;D>=0;D--){var Be=c[D];Be in A.styles?Pt(A.styles[Be].styleAttrs,E):ae(Q,"Non-existant style id referenced")}}function Pt(A,c){for(var E in A)A.hasOwnProperty(E)&&(E in c||(c[E]=A[E]))}function ee(A,c){if(A&&A.warn&&A.warn(c))throw c}function ae(A,c){if(A&&A.error&&A.error(c))throw c}function qe(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 Be=A[E=Math.floor((Q+D)/2)];if(Be<c)Q=E+1;else{if(!(Be>c))return{found:!0,index:E};D=E-1}}return{found:!1,index:Q}}ce.fromXML=function(A,c,E){var Q=I.parser(!0,{xmlns:!0}),D=[],Be=[],De=[],Ae=0,Re=null;Q.onclosetag=function(nt){if(D[0]instanceof Se)Re.head!==null&&Re.head.styling!==null&&Rt(Re.head.styling,D[0].styleRefs,D[0].styleAttrs,c),delete D[0].styleRefs;else if(D[0]instanceof m)for(var Tt in D[0].styles)D[0].styles.hasOwnProperty(Tt)&&At(D[0],D[0].styles[Tt],c);else if(D[0]instanceof Ue||D[0]instanceof me){if(D[0].contents.length>1){var mt,Ut=[D[0].contents[0]];for(mt=1;mt<D[0].contents.length;mt++)D[0].contents[mt]instanceof le&&Ut[Ut.length-1]instanceof le?Ut[Ut.length-1].text+=D[0].contents[mt].text:Ut.push(D[0].contents[mt]);D[0].contents=Ut}D[0]instanceof me&&D[0].contents.length===1&&D[0].contents[0]instanceof le&&(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"?Ae--:Ae>0&&E&&"onCloseTag"in E&&E.onCloseTag());De.shift(),Be.shift(),D.shift()},Q.ontext=function(nt){if(D[0]!==void 0)if(D[0]instanceof me||D[0]instanceof Ue){if(D[0]instanceof me){var Tt=D[0].styleAttrs[n.byName.ruby.qname];if(Tt==="container"||Tt==="textContainer"||Tt==="baseContainer")return}var mt=new le;mt.initFromText(Re,D[0],nt,Be[0],De[0],c),D[0].contents.push(mt)}else D[0]instanceof h&&Ae>0&&E&&"onText"in E&&E.onText(nt)},Q.onopentag=function(nt){var Tt=nt.attributes["xml:space"];Tt?De.unshift(Tt.value):De.length===0?De.unshift("default"):De.unshift(De[0]);var mt=nt.attributes["xml:lang"];if(mt?Be.unshift(mt.value):Be.length===0?Be.unshift(""):Be.unshift(Be[0]),nt.uri===u.ns_tt)if(nt.local==="tt")Re!==null&&qe(c,"Two <tt> elements at ("+this.line+","+this.column+")"),(Re=new g).initFromNode(nt,Be[0],c),D.unshift(Re);else if(nt.local==="head")D[0]instanceof g||qe(c,"Parent of <head> element is not <tt> at ("+this.line+","+this.column+")"),D.unshift(Re.head);else if(nt.local==="styling")D[0]instanceof r||qe(c,"Parent of <styling> element is not <head> at ("+this.line+","+this.column+")"),D.unshift(Re.head.styling);else if(nt.local==="style"){var Ut;D[0]instanceof m?((Ut=new d).initFromNode(nt,c),Ut.id?Re.head.styling.styles[Ut.id]=Ut:ae(c,"<style> element missing @id attribute"),D.unshift(Ut)):D[0]instanceof Se?((Ut=new d).initFromNode(nt,c),Pt(Ut.styleAttrs,D[0].styleAttrs),D.unshift(Ut)):qe(c,"Parent of <style> element is not <styling> or <region> at ("+this.line+","+this.column+")")}else if(nt.local==="initial"){var Mt;if(D[0]instanceof m){for(var zt in(Mt=new T).initFromNode(nt,c),Mt.styleAttrs)Mt.styleAttrs.hasOwnProperty(zt)&&(Re.head.styling.initials[zt]=Mt.styleAttrs[zt]);D.unshift(Mt)}else qe(c,"Parent of <initial> element is not <styling> at ("+this.line+","+this.column+")")}else if(nt.local==="layout")D[0]instanceof r||qe(c,"Parent of <layout> element is not <head> at "+this.line+","+this.column+")"),D.unshift(Re.head.layout);else if(nt.local==="region"){D[0]instanceof q||qe(c,"Parent of <region> element is not <layout> at "+this.line+","+this.column+")");var Qt=new Se;Qt.initFromNode(Re,nt,Be[0],c),!Qt.id||Qt.id in Re.head.layout.regions?ae(c,"Ignoring <region> with duplicate or missing @id at "+this.line+","+this.column+")"):Re.head.layout.regions[Qt.id]=Qt,D.unshift(Qt)}else if(nt.local==="body"){D[0]instanceof g||qe(c,"Parent of <body> element is not <tt> at "+this.line+","+this.column+")"),Re.body!==null&&qe(c,"Second <body> element at "+this.line+","+this.column+")");var nn=new re;nn.initFromNode(Re,nt,Be[0],c),Re.body=nn,D.unshift(nn)}else if(nt.local==="div"){D[0]instanceof be||D[0]instanceof re||qe(c,"Parent of <div> element is not <body> or <div> at "+this.line+","+this.column+")");var yn=new be;yn.initFromNode(Re,D[0],nt,Be[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(nt.local==="image"){D[0]instanceof be||qe(c,"Parent of <image> element is not <div> at "+this.line+","+this.column+")");var Hn=new W;Hn.initFromNode(Re,D[0],nt,Be[0],c),D[0].contents.push(Hn),D.unshift(Hn)}else if(nt.local==="p"){D[0]instanceof be||qe(c,"Parent of <p> element is not <div> at "+this.line+","+this.column+")");var An=new Ue;An.initFromNode(Re,D[0],nt,Be[0],c),D[0].contents.push(An),D.unshift(An)}else if(nt.local==="span"){D[0]instanceof me||D[0]instanceof Ue||qe(c,"Parent of <span> element is not <span> or <p> at "+this.line+","+this.column+")");var Un=new me;Un.initFromNode(Re,D[0],nt,Be[0],De[0],c),D[0].contents.push(Un),D.unshift(Un)}else if(nt.local==="br"){D[0]instanceof me||D[0]instanceof Ue||qe(c,"Parent of <br> element is not <span> or <p> at "+this.line+","+this.column+")");var Sn=new je;Sn.initFromNode(Re,D[0],nt,Be[0],c),D[0].contents.push(Sn),D.unshift(Sn)}else if(nt.local==="set"){D[0]instanceof me||D[0]instanceof Ue||D[0]instanceof be||D[0]instanceof re||D[0]instanceof Se||D[0]instanceof je||qe(c,"Parent of <set> element is not a content element or a region at "+this.line+","+this.column+")");var Gn=new Ne;Gn.initFromNode(Re,D[0],nt,c),D[0].sets.push(Gn),D.unshift(Gn)}else D.unshift(new h(nt));else D.unshift(new h(nt));if(D[0]instanceof h){if(nt.uri===u.ns_tt&&nt.local==="metadata")Ae++;else if(Ae>0&&E&&"onOpenTag"in E){var Vn=[];for(var Wn in nt.attributes)Vn[nt.attributes[Wn].uri+" "+nt.attributes[Wn].local]={uri:nt.attributes[Wn].uri,local:nt.attributes[Wn].local,value:nt.attributes[Wn].value};E.onOpenTag(nt.uri,nt.local,Vn)}}},Q.write(A).close(),delete Re.head.styling.styles;var _e=!1;for(var Ye in Re.head.layout.regions)if(Re.head.layout.regions.hasOwnProperty(Ye)){_e=!0;break}if(!_e){var Ve=Se.prototype.createDefaultRegion(Re.lang);Re.head.layout.regions[Ve.id]=Ve}for(var Xe in Re.head.layout.regions)Re.head.layout.regions.hasOwnProperty(Xe)&&i(Re,Re.head.layout.regions[Xe],null,null);return Re.body&&i(Re,Re.body,null,null),Re.body&&y(Re.body),Re},g.prototype.initFromNode=function(A,c,E){var Q=(function(Ae,Re){var _e=Oe(Ae,u.ns_ttp,"cellResolution"),Ye=15,Ve=32;if(_e!==null){var Xe=/(\d+) (\d+)/.exec(_e);Xe!==null?(Ve=parseInt(Xe[1]),Ye=parseInt(Xe[2])):ee(Re,"Malformed cellResolution value (using initial value instead)")}return{w:Ve,h:Ye}})(A,E);this.cellLength={h:new _.ComputedLength(0,1/Q.h),w:new _.ComputedLength(1/Q.w,0)};var D=(function(Ae,Re){var _e,Ye=Oe(Ae,u.ns_ttp,"frameRate"),Ve=30;Ye!==null&&((_e=/(\d+)/.exec(Ye))!==null?Ve=parseInt(_e[1]):ee(Re,"Malformed frame rate attribute (using initial value instead)"));var Xe=Oe(Ae,u.ns_ttp,"frameRateMultiplier"),nt=1;Xe!==null&&((_e=/(\d+) (\d+)/.exec(Xe))!==null?nt=parseInt(_e[1])/parseInt(_e[2]):ee(Re,"Malformed frame rate multiplier attribute (using initial value instead)"));var Tt=nt*Ve,mt=1,Ut=Oe(Ae,u.ns_ttp,"tickRate");return Ut===null?Ye!==null&&(mt=Tt):(_e=/(\d+)/.exec(Ut))!==null?mt=parseInt(_e[1]):ee(Re,"Malformed tick rate attribute (using initial value instead)"),{effectiveFrameRate:Tt,tickRate:mt}})(A,E);this.effectiveFrameRate=D.effectiveFrameRate,this.tickRate=D.tickRate,this.aspectRatio=(function(Ae,Re){var _e=Oe(Ae,u.ns_ittp,"aspectRatio");_e===null&&(_e=Oe(Ae,u.ns_ttp,"displayAspectRatio"));var Ye=null;if(_e!==null){var Ve=/(\d+)\s+(\d+)/.exec(_e);if(Ve!==null){var Xe=parseInt(Ve[1]),nt=parseInt(Ve[2]);Xe!==0&&nt!==0?Ye=Xe/nt:ae(Re,"Illegal aspectRatio values (ignoring)")}else ae(Re,"Malformed aspectRatio attribute (ignoring)")}return Ye})(A,E);var Be=Oe(A,u.ns_ttp,"timeBase");Be!==null&&Be!=="media"&&qe(E,"Unsupported time base");var De=(function(Ae,Re){var _e=Oe(Ae,u.ns_tts,"extent");if(_e===null)return null;var Ye=_e.split(" ");if(Ye.length!==2)return ee(Re,"Malformed extent (ignoring)"),null;var Ve=_.parseLength(Ye[0]),Xe=_.parseLength(Ye[1]);return Xe&&Ve?{h:Xe,w:Ve}:(ee(Re,"Malformed extent values (ignoring)"),null)})(A,E);De===null?this.pxLength={h:null,w:null}:(De.h.unit==="px"&&De.w.unit==="px"||qe(E,"Extent on TT must be in px or absent"),this.pxLength={h:new _.ComputedLength(0,1/De.h.value),w:new _.ComputedLength(1/De.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=He(A),this.styleAttrs=Ie(A,c),this.styleRefs=it(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||ae(D,"Invalid image@src attribute"),this.type="type"in E.attributes?E.attributes.type.value:null,this.type||ae(D,"Invalid image@type attribute"),J.prototype.initFromNode.call(this,A,c,E,D),X.prototype.initFromNode.call(this,A,c,E,D),pe.prototype.initFromNode.call(this,A,c,E,D),O.prototype.initFromNode.call(this,A,c,E,D),this.lang=Q},ne.prototype.initFromNode=function(A,c,E,Q){this.id=He(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=Ie(E,Q),A.head!==null&&A.head.styling!==null&&Rt(A.head.styling,it(E),this.styleAttrs,Q)},pe.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(Be,De,Ae,Re){var _e=null;Ae&&"begin"in Ae.attributes&&(_e=ft(Be.tickRate,Be.effectiveFrameRate,Ae.attributes.begin.value))===null&&ee(Re,"Malformed begin value "+Ae.attributes.begin.value+" (using 0)");var Ye=null;Ae&&"dur"in Ae.attributes&&(Ye=ft(Be.tickRate,Be.effectiveFrameRate,Ae.attributes.dur.value))===null&&ee(Re,"Malformed dur value "+Ae.attributes.dur.value+" (ignoring)");var Ve=null;return Ae&&"end"in Ae.attributes&&(Ve=ft(Be.tickRate,Be.effectiveFrameRate,Ae.attributes.end.value))===null&&ee(Re,"Malformed end value (ignoring)"),{explicit_begin:_e,explicit_end:Ve,explicit_dur:Ye}})(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(Be,De){var Ae=Be&&"timeContainer"in Be.attributes?Be.attributes.timeContainer.value:null;return Ae&&Ae!=="par"?Ae==="seq"?"seq":(ae(De,"Illegal value of timeContainer (assuming 'par')"),"par"):"par"})(E,Q)},re.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),pe.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},be.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),pe.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},Ue.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),pe.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},me.prototype.initFromNode=function(A,c,E,Q,D,Be){J.prototype.initFromNode.call(this,A,c,E,Be),X.prototype.initFromNode.call(this,A,c,E,Be),pe.prototype.initFromNode.call(this,A,c,E,Be),O.prototype.initFromNode.call(this,A,c,E,Be),G.prototype.initFromNode.call(this,A,c,E,Be),this.space=D,this.lang=Q},le.prototype.initFromText=function(A,c,E,Q,D,Be){X.prototype.initFromNode.call(this,A,c,null,Be),this.text=E,this.space=D,this.lang=Q},je.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},Se.prototype.createDefaultRegion=function(A){var c=new Se;return ne.call(c,""),J.call(c,{}),pe.call(c,[]),X.call(c,0,Number.POSITIVE_INFINITY,null),this.lang=A,c},Se.prototype.initFromNode=function(A,c,E,Q){ne.prototype.initFromNode.call(this,A,null,c,Q),X.prototype.initFromNode.call(this,A,null,c,Q),pe.prototype.initFromNode.call(this,A,null,c,Q),this.styleAttrs=Ie(c,Q),this.styleRefs=it(c),this.lang=E},Ne.prototype.initFromNode=function(A,c,E,Q){X.prototype.initFromNode.call(this,A,c,E,Q);var D=Ie(E,Q);for(var Be in this.qname=null,this.value=null,D)if(D.hasOwnProperty(Be)){if(this.qname){ae(Q,"More than one style specified on set");break}this.qname=Be,this.value=D[Be]}}})(Le,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(vt,Le,M){var ce=/firefox/i.test(navigator.userAgent);(function(I,u,n){function _(G,X,re,be){var Ue;if(re.kind==="region")(Ue=document.createElement("div")).style.position="absolute";else if(re.kind==="body")Ue=document.createElement("div");else if(re.kind==="div")Ue=document.createElement("div");else if(re.kind==="image"){if(Ue=document.createElement("img"),G.imgResolver!==null&&re.src!==null){var me=G.imgResolver(re.src,Ue);me&&(Ue.src=me),Ue.height=G.regionH,Ue.width=G.regionW}}else if(re.kind==="p")Ue=document.createElement("p");else if(re.kind==="span")if(re.styleAttrs[n.byName.ruby.qname]==="container")Ue=document.createElement("ruby"),G.ruby=!0;else if(re.styleAttrs[n.byName.ruby.qname]==="base")Ue=document.createElement("span");else if(re.styleAttrs[n.byName.ruby.qname]==="text")Ue=document.createElement("rt");else if(re.styleAttrs[n.byName.ruby.qname]==="baseContainer")Ue=document.createElement("rbc");else if(re.styleAttrs[n.byName.ruby.qname]==="textContainer")Ue=document.createElement("rtc");else{if(re.styleAttrs[n.byName.ruby.qname]==="delimiter")return;Ue=document.createElement("span")}else re.kind==="br"&&(Ue=document.createElement("br"));if(Ue){if(re.lang&&(re.kind!=="region"&&re.lang===be.lang||(Ue.lang=re.lang)),X.appendChild(Ue),Ue.style.margin="0",re.kind==="region"){var le=re.styleAttrs[n.byName.writingMode.qname];le==="lrtb"||le==="lr"?(G.ipd="lr",G.bpd="tb"):le==="rltb"||le==="rl"?(G.ipd="rl",G.bpd="tb"):le==="tblr"?(G.ipd="tb",G.bpd="lr"):le!=="tbrl"&&le!=="tb"||(G.ipd="tb",G.bpd="rl")}else if(re.kind==="p"&&G.bpd==="tb"){var je=re.styleAttrs[n.byName.direction.qname];G.ipd=je==="ltr"?"lr":"rl"}for(var Se=0;Se<T.length;Se++){var Ne=T[Se],He=re.styleAttrs[Ne.qname];He!==void 0&&Ne.map!==null&&Ne.map(G,Ue,re,He)}var it=Ue,Ie=re.styleAttrs[n.byName.linePadding.qname];if(Ie&&!Ie.isZero()){var Oe=Ie.toUsedLength(G.w,G.h);if(Oe>0){var ft=Math.ceil(Oe)+"px";G.bpd==="tb"?(it.style.paddingLeft=ft,it.style.paddingRight=ft):(it.style.paddingTop=ft,it.style.paddingBottom=ft),G.lp=Ie}}var At=re.styleAttrs[n.byName.multiRowAlign.qname];if(At&&At!=="auto"){var Rt=document.createElement("span");Rt.style.display="inline-block",Rt.style.textAlign=At,Ue.appendChild(Rt),it=Rt,G.mra=At}var Pt=re.styleAttrs[n.byName.rubyReserve.qname];if(Pt&&Pt[0]!=="none"&&(G.rubyReserve=Pt),re.styleAttrs[n.byName.fillLineGap.qname]&&(G.flg=!0),re.kind==="span"&&re.text){var ee=re.styleAttrs[n.byName.textEmphasis.qname];if(ee&&ee.style!=="none"&&(G.textEmphasis=!0),n.byName.textCombine.qname in re.styleAttrs&&re.styleAttrs[n.byName.textCombine.qname]==="all")Ue.textContent=re.text,Ue._isd_element=re,ee&&m(G,Ue,0,ee);else for(var ae="",qe=0;qe<re.text.length;qe++){ae+=re.text.charAt(qe);var v=re.text.charCodeAt(qe);if(v<55296||v>56319||qe===re.text.length-1){var A=document.createElement("span");A.textContent=ae,ee&&m(G,A,0,ee),Ue.appendChild(A),ae="",A._isd_element=re}}}if("contents"in re)for(var c=0;c<re.contents.length;c++)_(G,it,re.contents[c],re);var E=[];if(re.kind==="p"&&(r(G,it,E,null),G.rubyReserve&&((function(Ae,Re){for(var _e=0;_e<Ae.length;_e++){var Ye,Ve,Xe=document.createElement("ruby"),nt=document.createElement("span");nt.textContent="​",Xe.appendChild(nt);var Tt,mt=Re.rubyReserve[1].toUsedLength(Re.w,Re.h)+"px";Re.rubyReserve[0]==="both"||Re.rubyReserve[0]==="outside"&&Ae.length==1?((Ye=document.createElement("rtc")).style[ne]=x?"after":"under",Ye.textContent="​",Ye.style.fontSize=mt,(Ve=document.createElement("rtc")).style[ne]=x?"before":"over",Ve.textContent="​",Ve.style.fontSize=mt,Xe.appendChild(Ye),Xe.appendChild(Ve)):((Ye=document.createElement("rtc")).textContent="​",Ye.style.fontSize=mt,Tt=Re.rubyReserve[0]==="after"||Re.rubyReserve[0]==="outside"&&_e>0?x?"after":Re.bpd==="tb"||Re.bpd==="rl"?"under":"over":x?"before":Re.bpd==="tb"||Re.bpd==="rl"?"over":"under",Ye.style[ne]=Tt,Xe.appendChild(Ye));for(var Ut=null,Mt=0;Mt<Ae[_e].rbc.length;Mt++)if(Ae[_e].rbc[Mt].localName==="ruby"){Ut=Ae[_e].rbc[Mt];for(var zt=0;zt<Ut.style.length;zt++)Xe.style.setProperty(Ut.style.item(zt),Ut.style.getPropertyValue(Ut.style.item(zt)));break}(Ut=Ut||Ae[_e].elements[0].node).parentElement.insertBefore(Xe,Ut)}})(E,G),G.rubyReserve=null),(G.ruby||G.rubyReserve)&&((function(Ae,Re){for(var _e=0;_e<Ae.length;_e++)for(var Ye=0;Ye<Ae[_e].rbc.length;Ye++){var Ve;Ae[_e].rbc[Ye].style[ne]||(Ve=x?_e===0?"before":"after":Re.bpd==="tb"||Re.bpd==="rl"?_e===0?"over":"under":_e===0?"under":"over",Ae[_e].rbc[Ye].style[ne]=Ve)}})(E,G),G.ruby=null),G.textEmphasis&&((function(Ae,Re){for(var _e=0;_e<Ae.length;_e++)for(var Ye=0;Ye<Ae[_e].te.length;Ye++){var Ve;Ae[_e].te[Ye].style[J]&&Ae[_e].te[Ye].style[J]!=="none"||(Ve=Re.bpd==="tb"?_e===0?"left over":"left under":Re.bpd==="rl"?_e===0?"right under":"left under":_e===0?"left under":"right under",Ae[_e].te[Ye].style[J]=Ve)}})(E,G),G.textEmphasis=null),G.mra&&((function(Ae){for(var Re=0;Re<Ae.length-1;Re++){var _e=Ae[Re].elements.length;if(_e!==0&&Ae[Re].br===!1){var Ye=document.createElement("br"),Ve=Ae[Re].elements[_e-1].node;Ve.parentElement.insertBefore(Ye,Ve.nextSibling)}}})(E),G.mra=null),G.lp&&((function(Ae,Re,_e){if(Ae!==null)for(var Ye=0;Ye<Ae.length;Ye++){var Ve=Ae[Ye].elements.length,Xe=Math.ceil(Re)+"px",nt="-"+Math.ceil(Re)+"px";if(Ve!==0){var Tt=Ae[Ye].elements[Ae[Ye].start_elem],mt=Ae[Ye].elements[Ae[Ye].end_elem];if(Tt===mt){var Ut=Tt.node.getBoundingClientRect();if(Ut.width==0||Ut.height==0)continue}_e.ipd==="lr"?(Tt.node.style.marginLeft=nt,Tt.node.style.paddingLeft=Xe):_e.ipd==="rl"?(Tt.node.style.paddingRight=Xe,Tt.node.style.marginRight=nt):_e.ipd==="tb"&&(Tt.node.style.paddingTop=Xe,Tt.node.style.marginTop=nt),_e.ipd==="lr"?(ce||(mt.node.style.marginRight=nt),mt.node.style.paddingRight=Xe):_e.ipd==="rl"?(mt.node.style.paddingLeft=Xe,ce||(mt.node.style.marginLeft=nt)):_e.ipd==="tb"&&(mt.node.style.paddingBottom=Xe,mt.node.style.marginBottom=nt)}}})(E,G.lp.toUsedLength(G.w,G.h),G),G.lp=null),(function(Ae,Re){for(var _e=0;_e<Ae.length;_e++)for(var Ye=Ae[_e],Ve=1;Ve<Ye.elements.length;){var Xe=Ye.elements[Ve-1],nt=Ye.elements[Ve];i(Xe.node,nt.node,Re)?Ye.elements.splice(Ve,1):Ve++}for(var Tt,mt,Ut=[],Mt=0;Mt<Ae.length;Mt++)for(var zt=0;zt<Ae[Mt].elements.length;zt++)(mt=y(Tt=Ae[Mt].elements[zt].node,Ut,!1))&&(Tt.style.backgroundColor=mt);for(var Qt=0;Qt<Ut.length;Qt++)Ut[Qt].style.backgroundColor=""})(E,G),G.flg)){var Q=g(it.getBoundingClientRect(),G);(function(Ae,Re,_e,Ye){for(var Ve=Math.sign(_e-Re),Xe=0;Xe<=Ae.length;Xe++){var nt,Tt,mt,Ut;if(nt=Xe===0?Math.round(Re):Xe===Ae.length?Math.round(_e):Math.round((Ae[Xe-1].after+Ae[Xe].before)/2),Xe>0&&Ae[Xe-1])for(mt=0;mt<Ae[Xe-1].elements.length;mt++)Tt=Ve*(nt-(Ut=Ae[Xe-1].elements[mt]).after)+"px",Ye.bpd==="lr"?Ut.node.style.paddingRight=Tt:Ye.bpd==="rl"?Ut.node.style.paddingLeft=Tt:Ye.bpd==="tb"&&(Ut.node.style.paddingBottom=Tt);if(Xe<Ae.length)for(mt=0;mt<Ae[Xe].elements.length;mt++)Tt=Ve*((Ut=Ae[Xe].elements[mt]).before-nt)+"px",Ye.bpd==="lr"?Ut.node.style.paddingLeft=Tt:Ye.bpd==="rl"?Ut.node.style.paddingRight=Tt:Ye.bpd==="tb"&&(Ut.node.style.paddingTop=Tt)}})(E,Q.before,Q.after,G),G.flg=null}if(re.kind==="region"&&G.bpd==="tb"&&G.enableRollUp&&re.contents.length>0&&re.styleAttrs[n.byName.displayAlign.qname]==="after"){r(G,it,E,null);var D=new h(re.id===""?"_":re.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 Be=Ue.firstElementChild,De=D.plist[D.plist.length-1].after-D.plist[D.plist.length-1].before;Be.style.bottom="-"+De+"px",Be.style.transition="transform 0.4s",Be.style.position="relative",Be.style.transform="translateY(-"+De+"px)"}}}else pe(G.errorHandler,"Error processing ISD element kind: "+re.kind)}function y(G,X,re){return G.style.backgroundColor?(re&&!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,re){if(G.tagName==="SPAN"&&X.tagName==="SPAN"&&G._isd_element===X._isd_element){if(!G._isd_element)return pe(re.errorHandler,"Internal error: HTML span is not linked to a source element; cannot merge spans."),!1;G.textContent+=X.textContent;for(var be=0;be<X.style.length;be++){var Ue=X.style[be];(Ue.indexOf("border")>=0||Ue.indexOf("padding")>=0||Ue.indexOf("margin")>=0)&&(G.style[Ue]=X.style[Ue])}return X.parentElement.removeChild(X),!0}return!1}function h(G,X){this.id=G,this.plist=X}function g(G,X){var re={before:null,after:null,start:null,end:null};return X.bpd==="tb"?(re.before=G.top,re.after=G.bottom,X.ipd==="lr"?(re.start=G.left,re.end=G.right):(re.start=G.right,re.end=G.left)):X.bpd==="lr"?(re.before=G.left,re.after=G.right,re.start=G.top,re.end=G.bottom):X.bpd==="rl"&&(re.before=G.right,re.after=G.left,re.start=G.top,re.end=G.bottom),re}function r(G,X,re,be){if(X.localName!=="rt"&&X.localName!=="rtc"){var Ue,me,le,je,Se=X.style.backgroundColor||be;if(X.childElementCount===0)if(X.localName==="span"||X.localName==="rb"){var Ne=g(X.getBoundingClientRect(),G);if(re.length!==0&&(Ue=Ne.before,me=Ne.after,le=re[re.length-1].before,me<(je=re[re.length-1].after)&&Ue>le||je<=me&&le>=Ue)){var He=Math.sign(Ne.after-Ne.before),it=Math.sign(Ne.end-Ne.start);He*(Ne.before-re[re.length-1].before)<0&&(re[re.length-1].before=Ne.before),He*(Ne.after-re[re.length-1].after)>0&&(re[re.length-1].after=Ne.after),it*(Ne.start-re[re.length-1].start)<0&&(re[re.length-1].start=Ne.start,re[re.length-1].start_elem=re[re.length-1].elements.length),it*(Ne.end-re[re.length-1].end)>0&&(re[re.length-1].end=Ne.end,re[re.length-1].end_elem=re[re.length-1].elements.length)}else re.push({before:Ne.before,after:Ne.after,start:Ne.start,end:Ne.end,start_elem:0,end_elem:0,elements:[],rbc:[],te:[],text:"",br:!1});re[re.length-1].text+=X.textContent,re[re.length-1].elements.push({node:X,bgcolor:Se,before:Ne.before,after:Ne.after})}else X.localName==="br"&&re.length!==0&&(re[re.length-1].br=!0);else for(var Ie=X.firstChild;Ie;)Ie.nodeType===Node.ELEMENT_NODE&&(r(G,Ie,re,Se),Ie.localName==="ruby"||Ie.localName==="rtc"?re.length>0&&re[re.length-1].rbc.push(Ie):Ie.localName==="span"&&Ie.style[O]&&Ie.style[O]!=="none"&&re.length>0&&re[re.length-1].te.push(Ie)),Ie=Ie.nextSibling}}function m(G,X,re,be){var Ue;be.style!=="none"&&(be.style==="auto"?X.style[O]="filled":X.style[O]=be.style+" "+be.symbol,(be.position==="before"||be.position==="after")&&(Ue=G.bpd==="tb"?be.position==="before"?"left over":"left under":G.bpd==="rl"?be.position==="before"?"right under":"left under":be.position==="before"?"left under":"right under",X.style[J]=Ue))}function d(G,X){this.qname=G,this.map=X}I.render=function(G,X,re,be,Ue,me,le,je,Se){var Ne=be||X.clientHeight,He=Ue||X.clientWidth;if(G.aspectRatio!==null){var it=Ne*G.aspectRatio;it>He?Ne=Math.round(He/G.aspectRatio):He=it}var Ie=document.createElement("div");Ie.style.position="relative",Ie.style.width=He+"px",Ie.style.height=Ne+"px",Ie.style.margin="auto",Ie.style.top=0,Ie.style.bottom=0,Ie.style.left=0,Ie.style.right=0,Ie.style.zIndex=0;var Oe={h:Ne,w:He,regionH:null,regionW:null,imgResolver:re,displayForcedOnlyMode:me||!1,isd:G,errorHandler:le,previousISDState:je,enableRollUp:Se||!1,currentISDState:{},flg:null,lp:null,mra:null,ipd:null,bpd:null,ruby:null,textEmphasis:null,rubyReserve:null};if(X.appendChild(Ie),"contents"in G)for(var ft=0;ft<G.contents.length;ft++)_(Oe,Ie,G.contents[ft],G);return Oe.currentISDState};for(var T=[new d("http://www.w3.org/ns/ttml#styling backgroundColor",(function(G,X,re,be){be[3]!==0&&(X.style.backgroundColor="rgba("+be[0].toString()+","+be[1].toString()+","+be[2].toString()+","+(be[3]/255).toString()+")")})),new d("http://www.w3.org/ns/ttml#styling color",(function(G,X,re,be){X.style.color="rgba("+be[0].toString()+","+be[1].toString()+","+be[2].toString()+","+(be[3]/255).toString()+")"})),new d("http://www.w3.org/ns/ttml#styling direction",(function(G,X,re,be){X.style.direction=be})),new d("http://www.w3.org/ns/ttml#styling display",(function(G,X,re,be){})),new d("http://www.w3.org/ns/ttml#styling displayAlign",(function(G,X,re,be){X.style.display="flex",X.style.flexDirection="column",be==="before"?X.style.justifyContent="flex-start":be==="center"?X.style.justifyContent="center":be==="after"&&(X.style.justifyContent="flex-end")})),new d("http://www.w3.org/ns/ttml#styling extent",(function(G,X,re,be){G.regionH=be.h.toUsedLength(G.w,G.h),G.regionW=be.w.toUsedLength(G.w,G.h);var Ue=0,me=0,le=re.styleAttrs["http://www.w3.org/ns/ttml#styling padding"];le&&(Ue=le[0].toUsedLength(G.w,G.h)+le[2].toUsedLength(G.w,G.h),me=le[1].toUsedLength(G.w,G.h)+le[3].toUsedLength(G.w,G.h)),X.style.height=G.regionH-Ue+"px",X.style.width=G.regionW-me+"px"})),new d("http://www.w3.org/ns/ttml#styling fontFamily",(function(G,X,re,be){for(var Ue=[],me=0;me<be.length;me++)be[me]=be[me].trim(),be[me]==="monospaceSerif"?(Ue.push("Courier New"),Ue.push('"Liberation Mono"'),Ue.push("Courier"),Ue.push("monospace")):be[me]==="proportionalSansSerif"?(Ue.push("Arial"),Ue.push("Helvetica"),Ue.push('"Liberation Sans"'),Ue.push("sans-serif")):be[me]==="monospace"?Ue.push("monospace"):be[me]==="sansSerif"?Ue.push("sans-serif"):be[me]==="serif"?Ue.push("serif"):be[me]==="monospaceSansSerif"?(Ue.push("Consolas"),Ue.push("monospace")):be[me]==="proportionalSerif"?Ue.push("serif"):Ue.push(be[me]);if(Ue.length>0){for(var le=[Ue[0]],je=1;je<Ue.length;je++)le.indexOf(Ue[je])==-1&&le.push(Ue[je]);Ue=le}X.style.fontFamily=Ue.join(",")})),new d("http://www.w3.org/ns/ttml#styling shear",(function(G,X,re,be){if(be!==0){var Ue=-.9*be;G.bpd==="tb"?X.style.transform="skewX("+Ue+"deg)":X.style.transform="skewY("+Ue+"deg)"}})),new d("http://www.w3.org/ns/ttml#styling fontSize",(function(G,X,re,be){X.style.fontSize=be.toUsedLength(G.w,G.h)+"px"})),new d("http://www.w3.org/ns/ttml#styling fontStyle",(function(G,X,re,be){X.style.fontStyle=be})),new d("http://www.w3.org/ns/ttml#styling fontWeight",(function(G,X,re,be){X.style.fontWeight=be})),new d("http://www.w3.org/ns/ttml#styling lineHeight",(function(G,X,re,be){X.style.lineHeight=be==="normal"?"normal":be.toUsedLength(G.w,G.h)+"px"})),new d("http://www.w3.org/ns/ttml#styling opacity",(function(G,X,re,be){X.style.opacity=be})),new d("http://www.w3.org/ns/ttml#styling origin",(function(G,X,re,be){X.style.top=be.h.toUsedLength(G.w,G.h)+"px",X.style.left=be.w.toUsedLength(G.w,G.h)+"px"})),new d("http://www.w3.org/ns/ttml#styling overflow",(function(G,X,re,be){X.style.overflow=be})),new d("http://www.w3.org/ns/ttml#styling padding",(function(G,X,re,be){var Ue=[];Ue[0]=be[0].toUsedLength(G.w,G.h)+"px",Ue[1]=be[3].toUsedLength(G.w,G.h)+"px",Ue[2]=be[2].toUsedLength(G.w,G.h)+"px",Ue[3]=be[1].toUsedLength(G.w,G.h)+"px",X.style.padding=Ue.join(" ")})),new d("http://www.w3.org/ns/ttml#styling position",(function(G,X,re,be){X.style.top=be.h.toUsedLength(G.w,G.h)+"px",X.style.left=be.w.toUsedLength(G.w,G.h)+"px"})),new d("http://www.w3.org/ns/ttml#styling rubyAlign",(function(G,X,re,be){X.style.rubyAlign=be==="spaceAround"?"space-around":"center"})),new d("http://www.w3.org/ns/ttml#styling rubyPosition",(function(G,X,re,be){var Ue;be!=="before"&&be!=="after"||(Ue=x?be:G.bpd==="tb"||G.bpd==="rl"?be==="before"?"over":"under":be==="before"?"under":"over",X.parentElement.style[ne]=Ue)})),new d("http://www.w3.org/ns/ttml#styling showBackground",null),new d("http://www.w3.org/ns/ttml#styling textAlign",(function(G,X,re,be){var Ue;Ue=be==="start"?G.ipd==="rl"?"right":"left":be==="end"?G.ipd==="rl"?"left":"right":be,X.style.textAlign=Ue})),new d("http://www.w3.org/ns/ttml#styling textDecoration",(function(G,X,re,be){X.style.textDecoration=be.join(" ").replace("lineThrough","line-through")})),new d("http://www.w3.org/ns/ttml#styling textOutline",(function(G,X,re,be){})),new d("http://www.w3.org/ns/ttml#styling textShadow",(function(G,X,re,be){var Ue=re.styleAttrs[n.byName.textOutline.qname];if(be==="none"&&Ue==="none")X.style.textShadow="";else{var me=[];if(Ue!=="none"){var le="rgba("+Ue.color[0].toString()+","+Ue.color[1].toString()+","+Ue.color[2].toString()+","+(Ue.color[3]/255).toString()+")";me.push("1px 1px 1px "+le),me.push("-1px 1px 1px "+le),me.push("1px -1px 1px "+le),me.push("-1px -1px 1px "+le)}if(be!=="none")for(var je=0;je<be.length;je++)me.push(be[je].x_off.toUsedLength(G.w,G.h)+"px "+be[je].y_off.toUsedLength(G.w,G.h)+"px "+be[je].b_radius.toUsedLength(G.w,G.h)+"px rgba("+be[je].color[0].toString()+","+be[je].color[1].toString()+","+be[je].color[2].toString()+","+(be[je].color[3]/255).toString()+")");X.style.textShadow=me.join(",")}})),new d("http://www.w3.org/ns/ttml#styling textCombine",(function(G,X,re,be){X.style.textCombineUpright=be})),new d("http://www.w3.org/ns/ttml#styling textEmphasis",(function(G,X,re,be){})),new d("http://www.w3.org/ns/ttml#styling unicodeBidi",(function(G,X,re,be){var Ue;Ue=be==="bidiOverride"?"bidi-override":be,X.style.unicodeBidi=Ue})),new d("http://www.w3.org/ns/ttml#styling visibility",(function(G,X,re,be){X.style.visibility=be})),new d("http://www.w3.org/ns/ttml#styling wrapOption",(function(G,X,re,be){be==="wrap"?re.space==="preserve"?X.style.whiteSpace="pre-wrap":X.style.whiteSpace="normal":re.space==="preserve"?X.style.whiteSpace="pre":X.style.whiteSpace="noWrap"})),new d("http://www.w3.org/ns/ttml#styling writingMode",(function(G,X,re,be){be==="lrtb"||be==="lr"||be==="rltb"||be==="rl"?X.style.writingMode="horizontal-tb":be==="tblr"?X.style.writingMode="vertical-lr":be!=="tbrl"&&be!=="tb"||(X.style.writingMode="vertical-rl")})),new d("http://www.w3.org/ns/ttml#styling zIndex",(function(G,X,re,be){X.style.zIndex=be})),new d("http://www.w3.org/ns/ttml/profile/imsc1#styling forcedDisplay",(function(G,X,re,be){G.displayForcedOnlyMode&&be===!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),ne=x?"webkitRubyPosition":"rubyPosition",O="webkitTextEmphasisStyle"in window.getComputedStyle(document.documentElement)?"webkitTextEmphasisStyle":"textEmphasisStyle",J="webkitTextEmphasisPosition"in window.getComputedStyle(document.documentElement)?"webkitTextEmphasisPosition":"textEmphasisPosition";function pe(G,X){if(G&&G.error&&G.error(X))throw X}})(Le,typeof imscNames>"u"?M(7019):imscNames,typeof imscStyles>"u"?M(7073):imscStyles,typeof imscUtils>"u"?M(346):imscUtils)},5223:function(vt,Le,M){(function(ce,I,u,n){ce.generateISD=function(d,T,q){var W,x=new g(d),ne={},O={},J=d.head.styling.initials[u.byName.showBackground.qname],pe=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],re=X.styleAttrs[u.byName.showBackground.qname]||J,be=X.styleAttrs[u.byName.backgroundColor.qname]||pe;O[X.id]=(re==="always"||re===void 0)&&be!==void 0&&!(T<X.begin||T>=X.end)}for(var Ue in d.body&&d.body.regionID&&(O[d.body.regionID]=!0),W=d.body!==null?(function le(je,Se){if(Se.contents){var Ne={};for(var He in Se)Se.hasOwnProperty(He)&&(Ne[He]=Se[He]);return Ne.contents=[],Se.contents.filter((function(it){return!(je<it.begin||je>=it.end)})).forEach((function(it){var Ie=le(je,it);Ie.regionID&&(O[Ie.regionID]=!0),Ie!==null&&Ne.contents.push(Ie)})),Ne}return Se})(T,d.body):null,O[""]!==void 0&&(O[""]=!0),O)if(O[Ue]){var me=y(d,T,d.head.layout.regions[Ue],W,null,"",d.head.layout.regions[Ue],q,ne);me!==null&&x.contents.push(me.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,ne,O,J,pe){if(T<O.begin||T>=O.end)return null;var G="regionID"in O&&O.regionID!==""?O.regionID:ne;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 re=0;re<O.sets.length;re++)T<O.sets[re].begin||T>=O.sets[re].end||(X.styleAttrs[O.sets[re].qname]=O.sets[re].value);var be={};for(var Ue in X.styleAttrs)if(X.styleAttrs.hasOwnProperty(Ue)&&(be[Ue]=!0,X.kind==="region"&&Ue===u.byName.writingMode.qname&&!(u.byName.direction.qname in X.styleAttrs))){var me=X.styleAttrs[Ue];me==="lrtb"||me==="lr"?X.styleAttrs[u.byName.direction.qname]="ltr":me!=="rltb"&&me!=="rl"||(X.styleAttrs[u.byName.direction.qname]="rtl")}if(x!==null)for(var le=0;le<u.all.length;le++){var je=u.all[le];if(je.qname===u.byName.textDecoration.qname){var Se=x.styleAttrs[je.qname],Ne=X.styleAttrs[je.qname],He=[];Ne===void 0?He=Se:Ne.indexOf("none")===-1?((Ne.indexOf("noUnderline")===-1&&Se.indexOf("underline")!==-1||Ne.indexOf("underline")!==-1)&&He.push("underline"),(Ne.indexOf("noLineThrough")===-1&&Se.indexOf("lineThrough")!==-1||Ne.indexOf("lineThrough")!==-1)&&He.push("lineThrough"),(Ne.indexOf("noOverline")===-1&&Se.indexOf("overline")!==-1||Ne.indexOf("overline")!==-1)&&He.push("overline")):He.push("none"),X.styleAttrs[je.qname]=He}else if(je.qname!==u.byName.fontSize.qname||je.qname in X.styleAttrs||X.kind!=="span"||X.styleAttrs[u.byName.ruby.qname]!=="textContainer")if(je.qname!==u.byName.fontSize.qname||je.qname in X.styleAttrs||X.kind!=="span"||X.styleAttrs[u.byName.ruby.qname]!=="text")je.inherit&&je.qname in x.styleAttrs&&!(je.qname in X.styleAttrs)&&(X.styleAttrs[je.qname]=x.styleAttrs[je.qname]);else{var it=x.styleAttrs[u.byName.fontSize.qname];x.styleAttrs[u.byName.ruby.qname]==="textContainer"?X.styleAttrs[je.qname]=it:X.styleAttrs[je.qname]=new n.ComputedLength(.5*it.rw,.5*it.rh)}else{var Ie=x.styleAttrs[u.byName.fontSize.qname];X.styleAttrs[je.qname]=new n.ComputedLength(.5*Ie.rw,.5*Ie.rh)}}for(var Oe=0;Oe<u.all.length;Oe++){var ft=u.all[Oe];if(!(ft.qname in X.styleAttrs)&&!(ft.qname===u.byName.position.qname&&u.byName.origin.qname in X.styleAttrs||ft.qname===u.byName.origin.qname&&u.byName.position.qname in X.styleAttrs)){var At=d.head.styling.initials[ft.qname]||ft.initial;if(At!==null&&(X.kind==="region"||ft.inherit===!1&&At!==null)){var Rt=ft.parse(At);Rt!==null?(X.styleAttrs[ft.qname]=Rt,be[ft.qname]=!0):m(J,"Invalid initial value for '"+ft.qname+"' on element '"+X.kind)}}}for(var Pt=0;Pt<u.all.length;Pt++){var ee=u.all[Pt];if(ee.qname in be&&ee.compute!==null){var ae=ee.compute(d,x,X,X.styleAttrs[ee.qname],pe);ae!==null?X.styleAttrs[ee.qname]=ae:(X.styleAttrs[ee.qname]=ee.compute(d,x,X,ee.parse(ee.initial),pe),m(J,"Style '"+ee.qname+"' on element '"+X.kind+"' cannot be computed"))}}if(X.styleAttrs[u.byName.display.qname]==="none")return null;var qe=null;x===null?qe=W===null?[]:[W]:"contents"in O&&(qe=O.contents);for(var v=0;qe!==null&&v<qe.length;v++){var A=y(d,T,q,W,X,G,qe[v],J,pe);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 Be=X.styleAttrs[u.byName.ruby.qname];if(X.kind==="p"||X.kind==="span"&&(Be==="textContainer"||Be==="text")){var De=[];i(X,De),(function(Ae){for(var Re,_e=0;_e<Ae.length;)if((Re=Ae[_e]).kind!=="br"&&Re.space!=="preserve"){var Ye=Re.text.replace(/[\t\r\n ]+/g," ");/^[ ]/.test(Ye)&&(_e===0||(Ve=Ae[_e-1]).kind==="br"||/[\r\n\t ]$/.test(Ve.text))&&(Ye=Ye.substring(1)),Re.text=Ye,Ye.length===0?Ae.splice(_e,1):_e++}else _e++;var Ve,Xe;for(_e=0;_e<Ae.length;_e++)(Re=Ae[_e]).kind!=="br"&&Re.space!=="preserve"?/[ ]$/.test(Re.text)&&(_e===Ae.length-1||(Xe=Ae[_e+1]).kind==="br"||Xe.space==="preserve"&&/^[\r\n]/.test(Xe.text))&&(Re.text=Re.text.slice(0,-1)):_e++})(De),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}})(Le,typeof imscNames>"u"?M(7019):imscNames,typeof imscStyles>"u"?M(7073):imscStyles,typeof imscUtils>"u"?M(346):imscUtils)},6586:function(vt,Le,M){Le.generateISD=M(5223).generateISD,Le.fromXML=M(4421).fromXML,Le.renderHTML=M(978).render},7019:function(vt,Le){(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"})(Le)},7073:function(vt,Le,M){(function(ce,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 ce.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[ce.byName.fontSize.qname]:i.cellLength.h,h!==null?h.styleAttrs[ce.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[ce.byName.fontSize.qname],g.styleAttrs[ce.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[ce.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[ce.byName.fontSize.qname],W===0||W===2?g.styleAttrs[ce.byName.extent.qname].h:g.styleAttrs[ce.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[ce.byName.extent.qname].h.rw,i.dimensions.h.rh-g.styleAttrs[ce.byName.extent.qname].h.rh),null,i.pxLength.h))===null?null:(r.v.edge==="bottom"&&(m=new u.ComputedLength(-m.rw-g.styleAttrs[ce.byName.extent.qname].h.rw,i.dimensions.h.rh-m.rh-g.styleAttrs[ce.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[ce.byName.extent.qname].w.rw,-g.styleAttrs[ce.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[ce.byName.extent.qname].w.rw,-d.rh-g.styleAttrs[ce.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[ce.byName.fontSize.qname].rw,.5*g.styleAttrs[ce.byName.fontSize.qname].rh):u.toComputedLength(r[1].value,r[1].unit,g.styleAttrs[ce.byName.fontSize.qname],g.styleAttrs[ce.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[ce.byName.color.qname]:d.color=r.color,d.thickness=u.toComputedLength(r.thickness.value,r.thickness.unit,g.styleAttrs[ce.byName.fontSize.qname],g.styleAttrs[ce.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[ce.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[ce.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[ce.byName.fontSize.qname],null,i.pxLength.h),T.b_radius===null)return null;r[d][3]===null?T.color=g.styleAttrs[ce.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)],ce.byQName={},ce.all)ce.byQName[ce.all[_].qname]=ce.all[_];for(var y in ce.byName={},ce.all)ce.byName[ce.all[y].name]=ce.all[y]})(Le,typeof imscNames>"u"?M(7019):imscNames,typeof imscUtils>"u"?M(346):imscUtils)},346:function(vt,Le){(function(M){var ce=/#([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=ce.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}})(Le)},4633:function(vt){typeof Object.create=="function"?vt.exports=function(Le,M){M&&(Le.super_=M,Le.prototype=Object.create(M.prototype,{constructor:{value:Le,enumerable:!1,writable:!0,configurable:!0}}))}:vt.exports=function(Le,M){if(M){Le.super_=M;var ce=function(){};ce.prototype=M.prototype,Le.prototype=new ce,Le.prototype.constructor=Le}}},5684:function(vt){function Le(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 ce={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),Le(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(Le(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 Le(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];Le(n),n.length>0&&(I===void 0?I=n:I+="/"+n)}return I===void 0?".":ce.normalize(I)},relative:function(I,u){if(Le(I),Le(u),I===u||(I=ce.resolve(I))===(u=ce.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(Le(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');Le(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){Le(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){Le(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};ce.posix=ce,vt.exports=ce},7205:function(vt,Le,M){vt.exports=I;var ce=M(5572).EventEmitter;function I(){ce.call(this)}M(4633)(I,ce),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(),ce.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(vt){var Le={};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,Le[I]=_}function ce(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(ce(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(ce(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"),vt.exports.F=Le},7510:function(vt,Le,M){var ce=Object.keys||function(r){var m=[];for(var d in r)m.push(d);return m};vt.exports=i;var I=M(996),u=M(9220);M(4633)(i,I);for(var n=ce(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(vt,Le,M){vt.exports=I;var ce=M(5570);function I(u){if(!(this instanceof I))return new I(u);ce.call(this,u)}M(4633)(I,ce),I.prototype._transform=function(u,n,_){_(null,u)}},996:function(vt,Le,M){var ce;vt.exports=X,X.ReadableState=G,M(5572).EventEmitter;var I,u=function(ee,ae){return ee.listeners(ae).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,ne=q.ERR_METHOD_NOT_IMPLEMENTED,O=q.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;M(4633)(X,n);var J=d.errorOrDestroy,pe=["error","close","destroy","pause","resume"];function G(ee,ae,qe){ce=ce||M(7510),ee=ee||{},typeof qe!="boolean"&&(qe=ae instanceof ce),this.objectMode=!!ee.objectMode,qe&&(this.objectMode=this.objectMode||!!ee.readableObjectMode),this.highWaterMark=T(this,ee,"readableHighWaterMark",qe),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=ee.emitClose!==!1,this.autoDestroy=!!ee.autoDestroy,this.destroyed=!1,this.defaultEncoding=ee.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,ee.encoding&&(h||(h=M(950).I),this.decoder=new h(ee.encoding),this.encoding=ee.encoding)}function X(ee){if(ce=ce||M(7510),!(this instanceof X))return new X(ee);var ae=this instanceof ce;this._readableState=new G(ee,this,ae),this.readable=!0,ee&&(typeof ee.read=="function"&&(this._read=ee.read),typeof ee.destroy=="function"&&(this._destroy=ee.destroy)),n.call(this)}function re(ee,ae,qe,v,A){I("readableAddChunk",ae);var c,E=ee._readableState;if(ae===null)E.reading=!1,(function(Q,D){if(I("onEofChunk"),!D.ended){if(D.decoder){var Be=D.decoder.end();Be&&Be.length&&(D.buffer.push(Be),D.length+=D.objectMode?1:Be.length)}D.ended=!0,D.sync?le(Q):(D.needReadable=!1,D.emittedReadable||(D.emittedReadable=!0,je(Q)))}})(ee,E);else if(A||(c=(function(Q,D){var Be,De;return De=D,_.isBuffer(De)||De instanceof y||typeof D=="string"||D===void 0||Q.objectMode||(Be=new W("chunk",["string","Buffer","Uint8Array"],D)),Be})(E,ae)),c)J(ee,c);else if(E.objectMode||ae&&ae.length>0)if(typeof ae=="string"||E.objectMode||Object.getPrototypeOf(ae)===_.prototype||(ae=(function(Q){return _.from(Q)})(ae)),v)E.endEmitted?J(ee,new O):be(ee,E,ae,!0);else if(E.ended)J(ee,new x);else{if(E.destroyed)return!1;E.reading=!1,E.decoder&&!qe?(ae=E.decoder.write(ae),E.objectMode||ae.length!==0?be(ee,E,ae,!1):Se(ee,E)):be(ee,E,ae,!1)}else v||(E.reading=!1,Se(ee,E));return!E.ended&&(E.length<E.highWaterMark||E.length===0)}function be(ee,ae,qe,v){ae.flowing&&ae.length===0&&!ae.sync?(ae.awaitDrain=0,ee.emit("data",qe)):(ae.length+=ae.objectMode?1:qe.length,v?ae.buffer.unshift(qe):ae.buffer.push(qe),ae.needReadable&&le(ee)),Se(ee,ae)}Object.defineProperty(X.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState!==void 0&&this._readableState.destroyed},set:function(ee){this._readableState&&(this._readableState.destroyed=ee)}}),X.prototype.destroy=d.destroy,X.prototype._undestroy=d.undestroy,X.prototype._destroy=function(ee,ae){ae(ee)},X.prototype.push=function(ee,ae){var qe,v=this._readableState;return v.objectMode?qe=!0:typeof ee=="string"&&((ae=ae||v.defaultEncoding)!==v.encoding&&(ee=_.from(ee,ae),ae=""),qe=!0),re(this,ee,ae,!1,qe)},X.prototype.unshift=function(ee){return re(this,ee,null,!0,!1)},X.prototype.isPaused=function(){return this._readableState.flowing===!1},X.prototype.setEncoding=function(ee){h||(h=M(950).I);var ae=new h(ee);this._readableState.decoder=ae,this._readableState.encoding=this._readableState.decoder.encoding;for(var qe=this._readableState.buffer.head,v="";qe!==null;)v+=ae.write(qe.data),qe=qe.next;return this._readableState.buffer.clear(),v!==""&&this._readableState.buffer.push(v),this._readableState.length=v.length,this};var Ue=1073741824;function me(ee,ae){return ee<=0||ae.length===0&&ae.ended?0:ae.objectMode?1:ee!=ee?ae.flowing&&ae.length?ae.buffer.head.data.length:ae.length:(ee>ae.highWaterMark&&(ae.highWaterMark=(function(qe){return qe>=Ue?qe=Ue:(qe--,qe|=qe>>>1,qe|=qe>>>2,qe|=qe>>>4,qe|=qe>>>8,qe|=qe>>>16,qe++),qe})(ee)),ee<=ae.length?ee:ae.ended?ae.length:(ae.needReadable=!0,0))}function le(ee){var ae=ee._readableState;I("emitReadable",ae.needReadable,ae.emittedReadable),ae.needReadable=!1,ae.emittedReadable||(I("emitReadable",ae.flowing),ae.emittedReadable=!0,process.nextTick(je,ee))}function je(ee){var ae=ee._readableState;I("emitReadable_",ae.destroyed,ae.length,ae.ended),ae.destroyed||!ae.length&&!ae.ended||(ee.emit("readable"),ae.emittedReadable=!1),ae.needReadable=!ae.flowing&&!ae.ended&&ae.length<=ae.highWaterMark,Oe(ee)}function Se(ee,ae){ae.readingMore||(ae.readingMore=!0,process.nextTick(Ne,ee,ae))}function Ne(ee,ae){for(;!ae.reading&&!ae.ended&&(ae.length<ae.highWaterMark||ae.flowing&&ae.length===0);){var qe=ae.length;if(I("maybeReadMore read 0"),ee.read(0),qe===ae.length)break}ae.readingMore=!1}function He(ee){var ae=ee._readableState;ae.readableListening=ee.listenerCount("readable")>0,ae.resumeScheduled&&!ae.paused?ae.flowing=!0:ee.listenerCount("data")>0&&ee.resume()}function it(ee){I("readable nexttick read 0"),ee.read(0)}function Ie(ee,ae){I("resume",ae.reading),ae.reading||ee.read(0),ae.resumeScheduled=!1,ee.emit("resume"),Oe(ee),ae.flowing&&!ae.reading&&ee.read(0)}function Oe(ee){var ae=ee._readableState;for(I("flow",ae.flowing);ae.flowing&&ee.read()!==null;);}function ft(ee,ae){return ae.length===0?null:(ae.objectMode?qe=ae.buffer.shift():!ee||ee>=ae.length?(qe=ae.decoder?ae.buffer.join(""):ae.buffer.length===1?ae.buffer.first():ae.buffer.concat(ae.length),ae.buffer.clear()):qe=ae.buffer.consume(ee,ae.decoder),qe);var qe}function At(ee){var ae=ee._readableState;I("endReadable",ae.endEmitted),ae.endEmitted||(ae.ended=!0,process.nextTick(Rt,ae,ee))}function Rt(ee,ae){if(I("endReadableNT",ee.endEmitted,ee.length),!ee.endEmitted&&ee.length===0&&(ee.endEmitted=!0,ae.readable=!1,ae.emit("end"),ee.autoDestroy)){var qe=ae._writableState;(!qe||qe.autoDestroy&&qe.finished)&&ae.destroy()}}function Pt(ee,ae){for(var qe=0,v=ee.length;qe<v;qe++)if(ee[qe]===ae)return qe;return-1}X.prototype.read=function(ee){I("read",ee),ee=parseInt(ee,10);var ae=this._readableState,qe=ee;if(ee!==0&&(ae.emittedReadable=!1),ee===0&&ae.needReadable&&((ae.highWaterMark!==0?ae.length>=ae.highWaterMark:ae.length>0)||ae.ended))return I("read: emitReadable",ae.length,ae.ended),ae.length===0&&ae.ended?At(this):le(this),null;if((ee=me(ee,ae))===0&&ae.ended)return ae.length===0&&At(this),null;var v,A=ae.needReadable;return I("need readable",A),(ae.length===0||ae.length-ee<ae.highWaterMark)&&I("length less than watermark",A=!0),ae.ended||ae.reading?I("reading or ended",A=!1):A&&(I("do read"),ae.reading=!0,ae.sync=!0,ae.length===0&&(ae.needReadable=!0),this._read(ae.highWaterMark),ae.sync=!1,ae.reading||(ee=me(qe,ae))),(v=ee>0?ft(ee,ae):null)===null?(ae.needReadable=ae.length<=ae.highWaterMark,ee=0):(ae.length-=ee,ae.awaitDrain=0),ae.length===0&&(ae.ended||(ae.needReadable=!0),qe!==ee&&ae.ended&&At(this)),v!==null&&this.emit("data",v),v},X.prototype._read=function(ee){J(this,new ne("_read()"))},X.prototype.pipe=function(ee,ae){var qe=this,v=this._readableState;switch(v.pipesCount){case 0:v.pipes=ee;break;case 1:v.pipes=[v.pipes,ee];break;default:v.pipes.push(ee)}v.pipesCount+=1,I("pipe count=%d opts=%j",v.pipesCount,ae);var A=ae&&ae.end===!1||ee===process.stdout||ee===process.stderr?Re:c;function c(){I("onend"),ee.end()}v.endEmitted?process.nextTick(A):qe.once("end",A),ee.on("unpipe",(function _e(Ye,Ve){I("onunpipe"),Ye===qe&&Ve&&Ve.hasUnpiped===!1&&(Ve.hasUnpiped=!0,I("cleanup"),ee.removeListener("close",De),ee.removeListener("finish",Ae),ee.removeListener("drain",E),ee.removeListener("error",Be),ee.removeListener("unpipe",_e),qe.removeListener("end",c),qe.removeListener("end",Re),qe.removeListener("data",D),Q=!0,!v.awaitDrain||ee._writableState&&!ee._writableState.needDrain||E())}));var E=(function(_e){return function(){var Ye=_e._readableState;I("pipeOnDrain",Ye.awaitDrain),Ye.awaitDrain&&Ye.awaitDrain--,Ye.awaitDrain===0&&u(_e,"data")&&(Ye.flowing=!0,Oe(_e))}})(qe);ee.on("drain",E);var Q=!1;function D(_e){I("ondata");var Ye=ee.write(_e);I("dest.write",Ye),Ye===!1&&((v.pipesCount===1&&v.pipes===ee||v.pipesCount>1&&Pt(v.pipes,ee)!==-1)&&!Q&&(I("false write response, pause",v.awaitDrain),v.awaitDrain++),qe.pause())}function Be(_e){I("onerror",_e),Re(),ee.removeListener("error",Be),u(ee,"error")===0&&J(ee,_e)}function De(){ee.removeListener("finish",Ae),Re()}function Ae(){I("onfinish"),ee.removeListener("close",De),Re()}function Re(){I("unpipe"),qe.unpipe(ee)}return qe.on("data",D),(function(_e,Ye,Ve){if(typeof _e.prependListener=="function")return _e.prependListener(Ye,Ve);_e._events&&_e._events[Ye]?Array.isArray(_e._events[Ye])?_e._events[Ye].unshift(Ve):_e._events[Ye]=[Ve,_e._events[Ye]]:_e.on(Ye,Ve)})(ee,"error",Be),ee.once("close",De),ee.once("finish",Ae),ee.emit("pipe",qe),v.flowing||(I("pipe resume"),qe.resume()),ee},X.prototype.unpipe=function(ee){var ae=this._readableState,qe={hasUnpiped:!1};if(ae.pipesCount===0)return this;if(ae.pipesCount===1)return ee&&ee!==ae.pipes||(ee||(ee=ae.pipes),ae.pipes=null,ae.pipesCount=0,ae.flowing=!1,ee&&ee.emit("unpipe",this,qe)),this;if(!ee){var v=ae.pipes,A=ae.pipesCount;ae.pipes=null,ae.pipesCount=0,ae.flowing=!1;for(var c=0;c<A;c++)v[c].emit("unpipe",this,{hasUnpiped:!1});return this}var E=Pt(ae.pipes,ee);return E===-1||(ae.pipes.splice(E,1),ae.pipesCount-=1,ae.pipesCount===1&&(ae.pipes=ae.pipes[0]),ee.emit("unpipe",this,qe)),this},X.prototype.on=function(ee,ae){var qe=n.prototype.on.call(this,ee,ae),v=this._readableState;return ee==="data"?(v.readableListening=this.listenerCount("readable")>0,v.flowing!==!1&&this.resume()):ee==="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?le(this):v.reading||process.nextTick(it,this))),qe},X.prototype.addListener=X.prototype.on,X.prototype.removeListener=function(ee,ae){var qe=n.prototype.removeListener.call(this,ee,ae);return ee==="readable"&&process.nextTick(He,this),qe},X.prototype.removeAllListeners=function(ee){var ae=n.prototype.removeAllListeners.apply(this,arguments);return ee!=="readable"&&ee!==void 0||process.nextTick(He,this),ae},X.prototype.resume=function(){var ee=this._readableState;return ee.flowing||(I("resume"),ee.flowing=!ee.readableListening,(function(ae,qe){qe.resumeScheduled||(qe.resumeScheduled=!0,process.nextTick(Ie,ae,qe))})(this,ee)),ee.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(ee){var ae=this,qe=this._readableState,v=!1;for(var A in ee.on("end",(function(){if(I("wrapped end"),qe.decoder&&!qe.ended){var E=qe.decoder.end();E&&E.length&&ae.push(E)}ae.push(null)})),ee.on("data",(function(E){I("wrapped data"),qe.decoder&&(E=qe.decoder.write(E)),qe.objectMode&&E==null||(qe.objectMode||E&&E.length)&&(ae.push(E)||(v=!0,ee.pause()))})),ee)this[A]===void 0&&typeof ee[A]=="function"&&(this[A]=(function(E){return function(){return ee[E].apply(ee,arguments)}})(A));for(var c=0;c<pe.length;c++)ee.on(pe[c],this.emit.bind(this,pe[c]));return this._read=function(E){I("wrapped _read",E),v&&(v=!1,ee.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(ee){this._readableState&&(this._readableState.flowing=ee)}}),X._fromList=ft,Object.defineProperty(X.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),typeof Symbol=="function"&&(X.from=function(ee,ae){return r===void 0&&(r=M(2421)),r(X,ee,ae)})},5570:function(vt,Le,M){vt.exports=h;var ce=M(2528).F,I=ce.ERR_METHOD_NOT_IMPLEMENTED,u=ce.ERR_MULTIPLE_CALLBACK,n=ce.ERR_TRANSFORM_ALREADY_TRANSFORMING,_=ce.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(vt,Le,M){function ce(Se){var Ne=this;this.next=null,this.entry=null,this.finish=function(){(function(He,it){var Ie=He.entry;for(He.entry=null;Ie;){var Oe=Ie.callback;it.pendingcb--,Oe(void 0),Ie=Ie.next}it.corkedRequestsFree.next=He})(Ne,Se)}}var I;vt.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,ne=r.ERR_STREAM_WRITE_AFTER_END,O=r.ERR_UNKNOWN_ENCODING,J=h.errorOrDestroy;function pe(){}function G(Se,Ne,He){I=I||M(7510),Se=Se||{},typeof He!="boolean"&&(He=Ne instanceof I),this.objectMode=!!Se.objectMode,He&&(this.objectMode=this.objectMode||!!Se.writableObjectMode),this.highWaterMark=g(this,Se,"writableHighWaterMark",He),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var it=Se.decodeStrings===!1;this.decodeStrings=!it,this.defaultEncoding=Se.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(Ie){(function(Oe,ft){var At=Oe._writableState,Rt=At.sync,Pt=At.writecb;if(typeof Pt!="function")throw new T;if((function(ae){ae.writing=!1,ae.writecb=null,ae.length-=ae.writelen,ae.writelen=0})(At),ft)(function(ae,qe,v,A,c){--qe.pendingcb,v?(process.nextTick(c,A),process.nextTick(je,ae,qe),ae._writableState.errorEmitted=!0,J(ae,A)):(c(A),ae._writableState.errorEmitted=!0,J(ae,A),je(ae,qe))})(Oe,At,Rt,ft,Pt);else{var ee=me(At)||Oe.destroyed;ee||At.corked||At.bufferProcessing||!At.bufferedRequest||Ue(Oe,At),Rt?process.nextTick(be,Oe,At,ee,Pt):be(Oe,At,ee,Pt)}})(Ne,Ie)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=Se.emitClose!==!1,this.autoDestroy=!!Se.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new ce(this)}function X(Se){var Ne=this instanceof(I=I||M(7510));if(!Ne&&!u.call(X,this))return new X(Se);this._writableState=new G(Se,this,Ne),this.writable=!0,Se&&(typeof Se.write=="function"&&(this._write=Se.write),typeof Se.writev=="function"&&(this._writev=Se.writev),typeof Se.destroy=="function"&&(this._destroy=Se.destroy),typeof Se.final=="function"&&(this._final=Se.final)),_.call(this)}function re(Se,Ne,He,it,Ie,Oe,ft){Ne.writelen=it,Ne.writecb=ft,Ne.writing=!0,Ne.sync=!0,Ne.destroyed?Ne.onwrite(new W("write")):He?Se._writev(Ie,Ne.onwrite):Se._write(Ie,Oe,Ne.onwrite),Ne.sync=!1}function be(Se,Ne,He,it){He||(function(Ie,Oe){Oe.length===0&&Oe.needDrain&&(Oe.needDrain=!1,Ie.emit("drain"))})(Se,Ne),Ne.pendingcb--,it(),je(Se,Ne)}function Ue(Se,Ne){Ne.bufferProcessing=!0;var He=Ne.bufferedRequest;if(Se._writev&&He&&He.next){var it=Ne.bufferedRequestCount,Ie=new Array(it),Oe=Ne.corkedRequestsFree;Oe.entry=He;for(var ft=0,At=!0;He;)Ie[ft]=He,He.isBuf||(At=!1),He=He.next,ft+=1;Ie.allBuffers=At,re(Se,Ne,!0,Ne.length,Ie,"",Oe.finish),Ne.pendingcb++,Ne.lastBufferedRequest=null,Oe.next?(Ne.corkedRequestsFree=Oe.next,Oe.next=null):Ne.corkedRequestsFree=new ce(Ne),Ne.bufferedRequestCount=0}else{for(;He;){var Rt=He.chunk,Pt=He.encoding,ee=He.callback;if(re(Se,Ne,!1,Ne.objectMode?1:Rt.length,Rt,Pt,ee),He=He.next,Ne.bufferedRequestCount--,Ne.writing)break}He===null&&(Ne.lastBufferedRequest=null)}Ne.bufferedRequest=He,Ne.bufferProcessing=!1}function me(Se){return Se.ending&&Se.length===0&&Se.bufferedRequest===null&&!Se.finished&&!Se.writing}function le(Se,Ne){Se._final((function(He){Ne.pendingcb--,He&&J(Se,He),Ne.prefinished=!0,Se.emit("prefinish"),je(Se,Ne)}))}function je(Se,Ne){var He=me(Ne);if(He&&((function(Ie,Oe){Oe.prefinished||Oe.finalCalled||(typeof Ie._final!="function"||Oe.destroyed?(Oe.prefinished=!0,Ie.emit("prefinish")):(Oe.pendingcb++,Oe.finalCalled=!0,process.nextTick(le,Ie,Oe)))})(Se,Ne),Ne.pendingcb===0&&(Ne.finished=!0,Se.emit("finish"),Ne.autoDestroy))){var it=Se._readableState;(!it||it.autoDestroy&&it.endEmitted)&&Se.destroy()}return He}M(4633)(X,_),G.prototype.getBuffer=function(){for(var Se=this.bufferedRequest,Ne=[];Se;)Ne.push(Se),Se=Se.next;return Ne},(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(Se){return!!u.call(this,Se)||this===X&&Se&&Se._writableState instanceof G}})):u=function(Se){return Se instanceof this},X.prototype.pipe=function(){J(this,new q)},X.prototype.write=function(Se,Ne,He){var it,Ie=this._writableState,Oe=!1,ft=!Ie.objectMode&&(it=Se,y.isBuffer(it)||it instanceof i);return ft&&!y.isBuffer(Se)&&(Se=(function(At){return y.from(At)})(Se)),typeof Ne=="function"&&(He=Ne,Ne=null),ft?Ne="buffer":Ne||(Ne=Ie.defaultEncoding),typeof He!="function"&&(He=pe),Ie.ending?(function(At,Rt){var Pt=new ne;J(At,Pt),process.nextTick(Rt,Pt)})(this,He):(ft||(function(At,Rt,Pt,ee){var ae;return Pt===null?ae=new x:typeof Pt=="string"||Rt.objectMode||(ae=new m("chunk",["string","Buffer"],Pt)),!ae||(J(At,ae),process.nextTick(ee,ae),!1)})(this,Ie,Se,He))&&(Ie.pendingcb++,Oe=(function(At,Rt,Pt,ee,ae,qe){if(!Pt){var v=(function(Q,D,Be){return Q.objectMode||Q.decodeStrings===!1||typeof D!="string"||(D=y.from(D,Be)),D})(Rt,ee,ae);ee!==v&&(Pt=!0,ae="buffer",ee=v)}var A=Rt.objectMode?1:ee.length;Rt.length+=A;var c=Rt.length<Rt.highWaterMark;if(c||(Rt.needDrain=!0),Rt.writing||Rt.corked){var E=Rt.lastBufferedRequest;Rt.lastBufferedRequest={chunk:ee,encoding:ae,isBuf:Pt,callback:qe,next:null},E?E.next=Rt.lastBufferedRequest:Rt.bufferedRequest=Rt.lastBufferedRequest,Rt.bufferedRequestCount+=1}else re(At,Rt,!1,A,ee,ae,qe);return c})(this,Ie,ft,Se,Ne,He)),Oe},X.prototype.cork=function(){this._writableState.corked++},X.prototype.uncork=function(){var Se=this._writableState;Se.corked&&(Se.corked--,Se.writing||Se.corked||Se.bufferProcessing||!Se.bufferedRequest||Ue(this,Se))},X.prototype.setDefaultEncoding=function(Se){if(typeof Se=="string"&&(Se=Se.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((Se+"").toLowerCase())>-1))throw new O(Se);return this._writableState.defaultEncoding=Se,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(Se,Ne,He){He(new d("_write()"))},X.prototype._writev=null,X.prototype.end=function(Se,Ne,He){var it=this._writableState;return typeof Se=="function"?(He=Se,Se=null,Ne=null):typeof Ne=="function"&&(He=Ne,Ne=null),Se!=null&&this.write(Se,Ne),it.corked&&(it.corked=1,this.uncork()),it.ending||(function(Ie,Oe,ft){Oe.ending=!0,je(Ie,Oe),ft&&(Oe.finished?process.nextTick(ft):Ie.once("finish",ft)),Oe.ended=!0,Ie.writable=!1})(this,it,He),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(Se){this._writableState&&(this._writableState.destroyed=Se)}}),X.prototype.destroy=h.destroy,X.prototype._undestroy=h.undestroy,X.prototype._destroy=function(Se,Ne){Ne(Se)}},3355:function(vt,Le,M){var ce;function I(x,ne,O){return(ne=(function(J){var pe=(function(G){if(typeof G!="object"||G===null)return G;var X=G[Symbol.toPrimitive];if(X!==void 0){var re=X.call(G,"string");if(typeof re!="object")return re;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(G)})(J);return typeof pe=="symbol"?pe:String(pe)})(ne))in x?Object.defineProperty(x,ne,{value:O,enumerable:!0,configurable:!0,writable:!0}):x[ne]=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,ne){return{value:x,done:ne}}function d(x){var ne=x[n];if(ne!==null){var O=x[r].read();O!==null&&(x[h]=null,x[n]=null,x[_]=null,ne(m(O,!1)))}}function T(x){process.nextTick(d,x)}var q=Object.getPrototypeOf((function(){})),W=Object.setPrototypeOf((I(ce={get stream(){return this[r]},next:function(){var x=this,ne=this[y];if(ne!==null)return Promise.reject(ne);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(re,be){G.then((function(){X[i]?re(m(void 0,!0)):X[g](re,be)}),be)}})(J,this));else{var pe=this[r].read();if(pe!==null)return Promise.resolve(m(pe,!1));O=new Promise(this[g])}return this[h]=O,O}},Symbol.asyncIterator,(function(){return this})),I(ce,"return",(function(){var x=this;return new Promise((function(ne,O){x[r].destroy(null,(function(J){J?O(J):ne(m(void 0,!0))}))}))})),ce),q);vt.exports=function(x){var ne,O=Object.create(W,(I(ne={},r,{value:x,writable:!0}),I(ne,n,{value:null,writable:!0}),I(ne,_,{value:null,writable:!0}),I(ne,y,{value:null,writable:!0}),I(ne,i,{value:x._readableState.endEmitted,writable:!0}),I(ne,g,{value:function(J,pe){var G=O[r].read();G?(O[h]=null,O[n]=null,O[_]=null,J(m(G,!1))):(O[n]=J,O[_]=pe)},writable:!0}),ne));return O[h]=null,u(x,(function(J){if(J&&J.code!=="ERR_STREAM_PREMATURE_CLOSE"){var pe=O[_];return pe!==null&&(O[h]=null,O[n]=null,O[_]=null,pe(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(vt,Le,M){function ce(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?ce(Object(m),!0).forEach((function(d){u(g,d,m[d])})):Object.getOwnPropertyDescriptors?Object.defineProperties(g,Object.getOwnPropertyDescriptors(m)):ce(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";vt.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),ne=this.head,O=0;ne;)T=ne.data,q=x,W=O,y.prototype.copy.call(T,q,W),O+=ne.data.length,ne=ne.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,ne=d>x.length?x.length:d;if(ne===x.length?W+=x:W+=x.slice(0,d),(d-=ne)==0){ne===x.length?(++q,T.next?this.head=T.next:this.head=this.tail=null):(this.head=T,T.data=x.slice(ne));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,ne=d>x.length?x.length:d;if(x.copy(T,T.length-d,0,ne),(d-=ne)==0){ne===x.length?(++W,q.next?this.head=q.next:this.head=this.tail=null):(this.head=q,q.data=x.slice(ne));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(vt){function Le(I,u){ce(I,u),M(I)}function M(I){I._writableState&&!I._writableState.emitClose||I._readableState&&!I._readableState.emitClose||I.emit("close")}function ce(I,u){I.emit("error",u)}vt.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(ce,this,I)):process.nextTick(ce,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(Le,n,i)):process.nextTick(Le,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(vt,Le,M){var ce=M(2528).F.ERR_STREAM_PREMATURE_CLOSE;function I(){}vt.exports=function u(n,_,y){if(typeof _=="function")return u(n,null,_);_||(_={}),y=(function(ne){var O=!1;return function(){if(!O){O=!0;for(var J=arguments.length,pe=new Array(J),G=0;G<J;G++)pe[G]=arguments[G];ne.apply(this,pe)}}})(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(ne){y.call(n,ne)},W=function(){var ne;return i&&!d?(n._readableState&&n._readableState.ended||(ne=new ce),y.call(n,ne)):h&&!r?(n._writableState&&n._writableState.ended||(ne=new ce),y.call(n,ne)):void 0},x=function(){n.req.on("finish",m)};return(function(ne){return ne.setHeader&&typeof ne.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(vt){vt.exports=function(){throw new Error("Readable.from is not available in the browser")}},8734:function(vt,Le,M){var ce,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)}vt.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(ne,O,J,pe){pe=(function(re){var be=!1;return function(){be||(be=!0,re.apply(void 0,arguments))}})(pe);var G=!1;ne.on("close",(function(){G=!0})),ce===void 0&&(ce=M(7182)),ce(ne,{readable:O,writable:J},(function(re){if(re)return pe(re);G=!0,pe()}));var X=!1;return function(re){if(!G&&!X)return X=!0,(function(be){return be.setHeader&&typeof be.abort=="function"})(ne)?ne.abort():typeof ne.destroy=="function"?ne.destroy():void pe(re||new n("pipe"))}})(q,x,W>0,(function(ne){m||(m=ne),ne&&T.forEach(y),x||(T.forEach(y),d(m))}))}));return g.reduce(i)}},5099:function(vt,Le,M){var ce=M(2528).F.ERR_INVALID_OPT_VALUE;vt.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 ce(_?n:"highWaterMark",y);return Math.floor(y)}return I.objectMode?16:16384}}},5369:function(vt,Le,M){vt.exports=M(5572).EventEmitter},950:function(vt,Le,M){var ce=M(6640).Buffer,I=ce.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 ne;;)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(ne)return;x=(""+x).toLowerCase(),ne=!0}})(q);if(typeof W!="string"&&(ce.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=ce.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):""}Le.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,ne,O){var J=ne.length-1;if(J<O)return 0;var pe=n(ne[J]);return pe>=0?(pe>0&&(x.lastNeed=pe-1),pe):--J<O||pe===-2?0:(pe=n(ne[J]))>=0?(pe>0&&(x.lastNeed=pe-2),pe):--J<O||pe===-2?0:(pe=n(ne[J]))>=0?(pe>0&&(pe===2?pe=0:x.lastNeed=pe-3),pe):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(vt,Le,M){var ce=M(4910),I=ce.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?vt.exports=ce:(u(ce,Le),Le.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 ce.SlowBuffer(_)}},3785:function(vt,Le,M){var ce;(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",ne="tablet",O="smarttv",J="wearable",pe="embedded",G="Amazon",X="Apple",re="ASUS",be="BlackBerry",Ue="Browser",me="Chrome",le="Firefox",je="Google",Se="Huawei",Ne="LG",He="Microsoft",it="Motorola",Ie="Opera",Oe="Samsung",ft="Sharp",At="Sony",Rt="Xiaomi",Pt="Zebra",ee="Facebook",ae="Chromium OS",qe="Mac OS",v=function(Ye){for(var Ve={},Xe=0;Xe<Ye.length;Xe++)Ve[Ye[Xe].toUpperCase()]=Ye[Xe];return Ve},A=function(Ye,Ve){return typeof Ye===i&&c(Ve).indexOf(c(Ye))!==-1},c=function(Ye){return Ye.toLowerCase()},E=function(Ye,Ve){if(typeof Ye===i)return Ye=Ye.replace(/^\s\s*/,""),typeof Ve===_?Ye:Ye.substring(0,500)},Q=function(Ye,Ve){for(var Xe,nt,Tt,mt,Ut,Mt,zt=0;zt<Ve.length&&!Ut;){var Qt=Ve[zt],nn=Ve[zt+1];for(Xe=nt=0;Xe<Qt.length&&!Ut&&Qt[Xe];)if(Ut=Qt[Xe++].exec(Ye))for(Tt=0;Tt<nn.length;Tt++)Mt=Ut[++nt],typeof(mt=nn[Tt])===y&&mt.length>0?mt.length===2?typeof mt[1]==n?this[mt[0]]=mt[1].call(this,Mt):this[mt[0]]=mt[1]:mt.length===3?typeof mt[1]!==n||mt[1].exec&&mt[1].test?this[mt[0]]=Mt?Mt.replace(mt[1],mt[2]):u:this[mt[0]]=Mt?mt[1].call(this,Mt,mt[2]):u:mt.length===4&&(this[mt[0]]=Mt?mt[3].call(this,Mt.replace(mt[1],mt[2])):u):this[mt]=Mt||u;zt+=2}},D=function(Ye,Ve){for(var Xe in Ve)if(typeof Ve[Xe]===y&&Ve[Xe].length>0){for(var nt=0;nt<Ve[Xe].length;nt++)if(A(Ve[Xe][nt],Ye))return Xe==="?"?u:Xe}else if(A(Ve[Xe],Ye))return Xe==="?"?u:Xe;return Ye},Be={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"},De={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,Ie+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[T,[r,Ie+" GX"]],[/\bopr\/([\w\.]+)/i],[T,[r,Ie]],[/\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"+Ue]],[/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 "+Ue]],[/(avast|avg)\/([\w\.]+)/i],[[r,/(.+)/,"$1 Secure "+Ue],T],[/\bfocus\/([\w\.]+)/i],[T,[r,le+" Focus"]],[/\bopt\/([\w\.]+)/i],[T,[r,Ie+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[T,[r,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[T,[r,"Dolphin"]],[/coast\/([\w\.]+)/i],[T,[r,Ie+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[T,[r,"MIUI "+Ue]],[/fxios\/([-\w\.]+)/i],[T,[r,le]],[/\bqihu|(qi?ho?o?|360)browser/i],[[r,"360 "+Ue]],[/(oculus|sailfish|huawei|vivo)browser\/([\w\.]+)/i],[[r,/(.+)/,"$1 "+Ue],T],[/samsungbrowser\/([\w\.]+)/i],[T,[r,Oe+" 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,ee],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,me+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[r,me+" WebView"],T],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[T,[r,"Android "+Ue]],[/(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,le+" 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,Oe],[m,ne]],[/\b((?:s[cgp]h|gt|sm)-\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[g,[d,Oe],[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,ne]],[/(macintosh);/i],[g,[d,X]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[g,[d,ft],[m,x]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[g,[d,Se],[m,ne]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[g,[d,Se],[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,Rt],[m,x]],[/oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i,/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[g,/_/g," "],[d,Rt],[m,ne]],[/; (\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,ne]],[/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,it],[m,x]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[g,[d,it],[m,ne]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[g,[d,Ne],[m,ne]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[g,[d,Ne],[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,ne]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[g,/_/g," "],[d,"Nokia"],[m,x]],[/(pixel c)\b/i],[g,[d,je],[m,ne]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[g,[d,je],[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,At],[m,x]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[g,"Xperia Tablet"],[d,At],[m,ne]],[/ (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,ne]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[g,/(.+)/g,"Fire Phone $1"],[d,G],[m,x]],[/(playbook);[-\w\),; ]+(rim)/i],[g,d,[m,ne]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[g,[d,be],[m,x]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[g,[d,re],[m,ne]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[g,[d,re],[m,x]],[/(nexus 9)/i],[g,[d,"HTC"],[m,ne]],[/(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,ne]],[/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,ne]],[/(surface duo)/i],[g,[d,He],[m,ne]],[/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,ne]],[/\b(venue[\d ]{2,7}) b/i],[g,[d,"Dell"],[m,ne]],[/\b(q(?:mv|ta)\w+) b/i],[g,[d,"Verizon"],[m,ne]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[g,[d,"Barnes & Noble"],[m,ne]],[/\b(tm\d{3}\w+) b/i],[g,[d,"NuVision"],[m,ne]],[/\b(k88) b/i],[g,[d,"ZTE"],[m,ne]],[/\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,ne]],[/\b((zeki)?tb.*\b) b/i],[g,[d,"Zeki"],[m,ne]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[d,"Dragon Touch"],g,[m,ne]],[/\b(ns-?\w{0,9}) b/i],[g,[d,"Insignia"],[m,ne]],[/\b((nxa|next)-?\w{0,9}) b/i],[g,[d,"NextBook"],[m,ne]],[/\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,ne]],[/\b(trio[-\w\. ]+) b/i],[g,[d,"MachSpeed"],[m,ne]],[/\btu_(1491) b/i],[g,[d,"Rotor"],[m,ne]],[/(shield[\w ]+) b/i],[g,[d,"Nvidia"],[m,ne]],[/(sprint) (\w+)/i],[d,g,[m,x]],[/(kin\.[onetw]{3})/i],[[g,/\./g," "],[d,He],[m,x]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[g,[d,Pt],[m,ne]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[g,[d,Pt],[m,x]],[/smart-tv.+(samsung)/i],[d,[m,O]],[/hbbtv.+maple;(\d+)/i],[[g,/^/,"SmartTV"],[d,Oe],[m,O]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[d,Ne],[m,O]],[/(apple) ?tv/i],[d,[g,X+" TV"],[m,O]],[/crkey/i],[[g,me+"cast"],[d,je],[m,O]],[/droid.+aft(\w+)( bui|\))/i],[g,[d,G],[m,O]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[g,[d,ft],[m,O]],[/(bravia[\w ]+)( bui|\))/i],[g,[d,At],[m,O]],[/(mitv-\w{5}) bui/i],[g,[d,Rt],[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,At],[m,W]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[g,[d,He],[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,je],[m,J]],[/droid.+; (wt63?0{2,3})\)/i],[g,[d,Pt],[m,J]],[/(quest( \d| pro)?)/i],[g,[d,ee],[m,J]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[d,[m,pe]],[/(aeobc)\b/i],[g,[d,G],[m,pe]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[g,[m,x]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[g,[m,ne]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[m,ne]],[/(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,Be]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[T,D,Be],[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,qe],[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,be]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[T,[r,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[T,[r,le+" 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,me+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[r,ae],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]]},Ae=function(Ye,Ve){if(typeof Ye===y&&(Ve=Ye,Ye=u),!(this instanceof Ae))return new Ae(Ye,Ve).getResult();var Xe=typeof I!==_&&I.navigator?I.navigator:u,nt=Ye||(Xe&&Xe.userAgent?Xe.userAgent:""),Tt=Xe&&Xe.userAgentData?Xe.userAgentData:u,mt=Ve?(function(Mt,zt){var Qt={};for(var nn in Mt)zt[nn]&&zt[nn].length%2==0?Qt[nn]=zt[nn].concat(Mt[nn]):Qt[nn]=Mt[nn];return Qt})(De,Ve):De,Ut=Xe&&Xe.userAgent==nt;return this.getBrowser=function(){var Mt,zt={};return zt[r]=u,zt[T]=u,Q.call(zt,nt,mt.browser),zt[h]=typeof(Mt=zt[T])===i?Mt.replace(/[^\d\.]/g,"").split(".")[0]:u,Ut&&Xe&&Xe.brave&&typeof Xe.brave.isBrave==n&&(zt[r]="Brave"),zt},this.getCPU=function(){var Mt={};return Mt[q]=u,Q.call(Mt,nt,mt.cpu),Mt},this.getDevice=function(){var Mt={};return Mt[d]=u,Mt[g]=u,Mt[m]=u,Q.call(Mt,nt,mt.device),Ut&&!Mt[m]&&Tt&&Tt.mobile&&(Mt[m]=x),Ut&&Mt[g]=="Macintosh"&&Xe&&typeof Xe.standalone!==_&&Xe.maxTouchPoints&&Xe.maxTouchPoints>2&&(Mt[g]="iPad",Mt[m]=ne),Mt},this.getEngine=function(){var Mt={};return Mt[r]=u,Mt[T]=u,Q.call(Mt,nt,mt.engine),Mt},this.getOS=function(){var Mt={};return Mt[r]=u,Mt[T]=u,Q.call(Mt,nt,mt.os),Ut&&!Mt[r]&&Tt&&Tt.platform&&Tt.platform!="Unknown"&&(Mt[r]=Tt.platform.replace(/chrome os/i,ae).replace(/macos/i,qe)),Mt},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 nt},this.setUA=function(Mt){return nt=typeof Mt===i&&Mt.length>500?E(Mt,500):Mt,this},this.setUA(nt),this};Ae.VERSION="1.0.38",Ae.BROWSER=v([r,T,h]),Ae.CPU=v([q]),Ae.DEVICE=v([g,d,m,W,x,O,ne,J,pe]),Ae.ENGINE=Ae.OS=v([r,T]),typeof Le!==_?(vt.exports&&(Le=vt.exports=Ae),Le.UAParser=Ae):M.amdO?(ce=(function(){return Ae}).call(Le,M,Le,vt))===u||(vt.exports=ce):typeof I!==_&&(I.UAParser=Ae);var Re=typeof I!==_&&(I.jQuery||I.Zepto);if(Re&&!Re.ua){var _e=new Ae;Re.ua=_e.getResult(),Re.ua.get=function(){return _e.getUA()},Re.ua.set=function(Ye){_e.setUA(Ye);var Ve=_e.getResult();for(var Xe in Ve)Re.ua[Xe]=Ve[Xe]}}})(typeof window=="object"?window:this)},8214:function(vt,Le,M){function ce(I){try{if(!M.g.localStorage)return!1}catch{return!1}var u=M.g.localStorage[I];return u!=null&&String(u).toLowerCase()==="true"}vt.exports=function(I,u){if(ce("noDeprecation"))return I;var n=!1;return function(){if(!n){if(ce("throwDeprecation"))throw new Error(u);ce("traceDeprecation")?console.trace(u):console.warn(u),n=!0}return I.apply(this,arguments)}}},3779:function(){},7199:function(){}},ar={};function Bn(vt){var Le=ar[vt];if(Le!==void 0)return Le.exports;var M=ar[vt]={exports:{}};return Cr[vt].call(M.exports,M,M.exports,Bn),M.exports}Bn.amdO={},Bn.n=function(vt){var Le=vt&&vt.__esModule?function(){return vt.default}:function(){return vt};return Bn.d(Le,{a:Le}),Le},Bn.d=function(vt,Le){for(var M in Le)Bn.o(Le,M)&&!Bn.o(vt,M)&&Object.defineProperty(vt,M,{enumerable:!0,get:Le[M]})},Bn.g=(function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}})(),Bn.o=function(vt,Le){return Object.prototype.hasOwnProperty.call(vt,Le)};var Dr={};return(function(){Bn.d(Dr,{default:function(){return y}}),Bn(1229);var vt,Le=Bn(6035),M=Bn(1648),ce=Bn(8496),I=Bn(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 ne=d.querySelectorAll('source[type="'+h+'"]'),O=0;O<ne.length;O++){var J=g(r(ne[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():vt=window.setInterval((function(){window.dashjs&&(window.clearInterval(vt),u.createAll())}),500):window.addEventListener("load",(function i(){window.removeEventListener("load",i),u.createAll()})));var n=u,_=Bn(4413);dashjs.Protection=ce.default,dashjs.MetricsReporting=M.default,dashjs.MediaPlayerFactory=n,dashjs.Debug=_.A,dashjs.supportsMediaSource=Le.a;var y=dashjs})(),Dr.default})()}))})(va)),va.exports}var Qo=ol();const sl=il.getDefaultExportFromCjs(Qo),ul=al({__proto__:null,default:sl},[Qo]);exports.dash_all_min=ul;