web-backset.cn/apps/web-main/public/player/libs/dash.all.min.4.5.2.js
2023-02-27 15:41:19 +08:00

3 lines
588 KiB
JavaScript
Raw Blame History

/*! v3.1.0-9167c97c, 2020-04-14T14:36:15Z */
!function a(o,s,u){function l(t,e){if(!s[t]){if(!o[t]){var n="function"==typeof require&&require;if(!e&&n)return n(t,!0);if(f)return f(t,!0);var r=new Error("Cannot find module '"+t+"'");throw r.code="MODULE_NOT_FOUND",r}var i=s[t]={exports:{}};o[t][0].call(i.exports,function(e){return l(o[t][1][e]||e)},i,i.exports,a,o,s,u)}return s[t].exports}for(var f="function"==typeof require&&require,e=0;e<u.length;e++)l(u[e]);return l}({1:[function(e,t,n){"use strict";var o,u,r,i={encode:function(e){for(var t=[],n=0;n<e.length;++n){var r=e.charCodeAt(n);r<128?t.push(r):(r<2048?t.push(192|r>>6):(r<65536?t.push(224|r>>12):(t.push(240|r>>18),t.push(128|63&r>>12)),t.push(128|63&r>>6)),t.push(128|63&r))}return t},decode:function(e){for(var t=[],n=0;n<e.length;){var r=e[n++];r<128||(r<224?r=(31&r)<<6:(r<240?r=(15&r)<<12:(r=(7&r)<<18,r|=(63&e[n++])<<12),r|=(63&e[n++])<<6),r|=63&e[n++]),t.push(String.fromCharCode(r))}return t.join("")}},l={};function f(e){for(var t=0,n=[],r=0|e.length/3;0<r--;){var i=(e[t]<<16)+(e[t+1]<<8)+e[t+2];t+=3,n.push(o.charAt(63&i>>18)),n.push(o.charAt(63&i>>12)),n.push(o.charAt(63&i>>6)),n.push(o.charAt(63&i))}if(2==e.length-t){i=(e[t]<<16)+(e[t+1]<<8);n.push(o.charAt(63&i>>18)),n.push(o.charAt(63&i>>12)),n.push(o.charAt(63&i>>6)),n.push("=")}else if(1==e.length-t){i=e[t]<<16;n.push(o.charAt(63&i>>18)),n.push(o.charAt(63&i>>12)),n.push("==")}return n.join("")}function d(e){for(var t=0,n=[],r=0|e.length/4;0<r--;){var i=(u[e.charCodeAt(t)]<<18)+(u[e.charCodeAt(t+1)]<<12)+(u[e.charCodeAt(t+2)]<<6)+u[e.charCodeAt(t+3)];n.push(255&i>>16),n.push(255&i>>8),n.push(255&i),t+=4}return n&&("="==e.charAt(t-2)?(n.pop(),n.pop()):"="==e.charAt(t-1)&&n.pop()),n}o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",u=function(){for(var e=[],t=0;t<o.length;++t)e[o.charCodeAt(t)]=t;return e["=".charCodeAt(0)]=0,e}(),r={encode:function(e){for(var t=[],n=0;n<e.length;++n)t.push(e.charCodeAt(n));return t},decode:function(e){for(var t=0;t<s.length;++t)a[t]=String.fromCharCode(a[t]);return a.join("")}},l.decodeArray=function(e){var t=d(e);return new Uint8Array(t)},l.encodeASCII=function(e){var t=r.encode(e);return f(t)},l.decodeASCII=function(e){var t=d(e);return r.decode(t)},l.encode=function(e){var t=i.encode(e);return f(t)},l.decode=function(e){var t=d(e);return i.decode(t)},void 0!==n&&(n.decode=l.decode,n.decodeArray=l.decodeArray,n.encode=l.encode,n.encodeASCII=l.encodeASCII)},{}],2:[function(e,t,n){"use strict";!function(e){function s(e){var t=e;return n.hasOwnProperty(e)&&(t=n[e]),String.fromCharCode(t)}function u(e){for(var t=[],n=0;n<e.length;n++)t.push(e[n].toString(16));return t}function o(e,t,n,r,i){this.foreground=e||"white",this.underline=t||!1,this.italics=n||!1,this.background=r||"black",this.flash=i||!1}var n={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},a={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},l={17:2,18:4,21:6,22:8,23:10,19:13,20:15},f={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},d={25:2,26:4,29:6,30:8,31:10,27:13,28:15},c=["white","green","blue","cyan","red","yellow","magenta","black","transparent"],h={verboseFilter:{DATA:3,DEBUG:3,INFO:2,WARNING:2,TEXT:1,ERROR:0},time:null,verboseLevel:0,setTime:function(e){this.time=e},log:function(e,t){var n=this.verboseFilter[e];this.verboseLevel>=n&&console.log(this.time+" ["+e+"] "+t)}};o.prototype={reset:function(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1},setStyles:function(e){for(var t=["foreground","underline","italics","background","flash"],n=0;n<t.length;n++){var r=t[n];e.hasOwnProperty(r)&&(this[r]=e[r])}},isDefault:function(){return"white"===this.foreground&&!this.underline&&!this.italics&&"black"===this.background&&!this.flash},equals:function(e){return this.foreground===e.foreground&&this.underline===e.underline&&this.italics===e.italics&&this.background===e.background&&this.flash===e.flash},copy:function(e){this.foreground=e.foreground,this.underline=e.underline,this.italics=e.italics,this.background=e.background,this.flash=e.flash},toString:function(){return"color="+this.foreground+", underline="+this.underline+", italics="+this.italics+", background="+this.background+", flash="+this.flash}};function t(e,t,n,r,i,a){this.uchar=e||" ",this.penState=new o(t,n,r,i,a)}t.prototype={reset:function(){this.uchar=" ",this.penState.reset()},setChar:function(e,t){this.uchar=e,this.penState.copy(t)},setPenState:function(e){this.penState.copy(e)},equals:function(e){return this.uchar===e.uchar&&this.penState.equals(e.penState)},copy:function(e){this.uchar=e.uchar,this.penState.copy(e.penState)},isEmpty:function(){return" "===this.uchar&&this.penState.isDefault()}};function r(){this.chars=[];for(var e=0;e<32;e++)this.chars.push(new t);this.pos=0,this.currPenState=new o}r.prototype={equals:function(e){for(var t=!0,n=0;n<32;n++)if(!this.chars[n].equals(e.chars[n])){t=!1;break}return t},copy:function(e){for(var t=0;t<32;t++)this.chars[t].copy(e.chars[t])},isEmpty:function(){for(var e=!0,t=0;t<32;t++)if(!this.chars[t].isEmpty()){e=!1;break}return e},setCursor:function(e){this.pos!==e&&(this.pos=e),this.pos<0?(h.log("ERROR","Negative cursor position "+this.pos),this.pos=0):32<this.pos&&(h.log("ERROR","Too large cursor position "+this.pos),this.pos=32)},moveCursor:function(e){var t=this.pos+e;if(1<e)for(var n=this.pos+1;n<t+1;n++)this.chars[n].setPenState(this.currPenState);this.setCursor(t)},backSpace:function(){this.moveCursor(-1),this.chars[this.pos].setChar(" ",this.currPenState)},insertChar:function(e){144<=e&&this.backSpace();var t=s(e);32<=this.pos?h.log("ERROR","Cannot insert "+e.toString(16)+" ("+t+") at position "+this.pos+". Skipping it!"):(this.chars[this.pos].setChar(t,this.currPenState),this.moveCursor(1))},clearFromPos:function(e){var t;for(t=e;t<32;t++)this.chars[t].reset()},clear:function(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()},clearToEndOfRow:function(){this.clearFromPos(this.pos)},getTextString:function(){for(var e=[],t=!0,n=0;n<32;n++){var r=this.chars[n].uchar;" "!==r&&(t=!1),e.push(r)}return t?"":e.join("")},setPenStyles:function(e){this.currPenState.setStyles(e),this.chars[this.pos].setPenState(this.currPenState)}};function i(){this.rows=[];for(var e=0;e<15;e++)this.rows.push(new r);this.currRow=14,this.nrRollUpRows=null,this.reset()}i.prototype={reset:function(){for(var e=0;e<15;e++)this.rows[e].clear();this.currRow=14},equals:function(e){for(var t=!0,n=0;n<15;n++)if(!this.rows[n].equals(e.rows[n])){t=!1;break}return t},copy:function(e){for(var t=0;t<15;t++)this.rows[t].copy(e.rows[t])},isEmpty:function(){for(var e=!0,t=0;t<15;t++)if(!this.rows[t].isEmpty()){e=!1;break}return e},backSpace:function(){this.rows[this.currRow].backSpace()},clearToEndOfRow:function(){this.rows[this.currRow].clearToEndOfRow()},insertChar:function(e){this.rows[this.currRow].insertChar(e)},setPen:function(e){this.rows[this.currRow].setPenStyles(e)},moveCursor:function(e){this.rows[this.currRow].moveCursor(e)},setCursor:function(e){h.log("INFO","setCursor: "+e),this.rows[this.currRow].setCursor(e)},setPAC:function(e){h.log("INFO","pacData = "+JSON.stringify(e));var t=e.row-1;this.nrRollUpRows&&t<this.nrRollUpRows-1&&(t=this.nrRollUpRows-1),this.currRow=t;var n=this.rows[this.currRow];if(null!==e.indent){var r=e.indent,i=Math.max(r-1,0);n.setCursor(e.indent),e.color=n.chars[i].penState.foreground}var a={foreground:e.color,underline:e.underline,italics:e.italics,background:"black",flash:!1};this.setPen(a)},setBkgData:function(e){h.log("INFO","bkgData = "+JSON.stringify(e)),this.backSpace(),this.setPen(e),this.insertChar(32)},setRollUpRows:function(e){this.nrRollUpRows=e},rollUp:function(){if(null!==this.nrRollUpRows){h.log("TEXT",this.getDisplayText());var e=this.currRow+1-this.nrRollUpRows,t=this.rows.splice(e,1)[0];t.clear(),this.rows.splice(this.currRow,0,t),h.log("INFO","Rolling up")}else h.log("DEBUG","roll_up but nrRollUpRows not set yet")},getDisplayText:function(e){e=e||!1;for(var t=[],n="",r=-1,i=0;i<15;i++){var a=this.rows[i].getTextString();a&&(r=i+1,e?t.push("Row "+r+': "'+a+'"'):t.push(a.trim()))}return 0<t.length&&(n=e?"["+t.join(" | ")+"]":t.join("\n")),n},getTextAndFormat:function(){return this.rows}};function p(e,t){this.chNr=e,this.outputFilter=t,this.mode=null,this.verbose=0,this.displayedMemory=new i,this.nonDisplayedMemory=new i,this.lastOutputScreen=new i,this.currRollUpRow=this.displayedMemory.rows[14],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null}p.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(e){this.outputFilter=e},setPAC:function(e){this.writeScreen.setPAC(e)},setBkgData:function(e){this.writeScreen.setBkgData(e)},setMode:function(e){e!==this.mode&&(this.mode=e,h.log("INFO","MODE="+e),"MODE_POP-ON"==this.mode?this.writeScreen=this.nonDisplayedMemory:(this.writeScreen=this.displayedMemory,this.writeScreen.reset()),"MODE_ROLL-UP"!==this.mode&&(this.displayedMemory.nrRollUpRows=null,this.nonDisplayedMemory.nrRollUpRows=null),this.mode=e)},insertChars:function(e){for(var t=0;t<e.length;t++)this.writeScreen.insertChar(e[t]);var n=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";h.log("INFO",n+": "+this.writeScreen.getDisplayText(!0)),"MODE_PAINT-ON"!==this.mode&&"MODE_ROLL-UP"!==this.mode||(h.log("TEXT","DISPLAYED: "+this.displayedMemory.getDisplayText(!0)),this.outputDataUpdate())},cc_RCL:function(){h.log("INFO","RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")},cc_BS:function(){h.log("INFO","BS - BackSpace"),"MODE_TEXT"!==this.mode&&(this.writeScreen.backSpace(),this.writeScreen===this.displayedMemory&&this.outputDataUpdate())},cc_AOF:function(){},cc_AON:function(){},cc_DER:function(){h.log("INFO","DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()},cc_RU:function(e){h.log("INFO","RU("+e+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(e)},cc_FON:function(){h.log("INFO","FON - Flash On"),this.writeScreen.setPen({flash:!0})},cc_RDC:function(){h.log("INFO","RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")},cc_TR:function(){h.log("INFO","TR"),this.setMode("MODE_TEXT")},cc_RTD:function(){h.log("INFO","RTD"),this.setMode("MODE_TEXT")},cc_EDM:function(){h.log("INFO","EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate()},cc_CR:function(){h.log("CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate()},cc_ENM:function(){h.log("INFO","ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()},cc_EOC:function(){if(h.log("INFO","EOC - End Of Caption"),"MODE_POP-ON"===this.mode){var e=this.displayedMemory;this.displayedMemory=this.nonDisplayedMemory,this.nonDisplayedMemory=e,this.writeScreen=this.nonDisplayedMemory,h.log("TEXT","DISP: "+this.displayedMemory.getDisplayText())}this.outputDataUpdate()},cc_TO:function(e){h.log("INFO","TO("+e+") - Tab Offset"),this.writeScreen.moveCursor(e)},cc_MIDROW:function(e){var t={flash:!1};if(t.underline=e%2==1,t.italics=46<=e,t.italics)t.foreground="white";else{var n=Math.floor(e/2)-16;t.foreground=["white","green","blue","cyan","red","yellow","magenta"][n]}h.log("INFO","MIDROW: "+JSON.stringify(t)),this.writeScreen.setPen(t)},outputDataUpdate:function(){var e=h.time;null!==e&&this.outputFilter&&(this.outputFilter.updateData&&this.outputFilter.updateData(e,this.displayedMemory),null!==this.cueStartTime||this.displayedMemory.isEmpty()?this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,e,this.lastOutputScreen),this.cueStartTime=this.displayedMemory.isEmpty()?null:e):this.cueStartTime=e,this.lastOutputScreen.copy(this.displayedMemory))},cueSplitAtTime:function(e){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,e,this.displayedMemory),this.cueStartTime=e))}};function g(e,t,n){this.field=e||1,this.outputs=[t,n],this.channels=[new p(1,t),new p(2,n)],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}}g.prototype={getHandler:function(e){return this.channels[e].getHandler()},setHandler:function(e,t){this.channels[e].setHandler(t)},addData:function(e,t){var n,r,i,a=!1;this.lastTime=e,h.setTime(e);for(var o=0;o<t.length;o+=2)if(r=127&t[o],i=127&t[o+1],16<=r&&r<=31&&r===this.lastCmdA&&i===this.lastCmdB)this.lastCmdA=null,this.lastCmdB=null,h.log("DEBUG","Repeated command ("+u([r,i])+") is dropped");else if(0!=r||0!=i){if(h.log("DATA","["+u([t[o],t[o+1]])+"] -> ("+u([r,i])+")"),!(n=(n=(n=(n=this.parseCmd(r,i))||this.parseMidrow(r,i))||this.parsePAC(r,i))||this.parseBackgroundAttributes(r,i)))if(a=this.parseChars(r,i))if(this.currChNr&&0<=this.currChNr)this.channels[this.currChNr-1].insertChars(a);else h.log("WARNING","No channel found yet. TEXT-MODE?");n?this.dataCounters.cmd+=2:a?this.dataCounters.char+=2:(this.dataCounters.other+=2,h.log("WARNING","Couldn't parse cleaned data "+u([r,i])+" orig: "+u([t[o],t[o+1]])))}else this.dataCounters.padding+=2},parseCmd:function(e,t){var n=null;if(!((20===e||21===e||28===e||29===e)&&32<=t&&t<=47)&&!((23===e||31===e)&&33<=t&&t<=35))return!1;n=20===e||21===e||23===e?1:2;var r=this.channels[n-1];return 20===e||21===e||28===e||29===e?32===t?r.cc_RCL():33===t?r.cc_BS():34===t?r.cc_AOF():35===t?r.cc_AON():36===t?r.cc_DER():37===t?r.cc_RU(2):38===t?r.cc_RU(3):39===t?r.cc_RU(4):40===t?r.cc_FON():41===t?r.cc_RDC():42===t?r.cc_TR():43===t?r.cc_RTD():44===t?r.cc_EDM():45===t?r.cc_CR():46===t?r.cc_ENM():47===t&&r.cc_EOC():r.cc_TO(t-32),this.lastCmdA=e,this.lastCmdB=t,this.currChNr=n,!0},parseMidrow:function(e,t){var n=null;if((17===e||25===e)&&32<=t&&t<=47){if((n=17===e?1:2)!==this.currChNr)return h.log("ERROR","Mismatch channel in midrow parsing"),!1;var r=this.channels[n-1];return r.insertChars([32]),r.cc_MIDROW(t),h.log("DEBUG","MIDROW ("+u([e,t])+")"),this.lastCmdA=e,this.lastCmdB=t,!0}return!1},parsePAC:function(e,t){var n,r=null;if(!((17<=e&&e<=23||25<=e&&e<=31)&&64<=t&&t<=127)&&!((16===e||24===e)&&64<=t&&t<=95))return!1;n=e<=23?1:2,r=64<=t&&t<=95?1==n?a[e]:f[e]:1==n?l[e]:d[e];var i=this.interpretPAC(r,t);return this.channels[n-1].setPAC(i),this.lastCmdA=e,this.lastCmdB=t,this.currChNr=n,!0},interpretPAC:function(e,t){var n=t,r={color:null,italics:!1,indent:null,underline:!1,row:e};return n=95<t?t-96:t-64,r.underline=1==(1&n),n<=13?r.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(n/2)]:n<=15?(r.italics=!0,r.color="white"):r.indent=4*Math.floor((n-16)/2),r},parseChars:function(e,t){var n=null,r=null,i=null;if(17<=(i=25<=e?(n=2,e-8):(n=1,e))&&i<=19){var a=t;a=17===i?t+80:18===i?t+112:t+144,h.log("INFO","Special char '"+s(a)+"' in channel "+n),r=[a],this.lastCmdA=e,this.lastCmdB=t}else 32<=e&&e<=127&&(r=0===t?[e]:[e,t],this.lastCmdA=null,this.lastCmdB=null);if(r){var o=u(r);h.log("DEBUG","Char codes = "+o.join(","))}return r},parseBackgroundAttributes:function(e,t){var n,r,i;return((16===e||24===e)&&32<=t&&t<=47||(23===e||31===e)&&45<=t&&t<=47)&&(n={},16===e||24===e?(r=Math.floor((t-32)/2),n.background=c[r],t%2==1&&(n.background=n.background+"_semi")):45===t?n.background="transparent":(n.foreground="black",47===t&&(n.underline=!0)),i=e<24?1:2,this.channels[i-1].setBkgData(n),this.lastCmdA=e,this.lastCmdB=t,!0)},reset:function(){for(var e=0;e<this.channels.length;e++)this.channels[e]&&this.channels[e].reset();this.lastCmdA=null,this.lastCmdB=null},cueSplitAtTime:function(e){for(var t=0;t<this.channels.length;t++)this.channels[t]&&this.channels[t].cueSplitAtTime(e)}};e.logger=h,e.PenState=o,e.CaptionScreen=i,e.Cea608Parser=g,e.findCea608Nalus=function(e,t,n){for(var r=0,i=t,a=[],o=function(e,t,n,r){if(4!==e||t<8)return null;var i=n.getUint8(r),a=n.getUint16(r+1),o=n.getUint32(r+3),s=n.getUint8(r+7);return 181==i&&49==a&&1195456820==o&&3==s};i<t+n;){if(r=e.getUint32(i),6===(31&e.getUint8(i+4)))for(var s=i+5,u=-1;s<i+4+r-1;){u=0;for(var l=255;255===l;)u+=l=e.getUint8(s),s++;var f=0;for(l=255;255===l;)f+=l=e.getUint8(s),s++;o(u,f,e,s)&&a.push([s,f]),s+=f}i+=r+4}return a},e.extractCea608DataFromRange=function(e,t){var n=t[0],r=[[],[]];n+=8;var i=31&e.getUint8(n);n+=2;for(var a=0;a<i;a++){var o=e.getUint8(n),s=4&o,u=3&o;n++;var l=e.getUint8(n);n++;var f=e.getUint8(n);n++,s&&(127&l)+(127&f)!=0&&(0==u?(r[0].push(l),r[0].push(f)):1==u&&(r[1].push(l),r[1].push(f)))}return r}}(void 0===n?(void 0).cea608parser={}:n)},{}],3:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(A){A=A||{},function(){void 0===A.escapeMode&&(A.escapeMode=!0);void 0===A.attributePrefix&&(A.attributePrefix="_");A.arrayAccessForm=A.arrayAccessForm||"none",A.emptyNodeForm=A.emptyNodeForm||"text",void 0===A.enableToStringFunc&&(A.enableToStringFunc=!0);A.arrayAccessFormPaths=A.arrayAccessFormPaths||[],void 0===A.skipEmptyTextNodesForObj&&(A.skipEmptyTextNodesForObj=!0);void 0===A.stripWhitespaces&&(A.stripWhitespaces=!0);A.datetimeAccessFormPaths=A.datetimeAccessFormPaths||[],void 0===A.useDoubleQuotes&&(A.useDoubleQuotes=!1);A.xmlElementsFilter=A.xmlElementsFilter||[],A.jsonPropertiesFilter=A.jsonPropertiesFilter||[],void 0===A.keepCData&&(A.keepCData=!1);void 0===A.ignoreRoot&&(A.ignoreRoot=!1)}();var I={ELEMENT_NODE:1,TEXT_NODE:3,CDATA_SECTION_NODE:4,COMMENT_NODE:8,DOCUMENT_NODE:9};function R(e){var t=e.localName;return null==t&&(t=e.baseName),null!=t&&""!=t||(t=e.nodeName),t}function u(e){return"string"==typeof e?e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;"):e}function b(e,t,n,r){for(var i=0;i<e.length;i++){var a=e[i];if("string"==typeof a){if(a==r)break}else if(a instanceof RegExp){if(a.test(r))break}else if("function"==typeof a&&a(t,n,r))break}return i!=e.length}function D(e,t,n){switch(A.arrayAccessForm){case"property":e[t]instanceof Array?e[t+"_asArray"]=e[t]:e[t+"_asArray"]=[e[t]]}!(e[t]instanceof Array)&&0<A.arrayAccessFormPaths.length&&b(A.arrayAccessFormPaths,e,t,n)&&(e[t]=[e[t]])}function M(e){var t=e.split(/[-T:+Z]/g),n=new Date(t[0],t[1]-1,t[2]),r=t[5].split(".");if(n.setHours(t[3],t[4],r[0]),1<r.length&&n.setMilliseconds(r[1]),t[6]&&t[7]){var i=60*t[6]+Number(t[7]);i=0+("-"==(/\d\d-\d\d:\d\d$/.test(e)?"-":"+")?-1*i:i),n.setMinutes(n.getMinutes()-i-n.getTimezoneOffset())}else-1!==e.indexOf("Z",e.length-1)&&(n=new Date(Date.UTC(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds())));return n}function C(e,t){if(e.nodeType==I.DOCUMENT_NODE){for(var n=new Object,r=e.childNodes,i=0;i<r.length;i++){if((o=r[i]).nodeType==I.ELEMENT_NODE)if(A.ignoreRoot)n=C(o);else(n={})[s=R(o)]=C(o)}return n}if(e.nodeType==I.ELEMENT_NODE){(n=new Object).__cnt=0;var a=[];for(r=e.childNodes,i=0;i<r.length;i++){var o,s=R(o=r[i]);if(o.nodeType!=I.COMMENT_NODE){var u=t+"."+s;if(v=n,y=o.nodeType,T=s,S=u,!(y==I.ELEMENT_NODE&&0<A.xmlElementsFilter.length)||b(A.xmlElementsFilter,v,T,S))if(n.__cnt++,null==n[s]){var l=C(o,u);if("#text"!=s||/[^\s]/.test(l))(f={})[s]=l,a.push(f);n[s]=l,D(n,s,u)}else{null!=n[s]&&(n[s]instanceof Array||(n[s]=[n[s]],D(n,s,u)));var f;l=C(o,u);if("#text"!=s||/[^\s]/.test(l))(f={})[s]=l,a.push(f);n[s][n[s].length]=l}}}n.__children=a;for(var d=R(e),c=0;c<e.attributes.length;c++){var h=e.attributes[c];n.__cnt++;for(var p=h.value,g=0,_=A.matchers.length;g<_;g++){var E=A.matchers[g];E.test(h,d)&&(p=E.converter(h.value))}n[A.attributePrefix+h.name]=p}var m=e.prefix;return null!=m&&""!=m&&(n.__cnt++,n.__prefix=m),null!=n["#text"]&&(n.__text=n["#text"],n.__text instanceof Array&&(n.__text=n.__text.join("\n")),A.stripWhitespaces&&(n.__text=n.__text.trim()),delete n["#text"],"property"==A.arrayAccessForm&&delete n["#text_asArray"],n.__text=function(e,t,n){if(0<A.datetimeAccessFormPaths.length){var r=n.split(".#")[0];return b(A.datetimeAccessFormPaths,e,t,r)?M(e):e}return e}(n.__text,s,t+"."+s)),null!=n["#cdata-section"]&&(n.__cdata=n["#cdata-section"],delete n["#cdata-section"],"property"==A.arrayAccessForm&&delete n["#cdata-section_asArray"]),0==n.__cnt&&"text"==A.emptyNodeForm?n="":1==n.__cnt&&null!=n.__text?n=n.__text:1!=n.__cnt||null==n.__cdata||A.keepCData?1<n.__cnt&&null!=n.__text&&A.skipEmptyTextNodesForObj&&(A.stripWhitespaces&&""==n.__text||""==n.__text.trim())&&delete n.__text:n=n.__cdata,delete n.__cnt,!A.enableToStringFunc||null==n.__text&&null==n.__cdata||(n.toString=function(){return(null!=this.__text?this.__text:"")+(null!=this.__cdata?this.__cdata:"")}),n}if(e.nodeType==I.TEXT_NODE||e.nodeType==I.CDATA_SECTION_NODE)return e.nodeValue;var v,y,T,S}function l(e,t,n,r){var i="<"+(null!=e&&null!=e.__prefix?e.__prefix+":":"")+t;if(null!=n)for(var a=0;a<n.length;a++){var o=n[a],s=e[o];A.escapeMode&&(s=u(s)),i+=" "+o.substr(A.attributePrefix.length)+"=",A.useDoubleQuotes?i+='"'+s+'"':i+="'"+s+"'"}return i+=r?"/>":">"}function f(e,t){return"</"+(null!=e.__prefix?e.__prefix+":":"")+t+">"}function d(e,t){return"property"==A.arrayAccessForm&&(n=t.toString(),r="_asArray",-1!==n.indexOf(r,n.length-r.length))||0==t.toString().indexOf(A.attributePrefix)||0==t.toString().indexOf("__")||e[t]instanceof Function;var n,r}function c(e){var t=0;if(e instanceof Object)for(var n in e)d(e,n)||t++;return t}function h(e){var t=[];if(e instanceof Object)for(var n in e)-1==n.toString().indexOf("__")&&0==n.toString().indexOf(A.attributePrefix)&&t.push(n);return t}function p(e){var t,n,r="";return e instanceof Object?r+=(n="",null!=(t=e).__cdata&&(n+="<![CDATA["+t.__cdata+"]]>"),null!=t.__text&&(A.escapeMode?n+=u(t.__text):n+=t.__text),n):null!=e&&(A.escapeMode?r+=u(e):r+=e),r}function g(e,t){return""===e?t:e+"."+t}function _(e,t,n,r){var i="";if(0==e.length)i+=l(e,t,n,!0);else for(var a=0;a<e.length;a++)i+=l(e[a],t,h(e[a]),!1),i+=E(e[a],g(r,t)),i+=f(e[a],t);return i}function E(e,t){var n,r,i,a="";if(0<c(e))for(var o in e)if(!d(e,o)&&(""==t||(n=e,i=g(t,r=o),0==A.jsonPropertiesFilter.length||""==i||b(A.jsonPropertiesFilter,n,r,i)))){var s=e[o],u=h(s);if(null==s||null==s)a+=l(s,o,u,!0);else if(s instanceof Object)if(s instanceof Array)a+=_(s,o,u,t);else if(s instanceof Date)a+=l(s,o,u,!1),a+=s.toISOString(),a+=f(s,o);else{0<c(s)||null!=s.__text||null!=s.__cdata?(a+=l(s,o,u,!1),a+=E(s,g(t,o)),a+=f(s,o)):a+=l(s,o,u,!0)}else a+=l(s,o,u,!1),a+=p(s),a+=f(s,o)}return a+=p(e)}this.parseXmlString=function(e){var t;window.ActiveXObject||window;if(void 0===e)return null;if(window.DOMParser){var n=new window.DOMParser;try{0<(t=n.parseFromString(e,"text/xml")).getElementsByTagNameNS("*","parsererror").length&&(t=null)}catch(e){t=null}}else 0==e.indexOf("<?")&&(e=e.substr(e.indexOf("?>")+2)),(t=new ActiveXObject("Microsoft.XMLDOM")).async="false",t.loadXML(e);return t},this.asArray=function(e){return void 0===e||null==e?[]:e instanceof Array?e:[e]},this.toXmlDateTime=function(e){return e instanceof Date?e.toISOString():"number"==typeof e?new Date(e).toISOString():null},this.asDateTime=function(e){return"string"==typeof e?M(e):e},this.xml2json=function(e){return C(e)},this.xml_str2json=function(e){var t=this.parseXmlString(e);return null!=t?this.xml2json(t):null},this.json2xml_str=function(e){return E(e,"")},this.json2xml=function(e){var t=this.json2xml_str(e);return this.parseXmlString(t)},this.getVersion=function(){return"1.2.0"}},t.exports=n.default},{}],4:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var i=e(5),a=r(e(124)),o=r(e(161)),s=r(e(102)),u=r(e(45));dashjs.Protection=o.default,dashjs.MetricsReporting=a.default,dashjs.MediaPlayerFactory=s.default,dashjs.Debug=u.default,n.default=dashjs,n.MediaPlayer=i.MediaPlayer,n.Protection=o.default,n.MetricsReporting=a.default,n.MediaPlayerFactory=s.default,n.Debug=u.default},{102:102,124:124,161:161,45:45,5:5}],5:[function(u,e,l){(function(e){"use strict";function t(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(l,"__esModule",{value:!0});var n=t(u(100)),r=t(u(47)),i=t(u(45)),a=u(50),o="undefined"!=typeof window&&window||e,s=o.dashjs;(s=s||(o.dashjs={})).MediaPlayer=n.default,s.FactoryMaker=r.default,s.Debug=i.default,s.Version=(0,a.getVersionString)(),l.default=s,l.MediaPlayer=n.default,l.FactoryMaker=r.default,l.Debug=i.default}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{100:100,45:45,47:47,50:50}],6:[function(e,t,n){"use strict";n.byteLength=function(e){var t=d(e),n=t[0],r=t[1];return 3*(n+r)/4-r},n.toByteArray=function(e){for(var t,n=d(e),r=n[0],i=n[1],a=new f(function(e,t){return 3*(e+t)/4-t}(r,i)),o=0,s=0<i?r-4:r,u=0;u<s;u+=4)t=l[e.charCodeAt(u)]<<18|l[e.charCodeAt(u+1)]<<12|l[e.charCodeAt(u+2)]<<6|l[e.charCodeAt(u+3)],a[o++]=t>>16&255,a[o++]=t>>8&255,a[o++]=255&t;2===i&&(t=l[e.charCodeAt(u)]<<2|l[e.charCodeAt(u+1)]>>4,a[o++]=255&t);1===i&&(t=l[e.charCodeAt(u)]<<10|l[e.charCodeAt(u+1)]<<4|l[e.charCodeAt(u+2)]>>2,a[o++]=t>>8&255,a[o++]=255&t);return a},n.fromByteArray=function(e){for(var t,n=e.length,r=n%3,i=[],a=0,o=n-r;a<o;a+=16383)i.push(u(e,a,o<a+16383?o:a+16383));1==r?(t=e[n-1],i.push(s[t>>2]+s[t<<4&63]+"==")):2==r&&(t=(e[n-2]<<8)+e[n-1],i.push(s[t>>10]+s[t>>4&63]+s[t<<2&63]+"="));return i.join("")};for(var s=[],l=[],f="undefined"!=typeof Uint8Array?Uint8Array:Array,r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=0,a=r.length;i<a;++i)s[i]=r[i],l[r.charCodeAt(i)]=i;function d(e){var t=e.length;if(0<t%4)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function u(e,t,n){for(var r,i,a=[],o=t;o<n;o+=3)r=(e[o]<<16&16711680)+(e[o+1]<<8&65280)+(255&e[o+2]),a.push(s[(i=r)>>18&63]+s[i>>12&63]+s[i>>6&63]+s[63&i]);return a.join("")}l["-".charCodeAt(0)]=62,l["_".charCodeAt(0)]=63},{}],7:[function(e,t,n){},{}],8:[function(e,t,n){"use strict";var r=e(6),a=e(13);n.Buffer=d,n.SlowBuffer=function(e){+e!=e&&(e=0);return d.alloc(+e)},n.INSPECT_MAX_BYTES=50;var i=2147483647;function o(e){if(i<e)throw new RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return t.__proto__=d.prototype,t}function d(e,t,n){if("number"!=typeof e)return s(e,t,n);if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return l(e)}function s(e,t,n){if("string"==typeof e)return function(e,t){"string"==typeof t&&""!==t||(t="utf8");if(!d.isEncoding(t))throw new TypeError("Unknown encoding: "+t);var n=0|h(e,t),r=o(n),i=r.write(e,t);i!==n&&(r=r.slice(0,i));return r}(e,t);if(ArrayBuffer.isView(e))return f(e);if(null==e)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(U(e,ArrayBuffer)||e&&U(e.buffer,ArrayBuffer))return function(e,t,n){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(n||0))throw new RangeError('"length" is outside of buffer bounds');var r;r=void 0===t&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,t):new Uint8Array(e,t,n);return r.__proto__=d.prototype,r}(e,t,n);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');var r=e.valueOf&&e.valueOf();if(null!=r&&r!==e)return d.from(r,t,n);var i=function(e){if(d.isBuffer(e)){var t=0|c(e.length),n=o(t);return 0===n.length?n:(e.copy(n,0,0,t),n)}if(void 0!==e.length)return"number"!=typeof e.length||k(e.length)?o(0):f(e);if("Buffer"===e.type&&Array.isArray(e.data))return f(e.data)}(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return d.from(e[Symbol.toPrimitive]("string"),t,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function u(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function l(e){return u(e),o(e<0?0:0|c(e))}function f(e){for(var t=e.length<0?0:0|c(e.length),n=o(t),r=0;r<t;r+=1)n[r]=255&e[r];return n}function c(e){if(i<=e)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return 0|e}function h(e,t){if(d.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||U(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var n=e.length,r=2<arguments.length&&!0===arguments[2];if(!r&&0===n)return 0;for(var i=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return L(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return x(e).length;default:if(i)return r?-1:L(e).length;t=(""+t).toLowerCase(),i=!0}}function p(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function g(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):2147483647<n?n=2147483647:n<-2147483648&&(n=-2147483648),k(n=+n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=d.from(t,r)),d.isBuffer(t))return 0===t.length?-1:_(e,t,n,r,i);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):_(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function _(e,t,n,r,i){var a,o=1,s=e.length,u=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;s/=o=2,u/=2,n/=2}function l(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(i){var f=-1;for(a=n;a<s;a++)if(l(e,a)===l(t,-1===f?0:a-f)){if(-1===f&&(f=a),a-f+1===u)return f*o}else-1!==f&&(a-=a-f),f=-1}else for(s<n+u&&(n=s-u),a=n;0<=a;a--){for(var d=!0,c=0;c<u;c++)if(l(e,a+c)!==l(t,c)){d=!1;break}if(d)return a}return-1}function E(e,t,n,r){n=Number(n)||0;var i=e.length-n;(!r||i<(r=Number(r)))&&(r=i);var a=t.length;a/2<r&&(r=a/2);for(var o=0;o<r;++o){var s=parseInt(t.substr(2*o,2),16);if(k(s))return o;e[n+o]=s}return o}function m(e,t,n,r){return F(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function v(e,t,n,r){return F(function(e,t){for(var n,r,i,a=[],o=0;o<e.length&&!((t-=2)<0);++o)n=e.charCodeAt(o),r=n>>8,i=n%256,a.push(i),a.push(r);return a}(t,e.length-n),e,n,r)}function y(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function T(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i<n;){var a,o,s,u,l=e[i],f=null,d=239<l?4:223<l?3:191<l?2:1;if(i+d<=n)switch(d){case 1:l<128&&(f=l);break;case 2:128==(192&(a=e[i+1]))&&127<(u=(31&l)<<6|63&a)&&(f=u);break;case 3:a=e[i+1],o=e[i+2],128==(192&a)&&128==(192&o)&&2047<(u=(15&l)<<12|(63&a)<<6|63&o)&&(u<55296||57343<u)&&(f=u);break;case 4:a=e[i+1],o=e[i+2],s=e[i+3],128==(192&a)&&128==(192&o)&&128==(192&s)&&65535<(u=(15&l)<<18|(63&a)<<12|(63&o)<<6|63&s)&&u<1114112&&(f=u)}null===f?(f=65533,d=1):65535<f&&(f-=65536,r.push(f>>>10&1023|55296),f=56320|1023&f),r.push(f),i+=d}return function(e){var t=e.length;if(t<=S)return String.fromCharCode.apply(String,e);var n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=S));return n}(r)}n.kMaxLength=i,(d.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()}catch(e){return!1}}())||"undefined"==typeof console||"function"!=typeof console.error||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(d.prototype,"parent",{enumerable:!0,get:function(){if(d.isBuffer(this))return this.buffer}}),Object.defineProperty(d.prototype,"offset",{enumerable:!0,get:function(){if(d.isBuffer(this))return this.byteOffset}}),"undefined"!=typeof Symbol&&null!=Symbol.species&&d[Symbol.species]===d&&Object.defineProperty(d,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),d.poolSize=8192,d.from=function(e,t,n){return s(e,t,n)},d.prototype.__proto__=Uint8Array.prototype,d.__proto__=Uint8Array,d.alloc=function(e,t,n){return i=t,a=n,u(r=e),r<=0||void 0===i?o(r):"string"==typeof a?o(r).fill(i,a):o(r).fill(i);var r,i,a},d.allocUnsafe=function(e){return l(e)},d.allocUnsafeSlow=function(e){return l(e)},d.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==d.prototype},d.compare=function(e,t){if(U(e,Uint8Array)&&(e=d.from(e,e.offset,e.byteLength)),U(t,Uint8Array)&&(t=d.from(t,t.offset,t.byteLength)),!d.isBuffer(e)||!d.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;for(var n=e.length,r=t.length,i=0,a=Math.min(n,r);i<a;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:r<n?1:0},d.isEncoding=function(e){switch(String(e).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}},d.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return d.alloc(0);var n;if(void 0===t)for(n=t=0;n<e.length;++n)t+=e[n].length;var r=d.allocUnsafe(t),i=0;for(n=0;n<e.length;++n){var a=e[n];if(U(a,Uint8Array)&&(a=d.from(a)),!d.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(r,i),i+=a.length}return r},d.byteLength=h,d.prototype._isBuffer=!0,d.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)p(this,t,t+1);return this},d.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)p(this,t,t+3),p(this,t+1,t+2);return this},d.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)p(this,t,t+7),p(this,t+1,t+6),p(this,t+2,t+5),p(this,t+3,t+4);return this},d.prototype.toLocaleString=d.prototype.toString=function(){var e=this.length;return 0===e?"":0===arguments.length?T(this,0,e):function(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e=e||"utf8";;)switch(e){case"hex":return R(this,t,n);case"utf8":case"utf-8":return T(this,t,n);case"ascii":return A(this,t,n);case"latin1":case"binary":return I(this,t,n);case"base64":return y(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return b(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}.apply(this,arguments)},d.prototype.equals=function(e){if(!d.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===d.compare(this,e)},d.prototype.inspect=function(){var e="",t=n.INSPECT_MAX_BYTES;return e=this.toString("hex",0,t).replace(/(.{2})/g,"$1 ").trim(),this.length>t&&(e+=" ... "),"<Buffer "+e+">"},d.prototype.compare=function(e,t,n,r,i){if(U(e,Uint8Array)&&(e=d.from(e,e.offset,e.byteLength)),!d.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(i<=r&&n<=t)return 0;if(i<=r)return-1;if(n<=t)return 1;if(this===e)return 0;for(var a=(i>>>=0)-(r>>>=0),o=(n>>>=0)-(t>>>=0),s=Math.min(a,o),u=this.slice(r,i),l=e.slice(t,n),f=0;f<s;++f)if(u[f]!==l[f]){a=u[f],o=l[f];break}return a<o?-1:o<a?1:0},d.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},d.prototype.indexOf=function(e,t,n){return g(this,e,t,n,!0)},d.prototype.lastIndexOf=function(e,t,n){return g(this,e,t,n,!1)},d.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-t;if((void 0===n||i<n)&&(n=i),0<e.length&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r=r||"utf8";for(var a,o,s,u,l,f,d=!1;;)switch(r){case"hex":return E(this,e,t,n);case"utf8":case"utf-8":return l=t,f=n,F(L(e,(u=this).length-l),u,l,f);case"ascii":return m(this,e,t,n);case"latin1":case"binary":return m(this,e,t,n);case"base64":return a=this,o=t,s=n,F(x(e),a,o,s);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return v(this,e,t,n);default:if(d)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),d=!0}},d.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var S=4096;function A(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(127&e[i]);return r}function I(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(e[i]);return r}function R(e,t,n){var r=e.length;(!t||t<0)&&(t=0),(!n||n<0||r<n)&&(n=r);for(var i="",a=t;a<n;++a)i+=P(e[a]);return i}function b(e,t,n){for(var r=e.slice(t,n),i="",a=0;a<r.length;a+=2)i+=String.fromCharCode(r[a]+256*r[a+1]);return i}function D(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(n<e+t)throw new RangeError("Trying to access beyond buffer length")}function M(e,t,n,r,i,a){if(!d.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(i<t||t<a)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function C(e,t,n,r){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function w(e,t,n,r,i){return t=+t,n>>>=0,i||C(e,0,n,4),a.write(e,t,n,r,23,4),n+4}function N(e,t,n,r,i){return t=+t,n>>>=0,i||C(e,0,n,8),a.write(e,t,n,r,52,8),n+8}d.prototype.slice=function(e,t){var n=this.length;(e=~~e)<0?(e+=n)<0&&(e=0):n<e&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):n<t&&(t=n),t<e&&(t=e);var r=this.subarray(e,t);return r.__proto__=d.prototype,r},d.prototype.readUIntLE=function(e,t,n){e>>>=0,t>>>=0,n||D(e,t,this.length);for(var r=this[e],i=1,a=0;++a<t&&(i*=256);)r+=this[e+a]*i;return r},d.prototype.readUIntBE=function(e,t,n){e>>>=0,t>>>=0,n||D(e,t,this.length);for(var r=this[e+--t],i=1;0<t&&(i*=256);)r+=this[e+--t]*i;return r},d.prototype.readUInt8=function(e,t){return e>>>=0,t||D(e,1,this.length),this[e]},d.prototype.readUInt16LE=function(e,t){return e>>>=0,t||D(e,2,this.length),this[e]|this[e+1]<<8},d.prototype.readUInt16BE=function(e,t){return e>>>=0,t||D(e,2,this.length),this[e]<<8|this[e+1]},d.prototype.readUInt32LE=function(e,t){return e>>>=0,t||D(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},d.prototype.readUInt32BE=function(e,t){return e>>>=0,t||D(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},d.prototype.readIntLE=function(e,t,n){e>>>=0,t>>>=0,n||D(e,t,this.length);for(var r=this[e],i=1,a=0;++a<t&&(i*=256);)r+=this[e+a]*i;return(i*=128)<=r&&(r-=Math.pow(2,8*t)),r},d.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||D(e,t,this.length);for(var r=t,i=1,a=this[e+--r];0<r&&(i*=256);)a+=this[e+--r]*i;return(i*=128)<=a&&(a-=Math.pow(2,8*t)),a},d.prototype.readInt8=function(e,t){return e>>>=0,t||D(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},d.prototype.readInt16LE=function(e,t){e>>>=0,t||D(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},d.prototype.readInt16BE=function(e,t){e>>>=0,t||D(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},d.prototype.readInt32LE=function(e,t){return e>>>=0,t||D(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},d.prototype.readInt32BE=function(e,t){return e>>>=0,t||D(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},d.prototype.readFloatLE=function(e,t){return e>>>=0,t||D(e,4,this.length),a.read(this,e,!0,23,4)},d.prototype.readFloatBE=function(e,t){return e>>>=0,t||D(e,4,this.length),a.read(this,e,!1,23,4)},d.prototype.readDoubleLE=function(e,t){return e>>>=0,t||D(e,8,this.length),a.read(this,e,!0,52,8)},d.prototype.readDoubleBE=function(e,t){return e>>>=0,t||D(e,8,this.length),a.read(this,e,!1,52,8)},d.prototype.writeUIntLE=function(e,t,n,r){e=+e,t>>>=0,n>>>=0,r||M(this,e,t,n,Math.pow(2,8*n)-1,0);var i=1,a=0;for(this[t]=255&e;++a<n&&(i*=256);)this[t+a]=e/i&255;return t+n},d.prototype.writeUIntBE=function(e,t,n,r){e=+e,t>>>=0,n>>>=0,r||M(this,e,t,n,Math.pow(2,8*n)-1,0);var i=n-1,a=1;for(this[t+i]=255&e;0<=--i&&(a*=256);)this[t+i]=e/a&255;return t+n},d.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||M(this,e,t,1,255,0),this[t]=255&e,t+1},d.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||M(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},d.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||M(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},d.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||M(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},d.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||M(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},d.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t>>>=0,!r){var i=Math.pow(2,8*n-1);M(this,e,t,n,i-1,-i)}var a=0,o=1,s=0;for(this[t]=255&e;++a<n&&(o*=256);)e<0&&0===s&&0!==this[t+a-1]&&(s=1),this[t+a]=(e/o>>0)-s&255;return t+n},d.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t>>>=0,!r){var i=Math.pow(2,8*n-1);M(this,e,t,n,i-1,-i)}var a=n-1,o=1,s=0;for(this[t+a]=255&e;0<=--a&&(o*=256);)e<0&&0===s&&0!==this[t+a+1]&&(s=1),this[t+a]=(e/o>>0)-s&255;return t+n},d.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||M(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},d.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||M(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},d.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||M(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},d.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||M(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},d.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||M(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},d.prototype.writeFloatLE=function(e,t,n){return w(this,e,t,!0,n)},d.prototype.writeFloatBE=function(e,t,n){return w(this,e,t,!1,n)},d.prototype.writeDoubleLE=function(e,t,n){return N(this,e,t,!0,n)},d.prototype.writeDoubleBE=function(e,t,n){return N(this,e,t,!1,n)},d.prototype.copy=function(e,t,n,r){if(!d.isBuffer(e))throw new TypeError("argument should be a Buffer");if(n=n||0,r||0===r||(r=this.length),t>=e.length&&(t=e.length),t=t||0,0<r&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);var i=r-n;if(this===e&&"function"==typeof Uint8Array.prototype.copyWithin)this.copyWithin(t,n,r);else if(this===e&&n<t&&t<r)for(var a=i-1;0<=a;--a)e[a+t]=this[a+n];else Uint8Array.prototype.set.call(e,this.subarray(n,r),t);return i},d.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!d.isEncoding(r))throw new TypeError("Unknown encoding: "+r);if(1===e.length){var i=e.charCodeAt(0);("utf8"===r&&i<128||"latin1"===r)&&(e=i)}}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;var a;if(t>>>=0,n=void 0===n?this.length:n>>>0,"number"==typeof(e=e||0))for(a=t;a<n;++a)this[a]=e;else{var o=d.isBuffer(e)?e:d.from(e,r),s=o.length;if(0===s)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(a=0;a<n-t;++a)this[a+t]=o[a%s]}return this};var O=/[^+/0-9A-Za-z-_]/g;function P(e){return e<16?"0"+e.toString(16):e.toString(16)}function L(e,t){var n;t=t||1/0;for(var r=e.length,i=null,a=[],o=0;o<r;++o){if(55295<(n=e.charCodeAt(o))&&n<57344){if(!i){if(56319<n){-1<(t-=3)&&a.push(239,191,189);continue}if(o+1===r){-1<(t-=3)&&a.push(239,191,189);continue}i=n;continue}if(n<56320){-1<(t-=3)&&a.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&-1<(t-=3)&&a.push(239,191,189);if(i=null,n<128){if(--t<0)break;a.push(n)}else if(n<2048){if((t-=2)<0)break;a.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;a.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;a.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return a}function x(e){return r.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(O,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function F(e,t,n,r){for(var i=0;i<r&&!(i+n>=t.length||i>=e.length);++i)t[i+n]=e[i];return i}function U(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function k(e){return e!=e}},{13:13,6:6}],9:[function(e,t,n){var i={parseBuffer:function(e){return new a(e).parse()},addBoxProcessor:function(e,t){"string"==typeof e&&"function"==typeof t&&(o.prototype._boxProcessors[e]=t)},createFile:function(){return new a},createBox:function(e,t,n){var r=o.create(e);return t&&t.append(r,n),r},createFullBox:function(e,t,n){var r=i.createBox(e,t,n);return r.version=0,r.flags=0,r},Utils:{}};i.Utils.dataViewToString=function(e,t){var n=t||"utf-8";if("undefined"!=typeof TextDecoder)return new TextDecoder(n).decode(e);var r=[],i=0;if("utf-8"===n)for(;i<e.byteLength;){var a=e.getUint8(i++);a<128||(a<224?a=(31&a)<<6:(a<240?a=(15&a)<<12:(a=(7&a)<<18,a|=(63&e.getUint8(i++))<<12),a|=(63&e.getUint8(i++))<<6),a|=63&e.getUint8(i++)),r.push(String.fromCharCode(a))}else for(;i<e.byteLength;)r.push(String.fromCharCode(e.getUint8(i++)));return r.join("")},i.Utils.utf8ToByteArray=function(e){var t,n;if("undefined"!=typeof TextEncoder)t=(new TextEncoder).encode(e);else for(t=[],n=0;n<e.length;++n){var r=e.charCodeAt(n);r<128?t.push(r):(r<2048?t.push(192|r>>6):(r<65536?t.push(224|r>>12):(t.push(240|r>>18),t.push(128|63&r>>12)),t.push(128|63&r>>6)),t.push(128|63&r))}return t},i.Utils.appendBox=function(e,t,n){if(t._offset=e._cursor.offset,t._root=e._root?e._root:e,t._raw=e._raw,t._parent=e,-1!==n)if(null!=n){var r,i=-1;if("number"==typeof n)i=n;else{if("string"==typeof n)r=n;else{if("object"!=typeof n||!n.type)return void e.boxes.push(t);r=n.type}for(var a=0;a<e.boxes.length;a++)if(r===e.boxes[a].type){i=a+1;break}}e.boxes.splice(i,0,t)}else e.boxes.push(t)},void 0!==n&&(n.parseBuffer=i.parseBuffer,n.addBoxProcessor=i.addBoxProcessor,n.createFile=i.createFile,n.createBox=i.createBox,n.createFullBox=i.createFullBox,n.Utils=i.Utils),i.Cursor=function(e){this.offset=void 0===e?0:e};var a=function(e){this._cursor=new i.Cursor,this.boxes=[],e&&(this._raw=new DataView(e))};a.prototype.fetch=function(e){var t=this.fetchAll(e,!0);return t.length?t[0]:null},a.prototype.fetchAll=function(e,t){var n=[];return a._sweep.call(this,e,n,t),n},a.prototype.parse=function(){for(this._cursor.offset=0,this.boxes=[];this._cursor.offset<this._raw.byteLength;){var e=o.parse(this);if(void 0===e.type)break;this.boxes.push(e)}return this},a._sweep=function(e,t,n){for(var r in this.type&&this.type==e&&t.push(this),this.boxes){if(t.length&&n)return;a._sweep.call(this.boxes[r],e,t,n)}},a.prototype.write=function(){var e,t=0;for(e=0;e<this.boxes.length;e++)t+=this.boxes[e].getLength(!1);var n=new Uint8Array(t);for(this._rawo=new DataView(n.buffer),this.bytes=n,e=this._cursor.offset=0;e<this.boxes.length;e++)this.boxes[e].write();return n.buffer},a.prototype.append=function(e,t){i.Utils.appendBox(this,e,t)};var o=function(){this._cursor=new i.Cursor};o.parse=function(e){var t=new o;return t._offset=e._cursor.offset,t._root=e._root?e._root:e,t._raw=e._raw,t._parent=e,t._parseBox(),e._cursor.offset=t._raw.byteOffset+t._raw.byteLength,t},o.create=function(e){var t=new o;return t.type=e,t.boxes=[],t},o.prototype._boxContainers=["dinf","edts","mdia","meco","mfra","minf","moof","moov","mvex","stbl","strk","traf","trak","tref","udta","vttc","sinf","schi","encv","enca"],o.prototype._boxProcessors={},o.prototype._procField=function(e,t,n){this._parsing?this[e]=this._readField(t,n):this._writeField(t,n,this[e])},o.prototype._procFieldArray=function(e,t,n,r){var i;if(this._parsing)for(this[e]=[],i=0;i<t;i++)this[e][i]=this._readField(n,r);else for(i=0;i<this[e].length;i++)this._writeField(n,r,this[e][i])},o.prototype._procFullBox=function(){this._procField("version","uint",8),this._procField("flags","uint",24)},o.prototype._procEntries=function(e,t,n){var r;if(this._parsing)for(this[e]=[],r=0;r<t;r++)this[e].push({}),n.call(this,this[e][r]);else for(r=0;r<t;r++)n.call(this,this[e][r])},o.prototype._procSubEntries=function(e,t,n,r){var i;if(this._parsing)for(e[t]=[],i=0;i<n;i++)e[t].push({}),r.call(this,e[t][i]);else for(i=0;i<n;i++)r.call(this,e[t][i])},o.prototype._procEntryField=function(e,t,n,r){this._parsing?e[t]=this._readField(n,r):this._writeField(n,r,e[t])},o.prototype._procSubBoxes=function(e,t){var n;if(this._parsing)for(this[e]=[],n=0;n<t;n++)this[e].push(o.parse(this));else for(n=0;n<t;n++)this._rawo?this[e][n].write():this.size+=this[e][n].getLength()},o.prototype._readField=function(e,t){switch(e){case"uint":return this._readUint(t);case"int":return this._readInt(t);case"template":return this._readTemplate(t);case"string":return-1===t?this._readTerminatedString():this._readString(t);case"data":return this._readData(t);case"utf8":return this._readUTF8String();default:return-1}},o.prototype._readInt=function(e){var t=null,n=this._cursor.offset-this._raw.byteOffset;switch(e){case 8:t=this._raw.getInt8(n);break;case 16:t=this._raw.getInt16(n);break;case 32:t=this._raw.getInt32(n);break;case 64:var r=this._raw.getInt32(n),i=this._raw.getInt32(4+n);t=r*Math.pow(2,32)+i}return this._cursor.offset+=e>>3,t},o.prototype._readUint=function(e){var t,n,r=null,i=this._cursor.offset-this._raw.byteOffset;switch(e){case 8:r=this._raw.getUint8(i);break;case 16:r=this._raw.getUint16(i);break;case 24:r=((t=this._raw.getUint16(i))<<8)+(n=this._raw.getUint8(2+i));break;case 32:r=this._raw.getUint32(i);break;case 64:t=this._raw.getUint32(i),n=this._raw.getUint32(4+i),r=t*Math.pow(2,32)+n}return this._cursor.offset+=e>>3,r},o.prototype._readString=function(e){for(var t="",n=0;n<e;n++){var r=this._readUint(8);t+=String.fromCharCode(r)}return t},o.prototype._readTemplate=function(e){return this._readUint(e/2)+this._readUint(e/2)/Math.pow(2,e/2)},o.prototype._readTerminatedString=function(){for(var e="";this._cursor.offset-this._offset<this._raw.byteLength;){var t=this._readUint(8);if(0===t)break;e+=String.fromCharCode(t)}return e},o.prototype._readData=function(e){var t=0<e?e:this._raw.byteLength-(this._cursor.offset-this._offset);if(0<t){var n=new Uint8Array(this._raw.buffer,this._cursor.offset,t);return this._cursor.offset+=t,n}return null},o.prototype._readUTF8String=function(){var e=this._raw.byteLength-(this._cursor.offset-this._offset),t=null;return 0<e&&(t=new DataView(this._raw.buffer,this._cursor.offset,e),this._cursor.offset+=e),t?i.Utils.dataViewToString(t):t},o.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),1===this.size&&this._procField("largesize","uint",64),"uuid"===this.type&&this._procFieldArray("usertype",16,"uint",8),this.size){case 0:this._raw=new DataView(this._raw.buffer,this._offset,this._raw.byteLength-this._cursor.offset+8);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),-1!==this._boxContainers.indexOf(this.type)?this._parseContainerBox():this._data=this._readData())}},o.prototype._parseFullBox=function(){this.version=this._readUint(8),this.flags=this._readUint(24)},o.prototype._parseContainerBox=function(){for(this.boxes=[];this._cursor.offset-this._raw.byteOffset<this._raw.byteLength;)this.boxes.push(o.parse(this))},o.prototype.append=function(e,t){i.Utils.appendBox(this,e,t)},o.prototype.getLength=function(){if(this._parsing=!1,this._rawo=null,this.size=0,this._procField("size","uint",32),this._procField("type","string",4),1===this.size&&this._procField("largesize","uint",64),"uuid"===this.type&&this._procFieldArray("usertype",16,"uint",8),this._boxProcessors[this.type]&&this._boxProcessors[this.type].call(this),-1!==this._boxContainers.indexOf(this.type))for(var e=0;e<this.boxes.length;e++)this.size+=this.boxes[e].getLength();return this._data&&this._writeData(this._data),this.size},o.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),1===this.size&&this._procField("largesize","uint",64),"uuid"===this.type&&this._procFieldArray("usertype",16,"uint",8),this._boxProcessors[this.type]&&this._boxProcessors[this.type].call(this),-1!==this._boxContainers.indexOf(this.type))for(var e=0;e<this.boxes.length;e++)this.boxes[e].write();return this._data&&this._writeData(this._data),this._parent._cursor.offset+=this.size,this.size},o.prototype._writeInt=function(e,t){if(this._rawo){var n=this._cursor.offset-this._rawo.byteOffset;switch(e){case 8:this._rawo.setInt8(n,t);break;case 16:this._rawo.setInt16(n,t);break;case 32:this._rawo.setInt32(n,t);break;case 64:var r=Math.floor(t/Math.pow(2,32)),i=t-r*Math.pow(2,32);this._rawo.setUint32(n,r),this._rawo.setUint32(4+n,i)}this._cursor.offset+=e>>3}else this.size+=e>>3},o.prototype._writeUint=function(e,t){if(this._rawo){var n,r,i=this._cursor.offset-this._rawo.byteOffset;switch(e){case 8:this._rawo.setUint8(i,t);break;case 16:this._rawo.setUint16(i,t);break;case 24:n=(16776960&t)>>8,r=255&t,this._rawo.setUint16(i,n),this._rawo.setUint8(2+i,r);break;case 32:this._rawo.setUint32(i,t);break;case 64:r=t-(n=Math.floor(t/Math.pow(2,32)))*Math.pow(2,32),this._rawo.setUint32(i,n),this._rawo.setUint32(4+i,r)}this._cursor.offset+=e>>3}else this.size+=e>>3},o.prototype._writeString=function(e,t){for(var n=0;n<e;n++)this._writeUint(8,t.charCodeAt(n))},o.prototype._writeTerminatedString=function(e){if(0!==e.length){for(var t=0;t<e.length;t++)this._writeUint(8,e.charCodeAt(t));this._writeUint(8,0)}},o.prototype._writeTemplate=function(e,t){var n=Math.floor(t),r=(t-n)*Math.pow(2,e/2);this._writeUint(e/2,n),this._writeUint(e/2,r)},o.prototype._writeData=function(e){if(e)if(this._rawo){if(e instanceof Array){for(var t=this._cursor.offset-this._rawo.byteOffset,n=0;n<e.length;n++)this._rawo.setInt8(t+n,e[n]);this._cursor.offset+=e.length}e instanceof Uint8Array&&(this._root.bytes.set(e,this._cursor.offset),this._cursor.offset+=e.length)}else this.size+=e.length},o.prototype._writeUTF8String=function(e){var t=i.Utils.utf8ToByteArray(e);if(this._rawo)for(var n=new DataView(this._rawo.buffer,this._cursor.offset,t.length),r=0;r<t.length;r++)n.setUint8(r,t[r]);else this.size+=t.length},o.prototype._writeField=function(e,t,n){switch(e){case"uint":this._writeUint(t,n);break;case"int":this._writeInt(t,n);break;case"template":this._writeTemplate(t,n);break;case"string":-1==t?this._writeTerminatedString(n):this._writeString(t,n);break;case"data":this._writeData(n);break;case"utf8":this._writeUTF8String(n)}},o.prototype._boxProcessors.avc1=o.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)},o.prototype._boxProcessors.dref=function(){this._procFullBox(),this._procField("entry_count","uint",32),this._procSubBoxes("entries",this.entry_count)},o.prototype._boxProcessors.elst=function(){this._procFullBox(),this._procField("entry_count","uint",32),this._procEntries("entries",this.entry_count,function(e){this._procEntryField(e,"segment_duration","uint",1===this.version?64:32),this._procEntryField(e,"media_time","int",1===this.version?64:32),this._procEntryField(e,"media_rate_integer","int",16),this._procEntryField(e,"media_rate_fraction","int",16)})},o.prototype._boxProcessors.emsg=function(){this._procFullBox(),1==this.version?(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)},o.prototype._boxProcessors.free=o.prototype._boxProcessors.skip=function(){this._procField("data","data",-1)},o.prototype._boxProcessors.frma=function(){this._procField("data_format","uint",32)},o.prototype._boxProcessors.ftyp=o.prototype._boxProcessors.styp=function(){this._procField("major_brand","string",4),this._procField("minor_version","uint",32);var e=-1;this._parsing&&(e=(this._raw.byteLength-(this._cursor.offset-this._raw.byteOffset))/4),this._procFieldArray("compatible_brands",e,"string",4)},o.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)},o.prototype._boxProcessors.mdat=function(){this._procField("data","data",-1)},o.prototype._boxProcessors.mdhd=function(){this._procFullBox(),this._procField("creation_time","uint",1==this.version?64:32),this._procField("modification_time","uint",1==this.version?64:32),this._procField("timescale","uint",32),this._procField("duration","uint",1==this.version?64:32),this._parsing||"string"!=typeof this.language||(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)},o.prototype._boxProcessors.mehd=function(){this._procFullBox(),this._procField("fragment_duration","uint",1==this.version?64:32)},o.prototype._boxProcessors.mfhd=function(){this._procFullBox(),this._procField("sequence_number","uint",32)},o.prototype._boxProcessors.mfro=function(){this._procFullBox(),this._procField("mfra_size","uint",32)},o.prototype._boxProcessors.mp4a=o.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)},o.prototype._boxProcessors.mvhd=function(){this._procFullBox(),this._procField("creation_time","uint",1==this.version?64:32),this._procField("modification_time","uint",1==this.version?64:32),this._procField("timescale","uint",32),this._procField("duration","uint",1==this.version?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)},o.prototype._boxProcessors.payl=function(){this._procField("cue_text","utf8")},o.prototype._boxProcessors.pssh=function(){this._procFullBox(),this._procFieldArray("SystemID",16,"uint",8),this._procField("DataSize","uint",32),this._procFieldArray("Data",this.DataSize,"uint",8)},o.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)},o.prototype._boxProcessors.sdtp=function(){this._procFullBox();var e=-1;this._parsing&&(e=this._raw.byteLength-(this._cursor.offset-this._raw.byteOffset)),this._procFieldArray("sample_dependency_table",e,"uint",8)},o.prototype._boxProcessors.sidx=function(){this._procFullBox(),this._procField("reference_ID","uint",32),this._procField("timescale","uint",32),this._procField("earliest_presentation_time","uint",1==this.version?64:32),this._procField("first_offset","uint",1==this.version?64:32),this._procField("reserved","uint",16),this._procField("reference_count","uint",16),this._procEntries("references",this.reference_count,function(e){this._parsing||(e.reference=(1&e.reference_type)<<31,e.reference|=2147483647&e.referenced_size,e.sap=(1&e.starts_with_SAP)<<31,e.sap|=(3&e.SAP_type)<<28,e.sap|=268435455&e.SAP_delta_time),this._procEntryField(e,"reference","uint",32),this._procEntryField(e,"subsegment_duration","uint",32),this._procEntryField(e,"sap","uint",32),this._parsing&&(e.reference_type=e.reference>>31&1,e.referenced_size=2147483647&e.reference,e.starts_with_SAP=e.sap>>31&1,e.SAP_type=e.sap>>28&7,e.SAP_delta_time=268435455&e.sap)})},o.prototype._boxProcessors.smhd=function(){this._procFullBox(),this._procField("balance","uint",16),this._procField("reserved","uint",16)},o.prototype._boxProcessors.ssix=function(){this._procFullBox(),this._procField("subsegment_count","uint",32),this._procEntries("subsegments",this.subsegment_count,function(e){this._procEntryField(e,"ranges_count","uint",32),this._procSubEntries(e,"ranges",e.ranges_count,function(e){this._procEntryField(e,"level","uint",8),this._procEntryField(e,"range_size","uint",24)})})},o.prototype._boxProcessors.stsd=function(){this._procFullBox(),this._procField("entry_count","uint",32),this._procSubBoxes("entries",this.entry_count)},o.prototype._boxProcessors.subs=function(){this._procFullBox(),this._procField("entry_count","uint",32),this._procEntries("entries",this.entry_count,function(e){this._procEntryField(e,"sample_delta","uint",32),this._procEntryField(e,"subsample_count","uint",16),this._procSubEntries(e,"subsamples",e.subsample_count,function(e){this._procEntryField(e,"subsample_size","uint",1===this.version?32:16),this._procEntryField(e,"subsample_priority","uint",8),this._procEntryField(e,"discardable","uint",8),this._procEntryField(e,"codec_specific_parameters","uint",32)})})},o.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)},o.prototype._boxProcessors.tfdt=function(){this._procFullBox(),this._procField("baseMediaDecodeTime","uint",1==this.version?64:32)},o.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)},o.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(e){this._procEntryField(e,"time","uint",1===this.version?64:32),this._procEntryField(e,"moof_offset","uint",1===this.version?64:32),this._procEntryField(e,"traf_number","uint",8*(this.length_size_of_traf_num+1)),this._procEntryField(e,"trun_number","uint",8*(this.length_size_of_trun_num+1)),this._procEntryField(e,"sample_number","uint",8*(this.length_size_of_sample_num+1))})},o.prototype._boxProcessors.tkhd=function(){this._procFullBox(),this._procField("creation_time","uint",1==this.version?64:32),this._procField("modification_time","uint",1==this.version?64:32),this._procField("track_ID","uint",32),this._procField("reserved1","uint",32),this._procField("duration","uint",1==this.version?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)},o.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)},o.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(e){256&this.flags&&this._procEntryField(e,"sample_duration","uint",32),512&this.flags&&this._procEntryField(e,"sample_size","uint",32),1024&this.flags&&this._procEntryField(e,"sample_flags","uint",32),2048&this.flags&&this._procEntryField(e,"sample_composition_time_offset",1===this.version?"int":"uint",32)})},o.prototype._boxProcessors["url "]=o.prototype._boxProcessors["urn "]=function(){this._procFullBox(),"urn "===this.type&&this._procField("name","string",-1),this._procField("location","string",-1)},o.prototype._boxProcessors.vlab=function(){this._procField("source_label","utf8")},o.prototype._boxProcessors.vmhd=function(){this._procFullBox(),this._procField("graphicsmode","uint",16),this._procFieldArray("opcolor",3,"uint",16)},o.prototype._boxProcessors.vttC=function(){this._procField("config","utf8")},o.prototype._boxProcessors.vtte=function(){}},{}],10:[function(e,t,n){(function(e){function t(e){return Object.prototype.toString.call(e)}n.isArray=function(e){return Array.isArray?Array.isArray(e):"[object Array]"===t(e)},n.isBoolean=function(e){return"boolean"==typeof e},n.isNull=function(e){return null===e},n.isNullOrUndefined=function(e){return null==e},n.isNumber=function(e){return"number"==typeof e},n.isString=function(e){return"string"==typeof e},n.isSymbol=function(e){return"symbol"==typeof e},n.isUndefined=function(e){return void 0===e},n.isRegExp=function(e){return"[object RegExp]"===t(e)},n.isObject=function(e){return"object"==typeof e&&null!==e},n.isDate=function(e){return"[object Date]"===t(e)},n.isError=function(e){return"[object Error]"===t(e)||e instanceof Error},n.isFunction=function(e){return"function"==typeof e},n.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},n.isBuffer=e.isBuffer}).call(this,{isBuffer:e(22)})},{22:22}],11:[function(e,t,n){var u=Object.create||function(e){function t(){}return t.prototype=e,new t},o=Object.keys||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return n},a=Function.prototype.bind||function(e){var t=this;return function(){return t.apply(e,arguments)}};function r(){this._events&&Object.prototype.hasOwnProperty.call(this,"_events")||(this._events=u(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0}((t.exports=r).EventEmitter=r).prototype._events=void 0,r.prototype._maxListeners=void 0;var i,s=10;try{var l={};Object.defineProperty&&Object.defineProperty(l,"x",{value:0}),i=0===l.x}catch(e){i=!1}function f(e){return void 0===e._maxListeners?r.defaultMaxListeners:e._maxListeners}function d(e,t,n,r){var i,a,o;if("function"!=typeof n)throw new TypeError('"listener" argument must be a function');if((a=e._events)?(a.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),a=e._events),o=a[t]):(a=e._events=u(null),e._eventsCount=0),o){if("function"==typeof o?o=a[t]=r?[n,o]:[o,n]:r?o.unshift(n):o.push(n),!o.warned&&(i=f(e))&&0<i&&o.length>i){o.warned=!0;var s=new Error("Possible EventEmitter memory leak detected. "+o.length+' "'+String(t)+'" listeners added. Use emitter.setMaxListeners() to increase limit.');s.name="MaxListenersExceededWarning",s.emitter=e,s.type=t,s.count=o.length,"object"==typeof console&&console.warn&&console.warn("%s: %s",s.name,s.message)}}else o=a[t]=n,++e._eventsCount;return e}function c(){if(!this.fired)switch(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length){case 0:return this.listener.call(this.target);case 1:return this.listener.call(this.target,arguments[0]);case 2:return this.listener.call(this.target,arguments[0],arguments[1]);case 3:return this.listener.call(this.target,arguments[0],arguments[1],arguments[2]);default:for(var e=new Array(arguments.length),t=0;t<e.length;++t)e[t]=arguments[t];this.listener.apply(this.target,e)}}function h(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=a.call(c,r);return i.listener=n,r.wrapFn=i}function p(e,t,n){var r=e._events;if(!r)return[];var i=r[t];return i?"function"==typeof i?n?[i.listener||i]:[i]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(i):_(i,i.length):[]}function g(e){var t=this._events;if(t){var n=t[e];if("function"==typeof n)return 1;if(n)return n.length}return 0}function _(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}i?Object.defineProperty(r,"defaultMaxListeners",{enumerable:!0,get:function(){return s},set:function(e){if("number"!=typeof e||e<0||e!=e)throw new TypeError('"defaultMaxListeners" must be a positive number');s=e}}):r.defaultMaxListeners=s,r.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||isNaN(e))throw new TypeError('"n" argument must be a positive number');return this._maxListeners=e,this},r.prototype.getMaxListeners=function(){return f(this)},r.prototype.emit=function(e,t,n,r){var i,a,o,s,u,l,f="error"===e;if(l=this._events)f=f&&null==l.error;else if(!f)return!1;if(f){if(1<arguments.length&&(i=t),i instanceof Error)throw i;var d=new Error('Unhandled "error" event. ('+i+")");throw d.context=i,d}if(!(a=l[e]))return!1;var c="function"==typeof a;switch(o=arguments.length){case 1:!function(e,t,n){if(t)e.call(n);else for(var r=e.length,i=_(e,r),a=0;a<r;++a)i[a].call(n)}(a,c,this);break;case 2:!function(e,t,n,r){if(t)e.call(n,r);else for(var i=e.length,a=_(e,i),o=0;o<i;++o)a[o].call(n,r)}(a,c,this,t);break;case 3:!function(e,t,n,r,i){if(t)e.call(n,r,i);else for(var a=e.length,o=_(e,a),s=0;s<a;++s)o[s].call(n,r,i)}(a,c,this,t,n);break;case 4:!function(e,t,n,r,i,a){if(t)e.call(n,r,i,a);else for(var o=e.length,s=_(e,o),u=0;u<o;++u)s[u].call(n,r,i,a)}(a,c,this,t,n,r);break;default:for(s=new Array(o-1),u=1;u<o;u++)s[u-1]=arguments[u];!function(e,t,n,r){if(t)e.apply(n,r);else for(var i=e.length,a=_(e,i),o=0;o<i;++o)a[o].apply(n,r)}(a,c,this,s)}return!0},r.prototype.on=r.prototype.addListener=function(e,t){return d(this,e,t,!1)},r.prototype.prependListener=function(e,t){return d(this,e,t,!0)},r.prototype.once=function(e,t){if("function"!=typeof t)throw new TypeError('"listener" argument must be a function');return this.on(e,h(this,e,t)),this},r.prototype.prependOnceListener=function(e,t){if("function"!=typeof t)throw new TypeError('"listener" argument must be a function');return this.prependListener(e,h(this,e,t)),this},r.prototype.removeListener=function(e,t){var n,r,i,a,o;if("function"!=typeof t)throw new TypeError('"listener" argument must be a function');if(!(r=this._events))return this;if(!(n=r[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=u(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(i=-1,a=n.length-1;0<=a;a--)if(n[a]===t||n[a].listener===t){o=n[a].listener,i=a;break}if(i<0)return this;0===i?n.shift():function(e,t){for(var n=t,r=n+1,i=e.length;r<i;n+=1,r+=1)e[n]=e[r];e.pop()}(n,i),1===n.length&&(r[e]=n[0]),r.removeListener&&this.emit("removeListener",e,o||t)}return this},r.prototype.removeAllListeners=function(e){var t,n,r;if(!(n=this._events))return this;if(!n.removeListener)return 0===arguments.length?(this._events=u(null),this._eventsCount=0):n[e]&&(0==--this._eventsCount?this._events=u(null):delete n[e]),this;if(0===arguments.length){var i,a=o(n);for(r=0;r<a.length;++r)"removeListener"!==(i=a[r])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=u(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(t)for(r=t.length-1;0<=r;r--)this.removeListener(e,t[r]);return this},r.prototype.listeners=function(e){return p(this,e,!0)},r.prototype.rawListeners=function(e){return p(this,e,!1)},r.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):g.call(e,t)},r.prototype.listenerCount=g,r.prototype.eventNames=function(){return 0<this._eventsCount?Reflect.ownKeys(this._events):[]}},{}],12:[function(e,t,n){"use strict";var h=Array.isArray,p=Object.keys,g=Object.prototype.hasOwnProperty;t.exports=function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){var r,i,a,o=h(t),s=h(n);if(o&&s){if((i=t.length)!=n.length)return!1;for(r=i;0!=r--;)if(!e(t[r],n[r]))return!1;return!0}if(o!=s)return!1;var u=t instanceof Date,l=n instanceof Date;if(u!=l)return!1;if(u&&l)return t.getTime()==n.getTime();var f=t instanceof RegExp,d=n instanceof RegExp;if(f!=d)return!1;if(f&&d)return t.toString()==n.toString();var c=p(t);if((i=c.length)!==p(n).length)return!1;for(r=i;0!=r--;)if(!g.call(n,c[r]))return!1;for(r=i;0!=r--;)if(!e(t[a=c[r]],n[a]))return!1;return!0}return t!=t&&n!=n}},{}],13:[function(e,t,n){n.read=function(e,t,n,r,i){var a,o,s=8*i-r-1,u=(1<<s)-1,l=u>>1,f=-7,d=n?i-1:0,c=n?-1:1,h=e[t+d];for(d+=c,a=h&(1<<-f)-1,h>>=-f,f+=s;0<f;a=256*a+e[t+d],d+=c,f-=8);for(o=a&(1<<-f)-1,a>>=-f,f+=r;0<f;o=256*o+e[t+d],d+=c,f-=8);if(0===a)a=1-l;else{if(a===u)return o?NaN:1/0*(h?-1:1);o+=Math.pow(2,r),a-=l}return(h?-1:1)*o*Math.pow(2,a-r)},n.write=function(e,t,n,r,i,a){var o,s,u,l=8*a-i-1,f=(1<<l)-1,d=f>>1,c=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,h=r?0:a-1,p=r?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=f):(o=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-o))<1&&(o--,u*=2),2<=(t+=1<=o+d?c/u:c*Math.pow(2,1-d))*u&&(o++,u/=2),f<=o+d?(s=0,o=f):1<=o+d?(s=(t*u-1)*Math.pow(2,i),o+=d):(s=t*Math.pow(2,d-1)*Math.pow(2,i),o=0));8<=i;e[n+h]=255&s,h+=p,s/=256,i-=8);for(o=o<<i|s,l+=i;0<l;e[n+h]=255&o,h+=p,o/=256,l-=8);e[n+h-p]|=128*g}},{}],14:[function(e,t,n){function f(e,t,n,r){var i=r&&"seq"===r.timeContainer,a=0;r&&(a=i&&n?n.end:r.begin),t.begin=t.explicit_begin?t.explicit_begin+a:a;var o=t.begin,s=null;for(var u in t.sets)f(e,t.sets[u],s,t),o="seq"===t.timeContainer?t.sets[u].end:Math.max(o,t.sets[u].end),s=t.sets[u];if("contents"in t)for(var l in t.contents)f(e,t.contents[l],s,t),o="seq"===t.timeContainer?t.contents[l].end:Math.max(o,t.contents[l].end),s=t.contents[l];else o=i?t.begin:Number.POSITIVE_INFINITY;null!==t.explicit_end&&null!==t.explicit_dur?t.end=Math.min(t.begin+t.explicit_dur,a+t.explicit_end):null===t.explicit_end&&null!==t.explicit_dur?t.end=t.begin+t.explicit_dur:null!==t.explicit_end&&null===t.explicit_dur?t.end=a+t.explicit_end:t.end=o,delete t.explicit_begin,delete t.explicit_dur,delete t.explicit_end,e._registerEvent(t)}function y(e){this.node=e}function T(){this.events=[],this.head=null,this.body=null}function S(){this.styling=null,this.layout=null}function A(){this.styles={}}function I(){this.id=null,this.styleAttrs=null,this.styleRefs=null}function R(){this.regions={}}function r(e){this.kind=e}function i(e){this.id=e}function a(e){this.regionID=e}function o(e){this.styleAttrs=e}function s(e){this.sets=e}function u(e){this.contents=e}function l(e,t,n){this.explicit_begin=e,this.explicit_end=t,this.explicit_dur=n}function b(){r.call(this,"body")}function D(){r.call(this,"div")}function M(){r.call(this,"p")}function C(){r.call(this,"span")}function d(){r.call(this,"span")}function w(){r.call(this,"br")}function N(){}function O(){}function c(e){return e&&"xml:id"in e.attributes&&e.attributes["xml:id"].value||null}function h(e){return e&&"style"in e.attributes?e.attributes.style.value.split(" "):[]}function p(e,t){var n={};if(null!==e)for(var r in e.attributes){var i=e.attributes[r].uri+" "+e.attributes[r].local,a=G.byQName[i];if(void 0!==a){var o=a.parse(e.attributes[r].value);null!==o?(n[i]=o,a===G.byName.zIndex&&m(t,"zIndex attribute present but not used by IMSC1 since regions do not overlap")):x(t,"Cannot parse styling attribute "+i+" --\x3e "+e.attributes[r].value)}}return n}function g(e,t,n){for(var r in e.attributes)if(e.attributes[r].uri===t&&e.attributes[r].local===n)return e.attributes[r].value;return null}function _(e,t,n){var r,i=null;return null!==(r=/^(\d+(?:\.\d+)?)f$/.exec(n))?null!==t&&(i=parseFloat(r[1])/t):null!==(r=/^(\d+(?:\.\d+)?)t$/.exec(n))?null!==e&&(i=parseFloat(r[1])/e):null!==(r=/^(\d+(?:\.\d+)?)ms$/.exec(n))?i=parseFloat(r[1])/1e3:null!==(r=/^(\d+(?:\.\d+)?)s$/.exec(n))?i=parseFloat(r[1]):null!==(r=/^(\d+(?:\.\d+)?)h$/.exec(n))?i=3600*parseFloat(r[1]):null!==(r=/^(\d+(?:\.\d+)?)m$/.exec(n))?i=60*parseFloat(r[1]):null!==(r=/^(\d{2,}):(\d\d):(\d\d(?:\.\d+)?)$/.exec(n))?i=3600*parseInt(r[1])+60*parseInt(r[2])+parseFloat(r[3]):null!==(r=/^(\d{2,}):(\d\d):(\d\d)\:(\d{2,})$/.exec(n))&&null!==t&&(i=3600*parseInt(r[1])+60*parseInt(r[2])+parseInt(r[3])+(null===r[4]?0:parseInt(r[4])/t)),i}function P(e,t,n){for(;0<t.styleRefs.length;){var r=t.styleRefs.pop();r in e.styles?(P(e,e.styles[r],n),L(e.styles[r].styleAttrs,t.styleAttrs)):x(n,"Non-existant style id referenced")}}function E(e,t,n,r){for(var i=t.length-1;0<=i;i--){var a=t[i];a in e.styles?L(e.styles[a].styleAttrs,n):x(r,"Non-existant style id referenced")}}function L(e,t){for(var n in e)n in t||(t[n]=e[n])}function m(e,t){if(e&&e.warn&&e.warn(t))throw t}function x(e,t){if(e&&e.error&&e.error(t))throw t}function F(e,t){throw e&&e.fatal&&e.fatal(t),t}function v(e,t){for(var n,r=0,i=e.length-1;r<=i;){var a=e[n=Math.floor((r+i)/2)];if(a<t)r=n+1;else{if(!(t<a))return{found:!0,index:n};i=n-1}}return{found:!1,index:r}}var U,k,B,G,j;U=void 0===n?this.imscDoc={}:n,k="undefined"==typeof sax?e(40):sax,B="undefined"==typeof imscNames?e(18):imscNames,G="undefined"==typeof imscStyles?e(19):imscStyles,j="undefined"==typeof imscUtils?e(20):imscUtils,U.fromXML=function(e,h,p){var t=k.parser(!0,{xmlns:!0}),g=[],_=[],E=[],m=0,v=null;t.onclosetag=function(e){if(g[0]instanceof A)for(var t in g[0].styles)P(g[0],g[0].styles[t],h);else if(g[0]instanceof M||g[0]instanceof C){if(1<g[0].contents.length){var n,r=[g[0].contents[0]];for(n=1;n<g[0].contents.length;n++)g[0].contents[n]instanceof d&&r[r.length-1]instanceof d?r[r.length-1].text+=g[0].contents[n].text:r.push(g[0].contents[n]);g[0].contents=r}g[0]instanceof C&&1===g[0].contents.length&&g[0].contents[0]instanceof d&&(g[0].text=g[0].contents[0].text,delete g[0].contents)}else g[0]instanceof y&&(g[0].node.uri===B.ns_tt&&"metadata"===g[0].node.local?m--:0<m&&p&&"onCloseTag"in p&&p.onCloseTag());E.shift(),_.shift(),g.shift()},t.ontext=function(e){if(void 0!==g[0])if(g[0]instanceof C||g[0]instanceof M){var t=new d;t.initFromText(v,g[0],e,E[0],h),g[0].contents.push(t)}else g[0]instanceof y&&0<m&&p&&"onText"in p&&p.onText(e)},t.onopentag=function(e){var t=e.attributes["xml:space"];t?E.unshift(t.value):0===E.length?E.unshift("default"):E.unshift(E[0]);var n=e.attributes["xml:lang"];if(n?_.unshift(n.value):0===_.length?_.unshift(""):_.unshift(_[0]),e.uri===B.ns_tt)if("tt"===e.local)null!==v&&F(h,"Two <tt> elements at ("+this.line+","+this.column+")"),(v=new T).initFromNode(e,h),g.unshift(v);else if("head"===e.local)g[0]instanceof T||F(h,"Parent of <head> element is not <tt> at ("+this.line+","+this.column+")"),null!==v.head&&F("Second <head> element at ("+this.line+","+this.column+")"),v.head=new S,g.unshift(v.head);else if("styling"===e.local)g[0]instanceof S||F(h,"Parent of <styling> element is not <head> at ("+this.line+","+this.column+")"),null!==v.head.styling&&F("Second <styling> element at ("+this.line+","+this.column+")"),v.head.styling=new A,g.unshift(v.head.styling);else if("style"===e.local){var r;g[0]instanceof A?((r=new I).initFromNode(e,h),r.id?v.head.styling.styles[r.id]=r:x(h,"<style> element missing @id attribute"),g.unshift(r)):g[0]instanceof N?((r=new I).initFromNode(e,h),L(r.styleAttrs,g[0].styleAttrs),g.unshift(r)):F(h,"Parent of <style> element is not <styling> or <region> at ("+this.line+","+this.column+")")}else if("layout"===e.local)g[0]instanceof S||F(h,"Parent of <layout> element is not <head> at "+this.line+","+this.column+")"),null!==v.head.layout&&F(h,"Second <layout> element at "+this.line+","+this.column+")"),v.head.layout=new R,g.unshift(v.head.layout);else if("region"===e.local){g[0]instanceof R||F(h,"Parent of <region> element is not <layout> at "+this.line+","+this.column+")");var i=new N;i.initFromNode(v,e,h),!i.id||i.id in v.head.layout.regions?x(h,"Ignoring <region> with duplicate or missing @id at "+this.line+","+this.column+")"):v.head.layout.regions[i.id]=i,g.unshift(i)}else if("body"===e.local){g[0]instanceof T||F(h,"Parent of <body> element is not <tt> at "+this.line+","+this.column+")"),null!==v.body&&F(h,"Second <body> element at "+this.line+","+this.column+")");var a=new b;a.initFromNode(v,e,h),v.body=a,g.unshift(a)}else if("div"===e.local){g[0]instanceof D||g[0]instanceof b||F(h,"Parent of <div> element is not <body> or <div> at "+this.line+","+this.column+")");var o=new D;o.initFromNode(v,g[0],e,h),g[0].contents.push(o),g.unshift(o)}else if("p"===e.local){g[0]instanceof D||F(h,"Parent of <p> element is not <div> at "+this.line+","+this.column+")");var s=new M;s.initFromNode(v,g[0],e,h),g[0].contents.push(s),g.unshift(s)}else if("span"===e.local){g[0]instanceof C||g[0]instanceof M||F(h,"Parent of <span> element is not <span> or <p> at "+this.line+","+this.column+")");var u=new C;u.initFromNode(v,g[0],e,E[0],h),g[0].contents.push(u),g.unshift(u)}else if("br"===e.local){g[0]instanceof C||g[0]instanceof M||F(h,"Parent of <br> element is not <span> or <p> at "+this.line+","+this.column+")");var l=new w;l.initFromNode(v,g[0],e,h),g[0].contents.push(l),g.unshift(l)}else if("set"===e.local){g[0]instanceof C||g[0]instanceof M||g[0]instanceof D||g[0]instanceof b||g[0]instanceof N||g[0]instanceof w||F(h,"Parent of <set> element is not a content element or a region at "+this.line+","+this.column+")");var f=new O;f.initFromNode(v,g[0],e,h),g[0].sets.push(f),g.unshift(f)}else g.unshift(new y(e));else g.unshift(new y(e));if(g[0]instanceof y)if(e.uri===B.ns_tt&&"metadata"===e.local)m++;else if(0<m&&p&&"onOpenTag"in p){var d=[];for(var c in e.attributes)d[e.attributes[c].uri+" "+e.attributes[c].local]={uri:e.attributes[c].uri,local:e.attributes[c].local,value:e.attributes[c].value};p.onOpenTag(e.uri,e.local,d)}},t.write(e).close(),null!==v.head?delete v.head.styling:v.head=new S,null===v.head.layout&&(v.head.layout=new R);var n=!1;for(var r in v.head.layout.regions){n=!0;break}if(!n){var i=N.prototype.createDefaultRegion();v.head.layout.regions[i.id]=i}for(var a in v.head.layout.regions)f(v,v.head.layout.regions[a],null,null);return v.body&&f(v,v.body,null,null),v},T.prototype.initFromNode=function(e,t){this.cellResolution=function(e,t){var n=g(e,B.ns_ttp,"cellResolution"),r=15,i=32;if(null!==n){var a=/(\d+) (\d+)/.exec(n);null!==a?(i=parseInt(a[1]),r=parseInt(a[2])):m(t,"Malformed cellResolution value (using initial value instead)")}return{w:i,h:r}}(e,t);var n=function(e,t){var n,r=g(e,B.ns_ttp,"frameRate"),i=30;if(null!==r){null!==(n=/(\d+)/.exec(r))?i=parseInt(n[1]):m(t,"Malformed frame rate attribute (using initial value instead)")}var a=g(e,B.ns_ttp,"frameRateMultiplier"),o=1;if(null!==a){null!==(n=/(\d+) (\d+)/.exec(a))?o=parseInt(n[1])/parseInt(n[2]):m(t,"Malformed frame rate multiplier attribute (using initial value instead)")}var s=o*i,u=1,l=g(e,B.ns_ttp,"tickRate");if(null===l)null!==r&&(u=s);else{null!==(n=/(\d+)/.exec(l))?u=parseInt(n[1]):m(t,"Malformed tick rate attribute (using initial value instead)")}return{effectiveFrameRate:s,tickRate:u}}(e,t);this.effectiveFrameRate=n.effectiveFrameRate,this.tickRate=n.tickRate,this.aspectRatio=function(e,t){var n=g(e,B.ns_ittp,"aspectRatio"),r=null;if(null!==n){var i=/(\d+) (\d+)/.exec(n);if(null!==i){var a=parseInt(i[1]),o=parseInt(i[2]);0!==a&&0!==o?r=a/o:x(t,"Illegal aspectRatio values (ignoring)")}else x(t,"Malformed aspectRatio attribute (ignoring)")}return r}(e,t);var r=g(e,B.ns_ttp,"timeBase");null!==r&&"media"!==r&&F(t,"Unsupported time base");var i=function(e,t){var n=g(e,B.ns_tts,"extent");if(null===n)return null;var r=n.split(" ");if(2!==r.length)return m(t,"Malformed extent (ignoring)"),null;var i=j.parseLength(r[0]),a=j.parseLength(r[1]);return a&&i?{h:a,w:i}:(m(t,"Malformed extent values (ignoring)"),null)}(e,t);null===i?this.pxDimensions={h:480,w:640}:("px"===i.h.unit&&"px"===i.w.unit||F(t,"Extent on TT must be in px or absent"),this.pxDimensions={h:i.h.value,w:i.w.value})},T.prototype._registerEvent=function(e){if(!(e.end<=e.begin)){var t=v(this.events,e.begin);if(t.found||this.events.splice(t.index,0,e.begin),e.end!==Number.POSITIVE_INFINITY){var n=v(this.events,e.end);n.found||this.events.splice(n.index,0,e.end)}}},T.prototype.getMediaTimeRange=function(){return[this.events[0],this.events[this.events.length-1]]},T.prototype.getMediaTimeEvents=function(){return this.events},I.prototype.initFromNode=function(e,t){this.id=c(e),this.styleAttrs=p(e,t),this.styleRefs=h(e)},i.prototype.initFromNode=function(e,t,n,r){this.id=c(n)},a.prototype.initFromNode=function(e,t,n,r){var i;this.regionID=(i=n)&&"region"in i.attributes?i.attributes.region.value:""},o.prototype.initFromNode=function(e,t,n,r){this.styleAttrs=p(n,r),null!==e.head&&null!==e.head.styling&&E(e.head.styling,h(n),this.styleAttrs,r)},s.prototype.initFromNode=function(e,t,n,r){this.sets=[]},u.prototype.initFromNode=function(e,t,n,r){this.contents=[]},l.prototype.initFromNode=function(e,t,n,r){var i,a,o,s=function(e,t,n){var r=null;t&&"begin"in t.attributes&&null===(r=_(e.tickRate,e.effectiveFrameRate,t.attributes.begin.value))&&m(n,"Malformed begin value "+t.attributes.begin.value+" (using 0)");var i=null;t&&"dur"in t.attributes&&null===(i=_(e.tickRate,e.effectiveFrameRate,t.attributes.dur.value))&&m(n,"Malformed dur value "+t.attributes.dur.value+" (ignoring)");var a=null;t&&"end"in t.attributes&&null===(a=_(e.tickRate,e.effectiveFrameRate,t.attributes.end.value))&&m(n,"Malformed end value (ignoring)");return{explicit_begin:r,explicit_end:a,explicit_dur:i}}(e,n,r);this.explicit_begin=s.explicit_begin,this.explicit_end=s.explicit_end,this.explicit_dur=s.explicit_dur,this.timeContainer=(a=r,(o=(i=n)&&"timeContainer"in i.attributes?i.attributes.timeContainer.value:null)&&"par"!==o?"seq"===o?"seq":(x(a,"Illegal value of timeContainer (assuming 'par')"),"par"):"par")},b.prototype.initFromNode=function(e,t,n){o.prototype.initFromNode.call(this,e,null,t,n),l.prototype.initFromNode.call(this,e,null,t,n),s.prototype.initFromNode.call(this,e,null,t,n),a.prototype.initFromNode.call(this,e,null,t,n),u.prototype.initFromNode.call(this,e,null,t,n)},D.prototype.initFromNode=function(e,t,n,r){o.prototype.initFromNode.call(this,e,t,n,r),l.prototype.initFromNode.call(this,e,t,n,r),s.prototype.initFromNode.call(this,e,t,n,r),a.prototype.initFromNode.call(this,e,t,n,r),u.prototype.initFromNode.call(this,e,t,n,r)},M.prototype.initFromNode=function(e,t,n,r){o.prototype.initFromNode.call(this,e,t,n,r),l.prototype.initFromNode.call(this,e,t,n,r),s.prototype.initFromNode.call(this,e,t,n,r),a.prototype.initFromNode.call(this,e,t,n,r),u.prototype.initFromNode.call(this,e,t,n,r)},C.prototype.initFromNode=function(e,t,n,r,i){o.prototype.initFromNode.call(this,e,t,n,i),l.prototype.initFromNode.call(this,e,t,n,i),s.prototype.initFromNode.call(this,e,t,n,i),a.prototype.initFromNode.call(this,e,t,n,i),u.prototype.initFromNode.call(this,e,t,n,i),this.space=r},d.prototype.initFromText=function(e,t,n,r,i){l.prototype.initFromNode.call(this,e,t,null,i),this.text=n,this.space=r},w.prototype.initFromNode=function(e,t,n,r){a.prototype.initFromNode.call(this,e,t,n,r),l.prototype.initFromNode.call(this,e,t,n,r)},N.prototype.createDefaultRegion=function(){var e=new N;return i.call(e,""),o.call(e,{}),s.call(e,[]),l.call(e,0,Number.POSITIVE_INFINITY,null),e},N.prototype.initFromNode=function(e,t,n){i.prototype.initFromNode.call(this,e,null,t,n),o.prototype.initFromNode.call(this,e,null,t,n),l.prototype.initFromNode.call(this,e,null,t,n),s.prototype.initFromNode.call(this,e,null,t,n),null!==e.head&&null!==e.head.styling&&E(e.head.styling,h(t),this.styleAttrs,n)},O.prototype.initFromNode=function(e,t,n,r){l.prototype.initFromNode.call(this,e,t,n,r);var i=p(n,r);for(var a in this.qname=null,this.value=null,i){if(this.qname){x(r,"More than one style specified on set");break}this.qname=a,this.value=i[a]}}},{18:18,19:19,20:20,40:40}],15:[function(e,t,n){!function(e,A){function I(e,t,n){var r;if("region"===n.kind?(r=document.createElement("div")).style.position="absolute":"body"===n.kind||"div"===n.kind?r=document.createElement("div"):"p"===n.kind?r=document.createElement("p"):"span"===n.kind?r=document.createElement("span"):"br"===n.kind&&(r=document.createElement("br")),r){for(var i in r.style.margin="0",M){var a=M[i],o=n.styleAttrs[a.qname];void 0!==o&&null!==a.map&&a.map(e,r,n,o)}var s=r;if("region"===n.kind){var u=n.styleAttrs[A.byName.writingMode.qname];"lrtb"===u||"lr"===u?(e.ipd="lr",e.bpd="tb"):"rltb"===u||"rl"===u?(e.ipd="rl",e.bpd="tb"):"tblr"===u?(e.ipd="tb",e.bpd="lr"):"tbrl"!==u&&"tb"!==u||(e.ipd="tb",e.bpd="rl")}var l=n.styleAttrs[A.byName.linePadding.qname];if(l&&0<l){var f=Math.ceil(l*e.h)+"px";"tb"===e.bpd?(s.style.paddingLeft=f,s.style.paddingRight=f):(s.style.paddingTop=f,s.style.paddingBottom=f),e.lp=l}var d=n.styleAttrs[A.byName.multiRowAlign.qname];if(d&&"auto"!==d){var c=document.createElement("span");c.style.display="inline-block",c.style.textAlign=d,r.appendChild(c),s=c,e.mra=d}if(n.styleAttrs[A.byName.fillLineGap.qname]&&(e.flg=!0),"span"===n.kind&&n.text)if(e.lp||e.mra||e.flg)for(var h="",p=0;p<n.text.length;p++){h+=n.text.charAt(p);var g=n.text.charCodeAt(p);if(g<55296||56319<g||p===n.text.length){var _=document.createElement("span");_.textContent=h,r.appendChild(_),h=""}}else r.textContent=n.text;for(var E in t.appendChild(r),n.contents)I(e,s,n.contents[E]);var m=[];if((e.lp||e.mra||e.flg)&&"p"===n.kind&&(D(e,s,m,null),e.mra&&(function(e){for(var t=0;t<e.length-1;t++){var n=e[t].elements.length;if(0!==n&&!1===e[t].br){var r=document.createElement("br"),i=e[t].elements[n-1].node;i.parentElement.insertBefore(r,i.nextSibling)}}}(m),e.mra=null),e.lp&&(function(e,t,n){for(var r in e){var i=e[r].elements.length,a=e[r].elements[e[r].start_elem],o=e[r].elements[e[r].end_elem],s=Math.ceil(t)+"px",u="-"+Math.ceil(t)+"px";0!==i&&("lr"===n.ipd?(a.node.style.borderLeftColor=a.bgcolor||"#00000000",a.node.style.borderLeftStyle="solid",a.node.style.borderLeftWidth=s,a.node.style.marginLeft=u):"rl"===n.ipd?(a.node.style.borderRightColor=a.bgcolor||"#00000000",a.node.style.borderRightStyle="solid",a.node.style.borderRightWidth=s,a.node.style.marginRight=u):"tb"===n.ipd&&(a.node.style.borderTopColor=a.bgcolor||"#00000000",a.node.style.borderTopStyle="solid",a.node.style.borderTopWidth=s,a.node.style.marginTop=u),"lr"===n.ipd?(o.node.style.borderRightColor=o.bgcolor||"#00000000",o.node.style.borderRightStyle="solid",o.node.style.borderRightWidth=s,o.node.style.marginRight=u):"rl"===n.ipd?(o.node.style.borderLeftColor=o.bgcolor||"#00000000",o.node.style.borderLeftStyle="solid",o.node.style.borderLeftWidth=s,o.node.style.marginLeft=u):"tb"===n.ipd&&(o.node.style.borderBottomColor=o.bgcolor||"#00000000",o.node.style.borderBottomStyle="solid",o.node.style.borderBottomWidth=s,o.node.style.marginBottom=u))}}(m,e.lp*e.h,e),e.lp=null),e.flg)){var v=b(s.getBoundingClientRect(),e);!function(e,t,n,r){for(var i=Math.sign(n-t),a=0;a<=e.length;a++){var o,s,u;if(o=0===a?t:a===e.length?n:(e[a].before+e[a-1].after)/2,0<a)for(var l=0;l<e[a-1].elements.length;l++)null!==e[a-1].elements[l].bgcolor&&(u=e[a-1].elements[l],i*(u.after-o)<0&&(s=Math.ceil(Math.abs(o-u.after))+"px",u.node.style.backgroundColor=u.bgcolor,"lr"===r.bpd?u.node.style.paddingRight=s:"rl"===r.bpd?u.node.style.paddingLeft=s:"tb"===r.bpd&&(u.node.style.paddingBottom=s)));if(a<e.length)for(var f=0;f<e[a].elements.length;f++)null!==(u=e[a].elements[f]).bgcolor&&0<i*(u.before-o)&&(s=Math.ceil(Math.abs(u.before-o))+"px",u.node.style.backgroundColor=u.bgcolor,"lr"===r.bpd?u.node.style.paddingLeft=s:"rl"===r.bpd?u.node.style.paddingRight=s:"tb"===r.bpd&&(u.node.style.paddingTop=s))}}(m,v.before,v.after,e),e.flg=null}if("region"===n.kind&&(D(e,s,m),"tb"===e.bpd&&e.enableRollUp&&0<n.contents.length&&"after"===n.styleAttrs[A.byName.displayAlign.qname])){var y=new R(""===n.id?"_":n.id,m);if(e.currentISDState[y.id]=y,e.previousISDState&&y.id in e.previousISDState&&0<e.previousISDState[y.id].plist.length&&1<y.plist.length&&y.plist[y.plist.length-2].text===e.previousISDState[y.id].plist[e.previousISDState[y.id].plist.length-1].text){var T=r.firstElementChild,S=y.plist[y.plist.length-1].after-y.plist[y.plist.length-1].before;T.style.bottom="-"+S+"px",T.style.transition="transform 0.4s",T.style.position="relative",T.style.transform="translateY(-"+S+"px)"}}}else!function(e,t){if(e&&e.error&&e.error(t))throw t}(e.errorHandler,"Error processing ISD element kind: "+n.kind)}function R(e,t){this.id=e,this.plist=t}function b(e,t){var n={before:null,after:null,start:null,end:null};return"tb"===t.bpd?(n.before=e.top,n.after=e.bottom,"lr"===t.ipd?(n.start=e.left,n.end=e.right):(n.start=e.right,n.end=e.left)):"lr"===t.bpd?(n.before=e.left,n.after=e.right,n.start=e.top,n.end=e.bottom):"rl"===t.bpd&&(n.before=e.right,n.after=e.left,n.start=e.top,n.end=e.bottom),n}function D(e,t,n,r){var i,a,o,s,u=t.style.backgroundColor||r;if(0===t.childElementCount)if("span"===t.localName){var l=t.getBoundingClientRect();if(0===l.height||0===l.width)return;var f=b(l,e);if(0!==n.length&&(i=f.before,a=f.after,o=n[n.length-1].before,s=n[n.length-1].after,a<s&&o<i||s<=a&&i<=o)){var d=Math.sign(f.after-f.before),c=Math.sign(f.end-f.start);d*(f.before-n[n.length-1].before)<0&&(n[n.length-1].before=f.before),0<d*(f.after-n[n.length-1].after)&&(n[n.length-1].after=f.after),c*(f.start-n[n.length-1].start)<0&&(n[n.length-1].start=f.start,n[n.length-1].start_elem=n[n.length-1].elements.length),0<c*(f.end-n[n.length-1].end)&&(n[n.length-1].end=f.end,n[n.length-1].end_elem=n[n.length-1].elements.length)}else n.push({before:f.before,after:f.after,start:f.start,end:f.end,start_elem:0,end_elem:0,elements:[],text:"",br:!1});n[n.length-1].text+=t.textContent,n[n.length-1].elements.push({node:t,bgcolor:u,before:f.before,after:f.after})}else"br"===t.localName&&0!==n.length&&(n[n.length-1].br=!0);else for(var h=t.firstChild;h;)h.nodeType===Node.ELEMENT_NODE&&D(e,h,n,u),h=h.nextSibling}function t(e,t){this.qname=e,this.map=t}e.render=function(e,t,n,r,i,a,o,s,u){var l=r||t.clientHeight,f=i||t.clientWidth;if(null!==e.aspectRatio){var d=l*e.aspectRatio;f<d?l=Math.round(f/e.aspectRatio):f=d}var c=document.createElement("div");c.style.position="relative",c.style.width=f+"px",c.style.height=l+"px",c.style.margin="auto",c.style.top=0,c.style.bottom=0,c.style.left=0,c.style.right=0,c.style.zIndex=0;var h={h:l,w:f,regionH:null,regionW:null,imgResolver:n,displayForcedOnlyMode:a||!1,isd:e,errorHandler:o,previousISDState:s,enableRollUp:u||!1,currentISDState:{},flg:null,lp:null,mra:null,ipd:null,bpd:null};for(var p in t.appendChild(c),e.contents)I(h,c,e.contents[p]);return h.currentISDState};var M=[new t("http://www.w3.org/ns/ttml#styling backgroundColor",function(e,t,n,r){0!==r[3]&&(t.style.backgroundColor="rgba("+r[0].toString()+","+r[1].toString()+","+r[2].toString()+","+(r[3]/255).toString()+")")}),new t("http://www.w3.org/ns/ttml#styling color",function(e,t,n,r){t.style.color="rgba("+r[0].toString()+","+r[1].toString()+","+r[2].toString()+","+(r[3]/255).toString()+")"}),new t("http://www.w3.org/ns/ttml#styling direction",function(e,t,n,r){t.style.direction=r}),new t("http://www.w3.org/ns/ttml#styling display",function(e,t,n,r){}),new t("http://www.w3.org/ns/ttml#styling displayAlign",function(e,t,n,r){t.style.display="flex",t.style.flexDirection="column","before"===r?t.style.justifyContent="flex-start":"center"===r?t.style.justifyContent="center":"after"===r&&(t.style.justifyContent="flex-end")}),new t("http://www.w3.org/ns/ttml#styling extent",function(e,t,n,r){e.regionH=r.h*e.h,e.regionW=r.w*e.w;var i=0,a=0,o=n.styleAttrs["http://www.w3.org/ns/ttml#styling padding"];o&&(i=(o[0]+o[2])*e.h,a=(o[1]+o[3])*e.w),t.style.height=e.regionH-i+"px",t.style.width=e.regionW-a+"px"}),new t("http://www.w3.org/ns/ttml#styling fontFamily",function(e,t,n,r){var i=[];for(var a in r)"monospaceSerif"===r[a]?(i.push("Courier New"),i.push('"Liberation Mono"'),i.push("Courier"),i.push("monospace")):"proportionalSansSerif"===r[a]?(i.push("Arial"),i.push("Helvetica"),i.push('"Liberation Sans"'),i.push("sans-serif")):"monospace"===r[a]?i.push("monospace"):"sansSerif"===r[a]?i.push("sans-serif"):"serif"===r[a]?i.push("serif"):"monospaceSansSerif"===r[a]?(i.push("Consolas"),i.push("monospace")):"proportionalSerif"===r[a]?i.push("serif"):i.push(r[a]);t.style.fontFamily=i.join(",")}),new t("http://www.w3.org/ns/ttml#styling fontSize",function(e,t,n,r){t.style.fontSize=r*e.h+"px"}),new t("http://www.w3.org/ns/ttml#styling fontStyle",function(e,t,n,r){t.style.fontStyle=r}),new t("http://www.w3.org/ns/ttml#styling fontWeight",function(e,t,n,r){t.style.fontWeight=r}),new t("http://www.w3.org/ns/ttml#styling lineHeight",function(e,t,n,r){t.style.lineHeight="normal"===r?"normal":r*e.h+"px"}),new t("http://www.w3.org/ns/ttml#styling opacity",function(e,t,n,r){t.style.opacity=r}),new t("http://www.w3.org/ns/ttml#styling origin",function(e,t,n,r){t.style.top=r.h*e.h+"px",t.style.left=r.w*e.w+"px"}),new t("http://www.w3.org/ns/ttml#styling overflow",function(e,t,n,r){t.style.overflow=r}),new t("http://www.w3.org/ns/ttml#styling padding",function(e,t,n,r){var i=[];i[0]=r[0]*e.h+"px",i[1]=r[3]*e.w+"px",i[2]=r[2]*e.h+"px",i[3]=r[1]*e.w+"px",t.style.padding=i.join(" ")}),new t("http://www.w3.org/ns/ttml#styling showBackground",null),new t("http://www.w3.org/ns/ttml#styling textAlign",function(e,t,n,r){var i,a=n.styleAttrs[A.byName.direction.qname];i="start"===r?"rtl"===a?"right":"left":"end"===r?"rtl"===a?"left":"right":r,t.style.textAlign=i}),new t("http://www.w3.org/ns/ttml#styling textDecoration",function(e,t,n,r){t.style.textDecoration=r.join(" ").replace("lineThrough","line-through")}),new t("http://www.w3.org/ns/ttml#styling textOutline",function(e,t,n,r){t.style.textShadow="none"===r?"":"rgba("+r.color[0].toString()+","+r.color[1].toString()+","+r.color[2].toString()+","+(r.color[3]/255).toString()+") 0px 0px "+r.thickness*e.h+"px"}),new t("http://www.w3.org/ns/ttml#styling unicodeBidi",function(e,t,n,r){var i;i="bidiOverride"===r?"bidi-override":r,t.style.unicodeBidi=i}),new t("http://www.w3.org/ns/ttml#styling visibility",function(e,t,n,r){t.style.visibility=r}),new t("http://www.w3.org/ns/ttml#styling wrapOption",function(e,t,n,r){"wrap"===r?"preserve"===n.space?t.style.whiteSpace="pre-wrap":t.style.whiteSpace="normal":"preserve"===n.space?t.style.whiteSpace="pre":t.style.whiteSpace="noWrap"}),new t("http://www.w3.org/ns/ttml#styling writingMode",function(e,t,n,r){"lrtb"===r||"lr"===r||"rltb"===r||"rl"===r?t.style.writingMode="horizontal-tb":"tblr"===r?t.style.writingMode="vertical-lr":"tbrl"!==r&&"tb"!==r||(t.style.writingMode="vertical-rl")}),new t("http://www.w3.org/ns/ttml#styling zIndex",function(e,t,n,r){t.style.zIndex=r}),new t("http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt backgroundImage",function(e,t,n,r){if(null!==e.imgResolver&&null!==r){var i=document.createElement("img"),a=e.imgResolver(r,i);a&&(i.src=a),i.height=e.regionH,i.width=e.regionW,t.appendChild(i)}}),new t("http://www.w3.org/ns/ttml/profile/imsc1#styling forcedDisplay",function(e,t,n,r){e.displayForcedOnlyMode&&!1===r&&(t.style.visibility="hidden")})],n={};for(var r in M)n[M[r].qname]=M[r]}(void 0===n?this.imscHTML={}:n,("undefined"==typeof imscNames&&e(18),"undefined"==typeof imscStyles?e(19):imscStyles))},{18:18,19:19}],16:[function(e,t,n){function L(e,t,n,r,i,a,o,s,u){if(t<o.begin||t>=o.end)return null;var l="regionID"in o&&""!==o.regionID?o.regionID:a;if(null!==i&&l!==n.id&&(!("contents"in o)||"contents"in o&&0===o.contents.length||""!==l))return null;var f=new x(o);for(var d in o.sets)t<o.sets[d].begin||t>=o.sets[d].end||(f.styleAttrs[o.sets[d].qname]=o.sets[d].value);var c,h={};for(var p in f.styleAttrs)if(h[p]=!0,p===U.byName.writingMode.qname&&!(U.byName.direction.qname in f.styleAttrs)){var g=f.styleAttrs[p];"lrtb"===g||"lr"===g?f.styleAttrs[U.byName.direction.qname]="ltr":"rltb"!==g&&"rl"!==g||(f.styleAttrs[U.byName.direction.qname]="rtl")}if(null!==i)for(var _ in U.all){var E=U.all[_];if(E.qname===U.byName.textDecoration.qname){var m=i.styleAttrs[E.qname],v=f.styleAttrs[E.qname],y=[];void 0===v?y=m:-1===v.indexOf("none")?((-1===v.indexOf("noUnderline")&&-1!==m.indexOf("underline")||-1!==v.indexOf("underline"))&&y.push("underline"),(-1===v.indexOf("noLineThrough")&&-1!==m.indexOf("lineThrough")||-1!==v.indexOf("lineThrough"))&&y.push("lineThrough"),(-1===v.indexOf("noOverline")&&-1!==m.indexOf("overline")||-1!==v.indexOf("overline"))&&y.push("overline")):y.push("none"),f.styleAttrs[E.qname]=y}else E.inherit&&E.qname in i.styleAttrs&&!(E.qname in f.styleAttrs)&&(f.styleAttrs[E.qname]=i.styleAttrs[E.qname])}for(var T in U.all){var S=U.all[T];S.qname in f.styleAttrs||("region"===f.kind||!1===S.inherit&&null!==S.initial)&&(f.styleAttrs[S.qname]=S.parse(S.initial),h[S.qname]=!0)}for(var A in U.all){var I=U.all[A];if(I.qname in h&&null!==I.compute){var R=I.compute(e,i,f,f.styleAttrs[I.qname],u);null!==R?f.styleAttrs[I.qname]=R:F(s,"Style '"+I.qname+"' on element '"+f.kind+"' cannot be computed")}}if("none"===f.styleAttrs[U.byName.display.qname])return null;for(var b in null===i?c=null===r?[]:[r]:"contents"in o&&(c=o.contents),c){var D=L(e,t,n,r,f,l,c[b],s,u);null!==D&&f.contents.push(D.element)}for(var M in f.styleAttrs){-1===U.byQName[M].applies.indexOf(f.kind)&&delete f.styleAttrs[M]}if("span"===f.kind&&f.text&&"default"===f.space){var C=f.text.replace(/\s+/g," ");f.text=C}if("p"===f.kind){var w=[];!function e(t,n){if("contents"in t)for(var r in t.contents)e(t.contents[r],n);else n.push(t)}(f,w);for(var N=0,O="after_br",P=0;;)if("after_br"===O)N>=w.length||"br"===w[N].kind?(O="before_br",P=N,N--):("preserve"!==w[N].space&&(w[N].text=w[N].text.replace(/^\s+/g,"")),0<w[N].text.length?(O="looking_br",N++):w.splice(N,1));else if("before_br"===O)if(N<0||"br"===w[N].kind){if(O="after_br",(N=P+1)>=w.length)break}else if("preserve"!==w[N].space&&(w[N].text=w[N].text.replace(/\s+$/g,"")),0<w[N].text.length){if(O="after_br",(N=P+1)>=w.length)break}else w.splice(N,1),N--;else N>=w.length||"br"===w[N].kind?(O="before_br",P=N,N--):N++;!function e(t){{if("br"===t.kind)return!1;if("text"in t)return 0===t.text.length;if("contents"in t){for(var n=t.contents.length;n--;)e(t.contents[n])&&t.contents.splice(n,1);return 0===t.contents.length}}}(f)}return"div"===f.kind&&U.byName.backgroundImage.qname in f.styleAttrs||"br"===f.kind||"contents"in f&&0<f.contents.length||"span"===f.kind&&null!==f.text||"region"===f.kind&&"always"===f.styleAttrs[U.byName.showBackground.qname]?{region_id:l,element:f}:null}function s(e){this.contents=[],this.aspectRatio=e.aspectRatio}function x(e){for(var t in this.kind=e.kind||"region",e.id&&(this.id=e.id),this.styleAttrs={},e.styleAttrs)this.styleAttrs[t]=e.styleAttrs[t];"text"in e?this.text=e.text:"br"!==e.kind&&(this.contents=[]),"space"in e&&(this.space=e.space)}function F(e,t){if(e&&e.error&&e.error(t))throw t}var r,U;r=void 0===n?this.imscISD={}:n,"undefined"==typeof imscNames&&e(18),U="undefined"==typeof imscStyles?e(19):imscStyles,r.generateISD=function(e,t,n){var r=new s(e),i={};for(var a in e.head.layout.regions){var o=L(e,t,e.head.layout.regions[a],e.body,null,"",e.head.layout.regions[a],n,i);null!==o&&r.contents.push(o.element)}return r}},{18:18,19:19}],17:[function(e,t,n){n.generateISD=e(16).generateISD,n.fromXML=e(14).fromXML,n.renderHTML=e(15).render},{14:14,15:15,16:16}],18:[function(e,t,n){var r;(r=void 0===n?this.imscNames={}:n).ns_tt="http://www.w3.org/ns/ttml",r.ns_tts="http://www.w3.org/ns/ttml#styling",r.ns_ttp="http://www.w3.org/ns/ttml#parameter",r.ns_xml="http://www.w3.org/XML/1998/namespace",r.ns_itts="http://www.w3.org/ns/ttml/profile/imsc1#styling",r.ns_ittp="http://www.w3.org/ns/ttml/profile/imsc1#parameter",r.ns_smpte="http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt",r.ns_ebutts="urn:ebu:tt:style"},{}],19:[function(e,t,n){!function(l,e,a){function t(e,t,n,r,i,a,o,s){this.name=t,this.ns=e,this.qname=e+" "+t,this.inherit=i,this.animatable=a,this.initial=n,this.applies=r,this.parse=o,this.compute=s}for(var n in l.all=[new t(e.ns_tts,"backgroundColor","transparent",["body","div","p","region","span"],!1,!0,a.parseColor,null),new t(e.ns_tts,"color","white",["span"],!0,!0,a.parseColor,null),new t(e.ns_tts,"direction","ltr",["p","span"],!0,!0,function(e){return e},null),new t(e.ns_tts,"display","auto",["body","div","p","region","span"],!1,!0,function(e){return e},null),new t(e.ns_tts,"displayAlign","before",["region"],!1,!0,function(e){return e},null),new t(e.ns_tts,"extent","auto",["tt","region"],!1,!0,function(e){if("auto"===e)return e;var t=e.split(" ");if(2!==t.length)return null;var n=a.parseLength(t[0]),r=a.parseLength(t[1]);return r&&n?{h:r,w:n}:null},function(e,t,n,r,i){var a,o;if("auto"===r)a=1;else if("%"===r.h.unit)a=r.h.value/100;else{if("px"!==r.h.unit)return null;a=r.h.value/e.pxDimensions.h}if("auto"===r)o=1;else if("%"===r.w.unit)o=r.w.value/100;else{if("px"!==r.w.unit)return null;o=r.w.value/e.pxDimensions.w}return{h:a,w:o}}),new t(e.ns_tts,"fontFamily","default",["span"],!0,!0,function(e){var t=e.split(","),n=[];for(var r in t)"'"!==t[r].charAt(0)&&'"'!==t[r].charAt(0)&&"default"===t[r]?n.push("monospaceSerif"):n.push(t[r]);return n},null),new t(e.ns_tts,"fontSize","1c",["span"],!0,!0,a.parseLength,function(e,t,n,r,i){var a;if("%"===r.unit)a=null!==t?t.styleAttrs[l.byName.fontSize.qname]*r.value/100:r.value/100/e.cellResolution.h;else if("em"===r.unit)a=null!==t?t.styleAttrs[l.byName.fontSize.qname]*r.value:r.value/e.cellResolution.h;else if("c"===r.unit)a=r.value/e.cellResolution.h;else{if("px"!==r.unit)return null;a=r.value/e.pxDimensions.h}return a}),new t(e.ns_tts,"fontStyle","normal",["span"],!0,!0,function(e){return e},null),new t(e.ns_tts,"fontWeight","normal",["span"],!0,!0,function(e){return e},null),new t(e.ns_tts,"lineHeight","normal",["p"],!0,!0,function(e){return"normal"===e?e:a.parseLength(e)},function(e,t,n,r,i){var a;if("normal"===r)a=r;else if("%"===r.unit)a=n.styleAttrs[l.byName.fontSize.qname]*r.value/100;else if("em"===r.unit)a=n.styleAttrs[l.byName.fontSize.qname]*r.value;else if("c"===r.unit)a=r.value/e.cellResolution.h;else{if("px"!==r.unit)return null;a=r.value/e.pxDimensions.h}return a}),new t(e.ns_tts,"opacity",1,["region"],!1,!0,parseFloat,null),new t(e.ns_tts,"origin","auto",["region"],!1,!0,function(e){if("auto"===e)return e;var t=e.split(" ");if(2!==t.length)return null;var n=a.parseLength(t[0]),r=a.parseLength(t[1]);return r&&n?{h:r,w:n}:null},function(e,t,n,r,i){var a,o;if("auto"===r)a=0;else if("%"===r.h.unit)a=r.h.value/100;else{if("px"!==r.h.unit)return null;a=r.h.value/e.pxDimensions.h}if("auto"===r)o=0;else if("%"===r.w.unit)o=r.w.value/100;else{if("px"!==r.w.unit)return null;o=r.w.value/e.pxDimensions.w}return{h:a,w:o}}),new t(e.ns_tts,"overflow","hidden",["region"],!1,!0,function(e){return e},null),new t(e.ns_tts,"padding","0px",["region"],!1,!0,function(e){var t=e.split(" ");if(4<t.length)return null;var n=[];for(var r in t){var i=a.parseLength(t[r]);if(!i)return null;n.push(i)}return n},function(e,t,n,r,i){var a;if(1===r.length)a=[r[0],r[0],r[0],r[0]];else if(2===r.length)a=[r[0],r[1],r[0],r[1]];else if(3===r.length)a=[r[0],r[1],r[2],r[1]];else{if(4!==r.length)return null;a=[r[0],r[1],r[2],r[3]]}var o=n.styleAttrs[l.byName.writingMode.qname];if("lrtb"===o||"lr"===o)a=[a[0],a[3],a[2],a[1]];else if("rltb"===o||"rl"===o)a=[a[0],a[1],a[2],a[3]];else if("tblr"===o)a=[a[3],a[0],a[1],a[2]];else{if("tbrl"!==o&&"tb"!==o)return null;a=[a[3],a[2],a[1],a[0]]}var s=[];for(var u in a)if(0===a[u].value)s[u]=0;else if("%"===a[u].unit)s[u]="0"===u||"2"===u?n.styleAttrs[l.byName.extent.qname].h*a[u].value/100:n.styleAttrs[l.byName.extent.qname].w*a[u].value/100;else if("em"===a[u].unit)s[u]=n.styleAttrs[l.byName.fontSize.qname]*a[u].value;else if("c"===a[u].unit)s[u]=a[u].value/e.cellResolution.h;else{if("px"!==a[u].unit)return null;s[u]="0"===u||"2"===u?a[u].value/e.pxDimensions.h:a[u].value/e.pxDimensions.w}return s}),new t(e.ns_tts,"showBackground","always",["region"],!1,!0,function(e){return e},null),new t(e.ns_tts,"textAlign","start",["p"],!0,!0,function(e){return e},function(e,t,n,r,i){return"left"===r?"start":"right"===r?"end":r}),new t(e.ns_tts,"textDecoration","none",["span"],!0,!0,function(e){return e.split(" ")},null),new t(e.ns_tts,"textOutline","none",["span"],!0,!0,function(e){if("none"===e)return e;var t={},n=e.split(" ");if(0===n.length||2<n.length)return null;var r=a.parseColor(n[0]);if(null!==(t.color=r)&&n.shift(),1!==n.length)return null;var i=a.parseLength(n[0]);return i?(t.thickness=i,t):null},function(e,t,n,r,i){if("none"===r)return r;var a={};if(null===r.color?a.color=n.styleAttrs[l.byName.color.qname]:a.color=r.color,"%"===r.thickness.unit)a.thickness=n.styleAttrs[l.byName.fontSize.qname]*r.thickness.value/100;else if("em"===r.thickness.unit)a.thickness=n.styleAttrs[l.byName.fontSize.qname]*r.thickness.value;else if("c"===r.thickness.unit)a.thickness=r.thickness.value/e.cellResolution.h;else{if("px"!==r.thickness.unit)return null;a.thickness=r.thickness.value/e.pxDimensions.h}return a}),new t(e.ns_tts,"unicodeBidi","normal",["span","p"],!1,!0,function(e){return e},null),new t(e.ns_tts,"visibility","visible",["body","div","p","region","span"],!0,!0,function(e){return e},null),new t(e.ns_tts,"wrapOption","wrap",["span"],!0,!0,function(e){return e},null),new t(e.ns_tts,"writingMode","lrtb",["region"],!1,!0,function(e){return e},null),new t(e.ns_tts,"zIndex","auto",["region"],!1,!0,function(e){var t;return"auto"===e?t=e:(t=parseInt(e),isNaN(t)&&(t=null)),t},null),new t(e.ns_ebutts,"linePadding","0c",["p"],!0,!1,a.parseLength,function(e,t,n,r,i){return"c"===r.unit?r.value/e.cellResolution.h:null}),new t(e.ns_ebutts,"multiRowAlign","auto",["p"],!0,!1,function(e){return e},null),new t(e.ns_smpte,"backgroundImage",null,["div"],!1,!1,function(e){return e},null),new t(e.ns_itts,"forcedDisplay","false",["body","div","p","region","span"],!0,!0,function(e){return"true"===e},null),new t(e.ns_itts,"fillLineGap","false",["p"],!0,!0,function(e){return"true"===e},null)],l.byQName={},l.all)l.byQName[l.all[n].qname]=l.all[n];for(var r in l.byName={},l.all)l.byName[l.all[r].name]=l.all[r]}(void 0===n?this.imscStyles={}:n,"undefined"==typeof imscNames?e(18):imscNames,"undefined"==typeof imscUtils?e(20):imscUtils)},{18:18,20:20}],20:[function(e,t,n){!function(e){var i=/#([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})?/,a=/rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/,o=/rgba\(\s*(\d+),\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/,s={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]};e.parseColor=function(e){var t,n=null,r=s[e.toLowerCase()];return void 0!==r?n=r:null!==(t=i.exec(e))?n=[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16),void 0!==t[4]?parseInt(t[4],16):255]:null!==(t=a.exec(e))?n=[parseInt(t[1]),parseInt(t[2]),parseInt(t[3]),255]:null!==(t=o.exec(e))&&(n=[parseInt(t[1]),parseInt(t[2]),parseInt(t[3]),parseInt(t[4])]),n};var r=/^((?:\+|\-)?\d*(?:\.\d+)?)(px|em|c|%)$/;e.parseLength=function(e){var t,n=null;return null!==(t=r.exec(e))&&(n={value:parseFloat(t[1]),unit:t[2]}),n}}(void 0===n?this.imscUtils={}:n)},{}],21:[function(e,t,n){"function"==typeof Object.create?t.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(e,t){e.super_=t;function n(){}n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},{}],22:[function(e,t,n){function r(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}t.exports=function(e){return null!=e&&(r(e)||"function"==typeof(t=e).readFloatLE&&"function"==typeof t.slice&&r(t.slice(0,0))||!!e._isBuffer);var t}},{}],23:[function(e,t,n){var r={}.toString;t.exports=Array.isArray||function(e){return"[object Array]"==r.call(e)}},{}],24:[function(e,t,n){(function(s){"use strict";!s.version||0===s.version.indexOf("v0.")||0===s.version.indexOf("v1.")&&0!==s.version.indexOf("v1.8.")?t.exports={nextTick:function(e,t,n,r){if("function"!=typeof e)throw new TypeError('"callback" argument must be a function');var i,a,o=arguments.length;switch(o){case 0:case 1:return s.nextTick(e);case 2:return s.nextTick(function(){e.call(null,t)});case 3:return s.nextTick(function(){e.call(null,t,n)});case 4:return s.nextTick(function(){e.call(null,t,n,r)});default:for(i=new Array(o-1),a=0;a<i.length;)i[a++]=arguments[a];return s.nextTick(function(){e.apply(null,i)})}}}:t.exports=s}).call(this,e(25))},{25:25}],25:[function(e,t,n){var r,i,a=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function u(t){if(r===setTimeout)return setTimeout(t,0);if((r===o||!r)&&setTimeout)return r=setTimeout,setTimeout(t,0);try{return r(t,0)}catch(e){try{return r.call(null,t,0)}catch(e){return r.call(this,t,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:o}catch(e){r=o}try{i="function"==typeof clearTimeout?clearTimeout:s}catch(e){i=s}}();var l,f=[],d=!1,c=-1;function h(){d&&l&&(d=!1,l.length?f=l.concat(f):c=-1,f.length&&p())}function p(){if(!d){var e=u(h);d=!0;for(var t=f.length;t;){for(l=f,f=[];++c<t;)l&&l[c].run();c=-1,t=f.length}l=null,d=!1,function(t){if(i===clearTimeout)return clearTimeout(t);if((i===s||!i)&&clearTimeout)return i=clearTimeout,clearTimeout(t);try{i(t)}catch(e){try{return i.call(null,t)}catch(e){return i.call(this,t)}}}(e)}}function g(e,t){this.fun=e,this.array=t}function _(){}a.nextTick=function(e){var t=new Array(arguments.length-1);if(1<arguments.length)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];f.push(new g(e,t)),1!==f.length||d||u(p)},g.prototype.run=function(){this.fun.apply(null,this.array)},a.title="browser",a.browser=!0,a.env={},a.argv=[],a.version="",a.versions={},a.on=_,a.addListener=_,a.once=_,a.off=_,a.removeListener=_,a.removeAllListeners=_,a.emit=_,a.prependListener=_,a.prependOnceListener=_,a.listeners=function(e){return[]},a.binding=function(e){throw new Error("process.binding is not supported")},a.cwd=function(){return"/"},a.chdir=function(e){throw new Error("process.chdir is not supported")},a.umask=function(){return 0}},{}],26:[function(e,t,n){t.exports=e(27)},{27:27}],27:[function(e,t,n){"use strict";var r=e(24),i=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};t.exports=d;var a=e(10);a.inherits=e(21);var o=e(29),s=e(31);a.inherits(d,o);for(var u=i(s.prototype),l=0;l<u.length;l++){var f=u[l];d.prototype[f]||(d.prototype[f]=s.prototype[f])}function d(e){if(!(this instanceof d))return new d(e);o.call(this,e),s.call(this,e),e&&!1===e.readable&&(this.readable=!1),e&&!1===e.writable&&(this.writable=!1),this.allowHalfOpen=!0,e&&!1===e.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",c)}function c(){this.allowHalfOpen||this._writableState.ended||r.nextTick(h,this)}function h(e){e.end()}Object.defineProperty(d.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(d.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}}),d.prototype._destroy=function(e,t){this.push(null),this.end(),r.nextTick(t,e)}},{10:10,21:21,24:24,29:29,31:31}],28:[function(e,t,n){"use strict";t.exports=a;var r=e(30),i=e(10);function a(e){if(!(this instanceof a))return new a(e);r.call(this,e)}i.inherits=e(21),i.inherits(a,r),a.prototype._transform=function(e,t,n){n(null,e)}},{10:10,21:21,30:30}],29:[function(P,L,e){(function(_,e){"use strict";var E=P(24);L.exports=c;var o,m=P(23);c.ReadableState=a;function v(e,t){return e.listeners(t).length}P(11).EventEmitter;var i=P(34),l=P(39).Buffer,f=e.Uint8Array||function(){};var t=P(10);t.inherits=P(21);var n=P(7),y=void 0;y=n&&n.debuglog?n.debuglog("stream"):function(){};var s,u=P(32),r=P(33);t.inherits(c,i);var d=["error","close","destroy","pause","resume"];function a(e,t){e=e||{};var n=t instanceof(o=o||P(27));this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var r=e.highWaterMark,i=e.readableHighWaterMark,a=this.objectMode?16:16384;this.highWaterMark=r||0===r?r:n&&(i||0===i)?i:a,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new u,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.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(s=s||P(42).StringDecoder,this.decoder=new s(e.encoding),this.encoding=e.encoding)}function c(e){if(o=o||P(27),!(this instanceof c))return new c(e);this._readableState=new a(e,this),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),i.call(this)}function h(e,t,n,r,i){var a,o,s,u=e._readableState;null===t?(u.reading=!1,function(e,t){if(t.ended)return;if(t.decoder){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,S(e)}(e,u)):(i||(a=function(e,t){var n;(function(e){return l.isBuffer(e)||e instanceof f})(t)||"string"==typeof t||void 0===t||e.objectMode||(n=new TypeError("Invalid non-string/buffer chunk"));return n}(u,t)),a?e.emit("error",a):u.objectMode||t&&0<t.length?("string"==typeof t||u.objectMode||Object.getPrototypeOf(t)===l.prototype||(o=t,t=l.from(o)),r?u.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):p(e,u,t,!0):u.ended?e.emit("error",new Error("stream.push() after EOF")):(u.reading=!1,u.decoder&&!n?(t=u.decoder.write(t),u.objectMode||0!==t.length?p(e,u,t,!1):I(e,u)):p(e,u,t,!1))):r||(u.reading=!1));return!(s=u).ended&&(s.needReadable||s.length<s.highWaterMark||0===s.length)}function p(e,t,n,r){t.flowing&&0===t.length&&!t.sync?(e.emit("data",n),e.read(0)):(t.length+=t.objectMode?1:n.length,r?t.buffer.unshift(n):t.buffer.push(n),t.needReadable&&S(e)),I(e,t)}Object.defineProperty(c.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),c.prototype.destroy=r.destroy,c.prototype._undestroy=r.undestroy,c.prototype._destroy=function(e,t){this.push(null),t(e)},c.prototype.push=function(e,t){var n,r=this._readableState;return r.objectMode?n=!0:"string"==typeof e&&((t=t||r.defaultEncoding)!==r.encoding&&(e=l.from(e,t),t=""),n=!0),h(this,e,t,!1,n)},c.prototype.unshift=function(e){return h(this,e,null,!0,!1)},c.prototype.isPaused=function(){return!1===this._readableState.flowing},c.prototype.setEncoding=function(e){return s=s||P(42).StringDecoder,this._readableState.decoder=new s(e),this._readableState.encoding=e,this};var g=8388608;function T(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=(g<=(n=e)?n=g:(n--,n|=n>>>1,n|=n>>>2,n|=n>>>4,n|=n>>>8,n|=n>>>16,n++),n)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0));var n}function S(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(y("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?E.nextTick(A,e):A(e))}function A(e){y("emit readable"),e.emit("readable"),M(e)}function I(e,t){t.readingMore||(t.readingMore=!0,E.nextTick(R,e,t))}function R(e,t){for(var n=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(y("maybeReadMore read 0"),e.read(0),n!==t.length);)n=t.length;t.readingMore=!1}function b(e){y("readable nexttick read 0"),e.read(0)}function D(e,t){t.reading||(y("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),M(e),t.flowing&&!t.reading&&e.read(0)}function M(e){var t=e._readableState;for(y("flow",t.flowing);t.flowing&&null!==e.read(););}function C(e,t){return 0===t.length?null:(t.objectMode?n=t.buffer.shift():!e||e>=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):n=function(e,t,n){var r;e<t.head.data.length?(r=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):r=e===t.head.data.length?t.shift():(n?function(e,t){var n=t.head,r=1,i=n.data;e-=i.length;for(;n=n.next;){var a=n.data,o=e>a.length?a.length:e;if(o===a.length?i+=a:i+=a.slice(0,e),0===(e-=o)){o===a.length?(++r,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n).data=a.slice(o);break}++r}return t.length-=r,i}:function(e,t){var n=l.allocUnsafe(e),r=t.head,i=1;r.data.copy(n),e-=r.data.length;for(;r=r.next;){var a=r.data,o=e>a.length?a.length:e;if(a.copy(n,n.length-e,0,o),0===(e-=o)){o===a.length?(++i,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r).data=a.slice(o);break}++i}return t.length-=i,n})(e,t);return r}(e,t.buffer,t.decoder),n);var n}function w(e){var t=e._readableState;if(0<t.length)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,E.nextTick(N,t,e))}function N(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function O(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}c.prototype.read=function(e){y("read",e),e=parseInt(e,10);var t=this._readableState,n=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return y("read: emitReadable",t.length,t.ended),(0===t.length&&t.ended?w:S)(this),null;if(0===(e=T(e,t))&&t.ended)return 0===t.length&&w(this),null;var r,i=t.needReadable;return y("need readable",i),(0===t.length||t.length-e<t.highWaterMark)&&y("length less than watermark",i=!0),t.ended||t.reading?y("reading or ended",i=!1):i&&(y("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=T(n,t))),null===(r=0<e?C(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&w(this)),null!==r&&this.emit("data",r),r},c.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},c.prototype.pipe=function(n,e){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=n;break;case 1:i.pipes=[i.pipes,n];break;default:i.pipes.push(n)}i.pipesCount+=1,y("pipe count=%d opts=%j",i.pipesCount,e);var t=(!e||!1!==e.end)&&n!==_.stdout&&n!==_.stderr?o:g;function a(e,t){y("onunpipe"),e===r&&t&&!1===t.hasUnpiped&&(t.hasUnpiped=!0,y("cleanup"),n.removeListener("close",h),n.removeListener("finish",p),n.removeListener("drain",u),n.removeListener("error",c),n.removeListener("unpipe",a),r.removeListener("end",o),r.removeListener("end",g),r.removeListener("data",d),l=!0,!i.awaitDrain||n._writableState&&!n._writableState.needDrain||u())}function o(){y("onend"),n.end()}i.endEmitted?E.nextTick(t):r.once("end",t),n.on("unpipe",a);var s,u=(s=r,function(){var e=s._readableState;y("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&v(s,"data")&&(e.flowing=!0,M(s))});n.on("drain",u);var l=!1;var f=!1;function d(e){y("ondata"),(f=!1)!==n.write(e)||f||((1===i.pipesCount&&i.pipes===n||1<i.pipesCount&&-1!==O(i.pipes,n))&&!l&&(y("false write response, pause",r._readableState.awaitDrain),r._readableState.awaitDrain++,f=!0),r.pause())}function c(e){y("onerror",e),g(),n.removeListener("error",c),0===v(n,"error")&&n.emit("error",e)}function h(){n.removeListener("finish",p),g()}function p(){y("onfinish"),n.removeListener("close",h),g()}function g(){y("unpipe"),r.unpipe(n)}return r.on("data",d),function(e,t,n){if("function"==typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events[t]?m(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}(n,"error",c),n.once("close",h),n.once("finish",p),n.emit("pipe",r),i.flowing||(y("pipe resume"),r.resume()),n},c.prototype.unpipe=function(e){var t=this._readableState,n={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e=e||t.pipes,t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,n)),this;if(!e){var r=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var a=0;a<i;a++)r[a].emit("unpipe",this,n);return this}var o=O(t.pipes,e);return-1===o||(t.pipes.splice(o,1),--t.pipesCount,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,n)),this},c.prototype.addListener=c.prototype.on=function(e,t){var n=i.prototype.on.call(this,e,t);if("data"===e)!1!==this._readableState.flowing&&this.resume();else if("readable"===e){var r=this._readableState;r.endEmitted||r.readableListening||(r.readableListening=r.needReadable=!0,r.emittedReadable=!1,r.reading?r.length&&S(this):E.nextTick(b,this))}return n},c.prototype.resume=function(){var e,t,n=this._readableState;return n.flowing||(y("resume"),n.flowing=!0,e=this,(t=n).resumeScheduled||(t.resumeScheduled=!0,E.nextTick(D,e,t))),this},c.prototype.pause=function(){return y("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(y("pause"),this._readableState.flowing=!1,this.emit("pause")),this},c.prototype.wrap=function(t){var n=this,r=this._readableState,i=!1;for(var e in t.on("end",function(){if(y("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&n.push(e)}n.push(null)}),t.on("data",function(e){y("wrapped data"),r.decoder&&(e=r.decoder.write(e)),r.objectMode&&null==e||(r.objectMode||e&&e.length)&&(n.push(e)||(i=!0,t.pause()))}),t)void 0===this[e]&&"function"==typeof t[e]&&(this[e]=function(e){return function(){return t[e].apply(t,arguments)}}(e));for(var a=0;a<d.length;a++)t.on(d[a],this.emit.bind(this,d[a]));return this._read=function(e){y("wrapped _read",e),i&&(i=!1,t.resume())},this},Object.defineProperty(c.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),c._fromList=C}).call(this,P(25),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{10:10,11:11,21:21,23:23,24:24,25:25,27:27,32:32,33:33,34:34,39:39,42:42,7:7}],30:[function(e,t,n){"use strict";t.exports=a;var r=e(27),i=e(10);function a(e){if(!(this instanceof a))return new a(e);r.call(this,e),this._transformState={afterTransform:function(e,t){var n=this._transformState;n.transforming=!1;var r=n.writecb;if(!r)return this.emit("error",new Error("write callback called multiple times"));n.writechunk=null,(n.writecb=null)!=t&&this.push(t),r(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",o)}function o(){var n=this;"function"==typeof this._flush?this._flush(function(e,t){s(n,e,t)}):s(this,null,null)}function s(e,t,n){if(t)return e.emit("error",t);if(null!=n&&e.push(n),e._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(e._transformState.transforming)throw new Error("Calling transform done when still transforming");return e.push(null)}i.inherits=e(21),i.inherits(a,r),a.prototype.push=function(e,t){return this._transformState.needTransform=!1,r.prototype.push.call(this,e,t)},a.prototype._transform=function(e,t,n){throw new Error("_transform() is not implemented")},a.prototype._write=function(e,t,n){var r=this._transformState;if(r.writecb=n,r.writechunk=e,r.writeencoding=t,!r.transforming){var i=this._readableState;(r.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},a.prototype._read=function(e){var t=this._transformState;null!==t.writechunk&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0},a.prototype._destroy=function(e,t){var n=this;r.prototype._destroy.call(this,e,function(e){t(e),n.emit("close")})}},{10:10,21:21,27:27}],31:[function(A,I,e){(function(e,t,n){"use strict";var E=A(24);function d(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,n){var r=e.entry;e.entry=null;for(;r;){var i=r.callback;t.pendingcb--,i(n),r=r.next}t.corkedRequestsFree?t.corkedRequestsFree.next=e:t.corkedRequestsFree=e}(t,e)}}I.exports=c;var s,u=!e.browser&&-1<["v0.10","v0.9."].indexOf(e.version.slice(0,5))?n:E.nextTick;c.WritableState=f;var r=A(10);r.inherits=A(21);var i={deprecate:A(44)},a=A(34),m=A(39).Buffer,v=t.Uint8Array||function(){};var o,l=A(33);function y(){}function f(e,t){s=s||A(27),e=e||{};var n=t instanceof s;this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var r=e.highWaterMark,i=e.writableHighWaterMark,a=this.objectMode?16:16384;this.highWaterMark=r||0===r?r:n&&(i||0===i)?i:a,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1;var o=(this.destroyed=!1)===e.decodeStrings;this.decodeStrings=!o,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var n=e._writableState,r=n.sync,i=n.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(n),t)!function(e,t,n,r,i){--t.pendingcb,n?(E.nextTick(i,r),E.nextTick(S,e,t),e._writableState.errorEmitted=!0,e.emit("error",r)):(i(r),e._writableState.errorEmitted=!0,e.emit("error",r),S(e,t))}(e,n,r,t,i);else{var a=g(n);a||n.corked||n.bufferProcessing||!n.bufferedRequest||p(e,n),r?u(h,e,n,a,i):h(e,n,a,i)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new d(this)}function c(e){if(s=s||A(27),!(o.call(c,this)||this instanceof s))return new c(e);this._writableState=new f(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),a.call(this)}function T(e,t,n,r,i,a,o){t.writelen=r,t.writecb=o,t.writing=!0,t.sync=!0,n?e._writev(i,t.onwrite):e._write(i,a,t.onwrite),t.sync=!1}function h(e,t,n,r){var i,a;n||(i=e,0===(a=t).length&&a.needDrain&&(a.needDrain=!1,i.emit("drain"))),t.pendingcb--,r(),S(e,t)}function p(e,t){t.bufferProcessing=!0;var n=t.bufferedRequest;if(e._writev&&n&&n.next){var r=t.bufferedRequestCount,i=new Array(r),a=t.corkedRequestsFree;a.entry=n;for(var o=0,s=!0;n;)(i[o]=n).isBuf||(s=!1),n=n.next,o+=1;i.allBuffers=s,T(e,t,!0,t.length,i,"",a.finish),t.pendingcb++,t.lastBufferedRequest=null,a.next?(t.corkedRequestsFree=a.next,a.next=null):t.corkedRequestsFree=new d(t),t.bufferedRequestCount=0}else{for(;n;){var u=n.chunk,l=n.encoding,f=n.callback;if(T(e,t,!1,t.objectMode?1:u.length,u,l,f),n=n.next,t.bufferedRequestCount--,t.writing)break}null===n&&(t.lastBufferedRequest=null)}t.bufferedRequest=n,t.bufferProcessing=!1}function g(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function _(t,n){t._final(function(e){n.pendingcb--,e&&t.emit("error",e),n.prefinished=!0,t.emit("prefinish"),S(t,n)})}function S(e,t){var n,r,i=g(t);return i&&(n=e,(r=t).prefinished||r.finalCalled||("function"==typeof n._final?(r.pendingcb++,r.finalCalled=!0,E.nextTick(_,n,r)):(r.prefinished=!0,n.emit("prefinish"))),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),i}r.inherits(c,a),f.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(f.prototype,"buffer",{get:i.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(o=Function.prototype[Symbol.hasInstance],Object.defineProperty(c,Symbol.hasInstance,{value:function(e){return!!o.call(this,e)||this===c&&(e&&e._writableState instanceof f)}})):o=function(e){return e instanceof this},c.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},c.prototype.write=function(e,t,n){var r,i,a,o,s,u,l,f,d,c,h,p=this._writableState,g=!1,_=!p.objectMode&&(r=e,m.isBuffer(r)||r instanceof v);return _&&!m.isBuffer(e)&&(i=e,e=m.from(i)),"function"==typeof t&&(n=t,t=null),t=_?"buffer":t||p.defaultEncoding,"function"!=typeof n&&(n=y),p.ended?(d=this,c=n,h=new Error("write after end"),d.emit("error",h),E.nextTick(c,h)):(_||(a=this,o=p,u=n,f=!(l=!0),null===(s=e)?f=new TypeError("May not write null values to stream"):"string"==typeof s||void 0===s||o.objectMode||(f=new TypeError("Invalid non-string/buffer chunk")),f&&(a.emit("error",f),E.nextTick(u,f),l=!1),l))&&(p.pendingcb++,g=function(e,t,n,r,i,a){if(!n){var o=function(e,t,n){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=m.from(t,n));return t}(t,r,i);r!==o&&(n=!0,i="buffer",r=o)}var s=t.objectMode?1:r.length;t.length+=s;var u=t.length<t.highWaterMark;u||(t.needDrain=!0);if(t.writing||t.corked){var l=t.lastBufferedRequest;t.lastBufferedRequest={chunk:r,encoding:i,isBuf:n,callback:a,next:null},l?l.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else T(e,t,!1,s,r,i,a);return u}(this,p,_,e,t,n)),g},c.prototype.cork=function(){this._writableState.corked++},c.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.bufferedRequest||p(this,e))},c.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(-1<["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(c.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),c.prototype._write=function(e,t,n){n(new Error("_write() is not implemented"))},c.prototype._writev=null,c.prototype.end=function(e,t,n){var r=this._writableState;"function"==typeof e?(n=e,t=e=null):"function"==typeof t&&(n=t,t=null),null!=e&&this.write(e,t),r.corked&&(r.corked=1,this.uncork()),r.ending||r.finished||function(e,t,n){t.ending=!0,S(e,t),n&&(t.finished?E.nextTick(n):e.once("finish",n));t.ended=!0,e.writable=!1}(this,r,n)},Object.defineProperty(c.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),c.prototype.destroy=l.destroy,c.prototype._undestroy=l.undestroy,c.prototype._destroy=function(e,t){this.end(),t(e)}}).call(this,A(25),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},A(43).setImmediate)},{10:10,21:21,24:24,25:25,27:27,33:33,34:34,39:39,43:43,44:44}],32:[function(e,t,n){"use strict";var s=e(39).Buffer,r=e(7);function i(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),this.head=null,this.tail=null,this.length=0}t.exports=(i.prototype.push=function(e){var t={data:e,next:null};0<this.length?this.tail.next=t:this.head=t,this.tail=t,++this.length},i.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},i.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},i.prototype.clear=function(){this.head=this.tail=null,this.length=0},i.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,n=""+t.data;t=t.next;)n+=e+t.data;return n},i.prototype.concat=function(e){if(0===this.length)return s.alloc(0);if(1===this.length)return this.head.data;for(var t,n,r,i=s.allocUnsafe(e>>>0),a=this.head,o=0;a;)t=a.data,n=i,r=o,t.copy(n,r),o+=a.data.length,a=a.next;return i},i),r&&r.inspect&&r.inspect.custom&&(t.exports.prototype[r.inspect.custom]=function(){var e=r.inspect({length:this.length});return this.constructor.name+" "+e})},{39:39,7:7}],33:[function(e,t,n){"use strict";var a=e(24);function o(e,t){e.emit("error",t)}t.exports={destroy:function(e,t){var n=this,r=this._readableState&&this._readableState.destroyed,i=this._writableState&&this._writableState.destroyed;return r||i?t?t(e):!e||this._writableState&&this._writableState.errorEmitted||a.nextTick(o,this,e):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(e){!t&&e?(a.nextTick(o,n,e),n._writableState&&(n._writableState.errorEmitted=!0)):t&&t(e)})),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.finished=!1,this._writableState.errorEmitted=!1)}}},{24:24}],34:[function(e,t,n){t.exports=e(11).EventEmitter},{11:11}],35:[function(e,t,n){t.exports=e(36).PassThrough},{36:36}],36:[function(e,t,n){(((n=t.exports=e(29)).Stream=n).Readable=n).Writable=e(31),n.Duplex=e(27),n.Transform=e(30),n.PassThrough=e(28)},{27:27,28:28,29:29,30:30,31:31}],37:[function(e,t,n){t.exports=e(36).Transform},{36:36}],38:[function(e,t,n){t.exports=e(31)},{31:31}],39:[function(e,t,n){var r=e(8),i=r.Buffer;function a(e,t){for(var n in e)t[n]=e[n]}function o(e,t,n){return i(e,t,n)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=r:(a(r,n),n.Buffer=o),a(i,o),o.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,n)},o.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var r=i(e);return void 0!==t?"string"==typeof n?r.fill(t,n):r.fill(t):r.fill(0),r},o.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},o.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}},{8:8}],40:[function(H,e,t){(function(q){!function(u){u.parser=function(e,t){return new i(e,t)},u.SAXParser=i,u.SAXStream=o,u.createStream=function(e,t){return new o(e,t)},u.MAX_BUFFER_LENGTH=65536;var r,l=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];function i(e,t){if(!(this instanceof i))return new i(e,t);var n=this;!function(e){for(var t=0,n=l.length;t<n;t++)e[l[t]]=""}(n),n.q=n.c="",n.bufferCheckPosition=u.MAX_BUFFER_LENGTH,n.opt=t||{},n.opt.lowercase=n.opt.lowercase||n.opt.lowercasetags,n.looseCase=n.opt.lowercase?"toLowerCase":"toUpperCase",n.tags=[],n.closed=n.closedRoot=n.sawRoot=!1,n.tag=n.error=null,n.strict=!!e,n.noscript=!(!e&&!n.opt.noscript),n.state=R.BEGIN,n.strictEntities=n.opt.strictEntities,n.ENTITIES=n.strictEntities?Object.create(u.XML_ENTITIES):Object.create(u.ENTITIES),n.attribList=[],n.opt.xmlns&&(n.ns=Object.create(_)),n.trackPosition=!1!==n.opt.position,n.trackPosition&&(n.position=n.line=n.column=0),D(n,"onready")}u.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"],Object.create||(Object.create=function(e){function t(){}return t.prototype=e,new t}),Object.keys||(Object.keys=function(e){var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(n);return t}),i.prototype={end:function(){O(this)},write:function(e){var t=this;if(this.error)throw this.error;if(t.closed)return N(t,"Cannot write after close. Assign an onready handler.");if(null===e)return O(t);"object"==typeof e&&(e=e.toString());var n=0,r="";for(;r=j(e,n++),t.c=r;)switch(t.trackPosition&&(t.position++,"\n"===r?(t.line++,t.column=0):t.column++),t.state){case R.BEGIN:if(t.state=R.BEGIN_WHITESPACE,"\ufeff"===r)continue;G(t,r);continue;case R.BEGIN_WHITESPACE:G(t,r);continue;case R.TEXT:if(t.sawRoot&&!t.closedRoot){for(var i=n-1;r&&"<"!==r&&"&"!==r;)(r=j(e,n++))&&t.trackPosition&&(t.position++,"\n"===r?(t.line++,t.column=0):t.column++);t.textNode+=e.substring(i,n-1)}"<"!==r||t.sawRoot&&t.closedRoot&&!t.strict?(!S(f,r)||t.sawRoot&&!t.closedRoot||P(t,"Text data outside of root node."),"&"===r?t.state=R.TEXT_ENTITY:t.textNode+=r):(t.state=R.OPEN_WAKA,t.startTagPosition=t.position);continue;case R.SCRIPT:"<"===r?t.state=R.SCRIPT_ENDING:t.script+=r;continue;case R.SCRIPT_ENDING:"/"===r?t.state=R.CLOSE_TAG:(t.script+="<"+r,t.state=R.SCRIPT);continue;case R.OPEN_WAKA:if("!"===r)t.state=R.SGML_DECL,t.sgmlDecl="";else if(!T(f,r))if(T(E,r))t.state=R.OPEN_TAG,t.tagName=r;else if("/"===r)t.state=R.CLOSE_TAG,t.tagName="";else if("?"===r)t.state=R.PROC_INST,t.procInstName=t.procInstBody="";else{if(P(t,"Unencoded <"),t.startTagPosition+1<t.position){var a=t.position-t.startTagPosition;r=new Array(a).join(" ")+r}t.textNode+="<"+r,t.state=R.TEXT}continue;case R.SGML_DECL:(t.sgmlDecl+r).toUpperCase()===h?(M(t,"onopencdata"),t.state=R.CDATA,t.sgmlDecl="",t.cdata=""):t.sgmlDecl+r==="--"?(t.state=R.COMMENT,t.comment="",t.sgmlDecl=""):(t.sgmlDecl+r).toUpperCase()===p?(t.state=R.DOCTYPE,(t.doctype||t.sawRoot)&&P(t,"Inappropriately located doctype declaration"),t.doctype="",t.sgmlDecl=""):">"===r?(M(t,"onsgmldeclaration",t.sgmlDecl),t.sgmlDecl="",t.state=R.TEXT):(T(d,r)&&(t.state=R.SGML_DECL_QUOTED),t.sgmlDecl+=r);continue;case R.SGML_DECL_QUOTED:r===t.q&&(t.state=R.SGML_DECL,t.q=""),t.sgmlDecl+=r;continue;case R.DOCTYPE:">"===r?(t.state=R.TEXT,M(t,"ondoctype",t.doctype),t.doctype=!0):(t.doctype+=r,"["===r?t.state=R.DOCTYPE_DTD:T(d,r)&&(t.state=R.DOCTYPE_QUOTED,t.q=r));continue;case R.DOCTYPE_QUOTED:t.doctype+=r,r===t.q&&(t.q="",t.state=R.DOCTYPE);continue;case R.DOCTYPE_DTD:t.doctype+=r,"]"===r?t.state=R.DOCTYPE:T(d,r)&&(t.state=R.DOCTYPE_DTD_QUOTED,t.q=r);continue;case R.DOCTYPE_DTD_QUOTED:t.doctype+=r,r===t.q&&(t.state=R.DOCTYPE_DTD,t.q="");continue;case R.COMMENT:"-"===r?t.state=R.COMMENT_ENDING:t.comment+=r;continue;case R.COMMENT_ENDING:"-"===r?(t.state=R.COMMENT_ENDED,t.comment=w(t.opt,t.comment),t.comment&&M(t,"oncomment",t.comment),t.comment=""):(t.comment+="-"+r,t.state=R.COMMENT);continue;case R.COMMENT_ENDED:">"!==r?(P(t,"Malformed comment"),t.comment+="--"+r,t.state=R.COMMENT):t.state=R.TEXT;continue;case R.CDATA:"]"===r?t.state=R.CDATA_ENDING:t.cdata+=r;continue;case R.CDATA_ENDING:"]"===r?t.state=R.CDATA_ENDING_2:(t.cdata+="]"+r,t.state=R.CDATA);continue;case R.CDATA_ENDING_2:">"===r?(t.cdata&&M(t,"oncdata",t.cdata),M(t,"onclosecdata"),t.cdata="",t.state=R.TEXT):"]"===r?t.cdata+="]":(t.cdata+="]]"+r,t.state=R.CDATA);continue;case R.PROC_INST:"?"===r?t.state=R.PROC_INST_ENDING:T(f,r)?t.state=R.PROC_INST_BODY:t.procInstName+=r;continue;case R.PROC_INST_BODY:if(!t.procInstBody&&T(f,r))continue;"?"===r?t.state=R.PROC_INST_ENDING:t.procInstBody+=r;continue;case R.PROC_INST_ENDING:">"===r?(M(t,"onprocessinginstruction",{name:t.procInstName,body:t.procInstBody}),t.procInstName=t.procInstBody="",t.state=R.TEXT):(t.procInstBody+="?"+r,t.state=R.PROC_INST_BODY);continue;case R.OPEN_TAG:T(m,r)?t.tagName+=r:(L(t),">"===r?U(t):"/"===r?t.state=R.OPEN_TAG_SLASH:(S(f,r)&&P(t,"Invalid character in tag name"),t.state=R.ATTRIB));continue;case R.OPEN_TAG_SLASH:">"===r?(U(t,!0),k(t)):(P(t,"Forward-slash in opening tag not followed by >"),t.state=R.ATTRIB);continue;case R.ATTRIB:if(T(f,r))continue;">"===r?U(t):"/"===r?t.state=R.OPEN_TAG_SLASH:T(E,r)?(t.attribName=r,t.attribValue="",t.state=R.ATTRIB_NAME):P(t,"Invalid attribute name");continue;case R.ATTRIB_NAME:"="===r?t.state=R.ATTRIB_VALUE:">"===r?(P(t,"Attribute without value"),t.attribValue=t.attribName,F(t),U(t)):T(f,r)?t.state=R.ATTRIB_NAME_SAW_WHITE:T(m,r)?t.attribName+=r:P(t,"Invalid attribute name");continue;case R.ATTRIB_NAME_SAW_WHITE:if("="===r)t.state=R.ATTRIB_VALUE;else{if(T(f,r))continue;P(t,"Attribute without value"),t.tag.attributes[t.attribName]="",t.attribValue="",M(t,"onattribute",{name:t.attribName,value:""}),t.attribName="",">"===r?U(t):T(E,r)?(t.attribName=r,t.state=R.ATTRIB_NAME):(P(t,"Invalid attribute name"),t.state=R.ATTRIB)}continue;case R.ATTRIB_VALUE:if(T(f,r))continue;T(d,r)?(t.q=r,t.state=R.ATTRIB_VALUE_QUOTED):(P(t,"Unquoted attribute value"),t.state=R.ATTRIB_VALUE_UNQUOTED,t.attribValue=r);continue;case R.ATTRIB_VALUE_QUOTED:if(r!==t.q){"&"===r?t.state=R.ATTRIB_VALUE_ENTITY_Q:t.attribValue+=r;continue}F(t),t.q="",t.state=R.ATTRIB_VALUE_CLOSED;continue;case R.ATTRIB_VALUE_CLOSED:T(f,r)?t.state=R.ATTRIB:">"===r?U(t):"/"===r?t.state=R.OPEN_TAG_SLASH:T(E,r)?(P(t,"No whitespace between attributes"),t.attribName=r,t.attribValue="",t.state=R.ATTRIB_NAME):P(t,"Invalid attribute name");continue;case R.ATTRIB_VALUE_UNQUOTED:if(S(c,r)){"&"===r?t.state=R.ATTRIB_VALUE_ENTITY_U:t.attribValue+=r;continue}F(t),">"===r?U(t):t.state=R.ATTRIB;continue;case R.CLOSE_TAG:if(t.tagName)">"===r?k(t):T(m,r)?t.tagName+=r:t.script?(t.script+="</"+t.tagName,t.tagName="",t.state=R.SCRIPT):(S(f,r)&&P(t,"Invalid tagname in closing tag"),t.state=R.CLOSE_TAG_SAW_WHITE);else{if(T(f,r))continue;S(E,r)?t.script?(t.script+="</"+r,t.state=R.SCRIPT):P(t,"Invalid tagname in closing tag."):t.tagName=r}continue;case R.CLOSE_TAG_SAW_WHITE:if(T(f,r))continue;">"===r?k(t):P(t,"Invalid characters in closing tag");continue;case R.TEXT_ENTITY:case R.ATTRIB_VALUE_ENTITY_Q:case R.ATTRIB_VALUE_ENTITY_U:var o,s;switch(t.state){case R.TEXT_ENTITY:o=R.TEXT,s="textNode";break;case R.ATTRIB_VALUE_ENTITY_Q:o=R.ATTRIB_VALUE_QUOTED,s="attribValue";break;case R.ATTRIB_VALUE_ENTITY_U:o=R.ATTRIB_VALUE_UNQUOTED,s="attribValue"}";"===r?(t[s]+=B(t),t.entity="",t.state=o):T(t.entity.length?y:v,r)?t.entity+=r:(P(t,"Invalid character in entity name"),t[s]+="&"+t.entity+r,t.entity="",t.state=o);continue;default:throw new Error(t,"Unknown state: "+t.state)}t.position>=t.bufferCheckPosition&&function(e){for(var t=Math.max(u.MAX_BUFFER_LENGTH,10),n=0,r=0,i=l.length;r<i;r++){var a=e[l[r]].length;if(t<a)switch(l[r]){case"textNode":C(e);break;case"cdata":M(e,"oncdata",e.cdata),e.cdata="";break;case"script":M(e,"onscript",e.script),e.script="";break;default:N(e,"Max buffer length exceeded: "+l[r])}n=Math.max(n,a)}var o=u.MAX_BUFFER_LENGTH-n;e.bufferCheckPosition=o+e.position}(t);return t},resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){var e;C(e=this),""!==e.cdata&&(M(e,"oncdata",e.cdata),e.cdata=""),""!==e.script&&(M(e,"onscript",e.script),e.script="")}};try{r=H(41).Stream}catch(e){r=function(){}}var a=u.EVENTS.filter(function(e){return"error"!==e&&"end"!==e});function o(e,t){if(!(this instanceof o))return new o(e,t);r.apply(this),this._parser=new i(e,t),this.writable=!0,this.readable=!0;var n=this;this._parser.onend=function(){n.emit("end")},this._parser.onerror=function(e){n.emit("error",e),n._parser.error=null},this._decoder=null,a.forEach(function(t){Object.defineProperty(n,"on"+t,{get:function(){return n._parser["on"+t]},set:function(e){if(!e)return n.removeAllListeners(t),n._parser["on"+t]=e;n.on(t,e)},enumerable:!0,configurable:!1})})}(o.prototype=Object.create(r.prototype,{constructor:{value:o}})).write=function(e){if("function"==typeof q&&"function"==typeof q.isBuffer&&q.isBuffer(e)){if(!this._decoder){var t=H(42).StringDecoder;this._decoder=new t("utf8")}e=this._decoder.write(e)}return this._parser.write(e.toString()),this.emit("data",e),!0},o.prototype.end=function(e){return e&&e.length&&this.write(e),this._parser.end(),!0},o.prototype.on=function(t,e){var n=this;return n._parser["on"+t]||-1===a.indexOf(t)||(n._parser["on"+t]=function(){var e=1===arguments.length?[arguments[0]]:Array.apply(null,arguments);e.splice(0,0,t),n.emit.apply(n,e)}),r.prototype.on.call(n,t,e)};var f="\r\n\t ",e="0124356789",t="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",d="'\"",c=f+">",h="[CDATA[",p="DOCTYPE",s="http://www.w3.org/XML/1998/namespace",g="http://www.w3.org/2000/xmlns/",_={xml:s,xmlns:g};f=n(f),e=n(e),t=n(t);var E=/[:_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]/,m=/[:_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-]/,v=/[#:_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]/,y=/[#:_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 n(e){return e.split("").reduce(function(e,t){return e[t]=!0,e},{})}function T(e,t){return n=e,"[object RegExp]"===Object.prototype.toString.call(n)?t.match(e):e[t];var n}function S(e,t){return!T(e,t)}d=n(d),c=n(c);var A,I,R=0;for(var b in u.STATE={BEGIN:R++,BEGIN_WHITESPACE:R++,TEXT:R++,TEXT_ENTITY:R++,OPEN_WAKA:R++,SGML_DECL:R++,SGML_DECL_QUOTED:R++,DOCTYPE:R++,DOCTYPE_QUOTED:R++,DOCTYPE_DTD:R++,DOCTYPE_DTD_QUOTED:R++,COMMENT_STARTING:R++,COMMENT:R++,COMMENT_ENDING:R++,COMMENT_ENDED:R++,CDATA:R++,CDATA_ENDING:R++,CDATA_ENDING_2:R++,PROC_INST:R++,PROC_INST_BODY:R++,PROC_INST_ENDING:R++,OPEN_TAG:R++,OPEN_TAG_SLASH:R++,ATTRIB:R++,ATTRIB_NAME:R++,ATTRIB_NAME_SAW_WHITE:R++,ATTRIB_VALUE:R++,ATTRIB_VALUE_QUOTED:R++,ATTRIB_VALUE_CLOSED:R++,ATTRIB_VALUE_UNQUOTED:R++,ATTRIB_VALUE_ENTITY_Q:R++,ATTRIB_VALUE_ENTITY_U:R++,CLOSE_TAG:R++,CLOSE_TAG_SAW_WHITE:R++,SCRIPT:R++,SCRIPT_ENDING:R++},u.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},u.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(u.ENTITIES).forEach(function(e){var t=u.ENTITIES[e],n="number"==typeof t?String.fromCharCode(t):t;u.ENTITIES[e]=n}),u.STATE)u.STATE[u.STATE[b]]=b;function D(e,t,n){e[t]&&e[t](n)}function M(e,t,n){e.textNode&&C(e),D(e,t,n)}function C(e){e.textNode=w(e.opt,e.textNode),e.textNode&&D(e,"ontext",e.textNode),e.textNode=""}function w(e,t){return e.trim&&(t=t.trim()),e.normalize&&(t=t.replace(/\s+/g," ")),t}function N(e,t){return C(e),e.trackPosition&&(t+="\nLine: "+e.line+"\nColumn: "+e.column+"\nChar: "+e.c),t=new Error(t),e.error=t,D(e,"onerror",t),e}function O(e){return e.sawRoot&&!e.closedRoot&&P(e,"Unclosed root tag"),e.state!==R.BEGIN&&e.state!==R.BEGIN_WHITESPACE&&e.state!==R.TEXT&&N(e,"Unexpected end"),C(e),e.c="",e.closed=!0,D(e,"onend"),i.call(e,e.strict,e.opt),e}function P(e,t){if("object"!=typeof e||!(e instanceof i))throw new Error("bad call to strictFail");e.strict&&N(e,t)}function L(e){e.strict||(e.tagName=e.tagName[e.looseCase]());var t=e.tags[e.tags.length-1]||e,n=e.tag={name:e.tagName,attributes:{}};e.opt.xmlns&&(n.ns=t.ns),e.attribList.length=0,M(e,"onopentagstart",n)}function x(e,t){var n=e.indexOf(":")<0?["",e]:e.split(":"),r=n[0],i=n[1];return t&&"xmlns"===e&&(r="xmlns",i=""),{prefix:r,local:i}}function F(e){if(e.strict||(e.attribName=e.attribName[e.looseCase]()),-1!==e.attribList.indexOf(e.attribName)||e.tag.attributes.hasOwnProperty(e.attribName))e.attribName=e.attribValue="";else{if(e.opt.xmlns){var t=x(e.attribName,!0),n=t.prefix,r=t.local;if("xmlns"===n)if("xml"===r&&e.attribValue!==s)P(e,"xml: prefix must be bound to "+s+"\nActual: "+e.attribValue);else if("xmlns"===r&&e.attribValue!==g)P(e,"xmlns: prefix must be bound to "+g+"\nActual: "+e.attribValue);else{var i=e.tag,a=e.tags[e.tags.length-1]||e;i.ns===a.ns&&(i.ns=Object.create(a.ns)),i.ns[r]=e.attribValue}e.attribList.push([e.attribName,e.attribValue])}else e.tag.attributes[e.attribName]=e.attribValue,M(e,"onattribute",{name:e.attribName,value:e.attribValue});e.attribName=e.attribValue=""}}function U(t,e){if(t.opt.xmlns){var n=t.tag,r=x(t.tagName);n.prefix=r.prefix,n.local=r.local,n.uri=n.ns[r.prefix]||"",n.prefix&&!n.uri&&(P(t,"Unbound namespace prefix: "+JSON.stringify(t.tagName)),n.uri=r.prefix);var i=t.tags[t.tags.length-1]||t;n.ns&&i.ns!==n.ns&&Object.keys(n.ns).forEach(function(e){M(t,"onopennamespace",{prefix:e,uri:n.ns[e]})});for(var a=0,o=t.attribList.length;a<o;a++){var s=t.attribList[a],u=s[0],l=s[1],f=x(u,!0),d=f.prefix,c=f.local,h=""!==d&&n.ns[d]||"",p={name:u,value:l,prefix:d,local:c,uri:h};d&&"xmlns"!==d&&!h&&(P(t,"Unbound namespace prefix: "+JSON.stringify(d)),p.uri=d),t.tag.attributes[u]=p,M(t,"onattribute",p)}t.attribList.length=0}t.tag.isSelfClosing=!!e,t.sawRoot=!0,t.tags.push(t.tag),M(t,"onopentag",t.tag),e||(t.noscript||"script"!==t.tagName.toLowerCase()?t.state=R.TEXT:t.state=R.SCRIPT,t.tag=null,t.tagName=""),t.attribName=t.attribValue="",t.attribList.length=0}function k(n){if(!n.tagName)return P(n,"Weird empty close tag."),n.textNode+="</>",void(n.state=R.TEXT);if(n.script){if("script"!==n.tagName)return n.script+="</"+n.tagName+">",n.tagName="",void(n.state=R.SCRIPT);M(n,"onscript",n.script),n.script=""}var e=n.tags.length,t=n.tagName;n.strict||(t=t[n.looseCase]());for(var r=t;e--;){if(n.tags[e].name===r)break;P(n,"Unexpected close tag")}if(e<0)return P(n,"Unmatched closing tag: "+n.tagName),n.textNode+="</"+n.tagName+">",void(n.state=R.TEXT);n.tagName=t;for(var i=n.tags.length;i-- >e;){var a=n.tag=n.tags.pop();n.tagName=n.tag.name,M(n,"onclosetag",n.tagName);var o={};for(var s in a.ns)o[s]=a.ns[s];var u=n.tags[n.tags.length-1]||n;n.opt.xmlns&&a.ns!==u.ns&&Object.keys(a.ns).forEach(function(e){var t=a.ns[e];M(n,"onclosenamespace",{prefix:e,uri:t})})}0===e&&(n.closedRoot=!0),n.tagName=n.attribValue=n.attribName="",n.attribList.length=0,n.state=R.TEXT}function B(e){var t,n=e.entity,r=n.toLowerCase(),i="";return e.ENTITIES[n]?e.ENTITIES[n]:e.ENTITIES[r]?e.ENTITIES[r]:("#"===(n=r).charAt(0)&&(i="x"===n.charAt(1)?(n=n.slice(2),(t=parseInt(n,16)).toString(16)):(n=n.slice(1),(t=parseInt(n,10)).toString(10))),n=n.replace(/^0+/,""),i.toLowerCase()!==n?(P(e,"Invalid character entity"),"&"+e.entity+";"):String.fromCodePoint(t))}function G(e,t){"<"===t?(e.state=R.OPEN_WAKA,e.startTagPosition=e.position):S(f,t)&&(P(e,"Non-whitespace before first tag."),e.textNode=t,e.state=R.TEXT)}function j(e,t){var n="";return t<e.length&&(n=e.charAt(t)),n}function Y(){var e,t,n=[],r=-1,i=arguments.length;if(!i)return"";for(var a="";++r<i;){var o=Number(arguments[r]);if(!isFinite(o)||o<0||1114111<o||I(o)!==o)throw RangeError("Invalid code point: "+o);o<=65535?n.push(o):(e=55296+((o-=65536)>>10),t=o%1024+56320,n.push(e,t)),(r+1===i||16384<n.length)&&(a+=A.apply(null,n),n.length=0)}return a}R=u.STATE,String.fromCodePoint||(A=String.fromCharCode,I=Math.floor,Object.defineProperty?Object.defineProperty(String,"fromCodePoint",{value:Y,configurable:!0,writable:!0}):String.fromCodePoint=Y)}(void 0===t?this.sax={}:t)}).call(this,H(8).Buffer)},{41:41,42:42,8:8}],41:[function(e,t,n){t.exports=r;var f=e(11).EventEmitter;function r(){f.call(this)}e(21)(r,f),r.Readable=e(36),r.Writable=e(38),r.Duplex=e(26),r.Transform=e(37),r.PassThrough=e(35),(r.Stream=r).prototype.pipe=function(t,e){var n=this;function r(e){t.writable&&!1===t.write(e)&&n.pause&&n.pause()}function i(){n.readable&&n.resume&&n.resume()}n.on("data",r),t.on("drain",i),t._isStdio||e&&!1===e.end||(n.on("end",o),n.on("close",s));var a=!1;function o(){a||(a=!0,t.end())}function s(){a||(a=!0,"function"==typeof t.destroy&&t.destroy())}function u(e){if(l(),0===f.listenerCount(this,"error"))throw e}function l(){n.removeListener("data",r),t.removeListener("drain",i),n.removeListener("end",o),n.removeListener("close",s),n.removeListener("error",u),t.removeListener("error",u),n.removeListener("end",l),n.removeListener("close",l),t.removeListener("close",l)}return n.on("error",u),t.on("error",u),n.on("end",l),n.on("close",l),t.on("close",l),t.emit("pipe",n),t}},{11:11,21:21,26:26,35:35,36:36,37:37,38:38}],42:[function(e,t,n){"use strict";var r=e(39).Buffer,i=r.isEncoding||function(e){switch((e=""+e)&&e.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 a(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){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 e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(r.isEncoding===i||!i(e)))throw new Error("Unknown encoding: "+e);return t||e}function o(e){var t;switch(this.encoding=a(e),this.encoding){case"utf16le":this.text=l,this.end=f,t=4;break;case"utf8":this.fillLast=u,t=4;break;case"base64":this.text=d,this.end=c,t=3;break;default:return this.write=h,void(this.end=p)}this.lastNeed=0,this.lastTotal=0,this.lastChar=r.allocUnsafe(t)}function s(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function u(e){var t=this.lastTotal-this.lastNeed,n=function(e,t){if(128!=(192&t[0]))return e.lastNeed=0,"锟<>";if(1<e.lastNeed&&1<t.length){if(128!=(192&t[1]))return e.lastNeed=1,"锟<>";if(2<e.lastNeed&&2<t.length&&128!=(192&t[2]))return e.lastNeed=2,"锟<>"}}(this,e);return void 0!==n?n:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function l(e,t){if((e.length-t)%2!=0)return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1);var n=e.toString("utf16le",t);if(n){var r=n.charCodeAt(n.length-1);if(55296<=r&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],n.slice(0,-1)}return n}function f(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,n)}return t}function d(e,t){var n=(e.length-t)%3;return 0==n?e.toString("base64",t):(this.lastNeed=3-n,this.lastTotal=3,1==n?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-n))}function c(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function h(e){return e.toString(this.encoding)}function p(e){return e&&e.length?this.write(e):""}(n.StringDecoder=o).prototype.write=function(e){if(0===e.length)return"";var t,n;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n<e.length?t?t+this.text(e,n):this.text(e,n):t||""},o.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"锟<>":t},o.prototype.text=function(e,t){var n=function(e,t,n){var r=t.length-1;if(r<n)return 0;var i=s(t[r]);if(0<=i)return 0<i&&(e.lastNeed=i-1),i;if(--r<n||-2===i)return 0;if(0<=(i=s(t[r])))return 0<i&&(e.lastNeed=i-2),i;if(--r<n||-2===i)return 0;if(0<=(i=s(t[r])))return 0<i&&(2===i?i=0:e.lastNeed=i-3),i;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=n;var r=e.length-(n-this.lastNeed);return e.copy(this.lastChar,0,r),e.toString("utf8",t,r)},o.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},{39:39}],43:[function(u,e,l){(function(e,t){var r=u(25).nextTick,n=Function.prototype.apply,i=Array.prototype.slice,a={},o=0;function s(e,t){this._id=e,this._clearFn=t}l.setTimeout=function(){return new s(n.call(setTimeout,window,arguments),clearTimeout)},l.setInterval=function(){return new s(n.call(setInterval,window,arguments),clearInterval)},l.clearTimeout=l.clearInterval=function(e){e.close()},s.prototype.unref=s.prototype.ref=function(){},s.prototype.close=function(){this._clearFn.call(window,this._id)},l.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},l.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},l._unrefActive=l.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;0<=t&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},t))},l.setImmediate="function"==typeof e?e:function(e){var t=o++,n=!(arguments.length<2)&&i.call(arguments,1);return a[t]=!0,r(function(){a[t]&&(n?e.apply(null,n):e.call(null),l.clearImmediate(t))}),t},l.clearImmediate="function"==typeof t?t:function(e){delete a[e]}}).call(this,u(43).setImmediate,u(43).clearImmediate)},{25:25,43:43}],44:[function(e,t,n){(function(n){function r(e){try{if(!n.localStorage)return}catch(e){return}var t=n.localStorage[e];return null!=t&&"true"===String(t).toLowerCase()}t.exports=function(e,t){if(r("noDeprecation"))return e;var n=!1;return function(){if(!n){if(r("throwDeprecation"))throw new Error(t);r("traceDeprecation")?console.trace(t):console.warn(t),n=!0}return e.apply(this,arguments)}}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],45:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var a=r(e(46)),h=r(e(54)),i=r(e(47)),o=1,p=2,g=3,_=4,E=5;function s(e){e=e||{};var t,n=this.context,s=(0,a.default)(n).getInstance(),u=e.settings,l=[],f=void 0,d=void 0,c=void 0;function r(e){return e&&e.bind?e.bind(window.console):window.console.log.bind(window.console)}function i(e,t){var n="",r=null;f&&(r=(new Date).getTime(),n+="["+(r-c)+"]"),d&&t&&t.getClassName&&(n+="["+t.getClassName()+"]",t.getType&&(n+="["+t.getType()+"]")),0<n.length&&(n+=" ");for(var i=arguments.length,a=Array(2<i?i-2:0),o=2;o<i;o++)a[o-2]=arguments[o];Array.apply(null,a).forEach(function(e){n+=e+" "}),l[e]&&u.get().debug.logLevel>=e&&l[e](n),s.trigger(h.default.LOG,{message:n,level:e})}return t={getLogger:function(e){return{fatal:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];i.apply(void 0,[o,this].concat(t))}.bind(e),error:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];i.apply(void 0,[p,this].concat(t))}.bind(e),warn:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];i.apply(void 0,[g,this].concat(t))}.bind(e),info:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];i.apply(void 0,[_,this].concat(t))}.bind(e),debug:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];i.apply(void 0,[E,this].concat(t))}.bind(e)}},setLogTimestampVisible:function(e){f=e},setCalleeNameVisible:function(e){d=e}},d=f=!0,c=(new Date).getTime(),"undefined"!=typeof window&&window.console&&(l[o]=r(window.console.error),l[p]=r(window.console.error),l[g]=r(window.console.warn),l[_]=r(window.console.info),l[E]=r(window.console.debug)),t}s.__dashjs_factory_name="Debug";var u=i.default.getSingletonFactory(s);u.LOG_LEVEL_NONE=0,u.LOG_LEVEL_FATAL=o,u.LOG_LEVEL_ERROR=p,u.LOG_LEVEL_WARNING=g,u.LOG_LEVEL_INFO=_,u.LOG_LEVEL_DEBUG=E,i.default.updateSingletonFactory(s.__dashjs_factory_name,u),n.default=u,t.exports=n.default},{46:46,47:47,54:54}],46:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r,i=e(47),a=(r=i)&&r.__esModule?r:{default:r};function o(){var a={};function o(e,n,r){var i=-1;return a[e]&&a[e].some(function(e,t){if(e&&e.callback===n&&(!r||r===e.scope))return i=t,!0}),i}return{on:function(n,e,t){var r=arguments.length<=3||void 0===arguments[3]?0:arguments[3];if(!n)throw new Error("event type cannot be null or undefined");if(!e||"function"!=typeof e)throw new Error("listener must be a function: "+e);if(!(0<=o(n,e,t))){a[n]=a[n]||[];var i={callback:e,scope:t,priority:r};a[n].some(function(e,t){if(e&&r>e.priority)return a[n].splice(t,0,i),!0})||a[n].push(i)}},off:function(e,t,n){if(e&&t&&a[e]){var r=o(e,t,n);r<0||(a[e][r]=null)}},trigger:function(e,t){if(e&&a[e]){if((t=t||{}).hasOwnProperty("type"))throw new Error("'type' is a reserved word for event dispatching");t.type=e,a[e]=a[e].filter(function(e){return e}),a[e].forEach(function(e){return e&&e.callback.call(e.scope,t)})}},reset:function(){a={}}}}o.__dashjs_factory_name="EventBus";var s=a.default.getSingletonFactory(o);s.EVENT_PRIORITY_LOW=0,s.EVENT_PRIORITY_HIGH=5e3,a.default.updateSingletonFactory(o.__dashjs_factory_name,s),n.default=s,t.exports=n.default},{47:47}],47:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var u,a,r,i,o=(u=void 0,a=[],r={},i={},u={extend:function(e,t,n,r){!r[e]&&t&&(r[e]={instance:t,override:n})},getSingletonInstance:s,setSingletonInstance:function(e,t,n){for(var r in a){var i=a[r];if(i.context===e&&i.name===t)return void(a[r].instance=n)}a.push({name:t,context:e,instance:n})},getSingletonFactory:function(n){var e=l(n.__dashjs_factory_name,r);return e||(e=function(e){var t=void 0;return void 0===e&&(e={}),{getInstance:function(){return(t=t||s(e,n.__dashjs_factory_name))||(t=d(n,e,arguments),a.push({name:n.__dashjs_factory_name,context:e,instance:t})),t}}},r[n.__dashjs_factory_name]=e),e},getSingletonFactoryByName:function(e){return l(e,r)},updateSingletonFactory:function(e,t){f(e,t,r)},getClassFactory:function(t){var e=l(t.__dashjs_factory_name,i);return e||(e=function(e){return void 0===e&&(e={}),{create:function(){return d(t,e,arguments)}}},i[t.__dashjs_factory_name]=e),e},getClassFactoryByName:function(e){return l(e,i)},updateClassFactory:function(e,t){f(e,t,i)}});function s(e,t){for(var n in a){var r=a[n];if(r.context===e&&r.name===t)return r.instance}return null}function l(e,t){return t[e]}function f(e,t,n){e in n&&(n[e]=t)}function d(e,t,n){var r=void 0,i=e.__dashjs_factory_name,a=t[i];if(a){var o=a.instance;if(!a.override)return o.apply({context:t,factory:u},n);for(var s in r=e.apply({context:t},n),o=o.apply({context:t,factory:u,parent:r},n))r.hasOwnProperty(s)&&(r[s]=o[s])}else r=e.apply({context:t},n);return r.getClassName=function(){return i},r}n.default=o,t.exports=n.default},{}],48:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Object.defineProperty(n,"__esModule",{value:!0});var a=r(e(47)),o=r(e(49)),s=r(e(45)),u=r(e(108)),l=e(242);function f(){var e,t,n={debug:{logLevel:s.default.LOG_LEVEL_WARNING},streaming:{metricsMaxListDepth:1e3,abandonLoadTimeout:1e4,liveDelayFragmentCount:NaN,liveDelay:null,scheduleWhilePaused:!0,fastSwitchEnabled:!1,bufferPruningInterval:10,bufferToKeep:20,bufferAheadToKeep:80,jumpGaps:!0,smallGapLimit:1.5,stableBufferTime:12,bufferTimeAtTopQuality:30,bufferTimeAtTopQualityLongForm:60,longFormContentDurationThreshold:600,wallclockTimeUpdateInterval:50,lowLatencyEnabled:!1,keepProtectionMediaKeys:!1,useManifestDateHeaderTimeSource:!0,useSuggestedPresentationDelay:!0,useAppendWindowEnd:!0,manifestUpdateRetryInterval:100,liveCatchUpMinDrift:.02,liveCatchUpMaxDrift:0,liveCatchUpPlaybackRate:.5,lastBitrateCachingInfo:{enabled:!0,ttl:36e4},lastMediaSettingsCachingInfo:{enabled:!0,ttl:36e4},cacheLoadThresholds:{video:50,audio:5},retryIntervals:(i(e={},l.HTTPRequest.MPD_TYPE,500),i(e,l.HTTPRequest.XLINK_EXPANSION_TYPE,500),i(e,l.HTTPRequest.MEDIA_SEGMENT_TYPE,1e3),i(e,l.HTTPRequest.INIT_SEGMENT_TYPE,1e3),i(e,l.HTTPRequest.BITSTREAM_SWITCHING_SEGMENT_TYPE,1e3),i(e,l.HTTPRequest.INDEX_SEGMENT_TYPE,1e3),i(e,l.HTTPRequest.OTHER_TYPE,1e3),e),retryAttempts:(i(t={},l.HTTPRequest.MPD_TYPE,3),i(t,l.HTTPRequest.XLINK_EXPANSION_TYPE,1),i(t,l.HTTPRequest.MEDIA_SEGMENT_TYPE,3),i(t,l.HTTPRequest.INIT_SEGMENT_TYPE,3),i(t,l.HTTPRequest.BITSTREAM_SWITCHING_SEGMENT_TYPE,3),i(t,l.HTTPRequest.INDEX_SEGMENT_TYPE,3),i(t,l.HTTPRequest.OTHER_TYPE,3),t),abr:{movingAverageMethod:u.default.MOVING_AVERAGE_SLIDING_WINDOW,ABRStrategy:u.default.ABR_STRATEGY_DYNAMIC,bandwidthSafetyFactor:.9,useDefaultABRRules:!0,useBufferOccupancyABR:!1,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}},cmcd:{enabled:!1,sid:null,cid:null,did:null}}},r=o.default.clone(n);return{get:function(){return r},update:function(e){"object"==typeof e&&!function e(t,n,r){for(var i in t)t.hasOwnProperty(i)&&n.hasOwnProperty(i)&&("object"==typeof t[i]&&null!==t[i]?e(t[i],n[i],r.slice()+i+"."):n[i]=o.default.clone(t[i]))}(e,r,"")},reset:function(){r=o.default.clone(n)}}}f.__dashjs_factory_name="Settings";var d=a.default.getSingletonFactory(f);n.default=d,t.exports=n.default},{108:108,242:242,45:45,47:47,49:49}],49:[function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}Object.defineProperty(n,"__esModule",{value:!0});var i=(function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}(o,null,[{key:"mixin",value:function(e,t,n){var r=void 0,i={};if(e)for(var a in t)t.hasOwnProperty(a)&&(r=t[a],a in e&&(e[a]===r||a in i&&i[a]===r)||("object"==typeof e[a]&&null!==e[a]?e[a]=o.mixin(e[a],r,n):e[a]=n(r)));return e}},{key:"clone",value:function(e){if(!e||"object"!=typeof e)return e;var t=void 0;if(e instanceof Array){t=[];for(var n=0,r=e.length;n<r;++n)n in e&&t.push(o.clone(e[n]))}else t={};return o.mixin(t,e,o.clone)}},{key:"addAditionalQueryParameterToUrl",value:function(n,e){try{var t=function(){if(!e||0===e.length)return{v:n};var t=new URL(n);return e.forEach(function(e){e.key&&e.value&&t.searchParams.set(e.key,e.value)}),{v:t.href}}();if("object"==typeof t)return t.v}catch(e){return n}}},{key:"generateUuid",value:function(){var n=(new Date).getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=(n+16*Math.random())%16|0;return n=Math.floor(n/16),("x"==e?t:3&t|8).toString(16)})}},{key:"generateHashCode",value:function(e){var t=0;if(0===e.length)return t;for(var n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t|=0;return t}}]),o);function o(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o)}n.default=i,t.exports=n.default},{}],50:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getVersionString=function(){return r};var r="3.1.0"},{}],51:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r,i=e(52);function a(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),function(e,t,n){for(var r=!0;r;){var i=e,a=t,o=n;r=!1,null===i&&(i=Function.prototype);var s=Object.getOwnPropertyDescriptor(i,a);if(void 0!==s){if("value"in s)return s.value;var u=s.get;if(void 0===u)return;return u.call(o)}var l=Object.getPrototypeOf(i);if(null===l)return;e=l,t=a,n=o,r=!0,s=l=void 0}}(Object.getPrototypeOf(a.prototype),"constructor",this).call(this),this.MANIFEST_LOADER_PARSING_FAILURE_ERROR_CODE=10,this.MANIFEST_LOADER_LOADING_FAILURE_ERROR_CODE=11,this.XLINK_LOADER_LOADING_FAILURE_ERROR_CODE=12,this.SEGMENTS_UPDATE_FAILED_ERROR_CODE=13,this.SEGMENTS_UNAVAILABLE_ERROR_CODE=14,this.SEGMENT_BASE_LOADER_ERROR_CODE=15,this.TIME_SYNC_FAILED_ERROR_CODE=16,this.FRAGMENT_LOADER_LOADING_FAILURE_ERROR_CODE=17,this.FRAGMENT_LOADER_NULL_REQUEST_ERROR_CODE=18,this.URL_RESOLUTION_FAILED_GENERIC_ERROR_CODE=19,this.APPEND_ERROR_CODE=20,this.REMOVE_ERROR_CODE=21,this.DATA_UPDATE_FAILED_ERROR_CODE=22,this.CAPABILITY_MEDIASOURCE_ERROR_CODE=23,this.CAPABILITY_MEDIAKEYS_ERROR_CODE=24,this.DOWNLOAD_ERROR_ID_MANIFEST_CODE=25,this.DOWNLOAD_ERROR_ID_SIDX_CODE=26,this.DOWNLOAD_ERROR_ID_CONTENT_CODE=27,this.DOWNLOAD_ERROR_ID_INITIALIZATION_CODE=28,this.DOWNLOAD_ERROR_ID_XLINK_CODE=29,this.MANIFEST_ERROR_ID_CODEC_CODE=30,this.MANIFEST_ERROR_ID_PARSE_CODE=31,this.MANIFEST_ERROR_ID_NOSTREAMS_CODE=32,this.TIMED_TEXT_ERROR_ID_PARSE_CODE=33,this.MANIFEST_ERROR_ID_MULTIPLEXED_CODE=34,this.MEDIASOURCE_TYPE_UNSUPPORTED_CODE=35,this.MANIFEST_LOADER_PARSING_FAILURE_ERROR_MESSAGE="parsing failed for ",this.MANIFEST_LOADER_LOADING_FAILURE_ERROR_MESSAGE="Failed loading manifest: ",this.XLINK_LOADER_LOADING_FAILURE_ERROR_MESSAGE="Failed loading Xlink element: ",this.SEGMENTS_UPDATE_FAILED_ERROR_MESSAGE="Segments update failed",this.SEGMENTS_UNAVAILABLE_ERROR_MESSAGE="no segments are available yet",this.SEGMENT_BASE_LOADER_ERROR_MESSAGE="error loading segments",this.TIME_SYNC_FAILED_ERROR_MESSAGE="Failed to synchronize time",this.FRAGMENT_LOADER_NULL_REQUEST_ERROR_MESSAGE="request is null",this.URL_RESOLUTION_FAILED_GENERIC_ERROR_MESSAGE="Failed to resolve a valid URL",this.APPEND_ERROR_MESSAGE="chunk is not defined",this.REMOVE_ERROR_MESSAGE="buffer is not defined",this.DATA_UPDATE_FAILED_ERROR_MESSAGE="Data update failed",this.CAPABILITY_MEDIASOURCE_ERROR_MESSAGE="mediasource is not supported",this.CAPABILITY_MEDIAKEYS_ERROR_MESSAGE="mediakeys is not supported",this.TIMED_TEXT_ERROR_MESSAGE_PARSE="parsing error :",this.MEDIASOURCE_TYPE_UNSUPPORTED_MESSAGE="Error creating source buffer of type : "}var o=new(function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(a,((r=i)&&r.__esModule?r:{default:r}).default),a);n.default=o,t.exports=n.default},{52:52}],52:[function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}Object.defineProperty(n,"__esModule",{value:!0});var i=(function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}(a,[{key:"extend",value:function(e,t){if(e){var n=!!t&&t.override,r=!!t&&t.publicOnly;for(var i in e)!e.hasOwnProperty(i)||this[i]&&!n||r&&-1===e[i].indexOf("public_")||(this[i]=e[i])}}}]),a);function a(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a)}n.default=i,t.exports=n.default},{}],53:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r,i=e(55),a=(function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(o,((r=i)&&r.__esModule?r:{default:r}).default),o);function o(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),function(e,t,n){for(var r=!0;r;){var i=e,a=t,o=n;r=!1,null===i&&(i=Function.prototype);var s=Object.getOwnPropertyDescriptor(i,a);if(void 0!==s){if("value"in s)return s.value;var u=s.get;if(void 0===u)return;return u.call(o)}var l=Object.getPrototypeOf(i);if(null===l)return;e=l,t=a,n=o,r=!0,s=l=void 0}}(Object.getPrototypeOf(o.prototype),"constructor",this).call(this),this.BUFFERING_COMPLETED="bufferingCompleted",this.BUFFER_CLEARED="bufferCleared",this.BUFFER_LEVEL_UPDATED="bufferLevelUpdated",this.BYTES_APPENDED="bytesAppended",this.BYTES_APPENDED_END_FRAGMENT="bytesAppendedEndFragment",this.CHECK_FOR_EXISTENCE_COMPLETED="checkForExistenceCompleted",this.CURRENT_TRACK_CHANGED="currentTrackChanged",this.DATA_UPDATE_COMPLETED="dataUpdateCompleted",this.DATA_UPDATE_STARTED="dataUpdateStarted",this.INITIALIZATION_LOADED="initializationLoaded",this.INIT_FRAGMENT_LOADED="initFragmentLoaded",this.INIT_REQUESTED="initRequested",this.INTERNAL_MANIFEST_LOADED="internalManifestLoaded",this.ORIGINAL_MANIFEST_LOADED="originalManifestLoaded",this.LIVE_EDGE_SEARCH_COMPLETED="liveEdgeSearchCompleted",this.LOADING_COMPLETED="loadingCompleted",this.LOADING_PROGRESS="loadingProgress",this.LOADING_DATA_PROGRESS="loadingDataProgress",this.LOADING_ABANDONED="loadingAborted",this.MANIFEST_UPDATED="manifestUpdated",this.MEDIA_FRAGMENT_LOADED="mediaFragmentLoaded",this.QUOTA_EXCEEDED="quotaExceeded",this.REPRESENTATION_UPDATE_STARTED="representationUpdateStarted",this.REPRESENTATION_UPDATE_COMPLETED="representationUpdateCompleted",this.SEGMENTS_LOADED="segmentsLoaded",this.SERVICE_LOCATION_BLACKLIST_ADD="serviceLocationBlacklistAdd",this.SERVICE_LOCATION_BLACKLIST_CHANGED="serviceLocationBlacklistChanged",this.SOURCEBUFFER_REMOVE_COMPLETED="sourceBufferRemoveCompleted",this.STREAMS_COMPOSED="streamsComposed",this.STREAM_BUFFERING_COMPLETED="streamBufferingCompleted",this.STREAM_COMPLETED="streamCompleted",this.TEXT_TRACKS_QUEUE_INITIALIZED="textTracksQueueInitialized",this.TIMED_TEXT_REQUESTED="timedTextRequested",this.TIME_SYNCHRONIZATION_COMPLETED="timeSynchronizationComplete",this.URL_RESOLUTION_FAILED="urlResolutionFailed",this.VIDEO_CHUNK_RECEIVED="videoChunkReceived",this.WALLCLOCK_TIME_UPDATED="wallclockTimeUpdated",this.XLINK_ELEMENT_LOADED="xlinkElementLoaded",this.XLINK_READY="xlinkReady",this.SEGMENTBASE_INIT_REQUEST_NEEDED="segmentBaseInitRequestNeeded",this.SEGMENTBASE_SEGMENTSLIST_REQUEST_NEEDED="segmentBaseSegmentsListRequestNeeded"}n.default=a,t.exports=n.default},{55:55}],54:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r,i=e(53);function a(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),function(e,t,n){for(var r=!0;r;){var i=e,a=t,o=n;r=!1,null===i&&(i=Function.prototype);var s=Object.getOwnPropertyDescriptor(i,a);if(void 0!==s){if("value"in s)return s.value;var u=s.get;if(void 0===u)return;return u.call(o)}var l=Object.getPrototypeOf(i);if(null===l)return;e=l,t=a,n=o,r=!0,s=l=void 0}}(Object.getPrototypeOf(a.prototype),"constructor",this).apply(this,arguments)}var o=new(function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(a,((r=i)&&r.__esModule?r:{default:r}).default),a);n.default=o,t.exports=n.default},{53:53}],55:[function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}Object.defineProperty(n,"__esModule",{value:!0});var i=(function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}(a,[{key:"extend",value:function(e,t){if(e){var n=!!t&&t.override,r=!!t&&t.publicOnly;for(var i in e)!e.hasOwnProperty(i)||this[i]&&!n||r&&-1===e[i].indexOf("public_")||(this[i]=e[i])}}}]),a);function a(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a)}n.default=i,t.exports=n.default},{}],56:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var h=r(e(61)),p=r(e(93)),g=r(e(89)),_=r(e(95)),E=r(e(88)),D=r(e(86)),i=r(e(47)),M=r(e(65));function a(){var e,m=void 0,v=void 0,y=void 0,u=void 0,T=void 0,i=void 0,t=this.context;function o(e,t,n){var r,i=m.getAdaptationsForType(v[0].mpd.manifest,e,t);if(!i||0===i.length)return null;if(1<i.length&&n){var a=l(n,t);if(u[n.id]&&u[n.id][t])for(var o=0,s=i.length;o<s;o++)if(u[n.id][t].isMediaInfoEqual(a[o]))return i[o];for(o=0,s=i.length;o<s;o++)if(r=i[o],m.getRolesForAdaptation(r).filter(function(e){return e.value===h.default.MAIN})[0])return i[o]}return i[0]}function l(e,t,n){var r,i=v,a=n,o=[],s=void 0,u=void 0,l=void 0,f=void 0,d=void 0,c=void 0;if(a)b(),i=S(a);else{if(!(0<v.length))return o;a=v[0].mpd.manifest}var h=A(e,i);h&&(c=h.id);var p=m.getAdaptationsForType(a,e?e.index:null,t!==T.EMBEDDED_TEXT?t:T.VIDEO);if(!p||0===p.length)return o;for(y[c]=y[c]||m.getAdaptationsForPeriod(h),f=0,r=p.length;f<r;f++)if(s=p[f],l=m.getIndexForAdaptation(s,a,e.index),u=I(y[c][l]),t===T.EMBEDDED_TEXT){var g=u.accessibility.length;for(d=0;d<g;d++)if(u){var _=u.accessibility[d];if(0===_.indexOf("cea-608:")){var E=_.substring(8).split(";");if("CC"===E[0].substring(0,2))for(d=0;d<E.length;d++)R(u=u||I.call(this,y[c][l]),E[d].substring(0,3),E[d].substring(4)),o.push(u),u=null;else for(d=0;d<E.length;d++)R(u=u||I.call(this,y[c][l]),"CC"+(d+1),E[d]),o.push(u),u=null}else 0===_.indexOf("cea-608")&&(R(u,T.CC1,"eng"),o.push(u),u=null)}}else t===T.IMAGE?(u.type=T.IMAGE,o.push(u),u=null):u&&o.push(u);return o}function S(e){var t=n(e);return m.getRegularPeriods(t)}function n(e){var t=a(e);return m.getMpd(t)}function r(){v=[],y={},u={}}function a(e){return e||(0<v.length?v[0].mpd.manifest:null)}function s(e){return e&&e.streamInfo&&void 0!==e.streamInfo.id&&y[e.streamInfo.id]?y[e.streamInfo.id][e.index]:null}function A(e,t){for(var n=t.length,r=0;r<n;r++){var i=t[r];if(e&&e.id===i.id)return i}return null}function I(e){if(!e)return null;var t,r=new g.default,n=e.period.mpd.manifest.Period_asArray[e.period.index].AdaptationSet_asArray[e.index];return r.id=e.id,r.index=e.index,r.type=e.type,r.streamInfo=f(e.period),r.representationCount=m.getRepresentationCount(n),r.labels=m.getLabelsForAdaptation(n),r.lang=m.getLanguageForAdaptation(n),t=m.getViewpointForAdaptation(n),r.viewpoint=t?t.value:void 0,r.accessibility=m.getAccessibilityForAdaptation(n).map(function(e){var t=e.value,n=t;return e.schemeIdUri&&0<=e.schemeIdUri.search("cea-608")&&void 0!==i&&(n=t?"cea-608:"+t:"cea-608",r.embeddedCaptions=!0),n}),r.audioChannelConfiguration=m.getAudioChannelConfigurationForAdaptation(n).map(function(e){return e.value}),0===r.audioChannelConfiguration.length&&Array.isArray(n.Representation_asArray)&&0<n.Representation_asArray.length&&(r.audioChannelConfiguration=m.getAudioChannelConfigurationForRepresentation(n.Representation_asArray[0]).map(function(e){return e.value})),r.roles=m.getRolesForAdaptation(n).map(function(e){return e.value}),r.codec=m.getCodec(n),r.mimeType=m.getMimeType(n),r.contentProtection=m.getContentProtectionData(n),r.bitrateList=m.getBitrateListForAdaptation(n),r.contentProtection&&r.contentProtection.forEach(function(e){e.KID=m.getKID(e)}),r.isText=m.getIsTextTrack(r.mimeType),r.supplementalProperties=m.getSupplementalPropperties(n),r}function R(e,t,n){e.id=t,e.index=100+parseInt(t.substring(2,3)),e.type=T.EMBEDDED_TEXT,e.codec="cea-608-in-SEI",e.isText=!0,e.isEmbedded=!0,e.lang=n,e.roles=["caption"]}function f(e){var t,n,r=new _.default;return r.id=e.id,r.index=e.index,r.start=e.start,r.duration=e.duration,r.manifestInfo=(t=e.mpd,(n=new E.default).DVRWindowSize=t.timeShiftBufferDepth,n.loadedTime=t.manifest.loadedTime,n.availableFrom=t.availabilityStartTime,n.minBufferTime=t.manifest.minBufferTime,n.maxFragmentDuration=t.maxSegmentDuration,n.duration=m.getDuration(t.manifest),n.isDynamic=m.getIsDynamic(t.manifest),n.serviceDescriptions=m.getServiceDescriptions(t.manifest),n),r.isLast=1===e.mpd.manifest.Period_asArray.length||Math.abs(r.start+r.duration-r.manifestInfo.duration)<1,r}function b(){if(!T)throw new Error("setConfig function has to be called previously")}function d(e){return 0<v.length?v[0].mpd.manifest.Period_asArray[e]:null}function c(e,t,n){var r=void 0,i=void 0,a=void 0,o=void 0,s=void 0;if(e)for(r=e.AdaptationSet_asArray,o=0;o<r.length;o+=1)for(a=r[o].Representation_asArray,s=0;s<a.length;s+=1)if(t===(i=a[s]).id)return n?s:i;return null}return e={getBandwidthForRepresentation:function(e,t){var n;return(n=c(d(t),e))?n.bandwidth:null},getIndexForRepresentation:function(e,t){var n,r=d(t);return null!==(n=c(r,e,!0))?n:-1},getMaxIndexForBufferType:function(e,t){return function(e,t){var n,r=void 0,i=void 0,a=void 0;if(!e||!t)return-1;for(n=e.AdaptationSet_asArray,a=0;a<n.length;a+=1)if(r=n[a],i=r.Representation_asArray,m.getIsTypeOf(r,t))return i.length;return-1}(d(t),e)},convertDataToRepresentationInfo:function(e){if(e){var t=new p.default,n=e.adaptation.period.mpd.manifest.Period_asArray[e.adaptation.period.index].AdaptationSet_asArray[e.adaptation.index],r=m.getRepresentationFor(e.index,n);return t.id=e.id,t.quality=e.index,t.bandwidth=m.getBandwidth(r),t.DVRWindow=e.segmentAvailabilityRange,t.fragmentDuration=e.segmentDuration||(e.segments&&0<e.segments.length?e.segments[0].duration:NaN),t.MSETimeOffset=e.MSETimeOffset,t.useCalculatedLiveEdgeTime=e.useCalculatedLiveEdgeTime,t.mediaInfo=I(e.adaptation),t}return null},getDataForMedia:s,getStreamsInfo:function(e,t){var n=[],r=v;if(e&&(b(),r=S(e)),0<r.length){(!t||t>r.length)&&(t=r.length);for(var i=0;i<t;i++)n.push(f(r[i]))}return n},getMediaInfoForType:function(e,t){if(0===v.length||!e)return null;var n=A(e,v);if(!n)return null;var r=n.id;y[r]=y[r]||m.getAdaptationsForPeriod(n);var i=o(e.index,t,e);if(!i)return null;var a=m.getIndexForAdaptation(i,v[0].mpd.manifest,e.index);return I(y[r][a])},getAllMediaInfoForType:l,getAdaptationForType:o,getRealAdaptation:function(e,t){var n,r=void 0,i=A(e,v);return n=t?t.id:null,0<v.length&&i&&(r=n?m.getAdaptationForId(n,v[0].mpd.manifest,i.index):m.getAdaptationForIndex(t.index,v[0].mpd.manifest,i.index)),r},getVoRepresentations:function(e){var t=s(e);return m.getRepresentationsForAdaptation(t)},getEventsFor:function(e,t){var n=[];if(0<v.length){var r=v[0].mpd.manifest;e instanceof _.default?n=m.getEventsForPeriod(A(e,v)):e instanceof g.default?n=m.getEventStreamForAdaptationSet(r,s(e)):e instanceof p.default&&(n=m.getEventStreamForRepresentation(r,t))}return n},getEvent:function(e,t,n){if(!e||!t)return null;var r=new D.default,i=e.scheme_id_uri,a=e.value,o=e.timescale,s=e.presentation_time_delta,u=e.event_duration,l=e.id,f=e.message_data,d=n*o+s;return t[i+"/"+a]?(r.eventStream=t[i+"/"+a],r.eventStream.value=a,r.eventStream.timescale=o,r.duration=u,r.id=l,r.presentationTime=d,r.messageData=f,r.presentationTimeDelta=s,r):null},setConfig:function(e){e&&(e.constants&&(T=e.constants),e.cea608parser&&(i=e.cea608parser),e.errHandler&&m.setConfig({errHandler:e.errHandler}),e.BASE64&&m.setConfig({BASE64:e.BASE64}))},updatePeriods:function(e){if(!e)return null;b(),v=S(e),y={}},getUseCalculatedLiveEdgeTimeForMediaInfo:function(e){var t=s(e);return m.getUseCalculatedLiveEdgeTimeForAdaptation(t)},getIsTextTrack:function(e){return m.getIsTextTrack(e)},getUTCTimingSources:function(){var e=a();return m.getUTCTimingSources(e)},getSuggestedPresentationDelay:function(){var e=0<v.length?v[0].mpd:null;return m.getSuggestedPresentationDelay(e)},getAvailabilityStartTime:function(e){var t=n(e);return m.getAvailabilityStartTime(t)},getIsDynamic:function(e){var t=a(e);return m.getIsDynamic(t)},getDuration:function(e){var t=a(e);return m.getDuration(t)},getRegularPeriods:S,getLocation:function(e){return m.getLocation(e)},getManifestUpdatePeriod:function(e){var t=arguments.length<=1||void 0===arguments[1]?0:arguments[1];return m.getManifestUpdatePeriod(e,t)},getIsDVB:function(e){return m.hasProfile(e,"urn:dvb:dash:profile:dvb-dash:2014")},getBaseURLsFromElement:function(e){return m.getBaseURLsFromElement(e)},getRepresentationSortFunction:function(){return m.getRepresentationSortFunction()},getCodec:function(e,t,n){return m.getCodec(e,t,n)},getVoAdaptations:function(){return y},getVoPeriods:function(){return v},setCurrentMediaInfo:function(e,t,n){u[e]=u[e]||{},u[e][t]=u[e][t]||{},u[e][t]=n},reset:r},m=(0,M.default)(t).getInstance(),r(),e}a.__dashjs_factory_name="DashAdapter",n.default=i.default.getSingletonFactory(a),t.exports=n.default},{47:47,61:61,65:65,86:86,88:88,89:89,93:93,95:95}],57:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var w=r(e(228)),N=e(242),i=r(e(47)),O=e(80),P=r(e(64));function a(e){e=e||{};var t=this.context,d=e.eventBus,c=e.events,n=e.debug,l=e.dashConstants,o=e.urlUtils,f=e.type,r=e.streamInfo,h=e.timelineConverter,p=e.dashMetrics,s=e.baseURLController,i=void 0,g=void 0,_=void 0,E=void 0,m=void 0,a=void 0,v=void 0,u=void 0,y=void 0;function T(){return f}function S(){_=-1,E=null}function A(){S(),a=0,u=y=m=null}function I(e,t,n){var r=s.resolve(n.path),i=void 0,a=void 0;return r&&t!==r.url&&o.isRelative(t)?(i=r.url,a=r.serviceLocation,t&&(i=o.resolve(t,i))):i=t,!o.isRelative(i)&&(e.url=i,e.serviceLocation=a,1)}function R(e){var t,n,r;e.sender.getType()===T()&&(t=e.representation,n=t.hasInitialization(),r=t.hasSegments(),n&&r?d.trigger(c.REPRESENTATION_UPDATE_COMPLETED,{sender:i,representation:t}):y.update(t,T(),u,n,r))}function b(e,t){if(null==t)return null;var n=new w.default,r=t.representation,i=r.adaptation.period.mpd.manifest.Period_asArray[r.adaptation.period.index].AdaptationSet_asArray[r.adaptation.index].Representation_asArray[r.index].bandwidth,a=t.media;return a=(0,O.replaceTokenForTemplate)(a,"Number",t.replacementNumber),a=(0,O.replaceTokenForTemplate)(a,"Time",t.replacementTime),a=(0,O.replaceTokenForTemplate)(a,"Bandwidth",i),a=(0,O.replaceIDForTemplate)(a,r.id),a=(0,O.unescapeDollarsInTemplate)(a),n.mediaType=T(),n.type=N.HTTPRequest.MEDIA_SEGMENT_TYPE,n.range=t.mediaRange,n.startTime=t.presentationStartTime,n.duration=t.duration,n.timescale=r.timescale,n.availabilityStartTime=t.availabilityStartTime,n.availabilityEndTime=t.availabilityEndTime,n.wallStartTime=t.wallStartTime,n.quality=r.index,n.index=t.availabilityIdx,n.mediaInfo=e,n.adaptationIndex=r.adaptation.index,n.representationId=r.id,I(n,a,r)?n:void 0}function D(e){var t=!1;if(!e)return t;if(v){if(E){var n=parseFloat((E.presentationStartTime-e.adaptation.period.start).toFixed(5)),r=0<E.duration?n+1.5*E.duration:n;t=e.adaptation.period.duration<=r}}else _>=e.availableSegmentsNumber&&(t=!0);return t}function M(e){var t=e.representation;t.segments&&d.trigger(c.REPRESENTATION_UPDATE_COMPLETED,{sender:this,representation:t})}function C(e){if(!e.error&&T()===e.mediaType){var t,n,r=e.segments,i=e.representation,a=[],o=0,s=void 0,u=void 0,l=void 0;for(s=0,t=r?r.length:0;s<t;s++)u=r[s],(l=(0,O.getTimeBasedSegment)(h,v,i,u.startTime,u.duration,u.timescale,u.media,u.mediaRange,o))&&(a.push(l),l=null,o++);if(0<a.length&&(i.segmentAvailabilityRange={start:a[0].presentationStartTime,end:a[a.length-1].presentationStartTime},i.availableSegmentsNumber=a.length,i.segments=a,v)){var f=a[a.length-1].presentationStartTime-8;n=f,h.setExpectedLiveEdge(n),p.updateManifestUpdateInfo({presentationStartTime:n})}i.hasInitialization()&&d.trigger(c.REPRESENTATION_UPDATE_COMPLETED,{sender:this,representation:i})}}return i={initialize:function(e){v=e,y.initialize(e)},getType:T,getStreamInfo:function(){return r},getInitRequest:function(e,t){return t?function(e,t,n){var r=new w.default,i=t.adaptation.period,a=i.start;if(r.mediaType=n,r.type=N.HTTPRequest.INIT_SEGMENT_TYPE,r.range=t.range,r.availabilityStartTime=h.calcAvailabilityStartTimeFromPresentationTime(a,i.mpd,v),r.availabilityEndTime=h.calcAvailabilityEndTimeFromPresentationTime(a+i.duration,i.mpd,v),r.quality=t.index,r.mediaInfo=e,r.representationId=t.id,I(r,t.initialization,t))return r.url=(0,O.replaceTokenForTemplate)(r.url,"Bandwidth",t.bandwidth),r}(e,t,T()):null},getRequestForSegment:b,getSegmentRequestForTime:function(e,t,n,r){var i=null;if(!t||!t.segmentInfoType)return i;var a=_,o=!!r&&r.keepIdx,s=!(!r||!r.ignoreIsFinished);m!==n&&(m=n,g.debug("Getting the request for time : "+n));var u=y.getSegmentByTime(t,n);return u?(_=u.availabilityIdx,E=u,g.debug("Index for time "+n+" is "+_),i=b(e,u)):!s&&D(t)&&((i=new w.default).action=w.default.ACTION_COMPLETE,i.index=_-1,i.mediaType=f,i.mediaInfo=e,g.debug("Signal complete in getSegmentRequestForTime")),o&&0<=a&&(_=t.segmentInfoType===l.SEGMENT_TIMELINE&&v?_:a),i},getNextSegmentRequest:function(e,t){var n=null;if(!t||!t.segmentInfoType)return null;m=null;var r=_+1;g.debug("Getting the next request at index: "+r);var i=y.getSegmentByIndex(t,r,E?E.mediaStartTime:-1);return i||isFinite(t.adaptation.period.duration)?(_=i?(n=b(e,i),i.availabilityIdx):v?r-1:r,i?E=i:D(t)&&((n=new w.default).action=w.default.ACTION_COMPLETE,n.index=_-1,n.mediaType=T(),n.mediaInfo=e,g.debug("Signal complete")),n):(g.debug("No segment found at index: "+r+". Wait for next loop"),null)},setCurrentTime:function(e){a=e},getCurrentTime:function(){return a},setCurrentIndex:function(e){_=e},getCurrentIndex:function(){return _},isMediaFinished:D,reset:function(){A(),d.off(c.INITIALIZATION_LOADED,M,i),d.off(c.SEGMENTS_LOADED,C,i),d.off(c.REPRESENTATION_UPDATE_STARTED,R,i)},resetIndex:S,setMimeType:function(e){u=e}},g=n.getLogger(i),A(),y=(0,P.default)(t).create(e),d.on(c.INITIALIZATION_LOADED,M,i),d.on(c.SEGMENTS_LOADED,C,i),d.on(c.REPRESENTATION_UPDATE_STARTED,R,i),i}a.__dashjs_factory_name="DashHandler",n.default=i.default.getClassFactory(a),t.exports=n.default},{228:228,242:242,47:47,64:64,80:80}],58:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var d=r(e(108)),c=e(242),i=r(e(47)),h=r(e(109)),p=r(e(78)),g=r(e(152)),_=e(244);function a(e){e=e||{};var t,n=this.context,i=void 0,a=void 0,o=void 0,s=e.metricsModel;function u(e){var t=s.getMetricsFor(e,!0);if(!t)return null;var n=t.HttpList,r=null,i=void 0;if(!n||n.length<=0)return null;for(i=n.length-1;0<=i;){if(n[i].responsecode){r=n[i];break}i--}return r}function l(e){var t=s.getMetricsFor(e,!0);return t&&t.HttpList?t.HttpList:[]}function r(e,t){if(!e)return null;var n=e[t];return n&&0!==n.length?n[n.length-1]:null}function f(e){var t={};if(!e)return t;for(var n=e.trim().split("\r\n"),r=0,i=n.length;r<i;r++){var a=n[r],o=a.indexOf(": ");0<o&&(t[a.substring(0,o)]=a.substring(o+2))}return t}return t={getCurrentRepresentationSwitch:function(e){return r(s.getMetricsFor(e,!0),h.default.TRACK_SWITCH)},getCurrentBufferState:function(e){return r(s.getMetricsFor(e,!0),h.default.BUFFER_STATE)},getCurrentBufferLevel:function(e){var t=r(s.getMetricsFor(e,!0),h.default.BUFFER_LEVEL);return t?p.default.round10(t.level/1e3,-3):0},getCurrentHttpRequest:u,getHttpRequests:l,getCurrentDroppedFrames:function(){return r(s.getMetricsFor(d.default.VIDEO,!0),h.default.DROPPED_FRAMES)},getCurrentSchedulingInfo:function(e){return r(s.getMetricsFor(e,!0),h.default.SCHEDULING_INFO)},getCurrentDVRInfo:function(e){return r(e?s.getMetricsFor(e,!0):s.getMetricsFor(d.default.VIDEO,!0)||s.getMetricsFor(d.default.AUDIO,!0),h.default.DVR_INFO)},getCurrentManifestUpdate:function(){return r(s.getMetricsFor(d.default.STREAM),h.default.MANIFEST_UPDATE)},getLatestFragmentRequestHeaderValueByID:function(e,t){var n={},r=u(e);return r&&(n=f(r._responseHeaders)),void 0===n[t]?null:n[t]},getLatestMPDRequestHeaderValueByID:function(e){var t,n={},r=void 0,i=void 0;for(i=(t=l(d.default.STREAM)).length-1;0<=i;i--)if((r=t[i]).type===c.HTTPRequest.MPD_TYPE){n=f(r._responseHeaders);break}return void 0===n[e]?null:n[e]},addRepresentationSwitch:function(e,t,n,r,i){s.addRepresentationSwitch(e,t,n,r,i)},addDVRInfo:function(e,t,n,r){s.addDVRInfo(e,t,n,r)},updateManifestUpdateInfo:function(e){var t=this.getCurrentManifestUpdate();s.updateManifestUpdateInfo(t,e)},addManifestUpdateStreamInfo:function(e){if(e){var t=this.getCurrentManifestUpdate();s.addManifestUpdateStreamInfo(t,e.id,e.index,e.start,e.duration)}},addManifestUpdateRepresentationInfo:function(e,t){if(e){var n=this.getCurrentManifestUpdate();s.addManifestUpdateRepresentationInfo(n,e.id,e.index,e.streamIndex,t,e.presentationTimeOffset,e.startNumber,e.fragmentInfoType)}},addManifestUpdate:function(e){s.addManifestUpdate(d.default.STREAM,e.type,e.requestStartDate,e.requestEndDate)},addHttpRequest:function(e,t,n,r,i){s.addHttpRequest(e.mediaType,null,e.type,e.url,e.quality,t,e.serviceLocation||null,e.range||null,e.requestStartDate,e.firstByteDate,e.requestEndDate,n,e.duration,r,i)},addSchedulingInfo:function(e,t){s.addSchedulingInfo(e.mediaType,new Date,e.type,e.startTime,e.availabilityStartTime,e.duration,e.quality,e.range,t)},addRequestsQueue:function(e,t,n){s.addRequestsQueue(e,t,n)},addBufferLevel:function(e,t,n){s.addBufferLevel(e,t,n)},addBufferState:function(e,t,n){s.addBufferState(e,t,n)},addDroppedFrames:function(e){s.addDroppedFrames(d.default.VIDEO,e)},addPlayList:function(){o&&(s.addPlayList(o),o=null)},addDVBErrors:function(e){s.addDVBErrors(e)},createPlaylistMetrics:function(e,t){(o=new _.PlayList).start=new Date,o.mstart=e,o.starttype=t},createPlaylistTraceMetrics:function(e,t,n){!0===i&&(i=!1,(a=new _.PlayListTrace).representationid=e,a.start=new Date,a.mstart=t,a.playbackspeed=n)},updatePlayListTraceMetrics:function(e){if(a)for(var t in a)a[t]=e[t]},pushPlayListTraceMetrics:function(e,t){if(!1===i&&o&&a&&a.start){var n=a.start,r=e.getTime()-n.getTime();a.duration=r,a.stopreason=t,o.trace.push(a),i=!0}},clearAllCurrentMetrics:function(){s.clearAllCurrentMetrics()}},s=s||(0,g.default)(n).getInstance({settings:e.settings}),i=!0,o=a=null,t}a.__dashjs_factory_name="DashMetrics",n.default=i.default.getSingletonFactory(a),t.exports=n.default},{108:108,109:109,152:152,242:242,244:244,47:47,78:78}],59:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var y=r(e(94)),T=r(e(226)),i=r(e(47)),S=r(e(228)),A=r(e(158));function a(){var e=this.context,t=void 0,g=void 0,n=void 0,s=void 0,r=void 0,i=void 0,a=void 0,o=void 0,u=void 0,l=void 0,f=void 0,d=void 0,c=void 0,h=void 0,p=void 0,_=void 0;function E(){if(!_||!_.hasOwnProperty("resolve"))throw new Error("setConfig function has to be called previously")}function m(e){if(e.url){var t=new S.default;return t.setInfo(e),t}}function v(e,t,n){e?f.trigger(l.SEGMENTS_LOADED,{segments:e,representation:t,mediaType:n}):f.trigger(l.SEGMENTS_LOADED,{segments:null,representation:t,mediaType:n,error:new T.default(d.SEGMENT_BASE_LOADER_ERROR_CODE,d.SEGMENT_BASE_LOADER_ERROR_MESSAGE)})}return t={setConfig:function(e){e.baseURLController&&(_=e.baseURLController),e.dashMetrics&&(i=e.dashMetrics),e.mediaPlayerModel&&(o=e.mediaPlayerModel),e.errHandler&&(n=e.errHandler),e.settings&&(a=e.settings),e.boxParser&&(s=e.boxParser),e.events&&(l=e.events),e.eventBus&&(f=e.eventBus),e.debug&&(g=e.debug.getLogger(t)),e.requestModifier&&(r=e.requestModifier),e.errors&&(d=e.errors),e.urlUtils&&(p=e.urlUtils),e.constants&&(c=e.constants),e.dashConstants&&(h=e.dashConstants)},initialize:function(){u=(0,A.default)(e).create({errHandler:n,dashMetrics:i,mediaPlayerModel:o,requestModifier:r,useFetch:a?a.get().streaming.lowLatencyEnabled:null,boxParser:s,errors:d,urlUtils:p,constants:c,dashConstants:h})},loadInitialization:function t(n,e){E();var r=null,i=n?_.resolve(n.path):null,a=e||{init:!0,url:i?i.url:void 0,range:{start:0,end:1500},searching:!1,bytesLoaded:0,bytesToLoad:1500,mediaType:n&&n.adaptation?n.adaptation.type:null};g.debug("Start searching for initialization.");var o=m(a);u.load({request:o,success:function(e){a.bytesLoaded=a.range.end,(r=s.findInitRange(e))?(n.range=r,f.trigger(l.INITIALIZATION_LOADED,{representation:n})):(a.range.end=a.bytesLoaded+a.bytesToLoad,t(n,a))},error:function(){f.trigger(l.INITIALIZATION_LOADED,{representation:n})}}),g.debug("Perform init search: "+a.url)},loadSegments:function l(f,d,e,t,c){if(E(),e&&(void 0===e.start||void 0===e.end)){var n=e?e.toString().split("-"):null;e=n?{start:parseFloat(n[0]),end:parseFloat(n[1])}:null}c=c||v;var o=null,h=null,r=!!e,i=f?_.resolve(f.path):null,p={init:!1,url:i?i.url:void 0,range:r?e:{start:0,end:1500},searching:!r,bytesLoaded:t?t.bytesLoaded:0,bytesToLoad:1500,mediaType:f&&f.adaptation?f.adaptation.type:null},a=m(p);u.load({request:a,success:function(e){var t=p.bytesToLoad,n=e.byteLength;if(p.bytesLoaded=p.range.end-p.range.start,o=s.parse(e),(h=o.getBox("sidx"))&&h.isComplete){var u=h.references,r=void 0,i=void 0;null!=u&&0<u.length&&(r=1===u[0].reference_type),r?function(){function e(e){e?(a=a.concat(e),n<=++o&&(a.sort(function(e,t){return e.startTime-t.startTime<0?-1:0}),c(a,f,d))):c(null,f,d)}g.debug("Initiate multiple SIDX load."),p.range.end=p.range.start+h.size;var t=void 0,n=void 0,r=void 0,i=void 0,a=[],o=0,s=(h.offset||p.range.start)+h.size;for(t=0,n=u.length;t<n;t++)i=(r=s)+u[t].referenced_size-1,s+=u[t].referenced_size,l(f,null,{start:r,end:i},p,e)}():(g.debug("Parsing segments from SIDX. representation "+f.adaptation.type+" - id: "+f.id+" for range : "+p.range.start+" - "+p.range.end),i=function(e,t){for(var n=e.references,r=n.length,i=e.timescale,a=e.earliest_presentation_time,o=t.range.start+e.offset+e.first_offset+e.size,s=[],u=void 0,l=void 0,f=void 0,d=void 0,c=0;c<r;c++)f=n[c].subsegment_duration,d=n[c].referenced_size,(u=new y.default).duration=f,u.startTime=a,u.timescale=i,l=o+d-1,u.mediaRange=o+"-"+l,s.push(u),a+=f,o+=d;return s}(h,p),c(i,f,d))}else{if(h)p.range.start=h.offset||p.range.start,p.range.end=p.range.start+(h.size||t);else{if(n<p.bytesLoaded)return void c(null,f,d);var a=o.getLastBox();a&&a.size?(p.range.start=a.offset+a.size,p.range.end=p.range.start+t):p.range.end+=t}l(f,d,p.range,p,c)}},error:function(){c(null,f,d)}}),g.debug("Perform SIDX load: "+p.url+" with range : "+p.range.start+" - "+p.range.end)},reset:function(){u.abort(),r=s=n=u=null}}}a.__dashjs_factory_name="SegmentBaseLoader",n.default=i.default.getSingletonFactory(a),t.exports=n.default},{158:158,226:226,228:228,47:47,94:94}],60:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var y=r(e(212)),h=r(e(108)),i=r(e(47)),T=r(e(94)),S=r(e(228)),A=r(e(158)),I=r(e(226));function a(){var p=this.context,t=void 0,g=void 0,_=void 0,n=void 0,r=void 0,i=void 0,a=void 0,E=void 0,o=void 0,s=void 0,u=void 0,l=void 0,f=void 0;function m(e,t,n,r){var i,a,o=void 0,s=void 0,u=void 0,l=void 0,f=void 0,d=void 0;for(s=[],l=0,a=(i=function(e){var t=[],n=(0,y.default)(p).create({data:e}),r=void 0,i=void 0;for(n.consumeTagAndSize(_.Segment.Cues);n.moreData()&&n.consumeTagAndSize(_.Segment.Cues.CuePoint,!0);){for((r={}).CueTime=n.parseTag(_.Segment.Cues.CuePoint.CueTime),r.CueTracks=[];n.moreData()&&n.consumeTag(_.Segment.Cues.CuePoint.CueTrackPositions,!0);){var a=n.getMatroskaCodedNum(),o=n.getPos();if((i={}).Track=n.parseTag(_.Segment.Cues.CuePoint.CueTrackPositions.CueTrack),0===i.Track)throw new Error("Cue track cannot be 0");i.ClusterPosition=n.parseTag(_.Segment.Cues.CuePoint.CueTrackPositions.CueClusterPosition),r.CueTracks.push(i),n.setPos(o+a)}if(0===r.CueTracks.length)throw new Error("Mandatory cuetrack not found");t.push(r)}if(0===t.length)throw new Error("mandatory cuepoint not found");return t}(e)).length;l<a;l+=1)u=new T.default,o=0,o=l<i.length-1?i[l+1].CueTime-i[l].CueTime:r-i[l].CueTime,u.duration=o,u.startTime=i[l].CueTime,u.timescale=1e3,f=i[l].CueTracks[0].ClusterPosition+t,d=l<i.length-1?i[l+1].CueTracks[0].ClusterPosition+t-1:n-1,u.mediaRange=f+"-"+d,s.push(u);return g.debug("Parsed cues: "+s.length+" cues."),s}function d(){if(!f||!f.hasOwnProperty("resolve"))throw new Error("setConfig function has to be called previously")}function c(e,t,n){e?s.trigger(u.SEGMENTS_LOADED,{segments:e,representation:t,mediaType:n}):s.trigger(u.SEGMENTS_LOADED,{segments:null,representation:t,mediaType:n,error:new I.default(l.SEGMENT_BASE_LOADER_ERROR_CODE,l.SEGMENT_BASE_LOADER_ERROR_MESSAGE)})}function v(e){var t=new S.default;return t.setInfo(e),t}return t={setConfig:function(e){if(!(e.baseURLController&&e.dashMetrics&&e.mediaPlayerModel&&e.errHandler))throw new Error(h.default.MISSING_CONFIG_ERROR);f=e.baseURLController,i=e.dashMetrics,a=e.mediaPlayerModel,n=e.errHandler,o=e.settings,u=e.events,s=e.eventBus,l=e.errors,g=e.debug.getLogger(t),r=e.requestModifier},initialize:function(){E=(0,A.default)(p).create({errHandler:n,dashMetrics:i,mediaPlayerModel:a,requestModifier:r,useFetch:o?o.get().streaming.lowLatencyEnabled:null,errors:l})},loadInitialization:function(e,t){d();var n=null,r=e?f.resolve(e.path):null,i=e?e.range.split("-"):null,a=t||{range:{start:i?parseFloat(i[0]):null,end:i?parseFloat(i[1]):null},request:n,url:r?r.url:void 0,init:!0,mediaType:e&&e.adaptation?e.adaptation.type:null};g.info("Start loading initialization."),n=v(a),E.load({request:n,success:function(){s.trigger(u.INITIALIZATION_LOADED,{representation:e})},error:function(){s.trigger(u.INITIALIZATION_LOADED,{representation:e})}}),g.debug("Perform init load: "+a.url)},loadSegments:function(t,n,r,i){d();var e=null,a=t?f.resolve(t.path):null,o=a?a.url:void 0,s={bytesLoaded:0,bytesToLoad:8192,range:{start:0,end:8192},request:e,url:o,init:!1,mediaType:t&&t.adaptation?t.adaptation.type:null};i=i||c,e=v(s),g.debug("Parsing ebml header"),E.load({request:e,success:function(e){!function(e,t,n,r){if(e&&0!==e.byteLength){var i,a=(0,y.default)(p).create({data:e}),o=void 0,s=void 0,u=void 0,l=n?n.split("-"):null,f=null,d={url:t,range:{start:l?parseFloat(l[0]):null,end:l?parseFloat(l[1]):null},request:f};for(g.debug("Parse EBML header: "+d.url),a.skipOverElement(_.EBML),a.consumeTag(_.Segment),u=a.getMatroskaCodedNum(),u+=a.getPos(),i=a.getPos();a.moreData()&&!a.consumeTagAndSize(_.Segment.Info,!0);)if(!(a.skipOverElement(_.Segment.SeekHead,!0)||a.skipOverElement(_.Segment.Tracks,!0)||a.skipOverElement(_.Segment.Cues,!0)||a.skipOverElement(_.Void,!0)))throw new Error("no valid top level element found");for(;void 0===o;){var c=a.getMatroskaCodedNum(!0),h=a.getMatroskaCodedNum();switch(c){case _.Segment.Info.Duration.tag:o=a[_.Segment.Info.Duration.parse](h);break;default:a.setPos(a.getPos()+h)}}f=v(d);E.load({request:f,success:function(e){s=m(e,i,u,o),r(s)},error:function(){g.error("Download Error: Cues "+d.url),r(null)}}),g.debug("Perform cues load: "+d.url+" bytes="+d.range.start+"-"+d.range.end)}else r(null)}(e,o,r,function(e){i(e,t,n)})},error:function(){i(null,t,n)}})},reset:function(){r=n=null}},_={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}a.__dashjs_factory_name="WebmSegmentBaseLoader",n.default=i.default.getSingletonFactory(a),t.exports=n.default},{108:108,158:158,212:212,226:226,228:228,47:47,94:94}],61:[function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function i(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),this.init()}Object.defineProperty(n,"__esModule",{value:!0});var a=new(function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}(i,[{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.SUPPLEMENTAL_PROPERTY="SupplementalProperty",this.INBAND_EVENT_STREAM="InbandEventStream",this.ACCESSIBILITY="Accessibility",this.ROLE="Role",this.RATING="Rating",this.CONTENT_COMPONENT="ContentComponent",this.SUBSET="Subset",this.LANG="lang",this.VIEWPOINT="Viewpoint",this.ROLE_ASARRAY="Role_asArray",this.ACCESSIBILITY_ASARRAY="Accessibility_asArray",this.AUDIOCHANNELCONFIGURATION_ASARRAY="AudioChannelConfiguration_asArray",this.CONTENTPROTECTION_ASARRAY="ContentProtection_asArray",this.MAIN="main",this.DYNAMIC="dynamic",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.SUGGESTED_PRESENTATION_DELAY="suggestedPresentationDelay",this.SERVICE_DESCRIPTION="ServiceDescription",this.SERVICE_DESCRIPTION_SCOPE="Scope",this.SERVICE_DESCRIPTION_LATENCY="Latency",this.SERVICE_DESCRIPTION_PLAYBACK_RATE="PlaybackRate"}}]),i);n.default=a,t.exports=n.default},{}],62:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var O=r(e(108)),P=r(e(226)),i=r(e(47));function a(e){var i=(e=e||{}).eventBus,a=e.events,f=e.errors,d=e.abrController,c=e.dashMetrics,h=e.playbackController,r=e.timelineConverter,t=e.type,p=e.streamId,g=e.dashConstants,o=void 0,s=void 0,n=void 0,_=void 0,E=void 0;function u(){if(!(d&&c&&h&&r))throw new Error(O.default.MISSING_CONFIG_ERROR)}function m(){return n}function v(){return E}function l(){n=!(s=null),_=[]}function y(){return t}function T(){u();var e=new Date,t=v(),n=1e3*h.getTime();t&&c.addRepresentationSwitch(t.adaptation.type,e,n,t.id)}function S(e){return null==e||e>=_.length?null:_[e]}function A(e,t){var n;(e.segmentAvailabilityRange=r.calcSegmentAvailabilityRange(e,t),e.segmentAvailabilityRange.end<e.segmentAvailabilityRange.start&&!e.useCalculatedLiveEdgeTime)?b(new P.default(f.SEGMENTS_UNAVAILABLE_ERROR_CODE,f.SEGMENTS_UNAVAILABLE_ERROR_MESSAGE,{availabilityDelay:e.segmentAvailabilityRange.start-e.segmentAvailabilityRange.end})):t&&(n=e.segmentAvailabilityRange.end,r.setExpectedLiveEdge(n),c.updateManifestUpdateInfo({presentationStartTime:n}))}function I(e,t){u();for(var n=0,r=_.length;n<r;n++)A(_[n],e),t&&i.trigger(a.REPRESENTATION_UPDATE_STARTED,{sender:o,representation:_[n]})}function R(){n=!0,i.trigger(a.DATA_UPDATE_STARTED,{sender:o})}function b(e){n=!1;var t={sender:o,data:s,currentRepresentation:E};e&&(t.error=e),i.trigger(a.DATA_UPDATE_COMPLETED,t)}function D(e){var t=e;i.trigger(a.AST_IN_FUTURE,{delay:t}),setTimeout(function(){m()||(R(),_.forEach(function(e){e.segmentAvailabilityRange=null}),I(h.getIsDynamic(),!0))},t)}function M(e){if(e.sender.getType()===y()&&e.sender.getStreamInfo().id===p&&m())if(e.error)b(e.error);else{var t,n=e.sender.getStreamInfo(),r=e.representation,i=c.getCurrentManifestUpdate(),a=!1,o=0,s=void 0;if(r.adaptation.period.mpd.manifest.type===g.DYNAMIC&&!r.adaptation.period.mpd.manifest.ignorePostponeTimePeriod){var u=r.segmentAvailabilityRange.end-r.segmentAvailabilityRange.start;o=1e3*(h.computeLiveDelay(E.segmentDuration,n.manifestInfo.DVRWindowSize)-u)}if(0<o)return D(o),void b(new P.default(f.SEGMENTS_UPDATE_FAILED_ERROR_CODE,f.SEGMENTS_UPDATE_FAILED_ERROR_MESSAGE));if(i){for(var l=0;l<i.representationInfo.length;l++)if((s=i.representationInfo[l]).index===r.index&&s.mediaType===y()){a=!0;break}a||c.addManifestUpdateRepresentationInfo(r,y())}!function(){for(var e=0,t=_.length;e<t;e++){var n=_[e].segmentInfoType;if(null===_[e].segmentAvailabilityRange||!_[e].hasInitialization()||(n===g.SEGMENT_BASE||n===g.BASE_URL)&&!_[e].segments)return}return 1}()||(d.setPlaybackQuality(y(),n,(t=E,_.indexOf(t))),c.updateManifestUpdateInfo({latency:E.segmentAvailabilityRange.end-h.getTime()}),c.getCurrentRepresentationSwitch(v().adaptation.type)||T(),b())}}function C(e){e.isDynamic&&I(e.isDynamic)}function w(e){e.mediaType===y()&&p===e.streamInfo.id&&(E=S(e.newQuality),T())}function N(e){if(e.newDuration){var t=v();if(t&&t.adaptation.period)t.adaptation.period.duration=e.newDuration}}return o={getData:function(){return s},isUpdating:m,updateData:function(e,t,n,r){u(),R(),_=t,E=S(r),s=e,n===O.default.VIDEO||n===O.default.AUDIO||n===O.default.FRAGMENTED_TEXT?I(h.getIsDynamic(),!0):b()},updateRepresentation:A,getCurrentRepresentation:v,getRepresentationForQuality:S,getType:y,getStreamId:function(){return p},reset:function(){i.off(a.QUALITY_CHANGE_REQUESTED,w,o),i.off(a.REPRESENTATION_UPDATE_COMPLETED,M,o),i.off(a.WALLCLOCK_TIME_UPDATED,C,o),i.off(a.MANIFEST_VALIDITY_CHANGED,N,o),l()}},l(),i.on(a.QUALITY_CHANGE_REQUESTED,w,o),i.on(a.REPRESENTATION_UPDATE_COMPLETED,M,o),i.on(a.WALLCLOCK_TIME_UPDATED,C,o),i.on(a.MANIFEST_VALIDITY_CHANGED,N,o),o}a.__dashjs_factory_name="RepresentationController",n.default=i.default.getClassFactory(a),t.exports=n.default},{108:108,226:226,47:47}],63:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var i=r(e(47)),m=r(e(59)),v=r(e(60));function a(e){e=e||{};var t=this.context,n=e.eventBus,r=e.events,i=e.dashMetrics,a=e.mediaPlayerModel,o=e.errHandler,s=e.baseURLController,u=e.debug,l=e.boxParser,f=e.requestModifier,d=e.errors,c=void 0,h=void 0,p=void 0;function g(e){return"webm"===(e?e.split("/")[1]:"").toLowerCase()}function _(e){g(e.mimeType)?p.loadInitialization(e.representation):h.loadInitialization(e.representation)}function E(e){g(e.mimeType)?p.loadSegments(e.representation,e.mediaType,e.representation?e.representation.indexRange:null,e.callback):h.loadSegments(e.representation,e.mediaType,e.representation?e.representation.indexRange:null,e.callback)}return c={initialize:function(){n.on(r.SEGMENTBASE_INIT_REQUEST_NEEDED,_,c),n.on(r.SEGMENTBASE_SEGMENTSLIST_REQUEST_NEEDED,E,c),h.initialize(),p.initialize()},reset:function(){n.off(r.SEGMENTBASE_INIT_REQUEST_NEEDED,_,c),n.off(r.SEGMENTBASE_SEGMENTSLIST_REQUEST_NEEDED,E,c)}},h=(0,m.default)(t).getInstance(),p=(0,v.default)(t).getInstance(),h.setConfig({baseURLController:s,dashMetrics:i,mediaPlayerModel:a,errHandler:o,eventBus:n,events:r,errors:d,debug:u,boxParser:l,requestModifier:f}),p.setConfig({baseURLController:s,dashMetrics:i,mediaPlayerModel:a,errHandler:o,eventBus:n,events:r,errors:d,debug:u,requestModifier:f}),c}a.__dashjs_factory_name="SegmentBaseController";var o=i.default.getSingletonFactory(a);n.default=o,t.exports=n.default},{47:47,59:59,60:60}],64:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var i=r(e(47)),u=r(e(83)),l=r(e(81)),f=r(e(77)),d=r(e(79));function a(t){t=t||{};var e,n=this.context,a=t.events,o=t.eventBus,r=t.dashConstants,i=void 0;function s(e){return e?e.segments?i[r.SEGMENT_BASE]:i[e.segmentInfoType]:null}return e={initialize:function(e){i[r.SEGMENT_TIMELINE]=(0,u.default)(n).create(t,e),i[r.SEGMENT_TEMPLATE]=(0,l.default)(n).create(t,e),i[r.SEGMENT_LIST]=(0,f.default)(n).create(t,e),i[r.SEGMENT_BASE]=(0,d.default)(n).create(t,e)},update:function(e,t,n,r,i){r||o.trigger(a.SEGMENTBASE_INIT_REQUEST_NEEDED,{mimeType:n,representation:e}),i||o.trigger(a.SEGMENTBASE_SEGMENTSLIST_REQUEST_NEEDED,{mimeType:n,mediaType:t,representation:e})},getSegmentByIndex:function(e,t,n){var r=s(e);return r?r.getSegmentByIndex(e,t,n):null},getSegmentByTime:function(e,t){var n=s(e);return n?n.getSegmentByTime(e,t):null}},i={},e}a.__dashjs_factory_name="SegmentsController";var o=i.default.getClassFactory(a);n.default=o,t.exports=n.default},{47:47,77:77,79:79,81:81,83:83}],65:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var S=r(e(108)),A=r(e(61)),I=r(e(92)),R=r(e(84)),b=r(e(91)),i=r(e(90)),D=r(e(96)),M=r(e(86)),C=r(e(85)),w=r(e(87)),N=r(e(217)),O=r(e(221)),a=r(e(47)),P=r(e(45)),L=r(e(226)),x=r(e(51)),F=e(205);function o(){var e=void 0,l=void 0,f=void 0,d=void 0,a=this.context,o=(0,O.default)(a).getInstance(),h=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e};function s(e,t){var n=void 0,r=void 0,i=void 0,a=void 0,o=void 0,s=void 0,u=!1,l=!1;if(!e)throw new Error("adaptation is not defined");if(!t)throw new Error("type is not defined");if(e.hasOwnProperty("ContentComponent_asArray")&&(a=e.ContentComponent_asArray),o=t!==S.default.TEXT?new RegExp(t):new RegExp("(vtt|ttml)"),e.Representation_asArray&&e.Representation_asArray.length&&0<e.Representation_asArray.length){var f=_(e.Representation_asArray[0]);if(f&&0<f.length&&0<=F.THUMBNAILS_SCHEME_ID_URIS.indexOf(f[0].schemeIdUri))return t===S.default.IMAGE;if(e.Representation_asArray[0].hasOwnProperty(A.default.CODECS)&&(0===(s=e.Representation_asArray[0].codecs).search(S.default.STPP)||0===s.search(S.default.WVTT)))return t===S.default.FRAGMENTED_TEXT}if(a){if(1<a.length)return t===S.default.MUXED;a[0]&&a[0].contentType===t&&(l=u=!0)}if(e.hasOwnProperty(A.default.MIME_TYPE)&&(u=o.test(e.mimeType),l=!0),!l)for(n=0,r=e.Representation_asArray&&e.Representation_asArray.length?e.Representation_asArray.length:0;!l&&n<r;)(i=e.Representation_asArray[n]).hasOwnProperty(A.default.MIME_TYPE)&&(u=o.test(i.mimeType),l=!0),n++;return u}function p(e){return"text/vtt"===e||"application/ttml+xml"===e}function t(){return function(e,t){return e.bandwidth-t.bandwidth}}function u(e){return e&&Array.isArray(e.Representation_asArray)&&e.Representation_asArray.sort(t()),e}function c(e,t){return e&&e.Period_asArray&&h(t)&&e.Period_asArray[t]?e.Period_asArray[t].AdaptationSet_asArray:[]}function g(e){var t=!1;return e&&e.hasOwnProperty("type")&&(t=e.type===A.default.DYNAMIC),t}function _(e){return e&&e.EssentialProperty_asArray&&e.EssentialProperty_asArray.length?e.EssentialProperty_asArray.map(function(e){return{schemeIdUri:e.schemeIdUri,value:e.value}}):null}function E(e){if(e&&e.period&&h(e.period.index)){var t=e.period.mpd.manifest.Period_asArray[e.period.index];if(t&&t.AdaptationSet_asArray&&h(e.index))return u(t.AdaptationSet_asArray[e.index])}}function m(e){var t=e.S_asArray[e.S_asArray.length-1];return!t.hasOwnProperty("r")||0<=t.r}function v(e,t){if(!e)throw new Error("Period cannot be null or undefined");var n=b.default.DEFAULT_ID+"_"+t;return e.hasOwnProperty(A.default.ID)&&0<e.id.length&&"__proto__"!==e.id&&(n=e.id),n}function y(e,t){var n=[],r=void 0;if(!e)return n;for(r=0;r<e.length;r++){var i=new w.default;if(i.timescale=1,i.representation=t,!e[r].hasOwnProperty(S.default.SCHEME_ID_URI))throw new Error("Invalid EventStream. SchemeIdUri has to be set");i.schemeIdUri=e[r].schemeIdUri,e[r].hasOwnProperty(A.default.TIMESCALE)&&(i.timescale=e[r].timescale),e[r].hasOwnProperty(A.default.VALUE)&&(i.value=e[r].value),n.push(i)}return n}function T(r){var i=[],e=r.BaseURL_asArray||[r.baseUri],a=!1;return e.some(function(e){if(e){var t=new C.default,n=e.__text||e;return o.isRelative(n)&&(a=!0,r.baseUri&&(n=o.resolve(n,r.baseUri))),t.url=n,e.hasOwnProperty(A.default.SERVICE_LOCATION)&&e.serviceLocation.length?t.serviceLocation=e.serviceLocation:t.serviceLocation=n,e.hasOwnProperty(A.default.DVB_PRIORITY)&&(t.dvb_priority=e[A.default.DVB_PRIORITY]),e.hasOwnProperty(A.default.DVB_WEIGHT)&&(t.dvb_weight=e[A.default.DVB_WEIGHT]),e.hasOwnProperty(A.default.AVAILABILITY_TIME_OFFSET)&&(t.availabilityTimeOffset=e[A.default.AVAILABILITY_TIME_OFFSET]),e.hasOwnProperty(A.default.AVAILABILITY_TIME_COMPLETE)&&(t.availabilityTimeComplete="false"!==e[A.default.AVAILABILITY_TIME_COMPLETE]),i.push(t),a}}),i}return e={getIsTypeOf:s,getIsTextTrack:p,getLanguageForAdaptation:function(e){var t="";return e&&e.hasOwnProperty(A.default.LANG)&&(t=e.lang.replace(/[^A-Za-z0-9-]/g,"")),t},getViewpointForAdaptation:function(e){return e&&e.hasOwnProperty(A.default.VIEWPOINT)?e.Viewpoint:null},getRolesForAdaptation:function(e){return e&&e.hasOwnProperty(A.default.ROLE_ASARRAY)?e.Role_asArray:[]},getAccessibilityForAdaptation:function(e){return e&&e.hasOwnProperty(A.default.ACCESSIBILITY_ASARRAY)?e.Accessibility_asArray:[]},getAudioChannelConfigurationForAdaptation:function(e){return e&&e.hasOwnProperty(A.default.AUDIOCHANNELCONFIGURATION_ASARRAY)?e.AudioChannelConfiguration_asArray:[]},getAudioChannelConfigurationForRepresentation:function(e){return e&&e.hasOwnProperty(A.default.AUDIOCHANNELCONFIGURATION_ASARRAY)?e.AudioChannelConfiguration_asArray:[]},getAdaptationForIndex:function(e,t,n){var r=c(t,n);return 0<r.length&&h(e)?r[e]:null},getIndexForAdaptation:function(e,t,n){if(!e)return-1;for(var r=c(t,n),i=0;i<r.length;i++){if((0,N.default)(a).getInstance().areEqual(r[i],e))return i}return-1},getAdaptationForId:function(e,t,n){var r,i=c(t,n),a=void 0;for(a=0,r=i.length;a<r;a++)if(i[a].hasOwnProperty(A.default.ID)&&i[a].id===e)return i[a];return null},getAdaptationsForType:function(e,t,n){var r,i=c(e,t),a=void 0,o=[];for(a=0,r=i.length;a<r;a++)s(i[a],n)&&o.push(u(i[a]));return o},getCodec:function(e,t,n){var r=null;if(e&&e.Representation_asArray&&0<e.Representation_asArray.length){var i=h(t)&&0<=t&&t<e.Representation_asArray.length?e.Representation_asArray[t]:e.Representation_asArray[0];i&&(r=i.mimeType+';codecs="'+i.codecs+'"',n&&void 0!==i.width&&(r+=';width="'+i.width+'";height="'+i.height+'"'))}return r},getMimeType:function(e){return e&&e.Representation_asArray&&0<e.Representation_asArray.length?e.Representation_asArray[0].mimeType:null},getKID:function(e){return e&&e.hasOwnProperty(A.default.CENC_DEFAULT_KID)?e[A.default.CENC_DEFAULT_KID]:null},getLabelsForAdaptation:function(e){if(!e||!Array.isArray(e.Label_asArray))return[];for(var t=[],n=0;n<e.Label_asArray.length;n++)t.push({lang:e.Label_asArray[n].lang,text:e.Label_asArray[n].__text||e.Label_asArray[n]});return t},getContentProtectionData:function(e){return e&&e.hasOwnProperty(A.default.CONTENTPROTECTION_ASARRAY)&&0!==e.ContentProtection_asArray.length?e.ContentProtection_asArray:null},getIsDynamic:g,hasProfile:function(e,t){var n=!1;return e&&e.profiles&&0<e.profiles.length&&(n=-1!==e.profiles.indexOf(t)),n},getDuration:function(e){return e&&e.hasOwnProperty(A.default.MEDIA_PRESENTATION_DURATION)?e.mediaPresentationDuration:e&&"dynamic"==e.type?Number.POSITIVE_INFINITY:Number.MAX_SAFE_INTEGER||Number.MAX_VALUE},getBandwidth:function(e){return e&&e.bandwidth?e.bandwidth:NaN},getManifestUpdatePeriod:function(e){var t=arguments.length<=1||void 0===arguments[1]?0:arguments[1],n=NaN;return e&&e.hasOwnProperty(A.default.MINIMUM_UPDATE_PERIOD)&&(n=e.minimumUpdatePeriod),isNaN(n)?n:Math.max(n-t,1)},getRepresentationCount:function(e){return e&&Array.isArray(e.Representation_asArray)?e.Representation_asArray.length:0},getBitrateListForAdaptation:function(e){var t=u(e);return(t&&Array.isArray(t.Representation_asArray)?t.Representation_asArray:[]).map(function(e){return{bandwidth:e.bandwidth,width:e.width||0,height:e.height||0,scanType:e.scanType||null,id:e.id||null}})},getRepresentationFor:function(e,t){return t&&t.Representation_asArray&&0<t.Representation_asArray.length&&h(e)?t.Representation_asArray[e]:null},getRepresentationsForAdaptation:function(e){var t,n,r=[],i=E(e),a=void 0,o=void 0;if(i&&i.Representation_asArray){if(e&&e.period&&h(e.period.index)){var s=T(e.period.mpd.manifest);s&&(o=s[0])}for(var u=0,l=i.Representation_asArray.length;u<l;++u){var f=i.Representation_asArray[u],d=new I.default;if(d.index=u,d.adaptation=e,f.hasOwnProperty(A.default.ID)&&(d.id=f.id),f.hasOwnProperty(A.default.CODECS)&&(d.codecs=f.codecs),f.hasOwnProperty(A.default.CODEC_PRIVATE_DATA)&&(d.codecPrivateData=f.codecPrivateData),f.hasOwnProperty(A.default.BANDWITH)&&(d.bandwidth=f.bandwidth),f.hasOwnProperty(A.default.WIDTH)&&(d.width=f.width),f.hasOwnProperty(A.default.HEIGHT)&&(d.height=f.height),f.hasOwnProperty(A.default.SCAN_TYPE)&&(d.scanType=f.scanType),f.hasOwnProperty(A.default.MAX_PLAYOUT_RATE)&&(d.maxPlayoutRate=f.maxPlayoutRate),f.hasOwnProperty(A.default.SEGMENT_BASE)?(a=f.SegmentBase,d.segmentInfoType=A.default.SEGMENT_BASE):f.hasOwnProperty(A.default.SEGMENT_LIST)?(a=f.SegmentList).hasOwnProperty(A.default.SEGMENT_TIMELINE)?(d.segmentInfoType=A.default.SEGMENT_TIMELINE,d.useCalculatedLiveEdgeTime=m(a.SegmentTimeline)):(d.segmentInfoType=A.default.SEGMENT_LIST,d.useCalculatedLiveEdgeTime=!0):f.hasOwnProperty(A.default.SEGMENT_TEMPLATE)?((a=f.SegmentTemplate).hasOwnProperty(A.default.SEGMENT_TIMELINE)?(d.segmentInfoType=A.default.SEGMENT_TIMELINE,d.useCalculatedLiveEdgeTime=m(a.SegmentTimeline)):d.segmentInfoType=A.default.SEGMENT_TEMPLATE,a.hasOwnProperty(A.default.INITIALIZATION_MINUS)&&(d.initialization=a.initialization.split("$Bandwidth$").join(f.bandwidth).split("$RepresentationID$").join(f.id))):d.segmentInfoType=A.default.BASE_URL,d.essentialProperties=_(f),a){if(a.hasOwnProperty(A.default.INITIALIZATION)){var c=a.Initialization;c.hasOwnProperty(A.default.SOURCE_URL)&&(d.initialization=c.sourceURL),c.hasOwnProperty(A.default.RANGE)&&(d.range=c.range)}else f.hasOwnProperty(A.default.MIME_TYPE)&&p(f.mimeType)&&(d.range=0);a.hasOwnProperty(A.default.TIMESCALE)&&(d.timescale=a.timescale),a.hasOwnProperty(A.default.DURATION)&&(d.segmentDuration=a.duration/d.timescale),a.hasOwnProperty(A.default.MEDIA)&&(d.media=a.media),a.hasOwnProperty(A.default.START_NUMBER)&&(d.startNumber=a.startNumber),a.hasOwnProperty(A.default.INDEX_RANGE)&&(d.indexRange=a.indexRange),a.hasOwnProperty(A.default.PRESENTATION_TIME_OFFSET)&&(d.presentationTimeOffset=a.presentationTimeOffset/d.timescale),a.hasOwnProperty(A.default.AVAILABILITY_TIME_OFFSET)?d.availabilityTimeOffset=a.availabilityTimeOffset:o&&void 0!==o.availabilityTimeOffset&&(d.availabilityTimeOffset=o.availabilityTimeOffset),a.hasOwnProperty(A.default.AVAILABILITY_TIME_COMPLETE)?d.availabilityTimeComplete="false"!==a.availabilityTimeComplete:o&&void 0!==o.availabilityTimeComplete&&(d.availabilityTimeComplete=o.availabilityTimeComplete)}d.MSETimeOffset=(0,n=(t=d).presentationTimeOffset,t.adaptation.period.start-n),d.path=[e.period.index,e.index,u],r.push(d)}}return r},getAdaptationsForPeriod:function(e){var t=e&&h(e.index)?e.mpd.manifest.Period_asArray[e.index]:null,n=[],r=void 0,i=void 0,a=void 0;if(t&&t.AdaptationSet_asArray)for(a=0;a<t.AdaptationSet_asArray.length;a++)i=t.AdaptationSet_asArray[a],r=new R.default,i.hasOwnProperty(A.default.ID)&&(r.id=i.id),r.index=a,r.period=e,s(i,S.default.MUXED)?r.type=S.default.MUXED:s(i,S.default.AUDIO)?r.type=S.default.AUDIO:s(i,S.default.VIDEO)?r.type=S.default.VIDEO:s(i,S.default.FRAGMENTED_TEXT)?r.type=S.default.FRAGMENTED_TEXT:s(i,S.default.IMAGE)?r.type=S.default.IMAGE:r.type=S.default.TEXT,n.push(r);return n},getRegularPeriods:function(e){var t,n=!!e&&g(e.manifest),r=[],i=null,a=null,o=null,s=null,u=void 0;for(u=0,t=e&&e.manifest&&e.manifest.Period_asArray?e.manifest.Period_asArray.length:0;u<t;u++)(a=e.manifest.Period_asArray[u]).hasOwnProperty(A.default.START)?(s=new b.default).start=a.start:null!==i&&i.hasOwnProperty(A.default.DURATION)&&null!==o?(s=new b.default).start=parseFloat((o.start+o.duration).toFixed(5)):0!==u||n||((s=new b.default).start=0),null!==o&&isNaN(o.duration)&&(null!==s?o.duration=parseFloat((s.start-o.start).toFixed(5)):l.warn("First period duration could not be calculated because lack of start and duration period properties. This will cause timing issues during playback")),null!==s&&(s.id=v(a,u),s.index=u,s.mpd=e,a.hasOwnProperty(A.default.DURATION)&&(s.duration=a.duration),r.push(s),i=a,o=s),s=a=null;return 0===r.length||null!==o&&isNaN(o.duration)&&(o.duration=parseFloat((function(e){!function(){if(!f||!f.hasOwnProperty("error"))throw new Error(S.default.MISSING_CONFIG_ERROR)}();var t=g(e.mpd.manifest),n=void 0;e.mpd.manifest.mediaPresentationDuration?n=e.mpd.manifest.mediaPresentationDuration:e.duration?n=e.duration:t?n=Number.POSITIVE_INFINITY:f.error(new L.default(x.default.MANIFEST_ERROR_ID_PARSE_CODE,"Must have @mediaPresentationDuration on MPD or an explicit @duration on the last period.",e));return n}(o)-o.start).toFixed(5))),r},getMpd:function(e){var t=new i.default;return e&&((t.manifest=e).hasOwnProperty(A.default.AVAILABILITY_START_TIME)?t.availabilityStartTime=new Date(e.availabilityStartTime.getTime()):e.loadedTime&&(t.availabilityStartTime=new Date(e.loadedTime.getTime())),e.hasOwnProperty(A.default.AVAILABILITY_END_TIME)&&(t.availabilityEndTime=new Date(e.availabilityEndTime.getTime())),e.hasOwnProperty(A.default.MINIMUM_UPDATE_PERIOD)&&(t.minimumUpdatePeriod=e.minimumUpdatePeriod),e.hasOwnProperty(A.default.MEDIA_PRESENTATION_DURATION)&&(t.mediaPresentationDuration=e.mediaPresentationDuration),e.hasOwnProperty(A.default.SUGGESTED_PRESENTATION_DELAY)&&(t.suggestedPresentationDelay=e.suggestedPresentationDelay),e.hasOwnProperty(A.default.TIMESHIFT_BUFFER_DEPTH)&&(t.timeShiftBufferDepth=e.timeShiftBufferDepth),e.hasOwnProperty(A.default.MAX_SEGMENT_DURATION)&&(t.maxSegmentDuration=e.maxSegmentDuration)),t},getEventsForPeriod:function(e){var t=e&&e.mpd&&e.mpd.manifest?e.mpd.manifest:null,n=t?t.Period_asArray:null,r=n&&e&&h(e.index)?n[e.index].EventStream_asArray:null,i=[],a=void 0,o=void 0;if(r)for(a=0;a<r.length;a++){var s=new w.default;if(s.period=e,s.timescale=1,!r[a].hasOwnProperty(S.default.SCHEME_ID_URI))throw new Error("Invalid EventStream. SchemeIdUri has to be set");for(s.schemeIdUri=r[a].schemeIdUri,r[a].hasOwnProperty(A.default.TIMESCALE)&&(s.timescale=r[a].timescale),r[a].hasOwnProperty(A.default.VALUE)&&(s.value=r[a].value),o=0;r[a].Event_asArray&&o<r[a].Event_asArray.length;o++){var u=new M.default;u.presentationTime=0,u.eventStream=s,r[a].Event_asArray[o].hasOwnProperty(A.default.PRESENTATION_TIME)&&(u.presentationTime=r[a].Event_asArray[o].presentationTime),r[a].Event_asArray[o].hasOwnProperty(A.default.DURATION)&&(u.duration=r[a].Event_asArray[o].duration),r[a].Event_asArray[o].hasOwnProperty(A.default.ID)&&(u.id=r[a].Event_asArray[o].id),r[a].Event_asArray[o].Signal&&r[a].Event_asArray[o].Signal.Binary?u.messageData=d.decodeArray(r[a].Event_asArray[o].Signal.Binary.toString()):u.messageData=r[a].Event_asArray[o].messageData||r[a].Event_asArray[o].__text,i.push(u)}}return i},getEventStreamForAdaptationSet:function(e,t){var n=void 0,r=void 0,i=void 0;return e&&e.Period_asArray&&t&&t.period&&h(t.period.index)&&(r=e.Period_asArray[t.period.index])&&r.AdaptationSet_asArray&&h(t.index)&&(i=r.AdaptationSet_asArray[t.index])&&(n=i.InbandEventStream_asArray),y(n,null)},getEventStreamForRepresentation:function(e,t){var n=void 0,r=void 0,i=void 0,a=void 0;return e&&e.Period_asArray&&t&&t.adaptation&&t.adaptation.period&&h(t.adaptation.period.index)&&(r=e.Period_asArray[t.adaptation.period.index])&&r.AdaptationSet_asArray&&h(t.adaptation.index)&&(i=r.AdaptationSet_asArray[t.adaptation.index])&&i.Representation_asArray&&h(t.index)&&(a=i.Representation_asArray[t.index])&&(n=a.InbandEventStream_asArray),y(n,t)},getUTCTimingSources:function(e){var t=g(e),n=!!e&&e.hasOwnProperty(A.default.AVAILABILITY_START_TIME),r=e?e.UTCTiming_asArray:null,i=[];return(t||n)&&r&&r.forEach(function(e){var t=new D.default;e.hasOwnProperty(S.default.SCHEME_ID_URI)&&(t.schemeIdUri=e.schemeIdUri,e.hasOwnProperty(A.default.VALUE)&&(t.value=e.value.toString(),i.push(t)))}),i},getBaseURLsFromElement:T,getRepresentationSortFunction:t,getLocation:function(e){if(e&&e.hasOwnProperty(S.default.LOCATION))return e.Location=e.Location_asArray[0],e.Location},getUseCalculatedLiveEdgeTimeForAdaptation:function(e){var t=E(e),n=t&&Array.isArray(t.Representation_asArray)?t.Representation_asArray[0]:null,r=void 0;if(n){if(n.hasOwnProperty(A.default.SEGMENT_LIST))return!(r=n.SegmentList).hasOwnProperty(A.default.SEGMENT_TIMELINE)||m(r.SegmentTimeline);if(n.hasOwnProperty(A.default.SEGMENT_TEMPLATE)&&(r=n.SegmentTemplate).hasOwnProperty(A.default.SEGMENT_TIMELINE))return m(r.SegmentTimeline)}return!1},getSuggestedPresentationDelay:function(e){return e&&e.hasOwnProperty(A.default.SUGGESTED_PRESENTATION_DELAY)?e.suggestedPresentationDelay:null},getAvailabilityStartTime:function(e){return e&&e.hasOwnProperty(A.default.AVAILABILITY_START_TIME)&&null!==e.availabilityStartTime?e.availabilityStartTime.getTime():null},getServiceDescriptions:function(e){var t=[];if(e&&e.hasOwnProperty(A.default.SERVICE_DESCRIPTION)){var n=!0,r=!1,i=void 0;try{for(var a,o=e.ServiceDescription_asArray[Symbol.iterator]();!(n=(a=o.next()).done);n=!0){var s=a.value,u=void 0,l=void 0,f=void 0,d=void 0;for(var c in s)s.hasOwnProperty(c)&&(c===A.default.ID?u=s[c]:c===A.default.SERVICE_DESCRIPTION_SCOPE?l=s[c].schemeIdUri:c===A.default.SERVICE_DESCRIPTION_LATENCY?f={target:s[c].target,max:s[c].max,min:s[c].min}:c===A.default.SERVICE_DESCRIPTION_PLAYBACK_RATE&&(d={max:s[c].max,min:s[c].min}));l===S.default.SERVICE_DESCRIPTION_LL_SCHEME&&(f||d)&&t.push({id:u,schemeIdUri:l,latency:f,playbackRate:d})}}catch(e){r=!0,i=e}finally{try{!n&&o.return&&o.return()}finally{if(r)throw i}}}return t},getSupplementalPropperties:function(e){var t={};if(e&&e.hasOwnProperty(A.default.SUPPLEMENTAL_PROPERTY)){var n=!0,r=!1,i=void 0;try{for(var a,o=e.SupplementalProperty_asArray[Symbol.iterator]();!(n=(a=o.next()).done);n=!0){var s=a.value;s.hasOwnProperty(S.default.SCHEME_ID_URI)&&s.hasOwnProperty(A.default.VALUE)&&(t[s[S.default.SCHEME_ID_URI]]=s[A.default.VALUE])}}catch(e){r=!0,i=e}finally{try{!n&&o.return&&o.return()}finally{if(r)throw i}}}return t},setConfig:function(e){e&&(e.errHandler&&(f=e.errHandler),e.BASE64&&(d=e.BASE64))}},l=(0,P.default)(a).getInstance().getLogger(e),e}o.__dashjs_factory_name="DashManifestModel",n.default=a.default.getSingletonFactory(o),t.exports=n.default},{108:108,205:205,217:217,221:221,226:226,45:45,47:47,51:51,61:61,84:84,85:85,86:86,87:87,90:90,91:91,92:92,96:96}],66:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var i=r(e(47)),u=r(e(45)),l=r(e(76)),f=r(e(3)),d=r(e(75)),c=r(e(73)),h=r(e(72)),p=r(e(74)),g=r(e(69)),_=r(e(70));function a(){var e=this.context,t=void 0,a=void 0,n=void 0,o=void 0,s=void 0;return t={parse:function(e){var t,n=window.performance.now();if(!(t=o.xml_str2json(e)))throw new Error("parsing the manifest failed");var r=window.performance.now();s.run(t);var i=window.performance.now();return a.info("Parsing complete: ( xml2json: "+(r-n).toPrecision(3)+"ms, objectiron: "+(i-r).toPrecision(3)+"ms, total: "+((i-n)/1e3).toPrecision(3)+"s)"),t},getMatchers:function(){return n},getIron:function(){return s}},a=(0,u.default)(e).getInstance().getLogger(t),n=[new c.default,new h.default,new p.default,new d.default],o=new f.default({escapeMode:!1,attributePrefix:"",arrayAccessForm:"property",emptyNodeForm:"object",stripWhitespaces:!1,enableToStringFunc:!0,ignoreRoot:!0,matchers:n}),s=(0,l.default)(e).create({adaptationset:new g.default,period:new _.default}),t}a.__dashjs_factory_name="DashParser",n.default=i.default.getClassFactory(a),t.exports=n.default},{3:3,45:45,47:47,69:69,70:70,72:72,73:73,74:74,75:75,76:76}],67:[function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}Object.defineProperty(n,"__esModule",{value:!0});var i=(function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}(a,[{key:"name",get:function(){return this._name}},{key:"merge",get:function(){return this._merge}}]),a);function a(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a);var t;this._name=e,this._merge=(t=e)&&t.length&&t.charAt(0)===t.charAt(0).toUpperCase()}n.default=i,t.exports=n.default},{}],68:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=function(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),e};function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var a,o=e(67),s=(a=o)&&a.__esModule?a:{default:a},u=(r(l,[{key:"name",get:function(){return this._name}},{key:"children",get:function(){return this._children}},{key:"properties",get:function(){return this._properties}}]),l);function l(e,t,n){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),this._name=e||"",this._properties=[],this._children=n||[],Array.isArray(t)&&t.forEach(function(e){r._properties.push(new s.default(e))})}n.default=u,t.exports=n.default},{67:67}],69:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});function r(e){return e&&e.__esModule?e:{default:e}}var i=r(e(68)),a=r(e(61)),o=(function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(s,i.default),s);function s(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s);var e=[a.default.PROFILES,a.default.WIDTH,a.default.HEIGHT,a.default.SAR,a.default.FRAMERATE,a.default.AUDIO_SAMPLING_RATE,a.default.MIME_TYPE,a.default.SEGMENT_PROFILES,a.default.CODECS,a.default.MAXIMUM_SAP_PERIOD,a.default.START_WITH_SAP,a.default.MAX_PLAYOUT_RATE,a.default.CODING_DEPENDENCY,a.default.SCAN_TYPE,a.default.FRAME_PACKING,a.default.AUDIO_CHANNEL_CONFIGURATION,a.default.CONTENT_PROTECTION,a.default.ESSENTIAL_PROPERTY,a.default.SUPPLEMENTAL_PROPERTY,a.default.INBAND_EVENT_STREAM];(function(e,t,n){for(var r=!0;r;){var i=e,a=t,o=n;r=!1,null===i&&(i=Function.prototype);var s=Object.getOwnPropertyDescriptor(i,a);if(void 0!==s){if("value"in s)return s.value;var u=s.get;if(void 0===u)return;return u.call(o)}var l=Object.getPrototypeOf(i);if(null===l)return;e=l,t=a,n=o,r=!0,s=l=void 0}})(Object.getPrototypeOf(s.prototype),"constructor",this).call(this,a.default.ADAPTATION_SET,e,[new i.default(a.default.REPRESENTATION,e,[new i.default(a.default.SUB_REPRESENTATION,e)])])}n.default=o,t.exports=n.default},{61:61,68:68}],70:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});function r(e){return e&&e.__esModule?e:{default:e}}var i=r(e(68)),a=r(e(61)),o=(function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(s,i.default),s);function s(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s);var e=[a.default.SEGMENT_BASE,a.default.SEGMENT_TEMPLATE,a.default.SEGMENT_LIST];(function(e,t,n){for(var r=!0;r;){var i=e,a=t,o=n;r=!1,null===i&&(i=Function.prototype);var s=Object.getOwnPropertyDescriptor(i,a);if(void 0!==s){if("value"in s)return s.value;var u=s.get;if(void 0===u)return;return u.call(o)}var l=Object.getPrototypeOf(i);if(null===l)return;e=l,t=a,n=o,r=!0,s=l=void 0}})(Object.getPrototypeOf(s.prototype),"constructor",this).call(this,a.default.PERIOD,e,[new i.default(a.default.ADAPTATION_SET,e,[new i.default(a.default.REPRESENTATION,e)])])}n.default=o,t.exports=n.default},{61:61,68:68}],71:[function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}Object.defineProperty(n,"__esModule",{value:!0});var i=(function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}(a,[{key:"test",get:function(){return this._test}},{key:"converter",get:function(){return this._converter}}]),a);function a(e,t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),this._test=e,this._converter=t}n.default=i,t.exports=n.default},{}],72:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r,i=e(71),a=(r=i)&&r.__esModule?r:{default:r},o=/^([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}))?/,s=(function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(u,a.default),u);function u(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,u),function(e,t,n){for(var r=!0;r;){var i=e,a=t,o=n;r=!1,null===i&&(i=Function.prototype);var s=Object.getOwnPropertyDescriptor(i,a);if(void 0!==s){if("value"in s)return s.value;var u=s.get;if(void 0===u)return;return u.call(o)}var l=Object.getPrototypeOf(i);if(null===l)return;e=l,t=a,n=o,r=!0,s=l=void 0}}(Object.getPrototypeOf(u.prototype),"constructor",this).call(this,function(e){return o.test(e.value)},function(e){var t=o.exec(e),n=void 0;if(n=Date.UTC(parseInt(t[1],10),parseInt(t[2],10)-1,parseInt(t[3],10),parseInt(t[4],10),parseInt(t[5],10),t[6]&&parseInt(t[6],10)||0,t[7]&&1e3*parseFloat(t[7])||0),t[9]&&t[10]){var r=60*parseInt(t[9],10)+parseInt(t[10],10);n+=("+"===t[8]?-1:1)*r*60*1e3}return new Date(n)})}n.default=s,t.exports=n.default},{71:71}],73:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});function r(e){return e&&e.__esModule?e:{default:e}}var i=r(e(71)),a=r(e(108)),o=r(e(61)),s=/^([-])?P(([\d.]*)Y)?(([\d.]*)M)?(([\d.]*)D)?T?(([\d.]*)H)?(([\d.]*)M)?(([\d.]*)S)?/,u=(function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(l,i.default),l);function l(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),function(e,t,n){for(var r=!0;r;){var i=e,a=t,o=n;r=!1,null===i&&(i=Function.prototype);var s=Object.getOwnPropertyDescriptor(i,a);if(void 0!==s){if("value"in s)return s.value;var u=s.get;if(void 0===u)return;return u.call(o)}var l=Object.getPrototypeOf(i);if(null===l)return;e=l,t=a,n=o,r=!0,s=l=void 0}}(Object.getPrototypeOf(l.prototype),"constructor",this).call(this,function(e){for(var t=[o.default.MIN_BUFFER_TIME,o.default.MEDIA_PRESENTATION_DURATION,o.default.MINIMUM_UPDATE_PERIOD,o.default.TIMESHIFT_BUFFER_DEPTH,o.default.MAX_SEGMENT_DURATION,o.default.MAX_SUBSEGMENT_DURATION,o.default.SUGGESTED_PRESENTATION_DELAY,o.default.START,a.default.START_TIME,o.default.DURATION],n=t.length,r=0;r<n;r++)if(e.nodeName===t[r])return s.test(e.value);return!1},function(e){var t=s.exec(e),n=31536e3*parseFloat(t[3]||0)+2592e3*parseFloat(t[5]||0)+86400*parseFloat(t[7]||0)+3600*parseFloat(t[9]||0)+60*parseFloat(t[11]||0)+parseFloat(t[13]||0);return void 0!==t[1]&&(n=-n),n})}n.default=u,t.exports=n.default},{108:108,61:61,71:71}],74:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r,i=e(71),a=(r=i)&&r.__esModule?r:{default:r},o=/^[-+]?[0-9]+[.]?[0-9]*([eE][-+]?[0-9]+)?$/,s=(function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(u,a.default),u);function u(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,u),function(e,t,n){for(var r=!0;r;){var i=e,a=t,o=n;r=!1,null===i&&(i=Function.prototype);var s=Object.getOwnPropertyDescriptor(i,a);if(void 0!==s){if("value"in s)return s.value;var u=s.get;if(void 0===u)return;return u.call(o)}var l=Object.getPrototypeOf(i);if(null===l)return;e=l,t=a,n=o,r=!0,s=l=void 0}}(Object.getPrototypeOf(u.prototype),"constructor",this).call(this,function(e){return o.test(e.value)},function(e){return parseFloat(e)})}n.default=s,t.exports=n.default},{71:71}],75:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});function r(e){return e&&e.__esModule?e:{default:e}}function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var i=r(e(71)),o=r(e(61)),s=(function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(u,i.default),u);function u(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,u),function(e,t,n){for(var r=!0;r;){var i=e,a=t,o=n;r=!1,null===i&&(i=Function.prototype);var s=Object.getOwnPropertyDescriptor(i,a);if(void 0!==s){if("value"in s)return s.value;var u=s.get;if(void 0===u)return;return u.call(o)}var l=Object.getPrototypeOf(i);if(null===l)return;e=l,t=a,n=o,r=!0,s=l=void 0}}(Object.getPrototypeOf(u.prototype),"constructor",this).call(this,function(e,t){var n,r=(a(n={},o.default.MPD,[o.default.ID,o.default.PROFILES]),a(n,o.default.PERIOD,[o.default.ID]),a(n,o.default.BASE_URL,[o.default.SERVICE_LOCATION,o.default.BYTE_RANGE]),a(n,o.default.SEGMENT_BASE,[o.default.INDEX_RANGE]),a(n,o.default.INITIALIZATION,[o.default.RANGE]),a(n,o.default.REPRESENTATION_INDEX,[o.default.RANGE]),a(n,o.default.SEGMENT_LIST,[o.default.INDEX_RANGE]),a(n,o.default.BITSTREAM_SWITCHING,[o.default.RANGE]),a(n,o.default.SEGMENT_URL,[o.default.MEDIA_RANGE,o.default.INDEX_RANGE]),a(n,o.default.SEGMENT_TEMPLATE,[o.default.INDEX_RANGE,o.default.MEDIA,o.default.INDEX,o.default.INITIALIZATION_MINUS,o.default.BITSTREAM_SWITCHING_MINUS]),a(n,o.default.ASSET_IDENTIFIER,[o.default.VALUE,o.default.ID]),a(n,o.default.EVENT_STREAM,[o.default.VALUE]),a(n,o.default.ADAPTATION_SET,[o.default.PROFILES,o.default.MIME_TYPE,o.default.SEGMENT_PROFILES,o.default.CODECS,o.default.CONTENT_TYPE]),a(n,o.default.FRAME_PACKING,[o.default.VALUE,o.default.ID]),a(n,o.default.AUDIO_CHANNEL_CONFIGURATION,[o.default.VALUE,o.default.ID]),a(n,o.default.CONTENT_PROTECTION,[o.default.VALUE,o.default.ID]),a(n,o.default.ESSENTIAL_PROPERTY,[o.default.VALUE,o.default.ID]),a(n,o.default.SUPPLEMENTAL_PROPERTY,[o.default.VALUE,o.default.ID]),a(n,o.default.INBAND_EVENT_STREAM,[o.default.VALUE,o.default.ID]),a(n,o.default.ACCESSIBILITY,[o.default.VALUE,o.default.ID]),a(n,o.default.ROLE,[o.default.VALUE,o.default.ID]),a(n,o.default.RATING,[o.default.VALUE,o.default.ID]),a(n,o.default.VIEWPOINT,[o.default.VALUE,o.default.ID]),a(n,o.default.CONTENT_COMPONENT,[o.default.CONTENT_TYPE]),a(n,o.default.REPRESENTATION,[o.default.ID,o.default.DEPENDENCY_ID,o.default.MEDIA_STREAM_STRUCTURE_ID]),a(n,o.default.SUBSET,[o.default.ID]),a(n,o.default.METRICS,[o.default.METRICS_MINUS]),a(n,o.default.REPORTING,[o.default.VALUE,o.default.ID]),n);if(r.hasOwnProperty(t)){var i=r[t];return void 0!==i&&0<=i.indexOf(e.name)}return!1},function(e){return String(e)})}n.default=s,t.exports=n.default},{61:61,71:71}],76:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r,i=e(47),a=(r=i)&&r.__esModule?r:{default:r};function o(f){function u(e,t){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}function l(e,t,n){for(var r=0,i=e.length;r<i;++r){var a=e[r];if(t[a.name])if(n[a.name]){if(a.merge){var o=t[a.name],s=n[a.name];"object"==typeof o&&"object"==typeof s?u(o,s):n[a.name]=o+s}}else n[a.name]=t[a.name]}}function d(e,t){for(var n=0,r=e.children.length;n<r;++n){var i=e.children[n],a=t[i.name+"_asArray"];if(a)for(var o=0,s=a.length;o<s;++o){var u=a[o];l(e.properties,t,u),d(i,u)}}}return{run:function(e){if(null===e||"object"!=typeof e)return e;if("period"in f)for(var t=f.period,n=e.Period_asArray,r=0,i=n.length;r<i;++r){var a=n[r];if(d(t,a),"adaptationset"in f){var o=a.AdaptationSet_asArray;if(o)for(var s=f.adaptationset,u=0,l=o.length;u<l;++u)d(s,o[u])}}return e}}}o.__dashjs_factory_name="ObjectIron";var s=a.default.getClassFactory(o);n.default=s,t.exports=n.default},{47:47}],77:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var i=r(e(47)),a=r(e(108)),f=e(80);function o(e,s){var u=(e=e||{}).timelineConverter;function l(){if(!u||!u.hasOwnProperty("calcPeriodRelativeTimeFromMpdRelativeTime"))throw new Error(a.default.MISSING_CONFIG_ERROR)}function i(e,t){if(l(),!e)return null;var n=e.adaptation.period.mpd.manifest.Period_asArray[e.adaptation.period.index].AdaptationSet_asArray[e.adaptation.index].Representation_asArray[e.index].SegmentList,r=n.SegmentURL_asArray.length,i=e.startNumber,a=null;if(t<r){var o=n.SegmentURL_asArray[t];(a=(0,f.getIndexBasedSegment)(u,s,e,t)).replacementTime=(i+t-1)*e.segmentDuration,a.media=o.media?o.media:"",a.mediaRange=o.mediaRange,a.index=t,a.indexRange=o.indexRange}return e.availableSegmentsNumber=r,a}return{getSegmentByIndex:i,getSegmentByTime:function(e,t){if(l(),!e)return null;var n=e.segmentDuration;if(isNaN(n))return null;var r=u.calcPeriodRelativeTimeFromMpdRelativeTime(e,t);return i(e,Math.floor(r/n))}}}o.__dashjs_factory_name="ListSegmentsGetter";var s=i.default.getClassFactory(o);n.default=s,t.exports=n.default},{108:108,47:47,80:80}],78:[function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}Object.defineProperty(n,"__esModule",{value:!0});var i=(function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}(a,null,[{key:"round10",value:function(e,t){return n="round",r=e,void 0!==(i=t)&&0!=+i?(i=+i,null===(r=+r)||isNaN(r)||"number"!=typeof i||i%1!=0?NaN:(r=r.toString().split("e"),+((r=(r=Math[n](+(r[0]+"e"+(r[1]?r[1]-i:-i)))).toString().split("e"))[0]+"e"+(r[1]?+r[1]+i:i)))):Math[n](r);var n,r,i}}]),a);function a(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a)}n.default=i,t.exports=n.default},{}],79:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var i=r(e(47)),o=r(e(108));function a(e){var n=(e=e||{}).timelineConverter;function a(){if(!n||!n.hasOwnProperty("calcPeriodRelativeTimeFromMpdRelativeTime"))throw new Error(o.default.MISSING_CONFIG_ERROR)}function r(e,t){if(a(),!e)return null;var n=e.segments?e.segments.length:-1,r=void 0;if(t<n&&(r=e.segments[t])&&r.availabilityIdx===t)return r;for(var i=0;i<n;i++)if((r=e.segments[i])&&r.availabilityIdx===t)return r;return null}return{getSegmentByIndex:r,getSegmentByTime:function(e,t){return a(),r(e,function(e,t){if(!e)return-1;var n=e.segments,r=n?n.length:null,i=-1,a=void 0,o=void 0,s=void 0,u=void 0,l=void 0;if(n&&0<r)for(l=0;l<r;l++)if(o=n[l],s=o.presentationStartTime,u=o.duration,s<=t+(a=u/2)&&t-a<s+u){i=o.availabilityIdx;break}return i}(e,n.calcPeriodRelativeTimeFromMpdRelativeTime(e,t)))}}}a.__dashjs_factory_name="SegmentBaseGetter";var s=i.default.getClassFactory(a);n.default=s,t.exports=n.default},{108:108,47:47}],80:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.unescapeDollarsInTemplate=function(e){return e?e.split("$$").join("$"):e},n.replaceIDForTemplate=function(e,t){if(!t||!e||-1===e.indexOf("$RepresentationID$"))return e;var n=t.toString();return e.split("$RepresentationID$").join(n)},n.replaceTokenForTemplate=g,n.getIndexBasedSegment=function(e,t,n,r){var i,a,o=void 0;o=n.segmentDuration,isNaN(o)&&(o=n.adaptation.period.duration);i=parseFloat((n.adaptation.period.start+r*o).toFixed(5)),a=parseFloat((i+o).toFixed(5));var s=_(n,o,i,e.calcMediaTimeFromPresentationTime(i,n),e.calcAvailabilityStartTimeFromPresentationTime(i,n.adaptation.period.mpd,t),e,a,t,r);return E(e,n,s,t)?s:null},n.getTimeBasedSegment=function(e,t,n,r,i,a,o,s,u,l){var f,d,c=r/a,h=Math.min(i/a,n.adaptation.period.mpd.maxSegmentDuration),p=void 0;return f=e.calcPresentationTimeFromMediaTime(c,n),d=f+h,p=_(n,h,f,c,n.adaptation.period.mpd.manifest.loadedTime,e,d,t,u),E(e,n,p,t)?(p.replacementTime=l||r,o=g(o,"Number",p.replacementNumber),o=g(o,"Time",p.replacementTime),p.media=o,p.mediaRange=s,p):null};var r,i=e(94),d=(r=i)&&r.__esModule?r:{default:r};function c(e,t){for(;e.length<t;)e="0"+e;return e}function g(e,t,n){var r=void 0,i=void 0,a=void 0,o=void 0,s=void 0,u=void 0,l=t.length,f="%0".length;if(!e)return e;for(;;){if((r=e.indexOf("$"+t))<0)return e;if((i=e.indexOf("$",r+l))<0)return e;if(r<(a=e.indexOf("%0",r+l))&&a<i)switch(o=e.charAt(i-1),s=parseInt(e.substring(a+f,i-1),10),o){case"d":case"i":case"u":u=c(n.toString(),s);break;case"x":u=c(n.toString(16),s);break;case"X":u=c(n.toString(16),s).toUpperCase();break;case"o":u=c(n.toString(8),s);break;default:return e}else u=n;e=e.substring(0,r)+u+e.substring(i+1)}}function _(e,t,n,r,i,a,o,s,u){var l,f=new d.default;return f.representation=e,f.duration=t,f.presentationStartTime=n,f.mediaStartTime=r,f.availabilityStartTime=i,f.availabilityEndTime=a.calcAvailabilityEndTimeFromPresentationTime(o,e.adaptation.period.mpd,s),f.wallStartTime=a.calcWallTimeForSegment(f,s),f.replacementNumber=(l=u,f.representation.startNumber+l),f.availabilityIdx=u,f}function E(e,t,n,r){var i=e.getPeriodEnd(t,r);if(e.calcPeriodRelativeTimeFromMpdRelativeTime(t,i)<=e.calcPeriodRelativeTimeFromMpdRelativeTime(t,n.presentationStartTime)){if(!r)return;if(t.segmentAvailabilityRange&&n.presentationStartTime>=t.segmentAvailabilityRange.end)return}return 1}},{94:94}],81:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var i=r(e(47)),a=r(e(108)),f=e(80);function o(e,s){var u=(e=e||{}).timelineConverter;function l(){if(!u||!u.hasOwnProperty("calcPeriodRelativeTimeFromMpdRelativeTime"))throw new Error(a.default.MISSING_CONFIG_ERROR)}function i(e,t){if(l(),!e)return null;var n=e.adaptation.period.mpd.manifest.Period_asArray[e.adaptation.period.index].AdaptationSet_asArray[e.adaptation.index].Representation_asArray[e.index].SegmentTemplate;t=Math.max(t,0);var r=(0,f.getIndexBasedSegment)(u,s,e,t);if(r){r.replacementTime=(t-1)*e.segmentDuration;var i=n.media;i=(0,f.replaceTokenForTemplate)(i,"Number",r.replacementNumber),i=(0,f.replaceTokenForTemplate)(i,"Time",r.replacementTime),r.media=i}var a=e.segmentDuration,o=e.segmentAvailabilityRange;return isNaN(a)?e.availableSegmentsNumber=1:e.availableSegmentsNumber=Math.ceil((o.end-o.start)/a),r}return{getSegmentByIndex:i,getSegmentByTime:function(e,t){if(l(),!e)return null;var n=e.segmentDuration;if(isNaN(n))return null;var r=u.calcPeriodRelativeTimeFromMpdRelativeTime(e,t);return i(e,Math.floor(r/n))}}}o.__dashjs_factory_name="TemplateSegmentsGetter";var s=i.default.getClassFactory(o);n.default=s,t.exports=n.default},{108:108,47:47,80:80}],82:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var f=r(e(46)),d=r(e(54)),i=r(e(47));function a(){var e=this.context,t=(0,f.default)(e).getInstance(),i=void 0,u=void 0,n=void 0;function r(e){i=e}function a(e,t,n,r){return r?n&&t.timeShiftBufferDepth!=Number.POSITIVE_INFINITY?new Date(t.availabilityStartTime.getTime()+1e3*(e+t.timeShiftBufferDepth)):t.availabilityEndTime:n?new Date(t.availabilityStartTime.getTime()+1e3*(e-i)):t.availabilityStartTime}function l(e,t){return(e.getTime()-t.mpd.availabilityStartTime.getTime()+1e3*i)/1e3}function o(e){u||void 0!==e.offset&&(r(e.offset/1e3),u=!0)}function s(){i=0,u=!1,n=NaN}return{initialize:function(){s(),t.on(d.default.TIME_SYNCHRONIZATION_COMPLETED,o,this)},isTimeSyncCompleted:function(){return u},setTimeSyncCompleted:function(e){u=e},getClientTimeOffset:function(){return i},setClientTimeOffset:r,getExpectedLiveEdge:function(){return n},setExpectedLiveEdge:function(e){n=e},calcAvailabilityStartTimeFromPresentationTime:function(e,t,n){return a.call(this,e,t,n)},calcAvailabilityEndTimeFromPresentationTime:function(e,t,n){return a.call(this,e,t,n,!0)},calcPresentationTimeFromWallTime:l,calcPresentationTimeFromMediaTime:function(e,t){return e+(t.adaptation.period.start-t.presentationTimeOffset)},calcPeriodRelativeTimeFromMpdRelativeTime:function(e,t){return t-e.adaptation.period.start},calcMediaTimeFromPresentationTime:function(e,t){return e-t.adaptation.period.start+t.presentationTimeOffset},calcSegmentAvailabilityRange:function(e,t){var n=e.adaptation.period,r={start:n.start,end:n.start+n.duration};if(!t)return r;if(!u&&e.segmentAvailabilityRange)return e.segmentAvailabilityRange;var i=e.segmentDuration||(e.segments&&e.segments.length?e.segments[e.segments.length-1].duration:0),a=l(new Date,n),o=n.start+n.duration;r.start=Math.max(a-n.mpd.timeShiftBufferDepth,n.start);var s=void 0!==e.availabilityTimeOffset&&e.availabilityTimeOffset<i?i-e.availabilityTimeOffset:i;return r.end=o<=a&&a-s<o?o:a-s,r},getPeriodEnd:function(e,t){var n=e.adaptation.period;if(!t)return n.start+n.duration;if(!u&&e.segmentAvailabilityRange)return e.segmentAvailabilityRange;var r=e.segmentDuration||(e.segments&&e.segments.length?e.segments[e.segments.length-1].duration:0),i=l(new Date,n),a=n.start+n.duration,o=void 0!==e.availabilityTimeOffset&&e.availabilityTimeOffset<r?r-e.availabilityTimeOffset:r;return Math.min(i-o,a)},calcWallTimeForSegment:function(e,t){var n=void 0,r=void 0,i=void 0;return t&&(n=e.representation.adaptation.period.mpd.suggestedPresentationDelay,r=e.presentationStartTime+n,i=new Date(e.availabilityStartTime.getTime()+1e3*r)),i},reset:function(){t.off(d.default.TIME_SYNCHRONIZATION_COMPLETED,o,this),s()}}}a.__dashjs_factory_name="TimelineConverter",n.default=i.default.getSingletonFactory(a),t.exports=n.default},{46:46,47:47,54:54}],83:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var i=r(e(47)),a=r(e(108)),p=e(80);function o(e,v){var y=(e=e||{}).timelineConverter;function t(){if(!y||!y.hasOwnProperty("calcMediaTimeFromPresentationTime")||!y.hasOwnProperty("calcSegmentAvailabilityRange"))throw new Error(a.default.MISSING_CONFIG_ERROR)}function n(e,t){var n,r,i,a=e.adaptation.period.mpd.manifest.Period_asArray[e.adaptation.period.index].AdaptationSet_asArray[e.adaptation.index].Representation_asArray[e.index].SegmentTemplate||e.adaptation.period.mpd.manifest.Period_asArray[e.adaptation.period.index].AdaptationSet_asArray[e.adaptation.index].Representation_asArray[e.index].SegmentList,o=a.SegmentTimeline,s=a.SegmentURL_asArray,u=0,l=0,f=-1,d=void 0,c=void 0,h=void 0,p=void 0,g=void 0,_=void 0;i=e.timescale;var E=!1;for(c=0,r=(n=o.S_asArray).length;c<r&&!E;c++){if(p=0,(d=n[c]).hasOwnProperty("r")&&(p=d.r),d.hasOwnProperty("t")&&(l=(u=d.t)/i),p<0){if((_=n[c+1])&&_.hasOwnProperty("t"))g=_.t/i;else{var m=e.segmentAvailabilityRange?e.segmentAvailabilityRange.end:y.calcSegmentAvailabilityRange(e,v).end;g=y.calcMediaTimeFromPresentationTime(m,e),e.segmentDuration=d.d/i}p=Math.ceil((g-l)/(d.d/i))-1}for(h=0;h<=p&&!E;h++)(E=t(u,l,a,s,d,i,++f,c))&&(e.segmentDuration=d.d/i,(h<p-1||c<r-1)&&f++),l=(u+=d.d)/i}e.availableSegmentsNumber=f}return{getSegmentByIndex:function(f,e,d){if(t(),!f)return null;var c=null,h=!1;return n(f,function(e,t,n,r,i,a,o,s){if(h||d<0){var u=n.media,l=i.mediaRange;return r&&(u=r[s].media||"",l=r[s].mediaRange),c=(0,p.getTimeBasedSegment)(y,v,f,e,i.d,a,u,l,o,i.tManifest),!0}return t>=d-.5*i.d/a&&(h=!0),!1}),c},getSegmentByTime:function(f,e){if(t(),!f)return null;void 0===e&&(e=null);var d=null,c=y.calcMediaTimeFromPresentationTime(e,f);return n(f,function(e,t,n,r,i,a,o,s){if(c<t+i.d/a){var u=n.media,l=i.mediaRange;return r&&(u=r[s].media||"",l=r[s].mediaRange),d=(0,p.getTimeBasedSegment)(y,v,f,e,i.d,a,u,l,o,i.tManifest),!0}return!1}),d}}}o.__dashjs_factory_name="TimelineSegmentsGetter";var s=i.default.getClassFactory(o);n.default=s,t.exports=n.default},{108:108,47:47,80:80}],84:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});n.default=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.period=null,this.index=-1,this.type=null},t.exports=n.default},{}],85:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});function i(e,t,n,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),this.url=e||"",this.serviceLocation=t||e||"",this.dvb_priority=n||1,this.dvb_weight=r||1,this.availabilityTimeOffset=0,this.availabilityTimeComplete=!0}i.DEFAULT_DVB_PRIORITY=1,i.DEFAULT_DVB_WEIGHT=1,n.default=i,t.exports=n.default},{}],86:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});n.default=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.duration=NaN,this.presentationTime=NaN,this.id=NaN,this.messageData="",this.eventStream=null,this.presentationTimeDelta=NaN},t.exports=n.default},{}],87:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});n.default=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.adaptionSet=null,this.representation=null,this.period=null,this.timescale=1,this.value="",this.schemeIdUri=""},t.exports=n.default},{}],88:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});n.default=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.DVRWindowSize=NaN,this.loadedTime=null,this.availableFrom=null,this.minBufferTime=NaN,this.duration=NaN,this.isDynamic=!1,this.maxFragmentDuration=null},t.exports=n.default},{}],89:[function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}Object.defineProperty(n,"__esModule",{value:!0});var i=(function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}(a,[{key:"isMediaInfoEqual",value:function(e){if(!e)return!1;var t=this.id===e.id,n=this.viewpoint===e.viewpoint,r=this.lang===e.lang,i=this.roles.toString()===e.roles.toString(),a=this.accessibility.toString()===e.accessibility.toString(),o=this.audioChannelConfiguration.toString()===e.audioChannelConfiguration.toString();return t&&n&&r&&i&&a&&o}}]),a);function a(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),this.id=null,this.index=null,this.type=null,this.streamInfo=null,this.representationCount=0,this.lang=null,this.viewpoint=null,this.accessibility=null,this.audioChannelConfiguration=null,this.roles=null,this.codec=null,this.mimeType=null,this.contentProtection=null,this.isText=!1,this.KID=null,this.bitrateList=null}n.default=i,t.exports=n.default},{}],90:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});n.default=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.manifest=null,this.suggestedPresentationDelay=0,this.availabilityStartTime=null,this.availabilityEndTime=Number.POSITIVE_INFINITY,this.timeShiftBufferDepth=Number.POSITIVE_INFINITY,this.maxSegmentDuration=Number.POSITIVE_INFINITY,this.minimumUpdatePeriod=NaN,this.mediaPresentationDuration=NaN},t.exports=n.default},{}],91:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});function r(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),this.id=null,this.index=-1,this.duration=NaN,this.start=NaN,this.mpd=null}r.DEFAULT_ID="defaultId",n.default=r,t.exports=n.default},{}],92:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=function(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),e};function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var a,o=e(61),s=(a=o)&&a.__esModule?a:{default:a},u=(r(l,[{key:"hasInitialization",value:function(){return null!==this.initialization||null!==this.range}},{key:"hasSegments",value:function(){return this.segmentInfoType!==s.default.BASE_URL&&this.segmentInfoType!==s.default.SEGMENT_BASE&&!this.indexRange}}]),l);function l(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),this.id=null,this.index=-1,this.adaptation=null,this.segmentInfoType=null,this.initialization=null,this.codecs=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.segmentAvailabilityRange=null,this.availableSegmentsNumber=0,this.bandwidth=NaN,this.width=NaN,this.height=NaN,this.scanType=null,this.maxPlayoutRate=NaN,this.availabilityTimeOffset=0,this.availabilityTimeComplete=!0}n.default=u,t.exports=n.default},{61:61}],93:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});n.default=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.id=null,this.quality=null,this.DVRWindow=null,this.fragmentDuration=null,this.mediaInfo=null,this.MSETimeOffset=null},t.exports=n.default},{}],94:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});n.default=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),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.availabilityIdx=NaN,this.wallStartTime=NaN,this.representation=null},t.exports=n.default},{}],95:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});n.default=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.id=null,this.index=null,this.start=NaN,this.duration=NaN,this.manifestInfo=null,this.isLast=!0},t.exports=n.default},{}],96:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});n.default=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.schemeIdUri="",this.value=""},t.exports=n.default},{}],97:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var l=r(e(108)),f=r(e(158)),d=r(e(229)),c=r(e(226)),i=r(e(47));function a(e){e=e||{};var t=this.context,i=e.eventBus,a=e.events,n=e.urlUtils,o=e.errors,s=void 0,u=void 0;return s={checkForExistence:function(t){function e(e){i.trigger(a.CHECK_FOR_EXISTENCE_COMPLETED,{request:t,exists:e})}if(t){var n=new d.default(t.url);u.load({request:n,success:function(){e(!0)},error:function(){e(!1)}})}else e(!1)},load:function(n){function r(e,t){i.trigger(a.LOADING_COMPLETED,{request:n,response:e||null,error:t||null,sender:s})}n?u.load({request:n,progress:function(e){i.trigger(a.LOADING_PROGRESS,{request:n,stream:e.stream}),e.data&&i.trigger(a.LOADING_DATA_PROGRESS,{request:n,response:e.data||null,error:null,sender:s})},success:function(e){r(e)},error:function(e,t,n){r(void 0,new c.default(o.FRAGMENT_LOADER_LOADING_FAILURE_ERROR_CODE,n,t))},abort:function(e){e&&i.trigger(a.LOADING_ABANDONED,{request:e,mediaType:e.mediaType,sender:s})}}):r(void 0,new c.default(o.FRAGMENT_LOADER_NULL_REQUEST_ERROR_CODE,o.FRAGMENT_LOADER_NULL_REQUEST_ERROR_MESSAGE))},abort:function(){u&&u.abort()},reset:function(){u&&(u.abort(),u=null)}},u=(0,f.default)(t).create({errHandler:e.errHandler,errors:o,dashMetrics:e.dashMetrics,mediaPlayerModel:e.mediaPlayerModel,requestModifier:e.requestModifier,useFetch:e.settings.get().streaming.lowLatencyEnabled,urlUtils:n,constants:l.default,boxParser:e.boxParser,dashConstants:e.dashConstants}),s}a.__dashjs_factory_name="FragmentLoader",n.default=i.default.getClassFactory(a),t.exports=n.default},{108:108,158:158,226:226,229:229,47:47}],98:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var _=r(e(108)),a=r(e(61)),o=r(e(123)),s=r(e(158)),u=r(e(221)),E=r(e(233)),m=r(e(226)),v=e(242),y=r(e(46)),T=r(e(54)),S=r(e(51)),i=r(e(47)),A=r(e(66)),I=r(e(45));function l(e){e=e||{};var l=this.context,f=(0,y.default)(l).getInstance(),d=(0,u.default)(l).getInstance(),t=void 0,c=void 0,n=void 0,h=void 0,p=void 0,g=e.mssHandler,r=e.errHandler;function i(e){f.trigger(T.default.INTERNAL_MANIFEST_LOADED,{manifest:e.manifest})}return t={load:function(u){var e=new E.default(u,v.HTTPRequest.MPD_TYPE);n.load({request:e,success:function(e,t,n){if(h){var r,i,a=void 0,o=void 0,s=void 0;if(n&&n!==u?(o=d.parseBaseUrl(n),a=n):(d.isRelative(u)&&(u=d.resolve(u,window.location.href)),o=d.parseBaseUrl(u)),null===p&&(i=null,p=-1<(r=e).indexOf("SmoothStreamingMedia")?(g&&(i=g.createMssParser(),g.registerEvents()),i):-1<r.indexOf("MPD")?(0,A.default)(l).create():i),null!==p){h.setMatchers(p.getMatchers()),h.setIron(p.getIron());try{s=p.parse(e)}catch(e){return void f.trigger(T.default.INTERNAL_MANIFEST_LOADED,{manifest:null,error:new m.default(S.default.MANIFEST_LOADER_PARSING_FAILURE_ERROR_CODE,S.default.MANIFEST_LOADER_PARSING_FAILURE_ERROR_MESSAGE+""+u)})}s?(s.url=a||u,s.originalUrl||(s.originalUrl=s.url),s.hasOwnProperty(_.default.LOCATION)&&(o=d.parseBaseUrl(s.Location_asArray[0]),c.debug("BaseURI set by Location to: "+o)),s.baseUri=o,s.loadedTime=new Date,h.resolveManifestOnLoad(s),f.trigger(T.default.ORIGINAL_MANIFEST_LOADED,{originalManifest:e})):f.trigger(T.default.INTERNAL_MANIFEST_LOADED,{manifest:null,error:new m.default(S.default.MANIFEST_LOADER_PARSING_FAILURE_ERROR_CODE,S.default.MANIFEST_LOADER_PARSING_FAILURE_ERROR_MESSAGE+""+u)})}else f.trigger(T.default.INTERNAL_MANIFEST_LOADED,{manifest:null,error:new m.default(S.default.MANIFEST_LOADER_PARSING_FAILURE_ERROR_CODE,S.default.MANIFEST_LOADER_PARSING_FAILURE_ERROR_MESSAGE+""+u)})}},error:function(e,t,n){f.trigger(T.default.INTERNAL_MANIFEST_LOADED,{manifest:null,error:new m.default(S.default.MANIFEST_LOADER_LOADING_FAILURE_ERROR_CODE,S.default.MANIFEST_LOADER_LOADING_FAILURE_ERROR_MESSAGE+(u+", ")+n)})}})},reset:function(){f.off(T.default.XLINK_READY,i,t),h&&(h.reset(),h=null),n&&(n.abort(),n=null),g&&g.reset()}},c=(0,I.default)(l).getInstance().getLogger(t),f.on(T.default.XLINK_READY,i,t),n=(0,s.default)(l).create({errHandler:e.errHandler,dashMetrics:e.dashMetrics,mediaPlayerModel:e.mediaPlayerModel,requestModifier:e.requestModifier,useFetch:e.settings.get().streaming.lowLatencyEnabled,urlUtils:d,constants:_.default,dashConstants:a.default,errors:S.default}),h=(0,o.default)(l).create({errHandler:r,dashMetrics:e.dashMetrics,mediaPlayerModel:e.mediaPlayerModel,requestModifier:e.requestModifier,settings:e.settings}),p=null,t}l.__dashjs_factory_name="ManifestLoader";var f=i.default.getClassFactory(l);n.default=f,t.exports=n.default},{108:108,123:123,158:158,221:221,226:226,233:233,242:242,45:45,46:46,47:47,51:51,54:54,61:61,66:66}],99:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var A=r(e(46)),I=r(e(54)),i=r(e(47)),R=r(e(45)),b=r(e(51));function a(){var e=this.context,r=(0,A.default)(e).getInstance(),t=void 0,i=void 0,a=void 0,n=void 0,o=void 0,s=void 0,u=void 0,l=void 0,f=void 0,d=void 0,c=void 0;function h(){a=NaN,o=!(s=!1),p()}function p(){null!==n&&(clearTimeout(n),n=null)}function g(e){p(),isNaN(e)&&!isNaN(a)&&(e=1e3*a),isNaN(e)||(i.debug("Refresh manifest in "+e+" milliseconds."),n=setTimeout(m,e))}function _(){s=!0;var e=l.getValue(),t=e.url,n=f.getLocation(e);n&&(t=n),u.load(t)}function E(e){l.setValue(e);var t=new Date,n=(t.getTime()-e.loadedTime.getTime())/1e3;2147483647<1e3*(a=f.getManifestUpdatePeriod(e,n))&&(a=2147483.647),r.trigger(I.default.MANIFEST_UPDATED,{manifest:e}),i.info("Manifest has been refreshed at "+t+"["+t.getTime()/1e3+"] "),o||g()}function m(){o&&!c.get().streaming.scheduleWhilePaused||(s?g(c.get().streaming.manifestUpdateRetryInterval):_())}function v(e){e.error?e.error.code===b.default.MANIFEST_LOADER_PARSING_FAILURE_ERROR_CODE&&d.error(e.error):E(e.manifest)}function y(){o=!1,g()}function T(){o=!0,p()}function S(){s=!1}return t={initialize:function(){h(),r.on(I.default.STREAMS_COMPOSED,S,this),r.on(I.default.PLAYBACK_STARTED,y,this),r.on(I.default.PLAYBACK_PAUSED,T,this),r.on(I.default.INTERNAL_MANIFEST_LOADED,v,this)},setManifest:function(e){E(e)},refreshManifest:_,setConfig:function(e){e&&(e.manifestModel&&(l=e.manifestModel),e.adapter&&(f=e.adapter),e.manifestLoader&&(u=e.manifestLoader),e.errHandler&&(d=e.errHandler),e.settings&&(c=e.settings))},reset:function(){r.off(I.default.PLAYBACK_STARTED,y,this),r.off(I.default.PLAYBACK_PAUSED,T,this),r.off(I.default.STREAMS_COMPOSED,S,this),r.off(I.default.INTERNAL_MANIFEST_LOADED,v,this),h()}},i=(0,R.default)(e).getInstance().getLogger(t),t}a.__dashjs_factory_name="ManifestUpdater",n.default=i.default.getClassFactory(a),t.exports=n.default},{45:45,46:46,47:47,51:51,54:54}],100:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var ue=r(e(2)),le=r(e(108)),fe=r(e(61)),de=r(e(109)),ce=r(e(119)),he=r(e(121)),pe=r(e(117)),ge=r(e(112)),_e=r(e(98)),Ee=r(e(213)),me=r(e(208)),ve=r(e(203)),ye=r(e(218)),Te=r(e(201)),Se=r(e(153)),Ae=r(e(150)),Ie=r(e(151)),Re=r(e(111)),be=r(e(157)),De=r(e(154)),Me=r(e(148)),Ce=r(e(210)),we=r(e(45)),Ne=r(e(51)),Oe=r(e(46)),Pe=r(e(54)),Le=r(e(101)),xe=r(e(47)),Fe=r(e(48)),Ue=e(50),ke=r(e(63)),Be=r(e(56)),Ge=r(e(58)),je=r(e(82)),Ye=e(242),qe=r(e(1)),He=r(e(9)),Ke=r(e(226)),Ve=e(219),ze=r(e(99)),We=r(e(221)),Xe=r(e(57)),Qe=r(e(62)),Ze=r(e(149)),$e=r(e(97)),Je=r(e(207));function i(){var i="You must first call initialize() and set a source before calling this method",r="You must first call initialize() and set a valid source and view before calling this method",t="You must first call attachView() to set the video element before calling this method",e="You must first call attachSource() with a valid source before calling this method",a="MediaPlayer not initialized!",o=this.context,s=(0,Oe.default)(o).getInstance(),u=(0,Fe.default)(o).getInstance(),l=(0,we.default)(o).getInstance({settings:u}),f=void 0,d=void 0,n=void 0,c=void 0,h=void 0,p=void 0,g=void 0,_=void 0,E=void 0,m=void 0,v=void 0,y=void 0,T=void 0,S=void 0,A=void 0,I=void 0,R=void 0,b=void 0,D=void 0,M=void 0,C=void 0,w=void 0,N=void 0,O=void 0,P=void 0,L=void 0,x=void 0,F=void 0,U=void 0,k=void 0,B=void 0,G=void 0;function j(){return!!n&&!!F.getElement()}function Y(){return(0,Ue.getVersionString)()}function q(){if(!_)throw r;return O.isPaused()}function H(e){var t=P.getCurrentDVRInfo();if(!t)return 0;var n=O.getLiveDelay(),r=t.range.start+e;return r>t.range.end-n&&(r=t.range.end-n),r}function K(e){if(!_)throw r;var t=$().currentTime;if(void 0!==e)t=N.getTimeRelativeToStreamId(t,e);else if(O.getIsDynamic()){var n=P.getCurrentDVRInfo();t=null===n?0:V()-(n.range.end-n.time)}return t}function V(){if(!_)throw r;var e=$().duration;if(O.getIsDynamic()){var t,n=P.getCurrentDVRInfo();if(!n)return 0;e=(t=n.range.end-n.range.start)<n.manifestInfo.DVRWindowSize?t:n.manifestInfo.DVRWindowSize}return e}function z(e){(0,Ve.checkParameterType)(e,"boolean"),E=e}function W(){D.restoreDefaultUTCTimingSources()}function X(e){var t=(0,ye.default)(o).getInstance(),n=(0,Xe.default)(o).create({type:e.config.type,mediaPlayerModel:D,mimeType:e.config.mimeType,baseURLController:C,streamInfo:e.config.streamInfo,errHandler:M,timelineConverter:T,settings:u,dashMetrics:P,eventBus:s,events:Pe.default,errors:Ne.default,debug:l,dashConstants:fe.default,requestModifier:t,urlUtils:(0,We.default)(o).getInstance(),boxParser:(0,Je.default)(o).getInstance()}),r=(0,Qe.default)(o).create({abrController:m,dashMetrics:P,playbackController:O,timelineConverter:T,type:e.config.type,eventBus:s,events:Pe.default,errors:Ne.default,dashConstants:fe.default,streamId:e.config.streamInfo?e.config.streamInfo.id:null}),i=(0,$e.default)(o).create({mediaPlayerModel:D,errHandler:M,requestModifier:t,settings:u,dashMetrics:P,eventBus:s,events:Pe.default,errors:Ne.default,dashConstants:fe.default,urlUtils:(0,We.default)(o).getInstance()}),a=(0,Ze.default)(o).create({dashMetrics:P,fragmentLoader:i,eventBus:s,events:Pe.default,debug:l});e.sender.setDashElements(n,a,r)}function Q(){if(!h)throw a;var e=dashjs.OfflineController;if("function"==typeof e){y=e(o).create(),s.on(e.events.DASH_ELEMENTS_CREATION_NEEDED,X,f),Le.default.extend(e.events,{publicOnly:!0}),Ne.default.extend(e.errors);var t=ie(),n=(0,ze.default)(o).create();n.setConfig({manifestModel:L,adapter:b,manifestLoader:t,errHandler:M}),y.setConfig({debug:l,manifestUpdater:n,baseURLController:C,manifestLoader:t,manifestModel:L,adapter:b,errHandler:M,schemeLoaderFactory:v,eventBus:s,events:Pe.default,constants:le.default,dashConstants:fe.default,urlUtils:(0,We.default)(o).getInstance()}),p=!0}}function Z(){return P}function $(){if(!F.getElement())throw t;return F.getElement()}function J(e){if(!h)throw a;F.setElement(e),e&&(ae(),function(){if(I)return;var e=dashjs.MetricsReporting;if("function"==typeof e){var t=e(o).create();I=t.createMetricsReporting({debug:l,eventBus:s,mediaElement:$(),adapter:b,dashMetrics:P,events:Pe.default,constants:le.default,metricsConstants:de.default})}}(),function(){if(R)return;var e=dashjs.MssHandler;"function"==typeof e&&(Ne.default.extend(e.errors),R=e(o).create({eventBus:s,mediaPlayerModel:D,dashMetrics:P,manifestModel:L,playbackController:O,protectionController:A,baseURLController:C,errHandler:M,events:Pe.default,constants:le.default,debug:l,initSegmentType:Ye.HTTPRequest.INIT_SEGMENT_TYPE,BASE64:qe.default,ISOBoxer:He.default,settings:u}))}(),N&&N.switchToVideoElement()),_&&re(),se()}function ee(e){if(!g)throw i;var t=N.getActiveStreamInfo();return S.getTracksFor(e,t)}function te(e){if(!h)throw a;"string"==typeof e&&k.initialize(e),n=e,(g||_)&&re(),j()&&se()}function ne(){if(!g)throw i;var e=N.getActiveStreamInfo();return e?N.getStreamById(e.id):null}function re(){g=_=!1,b.reset(),N.reset(),O.reset(),m.reset(),S.reset(),U.reset(),A&&(u.get().streaming.keepProtectionMediaKeys?A.stop():(A.reset(),A=null,ae())),x.reset()}function ie(){return(0,_e.default)(o).create({errHandler:M,dashMetrics:P,mediaPlayerModel:D,requestModifier:(0,ye.default)(o).getInstance(),mssHandler:R,settings:u})}function ae(){if(A)return A;var e=dashjs.Protection;if("function"!=typeof e)return null;var t=e(o).create();return Pe.default.extend(e.events),Le.default.extend(e.events,{publicOnly:!0}),Ne.default.extend(e.errors),w=w||(0,me.default)(o).getInstance(),A=t.createProtectionSystem({debug:l,errHandler:M,videoModel:F,capabilities:w,eventBus:s,events:Pe.default,BASE64:qe.default,constants:le.default})}function oe(e){var t=P.getCurrentDVRInfo();return t?e+(t.manifestInfo.availableFrom.getTime()/1e3+t.range.start):0}function se(){var e;p&&y.resetDownloads(),!g&&n&&(g=!0,d.info("Streaming Initialized"),e=ie(),N=N||(0,he.default)(o).getInstance(),S.setConfig({domStorage:B}),N.setConfig({capabilities:w,manifestLoader:e,manifestModel:L,mediaPlayerModel:D,protectionController:A,adapter:b,dashMetrics:P,errHandler:M,timelineConverter:T,videoModel:F,playbackController:O,abrController:m,mediaController:S,textController:U,settings:u,baseURLController:C}),O.setConfig({streamController:N,dashMetrics:P,mediaPlayerModel:D,adapter:b,videoModel:F,timelineConverter:T,uriFragmentModel:k,settings:u}),m.setConfig({streamController:N,domStorage:B,mediaPlayerModel:D,dashMetrics:P,adapter:b,videoModel:F,settings:u}),m.createAbrRulesCollection(),U.setConfig({errHandler:M,manifestModel:L,adapter:b,mediaController:S,streamController:N,videoModel:F}),x.setConfig({abrController:m,dashMetrics:P,playbackController:O}),N.initialize(E,c),x.initialize(),"string"==typeof n?N.load(n):N.loadWithManifest(n)),!_&&j()&&(_=!0,d.info("Playback Initialized"))}return f={initialize:function(e,t,n){w=w||(0,me.default)(o).getInstance(),M=(0,Ee.default)(o).getInstance(),w.supportsMediaSource()?h||(h=!0,T=(0,je.default)(o).getInstance(),m||(m=(0,Re.default)(o).getInstance()).setConfig({settings:u}),v=v||(0,be.default)(o).getInstance(),O=O||(0,ce.default)(o).getInstance(),S=S||(0,pe.default)(o).getInstance(),b=(0,Be.default)(o).getInstance(),L=(0,Ae.default)(o).getInstance(),x=(0,Me.default)(o).getInstance(),P=(0,Ge.default)(o).getInstance({settings:u}),U=(0,Te.default)(o).getInstance(),B=(0,Ce.default)(o).getInstance({settings:u}),b.setConfig({constants:le.default,cea608parser:ue.default,errHandler:M,BASE64:qe.default}),(C=C||(0,ge.default)(o).create()).setConfig({adapter:b}),(G=(0,ke.default)(o).getInstance({dashMetrics:P,mediaPlayerModel:D,errHandler:M,baseURLController:C,events:Pe.default,eventBus:s,debug:l,boxParser:(0,Je.default)(o).getInstance(),requestModifier:(0,ye.default)(o).getInstance(),errors:Ne.default})).initialize(),W(),z(void 0===n||n),e&&J(e),t&&te(t),p||Q(),d.info("[dash.js "+Y()+"] MediaPlayer has been initialized")):M.error(new Ke.default(Ne.default.CAPABILITY_MEDIASOURCE_ERROR_CODE,Ne.default.CAPABILITY_MEDIASOURCE_ERROR_MESSAGE))},setConfig:function(e){e&&(e.capabilities&&(w=e.capabilities),e.streamController&&(N=e.streamController),e.playbackController&&(O=e.playbackController),e.mediaPlayerModel&&(D=e.mediaPlayerModel),e.abrController&&(m=e.abrController),e.schemeLoaderFactory&&(v=e.schemeLoaderFactory),e.mediaController&&(S=e.mediaController),e.settings&&(u=e.settings))},on:function(e,t,n){s.on(e,t,n)},off:function(e,t,n){s.off(e,t,n)},extend:function(e,t,n){xe.default.extend(e,t,n,o)},attachView:J,attachSource:te,isReady:j,preload:function(){if(F.getElement()||g)return!1;if(!n)throw e;se()},play:function(){if(!_)throw r;(!E||q()&&_)&&O.play()},isPaused:q,pause:function(){if(!_)throw r;O.pause()},isSeeking:function(){if(!_)throw r;return O.isSeeking()},isDynamic:function(){if(!_)throw r;return O.getIsDynamic()},seek:function(e){if(!_)throw r;if((0,Ve.checkParameterType)(e,"number"),isNaN(e))throw le.default.BAD_ARGUMENT_ERROR;var t=O.getIsDynamic()?H(e):e;O.seek(t)},setPlaybackRate:function(e){$().playbackRate=e},getPlaybackRate:function(){return $().playbackRate},setMute:function(e){(0,Ve.checkParameterType)(e,"boolean"),$().muted=e},isMuted:function(){return $().muted},setVolume:function(e){if("number"!=typeof e||isNaN(e)||e<0||1<e)throw le.default.BAD_ARGUMENT_ERROR;$().volume=e},getVolume:function(){return $().volume},time:K,duration:V,timeAsUTC:function(){if(!_)throw r;return K()<0?NaN:oe(K())},durationAsUTC:function(){if(!_)throw r;return oe(V())},getActiveStream:ne,getDVRWindowSize:function(){var e=P.getCurrentDVRInfo();return e?e.manifestInfo.DVRWindowSize:0},getDVRSeekOffset:H,convertToTimeCode:function(e){e=Math.max(e,0);var t=Math.floor(e/3600),n=Math.floor(e%3600/60),r=Math.floor(e%3600%60);return(0===t?"":t<10?"0"+t.toString()+":":t.toString()+":")+(n<10?"0"+n.toString():n.toString())+":"+(r<10?"0"+r.toString():r.toString())},formatUTC:function(e,t,n){var r=!(arguments.length<=3||void 0===arguments[3])&&arguments[3],i=new Date(1e3*e),a=i.toLocaleDateString(t),o=i.toLocaleTimeString(t,{hour12:n});return r?o+" "+a:o},getVersion:Y,getDebug:function(){return l},getBufferLength:function(e){var t,n=[le.default.VIDEO,le.default.AUDIO,le.default.FRAGMENTED_TEXT];return e?-1===n.indexOf(e)?(d.warn("getBufferLength requested for invalid type"),NaN):(t=Z().getCurrentBufferLevel(e))||NaN:(t=n.map(function(e){return 0<ee(e).length?Z().getCurrentBufferLevel(e):Number.MAX_VALUE}).reduce(function(e,t){return Math.min(e,t)}))===Number.MAX_VALUE?NaN:t},getTTMLRenderingDiv:function(){return F?F.getTTMLRenderingDiv():null},getVideoElement:$,getSource:function(){if(!n)throw e;return n},getCurrentLiveLatency:function(){if(!h)throw a;return _?O.getCurrentLiveLatency():NaN},getTopBitrateInfoFor:function(e){if(!g)throw i;return m.getTopBitrateInfoFor(e)},setAutoPlay:z,getAutoPlay:function(){return E},getDashMetrics:Z,getQualityFor:function(e){if(!g)throw i;if(e!==le.default.IMAGE)return m.getQualityFor(e);var t=ne();if(!t)return-1;var n=t.getThumbnailController();return n?n.getCurrentTrackIndex():-1},setQualityFor:function(e,t){if(!g)throw i;if(e===le.default.IMAGE){var n=ne();if(!n)return;var r=n.getThumbnailController();r&&r.setTrackByIndex(t)}m.setPlaybackQuality(e,N.getActiveStreamInfo(),t)},updatePortalSize:function(){m.setElementSize(),m.setWindowResizeEventCalled(!0)},setTextDefaultLanguage:function(e){void 0===U&&(U=(0,Te.default)(o).getInstance()),U.setTextDefaultLanguage(e)},getTextDefaultLanguage:function(){return void 0===U&&(U=(0,Te.default)(o).getInstance()),U.getTextDefaultLanguage()},setTextDefaultEnabled:function(e){void 0===U&&(U=(0,Te.default)(o).getInstance()),U.setTextDefaultEnabled(e)},getTextDefaultEnabled:function(){return void 0===U&&(U=(0,Te.default)(o).getInstance()),U.getTextDefaultEnabled()},enableText:function(e){void 0===U&&(U=(0,Te.default)(o).getInstance()),U.enableText(e)},enableForcedTextStreaming:function(e){void 0===U&&(U=(0,Te.default)(o).getInstance()),U.enableForcedTextStreaming(e)},isTextEnabled:function(){return void 0===U&&(U=(0,Te.default)(o).getInstance()),U.isTextEnabled()},setTextTrack:function(e){if(!_)throw r;void 0===U&&(U=(0,Te.default)(o).getInstance()),U.setTextTrack(e)},getBitrateInfoListFor:function(e){if(!g)throw i;var t=ne();return t?t.getBitrateListFor(e):[]},getStreamsFromManifest:function(e){if(!g)throw i;return b.getStreamsInfo(e)},getTracksFor:ee,getTracksForTypeFromManifest:function(e,t,n){if(!g)throw i;return(n=n||b.getStreamsInfo(t,1)[0])?b.getAllMediaInfoForType(n,e,t):[]},getCurrentTrackFor:function(e){if(!g)throw i;var t=N.getActiveStreamInfo();return S.getCurrentTrackFor(e,t)},setInitialMediaSettingsFor:function(e,t){if(!h)throw a;S.setInitialSettings(e,t)},getInitialMediaSettingsFor:function(e){if(!h)throw a;return S.getInitialSettings(e)},setCurrentTrack:function(e){if(!g)throw i;S.setTrack(e)},getTrackSwitchModeFor:function(e){if(!h)throw a;return S.getSwitchMode(e)},setTrackSwitchModeFor:function(e,t){if(!h)throw a;S.setSwitchMode(e,t)},setSelectionModeForInitialTrack:function(e){if(!h)throw a;S.setSelectionModeForInitialTrack(e)},getSelectionModeForInitialTrack:function(){if(!h)throw a;return S.getSelectionModeForInitialTrack()},addABRCustomRule:function(e,t,n){D.addABRCustomRule(e,t,n)},removeABRCustomRule:function(e){D.removeABRCustomRule(e)},removeAllABRCustomRule:function(){D.removeABRCustomRule()},getAverageThroughput:function(e){var t=m.getThroughputHistory();return t?t.getAverageThroughput(e):0},retrieveManifest:function(e,n){var r=ie(),i=this;s.on(Pe.default.INTERNAL_MANIFEST_LOADED,function e(t){t.error?n(null,t.error):n(t.manifest),s.off(Pe.default.INTERNAL_MANIFEST_LOADED,e,i),r.reset()},i),k.initialize(e),r.load(e)},addUTCTimingSource:function(e,t){D.addUTCTimingSource(e,t)},removeUTCTimingSource:function(e,t){D.removeUTCTimingSource(e,t)},clearDefaultUTCTimingSources:function(){D.clearDefaultUTCTimingSources()},restoreDefaultUTCTimingSources:W,setXHRWithCredentialsForType:function(e,t){D.setXHRWithCredentialsForType(e,t)},getXHRWithCredentialsForType:function(e){return D.getXHRWithCredentialsForType(e)},getProtectionController:function(){return ae()},attachProtectionController:function(e){A=e},setProtectionData:function(e){c=e,N&&N.setProtectionData(c)},displayCaptionsOnTop:function(e){var t=(0,ve.default)(o).getInstance();t.setConfig({videoModel:F}),t.initialize(),t.setDisplayCConTop(e)},attachTTMLRenderingDiv:function(e){if(!F.getElement())throw t;F.setTTMLRenderingDiv(e)},getCurrentTextTrackIndex:function(){var e=NaN;return U&&(e=U.getCurrentTrackIdx()),e},getThumbnail:function(e,t){if(e<0)return null;var n=O.getIsDynamic()?H(e):e,r=N.getStreamForTime(n);if(null===r)return null;var i=r.getThumbnailController();if(!i)return null;var a=N.getTimeRelativeToStreamId(n,r.getId());return i.get(a,t)},loadDownloadsFromStorage:function(){return p||Q(),y?y.loadDownloadsFromStorage():Promise.reject()},createDownload:function(e){return p||Q(),y?y.createDownload(e):Promise.reject()},getDashAdapter:function(){return b},getSettings:function(){return u.get()},updateSettings:function(e){u.update(e)},resetSettings:function(){u.reset()},stopDownload:function(e){p&&y&&y.stopDownload(e)},getAllDownloads:function(){return p||Q(),y?y.getAllDownloads():Promise.reject()},deleteDownload:function(e){return p||Q(),y?y.deleteDownload(e):Promise.reject()},resumeDownload:function(e){p&&y&&y.resumeDownload(e)},getDownloadProgression:function(e){if(p)return y?y.getDownloadProgression(e):0},startDownload:function(e,t){t&&y&&y.startDownload(e,t)},initDownload:function(e){y&&y.initDownload(e)},reset:function(){te(null),J(null),c=null,A&&(A.reset(),A=null),I&&(I.reset(),I=null),G.reset(),u.reset(),y&&(y.reset(),p=!1,s.off(dashjs.OfflineController.events.DASH_ELEMENTS_CREATION_NEEDED,X,f))}},d=l.getLogger(f),E=!(g=_=p=h=!1),G=b=c=y=A=null,Pe.default.extend(Le.default),D=(0,Ie.default)(o).getInstance(),F=(0,De.default)(o).getInstance(),k=(0,Se.default)(o).getInstance(),f}i.__dashjs_factory_name="MediaPlayer";var a=xe.default.getClassFactory(i);a.events=Le.default,a.errors=Ne.default,xe.default.updateClassFactory(i.__dashjs_factory_name,a),n.default=a,t.exports=n.default},{1:1,101:101,108:108,109:109,111:111,112:112,117:117,119:119,121:121,148:148,149:149,150:150,151:151,153:153,154:154,157:157,2:2,201:201,203:203,207:207,208:208,210:210,213:213,218:218,219:219,221:221,226:226,242:242,45:45,46:46,47:47,48:48,50:50,51:51,54:54,56:56,57:57,58:58,61:61,62:62,63:63,82:82,9:9,97:97,98:98,99:99}],101:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r,i=e(55);function a(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),function(e,t,n){for(var r=!0;r;){var i=e,a=t,o=n;r=!1,null===i&&(i=Function.prototype);var s=Object.getOwnPropertyDescriptor(i,a);if(void 0!==s){if("value"in s)return s.value;var u=s.get;if(void 0===u)return;return u.call(o)}var l=Object.getPrototypeOf(i);if(null===l)return;e=l,t=a,n=o,r=!0,s=l=void 0}}(Object.getPrototypeOf(a.prototype),"constructor",this).call(this),this.AST_IN_FUTURE="astInFuture",this.BUFFER_EMPTY="bufferStalled",this.BUFFER_LOADED="bufferLoaded",this.BUFFER_LEVEL_STATE_CHANGED="bufferStateChanged",this.ERROR="error",this.FRAGMENT_LOADING_COMPLETED="fragmentLoadingCompleted",this.FRAGMENT_LOADING_PROGRESS="fragmentLoadingProgress",this.FRAGMENT_LOADING_STARTED="fragmentLoadingStarted",this.FRAGMENT_LOADING_ABANDONED="fragmentLoadingAbandoned",this.LOG="log",this.MANIFEST_LOADED="manifestLoaded",this.METRICS_CHANGED="metricsChanged",this.METRIC_CHANGED="metricChanged",this.METRIC_ADDED="metricAdded",this.METRIC_UPDATED="metricUpdated",this.PERIOD_SWITCH_COMPLETED="periodSwitchCompleted",this.PERIOD_SWITCH_STARTED="periodSwitchStarted",this.QUALITY_CHANGE_REQUESTED="qualityChangeRequested",this.QUALITY_CHANGE_RENDERED="qualityChangeRendered",this.TRACK_CHANGE_RENDERED="trackChangeRendered",this.SOURCE_INITIALIZED="sourceInitialized",this.STREAM_INITIALIZING="streamInitializing",this.STREAM_INITIALIZED="streamInitialized",this.STREAM_TEARDOWN_COMPLETE="streamTeardownComplete",this.TEXT_TRACKS_ADDED="allTextTracksAdded",this.TEXT_TRACK_ADDED="textTrackAdded",this.TTML_PARSED="ttmlParsed",this.TTML_TO_PARSE="ttmlToParse",this.CAPTION_RENDERED="captionRendered",this.CAPTION_CONTAINER_RESIZE="captionContainerResize",this.CAN_PLAY="canPlay",this.PLAYBACK_ENDED="playbackEnded",this.PLAYBACK_ERROR="playbackError",this.PLAYBACK_NOT_ALLOWED="playbackNotAllowed",this.PLAYBACK_METADATA_LOADED="playbackMetaDataLoaded",this.PLAYBACK_PAUSED="playbackPaused",this.PLAYBACK_PLAYING="playbackPlaying",this.PLAYBACK_PROGRESS="playbackProgress",this.PLAYBACK_RATE_CHANGED="playbackRateChanged",this.PLAYBACK_SEEKED="playbackSeeked",this.PLAYBACK_SEEKING="playbackSeeking",this.PLAYBACK_SEEK_ASKED="playbackSeekAsked",this.PLAYBACK_STALLED="playbackStalled",this.PLAYBACK_STARTED="playbackStarted",this.PLAYBACK_TIME_UPDATED="playbackTimeUpdated",this.PLAYBACK_WAITING="playbackWaiting",this.MANIFEST_VALIDITY_CHANGED="manifestValidityChanged"}var o=new(function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(a,((r=i)&&r.__esModule?r:{default:r}).default),a);n.default=o,t.exports=n.default},{55:55}],102:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r,i=e(100),a=(r=i)&&r.__esModule?r:{default:r};var s,o,u=(s="application/dash+xml",{create:l,createAll:function(e,t){var n=[];e=e||"[data-dashjs-player]";for(var r=(t=t||document).querySelectorAll(e),i=0;i<r.length;i++){var a=l(r[i],null);n.push(a)}var o=t.querySelectorAll('source[type="'+s+'"]');for(i=0;i<o.length;i++)a=l(f(o[i]),null),n.push(a);return n}});function l(e,t,n){if(!e||!/^VIDEO$/i.test(e.nodeName))return null;if(e._dashjs_player)return e._dashjs_player;var r=void 0,i=e.id||e.name||"video element";if(!(t=t||[].slice.call(e.querySelectorAll("source")).filter(function(e){return e.type==s})[0])&&e.src)(t=document.createElement("source")).src=e.src;else if(!t&&!e.src)return null;return n=n||{},(r=(0,a.default)(n).create()).initialize(e,t.src,e.autoplay),(o=o||r.getDebug().getLogger()).debug("Converted "+i+" to dash.js player and added content: "+t.src),e._dashjs_player=r}function f(e){for(var t=!0;t;){var n=e;if(t=!1,/^VIDEO$/i.test(n.nodeName))return n;e=n.parentNode,t=!0}}var d=o=void 0;"undefined"!=typeof window&&window&&window.dashjs&&window.dashjs.skipAutoCreate||"undefined"==typeof window||!window||!window.addEventListener||("complete"===window.document.readyState?window.dashjs?u.createAll():d=window.setInterval(function(){window.dashjs&&(window.clearInterval(d),u.createAll())},500):window.addEventListener("load",function e(){window.removeEventListener("load",e),u.createAll()})),n.default=u,t.exports=n.default},{100:100}],103:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var u=r(e(45)),i=r(e(47));function a(e){var t=this.context,n=void 0,r=void 0,a=void 0,o=[],i=e;function s(t,n){o=o.filter(function(e){return!((isNaN(n)||e.start<n)&&(isNaN(t)||e.end>t))})}return n={getAllBufferRanges:function(){for(var t=[],e=0;e<o.length;e++){var n=o[e];0===t.length||n.start>t[t.length-1].end?t.push({start:n.start,end:n.end}):t[t.length-1].end=n.end}var r={start:function(e){return t[e].start},end:function(e){return t[e].end}};return Object.defineProperty(r,"length",{get:function(){return t.length}}),r},append:function(e){a="InitializationSegment"!==e.segmentType?(o.push(e),o.sort(function(e,t){return e.start-t.start}),null):e,r.debug("PreBufferSink appended chunk s: "+e.start+"; e: "+e.end),i&&i({chunk:e})},remove:s,abort:function(){},discharge:function(e,t){var n,r,i=(n=e,r=t,o.filter(function(e){return(isNaN(r)||e.start<r)&&(isNaN(n)||e.end>n)}));return a&&(i.push(a),a=null),s(e,t),i},reset:function(){o=[],i=a=null},updateTimestampOffset:function(){},hasDiscontinuitiesAfter:function(){return!1},waitForUpdateEnd:function(e){e()},getBuffer:function(){return this}},r=(0,u.default)(t).getInstance().getLogger(n),n}a.__dashjs_factory_name="PreBufferSink";var o=i.default.getClassFactory(a);n.default=o,t.exports=n.default},{45:45,47:47}],104:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var A=r(e(45)),I=r(e(226)),R=r(e(46)),b=r(e(54)),i=r(e(47)),D=r(e(201)),M=r(e(51));function a(i,r,e,t,a){var o=this.context,s=(0,R.default)(o).getInstance(),u=void 0,l=void 0,f=void 0,d=void 0,c=void 0,n=[],h=[],p=e,g=!1!==t;function _(){try{return f.buffered}catch(e){return l.error("getAllBufferRanges exception: "+e.message),null}}function E(e,t,n,r){t&&0<t.length&&t.length<n.length&&function(e,t){for(var n=0;n<e.length;n++){var r=Math.round(e.start(n)),i=Math.round(e.end(n));if(i===t.start||r===t.end||t.start>=r&&t.end<=i)return 1}return}(t,r)&&s.trigger(b.default.SOURCEBUFFER_REMOVE_COMPLETED,{buffer:e,from:n.end(n.length-2),to:n.start(n.length-1),unintended:!0})}function m(){if(0<n.length){var e=n.shift();f.updating?S(e):(e(),m())}}function v(){f.updating||m()}function y(){f.updating||m()}function T(){l.error("SourceBufferSink error",r.type)}function S(e){n.push(e),f.updating||m()}return u={getAllBufferRanges:_,getBuffer:function(){return f},append:function(e){e?(h.push(e),d||S(function r(){var i=this;var a=this;0<h.length&&function(){d=!0;var t=h[0];h.splice(0,1);var n=[],e=function(){var e=_();E(a,n,e,t),0<h.length?r.call(this):(d=!1,p&&p({chunk:t}))};try{0===t.bytes.length?e.call(i):(n=_(),f.appendBuffer?f.appendBuffer(t.bytes):f.append(t.bytes,t),S(e.bind(i)))}catch(e){l.fatal('SourceBuffer append failed "'+e+'"'),0<h.length?r():d=!1,p&&p({chunk:t,error:new I.default(e.code,e.message)})}}()}.bind(this))):p({chunk:e,error:new I.default(M.default.APPEND_ERROR_CODE,M.default.APPEND_ERROR_MESSAGE)})},remove:function(t,n,e){var r=this;S(function(){try{0<=t&&t<n&&(e||"ended"!==i.readyState)&&f.remove(t,n),S(function(){s.trigger(b.default.SOURCEBUFFER_REMOVE_COMPLETED,{buffer:r,from:t,to:n,unintended:!1})})}catch(e){s.trigger(b.default.SOURCEBUFFER_REMOVE_COMPLETED,{buffer:r,from:t,to:n,unintended:!1,error:new I.default(e.code,e.message)})}})},abort:function(){try{("open"===i.readyState||f.setTextTrack&&"ended"===i.readyState)&&f.abort()}catch(e){l.error('SourceBuffer append abort failed: "'+e+'"')}h=[]},reset:function(e){if(f){if("function"==typeof f.removeEventListener&&(f.removeEventListener("updateend",y,!1),f.removeEventListener("error",T,!1),f.removeEventListener("abort",T,!1)),clearInterval(c),f.appendWindowEnd=1/0,!e){try{f.getClassName&&"TextSourceBuffer"===f.getClassName()||i.removeSourceBuffer(f)}catch(e){l.error("Failed to remove source buffer from media source.")}f=null}d=!1}h=[],p=null},updateTimestampOffset:function(e){f.timestampOffset===e||isNaN(e)||S(function(){f.timestampOffset=e})},hasDiscontinuitiesAfter:function(e){try{var t=_();if(t&&1<t.length)for(var n=0,r=t.length;n<r;n++)if(0<n&&e<t.start(n)&&t.start(n)>t.end(n-1)+.1)return!0}catch(e){l.error("hasDiscontinuities exception: "+e.message)}return!1},waitForUpdateEnd:S},function(){l=(0,A.default)(o).getInstance().getLogger(u),d=!1;var t=r.codec;try{if(t.match(/application\/mp4;\s*codecs="(stpp|wvtt).*"/i))throw new Error("not really supported");(f=a||i.addSourceBuffer(t)).changeType&&a&&(l.debug("Doing period transition with changeType"),f.changeType(t)),g&&f&&(f.appendWindowEnd=i.duration);if("function"==typeof f.addEventListener)try{f.addEventListener("updateend",y,!1),f.addEventListener("error",T,!1),f.addEventListener("abort",T,!1)}catch(e){c=setInterval(v,50)}else c=setInterval(v,50)}catch(e){if(!r.isText&&-1===t.indexOf('codecs="stpp')&&-1===t.indexOf('codecs="wvtt'))throw e;var n=(0,D.default)(o).getInstance();f=n.getTextSourceBuffer()}}(),u}a.__dashjs_factory_name="SourceBufferSink";var o=i.default.getClassFactory(a);n.default=o,t.exports=n.default},{201:201,226:226,45:45,46:46,47:47,51:51,54:54}],105:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var oe=r(e(108)),se=r(e(61)),ue=r(e(106)),le=r(e(115)),fe=r(e(116)),de=r(e(204)),ce=r(e(46)),he=r(e(54)),pe=r(e(45)),ge=r(e(51)),i=r(e(47)),_e=r(e(226)),Ee=r(e(207)),me=r(e(221));function a(s){s=s||{};var u=this.context,l=(0,ce.default)(u).getInstance(),e=(0,me.default)(u).getInstance(),f=s.manifestModel,d=s.mediaPlayerModel,a=s.manifestUpdater,c=s.adapter,i=s.capabilities,h=s.errHandler,p=s.timelineConverter,t=s.dashMetrics,g=s.abrController,_=s.playbackController,E=s.mediaController,m=s.textController,o=s.videoModel,v=s.settings,y=void 0,T=void 0,S=void 0,A=void 0,I=void 0,R=void 0,r=void 0,b=void 0,D=void 0,n=void 0,M=void 0,C=void 0,w=void 0,N=void 0,O=void 0,P=void 0,L=[{codec:"avc1",compatibleCodecs:["avc3"]},{codec:"avc3",compatibleCodecs:["avc1"]}];function x(e){for(var t=S?S.length:0,n=0;n<t;n++){S[n].getFragmentModel().removeExecutedRequestsBeforeTime(B()+k()),S[n].reset(!1,e)}ie(I=A=!(S=[])),l.off(he.default.CURRENT_TRACK_CHANGED,K,y)}function F(){x(),R=null,b=!(r={})}function U(){Y(),_&&_.pause(),n&&(n.reset(),n=null),F(),l.off(he.default.DATA_UPDATE_COMPLETED,J,y),l.off(he.default.BUFFERING_COMPLETED,$,y),D&&(l.off(he.default.KEY_ERROR,q,y),l.off(he.default.SERVER_CERTIFICATE_UPDATED,q,y),l.off(he.default.LICENSE_REQUEST_COMPLETE,q,y),l.off(he.default.KEY_SYSTEM_SELECTED,q,y),l.off(he.default.KEY_SESSION_CREATED,q,y),l.off(he.default.KEY_STATUSES_CHANGED,q,y)),ie(!1)}function k(){return R?R.duration:NaN}function B(){return R?R.start:NaN}function G(){return R}function j(){if(!(o&&g&&g.hasOwnProperty("getBitrateList")&&c&&c.hasOwnProperty("getAllMediaInfoForType")&&c.hasOwnProperty("getEventsFor")))throw new Error(oe.default.MISSING_CONFIG_ERROR)}function Y(){C&&C.stop()}function q(e){e.error&&(h.error(e.error),T.fatal(e.error.message),U())}function H(e){var t,n=e?e.type:null,r=void 0;if(n===oe.default.MUXED)return r="Multiplexed representations are intentionally not supported, as they are not compliant with the DASH-AVC/264 guidelines",T.fatal(r),void h.error(new _e.default(ge.default.MANIFEST_ERROR_ID_MULTIPLEXED_CODE,r,f.getValue()));if(n===oe.default.TEXT||n===oe.default.FRAGMENTED_TEXT||n===oe.default.EMBEDDED_TEXT||n===oe.default.IMAGE)return 1;if(t=e.codec,T.debug(n+" codec: "+t),e.contentProtection&&!i.supportsEncryptedMedia())h.error(new _e.default(ge.default.CAPABILITY_MEDIAKEYS_ERROR_CODE,ge.default.CAPABILITY_MEDIAKEYS_ERROR_MESSAGE));else if(!i.supportsCodec(t))return r=n+"Codec ("+t+") is not supported.",void T.error(r);return 1}function K(e){if(R&&e.newMediaInfo.streamInfo.id===R.id){var t=e.newMediaInfo,n=f.getValue();c.setCurrentMediaInfo(R.id,t.type,t);var r=ee(t);if(r){var i=_.getTime();T.info("Stream - Process track changed at current time "+i),T.debug("Stream - Update stream controller"),n.refreshManifestOnSwitchTrack?(T.debug("Stream - Refreshing manifest for switch track"),P=e,a.refreshManifest()):(r.selectMediaInfo(t),t.type!==oe.default.FRAGMENTED_TEXT?(g.updateTopQualityIndex(t),r.switchTrackAsked(),r.getFragmentModel().abortRequests()):(r.getScheduleController().setSeekTarget(i),r.setIndexHandlerTime(i),r.resetIndexHandler()))}}}function V(e,t){var n=c.getAllMediaInfoForType(R,e),r=null,i=void 0;if(n&&0!==n.length){for(var a=0,o=n.length;a<o;a++)if(r=n[a],e===oe.default.EMBEDDED_TEXT)m.addEmbeddedTrack(r);else{if(!H(r))continue;E.addTrack(r)}e!==oe.default.EMBEDDED_TEXT&&0!==E.getTracksFor(e,R).length&&(e!==oe.default.IMAGE?((e!==oe.default.FRAGMENTED_TEXT||e===oe.default.FRAGMENTED_TEXT&&m.getTextDefaultEnabled())&&(E.checkInitialMediaSettingsForType(e,R),i=E.getCurrentTrackFor(e,R)),e!==oe.default.FRAGMENTED_TEXT||m.getTextDefaultEnabled()||(i=E.getTracksFor(e,R)[0]),l.trigger(he.default.STREAM_INITIALIZING,{streamInfo:R,mediaInfo:r}),function(e,t,n,r){var i=(0,ue.default)(u).create({type:e?e.type:null,mimeType:e?e.mimeType:null,timelineConverter:p,adapter:c,manifestModel:f,mediaPlayerModel:d,dashMetrics:s.dashMetrics,baseURLController:s.baseURLController,stream:y,abrController:g,playbackController:_,mediaController:E,streamController:s.streamController,textController:m,errHandler:h,settings:v,boxParser:N});if(i.initialize(n),g.updateTopQualityIndex(e),r?(i.setBuffer(r.buffer),i.setIndexHandlerTime(r.currentTime),S[r.replaceIdx]=i):S.push(i),!r||!r.ignoreMediaInfo)if(!e||e.type!==oe.default.TEXT&&e.type!==oe.default.FRAGMENTED_TEXT)i.addMediaInfo(e,!0);else{for(var a=void 0,o=0;o<t.length;o++)t[o].index===e.index&&(a=o),i.addMediaInfo(t[o]);i.selectMediaInfo(t[a])}}(i,n,t)):M=(0,de.default)(u).create({adapter:c,baseURLController:s.baseURLController,stream:y,timelineConverter:s.timelineConverter,debug:O,eventBus:l,events:he.default,dashConstants:se.default}))}else T.info("No "+e+" data.")}function z(){C||((C=(0,le.default)(u).create()).setConfig({manifestUpdater:a,playbackController:_}),W())}function W(){var e=c.getEventsFor(R);C.addInlineEvents(e)}function X(e){var r=c.getAdaptationForType(R?R.index:null,e,R);r&&Array.isArray(r.Representation_asArray)&&(r.Representation_asArray=r.Representation_asArray.filter(function(e,t){if(0===t)return!0;var n=c.getCodec(r,t,!0);return!!i.supportsCodec(n)||(T.error("[Stream] codec not supported: "+n),!1)}))}function Q(){for(var e=S.length,t=!!r.audio||!!r.video?new _e.default(ge.default.DATA_UPDATE_FAILED_ERROR_CODE,ge.default.DATA_UPDATE_FAILED_ERROR_MESSAGE):null,n=0;n<e;n++)if(S[n].isUpdating()||b)return;if(I){if(D)for(n=0;n<e&&S[n];n++)S[n].getType()!==oe.default.AUDIO&&S[n].getType()!==oe.default.VIDEO&&S[n].getType()!==oe.default.FRAGMENTED_TEXT||D.initializeForMedia(S[n].getMediaInfo());t?h.error(t):l.trigger(he.default.STREAM_INITIALIZED,{streamInfo:R})}}function Z(e){for(var t={},n=0,r=S.length;n<r;n++){var i=S[n].createBuffer(e);i&&(t[S[n].getType()]=i.getBuffer())}return t}function $(e){if(e.streamInfo===R){var t=te(),n=t.length;if(0!==n){for(var r=0;r<n;r++)if(!t[r].isBufferingCompleted()&&(t[r].getType()===oe.default.AUDIO||t[r].getType()===oe.default.VIDEO))return void T.warn("onBufferingCompleted - One streamProcessor has finished but",t[r].getType(),"one is not buffering completed");T.debug("onBufferingCompleted - trigger STREAM_BUFFERING_COMPLETED"),l.trigger(he.default.STREAM_BUFFERING_COMPLETED,{streamInfo:R})}else T.warn("onBufferingCompleted - can't trigger STREAM_BUFFERING_COMPLETED because no streamProcessor is defined")}}function J(e){R&&e.sender.getStreamId()===R.id&&(r[e.sender.getType()]=e.error,Q())}function ee(t){return t?te().filter(function(e){return e.getType()===t.type})[0]:null}function te(){for(var e=[],t=void 0,n=void 0,r=0;r<S.length;r++)(t=(n=S[r]).getType())!==oe.default.AUDIO&&t!==oe.default.VIDEO&&t!==oe.default.FRAGMENTED_TEXT&&t!==oe.default.TEXT||e.push(n);return e}function ne(e,t){if(!e)return!1;var n=e.getStreamInfo(),r=G();if(!n||!r)return!1;var i=c.getAdaptationForType(n.index,t,n),a=c.getAdaptationForType(r.index,t,r);return i&&a?!i.ContentProtection&&!a.ContentProtection:!i&&!a}function re(e,t){if(!e||!e.hasOwnProperty("getStreamInfo"))return!1;var n=e.getStreamInfo(),r=G();if(!n||!r)return!1;var i=c.getAdaptationForType(n.index,t,n),a=c.getAdaptationForType(r.index,t,r);if(!i||!a)return!i&&!a;var o=i&&a&&i.mimeType===a.mimeType,s=a.Representation_asArray.map(function(e){return e.codecs}),u=i.Representation_asArray.map(function(e){return e.codecs}),l=u.some(function(e){return-1<s.indexOf(e)}),f=u.some(function(t){return s.some(function(e){return function(e,t){for(var n=e.split(".")[0],r=0===t.indexOf(n),i=void 0,a=0;a<L.length;a++)if(L[a].codec===n){i=L[a];break}if(i)return r||i.compatibleCodecs.some(function(e){return 0===t.indexOf(e)});return r}(e,t)})});return l||f&&o}function ie(e){w=e}function ae(){return w}return y={initialize:function(e,t){R=e,(D=t)&&(l.on(he.default.KEY_ERROR,q,y),l.on(he.default.SERVER_CERTIFICATE_UPDATED,q,y),l.on(he.default.LICENSE_REQUEST_COMPLETE,q,y),l.on(he.default.KEY_SYSTEM_SELECTED,q,y),l.on(he.default.KEY_SESSION_CREATED,q,y),l.on(he.default.KEY_STATUSES_CHANGED,q,y))},activate:function(e,t){if(A)return t;var n=void 0;return l.on(he.default.CURRENT_TRACK_CHANGED,K,y),n=ae()?(function(){if(b=!0,j(),X(oe.default.VIDEO),X(oe.default.AUDIO),I=!0,b=!1,0===S.length){var e="No streams to play.";h.error(new _e.default(ge.default.MANIFEST_ERROR_ID_NOSTREAMS_CODE,e,f.getValue())),T.debug(e)}else Q()}(),t):function(e,t){j();var n=o.getElement();z(),b=!0,X(oe.default.VIDEO),X(oe.default.AUDIO),(!n||n&&/^VIDEO$/i.test(n.nodeName))&&V(oe.default.VIDEO,e);V(oe.default.AUDIO,e),V(oe.default.TEXT,e),V(oe.default.FRAGMENTED_TEXT,e),V(oe.default.EMBEDDED_TEXT,e),V(oe.default.MUXED,e),V(oe.default.IMAGE,e);var r=Z(t);if(I=!0,b=!1,0===S.length){var i="No streams to play.";h.error(new _e.default(ge.default.MANIFEST_ERROR_ID_NOSTREAMS_CODE,i,f.getValue())),T.fatal(i)}else Q();return r}(e,t),A=!0,n},deactivate:x,isActive:function(){return A},getDuration:k,getStartTime:B,getId:function(){return R?R.id:null},getStreamInfo:G,preload:function(e,t){z(),V(oe.default.VIDEO,e),V(oe.default.AUDIO,e),V(oe.default.TEXT,e),V(oe.default.FRAGMENTED_TEXT,e),V(oe.default.EMBEDDED_TEXT,e),V(oe.default.MUXED,e),V(oe.default.IMAGE,e),Z(t),l.on(he.default.CURRENT_TRACK_CHANGED,K,y);for(var n=0;n<S.length&&S[n];n++)S[n].getScheduleController().start();ie(!0)},getFragmentController:function(){return n},getThumbnailController:function(){return M},getBitrateListFor:function(e){if(j(),e===oe.default.IMAGE)return M?M.getBitrateList():[];var t=function(e){for(var t=null,n=0;n<S.length;n++)if((t=S[n]).getType()===e)return t.getMediaInfo();return null}(e);return g.getBitrateList(t)},startEventController:function(){C&&C.start()},stopEventController:Y,updateData:function(e){T.info("Manifest updated... updating data system wide."),b=!(A=!1),R=e,C&&W(),X(oe.default.VIDEO),X(oe.default.AUDIO);for(var t=0,n=S.length;t<n;t++){var r=S[t],i=c.getMediaInfoForType(R,r.getType());g.updateTopQualityIndex(i),r.addMediaInfo(i,!0)}if(P&&(i=P.newMediaInfo).type!==oe.default.FRAGMENTED_TEXT){var a=ee(P.oldMediaInfo);if(!a)return;a.switchTrackAsked(),P=void 0}b=!1,Q()},reset:U,getProcessors:te,setMediaSource:function(e){for(var t=0;t<S.length;)H(S[t].getMediaInfo())?(S[t].setMediaSource(e),t++):(S[t].reset(),S.splice(t,1));for(t=0;t<S.length;t++)S[t].dischargePreBuffer();if(0===S.length){var n="No streams to play.";h.error(new _e.default(ge.default.MANIFEST_ERROR_ID_NOSTREAMS_CODE,n+"nostreams",f.getValue())),T.fatal(n)}},isMediaCodecCompatible:function(e){return re(e,oe.default.VIDEO)&&re(e,oe.default.AUDIO)},isProtectionCompatible:function(e){return ne(e,oe.default.VIDEO)&&ne(e,oe.default.AUDIO)},getPreloaded:ae,addInbandEvents:function(e){C&&C.addInbandEvents(e)}},O=(0,pe.default)(u).getInstance(),T=O.getLogger(y),F(),N=(0,Ee.default)(u).getInstance(),n=(0,fe.default)(u).create({mediaPlayerModel:d,dashMetrics:t,errHandler:h,settings:v,boxParser:N,dashConstants:se.default,urlUtils:e}),l.on(he.default.BUFFERING_COMPLETED,$,y),l.on(he.default.DATA_UPDATE_COMPLETED,J,y),y}a.__dashjs_factory_name="Stream",n.default=i.default.getClassFactory(a),t.exports=n.default},{106:106,108:108,115:115,116:116,204:204,207:207,221:221,226:226,45:45,46:46,47:47,51:51,54:54,61:61}],106:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var F=r(e(108)),U=r(e(61)),k=r(e(114)),B=r(e(200)),G=r(e(120)),j=r(e(62)),i=r(e(47)),Y=e(219),q=r(e(46)),H=r(e(54)),K=r(e(57)),V=r(e(51)),z=r(e(45)),W=r(e(218)),X=r(e(221));function a(t){t=t||{};var n=this.context,r=(0,q.default)(n).getInstance(),l=t.type,i=t.errHandler,a=t.mimeType,o=t.timelineConverter,f=t.adapter,s=t.manifestModel,u=t.mediaPlayerModel,d=t.stream,c=t.abrController,h=t.playbackController,p=t.streamController,g=t.mediaController,_=t.textController,E=t.dashMetrics,m=t.settings,v=t.boxParser,y=void 0,T=void 0,S=void 0,A=void 0,I=void 0,R=void 0,b=void 0,D=void 0,M=void 0;function e(){D=[]}function C(){S=[],T=null,e()}function w(e){var t=L(),n=t?t.id:null;e.sender.getType()===P()&&e.sender.getStreamId()===n&&e.error&&e.error.code===V.default.SEGMENTS_UPDATE_FAILED_ERROR_CODE&&O()}function N(e){e.sender.getStreamProcessor()===y&&(s.getValue().doNotUpdateDVRWindowOnBufferUpdated||O())}function O(){var e=L(),t=e?e.manifestInfo:null,n=t?t.isDynamic:null,r=o.calcSegmentAvailabilityRange(R.getCurrentRepresentation(),n);E.addDVRInfo(P(),h.getTime(),t,r)}function P(){return l}function L(){return d?d.getStreamInfo():null}function x(){return T}return y={initialize:function(e){(M=(0,K.default)(n).create({type:l,timelineConverter:o,dashMetrics:E,mediaPlayerModel:u,baseURLController:t.baseURLController,errHandler:i,settings:m,streamInfo:L(),boxParser:v,events:H.default,eventBus:r,errors:V.default,debug:(0,z.default)(n).getInstance(),requestModifier:(0,W.default)(n).getInstance(),dashConstants:U.default,constants:F.default,urlUtils:(0,X.default)(n).getInstance()})).initialize(h.getIsDynamic()),c.registerStreamType(l,y),(b=d.getFragmentController().getModel(l)).setStreamProcessor(y),A=function(e){var t=null;t=e===F.default.VIDEO||e===F.default.AUDIO?(0,k.default)(n).create({type:e,dashMetrics:E,mediaPlayerModel:u,manifestModel:s,errHandler:i,streamController:p,mediaController:g,adapter:f,textController:_,abrController:c,playbackController:h,streamProcessor:y,settings:m}):(0,B.default)(n).create({type:e,mimeType:a,dashMetrics:E,mediaPlayerModel:u,manifestModel:s,errHandler:i,streamController:p,mediaController:g,adapter:f,textController:_,abrController:c,playbackController:h,streamProcessor:y,settings:m});return t}(l),I=(0,G.default)(n).create({type:l,mimeType:a,adapter:f,dashMetrics:E,timelineConverter:o,mediaPlayerModel:u,abrController:c,playbackController:h,streamController:p,textController:_,streamProcessor:y,mediaController:g,settings:m}),R=(0,j.default)(n).create({abrController:c,dashMetrics:E,playbackController:h,timelineConverter:o,type:l,dashConstants:U.default,streamId:L()?L().id:null,events:H.default,eventBus:r,errors:V.default}),A.initialize(e),I.initialize()},isUpdating:function(){return!!R&&R.isUpdating()},getType:P,getBufferController:function(){return A},getFragmentModel:function(){return b},getScheduleController:function(){return I},getRepresentationController:function(){return R},getRepresentationInfo:function(e){var t=void 0;return t=void 0!==e?((0,Y.checkInteger)(e),R?R.getRepresentationForQuality(e):null):R?R.getCurrentRepresentation():null,f.convertDataToRepresentationInfo(t)},getBufferLevel:function(){return A?A.getBufferLevel():0},switchInitData:function(e,t){if(A){var n=L();A.switchInitData(n?n.id:null,e,t)}},isBufferingCompleted:function(){return!!A&&A.getIsBufferingCompleted()},createBuffer:function(e){return A.getBuffer()||A.createBuffer(T,e)},getStreamInfo:L,selectMediaInfo:function(e){e===T||e&&T&&e.type!==T.type||(T=e);var t=L(),n=f.getRealAdaptation(t,T),r=f.getVoRepresentations(T);if(R){var i=R.getData(),a=c.getTopQualityIndexFor(l,t?t.id:null),o=c.getMinAllowedIndexFor(l),s=void 0,u=null;s=null!==i&&i.id==n.id||l===F.default.FRAGMENTED_TEXT?c.getQualityFor(l):(u=c.getThroughputHistory().getAverageThroughput(l)||c.getInitialBitrateFor(l),c.getQualityForBitrate(T,u)),void 0!==o&&s<o&&(s=o),a<s&&(s=a),M.setMimeType(T?T.mimeType:null),R.updateData(n,r,l,s)}},addMediaInfo:function(e,t){-1===S.indexOf(e)&&S.push(e),t&&this.selectMediaInfo(e)},switchTrackAsked:function(){I.switchTrackAsked()},getMediaInfoArr:function(){return S},getMediaInfo:x,getMediaSource:function(){return A.getMediaSource()},setMediaSource:function(e){A.setMediaSource(e,x())},dischargePreBuffer:function(){A.dischargePreBuffer()},getBuffer:function(){return A.getBuffer()},setBuffer:function(e){A.setBuffer(e)},registerExternalController:function(e){D.push(e)},unregisterExternalController:function(e){var t=D.indexOf(e);-1!==t&&D.splice(t,1)},getExternalControllers:function(){return D},unregisterAllExternalController:e,addInbandEvents:function(e){d&&d.addInbandEvents(e)},setIndexHandlerTime:function(e){M&&M.setCurrentTime(e)},getIndexHandlerTime:function(){return M?M.getCurrentTime():NaN},resetIndexHandler:function(){M&&M.resetIndex()},getInitRequest:function(e){(0,Y.checkInteger)(e);var t=R?R.getRepresentationForQuality(e):null;return M?M.getInitRequest(x(),t):null},getFragmentRequest:function(e,t,n){var r=null;if(M){var i=R&&e?R.getRepresentationForQuality(e.quality):null;r=void 0!==t&&void 0!==n?M.getSegmentRequestForTime(x(),i,t,n):M.getNextSegmentRequest(x(),i)}return r},reset:function(e,t){M.reset(),A&&(A.reset(e,t),A=null),I&&(I.reset(),I=null),R&&(R.reset(),R=null),c&&c.unRegisterStreamType(l),D.forEach(function(e){e.reset()}),r.off(H.default.BUFFER_LEVEL_UPDATED,N,y),r.off(H.default.DATA_UPDATE_COMPLETED,w,y),C(),d=l=null}},C(),r.on(H.default.BUFFER_LEVEL_UPDATED,N,y),r.on(H.default.DATA_UPDATE_COMPLETED,w,y),y}a.__dashjs_factory_name="StreamProcessor",n.default=i.default.getClassFactory(a),t.exports=n.default},{108:108,114:114,120:120,200:200,218:218,219:219,221:221,45:45,46:46,47:47,51:51,54:54,57:57,61:61,62:62}],107:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var u=r(e(226)),i=r(e(158)),l=e(242),f=r(e(233)),d=r(e(46)),c=r(e(54)),a=r(e(47)),h=r(e(51));function o(e){e=e||{};var a="urn:mpeg:dash:resolve-to-zero:2013",t=this.context,o=(0,d.default)(t).getInstance(),s=(0,i.default)(t).create({errHandler:e.errHandler,dashMetrics:e.dashMetrics,mediaPlayerModel:e.mediaPlayerModel,requestModifier:e.requestModifier,useFetch:e.settings?e.settings.get().streaming.lowLatencyEnabled:null});return{load:function(n,r,i){function t(e,t){r.resolved=!0,r.resolvedContent=e||null,o.trigger(c.default.XLINK_ELEMENT_LOADED,{element:r,resolveObject:i,error:e||t?null:new u.default(h.default.XLINK_LOADER_LOADING_FAILURE_ERROR_CODE,h.default.XLINK_LOADER_LOADING_FAILURE_ERROR_MESSAGE+n)})}if(n===a)t(null,!0);else{var e=new f.default(n,l.HTTPRequest.XLINK_EXPANSION_TYPE);s.load({request:e,success:function(e){t(e)},error:function(){t(null)}})}},reset:function(){s&&(s.abort(),s=null)}}}o.__dashjs_factory_name="XlinkLoader",n.default=a.default.getClassFactory(o),t.exports=n.default},{158:158,226:226,233:233,242:242,46:46,47:47,51:51,54:54}],108:[function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function i(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),this.init()}Object.defineProperty(n,"__esModule",{value:!0});var a=new(function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}(i,[{key:"init",value:function(){this.STREAM="stream",this.VIDEO="video",this.AUDIO="audio",this.TEXT="text",this.FRAGMENTED_TEXT="fragmentedText",this.EMBEDDED_TEXT="embeddedText",this.MUXED="muxed",this.IMAGE="image",this.STPP="stpp",this.TTML="ttml",this.VTT="vtt",this.WVTT="wvtt",this.ABR_STRATEGY_DYNAMIC="abrDynamic",this.ABR_STRATEGY_BOLA="abrBola",this.ABR_STRATEGY_THROUGHPUT="abrThroughput",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.LOCATION="Location",this.INITIALIZE="initialize",this.TEXT_SHOWING="showing",this.TEXT_HIDDEN="hidden",this.CC1="CC1",this.CC3="CC3",this.UTF8="utf-8",this.SCHEME_ID_URI="schemeIdUri",this.START_TIME="starttime",this.SERVICE_DESCRIPTION_LL_SCHEME="urn:dvb:dash:lowlatency:scope:2019",this.SUPPLEMENTAL_PROPERTY_LL_SCHEME="urn:dvb:dash:lowlatency:critical:2019",this.XML="XML",this.ARRAY_BUFFER="ArrayBuffer"}}]),i);n.default=a,t.exports=n.default},{}],109:[function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function i(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),this.init()}Object.defineProperty(n,"__esModule",{value:!0});var a=new(function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}(i,[{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"}}]),i);n.default=a,t.exports=n.default},{}],110:[function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function i(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),this.init()}Object.defineProperty(n,"__esModule",{value:!0});var a=new(function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}(i,[{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"}}]),i);n.default=a,t.exports=n.default},{}],111:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var Y=r(e(189)),q=r(e(108)),H=r(e(109)),K=r(e(225)),V=r(e(149)),z=r(e(46)),W=r(e(54)),i=r(e(47)),X=r(e(185)),Q=r(e(186)),Z=r(e(187)),$=r(e(184)),J=r(e(188)),ee=r(e(45)),te=e(242),ne=e(219);function a(){var d=this.context,e=(0,ee.default)(d).getInstance(),c=(0,z.default)(d).getInstance(),h=void 0,p=void 0,g=void 0,o=void 0,s=void 0,_=void 0,E=void 0,m=void 0,u=void 0,i=void 0,a=void 0,l=void 0,f=void 0,v=void 0,y=void 0,T=void 0,S=void 0,A=void 0,I=void 0,R=void 0,b=void 0,D=void 0,M=void 0;function n(){(g=(0,Y.default)(d).create({dashMetrics:D,mediaPlayerModel:y,settings:M})).initialize()}function t(){s={},_={},m={},E={},A={},b={},void 0===i&&(i=!1),R=I=S=void 0,clearTimeout(u),u=null}function r(e){e.mediaType===q.default.VIDEO&&(S=e.oldQuality,I.push(S,v.getPlaybackQuality()))}function C(e){e.metric!==H.default.HTTP_REQUEST||!e.value||e.value.type!==te.HTTPRequest.MEDIA_SEGMENT_TYPE||e.mediaType!==q.default.AUDIO&&e.mediaType!==q.default.VIDEO||R.push(e.mediaType,e.value,M.get().streaming.abr.useDeadTimeLatency),e.metric!==H.default.BUFFER_LEVEL||e.mediaType!==q.default.AUDIO&&e.mediaType!==q.default.VIDEO||function(e,t){var n=M.get().streaming.abr.ABRStrategy;{if(n===q.default.ABR_STRATEGY_BOLA)return b[e]=!0;if(n===q.default.ABR_STRATEGY_THROUGHPUT)return b[e]=!1}var r=y.getStableBufferTime(),i=r,a=.5*r,o=b[e],s=(o?a:i)<t;(b[e]=s)!==o&&(s?p.info("["+e+"] switching from throughput to buffer occupancy ABR rule (buffer: "+t.toFixed(3)+")."):p.info("["+e+"] switching from buffer occupancy to throughput ABR rule (buffer: "+t.toFixed(3)+")."))}(e.mediaType,.001*e.value.level)}function w(e,t){return s[t]=s[t]||{},s[t].hasOwnProperty(e)||(s[t][e]=0),function(e,t){if(t!==q.default.VIDEO||!M.get().streaming.abr.limitBitrateByPortal||!E[t])return e;i||G();var n=f.getAdaptationForType(0,t).Representation,r=e;if(0<a&&0<l){for(;0<r&&n[r]&&a<n[r].width&&a-n[r-1].width<n[r].width-a;)--r;for(;r<n.length-1&&n[r].width===n[r+1].width;)r+=1}return r}(function(e,t,n){var r=M.get().streaming.abr.maxRepresentationRatio[t];if(isNaN(r)||1<=r||r<0)return e;return Math.min(e,Math.round(n*r))}(function(e,t){var n=e;if(!E[t])return n;var r=O(t);void 0!==r&&(n=Math.max(e,r));var i=N(t);void 0!==i&&(n=Math.min(n,i));return n}(s[t][e],e),e,s[t][e]),e)}function N(e){var t,n=(t=e,M.get().streaming.abr.maxBitrate[t]);return-1<n?F(E[e].getMediaInfo(),n):void 0}function O(e){var t,n=(t=e,M.get().streaming.abr.minBitrate[t]);if(-1<n){var r=E[e].getMediaInfo(),i=U(r),a=F(r,n);return i[a]&&a<i.length-1&&i[a].bitrate<1e3*n&&a++,a}}function P(e,t,n,r){var i=t.id,a=B(e);(0,ne.checkInteger)(n);var o=w(e,i);n!==a&&0<=n&&n<=o&&L(e,a,n,o,r)}function L(e,t,n,r,i){if(e&&E[e]){var a=E[e].getStreamInfo(),o=a?a.id:null;if(M.get().debug.logLevel===ee.default.LOG_LEVEL_DEBUG){var s=D.getCurrentBufferLevel(e);p.info("["+e+"] switch from "+t+" to "+n+"/"+r+" (buffer: "+s+") "+(i?JSON.stringify(i):"."))}l=e,d=n,_[f=o]=_[f]||{},_[f][l]=d,c.trigger(W.default.QUALITY_CHANGE_REQUESTED,{mediaType:e,streamInfo:a,oldQuality:t,newQuality:n,reason:i});var u=R.getAverageThroughput(e);isNaN(u)||T.setSavedBitrateSettings(e,u)}var l,f,d}function x(e,t){m[e].state=t}function F(e,t,n){var r=e&&e.type?E[e.type].getRepresentationInfo():null;if(M.get().streaming.abr.useDeadTimeLatency&&n&&r&&r.fragmentDuration){n/=1e3;var i=r.fragmentDuration;if(i<n)return 0;t*=1-n/i}for(var a=U(e),o=a.length-1;0<=o;o--){if(1e3*t>=a[o].bitrate)return o}return 0}function U(e){var t=[];if(!e||!e.bitrateList)return t;for(var n=e.bitrateList,r=e.type,i=void 0,a=0,o=n.length;a<o;a++)(i=new K.default).mediaType=r,i.qualityIndex=a,i.bitrate=n[a].bandwidth,i.width=n[a].width,i.height=n[a].height,i.scanType=n[a].scanType,t.push(i);return t}function k(e){return b[e]}function B(e){if(e&&E[e]){var t=E[e].getStreamInfo(),n=t?t.id:null;if(n)return _[n]=_[n]||{},_[n].hasOwnProperty(e)||(_[n][e]=0),_[n][e]}return 0}function G(){if(v){var e=M.get().streaming.abr.usePixelRatioInLimitBitrateByPortal&&window.hasOwnProperty("devicePixelRatio")?window.devicePixelRatio:1;a=v.getClientWidth()*e,l=v.getClientHeight()*e}}function j(e){var t=e.request.mediaType;if(M.get().streaming.abr.autoSwitchBitrate[t]){var n=E[t];if(!n)return;var r=(0,X.default)(d).create({abrController:h,streamProcessor:n,currentRequest:e.request,useBufferOccupancyABR:k(t)}),i=g.shouldAbandonFragment(r);if(i.quality>Q.default.NO_CHANGE){var a=n.getFragmentModel();a.getRequests({state:V.default.FRAGMENT_MODEL_LOADING,index:e.request.index})[0]&&(a.abortRequests(),x(t,H.default.ABANDON_LOAD),A[t].reset(),A[t].push({oldValue:B(t),newValue:i.quality,confidence:1,reason:i.reason}),P(t,o.getActiveStreamInfo(),i.quality,i.reason),clearTimeout(u),u=setTimeout(function(){x(t,H.default.ALLOW_LOAD),u=null},M.get().streaming.abandonLoadTimeout))}}}return h={isPlayingAtTopQuality:function(e){var t=e?e.id:null,n=B(q.default.AUDIO),r=B(q.default.VIDEO);return n===w(q.default.AUDIO,t)&&r===w(q.default.VIDEO,t)},updateTopQualityIndex:function(e){var t,n,r,i=e.type,a=e.streamInfo.id,o=e.representationCount-1;return t=i,r=o,s[n=a]=s[n]||{},s[n][t]=r,o},getThroughputHistory:function(){return R},getBitrateList:U,getQualityForBitrate:F,getTopBitrateInfoFor:function(e){if(e&&E&&E[e]){var t=E[e].getStreamInfo();if(t&&t.id){var n=w(e,t.id),r=U(E[e].getMediaInfo());return r[n]?r[n]:null}}return null},getMaxAllowedIndexFor:N,getMinAllowedIndexFor:O,getInitialBitrateFor:function(e){if(!function(){if(!T||!T.hasOwnProperty("getSavedBitrateSettings"))throw new Error(q.default.MISSING_CONFIG_ERROR)}(),e===q.default.TEXT||e===q.default.FRAGMENTED_TEXT)return NaN;var t=T.getSavedBitrateSettings(e),n=M.get().streaming.abr.initialBitrate[e],r=M.get().streaming.abr.initialRepresentationRatio[e];if(-1===n)if(-1<r){var i=f.getAdaptationForType(0,e).Representation;if(Array.isArray(i))n=i[Math.max(Math.round(i.length*r)-1,0)].bandwidth;else n=0}else n=isNaN(t)?e===q.default.VIDEO?1e3:100:t;return n},getQualityFor:B,getAbandonmentStateFor:function(e){return m[e]?m[e].state:null},setPlaybackQuality:P,checkPlaybackQuality:function(e){if(e&&E&&E[e]){var t=E[e].getStreamInfo(),n=t?t.id:null,r=B(e),i=(0,X.default)(d).create({abrController:h,streamProcessor:E[e],currentValue:r,switchHistory:A[e],droppedFramesHistory:I,useBufferOccupancyABR:k(e)});if(I){var a=v.getPlaybackQuality();a&&I.push(S,a)}if(M.get().streaming.abr.autoSwitchBitrate[e]){var o=O(e),s=w(e,n),u=g.getMaxQuality(i),l=u.quality;if(void 0!==o&&(l>Q.default.NO_CHANGE?l:r)<o&&(l=o),s<l&&(l=s),A[e].push({oldValue:r,newValue:l}),l>Q.default.NO_CHANGE&&l!=r)(m[e].state===H.default.ALLOW_LOAD||r<l)&&L(e,r,l,s,u.reason);else if(M.get().debug.logLevel===ee.default.LOG_LEVEL_DEBUG){var f=D.getCurrentBufferLevel(e);p.debug("["+e+"] stay on "+r+"/"+s+" (buffer: "+f+")")}}}},getTopQualityIndexFor:w,setElementSize:G,setWindowResizeEventCalled:function(e){i=e},createAbrRulesCollection:n,registerStreamType:function(e,t){A[e]=A[e]||(0,Z.default)(d).create(),E[e]=t,m[e]=m[e]||{},m[e].state=H.default.ALLOW_LOAD,b[e]=!1,c.on(W.default.LOADING_PROGRESS,j,this),e==q.default.VIDEO&&(c.on(W.default.QUALITY_CHANGE_RENDERED,r,this),I=I||(0,$.default)(d).create(),G()),c.on(W.default.METRIC_ADDED,C,this),c.on(W.default.PERIOD_SWITCH_COMPLETED,n,this),R=R||(0,J.default)(d).create({settings:M})},unRegisterStreamType:function(e){delete E[e]},setConfig:function(e){e&&(e.streamController&&(o=e.streamController),e.domStorage&&(T=e.domStorage),e.mediaPlayerModel&&(y=e.mediaPlayerModel),e.dashMetrics&&(D=e.dashMetrics),e.adapter&&(f=e.adapter),e.videoModel&&(v=e.videoModel),e.settings&&(M=e.settings))},reset:function(){t(),c.off(W.default.LOADING_PROGRESS,j,this),c.off(W.default.QUALITY_CHANGE_RENDERED,r,this),c.off(W.default.METRIC_ADDED,C,this),c.off(W.default.PERIOD_SWITCH_COMPLETED,n,this),g&&g.reset()}},p=e.getLogger(h),t(),h}a.__dashjs_factory_name="AbrController";var o=i.default.getSingletonFactory(a);o.QUALITY_DEFAULT=0,i.default.updateSingletonFactory(a.__dashjs_factory_name,o),n.default=o,t.exports=n.default},{108:108,109:109,149:149,184:184,185:185,186:186,187:187,188:188,189:189,219:219,225:225,242:242,45:45,46:46,47:47,54:54}],112:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var u=r(e(147)),l=r(e(206)),f=r(e(221)),d=r(e(85)),i=r(e(47)),c=r(e(46)),h=r(e(54));function a(){var e=void 0,n=void 0,t=this.context,r=(0,c.default)(t).getInstance(),i=(0,f.default)(t).getInstance(),a=void 0,o=void 0;function s(e){a.invalidateSelectedIndexes(e.entry)}return e={reset:function(){a.reset(),o.reset()},initialize:function(e){var t;a.setConfig({adapter:n}),t=e,a.update(t),o.chooseSelector(n.getIsDVB(t))},resolve:function(e){var t=a.getForPath(e).reduce(function(e,t){var n=o.select(t);return n?(i.isRelative(n.url)?e.url=i.resolve(n.url,e.url):(e.url=n.url,e.serviceLocation=n.serviceLocation),e.availabilityTimeOffset=n.availabilityTimeOffset,e.availabilityTimeComplete=n.availabilityTimeComplete,e):new d.default},new d.default);if(!i.isRelative(t.url))return t},setConfig:function(e){e.baseURLTreeModel&&(a=e.baseURLTreeModel),e.baseURLSelector&&(o=e.baseURLSelector),e.adapter&&(n=e.adapter)}},a=(0,u.default)(t).create(),o=(0,l.default)(t).create(),r.on(h.default.SERVICE_LOCATION_BLACKLIST_CHANGED,s,e),e}a.__dashjs_factory_name="BaseURLController",n.default=i.default.getClassFactory(a),t.exports=n.default},{147:147,206:206,221:221,46:46,47:47,54:54,85:85}],113:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var i=r(e(47)),s=r(e(46));function a(e){e=e||{};var t=[],n=(0,s.default)(this.context).getInstance(),r=e.updateEventName,i=e.addBlacklistEventName;function a(e){-1===t.indexOf(e)&&(t.push(e),n.trigger(r,{entry:e}))}function o(e){a(e.entry)}return function(){i&&n.on(i,o,this)}(),{add:a,contains:function(e){return!!(t.length&&e&&e.length)&&-1!==t.indexOf(e)},reset:function(){t=[]}}}a.__dashjs_factory_name="BlackListController",n.default=i.default.getClassFactory(a),t.exports=n.default},{46:46,47:47}],114:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var _e=r(e(108)),Ee=r(e(109)),me=r(e(149)),ve=r(e(104)),ye=r(e(103)),Te=r(e(111)),Se=r(e(117)),Ae=r(e(46)),Ie=r(e(54)),Re=r(e(207)),i=r(e(47)),be=r(e(45)),De=r(e(214)),Me=r(e(226)),Ce=r(e(51)),we=e(242),Ne="BufferController";function a(e){e=e||{};var c=this.context,s=(0,Ae.default)(c).getInstance(),t=e.dashMetrics,n=e.errHandler,r=e.streamController,i=e.mediaController,h=e.adapter,a=e.textController,o=e.abrController,d=e.playbackController,u=e.type,p=e.streamProcessor,l=e.settings,f=void 0,g=void 0,_=void 0,E=void 0,m=void 0,v=void 0,y=void 0,T=void 0,S=void 0,A=void 0,I=void 0,R=void 0,b=void 0,D=void 0,M=void 0,C=void 0,w=void 0,N=void 0,O=void 0,P=void 0,L=void 0,x=void 0;function F(e,t){if(!w||!e||!p)return null;if(y)try{"function"==typeof(A=t&&t[u]?(0,ve.default)(c).create(y,e,j.bind(this),l.get().streaming.useAppendWindowEnd,t[u]):(0,ve.default)(c).create(y,e,j.bind(this),l.get().streaming.useAppendWindowEnd)).getBuffer().initialize&&A.getBuffer().initialize(u,p)}catch(e){g.fatal("Caught error on create SourceBuffer: "+e),n.error(new Me.default(Ce.default.MEDIASOURCE_TYPE_UNSUPPORTED_CODE,Ce.default.MEDIASOURCE_TYPE_UNSUPPORTED_MESSAGE+u))}else A=(0,ye.default)(c).create(j.bind(this));return ae(p.getRepresentationInfo(_).MSETimeOffset),A}function U(e){e.fragmentModel===p.getFragmentModel()&&(g.info("Init fragment finished loading saving to",u+"'s init cache"),w.save(e.chunk),g.debug("Append Init fragment",u," with representationId:",e.chunk.representationId," and quality:",e.chunk.quality,", data size:",e.chunk.bytes.byteLength),B(e.chunk))}function k(e){if(e.fragmentModel===p.getFragmentModel()){var t=e.chunk,n=t.bytes,r=t.quality,i=p.getRepresentationInfo(r),a=p.getRepresentationController(),o=a&&i?a.getRepresentationForQuality(i.quality):null,s=h.getEventsFor(i.mediaInfo),u=h.getEventsFor(i,o);if(s&&0<s.length||u&&0<u.length){var l=function(e,t,n,r){for(var i=Math.max(!t||isNaN(t.startTime)?0:t.startTime,0),a=[],o=[],s=n.concat(r),u=0,l=s.length;u<l;u++)a[s[u].schemeIdUri+"/"+s[u].value]=s[u];var f=(0,Re.default)(c).getInstance().parse(e).getBoxes("emsg");for(u=0,l=f.length;u<l;u++){var d=h.getEvent(f[u],a,i);d&&o.push(d)}return o}(n,p.getFragmentModel().getRequests({state:me.default.FRAGMENT_MODEL_EXECUTED,quality:r,index:t.index})[0],s,u);p.addInbandEvents(l)}if(L){x=t;var f=A&&A.getAllBufferRanges();f&&0<f.length&&.5<d.getTimeToStreamEnd()&&(g.debug("Clearing buffer because track changed - "+(f.end(f.length-1)+.5)),ne([{start:0,end:f.end(f.length-1)+.5,force:!0}]))}else B(t)}}function B(e){A.append(e),e.mediaInfo.type===_e.default.VIDEO&&s.trigger(Ie.default.VIDEO_CHUNK_RECEIVED,{chunk:e})}function G(e){if(e&&0<e.length)for(var t=0,n=e.length;t<n;t++)g.debug("Buffered Range",e.start(t)," - ",e.end(t)," currentTime = ",d.getTime())}function j(e){if(e.error){if(22===e.error.code&&(C=!0,v=.8*he(),g.warn("Quota exceeded, Critical Buffer: "+v),0<v)){var t=Math.max(.2*v,1),n=v-t,r={streaming:{bufferToKeep:parseFloat(t.toFixed(5)),bufferAheadToKeep:parseFloat(n.toFixed(5))}};l.update(r)}22!==e.error.code&&pe()||(g.warn("Clearing playback buffer to overcome quota exceed situation"),s.trigger(Ie.default.QUOTA_EXCEEDED,{sender:f,criticalBufferLevel:v}),K())}else{C=!1,(b=e.chunk)&&!isNaN(b.index)&&(T=Math.max(b.index,T),$());var i=A.getAllBufferRanges();if(b.segmentType===we.HTTPRequest.MEDIA_SEGMENT_TYPE)G(i),V();else if(L){var a=d.getTime();g.debug("AppendToBuffer seek target should be "+a),p.getScheduleController().setSeekTarget(a),p.setIndexHandlerTime(a)}var o={sender:f,quality:b.quality,startTime:b.start,index:b.index,bufferedRanges:i};b&&!b.endFragment?s.trigger(Ie.default.BYTES_APPENDED,o):b&&s.trigger(Ie.default.BYTES_APPENDED_END_FRAGMENT,o)}}function Y(e){_!==e.newQuality&&u===e.mediaType&&p.getStreamInfo().id===e.streamInfo.id&&(ae(p.getRepresentationInfo(e.newQuality).MSETimeOffset),_=e.newQuality)}function q(){E&&(E=!(O=!0),S=Number.POSITIVE_INFINITY),(u!==_e.default.FRAGMENTED_TEXT?K:V)()}function H(){de(void 0)}function K(){A.waitForUpdateEnd(function(){var e=function(){var e=[],t=A.getAllBufferRanges();if(!t||0===t.length)return e;var n=d.getTime(),r=t.end(t.length-1)+.5,i=p.getFragmentModel().getRequests({state:me.default.FRAGMENT_MODEL_EXECUTED,time:n,threshold:.01})[0];if(i){var a={start:0,end:i.startTime-.5},o=p.getFragmentModel().getRequests({state:me.default.FRAGMENT_MODEL_EXECUTED,time:i.startTime-i.duration/2,threshold:.01})[0];o&&o.startTime!=i.startTime&&(a.end=o.startTime),a.start<a.end&&a.end>t.start(0)&&e.push(a);var s={start:i.startTime+i.duration+.5,end:r},u=p.getFragmentModel().getRequests({state:me.default.FRAGMENT_MODEL_EXECUTED,time:i.startTime+i.duration+.5,threshold:.01})[0];u&&u.startTime!==i.startTime&&(s.start=u.startTime+u.duration+.5),s.start<s.end&&s.start<r&&e.push(s)}else g.debug("getAllRangesWithSafetyFactor - No request found in current time position, removing full buffer 0 -",r),e.push({start:0,end:r});return e}();e&&0!==e.length||V(),ne(e)})}function V(){(!L||u===_e.default.FRAGMENTED_TEXT&&a.isTextEnabled())&&(Q(),Z())}function z(){J()}function W(){void 0!==N&&de(void 0),J()}function X(e,t){var n=A.getAllBufferRanges(),r=0,i=0,a=null,o=null,s=0,u=void 0,l=void 0,f=t||.15;if(null!=n){for(l=0,u=n.length;l<u;l++)if(r=n.start(l),i=n.end(l),null===a)s=Math.abs(r-e),(r<=e&&e<i||s<=f)&&(a=r,o=i);else{if(!((s=r-o)<=f))break;o=i}if(null!==a)return{start:a,end:o}}return null}function Q(){var e,t,n;d&&(e=function(){var e=d.getTime();if(N){var t=A.getAllBufferRanges();t&&t.length&&(e=Math.max(t.start(0),N))}return e}()||0,m=null===(n=X(e,t))?0:n.end-e,s.trigger(Ie.default.BUFFER_LEVEL_UPDATED,{sender:f,bufferLevel:m}),J())}function Z(){p&&r&&p.getStreamInfo()&&(t.addBufferState(u,R,p.getScheduleController().getBufferTarget()),t.addBufferLevel(u,new Date,1e3*m))}function $(){S-1<=T&&!E&&void 0===A.discharge&&(E=!0,g.debug("checkIfBufferingCompleted trigger BUFFERING_COMPLETED"),s.trigger(Ie.default.BUFFERING_COMPLETED,{sender:f,streamInfo:p.getStreamInfo()}))}function J(){u!==_e.default.AUDIO&&u!==_e.default.VIDEO||(O&&!E&&0<m&&d&&d.getTimeToStreamEnd()-m<.5&&(E=!(O=!1),g.debug("checkIfSufficientBuffer trigger BUFFERING_COMPLETED"),s.trigger(Ie.default.BUFFERING_COMPLETED,{sender:f,streamInfo:p.getStreamInfo()})),(!l.get().streaming.lowLatencyEnabled&&m<.5||0===m)&&!E?ee(Ee.default.BUFFER_EMPTY):(E||m>=p.getStreamInfo().manifestInfo.minBufferTime)&&ee(Ee.default.BUFFER_LOADED))}function ee(e){R===e||e===Ee.default.BUFFER_EMPTY&&0===d.getTime()||u===_e.default.FRAGMENTED_TEXT&&!a.isTextEnabled()||(R=e,Z(),s.trigger(Ie.default.BUFFER_LEVEL_STATE_CHANGED,{sender:f,state:e,mediaType:u,streamInfo:p.getStreamInfo()}),s.trigger(e===Ee.default.BUFFER_LOADED?Ie.default.BUFFER_LOADED:Ie.default.BUFFER_EMPTY,{mediaType:u}),g.debug(e===Ee.default.BUFFER_LOADED?"Got enough buffer to start":"Waiting for more buffer before starting playback"))}function te(){A&&u!==_e.default.FRAGMENTED_TEXT&&(E||ne(function(){var e=[],t=A.getAllBufferRanges();if(!t||0===t.length)return e;var n=d.getTime(),r={start:Math.max(0,n-l.get().streaming.bufferToKeep),end:n+l.get().streaming.bufferAheadToKeep},i=p.getFragmentModel().getRequests({state:me.default.FRAGMENT_MODEL_EXECUTED,time:n,threshold:.01})[0];if(i)r.start=Math.min(i.startTime,r.start),r.end=Math.max(i.startTime+i.duration,r.end);else if(0===n&&d.getIsDynamic())return[];if(t.start(0)<=r.start){for(var a={start:0,end:r.start},o=0;o<t.length&&t.end(o)<=r.start;o++)a.end=t.end(o);a.start<a.end&&e.push(a)}if(t.end(t.length-1)>=r.end){var s={start:r.end,end:t.end(t.length-1)+.01};s.start<s.end&&e.push(s)}return e}()))}function ne(e){e&&A&&0!==e.length&&(P.push.apply(P,e),M||re())}function re(){if(0===P.length||!A)return g.debug("Nothing to prune, halt pruning"),void(M=!(P=[]));var e=A.getBuffer();if(!e||!e.buffered||0===e.buffered.length)return g.debug("SourceBuffer is empty (or does not exist), halt pruning"),void(M=!(P=[]));var t=P.shift();g.debug("Removing buffer from:",t.start,"to",t.end),M=!0;var n=d.getTime();n<t.end&&(E=!1,T=0,L||(p.getScheduleController().setSeekTarget(n),p.setIndexHandlerTime(n))),A.remove(t.start,t.end,t.force)}function ie(e){A===e.buffer&&(g.debug("onRemoved buffer from:",e.from,"to",e.to),G(A.getAllBufferRanges()),0===P.length&&(M=!1),e.unintended&&(g.warn("Detected unintended removal from:",e.from,"to",e.to,"setting index handler time to",e.from),p.setIndexHandlerTime(e.from)),M?re():(L?(L=!1,x&&B(x)):(g.debug("onRemoved : call updateBufferLevel"),Q(),Z()),s.trigger(Ie.default.BUFFER_CLEARED,{sender:f,from:e.from,to:e.to,unintended:e.unintended,hasEnoughSpaceToAppend:pe(),quotaExceeded:C})))}function ae(e){A&&A.updateTimestampOffset&&A.updateTimestampOffset(e)}function oe(e){e.sender.getType()!==p.getType()||e.sender.getStreamId()!==p.getStreamInfo().id||e.error||ae(e.currentRepresentation.MSETimeOffset)}function se(e){e.fragmentModel===p.getFragmentModel()&&(S=e.request.index,$())}function ue(e){var t=A&&A.getAllBufferRanges();t&&e.newMediaInfo.type===u&&e.newMediaInfo.streamInfo.id===p.getStreamInfo().id&&(g.info("Track change asked"),i.getSwitchMode(u)===Se.default.TRACK_SWITCH_MODE_ALWAYS_REPLACE&&t&&0<t.length&&.5<d.getTimeToStreamEnd()&&(E=!1,S=Number.POSITIVE_INFINITY))}function le(){++D*(l.get().streaming.wallclockTimeUpdateInterval/1e3)>=l.get().streaming.bufferPruningInterval&&(D=0,te())}function fe(){J()}function de(e){N=e}function ce(e,t){y=e,A&&t&&"function"==typeof A.discharge&&(I=A,F(t))}function he(){var e,t=A.getAllBufferRanges(),n=0,r=void 0;if(!t)return n;for(r=0,e=t.length;r<e;r++)n+=t.end(r)-t.start(r);return n}function pe(){return he()<v}function ge(e,t){v=Number.POSITIVE_INFINITY,R=void 0,_=Te.default.QUALITY_DEFAULT,S=Number.POSITIVE_INFINITY,b=null,O=C=M=E=!1,D=m=T=0,P=[],A&&(e||A.abort(),A.reset(t),A=null),L=!1}return f={getBufferControllerType:function(){return Ne},initialize:function(e){ce(e),_=o.getQualityFor(u),s.on(Ie.default.DATA_UPDATE_COMPLETED,oe,this),s.on(Ie.default.INIT_FRAGMENT_LOADED,U,this),s.on(Ie.default.MEDIA_FRAGMENT_LOADED,k,this),s.on(Ie.default.QUALITY_CHANGE_REQUESTED,Y,this),s.on(Ie.default.STREAM_COMPLETED,se,this),s.on(Ie.default.PLAYBACK_PLAYING,W,this),s.on(Ie.default.PLAYBACK_PROGRESS,V,this),s.on(Ie.default.PLAYBACK_TIME_UPDATED,V,this),s.on(Ie.default.PLAYBACK_RATE_CHANGED,fe,this),s.on(Ie.default.PLAYBACK_SEEKING,q,this),s.on(Ie.default.PLAYBACK_SEEKED,H,this),s.on(Ie.default.PLAYBACK_STALLED,z,this),s.on(Ie.default.WALLCLOCK_TIME_UPDATED,le,this),s.on(Ie.default.CURRENT_TRACK_CHANGED,ue,this,Ae.default.EVENT_PRIORITY_HIGH),s.on(Ie.default.SOURCEBUFFER_REMOVE_COMPLETED,ie,this)},createBuffer:F,dischargePreBuffer:function(){if(A&&I&&"function"==typeof I.discharge){var e=I.getAllBufferRanges();if(0<e.length){for(var t="Beginning "+u+"PreBuffer discharge, adding buffer for:",n=0;n<e.length;n++)t+=" start: "+e.start(n)+", end: "+e.end(n)+";";g.debug(t)}else g.debug("PreBuffer discharge requested, but there were no media segments in the PreBuffer.");for(var r=I.discharge(),i=null,a=0;a<r.length;a++){var o=r[a],s=w.extract(o.streamId,o.representationId);s&&(i!==s&&(A.append(s),i=s),A.append(o))}I.reset(),I=null}},getType:function(){return u},getStreamProcessor:function(){return p},setSeekStartTime:de,getBuffer:function(){return A},setBuffer:function(e){A=e},getBufferLevel:function(){return m},getRangeAt:X,setMediaSource:ce,getMediaSource:function(){return y},getIsBufferingCompleted:function(){return E},switchInitData:function(e,t,n){var r=w.extract(e,t);L=!0===n&&n,r?(g.info("Append Init fragment",u," with representationId:",r.representationId," and quality:",r.quality,", data size:",r.bytes.byteLength),B(r)):s.trigger(Ie.default.INIT_REQUESTED,{sender:f})},getIsPruningInProgress:function(){return M},reset:function(e,t){s.off(Ie.default.DATA_UPDATE_COMPLETED,oe,this),s.off(Ie.default.QUALITY_CHANGE_REQUESTED,Y,this),s.off(Ie.default.INIT_FRAGMENT_LOADED,U,this),s.off(Ie.default.MEDIA_FRAGMENT_LOADED,k,this),s.off(Ie.default.STREAM_COMPLETED,se,this),s.off(Ie.default.CURRENT_TRACK_CHANGED,ue,this),s.off(Ie.default.PLAYBACK_PLAYING,W,this),s.off(Ie.default.PLAYBACK_PROGRESS,V,this),s.off(Ie.default.PLAYBACK_TIME_UPDATED,V,this),s.off(Ie.default.PLAYBACK_RATE_CHANGED,fe,this),s.off(Ie.default.PLAYBACK_SEEKING,q,this),s.off(Ie.default.PLAYBACK_SEEKED,H,this),s.off(Ie.default.PLAYBACK_STALLED,z,this),s.off(Ie.default.WALLCLOCK_TIME_UPDATED,le,this),s.off(Ie.default.SOURCEBUFFER_REMOVE_COMPLETED,ie,this),ge(e,t)}},g=(0,be.default)(c).getInstance().getLogger(f),w=(0,De.default)(c).getInstance(),ge(),f}a.__dashjs_factory_name=Ne,n.default=i.default.getClassFactory(a),t.exports=n.default},{103:103,104:104,108:108,109:109,111:111,117:117,149:149,207:207,214:214,226:226,242:242,45:45,46:46,47:47,51:51,54:54}],115:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var i=r(e(47)),A=r(e(45)),I=r(e(46)),R=r(e(54)),b=r(e(159));function a(){var l="urn:mpeg:dash:event:2012",f=1,d="urn:mpeg:dash:event:callback:2015",c=1,h=this.context,p=(0,I.default)(h).getInstance(),e=void 0,g=void 0,r=void 0,i=void 0,_=void 0,t=void 0,n=void 0,a=void 0,E=void 0,o=void 0,s=void 0;function u(){s=!1,r={},i={},_={},t=null,n=100,a=Date.now()/1e3}function m(){if(!E||!o)throw new Error("setConfig function has to be called previously")}function v(){null!==t&&s&&(clearInterval(t),t=null,s=!1)}function y(e){if(e.eventStream.value==f){var t=e.eventStream.timescale||1,n=e.presentationTime/t,r=void 0;r=4294967295==e.presentationTime?NaN:(e.presentationTime+e.duration)/t,g.info("Manifest validity changed: Valid until: "+n+"; remaining duration: "+r),p.trigger(R.default.MANIFEST_VALIDITY_CHANGED,{id:e.id,validUntil:n,newDuration:r,newManifestValidAfter:NaN})}}function T(){var e=o.getTime(),t=e-a;a=e,t=Math.max(0,t),S(i,t,e),S(r,t,e),function(){if(_)for(var e=o.getTime(),t=Object.keys(_),n=0;n<t.length;n++){var r=t[n],i=_[r];null!==i&&(i.duration+i.presentationTime)/i.eventStream.timescale<e&&(g.debug("Remove Event "+r+" at time "+e),i=null,delete _[r])}}()}function S(e,t,n){var r,i;if(e)for(var a=Object.keys(e),o=0;o<a.length;o++){var s=a[o],u=e[s];void 0!==u&&(0==(r=u.presentationTime/u.eventStream.timescale)||r<=n&&n<r+t?(g.debug("Start Event "+s+" at "+n),0<u.duration&&(_[s]=u),u.eventStream.schemeIdUri==l&&u.eventStream.value==f?0===u.duration&&0===u.presentationTimeDelta||(m(),E.refreshManifest()):u.eventStream.schemeIdUri==d&&u.eventStream.value==c?(i=u.messageData,(0,b.default)(h).create({}).load({method:"get",url:i,request:{responseType:"arraybuffer"}})):p.trigger(u.eventStream.schemeIdUri,{event:u}),delete e[s]):r<=n-t&&delete e[s])}}return e={addInlineEvents:function(e){if(m(),r={},e)for(var t=0;t<e.length;t++){var n=e[t];r[n.id]=n,g.debug("Add inline event with id "+n.id)}g.debug("Added "+e.length+" inline events")},addInbandEvents:function(e){m();for(var t=0;t<e.length;t++){var n=e[t];n.id in i?g.debug("Repeated event with id "+n.id):(n.eventStream.schemeIdUri===l&&void 0===i[n.id]&&y(n),i[n.id]=n,g.debug("Add inband event with id "+n.id))}},stop:v,start:function(){m(),g.debug("Start Event Controller"),s||isNaN(n)||(s=!0,t=setInterval(T,n))},setConfig:function(e){e&&(e.manifestUpdater&&(E=e.manifestUpdater),e.playbackController&&(o=e.playbackController))},reset:function(){v(),u()}},g=(0,A.default)(h).getInstance().getLogger(e),u(),e}a.__dashjs_factory_name="EventController",n.default=i.default.getClassFactory(a),t.exports=n.default},{159:159,45:45,46:46,47:47,54:54}],116:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var p=r(e(108)),g=r(e(227)),l=r(e(149)),f=r(e(97)),_=r(e(218)),E=r(e(46)),m=r(e(54)),v=r(e(51)),i=r(e(47)),y=r(e(45));function a(n){n=n||{};var r=this.context,d=(0,E.default)(r).getInstance(),i=n.errHandler,a=n.mediaPlayerModel,o=n.dashMetrics,s=(0,y.default)(r).getInstance(),e=void 0,c=void 0,h=void 0;function t(){for(var e in h)h[e].reset();h={}}function u(e){if(h[e.request.mediaType]===e.sender){var t=e.request,n=e.response,r=t.isInitializationRequest(),i=t.mediaInfo.streamInfo;if(e.error&&(e.request.mediaType!==p.default.AUDIO&&e.request.mediaType!==p.default.VIDEO&&e.request.mediaType!==p.default.FRAGMENTED_TEXT||d.trigger(m.default.SERVICE_LOCATION_BLACKLIST_ADD,{entry:e.request.serviceLocation})),n&&i){var a,o,s,u,l,f=(a=n,o=t,s=i.id,u=e.type!==m.default.FRAGMENT_LOADING_PROGRESS,(l=new g.default).streamId=s,l.mediaInfo=o.mediaInfo,l.segmentType=o.type,l.start=o.startTime,l.duration=o.duration,l.end=l.start+l.duration,l.bytes=a,l.index=o.index,l.quality=o.quality,l.representationId=o.representationId,l.endFragment=u,l);d.trigger(r?m.default.INIT_FRAGMENT_LOADED:m.default.MEDIA_FRAGMENT_LOADED,{chunk:f,fragmentModel:e.sender})}else c.warn("No "+t.mediaType+" bytes to push or stream is inactive.")}}return e={getModel:function(e){var t=h[e];return t||(t=(0,l.default)(r).create({dashMetrics:o,fragmentLoader:(0,f.default)(r).create({dashMetrics:o,mediaPlayerModel:a,errHandler:i,requestModifier:(0,_.default)(r).getInstance(),settings:n.settings,boxParser:n.boxParser,eventBus:d,events:m.default,errors:v.default,dashConstants:n.dashConstants,urlUtils:n.urlUtils}),debug:s,eventBus:d,events:m.default}),h[e]=t),t},reset:function(){d.off(m.default.FRAGMENT_LOADING_COMPLETED,u,this),d.off(m.default.FRAGMENT_LOADING_PROGRESS,u,this),t()}},c=s.getLogger(e),t(),d.on(m.default.FRAGMENT_LOADING_COMPLETED,u,e),d.on(m.default.FRAGMENT_LOADING_PROGRESS,u,e),e}a.__dashjs_factory_name="FragmentController",n.default=i.default.getClassFactory(a),t.exports=n.default},{108:108,149:149,218:218,227:227,45:45,46:46,47:47,51:51,54:54,97:97}],117:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var S=r(e(108)),A=r(e(54)),I=r(e(46)),i=r(e(47)),R=r(e(45)),b="neverReplace",D="alwaysReplace",M="highestBitrate",C="widestRange",w=M;function a(){var e=this.context,u=(0,I.default)(e).getInstance(),t=void 0,a=void 0,l=void 0,n=void 0,r=void 0,f=void 0,d=void 0,i=[D,b],o=[M,C];function s(e,t){if(!e||!t)return[];var n=t.id;return l[n]&&l[n][e]?l[n][e].list:[]}function c(e,t){return!e||!t||t&&!l[t.id]?null:l[t.id][e].current}function h(e){if(e&&e.streamInfo){var t=e.type,n=e.streamInfo,r=n.id,i=c(t,n);if(l[r]&&l[r][t]&&!m(e,i)){l[r][t].current=e,l[r][t].current&&u.trigger(A.default.CURRENT_TRACK_CHANGED,{oldMediaInfo:i,newMediaInfo:e,switchMode:f[t]});var a,o,s=(o={lang:(a=e).lang,viewpoint:a.viewpoint,roles:a.roles,accessibility:a.accessibility,audioChannelConfiguration:a.audioChannelConfiguration}).lang||o.viewpoint||o.role&&0<o.role.length||o.accessibility&&0<o.accessibility.length||o.audioChannelConfiguration&&0<o.audioChannelConfiguration.length?o:null;s&&l[r][t].storeLastSettings&&(s.roles&&(s.role=s.roles[0],delete s.roles),s.accessibility&&(s.accessibility=s.accessibility[0]),s.audioChannelConfiguration&&(s.audioChannelConfiguration=s.audioChannelConfiguration[0]),d.setSavedMediaSettings(t,s))}}}function p(e,t){e&&t&&(n[e]=t)}function g(e){return e?n[e]:null}function _(){return r||w}function E(e){return e===S.default.AUDIO||e===S.default.VIDEO||e===S.default.TEXT||e===S.default.FRAGMENTED_TEXT||e===S.default.IMAGE}function m(e,t){if(!e&&!t)return!0;if(!e||!t)return!1;var n=e.id===t.id,r=e.viewpoint===t.viewpoint,i=e.lang===t.lang,a=e.roles.toString()===t.roles.toString(),o=e.accessibility.toString()===t.accessibility.toString(),s=e.audioChannelConfiguration.toString()===t.audioChannelConfiguration.toString();return n&&r&&i&&a&&o&&s}function v(){l={},n={audio:null,video:null},f={audio:D,video:b}}function y(t,e){var n=!t.lang||e.lang.match(t.lang),r=!t.viewpoint||t.viewpoint===e.viewpoint,i=!t.role||!!e.roles.filter(function(e){return e===t.role})[0],a=!t.accessibility||!!e.accessibility.filter(function(e){return e===t.accessibility})[0],o=!t.audioChannelConfiguration||!!e.audioChannelConfiguration.filter(function(e){return e===t.audioChannelConfiguration})[0];return n&&r&&i&&a&&o}function T(e){function t(e){var t=0,n=[],r=void 0;return e.forEach(function(e){r=Math.max.apply(Math,e.bitrateList.map(function(e){return e.bandwidth})),t<r?(t=r,n=[e]):r===t&&n.push(e)}),n}function n(e){var t=0,n=[],r=void 0;return e.forEach(function(e){r=e.representationCount,t<r?(t=r,n=[e]):r===t&&n.push(e)}),n}var r=_(),i=[];switch(r){case M:1<(i=t(e)).length&&(i=n(i));break;case C:1<(i=n(e)).length&&(i=t(e));break;default:a.warn("Track selection mode is not supported: "+r)}return i[0]}return t={checkInitialMediaSettingsForType:function(e,t){var n=g(e),r=s(e,t),i=[];e!==S.default.FRAGMENTED_TEXT?(n||p(e,n=d.getSavedMediaSettings(e)),r&&0!==r.length&&(n&&r.forEach(function(e){y(n,e)&&i.push(e)}),0===i.length?h(T(r)):1<i.length?h(T(i)):h(i[0]))):h(r[0])},addTrack:function(e){if(e){var t=e.type;if(E(t)){var n=e.streamInfo.id;l[n]||(l[n]={audio:{list:[],storeLastSettings:!0,current:null},video:{list:[],storeLastSettings:!0,current:null},text:{list:[],storeLastSettings:!0,current:null},fragmentedText:{list:[],storeLastSettings:!0,current:null},image:{list:[],storeLastSettings:!0,current:null}});for(var r=l[n][t].list,i=0,a=r.length;i<a;++i)if(m(r[i],e))return;r.push(e);var o=g(t);o&&y(o,e)&&!c(t,e.streamInfo)&&h(e)}}},getTracksFor:s,getCurrentTrackFor:c,isCurrentTrack:function(e){if(!e)return!1;var t=e.type,n=e.streamInfo.id;return l[n]&&l[n][t]&&m(l[n][t].current,e)},setTrack:h,setInitialSettings:p,getInitialSettings:g,setSwitchMode:function(e,t){-1!==i.indexOf(t)?f[e]=t:a.warn("Track switch mode is not supported: "+t)},getSwitchMode:function(e){return f[e]},setSelectionModeForInitialTrack:function(e){-1!==o.indexOf(e)?r=e:a.warn("Track selection mode is not supported: "+e)},getSelectionModeForInitialTrack:_,isMultiTrackSupportedByType:E,isTracksEqual:m,setConfig:function(e){e&&e.domStorage&&(d=e.domStorage)},reset:v},a=(0,R.default)(e).getInstance().getLogger(t),v(),t}a.__dashjs_factory_name="MediaController";var o=i.default.getSingletonFactory(a);o.TRACK_SWITCH_MODE_NEVER_REPLACE=b,o.TRACK_SWITCH_MODE_ALWAYS_REPLACE=D,o.TRACK_SELECTION_MODE_HIGHEST_BITRATE=M,o.TRACK_SELECTION_MODE_WIDEST_RANGE=C,o.DEFAULT_INIT_TRACK_SELECTION_MODE=w,i.default.updateSingletonFactory(a.__dashjs_factory_name,o),n.default=o,t.exports=n.default},{108:108,45:45,46:46,47:47,54:54}],118:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var i=r(e(47)),a=r(e(45));function o(){var e=void 0,r=void 0,t=this.context;return e={createMediaSource:function(){var e="WebKitMediaSource"in window;return"MediaSource"in window?new MediaSource:e?new WebKitMediaSource:null},attachMediaSource:function(e,t){var n=window.URL.createObjectURL(e);return t.setSource(n),n},detachMediaSource:function(e){e.setSource(null)},setDuration:function(e,t){return e.duration!=t&&(e.duration=t),e.duration},setSeekable:function(e,t,n){e&&"function"==typeof e.setLiveSeekableRange&&"function"==typeof e.clearLiveSeekableRange&&"open"===e.readyState&&0<=t&&t<n&&(e.clearLiveSeekableRange(),e.setLiveSeekableRange(t,n))},signalEndOfStream:function(e){if(e&&"open"===e.readyState){for(var t=e.sourceBuffers,n=0;n<t.length;n++){if(t[n].updating)return;if(0===t[n].buffered.length)return}r.info("call to mediaSource endOfStream"),e.endOfStream()}}},r=(0,a.default)(t).getInstance().getLogger(e),e}o.__dashjs_factory_name="MediaSourceController",n.default=i.default.getSingletonFactory(o),t.exports=n.default},{45:45,47:47}],119:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var ge=r(e(108)),_e=r(e(109)),Ee=r(e(46)),me=r(e(54)),i=r(e(47)),ve=r(e(45));function a(){var e=this.context,i=(0,Ee.default)(e).getInstance(),t=void 0,s=void 0,u=void 0,l=void 0,f=void 0,d=void 0,n=void 0,o=void 0,r=void 0,c=void 0,h=void 0,p=void 0,g=void 0,_=void 0,E=void 0,a=void 0,m=void 0,v=void 0,y=void 0,T=void 0,S=void 0,A=void 0,I=void 0,R=void 0;function b(e){!_&&e.fromStreamInfo&&void 0!==c[e.fromStreamInfo.id]&&(delete p[e.fromStreamInfo.id],delete c[e.fromStreamInfo.id])}function D(){return parseFloat((M()-L()).toFixed(5))}function M(){var e=Y(!0),t=_&&g?e-g.start:0;return e+(g?g.duration-t:t)}function C(){g&&d&&d.getElement()?d.play():a=!0}function w(){return g&&d?d.isPaused():null}function N(){g&&d&&d.pause()}function O(){return g&&d?d.isSeeking():null}function P(e,t,n){g&&d&&(!0===n?e!==d.getTime()&&(d.removeEventListener("seeking",$),s.info("Requesting internal seek to time: "+e),d.setCurrentTime(e,t)):(i.trigger(me.default.PLAYBACK_SEEK_ASKED),g&&(delete p[g.id],delete c[g.id]),s.info("Requesting seek to time: "+e),d.setCurrentTime(e,t)))}function L(){return g&&d?d.getTime():null}function x(){var e=L();if(_&&!isNaN(v)){var t=v/1e3;t<e&&(e-=t)}return e}function F(){return g&&d?d.getPlaybackRate():null}function U(){return g&&d?d.getEnded():null}function k(){return _}function B(){if(!_||isNaN(v))return NaN;var e=x();if(isNaN(e)||0===e)return 0;var t=(new Date).getTime()+1e3*n.getClientTimeOffset();return Math.max(((t-v-1e3*e)/1e3).toFixed(3),0)}function G(){o=NaN,a=!1,c={},v=h=0,p={},d&&(i.off(me.default.DATA_UPDATE_COMPLETED,V,this),i.off(me.default.BUFFER_LEVEL_STATE_CHANGED,ce,this),i.off(me.default.BYTES_APPENDED_END_FRAGMENT,fe,this),i.off(me.default.LOADING_PROGRESS,de,this),i.off(me.default.PERIOD_SWITCH_STARTED,b,this),i.off(me.default.PLAYBACK_PROGRESS,ue,this),i.off(me.default.PLAYBACK_TIME_UPDATED,ue,this),i.off(me.default.PLAYBACK_ENDED,ae,this),i.off(me.default.STREAM_INITIALIZING,pe,this),H(),d.removeEventListener("canplay",z),d.removeEventListener("play",W),d.removeEventListener("waiting",X),d.removeEventListener("playing",Q),d.removeEventListener("pause",Z),d.removeEventListener("error",oe),d.removeEventListener("seeking",$),d.removeEventListener("seeked",J),d.removeEventListener("timeupdate",ee),d.removeEventListener("progress",te),d.removeEventListener("ratechange",ne),d.removeEventListener("loadedmetadata",re),d.removeEventListener("stalled",he),d.removeEventListener("ended",ie)),_=g=d=r=null}function j(){var e=I.getURIFragmentData(),t=void 0;if(e){t={};var n=parseInt(e.r,10);0<=n&&g&&n<g.manifestInfo.DVRWindowSize&&null===e.t&&(e.t=Math.max(Math.floor(Date.now()/1e3)-g.manifestInfo.DVRWindowSize,g.manifestInfo.availableFrom.getTime()/1e3+g.start)+n),t.fragS=parseFloat(e.s),t.fragT=parseFloat(e.t)}return t}function Y(e,t){var n=void 0,r=NaN;if(e)r=g?g.start:r;else{var i=j();r=i?isNaN(i.fragS)?i.fragT:i.fragS:0}if(_)!isNaN(r)&&g&&(n=r-g.manifestInfo.availableFrom.getTime()/1e3,(o<n||n<(isNaN(t)?NaN:t-g.manifestInfo.DVRWindowSize))&&(n=null)),n=n||o;else if(g)if(!isNaN(r)&&r<Math.max(g.manifestInfo.duration,g.duration)&&0<=r)n=r;else{var a=c[g.id];n=void 0!==a?Math.max(void 0!==a.audio?a.audio:0,void 0!==a.video?a.video:0,g.start):g.start}return n}function q(){if(null===r){r=setInterval(function(){i.trigger(me.default.WALLCLOCK_TIME_UPDATED,{isDynamic:_,time:new Date}),k()&&w()&&function(){var e=Date.now();(!m||m+500<e)&&(m=e,ee())}()},R.get().streaming.wallclockTimeUpdateInterval)}}function H(){clearInterval(r),r=null}function K(){if(!w()&&_&&0!==d.getReadyState()){var e,t,n,r=x(),i=(e=r,t=l.getCurrentDVRInfo(),(n=t?t.range:null)?e>n.end?Math.max(n.end-2*g.manifestInfo.minBufferTime,n.start):0<e&&e+.25<n.start&&Math.abs(e-n.start)<31536e4?n.start:e:NaN);!isNaN(i)&&i!==r&&P(i)}}function V(e){if(!e.error){var t=f.convertDataToRepresentationInfo(e.currentRepresentation),n=t?t.mediaInfo.streamInfo:null;null!==n&&g.id===n.id&&(g=n,K())}}function z(){i.trigger(me.default.CAN_PLAY)}function W(){s.info("Native video element event: play"),K(),q(),i.trigger(me.default.PLAYBACK_STARTED,{startTime:L()})}function X(){s.info("Native video element event: waiting"),i.trigger(me.default.PLAYBACK_WAITING,{playingTime:L()})}function Q(){s.info("Native video element event: playing"),i.trigger(me.default.PLAYBACK_PLAYING,{playingTime:L()})}function Z(){s.info("Native video element event: pause"),i.trigger(me.default.PLAYBACK_PAUSED,{ended:U()})}function $(){var e=L();s.info("Seeking to: "+e),q(),i.trigger(me.default.PLAYBACK_SEEKING,{seekTime:e})}function J(){s.info("Native video element event: seeked"),i.trigger(me.default.PLAYBACK_SEEKED),d.addEventListener("seeking",$)}function ee(){g&&i.trigger(me.default.PLAYBACK_TIME_UPDATED,{timeToEnd:D(),time:L()})}function te(){i.trigger(me.default.PLAYBACK_PROGRESS)}function ne(){var e=F();s.info("Native video element event: ratechange: ",e),i.trigger(me.default.PLAYBACK_RATE_CHANGED,{playbackRate:e})}function re(){s.info("Native video element event: loadedmetadata"),i.trigger(me.default.PLAYBACK_METADATA_LOADED),q()}function ie(){s.info("Native video element event: ended"),N(),H(),i.trigger(me.default.PLAYBACK_ENDED,{isLast:u.getActiveStreamInfo().isLast})}function ae(e){r&&e.isLast&&(s.info("onPlaybackEnded -- PLAYBACK_ENDED but native video element didn't fire ended"),d.setCurrentTime(M()),N(),H())}function oe(e){var t=e.target||e.srcElement;i.trigger(me.default.PLAYBACK_ERROR,{error:t.error})}function se(e,t){if(t&&0<t.length)for(var n=0,r=t.length;n<r;n++)if(e>=t.start(n)&&e<t.end(n))return 1}function ue(){_&&R.get().streaming.lowLatencyEnabled&&0<R.get().streaming.liveCatchUpPlaybackRate&&!w()&&!O()&&(0<R.get().streaming.liveCatchUpPlaybackRate&&0<L()&&Math.abs(B()-E.getLiveDelay())>R.get().streaming.liveCatchUpMinDrift?function(){if(d){var e=R.get().streaming.liveCatchUpPlaybackRate,t=E.getLiveDelay(),n=B()-t,r=5*n,i=2*e/(1+Math.pow(Math.E,-r)),a=1-e+i;if(S){var o=function(){var n=null;return u.getActiveStreamProcessors().forEach(function(e){var t=e.getBufferLevel();n=null===n?t:Math.min(n,t)}),n}();t/2<o?S=!1:0<n&&(a=1)}Math.abs(d.getPlaybackRate()-a)>A&&d.setPlaybackRate(a),0<R.get().streaming.liveCatchUpMaxDrift&&!T&&n>R.get().streaming.liveCatchUpMaxDrift?(s.info("Low Latency catchup mechanism. Latency too high, doing a seek to live point"),T=!0,function(){var e=l.getCurrentDVRInfo();P((e?e.range:null).end-E.getLiveDelay(),!0,!1)}()):T=!1}}:le)()}function le(){d&&d.setPlaybackRate(1)}function fe(e){var t,n=void 0,r=e.bufferedRanges;if(r&&r.length&&(!c[g.id]||!0!==c[g.id].started)){var i=e.sender.getType();void 0===p[g.id]&&(p[g.id]=[]),p[g.id][i]=r,void 0===c[g.id]&&(c[g.id]=[],c[g.id].started=!1),void 0===c[g.id][i]&&(c[g.id][i]=Math.max(r.start(0),g.start));var a=u.isTrackTypePresent(ge.default.VIDEO),o=u.isTrackTypePresent(ge.default.AUDIO);t=Y(!1),o&&a?isNaN(c[g.id].audio)||isNaN(c[g.id].video)||(r=c[g.id].audio<c[g.id].video?(n=c[g.id].video>t?c[g.id].video:t,p[g.id].audio):(n=c[g.id].audio>t?c[g.id].audio:t,p[g.id].video),se(n,r)&&(se(x(),p[g.id].audio)&&se(x(),p[g.id].video)||y||0===n||P(n,!0,!0),c[g.id].started=!0)):c[g.id][i]&&(n=c[g.id][i]>t?c[g.id][i]:t,y||P(n,!1,!0),c[g.id].started=!0)}}function de(e){if(!1===e.stream&&R.get().streaming.lowLatencyEnabled&&!isNaN(e.request.duration)){var t=1.2*e.request.duration;if(t>E.getLiveDelay()){s.warn("Browser does not support fetch API with StreamReader. Increasing live delay to be 20% higher than segment duration:",t.toFixed(2));var n={streaming:{liveDelay:t}};R.update(n)}}}function ce(e){e.streamInfo.id===g.id&&(R.get().streaming.lowLatencyEnabled?e.state!==_e.default.BUFFER_EMPTY||O()||S||(S=!0,le()):d.setStallState(e.mediaType,e.state===_e.default.BUFFER_EMPTY))}function he(e){i.trigger(me.default.PLAYBACK_STALLED,{e:e})}function pe(e){!function(e,t){if(e&&e.manifestInfo&&e.manifestInfo.serviceDescriptions){for(var n=void 0,r=0;r<e.manifestInfo.serviceDescriptions.length;r++){var i=e.manifestInfo.serviceDescriptions[r];if(i.schemeIdUri===ge.default.SERVICE_DESCRIPTION_LL_SCHEME){n=i;break}}n&&t&&t.supplementalProperties&&"true"===t.supplementalProperties[ge.default.SUPPLEMENTAL_PROPERTY_LL_SCHEME]&&(n.latency&&0<n.latency.target&&(s.debug("Apply LL properties coming from service description. Target Latency (ms):",n.latency.target),R.update({streaming:{lowLatencyEnabled:!0,liveDelay:n.latency.target/1e3,liveCatchUpMinDrift:n.latency.max>n.latency.target?(n.latency.max-n.latency.target)/1e3:void 0}})),n.playbackRate&&1<n.playbackRate.max&&(s.debug("Apply LL properties coming from service description. Max PlaybackRate:",n.playbackRate.max),R.update({streaming:{lowLatencyEnabled:!0,liveCatchUpPlaybackRate:n.playbackRate.max-1}})))}}(e.streamInfo,e.mediaInfo)}return t={initialize:function(e,t){g=e,d.addEventListener("canplay",z),d.addEventListener("play",W),d.addEventListener("waiting",X),d.addEventListener("playing",Q),d.addEventListener("pause",Z),d.addEventListener("error",oe),d.addEventListener("seeking",$),d.addEventListener("seeked",J),d.addEventListener("timeupdate",ee),d.addEventListener("progress",te),d.addEventListener("ratechange",ne),d.addEventListener("loadedmetadata",re),d.addEventListener("stalled",he),d.addEventListener("ended",ie),_=g.manifestInfo.isDynamic,S=T=!1,o=g.start,y=t;var n="undefined"!=typeof navigator?navigator.userAgent.toLowerCase():"",r=/safari/.test(n)&&!/chrome/.test(n);A=r?.25:.02,i.on(me.default.DATA_UPDATE_COMPLETED,V,this),i.on(me.default.BYTES_APPENDED_END_FRAGMENT,fe,this),i.on(me.default.LOADING_PROGRESS,de,this),i.on(me.default.BUFFER_LEVEL_STATE_CHANGED,ce,this),i.on(me.default.PERIOD_SWITCH_STARTED,b,this),i.on(me.default.PLAYBACK_PROGRESS,ue,this),i.on(me.default.PLAYBACK_TIME_UPDATED,ue,this),i.on(me.default.PLAYBACK_ENDED,ae,this),i.on(me.default.STREAM_INITIALIZING,pe,this),a&&(a=!1,C())},setConfig:function(e){e&&(e.streamController&&(u=e.streamController),e.dashMetrics&&(l=e.dashMetrics),e.mediaPlayerModel&&(E=e.mediaPlayerModel),e.adapter&&(f=e.adapter),e.videoModel&&(d=e.videoModel),e.timelineConverter&&(n=e.timelineConverter),e.uriFragmentModel&&(I=e.uriFragmentModel),e.settings&&(R=e.settings))},getStartTimeFromUriParameters:j,getStreamStartTime:Y,getTimeToStreamEnd:D,getTime:L,getNormalizedTime:x,getPlaybackRate:F,getPlayedRanges:function(){return g&&d?d.getPlayedRanges():null},getEnded:U,getIsDynamic:k,getStreamController:function(){return u},setLiveStartTime:function(e){o=e},getLiveStartTime:function(){return o},computeLiveDelay:function(e,t){var n,r=arguments.length<=2||void 0===arguments[2]?NaN:arguments[2],i=void 0,a=void 0,o=void 0,s=I.getURIFragmentData();s&&(o=parseInt(s.r,10));var u=f.getSuggestedPresentationDelay();if(i=R.get().streaming.lowLatencyEnabled?0:E.getLiveDelay()?E.getLiveDelay():null===R.get().streaming.liveDelayFragmentCount||isNaN(R.get().streaming.liveDelayFragmentCount)||isNaN(e)?o||(!0===R.get().streaming.useSuggestedPresentationDelay&&null!==u&&!isNaN(u)&&0<u?u:isNaN(e)?isNaN(r)?4*g.manifestInfo.minBufferTime:4*r:4*e):e*R.get().streaming.liveDelayFragmentCount,null!==(n=f.getAvailabilityStartTime())&&(v=n),0<t){var l=Math.max(t-10,t/2);a=Math.min(i,l)}else a=i;return h=a},getLiveDelay:function(){return h},getCurrentLiveLatency:B,play:C,isPaused:w,pause:N,isSeeking:O,seek:P,reset:G},s=(0,ve.default)(e).getInstance().getLogger(t),G(),t}a.__dashjs_factory_name="PlaybackController",n.default=i.default.getSingletonFactory(a),t.exports=n.default},{108:108,109:109,45:45,46:46,47:47,54:54}],120:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var pe=r(e(108)),ge=r(e(109)),_e=e(244),Ee=r(e(196)),me=r(e(197)),ve=r(e(149)),ye=r(e(46)),Te=r(e(54)),i=r(e(47)),Se=r(e(45)),Ae=r(e(117)),Ie=r(e(216));function a(e){e=e||{};var t=this.context,n=(0,ye.default)(t).getInstance(),l=e.adapter,f=e.dashMetrics,i=e.timelineConverter,a=e.mediaPlayerModel,d=e.abrController,c=e.playbackController,r=e.streamController,o=e.textController,h=e.type,p=e.streamProcessor,g=e.mediaController,_=e.settings,s=void 0,E=void 0,m=void 0,v=void 0,u=void 0,y=void 0,T=void 0,S=void 0,A=void 0,I=void 0,R=void 0,b=void 0,D=void 0,M=void 0,C=void 0,w=void 0,N=void 0,O=void 0,P=void 0,L=void 0,x=void 0,F=void 0;function U(){v&&!p.isBufferingCompleted()?(E.debug("Schedule Controller starts"),ce(),y=!1,u=u&&!1,G(0)):E.warn("Start denied to Schedule Controller")}function k(){y||(E.debug("Schedule Controller stops"),y=!0,clearTimeout(A))}function B(){var e=p.getBufferController();if(y||T||!e||c.isPaused()&&!_.get().streaming.scheduleWhilePaused||!(h!==pe.default.FRAGMENTED_TEXT&&h!==pe.default.TEXT||o.isTextEnabled()))E.debug("Schedule stop!");else if(e.getIsBufferingCompleted())E.debug("Schedule stop because buffering is completed!");else{!function(){var e=c.getTime(),t=1.5;if(isNaN(v.fragmentDuration)){var n=f.getCurrentSchedulingInfo(v.mediaInfo.type);t=n?1.5*n.duration:1.5}var r=m.getRequests({state:ve.default.FRAGMENT_MODEL_EXECUTED,time:e+t,threshold:0})[0];if(r&&-1===w.indexOf(r)&&!l.getIsTextTrack(h)){var i=_.get().streaming.fastSwitchEnabled,a=p.getBufferLevel(),o=d.getAbandonmentStateFor(h),s=!g.isCurrentTrack(r.mediaInfo)&&g.getSwitchMode(r.mediaInfo.type)===Ae.default.TRACK_SWITCH_MODE_NEVER_REPLACE,u=r.quality<v.quality;i&&(s||u)&&t<=a&&o!==ge.default.ABANDON_LOAD?(H(r),F=!0,E.debug("Reloading outdated fragment at index: ",r.index)):r.quality>v.quality&&!O&&le(c.getTime()+a)}}();var t=0<w.length,n=p.getStreamInfo();if(O||isNaN(C)||N||t||function(e,t){M[t]=M[t]||{};var n=d.getTopQualityIndexFor(e,t);return M[t][e]!=n&&(E.info("Top quality "+e+" index has changed from "+M[t][e]+" to "+n),M[t][e]=n,1)}(v.mediaInfo.type,n.id)||R.execute(p,r.isTrackTypePresent(pe.default.VIDEO))){Y(!0),!t&&x&&d.checkPlaybackQuality(h),function(){if(v.quality===C&&!N||O){var e=w.shift();if(e&&e.isInitializationRequest())p.switchInitData(e.representationId),x=!1;else{var t=void 0;p.getBufferController().getIsPruningInProgress()||(t=b.execute(p,I,e),le(NaN),t&&!e&&(isNaN(t.startTime+t.duration)||p.setIndexHandlerTime(t.startTime+t.duration),t.delayLoadingTime=(new Date).getTime()+S,fe(0)),!t&&n.manifestInfo&&n.manifestInfo.isDynamic&&E.debug("Next fragment seems to be at the bleeding live edge and is not available yet. Rescheduling.")),t?(E.debug("Next fragment request url is "+t.url),m.executeRequest(t)):(Y(!1),G(_.get().streaming.lowLatencyEnabled?100:500)),x=!0}}else E.debug("Quality has changed, get init request for representationid = "+v.id),N?(O=g.getSwitchMode(h)===Ae.default.TRACK_SWITCH_MODE_ALWAYS_REPLACE,E.debug("Switch track has been asked, get init request for "+h+" with representationid = "+v.id+"bufferResetInProgress = "+O),p.switchInitData(v.id,O),N=!1):p.switchInitData(v.id),C=v.quality,x=!1}()}else G(500)}}function G(e){clearTimeout(A),A=setTimeout(B,e)}function j(e){e.sender&&e.sender.getStreamProcessor()===p&&q(v.quality)}function Y(e){T!==e?T=e:E.debug("isFragmentProcessingInProgress is already equal to",e)}function q(e){var t=p.getInitRequest(e);t&&(Y(!0),m.executeRequest(t))}function H(e){w.push(e)}function K(e){if(h===e.mediaType&&p.getStreamInfo().id===e.streamInfo.id){if(null==(v=p.getRepresentationInfo(e.newQuality)))throw new Error("Unexpected error! - currentRepresentationInfo is null or undefined");de(new Date,_e.PlayListTrace.REPRESENTATION_SWITCH_STOP_REASON),ce()}}function V(e){if(c&&m){var t=m.getRequests({state:ve.default.FRAGMENT_MODEL_EXECUTED,time:c.getTime(),threshold:0})[0];t&&c.getTime()>=t.startTime&&((!D.mediaInfo||t.mediaInfo.type===D.mediaInfo.type&&t.mediaInfo.id!==D.mediaInfo.id)&&e&&n.trigger(Te.default.TRACK_CHANGE_RENDERED,{mediaType:h,oldMediaInfo:D.mediaInfo,newMediaInfo:t.mediaInfo}),t.quality===D.quality&&t.adaptationIndex===D.adaptationIndex||!e||n.trigger(Te.default.QUALITY_CHANGE_RENDERED,{mediaType:h,oldQuality:D.quality,newQuality:t.quality}),D={mediaInfo:t.mediaInfo,quality:t.quality,adaptationIndex:t.adaptationIndex})}}function z(e){e.error||e.sender.getType()!==p.getType()||(v=l.convertDataToRepresentationInfo(e.currentRepresentation))}function W(e){e.streamInfo&&p.getStreamInfo().id===e.streamInfo.id&&(v=p.getRepresentationInfo(),u&&(c.getIsDynamic()?(i.setTimeSyncCompleted(!0),function(){if(L){var e=L.getLiveEdge(p.getRepresentationInfo()),t=e-c.computeLiveDelay(v.fragmentDuration,v.mediaInfo.streamInfo.manifestInfo.DVRWindowSize),n=p.getFragmentRequest(v,t,{ignoreIsFinished:!0});if(n)if(_.get().streaming.lowLatencyEnabled){var r=n.duration<a.getLiveDelay()?n.startTime:n.startTime+n.duration-a.getLiveDelay();c.setLiveStartTime(r)}else c.setLiveStartTime(n.startTime);else E.debug("setLiveEdgeSeekTarget : getFragmentRequest returned undefined request object");le(c.getStreamStartTime(!1,e)),p.getBufferController().setSeekStartTime(I),I>v.mediaInfo.streamInfo.start+v.mediaInfo.streamInfo.duration&&c.seek(I),f.updateManifestUpdateInfo({currentTime:I,presentationStartTime:e,latency:e-I,clientTimeOffset:i.getClientTimeOffset()})}}()):(le(c.getStreamStartTime(!1)),p.getBufferController().setSeekStartTime(I))),y&&U())}function X(e){e.fragmentModel===m&&(k(),Y(!1),E.info("Stream is complete"))}function Q(e){e.sender===m&&(E.info("OnFragmentLoadingCompleted - Url:",e.request?e.request.url:"undefined",e.request.range?", Range:"+e.request.range:""),l.getIsTextTrack(h)&&Y(!1),e.error&&e.request.serviceLocation&&!y&&(H(e.request),Y(!1),G(0)),O&&(P=e.request))}function Z(){V(!0)}function $(e){if(e.sender.getStreamProcessor()===p)if(O&&!isNaN(e.startTime)&&(O=!1,m.addExecutedRequest(P)),Y(!1),F&&!isNaN(e.startTime)){var t=c.getTime(),n=e.startTime+v.fragmentDuration,r=1.5*v.fragmentDuration;G(n<=t+r?0:1e3*(n-(t+r))),F=!1}else G(0)}function J(e){e.streamProcessor===p&&(E.info("onFragmentLoadingAbandoned request: "+e.request.url+" has been aborted"),c.isSeeking()||N||(E.info("onFragmentLoadingAbandoned request: "+e.request.url+" has to be downloaded again, origin is not seeking process or switch track call"),H(e.request)),Y(!1),G(0))}function ee(e){var t=p.getStreamInfo(),n=t?t.id:null;e.sender.getType()===p.getType()&&e.sender.getStreamId()===n&&k()}function te(e){if(e.sender.getStreamProcessor()===p){var t=p.getStreamInfo();t&&(e.unintended?m.removeExecutedRequestsAfterTime(e.from):m.syncExecutedRequestsWithBufferedRange(p.getBufferController().getBuffer().getAllBufferRanges(),t.duration)),e.hasEnoughSpaceToAppend&&e.quotaExceeded&&y&&U()}}function ne(e){e.sender.getStreamProcessor()!==p||e.state!==ge.default.BUFFER_EMPTY||c.isSeeking()||(E.info("Buffer is empty! Stalling!"),de(new Date,_e.PlayListTrace.REBUFFERING_REASON))}function re(e){e.sender.getStreamProcessor()===p&&(k(),Y(!1))}function ie(){m.abortRequests(),k()}function ae(e){var t=p.getStreamInfo(),n=t?t.id:null;e.sender.getStreamId()===n&&o.isTextEnabled()&&q(e.index)}function oe(){!y&&_.get().streaming.scheduleWhilePaused||U()}function se(e){le(e.seekTime),fe(0),y&&U();var t=v.DVRWindow&&c?v.DVRWindow.end-c.getTime():NaN;f.updateManifestUpdateInfo({latency:t}),T?(E.debug("onPlaybackSeeking, call fragmentModel.abortRequests in order to seek quicker"),m.abortRequests()):G(0)}function ue(e){f.updatePlayListTraceMetrics({playbackspeed:e.playbackRate.toString()})}function le(e){I=e}function fe(e){S=e}function de(e,t){f.pushPlayListTraceMetrics(e,t)}function ce(){if(v){var e=c.getPlaybackRate();f.createPlaylistTraceMetrics(v.id,1e3*c.getTime(),null!==e?e.toString():null)}}function he(){D={mediaInfo:void(S=0),quality:C=I=NaN,adaptationIndex:NaN},M={},w=[],F=O=N=!(y=u=!(T=!(x=!(P=null))))}return s={initialize:function(){m=p.getFragmentModel(),R=(0,Ee.default)(t).create({abrController:d,dashMetrics:f,mediaPlayerModel:a,textController:o,settings:_}),b=(0,me.default)(t).create({textController:o,playbackController:c}),l.getIsTextTrack(e.mimeType)&&n.on(Te.default.TIMED_TEXT_REQUESTED,ae,this),n.on(Te.default.QUALITY_CHANGE_REQUESTED,K,this),n.on(Te.default.DATA_UPDATE_STARTED,ee,this),n.on(Te.default.DATA_UPDATE_COMPLETED,z,this),n.on(Te.default.FRAGMENT_LOADING_COMPLETED,Q,this),n.on(Te.default.STREAM_COMPLETED,X,this),n.on(Te.default.STREAM_INITIALIZED,W,this),n.on(Te.default.BUFFER_LEVEL_STATE_CHANGED,ne,this),n.on(Te.default.BUFFER_CLEARED,te,this),n.on(Te.default.BYTES_APPENDED_END_FRAGMENT,$,this),n.on(Te.default.INIT_REQUESTED,j,this),n.on(Te.default.QUOTA_EXCEEDED,re,this),n.on(Te.default.PLAYBACK_SEEKING,se,this),n.on(Te.default.PLAYBACK_STARTED,oe,this),n.on(Te.default.PLAYBACK_RATE_CHANGED,ue,this),n.on(Te.default.PLAYBACK_TIME_UPDATED,Z,this),n.on(Te.default.URL_RESOLUTION_FAILED,ie,this),n.on(Te.default.FRAGMENT_LOADING_ABANDONED,J,this)},getType:function(){return h},setSeekTarget:le,setTimeToLoadDelay:fe,replaceRequest:H,switchTrackAsked:function(){N=!0},isStarted:function(){return!1===y},start:U,stop:k,reset:function(){n.off(Te.default.DATA_UPDATE_STARTED,ee,this),n.off(Te.default.DATA_UPDATE_COMPLETED,z,this),n.off(Te.default.BUFFER_LEVEL_STATE_CHANGED,ne,this),n.off(Te.default.QUALITY_CHANGE_REQUESTED,K,this),n.off(Te.default.FRAGMENT_LOADING_COMPLETED,Q,this),n.off(Te.default.STREAM_COMPLETED,X,this),n.off(Te.default.STREAM_INITIALIZED,W,this),n.off(Te.default.QUOTA_EXCEEDED,re,this),n.off(Te.default.BYTES_APPENDED_END_FRAGMENT,$,this),n.off(Te.default.BUFFER_CLEARED,te,this),n.off(Te.default.INIT_REQUESTED,j,this),n.off(Te.default.PLAYBACK_RATE_CHANGED,ue,this),n.off(Te.default.PLAYBACK_SEEKING,se,this),n.off(Te.default.PLAYBACK_STARTED,oe,this),n.off(Te.default.PLAYBACK_TIME_UPDATED,Z,this),n.off(Te.default.URL_RESOLUTION_FAILED,ie,this),n.off(Te.default.FRAGMENT_LOADING_ABANDONED,J,this),l.getIsTextTrack(h)&&n.off(Te.default.TIMED_TEXT_REQUESTED,ae,this),k(),V(!1),he(),L&&(L.reset(),L=null)},getBufferTarget:function(){return R.getBufferTarget(p,r.isTrackTypePresent(pe.default.VIDEO))},finalisePlayList:function(e,t){de(e,t)}},E=(0,Se.default)(t).getInstance().getLogger(s),c&&c.getIsDynamic()&&(L=(0,Ie.default)(t).create({timelineConverter:i})),he(),s}a.__dashjs_factory_name="ScheduleController",n.default=i.default.getClassFactory(a),t.exports=n.default},{108:108,109:109,117:117,149:149,196:196,197:197,216:216,244:244,45:45,46:46,47:47,54:54}],121:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var De=r(e(108)),Me=r(e(109)),Ce=r(e(105)),we=r(e(99)),Ne=r(e(46)),Oe=r(e(54)),i=r(e(47)),Pe=e(244),Le=r(e(45)),xe=r(e(214)),Fe=r(e(221)),Ue=r(e(101)),ke=r(e(122)),Be=r(e(118)),Ge=r(e(226)),je=r(e(51));function a(){var t=40,r=2e3,u=this.context,f=(0,Ne.default)(u).getInstance(),l=void 0,d=void 0,c=void 0,h=void 0,n=void 0,p=void 0,g=void 0,_=void 0,o=void 0,E=void 0,m=void 0,v=void 0,y=void 0,T=void 0,i=void 0,S=void 0,A=void 0,I=void 0,R=void 0,b=void 0,D=void 0,a=void 0,s=void 0,M=void 0,C=void 0,w=void 0,N=void 0,O=void 0,P=void 0,L=void 0,x=void 0,F=void 0,U=void 0,k=void 0,B=void 0,G=void 0,j=void 0,Y=void 0,q=void 0,H=void 0,K=void 0,V=void 0,z=void 0,W=void 0;function X(){if(_e(De.default.VIDEO)){var e=O.getPlaybackQuality();e&&_.addDroppedFrames(e)}}function Q(){if(!(!W.get().streaming.jumpGaps||0===oe()||P.isSeeking()||x||M||C||w)&&t<=++Y){var e=P.getTime();V===e?function(e){for(var t=oe(),n=W.get().streaming.smallGapLimit,r=void 0,i=0;i<t.length;i++){var a=t[i].getBuffer().getAllBufferRanges(),o=void 0;if(a&&!(a.length<=1)){for(var s=0;s<a.length;s++)if(e<a.start(s)){o=a.start(s);break}if(0<o){var u=o-e;0<u&&u<=n&&(void 0===r||r<o)&&(r=o)}}}var l=P.getTimeToStreamEnd();void 0===r&&!isNaN(l)&&l<n&&(r=e+l);0<r&&(!isNaN(l)&&e+l<=r?(d.info("Jumping media gap (discontinuity) at time ",e,". Jumping to end of the stream"),f.trigger(Oe.default.PLAYBACK_ENDED,{isLast:Te().isLast})):(d.info("Jumping media gap (discontinuity) at time ",e,". Jumping to time position",r),P.seek(r,!0,!0)))}(e):V=e,Y=0}}function Z(e){var t=ae(e.seekTime);G&&(ee(),B=!1),j&&(d.debug("[PreloadTimer] stop period preload timer."),clearTimeout(j),j=void 0),t===b&&K&&K.deactivate(!0),t&&(t!==b||K&&!b.isActive())?(me(Pe.PlayListTrace.END_OF_PERIOD_STOP_REASON),le(b,t,e.seekTime)):me(Pe.PlayListTrace.USER_REQUEST_STOP_REASON),ve(Pe.PlayList.SEEK_START_REASON)}function $(){d.debug("[onPlaybackStarted]"),F?(F=!1,ve(Pe.PlayList.INITIAL_PLAYOUT_START_REASON)):x&&(x=!1,ve(Pe.PlayList.RESUME_FROM_PAUSE_START_REASON),te())}function J(e){d.debug("[onPlaybackPaused]"),e.ended||(x=!0,me(Pe.PlayListTrace.USER_REQUEST_STOP_REASON),te())}function ee(){d.debug("[toggleEndPeriodTimer] stop end period timer."),clearTimeout(G),G=void 0}function te(){if(B)if(G)ee();else{var e=P.getTimeToStreamEnd(),t=0<e?1e3*e:0,n=t<r?t/4:t-r;d.debug("[toggleEndPeriodTimer] Going to fire preload in",n,"milliseconds"),j=setTimeout(ie,n),d.debug("[toggleEndPeriodTimer] start-up of timer to notify PLAYBACK_ENDED event. It will be triggered in",t,"milliseconds"),G=setTimeout(function(){f.trigger(Oe.default.PLAYBACK_ENDED,{isLast:Te().isLast})},t)}}function ne(e){if(e.sender&&(e.sender.getType()===De.default.AUDIO||e.sender.getType()===De.default.VIDEO)){var t=Te().isLast;N&&!t&&void 0===G&&(d.info("[onTrackBufferingCompleted] end of period detected. Track",e.sender.getType(),"has finished"),!(B=!0)===x&&te())}}function re(){var e=Te().isLast;N&&e&&(d.info("[onStreamBufferingCompleted] calls signalEndOfStream of mediaSourceController."),o.signalEndOfStream(N))}function ie(){var t,e=Te().isLast;N&&!e&&(t=ue(),(H=b.isProtectionCompatible(t)&&(z||b.isMediaCodecCompatible(t)))&&(d.info("[onStreamCanLoadNext] Preloading next stream"),b.stopEventController(),b.deactivate(!0),t.preload(N,q),(K=t).getProcessors().forEach(function(e){e.setIndexHandlerTime(t.getStartTime())})))}function ae(e){var t=0,n=null,r=R.length;0<r&&(t+=R[0].getStartTime());for(var i=0;i<r;i++)if(n=R[i],e<(t=parseFloat((t+n.getDuration()).toFixed(5))))return n;return null}function oe(){return b?b.getProcessors():[]}function se(){var e=ue();e?(U=k=void 0,le(b,e,NaN)):d.debug("StreamController no next stream found"),me(e?Pe.PlayListTrace.END_OF_PERIOD_STOP_REASON:Pe.PlayListTrace.END_OF_CONTENT_STOP_REASON),G=void 0,B=!1}function ue(){if(b){var e=(t=Te().start,n=Te().duration,{v:R.filter(function(e){return e.getStreamInfo().start===parseFloat((t+n).toFixed(5))})[0]});if("object"==typeof e)return e.v}var t,n}function le(e,t,n){M||!t||e===t&&t.isActive()||(M=!0,f.trigger(Oe.default.PERIOD_SWITCH_STARTED,{fromStreamInfo:e?e.getStreamInfo():null,toStreamInfo:t.getStreamInfo()}),H=!1,e&&(e.stopEventController(),H=b.isProtectionCompatible(t)&&(z||b.isMediaCodecCompatible(t))&&!n||t.getPreloaded(),e.deactivate(H)),b=t,K=!1,P.initialize(Te(),H),O.getElement()?fe(n,e,!1,H):de(n,H))}function fe(e,t,n,r){var i=void 0;function a(){N&&"open"==N.readyState&&(d.debug("MediaSource is open!"),window.URL.revokeObjectURL(i),N.removeEventListener("sourceopen",a),N.removeEventListener("webkitsourceopen",a),ce(),t||f.trigger(Oe.default.SOURCE_INITIALIZED),n?b.setMediaSource(N):de(e,r))}N?r?(de(e,r),t||f.trigger(Oe.default.SOURCE_INITIALIZED)):(o.detachMediaSource(O),N.addEventListener("sourceopen",a,!1),N.addEventListener("webkitsourceopen",a,!1),i=o.attachMediaSource(N,O),d.debug("MediaSource attached to element. Waiting on open...")):((N=o.createMediaSource()).addEventListener("sourceopen",a,!1),N.addEventListener("webkitsourceopen",a,!1),i=o.attachMediaSource(N,O),d.debug("MediaSource attached to element. Waiting on open..."))}function de(e,t){if(q=b.activate(N,t?q:void 0),k=Ee(De.default.AUDIO),U=Ee(De.default.VIDEO),q){var n=Object.keys(q);0<n.length&&q[n[0]].changeType&&(d.debug("SourceBuffer changeType method supported. Use it to switch codecs in periods transitions"),z=!0)}var r;F||(isNaN(e)?(r=P.getStreamStartTime(!0),t||oe().forEach(function(e){e.setIndexHandlerTime(r)})):P.seek(e)),b.startEventController(),!s&&F||P.play(),M=!1,f.trigger(Oe.default.PERIOD_SWITCH_COMPLETED,{toStreamInfo:Te()})}function ce(e){var t=e||Te().manifestInfo.duration,n=o.setDuration(N,t);d.debug("Duration successfully set to: "+n)}function he(e){for(var t=0,n=R.length;t<n;t++)if(R[t].getId()===e.id)return R[t];return null}function pe(){var e=p.getValue();D&&(f.trigger(Oe.default.PROTECTION_CREATED,{controller:D,manifest:e}),D.setMediaElement(O.getElement()),a&&D.setProtectionData(a)),function(){try{var e=g.getStreamsInfo();if(0===e.length)throw new Error("There are no streams");_.updateManifestUpdateInfo({currentTime:P.getTime(),buffered:O.getBufferRange(),presentationStartTime:e[0].start,clientTimeOffset:I.getClientTimeOffset()});for(var t=0,n=e.length;t<n;t++){var r=e[t],i=he(r);i?i.updateData(r):(i=(0,Ce.default)(u).create({manifestModel:p,mediaPlayerModel:L,dashMetrics:_,manifestUpdater:h,adapter:g,timelineConverter:I,capabilities:c,errHandler:A,baseURLController:m,abrController:v,playbackController:P,mediaController:y,textController:T,videoModel:O,streamController:l,settings:W}),R.push(i),i.initialize(r,D)),_.addManifestUpdateStreamInfo(r)}if(!b){var a=P.getStartTimeFromUriParameters(),o=null;if(a)o=ae(isNaN(a.fragS)?a.fragT:a.fragS);if(!o&&g.getIsDynamic()&&R.length){d.debug("Dynamic multi-period stream: Trying to find the correct starting period");var s=g.getStreamsInfo(void 0,1)[0].manifestInfo;o=ae(I.calcPresentationTimeFromWallTime(new Date,g.getRegularPeriods()[0])-P.computeLiveDelay(NaN,s.DVRWindowSize,s.minBufferTime))}le(null,null!==o?o:R[0],NaN)}f.trigger(Oe.default.STREAMS_COMPOSED)}catch(e){A.error(new Ge.default(je.default.MANIFEST_ERROR_ID_NOSTREAMS_CODE,e.message+"nostreamscomposed",p.getValue())),w=!0,Re()}}()}function ge(s){s.error?(w=!0,Re()):function(){var e=s.manifest;g.updatePeriods(e);var t=g.getStreamsInfo(void 0,1)[0],n=g.getMediaInfoForType(t,De.default.VIDEO)||g.getMediaInfoForType(t,De.default.AUDIO),r=void 0;if(n&&(r=g.getUseCalculatedLiveEdgeTimeForMediaInfo(n))){d.debug("SegmentTimeline detected using calculated Live Edge Time");W.update({streaming:{useManifestDateHeaderTimeSource:!1}})}var i=g.getUTCTimingSources(),a=!g.getIsDynamic()||r?i:i.concat(L.getUTCTimingSources()),o=S.isHTTPS(s.manifest.url);a.forEach(function(e){e.value.replace(/.*?:\/\//g,"")===L.getDefaultUtcTimingSource().value.replace(/.*?:\/\//g,"")&&(e.value=e.value.replace(o?new RegExp(/^(http:)?\/\//i):new RegExp(/^(https:)?\/\//i),o?"https://":"http://"),d.debug("Matching default timing source protocol to manifest protocol: ",e.value))}),m.initialize(e),E.setConfig({dashMetrics:_,baseURLController:m}),E.initialize(a,W.get().streaming.useManifestDateHeaderTimeSource)}()}function _e(e){var t=void 0;if(!e)return t;switch(e){case De.default.VIDEO:t=U;break;case De.default.AUDIO:t=k}return t}function Ee(t){var n=!1;return oe().forEach(function(e){e.getMediaInfo().type===t&&(n=!0)}),n}function me(n,r){r=r||new Date,oe().forEach(function(e){var t=e.getScheduleController();t&&t.finalisePlayList(r,n)}),_.addPlayList()}function ve(e){_.createPlaylistMetrics(1e3*P.getTime(),e)}function ye(e){if(e.error){var t="";switch(e.error.code){case 1:t="MEDIA_ERR_ABORTED";break;case 2:t="MEDIA_ERR_NETWORK";break;case 3:t="MEDIA_ERR_DECODE";break;case 4:t="MEDIA_ERR_SRC_NOT_SUPPORTED";break;case 5:t="MEDIA_ERR_ENCRYPTED";break;default:t="UNKNOWN"}C=!0,e.error.message&&(t+=" ("+e.error.message+")"),e.error.msExtendedCode&&(t+=" (0x"+(e.error.msExtendedCode>>>0).toString(16).toUpperCase()+")"),d.fatal("Video Element Error: "+t),e.error&&d.fatal(e.error),A.error(new Ge.default(e.error.code,t)),Re()}}function Te(){return b?b.getStreamInfo():null}function Se(){if(!(n&&n.hasOwnProperty("load")&&I&&I.hasOwnProperty("initialize")&&I.hasOwnProperty("reset")&&I.hasOwnProperty("getClientTimeOffset")&&p&&A&&_&&P))throw new Error(De.default.MISSING_CONFIG_ERROR)}function Ae(e){isNaN(e.newDuration)||ce(e.newDuration)}function Ie(){b=D=null,G=k=U=void 0,B=!(s=!(x=!(F=!(w=C=M=!(R=[]))))),Y=0}function Re(){Se(),E.reset(),me(C||w?Pe.PlayListTrace.FAILURE_STOP_REASON:Pe.PlayListTrace.USER_REQUEST_STOP_REASON);for(var e=0,t=R?R.length:0;e<t;e++){R[e].reset(C)}!function(){f.off(Oe.default.PLAYBACK_TIME_UPDATED,X,this),f.off(Oe.default.PLAYBACK_SEEKING,Z,this),f.off(Oe.default.PLAYBACK_ERROR,ye,this),f.off(Oe.default.PLAYBACK_STARTED,$,this),f.off(Oe.default.PLAYBACK_PAUSED,J,this),f.off(Oe.default.PLAYBACK_ENDED,se,this),f.off(Oe.default.MANIFEST_UPDATED,ge,this),f.off(Oe.default.BUFFERING_COMPLETED,ne,this),f.off(Oe.default.STREAM_BUFFERING_COMPLETED,re,this),f.off(Oe.default.MANIFEST_VALIDITY_CHANGED,Ae,this),f.off(Oe.default.TIME_SYNCHRONIZATION_COMPLETED,pe,this),f.off(Oe.default.WALLCLOCK_TIME_UPDATED,Q,this),f.off(Ue.default.METRIC_ADDED,be,this)}(),m.reset(),h.reset(),_.clearAllCurrentMetrics(),p.setValue(null),n.reset(),I.reset(),i.reset(),N&&(o.detachMediaSource(O),N=null),O=null,D&&(D.setMediaElement(null),a=D=null,p.getValue()&&f.trigger(Oe.default.PROTECTION_DESTROYED,{data:p.getValue().url})),f.trigger(Oe.default.STREAM_TEARDOWN_COMPLETE),Ie()}function be(e){e.metric===Me.default.DVR_INFO&&e.mediaType===De.default.AUDIO&&o.setSeekable(N,e.value.range.start,e.value.range.end)}return l={initialize:function(e,t){Se(),s=e,a=t,I.initialize(),(h=(0,we.default)(u).create()).setConfig({manifestModel:p,adapter:g,manifestLoader:n,errHandler:A,settings:W}),h.initialize(),function(){f.on(Oe.default.PLAYBACK_TIME_UPDATED,X,this),f.on(Oe.default.PLAYBACK_SEEKING,Z,this),f.on(Oe.default.PLAYBACK_ERROR,ye,this),f.on(Oe.default.PLAYBACK_STARTED,$,this),f.on(Oe.default.PLAYBACK_PAUSED,J,this),f.on(Oe.default.PLAYBACK_ENDED,se,this),f.on(Oe.default.MANIFEST_UPDATED,ge,this),f.on(Oe.default.BUFFERING_COMPLETED,ne,this),f.on(Oe.default.STREAM_BUFFERING_COMPLETED,re,this),f.on(Oe.default.MANIFEST_VALIDITY_CHANGED,Ae,this),f.on(Oe.default.TIME_SYNCHRONIZATION_COMPLETED,pe,this),f.on(Oe.default.WALLCLOCK_TIME_UPDATED,Q,this),f.on(Ue.default.METRIC_ADDED,be,this)}()},getActiveStreamInfo:Te,isTrackTypePresent:_e,switchToVideoElement:function(e){b&&(P.initialize(Te()),fe(e,null,!0,!1))},getStreamById:function(t){return R.filter(function(e){return e.getId()===t})[0]},getStreamForTime:ae,getTimeRelativeToStreamId:function(e,t){for(var n=null,r=0,i=0,a=null,o=0;o<R.length;o++){if(i=(n=R[o]).getStartTime(),a=n.getDuration(),Number.isFinite(i)&&(r=i),n.getId()===t)return e-r;Number.isFinite(a)&&(r+=a)}return null},load:function(e){Se(),n.load(e)},loadWithManifest:function(e){!function(){if(!h||!h.hasOwnProperty("setManifest"))throw new Error("initialize function has to be called previously")}(),h.setManifest(e)},getActiveStreamProcessors:oe,setConfig:function(e){e&&(e.capabilities&&(c=e.capabilities),e.manifestLoader&&(n=e.manifestLoader),e.manifestModel&&(p=e.manifestModel),e.mediaPlayerModel&&(L=e.mediaPlayerModel),e.protectionController&&(D=e.protectionController),e.adapter&&(g=e.adapter),e.dashMetrics&&(_=e.dashMetrics),e.errHandler&&(A=e.errHandler),e.timelineConverter&&(I=e.timelineConverter),e.videoModel&&(O=e.videoModel),e.playbackController&&(P=e.playbackController),e.abrController&&(v=e.abrController),e.mediaController&&(y=e.mediaController),e.textController&&(T=e.textController),e.settings&&(W=e.settings),e.baseURLController&&(m=e.baseURLController))},setProtectionData:function(e){a=e},reset:Re},d=(0,Le.default)(u).getInstance().getLogger(l),E=(0,ke.default)(u).getInstance(),o=(0,Be.default)(u).getInstance(),i=(0,xe.default)(u).getInstance(),S=(0,Fe.default)(u).getInstance(),Ie(),l}a.__dashjs_factory_name="StreamController",n.default=i.default.getSingletonFactory(a),t.exports=n.default},{101:101,105:105,108:108,109:109,118:118,122:122,214:214,221:221,226:226,244:244,45:45,46:46,47:47,51:51,54:54,99:99}],122:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var S=r(e(226)),A=e(242),I=r(e(46)),R=r(e(54)),b=r(e(51)),i=r(e(47)),D=r(e(45)),M=r(e(221));function a(){var e=this.context,r=(0,I.default)(e).getInstance(),c=(0,M.default)(e).getInstance(),t=void 0,o=void 0,n=void 0,i=void 0,s=void 0,u=void 0,a=void 0,h=void 0;function l(e){i=e}function f(e){n=e}function d(e){var t,n,r,i=Date.parse(e);return isNaN(i)&&(n=t=void 0,r=/^([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(e),t=Date.UTC(parseInt(r[1],10),parseInt(r[2],10)-1,parseInt(r[3],10),parseInt(r[4],10),parseInt(r[5],10),r[6]&&(parseInt(r[6],10)||0),r[7]&&1e3*parseFloat(r[7])||0),r[9]&&r[10]&&(n=60*parseInt(r[9],10)+parseInt(r[10],10),t+=("+"===r[8]?-1:1)*n*60*1e3),i=new Date(t).getTime()),i}function p(e){return Date.parse(e)}function g(e){return Date.parse(e)}function _(e,t,n){n()}function E(e,t,n){var r=d(e);isNaN(r)?n():t(r)}function m(n,e,r,t,i){var a,o,s=!1,u=new XMLHttpRequest,l=i?A.HTTPRequest.HEAD:A.HTTPRequest.GET,f=e.match(/\S+/g);if(e=f.shift(),a=function(){s||(s=!0,f.length?m(n,f.join(" "),r,t,i):t())},o=function(){var e=void 0,t=void 0;200===u.status&&(e=i?u.getResponseHeader("Date"):u.response,t=n(e),isNaN(t)||(r(t),s=!0))},c.isRelative(e)){var d=h.resolve();d&&(e=c.resolve(e,d.url))}u.open(l,e),u.timeout=5e3,u.onload=o,u.onloadend=a,u.send()}function v(e,t,n){m(g,e,t,n,!0)}function y(){var e=a.getLatestMPDRequestHeaderValueByID("Date"),t=null!==e?new Date(e).getTime():Number.NaN;isNaN(t)?T(!0):(f(t-(new Date).getTime()),T(!1,t/1e3,n))}function T(e,t,n){l(!1),r.trigger(R.default.TIME_SYNCHRONIZATION_COMPLETED,{time:t,offset:n,error:e?new S.default(b.default.TIME_SYNC_FAILED_ERROR_CODE,b.default.TIME_SYNC_FAILED_ERROR_MESSAGE):null})}return t={initialize:function(e,t){s=t,n=0,i=!1,u={"urn:mpeg:dash:utc:http-head:2014":v,"urn:mpeg:dash:utc:http-xsdate:2014":m.bind(null,d),"urn:mpeg:dash:utc:http-iso:2014":m.bind(null,p),"urn:mpeg:dash:utc:direct:2014":E,"urn:mpeg:dash:utc:http-head:2012":v,"urn:mpeg:dash:utc:http-xsdate:2012":m.bind(null,d),"urn:mpeg:dash:utc:http-iso:2012":m.bind(null,p),"urn:mpeg:dash:utc:direct:2012":E,"urn:mpeg:dash:utc:http-ntp:2014":_,"urn:mpeg:dash:utc:ntp:2014":_,"urn:mpeg:dash:utc:sntp:2014":_},i||function e(t,n){var r=n||0;var i=t[r];var a=function(e,t){var n=!e||!t;n&&s?y():T(n,e,t)};l(!0);i?u.hasOwnProperty(i.schemeIdUri)?u[i.schemeIdUri](i.value,function(e){var t=(new Date).getTime(),n=e-t;f(n),o.info("Local time: "+new Date(t)),o.info("Server time: "+new Date(e)),o.info("Server Time - Local Time (ms): "+n),a(e,n)},function(){e(t,r+1)}):e(t,r+1):(f(0),a())}(e)},getOffsetToDeviceTimeMs:function(){return n},setConfig:function(e){e&&(e.dashMetrics&&(a=e.dashMetrics),e.baseURLController&&(h=e.baseURLController))},reset:function(){l(!1)}},o=(0,D.default)(e).getInstance().getLogger(t),t}a.__dashjs_factory_name="TimeSyncController";var o=i.default.getSingletonFactory(a);o.HTTP_TIMEOUT_MS=5e3,i.default.updateSingletonFactory(a.__dashjs_factory_name,o),n.default=o,t.exports=n.default},{221:221,226:226,242:242,45:45,46:46,47:47,51:51,54:54}],123:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var p=r(e(107)),g=r(e(46)),_=r(e(54)),i=r(e(47)),E=r(e(3)),m=r(e(221)),v=r(e(61)),y="onLoad";function a(e){e=e||{};var t=this.context,i=(0,g.default)(t).getInstance(),s=(0,m.default)(t).getInstance(),n=void 0,r=void 0,u=void 0,l=void 0,a=void 0,f=void 0;function o(e,t,n){var r={},i=void 0,a=void 0;r.elements=e,r.type=t,r.resolveType=n,0===r.elements.length&&c(r);for(var o=0;o<r.elements.length;o++)i=r.elements[o],a=s.isHTTPURL(i.url)?i.url:i.originalContent.BaseURL+i.url,f.load(a,i,r)}function d(e){var t,n=void 0,r="";if(n=e.element,t=e.resolveObject,n.resolvedContent){var i=0;0===n.resolvedContent.indexOf("<?xml")&&(i=n.resolvedContent.indexOf("?>")+2),r=n.resolvedContent.substr(0,i)+"<response>"+n.resolvedContent.substr(i)+"</response>",n.resolvedContent=a.xml_str2json(r)}!function(e){var t=void 0;for(t=0;t<e.elements.length;t++)if(!1===e.elements[t].resolved)return;return 1}(t)||c(t)}function c(e){var t=[],n=void 0,r=void 0;if(!function(e){var t=[],n=void 0,r=void 0,i=void 0,a=void 0,o=void 0,s=void 0;for(a=e.elements.length-1;0<=a;a--){if(n=e.elements[a],r=n.type+"_asArray",n.resolvedContent){if(n.resolvedContent)for(o=0;o<n.resolvedContent[r].length;o++)i=n.resolvedContent[r][o],t.push(i)}else delete n.originalContent["xlink:actuate"],delete n.originalContent["xlink:href"],t.push(n.originalContent);for(n.parentElement[r].splice(n.index,1),s=0;s<t.length;s++)n.parentElement[r].splice(n.index+s,0,t[s]);t=[]}0<e.elements.length&&u.run(l)}(e),"onActuate"===e.resolveType&&i.trigger(_.default.XLINK_READY,{manifest:l}),e.resolveType===y)switch(e.type){case v.default.PERIOD:for(n=0;n<l[v.default.PERIOD+"_asArray"].length;n++)(r=l[v.default.PERIOD+"_asArray"][n]).hasOwnProperty(v.default.ADAPTATION_SET+"_asArray")&&(t=t.concat(h(r[v.default.ADAPTATION_SET+"_asArray"],r,v.default.ADAPTATION_SET,y))),r.hasOwnProperty(v.default.EVENT_STREAM+"_asArray")&&(t=t.concat(h(r[v.default.EVENT_STREAM+"_asArray"],r,v.default.EVENT_STREAM,y)));o(t,v.default.ADAPTATION_SET,y);break;case v.default.ADAPTATION_SET:i.trigger(_.default.XLINK_READY,{manifest:l})}}function h(e,t,n,r){var i=[],a=void 0,o=void 0,s=void 0;for(o=e.length-1;0<=o;o--)(a=e[o]).hasOwnProperty("xlink:href")&&"urn:mpeg:dash:resolve-to-zero:2013"===a["xlink:href"]&&e.splice(o,1);for(o=0;o<e.length;o++)(a=e[o]).hasOwnProperty("xlink:href")&&a.hasOwnProperty("xlink:actuate")&&a["xlink:actuate"]===r&&(s={url:a["xlink:href"],parentElement:t,type:n,index:o,resolveType:r,originalContent:a,resolvedContent:null,resolved:!1},i.push(s));return i}return n={resolveManifestOnLoad:function(e){a=new E.default({escapeMode:!1,attributePrefix:"",arrayAccessForm:"property",emptyNodeForm:"object",stripWhitespaces:!1,enableToStringFunc:!1,ignoreRoot:!0,matchers:r}),o(h((l=e).Period_asArray,l,v.default.PERIOD,y),v.default.PERIOD,y)},setMatchers:function(e){e&&(r=e)},setIron:function(e){e&&(u=e)},reset:function(){i.off(_.default.XLINK_ELEMENT_LOADED,d,n),f&&(f.reset(),f=null)}},i.on(_.default.XLINK_ELEMENT_LOADED,d,n),f=(0,p.default)(t).create({errHandler:e.errHandler,dashMetrics:e.dashMetrics,mediaPlayerModel:e.mediaPlayerModel,requestModifier:e.requestModifier,settings:e.settings}),n}a.__dashjs_factory_name="XlinkController",n.default=i.default.getClassFactory(a),t.exports=n.default},{107:107,221:221,3:3,46:46,47:47,54:54,61:61}],124:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var i=r(e(138)),a=r(e(125)),o=r(e(126)),s=r(e(131)),u=r(e(136));function l(){var t=this.context;return{createMetricsReporting:function(e){return(0,i.default)(t).getInstance({eventBus:e.eventBus,dashMetrics:e.dashMetrics,metricsConstants:e.metricsConstants,events:e.events}),(0,o.default)(t).create(e)},getReportingFactory:function(){return(0,u.default)(t).getInstance()},getMetricsHandlerFactory:function(){return(0,s.default)(t).getInstance()}}}l.__dashjs_factory_name="MetricsReporting";var f=dashjs.FactoryMaker.getClassFactory(l);f.events=a.default,dashjs.FactoryMaker.updateClassFactory(l.__dashjs_factory_name,f),n.default=f,t.exports=n.default},{125:125,126:126,131:131,136:136,138:138}],125:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r,i=e(55);function a(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),function(e,t,n){for(var r=!0;r;){var i=e,a=t,o=n;r=!1,null===i&&(i=Function.prototype);var s=Object.getOwnPropertyDescriptor(i,a);if(void 0!==s){if("value"in s)return s.value;var u=s.get;if(void 0===u)return;return u.call(o)}var l=Object.getPrototypeOf(i);if(null===l)return;e=l,t=a,n=o,r=!0,s=l=void 0}}(Object.getPrototypeOf(a.prototype),"constructor",this).call(this),this.METRICS_INITIALISATION_COMPLETE="internal_metricsReportingInitialized",this.BECAME_REPORTING_PLAYER="internal_becameReportingPlayer"}var o=new(function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(a,((r=i)&&r.__esModule?r:{default:r}).default),a);n.default=o,t.exports=n.default},{55:55}],126:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var s=r(e(127)),u=r(e(140)),l=r(e(125));function i(i){i=i||{};var a={},o=this.context,t=i.eventBus,e=i.events;function n(e){if(!e.error){var r=Object.keys(a);(0,u.default)(o).getInstance({adapter:i.adapter,constants:i.constants}).getMetrics(e.manifest).forEach(function(e){var t=JSON.stringify(e);if(a.hasOwnProperty(t))r.splice(t,1);else try{var n=(0,s.default)(o).create(i);n.initialize(e),a[t]=n}catch(e){}}),r.forEach(function(e){a[e].reset(),delete a[e]}),t.trigger(l.default.METRICS_INITIALISATION_COMPLETE)}}function r(){Object.keys(a).forEach(function(e){a[e].reset()}),a={}}return t.on(e.MANIFEST_UPDATED,n),t.on(e.STREAM_TEARDOWN_COMPLETE,r),{reset:function(){t.off(e.MANIFEST_UPDATED,n),t.off(e.STREAM_TEARDOWN_COMPLETE,r)}}}i.__dashjs_factory_name="MetricsCollectionController",n.default=dashjs.FactoryMaker.getClassFactory(i),t.exports=n.default},{125:125,127:127,140:140}],127:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var s=r(e(129)),u=r(e(130)),l=r(e(128));function i(t){t=t||{};var n=void 0,r=void 0,i=void 0,a=this.context;function o(){n&&n.reset(),r&&r.reset(),i&&i.reset()}return{initialize:function(e){try{(i=(0,s.default)(a).create({mediaElement:t.mediaElement})).initialize(e.Range),(r=(0,u.default)(a).create({debug:t.debug,metricsConstants:t.metricsConstants})).initialize(e.Reporting,i),(n=(0,l.default)(a).create({debug:t.debug,eventBus:t.eventBus,metricsConstants:t.metricsConstants,events:t.events})).initialize(e.metrics,r)}catch(e){throw o(),e}},reset:o}}i.__dashjs_factory_name="MetricsController",n.default=dashjs.FactoryMaker.getClassFactory(i),t.exports=n.default},{128:128,129:129,130:130}],128:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r,i=e(131),a=(r=i)&&r.__esModule?r:{default:r};function o(e){e=e||{};var o=[],t=void 0,n=this.context,r=e.eventBus,i=e.events,s=(0,a.default)(n).getInstance({debug:e.debug,eventBus:e.eventBus,metricsConstants:e.metricsConstants});function u(t){o.forEach(function(e){e.handleNewMetric(t.metric,t.value,t.mediaType)})}return t={initialize:function(e,a){e.split(",").forEach(function(e,t,n){var r;if(-1!==e.indexOf("(")&&-1===e.indexOf(")")){var i=n[t+1];i&&-1===i.indexOf("(")&&-1!==i.indexOf(")")&&(e+=","+i,delete n[t+1])}(r=s.create(e,a))&&o.push(r)}),r.on(i.METRIC_ADDED,u,t),r.on(i.METRIC_UPDATED,u,t)},reset:function(){r.off(i.METRIC_ADDED,u,t),r.off(i.METRIC_UPDATED,u,t),o.forEach(function(e){return e.reset()}),o=[]}}}o.__dashjs_factory_name="MetricsHandlersController",n.default=dashjs.FactoryMaker.getClassFactory(o),t.exports=n.default},{131:131}],129:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r,i=e(209),u=(r=i)&&r.__esModule?r:{default:r};function a(e){e=e||{};var t,a=!1,n=this.context,o=void 0,s=e.mediaElement;return t={initialize:function(e){e&&e.length&&(e.forEach(function(e){var t=e.starttime,n=t+e.duration;o.add(t,n)}),a=!!e[0]._useWallClockTime)},reset:function(){o.clear()},isEnabled:function(){var e,t=o.length;if(!t)return!0;e=a?(new Date).getTime()/1e3:s.currentTime;for(var n=0;n<t;n+=1){var r=o.start(n),i=o.end(n);if(r<=e&&e<i)return!0}return!1}},o=(0,u.default)(n).create(),t}a.__dashjs_factory_name="RangeController",n.default=dashjs.FactoryMaker.getClassFactory(a),t.exports=n.default},{209:209}],130:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r,i=e(136),a=(r=i)&&r.__esModule?r:{default:r};function o(e){var r=[],i=(0,a.default)(this.context).getInstance(e);return{initialize:function(e,n){e.some(function(e){var t=i.create(e,n);if(t)return r.push(t),!0})},reset:function(){r.forEach(function(e){return e.reset()}),r=[]},report:function(t,n){r.forEach(function(e){return e.report(t,n)})}}}o.__dashjs_factory_name="ReportingController",n.default=dashjs.FactoryMaker.getClassFactory(o),t.exports=n.default},{136:136}],131:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var l=r(e(132)),f=r(e(133)),d=r(e(135)),c=r(e(134));function i(i){var e=void 0,a=(i=i||{}).debug?i.debug.getLogger(e):{},o=/([a-zA-Z]*)(\(([0-9]*)(\,\s*([a-zA-Z]*))?\))?/,s=this.context,u={BufferLevel:l.default,DVBErrors:f.default,HttpList:d.default,PlayList:c.default,RepSwitchList:c.default,TcpList:c.default};return e={create:function(e,t){var n,r=e.match(o);if(r){try{(n=u[r[1]](s).create({eventBus:i.eventBus,metricsConstants:i.metricsConstants})).initialize(r[1],t,r[3],r[5])}catch(e){n=null,a.error("MetricsHandlerFactory: Could not create handler for type "+r[1]+" with args "+r[3]+", "+r[5]+" ("+e.message+")")}return n}},register:function(e,t){u[e]=t},unregister:function(e){delete u[e]}}}i.__dashjs_factory_name="MetricsHandlerFactory",n.default=dashjs.FactoryMaker.getSingletonFactory(i),t.exports=n.default},{132:132,133:133,134:134,135:135}],132:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r,i=e(139),d=(r=i)&&r.__esModule?r:{default:r};function a(e){e=e||{};var r=void 0,i=void 0,a=void 0,o=void 0,t=void 0,n=this.context,s=(0,d.default)(n).getInstance(),u=[],l=e.metricsConstants;function f(){var e=function(){try{return Object.keys(u).map(function(e){return u[e]}).reduce(function(e,t){return e.level<t.level?e:t})}catch(e){return}}();e&&t!==e.t&&(t=e.t,r.report(a,e))}return{initialize:function(e,t,n){t&&(i=s.validateN(n),r=t,a=s.reconstructFullMetricName(e,n),o=setInterval(f,i))},reset:function(){clearInterval(o),i=0,t=r=o=null},handleNewMetric:function(e,t,n){e===l.BUFFER_LEVEL&&(u[n]=t)}}}a.__dashjs_factory_name="BufferLevelHandler",n.default=dashjs.FactoryMaker.getClassFactory(a),t.exports=n.default},{139:139}],133:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r,i=e(125),o=(r=i)&&r.__esModule?r:{default:r};n.default=dashjs.FactoryMaker.getClassFactory(function(e){var n=void 0,r=(e=e||{}).eventBus,i=e.metricsConstants;function a(){r.off(o.default.METRICS_INITIALISATION_COMPLETE,a,this),r.trigger(o.default.BECAME_REPORTING_PLAYER)}return{initialize:function(e,t){t&&(n=t,r.on(o.default.METRICS_INITIALISATION_COMPLETE,a,this))},reset:function(){n=null},handleNewMetric:function(e,t){e===i.DVB_ERRORS&&n&&n.report(e,t)}}}),t.exports=n.default},{125:125}],134:[function(e,t,n){"use strict";function r(){var n=void 0,r=void 0;return{initialize:function(e,t){n=e,r=t},reset:function(){r=null,n=void 0},handleNewMetric:function(e,t){e===n&&r&&r.report(n,t)}}}Object.defineProperty(n,"__esModule",{value:!0}),r.__dashjs_factory_name="GenericMetricHandler",n.default=dashjs.FactoryMaker.getClassFactory(r),t.exports=n.default},{}],135:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r,i=e(139),d=(r=i)&&r.__esModule?r:{default:r};function a(e){e=e||{};var i=void 0,a=void 0,o=void 0,s=void 0,u=void 0,n=[],l=(0,d.default)(this.context).getInstance(),r=e.metricsConstants;function f(){n.length&&i&&i.report(s,n),n=[]}return{initialize:function(e,t,n,r){t&&(a=l.validateN(n),i=t,r&&r.length&&(o=r),s=l.reconstructFullMetricName(e,n,r),u=setInterval(f,a))},reset:function(){clearInterval(u),n=[],i=o=a=u=null},handleNewMetric:function(e,t){e===r.HTTP_REQUEST&&(o&&o!==t.type||n.push(t))}}}a.__dashjs_factory_name="HttpListHandler",n.default=dashjs.FactoryMaker.getClassFactory(a),t.exports=n.default},{139:139}],136:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r,i=e(137),s=(r=i)&&r.__esModule?r:{default:r};function a(e){e=e||{};var r={"urn:dvb:dash:reporting:2014":s.default},i=this.context,t=void 0,a=e.debug?e.debug.getLogger(t):{},o=e.metricsConstants;return t={create:function(t,e){var n=void 0;try{(n=r[t.schemeIdUri](i).create({metricsConstants:o})).initialize(t,e)}catch(e){n=null,a.error("ReportingFactory: could not create Reporting with schemeIdUri "+t.schemeIdUri+" ("+e.message+")")}return n},register:function(e,t){r[e]=t},unregister:function(e){delete r[e]}}}a.__dashjs_factory_name="ReportingFactory",n.default=dashjs.FactoryMaker.getSingletonFactory(a),t.exports=n.default},{137:137}],137:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var h=r(e(141)),p=r(e(142));function i(e){e=e||{};var t,n=this.context,r=void 0,i=void 0,a=void 0,o=void 0,s=void 0,u=void 0,l=[],f=e.metricsConstants;function d(e,t,n){function r(){var e=l.indexOf(i);-1!==e&&(l.splice(e,1),200<=i.status&&i.status<300?t&&t():n&&n())}var i=new XMLHttpRequest;l.push(i);try{i.open("GET",e),i.onloadend=r,i.onerror=r,i.send()}catch(e){i.onerror()}}function c(){o=a=!1,u=s=null}return t={report:function(n,e){Array.isArray(e)||(e=[e]),o&&u.isEnabled()&&e.forEach(function(e){var t=r.serialise(e);n!==f.DVB_ERRORS&&(t="metricname="+n+"&"+t),d(t=s+"?"+t,null,function(){o=!1})})},initialize:function(e,t){var n=void 0;if(u=t,!(s=e["dvb:reportingUrl"]))throw new Error("required parameter missing (dvb:reportingUrl)");a||((n=e["dvb:probability"]||e["dvb:priority"]||0)&&(1e3===n||n/1e3>=i.random())&&(o=!0),a=!0)},reset:function(){c()}},r=(0,h.default)(n).getInstance(),i=(0,p.default)(n).getInstance(),c(),t}i.__dashjs_factory_name="DVBReporting",n.default=dashjs.FactoryMaker.getClassFactory(i),t.exports=n.default},{141:141,142:142}],138:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var p=r(e(143)),g=r(e(125));function i(e){var t=void 0,r=void 0,n=(e=e||{}).eventBus,i=e.dashMetrics,a=e.metricsConstants,o=e.events;function s(e){var t=new p.default;if(r){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);t.mpdurl||(t.mpdurl=r.originalUrl||r.url),t.terror||(t.terror=new Date),i.addDVBErrors(t)}}function u(e){e.error||(r=e.manifest)}function l(e){s({errorcode:p.default.BASE_URL_CHANGED,servicelocation:e.entry})}function f(){s({errorcode:p.default.BECAME_REPORTER})}function d(e){switch(e.metric){case a.HTTP_REQUEST:(0===(t=e.value).responsecode||400<=t.responsecode||t.responsecode<100||600<=t.responsecode)&&s({errorcode:t.responsecode||p.default.CONNECTION_ERROR,url:t.url,terror:t.tresponse,servicelocation:t._serviceLocation})}var t}function c(e){var t=void 0;switch(e.error?e.error.code:0){case MediaError.MEDIA_ERR_NETWORK:t=p.default.CONNECTION_ERROR;break;case MediaError.MEDIA_ERR_DECODE:t=p.default.CORRUPT_MEDIA_OTHER;break;default:return}s({errorcode:t})}function h(){n.on(o.MANIFEST_UPDATED,u,t),n.on(o.SERVICE_LOCATION_BLACKLIST_CHANGED,l,t),n.on(o.METRIC_ADDED,d,t),n.on(o.METRIC_UPDATED,d,t),n.on(o.PLAYBACK_ERROR,c,t),n.on(g.default.BECAME_REPORTING_PLAYER,f,t)}return t={initialise:h,reset:function(){n.off(o.MANIFEST_UPDATED,u,t),n.off(o.SERVICE_LOCATION_BLACKLIST_CHANGED,l,t),n.off(o.METRIC_ADDED,d,t),n.off(o.METRIC_UPDATED,d,t),n.off(o.PLAYBACK_ERROR,c,t),n.off(g.default.BECAME_REPORTING_PLAYER,f,t)}},h(),t}i.__dashjs_factory_name="DVBErrorsTranslator",n.default=dashjs.FactoryMaker.getSingletonFactory(i),t.exports=n.default},{125:125,143:143}],139:[function(e,t,n){"use strict";function r(){return{reconstructFullMetricName:function(e,t,n){var r=e;return t&&(r+="("+t,n&&n.length&&(r+=","+n),r+=")"),r},validateN:function(e){if(!e)throw new Error("missing n");if(isNaN(e))throw new Error("n is NaN");if(e<0)throw new Error("n must be positive");return e}}}Object.defineProperty(n,"__esModule",{value:!0}),r.__dashjs_factory_name="HandlerHelpers",n.default=dashjs.FactoryMaker.getSingletonFactory(r),t.exports=n.default},{}],140:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var i=r(e(144)),c=r(e(145)),a=r(e(146));function o(e){var f=(e=e||{}).adapter,d=e.constants;return{getMetrics:function(l){var t=[];return l&&l.Metrics_asArray&&l.Metrics_asArray.forEach(function(e){var s=new i.default,u=f.getIsDynamic(l);e.hasOwnProperty("metrics")&&(s.metrics=e.metrics,e.Range_asArray&&e.Range_asArray.forEach(function(e){var t,n,r,i,a,o=new c.default;o.starttime=(t=l,n=e,i=r=void 0,a=0,u?a=f.getAvailabilityStartTime(t)/1e3:(r=f.getRegularPeriods(t)).length&&(a=r[0].start),i=a,n&&n.hasOwnProperty(d.START_TIME)&&(i+=n.starttime),i),e.hasOwnProperty("duration")?o.duration=e.duration:o.duration=f.getDuration(l),o._useWallClockTime=u,s.Range.push(o)}),e.Reporting_asArray&&(e.Reporting_asArray.forEach(function(e){var t=new a.default;if(e.hasOwnProperty(d.SCHEME_ID_URI)){for(var n in t.schemeIdUri=e.schemeIdUri,e)e.hasOwnProperty(n)&&(t[n]=e[n]);s.Reporting.push(t)}}),t.push(s)))}),t}}}o.__dashjs_factory_name="ManifestParsing",n.default=dashjs.FactoryMaker.getSingletonFactory(o),t.exports=n.default},{144:144,145:145,146:146}],141:[function(e,t,n){"use strict";function r(){return{serialise:function n(e){var t=[],r=[],i=void 0,a=void 0;for(i in e)if(e.hasOwnProperty(i)&&0!==i.indexOf("_")){if(null==(a=e[i])&&(a=""),Array.isArray(a)){if(!a.length)continue;r=[],a.forEach(function(e){var t="Object"!==Object.prototype.toString.call(e).slice(8,-1);r.push(t?e:n(e))}),a=r.map(encodeURIComponent).join(",")}else"string"==typeof a?a=encodeURIComponent(a):a instanceof Date?a=a.toISOString():"number"==typeof a&&(a=Math.round(a));t.push(i+"="+a)}return t.join("&")}}}Object.defineProperty(n,"__esModule",{value:!0}),r.__dashjs_factory_name="MetricSerialiser",n.default=dashjs.FactoryMaker.getSingletonFactory(r),t.exports=n.default},{}],142:[function(e,t,n){"use strict";function r(){var e,r=window.crypto||window.msCrypto,t=Uint32Array,i=Math.pow(2,8*t.BYTES_PER_ELEMENT)-1,n=10,a=void 0,o=void 0;function s(){r&&(a=a||new t(n),r.getRandomValues(a),o=0)}return e={random:function(e,t){var n=void 0;return e=e||0,t=t||1,r?(o===a.length&&s(),n=a[o]/i,o+=1):n=Math.random(),n*(t-e)+e}},s(),e}Object.defineProperty(n,"__esModule",{value:!0}),r.__dashjs_factory_name="RNG",n.default=dashjs.FactoryMaker.getSingletonFactory(r),t.exports=n.default},{}],143:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});function r(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),this.mpdurl=null,this.errorcode=null,this.terror=null,this.url=null,this.ipaddress=null,this.servicelocation=null}r.SSL_CONNECTION_FAILED_PREFIX="SSL",r.DNS_RESOLUTION_FAILED="C00",r.HOST_UNREACHABLE="C01",r.CONNECTION_REFUSED="C02",r.CONNECTION_ERROR="C03",r.CORRUPT_MEDIA_ISOBMFF="M00",r.CORRUPT_MEDIA_OTHER="M01",r.BASE_URL_CHANGED="F00",r.BECAME_REPORTER="S00",n.default=r,t.exports=n.default},{}],144:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});n.default=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.metrics="",this.Range=[],this.Reporting=[]},t.exports=n.default},{}],145:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});n.default=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.starttime=0,this.duration=1/0,this._useWallClockTime=!1},t.exports=n.default},{}],146:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});n.default=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.schemeIdUri="",this.value=""},t.exports=n.default},{}],147:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});function u(e,t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,u),this.data={baseUrls:e||null,selectedIdx:t||NaN},this.children=[]}var l=r(e(217)),i=r(e(47));function a(){var e,i=void 0,a=void 0,t=this.context,o=(0,l.default)(t).getInstance();function s(e,t,n){var r=a.getBaseURLsFromElement(n);e[t]?o.areEqual(r,e[t].data.baseUrls)||(e[t].data.baseUrls=r,e[t].data.selectedIdx=NaN):e[t]=new u(r)}function n(e){!function(){if(!a||!a.hasOwnProperty("getBaseURLsFromElement")||!a.hasOwnProperty("getRepresentationSortFunction"))throw new Error("setConfig function has to be called previously")}();var t=a.getBaseURLsFromElement(e);o.areEqual(t,i.data.baseUrls)||(i.data.baseUrls=t,i.data.selectedIdx=NaN),e&&e.Period_asArray&&e.Period_asArray.forEach(function(e,r){s(i.children,r,e),e.AdaptationSet_asArray&&e.AdaptationSet_asArray.forEach(function(e,n){s(i.children[r].children,n,e),e.Representation_asArray&&e.Representation_asArray.sort(a.getRepresentationSortFunction()).forEach(function(e,t){s(i.children[r].children[n].children,t,e)})})})}function r(){i=new u}return e={reset:r,update:function(e){n(e)},getForPath:function(e){var t=i,n=[t.data];return e&&e.forEach(function(e){(t=t.children[e])&&n.push(t.data)}),n.filter(function(e){return e.baseUrls.length})},invalidateSelectedIndexes:function(t){!function t(n,e){var r=e||i;n(r.data),r.children&&r.children.forEach(function(e){return t(n,e)})}(function(e){isNaN(e.selectedIdx)||t===e.baseUrls[e.selectedIdx].serviceLocation&&(e.selectedIdx=NaN)})},setConfig:function(e){e.adapter&&(a=e.adapter)}},r(),e}a.__dashjs_factory_name="BaseURLTreeModel",n.default=i.default.getClassFactory(a),t.exports=n.default},{217:217,47:47}],148:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var p=r(e(46)),g=r(e(101)),i=r(e(47)),_=r(e(45)),E=r(e(48)),m=e(242),v=r(e(65)),y=r(e(49)),a=e(50),T="dash.js-v"+(0,a.getVersionString)(),S=null,A=1,I=2,R=3,b=4,D="m",M="a",C="v",w="i",N="c",O="d",P="s",L="v",x="l";function o(){var r=void 0,e=void 0,u=void 0,l=void 0,f=void 0,n=void 0,t=this.context,i=(0,p.default)(t).getInstance(),a=(0,E.default)(t).getInstance();function o(){u={pr:1,nor:null,st:null,sf:null,sid:""+y.default.generateUuid(),bs:{audio:A,video:A},cid:null,did:T}}function d(){var e={v:1};return e.sid=a.get().streaming.cmcd.sid?a.get().streaming.cmcd.sid:u.sid,e.cid=a.get().streaming.cmcd.cid?a.get().streaming.cmcd.cid:u.cid,e.did=a.get().streaming.cmcd.did?a.get().streaming.cmcd.did:u.did,e.sid='"'+e.sid+'"',e.cid='"'+e.cid+'"',e.did='"'+e.did+'"',isNaN(u.pr)||1===u.pr||null===u.pr||(e.pr=u.pr),u.st&&(e.st=u.st),u.sf&&(e.sf=u.sf),e}function s(e){try{u.pr=e.playbackRate}catch(e){}}function c(e){try{var t=r.getIsDynamic(e.data)?""+x:""+L,n=e.protocol&&"MSS"===e.protocol?""+P:""+O;u.st=t,u.sf=n}catch(e){}}function h(e){try{if(e.state&&e.mediaType){var t=null;switch(e.state){case g.default.BUFFER_LOADED:t=S;break;case g.default.BUFFER_EMPTY:n.isSeeking()&&(t=I),t=b}u.bs[e.mediaType]=t}}catch(e){}}return e={getQueryParameter:function(e){try{return a.get().streaming.cmcd&&a.get().streaming.cmcd.enabled?{key:"Common-Media-Client-Data",value:function(i){try{var e=function(){if(!i)return{v:null};var e=Object.keys(i),r=e.length;return{v:e.reduce(function(e,t,n){return e+=t+"="+i[t],n<r-1&&(e+=","),e},"")}}();if("object"==typeof e)return e.v}catch(e){return null}}(function(e){try{return e.type===m.HTTPRequest.MPD_TYPE?(function(e){try{u.cid=""+y.default.generateHashCode(e.url)}catch(e){}}(e),function(){var e=d();return e.ot=""+D,e}()):e.type===m.HTTPRequest.MEDIA_SEGMENT_TYPE?function(e){var t=d(),n=function(e){try{var t=e.quality,n=e.mediaInfo.bitrateList;return parseInt(n[t].bandwidth/1e3)}catch(e){return null}}(e),r=function(e){try{return isNaN(e.duration)?null:Math.round(1e3*e.duration)}catch(e){return null}}(e),i="video"===e.mediaType?""+C:"audio"===e.mediaType?""+M:"fragmentedText"===e.mediaType?""+N:null,a=function(e){try{return Math.round(l.getThroughputHistory().getSafeAverageThroughput(e))}catch(e){return null}}(e.mediaType),o=function(e){try{var t=u.pr,n=f.getCurrentBufferLevel(e);return isNaN(t)||isNaN(n)?null:parseInt(n/t*1e3)}catch(e){return null}}(e.mediaType),s=function(e){try{var t=e.mediaType;if(null!==u.bs[t])return u.bs[t];var n=f.getCurrentBufferLevel(t),r=e.duration;return n<r?R:S}catch(e){}}(e);n&&(t.br=n);i&&(t.ot=i);isNaN(r)||(t.d=r);isNaN(a)||(t.mtp=a);isNaN(o)||(t.dl=o);isNaN(s)||null===s||(t.bs=s);return t}(e):e.type===m.HTTPRequest.INIT_SEGMENT_TYPE?function(){var e=d();return e.ot=""+w,e}():null}catch(e){return null}}(e))}:null}catch(e){return null}},setConfig:function(e){e&&(e.abrController&&(l=e.abrController),e.dashMetrics&&(f=e.dashMetrics),e.playbackController&&(n=e.playbackController))},reset:function(){i.off(g.default.PLAYBACK_RATE_CHANGED,s,this),i.off(g.default.MANIFEST_LOADED,c,this),i.off(g.default.BUFFER_LEVEL_STATE_CHANGED,h,e),o()},initialize:function(){i.on(g.default.PLAYBACK_RATE_CHANGED,s,e),i.on(g.default.MANIFEST_LOADED,c,e),i.on(g.default.BUFFER_LEVEL_STATE_CHANGED,h,e)}},(0,_.default)(t).getInstance().getLogger(e),r=(0,v.default)(t).getInstance(),o(),e}o.__dashjs_factory_name="CmcdModel",n.default=i.default.getSingletonFactory(o),t.exports=n.default},{101:101,242:242,45:45,46:46,47:47,48:48,49:49,50:50,65:65}],149:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var i=r(e(47)),y=r(e(228)),T="loading",S="executed";function a(e){var n=(e=e||{}).eventBus,r=e.events,i=e.dashMetrics,a=e.fragmentLoader,t=e.debug,o=void 0,s=void 0,u=void 0,l=void 0,f=void 0;function d(s){var u;return!!s&&(u=!1,l.some(function(e){if(a=s,o=e,!isNaN(a.index)&&a.startTime===o.startTime&&a.adaptationIndex===o.adaptationIndex&&a.type===o.type||(r=s,i=e,isNaN(r.index)&&isNaN(i.index)&&r.quality===i.quality)||(n=e,(t=s).action===y.default.ACTION_COMPLETE&&t.action===n.action))return u=!0;var t,n,r,i,a,o}),u)}function c(e){return isNaN(e.duration)?.25:Math.min(e.duration/8,.5)}function h(n){l=l.filter(function(e){var t=c(e);return isNaN(e.startTime)||void 0!==n&&e.startTime>=n-t})}function p(n,r){r<=n+.5||(l=l.filter(function(e){var t=c(e);return isNaN(e.startTime)||e.startTime>=r-t||isNaN(e.duration)||e.startTime+e.duration<=n+t}))}function g(e,t){i.addSchedulingInfo(e,t),i.addRequestsQueue(e.mediaType,f,l)}function _(e){e.sender===a&&(f.splice(f.indexOf(e.request),1),e.response&&!e.error&&l.push(e.request),g(e.request,e.error?"failed":S),n.trigger(r.FRAGMENT_LOADING_COMPLETED,{request:e.request,response:e.response,error:e.error,sender:this}))}function E(e){e.sender===a&&n.trigger(r.FRAGMENT_LOADING_PROGRESS,{request:e.request,response:e.response,error:e.error,sender:this})}function m(e){e.sender===a&&n.trigger(r.FRAGMENT_LOADING_ABANDONED,{streamProcessor:this.getStreamProcessor(),request:e.request,mediaType:e.mediaType})}function v(){l=[],f=[]}return o={setStreamProcessor:function(e){u=e},getStreamProcessor:function(){return u},getRequests:function(n){var e=n?n.state instanceof Array?n.state:[n.state]:[],r=[];return e.forEach(function(e){var t=function(e){var t=void 0;switch(e){case T:t=f;break;case S:t=l;break;default:t=[]}return t}(e);r=r.concat(function(e,n){if(n.hasOwnProperty("time"))return[function(e,t,n){for(var r=e.length-1;0<=r;r--){var i=e[r],a=i.startTime,o=a+i.duration;if(n=isNaN(n)?c(i):n,!isNaN(a)&&!isNaN(o)&&a<=t+n&&t-n<o||isNaN(a)&&isNaN(t))return i}return null}(e,n.time,n.threshold)];return e.filter(function(e){for(var t in n)if("state"!==t&&n.hasOwnProperty(t)&&e[t]!=n[t])return!1;return!0})}(t,n))}),r},isFragmentLoaded:d,isFragmentLoadedOrPending:function(e){var t=!1,n=0,r=void 0;if(!(t=d(e)))for(n=0;n<f.length;n++)r=f[n],e.url===r.url&&e.startTime===r.startTime&&(t=!0);return t},removeExecutedRequestsBeforeTime:h,removeExecutedRequestsAfterTime:function(t){l=l.filter(function(e){return isNaN(e.startTime)||void 0!==t&&e.startTime<t})},syncExecutedRequestsWithBufferedRange:function(e,t){if(e&&0!==e.length){for(var n=0,r=0,i=e.length;r<i;r++)p(n,e.start(r)),n=e.end(r);0<t&&p(n,t)}else h()},abortRequests:function(){a.abort(),f=[]},executeRequest:function(e){switch(e.action){case y.default.ACTION_COMPLETE:l.push(e),g(e,S),s.debug("executeRequest trigger STREAM_COMPLETED"),n.trigger(r.STREAM_COMPLETED,{request:e,fragmentModel:this});break;case y.default.ACTION_DOWNLOAD:g(e,T),f.push(e),t=e,n.trigger(r.FRAGMENT_LOADING_STARTED,{sender:o,request:t}),a.load(t);break;default:s.warn("Unknown request action.")}var t},reset:function(){n.off(r.LOADING_COMPLETED,_,this),n.off(r.LOADING_DATA_PROGRESS,E,this),n.off(r.LOADING_ABANDONED,m,this),a&&a.reset(),v()},addExecutedRequest:function(e){l.push(e)}},s=t.getLogger(o),v(),n.on(r.LOADING_COMPLETED,_,o),n.on(r.LOADING_DATA_PROGRESS,E,o),n.on(r.LOADING_ABANDONED,m,o),o}a.__dashjs_factory_name="FragmentModel";var o=i.default.getClassFactory(a);o.FRAGMENT_MODEL_LOADING=T,o.FRAGMENT_MODEL_EXECUTED=S,o.FRAGMENT_MODEL_CANCELED="canceled",o.FRAGMENT_MODEL_FAILED="failed",i.default.updateClassFactory(a.__dashjs_factory_name,o),n.default=o,t.exports=n.default},{228:228,47:47}],150:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var i=r(e(46)),a=r(e(54)),o=r(e(47));function s(){var e=this.context,t=(0,i.default)(e).getInstance(),n=void 0;return{getValue:function(){return n},setValue:function(e){(n=e)&&t.trigger(a.default.MANIFEST_LOADED,{data:e})}}}s.__dashjs_factory_name="ManifestModel",n.default=o.default.getSingletonFactory(s),t.exports=n.default},{46:46,47:47,54:54}],151:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var d=r(e(96)),i=r(e(47)),c=r(e(108)),h=r(e(189)),p=r(e(48)),g=e(219);function a(){var e,i=void 0,r=void 0,a=void 0,t={scheme:"urn:mpeg:dash:utc:http-xsdate:2014",value:"http://time.akamai.com/?iso&ms"},n=this.context,o=(0,p.default)(n).getInstance();function s(e){var t=void 0;for(t=0;t<a.length;t++)if(a[t].rulename===e)return t;return-1}function u(){return o.get().streaming.lowLatencyEnabled?o.get().streaming.liveDelay||3:o.get().streaming.liveDelay}function l(e,t){f(e,t);var n=new d.default;n.schemeIdUri=e,n.value=t,i.push(n)}function f(n,r){(0,g.checkParameterType)(n,"string"),(0,g.checkParameterType)(r,"string"),i.forEach(function(e,t){e.schemeIdUri===n&&e.value===r&&i.splice(t,1)})}return e={getABRCustomRules:function(){return a},addABRCustomRule:function(e,t,n){if("string"!=typeof e||e!==h.default.ABANDON_FRAGMENT_RULES&&e!==h.default.QUALITY_SWITCH_RULES||"string"!=typeof t)throw c.default.BAD_ARGUMENT_ERROR;var r=s(t);-1===r?a.push({type:e,rulename:t,rule:n}):(a[r].type=e,a[r].rule=n)},removeABRCustomRule:function(e){if(e){var t=s(e);-1!==t&&a.splice(t,1)}else a=[]},getStableBufferTime:function(){if(o.get().streaming.lowLatencyEnabled)return.6*u();var e=o.get().streaming.stableBufferTime;return-1<e?e:o.get().streaming.fastSwitchEnabled?20:12},getRetryAttemptsForType:function(e){return o.get().streaming.lowLatencyEnabled?5*o.get().streaming.retryAttempts[e]:o.get().streaming.retryAttempts[e]},getRetryIntervalsForType:function(e){return o.get().streaming.lowLatencyEnabled?o.get().streaming.retryIntervals[e]/10:o.get().streaming.retryIntervals[e]},getLiveDelay:u,addUTCTimingSource:l,removeUTCTimingSource:f,getUTCTimingSources:function(){return i},clearDefaultUTCTimingSources:function(){i=[]},restoreDefaultUTCTimingSources:function(){l(t.scheme,t.value)},setXHRWithCredentialsForType:function t(e,n){e?r[e]=!!n:Object.keys(r).forEach(function(e){t(e,n)})},getXHRWithCredentialsForType:function(e){var t=r[e];return void 0===t?r.default:t},getDefaultUtcTimingSource:function(){return t},reset:function(){}},r={default:!(i=[])},a=[],e}a.__dashjs_factory_name="MediaPlayerModel",n.default=i.default.getSingletonFactory(a),t.exports=n.default},{108:108,189:189,219:219,47:47,48:48,96:96}],152:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var h=r(e(108)),m=r(e(109)),f=r(e(232)),v=e(242),p=r(e(245)),g=r(e(238)),_=r(e(239)),y=r(e(240)),T=r(e(241)),S=e(243),A=r(e(247)),I=r(e(46)),R=r(e(246)),b=r(e(54)),i=r(e(47));function a(e){var t,i=(e=e||{}).settings,n=this.context,r=(0,I.default)(n).getInstance(),a=void 0;function o(){r.trigger(b.default.METRICS_CHANGED)}function s(e){r.trigger(b.default.METRIC_CHANGED,{mediaType:e}),o()}function l(e,t,n){r.trigger(b.default.METRIC_UPDATED,{mediaType:e,metric:t,value:n}),s(e)}function d(e,t,n){r.trigger(b.default.METRIC_ADDED,{mediaType:e,metric:t,value:n}),s(e)}function u(e,t){var n=null;return e&&(a.hasOwnProperty(e)?n=a[e]:t||(n=new f.default,a[e]=n)),n}function c(e,t,n){var r=u(e);null!==r&&(r[t].push(n),r[t].length>i.get().streaming.metricsMaxListDepth&&r[t].shift())}function E(e,t,n){c(e,t,n),d(e,t,n)}return t={clearCurrentMetricsForType:function(e){delete a[e],s(e)},clearAllCurrentMetrics:function(){a={},o()},getMetricsFor:u,addHttpRequest:function e(t,n,r,i,a,o,s,u,l,f,d,c,h,p,g){var _=new v.HTTPRequest;o&&o!==i&&(e(t,null,r,i,a,null,null,u,l,null,null,null,h,null,null),_.actualurl=o),_.tcpid=n,_.type=r,_.url=i,_.range=u,_.trequest=l,_.tresponse=f,_.responsecode=c,_._tfinish=d,_._stream=t,_._mediaduration=h,_._quality=a,_._responseHeaders=p,_._serviceLocation=s,g?g.forEach(function(e){var t,n,r,i,a;t=_,n=e.s,r=e.d,i=e.b,(a=new v.HTTPRequestTrace).s=n,a.d=r,a.b=i,t.trace.push(a),t.interval||(t.interval=0),t.interval+=r}):(delete _.interval,delete _.trace),E(t,m.default.HTTP_REQUEST,_)},addRepresentationSwitch:function(e,t,n,r,i){var a=new p.default;a.t=t,a.mt=n,a.to=r,i?a.lto=i:delete a.lto,E(e,m.default.TRACK_SWITCH,a)},addBufferLevel:function(e,t,n){var r=new g.default;r.t=t,r.level=n,E(e,m.default.BUFFER_LEVEL,r)},addBufferState:function(e,t,n){var r=new _.default;r.target=n,r.state=t,E(e,m.default.BUFFER_STATE,r)},addDVRInfo:function(e,t,n,r){var i=new y.default;i.time=t,i.range=r,i.manifestInfo=n,E(e,m.default.DVR_INFO,i)},addDroppedFrames:function(e,t){var n=new T.default,r=u(e).DroppedFrames;t&&(n.time=t.creationTime,n.droppedFrames=t.droppedVideoFrames,0<r.length&&r[r.length-1]==n||E(e,m.default.DROPPED_FRAMES,n))},addSchedulingInfo:function(e,t,n,r,i,a,o,s,u){var l=new A.default;l.mediaType=e,l.t=t,l.type=n,l.startTime=r,l.availabilityStartTime=i,l.duration=a,l.quality=o,l.range=s,l.state=u,E(e,m.default.SCHEDULING_INFO,l)},addRequestsQueue:function(e,t,n){var r=new R.default;r.loadingRequests=t,r.executedRequests=n,u(e).RequestsQueue=r,d(e,m.default.REQUESTS_QUEUE,r)},addManifestUpdate:function(e,t,n,r,i,a,o,s,u,l){var f=new S.ManifestUpdate;f.mediaType=e,f.type=t,f.requestTime=n,f.fetchTime=r,f.availabilityStartTime=i,f.presentationStartTime=a,f.clientTimeOffset=o,f.currentTime=s,f.buffered=u,f.latency=l,c(h.default.STREAM,m.default.MANIFEST_UPDATE,f),d(e,m.default.MANIFEST_UPDATE,f)},updateManifestUpdateInfo:function(e,t){if(e){for(var n in t)e[n]=t[n];l(e.mediaType,m.default.MANIFEST_UPDATE,e)}},addManifestUpdateStreamInfo:function(e,t,n,r,i){if(e){var a=new S.ManifestUpdateStreamInfo;a.id=t,a.index=n,a.start=r,a.duration=i,e.streamInfo.push(a),l(e.mediaType,m.default.MANIFEST_UPDATE_STREAM_INFO,e)}},addManifestUpdateRepresentationInfo:function(e,t,n,r,i,a,o,s){if(e&&e.representationInfo){var u=new S.ManifestUpdateRepresentationInfo;u.id=t,u.index=n,u.streamIndex=r,u.mediaType=i,u.startNumber=o,u.fragmentInfoType=s,u.presentationTimeOffset=a,e.representationInfo.push(u),l(e.mediaType,m.default.MANIFEST_UPDATE_TRACK_INFO,e)}},addPlayList:function(e){e.trace&&Array.isArray(e.trace)?e.trace.forEach(function(e){e.hasOwnProperty("subreplevel")&&!e.subreplevel&&delete e.subreplevel}):delete e.trace,E(h.default.STREAM,m.default.PLAY_LIST,e)},addDVBErrors:function(e){E(h.default.STREAM,m.default.DVB_ERRORS,e)}},a={},t}a.__dashjs_factory_name="MetricsModel",n.default=i.default.getSingletonFactory(a),t.exports=n.default},{108:108,109:109,232:232,238:238,239:239,240:240,241:241,242:242,243:243,245:245,246:246,247:247,46:46,47:47,54:54}],153:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var l=r(e(237)),i=r(e(47));function a(){var u=void 0;return{initialize:function(e){if(u=new l.default,!e)return null;var t=e.indexOf("#");if(-1!==t)for(var n=e.substr(t+1).split("&"),r=0,i=n.length;r<i;++r){var a=n[r],o=a.indexOf("=");if(-1!==o){var s=a.substring(0,o);u.hasOwnProperty(s)&&(u[s]=a.substr(o+1))}}},getURIFragmentData:function(){return u}}}a.__dashjs_factory_name="URIFragmentModel",n.default=i.default.getSingletonFactory(a),t.exports=n.default},{237:237,47:47}],154:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var i=r(e(47)),g=r(e(46)),_=r(e(54)),E=r(e(45));function a(){var e=void 0,t=void 0,o=void 0,n=void 0,r=void 0,i="element is not video or audio DOM type!",a=this.context,s=(0,g.default)(a).getInstance(),u=[];function l(){o&&(o.playbackRate=r||1,o.removeEventListener("canplay",l))}function f(e){o&&(o.readyState<=2&&0<e?o.addEventListener("canplay",l):o.playbackRate=e)}function d(){return 0<u.length}function c(){if(o&&d()&&0===o.playbackRate){var e=document.createEvent("Event");e.initEvent("waiting",!0,!1),o.dispatchEvent(e)}}function h(){return o?o.buffered:null}function p(e,t,n,r,i){if(o)for(var a=0;a<o.textTracks.length;a++)if(o.textTracks[a].kind===e&&(!t||o.textTracks[a].label==t)&&o.textTracks[a].language===n&&o.textTracks[a].isTTML===r&&o.textTracks[a].isEmbedded===i)return o.textTracks[a];return null}return e={initialize:function(){s.on(_.default.PLAYBACK_PLAYING,c,this)},setCurrentTime:function(t,e){if(o){if(o.currentTime==t)return;try{t=e?function(e){var t=h(),n=e,r=9999999999;if(t)for(var i=0;i<t.length;i++){var a=t.start(i),o=t.end(i),s=Math.abs(a-e),u=Math.abs(o-e);if(a<=e&&e<=o)return e;s<r&&(r=s,n=a),u<r&&(r=u,n=o)}return n}(t):t,o.currentTime=t}catch(e){0===o.readyState&&e.code===e.INVALID_STATE_ERR&&setTimeout(function(){o.currentTime=t},400)}}},play:function(){if(o){o.autoplay=!0;var e=o.play();e&&e.catch&&"undefined"!=typeof Promise&&e.catch(function(e){"NotAllowedError"===e.name&&s.trigger(_.default.PLAYBACK_NOT_ALLOWED),t.warn("Caught pending play exception - continuing ("+e+")")})}},isPaused:function(){return o?o.paused:null},pause:function(){o&&(o.pause(),o.autoplay=!1)},isSeeking:function(){return o?o.seeking:null},getTime:function(){return o?o.currentTime:null},getPlaybackRate:function(){return o?o.playbackRate:null},setPlaybackRate:f,getPlayedRanges:function(){return o?o.played:null},getEnded:function(){return o?o.ended:null},setStallState:function(e,t){(t?function(e){var t=void 0;if(null===e||o.seeking||-1!==u.indexOf(e))return;u.push(e),o&&1===u.length&&((t=document.createEvent("Event")).initEvent("waiting",!0,!1),r=o.playbackRate,f(0),o.dispatchEvent(t))}:function(e){var t=u.indexOf(e),n=void 0;if(null===e)return;-1!==t&&u.splice(t,1);o&&!1===d()&&0===o.playbackRate&&(f(r||1),o.paused||((n=document.createEvent("Event")).initEvent("playing",!0,!1),o.dispatchEvent(n)))})(e)},getElement:function(){return o},setElement:function(e){if(!(null==e||e&&/^(VIDEO|AUDIO)$/i.test(e.nodeName)))throw i;(o=e)&&(o.preload="auto")},setSource:function(e){o&&(e?o.src=e:(o.removeAttribute("src"),o.load()))},getSource:function(){return o?o.src:null},getTTMLRenderingDiv:function(){return n},setTTMLRenderingDiv:function(e){(n=e).style.position="absolute",n.style.display="flex",n.style.overflow="hidden",n.style.pointerEvents="none",n.style.top=0,n.style.left=0},getPlaybackQuality:function(){if(!o)return null;var e="webkitDroppedFrameCount"in o&&"webkitDecodedFrameCount"in o,t=null;return"getVideoPlaybackQuality"in o?t=o.getVideoPlaybackQuality():e&&(t={droppedVideoFrames:o.webkitDroppedFrameCount,totalVideoFrames:o.webkitDroppedFrameCount+o.webkitDecodedFrameCount,creationTime:new Date}),t},addEventListener:function(e,t){o&&o.addEventListener(e,t)},removeEventListener:function(e,t){o&&o.removeEventListener(e,t)},getReadyState:function(){return o?o.readyState:NaN},getBufferRange:h,getClientWidth:function(){return o?o.clientWidth:NaN},getClientHeight:function(){return o?o.clientHeight:NaN},getTextTracks:function(){return o?o.textTracks:[]},getTextTrack:p,addTextTrack:function(e,t,n,r,i){if(!o)return null;var a=p(e,t,n,r,i);return a||((a=o.addTextTrack(e,t,n)).isEmbedded=i,a.isTTML=r),a},appendChild:function(e){o&&(o.appendChild(e),void 0!==e.isTTML&&(o.textTracks[o.textTracks.length-1].isTTML=e.isTTML,o.textTracks[o.textTracks.length-1].isEmbedded=e.isEmbedded))},removeChild:function(e){o&&o.removeChild(e)},getVideoWidth:function(){return o?o.videoWidth:NaN},getVideoHeight:function(){return o?o.videoHeight:NaN},getVideoRelativeOffsetTop:function(){return o&&o.parentNode?o.getBoundingClientRect().top-o.parentNode.getBoundingClientRect().top:NaN},getVideoRelativeOffsetLeft:function(){return o&&o.parentNode?o.getBoundingClientRect().left-o.parentNode.getBoundingClientRect().left:NaN},reset:function(){s.off(_.default.PLAYBACK_PLAYING,c,this)}},t=(0,E.default)(a).getInstance().getLogger(e),e}a.__dashjs_factory_name="VideoModel",n.default=i.default.getSingletonFactory(a),t.exports=n.default},{45:45,46:46,47:47,54:54}],155:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r,i=e(47),a=(r=i)&&r.__esModule?r:{default:r};function o(e){var a=(e=e||{}).requestModifier,g=e.boxParser;function _(t,e){t.reader.read().then(e).catch(function(e){t.onerror&&200===t.response.status&&t.onerror(e)})}function E(i,t){if(1<(i=i.filter(function(e){return e.bytes>t/4/i.length})).length){var e=(a=0,o=(i[i.length-1].ts-i[0].ts)/i.length,i.forEach(function(e,t){var n=i[t+1];if(n){var r=n.ts-e.ts;a+=r<o?r:0}}),{v:a});if("object"==typeof e)return e.v}var a,o;return null}return{load:function(p){var e=new Date,t=p.request,n=new Headers;t.range&&n.append("Range","bytes="+t.range),t.requestStartDate||(t.requestStartDate=e),a&&a.modifyRequestHeader({setRequestHeader:function(e,t){n.append(e,t)}});var r=void 0;"function"==typeof window.AbortController&&(r=new AbortController,p.abortController=r);var i={method:p.method,headers:n,credentials:p.withCredentials?"include":void 0,signal:r?r.signal:void 0};fetch(p.url,i).then(function(e){p.response||(p.response={}),p.response.status=e.status,p.response.statusText=e.statusText,p.response.responseURL=e.url,e.ok||p.onerror();var t="",n=!0,r=!1,i=void 0;try{for(var a,o=e.headers.keys()[Symbol.iterator]();!(n=(a=o.next()).done);n=!0){var s=a.value;t+=s+": "+e.headers.get(s)+"\r\n"}}catch(e){r=!0,i=e}finally{try{!n&&o.return&&o.return()}finally{if(r)throw i}}if(p.response.responseHeaders=t,!e.body)return e.arrayBuffer().then(function(e){var t={loaded:(p.response.response=e).byteLength,total:e.byteLength,stream:!1};p.progress(t),p.onload(),p.onend()});var u=parseInt(e.headers.get("Content-Length"),10),l=0,f=!1,d=new Uint8Array,c=0;p.reader=e.body.getReader();var h=[];_(p,function e(t){var n=t.value;if(t.done)return d&&(p.progress({loaded:l,total:isNaN(u)?l:u,lengthComputable:!0,time:E(h,l),stream:!0}),p.response.response=d.buffer),p.onload(),void p.onend();if(n&&0<n.length){d=function(e,t){if(0===e.length)return t;var n=new Uint8Array(e.length+t.length);return n.set(e),n.set(t,e.length),n}(d,n),l+=n.length,h.push({ts:Date.now(),bytes:n.length});var r=g.findLastTopIsoBoxCompleted(["moov","mdat"],d,c);if(r.found){var i=r.lastCompletedOffset+r.size,a=void 0;d=i===d.length?(a=d,new Uint8Array):(a=new Uint8Array(d.subarray(0,i)),d.subarray(i)),p.progress({data:a.buffer,lengthComputable:!1,noTrace:!0}),c=0}else c=r.lastCompletedOffset,f||(p.progress({lengthComputable:!1,noTrace:!0}),f=!0)}_(p,e)})}).catch(function(e){p.onerror&&p.onerror(e)})},abort:function(e){if(e.abortController)e.abortController.abort();else if(e.reader)try{e.reader.cancel()}catch(e){}},calculateDownloadedTime:E}}o.__dashjs_factory_name="FetchLoader";var s=a.default.getClassFactory(o);n.default=s,t.exports=n.default},{47:47}],156:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Object.defineProperty(n,"__esModule",{value:!0});var O=r(e(159)),P=r(e(155)),L=e(242),a=r(e(47)),x=r(e(226)),o=r(e(148)),F=r(e(49));function s(e){e=e||{};var t,n,v=this.context,y=e.errHandler,T=e.dashMetrics,S=e.mediaPlayerModel,A=e.requestModifier,I=e.boxParser,R=e.useFetch||!1,r=e.errors,b=void 0,D=void 0,M=void 0,C=void 0,w=void 0;function N(n,t){var r=n.request,i=[],a=!0,o=!0,s=new Date,u=s,l=0,f=void 0;if(!A||!T||!y)throw new Error("config object is not correct or missing");function e(e){o=!1,r.requestStartDate=s,r.requestEndDate=new Date,r.firstByteDate=r.firstByteDate||s,r.checkExistenceOnly||(T.addHttpRequest(r,f.response?f.response.responseURL:null,f.response?f.response.status:null,f.response&&f.response.getAllResponseHeaders?f.response.getAllResponseHeaders():f.response?f.response.responseHeaders:[],e?i:null),r.type===L.HTTPRequest.MPD_TYPE&&T.addManifestUpdate(r.type,r.requestStartDate,r.requestEndDate))}function d(){-1!==b.indexOf(f)&&(b.splice(b.indexOf(f),1),o&&(e(!1),0<t?function(){t--;var e={config:n};M.push(e),e.timeout=setTimeout(function(){-1!==M.indexOf(e)&&(M.splice(M.indexOf(e),1),N(n,t))},S.getRetryIntervalsForType(r.type))}():(y.error(new x.default(C[r.type],r.url+" is not available",{request:r,response:f.response})),n.error&&n.error(r,"error",f.response.statusText),n.complete&&n.complete(r,f.response.statusText))))}var c=void 0;c=R&&window.fetch&&"arraybuffer"===r.responseType&&r.type===L.HTTPRequest.MEDIA_SEGMENT_TYPE?(0,P.default)(v).create({requestModifier:A,boxParser:I}):(0,O.default)(v).create({requestModifier:A});var h=A.modifyRequestURL(r.url),p=function(e){try{var t=[],n=w.getQueryParameter(e);return n&&t.push(n),t}catch(e){return[]}}(r);h=F.default.addAditionalQueryParameterToUrl(h,p);var g=r.checkExistenceOnly?L.HTTPRequest.HEAD:L.HTTPRequest.GET,_=S.getXHRWithCredentialsForType(r.type);f={url:h,method:g,withCredentials:_,request:r,onload:function(){200<=f.response.status&&f.response.status<=299&&(e(!0),n.success&&n.success(f.response.response,f.response.statusText,f.response.responseURL),n.complete&&n.complete(r,f.response.statusText))},onend:d,onerror:d,progress:function(e){var t=new Date;a&&(a=!1,(!e.lengthComputable||e.lengthComputable&&e.total!==e.loaded)&&(r.firstByteDate=t)),e.lengthComputable&&(r.bytesLoaded=e.loaded,r.bytesTotal=e.total),e.noTrace||(i.push({s:u,d:e.time?e.time:t.getTime()-u.getTime(),b:[e.loaded?e.loaded-l:0]}),u=t,l=e.loaded),n.progress&&e&&n.progress(e)},onabort:function(){n.abort&&n.abort(r)},loader:c};var E,m=(new Date).getTime();isNaN(r.delayLoadingTime)||m>=r.delayLoadingTime?(b.push(f),c.load(f)):(E={httpRequest:f},D.push(E),E.delayTimeout=setTimeout(function(){if(-1!==D.indexOf(E)){D.splice(D.indexOf(E),1);try{s=new Date,u=s,b.push(E.httpRequest),c.load(E.httpRequest)}catch(e){E.httpRequest.onerror()}}},r.delayLoadingTime-m))}return t={load:function(e){e.request?N(e,S.getRetryAttemptsForType(e.request.type)):e.error&&e.error(e.request,"error")},abort:function(){M.forEach(function(e){clearTimeout(e.timeout),e.config.request&&e.config.abort&&e.config.abort(e.config.request)}),M=[],D.forEach(function(e){return clearTimeout(e.delayTimeout)}),D=[],b.forEach(function(e){e.onloadend=e.onerror=e.onprogress=void 0,e.loader.abort(e)}),b=[]}},b=[],D=[],M=[],w=(0,o.default)(v).getInstance(),i(n={},L.HTTPRequest.MPD_TYPE,r.DOWNLOAD_ERROR_ID_MANIFEST_CODE),i(n,L.HTTPRequest.XLINK_EXPANSION_TYPE,r.DOWNLOAD_ERROR_ID_XLINK_CODE),i(n,L.HTTPRequest.INIT_SEGMENT_TYPE,r.DOWNLOAD_ERROR_ID_INITIALIZATION_CODE),i(n,L.HTTPRequest.MEDIA_SEGMENT_TYPE,r.DOWNLOAD_ERROR_ID_CONTENT_CODE),i(n,L.HTTPRequest.INDEX_SEGMENT_TYPE,r.DOWNLOAD_ERROR_ID_CONTENT_CODE),i(n,L.HTTPRequest.BITSTREAM_SWITCHING_SEGMENT_TYPE,r.DOWNLOAD_ERROR_ID_CONTENT_CODE),i(n,L.HTTPRequest.OTHER_TYPE,r.DOWNLOAD_ERROR_ID_CONTENT_CODE),C=n,t}s.__dashjs_factory_name="HTTPLoader";var u=a.default.getClassFactory(s);n.default=u,t.exports=n.default},{148:148,155:155,159:159,226:226,242:242,47:47,49:49}],157:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var i=r(e(47)),a=r(e(156));function o(){var n=void 0;function e(){n={}}function t(){e()}return t(),{getLoader:function(e){for(var t in n)if(n.hasOwnProperty(t)&&e.startsWith(t))return n[t];return a.default},registerLoader:function(e,t){n[e]=t},unregisterLoader:function(e){n[e]&&delete n[e]},unregisterAllLoader:e,reset:t}}o.__dashjs_factory_name="SchemeLoaderFactory";var s=i.default.getSingletonFactory(o);n.default=s,t.exports=n.default},{156:156,47:47}],158:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var i=r(e(47)),o=r(e(157));function a(n){n=n||{};var r=this.context,i=void 0,a=void 0;return i=(0,o.default)(r).getInstance(),{load:function(e){var t=i.getLoader(e&&e.request?e.request.url:null);(a=t(r).create({errHandler:n.errHandler,mediaPlayerModel:n.mediaPlayerModel,requestModifier:n.requestModifier,useFetch:n.useFetch||null,dashMetrics:n.dashMetrics,boxParser:n.boxParser?n.boxParser:null,constants:n.constants?n.constants:null,dashConstants:n.dashConstants?n.dashConstants:null,urlUtils:n.urlUtils?n.urlUtils:null,errors:n.errors})).load(e)},abort:function(){a&&a.abort()}}}a.__dashjs_factory_name="URLLoader";var s=i.default.getClassFactory(a);n.default=s,t.exports=n.default},{157:157,47:47}],159:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r,i=e(47),a=(r=i)&&r.__esModule?r:{default:r};function o(e){var i=(e=e||{}).requestModifier;return{load:function(e){var t=new Date,n=e.request,r=new XMLHttpRequest;r.open(e.method,e.url,!0),n.responseType&&(r.responseType=n.responseType),n.range&&r.setRequestHeader("Range","bytes="+n.range),n.requestStartDate||(n.requestStartDate=t),i&&(r=i.modifyRequestHeader(r)),r.withCredentials=e.withCredentials,r.onload=e.onload,r.onloadend=e.onend,r.onerror=e.onerror,r.onprogress=e.progress,r.onabort=e.onabort,r.send(),e.response=r},abort:function(e){var t=e.response;t.onloadend=t.onerror=t.onprogress=void 0,t.abort()}}}o.__dashjs_factory_name="XHRLoader";var s=a.default.getClassFactory(o);n.default=s,t.exports=n.default},{47:47}],160:[function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}Object.defineProperty(n,"__esModule",{value:!0});var i=(function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}(a,null,[{key:"findCencContentProtection",value:function(e){for(var t=null,n=0;n<e.length;++n){var r=e[n];"urn:mpeg:dash:mp4protection:2011"===r.schemeIdUri.toLowerCase()&&"cenc"===r.value.toLowerCase()&&(t=r)}return t}},{key:"getPSSHData",value:function(e){var t=8,n=new DataView(e),r=n.getUint8(t);return t+=20,0<r&&(t+=4+16*n.getUint32(t)),t+=4,e.slice(t)}},{key:"getPSSHForKeySystem",value:function(e,t){var n=a.parsePSSHList(t);return e&&n.hasOwnProperty(e.uuid.toLowerCase())?n[e.uuid.toLowerCase()]:null}},{key:"parseInitDataFromContentProtection",value:function(e,t){return"pssh"in e?t.decodeArray(e.pssh.__text).buffer:null}},{key:"parsePSSHList",value:function(e){if(null==e)return[];for(var t=new DataView(e.buffer||e),n={},r=0;;){var i,a,o=void 0,s=r;if(r>=t.buffer.byteLength)break;if(i=r+t.getUint32(r),r+=4,1886614376===t.getUint32(r))if(r+=4,0===(a=t.getUint8(r))||1===a){r++,r+=3,o="";var u=void 0,l=void 0;for(u=0;u<4;u++)o+=1===(l=t.getUint8(r+u).toString(16)).length?"0"+l:l;for(r+=4,o+="-",u=0;u<2;u++)o+=1===(l=t.getUint8(r+u).toString(16)).length?"0"+l:l;for(r+=2,o+="-",u=0;u<2;u++)o+=1===(l=t.getUint8(r+u).toString(16)).length?"0"+l:l;for(r+=2,o+="-",u=0;u<2;u++)o+=1===(l=t.getUint8(r+u).toString(16)).length?"0"+l:l;for(r+=2,o+="-",u=0;u<6;u++)o+=1===(l=t.getUint8(r+u).toString(16)).length?"0"+l:l;r+=6,o=o.toLowerCase(),t.getUint32(r),r+=4,n[o]=t.buffer.slice(s,i),r=i}else r=i;else r=i}return n}}]),a);function a(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a)}n.default=i,t.exports=n.default},{}],161:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var h=r(e(163)),p=r(e(164)),i=r(e(162)),a=r(e(169)),g=r(e(171)),_=r(e(172)),E=r(e(170)),m=[{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"}],v=[{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 o(){var f=void 0,d=this.context;function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];if("function"==typeof e[r[Object.keys(r)[0]]])return r}return null}return f={createProtectionSystem:function(e){var t=null,n=(0,p.default)(d).getInstance();n.setConfig({debug:e.debug,BASE64:e.BASE64}),n.initialize();var r,i,a,o,s,u,l=(i=(r=e).debug,a=i.getLogger(f),o=r.eventBus,s=r.errHandler,(u=r.videoModel?r.videoModel.getElement():null)&&void 0===u.onencrypted||u&&void 0===u.mediaKeys?c(u,v)?(a.info("EME detected on this user agent! (ProtectionModel_3Feb2014)"),(0,_.default)(d).create({debug:i,eventBus:o,events:r.events,api:c(u,v)})):c(u,m)?(a.info("EME detected on this user agent! (ProtectionModel_01b)"),(0,E.default)(d).create({debug:i,eventBus:o,errHandler:s,events:r.events,api:c(u,m)})):(a.warn("No supported version of EME detected on this user agent! - Attempts to play encrypted content will fail!"),null):(a.info("EME detected on this user agent! (ProtectionModel_21Jan2015)"),(0,g.default)(d).create({debug:i,eventBus:o,events:r.events})));return!t&&l&&(t=(0,h.default)(d).create({protectionModel:l,protectionKeyController:n,eventBus:e.eventBus,debug:e.debug,events:e.events,BASE64:e.BASE64,constants:e.constants}),e.capabilities.setEncryptedMediaSupported(!0)),t}}}o.__dashjs_factory_name="Protection";var s=dashjs.FactoryMaker.getClassFactory(o);s.events=i.default,s.errors=a.default,dashjs.FactoryMaker.updateClassFactory(o.__dashjs_factory_name,s),n.default=s,t.exports=n.default},{162:162,163:163,164:164,169:169,170:170,171:171,172:172}],162:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r,i=e(55);function a(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),function(e,t,n){for(var r=!0;r;){var i=e,a=t,o=n;r=!1,null===i&&(i=Function.prototype);var s=Object.getOwnPropertyDescriptor(i,a);if(void 0!==s){if("value"in s)return s.value;var u=s.get;if(void 0===u)return;return u.call(o)}var l=Object.getPrototypeOf(i);if(null===l)return;e=l,t=a,n=o,r=!0,s=l=void 0}}(Object.getPrototypeOf(a.prototype),"constructor",this).call(this),this.INTERNAL_KEY_MESSAGE="internalKeyMessage",this.INTERNAL_KEY_SYSTEM_SELECTED="internalKeySystemSelected",this.INTERNAL_KEY_STATUS_CHANGED="internalkeyStatusChanged",this.KEY_ADDED="public_keyAdded",this.KEY_ERROR="public_keyError",this.KEY_MESSAGE="public_keyMessage",this.KEY_SESSION_CLOSED="public_keySessionClosed",this.KEY_SESSION_CREATED="public_keySessionCreated",this.KEY_SESSION_REMOVED="public_keySessionRemoved",this.KEY_STATUSES_CHANGED="public_keyStatusesChanged",this.KEY_SYSTEM_ACCESS_COMPLETE="public_keySystemAccessComplete",this.KEY_SYSTEM_SELECTED="public_keySystemSelected",this.LICENSE_REQUEST_COMPLETE="public_licenseRequestComplete",this.NEED_KEY="needkey",this.PROTECTION_CREATED="public_protectioncreated",this.PROTECTION_DESTROYED="public_protectiondestroyed",this.SERVER_CERTIFICATE_UPDATED="serverCertificateUpdated",this.TEARDOWN_COMPLETE="protectionTeardownComplete",this.VIDEO_ELEMENT_SELECTED="videoElementSelected"}var o=new(function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(a,((r=i)&&r.__esModule?r:{default:r}).default),a);n.default=o,t.exports=n.default},{55:55}],163:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var C=r(e(160)),w=r(e(182)),N=r(e(181)),O=r(e(169)),P=r(e(226));function i(e){var t,y=(e=e||{}).protectionKeyController,T=e.protectionModel,S=e.eventBus,A=e.events,n=e.debug,f=e.BASE64,l=e.constants,s=[],I=void 0,d=void 0,c=void 0,h=void 0,r=void 0,p=void 0,R=void 0;function i(){if(!(S&&S.hasOwnProperty("on")&&y&&y.hasOwnProperty("getSupportedKeySystemsFromContentProtection")))throw new Error("Missing config parameter(s)")}function g(e,t){var n=C.default.getPSSHForKeySystem(R,e),r=b(R);if(n){for(var i=T.getAllInitData(),a=0;a<i.length;a++)if(y.initDataEquals(n,i[a]))return void I.warn("DRM: Ignoring initData because we have already seen it!");try{T.createKeySession(n,r,m(R),t)}catch(e){S.trigger(A.KEY_SESSION_CREATED,{data:null,error:new P.default(O.default.KEY_SESSION_CREATED_ERROR_CODE,O.default.KEY_SESSION_CREATED_ERROR_MESSAGE+e.message)})}}else e?T.createKeySession(e,r,m(R),t):S.trigger(A.KEY_SESSION_CREATED,{data:null,error:new P.default(O.default.KEY_SESSION_CREATED_ERROR_CODE,O.default.KEY_SESSION_CREATED_ERROR_MESSAGE+"Selected key system is "+(R?R.systemString:null)+". needkey/encrypted event contains no initData corresponding to that key system!")})}function _(e,t){i(),T.loadKeySession(e,t,m(R))}function a(e){i(),e?(T.setMediaElement(e),S.on(A.NEED_KEY,M,this)):null===e&&(T.setMediaElement(e),S.off(A.NEED_KEY,M,this))}function b(e){var t=null;if(e){var n=e.systemString;h&&(t=n in h?h[n]:null)}return t}function E(e){var t=b(e),n=[],r=[],i=t&&t.audioRobustness&&0<t.audioRobustness.length?t.audioRobustness:p,a=t&&t.videoRobustness&&0<t.videoRobustness.length?t.videoRobustness:p,o=m(e),s=t&&t.distinctiveIdentifier?t.distinctiveIdentifier:"optional",u=t&&t.persistentState?t.persistentState:"temporary"===o?"optional":"required";return c.forEach(function(e){e.type===l.AUDIO?n.push(new w.default(e.codec,i)):e.type===l.VIDEO&&r.push(new w.default(e.codec,a))}),new N.default(n,r,s,u,[o])}function m(e){var t=b(e);return t&&t.sessionType?t.sessionType:r}function u(n,s){var u=this,t=[];n=n.sort(function(e,t){return(h&&h[e.ks.systemString]&&0<=h[e.ks.systemString].priority?h[e.ks.systemString].priority:n.length)-(h&&h[t.ks.systemString]&&0<=h[t.ks.systemString].priority?h[t.ks.systemString].priority:n.length)});var l=void 0;if(R)for(l=0;l<n.length;l++){if(R===n[l].ks)if("break"===function(){t.push({ks:n[l].ks,configs:[E(R)]});return S.on(A.KEY_SYSTEM_ACCESS_COMPLETE,function e(t){S.off(A.KEY_SYSTEM_ACCESS_COMPLETE,e,u),t.error?s||S.trigger(A.KEY_SYSTEM_SELECTED,{error:new P.default(O.default.KEY_SYSTEM_ACCESS_DENIED_ERROR_CODE,O.default.KEY_SYSTEM_ACCESS_DENIED_ERROR_MESSAGE+t.error)}):(I.info("DRM: KeySystem Access Granted"),S.trigger(A.KEY_SYSTEM_SELECTED,{data:t.data}),n[l].sessionId?_(n[l].sessionId,n[l].initData):n[l].initData&&g(n[l].initData,n[l].cdmData))},u),T.requestKeySystemAccess(t),"break"}())break}else if(void 0===R){var r;!function(){R=null,d.push(n);for(var e=0;e<n.length;e++)t.push({ks:n[e].ks,configs:[E(n[e].ks)]});function a(e){S.off(A.KEY_SYSTEM_ACCESS_COMPLETE,a,u),e.error?(R=void 0,S.off(A.INTERNAL_KEY_SYSTEM_SELECTED,r,u),s||S.trigger(A.KEY_SYSTEM_SELECTED,{data:null,error:new P.default(O.default.KEY_SYSTEM_ACCESS_DENIED_ERROR_CODE,O.default.KEY_SYSTEM_ACCESS_DENIED_ERROR_MESSAGE+e.error)})):(o=e.data,I.info("DRM: KeySystem Access Granted ("+o.keySystem.systemString+")! Selecting key system..."),T.selectKeySystem(o))}var o=void 0;r=function e(t){if(S.off(A.INTERNAL_KEY_SYSTEM_SELECTED,e,u),S.off(A.KEY_SYSTEM_ACCESS_COMPLETE,a,u),t.error)R=void 0,s||S.trigger(A.KEY_SYSTEM_SELECTED,{data:null,error:new P.default(O.default.KEY_SYSTEM_ACCESS_DENIED_ERROR_CODE,O.default.KEY_SYSTEM_ACCESS_DENIED_ERROR_MESSAGE+"Error selecting key system! -- "+t.error)});else{if(!T)return;R=T.getKeySystem(),S.trigger(A.KEY_SYSTEM_SELECTED,{data:o});var n=b(R);n&&n.serverCertificate&&0<n.serverCertificate.length&&T.setServerCertificate(f.decodeArray(n.serverCertificate).buffer);for(var r=0;r<d.length;r++)for(l=0;l<d[r].length;l++)if(R===d[r][l].ks){if(y.isClearKey(R)&&n&&n.hasOwnProperty("clearkeys")){var i={kids:Object.keys(n.clearkeys)};d[r][l].initData=(new TextEncoder).encode(JSON.stringify(i))}d[r][l].sessionId?_(d[r][l].sessionId,d[r][l].initData):null!==d[r][l].initData&&g(d[r][l].initData,d[r][l].cdmData);break}}},S.on(A.INTERNAL_KEY_SYSTEM_SELECTED,r,u),S.on(A.KEY_SYSTEM_ACCESS_COMPLETE,a,u),T.requestKeySystemAccess(t)}()}else d.push(n)}function D(e,t){S.trigger(A.LICENSE_REQUEST_COMPLETE,{data:e,error:t})}function o(e){e.error?S.trigger(A.KEY_STATUSES_CHANGED,{data:null,error:e.error}):I.debug("DRM: key status = "+e.status)}function v(e){I.debug("DRM: onKeyMessage");var t=e.data;S.trigger(A.KEY_MESSAGE,{data:t});var n=t.messageType?t.messageType:"license-request",r=t.message,i=t.sessionToken,a=b(R),o=R?R.systemString:null,s=y.getLicenseServer(R,a,n),u={sessionToken:i,messageType:n};if(r&&0!==r.byteLength){if(!s)return I.debug("DRM: License server request not required for this message (type = "+e.data.messageType+"). Session ID = "+i.getSessionID()),void D(u);if(y.isClearKey(R)){var l=y.processClearKeyLicenseRequest(R,a,r);if(l)return I.debug("DRM: ClearKey license request handled by application!"),D(u),void T.updateKeySession(i,l)}var f=null;if(a&&a.serverURL){var d=a.serverURL;"string"==typeof d&&""!==d?f=d:"object"==typeof d&&d.hasOwnProperty(n)&&(f=d[n])}else f=a&&a.laURL&&""!==a.laURL?a.laURL:(f=R.getLicenseServerURLFromInitData(C.default.getPSSHData(i.initData)))||e.data.laURL;if(f=s.getServerURLFromMessage(f,r,n)){var c={},h=!1,p=function(e){if(e)for(var t in e)"authorization"===t.toLowerCase()&&(h=!0),c[t]=e[t]};a&&p(a.httpRequestHeaders),p(R.getRequestHeadersFromMessage(r)),a&&"boolean"==typeof a.withCredentials&&(h=a.withCredentials);var g=function(e,t,n,r){var i=e.response?s.getErrorResponse(e.response,n,r):"NONE";D(t,new P.default(O.default.MEDIA_KEY_MESSAGE_LICENSER_ERROR_CODE,O.default.MEDIA_KEY_MESSAGE_LICENSER_ERROR_MESSAGE+n+' update, XHR complete. status is "'+e.statusText+'" ('+e.status+"), readyState is "+e.readyState+". Response is "+i))},_=R.getLicenseRequestFromMessage(r),E=s.getHTTPMethod(n),m=s.getResponseType(o,n),v=a&&!isNaN(a.httpTimeout)?a.httpTimeout:8e3;!function e(t,n,r,i,a,o,s,u,l,f,d){var c=new XMLHttpRequest;c.open(r,t,!0);c.responseType=i;c.withCredentials=a;0<u&&(c.timeout=u);for(var h in n)c.setRequestHeader(h,n[h]);var p=function(){s--,setTimeout(function(){e(t,n,r,i,a,o,s,u,l,f,d)},1e3)};c.onload=function(){200===this.status||s<=0?l(this):(I.warn("License request failed ("+this.status+"). Retrying it... Pending retries: "+s),p())};c.ontimeout=c.onerror=function(){s<=0?d(this):(I.warn("License request network request failed . Retrying it... Pending retries: "+s),p())};c.onabort=function(){f(this)};c.send(o)}(f,c,E,m,h,_,3,v,function(e){if(T)if(200===e.status){var t=s.getLicenseMessage(e.response,o,n);null!==t?(D(u),T.updateKeySession(i,t)):g(e,u,o,n)}else g(e,u,o,n)},function(e){D(u,new P.default(O.default.MEDIA_KEY_MESSAGE_LICENSER_ERROR_CODE,O.default.MEDIA_KEY_MESSAGE_LICENSER_ERROR_MESSAGE+o+' update, XHR aborted. status is "'+e.statusText+'" ('+e.status+"), readyState is "+e.readyState))},function(e){D(u,new P.default(O.default.MEDIA_KEY_MESSAGE_LICENSER_ERROR_CODE,O.default.MEDIA_KEY_MESSAGE_LICENSER_ERROR_MESSAGE+o+' update, XHR error. status is "'+e.statusText+'" ('+e.status+"), readyState is "+e.readyState))})}else D(u,new P.default(O.default.MEDIA_KEY_MESSAGE_NO_LICENSE_SERVER_URL_ERROR_CODE,O.default.MEDIA_KEY_MESSAGE_NO_LICENSE_SERVER_URL_ERROR_MESSAGE))}else D(u,new P.default(O.default.MEDIA_KEY_MESSAGE_NO_CHALLENGE_ERROR_CODE,O.default.MEDIA_KEY_MESSAGE_NO_CHALLENGE_ERROR_MESSAGE))}function M(e,t){if(I.debug("DRM: onNeedKey"),"cenc"===e.key.initDataType)if(0===c.length&&(I.warn("DRM: onNeedKey called before initializeForMedia, wait until initialized"),(t=void 0===t?1:t+1)<5))s.push(setTimeout(function(){M(e,t)},500));else{var n=e.key.initData;if(ArrayBuffer.isView(n)&&(n=n.buffer),R){var r=C.default.getPSSHForKeySystem(R,n);if(r)for(var i=T.getAllInitData(),a=0;a<i.length;a++)if(y.initDataEquals(r,i[a]))return void I.warn("DRM: Ignoring initData because we have already seen it!")}I.debug("DRM: initData:",String.fromCharCode.apply(null,new Uint8Array(n)));var o=y.getSupportedKeySystems(n,h);0!==o.length?u(o,!1):I.debug("DRM: Received needkey event with initData, but we don't support any of the key systems!")}else I.warn("DRM: Only 'cenc' initData is supported! Ignoring initData of type: "+e.key.initDataType)}return t={initializeForMedia:function(e){if(!e)throw new Error("mediaInfo can not be null or undefined");i(),S.on(A.INTERNAL_KEY_MESSAGE,v,this),S.on(A.INTERNAL_KEY_STATUS_CHANGED,o,this),c.push(e);var t=y.getSupportedKeySystemsFromContentProtection(e.contentProtection);t&&0<t.length&&u(t,!0)},createKeySession:g,loadKeySession:_,removeKeySession:function(e){i(),T.removeKeySession(e)},closeKeySession:function(e){i(),T.closeKeySession(e)},setServerCertificate:function(e){i(),T.setServerCertificate(e)},setMediaElement:a,setSessionType:function(e){r=e},setRobustnessLevel:function(e){p=e},setProtectionData:function(e){h=e,y.setProtectionData(e)},getSupportedKeySystemsFromContentProtection:function(e){return i(),y.getSupportedKeySystemsFromContentProtection(e)},getKeySystems:function(){return y?y.getKeySystems():[]},setKeySystems:function(e){y&&y.setKeySystems(e)},stop:function(){T&&T.stop()},reset:function(){i(),S.off(A.INTERNAL_KEY_MESSAGE,v,this),S.off(A.INTERNAL_KEY_STATUS_CHANGED,o,this),a(null),R=void 0,T&&(T.reset(),T=null),s.forEach(function(e){return clearTimeout(e)}),s=[],c=[]}},I=n.getLogger(t),d=[],c=[],r="temporary",p="",t}i.__dashjs_factory_name="ProtectionController",n.default=dashjs.FactoryMaker.getClassFactory(i),t.exports=n.default},{160:160,169:169,181:181,182:182,226:226}],164:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var l=r(e(160)),f=r(e(165)),d=r(e(167)),c=r(e(168)),h=r(e(166)),p=r(e(174)),g=r(e(175)),_=r(e(176)),E=r(e(173)),m=r(e(110));function i(){var i=this.context,t=void 0,n=void 0,r=void 0,u=void 0,a=void 0,o=void 0,s=void 0;return t={initialize:function(){u=[];var e=void 0;e=(0,h.default)(i).getInstance({BASE64:a}),u.push(e),e=(0,c.default)(i).getInstance({BASE64:a}),u.push(e),e=(0,f.default)(i).getInstance({BASE64:a}),u.push(e),o=e,e=(0,d.default)(i).getInstance({BASE64:a,debug:n}),u.push(e),s=e},setProtectionData:function(e){for(var t,n,r=0;r<u.length;r++){var i=u[r];i.hasOwnProperty("init")&&i.init((t=i.systemString,n=void 0,n=null,e&&(n=t in e?e[t]:null),n))}},isClearKey:function(e){return e===o||e===s},initDataEquals:function(e,t){if(e.byteLength!==t.byteLength)return!1;for(var n=new Uint8Array(e),r=new Uint8Array(t),i=0;i<n.length;i++)if(n[i]!==r[i])return!1;return!0},getKeySystems:function(){return u},setKeySystems:function(e){u=e},getKeySystemBySystemString:function(e){for(var t=0;t<u.length;t++)if(u[t].systemString===e)return u[t];return null},getSupportedKeySystemsFromContentProtection:function(e){var t=void 0,n=void 0,r=void 0,i=void 0,a=[];if(e)for(r=0;r<u.length;++r)for(n=u[r],i=0;i<e.length;++i)if((t=e[i]).schemeIdUri.toLowerCase()===n.schemeIdURI){var o=n.getInitData(t);a.push({ks:u[r],initData:o,cdmData:n.getCDMData(),sessionId:n.getSessionId(t)})}return a},getSupportedKeySystems:function(e,t){for(var n=[],r=l.default.parsePSSHList(e),i=void 0,a=void 0,o=void 0,s=0;s<u.length;++s)a=(i=u[s]).systemString,o=!t||a in t,i.uuid in r&&o&&n.push({ks:i,initData:r[i.uuid],cdmData:i.getCDMData(),sessionId:i.getSessionId()});return n},getLicenseServer:function(e,t,n){if("license-release"===n||"individualization-request"===n)return null;var r=null;return t&&t.hasOwnProperty("drmtoday")?r=(0,p.default)(i).getInstance({BASE64:a}):e.systemString===m.default.WIDEVINE_KEYSTEM_STRING?r=(0,_.default)(i).getInstance():e.systemString===m.default.PLAYREADY_KEYSTEM_STRING?r=(0,g.default)(i).getInstance():e.systemString===m.default.CLEARKEY_KEYSTEM_STRING&&(r=(0,E.default)(i).getInstance()),r},processClearKeyLicenseRequest:function(e,t,n){try{return e.getClearKeysFromProtectionData(t,n)}catch(e){return r.error("Failed to retrieve clearkeys from ProtectionData"),null}},setConfig:function(e){e&&(e.debug&&(n=e.debug,r=n.getLogger(t)),e.BASE64&&(a=e.BASE64))}}}i.__dashjs_factory_name="ProtectionKeyController",n.default=dashjs.FactoryMaker.getSingletonFactory(i),t.exports=n.default},{110:110,160:160,165:165,166:166,167:167,168:168,173:173,174:174,175:175,176:176}],165:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var u=r(e(179)),l=r(e(177)),i=r(e(160)),a=r(e(110)),o="e2719d58-a985-b3c9-781a-b030af78d30e",s=a.default.CLEARKEY_KEYSTEM_STRING;function f(e){var t=(e=e||{}).BASE64;return{uuid:o,schemeIdURI:"urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e",systemString:s,getInitData:function(e){return i.default.parseInitDataFromContentProtection(e,t)},getRequestHeadersFromMessage:function(){return null},getLicenseRequestFromMessage:function(e){return new Uint8Array(e)},getLicenseServerURLFromInitData:function(){return null},getCDMData:function(){return null},getSessionId:function(){return null},getClearKeysFromProtectionData:function(e,t){var n=null;if(e){for(var r=JSON.parse(String.fromCharCode.apply(null,new Uint8Array(t))),i=[],a=0;a<r.kids.length;a++){var o=r.kids[a],s=e.clearkeys&&e.clearkeys.hasOwnProperty(o)?e.clearkeys[o]:null;if(!s)throw new Error("DRM: ClearKey keyID ("+o+") is not known!");i.push(new u.default(o,s))}n=new l.default(i)}return n}}}f.__dashjs_factory_name="KeySystemClearKey",n.default=dashjs.FactoryMaker.getSingletonFactory(f),t.exports=n.default},{110:110,160:160,177:177,179:179}],166:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var c=r(e(160)),i=r(e(110)),a="9a04f079-9840-4286-ab92-e65be0885f95",o=i.default.PLAYREADY_KEYSTEM_STRING,s=void 0;function u(e){var l="utf-16",f=(e=e||{}).BASE64;function d(){if(!f||!f.hasOwnProperty("decodeArray")||!f.hasOwnProperty("decodeArray"))throw new Error("Missing config parameter(s)")}return{uuid:a,schemeIdURI:"urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95",systemString:o,getInitData:function(e){var t,n,r,i=new Uint8Array([112,115,115,104,0,0,0,0]),a=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]),o=0,s=null,u=void 0,l=void 0;if(d(),!e)return null;if("pssh"in e)return c.default.parseInitDataFromContentProtection(e,f);if("pro"in e)s=f.decodeArray(e.pro.__text);else{if(!("prheader"in e))return null;s=f.decodeArray(e.prheader.__text)}return t=s.length,n=4+i.length+a.length+4+t,r=new ArrayBuffer(n),u=new Uint8Array(r),(l=new DataView(r)).setUint32(o,n),o+=4,u.set(i,o),o+=i.length,u.set(a,o),o+=a.length,l.setUint32(o,t),o+=4,u.set(s,o),o+=t,u.buffer},getRequestHeadersFromMessage:function(e){var t,n=void 0,r={},i=new DOMParser,a=new("utf-16"===l?Uint16Array:Uint8Array)(e);t=String.fromCharCode.apply(null,a);for(var o=(n=i.parseFromString(t,"application/xml")).getElementsByTagName("name"),s=n.getElementsByTagName("value"),u=0;u<o.length;u++)r[o[u].childNodes[0].nodeValue]=s[u].childNodes[0].nodeValue;return r.hasOwnProperty("Content")&&(r["Content-Type"]=r.Content,delete r.Content),r.hasOwnProperty("Content-Type")||(r["Content-Type"]="text/xml; charset=utf-8"),r},getLicenseRequestFromMessage:function(e){var t=null,n=new DOMParser,r=new("utf-16"===l?Uint16Array:Uint8Array)(e);d();var i=String.fromCharCode.apply(null,r),a=n.parseFromString(i,"application/xml");if(!a.getElementsByTagName("PlayReadyKeyMessage")[0])return e;var o=a.getElementsByTagName("Challenge")[0].childNodes[0].nodeValue;return o&&(t=f.decode(o)),t},getLicenseServerURLFromInitData:function(e){if(e)for(var t=new DataView(e),n=t.getUint16(4,!0),r=6,i=new DOMParser,a=0;a<n;a++){var o=t.getUint16(r,!0);r+=2;var s=t.getUint16(r,!0);if(r+=2,1===o){var u=e.slice(r,r+s),l=String.fromCharCode.apply(null,new Uint16Array(u)),f=i.parseFromString(l,"application/xml");if(f.getElementsByTagName("LA_URL")[0]){var d=f.getElementsByTagName("LA_URL")[0].childNodes[0].nodeValue;if(d)return d}if(f.getElementsByTagName("LUI_URL")[0]){var c=f.getElementsByTagName("LUI_URL")[0].childNodes[0].nodeValue;if(c)return c}}else r+=s}return null},getCDMData:function(){var e=void 0,t=void 0,n=void 0,r=void 0;if(d(),s&&s.cdmData){for(e=[],r=0;r<s.cdmData.length;++r)e.push(s.cdmData.charCodeAt(r)),e.push(0);for(e=String.fromCharCode.apply(null,e),e=f.encode(e),t='<PlayReadyCDMData type="LicenseAcquisition"><LicenseAcquisition version="1.0" Proactive="false"><CustomData encoding="base64encoded">%CUSTOMDATA%</CustomData></LicenseAcquisition></PlayReadyCDMData>'.replace("%CUSTOMDATA%",e),n=[],r=0;r<t.length;++r)n.push(t.charCodeAt(r)),n.push(0);return new Uint8Array(n).buffer}return null},getSessionId:function(e){return s&&s.sessionId?s.sessionId:e&&e.sessionId?e.sessionId:null},setPlayReadyMessageFormat:function(e){if("utf-8"!==e&&"utf-16"!==e)throw new Error('Specified message format is not one of "utf-8" or "utf-16"');l=e},init:function(e){e&&(s=e)}}}u.__dashjs_factory_name="KeySystemPlayReady",n.default=dashjs.FactoryMaker.getSingletonFactory(u),t.exports=n.default},{110:110,160:160}],167:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var l=r(e(179)),f=r(e(177)),i=r(e(160)),a=r(e(110)),o="1077efec-c0b2-4d02-ace3-3c1e52e2fb4b",s=a.default.CLEARKEY_KEYSTEM_STRING;function u(e){var t=void 0,n=e.BASE64,u=e.debug.getLogger(t);return t={uuid:o,schemeIdURI:"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b",systemString:s,getInitData:function(e){return i.default.parseInitDataFromContentProtection(e,n)},getRequestHeadersFromMessage:function(){return null},getLicenseRequestFromMessage:function(e){return new Uint8Array(e)},getLicenseServerURLFromInitData:function(){return null},getCDMData:function(){return null},getSessionId:function(){return null},getClearKeysFromProtectionData:function(e,t){var n=null;if(e){for(var r=JSON.parse(String.fromCharCode.apply(null,new Uint8Array(t))),i=[],a=0;a<r.kids.length;a++){var o=r.kids[a],s=e.clearkeys&&e.clearkeys.hasOwnProperty(o)?e.clearkeys[o]:null;if(!s)throw new Error("DRM: ClearKey keyID ("+o+") is not known!");i.push(new l.default(o,s))}n=new f.default(i),u.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 n}}}u.__dashjs_factory_name="KeySystemW3CClearKey",n.default=dashjs.FactoryMaker.getSingletonFactory(u),t.exports=n.default},{110:110,160:160,177:177,179:179}],168:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var i=r(e(160)),a=r(e(110)),o="edef8ba9-79d6-4ace-a3c8-27dcd51d21ed",s=a.default.WIDEVINE_KEYSTEM_STRING;function u(e){var t=null,n=(e=e||{}).BASE64;return{uuid:o,schemeIdURI:"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed",systemString:s,init:function(e){e&&(t=e)},getInitData:function(e){return i.default.parseInitDataFromContentProtection(e,n)},getRequestHeadersFromMessage:function(){return null},getLicenseRequestFromMessage:function(e){return new Uint8Array(e)},getLicenseServerURLFromInitData:function(){return null},getCDMData:function(){return null},getSessionId:function(e){return t&&t.sessionId?t.sessionId:e&&e.sessionId?e.sessionId:null}}}u.__dashjs_factory_name="KeySystemWidevine",n.default=dashjs.FactoryMaker.getSingletonFactory(u),t.exports=n.default},{110:110,160:160}],169:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r,i=e(52);function a(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),function(e,t,n){for(var r=!0;r;){var i=e,a=t,o=n;r=!1,null===i&&(i=Function.prototype);var s=Object.getOwnPropertyDescriptor(i,a);if(void 0!==s){if("value"in s)return s.value;var u=s.get;if(void 0===u)return;return u.call(o)}var l=Object.getPrototypeOf(i);if(null===l)return;e=l,t=a,n=o,r=!0,s=l=void 0}}(Object.getPrototypeOf(a.prototype),"constructor",this).call(this),this.MEDIA_KEYERR_CODE=100,this.MEDIA_KEYERR_UNKNOWN_CODE=101,this.MEDIA_KEYERR_CLIENT_CODE=102,this.MEDIA_KEYERR_SERVICE_CODE=103,this.MEDIA_KEYERR_OUTPUT_CODE=104,this.MEDIA_KEYERR_HARDWARECHANGE_CODE=105,this.MEDIA_KEYERR_DOMAIN_CODE=106,this.MEDIA_KEY_MESSAGE_ERROR_CODE=107,this.MEDIA_KEY_MESSAGE_NO_CHALLENGE_ERROR_CODE=108,this.SERVER_CERTIFICATE_UPDATED_ERROR_CODE=109,this.KEY_STATUS_CHANGED_EXPIRED_ERROR_CODE=110,this.MEDIA_KEY_MESSAGE_NO_LICENSE_SERVER_URL_ERROR_CODE=111,this.KEY_SYSTEM_ACCESS_DENIED_ERROR_CODE=112,this.KEY_SESSION_CREATED_ERROR_CODE=113,this.MEDIA_KEY_MESSAGE_LICENSER_ERROR_CODE=114,this.MEDIA_KEYERR_UNKNOWN_MESSAGE="An unspecified error occurred. This value is used for errors that don't match any of the other codes.",this.MEDIA_KEYERR_CLIENT_MESSAGE="The Key System could not be installed or updated.",this.MEDIA_KEYERR_SERVICE_MESSAGE="The message passed into update indicated an error from the license service.",this.MEDIA_KEYERR_OUTPUT_MESSAGE="There is no available output device with the required characteristics for the content protection system.",this.MEDIA_KEYERR_HARDWARECHANGE_MESSAGE="A hardware configuration change caused a content protection error.",this.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.",this.MEDIA_KEY_MESSAGE_ERROR_MESSAGE="Multiple key sessions were creates with a user-agent that does not support sessionIDs!! Unpredictable behavior ahead!",this.MEDIA_KEY_MESSAGE_NO_CHALLENGE_ERROR_MESSAGE="DRM: Empty key message from CDM",this.SERVER_CERTIFICATE_UPDATED_ERROR_MESSAGE="Error updating server certificate -- ",this.KEY_STATUS_CHANGED_EXPIRED_ERROR_MESSAGE="DRM: KeyStatusChange error! -- License has expired",this.MEDIA_KEY_MESSAGE_NO_LICENSE_SERVER_URL_ERROR_MESSAGE="DRM: No license server URL specified!",this.KEY_SYSTEM_ACCESS_DENIED_ERROR_MESSAGE="DRM: KeySystem Access Denied! -- ",this.KEY_SESSION_CREATED_ERROR_MESSAGE="DRM: unable to create session! --",this.MEDIA_KEY_MESSAGE_LICENSER_ERROR_MESSAGE="DRM: licenser error! --"}var o=new(function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(a,((r=i)&&r.__esModule?r:{default:r}).default),a);n.default=o,t.exports=n.default},{52:52}],170:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var y=r(e(164)),T=r(e(183)),S=r(e(226)),A=r(e(178)),I=r(e(181)),R=r(e(180)),b=r(e(169));function i(e){e=e||{};var t=this.context,c=e.eventBus,h=e.events,n=e.debug,o=e.api,s=e.errHandler,r=void 0,u=void 0,p=void 0,i=void 0,g=void 0,l=void 0,f=void 0,d=void 0,a=void 0;function _(){p&&v();for(var e=0;e<f.length;e++)E(f[e]);c.trigger(h.TEARDOWN_COMPLETE)}function E(t){try{p[o.cancelKeyRequest](i.systemString,t.sessionID)}catch(e){c.trigger(h.KEY_SESSION_CLOSED,{data:null,error:"Error closing session ("+t.sessionID+") "+e.message})}}function m(e,t){if(t&&e){for(var n=e.length,r=0;r<n;r++)if(e[r].sessionID==t)return e[r];return null}return null}function v(){p.removeEventListener(o.keyerror,a),p.removeEventListener(o.needkey,a),p.removeEventListener(o.keymessage,a),p.removeEventListener(o.keyadded,a)}return r={getAllInitData:function(){for(var e=[],t=0;t<l.length;t++)e.push(l[t].initData);for(t=0;t<f.length;t++)e.push(f[t].initData);return e},requestKeySystemAccess:function(e){var t=p;t=t||document.createElement("video");for(var n=!1,r=0;r<e.length;r++)for(var i=e[r].ks.systemString,a=e[r].configs,o=null,s=0;s<a.length;s++){var u=a[s].videoCapabilities;if(u&&0!==u.length){o=[];for(var l=0;l<u.length;l++)""!==t.canPlayType(u[l].contentType,i)&&o.push(u[l])}if(o&&(!o||0!==o.length)){n=!0;var f=new I.default(null,o),d=g.getKeySystemBySystemString(i);c.trigger(h.KEY_SYSTEM_ACCESS_COMPLETE,{data:new R.default(d,f)});break}}n||c.trigger(h.KEY_SYSTEM_ACCESS_COMPLETE,{error:"Key system access denied! -- No valid audio/video content configurations detected!"})},getKeySystem:function(){return i},selectKeySystem:function(e){i=e.keySystem,c.trigger(h.INTERNAL_KEY_SYSTEM_SELECTED)},setMediaElement:function(e){if(p!==e){if(p){v();for(var t=0;t<f.length;t++)E(f[t]);f=[]}(p=e)&&(p.addEventListener(o.keyerror,a),p.addEventListener(o.needkey,a),p.addEventListener(o.keymessage,a),p.addEventListener(o.keyadded,a),c.trigger(h.VIDEO_ELEMENT_SELECTED))}},createKeySession:function(e){if(!i)throw new Error("Can not create sessions until you have selected a key system");if(d||0===f.length){var t={sessionID:null,initData:e,getSessionID:function(){return this.sessionID},getExpirationTime:function(){return NaN},getSessionType:function(){return"temporary"}};return l.push(t),p[o.generateKeyRequest](i.systemString,new Uint8Array(e)),t}throw new Error("Multiple sessions not allowed!")},updateKeySession:function(e,t){var n=e.sessionID;if(g.isClearKey(i))for(var r=0;r<t.keyPairs.length;r++)p[o.addKey](i.systemString,t.keyPairs[r].key,t.keyPairs[r].keyID,n);else p[o.addKey](i.systemString,new Uint8Array(t),new Uint8Array(e.initData),n)},closeKeySession:E,setServerCertificate:function(){},loadKeySession:function(){},removeKeySession:function(){},stop:_,reset:_},u=n.getLogger(r),l=[],f=[],g=(i=p=null,y.default)(t).getInstance(),a={handleEvent:function(e){var t=null;switch(e.type){case o.needkey:var n=ArrayBuffer.isView(e.initData)?e.initData.buffer:e.initData;c.trigger(h.NEED_KEY,{key:new T.default(n,"cenc")});break;case o.keyerror:if(t=(t=m(f,e.sessionId))||m(l,e.sessionId)){var r=b.default.MEDIA_KEYERR_CODE,i="";switch(e.errorCode.code){case 1:r=b.default.MEDIA_KEYERR_UNKNOWN_CODE,i+="MEDIA_KEYERR_UNKNOWN - "+b.default.MEDIA_KEYERR_UNKNOWN_MESSAGE;break;case 2:r=b.default.MEDIA_KEYERR_CLIENT_CODE,i+="MEDIA_KEYERR_CLIENT - "+b.default.MEDIA_KEYERR_CLIENT_MESSAGE;break;case 3:r=b.default.MEDIA_KEYERR_SERVICE_CODE,i+="MEDIA_KEYERR_SERVICE - "+b.default.MEDIA_KEYERR_SERVICE_MESSAGE;break;case 4:r=b.default.MEDIA_KEYERR_OUTPUT_CODE,i+="MEDIA_KEYERR_OUTPUT - "+b.default.MEDIA_KEYERR_OUTPUT_MESSAGE;break;case 5:r=b.default.MEDIA_KEYERR_HARDWARECHANGE_CODE,i+="MEDIA_KEYERR_HARDWARECHANGE - "+b.default.MEDIA_KEYERR_HARDWARECHANGE_MESSAGE;break;case 6:r=b.default.MEDIA_KEYERR_DOMAIN_CODE,i+="MEDIA_KEYERR_DOMAIN - "+b.default.MEDIA_KEYERR_DOMAIN_MESSAGE}i+=" System Code = "+e.systemCode,c.trigger(h.KEY_ERROR,{data:new S.default(r,i,t)})}else u.error("No session token found for key error");break;case o.keyadded:(t=(t=m(f,e.sessionId))||m(l,e.sessionId))?(u.debug("DRM: Key added."),c.trigger(h.KEY_ADDED,{data:t})):u.debug("No session token found for key added");break;case o.keymessage:if((d=null!==e.sessionId&&void 0!==e.sessionId)?!(t=m(f,e.sessionId))&&0<l.length&&(t=l.shift(),f.push(t),t.sessionID=e.sessionId,c.trigger(h.KEY_SESSION_CREATED,{data:t})):0<l.length&&(t=l.shift(),f.push(t),0!==l.length&&s.error(new S.default(b.default.MEDIA_KEY_MESSAGE_ERROR_CODE,b.default.MEDIA_KEY_MESSAGE_ERROR_MESSAGE))),t){var a=ArrayBuffer.isView(e.message)?e.message.buffer:e.message;t.keyMessage=a,c.trigger(h.INTERNAL_KEY_MESSAGE,{data:new A.default(t,a,e.defaultURL)})}else u.warn("No session token found for key message")}}},r}i.__dashjs_factory_name="ProtectionModel_01b",n.default=dashjs.FactoryMaker.getClassFactory(i),t.exports=n.default},{164:164,169:169,178:178,180:180,181:181,183:183,226:226}],171:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var E=r(e(164)),m=r(e(183)),v=r(e(169)),y=r(e(226)),T=r(e(178)),S=r(e(180)),A=r(e(110));function i(e){e=e||{};var t=this.context,o=e.eventBus,s=e.events,n=e.debug,r=void 0,u=void 0,l=void 0,i=void 0,f=void 0,d=void 0,a=void 0,c=void 0;function h(e){var t=e.session;return t.removeEventListener("keystatuseschange",e),t.removeEventListener("message",e),t.close()}function p(e){for(var t=0;t<d.length;t++)if(d[t]===e){d.splice(t,1);break}}function g(e){var t=void 0,n=void 0;return e&&0<e.length&&(e[0]&&("string"==typeof e[0]?t=e[0]:n=e[0]),e[1]&&("string"==typeof e[1]?t=e[1]:n=e[1])),{status:t,keyId:n}}function _(t,e,n,r){var i={session:t,initData:e,sessionId:r,handleEvent:function(e){switch(e.type){case"keystatuseschange":o.trigger(s.KEY_STATUSES_CHANGED,{data:this}),e.target.keyStatuses.forEach(function(){var e=g(arguments);switch(e.status){case"expired":o.trigger(s.INTERNAL_KEY_STATUS_CHANGED,{error:new y.default(v.default.KEY_STATUS_CHANGED_EXPIRED_ERROR_CODE,v.default.KEY_STATUS_CHANGED_EXPIRED_ERROR_MESSAGE)});break;default:o.trigger(s.INTERNAL_KEY_STATUS_CHANGED,e)}});break;case"message":var t=ArrayBuffer.isView(e.message)?e.message.buffer:e.message;o.trigger(s.INTERNAL_KEY_MESSAGE,{data:new T.default(this,t,void 0,e.messageType)})}},getSessionID:function(){return t.sessionId},getExpirationTime:function(){return t.expiration},getKeyStatuses:function(){return t.keyStatuses},getUsable:function(){var e=!1;return t.keyStatuses.forEach(function(){"usable"===g(arguments).status&&(e=!0)}),e},getSessionType:function(){return n}};return t.addEventListener("keystatuseschange",i),t.addEventListener("message",i),t.closed.then(function(){p(i),u.debug("DRM: Session closed. SessionID = "+i.getSessionID()),o.trigger(s.KEY_SESSION_CLOSED,{data:i.getSessionID()})}),d.push(i),i}return r={getAllInitData:function(){for(var e=[],t=0;t<d.length;t++)d[t].initData&&e.push(d[t].initData);return e},requestKeySystemAccess:function(e){!function i(a,e){if(void 0===navigator.requestMediaKeySystemAccess||"function"!=typeof navigator.requestMediaKeySystemAccess)return void o.trigger(s.KEY_SYSTEM_ACCESS_COMPLETE,{error:"Insecure origins are not allowed"});!function(t){var r=a[t].ks,e=a[t].configs,n=r.systemString;n===A.default.PLAYREADY_KEYSTEM_STRING&&"required"===e[0].persistentState&&(n+=".recommendation"),navigator.requestMediaKeySystemAccess(n,e).then(function(e){var t="function"==typeof e.getConfiguration?e.getConfiguration():null,n=new S.default(r,t);n.mksa=e,o.trigger(s.KEY_SYSTEM_ACCESS_COMPLETE,{data:n})}).catch(function(e){++t<a.length?i(a,t):o.trigger(s.KEY_SYSTEM_ACCESS_COMPLETE,{error:"Key system access denied! "+e.message})})}(e)}(e,0)},getKeySystem:function(){return l},selectKeySystem:function(t){t.mksa.createMediaKeys().then(function(e){l=t.keySystem,f=e,i?i.setMediaKeys(f).then(function(){o.trigger(s.INTERNAL_KEY_SYSTEM_SELECTED)}):o.trigger(s.INTERNAL_KEY_SYSTEM_SELECTED)}).catch(function(){o.trigger(s.INTERNAL_KEY_SYSTEM_SELECTED,{error:"Error selecting keys system ("+t.keySystem.systemString+")! Could not create MediaKeys -- TODO"})})},setMediaElement:function(e){i!==e&&(i&&(i.removeEventListener("encrypted",a),i.setMediaKeys&&i.setMediaKeys(null)),(i=e)&&(i.addEventListener("encrypted",a),i.setMediaKeys&&f&&i.setMediaKeys(f)))},setServerCertificate:function(e){if(!l||!f)throw new Error("Can not set server certificate until you have selected a key system");f.setServerCertificate(e).then(function(){u.info("DRM: License server certificate successfully updated."),o.trigger(s.SERVER_CERTIFICATE_UPDATED)}).catch(function(e){o.trigger(s.SERVER_CERTIFICATE_UPDATED,{error:new y.default(v.default.SERVER_CERTIFICATE_UPDATED_ERROR_CODE,v.default.SERVER_CERTIFICATE_UPDATED_ERROR_MESSAGE+e.name)})})},createKeySession:function(e,t,n){if(!l||!f)throw new Error("Can not create sessions until you have selected a key system");var r=f.createSession(n),i=_(r,e,n),a=this.getKeySystem().systemString===A.default.CLEARKEY_KEYSTEM_STRING&&t&&t.clearkeys?"keyids":"cenc";r.generateRequest(a,e).then(function(){u.debug("DRM: Session created. SessionID = "+i.getSessionID()),o.trigger(s.KEY_SESSION_CREATED,{data:i})}).catch(function(e){p(i),o.trigger(s.KEY_SESSION_CREATED,{data:null,error:new y.default(v.default.KEY_SESSION_CREATED_ERROR_CODE,v.default.KEY_SESSION_CREATED_ERROR_MESSAGE+"Error generating key request -- "+e.name)})})},updateKeySession:function(t,e){var n=t.session;c.isClearKey(l)&&(e=e.toJWK()),n.update(e).catch(function(e){o.trigger(s.KEY_ERROR,{data:new y.default(v.default.MEDIA_KEYERR_CODE,"Error sending update() message! "+e.name,t)})})},loadKeySession:function(t,e,n){if(!l||!f)throw new Error("Can not load sessions until you have selected a key system");for(var r=0;r<d.length;r++)if(t===d[r].sessionId)return void u.warn("DRM: Ignoring session ID because we have already seen it!");var i=f.createSession(n),a=_(i,e,n,t);i.load(t).then(function(e){e?(u.debug("DRM: Session loaded. SessionID = "+a.getSessionID()),o.trigger(s.KEY_SESSION_CREATED,{data:a})):(p(a),o.trigger(s.KEY_SESSION_CREATED,{data:null,error:new y.default(v.default.KEY_SESSION_CREATED_ERROR_CODE,v.default.KEY_SESSION_CREATED_ERROR_MESSAGE+"Could not load session! Invalid Session ID ("+t+")")}))}).catch(function(e){p(a),o.trigger(s.KEY_SESSION_CREATED,{data:null,error:new y.default(v.default.KEY_SESSION_CREATED_ERROR_CODE,v.default.KEY_SESSION_CREATED_ERROR_MESSAGE+"Could not load session ("+t+")! "+e.name)})})},removeKeySession:function(t){t.session.remove().then(function(){u.debug("DRM: Session removed. SessionID = "+t.getSessionID()),o.trigger(s.KEY_SESSION_REMOVED,{data:t.getSessionID()})},function(e){o.trigger(s.KEY_SESSION_REMOVED,{data:null,error:"Error removing session ("+t.getSessionID()+"). "+e.name})})},closeKeySession:function(t){h(t).catch(function(e){p(t),o.trigger(s.KEY_SESSION_CLOSED,{data:null,error:"Error closing session ("+t.getSessionID()+") "+e.name})})},stop:function(){for(var e=void 0,t=0;t<d.length;t++)(e=d[t]).getUsable()||h(e).catch(function(){p(e)})},reset:function(){var n=d.length,r=void 0;0!==n?function(){for(var t=function(e){p(e),0===d.length&&(i?(i.removeEventListener("encrypted",a),i.setMediaKeys(null).then(function(){o.trigger(s.TEARDOWN_COMPLETE)})):o.trigger(s.TEARDOWN_COMPLETE))},e=0;e<n;e++)!function(e){r.session.closed.then(function(){t(e)}),h(r).catch(function(){t(e)})}(r=d[e])}():o.trigger(s.TEARDOWN_COMPLETE)}},u=n.getLogger(r),d=[],c=(f=i=l=null,E.default)(t).getInstance(),a={handleEvent:function(e){switch(e.type){case"encrypted":if(e.initData){var t=ArrayBuffer.isView(e.initData)?e.initData.buffer:e.initData;o.trigger(s.NEED_KEY,{key:new m.default(t,e.initDataType)})}}}},r}i.__dashjs_factory_name="ProtectionModel_21Jan2015",n.default=dashjs.FactoryMaker.getClassFactory(i),t.exports=n.default},{110:110,164:164,169:169,178:178,180:180,183:183,226:226}],172:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var m=r(e(164)),v=r(e(183)),y=r(e(226)),T=r(e(169)),S=r(e(178)),A=r(e(181)),I=r(e(180));function i(e){e=e||{};var t=this.context,p=e.eventBus,g=e.events,n=e.debug,_=e.api,r=void 0,u=void 0,i=void 0,l=void 0,f=void 0,d=void 0,c=void 0,a=void 0,E=void 0;function o(){try{for(var e=0;e<c.length;e++)s(c[e]);i&&i.removeEventListener(_.needkey,a),p.trigger(g.TEARDOWN_COMPLETE)}catch(e){p.trigger(g.TEARDOWN_COMPLETE,{error:"Error tearing down key sessions and MediaKeys! -- "+e.message})}}function s(e){var t=e.session;t.removeEventListener(_.error,e),t.removeEventListener(_.message,e),t.removeEventListener(_.ready,e),t.removeEventListener(_.close,e);for(var n=0;n<c.length;n++)if(c[n]===e){c.splice(n,1);break}t[_.release]()}function h(){function e(){i.removeEventListener("loadedmetadata",t),i[_.setMediaKeys](f),p.trigger(g.VIDEO_ELEMENT_SELECTED)}var t=null;1<=i.readyState?e():(t=e.bind(this),i.addEventListener("loadedmetadata",t))}return r={getAllInitData:function(){for(var e=[],t=0;t<c.length;t++)e.push(c[t].initData);return e},requestKeySystemAccess:function(e){for(var t=!1,n=0;n<e.length;n++)for(var r=e[n].ks.systemString,i=e[n].configs,a=null,o=null,s=0;s<i.length;s++){var u=i[s].audioCapabilities,l=i[s].videoCapabilities;if(u&&0!==u.length){a=[];for(var f=0;f<u.length;f++)window[_.MediaKeys].isTypeSupported(r,u[f].contentType)&&a.push(u[f])}if(l&&0!==l.length){o=[];for(var d=0;d<l.length;d++)window[_.MediaKeys].isTypeSupported(r,l[d].contentType)&&o.push(l[d])}if(!(!a&&!o||a&&0===a.length||o&&0===o.length)){t=!0;var c=new A.default(a,o),h=E.getKeySystemBySystemString(r);p.trigger(g.KEY_SYSTEM_ACCESS_COMPLETE,{data:new I.default(h,c)});break}}t||p.trigger(g.KEY_SYSTEM_ACCESS_COMPLETE,{error:"Key system access denied! -- No valid audio/video content configurations detected!"})},getKeySystem:function(){return l},selectKeySystem:function(e){try{f=e.mediaKeys=new window[_.MediaKeys](e.keySystem.systemString),l=e.keySystem,d=e,i&&h(),p.trigger(g.INTERNAL_KEY_SYSTEM_SELECTED)}catch(e){p.trigger(g.INTERNAL_KEY_SYSTEM_SELECTED,{error:"Error selecting keys system ("+l.systemString+")! Could not create MediaKeys -- TODO"})}},setMediaElement:function(e){i!==e&&(i&&i.removeEventListener(_.needkey,a),(i=e)&&(i.addEventListener(_.needkey,a),f&&h()))},createKeySession:function(e,t,n,r){if(!l||!f||!d)throw new Error("Can not create sessions until you have selected a key system");var i=null;if(d.ksConfiguration.videoCapabilities&&0<d.ksConfiguration.videoCapabilities.length&&(i=d.ksConfiguration.videoCapabilities[0]),null===i&&d.ksConfiguration.audioCapabilities&&0<d.ksConfiguration.audioCapabilities.length&&(i=d.ksConfiguration.audioCapabilities[0]),null===i)throw new Error("Can not create sessions for unknown content types.");var a=i.contentType,o=f.createSession(a,new Uint8Array(e),r?new Uint8Array(r):null),s={session:o,initData:e,getSessionID:function(){return this.session.sessionId},getExpirationTime:function(){return NaN},getSessionType:function(){return"temporary"},handleEvent:function(e){switch(e.type){case _.error:p.trigger(g.KEY_ERROR,{data:new y.default(T.default.MEDIA_KEYERR_CODE,"KeyError",this)});break;case _.message:var t=ArrayBuffer.isView(e.message)?e.message.buffer:e.message;p.trigger(g.INTERNAL_KEY_MESSAGE,{data:new S.default(this,t,e.destinationURL)});break;case _.ready:u.debug("DRM: Key added."),p.trigger(g.KEY_ADDED);break;case _.close:u.debug("DRM: Session closed. SessionID = "+this.getSessionID()),p.trigger(g.KEY_SESSION_CLOSED,{data:this.getSessionID()})}}};o.addEventListener(_.error,s),o.addEventListener(_.message,s),o.addEventListener(_.ready,s),o.addEventListener(_.close,s),c.push(s),u.debug("DRM: Session created. SessionID = "+s.getSessionID()),p.trigger(g.KEY_SESSION_CREATED,{data:s})},updateKeySession:function(e,t){var n=e.session;E.isClearKey(l)?n.update(new Uint8Array(t.toJWK())):n.update(new Uint8Array(t))},closeKeySession:s,setServerCertificate:function(){},loadKeySession:function(){},removeKeySession:function(){},stop:o,reset:o},u=n.getLogger(r),c=[],E=(d=f=l=i=null,m.default)(t).getInstance(),a={handleEvent:function(e){switch(e.type){case _.needkey:if(e.initData){var t=ArrayBuffer.isView(e.initData)?e.initData.buffer:e.initData;p.trigger(g.NEED_KEY,{key:new v.default(t,"cenc")})}}}},r}i.__dashjs_factory_name="ProtectionModel_3Feb2014",n.default=dashjs.FactoryMaker.getClassFactory(i),t.exports=n.default},{164:164,169:169,178:178,180:180,181:181,183:183,226:226}],173:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var o=r(e(179)),s=r(e(177));function i(){return{getServerURLFromMessage:function(e,t){var n=JSON.parse(String.fromCharCode.apply(null,new Uint8Array(t)));e+="/?";for(var r=0;r<n.kids.length;r++)e+=n.kids[r]+"&";return e=e.substring(0,e.length-1)},getHTTPMethod:function(){return"GET"},getResponseType:function(){return"json"},getLicenseMessage:function(e){if(!e.hasOwnProperty("keys"))return null;for(var t=[],n=0;n<e.keys.length;n++){var r=e.keys[n],i=r.kid.replace(/=/g,""),a=r.k.replace(/=/g,"");t.push(new o.default(i,a))}return new s.default(t)},getErrorResponse:function(e){return String.fromCharCode.apply(null,new Uint8Array(e))}}}i.__dashjs_factory_name="ClearKey",n.default=dashjs.FactoryMaker.getSingletonFactory(i),t.exports=n.default},{177:177,179:179}],174:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r,i=e(110),a=(r=i)&&r.__esModule?r:{default:r};function o(e){var n=(e=e||{}).BASE64,r={};r[a.default.WIDEVINE_KEYSTEM_STRING]={responseType:"json",getLicenseMessage:function(e){return n.decodeArray(e.license)},getErrorResponse:function(e){return e}},r[a.default.PLAYREADY_KEYSTEM_STRING]={responseType:"arraybuffer",getLicenseMessage:function(e){return e},getErrorResponse:function(e){return String.fromCharCode.apply(null,new Uint8Array(e))}};return{getServerURLFromMessage:function(e){return e},getHTTPMethod:function(){return"POST"},getResponseType:function(e){return r[e].responseType},getLicenseMessage:function(e,t){return function(){if(!n||!n.hasOwnProperty("decodeArray"))throw new Error("Missing config parameter(s)")}(),r[t].getLicenseMessage(e)},getErrorResponse:function(e,t){return r[t].getErrorResponse(e)}}}o.__dashjs_factory_name="DRMToday",n.default=dashjs.FactoryMaker.getSingletonFactory(o),t.exports=n.default},{110:110}],175:[function(e,t,n){"use strict";function r(){var g="http://schemas.xmlsoap.org/soap/envelope/";function _(e){var t=String.fromCharCode.apply(null,new Uint8Array(e));return decodeURIComponent(escape(t))}return{getServerURLFromMessage:function(e){return e},getHTTPMethod:function(){return"POST"},getResponseType:function(){return"arraybuffer"},getLicenseMessage:function(e){return function(e){if(window.DOMParser){var t=_(e),n=(new window.DOMParser).parseFromString(t,"text/xml"),r=n?n.getElementsByTagNameNS(g,"Envelope")[0]:null,i=r?r.getElementsByTagNameNS(g,"Body")[0]:null;if(i?i.getElementsByTagNameNS(g,"Fault")[0]:null)return null}return e}.call(this,e)},getErrorResponse:function(e){return function(e){var t="",n="",r="",i=-1,a=-1;if(window.DOMParser){var o=_(e),s=(new window.DOMParser).parseFromString(o,"text/xml"),u=s?s.getElementsByTagNameNS(g,"Envelope")[0]:null,l=u?u.getElementsByTagNameNS(g,"Body")[0]:null,f=l?l.getElementsByTagNameNS(g,"Fault")[0]:null,d=f?f.getElementsByTagName("detail")[0]:null,c=d?d.getElementsByTagName("Exception")[0]:null,h=null;if(null===f)return o;t=(h=f.getElementsByTagName("faultstring")[0].firstChild)?h.nodeValue:null,null!==c&&(n=(h=c.getElementsByTagName("StatusCode")[0])?h.firstChild.nodeValue:null,i=(r=(h=c.getElementsByTagName("Message")[0])?h.firstChild.nodeValue:null)?r.lastIndexOf("[")+1:-1,a=r?r.indexOf("]"):-1,r=r?r.substring(i,a):"")}var p="code: "+n+", name: "+t;return r&&(p+=", message: "+r),p}.call(this,e)}}}Object.defineProperty(n,"__esModule",{value:!0}),r.__dashjs_factory_name="PlayReady",n.default=dashjs.FactoryMaker.getSingletonFactory(r),t.exports=n.default},{}],176:[function(e,t,n){"use strict";function r(){return{getServerURLFromMessage:function(e){return e},getHTTPMethod:function(){return"POST"},getResponseType:function(){return"arraybuffer"},getLicenseMessage:function(e){return e},getErrorResponse:function(e){return String.fromCharCode.apply(null,new Uint8Array(e))}}}Object.defineProperty(n,"__esModule",{value:!0}),r.__dashjs_factory_name="Widevine",n.default=dashjs.FactoryMaker.getSingletonFactory(r),t.exports=n.default},{}],177:[function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}Object.defineProperty(n,"__esModule",{value:!0});var i=(function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}(a,[{key:"toJWK",value:function(){var e=void 0,t=this.keyPairs.length,n={keys:[]};for(e=0;e<t;e++){var r={kty:"oct",alg:"A128KW",kid:this.keyPairs[e].keyID,k:this.keyPairs[e].key};n.keys.push(r)}this.type&&(n.type=this.type);var i=JSON.stringify(n),a=i.length,o=new ArrayBuffer(a),s=new Uint8Array(o);for(e=0;e<a;e++)s[e]=i.charCodeAt(e);return o}}]),a);function a(e,t){if(!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),t&&"persistent"!==t&&"temporary"!==t)throw new Error("Invalid ClearKey key set type! Must be one of 'persistent' or 'temporary'");this.keyPairs=e,this.type=t}n.default=i,t.exports=n.default},{}],178:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});n.default=function e(t,n,r,i){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.sessionToken=t,this.message=n,this.defaultURL=r,this.messageType=i||"license-request"},t.exports=n.default},{}],179:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});n.default=function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.keyID=t,this.key=n},t.exports=n.default},{}],180:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});n.default=function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.keySystem=t,this.ksConfiguration=n},t.exports=n.default},{}],181:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});n.default=function e(t,n,r,i,a){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.initDataTypes=["cenc"],t&&t.length&&(this.audioCapabilities=t),n&&n.length&&(this.videoCapabilities=n),this.distinctiveIdentifier=r,this.persistentState=i,this.sessionTypes=a},t.exports=n.default},{}],182:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});n.default=function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.contentType=t,this.robustness=n},t.exports=n.default},{}],183:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});n.default=function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.initData=t,this.initDataType=n},t.exports=n.default},{}],184:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r,i=e(47),a=(r=i)&&r.__esModule?r:{default:r};function o(){var o=[],s=0,u=0;return{push:function(e,t){var n=t&&t.droppedVideoFrames?t.droppedVideoFrames:0,r=t&&t.totalVideoFrames?t.totalVideoFrames:0,i=n-s;s=n;var a=r-u;u=r,isNaN(e)||(o[e]?(o[e].droppedVideoFrames+=i,o[e].totalVideoFrames+=a):o[e]={droppedVideoFrames:i,totalVideoFrames:a})},getFrameHistory:function(){return o},reset:function(e){o=[],s=e.droppedVideoFrames,u=e.totalVideoFrames}}}o.__dashjs_factory_name="DroppedFramesHistory";var s=a.default.getClassFactory(o);n.default=s,t.exports=n.default},{47:47}],185:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r,i=e(47),a=(r=i)&&r.__esModule?r:{default:r};function o(e){var t=(e=e||{}).abrController,n=e.switchHistory,r=e.droppedFramesHistory,i=e.currentRequest,a=e.useBufferOccupancyABR,o=e.streamProcessor?e.streamProcessor.getScheduleController():null,s=e.streamProcessor?e.streamProcessor.getRepresentationInfo():null;function u(){return s?s.mediaInfo:null}return{getMediaType:function(){var e=u();return e?e.type:null},getMediaInfo:u,getDroppedFramesHistory:function(){return r},getCurrentRequest:function(){return i},getSwitchHistory:function(){return n},getStreamInfo:function(){var e=u();return e?e.streamInfo:null},getScheduleController:function(){return o},getAbrController:function(){return t},getRepresentationInfo:function(){return s},useBufferOccupancyABR:function(){return a}}}o.__dashjs_factory_name="RulesContext",n.default=a.default.getClassFactory(o),t.exports=n.default},{47:47}],186:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r,i=e(47),a=(r=i)&&r.__esModule?r:{default:r},o={DEFAULT:.5,STRONG:1,WEAK:0};function s(e,t,n){var r,i;return(r=n)!==(i=o.DEFAULT)&&r!==o.STRONG&&r!==o.WEAK||(i=r),{quality:void 0===e?-1:e,reason:void 0===t?null:t,priority:i}}s.__dashjs_factory_name="SwitchRequest";var u=a.default.getClassFactory(s);u.NO_CHANGE=-1,u.PRIORITY=o,a.default.updateClassFactory(s.__dashjs_factory_name,u),n.default=u,t.exports=n.default},{47:47}],187:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var i=r(e(47)),u=r(e(186));function a(){var o=[],s=[];return{push:function(e){e.newValue===u.default.NO_CHANGE&&(e.newValue=e.oldValue),o[e.oldValue]||(o[e.oldValue]={noDrops:0,drops:0,dropSize:0});var t=e.newValue-e.oldValue,n=t<0?1:0,r=n?-t:0,i=n?0:1;if(o[e.oldValue].drops+=n,o[e.oldValue].dropSize+=r,o[e.oldValue].noDrops+=i,s.push({idx:e.oldValue,noDrop:i,drop:n,dropSize:r}),8<s.length){var a=s.shift();o[a.idx].drops-=a.drop,o[a.idx].dropSize-=a.dropSize,o[a.idx].noDrops-=a.noDrop}},getSwitchRequests:function(){return o},reset:function(){o=[],s=[]}}}a.__dashjs_factory_name="SwitchRequestHistory";var o=i.default.getClassFactory(a);n.default=o,t.exports=n.default},{186:186,47:47}],188:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var y=r(e(108)),i=r(e(47));function a(e){var s=3,u=4,l=4,f=1.3,d=1.3,c=(e=e||{}).settings,h=void 0,p=void 0,g=void 0,_=void 0,E=void 0;function m(e,t,n,r){var i=Math.pow(.5,n/r.fast);e.fastEstimate=(1-i)*t+i*e.fastEstimate;var a=Math.pow(.5,n/r.slow);e.slowEstimate=(1-a)*t+a*e.slowEstimate,e.totalWeight+=n}function n(e,t,n){return c.get().streaming.abr.movingAverageMethod!==y.default.MOVING_AVERAGE_SLIDING_WINDOW?function(e,t){var n=e?E.throughputHalfLife:E.latencyHalfLife,r=e?g[t]:_[t];if(!r||r.totalWeight<=0)return NaN;var i=r.fastEstimate/(1-Math.pow(.5,r.totalWeight/n.fast)),a=r.slowEstimate/(1-Math.pow(.5,r.totalWeight/n.slow));return e?Math.min(i,a):Math.max(i,a)}(e,t):(a=function(e,t,n){var r=void 0,i=void 0;if(i=e?(r=h[t],n?s:u):(r=p[t],l),r){if(i>=r.length)i=r.length;else if(e)for(var a=1;a<i;++a){var o=r[a]/r[a-1];if((d<=o||o<=1/f)&&(i+=1)===r.length)break}}else i=0;return i}(r=e,i=t,n),o=(r?h:p)[i],0!==a&&o&&0!==o.length?(o=o.slice(-a)).reduce(function(e,t){return e+t})/o.length:NaN);var r,i,a,o}function r(e,t){return n(!0,e,t)}function v(e){h[e]=h[e]||[],p[e]=p[e]||[],g[e]=g[e]||{fastEstimate:0,slowEstimate:0,totalWeight:0},_[e]=_[e]||{fastEstimate:0,slowEstimate:0,totalWeight:0}}function t(){h={},p={},g={},_={}}var i={push:function(e,t,n){if(t.trace&&t.trace.length){var r=t.tresponse.getTime()-t.trequest.getTime()||1,i=t._tfinish.getTime()-t.tresponse.getTime()||1,a=t.trace.reduce(function(e,t){return e+t.b[0]},0),o=void 0;o=c.get().streaming.lowLatencyEnabled?t.trace.reduce(function(e,t){return e+t.d},0):n?i:r+i;var s,u,l,f=Math.round(8*a/o);if(v(e),l=i,(u=e)===y.default.VIDEO?l<c.get().streaming.cacheLoadThresholds[y.default.VIDEO]:u===y.default.AUDIO&&l<c.get().streaming.cacheLoadThresholds[y.default.AUDIO]){if(0<h[e].length&&!h[e].hasCachedEntries)return;h[e].hasCachedEntries=!0}else h[e]&&h[e].hasCachedEntries&&(delete h[s=e],delete p[s],delete g[s],delete _[s],v(s));h[e].push(f),20<h[e].length&&h[e].shift(),p[e].push(r),20<p[e].length&&p[e].shift(),m(g[e],f,.001*i,E.throughputHalfLife),m(_[e],r,1,E.latencyHalfLife)}},getAverageThroughput:r,getSafeAverageThroughput:function(e,t){var n=r(e,t);return isNaN(n)||(n*=c.get().streaming.abr.bandwidthSafetyFactor),n},getAverageLatency:function(e){return n(!1,e)},reset:t};return E={throughputHalfLife:{fast:3,slow:8},latencyHalfLife:{fast:1,slow:2}},t(),i}a.__dashjs_factory_name="ThroughputHistory",n.default=i.default.getClassFactory(a),t.exports=n.default},{108:108,47:47}],189:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var l=r(e(195)),f=r(e(193)),d=r(e(190)),c=r(e(192)),h=r(e(194)),p=r(e(191)),i=r(e(47)),g=r(e(186)),_="qualitySwitchRules",E="abandonFragmentRules";function a(e){e=e||{};var s=this.context,t=e.mediaPlayerModel,n=e.dashMetrics,r=e.settings,i=void 0,a=void 0;function o(e){return e.filter(function(e){return e.quality>g.default.NO_CHANGE})}function u(e){var t,n={},r=void 0,i=void 0,a=void 0,o=void 0;if(0!==e.length){for(n[g.default.PRIORITY.STRONG]=g.default.NO_CHANGE,n[g.default.PRIORITY.WEAK]=g.default.NO_CHANGE,n[g.default.PRIORITY.DEFAULT]=g.default.NO_CHANGE,r=0,t=e.length;r<t;r+=1)(i=e[r]).quality!==g.default.NO_CHANGE&&(n[i.priority]=n[i.priority]>g.default.NO_CHANGE?Math.min(n[i.priority],i.quality):i.quality);return n[g.default.PRIORITY.WEAK]!==g.default.NO_CHANGE&&(a=n[g.default.PRIORITY.WEAK]),n[g.default.PRIORITY.DEFAULT]!==g.default.NO_CHANGE&&(a=n[g.default.PRIORITY.DEFAULT]),n[g.default.PRIORITY.STRONG]!==g.default.NO_CHANGE&&(a=n[g.default.PRIORITY.STRONG]),a!==g.default.NO_CHANGE&&(o=a),(0,g.default)(s).create(o)}}return{initialize:function(){i=[],a=[],r.get().streaming.abr.useDefaultABRRules&&(i.push((0,p.default)(s).create({dashMetrics:n,mediaPlayerModel:t,settings:r})),i.push((0,l.default)(s).create({dashMetrics:n})),i.push((0,f.default)(s).create({dashMetrics:n})),i.push((0,h.default)(s).create()),i.push((0,c.default)(s).create()),a.push((0,d.default)(s).create({dashMetrics:n,mediaPlayerModel:t,settings:r}))),t.getABRCustomRules().forEach(function(e){e.type===_&&i.push(e.rule(s).create()),e.type===E&&a.push(e.rule(s).create())})},reset:function(){[i,a].forEach(function(e){e&&e.length&&e.forEach(function(e){return e.reset&&e.reset()})}),i=[],a=[]},getMaxQuality:function(t){return u(o(i.map(function(e){return e.getMaxIndex(t)})))||(0,g.default)(s).create()},shouldAbandonFragment:function(t){return u(o(a.map(function(e){return e.shouldAbandon(t)})))||(0,g.default)(s).create()}}}a.__dashjs_factory_name="ABRRulesCollection";var o=i.default.getClassFactory(a);o.QUALITY_SWITCH_RULES=_,o.ABANDON_FRAGMENT_RULES=E,i.default.updateSingletonFactory(a.__dashjs_factory_name,o),n.default=o,t.exports=n.default},{186:186,190:190,191:191,192:192,193:193,194:194,195:195,47:47}],190:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var R=r(e(186)),i=r(e(47)),a=r(e(45));function b(e){e=e||{};var E=this.context,m=e.mediaPlayerModel,v=e.dashMetrics,y=e.settings,t=void 0,T=void 0,S=void 0,A=void 0,I=void 0;function n(){S={},A={},I=[]}return t={shouldAbandon:function(e){var t=(0,R.default)(E).create(R.default.NO_CHANGE,{name:b.__dashjs_factory_name});if(!(e&&e.hasOwnProperty("getMediaInfo")&&e.hasOwnProperty("getMediaType")&&e.hasOwnProperty("getCurrentRequest")&&e.hasOwnProperty("getRepresentationInfo")&&e.hasOwnProperty("getAbrController")))return t;var n,r,i,a,o=e.getMediaInfo(),s=e.getMediaType(),u=e.getCurrentRequest();if(!isNaN(u.index)){if(i=s,a=u.index,S[i]=S[i]||{},S[i][a]=S[i][a]||{},m.getStableBufferTime()<v.getCurrentBufferLevel(s))return t;var l=S[s][u.index];if(null===l||null===u.firstByteDate||A.hasOwnProperty(l.id))return t;if(void 0===l.firstByteTime&&(I[s]=[],l.firstByteTime=u.firstByteDate.getTime(),l.segmentDuration=u.duration,l.bytesTotal=u.bytesTotal,l.id=u.index),l.bytesLoaded=u.bytesLoaded,l.elapsedTime=(new Date).getTime()-l.firstByteTime,0<l.bytesLoaded&&0<l.elapsedTime&&(n=s,r=Math.round(8*l.bytesLoaded/l.elapsedTime),I[n]=I[n]||[],I[n].push(r)),5<=I[s].length&&500<l.elapsedTime&&l.bytesLoaded<l.bytesTotal){var f=I[s].reduce(function(e,t){return e+t},0);if(l.measuredBandwidthInKbps=Math.round(f/I[s].length),l.estimatedTimeOfDownload=+(8*l.bytesTotal/l.measuredBandwidthInKbps/1e3).toFixed(2),l.estimatedTimeOfDownload<1.8*l.segmentDuration||0===e.getRepresentationInfo().quality)return t;if(!A.hasOwnProperty(l.id)){var d=e.getAbrController(),c=l.bytesTotal-l.bytesLoaded,h=d.getBitrateList(o),p=d.getQualityForBitrate(o,l.measuredBandwidthInKbps*y.get().streaming.abr.bandwidthSafetyFactor),g=d.getMinAllowedIndexFor(s),_=void 0!==g?Math.max(g,p):p;l.bytesTotal*h[_].bitrate/h[d.getQualityFor(s)].bitrate<c&&(t.quality=_,t.reason.throughput=l.measuredBandwidthInKbps,t.reason.fragmentID=l.id,A[l.id]=l,T.debug("["+s+"] frag id",l.id," is asking to abandon and switch to quality to ",_," measured bandwidth was",l.measuredBandwidthInKbps),delete S[s][l.id])}}else l.bytesLoaded===l.bytesTotal&&delete S[s][l.id]}return t},reset:n},T=(0,a.default)(E).getInstance().getLogger(t),n(),t}b.__dashjs_factory_name="AbandonRequestsRule",n.default=i.default.getClassFactory(b),t.exports=n.default},{186:186,45:45,47:47}],191:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var p=r(e(109)),N=r(e(186)),i=r(e(47)),g=e(242),_=r(e(46)),E=r(e(54)),m=r(e(45));function a(e){e=e||{};var S=this.context,A=e.dashMetrics,o=e.mediaPlayerModel,t=(0,_.default)(S).getInstance(),n=void 0,I=void 0,R=void 0;function s(e,t,r){var n=r.reduce(function(e,t,n){return t>r[e]?n:e},0);if(0===n)return null;var i=Math.max(e,10+2*t.length),a=(r[n]-1)/(i/10-1);return{gp:a,Vp:10/a}}function b(e){var t={},n=e.getMediaInfo().bitrateList.map(function(e){return e.bandwidth}),r=n.map(function(e){return Math.log(e)});r=r.map(function(e){return e-r[0]+1});var i=o.getStableBufferTime(),a=s(i,n,r);return a?(t.state=1,t.bitrates=n,t.utilities=r,t.stableBufferTime=i,t.Vp=a.Vp,t.gp=a.gp,t.lastQuality=0,D(t)):t.state=0,t}function D(e){e.placeholderBuffer=0,e.mostAdvancedSegmentStart=NaN,e.lastSegmentWasReplacement=!1,e.lastSegmentStart=NaN,e.lastSegmentDurationS=NaN,e.lastSegmentRequestTimeMs=NaN,e.lastSegmentFinishTimeMs=NaN}function M(e,t){var n=o.getStableBufferTime();if(e.stableBufferTime!==n){var r=s(n,e.bitrates,e.utilities);if(r.Vp!==e.Vp||r.gp!==e.gp){var i=A.getCurrentBufferLevel(t),a=i+e.placeholderBuffer;a-=10,a*=r.Vp/e.Vp,a+=10,e.stableBufferTime=n,e.Vp=r.Vp,e.gp=r.gp,e.placeholderBuffer=Math.max(0,a-i)}}}function C(e,t){return e.Vp*(e.utilities[t]+e.gp)}function w(e,t){for(var n=e.bitrates[t],r=e.utilities[t],i=0,a=t-1;0<=a;--a)if(e.utilities[a]<e.utilities[t]){var o=e.bitrates[a],s=e.utilities[a],u=e.Vp*(e.gp+(n*s-o*r)/(n-o));i=Math.max(i,u)}return i}function r(){for(var e in R)R.hasOwnProperty(e)&&2===R[e].state&&(R[e].placeholderBuffer=0)}function i(){for(var e in R)if(R.hasOwnProperty(e)){var t=R[e];0!==t.state&&(t.state=1,D(t))}}function a(){}function u(e){if(e&&e.chunk&&e.chunk.mediaInfo){var t=R[e.chunk.mediaInfo.type];if(t&&0!==t.state){var n=e.chunk.start;isNaN(t.mostAdvancedSegmentStart)||n>t.mostAdvancedSegmentStart?(t.mostAdvancedSegmentStart=n,t.lastSegmentWasReplacement=!1):t.lastSegmentWasReplacement=!0,t.lastSegmentStart=n,t.lastSegmentDurationS=e.chunk.duration,t.lastQuality=e.chunk.quality,f(t,e.chunk.mediaInfo.type)}}}function l(e){if(e&&e.metric===p.default.HTTP_REQUEST&&e.value&&e.value.type===g.HTTPRequest.MEDIA_SEGMENT_TYPE&&e.value.trace&&e.value.trace.length){var t=R[e.mediaType];t&&0!==t.state&&(t.lastSegmentRequestTimeMs=e.value.trequest.getTime(),t.lastSegmentFinishTimeMs=e.value._tfinish.getTime(),f(t,e.mediaType))}}function f(e,t){if(!isNaN(e.lastSegmentStart)&&!isNaN(e.lastSegmentRequestTimeMs)&&!isNaN(e.placeholderBuffer)){if(e.placeholderBuffer*=.99,!isNaN(e.lastSegmentFinishTimeMs)){var n=A.getCurrentBufferLevel(t)+.001*(e.lastSegmentFinishTimeMs-e.lastSegmentRequestTimeMs),r=C(e,e.lastQuality),i=Math.max(0,r-n);e.placeholderBuffer=Math.min(i,e.placeholderBuffer)}e.lastSegmentWasReplacement&&!isNaN(e.lastSegmentDurationS)&&(e.placeholderBuffer+=e.lastSegmentDurationS),e.lastSegmentStart=NaN,e.lastSegmentRequestTimeMs=NaN}}function d(e){if(e){var t=R[e.mediaType];t&&0!==t.state&&(t.abrQuality=e.newQuality)}}function c(e){if(e){var t=R[e.mediaType];if(t&&0!==t.state){var n=A.getCurrentBufferLevel(e.mediaType),r=void 0;r=0<t.abrQuality?w(t,t.abrQuality):10;var i=Math.max(0,r-n);t.placeholderBuffer=Math.min(t.placeholderBuffer,i)}}}function h(){R={}}return n={getMaxIndex:function(e){var t=(0,N.default)(S).create();if(!(e&&e.hasOwnProperty("getMediaInfo")&&e.hasOwnProperty("getMediaType")&&e.hasOwnProperty("getScheduleController")&&e.hasOwnProperty("getStreamInfo")&&e.hasOwnProperty("getAbrController")&&e.hasOwnProperty("useBufferOccupancyABR")))return t;var n=e.getMediaInfo(),r=e.getMediaType(),i=e.getScheduleController(),a=e.getStreamInfo(),o=e.getAbrController(),s=o.getThroughputHistory(),u=a?a.id:null,l=a&&a.manifestInfo&&a.manifestInfo.isDynamic,f=e.useBufferOccupancyABR();if(t.reason=t.reason||{},!f)return t;i.setTimeToLoadDelay(0);var d,c,h,p=(c=(d=e).getMediaType(),(h=R[c])?0!==h.state&&M(h,c):(h=b(d),R[c]=h),h);if(0===p.state)return t;var g=A.getCurrentBufferLevel(r),_=s.getAverageThroughput(r,l),E=s.getSafeAverageThroughput(r,l),m=s.getAverageLatency(r),v=void 0;if(t.reason.state=p.state,t.reason.throughput=_,t.reason.latency=m,isNaN(_))return t;switch(p.state){case 1:v=o.getQualityForBitrate(n,E,m),t.quality=v,t.reason.throughput=E,p.placeholderBuffer=Math.max(0,w(p,v)-g),p.lastQuality=v,!isNaN(p.lastSegmentDurationS)&&g>=p.lastSegmentDurationS&&(p.state=2);break;case 2:!function(e,t){var n=Date.now();if(isNaN(e.lastSegmentFinishTimeMs)){if(!isNaN(e.lastCallTimeMs)){r=.001*(n-e.lastCallTimeMs);e.placeholderBuffer+=Math.max(0,r)}}else{var r=.001*(n-e.lastSegmentFinishTimeMs);e.placeholderBuffer+=Math.max(0,r)}e.lastCallTimeMs=n,e.lastSegmentStart=NaN,e.lastSegmentRequestTimeMs=NaN,e.lastSegmentFinishTimeMs=NaN,M(e,t)}(p,r),v=function(e,t){for(var n=e.bitrates.length,r=NaN,i=NaN,a=0;a<n;++a){var o=(e.Vp*(e.utilities[a]+e.gp)-t)/e.bitrates[a];(isNaN(i)||i<=o)&&(i=o,r=a)}return r}(p,g+p.placeholderBuffer);var y=o.getQualityForBitrate(n,E,m);v>p.lastQuality&&y<v&&(v=Math.max(y,p.lastQuality));var T=Math.max(0,g+p.placeholderBuffer-C(p,v));T<=p.placeholderBuffer?(p.placeholderBuffer-=T,T=0):(T-=p.placeholderBuffer,p.placeholderBuffer=0,v<o.getTopQualityIndexFor(r,u)?i.setTimeToLoadDelay(1e3*T):T=0),t.quality=v,t.reason.throughput=_,t.reason.latency=m,t.reason.bufferLevel=g,t.reason.placeholderBuffer=p.placeholderBuffer,t.reason.delay=T,p.lastQuality=v;break;default:I.debug("BOLA ABR rule invoked in bad state."),t.quality=o.getQualityForBitrate(n,E,m),t.reason.state=p.state,t.reason.throughput=E,t.reason.latency=m,p.state=1,D(p)}return t},reset:function(){h(),t.off(E.default.BUFFER_EMPTY,r,n),t.off(E.default.PLAYBACK_SEEKING,i,n),t.off(E.default.PERIOD_SWITCH_STARTED,a,n),t.off(E.default.MEDIA_FRAGMENT_LOADED,u,n),t.off(E.default.METRIC_ADDED,l,n),t.off(E.default.QUALITY_CHANGE_REQUESTED,d,n),t.off(E.default.FRAGMENT_LOADING_ABANDONED,c,n)}},I=(0,m.default)(S).getInstance().getLogger(n),h(),t.on(E.default.BUFFER_EMPTY,r,n),t.on(E.default.PLAYBACK_SEEKING,i,n),t.on(E.default.PERIOD_SWITCH_STARTED,a,n),t.on(E.default.MEDIA_FRAGMENT_LOADED,u,n),t.on(E.default.METRIC_ADDED,l,n),t.on(E.default.QUALITY_CHANGE_REQUESTED,d,n),t.on(E.default.FRAGMENT_LOADING_ABANDONED,c,n),n}a.__dashjs_factory_name="BolaRule",n.default=i.default.getClassFactory(a),t.exports=n.default},{109:109,186:186,242:242,45:45,46:46,47:47,54:54}],192:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var i=r(e(47)),f=r(e(186)),a=r(e(45));function o(){var u=this.context,e=void 0,l=void 0;return e={getMaxIndex:function(e){var t=(0,f.default)(u).create();if(!e||!e.hasOwnProperty("getDroppedFramesHistory"))return t;var n=e.getDroppedFramesHistory();if(n){for(var r=n.getFrameHistory(),i=0,a=0,o=f.default.NO_CHANGE,s=1;s<r.length;s++)if(r[s]&&(i=r[s].droppedVideoFrames,375<(a=r[s].totalVideoFrames)&&.15<i/a)){o=s-1,l.debug("index: "+o+" Dropped Frames: "+i+" Total Frames: "+a);break}return(0,f.default)(u).create(o,{droppedFrames:i})}return t}},l=(0,a.default)(u).getInstance().getLogger(e),e}o.__dashjs_factory_name="DroppedFramesRule",n.default=i.default.getClassFactory(o),t.exports=n.default},{186:186,45:45,47:47}],193:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var a=r(e(46)),o=r(e(54)),i=r(e(47)),s=r(e(45)),E=r(e(186)),m=r(e(108)),v=r(e(109));function u(e){e=e||{};var c=.5,h=this.context,t=(0,a.default)(h).getInstance(),p=e.dashMetrics,n=void 0,g=void 0,_=void 0;function r(){_={}}function i(){r()}return n={getMaxIndex:function(e){var t=(0,E.default)(h).create();if(!e||!e.hasOwnProperty("getMediaType"))return t;!function(){if(!p||!p.hasOwnProperty("getCurrentBufferLevel")||!p.hasOwnProperty("getCurrentBufferState"))throw new Error(m.default.MISSING_CONFIG_ERROR)}();var n=e.getMediaType(),r=p.getCurrentBufferState(n),i=e.getRepresentationInfo().fragmentDuration;if(!r||!function(e,t){_[e]=_[e]||{};var n=!1;_[e].firstBufferLoadedEvent?n=!0:t&&t.state===v.default.BUFFER_LOADED&&(_[e].firstBufferLoadedEvent=!0,n=!0);return n}(n,r)||!i)return t;if(r.state===v.default.BUFFER_EMPTY)g.debug("["+n+"] Switch to index 0; buffer is empty."),t.quality=0,t.reason="InsufficientBufferRule: Buffer is empty";else{var a=e.getMediaInfo(),o=e.getAbrController(),s=o.getThroughputHistory(),u=p.getCurrentBufferLevel(n),l=s.getAverageThroughput(n),f=s.getAverageLatency(n),d=l*(u/i)*c;t.quality=o.getQualityForBitrate(a,d,f),t.reason="InsufficientBufferRule: being conservative to avoid immediate rebuffering"}return t},reset:function(){r(),t.off(o.default.PLAYBACK_SEEKING,i,n)}},g=(0,s.default)(h).getInstance().getLogger(n),r(),t.on(o.default.PLAYBACK_SEEKING,i,n),n}u.__dashjs_factory_name="InsufficientBufferRule",n.default=i.default.getClassFactory(u),t.exports=n.default},{108:108,109:109,186:186,45:45,46:46,47:47,54:54}],194:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var i=r(e(47)),a=r(e(45)),f=r(e(186));function o(){var u=this.context,e=void 0,l=void 0;return e={getMaxIndex:function(e){for(var t=e?e.getSwitchHistory():null,n=t?t.getSwitchRequests():[],r=0,i=0,a=0,o=(0,f.default)(u).create(),s=0;s<n.length;s++)if(void 0!==n[s]&&(r+=n[s].drops,i+=n[s].noDrops,a+=n[s].dropSize,6<=r+i&&.075<r/i)){o.quality=0<s&&0<n[s].drops?s-1:s,o.reason={index:o.quality,drops:r,noDrops:i,dropSize:a},l.debug("Switch history rule index: "+o.quality+" samples: "+(r+i)+" drops: "+r);break}return o}},l=(0,a.default)(u).getInstance().getLogger(e),e}o.__dashjs_factory_name="SwitchHistoryRule",n.default=i.default.getClassFactory(o),t.exports=n.default},{186:186,45:45,47:47}],195:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var i=r(e(47)),a=r(e(45)),_=r(e(186)),E=r(e(108)),m=r(e(109));function o(e){e=e||{};var h=this.context,p=e.dashMetrics,t=void 0,g=void 0;return t={getMaxIndex:function(e){var t=(0,_.default)(h).create();if(!(e&&e.hasOwnProperty("getMediaInfo")&&e.hasOwnProperty("getMediaType")&&e.hasOwnProperty("useBufferOccupancyABR")&&e.hasOwnProperty("getAbrController")&&e.hasOwnProperty("getScheduleController")))return t;!function(){if(!p||!p.hasOwnProperty("getCurrentBufferState"))throw new Error(E.default.MISSING_CONFIG_ERROR)}();var n=e.getMediaInfo(),r=e.getMediaType(),i=p.getCurrentBufferState(r),a=e.getScheduleController(),o=e.getAbrController(),s=e.getStreamInfo(),u=s&&s.manifestInfo?s.manifestInfo.isDynamic:null,l=o.getThroughputHistory(),f=l.getSafeAverageThroughput(r,u),d=l.getAverageLatency(r),c=e.useBufferOccupancyABR();return isNaN(f)||!i||c||o.getAbandonmentStateFor(r)!==m.default.ABANDON_LOAD&&(i.state!==m.default.BUFFER_LOADED&&!u||(t.quality=o.getQualityForBitrate(n,f,d),a.setTimeToLoadDelay(0),g.debug("["+r+"] requesting switch to index: ",t.quality,"Average throughput",Math.round(f),"kbps"),t.reason={throughput:f,latency:d})),t},reset:function(){}},g=(0,a.default)(h).getInstance().getLogger(t),t}o.__dashjs_factory_name="ThroughputRule",n.default=i.default.getClassFactory(o),t.exports=n.default},{108:108,109:109,186:186,45:45,47:47}],196:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var h=r(e(108)),i=r(e(47)),p=r(e(109));function a(e){var u=(e=e||{}).dashMetrics,l=e.mediaPlayerModel,f=e.textController,d=e.abrController,c=e.settings;function n(e,t){var n=NaN;if(!e)return n;var r=e.getType(),i=e.getRepresentationInfo();if(r===h.default.FRAGMENTED_TEXT)if(f.isTextEnabled())if(isNaN(i.fragmentDuration)){var a=u.getCurrentSchedulingInfo(p.default.SCHEDULING_INFO);n=a?a.duration:0}else n=i.fragmentDuration;else n=0;else if(r===h.default.AUDIO&&t){var o=u.getCurrentBufferLevel(h.default.VIDEO);n=isNaN(i.fragmentDuration)?o:Math.max(o,i.fragmentDuration)}else{var s=i.mediaInfo.streamInfo;if(d.isPlayingAtTopQuality(s))n=s.manifestInfo.duration>=c.get().streaming.longFormContentDurationThreshold?c.get().streaming.bufferTimeAtTopQualityLongForm:c.get().streaming.bufferTimeAtTopQuality;else n=l.getStableBufferTime()}return n}return{execute:function(e,t){return!e||u.getCurrentBufferLevel(e.getType())<n(e,t)},getBufferTarget:n}}a.__dashjs_factory_name="BufferLevelRule",n.default=i.default.getClassFactory(a),t.exports=n.default},{108:108,109:109,47:47}],197:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var _=r(e(108)),i=r(e(45)),a=r(e(47)),E=r(e(228));function o(e){e=e||{};var t=this.context,p=e.textController,g=e.playbackController,n=void 0;return n={execute:function(e,t,n){if(!e)return null;var r=e.getRepresentationInfo(),i=e.getType(),a=!isNaN(t),o=e.getBufferController(),s=g.getNormalizedTime(),u=a?t:e.getIndexHandlerTime(),l=!1,f=void 0;if(isNaN(u)||i===_.default.FRAGMENTED_TEXT&&!p.isTextEnabled())return null;if(o){var d=o.getRangeAt(u),c=o.getRangeAt(s),h=o.getBuffer().hasDiscontinuitiesAfter(s);null===d&&null===c||a||(!d||c&&c.start!=d.start&&c.end!=d.end)&&(h&&i!==_.default.FRAGMENTED_TEXT&&(e.getFragmentModel().removeExecutedRequestsAfterTime(c.end),l=!0),d=c)}if(n)u=n.startTime+n.duration/2,f=e.getFragmentRequest(r,u,{timeThreshold:0,ignoreIsFinished:!0});else for(f=e.getFragmentRequest(r,a||l?u:void 0,{keepIdx:!a&&!l});f&&f.action!==E.default.ACTION_COMPLETE&&e.getFragmentModel().isFragmentLoaded(f);)f=e.getFragmentRequest(r);return f}},(0,i.default)(t).getInstance().getLogger(n),n}o.__dashjs_factory_name="NextFragmentRequestRule",n.default=a.default.getClassFactory(o),t.exports=n.default},{108:108,228:228,45:45,47:47}],198:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r,i=e(47),a=(r=i)&&r.__esModule?r:{default:r};function o(){var G=0;function j(e){for(var t="",n=0;n<e.length;++n){t+=e[n].uchar}return t.length-t.replace(/^\s+/,"").length}function r(e){return"red"===e?"rgb(255, 0, 0)":"green"===e?"rgb(0, 255, 0)":"blue"===e?"rgb(0, 0, 255)":"cyan"===e?"rgb(0, 255, 255)":"magenta"===e?"rgb(255, 0, 255)":"yellow"===e?"rgb(255, 255, 0)":"white"===e?"rgb(255, 255, 255)":"black"===e?"rgb(0, 0, 0)":e}function Y(e,t){var n=e.videoHeight/15;return t?"font-size: "+n+"px; font-family: Menlo, Consolas, 'Cutive Mono', monospace; color: "+(t.foreground?r(t.foreground):"rgb(255, 255, 255)")+"; font-style: "+(t.italics?"italic":"normal")+"; text-decoration: "+(t.underline?"underline":"none")+"; white-space: pre; background-color: "+(t.background?r(t.background):"transparent")+";":"font-size: "+n+"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;"}return{createHTMLCaptionsFromScreen:function(e,t,n,r){var i=null,a=!1,o=-1,s={start:t,end:n,spans:[]},u="style_cea608_white_black",l={},f={},d=[],c=void 0,h=void 0;for(c=0;c<15;++c){var p=r.rows[c],g="",_=null;if(!1===p.isEmpty()){var E=j(p.chars);null===i&&(i={x:E,y1:c,y2:c+1,p:[]}),E!==o&&a&&(i.p.push(s),s={start:t,end:n,spans:[]},i.y2=c,i.name="region_"+i.x+"_"+i.y1+"_"+i.y2,!1===l.hasOwnProperty(i.name)?(d.push(i),l[i.name]=i):l[i.name].p.contat(i.p),i={x:E,y1:c,y2:c+1,p:[]});for(var m=0;m<p.chars.length;++m){var v=p.chars[m],y=v.penState;if(null===_||!y.equals(_)){0<g.trim().length&&(s.spans.push({name:u,line:g,row:c}),g="");var T="style_cea608_"+y.foreground+"_"+y.background;y.underline&&(T+="_underline"),y.italics&&(T+="_italics"),f.hasOwnProperty(T)||(f[T]=JSON.parse(JSON.stringify(y))),_=y,u=T}g+=v.uchar}0<g.trim().length&&s.spans.push({name:u,line:g,row:c}),a=!0,o=E}else a=!1,o=-1,i&&(i.p.push(s),s={start:t,end:n,spans:[]},i.y2=c,i.name="region_"+i.x+"_"+i.y1+"_"+i.y2,!1===l.hasOwnProperty(i.name)?(d.push(i),l[i.name]=i):l[i.name].p.contat(i.p),i=null)}i&&(i.p.push(s),i.y2=c+1,i.name="region_"+i.x+"_"+i.y1+"_"+i.y2,!1===l.hasOwnProperty(i.name)?(d.push(i),l[i.name]=i):l[i.name].p.contat(i.p),i=null);var S,A=[];for(c=0;c<d.length;++c){var I=d[c],R="sub_cea608_"+G++,b=document.createElement("div");b.id=R;var D="left: "+3.125*(S=I).x+"%; top: "+6.66*S.y1+"%; width: "+(100-3.125*S.x)+"%; height: "+6.66*Math.max(S.y2-1-S.y1,1)+"%; align-items: flex-start; overflow: visible; -webkit-writing-mode: horizontal-tb;";b.style.cssText="position: absolute; margin: 0; display: flex; box-sizing: border-box; pointer-events: none;"+D;var M=document.createElement("div");M.className="paragraph bodyStyle",M.style.cssText=Y(e);var C=document.createElement("div");C.className="cueUniWrapper",C.style.cssText="unicode-bidi: normal; direction: ltr;";for(var w=0;w<I.p.length;++w){var N=I.p[w],O=0;for(h=0;h<N.spans.length;++h){var P=N.spans[h];if(0<P.line.length){if(0!==h&&O!=P.row){var L=document.createElement("br");L.className="lineBreak",C.appendChild(L)}var x=!1;O===P.row&&(x=!0),O=P.row;var F=f[P.name],U=document.createElement("span");U.className="spanPadding "+P.name+" customSpanColor",U.style.cssText=Y(e,F),0!==h&&x?h===N.spans.length-1?U.textContent=P.line.replace(/\s+$/g,""):U.textContent=P.line:1<N.spans.length&&h<N.spans.length-1&&P.row===N.spans[h+1].row?U.textContent=P.line.replace(/^\s+/g,""):U.textContent=P.line.trim(),C.appendChild(U)}}}M.appendChild(C),b.appendChild(M);var k={bodyStyle:["%",90]};for(var B in f)f.hasOwnProperty(B)&&(k[B]=["%",90]);A.push({type:"html",start:t,end:n,cueHTMLElement:b,cueID:R,cellResolution:[32,15],isFromCEA608:!0,fontSize:k,lineHeight:{},linePadding:{}})}return A}}}o.__dashjs_factory_name="EmbeddedTextHtmlRender",n.default=a.default.getSingletonFactory(o),t.exports=n.default},{47:47}],199:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var E=r(e(108)),m=r(e(46)),v=r(e(54)),i=r(e(47)),y=r(e(214)),T=r(e(104)),S=r(e(201)),A=r(e(226)),I=r(e(51)),R="NotFragmentedTextBufferController";function a(e){e=e||{};var n=this.context,r=(0,m.default)(n).getInstance(),i=(0,S.default)(n).getInstance(),a=e.errHandler,o=e.type,s=e.mimeType,u=e.streamProcessor,l=void 0,t=void 0,f=void 0,d=void 0,c=void 0,h=void 0;function p(e){d=e}function g(e){if(e.sender.getType()===u.getType()&&!e.error){var t=e.sender.getStreamId(),n=e.sender.getCurrentRepresentation();h.extract(t,n?n.id:null)||r.trigger(v.default.TIMED_TEXT_REQUESTED,{index:0,sender:e.sender})}}function _(e){e.fragmentModel===u.getFragmentModel()&&e.chunk.bytes&&(h.save(e.chunk),c.append(e.chunk),r.trigger(v.default.STREAM_COMPLETED,{request:e.request,fragmentModel:e.fragmentModel}))}return l={getBufferControllerType:function(){return R},initialize:function(e){p(e),h=(0,y.default)(n).getInstance()},createBuffer:function(t){try{if(c=(0,T.default)(n).create(d,t),!f){var e=c.getBuffer();e.hasOwnProperty(E.default.INITIALIZE)&&e.initialize(s,u),f=!0}return c}catch(e){if(t&&(t.isText||-1!==t.codec.indexOf('codecs="stpp')||-1!==t.codec.indexOf('codecs="wvtt')))try{c=i.getTextSourceBuffer()}catch(e){a.error(new A.default(I.default.MEDIASOURCE_TYPE_UNSUPPORTED_CODE,I.default.MEDIASOURCE_TYPE_UNSUPPORTED_MESSAGE+o+" : "+e.message))}else a.error(new A.default(I.default.MEDIASOURCE_TYPE_UNSUPPORTED_CODE,I.default.MEDIASOURCE_TYPE_UNSUPPORTED_MESSAGE+o))}},getType:function(){return o},getStreamProcessor:function(){return u},setSeekStartTime:function(){},getBuffer:function(){return c},getBufferLevel:function(){return 0},setMediaSource:p,getMediaSource:function(){return d},getIsBufferingCompleted:function(){return t},getIsPruningInProgress:function(){return!1},dischargePreBuffer:function(){},switchInitData:function(e,t){h.extract(e,t)||r.trigger(v.default.TIMED_TEXT_REQUESTED,{index:0,sender:l})},getRangeAt:function(){return null},reset:function(e){r.off(v.default.DATA_UPDATE_COMPLETED,g,l),r.off(v.default.INIT_FRAGMENT_LOADED,_,l),!e&&c&&(c.abort(),c.reset(),c=null)},updateTimestampOffset:function(e){c.timestampOffset===e||isNaN(e)||(c.timestampOffset=e)}},d=null,t=f=!1,r.on(v.default.DATA_UPDATE_COMPLETED,g,l),r.on(v.default.INIT_FRAGMENT_LOADED,_,l),l}a.__dashjs_factory_name=R,n.default=i.default.getClassFactory(a),t.exports=n.default},{104:104,108:108,201:201,214:214,226:226,46:46,47:47,51:51,54:54}],200:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var a=r(e(108)),i=r(e(47)),o=r(e(114)),s=r(e(199));function u(e){e=e||{};var t,n=this.context,r=void 0;function i(){return r.getBuffer()}return t={getBufferControllerType:function(){return r.getBufferControllerType()},initialize:function(e,t){return r.initialize(e,t)},createBuffer:function(e){return r.createBuffer(e)},getType:function(){return r.getType()},getStreamProcessor:function(){r.getStreamProcessor()},setSeekStartTime:function(e){r.setSeekStartTime(e)},getBuffer:i,setBuffer:function(e){r.setBuffer(e)},getBufferLevel:function(){return r.getBufferLevel()},setMediaSource:function(e){r.setMediaSource(e)},getMediaSource:function(){return r.getMediaSource()},getIsBufferingCompleted:function(){return r.getIsBufferingCompleted()},getIsPruningInProgress:function(){return r.getIsPruningInProgress()},dischargePreBuffer:function(){return r.dischargePreBuffer()},switchInitData:function(e,t){r.switchInitData(e,t)},getRangeAt:function(e){return r.getRangeAt(e)},reset:function(e){r.reset(e)},updateTimestampOffset:function(e){var t=i();t.timestampOffset===e||isNaN(e)||(t.timestampOffset=e)}},r=e.type===a.default.FRAGMENTED_TEXT?(0,o.default)(n).create({type:e.type,dashMetrics:e.dashMetrics,mediaPlayerModel:e.mediaPlayerModel,manifestModel:e.manifestModel,errHandler:e.errHandler,streamController:e.streamController,mediaController:e.mediaController,adapter:e.adapter,textController:e.textController,abrController:e.abrController,playbackController:e.playbackController,streamProcessor:e.streamProcessor,settings:e.settings}):(0,s.default)(n).create({type:e.type,mimeType:e.mimeType,errHandler:e.errHandler,streamProcessor:e.streamProcessor}),t}u.__dashjs_factory_name="TextBufferController",n.default=i.default.getClassFactory(u),t.exports=n.default},{108:108,114:114,199:199,47:47}],201:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var R=r(e(108)),i=r(e(47)),b=r(e(202)),D=r(e(203)),M=r(e(222)),C=r(e(220)),w=r(e(46)),N=r(e(54)),O=e(219);function a(){var e=this.context,t=void 0,h=void 0,n=void 0,r=void 0,i=void 0,p=void 0,a=void 0,g=void 0,_=void 0,o=void 0,s=void 0,u=void 0,l=void 0,f=void 0,d=void 0,E=void 0,c=void 0,m=void 0;function v(e){void 0===m&&null!==e.fromStreamInfo&&(m=this.getCurrentTrackIdx())}function y(){void 0===m&&(m=this.getCurrentTrackIdx())}function T(){void 0!==m&&(this.setTextTrack(m),m=void 0)}function S(e){var n=this,t=e.tracks,r=e.index;t.some(function(e,t){if(e.lang===l)return n.setTextTrack(t),r=t,!0}),d||this.setTextTrack(-1),f=r,u.trigger(N.default.TEXT_TRACKS_ADDED,{enabled:A(),index:r,tracks:t})}function A(){var e=!0;return E&&!c&&(e=!1),e}function I(){E=!1}return t={setConfig:function(e){e&&(e.errHandler&&(n=e.errHandler),e.adapter&&(r=e.adapter),e.manifestModel&&(i=e.manifestModel),e.mediaController&&(p=e.mediaController),e.videoModel&&(a=e.videoModel),e.streamController&&(g=e.streamController),e.textTracks&&(_=e.textTracks),e.vttParser&&(o=e.vttParser),e.ttmlParser&&(s=e.ttmlParser),h.setConfig({errHandler:n,adapter:r,manifestModel:i,mediaController:p,videoModel:a,streamController:g,textTracks:_,vttParser:o,ttmlParser:s}))},getTextSourceBuffer:function(){return h},getAllTracksAreDisabled:function(){return E},addEmbeddedTrack:function(e){h.addEmbeddedTrack(e)},getTextDefaultLanguage:function(){return l},setTextDefaultLanguage:function(e){(0,O.checkParameterType)(e,"string"),l=e},setTextDefaultEnabled:function(e){(0,O.checkParameterType)(e,"boolean"),(d=e)||this.setTextTrack(-1)},getTextDefaultEnabled:function(){return d},enableText:function(e){(0,O.checkParameterType)(e,"boolean"),A()!==e&&(e&&this.setTextTrack(f),e||(f=this.getCurrentTrackIdx(),this.setTextTrack(-1)))},isTextEnabled:A,setTextTrack:function(e){var t=h.getConfig(),n=t.fragmentModel,r=t.fragmentedTracks,i=t.videoModel,a=void 0,o=void 0;E=-1===e;var s=_.getCurrentTrackIdx();if(s!==e){_.setModeForTrackIdx(s,R.default.TEXT_HIDDEN),_.setCurrentTrackIdx(e),_.setModeForTrackIdx(e,R.default.TEXT_SHOWING);var u=_.getCurrentTrackInfo();if(u&&u.isFragmented&&!u.isEmbedded)for(var l=0;l<r.length;l++){var f=r[l];if(u.lang===f.lang&&u.index===f.index&&(f.id?u.id===f.id:u.id===f.index))if(f!==p.getCurrentTrackFor(R.default.FRAGMENTED_TEXT,g.getActiveStreamInfo()))n.abortRequests(),n.removeExecutedRequestsBeforeTime(),h.remove(),_.deleteCuesFromTrackIdx(s),p.setTrack(f),h.setCurrentFragmentedTrackIdx(l);else if(-1===s){for(var d=g.getActiveStreamProcessors(),c=0;c<d.length;c++)if(d[c].getType()===R.default.FRAGMENTED_TEXT){o=d[c];break}o.setIndexHandlerTime(i.getTime()),o.getScheduleController().start()}}else if(u&&!u.isFragmented){for(d=g.getActiveStreamProcessors(),l=0;l<d.length;l++)if(d[l].getType()===R.default.TEXT){a=(o=d[l]).getMediaInfoArr();break}if(o&&a)for(l=0;l<a.length;l++)if(a[l].index===u.index&&a[l].lang===u.lang){o.selectMediaInfo(a[l]);break}}}},getCurrentTrackIdx:function(){return _.getCurrentTrackIdx()},enableForcedTextStreaming:function(e){(0,O.checkParameterType)(e,"boolean"),c=e},reset:function(){I(),h.resetEmbedded(),h.reset()}},f=-1,_=(c=!(d=!(l="")),D.default)(e).getInstance(),o=(0,M.default)(e).getInstance(),s=(0,C.default)(e).getInstance(),h=(0,b.default)(e).getInstance(),u=(0,w.default)(e).getInstance(),_.initialize(),u.on(N.default.TEXT_TRACKS_QUEUE_INITIALIZED,S,t),u.on(N.default.PERIOD_SWITCH_STARTED,v,t),u.on(N.default.STREAM_COMPLETED,y,t),u.on(N.default.PERIOD_SWITCH_COMPLETED,T,t),I(),t}a.__dashjs_factory_name="TextController",n.default=i.default.getSingletonFactory(a),t.exports=n.default},{108:108,202:202,203:203,219:219,220:220,222:222,46:46,47:47,54:54}],202:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var ie=r(e(108)),ae=e(242),m=r(e(234)),v=r(e(207)),y=r(e(209)),i=r(e(47)),T=r(e(45)),S=r(e(203)),A=r(e(198)),oe=r(e(9)),se=r(e(2)),I=r(e(46)),R=r(e(54)),ue=r(e(226)),le=r(e(51));function a(){var a=this.context,n=(0,I.default)(a).getInstance(),r=!1,o=void 0,k=void 0,B=void 0,G=void 0,s=void 0,j=void 0,u=void 0,Y=void 0,i=void 0,l=void 0,f=void 0,q=void 0,H=void 0,K=void 0,V=void 0,d=void 0,z=void 0,c=void 0,W=void 0,X=void 0,Q=void 0,Z=void 0,$=void 0,J=void 0,ee=void 0,te=void 0;function e(){V=NaN,W=H=null,K=!(d=[])}function t(){e(),f=[],Y=null}function h(e){var t=e.chunk;t.mediaInfo.embeddedCaptions&&_(t.bytes,t)}function p(){Q=[],(q=(0,S.default)(a).getInstance()).setConfig({videoModel:z}),q.initialize(),B=(0,v.default)(a).getInstance(),J=[],r=!($=X=null),ee=(Z=0,A.default)(a).getInstance();var e=c.getActiveStreamProcessors();for(var t in e)if("video"===e[t].getType()){te=e[t].getRepresentationInfo().MSETimeOffset;break}n.on(R.default.VIDEO_CHUNK_RECEIVED,h,this),n.on(R.default.BUFFER_CLEARED,E,this)}function g(e){X=e}function ne(e,t){var n,r,i=new m.default,a={subtitle:"subtitles",caption:"captions"};i.captionData=e,i.lang=t.lang,i.labels=t.labels,i.id=t.id?t.id:t.index,i.index=t.index,i.isTTML=(n=!1,t.codec&&0<=t.codec.search(ie.default.STPP)&&(n=!0),t.mimeType&&0<=t.mimeType.search(ie.default.TTML)&&(n=!0),n),i.defaultTrack=function(e){var t=!1;1<Q.length&&e.isEmbedded?t=e.id&&e.id===ie.default.CC1:1===Q.length?e.id&&"string"==typeof e.id&&"CC"===e.id.substring(0,2)&&(t=!0):0===Q.length&&(t=e.index===f[0].index);return t}(t),i.isFragmented=!s.getIsTextTrack(t.mimeType),i.isEmbedded=!!t.isEmbedded,i.kind=r=(r=0<t.roles.length?a[t.roles[0]]:a.caption)===a.caption||r===a.subtitle?r:a.caption,i.roles=t.roles,i.accessibility=t.accessibility;var o=(f?f.length:0)+Q.length;q.addTextTrack(i,o)}function _(e,t){var n=void 0,r=void 0,i=void 0,a=void 0,o=void 0,s=void 0,u=void 0,l=t.mediaInfo,f=l.type,d=l.mimeType,c=l.codec||d;if(c){if(f===ie.default.FRAGMENTED_TEXT)if(K||"InitializationSegment"!==t.segmentType){if(!K)return;if(r=(s=B.getSamplesInfo(e)).sampleList,null===W&&0<r.length&&(W=r[0].cts-t.start*V),0<=c.search(ie.default.STPP))for(Y=null!==Y?Y:re(c),i=0;i<r.length;i++){var h=(S=r[i]).cts,p=h-W;this.buffered.add(p/V,(p+S.duration)/V);var g=new DataView(e,S.offset,S.subSizes[0]);u=oe.default.Utils.dataViewToString(g,ie.default.UTF8);var _=[],E=S.offset+S.subSizes[0];for(a=1;a<S.subSizes.length;a++){var m=new Uint8Array(e,E,S.subSizes[a]),v=String.fromCharCode.apply(null,m);_.push(v),E+=S.subSizes[a]}try{var y=j.getValue().ttmlTimeIsRelative?h/V:0;n=Y.parse(u,y,h/V,(h+S.duration)/V,_),q.addCaptions(X,W/V,n)}catch(e){H.removeExecutedRequestsBeforeTime(),this.remove(),k.error("TTML parser error: "+e.message)}}else{var T=[];for(i=0;i<r.length;i++){var S;(S=r[i]).cts-=W,this.buffered.add(S.cts/V,(S.cts+S.duration)/V);var A=e.slice(S.offset,S.offset+S.size),I=oe.default.parseBuffer(A);for(a=0;a<I.boxes.length;a++){var R=I.boxes[a];if(k.debug("VTT box1: "+R.type),"vtte"!==R.type&&"vttc"===R.type)for(k.debug("VTT vttc boxes.length = "+R.boxes.length),o=0;o<R.boxes.length;o++){var b=R.boxes[o];if(k.debug("VTT box2: "+b.type),"payl"===b.type){var D=b.cue_text;k.debug("VTT cue_text = "+D);var M=S.cts/V,C=(S.cts+S.duration)/V;T.push({start:M,end:C,data:D,styles:{}}),k.debug("VTT "+M+"-"+C+" : "+D)}}}}0<T.length&&q.addCaptions(X,0,T)}}else K=!0,V=B.getMediaTimescaleFromMoov(e);else if(f===ie.default.TEXT){g=new DataView(e,0,e.byteLength);u=oe.default.Utils.dataViewToString(g,ie.default.UTF8);try{n=re(c).parse(u,0),q.addCaptions(q.getCurrentTrackIdx(),0,n)}catch(e){G.error(new ue.default(le.default.TIMED_TEXT_ERROR_ID_PARSE_CODE,le.default.TIMED_TEXT_ERROR_MESSAGE_PARSE+e.message,u))}}else if(f===ie.default.VIDEO)if(t.segmentType===ae.HTTPRequest.INIT_SEGMENT_TYPE){if(0===Z)for(Z=B.getMediaTimescaleFromMoov(e),i=0;i<Q.length;i++)ne(null,Q[i])}else{if(0===Z)return void k.warn("CEA-608: No timescale for embeddedTextTrack yet");var w=function(e,i){return function(e,t,n){var r=null;r=z.getTTMLRenderingDiv()?ee.createHTMLCaptionsFromScreen(z.getElement(),e,t,n):[{start:e,end:t,data:n.getDisplayText(),styles:{}}],r&&q.addCaptions(i,0,r)}},N=(s=B.getSamplesInfo(e)).lastSequenceNumber;if(!J[0]&&!J[1]){var O=void 0,P=void 0;for(i=0;i<Q.length;i++){if(Q[i].id===ie.default.CC1?P=q.getTrackIdxForId(ie.default.CC1):Q[i].id===ie.default.CC3&&(P=q.getTrackIdxForId(ie.default.CC3)),-1===P)return void k.warn("CEA-608: data before track is ready.");O=w(0,P),J[i]=new se.default.Cea608Parser(i+1,{newCue:O},null)}}if(Z){if(null!==$&&N!==$+s.numSequences)for(i=0;i<J.length;i++)J[i]&&J[i].reset();for(var L=function(e,t){if(0===t.length)return null;for(var n={splits:[],fields:[[],[]]},r=new DataView(e),i=0;i<t.length;i++)for(var a=t[i],o=se.default.findCea608Nalus(r,a.offset,a.size),s=null,u=0,l=0;l<o.length;l++)for(var f=se.default.extractCea608DataFromRange(r,o[l]),d=0;d<2;d++)0<f[d].length&&(a.cts!==s?u=0:u+=1,n.fields[d].push([a.cts+te*Z,f[d],u]),s=a.cts);return n.fields.forEach(function(e){e.sort(function(e,t){return e[0]===t[0]?e[2]-t[2]:e[0]-t[0]})}),n}(e,s.sampleList),x=0;x<J.length;x++){var F=L.fields[x],U=J[x];if(U)for(i=0;i<F.length;i++)U.addData(F[i][0]/Z,F[i][1])}$=N}}}else k.error("No text type defined")}function re(e){var t=void 0;return 0<=e.search(ie.default.VTT)?t=i:(0<=e.search(ie.default.TTML)||0<=e.search(ie.default.STPP))&&(t=l),t}function E(n){Q.forEach(function(e){var t=q.getTrackIdxForId(e.id);0<=t&&q.deleteCuesFromTrackIdx(t,n.from,n.to)})}return o={initialize:function(e,t){r||p(),q.setConfig({videoModel:z}),q.initialize(),B=B||(0,v.default)(a).getInstance(),function(e,t){var n=!s.getIsTextTrack(e);if(t){if(f=f.concat(t.getMediaInfoArr()),n){H=t.getFragmentModel(),o.buffered=(0,y.default)(a).create(),d=u.getTracksFor(ie.default.FRAGMENTED_TEXT,t.getStreamInfo());for(var r=u.getCurrentTrackFor(ie.default.FRAGMENTED_TEXT,t.getStreamInfo()),i=0;i<d.length;i++)if(d[i]===r){g(i);break}}for(i=0;i<f.length;i++)ne(null,f[i])}}(e,t)},append:_,abort:function(){q.deleteAllTextTracks(),e(),B=null,f=[]},addEmbeddedTrack:function(e){if(r||p(),e)if(e.id===ie.default.CC1||e.id===ie.default.CC3){for(var t=0;t<Q.length;t++)if(Q[t].id===e.id)return;Q.push(e)}else k.warn("Embedded track "+e.id+" not supported!")},resetEmbedded:function(){n.off(R.default.VIDEO_CHUNK_RECEIVED,h,this),n.off(R.default.BUFFER_CLEARED,E,this),q&&q.deleteAllTextTracks(),r=!1,Q=[],J=[null,null],$=null},setConfig:function(e){e&&(e.errHandler&&(G=e.errHandler),e.adapter&&(s=e.adapter),e.manifestModel&&(j=e.manifestModel),e.mediaController&&(u=e.mediaController),e.videoModel&&(z=e.videoModel),e.streamController&&(c=e.streamController),e.textTracks&&(q=e.textTracks),e.vttParser&&(i=e.vttParser),e.ttmlParser&&(l=e.ttmlParser))},getConfig:function(){return{fragmentModel:H,fragmentedTracks:d,videoModel:z}},setCurrentFragmentedTrackIdx:g,remove:function(e,t){void 0===e&&e===t&&(e=this.buffered.start(0),t=this.buffered.end(this.buffered.length-1)),this.buffered.remove(e,t)},reset:function(){t(),q=z=c=null}},k=(0,T.default)(a).getInstance().getLogger(o),t(),o}a.__dashjs_factory_name="TextSourceBuffer",n.default=i.default.getSingletonFactory(a),t.exports=n.default},{108:108,198:198,2:2,203:203,207:207,209:209,226:226,234:234,242:242,45:45,46:46,47:47,51:51,54:54,9:9}],203:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var m=r(e(108)),v=r(e(46)),w=r(e(54)),i=r(e(47)),N=r(e(45)),O=e(17),P=e(219);function a(){var e=this.context,y=(0,v.default)(e).getInstance(),t=void 0,u=void 0,l=void 0,T=void 0,o=void 0,a=void 0,f=void 0,S=void 0,A=void 0,I=void 0,R=void 0,b=void 0,r=void 0,D=void 0,M=void 0,n=void 0,C=void 0;function s(e){var t=o[e].kind,n=void 0!==o[e].id?o[e].id:o[e].lang,r=o[e].lang,i=o[e].isTTML,a=o[e].isEmbedded;return T.addTextTrack(t,n,r,i,a)}function d(e,t){var n=T.getClientWidth(),r=T.getClientHeight(),i=T.getVideoWidth(),a=T.getVideoHeight(),o=T.getVideoRelativeOffsetTop(),s=T.getVideoRelativeOffsetLeft();if(0!==i&&0!==a){var u=i/a,l=!1;e.isFromCEA608&&(u=3.5/3,l=!0);var f=function(e,t,n,r,i,a){var o=0,s=0;n/r<e/t?o=(s=t)/r*n:s=(o=e)/n*r;var u,l,f=0,d=0;return i<o/s?f=(d=s)*i:d=(f=o)/i,u=(e-f)/2,l=(t-d)/2,a?{x:u+.1*f,y:l+.1*d,w:.8*f,h:.8*d}:{x:u,y:l,w:f,h:d}}.call(this,n,r,i,a,u,l),d=f.w,c=f.h,h=f.x,p=f.y;if(d!=I||c!=R||h!=S||p!=A||t){if(S=h+s,A=p+o,I=d,R=c,b){var g=b.style;g&&(g.left=S+"px",g.top=A+"px",g.width=I+"px",g.height=R+"px",g.zIndex=D&&document[D]||M?C:null,y.trigger(w.default.CAPTION_CONTAINER_RESIZE,{}))}var _=e.activeCues;if(_)for(var E=_.length,m=0;m<E;++m){var v=_[m];v.scaleCue(v)}}}}function c(e){var t=I,n=R,r=void 0,i=void 0,a=void 0,o=void 0,s=void 0;if(e.cellResolution){var u=[t/e.cellResolution[0],n/e.cellResolution[1]];if(e.linePadding)for(r in e.linePadding)if(e.linePadding.hasOwnProperty(r)){i=(e.linePadding[r]*u[0]).toString();for(var l=document.getElementsByClassName("spanPadding"),f=0;f<l.length;f++)l[f].style.cssText=l[f].style.cssText.replace(/(padding-left\s*:\s*)[\d.,]+(?=\s*px)/gi,"$1"+i),l[f].style.cssText=l[f].style.cssText.replace(/(padding-right\s*:\s*)[\d.,]+(?=\s*px)/gi,"$1"+i)}if(e.fontSize){for(r in e.fontSize)if(e.fontSize.hasOwnProperty(r)){"%"===e.fontSize[r][0]?a=e.fontSize[r][1]/100:"c"===e.fontSize[r][0]&&(a=e.fontSize[r][1]),i=(a*u[1]).toString(),s="defaultFontSize"!==r?document.getElementsByClassName(r):document.getElementsByClassName("paragraph");for(var d=0;d<s.length;d++)s[d].style.cssText=s[d].style.cssText.replace(/(font-size\s*:\s*)[\d.,]+(?=\s*px)/gi,"$1"+i)}if(e.lineHeight)for(r in e.lineHeight)if(e.lineHeight.hasOwnProperty(r)){"%"===e.lineHeight[r][0]?o=e.lineHeight[r][1]/100:"c"===e.fontSize[r][0]&&(o=e.lineHeight[r][1]),i=(o*u[1]).toString(),s=document.getElementsByClassName(r);for(var c=0;c<s.length;c++)s[c].style.cssText=s[c].style.cssText.replace(/(line-height\s*:\s*)[\d.,]+(?=\s*px)/gi,"$1"+i)}}}if(e.isd){var h=document.getElementById(e.cueID);h&&b.removeChild(h),p(e)}}function p(a){if(b){var e=document.createElement("div");b.appendChild(e),n=(0,O.renderHTML)(a.isd,e,function(e){var t=/^(urn:)(mpeg:[a-z0-9][a-z0-9-]{0,31}:)(subs:)([0-9]+)$/,n=/^#(.*)$/;if(t.test(e)){var r=t.exec(e),i=parseInt(r[4],10)-1;return"data:image/png;base64,"+btoa(a.images[i])}if(n.test(e)){i=(r=n.exec(e))[1];return"data:image/png;base64,"+a.embeddedImages[i]}return null},b.clientHeight,b.clientWidth,!1,function(e){u.info("renderCaption :",e)},n,!0),e.id=a.cueID,y.trigger(w.default.CAPTION_RENDERED,{captionDiv:e,currentTrackIdx:f})}}function h(e){return 0<=e&&o[e]?T.getTextTrack(o[e].kind,o[e].id,o[e].lang,o[e].isTTML,o[e].isEmbedded):null}function g(e){if(e!==f){var t=h(f=e);(function(e){E.call(this),e&&"html"===e.renderingType?function(){var e=document.getElementById("native-cue-style");if(e)return;(e=document.createElement("style")).id="native-cue-style",document.head.appendChild(e);var t=e.sheet,n=T.getElement();try{n&&(n.id?t.insertRule("#"+n.id+"::cue {background: transparent}",0):0!==n.classList.length?t.insertRule("."+n.className+"::cue {background: transparent}",0):t.insertRule("video::cue {background: transparent}",0))}catch(e){u.info(""+e.message)}}.call(this):i.call(this)}).call(this,t),r&&(clearInterval(r),r=null),t&&"html"===t.renderingType&&(d.call(this,t,!0),r=setInterval(d.bind(this,t),500))}}function _(e,t,n){if(e.cues)for(var r=e.cues,i=r.length-1;0<=i;i--)a=r[i],o=t,s=n,(isNaN(o)||a.startTime>=o)&&(isNaN(s)||a.endTime<=s)&&e.removeCue(r[i]);var a,o,s}function i(){var e=document.getElementById("native-cue-style");e&&document.head.removeChild(e)}function E(){if(b)for(;b.firstChild;)b.removeChild(b.firstChild)}return t={initialize:function(){"undefined"!=typeof window&&"undefined"!=typeof navigator&&(l=window.VTTCue||window.TextTrackCue,o=[],a=[],M=!(f=-1),C=2147483647,n=r=b=null,void(R=I=A=S=0)!==document.fullscreenElement?D="fullscreenElement":void 0!==document.webkitIsFullScreen?D="webkitIsFullScreen":document.msFullscreenElement?D="msFullscreenElement":document.mozFullScreen&&(D="mozFullScreen"))},setDisplayCConTop:function(e){(0,P.checkParameterType)(e,"boolean"),M=e,b&&!document[D]&&(b.style.zIndex=e?C:null)},addTextTrack:function(e,t){var i=this;o.length!==t?(o.push(e),o.length===t&&function(){o.sort(function(e,t){return e.index-t.index}),b=T.getTTMLRenderingDiv();for(var n=-1,e=0;e<o.length;e++){var t=s.call(i,e);a.push(t),o[e].defaultTrack&&(t.default=!0,n=e);var r=h(e);r&&(r.mode=m.default.TEXT_SHOWING,b&&(o[e].isTTML||o[e].isEmbedded)?r.renderingType="html":r.renderingType="default"),i.addCaptions(e,0,o[e].captionData),y.trigger(w.default.TEXT_TRACK_ADDED)}g.call(i,n),0<=n&&function(){y.on(w.default.PLAYBACK_METADATA_LOADED,function e(){var t=h(n);t&&d.call(this,t,!0),y.off(w.default.PLAYBACK_METADATA_LOADED,e,this)},i);for(var e=0;e<o.length;e++){var t=h(e);t&&(t.mode=e===n?m.default.TEXT_SHOWING:m.default.TEXT_HIDDEN)}}(),y.trigger(w.default.TEXT_TRACKS_QUEUE_INITIALIZED,{index:f,tracks:o})}()):u.error("Trying to add too many tracks.")},addCaptions:function(e,t,n){var r=h(e),i=this;if(r&&Array.isArray(n)&&0!==n.length)for(var a=0;a<n.length;a++){var o=void 0,s=n[a];r.cellResolution=s.cellResolution,r.isFromCEA608=s.isFromCEA608,"html"===s.type&&b?((o=new l(s.start-t,s.end-t,"")).cueHTMLElement=s.cueHTMLElement,o.isd=s.isd,o.images=s.images,o.embeddedImages=s.embeddedImages,o.cueID=s.cueID,o.scaleCue=c.bind(i),o.cellResolution=s.cellResolution,o.lineHeight=s.lineHeight,o.linePadding=s.linePadding,o.fontSize=s.fontSize,b.style.left=S+"px",b.style.top=A+"px",b.style.width=I+"px",b.style.height=R+"px",o.onenter=function(){r.mode===m.default.TEXT_SHOWING&&(this.isd?(p(this),u.debug("Cue enter id:"+this.cueID)):(b.appendChild(this.cueHTMLElement),c.call(i,this),y.trigger(w.default.CAPTION_RENDERED,{captionDiv:this.cueHTMLElement,currentTrackIdx:f})))},o.onexit=function(){if(b)for(var e=b.childNodes,t=0;t<e.length;++t)e[t].id===this.cueID&&(u.debug("Cue exit id:"+e[t].id),b.removeChild(e[t]),--t)}):s.data&&(o=new l(s.start-t,s.end-t,s.data),s.styles&&(void 0!==s.styles.align&&"align"in o&&(o.align=s.styles.align),void 0!==s.styles.line&&"line"in o&&(o.line=s.styles.line),void 0!==s.styles.position&&"position"in o&&(o.position=s.styles.position),void 0!==s.styles.size&&"size"in o&&(o.size=s.styles.size)),o.onenter=function(){r.mode===m.default.TEXT_SHOWING&&y.trigger(w.default.CAPTION_RENDERED,{currentTrackIdx:f})});try{o?r.addCue(o):u.error("impossible to display subtitles.")}catch(e){throw _(r),r.addCue(o),e}}},getCurrentTrackIdx:function(){return f},setCurrentTrackIdx:g,getTrackIdxForId:function(e){for(var t=-1,n=0;n<o.length;n++)if(o[n].id===e){t=n;break}return t},getCurrentTrackInfo:function(){return o[f]},setModeForTrackIdx:function(e,t){var n=h(e);n&&n.mode!==t&&(n.mode=t)},deleteCuesFromTrackIdx:function(e,t,n){var r=h(e);r&&_(r,t,n)},deleteAllTextTracks:function(){for(var e=a?a.length:0,t=0;t<e;t++){var n=h(t);n&&(_.call(this,n),n.mode="disabled")}a=[],o=[],r&&(clearInterval(r),r=null),f=-1,E.call(this)},deleteTextTrack:function(e){T.removeChild(a[e]),a.splice(e,1)},setConfig:function(e){e&&e.videoModel&&(T=e.videoModel)}},u=(0,N.default)(e).getInstance().getLogger(t),t}a.__dashjs_factory_name="TextTracks",n.default=i.default.getSingletonFactory(a),t.exports=n.default},{108:108,17:17,219:219,45:45,46:46,47:47,54:54}],204:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var i=r(e(47)),a=r(e(108)),c=r(e(235)),o=r(e(205)),s=r(e(225)),h=e(80);function u(e){var t,n=this.context,d=void 0;function r(){d&&d.reset()}return t={get:function(e,t){var n,r=d.getCurrentTrack(),i=void 0;if(!r||r.segmentDuration<=0||null==e)return null;isNaN(r.segmentDuration)&&(i=d.getThumbnailRequestForTime(e))&&(r.segmentDuration=i.duration),n=e%r.segmentDuration;var a,o,s,u=Math.floor(n*r.tilesHor*r.tilesVert/r.segmentDuration),l=new c.default;if(l.width=Math.floor(r.widthPerTile),l.height=Math.floor(r.heightPerTile),l.x=Math.floor(u%r.tilesHor)*r.widthPerTile,l.y=Math.floor(u/r.tilesHor)*r.heightPerTile,"readThumbnail"in r)return r.readThumbnail(e,function(e){l.url=e,t&&t(l)});if(i)l.url=i.url,r.segmentDuration=NaN;else{var f=Math.floor(e/r.segmentDuration);l.url=(o=f+(a=r).startNumber,s=(0,h.replaceTokenForTemplate)(a.templateUrl,"Number",o),s=(0,h.replaceTokenForTemplate)(s,"Time",(o-1)*a.segmentDuration),s=(0,h.replaceTokenForTemplate)(s,"Bandwidth",a.bandwidth),(0,h.unescapeDollarsInTemplate)(s))}return t&&t(l),l},setTrackByIndex:function(e){d.setTrackByIndex(e)},getCurrentTrackIndex:function(){return d.getCurrentTrackIndex()},getBitrateList:function(){var e=d.getTracks(),n=0;return e.map(function(e){var t=new s.default;return t.mediaType=a.default.IMAGE,t.qualityIndex=n++,t.bitrate=e.bitrate,t.width=e.width,t.height=e.height,t})},reset:r},r(),d=(0,o.default)(n).create({adapter:e.adapter,baseURLController:e.baseURLController,stream:e.stream,timelineConverter:e.timelineConverter,debug:e.debug,eventBus:e.eventBus,events:e.events,dashConstants:e.dashConstants}),t}u.__dashjs_factory_name="ThumbnailController",n.default=i.default.getClassFactory(u),t.exports=n.default},{108:108,205:205,225:225,235:235,47:47,80:80}],205:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var T=r(e(108)),S=r(e(61)),i=r(e(47)),A=r(e(236)),I=r(e(221)),R=e(80),b=r(e(54)),D=r(e(207)),M=r(e(159)),C=r(e(57)),w=["http://dashif.org/thumbnail_tile","http://dashif.org/guidelines/thumbnail_tile"];function a(e){var t,n=this.context,u=e.adapter,s=e.baseURLController,r=e.stream,l=e.timelineConverter,i=e.debug,a=e.eventBus,o=e.events,f=e.dashConstants,d=(0,I.default)(n).getInstance(),c=void 0,h=void 0,p=void 0,g=void 0,_=void 0,E=void 0;function m(){y(),_=(0,M.default)(n).create({}),E=(0,D.default)(n).getInstance(),(h=(0,C.default)(n).create({timelineConverter:l,baseURLController:s,debug:i,eventBus:a,events:o,dashConstants:f})).initialize(!!u&&u.getIsDynamic()),function(){if(!r||!u)return;var e=r.getStreamInfo();if(!e)return;if(!(g=u.getMediaInfoForType(e,T.default.IMAGE)))return;var t=u.getVoRepresentations(g);t&&0<t.length&&t.forEach(function(e){(e.segmentInfoType===S.default.SEGMENT_TEMPLATE&&0<e.segmentDuration&&e.media||e.segmentInfoType===S.default.SEGMENT_TIMELINE)&&v(e),e.segmentInfoType===S.default.SEGMENT_BASE&&v(e,!0)});0<c.length&&(c.sort(function(e,t){return e.bitrate-t.bitrate}),p=c.length-1)}()}function v(e,t){var n,r,i=new A.default;i.id=e.id,i.bitrate=e.bandwidth,i.width=e.width,i.height=e.height,i.tilesHor=1,i.tilesVert=1,e.essentialProperties&&e.essentialProperties.forEach(function(e){if(0<=w.indexOf(e.schemeIdUri)&&e.value){var t=e.value.split("x");2!==t.length||isNaN(t[0])||isNaN(t[1])||(i.tilesHor=parseInt(t[0],10),i.tilesVert=parseInt(t[1],10))}}),t?a.trigger(b.default.SEGMENTBASE_SEGMENTSLIST_REQUEST_NEEDED,{mimeType:g.mimeType,mediaType:T.default.IMAGE,representation:e,function:function(e,r){var o=[];e=function(e,t){var n,r=[],i=0,a=void 0,o=void 0,s=void 0;for(a=0,n=e.length;a<n;a++)o=e[a],(s=(0,R.getTimeBasedSegment)(l,u.getIsDynamic(),t,o.startTime,o.duration,o.timescale,o.media,o.mediaRange,i))&&(r.push(s),s=null,i++);return r}(e,r),i.segmentDuration=e[0].duration,i.readThumbnail=function(t,a){var n=null;o.some(function(e){if(e.start<=t&&e.end>t)return n=e.url,!0}),n?a(n):e.some(function(i){if(i.mediaStartTime<=t&&i.mediaStartTime+i.duration>t){var e=s.resolve(r.path);return _.load({method:"get",url:e.url,request:{range:i.mediaRange,responseType:"arraybuffer"},onload:function(e){var t=E.getSamplesInfo(e.target.response),n=new Blob([e.target.response.slice(t.sampleList[0].offset,t.sampleList[0].offset+t.sampleList[0].size)],{type:"image/jpeg"}),r=window.URL.createObjectURL(n);o.push({start:i.mediaStartTime,end:i.mediaStartTime+i.duration,url:r}),a&&a(r)}}),!0}})}}}):(i.startNumber=e.startNumber,i.segmentDuration=e.segmentDuration,i.timescale=e.timescale,i.templateUrl=(n=e,(r=d.isRelative(n.media)?d.resolve(n.media,s.resolve(n.path).url):n.media)?(0,R.replaceIDForTemplate)(r,n.id):"")),0<i.tilesHor&&0<i.tilesVert&&(i.widthPerTile=i.width/i.tilesHor,i.heightPerTile=i.height/i.tilesVert,c.push(i))}function y(){c=[],p=-1,g=null}return t={initialize:m,getTracks:function(){return c},reset:y,setTrackByIndex:function(e){c&&0!==c.length&&(e>=c.length&&(e=c.length-1),p=e)},getCurrentTrack:function(){return p<0?null:c[p]},getCurrentTrackIndex:function(){return p},getThumbnailRequestForTime:function(e){for(var t=void 0,n=u.getVoRepresentations(g),r=0;r<n.length;r++)if(c[p].id===n[r].id){t=n[r];break}return h.getSegmentRequestForTime(g,t,e)}},m(),t}n.THUMBNAILS_SCHEME_ID_URIS=w,a.__dashjs_factory_name="ThumbnailTracks",n.default=i.default.getClassFactory(a)},{108:108,159:159,207:207,221:221,236:236,47:47,54:54,57:57,61:61,80:80}],206:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var u=r(e(51)),l=r(e(46)),f=r(e(54)),d=r(e(113)),c=r(e(224)),h=r(e(223)),i=r(e(47)),p=r(e(226)),g=e(219);function a(){var e,t=this.context,i=(0,l.default)(t).getInstance(),n=void 0,a=void 0,r=void 0,o=void 0;function s(){n.reset()}return e={chooseSelector:function(e){(0,g.checkParameterType)(e,"boolean"),o=e?r:a},select:function(e){if(e){var t=e.baseUrls,n=e.selectedIdx;if(!isNaN(n))return t[n];var r=o.select(t);return r?(e.selectedIdx=t.indexOf(r),r):(i.trigger(f.default.URL_RESOLUTION_FAILED,{error:new p.default(u.default.URL_RESOLUTION_FAILED_GENERIC_ERROR_CODE,u.default.URL_RESOLUTION_FAILED_GENERIC_ERROR_MESSAGE)}),void(o===a&&s()))}},reset:s,setConfig:function(e){e.selector&&(o=e.selector)}},n=(0,d.default)(t).create({updateEventName:f.default.SERVICE_LOCATION_BLACKLIST_CHANGED,addBlacklistEventName:f.default.SERVICE_LOCATION_BLACKLIST_ADD}),a=(0,h.default)(t).create({blacklistController:n}),r=(0,c.default)(t).create({blacklistController:n}),o=a,e}a.__dashjs_factory_name="BaseURLSelector",n.default=i.default.getClassFactory(a),t.exports=n.default},{113:113,219:219,223:223,224:224,226:226,46:46,47:47,51:51,54:54}],207:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var i=r(e(45)),o=r(e(215)),a=r(e(47)),s=r(e(9)),c=r(e(231));function u(){var a=void 0,e=void 0,r=this.context;function P(e){if(!e)return null;void 0===e.fileStart&&(e.fileStart=0);var t=s.default.parseBuffer(e),n=(0,o.default)(r).create();return n.setData(t),n}return e={parse:P,findLastTopIsoBoxCompleted:function(e,t,n){if(void 0===n&&(n=0),!t||n+8>=t.byteLength)return new c.default(0,!1);for(var r,i,a,o,s=t instanceof ArrayBuffer?new Uint8Array(t):t,u=void 0,l=0;n<s.byteLength;){var f=(a=s)[(o=n)+3]>>>0|a[o+2]<<8>>>0|a[o+1]<<16>>>0|a[o]<<24>>>0,d=(r=s,i=n+4,String.fromCharCode(r[i++])+String.fromCharCode(r[i++])+String.fromCharCode(r[i++])+String.fromCharCode(r[i]));if(0==f)break;n+f<=s.byteLength&&(0<=e.indexOf(d)?u=new c.default(n,!0,f):l=n+f),n+=f}return u||new c.default(l,!1)},getMediaTimescaleFromMoov:function(e){var t=P(e),n=t?t.getBox("mdhd"):void 0;return n?n.timescale:NaN},getSamplesInfo:function(e){if(!e||0===e.byteLength)return{sampleList:[],lastSequenceNumber:NaN,totalDuration:NaN,numSequences:NaN};var t,n,r=P(e),i=r.getBoxes("moof"),a=r.getBoxes("mfhd"),o=void 0,s=void 0,u=void 0,l=void 0,f=void 0,d=void 0,c=void 0,h=void 0,p=void 0,g=void 0,_=void 0,E=void 0,m=void 0,v=void 0;n=r.getBoxes("moof").length,t=a[a.length-1].sequence_number,f=[];var y=-1,T=-1;for(g=s=0;g<i.length;g++){var S=i[g],A=S.getChildBoxes("traf");for(h=0;h<A.length;h++){var I=A[h],R=I.getChildBox("tfhd"),b=I.getChildBox("tfdt");l=b.baseMediaDecodeTime;var D=I.getChildBoxes("trun"),M=I.getChildBoxes("subs");for(p=0;p<D.length;p++){var C=D[p];for(s=C.sample_count,m=(R.base_data_offset||0)+(C.data_offset||0),c=0;c<s;c++){o=void 0!==(d=C.samples[c]).sample_duration?d.sample_duration:R.default_sample_duration,u=void 0!==d.sample_size?d.sample_size:R.default_sample_size;var w={dts:l,cts:l+(void 0!==d.sample_composition_time_offset?d.sample_composition_time_offset:0),duration:o,offset:S.offset+m,size:u,subSizes:[u]};if(M)for(_=0;_<M.length;_++){var N=M[_];if(y<N.entry_count-1&&T<c&&(y++,T+=N.entries[y].sample_delta),c==T){w.subSizes=[];var O=N.entries[y];for(E=0;E<O.subsample_count;E++)w.subSizes.push(O.subsamples[E].subsample_size)}}f.push(w),m+=u,l+=o}}v=l-b.baseMediaDecodeTime}}return{sampleList:f,lastSequenceNumber:t,totalDuration:v,numSequences:n}},findInitRange:function(e){var t=null,n=P(e);if(!n)return t;var r=n.getBox("ftyp"),i=n.getBox("moov");return a.debug("Searching for initialization."),i&&i.isComplete&&(t=(r?r.offset:i.offset)+"-"+(i.offset+i.size-1),a.debug("Found the initialization. Range: "+t)),t}},a=(0,i.default)(r).getInstance().getLogger(e),e}u.__dashjs_factory_name="BoxParser",n.default=a.default.getSingletonFactory(u),t.exports=n.default},{215:215,231:231,45:45,47:47,9:9}],208:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r,i=e(47),a=(r=i)&&r.__esModule?r:{default:r};function o(){var e,t=void 0;return t=!(e={supportsMediaSource:function(){var e="WebKitMediaSource"in window,t="MediaSource"in window;return e||t},supportsEncryptedMedia:function(){return t},supportsCodec:function(e){return!!("MediaSource"in window&&MediaSource.isTypeSupported(e))||!!("WebKitMediaSource"in window&&WebKitMediaSource.isTypeSupported(e))},setEncryptedMediaSupported:function(e){t=e}}),e}o.__dashjs_factory_name="Capabilities",n.default=a.default.getSingletonFactory(o),t.exports=n.default},{47:47}],209:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r,i=e(47),a=(r=i)&&r.__esModule?r:{default:r},o=e(219);function s(){return{customTimeRangeArray:[],length:0,add:function(e,t){var n=0;for(n=0;n<this.customTimeRangeArray.length&&e>this.customTimeRangeArray[n].start;n++);for(this.customTimeRangeArray.splice(n,0,{start:e,end:t}),n=0;n<this.customTimeRangeArray.length-1;n++)this.mergeRanges(n,n+1)&&n--;this.length=this.customTimeRangeArray.length},clear:function(){this.customTimeRangeArray=[],this.length=0},remove:function(e,t){for(var n=0;n<this.customTimeRangeArray.length;n++)if(e<=this.customTimeRangeArray[n].start&&t>=this.customTimeRangeArray[n].end)this.customTimeRangeArray.splice(n,1),n--;else{if(e>this.customTimeRangeArray[n].start&&t<this.customTimeRangeArray[n].end){this.customTimeRangeArray.splice(n+1,0,{start:t,end:this.customTimeRangeArray[n].end}),this.customTimeRangeArray[n].end=e;break}e>this.customTimeRangeArray[n].start&&e<this.customTimeRangeArray[n].end?this.customTimeRangeArray[n].end=e:t>this.customTimeRangeArray[n].start&&t<this.customTimeRangeArray[n].end&&(this.customTimeRangeArray[n].start=t)}this.length=this.customTimeRangeArray.length},mergeRanges:function(e,t){var n=this.customTimeRangeArray[e],r=this.customTimeRangeArray[t];return n.start<=r.start&&r.start<=n.end&&n.end<=r.end?(n.end=r.end,this.customTimeRangeArray.splice(t,1),!0):r.start<=n.start&&n.start<=r.end&&r.end<=n.end?(n.start=r.start,this.customTimeRangeArray.splice(t,1),!0):r.start<=n.start&&n.start<=r.end&&n.end<=r.end?(this.customTimeRangeArray.splice(e,1),!0):n.start<=r.start&&r.start<=n.end&&r.end<=n.end&&(this.customTimeRangeArray.splice(t,1),!0)},start:function(e){return(0,o.checkInteger)(e),e>=this.customTimeRangeArray.length||e<0?NaN:this.customTimeRangeArray[e].start},end:function(e){return(0,o.checkInteger)(e),e>=this.customTimeRangeArray.length||e<0?NaN:this.customTimeRangeArray[e].end}}}s.__dashjs_factory_name="CustomTimeRanges",n.default=a.default.getClassFactory(s),t.exports=n.default},{219:219,47:47}],210:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var i=r(e(47)),f=r(e(45)),d=r(e(108)),c=[{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"}],h="dashjs_?_bitrate",p="dashjs_?_settings",g="localStorage",_="lastBitrate",E="lastMediaSettings";function a(e){e=e||{};var t=this.context,o=e.settings,n=void 0,s=void 0,r=void 0;function i(e){if(void 0!==r)return r;r=!1;var t=void 0;try{"undefined"!=typeof window&&(t=window[e])}catch(e){return s.warn("DOMStorage access denied: "+e.message),r}if(!t||e!==g&&"sessionStorage"!==e)return r;try{t.setItem("1","1"),t.removeItem("1"),r=!0}catch(e){s.warn("DOMStorage is supported, but cannot be used: "+e.message)}return r}function a(){return 6e5*Math.round((new Date).getTime()/6e5)}function u(e,t){return i(e)&&o.get().streaming[t+"CachingInfo"].enabled}function l(){if(!o)throw new Error(d.default.MISSING_CONFIG_ERROR)}return n={getSavedBitrateSettings:function(e){var t=NaN;if(l(),u(g,_)){var n=h.replace(/\?/,e);try{var r=JSON.parse(localStorage.getItem(n))||{},i=(new Date).getTime()-parseInt(r.timestamp,10)>=o.get().streaming.lastBitrateCachingInfo.ttl||!1,a=parseFloat(r.bitrate);isNaN(a)||i?i&&localStorage.removeItem(n):(t=a,s.debug("Last saved bitrate for "+e+" was "+a))}catch(e){return null}}return t},setSavedBitrateSettings:function(e,t){if(u(g,_)&&t){var n=h.replace(/\?/,e);try{localStorage.setItem(n,JSON.stringify({bitrate:t.toFixed(3),timestamp:a()}))}catch(e){s.error(e.message)}}},getSavedMediaSettings:function(e){var t=null;if(l(),u(g,E)){var n=p.replace(/\?/,e);try{var r=JSON.parse(localStorage.getItem(n))||{},i=(new Date).getTime()-parseInt(r.timestamp,10)>=o.get().streaming.lastMediaSettingsCachingInfo.ttl||!1;t=r.settings,i&&(localStorage.removeItem(n),t=null)}catch(e){return null}}return t},setSavedMediaSettings:function(e,t){if(u(g,E)){var n=p.replace(/\?/,e);try{localStorage.setItem(n,JSON.stringify({settings:t,timestamp:a()}))}catch(e){s.error(e.message)}}}},s=(0,f.default)(t).getInstance().getLogger(n),i(g)&&c.forEach(function(e){var t=localStorage.getItem(e.oldKey);if(t){localStorage.removeItem(e.oldKey);try{localStorage.setItem(e.newKey,t)}catch(e){s.error(e.message)}}}),n}a.__dashjs_factory_name="DOMStorage";var o=i.default.getSingletonFactory(a);n.default=o,t.exports=n.default},{108:108,45:45,47:47}],211:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r,i=e(47),a=(r=i)&&r.__esModule?r:{default:r};function o(){function e(t,e){try{return new window.URL(t,e).toString()}catch(e){return t}}function t(e,t){var n=s;if(!t)return e;if(!f(e))return e;d(e)&&(n=u),c(e)&&(n=l);var r=n(t),i="/"!==r.charAt(r.length-1)&&"/"!==e.charAt(0)?"/":"";return[r,e].join(i)}var n=void 0,r=/^[a-z][a-z0-9+\-_.]*:/i,i=/^https?:\/\//i,a=/^https:\/\//i,o=/^([a-z][a-z0-9+\-_.]*:\/\/[^\/]+)\/?/i;function s(e){var t=e.indexOf("/"),n=e.lastIndexOf("/");return-1!==t?n===t+1?e:(-1!==e.indexOf("?")&&(e=e.substring(0,e.indexOf("?"))),e.substring(0,n+1)):""}function u(e){var t=e.match(o);return t?t[1]:""}function l(e){var t=e.match(r);return t?t[0]:""}function f(e){return!r.test(e)}function d(e){return f(e)&&"/"===e.charAt(0)}function c(e){return 0===e.indexOf("//")}return function(){try{new window.URL("x","http://y");n=e}catch(e){}finally{n=n||t}}(),{parseBaseUrl:s,parseOrigin:u,parseScheme:l,isRelative:f,isPathAbsolute:d,isSchemeRelative:c,isHTTPURL:function(e){return i.test(e)},isHTTPS:function(e){return a.test(e)},removeHostname:function(e){return/^(?:\w+\:\/\/)?([^\/]+)(.*)$/.exec(e)[2].substring(1)},resolve:function(e,t){return n(e,t)}}}o.__dashjs_factory_name="DefaultURLUtils",n.default=a.default.getSingletonFactory(o),t.exports=n.default},{47:47}],212:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r,i=e(47),a=(r=i)&&r.__esModule?r:{default:r};function o(e){e=e||{};var n=void 0,s=new DataView(e.data),u=0;function i(e,t){var n=!0,r=0;if(void 0===t&&(t=!1),r=16777215<e.tag?(s.getUint32(u)!==e.tag&&(n=!1),4):65535<e.tag?(256*s.getUint16(u)+s.getUint8(u+2)!==e.tag&&(n=!1),3):255<e.tag?(s.getUint16(u)!==e.tag&&(n=!1),2):(s.getUint8(u)!==e.tag&&(n=!1),1),!n&&e.required&&!t)throw new Error("required tag not found");return n&&(u+=r),n}function a(e){var t=1,n=128,r=-1,i=0,a=s.getUint8(u),o=0;for(o=0;o<8;o+=1){if((a&n)===n){i=void 0===e?a&~n:a,r=o;break}n>>=1}for(o=0;o<r;o+=1,t+=1)i=i<<8|255&s.getUint8(u+t);return u+=t,i}return n={getPos:function(){return u},setPos:function(e){u=e},consumeTag:i,consumeTagAndSize:function(e,t){var n=i(e,t);return n&&a(),n},parseTag:function(e){var t;return i(e),t=a(),n[e.parse](t)},skipOverElement:function(e,t){var n=i(e,t),r=void 0;return n&&(r=a(),u+=r),n},getMatroskaCodedNum:a,getMatroskaFloat:function(e){var t=void 0;switch(e){case 4:t=s.getFloat32(u),u+=4;break;case 8:t=s.getFloat64(u),u+=8}return t},getMatroskaUint:function(e){for(var t=0,n=0;n<e;n+=1)t<<=8,t|=255&s.getUint8(u+n);return u+=e,t},moreData:function(){return u<s.byteLength}}}o.__dashjs_factory_name="EBMLParser",n.default=a.default.getClassFactory(o),t.exports=n.default},{47:47}],213:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var i=r(e(46)),a=r(e(54)),o=r(e(47));function s(){var e=this.context,t=(0,i.default)(e).getInstance();return{error:function(e){t.trigger(a.default.ERROR,{error:e})}}}s.__dashjs_factory_name="ErrorHandler",n.default=o.default.getSingletonFactory(s),t.exports=n.default},{46:46,47:47,54:54}],214:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r,i=e(47),a=(r=i)&&r.__esModule?r:{default:r};function o(){var r={};return{save:function(e){var t=e.streamId,n=e.representationId;r[t]=r[t]||{},r[t][n]=e},extract:function(e,t){return r&&r[e]&&r[e][t]?r[e][t]:null},reset:function(){r={}}}}o.__dashjs_factory_name="InitCache",n.default=a.default.getSingletonFactory(o),t.exports=n.default},{47:47}],215:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var i=r(e(230)),a=r(e(47));function o(){var o=void 0;function t(e){var t=[];if(!e||!o||"function"!=typeof o.fetchAll)return t;for(var n=o.fetchAll(e),r=void 0,i=0,a=n.length;i<a;i++)(r=s(n[i]))&&t.push(r);return t}function s(e){if(!e)return null;var t=new i.default(e);return e.hasOwnProperty("_incomplete")&&(t.isComplete=!e._incomplete),t}return{getBox:function(e){return e&&o&&o.boxes&&0!==o.boxes.length&&"function"==typeof o.fetch?s(o.fetch(e)):null},getBoxes:t,setData:function(e){o=e},getLastBox:function(){if(!o||!o.boxes||!o.boxes.length)return null;var e=t(o.boxes[o.boxes.length-1].type);return 0<e.length?e[e.length-1]:null}}}o.__dashjs_factory_name="IsoFile",n.default=a.default.getClassFactory(o),t.exports=n.default},{230:230,47:47}],216:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var i=r(e(47)),a=r(e(108));function o(e){var r=(e=e||{}).timelineConverter;return{getLiveEdge:function(e){!function(){if(!r||!r.hasOwnProperty("getExpectedLiveEdge"))throw new Error(a.default.MISSING_CONFIG_ERROR)}();var t=e.DVRWindow?e.DVRWindow.end:0,n=t;return e.useCalculatedLiveEdgeTime&&(n=r.getExpectedLiveEdge(),r.setClientTimeOffset(n-t)),n},reset:function(){r=null}}}o.__dashjs_factory_name="LiveEdgeFinder",n.default=i.default.getClassFactory(o),t.exports=n.default},{108:108,47:47}],217:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var i=r(e(47)),a=r(e(12));function o(){return{areEqual:function(e,t){return(0,a.default)(e,t)}}}o.__dashjs_factory_name="ObjectUtils",n.default=i.default.getSingletonFactory(o),t.exports=n.default},{12:12,47:47}],218:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r,i=e(47),a=(r=i)&&r.__esModule?r:{default:r};function o(){return{modifyRequestURL:function(e){return e},modifyRequestHeader:function(e){return e}}}o.__dashjs_factory_name="RequestModifier",n.default=a.default.getSingletonFactory(o),t.exports=n.default},{47:47}],219:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.checkParameterType=function(e,t){if(typeof e!==t)throw a.default.BAD_ARGUMENT_ERROR},n.checkInteger=function(e){if(null===e||isNaN(e)||e%1!=0)throw a.default.BAD_ARGUMENT_ERROR+" : argument is not an integer"},n.checkRange=function(e,t,n){if(e<t||n<e)throw a.default.BAD_ARGUMENT_ERROR+" : argument out of range"},n.checkIsVideoOrAudioType=function(e){if("string"!=typeof e||e!==a.default.AUDIO&&e!==a.default.VIDEO)throw a.default.BAD_ARGUMENT_ERROR};var r,i=e(108),a=(r=i)&&r.__esModule?r:{default:r}},{108:108}],220:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var i=r(e(47)),a=r(e(45)),o=r(e(46)),S=r(e(54)),A=e(17);function s(){var e=this.context,v=(0,o.default)(e).getInstance(),t=void 0,y=void 0,T=0;return t={parse:function(e,t,n,r,i){var a="",o=[],s=void 0,u=void 0,l=void 0,f={},d={},c="",h="",p={onOpenTag:function(e,t,n){if("image"===t&&"http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt"===e){if(!n[" imagetype"]||"PNG"!==n[" imagetype"].value)return void y.warn("smpte-tt imagetype != PNG. Discarded");c=n["http://www.w3.org/XML/1998/namespace id"].value}},onCloseTag:function(){c&&(d[c]=h.trim()),c=h=""},onText:function(e){c&&(h+=e)}};if(!e)throw a="no ttml data to parse",new Error(a);f.data=e,v.trigger(S.default.TTML_TO_PARSE,f);var g=(0,A.fromXML)(f.data,function(e){a=e},p);v.trigger(S.default.TTML_PARSED,{ttmlString:f.data,ttmlDoc:g});var _,E=g.getMediaTimeEvents();for(l=0;l<E.length;l++){var m=(0,A.generateISD)(g,E[l],function(e){a=e});m.contents.some(function(e){return e.contents.length})&&(s=E[l]+t<n?n:E[l]+t)<(u=E[l+1]+t>r?r:E[l+1]+t)&&o.push({start:s,end:u,type:"html",cueID:(_="cue_TTML_"+T,T++,_),isd:m,images:i,embeddedImages:d})}if(""!==a)throw y.error(a),new Error(a);return o}},y=(0,a.default)(e).getInstance().getLogger(t),t}s.__dashjs_factory_name="TTMLParser",n.default=i.default.getSingletonFactory(s),t.exports=n.default},{17:17,45:45,46:46,47:47,54:54}],221:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var i=r(e(47)),o=r(e(211));function a(){var i=void 0,a=[],e=this.context;function n(e,t,n){var r=function(e){var t=void 0;for(t=0;t<a.length;t++){if(a[t].regex.test(e))return a[t].utils}return i}(n||t);return r&&"function"==typeof r[e]?r[e](t,n):i[e](t,n)}return i=(0,o.default)(e).getInstance(),{registerUrlRegex:function(e,t){a.push({regex:e,utils:t})},parseBaseUrl:function(e){return n("parseBaseUrl",e)},parseOrigin:function(e){return n("parseOrigin",e)},parseScheme:function(e){return n("parseScheme",e)},isRelative:function(e){return n("isRelative",e)},isPathAbsolute:function(e){return n("isPathAbsolute",e)},isSchemeRelative:function(e){return n("isSchemeRelative",e)},isHTTPURL:function(e){return n("isHTTPURL",e)},isHTTPS:function(e){return n("isHTTPS",e)},removeHostname:function(e){return n("removeHostname",e)},resolve:function(e,t){return n("resolve",e,t)}}}a.__dashjs_factory_name="URLUtils";var s=i.default.getSingletonFactory(a);n.default=s,t.exports=n.default},{211:211,47:47}],222:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var i=r(e(47)),a=r(e(45));function o(){var e=this.context,t=void 0,c=void 0,h=void 0,p=void 0,g=void 0,i=void 0;function _(e){var t=e.split(":"),n=t.length-1;return e=60*parseInt(t[n-1],10)+parseFloat(t[n]),2==n&&(e+=3600*parseInt(t[0],10)),e}function E(e){var n,t=e.split(p),r=t[1].split(i);return r.shift(),t[1]=r[0],r.shift(),{cuePoints:t,styles:(n={},r.forEach(function(e){if(1<e.split(/:/).length){var t=e.split(/:/)[1];t&&-1!=t.search(/%/)&&(t=parseInt(t.replace(/%/,""),10)),(e.match(/align/)||e.match(/A/))&&(n.align=t),(e.match(/line/)||e.match(/L/))&&(n.line=t),(e.match(/position/)||e.match(/P/))&&(n.position=t),(e.match(/size/)||e.match(/S/))&&(n.size=t)}}),n)}}function m(e,t){for(var n,r=t,i="",a="";""!==e[r]&&r<e.length;)r++;if(1<(n=r-t))for(var o=0;o<n;o++){if((a=e[t+o]).match(p)){i="";break}i+=a,o!==n-1&&(i+="\n")}else(a=e[t]).match(p)||(i=a);return i}return t={parse:function(e){var t,n=[],r=void 0;if(!e)return n;t=(e=e.split(h)).length,r=-1;for(var i=0;i<t;i++){var a=e[i];if(0<a.length&&"WEBVTT"!==a&&a.match(p)){var o=E(a),s=o.cuePoints,u=o.styles,l=m(e,i+1),f=_(s[0].replace(g,"")),d=_(s[1].replace(g,""));!isNaN(f)&&!isNaN(d)&&r<=f&&f<d?""!==l?(r=f,n.push({start:f,end:d,data:l,styles:u})):c.error("Skipping cue due to empty/malformed cue text"):c.error("Skipping cue due to incorrect cue timing")}}return n}},c=(0,a.default)(e).getInstance().getLogger(t),h=/(?:\r\n|\r|\n)/gm,p=/-->/,g=/(^[\s]+|[\s]+$)/g,i=/\s\b/g,t}o.__dashjs_factory_name="VTTParser",n.default=i.default.getSingletonFactory(o),t.exports=n.default},{45:45,47:47}],223:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r,i=e(47),a=(r=i)&&r.__esModule?r:{default:r};function o(e){var r=(e=e||{}).blacklistController;return{select:function(e){var n=0,t=void 0;return e&&e.some(function(e,t){return n=t,!r.contains(e.serviceLocation)})&&(t=e[n]),t}}}o.__dashjs_factory_name="BasicSelector",n.default=a.default.getClassFactory(o),t.exports=n.default},{47:47}],224:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r,i=e(47),a=(r=i)&&r.__esModule?r:{default:r};function o(e){var n=(e=e||{}).blacklistController;return{select:function(e){return e&&function(e){var t=0,n=[],r=0,i=void 0,a=void 0;if((a=e.sort(function(e,t){var n=e.dvb_priority-t.dvb_priority;return isNaN(n)?0:n}).filter(function(e,t,n){return!t||n[0].dvb_priority&&e.dvb_priority&&n[0].dvb_priority===e.dvb_priority})).length)return 1<a.length&&(a.forEach(function(e){t+=e.dvb_weight,n.push(t)}),i=Math.floor(Math.random()*(t-1)),n.every(function(e,t){return r=t,!(i<e)})),a[r]}((t=[],e.filter(function(e){return!n.contains(e.serviceLocation)||(e.dvb_priority&&t.push(e.dvb_priority),!1)}).filter(function(e){return!t.length||!e.dvb_priority||-1===t.indexOf(e.dvb_priority)})));var t}}}o.__dashjs_factory_name="DVBSelector",n.default=a.default.getClassFactory(o),t.exports=n.default},{47:47}],225:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});n.default=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.mediaType=null,this.bitrate=null,this.width=null,this.height=null,this.scanType=null,this.qualityIndex=NaN},t.exports=n.default},{}],226:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});n.default=function e(t,n,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.code=t||null,this.message=n||null,this.data=r||null},t.exports=n.default},{}],227:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});n.default=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.streamId=null,this.mediaInfo=null,this.segmentType=null,this.quality=NaN,this.index=NaN,this.bytes=null,this.start=NaN,this.end=NaN,this.duration=NaN,this.representationId=null,this.endFragment=null},t.exports=n.default},{}],228:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=function(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),e};function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var a=e(242),o=(r(s,[{key:"isInitializationRequest",value:function(){return this.type&&this.type===a.HTTPRequest.INIT_SEGMENT_TYPE}},{key:"setInfo",value:function(e){this.type=e&&e.init?a.HTTPRequest.INIT_SEGMENT_TYPE:a.HTTPRequest.MEDIA_SEGMENT_TYPE,this.url=e&&e.url?e.url:null,this.range=e&&e.range?e.range.start+"-"+e.range.end:null,this.mediaType=e&&e.mediaType?e.mediaType:null}}]),s);function s(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),this.action=s.ACTION_DOWNLOAD,this.startTime=NaN,this.mediaType=null,this.mediaInfo=null,this.type=null,this.duration=NaN,this.timescale=NaN,this.range=null,this.url=e||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}o.ACTION_DOWNLOAD="download",o.ACTION_COMPLETE="complete",n.default=o,t.exports=n.default},{242:242}],229:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r,i=e(228),a=(function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(o,((r=i)&&r.__esModule?r:{default:r}).default),o);function o(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),function(e,t,n){for(var r=!0;r;){var i=e,a=t,o=n;r=!1,null===i&&(i=Function.prototype);var s=Object.getOwnPropertyDescriptor(i,a);if(void 0!==s){if("value"in s)return s.value;var u=s.get;if(void 0===u)return;return u.call(o)}var l=Object.getPrototypeOf(i);if(null===l)return;e=l,t=a,n=o,r=!0,s=l=void 0}}(Object.getPrototypeOf(o.prototype),"constructor",this).call(this,e),this.checkForExistenceOnly=!0}n.default=a,t.exports=n.default},{228:228}],230:[function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}Object.defineProperty(n,"__esModule",{value:!0});var i=(function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}(a,[{key:"getChildBox",value:function(e){for(var t=0;t<this.boxes.length;t++)if(this.boxes[t].type===e)return this.boxes[t]}},{key:"getChildBoxes",value:function(e){for(var t=[],n=0;n<this.boxes.length;n++)this.boxes[n].type===e&&t.push(this.boxes[n]);return t}}]),a);function a(e){if(!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),this.offset=e._offset,this.type=e.type,this.size=e.size,this.boxes=[],e.boxes)for(var t=0;t<e.boxes.length;t++)this.boxes.push(new a(e.boxes[t]));switch(this.isComplete=!0,e.type){case"sidx":if(this.timescale=e.timescale,this.earliest_presentation_time=e.earliest_presentation_time,this.first_offset=e.first_offset,this.references=e.references,e.references){this.references=[];for(t=0;t<e.references.length;t++){var n={reference_type:e.references[t].reference_type,referenced_size:e.references[t].referenced_size,subsegment_duration:e.references[t].subsegment_duration};this.references.push(n)}}break;case"emsg":this.id=e.id,this.value=e.value,this.timescale=e.timescale,this.scheme_id_uri=e.scheme_id_uri,this.presentation_time_delta=1===e.version?e.presentation_time:e.presentation_time_delta,this.event_duration=e.event_duration,this.message_data=e.message_data;break;case"mdhd":this.timescale=e.timescale;break;case"mfhd":this.sequence_number=e.sequence_number;break;case"subs":this.entry_count=e.entry_count,this.entries=e.entries;break;case"tfhd":this.base_data_offset=e.base_data_offset,this.sample_description_index=e.sample_description_index,this.default_sample_duration=e.default_sample_duration,this.default_sample_size=e.default_sample_size,this.default_sample_flags=e.default_sample_flags,this.flags=e.flags;break;case"tfdt":this.version=e.version,this.baseMediaDecodeTime=e.baseMediaDecodeTime,this.flags=e.flags;break;case"trun":if(this.sample_count=e.sample_count,this.first_sample_flags=e.first_sample_flags,this.data_offset=e.data_offset,this.flags=e.flags,this.samples=e.samples,e.samples){this.samples=[];t=0;for(var r=e.samples.length;t<r;t++){var i={sample_size:e.samples[t].sample_size,sample_duration:e.samples[t].sample_duration,sample_composition_time_offset:e.samples[t].sample_composition_time_offset};this.samples.push(i)}}}}n.default=i,t.exports=n.default},{}],231:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});n.default=function e(t,n,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.lastCompletedOffset=t,this.found=n,this.size=r},t.exports=n.default},{}],232:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});n.default=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.TcpList=[],this.HttpList=[],this.RepSwitchList=[],this.BufferLevel=[],this.BufferState=[],this.PlayList=[],this.DroppedFrames=[],this.SchedulingInfo=[],this.DVRInfo=[],this.ManifestUpdate=[],this.RequestsQueue=null,this.DVBErrors=[]},t.exports=n.default},{}],233:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});function r(e){return e&&e.__esModule?e:{default:e}}var i=r(e(108)),a=(function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(o,r(e(228)).default),o);function o(e,t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),function(e,t,n){for(var r=!0;r;){var i=e,a=t,o=n;r=!1,null===i&&(i=Function.prototype);var s=Object.getOwnPropertyDescriptor(i,a);if(void 0!==s){if("value"in s)return s.value;var u=s.get;if(void 0===u)return;return u.call(o)}var l=Object.getPrototypeOf(i);if(null===l)return;e=l,t=a,n=o,r=!0,s=l=void 0}}(Object.getPrototypeOf(o.prototype),"constructor",this).call(this),this.url=e||null,this.type=t||null,this.mediaType=i.default.STREAM,this.responseType=""}n.default=a,t.exports=n.default},{108:108,228:228}],234:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});n.default=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.captionData=null,this.label=null,this.lang=null,this.defaultTrack=!1,this.kind=null,this.isFragmented=!1,this.isEmbedded=!1},t.exports=n.default},{}],235:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});n.default=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.url=null,this.width=null,this.height=null,this.x=null,this.y=null},t.exports=n.default},{}],236:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});n.default=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),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=""},t.exports=n.default},{}],237:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});n.default=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.t=null,this.xywh=null,this.track=null,this.id=null,this.s=null,this.r=null},t.exports=n.default},{}],238:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});n.default=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.t=null,this.level=null},t.exports=n.default},{}],239:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r,i=e(109),a=(r=i)&&r.__esModule?r:{default:r};n.default=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.target=null,this.state=a.default.BUFFER_EMPTY},t.exports=n.default},{109:109}],240:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});n.default=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.time=null,this.range=null,this.manifestInfo=null},t.exports=n.default},{}],241:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});n.default=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.time=null,this.droppedFrames=null},t.exports=n.default},{}],242:[function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});function i(){r(this,i),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._stream=null,this._tfinish=null,this._mediaduration=null,this._quality=null,this._responseHeaders=null,this._serviceLocation=null}i.GET="GET",i.HEAD="HEAD",i.MPD_TYPE="MPD",i.XLINK_EXPANSION_TYPE="XLinkExpansion",i.INIT_SEGMENT_TYPE="InitializationSegment",i.INDEX_SEGMENT_TYPE="IndexSegment",i.MEDIA_SEGMENT_TYPE="MediaSegment",i.BITSTREAM_SWITCHING_SEGMENT_TYPE="BitstreamSwitchingSegment",i.OTHER_TYPE="other",n.HTTPRequest=i,n.HTTPRequestTrace=function e(){r(this,e),this.s=null,this.d=null,this.b=[]}},{}],243:[function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});n.ManifestUpdate=function e(){r(this,e),this.mediaType=null,this.type=null,this.requestTime=null,this.fetchTime=null,this.availabilityStartTime=null,this.presentationStartTime=0,this.clientTimeOffset=0,this.currentTime=null,this.buffered=null,this.latency=0,this.streamInfo=[],this.representationInfo=[]},n.ManifestUpdateStreamInfo=function e(){r(this,e),this.id=null,this.index=null,this.start=null,this.duration=null},n.ManifestUpdateRepresentationInfo=function e(){r(this,e),this.id=null,this.index=null,this.mediaType=null,this.streamIndex=null,this.presentationTimeOffset=null,this.startNumber=null,this.fragmentInfoType=null}},{}],244:[function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});function i(){r(this,i),this.start=null,this.mstart=null,this.starttype=null,this.trace=[]}i.INITIAL_PLAYOUT_START_REASON="initial_playout",i.SEEK_START_REASON="seek",i.RESUME_FROM_PAUSE_START_REASON="resume",i.METRICS_COLLECTION_START_REASON="metrics_collection_start";function a(){r(this,a),this.representationid=null,this.subreplevel=null,this.start=null,this.mstart=null,this.duration=null,this.playbackspeed=null,this.stopreason=null}a.REPRESENTATION_SWITCH_STOP_REASON="representation_switch",a.REBUFFERING_REASON="rebuffering",a.USER_REQUEST_STOP_REASON="user_request",a.END_OF_PERIOD_STOP_REASON="end_of_period",a.END_OF_CONTENT_STOP_REASON="end_of_content",a.METRICS_COLLECTION_STOP_REASON="metrics_collection_end",a.FAILURE_STOP_REASON="failure",n.PlayList=i,n.PlayListTrace=a},{}],245:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});n.default=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.t=null,this.mt=null,this.to=null,this.lto=null},t.exports=n.default},{}],246:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});n.default=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.loadingRequests=[],this.executedRequests=[]},t.exports=n.default},{}],247:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});n.default=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.mediaType=null,this.t=null,this.type=null,this.startTime=null,this.availabilityStartTime=null,this.duration=null,this.quality=null,this.range=null,this.state=null},t.exports=n.default},{}]},{},[4]);