FV Flowplayer Video Player - Version 6.6.1

Version Description

  • FV Player Pro 0.9.17 and 0.9.17.1 users - make sure you update FV Player Pro before this plugin!
Download this release

Release Info

Developer FolioVision
Plugin Icon 128x128 FV Flowplayer Video Player
Version 6.6.1
Comparing to
See all releases

Code changes from version 6.5.2 to 6.6.1

controller/editor.php CHANGED
@@ -91,8 +91,7 @@ function fv_wp_flowplayer_edit_form_after_editor( ) {
91
92
global $FV_Player_VAST ;
93
if( isset($FV_Player_VAST ) && $FV_Player_VAST ) {
94
- // todo: there should be a better way than this
95
- add_action('admin_footer', array( $FV_Player_VAST , 'styles' ) );
96
add_action('admin_footer', array( $FV_Player_VAST , 'func__wp_enqueue_scripts' ) );
97
}
98
91
92
global $FV_Player_VAST ;
93
if( isset($FV_Player_VAST ) && $FV_Player_VAST ) {
94
+ // todo: there should be a better way than this
95
add_action('admin_footer', array( $FV_Player_VAST , 'func__wp_enqueue_scripts' ) );
96
}
97
css/flowplayer-beta.css CHANGED
@@ -536,7 +536,7 @@
536
transition: opacity .1s;
537
filter: alpha(opacity=0);
538
opacity: 0; }
539
- .flowplayer.fp-ui-shown .fp-ui, .flowplayer.is-paused .fp-ui, .flowplayer.is-mouseover .fp-ui, .flowplayer.is-loading .fp-ui {
540
/*background-image: -webkit-gradient(linear, left bottom, left top, from(rgba(0, 0, 0, 0.25)), color-stop(15%, transparent));
541
background-image: -webkit-linear-gradient(bottom, rgba(0, 0, 0, 0.25), transparent 15%);
542
background-image: linear-gradient(to top, rgba(0, 0, 0, 0.25), transparent 15%);*/
536
transition: opacity .1s;
537
filter: alpha(opacity=0);
538
opacity: 0; }
539
+ .flowplayer.fp-ui-shown .fp-ui, .flowplayer.is-mouseover .fp-ui, .flowplayer.is-loading .fp-ui, .is-splash.flowplayer .fp-player .fp-ui, .is-paused.flowplayer .fp-player .fp-ui,#content .is-paused.flowplayer .fp-player .fp-ui,#content .is-splash.flowplayer .fp-player .fp-ui {
540
/*background-image: -webkit-gradient(linear, left bottom, left top, from(rgba(0, 0, 0, 0.25)), color-stop(15%, transparent));
541
background-image: -webkit-linear-gradient(bottom, rgba(0, 0, 0, 0.25), transparent 15%);
542
background-image: linear-gradient(to top, rgba(0, 0, 0, 0.25), transparent 15%);*/
css/sitemap-index.xsl ADDED
@@ -0,0 +1,46 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <xsl:stylesheet version="2.0"
3
+ xmlns:html="http://www.w3.org/TR/REC-html40"
4
+ xmlns:sitemap="http://www.sitemaps.org/schemas/sitemap/0.9"
5
+ sitemap:news="http://www.google.com/schemas/sitemap-news/0.9"
6
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
7
+ <xsl:output method="html" version="1.0" encoding="UTF-8" indent="yes"/>
8
+ <xsl:template match="/">
9
+ <html xmlns="http://www.w3.org/1999/xhtml">
10
+ <head>
11
+ <title>FV Player Video Sitemap - Index</title>
12
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
13
+ <style type="text/css">body{font-family:"Lucida Grande","Lucida Sans Unicode",Tahoma,Verdana,sans-serif;font-size:13px}#header,#footer{padding:2px;margin:10px;font-size:8pt;color:gray}a{color:black}td{font-size:11px}th{text-align:left;padding-right:30px;font-size:11px}tr.high{background-color:whitesmoke}#footer img{vertical-align:bottom}</style>
14
+ </head>
15
+ <body>
16
+ <h1><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAVCAMAAABrN94UAAAAnFBMVEUAAADCCjPCCjPCCjPCCjPCCjPCCjPCCjPCCjPCCjPCCjPCCjPCCjPCCjPCCjPCCjPCCjPCCjPCCjPCCjPCCjPCCjPCCjPCCjPCCjPCCjPCCjPCCjPCCjPCCjPCCjPCCjPCCjPCCjPCCjPCCjPCCjPCCjPCCjPGGkHKK07OO1zWXHfabIXefJLnna3rrbvvvsnzztb33uT77/H///8eueH7AAAAJnRSTlMADA8SFRgnLTAzS1pdYGZscnuKkJmcqKuxur3Dz9Lb3uHw8/b5/LxE5h0AAAC4SURBVBgZBcHBcsIgFADA5QFNos60p/7/B/bQcdSCIaG7AAAAEgCx6CeABOm6rRvgr7XniYTrdwUA4+dO4KsCAOUThXqBrcwHwPbxFtSEjwIAlWCB0B8ArBQyLtlS5La7pdehEmS8dv01ZCWNg0wQAEORDSSCE+AcqZY5cBIcAIYaY2IQHADGzA4YBB3AHOYOncIOrUFrwE6wPwEA3m8C9wMAOH+RIN+WdQX01h8DCYAlzAYAAADAP7/SRtpaCbGoAAAAAElFTkSuQmCC" alt="FV Player" title="FV Player" /> FV Player Video Sitemap - Index</h1>
17
+ <div id="header">
18
+
19
+ </div>
20
+ <div id="content">
21
+ <table cellpadding="5">
22
+ <tr class="high">
23
+ <th>#</th>
24
+ <th>XML Sitemap</th>
25
+ <th>Last Changed</th>
26
+ </tr>
27
+ <xsl:variable name="lower" select="'abcdefghijklmnopqrstuvwxyz'"/>
28
+ <xsl:variable name="upper" select="'ABCDEFGHIJKLMNOPQRSTUVWXYZ'"/>
29
+ <xsl:for-each select="sitemap:sitemapindex/sitemap:sitemap">
30
+ <tr><xsl:if test="position() mod 2 != 1"><xsl:attribute name="class">high</xsl:attribute></xsl:if>
31
+ <td><xsl:value-of select="position()"/></td>
32
+ <td><xsl:variable name="itemURL"><xsl:value-of select="sitemap:loc"/></xsl:variable>
33
+ <a href="{$itemURL}"><xsl:value-of select="sitemap:loc"/></a>
34
+ </td>
35
+ <td><xsl:value-of select="concat(substring(sitemap:lastmod,0,11),concat(' ', substring(sitemap:lastmod,12,5)))"/></td>
36
+ </tr>
37
+ </xsl:for-each>
38
+ </table>
39
+ </div>
40
+ <div id="footer">
41
+ <p>Generated by <a href="https://foliovision.com/player" title="FV Player">FV Player</a></p>
42
+ </div>
43
+ </body>
44
+ </html>
45
+ </xsl:template>
46
+ </xsl:stylesheet>
css/sitemap-video.xsl ADDED
@@ -0,0 +1,152 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <xsl:stylesheet version="2.0"
3
+ xmlns:html="http://www.w3.org/TR/html5/"
4
+ xmlns:sitemap="http://www.sitemaps.org/schemas/sitemap/0.9"
5
+ xmlns:video="http://www.google.com/schemas/sitemap-video/1.1"
6
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
7
+ <xsl:output method="html" version="1.0" encoding="UTF-8" indent="yes"/>
8
+
9
+ <xsl:template match="/">
10
+ <html>
11
+ <head>
12
+ <title>FV Player Video Sitemap</title>
13
+ <meta charset="UTF-8" />
14
+ <style type="text/css">
15
+ body {
16
+ font-family: Helvetica, Arial, sans-serif;
17
+ font-size: 12px;
18
+ color: #545353;
19
+ }
20
+ a img {
21
+ border: none;
22
+ }
23
+ table {
24
+ border: none;
25
+ border-collapse: collapse;
26
+ }
27
+ #sitemap tbody tr:nth-child(odd) {
28
+ background-color: #eee;
29
+ }
30
+ #sitemap tbody tr:hover {
31
+ background-color: #ccc;
32
+ }
33
+ #sitemap tbody tr:hover td, #sitemap tbody tr:hover td a {
34
+ color: #000;
35
+ }
36
+ #content {
37
+ margin: 0 auto;
38
+ width: 1000px;
39
+ }
40
+ p.expl {
41
+ margin: 10px 0px;
42
+ line-height: 1.3em;
43
+ }
44
+ p.expl a {
45
+ color: #da3114;
46
+ }
47
+ a {
48
+ color: #000;
49
+ text-decoration: none;
50
+ }
51
+ a:visited {
52
+ color: #777;
53
+ }
54
+ a:hover {
55
+ text-decoration: underline;
56
+ }
57
+ td {
58
+ font-size:11px;
59
+ padding: 5px 15px 5px 0;
60
+ vertical-align: top;
61
+ }
62
+ td img {
63
+ padding: 0 5px;
64
+ }
65
+ th {
66
+ text-align:left;
67
+ padding-right:30px;
68
+ font-size:11px;
69
+ }
70
+ thead th {
71
+ border-bottom: 1px solid #000;
72
+ }
73
+ </style>
74
+ </head>
75
+ <body>
76
+ <div id="content">
77
+ <h1>FV Player Video Sitemap</h1>
78
+ <p class="expl">
79
+ This sitemap contains <xsl:value-of select="count(sitemap:urlset/sitemap:url)"/> URLs.
80
+ </p>
81
+ <div class="content">
82
+ <table id="sitemap">
83
+ <thead>
84
+ <tr>
85
+ <th width="10%">Video</th>
86
+ <th width="20%">Title</th>
87
+ <th width="25%">Description</th>
88
+ <th width="10%">Category</th>
89
+ <th width="15%">Pub Date</th>
90
+ </tr>
91
+ </thead>
92
+ <tbody>
93
+ <xsl:for-each select="sitemap:urlset/sitemap:url">
94
+ <tr>
95
+ <xsl:if test="position() mod 2 = 1">
96
+ <xsl:attribute name="class">odd</xsl:attribute>
97
+ </xsl:if>
98
+
99
+ <td>
100
+ <xsl:variable name="thumbURL">
101
+ <xsl:value-of select="video:video/video:thumbnail_loc"/>
102
+ </xsl:variable>
103
+
104
+ <xsl:variable name="flvURL">
105
+ <xsl:value-of select="video:video/video:player_loc"/>
106
+ </xsl:variable>
107
+
108
+ <img src="{$thumbURL}" width="100" />
109
+ </td>
110
+
111
+ <td>
112
+ <xsl:variable name="itemURL">
113
+ <xsl:value-of select="sitemap:loc"/>
114
+ </xsl:variable>
115
+ <a href="{$itemURL}">
116
+ <strong><xsl:value-of disable-output-escaping="yes" select="video:video/video:title"/></strong>
117
+ </a>
118
+ </td>
119
+
120
+ <td>
121
+ <xsl:variable name="desc">
122
+ <xsl:value-of disable-output-escaping="yes" select="video:video/video:description"/>
123
+ </xsl:variable>
124
+ <xsl:choose>
125
+ <xsl:when test="string-length($desc) &lt; 200">
126
+ <xsl:value-of select="$desc"/>
127
+ </xsl:when>
128
+ <xsl:otherwise>
129
+ <xsl:value-of select="concat(substring($desc,1,200),' ...')"/>
130
+ </xsl:otherwise>
131
+ </xsl:choose>
132
+ </td>
133
+
134
+ <td>
135
+ <xsl:value-of select="video:video/video:category"/>
136
+ </td>
137
+
138
+ <td>
139
+ <xsl:value-of select="concat(substring(video:video/video:publication_date,0,11),concat(' ', substring(video:video/video:publication_date,12,5)))"/>
140
+ </td>
141
+ </tr>
142
+ </xsl:for-each>
143
+ </tbody>
144
+ </table>
145
+ </div>
146
+
147
+ </div>
148
+ </body>
149
+ </html>
150
+ </xsl:template>
151
+
152
+ </xsl:stylesheet>
flowplayer-beta/embed.min.js CHANGED
@@ -1 +1 @@
1
- !function n(e,t,r){function o(u,c){if(!t[u]){if(!e[u]){var f="function"==typeof require&&require;if(!c&&f)return f(u,!0);if(i)return i(u,!0);var s=new Error("Cannot find module '"+u+"'");throw s.code="MODULE_NOT_FOUND",s}var a=t[u]={exports:{}};e[u][0].call(a.exports,function(n){var t=e[u][1][n];return o(t?t:n)},a,a.exports,n,e,t,r)}return t[u].exports}for(var i="function"==typeof require&&require,u=0;u<r.length;u++)o(r[u]);return o}({1:[function(n,e,t){function r(n,e){"use strict";var t=n.common.createElement("div");t.setAttribute("data-origin",e.e.href),e.e.parentNode.replaceChild(t,e.e),e.c.e=1,e.c.swf=e.c.swf||p,e.c.swfHls=e.c.swfHls||m,n(t,e.c)}function o(n){"use strict";return"function"==typeof window.requirejs?n():void a("https://cdnjs.cloudflare.com/ajax/libs/require.js/2.1.16/require.min.js",n)}function i(n,e){"use strict";o(function(){requirejs([n],e)})}function u(n){"use strict";var e=n.common.createElement("div",{className:"flowplayer"});return e.style.display="none",document.body.appendChild(e),e}function c(n){"use strict";var e=u(n),t=0===window.getComputedStyle(e).getPropertyValue("counter-increment").indexOf("flowplayer");return n.common.removeNode(e),t}function f(n,e){"use strict";return c(n)?e(n):(document.head.appendChild(n.common.createElement("link",{rel:"stylesheet",href:h})),void e(n))}var s=window._fpes,a=n("scriptjs"),l="//releases.flowplayer.org/7.2.4/commercial",d=l+"/flowplayer.min.js",p=l+"/flowplayer.swf",m=l+"/flowplayerhls.swf",h=l+"/skin/functional.css";s.forEach(function(n){"use strict";i(n.l||d,function(e){f(e,function(e){r(e,n)})})})},{scriptjs:2}],2:[function(n,e,t){!function(n,t){"undefined"!=typeof e&&e.exports?e.exports=t():"function"==typeof define&&define.amd?define(t):this[n]=t()}("$script",function(){function n(n,e){for(var t=0,r=n.length;r>t;++t)if(!e(n[t]))return f;return 1}function e(e,t){n(e,function(n){return!t(n)})}function t(i,u,c){function f(n){return n.call?n():d[n]}function a(){if(!--w){d[y]=1,v&&v();for(var t in m)n(t.split("|"),f)&&!e(m[t],f)&&(m[t]=[])}}i=i[s]?i:[i];var l=u&&u.call,v=l?u:c,y=l?i.join(""):u,w=i.length;return setTimeout(function(){e(i,function n(e,t){return null===e?a():(t||/^https?:\/\//.test(e)||!o||(e=-1===e.indexOf(".js")?o+e+".js":o+e),h[e]?(y&&(p[y]=1),2==h[e]?a():setTimeout(function(){n(e,!0)},0)):(h[e]=1,y&&(p[y]=1),void r(e,a)))})},0),t}function r(n,e){var t,r=u.createElement("script");r.onload=r.onerror=r[l]=function(){r[a]&&!/^c|loade/.test(r[a])||t||(r.onload=r[l]=null,t=1,h[n]=2,e())},r.async=1,r.src=i?n+(-1===n.indexOf("?")?"?":"&")+i:n,c.insertBefore(r,c.lastChild)}var o,i,u=document,c=u.getElementsByTagName("head")[0],f=!1,s="push",a="readyState",l="onreadystatechange",d={},p={},m={},h={};return t.get=r,t.order=function(n,e,r){!function o(i){i=n.shift(),n.length?t(i,o):t(i,e,r)}()},t.path=function(n){o=n},t.urlArgs=function(n){i=n},t.ready=function(r,o,i){r=r[s]?r:[r];var u=[];return!e(r,function(n){d[n]||u[s](n)})&&n(r,function(n){return d[n]})?o():!function(n){m[n]=m[n]||[],m[n][s](o),i&&i(u)}(r.join("|")),t},t.done=function(n){t([null],n)},t})},{}]},{},[1]);
1
+ !function n(e,t,r){function o(u,c){if(!t[u]){if(!e[u]){var f="function"==typeof require&&require;if(!c&&f)return f(u,!0);if(i)return i(u,!0);var s=new Error("Cannot find module '"+u+"'");throw s.code="MODULE_NOT_FOUND",s}var a=t[u]={exports:{}};e[u][0].call(a.exports,function(n){var t=e[u][1][n];return o(t?t:n)},a,a.exports,n,e,t,r)}return t[u].exports}for(var i="function"==typeof require&&require,u=0;u<r.length;u++)o(r[u]);return o}({1:[function(n,e,t){function r(n,e){"use strict";var t=n.common.createElement("div");t.setAttribute("data-origin",e.e.href),e.e.parentNode.replaceChild(t,e.e),e.c.e=1,e.c.swf=e.c.swf||p,e.c.swfHls=e.c.swfHls||m,n(t,e.c)}function o(n){"use strict";return"function"==typeof window.requirejs?n():void a("https://cdnjs.cloudflare.com/ajax/libs/require.js/2.1.16/require.min.js",n)}function i(n,e){"use strict";o(function(){requirejs([n],e)})}function u(n){"use strict";var e=n.common.createElement("div",{className:"flowplayer"});return e.style.display="none",document.body.appendChild(e),e}function c(n){"use strict";var e=u(n),t=0===window.getComputedStyle(e).getPropertyValue("counter-increment").indexOf("flowplayer");return n.common.removeNode(e),t}function f(n,e){"use strict";return c(n)?e(n):(document.head.appendChild(n.common.createElement("link",{rel:"stylesheet",href:h})),void e(n))}var s=window._fpes,a=n("scriptjs"),l="//releases.flowplayer.org/7.2.6/commercial",d=l+"/flowplayer.min.js",p=l+"/flowplayer.swf",m=l+"/flowplayerhls.swf",h=l+"/skin/functional.css";s.forEach(function(n){"use strict";i(n.l||d,function(e){f(e,function(e){r(e,n)})})})},{scriptjs:2}],2:[function(n,e,t){!function(n,t){"undefined"!=typeof e&&e.exports?e.exports=t():"function"==typeof define&&define.amd?define(t):this[n]=t()}("$script",function(){function n(n,e){for(var t=0,r=n.length;r>t;++t)if(!e(n[t]))return f;return 1}function e(e,t){n(e,function(n){return!t(n)})}function t(i,u,c){function f(n){return n.call?n():d[n]}function a(){if(!--w){d[y]=1,v&&v();for(var t in m)n(t.split("|"),f)&&!e(m[t],f)&&(m[t]=[])}}i=i[s]?i:[i];var l=u&&u.call,v=l?u:c,y=l?i.join(""):u,w=i.length;return setTimeout(function(){e(i,function n(e,t){return null===e?a():(t||/^https?:\/\//.test(e)||!o||(e=-1===e.indexOf(".js")?o+e+".js":o+e),h[e]?(y&&(p[y]=1),2==h[e]?a():setTimeout(function(){n(e,!0)},0)):(h[e]=1,y&&(p[y]=1),void r(e,a)))})},0),t}function r(n,e){var t,r=u.createElement("script");r.onload=r.onerror=r[l]=function(){r[a]&&!/^c|loade/.test(r[a])||t||(r.onload=r[l]=null,t=1,h[n]=2,e())},r.async=1,r.src=i?n+(-1===n.indexOf("?")?"?":"&")+i:n,c.insertBefore(r,c.lastChild)}var o,i,u=document,c=u.getElementsByTagName("head")[0],f=!1,s="push",a="readyState",l="onreadystatechange",d={},p={},m={},h={};return t.get=r,t.order=function(n,e,r){!function o(i){i=n.shift(),n.length?t(i,o):t(i,e,r)}()},t.path=function(n){o=n},t.urlArgs=function(n){i=n},t.ready=function(r,o,i){r=r[s]?r:[r];var u=[];return!e(r,function(n){d[n]||u[s](n)})&&n(r,function(n){return d[n]})?o():!function(n){m[n]=m[n]||[],m[n][s](o),i&&i(u)}(r.join("|")),t},t.done=function(n){t([null],n)},t})},{}]},{},[1]);
flowplayer-beta/flowplayer.dashjs.min.js CHANGED
@@ -1,41 +1,625 @@
1
/*!
2
3
- MPEG-DASH engine plugin for Flowplayer HTML5
4
5
- Copyright (c) 2015-2016, Flowplayer Oy
6
7
Released under the MIT License:
8
http://www.opensource.org/licenses/mit-license.php
9
10
- Includes hls.js
11
- Copyright (c) 2015 Dailymotion (http://www.dailymotion.com)
12
- https://github.com/dailymotion/hls.js/blob/master/LICENSE
13
-
14
- Includes es5.js
15
- https://github.com/inexorabletash/polyfill/blob/master/es5.js
16
- for compatibility with legacy browsers
17
18
Requires Flowplayer HTML5 version 6.x
19
- v1.0.0-8-g70e6eb8
20
21
*/
22
- /*@cc_on @*/
23
- /*@
24
- @if (@_jscript_version > 10)
25
- @*/
26
- !function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return e[r].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){e.exports=n(188)},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t,n,r){var i=o(r);!i[e]&&t&&(i[e]={instance:t,override:n})}function t(e,t){for(var n in l){var r=l[n];if(r.context===e&&r.name===t)return r.instance}return null}function n(e,t,n){for(var r in l){var i=l[r];if(i.context===e&&i.name===t)return void(l[r].instance=n)}l.push({name:t,context:e,instance:n})}function r(e){return function(t){return void 0===t&&(t={}),{create:function(){return a(e.__dashjs_factory_name,e.apply({context:t},arguments),t,arguments)}}}}function i(e){return function(n){var r=void 0;return void 0===n&&(n={}),{getInstance:function(){return r||(r=t(n,e.__dashjs_factory_name)),r||(r=a(e.__dashjs_factory_name,e.apply({context:n},arguments),n,arguments),l.push({name:e.__dashjs_factory_name,context:n,instance:r})),r}}}}function a(e,t,n,r){var i=o(n),a=i[e];if(a){var u=a.instance;if(!a.override)return u.apply({context:n,factory:s},r);u=u.apply({context:n,factory:s,parent:t},r);for(var l in u)t.hasOwnProperty(l)&&(t[l]=u[l])}return t}function o(e){var t=void 0;return u.forEach(function(n){n===e&&(t=n)}),t||(t=u.push(e)),t}var s=void 0,u=[],l=[];return s={extend:e,getSingletonInstance:t,setSingletonInstance:n,getSingletonFactory:i,getClassFactory:r}}();t["default"]=n,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof t?"undefined":o(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)}var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};Object.defineProperty(t,"__esModule",{value:!0});var s=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}},u=n(75),l=r(u),f=function(e){function t(){i(this,t),s(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return a(t,e),t}(l["default"]),d=new f;t["default"]=d,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(e,t,n){var i=arguments.length<=3||void 0===arguments[3]?s:arguments[3];if(!e)throw new Error("event type cannot be null or undefined");if(!t||"function"!=typeof t)throw new Error("listener must be a function: "+t);if(!(r(e,t,n)>=0)){a[e]=a[e]||[];var o={callback:t,scope:n,priority:i},u=a[e].some(function(t,n){if(i>t.priority)return a[e].splice(n,0,o),!0});u||a[e].push(o)}}function t(e,t,n){if(e&&t&&a[e]){var i=r(e,t,n);i<0||a[e].splice(i,1)}}function n(e,t){if(e&&a[e]){if(t=t||{},t.hasOwnProperty("type"))throw new Error("'type' is a reserved word for event dispatching");t.type=e,a[e].forEach(function(e){return e.callback.call(e.scope,t)})}}function r(e,t,n){var r=-1;return a[e]?(a[e].some(function(e,i){if(e.callback===t&&(!n||n===e.scope))return r=i,!0}),r):r}function i(){a={}}var a={},o={on:e,off:t,trigger:n,reset:i};return o}Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),o=r(a),s=0,u=5e3;i.__dashjs_factory_name="EventBus";var l=o["default"].getSingletonFactory(i);l.EVENT_PRIORITY_LOW=s,l.EVENT_PRIORITY_HIGH=u,t["default"]=l,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(){f=!0,d=!0,c=(new Date).getTime()}function t(e){d=e}function n(e){f=e}function r(){return f}function i(){var e="",t=null;d&&(t=(new Date).getTime(),e+="["+(t-c)+"]"),e.length>0&&(e+=" "),Array.apply(null,arguments).forEach(function(t){e+=t+" "}),f&&console.log(e),s.trigger(u["default"].LOG,{message:e})}var a=this.context,s=(0,o["default"])(a).getInstance(),l=void 0,f=void 0,d=void 0,c=void 0;return l={log:i,setLogTimestampVisible:t,setLogToBrowserConsole:n,getLogToBrowserConsole:r},e(),l}Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),o=r(a),s=n(2),u=r(s),l=n(1),f=r(l);i.__dashjs_factory_name="Debug",t["default"]=f["default"].getSingletonFactory(i),e.exports=t["default"]},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}function a(){function e(){var e,t;Re=[],Ie=!1,Se=!0,be=!0,He=!1,Ye=!1,Oe={enabled:!0,ttl:d},Pe={enabled:!0,ttl:c},Ae=f,Me=void 0,Ce=h,De=v,we=NaN,Ne=y,Le=E,xe=T,Fe=S,Ue=g,Be=p,Ke=D,qe=O,e={},i(e,u.HTTPRequest.MPD_TYPE,A),i(e,u.HTTPRequest.XLINK_EXPANSION_TYPE,b),i(e,u.HTTPRequest.MEDIA_SEGMENT_TYPE,I),i(e,u.HTTPRequest.INIT_SEGMENT_TYPE,I),i(e,u.HTTPRequest.BITSTREAM_SWITCHING_SEGMENT_TYPE,I),i(e,u.HTTPRequest.INDEX_SEGMENT_TYPE,I),i(e,u.HTTPRequest.OTHER_TYPE,I),ke=e,t={},i(t,u.HTTPRequest.MPD_TYPE,M),i(t,u.HTTPRequest.XLINK_EXPANSION_TYPE,C),i(t,u.HTTPRequest.MEDIA_SEGMENT_TYPE,R),i(t,u.HTTPRequest.INIT_SEGMENT_TYPE,R),i(t,u.HTTPRequest.BITSTREAM_SWITCHING_SEGMENT_TYPE,R),i(t,u.HTTPRequest.INDEX_SEGMENT_TYPE,R),i(t,u.HTTPRequest.OTHER_TYPE,R),je=t}function t(e){He=e}function n(){return He}function r(e){Ue=e}function a(){return Ue}function o(e){Be=e}function s(){return Be}function l(e){we=e}function P(){return isNaN(we)?Ye?_:m:we}function w(e){Ne=e}function N(){return Ne}function L(e){Le=e}function x(){return Le}function F(e){xe=e}function U(){return xe}function B(e){Fe=e}function k(){return Fe}function j(e){Ce=e}function K(){return Ce}function H(e,t){Oe.enabled=e,void 0===t||isNaN(t)||"number"!=typeof t||(Oe.ttl=t)}function q(){return Oe}function Y(e,t){Pe.enabled=e,void 0===t||isNaN(t)||"number"!=typeof t||(Pe.ttl=t)}function G(){return Pe}function V(e){De=e}function z(){return De}function W(e){ke[u.HTTPRequest.MEDIA_SEGMENT_TYPE]=e}function Q(e,t){ke[e]=t}function X(){return ke[u.HTTPRequest.MEDIA_SEGMENT_TYPE]}function Z(e){return ke[e]}function J(e){je[u.HTTPRequest.MEDIA_SEGMENT_TYPE]=e}function $(e,t){je[e]=t}function ee(){return je[u.HTTPRequest.MEDIA_SEGMENT_TYPE]}function te(e){return je[e]}function ne(e){Ke=e}function re(){return Ke}function ie(e){be=e}function ae(){return be}function oe(e){Ae=e}function se(e){Me=e}function ue(){return Ae}function le(){return Me}function fe(e){Se=e}function de(){return Se}function ce(e){Ie=e}function ge(){return Ie}function pe(e){Re=e}function he(){return Re}function ve(e){qe=!!e}function me(){return qe}function _e(){return Ye}function ye(e){Ye=e}function Ee(){}var Te=void 0,Se=void 0,Ie=void 0,Re=void 0,Ae=void 0,Me=void 0,be=void 0,Ce=void 0,De=void 0,Oe=void 0,Pe=void 0,we=void 0,Ne=void 0,Le=void 0,xe=void 0,Fe=void 0,Ue=void 0,Be=void 0,ke=void 0,je=void 0,Ke=void 0,He=void 0,qe=void 0,Ye=void 0;return Te={setBufferOccupancyABREnabled:t,getBufferOccupancyABREnabled:n,setBandwidthSafetyFactor:r,getBandwidthSafetyFactor:a,setAbandonLoadTimeout:o,getAbandonLoadTimeout:s,setLastBitrateCachingInfo:H,getLastBitrateCachingInfo:q,setLastMediaSettingsCachingInfo:Y,getLastMediaSettingsCachingInfo:G,setStableBufferTime:l,getStableBufferTime:P,setBufferTimeAtTopQuality:w,getBufferTimeAtTopQuality:N,setBufferTimeAtTopQualityLongForm:L,getBufferTimeAtTopQualityLongForm:x,setLongFormContentDurationThreshold:F,getLongFormContentDurationThreshold:U,setRichBufferThreshold:B,getRichBufferThreshold:k,setBufferToKeep:j,getBufferToKeep:K,setBufferPruningInterval:V,getBufferPruningInterval:z,setFragmentRetryAttempts:W,getFragmentRetryAttempts:X,setRetryAttemptsForType:Q,getRetryAttemptsForType:Z,setFragmentRetryInterval:J,getFragmentRetryInterval:ee,setRetryIntervalForType:$,getRetryIntervalForType:te,setWallclockTimeUpdateInterval:ne,getWallclockTimeUpdateInterval:re,setScheduleWhilePaused:ie,getScheduleWhilePaused:ae,getUseSuggestedPresentationDelay:ge,setUseSuggestedPresentationDelay:ce,setLiveDelayFragmentCount:oe,getLiveDelayFragmentCount:ue,getLiveDelay:le,setLiveDelay:se,setUseManifestDateHeaderTimeSource:fe,getUseManifestDateHeaderTimeSource:de,setUTCTimingSources:pe,getUTCTimingSources:he,setXHRWithCredentials:ve,getXHRWithCredentials:me,setFastSwitchEnabled:ye,getFastSwitchEnabled:_e,reset:Ee},e(),Te}Object.defineProperty(t,"__esModule",{value:!0});var o=n(1),s=r(o),u=n(7),l={scheme:"urn:mpeg:dash:utc:http-xsdate:2014",value:"http://time.akamai.com/?iso"},f=4,d=36e4,c=36e4,g=.9,p=1e4,h=30,v=30,m=12,_=20,y=30,E=60,T=600,S=20,I=3,R=1e3,A=3,M=500,b=1,C=500,D=50,O=!1;a.__dashjs_factory_name="MediaPlayerModel";var P=s["default"].getSingletonFactory(a);P.DEFAULT_UTC_TIMING_SOURCE=l,t["default"]=P,e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function i(e,t,r){n(this,i),this.code=e||null,this.message=t||null,this.data=r||null};t["default"]=r,e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function a(){n(this,a),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=function o(){n(this,o),this.s=null,this.d=null,this.b=[]};r.MPD_TYPE="MPD",r.XLINK_EXPANSION_TYPE="XLinkExpansion",r.INIT_SEGMENT_TYPE="InitializationSegment",r.INDEX_SEGMENT_TYPE="IndexSegment",r.MEDIA_SEGMENT_TYPE="MediaSegment",r.BITSTREAM_SWITCHING_SEGMENT_TYPE="BitstreamSwitchingSegment",r.OTHER_TYPE="other",t.HTTPRequest=r,t.HTTPRequestTrace=i},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t,n){var r=void 0===e?s:e,i=void 0===t?u:t,a=void 0===n?null:n,o={value:r,priority:i,reason:a};return o}Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),o=r(a),s=999,u=.5,l=1,f=0;i.__dashjs_factory_name="SwitchRequest";var d=o["default"].getClassFactory(i);d.NO_CHANGE=s,d.DEFAULT=u,d.STRONG=l,d.WEAK=f,t["default"]=d,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(){ce=0,ge=NaN,pe=null,me=null,ye=!1,he={},_e=(0,f["default"])($).getInstance()}function t(e){ve=e,re=de.getElement(),Z(),me=ve.manifestInfo.isDynamic,ge=ve.start,te.on(p["default"].DATA_UPDATE_COMPLETED,L,this),te.on(p["default"].LIVE_EDGE_SEARCH_COMPLETED,x,this),te.on(p["default"].BYTES_APPENDED,Q,this),te.on(p["default"].BUFFER_LEVEL_STATE_CHANGED,X,this),te.on(p["default"].PERIOD_SWITCH_STARTED,n,this),ye&&(ye=!1,l())}function n(e){e.fromStreamInfo&&he[e.fromStreamInfo.id]&&delete he[e.fromStreamInfo.id]}function r(){return C(!0)+ve.duration-m()}function i(){return m()>0}function a(){return ve.id}function s(){return ve.duration}function l(){if(re){re.autoplay=!0;var e=re.play();e&&"undefined"!=typeof Promise&&e instanceof Promise&&e["catch"](function(e){"NotAllowedError"===e.name&&te.trigger(p["default"].PLAYBACK_NOT_ALLOWED),ee("Caught pending play exception - continuing ("+e+")")})}else ye=!0}function d(){if(re)return re.paused}function g(){re&&(re.pause(),re.autoplay=!1)}function h(){if(re)return re.seeking}function v(e){de&&(ee("Requesting seek to time: "+e),de.setCurrentTime(e))}function m(){if(re)return re.currentTime}function y(){if(re)return re.playbackRate}function E(){if(re)return re.played}function T(){if(re)return re.ended}function S(){return me}function I(e){ge=e}function R(){return ge}function A(e,t){var n=le.getMpd(ue.getValue()),r=void 0,i=10;r=_e.getUseSuggestedPresentationDelay()&&n.hasOwnProperty("suggestedPresentationDelay")?n.suggestedPresentationDelay:_e.getLiveDelay()?_e.getLiveDelay():isNaN(e)?2*ve.manifestInfo.minBufferTime:e*_e.getLiveDelayFragmentCount();var a=Math.max(t-i,t/2);return Math.min(r,a)}function M(){de&&re&&(te.off(p["default"].DATA_UPDATE_COMPLETED,L,this),te.off(p["default"].BUFFER_LEVEL_STATE_CHANGED,X,this),te.off(p["default"].LIVE_EDGE_SEARCH_COMPLETED,x,this),te.off(p["default"].BYTES_APPENDED,Q,this),P(),J()),de=null,ve=null,re=null,me=null,e()}function b(e){e&&(e.streamController&&(ie=e.streamController),e.timelineConverter&&(ae=e.timelineConverter),e.metricsModel&&(oe=e.metricsModel),e.dashMetrics&&(se=e.dashMetrics),e.manifestModel&&(ue=e.manifestModel),e.dashManifestModel&&(le=e.dashManifestModel),e.adapter&&(fe=e.adapter),e.videoModel&&(de=e.videoModel))}function C(e){var t=void 0,n=(0,u["default"])($).getInstance().getURIFragmentData(),r=parseInt(n.s,10),i=parseInt(n.t,10),a=NaN;if(e||(a=isNaN(r)?i:r),me)!isNaN(a)&&a>1262304e3&&(t=a-ve.manifestInfo.availableFrom.getTime()/1e3,(t>ge||t<ge-ve.manifestInfo.DVRWindowSize)&&(t=null)),t=t||ge;else if(!isNaN(a)&&a<Math.max(ve.manifestInfo.duration,ve.duration)&&a>=0)t=a;else{var o=he[ve.id];void 0===o&&(o=ie.getActiveStreamCommonEarliestTime()),t=Math.max(o,ve.start)}return t}function D(e){var t,n=oe.getReadOnlyMetricsFor("video")||oe.getReadOnlyMetricsFor("audio"),r=se.getCurrentDVRInfo(n),i=r?r.range:null;return i?e>=i.start&&e<=i.end?e:t=Math.max(i.end-2*ve.manifestInfo.minBufferTime,i.start):NaN}function O(){if(null===pe){var e=function(){W()};pe=setInterval(e,_e.getWallclockTimeUpdateInterval())}}function P(){clearInterval(pe),pe=null}function w(){var e=C(!1);e>0&&(v(e),ee("Starting playback at offset: "+e))}function N(){if(!d()&&me&&0!==re.readyState){var e=m(),t=D(e),n=!isNaN(t)&&t!==e;n&&v(t)}}function L(e){if(!e.error){var t=fe.convertDataToTrack(ue.getValue(),e.currentRepresentation),n=t.mediaInfo.streamInfo;ve.id===n.id&&(ve=n,N())}}function x(e){e.error||0===re.readyState||w()}function F(){te.trigger(p["default"].CAN_PLAY)}function U(){ee("Native video element event: play"),N(),O(),te.trigger(p["default"].PLAYBACK_STARTED,{startTime:m()})}function B(){ee("Native video element event: playing"),te.trigger(p["default"].PLAYBACK_PLAYING,{playingTime:m()})}function k(){ee("Native video element event: pause"),te.trigger(p["default"].PLAYBACK_PAUSED,{ended:T()})}function j(){var e=m();ee("Seeking to: "+e),O(),te.trigger(p["default"].PLAYBACK_SEEKING,{seekTime:e})}function K(){ee("Native video element event: seeked"),te.trigger(p["default"].PLAYBACK_SEEKED)}function H(){var e=m();e!==ce&&(ce=e,te.trigger(p["default"].PLAYBACK_TIME_UPDATED,{timeToEnd:r(),time:e}))}function q(){te.trigger(p["default"].PLAYBACK_PROGRESS)}function Y(){var e=y();ee("Native video element event: ratechange: ",e),te.trigger(p["default"].PLAYBACK_RATE_CHANGED,{playbackRate:e})}function G(){ee("Native video element event: loadedmetadata"),(!me&&ve.isFirst||ae.isTimeSyncCompleted())&&w(),te.trigger(p["default"].PLAYBACK_METADATA_LOADED),O()}function V(){ee("Native video element event: ended"),g(),P(),te.trigger(p["default"].PLAYBACK_ENDED)}function z(e){var t=e.target||e.srcElement;te.trigger(p["default"].PLAYBACK_ERROR,{error:t.error})}function W(){te.trigger(p["default"].WALLCLOCK_TIME_UPDATED,{isDynamic:me,time:new Date})}function Q(e){var t=e.bufferedRanges;if(t&&t.length){var n=Math.max(t.start(0),ve.start),r=void 0===he[ve.id]?n:Math.max(he[ve.id],n);r!==he[ve.id]&&(!me&&C(!0)<r&&m()<r&&v(r),he[ve.id]=r)}}function X(e){e.streamInfo.id===ve.id&&de.setStallState(e.mediaType,e.state===o["default"].BUFFER_EMPTY)}function Z(){re.addEventListener("canplay",F),re.addEventListener("play",U),re.addEventListener("playing",B),re.addEventListener("pause",k),re.addEventListener("error",z),re.addEventListener("seeking",j),re.addEventListener("seeked",K),re.addEventListener("timeupdate",H),re.addEventListener("progress",q),re.addEventListener("ratechange",Y),re.addEventListener("loadedmetadata",G),re.addEventListener("ended",V)}function J(){re.removeEventListener("canplay",F),re.removeEventListener("play",U),re.removeEventListener("playing",B),re.removeEventListener("pause",k),re.removeEventListener("error",z),re.removeEventListener("seeking",j),re.removeEventListener("seeked",K),re.removeEventListener("timeupdate",H),re.removeEventListener("progress",q),re.removeEventListener("ratechange",Y),re.removeEventListener("loadedmetadata",G),re.removeEventListener("ended",V)}var $=this.context,ee=(0,_["default"])($).getInstance().log,te=(0,c["default"])($).getInstance(),ne=void 0,re=void 0,ie=void 0,ae=void 0,oe=void 0,se=void 0,ue=void 0,le=void 0,fe=void 0,de=void 0,ce=void 0,ge=void 0,pe=void 0,he=void 0,ve=void 0,me=void 0,_e=void 0,ye=void 0;return ne={initialize:t,setConfig:b,getStreamStartTime:C,getTimeToStreamEnd:r,isPlaybackStarted:i,getStreamId:a,getStreamDuration:s,getTime:m,getPlaybackRate:y,getPlayedRanges:E,getEnded:T,getIsDynamic:S,setLiveStartTime:I,getLiveStartTime:R,computeLiveDelay:A,play:l,isPaused:d,pause:g,isSeeking:h,seek:v,reset:M},e(),ne}Object.defineProperty(t,"__esModule",{value:!0});var a=n(18),o=r(a),s=n(40),u=r(s),l=n(5),f=r(l),d=n(3),c=r(d),g=n(2),p=r(g),h=n(1),v=r(h),m=n(4),_=r(m);i.__dashjs_factory_name="PlaybackController",t["default"]=v["default"].getSingletonFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(){ue={video:!0,audio:!0},le={},fe={},de={},ce={},ge={},pe={},ve={},he={},_e=!1,ye=!1,Re=(0,d["default"])(ne).getInstance(),Ie=(0,h["default"])(ne).getInstance(),Ee=(0,A["default"])(ne).getInstance(),Te=(0,b["default"])(ne).getInstance(),Se=(0,D["default"])(ne).getInstance()}function t(e,t){he[e]=t,ve[e]=ve[e]||{},ve[e].state=P,re.on(T["default"].LOADING_PROGRESS,te,this)}function n(e){e&&(e.abrRulesCollection&&(ae=e.abrRulesCollection),e.rulesController&&(oe=e.rulesController),e.streamController&&(se=e.streamController))}function r(e,t){var n;return le[t]=le[t]||{},le[t].hasOwnProperty(e)||(le[t][e]=0),n=J(le[t][e],e),n=$(n,e,le[t][e]),n=ee(n,e)}function i(e){var t=Re.getSavedBitrateSettings(e);if(!ce.hasOwnProperty(e))if(ge.hasOwnProperty(e)){var n=Ee.getValue(),r=Te.getAdaptationForType(n,0,e).Representation;if(Array.isArray(r)){var i=Math.max(Math.round(r.length*ge[e])-1,0);ce[e]=r[i].bandwidth}else ce[e]=0}else isNaN(t)?ce[e]="video"===e?w:N:ce[e]=t;return ce[e]}function o(e,t){ce[e]=t}function u(e){return ge.hasOwnProperty(e)?ge[e]:null}function f(e,t){ge[e]=t}function c(e){return ce.hasOwnProperty("max")&&ce.max.hasOwnProperty(e)?ce.max[e]:NaN}function p(e,t){ce.max=ce.max||{},ce.max[e]=t}function v(e){return ge.hasOwnProperty("max")&&ge.max.hasOwnProperty(e)?ge.max[e]:1}function _(e,t){ge.max=ge.max||{},ge.max[e]=t}function E(e){return ue[e]}function S(e,t){ue[e]=t}function I(){return _e}function R(e){_e=e}function M(){return ye}function C(e){ye=e}function x(e,t){var n=e.getType(),i=e.getStreamInfo(),a=i.id,o=function(e){var o=r(n,a),s=e.value;s<0&&(s=0),s>o&&(s=o);var u=z(n,i);s!==u&&(ve[n].state===P||s>u)&&(X(n,a,e.confidence),U(n,i,u,s,e.reason)),t&&t()};if(E(n)){var u=ae.getRules(g["default"].QUALITY_SWITCH_RULES);oe.applyRules(u,e,o,z(n,i),function(e,t){return e=e===s["default"].NO_CHANGE?0:e,Math.max(e,t)})}else t&&t()}function F(e,t,n,i){var a=t.id,o=z(e,t),s=null!==n&&!isNaN(n)&&n%1===0;if(!s)throw new Error("argument is not an integer");n!==o&&n>=0&&n<=r(e,a)&&U(e,t,o,n,i)}function U(e,t,n,r,i){W(e,t.id,r),re.trigger(T["default"].QUALITY_CHANGE_REQUESTED,{mediaType:e,streamInfo:t,oldQuality:n,newQuality:r,reason:i})}function B(e,t){ve[e].state=t}function k(e){return ve[e].state}function j(e,t){var n=K(e);if(!n||0===n.length)return L;for(var r=n.length-1;r>=0;r--){var i=n[r];if(1e3*t>=i.bitrate)return r}return 0}function K(e){if(!e||!e.bitrateList)return null;for(var t,n=e.bitrateList,r=e.type,i=[],a=0,o=n.length;a<o;a++)t=new l["default"],t.mediaType=r,t.qualityIndex=a,t.bitrate=n[a].bandwidth,t.width=n[a].width,t.height=n[a].height,i.push(t);return i}function H(e,t){pe[e]=t}function q(e){return pe[e]}function Y(e){var t=e.type,n=e.streamInfo.id,r=e.representationCount-1;return Z(t,n,r),r}function G(e){var t,n=e.id,i=z("audio",e),a=z("video",e);return t=i===r("audio",n)&&a===r("video",n)}function V(){re.off(T["default"].LOADING_PROGRESS,te,this),clearTimeout(me),me=null,e()}function z(e,t){var n,r=t.id;return fe[r]=fe[r]||{},fe[r].hasOwnProperty(e)||(fe[r][e]=L),n=fe[r][e]}function W(e,t,n){fe[t]=fe[t]||{},fe[t][e]=n}function Q(e,t){var n;return de[t]=de[t]||{},de[t].hasOwnProperty(e)||(de[t][e]=0),n=de[t][e]}function X(e,t,n){de[t]=de[t]||{},de[t][e]=n}function Z(e,t,n){le[t]=le[t]||{},le[t][e]=n}function J(e,t){var n=c(t);if(isNaN(n)||!he[t])return e;var r=j(he[t].getMediaInfo(),n);return Math.min(e,r)}function $(e,t,n){var r=v(t);return isNaN(r)||r>=1||r<0?e:Math.min(e,Math.round(n*r))}function ee(e,t){if("video"!==t||!_e||!he[t])return e;var n=ye&&window.hasOwnProperty("devicePixelRatio"),r=n?window.devicePixelRatio:1,i=Se.getElement(),a=i.clientWidth*r,o=i.clientHeight*r,s=Ee.getValue(),u=Te.getAdaptationForType(s,0,t).Representation,l=e;if(a>0&&o>0){for(;l>0&&u[l]&&a<u[l].width&&a-u[l-1].width<u[l].width-a;)l-=1;u.length-2>=l&&u[l].width===u[l+1].width&&(l=Math.min(e,l+1))}return l}function te(e){var t=e.request.mediaType;if(E(t)){var n=function(){var n=ae.getRules(g["default"].ABANDON_FRAGMENT_RULES),r=he[t].getScheduleController();if(!r)return{v:void 0};var i=function(n){if(n.confidence===s["default"].STRONG&&n.value<z(t,se.getActiveStreamInfo())){var i=r.getFragmentModel(),a=i.getRequests({state:m["default"].FRAGMENT_MODEL_LOADING,index:e.request.index})[0];a&&(i.abortRequests(),B(t,O),F(t,se.getActiveStreamInfo(),n.value,n.reason),re.trigger(T["default"].FRAGMENT_LOADING_ABANDONED,{streamProcessor:he[t],request:a,mediaType:t}),clearTimeout(me),me=setTimeout(function(){B(t,P),me=null},Ie.getAbandonLoadTimeout()))}};oe.applyRules(n,he[t],i,e,function(e,t){return t})}();if("object"===("undefined"==typeof n?"undefined":a(n)))return n.v}}var ne=this.context,re=(0,y["default"])(ne).getInstance(),ie=void 0,ae=void 0,oe=void 0,se=void 0,ue=void 0,le=void 0,fe=void 0,de=void 0,ce=void 0,ge=void 0,pe=void 0,he=void 0,ve=void 0,me=void 0,_e=void 0,ye=void 0,Ee=void 0,Te=void 0,Se=void 0,Ie=void 0,Re=void 0;return ie={isPlayingAtTopQuality:G,updateTopQualityIndex:Y,getAverageThroughput:q,getBitrateList:K,getQualityForBitrate:j,getMaxAllowedBitrateFor:c,setMaxAllowedBitrateFor:p,getMaxAllowedRepresentationRatioFor:v,setMaxAllowedRepresentationRatioFor:_,getInitialBitrateFor:i,setInitialBitrateFor:o,getInitialRepresentationRatioFor:u,setInitialRepresentationRatioFor:f,setAutoSwitchBitrateFor:S,getAutoSwitchBitrateFor:E,setLimitBitrateByPortal:R,getLimitBitrateByPortal:I,getUsePixelRatioInLimitBitrateByPortal:M,setUsePixelRatioInLimitBitrateByPortal:C,getConfidenceFor:Q,getQualityFor:z,getAbandonmentStateFor:k,setAbandonmentStateFor:B,setPlaybackQuality:F,getPlaybackQuality:x,setAverageThroughput:H,getTopQualityIndexFor:r,initialize:t,setConfig:n,reset:V},e(),ie}var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};Object.defineProperty(t,"__esModule",{value:!0});var o=n(8),s=r(o),u=n(165),l=r(u),f=n(50),d=r(f),c=n(47),g=r(c),p=n(5),h=r(p),v=n(30),m=r(v),_=n(3),y=r(_),E=n(2),T=r(E),S=n(1),I=r(S),R=n(31),A=r(R),M=n(12),b=r(M),C=n(19),D=r(C),O="abandonload",P="allowload",w=1e3,N=100,L=0;i.__dashjs_factory_name="AbrController";var x=I["default"].getSingletonFactory(i);x.ABANDON_LOAD=O,x.QUALITY_DEFAULT=L,t["default"]=x,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(e){d.trigger(u["default"].ERROR,{error:"capability",event:e})}function t(e,t,n){d.trigger(u["default"].ERROR,{error:"download",event:{id:e,url:t,request:n}})}function n(e,t,n,r){d.trigger(u["default"].ERROR,{error:"manifestError",event:{message:e,id:t,manifest:n,event:r}})}function r(e,t,n){d.trigger(u["default"].ERROR,{error:"cc",event:{message:e,id:t,cc:n}})}function i(e){d.trigger(u["default"].ERROR,{error:"mediasource",event:e})}function a(e){d.trigger(u["default"].ERROR,{error:"key_session",event:e})}function s(e){d.trigger(u["default"].ERROR,{error:"key_message",event:e})}var l=void 0,f=this.context,d=(0,o["default"])(f).getInstance();return l={capabilityError:e,downloadError:t,manifestError:n,timedTextError:r,mediaSourceError:i,mediaKeySessionError:a,mediaKeyMessageError:s}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),o=r(a),s=n(2),u=r(s),l=n(1),f=r(l),d="mediasource",c="mediakeys",g="manifest",p="SIDX",h="content",v="initialization",m="xlink",_="codec",y="parse",E="nostreams",T="parse";i.__dashjs_factory_name="ErrorHandler";var S=f["default"].getSingletonFactory(i);S.CAPABILITY_ERROR_MEDIASOURCE=d,S.CAPABILITY_ERROR_MEDIAKEYS=c,S.DOWNLOAD_ERROR_ID_MANIFEST=g,S.DOWNLOAD_ERROR_ID_SIDX=p,S.DOWNLOAD_ERROR_ID_CONTENT=h,S.DOWNLOAD_ERROR_ID_INITIALIZATION=v,S.DOWNLOAD_ERROR_ID_XLINK=m,S.MANIFEST_ERROR_ID_CODEC=_,S.MANIFEST_ERROR_ID_PARSE=y,S.MANIFEST_ERROR_ID_NOSTREAMS=E,S.TIMED_TEXT_ERROR_ID_PARSE=T,t["default"]=S,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(e,t){var n,r,i,a=!1,o=!1,s=e.ContentComponent_asArray,u="text"!==t?new RegExp(t):new RegExp("(vtt|ttml)");if(e.Representation_asArray.length>0&&e.Representation_asArray[0].hasOwnProperty("codecs")){var l=e.Representation_asArray[0].codecs;if("stpp"===l||"wvtt"===l)return"fragmentedText"===t}if(s){if(s.length>1)return"muxed"===t;s[0]&&s[0].contentType===t&&(a=!0,o=!0)}if(e.hasOwnProperty("mimeType")&&(a=u.test(e.mimeType),o=!0),!o)for(n=0,r=e.Representation_asArray.length;!o&&n<r;)i=e.Representation_asArray[n],i.hasOwnProperty("mimeType")&&(a=u.test(i.mimeType),o=!0),n++;return a}function t(t){return e(t,"audio")}function n(t){return e(t,"video")}function r(t){return e(t,"fragmentedText")}function i(t){return e(t,"text")}function a(t){return e(t,"muxed")}function s(e){return"text/vtt"===e||"application/ttml+xml"===e}function l(e){var t="";return e.hasOwnProperty("lang")&&(t=e.lang.replace(/[^A-Za-z0-9-]/g,"")),t}function d(e){return e.hasOwnProperty("Viewpoint")?e.Viewpoint:null}function g(e){return e.hasOwnProperty("Role_asArray")?e.Role_asArray:[]}function h(e){return e.hasOwnProperty("Accessibility_asArray")?e.Accessibility_asArray:[]}function m(e){return e.hasOwnProperty("AudioChannelConfiguration_asArray")?e.AudioChannelConfiguration_asArray:[]}function y(e){return g(e).filter(function(e){return"main"===e.value})[0]}function T(){return function(e,t){return e.bandwidth-t.bandwidth}}function I(e){return void 0!==e.Representation_asArray&&null!==e.Representation_asArray&&e.Representation_asArray.sort(T()),e}function A(e,t,n){var r,i,a=t.Period_asArray[n].AdaptationSet_asArray;for(r=0,i=a.length;r<i;r++)if(a[r].hasOwnProperty("id")&&a[r].id===e)return a[r];return null}function b(e,t,n){var r=t.Period_asArray[n].AdaptationSet_asArray;return r[e]}function D(e,t,n){var r,i,a=t.Period_asArray[n].AdaptationSet_asArray;for(r=0,i=a.length;r<i;r++)if(a[r]===e)return r;return-1}function O(t,n,r){var i,a,o=t.Period_asArray[n].AdaptationSet_asArray,s=[];for(i=0,a=o.length;i<a;i++)e(o[i],r)&&s.push(I(o[i]));return s}function P(e,t,n,r){var i=O(e,t,n);if(!i||0===i.length)return null;if(i.length>1&&r)for(var a=de.getCurrentTrackFor(n,r),o=ce.getAllMediaInfoForType(e,r,n),s=0,u=i.length;s<u;s++){if(a&&de.isTracksEqual(a,o[s]))return i[s];if(y(i[s]))return i[s]}return i[0]}function w(e){var t=e.Representation_asArray[0];return t.mimeType+';codecs="'+t.codecs+'"'}function N(e){return e.Representation_asArray[0].mimeType}function L(e){return e&&e.hasOwnProperty("cenc:default_KID")?e["cenc:default_KID"]:null}function x(e){return e&&e.hasOwnProperty("ContentProtection_asArray")&&0!==e.ContentProtection_asArray.length?e.ContentProtection_asArray:null}function F(e){var t=!1;return e.hasOwnProperty("type")&&(t="dynamic"===e.type),t}function U(e){var t,n,r=F(e);return t=!isNaN(e.timeShiftBufferDepth),n=r&&t}function B(e,t){var n=!1;return e.profiles&&e.profiles.length>0&&(n=e.profiles.indexOf(t)!==-1),n}function k(e){return B(e,"urn:mpeg:dash:profile:isoff-on-demand:2011")}function j(e){return B(e,"urn:dvb:dash:profile:dvb-dash:2014")}function K(e){var t;return t=e.hasOwnProperty("mediaPresentationDuration")?e.mediaPresentationDuration:Number.MAX_VALUE}function H(e){return e.bandwidth}function q(e){var t=NaN,n=2;return e.hasOwnProperty("minimumUpdatePeriod")&&(t=Math.max(parseFloat(e.minimumUpdatePeriod),n)),t}function Y(e){return e.Representation_asArray.length}function G(e){if(!e||!e.Representation_asArray||!e.Representation_asArray.length)return null;for(var t=I(e),n=t.Representation_asArray,r=n.length,i=[],a=0;a<r;a++)i.push({bandwidth:n[a].bandwidth,width:n[a].width||0,height:n[a].height||0});return i}function V(e,t){return t.Representation_asArray[e]}function z(e,t){for(var n,r,i,a,u,l=I(e.Period_asArray[t.period.index].AdaptationSet_asArray[t.index]),f=[],d=0;d<l.Representation_asArray.length;d++)a=l.Representation_asArray[d],n=new o["default"],n.index=d,n.adaptation=t,a.hasOwnProperty("id")&&(n.id=a.id),a.hasOwnProperty("bandwidth")&&(n.bandwidth=a.bandwidth),a.hasOwnProperty("maxPlayoutRate")&&(n.maxPlayoutRate=a.maxPlayoutRate),a.hasOwnProperty("SegmentBase")?(i=a.SegmentBase,n.segmentInfoType="SegmentBase"):a.hasOwnProperty("SegmentList")?(i=a.SegmentList,i.hasOwnProperty("SegmentTimeline")?(n.segmentInfoType="SegmentTimeline",u=i.SegmentTimeline.S_asArray[i.SegmentTimeline.S_asArray.length-1],(!u.hasOwnProperty("r")||u.r>=0)&&(n.useCalculatedLiveEdgeTime=!0)):(n.segmentInfoType="SegmentList",n.useCalculatedLiveEdgeTime=!0)):a.hasOwnProperty("SegmentTemplate")?(i=a.SegmentTemplate,i.hasOwnProperty("SegmentTimeline")?(n.segmentInfoType="SegmentTimeline",u=i.SegmentTimeline.S_asArray[i.SegmentTimeline.S_asArray.length-1],(!u.hasOwnProperty("r")||u.r>=0)&&(n.useCalculatedLiveEdgeTime=!0)):n.segmentInfoType="SegmentTemplate",i.hasOwnProperty("initialization")&&(n.initialization=i.initialization.split("$Bandwidthquot;).join(a.bandwidth).split("$RepresentationIDquot;).join(a.id))):(i=a.BaseURL,n.segmentInfoType="BaseURL"),i.hasOwnProperty("Initialization")?(r=i.Initialization,r.hasOwnProperty("sourceURL")?n.initialization=r.sourceURL:r.hasOwnProperty("range")&&(n.range=r.range)):a.hasOwnProperty("mimeType")&&s(a.mimeType)&&(n.range=0),i.hasOwnProperty("timescale")&&(n.timescale=i.timescale),i.hasOwnProperty("duration")&&(n.segmentDuration=i.duration/n.timescale),i.hasOwnProperty("startNumber")&&(n.startNumber=i.startNumber),i.hasOwnProperty("indexRange")&&(n.indexRange=i.indexRange),i.hasOwnProperty("presentationTimeOffset")&&(n.presentationTimeOffset=i.presentationTimeOffset/n.timescale),n.MSETimeOffset=fe.calcMSETimeOffset(n),n.path=[t.period.index,t.index,d],f.push(n);return f}function W(e,i){for(var o,s,l=e.Period_asArray[i.index],f=[],d=0;d<l.AdaptationSet_asArray.length;d++)s=l.AdaptationSet_asArray[d],o=new u["default"],s.hasOwnProperty("id")&&(o.id=s.id),o.index=d,o.period=i,a(s)?o.type="muxed":t(s)?o.type="audio":n(s)?o.type="video":r(s)?o.type="fragmentedText":o.type="text",f.push(o);return f}function Q(e,t){var n,r,i=F(e),a=[],o=null,s=null,u=null,l=null;for(r=0,n=e.Period_asArray.length;r<n;r++)s=e.Period_asArray[r],s.hasOwnProperty("start")?(l=new f["default"],
27
- l.start=s.start):null!==o&&s.hasOwnProperty("duration")&&null!==u?(l=new f["default"],l.start=u.start+u.duration,l.duration=s.duration):0!==r||i||(l=new f["default"],l.start=0),null!==u&&isNaN(u.duration)&&(u.duration=l.start-u.start),null!==l&&(l.id=X(s)),null!==l&&s.hasOwnProperty("duration")&&(l.duration=s.duration),null!==l&&(l.index=r,l.mpd=t,a.push(l),o=s,u=l),s=null,l=null;return 0===a.length?a:(null!==u&&isNaN(u.duration)&&(u.duration=ee(e,u)-u.start),a)}function X(e){if(!e)throw new Error("Period cannot be null or undefined");var t=f["default"].DEFAULT_ID;return e.hasOwnProperty("id")&&"__proto__"!==e.id&&(t=e.id),t}function Z(e){var t=new c["default"];return t.manifest=e,e.hasOwnProperty("availabilityStartTime")?t.availabilityStartTime=new Date(e.availabilityStartTime.getTime()):t.availabilityStartTime=new Date(e.loadedTime.getTime()),e.hasOwnProperty("availabilityEndTime")&&(t.availabilityEndTime=new Date(e.availabilityEndTime.getTime())),e.hasOwnProperty("suggestedPresentationDelay")&&(t.suggestedPresentationDelay=e.suggestedPresentationDelay),e.hasOwnProperty("timeShiftBufferDepth")&&(t.timeShiftBufferDepth=e.timeShiftBufferDepth),e.hasOwnProperty("maxSegmentDuration")&&(t.maxSegmentDuration=e.maxSegmentDuration),t}function J(e,t){return fe.calcPresentationTimeFromWallTime(e.loadedTime,t)}function $(e,t){var n,r=NaN;return e.hasOwnProperty("minimumUpdatePeriod")&&(n=J(e,t),r=n+e.minimumUpdatePeriod),r}function ee(e,t){var n,r=$(e,t);if(e.mediaPresentationDuration)n=e.mediaPresentationDuration;else{if(isNaN(r))throw new Error("Must have @mediaPresentationDuration or @minimumUpdatePeriod on MPD or an explicit @duration on the last period.");n=r}return n}function te(e,t){var n=e.Period_asArray,r=n[t.index].EventStream_asArray,i=[];if(r)for(var a=0;a<r.length;a++){var o=new M["default"];if(o.period=t,o.timescale=1,!r[a].hasOwnProperty("schemeIdUri"))throw new Error("Invalid EventStream. SchemeIdUri has to be set");o.schemeIdUri=r[a].schemeIdUri,r[a].hasOwnProperty("timescale")&&(o.timescale=r[a].timescale),r[a].hasOwnProperty("value")&&(o.value=r[a].value);for(var s=0;s<r[a].Event_asArray.length;s++){var u=new S["default"];u.presentationTime=0,u.eventStream=o,r[a].Event_asArray[s].hasOwnProperty("presentationTime")&&(u.presentationTime=r[a].Event_asArray[s].presentationTime),r[a].Event_asArray[s].hasOwnProperty("duration")&&(u.duration=r[a].Event_asArray[s].duration),r[a].Event_asArray[s].hasOwnProperty("id")&&(u.id=r[a].Event_asArray[s].id),i.push(u)}}return i}function ne(e,t){var n=[];if(!e)return n;for(var r=0;r<e.length;r++){var i=new M["default"];if(i.timescale=1,i.representation=t,!e[r].hasOwnProperty("schemeIdUri"))throw new Error("Invalid EventStream. SchemeIdUri has to be set");i.schemeIdUri=e[r].schemeIdUri,e[r].hasOwnProperty("timescale")&&(i.timescale=e[r].timescale),e[r].hasOwnProperty("value")&&(i.value=e[r].value),n.push(i)}return n}function re(e,t){var n=e.Period_asArray[t.period.index].AdaptationSet_asArray[t.index].InbandEventStream_asArray;return ne(n,null)}function ie(e,t){var n=e.Period_asArray[t.adaptation.period.index].AdaptationSet_asArray[t.adaptation.index].Representation_asArray[t.index].InbandEventStream_asArray;return ne(n,t)}function ae(e){var t=F(e),n=e.hasOwnProperty("availabilityStartTime"),r=e.UTCTiming_asArray,i=[];return(t||n)&&r&&r.forEach(function(e){var t=new p["default"];e.hasOwnProperty("schemeIdUri")&&(t.schemeIdUri=e.schemeIdUri,e.hasOwnProperty("value")&&(t.value=e.value.toString(),i.push(t)))}),i}function oe(e){var t=[],n=e.BaseURL_asArray||[e.baseUri],r=!1;return n.some(function(n){if(n){var i=new R["default"],a=n.__text||n;return ge.isRelative(a)&&(r=!0,e.baseUri&&(a=e.baseUri+a)),i.url=a,n.hasOwnProperty("serviceLocation")&&n.serviceLocation.length?i.serviceLocation=n.serviceLocation:i.serviceLocation=a,n.hasOwnProperty("dvb:priority")&&(i.dvb_priority=n["dvb:priority"]),n.hasOwnProperty("dvb:weight")&&(i.dvb_weight=n["dvb:weight"]),t.push(i),r}}),t}function se(e){return e.hasOwnProperty("Location")&&(e.Location=e.Location_asArray[0]),e.Location}var ue=void 0,le=this.context,fe=(0,v["default"])(le).getInstance(),de=(0,_["default"])(le).getInstance(),ce=(0,E["default"])(le).getInstance(),ge=(0,C["default"])(le).getInstance();return ue={getIsTypeOf:e,getIsAudio:t,getIsVideo:n,getIsText:i,getIsMuxed:a,getIsTextTrack:s,getIsFragmentedText:r,getIsMain:y,getLanguageForAdaptation:l,getViewpointForAdaptation:d,getRolesForAdaptation:g,getAccessibilityForAdaptation:h,getAudioChannelConfigurationForAdaptation:m,processAdaptation:I,getAdaptationForIndex:b,getIndexForAdaptation:D,getAdaptationForId:A,getAdaptationsForType:O,getAdaptationForType:P,getCodec:w,getMimeType:N,getKID:L,getContentProtectionData:x,getIsDynamic:F,getIsDVR:U,getIsOnDemand:k,getIsDVB:j,getDuration:K,getBandwidth:H,getRefreshDelay:q,getRepresentationCount:Y,getBitrateListForAdaptation:G,getRepresentationFor:V,getRepresentationsForAdaptation:z,getAdaptationsForPeriod:W,getRegularPeriods:Q,getPeriodId:X,getMpd:Z,getFetchTime:J,getCheckTime:$,getEndTimeForLastPeriod:ee,getEventsForPeriod:te,getEventStreams:ne,getEventStreamForAdaptationSet:re,getEventStreamForRepresentation:ie,getUTCTimingSources:ae,getBaseURLsFromElement:oe,getRepresentationSortFunction:T,getLocation:se}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(96),o=r(a),s=n(92),u=r(s),l=n(95),f=r(l),d=n(94),c=r(d),g=n(58),p=r(g),h=n(26),v=r(h),m=n(13),_=r(m),y=n(15),E=r(y),T=n(57),S=r(T),I=n(56),R=r(I),A=n(93),M=r(A),b=n(22),C=r(b),D=n(1),O=r(D);i.__dashjs_factory_name="DashManifestModel",t["default"]=O["default"].getSingletonFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(){k={},O(),D()}function t(e,t){var n=f(e),i=r(e,t),a=[];return"fragmentedText"===e?void s(i[0]):(n||(n=U.getSavedMediaSettings(e),l(e,n)),void(i&&0!==i.length&&(n&&i.forEach(function(e){C(n,e)&&a.push(e)}),s(0===a.length?P(i):a.length>1?P(a):a[0]))))}function n(e){var t=e?e.type:null,n=e?e.streamInfo.id:null,r=f(t);return!(!e||!I(t))&&(k[n]=k[n]||w(),!(k[n][t].list.indexOf(e)>=0)&&(k[n][t].list.push(e),r&&C(r,e)&&!i(t,e.streamInfo)&&s(e),!0))}function r(e,t){if(!e||!t)return[];var n=t.id;return k[n]&&k[n][e]?k[n][e].list:[]}function i(e,t){return!e||!t||t&&!k[t.id]?null:k[t.id][e].current}function a(e){var t=e.type,n=e.streamInfo.id;return k[n]&&k[n][t]&&R(k[n][t].current,e)}function s(e){if(e){var t=e.type,n=e.streamInfo,r=n.id,a=i(t,n);if(k[r]&&k[r][t]&&(!a||!R(e,a))){k[r][t].current=e,a&&x.trigger(o["default"].CURRENT_TRACK_CHANGED,{oldMediaInfo:a,newMediaInfo:e,switchMode:H[t]});var s=b(e);s&&k[r][t].storeLastSettings&&(s.roles&&(s.role=s.roles[0],delete s.roles),s.accessibility&&(s.accessibility=s.accessibility[0]),s.audioChannelConfiguration&&(s.audioChannelConfiguration=s.audioChannelConfiguration[0]),U.setSavedMediaSettings(t,s))}}}function l(e,t){e&&t&&(j[e]=t)}function f(e){return e?j[e]:null}function d(e,t){var n=Y.indexOf(t)!==-1;return n?void(H[e]=t):void L("track switch mode is not supported: "+t)}function g(e){return H[e]}function h(e){var t=G.indexOf(e)!==-1;return t?void(K=e):void L("track selection mode is not supported: "+e)}function S(){return K||T}function I(e){return"audio"===e||"video"===e||"text"===e||"fragmentedText"===e}function R(e,t){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 A(e){e&&e.errHandler&&(q=e.errHandler)}function M(){e(),F.resetEmbedded()}function b(e){var t={lang:e.lang,viewpoint:e.viewpoint,roles:e.roles,accessibility:e.accessibility,audioChannelConfiguration:e.audioChannelConfiguration},n=t.lang||t.viewpoint||t.role&&t.role.length>0||t.accessibility&&t.accessibility.length>0||t.audioChannelConfiguration&&t.audioChannelConfiguration.length>0;return n?t:null}function C(e,t){var n=!e.lang||e.lang===t.lang,r=!e.viewpoint||e.viewpoint===t.viewpoint,i=!e.role||!!t.roles.filter(function(t){return t===e.role})[0],a=!e.accessibility||!!t.accessibility.filter(function(t){return t===e.accessibility})[0],o=!e.audioChannelConfiguration||!!t.audioChannelConfiguration.filter(function(t){return t===e.audioChannelConfiguration})[0];return n&&r&&i&&a&&o}function D(){H={audio:_,video:m}}function O(){j={audio:null,video:null}}function P(e){var t=S(),n=[],r=function(e){var t,n=0,r=[];return e.forEach(function(e){t=Math.max.apply(Math,e.bitrateList.map(function(e){return e.bandwidth})),t>n?(n=t,r=[e]):t===n&&r.push(e)}),r},i=function(e){var t,n=0,r=[];return e.forEach(function(e){t=e.representationCount,t>n?(n=t,r=[e]):t===n&&r.push(e)}),r};switch(t){case y:n=r(e),n.length>1&&(n=i(n));break;case E:n=i(e),n.length>1&&(n=r(e));break;default:L("track selection mode is not supported: "+t)}return n[0]}function w(){return{audio:{list:[],storeLastSettings:!0,current:null},video:{list:[],storeLastSettings:!0,current:null},text:{list:[],storeLastSettings:!0,current:null},fragmentedText:{list:[],storeLastSettings:!0,current:null}}}var N=this.context,L=(0,c["default"])(N).getInstance().log,x=(0,u["default"])(N).getInstance(),F=(0,p["default"])(N).getInstance(),U=(0,v["default"])(N).getInstance(),B=void 0,k=void 0,j=void 0,K=void 0,H=void 0,q=void 0,Y=[_,m],G=[y,E];return B={initialize:e,checkInitialMediaSettingsForType:t,addTrack:n,getTracksFor:r,getCurrentTrackFor:i,isCurrentTrack:a,setTrack:s,setInitialSettings:l,getInitialSettings:f,setSwitchMode:d,getSwitchMode:g,setSelectionModeForInitialTrack:h,getSelectionModeForInitialTrack:S,isMultiTrackSupportedByType:I,isTracksEqual:R,setConfig:A,reset:M}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(2),o=r(a),s=n(3),u=r(s),l=n(1),f=r(l),d=n(4),c=r(d),g=n(17),p=r(g),h=n(50),v=r(h),m="neverReplace",_="alwaysReplace",y="highestBitrate",E="widestRange",T=y;i.__dashjs_factory_name="MediaController";var S=f["default"].getSingletonFactory(i);S.TRACK_SWITCH_MODE_NEVER_REPLACE=m,S.TRACK_SWITCH_MODE_ALWAYS_REPLACE=_,S.TRACK_SELECTION_MODE_HIGHEST_BITRATE=y,S.TRACK_SELECTION_MODE_WIDEST_RANGE=E,S.DEFAULT_INIT_TRACK_SELECTION_MODE=T,t["default"]=S,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(){G={}}function t(e){e&&e.adapter&&(Y=e.adapter)}function n(){H.trigger(C["default"].METRICS_CHANGED)}function r(e){H.trigger(C["default"].METRIC_CHANGED,{mediaType:e}),n()}function i(e,t,n){H.trigger(C["default"].METRIC_UPDATED,{mediaType:e,metric:t,value:n}),r(e)}function a(e,t,n){H.trigger(C["default"].METRIC_ADDED,{mediaType:e,metric:t,value:n}),r(e)}function s(e){delete G[e],r(e)}function f(){G={},n()}function c(e){return G.hasOwnProperty(e)?G[e]:null}function p(e){var t;return G.hasOwnProperty(e)?t=G[e]:(t=new o["default"],G[e]=t),t}function v(e,t,n,r,i,o){var s=new u["default"];return s.tcpid=t,s.dest=n,s.topen=r,s.tclose=i,s.tconnect=o,p(e).TcpList.push(s),a(e,Y.metricsList.TCP_CONNECTION,s),s}function _(e,t,n,r){var i=new l.HTTPRequestTrace;return i.s=t,i.d=n,i.b=r,e.trace.push(i),e.interval||(e.interval=0),e.interval+=n,i}function T(e,t,n,r,i,o,s,u,f,d,c,g,h,v){var m=new l.HTTPRequest;return i&&i!==r&&(T(e,null,n,r,null,null,s,u,null,null,null,g,null,null),m.actualurl=i),m.tcpid=t,m.type=n,m.url=r,m.range=s,m.trequest=u,m.tresponse=f,m.responsecode=c,m._tfinish=d,m._stream=e,m._mediaduration=g,m._responseHeaders=h,m._serviceLocation=o,v?v.forEach(function(e){_(m,e.s,e.d,e.b)}):(delete m.interval,delete m.trace),p(e).HttpList.push(m),a(e,Y.metricsList.HTTP_REQUEST,m),m}function I(e,t,n,r,i){var o=new d["default"];return o.t=t,o.mt=n,o.to=r,i?o.lto=i:delete o.lto,p(e).RepSwitchList.push(o),a(e,Y.metricsList.TRACK_SWITCH,o),o}function A(e,t,n){var r=new g["default"];return r.t=t,r.level=n,p(e).BufferLevel.push(r),a(e,Y.metricsList.BUFFER_LEVEL,r),r}function b(e,t,n){var r=new h["default"];return r.target=n,r.state=t,p(e).BufferState.push(r),a(e,Y.metricsList.BUFFER_STATE,r),r}function D(e,t,n,r){var i=new m["default"];return i.time=t,i.range=r,i.manifestInfo=n,p(e).DVRInfo.push(i),a(e,Y.metricsList.DVR_INFO,i),i}function O(e,t){var n=new y["default"],r=p(e).DroppedFrames;return n.time=t.creationTime,n.droppedFrames=t.droppedVideoFrames,r.length>0&&r[r.length-1]==n?r[r.length-1]:(r.push(n),a(e,Y.metricsList.DROPPED_FRAMES,n),n)}function P(e,t,n,r,i,o,s,u,l){var f=new S["default"];return f.mediaType=e,f.t=t,f.type=n,f.startTime=r,f.availabilityStartTime=i,f.duration=o,f.quality=s,f.range=u,f.state=l,p(e).SchedulingInfo.push(f),a(e,Y.metricsList.SCHEDULING_INFO,f),f}function N(e,t,n){var r=new M["default"];r.loadingRequests=t,r.executedRequests=n,p(e).RequestsQueue=r,a(e,Y.metricsList.REQUESTS_QUEUE,r)}function L(e,t,n,r,i,o,s,u,l,f){var d=new E.ManifestUpdate,c=p("stream");return d.mediaType=e,d.type=t,d.requestTime=n,d.fetchTime=r,d.availabilityStartTime=i,d.presentationStartTime=o,d.clientTimeOffset=s,d.currentTime=u,d.buffered=l,d.latency=f,c.ManifestUpdate.push(d),a(e,Y.metricsList.MANIFEST_UPDATE,d),d}function x(e,t){if(e){for(var n in t)e[n]=t[n];i(e.mediaType,Y.metricsList.MANIFEST_UPDATE,e)}}function F(e,t,n,r,a){if(e){var o=new E.ManifestUpdateStreamInfo;return o.id=t,o.index=n,o.start=r,o.duration=a,e.streamInfo.push(o),i(e.mediaType,Y.metricsList.MANIFEST_UPDATE_STREAM_INFO,e),o}return null}function U(e,t,n,r,a,o,s,u){if(e){var l=new E.ManifestUpdateTrackInfo;return l.id=t,l.index=n,l.streamIndex=r,l.mediaType=a,l.startNumber=s,l.fragmentInfoType=u,l.presentationTimeOffset=o,e.trackInfo.push(l),i(e.mediaType,Y.metricsList.MANIFEST_UPDATE_TRACK_INFO,e),l}return null}function B(e){var t="stream";return e.trace&&Array.isArray(e.trace)?e.trace.forEach(function(e){e.hasOwnProperty("subreplevel")&&!e.subreplevel&&delete e.subreplevel}):delete e.trace,p(t).PlayList.push(e),a(t,Y.metricsList.PLAY_LIST,e),e}function k(e){var t="stream";return p(t).DVBErrors.push(e),a(t,Y.metricsList.DVB_ERRORS,e),e}function j(e,t){var n=new w["default"];return n._s=t,p(e).BolaState=[n],a(e,"BolaState",n),n}var K=this.context,H=(0,R["default"])(K).getInstance(),q=void 0,Y=void 0,G=void 0;return q={metricsChanged:n,metricChanged:r,metricUpdated:i,metricAdded:a,clearCurrentMetricsForType:s,clearAllCurrentMetrics:f,getReadOnlyMetricsFor:c,getMetricsFor:p,addTcpConnection:v,addHttpRequest:T,addRepresentationSwitch:I,addBufferLevel:A,addBufferState:b,addDVRInfo:D,addDroppedFrames:O,addSchedulingInfo:P,addRequestsQueue:N,addManifestUpdate:L,updateManifestUpdateInfo:x,addManifestUpdateStreamInfo:F,addManifestUpdateRepresentationInfo:U,addPlayList:B,addDVBErrors:k,updateBolaState:j,setConfig:t},e(),q}Object.defineProperty(t,"__esModule",{value:!0});var a=n(171),o=r(a),s=n(185),u=r(s),l=n(7),f=n(182),d=r(f),c=n(177),g=r(c),p=n(178),h=r(p),v=n(179),m=r(v),_=n(180),y=r(_),E=n(181),T=n(184),S=r(T),I=n(3),R=r(I),A=n(183),M=r(A),b=n(2),C=r(b),D=n(1),O=r(D),P=n(176),w=r(P);i.__dashjs_factory_name="MetricsModel",t["default"]=O["default"].getSingletonFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}function i(e){return e&&e.__esModule?e:{"default":e}}function a(){function e(e){e&&e.dashManifestModel&&(L=e.dashManifestModel)}function t(){x=[],F={}}function n(e,t){return t.getRepresentationForQuality(e.quality)}function r(e){return F[e.streamInfo.id][e.index]}function i(e){for(var t=x.length,n=0;n<t;n++){var r=x[n];if(e.id===r.id)return r}return null}function a(e,t){var n=new s["default"],r=t.adaptation.period.mpd.manifest.Period_asArray[t.adaptation.period.index].AdaptationSet_asArray[t.adaptation.index],i=L.getRepresentationFor(t.index,r);return n.id=t.id,n.quality=t.index,n.bandwidth=L.getBandwidth(i),n.DVRWindow=t.segmentAvailabilityRange,n.fragmentDuration=t.segmentDuration||(t.segments&&t.segments.length>0?t.segments[0].duration:NaN),n.MSETimeOffset=t.MSETimeOffset,n.useCalculatedLiveEdgeTime=t.useCalculatedLiveEdgeTime,n.mediaInfo=o(e,t.adaptation),n}function o(e,t){var n,r=new l["default"],i=t.period.mpd.manifest.Period_asArray[t.period.index].AdaptationSet_asArray[t.index];return r.id=t.id,r.index=t.index,r.type=t.type,r.streamInfo=f(e,t.period),r.representationCount=L.getRepresentationCount(i),r.lang=L.getLanguageForAdaptation(i),n=L.getViewpointForAdaptation(i),r.viewpoint=n?n.value:void 0,r.accessibility=L.getAccessibilityForAdaptation(i).map(function(e){var t=e.value,n=t;return e.schemeIdUri&&e.schemeIdUri.search("cea-608")>=0&&"undefined"!=typeof y["default"]&&(n=t?"cea-608:"+t:"cea-608",r.embeddedCaptions=!0),n}),r.audioChannelConfiguration=L.getAudioChannelConfigurationForAdaptation(i).map(function(e){return e.value}),r.roles=L.getRolesForAdaptation(i).map(function(e){return e.value}),r.codec=L.getCodec(i),r.mimeType=L.getMimeType(i),r.contentProtection=L.getContentProtectionData(i),r.bitrateList=L.getBitrateListForAdaptation(i),r.contentProtection&&r.contentProtection.forEach(function(e){e.KID=L.getKID(e)}),r.isText=L.getIsTextTrack(r.mimeType),r}function u(e,t,n){e.id=t,e.index=100+parseInt(t.substring(2,3)),e.type="embeddedText",e.codec="cea-608-in-SEI",e.isText=!0,e.isEmbedded=!0,e.lang=t+" "+n,e.roles=["caption"]}function f(e,t){var n=new d["default"],r=1;return n.id=t.id,n.index=t.index,n.start=t.start,n.duration=t.duration,n.manifestInfo=c(e,t.mpd),n.isLast=1===e.Period_asArray.length||Math.abs(n.start+n.duration-n.manifestInfo.duration)<r,n.isFirst=1===e.Period_asArray.length||L.getRegularPeriods(e,L.getMpd(e))[0].id===t.id,n}function c(e,t){var n=new g["default"];return n.DVRWindowSize=t.timeShiftBufferDepth,n.loadedTime=t.manifest.loadedTime,n.availableFrom=t.availabilityStartTime,n.minBufferTime=t.manifest.minBufferTime,n.maxFragmentDuration=t.maxSegmentDuration,n.duration=L.getDuration(e),n.isDynamic=L.getIsDynamic(e),n}function p(e,t,n){var r=L.getAdaptationForType(e,t.index,n,t);if(!r)return null;var a=i(t),s=a.id,u=L.getIndexForAdaptation(r,e,t.index);return F[s]=F[s]||L.getAdaptationsForPeriod(e,a),o(e,F[s][u])}function v(e,t,n){var r,a,s,l,f,d,c=i(t),g=c.id,p=L.getAdaptationsForType(e,t.index,"embeddedText"!==n?n:"video"),h=[];if(!p)return h;for(F[g]=F[g]||L.getAdaptationsForPeriod(e,c),l=0,d=p.length;l<d;l++){if(r=p[l],s=L.getIndexForAdaptation(r,e,t.index),a=o(e,F[g][s]),"embeddedText"===n){var v=a.accessibility.length;for(f=0;f<v;f++)if(a){var m=a.accessibility[f];if(0===m.indexOf("cea-608:")){var _=m.substring(8),y=_.split(";");if("CC"===y[0].substring(0,2))for(f=0;f<y.length;f++)a||(a=o.call(this,e,F[g][s])),u(a,y[f].substring(0,3),y[f].substring(4)),h.push(a),a=null;else for(f=0;f<y.length;f++)a||(a=o.call(this,e,F[g][s])),u(a,"CC"+(f+1),y[f]),h.push(a),a=null}else 0===m.indexOf("cea-608")&&(u(a,"CC1","eng"),h.push(a),a=null)}}a&&"embeddedText"!==n&&h.push(a)}return h}function m(e){var t,n,r,i=[];if(!e)return null;for(t=L.getMpd(e),x=L.getRegularPeriods(e,t),t.checkTime=L.getCheckTime(e,x[0]),F={},n=x.length,r=0;r<n;r++)i.push(f(e,x[r]));return i}function _(e){var t=L.getMpd(e);return c(e,t)}function E(e,t){var n=e.getRepresentationController().getRepresentationForQuality(t);return e.getIndexHandler().getInitRequest(n)}function S(e,t){var r=n(t,e.getRepresentationController());return e.getIndexHandler().getNextSegmentRequest(r)}function I(e,t,r,i){var a=n(t,e.getRepresentationController());return e.getIndexHandler().getSegmentRequestForTime(a,r,i)}function R(e,t,r){var i=n(t,e.getRepresentationController());return e.getIndexHandler().generateSegmentRequestForTime(i,r)}function A(e){return e.getIndexHandler().getCurrentTime()}function M(e,t){return e.getIndexHandler().setCurrentTime(t)}function b(e,t){var n,a,o=i(t.getStreamInfo()),s=t.getMediaInfo(),u=r(s),l=t.getType();n=s.id,a=n?L.getAdaptationForId(n,e,o.index):L.getAdaptationForIndex(s.index,e,o.index),t.getRepresentationController().updateData(a,u,l)}function C(e,t,n){var r=t.getRepresentationForQuality(n);return r?a(e,r):null}function D(e,t){var n=t.getCurrentRepresentation();return n?a(e,n):null}function O(e,t,n){var r=new h["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]?(r.eventStream=t[i],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}function P(e,t,a){var o=[];return t instanceof d["default"]?o=L.getEventsForPeriod(e,i(t)):t instanceof l["default"]?o=L.getEventStreamForAdaptationSet(e,r(t)):t instanceof s["default"]&&(o=L.getEventStreamForRepresentation(e,n(t,a.getRepresentationController()))),o}function w(){x=[],F={}}var N=void 0,L=void 0,x=void 0,F=void 0;return N={initialize:t,convertDataToTrack:a,convertDataToMedia:o,convertDataToStream:f,getDataForTrack:n,getDataForMedia:r,getDataForStream:i,getStreamsInfo:m,getManifestInfo:_,getMediaInfoForType:p,getAllMediaInfoForType:v,getCurrentRepresentationInfo:D,getRepresentationInfoForQuality:C,updateData:b,getInitRequest:E,getNextFragmentRequest:S,getFragmentRequestForTime:I,generateFragmentRequestForTime:R,getIndexHandlerTime:A,setIndexHandlerTime:M,getEventsFor:P,getEvent:O,setConfig:e,reset:w,metricsList:T}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(174),s=i(o),u=n(170),l=i(u),f=n(172),d=i(f),c=n(169),g=i(c),p=n(57),h=i(p),v=n(1),m=i(v),_=n(52),y=i(_),E=n(54),T=r(E);a.__dashjs_factory_name="DashAdapter",t["default"]=m["default"].getSingletonFactory(a),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}function i(e){return e&&e.__esModule?e:{"default":e}}function a(){function e(e,t){var n,r=C.getValue(),i=r.Period_asArray[t];return n=I(i,e),null===n?null:n.bandwidth}function t(e,t){var n,r=C.getValue(),i=r.Period_asArray[t];return n=S(i,e)}function n(e,t){var n,r=C.getValue(),i=r.Period_asArray[t];return n=A(i,e)}function r(e){return c(e,p.TRACK_SWITCH)}function i(e){return c(e,p.BUFFER_LEVEL)}function a(e){var t=i(e);return t?(0,h.round10)(t.level/1e3,-3):0}function s(e){return e.RequestsQueue}function l(e){if(null===e)return null;var t,n,r=e.HttpList,i=null;if(null===r||r.length<=0)return null;for(t=r.length,n=t-1;n>=0;){if(r[n].responsecode){i=r[n];break}n--}return i}function d(e){return null===e?[]:e.HttpList?e.HttpList:[]}function c(e,t){if(null===e)return null;var n=e[t];if(null===n)return null;var r=n.length;return r<=0?null:n[r-1]}function g(e){return c(e,p.DROPPED_FRAMES)}function v(e){return c(e,p.SCHEDULING_INFO)}function m(e){return c(e,p.MANIFEST_UPDATE)}function _(e){return c(e,p.DVR_INFO)}function y(e,t){var n,r,i,a={};if(null===e)return null;for(n=d(e),i=n.length-1;i>=0;i--)if(r=n[i],r.type===o.HTTPRequest.MPD_TYPE){a=T(r._responseHeaders);break}return void 0===a[t]?null:a[t]}function E(e,t){if(null===e)return null;var n,r=l(e);return null===r||null===r._responseHeaders?null:(n=T(r._responseHeaders),void 0===n[t]?null:n[t])}function T(e){var t={};if(!e)return t;for(var n=e.split("\r\n"),r=0,i=n.length;r<i;r++){var a=n[r],o=a.indexOf(": ");o>0&&(t[a.substring(0,o)]=a.substring(o+2))}return t}function S(e,t){var n=I(e,t,!0);return null!==n?n:-1}function I(e,t,n){var r,i,a,o,s,u;for(i=e.AdaptationSet_asArray,s=0;s<i.length;s+=1)for(r=i[s],o=r.Representation_asArray,u=0;u<o.length;u+=1)if(a=o[u],t===a.id)return n?u:a;return null}function R(e,t){return(0,f["default"])(b).getInstance().getIsTypeOf(e,t)}function A(e,t){var n,r,i,a;if(!e||!t)return-1;for(r=e.AdaptationSet_asArray,a=0;a<r.length;a+=1)if(n=r[a],i=n.Representation_asArray,R(n,t))return i.length;return-1}var M=void 0,b=this.context,C=(0,u["default"])(b).getInstance();return M={getBandwidthForRepresentation:e,getIndexForRepresentation:t,getMaxIndexForBufferType:n,getCurrentRepresentationSwitch:r,getLatestBufferLevelVO:i,getCurrentBufferLevel:a,getCurrentHttpRequest:l,getHttpRequests:d,getCurrentDroppedFrames:g,getCurrentSchedulingInfo:v,getCurrentDVRInfo:_,getCurrentManifestUpdate:m,getLatestFragmentRequestHeaderValueByID:E,getLatestMPDRequestHeaderValueByID:y,getRequestsQueue:s}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(7),s=n(31),u=i(s),l=n(12),f=i(l),d=n(1),c=i(d),g=n(54),p=r(g),h=n(186);a.__dashjs_factory_name="DashMetrics",t["default"]=c["default"].getSingletonFactory(a),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(e,n){B=!1,k=null,V=null,z=!1,W=NaN,Q=[],J=null,O||t();var r=n.getStreamProcessor();if(q=r.getMediaInfoArr(),Y.setConfig({videoModel:X}),Y.initialize(),G=!F.getIsTextTrack(e),N=(0,f["default"])(C).getInstance(),H=(0,u["default"])(C).getInstance(),H.setConfig({boxParser:N}),G){V=r.getFragmentModel(),this.buffered=(0,c["default"])(C).create(),Q=U.getTracksFor("fragmentedText",Z.getActiveStreamInfo());for(var i=U.getCurrentTrackFor("fragmentedText",Z.getActiveStreamInfo()),a=0;a<Q.length;a++)if(Q[a]===i){$=a;break}}}function t(){ee=[],q=[],X=(0,_["default"])(C).getInstance(),Y=(0,E["default"])(C).getInstance(),Y.setConfig({videoModel:X}),Y.initialize(),N=(0,f["default"])(C).getInstance(),H=(0,u["default"])(C).getInstance(),H.setConfig({boxParser:N}),G=!1,$=null,te=!1,ne=0,ae=[],ie=[],re=null,O=!0}function n(e,t){function n(e,t){var n=new o["default"],r={subtitle:"subtitles",caption:"captions"},i=function(){var e=t.roles.length>0?r[t.roles[0]]:r.caption;return e=e===r.caption||e===r.subtitle?e:r.caption},a=function(){var e=!1;return t.codec&&t.codec.search("stpp")>=0&&(e=!0),t.mimeType&&t.mimeType.search("ttml")>=0&&(e=!0),e};n.captionData=e,n.lang=t.lang,n.label=t.id,n.index=t.index,n.isTTML=a(),n.video=X.getElement(),n.defaultTrack=M(t),n.isFragmented=G,n.isEmbedded=!!t.isEmbedded,n.kind=i();var s=(q?q.length:0)+ee.length;Y.addTextTrack(n,s)}var i,a,s,u,l,f=t.mediaInfo,d=f.type,c=f.mimeType,g=f.codec||c;if(!g)return void D("No text type defined");if("fragmentedText"===d)if(z)if(u=H.getSamplesInfo(e),a=u.sampleList,!J&&a.length>0&&(J=a[0].cts-t.start*W),g.search("stpp")>=0)for(k=null!==k?k:b(g),s=0;s<a.length;s++){var h=a[s],v=h.cts,m=v-J;this.buffered.add(m/W,(m+h.duration)/W);var _=new DataView(e,h.offset,h.size);l=S["default"].Utils.dataViewToString(_,"utf-8");try{i=k.parse(l,v/W,(v+h.duration)/W),Y.addCaptions($,J/W,i)}catch(y){D("TTML parser error: "+y.message)}}else{var E=[];for(s=0;s<a.length;s++){var T=a[s];T.cts-=J,this.buffered.add(T.cts/W,(T.cts+T.duration)/W);for(var I=e.slice(T.offset,T.offset+T.size),A=S["default"].parseBuffer(I),C=0;C<A.boxes.length;C++){var O=A.boxes[C];if(D("VTT box1: "+O.type),"vtte"!==O.type&&"vttc"===O.type){D("VTT vttc boxes.length = "+O.boxes.length);for(var P=0;P<O.boxes.length;P++){var w=O.boxes[P];if(D("VTT box2: "+w.type),"payl"===w.type){var N=w.cue_text;D("VTT cue_text = "+N);var x=T.cts/W,F=(T.cts+T.duration)/W;E.push({start:x,end:F,data:N,styles:{}}),D("VTT "+x+"-"+F+" : "+N)}}}}}E.length>0&&Y.addCaptions($,0,E)}else{for(z=!0,s=0;s<q.length;s++)n(null,q[s]);W=H.getMediaTimescaleFromMoov(e)}else if("text"===d){var _=new DataView(e,0,e.byteLength);l=S["default"].Utils.dataViewToString(_,"utf-8");try{i=b(g).parse(l),n(i,f)}catch(y){L.timedTextError(y,"parse",l)}}else if("video"===d)if("InitializationSegment"===t.segmentType){if(0===ne)for(ne=H.getMediaTimescaleFromMoov(e),s=0;s<ee.length;s++)n(null,ee[s])}else{if(0===ne)return void D("CEA-608: No timescale for embeddedTextTrack yet");var U=function(e,t){function n(e,n,r){var i=null;if(X.getTTMLRenderingDiv())i=p(X.getElement(),e,n,r);else{var a=r.getDisplayText();i=[{start:e,end:n,data:a,styles:{}}]}i&&Y.addCaptions(t,0,i)}return n};u=H.getSamplesInfo(e);var B=u.sequenceNumber;if(!ae[0]&&!ae[1]){var j=void 0,K=void 0,V=void 0;for(s=0;s<ee.length;s++){if("CC1"===ee[s].id?(j=0,V=Y.getTrackIdxForId("CC1")):"CC3"===ee[s].id&&(j=1,V=Y.getTrackIdxForId("CC3")),V===-1)return void D("CEA-608: data before track is ready.");K=U(this,V),ae[s]=new R["default"].Cea608Parser(s,{newCue:K},null)}}if(ne&&ie.indexOf(B)==-1){if(null!==re&&B!==re+1)for(s=0;s<ae.length;s++)ae[s]&&ae[s].reset();for(var Q=r(e),Z=0;Z<ae.length;Z++){var te=Q.fields[Z],oe=ae[Z];if(oe){for(s=0;s<te.length;s++)oe.addData(te[s][0]/ne,te[s][1]);Q.endTime&&oe.cueSplitAtTime(Q.endTime/ne)}}re=B,ie.push(B)}}}function r(e){var t=function(e,t,n){var r=e.length;if(r>0){if(t>=e[r-1][0])e.push([t,n]);else for(var i=r-1;i>=0;i--)if(t<e[i][0]){e.splice(i,0,[t,n]);break}}else e.push([t,n])},n=N.parse(e),r=n.getBox("moof"),i=n.getBox("tfdt"),a=n.getBoxes("trun"),o=null;if(0===a.length)return null;o=a[0],a.length>1&&D("Warning: Too many truns");for(var s=r.offset+o.data_offset,u=o.sample_count,l=s,f=i.baseMediaDecodeTime,d=new DataView(e),c={startTime:null,endTime:null,fields:[[],[]]},g=0,p=0;p<u;p++){for(var h=o.samples[p],v=f+g+h.sample_composition_time_offset,m=R["default"].findCea608Nalus(d,l,h.sample_size),_=0;_<m.length;_++)for(var y=R["default"].extractCea608DataFromRange(d,m[_]),E=0;E<2;E++)y[E].length>0&&t(c.fields[E],v,y[E]);g+=h.sample_duration,l+=h.sample_size}var T=f+g;return c.startTime=f,c.endTime=T,c}function i(e){for(var t="",n=0;n<e.length;++n){var r=e[n];t+=r.uchar}var i=t.length,a=t.replace(/^\s+/,"").length;return i-a}function a(e){return"left: "+3.125*e.x+"%; top: "+6.66*e.y1+"%; width: "+(100-3.125*e.x)+"%; height: "+6.66*Math.max(e.y2-1-e.y1,1)+"%; align-items: flex-start; overflow: visible; -webkit-writing-mode: horizontal-tb;"}function s(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 l(e,t){var n=e.videoHeight/15;return t?"font-size: "+n+"px; font-family: Menlo, Consolas, 'Cutive Mono', monospace; color: "+(t.foreground?s(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?s(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;"}function d(e){var t=e.replace(/^\s+/g,"");return t}function g(e){var t=e.replace(/\s+#x2F;g,"");return t}function p(e,t,n,r){var o=null,s=null,u=!1,f=-1,c={start:t,end:n,spans:[]},p="style_cea608_white_black",h={},v={},m=[],_=void 0,y=void 0;for(_=0;_<15;++_){var E=r.rows[_],T="",S=null;if(!1===E.isEmpty()){var I=i(E.chars);null===o&&(o={x:I,y1:_,y2:_+1,p:[]}),I!==f&&u&&(o.p.push(c),c={start:t,end:n,spans:[]},o.y2=_,o.name="region_"+o.x+"_"+o.y1+"_"+o.y2,!1===h.hasOwnProperty(o.name)?(m.push(o),h[o.name]=o):(s=h[o.name],s.p.contat(o.p)),o={x:I,y1:_,y2:_+1,p:[]});for(var R=0;R<E.chars.length;++R){var A=E.chars[R],M=A.penState;if(null===S||!M.equals(S)){T.trim().length>0&&(c.spans.push({name:p,line:T,row:_}),T="");var b="style_cea608_"+M.foreground+"_"+M.background;M.underline&&(b+="_underline"),M.italics&&(b+="_italics"),v.hasOwnProperty(b)||(v[b]=JSON.parse(JSON.stringify(M))),S=M,p=b}T+=A.uchar}T.trim().length>0&&c.spans.push({name:p,line:T,row:_}),u=!0,f=I}else u=!1,f=-1,o&&(o.p.push(c),c={start:t,end:n,spans:[]},o.y2=_,o.name="region_"+o.x+"_"+o.y1+"_"+o.y2,!1===h.hasOwnProperty(o.name)?(m.push(o),h[o.name]=o):(s=h[o.name],s.p.contat(o.p)),o=null)}o&&(o.p.push(c),o.y2=_+1,o.name="region_"+o.x+"_"+o.y1+"_"+o.y2,!1===h.hasOwnProperty(o.name)?(m.push(o),h[o.name]=o):(s=h[o.name],s.p.contat(o.p)),o=null);var C=[];for(_=0;_<m.length;++_){var D=m[_],O="sub_cea608_"+P++,w=document.createElement("div");
28
- w.id=O;var N=a(D);w.style.cssText="position: absolute; margin: 0; display: flex; box-sizing: border-box; pointer-events: none;"+N;var L=document.createElement("div");L.className="paragraph bodyStyle",L.style.cssText=l(e);var x=document.createElement("div");x.className="cueUniWrapper",x.style.cssText="unicode-bidi: normal; direction: ltr;";for(var F=0;F<D.p.length;++F){var U=D.p[F],B=0;for(y=0;y<U.spans.length;++y){var k=U.spans[y];if(k.line.length>0){if(0!==y&&B!=k.row){var j=document.createElement("br");j.className="lineBreak",x.appendChild(j)}var K=!1;B===k.row&&(K=!0),B=k.row;var H=v[k.name],q=document.createElement("span");q.className="spanPadding "+k.name+" customSpanColor",q.style.cssText=l(e,H),0!==y&&K?y===U.spans.length-1?q.textContent=g(k.line):q.textContent=k.line:0===y&&U.spans.length>1&&k.row===U.spans[1].row?q.textContent=d(k.line):q.textContent=k.line.trim(),x.appendChild(q)}}}L.appendChild(x),w.appendChild(L);var Y={bodyStyle:90};for(y in v)v.hasOwnProperty(y)&&(Y[y]=90);C.push({type:"html",start:t,end:n,cueHTMLElement:w,cueID:O,cellResolution:[32,15],isFromCEA608:!0,regions:m,regionID:D.name,videoHeight:e.videoHeight,videoWidth:e.videoWidth,fontSize:Y||{defaultFontSize:"100"},lineHeight:{},linePadding:{}})}return C}function h(){Y.deleteAllTextTracks(),B=!1,k=null,H=null,q=null,Y=null,G=!1,V=null,z=!1,W=NaN,Q=[],X=null,Z=null,O=!1,ee=null}function m(e){O||t(),"CC1"===e.id||"CC3"===e.id?ee.push(e):D("Warning: Embedded track "+e.id+" not supported!")}function y(){O=!1,ee=[],ae=[null,null],ie=[],re=null}function T(){return B}function I(e){e&&(e.errHandler&&(L=e.errHandler),e.adapter&&(x=e.adapter),e.dashManifestModel&&(F=e.dashManifestModel),e.mediaController&&(U=e.mediaController),e.videoModel&&(X=e.videoModel),e.streamController&&(Z=e.streamController),e.textTracks&&(Y=e.textTracks),e.VTTParser&&(j=e.VTTParser),e.TTMLParser&&(K=e.TTMLParser))}function A(){for(var e=X.getElement(),t=e.textTracks,n=t.length,r=n-ee.length,i=Y.getCurrentTrackIdx(),a=0;a<n;a++){var o=t[a];if(B="showing"!==o.mode,"showing"===o.mode){if(i!==a&&(Y.setCurrentTrackIdx(a),Y.addCaptions(a,0,null),G&&a<r)){var s=U.getCurrentTrackFor("fragmentedText",Z.getActiveStreamInfo()),u=Q[a];u!==s&&(V.abortRequests(),Y.deleteTrackCues(s),U.setTrack(u),$=a)}break}}B&&Y.setCurrentTrackIdx(-1)}function M(e){var t=!1;return ee.length>1?t=e.id&&"CC1"===e.id:1===ee.length?e.id&&"CC"===e.id.substring(0,2)&&(t=!0):t=e.index===q[0].index,t}function b(e){var t;return e.search("vtt")>=0?t=j:(e.search("ttml")>=0||e.search("stpp")>=0)&&(t=K,t.setConfig({videoModel:X})),t}var C=this.context,D=(0,v["default"])(C).getInstance().log,O=!1,P=0,w=void 0,N=void 0,L=void 0,x=void 0,F=void 0,U=void 0,B=void 0,k=void 0,j=void 0,K=void 0,H=void 0,q=void 0,Y=void 0,G=void 0,V=void 0,z=void 0,W=void 0,Q=void 0,X=void 0,Z=void 0,J=void 0,$=void 0,ee=void 0,te=void 0,ne=void 0,re=void 0,ie=void 0,ae=void 0;return w={initialize:e,append:n,abort:h,getAllTracksAreDisabled:T,setTextTrack:A,setConfig:I,addEmbeddedTrack:m,resetEmbedded:y}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(173),o=r(a),s=n(87),u=r(s),l=n(49),f=r(l),d=n(67),c=r(d),g=n(1),p=r(g),h=n(4),v=r(h),m=n(19),_=r(m),y=n(39),E=r(y),T=n(71),S=r(T),I=n(52),R=r(I);i.__dashjs_factory_name="TextSourceBuffer",t["default"]=p["default"].getSingletonFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){function t(){pe=c["default"].QUALITY_DEFAULT,he=!1,ve=0,me=Number.POSITIVE_INFINITY,ye=0,Ee=0,Se=null,Ie=O,Ae=0,Me=!1,be=!1,Ce=!1,De=!1}function n(e,t,n){Te=e,J(t),Pe=n,Le=(0,u["default"])(ne).getInstance(),Oe=(0,p["default"])(ne).getInstance(),we=(0,c["default"])(ne).getInstance(),xe=(0,C["default"])(ne).getInstance(),Ne=Pe.getScheduleController(),pe=we.getQualityFor(Te,Pe.getStreamInfo()),ie.on(E["default"].DATA_UPDATE_COMPLETED,j,this),ie.on(E["default"].INIT_FRAGMENT_LOADED,a,this),ie.on(E["default"].MEDIA_FRAGMENT_LOADED,l,this),ie.on(E["default"].QUALITY_CHANGE_REQUESTED,h,this),ie.on(E["default"].STREAM_COMPLETED,K,this),ie.on(E["default"].PLAYBACK_PROGRESS,y,this),ie.on(E["default"].PLAYBACK_TIME_UPDATED,y,this),ie.on(E["default"].PLAYBACK_RATE_CHANGED,Y,this),ie.on(E["default"].PLAYBACK_SEEKING,m,this),ie.on(E["default"].WALLCLOCK_TIME_UPDATED,q,this),ie.on(E["default"].CURRENT_TRACK_CHANGED,H,this,_["default"].EVENT_PRIORITY_HIGH),ie.on(E["default"].SOURCEBUFFER_APPEND_COMPLETED,g,this),ie.on(E["default"].SOURCEBUFFER_REMOVE_COMPLETED,B,this)}function r(e){if(!e||!_e||!Pe)return null;var t=null;try{t=se.createSourceBuffer(_e,e),t&&t.hasOwnProperty("initialize")&&t.initialize(Te,this)}catch(n){ue.mediaSourceError("Error creating "+Te+" source buffer.")}return Q(t),k(Pe.getRepresentationInfoForQuality(pe).MSETimeOffset),t}function i(){return Pe.getStreamInfo().id===le.getActiveStreamInfo().id}function a(e){e.fragmentModel===Pe.getFragmentModel()&&(re("Init fragment finished loading saving to",Te+"'s init cache"),xe.save(e.chunk),d(e.chunk))}function s(e,t){var n=xe.extract(e,Te,t);n?d(n):ie.trigger(E["default"].INIT_REQUESTED,{sender:ge})}function l(e){if(e.fragmentModel===Pe.getFragmentModel()){var t=e.chunk,n=t.bytes,r=t.quality,i=Pe.getRepresentationInfoForQuality(r),a=oe.getValue(),s=de.getEventsFor(a,i.mediaInfo,Pe),u=de.getEventsFor(a,i,Pe);if(s.length>0||u.length>0){var l=Pe.getFragmentModel().getRequests({state:o["default"].FRAGMENT_MODEL_EXECUTED,quality:r,index:t.index})[0],f=w(n,l,s,u);Pe.getEventController().addInbandEvents(f)}t.bytes=N(n),d(t)}}function d(e){be=!0,Re=e,se.append(Se,e),"video"===e.mediaInfo.type&&e.mediaInfo.embeddedCaptions&&ce.append(e.bytes,e)}function g(e){if(Se===e.buffer){if(e.error||!L())return e.error.code===f["default"].QUOTA_EXCEEDED_ERROR_CODE&&(me=.8*se.getTotalBufferedTime(Se)),void(e.error.code!==f["default"].QUOTA_EXCEEDED_ERROR_CODE&&L()||(ie.trigger(E["default"].QUOTA_EXCEEDED,{sender:ge,criticalBufferLevel:me}),U(F())));isNaN(Re.index)||(ye=Math.max(Re.index,ye),R());var t=se.getAllRanges(Se);if(t&&t.length>0)for(var n=0,r=t.length;n<r;n++)re("Buffered Range for type:",Te,":",t.start(n)," - ",t.end(n));y(),be=!1,ie.trigger(E["default"].BYTES_APPENDED,{sender:ge,quality:Re.quality,startTime:Re.start,index:Re.index,bufferedRanges:t})}}function h(e){pe!==e.newQuality&&Te===e.mediaType&&Pe.getStreamInfo().id===e.streamInfo.id&&(k(Pe.getRepresentationInfoForQuality(e.newQuality).MSETimeOffset),pe=e.newQuality)}function m(){Ee=0,he=!1,y()}function y(){T(),I()}function T(){ve=se.getBufferLength(Se,Oe.getTime()),ie.trigger(E["default"].BUFFER_LEVEL_UPDATED,{sender:ge,bufferLevel:ve}),A()}function I(){i()&&(ae.addBufferState(Te,Ie,Ne.getBufferTarget()),ae.addBufferLevel(Te,new Date,1e3*ve))}function R(){var e=ye===Ee-1;e&&!he&&(he=!0,ie.trigger(E["default"].BUFFERING_COMPLETED,{sender:ge,streamInfo:Pe.getStreamInfo()}))}function A(){b(ve<P&&!he?O:D)}function b(e){Ie===e||"fragmentedText"===Te&&ce.getAllTracksAreDisabled()||(Ie=e,I(),ie.trigger(E["default"].BUFFER_LEVEL_STATE_CHANGED,{sender:ge,state:e,mediaType:Te,streamInfo:Pe.getStreamInfo()}),ie.trigger(e===D?E["default"].BUFFER_LOADED:E["default"].BUFFER_EMPTY,{mediaType:Te}),re(e===D?"Got enough buffer to start.":"Waiting for more buffer before starting playback."))}function w(e,t,n,r){var i=Math.max(isNaN(t.startTime)?0:t.startTime,0),a=[],o=[];De=!1;for(var s=n.concat(r),u=0,l=s.length;u<l;u++)a[s[u].schemeIdUri]=s[u];for(var f=(0,S["default"])(ne).getInstance().parse(e),d=f.getBoxes("emsg"),u=0,l=d.length;u<l;u++){var c=de.getEvent(d[u],a,i);c&&o.push(c)}return o}function N(e){if(!De)return e;for(var t=e.length,n=Math.pow(256,2),r=Math.pow(256,3),i=new Uint8Array(e.length),a=0,o=0;a<t;){var s=String.fromCharCode(e[a+4],e[a+5],e[a+6],e[a+7]),u=e[a]*r+e[a+1]*n+256*e[a+2]+1*e[a+3];if("emsg"!=s)for(var l=a;l<a+u;l++)i[o]=e[l],o++;a+=u}return i.subarray(0,o)}function L(){var e=se.getTotalBufferedTime(Se);return e<me}function x(){if("fragmentedText"!==Te){var e=Se.buffered.length?Se.buffered.start(0):0,t=Oe.getTime()-e-Le.getBufferToKeep();t>0&&(re("pruning buffer: "+t+" seconds."),Ce=!0,se.remove(Se,0,Math.round(e+t),_e))}}function F(){if(!Se)return null;var e=Oe.getTime(),t=Pe.getFragmentModel().getRequests({state:o["default"].FRAGMENT_MODEL_EXECUTED,time:e})[0],n=se.getBufferRange(Se,e),r=t&&!isNaN(t.startTime)?t.startTime:Math.floor(e);return null===n&&Se.buffered.length>0&&(r=Se.buffered.end(Se.buffered.length-1)),{start:Se.buffered.start(0),end:r}}function U(e){e&&Se&&se.remove(Se,e.start,e.end,_e)}function B(e){Se===e.buffer&&(Ce&&(Ce=!1),T(),ie.trigger(E["default"].BUFFER_CLEARED,{sender:ge,from:e.from,to:e.to,hasEnoughSpaceToAppend:L()}))}function k(e){Se&&Se.timestampOffset!==e&&!isNaN(e)&&(Se.timestampOffset=e)}function j(e){e.sender.getStreamProcessor()!==Pe||e.error||k(e.currentRepresentation.MSETimeOffset)}function K(e){e.fragmentModel===Pe.getFragmentModel()&&(Ee=e.request.index,R())}function H(e){Se&&e.newMediaInfo.type===Te&&e.newMediaInfo.streamInfo.id===Pe.getStreamInfo().id&&fe.getSwitchMode(Te)===v["default"].TRACK_SWITCH_MODE_ALWAYS_REPLACE&&U(F())}function q(){Ae++;var e=Ae*(Le.getWallclockTimeUpdateInterval()/1e3);e>=Le.getBufferPruningInterval()&&!be&&(Ae=0,x())}function Y(){A()}function G(){return Te}function V(){return Pe}function z(e){Pe=e}function W(){return Se}function Q(e){Se=e}function X(){return ve}function Z(){return me}function J(e){_e=e}function $(){return _e}function ee(){return he}function te(e){ie.off(E["default"].DATA_UPDATE_COMPLETED,j,this),ie.off(E["default"].QUALITY_CHANGE_REQUESTED,h,this),ie.off(E["default"].INIT_FRAGMENT_LOADED,a,this),ie.off(E["default"].MEDIA_FRAGMENT_LOADED,l,this),ie.off(E["default"].STREAM_COMPLETED,K,this),ie.off(E["default"].CURRENT_TRACK_CHANGED,H,this),ie.off(E["default"].PLAYBACK_PROGRESS,y,this),ie.off(E["default"].PLAYBACK_TIME_UPDATED,y,this),ie.off(E["default"].PLAYBACK_RATE_CHANGED,Y,this),ie.off(E["default"].PLAYBACK_SEEKING,m,this),ie.off(E["default"].WALLCLOCK_TIME_UPDATED,q,this),ie.off(E["default"].SOURCEBUFFER_APPEND_COMPLETED,g,this),ie.off(E["default"].SOURCEBUFFER_REMOVE_COMPLETED,B,this),me=Number.POSITIVE_INFINITY,Ie=O,pe=c["default"].QUALITY_DEFAULT,Ee=0,ye=0,Re=null,Me=!1,he=!1,be=!1,Ce=!1,Oe=null,Pe=null,we=null,Ne=null,e||(se.abort(_e,Se),se.removeSourceBuffer(_e,Se)),Se=null}var ne=this.context,re=(0,M["default"])(ne).getInstance().log,ie=(0,_["default"])(ne).getInstance(),ae=e.metricsModel,oe=e.manifestModel,se=e.sourceBufferController,ue=e.errHandler,le=e.streamController,fe=e.mediaController,de=e.adapter,ce=e.textSourceBuffer,ge=void 0,pe=void 0,he=void 0,ve=void 0,me=void 0,_e=void 0,ye=void 0,Ee=void 0,Te=void 0,Se=void 0,Ie=void 0,Re=void 0,Ae=void 0,Me=void 0,be=void 0,Ce=void 0,De=void 0,Oe=void 0,Pe=void 0,we=void 0,Ne=void 0,Le=void 0,xe=void 0;return ge={initialize:n,createBuffer:r,getType:G,getStreamProcessor:V,setStreamProcessor:z,getBuffer:W,setBuffer:Q,getBufferLevel:X,getCriticalBufferLevel:Z,setMediaSource:J,getMediaSource:$,getIsBufferingCompleted:ee,switchInitData:s,reset:te},t(),ge}Object.defineProperty(t,"__esModule",{value:!0});var a=n(30),o=r(a),s=n(5),u=r(s),l=n(28),f=r(l),d=n(10),c=r(d),g=n(9),p=r(g),h=n(13),v=r(h),m=n(3),_=r(m),y=n(2),E=r(y),T=n(49),S=r(T),I=n(1),R=r(I),A=n(4),M=r(A),b=n(68),C=r(b),D="bufferLoaded",O="bufferStalled",P=.5;i.__dashjs_factory_name="BufferController";var w=R["default"].getClassFactory(i);w.BUFFER_LOADED=D,w.BUFFER_EMPTY=O,t["default"]=w,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(){T=[]}function t(e){!_||_.readyState<2||(_.playbackRate=e)}function n(e){if(_.currentTime!=e)try{_.currentTime=e}catch(t){0===_.readyState&&t.code===t.INVALID_STATE_ERR&&setTimeout(function(){_.currentTime=e},400)}}function r(){return _}function i(e){_=e,_.preload="auto"}function a(e){e?_.src=e:(_.removeAttribute("src"),_.load())}function o(){return _.src}function s(){return E}function u(e){E=e}function l(){return y}function f(e){y=e,y.style.position="absolute",y.style.display="flex",y.style.overflow="hidden",y.style.pointerEvents="none",y.style.top=0,y.style.left=0}function d(e,t){h(e,t)}function c(){return T.length>0}function g(e){var n=void 0;null===e||_.seeking||T.indexOf(e)!==-1||(T.push(e),1===T.length&&(n=document.createEvent("Event"),n.initEvent("waiting",!0,!1),S=_.playbackRate,t(0),_.dispatchEvent(n)))}function p(e){var n=T.indexOf(e),r=void 0;null!==e&&(n!==-1&&T.splice(n,1),c()===!1&&0===_.playbackRate&&(r=document.createEvent("Event"),r.initEvent("playing",!0,!1),t(S||1),_.dispatchEvent(r)))}function h(e,t){t?g(e):p(e)}function v(){var e="webkitDroppedFrameCount"in _,t="getVideoPlaybackQuality"in _,n=null;return t?n=_.getVideoPlaybackQuality():e&&(n={droppedVideoFrames:_.webkitDroppedFrameCount,creationTime:new Date}),n}var m=void 0,_=void 0,y=void 0,E=void 0,T=void 0,S=void 0;return m={initialize:e,setCurrentTime:n,setStallState:d,getElement:r,setElement:i,setSource:a,getSource:o,getVideoContainer:s,setVideoContainer:u,getTTMLRenderingDiv:l,setTTMLRenderingDiv:f,getPlaybackQuality:v}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),o=r(a);i.__dashjs_factory_name="VideoModel",t["default"]=o["default"].getSingletonFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(){pe=null,ce=[],Re=(0,E["default"])(z).getInstance(),ve=!0,me=!1,_e=!1,Ae=!1,Me=!0,be=null,ye=!1,Ee=!1}function t(e,t){ve=e,he=t,de.initialize(),le=(0,b["default"])(z).getInstance(),J=(0,f["default"])(z).getInstance(),J.setConfig({log:W,manifestModel:ee,dashManifestModel:te}),J.initialize($),Se=(0,_["default"])(z).getInstance(),Ie=(0,o["default"])(z).getInstance(),Ie.setConfig({streamController:X,timelineConverter:de,metricsModel:re,dashMetrics:ie,manifestModel:ee,dashManifestModel:te,adapter:ne,videoModel:Se}),Q.on(p["default"].TIME_SYNCHRONIZATION_COMPLETED,L,this),Q.on(p["default"].PLAYBACK_SEEKING,g,this),Q.on(p["default"].PLAYBACK_TIME_UPDATED,l,this),Q.on(p["default"].PLAYBACK_ENDED,d,this),Q.on(p["default"].PLAYBACK_ERROR,s,this),Q.on(p["default"].PLAYBACK_STARTED,h,this),Q.on(p["default"].PLAYBACK_PAUSED,m,this),Q.on(p["default"].MANIFEST_UPDATED,x,this),Q.on(p["default"].STREAM_BUFFERING_COMPLETED,y,this)}function n(e,t){t=t||new Date,be&&(ge&&ge.getProcessors().forEach(function(n){var r=n.getScheduleController();r&&r.finalisePlayList(t,e)}),re.addPlayList(be),be=null)}function r(e){be=new I.PlayList,be.start=new Date,be.mstart=1e3*Ie.getTime(),be.starttype=e,ge&&ge.getProcessors().forEach(function(e){var t=e.getScheduleController();t&&t.setPlayList(be)})}function i(e,t,n){Q.trigger(e,{fromStreamInfo:t?t.getStreamInfo():null,toStreamInfo:n.getStreamInfo()})}function a(){ge.isActivated()&&Me&&0===ge.getStreamInfo().index&&(ge.startEventController(),ve&&Ie.play())}function s(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"}ye=!0,e.error.msExtendedCode&&(t+=" (0x"+(e.error.msExtendedCode>>>0).toString(16).toUpperCase()+")"),W("Video Element Error: "+t),e.error&&W(e.error),fe.mediaSourceError(t),G()}}function l(e){if(F()){var t=Se.getPlaybackQuality();t&&re.addDroppedFrames("video",t)}Ie.isSeeking()||e.timeToEnd<V&&oe.signalEndOfStream(Te)}function d(){var e=T();e&&C(ge,e,NaN),n(e?I.PlayListTrace.END_OF_PERIOD_STOP_REASON:I.PlayListTrace.END_OF_CONTENT_STOP_REASON)}function g(e){var t=S(e.seekTime);t&&t!==ge?(n(I.PlayListTrace.END_OF_PERIOD_STOP_REASON),C(ge,t,e.seekTime)):n(I.PlayListTrace.USER_REQUEST_STOP_REASON),r(I.PlayList.SEEK_START_REASON)}function h(){Me?(Me=!1,r(I.PlayList.INITIAL_PLAYOUT_START_REASON)):Ae&&(Ae=!1,r(I.PlayList.RESUME_FROM_PAUSE_START_REASON))}function m(e){e.ended||(Ae=!0,n(I.PlayListTrace.USER_REQUEST_STOP_REASON))}function y(e){Te&&e.streamInfo.isLast&&oe.signalEndOfStream(Te)}function T(){var e=ge.getStreamInfo().start,t=ge.getStreamInfo().duration;return ce.filter(function(n){return n.getStreamInfo().start===e+t})[0]}function S(e){var t=0,n=null,r=ce.length;r>0&&(t+=ce[0].getStartTime());for(var i=0;i<r;i++)if(n=ce[i],t+=n.getDuration(),e<t)return n;return null}function R(e,t){for(var n=null,r=0,i=0,a=null,o=ce.length,s=0;s<o;s++){if(n=ce[s],i=n.getStartTime(),a=n.getDuration(),Number.isFinite(i)&&(r=i),n.getId()===t)return e-r;Number.isFinite(a)&&(r+=a)}return null}function M(){var e=[];return ge.getProcessors().forEach(function(t){e.push(t.getIndexHandler().getEarliestTime())}),Math.min.apply(Math,e)}function C(e,t,n){function r(){isNaN(n)?!function(){var e=Ie.getStreamStartTime(!0);ge.getProcessors().forEach(function(t){ne.setIndexHandlerTime(t,e)}),Ie.seek(e)}():Ie.seek(n),Ie.play(),ge.startEventController(),me=!1,i(p["default"].PERIOD_SWITCH_COMPLETED,e,t)}!me&&e&&t&&e!==t&&(me=!0,i(p["default"].PERIOD_SWITCH_STARTED,e,t),e.deactivate(),ge=t,Ie.initialize(ge.getStreamInfo()),Ce=U(),D(r))}function D(e){function t(){W("MediaSource is open!"),window.URL.revokeObjectURL(n),Te.removeEventListener("sourceopen",t),Te.removeEventListener("webkitsourceopen",t),O(),ge.activate(Te),e&&e()}var n=void 0;Te?oe.detachMediaSource(Se):Te=oe.createMediaSource(),Te.addEventListener("sourceopen",t,!1),Te.addEventListener("webkitsourceopen",t,!1),n=oe.attachMediaSource(Te,Se),W("MediaSource attached to element. Waiting on open...")}function O(){var e,t;e=ge.getStreamInfo().manifestInfo.duration,t=oe.setDuration(Te,e),W("Duration successfully set to: "+t)}function P(){var e,t,n,r,a,o,s,l=ee.getValue(),f=re.getMetricsFor("stream"),d=ie.getCurrentManifestUpdate(f),c=[];if(l){o=ne.getStreamsInfo(l),pe&&(Q.trigger(p["default"].PROTECTION_CREATED,{controller:pe,manifest:l}),pe.setMediaElement(Se.getElement()),he&&pe.setProtectionData(he));try{if(0===o.length)throw new Error("There are no streams");for(re.updateManifestUpdateInfo(d,{currentTime:Ie.getTime(),buffered:Se.getElement().buffered,presentationStartTime:o[0].start,clientTimeOffset:de.getClientTimeOffset()}),_e=!0,r=0,t=o.length;r<t;r++){for(e=o[r],a=0,n=ce.length;a<n;a++)ce[a].getId()===e.id&&(s=ce[a],c.push(s),s.updateData(e));s||(s=(0,u["default"])(z).create({manifestModel:ee,manifestUpdater:J,adapter:ne,timelineConverter:de,capabilities:Z,errHandler:fe,baseURLController:ue}),s.initialize(e,pe),Q.on(p["default"].STREAM_INITIALIZED,N,this),c.push(s),ge&&s.updateData(e)),re.addManifestUpdateStreamInfo(d,e.id,e.index,e.start,e.duration),s=null}ce=c,ge||(ge=ce[0],i(p["default"].PERIOD_SWITCH_STARTED,null,ge),Ie.initialize(ge.getStreamInfo()),i(p["default"].PERIOD_SWITCH_COMPLETED,null,ge)),Te||D(),_e=!1,w()}catch(g){fe.manifestError(g.message,"nostreamscomposed",l),Ee=!0,G()}}}function w(){if(!_e){var e=ce.length,t=0;for(a(),t;t<e;t++)if(!ce[t].isInitialized())return;Q.trigger(p["default"].STREAMS_COMPOSED)}}function N(){w()}function L(){P()}function x(e){if(e.error)Ee=!0,G();else{var t,n,r=e.manifest,i=ne.getStreamsInfo(r)[0],a=ne.getMediaInfoForType(r,i,"video")||ne.getMediaInfoForType(r,i,"audio");a&&(t=ne.getDataForMedia(a),n=te.getRepresentationsForAdaptation(r,t)[0].useCalculatedLiveEdgeTime,n&&(W("SegmentTimeline detected using calculated Live Edge Time"),Re.setUseManifestDateHeaderTimeSource(!1)));var o=te.getUTCTimingSources(e.manifest),s=!te.getIsDynamic(r)||n?o:o.concat(Re.getUTCTimingSources()),u=(0,v["default"])(z).getInstance().isManifestHTTPS();s.forEach(function(e){e.value.replace(/.*?:\/\//g,"")===E["default"].DEFAULT_UTC_TIMING_SOURCE.value.replace(/.*?:\/\//g,"")&&(e.value=e.value.replace(u?new RegExp(/^(http:)?\/\//i):new RegExp(/^(https:)?\/\//i),u?"https://":"http://"),W("Matching default timing source protocol to manifest protocol: ",e.value))}),ue.initialize(r),se.setConfig({metricsModel:re,dashMetrics:ie}),se.initialize(s,Re.getUseManifestDateHeaderTimeSource())}}function F(){return void 0===Ce&&(Ce=U()),Ce}function U(){var e=!1;return ge.getProcessors().forEach(function(t){"video"===t.getMediaInfo().type&&(e=!0)}),e}function B(){return ve}function k(){return ge?ge.getStreamInfo():null}function j(e){return ge.getId()===e.id}function K(e){return ce.filter(function(t){return t.getId()===e})[0]}function H(e){$.load(e)}function q(e){J.setManifest(e)}function Y(e){e&&(e.capabilities&&(Z=e.capabilities),e.manifestLoader&&($=e.manifestLoader),e.manifestModel&&(ee=e.manifestModel),e.dashManifestModel&&(te=e.dashManifestModel),e.protectionController&&(pe=e.protectionController),e.adapter&&(ne=e.adapter),e.metricsModel&&(re=e.metricsModel),e.dashMetrics&&(ie=e.dashMetrics),e.liveEdgeFinder&&(ae=e.liveEdgeFinder),e.mediaSourceController&&(oe=e.mediaSourceController),e.timeSyncController&&(se=e.timeSyncController),e.baseURLController&&(ue=e.baseURLController),e.errHandler&&(fe=e.errHandler),e.timelineConverter&&(de=e.timelineConverter))}function G(){se.reset(),n(ye||Ee?I.PlayListTrace.FAILURE_STOP_REASON:I.PlayListTrace.USER_REQUEST_STOP_REASON);for(var e=0,t=ce.length;e<t;e++){var r=ce[e];Q.off(p["default"].STREAM_INITIALIZED,N,this),r.reset(ye)}ce=[],Q.off(p["default"].PLAYBACK_TIME_UPDATED,l,this),Q.off(p["default"].PLAYBACK_SEEKING,g,this),Q.off(p["default"].PLAYBACK_ERROR,s,this),Q.off(p["default"].PLAYBACK_STARTED,h,this),Q.off(p["default"].PLAYBACK_PAUSED,m,this),Q.off(p["default"].PLAYBACK_ENDED,d,this),Q.off(p["default"].MANIFEST_UPDATED,x,this),Q.off(p["default"].STREAM_BUFFERING_COMPLETED,y,this),ue.reset(),J.reset(),re.clearAllCurrentMetrics(),ee.setValue(null),$.reset(),de.reset(),ae.reset(),ne.reset(),le.reset(),me=!1,_e=!1,ge=null,ye=!1,Ee=!1,Ce=void 0,Me=!0,Ae=!1,Te&&(oe.detachMediaSource(Se),Te=null),Se=null,pe&&(pe.setMediaElement(null),pe=null,he=null,ee.getValue()&&Q.trigger(p["default"].PROTECTION_DESTROYED,{data:ee.getValue().url})),Q.trigger(p["default"].STREAM_TEARDOWN_COMPLETE)}var V=1,z=this.context,W=(0,A["default"])(z).getInstance().log,Q=(0,c["default"])(z).getInstance(),X=void 0,Z=void 0,J=void 0,$=void 0,ee=void 0,te=void 0,ne=void 0,re=void 0,ie=void 0,ae=void 0,oe=void 0,se=void 0,ue=void 0,le=void 0,fe=void 0,de=void 0,ce=void 0,ge=void 0,pe=void 0,he=void 0,ve=void 0,me=void 0,_e=void 0,ye=void 0,Ee=void 0,Te=void 0,Se=void 0,Ie=void 0,Re=void 0,Ae=void 0,Me=void 0,be=void 0,Ce=void 0;return X={initialize:t,getAutoPlay:B,getActiveStreamInfo:k,isStreamActive:j,isVideoTrackPresent:F,getStreamById:K,getTimeRelativeToStreamId:R,load:H,loadWithManifest:q,getActiveStreamCommonEarliestTime:M,setConfig:Y,reset:G},e(),X}Object.defineProperty(t,"__esModule",{value:!0});var a=n(9),o=r(a),s=n(101),u=r(s),l=n(99),f=r(l),d=n(3),c=r(d),g=n(2),p=r(g),h=n(40),v=r(h),m=n(19),_=r(m),y=n(5),E=r(y),T=n(1),S=r(T),I=n(70),R=n(4),A=r(R),M=n(68),b=r(M);i.__dashjs_factory_name="StreamController",t["default"]=S["default"].getSingletonFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(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)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=n(34),s=r(o),u=function(){function e(){i(this,e)}return a(e,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,r>0&&(t+=4+16*n.getUint32(t)),t+=4,e.slice(t)}},{key:"getPSSHForKeySystem",value:function(t,n){var r=e.parsePSSHList(n);return r.hasOwnProperty(t.uuid.toLowerCase())?r[t.uuid.toLowerCase()]:null}},{key:"parseInitDataFromContentProtection",value:function(e){return"pssh"in e?s["default"].decodeArray(e.pssh.__text).buffer:null}},{key:"parsePSSHList",value:function(e){if(null===e)return[];for(var t=new DataView(e),n=!1,r={},i=0;!n;){var a,o,s,u,l,f=i;if(i>=t.buffer.byteLength)break;if(a=t.getUint32(i),o=i+a,i+=4,1886614376===t.getUint32(i))if(i+=4,s=t.getUint8(i),0===s||1===s){i++,i+=3,u="";var d,c;for(d=0;d<4;d++)c=t.getUint8(i+d).toString(16),u+=1===c.length?"0"+c:c;for(i+=4,u+="-",d=0;d<2;d++)c=t.getUint8(i+d).toString(16),u+=1===c.length?"0"+c:c;for(i+=2,u+="-",d=0;d<2;d++)c=t.getUint8(i+d).toString(16),u+=1===c.length?"0"+c:c;for(i+=2,u+="-",d=0;d<2;d++)c=t.getUint8(i+d).toString(16),u+=1===c.length?"0"+c:c;for(i+=2,u+="-",d=0;d<6;d++)c=t.getUint8(i+d).toString(16),u+=1===c.length?"0"+c:c;i+=6,u=u.toLowerCase(),l=t.getUint32(i),i+=4,r[u]=t.buffer.slice(f,o),i=o}else i=o;else i=o}return r}}]),e}();t["default"]=u,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(e){var t="";return e.indexOf("/")!==-1&&(e.indexOf("?")!==-1&&(e=e.substring(0,e.indexOf("?"))),t=e.substring(0,e.lastIndexOf("/")+1)),t}function t(e){var t=e.match(u);return t?t[1]:""}function n(e){return!o.test(e)}function r(e){return o.test(e)&&"/"===e.charAt(0)}function i(e){return s.test(e)}var a=void 0,o=/^(?:(?:[a-z]+:)?\/)?\//i,s=/^https?:\/\//i,u=/^(https?:\/\/[^\/]+)\/?/i;return a={parseBaseUrl:e,parseOrigin:t,isRelative:n,isPathAbsolute:r,isHTTPURL:i}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),o=r(a);i.__dashjs_factory_name="URLUtils",t["default"]=o["default"].getSingletonFactory(i),e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function i(){n(this,i),this.action=i.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"};r.ACTION_DOWNLOAD="download",r.ACTION_COMPLETE="complete",t["default"]=r,e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(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)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function(){function e(){n(this,e)}return r(e,[{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&&e[i].indexOf("public_")===-1||(this[i]=e[i])}}}]),e}();t["default"]=i,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){for(;e.length<t;)e="0"+e;return e}function a(e,t){return e.representation.startNumber+t}function o(e,t,n){for(var r,a,o,s,u,l,f="%0",d=t.length,c=f.length;;){if(r=e.indexOf("quot;+t),r<0)return e;if(a=e.indexOf("quot;,r+d),a<0)return e;if(o=e.indexOf(f,r+d),o>r&&o<a)switch(s=e.charAt(a-1),u=parseInt(e.substring(o+c,a-1),10),s){case"d":case"i":case"u":l=i(n.toString(),u);break;case"x":l=i(n.toString(16),u);break;case"X":l=i(n.toString(16),u).toUpperCase();break;case"o":l=i(n.toString(8),u);break;default:return e}else l=n;e=e.substring(0,r)+l+e.substring(a+1)}}function s(e,t,n,r){var i,o,s,u;return o=n.segmentDuration,isNaN(o)&&(o=n.adaptation.period.duration),s=n.adaptation.period.start+r*o,u=s+o,i=new g["default"],i.representation=n,i.duration=o,i.presentationStartTime=s,i.mediaStartTime=e.calcMediaTimeFromPresentationTime(i.presentationStartTime,n),i.availabilityStartTime=e.calcAvailabilityStartTimeFromPresentationTime(i.presentationStartTime,n.adaptation.period.mpd,t),i.availabilityEndTime=e.calcAvailabilityEndTimeFromPresentationTime(u,n.adaptation.period.mpd,t),i.wallStartTime=e.calcWallTimeForSegment(i,t),i.replacementNumber=a(i,r),i.availabilityIdx=r,i}function u(e,t,n,r,i,s,u,l,f){var d,c,p,h=r/s,v=Math.min(i/s,n.adaptation.period.mpd.maxSegmentDuration);return d=e.calcPresentationTimeFromMediaTime(h,n),c=d+v,p=new g["default"],p.representation=n,p.duration=v,p.mediaStartTime=h,p.presentationStartTime=d,p.availabilityStartTime=n.adaptation.period.mpd.manifest.loadedTime,p.availabilityEndTime=e.calcAvailabilityEndTimeFromPresentationTime(c,n.adaptation.period.mpd,t),p.wallStartTime=e.calcWallTimeForSegment(p,t),p.replacementTime=r,p.replacementNumber=a(p,f),u=o(u,"Number",p.replacementNumber),u=o(u,"Time",p.replacementTime),p.media=u,p.mediaRange=l,p.availabilityIdx=f,p}function l(e,t){if(!t||!t.segments)return null;var n,r,i=t.segments.length;if(e<i&&(n=t.segments[e],n&&n.availabilityIdx===e))return n;for(r=0;r<i;r++)if(n=t.segments[r],n&&n.availabilityIdx===e)return n;return null}function f(e,t,n,r,i){var a,o,s,u=2,l=i||10,f=0,d=Number.POSITIVE_INFINITY;return t&&!e.isTimeSyncCompleted()?s={start:f,end:d}:!t&&n||r<0?null:(a=Math.max(r-u,f),o=Math.min(r+l,d),s={start:a,end:o})}function d(e,t,n,r,i,a){var o,s,u,f=n.segmentDuration,d=n.adaptation.period.mpd.manifest.minBufferTime,c=n.segmentAvailabilityRange,g={start:e.calcPeriodRelativeTimeFromMpdRelativeTime(n,c.start),end:e.calcPeriodRelativeTimeFromMpdRelativeTime(n,c.end)},p=n.segments,h=2*f,v=a||Math.max(2*d,10*f),m=NaN,_=null;return g.start=Math.max(g.start,0),t&&!e.isTimeSyncCompleted()?(o=Math.floor(g.start/f),s=Math.floor(g.end/f),u={start:o,end:s}):(p&&p.length>0?(_=l(i,n),m=_?e.calcPeriodRelativeTimeFromMpdRelativeTime(n,_.presentationStartTime):i>0?i*f:e.calcPeriodRelativeTimeFromMpdRelativeTime(n,r)):m=i>0?i*f:t?g.end:g.start,o=Math.floor(Math.max(m-h,g.start)/f),s=Math.floor(Math.min(o+v/f,g.end/f)),u={start:o,end:s})}Object.defineProperty(t,"__esModule",{value:!0}),t.replaceTokenForTemplate=o,t.getIndexBasedSegment=s,t.getTimeBasedSegment=u,t.getSegmentByIndex=l,t.decideSegmentListRangeForTimeline=f,t.decideSegmentListRangeForTemplate=d;var c=n(37),g=r(c)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(){A=0,M=!1,b=NaN,I.on(u["default"].LIVE_EDGE_SEARCH_COMPLETED,_,this),I.on(u["default"].TIME_SYNCHRONIZATION_COMPLETED,y,this)}function t(){return M}function n(e){M=e}function r(){return A}function i(){return b}function a(e){b=e}function s(e,t,n,r){var i=NaN;return i=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-A)):t.availabilityStartTime}function l(e,t,n){return s.call(this,e,t,n)}function f(e,t,n){return s.call(this,e,t,n,!0)}function d(e,t){return(e.getTime()-t.mpd.availabilityStartTime.getTime()+1e3*A)/1e3}function c(e,t){var n=t.adaptation.period.start,r=t.presentationTimeOffset;return e+(n-r)}function g(e,t){var n=t.adaptation.period.start,r=t.presentationTimeOffset;return e-n+r}function p(e,t){var n,r,i;return t&&(n=e.representation.adaptation.period.mpd.suggestedPresentationDelay,r=e.presentationStartTime+n,i=new Date(e.availabilityStartTime.getTime()+1e3*r)),i}function h(e,t){var n,r,i=e.adaptation.period.start,a=i+e.adaptation.period.duration,o={start:i,end:a},s=e.segmentDuration||(e.segments&&e.segments.length?e.segments[e.segments.length-1].duration:0);if(!t)return o;if(!M&&e.segmentAvailabilityRange)return e.segmentAvailabilityRange;n=e.adaptation.period.mpd.checkTime,r=d(new Date,e.adaptation.period),i=Math.max(r-e.adaptation.period.mpd.timeShiftBufferDepth,e.adaptation.period.start);
29
- var u=isNaN(n)?r:Math.min(n,r),l=e.adaptation.period.start+e.adaptation.period.duration;return a=(u>=l&&u-s<l?l:u)-s,o={start:i,end:a}}function v(e,t){var n=e.adaptation.period.start;return t-n}function m(e,t){var n=e.adaptation.period.start;return t+n}function _(e){M||e.error||(A+=e.liveEdge-(b+e.searchTime),M=!0)}function y(e){M||e.error||(A=e.offset/1e3,M=!0)}function E(e){var t=e.presentationTimeOffset,n=e.adaptation.period.start;return n-t}function T(){I.off(u["default"].LIVE_EDGE_SEARCH_COMPLETED,_,this),I.off(u["default"].TIME_SYNCHRONIZATION_COMPLETED,y,this),A=0,M=!1,b=NaN}var S=this.context,I=(0,o["default"])(S).getInstance(),R=void 0,A=void 0,M=void 0,b=void 0;return R={initialize:e,isTimeSyncCompleted:t,setTimeSyncCompleted:n,getClientTimeOffset:r,getExpectedLiveEdge:i,setExpectedLiveEdge:a,calcAvailabilityStartTimeFromPresentationTime:l,calcAvailabilityEndTimeFromPresentationTime:f,calcPresentationTimeFromWallTime:d,calcPresentationTimeFromMediaTime:c,calcPeriodRelativeTimeFromMpdRelativeTime:v,calcMpdRelativeTimeFromPeriodRelativeTime:m,calcMediaTimeFromPresentationTime:g,calcSegmentAvailabilityRange:h,calcWallTimeForSegment:p,calcMSETimeOffset:E,reset:T}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),o=r(a),s=n(2),u=r(s),l=n(1),f=r(l);i.__dashjs_factory_name="TimelineConverter",t["default"]=f["default"].getSingletonFactory(i),e.exports=t["default"]},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}function a(e){function t(){var e;h=[],v=[],m=[],e={},i(e,o.HTTPRequest.MPD_TYPE,c["default"].DOWNLOAD_ERROR_ID_MANIFEST),i(e,o.HTTPRequest.XLINK_EXPANSION_TYPE,c["default"].DOWNLOAD_ERROR_ID_XLINK),i(e,o.HTTPRequest.INIT_SEGMENT_TYPE,c["default"].DOWNLOAD_ERROR_ID_INITIALIZATION),i(e,o.HTTPRequest.MEDIA_SEGMENT_TYPE,c["default"].DOWNLOAD_ERROR_ID_CONTENT),i(e,o.HTTPRequest.INDEX_SEGMENT_TYPE,c["default"].DOWNLOAD_ERROR_ID_CONTENT),i(e,o.HTTPRequest.BITSTREAM_SWITCHING_SEGMENT_TYPE,c["default"].DOWNLOAD_ERROR_ID_CONTENT),i(e,o.HTTPRequest.OTHER_TYPE,c["default"].DOWNLOAD_ERROR_ID_CONTENT),_=e}function n(e,t){var r=e.request,i=new XMLHttpRequest,a=[],o=!0,s=!0,f=new Date,c=f,p=0,y=function(e){s=!1,r.requestStartDate=f,r.requestEndDate=new Date,r.firstByteDate=r.firstByteDate||f,r.checkExistenceOnly||d.addHttpRequest(r.mediaType,null,r.type,r.url,i.responseURL||null,r.serviceLocation||null,r.range||null,r.requestStartDate,r.firstByteDate,r.requestEndDate,i.status,r.duration,i.getAllResponseHeaders(),e?a:null)},E=function(){h.indexOf(i)!==-1&&(h.splice(h.indexOf(i),1),s&&(y(!1),t>0?(t--,m.push(setTimeout(function(){n(e,t)},u.getRetryIntervalForType(r.type)))):(l.downloadError(_[r.type],r.url,r),e.error&&e.error(r,"error",i.statusText),e.complete&&e.complete(r,i.statusText))))},T=function(t){var n=new Date;o&&(o=!1,(!t.lengthComputable||t.lengthComputable&&t.total!==t.loaded)&&(r.firstByteDate=n)),t.lengthComputable&&(r.bytesLoaded=t.loaded,r.bytesTotal=t.total),a.push({s:c,d:n.getTime()-c.getTime(),b:[t.loaded?t.loaded-p:0]}),c=n,p=t.loaded,e.progress&&e.progress()},S=function(){i.status>=200&&i.status<=299&&(y(!0),e.success&&e.success(i.response,i.statusText,i),e.complete&&e.complete(r,i.statusText))};try{var I=g.modifyRequestURL(r.url),R=r.checkExistenceOnly?"HEAD":"GET";i.open(R,I,!0),r.responseType&&(i.responseType=r.responseType),r.range&&i.setRequestHeader("Range","bytes="+r.range),r.requestStartDate||(r.requestStartDate=f),i=g.modifyRequestHeader(i),i.withCredentials=u.getXHRWithCredentials(),i.onload=S,i.onloadend=E,i.onerror=E,i.onprogress=T;var A=(new Date).getTime();isNaN(r.delayLoadingTime)||A>=r.delayLoadingTime?(h.push(i),i.send()):!function(){var e={xhr:i};v.push(e),e.delayTimeout=setTimeout(function(){if(v.indexOf(e)!==-1){v.splice(v.indexOf(e),1);try{h.push(e.xhr),e.xhr.send()}catch(t){e.xhr.onerror()}}},r.delayLoadingTime-A)}()}catch(M){i.onerror()}}function r(e){e.request&&n(e,u.getRetryAttemptsForType(e.request.type))}function a(){m.forEach(function(e){return clearTimeout(e)}),m=[],v.forEach(function(e){return clearTimeout(e.delayTimeout)}),v=[],h.forEach(function(e){e.onloadend=e.onerror=e.onprogress=void 0,e.abort()}),h=[]}var s=this.context,u=(0,f["default"])(s).getInstance(),l=e.errHandler,d=e.metricsModel,g=e.requestModifier,p=void 0,h=void 0,v=void 0,m=void 0,_=void 0;return p={load:r,abort:a},t(),p}Object.defineProperty(t,"__esModule",{value:!0});var o=n(7),s=n(1),u=r(s),l=n(5),f=r(l),d=n(11),c=r(d);a.__dashjs_factory_name="XHRLoader";var g=u["default"].getClassFactory(a);t["default"]=g,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(e,t){var n=t.codec,r=null;try{if(n.match(/application\/mp4;\s*codecs="(stpp|wvtt)"/i))throw new R["default"]("not really supported");r=e.addSourceBuffer(n)}catch(i){if(!t.isText&&n.indexOf('codecs="stpp"')===-1&&n.indexOf('codecs="wvtt"')===-1)throw i;r=(0,o["default"])(y).getInstance(),r.setConfig({errHandler:(0,c["default"])(y).getInstance(),adapter:(0,f["default"])(y).getInstance(),dashManifestModel:A,mediaController:(0,u["default"])(y).getInstance(),videoModel:(0,S["default"])(y).getInstance(),streamController:(0,p["default"])(y).getInstance(),textTracks:(0,v["default"])(y).getInstance(),VTTParser:(0,_["default"])(y).getInstance(),TTMLParser:(0,E["default"])(y).getInstance()})}return r}function t(e,t){try{e.removeSourceBuffer(t)}catch(n){}}function n(e,t,n){var r,i,a=null,o=0,s=0,u=null,l=null,f=0,d=n||.15;try{a=e.buffered}catch(c){return null}if(null!==a&&void 0!==a){for(i=0,r=a.length;i<r;i++)if(o=a.start(i),s=a.end(i),null===u)f=Math.abs(o-t),t>=o&&t<s?(u=o,l=s):f<=d&&(u=o,l=s);else{if(f=o-l,!(f<=d))break;l=s}if(null!==u)return{start:u,end:l}}return null}function r(e){var t=null;try{return t=e.buffered}catch(n){return null}}function i(e){var t,n,i=r(e),a=0;if(!i)return a;for(n=0,t=i.length;n<t;n++)a+=i.end(n)-i.start(n);return a}function a(e,t,r){var i,a;return i=n(e,t,r),a=null===i?0:i.end-t}function s(e,t){if(!t)return null;var n,i,a,o,s,u,l,f,d,c=r(t);if(!c)return null;for(var g=0,p=c.length;g<p;g++){if(f=e.length>g,s=f?{start:e.start(g),end:e.end(g)}:null,n=c.start(g),i=c.end(g),!s)return d={start:n,end:i};if(a=s.start===n,o=s.end===i,!a||!o){if(a)d={start:s.end,end:i};else{if(!o)return d={start:n,end:i};d={start:n,end:s.start}}return u=e.length>g+1?{start:e.start(g+1),end:e.end(g+1)}:null,l=g+1<p?{start:c.start(g+1),end:c.end(g+1)}:null,!u||l&&l.start===u.start&&l.end===u.end||(d.end=u.start),d}}return null}function l(e,t){var n=t.bytes,r="append"in e?"append":"appendBuffer"in e?"appendBuffer":null,i="Object"===Object.prototype.toString.call(e).slice(8,-1);if(r)try{m(e,function(){i?e[r](n,t):e[r](n),m(e,function(){T.trigger(C["default"].SOURCEBUFFER_APPEND_COMPLETED,{buffer:e,bytes:n})})})}catch(a){T.trigger(C["default"].SOURCEBUFFER_APPEND_COMPLETED,{buffer:e,bytes:n,error:new R["default"](a.code,a.message,null)})}}function d(e,t,n,r){try{m(e,function(){t>=0&&n>t&&"ended"!==r.readyState&&e.remove(t,n),m(e,function(){T.trigger(C["default"].SOURCEBUFFER_REMOVE_COMPLETED,{buffer:e,from:t,to:n})})})}catch(i){T.trigger(C["default"].SOURCEBUFFER_REMOVE_COMPLETED,{buffer:e,from:t,to:n,error:new R["default"](i.code,i.message,null)})}}function g(e,t){try{"open"===e.readyState?t.abort():t.setTextTrack&&"ended"===e.readyState&&t.abort()}catch(n){}}function h(e){e&&e.dashManifestModel&&(A=e.dashManifestModel)}function m(e,t){var n,r=50,i=function(){e.updating||(clearInterval(n),t())},a=function s(){e.updating||(e.removeEventListener("updateend",s,!1),t())};if(!e.updating)return void t();if("function"==typeof e.addEventListener)try{e.addEventListener("updateend",a,!1)}catch(o){n=setInterval(i,r)}else n=setInterval(i,r)}var y=this.context,T=(0,M["default"])(y).getInstance(),I=void 0,A=void 0;return I={append:l,remove:d,abort:g,createSourceBuffer:e,removeSourceBuffer:t,getBufferRange:n,getAllRanges:r,getTotalBufferedTime:i,getBufferLength:a,getRangeDifference:s,setConfig:h}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(17),o=r(a),s=n(13),u=r(s),l=n(15),f=r(l),d=n(11),c=r(d),g=n(20),p=r(g),h=n(39),v=r(h),m=n(164),_=r(m),y=n(163),E=r(y),T=n(19),S=r(T),I=n(6),R=r(I),A=n(3),M=r(A),b=n(2),C=r(b),D=n(1),O=r(D),P=22;i.__dashjs_factory_name="SourceBufferController";var w=O["default"].getSingletonFactory(i);w.QUOTA_EXCEEDED_ERROR_CODE=P,t["default"]=w,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof t?"undefined":o(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)}var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};Object.defineProperty(t,"__esModule",{value:!0});var s=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}},u=n(24),l=r(u),f=function(e){function t(){i(this,t),s(Object.getPrototypeOf(t.prototype),"constructor",this).call(this),this.METRICS_INITIALISATION_COMPLETE="internal_metricsReportingInitialized",this.BECAME_REPORTING_PLAYER="internal_becameReportingPlayer"}return a(t,e),t}(l["default"]),d=new f;t["default"]=d,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){function t(){D=null,w=null,O=[],P=[],M.on(u["default"].LOADING_COMPLETED,S,C)}function n(e){w=e}function r(e){D=e}function i(){return D}function a(e){var t=function(e,t){return e.action===c["default"].ACTION_COMPLETE&&e.action===t.action},n=function(e,t){return!isNaN(e.index)&&e.startTime===t.startTime&&e.adaptationIndex===t.adaptationIndex},r=function(e,t){return isNaN(e.index)&&isNaN(t.index)&&e.quality===t.quality},i=function(i){var a=!1;return i.some(function(i){if(n(e,i)||r(e,i)||t(e,i))return a=!0}),a};return i(O)}function s(e){var t=e.state instanceof Array?e.state:[e.state],n=[];return t.forEach(function(t){var r=E(t);n=n.concat(y(r,e))}),n}function l(e){O=O.filter(function(t){return isNaN(t.startTime)||t.startTime>=e})}function f(){w.abort(),P=[]}function d(e){switch(e.action){case c["default"].ACTION_COMPLETE:O.push(e),T(e,v),M.trigger(u["default"].STREAM_COMPLETED,{request:e,fragmentModel:this});break;case c["default"].ACTION_DOWNLOAD:T(e,h),P.push(e),g(e);break;default:A("Unknown request action.")}}function g(e){M.trigger(u["default"].FRAGMENT_LOADING_STARTED,{sender:C,request:e}),w.load(e)}function m(e,t,n){for(var r=e.length-1,i=r;i>=0;i--){var a=e[i],o=a.startTime,s=o+a.duration;if(n=void 0!==n?n:a.duration/2,!isNaN(o)&&!isNaN(s)&&t+n>=o&&t-n<s||isNaN(o)&&isNaN(t))return a}return null}function y(e,t){return t.hasOwnProperty("time")?[m(e,t.time,t.threshold)]:e.filter(function(e){for(var n in t)if("state"!==n&&t.hasOwnProperty(n)&&e[n]!=t[n])return!1;return!0})}function E(e){var t=void 0;switch(e){case h:t=P;break;case v:t=O;break;default:t=[]}return t}function T(e,t){b.addSchedulingInfo(e.mediaType,new Date,e.type,e.startTime,e.availabilityStartTime,e.duration,e.quality,e.range,t),b.addRequestsQueue(e.mediaType,P,O)}function S(e){e.sender===w&&(P.splice(P.indexOf(e.request),1),e.response&&!e.error&&O.push(e.request),T(e.request,e.error?_:v),M.trigger(u["default"].FRAGMENT_LOADING_COMPLETED,{request:e.request,response:e.response,error:e.error,sender:this}))}function I(){M.off(u["default"].LOADING_COMPLETED,S,this),w&&(w.reset(),w=null),O=[],P=[]}var R=this.context,A=(0,p["default"])(R).getInstance().log,M=(0,o["default"])(R).getInstance(),b=e.metricsModel,C=void 0,D=void 0,O=void 0,P=void 0,w=void 0;return C={setLoader:n,setScheduleController:r,getScheduleController:i,getRequests:s,isFragmentLoaded:a,removeExecutedRequestsBeforeTime:l,abortRequests:f,executeRequest:d,reset:I},t(),C}Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),o=r(a),s=n(2),u=r(s),l=n(1),f=r(l),d=n(23),c=r(d),g=n(4),p=r(g),h="loading",v="executed",m="canceled",_="failed";i.__dashjs_factory_name="FragmentModel";var y=f["default"].getClassFactory(i);y.FRAGMENT_MODEL_LOADING=h,y.FRAGMENT_MODEL_EXECUTED=v,y.FRAGMENT_MODEL_CANCELED=m,y.FRAGMENT_MODEL_FAILED=_,t["default"]=y,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(){return a}function t(e){a=e,e&&r.trigger(u["default"].MANIFEST_LOADED,{data:e})}var n=this.context,r=(0,o["default"])(n).getInstance(),i=void 0,a=void 0;return i={getValue:e,setValue:t}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),o=r(a),s=n(2),u=r(s),l=n(1),f=r(l);i.__dashjs_factory_name="ManifestModel",t["default"]=f["default"].getSingletonFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(e){e&&e.log&&(y=e.log)}function t(){T=[];var e;e=(0,c["default"])(h).getInstance(),T.push(e),e=(0,f["default"])(h).getInstance(),T.push(e),e=(0,u["default"])(h).getInstance(),T.push(e),S=e}function n(){return T}function r(e){for(var t=0;t<T.length;t++)if(T[t].systemString===e)return T[t];return null}function i(e){return e===S}function a(e,t){if(e.byteLength===t.byteLength){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}return!1}function s(e){var t,n,r,i,a=[];if(e)for(r=0;r<T.length;++r)for(n=T[r],i=0;i<e.length;++i)if(t=e[i],t.schemeIdUri.toLowerCase()===n.schemeIdURI){var o=n.getInitData(t);o&&a.push({ks:T[r],initData:o})}return a}function l(e,t){var n,r=[],i=o["default"].parsePSSHList(e);for(n=0;n<T.length;++n){var a=T[n].systemString,s=!t||a in t;T[n].uuid in i&&s&&r.push({ks:T[n],initData:i[T[n].uuid]})}return r}function d(e,t,n){if("license-release"===n||"individualization-request"===n)return null;var r=null;return t&&t.hasOwnProperty("drmtoday")?r=(0,p["default"])(h).getInstance():"com.widevine.alpha"===e.systemString?r=(0,_["default"])(h).getInstance():"com.microsoft.playready"===e.systemString?r=(0,v["default"])(h).getInstance():"org.w3.clearkey"===e.systemString&&(r=(0,E["default"])(h).getInstance()),r}function g(e,t){try{return S.getClearKeysFromProtectionData(e,t)}catch(n){return y("Failed to retrieve clearkeys from ProtectionData"),null}}var h=this.context,m=void 0,y=void 0,T=void 0,S=void 0;return m={initialize:t,isClearKey:i,initDataEquals:a,getKeySystems:n,getKeySystemBySystemString:r,getSupportedKeySystemsFromContentProtection:s,getSupportedKeySystems:l,getLicenseServer:d,processClearKeyLicenseRequest:g,setConfig:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(21),o=r(a),s=n(135),u=r(s),l=n(137),f=r(l),d=n(136),c=r(d),g=n(142),p=r(g),h=n(143),v=r(h),m=n(144),_=r(m),y=n(141),E=r(y),T=n(1),S=r(T);i.__dashjs_factory_name="ProtectionKeyController",t["default"]=S["default"].getSingletonFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(e){return e}function t(e){return e}var n=void 0;return n={modifyRequestURL:e,modifyRequestHeader:t}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),o=r(a);i.__dashjs_factory_name="RequestModifier",t["default"]=o["default"].getSingletonFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";var r={};r.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),t.push(128|63&r)):r<65536?(t.push(224|r>>12),t.push(128|63&r>>6),t.push(128|63&r)):(t.push(240|r>>18),t.push(128|63&r>>12),t.push(128|63&r>>6),t.push(128|63&r))}return t},r.decode=function(e){for(var t=[],n=0;n<e.length;){var r=e[n++];r<128||(r<224?(r=(31&r)<<6,r|=63&e[n++]):r<240?(r=(15&r)<<12,r|=(63&e[n++])<<6,r|=63&e[n++]):(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("")};var i={};!function(e){var t=function(t){for(var n=0,r=[],i=0|t.length/3;0<i--;){var a=(t[n]<<16)+(t[n+1]<<8)+t[n+2];n+=3,r.push(e.charAt(63&a>>18)),r.push(e.charAt(63&a>>12)),r.push(e.charAt(63&a>>6)),r.push(e.charAt(63&a))}if(2==t.length-n){var a=(t[n]<<16)+(t[n+1]<<8);r.push(e.charAt(63&a>>18)),r.push(e.charAt(63&a>>12)),r.push(e.charAt(63&a>>6)),r.push("=")}else if(1==t.length-n){var a=t[n]<<16;r.push(e.charAt(63&a>>18)),r.push(e.charAt(63&a>>12)),r.push("==")}return r.join("")},n=function(){for(var t=[],n=0;n<e.length;++n)t[e.charCodeAt(n)]=n;return t["=".charCodeAt(0)]=0,t}(),o=function(e){for(var t=0,r=[],i=0|e.length/4;0<i--;){var a=(n[e.charCodeAt(t)]<<18)+(n[e.charCodeAt(t+1)]<<12)+(n[e.charCodeAt(t+2)]<<6)+n[e.charCodeAt(t+3)];r.push(255&a>>16),r.push(255&a>>8),r.push(255&a),t+=4}return r&&("="==e.charAt(t-2)?(r.pop(),r.pop()):"="==e.charAt(t-1)&&r.pop()),r},u={};u.encode=function(e){for(var t=[],n=0;n<e.length;++n)t.push(e.charCodeAt(n));return t},u.decode=function(e){for(var t=0;t<s.length;++t)a[t]=String.fromCharCode(a[t]);return a.join("")},i.decodeArray=function(e){var t=o(e);return new Uint8Array(t)},i.encodeASCII=function(e){var n=u.encode(e);return t(n)},i.decodeASCII=function(e){var t=o(e);return u.decode(t)},i.encode=function(e){var n=r.encode(e);return t(n)},i.decode=function(e){var t=o(e);return r.decode(t)}}("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"),t.decode=i.decode,t.decodeArray=i.decodeArray},function(e,t){"use strict";function n(e,t,n){function r(e){var t=e.localName;return null==t&&(t=e.baseName),null!=t&&""!=t||(t=e.nodeName),t}function i(e){return e.prefix}function a(e){return"string"==typeof e?e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;").replace(/\//g,"&#x2F;"):e}function o(e){return e.replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/g,'"').replace(/&#x27;/g,"'").replace(/&#x2F;/g,"/")}function s(a){if(a.nodeType==E.DOCUMENT_NODE){var u,l,f,d=a.firstChild;for(l=0,f=a.childNodes.length;l<f;l+=1)if(a.childNodes[l].nodeType!==E.COMMENT_NODE){d=a.childNodes[l];break}if(n)u=s(d);else{u={};var c=r(d);u[c]=s(d)}return u}if(a.nodeType==E.ELEMENT_NODE){var u=new Object;u.__cnt=0;for(var g=[],p=a.childNodes,h=0;h<p.length;h++){var d=p.item(h),c=r(d);if(u.__cnt++,null==u[c]){var v=s(d);if("#text"!=c||/[^\s]/.test(v)){var m={};m[c]=v,g.push(m)}u[c]=v,u[c+"_asArray"]=new Array(1),u[c+"_asArray"][0]=u[c]}else{if(null!=u[c]&&!(u[c]instanceof Array)){var _=u[c];u[c]=new Array,u[c][0]=_,u[c+"_asArray"]=u[c]}for(var T=0;null!=u[c][T];)T++;var v=s(d);if("#text"!=c||/[^\s]/.test(v)){var m={};m[c]=v,g.push(m)}u[c][T]=v}}u.__children=g;for(var S=0;S<a.attributes.length;S++){var I=a.attributes.item(S);u.__cnt++;for(var R=I.value,A=0,M=e.length;A<M;A++){var b=e[A];b.test(I)&&(R=b.converter(I.value))}u[t+I.name]=R}var C=i(a);return null!=C&&""!=C&&(u.__cnt++,u.__prefix=C),1==u.__cnt&&null!=u["#text"]&&(u=u["#text"]),null!=u["#text"]&&(u.__text=u["#text"],y&&(u.__text=o(u.__text)),delete u["#text"],delete u["#text_asArray"]),null!=u["#cdata-section"]&&(u.__cdata=u["#cdata-section"],delete u["#cdata-section"],delete u["#cdata-section_asArray"]),null==u.__text&&null==u.__cdata||(u.toString=function(){return(null!=this.__text?this.__text:"")+(null!=this.__cdata?this.__cdata:"")}),u}return a.nodeType==E.TEXT_NODE||a.nodeType==E.CDATA_SECTION_NODE?a.nodeValue:a.nodeType==E.COMMENT_NODE?null:void 0}function u(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];i+=" "+o.substr(1)+"='"+s+"'"}return i+=r?"/>":">"}function l(e,t){return"</"+(null!=e.__prefix?e.__prefix+":":"")+t+">"}function f(e,t){return e.indexOf(t,e.length-t.length)!==-1}function d(e,t){return!!(f(t.toString(),"_asArray")||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 g(e){var t=[];if(e instanceof Object)for(var n in e)n.toString().indexOf("__")==-1&&0==n.toString().indexOf("_")&&t.push(n);return t}function p(e){var t="";return null!=e.__cdata&&(t+="<![CDATA["+e.__cdata+"]]>"),null!=e.__text&&(t+=y?a(e.__text):e.__text),t}function h(e){var t="";return e instanceof Object?t+=p(e):null!=e&&(t+=y?a(e):e),t}function v(e,t,n){var r="";if(0==e.length)r+=u(e,t,n,!0);else for(var i=0;i<e.length;i++)r+=u(e[i],t,g(e[i]),!1),r+=m(e[i]),r+=l(e[i],t);return r}function m(e){var t="",n=c(e);if(n>0)for(var r in e)if(!d(e,r)){var i=e[r],a=g(i);if(null==i||void 0==i)t+=u(i,r,a,!0);else if(i instanceof Object)if(i instanceof Array)t+=v(i,r,a);else{var o=c(i);o>0||null!=i.__text||null!=i.__cdata?(t+=u(i,r,a,!1),t+=m(i),t+=l(i,r)):t+=u(i,r,a,!0)}else t+=u(i,r,a,!1),t+=h(i),t+=l(i,r)}return t+=h(e)}null!==t&&void 0!==t||(t="_"),null!==n&&void 0!==n||(n=!1);var _="1.0.11",y=!1,E={ELEMENT_NODE:1,TEXT_NODE:3,CDATA_SECTION_NODE:4,COMMENT_NODE:8,DOCUMENT_NODE:9};this.parseXmlString=function(e){var t,n,r;if(window.DOMParser){n=new window.DOMParser;try{r=n.parseFromString("<","text/xml").getElementsByTagName("parsererror")[0].namespaceURI}catch(i){}try{t=n.parseFromString(e,"text/xml"),r&&t.getElementsByTagNameNS(r,"parsererror").length&&(t=void 0)}catch(i){}}else 0==e.indexOf("<?")&&(e=e.substr(e.indexOf("?>")+2)),t=new ActiveXObject("Microsoft.XMLDOM"),t.async="false",t.loadXML(e);return t},this.xml2json=function(e){return s(e)},this.xml_str2json=function(e){var t=this.parseXmlString(e);return t?this.xml2json(t):void 0},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 _},this.escapeMode=function(e){y=e}}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=n,e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(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)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function(){function e(t,r){n(this,e),this._test=t,this._converter=r}return r(e,[{key:"test",get:function(){return this._test}},{key:"converter",get:function(){return this._converter}}]),e}();t["default"]=i,e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function i(){n(this,i),this.indexRange=null,this.index=null,this.mediaRange=null,this.media=null,this.duration=NaN,this.replacementTime=null,this.replacementNumber=NaN,this.mediaStartTime=NaN,this.presentationStartTime=NaN,this.availabilityStartTime=NaN,this.availabilityEndTime=NaN,this.availabilityIdx=NaN,this.wallStartTime=NaN,this.representation=null};t["default"]=r,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof t?"undefined":o(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)}var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};Object.defineProperty(t,"__esModule",{value:!0});var s=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}},u=n(24),l=r(u),f=function(e){function t(){i(this,t),s(Object.getPrototypeOf(t.prototype),"constructor",this).call(this),this.BUFFER_EMPTY="bufferstalled",this.BUFFER_LOADED="bufferloaded",this.BUFFER_LEVEL_STATE_CHANGED="bufferStateChanged",this.ERROR="error",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="streamswitchcompleted",this.PERIOD_SWITCH_STARTED="streamswitchstarted",this.QUALITY_CHANGE_REQUESTED="qualityChangeRequested",this.QUALITY_CHANGE_RENDERED="qualityChangeRendered",this.STREAM_INITIALIZED="streaminitialized",this.TEXT_TRACKS_ADDED="alltexttracksadded",this.TEXT_TRACK_ADDED="texttrackadded",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_STARTED="playbackStarted",this.PLAYBACK_TIME_UPDATED="playbackTimeUpdated"}return a(t,e),t}(l["default"]),d=new f;t["default"]=d,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(){D=window.VTTCue||window.TextTrackCue,w=[],N=[],L=-1,x=0,F=0,U=0,B=0,k=null,j=null,q=!1,Y=2147483647,K=!!navigator.userAgent.match(/Chrome/)&&!navigator.userAgent.match(/Edge/),void 0!==document.fullscreenElement?H="fullscreenElement":void 0!==document.webkitIsFullScreen?H="webkitIsFullScreen":document.msFullscreenElement?H="msFullscreenElement":document.mozFullScreen&&(H="mozFullScreen")}function t(e){var t=w[e].kind,n=void 0!==w[e].label?w[e].label:w[e].lang,r=w[e].lang,i=K?document.createElement("track"):P.addTextTrack(t,n,r);return K&&(i.kind=t,i.label=n,i.srclang=r),i}function n(e){q=e,k&&!document[H]&&(k.style.zIndex=e?Y:null)}function r(e,n){if(w.length===n)return void b("Trying to add too many tracks.");if(w.push(e),void 0===P&&(P=e.video),w.length===n){w.sort(function(e,t){return e.index-t.index}),k=O.getTTMLRenderingDiv();for(var r=-1,i=0;i<w.length;i++){var a=t.call(this,i);N.push(a),w[i].defaultTrack&&(a["default"]=!0,r=i),K&&P.appendChild(a);var o=P.textTracks[i];o.nonAddedCues=[],k&&(w[i].isTTML||w[i].isEmbedded)?o.renderingType="html":o.renderingType="default",this.addCaptions(i,0,w[i].captionData),M.trigger(u["default"].TEXT_TRACK_ADDED)}v.call(this,r),r>=0&&(P.textTracks[r].mode="showing",this.addCaptions(r,0,null)),M.trigger(u["default"].TEXT_TRACKS_ADDED,{index:L,tracks:w})}}function i(e,t,n,r,i,a){var o=e/t,s=n/r,u=0,l=0;o>s?(l=t,u=l/r*n):(u=e,l=u/n*r);var f=0,d=0,c=0,g=0,p=u/l;return p>i?(g=l,c=l/(1/i),f=(e-c)/2,d=0):(c=u,g=u/i,f=0,d=(t-g)/2),a?{x:f+.1*c,y:d+.1*g,w:.8*c,h:.8*g}:{x:f,y:d,w:c,h:g}}function a(){var e=this.getCurrentTextTrack();if(e&&"html"===e.renderingType){var t=P.clientWidth/P.clientHeight,n=!1;e.isFromCEA608&&(t=3.5/3,n=!0);var r=i.call(this,P.clientWidth,P.clientHeight,P.videoWidth,P.videoHeight,t,n),a=r.w,o=r.h;if(a!=U||o!=B){x=r.x,F=r.y,U=a,B=o,k.style.left=x+"px",k.style.top=F+"px",k.style.width=U+"px",k.style.height=B+"px";for(var s=0;e.activeCues&&s<e.activeCues.length;++s){var u=e.activeCues[s];u.scaleCue(u)}H&&document[H]||q?k.style.zIndex=Y:k.style.zIndex=null}}}function s(e,t){var n=Math.round(.01*e*t).toString()+"px";return n}function l(e){var t=U,n=B;if(t*n!==0&&e.layout){var r=e.layout,i=s(r.left,t),a=s(r.top,n),o=s(r.width,t),u=s(r.height,n);k.style.left=i,k.style.top=a,k.style.width=o,k.style.height=u;var l=k.firstChild;l&&l.style&&(l.style.left="0px",l.style.top="0px",l.style.width=o,l.style.height=u)}}function f(e){var t,n,r,i=U,a=B,o=[i/e.cellResolution[0],a/e.cellResolution[1]];if(e.linePadding)for(t in e.linePadding)if(e.linePadding.hasOwnProperty(t)){var s=e.linePadding[t];n=(s*o[0]).toString();for(var u=document.getElementsByClassName("spanPadding"),l=0;l<u.length;l++)u[l].style.cssText=u[l].style.cssText.replace(/(padding-left\s*:\s*)[\d.,]+(?=\s*px)/gi,"$1"+n),u[l].style.cssText=u[l].style.cssText.replace(/(padding-right\s*:\s*)[\d.,]+(?=\s*px)/gi,"$1"+n)}if(e.fontSize)for(t in e.fontSize)if(e.fontSize.hasOwnProperty(t)){var f=e.fontSize[t]/100;n=(f*o[1]).toString(),r="defaultFontSize"!==t?document.getElementsByClassName(t):document.getElementsByClassName("paragraph");for(var d=0;d<r.length;d++)r[d].style.cssText=r[d].style.cssText.replace(/(font-size\s*:\s*)[\d.,]+(?=\s*px)/gi,"$1"+n)}if(e.lineHeight)for(t in e.lineHeight)if(e.lineHeight.hasOwnProperty(t)){var c=e.lineHeight[t]/100;n=(c*o[1]).toString(),r=document.getElementsByClassName(t);for(var g=0;g<r.length;g++)r[g].style.cssText=r[g].style.cssText.replace(/(line-height\s*:\s*)[\d.,]+(?=\s*px)/gi,"$1"+n)}}function d(e,t,n){var r=e>=0?P.textTracks[e]:null,i=this;if(r){if("showing"!==r.mode)return void(n&&n.length>0&&(r.nonAddedCues=r.nonAddedCues.concat(n)));if(n||(n=r.nonAddedCues,r.nonAddedCues=[]),n&&0!==n.length)for(var o in n){var s,u=n[o];r.cellResolution=u.cellResolution,r.isFromCEA608=u.isFromCEA608,j||"html"!==u.type&&"image"!==u.type||(j=setInterval(a.bind(this),500)),"image"===u.type?(s=new D(u.start-t,u.end-t,""),s.image=u.data,s.id=u.id,s.size=0,s.type="image",s.layout=u.layout,s.scaleCue=l.bind(i),s.onenter=function(){if(k&&"showing"===r.mode){var e=new Image;e.id="ttmlImage_"+this.id,e.src=this.image,e.style.cssText="z-index: 2147483648; pointer-events: none; display: block; visibility: visible !important; position: relative !important;",k.appendChild(e),l.call(i,this)}},s.onexit=function(){if(k)for(var e=k.childNodes,t=0;t<e.length;t++)e[t].id==="ttmlImage_"+this.id&&k.removeChild(e[t])}):"html"===u.type?(s=new D(u.start-t,u.end-t,""),s.cueHTMLElement=u.cueHTMLElement,s.regions=u.regions,s.regionID=u.regionID,s.cueID=u.cueID,s.videoWidth=u.videoWidth,s.videoHeight=u.videoHeight,s.cellResolution=u.cellResolution,s.fontSize=u.fontSize,s.lineHeight=u.lineHeight,s.linePadding=u.linePadding,s.scaleCue=f.bind(i),k.style.left=x+"px",k.style.top=F+"px",k.style.width=U+"px",k.style.height=B+"px",s.onenter=function(){"showing"===r.mode&&(b("Cue "+this.startTime+"-"+this.endTime+" : "+this.cueHTMLElement.id+" : "+this.cueHTMLElement.innerText),k.appendChild(this.cueHTMLElement),f.call(i,this))},s.onexit=function(){for(var e=k.childNodes,t=0;t<e.length;++t)e[t].id===this.cueID&&k.removeChild(e[t])}):(s=new D(u.start-t,u.end-t,u.data),u.styles&&(void 0!==u.styles.align&&s.hasOwnProperty("align")&&(s.align=u.styles.align),void 0!==u.styles.line&&s.hasOwnProperty("line")&&(s.line=u.styles.line),void 0!==u.styles.position&&s.hasOwnProperty("position")&&(s.position=u.styles.position),void 0!==u.styles.size&&s.hasOwnProperty("size")&&(s.size=u.styles.size))),r.addCue(s)}}}function g(){return L>=0?P.textTracks[L]:null}function p(){return L}function h(e){for(var t=-1,n=0;n<P.textTracks.length;n++)if(P.textTracks[n].label===e){t=n;break}return t}function v(e){if(L=e,I.call(this),e>=0){var t=P.textTracks[e];"html"===t.renderingType?T.call(this):S.call(this)}else S.call(this)}function m(e){return P.textTracks[e]}function _(e){if(e.cues){for(var t=e.cues,n=t.length-1,r=n;r>=0;r--)e.removeCue(t[r]);
30
- e.mode="disabled"}}function y(){for(var e=N.length,t=0;t<e;t++)if(K)P.removeChild(N[t]);else{var n=m.call(this,t);n.nonAddedCues=[],_.call(this,n)}N=[],w=[],j&&(clearInterval(j),j=null),I.call(this)}function E(e){P.removeChild(N[e]),N.splice(e,1)}function T(){if(K){var e=document.getElementById("native-cue-style");if(!e){e=document.createElement("style"),e.id="native-cue-style",document.head.appendChild(e);var t=e.sheet;P.id?t.insertRule("#"+P.id+"::cue {background: transparent}",0):0!==P.classList.length?t.insertRule("."+P.className+"::cue {background: transparent}",0):t.insertRule("video::cue {background: transparent}",0)}}}function S(){if(K){var e=document.getElementById("native-cue-style");e&&document.head.removeChild(e)}}function I(){if(k)for(;k.firstChild;)k.removeChild(k.firstChild)}function R(e){e&&e.videoModel&&(O=e.videoModel)}var A=this.context,M=(0,o["default"])(A).getInstance(),b=(0,c["default"])(A).getInstance().log,C=void 0,D=void 0,O=void 0,P=void 0,w=void 0,N=void 0,L=void 0,x=void 0,F=void 0,U=void 0,B=void 0,k=void 0,j=void 0,K=void 0,H=void 0,q=void 0,Y=void 0;return C={initialize:e,displayCConTop:n,addTextTrack:r,addCaptions:d,getTextTrack:m,getCurrentTextTrack:g,getCurrentTrackIdx:p,setCurrentTrackIdx:v,getTrackIdxForId:h,deleteTrackCues:_,deleteAllTextTracks:y,deleteTextTrack:E,setConfig:R}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),o=r(a),s=n(2),u=r(s),l=n(1),f=r(l),d=n(4),c=r(d);i.__dashjs_factory_name="TextTracks",t["default"]=f["default"].getSingletonFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(){s=new o["default"],u=[],l=!1}function t(){return s}function n(){return u}function r(){return l}function i(e){function t(e,t,n,r){var i=r[0].split(/[=]/);return r.push({key:i[0],value:i[1]}),r.shift(),r}function n(e,t,n){return t>0&&(d&&0===u.length?u=n[t].split(/[&]/):c&&(i=n[t].split(/[&]/))),n}if(!e)return null;var r,i=[],a=new RegExp(/[?]/),o=new RegExp(/[#]/),f=new RegExp(/^(https:)?\/\//i),d=a.test(e),c=o.test(e);return l=f.test(e),r=e.split(/[?#]/).map(n),u.length>0&&(u=u.reduce(t,null)),i.length>0&&(i=i.reduce(t,null),i.forEach(function(e){s[e.key]=e.value})),e}var a=void 0,s=void 0,u=void 0,l=void 0;return a={initialize:e,parseURI:i,getURIFragmentData:t,getURIQueryData:n,isManifestHTTPS:r}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(175),o=r(a),s=n(1),u=r(s);i.__dashjs_factory_name="URIQueryAndFragmentModel",t["default"]=u["default"].getSingletonFactory(i),e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function i(e,t){n(this,i),this.sessionToken=e,this.error=t};t["default"]=r,e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function i(e,t,r,a){n(this,i),this.sessionToken=e,this.message=t,this.defaultURL=r,this.messageType=a?a:"license-request"};t["default"]=r,e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function i(e,t){n(this,i),this.keySystem=e,this.ksConfiguration=t};t["default"]=r,e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function i(e,t,r,a,o){n(this,i),this.initDataTypes=["cenc"],this.audioCapabilities=e,this.videoCapabilities=t,this.distinctiveIdentifier=r,this.persistentState=a,this.sessionTypes=o};t["default"]=r,e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function i(e,t){n(this,i),this.initData=e,this.initDataType=t};t["default"]=r,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(){l={}}function t(e){e&&(e.abrRulesCollection&&(l[h]=e.abrRulesCollection),e.synchronizationRulesCollection&&(l[v]=e.synchronizationRulesCollection))}function n(e,t,n,r,a){var o,s,l={},f={},d=e.length,c=d,g=i(t,r),p=function(e){var t,i,o;if(e.value!==u["default"].NO_CHANGE){var s=a(l[e.priority],e.value);s!==l[e.priority]&&(l[e.priority]=s,f[e.priority]=e.reason)}--d||(l[u["default"].WEAK]!==u["default"].NO_CHANGE&&(o=u["default"].WEAK,t=l[u["default"].WEAK],i=f[u["default"].WEAK]),l[u["default"].DEFAULT]!==u["default"].NO_CHANGE&&(o=u["default"].DEFAULT,t=l[u["default"].DEFAULT],i=f[u["default"].DEFAULT]),l[u["default"].STRONG]!==u["default"].NO_CHANGE&&(o=u["default"].STRONG,t=l[u["default"].STRONG],i=f[u["default"].STRONG]),o!=u["default"].STRONG&&o!=u["default"].WEAK&&(o=u["default"].DEFAULT),n(void 0!==t?{value:t,confidence:o,reason:i}:{value:r,confidence:o,reason:{name:"NO_CHANGE"}}))};for(l[u["default"].STRONG]=u["default"].NO_CHANGE,l[u["default"].WEAK]=u["default"].NO_CHANGE,l[u["default"].DEFAULT]=u["default"].NO_CHANGE,s=0;s<c;s++)o=e[s],o.execute(g,p)}function r(){var e,t,n=l[h],r=l[v],i=(n.getRules(f["default"].QUALITY_SWITCH_RULES)||[]).concat(n.getRules(f["default"].ABANDON_FRAGMENT_RULES)||[]).concat(r.getRules(c["default"].TIME_SYNCHRONIZED_RULES)||[]).concat(r.getRules(c["default"].BEST_GUESS_RULES)||[]),a=i.length;for(t=0;t<a;t++)e=i[t],"function"==typeof e.reset&&e.reset();l={}}function i(e,t){return(0,o["default"])(a).create({streamProcessor:e,currentValue:t})}var a=this.context,s=void 0,l=void 0;return s={initialize:e,setConfig:t,applyRules:n,reset:r}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(146),o=r(a),s=n(8),u=r(s),l=n(47),f=r(l),d=n(48),c=r(d),g=n(1),p=r(g),h=0,v=1;i.__dashjs_factory_name="RulesController";var m=p["default"].getSingletonFactory(i);m.ABR_RULE=h,m.SYNC_RULE=v,t["default"]=m,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(){i=[],a=[];var e=(0,E["default"])(n).getInstance(),t=(0,S["default"])(n).getInstance(),r=(0,_["default"])(n).getInstance();r.getBufferOccupancyABREnabled()?(i.push((0,p["default"])(n).create({metricsModel:e,dashMetrics:(0,S["default"])(n).getInstance()})),a.push((0,v["default"])(n).create({metricsModel:e,dashMetrics:(0,S["default"])(n).getInstance()}))):(i.push((0,o["default"])(n).create({metricsModel:e,dashMetrics:t})),i.push((0,u["default"])(n).create({metricsModel:e,dashMetrics:t})),i.push((0,f["default"])(n).create({metricsModel:e})),a.push((0,c["default"])(n).create()))}function t(e){switch(e){case A:return i;case M:return a;default:return null}}var n=this.context,r=void 0,i=void 0,a=void 0;return r={initialize:e,getRules:t}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(151),o=r(a),s=n(149),u=r(s),l=n(150),f=r(l),d=n(147),c=r(d),g=n(66),p=r(g),h=n(148),v=r(h),m=n(5),_=r(m),y=n(14),E=r(y),T=n(16),S=r(T),I=n(1),R=r(I),A="qualitySwitchRules",M="abandonFragmentRules";i.__dashjs_factory_name="ABRRulesCollection";var b=R["default"].getSingletonFactory(i);b.QUALITY_SWITCH_RULES=A,b.ABANDON_FRAGMENT_RULES=M,t["default"]=b,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(){i=[],a=[],i.push((0,c["default"])(n).create({timelineConverter:(0,u["default"])(n).getInstance()})),a.push((0,f["default"])(n).create({timelineConverter:(0,u["default"])(n).getInstance(),adapter:(0,p["default"])(n).getInstance()}))}function t(e){switch(e){case h:return i;case v:return a;default:return null}}var n=this.context,r=void 0,i=void 0,a=void 0;return r={initialize:e,getRules:t}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),o=r(a),s=n(26),u=r(s),l=n(156),f=r(l),d=n(157),c=r(d),g=n(15),p=r(g),h="withAccurateTimeSourceRules",v="bestGuestRules";i.__dashjs_factory_name="SynchronizationRulesCollection";var m=o["default"].getSingletonFactory(i);m.TIME_SYNCHRONIZED_RULES=h,m.BEST_GUESS_RULES=v,t["default"]=m,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(e){if(!e)return null;void 0===e.fileStart&&(e.fileStart=0);var t=f["default"].parseBuffer(e),r=(0,o["default"])(n).create();return r.setData(t),r}var t=void 0,n=this.context;return t={parse:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(161),o=r(a),s=n(1),u=r(s),l=n(71),f=r(l);i.__dashjs_factory_name="BoxParser",t["default"]=u["default"].getSingletonFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(e){if(void 0!==y)return y;y=!1;var t,n="1",r="1";try{"undefined"!=typeof window&&(t=window[e])}catch(i){return m("Warning: DOMStorage access denied: "+i.message),y}if(!t||e!==p&&e!==h)return y;try{t.setItem(n,r),t.removeItem(n),y=!0}catch(i){m("Warning: DOMStorage is supported, but cannot be used: "+i.message)}return y}function t(){e(p)&&d.forEach(function(e){var t=localStorage.getItem(e.oldKey);if(t){localStorage.removeItem(e.oldKey);try{localStorage.setItem(e.newKey,t)}catch(n){m(n.message)}}})}function n(){E=(0,u["default"])(v).getInstance(),t()}function r(){var e=6e5;return Math.round((new Date).getTime()/e)*e}function i(t,n){return e(t)&&E["get"+n+"CachingInfo"]().enabled}function a(e){if(!i(p,"LastMediaSettings"))return null;var t=g.replace(/\?/,e),n=JSON.parse(localStorage.getItem(t))||{},r=(new Date).getTime()-parseInt(n.timestamp,10)>=E.getLastMediaSettingsCachingInfo().ttl||!1,a=n.settings;return r&&(localStorage.removeItem(t),a=null),a}function o(e){var t=NaN;if(i(p,"LastBitrate")){var n=c.replace(/\?/,e),r=JSON.parse(localStorage.getItem(n))||{},a=(new Date).getTime()-parseInt(r.timestamp,10)>=E.getLastBitrateCachingInfo().ttl||!1,o=parseInt(r.bitrate,10);isNaN(o)||a?a&&localStorage.removeItem(n):(t=o,m("Last saved bitrate for "+e+" was "+o))}return t}function s(e,t){if(i(p,"LastMediaSettings")){var n=g.replace(/\?/,e);try{localStorage.setItem(n,JSON.stringify({settings:t,timestamp:r()}))}catch(a){m(a.message)}}}function l(e,t){if(i(p,"LastBitrate")&&t){var n=c.replace(/\?/,e);try{localStorage.setItem(n,JSON.stringify({bitrate:t/1e3,timestamp:r()}))}catch(a){m(a.message)}}}var v=this.context,m=(0,f["default"])(v).getInstance().log,_=void 0,y=void 0,E=void 0;return _={getSavedBitrateSettings:o,setSavedBitrateSettings:l,getSavedMediaSettings:a,setSavedMediaSettings:s,isSupported:e},n(),_}Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),o=r(a),s=n(5),u=r(s),l=n(4),f=r(l),d=[{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"}],c="dashjs_?_bitrate",g="dashjs_?_settings",p="localStorage",h="sessionStorage";i.__dashjs_factory_name="DOMStorage";var v=o["default"].getSingletonFactory(i);t["default"]=v,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(e,t){g=e,h=t,_=!1,y=NaN,T=null,v=(0,p["default"])(s).getInstance(),S=o["default"].BEST_GUESS_RULES,l.on(c["default"].STREAM_INITIALIZED,a,this)}function t(){_=!1,y=NaN}function n(){return T}function r(){l.off(c["default"].STREAM_INITIALIZED,a,this),t(),T=null,g=null,h=null,_=!1,y=NaN,S=null,v=null}function i(e){var t=((new Date).getTime()-y)/1e3;T=e.value,l.trigger(c["default"].LIVE_EDGE_SEARCH_COMPLETED,{liveEdge:T,searchTime:t,error:null===T?new u["default"](m,"live edge has not been found",null):null})}function a(e){!h.isDynamic()||_||e.error||(S=g.isTimeSyncCompleted()?o["default"].TIME_SYNCHRONIZED_RULES:o["default"].BEST_GUESS_RULES,E=(0,o["default"])(s).getInstance().getRules(S),_=!0,y=(new Date).getTime(),v.applyRules(E,h,i,null,function(e,t){return t}))}var s=this.context,l=(0,f["default"])(s).getInstance(),d=void 0,g=void 0,h=void 0,v=void 0,_=void 0,y=void 0,E=void 0,T=void 0,S=void 0;return d={initialize:e,abortSearch:t,getLiveEdge:n,reset:r}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(48),o=r(a),s=n(6),u=r(s),l=n(3),f=r(l),d=n(2),c=r(d),g=n(46),p=r(g),h=n(1),v=r(h),m=1;i.__dashjs_factory_name="LiveEdgeFinder";var _=v["default"].getSingletonFactory(i);_.LIVE_EDGE_NOT_FOUND_ERROR_CODE=m,t["default"]=_,e.exports=t["default"]},function(e,t,n){"use strict";!function(e){var t={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},n=function(e){var n=e;return t.hasOwnProperty(e)&&(n=t[e]),String.fromCharCode(n)},r=15,i=32,a={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},o={17:2,18:4,21:6,22:8,23:10,19:13,20:15},s={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},u={25:2,26:4,29:6,30:8,31:10,27:13,28:15},l=["white","green","blue","cyan","red","yellow","magenta","black","transparent"],f={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)}},d=function(e){for(var t=[],n=0;n<e.length;n++)t.push(e[n].toString(16));return t},c=function(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};c.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}};var g=function(e,t,n,r,i,a){this.uchar=e||" ",this.penState=new c(t,n,r,i,a)};g.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()}};var p=function(){this.chars=[];for(var e=0;e<i;e++)this.chars.push(new g);this.pos=0,this.currPenState=new c};p.prototype={equals:function(e){for(var t=!0,n=0;n<i;n++)if(!this.chars[n].equals(e.chars[n])){t=!1;break}return t},copy:function(e){for(var t=0;t<i;t++)this.chars[t].copy(e.chars[t])},isEmpty:function(){for(var e=!0,t=0;t<i;t++)if(!this.chars[t].isEmpty()){e=!1;break}return e},setCursor:function(e){this.pos!==e&&(this.pos=e),this.pos<0?(f.log("ERROR","Negative cursor position "+this.pos),this.pos=0):this.pos>i&&(f.log("ERROR","Too large cursor position "+this.pos),this.pos=i)},moveCursor:function(e){var t=this.pos+e;if(e>1)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){e>=144&&this.backSpace();var t=n(e);return this.pos>=i?void f.log("ERROR","Cannot insert "+e.toString(16)+" ("+t+") at position "+this.pos+". Skipping it!"):(this.chars[this.pos].setChar(t,this.currPenState),void this.moveCursor(1))},clearFromPos:function(e){var t;for(t=e;t<i;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<i;n++){var r=this.chars[n].uchar;" "!==r&&(t=!1),e.push(r)}return t?"":e.join("")},setPenStyles:function(e){this.currPenState.setStyles(e);var t=this.chars[this.pos];t.setPenState(this.currPenState)}};var h=function(){this.rows=[];for(var e=0;e<r;e++)this.rows.push(new p);this.currRow=r-1,this.nrRollUpRows=null,this.reset()};h.prototype={reset:function(){for(var e=0;e<r;e++)this.rows[e].clear();this.currRow=r-1},equals:function(e){for(var t=!0,n=0;n<r;n++)if(!this.rows[n].equals(e.rows[n])){t=!1;break}return t},copy:function(e){for(var t=0;t<r;t++)this.rows[t].copy(e.rows[t])},isEmpty:function(){for(var e=!0,t=0;t<r;t++)if(!this.rows[t].isEmpty()){e=!1;break}return e},backSpace:function(){var e=this.rows[this.currRow];e.backSpace()},clearToEndOfRow:function(){var e=this.rows[this.currRow];e.clearToEndOfRow()},insertChar:function(e){var t=this.rows[this.currRow];t.insertChar(e)},setPen:function(e){var t=this.rows[this.currRow];t.setPenStyles(e)},moveCursor:function(e){var t=this.rows[this.currRow];t.moveCursor(e)},setCursor:function(e){f.log("INFO","setCursor: "+e);var t=this.rows[this.currRow];t.setCursor(e)},setPAC:function(e){f.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){f.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)return void f.log("DEBUG","roll_up but nrRollUpRows not set yet");f.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),f.log("INFO","Rolling up")},getDisplayText:function(e){e=e||!1;for(var t=[],n="",i=-1,a=0;a<r;a++){var o=this.rows[a].getTextString();o&&(i=a+1,e?t.push("Row "+i+': "'+o+'"'):t.push(o.trim()))}return t.length>0&&(n=e?"["+t.join(" | ")+"]":t.join("\n")),n},getTextAndFormat:function(){return this.rows}};var v=function(e,t){this.chNr=e,this.outputFilter=t,this.mode=null,this.verbose=0,this.displayedMemory=new h,this.nonDisplayedMemory=new h,this.lastOutputScreen=new h,this.currRollUpRow=this.displayedMemory.rows[r-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null};v.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[r-1],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,f.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";f.log("INFO",n+": "+this.writeScreen.getDisplayText(!0)),"MODE_PAINT-ON"!==this.mode&&"MODE_ROLL-UP"!==this.mode||(f.log("TEXT","DISPLAYED: "+this.displayedMemory.getDisplayText(!0)),this.outputDataUpdate())},cc_RCL:function(){f.log("INFO","RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")},cc_BS:function(){f.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(){f.log("INFO","DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()},cc_RU:function(e){f.log("INFO","RU("+e+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(e)},cc_FON:function(){f.log("INFO","FON - Flash On"),this.writeScreen.setPen({flash:!0})},cc_RDC:function(){f.log("INFO","RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")},cc_TR:function(){f.log("INFO","TR"),this.setMode("MODE_TEXT")},cc_RTD:function(){f.log("INFO","RTD"),this.setMode("MODE_TEXT")},cc_EDM:function(){f.log("INFO","EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate()},cc_CR:function(){f.log("CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate()},cc_ENM:function(){f.log("INFO","ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()},cc_EOC:function(){if(f.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,f.log("TEXT","DISP: "+this.displayedMemory.getDisplayText())}this.outputDataUpdate()},cc_TO:function(e){f.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=e>=46,t.italics)t.foreground="white";else{var n=Math.floor(e/2)-16,r=["white","green","blue","cyan","red","yellow","magenta"];t.foreground=r[n]}f.log("INFO","MIDROW: "+JSON.stringify(t)),this.writeScreen.setPen(t)},outputDataUpdate:function(){var e=f.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))}};var m=function(e,t,n){this.field=e||1,this.outputs=[t,n],this.channels=[new v(1,t),new v(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}};m.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,f.setTime(e);for(var o=0;o<t.length;o+=2)if(r=127&t[o],i=127&t[o+1],0!==r||0!==i){if(f.log("DATA","["+d([t[o],t[o+1]])+"] -> ("+d([r,i])+")"),n=this.parseCmd(r,i),n||(n=this.parseMidrow(r,i)),n||(n=this.parsePAC(r,i)),n||(n=this.parseBackgroundAttributes(r,i)),!n&&(a=this.parseChars(r,i)))if(this.currChNr&&this.currChNr>=0){var s=this.channels[this.currChNr-1];s.insertChars(a)}else f.log("WARNING","No channel found yet. TEXT-MODE?");n?this.dataCounters.cmd+=2:a?this.dataCounters["char"]+=2:(this.dataCounters.other+=2,f.log("WARNING","Couldn't parse cleaned data "+d([r,i])+" orig: "+d([t[o],t[o+1]])))}else this.dataCounters.padding+=2},parseCmd:function(e,t){var n=null,r=(20===e||28===e)&&32<=t&&t<=47,i=(23===e||31===e)&&33<=t&&t<=35;if(!r&&!i)return!1;if(e===this.lastCmdA&&t===this.lastCmdB)return this.lastCmdA=null,this.lastCmdB=null,f.log("DEBUG","Repeated command ("+d([e,t])+") is dropped"),!0;n=20===e||23===e?1:2;var a=this.channels[n-1];return 20===e||28===e?32===t?a.cc_RCL():33===t?a.cc_BS():34===t?a.cc_AOF():35===t?a.cc_AON():36===t?a.cc_DER():37===t?a.cc_RU(2):38===t?a.cc_RU(3):39===t?a.cc_RU(4):40===t?a.cc_FON():41===t?a.cc_RDC():42===t?a.cc_TR():43===t?a.cc_RTD():44===t?a.cc_EDM():45===t?a.cc_CR():46===t?a.cc_ENM():47===t&&a.cc_EOC():a.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,n!==this.currChNr)return f.log("ERROR","Mismatch channel in midrow parsing"),!1;var r=this.channels[n-1];return r.cc_MIDROW(t),f.log("DEBUG","MIDROW ("+d([e,t])+")"),!0}return!1},parsePAC:function(e,t){var n=null,r=null,i=(17<=e&&e<=23||25<=e&&e<=31)&&64<=t&&t<=127,l=(16===e||24===e)&&64<=t&&t<=95;if(!i&&!l)return!1;if(e===this.lastCmdA&&t===this.lastCmdB)return this.lastCmdA=null,this.lastCmdB=null,!0;n=e<=23?1:2,r=64<=t&&t<=95?1===n?a[e]:s[e]:1===n?o[e]:u[e];var f=this.interpretPAC(r,t),d=this.channels[n-1];return d.setPAC(f),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=t>95?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 r=null,i=null,a=null;if(e>=25?(r=2,a=e-8):(r=1,a=e),17<=a&&a<=19){var o=t;o=17===a?t+80:18===a?t+112:t+144,f.log("INFO","Special char '"+n(o)+"' in channel "+r),i=[o]}else 32<=e&&e<=127&&(i=0===t?[e]:[e,t]);if(i){var s=d(i);f.log("DEBUG","Char codes = "+s.join(",")),this.lastCmdA=null,this.lastCmdB=null}return i},parseBackgroundAttributes:function(e,t){var n,r,i,a,o=(16===e||24===e)&&32<=t&&t<=47,s=(23===e||31===e)&&45<=t&&t<=47;return!(!o&&!s)&&(n={},16===e||24===e?(r=Math.floor((t-32)/2),n.background=l[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,a=this.channels[i-1],a.setBkgData(n),this.lastCmdA=null,this.lastCmdB=null,!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)}};var _=function(e,t,n){for(var r=0,i=t,a=0,o=[],s=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),a=31&e.getUint8(i+4),6===a)for(var u=i+5,l=-1;u<i+4+r-1;){l=0;for(var f=255;255===f;)f=e.getUint8(u),l+=f,u++;var d=0;for(f=255;255===f;)f=e.getUint8(u),d+=f,u++;s(l,d,e,u)&&o.push([u,d]),u+=d}i+=r+4}return o},y=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};e.logger=f,e.PenState=c,e.CaptionScreen=h,e.Cea608Parser=m,e.findCea608Nalus=_,e.extractCea608DataFromRange=y}(t)},function(e,t){"use strict";function n(){return r}Object.defineProperty(t,"__esModule",{value:!0}),t.getVersionString=n;var r="2.3.0"},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n="TcpList";t.TCP_CONNECTION=n;var r="HttpList";t.HTTP_REQUEST=r;var i="RepSwitchList";t.TRACK_SWITCH=i;var a="BufferLevel";t.BUFFER_LEVEL=a;var o="BufferState";t.BUFFER_STATE=o;var s="DVRInfo";t.DVR_INFO=s;var u="DroppedFrames";t.DROPPED_FRAMES=u;var l="SchedulingInfo";t.SCHEDULING_INFO=l;var f="RequestsQueue";t.REQUESTS_QUEUE=f;var d="ManifestUpdate";t.MANIFEST_UPDATE=d;var c="ManifestUpdatePeriodInfo";t.MANIFEST_UPDATE_STREAM_INFO=c;var g="ManifestUpdateRepresentationInfo";t.MANIFEST_UPDATE_TRACK_INFO=g;var p="PlayList";t.PLAY_LIST=p;var h="DVBErrors";t.DVB_ERRORS=h},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(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)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=n(81),s=r(o),u=function(){function e(t,n,r,a,o){var u=this;i(this,e),this._name=t||"",this._properties=[],this._children=r||[],this._isRoot=a||!1,this._isArray=o||!0,Array.isArray(n)&&n.forEach(function(e){u._properties.push(new s["default"](e))})}return a(e,[{key:"name",get:function(){return this._name}},{key:"isRoot",get:function(){return this._isRoot}},{key:"isArray",get:function(){return this._isArray}},{key:"children",get:function(){return this._children}},{key:"properties",get:function(){return this._properties}}]),e}();t["default"]=u,e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=1,i=1,a=function o(e,t,a,s){n(this,o),this.url=e||"",this.serviceLocation=t||e||"",this.dvb_priority=a||r,this.dvb_weight=s||i};a.DEFAULT_DVB_PRIORITY=r,a.DEFAULT_DVB_WEIGHT=i,t["default"]=a,e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function i(){n(this,i),this.duration=NaN,this.presentationTime=NaN,this.id=NaN,this.messageData="",this.eventStream=null,this.presentationTimeDelta=NaN};t["default"]=r,e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function i(){n(this,i),this.schemeIdUri="",this.value=""};t["default"]=r,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(){$t=!1,en=!1,tn=!0,an=null,Jt=null,sn=null,ie["default"].extend(oe["default"]),ln=(0,L["default"])(Vt).getInstance()}function t(e,t,n){return dn=(0,E["default"])(Vt).getInstance(),fn=(0,_["default"])(Vt).getInstance(),dn.supportsMediaSource()?void($t||($t=!0,nn=(0,B["default"])(Vt).getInstance(),pn=(0,u["default"])(Vt).getInstance(),rn=(0,c["default"])(Vt).getInstance(),rn.initialize(),vn=(0,he["default"])(Vt).getInstance(),hn=(0,me["default"])(Vt).getInstance(),un=(0,F["default"])(Vt).getInstance(),un.setConfig({adapter:xt()}),rt(),pe(void 0===n||n),e&&At(e),t&&Dt(t),Qt("[dash.js "+q()+"] MediaPlayer has been initialized"))):void fn.capabilityError("mediasource")}function n(){return!!mn&&!!Zt}function r(){if(!en)throw Ht;(!tn||a()&&en)&&pn.play()}function i(){if(!en)throw Ht;pn.pause()}function a(){if(!en)throw Ht;return pn.isPaused()}function s(){if(!en)throw Ht;return pn.isSeeking()}function l(e){if(!mn)throw qt;Rt().muted=e}function d(){if(!mn)throw qt;return Rt().muted}function g(e){if(!mn)throw qt;Rt().volume=e}function h(){if(!mn)throw qt;return Rt().volume}function m(e){var t=["video","audio","fragmentedText"];
31
- if(e){if(t.indexOf(e)!==-1){var n=Te().getCurrentBufferLevel(Se(e));return n?n:NaN}return Qt("Warning - getBufferLength requested for invalid type"),NaN}return t.map(function(e){return Fe(e).length>0?Te().getCurrentBufferLevel(Se(e)):Number.MAX_VALUE}).reduce(function(e,t){return Math.min(e,t)})}function y(){var e=Bt();return e?e.manifestInfo.DVRWindowSize:0}function T(e){var t=Bt();if(!t)return 0;var n=t.range.start+e;return n>t.range.end&&(n=t.range.end),n}function I(e){if(!en)throw Ht;var t=pn.getIsDynamic()?T(e):e;pn.seek(t)}function A(e){if(!en)throw Ht;var t=Rt().currentTime;if(void 0!==e)t=cn.getTimeRelativeToStreamId(t,e);else if(pn.getIsDynamic()){var n=Bt();t=null===n?0:b()-(n.range.end-n.time)}return t}function b(){if(!en)throw Ht;var e=Rt().duration;if(pn.getIsDynamic()){var t,n=Bt();if(!n)return 0;t=n.range.end-n.range.start,e=t<n.manifestInfo.DVRWindowSize?t:n.manifestInfo.DVRWindowSize}return e}function D(){if(!en)throw Ht;return A()<0?NaN:kt(A())}function P(){if(!en)throw Ht;return kt(b())}function N(e,t,n){var r=new Date(1e3*e),i=r.toLocaleDateString(t),a=r.toLocaleTimeString(t,{hour12:n});return a+" "+i}function x(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())}function U(e,t,n){ue["default"].extend(e,t,n,Vt)}function k(e,t,n){zt.on(e,t,n)}function K(e,t,n){zt.off(e,t,n)}function q(){return(0,le.getVersionString)()}function G(){return Wt}function z(){if(!mn)throw qt;return mn}function Q(e){ln.setLiveDelayFragmentCount(e)}function Z(e){ln.setLiveDelay(e)}function $(e){ln.setUseSuggestedPresentationDelay(e)}function te(e,t){ln.setLastBitrateCachingInfo(e,t)}function re(e,t){ln.setLastMediaSettingsCachingInfo(e,t)}function ae(e,t){nn.setMaxAllowedBitrateFor(e,t)}function se(e){return nn.getMaxAllowedBitrateFor(e)}function fe(e,t){nn.setMaxAllowedRepresentationRatioFor(e,t)}function ce(e){return nn.getMaxAllowedRepresentationRatioFor(e)}function pe(e){tn=e}function ve(){return tn}function _e(e){ln.setScheduleWhilePaused(e)}function Ee(){return ln.getScheduleWhilePaused()}function Te(){return hn}function Se(e){return un.getReadOnlyMetricsFor(e)}function Ie(e){if(!en)throw Ht;return nn.getQualityFor(e,cn.getActiveStreamInfo())}function Re(e,t){if(!en)throw Ht;nn.setPlaybackQuality(e,cn.getActiveStreamInfo(),t)}function Ae(){return nn.getLimitBitrateByPortal()}function Me(e){nn.setLimitBitrateByPortal(e)}function be(){return nn.getUsePixelRatioInLimitBitrateByPortal()}function Ce(e){nn.setUsePixelRatioInLimitBitrateByPortal(e)}function De(e){if(!en)throw Ht;void 0===_n&&(_n=(0,C["default"])(Vt).getInstance());for(var t=Rt().textTracks,n=t.length,r=0;r<n;r++){var i=t[r],a=e===r?"showing":"hidden";i.mode!==a&&(i.mode=a)}_n.setTextTrack()}function Oe(e){if(!en)throw Ht;var t=jt();return t?t.getBitrateListFor(e):[]}function Pe(e,t){nn.setInitialBitrateFor(e,t)}function we(e){if(!en)throw Ht;return nn.getInitialBitrateFor(e)}function Ne(e,t){nn.setInitialRepresentationRatioFor(e,t)}function Le(e){return nn.getInitialRepresentationRatioFor(e)}function xe(e){if(!en)throw Ht;return sn.getStreamsInfo(e)}function Fe(e){if(!en)throw Ht;var t=cn.getActiveStreamInfo();return t?rn.getTracksFor(e,t):[]}function Ue(e,t,n){if(!en)throw Ht;return n=n||sn.getStreamsInfo(t)[0],n?sn.getAllMediaInfoForType(t,n,e):[]}function Be(e){if(!en)throw Ht;var t=cn.getActiveStreamInfo();return t?rn.getCurrentTrackFor(e,t):null}function ke(e,t){rn.setInitialSettings(e,t)}function je(e){return rn.getInitialSettings(e)}function Ke(e){if(!en)throw Ht;rn.setTrack(e)}function He(e){return rn.getSwitchMode(e)}function qe(e,t){rn.setSwitchMode(e,t)}function Ye(e){rn.setSelectionModeForInitialTrack(e)}function Ge(){return rn.getSelectionModeForInitialTrack()}function Ve(){return nn.getAutoSwitchBitrateFor("video")||nn.getAutoSwitchBitrateFor("audio")}function ze(e){nn.setAutoSwitchBitrateFor("video",e),nn.setAutoSwitchBitrateFor("audio",e)}function We(e){return nn.getAutoSwitchBitrateFor(e)}function Qe(e,t){nn.setAutoSwitchBitrateFor(e,t)}function Xe(e){ln.setFastSwitchEnabled(e)}function Ze(){return ln.getFastSwitchEnabled()}function Je(e){ln.setBufferOccupancyABREnabled(e)}function $e(e,t){var n=Nt(),r=this,i=function o(e){e.error?t(null,e.error):t(e.manifest),zt.off(ie["default"].INTERNAL_MANIFEST_LOADED,o,r),n.reset()};zt.on(ie["default"].INTERNAL_MANIFEST_LOADED,i,r);var a=(0,O["default"])(Vt).getInstance();a.initialize(),n.load(a.parseURI(e))}function et(e,t){tt(e,t);var n=new o["default"];n.schemeIdUri=e,n.value=t,ln.getUTCTimingSources().push(n)}function tt(e,t){var n=ln.getUTCTimingSources();n.forEach(function(r,i){r.schemeIdUri===e&&r.value===t&&n.splice(i,1)})}function nt(){ln.setUTCTimingSources([])}function rt(){et(L["default"].DEFAULT_UTC_TIMING_SOURCE.scheme,L["default"].DEFAULT_UTC_TIMING_SOURCE.value)}function it(e){ln.setUseManifestDateHeaderTimeSource(e)}function at(e){ln.setBufferToKeep(e)}function ot(e){ln.setBufferPruningInterval(e)}function st(e){ln.setStableBufferTime(e)}function ut(e){ln.setBufferTimeAtTopQuality(e)}function lt(e){ln.setBufferTimeAtTopQualityLongForm(e)}function ft(e){ln.setLongFormContentDurationThreshold(e)}function dt(e){ln.setRichBufferThreshold(e)}function ct(e){ln.setBandwidthSafetyFactor(e)}function gt(){return ln.getBandwidthSafetyFactor()}function pt(e){ln.setAbandonLoadTimeout(e)}function ht(e){ln.setFragmentRetryAttempts(e)}function vt(e){ln.setFragmentRetryInterval(e)}function mt(e){ln.setXHRWithCredentials(e)}function _t(){return Ft()}function yt(e){an=e}function Et(e){Jt=e}function Tt(e){var t=(0,S["default"])(Vt).getInstance();t.setConfig({videoModel:mn}),t.initialize(),t.displayCConTop(e)}function St(){return mn?mn.getVideoContainer():null}function It(e){if(!mn)throw qt;mn.setVideoContainer(e)}function Rt(){if(!mn)throw qt;return mn.getElement()}function At(e){if(!$t)throw Gt;mn=null,e&&(mn=(0,Y["default"])(Vt).getInstance(),mn.initialize(),mn.setElement(e),Ft(),Ut()),Pt()}function Mt(){return mn?mn.getTTMLRenderingDiv():null}function bt(e){if(!mn)throw qt;mn.setTTMLRenderingDiv(e)}function Ct(){if(!Zt)throw Yt;return Zt}function Dt(e){if(!$t)throw Gt;if("string"==typeof e){var t=(0,O["default"])(Vt).getInstance();t.initialize(),Zt=t.parseURI(e)}else Zt=e;Pt()}function Ot(){Dt(null),At(null),Jt=null,an=null}function Pt(){en?(en=!1,sn.reset(),cn.reset(),pn.reset(),nn.reset(),gn.reset(),rn.reset(),cn=null,on=null,n()&&Kt()):n()&&Kt()}function wt(){var e=(0,W["default"])(Vt).getInstance();e.initialize();var t=(0,H["default"])(Vt).getInstance();t.initialize();var n=(0,R["default"])(Vt).getInstance();n.setConfig({dashManifestModel:vn}),rn.initialize(),rn.setConfig({errHandler:fn}),gn=(0,V["default"])(Vt).getInstance(),gn.initialize(),gn.setConfig({abrRulesCollection:t,synchronizationRulesCollection:e}),cn=(0,f["default"])(Vt).getInstance(),cn.setConfig({capabilities:dn,manifestLoader:Nt(),manifestModel:(0,w["default"])(Vt).getInstance(),dashManifestModel:vn,protectionController:an,adapter:sn,metricsModel:un,dashMetrics:hn,liveEdgeFinder:(0,v["default"])(Vt).getInstance(),mediaSourceController:(0,X["default"])(Vt).getInstance(),timeSyncController:(0,j["default"])(Vt).getInstance(),baseURLController:(0,J["default"])(Vt).getInstance(),errHandler:fn,timelineConverter:(0,ye["default"])(Vt).getInstance()}),cn.initialize(tn,Jt),nn.setConfig({abrRulesCollection:t,rulesController:gn,streamController:cn})}function Nt(){return(0,p["default"])(Vt).create({errHandler:fn,parser:Lt(),metricsModel:un,requestModifier:(0,M["default"])(Vt).getInstance()})}function Lt(){return(0,ge["default"])(Vt).create()}function xt(){return sn=(0,de["default"])(Vt).getInstance(),sn.initialize(),sn.setConfig({dashManifestModel:vn}),sn}function Ft(){if(an)return an;var e=dashjs.Protection;if("function"==typeof e){var t=e(Vt).create();return ie["default"].extend(e.events),oe["default"].extend(e.events,{publicOnly:!0}),an=t.createProtectionSystem({log:Qt,videoModel:mn,capabilities:dn,eventBus:zt,adapter:sn})}return null}function Ut(){if(on)return on;var e=dashjs.MetricsReporting;if("function"==typeof e){var t=e(Vt).create();return on=t.createMetricsReporting({log:Qt,eventBus:zt,mediaElement:Rt(),dashManifestModel:vn,metricsModel:un})}return null}function Bt(){var e=un.getReadOnlyMetricsFor("video")||un.getReadOnlyMetricsFor("audio");return hn.getCurrentDVRInfo(e)}function kt(e){var t,n,r=Bt();return r?(t=r.manifestInfo.availableFrom.getTime()/1e3,n=e+(t+r.range.start)):0}function jt(){if(!en)throw Ht;var e=cn.getActiveStreamInfo();return e?cn.getStreamById(e.id):null}function Kt(){en||(en=!0,Qt("Playback Initialized"),wt(),"string"==typeof Zt?cn.load(Zt):cn.loadWithManifest(Zt))}var Ht="You must first call play() to init playback before calling this method",qt="You must first call attachView() to set the video element before calling this method",Yt="You must first call attachSource() with a valid source before calling this method",Gt="MediaPlayer not initialized!",Vt=this.context,zt=(0,ne["default"])(Vt).getInstance(),Wt=(0,ee["default"])(Vt).getInstance(),Qt=Wt.log,Xt=void 0,Zt=void 0,Jt=void 0,$t=void 0,en=void 0,tn=void 0,nn=void 0,rn=void 0,an=void 0,on=void 0,sn=void 0,un=void 0,ln=void 0,fn=void 0,dn=void 0,cn=void 0,gn=void 0,pn=void 0,hn=void 0,vn=void 0,mn=void 0,_n=void 0;return Xt={initialize:t,on:k,off:K,extend:U,attachView:At,attachSource:Dt,isReady:n,play:r,isPaused:a,pause:i,isSeeking:s,seek:I,setMute:l,isMuted:d,setVolume:g,getVolume:h,time:A,duration:b,timeAsUTC:D,durationAsUTC:P,getActiveStream:jt,getDVRWindowSize:y,getDVRSeekOffset:T,convertToTimeCode:x,formatUTC:N,getVersion:q,getDebug:G,getBufferLength:m,getVideoModel:z,getVideoContainer:St,getTTMLRenderingDiv:Mt,getVideoElement:Rt,getSource:Ct,setLiveDelayFragmentCount:Q,setLiveDelay:Z,useSuggestedPresentationDelay:$,enableLastBitrateCaching:te,enableLastMediaSettingsCaching:re,setMaxAllowedBitrateFor:ae,getMaxAllowedBitrateFor:se,setMaxAllowedRepresentationRatioFor:fe,getMaxAllowedRepresentationRatioFor:ce,setAutoPlay:pe,getAutoPlay:ve,setScheduleWhilePaused:_e,getScheduleWhilePaused:Ee,getDashMetrics:Te,getMetricsFor:Se,getQualityFor:Ie,setQualityFor:Re,getLimitBitrateByPortal:Ae,setLimitBitrateByPortal:Me,getUsePixelRatioInLimitBitrateByPortal:be,setUsePixelRatioInLimitBitrateByPortal:Ce,setTextTrack:De,getBitrateInfoListFor:Oe,setInitialBitrateFor:Pe,getInitialBitrateFor:we,setInitialRepresentationRatioFor:Ne,getInitialRepresentationRatioFor:Le,getStreamsFromManifest:xe,getTracksFor:Fe,getTracksForTypeFromManifest:Ue,getCurrentTrackFor:Be,setInitialMediaSettingsFor:ke,getInitialMediaSettingsFor:je,setCurrentTrack:Ke,getTrackSwitchModeFor:He,setTrackSwitchModeFor:qe,setSelectionModeForInitialTrack:Ye,getSelectionModeForInitialTrack:Ge,getAutoSwitchQuality:Ve,setAutoSwitchQuality:ze,setFastSwitchEnabled:Xe,getFastSwitchEnabled:Ze,getAutoSwitchQualityFor:We,setAutoSwitchQualityFor:Qe,enableBufferOccupancyABR:Je,setBandwidthSafetyFactor:ct,getBandwidthSafetyFactor:gt,setAbandonLoadTimeout:pt,retrieveManifest:$e,addUTCTimingSource:et,removeUTCTimingSource:tt,clearDefaultUTCTimingSources:nt,restoreDefaultUTCTimingSources:rt,setBufferToKeep:at,setBufferPruningInterval:ot,setStableBufferTime:st,setBufferTimeAtTopQuality:ut,setFragmentLoaderRetryAttempts:ht,setFragmentLoaderRetryInterval:vt,setXHRWithCredentials:mt,setBufferTimeAtTopQualityLongForm:lt,setLongFormContentDurationThreshold:ft,setRichBufferThreshold:dt,getProtectionController:_t,attachProtectionController:yt,setProtectionData:Et,enableManifestDateHeaderTimeSource:it,displayCaptionsOnTop:Tt,attachVideoContainer:It,attachTTMLRenderingDiv:bt,reset:Ot},e(),Xt}Object.defineProperty(t,"__esModule",{value:!0});var a=n(58),o=r(a),s=n(9),u=r(s),l=n(20),f=r(l),d=n(13),c=r(d),g=n(98),p=r(g),h=n(51),v=r(h),m=n(11),_=r(m),y=n(159),E=r(y),T=n(39),S=r(T),I=n(28),R=r(I),A=n(33),M=r(A),b=n(17),C=r(b),D=n(40),O=r(D),P=n(31),w=r(P),N=n(5),L=r(N),x=n(14),F=r(x),U=n(10),B=r(U),k=n(111),j=r(k),K=n(47),H=r(K),q=n(19),Y=r(q),G=n(46),V=r(G),z=n(48),W=r(z),Q=n(108),X=r(Q),Z=n(104),J=r(Z),$=n(4),ee=r($),te=n(3),ne=r(te),re=n(2),ie=r(re),ae=n(38),oe=r(ae),se=n(1),ue=r(se),le=n(53),fe=n(15),de=r(fe),ce=n(80),ge=r(ce),pe=n(12),he=r(pe),ve=n(16),me=r(ve),_e=n(26),ye=r(_e);i.__dashjs_factory_name="MediaPlayer";var Ee=ue["default"].getClassFactory(i);Ee.events=oe["default"],t["default"]=Ee,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){function t(t,n){var r,i=t.match(o);if(i){try{r=l[i[1]](s).create({eventBus:e.eventBus}),r.initialize(i[1],n,i[3],i[5])}catch(u){r=null,a("MetricsHandlerFactory: Could not create handler for type "+i[1]+" with args "+i[3]+", "+i[5]+" ("+u.message+")")}return r}}function n(e,t){l[e]=t}function r(e){delete l[e]}var i=void 0,a=e.log,o=/([a-zA-Z]*)(\(([0-9]*)(\,\s*([a-zA-Z]*))?\))?/,s=this.context,l={BufferLevel:u["default"],DVBErrors:f["default"],HttpList:c["default"],PlayList:p["default"],RepSwitchList:p["default"],TcpList:p["default"]};return i={create:t,register:n,unregister:r}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),o=r(a),s=n(119),u=r(s),l=n(120),f=r(l),d=n(122),c=r(d),g=n(121),p=r(g);i.__dashjs_factory_name="MetricsHandlerFactory",t["default"]=o["default"].getSingletonFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){function t(e,t){var n;try{n=i[e.schemeIdUri](a).create(),n.initialize(e,t)}catch(r){n=null,o("ReportingFactory: could not create Reporting with schemeIdUri "+e.schemeIdUri+" ("+r.message+")")}return n}function n(e,t){i[e]=t}function r(e){delete i[e]}var i={"urn:dvb:dash:reporting:2014":u["default"]},a=this.context,o=e.log,s=void 0;return s={create:t,register:n,unregister:r}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),o=r(a),s=n(123),u=r(s);i.__dashjs_factory_name="ReportingFactory",t["default"]=o["default"].getSingletonFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){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(t,"__esModule",{value:!0});var a=n(1),o=r(a);i.__dashjs_factory_name="HandlerHelpers",t["default"]=o["default"].getSingletonFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(e){var n=null,r=(0,u["default"])(i).getInstance();r.setConfig({log:e.log}),r.initialize();var a=t(e);return!n&&a&&(n=(0,o["default"])(i).create({protectionModel:a,protectionKeyController:r,adapter:e.adapter,eventBus:e.eventBus,log:e.log}),e.capabilities.setEncryptedMediaSupported(!0)),n}function t(e){var t=e.log,r=e.eventBus,a=e.videoModel.getElement();return void 0!==a.onencrypted&&void 0!==a.mediaKeys&&void 0!==navigator.requestMediaKeySystemAccess&&"function"==typeof navigator.requestMediaKeySystemAccess?(t("EME detected on this user agent! (ProtectionModel_21Jan2015)"),(0,c["default"])(i).create({log:t,eventBus:r})):n(a,E)?(t("EME detected on this user agent! (ProtectionModel_3Feb2014)"),(0,p["default"])(i).create({log:t,eventBus:r,api:n(a,E)})):n(a,y)?(t("EME detected on this user agent! (ProtectionModel_01b)"),(0,v["default"])(i).create({log:t,eventBus:r,api:n(a,y)})):(t("No supported version of EME detected on this user agent! - Attempts to play encrypted content will fail!"),null)}function n(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}var r=void 0,i=this.context;return r={createProtectionSystem:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(134),o=r(a),s=n(32),u=r(s),l=n(133),f=r(l),d=n(139),c=r(d),g=n(140),p=r(g),h=n(138),v=r(h),m=n(1),_=r(m),y=[{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"}],E=[{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"}];i.__dashjs_factory_name="Protection";var T=_["default"].getClassFactory(i);T.events=f["default"],t["default"]=T,e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(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)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function(){function e(t,r){if(n(this,e),r&&"persistent"!==r&&"temporary"!==r)throw new Error("Invalid ClearKey key set type! Must be one of 'persistent' or 'temporary'");this.keyPairs=t,this.type=r}return r(e,[{key:"toJWK",value:function(){var e,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}}]),e}();t["default"]=i,e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function i(e,t){n(this,i),this.keyID=e,this.key=t};t["default"]=r,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){function t(){k={},j=[],K=(0,f["default"])(N).getInstance(),H=(0,c["default"])(N).getInstance(),q=(0,h["default"])(N).getInstance(),U.on(y["default"].BUFFER_EMPTY,v,B),U.on(y["default"].PLAYBACK_SEEKING,_,B),U.on(y["default"].PERIOD_SWITCH_STARTED,E,B)}function n(e){return e.map(function(e){return Math.log(e)})}function r(e,t,r,i){var a=NaN;if(i?(a=0,i.forEach(function(e,t){e>i[a]&&(a=t)})):(i=n(r),a=i.length-1),0===a)return null;var o=1-i[0]+(i[a]-i[0])/(t/e-1),s=e/(i[0]+o-1);return{utilities:i,gp:o,Vp:s}}function a(e){var t={},n=e.getMediaInfo(),i=e.getStreamProcessor(),a=e.getStreamInfo(),o=e.getTrackInfo(),s=i.isDynamic(),u=a.manifestInfo.duration,l=o.fragmentDuration,f=n.bitrateList.map(function(e){return e.bandwidth}),d=r(M,b,f,null);if(null===d)return t.state=S,t;if(t.state=I,t.bitrates=f,t.utilities=d.utilities,t.Vp=d.Vp,t.gp=d.gp,t.isDynamic=s,t.movieDuration=u,t.fragmentDuration=l,t.bandwidthSafetyFactor=K.getBandwidthSafetyFactor(),t.rebufferSafetyFactor=C,t.bufferTarget=K.getStableBufferTime(),t.lastQuality=0,t.virtualBuffer=0,t.throughputCount=s?P:w,A){for(var c="",g=0;g<f.length;++g){var p=d.utilities[g],h=f[g],v=0;if(g>0){var m=d.utilities[g-1],_=f[g-1];v=d.Vp*((m*h-p*_)/(h-_)+d.gp)}var y=d.Vp*(p+d.gp);c+="\n"+g+":"+(1e-6*f[g]).toFixed(3)+"Mbps "+v.toFixed(3)+"/"+y.toFixed(3)}L("BolaDebug "+n.type+" bitrates"+c)}return t}function s(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)||o>=i)&&(i=o,r=a)}return r}function u(e,t){for(var n=x.getHttpRequests(e),r=[],i=n.length-1;i>=0&&r.length<t;--i){var a=n[i];a.type===g.HTTPRequest.MEDIA_SEGMENT_TYPE&&a._tfinish&&a.tresponse&&a.trace&&r.push(a)}return r}function l(e,t,n){var r=u(e,t);if(0===r.length)return 0;for(var i=0,a="",o=0;o<r.length;++o){var s=.001*(r[o]._tfinish.getTime()-r[o].trequest.getTime()),l=8*r[o].trace.reduce(function(e,t){return e+t.b[0]},0);A&&(a+=" "+(1e-6*l).toFixed(3)+"/"+s.toFixed(3)+"="+(1e-6*l/s).toFixed(3)+"Mbps"),i+=s/l}return A&&L("BolaDebug "+n+" BolaRule recent throughput = "+(r.length/(1e6*i)).toFixed(3)+"Mbps:"+a),r.length/i}function d(e,t){var n=0;return e.bitrates.some(function(e,r){return e>t||(n=r,!1)}),n}function p(e,t){var n=u(e,1);if(0===n.length)return 0;var r=n[0],i=Date.now(),a=r._tfinish.getTime();a>i&&(a=i);var o=k[t];k[t]=i;var s=0;return s=o&&o>a?i-o:i-a,s<=0?0:.001*s}function v(){A&&L("BolaDebug BUFFER_EMPTY"),j.forEach(function(e){var t=F.getReadOnlyMetricsFor(e);if(0!==t.BolaState.length){var n=t.BolaState[0]._s;n.state===R&&(n.virtualBuffer=0,F.updateBolaState(e,n))}})}function _(e){A&&L("BolaDebug PLAYBACK_SEEKING "+e.seekTime.toFixed(3)),j.forEach(function(e){var t=F.getReadOnlyMetricsFor(e);if(0!==t.BolaState.length){var n=t.BolaState[0]._s;n.state!==S&&(n.state=I),F.updateBolaState(e,n)}})}function E(){}function D(e,t){var n=e.getStreamProcessor();n.getScheduleController().setTimeToLoadDelay(0);var r=(0,o["default"])(N).create(o["default"].NO_CHANGE,o["default"].WEAK,{name:i.__dashjs_factory_name}),u=e.getMediaInfo(),f=u.type,c=F.getReadOnlyMetricsFor(f);if(0===c.BolaState.length){A&&L("BolaDebug "+f+"\nBolaDebug "+f+" BolaRule for state=- fragmentStart="+q.getIndexHandlerTime(e.getStreamProcessor()).toFixed(3));var g=a(e);F.updateBolaState(f,g);var h=0;if(g.state!==S){j.push(f);var v=l(c,g.throughputCount,f);if(0===v)return A&&L("BolaDebug "+f+" BolaRule quality unchanged for INITIALIZE"),void t(r);h=d(g,v*g.bandwidthSafetyFactor),g.lastQuality=h,r.value=h,r.priority=o["default"].DEFAULT,r.reason.state=g.state,r.reason.throughput=v}return A&&L("BolaDebug "+f+" BolaRule quality "+h+" for INITIALIZE"),void t(r)}var m=c.BolaState[0]._s;if(m.state===S)return A&&L("BolaDebug "+f+" BolaRule quality 0 for ONE_BITRATE"),void t(r);var _=m.bitrates,y=m.utilities;A&&L("BolaDebug "+f+"\nBolaDebug "+f+" EXECUTE BolaRule for state="+m.state+" fragmentStart="+q.getIndexHandlerTime(e.getStreamProcessor()).toFixed(3));var E=x.getCurrentBufferLevel(c)?x.getCurrentBufferLevel(c):0,T=l(c,m.throughputCount,f);E<=.1&&(m.virtualBuffer=0);var M=p(c,f);M>0&&(m.virtualBuffer+=M),m.virtualBuffer<0&&(m.virtualBuffer=0);var b=E+m.virtualBuffer,D=s(m,b);if(A&&L("BolaDebug "+f+" BolaRule bufferLevel="+E.toFixed(3)+"(+"+m.virtualBuffer.toFixed(3)+"="+b.toFixed(3)+") recentThroughput="+(1e-6*T).toFixed(3)+" tentativeQuality="+D),m.state===I){var h=d(m,T*m.bandwidthSafetyFactor);if(E>m.fragmentDuration/C){m.state=R;for(var O=0,P=0;P<h;++P){var w=m.Vp*(m.gp+(_[h]*y[P]-_[P]*y[h])/(_[h]-_[P]));w>O&&(O=w)}O>E&&(m.virtualBuffer=O-E)}return A&&L("BolaDebug "+f+" BolaRule quality "+h+" for STARTUP"),m.lastQuality=h,F.updateBolaState(f,m),r.value=h,r.priority=o["default"].DEFAULT,r.reason.state=I,r.reason.throughput=T,void t(r)}if(D>m.lastQuality){var h=d(m,T);D>h&&(h<m.lastQuality&&(h=m.lastQuality),D=h)}if(T>0)for(var U=C*T*E/m.fragmentDuration;D>0&&_[D]>U;)--D;var B=0,k=m.Vp*(y[D]+m.gp);B=b-k,B>0&&(B>m.virtualBuffer?(B-=m.virtualBuffer,m.virtualBuffer=0):(m.virtualBuffer-=B,B=0)),B>0?D===_.length-1?B=0:n.getScheduleController().setTimeToLoadDelay(1e3*B):B=0,m.lastQuality=D,F.updateBolaState(f,m),r.value=D,r.priority=o["default"].DEFAULT,r.reason.state=m.state,r.reason.throughput=T,r.reason.bufferLevel=E,A&&L("BolaDebug "+f+" BolaRule quality "+D+" delay="+B.toFixed(3)+" for STEADY"),t(r)}function O(){U.off(y["default"].BUFFER_EMPTY,v,B),U.off(y["default"].PLAYBACK_SEEKING,_,B),U.off(y["default"].PERIOD_SWITCH_STARTED,E,B),t()}var P=2,w=3,N=this.context,L=(0,T["default"])(N).getInstance().log,x=e.dashMetrics,F=e.metricsModel,U=(0,m["default"])(N).getInstance(),B=void 0,k=void 0,j=void 0,K=void 0,H=void 0,q=void 0;return B={execute:D,reset:O},t(),B}Object.defineProperty(t,"__esModule",{value:!0});var a=n(8),o=r(a),s=n(1),u=r(s),l=n(5),f=r(l),d=n(9),c=r(d),g=n(7),p=n(15),h=r(p),v=n(3),m=r(v),_=n(2),y=r(_),E=n(4),T=r(E),S=0,I=1,R=2,A=!1,M=10,b=30,C=.5;i.__dashjs_factory_name="BolaRule";var D=u["default"].getClassFactory(i);D.BOLA_STATE_ONE_BITRATE=S,D.BOLA_STATE_STARTUP=I,D.BOLA_STATE_STEADY=R,D.BOLA_DEBUG=A,t["default"]=D,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(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}function t(){this.customTimeRangeArray=[],this.length=0}function n(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}function r(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)}function i(e){return this.customTimeRangeArray[e].start}function a(e){return this.customTimeRangeArray[e].end}var o=[],s=0;return{customTimeRangeArray:o,length:s,add:e,clear:t,remove:n,mergeRanges:r,start:i,end:a}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),o=r(a);i.__dashjs_factory_name="CustomTimeRanges",t["default"]=o["default"].getClassFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(e){var t=e.streamId,n=e.mediaInfo.type,i=e.quality;r[t]=r[t]||{},r[t][n]=r[t][n]||{},r[t][n][i]=e}function t(e,t,n){return r[e][t][n]}function n(){r={}}var r={},i={save:e,extract:t,reset:n};return i}Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),o=r(a);i.__dashjs_factory_name="InitCache",t["default"]=o["default"].getSingletonFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof t?"undefined":o(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)}var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};Object.defineProperty(t,"__esModule",{value:!0});var s=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}},u=n(23),l=r(u),f=function(e){function t(e,n){i(this,t),s(Object.getPrototypeOf(t.prototype),"constructor",this).call(this),this.url=e||null,this.type=n||null,this.mediaType="stream",this.responseType="text"}return a(t,e),t}(l["default"]);t["default"]=f,e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function a(){n(this,a),this.start=null,this.mstart=null,this.starttype=null,this.trace=[]};r.INITIAL_PLAYOUT_START_REASON="initial_playout",r.SEEK_START_REASON="seek",r.RESUME_FROM_PAUSE_START_REASON="resume",r.METRICS_COLLECTION_START_REASON="metrics_collection_start";var i=function o(){n(this,o),this.representationid=null,this.subreplevel=null,this.start=null,this.mstart=null,this.duration=null,this.playbackspeed=null,this.stopreason=null};i.REPRESENTATION_SWITCH_STOP_REASON="representation_switch",i.REBUFFERING_REASON="rebuffering",i.USER_REQUEST_STOP_REASON="user_request",i.END_OF_PERIOD_STOP_REASON="end_of_period",i.END_OF_CONTENT_STOP_REASON="end_of_content",i.METRICS_COLLECTION_STOP_REASON="metrics_collection_end",i.FAILURE_STOP_REASON="failure",t.PlayList=r,t.PlayListTrace=i},function(e,t,n){"use strict";var r={};r.parseBuffer=function(e){return new i(e).parse()},r.Utils={},r.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|=63&e.getUint8(i++)):a<240?(a=(15&a)<<12,a|=(63&e.getUint8(i++))<<6,a|=63&e.getUint8(i++)):(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("")},t.parseBuffer=r.parseBuffer,t.Utils=r.Utils,r.Cursor=function(e){this.offset="undefined"==typeof e?0:e};var i=function(e){this._raw=new DataView(e),this._cursor=new r.Cursor,this.boxes=[]};i.prototype.fetch=function(e){var t=this.fetchAll(e,!0);return t.length?t[0]:null},i.prototype.fetchAll=function(e,t){var n=[];return i._sweep.call(this,e,n,t),n},i.prototype.parse=function(){for(this._cursor.offset=0,this.boxes=[];this._cursor.offset<this._raw.byteLength;){var e=a.parse(this);if("undefined"==typeof e.type)break;this.boxes.push(e)}return this},i._sweep=function(e,t,n){this.type&&this.type==e&&t.push(this);for(var r in this.boxes){if(t.length&&n)return;i._sweep.call(this.boxes[r],e,t,n)}};var a=function(){this._cursor=new r.Cursor};a.parse=function(e){var t=new a;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},a.prototype._readInt=function(e){var t=null;switch(e){case 8:t=this._raw.getInt8(this._cursor.offset-this._raw.byteOffset);break;case 16:t=this._raw.getInt16(this._cursor.offset-this._raw.byteOffset);break;case 32:t=this._raw.getInt32(this._cursor.offset-this._raw.byteOffset);break;case 64:var n=this._raw.getInt32(this._cursor.offset-this._raw.byteOffset),r=this._raw.getInt32(this._cursor.offset-this._raw.byteOffset+4);t=n*Math.pow(2,32)+r}return this._cursor.offset+=e>>3,t},a.prototype._readUint=function(e){var t=null;switch(e){case 8:t=this._raw.getUint8(this._cursor.offset-this._raw.byteOffset);break;case 16:t=this._raw.getUint16(this._cursor.offset-this._raw.byteOffset);break;case 24:var n=this._raw.getUint16(this._cursor.offset-this._raw.byteOffset),r=this._raw.getUint8(this._cursor.offset-this._raw.byteOffset+2);t=(n<<8)+r;break;case 32:t=this._raw.getUint32(this._cursor.offset-this._raw.byteOffset);break;case 64:var n=this._raw.getUint32(this._cursor.offset-this._raw.byteOffset),r=this._raw.getUint32(this._cursor.offset-this._raw.byteOffset+4);t=n*Math.pow(2,32)+r}return this._cursor.offset+=e>>3,t},a.prototype._readString=function(e){for(var t="",n=0;n<e;n++){var r=this._readUint(8);
32
- t+=String.fromCharCode(r)}return t},a.prototype._readTerminatedString=function(){for(var e="";;){var t=this._readUint(8);if(0==t)break;e+=String.fromCharCode(t)}return e},a.prototype._readTemplate=function(e){var t=this._readUint(e/2),n=this._readUint(e/2);return t+n/Math.pow(2,e/2)},a.prototype._parseBox=function(){if(this._cursor.offset=this._offset,this._offset+8>this._raw.buffer.byteLength)return void(this._root._incomplete=!0);switch(this.size=this._readUint(32),this.type=this._readString(4),1==this.size&&(this.largesize=this._readUint(64)),"uuid"==this.type&&(this.usertype=this._readString(16)),this.size){case 0:this._raw=new DataView(this._raw.buffer,this._offset,this._raw.byteLength-this._cursor.offset);break;case 1:this._offset+this.size>this._raw.buffer.byteLength?(this._incomplete=!0,this._root._incomplete=!0):this._raw=new DataView(this._raw.buffer,this._offset,this.largesize);break;default:this._offset+this.size>this._raw.buffer.byteLength?(this._incomplete=!0,this._root._incomplete=!0):this._raw=new DataView(this._raw.buffer,this._offset,this.size)}!this._incomplete&&this._boxParsers[this.type]&&this._boxParsers[this.type].call(this)},a.prototype._parseFullBox=function(){this.version=this._readUint(8),this.flags=this._readUint(24)},a.prototype._boxParsers={},["moov","trak","tref","mdia","minf","stbl","edts","dinf","mvex","moof","traf","mfra","udta","meco","strk","vttc"].forEach(function(e){a.prototype._boxParsers[e]=function(){for(this.boxes=[];this._cursor.offset-this._raw.byteOffset<this._raw.byteLength;)this.boxes.push(a.parse(this))}}),a.prototype._boxParsers.elst=function(){this._parseFullBox(),this.entry_count=this._readUint(32),this.entries=[];for(var e=1;e<=this.entry_count;e++){var t={};1==this.version?(t.segment_duration=this._readUint(64),t.media_time=this._readInt(64)):(t.segment_duration=this._readUint(32),t.media_time=this._readInt(32)),t.media_rate_integer=this._readInt(16),t.media_rate_fraction=this._readInt(16),this.entries.push(t)}},a.prototype._boxParsers.emsg=function(){this._parseFullBox(),this.scheme_id_uri=this._readTerminatedString(),this.value=this._readTerminatedString(),this.timescale=this._readUint(32),this.presentation_time_delta=this._readUint(32),this.event_duration=this._readUint(32),this.id=this._readUint(32),this.message_data=new DataView(this._raw.buffer,this._cursor.offset,this._raw.byteLength-(this._cursor.offset-this._offset))},a.prototype._boxParsers.free=a.prototype._boxParsers.skip=function(){this.data=new DataView(this._raw.buffer,this._cursor.offset,this._raw.byteLength-(this._cursor.offset-this._offset))},a.prototype._boxParsers.ftyp=a.prototype._boxParsers.styp=function(){for(this.major_brand=this._readString(4),this.minor_versions=this._readUint(32),this.compatible_brands=[];this._cursor.offset-this._raw.byteOffset<this._raw.byteLength;)this.compatible_brands.push(this._readString(4))},a.prototype._boxParsers.hdlr=function(){this._parseFullBox(),this.pre_defined=this._readUint(32),this.handler_type=this._readString(4),this.reserved=[this._readUint(32),this._readUint(32),this._readUint(32)],this.name=this._readTerminatedString()},a.prototype._boxParsers.mdat=function(){this.data=new DataView(this._raw.buffer,this._cursor.offset,this._raw.byteLength-(this._cursor.offset-this._offset))},a.prototype._boxParsers.mdhd=function(){this._parseFullBox(),1==this.version?(this.creation_time=this._readUint(64),this.modification_time=this._readUint(64),this.timescale=this._readUint(32),this.duration=this._readUint(64)):(this.creation_time=this._readUint(32),this.modification_time=this._readUint(32),this.timescale=this._readUint(32),this.duration=this._readUint(32));var e=this._readUint(16);this.pad=e>>15,this.language=String.fromCharCode((e>>10&31)+96,(e>>5&31)+96,(31&e)+96),this.pre_defined=this._readUint(16)},a.prototype._boxParsers.mfhd=function(){this._parseFullBox(),this.sequence_number=this._readUint(32)},a.prototype._boxParsers.mvhd=function(){this._parseFullBox(),1==this.version?(this.creation_time=this._readUint(64),this.modification_time=this._readUint(64),this.timescale=this._readUint(32),this.duration=this._readUint(64)):(this.creation_time=this._readUint(32),this.modification_time=this._readUint(32),this.timescale=this._readUint(32),this.duration=this._readUint(32)),this.rate=this._readTemplate(32),this.volume=this._readTemplate(16),this.reserved1=this._readUint(16),this.reserved2=[this._readUint(32),this._readUint(32)],this.matrix=[];for(var e=0;e<9;e++)this.matrix.push(this._readTemplate(32));this.pre_defined=[];for(var e=0;e<6;e++)this.pre_defined.push(this._readUint(32));this.next_track_ID=this._readUint(32)},a.prototype._boxParsers.payl=function(){var e=new DataView(this._raw.buffer,this._cursor.offset,this._raw.byteLength-(this._cursor.offset-this._offset));this.cue_text=r.Utils.dataViewToString(e)},a.prototype._boxParsers.sidx=function(){this._parseFullBox(),this.reference_ID=this._readUint(32),this.timescale=this._readUint(32),0==this.version?(this.earliest_presentation_time=this._readUint(32),this.first_offset=this._readUint(32)):(this.earliest_presentation_time=this._readUint(64),this.first_offset=this._readUint(64)),this.reserved=this._readUint(16),this.reference_count=this._readUint(16),this.references=[];for(var e=0;e<this.reference_count;e++){var t={},n=this._readUint(32);t.reference_type=n>>31&1,t.referenced_size=2147483647&n,t.subsegment_duration=this._readUint(32);var r=this._readUint(32);t.starts_with_SAP=r>>31&1,t.SAP_type=r>>28&7,t.SAP_delta_time=268435455&r,this.references.push(t)}},a.prototype._boxParsers.ssix=function(){this._parseFullBox(),this.subsegment_count=this._readUint(32),this.subsegments=[];for(var e=0;e<this.subsegment_count;e++){var t={};t.ranges_count=this._readUint(32),t.ranges=[];for(var n=0;n<t.ranges_count;n++){var r={};r.level=this._readUint(8),r.range_size=this._readUint(24),t.ranges.push(r)}this.subsegments.push(t)}},a.prototype._boxParsers.tfdt=function(){this._parseFullBox(),1==this.version?this.baseMediaDecodeTime=this._readUint(64):this.baseMediaDecodeTime=this._readUint(32)},a.prototype._boxParsers.tfhd=function(){this._parseFullBox(),this.track_ID=this._readUint(32),1&this.flags&&(this.base_data_offset=this._readUint(64)),2&this.flags&&(this.sample_description_offset=this._readUint(32)),8&this.flags&&(this.default_sample_duration=this._readUint(32)),16&this.flags&&(this.default_sample_size=this._readUint(32)),32&this.flags&&(this.default_sample_flags=this._readUint(32))},a.prototype._boxParsers.tkhd=function(){this._parseFullBox(),1==this.version?(this.creation_time=this._readUint(64),this.modification_time=this._readUint(64),this.track_ID=this._readUint(32),this.reserved1=this._readUint(32),this.duration=this._readUint(64)):(this.creation_time=this._readUint(32),this.modification_time=this._readUint(32),this.track_ID=this._readUint(32),this.reserved1=this._readUint(32),this.duration=this._readUint(32)),this.reserved2=[this._readUint(32),this._readUint(32)],this.layer=this._readUint(16),this.alternate_group=this._readUint(16),this.volume=this._readTemplate(16),this.reserved3=this._readUint(16),this.matrix=[];for(var e=0;e<9;e++)this.matrix.push(this._readTemplate(32));this.width=this._readUint(32),this.height=this._readUint(32)},a.prototype._boxParsers.trun=function(){this._parseFullBox(),this.sample_count=this._readUint(32),1&this.flags&&(this.data_offset=this._readInt(32)),4&this.flags&&(this.first_sample_flags=this._readUint(32)),this.samples=[];for(var e=0;e<this.sample_count;e++){var t={};256&this.flags&&(t.sample_duration=this._readUint(32)),512&this.flags&&(t.sample_size=this._readUint(32)),1024&this.flags&&(t.sample_flags=this._readUint(32)),2048&this.flags&&(0==this.version?t.sample_composition_time_offset=this._readUint(32):t.sample_composition_time_offset=this._readInt(32)),this.samples.push(t)}},a.prototype._boxParsers.vlab=function(){var e=new DataView(this._raw.buffer,this._cursor.offset,this._raw.byteLength-(this._cursor.offset-this._offset));this.source_label=r.Utils.dataViewToString(e)},a.prototype._boxParsers.vttC=function(){var e=new DataView(this._raw.buffer,this._cursor.offset,this._raw.byteLength-(this._cursor.offset-this._offset));this.config=r.Utils.dataViewToString(e)},a.prototype._boxParsers.vtte=function(){}},function(e,t,n){(function(e){"use strict";var t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};!function(){var r=function(e,t){var n,r="dash",i=window.MediaSource,a=t.common,o=t.extend,s=t.version,u=function(e,t,n){return"application/dash+xml"===e.toLowerCase()&&i.isTypeSupported(t+';codecs="'+n+'"')&&(n.indexOf("mp4a.40.5")<0||navigator.userAgent.indexOf("Android")<0)},l=function(i,l){var f,d,c,g,p=t.bean,h={engineName:r,pick:function(e){var t,r,i,o;for(t=0;t<e.length;t+=1)if(r=e[t],i=r.dashType||n.type,o=r.dashCodecs||n.codecs,u(r.type,i,o))return"string"==typeof r.src&&(r.src=a.createAbsoluteUrl(r.src)),r},load:function(s){var u=i.conf,c=o(n,u.dash,u.clip.dash),g={ended:"finish",loadeddata:"ready",pause:"pause",play:"resume",progress:"buffer",ratechange:"speed",seeked:"seek",timeupdate:"progress",volumechange:"volume"},h=e.MediaPlayer.events,v=!!s.autoplay||!!u.autoplay,m="is-poster",_=0;if(f)(i.video.src&&s.src!==i.video.src||s.index)&&f.setAutoPlay(!0),f.attachSource(s.src);else{if(a.removeNode(a.findDirect("video",l)[0]||a.find(".fp-player > video",l)[0]),d=a.createElement("video",{"class":"fp-engine "+r+"-engine",volume:i.volumeLevel,"x-webkit-airplay":"allow"}),Object.keys(g).forEach(function(e){var t,n=g[e],c=e+"."+r;p.on(d,c,function(e){if(u.debug&&n.indexOf("progress")<0&&console.log(c,"->",n,e.originalEvent),i.ready||!(n.indexOf("ready")<0)){var r,g,p=d.currentTime,h=0,v=0;switch(n){case"ready":t=o(i.video,{duration:f.duration(),seekable:d.seekable.end(null),width:d.videoWidth,height:d.videoHeight,url:i.video.src});break;case"resume":i.poster&&(a.removeClass(l,m),i.poster=!1);break;case"seek":t=f.time();break;case"progress":i.live&&!_&&p>0&&(_=p),t=i.live?_?p-_:0:p;break;case"speed":t=d.playbackRate;break;case"volume":t=d.volume;break;case"buffer":try{if(p)for(r=d.buffered,g=r.length-1;g>-1;g-=1)v=r.end(g),v>=p&&(h=v)}catch(y){}s.buffer=h,t=h}i.trigger(n,[i,t])}})}),u.poster){var y=function(e){"stop"!==e.type&&v||setTimeout(function(){i.poster||(a.addClass(l,m),i.poster=!0)})};i.one("ready."+r,y).on("stop."+r,y)}i.on("error."+r,function(){f&&(f.reset(),f=0)}),f=e.MediaPlayer().create(),i.engine[r]=f,f.enableBufferOccupancyABR(c.bufferOccupancyABR),f.enableLastBitrateCaching(!1),f.setScheduleWhilePaused(!0),f.getDebug().setLogToBrowserConsole(c.debug),Object.keys(h).forEach(function(e){var t=h[e],n=r+t.charAt(0).toUpperCase()+t.slice(1),a=c.listeners,u=a&&a.indexOf(t)>-1;f.on(t,function(t){var r,a,l=o({},t),f=i.video.src;switch(delete l.type,e){case"ERROR":switch(l.error){case"download":r=4;break;case"manifestError":r=5;break;case"mediasource":switch(t.event){case"MEDIA_ERR_DECODE":r=3;break;case"MEDIA_ERR_SRC_NOT_SUPPORTED":r=5;break;case"MEDIA_ERR_NETWORK":r=2;break;case"MEDIA_ERR_ABORTED":r=1}}if(r)return a={code:r},r>2&&(a.video=o(s,{src:f,url:l.event.url||f})),void i.trigger("error",[i,a])}u&&i.trigger(n,[i,l])})}),a.prepend(a.find(".fp-player",l)[0],d),f.initialize(d,s.src,v)}i.video=s,d.paused&&v&&(t.support.firstframe?f.play():(d.play(),d.pause(),f.play()))},resume:function(){f.play()},pause:function(){f.pause()},seek:function(e){f.seek(e)},volume:function(e){d&&(d.volume=e)},speed:function(e){d.playbackRate=e,i.trigger("speed",[i,e])},unload:function(){if(f){var e="."+r;f.reset(),f=0,i.off(e),p.off(l,e),p.off(d,e),a.removeNode(d),d=0}}};return!/^6\.0\.[0-3]#x2F;.test(s)||i.conf.splash||i.conf.poster||i.conf.autoplay||(c=a.css(l,"backgroundColor"),g="none"!==a.css(l,"backgroundImage")||c&&"rgba(0, 0, 0, 0)"!==c&&"transparent"!==c,g&&(i.conf.poster=!0)),h};i&&"function"==typeof i.isTypeSupported&&0!==s.indexOf("5.")&&(l.engineName=r,l.canPlay=function(e,i){return n=o({type:"video/mp4",codecs:"avc1.42c01e,mp4a.40.2"},t.conf[r],i[r],i.clip[r]),u(e,n.type,n.codecs)},t.engines.unshift(l))};"object"===t(e)&&e.exports?e.exports=r.bind(void 0,n(74)):window.dashjs&&window.flowplayer&&r(window.dashjs,window.flowplayer)}()}).call(t,n(187)(e))},function(e,t){"use strict";function n(e){var t,n,i;for(t=[],i=0,n=e.length;i<n;i+=1)e[i].isRoot?t.push("root"):t.push(e[i].name);var a=function(e,t){var n;if(null!==e&&null!==t)for(n in e)e.hasOwnProperty(n)&&(t.hasOwnProperty(n)||(t[n]=e[n]))},o=function(e,t,n){var i,o,s,u,l;if(null!==e&&0!==e.length)for(i=0,o=e.length;i<o;i+=1)s=e[i],t.hasOwnProperty(s.name)&&(n.hasOwnProperty(s.name)?s.merge&&(u=t[s.name],l=n[s.name],"object"===("undefined"==typeof u?"undefined":r(u))&&"object"===("undefined"==typeof l?"undefined":r(l))?a(u,l):null!=s.mergeFunction?n[s.name]=s.mergeFunction(u,l):n[s.name]=u+l):n[s.name]=t[s.name])},s=function l(e,t){var n,r,i,a,s,u,f,d=e;if(null!==d.children&&0!==d.children.length)for(n=0,r=d.children.length;n<r;n+=1)if(u=d.children[n],t.hasOwnProperty(u.name))if(u.isArray)for(s=t[u.name+"_asArray"],i=0,a=s.length;i<a;i+=1)f=s[i],o(d.properties,t,f),l(u,f);else f=t[u.name],o(d.properties,t,f),l(u,f)},u=function f(n){var i,a,o,u,l,d,c;if(null===n)return n;if("object"!==("undefined"==typeof n?"undefined":r(n)))return n;for(i=0,a=t.length;i<a;i+=1)"root"===t[i]&&(l=e[i],d=n,s(l,d));for(u in n)if(n.hasOwnProperty(u)&&"__children"!=u){if(o=t.indexOf(u),o!==-1)if(l=e[o],l.isArray)for(c=n[u+"_asArray"],i=0,a=c.length;i<a;i+=1)d=c[i],s(l,d);else d=n[u],s(l,d);f(n[u])}return n};return{run:u}}var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=n,e.exports=t["default"]},function(e,t,n){(function(e){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(59),a=r(i),o=n(63),s=r(o),u=n(113),l=r(u),f=n(100),d=r(f),c=n(53),g=window||e,p=g.dashjs;p||(p=g.dashjs={}),p.MediaPlayer=a["default"],p.Protection=s["default"],p.MetricsReporting=l["default"],p.MediaPlayerFactory=d["default"],p.Version=(0,c.getVersionString)(),t["default"]=p,t.MediaPlayer=a["default"],t.Protection=s["default"],t.MetricsReporting=l["default"],t.MediaPlayerFactory=d["default"]}).call(t,function(){return this}())},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof t?"undefined":o(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)}var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};Object.defineProperty(t,"__esModule",{value:!0});var s=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}},u=n(24),l=r(u),f=function(e){function t(){i(this,t),s(Object.getPrototypeOf(t.prototype),"constructor",this).call(this),this.AST_IN_FUTURE="astinfuture",this.BUFFERING_COMPLETED="bufferingCompleted",this.BUFFER_CLEARED="bufferCleared",this.BUFFER_LEVEL_UPDATED="bufferLevelUpdated",this.BYTES_APPENDED="bytesAppended",this.CHECK_FOR_EXISTENCE_COMPLETED="checkForExistenceCompleted",this.CHUNK_APPENDED="chunkAppended",this.CURRENT_TRACK_CHANGED="currenttrackchanged",this.DATA_UPDATE_COMPLETED="dataUpdateCompleted",this.DATA_UPDATE_STARTED="dataUpdateStarted",this.FRAGMENT_LOADING_COMPLETED="fragmentLoadingCompleted",this.FRAGMENT_LOADING_STARTED="fragmentLoadingStarted",this.FRAGMENT_LOADING_ABANDONED="fragmentLoadingAbandoned",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.MANIFEST_UPDATED="manifestUpdated",this.MEDIA_FRAGMENT_LOADED="mediaFragmentLoaded",this.QUOTA_EXCEEDED="quotaExceeded",this.REPRESENTATION_UPDATED="representationUpdated",this.SEGMENTS_LOADED="segmentsLoaded",this.SERVICE_LOCATION_BLACKLIST_CHANGED="serviceLocationBlacklistChanged",this.SOURCEBUFFER_APPEND_COMPLETED="sourceBufferAppendCompleted",this.SOURCEBUFFER_REMOVE_COMPLETED="sourceBufferRemoveCompleted",this.STREAMS_COMPOSED="streamsComposed",this.STREAM_BUFFERING_COMPLETED="streamBufferingCompleted",this.STREAM_COMPLETED="streamCompleted",this.STREAM_INITIALIZED="streaminitialized",this.STREAM_TEARDOWN_COMPLETE="streamTeardownComplete",this.TIMED_TEXT_REQUESTED="timedTextRequested",this.TIME_SYNCHRONIZATION_COMPLETED="timeSynchronizationComplete",this.URL_RESOLUTION_FAILED="urlResolutionFailed",this.WALLCLOCK_TIME_UPDATED="wallclockTimeUpdated",this.XLINK_ALL_ELEMENTS_LOADED="xlinkAllElementsLoaded",this.XLINK_ELEMENT_LOADED="xlinkElementLoaded",this.XLINK_READY="xlinkReady"}return a(t,e),t}(l["default"]);t["default"]=f,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){function t(){V=-1,X=0,Z=NaN,B.on(d["default"].INITIALIZATION_LOADED,L,G),B.on(d["default"].SEGMENTS_LOADED,x,G)}function n(t){J=t,Q=J.getType(),W=J.isDynamic(),$=(0,S["default"])(F).create(e,W)}function r(){return J}function i(e){X=e}function a(){return X}function s(){return V}function f(){return Z}function c(){$=null,X=0,Z=NaN,z=NaN,V=-1,W=null,Q=null,J=null,B.off(d["default"].INITIALIZATION_LOADED,L,G),B.off(d["default"].SEGMENTS_LOADED,x,G)}function p(e){return e.split("$").join("quot;)}function h(e,t){if(null===t||e.indexOf("$RepresentationIDquot;)===-1)return e;var n=t.toString();return e.split("$RepresentationIDquot;).join(n)}function v(e,t,n){var r,i,a=Y.resolve(n.path);return a&&t!==a.url&&k.isRelative(t)?(r=a.url,i=a.serviceLocation,t&&(r+=t)):r=t,!k.isRelative(r)&&(e.url=r,e.serviceLocation=i,!0)}function _(e,t){var n,r,i=new o["default"];if(n=e.adaptation.period,i.mediaType=t,i.type=l.HTTPRequest.INIT_SEGMENT_TYPE,i.range=e.range,r=n.start,i.availabilityStartTime=K.calcAvailabilityStartTimeFromPresentationTime(r,e.adaptation.period.mpd,W),i.availabilityEndTime=K.calcAvailabilityEndTimeFromPresentationTime(r+n.duration,n.mpd,W),i.quality=e.index,i.mediaInfo=J.getMediaInfo(),v(i,e.initialization,e))return i}function T(e){var t;return e?t=_(e,Q):null}function R(e){var t,n,r,i=e.adaptation.period,a=e.segmentInfoType,o=!1;return V<0?o=!1:W||V<e.availableSegmentsNumber?(n=(0,E.getSegmentByIndex)(V,e),n&&(r=n.presentationStartTime-i.start,t=e.adaptation.period.duration,U(e.segmentInfoType+": "+r+" / "+t),o=("SegmentTimeline"!==a||!W)&&r>=t)):o=!0,o}function A(e){return $.getSegments(e,z,V,M)}function M(e,t){if(e.segments=t,t&&t.length>0&&(Z=isNaN(Z)?t[0].presentationStartTime:Math.min(t[0].presentationStartTime,Z)),W&&isNaN(K.getExpectedLiveEdge())){var n=t.length-1,r=t[n],i=r.presentationStartTime,a=q.getMetricsFor("stream");K.setExpectedLiveEdge(i),q.updateManifestUpdateInfo(H.getCurrentManifestUpdate(a),{presentationStartTime:i})}}function b(e){if(!e)throw new u["default"]("no representation");return e.segments=null,A(e),e}function C(e,t){var n,r=e.initialization,i="BaseURL"!==e.segmentInfoType&&"SegmentBase"!==e.segmentInfoType&&!e.indexRange;return e.segmentDuration||e.segments||b(e),e.segmentAvailabilityRange=null,e.segmentAvailabilityRange=K.calcSegmentAvailabilityRange(e,W),e.segmentAvailabilityRange.end<e.segmentAvailabilityRange.start&&!e.useCalculatedLiveEdgeTime?(n=new u["default"](I,"no segments are available yet",{availabilityDelay:e.segmentAvailabilityRange.start-e.segmentAvailabilityRange.end}),void B.trigger(d["default"].REPRESENTATION_UPDATED,{sender:this,representation:e,error:n})):(t||(V=-1),e.segmentDuration&&b(e),r||j.loadInitialization(e),i||j.loadSegments(e,Q,e.indexRange),void(r&&i&&B.trigger(d["default"].REPRESENTATION_UPDATED,{sender:this,representation:e})))}function D(e,t,n){var r,i,a,o,s,u=t.segments,l=u?u.length:null,f=-1;if(u&&l>0)for(s=0;s<l;s++)if(i=u[s],a=i.presentationStartTime,o=i.duration,r=void 0===n||null===n?o/2:n,e+r>=a&&e-r<a+o){f=i.availabilityIdx;break}return f}function O(e){if(null===e||void 0===e)return null;var t=new o["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,E.replaceTokenForTemplate)(i,"Number",e.replacementNumber),i=(0,E.replaceTokenForTemplate)(i,"Time",e.replacementTime),i=(0,E.replaceTokenForTemplate)(i,"Bandwidth",r),i=h(i,n.id),i=p(i),t.mediaType=Q,t.type=l.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=J.getMediaInfo(),t.adaptationIndex=n.adaptation.index,v(t,i,n)?t:void 0}function P(e,t,n){var r,i,a,s=V,u=!!n&&n.keepIdx,l=n?n.timeThreshold:null,f=!(!n||!n.ignoreIsFinished);return e?(z!==t&&(z=t,U("Getting the request for "+Q+" time : "+t)),V=D(t,e,l),A(e),V<0&&(V=D(t,e,l)),V>0&&U("Index for "+Q+" time "+t+" is "+V),a=!f&&R(e),a?(r=new o["default"],r.action=o["default"].ACTION_COMPLETE,r.index=V,r.mediaType=Q,r.mediaInfo=J.getMediaInfo(),U("Signal complete.",r)):(i=(0,E.getSegmentByIndex)(V,e),r=O(i)),u&&s>=0&&(V="SegmentTimeline"===e.segmentInfoType&&W?V:s),r):null}function w(e,t){var n=(e.segmentAvailabilityRange.end-e.segmentAvailabilityRange.start)/2;return e.segments=null,e.segmentAvailabilityRange={start:t-n,end:t+n},P(e,t,{keepIdx:!1,ignoreIsFinished:!0})}function N(e){var t,n,r;return e&&V!==-1?(z=null,V++,U("Getting the next request at index: "+V),r=R(e),r?(t=new o["default"],t.action=o["default"].ACTION_COMPLETE,t.index=V,t.mediaType=Q,t.mediaInfo=J.getMediaInfo(),U("Signal complete.")):(A(e),n=(0,E.getSegmentByIndex)(V,e),t=O(n),!n&&W&&V--),t):null}function L(e){var t=e.representation;t.segments&&B.trigger(d["default"].REPRESENTATION_UPDATED,{sender:this,representation:t})}function x(e){if(!e.error&&Q===e.mediaType){var t,n,r,i,a=e.segments,o=e.representation,s=[],u=0;for(t=0,n=a.length;t<n;t++)r=a[t],i=(0,E.getTimeBasedSegment)(K,W,o,r.startTime,r.duration,r.timescale,r.media,r.mediaRange,u),s.push(i),i=null,u++;o.segmentAvailabilityRange={start:s[0].presentationStartTime,end:s[n-1].presentationStartTime},o.availableSegmentsNumber=n,M(o,s),o.initialization&&B.trigger(d["default"].REPRESENTATION_UPDATED,{sender:this,representation:o})}}var F=this.context,U=(0,m["default"])(F).getInstance().log,B=(0,g["default"])(F).getInstance(),k=(0,y["default"])(F).getInstance(),j=e.segmentBaseLoader,K=e.timelineConverter,H=e.dashMetrics,q=e.metricsModel,Y=e.baseURLController,G=void 0,V=void 0,z=void 0,W=void 0,Q=void 0,X=void 0,Z=void 0,J=void 0,$=void 0;return G={initialize:n,getStreamProcessor:r,getInitRequest:T,getSegmentRequestForTime:P,getNextSegmentRequest:N,generateSegmentRequestForTime:w,updateRepresentation:C,setCurrentTime:i,getCurrentTime:a,getCurrentIndex:s,getEarliestTime:f,reset:c},t(),G}Object.defineProperty(t,"__esModule",{value:!0});var a=n(23),o=r(a),s=n(6),u=r(s),l=n(7),f=n(2),d=r(f),c=n(3),g=r(c),p=n(1),h=r(p),v=n(4),m=r(v),_=n(22),y=r(_),E=n(25),T=n(89),S=r(T),I=1;i.__dashjs_factory_name="DashHandler";var R=h["default"].getClassFactory(i);R.SEGMENTS_UNAVAILABLE_ERROR_CODE=I,t["default"]=R,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(){E=(0,c["default"])(g).getInstance(),T=(0,_["default"])(g).getInstance(),I=(0,o["default"])(g).getInstance()}function t(e){e.baseURLController&&(R=e.baseURLController)}function n(e,t){var r=!0,i=null,a=null,o=new XMLHttpRequest,u=R.resolve(e.path),f=t||{url:u?u.url:void 0,range:{start:0,end:1500},searching:!1,bytesLoaded:0,bytesToLoad:1500,request:o};h("Start searching for initialization."),o.onload=function(){o.status<200||o.status>299||(r=!1,f.bytesLoaded=f.range.end,a=T.parse(o.response),i=s(a),i?(e.range=i,e.initialization=f.url,m.trigger(p["default"].INITIALIZATION_LOADED,{representation:e})):(f.range.end=f.bytesLoaded+f.bytesToLoad,n(e,f)))},o.onloadend=o.onerror=function(){r&&(r=!1,E.downloadError("initialization",f.url,o),m.trigger(p["default"].INITIALIZATION_LOADED,{representation:e}))},l(o,f),h("Perform init search: "+f.url)}function r(e,t,n,i,o){if(n&&(void 0===n.start||void 0===n.end)){var s=n?n.toString().split("-"):null;n=s?{start:parseFloat(s[0]),end:parseFloat(s[1])}:null}o=o?o:d;var u=!0,f=null,c=null,g=!!n,p=new XMLHttpRequest,v=R.resolve(e.path),m={url:v?v.url:void 0,range:g?n:{start:0,end:1500},searching:!g,bytesLoaded:i?i.bytesLoaded:0,bytesToLoad:1500,request:p};p.onload=function(){if(!(p.status<200||p.status>299)){var n=m.bytesToLoad,i=p.response.byteLength;if(u=!1,m.bytesLoaded=m.range.end-m.range.start,f=T.parse(p.response),c=f.getBox("sidx"),c&&c.isComplete){var s,l,d=c.references;if(null!==d&&void 0!==d&&d.length>0&&(s=1===d[0].reference_type),s){h("Initiate multiple SIDX load."),m.range.end=m.range.start+c.size;var g,v,_,y,E,S=[],I=0,R=(c.offset||m.range.start)+c.size,A=function(n){n?(S=S.concat(n),I++,I>=v&&o(S,e,t)):o(null,e,t)};for(g=0,v=d.length;g<v;g++)_=R,y=R+d[g].referenced_size-1,R+=d[g].referenced_size,E={start:_,end:y},r(e,null,E,m,A)}else h("Parsing segments from SIDX."),l=a(c,m),o(l,e,t)}else{if(c)m.range.start=c.offset||m.range.start,m.range.end=m.range.start+(c.size||n);else{if(i<m.bytesLoaded)return void o(null,e,t);var M=f.getLastBox();M&&M.size?(m.range.start=M.offset+M.size,m.range.end=m.range.start+n):m.range.end+=n}r(e,t,m.range,m,o)}}},p.onloadend=p.onerror=function(){u&&(u=!1,E.downloadError("SIDX",m.url,p),o(null,e,t))},l(p,m),h("Perform SIDX load: "+m.url)}function i(){E=null,T=null,I=null,h=null}function a(e,t){for(var n,r,i,a,o=e.references,s=o.length,l=e.timescale,f=e.earliest_presentation_time,d=t.range.start+e.offset+e.first_offset+e.size,c=[],g=0;g<s;g++)i=o[g].subsegment_duration,a=o[g].referenced_size,n=new u["default"],n.duration=i,n.media=t.url,n.startTime=f,n.timescale=l,r=d+a-1,n.mediaRange=d+"-"+r,c.push(n),f+=i,d+=a;return c}function s(e){var t,n,r=e.getBox("ftyp"),i=e.getBox("moov"),a=null;return h("Searching for initialization."),i&&i.isComplete&&(t=r?r.offset:i.offset,n=i.offset+i.size-1,a=t+"-"+n,h("Found the initialization. Range: "+a)),a}function l(e,t){t.url&&(e.open("GET",I.modifyRequestURL(t.url)),e.responseType="arraybuffer",e.setRequestHeader("Range","bytes="+t.range.start+"-"+t.range.end),e=I.modifyRequestHeader(e),e.send(null))}function d(e,t,n){e?m.trigger(p["default"].SEGMENTS_LOADED,{segments:e,representation:t,mediaType:n}):m.trigger(p["default"].SEGMENTS_LOADED,{segments:null,representation:t,mediaType:n,error:new f["default"](null,"error loading segments",null)})}var g=this.context,h=(0,S["default"])(g).getInstance().log,m=(0,v["default"])(g).getInstance(),y=void 0,E=void 0,T=void 0,I=void 0,R=void 0;return y={setConfig:t,initialize:e,loadInitialization:n,loadSegments:r,reset:i}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(33),o=r(a),s=n(37),u=r(s),l=n(6),f=r(l),d=n(11),c=r(d),g=n(2),p=r(g),h=n(3),v=r(h),m=n(49),_=r(m),y=n(1),E=r(y),T=n(4),S=r(T);i.__dashjs_factory_name="SegmentBaseLoader",t["default"]=E["default"].getSingletonFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(){R={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"},CueBlockNumber:{tag:21368}}}}},Void:{tag:236,required:!0}}}function t(){M=(0,v["default"])(h).getInstance(),b=(0,_["default"])(h).getInstance(),D=(0,A["default"])(h).create({errHandler:M,metricsModel:C,requestModifier:b})}function n(e){if(!e.baseURLController||!e.metricsModel)throw new Error("Missing config parameter(s)");O=e.baseURLController,C=e.metricsModel}function r(e){var t=[],n=void 0,r=void 0,i=void 0,a=(0,f["default"])(h).create({data:e}),o=void 0;for(a.consumeTag(R.Segment.Cues),r=a.getMatroskaCodedNum();a.moreData()&&a.consumeTagAndSize(R.Segment.Cues.CuePoint,!0);){for(n={},n.CueTime=a.parseTag(R.Segment.Cues.CuePoint.CueTime),n.CueTracks=[];a.moreData()&&a.consumeTagAndSize(R.Segment.Cues.CuePoint.CueTrackPositions,!0);){if(i={},i.Track=a.parseTag(R.Segment.Cues.CuePoint.CueTrackPositions.CueTrack),0===i.Track)throw new Error("Cue track cannot be 0");i.ClusterPosition=a.parseTag(R.Segment.Cues.CuePoint.CueTrackPositions.CueClusterPosition),a.getPos()+4>r||!a.consumeTag(R.Segment.Cues.CuePoint.CueTrackPositions.CueBlockNumber,!0)?n.CueTracks.push(i):(o=a.getMatroskaCodedNum(),i.BlockNumber=a.getMatroskaUint(o),n.CueTracks.push(i))}if(0===n.CueTracks.length)throw new Error("Mandatory cuetrack not found");t.push(n)}if(0===t.length)throw new Error("mandatory cuepoint not found");return t}function i(e,t,n,i,a){var o=void 0,s=void 0,u=void 0,l=void 0,f=void 0,d=void 0,c=void 0,g=void 0;for(s=r(e),u=[],f=0,d=s.length;f<d;f+=1)l=new E["default"],o=0,o=f<s.length-1?s[f+1].CueTime-s[f].CueTime:a-s[f].CueTime,l.duration=o,l.media=t,l.startTime=s[f].CueTime,l.timescale=1e3,c=s[f].CueTracks[0].ClusterPosition+n,g=f<s.length-1?s[f+1].CueTracks[0].ClusterPosition+n-1:i-1,l.mediaRange=c+"-"+g,u.push(l);return m("Parsed cues: "+u.length+" cues."),u}function a(e,t,n,r){var a=(0,f["default"])(h).create({data:e}),o=void 0,s=void 0,u=n.split("-"),l=null,d={url:t,range:{start:parseFloat(u[0]),end:parseFloat(u[1])},request:l},g=void 0,p=void 0;for(m("Parse EBML header: "+d.url),a.skipOverElement(R.EBML),a.consumeTag(R.Segment),g=a.getMatroskaCodedNum(),g+=a.getPos(),p=a.getPos();a.moreData()&&!a.consumeTagAndSize(R.Segment.Info,!0);)if(!(a.skipOverElement(R.Segment.SeekHead,!0)||a.skipOverElement(R.Segment.Tracks,!0)||a.skipOverElement(R.Segment.Cues,!0)||a.skipOverElement(R.Void,!0)))throw new Error("no valid top level element found");for(;void 0===o;){var v=a.getMatroskaCodedNum(!0),_=a.getMatroskaCodedNum();switch(v){case R.Segment.Info.Duration.tag:o=a[R.Segment.Info.Duration.parse](_);break;default:a.setPos(a.getPos()+_)}}l=c(d);var y=function(e){s=i(e,d.url,p,g,o),r(s)},E=function(){m("Download Error: Cues "+d.url),r(null)};D.load({request:l,success:y,error:E}),m("Perform cues load: "+d.url+" bytes="+d.range.start+"-"+d.range.end)}function s(e,t){var n=null,r=O.resolve(e.path),i=r?r.url:void 0,a=e.range.split("-"),s=t||{range:{start:parseFloat(a[0]),end:parseFloat(a[1])},request:n,url:i,init:!0};m("Start loading initialization."),n=c(s);var u=function(){e.initialization=s.url,y.trigger(o["default"].INITIALIZATION_LOADED,{representation:e})},l=function(){y.trigger(o["default"].INITIALIZATION_LOADED,{
33
- representation:e})};D.load({request:n,success:u,error:l}),m("Perform init load: "+s.url)}function l(e,t,n,r){var i=null,o=O.resolve(e.path),s=o?o.url:void 0,u=8192,l={bytesLoaded:0,bytesToLoad:u,range:{start:0,end:u},request:i,url:s,init:!1};r=r?r:d,i=c(l),m("Parsing ebml header");var f=function(i){a(i,s,n,function(n){r(n,e,t)})},g=function(){r(null,e,t)};D.load({request:i,success:f,error:g})}function d(e,t,n){e?y.trigger(o["default"].SEGMENTS_LOADED,{segments:e,representation:t,mediaType:n}):y.trigger(o["default"].SEGMENTS_LOADED,{segments:null,representation:t,mediaType:n,error:new Error(null,"error loading segments",null)})}function c(e){var t=new I["default"];return t.type=e.init?T.HTTPRequest.INIT_SEGMENT_TYPE:T.HTTPRequest.MEDIA_SEGMENT_TYPE,t.url=e.url,t.range=e.range.start+"-"+e.range.end,t}function g(){M=null,b=null,m=null}var h=this.context,m=(0,p["default"])(h).getInstance().log,y=(0,u["default"])(h).getInstance(),S=void 0,R=void 0,M=void 0,b=void 0,C=void 0,D=void 0,O=void 0;return S={setConfig:n,initialize:t,loadInitialization:s,loadSegments:l,reset:g},e(),S}Object.defineProperty(t,"__esModule",{value:!0});var a=n(2),o=r(a),s=n(3),u=r(s),l=n(160),f=r(l),d=n(1),c=r(d),g=n(4),p=r(g),h=n(11),v=r(h),m=n(33),_=r(m),y=n(37),E=r(y),T=n(7),S=n(23),I=r(S),R=n(27),A=r(R);i.__dashjs_factory_name="WebmSegmentBaseLoader",t["default"]=c["default"].getSingletonFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(){K=null,H=-1,q=!0,Y=[],z=(0,c["default"])(B).getInstance(),Q=(0,v["default"])(B).getInstance(),X=(0,p["default"])(B).getInstance(),Z=(0,_["default"])(B).getInstance(),J=(0,E["default"])(B).getInstance(),$=(0,R["default"])(B).getInstance(),ee=(0,f["default"])(B).getInstance(),te=(0,o["default"])(B).getInstance(),ne=(0,u["default"])(B).getInstance(),re=(0,S["default"])(B).getInstance(),k.on(O["default"].QUALITY_CHANGE_REQUESTED,F,j),k.on(O["default"].REPRESENTATION_UPDATED,w,j),k.on(O["default"].WALLCLOCK_TIME_UPDATED,N,j),k.on(O["default"].BUFFER_LEVEL_UPDATED,x,j),k.on(O["default"].LIVE_EDGE_SEARCH_COMPLETED,L,j)}function t(e){e.abrController&&(z=e.abrController)}function n(e){V=e,W=V.getIndexHandler()}function r(){return V}function i(){return K}function a(){return H}function s(){return q}function l(){return G}function d(){k.off(O["default"].QUALITY_CHANGE_REQUESTED,F,j),k.off(O["default"].REPRESENTATION_UPDATED,w,j),k.off(O["default"].WALLCLOCK_TIME_UPDATED,N,j),k.off(O["default"].BUFFER_LEVEL_UPDATED,x,j),k.off(O["default"].LIVE_EDGE_SEARCH_COMPLETED,L,j),K=null,H=-1,q=!0,Y=[],z=null,Q=null,X=null,Z=null,J=null,$=null,ee=null,te=null,ne=null,re=null}function g(e,t,n){var r,i,a=null,o=V.getStreamInfo(),s=z.getTopQualityIndexFor(n,o.id);if(q=!0,k.trigger(O["default"].DATA_UPDATE_STARTED,{sender:this}),Y=A(t),null===K&&"fragmentedText"!==n?(i=z.getAverageThroughput(n),a=i||z.getInitialBitrateFor(n,o),r=z.getQualityForBitrate(V.getMediaInfo(),a)):r=z.getQualityFor(n,o),r>s&&(r=s),G=y(r),K=e,"video"!==n&&"audio"!==n&&"fragmentedText"!==n)return q=!1,void k.trigger(O["default"].DATA_UPDATE_COMPLETED,{sender:this,data:K,currentRepresentation:G});for(var u=0;u<Y.length;u++)W.updateRepresentation(Y[u],!0)}function h(){var e=new Date,t=l(),n=1e3*X.getTime();J.addRepresentationSwitch(t.adaptation.type,e,n,t.id)}function m(){var e=ee.calcSegmentAvailabilityRange(G,V.isDynamic());J.addDVRInfo(V.getType(),X.getTime(),V.getStreamInfo().manifestInfo,e)}function y(e){return Y[e]}function T(e){return Y.indexOf(e)}function I(){for(var e=0,t=Y.length;e<t;e++){var n=Y[e].segmentInfoType;if(null===Y[e].segmentAvailabilityRange||null===Y[e].initialization||("SegmentBase"===n||"BaseURL"===n)&&!Y[e].segments)return!1}return!0}function A(e){var t,n=Z.getValue();return H=te.getIndexForAdaptation(K,n,e.period.index),t=te.getRepresentationsForAdaptation(n,e)}function b(e){for(var t,n=0,r=Y.length;n<r;n++)t=Y[n],t.segmentAvailabilityRange=ee.calcSegmentAvailabilityRange(t,e)}function D(){Y.forEach(function(e){e.segmentAvailabilityRange=null})}function P(e){var t=e,n=function(){if(!s()){q=!0,k.trigger(O["default"].DATA_UPDATE_STARTED,{sender:j}),D();for(var e=0;e<Y.length;e++)W.updateRepresentation(Y[e],!0)}};q=!1,k.trigger(O["default"].AST_IN_FUTURE,{delay:t}),setTimeout(n,t)}function w(e){if(e.sender.getStreamProcessor()===V&&s()){var t,n,r,i=e.representation,a=J.getMetricsFor("stream"),o=J.getMetricsFor(l().adaptation.type),u=ne.getCurrentManifestUpdate(a),f=!1,d=0;if("dynamic"===i.adaptation.period.mpd.manifest.type){var c=i.segmentAvailabilityRange.end-i.segmentAvailabilityRange.start,g=X.computeLiveDelay(G.segmentDuration,V.getStreamInfo().manifestInfo.DVRWindowSize);d=1e3*(g-c)}if(d>0)return m(),P(d),n=new M["default"](U,"Segments update failed",null),void k.trigger(O["default"].DATA_UPDATE_COMPLETED,{sender:this,data:K,currentRepresentation:G,error:n});if(u){for(var p=0;p<u.trackInfo.length;p++)if(t=u.trackInfo[p],t.index===i.index&&t.mediaType===V.getType()){f=!0;break}f||J.addManifestUpdateRepresentationInfo(u,i.id,i.index,i.adaptation.period.index,V.getType(),i.presentationTimeOffset,i.startNumber,i.segmentInfoType)}I()&&(q=!1,z.setPlaybackQuality(V.getType(),V.getStreamInfo(),T(G)),J.updateManifestUpdateInfo(u,{latency:G.segmentAvailabilityRange.end-X.getTime()}),r=ne.getCurrentRepresentationSwitch(o),r||h(),k.trigger(O["default"].DATA_UPDATE_COMPLETED,{sender:this,data:K,currentRepresentation:G}))}}function N(e){e.isDynamic&&b(e.isDynamic)}function L(e){if(!e.error){b(!0),W.updateRepresentation(G,!1);var t=Z.getValue(),n=G.adaptation.period,r=Q.getActiveStreamInfo();r.isLast&&(n.mpd.checkTime=te.getCheckTime(t,n),n.duration=te.getEndTimeForLastPeriod(Z.getValue(),n)-n.start,r.duration=n.duration)}}function x(e){e.sender.getStreamProcessor()===V&&m()}function F(e){e.mediaType===V.getType()&&V.getStreamInfo().id===e.streamInfo.id&&e.oldQuality!==e.newQuality&&(G=y(e.newQuality),$.setSavedBitrateSettings(e.mediaType,G.bandwidth),h())}var U=1,B=this.context,k=(0,C["default"])(B).getInstance(),j=void 0,K=void 0,H=void 0,q=void 0,Y=void 0,G=void 0,V=void 0,z=void 0,W=void 0,Q=void 0,X=void 0,Z=void 0,J=void 0,$=void 0,ee=void 0,te=void 0,ne=void 0,re=void 0;return j={initialize:n,setConfig:t,getData:i,getDataIndex:a,isUpdating:s,updateData:g,getStreamProcessor:r,getCurrentRepresentation:l,getRepresentationForQuality:y,reset:d},e(),j}Object.defineProperty(t,"__esModule",{value:!0});var a=n(12),o=r(a),s=n(16),u=r(s),l=n(26),f=r(l),d=n(10),c=r(d),g=n(9),p=r(g),h=n(20),v=r(h),m=n(31),_=r(m),y=n(14),E=r(y),T=n(5),S=r(T),I=n(50),R=r(I),A=n(6),M=r(A),b=n(3),C=r(b),D=n(2),O=r(D),P=n(1),w=r(P);i.__dashjs_factory_name="RepresentationController",t["default"]=w["default"].getClassFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(){s=[new v["default"],new _["default"],new E["default"]],u=new p["default"](s,"",(!0)),l=new c["default"]([new S["default"],new R["default"]])}function t(e,t){var n;try{var a=window.performance.now();if(n=u.xml_str2json(e),!n)throw new Error("parser error");var o=window.performance.now();l.run(n);var f=window.performance.now();t.setMatchers(s),t.setIron(l),r("Parsing complete: ( xml2json: "+(o-a).toPrecision(3)+"ms, objectiron: "+(f-o).toPrecision(3)+"ms, total: "+((f-a)/1e3).toPrecision(3)+"s)")}catch(d){return i.manifestError("parsing the manifest failed","parse",e,d),null}return n}var n=this.context,r=(0,f["default"])(n).getInstance().log,i=(0,o["default"])(n).getInstance(),a=void 0,s=void 0,u=void 0,l=void 0;return a={parse:t},e(),a}Object.defineProperty(t,"__esModule",{value:!0});var a=n(11),o=r(a),s=n(1),u=r(s),l=n(4),f=r(l),d=n(73),c=r(d),g=n(35),p=r(g),h=n(85),v=r(h),m=n(84),_=r(m),y=n(86),E=r(y),T=n(82),S=r(T),I=n(83),R=r(I);i.__dashjs_factory_name="DashParser",t["default"]=u["default"].getClassFactory(i),e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(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)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function(){function e(t,r){n(this,e);var i=function(e){return e&&e.length&&e.charAt(0)===e.charAt(0).toUpperCase()};this._name=t,this._merge=void 0!==r?r:i(t)}return r(e,[{key:"name",get:function(){return this._name}},{key:"merge",get:function(){return this._merge}}]),e}();t["default"]=i,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof t?"undefined":o(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)}var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};Object.defineProperty(t,"__esModule",{value:!0});var s=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}},u=n(55),l=r(u),f=function(e){function t(){i(this,t);var e=["profiles","width","height","sar","frameRate","audioSamplingRate","mimeType","segmentProfiles","codecs","maximumSAPPeriod","startWithSAP","maxPlayoutRate","codingDependency","scanType","FramePacking","AudioChannelConfiguration","ContentProtection","EssentialProperty","SupplementalProperty","InbandEventStream"];return s(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,"AdaptationSet",e,[new l["default"]("Representation",e,[new l["default"]("SubRepresentation",e)])])}return a(t,e),t}(l["default"]);t["default"]=f,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof t?"undefined":o(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)}var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};Object.defineProperty(t,"__esModule",{value:!0});var s=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}},u=n(55),l=r(u),f=function(e){function t(){i(this,t);var e=["SegmentBase","SegmentTemplate","SegmentList"];return s(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,"Period",e,[new l["default"]("AdaptationSet",e,[new l["default"]("Representation",e)])])}return a(t,e),t}(l["default"]);t["default"]=f,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof t?"undefined":o(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)}var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};Object.defineProperty(t,"__esModule",{value:!0});var s=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}},u=n(36),l=r(u),f=60,d=60,c=1e3,g=/^([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}))?/,p=function(e){function t(){i(this,t),s(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,function(e){return g.test(e.value)},function(e){var t=g.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]&&parseFloat(t[7])*c||0),t[9]&&t[10]){var r=parseInt(t[9],10)*d+parseInt(t[10],10);n+=("+"===t[8]?-1:1)*r*f*c}return new Date(n)})}return a(t,e),t}(l["default"]);t["default"]=p,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof t?"undefined":o(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)}var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};Object.defineProperty(t,"__esModule",{value:!0});var s=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}},u=n(36),l=r(u),f=/^([-])?P(([\d.]*)Y)?(([\d.]*)M)?(([\d.]*)D)?T?(([\d.]*)H)?(([\d.]*)M)?(([\d.]*)S)?/,d=31536e3,c=2592e3,g=86400,p=3600,h=60,v=function(e){function t(){i(this,t),s(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,function(e){for(var t=["minBufferTime","mediaPresentationDuration","minimumUpdatePeriod","timeShiftBufferDepth","maxSegmentDuration","maxSubsegmentDuration","suggestedPresentationDelay","start","starttime","duration"],n=t.length,r=0;r<n;r++)if(e.nodeName===t[r])return f.test(e.value);return!1},function(e){var t=f.exec(e),n=parseFloat(t[2]||0)*d+parseFloat(t[4]||0)*c+parseFloat(t[6]||0)*g+parseFloat(t[8]||0)*p+parseFloat(t[10]||0)*h+parseFloat(t[12]||0);return void 0!==t[1]&&(n=-n),n})}return a(t,e),t}(l["default"]);t["default"]=v,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof t?"undefined":o(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)}var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};Object.defineProperty(t,"__esModule",{value:!0});var s=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}},u=n(36),l=r(u),f=/^[-+]?[0-9]+[.]?[0-9]*([eE][-+]?[0-9]+)?#x2F;,d=function(e){function t(){i(this,t),s(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,function(e){return f.test(e.value)},function(e){return parseFloat(e)})}return a(t,e),t}(l["default"]);t["default"]=d,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(e){e&&e.boxParser&&(i=e.boxParser)}function t(e){var t,n,r,a,o,s,u,l,f,d,c,g=i.parse(e),p=g.getBox("tfhd"),h=g.getBox("tfdt"),v=g.getBox("trun"),m=g.getBox("moof"),_=g.getBox("mfhd");for(d=_.sequence_number,r=v.sample_count,o=h.baseMediaDecodeTime,f=(p.base_data_offset||0)+(v.data_offset||0),s=[],l=0;l<r;l++)u=v.samples[l],t=void 0!==u.sample_duration?u.sample_duration:p.default_sample_duration,a=void 0!==u.sample_size?u.sample_size:p.default_sample_size,n=void 0!==u.sample_composition_time_offset?u.sample_composition_time_offset:0,s.push({dts:o,cts:o+n,duration:t,offset:m.offset+f,size:a}),f+=a,o+=t;return c=o-h.baseMediaDecodeTime,{sampleList:s,sequenceNumber:d,totalDuration:c}}function n(e){var t=i.parse(e),n=t.getBox("mdhd");return n?n.timescale:NaN}var r=void 0,i=void 0;return r={getSamplesInfo:t,getMediaTimescaleFromMoov:n,setConfig:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),o=r(a);i.__dashjs_factory_name="FragmentedTextBoxParser",t["default"]=o["default"].getSingletonFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){function n(e,n,i,a){var o,u,l,f,d,c,g,p=e.adaptation.period.mpd.manifest.Period_asArray[e.adaptation.period.index].AdaptationSet_asArray[e.adaptation.index].Representation_asArray[e.index].SegmentList,h=p.SegmentURL_asArray.length,v=[];for(g=e.startNumber,f=(0,s.decideSegmentListRangeForTemplate)(r,t,e,n,i,a),d=Math.max(f.start,0),c=Math.min(f.end,p.SegmentURL_asArray.length-1),o=d;o<=c;o++)l=p.SegmentURL_asArray[o],u=(0,s.getIndexBasedSegment)(r,t,e,o),u.replacementTime=(g+o-1)*e.segmentDuration,u.media=l.media?l.media:"",u.mediaRange=l.mediaRange,u.index=l.index,u.indexRange=l.indexRange,v.push(u),u=null;return e.availableSegmentsNumber=h,v}var r=e.timelineConverter,i=void 0;return i={getSegments:n}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),o=r(a),s=n(25);i.__dashjs_factory_name="ListSegmentsGetter";var u=o["default"].getClassFactory(i);t["default"]=u,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){function n(){s=(0,u["default"])(a).create(e,t),l=(0,f["default"])(a).create(e,t),d=(0,c["default"])(a).create(e,t)}function r(e,t,n,r,a){var o,u=e.segmentInfoType;return"SegmentBase"!==u&&"BaseURL"!==u&&i(e,n)?("SegmentTimeline"===u?o=s.getSegments(e,t,n,a):"SegmentTemplate"===u?o=l.getSegments(e,t,n,a):"SegmentList"===u&&(o=d.getSegments(e,t,n,a)),r&&r(e,o)):o=e.segments,o}function i(e,t){var n,r,i=e.segments,a=!1;return i&&0!==i.length?(r=i[0].availabilityIdx,n=i[i.length-1].availabilityIdx,a=t<r||t>n):a=!0,a}var a=this.context,o=void 0,s=void 0,l=void 0,d=void 0;return o={getSegments:r},n(),o}Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),o=r(a),s=n(91),u=r(s),l=n(90),f=r(l),d=n(88),c=r(d);i.__dashjs_factory_name="SegmentsGetter";var g=o["default"].getClassFactory(i);t["default"]=g,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){function n(e,n,i,a){var o,u,l,f,d,c=e.adaptation.period.mpd.manifest.Period_asArray[e.adaptation.period.index].AdaptationSet_asArray[e.adaptation.index].Representation_asArray[e.index].SegmentTemplate,g=e.segmentDuration,p=e.segmentAvailabilityRange,h=[],v=null,m=null;for(d=e.startNumber,o=isNaN(g)&&!t?{start:d,end:d}:(0,s.decideSegmentListRangeForTemplate)(r,t,e,n,i,a),l=o.start,f=o.end,u=l;u<=f;u++)m=(0,s.getIndexBasedSegment)(r,t,e,u),m.replacementTime=(d+u-1)*e.segmentDuration,v=c.media,v=(0,s.replaceTokenForTemplate)(v,"Number",m.replacementNumber),v=(0,s.replaceTokenForTemplate)(v,"Time",m.replacementTime),m.media=v,h.push(m),m=null;return isNaN(g)?e.availableSegmentsNumber=1:e.availableSegmentsNumber=Math.ceil((p.end-p.start)/g),h}var r=e.timelineConverter,i=void 0;return i={getSegments:n}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),o=r(a),s=n(25);i.__dashjs_factory_name="TemplateSegmentsGetter";var u=o["default"].getClassFactory(i);t["default"]=u,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){function n(e,n,i,a){var o,u,l,f,d,c,g,p,h,v,m,_,y,E,T=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,S=T.SegmentTimeline,I=T.SegmentURL_asArray,R=e.availableSegmentsNumber>0,A=10,M=0,b=0,C=-1,D=[],O=!1,P=function(n,i){var a=T.media,o=n.mediaRange;return I&&(a=I[i].media||"",o=I[i].mediaRange),(0,s.getTimeBasedSegment)(r,t,e,M,n.d,E,a,o,C)};for(E=e.timescale,o=S.S_asArray,h=(0,s.decideSegmentListRangeForTimeline)(r,t,n,i,a),h?(_=h.start,y=h.end):m=r.calcMediaTimeFromPresentationTime(n||0,e),l=0,f=o.length;l<f;l++){if(u=o[l],c=0,u.hasOwnProperty("r")&&(c=u.r),u.hasOwnProperty("t")&&(M=u.t,b=M/E),c<0){if(p=o[l+1],p&&p.hasOwnProperty("t"))g=p.t/E;else{var w=e.segmentAvailabilityRange?e.segmentAvailabilityRange.end:r.calcSegmentAvailabilityRange(e,t).end;g=r.calcMediaTimeFromPresentationTime(w,e),e.segmentDuration=u.d/E}c=Math.ceil((g-b)/(u.d/E))-1}if(v){if(R)break;C+=c+1}else for(d=0;d<=c;d++){if(C++,h){if(C>y){if(v=!0,R)break;continue}C>=_&&D.push(P(u,C))}else{if(D.length>A){if(v=!0,R)break;continue}O?D.push(P(u,C)):b>=m-u.d/E*1.5&&(O=!0,D.push(P(u,C)))}M+=u.d,b=M/E}}return R||(e.availableSegmentsNumber=C+1),D}var r=e.timelineConverter,i=void 0;return i={getSegments:n}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),o=r(a),s=n(25);i.__dashjs_factory_name="TimelineSegmentsGetter";var u=o["default"].getClassFactory(i);t["default"]=u,e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function i(){n(this,i),this.period=null,this.index=-1,this.type=null};t["default"]=r,e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function i(){n(this,i),this.adaptionSet=null,this.representation=null,this.period=null,this.timescale=1,this.value="",this.schemeIdUri=""};t["default"]=r,e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function i(){n(this,i),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.checkTime=NaN,this.clientServerTimeShift=0,this.isClientServerTimeSyncCompleted=!1};t["default"]=r,e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function i(){n(this,i),this.id=null,this.index=-1,this.duration=NaN,this.start=NaN,this.mpd=null};r.DEFAULT_ID="defaultId",t["default"]=r,e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function i(){n(this,i),this.id=null,this.index=-1,this.adaptation=null,this.segmentInfoType=null,this.initialization=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.maxPlayoutRate=NaN};t["default"]=r,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){function t(){g=(0,o["default"])(s).create({errHandler:e.errHandler,metricsModel:e.metricsModel,requestModifier:e.requestModifier})}function n(e){var t=function(t){l.trigger(p["default"].CHECK_FOR_EXISTENCE_COMPLETED,{request:e,exists:t})};if(e){var n=new u["default"](e.url);g.load({request:n,success:function(){t(!0)},error:function(){t(!1)}})}else t(!1)}function r(e){var t=function(t,n){l.trigger(p["default"].LOADING_COMPLETED,{request:e,response:t||null,error:n||null,sender:d})};e?g.load({request:e,progress:function(){l.trigger(p["default"].LOADING_PROGRESS,{request:e})},success:function(e){t(e)},error:function(e,n,r){t(void 0,new f["default"](m,r,n))}}):t(void 0,new f["default"](_,y))}function i(){g&&g.abort()}function a(){g&&(g.abort(),g=null)}var s=this.context,l=(0,c["default"])(s).getInstance(),d=void 0,g=void 0;return d={checkForExistence:n,load:r,abort:i,reset:a},t(),d}Object.defineProperty(t,"__esModule",{value:!0});var a=n(27),o=r(a),s=n(167),u=r(s),l=n(6),f=r(l),d=n(3),c=r(d),g=n(2),p=r(g),h=n(1),v=r(h),m=1,_=2,y="request is null";i.__dashjs_factory_name="FragmentLoader";var E=v["default"].getClassFactory(i);E.FRAGMENT_LOADER_ERROR_LOADING_FAILURE=m,E.FRAGMENT_LOADER_ERROR_NULL_REQUEST=_,t["default"]=E,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){function t(){s.on(y["default"].XLINK_READY,n,g),v=(0,u["default"])(a).create({errHandler:e.errHandler,metricsModel:e.metricsModel,requestModifier:e.requestModifier}),_=(0,o["default"])(a).create({errHandler:e.errHandler,metricsModel:e.metricsModel,requestModifier:e.requestModifier})}function n(e){s.trigger(y["default"].INTERNAL_MANIFEST_LOADED,{manifest:e.manifest})}function r(e){var t=new c["default"](e,h.HTTPRequest.MPD_TYPE);v.load({request:t,success:function(t,n,r){var i,a;r.responseURL&&r.responseURL!==e?(a=l.parseBaseUrl(r.responseURL),i=r.responseURL):(l.isRelative(e)&&(e=l.parseBaseUrl(window.location.href)+e),a=l.parseBaseUrl(e));var o=d.parse(t,_);o?(o.url=i||e,o.originalUrl||(o.originalUrl=o.url),o.baseUri=a,o.loadedTime=new Date,_.resolveManifestOnLoad(o)):s.trigger(y["default"].INTERNAL_MANIFEST_LOADED,{manifest:null,error:new p["default"](S,R)})},error:function(t,n,r){s.trigger(y["default"].INTERNAL_MANIFEST_LOADED,{manifest:null,error:new p["default"](I,"Failed loading manifest: "+e+", "+r)})}})}function i(){s.off(y["default"].XLINK_READY,n,g),_&&(_.reset(),_=null),v&&(v.abort(),v=null)}var a=this.context,s=(0,m["default"])(a).getInstance(),l=(0,f["default"])(a).getInstance(),d=e.parser,g=void 0,v=void 0,_=void 0;return g={load:r,reset:i},t(),g}Object.defineProperty(t,"__esModule",{value:!0});var a=n(112),o=r(a),s=n(27),u=r(s),l=n(22),f=r(l),d=n(69),c=r(d),g=n(6),p=r(g),h=n(7),v=n(3),m=r(v),_=n(2),y=r(_),E=n(1),T=r(E),S=1,I=2,R="parsing failed";i.__dashjs_factory_name="ManifestLoader";var A=T["default"].getClassFactory(i);A.MANIFEST_LOADER_ERROR_PARSING_FAILURE=S,A.MANIFEST_LOADER_ERROR_LOADING_FAILURE=I,t["default"]=A,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(e){e&&(e.manifestModel&&(A=e.manifestModel),e.dashManifestModel&&(M=e.dashManifestModel))}function t(e){R=e,E=NaN,T=null,I=!1,S=!0,_.on(u["default"].STREAMS_COMPOSED,h,this),_.on(u["default"].PLAYBACK_STARTED,g,this),_.on(u["default"].PLAYBACK_PAUSED,p,this),_.on(u["default"].INTERNAL_MANIFEST_LOADED,d,this)}function n(e){l(e)}function r(){return R}function i(){_.off(u["default"].PLAYBACK_STARTED,g,this),_.off(u["default"].PLAYBACK_PAUSED,p,this),_.off(u["default"].STREAMS_COMPOSED,h,this),_.off(u["default"].INTERNAL_MANIFEST_LOADED,d,this),S=!0,I=!1,a(),E=NaN}function a(){null!==T&&(clearInterval(T),T=null)}function s(){a(),isNaN(E)||(m("Refresh manifest in "+E+" seconds."),T=setTimeout(f,Math.min(1e3*E,Math.pow(2,31)-1),this))}function l(e){var t,n,r=new Date;A.setValue(e),m("Manifest has been refreshed at "+r+"["+r.getTime()/1e3+"] "),t=M.getRefreshDelay(e),n=((new Date).getTime()-e.loadedTime.getTime())/1e3,E=Math.max(t-n,0),_.trigger(u["default"].MANIFEST_UPDATED,{manifest:e}),S||s()}function f(){var e,t;if(!S&&!I){I=!0,e=A.getValue(),t=e.url;var n=M.getLocation(e);n&&(t=n),R.load(t)}}function d(e){e.error||l(e.manifest)}function g(){S=!1,s()}function p(){S=!0,a()}function h(){I=!1}var v=this.context,m=(0,c["default"])(v).getInstance().log,_=(0,o["default"])(v).getInstance(),y=void 0,E=void 0,T=void 0,S=void 0,I=void 0,R=void 0,A=void 0,M=void 0;return y={initialize:t,setManifest:n,getManifestLoader:r,setConfig:e,reset:i}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),o=r(a),s=n(2),u=r(s),l=n(1),f=r(l),d=n(4),c=r(d);i.__dashjs_factory_name="ManifestUpdater",t["default"]=f["default"].getSingletonFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(e,t,n){if(!e||"VIDEO"!==e.nodeName)return null;if(e._dashjs_player)return e._dashjs_player;var i,a=e.id||e.name||"video element";if(t=t||[].slice.call(e.querySelectorAll("source")).filter(function(e){return e.type==r})[0],!t&&e.src)t=document.createElement("source"),t.src=e.src;else if(!t&&!e.src)return null;return n=n||{},i=(0,s["default"])(n).create(),i.initialize(e,t.src,e.autoplay),i.getDebug().log("Converted "+a+" to dash.js player and added content: "+t.src),e._dashjs_player=i,i}function t(t,i){var a=[];t=t||"[data-dashjs-player]",i=i||document;for(var o=i.querySelectorAll(t),s=0;s<o.length;s++){var u=e(o[s],null);a.push(u)}for(var l=i.querySelectorAll('source[type="'+r+'"]'),s=0;s<l.length;s++){var f=n(l[s]),u=e(f,null);a.push(u)}return a}function n(e){for(var t=!0;t;){var n=e;if(t=!1,"video"===n.nodeName.toLowerCase())return n;e=n.parentNode,t=!0}}var r="application/dash+xml";return{create:e,createAll:t}}function a(){window.removeEventListener("load",a),u.createAll()}Object.defineProperty(t,"__esModule",{value:!0});var o=n(59),s=r(o),u=i(),l=window&&window.dashjs&&window.dashjs.skipAutoCreate;!l&&window&&window.addEventListener&&("complete"===window.document.readyState?u.createAll():window.addEventListener("load",a)),t["default"]=u,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){function t(){le=[],fe=!1,de=!1,ce=null,ge={},pe=!1,he=!1,me=(0,o["default"])(J).getInstance(),_e=(0,S["default"])(J).getInstance(),Se=(0,v["default"])(J).getInstance(),ye=(0,f["default"])(J).getInstance(),Ee=(0,p["default"])(J).create(),Ie=(0,j["default"])(J).getInstance(),ee.on(L["default"].BUFFERING_COMPLETED,V,ue),ee.on(L["default"].DATA_UPDATE_COMPLETED,z,ue)}function n(e,t){ce=e,ve=t,ve&&(ee.on(L["default"].KEY_ERROR,D,ue),ee.on(L["default"].SERVER_CERTIFICATE_UPDATED,D,ue),ee.on(L["default"].LICENSE_REQUEST_COMPLETE,D,ue),ee.on(L["default"].KEY_SYSTEM_SELECTED,D,ue),ee.on(L["default"].KEY_SESSION_CREATED,D,ue))}function r(e){fe?G():(ee.on(L["default"].CURRENT_TRACK_CHANGED,x,ue),H(e))}function i(){for(var e=le.length,t=0;t<e;t++)le[t].reset();
34
- le=[],fe=!1,de=!1,I(),ee.off(L["default"].CURRENT_TRACK_CHANGED,x,ue)}function a(){_e&&(_e.pause(),_e=null),Ee&&(Ee.reset(),Ee=null),me.abortSearch(),i(),ye=null,Se=null,ne=null,te=null,re=null,ie=null,$=null,ae=null,pe=!1,he=!1,ge={},ee.off(L["default"].DATA_UPDATE_COMPLETED,z,ue),ee.off(L["default"].BUFFERING_COMPLETED,V,ue),ee.off(L["default"].KEY_ERROR,D,ue),ee.off(L["default"].SERVER_CERTIFICATE_UPDATED,D,ue),ee.off(L["default"].LICENSE_REQUEST_COMPLETE,D,ue),ee.off(L["default"].KEY_SYSTEM_SELECTED,D,ue),ee.off(L["default"].KEY_SESSION_CREATED,D,ue)}function s(){return ce.duration}function l(){return ce.start}function d(){return ce.index}function g(){return ce.id}function h(){return ce}function m(e){return null!==Y(e)}function y(e){var t=Y(e);return Se.getBitrateList(t)}function T(){Te&&Te.start()}function I(){Te&&Te.clear()}function A(){return fe}function b(){return he}function D(e){e.error&&(ae.mediaKeySessionError(e.error),$(e.error),a())}function P(e){return"text"===e.type?e.mimeType:e.type}function N(e,t,n){var r,i,a=e.type;if("muxed"===a&&e)return i="Multiplexed representations are intentionally not supported, as they are not compliant with the DASH-AVC/264 guidelines",$(i),ae.manifestError(i,"multiplexedrep",te.getValue()),!1;if("text"===a||"fragmentedText"===a||"embeddedText"===a)return!0;if(r=e.codec,$(a+" codec: "+r),e.contentProtection&&!ie.supportsEncryptedMedia())ae.capabilityError("encryptedmedia");else if(!ie.supportsCodec((0,_["default"])(J).getInstance().getElement(),r))return i=a+"Codec ("+r+") is not supported.",ae.manifestError(i,"codec",n),$(i),!1;return!0}function x(e){if(e.newMediaInfo.streamInfo.id===ce.id){var t=W(e.oldMediaInfo);if(t){var n=_e.getTime(),r=t.getBuffer(),i=e.newMediaInfo,a=te.getValue(),o=le.indexOf(t),s=t.getMediaSource();"fragmentedText"!==i.type?(t.reset(!0),k(i,a,s,{buffer:r,replaceIdx:o,currentTime:n}),_e.seek(_e.getTime())):t.updateMediaInfo(a,i)}}}function U(e){var t=e.split("/")[1];return"webm"===t.toLowerCase()}function B(e){var t=U(e.mimeType)?(0,C["default"])(J).getInstance():(0,M["default"])(J).getInstance();t.setConfig({baseURLController:se,metricsModel:(0,E["default"])(J).getInstance()}),t.initialize();var n=(0,R["default"])(J).create({segmentBaseLoader:t,timelineConverter:oe,dashMetrics:(0,O["default"])(J).getInstance(),metricsModel:(0,E["default"])(J).getInstance(),baseURLController:se});return n}function k(e,t,n,r){var i=(0,u["default"])(J).create({indexHandler:B(e),timelineConverter:oe,adapter:re,manifestModel:te}),a=re.getAllMediaInfoForType(t,ce,e.type);if(i.initialize(P(e),Ee,n,ue,Te),Se.updateTopQualityIndex(e),r?(i.setBuffer(r.buffer),i.getIndexHandler().setCurrentTime(r.currentTime),le[r.replaceIdx]=i):le.push(i),"text"===e.type||"fragmentedText"===e.type){for(var o,s=0;s<a.length;s++)a[s].index===e.index&&(o=s),i.updateMediaInfo(t,a[s]);"fragmentedText"===e.type&&i.updateMediaInfo(t,a[o])}else i.updateMediaInfo(t,e);return i}function K(e,t){var n,r=te.getValue(),i=re.getAllMediaInfoForType(r,ce,e),a=null;if(!i||0===i.length)return void $("No "+e+" data.");for(var o=0,s=i.length;o<s;o++)if(a=i[o],"embeddedText"===e)Ie.addEmbeddedTrack(a);else{if(!N(a,t,r))continue;ye.isMultiTrackSupportedByType(a.type)&&ye.addTrack(a,ce)}"embeddedText"!==e&&0!==ye.getTracksFor(e,ce).length&&(ye.checkInitialMediaSettingsForType(e,ce),n=ye.getCurrentTrackFor(e,ce),k(n,r,t))}function H(e){var t,n=te.getValue();if(Te=(0,c["default"])(J).getInstance(),Te.initialize(),Te.setConfig({manifestModel:te,manifestUpdater:ne}),t=re.getEventsFor(n,ce),Te.addInlineEvents(t),pe=!0,K("video",e),K("audio",e),K("text",e),K("fragmentedText",e),K("embeddedText",e),K("muxed",e),G(),de=!0,pe=!1,0===le.length){var r="No streams to play.";ae.manifestError(r,"nostreams",n),$(r)}else me.initialize(oe,le[0]),q()}function q(){var e=le.length,t=!!ge.audio||!!ge.video,n=t?new Error(Z,"Data update failed",null):null,r=0;for(r;r<e;r++)if(le[r].isUpdating()||pe)return;he=!0,fe=!0,de&&(ve&&ve.initialize(te.getValue(),Y("audio"),Y("video")),ee.trigger(L["default"].STREAM_INITIALIZED,{streamInfo:ce,error:n}))}function Y(e){for(var t=le.length,n=null,r=0;r<t;r++)if(n=le[r],n.getType()===e)return n.getMediaInfo();return null}function G(){for(var e=0,t=le.length;e<t;e++)le[e].createBuffer()}function V(e){if(e.streamInfo===ce){var t=Q(),n=t.length,r=0;for(r;r<n;r++)if(!t[r].isBufferingCompleted())return;ee.trigger(L["default"].STREAM_BUFFERING_COMPLETED,{streamInfo:ce})}}function z(e){var t=e.sender.getStreamProcessor();t.getStreamInfo()===ce&&(ge[t.getType()]=e.error,q())}function W(e){if(!e)return!1;var t=Q();return t.filter(function(t){return t.getType()===e.type})[0]}function Q(){var e,t,n=le.length,r=[],i=0;for(i;i<n;i++)t=le[i],e=t.getType(),"audio"!==e&&"video"!==e&&"fragmentedText"!==e||r.push(t);return r}function X(e){$("Manifest updated... updating data system wide.");var t=te.getValue();if(fe=!1,pe=!0,he=!1,ce=e,Te){var n=re.getEventsFor(t,ce);Te.addInlineEvents(n)}for(var r=0,i=le.length;r<i;r++){var a=le[r],o=re.getMediaInfoForType(t,ce,a.getType());Se.updateTopQualityIndex(o),a.updateMediaInfo(t,o)}pe=!1,q()}var Z=1,J=this.context,$=(0,F["default"])(J).getInstance().log,ee=(0,w["default"])(J).getInstance(),te=e.manifestModel,ne=e.manifestUpdater,re=e.adapter,ie=e.capabilities,ae=e.errHandler,oe=e.timelineConverter,se=e.baseURLController,ue=void 0,le=void 0,fe=void 0,de=void 0,ce=void 0,ge=void 0,pe=void 0,he=void 0,ve=void 0,me=void 0,_e=void 0,ye=void 0,Ee=void 0,Te=void 0,Se=void 0,Ie=void 0;return ue={initialize:n,activate:r,deactivate:i,getDuration:s,getStartTime:l,getStreamIndex:d,getId:g,getStreamInfo:h,hasMedia:m,getBitrateListFor:y,startEventController:T,isActivated:A,isInitialized:b,updateData:X,reset:a,getProcessors:Q},t(),ue}Object.defineProperty(t,"__esModule",{value:!0});var a=n(51),o=r(a),s=n(102),u=r(s),l=n(13),f=r(l),d=n(106),c=r(d),g=n(107),p=r(g),h=n(10),v=r(h),m=n(19),_=r(m),y=n(14),E=r(y),T=n(9),S=r(T),I=n(76),R=r(I),A=n(77),M=r(A),b=n(78),C=r(b),D=n(16),O=r(D),P=n(3),w=r(P),N=n(2),L=r(N),x=n(4),F=r(x),U=n(1),B=r(U),k=n(17),j=r(k);i.__dashjs_factory_name="Stream",t["default"]=B["default"].getClassFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){function t(){ne=[]}function n(e,t,n,r,i){te=e,re=r,ie=i,le=t,$=re.getStreamInfo().manifestInfo.isDynamic,W.initialize(this),ae=(0,o["default"])(z).getInstance(),ae.initialize(te,this),oe=V(e),se=(0,v["default"])(z).create({metricsModel:(0,S["default"])(z).getInstance(),manifestModel:Z,adapter:X,dashMetrics:(0,L["default"])(z).getInstance(),dashManifestModel:(0,w["default"])(z).getInstance(),timelineConverter:Q,rulesController:(0,_["default"])(z).getInstance(),mediaPlayerModel:(0,E["default"])(z).getInstance()}),oe.initialize(te,n,this),se.initialize(te,this),fe=(0,R["default"])(z).create({metricsModel:(0,S["default"])(z).getInstance(),errHandler:(0,B["default"])(z).getInstance(),requestModifier:(0,M["default"])(z).getInstance()}),de=se.getFragmentModel(),de.setLoader(fe),ue=(0,F["default"])(z).create(),ue.initialize(this)}function r(e){W.reset(),oe&&(oe.reset(e),oe=null),se&&(se.reset(),se=null),ue&&(ue.reset(),ue=null),le=null,fe=null,ie=null,re=null,$=null,ee=null,ne=[],te=null}function i(){return ue.isUpdating()}function a(){return te}function s(){return ae}function l(){return ue}function d(){return fe}function g(){return W}function h(){return le}function m(){return oe.getBuffer()}function y(e){oe.setBuffer(e)}function T(){return oe}function I(){return de}function A(){return re.getStreamInfo()}function b(e,t){t===ee||t&&ee&&t.type!==ee.type||(ee=t),ne.indexOf(t)===-1&&ne.push(t),X.updateData(e,this)}function D(){return ne}function P(){return ee}function N(){return oe.getMediaSource()}function x(){return se}function U(){return ie}function k(){se.start()}function j(){se.stop()}function K(){return X.getCurrentRepresentationInfo(Z.getValue(),ue)}function H(e){return X.getRepresentationInfoForQuality(Z.getValue(),ue,e)}function q(){return oe.getIsBufferingCompleted()}function Y(){return oe.getBuffer()||oe.createBuffer(ee)}function G(){return $}function V(e){var t=null;return t="video"===e||"audio"===e||"fragmentedText"===e?(0,u["default"])(z).create({metricsModel:(0,S["default"])(z).getInstance(),manifestModel:Z,sourceBufferController:(0,C["default"])(z).getInstance(),errHandler:(0,B["default"])(z).getInstance(),streamController:(0,f["default"])(z).getInstance(),mediaController:(0,c["default"])(z).getInstance(),adapter:X,textSourceBuffer:(0,O["default"])(z).getInstance()}):(0,p["default"])(z).create({errHandler:(0,B["default"])(z).getInstance(),sourceBufferController:(0,C["default"])(z).getInstance()})}var z=this.context,W=e.indexHandler,Q=e.timelineConverter,X=e.adapter,Z=e.manifestModel,J=void 0,$=void 0,ee=void 0,te=void 0,ne=void 0,re=void 0,ie=void 0,ae=void 0,oe=void 0,se=void 0,ue=void 0,le=void 0,fe=void 0,de=void 0;return J={initialize:n,isUpdating:i,getType:a,getBufferController:T,getABRController:s,getFragmentLoader:d,getFragmentModel:I,getScheduleController:x,getEventController:U,getFragmentController:h,getRepresentationController:l,getIndexHandler:g,getCurrentRepresentationInfo:K,getRepresentationInfoForQuality:H,isBufferingCompleted:q,createBuffer:Y,getStreamInfo:A,updateMediaInfo:b,getMediaInfoArr:D,getMediaInfo:P,getMediaSource:N,getBuffer:m,setBuffer:y,start:k,stop:j,isDynamic:G,reset:r},t(),J}Object.defineProperty(t,"__esModule",{value:!0});var a=n(10),o=r(a),s=n(18),u=r(s),l=n(20),f=r(l),d=n(13),c=r(d),g=n(110),p=r(g),h=n(109),v=r(h),m=n(46),_=r(m),y=n(5),E=r(y),T=n(14),S=r(T),I=n(97),R=r(I),A=n(33),M=r(A),b=n(28),C=r(b),D=n(17),O=r(D),P=n(12),w=r(P),N=n(16),L=r(N),x=n(79),F=r(x),U=n(11),B=r(U),k=n(1),j=r(k);i.__dashjs_factory_name="StreamProcessor",t["default"]=j["default"].getClassFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){function t(e,t,n){var i=function(r,i){t.resolved=!0,t.resolvedContent=r?r:null,a.trigger(h["default"].XLINK_ELEMENT_LOADED,{element:t,resolveObject:n,error:r||i?null:new o["default"](_,"Failed loading Xlink element: "+e)})};if(e===r)i(null,!0);else{var u=new d["default"](e,l.HTTPRequest.XLINK_TYPE);s.load({request:u,success:function(e){i(e)},error:function(){i(null)}})}}function n(){s&&(s.abort(),s=null)}var r="urn:mpeg:dash:resolve-to-zero:2013",i=this.context,a=(0,g["default"])(i).getInstance(),s=(0,u["default"])(i).create({errHandler:e.errHandler,metricsModel:e.metricsModel,requestModifier:e.requestModifier}),f=void 0;return f={load:t,reset:n}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(6),o=r(a),s=n(27),u=r(s),l=n(7),f=n(69),d=r(f),c=n(3),g=r(c),p=n(2),h=r(p),v=n(1),m=r(v),_=1;i.__dashjs_factory_name="XlinkLoader";var y=m["default"].getClassFactory(i);y.XLINK_LOADER_ERROR_LOADING_FAILURE=_,t["default"]=y,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(e){p.invalidateSelectedIndexes(e.entry)}function t(){p=(0,o["default"])(l).create(),h=(0,u["default"])(l).create(),d.on(_["default"].SERVICE_LOCATION_BLACKLIST_CHANGED,e,s)}function n(e){p.update(e),h.chooseSelectorFromManifest(e)}function r(e){var t=p.getForPath(e),n=t.reduce(function(e,t){var n=h.select(t);return n&&(g.isRelative(n.url)?e.url+=n.url:g.isPathAbsolute(n.url)?e.url=g.parseOrigin(e.url)+n.url:(e.url=n.url,e.serviceLocation=n.serviceLocation)),e},new c["default"]);if(!g.isRelative(n.url))return n}function i(){p.reset(),h.reset()}function a(e){n(e)}var s=void 0,l=this.context,d=(0,v["default"])(l).getInstance(),g=(0,f["default"])(l).getInstance(),p=void 0,h=void 0;return s={reset:i,initialize:a,resolve:r},t(),s}Object.defineProperty(t,"__esModule",{value:!0});var a=n(132),o=r(a),s=n(158),u=r(s),l=n(22),f=r(l),d=n(56),c=r(d),g=n(1),p=r(g),h=n(3),v=r(h),m=n(2),_=r(m);i.__dashjs_factory_name="BaseURLController",t["default"]=p["default"].getSingletonFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){function t(e){return!!(o.length&&e&&e.length)&&o.indexOf(e)!==-1}function n(e){o.indexOf(e)===-1&&(o.push(e),s.trigger(l,{entry:e}))}function r(e){e.error&&n(e.request.serviceLocation)}function i(){f&&s.on(f,r,this)}function a(){o=[]}var o=[],s=(0,u["default"])(this.context).getInstance(),l=e.updateEventName,f=e.loadFailedEventName;return i(),{add:n,contains:t,reset:a}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),o=r(a),s=n(3),u=r(s);i.__dashjs_factory_name="BlackListController",t["default"]=o["default"].getClassFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(){D=!1,E={},T={},S={},I=null,R=100,A=R/1e3,C=(0,o["default"])(v).getInstance()}function t(){null!==I&&D&&(clearInterval(I),I=null,D=!1)}function n(){m("Start Event Controller"),D||isNaN(R)||(D=!0,I=setInterval(s,R))}function r(e){if(E={},e)for(var t=0;t<e.length;t++){var n=e[t];E[n.id]=n,m("Add inline event with id "+n.id)}m("Added "+e.length+" inline events")}function i(e){for(var t=0;t<e.length;t++){var n=e[t];n.id in T?m("Repeated event with id "+n.id):(T[n.id]=n,m("Add inband event with id "+n.id))}}function a(){if(S)for(var e=C.getTime(),t=Object.keys(S),n=0;n<t.length;n++){var r=t[n],i=S[r];null!==i&&(i.duration+i.presentationTime)/i.eventStream.timescale<e&&(m("Remove Event "+r+" at time "+e),i=null,delete S[r])}}function s(){l(T),l(E),a()}function u(){var e=M.getValue(),t=e.url;e.hasOwnProperty("Location")&&(t=e.Location),m("Refresh manifest @ "+t),b.getManifestLoader().load(t)}function l(e){var t,n=C.getTime();if(e)for(var r=Object.keys(e),i=0;i<r.length;i++){var a=r[i],o=e[a];void 0!==o&&(t=o.presentationTime/o.eventStream.timescale,(0===t||t<=n&&t+A>n)&&(m("Start Event "+a+" at "+n),o.duration>0&&(S[a]=o),o.eventStream.schemeIdUri==p&&o.eventStream.value==h?u():_.trigger(o.eventStream.schemeIdUri,{event:o}),delete e[a]))}}function d(e){e&&(e.manifestModel&&(M=e.manifestModel),e.manifestUpdater&&(b=e.manifestUpdater))}function g(){t(),E=null,T=null,S=null,C=null}var p="urn:mpeg:dash:event:2012",h=1,v=this.context,m=(0,f["default"])(v).getInstance().log,_=(0,c["default"])(v).getInstance(),y=void 0,E=void 0,T=void 0,S=void 0,I=void 0,R=void 0,A=void 0,M=void 0,b=void 0,C=void 0,D=void 0;return y={initialize:e,addInlineEvents:r,addInbandEvents:i,clear:t,start:n,setConfig:d,reset:g}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(9),o=r(a),s=n(1),u=r(s),l=n(4),f=r(l),d=n(3),c=r(d);i.__dashjs_factory_name="EventController",t["default"]=u["default"].getSingletonFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(){m={},p.on(h["default"].FRAGMENT_LOADING_COMPLETED,u,v)}function t(e){var t=null;return null!==e&&void 0!==e&&e.byteLength>0&&(t=new Uint8Array(e)),t}function n(e){var t=m[e];return t||(t=(0,l["default"])(f).create({metricsModel:(0,d["default"])(f).getInstance()}),m[e]=t),t}function r(e){return e&&e.type&&e.type===a.HTTPRequest.INIT_SEGMENT_TYPE}function i(){p.off(h["default"].FRAGMENT_LOADING_COMPLETED,u,this);for(var e in m)m[e].reset();m={}}function o(e,t,n){var r=new s["default"];return r.streamId=n,r.mediaInfo=t.mediaInfo,r.segmentType=t.type,r.start=t.startTime,r.duration=t.duration,r.end=r.start+r.duration,r.bytes=e,r.index=t.index,r.quality=t.quality,r}function u(e){if(m[e.request.mediaType]===e.sender){var t=e.sender.getScheduleController(),n=e.request,i=e.response,a=r(n),s=t.getStreamProcessor().getStreamInfo().id;if(!i)return void c("No "+n.mediaType+" bytes to push.");var u=o(i,n,s);p.trigger(a?h["default"].INIT_FRAGMENT_LOADED:h["default"].MEDIA_FRAGMENT_LOADED,{chunk:u,fragmentModel:e.sender})}}var f=this.context,c=(0,y["default"])(f).getInstance().log,p=(0,g["default"])(f).getInstance(),v=void 0,m=void 0;return v={process:t,getModel:n,isInitializationRequest:r,reset:i},e(),v}Object.defineProperty(t,"__esModule",{value:!0});var a=n(7),o=n(166),s=r(o),u=n(30),l=r(u),f=n(14),d=r(f),c=n(3),g=r(c),p=n(2),h=r(p),v=n(1),m=r(v),_=n(4),y=r(_);i.__dashjs_factory_name="FragmentController",t["default"]=m["default"].getClassFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(){var e="WebKitMediaSource"in window,t="MediaSource"in window;return t?new MediaSource:e?new WebKitMediaSource:null}function t(e,t){var n=window.URL.createObjectURL(e);return t.setSource(n),n}function n(e){e.setSource(null)}function r(e,t){return e.duration!=t&&(e.duration=t),e.duration}function i(e){var t=e.sourceBuffers,n=t.length,r=0;if("open"===e.readyState){for(r;r<n;r++){if(t[r].updating)return;if(0===t[r].buffered.length)return}e.endOfStream()}}var a=void 0;return a={createMediaSource:e,attachMediaSource:t,detachMediaSource:n,setDuration:r,signalEndOfStream:i}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),o=r(a);i.__dashjs_factory_name="MediaSourceController",t["default"]=o["default"].getSingletonFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){function t(){Se=!0,qe=NaN,He=NaN,Ye=[],Ie=!1,Re=null,Ae=null,Me=!0,be=!1,Ce=0,Oe=NaN}function n(e,t){me=e,Le=t,Ue=(0,P["default"])(oe).getInstance(),Pe=(0,s["default"])(oe).getInstance(),we=(0,g["default"])(oe).getInstance(),Ne=(0,l["default"])(oe).getInstance(),xe=(0,k["default"])(oe).getInstance(),Fe=Le.getFragmentController(),Be=Le.getBufferController(),ye=Fe.getModel(me),ye.setScheduleController(this),Ee=Le.isDynamic(),Ke=he.getScheduleWhilePaused(),ke=(0,h["default"])(oe).create({dashMetrics:(0,A["default"])(oe).getInstance(),metricsModel:(0,T["default"])(oe).getInstance(),textSourceBuffer:(0,y["default"])(oe).getInstance()}),je=(0,m["default"])(oe).create({adapter:(0,b["default"])(oe).getInstance(),sourceBufferController:(0,D["default"])(oe).getInstance(),textSourceBuffer:(0,y["default"])(oe).getInstance()}),ge.getIsTextTrack(me)&&ue.on(x["default"].TIMED_TEXT_REQUESTED,q,this),ue.on(x["default"].LIVE_EDGE_SEARCH_COMPLETED,z,this),ue.on(x["default"].QUALITY_CHANGE_REQUESTED,_,this),ue.on(x["default"].DATA_UPDATE_STARTED,F,this),ue.on(x["default"].DATA_UPDATE_COMPLETED,S,this),ue.on(x["default"].FRAGMENT_LOADING_COMPLETED,C,this),ue.on(x["default"].STREAM_COMPLETED,M,this),ue.on(x["default"].STREAM_INITIALIZED,R,this),ue.on(x["default"].BUFFER_LEVEL_STATE_CHANGED,B,this),ue.on(x["default"].BUFFER_CLEARED,U,this),ue.on(x["default"].BYTES_APPENDED,w,this),ue.on(x["default"].INIT_REQUESTED,c,this),ue.on(x["default"].QUOTA_EXCEEDED,j,this),ue.on(x["default"].BUFFER_LEVEL_STATE_CHANGED,B,this),ue.on(x["default"].PLAYBACK_STARTED,Y,this),ue.on(x["default"].PLAYBACK_SEEKING,G,this),ue.on(x["default"].PLAYBACK_RATE_CHANGED,V,this),ue.on(x["default"].PLAYBACK_TIME_UPDATED,O,this),ue.on(x["default"].URL_RESOLUTION_FAILED,H,this),ue.on(x["default"].FRAGMENT_LOADING_ABANDONED,L,this)}function r(){_e&&(ie(),Ie=!1,Se?p(Te.quality):f(0),Se&&(Se=!1),se("Schedule controller starting for "+me))}function i(){Ie||(Ie=!0,clearTimeout(De),se("Schedule controller stopping for "+me))}function o(){if(!(Ie||be||!Be||Pe.isPaused()&&!Ke)){u();var e=Ye.length>0,t=ke.execute(Le,me,xe.isVideoTrackPresent());if(t||e){var n=function(){if(Te.quality!==qe)qe=Te.quality,Be.switchInitData(Le.getStreamInfo().id,Te.quality);else{var e=je.execute(Le,Ye.shift());e?ye.executeRequest(e):(be=!1,f(250))}};be=!0,e?n():Ne.getPlaybackQuality(Le,n)}else f(500)}}function u(){var e=1.5*Te.fragmentDuration,t=ye.getRequests({state:I["default"].FRAGMENT_MODEL_EXECUTED,time:Pe.getTime()+e,threshold:0})[0];t&&Ye.indexOf(t)===-1&&!ge.getIsTextTrack(me)&&(!we.isCurrentTrack(t.mediaInfo)||he.getFastSwitchEnabled()&&t.quality<Te.quality&&Be.getBufferLevel()>=e&&Ne.getAbandonmentStateFor(me)!==l["default"].ABANDON_LOAD?(v(t),se("Reloading outdated fragment at index: ",t.index)):t.quality>Te.quality&&Q(Pe.getTime()+Be.getBufferLevel()))}function f(e){clearTimeout(De),De=setTimeout(o,e)}function c(e){e.sender.getStreamProcessor()===Le&&p(Te.quality)}function p(e){qe=e;var t=de.getInitRequest(Le,e);t&&(be=!0,ye.executeRequest(t))}function v(e){Ye.push(e)}function _(e){if(me===e.mediaType&&Le.getStreamInfo().id===e.streamInfo.id){if(Te=Le.getRepresentationInfoForQuality(e.newQuality),null===Te||void 0===Te)throw new Error("Unexpected error! - currentRepresentationInfo is null or undefined");re(new Date,a.PlayListTrace.REPRESENTATION_SWITCH_STOP_REASON),ie()}}function E(e){var t=ye.getRequests({state:I["default"].FRAGMENT_MODEL_EXECUTED,time:Pe.getTime(),threshold:0})[0];t&&Pe.getTime()>=t.startTime&&(t.quality!==He&&e&&ue.trigger(x["default"].QUALITY_CHANGE_RENDERED,{mediaType:me,oldQuality:He,newQuality:t.quality}),He=t.quality)}function S(e){e.error||e.sender.getStreamProcessor()!==Le||(Te=de.convertDataToTrack(fe.getValue(),e.currentRepresentation))}function R(e){e.error||Le.getStreamInfo().id!==e.streamInfo.id||(Te=Le.getCurrentRepresentationInfo(),Ee&&null===Ue.getLiveEdge()||(_e=!0),Ie&&r())}function M(e){e.fragmentModel===ye&&(i(),be=!1,se("Stream is complete"))}function C(e){e.sender===ye&&(ge.getIsTextTrack(me)&&(be=!1),e.error&&e.serviceLocation&&!Ie&&v(e.request))}function O(){E(!0)}function w(e){e.sender.getStreamProcessor()===Le&&(be=!1,f(0))}function L(e){e.streamProcessor===Le&&(v(e.request),be=!1,f(0))}function F(e){e.sender.getStreamProcessor()===Le&&i()}function U(e){e.sender.getStreamProcessor()===Le&&(ye.removeExecutedRequestsBeforeTime(e.to),e.hasEnoughSpaceToAppend&&!Be.getIsBufferingCompleted()&&Ie&&r())}function B(e){e.sender.getStreamProcessor()!==Le||e.state!==d["default"].BUFFER_EMPTY||Pe.isSeeking()||(se("Buffer is empty! Stalling!"),re(new Date,a.PlayListTrace.REBUFFERING_REASON))}function j(e){e.sender.getStreamProcessor()===Le&&i()}function H(){ye.abortRequests(),i()}function q(e){e.sender.getStreamProcessor()===Le&&p(e.index)}function Y(){Ie&&r()}function G(e){Oe=e.seekTime,Z(0),Ie&&r();var t=ce.getCurrentManifestUpdate(le.getMetricsFor("stream")),n=Te.DVRWindow?Te.DVRWindow.end-Pe.getTime():NaN;le.updateManifestUpdateInfo(t,{latency:n})}function V(e){Ae&&(Ae.playbackspeed=e.playbackRate.toString())}function z(e){if(!e.error){var t=Te.mediaInfo.streamInfo.manifestInfo.DVRWindowSize/2,n=e.liveEdge-Pe.computeLiveDelay(Te.fragmentDuration,t),i=ce.getCurrentManifestUpdate(le.getMetricsFor("stream")),a=Pe.getLiveStartTime(),o=de.getFragmentRequestForTime(Le,Te,n,{ignoreIsFinished:!0});Oe=a,(isNaN(a)||o.startTime>a)&&(Pe.setLiveStartTime(o.startTime),Oe=o.startTime),le.updateManifestUpdateInfo(i,{currentTime:Oe,presentationStartTime:e.liveEdge,latency:e.liveEdge-Oe,clientTimeOffset:pe.getClientTimeOffset()}),_e=!0,Ie&&r()}}function W(){return Oe}function Q(e){Oe=e}function X(){return ye}function Z(e){Ce=e}function J(){return Ce}function $(){return Le}function ee(){return ke.getBufferTarget(Le,me,xe.isVideoTrackPresent())}function te(e){Re=e}function ne(e,t){re(e,t),Re=null}function re(e,t){if(Re&&Me===!1){var n=Ae.start,r=e.getTime()-n.getTime();Ae.duration=r,Ae.stopreason=t,Re.trace.push(Ae),Me=!0}}function ie(){Re&&Me===!0&&Te&&(Me=!1,Ae=new a.PlayListTrace,Ae.representationid=Te.id,Ae.start=new Date,Ae.mstart=1e3*Pe.getTime(),Ae.playbackspeed=Pe.getPlaybackRate().toString())}function ae(){ue.off(x["default"].LIVE_EDGE_SEARCH_COMPLETED,z,this),ue.off(x["default"].DATA_UPDATE_STARTED,F,this),ue.off(x["default"].DATA_UPDATE_COMPLETED,S,this),ue.off(x["default"].BUFFER_LEVEL_STATE_CHANGED,B,this),ue.off(x["default"].QUALITY_CHANGE_REQUESTED,_,this),ue.off(x["default"].FRAGMENT_LOADING_COMPLETED,C,this),ue.off(x["default"].STREAM_COMPLETED,M,this),ue.off(x["default"].STREAM_INITIALIZED,R,this),ue.off(x["default"].QUOTA_EXCEEDED,j,this),ue.off(x["default"].BYTES_APPENDED,w,this),ue.off(x["default"].BUFFER_CLEARED,U,this),ue.off(x["default"].INIT_REQUESTED,c,this),ue.off(x["default"].PLAYBACK_RATE_CHANGED,V,this),ue.off(x["default"].PLAYBACK_SEEKING,G,this),ue.off(x["default"].PLAYBACK_STARTED,Y,this),ue.off(x["default"].PLAYBACK_TIME_UPDATED,O,this),ue.off(x["default"].URL_RESOLUTION_FAILED,H,this),ue.off(x["default"].FRAGMENT_LOADING_ABANDONED,L,this),ge.getIsTextTrack(me)&&ue.off(x["default"].TIMED_TEXT_REQUESTED,q,this),i(),E(!1),be=!1,Ce=0,Oe=NaN,Pe=null,Re=null}var oe=this.context,se=(0,K["default"])(oe).getInstance().log,ue=(0,N["default"])(oe).getInstance(),le=e.metricsModel,fe=e.manifestModel,de=e.adapter,ce=e.dashMetrics,ge=e.dashManifestModel,pe=e.timelineConverter,he=e.mediaPlayerModel,ve=void 0,me=void 0,_e=void 0,ye=void 0,Ee=void 0,Te=void 0,Se=void 0,Ie=void 0,Re=void 0,Ae=void 0,Me=void 0,be=void 0,Ce=void 0,De=void 0,Oe=void 0,Pe=void 0,we=void 0,Ne=void 0,Le=void 0,xe=void 0,Fe=void 0,Ue=void 0,Be=void 0,ke=void 0,je=void 0,Ke=void 0,He=void 0,qe=void 0,Ye=void 0;return ve={initialize:n,getStreamProcessor:$,getSeekTarget:W,setSeekTarget:Q,getFragmentModel:X,setTimeToLoadDelay:Z,getTimeToLoadDelay:J,replaceRequest:v,start:r,stop:i,reset:ae,setPlayList:te,getBufferTarget:ee,finalisePlayList:ne},t(),ve}Object.defineProperty(t,"__esModule",{value:!0});var a=n(70),o=n(9),s=r(o),u=n(10),l=r(u),f=n(18),d=r(f),c=n(13),g=r(c),p=n(154),h=r(p),v=n(155),m=r(v),_=n(17),y=r(_),E=n(14),T=r(E),S=n(30),I=r(S),R=n(16),A=r(R),M=n(15),b=r(M),C=n(28),D=r(C),O=n(51),P=r(O),w=n(3),N=r(w),L=n(2),x=r(L),F=n(1),U=r(F),B=n(20),k=r(B),j=n(4),K=r(j);i.__dashjs_factory_name="ScheduleController",t["default"]=U["default"].getClassFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){function t(){_=!1,y=null,E=null,T=null,S=null,I=null,p.on(u["default"].DATA_UPDATE_COMPLETED,d,this),p.on(u["default"].INIT_FRAGMENT_LOADED,c,this)}function n(e,t,n){T=e,s(t),S=n,I=S.getRepresentationController()}function r(e){try{E=h.createSourceBuffer(y,e),_||(E.hasOwnProperty("initialize")&&E.initialize(T,this),_=!0)}catch(t){v.mediaSourceError("Error creating "+T+" source buffer.")}return E}function i(){return E}function a(e){E=e}function s(e){y=e}function l(){return S}function f(e){p.off(u["default"].DATA_UPDATE_COMPLETED,d,this),p.off(u["default"].INIT_FRAGMENT_LOADED,c,this),e||(h.abort(y,E),h.removeSourceBuffer(y,E))}function d(e){e.sender.getStreamProcessor()===S&&p.trigger(u["default"].TIMED_TEXT_REQUESTED,{index:0,sender:e.sender})}function c(e){e.fragmentModel===S.getFragmentModel()&&e.chunk.bytes&&h.append(E,e.chunk)}var g=this.context,p=(0,o["default"])(g).getInstance(),h=e.sourceBufferController,v=e.errHandler,m=void 0,_=void 0,y=void 0,E=void 0,T=void 0,S=void 0,I=void 0;return m={initialize:n,createBuffer:r,getBuffer:i,setBuffer:a,getStreamProcessor:l,setMediaSource:s,reset:f},t(),m}Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),o=r(a),s=n(2),u=r(s),l=n(1),f=r(l);i.__dashjs_factory_name="TextController",t["default"]=f["default"].getClassFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(e,t){N=t,O=0,P=!1,w=!1,L={"urn:mpeg:dash:utc:http-head:2014":T,"urn:mpeg:dash:utc:http-xsdate:2014":E.bind(null,c),"urn:mpeg:dash:utc:http-iso:2014":E.bind(null,g),"urn:mpeg:dash:utc:direct:2014":y,"urn:mpeg:dash:utc:http-head:2012":T,"urn:mpeg:dash:utc:http-xsdate:2012":E.bind(null,c),"urn:mpeg:dash:utc:http-iso:2012":E.bind(null,g),"urn:mpeg:dash:utc:direct:2012":y,"urn:mpeg:dash:utc:http-ntp:2014":_,"urn:mpeg:dash:utc:ntp:2014":_,"urn:mpeg:dash:utc:sntp:2014":_},i()||(R(e),a(!0))}function t(e){e&&(e.metricsModel&&(x=e.metricsModel),e.dashMetrics&&(F=e.dashMetrics))}function n(){return l()}function r(e){P=e}function i(){return P}function a(e){w=e}function s(e){O=e}function l(){return O}function d(e){var t,n,r=60,i=60,a=1e3,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=o.exec(e);return t=Date.UTC(parseInt(s[1],10),parseInt(s[2],10)-1,parseInt(s[3],10),parseInt(s[4],10),parseInt(s[5],10),s[6]&&(parseInt(s[6],10)||0),s[7]&&parseFloat(s[7])*a||0),s[9]&&s[10]&&(n=parseInt(s[9],10)*i+parseInt(s[10],10),t+=("+"===s[8]?-1:1)*n*r*a),new Date(t).getTime()}function c(e){var t=Date.parse(e);return isNaN(t)&&(t=d(e)),t}function g(e){return Date.parse(e)}function m(e){return Date.parse(e)}function _(e,t,n){n()}function y(e,t,n){var r=c(e);return isNaN(r)?void n():void t(r)}function E(e,t,n,r,i){var a,o,s=!1,u=new XMLHttpRequest,l=i?"HEAD":"GET",f=t.match(/\S+/g);t=f.shift(),a=function(){s||(s=!0,f.length?E(e,f.join(" "),n,r,i):r())},o=function(){var t,r;200===u.status&&(t=i?u.getResponseHeader("Date"):u.response,r=e(t),isNaN(r)||(n(r),s=!0))},u.open(l,t),u.timeout=v||0,u.onload=o,u.onloadend=a,u.send()}function T(e,t,n){E(m,e,t,n,!0)}function S(){var e=x.getReadOnlyMetricsFor("stream"),t=F.getLatestMPDRequestHeaderValueByID(e,"Date"),n=null!==t?new Date(t).getTime():Number.NaN;isNaN(n)?I(!0):(s(n-(new Date).getTime()),I(!1,n/1e3,O))}function I(e,t,n){r(!1),C.trigger(f["default"].TIME_SYNCHRONIZATION_COMPLETED,{time:t,offset:n,error:e?new o["default"](h):null})}function R(e,t){var n=t||0,i=e[n],a=function(e,t){var n=!e||!t;n&&N?S():I(n,e,t)};r(!0),i?L.hasOwnProperty(i.schemeIdUri)?L[i.schemeIdUri](i.value,function(e){var t=(new Date).getTime(),n=e-t;s(n),b("Local time: "+new Date(t)),b("Server time: "+new Date(e)),b("Difference (ms): "+n),a(e,n)},function(){R(e,n+1)}):R(e,n+1):(s(0),a())}function A(){a(!1),r(!1)}var M=this.context,b=(0,p["default"])(M).getInstance().log,C=(0,u["default"])(M).getInstance(),D=void 0,O=void 0,P=void 0,w=void 0,N=void 0,L=void 0,x=void 0,F=void 0;return D={initialize:e,getOffsetToDeviceTimeMs:n,setConfig:t,reset:A}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(6),o=r(a),s=n(3),u=r(s),l=n(2),f=r(l),d=n(1),c=r(d),g=n(4),p=r(g),h=1,v=5e3;i.__dashjs_factory_name="TimeSyncController";var m=c["default"].getSingletonFactory(i);m.TIME_SYNC_FAILED_ERROR_CODE=h,m.HTTP_TIMEOUT_MS=v,t["default"]=m,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){function t(){M.on(f["default"].XLINK_ELEMENT_LOADED,l,C),N=(0,o["default"])(A).create({errHandler:e.errHandler,metricsModel:e.metricsModel,requestModifier:e.requestModifier})}function n(e){D=e}function r(e){O=e}function i(e){var t;w=new p["default"](D,"",(!0)),P=e,t=c(P.Period_asArray,P,y,m),s(t,y,m)}function a(){M.off(f["default"].XLINK_ELEMENT_LOADED,l,C),N&&(N.reset(),N=null)}function s(e,t,n){var r,i,a,o={};for(o.elements=e,o.type=t,o.resolveType=n,0===o.elements.length&&d(o),a=0;a<o.elements.length;a++)r=o.elements[a],i=b.isHTTPURL(r.url)?r.url:r.originalContent.BaseURL+r.url,N.load(i,r,o)}function l(e){var t,n,r,i="<response>",a="</response>",o="";t=e.element,n=e.resolveObject,t.resolvedContent&&(r=t.resolvedContent.indexOf(">")+1,o=t.resolvedContent.substr(0,r)+i+t.resolvedContent.substr(r)+a,t.resolvedContent=w.xml_str2json(o)),I(n)&&d(n)}function d(e){var t,n,r=[];if(g(e),e.resolveType===_&&M.trigger(f["default"].XLINK_READY,{manifest:P}),e.resolveType===m)switch(e.type){case y:for(t=0;t<P[y+"_asArray"].length;t++)n=P[y+"_asArray"][t],n.hasOwnProperty(E+"_asArray")&&(r=r.concat(c(n[E+"_asArray"],n,E,m))),n.hasOwnProperty(T+"_asArray")&&(r=r.concat(c(n[T+"_asArray"],n,T,m)));s(r,E,m);break;case E:M.trigger(f["default"].XLINK_READY,{manifest:P})}}function c(e,t,n,r){var i,a,o,s=[];for(a=e.length-1;a>=0;a--)i=e[a],i.hasOwnProperty("xlink:href")&&i["xlink:href"]===S&&e.splice(a,1);for(a=0;a<e.length;a++)i=e[a],i.hasOwnProperty("xlink:href")&&i.hasOwnProperty("xlink:actuate")&&i["xlink:actuate"]===r&&(o=h(i["xlink:href"],t,n,a,r,i),s.push(o));return s}function g(e){var t,n,r,i,a,o,s=[];for(i=e.elements.length-1;i>=0;i--){if(t=e.elements[i],n=t.type+"_asArray",!t.resolvedContent||R())delete t.originalContent["xlink:actuate"],
35
- delete t.originalContent["xlink:href"],s.push(t.originalContent);else if(t.resolvedContent)for(a=0;a<t.resolvedContent[n].length;a++)r=t.resolvedContent[n][a],s.push(r);for(t.parentElement[n].splice(t.index,1),o=0;o<s.length;o++)t.parentElement[n].splice(t.index+o,0,s[o]);s=[]}e.elements.length>0&&O.run(P)}function h(e,t,n,r,i,a){return{url:e,parentElement:t,type:n,index:r,resolveType:i,originalContent:a,resolvedContent:null,resolved:!1}}function I(e){var t,n;for(t=0;t<e.elements.length;t++)if(n=e.elements[t],n.resolved===!1)return!1;return!0}function R(){return!1}var A=this.context,M=(0,u["default"])(A).getInstance(),b=(0,v["default"])(A).getInstance(),C=void 0,D=void 0,O=void 0,P=void 0,w=void 0,N=void 0;return C={resolveManifestOnLoad:i,setMatchers:n,setIron:r,reset:a},t(),C}Object.defineProperty(t,"__esModule",{value:!0});var a=n(103),o=r(a),s=n(3),u=r(s),l=n(2),f=r(l),d=n(1),c=r(d),g=n(35),p=r(g),h=n(22),v=r(h),m="onLoad",_="onActuate",y="Period",E="AdaptationSet",T="EventStream",S="urn:mpeg:dash:resolve-to-zero:2013";i.__dashjs_factory_name="XlinkController",t["default"]=c["default"].getClassFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(e){return a=(0,o["default"])(r).getInstance({eventBus:e.eventBus,metricsModel:e.metricsModel}),(0,f["default"])(r).create(e)}function t(){return(0,p["default"])(r).getInstance()}function n(){return(0,c["default"])(r).getInstance()}var r=this.context,i=void 0,a=void 0;return i={createMetricsReporting:e,getReportingFactory:t,getMetricsHandlerFactory:n}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(124),o=r(a),s=n(29),u=r(s),l=n(114),f=r(l),d=n(60),c=r(d),g=n(61),p=r(g),h=n(1),v=r(h);i.__dashjs_factory_name="MetricsReporting";var m=v["default"].getClassFactory(i);m.events=u["default"],t["default"]=m,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){function t(t){if(!t.error){var n=Object.keys(i),r=(0,u["default"])(a).getInstance({dashManifestModel:e.dashManifestModel}).getMetrics(t.manifest);r.forEach(function(t){var r=JSON.stringify(t);if(i.hasOwnProperty(r))n.splice(r,1);else try{var s=(0,o["default"])(a).create(e);s.initialize(t),i[r]=s}catch(u){}}),n.forEach(function(e){i[e].reset(),delete i[e]}),s.trigger(c["default"].METRICS_INITIALISATION_COMPLETE)}}function n(){Object.keys(i).forEach(function(e){i[e].reset()}),i={}}function r(){s.on(p["default"].MANIFEST_UPDATED,t),s.on(p["default"].STREAM_TEARDOWN_COMPLETE,n)}var i={},a=this.context,s=e.eventBus;return r(),{}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(115),o=r(a),s=n(125),u=r(s),l=n(1),f=r(l),d=n(29),c=r(d),g=n(2),p=r(g);i.__dashjs_factory_name="MetricsCollectionController",t["default"]=f["default"].getClassFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){function t(t){try{a=(0,u["default"])(s).create({mediaElement:e.mediaElement}),a.initialize(t.Range),i=(0,f["default"])(s).create({log:e.log}),i.initialize(t.Reporting,a),r=(0,c["default"])(s).create({log:e.log,eventBus:e.eventBus}),r.initialize(t.metrics,i)}catch(o){throw n(),o}}function n(){r&&r.reset(),i&&i.reset(),a&&a.reset()}var r=void 0,i=void 0,a=void 0,o=void 0,s=this.context;return o={initialize:t,reset:n}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),o=r(a),s=n(117),u=r(s),l=n(118),f=r(l),d=n(116),c=r(d);i.__dashjs_factory_name="MetricsController",t["default"]=o["default"].getClassFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){function t(e){i.forEach(function(t){t.handleNewMetric(e.metric,e.value,e.mediaType)})}function n(e,n){e.split(",").forEach(function(e,t,r){var a;if(e.indexOf("(")!==-1&&e.indexOf(")")===-1){var o=r[t+1];o&&o.indexOf("(")===-1&&o.indexOf(")")!==-1&&(e+=","+o,delete r[t+1])}a=l.create(e,n),a&&i.push(a)}),u.on(f["default"].METRIC_ADDED,t,a),u.on(f["default"].METRIC_UPDATED,t,a)}function r(){u.off(f["default"].METRIC_ADDED,t,a),u.off(f["default"].METRIC_UPDATED,t,a),i.forEach(function(e){return e.reset()}),i=[]}var i=[],a=void 0,s=this.context,u=e.eventBus,l=(0,o["default"])(s).getInstance({log:e.log,eventBus:e.eventBus});return a={initialize:n,reset:r}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(60),o=r(a),s=n(1),u=r(s),l=n(38),f=r(l);i.__dashjs_factory_name="MetricsHandlersController",t["default"]=u["default"].getClassFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){function t(e){e&&e.length&&(e.forEach(function(e){var t=e.starttime,n=t+e.duration;l.add(t,n)}),a=!!e[0]._useWallClockTime)}function n(){l.clear()}function r(){l=(0,u["default"])(o).create()}function i(){var e,t=l.length;if(!t)return!0;e=a?(new Date).getTime()/1e3:f.currentTime;for(var n=0;n<t;n+=1){var r=l.start(n),i=l.end(n);if(r<=e&&e<i)return!0}return!1}var a=!1,o=this.context,s=void 0,l=void 0,f=e.mediaElement;return s={initialize:t,reset:n,isEnabled:i},r(),s}Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),o=r(a),s=n(67),u=r(s);i.__dashjs_factory_name="RangeController",t["default"]=o["default"].getClassFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){function t(e,t){e.some(function(e){var n=o.create(e,t);if(n)return i.push(n),!0})}function n(){i.forEach(function(e){return e.reset()}),i=[]}function r(e,t){i.forEach(function(n){return n.report(e,t)})}var i=[],a=void 0,o=(0,u["default"])(this.context).getInstance({log:e.log});return a={initialize:t,reset:n,report:r}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),o=r(a),s=n(61),u=r(s);i.__dashjs_factory_name="ReportingController",t["default"]=o["default"].getClassFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(){try{return Object.keys(p).map(function(e){return p[e]}).reduce(function(e,t){return e.level<t.level?e:t})}catch(e){return}}function t(){var t=e();t&&d!==t.t&&(d=t.t,o.report(l,t))}function n(e,n,r){n&&(s=g.validateN(r),o=n,l=g.reconstructFullMetricName(e,r),f=setInterval(t,s))}function r(){clearInterval(f),f=null,s=0,o=null,d=null}function i(e,t,n){"BufferLevel"===e&&(p[n]=t)}var a=void 0,o=void 0,s=void 0,l=void 0,f=void 0,d=void 0,c=this.context,g=(0,u["default"])(c).getInstance(),p=[];return a={initialize:n,reset:r,handleNewMetric:i}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),o=r(a),s=n(62),u=r(s);i.__dashjs_factory_name="BufferLevelHandler",t["default"]=o["default"].getClassFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){function t(){s.off(u["default"].METRICS_INITIALISATION_COMPLETE,t,this),s.trigger(u["default"].BECAME_REPORTING_PLAYER)}function n(e,n){n&&(o=n,s.on(u["default"].METRICS_INITIALISATION_COMPLETE,t,this))}function r(){o=null}function i(e,t){"DVBErrors"===e&&o&&o.report(e,t)}var a=void 0,o=void 0,s=e.eventBus;return a={initialize:n,reset:r,handleNewMetric:i}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),o=r(a),s=n(29),u=r(s);t["default"]=o["default"].getClassFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(e,t){i=e,a=t}function t(){a=null,i=void 0}function n(e,t){e===i&&a&&a.report(i,t)}var r=void 0,i=void 0,a=void 0;return r={initialize:e,reset:t,handleNewMetric:n}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),o=r(a);i.__dashjs_factory_name="GenericMetricHandler",t["default"]=o["default"].getClassFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(){var e=d;e.length&&a&&a.report(l,e),d=[]}function t(t,n,r,i){n&&(o=c.validateN(r),a=n,i&&i.length&&(s=i),l=c.reconstructFullMetricName(t,r,i),f=setInterval(e,o))}function n(){clearInterval(f),f=null,o=null,s=null,d=[],a=null}function r(e,t){"HttpList"===e&&(s&&s!==t.type||d.push(t))}var i=void 0,a=void 0,o=void 0,s=void 0,l=void 0,f=void 0,d=[],c=(0,u["default"])(this.context).getInstance();return i={initialize:t,reset:n,handleNewMetric:r}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),o=r(a),s=n(62),u=r(s);i.__dashjs_factory_name="HttpListHandler",t["default"]=o["default"].getClassFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(e,t,n){var r=new XMLHttpRequest,i=function(){var e=v.indexOf(r);e!==-1&&(v.splice(e,1),r.status>=200&&r.status<300?t&&t():n&&n())};v.push(r);try{r.open("GET",e),r.onloadend=i,r.onerror=i,r.send()}catch(a){r.onerror()}}function t(t,n){Array.isArray(n)||(n=[n]),d&&p.isEnabled()&&n.forEach(function(n){var r=o.serialise(n);l&&"DVBErrors"!==t&&(r="metricname="+t+"&"+r),r=g+"?"+r,e(r,null,function(){d=!1})})}function n(e,t){var n;if(p=t,g=e["dvb:reportingUrl"],!g)throw new Error("required parameter missing (dvb:reportingUrl)");c||(n=e["dvb:probability"]||e["dvb:priority"]||0,n&&(1e3===n||n/1e3>=s.random())&&(d=!0),c=!0)}function r(){h||(v.forEach(function(e){return e.abort()}),v=[]),c=!1,d=!1,g=null,p=null}var i=void 0,a=this.context,o=(0,u["default"])(a).getInstance(),s=(0,f["default"])(a).getInstance(),l=!0,d=!1,c=!1,g=null,p=null,h=!0,v=[];return i={report:t,initialize:n,reset:r}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),o=r(a),s=n(126),u=r(s),l=n(127),f=r(l);i.__dashjs_factory_name="DVBReporting",t["default"]=o["default"].getClassFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){function t(e){var t=new o["default"];if(m){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);t.mpdurl||(t.mpdurl=m.originalUrl||m.url),t.terror||(t.terror=new Date),v.addDVBErrors(t)}}function n(e){e.error||(m=e.manifest)}function r(e){t({errorcode:o["default"].BASE_URL_CHANGED,servicelocation:e.entry})}function i(){t({errorcode:o["default"].BECAME_REPORTER})}function a(e){(0===e.responsecode||e.responsecode>=400||e.responsecode<100||e.responsecode>=600)&&t({errorcode:e.responsecode||o["default"].CONNECTION_ERROR,url:e.url,terror:e.tresponse,servicelocation:e._serviceLocation})}function s(e){switch(e.metric){case"HttpList":a(e.value)}}function l(e){var n,r=e.error?e.error.code:0;switch(r){case MediaError.MEDIA_ERR_NETWORK:n=o["default"].CONNECTION_ERROR;break;case MediaError.MEDIA_ERR_DECODE:n=o["default"].CORRUPT_MEDIA_OTHER;break;default:return}t({errorcode:n})}function d(){h.on(u["default"].MANIFEST_UPDATED,n,p),h.on(u["default"].SERVICE_LOCATION_BLACKLIST_CHANGED,r,p),h.on(f["default"].METRIC_ADDED,s,p),h.on(f["default"].METRIC_UPDATED,s,p),h.on(f["default"].PLAYBACK_ERROR,l,p),h.on(c["default"].BECAME_REPORTING_PLAYER,i,p)}function g(){h.off(u["default"].MANIFEST_UPDATED,n,p),h.off(u["default"].SERVICE_LOCATION_BLACKLIST_CHANGED,r,p),h.off(f["default"].METRIC_ADDED,s,p),h.off(f["default"].METRIC_UPDATED,s,p),h.off(f["default"].PLAYBACK_ERROR,l,p),h.off(c["default"].BECAME_REPORTING_PLAYER,i,p)}var p=void 0,h=e.eventBus,v=e.metricsModel,m=void 0;return p={initialise:d,reset:g},d(),p}Object.defineProperty(t,"__esModule",{value:!0});var a=n(128),o=r(a),s=n(2),u=r(s),l=n(38),f=r(l),d=n(29),c=r(d),g=n(1),p=r(g);i.__dashjs_factory_name="DVBErrorsTranslator",t["default"]=p["default"].getSingletonFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){function t(e,t,n){var r,a,o=i.getMpd(e),s=0;return t?s=o.availabilityStartTime.getTime()/1e3:(r=this.getRegularPeriods(e,o),r.length&&(s=r[0].start)),a=s,n&&n.hasOwnProperty("starttime")&&(a+=n.starttime),a}function n(e){var n=[];return e.Metrics_asArray&&e.Metrics_asArray.forEach(function(r){var a=new o["default"],s=i.getIsDynamic(e);r.hasOwnProperty("metrics")&&(a.metrics=r.metrics,r.Range_asArray&&r.Range_asArray.forEach(function(n){var r=new u["default"];r.starttime=t(e,s,n),n.hasOwnProperty("duration")?r.duration=n.duration:r.duration=i.getDuration(e),r._useWallClockTime=s,a.Range.push(r)}),r.Reporting_asArray&&(r.Reporting_asArray.forEach(function(e){var t=new f["default"];if(e.hasOwnProperty("schemeIdUri")){t.schemeIdUri=e.schemeIdUri;for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);a.Reporting.push(t)}}),n.push(a)))}),n}var r=void 0,i=e.dashManifestModel;return r={getMetrics:n}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(129),o=r(a),s=n(130),u=r(s),l=n(131),f=r(l),d=n(1),c=r(d);i.__dashjs_factory_name="ManifestParsing",t["default"]=c["default"].getSingletonFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(t){var n,r,i=[],a=[];for(n in t)if(t.hasOwnProperty(n)&&0!==n.indexOf("_")){if(r=t[n],void 0!==r&&null!==r||(r=""),Array.isArray(r)){if(!r.length)continue;a=[],r.forEach(function(t){var n="Object"!==Object.prototype.toString.call(t).slice(8,-1);a.push(n?t:e(t))}),r=encodeURIComponent(a.join(","))}else"string"==typeof r?r=encodeURIComponent(r):r instanceof Date?r=r.toISOString():"number"==typeof r&&(r=Math.round(r));i.push(n+"="+r)}return i.join("&")}return{serialise:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),o=r(a);i.__dashjs_factory_name="MetricSerialiser",t["default"]=o["default"].getSingletonFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(){n&&(o||(o=new r(a)),n.getRandomValues(o),s=0)}function t(t,r){var a;return t||(t=0),r||(r=1),n?(s===o.length&&e(),a=o[s]/i,s+=1):a=Math.random(),a*(r-t)+t}var n=window.crypto||window.msCrypto,r=Uint32Array,i=Math.pow(2,8*r.BYTES_PER_ELEMENT)-1,a=10,o=void 0,s=void 0,u=void 0;return u={random:t},e(),u}Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),o=r(a);i.__dashjs_factory_name="RNG",t["default"]=o["default"].getSingletonFactory(i),e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function i(){n(this,i),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",t["default"]=r,e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function i(){n(this,i),this.metrics="",this.Range=[],this.Reporting=[]};t["default"]=r,e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function i(){n(this,i),this.starttime=0,this.duration=1/0,this._useWallClockTime=!1};t["default"]=r,e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function i(){n(this,i),this.schemeIdUri="",this.value=""};t["default"]=r,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(){function e(){d=new g}function t(e,t,n){var r=h.getBaseURLsFromElement(n);e[t]?v.areSimpleEquivalent(r,e[t].data.baseUrls)||(e[t].data.baseUrls=r,e[t].data.selectedIdx=c):e[t]=new g(r)}function n(e){var n=h.getBaseURLsFromElement(e);v.areSimpleEquivalent(n,d.data.baseUrls)||(d.data.baseUrls=n,d.data.selectedIdx=c),e.Period_asArray&&e.Period_asArray.forEach(function(e,n){t(d.children,n,e),e.AdaptationSet_asArray&&e.AdaptationSet_asArray.forEach(function(e,r){t(d.children[n].children,r,e),e.Representation_asArray&&e.Representation_asArray.sort(h.getRepresentationSortFunction()).forEach(function(e,i){t(d.children[n].children[r].children,i,e)})})})}function r(e,t){var n=t||d;e(n.data),n.children&&n.children.forEach(function(t){return r(e,t)})}function i(e){r(function(t){isNaN(t.selectedIdx)||e===t.baseUrls[t.selectedIdx].serviceLocation&&(t.selectedIdx=c)})}function a(e){n(e)}function o(){d=new g}function u(e){var t=d,n=[t.data];return e.forEach(function(e){t=t.children[e],t&&n.push(t.data)}),n.filter(function(e){return e.baseUrls.length})}var f=void 0,d=void 0,p=this.context,h=(0,s["default"])(p).getInstance(),v=(0,l["default"])(p).getInstance();return f={reset:o,update:a,getForPath:u,invalidateSelectedIndexes:i},e(),f}Object.defineProperty(t,"__esModule",{value:!0});var o=n(12),s=r(o),u=n(162),l=r(u),f=n(1),d=r(f),c=NaN,g=function p(e,t){i(this,p),this.data={baseUrls:e||null,selectedIdx:t||c},this.children=[]};a.__dashjs_factory_name="BaseURLTreeModel",t["default"]=d["default"].getClassFactory(a),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof t?"undefined":o(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)}var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};Object.defineProperty(t,"__esModule",{value:!0});var s=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}},u=n(24),l=r(u),f=function(e){function t(){i(this,t),s(Object.getPrototypeOf(t.prototype),"constructor",this).call(this),this.INTERNAL_KEY_MESSAGE="internalKeyMessage",this.INTERNAL_KEY_SYSTEM_SELECTED="internalKeySystemSelected",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="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"}return a(t,e),t}(l["default"]),d=new f;t["default"]=d,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){function t(){O=R.getKeySystems(),P=[],x=!1,F="temporary",U="",l["default"].extend(m["default"].events)}function n(e,t,n){if(!x){var r;t||n||(r=M.getStreamsInfo(e)[0]),w=t||(r?M.getMediaInfoForType(e,r,"audio"):null),N=n||(r?M.getMediaInfoForType(e,r,"video"):null);var i=N?N:w,a=R.getSupportedKeySystemsFromContentProtection(i.contentProtection);a&&a.length>0&&E(a,!0),x=!0}}function r(e){var t=s["default"].getPSSHForKeySystem(B,e);if(t){for(var n=A.getAllInitData(),r=0;r<n.length;r++)if(R.initDataEquals(t,n[r]))return void C("DRM: Ignoring initData because we have already seen it!");try{A.createKeySession(t,F)}catch(i){b.trigger(l["default"].KEY_SESSION_CREATED,{data:null,error:"Error creating key session! "+i.message})}}else b.trigger(l["default"].KEY_SESSION_CREATED,{data:null,error:"Selected key system is "+B.systemString+". needkey/encrypted event contains no initData corresponding to that key system!"})}function i(e){A.loadKeySession(e)}function o(e){A.removeKeySession(e)}function u(e){A.closeKeySession(e)}function f(e){A.setServerCertificate(e)}function c(e){e?(A.setMediaElement(e),b.on(l["default"].NEED_KEY,I,this),b.on(l["default"].INTERNAL_KEY_MESSAGE,S,this)):null===e&&(A.setMediaElement(e),b.off(l["default"].NEED_KEY,I,this),b.off(l["default"].INTERNAL_KEY_MESSAGE,S,this))}function p(e){F=e}function h(e){U=e}function v(e){L=e}function _(){c(null),B=void 0,A&&(A.reset(),A=null)}function y(e){var t=null,n=e.systemString;return L&&(t=n in L?L[n]:null),t}function E(e,t){var n=this,i=[],a=[];N&&a.push(new d["default"](N.codec,U)),w&&i.push(new d["default"](w.codec,U));var o,s=new g["default"](i,a,"optional","temporary"===F?"optional":"required",[F]),u=[];if(B){for(o=0;o<e.length;o++)if(B===e[o].ks){var f=function(){u.push({ks:e[o].ks,configs:[s]});var i=function a(i){b.off(l["default"].KEY_SYSTEM_ACCESS_COMPLETE,a,n),i.error?t||b.trigger(l["default"].KEY_SYSTEM_SELECTED,{error:"DRM: KeySystem Access Denied! -- "+i.error}):(C("DRM: KeySystem Access Granted"),b.trigger(l["default"].KEY_SYSTEM_SELECTED,{data:i.data}),r(e[o].initData))};return b.on(l["default"].KEY_SYSTEM_ACCESS_COMPLETE,i,n),A.requestKeySystemAccess(u),"break"}();if("break"===f)break}}else if(void 0===B){B=null,P.push(e);for(var c=0;c<e.length;c++)u.push({ks:e[c].ks,configs:[s]});var p,h=function m(e){b.off(l["default"].KEY_SYSTEM_ACCESS_COMPLETE,m,n),e.error?(B=void 0,b.off(l["default"].INTERNAL_KEY_SYSTEM_SELECTED,v,n),t||b.trigger(l["default"].KEY_SYSTEM_SELECTED,{data:null,error:"DRM: KeySystem Access Denied! -- "+e.error})):(p=e.data,C("DRM: KeySystem Access Granted ("+p.keySystem.systemString+")! Selecting key system..."),A.selectKeySystem(p))},v=function _(e){if(b.off(l["default"].INTERNAL_KEY_SYSTEM_SELECTED,_,n),b.off(l["default"].KEY_SYSTEM_ACCESS_COMPLETE,h,n),e.error)B=void 0,t||b.trigger(l["default"].KEY_SYSTEM_SELECTED,{data:null,error:"DRM: Error selecting key system! -- "+e.error});else{B=A.getKeySystem(),b.trigger(l["default"].KEY_SYSTEM_SELECTED,{data:p});for(var i=0;i<P.length;i++)for(o=0;o<P[i].length;o++)if(B===P[i][o].ks){r(P[i][o].initData);break}}};b.on(l["default"].INTERNAL_KEY_SYSTEM_SELECTED,v,n),b.on(l["default"].KEY_SYSTEM_ACCESS_COMPLETE,h,n),A.requestKeySystemAccess(u)}else P.push(e)}function T(e,t){b.trigger(l["default"].LICENSE_REQUEST_COMPLETE,{data:e,error:t})}function S(e){if(C("DRM: onKeyMessage"),e.error)return void C(e.error);var t=e.data;b.trigger(l["default"].KEY_MESSAGE,{data:t});var n=t.messageType?t.messageType:"license-request",r=t.message,i=t.sessionToken,o=y(B),u=B.systemString,f=R.getLicenseServer(B,o,n),d={sessionToken:i,messageType:n};if(!f)return C("DRM: License server request not required for this message (type = "+e.data.messageType+"). Session ID = "+i.getSessionID()),void T(d);if(R.isClearKey(B)){var c=R.processClearKeyLicenseRequest(o,r);if(c)return C("DRM: ClearKey license request handled by application!"),T(d),void A.updateKeySession(i,c)}var g=new XMLHttpRequest,p=null;if(o)if(o.serverURL){var h=o.serverURL;"string"==typeof h&&""!==h?p=h:"object"===("undefined"==typeof h?"undefined":a(h))&&h.hasOwnProperty(n)&&(p=h[n])}else o.laURL&&""!==o.laURL&&(p=o.laURL);else p=B.getLicenseServerURLFromInitData(s["default"].getPSSHData(i.initData)),p||(p=e.data.laURL);if(p=f.getServerURLFromMessage(p,r,n),!p)return void T(d,"DRM: No license server URL specified!");g.open(f.getHTTPMethod(n),p,!0),g.responseType=f.getResponseType(u,n),g.onload=function(){200==this.status?(T(d),A.updateKeySession(i,f.getLicenseMessage(this.response,u,n))):T(d,"DRM: "+u+' update, XHR status is "'+this.statusText+'" ('+this.status+"), expected to be 200. readyState is "+this.readyState+". Response is "+(this.response?f.getErrorResponse(this.response,u,n):"NONE"))},g.onabort=function(){T(d,"DRM: "+u+' update, XHR aborted. status is "'+this.statusText+'" ('+this.status+"), readyState is "+this.readyState)},g.onerror=function(){T(d,"DRM: "+u+' update, XHR error. status is "'+this.statusText+'" ('+this.status+"), readyState is "+this.readyState)};var v=function(e){var t;if(e)for(t in e)"authorization"===t.toLowerCase()&&(g.withCredentials=!0),g.setRequestHeader(t,e[t])};o&&v(o.httpRequestHeaders),v(B.getRequestHeadersFromMessage(r)),o&&o.withCredentials&&(g.withCredentials=!0),g.send(B.getLicenseRequestFromMessage(r))}function I(e){if(C("DRM: onNeedKey"),"cenc"!==e.key.initDataType)return void C("DRM: Only 'cenc' initData is supported! Ignoring initData of type: "+e.key.initDataType);var t=e.key.initData;ArrayBuffer.isView(t)&&(t=t.buffer),C("DRM: initData:",String.fromCharCode.apply(null,new Uint8Array(t)));var n=R.getSupportedKeySystems(t,L);return 0===n.length?void C("DRM: Received needkey event with initData, but we don't support any of the key systems!"):void E(n,!1)}var R=e.protectionKeyController,A=e.protectionModel,M=e.adapter,b=e.eventBus,C=e.log,D=void 0,O=void 0,P=void 0,w=void 0,N=void 0,L=void 0,x=void 0,F=void 0,U=void 0,B=void 0;return D={initialize:n,createKeySession:r,loadKeySession:i,removeKeySession:o,closeKeySession:u,setServerCertificate:f,setMediaElement:c,setSessionType:p,setRobustnessLevel:h,setProtectionData:v,reset:_},t(),D}var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};Object.defineProperty(t,"__esModule",{value:!0});var o=n(21),s=r(o),u=n(2),l=r(u),f=n(145),d=r(f),c=n(44),g=r(c),p=n(1),h=r(p),v=n(63),m=r(v);i.__dashjs_factory_name="ProtectionController",t["default"]=h["default"].getClassFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(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 s=r.kids[a],l=e.clearkeys.hasOwnProperty(s)?e.clearkeys[s]:null;if(!l)throw new Error("DRM: ClearKey keyID ("+s+") is not known!");i.push(new o["default"](s,l))}n=new u["default"](i)}return n}function t(e){return f["default"].parseInitDataFromContentProtection(e)}function n(){return null}function r(e){return new Uint8Array(e)}function i(){return null}var a=void 0;return a={uuid:g,schemeIdURI:h,systemString:p,getInitData:t,getRequestHeadersFromMessage:n,getLicenseRequestFromMessage:r,getLicenseServerURLFromInitData:i,getClearKeysFromProtectionData:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(65),o=r(a),s=n(64),u=r(s),l=n(21),f=r(l),d=n(1),c=r(d),g="1077efec-c0b2-4d02-ace3-3c1e52e2fb4b",p="org.w3.clearkey",h="urn:uuid:"+g;i.__dashjs_factory_name="KeySystemClearKey",t["default"]=c["default"].getSingletonFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(e){var t,n,r={},i=new DOMParser,a="utf16"===s?new Uint16Array(e):new Uint8Array(e);t=String.fromCharCode.apply(null,a),n=i.parseFromString(t,"application/xml");for(var o=n.getElementsByTagName("name"),u=n.getElementsByTagName("value"),l=0;l<o.length;l++)r[o[l].childNodes[0].nodeValue]=u[l].childNodes[0].nodeValue;return r.hasOwnProperty("Content")&&(r["Content-Type"]=r.Content,delete r.Content),r}function t(e){var t,n,r=null,i=new DOMParser,a="utf16"===s?new Uint16Array(e):new Uint8Array(e);if(t=String.fromCharCode.apply(null,a),n=i.parseFromString(t,"application/xml"),n.getElementsByTagName("Challenge")[0]){var o=n.getElementsByTagName("Challenge")[0].childNodes[0].nodeValue;o&&(r=c["default"].decode(o))}return r}function n(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}function r(e){var t,n,r,i,a,s=new Uint8Array([112,115,115,104,0,0,0,0]),u=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]),l=0,f=null;if("pssh"in e)return o["default"].parseInitDataFromContentProtection(e);if("pro"in e)f=c["default"].decodeArray(e.pro.__text);else{if(!("prheader"in e))return null;f=c["default"].decodeArray(e.prheader.__text)}return t=f.length,n=4+s.length+u.length+4+t,r=new ArrayBuffer(n),i=new Uint8Array(r),a=new DataView(r),a.setUint32(l,n),l+=4,i.set(s,l),l+=s.length,i.set(u,l),l+=u.length,a.setUint32(l,t),l+=4,i.set(f,l),l+=t,i.buffer}function i(e){if("utf8"!==e&&"utf16"!==e)throw new u["default"]("Illegal PlayReady message format! -- "+e);s=e}var a=void 0,s="utf16";return a={uuid:g,schemeIdURI:h,systemString:p,getInitData:r,getRequestHeadersFromMessage:e,getLicenseRequestFromMessage:t,getLicenseServerURLFromInitData:n,setPlayReadyMessageFormat:i}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(21),o=r(a),s=n(6),u=r(s),l=n(1),f=r(l),d=n(34),c=r(d),g="9a04f079-9840-4286-ab92-e65be0885f95",p="com.microsoft.playready",h="urn:uuid:"+g;i.__dashjs_factory_name="KeySystemPlayReady",t["default"]=f["default"].getSingletonFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(e){return o["default"].parseInitDataFromContentProtection(e)}function t(){return null}function n(e){return new Uint8Array(e)}function r(){return null}var i=void 0;return i={uuid:l,schemeIdURI:d,systemString:f,getInitData:e,getRequestHeadersFromMessage:t,getLicenseRequestFromMessage:n,getLicenseServerURLFromInitData:r}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(21),o=r(a),s=n(1),u=r(s),l="edef8ba9-79d6-4ace-a3c8-27dcd51d21ed",f="com.widevine.alpha",d="urn:uuid:"+l;i.__dashjs_factory_name="KeySystemWidevine",t["default"]=u["default"].getSingletonFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){function t(){O=null,P=null,L=[],x=[],w=(0,o["default"])(A).getInstance(),N=(0,E["default"])(A).getInstance(),U=S()}function n(){O&&R();for(var e=0;e<x.length;e++)h(x[e]);M.trigger(_["default"].TEARDOWN_COMPLETE)}function r(){return P}function i(){for(var e=[],t=0;t<L.length;t++)e.push(L[t].initData);for(var t=0;t<x.length;t++)e.push(x[t].initData);return e}function a(e){var t=O;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=null,u=0;u<a.length;u++){var l=a[u].videoCapabilities;if(l&&0!==l.length){s=[];for(var f=0;f<l.length;f++)""!==t.canPlayType(l[f].contentType,i)&&s.push(l[f])}if(!(!o&&!s||o&&0===o.length||s&&0===s.length)){n=!0;var d=new p["default"](o,s),c=w.getKeySystemBySystemString(i);M.trigger(_["default"].KEY_SYSTEM_ACCESS_COMPLETE,{data:new v["default"](c,d)});break}}n||M.trigger(_["default"].KEY_SYSTEM_ACCESS_COMPLETE,{error:"Key system access denied! -- No valid audio/video content configurations detected!"})}function s(e){P=e.keySystem,M.trigger(_["default"].INTERNAL_KEY_SYSTEM_SELECTED)}function l(e){O!==e&&(O&&R(),O=e,O&&(O.addEventListener(C.keyerror,U),O.addEventListener(C.needkey,U),O.addEventListener(C.keymessage,U),
36
- O.addEventListener(C.keyadded,U),M.trigger(_["default"].VIDEO_ELEMENT_SELECTED)))}function d(e){if(!P)throw new Error("Can not create sessions until you have selected a key system");if(F||0===x.length){var t={sessionID:null,initData:e,getSessionID:function(){return this.sessionID},getExpirationTime:function(){return NaN},getSessionType:function(){return"temporary"}};return L.push(t),O[C.generateKeyRequest](P.systemString,new Uint8Array(e)),t}throw new Error("Multiple sessions not allowed!")}function g(e,t){var n=e.sessionID;if(w.isClearKey(P))for(var r=0;r<t.keyPairs.length;r++)O[C.addKey](P.systemString,t.keyPairs[r].key,t.keyPairs[r].keyID,n);else O[C.addKey](P.systemString,new Uint8Array(t),e.initData,n)}function h(e){O[C.cancelKeyRequest](P.systemString,e.sessionID)}function m(){}function y(){}function T(){}function S(){return{handleEvent:function(e){var t=null;switch(e.type){case C.needkey:var n=ArrayBuffer.isView(e.initData)?e.initData.buffer:e.initData;M.trigger(_["default"].NEED_KEY,{key:new u["default"](n,"cenc")});break;case C.keyerror:if(t=I(x,e.sessionId),t||(t=I(L,e.sessionId)),t){var r="";switch(e.errorCode.code){case 1:r+="MEDIA_KEYERR_UNKNOWN - An unspecified error occurred. This value is used for errors that don't match any of the other codes.";break;case 2:r+="MEDIA_KEYERR_CLIENT - The Key System could not be installed or updated.";break;case 3:r+="MEDIA_KEYERR_SERVICE - The message passed into update indicated an error from the license service.";break;case 4:r+="MEDIA_KEYERR_OUTPUT - There is no available output device with the required characteristics for the content protection system.";break;case 5:r+="MEDIA_KEYERR_HARDWARECHANGE - A hardware configuration change caused a content protection error.";break;case 6:r+="MEDIA_KEYERR_DOMAIN - An error occurred in a multi-device domain licensing configuration. The most common error is a failure to join the domain."}r+=" System Code = "+e.systemCode,M.trigger(_["default"].KEY_ERROR,{data:new f["default"](t,r)})}else b("No session token found for key error");break;case C.keyadded:t=I(x,e.sessionId),t||(t=I(L,e.sessionId)),t?(b("DRM: Key added."),M.trigger(_["default"].KEY_ADDED,{data:t})):b("No session token found for key added");break;case C.keymessage:if(F=null!==e.sessionId&&void 0!==e.sessionId,F?(t=I(x,e.sessionId),!t&&L.length>0&&(t=L.shift(),x.push(t),t.sessionID=e.sessionId)):L.length>0&&(t=L.shift(),x.push(t),0!==L.length&&N.mediaKeyMessageError("Multiple key sessions were creates with a user-agent that does not support sessionIDs!! Unpredictable behavior ahead!")),t){var i=ArrayBuffer.isView(e.message)?e.message.buffer:e.message;t.keyMessage=i,M.trigger(_["default"].INTERNAL_KEY_MESSAGE,{data:new c["default"](t,i,e.defaultURL)})}else b("No session token found for key message")}}}}function I(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 R(){O.removeEventListener(C.keyerror,U),O.removeEventListener(C.needkey,U),O.removeEventListener(C.keymessage,U),O.removeEventListener(C.keyadded,U)}var A=this.context,M=e.eventBus,b=e.log,C=e.api,D=void 0,O=void 0,P=void 0,w=void 0,N=void 0,L=void 0,x=void 0,F=void 0,U=void 0;return D={getAllInitData:i,requestKeySystemAccess:a,getKeySystem:r,selectKeySystem:s,setMediaElement:l,createKeySession:d,updateKeySession:g,closeKeySession:h,setServerCertificate:m,loadKeySession:y,removeKeySession:T,reset:n},t(),D}Object.defineProperty(t,"__esModule",{value:!0});var a=n(32),o=r(a),s=n(45),u=r(s),l=n(41),f=r(l),d=n(42),c=r(d),g=n(44),p=r(g),h=n(43),v=r(h),m=n(2),_=r(m),y=n(11),E=r(y),T=n(1),S=r(T);i.__dashjs_factory_name="ProtectionModel_01b",t["default"]=S["default"].getClassFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){function t(){M=null,b=null,C=null,D=[],P=(0,o["default"])(w).getInstance(),O=S()}function n(){var e,t=D.length;if(0!==t)for(var n=function(e){I(e),0===D.length&&(b?(b.removeEventListener("encrypted",O),b.setMediaKeys(null).then(function(){N.trigger(v["default"].TEARDOWN_COMPLETE)})):N.trigger(v["default"].TEARDOWN_COMPLETE))},r=0;r<t;r++)e=D[r],function(t){e.session.closed.then(function(){n(t)}),T(e)["catch"](function(){n(t)})}(e);else N.trigger(v["default"].TEARDOWN_COMPLETE)}function r(){return M}function i(){for(var e=[],t=0;t<D.length;t++)e.push(D[t].initData);return e}function a(e){E(e,0)}function s(e){e.mksa.createMediaKeys().then(function(t){M=e.keySystem,C=t,b&&b.setMediaKeys(C),N.trigger(v["default"].INTERNAL_KEY_SYSTEM_SELECTED)})["catch"](function(){N.trigger(v["default"].INTERNAL_KEY_SYSTEM_SELECTED,{error:"Error selecting keys system ("+e.keySystem.systemString+")! Could not create MediaKeys -- TODO"})})}function l(e){b!==e&&(b&&(b.removeEventListener("encrypted",O),b.setMediaKeys(null)),b=e,b&&(b.addEventListener("encrypted",O),C&&b.setMediaKeys(C)))}function d(e){if(!M||!C)throw new Error("Can not set server certificate until you have selected a key system");C.setServerCertificate(e).then(function(){L("DRM: License server certificate successfully updated."),N.trigger(v["default"].SERVER_CERTIFICATE_UPDATED)})["catch"](function(e){N.trigger(v["default"].SERVER_CERTIFICATE_UPDATED,{error:"Error updating server certificate -- "+e.name})})}function g(e,t){if(!M||!C)throw new Error("Can not create sessions until you have selected a key system");var n=C.createSession(t),r=R(n,e,t);n.generateRequest("cenc",e).then(function(){L("DRM: Session created. SessionID = "+r.getSessionID()),N.trigger(v["default"].KEY_SESSION_CREATED,{data:r})})["catch"](function(e){I(r),N.trigger(v["default"].KEY_SESSION_CREATED,{data:null,error:"Error generating key request -- "+e.name})})}function h(e,t){var n=e.session;P.isClearKey(M)&&(t=t.toJWK()),n.update(t)["catch"](function(t){N.trigger(v["default"].KEY_ERROR,{data:new f["default"](e,"Error sending update() message! "+t.name)})})}function m(e){if(!M||!C)throw new Error("Can not load sessions until you have selected a key system");var t=C.createSession();t.load(e).then(function(n){if(n){var r=R(t);L("DRM: Session created. SessionID = "+r.getSessionID()),N.trigger(v["default"].KEY_SESSION_CREATED,{data:r})}else N.trigger(v["default"].KEY_SESSION_CREATED,{data:null,error:"Could not load session! Invalid Session ID ("+e+")"})})["catch"](function(t){N.trigger(v["default"].KEY_SESSION_CREATED,{data:null,error:"Could not load session ("+e+")! "+t.name})})}function _(e){var t=e.session;t.remove().then(function(){L("DRM: Session removed. SessionID = "+e.getSessionID()),N.trigger(v["default"].KEY_SESSION_REMOVED,{data:e.getSessionID()})},function(t){N.trigger(v["default"].KEY_SESSION_REMOVED,{data:null,error:"Error removing session ("+e.getSessionID()+"). "+t.name})})}function y(e){T(e)["catch"](function(t){I(e),N.trigger(v["default"].KEY_SESSION_CLOSED,{data:null,error:"Error closing session ("+e.getSessionID()+") "+t.name})})}function E(e,t){!function(t){var n=e[t].ks,r=e[t].configs;navigator.requestMediaKeySystemAccess(n.systemString,r).then(function(e){var t="function"==typeof e.getConfiguration?e.getConfiguration():null,r=new p["default"](n,t);r.mksa=e,N.trigger(v["default"].KEY_SYSTEM_ACCESS_COMPLETE,{data:r})})["catch"](function(){++t<e.length?E(e,t):N.trigger(v["default"].KEY_SYSTEM_ACCESS_COMPLETE,{error:"Key system access denied!"})})}(t)}function T(e){var t=e.session;return t.removeEventListener("keystatuseschange",e),t.removeEventListener("message",e),t.close()}function S(){return{handleEvent:function(e){switch(e.type){case"encrypted":if(e.initData){var t=ArrayBuffer.isView(e.initData)?e.initData.buffer:e.initData;N.trigger(v["default"].NEED_KEY,{key:new u["default"](t,e.initDataType)})}}}}}function I(e){for(var t=0;t<D.length;t++)if(D[t]===e){D.splice(t,1);break}}function R(e,t,n){var r={session:e,initData:t,handleEvent:function(e){switch(e.type){case"keystatuseschange":N.trigger(v["default"].KEY_STATUSES_CHANGED,{data:this});break;case"message":var t=ArrayBuffer.isView(e.message)?e.message.buffer:e.message;N.trigger(v["default"].INTERNAL_KEY_MESSAGE,{data:new c["default"](this,t,(void 0),e.messageType)})}},getSessionID:function(){return e.sessionId},getExpirationTime:function(){return e.expiration},getKeyStatuses:function(){return e.keyStatuses},getSessionType:function(){return n}};return e.addEventListener("keystatuseschange",r),e.addEventListener("message",r),e.closed.then(function(){I(r),L("DRM: Session closed. SessionID = "+r.getSessionID()),N.trigger(v["default"].KEY_SESSION_CLOSED,{data:r.getSessionID()})}),D.push(r),r}var A,M,b,C,D,O,P,w=this.context,N=e.eventBus,L=e.log;return A={getAllInitData:i,requestKeySystemAccess:a,getKeySystem:r,selectKeySystem:s,setMediaElement:l,setServerCertificate:d,createKeySession:g,updateKeySession:h,loadKeySession:m,removeKeySession:_,closeKeySession:y,reset:n},t(),A}Object.defineProperty(t,"__esModule",{value:!0});var a=n(32),o=r(a),s=n(45),u=r(s),l=n(41),f=r(l),d=n(42),c=r(d),g=n(43),p=r(g),h=n(2),v=r(h),m=n(1),_=r(m);i.__dashjs_factory_name="ProtectionModel_21Jan2015",t["default"]=_["default"].getClassFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){function t(){D=null,O=null,P=null,w=null,N=[],x=(0,o["default"])(R).getInstance(),L=T()}function n(){try{for(var e=0;e<N.length;e++)h(N[e]);D&&D.removeEventListener(b.needkey,L),A.trigger(_["default"].TEARDOWN_COMPLETE)}catch(t){A.trigger(_["default"].TEARDOWN_COMPLETE,{error:"Error tearing down key sessions and MediaKeys! -- "+t.message})}}function r(){return O}function i(){for(var e=[],t=0;t<N.length;t++)e.push(N[t].initData);return e}function a(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[b.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[b.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 p["default"](a,o),g=x.getKeySystemBySystemString(r);A.trigger(_["default"].KEY_SYSTEM_ACCESS_COMPLETE,{data:new v["default"](g,c)});break}}t||A.trigger(_["default"].KEY_SYSTEM_ACCESS_COMPLETE,{error:"Key system access denied! -- No valid audio/video content configurations detected!"})}function s(e){try{P=e.mediaKeys=new window[b.MediaKeys](e.keySystem.systemString),O=e.keySystem,w=e,D&&S(),A.trigger(_["default"].INTERNAL_KEY_SYSTEM_SELECTED)}catch(t){A.trigger(_["default"].INTERNAL_KEY_SYSTEM_SELECTED,{error:"Error selecting keys system ("+O.systemString+")! Could not create MediaKeys -- TODO"})}}function l(e){D!==e&&(D&&D.removeEventListener(b.needkey,L),D=e,D&&(D.addEventListener(b.needkey,L),P&&S()))}function d(e){if(!O||!P||!w)throw new Error("Can not create sessions until you have selected a key system");var t=null;if(null!==w.ksConfiguration.videoCapabilities&&w.ksConfiguration.videoCapabilities.length>0&&(t=w.ksConfiguration.videoCapabilities[0]),null===t&&null!==w.ksConfiguration.audioCapabilities&&w.ksConfiguration.audioCapabilities.length>0&&(t=w.ksConfiguration.audioCapabilities[0]),null===t)throw new Error("Can not create sessions for unknown content types.");var n=t.contentType,r=P.createSession(n,new Uint8Array(e)),i=I(r,e);r.addEventListener(b.error,i),r.addEventListener(b.message,i),r.addEventListener(b.ready,i),r.addEventListener(b.close,i),N.push(i),M("DRM: Session created. SessionID = "+i.getSessionID()),A.trigger(_["default"].KEY_SESSION_CREATED,{data:i})}function g(e,t){var n=e.session;x.isClearKey(O)?n.update(new Uint8Array(t.toJWK())):n.update(new Uint8Array(t))}function h(e){var t=e.session;t.removeEventListener(b.error,e),t.removeEventListener(b.message,e),t.removeEventListener(b.ready,e),t.removeEventListener(b.close,e);for(var n=0;n<N.length;n++)if(N[n]===e){N.splice(n,1);break}t[b.release]()}function m(){}function y(){}function E(){}function T(){return{handleEvent:function(e){switch(e.type){case b.needkey:if(e.initData){var t=ArrayBuffer.isView(e.initData)?e.initData.buffer:e.initData;A.trigger(_["default"].NEED_KEY,{key:new u["default"](t,"cenc")})}}}}}function S(){var e=null,t=function(){D.removeEventListener("loadedmetadata",e),D[b.setMediaKeys](P),A.trigger(_["default"].VIDEO_ELEMENT_SELECTED)};D.readyState>=1?t():(e=t.bind(this),D.addEventListener("loadedmetadata",e))}function I(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 b.error:var t="KeyError";A.trigger(_["default"].KEY_ERROR,{data:new f["default"](this,t)});break;case b.message:var n=ArrayBuffer.isView(e.message)?e.message.buffer:e.message;A.trigger(_["default"].INTERNAL_KEY_MESSAGE,{data:new c["default"](this,n,e.destinationURL)});break;case b.ready:M("DRM: Key added."),A.trigger(_["default"].KEY_ADDED);break;case b.close:M("DRM: Session closed. SessionID = "+this.getSessionID()),A.trigger(_["default"].KEY_SESSION_CLOSED,{data:this.getSessionID()})}}}}var R=this.context,A=e.eventBus,M=e.log,b=e.api,C=void 0,D=void 0,O=void 0,P=void 0,w=void 0,N=void 0,L=void 0,x=void 0;return C={getAllInitData:i,requestKeySystemAccess:a,getKeySystem:r,selectKeySystem:s,setMediaElement:l,createKeySession:d,updateKeySession:g,closeKeySession:h,setServerCertificate:m,loadKeySession:y,removeKeySession:E,reset:n},t(),C}Object.defineProperty(t,"__esModule",{value:!0});var a=n(32),o=r(a),s=n(45),u=r(s),l=n(41),f=r(l),d=n(42),c=r(d),g=n(44),p=r(g),h=n(43),v=r(h),m=n(2),_=r(m),y=n(1),E=r(y);i.__dashjs_factory_name="ProtectionModel_3Feb2014",t["default"]=E["default"].getClassFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(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)}function t(){return"GET"}function n(){return"json"}function r(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 u["default"](t)}function i(e){return String.fromCharCode.apply(null,new Uint8Array(e))}var a=void 0;return a={getServerURLFromMessage:e,getHTTPMethod:t,getResponseType:n,getLicenseMessage:r,getErrorResponse:i}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(65),o=r(a),s=n(64),u=r(s),l=n(1),f=r(l);i.__dashjs_factory_name="ClearKey",t["default"]=f["default"].getSingletonFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(e){return e}function t(){return"POST"}function n(e){return a[e].responseType}function r(e,t){return a[t].getLicenseMessage(e)}function i(e,t){return a[t].getErrorResponse(e)}var a={"com.widevine.alpha":{responseType:"json",getLicenseMessage:function(e){return u["default"].decodeArray(e.license)},getErrorResponse:function(e){return e}},"com.microsoft.playready":{responseType:"arraybuffer",getLicenseMessage:function(e){return e},getErrorResponse:function(e){return String.fromCharCode.apply(null,new Uint8Array(e))}}},o=void 0;return o={getServerURLFromMessage:e,getHTTPMethod:t,getResponseType:n,getLicenseMessage:r,getErrorResponse:i}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),o=r(a),s=n(34),u=r(s);i.__dashjs_factory_name="DRMToday",t["default"]=o["default"].getSingletonFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(e){return e}function t(){return"POST"}function n(){return"arraybuffer"}function r(e){return e}function i(e){return String.fromCharCode.apply(null,new Uint8Array(e))}var a=void 0;return a={getServerURLFromMessage:e,getHTTPMethod:t,getResponseType:n,getLicenseMessage:r,getErrorResponse:i}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),o=r(a);i.__dashjs_factory_name="PlayReady",t["default"]=o["default"].getSingletonFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(e){return e}function t(){return"POST"}function n(){return"arraybuffer"}function r(e){return e}function i(e){return String.fromCharCode.apply(null,new Uint8Array(e))}var a=void 0;return a={getServerURLFromMessage:e,getHTTPMethod:t,getResponseType:n,getLicenseMessage:r,getErrorResponse:i}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),o=r(a);i.__dashjs_factory_name="Widevine",t["default"]=o["default"].getSingletonFactory(i),e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function i(e,t){n(this,i),this.contentType=e,this.robustness=t};t["default"]=r,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){function t(){return u.mediaInfo.streamInfo}function n(){return u.mediaInfo}function r(){return u}function i(){return f}function a(){return u.mediaInfo.streamInfo.manifestInfo}function o(){return l}var s=void 0,u=e.streamProcessor.getCurrentRepresentationInfo(),l=e.streamProcessor,f=e.currentValue;return s={getStreamInfo:t,getMediaInfo:n,getTrackInfo:r,getCurrentValue:i,getManifestInfo:a,getStreamProcessor:o}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),o=r(a);i.__dashjs_factory_name="RulesContext",t["default"]=o["default"].getClassFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(){p={},h={},v=[],m=(0,u["default"])(d).getInstance()}function t(e,t){p[e]=p[e]||{},p[e][t]=p[e][t]||{}}function n(e,t){v[e]=v[e]||[],v[e].push(t)}function r(e,r){var a=e.getMediaInfo(),u=a.type,c=e.getCurrentValue().request,_=(0,o["default"])(d).create(o["default"].NO_CHANGE,o["default"].WEAK,{name:i.__dashjs_factory_name});if(!isNaN(c.index)){t(u,c.index);var y=p[u][c.index];if(null===y||null===c.firstByteDate||h.hasOwnProperty(y.id))return void r(_);if(void 0===y.firstByteTime&&(v[u]=[],y.firstByteTime=c.firstByteDate.getTime(),y.segmentDuration=c.duration,y.bytesTotal=c.bytesTotal,y.id=c.index),y.bytesLoaded=c.bytesLoaded,y.elapsedTime=(new Date).getTime()-y.firstByteTime,y.bytesLoaded>0&&y.elapsedTime>0&&n(u,Math.round(8*y.bytesLoaded/y.elapsedTime)),v[u].length>=f&&y.elapsedTime>l&&y.bytesLoaded<y.bytesTotal){var E=v[u].reduce(function(e,t){return e+t},0);if(y.measuredBandwidthInKbps=Math.round(E/v[u].length),y.estimatedTimeOfDownload=(8*y.bytesTotal/y.measuredBandwidthInKbps/1e3).toFixed(2),y.estimatedTimeOfDownload<y.segmentDuration*s||0===e.getTrackInfo().quality)return void r(_);if(!h.hasOwnProperty(y.id)){var T=e.getStreamProcessor().getABRController(),S=y.bytesTotal-y.bytesLoaded,I=T.getBitrateList(a),R=T.getQualityForBitrate(a,y.measuredBandwidthInKbps*m.getBandwidthSafetyFactor()),A=y.bytesTotal*I[R].bitrate/I[T.getQualityFor(u,a.streamInfo)].bitrate;S>A&&(_.value=R,_.priority=o["default"].STRONG,_.reason.throughput=y.measuredBandwidthInKbps,h[y.id]=y,g("AbandonRequestsRule ( ",u,"frag id",y.id,") is asking to abandon and switch to quality to ",R," measured bandwidth was",y.measuredBandwidthInKbps),delete p[u][y.id])}}else y.bytesLoaded===y.bytesTotal&&delete p[u][y.id]}r(_)}function a(){e()}var s=1.8,l=500,f=5,d=this.context,g=(0,c["default"])(d).getInstance().log,p=void 0,h=void 0,v=void 0,m=void 0,_={execute:r,reset:a};return e(),_}Object.defineProperty(t,"__esModule",{value:!0});var a=n(8),o=r(a),s=n(5),u=r(s),l=n(1),f=r(l),d=n(4),c=r(d);i.__dashjs_factory_name="AbandonRequestsRule",t["default"]=f["default"].getClassFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){function t(){_={},y=(0,u["default"])(d).getInstance()}function n(e,t,n){_[e]={index:t,quality:n}}function r(e,t,n){var r=_[e];return!r||(t!==r.index||n<r.quality)}function a(e,t){var a=e.getMediaInfo(),s=a.type,u=v.getReadOnlyMetricsFor(s),c=e.getCurrentValue(),m=c.request,y=(0,o["default"])(d).create(o["default"].NO_CHANGE,o["default"].WEAK,{name:i.__dashjs_factory_name});if(0===u.BolaState.length)return g("WARNING: executing BolaAbandonRule before initializing BolaRule"),_[s]=null,void t(y);var E=u.BolaState[0]._s,T=m.index,S=m.quality;if(isNaN(T)||0===S||!r(s,T,S)||!m.firstByteDate)return void t(y);var I=Date.now(),R=I-m.firstByteDate.getTime(),A=m.bytesLoaded,M=m.bytesTotal,b=M-A,C=m.duration,D=h.getCurrentBufferLevel(u)?h.getCurrentBufferLevel(u):0,O=D+E.virtualBuffer,P=8*A/(.001*R),w=E.bandwidthSafetyFactor*P,N=.001*(m.firstByteDate.getTime()-m.requestStartDate.getTime());N<.001*f&&(N=.001*f);var L=N+8*M/w,x="";p["default"].BOLA_DEBUG&&(x="index="+T+" quality="+S+" bytesLoaded/bytesTotal="+A+"/"+M+" bufferLevel="+D+" timeSince1stByte="+(R/1e3).toFixed(3)+" estThroughput="+(w/1e6).toFixed(3)+" latency="+N.toFixed(3));var F=M*E.bitrates[0]/E.bitrates[S],U=b-N*w/8;if(U<1&&(U=1),R<l||b<=F||D>E.bufferTarget||U<=F||L<=C)return void t(y);var B=O-N;B<0&&(B=0);for(var k=0;k+1<S&&M*E.bitrates[k+1]/E.bitrates[S]<U;)++k;var j=S;if(E.state===p["default"].BOLA_STATE_STARTUP){j=0;for(var K=0;K<=k&&(F=M*E.bitrates[K]/E.bitrates[S],!(8*F/C>w));++K)j=K}else for(var H=(E.Vp*(E.utilities[S]+E.gp)-B)/U,K=0;K<=k;++K){F=M*E.bitrates[K]/E.bitrates[S];var q=(E.Vp*(E.utilities[K]+E.gp)-B)/F;q>H&&(j=K,H=q)}var Y=E.rebufferSafetyFactor*P*(D-N)/8;if(j===S&&U>Y&&(j=k),j===S)return void t(y);for(;j>0&&(F=M*E.bitrates[j]/E.bitrates[S],!(F<=Y));)--j;E.lastQuality=j,v.updateBolaState(s,E),p["default"].BOLA_DEBUG&&g("BolaDebug "+s+" BolaAbandonRule abandon to "+j+" - "+x),n(s,T,S),y.value=j,y.priority=o["default"].STRONG,y.reason.state=E.state,y.reason.throughput=P,y.reason.bufferLevel=D,y.reason.bytesLoaded=m.bytesLoaded,y.reason.bytesTotal=m.bytesTotal,y.reason.elapsedTimeMs=R,t(y)}function s(){_={}}var l=500,f=200,d=this.context,g=(0,c["default"])(d).getInstance().log,h=e.dashMetrics,v=e.metricsModel,m=void 0,_=void 0,y=void 0;return m={execute:a,reset:s},t(),m}Object.defineProperty(t,"__esModule",{value:!0});var a=n(8),o=r(a),s=n(5),u=r(s),l=n(1),f=r(l),d=n(4),c=r(d),g=n(66),p=r(g);i.__dashjs_factory_name="BolaAbandonRule",t["default"]=f["default"].getClassFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){function t(){g=0,h=(0,u["default"])(s).getInstance()}function n(e,t){var n=(new Date).getTime()/1e3,r=e.getMediaInfo(),a=e.getTrackInfo(),u=r.type,p=isNaN(a.fragmentDuration)?2:a.fragmentDuration/2,v=e.getCurrentValue(),m=e.getStreamProcessor(),_=m.getABRController(),y=d.getReadOnlyMetricsFor(u),E=c.getCurrentBufferLevel(y),T=y.BufferState.length>0?y.BufferState[y.BufferState.length-1]:null,S=!1,I=r.representationCount-1,R=(0,o["default"])(s).create(o["default"].NO_CHANGE,o["default"].WEAK,{name:i.__dashjs_factory_name});return n-g<p||_.getAbandonmentStateFor(u)===f["default"].ABANDON_LOAD?void t(R):(null!==T&&E>T.target&&(S=E-T.target>h.getRichBufferThreshold(),S&&r.representationCount>1&&(R.value=I,R.priority=o["default"].STRONG,R.reason.bufferLevel=E,R.reason.bufferTarget=T.target)),R.value!==o["default"].NO_CHANGE&&R.value!==v&&l("BufferOccupancyRule requesting switch to index: ",R.value,"type: ",u," Priority: ",R.priority===o["default"].DEFAULT?"Default":R.priority===o["default"].STRONG?"Strong":"Weak"),void t(R))}function r(){g=0}var a=void 0,s=this.context,l=(0,p["default"])(s).getInstance().log,d=e.metricsModel,c=e.dashMetrics,g=void 0,h=void 0;return a={execute:n,reset:r},t(),a}Object.defineProperty(t,"__esModule",{value:!0});var a=n(8),o=r(a),s=n(5),u=r(s),l=n(10),f=r(l),d=n(1),c=r(d),g=n(4),p=r(g);i.__dashjs_factory_name="BufferOccupancyRule",t["default"]=c["default"].getClassFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){function t(){m={},_=0,y=1e3,g.on(c["default"].PLAYBACK_SEEKING,a,h)}function n(e,t){var n=(new Date).getTime(),a=e.getMediaInfo().type,s=e.getCurrentValue(),f=p.getReadOnlyMetricsFor(a),c=f.BufferState.length>0?f.BufferState[f.BufferState.length-1]:null,g=(0,o["default"])(l).create(o["default"].NO_CHANGE,o["default"].WEAK,{name:i.__dashjs_factory_name});return n-_<y||null===c?void t(g):(r(a,c.state),c.state===u["default"].BUFFER_EMPTY&&void 0!==m[a].firstBufferLoadedEvent&&(g.value=0,g.priority=o["default"].STRONG,g.reason.bufferState=c.state,g=(0,o["default"])(l).create(0,o["default"].STRONG)),g.value!==o["default"].NO_CHANGE&&g.value!==s&&d("InsufficientBufferRule requesting switch to index: ",g.value,"type: ",a," Priority: ",g.priority===o["default"].DEFAULT?"Default":g.priority===o["default"].STRONG?"Strong":"Weak"),_=n,void t(g))}function r(e,t){m[e]=m[e]||{},m[e].state=t,t!==u["default"].BUFFER_LOADED||m[e].firstBufferLoadedEvent||(m[e].firstBufferLoadedEvent=!0)}function a(){m={}}function s(){g.off(c["default"].PLAYBACK_SEEKING,a,h),m={},_=0}var l=this.context,d=(0,v["default"])(l).getInstance().log,g=(0,f["default"])(l).getInstance(),p=e.metricsModel,h=void 0,m=void 0,_=void 0,y=void 0;return h={execute:n,reset:s},t(),h}Object.defineProperty(t,"__esModule",{value:!0});var a=n(8),o=r(a),s=n(18),u=r(s),l=n(3),f=r(l),d=n(2),c=r(d),g=n(1),p=r(g),h=n(4),v=r(h);i.__dashjs_factory_name="InsufficientBufferRule",t["default"]=p["default"].getClassFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){function t(){A=[],M={audio:{threshold:_,value:NaN},video:{threshold:v,value:NaN}},b=(0,c["default"])(T).getInstance()}function n(e,t){A[e]=A[e]||[],A[e].push(t)}function r(e,t){var n=Math.min(A[e].length,t?p:h),r=A[e].slice(n*-1,A[e].length);return r.length>1&&r.reduce(function(e,t){return(e*E<=t||e>=t*y)&&n++,t}),n=Math.min(A[e].length,n),A[e].slice(n*-1,A[e].length)}function a(e,t){var n=r(e,t),i=0;if(n.length>0){var a=n.reduce(function(e,t){return e+t},0);i=a/n.length}return A[e].length>=d&&A[e].shift(),i/1e3*b.getBandwidthSafetyFactor()}function s(e,t){var r=e.getMediaInfo(),s=r.type,l=e.getCurrentValue(),d=R.getReadOnlyMetricsFor(s),c=e.getStreamProcessor(),p=c.getABRController(),h=c.isDynamic(),v=I.getCurrentHttpRequest(d),m=d.BufferState.length>0?d.BufferState[d.BufferState.length-1]:null,_=(0,o["default"])(T).create(o["default"].NO_CHANGE,o["default"].WEAK,{name:i.__dashjs_factory_name});if(!d||!v||v.type!==g.HTTPRequest.MEDIA_SEGMENT_TYPE||!m)return void t(_);var y=void 0;if(v.trace&&v.trace.length){y=v._tfinish.getTime()-v.tresponse.getTime()+1;var E=v.trace.reduce(function(e,t){return e+t.b[0]},0),A=Math.round(8*E/(y/1e3));y<=M[s].threshold?M[s].value=A/1e3:(M[s].value=NaN,n(s,A))}var b=Math.round(isNaN(M[s].value)?a(s,h):M[s].value);if(p.setAverageThroughput(s,b),p.getAbandonmentStateFor(s)!==f["default"].ABANDON_LOAD){if(m.state===u["default"].BUFFER_LOADED||h){var C=p.getQualityForBitrate(r,b);c.getScheduleController().setTimeToLoadDelay(0),_.value=C,_.priority=o["default"].DEFAULT,_.reason.throughput=b}_.value!==o["default"].NO_CHANGE&&_.value!==l&&S("ThroughputRule requesting switch to index: ",_.value,"type: ",s," Priority: ",_.priority===o["default"].DEFAULT?"Default":_.priority===o["default"].STRONG?"Strong":"Weak","Average throughput",Math.round(b),"kbps")}t(_)}function l(){t()}var d=20,p=3,h=4,v=50,_=5,y=1.3,E=1.3,T=this.context,S=(0,m["default"])(T).getInstance().log,I=e.dashMetrics,R=e.metricsModel,A=void 0,M=void 0,b=void 0,C={execute:s,reset:l};return t(),C}Object.defineProperty(t,"__esModule",{value:!0});var a=n(8),o=r(a),s=n(18),u=r(s),l=n(10),f=r(l),d=n(5),c=r(d),g=n(7),p=n(1),h=r(p),v=n(4),m=r(v);i.__dashjs_factory_name="ThroughputRule",t["default"]=h["default"].getClassFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){function t(e){var t,n=0;return e&&e.some(function(e,t){return n=t,!r.contains(e.serviceLocation)})&&(t=e[n]),t}var n=void 0,r=e.blacklistController;return n={select:t}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),o=r(a);i.__dashjs_factory_name="BasicSelector",t["default"]=o["default"].getClassFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){function t(e){var t=[],n=function(e){return!t.length||!e.dvb_priority||t.indexOf(e.dvb_priority)===-1},r=function(e){return!a.contains(e.serviceLocation)||(e.dvb_priority&&t.push(e.dvb_priority),!1)};return e.filter(r).filter(n)}function n(e){var t,n,r=function(e,t){var n=e.dvb_priority-t.dvb_priority;return isNaN(n)?0:n},i=function(e,t,n){return!t||n[0].dvb_priority&&e.dvb_priority&&n[0].dvb_priority===e.dvb_priority},a=0,o=[],s=0;if(n=e.sort(r).filter(i),n.length)return n.length>1&&(n.forEach(function(e){a+=e.dvb_weight,o.push(a)}),t=Math.floor(Math.random()*(a-1)),o.every(function(e,n){return s=n,!(t<e)})),n[s]}function r(e){return e&&n(t(e))}var i=void 0,a=e.blacklistController;return i={select:r}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),o=r(a);i.__dashjs_factory_name="DVBSelector",t["default"]=o["default"].getClassFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){function t(){f=(0,o["default"])(i).getInstance(),d=(0,u["default"])(i).getInstance()}function n(e,t,n){var i=a.getCurrentBufferLevel(s.getReadOnlyMetricsFor(t));return i<r(e,t,n)}function r(e,t,n){var r=NaN,i=e.getCurrentRepresentationInfo();if("fragmentedText"===t)r=l.getAllTracksAreDisabled()?0:i.fragmentDuration;else if("audio"===t&&n){var o=a.getCurrentBufferLevel(s.getReadOnlyMetricsFor("video"));r=Math.floor(Math.max(o,i.fragmentDuration))}else{var u=i.mediaInfo.streamInfo,d=e.getABRController();if(d.isPlayingAtTopQuality(u)){var c=u.manifestInfo.duration>=f.getLongFormContentDurationThreshold();r=c?f.getBufferTimeAtTopQualityLongForm():f.getBufferTimeAtTopQuality()}else r=f.getStableBufferTime()}return r}var i=this.context,a=e.dashMetrics,s=e.metricsModel,l=e.textSourceBuffer,f=void 0,d=void 0,c={execute:n,getBufferTarget:r};return t(),c}Object.defineProperty(t,"__esModule",{value:!0});var a=n(5),o=r(a),s=n(9),u=r(s),l=n(1),f=r(l);i.__dashjs_factory_name="BufferLevelRule",t["default"]=f["default"].getClassFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){function t(e,t){var n=e.getCurrentRepresentationInfo(),o=n.mediaInfo,u=o.type,l=e.getScheduleController(),f=l.getSeekTarget(),d=!isNaN(f),c=e.getBuffer(),g=d?f:i.getIndexHandlerTime(e);if(isNaN(g)||"fragmentedText"===u&&s.getAllTracksAreDisabled())return null;if(d&&l.setSeekTarget(NaN),c){var p=a.getBufferRange(e.getBuffer(),g);null!==p&&(r("Prior to making a request for time, NextFragmentRequestRule is aligning index handler's currentTime with bufferedRange.end.",g," was changed to ",p.end),g=p.end)}var h=void 0;return t?(g=t.startTime+t.duration/2,h=i.getFragmentRequestForTime(e,n,g,{timeThreshold:0,ignoreIsFinished:!0})):(h=i.getFragmentRequestForTime(e,n,g,{keepIdx:!d}),h&&e.getFragmentModel().isFragmentLoaded(h)&&(h=i.getNextFragmentRequest(e,n)),h&&(i.setIndexHandlerTime(e,h.startTime+h.duration),h.delayLoadingTime=(new Date).getTime()+l.getTimeToLoadDelay(),l.setTimeToLoadDelay(0))),h}var n=this.context,r=(0,o["default"])(n).getInstance().log,i=e.adapter,a=e.sourceBufferController,s=e.textSourceBuffer,u={execute:t};return u}Object.defineProperty(t,"__esModule",{value:!0});var a=n(4),o=r(a),s=n(1),u=r(s);i.__dashjs_factory_name="NextFragmentRequestRule",
37
- t["default"]=u["default"].getClassFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){function t(){m=NaN,_=null,y=NaN,E=null,T=!1,S=NaN,I=o["default"].DEFAULT}function n(e,t){var n,r;if(R=t,M=e.getStreamProcessor(),A=M.getFragmentLoader(),E=e.getTrackInfo(),S=E.fragmentDuration,r=E.DVRWindow,m=r.end,E.useCalculatedLiveEdgeTime){var u=h.getExpectedLiveEdge();return h.setExpectedLiveEdge(m),void R((0,o["default"])(d).create(u,I))}_={start:Math.max(0,m-g),end:m+g},y=Math.floor((r.end-r.start)/2),n=p.getFragmentRequestForTime(M,E,m,{ignoreIsFinished:!0}),i(m,s,a,n)}function r(){m=NaN,_=null,y=NaN,E=null,T=!1,S=NaN,M=null,A=null}function i(e,t,n,r){var a;if(null===r)a=p.generateFragmentRequestForTime(M,E,e),i(e,t,n,a);else{var o=function s(r){c.off(f["default"].CHECK_FOR_EXISTENCE_COMPLETED,s,this),r.exists?t(r.request,e):n(r.request,e)};c.on(f["default"].CHECK_FOR_EXISTENCE_COMPLETED,o,this),A.checkForExistence(r)}}function a(e,t){var n,r,u;return T?void l(!1,t):(u=t-m,n=u>0?m-u:m+Math.abs(u)+y,void(n<_.start&&n>_.end?R((0,o["default"])(d).create(null,I)):(r=p.getFragmentRequestForTime(M,E,n,{ignoreIsFinished:!0}),i(n,s,a,r))))}function s(e,t){var n,r,a=e.startTime;if(!T){if(!E.fragmentDuration)return void R((0,o["default"])(d).create(a,I));if(T=!0,_.end=a+2*y,t===m)return r=t+S,n=p.getFragmentRequestForTime(M,E,r,{ignoreIsFinished:!0}),void i(r,function(){l(!0,r)},function(){R((0,o["default"])(d).create(r,I))},n)}l(!0,t)}function l(e,t){var n,r,u;e?_.start=t:_.end=t,n=Math.floor(_.end-_.start)<=S,n?R((0,o["default"])(d).create(e?t:t-S,I)):(u=(_.start+_.end)/2,r=p.getFragmentRequestForTime(M,E,u,{ignoreIsFinished:!0}),i(u,s,a,r))}var d=this.context,c=(0,u["default"])(d).getInstance(),p=e.adapter,h=e.timelineConverter,v=void 0,m=void 0,_=void 0,y=void 0,E=void 0,T=void 0,S=void 0,I=void 0,R=void 0,A=void 0,M=void 0;return v={execute:n,reset:r},t(),v}Object.defineProperty(t,"__esModule",{value:!0});var a=n(8),o=r(a),s=n(3),u=r(s),l=n(2),f=r(l),d=n(1),c=r(d),g=43200;i.__dashjs_factory_name="LiveEdgeBinarySearchRule",t["default"]=c["default"].getClassFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){function t(e,t){var n=e.getTrackInfo(),a=n.DVRWindow.end,s=o["default"].DEFAULT;if(n.useCalculatedLiveEdgeTime){var u=i.getExpectedLiveEdge();i.setExpectedLiveEdge(a),t((0,o["default"])(r).create(u,s))}else t((0,o["default"])(r).create(a,s))}var n=void 0,r=this.context,i=e.timelineConverter;return n={execute:t}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(8),o=r(a),s=n(1),u=r(s);i.__dashjs_factory_name="LiveEdgeWithTimeSynchronizationRule",t["default"]=u["default"].getClassFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(){d=(0,c["default"])(i).create({updateEventName:u["default"].SERVICE_LOCATION_BLACKLIST_CHANGED,loadFailedEventName:u["default"].FRAGMENT_LOADING_COMPLETED}),g=(0,v["default"])(i).create({blacklistController:d}),h=(0,p["default"])(i).create({blacklistController:d}),m=g}function t(e){m=s.getIsDVB(e)?h:g}function n(e){var t=e.baseUrls,n=e.selectedIdx;if(!isNaN(n))return t[n];var r=m.select(t);return r?(e.selectedIdx=t.indexOf(r),r):void a.trigger(u["default"].URL_RESOLUTION_FAILED,{error:new Error(y,E)})}function r(){d.reset()}var i=this.context,a=(0,o["default"])(i).getInstance(),s=(0,f["default"])(i).getInstance(),l=void 0,d=void 0,g=void 0,h=void 0,m=void 0;return l={chooseSelectorFromManifest:t,select:n,reset:r},e(),l}Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),o=r(a),s=n(2),u=r(s),l=n(12),f=r(l),d=n(105),c=r(d),g=n(153),p=r(g),h=n(152),v=r(h),m=n(1),_=r(m),y=1,E="Failed to resolve a valid URL";i.__dashjs_factory_name="BaseURLSelector";var T=_["default"].getClassFactory(i);T.URL_RESOLUTION_FAILED_GENERIC_ERROR_CODE=y,T.URL_RESOLUTION_FAILED_GENERIC_ERROR_MESSAGE=E,t["default"]=T,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(){o=!1}function t(){var e="WebKitMediaSource"in window,t="MediaSource"in window;return e||t}function n(){return o}function r(e){o=e}function i(e,t){var n=e.canPlayType(t);return"probably"===n||"maybe"===n}var a=void 0,o=void 0;return a={supportsMediaSource:t,supportsEncryptedMedia:n,supportsCodec:i,setEncryptedMediaSupported:r},e(),a}Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),o=r(a);i.__dashjs_factory_name="Capabilities",t["default"]=o["default"].getSingletonFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){function t(){return p}function n(e){p=e}function r(e,t){var n=!0,r=0,i=void 0,a=void 0;if(void 0===t&&(t=!1),e.tag>16777215?(g.getUint32(p)!==e.tag&&(n=!1),r=4):e.tag>65535?(i=g.getUint16(p),a=g.getUint8(p+2),256*i+a!==e.tag&&(n=!1),r=3):e.tag>255?(g.getUint16(p)!==e.tag&&(n=!1),r=2):(g.getUint8(p)!==e.tag&&(n=!1),r=1),!n&&e.required&&!t)throw new u["default"]("required tag not found");return n&&(p+=r),n}function i(e,t){var n=r(e,t);return n&&s(),n}function a(e){var t=void 0;return r(e),t=s(),c[e.parse](t)}function o(e,t){var n=r(e,t),i=void 0;return n&&(i=s(),p+=i),n}function s(e){var t=1,n=128,r=8,i=-1,a=0,o=g.getUint8(p),s=void 0;for(s=0;s<r;s+=1){if((o&n)===n){a=void 0===e?o&~n:o,i=s;break}n>>=1}for(s=0;s<i;s+=1,t+=1)a=a<<8|255&g.getUint8(p+t);return p+=t,a}function l(e){var t=void 0;switch(e){case 4:t=g.getFloat32(p),p+=4;break;case 8:t=g.getFloat64(p),p+=8}return t}function f(e){var t=0,n=void 0;for(n=0;n<e;n+=1)t<<=8,t|=255&g.getUint8(p+n);return p+=e,t}function d(){return p<g.byteLength}var c=void 0,g=new DataView(e.data),p=0;return c={getPos:t,setPos:n,consumeTag:r,consumeTagAndSize:i,parseTag:a,skipOverElement:o,getMatroskaCodedNum:s,getMatroskaFloat:l,getMatroskaUint:f,moreData:d}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),o=r(a),s=n(6),u=r(s);i.__dashjs_factory_name="EBMLParser",t["default"]=o["default"].getClassFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(e){return e&&f&&f.boxes&&0!==f.boxes.length?u(f.fetch(e)):null}function t(e){for(var t,n=f.fetchAll(e),r=[],i=0,a=n.length;i<a;i++)t=u(n[i]),t&&r.push(t);return r}function n(e){f=e}function r(){if(!f||!f.boxes||!f.boxes.length)return null;var e=f.boxes[f.boxes.length-1].type,n=t(e);return n[n.length-1]}function i(){return f._cursor.offset}function a(){d={offset:"_offset",size:"size",type:"type"},c={references:"references",timescale:"timescale",earliest_presentation_time:"earliest_presentation_time",first_offset:"first_offset"},g={reference_type:"reference_type",referenced_size:"referenced_size",subsegment_duration:"subsegment_duration"},p={id:"id",value:"value",timescale:"timescale",scheme_id_uri:"scheme_id_uri",presentation_time_delta:"presentation_time_delta",event_duration:"event_duration",message_data:"message_data"},h={timescale:"timescale"},v={sequence_number:"sequence_number"},m={base_data_offset:"base_data_offset",sample_description_index:"sample_description_index",default_sample_duration:"default_sample_duration",default_sample_size:"default_sample_size",default_sample_flags:"default_sample_flags",flags:"flags"},_={version:"version",baseMediaDecodeTime:"baseMediaDecodeTime",flags:"flags"},y={sample_count:"sample_count",first_sample_flags:"first_sample_flags",data_offset:"data_offset",flags:"flags",samples:"samples"},E={sample_size:"sample_size",sample_duration:"sample_duration",sample_composition_time_offset:"sample_composition_time_offset"}}function s(e,t,n){for(var r in n)t[r]=e[n[r]]}function u(e){if(!e)return null;var t,n,r=new o["default"];switch(s(e,r,d),e.hasOwnProperty("_incomplete")&&(r.isComplete=!e._incomplete),r.type){case"sidx":if(s(e,r,c),r.references)for(t=0,n=r.references.length;t<n;t++)s(e.references[t],r.references[t],g);break;case"emsg":s(e,r,p);break;case"mdhd":s(e,r,h);break;case"mfhd":s(e,r,v);break;case"tfhd":s(e,r,m);break;case"tfdt":s(e,r,_);break;case"trun":if(s(e,r,y),r.samples)for(t=0,n=r.samples.length;t<n;t++)s(e.samples[t],r.samples[t],E)}return r}var l=void 0,f=void 0,d=void 0,c=void 0,g=void 0,p=void 0,h=void 0,v=void 0,m=void 0,_=void 0,y=void 0,E=void 0;return l={getBox:e,getBoxes:t,setData:n,getLastBox:r,getOffset:i},a(),l}Object.defineProperty(t,"__esModule",{value:!0});var a=n(168),o=r(a),s=n(1),u=r(s);i.__dashjs_factory_name="IsoFile",t["default"]=u["default"].getClassFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(e,t){return JSON.stringify(e)===JSON.stringify(t)}var t=void 0;return t={areSimpleEquivalent:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),o=r(a);i.__dashjs_factory_name="ObjectUtils",t["default"]=o["default"].getSingletonFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(e){e&&e.videoModel&&(ne=e.videoModel)}function t(e){if(e.hasOwnProperty("begin")&&e.hasOwnProperty("end")){var t=h(e.begin),n=h(e.end);return[t,n]}return null}function n(){var e="cue_TTML_"+re;return re++,e}function r(e,t,n){function r(e,t){if(e.hasOwnProperty(t)){var n=e[t];a.indexOf(n)<0&&a.push(n)}}for(var i=[],a=[],o=[],s=0;s<e.length;s++){var u=e[s];r(u,"begin"),r(u,"end")}if(0===a.length)return o;if("undefined"!=typeof t&&"undefined"!=typeof n){for(var s=0;s<a.length;s++){var l=h(a[s]);t<l&&l<n&&i.push(l)}i.push(t),i.push(n)}else for(var s=0;s<a.length;s++)i.push(h(a[s]));i.sort(function(e,t){return e-t});for(var s=0;s<i.length-1;s++)o.push([i[s],i[s+1]]);return o}function i(e,t){return"undefined"!=typeof startInterval&&e<t&&(e=t),e}function o(e,t){return"undefined"!=typeof t&&e>t&&(e=t),e}function s(e,t,n){var r=h(e.begin),a=h(e.end);return r=i(r,t),a=o(a,n),"undefined"!=typeof t&&"undefined"!=typeof n&&(a<t||r>n)?(B("TTML: Cue "+r+"-"+a+" outside interval "+t+"-"+n),null):[r,a]}function u(e,n){var r=!0;if(e.hasOwnProperty("span")){var i=t(e.span);null!==i&&(r=i[0]<n[1]&&i[1]>n[0])}return r}function f(e,i,a){var o=void 0,f=void 0,d=void 0,c=void 0,g=void 0,p="",h=new l["default"]([],"",(!1));if(K=h.xml_str2json(e),!K)throw new Error("TTML document could not be parsed");if(ne.getTTMLRenderingDiv()&&(g="html"),o=K.tt,!o)throw new Error("TTML document lacks tt element");var _=v(o,"http://www.w3.org/ns/ttml");if(_&&m(o,_),c=o["tts:extent"],f=o.head,!f)throw new Error("TTML document lacks head element");if(f.layout&&(q=f.layout.region_asArray),f.styling&&(H=f.styling.style_asArray),d=o.body,!d)throw new Error("TTML document lacks body element");var y=P(),I=ne.getElement().clientWidth,R=ne.getElement().clientHeight,A=[I/y[0],R/y[1]];W["font-size"]=A[1]+"px;";var M=[];if(q)for(var O=0;O<q.length;O++)M.push(C(JSON.parse(JSON.stringify(q[O])),A));var F=v(K.tt,"http://www.w3.org/ns/ttml#parameter");o.hasOwnProperty(F+":frameRate")&&(o.frameRate=parseInt(o[F+":frameRate"],10));for(var U=[],k=o.body_asArray[0].__children,j=0;j<k.length;j++){var z=k[j].div,Q=null;if(null===(Q=t(z))){var X=z.p_asArray;if(null===Q&&(!X||0===X.length))return p="TTML has div that contains no timing and no paragraphs.",B(p),U;for(var Z=0;Z<X.length;Z++){var J=X[Z],$=J.span_asArray,ee=[];if(J.hasOwnProperty("begin")&&J.hasOwnProperty("end")){var te=s(J,i,a);null!==te&&ee.push(te)}else ee=r($,i,a);if(0!==ee.length)for(var re=J.__children,ie=0;ie<ee.length;ie++){for(var ae=ee[ie],oe=[],se=0;se<re.length;se++){var ue=re[se];u(ue,ae)&&oe.push(ue)}if(0!==oe.length)if("html"===g){G={},V={},Y={};var le=L(J,z,A),fe=x(J,A),de=fe[1];fe=fe[0];var ce=document.createElement("div");ce.className=de;var ge=N(oe,A);ge.className="cueDirUniWrapper",E("unicode-bidi",fe)&&(ge.style.cssText+=T("unicode-bidi",fe),S("unicode-bidi",fe)),E("direction",fe)&&(ge.style.cssText+=T("direction",fe),S("direction",fe)),E("padding-left",fe)&&E("padding-right",fe)&&(ge.innerHTML=w(ge,fe)),E("padding-left",fe)&&E("padding-right",fe)&&(S("padding-left",fe),S("padding-right",fe));var pe="";if(E("regionID",le)){var he=T("regionID",le);pe=he.slice(he.indexOf(":")+1,he.length-1)}fe&&(ce.style.cssText=fe.join(" ")+"display:flex;"),le&&(le=le.join(" ")),ce.appendChild(ge);var ve=document.createElement("div");ve.appendChild(ce),ve.id=n(),ve.style.cssText="position: absolute; margin: 0; display: flex; box-sizing: border-box; pointer-events: none;"+le,0===Object.keys(Y).length&&(Y.defaultFontSize="100"),U.push({start:ae[0],end:ae[1],type:"html",cueHTMLElement:ve,regions:M,regionID:pe,cueID:ve.id,videoHeight:R,videoWidth:I,cellResolution:y,fontSize:Y||{defaultFontSize:"100"},lineHeight:G,linePadding:V})}else{var me="",_e=oe;_e.length&&_e.forEach(function(e){if(e.hasOwnProperty("span")){var t=e.span.__children;t.forEach(function(e){t.hasOwnProperty("metadata")||(e.hasOwnProperty("#text")?me+=e["#text"].replace(/[\r\n]+/gm," ").trim():"br"in e&&(me+="\n"))})}else me+=e.hasOwnProperty("br")?"\n":e["#text"].replace(/[\r\n]+/gm," ").trim()}),U.push({start:ae[0],end:ae[1],data:me,type:"text"})}}else p="TTML: Empty paragraph"}}else{var ye=void 0;if(z.region){var Ee=D(q,z.region);ye=b(Ee,c)}ye||(ye=b(z,c));var Te=o.head.metadata.image_asArray;if(void 0!==z["smpte:backgroundImage"])for(var Se=0;Se<Te.length;Se++)"#"+Te[Se]["xml:id"]===z["smpte:backgroundImage"]&&U.push({start:Q[0],end:Q[1],id:n(),data:"data:image/"+Te[Se].imagetype.toLowerCase()+";base64, "+Te[Se].__text,type:"image",layout:ye})}}if(""!==p&&B(p),U.length>0)return U;throw new Error(p)}function p(){j=/^([0-9][0-9]+):([0-5][0-9]):([0-5][0-9])|(60)(\.([0-9])+)?#x2F;,Y={},G={},V={},z={top:"auto;",left:"auto;",width:"90%;",height:"10%;","align-items":"flex-start;",overflow:"visible;","-ms-writing-mode":"lr-tb, horizontal-tb;","-webkit-writing-mode":"horizontal-tb;","-moz-writing-mode":"horizontal-tb;","writing-mode":"horizontal-tb;"},W={color:"rgb(255,255,255);",direction:"ltr;","font-family":"monospace, sans-serif;","font-style":"normal;","line-height":"normal;","font-weight":"normal;","text-align":"start;","justify-content":"flex-start;","text-decoration":"none;","unicode-bidi":"normal;","white-space":"normal;",width:"100%;"},Q={monospace:"font-family: monospace;",sansSerif:"font-family: sans-serif;",serif:"font-family: serif;",monospaceSansSerif:"font-family: monospace, sans-serif;",monospaceSerif:"font-family: monospace, serif;",proportionalSansSerif:"font-family: Arial;",proportionalSerif:"font-family: Times New Roman;","default":"font-family: monospace, sans-serif;"},X={right:["justify-content: flex-end;","text-align: right;"],start:["justify-content: flex-start;","text-align: start;"],center:["justify-content: center;","text-align: center;"],end:["justify-content: flex-end;","text-align: end;"],left:["justify-content: flex-start;","text-align: left;"]},Z={start:"text-align: start;",center:"text-align: center;",end:"text-align: end;",auto:""},J={wrap:"white-space: normal;",noWrap:"white-space: nowrap;"},$={normal:"unicode-bidi: normal;",embed:"unicode-bidi: embed;",bidiOverride:"unicode-bidi: bidi-override;"},ee={before:"align-items: flex-start;",center:"align-items: center;",after:"align-items: flex-end;"},te={lrtb:"-webkit-writing-mode: horizontal-tb;writing-mode: horizontal-tb;",rltb:"-webkit-writing-mode: horizontal-tb;writing-mode: horizontal-tb;direction: rtl;unicode-bidi: bidi-override;",tbrl:"-webkit-writing-mode: vertical-rl;writing-mode: vertical-rl;-webkit-text-orientation: upright;text-orientation: upright;",tblr:"-webkit-writing-mode: vertical-lr;writing-mode: vertical-lr;-webkit-text-orientation: upright;text-orientation: upright;",lr:"-webkit-writing-mode: horizontal-tb;writing-mode: horizontal-tb;",rl:"-webkit-writing-mode: horizontal-tb;writing-mode: horizontal-tb;direction: rtl;",tb:"-webkit-writing-mode: vertical-rl;writing-mode: vertical-rl;-webkit-text-orientation: upright;text-orientation: upright;"}}function h(e){var t,n,r,i=j.test(e);if(!i)return NaN;if(t=e.split(":"),n=parseFloat(t[0])*c+parseFloat(t[1])*g+parseFloat(t[2]),t[3]){if(r=K.tt.frameRate,!r||isNaN(r))return NaN;n+=parseFloat(t[3])/r}return n}function v(e,t){var n=Object.keys(e).filter(function(n){return("xmlns"===n.split(":")[0]||"xmlns"===n.split(":")[1])&&e[n]===t}).map(function(e){return e.split(":")[2]||e.split(":")[1]});return 1!=n.length?null:n[0]}function m(e,t){for(var n in e)if(e.hasOwnProperty(n)){if(("object"===a(e[n])||e[n]instanceof Object)&&!Array.isArray(e[n]))m(e[n],t);else if(Array.isArray(e[n]))for(var r=0;r<e[n].length;r++)m(e[n][r],t);var i=n.slice(n.indexOf(t)+t.length+1);e[i]=e[n],delete e[n]}}function _(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function y(e){var t=e.slice(1),n=t.match(/.{2}/g),r=parseFloat(parseInt(parseInt(n[3],16)/255*1e3,10)/1e3),i=n.slice(0,3).map(function(e){return parseInt(e,16)});return"rgba("+i.join(",")+","+r+");"}function E(e,t){for(var n=0;n<t.length;n++)if(t[n].indexOf(e)>-1)return!0;return!1}function T(e,t){for(var n=0;n<t.length;n++)if(t[n].indexOf(e)>-1)return t[n];return null}function S(e,t){t.splice(t.indexOf(T(e,t)),1)}function I(e,t){for(var n=0;n<e.length;n++)for(var r=0;r<t.length;r++)e[n]&&e[n].split(":")[0].indexOf(t[r].split(":")[0])>-1&&e.splice(n,1);return e.concat(t)}function R(e,t,n){var r=[];for(var i in e)if(e.hasOwnProperty(i)){var a=i.replace("ebutts:","");a=a.replace("xml:",""),a=a.replace("tts:",""),a=_(a),e[a]=e[i],delete e[i]}if("line-padding"in e){var o=parseFloat(e["line-padding"].slice(e["line-padding"].indexOf(":")+1,e["line-padding"].indexOf("c")));"id"in e&&(V[e.id]=o);var s=o*t[0]+"px;";r.push("padding-left:"+s),r.push("padding-right:"+s)}if("font-size"in e){var u=parseFloat(e["font-size"].slice(e["font-size"].indexOf(":")+1,e["font-size"].indexOf("%")));"id"in e&&(Y[e.id]=u);var l=u/100*t[1]+"px;";r.push("font-size:"+l)}if("line-height"in e)if("normal"===e["line-height"])r.push("line-height: normal;");else{var f=parseFloat(e["line-height"].slice(e["line-height"].indexOf(":")+1,e["line-height"].indexOf("%")));"id"in e&&(G[e.id]=f);var d=f/100*t[1]+"px;";r.push("line-height:"+d)}"font-family"in e&&(e["font-family"]in Q?r.push(Q[e["font-family"]]):r.push("font-family:"+e["font-family"]+";")),"text-align"in e&&e["text-align"]in X&&(r.push(X[e["text-align"]][0]),r.push(X[e["text-align"]][1])),"multi-row-align"in e&&(E("text-align",r)&&"auto"!=e["multi-row-align"]&&S("text-align",r),e["multi-row-align"]in Z&&r.push(Z[e["multi-row-align"]]));var c;return"background-color"in e&&(e["background-color"].indexOf("#")>-1&&e["background-color"].length-1===8?(c=y(e["background-color"]),r.push("background-color: "+c)):r.push("background-color:"+e["background-color"]+";")),"color"in e&&(e.color.indexOf("#")>-1&&e.color.length-1===8?(c=y(e.color),r.push("color: "+c)):r.push("color:"+e.color+";")),"wrap-option"in e&&(e["wrap-option"]in J?r.push(J[e["wrap-option"]]):r.push("white-space:"+e["wrap-option"])),"unicode-bidi"in e&&(e["unicode-bidi"]in $?r.push($[e["unicode-bidi"]]):r.push("unicode-bidi:"+e["unicode-bidi"])),"font-style"in e&&r.push("font-style:"+e["font-style"]+";"),"font-weight"in e&&r.push("font-weight:"+e["font-weight"]+";"),"direction"in e&&r.push("direction:"+e.direction+";"),"text-decoration"in e&&r.push("text-decoration:"+e["text-decoration"]+";"),n&&(r=r.concat(C(e,t))),K.tt.hasOwnProperty("xml:space")&&"preserve"===K.tt["xml:space"]&&r.push("white-space: pre;"),r}function A(e,t){for(var n=0;n<e.length;n++){var r=e[n];if(r["xml:id"]===t||r.id===t)return r}return null}function M(e,t,n){var r=[],i=e.match(/\S+/g);return i.forEach(function(e){var i=A(H,e);if(i){var a=R(JSON.parse(JSON.stringify(i)),t,n);r=r.concat(a)}}),r}function b(e,t){var n=/([\d\.]+)(%|px)\s+([\d\.]+)(%|px)/;if("tts:extent"in e&&"tts:origin"in e){var r=n.exec(e["tts:extent"]),i=n.exec(e["tts:origin"]);if(null===r||null===i)return B("Bad extent or origin: "+e["tts:extent"]+" "+e["tts:origin"]),null;var a=parseFloat(r[1]),o=parseFloat(r[3]),s=parseFloat(i[1]),u=parseFloat(i[3]);if(t){var l=n.exec(t);if(null===l||"px"!==l[2]||"px"!==l[4])return B("Bad tt.extent: "+t),null;var f=parseFloat(l[1]),d=parseFloat(l[3]);"px"===r[2]&&(a=a/f*100),"px"===r[4]&&(o=o/d*100),"px"===i[2]&&(s=s/f*100),"px"===i[4]&&(u=u/d*100)}return{left:s,top:u,width:a,height:o}}return null}function C(e,t){var n=[];for(var r in e){var i=r.replace("tts:","");i=i.replace("xml:",""),i=_(i),e[i]=e[r],i!==r&&delete e[r]}if("extent"in e){var a=e.extent.split(/\s/);n.push("width: "+a[0]+";"),n.push("height: "+a[1]+";")}if("origin"in e){var o=e.origin.split(/\s/);n.push("left: "+o[0]+";"),n.push("top: "+o[1]+";")}if("display-align"in e&&n.push(ee[e["display-align"]]),"writing-mode"in e&&n.push(te[e["writing-mode"]]),"style"in e){var s=M(e.style,t,!0);n=n.concat(s)}return"padding"in e&&n.push("padding:"+e.padding+";"),"overflow"in e&&n.push("overflow:"+e.overflow+";"),"show-background"in e&&n.push("show-background:"+e["show-background"]+";"),"id"in e&&n.push("regionID:"+e.id+";"),n}function D(e,t){for(var n=0;n<e.length;n++){var r=e[n];if(r["xml:id"]===t||r.id===t)return r}return null}function O(e,t){var n=[],r=e.match(/\S+/g);return r.forEach(function(e){var r=D(q,e);if(r){var i=C(JSON.parse(JSON.stringify(r)),t);n=n.concat(i)}}),n}function P(){var e=[32,15];return K.tt.hasOwnProperty("ttp:cellResolution")?K.tt["ttp:cellResolution"].split(" ").map(parseFloat):e}function w(e,t){for(var n=T("padding-left",t),r=T("padding-right",t),i=n.concat(" "+r+" "),a="",o="",s="",u=Array.prototype.slice.call(e.children),l=e.getElementsByClassName("lineBreak")[0],f=u.indexOf(l),d=[];f!=-1;)d.push(f),f=u.indexOf(l,f+1);var c="</span>",g="<br>",p='<span class="spanPadding" style="-webkit-box-decoration-break: clone; box-decoration-break: clone; ';if(d.length)d.forEach(function(e,t){if(0===t){for(var n="",r=0;r<e;r++)a+=u[r].outerHTML,0===r&&(n=i.concat(u[r].style.cssText));a=p+n+'">'+a}for(var l="",f=e+1;f<u.length;f++)o+=u[f].outerHTML,f===u.length-1&&(l+=i.concat(u[f].style.cssText));o=p+l+'">'+o,a&&o&&t===d.length-1?s+=a+c+g+o+c:a&&o&&t!==d.length-1?s+=a+c+g+o+c+g:a&&!o?s+=a+c:!a&&o&&t===d.length-1?s+=o+c:!a&&o&&t!==d.length-1&&(s+=o+c+g)});else{for(var h="",v=0;v<u.length;v++)h+=u[v].style.cssText;s=p+i+h+'">'+e.innerHTML+c}return s}function N(e,t){var n=document.createElement("div");return e.forEach(function(e){if(!e.hasOwnProperty("metadata"))if(e.hasOwnProperty("span")){var r=e.span.__children,i=document.createElement("span");if(e.span.hasOwnProperty("style")){var a=M(e.span.style,t);i.className="spanPadding "+e.span.style,i.style.cssText=a.join(" ")}r.forEach(function(e){if(!r.hasOwnProperty("metadata"))if(e.hasOwnProperty("#text")){var t=document.createTextNode(e["#text"]);i.appendChild(t)}else if("br"in e){i.hasChildNodes()&&n.appendChild(i);var a=document.createElement("br");a.className="lineBreak",n.appendChild(a);var o=document.createElement("span");o.className=i.className,o.style.cssText=i.style.cssText,i=o}}),n.appendChild(i)}else if(e.hasOwnProperty("br")){var o=document.createElement("br");o.className="lineBreak",n.appendChild(o)}else if(e.hasOwnProperty("#text")){var s=document.createElement("span");s.textContent=e["#text"],n.appendChild(s)}}),n}function L(e,t,n){var r,i,a=[],o=e.region,s=t.region;return s&&(r=O(s,n)),o?(i=a.concat(O(o,n)),a=r?I(r,i):i):r&&(a=r),F(a,z),a}function x(e,t){var n,r,i,a=[],o=e.style,s=K.tt.body.style,u=K.tt.body.div.style,l="";return s&&(n=M(s,t),l="paragraph "+s),u&&(r=M(u,t),n?(r=I(n,r),l+=" "+u):l="paragraph "+u),o?(i=M(o,t),n&&r?(a=I(r,i),l+=" "+o):n?(a=I(n,i),l+=" "+o):r?(a=I(r,i),l+=" "+o):(a=i,l="paragraph "+o)):n&&!r?a=n:!n&&r&&(a=r),F(a,W),[a,l]}function F(e,t){for(var n in t)t.hasOwnProperty(n)&&(E(n,e)||e.push(n+":"+t[n]))}var U=this.context,B=(0,d["default"])(U).getInstance().log,k=void 0,j=void 0,K=void 0,H=void 0,q=void 0,Y=void 0,G=void 0,V=void 0,z=void 0,W=void 0,Q=void 0,X=void 0,Z=void 0,J=void 0,$=void 0,ee=void 0,te=void 0,ne=void 0,re=0;return k={parse:f,setConfig:e},p(),k}var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};Object.defineProperty(t,"__esModule",{value:!0});var o=n(1),s=r(o),u=n(35),l=r(u),f=n(4),d=r(f),c=3600,g=60;i.__dashjs_factory_name="TTMLParser",t["default"]=s["default"].getSingletonFactory(i),e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(){f=/(?:\r\n|\r|\n)/gm,d=/-->/,c=/(^[\s]+|[\s]+$)/g,g=/\s\b/g}function t(e){var t,i,o=[];e=e.split(f),t=e.length,i=-1;for(var u=0;u<t;u++){var l=e[u];if(l.length>0&&"WEBVTT"!==l&&l.match(d)){var g=r(l),p=g.cuePoints,h=g.styles,v=a(e,u+1),m=n(p[0].replace(c,"")),_=n(p[1].replace(c,""));!isNaN(m)&&!isNaN(_)&&m>=i&&_>m?""!==v?(i=m,o.push({start:m,end:_,data:v,styles:h})):s("Skipping cue due to empty/malformed cue text"):s("Skipping cue due to incorrect cue timing")}}return o}function n(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 r(e){var t=e.split(d),n=t[1].split(g);return n.shift(),t[1]=n[0],n.shift(),{cuePoints:t,styles:i(n)}}function i(e){var t={};return e.forEach(function(e){if(e.split(/:/).length>1){var n=e.split(/:/)[1];n&&n.search(/%/)!=-1&&(n=parseInt(n.replace(/%/,""),10)),(e.match(/align/)||e.match(/A/))&&(t.align=n),(e.match(/line/)||e.match(/L/))&&(t.line=n),(e.match(/position/)||e.match(/P/))&&(t.position=n),(e.match(/size/)||e.match(/S/))&&(t.size=n)}}),t}function a(e,t){for(var n,r=t,i="",a="";""!==e[r]&&r<e.length;)r++;if(n=r-t,n>1)for(var o=0;o<n;o++){if(a=e[t+o],a.match(d)){i="";break}i+=a,o!==n-1&&(i+="\n")}else a=e[t],a.match(d)||(i=a);return decodeURI(i)}var o=this.context,s=(0,u["default"])(o).getInstance().log,l=void 0,f=void 0,d=void 0,c=void 0,g=void 0;return l={parse:t},e(),l}Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),o=r(a),s=n(4),u=r(s);i.__dashjs_factory_name="VTTParser",t["default"]=o["default"].getSingletonFactory(i),e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function i(){n(this,i),this.mediaType=null,this.bitrate=null,this.width=null,this.height=null,this.qualityIndex=NaN};t["default"]=r,e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function i(){n(this,i),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};t["default"]=r,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof t?"undefined":o(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)}var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};Object.defineProperty(t,"__esModule",{value:!0});var s=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}},u=n(23),l=r(u),f=function(e){function t(e){i(this,t),s(Object.getPrototypeOf(t.prototype),"constructor",this).call(this),this.url=e||null,this.checkForExistenceOnly=!0}return a(t,e),t}(l["default"]);t["default"]=f,e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function i(){n(this,i),this.offset=NaN,this.type=null,this.size=NaN,this.isComplete=!0};t["default"]=r,e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function i(){n(this,i),this.DVRWindowSize=NaN,this.loadedTime=null,this.availableFrom=null,this.minBufferTime=NaN,this.duration=NaN,this.isDynamic=!1,this.maxFragmentDuration=null};t["default"]=r,e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function i(){n(this,i),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};t["default"]=r,e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function i(){n(this,i),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=[],this.BolaState=[]};t["default"]=r,e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function i(){n(this,i),this.id=null,this.index=null,this.start=NaN,this.duration=NaN,this.manifestInfo=null,this.isLast=!0,this.isFirst=!0};t["default"]=r,e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function i(){n(this,i),this.video=null,this.captionData=null,this.label=null,this.lang=null,this.defaultTrack=!1,this.kind=null,this.isFragmented=!1,this.isEmbedded=!1};t["default"]=r,e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function i(){n(this,i),this.id=null,this.quality=null,this.DVRWindow=null,this.fragmentDuration=null,this.mediaInfo=null,this.MSETimeOffset=null};t["default"]=r,e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function i(){n(this,i),this.t=null,this.xywh=null,this.track=null,this.id=null,this.s=null};t["default"]=r,e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function i(){n(this,i),this._s=void 0};t["default"]=r,e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function i(){n(this,i),this.t=null,this.level=null};t["default"]=r,e.exports=t["default"]},function(e,t,n){"use strict";
38
- function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var a=n(18),o=r(a),s=function u(){i(this,u),this.target=null,this.state=o["default"].BUFFER_EMPTY};t["default"]=s,e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function i(){n(this,i),this.time=null,this.range=null,this.manifestInfo=null};t["default"]=r,e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function i(){n(this,i),this.time=null,this.droppedFrames=null};t["default"]=r,e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function o(){n(this,o),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.trackInfo=[]},i=function s(){n(this,s),this.id=null,this.index=null,this.start=null,this.duration=null},a=function u(){n(this,u),this.id=null,this.index=null,this.mediaType=null,this.streamIndex=null,this.presentationTimeOffset=null,this.startNumber=null,this.fragmentInfoType=null};t.ManifestUpdate=r,t.ManifestUpdateStreamInfo=i,t.ManifestUpdateTrackInfo=a},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function i(){n(this,i),this.t=null,this.mt=null,this.to=null,this.lto=null};t["default"]=r,e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function i(){n(this,i),this.loadingRequests=[],this.executedRequests=[]};t["default"]=r,e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function i(){n(this,i),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["default"]=r,e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function i(){n(this,i),this.tcpid=null,this.dest=null,this.topen=null,this.tclose=null,this.tconnect=null};t["default"]=r,e.exports=t["default"]},function(e,t){"use strict";var n=t.decimalAdjust=function(e,t,n){return"undefined"==typeof n||0===+n?Math[e](t):(t=+t,n=+n,isNaN(t)||"number"!=typeof n||n%1!==0?NaN:(t=t.toString().split("e"),t=Math[e](+(t[0]+"e"+(t[1]?+t[1]-n:-n))),t=t.toString().split("e"),+(t[0]+"e"+(t[1]?+t[1]+n:n))))};e.exports={round10:function(e,t){return n("round",e,t)},floor10:function(e,t){return n("floor",e,t)},ceil10:function(e,t){return n("ceil",e,t)}},e.exports.polyfill=function(){Math.round10||(Math.round10=e.exports.round10),Math.floor10||(Math.floor10=e.exports.floor10),Math.ceil10||(Math.ceil10=e.exports.ceil10)}},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children=[],e.webpackPolyfill=1),e}},function(e,t,n){var r=n(72);r(flowplayer)}]);
39
- /*@
40
- @end
41
- @*/
1
+ /*! v2.6.7-e2394a6, 2018-03-14T14:20:10Z */
2
+ !function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c||a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g<d.length;g++)e(d[g]);return e}({1:[function(b,c,d){"use strict";var e={};e.encode=function(a){for(var b=[],c=0;c<a.length;++c){var d=a.charCodeAt(c);d<128?b.push(d):d<2048?(b.push(192|d>>6),b.push(128|63&d)):d<65536?(b.push(224|d>>12),b.push(128|63&d>>6),b.push(128|63&d)):(b.push(240|d>>18),b.push(128|63&d>>12),b.push(128|63&d>>6),b.push(128|63&d))}return b},e.decode=function(a){for(var b=[],c=0;c<a.length;){var d=a[c++];d<128||(d<224?(d=(31&d)<<6,d|=63&a[c++]):d<240?(d=(15&d)<<12,d|=(63&a[c++])<<6,d|=63&a[c++]):(d=(7&d)<<18,d|=(63&a[c++])<<12,d|=(63&a[c++])<<6,d|=63&a[c++])),b.push(String.fromCharCode(d))}return b.join("")};var f={};!function(b){var c=function(a){for(var c=0,d=[],e=0|a.length/3;0<e--;){var f=(a[c]<<16)+(a[c+1]<<8)+a[c+2];c+=3,d.push(b.charAt(63&f>>18)),d.push(b.charAt(63&f>>12)),d.push(b.charAt(63&f>>6)),d.push(b.charAt(63&f))}if(2==a.length-c){var f=(a[c]<<16)+(a[c+1]<<8);d.push(b.charAt(63&f>>18)),d.push(b.charAt(63&f>>12)),d.push(b.charAt(63&f>>6)),d.push("=")}else if(1==a.length-c){var f=a[c]<<16;d.push(b.charAt(63&f>>18)),d.push(b.charAt(63&f>>12)),d.push("==")}return d.join("")},d=function(){for(var a=[],c=0;c<b.length;++c)a[b.charCodeAt(c)]=c;return a["=".charCodeAt(0)]=0,a}(),g=function(a){for(var b=0,c=[],e=0|a.length/4;0<e--;){var f=(d[a.charCodeAt(b)]<<18)+(d[a.charCodeAt(b+1)]<<12)+(d[a.charCodeAt(b+2)]<<6)+d[a.charCodeAt(b+3)];c.push(255&f>>16),c.push(255&f>>8),c.push(255&f),b+=4}return c&&("="==a.charAt(b-2)?(c.pop(),c.pop()):"="==a.charAt(b-1)&&c.pop()),c},h={};h.encode=function(a){for(var b=[],c=0;c<a.length;++c)b.push(a.charCodeAt(c));return b},h.decode=function(b){for(var c=0;c<s.length;++c)a[c]=String.fromCharCode(a[c]);return a.join("")},f.decodeArray=function(a){var b=g(a);return new Uint8Array(b)},f.encodeASCII=function(a){var b=h.encode(a);return c(b)},f.decodeASCII=function(a){var b=g(a);return h.decode(b)},f.encode=function(a){var b=e.encode(a);return c(b)},f.decode=function(a){var b=g(a);return e.decode(b)}}("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"),void 0!==d&&(d.decode=f.decode,d.decodeArray=f.decodeArray,d.encode=f.encode,d.encodeASCII=f.encodeASCII)},{}],2:[function(a,b,c){"use strict";!function(a){var b={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},c=function(a){var c=a;return b.hasOwnProperty(a)&&(c=b[a]),String.fromCharCode(c)},d=15,e=32,f={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},g={17:2,18:4,21:6,22:8,23:10,19:13,20:15},h={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},i={25:2,26:4,29:6,30:8,31:10,27:13,28:15},j=["white","green","blue","cyan","red","yellow","magenta","black","transparent"],k={verboseFilter:{DATA:3,DEBUG:3,INFO:2,WARNING:2,TEXT:1,ERROR:0},time:null,verboseLevel:0,setTime:function(a){this.time=a},log:function(a,b){var c=this.verboseFilter[a];this.verboseLevel>=c&&console.log(this.time+" ["+a+"] "+b)}},l=function(a){for(var b=[],c=0;c<a.length;c++)b.push(a[c].toString(16));return b},m=function(a,b,c,d,e){this.foreground=a||"white",this.underline=b||!1,this.italics=c||!1,this.background=d||"black",this.flash=e||!1};m.prototype={reset:function(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1},setStyles:function(a){for(var b=["foreground","underline","italics","background","flash"],c=0;c<b.length;c++){var d=b[c];a.hasOwnProperty(d)&&(this[d]=a[d])}},isDefault:function(){return"white"===this.foreground&&!this.underline&&!this.italics&&"black"===this.background&&!this.flash},equals:function(a){return this.foreground===a.foreground&&this.underline===a.underline&&this.italics===a.italics&&this.background===a.background&&this.flash===a.flash},copy:function(a){this.foreground=a.foreground,this.underline=a.underline,this.italics=a.italics,this.background=a.background,this.flash=a.flash},toString:function(){return"color="+this.foreground+", underline="+this.underline+", italics="+this.italics+", background="+this.background+", flash="+this.flash}};var n=function(a,b,c,d,e,f){this.uchar=a||" ",this.penState=new m(b,c,d,e,f)};n.prototype={reset:function(){this.uchar=" ",this.penState.reset()},setChar:function(a,b){this.uchar=a,this.penState.copy(b)},setPenState:function(a){this.penState.copy(a)},equals:function(a){return this.uchar===a.uchar&&this.penState.equals(a.penState)},copy:function(a){this.uchar=a.uchar,this.penState.copy(a.penState)},isEmpty:function(){return" "===this.uchar&&this.penState.isDefault()}};var o=function(){this.chars=[];for(var a=0;a<e;a++)this.chars.push(new n);this.pos=0,this.currPenState=new m};o.prototype={equals:function(a){for(var b=!0,c=0;c<e;c++)if(!this.chars[c].equals(a.chars[c])){b=!1;break}return b},copy:function(a){for(var b=0;b<e;b++)this.chars[b].copy(a.chars[b])},isEmpty:function(){for(var a=!0,b=0;b<e;b++)if(!this.chars[b].isEmpty()){a=!1;break}return a},setCursor:function(a){this.pos!==a&&(this.pos=a),this.pos<0?(k.log("ERROR","Negative cursor position "+this.pos),this.pos=0):this.pos>e&&(k.log("ERROR","Too large cursor position "+this.pos),this.pos=e)},moveCursor:function(a){var b=this.pos+a;if(a>1)for(var c=this.pos+1;c<b+1;c++)this.chars[c].setPenState(this.currPenState);this.setCursor(b)},backSpace:function(){this.moveCursor(-1),this.chars[this.pos].setChar(" ",this.currPenState)},insertChar:function(a){a>=144&&this.backSpace();var b=c(a);if(this.pos>=e)return void k.log("ERROR","Cannot insert "+a.toString(16)+" ("+b+") at position "+this.pos+". Skipping it!");this.chars[this.pos].setChar(b,this.currPenState),this.moveCursor(1)},clearFromPos:function(a){var b;for(b=a;b<e;b++)this.chars[b].reset()},clear:function(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()},clearToEndOfRow:function(){this.clearFromPos(this.pos)},getTextString:function(){for(var a=[],b=!0,c=0;c<e;c++){var d=this.chars[c].uchar;" "!==d&&(b=!1),a.push(d)}return b?"":a.join("")},setPenStyles:function(a){this.currPenState.setStyles(a),this.chars[this.pos].setPenState(this.currPenState)}};var p=function(){this.rows=[];for(var a=0;a<d;a++)this.rows.push(new o);this.currRow=d-1,this.nrRollUpRows=null,this.reset()};p.prototype={reset:function(){for(var a=0;a<d;a++)this.rows[a].clear();this.currRow=d-1},equals:function(a){for(var b=!0,c=0;c<d;c++)if(!this.rows[c].equals(a.rows[c])){b=!1;break}return b},copy:function(a){for(var b=0;b<d;b++)this.rows[b].copy(a.rows[b])},isEmpty:function(){for(var a=!0,b=0;b<d;b++)if(!this.rows[b].isEmpty()){a=!1;break}return a},backSpace:function(){this.rows[this.currRow].backSpace()},clearToEndOfRow:function(){this.rows[this.currRow].clearToEndOfRow()},insertChar:function(a){this.rows[this.currRow].insertChar(a)},setPen:function(a){this.rows[this.currRow].setPenStyles(a)},moveCursor:function(a){this.rows[this.currRow].moveCursor(a)},setCursor:function(a){k.log("INFO","setCursor: "+a),this.rows[this.currRow].setCursor(a)},setPAC:function(a){k.log("INFO","pacData = "+JSON.stringify(a));var b=a.row-1;this.nrRollUpRows&&b<this.nrRollUpRows-1&&(b=this.nrRollUpRows-1),this.currRow=b;var c=this.rows[this.currRow];if(null!==a.indent){var d=a.indent,e=Math.max(d-1,0);c.setCursor(a.indent),a.color=c.chars[e].penState.foreground}var f={foreground:a.color,underline:a.underline,italics:a.italics,background:"black",flash:!1};this.setPen(f)},setBkgData:function(a){k.log("INFO","bkgData = "+JSON.stringify(a)),this.backSpace(),this.setPen(a),this.insertChar(32)},setRollUpRows:function(a){this.nrRollUpRows=a},rollUp:function(){if(null===this.nrRollUpRows)return void k.log("DEBUG","roll_up but nrRollUpRows not set yet");k.log("TEXT",this.getDisplayText());var a=this.currRow+1-this.nrRollUpRows,b=this.rows.splice(a,1)[0];b.clear(),this.rows.splice(this.currRow,0,b),k.log("INFO","Rolling up")},getDisplayText:function(a){a=a||!1;for(var b=[],c="",e=-1,f=0;f<d;f++){var g=this.rows[f].getTextString();g&&(e=f+1,a?b.push("Row "+e+': "'+g+'"'):b.push(g.trim()))}return b.length>0&&(c=a?"["+b.join(" | ")+"]":b.join("\n")),c},getTextAndFormat:function(){return this.rows}};var q=function(a,b){this.chNr=a,this.outputFilter=b,this.mode=null,this.verbose=0,this.displayedMemory=new p,this.nonDisplayedMemory=new p,this.lastOutputScreen=new p,this.currRollUpRow=this.displayedMemory.rows[d-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null};q.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[d-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.lastCueEndTime=null},getHandler:function(){return this.outputFilter},setHandler:function(a){this.outputFilter=a},setPAC:function(a){this.writeScreen.setPAC(a)},setBkgData:function(a){this.writeScreen.setBkgData(a)},setMode:function(a){a!==this.mode&&(this.mode=a,k.log("INFO","MODE="+a),"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=a)},insertChars:function(a){for(var b=0;b<a.length;b++)this.writeScreen.insertChar(a[b]);var c=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";k.log("INFO",c+": "+this.writeScreen.getDisplayText(!0)),"MODE_PAINT-ON"!==this.mode&&"MODE_ROLL-UP"!==this.mode||(k.log("TEXT","DISPLAYED: "+this.displayedMemory.getDisplayText(!0)),this.outputDataUpdate())},cc_RCL:function(){k.log("INFO","RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")},cc_BS:function(){k.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(){k.log("INFO","DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()},cc_RU:function(a){k.log("INFO","RU("+a+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(a)},cc_FON:function(){k.log("INFO","FON - Flash On"),this.writeScreen.setPen({flash:!0})},cc_RDC:function(){k.log("INFO","RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")},cc_TR:function(){k.log("INFO","TR"),this.setMode("MODE_TEXT")},cc_RTD:function(){k.log("INFO","RTD"),this.setMode("MODE_TEXT")},cc_EDM:function(){k.log("INFO","EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate()},cc_CR:function(){k.log("CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate()},cc_ENM:function(){k.log("INFO","ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()},cc_EOC:function(){if(k.log("INFO","EOC - End Of Caption"),"MODE_POP-ON"===this.mode){var a=this.displayedMemory;this.displayedMemory=this.nonDisplayedMemory,this.nonDisplayedMemory=a,this.writeScreen=this.nonDisplayedMemory,k.log("TEXT","DISP: "+this.displayedMemory.getDisplayText())}this.outputDataUpdate()},cc_TO:function(a){k.log("INFO","TO("+a+") - Tab Offset"),this.writeScreen.moveCursor(a)},cc_MIDROW:function(a){var b={flash:!1};if(b.underline=a%2==1,b.italics=a>=46,b.italics)b.foreground="white";else{var c=Math.floor(a/2)-16,d=["white","green","blue","cyan","red","yellow","magenta"];b.foreground=d[c]}k.log("INFO","MIDROW: "+JSON.stringify(b)),this.writeScreen.setPen(b)},outputDataUpdate:function(){var a=k.time;null!==a&&this.outputFilter&&(this.outputFilter.updateData&&this.outputFilter.updateData(a,this.displayedMemory),null!==this.cueStartTime||this.displayedMemory.isEmpty()?this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,a,this.lastOutputScreen),this.cueStartTime=this.displayedMemory.isEmpty()?null:a):this.cueStartTime=a,this.lastOutputScreen.copy(this.displayedMemory))},cueSplitAtTime:function(a){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,a,this.displayedMemory),this.cueStartTime=a))}};var r=function(a,b,c){this.field=a||1,this.outputs=[b,c],this.channels=[new q(1,b),new q(2,c)],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}};r.prototype={getHandler:function(a){return this.channels[a].getHandler()},setHandler:function(a,b){this.channels[a].setHandler(b)},addData:function(a,b){var c,d,e,f=!1;this.lastTime=a,k.setTime(a);for(var g=0;g<b.length;g+=2)if(d=127&b[g],e=127&b[g+1],d>=16&&d<=31&&d===this.lastCmdA&&e===this.lastCmdB)this.lastCmdA=null,this.lastCmdB=null,k.log("DEBUG","Repeated command ("+l([d,e])+") is dropped");else if(0!==d||0!==e){if(k.log("DATA","["+l([b[g],b[g+1]])+"] -> ("+l([d,e])+")"),c=this.parseCmd(d,e),c||(c=this.parseMidrow(d,e)),c||(c=this.parsePAC(d,e)),c||(c=this.parseBackgroundAttributes(d,e)),!c&&(f=this.parseChars(d,e)))if(this.currChNr&&this.currChNr>=0){var h=this.channels[this.currChNr-1];h.insertChars(f)}else k.log("WARNING","No channel found yet. TEXT-MODE?");c?this.dataCounters.cmd+=2:f?this.dataCounters.char+=2:(this.dataCounters.other+=2,k.log("WARNING","Couldn't parse cleaned data "+l([d,e])+" orig: "+l([b[g],b[g+1]])))}else this.dataCounters.padding+=2},parseCmd:function(a,b){var c=null,d=(20===a||21===a||28===a||29===a)&&32<=b&&b<=47,e=(23===a||31===a)&&33<=b&&b<=35;if(!d&&!e)return!1;c=20===a||21===a||23===a?1:2;var f=this.channels[c-1];return 20===a||21===a||28===a||29===a?32===b?f.cc_RCL():33===b?f.cc_BS():34===b?f.cc_AOF():35===b?f.cc_AON():36===b?f.cc_DER():37===b?f.cc_RU(2):38===b?f.cc_RU(3):39===b?f.cc_RU(4):40===b?f.cc_FON():41===b?f.cc_RDC():42===b?f.cc_TR():43===b?f.cc_RTD():44===b?f.cc_EDM():45===b?f.cc_CR():46===b?f.cc_ENM():47===b&&f.cc_EOC():f.cc_TO(b-32),this.lastCmdA=a,this.lastCmdB=b,this.currChNr=c,!0},parseMidrow:function(a,b){var c=null;if((17===a||25===a)&&32<=b&&b<=47){if((c=17===a?1:2)!==this.currChNr)return k.log("ERROR","Mismatch channel in midrow parsing"),!1;var d=this.channels[c-1];return d.insertChars([32]),d.cc_MIDROW(b),k.log("DEBUG","MIDROW ("+l([a,b])+")"),this.lastCmdA=a,this.lastCmdB=b,!0}return!1},parsePAC:function(a,b){var c=null,d=null,e=(17<=a&&a<=23||25<=a&&a<=31)&&64<=b&&b<=127,j=(16===a||24===a)&&64<=b&&b<=95;if(!e&&!j)return!1;c=a<=23?1:2,d=64<=b&&b<=95?1===c?f[a]:h[a]:1===c?g[a]:i[a];var k=this.interpretPAC(d,b);return this.channels[c-1].setPAC(k),this.lastCmdA=a,this.lastCmdB=b,this.currChNr=c,!0},interpretPAC:function(a,b){var c=b,d={color:null,italics:!1,indent:null,underline:!1,row:a};return c=b>95?b-96:b-64,d.underline=1==(1&c),c<=13?d.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(c/2)]:c<=15?(d.italics=!0,d.color="white"):d.indent=4*Math.floor((c-16)/2),d},parseChars:function(a,b){var d=null,e=null,f=null;if(a>=25?(d=2,f=a-8):(d=1,f=a),17<=f&&f<=19){var g=b;g=17===f?b+80:18===f?b+112:b+144,k.log("INFO","Special char '"+c(g)+"' in channel "+d),e=[g],this.lastCmdA=a,this.lastCmdB=b}else 32<=a&&a<=127&&(e=0===b?[a]:[a,b],this.lastCmdA=null,this.lastCmdB=null);if(e){var h=l(e);k.log("DEBUG","Char codes = "+h.join(","))}return e},parseBackgroundAttributes:function(a,b){var c,d,e,f,g=(16===a||24===a)&&32<=b&&b<=47,h=(23===a||31===a)&&45<=b&&b<=47;return!(!g&&!h)&&(c={},16===a||24===a?(d=Math.floor((b-32)/2),c.background=j[d],b%2==1&&(c.background=c.background+"_semi")):45===b?c.background="transparent":(c.foreground="black",47===b&&(c.underline=!0)),e=a<24?1:2,f=this.channels[e-1],f.setBkgData(c),this.lastCmdA=a,this.lastCmdB=b,!0)},reset:function(){for(var a=0;a<this.channels.length;a++)this.channels[a]&&this.channels[a].reset();this.lastCmdA=null,this.lastCmdB=null},cueSplitAtTime:function(a){for(var b=0;b<this.channels.length;b++)this.channels[b]&&this.channels[b].cueSplitAtTime(a)}};var s=function(a,b,c){for(var d=0,e=b,f=[],g=function(a,b,c,d){if(4!==a||b<8)return null;var e=c.getUint8(d),f=c.getUint16(d+1),g=c.getUint32(d+3),h=c.getUint8(d+7);return 181==e&&49==f&&1195456820==g&&3==h};e<b+c;){if(d=a.getUint32(e),6===(31&a.getUint8(e+4)))for(var h=e+5,i=-1;h<e+4+d-1;){i=0;for(var j=255;255===j;)j=a.getUint8(h),i+=j,h++;var k=0;for(j=255;255===j;)j=a.getUint8(h),k+=j,h++;g(i,k,a,h)&&f.push([h,k]),h+=k}e+=d+4}return f},t=function(a,b){var c=b[0],d=[[],[]];c+=8;var e=31&a.getUint8(c);c+=2;for(var f=0;f<e;f++){var g=a.getUint8(c),h=4&g,i=3&g;c++;var j=a.getUint8(c);c++;var k=a.getUint8(c);c++,h&&(127&j)+(127&k)!=0&&(0===i?(d[0].push(j),d[0].push(k)):1===i&&(d[1].push(j),d[1].push(k)))}return d};a.logger=k,a.PenState=m,a.CaptionScreen=p,a.Cea608Parser=r,a.findCea608Nalus=s,a.extractCea608DataFromRange=t}(void 0===c?(void 0).cea608parser={}:c)},{}],3:[function(a,b,c){"use strict";function d(a){var b,c,d;for(b=[],d=0,c=a.length;d<c;d+=1)a[d].isRoot?b.push("root"):b.push(a[d].name);var e=function(a,b){var c;if(null!==a&&null!==b)for(c in a)a.hasOwnProperty(c)&&(b.hasOwnProperty(c)||(b[c]=a[c]))},f=function(a,b,c){var d,f,g,h,i;if(null!==a&&0!==a.length)for(d=0,f=a.length;d<f;d+=1)g=a[d],b.hasOwnProperty(g.name)&&(c.hasOwnProperty(g.name)?g.merge&&(h=b[g.name],i=c[g.name],"object"==typeof h&&"object"==typeof i?e(h,i):null!=g.mergeFunction?c[g.name]=g.mergeFunction(h,i):c[g.name]=h+i):c[g.name]=b[g.name])},g=function a(b,c){var d,e,g,h,i,j,k,l=b;if(null!==l.children&&0!==l.children.length)for(d=0,e=l.children.length;d<e;d+=1)if(j=l.children[d],c.hasOwnProperty(j.name))if(j.isArray)for(i=c[j.name+"_asArray"],g=0,h=i.length;g<h;g+=1)k=i[g],f(l.properties,c,k),a(j,k);else k=c[j.name],f(l.properties,c,k),a(j,k)};return{run:function c(d){var e,f,h,i,j,k,l;if(null===d)return d;if("object"!=typeof d)return d;for(e=0,f=b.length;e<f;e+=1)"root"===b[e]&&(j=a[e],k=d,g(j,k));for(i in d)if(d.hasOwnProperty(i)&&"__children"!=i){if(-1!==(h=b.indexOf(i)))if(j=a[h],j.isArray)for(l=d[i+"_asArray"],e=0,f=l.length;e<f;e+=1)k=l[e],g(j,k);else k=d[i],g(j,k);c(d[i])}return d}}}Object.defineProperty(c,"__esModule",{value:!0}),c.default=d,b.exports=c.default},{}],4:[function(a,b,c){"use strict";function d(a){function b(){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)}function c(){}function d(a){var b=a.localName;return null==b&&(b=a.baseName),null!=b&&""!=b||(b=a.nodeName),b}function e(a){return a.prefix}function f(a){return"string"==typeof a?a.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;"):a}function g(a,b,c,d){for(var e=0;e<a.length;e++){var f=a[e];if("string"==typeof f){if(f==d)break}else if(f instanceof RegExp){if(f.test(d))break}else if("function"==typeof f&&f(b,c,d))break}return e!=a.length}function h(b,c,d){switch(a.arrayAccessForm){case"property":b[c]instanceof Array?b[c+"_asArray"]=b[c]:b[c+"_asArray"]=[b[c]]}!(b[c]instanceof Array)&&a.arrayAccessFormPaths.length>0&&g(a.arrayAccessFormPaths,b,c,d)&&(b[c]=[b[c]])}function i(a){var b=a.split(/[-T:+Z]/g),c=new Date(b[0],b[1]-1,b[2]),d=b[5].split(".");if(c.setHours(b[3],b[4],d[0]),d.length>1&&c.setMilliseconds(d[1]),b[6]&&b[7]){var e=60*b[6]+Number(b[7]);e=0+("-"==(/\d\d-\d\d:\d\d#x2F;.test(a)?"-":"+")?-1*e:e),c.setMinutes(c.getMinutes()-e-c.getTimezoneOffset())}else-1!==a.indexOf("Z",a.length-1)&&(c=new Date(Date.UTC(c.getFullYear(),c.getMonth(),c.getDate(),c.getHours(),c.getMinutes(),c.getSeconds(),c.getMilliseconds())));return c}function j(b,c,d){if(a.datetimeAccessFormPaths.length>0){var e=d.split(".#")[0];return g(a.datetimeAccessFormPaths,b,c,e)?i(b):b}return b}function k(b,c,d,e){return!(c==z.ELEMENT_NODE&&a.xmlElementsFilter.length>0)||g(a.xmlElementsFilter,b,d,e)}function l(b,c){if(b.nodeType==z.DOCUMENT_NODE){for(var f=new Object,g=b.childNodes,i=0;i<g.length;i++){var m=g[i];if(m.nodeType==z.ELEMENT_NODE)if(a.ignoreRoot)f=l(m);else{f={};var n=d(m);f[n]=l(m)}}return f}if(b.nodeType==z.ELEMENT_NODE){var f=new Object;f.__cnt=0;for(var o=[],g=b.childNodes,i=0;i<g.length;i++){var m=g[i],n=d(m);if(m.nodeType!=z.COMMENT_NODE){var p=c+"."+n;if(k(f,m.nodeType,n,p))if(f.__cnt++,null==f[n]){var q=l(m,p);if("#text"!=n||/[^\s]/.test(q)){var r={};r[n]=q,o.push(r)}f[n]=q,h(f,n,p)}else{null!=f[n]&&(f[n]instanceof Array||(f[n]=[f[n]],h(f,n,p)));var q=l(m,p);if("#text"!=n||/[^\s]/.test(q)){var r={};r[n]=q,o.push(r)}f[n][f[n].length]=q}}}f.__children=o;for(var s=d(b),t=0;t<b.attributes.length;t++){var u=b.attributes[t];f.__cnt++;for(var v=u.value,w=0,x=a.matchers.length;w<x;w++){var y=a.matchers[w];y.test(u,s)&&(v=y.converter(u.value))}f[a.attributePrefix+u.name]=v}var A=e(b);return null!=A&&""!=A&&(f.__cnt++,f.__prefix=A),null!=f["#text"]&&(f.__text=f["#text"],f.__text instanceof Array&&(f.__text=f.__text.join("\n")),a.stripWhitespaces&&(f.__text=f.__text.trim()),delete f["#text"],"property"==a.arrayAccessForm&&delete f["#text_asArray"],f.__text=j(f.__text,n,c+"."+n)),null!=f["#cdata-section"]&&(f.__cdata=f["#cdata-section"],delete f["#cdata-section"],"property"==a.arrayAccessForm&&delete f["#cdata-section_asArray"]),0==f.__cnt&&"text"==a.emptyNodeForm?f="":1==f.__cnt&&null!=f.__text?f=f.__text:1!=f.__cnt||null==f.__cdata||a.keepCData?f.__cnt>1&&null!=f.__text&&a.skipEmptyTextNodesForObj&&(a.stripWhitespaces&&""==f.__text||""==f.__text.trim())&&delete f.__text:f=f.__cdata,delete f.__cnt,!a.enableToStringFunc||null==f.__text&&null==f.__cdata||(f.toString=function(){return(null!=this.__text?this.__text:"")+(null!=this.__cdata?this.__cdata:"")}),f}if(b.nodeType==z.TEXT_NODE||b.nodeType==z.CDATA_SECTION_NODE)return b.nodeValue}function m(b,c,d,e){var g="<"+(null!=b&&null!=b.__prefix?b.__prefix+":":"")+c;if(null!=d)for(var h=0;h<d.length;h++){var i=d[h],j=b[i];a.escapeMode&&(j=f(j)),g+=" "+i.substr(a.attributePrefix.length)+"=",a.useDoubleQuotes?g+='"'+j+'"':g+="'"+j+"'"}return g+=e?"/>":">"}function n(a,b){return"</"+(null!=a.__prefix?a.__prefix+":":"")+b+">"}function o(a,b){return-1!==a.indexOf(b,a.length-b.length)}function p(b,c){return!!("property"==a.arrayAccessForm&&o(c.toString(),"_asArray")||0==c.toString().indexOf(a.attributePrefix)||0==c.toString().indexOf("__")||b[c]instanceof Function)}function q(a){var b=0;if(a instanceof Object)for(var c in a)p(a,c)||b++;return b}function r(b,c,d){return 0==a.jsonPropertiesFilter.length||""==d||g(a.jsonPropertiesFilter,b,c,d)}function s(b){var c=[];if(b instanceof Object)for(var d in b)-1==d.toString().indexOf("__")&&0==d.toString().indexOf(a.attributePrefix)&&c.push(d);return c}function t(b){var c="";return null!=b.__cdata&&(c+="<![CDATA["+b.__cdata+"]]>"),null!=b.__text&&(a.escapeMode?c+=f(b.__text):c+=b.__text),c}function u(b){var c="";return b instanceof Object?c+=t(b):null!=b&&(a.escapeMode?c+=f(b):c+=b),c}function v(a,b){return""===a?b:a+"."+b}function w(a,b,c,d){var e="";if(0==a.length)e+=m(a,b,c,!0);else for(var f=0;f<a.length;f++)e+=m(a[f],b,s(a[f]),!1),e+=x(a[f],v(d,b)),e+=n(a[f],b);return e}function x(a,b){var c="";if(q(a)>0)for(var d in a)if(!p(a,d)&&(""==b||r(a,d,v(b,d)))){var e=a[d],f=s(e);if(null==e||void 0==e)c+=m(e,d,f,!0);else if(e instanceof Object)if(e instanceof Array)c+=w(e,d,f,b);else if(e instanceof Date)c+=m(e,d,f,!1),c+=e.toISOString(),c+=n(e,d);else{var g=q(e);g>0||null!=e.__text||null!=e.__cdata?(c+=m(e,d,f,!1),c+=x(e,v(b,d)),c+=n(e,d)):c+=m(e,d,f,!0)}else c+=m(e,d,f,!1),c+=u(e),c+=n(e,d)}return c+=u(a)}var y="1.2.0";a=a||{},b(),c();var z={ELEMENT_NODE:1,TEXT_NODE:3,CDATA_SECTION_NODE:4,COMMENT_NODE:8,DOCUMENT_NODE:9};this.parseXmlString=function(a){window.ActiveXObject||window;if(void 0===a)return null;var b;if(window.DOMParser){var c=new window.DOMParser;try{b=c.parseFromString(a,"text/xml"),b.getElementsByTagNameNS("*","parsererror").length>0&&(b=null)}catch(d){b=null}}else 0==a.indexOf("<?")&&(a=a.substr(a.indexOf("?>")+2)),b=new ActiveXObject("Microsoft.XMLDOM"),b.async="false",b.loadXML(a);return b},this.asArray=function(a){return void 0===a||null==a?[]:a instanceof Array?a:[a]},this.toXmlDateTime=function(a){return a instanceof Date?a.toISOString():"number"==typeof a?new Date(a).toISOString():null},this.asDateTime=function(a){return"string"==typeof a?i(a):a},this.xml2json=function(a){return l(a)},this.xml_str2json=function(a){var b=this.parseXmlString(a);return null!=b?this.xml2json(b):null},this.json2xml_str=function(a){return x(a,"")},this.json2xml=function(a){var b=this.json2xml_str(a);return this.parseXmlString(b)},this.getVersion=function(){return y}}Object.defineProperty(c,"__esModule",{value:!0}),c.default=d,b.exports=c.default},{}],5:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}Object.defineProperty(c,"__esModule",{value:!0});var e=a(6),f=a(116),g=d(f),h=a(147),i=d(h),j=a(93),k=d(j);dashjs.Protection=i.default,dashjs.MetricsReporting=g.default,dashjs.MediaPlayerFactory=k.default,c.default=dashjs,c.MediaPlayer=e.MediaPlayer,c.Protection=i.default,c.MetricsReporting=g.default,c.MediaPlayerFactory=k.default},{116:116,147:147,6:6,93:93}],6:[function(a,b,c){(function(b){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}Object.defineProperty(c,"__esModule",{value:!0});var e=a(91),f=d(e),g=a(49),h=d(g),i=a(50),j="undefined"!=typeof window&&window||b,k=j.dashjs;k||(k=j.dashjs={}),k.MediaPlayer=f.default,k.FactoryMaker=h.default,k.Version=(0,i.getVersionString)(),c.default=k,c.MediaPlayer=f.default,c.FactoryMaker=h.default}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{49:49,50:50,91:91}],7:[function(a,b,c){!function(a){"use strict";function b(a){var b=a.charCodeAt(0);return b===f||b===k?62:b===g||b===l?63:b<h?-1:b<h+10?b-h+26+26:b<j+26?b-j:b<i+26?b-i+26:void 0}function c(a){function c(a){j[l++]=a}var d,f,g,h,i,j;if(a.length%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var k=a.length;i="="===a.charAt(k-2)?2:"="===a.charAt(k-1)?1:0,j=new e(3*a.length/4-i),g=i>0?a.length-4:a.length;var l=0;for(d=0,f=0;d<g;d+=4,f+=3)h=b(a.charAt(d))<<18|b(a.charAt(d+1))<<12|b(a.charAt(d+2))<<6|b(a.charAt(d+3)),c((16711680&h)>>16),c((65280&h)>>8),c(255&h);return 2===i?(h=b(a.charAt(d))<<2|b(a.charAt(d+1))>>4,c(255&h)):1===i&&(h=b(a.charAt(d))<<10|b(a.charAt(d+1))<<4|b(a.charAt(d+2))>>2,c(h>>8&255),c(255&h)),j}function d(a){function b(a){return"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(a)}function c(a){return b(a>>18&63)+b(a>>12&63)+b(a>>6&63)+b(63&a)}var d,e,f,g=a.length%3,h="";for(d=0,f=a.length-g;d<f;d+=3)e=(a[d]<<16)+(a[d+1]<<8)+a[d+2],h+=c(e);switch(g){case 1:e=a[a.length-1],h+=b(e>>2),h+=b(e<<4&63),h+="==";break;case 2:e=(a[a.length-2]<<8)+a[a.length-1],h+=b(e>>10),h+=b(e>>4&63),h+=b(e<<2&63),h+="="}return h}var e="undefined"!=typeof Uint8Array?Uint8Array:Array,f="+".charCodeAt(0),g="/".charCodeAt(0),h="0".charCodeAt(0),i="a".charCodeAt(0),j="A".charCodeAt(0),k="-".charCodeAt(0),l="_".charCodeAt(0);a.toByteArray=c,a.fromByteArray=d}(void 0===c?this.base64js={}:c)},{}],8:[function(a,b,c){},{}],9:[function(a,b,c){function d(a){if(a&&!i(a))throw new Error("Unknown encoding: "+a)}function e(a){return a.toString(this.encoding)}function f(a){this.charReceived=a.length%2,this.charLength=this.charReceived?2:0}function g(a){this.charReceived=a.length%3,this.charLength=this.charReceived?3:0}var h=a(10).Buffer,i=h.isEncoding||function(a){switch(a&&a.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}},j=c.StringDecoder=function(a){switch(this.encoding=(a||"utf8").toLowerCase().replace(/[-_]/,""),d(a),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=f;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=g;break;default:return void(this.write=e)}this.charBuffer=new h(6),this.charReceived=0,this.charLength=0};j.prototype.write=function(a){for(var b="";this.charLength;){var c=a.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:a.length;if(a.copy(this.charBuffer,this.charReceived,0,c),this.charReceived+=c,this.charReceived<this.charLength)return"";a=a.slice(c,a.length),b=this.charBuffer.slice(0,this.charLength).toString(this.encoding);var d=b.charCodeAt(b.length-1);if(!(d>=55296&&d<=56319)){if(this.charReceived=this.charLength=0,0===a.length)return b;break}this.charLength+=this.surrogateSize,b=""}this.detectIncompleteChar(a);var e=a.length;this.charLength&&(a.copy(this.charBuffer,0,a.length-this.charReceived,e),e-=this.charReceived),b+=a.toString(this.encoding,0,e);var e=b.length-1,d=b.charCodeAt(e);if(d>=55296&&d<=56319){var f=this.surrogateSize;return this.charLength+=f,this.charReceived+=f,this.charBuffer.copy(this.charBuffer,f,0,f),a.copy(this.charBuffer,0,0,f),b.substring(0,e)}return b},j.prototype.detectIncompleteChar=function(a){for(var b=a.length>=3?3:a.length;b>0;b--){var c=a[a.length-b];if(1==b&&c>>5==6){this.charLength=2;break}if(b<=2&&c>>4==14){this.charLength=3;break}if(b<=3&&c>>3==30){this.charLength=4;break}}this.charReceived=b},j.prototype.end=function(a){var b="";if(a&&a.length&&(b=this.write(a)),this.charReceived){var c=this.charReceived,d=this.charBuffer,e=this.encoding;b+=d.slice(0,c).toString(e)}return b}},{10:10}],10:[function(a,b,c){(function(b){/*!
3
+ * The buffer module from node.js, for the browser.
4
+ *
5
+ * @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
6
+ * @license MIT
7
+ */
8
+ "use strict";function d(){function a(){}try{var b=new Uint8Array(1);return b.foo=function(){return 42},b.constructor=a,42===b.foo()&&b.constructor===a&&"function"==typeof b.subarray&&0===b.subarray(1,1).byteLength}catch(c){return!1}}function e(){return f.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function f(a){return this instanceof f?(f.TYPED_ARRAY_SUPPORT||(this.length=0,this.parent=void 0),"number"==typeof a?g(this,a):"string"==typeof a?h(this,a,arguments.length>1?arguments[1]:"utf8"):i(this,a)):arguments.length>1?new f(a,arguments[1]):new f(a)}function g(a,b){if(a=p(a,b<0?0:0|q(b)),!f.TYPED_ARRAY_SUPPORT)for(var c=0;c<b;c++)a[c]=0;return a}function h(a,b,c){return"string"==typeof c&&""!==c||(c="utf8"),a=p(a,0|s(b,c)),a.write(b,c),a}function i(a,b){if(f.isBuffer(b))return j(a,b);if(Y(b))return k(a,b);if(null==b)throw new TypeError("must start with number, buffer, array or string");if("undefined"!=typeof ArrayBuffer){if(b.buffer instanceof ArrayBuffer)return l(a,b);if(b instanceof ArrayBuffer)return m(a,b)}return b.length?n(a,b):o(a,b)}function j(a,b){var c=0|q(b.length);return a=p(a,c),b.copy(a,0,0,c),a}function k(a,b){var c=0|q(b.length);a=p(a,c);for(var d=0;d<c;d+=1)a[d]=255&b[d];return a}function l(a,b){var c=0|q(b.length);a=p(a,c);for(var d=0;d<c;d+=1)a[d]=255&b[d];return a}function m(a,b){return f.TYPED_ARRAY_SUPPORT?(b.byteLength,a=f._augment(new Uint8Array(b))):a=l(a,new Uint8Array(b)),a}function n(a,b){var c=0|q(b.length);a=p(a,c);for(var d=0;d<c;d+=1)a[d]=255&b[d];return a}function o(a,b){var c,d=0;"Buffer"===b.type&&Y(b.data)&&(c=b.data,d=0|q(c.length)),a=p(a,d);for(var e=0;e<d;e+=1)a[e]=255&c[e];return a}function p(a,b){return f.TYPED_ARRAY_SUPPORT?(a=f._augment(new Uint8Array(b)),a.__proto__=f.prototype):(a.length=b,a._isBuffer=!0),0!==b&&b<=f.poolSize>>>1&&(a.parent=Z),a}function q(a){if(a>=e())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+e().toString(16)+" bytes");return 0|a}function r(a,b){if(!(this instanceof r))return new r(a,b);var c=new f(a,b);return delete c.parent,c}function s(a,b){"string"!=typeof a&&(a=""+a);var c=a.length;if(0===c)return 0;for(var d=!1;;)switch(b){case"ascii":case"binary":case"raw":case"raws":return c;case"utf8":case"utf-8":return R(a).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*c;case"hex":return c>>>1;case"base64":return U(a).length;default:if(d)return R(a).length;b=(""+b).toLowerCase(),d=!0}}function t(a,b,c){var d=!1;if(b|=0,c=void 0===c||c===1/0?this.length:0|c,a||(a="utf8"),b<0&&(b=0),c>this.length&&(c=this.length),c<=b)return"";for(;;)switch(a){case"hex":return F(this,b,c);case"utf8":case"utf-8":return B(this,b,c);case"ascii":return D(this,b,c);case"binary":return E(this,b,c);case"base64":return A(this,b,c);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return G(this,b,c);default:if(d)throw new TypeError("Unknown encoding: "+a);a=(a+"").toLowerCase(),d=!0}}function u(a,b,c,d){c=Number(c)||0;var e=a.length-c;d?(d=Number(d))>e&&(d=e):d=e;var f=b.length;if(f%2!=0)throw new Error("Invalid hex string");d>f/2&&(d=f/2);for(var g=0;g<d;g++){var h=parseInt(b.substr(2*g,2),16);if(isNaN(h))throw new Error("Invalid hex string");a[c+g]=h}return g}function v(a,b,c,d){return V(R(b,a.length-c),a,c,d)}function w(a,b,c,d){return V(S(b),a,c,d)}function x(a,b,c,d){return w(a,b,c,d)}function y(a,b,c,d){return V(U(b),a,c,d)}function z(a,b,c,d){return V(T(b,a.length-c),a,c,d)}function A(a,b,c){return 0===b&&c===a.length?W.fromByteArray(a):W.fromByteArray(a.slice(b,c))}function B(a,b,c){c=Math.min(a.length,c);for(var d=[],e=b;e<c;){var f=a[e],g=null,h=f>239?4:f>223?3:f>191?2:1;if(e+h<=c){var i,j,k,l;switch(h){case 1:f<128&&(g=f);break;case 2:i=a[e+1],128==(192&i)&&(l=(31&f)<<6|63&i)>127&&(g=l);break;case 3:i=a[e+1],j=a[e+2],128==(192&i)&&128==(192&j)&&(l=(15&f)<<12|(63&i)<<6|63&j)>2047&&(l<55296||l>57343)&&(g=l);break;case 4:i=a[e+1],j=a[e+2],k=a[e+3],128==(192&i)&&128==(192&j)&&128==(192&k)&&(l=(15&f)<<18|(63&i)<<12|(63&j)<<6|63&k)>65535&&l<1114112&&(g=l)}}null===g?(g=65533,h=1):g>65535&&(g-=65536,d.push(g>>>10&1023|55296),g=56320|1023&g),d.push(g),e+=h}return C(d)}function C(a){var b=a.length;if(b<=$)return String.fromCharCode.apply(String,a);for(var c="",d=0;d<b;)c+=String.fromCharCode.apply(String,a.slice(d,d+=$));return c}function D(a,b,c){var d="";c=Math.min(a.length,c);for(var e=b;e<c;e++)d+=String.fromCharCode(127&a[e]);return d}function E(a,b,c){var d="";c=Math.min(a.length,c);for(var e=b;e<c;e++)d+=String.fromCharCode(a[e]);return d}function F(a,b,c){var d=a.length;(!b||b<0)&&(b=0),(!c||c<0||c>d)&&(c=d);for(var e="",f=b;f<c;f++)e+=Q(a[f]);return e}function G(a,b,c){for(var d=a.slice(b,c),e="",f=0;f<d.length;f+=2)e+=String.fromCharCode(d[f]+256*d[f+1]);return e}function H(a,b,c){if(a%1!=0||a<0)throw new RangeError("offset is not uint");if(a+b>c)throw new RangeError("Trying to access beyond buffer length")}function I(a,b,c,d,e,g){if(!f.isBuffer(a))throw new TypeError("buffer must be a Buffer instance");if(b>e||b<g)throw new RangeError("value is out of bounds");if(c+d>a.length)throw new RangeError("index out of range")}function J(a,b,c,d){b<0&&(b=65535+b+1);for(var e=0,f=Math.min(a.length-c,2);e<f;e++)a[c+e]=(b&255<<8*(d?e:1-e))>>>8*(d?e:1-e)}function K(a,b,c,d){b<0&&(b=4294967295+b+1);for(var e=0,f=Math.min(a.length-c,4);e<f;e++)a[c+e]=b>>>8*(d?e:3-e)&255}function L(a,b,c,d,e,f){if(b>e||b<f)throw new RangeError("value is out of bounds");if(c+d>a.length)throw new RangeError("index out of range");if(c<0)throw new RangeError("index out of range")}function M(a,b,c,d,e){return e||L(a,b,c,4,3.4028234663852886e38,-3.4028234663852886e38),X.write(a,b,c,d,23,4),c+4}function N(a,b,c,d,e){return e||L(a,b,c,8,1.7976931348623157e308,-1.7976931348623157e308),X.write(a,b,c,d,52,8),c+8}function O(a){if(a=P(a).replace(aa,""),a.length<2)return"";for(;a.length%4!=0;)a+="=";return a}function P(a){return a.trim?a.trim():a.replace(/^\s+|\s+#x2F;g,"")}function Q(a){return a<16?"0"+a.toString(16):a.toString(16)}function R(a,b){b=b||1/0;for(var c,d=a.length,e=null,f=[],g=0;g<d;g++){if((c=a.charCodeAt(g))>55295&&c<57344){if(!e){if(c>56319){(b-=3)>-1&&f.push(239,191,189);continue}if(g+1===d){(b-=3)>-1&&f.push(239,191,189);continue}e=c;continue}if(c<56320){(b-=3)>-1&&f.push(239,191,189),e=c;continue}c=65536+(e-55296<<10|c-56320)}else e&&(b-=3)>-1&&f.push(239,191,189);if(e=null,c<128){if((b-=1)<0)break;f.push(c)}else if(c<2048){if((b-=2)<0)break;f.push(c>>6|192,63&c|128)}else if(c<65536){if((b-=3)<0)break;f.push(c>>12|224,c>>6&63|128,63&c|128)}else{if(!(c<1114112))throw new Error("Invalid code point");if((b-=4)<0)break;f.push(c>>18|240,c>>12&63|128,c>>6&63|128,63&c|128)}}return f}function S(a){for(var b=[],c=0;c<a.length;c++)b.push(255&a.charCodeAt(c));return b}function T(a,b){for(var c,d,e,f=[],g=0;g<a.length&&!((b-=2)<0);g++)c=a.charCodeAt(g),d=c>>8,e=c%256,f.push(e),f.push(d);return f}function U(a){return W.toByteArray(O(a))}function V(a,b,c,d){for(var e=0;e<d&&!(e+c>=b.length||e>=a.length);e++)b[e+c]=a[e];return e}var W=a(7),X=a(15),Y=a(25);c.Buffer=f,c.SlowBuffer=r,c.INSPECT_MAX_BYTES=50,f.poolSize=8192;var Z={};f.TYPED_ARRAY_SUPPORT=void 0!==b.TYPED_ARRAY_SUPPORT?b.TYPED_ARRAY_SUPPORT:d(),f.TYPED_ARRAY_SUPPORT?(f.prototype.__proto__=Uint8Array.prototype,f.__proto__=Uint8Array):(f.prototype.length=void 0,f.prototype.parent=void 0),f.isBuffer=function(a){return!(null==a||!a._isBuffer)},f.compare=function(a,b){if(!f.isBuffer(a)||!f.isBuffer(b))throw new TypeError("Arguments must be Buffers");if(a===b)return 0;for(var c=a.length,d=b.length,e=0,g=Math.min(c,d);e<g&&a[e]===b[e];)++e;return e!==g&&(c=a[e],d=b[e]),c<d?-1:d<c?1:0},f.isEncoding=function(a){switch(String(a).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"raw":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},f.concat=function(a,b){if(!Y(a))throw new TypeError("list argument must be an Array of Buffers.");if(0===a.length)return new f(0);var c;if(void 0===b)for(b=0,c=0;c<a.length;c++)b+=a[c].length;var d=new f(b),e=0;for(c=0;c<a.length;c++){var g=a[c];g.copy(d,e),e+=g.length}return d},f.byteLength=s,f.prototype.toString=function(){var a=0|this.length;return 0===a?"":0===arguments.length?B(this,0,a):t.apply(this,arguments)},f.prototype.equals=function(a){if(!f.isBuffer(a))throw new TypeError("Argument must be a Buffer");return this===a||0===f.compare(this,a)},f.prototype.inspect=function(){var a="",b=c.INSPECT_MAX_BYTES;return this.length>0&&(a=this.toString("hex",0,b).match(/.{2}/g).join(" "),this.length>b&&(a+=" ... ")),"<Buffer "+a+">"},f.prototype.compare=function(a){if(!f.isBuffer(a))throw new TypeError("Argument must be a Buffer");return this===a?0:f.compare(this,a)},f.prototype.indexOf=function(a,b){function c(a,b,c){for(var d=-1,e=0;c+e<a.length;e++)if(a[c+e]===b[-1===d?0:e-d]){if(-1===d&&(d=e),e-d+1===b.length)return c+d}else d=-1;return-1}if(b>2147483647?b=2147483647:b<-2147483648&&(b=-2147483648),b>>=0,0===this.length)return-1;if(b>=this.length)return-1;if(b<0&&(b=Math.max(this.length+b,0)),"string"==typeof a)return 0===a.length?-1:String.prototype.indexOf.call(this,a,b);if(f.isBuffer(a))return c(this,a,b);if("number"==typeof a)return f.TYPED_ARRAY_SUPPORT&&"function"===Uint8Array.prototype.indexOf?Uint8Array.prototype.indexOf.call(this,a,b):c(this,[a],b);throw new TypeError("val must be string, number or Buffer")},f.prototype.get=function(a){return console.log(".get() is deprecated. Access using array indexes instead."),this.readUInt8(a)},f.prototype.set=function(a,b){return console.log(".set() is deprecated. Access using array indexes instead."),this.writeUInt8(a,b)},f.prototype.write=function(a,b,c,d){if(void 0===b)d="utf8",c=this.length,b=0;else if(void 0===c&&"string"==typeof b)d=b,c=this.length,b=0;else if(isFinite(b))b|=0,isFinite(c)?(c|=0,void 0===d&&(d="utf8")):(d=c,c=void 0);else{var e=d;d=b,b=0|c,c=e}var f=this.length-b;if((void 0===c||c>f)&&(c=f),a.length>0&&(c<0||b<0)||b>this.length)throw new RangeError("attempt to write outside buffer bounds");d||(d="utf8");for(var g=!1;;)switch(d){case"hex":return u(this,a,b,c);case"utf8":case"utf-8":return v(this,a,b,c);case"ascii":return w(this,a,b,c);case"binary":return x(this,a,b,c);case"base64":return y(this,a,b,c);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return z(this,a,b,c);default:if(g)throw new TypeError("Unknown encoding: "+d);d=(""+d).toLowerCase(),g=!0}},f.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var $=4096;f.prototype.slice=function(a,b){var c=this.length;a=~~a,b=void 0===b?c:~~b,a<0?(a+=c)<0&&(a=0):a>c&&(a=c),b<0?(b+=c)<0&&(b=0):b>c&&(b=c),b<a&&(b=a);var d;if(f.TYPED_ARRAY_SUPPORT)d=f._augment(this.subarray(a,b));else{var e=b-a;d=new f(e,void 0);for(var g=0;g<e;g++)d[g]=this[g+a]}return d.length&&(d.parent=this.parent||this),d},f.prototype.readUIntLE=function(a,b,c){a|=0,b|=0,c||H(a,b,this.length);for(var d=this[a],e=1,f=0;++f<b&&(e*=256);)d+=this[a+f]*e;return d},f.prototype.readUIntBE=function(a,b,c){a|=0,b|=0,c||H(a,b,this.length);for(var d=this[a+--b],e=1;b>0&&(e*=256);)d+=this[a+--b]*e;return d},f.prototype.readUInt8=function(a,b){return b||H(a,1,this.length),this[a]},f.prototype.readUInt16LE=function(a,b){return b||H(a,2,this.length),this[a]|this[a+1]<<8},f.prototype.readUInt16BE=function(a,b){return b||H(a,2,this.length),this[a]<<8|this[a+1]},f.prototype.readUInt32LE=function(a,b){return b||H(a,4,this.length),(this[a]|this[a+1]<<8|this[a+2]<<16)+16777216*this[a+3]},f.prototype.readUInt32BE=function(a,b){return b||H(a,4,this.length),16777216*this[a]+(this[a+1]<<16|this[a+2]<<8|this[a+3])},f.prototype.readIntLE=function(a,b,c){a|=0,b|=0,c||H(a,b,this.length);for(var d=this[a],e=1,f=0;++f<b&&(e*=256);)d+=this[a+f]*e;return e*=128,d>=e&&(d-=Math.pow(2,8*b)),d},f.prototype.readIntBE=function(a,b,c){a|=0,b|=0,c||H(a,b,this.length);for(var d=b,e=1,f=this[a+--d];d>0&&(e*=256);)f+=this[a+--d]*e;return e*=128,f>=e&&(f-=Math.pow(2,8*b)),f},f.prototype.readInt8=function(a,b){return b||H(a,1,this.length),128&this[a]?-1*(255-this[a]+1):this[a]},f.prototype.readInt16LE=function(a,b){b||H(a,2,this.length);var c=this[a]|this[a+1]<<8;return 32768&c?4294901760|c:c},f.prototype.readInt16BE=function(a,b){b||H(a,2,this.length);var c=this[a+1]|this[a]<<8;return 32768&c?4294901760|c:c},f.prototype.readInt32LE=function(a,b){return b||H(a,4,this.length),this[a]|this[a+1]<<8|this[a+2]<<16|this[a+3]<<24},f.prototype.readInt32BE=function(a,b){return b||H(a,4,this.length),this[a]<<24|this[a+1]<<16|this[a+2]<<8|this[a+3]},f.prototype.readFloatLE=function(a,b){return b||H(a,4,this.length),X.read(this,a,!0,23,4)},f.prototype.readFloatBE=function(a,b){return b||H(a,4,this.length),X.read(this,a,!1,23,4)},f.prototype.readDoubleLE=function(a,b){return b||H(a,8,this.length),X.read(this,a,!0,52,8)},f.prototype.readDoubleBE=function(a,b){return b||H(a,8,this.length),X.read(this,a,!1,52,8)},f.prototype.writeUIntLE=function(a,b,c,d){a=+a,b|=0,c|=0,d||I(this,a,b,c,Math.pow(2,8*c),0);var e=1,f=0;for(this[b]=255&a;++f<c&&(e*=256);)this[b+f]=a/e&255;return b+c},f.prototype.writeUIntBE=function(a,b,c,d){a=+a,b|=0,c|=0,d||I(this,a,b,c,Math.pow(2,8*c),0);var e=c-1,f=1;for(this[b+e]=255&a;--e>=0&&(f*=256);)this[b+e]=a/f&255;return b+c},f.prototype.writeUInt8=function(a,b,c){return a=+a,b|=0,c||I(this,a,b,1,255,0),f.TYPED_ARRAY_SUPPORT||(a=Math.floor(a)),this[b]=255&a,b+1},f.prototype.writeUInt16LE=function(a,b,c){return a=+a,b|=0,c||I(this,a,b,2,65535,0),f.TYPED_ARRAY_SUPPORT?(this[b]=255&a,this[b+1]=a>>>8):J(this,a,b,!0),b+2},f.prototype.writeUInt16BE=function(a,b,c){return a=+a,b|=0,c||I(this,a,b,2,65535,0),f.TYPED_ARRAY_SUPPORT?(this[b]=a>>>8,this[b+1]=255&a):J(this,a,b,!1),b+2},f.prototype.writeUInt32LE=function(a,b,c){return a=+a,b|=0,c||I(this,a,b,4,4294967295,0),f.TYPED_ARRAY_SUPPORT?(this[b+3]=a>>>24,this[b+2]=a>>>16,this[b+1]=a>>>8,this[b]=255&a):K(this,a,b,!0),b+4},f.prototype.writeUInt32BE=function(a,b,c){return a=+a,b|=0,c||I(this,a,b,4,4294967295,0),f.TYPED_ARRAY_SUPPORT?(this[b]=a>>>24,this[b+1]=a>>>16,this[b+2]=a>>>8,this[b+3]=255&a):K(this,a,b,!1),b+4},f.prototype.writeIntLE=function(a,b,c,d){if(a=+a,b|=0,!d){var e=Math.pow(2,8*c-1);I(this,a,b,c,e-1,-e)}var f=0,g=1,h=a<0?1:0;for(this[b]=255&a;++f<c&&(g*=256);)this[b+f]=(a/g>>0)-h&255;return b+c},f.prototype.writeIntBE=function(a,b,c,d){if(a=+a,b|=0,!d){var e=Math.pow(2,8*c-1);I(this,a,b,c,e-1,-e)}var f=c-1,g=1,h=a<0?1:0;for(this[b+f]=255&a;--f>=0&&(g*=256);)this[b+f]=(a/g>>0)-h&255;return b+c},f.prototype.writeInt8=function(a,b,c){return a=+a,b|=0,c||I(this,a,b,1,127,-128),f.TYPED_ARRAY_SUPPORT||(a=Math.floor(a)),a<0&&(a=255+a+1),this[b]=255&a,b+1},f.prototype.writeInt16LE=function(a,b,c){return a=+a,b|=0,c||I(this,a,b,2,32767,-32768),f.TYPED_ARRAY_SUPPORT?(this[b]=255&a,this[b+1]=a>>>8):J(this,a,b,!0),b+2},f.prototype.writeInt16BE=function(a,b,c){return a=+a,b|=0,c||I(this,a,b,2,32767,-32768),f.TYPED_ARRAY_SUPPORT?(this[b]=a>>>8,this[b+1]=255&a):J(this,a,b,!1),b+2},f.prototype.writeInt32LE=function(a,b,c){return a=+a,b|=0,c||I(this,a,b,4,2147483647,-2147483648),f.TYPED_ARRAY_SUPPORT?(this[b]=255&a,this[b+1]=a>>>8,this[b+2]=a>>>16,this[b+3]=a>>>24):K(this,a,b,!0),b+4},f.prototype.writeInt32BE=function(a,b,c){return a=+a,b|=0,c||I(this,a,b,4,2147483647,-2147483648),a<0&&(a=4294967295+a+1),f.TYPED_ARRAY_SUPPORT?(this[b]=a>>>24,this[b+1]=a>>>16,this[b+2]=a>>>8,this[b+3]=255&a):K(this,a,b,!1),b+4},f.prototype.writeFloatLE=function(a,b,c){return M(this,a,b,!0,c)},f.prototype.writeFloatBE=function(a,b,c){return M(this,a,b,!1,c)},f.prototype.writeDoubleLE=function(a,b,c){return N(this,a,b,!0,c)},f.prototype.writeDoubleBE=function(a,b,c){return N(this,a,b,!1,c)},f.prototype.copy=function(a,b,c,d){if(c||(c=0),d||0===d||(d=this.length),b>=a.length&&(b=a.length),b||(b=0),d>0&&d<c&&(d=c),d===c)return 0;if(0===a.length||0===this.length)return 0;if(b<0)throw new RangeError("targetStart out of bounds");if(c<0||c>=this.length)throw new RangeError("sourceStart out of bounds");if(d<0)throw new RangeError("sourceEnd out of bounds");d>this.length&&(d=this.length),a.length-b<d-c&&(d=a.length-b+c);var e,g=d-c;if(this===a&&c<b&&b<d)for(e=g-1;e>=0;e--)a[e+b]=this[e+c];else if(g<1e3||!f.TYPED_ARRAY_SUPPORT)for(e=0;e<g;e++)a[e+b]=this[e+c];else a._set(this.subarray(c,c+g),b);return g},f.prototype.fill=function(a,b,c){if(a||(a=0),b||(b=0),c||(c=this.length),c<b)throw new RangeError("end < start");if(c!==b&&0!==this.length){if(b<0||b>=this.length)throw new RangeError("start out of bounds");if(c<0||c>this.length)throw new RangeError("end out of bounds");var d;if("number"==typeof a)for(d=b;d<c;d++)this[d]=a;else{var e=R(a.toString()),f=e.length;for(d=b;d<c;d++)this[d]=e[d%f]}return this}},f.prototype.toArrayBuffer=function(){if("undefined"!=typeof Uint8Array){if(f.TYPED_ARRAY_SUPPORT)return new f(this).buffer;for(var a=new Uint8Array(this.length),b=0,c=a.length;b<c;b+=1)a[b]=this[b];return a.buffer}throw new TypeError("Buffer.toArrayBuffer not supported in this browser")};var _=f.prototype;f._augment=function(a){return a.constructor=f,a._isBuffer=!0,a._set=a.set,a.get=_.get,a.set=_.set,a.write=_.write,a.toString=_.toString,a.toLocaleString=_.toString,a.toJSON=_.toJSON,a.equals=_.equals,a.compare=_.compare,a.indexOf=_.indexOf,a.copy=_.copy,a.slice=_.slice,a.readUIntLE=_.readUIntLE,a.readUIntBE=_.readUIntBE,a.readUInt8=_.readUInt8,a.readUInt16LE=_.readUInt16LE,a.readUInt16BE=_.readUInt16BE,a.readUInt32LE=_.readUInt32LE,a.readUInt32BE=_.readUInt32BE,a.readIntLE=_.readIntLE,a.readIntBE=_.readIntBE,a.readInt8=_.readInt8,a.readInt16LE=_.readInt16LE,a.readInt16BE=_.readInt16BE,a.readInt32LE=_.readInt32LE,a.readInt32BE=_.readInt32BE,a.readFloatLE=_.readFloatLE,a.readFloatBE=_.readFloatBE,a.readDoubleLE=_.readDoubleLE,a.readDoubleBE=_.readDoubleBE,a.writeUInt8=_.writeUInt8,a.writeUIntLE=_.writeUIntLE,a.writeUIntBE=_.writeUIntBE,a.writeUInt16LE=_.writeUInt16LE,a.writeUInt16BE=_.writeUInt16BE,a.writeUInt32LE=_.writeUInt32LE,a.writeUInt32BE=_.writeUInt32BE,a.writeIntLE=_.writeIntLE,a.writeIntBE=_.writeIntBE,a.writeInt8=_.writeInt8,a.writeInt16LE=_.writeInt16LE,a.writeInt16BE=_.writeInt16BE,a.writeInt32LE=_.writeInt32LE,a.writeInt32BE=_.writeInt32BE,a.writeFloatLE=_.writeFloatLE,a.writeFloatBE=_.writeFloatBE,a.writeDoubleLE=_.writeDoubleLE,a.writeDoubleBE=_.writeDoubleBE,a.fill=_.fill,a.inspect=_.inspect,a.toArrayBuffer=_.toArrayBuffer,a};var aa=/[^+\/0-9A-Za-z-_]/g}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{15:15,25:25,7:7}],11:[function(a,b,c){/*! codem-isoboxer v0.3.5 https://github.com/madebyhiro/codem-isoboxer/blob/master/LICENSE.txt */
9
+ var d={};d.parseBuffer=function(a){return new e(a).parse()},d.addBoxProcessor=function(a,b){"string"==typeof a&&"function"==typeof b&&(f.prototype._boxProcessors[a]=b)},d.createFile=function(){return new e},d.createBox=function(a,b,c){var d=f.create(a);return b&&b.append(d,c),d},d.createFullBox=function(a,b,c){var e=d.createBox(a,b,c);return e.version=0,e.flags=0,e},d.Utils={},d.Utils.dataViewToString=function(a,b){var c=b||"utf-8";if("undefined"!=typeof TextDecoder)return new TextDecoder(c).decode(a);var d=[],e=0;if("utf-8"===c)for(;e<a.byteLength;){var f=a.getUint8(e++);f<128||(f<224?(f=(31&f)<<6,f|=63&a.getUint8(e++)):f<240?(f=(15&f)<<12,f|=(63&a.getUint8(e++))<<6,f|=63&a.getUint8(e++)):(f=(7&f)<<18,f|=(63&a.getUint8(e++))<<12,f|=(63&a.getUint8(e++))<<6,f|=63&a.getUint8(e++))),d.push(String.fromCharCode(f))}else for(;e<a.byteLength;)d.push(String.fromCharCode(a.getUint8(e++)));return d.join("")},d.Utils.utf8ToByteArray=function(a){var b,c;if("undefined"!=typeof TextEncoder)b=(new TextEncoder).encode(a);else for(b=[],c=0;c<a.length;++c){var d=a.charCodeAt(c);d<128?b.push(d):d<2048?(b.push(192|d>>6),b.push(128|63&d)):d<65536?(b.push(224|d>>12),b.push(128|63&d>>6),b.push(128|63&d)):(b.push(240|d>>18),b.push(128|63&d>>12),b.push(128|63&d>>6),b.push(128|63&d))}return b},d.Utils.appendBox=function(a,b,c){if(b._offset=a._cursor.offset,b._root=a._root?a._root:a,b._raw=a._raw,b._parent=a,-1!==c){if(void 0===c||null===c)return void a.boxes.push(b);var d,e=-1;if("number"==typeof c)e=c;else{if("string"==typeof c)d=c;else{if("object"!=typeof c||!c.type)return void a.boxes.push(b);d=c.type}for(var f=0;f<a.boxes.length;f++)if(d===a.boxes[f].type){e=f+1;break}}a.boxes.splice(e,0,b)}},void 0!==c&&(c.parseBuffer=d.parseBuffer,c.addBoxProcessor=d.addBoxProcessor,c.createFile=d.createFile,c.createBox=d.createBox,c.createFullBox=d.createFullBox,c.Utils=d.Utils),d.Cursor=function(a){this.offset=void 0===a?0:a};var e=function(a){this._cursor=new d.Cursor,this.boxes=[],a&&(this._raw=new DataView(a))};e.prototype.fetch=function(a){var b=this.fetchAll(a,!0);return b.length?b[0]:null},e.prototype.fetchAll=function(a,b){var c=[];return e._sweep.call(this,a,c,b),c},e.prototype.parse=function(){for(this._cursor.offset=0,this.boxes=[];this._cursor.offset<this._raw.byteLength;){var a=f.parse(this);if(void 0===a.type)break;this.boxes.push(a)}return this},e._sweep=function(a,b,c){this.type&&this.type==a&&b.push(this);for(var d in this.boxes){if(b.length&&c)return;e._sweep.call(this.boxes[d],a,b,c)}},e.prototype.write=function(){var a,b=0;for(a=0;a<this.boxes.length;a++)b+=this.boxes[a].getLength(!1);var c=new Uint8Array(b);for(this._rawo=new DataView(c.buffer),this.bytes=c,this._cursor.offset=0,a=0;a<this.boxes.length;a++)this.boxes[a].write();return c.buffer},e.prototype.append=function(a,b){d.Utils.appendBox(this,a,b)};var f=function(){this._cursor=new d.Cursor};f.parse=function(a){var b=new f;return b._offset=a._cursor.offset,b._root=a._root?a._root:a,b._raw=a._raw,b._parent=a,b._parseBox(),a._cursor.offset=b._raw.byteOffset+b._raw.byteLength,b},f.create=function(a){var b=new f;return b.type=a,b.boxes=[],b},f.prototype._boxContainers=["dinf","edts","mdia","meco","mfra","minf","moof","moov","mvex","stbl","strk","traf","trak","tref","udta","vttc","sinf","schi","encv","enca"],f.prototype._boxProcessors={},f.prototype._procField=function(a,b,c){this._parsing?this[a]=this._readField(b,c):this._writeField(b,c,this[a])},f.prototype._procFieldArray=function(a,b,c,d){var e;if(this._parsing)for(this[a]=[],e=0;e<b;e++)this[a][e]=this._readField(c,d);else for(e=0;e<this[a].length;e++)this._writeField(c,d,this[a][e])},f.prototype._procFullBox=function(){this._procField("version","uint",8),this._procField("flags","uint",24)},f.prototype._procEntries=function(a,b,c){var d;if(this._parsing)for(this[a]=[],d=0;d<b;d++)this[a].push({}),c.call(this,this[a][d]);else for(d=0;d<b;d++)c.call(this,this[a][d])},f.prototype._procSubEntries=function(a,b,c,d){var e;if(this._parsing)for(a[b]=[],e=0;e<c;e++)a[b].push({}),d.call(this,a[b][e]);else for(e=0;e<c;e++)d.call(this,a[b][e])},f.prototype._procEntryField=function(a,b,c,d){this._parsing?a[b]=this._readField(c,d):this._writeField(c,d,a[b])},f.prototype._procSubBoxes=function(a,b){var c;if(this._parsing)for(this[a]=[],c=0;c<b;c++)this[a].push(f.parse(this));else for(c=0;c<b;c++)this._rawo?this[a][c].write():this.size+=this[a][c].getLength()},f.prototype._readField=function(a,b){switch(a){case"uint":return this._readUint(b);case"int":return this._readInt(b);case"template":return this._readTemplate(b);case"string":return-1===b?this._readTerminatedString():this._readString(b);case"data":return this._readData(b);case"utf8":return this._readUTF8String();default:return-1}},f.prototype._readInt=function(a){var b=null,c=this._cursor.offset-this._raw.byteOffset;switch(a){case 8:b=this._raw.getInt8(c);break;case 16:b=this._raw.getInt16(c);break;case 32:b=this._raw.getInt32(c);break;case 64:var d=this._raw.getInt32(c),e=this._raw.getInt32(c+4);b=d*Math.pow(2,32)+e}return this._cursor.offset+=a>>3,b},f.prototype._readUint=function(a){var b,c,d=null,e=this._cursor.offset-this._raw.byteOffset;switch(a){case 8:d=this._raw.getUint8(e);break;case 16:d=this._raw.getUint16(e);break;case 24:b=this._raw.getUint16(e),c=this._raw.getUint8(e+2),d=(b<<8)+c;break;case 32:d=this._raw.getUint32(e);break;case 64:b=this._raw.getUint32(e),c=this._raw.getUint32(e+4),d=b*Math.pow(2,32)+c}return this._cursor.offset+=a>>3,d},f.prototype._readString=function(a){for(var b="",c=0;c<a;c++){var d=this._readUint(8);b+=String.fromCharCode(d)}return b},f.prototype._readTemplate=function(a){return this._readUint(a/2)+this._readUint(a/2)/Math.pow(2,a/2)},f.prototype._readTerminatedString=function(){for(var a="";this._cursor.offset-this._offset<this._raw.byteLength;){var b=this._readUint(8);if(0===b)break;a+=String.fromCharCode(b)}return a},f.prototype._readData=function(a){var b=a>0?a:this._raw.byteLength-(this._cursor.offset-this._offset);if(b>0){var c=new Uint8Array(this._raw.buffer,this._cursor.offset,b);return this._cursor.offset+=b,c}return null},f.prototype._readUTF8String=function(){var a=this._raw.byteLength-(this._cursor.offset-this._offset),b=null;return a>0&&(b=new DataView(this._raw.buffer,this._cursor.offset,a),this._cursor.offset+=a),b?d.Utils.dataViewToString(b):b},f.prototype._parseBox=function(){if(this._parsing=!0,this._cursor.offset=this._offset,this._offset+8>this._raw.buffer.byteLength)return void(this._root._incomplete=!0);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())},f.prototype._parseFullBox=function(){this.version=this._readUint(8),this.flags=this._readUint(24)},f.prototype._parseContainerBox=function(){for(this.boxes=[];this._cursor.offset-this._raw.byteOffset<this._raw.byteLength;)this.boxes.push(f.parse(this))},f.prototype.append=function(a,b){d.Utils.appendBox(this,a,b)},f.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 a=0;a<this.boxes.length;a++)this.size+=this.boxes[a].getLength();return this._data&&this._writeData(this._data),this.size},f.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 a=0;a<this.boxes.length;a++)this.boxes[a].write();return this._data&&this._writeData(this._data),this._parent._cursor.offset+=this.size,this.size},f.prototype._writeInt=function(a,b){if(this._rawo){var c=this._cursor.offset-this._rawo.byteOffset;switch(a){case 8:this._rawo.setInt8(c,b);break;case 16:this._rawo.setInt16(c,b);break;case 32:this._rawo.setInt32(c,b);break;case 64:var d=Math.floor(b/Math.pow(2,32)),e=b-d*Math.pow(2,32);this._rawo.setUint32(c,d),this._rawo.setUint32(c+4,e)}this._cursor.offset+=a>>3}else this.size+=a>>3},f.prototype._writeUint=function(a,b){if(this._rawo){var c,d,e=this._cursor.offset-this._rawo.byteOffset;switch(a){case 8:this._rawo.setUint8(e,b);break;case 16:this._rawo.setUint16(e,b);break;case 24:c=(16776960&b)>>8,d=255&b,this._rawo.setUint16(e,c),this._rawo.setUint8(e+2,d);break;case 32:this._rawo.setUint32(e,b);break;case 64:c=Math.floor(b/Math.pow(2,32)),d=b-c*Math.pow(2,32),this._rawo.setUint32(e,c),this._rawo.setUint32(e+4,d)}this._cursor.offset+=a>>3}else this.size+=a>>3},f.prototype._writeString=function(a,b){for(var c=0;c<a;c++)this._writeUint(8,b.charCodeAt(c))},f.prototype._writeTerminatedString=function(a){if(0!==a.length){for(var b=0;b<a.length;b++)this._writeUint(8,a.charCodeAt(b));this._writeUint(8,0)}},f.prototype._writeTemplate=function(a,b){var c=Math.floor(b),d=(b-c)*Math.pow(2,a/2);this._writeUint(a/2,c),this._writeUint(a/2,d)},f.prototype._writeData=function(a){var b;if(a)if(this._rawo){if(a instanceof Array){for(var c=this._cursor.offset-this._rawo.byteOffset,b=0;b<a.length;b++)this._rawo.setInt8(c+b,a[b]);this._cursor.offset+=a.length}a instanceof Uint8Array&&(this._root.bytes.set(a,this._cursor.offset),this._cursor.offset+=a.length)}else this.size+=a.length},f.prototype._writeUTF8String=function(a){var b=d.Utils.utf8ToByteArray(a);if(this._rawo)for(var c=new DataView(this._rawo.buffer,this._cursor.offset,b.length),e=0;e<b.length;e++)c.setUint8(e,b[e]);else this.size+=b.length},f.prototype._writeField=function(a,b,c){switch(a){case"uint":this._writeUint(b,c);break;case"int":this._writeInt(b,c);break;case"template":this._writeTemplate(b,c);break;case"string":-1==b?this._writeTerminatedString(c):this._writeString(b,c);break;case"data":this._writeData(c);break;case"utf8":this._writeUTF8String(c)}},f.prototype._boxProcessors.avc1=f.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)},f.prototype._boxProcessors.dref=function(){this._procFullBox(),this._procField("entry_count","uint",32),this._procSubBoxes("entries",this.entry_count)},f.prototype._boxProcessors.elst=function(){this._procFullBox(),this._procField("entry_count","uint",32),this._procEntries("entries",this.entry_count,function(a){this._procEntryField(a,"segment_duration","uint",1===this.version?64:32),this._procEntryField(a,"media_time","int",1===this.version?64:32),this._procEntryField(a,"media_rate_integer","int",16),this._procEntryField(a,"media_rate_fraction","int",16)})},f.prototype._boxProcessors.emsg=function(){this._procFullBox(),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)},f.prototype._boxProcessors.free=f.prototype._boxProcessors.skip=function(){this._procField("data","data",-1)},f.prototype._boxProcessors.frma=function(){this._procField("data_format","uint",32)},f.prototype._boxProcessors.ftyp=f.prototype._boxProcessors.styp=function(){this._procField("major_brand","string",4),this._procField("minor_version","uint",32);var a=-1;this._parsing&&(a=(this._raw.byteLength-(this._cursor.offset-this._raw.byteOffset))/4),this._procFieldArray("compatible_brands",a,"string",4)},f.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)},f.prototype._boxProcessors.mdat=function(){this._procField("data","data",-1)},f.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)},f.prototype._boxProcessors.mehd=function(){this._procFullBox(),this._procField("fragment_duration","uint",1==this.version?64:32)},f.prototype._boxProcessors.mfhd=function(){this._procFullBox(),this._procField("sequence_number","uint",32)},f.prototype._boxProcessors.mfro=function(){this._procFullBox(),this._procField("mfra_size","uint",32)},f.prototype._boxProcessors.mp4a=f.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)},f.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)},f.prototype._boxProcessors.payl=function(){this._procField("cue_text","utf8")},f.prototype._boxProcessors.pssh=function(){this._procFullBox(),this._procFieldArray("SystemID",16,"uint",8),this._procField("DataSize","uint",32),this._procFieldArray("Data",this.DataSize,"uint",8)},f.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)},f.prototype._boxProcessors.sdtp=function(){this._procFullBox();var a=-1;this._parsing&&(a=this._raw.byteLength-(this._cursor.offset-this._raw.byteOffset)),this._procFieldArray("sample_dependency_table",a,"uint",8)},f.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(a){this._parsing||(a.reference=(1&a.reference_type)<<31,a.reference|=2147483647&a.referenced_size,a.sap=(1&a.starts_with_SAP)<<31,a.sap|=(3&a.SAP_type)<<28,a.sap|=268435455&a.SAP_delta_time),this._procEntryField(a,"reference","uint",32),this._procEntryField(a,"subsegment_duration","uint",32),this._procEntryField(a,"sap","uint",32),this._parsing&&(a.reference_type=a.reference>>31&1,a.referenced_size=2147483647&a.reference,a.starts_with_SAP=a.sap>>31&1,a.SAP_type=a.sap>>28&7,a.SAP_delta_time=268435455&a.sap)})},f.prototype._boxProcessors.smhd=function(){this._procFullBox(),this._procField("balance","uint",16),this._procField("reserved","uint",16)},f.prototype._boxProcessors.ssix=function(){this._procFullBox(),this._procField("subsegment_count","uint",32),this._procEntries("subsegments",this.subsegment_count,function(a){this._procEntryField(a,"ranges_count","uint",32),this._procSubEntries(a,"ranges",a.ranges_count,function(a){this._procEntryField(a,"level","uint",8),this._procEntryField(a,"range_size","uint",24)})})},f.prototype._boxProcessors.stsd=function(){this._procFullBox(),this._procField("entry_count","uint",32),this._procSubBoxes("entries",this.entry_count)},f.prototype._boxProcessors.subs=function(){this._procFullBox(),this._procField("entry_count","uint",32),this._procEntries("entries",this.entry_count,function(a){this._procEntryField(a,"sample_delta","uint",32),this._procEntryField(a,"subsample_count","uint",16),this._procSubEntries(a,"subsamples",a.subsample_count,function(a){this._procEntryField(a,"subsample_size","uint",1===this.version?32:16),this._procEntryField(a,"subsample_priority","uint",8),this._procEntryField(a,"discardable","uint",8),this._procEntryField(a,"codec_specific_parameters","uint",32)})})},f.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)},f.prototype._boxProcessors.tfdt=function(){this._procFullBox(),this._procField("baseMediaDecodeTime","uint",1==this.version?64:32)},f.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)},f.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(a){this._procEntryField(a,"time","uint",1===this.version?64:32),this._procEntryField(a,"moof_offset","uint",1===this.version?64:32),this._procEntryField(a,"traf_number","uint",8*(this.length_size_of_traf_num+1)),this._procEntryField(a,"trun_number","uint",8*(this.length_size_of_trun_num+1)),this._procEntryField(a,"sample_number","uint",8*(this.length_size_of_sample_num+1))})},f.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)},f.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)},f.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(a){256&this.flags&&this._procEntryField(a,"sample_duration","uint",32),512&this.flags&&this._procEntryField(a,"sample_size","uint",32),1024&this.flags&&this._procEntryField(a,"sample_flags","uint",32),2048&this.flags&&this._procEntryField(a,"sample_composition_time_offset",1===this.version?"int":"uint",32)})},f.prototype._boxProcessors["url "]=f.prototype._boxProcessors["urn "]=function(){this._procFullBox(),"urn "===this.type&&this._procField("name","string",-1),this._procField("location","string",-1)},f.prototype._boxProcessors.vlab=function(){this._procField("source_label","utf8")},f.prototype._boxProcessors.vmhd=function(){this._procFullBox(),this._procField("graphicsmode","uint",16),this._procFieldArray("opcolor",3,"uint",16)},f.prototype._boxProcessors.vttC=function(){this._procField("config","utf8")},f.prototype._boxProcessors.vtte=function(){}},{}],12:[function(a,b,c){(function(a){function b(a){return Array.isArray?Array.isArray(a):"[object Array]"===q(a)}function d(a){return"boolean"==typeof a}function e(a){return null===a}function f(a){return null==a}function g(a){return"number"==typeof a}function h(a){return"string"==typeof a}function i(a){return"symbol"==typeof a}function j(a){return void 0===a}function k(a){return"[object RegExp]"===q(a)}function l(a){return"object"==typeof a&&null!==a}function m(a){return"[object Date]"===q(a)}function n(a){return"[object Error]"===q(a)||a instanceof Error}function o(a){return"function"==typeof a}function p(a){return null===a||"boolean"==typeof a||"number"==typeof a||"string"==typeof a||"symbol"==typeof a||void 0===a}function q(a){return Object.prototype.toString.call(a)}c.isArray=b,c.isBoolean=d,c.isNull=e,c.isNullOrUndefined=f,c.isNumber=g,c.isString=h,c.isSymbol=i,c.isUndefined=j,c.isRegExp=k,c.isObject=l,c.isDate=m,c.isError=n,c.isFunction=o,c.isPrimitive=p,c.isBuffer=a.isBuffer}).call(this,{isBuffer:a(24)})},{24:24}],13:[function(a,b,c){function d(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function e(a){return"function"==typeof a}function f(a){return"number"==typeof a}function g(a){return"object"==typeof a&&null!==a}function h(a){return void 0===a}b.exports=d,d.EventEmitter=d,d.prototype._events=void 0,d.prototype._maxListeners=void 0,d.defaultMaxListeners=10,d.prototype.setMaxListeners=function(a){if(!f(a)||a<0||isNaN(a))throw TypeError("n must be a positive number");return this._maxListeners=a,this},d.prototype.emit=function(a){var b,c,d,f,i,j;if(this._events||(this._events={}),"error"===a&&(!this._events.error||g(this._events.error)&&!this._events.error.length)){if((b=arguments[1])instanceof Error)throw b;throw TypeError('Uncaught, unspecified "error" event.')}if(c=this._events[a],h(c))return!1;if(e(c))switch(arguments.length){case 1:c.call(this);break;case 2:c.call(this,arguments[1]);break;case 3:c.call(this,arguments[1],arguments[2]);break;default:for(d=arguments.length,f=new Array(d-1),i=1;i<d;i++)f[i-1]=arguments[i];c.apply(this,f)}else if(g(c)){for(d=arguments.length,f=new Array(d-1),i=1;i<d;i++)f[i-1]=arguments[i];for(j=c.slice(),d=j.length,i=0;i<d;i++)j[i].apply(this,f)}return!0},d.prototype.addListener=function(a,b){var c;if(!e(b))throw TypeError("listener must be a function");if(this._events||(this._events={}),this._events.newListener&&this.emit("newListener",a,e(b.listener)?b.listener:b),this._events[a]?g(this._events[a])?this._events[a].push(b):this._events[a]=[this._events[a],b]:this._events[a]=b,g(this._events[a])&&!this._events[a].warned){var c;c=h(this._maxListeners)?d.defaultMaxListeners:this._maxListeners,c&&c>0&&this._events[a].length>c&&(this._events[a].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[a].length),"function"==typeof console.trace&&console.trace())}return this},d.prototype.on=d.prototype.addListener,d.prototype.once=function(a,b){function c(){this.removeListener(a,c),d||(d=!0,b.apply(this,arguments))}if(!e(b))throw TypeError("listener must be a function");var d=!1;return c.listener=b,this.on(a,c),this},d.prototype.removeListener=function(a,b){var c,d,f,h;if(!e(b))throw TypeError("listener must be a function");if(!this._events||!this._events[a])return this;if(c=this._events[a],f=c.length,d=-1,c===b||e(c.listener)&&c.listener===b)delete this._events[a],this._events.removeListener&&this.emit("removeListener",a,b);else if(g(c)){for(h=f;h-- >0;)if(c[h]===b||c[h].listener&&c[h].listener===b){d=h;break}if(d<0)return this;1===c.length?(c.length=0,delete this._events[a]):c.splice(d,1),this._events.removeListener&&this.emit("removeListener",a,b)}return this},d.prototype.removeAllListeners=function(a){var b,c;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[a]&&delete this._events[a],this;if(0===arguments.length){for(b in this._events)"removeListener"!==b&&this.removeAllListeners(b);return this.removeAllListeners("removeListener"),this._events={},this}if(c=this._events[a],e(c))this.removeListener(a,c);else for(;c.length;)this.removeListener(a,c[c.length-1]);return delete this._events[a],this},d.prototype.listeners=function(a){return this._events&&this._events[a]?e(this._events[a])?[this._events[a]]:this._events[a].slice():[]},d.listenerCount=function(a,b){return a._events&&a._events[b]?e(a._events[b])?1:a._events[b].length:0}},{}],14:[function(a,b,c){"use strict";b.exports=function a(b,c){if(b===c)return!0;var d,e=Array.isArray(b),f=Array.isArray(c);if(e&&f){if(b.length!=c.length)return!1;for(d=0;d<b.length;d++)if(!a(b[d],c[d]))return!1;return!0}if(e!=f)return!1;if(b&&c&&"object"==typeof b&&"object"==typeof c){var g=Object.keys(b);if(g.length!==Object.keys(c).length)return!1;var h=b instanceof Date,i=c instanceof Date;if(h&&i)return b.getTime()==c.getTime();if(h!=i)return!1;var j=b instanceof RegExp,k=c instanceof RegExp;if(j&&k)return b.toString()==c.toString();if(j!=k)return!1;for(d=0;d<g.length;d++)if(!Object.prototype.hasOwnProperty.call(c,g[d]))return!1;for(d=0;d<g.length;d++)if(!a(b[g[d]],c[g[d]]))return!1;return!0}return!1}},{}],15:[function(a,b,c){c.read=function(a,b,c,d,e){var f,g,h=8*e-d-1,i=(1<<h)-1,j=i>>1,k=-7,l=c?e-1:0,m=c?-1:1,n=a[b+l];for(l+=m,f=n&(1<<-k)-1,n>>=-k,k+=h;k>0;f=256*f+a[b+l],l+=m,k-=8);for(g=f&(1<<-k)-1,f>>=-k,k+=d;k>0;g=256*g+a[b+l],l+=m,k-=8);if(0===f)f=1-j;else{if(f===i)return g?NaN:1/0*(n?-1:1);g+=Math.pow(2,d),f-=j}return(n?-1:1)*g*Math.pow(2,f-d)},c.write=function(a,b,c,d,e,f){var g,h,i,j=8*f-e-1,k=(1<<j)-1,l=k>>1,m=23===e?Math.pow(2,-24)-Math.pow(2,-77):0,n=d?0:f-1,o=d?1:-1,p=b<0||0===b&&1/b<0?1:0;for(b=Math.abs(b),isNaN(b)||b===1/0?(h=isNaN(b)?1:0,g=k):(g=Math.floor(Math.log(b)/Math.LN2),b*(i=Math.pow(2,-g))<1&&(g--,i*=2),b+=g+l>=1?m/i:m*Math.pow(2,1-l),b*i>=2&&(g++,i/=2),g+l>=k?(h=0,g=k):g+l>=1?(h=(b*i-1)*Math.pow(2,e),g+=l):(h=b*Math.pow(2,l-1)*Math.pow(2,e),g=0));e>=8;a[c+n]=255&h,n+=o,h/=256,e-=8);for(g=g<<e|h,j+=e;j>0;a[c+n]=255&g,n+=o,g/=256,j-=8);a[c+n-o]|=128*p}},{}],16:[function(a,b,c){!function(a,b,c,d,e){function f(a){this.node=a}function g(){this.events=[],this.head=null,this.body=null}function h(){this.styling=null,this.layout=null}function i(){this.styles={}}function j(){this.id=null,this.styleAttrs=null,this.styleRefs=null}function k(){this.regions={}}function l(a){this.kind=a,this.begin=null,this.end=null,this.styleAttrs=null,this.regionID=null,this.sets=null,this.timeContainer=null}function m(){l.call(this,"body")}function n(){l.call(this,"div")}function o(){l.call(this,"p")}function p(){l.call(this,"span"),this.space=null}function q(){l.call(this,"span"),this.space=null,this.text=null}function r(){l.call(this,"br")}function s(){this.id=null,this.begin=null,this.end=null,this.styleAttrs=null,this.sets=null}function t(){this.begin=null,this.end=null,this.qname=null,this.value=null}function u(a){return a&&"xml:id"in a.attributes?a.attributes["xml:id"].value||null:null}function v(a){return a&&"region"in a.attributes?a.attributes.region.value:""}function w(a,b){var c=a&&"timeContainer"in a.attributes?a.attributes.timeContainer.value:null;return c&&"par"!==c?"seq"===c?"seq":(K(b,"Illegal value of timeContainer (assuming 'par')"),"par"):"par"}function x(a){return a&&"style"in a.attributes?a.attributes.style.value.split(" "):[]}function y(a,b){var c={};if(null!==a)for(var e in a.attributes){var f=a.attributes[e].uri+" "+a.attributes[e].local,g=d.byQName[f];if(void 0!==g){var h=g.parse(a.attributes[e].value);null!==h?(c[f]=h,g===d.byName.zIndex&&J(b,"zIndex attribute present but not used by IMSC1 since regions do not overlap")):K(b,"Cannot parse styling attribute "+f+" --\x3e "+a.attributes[e].value)}}return c}function z(a,b,c){for(var d in a.attributes)if(a.attributes[d].uri===b&&a.attributes[d].local===c)return a.attributes[d].value;return null}function A(a,b){var d=z(a,c.ns_ittp,"aspectRatio"),e=null;if(null!==d){var f=/(\d+) (\d+)/,g=f.exec(d);if(null!==g){var h=parseInt(g[1]),i=parseInt(g[2]);0!==h&&0!==i?e=h/i:K(b,"Illegal aspectRatio values (ignoring)")}else K(b,"Malformed aspectRatio attribute (ignoring)")}return e}function B(a,b){var d=z(a,c.ns_ttp,"cellResolution"),e=15,f=32;if(null!==d){var g=/(\d+) (\d+)/,h=g.exec(d);null!==h?(f=parseInt(h[1]),e=parseInt(h[2])):J(b,"Malformed cellResolution value (using initial value instead)")}return{w:f,h:e}}function C(a,b){var d,e=z(a,c.ns_ttp,"frameRate"),f=30;if(null!==e){d=/(\d+)/.exec(e),null!==d?f=parseInt(d[1]):J(b,"Malformed frame rate attribute (using initial value instead)")}var g=z(a,c.ns_ttp,"frameRateMultiplier"),h=1;if(null!==g){d=/(\d+) (\d+)/.exec(g),null!==d?h=parseInt(d[1])/parseInt(d[2]):J(b,"Malformed frame rate multiplier attribute (using initial value instead)")}var i=h*f,j=1,k=z(a,c.ns_ttp,"tickRate");if(null===k)null!==e&&(j=i);else{d=/(\d+)/.exec(k),null!==d?j=parseInt(d[1]):J(b,"Malformed tick rate attribute (using initial value instead)")}return{effectiveFrameRate:i,tickRate:j}}function D(a,b){var d=z(a,c.ns_tts,"extent");if(null===d)return null;var f=d.split(" ");if(2!==f.length)return J(b,"Malformed extent (ignoring)"),null;var g=e.parseLength(f[0]),h=e.parseLength(f[1]);return h&&g?{h:h,w:g}:(J(b,"Malformed extent values (ignoring)"),null)}function E(a,b,c){
10
+ var d,e=/^(\d{2,}):(\d\d):(\d\d(?:\.\d+)?)#x2F;,f=/^(\d{2,}):(\d\d):(\d\d)\:(\d{2,})#x2F;,g=/^(\d+(?:\.\d+)?)f#x2F;,h=/^(\d+(?:\.\d+)?)t#x2F;,i=/^(\d+(?:\.\d+)?)ms#x2F;,j=/^(\d+(?:\.\d+)?)s#x2F;,k=/^(\d+(?:\.\d+)?)h#x2F;,l=/^(\d+(?:\.\d+)?)m#x2F;,m=null;return null!==(d=g.exec(c))?null!==b&&(m=parseFloat(d[1])/b):null!==(d=h.exec(c))?null!==a&&(m=parseFloat(d[1])/a):null!==(d=i.exec(c))?m=parseFloat(d[1])/1e3:null!==(d=j.exec(c))?m=parseFloat(d[1]):null!==(d=k.exec(c))?m=3600*parseFloat(d[1]):null!==(d=l.exec(c))?m=60*parseFloat(d[1]):null!==(d=e.exec(c))?m=3600*parseInt(d[1])+60*parseInt(d[2])+parseFloat(d[3]):null!==(d=f.exec(c))&&null!==b&&(m=3600*parseInt(d[1])+60*parseInt(d[2])+parseInt(d[3])+(null===d[4]?0:parseInt(d[4])/b)),m}function F(a,b,c,d){var e=b&&"seq"===b.timeContainer,f=0;c&&"begin"in c.attributes&&null===(f=E(a.tickRate,a.effectiveFrameRate,c.attributes.begin.value))&&(J(d,"Malformed begin value "+c.attributes.begin.value+" (using 0)"),f=0);var g=e?0:null;c&&"dur"in c.attributes&&null===(g=E(a.tickRate,a.effectiveFrameRate,c.attributes.dur.value))&&J(d,"Malformed dur value "+c.attributes.dur.value+" (ignoring)");var h=null;c&&"end"in c.attributes&&null===(h=E(a.tickRate,a.effectiveFrameRate,c.attributes.end.value))&&J(d,"Malformed end value (ignoring)");var i=0;if(b&&(i=e&&"contents"in b&&b.contents.length>0?b.contents[b.contents.length-1].end:b.begin||0),f+=i,null!==g)h=f+g;else{var j=b&&"end"in b?b.end:Number.POSITIVE_INFINITY;h=null!==h?h+i:j}return{begin:f,end:h}}function G(a,b,c){for(;b.styleRefs.length>0;){var d=b.styleRefs.pop();d in a.styles?(G(a,a.styles[d],c),I(a.styles[d].styleAttrs,b.styleAttrs)):K(c,"Non-existant style id referenced")}}function H(a,b,c,d){for(var e=b.length-1;e>=0;e--){var f=b[e];f in a.styles?I(a.styles[f].styleAttrs,c):K(d,"Non-existant style id referenced")}}function I(a,b){for(var c in a)c in b||(b[c]=a[c])}function J(a,b){if(a&&a.warn&&a.warn(b))throw b}function K(a,b){if(a&&a.error&&a.error(b))throw b}function L(a,b){throw a&&a.fatal&&a.fatal(b),b}function M(a,b){for(var c,d=0,e=a.length-1;d<=e;){c=Math.floor((d+e)/2);var f=a[c];if(f<b)d=c+1;else{if(!(f>b))return{found:!0,index:c};e=c-1}}return{found:!1,index:d}}a.fromXML=function(a,d,e){var l=b.parser(!0,{xmlns:!0}),u=[],v=[],w=[],x=0,y=null;l.onclosetag=function(a){if(u[0]instanceof i)for(var b in u[0].styles)G(u[0],u[0].styles[b],d);else if(u[0]instanceof o||u[0]instanceof p){if(u[0].contents.length>1){var g,h=[u[0].contents[0]];for(g=1;g<u[0].contents.length;g++)u[0].contents[g]instanceof q&&h[h.length-1]instanceof q?h[h.length-1].text+=u[0].contents[g].text:h.push(u[0].contents[g]);u[0].contents=h}u[0]instanceof p&&1===u[0].contents.length&&u[0].contents[0]instanceof q&&null===u[0].text&&(u[0].text=u[0].contents[0].text,delete u[0].contents)}else u[0]instanceof f&&(u[0].node.uri===c.ns_tt&&"metadata"===u[0].node.local?x--:x>0&&e&&"onCloseTag"in e&&e.onCloseTag());w.shift(),v.shift(),u.shift()},l.ontext=function(a){if(void 0===u[0]);else if(u[0]instanceof p||u[0]instanceof o){var b=new q;b.initFromText(y,u[0],a,w[0],d),u[0].contents.push(b)}else u[0]instanceof f&&x>0&&e&&"onText"in e&&e.onText(a)},l.onopentag=function(a){var b=a.attributes["xml:space"];b?w.unshift(b.value):0===w.length?w.unshift("default"):w.unshift(w[0]);var l=a.attributes["xml:lang"];if(l?v.unshift(l.value):0===v.length?v.unshift(""):v.unshift(v[0]),a.uri===c.ns_tt)if("tt"===a.local)null!==y&&L("Two <tt> elements at ("+this.line+","+this.column+")"),y=new g,y.initFromNode(a,d),u.unshift(y);else if("head"===a.local)u[0]instanceof g||L("Parent of <head> element is not <tt> at ("+this.line+","+this.column+")"),null!==y.head&&L("Second <head> element at ("+this.line+","+this.column+")"),y.head=new h,u.unshift(y.head);else if("styling"===a.local)u[0]instanceof h||L("Parent of <styling> element is not <head> at ("+this.line+","+this.column+")"),null!==y.head.styling&&L("Second <styling> element at ("+this.line+","+this.column+")"),y.head.styling=new i,u.unshift(y.head.styling);else if("style"===a.local){var q;u[0]instanceof i?(q=new j,q.initFromNode(a,d),q.id?y.head.styling.styles[q.id]=q:K("<style> element missing @id attribute"),u.unshift(q)):u[0]instanceof s?(q=new j,q.initFromNode(a,d),I(q.styleAttrs,u[0].styleAttrs),u.unshift(q)):L(d,"Parent of <style> element is not <styling> or <region> at ("+this.line+","+this.column+")")}else if("layout"===a.local)u[0]instanceof h||L(d,"Parent of <layout> element is not <head> at "+this.line+","+this.column+")"),null!==y.head.layout&&L(d,"Second <layout> element at "+this.line+","+this.column+")"),y.head.layout=new k,u.unshift(y.head.layout);else if("region"===a.local){u[0]instanceof k||L(d,"Parent of <region> element is not <layout> at "+this.line+","+this.column+")");var z=new s;z.initFromNode(y,a,d),!z.id||z.id in y.head.layout.regions?K(d,"Ignoring <region> with duplicate or missing @id at "+this.line+","+this.column+")"):(y.head.layout.regions[z.id]=z,y._registerEvent(z)),u.unshift(z)}else if("body"===a.local){u[0]instanceof g||L(d,"Parent of <body> element is not <tt> at "+this.line+","+this.column+")"),null!==y.body&&L(d,"Second <body> element at "+this.line+","+this.column+")");var A=new m;A.initFromNode(y,a,d),y._registerEvent(A),y.body=A,u.unshift(A)}else if("div"===a.local){u[0]instanceof n||u[0]instanceof m||L(d,"Parent of <div> element is not <body> or <div> at "+this.line+","+this.column+")");var B=new n;B.initFromNode(y,u[0],a,d),y._registerEvent(B),u[0].contents.push(B),u.unshift(B)}else if("p"===a.local){u[0]instanceof n||L(d,"Parent of <p> element is not <div> at "+this.line+","+this.column+")");var C=new o;C.initFromNode(y,u[0],a,d),y._registerEvent(C),u[0].contents.push(C),u.unshift(C)}else if("span"===a.local){u[0]instanceof p||u[0]instanceof o||L(d,"Parent of <span> element is not <span> or <p> at "+this.line+","+this.column+")");var D=new p;D.initFromNode(y,u[0],a,w[0],d),y._registerEvent(D),u[0].contents.push(D),u.unshift(D)}else if("br"===a.local){u[0]instanceof p||u[0]instanceof o||L(d,"Parent of <br> element is not <span> or <p> at "+this.line+","+this.column+")");var E=new r;E.initFromNode(y,u[0],a,d),y._registerEvent(E),u[0].contents.push(E),u.unshift(E)}else if("set"===a.local){u[0]instanceof p||u[0]instanceof o||u[0]instanceof n||u[0]instanceof m||u[0]instanceof s||u[0]instanceof r||L(d,"Parent of <set> element is not a content element or a region at "+this.line+","+this.column+")");var F=new t;F.initFromNode(y,u[0],a,d),y._registerEvent(F),u[0].sets.push(F),u.unshift(F)}else u.unshift(new f(a));else u.unshift(new f(a));if(u[0]instanceof f)if(a.uri===c.ns_tt&&"metadata"===a.local)x++;else if(x>0&&e&&"onOpenTag"in e){var G=[];for(var H in a.attributes)G[a.attributes[H].uri+" "+a.attributes[H].local]={uri:a.attributes[H].uri,local:a.attributes[H].local,value:a.attributes[H].value};e.onOpenTag(a.uri,a.local,G)}},l.write(a).close(),null!==y.head?delete y.head.styling:y.head=new h,null===y.head.layout&&(y.head.layout=new k);var z=!1;for(var A in y.head.layout.regions){z=!0;break}if(!z){var B=s.createDefaultRegion();y.head.layout.regions[B.id]=B}return y},g.prototype.initFromNode=function(a,b){this.cellResolution=B(a,b);var d=C(a,b);this.effectiveFrameRate=d.effectiveFrameRate,this.tickRate=d.tickRate,this.aspectRatio=A(a,b);var e=z(a,c.ns_ttp,"timeBase");null!==e&&"media"!==e&&L(b,"Unsupported time base");var f=D(a,b);null===f?this.pxDimensions={h:480,w:640}:("px"===f.h.unit&&"px"===f.w.unit||L(b,"Extent on TT must be in px or absent"),this.pxDimensions={h:f.h.value,w:f.w.value})},g.prototype._registerEvent=function(a){if(!(a.end<=a.begin)){var b=M(this.events,a.begin);if(b.found||this.events.splice(b.index,0,a.begin),a.end!==Number.POSITIVE_INFINITY){var c=M(this.events,a.end);c.found||this.events.splice(c.index,0,a.end)}}},g.prototype.getMediaTimeRange=function(){return[this.events[0],this.events[this.events.length-1]]},g.prototype.getMediaTimeEvents=function(){return this.events},j.prototype.initFromNode=function(a,b){this.id=u(a),this.styleAttrs=y(a,b),this.styleRefs=x(a)},l.prototype.initFromNode=function(a,b,c,d){var e=F(a,b,c,d);this.begin=e.begin,this.end=e.end,this.styleAttrs=y(c,d),null!==a.head&&null!==a.head.styling&&H(a.head.styling,x(c),this.styleAttrs,d),this.regionID=v(c),this.sets=[],this.timeContainer=w(c,d)},m.prototype.initFromNode=function(a,b,c){l.prototype.initFromNode.call(this,a,null,b,c),this.contents=[]},n.prototype.initFromNode=function(a,b,c,d){l.prototype.initFromNode.call(this,a,b,c,d),this.contents=[]},o.prototype.initFromNode=function(a,b,c,d){l.prototype.initFromNode.call(this,a,b,c,d),this.contents=[]},p.prototype.initFromNode=function(a,b,c,d,e){l.prototype.initFromNode.call(this,a,b,c,e),this.space=d,this.contents=[]},q.prototype.initFromText=function(a,b,c,d,e){l.prototype.initFromNode.call(this,a,b,null,e),this.text=c,this.space=d},r.prototype.initFromNode=function(a,b,c,d){l.prototype.initFromNode.call(this,a,b,c,d)},s.createDefaultRegion=function(){var a=new s;return a.id="",a.begin=0,a.end=Number.POSITIVE_INFINITY,a.styleAttrs={},a.sets=[],a},s.prototype.initFromNode=function(a,b,c){this.id=u(b);var d=F(a,null,b,c);this.begin=d.begin,this.end=d.end,this.styleAttrs=y(b,c),this.sets=[],null!==a.head&&null!==a.head.styling&&H(a.head.styling,x(b),this.styleAttrs,c)},t.prototype.initFromNode=function(a,b,c,d){var e=F(a,b,c,d);this.begin=e.begin,this.end=e.end;var f=y(c,d);for(var g in f){if(this.qname){K(d,"More than one style specified on set");break}this.qname=g,this.value=f[g]}}}(void 0===c?this.imscDoc={}:c,"undefined"==typeof sax?a(43):sax,"undefined"==typeof imscNames?a(20):imscNames,"undefined"==typeof imscStyles?a(21):imscStyles,"undefined"==typeof imscUtils?a(22):imscUtils)},{20:20,21:21,22:22,43:43}],17:[function(a,b,c){!function(a,b,c){function d(a,b,h){var j;if("region"===h.kind?(j=document.createElement("div"),j.style.position="absolute"):"body"===h.kind?j=document.createElement("div"):"div"===h.kind?j=document.createElement("div"):"p"===h.kind?j=document.createElement("p"):"span"===h.kind?j=document.createElement("span"):"br"===h.kind&&(j=document.createElement("br")),!j)return void n(a.errorHandler,"Error processing ISD element kind: "+h.kind);j.style.margin="0";for(var k in o){var l=o[k],m=h.styleAttrs[l.qname];void 0!==m&&null!==l.map&&l.map(a,j,h,m)}var p=j,q=h.styleAttrs[c.byName.multiRowAlign.qname];if(q&&"auto"!==q){var r=document.createElement("span");r.style.display="inline-block",r.style.textAlign=q,j.appendChild(r),p=r,a.mra=q}var s=h.styleAttrs[c.byName.linePadding.qname];if(s&&s>0&&(a.lp=s),"span"===h.kind&&h.text)if(a.lp||a.mra)for(var t=0;t<h.text.length;t++){var u=document.createElement("span");u.textContent=h.text.charAt(t),j.appendChild(u)}else j.textContent=h.text;b.appendChild(j);for(var v in h.contents)d(a,p,h.contents[v]);if((a.lp||a.mra)&&"p"===h.kind){var w=[];f(p,w,"red"),i(w,a.lp*a.h),a.lp&&delete a.lp,a.mra&&delete a.mra}if("region"===h.kind){var x=[];g(p,x);var y=h.styleAttrs[c.byName.writingMode.qname];if(("lrtb"===y||"lr"===y||"rltb"===y||"rl"===y)&&a.enableRollUp&&h.contents.length>0&&"after"===h.styleAttrs[c.byName.displayAlign.qname]){var z=""===h.id?"_":h.id,A=new e(z,x);if(a.currentISDState[A.id]=A,a.previousISDState&&A.id in a.previousISDState&&a.previousISDState[A.id].plist.length>0&&A.plist.length>1&&A.plist[A.plist.length-2].text===a.previousISDState[A.id].plist[a.previousISDState[A.id].plist.length-1].text){var B=j.firstElementChild;B.style.bottom="-"+A.plist[A.plist.length-1].height+"px",B.style.transition="transform 0.4s",B.style.position="relative",B.style.transform="translateY(-"+A.plist[A.plist.length-1].height+"px)"}}}}function e(a,b){this.id=a,this.plist=b}function f(a,b,c){if(0===a.childElementCount)b.push({element:a,bgcolor:c});else for(var d=a.style.backgroundColor||c,e=a.firstChild;e;)e.nodeType===Node.ELEMENT_NODE&&f(e,b,d),e=e.nextSibling}function g(a,b){if(0===a.childElementCount&&"span"===a.localName){var c=a.getBoundingClientRect();0!==b.length&&h(c.top,c.height,b[b.length-1].top,b[b.length-1].height)?(c.top<b[b.length-1].top&&(b[b.length-1].top=c.top),c.height>b[b.length-1].height&&(b[b.length-1].height=c.height),b[b.length-1].text+=a.textContent):b.push({top:c.top,height:c.height,text:a.textContent})}else for(var d=a.firstChild;d;)d.nodeType===Node.ELEMENT_NODE&&g(d,b),d=d.nextSibling}function h(a,b,c,d){return a+b<c+d&&a>c||c+d<=a+b&&c>=a}function i(a,b){for(var c=null,d=!0,e=!1,f=0;f<=a.length;f++)if(f===a.length||"br"!==a[f].element.localName){if(null===c||f===a.length||!h(a[f].element.getBoundingClientRect().top,a[f].element.getBoundingClientRect().height,a[c].element.getBoundingClientRect().top,a[c].element.getBoundingClientRect().height)){if(b&&!d){for(;--f>=0;)if(0!==a[f].element.getBoundingClientRect().width){if(k(a[f].element,a[f].color,b),0!==a[f].element.getBoundingClientRect().width&&h(a[f].element.getBoundingClientRect().top,a[f].element.getBoundingClientRect().height,a[c].element.getBoundingClientRect().top,a[c].element.getBoundingClientRect().height))break;l(a[f].element)}d=!0;continue}if(f!==a.length&&null!==c&&!e){var g=document.createElement("br");a[f].element.parentElement.insertBefore(g,a[f].element),a.splice(f,0,{element:g}),e=!0;continue}if(f!==a.length&&b)for(;f<a.length;f++)if(0!==a[f].element.getBoundingClientRect().width){j(a[f].element,a[f].color,b);break}d=!1,e=!1,c=f}}else e=!0}function j(a,b,c){a.style.paddingLeft=c+"px",a.style.backgroundColor=b}function k(a,b,c){a.style.paddingRight=c+"px",a.style.backgroundColor=b}function l(a){a.style.paddingRight=null}function m(a,b){this.qname=a,this.map=b}function n(a,b){if(a&&a.error&&a.error(b))throw b}a.render=function(a,b,c,e,f,g,h,i,j){var k=e||b.clientHeight,l=f||b.clientWidth;if(null!==a.aspectRatio){var m=k*a.aspectRatio;m>l?k=Math.round(l/a.aspectRatio):l=m}var n=document.createElement("div");n.style.position="relative",n.style.width=l+"px",n.style.height=k+"px",n.style.margin="auto",n.style.top=0,n.style.bottom=0,n.style.left=0,n.style.right=0,n.style.zIndex=0;var o={h:k,w:l,regionH:null,regionW:null,imgResolver:c,displayForcedOnlyMode:g||!1,isd:a,errorHandler:h,previousISDState:i,enableRollUp:j||!1,currentISDState:{}};b.appendChild(n);for(var p in a.contents)d(o,n,a.contents[p]);return o.currentISDState};var o=[new m("http://www.w3.org/ns/ttml#styling backgroundColor",function(a,b,c,d){b.style.backgroundColor="rgba("+d[0].toString()+","+d[1].toString()+","+d[2].toString()+","+(d[3]/255).toString()+")"}),new m("http://www.w3.org/ns/ttml#styling color",function(a,b,c,d){b.style.color="rgba("+d[0].toString()+","+d[1].toString()+","+d[2].toString()+","+(d[3]/255).toString()+")"}),new m("http://www.w3.org/ns/ttml#styling direction",function(a,b,c,d){b.style.direction=d}),new m("http://www.w3.org/ns/ttml#styling display",function(a,b,c,d){}),new m("http://www.w3.org/ns/ttml#styling displayAlign",function(a,b,c,d){b.style.display="flex",b.style.flexDirection="column","before"===d?b.style.justifyContent="flex-start":"center"===d?b.style.justifyContent="center":"after"===d&&(b.style.justifyContent="flex-end")}),new m("http://www.w3.org/ns/ttml#styling extent",function(a,b,c,d){a.regionH=d.h*a.h,a.regionW=d.w*a.w;var e=0,f=0,g=c.styleAttrs["http://www.w3.org/ns/ttml#styling padding"];g&&(e=(g[0]+g[2])*a.h,f=(g[1]+g[3])*a.w),b.style.height=a.regionH-e+"px",b.style.width=a.regionW-f+"px"}),new m("http://www.w3.org/ns/ttml#styling fontFamily",function(a,b,c,d){var e=[];for(var f in d)"monospaceSerif"===d[f]?(e.push("Courier New"),e.push('"Liberation Mono"'),e.push("Courier"),e.push("monospace")):"proportionalSansSerif"===d[f]?(e.push("Arial"),e.push("Helvetica"),e.push('"Liberation Sans"'),e.push("sans-serif")):"monospace"===d[f]?e.push("monospace"):"sansSerif"===d[f]?e.push("sans-serif"):"serif"===d[f]?e.push("serif"):"monospaceSansSerif"===d[f]?(e.push("Consolas"),e.push("monospace")):"proportionalSerif"===d[f]?e.push("serif"):e.push(d[f]);b.style.fontFamily=e.join(",")}),new m("http://www.w3.org/ns/ttml#styling fontSize",function(a,b,c,d){b.style.fontSize=d*a.h+"px"}),new m("http://www.w3.org/ns/ttml#styling fontStyle",function(a,b,c,d){b.style.fontStyle=d}),new m("http://www.w3.org/ns/ttml#styling fontWeight",function(a,b,c,d){b.style.fontWeight=d}),new m("http://www.w3.org/ns/ttml#styling lineHeight",function(a,b,c,d){b.style.lineHeight="normal"===d?"normal":d*a.h+"px"}),new m("http://www.w3.org/ns/ttml#styling opacity",function(a,b,c,d){b.style.opacity=d}),new m("http://www.w3.org/ns/ttml#styling origin",function(a,b,c,d){b.style.top=d.h*a.h+"px",b.style.left=d.w*a.w+"px"}),new m("http://www.w3.org/ns/ttml#styling overflow",function(a,b,c,d){b.style.overflow=d}),new m("http://www.w3.org/ns/ttml#styling padding",function(a,b,c,d){var e=[];e[0]=d[0]*a.h+"px",e[1]=d[3]*a.w+"px",e[2]=d[2]*a.h+"px",e[3]=d[1]*a.w+"px",b.style.padding=e.join(" ")}),new m("http://www.w3.org/ns/ttml#styling showBackground",null),new m("http://www.w3.org/ns/ttml#styling textAlign",function(a,b,d,e){var f,g=d.styleAttrs[c.byName.direction.qname];f="start"===e?"rtl"===g?"right":"left":"end"===e?"rtl"===g?"left":"right":e,b.style.textAlign=f}),new m("http://www.w3.org/ns/ttml#styling textDecoration",function(a,b,c,d){b.style.textDecoration=d.join(" ").replace("lineThrough","line-through")}),new m("http://www.w3.org/ns/ttml#styling textOutline",function(a,b,c,d){b.style.textShadow="none"===d?"":"rgba("+d.color[0].toString()+","+d.color[1].toString()+","+d.color[2].toString()+","+(d.color[3]/255).toString()+") 0px 0px "+d.thickness*a.h+"px"}),new m("http://www.w3.org/ns/ttml#styling unicodeBidi",function(a,b,c,d){var e;e="bidiOverride"===d?"bidi-override":d,b.style.unicodeBidi=e}),new m("http://www.w3.org/ns/ttml#styling visibility",function(a,b,c,d){b.style.visibility=d}),new m("http://www.w3.org/ns/ttml#styling wrapOption",function(a,b,c,d){"wrap"===d?"preserve"===c.space?b.style.whiteSpace="pre-wrap":b.style.whiteSpace="normal":"preserve"===c.space?b.style.whiteSpace="pre":b.style.whiteSpace="noWrap"}),new m("http://www.w3.org/ns/ttml#styling writingMode",function(a,b,c,d){"lrtb"===d||"lr"===d?b.style.writingMode="horizontal-tb":"rltb"===d||"rl"===d?b.style.writingMode="horizontal-tb":"tblr"===d?b.style.writingMode="vertical-lr":"tbrl"!==d&&"tb"!==d||(b.style.writingMode="vertical-rl")}),new m("http://www.w3.org/ns/ttml#styling zIndex",function(a,b,c,d){b.style.zIndex=d}),new m("http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt backgroundImage",function(a,b,c,d){if(null!==a.imgResolver&&null!==d){var e=document.createElement("img"),f=a.imgResolver(d,e);f&&(e.src=f),e.height=a.regionH,e.width=a.regionW,b.appendChild(e)}}),new m("http://www.w3.org/ns/ttml/profile/imsc1#styling forcedDisplay",function(a,b,c,d){a.displayForcedOnlyMode&&!1===d&&(b.style.visibility="hidden")})],p={};for(var q in o)p[o[q].qname]=o[q]}(void 0===c?this.imscHTML={}:c,"undefined"==typeof imscNames?a(20):imscNames,"undefined"==typeof imscStyles?a(21):imscStyles)},{20:20,21:21}],18:[function(a,b,c){!function(a,b,c){function d(a,b,g,j,k,l,m,n){if(b<m.begin||b>=m.end)return null;var o="regionID"in m&&""!==m.regionID?m.regionID:l;if(null!==k&&o!==g.id&&(!("contents"in m)||"contents"in m&&0===m.contents.length||""!==o))return null;var p=new h(m);for(var q in m.sets)b<m.sets[q].begin||b>=m.sets[q].end||(p.styleAttrs[m.sets[q].qname]=m.sets[q].value);var r={};for(var s in p.styleAttrs)if(r[s]=!0,s===c.byName.writingMode.qname&&!(c.byName.direction.qname in p.styleAttrs)){var t=p.styleAttrs[s];"lrtb"===t||"lr"===t?p.styleAttrs[c.byName.direction.qname]="ltr":"rltb"!==t&&"rl"!==t||(p.styleAttrs[c.byName.direction.qname]="rtl")}if(null!==k)for(var u in c.all){var v=c.all[u];if(v.qname===c.byName.textDecoration.qname){var w=k.styleAttrs[v.qname],x=p.styleAttrs[v.qname],y=[];void 0===x?y=w:-1===x.indexOf("none")?((-1===x.indexOf("noUnderline")&&-1!==w.indexOf("underline")||-1!==x.indexOf("underline"))&&y.push("underline"),(-1===x.indexOf("noLineThrough")&&-1!==w.indexOf("lineThrough")||-1!==x.indexOf("lineThrough"))&&y.push("lineThrough"),(-1===x.indexOf("noOverline")&&-1!==w.indexOf("overline")||-1!==x.indexOf("overline"))&&y.push("overline")):y.push("none"),p.styleAttrs[v.qname]=y}else v.inherit&&v.qname in k.styleAttrs&&!(v.qname in p.styleAttrs)&&(p.styleAttrs[v.qname]=k.styleAttrs[v.qname])}for(var z in c.all){var A=c.all[z];A.qname in p.styleAttrs||("region"===p.kind||!1===A.inherit&&null!==A.initial)&&(p.styleAttrs[A.qname]=A.parse(A.initial),r[A.qname]=!0)}for(var B in c.all){var C=c.all[B];if(C.qname in r&&null!==C.compute){var D=C.compute(a,k,p,p.styleAttrs[C.qname]);null!==D?p.styleAttrs[C.qname]=D:i(n,"Style '"+C.qname+"' on element '"+p.kind+"' cannot be computed")}}if("none"===p.styleAttrs[c.byName.display.qname])return null;var E;null===k?E=null===j?[]:[j]:"contents"in m&&(E=m.contents);for(var F in E){var G=d(a,b,g,j,p,o,E[F]);null!==G&&p.contents.push(G.element)}for(var H in p.styleAttrs){-1===c.byQName[H].applies.indexOf(p.kind)&&delete p.styleAttrs[H]}if("span"===p.kind&&p.text&&"default"===p.space){var I=p.text.replace(/\s+/g," ");p.text=I}if("p"===p.kind){var J=[];e(p,J);for(var K=0,L="after_br",M=0;;)if("after_br"===L)K>=J.length||"br"===J[K].kind?(L="before_br",M=K,K--):("preserve"!==J[K].space&&(J[K].text=J[K].text.replace(/^\s+/g,"")),J[K].text.length>0?(L="looking_br",K++):J.splice(K,1));else if("before_br"===L)if(K<0||"br"===J[K].kind){if(L="after_br",(K=M+1)>=J.length)break}else if("preserve"!==J[K].space&&(J[K].text=J[K].text.replace(/\s+#x2F;g,"")),J[K].text.length>0){if(L="after_br",(K=M+1)>=J.length)break}else J.splice(K,1),K--;else K>=J.length||"br"===J[K].kind?(L="before_br",M=K,K--):K++;f(p)}return"div"===p.kind&&c.byName.backgroundImage.qname in p.styleAttrs||"br"===p.kind||"contents"in p&&p.contents.length>0||"span"===p.kind&&null!==p.text||"region"===p.kind&&"always"===p.styleAttrs[c.byName.showBackground.qname]?{region_id:o,element:p}:null}function e(a,b){if("contents"in a)for(var c in a.contents)e(a.contents[c],b);else b.push(a)}function f(a){if("br"===a.kind)return!1;if("text"in a)return 0===a.text.length;if("contents"in a){for(var b=a.contents.length;b--;)f(a.contents[b])&&a.contents.splice(b,1);return 0===a.contents.length}}function g(a){this.contents=[],this.aspectRatio=a.aspectRatio}function h(a){this.kind=a.kind||"region",a.id&&(this.id=a.id),this.styleAttrs={};for(var b in a.styleAttrs)this.styleAttrs[b]=a.styleAttrs[b];"text"in a?this.text=a.text:"br"!==a.kind&&(this.contents=[]),"space"in a&&(this.space=a.space)}function i(a,b){if(a&&a.error&&a.error(b))throw b}a.generateISD=function(a,b,c){var e=new g(a);for(var f in a.head.layout.regions){var h=d(a,b,a.head.layout.regions[f],a.body,null,"",a.head.layout.regions[f],c);null!==h&&e.contents.push(h.element)}return e}}(void 0===c?this.imscISD={}:c,"undefined"==typeof imscNames?a(20):imscNames,"undefined"==typeof imscStyles?a(21):imscStyles)},{20:20,21:21}],19:[function(a,b,c){c.generateISD=a(18).generateISD,c.fromXML=a(16).fromXML,c.renderHTML=a(17).render},{16:16,17:17,18:18}],20:[function(a,b,c){!function(a){a.ns_tt="http://www.w3.org/ns/ttml",a.ns_tts="http://www.w3.org/ns/ttml#styling",a.ns_ttp="http://www.w3.org/ns/ttml#parameter",a.ns_xml="http://www.w3.org/XML/1998/namespace",a.ns_itts="http://www.w3.org/ns/ttml/profile/imsc1#styling",a.ns_ittp="http://www.w3.org/ns/ttml/profile/imsc1#parameter",a.ns_smpte="http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt",a.ns_ebutts="urn:ebu:tt:style"}(void 0===c?this.imscNames={}:c)},{}],21:[function(a,b,c){!function(a,b,c){function d(a,b,c,d,e,f,g,h){this.name=b,this.ns=a,this.qname=a+" "+b,this.inherit=e,this.animatable=f,this.initial=c,this.applies=d,this.parse=g,this.compute=h}a.all=[new d(b.ns_tts,"backgroundColor","transparent",["body","div","p","region","span"],!1,!0,c.parseColor,null),new d(b.ns_tts,"color","white",["span"],!0,!0,c.parseColor,null),new d(b.ns_tts,"direction","ltr",["p","span"],!0,!0,function(a){return a},null),new d(b.ns_tts,"display","auto",["body","div","p","region","span"],!1,!0,function(a){return a},null),new d(b.ns_tts,"displayAlign","before",["region"],!1,!0,function(a){return a},null),new d(b.ns_tts,"extent","auto",["tt","region"],!1,!0,function(a){if("auto"===a)return a;var b=a.split(" ");if(2!==b.length)return null;var d=c.parseLength(b[0]),e=c.parseLength(b[1]);return e&&d?{h:e,w:d}:null},function(a,b,c,d){var e,f;if("auto"===d)e=1;else if("%"===d.h.unit)e=d.h.value/100;else{if("px"!==d.h.unit)return null;e=d.h.value/a.pxDimensions.h}if("auto"===d)f=1;else if("%"===d.w.unit)f=d.w.value/100;else{if("px"!==d.w.unit)return null;f=d.w.value/a.pxDimensions.w}return{h:e,w:f}}),new d(b.ns_tts,"fontFamily","default",["span"],!0,!0,function(a){var b=a.split(","),c=[];for(var d in b)"'"!==b[d].charAt(0)&&'"'!==b[d].charAt(0)&&"default"===b[d]?c.push("monospaceSerif"):c.push(b[d]);return c},null),new d(b.ns_tts,"fontSize","1c",["span"],!0,!0,c.parseLength,function(b,c,d,e){var f;if("%"===e.unit)f=null!==c?c.styleAttrs[a.byName.fontSize.qname]*e.value/100:e.value/100/b.cellResolution.h;else if("em"===e.unit)f=null!==c?c.styleAttrs[a.byName.fontSize.qname]*e.value:e.value/b.cellResolution.h;else if("c"===e.unit)f=e.value/b.cellResolution.h;else{if("px"!==e.unit)return null;f=e.value/b.pxDimensions.h}return f}),new d(b.ns_tts,"fontStyle","normal",["span"],!0,!0,function(a){return a},null),new d(b.ns_tts,"fontWeight","normal",["span"],!0,!0,function(a){return a},null),new d(b.ns_tts,"lineHeight","normal",["p"],!0,!0,function(a){return"normal"===a?a:c.parseLength(a)},function(b,c,d,e){var f;if("normal"===e)f=e;else if("%"===e.unit)f=d.styleAttrs[a.byName.fontSize.qname]*e.value/100;else if("em"===e.unit)f=d.styleAttrs[a.byName.fontSize.qname]*e.value;else if("c"===e.unit)f=e.value/b.cellResolution.h;else{if("px"!==e.unit)return null;f=e.value/b.pxDimensions.h}return f}),new d(b.ns_tts,"opacity",1,["region"],!1,!0,parseFloat,null),new d(b.ns_tts,"origin","auto",["region"],!1,!0,function(a){if("auto"===a)return a;var b=a.split(" ");if(2!==b.length)return null;var d=c.parseLength(b[0]),e=c.parseLength(b[1]);return e&&d?{h:e,w:d}:null},function(a,b,c,d){var e,f;if("auto"===d)e=0;else if("%"===d.h.unit)e=d.h.value/100;else{if("px"!==d.h.unit)return null;e=d.h.value/a.pxDimensions.h}if("auto"===d)f=0;else if("%"===d.w.unit)f=d.w.value/100;else{if("px"!==d.w.unit)return null;f=d.w.value/a.pxDimensions.w}return{h:e,w:f}}),new d(b.ns_tts,"overflow","hidden",["region"],!1,!0,function(a){return a},null),new d(b.ns_tts,"padding","0px",["region"],!1,!0,function(a){var b=a.split(" ");if(b.length>4)return null;var d=[];for(var e in b){var f=c.parseLength(b[e]);if(!f)return null;d.push(f)}return d},function(b,c,d,e){var f;if(1===e.length)f=[e[0],e[0],e[0],e[0]];else if(2===e.length)f=[e[0],e[1],e[0],e[1]];else if(3===e.length)f=[e[0],e[1],e[2],e[1]];else{if(4!==e.length)return null;f=[e[0],e[1],e[2],e[3]]}var g=d.styleAttrs[a.byName.writingMode.qname];if("lrtb"===g||"lr"===g)f=[f[0],f[3],f[2],f[1]];else if("rltb"===g||"rl"===g)f=[f[0],f[1],f[2],f[3]];else if("tblr"===g)f=[f[3],f[0],f[1],f[2]];else{if("tbrl"!==g&&"tb"!==g)return null;f=[f[3],f[2],f[1],f[0]]}var h=[];for(var i in f)if(0===f[i].value)h[i]=0;else if("%"===f[i].unit)h[i]="0"===i||"2"===i?d.styleAttrs[a.byName.extent.qname].h*f[i].value/100:d.styleAttrs[a.byName.extent.qname].w*f[i].value/100;else if("em"===f[i].unit)h[i]=d.styleAttrs[a.byName.fontSize.qname]*f[i].value;else if("c"===f[i].unit)h[i]=f[i].value/b.cellResolution.h;else{if("px"!==f[i].unit)return null;h[i]=f[i].value/b.pxDimensions.h}return h}),new d(b.ns_tts,"showBackground","always",["region"],!1,!0,function(a){return a},null),new d(b.ns_tts,"textAlign","start",["p"],!0,!0,function(a){return a},function(a,b,c,d){return"left"===d?"start":"right"===d?"end":d}),new d(b.ns_tts,"textDecoration","none",["span"],!0,!0,function(a){return a.split(" ")},null),new d(b.ns_tts,"textOutline","none",["span"],!0,!0,function(a){if("none"===a)return a;var b={},d=a.split(" ");if(0===d.length||d.length>2)return null;var e=c.parseColor(d[0]);if(b.color=e,null!==e&&d.shift(),1!==d.length)return null;var f=c.parseLength(d[0]);return f?(b.thickness=f,b):null},function(b,c,d,e){if("none"===e)return e;var f={};if(null===e.color?f.color=d.styleAttrs[a.byName.color.qname]:f.color=e.color,"%"===e.thickness.unit)f.thickness=d.styleAttrs[a.byName.fontSize.qname]*e.thickness.value/100;else if("em"===e.thickness.unit)f.thickness=d.styleAttrs[a.byName.fontSize.qname]*e.thickness.value;else if("c"===e.thickness.unit)f.thickness=e.thickness.value/b.cellResolution.h;else{if("px"!==e.thickness.unit)return null;f.thickness=e.thickness.value/b.pxDimensions.h}return f}),new d(b.ns_tts,"unicodeBidi","normal",["span","p"],!1,!0,function(a){return a},null),new d(b.ns_tts,"visibility","visible",["body","div","p","region","span"],!0,!0,function(a){return a},null),new d(b.ns_tts,"wrapOption","wrap",["span"],!0,!0,function(a){return a},null),new d(b.ns_tts,"writingMode","lrtb",["region"],!1,!0,function(a){return a},null),new d(b.ns_tts,"zIndex","auto",["region"],!1,!0,function(a){var b;return"auto"===a?b=a:(b=parseInt(a),isNaN(b)&&(b=null)),b},null),new d(b.ns_ebutts,"linePadding","0c",["p"],!0,!1,c.parseLength,function(a,b,c,d){return"c"===d.unit?d.value/a.cellResolution.h:null}),new d(b.ns_ebutts,"multiRowAlign","auto",["p"],!0,!1,function(a){return a},null),new d(b.ns_smpte,"backgroundImage",null,["div"],!1,!1,function(a){return a},null),new d(b.ns_itts,"forcedDisplay","false",["body","div","p","region","span"],!0,!0,function(a){return"true"===a},null)],a.byQName={};for(var e in a.all)a.byQName[a.all[e].qname]=a.all[e];a.byName={};for(var f in a.all)a.byName[a.all[f].name]=a.all[f]}(void 0===c?this.imscStyles={}:c,"undefined"==typeof imscNames?a(20):imscNames,"undefined"==typeof imscUtils?a(22):imscUtils)},{20:20,22:22}],22:[function(a,b,c){!function(a){var b=/#([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})?/,c=/rgb\((\d+),(\d+),(\d+)\)/,d=/rgba\((\d+),(\d+),(\d+),(\d+)\)/,e={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]};a.parseColor=function(a){var f,g=null;return a in e?g=e[a]:null!==(f=b.exec(a))?g=[parseInt(f[1],16),parseInt(f[2],16),parseInt(f[3],16),void 0!==f[4]?parseInt(f[4],16):255]:null!==(f=c.exec(a))?g=[parseInt(f[1]),parseInt(f[2]),parseInt(f[3]),255]:null!==(f=d.exec(a))&&(g=[parseInt(f[1]),parseInt(f[2]),parseInt(f[3]),parseInt(f[4])]),g};var f=/^((?:\+|\-)?\d*(?:\.\d+)?)(px|em|c|%)#x2F;;a.parseLength=function(a){var b,c=null;return null!==(b=f.exec(a))&&(c={value:parseFloat(b[1]),unit:b[2]}),c}}(void 0===c?this.imscUtils={}:c)},{}],23:[function(a,b,c){"function"==typeof Object.create?b.exports=function(a,b){a.super_=b,a.prototype=Object.create(b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}})}:b.exports=function(a,b){a.super_=b;var c=function(){};c.prototype=b.prototype,a.prototype=new c,a.prototype.constructor=a}},{}],24:[function(a,b,c){function d(a){return!!a.constructor&&"function"==typeof a.constructor.isBuffer&&a.constructor.isBuffer(a)}function e(a){return"function"==typeof a.readFloatLE&&"function"==typeof a.slice&&d(a.slice(0,0))}/*!
11
+ * Determine if an object is a Buffer
12
+ *
13
+ * @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
14
+ * @license MIT
15
+ */
16
+ b.exports=function(a){return null!=a&&(d(a)||e(a)||!!a._isBuffer)}},{}],25:[function(a,b,c){var d={}.toString;b.exports=Array.isArray||function(a){return"[object Array]"==d.call(a)}},{}],26:[function(a,b,c){(function(a){"use strict";function c(b,c,d,e){if("function"!=typeof b)throw new TypeError('"callback" argument must be a function');var f,g,h=arguments.length;switch(h){case 0:case 1:return a.nextTick(b);case 2:return a.nextTick(function(){b.call(null,c)});case 3:return a.nextTick(function(){b.call(null,c,d)});case 4:return a.nextTick(function(){b.call(null,c,d,e)});default:for(f=new Array(h-1),g=0;g<f.length;)f[g++]=arguments[g];return a.nextTick(function(){b.apply(null,f)})}}!a.version||0===a.version.indexOf("v0.")||0===a.version.indexOf("v1.")&&0!==a.version.indexOf("v1.8.")?b.exports=c:b.exports=a.nextTick}).call(this,a(27))},{27:27}],27:[function(a,b,c){function d(){throw new Error("setTimeout has not been defined")}function e(){throw new Error("clearTimeout has not been defined")}function f(a){if(l===setTimeout)return setTimeout(a,0);if((l===d||!l)&&setTimeout)return l=setTimeout,setTimeout(a,0);try{return l(a,0)}catch(b){try{return l.call(null,a,0)}catch(b){return l.call(this,a,0)}}}function g(a){if(m===clearTimeout)return clearTimeout(a);if((m===e||!m)&&clearTimeout)return m=clearTimeout,clearTimeout(a);try{return m(a)}catch(b){try{return m.call(null,a)}catch(b){return m.call(this,a)}}}function h(){q&&o&&(q=!1,o.length?p=o.concat(p):r=-1,p.length&&i())}function i(){if(!q){var a=f(h);q=!0;for(var b=p.length;b;){for(o=p,p=[];++r<b;)o&&o[r].run();r=-1,b=p.length}o=null,q=!1,g(a)}}function j(a,b){this.fun=a,this.array=b}function k(){}var l,m,n=b.exports={};!function(){try{l="function"==typeof setTimeout?setTimeout:d}catch(a){l=d}try{m="function"==typeof clearTimeout?clearTimeout:e}catch(a){m=e}}();var o,p=[],q=!1,r=-1;n.nextTick=function(a){var b=new Array(arguments.length-1);if(arguments.length>1)for(var c=1;c<arguments.length;c++)b[c-1]=arguments[c];p.push(new j(a,b)),1!==p.length||q||f(i)},j.prototype.run=function(){this.fun.apply(null,this.array)},n.title="browser",n.browser=!0,n.env={},n.argv=[],n.version="",n.versions={},n.on=k,n.addListener=k,n.once=k,n.off=k,n.removeListener=k,n.removeAllListeners=k,n.emit=k,n.prependListener=k,n.prependOnceListener=k,n.listeners=function(a){return[]},n.binding=function(a){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(a){throw new Error("process.chdir is not supported")},n.umask=function(){return 0}},{}],28:[function(a,b,c){b.exports=a(29)},{29:29}],29:[function(a,b,c){"use strict";function d(a){if(!(this instanceof d))return new d(a);j.call(this,a),k.call(this,a),a&&!1===a.readable&&(this.readable=!1),a&&!1===a.writable&&(this.writable=!1),this.allowHalfOpen=!0,a&&!1===a.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",e)}function e(){this.allowHalfOpen||this._writableState.ended||g(f,this)}function f(a){a.end()}var g=a(26),h=Object.keys||function(a){var b=[];for(var c in a)b.push(c);return b};b.exports=d;var i=a(12);i.inherits=a(23);var j=a(31),k=a(33);i.inherits(d,j);for(var l=h(k.prototype),m=0;m<l.length;m++){var n=l[m];d.prototype[n]||(d.prototype[n]=k.prototype[n])}Object.defineProperty(d.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(a){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=a,this._writableState.destroyed=a)}}),d.prototype._destroy=function(a,b){this.push(null),this.end(),g(b,a)}},{12:12,23:23,26:26,31:31,33:33}],30:[function(a,b,c){"use strict";function d(a){if(!(this instanceof d))return new d(a);e.call(this,a)}b.exports=d;var e=a(32),f=a(12);f.inherits=a(23),f.inherits(d,e),d.prototype._transform=function(a,b,c){c(null,a)}},{12:12,23:23,32:32}],31:[function(a,b,c){(function(c,d){"use strict";function e(a){return L.from(a)}function f(a){return L.isBuffer(a)||a instanceof M}function g(a,b,c){if("function"==typeof a.prependListener)return a.prependListener(b,c);a._events&&a._events[b]?I(a._events[b])?a._events[b].unshift(c):a._events[b]=[c,a._events[b]]:a.on(b,c)}function h(b,c){H=H||a(29),b=b||{},this.objectMode=!!b.objectMode,c instanceof H&&(this.objectMode=this.objectMode||!!b.readableObjectMode);var d=b.highWaterMark,e=this.objectMode?16:16384;this.highWaterMark=d||0===d?d:e,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new R,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=b.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,b.encoding&&(Q||(Q=a(45).StringDecoder),this.decoder=new Q(b.encoding),this.encoding=b.encoding)}function i(b){if(H=H||a(29),!(this instanceof i))return new i(b);this._readableState=new h(b,this),this.readable=!0,b&&("function"==typeof b.read&&(this._read=b.read),"function"==typeof b.destroy&&(this._destroy=b.destroy)),K.call(this)}function j(a,b,c,d,f){var g=a._readableState;if(null===b)g.reading=!1,p(a,g);else{var h;f||(h=l(g,b)),h?a.emit("error",h):g.objectMode||b&&b.length>0?("string"==typeof b||g.objectMode||Object.getPrototypeOf(b)===L.prototype||(b=e(b)),d?g.endEmitted?a.emit("error",new Error("stream.unshift() after end event")):k(a,g,b,!0):g.ended?a.emit("error",new Error("stream.push() after EOF")):(g.reading=!1,g.decoder&&!c?(b=g.decoder.write(b),g.objectMode||0!==b.length?k(a,g,b,!1):s(a,g)):k(a,g,b,!1))):d||(g.reading=!1)}return m(g)}function k(a,b,c,d){b.flowing&&0===b.length&&!b.sync?(a.emit("data",c),a.read(0)):(b.length+=b.objectMode?1:c.length,d?b.buffer.unshift(c):b.buffer.push(c),b.needReadable&&q(a)),s(a,b)}function l(a,b){var c;return f(b)||"string"==typeof b||void 0===b||a.objectMode||(c=new TypeError("Invalid non-string/buffer chunk")),c}function m(a){return!a.ended&&(a.needReadable||a.length<a.highWaterMark||0===a.length)}function n(a){return a>=U?a=U:(a--,a|=a>>>1,a|=a>>>2,a|=a>>>4,a|=a>>>8,a|=a>>>16,a++),a}function o(a,b){return a<=0||0===b.length&&b.ended?0:b.objectMode?1:a!==a?b.flowing&&b.length?b.buffer.head.data.length:b.length:(a>b.highWaterMark&&(b.highWaterMark=n(a)),a<=b.length?a:b.ended?b.length:(b.needReadable=!0,0))}function p(a,b){if(!b.ended){if(b.decoder){var c=b.decoder.end();c&&c.length&&(b.buffer.push(c),b.length+=b.objectMode?1:c.length)}b.ended=!0,q(a)}}function q(a){var b=a._readableState;b.needReadable=!1,b.emittedReadable||(P("emitReadable",b.flowing),b.emittedReadable=!0,b.sync?G(r,a):r(a))}function r(a){P("emit readable"),a.emit("readable"),y(a)}function s(a,b){b.readingMore||(b.readingMore=!0,G(t,a,b))}function t(a,b){for(var c=b.length;!b.reading&&!b.flowing&&!b.ended&&b.length<b.highWaterMark&&(P("maybeReadMore read 0"),a.read(0),c!==b.length);)c=b.length;b.readingMore=!1}function u(a){return function(){var b=a._readableState;P("pipeOnDrain",b.awaitDrain),b.awaitDrain&&b.awaitDrain--,0===b.awaitDrain&&J(a,"data")&&(b.flowing=!0,y(a))}}function v(a){P("readable nexttick read 0"),a.read(0)}function w(a,b){b.resumeScheduled||(b.resumeScheduled=!0,G(x,a,b))}function x(a,b){b.reading||(P("resume read 0"),a.read(0)),b.resumeScheduled=!1,b.awaitDrain=0,a.emit("resume"),y(a),b.flowing&&!b.reading&&a.read(0)}function y(a){var b=a._readableState;for(P("flow",b.flowing);b.flowing&&null!==a.read(););}function z(a,b){if(0===b.length)return null;var c;return b.objectMode?c=b.buffer.shift():!a||a>=b.length?(c=b.decoder?b.buffer.join(""):1===b.buffer.length?b.buffer.head.data:b.buffer.concat(b.length),b.buffer.clear()):c=A(a,b.buffer,b.decoder),c}function A(a,b,c){var d;return a<b.head.data.length?(d=b.head.data.slice(0,a),b.head.data=b.head.data.slice(a)):d=a===b.head.data.length?b.shift():c?B(a,b):C(a,b),d}function B(a,b){var c=b.head,d=1,e=c.data;for(a-=e.length;c=c.next;){var f=c.data,g=a>f.length?f.length:a;if(g===f.length?e+=f:e+=f.slice(0,a),0===(a-=g)){g===f.length?(++d,c.next?b.head=c.next:b.head=b.tail=null):(b.head=c,c.data=f.slice(g));break}++d}return b.length-=d,e}function C(a,b){var c=L.allocUnsafe(a),d=b.head,e=1;for(d.data.copy(c),a-=d.data.length;d=d.next;){var f=d.data,g=a>f.length?f.length:a;if(f.copy(c,c.length-a,0,g),0===(a-=g)){g===f.length?(++e,d.next?b.head=d.next:b.head=b.tail=null):(b.head=d,d.data=f.slice(g));break}++e}return b.length-=e,c}function D(a){var b=a._readableState;if(b.length>0)throw new Error('"endReadable()" called on non-empty stream');b.endEmitted||(b.ended=!0,G(E,b,a))}function E(a,b){a.endEmitted||0!==a.length||(a.endEmitted=!0,b.readable=!1,b.emit("end"))}function F(a,b){for(var c=0,d=a.length;c<d;c++)if(a[c]===b)return c;return-1}var G=a(26);b.exports=i;var H,I=a(25);i.ReadableState=h;var J=(a(13).EventEmitter,function(a,b){return a.listeners(b).length}),K=a(36),L=a(42).Buffer,M=d.Uint8Array||function(){},N=a(12);N.inherits=a(23);var O=a(8),P=void 0;P=O&&O.debuglog?O.debuglog("stream"):function(){};var Q,R=a(34),S=a(35);N.inherits(i,K);var T=["error","close","destroy","pause","resume"];Object.defineProperty(i.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(a){this._readableState&&(this._readableState.destroyed=a)}}),i.prototype.destroy=S.destroy,i.prototype._undestroy=S.undestroy,i.prototype._destroy=function(a,b){this.push(null),b(a)},i.prototype.push=function(a,b){var c,d=this._readableState;return d.objectMode?c=!0:"string"==typeof a&&(b=b||d.defaultEncoding,b!==d.encoding&&(a=L.from(a,b),b=""),c=!0),j(this,a,b,!1,c)},i.prototype.unshift=function(a){return j(this,a,null,!0,!1)},i.prototype.isPaused=function(){return!1===this._readableState.flowing},i.prototype.setEncoding=function(b){return Q||(Q=a(45).StringDecoder),this._readableState.decoder=new Q(b),this._readableState.encoding=b,this};var U=8388608;i.prototype.read=function(a){P("read",a),a=parseInt(a,10);var b=this._readableState,c=a;if(0!==a&&(b.emittedReadable=!1),0===a&&b.needReadable&&(b.length>=b.highWaterMark||b.ended))return P("read: emitReadable",b.length,b.ended),0===b.length&&b.ended?D(this):q(this),null;if(0===(a=o(a,b))&&b.ended)return 0===b.length&&D(this),null;var d=b.needReadable;P("need readable",d),(0===b.length||b.length-a<b.highWaterMark)&&(d=!0,P("length less than watermark",d)),b.ended||b.reading?(d=!1,P("reading or ended",d)):d&&(P("do read"),b.reading=!0,b.sync=!0,0===b.length&&(b.needReadable=!0),this._read(b.highWaterMark),b.sync=!1,b.reading||(a=o(c,b)));var e;return e=a>0?z(a,b):null,null===e?(b.needReadable=!0,a=0):b.length-=a,0===b.length&&(b.ended||(b.needReadable=!0),c!==a&&b.ended&&D(this)),null!==e&&this.emit("data",e),e},i.prototype._read=function(a){this.emit("error",new Error("_read() is not implemented"))},i.prototype.pipe=function(a,b){function d(a,b){P("onunpipe"),a===m&&b&&!1===b.hasUnpiped&&(b.hasUnpiped=!0,f())}function e(){P("onend"),a.end()}function f(){P("cleanup"),a.removeListener("close",j),a.removeListener("finish",k),a.removeListener("drain",q),a.removeListener("error",i),a.removeListener("unpipe",d),m.removeListener("end",e),m.removeListener("end",l),m.removeListener("data",h),r=!0,!n.awaitDrain||a._writableState&&!a._writableState.needDrain||q()}function h(b){P("ondata"),s=!1,!1!==a.write(b)||s||((1===n.pipesCount&&n.pipes===a||n.pipesCount>1&&-1!==F(n.pipes,a))&&!r&&(P("false write response, pause",m._readableState.awaitDrain),m._readableState.awaitDrain++,s=!0),m.pause())}function i(b){P("onerror",b),l(),a.removeListener("error",i),0===J(a,"error")&&a.emit("error",b)}function j(){a.removeListener("finish",k),l()}function k(){P("onfinish"),a.removeListener("close",j),l()}function l(){P("unpipe"),m.unpipe(a)}var m=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=a;break;case 1:n.pipes=[n.pipes,a];break;default:n.pipes.push(a)}n.pipesCount+=1,P("pipe count=%d opts=%j",n.pipesCount,b);var o=(!b||!1!==b.end)&&a!==c.stdout&&a!==c.stderr,p=o?e:l;n.endEmitted?G(p):m.once("end",p),a.on("unpipe",d);var q=u(m);a.on("drain",q);var r=!1,s=!1;return m.on("data",h),g(a,"error",i),a.once("close",j),a.once("finish",k),a.emit("pipe",m),n.flowing||(P("pipe resume"),m.resume()),a},i.prototype.unpipe=function(a){var b=this._readableState,c={hasUnpiped:!1};if(0===b.pipesCount)return this;if(1===b.pipesCount)return a&&a!==b.pipes?this:(a||(a=b.pipes),b.pipes=null,b.pipesCount=0,b.flowing=!1,a&&a.emit("unpipe",this,c),this);if(!a){var d=b.pipes,e=b.pipesCount;b.pipes=null,b.pipesCount=0,b.flowing=!1;for(var f=0;f<e;f++)d[f].emit("unpipe",this,c);return this}var g=F(b.pipes,a);return-1===g?this:(b.pipes.splice(g,1),b.pipesCount-=1,1===b.pipesCount&&(b.pipes=b.pipes[0]),a.emit("unpipe",this,c),this)},i.prototype.on=function(a,b){var c=K.prototype.on.call(this,a,b);if("data"===a)!1!==this._readableState.flowing&&this.resume();else if("readable"===a){var d=this._readableState;d.endEmitted||d.readableListening||(d.readableListening=d.needReadable=!0,d.emittedReadable=!1,d.reading?d.length&&q(this):G(v,this))}return c},i.prototype.addListener=i.prototype.on,i.prototype.resume=function(){var a=this._readableState;return a.flowing||(P("resume"),a.flowing=!0,w(this,a)),this},i.prototype.pause=function(){return P("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(P("pause"),this._readableState.flowing=!1,this.emit("pause")),this},i.prototype.wrap=function(a){var b=this._readableState,c=!1,d=this;a.on("end",function(){if(P("wrapped end"),b.decoder&&!b.ended){var a=b.decoder.end();a&&a.length&&d.push(a)}d.push(null)}),a.on("data",function(e){if(P("wrapped data"),b.decoder&&(e=b.decoder.write(e)),(!b.objectMode||null!==e&&void 0!==e)&&(b.objectMode||e&&e.length)){d.push(e)||(c=!0,a.pause())}});for(var e in a)void 0===this[e]&&"function"==typeof a[e]&&(this[e]=function(b){return function(){return a[b].apply(a,arguments)}}(e));for(var f=0;f<T.length;f++)a.on(T[f],d.emit.bind(d,T[f]));return d._read=function(b){P("wrapped _read",b),c&&(c=!1,a.resume())},d},i._fromList=z}).call(this,a(27),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{12:12,13:13,23:23,25:25,26:26,27:27,29:29,34:34,35:35,36:36,42:42,45:45,8:8}],32:[function(a,b,c){"use strict";function d(a){this.afterTransform=function(b,c){return e(a,b,c)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null,this.writeencoding=null}function e(a,b,c){var d=a._transformState;d.transforming=!1;var e=d.writecb;if(!e)return a.emit("error",new Error("write callback called multiple times"));d.writechunk=null,d.writecb=null,null!==c&&void 0!==c&&a.push(c),e(b);var f=a._readableState;f.reading=!1,(f.needReadable||f.length<f.highWaterMark)&&a._read(f.highWaterMark)}function f(a){if(!(this instanceof f))return new f(a);h.call(this,a),this._transformState=new d(this);var b=this;this._readableState.needReadable=!0,this._readableState.sync=!1,a&&("function"==typeof a.transform&&(this._transform=a.transform),"function"==typeof a.flush&&(this._flush=a.flush)),this.once("prefinish",function(){"function"==typeof this._flush?this._flush(function(a,c){g(b,a,c)}):g(b)})}function g(a,b,c){if(b)return a.emit("error",b);null!==c&&void 0!==c&&a.push(c);var d=a._writableState,e=a._transformState;if(d.length)throw new Error("Calling transform done when ws.length != 0");if(e.transforming)throw new Error("Calling transform done when still transforming");return a.push(null)}b.exports=f;var h=a(29),i=a(12);i.inherits=a(23),i.inherits(f,h),f.prototype.push=function(a,b){return this._transformState.needTransform=!1,h.prototype.push.call(this,a,b)},f.prototype._transform=function(a,b,c){throw new Error("_transform() is not implemented")},f.prototype._write=function(a,b,c){var d=this._transformState;if(d.writecb=c,d.writechunk=a,d.writeencoding=b,!d.transforming){var e=this._readableState;(d.needTransform||e.needReadable||e.length<e.highWaterMark)&&this._read(e.highWaterMark)}},f.prototype._read=function(a){var b=this._transformState;null!==b.writechunk&&b.writecb&&!b.transforming?(b.transforming=!0,this._transform(b.writechunk,b.writeencoding,b.afterTransform)):b.needTransform=!0},f.prototype._destroy=function(a,b){var c=this;h.prototype._destroy.call(this,a,function(a){b(a),c.emit("close")})}},{12:12,23:23,29:29}],33:[function(a,b,c){(function(c,d){"use strict";function e(a){var b=this;this.next=null,this.entry=null,this.finish=function(){A(b,a)}}function f(a){return H.from(a)}function g(a){return H.isBuffer(a)||a instanceof I}function h(){}function i(b,c){C=C||a(29),b=b||{},this.objectMode=!!b.objectMode,c instanceof C&&(this.objectMode=this.objectMode||!!b.writableObjectMode);var d=b.highWaterMark,f=this.objectMode?16:16384;this.highWaterMark=d||0===d?d:f,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var g=!1===b.decodeStrings;this.decodeStrings=!g,this.defaultEncoding=b.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(a){r(c,a)},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 e(this)}function j(b){if(C=C||a(29),!(K.call(j,this)||this instanceof C))return new j(b);this._writableState=new i(b,this),this.writable=!0,b&&("function"==typeof b.write&&(this._write=b.write),"function"==typeof b.writev&&(this._writev=b.writev),"function"==typeof b.destroy&&(this._destroy=b.destroy),"function"==typeof b.final&&(this._final=b.final)),G.call(this)}function k(a,b){var c=new Error("write after end");a.emit("error",c),B(b,c)}function l(a,b,c,d){var e=!0,f=!1;return null===c?f=new TypeError("May not write null values to stream"):"string"==typeof c||void 0===c||b.objectMode||(f=new TypeError("Invalid non-string/buffer chunk")),f&&(a.emit("error",f),B(d,f),e=!1),e}function m(a,b,c){return a.objectMode||!1===a.decodeStrings||"string"!=typeof b||(b=H.from(b,c)),b}function n(a,b,c,d,e,f){if(!c){var g=m(b,d,e);d!==g&&(c=!0,e="buffer",d=g)}var h=b.objectMode?1:d.length;b.length+=h;var i=b.length<b.highWaterMark;if(i||(b.needDrain=!0),b.writing||b.corked){var j=b.lastBufferedRequest;b.lastBufferedRequest={chunk:d,encoding:e,isBuf:c,callback:f,next:null},j?j.next=b.lastBufferedRequest:b.bufferedRequest=b.lastBufferedRequest,b.bufferedRequestCount+=1}else o(a,b,!1,h,d,e,f);return i}function o(a,b,c,d,e,f,g){b.writelen=d,b.writecb=g,b.writing=!0,b.sync=!0,c?a._writev(e,b.onwrite):a._write(e,f,b.onwrite),b.sync=!1}function p(a,b,c,d,e){--b.pendingcb,c?(B(e,d),B(y,a,b),a._writableState.errorEmitted=!0,a.emit("error",d)):(e(d),a._writableState.errorEmitted=!0,a.emit("error",d),y(a,b))}function q(a){a.writing=!1,a.writecb=null,a.length-=a.writelen,a.writelen=0}function r(a,b){var c=a._writableState,d=c.sync,e=c.writecb;if(q(c),b)p(a,c,d,b,e);else{var f=v(c);f||c.corked||c.bufferProcessing||!c.bufferedRequest||u(a,c),d?D(s,a,c,f,e):s(a,c,f,e)}}function s(a,b,c,d){c||t(a,b),b.pendingcb--,d(),y(a,b)}function t(a,b){0===b.length&&b.needDrain&&(b.needDrain=!1,a.emit("drain"))}function u(a,b){b.bufferProcessing=!0;var c=b.bufferedRequest;if(a._writev&&c&&c.next){var d=b.bufferedRequestCount,f=new Array(d),g=b.corkedRequestsFree;g.entry=c;for(var h=0,i=!0;c;)f[h]=c,c.isBuf||(i=!1),c=c.next,h+=1;f.allBuffers=i,o(a,b,!0,b.length,f,"",g.finish),b.pendingcb++,b.lastBufferedRequest=null,g.next?(b.corkedRequestsFree=g.next,g.next=null):b.corkedRequestsFree=new e(b)}else{for(;c;){var j=c.chunk,k=c.encoding,l=c.callback;if(o(a,b,!1,b.objectMode?1:j.length,j,k,l),c=c.next,b.writing)break}null===c&&(b.lastBufferedRequest=null)}b.bufferedRequestCount=0,b.bufferedRequest=c,b.bufferProcessing=!1}function v(a){return a.ending&&0===a.length&&null===a.bufferedRequest&&!a.finished&&!a.writing}function w(a,b){a._final(function(c){b.pendingcb--,c&&a.emit("error",c),b.prefinished=!0,a.emit("prefinish"),y(a,b)})}function x(a,b){b.prefinished||b.finalCalled||("function"==typeof a._final?(b.pendingcb++,b.finalCalled=!0,B(w,a,b)):(b.prefinished=!0,a.emit("prefinish")))}function y(a,b){var c=v(b);return c&&(x(a,b),0===b.pendingcb&&(b.finished=!0,a.emit("finish"))),c}function z(a,b,c){b.ending=!0,y(a,b),c&&(b.finished?B(c):a.once("finish",c)),b.ended=!0,a.writable=!1}function A(a,b,c){var d=a.entry;for(a.entry=null;d;){var e=d.callback;b.pendingcb--,e(c),d=d.next}b.corkedRequestsFree?b.corkedRequestsFree.next=a:b.corkedRequestsFree=a}var B=a(26);b.exports=j;var C,D=!c.browser&&["v0.10","v0.9."].indexOf(c.version.slice(0,5))>-1?setImmediate:B;j.WritableState=i;var E=a(12);E.inherits=a(23);var F={deprecate:a(46)},G=a(36),H=a(42).Buffer,I=d.Uint8Array||function(){},J=a(35);E.inherits(j,G),i.prototype.getBuffer=function(){for(var a=this.bufferedRequest,b=[];a;)b.push(a),a=a.next;return b},function(){try{Object.defineProperty(i.prototype,"buffer",{get:F.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(a){}}();var K;"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(K=Function.prototype[Symbol.hasInstance],Object.defineProperty(j,Symbol.hasInstance,{value:function(a){return!!K.call(this,a)||a&&a._writableState instanceof i}})):K=function(a){return a instanceof this},j.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},j.prototype.write=function(a,b,c){var d=this._writableState,e=!1,i=g(a)&&!d.objectMode;return i&&!H.isBuffer(a)&&(a=f(a)),"function"==typeof b&&(c=b,b=null),i?b="buffer":b||(b=d.defaultEncoding),"function"!=typeof c&&(c=h),d.ended?k(this,c):(i||l(this,d,a,c))&&(d.pendingcb++,e=n(this,d,i,a,b,c)),e},j.prototype.cork=function(){this._writableState.corked++},j.prototype.uncork=function(){var a=this._writableState;a.corked&&(a.corked--,a.writing||a.corked||a.finished||a.bufferProcessing||!a.bufferedRequest||u(this,a))},j.prototype.setDefaultEncoding=function(a){if("string"==typeof a&&(a=a.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((a+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+a);return this._writableState.defaultEncoding=a,this},j.prototype._write=function(a,b,c){c(new Error("_write() is not implemented"))},j.prototype._writev=null,j.prototype.end=function(a,b,c){var d=this._writableState;"function"==typeof a?(c=a,a=null,b=null):"function"==typeof b&&(c=b,b=null),null!==a&&void 0!==a&&this.write(a,b),d.corked&&(d.corked=1,this.uncork()),d.ending||d.finished||z(this,d,c)},Object.defineProperty(j.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(a){this._writableState&&(this._writableState.destroyed=a)}}),j.prototype.destroy=J.destroy,j.prototype._undestroy=J.undestroy,j.prototype._destroy=function(a,b){this.end(),b(a)}}).call(this,a(27),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{12:12,23:23,26:26,27:27,29:29,35:35,36:36,42:42,46:46}],34:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function e(a,b,c){a.copy(b,c)}var f=a(42).Buffer;b.exports=function(){function a(){d(this,a),this.head=null,this.tail=null,this.length=0}return a.prototype.push=function(a){var b={data:a,next:null};this.length>0?this.tail.next=b:this.head=b,this.tail=b,++this.length},a.prototype.unshift=function(a){var b={data:a,next:this.head};0===this.length&&(this.tail=b),this.head=b,++this.length},a.prototype.shift=function(){if(0!==this.length){var a=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,a}},a.prototype.clear=function(){this.head=this.tail=null,this.length=0},a.prototype.join=function(a){if(0===this.length)return"";for(var b=this.head,c=""+b.data;b=b.next;)c+=a+b.data;return c},a.prototype.concat=function(a){if(0===this.length)return f.alloc(0);if(1===this.length)return this.head.data;for(var b=f.allocUnsafe(a>>>0),c=this.head,d=0;c;)e(c.data,b,d),d+=c.data.length,c=c.next;return b},a}()},{42:42}],35:[function(a,b,c){"use strict";function d(a,b){var c=this,d=this._readableState&&this._readableState.destroyed,e=this._writableState&&this._writableState.destroyed;if(d||e)return void(b?b(a):!a||this._writableState&&this._writableState.errorEmitted||g(f,this,a));this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(a||null,function(a){!b&&a?(g(f,c,a),c._writableState&&(c._writableState.errorEmitted=!0)):b&&b(a)})}function e(){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)}function f(a,b){a.emit("error",b)}var g=a(26);b.exports={destroy:d,undestroy:e}},{26:26}],36:[function(a,b,c){b.exports=a(13).EventEmitter},{13:13}],37:[function(a,b,c){b.exports=a(38).PassThrough},{38:38}],38:[function(a,b,c){c=b.exports=a(31),c.Stream=c,c.Readable=c,c.Writable=a(33),c.Duplex=a(29),c.Transform=a(32),c.PassThrough=a(30)},{29:29,30:30,31:31,32:32,33:33}],39:[function(a,b,c){b.exports=a(38).Transform},{38:38}],40:[function(a,b,c){b.exports=a(33)},{33:33}],41:[function(a,b,c){var d=c.decimalAdjust=function(a,b,c){return void 0===c||0==+c?Math[a](b):(b=+b,c=+c,isNaN(b)||"number"!=typeof c||c%1!=0?NaN:(b=b.toString().split("e"),b=Math[a](+(b[0]+"e"+(b[1]?+b[1]-c:-c))),b=b.toString().split("e"),+(b[0]+"e"+(b[1]?+b[1]+c:c))))};b.exports={round10:function(a,b){return d("round",a,b)},floor10:function(a,b){return d("floor",a,b)},ceil10:function(a,b){return d("ceil",a,b)}},b.exports.polyfill=function(){Math.round10||(Math.round10=b.exports.round10),Math.floor10||(Math.floor10=b.exports.floor10),Math.ceil10||(Math.ceil10=b.exports.ceil10)}},{}],42:[function(a,b,c){function d(a,b){for(var c in a)b[c]=a[c]}function e(a,b,c){return g(a,b,c)}var f=a(10),g=f.Buffer;g.from&&g.alloc&&g.allocUnsafe&&g.allocUnsafeSlow?b.exports=f:(d(f,c),c.Buffer=e),d(g,e),e.from=function(a,b,c){if("number"==typeof a)throw new TypeError("Argument must not be a number");return g(a,b,c)},e.alloc=function(a,b,c){if("number"!=typeof a)throw new TypeError("Argument must be a number");var d=g(a);return void 0!==b?"string"==typeof c?d.fill(b,c):d.fill(b):d.fill(0),d},e.allocUnsafe=function(a){if("number"!=typeof a)throw new TypeError("Argument must be a number");return g(a)},e.allocUnsafeSlow=function(a){if("number"!=typeof a)throw new TypeError("Argument must be a number");return f.SlowBuffer(a)}},{10:10}],43:[function(a,b,c){(function(b){!function(c){function d(a,b){if(!(this instanceof d))return new d(a,b);var e=this;f(e),e.q=e.c="",e.bufferCheckPosition=c.MAX_BUFFER_LENGTH,e.opt=b||{},e.opt.lowercase=e.opt.lowercase||e.opt.lowercasetags,e.looseCase=e.opt.lowercase?"toLowerCase":"toUpperCase",e.tags=[],e.closed=e.closedRoot=e.sawRoot=!1,e.tag=e.error=null,e.strict=!!a,e.noscript=!(!a&&!e.opt.noscript),e.state=U.BEGIN,e.strictEntities=e.opt.strictEntities,e.ENTITIES=e.strictEntities?Object.create(c.XML_ENTITIES):Object.create(c.ENTITIES),e.attribList=[],e.opt.xmlns&&(e.ns=Object.create(P)),e.trackPosition=!1!==e.opt.position,e.trackPosition&&(e.position=e.line=e.column=0),n(e,"onready")}function e(a){for(var b=Math.max(c.MAX_BUFFER_LENGTH,10),d=0,e=0,f=D.length;e<f;e++){var g=a[D[e]].length;if(g>b)switch(D[e]){case"textNode":p(a);break;case"cdata":o(a,"oncdata",a.cdata),a.cdata="";break;case"script":o(a,"onscript",a.script),a.script="";break;default:r(a,"Max buffer length exceeded: "+D[e])}d=Math.max(d,g)}var h=c.MAX_BUFFER_LENGTH-d;a.bufferCheckPosition=h+a.position}function f(a){for(var b=0,c=D.length;b<c;b++)a[D[b]]=""}function g(a){p(a),""!==a.cdata&&(o(a,"oncdata",a.cdata),a.cdata=""),""!==a.script&&(o(a,"onscript",a.script),a.script="")}function h(a,b){return new i(a,b)}function i(a,b){if(!(this instanceof i))return new i(a,b);E.apply(this),this._parser=new d(a,b),this.writable=!0,this.readable=!0;var c=this;this._parser.onend=function(){c.emit("end")},this._parser.onerror=function(a){c.emit("error",a),c._parser.error=null},this._decoder=null,F.forEach(function(a){Object.defineProperty(c,"on"+a,{get:function(){return c._parser["on"+a]},set:function(b){if(!b)return c.removeAllListeners(a),c._parser["on"+a]=b,b;c.on(a,b)},enumerable:!0,configurable:!1})})}function j(a){return a.split("").reduce(function(a,b){return a[b]=!0,a},{})}function k(a){return"[object RegExp]"===Object.prototype.toString.call(a)}function l(a,b){return k(a)?!!b.match(a):a[b]}function m(a,b){return!l(a,b)}function n(a,b,c){a[b]&&a[b](c)}function o(a,b,c){a.textNode&&p(a),n(a,b,c)}function p(a){a.textNode=q(a.opt,a.textNode),a.textNode&&n(a,"ontext",a.textNode),a.textNode=""}function q(a,b){return a.trim&&(b=b.trim()),a.normalize&&(b=b.replace(/\s+/g," ")),b}function r(a,b){return p(a),a.trackPosition&&(b+="\nLine: "+a.line+"\nColumn: "+a.column+"\nChar: "+a.c),b=new Error(b),a.error=b,n(a,"onerror",b),a}function s(a){return a.sawRoot&&!a.closedRoot&&t(a,"Unclosed root tag"),a.state!==U.BEGIN&&a.state!==U.BEGIN_WHITESPACE&&a.state!==U.TEXT&&r(a,"Unexpected end"),p(a),a.c="",a.closed=!0,n(a,"onend"),d.call(a,a.strict,a.opt),a}function t(a,b){if("object"!=typeof a||!(a instanceof d))throw new Error("bad call to strictFail");a.strict&&r(a,b)}function u(a){a.strict||(a.tagName=a.tagName[a.looseCase]());var b=a.tags[a.tags.length-1]||a,c=a.tag={name:a.tagName,attributes:{}};a.opt.xmlns&&(c.ns=b.ns),a.attribList.length=0,o(a,"onopentagstart",c)}function v(a,b){var c=a.indexOf(":"),d=c<0?["",a]:a.split(":"),e=d[0],f=d[1];return b&&"xmlns"===a&&(e="xmlns",f=""),{prefix:e,local:f}}function w(a){if(a.strict||(a.attribName=a.attribName[a.looseCase]()),-1!==a.attribList.indexOf(a.attribName)||a.tag.attributes.hasOwnProperty(a.attribName))return void(a.attribName=a.attribValue="");if(a.opt.xmlns){var b=v(a.attribName,!0),c=b.prefix,d=b.local;if("xmlns"===c)if("xml"===d&&a.attribValue!==N)t(a,"xml: prefix must be bound to "+N+"\nActual: "+a.attribValue);else if("xmlns"===d&&a.attribValue!==O)t(a,"xmlns: prefix must be bound to "+O+"\nActual: "+a.attribValue);else{var e=a.tag,f=a.tags[a.tags.length-1]||a;e.ns===f.ns&&(e.ns=Object.create(f.ns)),e.ns[d]=a.attribValue}a.attribList.push([a.attribName,a.attribValue])}else a.tag.attributes[a.attribName]=a.attribValue,o(a,"onattribute",{name:a.attribName,value:a.attribValue});a.attribName=a.attribValue=""}function x(a,b){if(a.opt.xmlns){var c=a.tag,d=v(a.tagName);c.prefix=d.prefix,c.local=d.local,c.uri=c.ns[d.prefix]||"",c.prefix&&!c.uri&&(t(a,"Unbound namespace prefix: "+JSON.stringify(a.tagName)),c.uri=d.prefix);var e=a.tags[a.tags.length-1]||a;c.ns&&e.ns!==c.ns&&Object.keys(c.ns).forEach(function(b){o(a,"onopennamespace",{prefix:b,uri:c.ns[b]})});for(var f=0,g=a.attribList.length;f<g;f++){var h=a.attribList[f],i=h[0],j=h[1],k=v(i,!0),l=k.prefix,m=k.local,n=""===l?"":c.ns[l]||"",p={name:i,value:j,prefix:l,local:m,uri:n};l&&"xmlns"!==l&&!n&&(t(a,"Unbound namespace prefix: "+JSON.stringify(l)),p.uri=l),a.tag.attributes[i]=p,o(a,"onattribute",p)}a.attribList.length=0}a.tag.isSelfClosing=!!b,a.sawRoot=!0,a.tags.push(a.tag),o(a,"onopentag",a.tag),b||(a.noscript||"script"!==a.tagName.toLowerCase()?a.state=U.TEXT:a.state=U.SCRIPT,a.tag=null,a.tagName=""),a.attribName=a.attribValue="",a.attribList.length=0}function y(a){
17
+ if(!a.tagName)return t(a,"Weird empty close tag."),a.textNode+="</>",void(a.state=U.TEXT);if(a.script){if("script"!==a.tagName)return a.script+="</"+a.tagName+">",a.tagName="",void(a.state=U.SCRIPT);o(a,"onscript",a.script),a.script=""}var b=a.tags.length,c=a.tagName;a.strict||(c=c[a.looseCase]());for(var d=c;b--;){if(a.tags[b].name===d)break;t(a,"Unexpected close tag")}if(b<0)return t(a,"Unmatched closing tag: "+a.tagName),a.textNode+="</"+a.tagName+">",void(a.state=U.TEXT);a.tagName=c;for(var e=a.tags.length;e-- >b;){var f=a.tag=a.tags.pop();a.tagName=a.tag.name,o(a,"onclosetag",a.tagName);var g={};for(var h in f.ns)g[h]=f.ns[h];var i=a.tags[a.tags.length-1]||a;a.opt.xmlns&&f.ns!==i.ns&&Object.keys(f.ns).forEach(function(b){var c=f.ns[b];o(a,"onclosenamespace",{prefix:b,uri:c})})}0===b&&(a.closedRoot=!0),a.tagName=a.attribValue=a.attribName="",a.attribList.length=0,a.state=U.TEXT}function z(a){var b,c=a.entity,d=c.toLowerCase(),e="";return a.ENTITIES[c]?a.ENTITIES[c]:a.ENTITIES[d]?a.ENTITIES[d]:(c=d,"#"===c.charAt(0)&&("x"===c.charAt(1)?(c=c.slice(2),b=parseInt(c,16),e=b.toString(16)):(c=c.slice(1),b=parseInt(c,10),e=b.toString(10))),c=c.replace(/^0+/,""),e.toLowerCase()!==c?(t(a,"Invalid character entity"),"&"+a.entity+";"):String.fromCodePoint(b))}function A(a,b){"<"===b?(a.state=U.OPEN_WAKA,a.startTagPosition=a.position):m(G,b)&&(t(a,"Non-whitespace before first tag."),a.textNode=b,a.state=U.TEXT)}function B(a,b){var c="";return b<a.length&&(c=a.charAt(b)),c}function C(a){var b=this;if(this.error)throw this.error;if(b.closed)return r(b,"Cannot write after close. Assign an onready handler.");if(null===a)return s(b);"object"==typeof a&&(a=a.toString());for(var c=0,d="";;){if(d=B(a,c++),b.c=d,!d)break;switch(b.trackPosition&&(b.position++,"\n"===d?(b.line++,b.column=0):b.column++),b.state){case U.BEGIN:if(b.state=U.BEGIN_WHITESPACE,"\ufeff"===d)continue;A(b,d);continue;case U.BEGIN_WHITESPACE:A(b,d);continue;case U.TEXT:if(b.sawRoot&&!b.closedRoot){for(var f=c-1;d&&"<"!==d&&"&"!==d;)(d=B(a,c++))&&b.trackPosition&&(b.position++,"\n"===d?(b.line++,b.column=0):b.column++);b.textNode+=a.substring(f,c-1)}"<"!==d||b.sawRoot&&b.closedRoot&&!b.strict?(!m(G,d)||b.sawRoot&&!b.closedRoot||t(b,"Text data outside of root node."),"&"===d?b.state=U.TEXT_ENTITY:b.textNode+=d):(b.state=U.OPEN_WAKA,b.startTagPosition=b.position);continue;case U.SCRIPT:"<"===d?b.state=U.SCRIPT_ENDING:b.script+=d;continue;case U.SCRIPT_ENDING:"/"===d?b.state=U.CLOSE_TAG:(b.script+="<"+d,b.state=U.SCRIPT);continue;case U.OPEN_WAKA:if("!"===d)b.state=U.SGML_DECL,b.sgmlDecl="";else if(l(G,d));else if(l(Q,d))b.state=U.OPEN_TAG,b.tagName=d;else if("/"===d)b.state=U.CLOSE_TAG,b.tagName="";else if("?"===d)b.state=U.PROC_INST,b.procInstName=b.procInstBody="";else{if(t(b,"Unencoded <"),b.startTagPosition+1<b.position){var g=b.position-b.startTagPosition;d=new Array(g).join(" ")+d}b.textNode+="<"+d,b.state=U.TEXT}continue;case U.SGML_DECL:(b.sgmlDecl+d).toUpperCase()===L?(o(b,"onopencdata"),b.state=U.CDATA,b.sgmlDecl="",b.cdata=""):b.sgmlDecl+d==="--"?(b.state=U.COMMENT,b.comment="",b.sgmlDecl=""):(b.sgmlDecl+d).toUpperCase()===M?(b.state=U.DOCTYPE,(b.doctype||b.sawRoot)&&t(b,"Inappropriately located doctype declaration"),b.doctype="",b.sgmlDecl=""):">"===d?(o(b,"onsgmldeclaration",b.sgmlDecl),b.sgmlDecl="",b.state=U.TEXT):l(J,d)?(b.state=U.SGML_DECL_QUOTED,b.sgmlDecl+=d):b.sgmlDecl+=d;continue;case U.SGML_DECL_QUOTED:d===b.q&&(b.state=U.SGML_DECL,b.q=""),b.sgmlDecl+=d;continue;case U.DOCTYPE:">"===d?(b.state=U.TEXT,o(b,"ondoctype",b.doctype),b.doctype=!0):(b.doctype+=d,"["===d?b.state=U.DOCTYPE_DTD:l(J,d)&&(b.state=U.DOCTYPE_QUOTED,b.q=d));continue;case U.DOCTYPE_QUOTED:b.doctype+=d,d===b.q&&(b.q="",b.state=U.DOCTYPE);continue;case U.DOCTYPE_DTD:b.doctype+=d,"]"===d?b.state=U.DOCTYPE:l(J,d)&&(b.state=U.DOCTYPE_DTD_QUOTED,b.q=d);continue;case U.DOCTYPE_DTD_QUOTED:b.doctype+=d,d===b.q&&(b.state=U.DOCTYPE_DTD,b.q="");continue;case U.COMMENT:"-"===d?b.state=U.COMMENT_ENDING:b.comment+=d;continue;case U.COMMENT_ENDING:"-"===d?(b.state=U.COMMENT_ENDED,b.comment=q(b.opt,b.comment),b.comment&&o(b,"oncomment",b.comment),b.comment=""):(b.comment+="-"+d,b.state=U.COMMENT);continue;case U.COMMENT_ENDED:">"!==d?(t(b,"Malformed comment"),b.comment+="--"+d,b.state=U.COMMENT):b.state=U.TEXT;continue;case U.CDATA:"]"===d?b.state=U.CDATA_ENDING:b.cdata+=d;continue;case U.CDATA_ENDING:"]"===d?b.state=U.CDATA_ENDING_2:(b.cdata+="]"+d,b.state=U.CDATA);continue;case U.CDATA_ENDING_2:">"===d?(b.cdata&&o(b,"oncdata",b.cdata),o(b,"onclosecdata"),b.cdata="",b.state=U.TEXT):"]"===d?b.cdata+="]":(b.cdata+="]]"+d,b.state=U.CDATA);continue;case U.PROC_INST:"?"===d?b.state=U.PROC_INST_ENDING:l(G,d)?b.state=U.PROC_INST_BODY:b.procInstName+=d;continue;case U.PROC_INST_BODY:if(!b.procInstBody&&l(G,d))continue;"?"===d?b.state=U.PROC_INST_ENDING:b.procInstBody+=d;continue;case U.PROC_INST_ENDING:">"===d?(o(b,"onprocessinginstruction",{name:b.procInstName,body:b.procInstBody}),b.procInstName=b.procInstBody="",b.state=U.TEXT):(b.procInstBody+="?"+d,b.state=U.PROC_INST_BODY);continue;case U.OPEN_TAG:l(R,d)?b.tagName+=d:(u(b),">"===d?x(b):"/"===d?b.state=U.OPEN_TAG_SLASH:(m(G,d)&&t(b,"Invalid character in tag name"),b.state=U.ATTRIB));continue;case U.OPEN_TAG_SLASH:">"===d?(x(b,!0),y(b)):(t(b,"Forward-slash in opening tag not followed by >"),b.state=U.ATTRIB);continue;case U.ATTRIB:if(l(G,d))continue;">"===d?x(b):"/"===d?b.state=U.OPEN_TAG_SLASH:l(Q,d)?(b.attribName=d,b.attribValue="",b.state=U.ATTRIB_NAME):t(b,"Invalid attribute name");continue;case U.ATTRIB_NAME:"="===d?b.state=U.ATTRIB_VALUE:">"===d?(t(b,"Attribute without value"),b.attribValue=b.attribName,w(b),x(b)):l(G,d)?b.state=U.ATTRIB_NAME_SAW_WHITE:l(R,d)?b.attribName+=d:t(b,"Invalid attribute name");continue;case U.ATTRIB_NAME_SAW_WHITE:if("="===d)b.state=U.ATTRIB_VALUE;else{if(l(G,d))continue;t(b,"Attribute without value"),b.tag.attributes[b.attribName]="",b.attribValue="",o(b,"onattribute",{name:b.attribName,value:""}),b.attribName="",">"===d?x(b):l(Q,d)?(b.attribName=d,b.state=U.ATTRIB_NAME):(t(b,"Invalid attribute name"),b.state=U.ATTRIB)}continue;case U.ATTRIB_VALUE:if(l(G,d))continue;l(J,d)?(b.q=d,b.state=U.ATTRIB_VALUE_QUOTED):(t(b,"Unquoted attribute value"),b.state=U.ATTRIB_VALUE_UNQUOTED,b.attribValue=d);continue;case U.ATTRIB_VALUE_QUOTED:if(d!==b.q){"&"===d?b.state=U.ATTRIB_VALUE_ENTITY_Q:b.attribValue+=d;continue}w(b),b.q="",b.state=U.ATTRIB_VALUE_CLOSED;continue;case U.ATTRIB_VALUE_CLOSED:l(G,d)?b.state=U.ATTRIB:">"===d?x(b):"/"===d?b.state=U.OPEN_TAG_SLASH:l(Q,d)?(t(b,"No whitespace between attributes"),b.attribName=d,b.attribValue="",b.state=U.ATTRIB_NAME):t(b,"Invalid attribute name");continue;case U.ATTRIB_VALUE_UNQUOTED:if(m(K,d)){"&"===d?b.state=U.ATTRIB_VALUE_ENTITY_U:b.attribValue+=d;continue}w(b),">"===d?x(b):b.state=U.ATTRIB;continue;case U.CLOSE_TAG:if(b.tagName)">"===d?y(b):l(R,d)?b.tagName+=d:b.script?(b.script+="</"+b.tagName,b.tagName="",b.state=U.SCRIPT):(m(G,d)&&t(b,"Invalid tagname in closing tag"),b.state=U.CLOSE_TAG_SAW_WHITE);else{if(l(G,d))continue;m(Q,d)?b.script?(b.script+="</"+d,b.state=U.SCRIPT):t(b,"Invalid tagname in closing tag."):b.tagName=d}continue;case U.CLOSE_TAG_SAW_WHITE:if(l(G,d))continue;">"===d?y(b):t(b,"Invalid characters in closing tag");continue;case U.TEXT_ENTITY:case U.ATTRIB_VALUE_ENTITY_Q:case U.ATTRIB_VALUE_ENTITY_U:var h,i;switch(b.state){case U.TEXT_ENTITY:h=U.TEXT,i="textNode";break;case U.ATTRIB_VALUE_ENTITY_Q:h=U.ATTRIB_VALUE_QUOTED,i="attribValue";break;case U.ATTRIB_VALUE_ENTITY_U:h=U.ATTRIB_VALUE_UNQUOTED,i="attribValue"}";"===d?(b[i]+=z(b),b.entity="",b.state=h):l(b.entity.length?T:S,d)?b.entity+=d:(t(b,"Invalid character in entity name"),b[i]+="&"+b.entity+d,b.entity="",b.state=h);continue;default:throw new Error(b,"Unknown state: "+b.state)}}return b.position>=b.bufferCheckPosition&&e(b),b}c.parser=function(a,b){return new d(a,b)},c.SAXParser=d,c.SAXStream=i,c.createStream=h,c.MAX_BUFFER_LENGTH=65536;var D=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];c.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"],Object.create||(Object.create=function(a){function b(){}return b.prototype=a,new b}),Object.keys||(Object.keys=function(a){var b=[];for(var c in a)a.hasOwnProperty(c)&&b.push(c);return b}),d.prototype={end:function(){s(this)},write:C,resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){g(this)}};var E;try{E=a(44).Stream}catch(W){E=function(){}}var F=c.EVENTS.filter(function(a){return"error"!==a&&"end"!==a});i.prototype=Object.create(E.prototype,{constructor:{value:i}}),i.prototype.write=function(c){if("function"==typeof b&&"function"==typeof b.isBuffer&&b.isBuffer(c)){if(!this._decoder){var d=a(9).StringDecoder;this._decoder=new d("utf8")}c=this._decoder.write(c)}return this._parser.write(c.toString()),this.emit("data",c),!0},i.prototype.end=function(a){return a&&a.length&&this.write(a),this._parser.end(),!0},i.prototype.on=function(a,b){var c=this;return c._parser["on"+a]||-1===F.indexOf(a)||(c._parser["on"+a]=function(){var b=1===arguments.length?[arguments[0]]:Array.apply(null,arguments);b.splice(0,0,a),c.emit.apply(c,b)}),E.prototype.on.call(c,a,b)};var G="\r\n\t ",H="0124356789",I="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",J="'\"",K=G+">",L="[CDATA[",M="DOCTYPE",N="http://www.w3.org/XML/1998/namespace",O="http://www.w3.org/2000/xmlns/",P={xml:N,xmlns:O};G=j(G),H=j(H),I=j(I);var Q=/[:_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]/,R=/[:_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-]/,S=/[#:_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]/,T=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040\.\d-]/;J=j(J),K=j(K);var U=0;c.STATE={BEGIN:U++,BEGIN_WHITESPACE:U++,TEXT:U++,TEXT_ENTITY:U++,OPEN_WAKA:U++,SGML_DECL:U++,SGML_DECL_QUOTED:U++,DOCTYPE:U++,DOCTYPE_QUOTED:U++,DOCTYPE_DTD:U++,DOCTYPE_DTD_QUOTED:U++,COMMENT_STARTING:U++,COMMENT:U++,COMMENT_ENDING:U++,COMMENT_ENDED:U++,CDATA:U++,CDATA_ENDING:U++,CDATA_ENDING_2:U++,PROC_INST:U++,PROC_INST_BODY:U++,PROC_INST_ENDING:U++,OPEN_TAG:U++,OPEN_TAG_SLASH:U++,ATTRIB:U++,ATTRIB_NAME:U++,ATTRIB_NAME_SAW_WHITE:U++,ATTRIB_VALUE:U++,ATTRIB_VALUE_QUOTED:U++,ATTRIB_VALUE_CLOSED:U++,ATTRIB_VALUE_UNQUOTED:U++,ATTRIB_VALUE_ENTITY_Q:U++,ATTRIB_VALUE_ENTITY_U:U++,CLOSE_TAG:U++,CLOSE_TAG_SAW_WHITE:U++,SCRIPT:U++,SCRIPT_ENDING:U++},c.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},c.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(c.ENTITIES).forEach(function(a){var b=c.ENTITIES[a],d="number"==typeof b?String.fromCharCode(b):b;c.ENTITIES[a]=d});for(var V in c.STATE)c.STATE[c.STATE[V]]=V;U=c.STATE,/*! http://mths.be/fromcodepoint v0.1.0 by @mathias */
18
+ String.fromCodePoint||function(){var a=String.fromCharCode,b=Math.floor,c=function(){var c,d,e=16384,f=[],g=-1,h=arguments.length;if(!h)return"";for(var i="";++g<h;){var j=Number(arguments[g]);if(!isFinite(j)||j<0||j>1114111||b(j)!==j)throw RangeError("Invalid code point: "+j);j<=65535?f.push(j):(j-=65536,c=55296+(j>>10),d=j%1024+56320,f.push(c,d)),(g+1===h||f.length>e)&&(i+=a.apply(null,f),f.length=0)}return i};Object.defineProperty?Object.defineProperty(String,"fromCodePoint",{value:c,configurable:!0,writable:!0}):String.fromCodePoint=c}()}(void 0===c?this.sax={}:c)}).call(this,a(10).Buffer)},{10:10,44:44,9:9}],44:[function(a,b,c){function d(){e.call(this)}b.exports=d;var e=a(13).EventEmitter;a(23)(d,e),d.Readable=a(38),d.Writable=a(40),d.Duplex=a(28),d.Transform=a(39),d.PassThrough=a(37),d.Stream=d,d.prototype.pipe=function(a,b){function c(b){a.writable&&!1===a.write(b)&&j.pause&&j.pause()}function d(){j.readable&&j.resume&&j.resume()}function f(){k||(k=!0,a.end())}function g(){k||(k=!0,"function"==typeof a.destroy&&a.destroy())}function h(a){if(i(),0===e.listenerCount(this,"error"))throw a}function i(){j.removeListener("data",c),a.removeListener("drain",d),j.removeListener("end",f),j.removeListener("close",g),j.removeListener("error",h),a.removeListener("error",h),j.removeListener("end",i),j.removeListener("close",i),a.removeListener("close",i)}var j=this;j.on("data",c),a.on("drain",d),a._isStdio||b&&!1===b.end||(j.on("end",f),j.on("close",g));var k=!1;return j.on("error",h),a.on("error",h),j.on("end",i),j.on("close",i),a.on("close",i),a.emit("pipe",j),a}},{13:13,23:23,28:28,37:37,38:38,39:39,40:40}],45:[function(a,b,c){"use strict";function d(a){if(!a)return"utf8";for(var b;;)switch(a){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 a;default:if(b)return;a=(""+a).toLowerCase(),b=!0}}function e(a){var b=d(a);if("string"!=typeof b&&(s.isEncoding===t||!t(a)))throw new Error("Unknown encoding: "+a);return b||a}function f(a){this.encoding=e(a);var b;switch(this.encoding){case"utf16le":this.text=m,this.end=n,b=4;break;case"utf8":this.fillLast=j,b=4;break;case"base64":this.text=o,this.end=p,b=3;break;default:return this.write=q,void(this.end=r)}this.lastNeed=0,this.lastTotal=0,this.lastChar=s.allocUnsafe(b)}function g(a){return a<=127?0:a>>5==6?2:a>>4==14?3:a>>3==30?4:-1}function h(a,b,c){var d=b.length-1;if(d<c)return 0;var e=g(b[d]);return e>=0?(e>0&&(a.lastNeed=e-1),e):--d<c?0:(e=g(b[d]))>=0?(e>0&&(a.lastNeed=e-2),e):--d<c?0:(e=g(b[d]),e>=0?(e>0&&(2===e?e=0:a.lastNeed=e-3),e):0)}function i(a,b,c){if(128!=(192&b[0]))return a.lastNeed=0,"�".repeat(c);if(a.lastNeed>1&&b.length>1){if(128!=(192&b[1]))return a.lastNeed=1,"�".repeat(c+1);if(a.lastNeed>2&&b.length>2&&128!=(192&b[2]))return a.lastNeed=2,"�".repeat(c+2)}}function j(a){var b=this.lastTotal-this.lastNeed,c=i(this,a,b);return void 0!==c?c:this.lastNeed<=a.length?(a.copy(this.lastChar,b,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(a.copy(this.lastChar,b,0,a.length),void(this.lastNeed-=a.length))}function k(a,b){var c=h(this,a,b);if(!this.lastNeed)return a.toString("utf8",b);this.lastTotal=c;var d=a.length-(c-this.lastNeed);return a.copy(this.lastChar,0,d),a.toString("utf8",b,d)}function l(a){var b=a&&a.length?this.write(a):"";return this.lastNeed?b+"�".repeat(this.lastTotal-this.lastNeed):b}function m(a,b){if((a.length-b)%2==0){var c=a.toString("utf16le",b);if(c){var d=c.charCodeAt(c.length-1);if(d>=55296&&d<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=a[a.length-2],this.lastChar[1]=a[a.length-1],c.slice(0,-1)}return c}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=a[a.length-1],a.toString("utf16le",b,a.length-1)}function n(a){var b=a&&a.length?this.write(a):"";if(this.lastNeed){var c=this.lastTotal-this.lastNeed;return b+this.lastChar.toString("utf16le",0,c)}return b}function o(a,b){var c=(a.length-b)%3;return 0===c?a.toString("base64",b):(this.lastNeed=3-c,this.lastTotal=3,1===c?this.lastChar[0]=a[a.length-1]:(this.lastChar[0]=a[a.length-2],this.lastChar[1]=a[a.length-1]),a.toString("base64",b,a.length-c))}function p(a){var b=a&&a.length?this.write(a):"";return this.lastNeed?b+this.lastChar.toString("base64",0,3-this.lastNeed):b}function q(a){return a.toString(this.encoding)}function r(a){return a&&a.length?this.write(a):""}var s=a(42).Buffer,t=s.isEncoding||function(a){switch((a=""+a)&&a.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}};c.StringDecoder=f,f.prototype.write=function(a){if(0===a.length)return"";var b,c;if(this.lastNeed){if(void 0===(b=this.fillLast(a)))return"";c=this.lastNeed,this.lastNeed=0}else c=0;return c<a.length?b?b+this.text(a,c):this.text(a,c):b||""},f.prototype.end=l,f.prototype.text=k,f.prototype.fillLast=function(a){if(this.lastNeed<=a.length)return a.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);a.copy(this.lastChar,this.lastTotal-this.lastNeed,0,a.length),this.lastNeed-=a.length}},{42:42}],46:[function(a,b,c){(function(a){function c(a,b){function c(){if(!e){if(d("throwDeprecation"))throw new Error(b);d("traceDeprecation")?console.trace(b):console.warn(b),e=!0}return a.apply(this,arguments)}if(d("noDeprecation"))return a;var e=!1;return c}function d(b){try{if(!a.localStorage)return!1}catch(d){return!1}var c=a.localStorage[b];return null!=c&&"true"===String(c).toLowerCase()}b.exports=c}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],47:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(){function a(){l=!0,m=!0,n=!1,o=(new Date).getTime()}function b(a){m=a}function c(a){n=a}function d(a){l=a}function e(){return l}function f(){var a="",b=null;m&&(b=(new Date).getTime(),a+="["+(b-o)+"]"),n&&this&&this.getClassName&&(a+="["+this.getClassName()+"]",this.getType&&(a+="["+this.getType()+"]")),a.length>0&&(a+=" "),Array.apply(null,arguments).forEach(function(b){a+=b+" "}),l&&console.log(a),j.trigger(i.default.LOG,{message:a})}var h=this.context,j=(0,g.default)(h).getInstance(),k=void 0,l=void 0,m=void 0,n=void 0,o=void 0;return k={log:f,setLogTimestampVisible:b,setCalleeNameVisible:c,setLogToBrowserConsole:d,getLogToBrowserConsole:e},a(),k}Object.defineProperty(c,"__esModule",{value:!0});var f=a(48),g=d(f),h=a(52),i=d(h),j=a(49),k=d(j);e.__dashjs_factory_name="Debug",c.default=k.default.getSingletonFactory(e),b.exports=c.default},{48:48,49:49,52:52}],48:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(){function a(a,b,c){var e=arguments.length<=3||void 0===arguments[3]?h:arguments[3];if(!a)throw new Error("event type cannot be null or undefined");if(!b||"function"!=typeof b)throw new Error("listener must be a function: "+b);if(!(d(a,b,c)>=0)){f[a]=f[a]||[];var g={callback:b,scope:c,priority:e};f[a].some(function(b,c){if(b&&e>b.priority)return f[a].splice(c,0,g),!0})||f[a].push(g)}}function b(a,b,c){if(a&&b&&f[a]){var e=d(a,b,c);e<0||(f[a][e]=null)}}function c(a,b){if(a&&f[a]){if(b=b||{},b.hasOwnProperty("type"))throw new Error("'type' is a reserved word for event dispatching");b.type=a,f[a]=f[a].filter(function(a){return a}),f[a].forEach(function(a){return a&&a.callback.call(a.scope,b)})}}function d(a,b,c){var d=-1;return f[a]?(f[a].some(function(a,e){if(a&&a.callback===b&&(!c||c===a.scope))return d=e,!0}),d):d}function e(){f={}}var f={};return{on:a,off:b,trigger:c,reset:e}}Object.defineProperty(c,"__esModule",{value:!0});var f=a(49),g=d(f),h=0,i=5e3;e.__dashjs_factory_name="EventBus";var j=g.default.getSingletonFactory(e);j.EVENT_PRIORITY_LOW=h,j.EVENT_PRIORITY_HIGH=i,g.default.updateSingletonFactory(e.__dashjs_factory_name,j),c.default=j,b.exports=c.default},{49:49}],49:[function(a,b,c){"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d=function(){function a(a,b,c,d){var e=n(d);!e[a]&&b&&(e[a]={instance:b,override:c})}function b(a,b){for(var c in q){var d=q[c];if(d.context===a&&d.name===b)return d.instance}return null}function c(a,b,c){for(var d in q){var e=q[d];if(e.context===a&&e.name===b)return void(q[d].instance=c)}q.push({name:b,context:a,instance:c})}function d(a,b,c){for(var d in c){if(c[d].name===a)return void(c[d].factory=b)}c.push({name:a,factory:b})}function e(a,b){for(var c in b){if(b[c].name===a)return b[c].factory}return null}function f(a,b,c){for(var d in c){if(c[d].name===a)return void(c[d].factory=b)}}function g(a,b){f(a,b,s)}function h(a){return e(a,s)}function i(a){var b=e(a.__dashjs_factory_name,s);return b||(b=function(b){return void 0===b&&(b={}),{create:function(){return m(a.__dashjs_factory_name,a.apply({context:b},arguments),b,arguments)}}},d(a.__dashjs_factory_name,b,s)),b}function j(a,b){f(a,b,r)}function k(a){return e(a,r)}function l(a){var c=e(a.__dashjs_factory_name,r);return c||(c=function(c){var d=void 0;return void 0===c&&(c={}),{getInstance:function(){return d||(d=b(c,a.__dashjs_factory_name)),d||(d=m(a.__dashjs_factory_name,a.apply({context:c},arguments),c,arguments),q.push({name:a.__dashjs_factory_name,context:c,instance:d})),d}}},d(a.__dashjs_factory_name,c,r)),c}function m(a,b,c,d){b.getClassName=function(){return a};var e=n(c),f=e[a];if(f){var g=f.instance;if(!f.override)return g.apply({context:c,factory:o},d);g=g.apply({context:c,factory:o,parent:b},d);for(var h in g)b.hasOwnProperty(h)&&(b[h]=g[h])}return b}function n(a){var b=void 0;return p.forEach(function(c){c===a&&(b=c)}),b||(p.push(a),b=a),b}var o=void 0,p=[],q=[],r=[],s=[];return o={extend:a,getSingletonInstance:b,setSingletonInstance:c,getSingletonFactory:l,getSingletonFactoryByName:k,updateSingletonFactory:j,getClassFactory:i,getClassFactoryByName:h,updateClassFactory:g}}();c.default=d,b.exports=c.default},{}],50:[function(a,b,c){"use strict";function d(){return e}Object.defineProperty(c,"__esModule",{value:!0}),c.getVersionString=d;var e="2.6.7"},{}],51:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(c,"__esModule",{value:!0});var g=function(a,b,c){for(var d=!0;d;){var e=a,f=b,g=c;d=!1,null===e&&(e=Function.prototype);var h=Object.getOwnPropertyDescriptor(e,f);if(void 0!==h){if("value"in h)return h.value;var i=h.get;if(void 0===i)return;return i.call(g)}var j=Object.getPrototypeOf(e);if(null===j)return;a=j,b=f,c=g,d=!0,h=j=void 0}},h=a(53),i=d(h),j=function(a){function b(){e(this,b),g(Object.getPrototypeOf(b.prototype),"constructor",this).call(this),this.BUFFERING_COMPLETED="bufferingCompleted",this.BUFFER_CLEARED="bufferCleared",this.BUFFER_LEVEL_UPDATED="bufferLevelUpdated",this.BYTES_APPENDED="bytesAppended",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_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"}return f(b,a),b}(i.default);c.default=j,b.exports=c.default},{53:53}],52:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(c,"__esModule",{value:!0});var g=function(a,b,c){for(var d=!0;d;){var e=a,f=b,g=c;d=!1,null===e&&(e=Function.prototype);var h=Object.getOwnPropertyDescriptor(e,f);if(void 0!==h){if("value"in h)return h.value;var i=h.get;if(void 0===i)return;return i.call(g)}var j=Object.getPrototypeOf(e);if(null===j)return;a=j,b=f,c=g,d=!0,h=j=void 0}},h=a(51),i=d(h),j=function(a){function b(){e(this,b),g(Object.getPrototypeOf(b.prototype),"constructor",this).apply(this,arguments)}return f(b,a),b}(i.default),k=new j;c.default=k,b.exports=c.default},{51:51}],53:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(c,"__esModule",{value:!0});var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=function(){function a(){d(this,a)}return e(a,[{key:"extend",value:function(a,b){if(a){var c=!!b&&b.override,d=!!b&&b.publicOnly;for(var e in a)!a.hasOwnProperty(e)||this[e]&&!c||d&&-1===a[e].indexOf("public_")||(this[e]=a[e])}}}]),a}();c.default=f,b.exports=c.default},{}],54:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(){function a(){L()}function b(a){a&&a.dashManifestModel&&(N=a.dashManifestModel)}function c(a,b){return b&&a?b.getRepresentationForQuality(a.quality):null}function d(a){return a&&a.streamInfo&&void 0!==a.streamInfo.id&&P[a.streamInfo.id]?P[a.streamInfo.id][a.index]:null}function e(a,b){for(var c=b.length,d=0;d<c;d++){var e=b[d];if(a.id===e.id)return e}return null}function f(a){var b=new i.default,c=a.adaptation.period.mpd.manifest.Period_asArray[a.adaptation.period.index].AdaptationSet_asArray[a.adaptation.index],d=N.getRepresentationFor(a.index,c);return b.id=a.id,b.quality=a.index,b.bandwidth=N.getBandwidth(d),b.DVRWindow=a.segmentAvailabilityRange,b.fragmentDuration=a.segmentDuration||(a.segments&&a.segments.length>0?a.segments[0].duration:NaN),b.MSETimeOffset=a.MSETimeOffset,b.useCalculatedLiveEdgeTime=a.useCalculatedLiveEdgeTime,b.mediaInfo=h(a.adaptation),b}function h(a){var b=new k.default,c=a.period.mpd.manifest.Period_asArray[a.period.index].AdaptationSet_asArray[a.index],d=void 0;return b.id=a.id,b.index=a.index,b.type=a.type,b.streamInfo=n(a.period),b.representationCount=N.getRepresentationCount(c),b.lang=N.getLanguageForAdaptation(c),d=N.getViewpointForAdaptation(c),b.viewpoint=d?d.value:void 0,b.accessibility=N.getAccessibilityForAdaptation(c).map(function(a){var c=a.value,d=c;return a.schemeIdUri&&a.schemeIdUri.search("cea-608")>=0&&void 0!==u.default&&(d=c?"cea-608:"+c:"cea-608",b.embeddedCaptions=!0),d}),b.audioChannelConfiguration=N.getAudioChannelConfigurationForAdaptation(c).map(function(a){return a.value}),b.roles=N.getRolesForAdaptation(c).map(function(a){return a.value}),b.codec=N.getCodec(c),b.mimeType=N.getMimeType(c),b.contentProtection=N.getContentProtectionData(c),b.bitrateList=N.getBitrateListForAdaptation(c),b.contentProtection&&b.contentProtection.forEach(function(a){a.KID=N.getKID(a)}),b.isText=N.getIsTextTrack(b.mimeType),b}function j(a,b,c){a.id=b,a.index=100+parseInt(b.substring(2,3)),a.type=g.default.EMBEDDED_TEXT,a.codec="cea-608-in-SEI",a.isText=!0,a.isEmbedded=!0,a.lang=b+" "+c,a.roles=["caption"]}function l(a){a.type=g.default.IMAGE}function n(a){var b=new m.default;return b.id=a.id,b.index=a.index,b.start=a.start,b.duration=a.duration,b.manifestInfo=p(a.mpd),b.isLast=1===a.mpd.manifest.Period_asArray.length||Math.abs(b.start+b.duration-b.manifestInfo.duration)<1,b}function p(a){var b=new o.default;return b.DVRWindowSize=a.timeShiftBufferDepth,b.loadedTime=a.manifest.loadedTime,b.availableFrom=a.availabilityStartTime,b.minBufferTime=a.manifest.minBufferTime,b.maxFragmentDuration=a.maxSegmentDuration,b.duration=N.getDuration(a.manifest),b.isDynamic=N.getIsDynamic(a.manifest),b}function r(a,b){if(0===O.length)return null;var c=O[0].mpd.manifest,d=N.getAdaptationForType(c,a.index,b,a);if(!d)return null;var f=e(a,O),g=f.id,i=N.getIndexForAdaptation(d,c,a.index);return P[g]=P[g]||N.getAdaptationsForPeriod(f),h(P[g][i])}function s(a,b,c){var d=O,f=c,i=[],k=void 0,m=void 0,n=void 0,o=void 0,p=void 0,q=void 0;if(f){t();var r=N.getMpd(f);d=N.getRegularPeriods(r)}else{if(!(O.length>0))return i;f=O[0].mpd.manifest}var s=e(a,d),u=s.id,v=N.getAdaptationsForType(f,a.index,b!==g.default.EMBEDDED_TEXT?b:g.default.VIDEO);if(!v)return i;for(P[u]=P[u]||N.getAdaptationsForPeriod(s),o=0,q=v.length;o<q;o++)if(k=v[o],n=N.getIndexForAdaptation(k,f,a.index),m=h(P[u][n]),b===g.default.EMBEDDED_TEXT){var w=m.accessibility.length;for(p=0;p<w;p++)if(m){var x=m.accessibility[p];if(0===x.indexOf("cea-608:")){var y=x.substring(8),z=y.split(";");if("CC"===z[0].substring(0,2))for(p=0;p<z.length;p++)m||(m=h.call(this,P[u][n])),j(m,z[p].substring(0,3),z[p].substring(4)),i.push(m),m=null;else for(p=0;p<z.length;p++)m||(m=h.call(this,P[u][n])),j(m,"CC"+(p+1),z[p]),i.push(m),m=null}else 0===x.indexOf("cea-608")&&(j(m,g.default.CC1,"eng"),i.push(m),m=null)}}else b===g.default.IMAGE?(l(m),i.push(m),m=null):m&&i.push(m);return i}function t(){if(!N||!N.hasOwnProperty("getMpd")||!N.hasOwnProperty("getRegularPeriods"))throw new Error("setConfig function has to be called previously")}function v(a){if(!a)return null;t();var b=N.getMpd(a);O=N.getRegularPeriods(b),P={}}function w(a){var b=[],c=O;if(a){t();var d=N.getMpd(a);c=N.getRegularPeriods(d)}for(var e=0;e<c.length;e++)b.push(n(c[e]));return b}function x(a){if(!(a&&a.hasOwnProperty("getRepresentationController")&&a.hasOwnProperty("getIndexHandler")&&a.hasOwnProperty("getMediaInfo")&&a.hasOwnProperty("getType")&&a.hasOwnProperty("getStreamInfo")))throw new Error("streamProcessor parameter is missing or malformed!")}function y(a){if(!a||!a.hasOwnProperty("getRepresentationForQuality")||!a.hasOwnProperty("getCurrentRepresentation"))throw new Error("representationController parameter is missing or malformed!")}function z(a){if(null===a||isNaN(a)||a%1!=0)throw new Error("quality argument is not an integer")}function A(a,b){var c=void 0,d=void 0,e=void 0;return x(a),z(b),c=a.getRepresentationController(),e=a.getIndexHandler(),d=c?c.getRepresentationForQuality(b):null,e?e.getInitRequest(d):null}function B(a,b){var d=void 0,e=void 0,f=void 0;return x(a),d=a.getRepresentationController(),e=c(b,d),f=a.getIndexHandler(),f?f.getNextSegmentRequest(e):null}function C(a,b,d,e){var f=void 0,g=void 0,h=void 0;return x(a),f=a.getRepresentationController(),g=c(b,f),h=a.getIndexHandler(),h?h.getSegmentRequestForTime(g,d,e):null}function D(a,b,d){var e=void 0,f=void 0,g=void 0;return x(a),e=a.getRepresentationController(),f=c(b,e),g=a.getIndexHandler(),g?g.generateSegmentRequestForTime(f,d):null}function E(a){x(a);var b=a.getIndexHandler();return b?b.getCurrentTime():NaN}function F(a,b){x(a);var c=a.getIndexHandler();c&&c.setCurrentTime(b)}function G(a){x(a);var b=e(a.getStreamInfo(),O),c=a.getMediaInfo(),f=d(c),g=a.getType(),h=void 0,i=void 0;h=c?c.id:null,O.length>0&&(i=h?N.getAdaptationForId(h,O[0].mpd.manifest,b.index):N.getAdaptationForIndex(c.index,O[0].mpd.manifest,b.index),a.getRepresentationController().updateData(i,f,g))}function H(a,b){y(a),z(b);var c=a.getRepresentationForQuality(b);return c?f(c):null}function I(a){y(a);var b=a.getCurrentRepresentation();return b?f(b):null}function J(a,b,c){if(!a||!b)return null;var d=new q.default,e=a.scheme_id_uri,f=a.value,g=a.timescale,h=a.presentation_time_delta,i=a.event_duration,j=a.id,k=a.message_data,l=c*g+h;return b[e]?(d.eventStream=b[e],d.eventStream.value=f,d.eventStream.timescale=g,d.duration=i,d.id=j,d.presentationTime=l,d.messageData=k,d.presentationTimeDelta=h,d):null}function K(a,b){var f=[];if(0===O.length)return f;var g=O[0].mpd.manifest;return a instanceof m.default?f=N.getEventsForPeriod(e(a,O)):a instanceof k.default?f=N.getEventStreamForAdaptationSet(g,d(a)):a instanceof i.default&&(f=N.getEventStreamForRepresentation(g,c(a,b.getRepresentationController()))),f}function L(){O=[],P={}}var M=void 0,N=void 0,O=void 0,P=void 0;return M={convertDataToRepresentationInfo:f,getDataForMedia:d,getStreamsInfo:w,getMediaInfoForType:r,getAllMediaInfoForType:s,getCurrentRepresentationInfo:I,getRepresentationInfoForQuality:H,updateData:G,getInitRequest:A,getNextFragmentRequest:B,getFragmentRequestForTime:C,generateFragmentRequestForTime:D,getIndexHandlerTime:E,setIndexHandlerTime:F,getEventsFor:K,getEvent:J,setConfig:b,updatePeriods:v,reset:L},a(),M}Object.defineProperty(c,"__esModule",{value:!0});var f=a(100),g=d(f),h=a(218),i=d(h),j=a(216),k=d(j),l=a(219),m=d(l),n=a(215),o=d(n),p=a(81),q=d(p),r=a(49),s=d(r),t=a(2),u=d(t);e.__dashjs_factory_name="DashAdapter",c.default=s.default.getSingletonFactory(e),b.exports=c.default},{100:100,2:2,215:215,216:216,218:218,219:219,49:49,81:81}],55:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a){function b(){Z=(0,v.default)(O).getInstance().log.bind(Y),l(),R=c(a.mimeType)?(0,G.default)(O).getInstance():(0,E.default)(O).getInstance(),R.setConfig({baseURLController:X,metricsModel:U,mediaPlayerModel:V,errHandler:W}),P.on(p.default.INITIALIZATION_LOADED,M,Y),P.on(p.default.SEGMENTS_LOADED,N,Y)}function c(a){return"webm"===a.split("/")[1].toLowerCase()}function d(b){ca=b;var c=ca?ca.getStreamInfo().manifestInfo.isDynamic:null;R.initialize(),da=(0,C.default)(O).create(a,c)}function e(){return ca}function f(a){aa=a}function h(){return aa}function j(){return ba}function l(){$=-1,aa=0,ba=NaN,_=null,ca=null,da=null}function o(){l(),P.off(p.default.INITIALIZATION_LOADED,M,Y),P.off(p.default.SEGMENTS_LOADED,N,Y)}function q(a,b,c){var d=X.resolve(c.path),e=void 0,f=void 0;return d&&b!==d.url&&Q.isRelative(b)?(e=d.url,f=d.serviceLocation,b&&(e=Q.resolve(b,e))):e=b,!Q.isRelative(e)&&(a.url=e,a.serviceLocation=f,!0)}function s(a,b){var c=new k.default,d=a.adaptation.period,e=d.start,f=ca?ca.getStreamInfo().manifestInfo.isDynamic:null;if(c.mediaType=b,c.type=n.HTTPRequest.INIT_SEGMENT_TYPE,c.range=a.range,c.availabilityStartTime=S.calcAvailabilityStartTimeFromPresentationTime(e,d.mpd,f),c.availabilityEndTime=S.calcAvailabilityEndTimeFromPresentationTime(e+d.duration,d.mpd,f),c.quality=a.index,c.mediaInfo=ca?ca.getMediaInfo():null,c.representationId=a.id,q(c,a.initialization,a))return c}function t(a){var b=ca?ca.getType():null;return a?s(a,b):null}function u(a){var b=!1,c=ca?ca.getStreamInfo().manifestInfo.isDynamic:null;if(c||$!==a.availableSegmentsNumber){var d=(0,A.getSegmentByIndex)($,a);if(d){var e=parseFloat((d.presentationStartTime-a.adaptation.period.start).toFixed(5)),f=a.adaptation.period.duration;Z(a.segmentInfoType+": "+e+" / "+f),b=(a.segmentInfoType!==i.default.SEGMENT_TIMELINE||!c)&&e>=f}else Z("isMediaFinished - no segment found")}else b=!0;return b}function w(a){da.getSegments(a,_,$,y)}function y(a,b){var c=ca?ca.getStreamInfo().manifestInfo.isDynamic:null;if(a.segments=b,b&&b.length>0&&(ba=isNaN(ba)?b[0].presentationStartTime:Math.min(b[0].presentationStartTime,ba),c&&isNaN(S.getExpectedLiveEdge()))){var d=b[b.length-1],e=d.presentationStartTime,f=U.getMetricsFor(g.default.STREAM);S.setExpectedLiveEdge(e),U.updateManifestUpdateInfo(T.getCurrentManifestUpdate(f),{presentationStartTime:e})}}function B(a){if(!a)throw new Error("no representation");a.segments=null,w(a)}function D(a,b){var c=z.default.hasInitialization(a),d=z.default.hasSegments(a),e=ca?ca.getType():null,f=ca?ca.getStreamInfo().manifestInfo.isDynamic:null,g=void 0;if(a.segmentDuration||a.segments||B(a),a.segmentAvailabilityRange=null,a.segmentAvailabilityRange=S.calcSegmentAvailabilityRange(a,f),a.segmentAvailabilityRange.end<a.segmentAvailabilityRange.start&&!a.useCalculatedLiveEdgeTime)return g=new m.default(H,"no segments are available yet",{availabilityDelay:a.segmentAvailabilityRange.start-a.segmentAvailabilityRange.end}),void P.trigger(p.default.REPRESENTATION_UPDATED,{sender:this,representation:a,error:g});b||($=-1),a.segmentDuration&&B(a),c||R.loadInitialization(a),d||R.loadSegments(a,e,a.indexRange),c&&d&&P.trigger(p.default.REPRESENTATION_UPDATED,{sender:this,representation:a})}function F(a,b,c){var d=b.segments,e=d?d.length:null,f=-1,g=void 0,h=void 0,i=void 0,j=void 0,k=void 0;if(d&&e>0)for(c=void 0===c||null===c?V.getSegmentOverlapToleranceTime():c,k=0;k<e;k++)if(h=d[k],i=h.presentationStartTime,j=h.duration,g=void 0===c||null===c?j/2:c,a+g>=i&&a-g<i+j){f=h.availabilityIdx;break}return f}function I(a){if(null===a||void 0===a)return null;var b=new k.default,c=a.representation,d=c.adaptation.period.mpd.manifest.Period_asArray[c.adaptation.period.index].AdaptationSet_asArray[c.adaptation.index].Representation_asArray[c.index].bandwidth,e=a.media,f=ca?ca.getType():null;return e=(0,A.replaceTokenForTemplate)(e,"Number",a.replacementNumber),e=(0,A.replaceTokenForTemplate)(e,"Time",a.replacementTime),e=(0,A.replaceTokenForTemplate)(e,"Bandwidth",d),e=(0,A.replaceIDForTemplate)(e,c.id),e=(0,A.unescapeDollarsInTemplate)(e),b.mediaType=f,b.type=n.HTTPRequest.MEDIA_SEGMENT_TYPE,b.range=a.mediaRange,b.startTime=a.presentationStartTime,b.duration=a.duration,b.timescale=c.timescale,b.availabilityStartTime=a.availabilityStartTime,b.availabilityEndTime=a.availabilityEndTime,b.wallStartTime=a.wallStartTime,b.quality=c.index,b.index=a.availabilityIdx,b.mediaInfo=ca.getMediaInfo(),b.adaptationIndex=c.adaptation.index,b.representationId=c.id,q(b,e,c)?b:void 0}function J(a,b,c){var d=void 0,e=void 0,f=void 0,g=ca?ca.getType():null,h=ca?ca.getStreamInfo().manifestInfo.isDynamic:null,j=$,l=!!c&&c.keepIdx,m=c?c.timeThreshold:null,n=!(!c||!c.ignoreIsFinished);return a?(_!==b&&(_=b,Z("Getting the request for "+g+" time : "+b)),w(a),$=F(b,a,m),lt;0&&(w(a),$=F(b,a,m)),gt;0&&Z("Index for "+g+" time "+b+" is "+$),f=!n&&u(a),f?(d=new k.default,d.action=k.default.ACTION_COMPLETE,d.index=$,d.mediaType=g,d.mediaInfo=ca.getMediaInfo(),Z("Signal complete in getSegmentRequestForTime -",g)):(e=(0,A.getSegmentByIndex)($,a),d=I(e)),l&&j>=0&&($=a.segmentInfoType===i.default.SEGMENT_TIMELINE&&h?$:j),d):null}function K(a,b){var c=(a.segmentAvailabilityRange.end-a.segmentAvailabilityRange.start)/2;return a.segments=null,a.segmentAvailabilityRange={start:b-c,end:b+c},J(a,b,{keepIdx:!1,ignoreIsFinished:!0})}function L(a){var b=void 0,c=void 0,d=void 0,e=ca?ca.getType():null,f=ca?ca.getStreamInfo().manifestInfo.isDynamic:null;return a&&-1!==$?(_=null,$++,Z("Getting the next request at index: "+$+", type: "+e),!(0,A.getSegmentByIndex)($,a)&&f?(Z("No segment found at index: "+$+". Wait for next loop"),w(a),$--,null):(d=u(a),d?(b=new k.default,b.action=k.default.ACTION_COMPLETE,b.index=$,b.mediaType=e,b.mediaInfo=ca.getMediaInfo(),Z("Signal complete -",e)):(w(a),c=(0,A.getSegmentByIndex)($,a),b=I(c),!c&&f&&$--),b)):null}function M(a){var b=a.representation;b.segments&&P.trigger(p.default.REPRESENTATION_UPDATED,{sender:this,representation:b})}function N(a){var b=ca?ca.getType():null,c=ca?ca.getStreamInfo().manifestInfo.isDynamic:null;if(!a.error&&b===a.mediaType){var d=a.segments,e=a.representation,f=[],g=0,h=void 0,i=void 0,j=void 0,k=void 0;for(h=0,i=d.length;h<i;h++)j=d[h],k=(0,A.getTimeBasedSegment)(S,c,e,j.startTime,j.duration,j.timescale,j.media,j.mediaRange,g),f.push(k),k=null,g++;e.segmentAvailabilityRange={start:f[0].presentationStartTime,end:f[i-1].presentationStartTime},e.availableSegmentsNumber=i,y(e,f),z.default.hasInitialization(e)&&P.trigger(p.default.REPRESENTATION_UPDATED,{sender:this,representation:e})}}a=a||{};var O=this.context,P=(0,r.default)(O).getInstance(),Q=(0,x.default)(O).getInstance(),R=void 0,S=a.timelineConverter,T=a.dashMetrics,U=a.metricsModel,V=a.mediaPlayerModel,W=a.errHandler,X=a.baseURLController,Y=void 0,Z=void 0,$=void 0,_=void 0,aa=void 0,ba=void 0,ca=void 0,da=void 0;return Y={initialize:d,getStreamProcessor:e,getInitRequest:t,getSegmentRequestForTime:J,getNextSegmentRequest:L,generateSegmentRequestForTime:K,updateRepresentation:D,updateSegmentList:B,setCurrentTime:f,getCurrentTime:h,getEarliestTime:j,reset:o},b(),Y}Object.defineProperty(c,"__esModule",{value:!0});var f=a(100),g=d(f),h=a(59),i=d(h),j=a(212),k=d(j),l=a(210),m=d(l),n=a(229),o=a(52),p=d(o),q=a(48),r=d(q),s=a(49),t=d(s),u=a(47),v=d(u),w=a(205),x=d(w),y=a(85),z=d(y),A=a(75),B=a(74),C=d(B),D=a(57),E=d(D),F=a(58),G=d(F),H=1;e.__dashjs_factory_name="DashHandler";var I=t.default.getClassFactory(e);I.SEGMENTS_UNAVAILABLE_ERROR_CODE=H,t.default.updateClassFactory(e.__dashjs_factory_name,I),c.default=I,b.exports=c.default},{100:100,205:205,210:210,212:212,229:229,47:47,48:48,49:49,52:52,57:57,58:58,59:59,74:74,75:75,85:85}],56:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a){function b(a,b){var c=void 0;return c=w(A.getValue().Period_asArray[b],a),null===c?null:c.bandwidth}function c(a,b){return v(A.getValue().Period_asArray[b],a)}function d(a,b){return y(A.getValue().Period_asArray[b],a)}function e(a){return n(a,j.default.TRACK_SWITCH)}function g(a){return n(a,j.default.BUFFER_LEVEL)}function h(a){var b=g(a);return b?(0,k.round10)(b.level/1e3,-3):0}function i(a){return a?a.RequestsQueue:null}function l(a){if(!a)return null;var b=a.HttpList,c=null,d=void 0,e=void 0;if(!b||b.length<=0)return null;for(d=b.length,e=d-1;e>=0;){if(b[e].responsecode){c=b[e];break}e--}return c}function m(a){return a&&a.HttpList?a.HttpList:[]}function n(a,b){if(!a)return null;var c=a[b];if(!c)return null;var d=c.length;return d<=0?null:c[d-1]}function o(a){return n(a,j.default.DROPPED_FRAMES)}function p(a){return n(a,j.default.SCHEDULING_INFO)}function q(a){return n(a,j.default.MANIFEST_UPDATE)}function r(a){return n(a,j.default.DVR_INFO)}function s(a,b){var c={},d=void 0,e=void 0,g=void 0;for(d=m(a),g=d.length-1;g>=0;g--)if(e=d[g],e.type===f.HTTPRequest.MPD_TYPE){c=u(e._responseHeaders);break}return void 0===c[b]?null:c[b]}function t(a,b){var c={},d=l(a);return d&&(c=u(d._responseHeaders)),void 0===c[b]?null:c[b]}function u(a){var b={};if(!a)return b;for(var c=a.trim().split("\r\n"),d=0,e=c.length;d<e;d++){var f=c[d],g=f.indexOf(": ");g>0&&(b[f.substring(0,g)]=f.substring(g+2))}return b}function v(a,b){var c=w(a,b,!0);return null!==c?c:-1}function w(a,b,c){var d=void 0,e=void 0,f=void 0,g=void 0,h=void 0,i=void 0;if(a)for(e=a.AdaptationSet_asArray,h=0;h<e.length;h+=1)for(d=e[h],g=d.Representation_asArray,i=0;i<g.length;i+=1)if(f=g[i],b===f.id)return c?i:f;return null}function x(a,b){
19
+ return z.getIsTypeOf(a,b)}function y(a,b){var c=void 0,d=void 0,e=void 0,f=void 0;if(!a||!b)return-1;for(d=a.AdaptationSet_asArray,f=0;f<d.length;f+=1)if(c=d[f],e=c.Representation_asArray,x(c,b))return e.length;return-1}a=a||{};var z=a.dashManifestModel,A=a.manifestModel;return{getBandwidthForRepresentation:b,getIndexForRepresentation:c,getMaxIndexForBufferType:d,getCurrentRepresentationSwitch:e,getLatestBufferLevelVO:g,getCurrentBufferLevel:h,getCurrentHttpRequest:l,getHttpRequests:m,getCurrentDroppedFrames:o,getCurrentSchedulingInfo:p,getCurrentDVRInfo:r,getCurrentManifestUpdate:q,getLatestFragmentRequestHeaderValueByID:t,getLatestMPDRequestHeaderValueByID:s,getRequestsQueue:i}}Object.defineProperty(c,"__esModule",{value:!0});var f=a(229),g=a(49),h=d(g),i=a(101),j=d(i),k=a(41);e.__dashjs_factory_name="DashMetrics",c.default=h.default.getSingletonFactory(e),b.exports=c.default},{101:101,229:229,41:41,49:49}],57:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(){function a(){w=(0,q.default)(p).getInstance(),y=(0,g.default)(p).getInstance(),C=(0,z.default)(p).create({errHandler:t,metricsModel:A,mediaPlayerModel:B,requestModifier:y})}function b(a){a.baseURLController&&(D=a.baseURLController),a.metricsModel&&(A=a.metricsModel),a.mediaPlayerModel&&(B=a.mediaPlayerModel),a.errHandler&&(t=a.errHandler)}function c(){if(!D||!D.hasOwnProperty("resolve"))throw new Error("setConfig function has to be called previously")}function d(a,b){c();var e=null,f=null,g=D.resolve(a.path),h=b||{init:!0,url:g?g.url:void 0,range:{start:0,end:1500},searching:!1,bytesLoaded:0,bytesToLoad:1500};r("Start searching for initialization.");var i=l(h),k=function(b){h.bytesLoaded=h.range.end,f=w.parse(b),e=j(f),e?(a.range=e,s.trigger(m.default.INITIALIZATION_LOADED,{representation:a})):(h.range.end=h.bytesLoaded+h.bytesToLoad,d(a,h))},n=function(){s.trigger(m.default.INITIALIZATION_LOADED,{representation:a})};C.load({request:i,success:k,error:n}),r("Perform init search: "+h.url)}function e(a,b,d,f,g){if(c(),d&&(void 0===d.start||void 0===d.end)){var i=d?d.toString().split("-"):null;d=i?{start:parseFloat(i[0]),end:parseFloat(i[1])}:null}g=g||n;var j=null,k=null,m=!!d,o=D.resolve(a.path),p={init:!1,url:o?o.url:void 0,range:m?d:{start:0,end:1500},searching:!m,bytesLoaded:f?f.bytesLoaded:0,bytesToLoad:1500},q=l(p),s=function(c){var d=p.bytesToLoad,f=c.byteLength;if(p.bytesLoaded=p.range.end-p.range.start,j=w.parse(c),(k=j.getBox("sidx"))&&k.isComplete){var i=k.references,l=void 0,m=void 0;null!==i&&void 0!==i&&i.length>0&&(l=1===i[0].reference_type),l?function(){r("Initiate multiple SIDX load."),p.range.end=p.range.start+k.size;var c=void 0,d=void 0,f=void 0,h=void 0,j=void 0,l=[],m=0,n=(k.offset||p.range.start)+k.size,o=function(c){c?(l=l.concat(c),++m>=d&&g(l,a,b)):g(null,a,b)};for(c=0,d=i.length;c<d;c++)f=n,h=n+i[c].referenced_size-1,n+=i[c].referenced_size,j={start:f,end:h},e(a,null,j,p,o)}():(r("Parsing segments from SIDX."),m=h(k,p),g(m,a,b))}else{if(k)p.range.start=k.offset||p.range.start,p.range.end=p.range.start+(k.size||d);else{if(f<p.bytesLoaded)return void g(null,a,b);var n=j.getLastBox();n&&n.size?(p.range.start=n.offset+n.size,p.range.end=p.range.start+d):p.range.end+=d}e(a,b,p.range,p,g)}},t=function(){g(null,a,b)};C.load({request:q,success:s,error:t}),r("Perform SIDX load: "+p.url)}function f(){C.abort(),C=null,t=null,w=null,y=null}function h(a,b){for(var c=a.references,d=c.length,e=a.timescale,f=a.earliest_presentation_time,g=b.range.start+a.offset+a.first_offset+a.size,h=[],j=void 0,k=void 0,l=void 0,m=void 0,n=0;n<d;n++)l=c[n].subsegment_duration,m=c[n].referenced_size,j=new i.default,j.duration=l,j.startTime=f,j.timescale=e,k=g+m-1,j.mediaRange=g+"-"+k,h.push(j),f+=l,g+=m;return h}function j(a){var b=a.getBox("ftyp"),c=a.getBox("moov"),d=null,e=void 0,f=void 0;return r("Searching for initialization."),c&&c.isComplete&&(e=b?b.offset:c.offset,f=c.offset+c.size-1,d=e+"-"+f,r("Found the initialization. Range: "+d)),d}function l(a){if(a.url){var b=new x.default;return b.type=a.init?v.HTTPRequest.INIT_SEGMENT_TYPE:v.HTTPRequest.MEDIA_SEGMENT_TYPE,b.url=a.url,b.range=a.range.start+"-"+a.range.end,b}}function n(a,b,c){a?s.trigger(m.default.SEGMENTS_LOADED,{segments:a,representation:b,mediaType:c}):s.trigger(m.default.SEGMENTS_LOADED,{segments:null,representation:b,mediaType:c,error:new k.default(null,"error loading segments",null)})}var p=this.context,r=(0,u.default)(p).getInstance().log,s=(0,o.default)(p).getInstance(),t=void 0,w=void 0,y=void 0,A=void 0,B=void 0,C=void 0,D=void 0;return{setConfig:b,initialize:a,loadInitialization:d,loadSegments:e,reset:f}}Object.defineProperty(c,"__esModule",{value:!0});var f=a(203),g=d(f),h=a(86),i=d(h),j=a(210),k=d(j),l=a(52),m=d(l),n=a(48),o=d(n),p=a(193),q=d(p),r=a(49),s=d(r),t=a(47),u=d(t),v=a(229),w=a(212),x=d(w),y=a(98),z=d(y);e.__dashjs_factory_name="SegmentBaseLoader",c.default=s.default.getSingletonFactory(e),b.exports=c.default},{193:193,203:203,210:210,212:212,229:229,47:47,48:48,49:49,52:52,86:86,98:98}],58:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(){function a(){z={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}}}function b(){B=(0,q.default)(r).getInstance(),E=(0,x.default)(r).create({errHandler:A,metricsModel:C,mediaPlayerModel:D,requestModifier:B})}function c(a){if(!(a.baseURLController&&a.metricsModel&&a.mediaPlayerModel&&a.errHandler))throw new Error("Missing config parameter(s)");F=a.baseURLController,C=a.metricsModel,D=a.mediaPlayerModel,A=a.errHandler}function d(a){var b=[],c=void 0,d=void 0,e=(0,k.default)(r).create({data:a});for(e.consumeTagAndSize(z.Segment.Cues);e.moreData()&&e.consumeTagAndSize(z.Segment.Cues.CuePoint,!0);){for(c={},c.CueTime=e.parseTag(z.Segment.Cues.CuePoint.CueTime),c.CueTracks=[];e.moreData()&&e.consumeTag(z.Segment.Cues.CuePoint.CueTrackPositions,!0);){var f=e.getMatroskaCodedNum(),g=e.getPos();if(d={},d.Track=e.parseTag(z.Segment.Cues.CuePoint.CueTrackPositions.CueTrack),0===d.Track)throw new Error("Cue track cannot be 0");d.ClusterPosition=e.parseTag(z.Segment.Cues.CuePoint.CueTrackPositions.CueClusterPosition),c.CueTracks.push(d),e.setPos(g+f)}if(0===c.CueTracks.length)throw new Error("Mandatory cuetrack not found");b.push(c)}if(0===b.length)throw new Error("mandatory cuepoint not found");return b}function e(a,b,c,e){var f=void 0,g=void 0,h=void 0,i=void 0,j=void 0,k=void 0,l=void 0,m=void 0;for(g=d(a),h=[],j=0,k=g.length;j<k;j+=1)i=new s.default,f=0,f=j<g.length-1?g[j+1].CueTime-g[j].CueTime:e-g[j].CueTime,i.duration=f,i.startTime=g[j].CueTime,i.timescale=1e3,l=g[j].CueTracks[0].ClusterPosition+b,m=j<g.length-1?g[j+1].CueTracks[0].ClusterPosition+b-1:c-1,i.mediaRange=l+"-"+m,h.push(i);return u("Parsed cues: "+h.length+" cues."),h}function f(a,b,c,d){var f=(0,k.default)(r).create({data:a}),g=void 0,h=void 0,i=c.split("-"),j=null,l={url:b,range:{start:parseFloat(i[0]),end:parseFloat(i[1])},request:j},m=void 0,o=void 0;for(u("Parse EBML header: "+l.url),f.skipOverElement(z.EBML),f.consumeTag(z.Segment),m=f.getMatroskaCodedNum(),m+=f.getPos(),o=f.getPos();f.moreData()&&!f.consumeTagAndSize(z.Segment.Info,!0);)if(!(f.skipOverElement(z.Segment.SeekHead,!0)||f.skipOverElement(z.Segment.Tracks,!0)||f.skipOverElement(z.Segment.Cues,!0)||f.skipOverElement(z.Void,!0)))throw new Error("no valid top level element found");for(;void 0===g;){var p=f.getMatroskaCodedNum(!0),q=f.getMatroskaCodedNum();switch(p){case z.Segment.Info.Duration.tag:g=f[z.Segment.Info.Duration.parse](q);break;default:f.setPos(f.getPos()+q)}}j=n(l);var s=function(a){h=e(a,o,m,g),d(h)},t=function(){u("Download Error: Cues "+l.url),d(null)};E.load({request:j,success:s,error:t}),u("Perform cues load: "+l.url+" bytes="+l.range.start+"-"+l.range.end)}function h(){if(!F||!F.hasOwnProperty("resolve"))throw new Error("setConfig function has to be called previously")}function j(a,b){h();var c=null,d=F.resolve(a.path),e=d?d.url:void 0,f=a.range.split("-"),i=b||{range:{start:parseFloat(f[0]),end:parseFloat(f[1])},request:c,url:e,init:!0};u("Start loading initialization."),c=n(i);var j=function(){w.trigger(g.default.INITIALIZATION_LOADED,{representation:a})},k=function(){w.trigger(g.default.INITIALIZATION_LOADED,{representation:a})};E.load({request:c,success:j,error:k}),u("Perform init load: "+i.url)}function l(a,b,c,d){h();var e=null,g=F.resolve(a.path),i=g?g.url:void 0,j=8192,k={bytesLoaded:0,bytesToLoad:j,range:{start:0,end:j},request:e,url:i,init:!1};d=d||m,e=n(k),u("Parsing ebml header");var l=function(e){f(e,i,c,function(c){d(c,a,b)})},o=function(){d(null,a,b)};E.load({request:e,success:l,error:o})}function m(a,b,c){a?w.trigger(g.default.SEGMENTS_LOADED,{segments:a,representation:b,mediaType:c}):w.trigger(g.default.SEGMENTS_LOADED,{segments:null,representation:b,mediaType:c,error:new Error(null,"error loading segments",null)})}function n(a){var b=new v.default;return b.type=a.init?t.HTTPRequest.INIT_SEGMENT_TYPE:t.HTTPRequest.MEDIA_SEGMENT_TYPE,b.url=a.url,b.range=a.range.start+"-"+a.range.end,b}function p(){A=null,B=null,u=null}var r=this.context,u=(0,o.default)(r).getInstance().log,w=(0,i.default)(r).getInstance(),y=void 0,z=void 0,A=void 0,B=void 0,C=void 0,D=void 0,E=void 0,F=void 0;return y={setConfig:c,initialize:b,loadInitialization:j,loadSegments:l,reset:p},a(),y}Object.defineProperty(c,"__esModule",{value:!0});var f=a(52),g=d(f),h=a(48),i=d(h),j=a(197),k=d(j),l=a(49),m=d(l),n=a(47),o=d(n),p=a(203),q=d(p),r=a(86),s=d(r),t=a(229),u=a(212),v=d(u),w=a(98),x=d(w);e.__dashjs_factory_name="WebmSegmentBaseLoader",c.default=m.default.getSingletonFactory(e),b.exports=c.default},{197:197,203:203,212:212,229:229,47:47,48:48,49:49,52:52,86:86,98:98}],59:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(c,"__esModule",{value:!0});var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=function(){function a(){d(this,a),this.init()}return e(a,[{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.CENC_DEFAULT_KID="cenc:default_KID",this.DVB_PRIORITY="dvb:priority",this.DVB_WEIGHT="dvb:weight"}}]),a}(),g=new f;c.default=g,b.exports=c.default},{}],60:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(){function a(){l(),H.on(o.default.QUALITY_CHANGE_REQUESTED,D,I),H.on(o.default.REPRESENTATION_UPDATED,A,I),H.on(o.default.WALLCLOCK_TIME_UPDATED,B,I),H.on(o.default.BUFFER_LEVEL_UPDATED,C,I),H.on(o.default.MANIFEST_VALIDITY_CHANGED,E,I)}function b(a){a.abrController&&(O=a.abrController),a.domStorage&&(S=a.domStorage),a.metricsModel&&(R=a.metricsModel),a.dashMetrics&&(V=a.dashMetrics),a.dashManifestModel&&(U=a.dashManifestModel),a.playbackController&&(Q=a.playbackController),a.timelineConverter&&(T=a.timelineConverter),a.manifestModel&&(X=a.manifestModel),a.streamProcessor&&(W=a.streamProcessor)}function c(){P=W.getIndexHandler()}function d(){return W}function e(){return J}function f(){return K}function h(){return L}function j(){return N}function l(){J=null,K=-1,L=!0,M=[],O=null,Q=null,R=null,S=null,T=null,U=null,V=null}function n(){H.off(o.default.QUALITY_CHANGE_REQUESTED,D,I),H.off(o.default.REPRESENTATION_UPDATED,A,I),H.off(o.default.WALLCLOCK_TIME_UPDATED,B,I),H.off(o.default.BUFFER_LEVEL_UPDATED,C,I),H.off(o.default.MANIFEST_VALIDITY_CHANGED,E,I),l()}function p(a,b,c){var d=W.getStreamInfo(),e=O.getTopQualityIndexFor(c,d.id),f=O.getMinAllowedIndexFor(c),h=void 0,i=void 0,j=null;if(L=!0,H.trigger(o.default.DATA_UPDATE_STARTED,{sender:this}),M=w(b),null!==J&&J.id==a.id||c===g.default.FRAGMENTED_TEXT?h=O.getQualityFor(c,d):(i=O.getThroughputHistory().getAverageThroughput(c),j=i||O.getInitialBitrateFor(c,d),h=O.getQualityForBitrate(W.getMediaInfo(),j)),void 0!==f&&h<f&&(h=f),h>e&&(h=e),N=t(h),J=a,c!==g.default.VIDEO&&c!==g.default.AUDIO&&c!==g.default.FRAGMENTED_TEXT)return L=!1,void H.trigger(o.default.DATA_UPDATE_COMPLETED,{sender:this,data:J,currentRepresentation:N});for(var k=0;k<M.length;k++)P.updateRepresentation(M[k],!0)}function q(){var a=new Date,b=j(),c=1e3*Q.getTime();R.addRepresentationSwitch(b.adaptation.type,a,c,b.id)}function r(){var a=W.getStreamInfo(),b=a?a.manifestInfo:null,c=b?b.isDynamic:null,d=T.calcSegmentAvailabilityRange(N,c);R.addDVRInfo(W.getType(),Q.getTime(),b,d)}function t(a){return M[a]}function u(a){return M.indexOf(a)}function v(){for(var a=0,b=M.length;a<b;a++){var c=M[a].segmentInfoType;if(null===M[a].segmentAvailabilityRange||!s.default.hasInitialization(M[a])||(c===i.default.SEGMENT_BASE||c===i.default.BASE_URL)&&!M[a].segments)return!1}return!0}function w(a){return K=U.getIndexForAdaptation(J,a.period.mpd.manifest,a.period.index),U.getRepresentationsForAdaptation(a)}function x(a){for(var b=void 0,c=0,d=M.length;c<d;c++)b=M[c],b.segmentAvailabilityRange=T.calcSegmentAvailabilityRange(b,a)}function y(){M.forEach(function(a){a.segmentAvailabilityRange=null})}function z(a){var b=a,c=function(){if(!h()){L=!0,H.trigger(o.default.DATA_UPDATE_STARTED,{sender:I}),y();for(var a=0;a<M.length;a++)P.updateRepresentation(M[a],!0)}};L=!1,H.trigger(o.default.AST_IN_FUTURE,{delay:b}),setTimeout(c,b)}function A(a){if(a.sender.getStreamProcessor()===W&&h()){var b=a.representation,c=R.getMetricsFor(g.default.STREAM),d=R.getMetricsFor(j().adaptation.type),e=V.getCurrentManifestUpdate(c),f=!1,l=0,m=void 0,n=void 0,p=void 0;if(b.adaptation.period.mpd.manifest.type===i.default.DYNAMIC&&!b.adaptation.period.mpd.manifest.ignorePostponeTimePeriod){var s=b.segmentAvailabilityRange.end-b.segmentAvailabilityRange.start;l=1e3*(Q.computeLiveDelay(N.segmentDuration,W.getStreamInfo().manifestInfo.DVRWindowSize)-s)}if(l>0)return r(),z(l),n=new k.default(F,"Segments update failed",null),void H.trigger(o.default.DATA_UPDATE_COMPLETED,{sender:this,data:J,currentRepresentation:N,error:n});if(e){for(var t=0;t<e.representationInfo.length;t++)if(m=e.representationInfo[t],m.index===b.index&&m.mediaType===W.getType()){f=!0;break}f||R.addManifestUpdateRepresentationInfo(e,b.id,b.index,b.adaptation.period.index,W.getType(),b.presentationTimeOffset,b.startNumber,b.segmentInfoType)}v()&&(L=!1,O.setPlaybackQuality(W.getType(),W.getStreamInfo(),u(N)),R.updateManifestUpdateInfo(e,{latency:N.segmentAvailabilityRange.end-Q.getTime()}),p=V.getCurrentRepresentationSwitch(d),p||q(),H.trigger(o.default.DATA_UPDATE_COMPLETED,{sender:this,data:J,currentRepresentation:N}))}}function B(a){a.isDynamic&&x(a.isDynamic)}function C(a){if(a.sender.getStreamProcessor()===W){X.getValue().doNotUpdateDVRWindowOnBufferUpdated||r()}}function D(a){if(a.mediaType===W.getType()&&W.getStreamInfo().id===a.streamInfo.id&&a.oldQuality!==a.newQuality){N=t(a.newQuality);var b=O.getThroughputHistory().getAverageThroughput(a.mediaType);isNaN(b)||S.setSavedBitrateSettings(a.mediaType,b),q()}}function E(a){if(a.newDuration){var b=j();if(b&&b.adaptation.period){b.adaptation.period.duration=a.newDuration}}}var F=1,G=this.context,H=(0,m.default)(G).getInstance(),I=void 0,J=void 0,K=void 0,L=void 0,M=void 0,N=void 0,O=void 0,P=void 0,Q=void 0,R=void 0,S=void 0,T=void 0,U=void 0,V=void 0,W=void 0,X=void 0;return I={initialize:c,setConfig:b,getData:e,getDataIndex:f,isUpdating:h,updateData:p,getStreamProcessor:d,getCurrentRepresentation:j,getRepresentationForQuality:t,reset:n},a(),I}Object.defineProperty(c,"__esModule",{value:!0});var f=a(100),g=d(f),h=a(59),i=d(h),j=a(210),k=d(j),l=a(48),m=d(l),n=a(52),o=d(n),p=a(49),q=d(p),r=a(85),s=d(r);e.__dashjs_factory_name="RepresentationController",c.default=q.default.getClassFactory(e),b.exports=c.default},{100:100,210:210,48:48,49:49,52:52,59:59,85:85}],61:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a){function b(a,b){var c=void 0,d=void 0,e=void 0,f=void 0,h=void 0,j=void 0,k=!1,l=!1;if(!a)throw new Error("adaptation is not defined");if(!b)throw new Error("type is not defined");if(a.hasOwnProperty("ContentComponent_asArray")&&(f=a.ContentComponent_asArray),h=b!==g.default.TEXT?new RegExp(b):new RegExp("(vtt|ttml)"),a.Representation_asArray&&a.Representation_asArray.length&&a.Representation_asArray.length>0&&a.Representation_asArray[0].hasOwnProperty(i.default.CODECS)&&(j=a.Representation_asArray[0].codecs,0===j.search(g.default.STPP)||0===j.search(g.default.WVTT)))return b===g.default.FRAGMENTED_TEXT;if(f){if(f.length>1)return b===g.default.MUXED;f[0]&&f[0].contentType===b&&(k=!0,l=!0)}if(a.hasOwnProperty(i.default.MIME_TYPE)&&(k=h.test(a.mimeType),l=!0),!l)for(c=0,d=a.Representation_asArray&&a.Representation_asArray.length?a.Representation_asArray.length:0;!l&&c<d;)e=a.Representation_asArray[c],e.hasOwnProperty(i.default.MIME_TYPE)&&(k=h.test(e.mimeType),l=!0),c++;return k}function c(a){return b(a,g.default.AUDIO)}function d(a){return b(a,g.default.VIDEO)}function e(a){return b(a,g.default.FRAGMENTED_TEXT)}function f(a){return b(a,g.default.TEXT)}function h(a){return b(a,g.default.MUXED)}function j(a){return b(a,g.default.IMAGE)}function l(a){return"text/vtt"===a||"application/ttml+xml"===a}function n(a){var b="";return a&&a.hasOwnProperty(i.default.LANG)&&(b=a.lang.replace(/[^A-Za-z0-9-]/g,"")),b}function p(a){return a&&a.hasOwnProperty(i.default.VIEWPOINT)?a.Viewpoint:null}function r(a){return a&&a.hasOwnProperty(i.default.ROLE_ASARRAY)?a.Role_asArray:[]}function t(a){return a&&a.hasOwnProperty(i.default.ACCESSIBILITY_ASARRAY)?a.Accessibility_asArray:[]}function v(a){return a&&a.hasOwnProperty(i.default.AUDIOCHANNELCONFIGURATION_ASARRAY)?a.AudioChannelConfiguration_asArray:[]}function x(a){return r(a).filter(function(a){return a.value===i.default.MAIN})[0]}function z(){return function(a,b){return a.bandwidth-b.bandwidth}}function B(a){return a&&void 0!==a.Representation_asArray&&null!==a.Representation_asArray&&a.Representation_asArray.sort(z()),a}function D(a,b,c){var d=b&&b.Period_asArray&&na(c)&&b.Period_asArray[c]?b.Period_asArray[c].AdaptationSet_asArray:[],e=void 0,f=void 0;for(e=0,f=d.length;e<f;e++)if(d[e].hasOwnProperty(i.default.ID)&&d[e].id===a)return d[e];return null}function E(a,b,c){var d=b&&b.Period_asArray&&na(c)&&b.Period_asArray[c]?b.Period_asArray[c].AdaptationSet_asArray:null;return d&&na(a)?d[a]:null}function F(a,b,c){var d=b&&b.Period_asArray&&na(c)&&b.Period_asArray[c]?b.Period_asArray[c].AdaptationSet_asArray:[],e=d.length;if(a)for(var f=0;f<e;f++){var g=(0,A.default)(ha).getInstance();if(g.areEqual(d[f],a))return f}return-1}function G(a,c,d){var e=a&&a.Period_asArray&&na(c)&&a.Period_asArray[c]?a.Period_asArray[c].AdaptationSet_asArray:[],f=void 0,g=void 0,h=[];for(f=0,g=e.length;f<g;f++)b(e[f],d)&&h.push(B(e[f]));return h}function H(a,b,c,d){var e=G(a,b,c);if(!e||0===e.length)return null;if(e.length>1&&d){for(var f=ja.getCurrentTrackFor(c,d),g=la.getAllMediaInfoForType(d,c),h=0,i=e.length;h<i;h++)if(f&&ja.isTracksEqual(f,g[h]))return e[h];for(var h=0,i=e.length;h<i;h++)if(x(e[h]))return e[h]}return e[0]}function I(a,b,c){if(a&&a.Representation_asArray&&a.Representation_asArray.length>0){var d=na(b)&&b>=0&&b<a.Representation_asArray.length?a.Representation_asArray[b]:a.Representation_asArray[0],e=d.mimeType+';codecs="'+d.codecs+'"';return c&&void 0!==d.width&&(e+=';width="'+d.width+'";height="'+d.height+'"'),e}return null}function J(a){return a&&a.Representation_asArray&&a.Representation_asArray.length>0?a.Representation_asArray[0].mimeType:null}function K(a){return a&&a.hasOwnProperty(i.default.CENC_DEFAULT_KID)?a[i.default.CENC_DEFAULT_KID]:null}function L(a){return a&&a.hasOwnProperty(i.default.CONTENTPROTECTION_ASARRAY)&&0!==a.ContentProtection_asArray.length?a.ContentProtection_asArray:null}function M(a){var b=!1;return a&&a.hasOwnProperty("type")&&(b=a.type===i.default.DYNAMIC),b}function N(a,b){var c=!1;return a&&a.profiles&&a.profiles.length>0&&(c=-1!==a.profiles.indexOf(b)),c}function O(a){return N(a,ma)}function P(a){return a&&a.hasOwnProperty(i.default.MEDIA_PRESENTATION_DURATION)?a.mediaPresentationDuration:Number.MAX_SAFE_INTEGER||Number.MAX_VALUE}function Q(a){return a&&a.bandwidth?a.bandwidth:NaN}function R(a){var b=arguments.length<=1||void 0===arguments[1]?0:arguments[1],c=NaN;return a&&a.hasOwnProperty(i.default.MINIMUM_UPDATE_PERIOD)&&(c=a.minimumUpdatePeriod),isNaN(c)?c:Math.max(c-b,1)}function S(a){return a&&a.Representation_asArray&&a.Representation_asArray.length?a.Representation_asArray.length:0}function T(a){return a&&a.Representation_asArray&&a.Representation_asArray.length?B(a).Representation_asArray.map(function(a){return{bandwidth:a.bandwidth,width:a.width||0,height:a.height||0,scanType:a.scanType||null}}):null}function U(a){return a&&a.EssentialProperty_asArray&&a.EssentialProperty_asArray.length?a.EssentialProperty_asArray.map(function(a){return{schemeIdUri:a.schemeIdUri,value:a.value}}):null}function V(a,b){return b&&b.Representation_asArray&&b.Representation_asArray.length>0&&na(a)?b.Representation_asArray[a]:null}function W(a){var b=[],c=void 0,d=void 0,e=void 0,f=void 0,g=void 0,h=void 0,j=void 0;if(a&&a.period&&na(a.period.index)){var m=a.period.mpd.manifest.Period_asArray[a.period.index];m&&m.AdaptationSet_asArray&&na(a.index)&&(f=B(m.AdaptationSet_asArray[a.index]))}if(f&&f.Representation_asArray)for(h=0;f&&h<f.Representation_asArray.length;h++)g=f.Representation_asArray[h],c=new k.default,c.index=h,c.adaptation=a,g.hasOwnProperty(i.default.ID)&&(c.id=g.id),g.hasOwnProperty(i.default.CODECS)&&(c.codecs=g.codecs),g.hasOwnProperty(i.default.CODEC_PRIVATE_DATA)&&(c.codecPrivateData=g.codecPrivateData),g.hasOwnProperty(i.default.BANDWITH)&&(c.bandwidth=g.bandwidth),g.hasOwnProperty(i.default.WIDTH)&&(c.width=g.width),g.hasOwnProperty(i.default.HEIGHT)&&(c.height=g.height),g.hasOwnProperty(i.default.SCAN_TYPE)&&(c.scanType=g.scanType),g.hasOwnProperty(i.default.MAX_PLAYOUT_RATE)&&(c.maxPlayoutRate=g.maxPlayoutRate),g.hasOwnProperty(i.default.SEGMENT_BASE)?(e=g.SegmentBase,c.segmentInfoType=i.default.SEGMENT_BASE):g.hasOwnProperty(i.default.SEGMENT_LIST)?(e=g.SegmentList,e.hasOwnProperty(i.default.SEGMENT_TIMELINE)?(c.segmentInfoType=i.default.SEGMENT_TIMELINE,j=e.SegmentTimeline.S_asArray[e.SegmentTimeline.S_asArray.length-1],(!j.hasOwnProperty("r")||j.r>=0)&&(c.useCalculatedLiveEdgeTime=!0)):(c.segmentInfoType=i.default.SEGMENT_LIST,c.useCalculatedLiveEdgeTime=!0)):g.hasOwnProperty(i.default.SEGMENT_TEMPLATE)?(e=g.SegmentTemplate,e.hasOwnProperty(i.default.SEGMENT_TIMELINE)?(c.segmentInfoType=i.default.SEGMENT_TIMELINE,j=e.SegmentTimeline.S_asArray[e.SegmentTimeline.S_asArray.length-1],(!j.hasOwnProperty("r")||j.r>=0)&&(c.useCalculatedLiveEdgeTime=!0)):c.segmentInfoType=i.default.SEGMENT_TEMPLATE,e.hasOwnProperty(i.default.INITIALIZATION_MINUS)&&(c.initialization=e.initialization.split("$Bandwidthquot;).join(g.bandwidth).split("$RepresentationIDquot;).join(g.id))):c.segmentInfoType=i.default.BASE_URL,c.essentialProperties=U(g),e&&(e.hasOwnProperty(i.default.INITIALIZATION)?(d=e.Initialization,d.hasOwnProperty(i.default.SOURCE_URL)?c.initialization=d.sourceURL:d.hasOwnProperty(i.default.RANGE)&&(c.range=d.range)):g.hasOwnProperty(i.default.MIME_TYPE)&&l(g.mimeType)&&(c.range=0),e.hasOwnProperty(i.default.TIMESCALE)&&(c.timescale=e.timescale),e.hasOwnProperty(i.default.DURATION)&&(c.segmentDuration=e.duration/c.timescale),e.hasOwnProperty(i.default.MEDIA)&&(c.media=e.media),e.hasOwnProperty(i.default.START_NUMBER)&&(c.startNumber=e.startNumber),e.hasOwnProperty(i.default.INDEX_RANGE)&&(c.indexRange=e.indexRange),e.hasOwnProperty(i.default.PRESENTATION_TIME_OFFSET)&&(c.presentationTimeOffset=e.presentationTimeOffset/c.timescale)),c.MSETimeOffset=ka.calcMSETimeOffset(c),c.path=[a.period.index,a.index,h],b.push(c);return b}function X(a){var b=a&&na(a.index)?a.mpd.manifest.Period_asArray[a.index]:null,f=[],k=void 0,l=void 0,n=void 0;if(b&&b.AdaptationSet_asArray)for(n=0;n<b.AdaptationSet_asArray.length;n++)l=b.AdaptationSet_asArray[n],k=new m.default,l.hasOwnProperty(i.default.ID)&&(k.id=l.id),k.index=n,k.period=a,h(l)?k.type=g.default.MUXED:c(l)?k.type=g.default.AUDIO:d(l)?k.type=g.default.VIDEO:e(l)?k.type=g.default.FRAGMENTED_TEXT:j(l)?k.type=g.default.IMAGE:k.type=g.default.TEXT,f.push(k);return f}function Y(a){var b=!!a&&M(a.manifest),c=[],d=null,e=null,f=null,g=null,h=void 0,j=void 0;for(j=0,h=a&&a.manifest&&a.manifest.Period_asArray?a.manifest.Period_asArray.length:0;j<h;j++)e=a.manifest.Period_asArray[j],e.hasOwnProperty(i.default.START)?(g=new o.default,g.start=e.start):null!==d&&e.hasOwnProperty(i.default.DURATION)&&null!==f?(g=new o.default,g.start=parseFloat((f.start+f.duration).toFixed(5)),g.duration=e.duration):0!==j||b||(g=new o.default,g.start=0),null!==f&&isNaN(f.duration)&&(f.duration=parseFloat((g.start-f.start).toFixed(5))),null!==g&&(g.id=Z(e,j)),null!==g&&e.hasOwnProperty(i.default.DURATION)&&(g.duration=e.duration),null!==g&&(g.index=j,g.mpd=a,c.push(g),d=e,f=g),e=null,g=null;return 0===c.length?c:(null!==f&&isNaN(f.duration)&&(f.duration=parseFloat((_(f)-f.start).toFixed(5))),c)}function Z(a,b){if(!a)throw new Error("Period cannot be null or undefined");var c=o.default.DEFAULT_ID+"_"+b;return a.hasOwnProperty(i.default.ID)&&a.id.length>0&&"__proto__"!==a.id&&(c=a.id),c}function $(a){var b=new q.default;return a&&(b.manifest=a,a.hasOwnProperty(i.default.AVAILABILITY_START_TIME)?b.availabilityStartTime=new Date(a.availabilityStartTime.getTime()):b.availabilityStartTime=new Date(a.loadedTime.getTime()),a.hasOwnProperty(i.default.AVAILABILITY_END_TIME)&&(b.availabilityEndTime=new Date(a.availabilityEndTime.getTime())),a.hasOwnProperty(i.default.MINIMUM_UPDATE_PERIOD)&&(b.minimumUpdatePeriod=a.minimumUpdatePeriod),a.hasOwnProperty(i.default.MEDIA_PRESENTATION_DURATION)&&(b.mediaPresentationDuration=a.mediaPresentationDuration),a.hasOwnProperty(g.default.SUGGESTED_PRESENTATION_DELAY)&&(b.suggestedPresentationDelay=a.suggestedPresentationDelay),a.hasOwnProperty(i.default.TIMESHIFT_BUFFER_DEPTH)&&(b.timeShiftBufferDepth=a.timeShiftBufferDepth),a.hasOwnProperty(i.default.MAX_SEGMENT_DURATION)&&(b.maxSegmentDuration=a.maxSegmentDuration)),b}function _(a){var b=M(a.mpd.manifest),c=void 0;if(a.mpd.manifest.mediaPresentationDuration)c=a.mpd.manifest.mediaPresentationDuration;else if(a.duration)c=a.duration;else{if(!b)throw new Error("Must have @mediaPresentationDuratio on MPD or an explicit @duration on the last period.");c=Number.POSITIVE_INFINITY}return c}function aa(a){var b=a&&a.mpd&&a.mpd.manifest?a.mpd.manifest:null,c=b?b.Period_asArray:null,d=c&&a&&na(a.index)?c[a.index].EventStream_asArray:null,e=[],f=void 0,h=void 0;if(d)for(f=0;f<d.length;f++){var j=new y.default;if(j.period=a,j.timescale=1,!d[f].hasOwnProperty(g.default.SCHEME_ID_URI))throw new Error("Invalid EventStream. SchemeIdUri has to be set");for(j.schemeIdUri=d[f].schemeIdUri,d[f].hasOwnProperty(i.default.TIMESCALE)&&(j.timescale=d[f].timescale),d[f].hasOwnProperty(i.default.VALUE)&&(j.value=d[f].value),h=0;h<d[f].Event_asArray.length;h++){var k=new u.default;k.presentationTime=0,k.eventStream=j,d[f].Event_asArray[h].hasOwnProperty(i.default.PRESENTATION_TIME)&&(k.presentationTime=d[f].Event_asArray[h].presentationTime),d[f].Event_asArray[h].hasOwnProperty(i.default.DURATION)&&(k.duration=d[f].Event_asArray[h].duration),d[f].Event_asArray[h].hasOwnProperty(i.default.ID)&&(k.id=d[f].Event_asArray[h].id),e.push(k)}}return e}function ba(a,b){var c=[],d=void 0;if(!a)return c;for(d=0;d<a.length;d++){var e=new y.default;if(e.timescale=1,e.representation=b,!a[d].hasOwnProperty(g.default.SCHEME_ID_URI))throw new Error("Invalid EventStream. SchemeIdUri has to be set");e.schemeIdUri=a[d].schemeIdUri,a[d].hasOwnProperty(i.default.TIMESCALE)&&(e.timescale=a[d].timescale),a[d].hasOwnProperty(i.default.VALUE)&&(e.value=a[d].value),c.push(e)}return c}function ca(a,b){var c=void 0,d=void 0,e=void 0;return a&&a.Period_asArray&&b&&b.period&&na(b.period.index)&&(d=a.Period_asArray[b.period.index])&&d.AdaptationSet_asArray&&na(b.index)&&(e=d.AdaptationSet_asArray[b.index])&&(c=e.InbandEventStream_asArray),ba(c,null)}function da(a,b){var c=void 0,d=void 0,e=void 0,f=void 0
20
+ ;return a&&a.Period_asArray&&b&&b.adaptation&&b.adaptation.period&&na(b.adaptation.period.index)&&(d=a.Period_asArray[b.adaptation.period.index])&&d.AdaptationSet_asArray&&na(b.adaptation.index)&&(e=d.AdaptationSet_asArray[b.adaptation.index])&&e.Representation_asArray&&na(b.index)&&(f=e.Representation_asArray[b.index])&&(c=f.InbandEventStream_asArray),ba(c,b)}function ea(a){var b=M(a),c=!!a&&a.hasOwnProperty(i.default.AVAILABILITY_START_TIME),d=a?a.UTCTiming_asArray:null,e=[];return(b||c)&&d&&d.forEach(function(a){var b=new s.default;a.hasOwnProperty(g.default.SCHEME_ID_URI)&&(b.schemeIdUri=a.schemeIdUri,a.hasOwnProperty(i.default.VALUE)&&(b.value=a.value.toString(),e.push(b)))}),e}function fa(a){var b=[],c=a.BaseURL_asArray||[a.baseUri],d=!1;return c.some(function(c){if(c){var e=new w.default,f=c.__text||c;return ia.isRelative(f)&&(d=!0,a.baseUri&&(f=ia.resolve(f,a.baseUri))),e.url=f,c.hasOwnProperty(i.default.SERVICE_LOCATION)&&c.serviceLocation.length?e.serviceLocation=c.serviceLocation:e.serviceLocation=f,c.hasOwnProperty(i.default.DVB_PRIORITY)&&(e.dvb_priority=c[i.default.DVB_PRIORITY]),c.hasOwnProperty(i.default.DVB_WEIGHT)&&(e.dvb_weight=c[i.default.DVB_WEIGHT]),b.push(e),d}}),b}function ga(a){if(a&&a.hasOwnProperty(g.default.LOCATION))return a.Location=a.Location_asArray[0],a.Location}a=a||{};var ha=this.context,ia=(0,C.default)(ha).getInstance(),ja=a.mediaController,ka=a.timelineConverter,la=a.adapter,ma="urn:dvb:dash:profile:dvb-dash:2014",na=Number.isInteger||function(a){return"number"==typeof a&&isFinite(a)&&Math.floor(a)===a};return{getIsTypeOf:b,getIsAudio:c,getIsVideo:d,getIsText:f,getIsMuxed:h,getIsTextTrack:l,getIsFragmentedText:e,getIsImage:j,getIsMain:x,getLanguageForAdaptation:n,getViewpointForAdaptation:p,getRolesForAdaptation:r,getAccessibilityForAdaptation:t,getAudioChannelConfigurationForAdaptation:v,getAdaptationForIndex:E,getIndexForAdaptation:F,getAdaptationForId:D,getAdaptationsForType:G,getAdaptationForType:H,getCodec:I,getMimeType:J,getKID:K,getContentProtectionData:L,getIsDynamic:M,getIsDVB:O,getDuration:P,getBandwidth:Q,getManifestUpdatePeriod:R,getRepresentationCount:S,getBitrateListForAdaptation:T,getRepresentationFor:V,getRepresentationsForAdaptation:W,getAdaptationsForPeriod:X,getRegularPeriods:Y,getMpd:$,getEventsForPeriod:aa,getEventStreamForAdaptationSet:ca,getEventStreamForRepresentation:da,getUTCTimingSources:ea,getBaseURLsFromElement:fa,getRepresentationSortFunction:z,getLocation:ga}}Object.defineProperty(c,"__esModule",{value:!0});var f=a(100),g=d(f),h=a(59),i=d(h),j=a(85),k=d(j),l=a(79),m=d(l),n=a(84),o=d(n),p=a(83),q=d(p),r=a(87),s=d(r),t=a(81),u=d(t),v=a(80),w=d(v),x=a(82),y=d(x),z=a(202),A=d(z),B=a(205),C=d(B),D=a(49),E=d(D);e.__dashjs_factory_name="DashManifestModel",c.default=E.default.getSingletonFactory(e),b.exports=c.default},{100:100,202:202,205:205,49:49,59:59,79:79,80:80,81:81,82:82,83:83,84:84,85:85,87:87}],62:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a){function b(){n=[new q.default,new s.default,new u.default,new o.default],p=new m.default({escapeMode:!1,attributePrefix:"",arrayAccessForm:"property",emptyNodeForm:"object",stripWhitespaces:!1,enableToStringFunc:!1,ignoreRoot:!0,matchers:n}),r=new k.default([new w.default,new y.default])}function c(){if(!j||!j.hasOwnProperty("manifestError"))throw new Error("Missing config parameter(s)")}function d(){return n}function e(){return r}function f(a){var b=void 0;c();try{var d=window.performance.now();if(!(b=p.xml_str2json(a)))throw new Error("parser error");var e=window.performance.now();r.run(b);var f=window.performance.now();h("Parsing complete: ( xml2json: "+(e-d).toPrecision(3)+"ms, objectiron: "+(f-e).toPrecision(3)+"ms, total: "+((f-d)/1e3).toPrecision(3)+"s)")}catch(g){return j.manifestError("parsing the manifest failed","parse",a,g),null}return b}a=a||{};var g=this.context,h=(0,i.default)(g).getInstance().log,j=a.errorHandler,l=void 0,n=void 0,p=void 0,r=void 0;return l={parse:f,getMatchers:d,getIron:e},b(),l}Object.defineProperty(c,"__esModule",{value:!0});var f=a(49),g=d(f),h=a(47),i=d(h),j=a(3),k=d(j),l=a(4),m=d(l),n=a(71),o=d(n),p=a(69),q=d(p),r=a(68),s=d(r),t=a(70),u=d(t),v=a(65),w=d(v),x=a(66),y=d(x);e.__dashjs_factory_name="DashParser",c.default=g.default.getClassFactory(e),b.exports=c.default},{3:3,4:4,47:47,49:49,65:65,66:66,68:68,69:69,70:70,71:71}],63:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(c,"__esModule",{value:!0});var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=function(){function a(b,c){d(this,a);var e=function(a){return a&&a.length&&a.charAt(0)===a.charAt(0).toUpperCase()};this._name=b,this._merge=void 0!==c?c:e(b)}return e(a,[{key:"name",get:function(){return this._name}},{key:"merge",get:function(){return this._merge}}]),a}();c.default=f,b.exports=c.default},{}],64:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(c,"__esModule",{value:!0});var f=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),g=a(63),h=d(g),i=function(){function a(b,c,d,f,g){var i=this;e(this,a),this._name=b||"",this._properties=[],this._children=d||[],this._isRoot=f||!1,this._isArray=g||!0,Array.isArray(c)&&c.forEach(function(a){i._properties.push(new h.default(a))})}return f(a,[{key:"name",get:function(){return this._name}},{key:"isRoot",get:function(){return this._isRoot}},{key:"isArray",get:function(){return this._isArray}},{key:"children",get:function(){return this._children}},{key:"properties",get:function(){return this._properties}}]),a}();c.default=i,b.exports=c.default},{63:63}],65:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(c,"__esModule",{value:!0});var g=function(a,b,c){for(var d=!0;d;){var e=a,f=b,g=c;d=!1,null===e&&(e=Function.prototype);var h=Object.getOwnPropertyDescriptor(e,f);if(void 0!==h){if("value"in h)return h.value;var i=h.get;if(void 0===i)return;return i.call(g)}var j=Object.getPrototypeOf(e);if(null===j)return;a=j,b=f,c=g,d=!0,h=j=void 0}},h=a(64),i=d(h),j=a(59),k=d(j),l=function(a){function b(){e(this,b);var a=[k.default.PROFILES,k.default.WIDTH,k.default.HEIGHT,k.default.SAR,k.default.FRAMERATE,k.default.AUDIO_SAMPLING_RATE,k.default.MIME_TYPE,k.default.SEGMENT_PROFILES,k.default.CODECS,k.default.MAXIMUM_SAP_PERIOD,k.default.START_WITH_SAP,k.default.MAX_PLAYOUT_RATE,k.default.CODING_DEPENDENCY,k.default.SCAN_TYPE,k.default.FRAME_PACKING,k.default.AUDIO_CHANNEL_CONFIGURATION,k.default.CONTENT_PROTECTION,k.default.ESSENTIAL_PROPERTY,k.default.SUPPLEMENTAL_PROPERTY,k.default.INBAND_EVENT_STREAM];g(Object.getPrototypeOf(b.prototype),"constructor",this).call(this,k.default.ADAPTATION_SET,a,[new i.default(k.default.REPRESENTATION,a,[new i.default(k.default.SUB_REPRESENTATION,a)])])}return f(b,a),b}(i.default);c.default=l,b.exports=c.default},{59:59,64:64}],66:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(c,"__esModule",{value:!0});var g=function(a,b,c){for(var d=!0;d;){var e=a,f=b,g=c;d=!1,null===e&&(e=Function.prototype);var h=Object.getOwnPropertyDescriptor(e,f);if(void 0!==h){if("value"in h)return h.value;var i=h.get;if(void 0===i)return;return i.call(g)}var j=Object.getPrototypeOf(e);if(null===j)return;a=j,b=f,c=g,d=!0,h=j=void 0}},h=a(64),i=d(h),j=a(59),k=d(j),l=function(a){function b(){e(this,b);var a=[k.default.SEGMENT_BASE,k.default.SEGMENT_TEMPLATE,k.default.SEGMENT_LIST];g(Object.getPrototypeOf(b.prototype),"constructor",this).call(this,k.default.PERIOD,a,[new i.default(k.default.ADAPTATION_SET,a,[new i.default(k.default.REPRESENTATION,a)])])}return f(b,a),b}(i.default);c.default=l,b.exports=c.default},{59:59,64:64}],67:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(c,"__esModule",{value:!0});var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=function(){function a(b,c){d(this,a),this._test=b,this._converter=c}return e(a,[{key:"test",get:function(){return this._test}},{key:"converter",get:function(){return this._converter}}]),a}();c.default=f,b.exports=c.default},{}],68:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(c,"__esModule",{value:!0});var g=function(a,b,c){for(var d=!0;d;){var e=a,f=b,g=c;d=!1,null===e&&(e=Function.prototype);var h=Object.getOwnPropertyDescriptor(e,f);if(void 0!==h){if("value"in h)return h.value;var i=h.get;if(void 0===i)return;return i.call(g)}var j=Object.getPrototypeOf(e);if(null===j)return;a=j,b=f,c=g,d=!0,h=j=void 0}},h=a(67),i=d(h),j=60,k=60,l=1e3,m=/^([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}))?/,n=function(a){function b(){e(this,b),g(Object.getPrototypeOf(b.prototype),"constructor",this).call(this,function(a){return m.test(a.value)},function(a){var b=m.exec(a),c=void 0;if(c=Date.UTC(parseInt(b[1],10),parseInt(b[2],10)-1,parseInt(b[3],10),parseInt(b[4],10),parseInt(b[5],10),b[6]&&parseInt(b[6],10)||0,b[7]&&parseFloat(b[7])*l||0),b[9]&&b[10]){var d=parseInt(b[9],10)*k+parseInt(b[10],10);c+=("+"===b[8]?-1:1)*d*j*l}return new Date(c)})}return f(b,a),b}(i.default);c.default=n,b.exports=c.default},{67:67}],69:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(c,"__esModule",{value:!0});var g=function(a,b,c){for(var d=!0;d;){var e=a,f=b,g=c;d=!1,null===e&&(e=Function.prototype);var h=Object.getOwnPropertyDescriptor(e,f);if(void 0!==h){if("value"in h)return h.value;var i=h.get;if(void 0===i)return;return i.call(g)}var j=Object.getPrototypeOf(e);if(null===j)return;a=j,b=f,c=g,d=!0,h=j=void 0}},h=a(67),i=d(h),j=a(100),k=d(j),l=a(59),m=d(l),n=/^([-])?P(([\d.]*)Y)?(([\d.]*)M)?(([\d.]*)D)?T?(([\d.]*)H)?(([\d.]*)M)?(([\d.]*)S)?/,o=31536e3,p=2592e3,q=86400,r=3600,s=60,t=function(a){function b(){e(this,b),g(Object.getPrototypeOf(b.prototype),"constructor",this).call(this,function(a){for(var b=[m.default.MIN_BUFFER_TIME,m.default.MEDIA_PRESENTATION_DURATION,m.default.MINIMUM_UPDATE_PERIOD,m.default.TIMESHIFT_BUFFER_DEPTH,m.default.MAX_SEGMENT_DURATION,m.default.MAX_SUBSEGMENT_DURATION,k.default.SUGGESTED_PRESENTATION_DELAY,m.default.START,k.default.START_TIME,m.default.DURATION],c=b.length,d=0;d<c;d++)if(a.nodeName===b[d])return n.test(a.value);return!1},function(a){var b=n.exec(a),c=parseFloat(b[2]||0)*o+parseFloat(b[4]||0)*p+parseFloat(b[6]||0)*q+parseFloat(b[8]||0)*r+parseFloat(b[10]||0)*s+parseFloat(b[12]||0);return void 0!==b[1]&&(c=-c),c})}return f(b,a),b}(i.default);c.default=t,b.exports=c.default},{100:100,59:59,67:67}],70:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(c,"__esModule",{value:!0});var g=function(a,b,c){for(var d=!0;d;){var e=a,f=b,g=c;d=!1,null===e&&(e=Function.prototype);var h=Object.getOwnPropertyDescriptor(e,f);if(void 0!==h){if("value"in h)return h.value;var i=h.get;if(void 0===i)return;return i.call(g)}var j=Object.getPrototypeOf(e);if(null===j)return;a=j,b=f,c=g,d=!0,h=j=void 0}},h=a(67),i=d(h),j=/^[-+]?[0-9]+[.]?[0-9]*([eE][-+]?[0-9]+)?#x2F;,k=function(a){function b(){e(this,b),g(Object.getPrototypeOf(b.prototype),"constructor",this).call(this,function(a){return j.test(a.value)},function(a){return parseFloat(a)})}return f(b,a),b}(i.default);c.default=k,b.exports=c.default},{67:67}],71:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}function f(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(c,"__esModule",{value:!0});var h=function(a,b,c){for(var d=!0;d;){var e=a,f=b,g=c;d=!1,null===e&&(e=Function.prototype);var h=Object.getOwnPropertyDescriptor(e,f);if(void 0!==h){if("value"in h)return h.value;var i=h.get;if(void 0===i)return;return i.call(g)}var j=Object.getPrototypeOf(e);if(null===j)return;a=j,b=f,c=g,d=!0,h=j=void 0}},i=a(67),j=d(i),k=a(59),l=d(k),m=function(a){function b(){f(this,b),h(Object.getPrototypeOf(b.prototype),"constructor",this).call(this,function(a,b){var c,d=(c={},e(c,l.default.MPD,[l.default.ID,l.default.PROFILES]),e(c,l.default.PERIOD,[l.default.ID]),e(c,l.default.BASE_URL,[l.default.SERVICE_LOCATION,l.default.BYTE_RANGE]),e(c,l.default.SEGMENT_BASE,[l.default.INDEX_RANGE]),e(c,l.default.INITIALIZATION,[l.default.RANGE]),e(c,l.default.REPRESENTATION_INDEX,[l.default.RANGE]),e(c,l.default.SEGMENT_LIST,[l.default.INDEX_RANGE]),e(c,l.default.BITSTREAM_SWITCHING,[l.default.RANGE]),e(c,l.default.SEGMENT_URL,[l.default.MEDIA_RANGE,l.default.INDEX_RANGE]),e(c,l.default.SEGMENT_TEMPLATE,[l.default.INDEX_RANGE,l.default.MEDIA,l.default.INDEX,l.default.INITIALIZATION_MINUS,l.default.BITSTREAM_SWITCHING_MINUS]),e(c,l.default.ASSET_IDENTIFIER,[l.default.VALUE,l.default.ID]),e(c,l.default.EVENT_STREAM,[l.default.VALUE]),e(c,l.default.ADAPTATION_SET,[l.default.PROFILES,l.default.MIME_TYPE,l.default.SEGMENT_PROFILES,l.default.CODECS,l.default.CONTENT_TYPE]),e(c,l.default.FRAME_PACKING,[l.default.VALUE,l.default.ID]),e(c,l.default.AUDIO_CHANNEL_CONFIGURATION,[l.default.VALUE,l.default.ID]),e(c,l.default.CONTENT_PROTECTION,[l.default.VALUE,l.default.ID]),e(c,l.default.ESSENTIAL_PROPERTY,[l.default.VALUE,l.default.ID]),e(c,l.default.SUPPLEMENTAL_PROPERTY,[l.default.VALUE,l.default.ID]),e(c,l.default.INBAND_EVENT_STREAM,[l.default.VALUE,l.default.ID]),e(c,l.default.ACCESSIBILITY,[l.default.VALUE,l.default.ID]),e(c,l.default.ROLE,[l.default.VALUE,l.default.ID]),e(c,l.default.RATING,[l.default.VALUE,l.default.ID]),e(c,l.default.VIEWPOINT,[l.default.VALUE,l.default.ID]),e(c,l.default.CONTENT_COMPONENT,[l.default.CONTENT_TYPE]),e(c,l.default.REPRESENTATION,[l.default.ID,l.default.DEPENDENCY_ID,l.default.MEDIA_STREAM_STRUCTURE_ID]),e(c,l.default.SUBSET,[l.default.ID]),e(c,l.default.METRICS,[l.default.METRICS_MINUS]),e(c,l.default.REPORTING,[l.default.VALUE,l.default.ID]),c);if(d.hasOwnProperty(b)){var f=d[b];return void 0!==f&&f.indexOf(a.name)>=0}return!1},function(a){return String(a)})}return g(b,a),b}(j.default);c.default=m,b.exports=c.default},{59:59,67:67}],72:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(){function a(a){a&&a.boxParser&&(d=a.boxParser)}function b(a){if(!d)throw new Error("boxParser is undefined");if(!a)return{sampleList:[],lastSequenceNumber:NaN,totalDuration:NaN,numSequences:NaN};var b=d.parse(a),c=b.getBoxes("moof"),e=b.getBoxes("mfhd"),f=void 0,g=void 0,h=void 0,i=void 0,j=void 0,k=void 0,l=void 0,m=void 0,n=void 0,o=void 0,p=void 0,q=void 0,r=void 0,s=void 0,t=void 0,u=void 0,v=void 0;u=b.getBoxes("moof").length,t=e[e.length-1].sequence_number,h=0,k=[];var w=-1,x=-1;for(p=0;p<c.length;p++){var y=c[p],z=y.getChildBoxes("traf");for(n=0;n<z.length;n++){var A=z[n],B=A.getChildBox("tfhd"),C=A.getChildBox("tfdt");j=C.baseMediaDecodeTime;var D=A.getChildBoxes("trun"),E=A.getChildBoxes("subs");for(o=0;o<D.length;o++){var F=D[o];for(h=F.sample_count,s=(B.base_data_offset||0)+(F.data_offset||0),m=0;m<h;m++){l=F.samples[m],f=void 0!==l.sample_duration?l.sample_duration:B.default_sample_duration,i=void 0!==l.sample_size?l.sample_size:B.default_sample_size,g=void 0!==l.sample_composition_time_offset?l.sample_composition_time_offset:0;var G={dts:j,cts:j+g,duration:f,offset:y.offset+s,size:i,subSizes:[i]};if(E)for(q=0;q<E.length;q++){var H=E[q];if(w<H.entry_count&&m>x&&(w++,x+=H.entries[w].sample_delta),m==x){G.subSizes=[];var I=H.entries[w];for(r=0;r<I.subsample_count;r++)G.subSizes.push(I.subsamples[r].subsample_size)}}k.push(G),s+=i,j+=f}}v=j-C.baseMediaDecodeTime}}return{sampleList:k,lastSequenceNumber:t,totalDuration:v,numSequences:u}}function c(a){if(!d)throw new Error("boxParser is undefined");var b=d.parse(a),c=b?b.getBox("mdhd"):void 0;return c?c.timescale:NaN}var d=void 0;return{getSamplesInfo:b,getMediaTimescaleFromMoov:c,setConfig:a}}Object.defineProperty(c,"__esModule",{value:!0});var f=a(49),g=d(f);e.__dashjs_factory_name="FragmentedTextBoxParser",c.default=g.default.getSingletonFactory(e),b.exports=c.default},{49:49}],73:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a,b){function c(a,c,e,f){var g=a.adaptation.period.mpd.manifest.Period_asArray[a.adaptation.period.index].AdaptationSet_asArray[a.adaptation.index].Representation_asArray[a.index].SegmentList,i=g.SegmentURL_asArray.length,j=[],k=void 0,l=void 0,m=void 0,n=void 0,o=void 0,p=void 0,q=void 0;for(q=a.startNumber,n=(0,h.decideSegmentListRangeForTemplate)(d,b,a,c,e,f),o=Math.max(n.start,0),p=Math.min(n.end,g.SegmentURL_asArray.length-1),k=o;k<=p;k++)m=g.SegmentURL_asArray[k],l=(0,h.getIndexBasedSegment)(d,b,a,k),l.replacementTime=(q+k-1)*a.segmentDuration,l.media=m.media?m.media:"",l.mediaRange=m.mediaRange,l.index=m.index,l.indexRange=m.indexRange,j.push(l),l=null;return a.availableSegmentsNumber=i,j}a=a||{};var d=a.timelineConverter;return{getSegments:c}}Object.defineProperty(c,"__esModule",{value:!0});var f=a(49),g=d(f),h=a(75);e.__dashjs_factory_name="ListSegmentsGetter";var i=g.default.getClassFactory(e);c.default=i,b.exports=c.default},{49:49,75:75}],74:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a,b){function c(){i=(0,k.default)(f).create(a,b),j=(0,m.default)(f).create(a,b),l=(0,o.default)(f).create(a,b)}function d(a,b,c,d,f){var h=void 0,k=a.segmentInfoType;k!==g.default.SEGMENT_BASE&&k!==g.default.BASE_URL&&e(a,c)?(k===g.default.SEGMENT_TIMELINE?h=i.getSegments(a,b,c,f):k===g.default.SEGMENT_TEMPLATE?h=j.getSegments(a,b,c,f):k===g.default.SEGMENT_LIST&&(h=l.getSegments(a,b,c,f)),d&&d(a,h)):h=a.segments}function e(a,b){var c=a.segments,d=!1,e=void 0,f=void 0;return c&&0!==c.length?(f=c[0].availabilityIdx,e=c[c.length-1].availabilityIdx,d=b<f||b>e):d=!0,d}var f=this.context,h=void 0,i=void 0,j=void 0,l=void 0;return h={getSegments:d},c(),h}Object.defineProperty(c,"__esModule",{value:!0});var f=a(59),g=d(f),h=a(49),i=d(h),j=a(78),k=d(j),l=a(76),m=d(l),n=a(73),o=d(n);e.__dashjs_factory_name="SegmentsGetter";var p=i.default.getClassFactory(e);c.default=p,b.exports=c.default},{49:49,59:59,73:73,76:76,78:78}],75:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a,b){for(;a.length<b;)a="0"+a;return a}function f(a,b){return a.representation.startNumber+b}function g(a){return a?a.split("$").join("quot;):a}function h(a,b){if(!b||!a||-1===a.indexOf("$RepresentationIDquot;))return a;var c=b.toString();return a.split("$RepresentationIDquot;).join(c)}function i(a,b,c){var d="%0",f=void 0,g=void 0,h=void 0,i=void 0,j=void 0,k=void 0,l=b.length,m=d.length;if(!a)return a;for(;;){if((f=a.indexOf("quot;+b))<0)return a;if((g=a.indexOf("quot;,f+l))<0)return a;if((h=a.indexOf(d,f+l))>f&&h<g)switch(i=a.charAt(g-1),j=parseInt(a.substring(h+m,g-1),10),i){case"d":case"i":case"u":k=e(c.toString(),j);break;case"x":k=e(c.toString(16),j);break;case"X":k=e(c.toString(16),j).toUpperCase();break;case"o":k=e(c.toString(8),j);break;default:return a}else k=c;a=a.substring(0,f)+k+a.substring(g+1)}}function j(a,b,c,d){var e=void 0,g=void 0,h=void 0,i=void 0;return g=c.segmentDuration,isNaN(g)&&(g=c.adaptation.period.duration),h=parseFloat((c.adaptation.period.start+d*g).toFixed(5)),i=parseFloat((h+g).toFixed(5)),e=new o.default,e.representation=c,e.duration=g,e.presentationStartTime=h,e.mediaStartTime=a.calcMediaTimeFromPresentationTime(e.presentationStartTime,c),e.availabilityStartTime=a.calcAvailabilityStartTimeFromPresentationTime(e.presentationStartTime,c.adaptation.period.mpd,b),e.availabilityEndTime=a.calcAvailabilityEndTimeFromPresentationTime(i,c.adaptation.period.mpd,b),e.wallStartTime=a.calcWallTimeForSegment(e,b),e.replacementNumber=f(e,d),e.availabilityIdx=d,e}function k(a,b,c,d,e,g,h,j,k,l){var m=d/g,n=Math.min(e/g,c.adaptation.period.mpd.maxSegmentDuration),p=void 0,q=void 0,r=void 0;return p=a.calcPresentationTimeFromMediaTime(m,c),q=p+n,r=new o.default,r.representation=c,r.duration=n,r.mediaStartTime=m,r.presentationStartTime=p,r.availabilityStartTime=c.adaptation.period.mpd.manifest.loadedTime,r.availabilityEndTime=a.calcAvailabilityEndTimeFromPresentationTime(q,c.adaptation.period.mpd,b),r.wallStartTime=a.calcWallTimeForSegment(r,b),r.replacementTime=l||d,r.replacementNumber=f(r,k),h=i(h,"Number",r.replacementNumber),h=i(h,"Time",r.replacementTime),r.media=h,r.mediaRange=j,r.availabilityIdx=k,r}function l(a,b){if(!b||!b.segments)return null;var c=b.segments.length,d=void 0,e=void 0;if(a<c&&(d=b.segments[a])&&d.availabilityIdx===a)return d;for(e=0;e<c;e++)if((d=b.segments[e])&&d.availabilityIdx===a)return d;return null}function m(a,b,c,d,e,f){var g=c.segmentDuration,h=c.adaptation.period.mpd.manifest.minBufferTime,i=c.segmentAvailabilityRange,j={start:a.calcPeriodRelativeTimeFromMpdRelativeTime(c,i.start),end:a.calcPeriodRelativeTimeFromMpdRelativeTime(c,i.end)},k=c.segments,m=2*g,n=f||Math.max(2*h,10*g),o=NaN,p=null,q=void 0,r=void 0;return j.start=Math.max(j.start,0),b&&!a.isTimeSyncCompleted()?(q=Math.floor(j.start/g),r=Math.floor(j.end/g),{start:q,end:r}):(k&&k.length>0?(p=l(e,c),o=p?a.calcPeriodRelativeTimeFromMpdRelativeTime(c,p.presentationStartTime):e>0?e*g:a.calcPeriodRelativeTimeFromMpdRelativeTime(c,d)):o=e>0?e*g:b?j.end:j.start,q=Math.floor(Math.max(o-m,j.start)/g),r=Math.floor(Math.min(q+n/g,j.end/g)),{start:q,end:r})}Object.defineProperty(c,"__esModule",{value:!0}),c.unescapeDollarsInTemplate=g,c.replaceIDForTemplate=h,c.replaceTokenForTemplate=i,c.getIndexBasedSegment=j,c.getTimeBasedSegment=k,c.getSegmentByIndex=l,c.decideSegmentListRangeForTemplate=m;var n=a(86),o=d(n)},{86:86}],76:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a,b){function c(a,c,e,f){var g=a.adaptation.period.mpd.manifest.Period_asArray[a.adaptation.period.index].AdaptationSet_asArray[a.adaptation.index].Representation_asArray[a.index].SegmentTemplate,i=a.segmentDuration,j=a.segmentAvailabilityRange,k=[],l=null,m=null,n=void 0,o=void 0,p=void 0,q=void 0,r=void 0;for(r=a.startNumber,n=isNaN(i)&&!b?{start:r,end:r}:(0,h.decideSegmentListRangeForTemplate)(d,b,a,c,e,f),p=n.start,q=n.end,o=p;o<=q;o++)m=(0,h.getIndexBasedSegment)(d,b,a,o),m.replacementTime=(r+o-1)*a.segmentDuration,l=g.media,l=(0,h.replaceTokenForTemplate)(l,"Number",m.replacementNumber),l=(0,h.replaceTokenForTemplate)(l,"Time",m.replacementTime),m.media=l,k.push(m),m=null;return isNaN(i)?a.availableSegmentsNumber=1:a.availableSegmentsNumber=Math.ceil((j.end-j.start)/i),k}var d=a.timelineConverter;return{getSegments:c}}Object.defineProperty(c,"__esModule",{value:!0});var f=a(49),g=d(f),h=a(75);e.__dashjs_factory_name="TemplateSegmentsGetter";var i=g.default.getClassFactory(e);c.default=i,b.exports=c.default},{49:49,75:75}],77:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(){function a(){u(),x.on(i.default.TIME_SYNCHRONIZATION_COMPLETED,s,this)}function b(){return z}function c(a){z=a}function d(){return y}function e(a){y=a}function f(){return A}function h(a){A=a}function j(a,b,c,d){return d?c&&b.timeShiftBufferDepth!=Number.POSITIVE_INFINITY?new Date(b.availabilityStartTime.getTime()+1e3*(a+b.timeShiftBufferDepth)):b.availabilityEndTime:c?new Date(b.availabilityStartTime.getTime()+1e3*(a-y)):b.availabilityStartTime}function k(a,b,c){return j.call(this,a,b,c)}function l(a,b,c){return j.call(this,a,b,c,!0)}function m(a,b){return(a.getTime()-b.mpd.availabilityStartTime.getTime()+1e3*y)/1e3}function n(a,b){return a+(b.adaptation.period.start-b.presentationTimeOffset)}function o(a,b){return a-b.adaptation.period.start+b.presentationTimeOffset}function p(a,b){var c=void 0,d=void 0,e=void 0;return b&&(c=a.representation.adaptation.period.mpd.suggestedPresentationDelay,d=a.presentationStartTime+c,e=new Date(a.availabilityStartTime.getTime()+1e3*d)),e}function q(a,b){var c=a.adaptation.period,d={start:c.start,end:c.start+c.duration};if(!b)return d;if(!z&&a.segmentAvailabilityRange)return a.segmentAvailabilityRange;var e=a.segmentDuration||(a.segments&&a.segments.length?a.segments[a.segments.length-1].duration:0),f=m(new Date,c),g=c.start+c.duration;return d.start=Math.max(f-c.mpd.timeShiftBufferDepth,c.start),d.end=f>=g&&f-e<g?g-e:f-e,d}function r(a,b){return b-a.adaptation.period.start}function s(a){z||void 0!==a.offset&&(e(a.offset/1e3),z=!0)}function t(a){var b=a.presentationTimeOffset;return a.adaptation.period.start-b}function u(){y=0,z=!1,A=NaN}function v(){x.off(i.default.TIME_SYNCHRONIZATION_COMPLETED,s,this),u()}var w=this.context,x=(0,g.default)(w).getInstance(),y=void 0,z=void 0,A=void 0;return{initialize:a,isTimeSyncCompleted:b,setTimeSyncCompleted:c,getClientTimeOffset:d,setClientTimeOffset:e,getExpectedLiveEdge:f,setExpectedLiveEdge:h,calcAvailabilityStartTimeFromPresentationTime:k,calcAvailabilityEndTimeFromPresentationTime:l,calcPresentationTimeFromWallTime:m,calcPresentationTimeFromMediaTime:n,calcPeriodRelativeTimeFromMpdRelativeTime:r,calcMediaTimeFromPresentationTime:o,calcSegmentAvailabilityRange:q,calcWallTimeForSegment:p,calcMSETimeOffset:t,reset:v}}Object.defineProperty(c,"__esModule",{value:!0});var f=a(48),g=d(f),h=a(52),i=d(h),j=a(49),k=d(j);e.__dashjs_factory_name="TimelineConverter",c.default=k.default.getSingletonFactory(e),b.exports=c.default},{48:48,49:49,52:52}],78:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a,b){function c(){if(!(e&&e.hasOwnProperty("calcMediaTimeFromPresentationTime")&&e.hasOwnProperty("calcSegmentAvailabilityRange")&&e.hasOwnProperty("calcMediaTimeFromPresentationTime")))throw new Error("Missing config parameter(s)")}function d(a,d,f,g){if(c(),!a)throw new Error("no representation");void 0===d&&(d=null);var i=a.adaptation.period.mpd.manifest.Period_asArray[a.adaptation.period.index].AdaptationSet_asArray[a.adaptation.index].Representation_asArray[a.index].SegmentTemplate||a.adaptation.period.mpd.manifest.Period_asArray[a.adaptation.period.index].AdaptationSet_asArray[a.adaptation.index].Representation_asArray[a.index].SegmentList,j=i.SegmentTimeline,k=i.SegmentURL_asArray,l=a.availableSegmentsNumber>0,m=void 0;m=g||(f>-1||null!==d?10:1/0);var n=0,o=0,p=-1,q=[],r=null,s=void 0,t=void 0,u=void 0,v=void 0,w=void 0,x=void 0,y=void 0,z=void 0,A=void 0,B=void 0,C=void 0,D=function(c,d){var f=i.media,g=c.mediaRange;return k&&(f=k[d].media||"",g=k[d].mediaRange),(0,h.getTimeBasedSegment)(e,b,a,n,c.d,C,f,g,p,c.tManifest)};for(C=a.timescale,s=j.S_asArray,B=f,null!==d&&(r=e.calcMediaTimeFromPresentationTime(d,a)),u=0,v=s.length;u<v;u++){if(t=s[u],x=0,t.hasOwnProperty("r")&&(x=t.r),t.hasOwnProperty("t")&&(n=t.t,o=n/C),x<0){if((z=s[u+1])&&z.hasOwnProperty("t"))y=z.t/C;else{var E=a.segmentAvailabilityRange?a.segmentAvailabilityRange.end:e.calcSegmentAvailabilityRange(a,b).end;y=e.calcMediaTimeFromPresentationTime(E,a),a.segmentDuration=t.d/C}x=Math.ceil((y-o)/(t.d/C))-1}if(A){if(l)break;p+=x+1}else for(w=0;w<=x;w++)if(p++,q.length>m){if(A=!0,l)break}else null!==r?o>=r-t.d/C*1.5&&q.push(D(t,p)):p>=B&&q.push(D(t,p)),n+=t.d,o=n/C}return l||(a.availableSegmentsNumber=p+1),q}a=a||{};var e=a.timelineConverter;return{getSegments:d}}Object.defineProperty(c,"__esModule",{value:!0});var f=a(49),g=d(f),h=a(75);e.__dashjs_factory_name="TimelineSegmentsGetter";var i=g.default.getClassFactory(e);c.default=i,b.exports=c.default},{49:49,75:75}],79:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(c,"__esModule",{value:!0});var e=function a(){d(this,a),this.period=null,this.index=-1,this.type=null};c.default=e,b.exports=c.default},{}],80:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(c,"__esModule",{value:!0});var e=1,f=1,g=function a(b,c,g,h){d(this,a),this.url=b||"",this.serviceLocation=c||b||"",this.dvb_priority=g||e,this.dvb_weight=h||f};g.DEFAULT_DVB_PRIORITY=e,g.DEFAULT_DVB_WEIGHT=f,c.default=g,b.exports=c.default},{}],81:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(c,"__esModule",{value:!0});var e=function a(){d(this,a),this.duration=NaN,this.presentationTime=NaN,this.id=NaN,this.messageData="",this.eventStream=null,this.presentationTimeDelta=NaN};c.default=e,b.exports=c.default},{}],82:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(c,"__esModule",{value:!0});var e=function a(){d(this,a),this.adaptionSet=null,this.representation=null,this.period=null,
21
+ this.timescale=1,this.value="",this.schemeIdUri=""};c.default=e,b.exports=c.default},{}],83:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(c,"__esModule",{value:!0});var e=function a(){d(this,a),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};c.default=e,b.exports=c.default},{}],84:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(c,"__esModule",{value:!0});var e=function a(){d(this,a),this.id=null,this.index=-1,this.duration=NaN,this.start=NaN,this.mpd=null};e.DEFAULT_ID="defaultId",c.default=e,b.exports=c.default},{}],85:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(c,"__esModule",{value:!0});var f=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),g=a(59),h=d(g),i=function(){function a(){e(this,a),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}return f(a,null,[{key:"hasInitialization",value:function(a){return null!==a.initialization||null!==a.range}},{key:"hasSegments",value:function(a){return a.segmentInfoType!==h.default.BASE_URL&&a.segmentInfoType!==h.default.SEGMENT_BASE&&!a.indexRange}}]),a}();c.default=i,b.exports=c.default},{59:59}],86:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(c,"__esModule",{value:!0});var e=function a(){d(this,a),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};c.default=e,b.exports=c.default},{}],87:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(c,"__esModule",{value:!0});var e=function a(){d(this,a),this.schemeIdUri="",this.value=""};c.default=e,b.exports=c.default},{}],88:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a){function b(){n=(0,g.default)(h).create({errHandler:a.errHandler,metricsModel:a.metricsModel,mediaPlayerModel:a.mediaPlayerModel,requestModifier:a.requestModifier})}function c(a){var b=function(b){j.trigger(o.default.CHECK_FOR_EXISTENCE_COMPLETED,{request:a,exists:b})};if(a){var c=new i.default(a.url);n.load({request:c,success:function(){b(!0)},error:function(){b(!1)}})}else b(!1)}function d(a){var b=function(b,c){j.trigger(o.default.LOADING_COMPLETED,{request:a,response:b||null,error:c||null,sender:l})};a?n.load({request:a,progress:function(){j.trigger(o.default.LOADING_PROGRESS,{request:a})},success:function(a){b(a)},error:function(a,c,d){b(void 0,new k.default(r,d,c))},abort:function(a,b){a&&0===b&&j.trigger(o.default.LOADING_ABANDONED,{request:a,mediaType:a.mediaType,sender:l})}}):b(void 0,new k.default(s,t))}function e(){n&&n.abort()}function f(){n&&(n.abort(),n=null)}a=a||{};var h=this.context,j=(0,m.default)(h).getInstance(),l=void 0,n=void 0;return l={checkForExistence:c,load:d,abort:e,reset:f},b(),l}Object.defineProperty(c,"__esModule",{value:!0});var f=a(98),g=d(f),h=a(213),i=d(h),j=a(210),k=d(j),l=a(48),m=d(l),n=a(52),o=d(n),p=a(49),q=d(p),r=1,s=2,t="request is null";e.__dashjs_factory_name="FragmentLoader";var u=q.default.getClassFactory(e);u.FRAGMENT_LOADER_ERROR_LOADING_FAILURE=r,u.FRAGMENT_LOADER_ERROR_NULL_REQUEST=s,q.default.updateClassFactory(e.__dashjs_factory_name,u),c.default=u,b.exports=c.default},{210:210,213:213,48:48,49:49,52:52,98:98}],89:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a){function b(){j.on(v.default.XLINK_READY,c,s),u=(0,k.default)(h).create({errHandler:A,metricsModel:a.metricsModel,mediaPlayerModel:a.mediaPlayerModel,requestModifier:a.requestModifier}),w=(0,i.default)(h).create({errHandler:A,metricsModel:a.metricsModel,mediaPlayerModel:a.mediaPlayerModel,requestModifier:a.requestModifier}),x=null}function c(a){j.trigger(v.default.INTERNAL_MANIFEST_LOADED,{manifest:a.manifest})}function d(a){var b=null;return a.indexOf("SmoothStreamingMedia")>-1?(y?(b=y.createMssParser(),y.registerEvents()):A.manifestError("manifest type unsupported","createParser"),b):a.indexOf("MPD")>-1?(0,z.default)(h).create({errorHandler:A}):b}function e(a){var b=new o.default(a,r.HTTPRequest.MPD_TYPE);u.load({request:b,success:function(b,c,e){var f=void 0,h=void 0;if(e.responseURL&&e.responseURL!==a?(h=l.parseBaseUrl(e.responseURL),f=e.responseURL):(l.isRelative(a)&&(a=l.resolve(a,window.location.href)),h=l.parseBaseUrl(a)),null===x&&(x=d(b)),null===x)return void j.trigger(v.default.INTERNAL_MANIFEST_LOADED,{manifest:null,error:new q.default(C,"Failed detecting manifest type: "+a)});w.setMatchers(x.getMatchers()),w.setIron(x.getIron());var i=x.parse(b);i?(i.url=f||a,i.originalUrl||(i.originalUrl=i.url),i.hasOwnProperty(g.default.LOCATION)&&(h=l.parseBaseUrl(i.Location_asArray[0]),p("BaseURI set by Location to: "+h)),i.baseUri=h,i.loadedTime=new Date,w.resolveManifestOnLoad(i)):j.trigger(v.default.INTERNAL_MANIFEST_LOADED,{manifest:null,error:new q.default(C,E)})},error:function(b,c,d){j.trigger(v.default.INTERNAL_MANIFEST_LOADED,{manifest:null,error:new q.default(D,"Failed loading manifest: "+a+", "+d)})}})}function f(){j.off(v.default.XLINK_READY,c,s),w&&(w.reset(),w=null),u&&(u.abort(),u=null),y&&y.reset()}a=a||{};var h=this.context,j=(0,t.default)(h).getInstance(),l=(0,m.default)(h).getInstance(),n=(0,B.default)(h).getInstance(),p=n.log,s=void 0,u=void 0,w=void 0,x=void 0,y=a.mssHandler,A=a.errHandler;return s={load:e,reset:f},b(),s}Object.defineProperty(c,"__esModule",{value:!0});var f=a(100),g=d(f),h=a(115),i=d(h),j=a(98),k=d(j),l=a(205),m=d(l),n=a(220),o=d(n),p=a(210),q=d(p),r=a(229),s=a(48),t=d(s),u=a(52),v=d(u),w=a(49),x=d(w),y=a(62),z=d(y),A=a(47),B=d(A),C=1,D=2,E="parsing failed";e.__dashjs_factory_name="ManifestLoader";var F=x.default.getClassFactory(e);F.MANIFEST_LOADER_ERROR_PARSING_FAILURE=C,F.MANIFEST_LOADER_ERROR_LOADING_FAILURE=D,x.default.updateClassFactory(e.__dashjs_factory_name,F),c.default=F,b.exports=c.default},{100:100,115:115,205:205,210:210,220:220,229:229,47:47,48:48,49:49,52:52,62:62,98:98}],90:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(){function a(a){a&&(a.manifestModel&&(z=a.manifestModel),a.dashManifestModel&&(A=a.dashManifestModel),a.mediaPlayerModel&&(B=a.mediaPlayerModel),a.manifestLoader&&(y=a.manifestLoader))}function b(){d(),t.on(i.default.STREAMS_COMPOSED,q,this),t.on(i.default.PLAYBACK_STARTED,o,this),t.on(i.default.PLAYBACK_PAUSED,p,this),t.on(i.default.INTERNAL_MANIFEST_LOADED,n,this)}function c(a){k(a)}function d(){u=NaN,x=!1,w=!0,f()}function e(){t.off(i.default.PLAYBACK_STARTED,o,this),t.off(i.default.PLAYBACK_PAUSED,p,this),t.off(i.default.STREAMS_COMPOSED,q,this),t.off(i.default.INTERNAL_MANIFEST_LOADED,n,this),d()}function f(){null!==v&&(clearInterval(v),v=null)}function h(){f(),isNaN(u)||(s("Refresh manifest in "+u+" seconds."),v=setTimeout(l,1e3*u))}function j(){x=!0;var a=z.getValue(),b=a.url,c=A.getLocation(a);c&&(b=c),y.load(b)}function k(a){z.setValue(a);var b=new Date,c=(b.getTime()-a.loadedTime.getTime())/1e3;u=A.getManifestUpdatePeriod(a,c),t.trigger(i.default.MANIFEST_UPDATED,{manifest:a}),s("Manifest has been refreshed at "+b+"["+b.getTime()/1e3+"] "),w||h()}function l(){w&&!B.getScheduleWhilePaused()||x||j()}function n(a){a.error||k(a.manifest)}function o(){w=!1,h()}function p(){w=!0,f()}function q(){x=!1}var r=this.context,s=(0,m.default)(r).getInstance().log,t=(0,g.default)(r).getInstance(),u=void 0,v=void 0,w=void 0,x=void 0,y=void 0,z=void 0,A=void 0,B=void 0;return{initialize:b,setManifest:c,refreshManifest:j,setConfig:a,reset:e}}Object.defineProperty(c,"__esModule",{value:!0});var f=a(48),g=d(f),h=a(52),i=d(h),j=a(49),k=d(j),l=a(47),m=d(l);e.__dashjs_factory_name="ManifestUpdater",c.default=k.default.getClassFactory(e),b.exports=c.default},{47:47,48:48,49:49,52:52}],91:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(){function a(){Hc=!1,Jc=!1,Ic=!1,Kc=!0,Oc=null,Gc=null,Rc=null,W.default.extend(Y.default),Tc=(0,I.default)(Ac).getInstance(),_c=(0,O.default)(Ac).getInstance()}function b(a){a&&(a.capabilities&&(Vc=a.capabilities),a.streamController&&(Wc=a.streamController),a.playbackController&&(Xc=a.playbackController),a.mediaPlayerModel&&(Tc=a.mediaPlayerModel),a.abrController&&(Lc=a.abrController),a.mediaController&&(Nc=a.mediaController))}function c(a,b,c){if(Vc||(Vc=(0,w.default)(Ac).getInstance()),Uc=(0,u.default)(Ac).getInstance(),!Vc.supportsMediaSource())return void Uc.capabilityError("mediasource");Hc||(Hc=!0,Mc=(0,ha.default)(Ac).getInstance(),Lc||(Lc=(0,M.default)(Ac).getInstance()),Xc||(Xc=(0,m.default)(Ac).getInstance()),Nc||(Nc=(0,q.default)(Ac).getInstance()),Rc=(0,ba.default)(Ac).getInstance(),Zc=(0,da.default)(Ac).getInstance({mediaController:Nc,timelineConverter:Mc,adapter:Rc}),$c=(0,G.default)(Ac).getInstance(),Yc=(0,fa.default)(Ac).getInstance({manifestModel:$c,dashManifestModel:Zc}),Sc=(0,K.default)(Ac).getInstance(),ad=(0,C.default)(Ac).getInstance(),bd=(0,Q.default)(Ac).getInstance({mediaPlayerModel:Tc}),Rc.setConfig({dashManifestModel:Zc}),Sc.setConfig({adapter:Rc}),Za(),Ca(void 0===c||c),a&&Nb(a),b&&gc(b),Dc("[dash.js "+j()+"] MediaPlayer has been initialized"))}function d(){gc(null),Nb(null),Gc=null,Oc&&(Oc.reset(),Oc=null),Pc&&(Pc.reset(),Pc=null)}function e(){return!!Fc&&!!_c.getElement()}function f(a,b,c){Bc.on(a,b,c)}function h(a,b,c){Bc.off(a,b,c)}function j(){return(0,_.getVersionString)()}function l(){return Cc}function n(){if(_c.getElement()||Ic)return!1;if(!Fc)throw xc;tc()}function p(){if(!Jc)throw vc;(!Kc||t()&&Jc)&&Xc.play()}function r(){if(!Jc)throw vc;Xc.pause()}function t(){if(!Jc)throw vc;return Xc.isPaused()}function v(a){if(!Jc)throw vc;if("number"!=typeof a||isNaN(a))throw zc;var b=Xc.getIsDynamic()?R(a):a;Xc.seek(b)}function x(){if(!Jc)throw vc;return Xc.isSeeking()}function z(){if(!Jc)throw vc;return Xc.getIsDynamic()}function B(a){if(!_c.getElement())throw wc;Kb().playbackRate=a}function D(){if(!_c.getElement())throw wc;return Kb().playbackRate}function F(a){if(!_c.getElement())throw wc;Kb().muted=a}function H(){if(!_c.getElement())throw wc;return Kb().muted}function J(a){if(!_c.getElement())throw wc;Kb().volume=a}function L(){if(!_c.getElement())throw wc;return Kb().volume}function N(a){var b=[g.default.VIDEO,g.default.AUDIO,g.default.FRAGMENTED_TEXT];if(a){if(-1!==b.indexOf(a)){var c=zb().getCurrentBufferLevel(Ab(a));return c||NaN}return Dc("Warning - getBufferLength requested for invalid type"),NaN}var c=b.map(function(a){return Sb(a).length>0?zb().getCurrentBufferLevel(Ab(a)):Number.MAX_VALUE}).reduce(function(a,b){return Math.min(a,b)});return c===Number.MAX_VALUE?NaN:c}function P(){var a=qc();return a?a.manifestInfo.DVRWindowSize:0}function R(a){var b=qc(),c=Xc.getLiveDelay();if(!b)return 0;var d=b.range.start+a;return d>b.range.end-c&&(d=b.range.end-c),d}function T(a){if(!Jc)throw vc;var b=Kb().currentTime;if(void 0!==a)b=Wc.getTimeRelativeToStreamId(b,a);else if(Xc.getIsDynamic()){var c=qc();b=null===c?0:V()-(c.range.end-c.time)}return b}function V(){if(!Jc)throw vc;var a=Kb().duration;if(Xc.getIsDynamic()){var b=qc(),c=void 0;if(!b)return 0;c=b.range.end-b.range.start,a=c<b.manifestInfo.DVRWindowSize?c:b.manifestInfo.DVRWindowSize}return a}function X(){if(!Jc)throw vc;return T()<0?NaN:rc(T())}function Z(){if(!Jc)throw vc;return rc(V())}function aa(a,b){Lc.setMaxAllowedBitrateFor(a,b)}function ca(a,b){Lc.setMinAllowedBitrateFor(a,b)}function ea(a){return Lc.getMaxAllowedBitrateFor(a)}function ga(a){return Lc.getMinAllowedBitrateFor(a)}function ja(a,b){Lc.setMaxAllowedRepresentationRatioFor(a,b)}function la(a){return Lc.getMaxAllowedRepresentationRatioFor(a)}function na(a){if(!Ic)throw uc;if(a===g.default.IMAGE){var b=sc();if(!b)return-1;var c=b.getThumbnailController();return c?c.getCurrentTrackIndex():-1}return Lc.getQualityFor(a,Wc.getActiveStreamInfo())}function oa(a,b){if(!Ic)throw uc;if(a===g.default.IMAGE){var c=sc();if(!c)return;var d=c.getThumbnailController();d&&d.setTrackByIndex(b)}Lc.setPlaybackQuality(a,Wc.getActiveStreamInfo(),b)}function pa(){Lc.setElementSize(),Lc.setWindowResizeEventCalled(!0)}function qa(){return Lc.getLimitBitrateByPortal()}function ra(a){Lc.setLimitBitrateByPortal(a)}function sa(){return Lc.getUsePixelRatioInLimitBitrateByPortal()}function ta(a){Lc.setUsePixelRatioInLimitBitrateByPortal(a)}function ua(a,b){Lc.setInitialBitrateFor(a,b)}function va(a){if(!Ic)throw uc;return Lc.getInitialBitrateFor(a)}function wa(a,b){Lc.setInitialRepresentationRatioFor(a,b)}function xa(a){return Lc.getInitialRepresentationRatioFor(a)}function ya(a){return Lc.getAutoSwitchBitrateFor(a)}function za(a,b){Lc.setAutoSwitchBitrateFor(a,b)}function Aa(){return Lc.getUseDeadTimeLatency()}function Ba(a){Lc.setUseDeadTimeLatency(a)}function Ca(a){Kc=a}function Da(){return Kc}function Ea(a){Tc.setLiveDelayFragmentCount(a)}function Fa(a){Tc.setLiveDelay(a)}function Ga(){return Tc.getLiveDelay()}function Ha(a){Tc.setUseSuggestedPresentationDelay(a)}function Ia(a,b){Tc.setLastBitrateCachingInfo(a,b)}function Ja(a,b){Tc.setLastMediaSettingsCachingInfo(a,b)}function Ka(a){Tc.setScheduleWhilePaused(a)}function La(){return Tc.getScheduleWhilePaused()}function Ma(a){Tc.setFastSwitchEnabled(a)}function Na(){return Tc.getFastSwitchEnabled()}function Oa(a){a===g.default.ABR_STRATEGY_DYNAMIC||a===g.default.ABR_STRATEGY_BOLA||a===g.default.ABR_STRATEGY_THROUGHPUT?Tc.setABRStrategy(a):Dc("Warning: Ignoring setABRStrategy("+a+") - unknown value.")}function Pa(){return Tc.getABRStrategy()}function Qa(a){Tc.setUseDefaultABRRules(a)}function Ra(a,b,c){Tc.addABRCustomRule(a,b,c)}function Sa(a){Tc.removeABRCustomRule(a)}function Ta(){Tc.removeAllABRCustomRule()}function Ua(a){a===g.default.MOVING_AVERAGE_SLIDING_WINDOW||a===g.default.MOVING_AVERAGE_EWMA?Tc.setMovingAverageMethod(a):Dc("Warning: Ignoring setMovingAverageMethod("+a+") - unknown value.")}function Va(){return Tc.getMovingAverageMethod()}function Wa(a,b){Xa(a,b);var c=new k.default;c.schemeIdUri=a,c.value=b,Tc.getUTCTimingSources().push(c)}function Xa(a,b){var c=Tc.getUTCTimingSources();c.forEach(function(d,e){d.schemeIdUri===a&&d.value===b&&c.splice(e,1)})}function Ya(){Tc.setUTCTimingSources([])}function Za(){Wa(I.default.DEFAULT_UTC_TIMING_SOURCE.scheme,I.default.DEFAULT_UTC_TIMING_SOURCE.value)}function $a(a){Tc.setUseManifestDateHeaderTimeSource(a)}function _a(a){Tc.setBufferToKeep(a)}function ab(a){Tc.setBufferAheadToKeep(a)}function bb(a){Tc.setBufferPruningInterval(a)}function cb(a){Tc.setStableBufferTime(a)}function db(){return Tc.getStableBufferTime()}function eb(a){Tc.setBufferTimeAtTopQuality(a)}function fb(){return Tc.getBufferTimeAtTopQuality()}function gb(a){Tc.setBufferTimeAtTopQualityLongForm(a)}function hb(){return Tc.getBufferTimeAtTopQualityLongForm()}function ib(a){Tc.setLongFormContentDurationThreshold(a)}function jb(a){Tc.setSegmentOverlapToleranceTime(a)}function kb(a,b){Tc.setCacheLoadThresholdForType(a,b)}function lb(a){Tc.setBandwidthSafetyFactor(a)}function mb(){return Tc.getBandwidthSafetyFactor()}function nb(a){var b=Lc.getThroughputHistory();return b?b.getAverageThroughput(a):0}function ob(a){Tc.setAbandonLoadTimeout(a)}function pb(a){Tc.setFragmentRetryAttempts(a)}function qb(a){Tc.setFragmentRetryInterval(a)}function rb(a){Tc.setManifestRetryAttempts(a)}function sb(a){Tc.setManifestRetryInterval(a)}function tb(a,b){Tc.setXHRWithCredentialsForType(a,b)}function ub(a){return Tc.getXHRWithCredentialsForType(a)}function vb(a){Tc.setJumpGaps(a)}function wb(){return Tc.getJumpGaps()}function xb(a){Tc.setSmallGapLimit(a)}function yb(){return Tc.getSmallGapLimit()}function zb(){return Yc}function Ab(a){return Sc.getReadOnlyMetricsFor(a)}function Bb(a){void 0===ad&&(ad=(0,C.default)(Ac).getInstance()),ad.setTextDefaultLanguage(a)}function Cb(){return void 0===ad&&(ad=(0,C.default)(Ac).getInstance()),ad.getTextDefaultLanguage()}function Db(a){void 0===ad&&(ad=(0,C.default)(Ac).getInstance()),ad.setTextDefaultEnabled(a)}function Eb(){return void 0===ad&&(ad=(0,C.default)(Ac).getInstance()),ad.getTextDefaultEnabled()}function Fb(a){void 0===ad&&(ad=(0,C.default)(Ac).getInstance()),ad.enableText(a)}function Gb(){return void 0===ad&&(ad=(0,C.default)(Ac).getInstance()),ad.isTextEnabled()}function Hb(a){if(!Jc)throw vc;void 0===ad&&(ad=(0,C.default)(Ac).getInstance()),ad.setTextTrack(a)}function Ib(){var a=NaN;return ad&&(a=ad.getCurrentTrackIdx()),a}function Jb(a){var b=(0,y.default)(Ac).getInstance();b.setConfig({videoModel:_c}),b.initialize(),b.displayCConTop(a)}function Kb(){if(!_c.getElement())throw wc;return _c.getElement()}function Lb(){return _c?_c.getVideoContainer():null}function Mb(a){if(!_c.getElement())throw wc;_c.setVideoContainer(a)}function Nb(a){if(!Hc)throw yc;a&&(_c.setElement(a),nc(),oc(),pc(),Wc&&Wc.switchToVideoElement()),Jc&&kc(),tc()}function Ob(){return _c?_c.getTTMLRenderingDiv():null}function Pb(a){if(!_c.getElement())throw wc;_c.setTTMLRenderingDiv(a)}function Qb(a){if(!Ic)throw uc;var b=sc();return b?b.getBitrateListFor(a):[]}function Rb(a){if(!Ic)throw uc;return Rc.getStreamsInfo(a)}function Sb(a){if(!Ic)throw uc;var b=Wc.getActiveStreamInfo();return b?Nc.getTracksFor(a,b):[]}function Tb(a,b,c){if(!Ic)throw uc;return c=c||Rc.getStreamsInfo(b)[0],c?Rc.getAllMediaInfoForType(c,a,b):[]}function Ub(a){if(!Ic)throw uc;var b=Wc.getActiveStreamInfo();return b?Nc.getCurrentTrackFor(a,b):null}function Vb(a,b){if(!Hc)throw yc;Nc.setInitialSettings(a,b)}function Wb(a){if(!Hc)throw yc;return Nc.getInitialSettings(a)}function Xb(a){if(!Ic)throw uc;Nc.setTrack(a)}function Yb(a){if(!Hc)throw yc;return Nc.getSwitchMode(a)}function Zb(a,b){if(!Hc)throw yc;Nc.setSwitchMode(a,b)}function $b(a){if(!Hc)throw yc;Nc.setSelectionModeForInitialTrack(a)}function _b(){if(!Hc)throw yc;return Nc.getSelectionModeForInitialTrack()}function ac(){return nc()}function bc(a){Oc=a}function cc(a){Gc=a,Wc&&Wc.setProtectionData(Gc)}function dc(a){if(a<0)return null;var b=Xc.getIsDynamic()?R(a):a,c=Wc.getStreamForTime(b);if(null===c)return null;var d=c.getThumbnailController(),e=c.getStreamInfo();if(!d||!e)return null;var f=Wc.getTimeRelativeToStreamId(b,c.getId());return d.get(f)}function ec(a,b){var c=mc(),d=this,e=function a(e){e.error?b(null,e.error):b(e.manifest),Bc.off(W.default.INTERNAL_MANIFEST_LOADED,a,d),c.reset()};Bc.on(W.default.INTERNAL_MANIFEST_LOADED,e,d);var f=(0,E.default)(Ac).getInstance();f.initialize(),c.load(f.parseURI(a))}function fc(){if(!Fc)throw xc;return Fc}function gc(a){if(!Hc)throw yc;if("string"==typeof a){var b=(0,E.default)(Ac).getInstance();b.initialize(),Fc=b.parseURI(a)}else Fc=a;(Ic||Jc)&&kc(),e()&&tc()}function hc(a,b,c){var d=!(arguments.length<=3||void 0===arguments[3])&&arguments[3],e=new Date(1e3*a),f=e.toLocaleDateString(b),g=e.toLocaleTimeString(b,{hour12:c});return d?g+" "+f:g}function ic(a){a=Math.max(a,0);var b=Math.floor(a/3600),c=Math.floor(a%3600/60),d=Math.floor(a%3600%60);return(0===b?"":b<10?"0"+b.toString()+":":b.toString()+":")+(c<10?"0"+c.toString():c.toString())+":"+(d<10?"0"+d.toString():d.toString())}function jc(a,b,c){$.default.extend(a,b,c,Ac)}function kc(){Jc=!1,Ic=!1,Rc.reset(),Wc.reset(),Xc.reset(),Lc.reset(),Nc.reset(),ad.reset(),Oc&&(Oc.reset(),Oc=null,nc())}function lc(){var a=mc();Wc||(Wc=(0,o.default)(Ac).getInstance()),Nc.setConfig({errHandler:Uc,domStorage:bd}),Wc.setConfig({capabilities:Vc,manifestLoader:a,manifestModel:$c,dashManifestModel:Zc,mediaPlayerModel:Tc,protectionController:Oc,adapter:Rc,metricsModel:Sc,dashMetrics:Yc,errHandler:Uc,timelineConverter:Mc,videoModel:_c,playbackController:Xc,domStorage:bd,abrController:Lc,mediaController:Nc,textController:ad}),Xc.setConfig({streamController:Wc,metricsModel:Sc,dashMetrics:Yc,manifestModel:$c,mediaPlayerModel:Tc,dashManifestModel:Zc,adapter:Rc,videoModel:_c}),Lc.setConfig({streamController:Wc,domStorage:bd,mediaPlayerModel:Tc,metricsModel:Sc,dashMetrics:Yc,dashManifestModel:Zc,manifestModel:$c,videoModel:_c,adapter:Rc}),Lc.createAbrRulesCollection(),ad.setConfig({errHandler:Uc,manifestModel:$c,dashManifestModel:Zc,mediaController:Nc,streamController:Wc,videoModel:_c}),Wc.initialize(Kc,Gc)}function mc(){return(0,s.default)(Ac).create({errHandler:Uc,metricsModel:Sc,mediaPlayerModel:Tc,requestModifier:(0,A.default)(Ac).getInstance(),mssHandler:Qc})}function nc(){if(Oc)return Oc;var a=dashjs.Protection;if("function"==typeof a){var b=a(Ac).create();return W.default.extend(a.events),Y.default.extend(a.events,{publicOnly:!0}),Vc||(Vc=(0,w.default)(Ac).getInstance()),Oc=b.createProtectionSystem({log:Dc,errHandler:Uc,videoModel:_c,capabilities:Vc,eventBus:Bc,events:W.default,BASE64:ka.default,constants:g.default})}return null}function oc(){if(!Pc){var a=dashjs.MetricsReporting;if("function"==typeof a){var b=a(Ac).create();Pc=b.createMetricsReporting({log:Dc,eventBus:Bc,mediaElement:Kb(),dashManifestModel:Zc,metricsModel:Sc,events:W.default,constants:g.default,metricsConstants:i.default})}}}function pc(){if(!Qc){var a=dashjs.MssHandler;"function"==typeof a&&(Qc=a(Ac).create({eventBus:Bc,mediaPlayerModel:Tc,metricsModel:Sc,playbackController:Xc,protectionController:Oc,errHandler:Uc,events:W.default,constants:g.default,log:Dc,initSegmentType:ia.HTTPRequest.INIT_SEGMENT_TYPE,BASE64:ka.default,ISOBoxer:ma.default}))}}function qc(){var a=Sc.getReadOnlyMetricsFor(g.default.VIDEO)||Sc.getReadOnlyMetricsFor(g.default.AUDIO);return Yc.getCurrentDVRInfo(a)}function rc(a){var b=qc(),c=void 0;return b?(c=b.manifestInfo.availableFrom.getTime()/1e3,a+(c+b.range.start)):0}function sc(){if(!Ic)throw uc;var a=Wc.getActiveStreamInfo();return a?Wc.getStreamById(a.id):null}function tc(){!Ic&&Fc&&(Ic=!0,Dc("Streaming Initialized"),lc(),"string"==typeof Fc?Wc.load(Fc):Wc.loadWithManifest(Fc)),!Jc&&e()&&(Jc=!0,Dc("Playback Initialized"))}var uc="You must first call initialize() and set a source before calling this method",vc="You must first call initialize() and set a valid source and view before calling this method",wc="You must first call attachView() to set the video element before calling this method",xc="You must first call attachSource() with a valid source before calling this method",yc="MediaPlayer not initialized!",zc="MediaPlayer Invalid Arguments!",Ac=this.context,Bc=(0,U.default)(Ac).getInstance(),Cc=(0,S.default)(Ac).getInstance(),Dc=Cc.log,Ec=void 0,Fc=void 0,Gc=void 0,Hc=void 0,Ic=void 0,Jc=void 0,Kc=void 0,Lc=void 0,Mc=void 0,Nc=void 0,Oc=void 0,Pc=void 0,Qc=void 0,Rc=void 0,Sc=void 0,Tc=void 0,Uc=void 0,Vc=void 0,Wc=void 0,Xc=void 0,Yc=void 0,Zc=void 0,$c=void 0,_c=void 0,ad=void 0,bd=void 0;return Ec={initialize:c,setConfig:b,on:f,off:h,extend:jc,attachView:Nb,attachSource:gc,isReady:e,preload:n,play:p,isPaused:t,pause:r,isSeeking:x,isDynamic:z,seek:v,setPlaybackRate:B,getPlaybackRate:D,setMute:F,isMuted:H,setVolume:J,getVolume:L,time:T,duration:V,timeAsUTC:X,durationAsUTC:Z,getActiveStream:sc,getDVRWindowSize:P,getDVRSeekOffset:R,convertToTimeCode:ic,formatUTC:hc,getVersion:j,getDebug:l,getBufferLength:N,getVideoContainer:Lb,getTTMLRenderingDiv:Ob,getVideoElement:Kb,getSource:fc,setLiveDelayFragmentCount:Ea,setLiveDelay:Fa,getLiveDelay:Ga,useSuggestedPresentationDelay:Ha,enableLastBitrateCaching:Ia,enableLastMediaSettingsCaching:Ja,setMaxAllowedBitrateFor:aa,getMaxAllowedBitrateFor:ea,setMinAllowedBitrateFor:ca,getMinAllowedBitrateFor:ga,setMaxAllowedRepresentationRatioFor:ja,getMaxAllowedRepresentationRatioFor:la,setAutoPlay:Ca,getAutoPlay:Da,setScheduleWhilePaused:Ka,getScheduleWhilePaused:La,getDashMetrics:zb,getMetricsFor:Ab,getQualityFor:na,setQualityFor:oa,updatePortalSize:pa,getLimitBitrateByPortal:qa,setLimitBitrateByPortal:ra,getUsePixelRatioInLimitBitrateByPortal:sa,setUsePixelRatioInLimitBitrateByPortal:ta,setTextDefaultLanguage:Bb,getTextDefaultLanguage:Cb,setTextDefaultEnabled:Db,getTextDefaultEnabled:Eb,enableText:Fb,isTextEnabled:Gb,setTextTrack:Hb,getBitrateInfoListFor:Qb,setInitialBitrateFor:ua,getInitialBitrateFor:va,setInitialRepresentationRatioFor:wa,getInitialRepresentationRatioFor:xa,getStreamsFromManifest:Rb,getTracksFor:Sb,getTracksForTypeFromManifest:Tb,getCurrentTrackFor:Ub,setInitialMediaSettingsFor:Vb,getInitialMediaSettingsFor:Wb,setCurrentTrack:Xb,getTrackSwitchModeFor:Yb,setTrackSwitchModeFor:Zb,setSelectionModeForInitialTrack:$b,getSelectionModeForInitialTrack:_b,setFastSwitchEnabled:Ma,getFastSwitchEnabled:Na,setMovingAverageMethod:Ua,getMovingAverageMethod:Va,getAutoSwitchQualityFor:ya,setAutoSwitchQualityFor:za,setABRStrategy:Oa,getABRStrategy:Pa,useDefaultABRRules:Qa,addABRCustomRule:Ra,removeABRCustomRule:Sa,removeAllABRCustomRule:Ta,setBandwidthSafetyFactor:lb,getBandwidthSafetyFactor:mb,getAverageThroughput:nb,setAbandonLoadTimeout:ob,retrieveManifest:ec,addUTCTimingSource:Wa,removeUTCTimingSource:Xa,clearDefaultUTCTimingSources:Ya,restoreDefaultUTCTimingSources:Za,setBufferToKeep:_a,setBufferAheadToKeep:ab,setBufferPruningInterval:bb,setStableBufferTime:cb,getStableBufferTime:db,setBufferTimeAtTopQuality:eb,getBufferTimeAtTopQuality:fb,setBufferTimeAtTopQualityLongForm:gb,getBufferTimeAtTopQualityLongForm:hb,setFragmentLoaderRetryAttempts:pb,setFragmentLoaderRetryInterval:qb,setManifestLoaderRetryAttempts:rb,setManifestLoaderRetryInterval:sb,setXHRWithCredentialsForType:tb,getXHRWithCredentialsForType:ub,setJumpGaps:vb,getJumpGaps:wb,setSmallGapLimit:xb,getSmallGapLimit:yb,setLongFormContentDurationThreshold:ib,setSegmentOverlapToleranceTime:jb,setCacheLoadThresholdForType:kb,getProtectionController:ac,attachProtectionController:bc,setProtectionData:cc,enableManifestDateHeaderTimeSource:$a,displayCaptionsOnTop:Jb,attachVideoContainer:Mb,attachTTMLRenderingDiv:Pb,getCurrentTextTrackIndex:Ib,getUseDeadTimeLatencyForAbr:Aa,setUseDeadTimeLatencyForAbr:Ba,getThumbnail:dc,reset:d},a(),Ec}Object.defineProperty(c,"__esModule",{value:!0});var f=a(100),g=d(f),h=a(101),i=d(h),j=a(87),k=d(j),l=a(111),m=d(l),n=a(113),o=d(n),p=a(109),q=d(p),r=a(89),s=d(r),t=a(198),u=d(t),v=a(194),w=d(v),x=a(189),y=d(x),z=a(203),A=d(z),B=a(187),C=d(B),D=a(144),E=d(D),F=a(141),G=d(F),H=a(142),I=d(H),J=a(143),K=d(J),L=a(103),M=d(L),N=a(145),O=d(N),P=a(196),Q=d(P),R=a(47),S=d(R),T=a(48),U=d(T),V=a(52),W=d(V),X=a(92),Y=d(X),Z=a(49),$=d(Z),_=a(50),aa=a(54),ba=d(aa),ca=a(61),da=d(ca),ea=a(56),fa=d(ea),ga=a(77),ha=d(ga),ia=a(229),ja=a(1),ka=d(ja),la=a(11),ma=d(la);e.__dashjs_factory_name="MediaPlayer";var na=$.default.getClassFactory(e);na.events=Y.default,$.default.updateClassFactory(e.__dashjs_factory_name,na),c.default=na,b.exports=c.default},{1:1,100:100,101:101,103:103,109:109,11:11,111:111,113:113,141:141,142:142,143:143,144:144,145:145,187:187,189:189,194:194,196:196,198:198,203:203,229:229,47:47,48:48,49:49,50:50,52:52,54:54,56:56,61:61,77:77,87:87,89:89,92:92}],92:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(c,"__esModule",{value:!0});var g=function(a,b,c){for(var d=!0;d;){var e=a,f=b,g=c;d=!1,null===e&&(e=Function.prototype);var h=Object.getOwnPropertyDescriptor(e,f);if(void 0!==h){if("value"in h)return h.value;var i=h.get;if(void 0===i)return;return i.call(g)}var j=Object.getPrototypeOf(e);if(null===j)return;a=j,b=f,c=g,d=!0,h=j=void 0}},h=a(53),i=d(h),j=function(a){function b(){e(this,b),g(Object.getPrototypeOf(b.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_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.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_STARTED="playbackStarted",this.PLAYBACK_TIME_UPDATED="playbackTimeUpdated",this.MANIFEST_VALIDITY_CHANGED="manifestValidityChanged"}return f(b,a),b}(i.default),k=new j;c.default=k,b.exports=c.default},{53:53}],93:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(){function a(a,b,c){if(!a||"VIDEO"!==a.nodeName)return null;if(a._dashjs_player)return a._dashjs_player;var e=void 0,f=a.id||a.name||"video element";if(!(b=b||[].slice.call(a.querySelectorAll("source")).filter(function(a){return a.type==d})[0])&&a.src)b=document.createElement("source"),b.src=a.src;else if(!b&&!a.src)return null;return c=c||{},e=(0,i.default)(c).create(),e.initialize(a,b.src,a.autoplay),e.getDebug().log("Converted "+f+" to dash.js player and added content: "+b.src),a._dashjs_player=e,e}function b(b,e){var f=[];b=b||"[data-dashjs-player]",e=e||document;for(var g=e.querySelectorAll(b),h=0;h<g.length;h++){var i=a(g[h],null);f.push(i)}for(var j=e.querySelectorAll('source[type="'+d+'"]'),h=0;h<j.length;h++){var k=c(j[h]),i=a(k,null);f.push(i)}return f}function c(a){for(var b=!0;b;){var c=a;if(b=!1,"video"===c.nodeName.toLowerCase())return c;a=c.parentNode,b=!0}}var d="application/dash+xml";return{create:a,createAll:b}}function f(){window.removeEventListener("load",f),j.createAll()}function g(){window.dashjs&&(window.clearInterval(k),
22
+ j.createAll())}Object.defineProperty(c,"__esModule",{value:!0});var h=a(91),i=d(h),j=e(),k=void 0;!("undefined"!=typeof window&&window&&window.dashjs&&window.dashjs.skipAutoCreate)&&"undefined"!=typeof window&&window&&window.addEventListener&&("complete"===window.document.readyState?window.dashjs?j.createAll():k=window.setInterval(g,500):window.addEventListener("load",f)),c.default=j,b.exports=c.default},{91:91}],94:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a){function b(){l=[],m=null,n=null}function c(a){"InitializationSegment"!==a.segmentType?(l.push(a),l.sort(function(a,b){return a.start-b.start}),m=null):m=a,k("PreBufferSink appended chunk s: "+a.start+"; e: "+a.end),n&&n({chunk:a})}function d(a,b){l=l.filter(function(c){return!((isNaN(b)||c.start<b)&&(isNaN(a)||c.end>a))})}function e(){}function f(){for(var a=[],b=0;b<l.length;b++){var c=l[b];0===a.length||c.start>a[a.length-1].end?a.push({start:c.start,end:c.end}):a[a.length-1].end=c.end}var d={start:function(b){return a[b].start},end:function(b){return a[b].end}};return Object.defineProperty(d,"length",{get:function(){return a.length}}),d}function h(a,b){var c=i(a,b);return m&&(c.push(m),m=null),d(a,b),c}function i(a,b){return l.filter(function(c){return(isNaN(b)||c.start<b)&&(isNaN(a)||c.end>a)})}var j=this.context,k=(0,g.default)(j).getInstance().log,l=[],m=void 0,n=a;return{getAllBufferRanges:f,append:c,remove:d,abort:e,discharge:h,reset:b}}Object.defineProperty(c,"__esModule",{value:!0});var f=a(47),g=d(f),h=a(49),i=d(h);e.__dashjs_factory_name="PreBufferSink";var j=i.default.getClassFactory(e);c.default=j,b.exports=c.default},{47:47,49:49}],95:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a,b,c){function d(){v=!1;var c=b.codec;try{if(c.match(/application\/mp4;\s*codecs="(stpp|wvtt).*"/i))throw new Error("not really supported");u=a.addSourceBuffer(c)}catch(e){if(!b.isText&&-1===c.indexOf('codecs="stpp')&&-1===c.indexOf('codecs="wvtt'))throw e;var d=(0,q.default)(r).getInstance();u=d.getTextSourceBuffer()}}function e(){if(u){try{a.removeSourceBuffer(u)}catch(b){s("Failed to remove source buffer from media source.")}v=!1,u=null}w=[],x=null}function f(){return u}function h(){return u.buffered}function j(a){w.push(a),v||p(u,n.bind(this))}function l(b,c,d){var e=this;p(u,function(){try{b>=0&&c>b&&(d||"ended"!==a.readyState)&&u.remove(b,c),p(u,function(){t.trigger(m.default.SOURCEBUFFER_REMOVE_COMPLETED,{buffer:e,from:b,to:c})})}catch(f){t.trigger(m.default.SOURCEBUFFER_REMOVE_COMPLETED,{buffer:e,from:b,to:c,error:new i.default(f.code,f.message,null)})}})}function n(){var a=this;w.length>0&&function(){v=!0;var b=w[0];w.splice(0,1);var c=function(){w.length>0?n.call(this):(v=!1,x&&x({chunk:b}))};try{u.appendBuffer?u.appendBuffer(b.bytes):u.append(b.bytes,b),p(u,c.bind(a))}catch(d){s('SourceBuffer append failed "'+d+'"'),w.length>0?n():v=!1,x&&x({chunk:b,error:new i.default(d.code,d.message,null)})}}()}function o(){try{"open"===a.readyState?u.abort():u.setTextTrack&&"ended"===a.readyState&&u.abort()}catch(b){s('SourceBuffer append abort failed: "'+b+'"')}w=[]}function p(a,b){var c=void 0,d=50,e=function(){a.updating||(clearInterval(c),b())},f=function c(){a.updating||(a.removeEventListener("updateend",c,!1),b())};if(!a.updating)return void b();if("function"==typeof a.addEventListener)try{a.addEventListener("updateend",f,!1)}catch(g){c=setInterval(e,d)}else c=setInterval(e,d)}var r=this.context,s=(0,g.default)(r).getInstance().log,t=(0,k.default)(r).getInstance(),u=void 0,v=void 0,w=[],x=c,y={getAllBufferRanges:h,getBuffer:f,append:j,remove:l,abort:o,reset:e};return d(),y}Object.defineProperty(c,"__esModule",{value:!0});var f=a(47),g=d(f),h=a(210),i=d(h),j=a(48),k=d(j),l=a(52),m=d(l),n=a(49),o=d(n),p=a(187),q=d(p);e.__dashjs_factory_name="SourceBufferSink";var r=o.default.getClassFactory(e);c.default=r,b.exports=c.default},{187:187,210:210,47:47,48:48,49:49,52:52}],96:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a){function b(){h(),oa=(0,m.default)(S).create({mediaPlayerModel:X,metricsModel:ba,errHandler:_}),U.on(s.default.BUFFERING_COMPLETED,M,ga),U.on(s.default.DATA_UPDATE_COMPLETED,N,ga)}function c(a,b){ka=a,(na=b)&&(U.on(s.default.KEY_ERROR,B,ga),U.on(s.default.SERVER_CERTIFICATE_UPDATED,B,ga),U.on(s.default.LICENSE_REQUEST_COMPLETE,B,ga),U.on(s.default.KEY_SYSTEM_SELECTED,B,ga),U.on(s.default.KEY_SESSION_CREATED,B,ga))}function d(a){ia||(U.on(s.default.CURRENT_TRACK_CHANGED,E,ga),H(a),ia=!0),L()}function e(){for(var a=ha?ha.length:0,b=0;b<a;b++){ha[b].getFragmentModel().removeExecutedRequestsBeforeTime(n()+l()),ha[b].reset()}ha=[],ia=!1,ja=!1,U.off(s.default.CURRENT_TRACK_CHANGED,E,ga)}function f(a){for(var b=0;b<ha.length;)D(ha[b].getMediaInfo())?(ha[b].setMediaSource(a),b++):(ha[b].reset(),ha.splice(b,1));for(var b=0;b<ha.length;b++)ha[b].dischargePreBuffer();if(0===ha.length){var c="No streams to play.";_.manifestError(c,"nostreams",V.getValue()),T(c)}}function h(){e(),ka=null,la={},ma=!1}function j(){da&&da.pause(),oa&&(oa.reset(),oa=null),h(),T=null,U.off(s.default.DATA_UPDATE_COMPLETED,N,ga),U.off(s.default.BUFFERING_COMPLETED,M,ga),U.off(s.default.KEY_ERROR,B,ga),U.off(s.default.SERVER_CERTIFICATE_UPDATED,B,ga),U.off(s.default.LICENSE_REQUEST_COMPLETE,B,ga),U.off(s.default.KEY_SYSTEM_SELECTED,B,ga),U.off(s.default.KEY_SESSION_CREATED,B,ga)}function l(){return ka?ka.duration:NaN}function n(){return ka?ka.start:NaN}function p(){return ka?ka.id:NaN}function r(){return ka}function t(){return qa}function v(){return oa}function w(){return pa}function x(){if(!(ca&&ca.hasOwnProperty("getBitrateList")&&Z&&Z.hasOwnProperty("getAllMediaInfoForType")&&Z.hasOwnProperty("getEventsFor")))throw new Error("Missing config parameter(s)")}function y(a){if(x(),a===g.default.IMAGE)return pa?pa.getBitrateList():[];var b=K(a);return ca.getBitrateList(b)}function z(){qa&&qa.start()}function A(){qa&&qa.stop()}function B(a){a.error&&(_.mediaKeySessionError(a.error),T(a.error),j())}function C(a){return a.type===g.default.TEXT?a.mimeType:a.type}function D(a){var b=a.type,c=void 0,d=void 0;if(b===g.default.MUXED&&a)return d="Multiplexed representations are intentionally not supported, as they are not compliant with the DASH-AVC/264 guidelines",T(d),_.manifestError(d,"multiplexedrep",V.getValue()),!1;if(b===g.default.TEXT||b===g.default.FRAGMENTED_TEXT||b===g.default.EMBEDDED_TEXT||b===g.default.IMAGE)return!0;if(c=a.codec,T(b+" codec: "+c),a.contentProtection&&!$.supportsEncryptedMedia())_.capabilityError("encryptedmedia");else if(!$.supportsCodec(c))return d=b+"Codec ("+c+") is not supported.",T(d),!1;return!0}function E(a){if(a.newMediaInfo.streamInfo.id===ka.id){var b=O(a.oldMediaInfo);if(b){var c=da.getTime();T("Stream - Process track changed at current time "+c);var d=a.newMediaInfo,e=V.getValue();T("Stream - Update stream controller"),e.refreshManifestOnSwitchTrack?(T("Stream - Refreshing manifest for switch track"),ra=a,Y.refreshManifest()):(b.updateMediaInfo(d),d.type!==g.default.FRAGMENTED_TEXT&&(ca.updateTopQualityIndex(d),b.switchTrackAsked()))}}}function F(b,c,d,e){var f=(0,i.default)(S).create({type:C(b),mimeType:b.mimeType,timelineConverter:aa,adapter:Z,manifestModel:V,dashManifestModel:W,mediaPlayerModel:X,metricsModel:ba,dashMetrics:a.dashMetrics,baseURLController:a.baseURLController,stream:ga,abrController:ca,domStorage:a.domStorage,playbackController:da,mediaController:ea,streamController:a.streamController,textController:fa,errHandler:_});if(f.initialize(d),ca.updateTopQualityIndex(b),e?(f.setBuffer(e.buffer),f.getIndexHandler().setCurrentTime(e.currentTime),ha[e.replaceIdx]=f):ha.push(f),!e||!e.ignoreMediaInfo)if(b.type===g.default.TEXT||b.type===g.default.FRAGMENTED_TEXT){for(var h=void 0,j=0;j<c.length;j++)c[j].index===b.index&&(h=j),f.updateMediaInfo(c[j]);b.type===g.default.FRAGMENTED_TEXT&&f.updateMediaInfo(c[h])}else f.updateMediaInfo(b)}function G(b,c){var d=Z.getAllMediaInfoForType(ka,b),e=null,f=void 0;if(!d||0===d.length)return void T("No "+b+" data.");for(var h=0,i=d.length;h<i;h++)if(e=d[h],b===g.default.EMBEDDED_TEXT)fa.addEmbeddedTrack(e);else{if(!D(e))continue;ea.isMultiTrackSupportedByType(e.type)&&ea.addTrack(e,ka)}if(b!==g.default.EMBEDDED_TEXT&&0!==ea.getTracksFor(b,ka).length){if(b===g.default.IMAGE)return void(pa=(0,o.default)(S).create({dashManifestModel:W,adapter:Z,baseURLController:a.baseURLController,stream:ga}));ea.checkInitialMediaSettingsForType(b,ka),f=ea.getCurrentTrackFor(b,ka),F(f,d,c)}}function H(a){x();var b=void 0;if(qa||(qa=(0,k.default)(S).create(),qa.setConfig({manifestModel:V,manifestUpdater:Y,playbackController:da}),b=Z.getEventsFor(ka),qa.addInlineEvents(b)),ma=!0,I(g.default.VIDEO),I(g.default.AUDIO),G(g.default.VIDEO,a),G(g.default.AUDIO,a),G(g.default.TEXT,a),G(g.default.FRAGMENTED_TEXT,a),G(g.default.EMBEDDED_TEXT,a),G(g.default.MUXED,a),G(g.default.IMAGE,a),L(),ja=!0,ma=!1,0===ha.length){var c="No streams to play.";_.manifestError(c,"nostreams",V.getValue()),T(c)}else J()}function I(a){var b=W.getAdaptationForType(V.getValue(),ka.index,a,ka);if(!b||!Array.isArray(b.Representation_asArray))return null;b.Representation_asArray=b.Representation_asArray.filter(function(a,c){if(0===c)return!0;var d=W.getCodec(b,c,!0);return!!$.supportsCodec(d)||(T("[Stream] codec not supported: "+d),!1)})}function J(){for(var a=ha.length,b=!!la.audio||!!la.video,c=b?new Error(R,"Data update failed",null):null,d=0;d<a;d++)if(ha[d].isUpdating()||ma)return;if(ja){if(na)for(var d=0;d<a&&ha[d];d++)ha[d].getType()!==g.default.AUDIO&&ha[d].getType()!==g.default.VIDEO&&ha[d].getType()!==g.default.FRAGMENTED_TEXT||na.initializeForMedia(ha[d].getMediaInfo());U.trigger(s.default.STREAM_INITIALIZED,{streamInfo:ka,error:c})}}function K(a){for(var b=ha.length,c=null,d=0;d<b;d++)if(c=ha[d],c.getType()===a)return c.getMediaInfo();return null}function L(){for(var a=0,b=ha.length;a<b;a++)ha[a].createBuffer()}function M(a){if(a.streamInfo===ka){var b=P(),c=b.length;if(0===c)return void T("[Stream] onBufferingCompleted - can't trigger STREAM_BUFFERING_COMPLETED because no streamProcessor is defined");for(var d=0;d<c;d++)if(!b[d].isBufferingCompleted()&&(b[d].getType()===g.default.AUDIO||b[d].getType()===g.default.VIDEO))return void T("[Stream] onBufferingCompleted - can't trigger STREAM_BUFFERING_COMPLETED because streamProcessor "+b[d].getType()+" is not buffering completed");T("[Stream] onBufferingCompleted - trigger STREAM_BUFFERING_COMPLETED"),U.trigger(s.default.STREAM_BUFFERING_COMPLETED,{streamInfo:ka})}}function N(a){var b=a.sender.getStreamProcessor();b.getStreamInfo()===ka&&(la[b.getType()]=a.error,J())}function O(a){return!!a&&P().filter(function(b){return b.getType()===a.type})[0]}function P(){for(var a=ha.length,b=[],c=void 0,d=void 0,e=0;e<a;e++)d=ha[e],(c=d.getType())!==g.default.AUDIO&&c!==g.default.VIDEO&&c!==g.default.FRAGMENTED_TEXT||b.push(d);return b}function Q(a){if(T("Manifest updated... updating data system wide."),ia=!1,ma=!0,ka=a,qa){var b=Z.getEventsFor(ka);qa.addInlineEvents(b)}I(g.default.VIDEO),I(g.default.AUDIO);for(var c=0,d=ha.length;c<d;c++){var e=ha[c],f=Z.getMediaInfoForType(ka,e.getType());ca.updateTopQualityIndex(f),e.updateMediaInfo(f)}if(ra){var f=ra.newMediaInfo;if("fragmentedText"!==f.type){var h=O(ra.oldMediaInfo);if(!h)return;h.switchTrackAsked(),ra=void 0}}ma=!1,J()}var R=1;a=a||{};var S=this.context,T=(0,u.default)(S).getInstance().log,U=(0,q.default)(S).getInstance(),V=a.manifestModel,W=a.dashManifestModel,X=a.mediaPlayerModel,Y=a.manifestUpdater,Z=a.adapter,$=a.capabilities,_=a.errHandler,aa=a.timelineConverter,ba=a.metricsModel,ca=a.abrController,da=a.playbackController,ea=a.mediaController,fa=a.textController,ga=void 0,ha=void 0,ia=void 0,ja=void 0,ka=void 0,la=void 0,ma=void 0,na=void 0,oa=void 0,pa=void 0,qa=void 0,ra=void 0;return ga={initialize:c,activate:d,deactivate:e,getDuration:l,getStartTime:n,getId:p,getStreamInfo:r,getFragmentController:v,getThumbnailController:w,getEventController:t,getBitrateListFor:y,startEventController:z,stopEventController:A,updateData:Q,reset:j,getProcessors:P,setMediaSource:f},b(),ga}Object.defineProperty(c,"__esModule",{value:!0});var f=a(100),g=d(f),h=a(97),i=d(h),j=a(107),k=d(j),l=a(108),m=d(l),n=a(190),o=d(n),p=a(48),q=d(p),r=a(52),s=d(r),t=a(47),u=d(t),v=a(49),w=d(v);e.__dashjs_factory_name="Stream",c.default=w.default.getClassFactory(e),b.exports=c.default},{100:100,107:107,108:108,190:190,47:47,48:48,49:49,52:52,97:97}],97:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a){function b(){aa&&aa.getIsDynamic()&&(na=(0,i.default)(R).create({timelineConverter:W,streamProcessor:ia})),j()}function c(b){S=(0,u.default)(R).create({mimeType:V,timelineConverter:W,dashMetrics:ga,metricsModel:fa,mediaPlayerModel:Z,baseURLController:a.baseURLController,errHandler:U}),S.initialize(ia),_.registerStreamType(T,ia),pa=$.getFragmentController().getModel(T),pa.setStreamProcessor(ia),la=Q(T),ma=(0,o.default)(R).create({type:T,metricsModel:fa,adapter:X,dashMetrics:ga,dashManifestModel:ha,timelineConverter:W,mediaPlayerModel:Z,abrController:_,playbackController:aa,streamController:ba,textController:da,streamProcessor:ia,mediaController:ca}),oa=(0,q.default)(R).create(),oa.setConfig({abrController:_,domStorage:ea,metricsModel:fa,dashMetrics:ga,dashManifestModel:ha,manifestModel:Y,playbackController:aa,timelineConverter:W,streamProcessor:ia}),la.initialize(b),ma.initialize(),oa.initialize()}function d(a){qa.push(a)}function e(a){var b=qa.indexOf(a);-1!==b&&qa.splice(b,1)}function f(){return qa}function h(){qa=[]}function j(){ka=[],ja=null,h()}function l(a){S.reset(),la&&(la.reset(a),la=null),ma&&(ma.reset(),ma=null),oa&&(oa.reset(),oa=null),_&&_.unRegisterStreamType(T),qa.forEach(function(a){a.reset()}),j(),T=null,$=null,na&&(na.reset(),na=null)}function n(){return!!oa&&oa.isUpdating()}function p(){return T}function r(){return oa}function s(){return S}function t(){return $?$.getFragmentController():null}function v(){return la.getBuffer()}function w(a){la.setBuffer(a)}function x(){return la}function y(){return pa}function z(){return na}function A(){return $?$.getStreamInfo():null}function B(){return $?$.getEventController():null}function C(a){a===ja||a&&ja&&a.type!==ja.type||(ja=a),-1===ka.indexOf(a)&&ka.push(a),X.updateData(this)}function D(){return ka}function E(){return ja}function F(){return la.getMediaSource()}function G(a){la.setMediaSource(a,E())}function H(){la.dischargePreBuffer()}function I(){return ma}function J(){return X.getCurrentRepresentationInfo(oa)}function K(a){return X.getRepresentationInfoForQuality(oa,a)}function L(){return!!la&&la.getIsBufferingCompleted()}function M(){return la.getBufferLevel()}function N(a,b){la&&la.switchInitData(A().id,a,b)}function O(){return la.getBuffer()||la.createBuffer(ja)}function P(){ma.switchTrackAsked()}function Q(a){return a===g.default.VIDEO||a===g.default.AUDIO?(0,k.default)(R).create({type:a,metricsModel:fa,mediaPlayerModel:Z,manifestModel:Y,errHandler:U,streamController:ba,mediaController:ca,adapter:X,textController:da,abrController:_,playbackController:aa,streamProcessor:ia}):(0,m.default)(R).create({type:a,metricsModel:fa,mediaPlayerModel:Z,manifestModel:Y,errHandler:U,streamController:ba,mediaController:ca,adapter:X,textController:da,abrController:_,playbackController:aa,streamProcessor:ia})}a=a||{};var R=this.context,S=void 0,T=a.type,U=a.errHandler,V=a.mimeType,W=a.timelineConverter,X=a.adapter,Y=a.manifestModel,Z=a.mediaPlayerModel,$=a.stream,_=a.abrController,aa=a.playbackController,ba=a.streamController,ca=a.mediaController,da=a.textController,ea=a.domStorage,fa=a.metricsModel,ga=a.dashMetrics,ha=a.dashManifestModel,ia=void 0,ja=void 0,ka=void 0,la=void 0,ma=void 0,na=void 0,oa=void 0,pa=void 0,qa=void 0;return ia={initialize:c,isUpdating:n,getType:p,getBufferController:x,getFragmentModel:y,getScheduleController:I,getLiveEdgeFinder:z,getEventController:B,getFragmentController:t,getRepresentationController:r,getIndexHandler:s,getCurrentRepresentationInfo:J,getRepresentationInfoForQuality:K,getBufferLevel:M,switchInitData:N,isBufferingCompleted:L,createBuffer:O,getStreamInfo:A,updateMediaInfo:C,switchTrackAsked:P,getMediaInfoArr:D,getMediaInfo:E,getMediaSource:F,setMediaSource:G,dischargePreBuffer:H,getBuffer:v,setBuffer:w,registerExternalController:d,unregisterExternalController:e,getExternalControllers:f,unregisterAllExternalController:h,reset:l},b(),ia}Object.defineProperty(c,"__esModule",{value:!0});var f=a(100),g=d(f),h=a(201),i=d(h),j=a(106),k=d(j),l=a(186),m=d(l),n=a(112),o=d(n),p=a(60),q=d(p),r=a(49),s=d(r),t=a(55),u=d(t);e.__dashjs_factory_name="StreamProcessor",c.default=s.default.getClassFactory(e),b.exports=c.default},{100:100,106:106,112:112,186:186,201:201,49:49,55:55,60:60}],98:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}function f(a){function b(){var a;n=[],o=[],p=[],a={},e(a,g.HTTPRequest.MPD_TYPE,k.default.DOWNLOAD_ERROR_ID_MANIFEST),e(a,g.HTTPRequest.XLINK_EXPANSION_TYPE,k.default.DOWNLOAD_ERROR_ID_XLINK),e(a,g.HTTPRequest.INIT_SEGMENT_TYPE,k.default.DOWNLOAD_ERROR_ID_INITIALIZATION),e(a,g.HTTPRequest.MEDIA_SEGMENT_TYPE,k.default.DOWNLOAD_ERROR_ID_CONTENT),e(a,g.HTTPRequest.INDEX_SEGMENT_TYPE,k.default.DOWNLOAD_ERROR_ID_CONTENT),e(a,g.HTTPRequest.BITSTREAM_SWITCHING_SEGMENT_TYPE,k.default.DOWNLOAD_ERROR_ID_CONTENT),e(a,g.HTTPRequest.OTHER_TYPE,k.default.DOWNLOAD_ERROR_ID_CONTENT),q=a}function c(a,b){var d=a.request,e=new XMLHttpRequest,f=[],k=!0,m=!0,r=new Date,s=r,t=0,u=function(a){m=!1,d.requestStartDate=r,d.requestEndDate=new Date,d.firstByteDate=d.firstByteDate||r,d.checkExistenceOnly||i.addHttpRequest(d.mediaType,null,d.type,d.url,e.responseURL||null,d.serviceLocation||null,d.range||null,d.requestStartDate,d.firstByteDate,d.requestEndDate,e.status,d.duration,e.getAllResponseHeaders(),a?f:null)},v=function(){-1!==n.indexOf(e)&&(n.splice(n.indexOf(e),1),m&&(u(!1),b>0?(b--,p.push(setTimeout(function(){c(a,b)},j.getRetryIntervalForType(d.type)))):(h.downloadError(q[d.type],d.url,d),a.error&&a.error(d,"error",e.statusText),a.complete&&a.complete(d,e.statusText))))},w=function(b){var c=new Date;k&&(k=!1,(!b.lengthComputable||b.lengthComputable&&b.total!==b.loaded)&&(d.firstByteDate=c)),b.lengthComputable&&(d.bytesLoaded=b.loaded,d.bytesTotal=b.total),f.push({s:s,d:c.getTime()-s.getTime(),b:[b.loaded?b.loaded-t:0]}),s=c,t=b.loaded,a.progress&&a.progress()},x=function(){e.status>=200&&e.status<=299&&(u(!0),a.success&&a.success(e.response,e.statusText,e),a.complete&&a.complete(d,e.statusText))},y=function(){a.abort&&a.abort(d,e.status)};if(!l||!i||!h)throw new Error("config object is not correct or missing");try{var z=l.modifyRequestURL(d.url),A=d.checkExistenceOnly?g.HTTPRequest.HEAD:g.HTTPRequest.GET;e.open(A,z,!0),d.responseType&&(e.responseType=d.responseType),d.range&&e.setRequestHeader("Range","bytes="+d.range),d.requestStartDate||(d.requestStartDate=r),e=l.modifyRequestHeader(e),e.withCredentials=j.getXHRWithCredentialsForType(d.type),e.onload=x,e.onloadend=v,e.onerror=v,e.onprogress=w,e.onabort=y;var B=(new Date).getTime();isNaN(d.delayLoadingTime)||B>=d.delayLoadingTime?(n.push(e),e.send()):function(){var a={xhr:e};o.push(a),a.delayTimeout=setTimeout(function(){if(-1!==o.indexOf(a)){o.splice(o.indexOf(a),1);try{r=new Date,s=r,n.push(a.xhr),a.xhr.send()}catch(b){a.xhr.onerror()}}},d.delayLoadingTime-B)}()}catch(C){e.onerror()}}function d(a){a.request&&c(a,j.getRetryAttemptsForType(a.request.type))}function f(){p.forEach(function(a){return clearTimeout(a)}),p=[],o.forEach(function(a){return clearTimeout(a.delayTimeout)}),o=[],n.forEach(function(a){a.onloadend=a.onerror=a.onprogress=void 0,a.abort()}),n=[]}a=a||{};var h=a.errHandler,i=a.metricsModel,j=a.mediaPlayerModel,l=a.requestModifier,m=void 0,n=void 0,o=void 0,p=void 0,q=void 0;return m={load:d,abort:f},b(),m}Object.defineProperty(c,"__esModule",{value:!0});var g=a(229),h=a(49),i=d(h),j=a(198),k=d(j);f.__dashjs_factory_name="XHRLoader";var l=i.default.getClassFactory(f);c.default=l,b.exports=c.default},{198:198,229:229,49:49}],99:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a){function b(a,b,c){var e=function(d,e){b.resolved=!0,b.resolvedContent=d||null,f.trigger(p.default.XLINK_ELEMENT_LOADED,{element:b,resolveObject:c,error:d||e?null:new g.default(s,"Failed loading Xlink element: "+a)})};if(a===d)e(null,!0);else{var i=new l.default(a,j.HTTPRequest.XLINK_TYPE);h.load({request:i,success:function(a){e(a)},error:function(){e(null)}})}}function c(){h&&(h.abort(),h=null)}a=a||{};var d="urn:mpeg:dash:resolve-to-zero:2013",e=this.context,f=(0,n.default)(e).getInstance(),h=(0,i.default)(e).create({errHandler:a.errHandler,metricsModel:a.metricsModel,mediaPlayerModel:a.mediaPlayerModel,requestModifier:a.requestModifier});return{load:b,reset:c}}Object.defineProperty(c,"__esModule",{value:!0});var f=a(210),g=d(f),h=a(98),i=d(h),j=a(229),k=a(220),l=d(k),m=a(48),n=d(m),o=a(52),p=d(o),q=a(49),r=d(q),s=1;e.__dashjs_factory_name="XlinkLoader";var t=r.default.getClassFactory(e);t.XLINK_LOADER_ERROR_LOADING_FAILURE=s,r.default.updateClassFactory(e.__dashjs_factory_name,t),c.default=t,b.exports=c.default},{210:210,220:220,229:229,48:48,49:49,52:52,98:98}],100:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(c,"__esModule",{value:!0});var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=function(){function a(){d(this,a),this.init()}return e(a,[{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.LOCATION="Location",this.INITIALIZE="initialize",this.TEXT_SHOWING="showing",this.TEXT_HIDDEN="hidden",this.CC1="CC1",this.CC3="CC3",this.STPP="stpp",this.TTML="ttml",this.VTT="vtt",this.WVTT="wvtt",this.UTF8="utf-8",this.SUGGESTED_PRESENTATION_DELAY="suggestedPresentationDelay",this.SCHEME_ID_URI="schemeIdUri",this.START_TIME="starttime",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"}}]),a}(),g=new f;c.default=g,b.exports=c.default},{}],101:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(c,"__esModule",{value:!0});var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=function(){function a(){d(this,a),this.init()}return e(a,[{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"}}]),a}(),g=new f;c.default=g,b.exports=c.default},{}],102:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(c,"__esModule",{value:!0});var e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=function(){function a(){d(this,a),this.init()}return e(a,[{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"}}]),a}(),g=new f;c.default=g,b.exports=c.default},{}],103:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(){function a(){ua=ra.log.bind(ta),e()}function b(a,b){Ra[a]=(0,A.default)(qa).create(),Ca[a]=b,Da[a]=Da[a]||{},Da[a].state=J,Ua[a]=!1,sa.on(s.default.LOADING_PROGRESS,pa,this),a==i.default.VIDEO&&(sa.on(s.default.QUALITY_CHANGE_RENDERED,j,this),Sa=(0,C.default)(qa).create(),na()),sa.on(s.default.METRIC_ADDED,l,this),Ta=(0,E.default)(qa).create({mediaPlayerModel:Oa})}function c(a){delete Ca[a]}function d(){va=(0,g.default)(qa).create({metricsModel:Va,dashMetrics:Wa,mediaPlayerModel:Oa,adapter:Ma}),va.initialize()}function e(){xa={video:!0,audio:!0},ya={},za={},Aa={},Ba={},Da={},Ca={},Ra={},Ua={},Fa=!1,Xa=!0,Ga=!1,void 0===Ha&&(Ha=!1),Qa=void 0,Sa=void 0,Ta=void 0,clearTimeout(Ea),Ea=null}function f(){e(),sa.off(s.default.LOADING_PROGRESS,pa,this),sa.off(s.default.QUALITY_CHANGE_RENDERED,j,this),sa.off(s.default.METRIC_ADDED,l,this),va&&va.reset()}function h(a){a&&(a.streamController&&(wa=a.streamController),a.domStorage&&(Pa=a.domStorage),a.mediaPlayerModel&&(Oa=a.mediaPlayerModel),a.metricsModel&&(Va=a.metricsModel),a.dashMetrics&&(Wa=a.dashMetrics),a.dashManifestModel&&(La=a.dashManifestModel),a.adapter&&(Ma=a.adapter),a.manifestModel&&(Ka=a.manifestModel),a.videoModel&&(Na=a.videoModel))}function j(a){a.mediaType===i.default.VIDEO&&(Qa=a.oldQuality,Sa.push(Qa,Na.getPlaybackQuality()))}function l(a){a.metric!==k.default.HTTP_REQUEST||!a.value||a.value.type!==F.HTTPRequest.MEDIA_SEGMENT_TYPE||a.mediaType!==i.default.AUDIO&&a.mediaType!==i.default.VIDEO||Ta.push(a.mediaType,a.value,Xa),a.metric!==k.default.BUFFER_LEVEL||a.mediaType!==i.default.AUDIO&&a.mediaType!==i.default.VIDEO||ca(a.mediaType,.001*a.value.level)}function n(a,b){var c=void 0;return ya[b]=ya[b]||{},ya[b].hasOwnProperty(a)||(ya[b][a]=0),c=ka(ya[b][a],a),c=la(c,a,ya[b][a]),c=oa(c,a)}function p(a){var b=Pa.getSavedBitrateSettings(a);if(!Aa.hasOwnProperty(a))if(Ba.hasOwnProperty(a)){var c=Ka.getValue(),d=La.getAdaptationForType(c,0,a).Representation;if(Array.isArray(d)){var e=Math.max(Math.round(d.length*Ba[a])-1,0);Aa[a]=d[e].bandwidth}else Aa[a]=0}else isNaN(b)?Aa[a]=a===i.default.VIDEO?K:L:Aa[a]=b;return Aa[a]}function r(a,b){Aa[a]=b}function t(a){return Ba.hasOwnProperty(a)?Ba[a]:null}function u(a,b){Ba[a]=b}function v(a){return Aa.hasOwnProperty("max")&&Aa.max.hasOwnProperty(a)?Aa.max[a]:NaN}function x(a){return Aa.hasOwnProperty("min")&&Aa.min.hasOwnProperty(a)?Aa.min[a]:NaN}function z(a,b){Aa.max=Aa.max||{},Aa.max[a]=b}function B(a,b){Aa.min=Aa.min||{},Aa.min[a]=b}function D(a){var b=v(a);return b?aa(Ca[a].getMediaInfo(),b):void 0}function G(a){var b=x(a);if(b){var c=ba(Ca[a].getMediaInfo()),d=aa(Ca[a].getMediaInfo(),b);return c[d]&&d<c.length-1&&c[d].bitrate<1e3*b&&d++,d}}function N(a){return Ba.hasOwnProperty("max")&&Ba.max.hasOwnProperty(a)?Ba.max[a]:1}function O(a,b){Ba.max=Ba.max||{},Ba.max[a]=b}function P(a){return xa[a]}function Q(a,b){xa[a]=b}function R(){return Fa}function S(a){Fa=a}function T(){return Ga}function U(a){Ga=a}function V(){return Xa}function W(a){Xa=a}function X(a){if(a&&Ca&&Ca[a]){var b=Ca[a].getStreamInfo(),c=b?b.id:null,d=ha(a),e=(0,w.default)(qa).create({abrController:ta,streamProcessor:Ca[a],currentValue:d,switchHistory:Ra[a],droppedFramesHistory:Sa,useBufferOccupancyABR:da(a)});if(Sa){var f=Na.getPlaybackQuality();f&&Sa.push(Qa,f)}if(P(a)){var g=G(a),h=n(a,c),i=va.getMaxQuality(e),j=i.quality;if(void 0!==g&&j<g&&(j=g),j>h&&(j=h),Ra[a].push({oldValue:d,newValue:j}),j>y.default.NO_CHANGE&&j!=d)(Da[a].state===J||j>d)&&Z(a,d,j,h,i.reason);else if(ra.getLogToBrowserConsole()){var k=Wa.getCurrentBufferLevel(Va.getReadOnlyMetricsFor(a));ua("AbrController ("+a+") stay on "+d+"/"+h+" (buffer: "+k+")")}}}}function Y(a,b,c,d){var e=b.id,f=ha(a);if(null===c||isNaN(c)||c%1!=0)throw new Error("argument is not an integer");var g=n(a,e);c!==f&&c>=0&&c<=g&&Z(a,f,c,g,d)}function Z(a,b,c,d,e){if(a&&Ca[a]){var f=Ca[a].getStreamInfo(),g=f?f.id:null;if(ra.getLogToBrowserConsole()){var h=Wa.getCurrentBufferLevel(Va.getReadOnlyMetricsFor(a));ua("AbrController ("+a+") switch from "+b+" to "+c+"/"+d+" (buffer: "+h+") "+(e?JSON.stringify(e):"."))}ia(a,g,c),sa.trigger(s.default.QUALITY_CHANGE_REQUESTED,{mediaType:a,streamInfo:f,oldQuality:b,newQuality:c,reason:e})}}function $(a,b){Da[a].state=b}function _(a){return Da[a]?Da[a].state:null}function aa(a,b,c){if(Xa&&c&&Ca[a.type].getCurrentRepresentationInfo()&&Ca[a.type].getCurrentRepresentationInfo().fragmentDuration){c/=1e3;var d=Ca[a.type].getCurrentRepresentationInfo().fragmentDuration;if(c>d)return 0;b*=1-c/d}var e=ba(a);if(!e||0===e.length)return M;for(var f=e.length-1;f>=0;f--){if(1e3*b>=e[f].bitrate)return f}return 0}function ba(a){if(!a||!a.bitrateList)return null;for(var b=a.bitrateList,c=a.type,d=[],e=void 0,f=0,g=b.length;f<g;f++)e=new m.default,e.mediaType=c,e.qualityIndex=f,e.bitrate=b[f].bandwidth,e.width=b[f].width,e.height=b[f].height,e.scanType=b[f].scanType,d.push(e);return d}function ca(a,b){var c=Oa.getABRStrategy();if(c===i.default.ABR_STRATEGY_BOLA)return void(Ua[a]=!0);if(c===i.default.ABR_STRATEGY_THROUGHPUT)return void(Ua[a]=!1);var d=Oa.getStableBufferTime(),e=d,f=.5*d,g=Ua[a],h=b>(g?f:e);Ua[a]=h,h!==g&&ua(h?"AbrController ("+a+") switching from throughput to buffer occupancy ABR rule (buffer: "+b.toFixed(3)+").":"AbrController ("+a+") switching from buffer occupancy to throughput ABR rule (buffer: "+b.toFixed(3)+").")}function da(a){return Ua[a]}function ea(){return Ta}function fa(a){var b=a.type,c=a.streamInfo.id,d=a.representationCount-1;return ja(b,c,d),d}function ga(a){var b=a.id,c=ha(i.default.AUDIO),d=ha(i.default.VIDEO);return c===n(i.default.AUDIO,b)&&d===n(i.default.VIDEO,b)}function ha(a){if(a&&Ca[a]){var b=Ca[a].getStreamInfo(),c=b?b.id:null;if(c)return za[c]=za[c]||{},za[c].hasOwnProperty(a)||(za[c][a]=M),za[c][a]}return M}function ia(a,b,c){za[b]=za[b]||{},za[b][a]=c}function ja(a,b,c){ya[b]=ya[b]||{},ya[b][a]=c}function ka(a,b){var c=a;if(!Ca[b])return c;var d=G(b);void 0!==d&&(c=Math.max(a,d));var e=D(b);return void 0!==e&&(c=Math.min(c,e)),c}function la(a,b,c){var d=N(b);return isNaN(d)||d>=1||d<0?a:Math.min(a,Math.round(c*d))}function ma(a){Ha=a}function na(){if(Na){var a=Ga&&window.hasOwnProperty("devicePixelRatio"),b=a?window.devicePixelRatio:1;Ia=Na.getClientWidth()*b,Ja=Na.getClientHeight()*b}}function oa(a,b){if(b!==i.default.VIDEO||!Fa||!Ca[b])return a;Ha||na();var c=Ka.getValue(),d=La.getAdaptationForType(c,0,b).Representation,e=a;if(Ia>0&&Ja>0){for(;e>0&&d[e]&&Ia<d[e].width&&Ia-d[e-1].width<d[e].width-Ia;)e-=1;d.length-2>=e&&d[e].width===d[e+1].width&&(e=Math.min(a,e+1))}return e}function pa(a){var b=a.request.mediaType;if(P(b)){var c=Ca[b];if(!c)return;var d=(0,w.default)(qa).create({abrController:ta,streamProcessor:c,currentRequest:a.request,useBufferOccupancyABR:da(b)}),e=va.shouldAbandonFragment(d);if(e.quality>y.default.NO_CHANGE){var f=c.getFragmentModel();f.getRequests({state:o.default.FRAGMENT_MODEL_LOADING,index:a.request.index})[0]&&(f.abortRequests(),$(b,I),Ra[b].reset(),Ra[b].push({oldValue:ha(b,wa.getActiveStreamInfo()),newValue:e.quality,confidence:1,reason:e.reason}),Y(b,wa.getActiveStreamInfo(),e.quality,e.reason),clearTimeout(Ea),Ea=setTimeout(function(){$(b,J),Ea=null},Oa.getAbandonLoadTimeout()))}}}var qa=this.context,ra=(0,H.default)(qa).getInstance(),sa=(0,
23
+ q.default)(qa).getInstance(),ta=void 0,ua=void 0,va=void 0,wa=void 0,xa=void 0,ya=void 0,za=void 0,Aa=void 0,Ba=void 0,Ca=void 0,Da=void 0,Ea=void 0,Fa=void 0,Ga=void 0,Ha=void 0,Ia=void 0,Ja=void 0,Ka=void 0,La=void 0,Ma=void 0,Na=void 0,Oa=void 0,Pa=void 0,Qa=void 0,Ra=void 0,Sa=void 0,Ta=void 0,Ua=void 0,Va=void 0,Wa=void 0,Xa=void 0;return ta={isPlayingAtTopQuality:ga,updateTopQualityIndex:fa,getThroughputHistory:ea,getBitrateList:ba,getQualityForBitrate:aa,getMaxAllowedBitrateFor:v,getMinAllowedBitrateFor:x,setMaxAllowedBitrateFor:z,setMinAllowedBitrateFor:B,getMaxAllowedIndexFor:D,getMinAllowedIndexFor:G,getMaxAllowedRepresentationRatioFor:N,setMaxAllowedRepresentationRatioFor:O,getInitialBitrateFor:p,setInitialBitrateFor:r,getInitialRepresentationRatioFor:t,setInitialRepresentationRatioFor:u,setAutoSwitchBitrateFor:Q,getAutoSwitchBitrateFor:P,getUseDeadTimeLatency:V,setUseDeadTimeLatency:W,setLimitBitrateByPortal:S,getLimitBitrateByPortal:R,getUsePixelRatioInLimitBitrateByPortal:T,setUsePixelRatioInLimitBitrateByPortal:U,getQualityFor:ha,getAbandonmentStateFor:_,setPlaybackQuality:Y,checkPlaybackQuality:X,getTopQualityIndexFor:n,setElementSize:na,setWindowResizeEventCalled:ma,createAbrRulesCollection:d,registerStreamType:b,unRegisterStreamType:c,setConfig:h,reset:f},a(),ta}Object.defineProperty(c,"__esModule",{value:!0});var f=a(175),g=d(f),h=a(100),i=d(h),j=a(101),k=d(j),l=a(209),m=d(l),n=a(140),o=d(n),p=a(48),q=d(p),r=a(52),s=d(r),t=a(49),u=d(t),v=a(171),w=d(v),x=a(172),y=d(x),z=a(173),A=d(z),B=a(170),C=d(B),D=a(174),E=d(D),F=a(229),G=a(47),H=d(G),I="abandonload",J="allowload",K=1e3,L=100,M=0;e.__dashjs_factory_name="AbrController";var N=u.default.getSingletonFactory(e);N.ABANDON_LOAD=I,N.QUALITY_DEFAULT=M,u.default.updateSingletonFactory(e.__dashjs_factory_name,N),c.default=N,b.exports=c.default},{100:100,101:101,140:140,170:170,171:171,172:172,173:173,174:174,175:175,209:209,229:229,47:47,48:48,49:49,52:52}],104:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(){function a(a){r.invalidateSelectedIndexes(a.entry)}function b(){r=(0,g.default)(n).create(),t=(0,i.default)(n).create(),o.on(s.default.SERVICE_LOCATION_BLACKLIST_CHANGED,a,j)}function c(a){a.baseURLTreeModel&&(r=a.baseURLTreeModel),a.baseURLSelector&&(t=a.baseURLSelector),a.dashManifestModel&&(l=a.dashManifestModel)}function d(a){r.update(a),t.chooseSelectorFromManifest(a)}function e(a){var b=r.getForPath(a),c=b.reduce(function(a,b){var c=t.select(b);return c?(p.isRelative(c.url)?a.url=p.resolve(c.url,a.url):(a.url=c.url,a.serviceLocation=c.serviceLocation),a):new m.default},new m.default);if(!p.isRelative(c.url))return c}function f(){r.reset(),t.reset()}function h(a){r.setConfig({dashManifestModel:l}),t.setConfig({dashManifestModel:l}),d(a)}var j=void 0,l=void 0,n=this.context,o=(0,q.default)(n).getInstance(),p=(0,k.default)(n).getInstance(),r=void 0,t=void 0;return j={reset:f,initialize:h,resolve:e,setConfig:c},b(),j}Object.defineProperty(c,"__esModule",{value:!0});var f=a(139),g=d(f),h=a(192),i=d(h),j=a(205),k=d(j),l=a(80),m=d(l),n=a(49),o=d(n),p=a(48),q=d(p),r=a(52),s=d(r);e.__dashjs_factory_name="BaseURLController",c.default=o.default.getSingletonFactory(e),b.exports=c.default},{139:139,192:192,205:205,48:48,49:49,52:52,80:80}],105:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a){function b(a){return!!(g.length&&a&&a.length)&&-1!==g.indexOf(a)}function c(a){-1===g.indexOf(a)&&(g.push(a),h.trigger(j,{entry:a}))}function d(a){c(a.entry)}function e(){k&&h.on(k,d,this)}function f(){g=[]}a=a||{};var g=[],h=(0,i.default)(this.context).getInstance(),j=a.updateEventName,k=a.addBlacklistEventName;return e(),{add:c,contains:b,reset:f}}Object.defineProperty(c,"__esModule",{value:!0});var f=a(49),g=d(f),h=a(48),i=d(h);e.__dashjs_factory_name="BlackListController",c.default=g.default.getClassFactory(e),b.exports=c.default},{48:48,49:49}],106:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(a){function b(){Ea=(0,A.default)(qa).getInstance().log.bind(Da),Sa=(0,C.default)(qa).getInstance(),oa()}function c(){return K}function d(a){ia(a),Fa=za.getQualityFor(Ba,Ca.getStreamInfo()),ra.on(u.default.DATA_UPDATE_COMPLETED,$,this),ra.on(u.default.INIT_FRAGMENT_LOADED,j,this),ra.on(u.default.MEDIA_FRAGMENT_LOADED,n,this),ra.on(u.default.QUALITY_CHANGE_REQUESTED,v,this),ra.on(u.default.STREAM_COMPLETED,_,this),ra.on(u.default.PLAYBACK_PROGRESS,L,this),ra.on(u.default.PLAYBACK_TIME_UPDATED,L,this),ra.on(u.default.PLAYBACK_RATE_CHANGED,ca,this),ra.on(u.default.PLAYBACK_SEEKING,x,this),ra.on(u.default.WALLCLOCK_TIME_UPDATED,ba,this),ra.on(u.default.CURRENT_TRACK_CHANGED,aa,this,s.default.EVENT_PRIORITY_HIGH),ra.on(u.default.SOURCEBUFFER_REMOVE_COMPLETED,Y,this)}function e(a){if(!Sa||!a||!Ca)return null;if(Ja)try{Ma=(0,k.default)(qa).create(Ja,a,t.bind(this)),"function"==typeof Ma.getBuffer().initialize&&Ma.getBuffer().initialize(Ba,Ca)}catch(b){Ea("Caught error on create SourceBuffer: "+b),ua.mediaSourceError("Error creating "+Ba+" source buffer.")}else Ma=(0,m.default)(qa).create(t.bind(this));Z(Ca.getRepresentationInfoForQuality(Fa).MSETimeOffset)}function f(){if(Ma&&Na&&"function"==typeof Na.discharge){var a=Na.getAllBufferRanges();if(a.length>0){for(var b="Beginning "+Ba+"PreBuffer discharge, adding buffer for:",c=0;c<a.length;c++)b+=" start: "+a.start(c)+", end: "+a.end(c)+";";Ea(b)}else Ea("PreBuffer discharge requested, but there were no media segments in the PreBuffer.");for(var d=Na.discharge(),e=null,f=0;f<d.length;f++){var g=d[f],h=Sa.extract(g.streamId,g.representationId);h&&(e!==h&&(Ma.append(h),e=h),Ma.append(g))}Na.reset(),Na=null}}function h(){return!(!Ca||!va)&&Ca.getStreamInfo().id===va.getActiveStreamInfo().id}function j(a){a.fragmentModel===Ca.getFragmentModel()&&(Ea("Init fragment finished loading saving to",Ba+"'s init cache"),Sa.save(a.chunk),Ea("Append Init fragment",Ba," with representationId:",a.chunk.representationId," and quality:",a.chunk.quality),p(a.chunk))}function l(a,b,c){var d=Sa.extract(a,b);Wa=!0===c&&c,d?(Ea("Append Init fragment",Ba," with representationId:",d.representationId," and quality:",d.quality),p(d)):ra.trigger(u.default.INIT_REQUESTED,{sender:Da})}function n(a){if(a.fragmentModel===Ca.getFragmentModel()){var b=a.chunk,c=b.bytes,d=b.quality,e=Ca.getRepresentationInfoForQuality(d),f=xa.getEventsFor(e.mediaInfo,Ca),g=xa.getEventsFor(e,Ca);if(f&&f.length>0||g&&g.length>0){var h=Ca.getFragmentModel().getRequests({state:i.default.FRAGMENT_MODEL_EXECUTED,quality:d,index:b.index})[0],j=T(c,h,f,g);Ca.getEventController().addInbandEvents(j)}if(Wa){Xa=b;var k=Ma&&Ma.getAllBufferRanges();k&&k.length>0&&Aa.getTimeToStreamEnd()>G&&(Ea("Clearing buffer because track changed - "+(k.end(k.length-1)+H)),W([{start:0,end:k.end(k.length-1)+H,force:!0}]))}else p(b)}}function p(a){Ma.append(a),a.mediaInfo.type===g.default.VIDEO&&ra.trigger(u.default.VIDEO_CHUNK_RECEIVED,{chunk:a})}function r(a){if(a&&a.length>0)for(var b=0,c=a.length;b<c;b++)Ea("Buffered Range for type:",Ba,":",a.start(b)," - ",a.end(b)," currentTime = ",Aa.getTime())}function t(a){if(a.error){if(a.error.code===J&&(Ia=.8*ma(),Ea("Quota exceeded for type: "+Ba+", Critical Buffer: "+Ia),Ia>0)){var b=Math.max(.2*Ia,1),c=Ia-b;ta.setBufferToKeep(parseFloat(b).toFixed(5)),ta.setBufferAheadToKeep(parseFloat(c).toFixed(5))}return void(a.error.code!==J&&na()||(Ea("Clearing playback buffer to overcome quota exceed situation for type: "+Ba),ra.trigger(u.default.QUOTA_EXCEEDED,{sender:Da,criticalBufferLevel:Ia}),y()))}(Pa=a.chunk)&&!isNaN(Pa.index)&&(Ka=Math.max(Pa.index,Ka),Q());var d=Ma.getAllBufferRanges();if(Pa.segmentType===D.HTTPRequest.MEDIA_SEGMENT_TYPE)r(d),L();else if(Wa){var e=Aa.getTime();Ea("[BufferController][",Ba,"] appendToBuffer seek target should be "+e),Ca.getScheduleController().setSeekTarget(e),xa.setIndexHandlerTime(Ca,e)}Ea("[BufferController][",Ba,"] onAppended chunk type = ",Pa.segmentType," and index = ",Pa.index),Pa&&ra.trigger(u.default.BYTES_APPENDED,{sender:Da,quality:Pa.quality,startTime:Pa.start,index:Pa.index,bufferedRanges:d})}function v(a){Fa!==a.newQuality&&Ba===a.mediaType&&Ca.getStreamInfo().id===a.streamInfo.id&&(Z(Ca.getRepresentationInfoForQuality(a.newQuality).MSETimeOffset),Fa=a.newQuality)}function x(){Ga&&(Ua=!0,Ga=!1,La=Number.POSITIVE_INFINITY),Ba!==g.default.FRAGMENTED_TEXT?y():L(),Ta=void 0}function y(){var a=z();a&&0!==a.length||L(),W(a)}function z(){var a=[],b=Ma.getAllBufferRanges();if(!b||0===b.length)return a;var c=Aa.getTime(),d=b.end(b.length-1)+H,e=Ca.getFragmentModel().getRequests({state:i.default.FRAGMENT_MODEL_EXECUTED,time:c,threshold:I})[0];if(e){var f={start:0,end:e.startTime-G},g=Ca.getFragmentModel().getRequests({state:i.default.FRAGMENT_MODEL_EXECUTED,time:e.startTime-e.duration/2,threshold:I})[0];g&&g.startTime!=e.startTime&&(f.end=g.startTime),f.start<f.end&&f.end>b.start(0)&&a.push(f);var h={start:e.startTime+e.duration+G,end:d},j=Ca.getFragmentModel().getRequests({state:i.default.FRAGMENT_MODEL_EXECUTED,time:e.startTime+e.duration+G,threshold:I})[0];j&&j.startTime!==e.startTime&&(h.start=j.startTime+j.duration+G),h.start<h.end&&h.start<d&&a.push(h)}else Ea("getAllRangesWithSafetyFactor for",Ba,"- No request found in current time position, removing full buffer 0 -",d),a.push({start:0,end:d});return a}function B(){var a=Aa.getTime();if(Ta){var b=Ma.getAllBufferRanges();b&&b.length&&(a=Math.max(b.start(0),Ta))}return a}function L(){Wa||(O(),P())}function M(a,b){var c=Ma.getAllBufferRanges(),d=0,e=0,f=null,g=null,h=0,i=void 0,j=void 0,k=b||.15;if(null!==c&&void 0!==c){for(j=0,i=c.length;j<i;j++)if(d=c.start(j),e=c.end(j),null===f)h=Math.abs(d-a),a>=d&&a<e?(f=d,g=e):h<=k&&(f=d,g=e);else{if(!((h=d-g)<=k))break;g=e}if(null!==f)return{start:f,end:g}}return null}function N(a,b){var c=void 0;return c=M(a,b),null===c?0:c.end-a}function O(){Aa&&(Ha=N(B()||0),ra.trigger(u.default.BUFFER_LEVEL_UPDATED,{sender:Da,bufferLevel:Ha}),R())}function P(){h()&&(sa.addBufferState(Ba,Oa,Ca.getScheduleController().getBufferTarget()),sa.addBufferLevel(Ba,new Date,1e3*Ha))}function Q(){Ka>=La-1&&!Ga&&void 0===Ma.discharge&&(Ga=!0,Ea("[BufferController]["+Ba+"] checkIfBufferingCompleted trigger BUFFERING_COMPLETED"),ra.trigger(u.default.BUFFERING_COMPLETED,{sender:Da,streamInfo:Ca.getStreamInfo()}))}function R(){"audio"!==Ba&&"video"!==Ba||(Ua&&!Ga&&Aa&&Aa.getTimeToStreamEnd()-Ha<G&&(Ua=!1,Ga=!0,Ea("[BufferController]["+Ba+"] checkIfSufficientBuffer trigger BUFFERING_COMPLETED"),ra.trigger(u.default.BUFFERING_COMPLETED,{sender:Da,streamInfo:Ca.getStreamInfo()})),Ha<G&&!Ga?S(F):(Ga||Ha>=ta.getStableBufferTime())&&S(E))}function S(a){Oa===a||Ba===g.default.FRAGMENTED_TEXT&&ya.getAllTracksAreDisabled()||(Oa=a,P(),ra.trigger(u.default.BUFFER_LEVEL_STATE_CHANGED,{sender:Da,state:a,mediaType:Ba,streamInfo:Ca.getStreamInfo()}),ra.trigger(a===E?u.default.BUFFER_LOADED:u.default.BUFFER_EMPTY,{mediaType:Ba}),Ea(a===E?"Got enough buffer to start for "+Ba:"Waiting for more buffer before starting playback for "+Ba))}function T(a,b,c,d){for(var e=Math.max(isNaN(b.startTime)?0:b.startTime,0),f=[],g=[],h=c.concat(d),i=0,j=h.length;i<j;i++)f[h[i].schemeIdUri]=h[i];for(var k=(0,w.default)(qa).getInstance().parse(a),l=k.getBoxes("emsg"),i=0,j=l.length;i<j;i++){var m=xa.getEvent(l[i],f,e);m&&g.push(m)}return g}function U(){Ma&&Ba!==g.default.FRAGMENTED_TEXT&&(Ga||W(V()))}function V(){var a=[],b=Ma.getAllBufferRanges();if(!b||0===b.length)return a;var c=Aa.getTime(),d={start:Math.max(0,c-ta.getBufferToKeep()),end:c+ta.getBufferAheadToKeep()},e=Ca.getFragmentModel().getRequests({state:i.default.FRAGMENT_MODEL_EXECUTED,time:c,threshold:I})[0];if(e&&(d.start=Math.min(e.startTime,d.start),d.end=Math.max(e.startTime+e.duration,d.end)),Ea("getClearRanges for",Ba,"- Remove buffer out of ",d.start," - ",d.end),b.start(0)<=d.start){for(var f={start:0,end:d.start},g=0;g<b.length&&b.end(g)<=d.start;g++)f.end=b.end(g);f.start<f.end&&a.push(f)}if(b.end(b.length-1)>=d.end){var h={start:d.end,end:b.end(b.length-1)+I};h.start<h.end&&a.push(h)}return a}function W(a){a&&Ma&&0!==a.length&&(Va.push.apply(Va,a),Ra||X())}function X(){if(0!==Va.length){var a=Va.shift();Ea("Removing",Ba,"buffer from:",a.start,"to",a.end),Ra=!0;var b=Aa.getTime();b<a.end&&(Ga=!1,Ka=0,Wa||(Ca.getScheduleController().setSeekTarget(b),xa.setIndexHandlerTime(Ca,b))),Ma.remove(a.start,a.end,a.force)}}function Y(a){if(Ma===a.buffer){Ea("[BufferController][",Ba,"] onRemoved buffer from:",a.from,"to",a.to);r(Ma.getAllBufferRanges()),0===Va.length&&(Ra=!1),Ra?X():(Wa?(Wa=!1,p(Xa)):(Ea("onRemoved : call updateBufferLevel"),O()),ra.trigger(u.default.BUFFER_CLEARED,{sender:Da,from:a.from,to:a.to,hasEnoughSpaceToAppend:na()}))}}function Z(a){var b=Ma&&Ma.getBuffer?Ma.getBuffer():null;b&&b.timestampOffset!==a&&!isNaN(a)&&(b.timestampOffset=a)}function $(a){a.sender.getStreamProcessor()!==Ca||a.error||Z(a.currentRepresentation.MSETimeOffset)}function _(a){a.fragmentModel===Ca.getFragmentModel()&&(La=a.request.index,Q())}function aa(a){var b=Ma&&Ma.getAllBufferRanges();b&&a.newMediaInfo.type===Ba&&a.newMediaInfo.streamInfo.id===Ca.getStreamInfo().id&&(Ea("[BufferController]["+Ba+"] track change asked"),wa.getSwitchMode(Ba)===q.default.TRACK_SWITCH_MODE_ALWAYS_REPLACE&&b&&b