A self hosted livestreaming server.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.
 
 
 
 
 
 
satyr/site/dashjs/dash.all.min.js

3 lines
572 KiB

/*! v3.0.0-b0f46e83, 2019-06-29T00:07:30Z */
!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 b(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 R(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&&R(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=b(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=b(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)||R(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=b(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 m=A.matchers[g];m.test(h,d)&&(p=m.converter(h.value))}n[A.attributePrefix+h.name]=p}var E=function(e){return e.prefix}(e);return null!=E&&""!=E&&(n.__cnt++,n.__prefix=E),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 R(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&&function(e,t){return-1!==e.indexOf(t,e.length-t.length)}(t.toString(),"_asArray")||0==t.toString().indexOf(A.attributePrefix)||0==t.toString().indexOf("__")||e[t]instanceof Function)}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="";return e instanceof Object?t+=function(e){var t="";return null!=e.__cdata&&(t+="<![CDATA["+e.__cdata+"]]>"),null!=e.__text&&(A.escapeMode?t+=u(e.__text):t+=e.__text),t}(e):null!=e&&(A.escapeMode?t+=u(e):t+=e),t}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+=m(e[a],g(r,t)),i+=f(e[a],t);return i}function m(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||R(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+=m(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 m(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(125)),o=r(e(159)),s=r(e(103)),u=r(e(47));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},{103:103,125:125,159:159,47:47,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(101)),r=t(u(49)),i=t(u(47)),a=u(52),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:{})},{101:101,47:47,49:49,52:52}],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,n){return 3*(t+n)/4-n}(0,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(12);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(F(e,ArrayBuffer)||e&&F(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||e.copy(n,0,0,t),n}if(void 0!==e.length)return"number"!=typeof e.length||U(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)||F(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 P(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return L(e).length;default:if(i)return r?-1:P(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),U(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 m(e,t,n,r){n=Number(n)||0;var i=e.length-n;r?i<(r=Number(r))&&(r=i):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(U(s))return o;e[n+o]=s}return o}function E(e,t,n,r){return x(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){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function y(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<=T)return String.fromCharCode.apply(String,e);var n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=T));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 function(e,t,n){return u(e),e<=0?o(e):void 0!==t?"string"==typeof n?o(e).fill(t,n):o(e).fill(t):o(e)}(e,t,n)},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(F(e,Uint8Array)&&(e=d.from(e,e.offset,e.byteLength)),F(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(F(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?y(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 I(this,t,n);case"utf8":case"utf-8":return y(this,t,n);case"ascii":return S(this,t,n);case"latin1":case"binary":return A(this,t,n);case"base64":return v(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(F(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,c,h,p=!1;;)switch(r){case"hex":return m(this,e,t,n);case"utf8":case"utf-8":return c=t,h=n,x(P(e,(d=this).length-c),d,c,h);case"ascii":return E(this,e,t,n);case"latin1":case"binary":return E(this,e,t,n);case"base64":return u=this,l=t,f=n,x(L(e),u,l,f);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return o=t,s=n,x(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}(e,(a=this).length-o),a,o,s);default:if(p)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),p=!0}},d.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var T=4096;function S(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 A(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 I(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+=N(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 R(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 D(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 M(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 C(e,t,n,r,i){return t=+t,n>>>=0,i||M(e,0,n,4),a.write(e,t,n,r,23,4),n+4}function w(e,t,n,r,i){return t=+t,n>>>=0,i||M(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||R(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||R(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||R(e,1,this.length),this[e]},d.prototype.readUInt16LE=function(e,t){return e>>>=0,t||R(e,2,this.length),this[e]|this[e+1]<<8},d.prototype.readUInt16BE=function(e,t){return e>>>=0,t||R(e,2,this.length),this[e]<<8|this[e+1]},d.prototype.readUInt32LE=function(e,t){return e>>>=0,t||R(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||R(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||R(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||R(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||R(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},d.prototype.readInt16LE=function(e,t){e>>>=0,t||R(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||R(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||R(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||R(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||R(e,4,this.length),a.read(this,e,!0,23,4)},d.prototype.readFloatBE=function(e,t){return e>>>=0,t||R(e,4,this.length),a.read(this,e,!1,23,4)},d.prototype.readDoubleLE=function(e,t){return e>>>=0,t||R(e,8,this.length),a.read(this,e,!0,52,8)},d.prototype.readDoubleBE=function(e,t){return e>>>=0,t||R(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||D(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||D(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||D(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||D(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||D(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||D(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||D(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);D(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);D(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||D(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||D(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||D(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||D(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||D(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 C(this,e,t,!0,n)},d.prototype.writeFloatBE=function(e,t,n){return C(this,e,t,!1,n)},d.prototype.writeDoubleLE=function(e,t,n){return w(this,e,t,!0,n)},d.prototype.writeDoubleBE=function(e,t,n){return w(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 N(e){return e<16?"0"+e.toString(16):e.toString(16)}function P(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-=1)<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 L(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 x(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 F(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function U(e){return e!=e}},{12:12,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){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):[]}},{}],11:[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}},{}],12:[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}},{}],13:[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 b(){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 R(){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 O(){}function N(){}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&&E(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 m(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 E(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(41):sax,B="undefined"==typeof imscNames?e(17):imscNames,G="undefined"==typeof imscStyles?e(18):imscStyles,j="undefined"==typeof imscUtils?e(19):imscUtils,U.fromXML=function(e,h,p){var t=k.parser(!0,{xmlns:!0}),g=[],_=[],m=[],E=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?E--:0<E&&p&&"onCloseTag"in p&&p.onCloseTag());m.shift(),_.shift(),g.shift()},t.ontext=function(e){if(void 0===g[0]);else if(g[0]instanceof C||g[0]instanceof M){var t=new d;t.initFromText(v,g[0],e,m[0],h),g[0].contents.push(t)}else g[0]instanceof y&&0<E&&p&&"onText"in p&&p.onText(e)},t.onopentag=function(e){var t=e.attributes["xml:space"];t?m.unshift(t.value):0===m.length?m.unshift("default"):m.unshift(m[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 O?((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 b,g.unshift(v.head.layout);else if("region"===e.local){g[0]instanceof b||F(h,"Parent of <region> element is not <layout> at "+this.line+","+this.column+")");var i=new O;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 R;a.initFromNode(v,e,h),v.body=a,g.unshift(a)}else if("div"===e.local){g[0]instanceof D||g[0]instanceof R||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,m[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 R||g[0]instanceof O||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 N;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)E++;else if(0<E&&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 b);var n=!1;for(var r in v.head.layout.regions){n=!0;break}if(!n){var i=O.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])):E(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;null!==r&&(null!==(n=/(\d+)/.exec(r))?i=parseInt(n[1]):E(t,"Malformed frame rate attribute (using initial value instead)"));var a=g(e,B.ns_ttp,"frameRateMultiplier"),o=1;null!==a&&(null!==(n=/(\d+) (\d+)/.exec(a))?o=parseInt(n[1])/parseInt(n[2]):E(t,"Malformed frame rate multiplier attribute (using initial value instead)"));var s=o*i,u=1,l=g(e,B.ns_ttp,"tickRate");return null===l?null!==r&&(u=s):null!==(n=/(\d+)/.exec(l))?u=parseInt(n[1]):E(t,"Malformed tick rate attribute (using initial value instead)"),{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 E(t,"Malformed extent (ignoring)"),null;var i=j.parseLength(r[0]),a=j.parseLength(r[1]);return a&&i?{h:a,w:i}:(E(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){this.regionID=function(e){return e&&"region"in e.attributes?e.attributes.region.value:""}(n)},o.prototype.initFromNode=function(e,t,n,r){this.styleAttrs=p(n,r),null!==e.head&&null!==e.head.styling&&m(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=function(e,t,n,r){var i=null;n&&"begin"in n.attributes&&null===(i=_(e.tickRate,e.effectiveFrameRate,n.attributes.begin.value))&&E(r,"Malformed begin value "+n.attributes.begin.value+" (using 0)");var a=null;n&&"dur"in n.attributes&&null===(a=_(e.tickRate,e.effectiveFrameRate,n.attributes.dur.value))&&E(r,"Malformed dur value "+n.attributes.dur.value+" (ignoring)");var o=null;return n&&"end"in n.attributes&&null===(o=_(e.tickRate,e.effectiveFrameRate,n.attributes.end.value))&&E(r,"Malformed end value (ignoring)"),{explicit_begin:i,explicit_end:o,explicit_dur:a}}(e,0,n,r);this.explicit_begin=i.explicit_begin,this.explicit_end=i.explicit_end,this.explicit_dur=i.explicit_dur,this.timeContainer=function(e,t){var n=e&&"timeContainer"in e.attributes?e.attributes.timeContainer.value:null;return n&&"par"!==n?"seq"===n?"seq":(x(t,"Illegal value of timeContainer (assuming 'par')"),"par"):"par"}(n,r)},R.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)},O.prototype.createDefaultRegion=function(){var e=new O;return i.call(e,""),o.call(e,{}),s.call(e,[]),l.call(e,0,Number.POSITIVE_INFINITY,null),e},O.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&&m(e.head.styling,h(t),this.styleAttrs,n)},N.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]}}},{17:17,18:18,19:19,41:41}],14:[function(e,t,n){!function(e,t,A){function I(e,t,n){var r;if("region"===n.kind?(r=document.createElement("div")).style.position="absolute":"body"===n.kind?r=document.createElement("div"):"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 m in t.appendChild(r),n.contents)I(e,s,n.contents[m]);var E=[];if((e.lp||e.mra||e.flg)&&"p"===n.kind&&(D(e,s,E,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)}}}(E),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))}}(E,e.lp*e.h,e),e.lp=null),e.flg)){var v=R(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))}}(E,v.before,v.after,e),e.flg=null}if("region"===n.kind&&(D(e,s,E),"tb"===e.bpd&&e.enableRollUp&&0<n.contents.length&&"after"===n.styleAttrs[A.byName.displayAlign.qname])){var y=new b(""===n.id?"_":n.id,E);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 b(e,t){this.id=e,this.plist=t}function R(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=t.style.backgroundColor||r;if(0===t.childElementCount)if("span"===t.localName){var a=t.getBoundingClientRect();if(0===a.height||0===a.width)return;var o=R(a,e);if(0!==n.length&&function(e,t,n,r){return t<r&&n<e||r<=t&&e<=n}(o.before,o.after,n[n.length-1].before,n[n.length-1].after)){var s=Math.sign(o.after-o.before),u=Math.sign(o.end-o.start);s*(o.before-n[n.length-1].before)<0&&(n[n.length-1].before=o.before),0<s*(o.after-n[n.length-1].after)&&(n[n.length-1].after=o.after),u*(o.start-n[n.length-1].start)<0&&(n[n.length-1].start=o.start,n[n.length-1].start_elem=n[n.length-1].elements.length),0<u*(o.end-n[n.length-1].end)&&(n[n.length-1].end=o.end,n[n.length-1].end_elem=n[n.length-1].elements.length)}else n.push({before:o.before,after:o.after,start:o.start,end:o.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:i,before:o.before,after:o.after})}else"br"===t.localName&&0!==n.length&&(n[n.length-1].br=!0);else for(var l=t.firstChild;l;)l.nodeType===Node.ELEMENT_NODE&&D(e,l,n,i),l=l.nextSibling}function n(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 n("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 n("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 n("http://www.w3.org/ns/ttml#styling direction",function(e,t,n,r){t.style.direction=r}),new n("http://www.w3.org/ns/ttml#styling display",function(e,t,n,r){}),new n("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 n("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 n("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 n("http://www.w3.org/ns/ttml#styling fontSize",function(e,t,n,r){t.style.fontSize=r*e.h+"px"}),new n("http://www.w3.org/ns/ttml#styling fontStyle",function(e,t,n,r){t.style.fontStyle=r}),new n("http://www.w3.org/ns/ttml#styling fontWeight",function(e,t,n,r){t.style.fontWeight=r}),new n("http://www.w3.org/ns/ttml#styling lineHeight",function(e,t,n,r){t.style.lineHeight="normal"===r?"normal":r*e.h+"px"}),new n("http://www.w3.org/ns/ttml#styling opacity",function(e,t,n,r){t.style.opacity=r}),new n("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 n("http://www.w3.org/ns/ttml#styling overflow",function(e,t,n,r){t.style.overflow=r}),new n("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 n("http://www.w3.org/ns/ttml#styling showBackground",null),new n("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 n("http://www.w3.org/ns/ttml#styling textDecoration",function(e,t,n,r){t.style.textDecoration=r.join(" ").replace("lineThrough","line-through")}),new n("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 n("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 n("http://www.w3.org/ns/ttml#styling visibility",function(e,t,n,r){t.style.visibility=r}),new n("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 n("http://www.w3.org/ns/ttml#styling writingMode",function(e,t,n,r){"lrtb"===r||"lr"===r?t.style.writingMode="horizontal-tb":"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 n("http://www.w3.org/ns/ttml#styling zIndex",function(e,t,n,r){t.style.zIndex=r}),new n("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 n("http://www.w3.org/ns/ttml/profile/imsc1#styling forcedDisplay",function(e,t,n,r){e.displayForcedOnlyMode&&!1===r&&(t.style.visibility="hidden")})],r={};for(var i in M)r[M[i].qname]=M[i]}(void 0===n?this.imscHTML={}:n,"undefined"==typeof imscNames?e(17):imscNames,"undefined"==typeof imscStyles?e(18):imscStyles)},{17:17,18:18}],15:[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 m=U.all[_];if(m.qname===U.byName.textDecoration.qname){var E=i.styleAttrs[m.qname],v=f.styleAttrs[m.qname],y=[];void 0===v?y=E:-1===v.indexOf("none")?((-1===v.indexOf("noUnderline")&&-1!==E.indexOf("underline")||-1!==v.indexOf("underline"))&&y.push("underline"),(-1===v.indexOf("noLineThrough")&&-1!==E.indexOf("lineThrough")||-1!==v.indexOf("lineThrough"))&&y.push("lineThrough"),(-1===v.indexOf("noOverline")&&-1!==E.indexOf("overline")||-1!==v.indexOf("overline"))&&y.push("overline")):y.push("none"),f.styleAttrs[m.qname]=y}else m.inherit&&m.qname in i.styleAttrs&&!(m.qname in f.styleAttrs)&&(f.styleAttrs[m.qname]=i.styleAttrs[m.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 b=I.compute(e,i,f,f.styleAttrs[I.qname],u);null!==b?f.styleAttrs[I.qname]=b:F(s,"Style '"+I.qname+"' on element '"+f.kind+"' cannot be computed")}}if("none"===f.styleAttrs[U.byName.display.qname])return null;for(var R in null===i?c=null===r?[]:[r]:"contents"in o&&(c=o.contents),c){var D=L(e,t,n,r,f,l,c[R],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 O=0,N="after_br",P=0;;)if("after_br"===N)O>=w.length||"br"===w[O].kind?(N="before_br",P=O,O--):("preserve"!==w[O].space&&(w[O].text=w[O].text.replace(/^\s+/g,"")),0<w[O].text.length?(N="looking_br",O++):w.splice(O,1));else if("before_br"===N)if(O<0||"br"===w[O].kind){if(N="after_br",(O=P+1)>=w.length)break}else if("preserve"!==w[O].space&&(w[O].text=w[O].text.replace(/\s+$/g,"")),0<w[O].text.length){if(N="after_br",(O=P+1)>=w.length)break}else w.splice(O,1),O--;else O>=w.length||"br"===w[O].kind?(N="before_br",P=O,O--):O++;!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(17):imscNames,U="undefined"==typeof imscStyles?e(18):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}},{17:17,18:18}],16:[function(e,t,n){n.generateISD=e(15).generateISD,n.fromXML=e(13).fromXML,n.renderHTML=e(14).render},{13:13,14:14,15:15}],17:[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"},{}],18:[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(17):imscNames,"undefined"==typeof imscUtils?e(19):imscUtils)},{17:17,19:19}],19:[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)},{}],20:[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(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&r(e.slice(0,0))}(e)||!!e._isBuffer)}},{}],21:[function(e,t,n){var r={}.toString;t.exports=Array.isArray||function(e){return"[object Array]"==r.call(e)}},{}],22:[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(23))},{23:23}],23:[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}},{}],24:[function(e,t,n){t.exports=e(25)},{25:25}],25:[function(e,t,n){"use strict";var r=e(22),i=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};t.exports=d;var a=e(33);a.inherits=e(34);var o=e(27),s=e(29);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)}},{22:22,27:27,29:29,33:33,34:34}],26:[function(e,t,n){"use strict";t.exports=a;var r=e(28),i=e(33);function a(e){if(!(this instanceof a))return new a(e);r.call(this,e)}i.inherits=e(34),i.inherits(a,r),a.prototype._transform=function(e,t,n){n(null,e)}},{28:28,33:33,34:34}],27:[function(P,L,e){(function(g,e){"use strict";var _=P(22);L.exports=c;var o,m=P(21);c.ReadableState=a;function E(e,t){return e.listeners(t).length}P(10).EventEmitter;var i=P(32),s=P(40).Buffer,u=e.Uint8Array||function(){};var t=P(33);t.inherits=P(34);var n=P(7),v=void 0;v=n&&n.debuglog?n.debuglog("stream"):function(){};var l,f=P(30),r=P(31);t.inherits(c,i);var d=["error","close","destroy","pause","resume"];function a(e,t){e=e||{};var n=t instanceof(o=o||P(25));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 f,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&&(l=l||P(35).StringDecoder,this.decoder=new l(e.encoding),this.encoding=e.encoding)}function c(e){if(o=o||P(25),!(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=e._readableState;null===t?(o.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,o)):(i||(a=function(e,t){var n;(function(e){return s.isBuffer(e)||e instanceof u})(t)||"string"==typeof t||void 0===t||e.objectMode||(n=new TypeError("Invalid non-string/buffer chunk"));return n}(o,t)),a?e.emit("error",a):o.objectMode||t&&0<t.length?("string"==typeof t||o.objectMode||Object.getPrototypeOf(t)===s.prototype||(t=function(e){return s.from(e)}(t)),r?o.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):p(e,o,t,!0):o.ended?e.emit("error",new Error("stream.push() after EOF")):(o.reading=!1,o.decoder&&!n?(t=o.decoder.write(t),o.objectMode||0!==t.length?p(e,o,t,!1):I(e,o)):p(e,o,t,!1))):r||(o.reading=!1));return function(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}(o)}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=s.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 l=l||P(35).StringDecoder,this._readableState.decoder=new l(e),this._readableState.encoding=e,this};var y=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=function(e){return y<=e?e=y:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function S(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(v("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?_.nextTick(A,e):A(e))}function A(e){v("emit readable"),e.emit("readable"),M(e)}function I(e,t){t.readingMore||(t.readingMore=!0,_.nextTick(b,e,t))}function b(e,t){for(var n=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(v("maybeReadMore read 0"),e.read(0),n!==t.length);)n=t.length;t.readingMore=!1}function R(e){v("readable nexttick read 0"),e.read(0)}function D(e,t){t.reading||(v("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(v("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}(e,t):function(e,t){var n=s.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,_.nextTick(O,t,e))}function O(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function N(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){v("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 v("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?w(this):S(this),null;if(0===(e=T(e,t))&&t.ended)return 0===t.length&&w(this),null;var r,i=t.needReadable;return v("need readable",i),(0===t.length||t.length-e<t.highWaterMark)&&v("length less than watermark",i=!0),t.ended||t.reading?v("reading or ended",i=!1):i&&(v("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,v("pipe count=%d opts=%j",i.pipesCount,e);var t=(!e||!1!==e.end)&&n!==g.stdout&&n!==g.stderr?o:p;function a(e,t){v("onunpipe"),e===r&&t&&!1===t.hasUnpiped&&(t.hasUnpiped=!0,v("cleanup"),n.removeListener("close",c),n.removeListener("finish",h),n.removeListener("drain",s),n.removeListener("error",d),n.removeListener("unpipe",a),r.removeListener("end",o),r.removeListener("end",p),r.removeListener("data",f),u=!0,!i.awaitDrain||n._writableState&&!n._writableState.needDrain||s())}function o(){v("onend"),n.end()}i.endEmitted?_.nextTick(t):r.once("end",t),n.on("unpipe",a);var s=function(t){return function(){var e=t._readableState;v("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&E(t,"data")&&(e.flowing=!0,M(t))}}(r);n.on("drain",s);var u=!1;var l=!1;function f(e){v("ondata"),(l=!1)!==n.write(e)||l||((1===i.pipesCount&&i.pipes===n||1<i.pipesCount&&-1!==N(i.pipes,n))&&!u&&(v("false write response, pause",r._readableState.awaitDrain),r._readableState.awaitDrain++,l=!0),r.pause())}function d(e){v("onerror",e),p(),n.removeListener("error",d),0===E(n,"error")&&n.emit("error",e)}function c(){n.removeListener("finish",h),p()}function h(){v("onfinish"),n.removeListener("close",c),p()}function p(){v("unpipe"),r.unpipe(n)}return r.on("data",f),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",d),n.once("close",c),n.once("finish",h),n.emit("pipe",r),i.flowing||(v("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=N(t.pipes,e);return-1===o||(t.pipes.splice(o,1),t.pipesCount-=1,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):_.nextTick(R,this))}return n},c.prototype.resume=function(){var e=this._readableState;return e.flowing||(v("resume"),e.flowing=!0,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,_.nextTick(D,e,t))}(this,e)),this},c.prototype.pause=function(){return v("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(v("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(v("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){v("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){v("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(23),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{10:10,21:21,22:22,23:23,25:25,30:30,31:31,32:32,33:33,34:34,35:35,40:40,7:7}],28:[function(e,t,n){"use strict";t.exports=a;var r=e(25),i=e(33);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(34),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")})}},{25:25,33:33,34:34}],29:[function(A,I,e){(function(e,t,n){"use strict";var s=A(22);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=_;var u,l=!e.browser&&-1<["v0.10","v0.9."].indexOf(e.version.slice(0,5))?n:s.nextTick;_.WritableState=g;var r=A(33);r.inherits=A(34);var i={deprecate:A(46)},a=A(32),f=A(40).Buffer,o=t.Uint8Array||function(){};var c,h=A(31);function p(){}function g(e,t){u=u||A(25),e=e||{};var n=t instanceof u;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?(s.nextTick(i,r),s.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=y(n);a||n.corked||n.bufferProcessing||!n.bufferedRequest||v(e,n),r?l(E,e,n,a,i):E(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 _(e){if(u=u||A(25),!(c.call(_,this)||this instanceof u))return new _(e);this._writableState=new g(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 m(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 E(e,t,n,r){n||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,r(),S(e,t)}function v(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,m(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(m(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 y(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function T(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=y(t);return n&&(function(e,t){t.prefinished||t.finalCalled||("function"==typeof e._final?(t.pendingcb++,t.finalCalled=!0,s.nextTick(T,e,t)):(t.prefinished=!0,e.emit("prefinish")))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),n}r.inherits(_,a),g.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(g.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]?(c=Function.prototype[Symbol.hasInstance],Object.defineProperty(_,Symbol.hasInstance,{value:function(e){return!!c.call(this,e)||this===_&&(e&&e._writableState instanceof g)}})):c=function(e){return e instanceof this},_.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},_.prototype.write=function(e,t,n){var r=this._writableState,i=!1,a=!r.objectMode&&function(e){return f.isBuffer(e)||e instanceof o}(e);return a&&!f.isBuffer(e)&&(e=function(e){return f.from(e)}(e)),"function"==typeof t&&(n=t,t=null),t=a?"buffer":t||r.defaultEncoding,"function"!=typeof n&&(n=p),r.ended?function(e,t){var n=new Error("write after end");e.emit("error",n),s.nextTick(t,n)}(this,n):(a||function(e,t,n,r){var i=!0,a=!1;return null===n?a=new TypeError("May not write null values to stream"):"string"==typeof n||void 0===n||t.objectMode||(a=new TypeError("Invalid non-string/buffer chunk")),a&&(e.emit("error",a),s.nextTick(r,a),i=!1),i}(this,r,e,n))&&(r.pendingcb++,i=function(e,t,n,r,i,a){if(!n){var o=function(e,t,n){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=f.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 m(e,t,!1,s,r,i,a);return u}(this,r,a,e,t,n)),i},_.prototype.cork=function(){this._writableState.corked++},_.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.bufferedRequest||v(this,e))},_.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(_.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),_.prototype._write=function(e,t,n){n(new Error("_write() is not implemented"))},_.prototype._writev=null,_.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?s.nextTick(n):e.once("finish",n));t.ended=!0,e.writable=!1}(this,r,n)},Object.defineProperty(_.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),_.prototype.destroy=h.destroy,_.prototype._undestroy=h.undestroy,_.prototype._destroy=function(e,t){this.end(),t(e)}}).call(this,A(23),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},A(45).setImmediate)},{22:22,23:23,25:25,31:31,32:32,33:33,34:34,40:40,45:45,46:46}],30:[function(e,t,n){"use strict";var s=e(40).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})},{40:40,7:7}],31:[function(e,t,n){"use strict";var a=e(22);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)}}},{22:22}],32:[function(e,t,n){t.exports=e(10).EventEmitter},{10:10}],33:[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(20)})},{20:20}],34:[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}},{}],35:[function(e,t,n){"use strict";var r=e(40).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;switch(this.encoding=function(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}(e),this.encoding){case"utf16le":this.text=u,this.end=l,t=4;break;case"utf8":this.fillLast=s,t=4;break;case"base64":this.text=f,this.end=d,t=3;break;default:return this.write=c,void(this.end=h)}this.lastNeed=0,this.lastTotal=0,this.lastChar=r.allocUnsafe(t)}function o(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function s(e){var t=this.lastTotal-this.lastNeed,n=function(e,t){if(128!=(192&t[0]))return e.lastNeed=0,"<EFBFBD>";if(1<e.lastNeed&&1<t.length){if(128!=(192&t[1]))return e.lastNeed=1,"<EFBFBD>";if(2<e.lastNeed&&2<t.length&&128!=(192&t[2]))return e.lastNeed=2,"<EFBFBD>"}}(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 u(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 l(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 f(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 d(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function c(e){return e.toString(this.encoding)}function h(e){return e&&e.length?this.write(e):""}(n.StringDecoder=a).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||""},a.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"<EFBFBD>":t},a.prototype.text=function(e,t){var n=function(e,t,n){var r=t.length-1;if(r<n)return 0;var i=o(t[r]);if(0<=i)return 0<i&&(e.lastNeed=i-1),i;if(--r<n||-2===i)return 0;if(0<=(i=o(t[r])))return 0<i&&(e.lastNeed=i-2),i;if(--r<n||-2===i)return 0;if(0<=(i=o(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)},a.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}},{40:40}],36:[function(e,t,n){t.exports=e(37).PassThrough},{37:37}],37:[function(e,t,n){(((n=t.exports=e(27)).Stream=n).Readable=n).Writable=e(29),n.Duplex=e(25),n.Transform=e(28),n.PassThrough=e(26)},{25:25,26:26,27:27,28:28,29:29}],38:[function(e,t,n){t.exports=e(37).Transform},{37:37}],39:[function(e,t,n){t.exports=e(29)},{29:29}],40:[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}],41:[function(q,e,t){(function(K){!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=b.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(){N(this)},write:function(e){var t=this;if(this.error)throw this.error;if(t.closed)return O(t,"Cannot write after close. Assign an onready handler.");if(null===e)return N(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 b.BEGIN:if(t.state=b.BEGIN_WHITESPACE,"\ufeff"===r)continue;G(t,r);continue;case b.BEGIN_WHITESPACE:G(t,r);continue;case b.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=b.TEXT_ENTITY:t.textNode+=r):(t.state=b.OPEN_WAKA,t.startTagPosition=t.position);continue;case b.SCRIPT:"<"===r?t.state=b.SCRIPT_ENDING:t.script+=r;continue;case b.SCRIPT_ENDING:"/"===r?t.state=b.CLOSE_TAG:(t.script+="<"+r,t.state=b.SCRIPT);continue;case b.OPEN_WAKA:if("!"===r)t.state=b.SGML_DECL,t.sgmlDecl="";else if(T(f,r));else if(T(m,r))t.state=b.OPEN_TAG,t.tagName=r;else if("/"===r)t.state=b.CLOSE_TAG,t.tagName="";else if("?"===r)t.state=b.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=b.TEXT}continue;case b.SGML_DECL:(t.sgmlDecl+r).toUpperCase()===h?(M(t,"onopencdata"),t.state=b.CDATA,t.sgmlDecl="",t.cdata=""):t.sgmlDecl+r==="--"?(t.state=b.COMMENT,t.comment="",t.sgmlDecl=""):(t.sgmlDecl+r).toUpperCase()===p?(t.state=b.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=b.TEXT):(T(d,r)&&(t.state=b.SGML_DECL_QUOTED),t.sgmlDecl+=r);continue;case b.SGML_DECL_QUOTED:r===t.q&&(t.state=b.SGML_DECL,t.q=""),t.sgmlDecl+=r;continue;case b.DOCTYPE:">"===r?(t.state=b.TEXT,M(t,"ondoctype",t.doctype),t.doctype=!0):(t.doctype+=r,"["===r?t.state=b.DOCTYPE_DTD:T(d,r)&&(t.state=b.DOCTYPE_QUOTED,t.q=r));continue;case b.DOCTYPE_QUOTED:t.doctype+=r,r===t.q&&(t.q="",t.state=b.DOCTYPE);continue;case b.DOCTYPE_DTD:t.doctype+=r,"]"===r?t.state=b.DOCTYPE:T(d,r)&&(t.state=b.DOCTYPE_DTD_QUOTED,t.q=r);continue;case b.DOCTYPE_DTD_QUOTED:t.doctype+=r,r===t.q&&(t.state=b.DOCTYPE_DTD,t.q="");continue;case b.COMMENT:"-"===r?t.state=b.COMMENT_ENDING:t.comment+=r;continue;case b.COMMENT_ENDING:"-"===r?(t.state=b.COMMENT_ENDED,t.comment=w(t.opt,t.comment),t.comment&&M(t,"oncomment",t.comment),t.comment=""):(t.comment+="-"+r,t.state=b.COMMENT);continue;case b.COMMENT_ENDED:">"!==r?(P(t,"Malformed comment"),t.comment+="--"+r,t.state=b.COMMENT):t.state=b.TEXT;continue;case b.CDATA:"]"===r?t.state=b.CDATA_ENDING:t.cdata+=r;continue;case b.CDATA_ENDING:"]"===r?t.state=b.CDATA_ENDING_2:(t.cdata+="]"+r,t.state=b.CDATA);continue;case b.CDATA_ENDING_2:">"===r?(t.cdata&&M(t,"oncdata",t.cdata),M(t,"onclosecdata"),t.cdata="",t.state=b.TEXT):"]"===r?t.cdata+="]":(t.cdata+="]]"+r,t.state=b.CDATA);continue;case b.PROC_INST:"?"===r?t.state=b.PROC_INST_ENDING:T(f,r)?t.state=b.PROC_INST_BODY:t.procInstName+=r;continue;case b.PROC_INST_BODY:if(!t.procInstBody&&T(f,r))continue;"?"===r?t.state=b.PROC_INST_ENDING:t.procInstBody+=r;continue;case b.PROC_INST_ENDING:">"===r?(M(t,"onprocessinginstruction",{name:t.procInstName,body:t.procInstBody}),t.procInstName=t.procInstBody="",t.state=b.TEXT):(t.procInstBody+="?"+r,t.state=b.PROC_INST_BODY);continue;case b.OPEN_TAG:T(E,r)?t.tagName+=r:(L(t),">"===r?U(t):"/"===r?t.state=b.OPEN_TAG_SLASH:(S(f,r)&&P(t,"Invalid character in tag name"),t.state=b.ATTRIB));continue;case b.OPEN_TAG_SLASH:">"===r?(U(t,!0),k(t)):(P(t,"Forward-slash in opening tag not followed by >"),t.state=b.ATTRIB);continue;case b.ATTRIB:if(T(f,r))continue;">"===r?U(t):"/"===r?t.state=b.OPEN_TAG_SLASH:T(m,r)?(t.attribName=r,t.attribValue="",t.state=b.ATTRIB_NAME):P(t,"Invalid attribute name");continue;case b.ATTRIB_NAME:"="===r?t.state=b.ATTRIB_VALUE:">"===r?(P(t,"Attribute without value"),t.attribValue=t.attribName,F(t),U(t)):T(f,r)?t.state=b.ATTRIB_NAME_SAW_WHITE:T(E,r)?t.attribName+=r:P(t,"Invalid attribute name");continue;case b.ATTRIB_NAME_SAW_WHITE:if("="===r)t.state=b.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(m,r)?(t.attribName=r,t.state=b.ATTRIB_NAME):(P(t,"Invalid attribute name"),t.state=b.ATTRIB)}continue;case b.ATTRIB_VALUE:if(T(f,r))continue;T(d,r)?(t.q=r,t.state=b.ATTRIB_VALUE_QUOTED):(P(t,"Unquoted attribute value"),t.state=b.ATTRIB_VALUE_UNQUOTED,t.attribValue=r);continue;case b.ATTRIB_VALUE_QUOTED:if(r!==t.q){"&"===r?t.state=b.ATTRIB_VALUE_ENTITY_Q:t.attribValue+=r;continue}F(t),t.q="",t.state=b.ATTRIB_VALUE_CLOSED;continue;case b.ATTRIB_VALUE_CLOSED:T(f,r)?t.state=b.ATTRIB:">"===r?U(t):"/"===r?t.state=b.OPEN_TAG_SLASH:T(m,r)?(P(t,"No whitespace between attributes"),t.attribName=r,t.attribValue="",t.state=b.ATTRIB_NAME):P(t,"Invalid attribute name");continue;case b.ATTRIB_VALUE_UNQUOTED:if(S(c,r)){"&"===r?t.state=b.ATTRIB_VALUE_ENTITY_U:t.attribValue+=r;continue}F(t),">"===r?U(t):t.state=b.ATTRIB;continue;case b.CLOSE_TAG:if(t.tagName)">"===r?k(t):T(E,r)?t.tagName+=r:t.script?(t.script+="</"+t.tagName,t.tagName="",t.state=b.SCRIPT):(S(f,r)&&P(t,"Invalid tagname in closing tag"),t.state=b.CLOSE_TAG_SAW_WHITE);else{if(T(f,r))continue;S(m,r)?t.script?(t.script+="</"+r,t.state=b.SCRIPT):P(t,"Invalid tagname in closing tag."):t.tagName=r}continue;case b.CLOSE_TAG_SAW_WHITE:if(T(f,r))continue;">"===r?k(t):P(t,"Invalid characters in closing tag");continue;case b.TEXT_ENTITY:case b.ATTRIB_VALUE_ENTITY_Q:case b.ATTRIB_VALUE_ENTITY_U:var o,s;switch(t.state){case b.TEXT_ENTITY:o=b.TEXT,s="textNode";break;case b.ATTRIB_VALUE_ENTITY_Q:o=b.ATTRIB_VALUE_QUOTED,s="attribValue";break;case b.ATTRIB_VALUE_ENTITY_U:o=b.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:O(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(){!function(e){C(e),""!==e.cdata&&(M(e,"oncdata",e.cdata),e.cdata=""),""!==e.script&&(M(e,"onscript",e.script),e.script="")}(this)}};try{r=q(42).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 K&&"function"==typeof K.isBuffer&&K.isBuffer(e)){if(!this._decoder){var t=q(44).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 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]/,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\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 function(e){return"[object RegExp]"===Object.prototype.toString.call(e)}(e)?!!t.match(e):e[t]}function S(e,t){return!T(e,t)}d=n(d),c=n(c);var A,I,b=0;for(var R in u.STATE={BEGIN:b++,BEGIN_WHITESPACE:b++,TEXT:b++,TEXT_ENTITY:b++,OPEN_WAKA:b++,SGML_DECL:b++,SGML_DECL_QUOTED:b++,DOCTYPE:b++,DOCTYPE_QUOTED:b++,DOCTYPE_DTD:b++,DOCTYPE_DTD_QUOTED:b++,COMMENT_STARTING:b++,COMMENT:b++,COMMENT_ENDING:b++,COMMENT_ENDED:b++,CDATA:b++,CDATA_ENDING:b++,CDATA_ENDING_2:b++,PROC_INST:b++,PROC_INST_BODY:b++,PROC_INST_ENDING:b++,OPEN_TAG:b++,OPEN_TAG_SLASH:b++,ATTRIB:b++,ATTRIB_NAME:b++,ATTRIB_NAME_SAW_WHITE:b++,ATTRIB_VALUE:b++,ATTRIB_VALUE_QUOTED:b++,ATTRIB_VALUE_CLOSED:b++,ATTRIB_VALUE_UNQUOTED:b++,ATTRIB_VALUE_ENTITY_Q:b++,ATTRIB_VALUE_ENTITY_U:b++,CLOSE_TAG:b++,CLOSE_TAG_SAW_WHITE:b++,SCRIPT:b++,SCRIPT_ENDING:b++},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[R]]=R;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 O(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 N(e){return e.sawRoot&&!e.closedRoot&&P(e,"Unclosed root tag"),e.state!==b.BEGIN&&e.state!==b.BEGIN_WHITESPACE&&e.state!==b.TEXT&&O(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&&O(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=b.TEXT:t.state=b.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=b.TEXT);if(n.script){if("script"!==n.tagName)return n.script+="</"+n.tagName+">",n.tagName="",void(n.state=b.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=b.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=b.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=b.OPEN_WAKA,e.startTagPosition=e.position):S(f,t)&&(P(e,"Non-whitespace before first tag."),e.textNode=t,e.state=b.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}b=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,q(8).Buffer)},{42:42,44:44,8:8}],42:[function(e,t,n){t.exports=r;var f=e(10).EventEmitter;function r(){f.call(this)}e(43)(r,f),r.Readable=e(37),r.Writable=e(39),r.Duplex=e(24),r.Transform=e(38),r.PassThrough=e(36),(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}},{10:10,24:24,36:36,37:37,38:38,39:39,43:43}],43:[function(e,t,n){arguments[4][34][0].apply(n,arguments)},{34:34}],44:[function(e,t,n){arguments[4][35][0].apply(n,arguments)},{35:35,40:40}],45:[function(u,e,l){(function(e,t){var r=u(23).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(45).setImmediate,u(45).clearImmediate)},{23:23,45:45}],46:[function(e,t,n){(function(n){function r(e){try{if(!n.localStorage)return!1}catch(e){return!1}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:{})},{}],47:[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(48)),h=r(e(56)),a=r(e(49)),o=r(e(50)),p=1,g=2,_=3,m=4,E=5;function s(){var e,t=this.context,s=(0,i.default)(t).getInstance(),u=(0,o.default)(t).getInstance(),l=[],f=void 0,d=void 0,c=void 0;function n(e){return e&&e.bind?e.bind(window.console):window.console.log.bind(window.console)}function r(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 e={getLogger:function(e){return{fatal:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];r.apply(void 0,[p,this].concat(t))}.bind(e),error:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];r.apply(void 0,[g,this].concat(t))}.bind(e),warn:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];r.apply(void 0,[_,this].concat(t))}.bind(e),info:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];r.apply(void 0,[m,this].concat(t))}.bind(e),debug:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];r.apply(void 0,[E,this].concat(t))}.bind(e)}},setLogTimestampVisible:function(e){f=e},setCalleeNameVisible:function(e){d=e},setLogLevel:function(e){var t={debug:{logLevel:e}};u.update(t)},getLogLevel:function(){return u.get().debug.logLevel}},d=f=!0,c=(new Date).getTime(),"undefined"!=typeof window&&window.console&&(l[p]=n(window.console.error),l[g]=n(window.console.error),l[_]=n(window.console.warn),l[m]=n(window.console.info),l[E]=n(window.console.debug)),e}s.__dashjs_factory_name="Debug";var u=a.default.getSingletonFactory(s);u.LOG_LEVEL_NONE=0,u.LOG_LEVEL_FATAL=p,u.LOG_LEVEL_ERROR=g,u.LOG_LEVEL_WARNING=_,u.LOG_LEVEL_INFO=m,u.LOG_LEVEL_DEBUG=E,a.default.updateSingletonFactory(s.__dashjs_factory_name,u),n.default=u,t.exports=n.default},{48:48,49:49,50:50,56:56}],48:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r,i=e(49),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},{49:49}],49:[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},{}],50:[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(49)),o=r(e(51)),s=r(e(47)),u=r(e(109)),l=e(239);function f(){var e,t,n={debug:{logLevel:s.default.LOG_LEVEL_WARNING},streaming:{metricsMaxListDepth:1e3,abandonLoadTimeout:1e4,liveDelayFragmentCount:4,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:!1,manifestUpdateRetryInterval:100,liveCatchUpMinDrift:.02,liveCatchUpMaxDrift:0,liveCatchUpPlaybackRate:.5,lastBitrateCachingInfo:{enabled:!0,ttl:36e4},lastMediaSettingsCachingInfo:{enabled:!0,ttl:36e4},cacheLoadThresholds:{video:50,audio:5},retryIntervals:(e={},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:(t={},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}}}},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]?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},{109:109,239:239,47:47,49:49,51:51}],51:[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)}}]),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},{}],52:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getVersionString=function(){return r};var r="3.0.0"},{}],53:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r,i=e(54);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},{54:54}],54:[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},{}],55:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r,i=e(57),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.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_UPDATED="representationUpdated",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"}n.default=a,t.exports=n.default},{57:57}],56:[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).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},{55:55}],57:[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},{}],58:[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(63)),p=r(e(94)),g=r(e(90)),_=r(e(96)),m=r(e(89)),D=r(e(87)),i=r(e(49)),M=r(e(66));function a(){var e,E=void 0,v=void 0,y=void 0,l=void 0,T=void 0,i=void 0,t=this.context;function a(e){return e&&e.streamInfo&&void 0!==e.streamInfo.id&&y[e.streamInfo.id]?y[e.streamInfo.id][e.index]:null}function s(e,t,n){var r,i=v[0].mpd.manifest,a=E.getAdaptationsForType(i,e,t);if(!a||0===a.length)return null;if(1<a.length&&n){var o=f(n,t);if(l[n.id]&&l[n.id][t])for(var s=0,u=a.length;s<u;s++)if(l[n.id][t].isMediaInfoEqual(o[s]))return a[s];for(s=0,u=a.length;s<u;s++)if(r=a[s],E.getRolesForAdaptation(r).filter(function(e){return e.value===h.default.MAIN})[0])return a[s]}return a[0]}function f(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)R(),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=E.getAdaptationsForType(a,e.index,t!==T.EMBEDDED_TEXT?t:T.VIDEO);if(!p||0===p.length)return o;for(y[c]=y[c]||E.getAdaptationsForPeriod(h),f=0,r=p.length;f<r;f++)if(s=p[f],l=E.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 m=_.substring(8).split(";");if("CC"===m[0].substring(0,2))for(d=0;d<m.length;d++)b(u=u||I.call(this,y[c][l]),m[d].substring(0,3),m[d].substring(4)),o.push(u),u=null;else for(d=0;d<m.length;d++)b(u=u||I.call(this,y[c][l]),"CC"+(d+1),m[d]),o.push(u),u=null}else 0===_.indexOf("cea-608")&&(b(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){return n(r(e))}function n(e){var t=e||v[0].mpd;return E.getRegularPeriods(t)}function r(e){var t=e||v[0].mpd.manifest;return E.getMpd(t)}function o(){v=[],y={},l={}}function A(e,t){for(var n=t.length,r=0;r<n;r++){var i=t[r];if(e.id===i.id)return i}return null}function I(e){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=u(e.period),r.representationCount=E.getRepresentationCount(n),r.labels=E.getLabelsForAdaptation(n),r.lang=E.getLanguageForAdaptation(n),t=E.getViewpointForAdaptation(n),r.viewpoint=t?t.value:void 0,r.accessibility=E.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=E.getAudioChannelConfigurationForAdaptation(n).map(function(e){return e.value}),r.roles=E.getRolesForAdaptation(n).map(function(e){return e.value}),r.codec=E.getCodec(n),r.mimeType=E.getMimeType(n),r.contentProtection=E.getContentProtectionData(n),r.bitrateList=E.getBitrateListForAdaptation(n),r.contentProtection&&r.contentProtection.forEach(function(e){e.KID=E.getKID(e)}),r.isText=E.getIsTextTrack(r.mimeType),r}function b(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 u(e){var t=new _.default;return t.id=e.id,t.index=e.index,t.start=e.start,t.duration=e.duration,t.manifestInfo=function(e){var t=new m.default;return t.DVRWindowSize=e.timeShiftBufferDepth,t.loadedTime=e.manifest.loadedTime,t.availableFrom=e.availabilityStartTime,t.minBufferTime=e.manifest.minBufferTime,t.maxFragmentDuration=e.maxSegmentDuration,t.duration=E.getDuration(e.manifest),t.isDynamic=E.getIsDynamic(e.manifest),t}(e.mpd),t.isLast=1===e.mpd.manifest.Period_asArray.length||Math.abs(t.start+t.duration-t.manifestInfo.duration)<1,t}function R(){if(!T)throw new Error("setConfig function has to be called previously")}function d(e){return 0===v.length?null:v[0].mpd.manifest.Period_asArray[e]}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){return function(e,t){var n=c(e,t,!0);return null!==n?n:-1}(d(t),e)},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,E.getIsTypeOf(r,t))return i.length;return-1}(d(t),e)},convertDataToRepresentationInfo:function(e){var t=new p.default,n=e.adaptation.period.mpd.manifest.Period_asArray[e.adaptation.period.index].AdaptationSet_asArray[e.adaptation.index],r=E.getRepresentationFor(e.index,n);return t.id=e.id,t.quality=e.index,t.bandwidth=E.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},getDataForMedia:a,getStreamsInfo:function(e,t){var n=[],r=v;e&&(R(),r=S(e)),t=t||r.length;for(var i=0;i<t;i++)n.push(u(r[i]));return n},getMediaInfoForType:function(e,t){if(0===v.length)return null;var n=v[0].mpd.manifest,r=s(e.index,t,e);if(!r)return null;var i=A(e,v),a=i.id,o=E.getIndexForAdaptation(r,n,e.index);return y[a]=y[a]||E.getAdaptationsForPeriod(i),I(y[a][o])},getAllMediaInfoForType:f,getAdaptationForType:s,getRealAdaptation:function(e,t){var n,r=void 0,i=A(e,v);return n=t?t.id:null,0<v.length&&(r=n?E.getAdaptationForId(n,v[0].mpd.manifest,i.index):E.getAdaptationForIndex(t.index,v[0].mpd.manifest,i.index)),r},getVoRepresentations:function(e){var t=a(e);return E.getRepresentationsForAdaptation(t)},getEventsFor:function(e,t){var n=[];if(0===v.length)return n;var r=v[0].mpd.manifest;return e instanceof _.default?n=E.getEventsForPeriod(A(e,v)):e instanceof g.default?n=E.getEventStreamForAdaptationSet(r,a(e)):e instanceof p.default&&(n=E.getEventStreamForRepresentation(r,t)),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&&E.setConfig({errHandler:e.errHandler}),e.BASE64&&E.setConfig({BASE64:e.BASE64}))},updatePeriods:function(e){if(!e)return null;R(),v=S(e),y={}},setCurrentMediaInfo:function(e,t,n){l[e]=l[e]||{},l[e][t]=l[e][t]||{},l[e][t]=n},getUseCalculatedLiveEdgeTimeForMediaInfo:function(e){var t=a(e);return E.getUseCalculatedLiveEdgeTimeForAdaptation(t)},getIsTextTrack:function(e){return E.getIsTextTrack(e)},getUTCTimingSources:function(){var e=v[0].mpd.manifest;return E.getUTCTimingSources(e)},getSuggestedPresentationDelay:function(){var e=v[0].mpd;return E.getSuggestedPresentationDelay(e)},getAvailabilityStartTime:function(e){var t=e||v[0].mpd;return E.getAvailabilityStartTime(t)},getIsDynamic:function(e){var t=e||v[0].mpd.manifest;return E.getIsDynamic(t)},getDuration:function(e){var t=e||v[0].mpd.manifest;return E.getDuration(t)},getRegularPeriods:n,getMpd:r,getLocation:function(e){return E.getLocation(e)},getManifestUpdatePeriod:function(e){var t=arguments.length<=1||void 0===arguments[1]?0:arguments[1];return E.getManifestUpdatePeriod(e,t)},getIsDVB:function(e){return E.hasProfile(e,"urn:dvb:dash:profile:dvb-dash:2014")},getBaseURLsFromElement:function(e){return E.getBaseURLsFromElement(e)},getRepresentationSortFunction:function(){return E.getRepresentationSortFunction()},getCodec:function(e,t,n){return E.getCodec(e,t,n)},reset:o},E=(0,M.default)(t).getInstance(),o(),e}a.__dashjs_factory_name="DashAdapter",n.default=i.default.getSingletonFactory(a),t.exports=n.default},{49:49,63:63,66:66,87:87,89:89,90:90,94:94,96:96}],59:[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(63)),D=r(e(225)),M=r(e(223)),C=e(239),w=r(e(56)),O=r(e(48)),N=r(e(53)),i=r(e(49)),P=r(e(47)),L=r(e(218)),x=r(e(93)),F=e(81),U=r(e(65));function a(e){e=e||{};var t=this.context,l=(0,O.default)(t).getInstance(),o=(0,L.default)(t).getInstance(),f=e.timelineConverter,n=e.dashMetrics,s=e.baseURLController,r=void 0,d=void 0,c=void 0,h=void 0,p=void 0,i=void 0,a=void 0,g=void 0;function _(){return a?a.getType():null}function m(){var e=a?a.getStreamInfo():null;return e?e.manifestInfo.isDynamic:null}function E(){return a?a.getMediaInfo():null}function u(){c=-1,h=null}function v(){u(),i=0,g=a=p=null}function y(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,!0)}function T(e){f.setExpectedLiveEdge(e),n.updateManifestUpdateInfo({presentationStartTime:e})}function S(e){if(null==e)return null;var t=new D.default,n=e.representation,r=n.adaptation.period.mpd.manifest.Period_asArray[n.adaptation.period.index].AdaptationSet_asArray[n.adaptation.index].Representation_asArray[n.index].bandwidth,i=e.media;return i=(0,F.replaceTokenForTemplate)(i,"Number",e.replacementNumber),i=(0,F.replaceTokenForTemplate)(i,"Time",e.replacementTime),i=(0,F.replaceTokenForTemplate)(i,"Bandwidth",r),i=(0,F.replaceIDForTemplate)(i,n.id),i=(0,F.unescapeDollarsInTemplate)(i),t.mediaType=_(),t.type=C.HTTPRequest.MEDIA_SEGMENT_TYPE,t.range=e.mediaRange,t.startTime=e.presentationStartTime,t.duration=e.duration,t.timescale=n.timescale,t.availabilityStartTime=e.availabilityStartTime,t.availabilityEndTime=e.availabilityEndTime,t.wallStartTime=e.wallStartTime,t.quality=n.index,t.index=e.availabilityIdx,t.mediaInfo=E(),t.adaptationIndex=n.adaptation.index,t.representationId=n.id,y(t,i,n)?t:void 0}function A(e){var t=!1;if(m()){if(h){var n=parseFloat((h.presentationStartTime-e.adaptation.period.start).toFixed(5)),r=0<h.duration?n+1.5*h.duration:n;t=e.adaptation.period.duration<=r}}else c>=e.availableSegmentsNumber&&(t=!0);return t}function I(e){var t=e.representation;t.segments&&l.trigger(w.default.REPRESENTATION_UPDATED,{sender:this,representation:t})}function b(e){if(!e.error&&_()===e.mediaType){var t=e.segments,n=e.representation,r=[],i=0,a=void 0,o=void 0,s=void 0,u=void 0;for(a=0,o=t.length;a<o;a++)s=t[a],(u=(0,F.getTimeBasedSegment)(f,m(),n,s.startTime,s.duration,s.timescale,s.media,s.mediaRange,i))&&(r.push(u),u=null,i++);if(o=r.length,n.segmentAvailabilityRange={start:r[0].presentationStartTime,end:r[o-1].presentationStartTime},n.availableSegmentsNumber=o,(n.segments=r)&&0<r.length)if(m())T(r[r.length-1].presentationStartTime-8);x.default.hasInitialization(n)&&l.trigger(w.default.REPRESENTATION_UPDATED,{sender:this,representation:n})}}return r={initialize:function(e){a=e,g.initialize(m())},getStreamProcessor:function(){return a},getInitRequest:function(e){return e?function(e,t){var n=new D.default,r=e.adaptation.period,i=r.start,a=m();if(n.mediaType=t,n.type=C.HTTPRequest.INIT_SEGMENT_TYPE,n.range=e.range,n.availabilityStartTime=f.calcAvailabilityStartTimeFromPresentationTime(i,r.mpd,a),n.availabilityEndTime=f.calcAvailabilityEndTimeFromPresentationTime(i+r.duration,r.mpd,a),n.quality=e.index,n.mediaInfo=E(),n.representationId=e.id,y(n,e.initialization,e))return n.url=(0,F.replaceTokenForTemplate)(n.url,"Bandwidth",e.bandwidth),n}(e,_()):null},getSegmentRequestForTime:function(e,t,n){var r=void 0;if(!e||!e.segmentInfoType)return null;var i=_(),a=c,o=!!n&&n.keepIdx,s=!(!n||!n.ignoreIsFinished);p!==t&&(p=t,d.debug("Getting the request for "+i+" time : "+t));var u=g.getSegmentByTime(e,t);return u?(c=u.availabilityIdx,h=u,d.debug("Index for "+i+" time "+t+" is "+c),r=S(u)):!s&&A(e)&&((r=new D.default).action=D.default.ACTION_COMPLETE,r.index=c-1,r.mediaType=i,r.mediaInfo=E(),d.debug("Signal complete in getSegmentRequestForTime -",i)),o&&0<=a&&(c=e.segmentInfoType===R.default.SEGMENT_TIMELINE&&m()?c:a),r},getNextSegmentRequest:function(e){var t=void 0;if(!e||!e.segmentInfoType)return null;var n=h?h.mediaStartTime:-1,r=_();p=null;var i=c+1;d.debug("Getting the next request at index: "+i+", type: "+r);var a=g.getSegmentByIndex(e,i,n);return a||function(e){return!m()||m()&&isFinite(e.adaptation.period.duration)}(e)?(c=a?(t=S(a),a.availabilityIdx):i,a?t=S(h=a):A(e)&&((t=new D.default).action=D.default.ACTION_COMPLETE,t.index=c-1,t.mediaType=r,t.mediaInfo=E(),d.debug("Signal complete -",r)),t):(d.debug("No segment found at index: "+i+". Wait for next loop"),null)},updateRepresentation:function(e,t){var n=x.default.hasInitialization(e),r=x.default.hasSegments(e),i=void 0;if(e.segmentAvailabilityRange=f.calcSegmentAvailabilityRange(e,m()),e.segmentAvailabilityRange.end<e.segmentAvailabilityRange.start&&!e.useCalculatedLiveEdgeTime)return i=new M.default(N.default.SEGMENTS_UNAVAILABLE_ERROR_CODE,N.default.SEGMENTS_UNAVAILABLE_ERROR_MESSAGE,{availabilityDelay:e.segmentAvailabilityRange.start-e.segmentAvailabilityRange.end}),void l.trigger(w.default.REPRESENTATION_UPDATED,{sender:this,representation:e,error:i});m()&&T(e.segmentAvailabilityRange.end),t||u(),g.update(e,_(),n,r),n&&r&&l.trigger(w.default.REPRESENTATION_UPDATED,{sender:this,representation:e})},setCurrentTime:function(e){i=e},getCurrentTime:function(){return i},reset:function(){v(),l.off(w.default.INITIALIZATION_LOADED,I,r),l.off(w.default.SEGMENTS_LOADED,b,r)},resetIndex:u},d=(0,P.default)(t).getInstance().getLogger(r),v(),g=(0,U.default)(t).create(e),l.on(w.default.INITIALIZATION_LOADED,I,r),l.on(w.default.SEGMENTS_LOADED,b,r),r}a.__dashjs_factory_name="DashHandler",n.default=i.default.getClassFactory(a),t.exports=n.default},{218:218,223:223,225:225,239:239,47:47,48:48,49:49,53:53,56:56,63:63,65:65,81:81,93:93}],60:[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(109)),h=e(239),i=r(e(49)),p=r(e(110)),g=r(e(79)),_=r(e(152)),m=e(241);function a(e){e=e||{};var t,n=this.context,i=void 0,a=void 0,o=void 0,s=e.metricsModel;function r(e,t,n){return f(s.getMetricsFor(e,t),n)}function u(e,t){var n=s.getMetricsFor(e,t);if(!n)return null;var r=n.HttpList,i=null,a=void 0;if(!r||r.length<=0)return null;for(a=r.length-1;0<=a;){if(r[a].responsecode){i=r[a];break}a--}return i}function l(e){var t=s.getMetricsFor(e,!0);return t&&t.HttpList?t.HttpList:[]}function f(e,t){if(!e)return null;var n=e[t];return!n||n.length<=0?null:n[n.length-1]}function d(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,t){return f(s.getMetricsFor(e,t),p.default.TRACK_SWITCH)},getLatestBufferInfoVO:r,getCurrentBufferLevel:function(e,t){var n=r(e,t,p.default.BUFFER_LEVEL);return n?g.default.round10(n.level/1e3,-3):0},getCurrentHttpRequest:u,getHttpRequests:l,getCurrentDroppedFrames:function(){return f(s.getMetricsFor(c.default.VIDEO,!0),p.default.DROPPED_FRAMES)},getCurrentSchedulingInfo:function(e){return f(s.getMetricsFor(e,!0),p.default.SCHEDULING_INFO)},getCurrentDVRInfo:function(e){return f(e?s.getMetricsFor(e,!0):s.getMetricsFor(c.default.VIDEO,!0)||s.getMetricsFor(c.default.AUDIO,!0),p.default.DVR_INFO)},getCurrentManifestUpdate:function(){return f(s.getMetricsFor(c.default.STREAM),p.default.MANIFEST_UPDATE)},getLatestFragmentRequestHeaderValueByID:function(e,t){var n={},r=u(e,!0);return r&&(n=d(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(c.default.STREAM)).length-1;0<=i;i--)if((r=t[i]).type===h.HTTPRequest.MPD_TYPE){n=d(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(c.default.STREAM,e.type,e.requestStartDate,e.requestEndDate)},addHttpRequest:function(e,t,n,r,i){s.addHttpRequest(e.mediaType,null,e.type,e.url,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(c.default.VIDEO,e)},addPlayList:function(){o&&(s.addPlayList(o),o=null)},addDVBErrors:function(e){s.addDVBErrors(e)},createPlaylistMetrics:function(e,t){(o=new m.PlayList).start=new Date,o.mstart=e,o.starttype=t},createPlaylistTraceMetrics:function(e,t,n){!0===i&&(i=!1,(a=new m.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,_.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},{109:109,110:110,152:152,239:239,241:241,49:49,79:79}],61:[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(215)),T=r(e(95)),l=r(e(223)),f=r(e(56)),d=r(e(48)),c=r(e(205)),i=r(e(49)),h=r(e(47)),p=e(239),S=r(e(225)),A=r(e(156)),I=r(e(53));function a(){var e=this.context,s=(0,d.default)(e).getInstance(),t=void 0,g=void 0,n=void 0,_=void 0,r=void 0,i=void 0,a=void 0,u=void 0,m=void 0;function E(){if(!m||!m.hasOwnProperty("resolve"))throw new Error("setConfig function has to be called previously")}function v(e){if(e.url){var t=new S.default;return t.type=e.init?p.HTTPRequest.INIT_SEGMENT_TYPE:p.HTTPRequest.MEDIA_SEGMENT_TYPE,t.url=e.url,t.range=e.range.start+"-"+e.range.end,t.mediaType=e.mediaType,t}}function y(e,t,n){e?s.trigger(f.default.SEGMENTS_LOADED,{segments:e,representation:t,mediaType:n}):s.trigger(f.default.SEGMENTS_LOADED,{segments:null,representation:t,mediaType:n,error:new l.default(I.default.SEGMENT_BASE_LOADER_ERROR_CODE,I.default.SEGMENT_BASE_LOADER_ERROR_MESSAGE)})}return t={setConfig:function(e){e.baseURLController&&(m=e.baseURLController),e.dashMetrics&&(i=e.dashMetrics),e.mediaPlayerModel&&(a=e.mediaPlayerModel),e.errHandler&&(n=e.errHandler)},initialize:function(){_=(0,c.default)(e).getInstance(),r=(0,o.default)(e).getInstance(),u=(0,A.default)(e).create({errHandler:n,dashMetrics:i,mediaPlayerModel:a,requestModifier:r})},loadInitialization:function t(n,e){E();var r=null,i=n?m.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=v(a);u.load({request:o,success:function(e){a.bytesLoaded=a.range.end,(r=_.findInitRange(e))?(n.range=r,s.trigger(f.default.INITIALIZATION_LOADED,{representation:n})):(a.range.end=a.bytesLoaded+a.bytesToLoad,t(n,a))},error:function(){s.trigger(f.default.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||y;var o=null,h=null,r=!!e,i=f?m.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=v(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=_.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&&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."),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 T.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)},reset:function(){u.abort(),r=_=n=u=null}},g=(0,h.default)(e).getInstance().getLogger(t),t}a.__dashjs_factory_name="SegmentBaseLoader",n.default=i.default.getSingletonFactory(a),t.exports=n.default},{156:156,205:205,215:215,223:223,225:225,239:239,47:47,48:48,49:49,53:53,56:56,95:95}],62:[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(56)),a=r(e(48)),y=r(e(209)),o=r(e(109)),i=r(e(49)),c=r(e(47)),h=r(e(215)),T=r(e(95)),S=e(239),A=r(e(225)),I=r(e(156)),b=r(e(223)),R=r(e(53));function s(){var p=this.context,s=(0,a.default)(p).getInstance(),e=void 0,g=void 0,_=void 0,t=void 0,n=void 0,r=void 0,i=void 0,m=void 0,u=void 0;function E(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 l(){if(!u||!u.hasOwnProperty("resolve"))throw new Error("setConfig function has to be called previously")}function f(e,t,n){e?s.trigger(d.default.SEGMENTS_LOADED,{segments:e,representation:t,mediaType:n}):s.trigger(d.default.SEGMENTS_LOADED,{segments:null,representation:t,mediaType:n,error:new b.default(R.default.SEGMENT_BASE_LOADER_ERROR_CODE,R.default.SEGMENT_BASE_LOADER_ERROR_MESSAGE)})}function v(e){var t=new A.default;return t.type=e.init?S.HTTPRequest.INIT_SEGMENT_TYPE:S.HTTPRequest.MEDIA_SEGMENT_TYPE,t.url=e.url,t.range=e.range.start+"-"+e.range.end,t}return e={setConfig:function(e){if(!(e.baseURLController&&e.dashMetrics&&e.mediaPlayerModel&&e.errHandler))throw new Error(o.default.MISSING_CONFIG_ERROR);u=e.baseURLController,r=e.dashMetrics,i=e.mediaPlayerModel,t=e.errHandler},initialize:function(){n=(0,h.default)(p).getInstance(),m=(0,I.default)(p).create({errHandler:t,dashMetrics:r,mediaPlayerModel:i,requestModifier:n})},loadInitialization:function(e,t){l();var n=null,r=e?u.resolve(e.path):null,i=r?r.url:void 0,a=e?e.range.split("-"):null,o=t||{range:{start:a?parseFloat(a[0]):null,end:a?parseFloat(a[1]):null},request:n,url:i,init:!0};g.info("Start loading initialization."),n=v(o),m.load({request:n,success:function(){s.trigger(d.default.INITIALIZATION_LOADED,{representation:e})},error:function(){s.trigger(d.default.INITIALIZATION_LOADED,{representation:e})}}),g.debug("Perform init load: "+o.url)},loadSegments:function(t,n,r,i){l();var e=null,a=t?u.resolve(t.path):null,o=a?a.url:void 0;i=i||f,e=v({bytesLoaded:0,bytesToLoad:8192,range:{start:0,end:8192},request:e,url:o,init:!1}),g.debug("Parsing ebml header"),m.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);m.load({request:f,success:function(e){s=E(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(){n=t=null}},g=(0,c.default)(p).getInstance().getLogger(e),_={EBML:{tag:440786851,required:!0},Segment:{tag:408125543,required:!0,SeekHead:{tag:290298740,required:!0},Info:{tag:357149030,required:!0,TimecodeScale:{tag:2807729,required:!0,parse:"getMatroskaUint"},Duration:{tag:17545,required:!0,parse:"getMatroskaFloat"}},Tracks:{tag:374648427,required:!0},Cues:{tag:475249515,required:!0,CuePoint:{tag:187,required:!0,CueTime:{tag:179,required:!0,parse:"getMatroskaUint"},CueTrackPositions:{tag:183,required:!0,CueTrack:{tag:247,required:!0,parse:"getMatroskaUint"},CueClusterPosition:{tag:241,required:!0,parse:"getMatroskaUint"}}}}},Void:{tag:236,required:!0}},e}s.__dashjs_factory_name="WebmSegmentBaseLoader",n.default=i.default.getSingletonFactory(s),t.exports=n.default},{109:109,156:156,209:209,215:215,223:223,225:225,239:239,47:47,48:48,49:49,53:53,56:56,95:95}],63:[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"}}]),i);n.default=a,t.exports=n.default},{}],64:[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(109)),M=r(e(53)),C=r(e(63)),w=r(e(223)),O=r(e(48)),N=r(e(56)),i=r(e(49)),P=r(e(93));function a(){var e=this.context,l=(0,O.default)(e).getInstance(),n=void 0,f=void 0,d=void 0,c=void 0,h=void 0,p=void 0,g=void 0,_=void 0,i=void 0,m=void 0,E=void 0,t=void 0;function v(){if(!(p&&m&&_&&i&&t&&E))throw new Error(D.default.MISSING_CONFIG_ERROR)}function y(){return d}function T(){return h}function r(){d=!(f=null),c=[],m=i=_=p=null}function S(){v();var e=new Date,t=T(),n=1e3*_.getTime();t&&m.addRepresentationSwitch(t.adaptation.type,e,n,t.id)}function A(){v();var e=E.getStreamInfo(),t=e?e.manifestInfo:null,n=t?t.isDynamic:null,r=i.calcSegmentAvailabilityRange(h,n);m.addDVRInfo(E.getType(),_.getTime(),t,r)}function I(e){return null==e||e>=c.length?null:c[e]}function b(e){var t=e;d=!1,l.trigger(N.default.AST_IN_FUTURE,{delay:t}),setTimeout(function(){if(!y()){d=!0,l.trigger(N.default.DATA_UPDATE_STARTED,{sender:n}),c.forEach(function(e){e.segmentAvailabilityRange=null});for(var e=0;e<c.length;e++)g.updateRepresentation(c[e],!0)}},t)}function a(e){if(e.sender.getStreamProcessor()===E&&y())if(e.error)l.trigger(N.default.DATA_UPDATE_COMPLETED,{sender:this,error:e.error});else{var t=e.representation,n=m.getCurrentManifestUpdate(),r=!1,i=0,a=void 0,o=void 0;if(t.adaptation.period.mpd.manifest.type===C.default.DYNAMIC&&!t.adaptation.period.mpd.manifest.ignorePostponeTimePeriod){var s=t.segmentAvailabilityRange.end-t.segmentAvailabilityRange.start;i=1e3*(_.computeLiveDelay(h.segmentDuration,E.getStreamInfo().manifestInfo.DVRWindowSize)-s)}if(0<i)return A(),b(i),o=new w.default(M.default.SEGMENTS_UPDATE_FAILED_ERROR_CODE,M.default.SEGMENTS_UPDATE_FAILED_ERROR_MESSAGE),void l.trigger(N.default.DATA_UPDATE_COMPLETED,{sender:this,data:f,currentRepresentation:h,error:o});if(n){for(var u=0;u<n.representationInfo.length;u++)if((a=n.representationInfo[u]).index===t.index&&a.mediaType===E.getType()){r=!0;break}r||m.addManifestUpdateRepresentationInfo(t,E.getType())}!function(){for(var e=0,t=c.length;e<t;e++){var n=c[e].segmentInfoType;if(null===c[e].segmentAvailabilityRange||!P.default.hasInitialization(c[e])||(n===C.default.SEGMENT_BASE||n===C.default.BASE_URL)&&!c[e].segments)return!1}return!0}()||(d=!1,p.setPlaybackQuality(E.getType(),E.getStreamInfo(),function(e){return c.indexOf(e)}(h)),m.updateManifestUpdateInfo({latency:h.segmentAvailabilityRange.end-_.getTime()}),m.getCurrentRepresentationSwitch(T().adaptation.type)||S(),l.trigger(N.default.DATA_UPDATE_COMPLETED,{sender:this,data:f,currentRepresentation:h}))}}function o(e){e.isDynamic&&function(e){var t=void 0;v();for(var n=0,r=c.length;n<r;n++)(t=c[n]).segmentAvailabilityRange=i.calcSegmentAvailabilityRange(t,e)}(e.isDynamic)}function s(e){e.sender.getStreamProcessor()===E&&(t.getValue().doNotUpdateDVRWindowOnBufferUpdated||A())}function u(e){e.mediaType===E.getType()&&E.getStreamInfo().id===e.streamInfo.id&&(h=I(e.newQuality),S())}function R(e){if(e.newDuration){var t=T();if(t&&t.adaptation.period)t.adaptation.period.duration=e.newDuration}}return n={initialize:function(){g=E.getIndexHandler()},setConfig:function(e){e.abrController&&(p=e.abrController),e.dashMetrics&&(m=e.dashMetrics),e.playbackController&&(_=e.playbackController),e.timelineConverter&&(i=e.timelineConverter),e.manifestModel&&(t=e.manifestModel),e.streamProcessor&&(E=e.streamProcessor)},getData:function(){return f},isUpdating:y,updateData:function(e,t,n){v();var r=E.getStreamInfo(),i=p.getTopQualityIndexFor(n,r?r.id:null),a=p.getMinAllowedIndexFor(n),o=void 0,s=null;if(d=!0,l.trigger(N.default.DATA_UPDATE_STARTED,{sender:this}),c=t,o=null!==f&&f.id==e.id||n===D.default.FRAGMENTED_TEXT?p.getQualityFor(n):(s=p.getThroughputHistory().getAverageThroughput(n)||p.getInitialBitrateFor(n,r),p.getQualityForBitrate(E.getMediaInfo(),s)),void 0!==a&&o<a&&(o=a),i<o&&(o=i),h=I(o),f=e,n!==D.default.VIDEO&&n!==D.default.AUDIO&&n!==D.default.FRAGMENTED_TEXT)return d=!1,void l.trigger(N.default.DATA_UPDATE_COMPLETED,{sender:this,data:f,currentRepresentation:h});for(var u=0;u<c.length;u++)g.updateRepresentation(c[u],!0)},getStreamProcessor:function(){return E},getCurrentRepresentation:T,getRepresentationForQuality:I,reset:function(){l.off(N.default.QUALITY_CHANGE_REQUESTED,u,n),l.off(N.default.REPRESENTATION_UPDATED,a,n),l.off(N.default.WALLCLOCK_TIME_UPDATED,o,n),l.off(N.default.BUFFER_LEVEL_UPDATED,s,n),l.off(N.default.MANIFEST_VALIDITY_CHANGED,R,n),r()}},r(),l.on(N.default.QUALITY_CHANGE_REQUESTED,u,n),l.on(N.default.REPRESENTATION_UPDATED,a,n),l.on(N.default.WALLCLOCK_TIME_UPDATED,o,n),l.on(N.default.BUFFER_LEVEL_UPDATED,s,n),l.on(N.default.MANIFEST_VALIDITY_CHANGED,R,n),n}a.__dashjs_factory_name="RepresentationController",n.default=i.default.getClassFactory(a),t.exports=n.default},{109:109,223:223,48:48,49:49,53:53,56:56,63:63,93:93}],65:[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(63)),i=r(e(49)),c=r(e(84)),h=r(e(82)),p=r(e(78)),g=r(e(80)),_=r(e(61)),m=r(e(62));function a(t){t=t||{};var e,n,r=this.context,i=t.dashMetrics,a=t.mediaPlayerModel,o=t.errHandler,s=t.baseURLController,u=void 0,l=void 0;function f(e){return e.segments?u[d.default.SEGMENT_BASE]:u[e.segmentInfoType]}return e={initialize:function(e){l.initialize(),u[d.default.SEGMENT_TIMELINE]=(0,c.default)(r).create(t,e),u[d.default.SEGMENT_TEMPLATE]=(0,h.default)(r).create(t,e),u[d.default.SEGMENT_LIST]=(0,p.default)(r).create(t,e),u[d.default.SEGMENT_BASE]=(0,g.default)(r).create(t,e)},update:function(e,t,n,r){n||function(e){l.loadInitialization(e)}(e),r||function(e,t){l.loadSegments(e,t,e.indexRange)}(e,t)},getSegmentByIndex:function(e,t,n){var r=f(e);return r?r.getSegmentByIndex(e,t,n):null},getSegmentByTime:function(e,t){var n=f(e);return n?n.getSegmentByTime(e,t):null}},u={},(n=t.mimeType,l="webm"===(n?n.split("/")[1]:"").toLowerCase()?(0,m.default)(r).getInstance():(0,_.default)(r).getInstance()).setConfig({baseURLController:s,dashMetrics:i,mediaPlayerModel:a,errHandler:o}),e}a.__dashjs_factory_name="SegmentsController";var o=i.default.getClassFactory(a);n.default=o,t.exports=n.default},{49:49,61:61,62:62,63:63,78:78,80:80,82:82,84:84}],66:[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(109)),I=r(e(63)),b=r(e(93)),R=r(e(85)),D=r(e(92)),i=r(e(91)),a=r(e(97)),M=r(e(87)),C=r(e(86)),w=r(e(88)),O=r(e(214)),N=r(e(218)),o=r(e(49)),P=r(e(47)),L=r(e(223)),x=r(e(53)),F=e(203);function s(){var e=void 0,l=void 0,f=void 0,d=void 0,o=this.context,s=(0,N.default)(o).getInstance(),h=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e};function u(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!==A.default.TEXT?new RegExp(t):new RegExp("(vtt|ttml)"),e.Representation_asArray&&e.Representation_asArray.length&&0<e.Representation_asArray.length){var f=m(e.Representation_asArray[0]);if(f&&0<f.length&&0<=F.THUMBNAILS_SCHEME_ID_URIS.indexOf(f[0].schemeIdUri))return t===A.default.IMAGE;if(e.Representation_asArray[0].hasOwnProperty(I.default.CODECS)&&(0===(s=e.Representation_asArray[0].codecs).search(A.default.STPP)||0===s.search(A.default.WVTT)))return t===A.default.FRAGMENTED_TEXT}if(a){if(1<a.length)return t===A.default.MUXED;a[0]&&a[0].contentType===t&&(l=u=!0)}if(e.hasOwnProperty(I.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(I.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 c(e){return e&&Array.isArray(e.Representation_asArray)&&e.Representation_asArray.sort(function(e,t){return e.bandwidth-t.bandwidth}),e}function g(e,t){return e&&e.Period_asArray&&h(t)&&e.Period_asArray[t]?e.Period_asArray[t].AdaptationSet_asArray:[]}function _(e){var t=!1;return e&&e.hasOwnProperty("type")&&(t=e.type===I.default.DYNAMIC),t}function m(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 c(t.AdaptationSet_asArray[e.index])}}function v(e){var t=e.S_asArray[e.S_asArray.length-1];return!t.hasOwnProperty("r")||0<=t.r}function y(e,t){if(!e)throw new Error("Period cannot be null or undefined");var n=D.default.DEFAULT_ID+"_"+t;return e.hasOwnProperty(I.default.ID)&&0<e.id.length&&"__proto__"!==e.id&&(n=e.id),n}function T(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(A.default.SCHEME_ID_URI))throw new Error("Invalid EventStream. SchemeIdUri has to be set");i.schemeIdUri=e[r].schemeIdUri,e[r].hasOwnProperty(I.default.TIMESCALE)&&(i.timescale=e[r].timescale),e[r].hasOwnProperty(I.default.VALUE)&&(i.value=e[r].value),n.push(i)}return n}function S(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 s.isRelative(n)&&(a=!0,r.baseUri&&(n=s.resolve(n,r.baseUri))),t.url=n,e.hasOwnProperty(I.default.SERVICE_LOCATION)&&e.serviceLocation.length?t.serviceLocation=e.serviceLocation:t.serviceLocation=n,e.hasOwnProperty(I.default.DVB_PRIORITY)&&(t.dvb_priority=e[I.default.DVB_PRIORITY]),e.hasOwnProperty(I.default.DVB_WEIGHT)&&(t.dvb_weight=e[I.default.DVB_WEIGHT]),e.hasOwnProperty(I.default.AVAILABILITY_TIME_OFFSET)&&(t.availabilityTimeOffset=e[I.default.AVAILABILITY_TIME_OFFSET]),e.hasOwnProperty(I.default.AVAILABILITY_TIME_COMPLETE)&&(t.availabilityTimeComplete="false"!==e[I.default.AVAILABILITY_TIME_COMPLETE]),i.push(t),a}}),i}return e={getIsTypeOf:u,getIsTextTrack:p,getLanguageForAdaptation:function(e){var t="";return e&&e.hasOwnProperty(I.default.LANG)&&(t=e.lang.replace(/[^A-Za-z0-9-]/g,"")),t},getViewpointForAdaptation:function(e){return e&&e.hasOwnProperty(I.default.VIEWPOINT)?e.Viewpoint:null},getRolesForAdaptation:function(e){return e&&e.hasOwnProperty(I.default.ROLE_ASARRAY)?e.Role_asArray:[]},getAccessibilityForAdaptation:function(e){return e&&e.hasOwnProperty(I.default.ACCESSIBILITY_ASARRAY)?e.Accessibility_asArray:[]},getAudioChannelConfigurationForAdaptation:function(e){return e&&e.hasOwnProperty(I.default.AUDIOCHANNELCONFIGURATION_ASARRAY)?e.AudioChannelConfiguration_asArray:[]},getAdaptationForIndex:function(e,t,n){var r=g(t,n);return 0<r.length&&h(e)?r[e]:null},getIndexForAdaptation:function(e,t,n){var r=g(t,n),i=r.length;if(e)for(var a=0;a<i;a++){if((0,O.default)(o).getInstance().areEqual(r[a],e))return a}return-1},getAdaptationForId:function(e,t,n){var r,i=g(t,n),a=void 0;for(a=0,r=i.length;a<r;a++)if(i[a].hasOwnProperty(I.default.ID)&&i[a].id===e)return i[a];return null},getAdaptationsForType:function(e,t,n){var r,i=g(e,t),a=void 0,o=[];for(a=0,r=i.length;a<r;a++)u(i[a],n)&&o.push(c(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(I.default.CENC_DEFAULT_KID)?e[I.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(I.default.CONTENTPROTECTION_ASARRAY)&&0!==e.ContentProtection_asArray.length?e.ContentProtection_asArray:null},getIsDynamic:_,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(I.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(I.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=c(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}})},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=S(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 b.default;if(d.index=u,d.adaptation=e,f.hasOwnProperty(I.default.ID)&&(d.id=f.id),f.hasOwnProperty(I.default.CODECS)&&(d.codecs=f.codecs),f.hasOwnProperty(I.default.CODEC_PRIVATE_DATA)&&(d.codecPrivateData=f.codecPrivateData),f.hasOwnProperty(I.default.BANDWITH)&&(d.bandwidth=f.bandwidth),f.hasOwnProperty(I.default.WIDTH)&&(d.width=f.width),f.hasOwnProperty(I.default.HEIGHT)&&(d.height=f.height),f.hasOwnProperty(I.default.SCAN_TYPE)&&(d.scanType=f.scanType),f.hasOwnProperty(I.default.MAX_PLAYOUT_RATE)&&(d.maxPlayoutRate=f.maxPlayoutRate),f.hasOwnProperty(I.default.SEGMENT_BASE)?(a=f.SegmentBase,d.segmentInfoType=I.default.SEGMENT_BASE):f.hasOwnProperty(I.default.SEGMENT_LIST)?(a=f.SegmentList).hasOwnProperty(I.default.SEGMENT_TIMELINE)?(d.segmentInfoType=I.default.SEGMENT_TIMELINE,d.useCalculatedLiveEdgeTime=v(a.SegmentTimeline)):(d.segmentInfoType=I.default.SEGMENT_LIST,d.useCalculatedLiveEdgeTime=!0):f.hasOwnProperty(I.default.SEGMENT_TEMPLATE)?((a=f.SegmentTemplate).hasOwnProperty(I.default.SEGMENT_TIMELINE)?(d.segmentInfoType=I.default.SEGMENT_TIMELINE,d.useCalculatedLiveEdgeTime=v(a.SegmentTimeline)):d.segmentInfoType=I.default.SEGMENT_TEMPLATE,a.hasOwnProperty(I.default.INITIALIZATION_MINUS)&&(d.initialization=a.initialization.split("$Bandwidth$").join(f.bandwidth).split("$RepresentationID$").join(f.id))):d.segmentInfoType=I.default.BASE_URL,d.essentialProperties=m(f),a){if(a.hasOwnProperty(I.default.INITIALIZATION)){var c=a.Initialization;c.hasOwnProperty(I.default.SOURCE_URL)&&(d.initialization=c.sourceURL),c.hasOwnProperty(I.default.RANGE)&&(d.range=c.range)}else f.hasOwnProperty(I.default.MIME_TYPE)&&p(f.mimeType)&&(d.range=0);a.hasOwnProperty(I.default.TIMESCALE)&&(d.timescale=a.timescale),a.hasOwnProperty(I.default.DURATION)&&(d.segmentDuration=a.duration/d.timescale),a.hasOwnProperty(I.default.MEDIA)&&(d.media=a.media),a.hasOwnProperty(I.default.START_NUMBER)&&(d.startNumber=a.startNumber),a.hasOwnProperty(I.default.INDEX_RANGE)&&(d.indexRange=a.indexRange),a.hasOwnProperty(I.default.PRESENTATION_TIME_OFFSET)&&(d.presentationTimeOffset=a.presentationTimeOffset/d.timescale),a.hasOwnProperty(I.default.AVAILABILITY_TIME_OFFSET)?d.availabilityTimeOffset=a.availabilityTimeOffset:o&&void 0!==o.availabilityTimeOffset&&(d.availabilityTimeOffset=o.availabilityTimeOffset),a.hasOwnProperty(I.default.AVAILABILITY_TIME_COMPLETE)?d.availabilityTimeComplete="false"!==a.availabilityTimeComplete:o&&void 0!==o.availabilityTimeComplete&&(d.availabilityTimeComplete=o.availabilityTimeComplete)}d.MSETimeOffset=(void 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(I.default.ID)&&(r.id=i.id),r.index=a,r.period=e,u(i,A.default.MUXED)?r.type=A.default.MUXED:u(i,A.default.AUDIO)?r.type=A.default.AUDIO:u(i,A.default.VIDEO)?r.type=A.default.VIDEO:u(i,A.default.FRAGMENTED_TEXT)?r.type=A.default.FRAGMENTED_TEXT:u(i,A.default.IMAGE)?r.type=A.default.IMAGE:r.type=A.default.TEXT,n.push(r);return n},getRegularPeriods:function(e){var t,n=!!e&&_(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(I.default.START)?(s=new D.default).start=a.start:null!==i&&i.hasOwnProperty(I.default.DURATION)&&null!==o?(s=new D.default).start=parseFloat((o.start+o.duration).toFixed(5)):0!==u||n||((s=new D.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=y(a,u),s.index=u,s.mpd=e,a.hasOwnProperty(I.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("setConfig function has to be called previously")}();var t=_(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(I.default.AVAILABILITY_START_TIME)?t.availabilityStartTime=new Date(e.availabilityStartTime.getTime()):e.loadedTime&&(t.availabilityStartTime=new Date(e.loadedTime.getTime())),e.hasOwnProperty(I.default.AVAILABILITY_END_TIME)&&(t.availabilityEndTime=new Date(e.availabilityEndTime.getTime())),e.hasOwnProperty(I.default.MINIMUM_UPDATE_PERIOD)&&(t.minimumUpdatePeriod=e.minimumUpdatePeriod),e.hasOwnProperty(I.default.MEDIA_PRESENTATION_DURATION)&&(t.mediaPresentationDuration=e.mediaPresentationDuration),e.hasOwnProperty(A.default.SUGGESTED_PRESENTATION_DELAY)&&(t.suggestedPresentationDelay=e.suggestedPresentationDelay),e.hasOwnProperty(I.default.TIMESHIFT_BUFFER_DEPTH)&&(t.timeShiftBufferDepth=e.timeShiftBufferDepth),e.hasOwnProperty(I.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(A.default.SCHEME_ID_URI))throw new Error("Invalid EventStream. SchemeIdUri has to be set");for(s.schemeIdUri=r[a].schemeIdUri,r[a].hasOwnProperty(I.default.TIMESCALE)&&(s.timescale=r[a].timescale),r[a].hasOwnProperty(I.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(I.default.PRESENTATION_TIME)&&(u.presentationTime=r[a].Event_asArray[o].presentationTime),r[a].Event_asArray[o].hasOwnProperty(I.default.DURATION)&&(u.duration=r[a].Event_asArray[o].duration),r[a].Event_asArray[o].hasOwnProperty(I.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):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),T(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),T(n,t)},getUTCTimingSources:function(e){var t=_(e),n=!!e&&e.hasOwnProperty(I.default.AVAILABILITY_START_TIME),r=e?e.UTCTiming_asArray:null,i=[];return(t||n)&&r&&r.forEach(function(e){var t=new a.default;e.hasOwnProperty(A.default.SCHEME_ID_URI)&&(t.schemeIdUri=e.schemeIdUri,e.hasOwnProperty(I.default.VALUE)&&(t.value=e.value.toString(),i.push(t)))}),i},getBaseURLsFromElement:S,getRepresentationSortFunction:t,getLocation:function(e){if(e&&e.hasOwnProperty(A.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(I.default.SEGMENT_LIST))return!(r=n.SegmentList).hasOwnProperty(I.default.SEGMENT_TIMELINE)||v(r.SegmentTimeline);if(n.hasOwnProperty(I.default.SEGMENT_TEMPLATE)&&(r=n.SegmentTemplate).hasOwnProperty(I.default.SEGMENT_TIMELINE))return v(r.SegmentTimeline)}return!1},getSuggestedPresentationDelay:function(e){return e&&e.hasOwnProperty(I.default.SUGGESTED_PRESENTATION_DELAY)?e.suggestedPresentationDelay:null},getAvailabilityStartTime:function(e){return e&&e.hasOwnProperty(I.default.AVAILABILITY_START_TIME)?e.availabilityStartTime.getTime():null},setConfig:function(e){e&&(e.errHandler&&(f=e.errHandler),e.BASE64&&(d=e.BASE64))}},l=(0,P.default)(o).getInstance().getLogger(e),e}s.__dashjs_factory_name="DashManifestModel",n.default=o.default.getSingletonFactory(s),t.exports=n.default},{109:109,203:203,214:214,218:218,223:223,47:47,49:49,53:53,63:63,85:85,86:86,87:87,88:88,91:91,92:92,93:93,97:97}],67:[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(49)),u=r(e(47)),l=r(e(77)),f=r(e(3)),d=r(e(76)),c=r(e(74)),h=r(e(73)),p=r(e(75)),g=r(e(70)),_=r(e(71));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:!1,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,47:47,49:49,70:70,71:71,73:73,74:74,75:75,76:76,77:77}],68:[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},{}],69:[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(68),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},{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(69)),a=r(e(63)),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},{63:63,69:69}],71:[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(69)),a=r(e(63)),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},{63:63,69:69}],72:[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},{}],73:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r,i=e(72),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},{72:72}],74:[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(72)),a=r(e(109)),o=r(e(63)),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,a.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[2]||0)+2592e3*parseFloat(t[4]||0)+86400*parseFloat(t[6]||0)+3600*parseFloat(t[8]||0)+60*parseFloat(t[10]||0)+parseFloat(t[12]||0);return void 0!==t[1]&&(n=-n),n})}n.default=u,t.exports=n.default},{109:109,63:63,72:72}],75:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r,i=e(72),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},{72:72}],76:[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(72)),o=r(e(63)),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},{63:63,72:72}],77:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r,i=e(49),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},{49:49}],78:[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(49)),a=r(e(109)),f=e(81);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)throw new Error("no representation");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)throw new Error("no representation");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},{109:109,49:49,81:81}],79:[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 function(e,t,n){return void 0!==n&&0!=+n?(n=+n,null===(t=+t)||isNaN(t)||"number"!=typeof n||n%1!=0?NaN:(t=t.toString().split("e"),+((t=(t=Math[e](+(t[0]+"e"+(t[1]?+t[1]-n:-n)))).toString().split("e"))[0]+"e"+(t[1]?+t[1]+n:n)))):Math[e](t)}("round",e,t)}}]),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},{}],80:[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(49)),o=r(e(109));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)throw new Error("no representation");var n=e.segments?e.segments.length:0,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){if(a(),!e)throw new Error("no representation");return r(e,function(e,t){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},{109:109,49:49}],81:[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 m(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),m(e,n,p,t)?(p.replacementTime=l||r,o=g(o=g(o,"Number",p.replacementNumber),"Time",p.replacementTime),p.media=o,p.mediaRange=s,p):null};var r,i=e(95),f=(r=i)&&r.__esModule?r:{default:r};function d(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=d(n.toString(),s);break;case"x":u=d(n.toString(16),s);break;case"X":u=d(n.toString(16),s).toUpperCase();break;case"o":u=d(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=new f.default;return l.representation=e,l.duration=t,l.presentationStartTime=n,l.mediaStartTime=r,l.availabilityStartTime=i,l.availabilityEndTime=a.calcAvailabilityEndTimeFromPresentationTime(o,e.adaptation.period.mpd,s),l.wallStartTime=a.calcWallTimeForSegment(l,s),l.replacementNumber=function(e,t){return e.representation.startNumber+t}(l,u),l.availabilityIdx=u,l}function m(e,t,n,r){var i=e.getPeriodEnd(t,r);return!(e.calcPeriodRelativeTimeFromMpdRelativeTime(t,i)<=e.calcPeriodRelativeTimeFromMpdRelativeTime(t,n.presentationStartTime))}},{95:95}],82:[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(49)),a=r(e(109)),f=e(81);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)throw new Error("no representation");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)throw new Error("no representation");var n=e.segmentDuration;if(isNaN(n))return null;var r=u.calcPeriodRelativeTimeFromMpdRelativeTime(e,t);return i(e,Math.floor(r/n)-1)}}}o.__dashjs_factory_name="TemplateSegmentsGetter";var s=i.default.getClassFactory(o);n.default=s,t.exports=n.default},{109:109,49:49,81:81}],83:[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(48)),d=r(e(56)),i=r(e(49));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},{48:48,49:49,56:56}],84:[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(49)),a=r(e(109)),p=e(81);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 m=!1;for(c=0,r=(n=o.S_asArray).length;c<r&&!m;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 E=e.segmentAvailabilityRange?e.segmentAvailabilityRange.end:y.calcSegmentAvailabilityRange(e,v).end;g=y.calcMediaTimeFromPresentationTime(E,e),e.segmentDuration=d.d/i}p=Math.ceil((g-l)/(d.d/i))-1}for(h=0;h<=p&&!m;h++)(m=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)throw new Error("no representation");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 d-.5<=t&&(h=!0),!1}),c},getSegmentByTime:function(f,e){if(t(),!f)throw new Error("no representation");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(t>=c-i.d/a*1.5){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},{109:109,49:49,81:81}],85:[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},{}],86:[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},{}],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.duration=NaN,this.presentationTime=NaN,this.id=NaN,this.messageData="",this.eventStream=null,this.presentationTimeDelta=NaN},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.adaptionSet=null,this.representation=null,this.period=null,this.timescale=1,this.value="",this.schemeIdUri=""},t.exports=n.default},{}],89:[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},{}],90:[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},{}],91:[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},{}],92:[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},{}],93:[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(63),s=(a=o)&&a.__esModule?a:{default:a},u=(r(l,null,[{key:"hasInitialization",value:function(e){return null!==e.initialization||null!==e.range}},{key:"hasSegments",value:function(e){return e.segmentInfoType!==s.default.BASE_URL&&e.segmentInfoType!==s.default.SEGMENT_BASE&&!e.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},{63:63}],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.id=null,this.quality=null,this.DVRWindow=null,this.fragmentDuration=null,this.mediaInfo=null,this.MSETimeOffset=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.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},{}],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.id=null,this.index=null,this.start=NaN,this.duration=NaN,this.manifestInfo=null,this.isLast=!0},t.exports=n.default},{}],97:[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},{}],98:[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(156)),u=r(e(226)),l=r(e(223)),f=r(e(48)),d=r(e(205)),c=r(e(56)),h=r(e(53)),i=r(e(49));function a(e){e=e||{};var t,n=this.context,i=(0,f.default)(n).getInstance(),a=void 0,o=void 0;return a={checkForExistence:function(t){function e(e){i.trigger(c.default.CHECK_FOR_EXISTENCE_COMPLETED,{request:t,exists:e})}if(t){var n=new u.default(t.url);o.load({request:n,success:function(){e(!0)},error:function(){e(!1)}})}else e(!1)},load:function(n){function r(e,t){i.trigger(c.default.LOADING_COMPLETED,{request:n,response:e||null,error:t||null,sender:a})}n?o.load({request:n,progress:function(e){i.trigger(c.default.LOADING_PROGRESS,{request:n,stream:e.stream}),e.data&&i.trigger(c.default.LOADING_DATA_PROGRESS,{request:n,response:e.data||null,error:null,sender:a})},success:function(e){r(e)},error:function(e,t,n){r(void 0,new l.default(h.default.FRAGMENT_LOADER_LOADING_FAILURE_ERROR_CODE,n,t))},abort:function(e){e&&i.trigger(c.default.LOADING_ABANDONED,{request:e,mediaType:e.mediaType,sender:a})}}):r(void 0,new l.default(h.default.FRAGMENT_LOADER_NULL_REQUEST_ERROR_CODE,h.default.FRAGMENT_LOADER_NULL_REQUEST_ERROR_MESSAGE))},abort:function(){o&&o.abort()},reset:function(){o&&(o.abort(),o=null)}},t=(0,d.default)(n).getInstance(),o=(0,s.default)(n).create({errHandler:e.errHandler,dashMetrics:e.dashMetrics,mediaPlayerModel:e.mediaPlayerModel,requestModifier:e.requestModifier,boxParser:t,useFetch:e.settings.get().streaming.lowLatencyEnabled}),a}a.__dashjs_factory_name="FragmentLoader",n.default=i.default.getClassFactory(a),t.exports=n.default},{156:156,205:205,223:223,226:226,48:48,49:49,53:53,56:56}],99:[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)),a=r(e(124)),o=r(e(156)),g=r(e(218)),_=r(e(230)),m=r(e(223)),E=e(239),v=r(e(48)),y=r(e(56)),T=r(e(53)),i=r(e(49)),S=r(e(67)),A=r(e(47));function s(e){e=e||{};var s=this.context,u=(0,v.default)(s).getInstance(),l=(0,g.default)(s).getInstance(),t=void 0,f=void 0,n=void 0,d=void 0,c=void 0,h=e.mssHandler,r=e.errHandler;function i(e){u.trigger(y.default.INTERNAL_MANIFEST_LOADED,{manifest:e.manifest})}return t={load:function(o){var e=new _.default(o,E.HTTPRequest.MPD_TYPE);n.load({request:e,success:function(e,t,n){if(d){var r=void 0,i=void 0,a=void 0;if(n&&n!==o?(i=l.parseBaseUrl(n),r=n):(l.isRelative(o)&&(o=l.resolve(o,window.location.href)),i=l.parseBaseUrl(o)),null===c&&(c=function(e){var t=null;return-1<e.indexOf("SmoothStreamingMedia")?(h&&(t=h.createMssParser(),h.registerEvents()),t):-1<e.indexOf("MPD")?(0,S.default)(s).create():t}(e)),null!==c){d.setMatchers(c.getMatchers()),d.setIron(c.getIron());try{a=c.parse(e)}catch(e){return void u.trigger(y.default.INTERNAL_MANIFEST_LOADED,{manifest:null,error:new m.default(T.default.MANIFEST_LOADER_PARSING_FAILURE_ERROR_CODE,T.default.MANIFEST_LOADER_PARSING_FAILURE_ERROR_MESSAGE+""+o)})}a?(a.url=r||o,a.originalUrl||(a.originalUrl=a.url),a.hasOwnProperty(p.default.LOCATION)&&(i=l.parseBaseUrl(a.Location_asArray[0]),f.debug("BaseURI set by Location to: "+i)),a.baseUri=i,a.loadedTime=new Date,d.resolveManifestOnLoad(a)):u.trigger(y.default.INTERNAL_MANIFEST_LOADED,{manifest:null,error:new m.default(T.default.MANIFEST_LOADER_PARSING_FAILURE_ERROR_CODE,T.default.MANIFEST_LOADER_PARSING_FAILURE_ERROR_MESSAGE+""+o)})}else u.trigger(y.default.INTERNAL_MANIFEST_LOADED,{manifest:null,error:new m.default(T.default.MANIFEST_LOADER_PARSING_FAILURE_ERROR_CODE,T.default.MANIFEST_LOADER_PARSING_FAILURE_ERROR_MESSAGE+""+o)})}},error:function(e,t,n){u.trigger(y.default.INTERNAL_MANIFEST_LOADED,{manifest:null,error:new m.default(T.default.MANIFEST_LOADER_LOADING_FAILURE_ERROR_CODE,T.default.MANIFEST_LOADER_LOADING_FAILURE_ERROR_MESSAGE+(o+", ")+n)})}})},reset:function(){u.off(y.default.XLINK_READY,i,t),d&&(d.reset(),d=null),n&&(n.abort(),n=null),h&&h.reset()}},f=(0,A.default)(s).getInstance().getLogger(t),u.on(y.default.XLINK_READY,i,t),n=(0,o.default)(s).create({errHandler:r,dashMetrics:e.dashMetrics,mediaPlayerModel:e.mediaPlayerModel,requestModifier:e.requestModifier}),d=(0,a.default)(s).create({errHandler:r,dashMetrics:e.dashMetrics,mediaPlayerModel:e.mediaPlayerModel,requestModifier:e.requestModifier}),c=null,t}s.__dashjs_factory_name="ManifestLoader";var u=i.default.getClassFactory(s);n.default=u,t.exports=n.default},{109:109,124:124,156:156,218:218,223:223,230:230,239:239,47:47,48:48,49:49,53:53,56:56,67:67}],100:[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(48)),I=r(e(56)),i=r(e(49)),b=r(e(47)),R=r(e(53));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&&(clearInterval(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(E,e))}function _(){s=!0;var e=l.getValue(),t=e.url,n=f.getLocation(e);n&&(t=n),u.load(t)}function m(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 E(){o&&!c.get().streaming.scheduleWhilePaused||(s?g(c.get().streaming.manifestUpdateRetryInterval):_())}function v(e){e.error?e.error.code===R.default.MANIFEST_LOADER_PARSING_FAILURE_ERROR_CODE&&d.error(e.error):m(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){m(e)},refreshManifest:_,setConfig:function(e){e&&(e.manifestModel&&(l=e.manifestModel),e.adapter&&(f=e.adapter),e.mediaPlayerModel&&e.mediaPlayerModel,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,b.default)(e).getInstance().getLogger(t),t}a.__dashjs_factory_name="ManifestUpdater",n.default=i.default.getClassFactory(a),t.exports=n.default},{47:47,48:48,49:49,53:53,56:56}],101:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var ee=r(e(2)),te=r(e(109)),ne=r(e(110)),re=r(e(120)),ie=r(e(122)),ae=r(e(118)),oe=r(e(113)),se=r(e(99)),ue=r(e(210)),le=r(e(206)),fe=r(e(201)),de=r(e(215)),ce=r(e(199)),he=r(e(153)),pe=r(e(150)),ge=r(e(151)),_e=r(e(112)),me=r(e(154)),Ee=r(e(208)),ve=r(e(47)),ye=r(e(53)),Te=r(e(48)),Se=r(e(56)),Ae=r(e(102)),Ie=r(e(49)),be=r(e(50)),Re=e(52),De=r(e(58)),Me=r(e(60)),Ce=r(e(83)),we=e(239),Oe=r(e(1)),Ne=r(e(9)),Pe=r(e(223)),Le=e(216);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",n="MediaPlayer not initialized!",a=this.context,o=(0,Te.default)(a).getInstance(),s=(0,be.default)(a).getInstance(),u=(0,ve.default)(a).getInstance(),l=void 0,f=void 0,d=void 0,c=void 0,h=void 0,p=void 0,g=void 0,_=void 0,m=void 0,E=void 0,v=void 0,y=void 0,T=void 0,S=void 0,A=void 0,I=void 0,b=void 0,R=void 0,D=void 0,M=void 0,C=void 0,w=void 0,O=void 0,N=void 0,P=void 0,L=void 0;function x(){return!!d&&!!O.getElement()}function F(){return(0,Re.getVersionString)()}function U(){if(!g)throw r;return M.isPaused()}function k(e){var t=C.getCurrentDVRInfo();if(!t)return 0;var n=M.getLiveDelay(),r=t.range.start+e;return r>t.range.end-n&&(r=t.range.end-n),r}function B(e){if(!g)throw r;var t=q().currentTime;if(void 0!==e)t=D.getTimeRelativeToStreamId(t,e);else if(M.getIsDynamic()){var n=C.getCurrentDVRInfo();t=null===n?0:G()-(n.range.end-n.time)}return t}function G(){if(!g)throw r;var e=q().duration;if(M.getIsDynamic()){var t,n=C.getCurrentDVRInfo();if(!n)return 0;e=(t=n.range.end-n.range.start)<n.manifestInfo.DVRWindowSize?t:n.manifestInfo.DVRWindowSize}return e}function j(e){(0,Le.checkParameterType)(e,"boolean"),_=e}function Y(){I.restoreDefaultUTCTimingSources()}function K(){return C}function q(){if(!O.getElement())throw t;return O.getElement()}function H(e){if(!h)throw n;O.setElement(e),e&&(Z(),function(){if(T)return;var e=dashjs.MetricsReporting;if("function"==typeof e){var t=e(a).create();T=t.createMetricsReporting({debug:u,eventBus:o,mediaElement:q(),adapter:A,dashMetrics:C,events:Se.default,constants:te.default,metricsConstants:ne.default})}}(),function(){if(S)return;var e=dashjs.MssHandler;"function"==typeof e&&(ye.default.extend(e.errors),S=e(a).create({eventBus:o,mediaPlayerModel:I,dashMetrics:C,manifestModel:w,playbackController:M,protectionController:y,baseURLController:(0,oe.default)(a).getInstance(),errHandler:b,events:Se.default,constants:te.default,debug:u,initSegmentType:we.HTTPRequest.INIT_SEGMENT_TYPE,BASE64:Oe.default,ISOBoxer:Ne.default}))}(),D&&D.switchToVideoElement()),g&&X(),J()}function V(e){if(!p)throw i;var t=D.getActiveStreamInfo();return v.getTracksFor(e,t)}function z(e){if(!h)throw n;"string"==typeof e&&P.initialize(e),d=e,(p||g)&&X(),x()&&J()}function W(){if(!p)throw i;var e=D.getActiveStreamInfo();return e?D.getStreamById(e.id):null}function X(){p=g=!1,A.reset(),D.reset(),M.reset(),m.reset(),v.reset(),N.reset(),y&&(s.get().streaming.keepProtectionMediaKeys?y.stop():(y.reset(),y=null,Z()))}function Q(){return(0,se.default)(a).create({errHandler:b,dashMetrics:C,mediaPlayerModel:I,requestModifier:(0,de.default)(a).getInstance(),mssHandler:S,settings:s})}function Z(){if(y)return y;var e=dashjs.Protection;if("function"!=typeof e)return null;var t=e(a).create();return Se.default.extend(e.events),Ae.default.extend(e.events,{publicOnly:!0}),ye.default.extend(e.errors),R=R||(0,le.default)(a).getInstance(),y=t.createProtectionSystem({debug:u,errHandler:b,videoModel:O,capabilities:R,eventBus:o,events:Se.default,BASE64:Oe.default,constants:te.default})}function $(e){var t=C.getCurrentDVRInfo();return t?e+(t.manifestInfo.availableFrom.getTime()/1e3+t.range.start):0}function J(){!p&&d&&(p=!0,f.info("Streaming Initialized"),function(){var e=Q();D=D||(0,ie.default)(a).getInstance(),v.setConfig({domStorage:L}),D.setConfig({capabilities:R,manifestLoader:e,manifestModel:w,mediaPlayerModel:I,protectionController:y,adapter:A,dashMetrics:C,errHandler:b,timelineConverter:E,videoModel:O,playbackController:M,abrController:m,mediaController:v,textController:N,settings:s}),M.setConfig({streamController:D,dashMetrics:C,mediaPlayerModel:I,adapter:A,videoModel:O,timelineConverter:E,uriFragmentModel:P,settings:s}),m.setConfig({streamController:D,domStorage:L,mediaPlayerModel:I,dashMetrics:C,adapter:A,videoModel:O,settings:s}),m.createAbrRulesCollection(),N.setConfig({errHandler:b,manifestModel:w,adapter:A,mediaController:v,streamController:D,videoModel:O}),D.initialize(_,c)}(),"string"==typeof d?D.load(d):D.loadWithManifest(d)),!g&&x()&&(g=!0,f.info("Playback Initialized"))}return l={initialize:function(e,t,n){R=R||(0,le.default)(a).getInstance(),b=(0,ue.default)(a).getInstance(),R.supportsMediaSource()?h||(h=!0,E=(0,Ce.default)(a).getInstance(),m=m||(0,_e.default)(a).getInstance(),M=M||(0,re.default)(a).getInstance(),v=v||(0,ae.default)(a).getInstance(),A=(0,De.default)(a).getInstance(),w=(0,pe.default)(a).getInstance(),C=(0,Me.default)(a).getInstance({settings:s}),N=(0,ce.default)(a).getInstance(),L=(0,Ee.default)(a).getInstance({settings:s}),A.setConfig({constants:te.default,cea608parser:ee.default,errHandler:b,BASE64:Oe.default}),Y(),j(void 0===n||n),e&&H(e),t&&z(t),f.info("[dash.js "+F()+"] MediaPlayer has been initialized")):b.error(new Pe.default(ye.default.CAPABILITY_MEDIASOURCE_ERROR_CODE,ye.default.CAPABILITY_MEDIASOURCE_ERROR_MESSAGE))},setConfig:function(e){e&&(e.capabilities&&(R=e.capabilities),e.streamController&&(D=e.streamController),e.playbackController&&(M=e.playbackController),e.mediaPlayerModel&&(I=e.mediaPlayerModel),e.abrController&&(m=e.abrController),e.mediaController&&(v=e.mediaController),e.settings&&(s=e.settings))},on:function(e,t,n){o.on(e,t,n)},off:function(e,t,n){o.off(e,t,n)},extend:function(e,t,n){Ie.default.extend(e,t,n,a)},attachView:H,attachSource:z,isReady:x,preload:function(){if(O.getElement()||p)return!1;if(!d)throw e;J()},play:function(){if(!g)throw r;(!_||U()&&g)&&M.play()},isPaused:U,pause:function(){if(!g)throw r;M.pause()},isSeeking:function(){if(!g)throw r;return M.isSeeking()},isDynamic:function(){if(!g)throw r;return M.getIsDynamic()},seek:function(e){if(!g)throw r;if((0,Le.checkParameterType)(e,"number"),isNaN(e))throw te.default.BAD_ARGUMENT_ERROR;var t=M.getIsDynamic()?k(e):e;M.seek(t)},setPlaybackRate:function(e){q().playbackRate=e},getPlaybackRate:function(){return q().playbackRate},setMute:function(e){(0,Le.checkParameterType)(e,"boolean"),q().muted=e},isMuted:function(){return q().muted},setVolume:function(e){if("number"!=typeof e||isNaN(e)||e<0||1<e)throw te.default.BAD_ARGUMENT_ERROR;q().volume=e},getVolume:function(){return q().volume},time:B,duration:G,timeAsUTC:function(){if(!g)throw r;return B()<0?NaN:$(B())},durationAsUTC:function(){if(!g)throw r;return $(G())},getActiveStream:W,getDVRWindowSize:function(){var e=C.getCurrentDVRInfo();return e?e.manifestInfo.DVRWindowSize:0},getDVRSeekOffset:k,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:F,getDebug:function(){return u},getBufferLength:function(e){var t,n=[te.default.VIDEO,te.default.AUDIO,te.default.FRAGMENTED_TEXT];return e?-1===n.indexOf(e)?(f.warn("getBufferLength requested for invalid type"),NaN):(t=K().getCurrentBufferLevel(e))||NaN:(t=n.map(function(e){return 0<V(e).length?K().getCurrentBufferLevel(e):Number.MAX_VALUE}).reduce(function(e,t){return Math.min(e,t)}))===Number.MAX_VALUE?NaN:t},getTTMLRenderingDiv:function(){return O?O.getTTMLRenderingDiv():null},getVideoElement:q,getSource:function(){if(!d)throw e;return d},getCurrentLiveLatency:function(){if(!h)throw n;return g?M.getCurrentLiveLatency():NaN},getTopBitrateInfoFor:function(e){if(!p)throw i;return m.getTopBitrateInfoFor(e)},setAutoPlay:j,getAutoPlay:function(){return _},getDashMetrics:K,getQualityFor:function(e){if(!p)throw i;if(e!==te.default.IMAGE)return m.getQualityFor(e);var t=W();if(!t)return-1;var n=t.getThumbnailController();return n?n.getCurrentTrackIndex():-1},setQualityFor:function(e,t){if(!p)throw i;if(e===te.default.IMAGE){var n=W();if(!n)return;var r=n.getThumbnailController();r&&r.setTrackByIndex(t)}m.setPlaybackQuality(e,D.getActiveStreamInfo(),t)},updatePortalSize:function(){m.setElementSize(),m.setWindowResizeEventCalled(!0)},setTextDefaultLanguage:function(e){void 0===N&&(N=(0,ce.default)(a).getInstance()),N.setTextDefaultLanguage(e)},getTextDefaultLanguage:function(){return void 0===N&&(N=(0,ce.default)(a).getInstance()),N.getTextDefaultLanguage()},setTextDefaultEnabled:function(e){void 0===N&&(N=(0,ce.default)(a).getInstance()),N.setTextDefaultEnabled(e)},getTextDefaultEnabled:function(){return void 0===N&&(N=(0,ce.default)(a).getInstance()),N.getTextDefaultEnabled()},enableText:function(e){void 0===N&&(N=(0,ce.default)(a).getInstance()),N.enableText(e)},enableForcedTextStreaming:function(e){void 0===N&&(N=(0,ce.default)(a).getInstance()),N.enableForcedTextStreaming(e)},isTextEnabled:function(){return void 0===N&&(N=(0,ce.default)(a).getInstance()),N.isTextEnabled()},setTextTrack:function(e){if(!g)throw r;void 0===N&&(N=(0,ce.default)(a).getInstance()),N.setTextTrack(e)},getBitrateInfoListFor:function(e){if(!p)throw i;var t=W();return t?t.getBitrateListFor(e):[]},getStreamsFromManifest:function(e){if(!p)throw i;return A.getStreamsInfo(e)},getTracksFor:V,getTracksForTypeFromManifest:function(e,t,n){if(!p)throw i;return(n=n||A.getStreamsInfo(t,1)[0])?A.getAllMediaInfoForType(n,e,t):[]},getCurrentTrackFor:function(e){if(!p)throw i;var t=D.getActiveStreamInfo();return v.getCurrentTrackFor(e,t)},setInitialMediaSettingsFor:function(e,t){if(!h)throw n;v.setInitialSettings(e,t)},getInitialMediaSettingsFor:function(e){if(!h)throw n;return v.getInitialSettings(e)},setCurrentTrack:function(e){if(!p)throw i;v.setTrack(e)},getTrackSwitchModeFor:function(e){if(!h)throw n;return v.getSwitchMode(e)},setTrackSwitchModeFor:function(e,t){if(!h)throw n;v.setSwitchMode(e,t)},setSelectionModeForInitialTrack:function(e){if(!h)throw n;v.setSelectionModeForInitialTrack(e)},getSelectionModeForInitialTrack:function(){if(!h)throw n;return v.getSelectionModeForInitialTrack()},addABRCustomRule:function(e,t,n){I.addABRCustomRule(e,t,n)},removeABRCustomRule:function(e){I.removeABRCustomRule(e)},removeAllABRCustomRule:function(){I.removeABRCustomRule()},getAverageThroughput:function(e){var t=m.getThroughputHistory();return t?t.getAverageThroughput(e):0},retrieveManifest:function(e,n){var r=Q(),i=this;o.on(Se.default.INTERNAL_MANIFEST_LOADED,function e(t){t.error?n(null,t.error):n(t.manifest),o.off(Se.default.INTERNAL_MANIFEST_LOADED,e,i),r.reset()},i),P.initialize(e),r.load(e)},addUTCTimingSource:function(e,t){I.addUTCTimingSource(e,t)},removeUTCTimingSource:function(e,t){I.removeUTCTimingSource(e,t)},clearDefaultUTCTimingSources:function(){I.clearDefaultUTCTimingSources()},restoreDefaultUTCTimingSources:Y,setXHRWithCredentialsForType:function(e,t){I.setXHRWithCredentialsForType(e,t)},getXHRWithCredentialsForType:function(e){return I.getXHRWithCredentialsForType(e)},getProtectionController:function(){return Z()},attachProtectionController:function(e){y=e},setProtectionData:function(e){c=e,D&&D.setProtectionData(c)},displayCaptionsOnTop:function(e){var t=(0,fe.default)(a).getInstance();t.setConfig({videoModel:O}),t.initialize(),t.setDisplayCConTop(e)},attachTTMLRenderingDiv:function(e){if(!O.getElement())throw t;O.setTTMLRenderingDiv(e)},getCurrentTextTrackIndex:function(){var e=NaN;return N&&(e=N.getCurrentTrackIdx()),e},getThumbnail:function(e,t){if(e<0)return null;var n=M.getIsDynamic()?k(e):e,r=D.getStreamForTime(n);if(null===r)return null;var i=r.getThumbnailController();if(!i)return null;var a=D.getTimeRelativeToStreamId(n,r.getId());return i.get(a,t)},getDashAdapter:function(){return A},getSettings:function(){return s.get()},updateSettings:function(e){s.update(e)},resetSettings:function(){s.reset()},reset:function(){z(null),H(null),c=null,y&&(y.reset(),y=null),T&&(T.reset(),T=null),s.reset()}},f=u.getLogger(l),_=!(p=g=h=!1),A=c=y=null,Se.default.extend(Ae.default),I=(0,ge.default)(a).getInstance(),O=(0,me.default)(a).getInstance(),P=(0,he.default)(a).getInstance(),l}i.__dashjs_factory_name="MediaPlayer";var a=Ie.default.getClassFactory(i);a.events=Ae.default,a.errors=ye.default,Ie.default.updateClassFactory(i.__dashjs_factory_name,a),n.default=a,t.exports=n.default},{1:1,102:102,109:109,110:110,112:112,113:113,118:118,120:120,122:122,150:150,151:151,153:153,154:154,199:199,2:2,201:201,206:206,208:208,210:210,215:215,216:216,223:223,239:239,47:47,48:48,49:49,50:50,52:52,53:53,56:56,58:58,60:60,83:83,9:9,99:99}],102:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r,i=e(57);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_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},{57:57}],103:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r,i=e(101),a=(r=i)&&r.__esModule?r:{default:r};var s,o,u=(s="application/dash+xml",o=void 0,{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=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},{101:101}],104:[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(47)),i=r(e(49));function a(e){var t=this.context,n=void 0,r=void 0,i=void 0,a=[],o=e;function s(t,n){a=a.filter(function(e){return!((isNaN(n)||e.start<n)&&(isNaN(t)||e.end>t))})}return n={getAllBufferRanges:function(){for(var t=[],e=0;e<a.length;e++){var n=a[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){i="InitializationSegment"!==e.segmentType?(a.push(e),a.sort(function(e,t){return e.start-t.start}),null):e,r.debug("PreBufferSink appended chunk s: "+e.start+"; e: "+e.end),o&&o({chunk:e})},remove:s,abort:function(){},discharge:function(e,t){var n=function(t,n){return a.filter(function(e){return(isNaN(n)||e.start<n)&&(isNaN(t)||e.end>t)})}(e,t);return i&&(n.push(i),i=null),s(e,t),n},reset:function(){a=[],o=i=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},{47:47,49:49}],105:[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(47)),S=r(e(223)),A=r(e(48)),I=r(e(56)),i=r(e(49)),b=r(e(199)),R=r(e(53));function a(i,r,e,a){var o=this.context,s=(0,A.default)(o).getInstance(),u=void 0,l=void 0,f=void 0,d=void 0,c=void 0,t=[],h=[],p=e;function g(){try{return f.buffered}catch(e){return l.error("getAllBufferRanges exception: "+e.message),null}}function _(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!0}return!1}(t,r)&&s.trigger(I.default.SOURCEBUFFER_REMOVE_COMPLETED,{buffer:e,from:n.end(n.length-2),to:n.start(n.length-1),unintended:!0})}function n(){if(0<t.length){var e=t.shift();f.updating?y(e):(e(),n())}}function m(){f.updating||n()}function E(){f.updating||n()}function v(){l.error("SourceBufferSink error",r.type)}function y(e){t.push(e),f.updating||n()}return u={getAllBufferRanges:g,getBuffer:function(){return f},append:function(e){e?(h.push(e),d||y(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=g();_(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=g(),f.appendBuffer?f.appendBuffer(t.bytes):f.append(t.bytes,t),y(e.bind(i)))}catch(e){l.fatal('SourceBuffer append failed "'+e+'"'),0<h.length?r():d=!1,p&&p({chunk:t,error:new S.default(e.code,e.message)})}}()}.bind(this))):p({chunk:e,error:new S.default(R.default.APPEND_ERROR_CODE,R.default.APPEND_ERROR_MESSAGE)})},remove:function(t,n,e){var r=this;y(function(){try{0<=t&&t<n&&(e||"ended"!==i.readyState)&&f.remove(t,n),y(function(){s.trigger(I.default.SOURCEBUFFER_REMOVE_COMPLETED,{buffer:r,from:t,to:n,unintended:!1})})}catch(e){s.trigger(I.default.SOURCEBUFFER_REMOVE_COMPLETED,{buffer:r,from:t,to:n,unintended:!1,error:new S.default(e.code,e.message)})}})},abort:function(){try{"open"===i.readyState?f.abort():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",E,!1),f.removeEventListener("error",v,!1),f.removeEventListener("abort",v,!1)),clearInterval(c),!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)||y(function(){f.timestampOffset=e})},hasDiscontinuitiesAfter:function(e){try{var t=g();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:y},function(){l=(0,T.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));if("function"==typeof f.addEventListener)try{f.addEventListener("updateend",E,!1),f.addEventListener("error",v,!1),f.addEventListener("abort",v,!1)}catch(e){c=setInterval(m,50)}else c=setInterval(m,50)}catch(e){if(!r.isText&&-1===t.indexOf('codecs="stpp')&&-1===t.indexOf('codecs="wvtt'))throw e;var n=(0,b.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},{199:199,223:223,47:47,48:48,49:49,53:53,56:56}],106:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var re=r(e(109)),ie=r(e(107)),ae=r(e(116)),oe=r(e(117)),se=r(e(202)),ue=r(e(48)),le=r(e(56)),fe=r(e(47)),de=r(e(53)),i=r(e(49)),ce=r(e(223));function a(s){s=s||{};var u=this.context,i=(0,ue.default)(u).getInstance(),l=s.manifestModel,f=s.mediaPlayerModel,a=s.manifestUpdater,d=s.adapter,o=s.capabilities,c=s.errHandler,h=s.timelineConverter,e=s.dashMetrics,p=s.abrController,g=s.playbackController,_=s.mediaController,m=s.textController,E=s.videoModel,v=s.settings,y=void 0,T=void 0,S=void 0,A=void 0,I=void 0,b=void 0,r=void 0,R=void 0,D=void 0,t=void 0,M=void 0,C=void 0,n=void 0,w=void 0,O=[{codec:"avc1",compatibleCodecs:["avc3"]},{codec:"avc3",compatibleCodecs:["avc1"]}];function N(e){for(var t=S?S.length:0,n=0;n<t;n++){S[n].getFragmentModel().removeExecutedRequestsBeforeTime(F()+x()),S[n].reset(!1,e)}te(I=A=!(S=[])),i.off(le.default.CURRENT_TRACK_CHANGED,Y,y)}function P(){N(),b=null,R=!(r={})}function L(){B(),g&&g.pause(),t&&(t.reset(),t=null),P(),i.off(le.default.DATA_UPDATE_COMPLETED,Q,y),i.off(le.default.BUFFERING_COMPLETED,X,y),D&&(i.off(le.default.KEY_ERROR,G,y),i.off(le.default.SERVER_CERTIFICATE_UPDATED,G,y),i.off(le.default.LICENSE_REQUEST_COMPLETE,G,y),i.off(le.default.KEY_SYSTEM_SELECTED,G,y),i.off(le.default.KEY_SESSION_CREATED,G,y),i.off(le.default.KEY_STATUSES_CHANGED,G,y)),te(!1)}function x(){return b?b.duration:NaN}function F(){return b?b.start:NaN}function U(){return b}function k(){if(!(p&&p.hasOwnProperty("getBitrateList")&&d&&d.hasOwnProperty("getAllMediaInfoForType")&&d.hasOwnProperty("getEventsFor")))throw new Error(re.default.MISSING_CONFIG_ERROR)}function B(){C&&C.stop()}function G(e){e.error&&(c.error(e.error),T.fatal(e.error.message),L())}function j(e){var t,n=e?e.type:null,r=void 0;if(n===re.default.MUXED)return r="Multiplexed representations are intentionally not supported, as they are not compliant with the DASH-AVC/264 guidelines",T.fatal(r),c.error(new ce.default(de.default.MANIFEST_ERROR_ID_MULTIPLEXED_CODE,r,l.getValue())),!1;if(n===re.default.TEXT||n===re.default.FRAGMENTED_TEXT||n===re.default.EMBEDDED_TEXT||n===re.default.IMAGE)return!0;if(t=e.codec,T.debug(n+" codec: "+t),e.contentProtection&&!o.supportsEncryptedMedia())c.error(new ce.default(de.default.CAPABILITY_MEDIAKEYS_ERROR_CODE,de.default.CAPABILITY_MEDIAKEYS_ERROR_MESSAGE));else if(!o.supportsCodec(t))return r=n+"Codec ("+t+") is not supported.",T.error(r),!1;return!0}function Y(e){if(e.newMediaInfo.streamInfo.id===b.id){var t=e.newMediaInfo,n=l.getValue();d.setCurrentMediaInfo(b.id,t.type,t);var r=Z(e.newMediaInfo);if(r){var i=g.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"),w=e,a.refreshManifest()):(r.selectMediaInfo(t),t.type!==re.default.FRAGMENTED_TEXT?(p.updateTopQualityIndex(t),r.switchTrackAsked(),r.getFragmentModel().abortRequests()):(r.getScheduleController().setSeekTarget(NaN),r.setIndexHandlerTime(i),r.resetIndexHandler()))}}}function K(e,t){var n=d.getAllMediaInfoForType(b,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===re.default.EMBEDDED_TEXT)m.addEmbeddedTrack(r);else{if(!j(r))continue;_.addTrack(r)}e!==re.default.EMBEDDED_TEXT&&0!==_.getTracksFor(e,b).length&&(e!==re.default.IMAGE?((e!==re.default.FRAGMENTED_TEXT||e===re.default.FRAGMENTED_TEXT&&m.getTextDefaultEnabled())&&(_.checkInitialMediaSettingsForType(e,b),i=_.getCurrentTrackFor(e,b)),e!==re.default.FRAGMENTED_TEXT||m.getTextDefaultEnabled()||(i=_.getTracksFor(e,b)[0]),function(e,t,n,r){var i=(0,ie.default)(u).create({type:e?e.type:null,mimeType:e?e.mimeType:null,timelineConverter:h,adapter:d,manifestModel:l,mediaPlayerModel:f,dashMetrics:s.dashMetrics,baseURLController:s.baseURLController,stream:y,abrController:p,playbackController:g,mediaController:_,streamController:s.streamController,textController:m,errHandler:c,settings:v});if(i.initialize(n),p.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!==re.default.TEXT&&e.type!==re.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,se.default)(u).create({adapter:d,baseURLController:s.baseURLController,stream:y,timelineConverter:s.timelineConverter}))}else T.info("No "+e+" data.")}function q(){C||((C=(0,ae.default)(u).create()).setConfig({manifestUpdater:a,playbackController:g}),H())}function H(){var e=d.getEventsFor(b);C.addInlineEvents(e)}function V(e){var r=d.getAdaptationForType(b.index,e,b);r&&Array.isArray(r.Representation_asArray)&&(r.Representation_asArray=r.Representation_asArray.filter(function(e,t){if(0===t)return!0;var n=d.getCodec(r,t,!0);return!!o.supportsCodec(n)||(T.error("[Stream] codec not supported: "+n),!1)}))}function z(){for(var e=S.length,t=!!r.audio||!!r.video?new ce.default(de.default.DATA_UPDATE_FAILED_ERROR_CODE,de.default.DATA_UPDATE_FAILED_ERROR_MESSAGE):null,n=0;n<e;n++)if(S[n].isUpdating()||R)return;if(I){if(D)for(n=0;n<e&&S[n];n++)S[n].getType()!==re.default.AUDIO&&S[n].getType()!==re.default.VIDEO&&S[n].getType()!==re.default.FRAGMENTED_TEXT||D.initializeForMedia(S[n].getMediaInfo());t?c.error(t):i.trigger(le.default.STREAM_INITIALIZED,{streamInfo:b})}}function W(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 X(e){if(e.streamInfo===b){var t=$(),n=t.length;if(0!==n){for(var r=0;r<n;r++)if(!t[r].isBufferingCompleted()&&(t[r].getType()===re.default.AUDIO||t[r].getType()===re.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"),i.trigger(le.default.STREAM_BUFFERING_COMPLETED,{streamInfo:b})}else T.warn("onBufferingCompleted - can't trigger STREAM_BUFFERING_COMPLETED because no streamProcessor is defined")}}function Q(e){var t=e.sender.getStreamProcessor();t.getStreamInfo()===b&&(r[t.getType()]=e.error,z())}function Z(t){return t?$().filter(function(e){return e.getType()===t.type})[0]:null}function $(){for(var e=S.length,t=[],n=void 0,r=void 0,i=0;i<e;i++)(n=(r=S[i]).getType())!==re.default.AUDIO&&n!==re.default.VIDEO&&n!==re.default.FRAGMENTED_TEXT&&n!==re.default.TEXT||t.push(r);return t}function J(e,t){if(!e)return!1;var n=e.getStreamInfo(),r=U();if(!n||!r)return!1;var i=d.getAdaptationForType(n.index,t,n),a=d.getAdaptationForType(r.index,t,r);return i&&a?!i.ContentProtection&&!a.ContentProtection:!i&&!a}function ee(e,t){if(!e||!e.hasOwnProperty("getStreamInfo"))return!1;var n=e.getStreamInfo(),r=U();if(!n||!r)return!1;var i=d.getAdaptationForType(n.index,t,n),a=d.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<O.length;a++)if(O[a].codec===n){i=O[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 te(e){n=e}function ne(){return n}return y={initialize:function(e,t){b=e,(D=t)&&(i.on(le.default.KEY_ERROR,G,y),i.on(le.default.SERVER_CERTIFICATE_UPDATED,G,y),i.on(le.default.LICENSE_REQUEST_COMPLETE,G,y),i.on(le.default.KEY_SYSTEM_SELECTED,G,y),i.on(le.default.KEY_SESSION_CREATED,G,y),i.on(le.default.KEY_STATUSES_CHANGED,G,y))},activate:function(e,t){if(A)return t;var n=void 0;return i.on(le.default.CURRENT_TRACK_CHANGED,Y,y),n=ne()?(function(){if(R=!0,k(),V(re.default.VIDEO),V(re.default.AUDIO),R=!(I=!0),0===S.length){var e="No streams to play.";c.error(new ce.default(de.default.MANIFEST_ERROR_ID_NOSTREAMS_CODE,e,l.getValue())),T.debug(e)}else z()}(),t):function(e,t){k();var n=E.getElement();q(),R=!0,V(re.default.VIDEO),V(re.default.AUDIO),(!n||n&&/^VIDEO$/i.test(n.nodeName))&&K(re.default.VIDEO,e);K(re.default.AUDIO,e),K(re.default.TEXT,e),K(re.default.FRAGMENTED_TEXT,e),K(re.default.EMBEDDED_TEXT,e),K(re.default.MUXED,e),K(re.default.IMAGE,e);var r=W(t);if(R=!(I=!0),0===S.length){var i="No streams to play.";c.error(new ce.default(de.default.MANIFEST_ERROR_ID_NOSTREAMS_CODE,i,l.getValue())),T.fatal(i)}else z();return r}(e,t),A=!0,n},deactivate:N,isActive:function(){return A},getDuration:x,getStartTime:F,getId:function(){return b?b.id:null},getStreamInfo:U,preload:function(e,t){q(),K(re.default.VIDEO,e),K(re.default.AUDIO,e),K(re.default.TEXT,e),K(re.default.FRAGMENTED_TEXT,e),K(re.default.EMBEDDED_TEXT,e),K(re.default.MUXED,e),K(re.default.IMAGE,e),W(t),i.on(le.default.CURRENT_TRACK_CHANGED,Y,y);for(var n=0;n<S.length&&S[n];n++)S[n].getScheduleController().start();te(!0)},getFragmentController:function(){return t},getThumbnailController:function(){return M},getBitrateListFor:function(e){if(k(),e===re.default.IMAGE)return M?M.getBitrateList():[];var t=function(e){for(var t=S.length,n=null,r=0;r<t;r++)if((n=S[r]).getType()===e)return n.getMediaInfo();return null}(e);return p.getBitrateList(t)},startEventController:function(){C&&C.start()},stopEventController:B,updateData:function(e){T.info("Manifest updated... updating data system wide."),R=!(A=!1),b=e,C&&H(),V(re.default.VIDEO),V(re.default.AUDIO);for(var t=0,n=S.length;t<n;t++){var r=S[t],i=d.getMediaInfoForType(b,r.getType());p.updateTopQualityIndex(i),r.addMediaInfo(i,!0)}if(w&&"fragmentedText"!==(i=w.newMediaInfo).type){var a=Z(w.oldMediaInfo);if(!a)return;a.switchTrackAsked(),w=void 0}R=!1,z()},reset:L,getProcessors:$,setMediaSource:function(e){for(var t=0;t<S.length;)j(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.";c.error(new ce.default(de.default.MANIFEST_ERROR_ID_NOSTREAMS_CODE,n+"nostreams",l.getValue())),T.fatal(n)}},isMediaCodecCompatible:function(e){return ee(e,re.default.VIDEO)&&ee(e,re.default.AUDIO)},isProtectionCompatible:function(e){return J(e,re.default.VIDEO)&&J(e,re.default.AUDIO)},getPreloaded:ne,addInbandEvents:function(e){C&&C.addInbandEvents(e)}},T=(0,fe.default)(u).getInstance().getLogger(y),P(),t=(0,oe.default)(u).create({mediaPlayerModel:f,dashMetrics:e,errHandler:c,settings:v}),i.on(le.default.BUFFERING_COMPLETED,X,y),i.on(le.default.DATA_UPDATE_COMPLETED,Q,y),y}a.__dashjs_factory_name="Stream",n.default=i.default.getClassFactory(a),t.exports=n.default},{107:107,109:109,116:116,117:117,202:202,223:223,47:47,48:48,49:49,53:53,56:56}],107:[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(109)),N=r(e(213)),P=r(e(115)),L=r(e(198)),x=r(e(121)),F=r(e(64)),i=r(e(49)),U=e(216),k=r(e(59));function a(t){t=t||{};var n=this.context,r=t.type,i=t.errHandler,a=t.mimeType,o=t.timelineConverter,s=t.adapter,u=t.manifestModel,l=t.mediaPlayerModel,f=t.stream,d=t.abrController,c=t.playbackController,h=t.streamController,p=t.mediaController,g=t.textController,_=t.dashMetrics,m=t.settings,E=void 0,v=void 0,y=void 0,T=void 0,S=void 0,A=void 0,I=void 0,b=void 0,R=void 0,D=void 0;function e(){R=[]}function M(){y=[],v=null,e()}function C(){return f?f.getStreamInfo():null}function w(){return v}return E={initialize:function(e){(D=(0,k.default)(n).create({mimeType:a,timelineConverter:o,dashMetrics:_,mediaPlayerModel:l,baseURLController:t.baseURLController,errHandler:i,settings:m})).initialize(E),d.registerStreamType(r,E),(b=f.getFragmentController().getModel(r)).setStreamProcessor(E),T=function(e){var t=null;t=e===O.default.VIDEO||e===O.default.AUDIO?(0,P.default)(n).create({type:e,dashMetrics:_,mediaPlayerModel:l,manifestModel:u,errHandler:i,streamController:h,mediaController:p,adapter:s,textController:g,abrController:d,playbackController:c,streamProcessor:E,settings:m}):(0,L.default)(n).create({type:e,mimeType:a,dashMetrics:_,mediaPlayerModel:l,manifestModel:u,errHandler:i,streamController:h,mediaController:p,adapter:s,textController:g,abrController:d,playbackController:c,streamProcessor:E,settings:m});return t}(r),S=(0,x.default)(n).create({type:r,mimeType:a,adapter:s,dashMetrics:_,timelineConverter:o,mediaPlayerModel:l,abrController:d,playbackController:c,streamController:h,textController:g,streamProcessor:E,mediaController:p,settings:m}),(I=(0,F.default)(n).create()).setConfig({abrController:d,dashMetrics:_,manifestModel:u,playbackController:c,timelineConverter:o,streamProcessor:E}),T.initialize(e),S.initialize(),I.initialize()},isUpdating:function(){return!!I&&I.isUpdating()},getType:function(){return r},getBufferController:function(){return T},getFragmentModel:function(){return b},getScheduleController:function(){return S},getLiveEdgeFinder:function(){return A},getFragmentController:function(){return f?f.getFragmentController():null},getRepresentationController:function(){return I},getIndexHandler:function(){return D},getRepresentationInfo:function(e){var t=void 0;return(t=void 0!==e?((0,U.checkInteger)(e),I?I.getRepresentationForQuality(e):null):I?I.getCurrentRepresentation():null)?s.convertDataToRepresentationInfo(t):null},getBufferLevel:function(){return T.getBufferLevel()},switchInitData:function(e,t){T&&T.switchInitData(C().id,e,t)},isBufferingCompleted:function(){return!!T&&T.getIsBufferingCompleted()},createBuffer:function(e){return T.getBuffer()||T.createBuffer(v,e)},getStreamInfo:C,selectMediaInfo:function(e){e===v||e&&v&&e.type!==v.type||(v=e);var t=s.getRealAdaptation(C(),v),n=s.getVoRepresentations(v);I&&I.updateData(t,n,r)},addMediaInfo:function(e,t){-1===y.indexOf(e)&&y.push(e),t&&this.selectMediaInfo(e)},switchTrackAsked:function(){S.switchTrackAsked()},getMediaInfoArr:function(){return y},getMediaInfo:w,getMediaSource:function(){return T.getMediaSource()},setMediaSource:function(e){T.setMediaSource(e,w())},dischargePreBuffer:function(){T.dischargePreBuffer()},getBuffer:function(){return T.getBuffer()},setBuffer:function(e){T.setBuffer(e)},registerExternalController:function(e){R.push(e)},unregisterExternalController:function(e){var t=R.indexOf(e);-1!==t&&R.splice(t,1)},getExternalControllers:function(){return R},unregisterAllExternalController:e,addInbandEvents:function(e){f&&f.addInbandEvents(e)},setIndexHandlerTime:function(e){D&&D.setCurrentTime(e)},getIndexHandlerTime:function(){return D?D.getCurrentTime():NaN},resetIndexHandler:function(){D&&D.resetIndex()},getInitRequest:function(e){(0,U.checkInteger)(e);var t=I?I.getRepresentationForQuality(e):null;return D?D.getInitRequest(t):null},getFragmentRequest:function(e,t,n){var r=null,i=I&&e?I.getRepresentationForQuality(e.quality):null;return D&&(r=void 0!==t&&void 0!==n?D.getSegmentRequestForTime(i,t,n):D.getNextSegmentRequest(i)),r},reset:function(e,t){D.reset(),T&&(T.reset(e,t),T=null),S&&(S.reset(),S=null),I&&(I.reset(),I=null),d&&d.unRegisterStreamType(r),R.forEach(function(e){e.reset()}),M(),f=r=null,A&&(A.reset(),A=null)}},c&&c.getIsDynamic()&&(A=(0,N.default)(n).create({timelineConverter:o,streamProcessor:E})),M(),E}a.__dashjs_factory_name="StreamProcessor",n.default=i.default.getClassFactory(a),t.exports=n.default},{109:109,115:115,121:121,198:198,213:213,216:216,49:49,59:59,64:64}],108:[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(223)),i=r(e(156)),l=e(239),f=r(e(230)),d=r(e(48)),c=r(e(56)),a=r(e(49)),h=r(e(53));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});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},{156:156,223:223,230:230,239:239,48:48,49:49,53:53,56:56}],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.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"}}]),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.TCP_CONNECTION="TcpList",this.HTTP_REQUEST="HttpList",this.TRACK_SWITCH="RepSwitchList",this.BUFFER_LEVEL="BufferLevel",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},{}],111:[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},{}],112:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var K=r(e(187)),q=r(e(109)),H=r(e(110)),V=r(e(222)),z=r(e(149)),W=r(e(48)),X=r(e(56)),i=r(e(49)),Q=r(e(183)),Z=r(e(184)),$=r(e(185)),J=r(e(182)),ee=r(e(186)),te=r(e(47)),ne=e(239),re=e(216),ie="abandonload",ae="allowload";function a(){var d=this.context,e=(0,te.default)(d).getInstance(),l=(0,W.default)(d).getInstance(),c=void 0,h=void 0,p=void 0,o=void 0,i=void 0,f=void 0,g=void 0,_=void 0,s=void 0,a=void 0,u=void 0,m=void 0,E=void 0,v=void 0,y=void 0,T=void 0,S=void 0,A=void 0,I=void 0,b=void 0,R=void 0,D=void 0,M=void 0;function n(){(p=(0,K.default)(d).create({dashMetrics:D,mediaPlayerModel:y,settings:M})).initialize()}function t(){i={},f={},_={},g={},A={},R={},void 0===a&&(a=!1),b=I=S=void 0,clearTimeout(s),s=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!==ne.HTTPRequest.MEDIA_SEGMENT_TYPE||e.mediaType!==q.default.AUDIO&&e.mediaType!==q.default.VIDEO||b.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.ABRStrategy;{if(n===q.default.ABR_STRATEGY_BOLA)return R[e]=!0;if(n===q.default.ABR_STRATEGY_THROUGHPUT)return R[e]=!1}var r=y.getStableBufferTime(),i=r,a=.5*r,o=R[e],s=(o?a:i)<t;(R[e]=s)!==o&&(s?h.info("AbrController ("+e+") switching from throughput to buffer occupancy ABR rule (buffer: "+t.toFixed(3)+")."):h.info("AbrController ("+e+") switching from buffer occupancy to throughput ABR rule (buffer: "+t.toFixed(3)+")."))}(e.mediaType,.001*e.value.level)}function w(e,t){return i[t]=i[t]||{},i[t].hasOwnProperty(e)||(i[t][e]=0),function(e,t){if(t!==q.default.VIDEO||!M.get().streaming.abr.limitBitrateByPortal||!g[t])return e;a||j();var n=E.getAdaptationForType(0,t).Representation,r=e;if(0<u&&0<m){for(;0<r&&n[r]&&u<n[r].width&&u-n[r-1].width<n[r].width-u;)r-=1;for(;r<n.length-1&&n[r].width===n[r+1].width;)r+=1}return r}(function(e,t,n){var r=function(e){return M.get().streaming.abr.maxRepresentationRatio[e]}(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(!g[t])return n;var r=N(t);void 0!==r&&(n=Math.max(e,r));var i=O(t);void 0!==i&&(n=Math.min(n,i));return n}(i[t][e],e),e,i[t][e]),e)}function O(e){var t=function(e){return M.get().streaming.abr.maxBitrate[e]}(e);return-1<t?U(g[e].getMediaInfo(),t):void 0}function N(e){var t=function(e){return M.get().streaming.abr.minBitrate[e]}(e);if(-1<t){var n=g[e].getMediaInfo(),r=k(n),i=U(n,t);return r[i]&&i<r.length-1&&r[i].bitrate<1e3*t&&i++,i}}function P(e){return!!M.get().streaming.abr.autoSwitchBitrate[e]}function L(e,t,n,r){var i=t.id,a=G(e);(0,re.checkInteger)(n);var o=w(e,i);n!==a&&0<=n&&n<=o&&x(e,a,n,o,r)}function x(e,t,n,r,i){if(e&&g[e]){var a=g[e].getStreamInfo(),o=a?a.id:null;if(M.get().debug.logLevel===te.default.LOG_LEVEL_DEBUG){var s=D.getCurrentBufferLevel(e,!0);h.info("AbrController ("+e+") switch from "+t+" to "+n+"/"+r+" (buffer: "+s+") "+(i?JSON.stringify(i):"."))}!function(e,t,n){f[t]=f[t]||{},f[t][e]=n}(e,o,n),l.trigger(X.default.QUALITY_CHANGE_REQUESTED,{mediaType:e,streamInfo:a,oldQuality:t,newQuality:n,reason:i});var u=b.getAverageThroughput(e);isNaN(u)||T.setSavedBitrateSettings(e,u)}}function F(e,t){_[e].state=t}function U(e,t,n){var r=e&&e.type?g[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=k(e),o=a.length-1;0<=o;o--){if(1e3*t>=a[o].bitrate)return o}return 0}function k(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 V.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 B(e){return R[e]}function G(e){if(e&&g[e]){var t=g[e].getStreamInfo(),n=t?t.id:null;if(n)return f[n]=f[n]||{},f[n].hasOwnProperty(e)||(f[n][e]=0),f[n][e]}return 0}function j(){if(v){var e=M.get().streaming.abr.usePixelRatioInLimitBitrateByPortal&&window.hasOwnProperty("devicePixelRatio")?window.devicePixelRatio:1;u=v.getClientWidth()*e,m=v.getClientHeight()*e}}function Y(e){var t=e.request.mediaType;if(P(t)){var n=g[t];if(!n)return;var r=(0,Q.default)(d).create({abrController:c,streamProcessor:n,currentRequest:e.request,useBufferOccupancyABR:B(t)}),i=p.shouldAbandonFragment(r);if(i.quality>Z.default.NO_CHANGE){var a=n.getFragmentModel();a.getRequests({state:z.default.FRAGMENT_MODEL_LOADING,index:e.request.index})[0]&&(a.abortRequests(),F(t,ie),A[t].reset(),A[t].push({oldValue:G(t),newValue:i.quality,confidence:1,reason:i.reason}),L(t,o.getActiveStreamInfo(),i.quality,i.reason),clearTimeout(s),s=setTimeout(function(){F(t,ae),s=null},M.get().streaming.abandonLoadTimeout))}}}return c={isPlayingAtTopQuality:function(e){var t=e?e.id:null,n=G(q.default.AUDIO),r=G(q.default.VIDEO);return n===w(q.default.AUDIO,t)&&r===w(q.default.VIDEO,t)},updateTopQualityIndex:function(e){var t=e.type,n=e.streamInfo.id,r=e.representationCount-1;return function(e,t,n){i[t]=i[t]||{},i[t][e]=n}(t,n,r),r},getThroughputHistory:function(){return b},getBitrateList:k,getQualityForBitrate:U,getTopBitrateInfoFor:function(e){if(e&&g&&g[e]){var t=g[e].getStreamInfo();if(t&&t.id){var n=w(e,t.id),r=k(g[e].getMediaInfo());return r[n]?r[n]:null}}return null},getMaxAllowedIndexFor:O,getMinAllowedIndexFor:N,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=E.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:G,getAbandonmentStateFor:function(e){return _[e]?_[e].state:null},setPlaybackQuality:L,checkPlaybackQuality:function(e){if(e&&g&&g[e]){var t=g[e].getStreamInfo(),n=t?t.id:null,r=G(e),i=(0,Q.default)(d).create({abrController:c,streamProcessor:g[e],currentValue:r,switchHistory:A[e],droppedFramesHistory:I,useBufferOccupancyABR:B(e)});if(I){var a=v.getPlaybackQuality();a&&I.push(S,a)}if(P(e)){var o=N(e),s=w(e,n),u=p.getMaxQuality(i),l=u.quality;if(void 0!==o&&(l>Z.default.NO_CHANGE?l:r)<o&&(l=o),s<l&&(l=s),A[e].push({oldValue:r,newValue:l}),l>Z.default.NO_CHANGE&&l!=r)(_[e].state===ae||r<l)&&x(e,r,l,s,u.reason);else if(M.get().debug.logLevel===te.default.LOG_LEVEL_DEBUG){var f=D.getCurrentBufferLevel(e,!0);h.debug("AbrController ("+e+") stay on "+r+"/"+s+" (buffer: "+f+")")}}}},getTopQualityIndexFor:w,setElementSize:j,setWindowResizeEventCalled:function(e){a=e},createAbrRulesCollection:n,registerStreamType:function(e,t){A[e]=A[e]||(0,$.default)(d).create(),g[e]=t,_[e]=_[e]||{},_[e].state=ae,R[e]=!1,l.on(X.default.LOADING_PROGRESS,Y,this),e==q.default.VIDEO&&(l.on(X.default.QUALITY_CHANGE_RENDERED,r,this),I=I||(0,J.default)(d).create(),j()),l.on(X.default.METRIC_ADDED,C,this),l.on(X.default.PERIOD_SWITCH_COMPLETED,n,this),b=b||(0,ee.default)(d).create({settings:M})},unRegisterStreamType:function(e){delete g[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&&(E=e.adapter),e.videoModel&&(v=e.videoModel),e.settings&&(M=e.settings))},reset:function(){t(),l.off(X.default.LOADING_PROGRESS,Y,this),l.off(X.default.QUALITY_CHANGE_RENDERED,r,this),l.off(X.default.METRIC_ADDED,C,this),l.off(X.default.PERIOD_SWITCH_COMPLETED,n,this),p&&p.reset()}},h=e.getLogger(c),t(),c}a.__dashjs_factory_name="AbrController";var o=i.default.getSingletonFactory(a);o.ABANDON_LOAD=ie,o.QUALITY_DEFAULT=0,i.default.updateSingletonFactory(a.__dashjs_factory_name,o),n.default=o,t.exports=n.default},{109:109,110:110,149:149,182:182,183:183,184:184,185:185,186:186,187:187,216:216,222:222,239:239,47:47,48:48,49:49,56:56}],113:[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(148)),l=r(e(204)),f=r(e(218)),d=r(e(86)),i=r(e(49)),c=r(e(48)),h=r(e(56));function a(){var e=void 0,t=void 0,n=this.context,r=(0,c.default)(n).getInstance(),i=(0,f.default)(n).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){a.setConfig({adapter:t}),function(e){a.update(e),o.chooseSelector(t.getIsDVB(e))}(e)},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&&(t=e.adapter)}},a=(0,u.default)(n).create(),o=(0,l.default)(n).create(),r.on(h.default.SERVICE_LOCATION_BLACKLIST_CHANGED,s,e),e}a.__dashjs_factory_name="BaseURLController",n.default=i.default.getSingletonFactory(a),t.exports=n.default},{148:148,204:204,218:218,48:48,49:49,56:56,86:86}],114:[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(49)),s=r(e(48));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},{48:48,49:49}],115:[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(109)),ge=r(e(149)),_e=r(e(105)),me=r(e(104)),Ee=r(e(112)),ve=r(e(118)),ye=r(e(48)),Te=r(e(56)),Se=r(e(205)),i=r(e(49)),Ae=r(e(47)),Ie=r(e(211)),be=r(e(223)),Re=r(e(53)),De=e(239),Me="bufferLoaded",Ce="bufferStalled",we="BufferController";function a(e){e=e||{};var c=this.context,s=(0,ye.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,l=e.type,p=e.streamProcessor,u=e.settings,f=void 0,g=void 0,_=void 0,m=void 0,E=void 0,v=void 0,y=void 0,T=void 0,S=void 0,A=void 0,I=void 0,b=void 0,R=void 0,D=void 0,M=void 0,C=void 0,w=void 0,O=void 0,N=void 0,P=void 0,L=void 0;function x(e,t){if(!C||!e||!p)return null;if(y)try{"function"==typeof(A=t&&t[l]?(0,_e.default)(c).create(y,e,G.bind(this),t[l]):(0,_e.default)(c).create(y,e,G.bind(this))).getBuffer().initialize&&A.getBuffer().initialize(l,p)}catch(e){g.fatal("Caught error on create SourceBuffer: "+e),n.error(new be.default(Re.default.MEDIASOURCE_TYPE_UNSUPPORTED_CODE,Re.default.MEDIASOURCE_TYPE_UNSUPPORTED_MESSAGE+l))}else A=(0,me.default)(c).create(G.bind(this));return ie(p.getRepresentationInfo(_).MSETimeOffset),A}function F(e){e.fragmentModel===p.getFragmentModel()&&(g.info("Init fragment finished loading saving to",l+"'s init cache"),C.save(e.chunk),g.debug("Append Init fragment",l," with representationId:",e.chunk.representationId," and quality:",e.chunk.quality,", data size:",e.chunk.bytes.byteLength),k(e.chunk))}function U(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,Se.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:ge.default.FRAGMENT_MODEL_EXECUTED,quality:r,index:t.index})[0],s,u);p.addInbandEvents(l)}if(P){L=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)),te([{start:0,end:f.end(f.length-1)+.5,force:!0}]))}else k(t)}}function k(e){A.append(e),e.mediaInfo.type===pe.default.VIDEO&&s.trigger(Te.default.VIDEO_CHUNK_RECEIVED,{chunk:e})}function B(e){if(e&&0<e.length)for(var t=0,n=e.length;t<n;t++)g.debug("Buffered Range for type:",l,":",e.start(t)," - ",e.end(t)," currentTime = ",d.getTime())}function G(e){if(e.error){if(22===e.error.code&&(v=.8*de(),g.warn("Quota exceeded for type: "+l+", 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))}};u.update(r)}22!==e.error.code&&ce()||(g.warn("Clearing playback buffer to overcome quota exceed situation for type: "+l),s.trigger(Te.default.QUOTA_EXCEEDED,{sender:f,criticalBufferLevel:v}),q())}else{(R=e.chunk)&&!isNaN(R.index)&&(T=Math.max(R.index,T),Z());var i=A.getAllBufferRanges();if(R.segmentType===De.HTTPRequest.MEDIA_SEGMENT_TYPE)B(i),H();else if(P){var a=d.getTime();g.debug("AppendToBuffer seek target should be "+a),p.getScheduleController().setSeekTarget(a),p.setIndexHandlerTime(a)}var o={sender:f,quality:R.quality,startTime:R.start,index:R.index,bufferedRanges:i};R&&!R.endFragment?s.trigger(Te.default.BYTES_APPENDED,o):R&&s.trigger(Te.default.BYTES_APPENDED_END_FRAGMENT,o)}}function j(e){_!==e.newQuality&&l===e.mediaType&&p.getStreamInfo().id===e.streamInfo.id&&(ie(p.getRepresentationInfo(e.newQuality).MSETimeOffset),_=e.newQuality)}function Y(){m&&(m=!(O=!0),S=Number.POSITIVE_INFINITY),l!==pe.default.FRAGMENTED_TEXT?q():H()}function K(){w=void 0}function q(){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:ge.default.FRAGMENT_MODEL_EXECUTED,time:n,threshold:.01})[0];if(i){var a={start:0,end:i.startTime-.5},o=p.getFragmentModel().getRequests({state:ge.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:ge.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 for",l,"- No request found in current time position, removing full buffer 0 -",r),e.push({start:0,end:r});return e}();e&&0!==e.length||H(),te(e)})}function H(){(!P||l===pe.default.FRAGMENTED_TEXT&&a.isTextEnabled())&&(X(),Q())}function V(){$()}function z(){$()}function W(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?(a=r,o=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 X(){d&&(E=function(e,t){var n;return null===(n=W(e,t))?0:n.end-e}(function(){var e=d.getTime();if(w){var t=A.getAllBufferRanges();t&&t.length&&(e=Math.max(t.start(0),w))}return e}()||0),s.trigger(Te.default.BUFFER_LEVEL_UPDATED,{sender:f,bufferLevel:E}),$())}function Q(){p&&r&&p.getStreamInfo()&&(t.addBufferState(l,b,p.getScheduleController().getBufferTarget()),t.addBufferLevel(l,new Date,1e3*E))}function Z(){S-1<=T&&!m&&void 0===A.discharge&&(m=!0,g.debug("checkIfBufferingCompleted trigger BUFFERING_COMPLETED"),s.trigger(Te.default.BUFFERING_COMPLETED,{sender:f,streamInfo:p.getStreamInfo()}))}function $(){"audio"!==l&&"video"!==l||(O&&!m&&d&&d.getTimeToStreamEnd()-E<.5&&(m=!(O=!1),g.debug("checkIfSufficientBuffer trigger BUFFERING_COMPLETED"),s.trigger(Te.default.BUFFERING_COMPLETED,{sender:f,streamInfo:p.getStreamInfo()})),(!u.get().streaming.lowLatencyEnabled&&E<.5||0===E)&&!m?J(Ce):(m||E>=p.getStreamInfo().manifestInfo.minBufferTime)&&J(Me))}function J(e){b===e||e===Ce&&0===d.getTime()||l===pe.default.FRAGMENTED_TEXT&&!a.isTextEnabled()||(b=e,Q(),s.trigger(Te.default.BUFFER_LEVEL_STATE_CHANGED,{sender:f,state:e,mediaType:l,streamInfo:p.getStreamInfo()}),s.trigger(e===Me?Te.default.BUFFER_LOADED:Te.default.BUFFER_EMPTY,{mediaType:l}),g.debug(e===Me?"Got enough buffer to start for "+l:"Waiting for more buffer before starting playback for "+l))}function ee(){A&&l!==pe.default.FRAGMENTED_TEXT&&(m||te(function(){var e=[],t=A.getAllBufferRanges();if(!t||0===t.length)return e;var n=d.getTime(),r={start:Math.max(0,n-u.get().streaming.bufferToKeep),end:n+u.get().streaming.bufferAheadToKeep},i=p.getFragmentModel().getRequests({state:ge.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 te(e){e&&A&&0!==e.length&&(N.push.apply(N,e),M||ne())}function ne(){if(0===N.length||!A)return g.debug("Nothing to prune, halt pruning"),void(M=!(N=[]));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=!(N=[]));var t=N.shift();g.debug("Removing",l,"buffer from:",t.start,"to",t.end),M=!0;var n=d.getTime();n<t.end&&(m=!1,T=0,P||(p.getScheduleController().setSeekTarget(n),p.setIndexHandlerTime(n))),A.remove(t.start,t.end,t.force)}function re(e){A===e.buffer&&(g.debug("onRemoved buffer from:",e.from,"to",e.to),B(A.getAllBufferRanges()),0===N.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?ne():(P?(P=!1,L&&k(L)):(g.debug("onRemoved : call updateBufferLevel"),X()),s.trigger(Te.default.BUFFER_CLEARED,{sender:f,from:e.from,to:e.to,unintended:e.unintended,hasEnoughSpaceToAppend:ce()})))}function ie(e){A&&A.updateTimestampOffset&&A.updateTimestampOffset(e)}function ae(e){e.sender.getStreamProcessor()!==p||e.error||ie(e.currentRepresentation.MSETimeOffset)}function oe(e){e.fragmentModel===p.getFragmentModel()&&(S=e.request.index,Z())}function se(e){var t=A&&A.getAllBufferRanges();t&&e.newMediaInfo.type===l&&e.newMediaInfo.streamInfo.id===p.getStreamInfo().id&&(g.info("Track change asked"),i.getSwitchMode(l)===ve.default.TRACK_SWITCH_MODE_ALWAYS_REPLACE&&t&&0<t.length&&.5<d.getTimeToStreamEnd()&&(m=!1,S=Number.POSITIVE_INFINITY))}function ue(){++D*(u.get().streaming.wallclockTimeUpdateInterval/1e3)>=u.get().streaming.bufferPruningInterval&&(D=0,ee())}function le(){$()}function fe(e,t){y=e,A&&t&&"function"==typeof A.discharge&&(I=A,x(t))}function de(){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 ce(){return de()<v}function he(e,t){v=Number.POSITIVE_INFINITY,b=void 0,_=Ee.default.QUALITY_DEFAULT,S=Number.POSITIVE_INFINITY,R=null,O=M=m=!1,D=E=T=0,N=[],A&&(e||A.abort(),A.reset(t),A=null),P=!1}return f={getBufferControllerType:function(){return we},initialize:function(e){fe(e),_=o.getQualityFor(l),s.on(Te.default.DATA_UPDATE_COMPLETED,ae,this),s.on(Te.default.INIT_FRAGMENT_LOADED,F,this),s.on(Te.default.MEDIA_FRAGMENT_LOADED,U,this),s.on(Te.default.QUALITY_CHANGE_REQUESTED,j,this),s.on(Te.default.STREAM_COMPLETED,oe,this),s.on(Te.default.PLAYBACK_PLAYING,z,this),s.on(Te.default.PLAYBACK_PROGRESS,H,this),s.on(Te.default.PLAYBACK_TIME_UPDATED,H,this),s.on(Te.default.PLAYBACK_RATE_CHANGED,le,this),s.on(Te.default.PLAYBACK_SEEKING,Y,this),s.on(Te.default.PLAYBACK_SEEKED,K,this),s.on(Te.default.PLAYBACK_STALLED,V,this),s.on(Te.default.WALLCLOCK_TIME_UPDATED,ue,this),s.on(Te.default.CURRENT_TRACK_CHANGED,se,this,ye.default.EVENT_PRIORITY_HIGH),s.on(Te.default.SOURCEBUFFER_REMOVE_COMPLETED,re,this)},createBuffer:x,dischargePreBuffer:function(){if(A&&I&&"function"==typeof I.discharge){var e=I.getAllBufferRanges();if(0<e.length){for(var t="Beginning "+l+"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=C.extract(o.streamId,o.representationId);s&&(i!==s&&(A.append(s),i=s),A.append(o))}I.reset(),I=null}},getType:function(){return l},getStreamProcessor:function(){return p},setSeekStartTime:function(e){w=e},getBuffer:function(){return A},setBuffer:function(e){A=e},getBufferLevel:function(){return E},getRangeAt:W,setMediaSource:fe,getMediaSource:function(){return y},getIsBufferingCompleted:function(){return m},switchInitData:function(e,t,n){var r=C.extract(e,t);P=!0===n&&n,r?(g.info("Append Init fragment",l," with representationId:",r.representationId," and quality:",r.quality,", data size:",r.bytes.byteLength),k(r)):s.trigger(Te.default.INIT_REQUESTED,{sender:f})},getIsPruningInProgress:function(){return M},reset:function(e,t){s.off(Te.default.DATA_UPDATE_COMPLETED,ae,this),s.off(Te.default.QUALITY_CHANGE_REQUESTED,j,this),s.off(Te.default.INIT_FRAGMENT_LOADED,F,this),s.off(Te.default.MEDIA_FRAGMENT_LOADED,U,this),s.off(Te.default.STREAM_COMPLETED,oe,this),s.off(Te.default.CURRENT_TRACK_CHANGED,se,this),s.off(Te.default.PLAYBACK_PLAYING,z,this),s.off(Te.default.PLAYBACK_PROGRESS,H,this),s.off(Te.default.PLAYBACK_TIME_UPDATED,H,this),s.off(Te.default.PLAYBACK_RATE_CHANGED,le,this),s.off(Te.default.PLAYBACK_SEEKING,Y,this),s.off(Te.default.PLAYBACK_SEEKED,K,this),s.off(Te.default.PLAYBACK_STALLED,V,this),s.off(Te.default.WALLCLOCK_TIME_UPDATED,ue,this),s.off(Te.default.SOURCEBUFFER_REMOVE_COMPLETED,re,this),he(e,t)}},g=(0,Ae.default)(c).getInstance().getLogger(f),C=(0,Ie.default)(c).getInstance(),he(),f}a.__dashjs_factory_name=we;var o=i.default.getClassFactory(a);o.BUFFER_LOADED=Me,o.BUFFER_EMPTY=Ce,i.default.updateClassFactory(a.__dashjs_factory_name,o),n.default=o,t.exports=n.default},{104:104,105:105,109:109,112:112,118:118,149:149,205:205,211:211,223:223,239:239,47:47,48:48,49:49,53:53,56:56}],116:[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(49)),A=r(e(47)),I=r(e(48)),b=r(e(56)),R=r(e(157));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,m=void 0,o=void 0,s=void 0;function u(){s=!1,r={},i={},_={},t=null,n=100,a=Date.now()/1e3}function E(){if(!m||!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(b.default.MANIFEST_VALIDITY_CHANGED,{id:e.id,validUntil:n,newDuration:r,newManifestValidAfter:NaN})}}function T(){var e=o.getTime(),t=e-a;S(i,t,a=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||(E(),m.refreshManifest()):u.eventStream.schemeIdUri==d&&u.eventStream.value==c?(i=u.messageData,(0,R.default)(h).create({}).load({method:"get",url:i,request:{responseType:"arraybuffer"}})):p.trigger(u.eventStream.schemeIdUri,{event:u}),delete e[s])}}return e={addInlineEvents:function(e){if(E(),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){E();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(){E(),g.debug("Start Event Controller"),s||isNaN(n)||(s=!0,t=setInterval(T,n))},setConfig:function(e){e&&(e.manifestUpdater&&(m=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},{157:157,47:47,48:48,49:49,56:56}],117:[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(109)),h=e(239),p=r(e(224)),g=r(e(149)),_=r(e(98)),m=r(e(215)),E=r(e(48)),v=r(e(56)),i=r(e(49)),y=r(e(47));function a(n){n=n||{};var r=this.context,o=(0,E.default)(r).getInstance(),i=n.errHandler,a=n.mediaPlayerModel,s=n.dashMetrics,e=void 0,u=void 0,l=void 0;function f(e){return e&&e.type&&e.type===h.HTTPRequest.INIT_SEGMENT_TYPE}function t(){for(var e in l)l[e].reset();l={}}function d(e){if(l[e.request.mediaType]===e.sender){var t=e.request,n=e.response,r=f(t),i=t.mediaInfo.streamInfo;if(e.error&&(e.request.mediaType!==c.default.AUDIO&&e.request.mediaType!==c.default.VIDEO&&e.request.mediaType!==c.default.FRAGMENTED_TEXT||o.trigger(v.default.SERVICE_LOCATION_BLACKLIST_ADD,{entry:e.request.serviceLocation})),n&&i){var a=function(e,t,n,r){var i=new p.default;return i.streamId=n,i.mediaInfo=t.mediaInfo,i.segmentType=t.type,i.start=t.startTime,i.duration=t.duration,i.end=i.start+i.duration,i.bytes=e,i.index=t.index,i.quality=t.quality,i.representationId=t.representationId,i.endFragment=r,i}(n,t,i.id,e.type!==v.default.FRAGMENT_LOADING_PROGRESS);o.trigger(r?v.default.INIT_FRAGMENT_LOADED:v.default.MEDIA_FRAGMENT_LOADED,{chunk:a,fragmentModel:e.sender})}else u.warn("No "+t.mediaType+" bytes to push or stream is inactive.")}}return e={getModel:function(e){var t=l[e];return t||(t=(0,g.default)(r).create({dashMetrics:s,fragmentLoader:(0,_.default)(r).create({dashMetrics:s,mediaPlayerModel:a,errHandler:i,requestModifier:(0,m.default)(r).getInstance(),settings:n.settings})}),l[e]=t),t},isInitializationRequest:f,reset:function(){o.off(v.default.FRAGMENT_LOADING_COMPLETED,d,this),o.off(v.default.FRAGMENT_LOADING_PROGRESS,d,this),t()}},u=(0,y.default)(r).getInstance().getLogger(e),t(),o.on(v.default.FRAGMENT_LOADING_COMPLETED,d,e),o.on(v.default.FRAGMENT_LOADING_PROGRESS,d,e),e}a.__dashjs_factory_name="FragmentController",n.default=i.default.getClassFactory(a),t.exports=n.default},{109:109,149:149,215:215,224:224,239:239,47:47,48:48,49:49,56:56,98:98}],118:[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(109)),A=r(e(56)),I=r(e(48)),i=r(e(49)),b=r(e(47)),R="neverReplace",D="alwaysReplace",M="highestBitrate",C="widestRange",w=M;function a(){var e=this.context,o=(0,I.default)(e).getInstance(),t=void 0,a=void 0,s=void 0,n=void 0,r=void 0,u=void 0,l=void 0,i=[D,R],f=[M,C];function d(e,t){if(!e||!t)return[];var n=t.id;return s[n]&&s[n][e]?s[n][e].list:[]}function c(e,t){return!e||!t||t&&!s[t.id]?null:s[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(s[r]&&s[r][t]&&!E(e,i)){s[r][t].current=e,s[r][t].current&&o.trigger(A.default.CURRENT_TRACK_CHANGED,{oldMediaInfo:i,newMediaInfo:e,switchMode:u[t]});var a=function(e){var t={lang:e.lang,viewpoint:e.viewpoint,roles:e.roles,accessibility:e.accessibility,audioChannelConfiguration:e.audioChannelConfiguration};return t.lang||t.viewpoint||t.role&&0<t.role.length||t.accessibility&&0<t.accessibility.length||t.audioChannelConfiguration&&0<t.audioChannelConfiguration.length?t:null}(e);a&&s[r][t].storeLastSettings&&(a.roles&&(a.role=a.roles[0],delete a.roles),a.accessibility&&(a.accessibility=a.accessibility[0]),a.audioChannelConfiguration&&(a.audioChannelConfiguration=a.audioChannelConfiguration[0]),l.setSavedMediaSettings(t,a))}}}function p(e,t){e&&t&&(n[e]=t)}function g(e){return e?n[e]:null}function _(){return r||w}function m(e){return e===S.default.AUDIO||e===S.default.VIDEO||e===S.default.TEXT||e===S.default.FRAGMENTED_TEXT||e===S.default.IMAGE}function E(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(){s={},n={audio:null,video:null},u={audio:D,video:R}}function y(t,e){var n=!t.lang||t.lang===e.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=d(e,t),i=[];e!==S.default.FRAGMENTED_TEXT?(n||p(e,n=l.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(m(t)){var n=e.streamInfo.id;s[n]||(s[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=s[n][t].list,i=0,a=r.length;i<a;++i)if(E(r[i],e))return;r.push(e);var o=g(t);o&&y(o,e)&&!c(t,e.streamInfo)&&h(e)}}},getTracksFor:d,getCurrentTrackFor:c,isCurrentTrack:function(e){if(!e)return!1;var t=e.type,n=e.streamInfo.id;return s[n]&&s[n][t]&&E(s[n][t].current,e)},setTrack:h,setInitialSettings:p,getInitialSettings:g,setSwitchMode:function(e,t){-1!==i.indexOf(t)?u[e]=t:a.warn("Track switch mode is not supported: "+t)},getSwitchMode:function(e){return u[e]},setSelectionModeForInitialTrack:function(e){-1!==f.indexOf(e)?r=e:a.warn("Track selection mode is not supported: "+e)},getSelectionModeForInitialTrack:_,isMultiTrackSupportedByType:m,isTracksEqual:E,setConfig:function(e){e&&e.domStorage&&(l=e.domStorage)},reset:v},a=(0,b.default)(e).getInstance().getLogger(t),v(),t}a.__dashjs_factory_name="MediaController";var o=i.default.getSingletonFactory(a);o.TRACK_SWITCH_MODE_NEVER_REPLACE=R,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},{109:109,47:47,48:48,49:49,56:56}],119:[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(49)),a=r(e(47));function o(){var e=void 0,i=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){var t=e.sourceBuffers,n=t.length;if("open"===e.readyState){for(var r=0;r<n;r++){if(t[r].updating)return;if(0===t[r].buffered.length)return}i.info("call to mediaSource endOfStream"),e.endOfStream()}}},i=(0,a.default)(t).getInstance().getLogger(e),e}o.__dashjs_factory_name="MediaSourceController",n.default=i.default.getSingletonFactory(o),t.exports=n.default},{47:47,49:49}],120:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var he=r(e(109)),pe=r(e(115)),ge=r(e(48)),_e=r(e(56)),i=r(e(49)),me=r(e(47));function a(){var e=this.context,i=(0,ge.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,m=void 0,a=void 0,E=void 0,v=void 0,y=void 0,T=void 0,S=void 0,A=void 0,I=void 0,b=void 0;function R(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 O(){g&&d&&d.pause()}function N(){return g&&d?d.isSeeking():null}function P(e,t,n){g&&d&&(!0===n?e!==d.getTime()&&(d.removeEventListener("seeking",$),s.info("Requesting seek to time: "+e),d.setCurrentTime(e,t)):(i.trigger(_e.default.PLAYBACK_SEEK_ASKED),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(_e.default.DATA_UPDATE_COMPLETED,V,this),i.off(_e.default.BUFFER_LEVEL_STATE_CHANGED,de,this),i.off(_e.default.BYTES_APPENDED_END_FRAGMENT,le,this),i.off(_e.default.LOADING_PROGRESS,fe,this),i.off(_e.default.PERIOD_SWITCH_STARTED,R,this),i.off(_e.default.PLAYBACK_PROGRESS,se,this),i.off(_e.default.PLAYBACK_TIME_UPDATED,se,this),i.off(_e.default.PLAYBACK_ENDED,ae,this),q(),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",ce),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 K(){if(null===r){r=setInterval(function(){i.trigger(_e.default.WALLCLOCK_TIME_UPDATED,{isDynamic:_,time:new Date}),k()&&w()&&function(){var e=Date.now();(!E||E+500<e)&&(E=e,ee())}()},b.get().streaming.wallclockTimeUpdateInterval)}}function q(){clearInterval(r),r=null}function H(){if(!w()&&_&&0!==d.getReadyState()){var e=x(),t=function(e){var t=l.getCurrentDVRInfo(),n=t?t.range:null;return n?e>n.end?Math.max(n.end-2*g.manifestInfo.minBufferTime,n.start):e+.25<n.start&&n.start-e>n.start-31536e4?n.start:e:NaN}(e);!isNaN(t)&&t!==e&&P(t)}}function V(e){if(!e.error){var t=f.convertDataToRepresentationInfo(e.currentRepresentation).mediaInfo.streamInfo;g.id===t.id&&(g=t,H())}}function z(){i.trigger(_e.default.CAN_PLAY)}function W(){s.info("Native video element event: play"),H(),K(),i.trigger(_e.default.PLAYBACK_STARTED,{startTime:L()})}function X(){s.info("Native video element event: waiting"),i.trigger(_e.default.PLAYBACK_WAITING,{playingTime:L()})}function Q(){s.info("Native video element event: playing"),i.trigger(_e.default.PLAYBACK_PLAYING,{playingTime:L()})}function Z(){s.info("Native video element event: pause"),i.trigger(_e.default.PLAYBACK_PAUSED,{ended:U()})}function $(){var e=L();s.info("Seeking to: "+e),K(),i.trigger(_e.default.PLAYBACK_SEEKING,{seekTime:e})}function J(){s.info("Native video element event: seeked"),i.trigger(_e.default.PLAYBACK_SEEKED),d.addEventListener("seeking",$)}function ee(){g&&i.trigger(_e.default.PLAYBACK_TIME_UPDATED,{timeToEnd:D(),time:L()})}function te(){i.trigger(_e.default.PLAYBACK_PROGRESS)}function ne(){var e=F();s.info("Native video element event: ratechange: ",e),i.trigger(_e.default.PLAYBACK_RATE_CHANGED,{playbackRate:e})}function re(){s.info("Native video element event: loadedmetadata"),i.trigger(_e.default.PLAYBACK_METADATA_LOADED),K()}function ie(){s.info("Native video element event: ended"),O(),q(),i.trigger(_e.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()),O(),q())}function oe(e){var t=e.target||e.srcElement;i.trigger(_e.default.PLAYBACK_ERROR,{error:t.error})}function se(){_&&b.get().streaming.lowLatencyEnabled&&0<b.get().streaming.lowLatencyEnabled&&!w()&&!N()&&(0<b.get().streaming.liveCatchUpPlaybackRate&&0<L()&&Math.abs(B()-m.getLiveDelay())>b.get().streaming.liveCatchUpMinDrift?function(){if(d){var e=b.get().streaming.liveCatchUpPlaybackRate,t=m.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<b.get().streaming.liveCatchUpMaxDrift&&!T&&n>b.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-m.getLiveDelay(),!0,!1)}()):T=!1}}():ue())}function ue(){d&&d.setPlaybackRate(1)}function le(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(he.default.VIDEO),o=u.isTrackTypePresent(he.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),function(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!0;return!1}(n,r)&&(N()||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,N()||y||P(n,!1,!0),c[g.id].started=!0)}}function fe(e){if(!1===e.stream&&b.get().streaming.lowLatencyEnabled&&!isNaN(e.request.duration)){var t=1.2*e.request.duration;if(t>m.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}};b.update(n)}}}function de(e){e.streamInfo.id===g.id&&(b.get().streaming.lowLatencyEnabled?e.state!==pe.default.BUFFER_EMPTY||N()||S||(S=!0,ue()):d.setStallState(e.mediaType,e.state===pe.default.BUFFER_EMPTY))}function ce(e){i.trigger(_e.default.PLAYBACK_STALLED,{e:e})}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",ce),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(_e.default.DATA_UPDATE_COMPLETED,V,this),i.on(_e.default.BYTES_APPENDED_END_FRAGMENT,le,this),i.on(_e.default.LOADING_PROGRESS,fe,this),i.on(_e.default.BUFFER_LEVEL_STATE_CHANGED,de,this),i.on(_e.default.PERIOD_SWITCH_STARTED,R,this),i.on(_e.default.PLAYBACK_PROGRESS,se,this),i.on(_e.default.PLAYBACK_TIME_UPDATED,se,this),i.on(_e.default.PLAYBACK_ENDED,ae,this),a&&(a=!1,C())},setConfig:function(e){e&&(e.streamController&&(u=e.streamController),e.dashMetrics&&(l=e.dashMetrics),e.mediaPlayerModel&&(m=e.mediaPlayerModel),e.adapter&&(f=e.adapter),e.videoModel&&(d=e.videoModel),e.timelineConverter&&(n=e.timelineConverter),e.uriFragmentModel&&(I=e.uriFragmentModel),e.settings&&(b=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=void 0,i=void 0,a=f.getSuggestedPresentationDelay();if(r=b.get().streaming.useSuggestedPresentationDelay&&null!==a?a:b.get().streaming.lowLatencyEnabled?0:m.getLiveDelay()?m.getLiveDelay():isNaN(e)?2*g.manifestInfo.minBufferTime:e*b.get().streaming.liveDelayFragmentCount,null!==(n=f.getAvailabilityStartTime())&&(v=n),0<t){var o=Math.max(t-10,t/2);i=Math.min(r,o)}else i=r;return h=i},getLiveDelay:function(){return h},getCurrentLiveLatency:B,play:C,isPaused:w,pause:O,isSeeking:N,seek:P,reset:G},s=(0,me.default)(e).getInstance().getLogger(t),G(),t}a.__dashjs_factory_name="PlaybackController",n.default=i.default.getSingletonFactory(a),t.exports=n.default},{109:109,115:115,47:47,48:48,49:49,56:56}],121:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var ce=r(e(109)),he=e(241),pe=r(e(112)),ge=r(e(115)),_e=r(e(194)),me=r(e(195)),Ee=r(e(149)),ve=r(e(48)),ye=r(e(56)),i=r(e(49)),Te=r(e(47)),Se=r(e(118));function a(e){e=e||{};var t=this.context,n=(0,ve.default)(t).getInstance(),u=e.adapter,o=e.dashMetrics,s=e.timelineConverter,l=e.mediaPlayerModel,f=e.abrController,d=e.playbackController,i=e.streamController,a=e.textController,c=e.type,h=e.streamProcessor,p=e.mediaController,g=e.settings,r=void 0,_=void 0,m=void 0,E=void 0,v=void 0,y=void 0,T=void 0,S=void 0,A=void 0,I=void 0,b=void 0,R=void 0,D=void 0,M=void 0,C=void 0,w=void 0,O=void 0,N=void 0,P=void 0,L=void 0;function x(){E&&!h.isBufferingCompleted()?(_.debug("Schedule Controller starts"),fe(),y=!1,v=v&&!1,k(0)):_.warn("Start denied to Schedule Controller")}function F(){y||(_.debug("Schedule Controller stops"),y=!0,clearTimeout(A))}function U(){var e=h.getBufferController();if(y||T||!e||d.isPaused()&&!g.get().streaming.scheduleWhilePaused||!(c!==ce.default.FRAGMENTED_TEXT&&c!==ce.default.TEXT||a.isTextEnabled()))_.debug("Schedule stop!");else if(e.getIsBufferingCompleted())_.debug("Schedule stop because buffering is completed!");else{!function(){var e=d.getTime(),t=1.5*E.fragmentDuration,n=m.getRequests({state:Ee.default.FRAGMENT_MODEL_EXECUTED,time:e+t,threshold:0})[0];if(n&&-1===w.indexOf(n)&&!u.getIsTextTrack(c)){var r=g.get().streaming.fastSwitchEnabled,i=h.getBufferLevel(),a=f.getAbandonmentStateFor(c),o=!p.isCurrentTrack(n.mediaInfo)&&p.getSwitchMode(n.mediaInfo.type)===Se.default.TRACK_SWITCH_MODE_NEVER_REPLACE,s=n.quality<E.quality;r&&(o||s)&&t<=i&&a!==pe.default.ABANDON_LOAD?(Y(n),L=!0,_.debug("Reloading outdated fragment at index: ",n.index)):n.quality>E.quality&&!N&&se(d.getTime()+h.getBufferLevel())}}();var t=0<w.length,r=h.getStreamInfo();if(N||isNaN(C)||O||t||function(e,t){M[t]=M[t]||{};var n=f.getTopQualityIndexFor(e,t);return M[t][e]!=n&&(_.info("Top quality "+e+" index has changed from "+M[t][e]+" to "+n),M[t][e]=n,!0)}(E.mediaInfo.type,r.id)||b.execute(h,i.isTrackTypePresent(ce.default.VIDEO))){G(!0),t||O||f.checkPlaybackQuality(c),function(){var e=h.getFragmentController();if(E.quality===C&&!O||N){var t=w.shift();if(e.isInitializationRequest(t))h.switchInitData(t.representationId);else{var n=void 0;h.getBufferController().getIsPruningInProgress()||(n=R.execute(h,I,t),se(NaN),n&&!t&&(isNaN(n.startTime+n.duration)||h.setIndexHandlerTime(n.startTime+n.duration),n.delayLoadingTime=(new Date).getTime()+S,ue(0)),!n&&r.manifestInfo&&r.manifestInfo.isDynamic&&_.debug("Next fragment seems to be at the bleeding live edge and is not available yet. Rescheduling.")),n?(_.debug("Next fragment request url is "+n.url),m.executeRequest(n)):(G(!1),k(g.get().streaming.lowLatencyEnabled?100:500))}}else _.debug("Quality has changed, get init request for representationid = "+E.id),O?(N=p.getSwitchMode(c)===Se.default.TRACK_SWITCH_MODE_ALWAYS_REPLACE,_.debug("Switch track has been asked, get init request for "+c+" with representationid = "+E.id+"bufferResetInProgress = "+N),h.switchInitData(E.id,N),O=!1):h.switchInitData(E.id),C=E.quality}()}else k(500)}}function k(e){clearTimeout(A),A=setTimeout(U,e)}function B(e){e.sender&&e.sender.getStreamProcessor()===h&&j(E.quality)}function G(e){T!==e?T=e:_.debug("isFragmentProcessingInProgress is already equal to",e)}function j(e){var t=h.getInitRequest(e);t&&(G(!0),m.executeRequest(t))}function Y(e){w.push(e)}function K(e){if(c===e.mediaType&&h.getStreamInfo().id===e.streamInfo.id){if(null==(E=h.getRepresentationInfo(e.newQuality)))throw new Error("Unexpected error! - currentRepresentationInfo is null or undefined");le(new Date,he.PlayListTrace.REPRESENTATION_SWITCH_STOP_REASON),fe()}}function q(e){if(d&&m){var t=m.getRequests({state:Ee.default.FRAGMENT_MODEL_EXECUTED,time:d.getTime(),threshold:0})[0];t&&d.getTime()>=t.startTime&&((!D.mediaInfo||t.mediaInfo.type===D.mediaInfo.type&&t.mediaInfo.id!==D.mediaInfo.id)&&e&&n.trigger(ye.default.TRACK_CHANGE_RENDERED,{mediaType:c,oldMediaInfo:D.mediaInfo,newMediaInfo:t.mediaInfo}),t.quality===D.quality&&t.adaptationIndex===D.adaptationIndex||!e||n.trigger(ye.default.QUALITY_CHANGE_RENDERED,{mediaType:c,oldQuality:D.quality,newQuality:t.quality}),D={mediaInfo:t.mediaInfo,quality:t.quality,adaptationIndex:t.adaptationIndex})}}function H(e){e.error||e.sender.getStreamProcessor()!==h||(E=u.convertDataToRepresentationInfo(e.currentRepresentation))}function V(e){h.getStreamInfo().id===e.streamInfo.id&&(E=h.getRepresentationInfo(),v&&(d.getIsDynamic()?(s.setTimeSyncCompleted(!0),function(){var e=h.getLiveEdgeFinder();if(e){var t=e.getLiveEdge(),n=E.mediaInfo.streamInfo.manifestInfo.DVRWindowSize/2,r=t-d.computeLiveDelay(E.fragmentDuration,n),i=h.getFragmentRequest(E,r,{ignoreIsFinished:!0});if(i)if(g.get().streaming.lowLatencyEnabled){var a=i.duration<l.getLiveDelay()?i.startTime:i.startTime+i.duration-l.getLiveDelay();d.setLiveStartTime(a)}else d.setLiveStartTime(i.startTime);else _.debug("setLiveEdgeSeekTarget : getFragmentRequest returned undefined request object");se(d.getStreamStartTime(!1,t)),h.getBufferController().setSeekStartTime(I),I>E.mediaInfo.streamInfo.start+E.mediaInfo.streamInfo.duration&&d.seek(I),o.updateManifestUpdateInfo({currentTime:I,presentationStartTime:t,latency:t-I,clientTimeOffset:s.getClientTimeOffset()})}}()):(se(d.getStreamStartTime(!1)),h.getBufferController().setSeekStartTime(I))),y&&x())}function z(e){e.fragmentModel===m&&(F(),G(!1),_.info("Stream is complete"))}function W(e){e.sender===m&&(_.info("OnFragmentLoadingCompleted - Url:",e.request?e.request.url:"undefined",", Range:",e.request.range?e.request.range:"undefined"),u.getIsTextTrack(c)&&G(!1),e.error&&e.request.serviceLocation&&!y&&(Y(e.request),G(!1),k(0)),N&&(P=e.request))}function X(){q(!0)}function Q(e){if(e.sender.getStreamProcessor()===h)if(N&&!isNaN(e.startTime)&&(N=!1,m.addExecutedRequest(P)),G(!1),L&&!isNaN(e.startTime)){var t=d.getTime(),n=e.startTime+E.fragmentDuration,r=1.5*E.fragmentDuration;k(n<=t+r?0:1e3*(n-(t+r))),L=!1}else k(0)}function Z(e){e.streamProcessor===h&&(_.info("onFragmentLoadingAbandoned for "+c+", request: "+e.request.url+" has been aborted"),d.isSeeking()||O||(_.info("onFragmentLoadingAbandoned for "+c+", request: "+e.request.url+" has to be downloaded again, origin is not seeking process or switch track call"),Y(e.request)),G(!1),k(0))}function $(e){e.sender.getStreamProcessor()===h&&F()}function J(e){if(e.sender.getStreamProcessor()===h){var t=h.getStreamInfo();t&&(e.unintended?m.removeExecutedRequestsAfterTime(e.from):m.syncExecutedRequestsWithBufferedRange(h.getBufferController().getBuffer().getAllBufferRanges(),t.duration)),e.hasEnoughSpaceToAppend&&y&&x()}}function ee(e){e.sender.getStreamProcessor()!==h||e.state!==ge.default.BUFFER_EMPTY||d.isSeeking()||(_.info("Buffer is empty! Stalling!"),le(new Date,he.PlayListTrace.REBUFFERING_REASON))}function te(e){e.sender.getStreamProcessor()===h&&(F(),G(!1))}function ne(){m.abortRequests(),F()}function re(e){e.sender.getStreamProcessor()===h&&a.isTextEnabled()&&j(e.index)}function ie(){!y&&g.get().streaming.scheduleWhilePaused||x()}function ae(e){se(e.seekTime),ue(0),y&&x();var t=E.DVRWindow&&d?E.DVRWindow.end-d.getTime():NaN;o.updateManifestUpdateInfo({latency:t}),T?(_.debug("onPlaybackSeeking for "+c+", call fragmentModel.abortRequests in order to seek quicker"),m.abortRequests()):k(0)}function oe(e){o.updatePlayListTraceMetrics({playbackspeed:e.playbackRate.toString()})}function se(e){I=e}function ue(e){S=e}function le(e,t){o.pushPlayListTraceMetrics(e,t)}function fe(){if(E){var e=d.getPlaybackRate();o.createPlaylistTraceMetrics(E.id,1e3*d.getTime(),null!==e?e.toString():null)}}function de(){D={mediaInfo:void(S=0),quality:C=I=NaN,adaptationIndex:NaN},M={},P=null,L=N=O=!(y=v=!(T=!(w=[])))}return r={initialize:function(){m=h.getFragmentModel(),b=(0,_e.default)(t).create({abrController:f,dashMetrics:o,mediaPlayerModel:l,textController:a,settings:g}),R=(0,me.default)(t).create({textController:a,playbackController:d}),u.getIsTextTrack(e.mimeType)&&n.on(ye.default.TIMED_TEXT_REQUESTED,re,this),n.on(ye.default.QUALITY_CHANGE_REQUESTED,K,this),n.on(ye.default.DATA_UPDATE_STARTED,$,this),n.on(ye.default.DATA_UPDATE_COMPLETED,H,this),n.on(ye.default.FRAGMENT_LOADING_COMPLETED,W,this),n.on(ye.default.STREAM_COMPLETED,z,this),n.on(ye.default.STREAM_INITIALIZED,V,this),n.on(ye.default.BUFFER_LEVEL_STATE_CHANGED,ee,this),n.on(ye.default.BUFFER_CLEARED,J,this),n.on(ye.default.BYTES_APPENDED_END_FRAGMENT,Q,this),n.on(ye.default.INIT_REQUESTED,B,this),n.on(ye.default.QUOTA_EXCEEDED,te,this),n.on(ye.default.PLAYBACK_SEEKING,ae,this),n.on(ye.default.PLAYBACK_STARTED,ie,this),n.on(ye.default.PLAYBACK_RATE_CHANGED,oe,this),n.on(ye.default.PLAYBACK_TIME_UPDATED,X,this),n.on(ye.default.URL_RESOLUTION_FAILED,ne,this),n.on(ye.default.FRAGMENT_LOADING_ABANDONED,Z,this)},getType:function(){return c},setSeekTarget:se,setTimeToLoadDelay:ue,replaceRequest:Y,switchTrackAsked:function(){O=!0},isStarted:function(){return!1===y},start:x,stop:F,reset:function(){n.off(ye.default.DATA_UPDATE_STARTED,$,this),n.off(ye.default.DATA_UPDATE_COMPLETED,H,this),n.off(ye.default.BUFFER_LEVEL_STATE_CHANGED,ee,this),n.off(ye.default.QUALITY_CHANGE_REQUESTED,K,this),n.off(ye.default.FRAGMENT_LOADING_COMPLETED,W,this),n.off(ye.default.STREAM_COMPLETED,z,this),n.off(ye.default.STREAM_INITIALIZED,V,this),n.off(ye.default.QUOTA_EXCEEDED,te,this),n.off(ye.default.BYTES_APPENDED_END_FRAGMENT,Q,this),n.off(ye.default.BUFFER_CLEARED,J,this),n.off(ye.default.INIT_REQUESTED,B,this),n.off(ye.default.PLAYBACK_RATE_CHANGED,oe,this),n.off(ye.default.PLAYBACK_SEEKING,ae,this),n.off(ye.default.PLAYBACK_STARTED,ie,this),n.off(ye.default.PLAYBACK_TIME_UPDATED,X,this),n.off(ye.default.URL_RESOLUTION_FAILED,ne,this),n.off(ye.default.FRAGMENT_LOADING_ABANDONED,Z,this),u.getIsTextTrack(c)&&n.off(ye.default.TIMED_TEXT_REQUESTED,re,this),F(),q(!1),de()},getBufferTarget:function(){return b.getBufferTarget(h,i.isTrackTypePresent(ce.default.VIDEO))},finalisePlayList:function(e,t){le(e,t)}},_=(0,Te.default)(t).getInstance().getLogger(r),de(),r}a.__dashjs_factory_name="ScheduleController",n.default=i.default.getClassFactory(a),t.exports=n.default},{109:109,112:112,115:115,118:118,149:149,194:194,195:195,241:241,47:47,48:48,49:49,56:56}],122:[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(109)),Me=r(e(110)),Ce=r(e(106)),we=r(e(100)),Oe=r(e(48)),Ne=r(e(56)),i=r(e(49)),Pe=e(241),Le=r(e(47)),xe=r(e(211)),Fe=r(e(218)),Ue=r(e(102)),ke=r(e(123)),Be=r(e(113)),Ge=r(e(119)),je=r(e(223)),Ye=r(e(53));function a(){var t=40,r=2e3,s=this.context,f=(0,Oe.default)(s).getInstance(),u=void 0,d=void 0,l=void 0,c=void 0,n=void 0,h=void 0,p=void 0,g=void 0,o=void 0,_=void 0,m=void 0,E=void 0,v=void 0,y=void 0,i=void 0,T=void 0,S=void 0,A=void 0,I=void 0,b=void 0,R=void 0,a=void 0,D=void 0,M=void 0,C=void 0,w=void 0,O=void 0,N=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,K=void 0,q=void 0,H=void 0,V=void 0,z=void 0,W=void 0;function X(){if(_e(De.default.VIDEO)){var e=N.getPlaybackQuality();e&&g.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(Ne.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&&H&&H.deactivate(!0),t&&(t!==b||H&&!b.isActive())?(Ee(Pe.PlayListTrace.END_OF_PERIOD_STOP_REASON),le(b,t,e.seekTime)):Ee(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,Ee(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(Ne.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;O&&!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;O&&e&&(d.info("[onStreamBufferingCompleted] calls signalEndOfStream of mediaSourceController."),o.signalEndOfStream(O))}function ie(){var t,e=Te().isLast;O&&!e&&(t=ue(),(q=b.isProtectionCompatible(t)&&(z||b.isMediaCodecCompatible(t)))&&(d.info("[onStreamCanLoadNext] Preloading next stream"),b.stopEventController(),b.deactivate(!0),t.preload(O,K),(H=t).getProcessors().forEach(function(e){e.setIndexHandlerTime(t.getStartTime())})))}function ae(e){var t=0,n=null,r=I.length;0<r&&(t+=I[0].getStartTime());for(var i=0;i<r;i++)if(n=I[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"),Ee(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:I.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(Ne.default.PERIOD_SWITCH_STARTED,{fromStreamInfo:e?e.getStreamInfo():null,toStreamInfo:t.getStreamInfo()}),q=!1,e&&(e.stopEventController(),q=b.isProtectionCompatible(t)&&(z||b.isMediaCodecCompatible(t))&&!n||t.getPreloaded(),e.deactivate(q)),b=t,H=!1,P.initialize(Te(),q),N.getElement()?fe(n,e,!1,q):function(e){de(e,q)}(n))}function fe(e,t,n,r){var i=void 0;function a(){O&&(d.debug("MediaSource is open!"),window.URL.revokeObjectURL(i),O.removeEventListener("sourceopen",a),O.removeEventListener("webkitsourceopen",a),ce(),t||f.trigger(Ne.default.SOURCE_INITIALIZED),n?b.setMediaSource(O):de(e,r))}O?r?(de(e,r),t||f.trigger(Ne.default.SOURCE_INITIALIZED)):(o.detachMediaSource(N),O.addEventListener("sourceopen",a,!1),O.addEventListener("webkitsourceopen",a,!1),i=o.attachMediaSource(O,N),d.debug("MediaSource attached to element. Waiting on open...")):((O=o.createMediaSource()).addEventListener("sourceopen",a,!1),O.addEventListener("webkitsourceopen",a,!1),i=o.attachMediaSource(O,N),d.debug("MediaSource attached to element. Waiting on open..."))}function de(e,t){if(K=b.activate(O,t?K:void 0),k=me(De.default.AUDIO),U=me(De.default.VIDEO),K){var n=Object.keys(K);0<n.length&&K[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){p.setIndexHandlerTime(e,r)})):P.seek(e)),b.startEventController(),!D&&F||P.play(),M=!1,f.trigger(Ne.default.PERIOD_SWITCH_COMPLETED,{toStreamInfo:Te()})}function ce(e){var t=e||Te().manifestInfo.duration,n=o.setDuration(O,t);d.debug("Duration successfully set to: "+n)}function he(e){for(var t=0,n=I.length;t<n;t++)if(I[t].getId()===e.id)return I[t];return null}function pe(){var e=h.getValue();R&&(f.trigger(Ne.default.PROTECTION_CREATED,{controller:R,manifest:e}),R.setMediaElement(N.getElement()),a&&R.setProtectionData(a)),function(){try{var e=p.getStreamsInfo();if(0===e.length)throw new Error("There are no streams");g.updateManifestUpdateInfo({currentTime:P.getTime(),buffered:N.getBufferRange(),presentationStartTime:e[0].start,clientTimeOffset:A.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)(s).create({manifestModel:h,mediaPlayerModel:L,dashMetrics:g,manifestUpdater:c,adapter:p,timelineConverter:A,capabilities:l,errHandler:S,baseURLController:m,abrController:E,playbackController:P,mediaController:v,textController:y,videoModel:N,streamController:u,settings:W}),I.push(i),i.initialize(r,R)),g.addManifestUpdateStreamInfo(r)}if(!b){var a=P.getStartTimeFromUriParameters(),o=null;if(a)o=ae(isNaN(a.fragS)?a.fragT:a.fragS);le(null,null!==o?o:I[0],NaN)}f.trigger(Ne.default.STREAMS_COMPOSED)}catch(e){S.error(new je.default(Ye.default.MANIFEST_ERROR_ID_NOSTREAMS_CODE,e.message+"nostreamscomposed",h.getValue())),w=!0,be()}}()}function ge(s){s.error?(w=!0,be()):function(){var e=s.manifest;p.updatePeriods(e);var t=p.getStreamsInfo(void 0,1)[0],n=p.getMediaInfoForType(t,De.default.VIDEO)||p.getMediaInfoForType(t,De.default.AUDIO),r=void 0;if(n&&(r=p.getUseCalculatedLiveEdgeTimeForMediaInfo(n))){d.debug("SegmentTimeline detected using calculated Live Edge Time");W.update({streaming:{useManifestDateHeaderTimeSource:!1}})}var i=p.getUTCTimingSources(),a=!p.getIsDynamic()||r?i:i.concat(L.getUTCTimingSources()),o=T.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),_.setConfig({dashMetrics:g,baseURLController:m}),_.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 me(t){var n=!1;return oe().forEach(function(e){e.getMediaInfo().type===t&&(n=!0)}),n}function Ee(n,r){r=r||new Date,oe().forEach(function(e){var t=e.getScheduleController();t&&t.finalisePlayList(r,n)}),g.addPlayList()}function ve(e){g.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),S.error(new je.default(e.error.code,t)),be()}}function Te(){return b?b.getStreamInfo():null}function Se(){if(!(n&&n.hasOwnProperty("load")&&A&&A.hasOwnProperty("initialize")&&A.hasOwnProperty("reset")&&A.hasOwnProperty("getClientTimeOffset")&&h&&S&&g&&P))throw new Error("setConfig function has to be called previously")}function Ae(e){isNaN(e.newDuration)||ce(e.newDuration)}function Ie(){b=R=null,G=k=U=void 0,B=!(D=!(x=!(F=!(w=C=M=!(I=[]))))),Y=0}function be(){Se(),_.reset(),Ee(C||w?Pe.PlayListTrace.FAILURE_STOP_REASON:Pe.PlayListTrace.USER_REQUEST_STOP_REASON);for(var e=0,t=I?I.length:0;e<t;e++){I[e].reset(C)}!function(){f.off(Ne.default.PLAYBACK_TIME_UPDATED,X,this),f.off(Ne.default.PLAYBACK_SEEKING,Z,this),f.off(Ne.default.PLAYBACK_ERROR,ye,this),f.off(Ne.default.PLAYBACK_STARTED,$,this),f.off(Ne.default.PLAYBACK_PAUSED,J,this),f.off(Ne.default.PLAYBACK_ENDED,se,this),f.off(Ne.default.MANIFEST_UPDATED,ge,this),f.off(Ne.default.BUFFERING_COMPLETED,ne,this),f.off(Ne.default.STREAM_BUFFERING_COMPLETED,re,this),f.off(Ne.default.MANIFEST_VALIDITY_CHANGED,Ae,this),f.off(Ne.default.TIME_SYNCHRONIZATION_COMPLETED,pe,this),f.off(Ne.default.WALLCLOCK_TIME_UPDATED,Q,this),f.off(Ue.default.METRIC_ADDED,Re,this)}(),m.reset(),c.reset(),g.clearAllCurrentMetrics(),h.setValue(null),n.reset(),A.reset(),i.reset(),O&&(o.detachMediaSource(N),O=null),N=null,R&&(R.setMediaElement(null),a=R=null,h.getValue()&&f.trigger(Ne.default.PROTECTION_DESTROYED,{data:h.getValue().url})),f.trigger(Ne.default.STREAM_TEARDOWN_COMPLETE),Ie()}function Re(e){e.metric===Me.default.DVR_INFO&&e.mediaType===De.default.AUDIO&&o.setSeekable(O,e.value.range.start,e.value.range.end)}return u={initialize:function(e,t){Se(),D=e,a=t,A.initialize(),(c=(0,we.default)(s).create()).setConfig({manifestModel:h,adapter:p,mediaPlayerModel:L,manifestLoader:n,errHandler:S,settings:W}),c.initialize(),m.setConfig({adapter:p}),function(){f.on(Ne.default.PLAYBACK_TIME_UPDATED,X,this),f.on(Ne.default.PLAYBACK_SEEKING,Z,this),f.on(Ne.default.PLAYBACK_ERROR,ye,this),f.on(Ne.default.PLAYBACK_STARTED,$,this),f.on(Ne.default.PLAYBACK_PAUSED,J,this),f.on(Ne.default.PLAYBACK_ENDED,se,this),f.on(Ne.default.MANIFEST_UPDATED,ge,this),f.on(Ne.default.BUFFERING_COMPLETED,ne,this),f.on(Ne.default.STREAM_BUFFERING_COMPLETED,re,this),f.on(Ne.default.MANIFEST_VALIDITY_CHANGED,Ae,this),f.on(Ne.default.TIME_SYNCHRONIZATION_COMPLETED,pe,this),f.on(Ne.default.WALLCLOCK_TIME_UPDATED,Q,this),f.on(Ue.default.METRIC_ADDED,Re,this)}()},getActiveStreamInfo:Te,isTrackTypePresent:_e,switchToVideoElement:function(e){b&&(P.initialize(Te()),fe(e,null,!0,!1))},getStreamById:function(t){return I.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=I.length,s=0;s<o;s++){if(i=(n=I[s]).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(!c||!c.hasOwnProperty("setManifest"))throw new Error("initialize function has to be called previously")}(),c.setManifest(e)},getActiveStreamProcessors:oe,setConfig:function(e){e&&(e.capabilities&&(l=e.capabilities),e.manifestLoader&&(n=e.manifestLoader),e.manifestModel&&(h=e.manifestModel),e.mediaPlayerModel&&(L=e.mediaPlayerModel),e.protectionController&&(R=e.protectionController),e.adapter&&(p=e.adapter),e.dashMetrics&&(g=e.dashMetrics),e.errHandler&&(S=e.errHandler),e.timelineConverter&&(A=e.timelineConverter),e.videoModel&&(N=e.videoModel),e.playbackController&&(P=e.playbackController),e.abrController&&(E=e.abrController),e.mediaController&&(v=e.mediaController),e.textController&&(y=e.textController),e.settings&&(W=e.settings))},setProtectionData:function(e){a=e},reset:be},d=(0,Le.default)(s).getInstance().getLogger(u),_=(0,ke.default)(s).getInstance(),m=(0,Be.default)(s).getInstance(),o=(0,Ge.default)(s).getInstance(),i=(0,xe.default)(s).getInstance(),T=(0,Fe.default)(s).getInstance(),Ie(),u}a.__dashjs_factory_name="StreamController",n.default=i.default.getSingletonFactory(a),t.exports=n.default},{100:100,102:102,106:106,109:109,110:110,113:113,119:119,123:123,211:211,218:218,223:223,241:241,47:47,48:48,49:49,53:53,56:56}],123:[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(223)),A=e(239),I=r(e(48)),b=r(e(56)),R=r(e(53)),i=r(e(49)),D=r(e(47)),M=r(e(218));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=Date.parse(e);return isNaN(t)&&(t=function(e){var t=void 0,n=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);return 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),new Date(t).getTime()}(e)),t}function p(e){return Date.parse(e)}function g(e){return Date.parse(e)}function _(e,t,n){n()}function m(e,t,n){var r=d(e);isNaN(r)?n():t(r)}function E(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?E(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){E(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(b.default.TIME_SYNCHRONIZATION_COMPLETED,{time:t,offset:n,error:e?new S.default(R.default.TIME_SYNC_FAILED_ERROR_CODE,R.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":E.bind(null,d),"urn:mpeg:dash:utc:http-iso:2014":E.bind(null,p),"urn:mpeg:dash:utc:direct:2014":m,"urn:mpeg:dash:utc:http-head:2012":v,"urn:mpeg:dash:utc:http-xsdate:2012":E.bind(null,d),"urn:mpeg:dash:utc:http-iso:2012":E.bind(null,p),"urn:mpeg:dash:utc:direct:2012":m,"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},{218:218,223:223,239:239,47:47,48:48,49:49,53:53,56:56}],124:[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(48)),_=r(e(56)),i=r(e(49)),m=r(e(3)),E=r(e(218)),v=r(e(63)),y="onLoad";function a(e){e=e||{};var t=this.context,i=(0,g.default)(t).getInstance(),s=(0,E.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!1;return!0}(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 m.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}),n}a.__dashjs_factory_name="XlinkController",n.default=i.default.getClassFactory(a),t.exports=n.default},{108:108,218:218,3:3,48:48,49:49,56:56,63:63}],125:[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(139)),a=r(e(126)),o=r(e(127)),s=r(e(132)),u=r(e(137));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},{126:126,127:127,132:132,137:137,139:139}],126:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r,i=e(57);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},{57:57}],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(128)),u=r(e(141)),l=r(e(126));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},{126:126,128:128,141:141}],128:[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(130)),u=r(e(131)),l=r(e(129));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},{129:129,130:130,131:131}],129:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r,i=e(132),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},{132:132}],130:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r,i=e(207),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},{207:207}],131:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r,i=e(137),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},{137:137}],132:[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(133)),f=r(e(134)),d=r(e(136)),c=r(e(135));function i(i){var a=(i=i||{}).debug,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{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},{133:133,134:134,135:135,136:136}],133:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r,i=e(140),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},{140:140}],134:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r,i=e(126),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},{126:126}],135:[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},{}],136:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r,i=e(140),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(){var e=n;e.length&&i&&i.report(s,e),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},{140:140}],137:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r,i=e(138),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,a=e.debug,o=e.metricsConstants;return{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},{138:138}],138:[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(142)),h=r(e(143));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(){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),function(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()}}(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(){d()}},r=(0,c.default)(n).getInstance(),i=(0,h.default)(n).getInstance(),d(),t}i.__dashjs_factory_name="DVBReporting",n.default=dashjs.FactoryMaker.getClassFactory(i),t.exports=n.default},{142:142,143:143}],139:[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(144)),g=r(e(126));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:!function(e){(0===e.responsecode||400<=e.responsecode||e.responsecode<100||600<=e.responsecode)&&s({errorcode:e.responsecode||p.default.CONNECTION_ERROR,url:e.url,terror:e.tresponse,servicelocation:e._serviceLocation})}(e.value)}}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},{126:126,144:144}],140:[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},{}],141:[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(145)),o=r(e(146)),l=r(e(147));function i(e){var s=(e=e||{}).adapter,u=e.constants;return{getMetrics:function(i){var t=[];return i&&i.Metrics_asArray&&i.Metrics_asArray.forEach(function(e){var r=new a.default,n=s.getIsDynamic(i);e.hasOwnProperty("metrics")&&(r.metrics=e.metrics,e.Range_asArray&&e.Range_asArray.forEach(function(e){var t=new o.default;t.starttime=function(e,t,n){var r=s.getMpd(e),i=void 0,a=void 0,o=0;return t?o=s.getAvailabilityStartTime(r)/1e3:(i=s.getRegularPeriods(r)).length&&(o=i[0].start),a=o,n&&n.hasOwnProperty(u.START_TIME)&&(a+=n.starttime),a}(i,n,e),e.hasOwnProperty("duration")?t.duration=e.duration:t.duration=s.getDuration(i),t._useWallClockTime=n,r.Range.push(t)}),e.Reporting_asArray&&(e.Reporting_asArray.forEach(function(e){var t=new l.default;if(e.hasOwnProperty(u.SCHEME_ID_URI)){for(var n in t.schemeIdUri=e.schemeIdUri,e)e.hasOwnProperty(n)&&(t[n]=e[n]);r.Reporting.push(t)}}),t.push(r)))}),t}}}i.__dashjs_factory_name="ManifestParsing",n.default=dashjs.FactoryMaker.getSingletonFactory(i),t.exports=n.default},{145:145,146:146,147:147}],142:[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},{}],143:[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},{}],144:[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},{}],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.metrics="",this.Range=[],this.Reporting=[]},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.starttime=0,this.duration=1/0,this._useWallClockTime=!1},t.exports=n.default},{}],147:[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},{}],148:[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(214)),i=r(e(49));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},{214:214,49:49}],149:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var v=r(e(48)),y=r(e(56)),i=r(e(49)),T=r(e(225)),S=r(e(47)),A="loading",I="executed";function a(e){e=e||{};var t=this.context,n=(0,v.default)(t).getInstance(),r=e.dashMetrics,i=e.fragmentLoader,a=void 0,o=void 0,s=void 0,u=void 0,l=void 0;function f(t){var n;return!!t&&(n=!1,u.some(function(e){if(function(e,t){return!isNaN(e.index)&&e.startTime===t.startTime&&e.adaptationIndex===t.adaptationIndex&&e.type===t.type}(t,e)||function(e,t){return isNaN(e.index)&&isNaN(t.index)&&e.quality===t.quality}(t,e)||function(e,t){return e.action===T.default.ACTION_COMPLETE&&e.action===t.action}(t,e))return n=!0}),n)}function d(e){return isNaN(e.duration)?.25:Math.min(e.duration/8,.5)}function c(n){u=u.filter(function(e){var t=d(e);return isNaN(e.startTime)||void 0!==n&&e.startTime>=n-t})}function h(n,r){r<=n+.5||(u=u.filter(function(e){var t=d(e);return isNaN(e.startTime)||e.startTime>=r-t||isNaN(e.duration)||e.startTime+e.duration<=n+t}))}function p(e,t){r.addSchedulingInfo(e,t),r.addRequestsQueue(e.mediaType,l,u)}function g(e){e.sender===i&&(l.splice(l.indexOf(e.request),1),e.response&&!e.error&&u.push(e.request),p(e.request,e.error?"failed":I),n.trigger(y.default.FRAGMENT_LOADING_COMPLETED,{request:e.request,response:e.response,error:e.error,sender:this}))}function _(e){e.sender===i&&n.trigger(y.default.FRAGMENT_LOADING_PROGRESS,{request:e.request,response:e.response,error:e.error,sender:this})}function m(e){e.sender===i&&n.trigger(y.default.FRAGMENT_LOADING_ABANDONED,{streamProcessor:this.getStreamProcessor(),request:e.request,mediaType:e.mediaType})}function E(){u=[],l=[]}return a={setStreamProcessor:function(e){s=e},getStreamProcessor:function(){return s},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 A:t=l;break;case I:t=u;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)?d(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:f,isFragmentLoadedOrPending:function(e){var t=!1,n=0,r=void 0;if(!(t=f(e)))for(n=0;n<l.length;n++)r=l[n],e.url===r.url&&e.startTime===r.startTime&&(t=!0);return t},removeExecutedRequestsBeforeTime:c,removeExecutedRequestsAfterTime:function(t){u=u.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++)h(n,e.start(r)),n=e.end(r);0<t&&h(n,t)}else c()},abortRequests:function(){i.abort(),l=[]},executeRequest:function(e){switch(e.action){case T.default.ACTION_COMPLETE:u.push(e),p(e,I),o.debug("executeRequest trigger STREAM_COMPLETED"),n.trigger(y.default.STREAM_COMPLETED,{request:e,fragmentModel:this});break;case T.default.ACTION_DOWNLOAD:p(e,A),l.push(e),function(e){n.trigger(y.default.FRAGMENT_LOADING_STARTED,{sender:a,request:e}),i.load(e)}(e);break;default:o.warn("Unknown request action.")}},reset:function(){n.off(y.default.LOADING_COMPLETED,g,this),n.off(y.default.LOADING_DATA_PROGRESS,_,this),n.off(y.default.LOADING_ABANDONED,m,this),i&&i.reset(),E()},addExecutedRequest:function(e){u.push(e)}},o=(0,S.default)(t).getInstance().getLogger(a),E(),n.on(y.default.LOADING_COMPLETED,g,a),n.on(y.default.LOADING_DATA_PROGRESS,_,a),n.on(y.default.LOADING_ABANDONED,m,a),a}a.__dashjs_factory_name="FragmentModel";var o=i.default.getClassFactory(a);o.FRAGMENT_MODEL_LOADING=A,o.FRAGMENT_MODEL_EXECUTED=I,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},{225:225,47:47,48:48,49:49,56:56}],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(48)),a=r(e(56)),o=r(e(49));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},{48:48,49:49,56:56}],151:[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(97)),i=r(e(49)),d=r(e(109)),c=r(e(187)),h=r(e(50)),p=e(216);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,h.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(e,t){l(e,t);var n=new f.default;n.schemeIdUri=e,n.value=t,i.push(n)}function l(n,r){(0,p.checkParameterType)(n,"string"),(0,p.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!==c.default.ABANDON_FRAGMENT_RULES&&e!==c.default.QUALITY_SWITCH_RULES||"string"!=typeof t)throw d.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*o.get().streaming.liveDelay;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:function(){return o.get().streaming.lowLatencyEnabled?o.get().streaming.liveDelay||3:o.get().streaming.liveDelay},addUTCTimingSource:u,removeUTCTimingSource:l,getUTCTimingSources:function(){return i},clearDefaultUTCTimingSources:function(){i=[]},restoreDefaultUTCTimingSources:function(){u(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=[],!1)},a=[],e}a.__dashjs_factory_name="MediaPlayerModel",n.default=i.default.getSingletonFactory(a),t.exports=n.default},{109:109,187:187,216:216,49:49,50:50,97:97}],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(109)),m=r(e(110)),f=r(e(229)),E=e(239),p=r(e(242)),g=r(e(235)),v=r(e(236)),y=r(e(237)),T=r(e(238)),S=e(240),A=r(e(244)),I=r(e(48)),b=r(e(243)),R=r(e(56)),i=r(e(49));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(R.default.METRICS_CHANGED)}function s(e){r.trigger(R.default.METRIC_CHANGED,{mediaType:e}),o()}function l(e,t,n){r.trigger(R.default.METRIC_UPDATED,{mediaType:e,metric:t,value:n}),s(e)}function d(e,t,n){r.trigger(R.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);r[t].push(n),r[t].length>i.get().streaming.metricsMaxListDepth&&r[t].shift()}function _(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){var g=new E.HTTPRequest;a&&a!==i&&(e(t,null,r,i,null,null,s,u,null,null,null,c,null,null),g.actualurl=a),g.tcpid=n,g.type=r,g.url=i,g.range=s,g.trequest=u,g.tresponse=l,g.responsecode=d,g._tfinish=f,g._stream=t,g._mediaduration=c,g._responseHeaders=h,g._serviceLocation=o,p?p.forEach(function(e){!function(e,t,n,r){var i=new E.HTTPRequestTrace;i.s=t,i.d=n,i.b=r,e.trace.push(i),e.interval||(e.interval=0),e.interval+=n}(g,e.s,e.d,e.b)}):(delete g.interval,delete g.trace),_(t,m.default.HTTP_REQUEST,g)},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,m.default.TRACK_SWITCH,a)},addBufferLevel:function(e,t,n){var r=new g.default;r.t=t,r.level=n,_(e,m.default.BUFFER_LEVEL,r)},addBufferState:function(e,t,n){var r=new v.default;r.target=n,r.state=t,_(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,m.default.DVR_INFO,i)},addDroppedFrames:function(e,t){var n=new T.default,r=u(e).DroppedFrames;n.time=t.creationTime,n.droppedFrames=t.droppedVideoFrames,0<r.length&&r[r.length-1]==n||_(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,m.default.SCHEDULING_INFO,l)},addRequestsQueue:function(e,t,n){var r=new b.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){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,_(h.default.STREAM,m.default.PLAY_LIST,e)},addDVBErrors:function(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},{109:109,110:110,229:229,235:235,236:236,237:237,238:238,239:239,240:240,242:242,243:243,244:244,48:48,49:49,56:56}],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(234)),i=r(e(49));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},{234:234,49:49}],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(49)),p=r(e(48)),g=r(e(56)),_=r(e(47));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,p.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}return e={initialize:function(){s.on(g.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(g.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){!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))}(e):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)}(e,t)},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:function(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},addTextTrack:function(e,t,n){return o?o.addTextTrack(e,t,n):null},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(g.default.PLAYBACK_PLAYING,c,this)}},t=(0,_.default)(a).getInstance().getLogger(e),e}a.__dashjs_factory_name="VideoModel",n.default=i.default.getSingletonFactory(a),t.exports=n.default},{47:47,48:48,49:49,56:56}],155:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r,i=e(49),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 m(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)+"\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:m(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:m}}o.__dashjs_factory_name="FetchLoader";var s=a.default.getClassFactory(o);n.default=s,t.exports=n.default},{49:49}],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 w=r(e(157)),O=r(e(155)),N=e(239),a=r(e(49)),o=r(e(53)),P=r(e(223));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,b=e.useFetch||!1,R=void 0,D=void 0,M=void 0,C=void 0;return t={load:function(e){e.request?function t(n,r){var i=n.request,a=[],o=!0,s=!0,u=new Date,l=u,f=0,d=void 0;if(!A||!T||!y)throw new Error("config object is not correct or missing");function e(e){s=!1,i.requestStartDate=u,i.requestEndDate=new Date,i.firstByteDate=i.firstByteDate||u,i.checkExistenceOnly||(T.addHttpRequest(i,d.response?d.response.responseURL:null,d.response?d.response.status:null,d.response&&d.response.getAllResponseHeaders?d.response.getAllResponseHeaders():d.response?d.response.responseHeaders:[],e?a:null),i.type===N.HTTPRequest.MPD_TYPE&&T.addManifestUpdate(i.type,i.requestStartDate,i.requestEndDate))}function c(){-1!==R.indexOf(d)&&(R.splice(R.indexOf(d),1),s&&(e(!1),0<r?function(){r--;var e={config:n};M.push(e),e.timeout=setTimeout(function(){-1!==M.indexOf(e)&&(M.splice(M.indexOf(e),1),t(n,r))},S.getRetryIntervalsForType(i.type))}():(y.error(new P.default(C[i.type],i.url+" is not available",{request:i,response:d.response})),n.error&&n.error(i,"error",d.response.statusText),n.complete&&n.complete(i,d.response.statusText))))}var h=void 0;h=b&&window.fetch&&"arraybuffer"===i.responseType&&i.type===N.HTTPRequest.MEDIA_SEGMENT_TYPE?(0,O.default)(v).create({requestModifier:A,boxParser:I}):(0,w.default)(v).create({requestModifier:A});var p=A.modifyRequestURL(i.url),g=i.checkExistenceOnly?N.HTTPRequest.HEAD:N.HTTPRequest.GET,_=S.getXHRWithCredentialsForType(i.type);d={url:p,method:g,withCredentials:_,request:i,onload:function(){200<=d.response.status&&d.response.status<=299&&(e(!0),n.success&&n.success(d.response.response,d.response.statusText,d.response.responseURL),n.complete&&n.complete(i,d.response.statusText))},onend:c,onerror:c,progress:function(e){var t=new Date;o&&(o=!1,(!e.lengthComputable||e.lengthComputable&&e.total!==e.loaded)&&(i.firstByteDate=t)),e.lengthComputable&&(i.bytesLoaded=e.loaded,i.bytesTotal=e.total),e.noTrace||(a.push({s:l,d:e.time?e.time:t.getTime()-l.getTime(),b:[e.loaded?e.loaded-f:0]}),l=t,f=e.loaded),n.progress&&e&&n.progress(e)},onabort:function(){n.abort&&n.abort(i)},loader:h};var m,E=(new Date).getTime();isNaN(i.delayLoadingTime)||E>=i.delayLoadingTime?(R.push(d),h.load(d)):(m={httpRequest:d},D.push(m),m.delayTimeout=setTimeout(function(){if(-1!==D.indexOf(m)){D.splice(D.indexOf(m),1);try{u=new Date,l=u,R.push(m.httpRequest),h.load(m.httpRequest)}catch(e){m.httpRequest.onerror()}}},i.delayLoadingTime-E))}(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=[],R.forEach(function(e){e.onloadend=e.onerror=e.onprogress=void 0,e.loader.abort(e),e.onabort()}),R=[]}},R=[],D=[],M=[],i(n={},N.HTTPRequest.MPD_TYPE,o.default.DOWNLOAD_ERROR_ID_MANIFEST_CODE),i(n,N.HTTPRequest.XLINK_EXPANSION_TYPE,o.default.DOWNLOAD_ERROR_ID_XLINK_CODE),i(n,N.HTTPRequest.INIT_SEGMENT_TYPE,o.default.DOWNLOAD_ERROR_ID_INITIALIZATION_CODE),i(n,N.HTTPRequest.MEDIA_SEGMENT_TYPE,o.default.DOWNLOAD_ERROR_ID_CONTENT_CODE),i(n,N.HTTPRequest.INDEX_SEGMENT_TYPE,o.default.DOWNLOAD_ERROR_ID_CONTENT_CODE),i(n,N.HTTPRequest.BITSTREAM_SWITCHING_SEGMENT_TYPE,o.default.DOWNLOAD_ERROR_ID_CONTENT_CODE),i(n,N.HTTPRequest.OTHER_TYPE,o.default.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},{155:155,157:157,223:223,239:239,49:49,53:53}],157:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r,i=e(49),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},{49:49}],158:[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},{}],159:[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(161)),a=r(e(162)),o=r(e(160)),s=r(e(167)),l=r(e(169)),f=r(e(170)),d=r(e(168)),c=[{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"}],h=[{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 u(){var o=void 0,s=this.context;function u(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 o={createProtectionSystem:function(e){var t=null,n=(0,a.default)(s).getInstance();n.setConfig({debug:e.debug,BASE64:e.BASE64}),n.initialize();var r=function(e){var t=e.debug,n=t.getLogger(o),r=e.eventBus,i=e.errHandler,a=e.videoModel?e.videoModel.getElement():null;return a&&void 0===a.onencrypted||a&&void 0===a.mediaKeys?u(a,h)?(n.info("EME detected on this user agent! (ProtectionModel_3Feb2014)"),(0,f.default)(s).create({debug:t,eventBus:r,events:e.events,api:u(a,h)})):u(a,c)?(n.info("EME detected on this user agent! (ProtectionModel_01b)"),(0,d.default)(s).create({debug:t,eventBus:r,errHandler:i,events:e.events,api:u(a,c)})):(n.warn("No supported version of EME detected on this user agent! - Attempts to play encrypted content will fail!"),null):(n.info("EME detected on this user agent! (ProtectionModel_21Jan2015)"),(0,l.default)(s).create({debug:t,eventBus:r,events:e.events}))}(e);return!t&&r&&(t=(0,i.default)(s).create({protectionModel:r,protectionKeyController:n,eventBus:e.eventBus,debug:e.debug,events:e.events,BASE64:e.BASE64,constants:e.constants}),e.capabilities.setEncryptedMediaSupported(!0)),t}}}u.__dashjs_factory_name="Protection";var p=dashjs.FactoryMaker.getClassFactory(u);p.events=o.default,p.errors=s.default,dashjs.FactoryMaker.updateClassFactory(u.__dashjs_factory_name,p),n.default=p,t.exports=n.default},{160:160,161:161,162:162,167:167,168:168,169:169,170:170}],160:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r,i=e(57);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},{57:57}],161:[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(158)),w=r(e(180)),O=r(e(179)),N=r(e(167)),P=r(e(223));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,u=void 0,r=void 0,h=void 0,b=void 0;function i(){if(!(S&&S.hasOwnProperty("on")&&y&&y.hasOwnProperty("getSupportedKeySystemsFromContentProtection")))throw new Error("Missing config parameter(s)")}function p(e,t){var n=C.default.getPSSHForKeySystem(b,e),r=R(b);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(b),t)}catch(e){S.trigger(A.KEY_SESSION_CREATED,{data:null,error:new P.default(N.default.KEY_SESSION_CREATED_ERROR_CODE,N.default.KEY_SESSION_CREATED_ERROR_MESSAGE+e.message)})}}else e?T.createKeySession(e,r,m(b),t):S.trigger(A.KEY_SESSION_CREATED,{data:null,error:new P.default(N.default.KEY_SESSION_CREATED_ERROR_CODE,N.default.KEY_SESSION_CREATED_ERROR_MESSAGE+"Selected key system is "+(b?b.systemString:null)+". needkey/encrypted event contains no initData corresponding to that key system!")})}function g(e,t){i(),T.loadKeySession(e,t,m(b))}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 R(e){var t=null;if(e){var n=e.systemString;u&&(t=n in u?u[n]:null)}return t}function _(e){var t=R(e),n=[],r=[],i=t&&t.audioRobustness&&0<t.audioRobustness.length?t.audioRobustness:h,a=t&&t.videoRobustness&&0<t.videoRobustness.length?t.videoRobustness:h,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 O.default(n,r,s,u,[o])}function m(e){var t=R(e);return t&&t.sessionType?t.sessionType:r}function E(n,s){var u=this,t=[],l=void 0;if(b)for(l=0;l<n.length;l++){if(b===n[l].ks)if("break"===function(){t.push({ks:n[l].ks,configs:[_(b)]});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(N.default.KEY_SYSTEM_ACCESS_DENIED_ERROR_CODE,N.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?g(n[l].sessionId,n[l].initData):n[l].initData&&p(n[l].initData,n[l].cdmData))},u),T.requestKeySystemAccess(t),"break"}())break}else if(void 0===b){var r;!function(){b=null,d.push(n);for(var e=0;e<n.length;e++)t.push({ks:n[e].ks,configs:[_(n[e].ks)]});function a(e){S.off(A.KEY_SYSTEM_ACCESS_COMPLETE,a,u),e.error?(b=void 0,S.off(A.INTERNAL_KEY_SYSTEM_SELECTED,r,u),s||S.trigger(A.KEY_SYSTEM_SELECTED,{data:null,error:new P.default(N.default.KEY_SYSTEM_ACCESS_DENIED_ERROR_CODE,N.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)b=void 0,s||S.trigger(A.KEY_SYSTEM_SELECTED,{data:null,error:new P.default(N.default.KEY_SYSTEM_ACCESS_DENIED_ERROR_CODE,N.default.KEY_SYSTEM_ACCESS_DENIED_ERROR_MESSAGE+"Error selecting key system! -- "+t.error)});else{if(!T)return;b=T.getKeySystem(),S.trigger(A.KEY_SYSTEM_SELECTED,{data:o});var n=R(b);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(b===d[r][l].ks){if(y.isClearKey(b)&&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?g(d[r][l].sessionId,d[r][l].initData):null!==d[r][l].initData&&p(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=R(b),o=b?b.systemString:null,s=y.getLicenseServer(b,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(b)){var l=y.processClearKeyLicenseRequest(b,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=b.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(b.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(N.default.MEDIA_KEY_MESSAGE_LICENSER_ERROR_CODE,N.default.MEDIA_KEY_MESSAGE_LICENSER_ERROR_MESSAGE+n+' update, XHR complete. status is "'+e.statusText+'" ('+e.status+"), readyState is "+e.readyState+". Response is "+i))},_=b.getLicenseRequestFromMessage(r),m=s.getHTTPMethod(n),E=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,m,E,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(N.default.MEDIA_KEY_MESSAGE_LICENSER_ERROR_CODE,N.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(N.default.MEDIA_KEY_MESSAGE_LICENSER_ERROR_CODE,N.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(N.default.MEDIA_KEY_MESSAGE_NO_LICENSE_SERVER_URL_ERROR_CODE,N.default.MEDIA_KEY_MESSAGE_NO_LICENSE_SERVER_URL_ERROR_MESSAGE))}else D(u,new P.default(N.default.MEDIA_KEY_MESSAGE_NO_CHALLENGE_ERROR_CODE,N.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),b){var r=C.default.getPSSHForKeySystem(b,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,u);0!==o.length?E(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&&E(t,!0)},createKeySession:p,loadKeySession:g,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){h=e},setProtectionData:function(e){u=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),b=void 0,T&&(T.reset(),T=null),s.forEach(function(e){return clearTimeout(e)}),s=[],c=[]}},I=n.getLogger(t),d=[],c=[],r="temporary",h="",t}i.__dashjs_factory_name="ProtectionController",n.default=dashjs.FactoryMaker.getClassFactory(i),t.exports=n.default},{158:158,167:167,179:179,180:180,223:223}],162:[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(158)),f=r(e(163)),d=r(e(165)),c=r(e(166)),h=r(e(164)),p=r(e(172)),g=r(e(173)),_=r(e(174)),m=r(e(171)),E=r(e(111));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===E.default.WIDEVINE_KEYSTEM_STRING?r=(0,_.default)(i).getInstance():e.systemString===E.default.PLAYREADY_KEYSTEM_STRING?r=(0,g.default)(i).getInstance():e.systemString===E.default.CLEARKEY_KEYSTEM_STRING&&(r=(0,m.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},{111:111,158:158,163:163,164:164,165:165,166:166,171:171,172:172,173:173,174:174}],163:[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(177)),l=r(e(175)),i=r(e(158)),a=r(e(111)),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},{111:111,158:158,175:175,177:177}],164:[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(158)),i=r(e(111)),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="utf-16"===l?new Uint16Array(e):new 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="+l),r},getLicenseRequestFromMessage:function(e){var t=null,n=new DOMParser,r="utf-16"===l?new Uint16Array(e):new 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},{111:111,158:158}],165:[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(177)),f=r(e(175)),i=r(e(158)),a=r(e(111)),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},{111:111,158:158,175:175,177:177}],166:[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(158)),a=r(e(111)),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},{111:111,158:158}],167:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r,i=e(54);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},{54:54}],168:[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(162)),T=r(e(181)),S=r(e(223)),A=r(e(176)),I=r(e(179)),b=r(e(178)),R=r(e(167));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++)m(f[e]);c.trigger(h.TEARDOWN_COMPLETE)}function m(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 E(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 b.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++)m(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:m,setServerCertificate:function(){},loadKeySession:function(){},removeKeySession:function(){},stop:_,reset:_},u=n.getLogger(r),i=p=null,l=[],f=[],g=(0,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=E(f,e.sessionId))||E(l,e.sessionId)){var r=R.default.MEDIA_KEYERR_CODE,i="";switch(e.errorCode.code){case 1:r=R.default.MEDIA_KEYERR_UNKNOWN_CODE,i+="MEDIA_KEYERR_UNKNOWN - "+R.default.MEDIA_KEYERR_UNKNOWN_MESSAGE;break;case 2:r=R.default.MEDIA_KEYERR_CLIENT_CODE,i+="MEDIA_KEYERR_CLIENT - "+R.default.MEDIA_KEYERR_CLIENT_MESSAGE;break;case 3:r=R.default.MEDIA_KEYERR_SERVICE_CODE,i+="MEDIA_KEYERR_SERVICE - "+R.default.MEDIA_KEYERR_SERVICE_MESSAGE;break;case 4:r=R.default.MEDIA_KEYERR_OUTPUT_CODE,i+="MEDIA_KEYERR_OUTPUT - "+R.default.MEDIA_KEYERR_OUTPUT_MESSAGE;break;case 5:r=R.default.MEDIA_KEYERR_HARDWARECHANGE_CODE,i+="MEDIA_KEYERR_HARDWARECHANGE - "+R.default.MEDIA_KEYERR_HARDWARECHANGE_MESSAGE;break;case 6:r=R.default.MEDIA_KEYERR_DOMAIN_CODE,i+="MEDIA_KEYERR_DOMAIN - "+R.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=E(f,e.sessionId))||E(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=E(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(R.default.MEDIA_KEY_MESSAGE_ERROR_CODE,R.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},{162:162,167:167,176:176,178:178,179:179,181:181,223:223}],169:[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(162)),E=r(e(181)),v=r(e(167)),y=r(e(223)),T=r(e(176)),S=r(e(178)),A=r(e(111));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),f=i=l=null,d=[],c=(0,m.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 E.default(t,e.initDataType)})}}}},r}i.__dashjs_factory_name="ProtectionModel_21Jan2015",n.default=dashjs.FactoryMaker.getClassFactory(i),t.exports=n.default},{111:111,162:162,167:167,176:176,178:178,181:181,223:223}],170:[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(162)),v=r(e(181)),y=r(e(223)),T=r(e(167)),S=r(e(176)),A=r(e(179)),I=r(e(178));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,m=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=m.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=function(e,t){return{session:e,initData:t,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,e);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;m.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),d=f=l=i=null,c=[],m=(0,E.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},{162:162,167:167,176:176,178:178,179:179,181:181,223:223}],171:[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(177)),s=r(e(175));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},{175:175,177:177}],172:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r,i=e(111),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},{111:111}],173:[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},{}],174:[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},{}],175:[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},{}],176:[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},{}],177:[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},{}],178:[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},{}],179:[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},{}],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.contentType=t,this.robustness=n},t.exports=n.default},{}],181:[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},{}],182:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r,i=e(49),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},{49:49}],183:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r,i=e(49),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},{49:49}],184:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r,i=e(49),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},{49:49}],185:[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(49)),u=r(e(184));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},{184:184,49:49}],186:[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(109)),i=r(e(49));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,m=void 0;function E(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?m.throughputHalfLife:m.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):function(e,t,n){var r=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}(e,t,n),i=(e?h:p)[t];return 0!==r&&i&&0!==i.length?(i=i.slice(-r)).reduce(function(e,t){return e+t})/i.length:NaN}(e,t,n)}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=Math.round(8*a/o);if(v(e),function(e,t,n){return e===y.default.VIDEO?n<c.get().streaming.cacheLoadThresholds[y.default.VIDEO]:e===y.default.AUDIO?n<c.get().streaming.cacheLoadThresholds[y.default.AUDIO]:void 0}(e,0,i)){if(0<h[e].length&&!h[e].hasCachedEntries)return;h[e].hasCachedEntries=!0}else h[e]&&h[e].hasCachedEntries&&function(e){delete h[e],delete p[e],delete g[e],delete _[e],v(e)}(e);h[e].push(s),20<h[e].length&&h[e].shift(),p[e].push(r),20<p[e].length&&p[e].shift(),E(g[e],s,.001*i,m.throughputHalfLife),E(_[e],r,1,m.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 m={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},{109:109,49:49}],187:[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(193)),f=r(e(191)),d=r(e(188)),c=r(e(190)),h=r(e(192)),p=r(e(189)),i=r(e(49)),g=r(e(184)),_="qualitySwitchRules",m="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===m&&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=m,i.default.updateSingletonFactory(a.__dashjs_factory_name,o),n.default=o,t.exports=n.default},{184:184,188:188,189:189,190:190,191:191,192:192,193:193,49:49}],188:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var v=r(e(184)),i=r(e(49)),a=r(e(47));function y(e){e=e||{};var d=this.context,c=e.mediaPlayerModel,h=e.dashMetrics,p=e.settings,t=void 0,g=void 0,_=void 0,m=void 0,E=void 0;function n(){_={},m={},E=[]}return t={shouldAbandon:function(e){var t=(0,v.default)(d).create(v.default.NO_CHANGE,{name:y.__dashjs_factory_name});if(!(e&&e.hasOwnProperty("getMediaInfo")&&e.hasOwnProperty("getMediaType")&&e.hasOwnProperty("getCurrentRequest")&&e.hasOwnProperty("getRepresentationInfo")&&e.hasOwnProperty("getAbrController")))return t;var n=e.getMediaInfo(),r=e.getMediaType(),i=e.getCurrentRequest();if(!isNaN(i.index)){if(function(e,t){_[e]=_[e]||{},_[e][t]=_[e][t]||{}}(r,i.index),c.getStableBufferTime()<h.getCurrentBufferLevel(r,!0))return t;var a=_[r][i.index];if(null===a||null===i.firstByteDate||m.hasOwnProperty(a.id))return t;if(void 0===a.firstByteTime&&(E[r]=[],a.firstByteTime=i.firstByteDate.getTime(),a.segmentDuration=i.duration,a.bytesTotal=i.bytesTotal,a.id=i.index),a.bytesLoaded=i.bytesLoaded,a.elapsedTime=(new Date).getTime()-a.firstByteTime,0<a.bytesLoaded&&0<a.elapsedTime&&function(e,t){E[e]=E[e]||[],E[e].push(t)}(r,Math.round(8*a.bytesLoaded/a.elapsedTime)),5<=E[r].length&&500<a.elapsedTime&&a.bytesLoaded<a.bytesTotal){var o=E[r].reduce(function(e,t){return e+t},0);if(a.measuredBandwidthInKbps=Math.round(o/E[r].length),a.estimatedTimeOfDownload=+(8*a.bytesTotal/a.measuredBandwidthInKbps/1e3).toFixed(2),a.estimatedTimeOfDownload<1.8*a.segmentDuration||0===e.getRepresentationInfo().quality)return t;if(!m.hasOwnProperty(a.id)){var s=e.getAbrController(),u=a.bytesTotal-a.bytesLoaded,l=s.getBitrateList(n),f=s.getQualityForBitrate(n,a.measuredBandwidthInKbps*p.get().streaming.abr.bandwidthSafetyFactor);a.bytesTotal*l[f].bitrate/l[s.getQualityFor(r)].bitrate<u&&(t.quality=f,t.reason.throughput=a.measuredBandwidthInKbps,t.reason.fragmentID=a.id,m[a.id]=a,g.debug("( ",r,"frag id",a.id,") is asking to abandon and switch to quality to ",f," measured bandwidth was",a.measuredBandwidthInKbps),delete _[r][a.id])}}else a.bytesLoaded===a.bytesTotal&&delete _[r][a.id]}return t},reset:n},g=(0,a.default)(d).getInstance().getLogger(t),n(),t}y.__dashjs_factory_name="AbandonRequestsRule",n.default=i.default.getClassFactory(y),t.exports=n.default},{184:184,47:47,49:49}],189:[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(110)),M=r(e(184)),i=r(e(49)),g=e(239),_=r(e(48)),m=r(e(56)),E=r(e(47));function a(e){e=e||{};var v=this.context,y=e.dashMetrics,o=e.mediaPlayerModel,t=(0,_.default)(v).getInstance(),n=void 0,T=void 0,S=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 A(e){var t={},n=e.getMediaInfo().bitrateList.map(function(e){return e.bandwidth}),r=function(e){return e.map(function(e){return Math.log(e)})}(n);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,I(t)):t.state=0,t}function I(e){e.placeholderBuffer=0,e.mostAdvancedSegmentStart=NaN,e.lastSegmentWasReplacement=!1,e.lastSegmentStart=NaN,e.lastSegmentDurationS=NaN,e.lastSegmentRequestTimeMs=NaN,e.lastSegmentFinishTimeMs=NaN}function b(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=y.getCurrentBufferLevel(t,!0),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 R(e,t){return e.Vp*(e.utilities[t]+e.gp)}function D(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 S)S.hasOwnProperty(e)&&2===S[e].state&&(S[e].placeholderBuffer=0)}function i(){for(var e in S)if(S.hasOwnProperty(e)){var t=S[e];0!==t.state&&(t.state=1,I(t))}}function a(){}function u(e){if(e&&e.chunk&&e.chunk.mediaInfo){var t=S[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=S[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=y.getCurrentBufferLevel(t,!0)+.001*(e.lastSegmentFinishTimeMs-e.lastSegmentRequestTimeMs),r=R(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=S[e.mediaType];t&&0!==t.state&&(t.abrQuality=e.newQuality)}}function c(e){if(e){var t=S[e.mediaType];if(t&&0!==t.state){var n=y.getCurrentBufferLevel(e.mediaType,!0),r=void 0;r=0<t.abrQuality?D(t,t.abrQuality):10;var i=Math.max(0,r-n);t.placeholderBuffer=Math.min(t.placeholderBuffer,i)}}}function h(){S={}}return n={getMaxIndex:function(e){var t=(0,M.default)(v).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=function(e){var t=e.getMediaType(),n=S[t];return n?0!==n.state&&b(n,t):(n=A(e),S[t]=n),n}(e);if(0===d.state)return t;var c=y.getCurrentBufferLevel(r,!0),h=s.getAverageThroughput(r,l),p=s.getSafeAverageThroughput(r,l),g=s.getAverageLatency(r),_=void 0;if(t.reason.state=d.state,t.reason.throughput=h,t.reason.latency=g,isNaN(h))return t;switch(d.state){case 1:_=o.getQualityForBitrate(n,p,g),t.quality=_,t.reason.throughput=p,d.placeholderBuffer=Math.max(0,D(d,_)-c),d.lastQuality=_,!isNaN(d.lastSegmentDurationS)&&c>=d.lastSegmentDurationS&&(d.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,b(e,t)}(d,r),_=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}(d,c+d.placeholderBuffer);var m=o.getQualityForBitrate(n,p,g);_>d.lastQuality&&m<_&&(_=Math.max(m,d.lastQuality));var E=Math.max(0,c+d.placeholderBuffer-R(d,_));E<=d.placeholderBuffer?(d.placeholderBuffer-=E,E=0):(E-=d.placeholderBuffer,d.placeholderBuffer=0,_<o.getTopQualityIndexFor(r,u)?i.setTimeToLoadDelay(1e3*E):E=0),t.quality=_,t.reason.throughput=h,t.reason.latency=g,t.reason.bufferLevel=c,t.reason.placeholderBuffer=d.placeholderBuffer,t.reason.delay=E,d.lastQuality=_;break;default:T.debug("BOLA ABR rule invoked in bad state."),t.quality=o.getQualityForBitrate(n,p,g),t.reason.state=d.state,t.reason.throughput=p,t.reason.latency=g,d.state=1,I(d)}return t},reset:function(){h(),t.off(m.default.BUFFER_EMPTY,r,n),t.off(m.default.PLAYBACK_SEEKING,i,n),t.off(m.default.PERIOD_SWITCH_STARTED,a,n),t.off(m.default.MEDIA_FRAGMENT_LOADED,u,n),t.off(m.default.METRIC_ADDED,l,n),t.off(m.default.QUALITY_CHANGE_REQUESTED,d,n),t.off(m.default.FRAGMENT_LOADING_ABANDONED,c,n)}},T=(0,E.default)(v).getInstance().getLogger(n),h(),t.on(m.default.BUFFER_EMPTY,r,n),t.on(m.default.PLAYBACK_SEEKING,i,n),t.on(m.default.PERIOD_SWITCH_STARTED,a,n),t.on(m.default.MEDIA_FRAGMENT_LOADED,u,n),t.on(m.default.METRIC_ADDED,l,n),t.on(m.default.QUALITY_CHANGE_REQUESTED,d,n),t.on(m.default.FRAGMENT_LOADING_ABANDONED,c,n),n}a.__dashjs_factory_name="BolaRule",n.default=i.default.getClassFactory(a),t.exports=n.default},{110:110,184:184,239:239,47:47,48:48,49:49,56:56}],190:[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(49)),f=r(e(184)),a=r(e(47));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},{184:184,47:47,49:49}],191:[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(115)),a=r(e(48)),o=r(e(56)),i=r(e(49)),s=r(e(47)),E=r(e(184)),v=r(e(109)),y=r(e(110));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("getLatestBufferInfoVO"))throw new Error(v.default.MISSING_CONFIG_ERROR)}();var n=e.getMediaType(),r=p.getLatestBufferInfoVO(n,!0,y.default.BUFFER_STATE),i=e.getRepresentationInfo().fragmentDuration;if(!r||!function(e,t){_[e]=_[e]||{};var n=!1;_[e].firstBufferLoadedEvent?n=!0:t&&t.state===m.default.BUFFER_LOADED&&(_[e].firstBufferLoadedEvent=!0,n=!0);return n}(n,r)||!i)return t;if(r.state===m.default.BUFFER_EMPTY)g.debug("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,!0),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},{109:109,110:110,115:115,184:184,47:47,48:48,49:49,56:56}],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(49)),a=r(e(47)),f=r(e(184));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},{184:184,47:47,49:49}],193:[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(115)),m=r(e(112)),i=r(e(49)),a=r(e(47)),E=r(e(184)),v=r(e(109)),y=r(e(110));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,E.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("getLatestBufferInfoVO"))throw new Error(v.default.MISSING_CONFIG_ERROR)}();var n=e.getMediaInfo(),r=e.getMediaType(),i=p.getLatestBufferInfoVO(r,!0,y.default.BUFFER_STATE),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!==_.default.BUFFER_LOADED&&!u||(t.quality=o.getQualityForBitrate(n,f,d),a.setTimeToLoadDelay(0),g.debug("requesting switch to index: ",t.quality,"type: ",r,"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},{109:109,110:110,112:112,115:115,184:184,47:47,49:49}],194:[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(109)),i=r(e(49));function a(e){var s=(e=e||{}).dashMetrics,u=e.mediaPlayerModel,l=e.textController,f=e.abrController,d=e.settings;function n(e,t){var n=NaN;if(!e)return n;var r=e.getType(),i=e.getRepresentationInfo();if(r===c.default.FRAGMENTED_TEXT)n=l.isTextEnabled()?i.fragmentDuration:0;else if(r===c.default.AUDIO&&t){var a=s.getCurrentBufferLevel(c.default.VIDEO,!0);n=isNaN(i.fragmentDuration)?a:Math.max(a,i.fragmentDuration)}else{var o=i.mediaInfo.streamInfo;if(f.isPlayingAtTopQuality(o))n=o.manifestInfo.duration>=d.get().streaming.longFormContentDurationThreshold?d.get().streaming.bufferTimeAtTopQualityLongForm:d.get().streaming.bufferTimeAtTopQuality;else n=u.getStableBufferTime()}return n}return{execute:function(e,t){return!e||s.getCurrentBufferLevel(e.getType(),!0)<n(e,t)},getBufferTarget:n}}a.__dashjs_factory_name="BufferLevelRule",n.default=i.default.getClassFactory(a),t.exports=n.default},{109:109,49:49}],195:[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(109)),i=r(e(47)),a=r(e(49)),m=r(e(225));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!==m.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},{109:109,225:225,47:47,49:49}],196:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r,i=e(49),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 m=j(p.chars);null===i&&(i={x:m,y1:c,y2:c+1,p:[]}),m!==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:m,y1:c,y2:c+1,p:[]});for(var E=0;E<p.chars.length;++E){var v=p.chars[E],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=m}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],b="sub_cea608_"+G++,R=document.createElement("div");R.id=b;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;";R.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 O=I.p[w],N=0;for(h=0;h<O.spans.length;++h){var P=O.spans[h];if(0<P.line.length){if(0!==h&&N!=P.row){var L=document.createElement("br");L.className="lineBreak",C.appendChild(L)}var x=!1;N===P.row&&(x=!0),N=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===O.spans.length-1?U.textContent=P.line.replace(/\s+$/g,""):U.textContent=P.line:1<O.spans.length&&h<O.spans.length-1&&P.row===O.spans[h+1].row?U.textContent=P.line.replace(/^\s+/g,""):U.textContent=P.line.trim(),C.appendChild(U)}}}M.appendChild(C),R.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:R,cueID:b,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},{49:49}],197:[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(109)),E=r(e(48)),v=r(e(56)),i=r(e(49)),y=r(e(211)),T=r(e(105)),S=r(e(199)),A=r(e(223)),I=r(e(53)),b="NotFragmentedTextBufferController";function a(e){e=e||{};var n=this.context,r=(0,E.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.getStreamProcessor()===u&&!e.error){var t=u.getStreamInfo(),n=e.sender.getCurrentRepresentation();h.extract(t?t.id:null,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 b},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(m.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=b,n.default=i.default.getClassFactory(a),t.exports=n.default},{105:105,109:109,199:199,211:211,223:223,48:48,49:49,53:53,56:56}],198:[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(109)),i=r(e(49)),o=r(e(115)),s=r(e(197));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},{109:109,115:115,197:197,49:49}],199:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var b=r(e(109)),i=r(e(49)),R=r(e(200)),D=r(e(201)),M=r(e(219)),C=r(e(217)),w=r(e(48)),O=r(e(56)),N=e(216);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,m=void 0,c=void 0,E=void 0;function v(e){void 0===E&&null!==e.fromStreamInfo&&(E=this.getCurrentTrackIdx())}function y(){void 0===E&&(E=this.getCurrentTrackIdx())}function T(){void 0!==E&&(this.setTextTrack(E),E=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(O.default.TEXT_TRACKS_ADDED,{enabled:A(),index:r,tracks:t})}function A(){var e=!0;return m&&!c&&(e=!1),e}function I(){m=!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 m},addEmbeddedTrack:function(e){h.addEmbeddedTrack(e)},getTextDefaultLanguage:function(){return l},setTextDefaultLanguage:function(e){(0,N.checkParameterType)(e,"string"),l=e},setTextDefaultEnabled:function(e){(0,N.checkParameterType)(e,"boolean"),(d=e)||this.setTextTrack(-1)},getTextDefaultEnabled:function(){return d},enableText:function(e){(0,N.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;m=-1===e;var s=_.getCurrentTrackIdx();if(s!==e){_.setModeForTrackIdx(s,b.default.TEXT_HIDDEN),_.setCurrentTrackIdx(e),_.setModeForTrackIdx(e,b.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(b.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()===b.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()===b.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,N.checkParameterType)(e,"boolean"),c=e},reset:function(){I(),h.resetEmbedded(),h.reset()}},f=-1,c=!(d=!(l="")),_=(0,D.default)(e).getInstance(),o=(0,M.default)(e).getInstance(),s=(0,C.default)(e).getInstance(),h=(0,R.default)(e).getInstance(),u=(0,w.default)(e).getInstance(),_.initialize(),u.on(O.default.TEXT_TRACKS_QUEUE_INITIALIZED,S,t),u.on(O.default.PERIOD_SWITCH_STARTED,v,t),u.on(O.default.STREAM_COMPLETED,y,t),u.on(O.default.PERIOD_SWITCH_COMPLETED,T,t),I(),t}a.__dashjs_factory_name="TextController",n.default=i.default.getSingletonFactory(a),t.exports=n.default},{109:109,200:200,201:201,216:216,217:217,219:219,48:48,49:49,56:56}],200:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var ae=r(e(109)),oe=e(239),m=r(e(231)),E=r(e(205)),v=r(e(207)),i=r(e(49)),y=r(e(47)),T=r(e(201)),S=r(e(196)),se=r(e(9)),ue=r(e(2)),A=r(e(48)),I=r(e(56)),le=r(e(223)),fe=r(e(53));function a(){var a=this.context,n=(0,A.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,K=void 0,q=void 0,H=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,ne=void 0;function e(){V=NaN,W=q=null,H=!(d=[])}function t(){e(),f=[],Y=null}function h(e){var t=e.chunk;t.mediaInfo.embeddedCaptions&&_(t.bytes,t)}function p(){Q=[],(K=(0,T.default)(a).getInstance()).setConfig({videoModel:z}),K.initialize(),B=(0,E.default)(a).getInstance(),ee=[],J=[],r=!($=X=null),te=(Z=0,S.default)(a).getInstance();var e=c.getActiveStreamProcessors();for(var t in e)if("video"===e[t].getType()){ne=e[t].getRepresentationInfo().MSETimeOffset;break}n.on(I.default.VIDEO_CHUNK_RECEIVED,h,this)}function g(e){X=e}function re(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(ae.default.STPP)&&(n=!0),t.mimeType&&0<=t.mimeType.search(ae.default.TTML)&&(n=!0),n),i.defaultTrack=function(e){var t=!1;1<Q.length&&e.isEmbedded?t=e.id&&e.id===ae.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;K.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===ae.default.FRAGMENTED_TEXT)if(H||"InitializationSegment"!==t.segmentType){if(!H)return;if(r=(s=B.getSamplesInfo(e)).sampleList,null===W&&0<r.length&&(W=r[0].cts-t.start*V),0<=c.search(ae.default.STPP))for(Y=null!==Y?Y:ie(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=se.default.Utils.dataViewToString(g,ae.default.UTF8);var _=[],m=S.offset+S.subSizes[0];for(a=1;a<S.subSizes.length;a++){var E=new Uint8Array(e,m,S.subSizes[a]),v=String.fromCharCode.apply(null,E);_.push(v),m+=S.subSizes[a]}try{var y=j.getValue().ttmlTimeIsRelative?h/V:0;n=Y.parse(u,y,h/V,(h+S.duration)/V,_),K.addCaptions(X,W/V,n)}catch(e){q.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=se.default.parseBuffer(A);for(a=0;a<I.boxes.length;a++){var b=I.boxes[a];if(k.debug("VTT box1: "+b.type),"vtte"!==b.type&&"vttc"===b.type)for(k.debug("VTT vttc boxes.length = "+b.boxes.length),o=0;o<b.boxes.length;o++){var R=b.boxes[o];if(k.debug("VTT box2: "+R.type),"payl"===R.type){var D=R.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&&K.addCaptions(X,0,T)}}else H=!0,V=B.getMediaTimescaleFromMoov(e);else if(f===ae.default.TEXT){g=new DataView(e,0,e.byteLength);u=se.default.Utils.dataViewToString(g,ae.default.UTF8);try{n=ie(c).parse(u,0),K.addCaptions(K.getCurrentTrackIdx(),0,n)}catch(e){G.error(new le.default(fe.default.TIMED_TEXT_ERROR_ID_PARSE_CODE,fe.default.TIMED_TEXT_ERROR_MESSAGE_PARSE+e.message,u))}}else if(f===ae.default.VIDEO)if(t.segmentType===oe.HTTPRequest.INIT_SEGMENT_TYPE){if(0===Z)for(Z=B.getMediaTimescaleFromMoov(e),i=0;i<Q.length;i++)re(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()?te.createHTMLCaptionsFromScreen(z.getElement(),e,t,n):[{start:e,end:t,data:n.getDisplayText(),styles:{}}],r&&K.addCaptions(i,0,r)}},O=(s=B.getSamplesInfo(e)).lastSequenceNumber;if(!ee[0]&&!ee[1]){var N=void 0,P=void 0;for(i=0;i<Q.length;i++){if(Q[i].id===ae.default.CC1?(0,P=K.getTrackIdxForId(ae.default.CC1)):Q[i].id===ae.default.CC3&&(1,P=K.getTrackIdxForId(ae.default.CC3)),-1===P)return void k.warn("CEA-608: data before track is ready.");N=w(0,P),ee[i]=new ue.default.Cea608Parser(i+1,{newCue:N},null)}}if(Z&&-1==J.indexOf(O)){if(null!==$&&O!==$+s.numSequences)for(i=0;i<ee.length;i++)ee[i]&&ee[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=ue.default.findCea608Nalus(r,a.offset,a.size),s=null,u=0,l=0;l<o.length;l++)for(var f=ue.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+ne*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<ee.length;x++){var F=L.fields[x],U=ee[x];if(U)for(i=0;i<F.length;i++)U.addData(F[i][0]/Z,F[i][1])}$=O,J.push(O)}}}else k.error("No text type defined")}function ie(e){var t=void 0;return 0<=e.search(ae.default.VTT)?t=i:(0<=e.search(ae.default.TTML)||0<=e.search(ae.default.STPP))&&(t=l),t}return o={initialize:function(e,t){r||p(),K.setConfig({videoModel:z}),K.initialize(),B=B||(0,E.default)(a).getInstance(),function(e,t){var n=!s.getIsTextTrack(e);if(t){if(f=f.concat(t.getMediaInfoArr()),n){q=t.getFragmentModel(),o.buffered=(0,v.default)(a).create(),d=u.getTracksFor(ae.default.FRAGMENTED_TEXT,t.getStreamInfo());for(var r=u.getCurrentTrackFor(ae.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++)re(null,f[i])}}(e,t)},append:_,abort:function(){K.deleteAllTextTracks(),e(),B=null,f=[]},addEmbeddedTrack:function(e){if(r||p(),e)if(e.id===ae.default.CC1||e.id===ae.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(I.default.VIDEO_CHUNK_RECEIVED,h,this),K&&K.deleteAllTextTracks(),r=!1,Q=[],ee=[null,null],J=[],$=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&&(K=e.textTracks),e.vttParser&&(i=e.vttParser),e.ttmlParser&&(l=e.ttmlParser))},getConfig:function(){return{fragmentModel:q,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(),K=z=c=null}},k=(0,y.default)(a).getInstance().getLogger(o),t(),o}a.__dashjs_factory_name="TextSourceBuffer",n.default=i.default.getSingletonFactory(a),t.exports=n.default},{109:109,196:196,2:2,201:201,205:205,207:207,223:223,231:231,239:239,47:47,48:48,49:49,53:53,56:56,9:9}],201:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var v=r(e(109)),s=r(e(48)),w=r(e(56)),i=r(e(49)),O=r(e(47)),N=e(16),P=e(216);function a(){var e=this.context,y=(0,s.default)(e).getInstance(),t=void 0,u=void 0,l=void 0,T=void 0,f=void 0,d=void 0,c=void 0,S=void 0,A=void 0,I=void 0,b=void 0,R=void 0,r=void 0,D=void 0,M=void 0,n=void 0,C=void 0;function h(e){var t=f[e].kind,n=void 0!==f[e].id?f[e].id:f[e].lang,r=f[e].lang,i=f[e].isTTML,a=f[e].isEmbedded,o=T.addTextTrack(t,n,r);return o.isEmbedded=a,o.isTTML=i,o}function i(e,t){var n=T.getClientWidth(),r=T.getClientHeight(),i=T.getVideoWidth(),a=T.getVideoHeight(),o=T.getVideoRelativeOffsetTop(),s=T.getVideoRelativeOffsetLeft(),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!=b||h!=S||p!=A||t){if(S=h+s,A=p+o,I=d,b=c,R){var g=R.style;g&&(g.left=S+"px",g.top=A+"px",g.width=I+"px",g.height=b+"px",g.zIndex=D&&document[D]||M?C:null,y.trigger(w.default.CAPTION_CONTAINER_RESIZE,{}))}var _=e.activeCues;if(_)for(var m=_.length,E=0;E<m;++E){var v=_[E];v.scaleCue(v)}}}function p(e){var t=I,n=b,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&&R.removeChild(h),g(e)}}function g(a){if(R){var e=document.createElement("div");R.appendChild(e),n=(0,N.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},R.clientHeight,R.clientWidth,!1,function(e){u.info("renderCaption :",e)},n,!0),e.id=a.cueID,y.trigger(w.default.CAPTION_RENDERED,{captionDiv:e,currentTrackIdx:c})}}function _(e){return 0<=e&&f[e]?T.getTextTrack(f[e].kind,f[e].id,f[e].lang,f[e].isTTML,f[e].isEmbedded):null}function m(e){if(e!==c){var t=_(c=e);(function(e){o.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):a.call(this)}).call(this,t),r&&(clearInterval(r),r=null),t&&"html"===t.renderingType&&(i.call(this,t,!0),r=setInterval(i.bind(this,t),500))}}function E(e){if(e.cues)for(var t=e.cues,n=t.length-1;0<=n;n--)e.removeCue(t[n])}function a(){var e=document.getElementById("native-cue-style");e&&document.head.removeChild(e)}function o(){if(R)for(;R.firstChild;)R.removeChild(R.firstChild)}return t={initialize:function(){"undefined"!=typeof window&&"undefined"!=typeof navigator&&(l=window.VTTCue||window.TextTrackCue,f=[],d=[],M=!(c=-1),C=2147483647,n=r=R=null,void(b=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,R&&!document[D]&&(R.style.zIndex=e?C:null)},addTextTrack:function(e,t){if(f.length!==t){if(f.push(e),f.length===t){f.sort(function(e,t){return e.index-t.index}),R=T.getTTMLRenderingDiv();for(var n=-1,r=0;r<f.length;r++){var i=h.call(this,r);d.push(i),f[r].defaultTrack&&(i.default=!0,n=r);var a=_(r);a&&(a.mode=v.default.TEXT_SHOWING,R&&(f[r].isTTML||f[r].isEmbedded)?a.renderingType="html":a.renderingType="default"),this.addCaptions(r,0,f[r].captionData),y.trigger(w.default.TEXT_TRACK_ADDED)}if(m.call(this,n),0<=n)for(var o=0;o<f.length;o++){var s=_(o);s&&(s.mode=o===n?v.default.TEXT_SHOWING:v.default.TEXT_HIDDEN)}y.trigger(w.default.TEXT_TRACKS_QUEUE_INITIALIZED,{index:c,tracks:f})}}else u.error("Trying to add too many tracks.")},addCaptions:function(e,t,n){var r=_(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&&R?((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=p.bind(i),o.cellResolution=s.cellResolution,o.lineHeight=s.lineHeight,o.linePadding=s.linePadding,o.fontSize=s.fontSize,R.style.left=S+"px",R.style.top=A+"px",R.style.width=I+"px",R.style.height=b+"px",o.onenter=function(){r.mode===v.default.TEXT_SHOWING&&(this.isd?(g(this),u.debug("Cue enter id:"+this.cueID)):(R.appendChild(this.cueHTMLElement),p.call(i,this),y.trigger(w.default.CAPTION_RENDERED,{captionDiv:this.cueHTMLElement,currentTrackIdx:c})))},o.onexit=function(){if(R)for(var e=R.childNodes,t=0;t<e.length;++t)e[t].id===this.cueID&&(u.debug("Cue exit id:"+e[t].id),R.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===v.default.TEXT_SHOWING&&y.trigger(w.default.CAPTION_RENDERED,{currentTrackIdx:c})});try{o?r.addCue(o):u.error("impossible to display subtitles.")}catch(e){throw E(r),r.addCue(o),e}}},getCurrentTrackIdx:function(){return c},setCurrentTrackIdx:m,getTrackIdxForId:function(e){for(var t=-1,n=0;n<f.length;n++)if(f[n].id===e){t=n;break}return t},getCurrentTrackInfo:function(){return f[c]},setModeForTrackIdx:function(e,t){var n=_(e);n&&n.mode!==t&&(n.mode=t)},deleteCuesFromTrackIdx:function(e){var t=_(e);t&&E(t)},deleteAllTextTracks:function(){for(var e=d?d.length:0,t=0;t<e;t++){var n=_(t);n&&(E.call(this,n),n.mode="disabled")}d=[],f=[],r&&(clearInterval(r),r=null),c=-1,o.call(this)},deleteTextTrack:function(e){T.removeChild(d[e]),d.splice(e,1)},setConfig:function(e){e&&e.videoModel&&(T=e.videoModel)}},u=(0,O.default)(e).getInstance().getLogger(t),t}a.__dashjs_factory_name="TextTracks",n.default=i.default.getSingletonFactory(a),t.exports=n.default},{109:109,16:16,216:216,47:47,48:48,49:49,56:56}],202:[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(49)),a=r(e(109)),u=r(e(232)),o=r(e(203)),l=r(e(222)),f=e(81);function s(e){var t,n=this.context,s=void 0;function r(){s&&s.reset()}return t={get:function(e,t){var n=s.getCurrentTrack();if(!n||n.segmentDuration<=0||null==e)return null;var r=Math.floor(e/n.segmentDuration),i=e%n.segmentDuration,a=Math.floor(i*n.tilesHor*n.tilesVert/n.segmentDuration),o=new u.default;return o.width=Math.floor(n.widthPerTile),o.height=Math.floor(n.heightPerTile),o.x=Math.floor(a%n.tilesHor)*n.widthPerTile,o.y=Math.floor(a/n.tilesHor)*n.heightPerTile,"readThumbnail"in n?n.readThumbnail(e,function(e){o.url=e,t&&t(o)}):(o.url=function(e,t){var n=t+e.startNumber,r=(0,f.replaceTokenForTemplate)(e.templateUrl,"Number",n);return r=(0,f.replaceTokenForTemplate)(r,"Time",(n-1)*e.segmentDuration),r=(0,f.replaceTokenForTemplate)(r,"Bandwidth",e.bandwidth),(0,f.unescapeDollarsInTemplate)(r)}(n,r),t&&t(o),o)},setTrackByIndex:function(e){s.setTrackByIndex(e)},getCurrentTrackIndex:function(){return s.getCurrentTrackIndex()},getBitrateList:function(){var e=s.getTracks(),n=0;return e.map(function(e){var t=new l.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(),s=(0,o.default)(n).create({adapter:e.adapter,baseURLController:e.baseURLController,stream:e.stream,timelineConverter:e.timelineConverter}),t}s.__dashjs_factory_name="ThumbnailController",n.default=i.default.getClassFactory(s),t.exports=n.default},{109:109,203:203,222:222,232:232,49:49,81:81}],203:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var v=r(e(109)),y=r(e(63)),i=r(e(49)),T=r(e(233)),S=r(e(218)),A=e(81),I=r(e(61)),b=r(e(205)),R=r(e(157)),D=["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.dashMetrics,a=e.mediaPlayerModel,o=e.errHandler,f=(0,S.default)(n).getInstance(),d=void 0,c=void 0,h=void 0,p=void 0,g=void 0;function _(){E(),h=(0,R.default)(n).create({}),g=(0,b.default)(n).getInstance(),(p=(0,I.default)(n).getInstance()).setConfig({baseURLController:s,dashMetrics:i,mediaPlayerModel:a,errHandler:o}),function(){if(!r||!u)return;var e=r.getStreamInfo();if(!e)return;var t=u.getMediaInfoForType(e,v.default.IMAGE);if(!t)return;var n=u.getVoRepresentations(t);n&&0<n.length&&n.forEach(function(e){e.segmentInfoType===y.default.SEGMENT_TEMPLATE&&0<e.segmentDuration&&e.media&&m(e),e.segmentInfoType===y.default.SEGMENT_BASE&&m(e,!0)});0<d.length&&(d.sort(function(e,t){return e.bitrate-t.bitrate}),c=d.length-1)}()}function m(e,t){var n=new T.default;n.id=e.id,n.bitrate=e.bandwidth,n.width=e.width,n.height=e.height,n.tilesHor=1,n.tilesVert=1,e.essentialProperties&&e.essentialProperties.forEach(function(e){if(0<=D.indexOf(e.schemeIdUri)&&e.value){var t=e.value.split("x");2!==t.length||isNaN(t[0])||isNaN(t[1])||(n.tilesHor=parseInt(t[0],10),n.tilesVert=parseInt(t[1],10))}}),t?p.loadSegments(e,v.default.IMAGE,e.indexRange,{},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,A.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),n.segmentDuration=e[0].duration,n.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 h.load({method:"get",url:e.url,request:{range:i.mediaRange,responseType:"arraybuffer"},onload:function(e){var t=g.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}})}}):(n.startNumber=e.startNumber,n.segmentDuration=e.segmentDuration,n.timescale=e.timescale,n.templateUrl=function(e){var t=f.isRelative(e.media)?f.resolve(e.media,s.resolve(e.path).url):e.media;return t?(0,A.replaceIDForTemplate)(t,e.id):""}(e)),0<n.tilesHor&&0<n.tilesVert&&(n.widthPerTile=n.width/n.tilesHor,n.heightPerTile=n.height/n.tilesVert,d.push(n))}function E(){d=[],c=-1}return t={initialize:_,getTracks:function(){return d},reset:E,setTrackByIndex:function(e){d&&0!==d.length&&(e>=d.length&&(e=d.length-1),c=e)},getCurrentTrack:function(){return c<0?null:d[c]},getCurrentTrackIndex:function(){return c}},_(),t}n.THUMBNAILS_SCHEME_ID_URIS=D,a.__dashjs_factory_name="ThumbnailTracks",n.default=i.default.getClassFactory(a)},{109:109,157:157,205:205,218:218,233:233,49:49,61:61,63:63,81:81}],204:[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(53)),l=r(e(48)),f=r(e(56)),d=r(e(114)),c=r(e(221)),h=r(e(220)),i=r(e(49)),p=r(e(223)),g=e(216);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},{114:114,216:216,220:220,221:221,223:223,48:48,49:49,53:53,56:56}],205:[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(212)),a=r(e(49)),s=r(e(9)),c=r(e(228));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,m=void 0,E=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],b=I.getChildBox("tfhd"),R=I.getChildBox("tfdt");l=R.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,E=(b.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:b.default_sample_duration,u=void 0!==d.sample_size?d.sample_size:b.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+E,size:u,subSizes:[u]};if(M)for(_=0;_<M.length;_++){var O=M[_];if(y<O.entry_count-1&&T<c&&(y++,T+=O.entries[y].sample_delta),c==T){w.subSizes=[];var N=O.entries[y];for(m=0;m<N.subsample_count;m++)w.subSizes.push(N.subsamples[m].subsample_size)}}f.push(w),E+=u,l+=o}}v=l-R.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},{212:212,228:228,47:47,49:49,9:9}],206:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r,i=e(49),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},{49:49}],207:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r,i=e(49),a=(r=i)&&r.__esModule?r:{default:r},o=e(216);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},{216:216,49:49}],208:[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(49)),f=r(e(47)),d=r(e(109)),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",m="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,m)){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,m)){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},{109:109,47:47,49:49}],209:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r,i=e(49),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},{49:49}],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(48)),a=r(e(56)),o=r(e(49));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},{48:48,49:49,56:56}],211:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r,i=e(49),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},{49:49}],212:[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(227)),a=r(e(49));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},{227:227,49:49}],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(49)),a=r(e(109));function o(e){var r=(e=e||{}).timelineConverter,i=e.streamProcessor;return{getLiveEdge:function(){!function(){if(!(r&&r.hasOwnProperty("getExpectedLiveEdge")&&i&&i.hasOwnProperty("getRepresentationInfo")))throw new Error(a.default.MISSING_CONFIG_ERROR)}();var e=i.getRepresentationInfo(),t=e.DVRWindow?e.DVRWindow.end:0,n=t;return e.useCalculatedLiveEdgeTime&&(n=r.getExpectedLiveEdge(),r.setClientTimeOffset(n-t)),n},reset:function(){i=r=null}}}o.__dashjs_factory_name="LiveEdgeFinder",n.default=i.default.getClassFactory(o),t.exports=n.default},{109:109,49:49}],214:[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(49)),a=r(e(11));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},{11:11,49:49}],215:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r,i=e(49),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},{49:49}],216:[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(109),a=(r=i)&&r.__esModule?r:{default:r}},{109:109}],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(49)),a=r(e(47)),o=r(e(48)),S=r(e(56)),A=e(16);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 _,m=g.getMediaTimeEvents();for(l=0;l<m.length;l++){var E=(0,A.generateISD)(g,m[l],function(e){a=e});E.contents.some(function(e){return e.contents.length})&&(s=m[l]+t<n?n:m[l]+t)<(u=m[l+1]+t>r?r:m[l+1]+t)&&o.push({start:s,end:u,type:"html",cueID:(void 0,_="cue_TTML_"+T,T++,_),isd:E,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},{16:16,47:47,48:48,49:49,56:56}],218:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r,i=e(49),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)},resolve:function(e,t){return n(e,t)}}}o.__dashjs_factory_name="URLUtils",n.default=a.default.getSingletonFactory(o),t.exports=n.default},{49:49}],219:[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(49)),a=r(e(47));function o(){var e=this.context,t=void 0,c=void 0,h=void 0,p=void 0,g=void 0,r=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 m(e){var t=e.split(p),n=t[1].split(r);return n.shift(),t[1]=n[0],n.shift(),{cuePoints:t,styles:function(e){var n={};return e.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}(n)}}function E(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=m(a),s=o.cuePoints,u=o.styles,l=E(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,r=/\s\b/g,t}o.__dashjs_factory_name="VTTParser",n.default=i.default.getSingletonFactory(o),t.exports=n.default},{47:47,49:49}],220:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r,i=e(49),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},{49:49}],221:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r,i=e(49),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]}(function(e){var t=[];return 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)})}(e))}}}o.__dashjs_factory_name="DVBSelector",n.default=a.default.getClassFactory(o),t.exports=n.default},{49:49}],222:[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},{}],223:[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},{}],224:[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},{}],225:[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.action=r.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=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}r.ACTION_DOWNLOAD="download",r.ACTION_COMPLETE="complete",n.default=r,t.exports=n.default},{}],226:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r,i=e(225),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),this.url=e||null,this.checkForExistenceOnly=!0}n.default=a,t.exports=n.default},{225:225}],227:[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},{}],228:[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},{}],229:[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},{}],230:[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(109)),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(225)).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},{109:109,225:225}],231:[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},{}],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.url=null,this.width=null,this.height=null,this.x=null,this.y=null},t.exports=n.default},{}],233:[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},{}],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.t=null,this.xywh=null,this.track=null,this.id=null,this.s=null,this.r=null},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.t=null,this.level=null},t.exports=n.default},{}],236:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r,i=e(115),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},{115:115}],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.time=null,this.range=null,this.manifestInfo=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.time=null,this.droppedFrames=null},t.exports=n.default},{}],239:[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._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=[]}},{}],240:[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}},{}],241:[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},{}],242:[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},{}],243:[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},{}],244:[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]);
//# sourceMappingURL=dash.all.min.js.map