Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

dashjs

Package Overview
Dependencies
Maintainers
4
Versions
54
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dashjs - npm Package Compare versions

Comparing version 4.6.0 to 4.7.0

docs/jsdoc/dash_controllers_ContentSteeringController.js.html

2

dist/dash.all.min.js.LICENSE.txt

@@ -16,3 +16,3 @@ /*!

/*! codem-isoboxer v0.3.6 https://github.com/madebyhiro/codem-isoboxer/blob/master/LICENSE.txt */
/*! codem-isoboxer v0.3.9 https://github.com/madebyhiro/codem-isoboxer/blob/master/LICENSE.txt */

@@ -19,0 +19,0 @@ /*! http://mths.be/fromcodepoint v0.1.0 by @mathias */

@@ -16,3 +16,3 @@ /*!

/*! codem-isoboxer v0.3.6 https://github.com/madebyhiro/codem-isoboxer/blob/master/LICENSE.txt */
/*! codem-isoboxer v0.3.9 https://github.com/madebyhiro/codem-isoboxer/blob/master/LICENSE.txt */

@@ -19,0 +19,0 @@ /*! http://mths.be/fromcodepoint v0.1.0 by @mathias */

@@ -1,2 +0,2 @@

!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.dashjs=e():t.dashjs=e()}(self,(()=>(()=>{var t={2214:(t,e,r)=>{var n;t=r.nmd(t);var i=function(t){"use strict";var e=1e7,r=9007199254740992,n=c(r),o="0123456789abcdefghijklmnopqrstuvwxyz",a="function"==typeof BigInt;function s(t,e,r,n){return void 0===t?s[0]:void 0===e||10==+e&&!r?J(t):H(t,e,r,n)}function u(t,e){this.value=t,this.sign=e,this.isSmall=!1}function l(t){this.value=t,this.sign=t<0,this.isSmall=!0}function p(t){this.value=t}function f(t){return-r<t&&t<r}function c(t){return t<1e7?[t]:t<1e14?[t%1e7,Math.floor(t/1e7)]:[t%1e7,Math.floor(t/1e7)%1e7,Math.floor(t/1e14)]}function d(t){h(t);var r=t.length;if(r<4&&C(t,n)<0)switch(r){case 0:return 0;case 1:return t[0];case 2:return t[0]+t[1]*e;default:return t[0]+(t[1]+t[2]*e)*e}return t}function h(t){for(var e=t.length;0===t[--e];);t.length=e+1}function m(t){for(var e=new Array(t),r=-1;++r<t;)e[r]=0;return e}function y(t){return t>0?Math.floor(t):Math.ceil(t)}function g(t,r){var n,i,o=t.length,a=r.length,s=new Array(o),u=0,l=e;for(i=0;i<a;i++)u=(n=t[i]+r[i]+u)>=l?1:0,s[i]=n-u*l;for(;i<o;)u=(n=t[i]+u)===l?1:0,s[i++]=n-u*l;return u>0&&s.push(u),s}function v(t,e){return t.length>=e.length?g(t,e):g(e,t)}function _(t,r){var n,i,o=t.length,a=new Array(o),s=e;for(i=0;i<o;i++)n=t[i]-s+r,r=Math.floor(n/s),a[i]=n-r*s,r+=1;for(;r>0;)a[i++]=r%s,r=Math.floor(r/s);return a}function T(t,r){var n,i,o=t.length,a=r.length,s=new Array(o),u=0,l=e;for(n=0;n<a;n++)(i=t[n]-u-r[n])<0?(i+=l,u=1):u=0,s[n]=i;for(n=a;n<o;n++){if(!((i=t[n]-u)<0)){s[n++]=i;break}i+=l,s[n]=i}for(;n<o;n++)s[n]=t[n];return h(s),s}function E(t,r,n){var i,o,a=t.length,s=new Array(a),p=-r,f=e;for(i=0;i<a;i++)o=t[i]+p,p=Math.floor(o/f),o%=f,s[i]=o<0?o+f:o;return"number"==typeof(s=d(s))?(n&&(s=-s),new l(s)):new u(s,n)}function b(t,r){var n,i,o,a,s=t.length,u=r.length,l=m(s+u),p=e;for(o=0;o<s;++o){a=t[o];for(var f=0;f<u;++f)n=a*r[f]+l[o+f],i=Math.floor(n/p),l[o+f]=n-i*p,l[o+f+1]+=i}return h(l),l}function A(t,r){var n,i,o=t.length,a=new Array(o),s=e,u=0;for(i=0;i<o;i++)n=t[i]*r+u,u=Math.floor(n/s),a[i]=n-u*s;for(;u>0;)a[i++]=u%s,u=Math.floor(u/s);return a}function S(t,e){for(var r=[];e-- >0;)r.push(0);return r.concat(t)}function w(t,e){var r=Math.max(t.length,e.length);if(r<=30)return b(t,e);r=Math.ceil(r/2);var n=t.slice(r),i=t.slice(0,r),o=e.slice(r),a=e.slice(0,r),s=w(i,a),u=w(n,o),l=w(v(i,n),v(a,o)),p=v(v(s,S(T(T(l,s),u),r)),S(u,2*r));return h(p),p}function I(t,r,n){return new u(t<e?A(r,t):b(r,c(t)),n)}function N(t){var r,n,i,o,a=t.length,s=m(a+a),u=e;for(i=0;i<a;i++){n=0-(o=t[i])*o;for(var l=i;l<a;l++)r=o*t[l]*2+s[i+l]+n,n=Math.floor(r/u),s[i+l]=r-n*u;s[i+a]=n}return h(s),s}function M(t,e){var r,n,i,o,a=t.length,s=m(a);for(i=0,r=a-1;r>=0;--r)i=(o=1e7*i+t[r])-(n=y(o/e))*e,s[r]=0|n;return[s,0|i]}function D(t,r){var n,i=J(r);if(a)return[new p(t.value/i.value),new p(t.value%i.value)];var o,f=t.value,g=i.value;if(0===g)throw new Error("Cannot divide by zero");if(t.isSmall)return i.isSmall?[new l(y(f/g)),new l(f%g)]:[s[0],t];if(i.isSmall){if(1===g)return[t,s[0]];if(-1==g)return[t.negate(),s[0]];var v=Math.abs(g);if(v<e){o=d((n=M(f,v))[0]);var _=n[1];return t.sign&&(_=-_),"number"==typeof o?(t.sign!==i.sign&&(o=-o),[new l(o),new l(_)]):[new u(o,t.sign!==i.sign),new l(_)]}g=c(v)}var E=C(f,g);if(-1===E)return[s[0],t];if(0===E)return[s[t.sign===i.sign?1:-1],s[0]];n=f.length+g.length<=200?function(t,r){var n,i,o,a,s,u,l,p=t.length,f=r.length,c=e,h=m(r.length),y=r[f-1],g=Math.ceil(c/(2*y)),v=A(t,g),_=A(r,g);for(v.length<=p&&v.push(0),_.push(0),y=_[f-1],i=p-f;i>=0;i--){for(n=c-1,v[i+f]!==y&&(n=Math.floor((v[i+f]*c+v[i+f-1])/y)),o=0,a=0,u=_.length,s=0;s<u;s++)o+=n*_[s],l=Math.floor(o/c),a+=v[i+s]-(o-l*c),o=l,a<0?(v[i+s]=a+c,a=-1):(v[i+s]=a,a=0);for(;0!==a;){for(n-=1,o=0,s=0;s<u;s++)(o+=v[i+s]-c+_[s])<0?(v[i+s]=o+c,o=0):(v[i+s]=o,o=1);a+=o}h[i]=n}return v=M(v,g)[0],[d(h),d(v)]}(f,g):function(t,r){for(var n,i,o,a,s,u=t.length,l=r.length,p=[],f=[],c=e;u;)if(f.unshift(t[--u]),h(f),C(f,r)<0)p.push(0);else{o=f[(i=f.length)-1]*c+f[i-2],a=r[l-1]*c+r[l-2],i>l&&(o=(o+1)*c),n=Math.ceil(o/a);do{if(C(s=A(r,n),f)<=0)break;n--}while(n);p.push(n),f=T(f,s)}return p.reverse(),[d(p),d(f)]}(f,g),o=n[0];var b=t.sign!==i.sign,S=n[1],w=t.sign;return"number"==typeof o?(b&&(o=-o),o=new l(o)):o=new u(o,b),"number"==typeof S?(w&&(S=-S),S=new l(S)):S=new u(S,w),[o,S]}function C(t,e){if(t.length!==e.length)return t.length>e.length?1:-1;for(var r=t.length-1;r>=0;r--)if(t[r]!==e[r])return t[r]>e[r]?1:-1;return 0}function P(t){var e=t.abs();return!e.isUnit()&&(!!(e.equals(2)||e.equals(3)||e.equals(5))||!(e.isEven()||e.isDivisibleBy(3)||e.isDivisibleBy(5))&&(!!e.lesser(49)||void 0))}function O(t,e){for(var r,n,o,a=t.prev(),s=a,u=0;s.isEven();)s=s.divide(2),u++;t:for(n=0;n<e.length;n++)if(!t.lesser(e[n])&&!(o=i(e[n]).modPow(s,t)).isUnit()&&!o.equals(a)){for(r=u-1;0!=r;r--){if((o=o.square().mod(t)).isUnit())return!1;if(o.equals(a))continue t}return!1}return!0}u.prototype=Object.create(s.prototype),l.prototype=Object.create(s.prototype),p.prototype=Object.create(s.prototype),u.prototype.add=function(t){var e=J(t);if(this.sign!==e.sign)return this.subtract(e.negate());var r=this.value,n=e.value;return e.isSmall?new u(_(r,Math.abs(n)),this.sign):new u(v(r,n),this.sign)},u.prototype.plus=u.prototype.add,l.prototype.add=function(t){var e=J(t),r=this.value;if(r<0!==e.sign)return this.subtract(e.negate());var n=e.value;if(e.isSmall){if(f(r+n))return new l(r+n);n=c(Math.abs(n))}return new u(_(n,Math.abs(r)),r<0)},l.prototype.plus=l.prototype.add,p.prototype.add=function(t){return new p(this.value+J(t).value)},p.prototype.plus=p.prototype.add,u.prototype.subtract=function(t){var e=J(t);if(this.sign!==e.sign)return this.add(e.negate());var r=this.value,n=e.value;return e.isSmall?E(r,Math.abs(n),this.sign):function(t,e,r){var n;return C(t,e)>=0?n=T(t,e):(n=T(e,t),r=!r),"number"==typeof(n=d(n))?(r&&(n=-n),new l(n)):new u(n,r)}(r,n,this.sign)},u.prototype.minus=u.prototype.subtract,l.prototype.subtract=function(t){var e=J(t),r=this.value;if(r<0!==e.sign)return this.add(e.negate());var n=e.value;return e.isSmall?new l(r-n):E(n,Math.abs(r),r>=0)},l.prototype.minus=l.prototype.subtract,p.prototype.subtract=function(t){return new p(this.value-J(t).value)},p.prototype.minus=p.prototype.subtract,u.prototype.negate=function(){return new u(this.value,!this.sign)},l.prototype.negate=function(){var t=this.sign,e=new l(-this.value);return e.sign=!t,e},p.prototype.negate=function(){return new p(-this.value)},u.prototype.abs=function(){return new u(this.value,!1)},l.prototype.abs=function(){return new l(Math.abs(this.value))},p.prototype.abs=function(){return new p(this.value>=0?this.value:-this.value)},u.prototype.multiply=function(t){var r,n,i,o=J(t),a=this.value,l=o.value,p=this.sign!==o.sign;if(o.isSmall){if(0===l)return s[0];if(1===l)return this;if(-1===l)return this.negate();if((r=Math.abs(l))<e)return new u(A(a,r),p);l=c(r)}return new u(-.012*(n=a.length)-.012*(i=l.length)+15e-6*n*i>0?w(a,l):b(a,l),p)},u.prototype.times=u.prototype.multiply,l.prototype._multiplyBySmall=function(t){return f(t.value*this.value)?new l(t.value*this.value):I(Math.abs(t.value),c(Math.abs(this.value)),this.sign!==t.sign)},u.prototype._multiplyBySmall=function(t){return 0===t.value?s[0]:1===t.value?this:-1===t.value?this.negate():I(Math.abs(t.value),this.value,this.sign!==t.sign)},l.prototype.multiply=function(t){return J(t)._multiplyBySmall(this)},l.prototype.times=l.prototype.multiply,p.prototype.multiply=function(t){return new p(this.value*J(t).value)},p.prototype.times=p.prototype.multiply,u.prototype.square=function(){return new u(N(this.value),!1)},l.prototype.square=function(){var t=this.value*this.value;return f(t)?new l(t):new u(N(c(Math.abs(this.value))),!1)},p.prototype.square=function(t){return new p(this.value*this.value)},u.prototype.divmod=function(t){var e=D(this,t);return{quotient:e[0],remainder:e[1]}},p.prototype.divmod=l.prototype.divmod=u.prototype.divmod,u.prototype.divide=function(t){return D(this,t)[0]},p.prototype.over=p.prototype.divide=function(t){return new p(this.value/J(t).value)},l.prototype.over=l.prototype.divide=u.prototype.over=u.prototype.divide,u.prototype.mod=function(t){return D(this,t)[1]},p.prototype.mod=p.prototype.remainder=function(t){return new p(this.value%J(t).value)},l.prototype.remainder=l.prototype.mod=u.prototype.remainder=u.prototype.mod,u.prototype.pow=function(t){var e,r,n,i=J(t),o=this.value,a=i.value;if(0===a)return s[1];if(0===o)return s[0];if(1===o)return s[1];if(-1===o)return i.isEven()?s[1]:s[-1];if(i.sign)return s[0];if(!i.isSmall)throw new Error("The exponent "+i.toString()+" is too large.");if(this.isSmall&&f(e=Math.pow(o,a)))return new l(y(e));for(r=this,n=s[1];!0&a&&(n=n.times(r),--a),0!==a;)a/=2,r=r.square();return n},l.prototype.pow=u.prototype.pow,p.prototype.pow=function(t){var e=J(t),r=this.value,n=e.value,i=BigInt(0),o=BigInt(1),a=BigInt(2);if(n===i)return s[1];if(r===i)return s[0];if(r===o)return s[1];if(r===BigInt(-1))return e.isEven()?s[1]:s[-1];if(e.isNegative())return new p(i);for(var u=this,l=s[1];(n&o)===o&&(l=l.times(u),--n),n!==i;)n/=a,u=u.square();return l},u.prototype.modPow=function(t,e){if(t=J(t),(e=J(e)).isZero())throw new Error("Cannot take modPow with modulus 0");for(var r=s[1],n=this.mod(e);t.isPositive();){if(n.isZero())return s[0];t.isOdd()&&(r=r.multiply(n).mod(e)),t=t.divide(2),n=n.square().mod(e)}return r},p.prototype.modPow=l.prototype.modPow=u.prototype.modPow,u.prototype.compareAbs=function(t){var e=J(t),r=this.value,n=e.value;return e.isSmall?1:C(r,n)},l.prototype.compareAbs=function(t){var e=J(t),r=Math.abs(this.value),n=e.value;return e.isSmall?r===(n=Math.abs(n))?0:r>n?1:-1:-1},p.prototype.compareAbs=function(t){var e=this.value,r=J(t).value;return(e=e>=0?e:-e)===(r=r>=0?r:-r)?0:e>r?1:-1},u.prototype.compare=function(t){if(t===1/0)return-1;if(t===-1/0)return 1;var e=J(t),r=this.value,n=e.value;return this.sign!==e.sign?e.sign?1:-1:e.isSmall?this.sign?-1:1:C(r,n)*(this.sign?-1:1)},u.prototype.compareTo=u.prototype.compare,l.prototype.compare=function(t){if(t===1/0)return-1;if(t===-1/0)return 1;var e=J(t),r=this.value,n=e.value;return e.isSmall?r==n?0:r>n?1:-1:r<0!==e.sign?r<0?-1:1:r<0?1:-1},l.prototype.compareTo=l.prototype.compare,p.prototype.compare=function(t){if(t===1/0)return-1;if(t===-1/0)return 1;var e=this.value,r=J(t).value;return e===r?0:e>r?1:-1},p.prototype.compareTo=p.prototype.compare,u.prototype.equals=function(t){return 0===this.compare(t)},p.prototype.eq=p.prototype.equals=l.prototype.eq=l.prototype.equals=u.prototype.eq=u.prototype.equals,u.prototype.notEquals=function(t){return 0!==this.compare(t)},p.prototype.neq=p.prototype.notEquals=l.prototype.neq=l.prototype.notEquals=u.prototype.neq=u.prototype.notEquals,u.prototype.greater=function(t){return this.compare(t)>0},p.prototype.gt=p.prototype.greater=l.prototype.gt=l.prototype.greater=u.prototype.gt=u.prototype.greater,u.prototype.lesser=function(t){return this.compare(t)<0},p.prototype.lt=p.prototype.lesser=l.prototype.lt=l.prototype.lesser=u.prototype.lt=u.prototype.lesser,u.prototype.greaterOrEquals=function(t){return this.compare(t)>=0},p.prototype.geq=p.prototype.greaterOrEquals=l.prototype.geq=l.prototype.greaterOrEquals=u.prototype.geq=u.prototype.greaterOrEquals,u.prototype.lesserOrEquals=function(t){return this.compare(t)<=0},p.prototype.leq=p.prototype.lesserOrEquals=l.prototype.leq=l.prototype.lesserOrEquals=u.prototype.leq=u.prototype.lesserOrEquals,u.prototype.isEven=function(){return 0==(1&this.value[0])},l.prototype.isEven=function(){return 0==(1&this.value)},p.prototype.isEven=function(){return(this.value&BigInt(1))===BigInt(0)},u.prototype.isOdd=function(){return 1==(1&this.value[0])},l.prototype.isOdd=function(){return 1==(1&this.value)},p.prototype.isOdd=function(){return(this.value&BigInt(1))===BigInt(1)},u.prototype.isPositive=function(){return!this.sign},l.prototype.isPositive=function(){return this.value>0},p.prototype.isPositive=l.prototype.isPositive,u.prototype.isNegative=function(){return this.sign},l.prototype.isNegative=function(){return this.value<0},p.prototype.isNegative=l.prototype.isNegative,u.prototype.isUnit=function(){return!1},l.prototype.isUnit=function(){return 1===Math.abs(this.value)},p.prototype.isUnit=function(){return this.abs().value===BigInt(1)},u.prototype.isZero=function(){return!1},l.prototype.isZero=function(){return 0===this.value},p.prototype.isZero=function(){return this.value===BigInt(0)},u.prototype.isDivisibleBy=function(t){var e=J(t);return!e.isZero()&&(!!e.isUnit()||(0===e.compareAbs(2)?this.isEven():this.mod(e).isZero()))},p.prototype.isDivisibleBy=l.prototype.isDivisibleBy=u.prototype.isDivisibleBy,u.prototype.isPrime=function(e){var r=P(this);if(r!==t)return r;var n=this.abs(),o=n.bitLength();if(o<=64)return O(n,[2,3,5,7,11,13,17,19,23,29,31,37]);for(var a=Math.log(2)*o.toJSNumber(),s=Math.ceil(!0===e?2*Math.pow(a,2):a),u=[],l=0;l<s;l++)u.push(i(l+2));return O(n,u)},p.prototype.isPrime=l.prototype.isPrime=u.prototype.isPrime,u.prototype.isProbablePrime=function(e){var r=P(this);if(r!==t)return r;for(var n=this.abs(),o=e===t?5:e,a=[],s=0;s<o;s++)a.push(i.randBetween(2,n.minus(2)));return O(n,a)},p.prototype.isProbablePrime=l.prototype.isProbablePrime=u.prototype.isProbablePrime,u.prototype.modInv=function(t){for(var e,r,n,o=i.zero,a=i.one,s=J(t),u=this.abs();!u.isZero();)e=s.divide(u),r=o,n=s,o=a,s=u,a=r.subtract(e.multiply(a)),u=n.subtract(e.multiply(u));if(!s.isUnit())throw new Error(this.toString()+" and "+t.toString()+" are not co-prime");return-1===o.compare(0)&&(o=o.add(t)),this.isNegative()?o.negate():o},p.prototype.modInv=l.prototype.modInv=u.prototype.modInv,u.prototype.next=function(){var t=this.value;return this.sign?E(t,1,this.sign):new u(_(t,1),this.sign)},l.prototype.next=function(){var t=this.value;return t+1<r?new l(t+1):new u(n,!1)},p.prototype.next=function(){return new p(this.value+BigInt(1))},u.prototype.prev=function(){var t=this.value;return this.sign?new u(_(t,1),!0):E(t,1,this.sign)},l.prototype.prev=function(){var t=this.value;return t-1>-r?new l(t-1):new u(n,!0)},p.prototype.prev=function(){return new p(this.value-BigInt(1))};for(var B=[1];2*B[B.length-1]<=e;)B.push(2*B[B.length-1]);var x=B.length,F=B[x-1];function R(t){return Math.abs(t)<=e}function L(t,e,r){e=J(e);for(var n=t.isNegative(),o=e.isNegative(),a=n?t.not():t,s=o?e.not():e,u=0,l=0,p=null,f=null,c=[];!a.isZero()||!s.isZero();)u=(p=D(a,F))[1].toJSNumber(),n&&(u=F-1-u),l=(f=D(s,F))[1].toJSNumber(),o&&(l=F-1-l),a=p[0],s=f[0],c.push(r(u,l));for(var d=0!==r(n?1:0,o?1:0)?i(-1):i(0),h=c.length-1;h>=0;h-=1)d=d.multiply(F).add(i(c[h]));return d}u.prototype.shiftLeft=function(t){var e=J(t).toJSNumber();if(!R(e))throw new Error(String(e)+" is too large for shifting.");if(e<0)return this.shiftRight(-e);var r=this;if(r.isZero())return r;for(;e>=x;)r=r.multiply(F),e-=x-1;return r.multiply(B[e])},p.prototype.shiftLeft=l.prototype.shiftLeft=u.prototype.shiftLeft,u.prototype.shiftRight=function(t){var e,r=J(t).toJSNumber();if(!R(r))throw new Error(String(r)+" is too large for shifting.");if(r<0)return this.shiftLeft(-r);for(var n=this;r>=x;){if(n.isZero()||n.isNegative()&&n.isUnit())return n;n=(e=D(n,F))[1].isNegative()?e[0].prev():e[0],r-=x-1}return(e=D(n,B[r]))[1].isNegative()?e[0].prev():e[0]},p.prototype.shiftRight=l.prototype.shiftRight=u.prototype.shiftRight,u.prototype.not=function(){return this.negate().prev()},p.prototype.not=l.prototype.not=u.prototype.not,u.prototype.and=function(t){return L(this,t,(function(t,e){return t&e}))},p.prototype.and=l.prototype.and=u.prototype.and,u.prototype.or=function(t){return L(this,t,(function(t,e){return t|e}))},p.prototype.or=l.prototype.or=u.prototype.or,u.prototype.xor=function(t){return L(this,t,(function(t,e){return t^e}))},p.prototype.xor=l.prototype.xor=u.prototype.xor;var q=1<<30;function U(t){var r=t.value,n="number"==typeof r?r|q:"bigint"==typeof r?r|BigInt(q):r[0]+r[1]*e|1073758208;return n&-n}function G(t,e){if(e.compareTo(t)<=0){var r=G(t,e.square(e)),n=r.p,o=r.e,a=n.multiply(e);return a.compareTo(t)<=0?{p:a,e:2*o+1}:{p:n,e:2*o}}return{p:i(1),e:0}}function k(t,e){return t=J(t),e=J(e),t.greater(e)?t:e}function j(t,e){return t=J(t),e=J(e),t.lesser(e)?t:e}function Y(t,e){if(t=J(t).abs(),e=J(e).abs(),t.equals(e))return t;if(t.isZero())return e;if(e.isZero())return t;for(var r,n,i=s[1];t.isEven()&&e.isEven();)r=j(U(t),U(e)),t=t.divide(r),e=e.divide(r),i=i.multiply(r);for(;t.isEven();)t=t.divide(U(t));do{for(;e.isEven();)e=e.divide(U(e));t.greater(e)&&(n=e,e=t,t=n),e=e.subtract(t)}while(!e.isZero());return i.isUnit()?t:t.multiply(i)}u.prototype.bitLength=function(){var t=this;return t.compareTo(i(0))<0&&(t=t.negate().subtract(i(1))),0===t.compareTo(i(0))?i(0):i(G(t,i(2)).e).add(i(1))},p.prototype.bitLength=l.prototype.bitLength=u.prototype.bitLength;var H=function(t,e,r,n){r=r||o,t=String(t),n||(t=t.toLowerCase(),r=r.toLowerCase());var i,a=t.length,s=Math.abs(e),u={};for(i=0;i<r.length;i++)u[r[i]]=i;for(i=0;i<a;i++)if("-"!==(f=t[i])&&f in u&&u[f]>=s){if("1"===f&&1===s)continue;throw new Error(f+" is not a valid digit in base "+e+".")}e=J(e);var l=[],p="-"===t[0];for(i=p?1:0;i<t.length;i++){var f;if((f=t[i])in u)l.push(J(u[f]));else{if("<"!==f)throw new Error(f+" is not a valid character");var c=i;do{i++}while(">"!==t[i]&&i<t.length);l.push(J(t.slice(c+1,i)))}}return V(l,e,p)};function V(t,e,r){var n,i=s[0],o=s[1];for(n=t.length-1;n>=0;n--)i=i.add(t[n].times(o)),o=o.times(e);return r?i.negate():i}function K(t,e){if((e=i(e)).isZero()){if(t.isZero())return{value:[0],isNegative:!1};throw new Error("Cannot convert nonzero numbers to base 0.")}if(e.equals(-1)){if(t.isZero())return{value:[0],isNegative:!1};if(t.isNegative())return{value:[].concat.apply([],Array.apply(null,Array(-t.toJSNumber())).map(Array.prototype.valueOf,[1,0])),isNegative:!1};var r=Array.apply(null,Array(t.toJSNumber()-1)).map(Array.prototype.valueOf,[0,1]);return r.unshift([1]),{value:[].concat.apply([],r),isNegative:!1}}var n=!1;if(t.isNegative()&&e.isPositive()&&(n=!0,t=t.abs()),e.isUnit())return t.isZero()?{value:[0],isNegative:!1}:{value:Array.apply(null,Array(t.toJSNumber())).map(Number.prototype.valueOf,1),isNegative:n};for(var o,a=[],s=t;s.isNegative()||s.compareAbs(e)>=0;){o=s.divmod(e),s=o.quotient;var u=o.remainder;u.isNegative()&&(u=e.minus(u).abs(),s=s.next()),a.push(u.toJSNumber())}return a.push(s.toJSNumber()),{value:a.reverse(),isNegative:n}}function z(t,e,r){var n=K(t,e);return(n.isNegative?"-":"")+n.value.map((function(t){return function(t,e){return t<(e=e||o).length?e[t]:"<"+t+">"}(t,r)})).join("")}function Z(t){if(f(+t)){var e=+t;if(e===y(e))return a?new p(BigInt(e)):new l(e);throw new Error("Invalid integer: "+t)}var r="-"===t[0];r&&(t=t.slice(1));var n=t.split(/e/i);if(n.length>2)throw new Error("Invalid integer: "+n.join("e"));if(2===n.length){var i=n[1];if("+"===i[0]&&(i=i.slice(1)),(i=+i)!==y(i)||!f(i))throw new Error("Invalid integer: "+i+" is not a valid exponent.");var o=n[0],s=o.indexOf(".");if(s>=0&&(i-=o.length-s-1,o=o.slice(0,s)+o.slice(s+1)),i<0)throw new Error("Cannot include negative exponent part for integers");t=o+=new Array(i+1).join("0")}if(!/^([0-9][0-9]*)$/.test(t))throw new Error("Invalid integer: "+t);if(a)return new p(BigInt(r?"-"+t:t));for(var c=[],d=t.length,m=d-7;d>0;)c.push(+t.slice(m,d)),(m-=7)<0&&(m=0),d-=7;return h(c),new u(c,r)}function J(t){return"number"==typeof t?function(t){if(a)return new p(BigInt(t));if(f(t)){if(t!==y(t))throw new Error(t+" is not an integer.");return new l(t)}return Z(t.toString())}(t):"string"==typeof t?Z(t):"bigint"==typeof t?new p(t):t}u.prototype.toArray=function(t){return K(this,t)},l.prototype.toArray=function(t){return K(this,t)},p.prototype.toArray=function(t){return K(this,t)},u.prototype.toString=function(e,r){if(e===t&&(e=10),10!==e)return z(this,e,r);for(var n,i=this.value,o=i.length,a=String(i[--o]);--o>=0;)n=String(i[o]),a+="0000000".slice(n.length)+n;return(this.sign?"-":"")+a},l.prototype.toString=function(e,r){return e===t&&(e=10),10!=e?z(this,e,r):String(this.value)},p.prototype.toString=l.prototype.toString,p.prototype.toJSON=u.prototype.toJSON=l.prototype.toJSON=function(){return this.toString()},u.prototype.valueOf=function(){return parseInt(this.toString(),10)},u.prototype.toJSNumber=u.prototype.valueOf,l.prototype.valueOf=function(){return this.value},l.prototype.toJSNumber=l.prototype.valueOf,p.prototype.valueOf=p.prototype.toJSNumber=function(){return parseInt(this.toString(),10)};for(var W=0;W<1e3;W++)s[W]=J(W),W>0&&(s[-W]=J(-W));return s.one=s[1],s.zero=s[0],s.minusOne=s[-1],s.max=k,s.min=j,s.gcd=Y,s.lcm=function(t,e){return t=J(t).abs(),e=J(e).abs(),t.divide(Y(t,e)).multiply(e)},s.isInstance=function(t){return t instanceof u||t instanceof l||t instanceof p},s.randBetween=function(t,r){var n=j(t=J(t),r=J(r)),i=k(t,r).subtract(n).add(1);if(i.isSmall)return n.add(Math.floor(Math.random()*i));for(var o=K(i,e).value,a=[],u=!0,l=0;l<o.length;l++){var p=u?o[l]:e,f=y(Math.random()*p);a.push(f),f<p&&(u=!1)}return n.add(s.fromArray(a,e,!1))},s.fromArray=function(t,e,r){return V(t.map(J),J(e||10),r)},s}();t.hasOwnProperty("exports")&&(t.exports=i),void 0===(n=function(){return i}.apply(e,[]))||(t.exports=n)}},e={};function r(n){var i=e[n];if(void 0!==i)return i.exports;var o=e[n]={id:n,loaded:!1,exports:{}};return t[n](o,o.exports,r),o.loaded=!0,o.exports}r.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return r.d(e,{a:e}),e},r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.nmd=t=>(t.paths=[],t.children||(t.children=[]),t);var n={};return(()=>{"use strict";r.d(n,{default:()=>j});const t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.streamId=null,this.mediaInfo=null,this.segmentType=null,this.quality=NaN,this.index=NaN,this.bytes=null,this.start=NaN,this.end=NaN,this.duration=NaN,this.representationId=null,this.endFragment=null};var e=function t(){(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")})(this,t),this.tcpid=null,this.type=null,this.url=null,this.actualurl=null,this.range=null,this.trequest=null,this.tresponse=null,this.responsecode=null,this.interval=null,this.trace=[],this.cmsd=null,this._stream=null,this._tfinish=null,this._mediaduration=null,this._quality=null,this._responseHeaders=null,this._serviceLocation=null,this._fileLoaderType=null};function i(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}e.GET="GET",e.HEAD="HEAD",e.MPD_TYPE="MPD",e.XLINK_EXPANSION_TYPE="XLinkExpansion",e.INIT_SEGMENT_TYPE="InitializationSegment",e.INDEX_SEGMENT_TYPE="IndexSegment",e.MEDIA_SEGMENT_TYPE="MediaSegment",e.BITSTREAM_SWITCHING_SEGMENT_TYPE="BitstreamSwitchingSegment",e.MSS_FRAGMENT_INFO_SEGMENT_TYPE="FragmentInfoSegment",e.DVB_REPORTING_TYPE="DVBReporting",e.LICENSE="license",e.CONTENT_STEERING_TYPE="ContentSteering",e.OTHER_TYPE="other";var o=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.action=t.ACTION_DOWNLOAD,this.startTime=NaN,this.mediaStartTime=NaN,this.mediaType=null,this.mediaInfo=null,this.type=null,this.duration=NaN,this.timescale=NaN,this.range=null,this.url=e||null,this.serviceLocation=null,this.requestStartDate=null,this.firstByteDate=null,this.requestEndDate=null,this.quality=NaN,this.index=NaN,this.availabilityStartTime=null,this.availabilityEndTime=null,this.wallStartTime=null,this.bytesLoaded=NaN,this.bytesTotal=NaN,this.delayLoadingTime=NaN,this.responseType="arraybuffer",this.representationId=null}var r,n;return r=t,(n=[{key:"isInitializationRequest",value:function(){return this.type&&this.type===e.INIT_SEGMENT_TYPE}},{key:"setInfo",value:function(t){this.type=t&&t.init?e.INIT_SEGMENT_TYPE:e.MEDIA_SEGMENT_TYPE,this.url=t&&t.url?t.url:null,this.range=t&&t.range?t.range.start+"-"+t.range.end:null,this.mediaType=t&&t.mediaType?t.mediaType:null}}])&&i(r.prototype,n),t}();o.ACTION_DOWNLOAD="download",o.ACTION_COMPLETE="complete";const a=o;function s(t){var r,n,i,o,s,u,l,p,f,c=(t=t||{}).streamProcessor,d=t.baseURLController,h=t.debug;function m(){o&&(n.debug("Stop"),clearTimeout(u),o=!1,l=null,p=null)}function y(){if(o){var t=c.getRepresentationController().getCurrentRepresentation(),r=t.adaptation.period.mpd.manifest.Period_asArray[t.adaptation.period.index].AdaptationSet_asArray[t.adaptation.index],n=r.SegmentTemplate.SegmentTimeline.S_asArray,i=function(t,r,n){var i=t.SegmentTemplate.timescale,o=new a;return o.mediaType=s,o.type=e.MSS_FRAGMENT_INFO_SEGMENT_TYPE,o.startTime=n.t/i,o.duration=n.d/i,o.timescale=i,o.quality=r.index,o.index=f++,o.mediaInfo=c.getMediaInfo(),o.adaptationIndex=r.adaptation.index,o.representationId=r.id,o.url=d.resolve(r.path).url+t.SegmentTemplate.media,o.url=o.url.replace("$Bandwidth$",r.bandwidth),o.url=o.url.replace("$Time$",n.tManifest?n.tManifest:n.t),o.url=o.url.replace("/Fragments(","/FragmentInfo("),o}(r,t,n[n.length-1]);g.call(this,i)}}function g(t){if(c.getFragmentModel().isFragmentLoadedOrPending(t))return n.debug("End of timeline"),void m();i.executeRequest(t)}return r={initialize:function(){s=c.getType(),i=c.getFragmentModel(),o=!1,l=null,p=null},controllerType:"MssFragmentInfoController",start:function(){o||(n.debug("Start"),o=!0,f=0,y())},fragmentInfoLoaded:function(t){if(o){var e,r,i,a=t.request;t.response?(null===l&&(l=(new Date).getTime()),p||(p=a.startTime),r=((new Date).getTime()-l)/1e3,e=a.startTime+a.duration-p,i=Math.max(0,e-r),clearTimeout(u),u=setTimeout((function(){u=null,y()}),1e3*i)):n.error("Load error",a.url)}},getType:function(){return s},reset:function(){m()}},n=h.getLogger(r),r}s.__dashjs_factory_name="MssFragmentInfoController";const u=dashjs.FactoryMaker.getClassFactory(s),l=function t(e,r,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.code=e||null,this.message=r||null,this.data=n||null};function p(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function f(t){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},f(t)}function c(t,e){return c=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},c(t,e)}function d(t,e){return!e||"object"!==f(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function h(t){return h=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},h(t)}const m=new(function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&c(t,e)}(i,t);var e,r,n=(e=i,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,n=h(e);if(r){var i=h(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return d(this,t)});function i(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(t=n.call(this)).MSS_NO_TFRF_CODE=200,t.MSS_UNSUPPORTED_CODEC_CODE=201,t.MSS_NO_TFRF_MESSAGE="Missing tfrf in live media segment",t.MSS_UNSUPPORTED_CODEC_MESSAGE="Unsupported codec",t}return i}(function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r;return e=t,(r=[{key:"extend",value:function(t,e){if(t){var r=!!e&&e.override,n=!!e&&e.publicOnly;for(var i in t)!t.hasOwnProperty(i)||this[i]&&!r||n&&-1===t[i].indexOf("public_")||(this[i]=t[i])}}}])&&p(e.prototype,r),t}()));function y(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function g(t){return g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},g(t)}function v(t,e){return v=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},v(t,e)}function _(t,e){return!e||"object"!==g(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function T(t){return T=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},T(t)}const E=new(function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&v(t,e)}(i,t);var e,r,n=(e=i,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,n=T(e);if(r){var i=T(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return _(this,t)});function i(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(t=n.call(this)).AST_IN_FUTURE="astInFuture",t.BUFFER_EMPTY="bufferStalled",t.BUFFER_LOADED="bufferLoaded",t.BUFFER_LEVEL_STATE_CHANGED="bufferStateChanged",t.BUFFER_LEVEL_UPDATED="bufferLevelUpdated",t.DYNAMIC_TO_STATIC="dynamicToStatic",t.ERROR="error",t.FRAGMENT_LOADING_COMPLETED="fragmentLoadingCompleted",t.FRAGMENT_LOADING_PROGRESS="fragmentLoadingProgress",t.FRAGMENT_LOADING_STARTED="fragmentLoadingStarted",t.FRAGMENT_LOADING_ABANDONED="fragmentLoadingAbandoned",t.LOG="log",t.MANIFEST_LOADED="manifestLoaded",t.METRICS_CHANGED="metricsChanged",t.METRIC_CHANGED="metricChanged",t.METRIC_ADDED="metricAdded",t.METRIC_UPDATED="metricUpdated",t.PERIOD_SWITCH_STARTED="periodSwitchStarted",t.PERIOD_SWITCH_COMPLETED="periodSwitchCompleted",t.QUALITY_CHANGE_REQUESTED="qualityChangeRequested",t.QUALITY_CHANGE_RENDERED="qualityChangeRendered",t.TRACK_CHANGE_RENDERED="trackChangeRendered",t.STREAM_INITIALIZING="streamInitializing",t.STREAM_UPDATED="streamUpdated",t.STREAM_ACTIVATED="streamActivated",t.STREAM_DEACTIVATED="streamDeactivated",t.STREAM_INITIALIZED="streamInitialized",t.STREAM_TEARDOWN_COMPLETE="streamTeardownComplete",t.TEXT_TRACKS_ADDED="allTextTracksAdded",t.TEXT_TRACK_ADDED="textTrackAdded",t.TTML_PARSED="ttmlParsed",t.TTML_TO_PARSE="ttmlToParse",t.CAPTION_RENDERED="captionRendered",t.CAPTION_CONTAINER_RESIZE="captionContainerResize",t.CAN_PLAY="canPlay",t.CAN_PLAY_THROUGH="canPlayThrough",t.PLAYBACK_ENDED="playbackEnded",t.PLAYBACK_ERROR="playbackError",t.PLAYBACK_NOT_ALLOWED="playbackNotAllowed",t.PLAYBACK_METADATA_LOADED="playbackMetaDataLoaded",t.PLAYBACK_LOADED_DATA="playbackLoadedData",t.PLAYBACK_PAUSED="playbackPaused",t.PLAYBACK_PLAYING="playbackPlaying",t.PLAYBACK_PROGRESS="playbackProgress",t.PLAYBACK_RATE_CHANGED="playbackRateChanged",t.PLAYBACK_SEEKED="playbackSeeked",t.PLAYBACK_SEEKING="playbackSeeking",t.PLAYBACK_STALLED="playbackStalled",t.PLAYBACK_STARTED="playbackStarted",t.PLAYBACK_TIME_UPDATED="playbackTimeUpdated",t.PLAYBACK_VOLUME_CHANGED="playbackVolumeChanged",t.PLAYBACK_WAITING="playbackWaiting",t.MANIFEST_VALIDITY_CHANGED="manifestValidityChanged",t.EVENT_MODE_ON_START="eventModeOnStart",t.EVENT_MODE_ON_RECEIVE="eventModeOnReceive",t.CONFORMANCE_VIOLATION="conformanceViolation",t.REPRESENTATION_SWITCH="representationSwitch",t.ADAPTATION_SET_REMOVED_NO_CAPABILITIES="adaptationSetRemovedNoCapabilities",t.CONTENT_STEERING_REQUEST_COMPLETED="contentSteeringRequestCompleted",t}return i}(function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r;return e=t,(r=[{key:"extend",value:function(t,e){if(t){var r=!!e&&e.override,n=!!e&&e.publicOnly;for(var i in t)!t.hasOwnProperty(i)||this[i]&&!r||n&&-1===t[i].indexOf("public_")||(this[i]=t[i])}}}])&&y(e.prototype,r),t}()));function b(t){var e,r,n,i=(t=t||{}).dashMetrics,o=t.playbackController,a=t.errHandler,s=t.eventBus,u=t.ISOBoxer,p=t.debug;function f(t,e,i,u){var p=u.getRepresentationController().getCurrentRepresentation(),f=p.adaptation.period.mpd.manifest,d=f.Period_asArray[p.adaptation.period.index].AdaptationSet_asArray[p.adaptation.index],h=d.SegmentTemplate.timescale;if(r=u.getType(),"dynamic"===f.type||f.timeShiftBufferDepth)if(e){var y,g,v,_,T=d.SegmentTemplate.SegmentTimeline.S,b=e.entry,A=null,S=null;if(0!==b.length&&(y=b[0],!("static"===f.type&&(g=T[0].tManifest?parseFloat(T[0].tManifest):T[0].t,y.fragment_absolute_time>g+f.timeShiftBufferDepth*h)))){if(g=T[T.length-1].tManifest?parseFloat(T[T.length-1].tManifest):T[T.length-1].t,y.fragment_absolute_time<=g)return v={start:T[0].t/h,end:i.baseMediaDecodeTime/h+t.duration},void c(t.mediaType,v,u.getStreamInfo().manifestInfo);(A={}).t=y.fragment_absolute_time,A.d=y.fragment_duration,T[0].tManifest&&(A.t-=parseFloat(T[0].tManifest)-T[0].t,A.tManifest=y.fragment_absolute_time);var w=T[T.length-1];if(w.t+w.d!==A.t&&(n.debug("Patch segment duration - t = ",w.t+", d = "+w.d+" => "+(A.t-w.t)),w.d=A.t-w.t),T.push(A),"static"!==f.type){if(f.timeShiftBufferDepth&&f.timeShiftBufferDepth>0)for(S=((A=T[T.length-1]).t-f.timeShiftBufferDepth*h)/h,_=((A=T[0]).t+A.d)/h;_<S&&(o.isPaused()||!(o.getTime()<_));)T.splice(0,1),_=((A=T[0]).t+A.d)/h;v={start:T[0].t/h,end:i.baseMediaDecodeTime/h+t.duration},c(r,v,u.getStreamInfo().manifestInfo)}else"video"===r&&(_=((A=T[T.length-1]).t+A.d)/h)>p.adaptation.period.duration&&s.trigger(E.MANIFEST_VALIDITY_CHANGED,{sender:this,newDuration:_})}}else a.error(new l(m.MSS_NO_TFRF_CODE,m.MSS_NO_TFRF_MESSAGE))}function c(t,e,r){if("video"===t||"audio"===t){var a=i.getCurrentDVRInfo(t);(!a||e.end>a.range.end)&&(n.debug("Update DVR range: ["+e.start+" - "+e.end+"]"),i.addDVRInfo(t,o.getTime(),r,e),o.updateCurrentTime(t))}}function d(t,e){var r=8,n=0;for(n=0;n<t.boxes.length;n++){if(t.boxes[n].type===e)return r;r+=t.boxes[n].size}return r}return e={convertFragment:function(t,e){var r,n=u.parseBuffer(t.response),i=n.fetch("tfhd");i.track_ID=t.request.mediaInfo.index+1;var o=n.fetch("tfdt"),a=n.fetch("traf");null===o&&((o=u.createFullBox("tfdt",a,i)).version=1,o.flags=0,o.baseMediaDecodeTime=Math.floor(t.request.startTime*t.request.timescale));var s=n.fetch("trun"),l=n.fetch("tfxd");l&&(l._parent.boxes.splice(l._parent.boxes.indexOf(l),1),l=null);var p=n.fetch("tfrf");f(t.request,p,o,e),p&&(p._parent.boxes.splice(p._parent.boxes.indexOf(p),1),p=null);var c=n.fetch("sepiff");if(null!==c){c.type="senc",c.usertype=void 0;var h=n.fetch("saio");if(null===h){(h=u.createFullBox("saio",a)).version=0,h.flags=0,h.entry_count=1,h.offset=[0];var m=u.createFullBox("saiz",a);if(m.version=0,m.flags=0,m.sample_count=c.sample_count,m.default_sample_info_size=0,m.sample_info_size=[],2&c.flags)for(r=0;r<c.sample_count;r+=1)m.sample_info_size[r]=10+6*c.entry[r].NumberOfEntries;else m.default_sample_info_size=8}}i.flags&=16777214,i.flags|=131072,s.flags|=1;var y=n.fetch("moof"),g=y.getLength();s.data_offset=g+8;var v=n.fetch("saio");if(null!==v){var _=d(y,"traf"),T=d(a,"senc");v.offset[0]=_+T+16}t.response=n.write()},updateSegmentList:function(t,e){if(!t.response)throw new Error("e.response parameter is missing");var r=u.parseBuffer(t.response),n=r.fetch("tfhd");n.track_ID=t.request.mediaInfo.index+1;var i=r.fetch("tfdt"),o=r.fetch("traf");null===i&&((i=u.createFullBox("tfdt",o,n)).version=1,i.flags=0,i.baseMediaDecodeTime=Math.floor(t.request.startTime*t.request.timescale));var a=r.fetch("tfrf");f(t.request,a,i,e),a&&(a._parent.boxes.splice(a._parent.boxes.indexOf(a),1),a=null)},getType:function(){return r}},n=p.getLogger(e),r="",e}b.__dashjs_factory_name="MssFragmentMoofProcessor";const A=dashjs.FactoryMaker.getClassFactory(b);function S(t){var e,r,n,i,o,a,s=(t=t||{}).constants,u=t.ISOBoxer,l=t.protectionController;function p(t,e){u.createBox("frma",t).data_format=function(t){var e,r=0;for(e=0;e<t.length;e+=1)r|=t.charCodeAt(e)<<8*(t.length-e-1);return r}(e)}function f(t){var e=u.createFullBox("schm",t);e.flags=0,e.version=0,e.scheme_type=1667591779,e.scheme_version=65536}function c(t){var e,r;e=u.createBox("schi",t),(r=u.createFullBox("tenc",e)).flags=0,r.version=0,r.default_IsEncrypted=1,r.default_IV_size=8,r.default_KID=i&&i.length>0&&i[0]["cenc:default_KID"]?i[0]["cenc:default_KID"]:[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}function d(t){var e,r=new Uint8Array(t.length/2);for(e=0;e<t.length/2;e+=1)r[e]=parseInt(""+t[2*e]+t[2*e+1],16);return r}return{generateMoov:function(t){var h;if(t&&t.adaptation)return r=(n=t).adaptation,e=r.period,a=r.index+1,i=e.mpd.manifest.Period_asArray[e.index].AdaptationSet_asArray[r.index].ContentProtection,o=e.mpd.manifest.Period_asArray[e.index].AdaptationSet_asArray[r.index].SegmentTemplate.timescale,function(t){var e=u.createBox("ftyp",t);e.major_brand="iso6",e.minor_version=1,e.compatible_brands=[],e.compatible_brands[0]="isom",e.compatible_brands[1]="iso6",e.compatible_brands[2]="msdh"}(h=u.createFile()),function(t){var h=u.createBox("moov",t);!function(t){var r=u.createFullBox("mvhd",t);r.version=1,r.creation_time=0,r.modification_time=0,r.timescale=o,r.duration=e.duration===1/0?0x10000000000000000:Math.round(e.duration*o),r.rate=1,r.volume=1,r.reserved1=0,r.reserved2=[0,0],r.matrix=[1,0,0,0,1,0,0,0,16384],r.pre_defined=[0,0,0,0,0,0],r.next_track_ID=a+1}(h);var y=u.createBox("trak",h);!function(t){var r=u.createFullBox("tkhd",t);r.version=1,r.flags=7,r.creation_time=0,r.modification_time=0,r.track_ID=a,r.reserved1=0,r.duration=e.duration===1/0?0x10000000000000000:Math.round(e.duration*o),r.reserved2=[0,0],r.layer=0,r.alternate_group=0,r.volume=1,r.reserved3=0,r.matrix=[1,0,0,0,1,0,0,0,16384],r.width=n.width,r.height=n.height}(y);var g=u.createBox("mdia",y);!function(t){var n=u.createFullBox("mdhd",t);n.version=1,n.creation_time=0,n.modification_time=0,n.timescale=o,n.duration=e.duration===1/0?0x10000000000000000:Math.round(e.duration*o),n.language=r.lang||"und",n.pre_defined=0}(g),function(t){var e=u.createFullBox("hdlr",t);switch(e.pre_defined=0,r.type){case s.VIDEO:e.handler_type="vide";break;case s.AUDIO:e.handler_type="soun";break;default:e.handler_type="meta"}e.name=n.id,e.reserved=[0,0,0]}(g);var v=u.createBox("minf",g);switch(r.type){case s.VIDEO:!function(t){var e=u.createFullBox("vmhd",t);e.flags=1,e.graphicsmode=0,e.opcolor=[0,0,0]}(v);break;case s.AUDIO:!function(t){var e=u.createFullBox("smhd",t);e.flags=1,e.balance=0,e.reserved=0}(v)}!function(t){var e=u.createFullBox("dref",t);e.entry_count=1,e.entries=[];var r=u.createFullBox("url ",e,!1);r.location="",r.flags=1,e.entries.push(r)}(u.createBox("dinf",v));var _=u.createBox("stbl",v);u.createFullBox("stts",_)._data=[0,0,0,0,0,0,0,0],u.createFullBox("stsc",_)._data=[0,0,0,0,0,0,0,0],u.createFullBox("stco",_)._data=[0,0,0,0,0,0,0,0],u.createFullBox("stsz",_)._data=[0,0,0,0,0,0,0,0,0,0,0,0],function(t){var e=u.createFullBox("stsd",t);switch(e.entries=[],r.type){case s.VIDEO:case s.AUDIO:e.entries.push(function(t){var e=n.codecs.substring(0,n.codecs.indexOf("."));switch(e){case"avc1":return function(t,e){var r;if((r=i?u.createBox("encv",t,!1):u.createBox("avc1",t,!1)).reserved1=[0,0,0,0,0,0],r.data_reference_index=1,r.pre_defined1=0,r.reserved2=0,r.pre_defined2=[0,0,0],r.height=n.height,r.width=n.width,r.horizresolution=72,r.vertresolution=72,r.reserved3=0,r.frame_count=1,r.compressorname=[10,65,86,67,32,67,111,100,105,110,103,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],r.depth=24,r.pre_defined3=65535,r.config=function(){for(var t,e=null,r=15,i=[],o=[],a=0,s=0,u=0,l=n.codecPrivateData.split("00000001").slice(1),p=0;p<l.length;p++)switch(31&(t=d(l[p]))[0]){case 7:i.push(t),r+=t.length+2;break;case 8:o.push(t),r+=t.length+2}i.length>0&&(a=i[0][1],u=i[0][2],s=i[0][3]);var f=0;(e=new Uint8Array(r))[f++]=(4278190080&r)>>24,e[f++]=(16711680&r)>>16,e[f++]=(65280&r)>>8,e[f++]=255&r,e.set([97,118,99,67],f),f+=4,e[f++]=1,e[f++]=a,e[f++]=u,e[f++]=s,e[f++]=255,e[f++]=224|i.length;for(var c=0;c<i.length;c++)e[f++]=(65280&i[c].length)>>8,e[f++]=255&i[c].length,e.set(i[c],f),f+=i[c].length;e[f++]=o.length;for(var h=0;h<o.length;h++)e[f++]=(65280&o[h].length)>>8,e[f++]=255&o[h].length,e.set(o[h],f),f+=o[h].length;return e}(),i){var o=u.createBox("sinf",r);p(o,e),f(o),c(o)}return r}(t,e);case"mp4a":return function(t,e){var r,o,s,l,h;if((r=i?u.createBox("enca",t,!1):u.createBox("mp4a",t,!1)).reserved1=[0,0,0,0,0,0],r.data_reference_index=1,r.reserved2=[0,0],r.channelcount=n.audioChannels,r.samplesize=16,r.pre_defined=0,r.reserved_3=0,r.samplerate=n.audioSamplingRate<<16,r.esds=(s=34+(o=d(n.codecPrivateData)).length,h=0,(l=new Uint8Array(s))[h++]=(4278190080&s)>>24,l[h++]=(16711680&s)>>16,l[h++]=(65280&s)>>8,l[h++]=255&s,l.set([101,115,100,115],h),h+=4,l.set([0,0,0,0],h),h+=4,l[h++]=3,l[h++]=20+o.length,l[h++]=(65280&a)>>8,l[h++]=255&a,l[h++]=0,l[h++]=4,l[h++]=15+o.length,l[h++]=64,l[h]=20,l[h]|=0,l[h++]|=1,l[h++]=255,l[h++]=255,l[h++]=255,l[h++]=(4278190080&n.bandwidth)>>24,l[h++]=(16711680&n.bandwidth)>>16,l[h++]=(65280&n.bandwidth)>>8,l[h++]=255&n.bandwidth,l[h++]=(4278190080&n.bandwidth)>>24,l[h++]=(16711680&n.bandwidth)>>16,l[h++]=(65280&n.bandwidth)>>8,l[h++]=255&n.bandwidth,l[h++]=5,l[h++]=o.length,l.set(o,h),l),i){var m=u.createBox("sinf",r);p(m,e),f(m),c(m)}return r}(t,e);default:throw{code:m.MSS_UNSUPPORTED_CODEC_CODE,message:m.MSS_UNSUPPORTED_CODEC_MESSAGE,data:{codec:e}}}}(e))}e.entry_count=e.entries.length}(_),function(t){var e=u.createFullBox("trex",t);e.track_ID=a,e.default_sample_description_index=1,e.default_sample_duration=0,e.default_sample_size=0,e.default_sample_flags=0}(u.createBox("mvex",h)),i&&l&&function(t,e){var r,n,i;for(i=0;i<e.length;i+=1)(r=e[i].initData)&&(n=u.parseBuffer(r).fetch("pssh"))&&u.Utils.appendBox(t,n)}(h,l.getSupportedKeySystemsFromContentProtection(i))}(h),h.write()}}}S.__dashjs_factory_name="MssFragmentMoovProcessor";const w=dashjs.FactoryMaker.getClassFactory(S);function I(t,e){return t.length===e.length&&t.every((function(t,r){return t===e[r]}))}function N(){this._procFullBox(),1&this.flags&&(this._procField("aux_info_type","uint",32),this._procField("aux_info_type_parameter","uint",32)),this._procField("entry_count","uint",32),this._procFieldArray("offset",this.entry_count,"uint",1===this.version?64:32)}function M(){this._procFullBox(),1&this.flags&&(this._procField("aux_info_type","uint",32),this._procField("aux_info_type_parameter","uint",32)),this._procField("default_sample_info_size","uint",8),this._procField("sample_count","uint",32),0===this.default_sample_info_size&&this._procFieldArray("sample_info_size",this.sample_count,"uint",8)}function D(){this._procFullBox(),this._procField("sample_count","uint",32),1&this.flags&&this._procField("IV_size","uint",8),this._procEntries("entry",this.sample_count,(function(t){this._procEntryField(t,"InitializationVector","data",8),2&this.flags&&(this._procEntryField(t,"NumberOfEntries","uint",16),this._procSubEntries(t,"clearAndCryptedData",t.NumberOfEntries,(function(t){this._procEntryField(t,"BytesOfClearData","uint",16),this._procEntryField(t,"BytesOfEncryptedData","uint",32)})))}))}function C(){I(this.usertype,[109,29,155,5,66,213,68,230,128,226,20,29,175,247,87,178])&&(this._procFullBox(),this._parsing&&(this.type="tfxd"),this._procField("fragment_absolute_time","uint",1===this.version?64:32),this._procField("fragment_duration","uint",1===this.version?64:32)),I(this.usertype,[212,128,126,242,202,57,70,149,142,84,38,203,158,70,167,159])&&(this._procFullBox(),this._parsing&&(this.type="tfrf"),this._procField("fragment_count","uint",8),this._procEntries("entry",this.fragment_count,(function(t){this._procEntryField(t,"fragment_absolute_time","uint",1===this.version?64:32),this._procEntryField(t,"fragment_duration","uint",1===this.version?64:32)}))),I(this.usertype,[162,57,79,82,90,155,79,20,162,68,108,66,124,100,141,244])&&(this._parsing&&(this.type="sepiff"),D.call(this))}function P(t){t=t||{};var r,n,i,o=this.context,a=t.dashMetrics,s=t.playbackController,u=t.eventBus,l=t.protectionController,p=t.ISOBoxer,f=t.debug;return i={generateMoov:function(t){return r.generateMoov(t)},processFragment:function(t,r){if(!t||!t.request||!t.response)throw new Error("e parameter is missing or malformed");"MediaSegment"===t.request.type?n.convertFragment(t,r):t.request.type===e.MSS_FRAGMENT_INFO_SEGMENT_TYPE&&(n.updateSegmentList(t,r),t.sender=null)}},p.addBoxProcessor("uuid",C),p.addBoxProcessor("saio",N),p.addBoxProcessor("saiz",M),p.addBoxProcessor("senc",D),r=w(o).create({protectionController:l,constants:t.constants,ISOBoxer:p}),n=A(o).create({dashMetrics:a,playbackController:s,ISOBoxer:p,eventBus:u,debug:f,errHandler:t.errHandler}),i}P.__dashjs_factory_name="MssFragmentProcessor";const O=dashjs.FactoryMaker.getClassFactory(P);var B=r(2214),x=r.n(B);function F(t){var e,r,n,i=(t=t||{}).BASE64,o=t.debug,a=t.constants,s=t.manifestModel,u=t.settings,l=["AAC","AACL","AACH","AACP","AVC1","H264","TTML","DFXP"],p={CAPT:"main",SUBT:"alternate",DESC:"main"},f={DESC:"2"},c={96e3:0,88200:1,64e3:2,48e3:3,44100:4,32e3:5,24e3:6,22050:7,16e3:8,12e3:9,11025:10,8e3:11,7350:12},d={video:"video/mp4",audio:"audio/mp4",text:"application/mp4"};function h(t,e){var r=t.getAttribute(e);return!!r&&"true"===r.toLowerCase()}function m(t,e){var r,n,i,o,a,s={},u=[],l=t.getAttribute("Name"),c=t.getAttribute("Type"),h=t.getAttribute("Language"),m=h?c+"_"+h:c;if(s.id=l||m,s.contentType=c,s.lang=h||"und",s.mimeType=d[c],s.subType=t.getAttribute("Subtype"),s.maxWidth=t.getAttribute("MaxWidth"),s.maxHeight=t.getAttribute("MaxHeight"),s.subType){if(p[s.subType]){var g={schemeIdUri:"urn:mpeg:dash:role:2011",value:p[s.subType]};s.Role=g,s.Role_asArray=[g]}if(f[s.subType]){var v={schemeIdUri:"urn:tva:metadata:cs:AudioPurposeCS:2007",value:f[s.subType]};s.Accessibility=v,s.Accessibility_asArray=[v]}}for(r=function(t,e){var r,n,i,o={};return r=(r=(i=t.getAttribute("Url"))?i.replace("{bitrate}","$Bandwidth$"):null)?r.replace("{start time}","$Time$"):null,n=(n=t.getAttribute("TimeScale"))?parseFloat(n):e,o.media=r,o.timescale=n,o.SegmentTimeline=function(t,e){var r,n,i,o,a,s,u={},l=t.getElementsByTagName("c"),p=[],f=0;for(o=0;o<l.length;o++)if(r={},(i=l[o].getAttribute("t"))&&x()(i).greater(x()(Number.MAX_SAFE_INTEGER))&&(r.tManifest=i),r.t=parseFloat(i),r.d=parseFloat(l[o].getAttribute("d")),0!==o||r.t||(r.t=0),o>0&&((n=p[p.length-1]).d||(n.tManifest?n.d=x()(i).subtract(x()(n.tManifest)).toJSNumber():n.d=r.t-n.t,f+=n.d),r.t||(n.tManifest?(r.tManifest=x()(n.tManifest).add(x()(n.d)).toString(),r.t=parseFloat(r.tManifest)):r.t=n.t+n.d)),r.d&&(f+=r.d),p.push(r),s=parseFloat(l[o].getAttribute("r")))for(a=0;a<s-1;a++)n=p[p.length-1],(r={}).t=n.t+n.d,r.d=n.d,n.tManifest&&(r.tManifest=x()(n.tManifest).add(x()(n.d)).toString()),f+=r.d,p.push(r);return u.S=p,u.S_asArray=p,u.duration=f/e,u}(t,o.timescale),o.availabilityTimeOffset="INF",o}(t,e),n=t.getElementsByTagName("QualityLevel"),o=0;o<n.length;o++)n[o].BaseURL=s.BaseURL,n[o].mimeType=s.mimeType,a=n[o].getAttribute("Index"),n[o].Id=s.id+(null!==a?"_"+a:""),null!==(i=y(n[o],t))&&(i.SegmentTemplate=r,u.push(i));return 0===u.length?null:(s.Representation=u.length>1?u:u[0],s.Representation_asArray=u,s.SegmentTemplate=r,s)}function y(t,e){var n,i,o={},s=e.getAttribute("Type"),u=null;if(o.id=t.Id,o.bandwidth=parseInt(t.getAttribute("Bitrate"),10),o.mimeType=t.mimeType,n=parseInt(t.getAttribute("MaxWidth"),10),i=parseInt(t.getAttribute("MaxHeight"),10),isNaN(n)||(o.width=n),isNaN(i)||(o.height=i),null!==(u=t.getAttribute("FourCC"))&&""!==u||(u=e.getAttribute("FourCC")),null===u||""===u)if(s===a.AUDIO)u="AAC";else if(s===a.VIDEO)return r.debug('FourCC is not defined whereas it is required for a QualityLevel element for a StreamIndex of type "video"'),null;return-1===l.indexOf(u.toUpperCase())?(r.warn("Codec not supported: "+u),null):("H264"===u||"AVC1"===u?o.codecs=function(t){var e,r=t.getAttribute("CodecPrivateData").toString();return"avc1."+((e=/00000001[0-9]7/.exec(r))&&e[0]?r.substr(r.indexOf(e[0])+10,6):void 0)}(t):u.indexOf("AAC")>=0?(o.codecs=function(t,e){var r,n,i,o,a=parseInt(t.getAttribute("SamplingRate"),10),s=t.getAttribute("CodecPrivateData").toString(),u=0;return"AACH"===e&&(u=5),void 0===s||""===s?(u=2,i=c[a],"AACH"===e?(u=5,s=new Uint8Array(4),o=c[2*a],s[0]=u<<3|i>>1,s[1]=i<<7|t.Channels<<3|o>>1,s[2]=o<<7|8,s[3]=0,(n=new Uint16Array(2))[0]=(s[0]<<8)+s[1],n[1]=(s[2]<<8)+s[3],r=n[0].toString(16),r=n[0].toString(16)+n[1].toString(16)):((s=new Uint8Array(2))[0]=u<<3|i>>1,s[1]=i<<7|parseInt(t.getAttribute("Channels"),10)<<3,(n=new Uint16Array(1))[0]=(s[0]<<8)+s[1],r=n[0].toString(16)),s=(s=""+r).toUpperCase(),t.setAttribute("CodecPrivateData",s)):0===u&&(u=(248&parseInt(s.substr(0,2),16))>>3),"mp4a.40."+u}(t,u),o.audioSamplingRate=parseInt(t.getAttribute("SamplingRate"),10),o.audioChannels=parseInt(t.getAttribute("Channels"),10)):(u.indexOf("TTML")||u.indexOf("DFXP"))&&(o.codecs=a.STPP),o.codecPrivateData=""+t.getAttribute("CodecPrivateData"),o.BaseURL=t.BaseURL,o)}function g(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function v(t){var e,r,o,l,p,f,c,d,y,v,_,T={},E=[],b=t.getElementsByTagName("SmoothStreamingMedia")[0],A=t.getElementsByTagName("Protection")[0],S=null;T.protocol="MSS",T.profiles="urn:mpeg:dash:profile:isoff-live:2011",T.type=h(b,"IsLive")?"dynamic":"static",d=b.getAttribute("TimeScale"),T.timescale=d?parseFloat(d):1e7;var w=parseFloat(b.getAttribute("DVRWindowLength"));"dynamic"!==T.type||0!==w&&!isNaN(w)||(w=1/0),0===w&&h(b,"CanSeek")&&(w=1/0),w>0&&(T.timeShiftBufferDepth=w/T.timescale);var I=parseFloat(b.getAttribute("Duration"));for(T.mediaPresentationDuration=0===I?1/0:I/T.timescale,T.minBufferTime=2,T.ttmlTimeIsRelative=!0,"dynamic"===T.type&&I>0&&(T.type="static",T.timeShiftBufferDepth=I/T.timescale),"dynamic"===T.type&&(T.refreshManifestOnSwitchTrack=!0,T.doNotUpdateDVRWindowOnBufferUpdated=!0,T.ignorePostponeTimePeriod=!0,T.availabilityStartTime=new Date(null)),T.Period=function(t,e){var r,n,i={AdaptationSet_asArray:[]};r=t.getElementsByTagName("StreamIndex");for(var o=0;o<r.length;o++)null!==(n=m(r[o],e))&&i.AdaptationSet_asArray.push(n);return i.AdaptationSet_asArray.length>0&&(i.AdaptationSet=i.AdaptationSet_asArray.length>1?i.AdaptationSet_asArray:i.AdaptationSet_asArray[0]),i}(b,T.timescale),T.Period_asArray=[T.Period],(e=T.Period).start=0,void 0!==A&&((S=t.getElementsByTagName("ProtectionHeader")[0]).firstChild.data=S.firstChild.data.replace(/\n|\r/g,""),l=function(t){var e,r,n;return(e=function(t){var e,r,n,i=0;for(t[i+3],t[i+2],t[i+1],t[i],t[(i+=4)+1],t[i],i+=2;i<t.length;)if(e=(t[i+1]<<8)+t[i],i+=2,1===e)return r=(t[i+1]<<8)+t[i],i+=2,(n=new Uint8Array(r)).set(t.subarray(i,i+r)),n;return null}(i.decodeArray(t.firstChild.data)))&&(e=new Uint16Array(e.buffer),e=String.fromCharCode.apply(null,e),r=(new DOMParser).parseFromString(e,"application/xml").querySelector("KID").textContent,g(n=r=i.decodeArray(r),0,3),g(n,1,2),g(n,4,5),g(n,6,7)),r}(S),o=function(t){var e={__text:t.firstChild.data,__prefix:"mspr"};return{schemeIdUri:"urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95",value:"com.microsoft.playready",pro:e,pro_asArray:e}}(S),o["cenc:default_KID"]=l,E.push(o),o=function(t){var e={schemeIdUri:"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed",value:"com.widevine.alpha"};if(!t)return e;var r=new Uint8Array(2+t.length);r[0]=18,r[1]=16,r.set(t,2);var n=32+r.length,o=new Uint8Array(n),a=0;return o[a++]=(4278190080&n)>>24,o[a++]=(16711680&n)>>16,o[a++]=(65280&n)>>8,o[a++]=255&n,o.set([112,115,115,104,0,0,0,0],a),a+=8,o.set([237,239,139,169,121,214,74,206,163,200,39,220,213,29,33,237],a),a+=16,o[a++]=(4278190080&r.length)>>24,o[a++]=(16711680&r.length)>>16,o[a++]=(65280&r.length)>>8,o[a++]=255&r.length,o.set(r,a),o=String.fromCharCode.apply(null,o),o=i.encodeASCII(o),e.pssh={__text:o},e}(l),o["cenc:default_KID"]=l,E.push(o),T.ContentProtection=E,T.ContentProtection_asArray=E),r=e.AdaptationSet_asArray,v=0;v<r.length;v+=1)r[v].SegmentTemplate.initialization="$Bandwidth$",void 0!==T.ContentProtection&&(r[v].ContentProtection=T.ContentProtection,r[v].ContentProtection_asArray=T.ContentProtection_asArray),"video"===r[v].contentType&&(y=r[v].SegmentTemplate.SegmentTimeline.S_asArray[0].d/r[v].SegmentTemplate.timescale,T.minBufferTime=y,"dynamic"===T.type&&T.timeShiftBufferDepth>0&&T.timeShiftBufferDepth!==1/0&&T.timeShiftBufferDepth>r[v].SegmentTemplate.SegmentTimeline.duration&&(T.timeShiftBufferDepth=r[v].SegmentTemplate.SegmentTimeline.duration));if(T.minBufferTime=Math.min(T.minBufferTime,T.timeShiftBufferDepth?T.timeShiftBufferDepth:1/0),"dynamic"===T.type){var N=u.get().streaming.delay.liveDelay;N||(N=y*(null===u.get().streaming.delay.liveDelayFragmentCount||isNaN(u.get().streaming.delay.liveDelayFragmentCount)?4:u.get().streaming.delay.liveDelayFragmentCount));var M=Math.max(T.timeShiftBufferDepth-10,T.timeShiftBufferDepth/2),D=Math.min(M,N),C=D-1.5*y;n={streaming:{buffer:{stableBufferTime:u.get().streaming.buffer.stableBufferTime,bufferTimeAtTopQuality:u.get().streaming.buffer.bufferTimeAtTopQuality,bufferTimeAtTopQualityLongForm:u.get().streaming.buffer.bufferTimeAtTopQualityLongForm},timeShiftBuffer:{calcFromSegmentTimeline:u.get().streaming.timeShiftBuffer.calcFromSegmentTimeline},delay:{liveDelay:u.get().streaming.delay.liveDelay}}},u.update({streaming:{buffer:{stableBufferTime:C,bufferTimeAtTopQuality:C,bufferTimeAtTopQualityLongForm:C},timeShiftBuffer:{calcFromSegmentTimeline:!0},delay:{liveDelay:D}}})}if(delete T.ContentProtection,delete T.ContentProtection_asArray,"static"===T.type){var P=s.getValue();if(P&&P.timestampOffset)p=P.timestampOffset;else for(v=0;v<r.length;v++)r[v].contentType!==a.AUDIO&&r[v].contentType!==a.VIDEO||(f=(c=r[v].SegmentTemplate.SegmentTimeline.S_asArray)[0].t,void 0===p&&(p=f),p=Math.min(p,f),T.mediaPresentationDuration=Math.min(T.mediaPresentationDuration,r[v].SegmentTemplate.SegmentTimeline.duration));if(p>0){for(T.timestampOffset=p,v=0;v<r.length;v++){for(c=r[v].SegmentTemplate.SegmentTimeline.S_asArray,_=0;_<c.length;_++)c[_].tManifest||(c[_].tManifest=c[_].t.toString()),c[_].t-=p;r[v].contentType!==a.AUDIO&&r[v].contentType!==a.VIDEO||(e.start=Math.max(c[0].t,e.start),r[v].SegmentTemplate.presentationTimeOffset=e.start)}e.start/=T.timescale}}return T.mediaPresentationDuration=Math.floor(1e3*T.mediaPresentationDuration)/1e3,e.duration=T.mediaPresentationDuration,T}return e={parse:function(t){var e,n,i=window.performance.now();e=function(t){var e=null;if(window.DOMParser&&(e=(new window.DOMParser).parseFromString(t,"text/xml")).getElementsByTagName("parsererror").length>0)throw new Error("parsing the manifest failed");return e}(t);var o=window.performance.now();if(null===e)return null;n=v(e,new Date);var a=window.performance.now();return r.info("Parsing complete: (xmlParsing: "+(o-i).toPrecision(3)+"ms, mss2dash: "+(a-o).toPrecision(3)+"ms, total: "+((a-i)/1e3).toPrecision(3)+"s)"),n},getMatchers:function(){return null},getIron:function(){return null},reset:function(){n&&u.update(n)}},r=o.getLogger(e),e}F.__dashjs_factory_name="MssParser";const R=dashjs.FactoryMaker.getClassFactory(F);function L(r){r=r||{};var n,i,o,s=this.context,p=r.eventBus,f=r.events,c=r.constants,d=r.initSegmentType,h=r.dashMetrics,m=r.playbackController,y=r.streamController,g=r.protectionController,v=O(s).create({dashMetrics:h,playbackController:m,protectionController:g,streamController:y,eventBus:p,constants:c,ISOBoxer:r.ISOBoxer,debug:r.debug,errHandler:r.errHandler});function _(t){return y.getActiveStreamProcessors().filter((function(e){return e.getType()===t}))[0]}function T(t){return i.filter((function(e){return e.getType()===t}))[0]}function E(){y.getActiveStreamProcessors().forEach((function(t){if(t.getType()===c.VIDEO||t.getType()===c.AUDIO||t.getType()===c.TEXT){var e=T(t.getType());e||((e=u(s).create({streamProcessor:t,baseURLController:r.baseURLController,debug:r.debug})).initialize(),i.push(e)),e.start()}}))}function b(e){var n=_(e.mediaType);if(n){var i=n.getRepresentationController().getCurrentRepresentation(),o=n.getMediaInfo(),s=new a;s.mediaType=i.adaptation.type,s.type=d,s.range=i.range,s.quality=i.index,s.mediaInfo=o,s.representationId=i.id;var u=function(e,r,n){var i=new t;return i.streamId=r,i.mediaInfo=e.mediaInfo,i.segmentType=e.type,i.start=e.startTime,i.duration=e.duration,i.end=i.start+i.duration,i.index=e.index,i.quality=e.quality,i.representationId=e.representationId,i.endFragment=n,i}(s,o.streamInfo.id,e.type!==f.FRAGMENT_LOADING_PROGRESS);try{u.bytes=v.generateMoov(i),p.trigger(f.INIT_FRAGMENT_LOADED,{chunk:u},{streamId:o.streamInfo.id,mediaType:i.adaptation.type})}catch(e){r.errHandler.error(new l(e.code,e.message,e.data))}e.sender=null}}function A(t){if(!t.error){var r=_(t.request.mediaType);if(r){if(v.processFragment(t,r),t.request.type===e.MSS_FRAGMENT_INFO_SEGMENT_TYPE){var n=T(t.request.mediaType);n&&n.fragmentInfoLoaded(t)}var i=t.request.mediaInfo.streamInfo.manifestInfo;i.isDynamic||i.dvrWindowSize===1/0||E()}}}function S(){m.getIsDynamic()&&0!==m.getTime()&&E()}function w(){m.getIsDynamic()&&0!==m.getTime()&&E()}function I(t){t&&t.data&&(t.data=t.data.replace(/http:\/\/www.w3.org\/2006\/10\/ttaf1/gi,"http://www.w3.org/ns/ttml"))}return o={reset:function(){n&&(n.reset(),n=void 0),p.off(f.INIT_FRAGMENT_NEEDED,b,this),p.off(f.PLAYBACK_PAUSED,S,this),p.off(f.PLAYBACK_SEEKING,w,this),p.off(f.FRAGMENT_LOADING_COMPLETED,A,this),p.off(f.TTML_TO_PARSE,I,this),i.forEach((function(t){t.reset()})),i=[]},createMssParser:function(){return n=R(s).create(r)},registerEvents:function(){p.on(f.INIT_FRAGMENT_NEEDED,b,o,{priority:dashjs.FactoryMaker.getSingletonFactoryByName(p.getClassName()).EVENT_PRIORITY_HIGH}),p.on(f.PLAYBACK_PAUSED,S,o,{priority:dashjs.FactoryMaker.getSingletonFactoryByName(p.getClassName()).EVENT_PRIORITY_HIGH}),p.on(f.PLAYBACK_SEEKING,w,o,{priority:dashjs.FactoryMaker.getSingletonFactoryByName(p.getClassName()).EVENT_PRIORITY_HIGH}),p.on(f.FRAGMENT_LOADING_COMPLETED,A,o,{priority:dashjs.FactoryMaker.getSingletonFactoryByName(p.getClassName()).EVENT_PRIORITY_HIGH}),p.on(f.TTML_TO_PARSE,I,o)}},i=[],o}L.__dashjs_factory_name="MssHandler";var q=dashjs.FactoryMaker.getClassFactory(L);q.errors=m,dashjs.FactoryMaker.updateClassFactory(L.__dashjs_factory_name,q);const U=q;var G="undefined"!=typeof window&&window||r.g,k=G.dashjs;k||(k=G.dashjs={}),k.MssHandler=U;const j=k})(),n.default})()));
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.dashjs=e():t.dashjs=e()}(self,(()=>(()=>{var t={2214:(t,e,r)=>{var n;t=r.nmd(t);var i=function(t){"use strict";var e=1e7,r=9007199254740992,n=c(r),o="0123456789abcdefghijklmnopqrstuvwxyz",a="function"==typeof BigInt;function s(t,e,r,n){return void 0===t?s[0]:void 0===e||10==+e&&!r?J(t):H(t,e,r,n)}function u(t,e){this.value=t,this.sign=e,this.isSmall=!1}function l(t){this.value=t,this.sign=t<0,this.isSmall=!0}function p(t){this.value=t}function f(t){return-r<t&&t<r}function c(t){return t<1e7?[t]:t<1e14?[t%1e7,Math.floor(t/1e7)]:[t%1e7,Math.floor(t/1e7)%1e7,Math.floor(t/1e14)]}function d(t){h(t);var r=t.length;if(r<4&&P(t,n)<0)switch(r){case 0:return 0;case 1:return t[0];case 2:return t[0]+t[1]*e;default:return t[0]+(t[1]+t[2]*e)*e}return t}function h(t){for(var e=t.length;0===t[--e];);t.length=e+1}function m(t){for(var e=new Array(t),r=-1;++r<t;)e[r]=0;return e}function y(t){return t>0?Math.floor(t):Math.ceil(t)}function g(t,r){var n,i,o=t.length,a=r.length,s=new Array(o),u=0,l=e;for(i=0;i<a;i++)u=(n=t[i]+r[i]+u)>=l?1:0,s[i]=n-u*l;for(;i<o;)u=(n=t[i]+u)===l?1:0,s[i++]=n-u*l;return u>0&&s.push(u),s}function v(t,e){return t.length>=e.length?g(t,e):g(e,t)}function _(t,r){var n,i,o=t.length,a=new Array(o),s=e;for(i=0;i<o;i++)n=t[i]-s+r,r=Math.floor(n/s),a[i]=n-r*s,r+=1;for(;r>0;)a[i++]=r%s,r=Math.floor(r/s);return a}function T(t,r){var n,i,o=t.length,a=r.length,s=new Array(o),u=0,l=e;for(n=0;n<a;n++)(i=t[n]-u-r[n])<0?(i+=l,u=1):u=0,s[n]=i;for(n=a;n<o;n++){if(!((i=t[n]-u)<0)){s[n++]=i;break}i+=l,s[n]=i}for(;n<o;n++)s[n]=t[n];return h(s),s}function E(t,r,n){var i,o,a=t.length,s=new Array(a),p=-r,f=e;for(i=0;i<a;i++)o=t[i]+p,p=Math.floor(o/f),o%=f,s[i]=o<0?o+f:o;return"number"==typeof(s=d(s))?(n&&(s=-s),new l(s)):new u(s,n)}function b(t,r){var n,i,o,a,s=t.length,u=r.length,l=m(s+u),p=e;for(o=0;o<s;++o){a=t[o];for(var f=0;f<u;++f)n=a*r[f]+l[o+f],i=Math.floor(n/p),l[o+f]=n-i*p,l[o+f+1]+=i}return h(l),l}function A(t,r){var n,i,o=t.length,a=new Array(o),s=e,u=0;for(i=0;i<o;i++)n=t[i]*r+u,u=Math.floor(n/s),a[i]=n-u*s;for(;u>0;)a[i++]=u%s,u=Math.floor(u/s);return a}function S(t,e){for(var r=[];e-- >0;)r.push(0);return r.concat(t)}function w(t,e){var r=Math.max(t.length,e.length);if(r<=30)return b(t,e);r=Math.ceil(r/2);var n=t.slice(r),i=t.slice(0,r),o=e.slice(r),a=e.slice(0,r),s=w(i,a),u=w(n,o),l=w(v(i,n),v(a,o)),p=v(v(s,S(T(T(l,s),u),r)),S(u,2*r));return h(p),p}function I(t,r,n){return new u(t<e?A(r,t):b(r,c(t)),n)}function N(t){var r,n,i,o,a=t.length,s=m(a+a),u=e;for(i=0;i<a;i++){n=0-(o=t[i])*o;for(var l=i;l<a;l++)r=o*t[l]*2+s[i+l]+n,n=Math.floor(r/u),s[i+l]=r-n*u;s[i+a]=n}return h(s),s}function D(t,e){var r,n,i,o,a=t.length,s=m(a);for(i=0,r=a-1;r>=0;--r)i=(o=1e7*i+t[r])-(n=y(o/e))*e,s[r]=0|n;return[s,0|i]}function M(t,r){var n,i=J(r);if(a)return[new p(t.value/i.value),new p(t.value%i.value)];var o,f=t.value,g=i.value;if(0===g)throw new Error("Cannot divide by zero");if(t.isSmall)return i.isSmall?[new l(y(f/g)),new l(f%g)]:[s[0],t];if(i.isSmall){if(1===g)return[t,s[0]];if(-1==g)return[t.negate(),s[0]];var v=Math.abs(g);if(v<e){o=d((n=D(f,v))[0]);var _=n[1];return t.sign&&(_=-_),"number"==typeof o?(t.sign!==i.sign&&(o=-o),[new l(o),new l(_)]):[new u(o,t.sign!==i.sign),new l(_)]}g=c(v)}var E=P(f,g);if(-1===E)return[s[0],t];if(0===E)return[s[t.sign===i.sign?1:-1],s[0]];n=f.length+g.length<=200?function(t,r){var n,i,o,a,s,u,l,p=t.length,f=r.length,c=e,h=m(r.length),y=r[f-1],g=Math.ceil(c/(2*y)),v=A(t,g),_=A(r,g);for(v.length<=p&&v.push(0),_.push(0),y=_[f-1],i=p-f;i>=0;i--){for(n=c-1,v[i+f]!==y&&(n=Math.floor((v[i+f]*c+v[i+f-1])/y)),o=0,a=0,u=_.length,s=0;s<u;s++)o+=n*_[s],l=Math.floor(o/c),a+=v[i+s]-(o-l*c),o=l,a<0?(v[i+s]=a+c,a=-1):(v[i+s]=a,a=0);for(;0!==a;){for(n-=1,o=0,s=0;s<u;s++)(o+=v[i+s]-c+_[s])<0?(v[i+s]=o+c,o=0):(v[i+s]=o,o=1);a+=o}h[i]=n}return v=D(v,g)[0],[d(h),d(v)]}(f,g):function(t,r){for(var n,i,o,a,s,u=t.length,l=r.length,p=[],f=[],c=e;u;)if(f.unshift(t[--u]),h(f),P(f,r)<0)p.push(0);else{o=f[(i=f.length)-1]*c+f[i-2],a=r[l-1]*c+r[l-2],i>l&&(o=(o+1)*c),n=Math.ceil(o/a);do{if(P(s=A(r,n),f)<=0)break;n--}while(n);p.push(n),f=T(f,s)}return p.reverse(),[d(p),d(f)]}(f,g),o=n[0];var b=t.sign!==i.sign,S=n[1],w=t.sign;return"number"==typeof o?(b&&(o=-o),o=new l(o)):o=new u(o,b),"number"==typeof S?(w&&(S=-S),S=new l(S)):S=new u(S,w),[o,S]}function P(t,e){if(t.length!==e.length)return t.length>e.length?1:-1;for(var r=t.length-1;r>=0;r--)if(t[r]!==e[r])return t[r]>e[r]?1:-1;return 0}function C(t){var e=t.abs();return!e.isUnit()&&(!!(e.equals(2)||e.equals(3)||e.equals(5))||!(e.isEven()||e.isDivisibleBy(3)||e.isDivisibleBy(5))&&(!!e.lesser(49)||void 0))}function O(t,e){for(var r,n,o,a=t.prev(),s=a,u=0;s.isEven();)s=s.divide(2),u++;t:for(n=0;n<e.length;n++)if(!t.lesser(e[n])&&!(o=i(e[n]).modPow(s,t)).isUnit()&&!o.equals(a)){for(r=u-1;0!=r;r--){if((o=o.square().mod(t)).isUnit())return!1;if(o.equals(a))continue t}return!1}return!0}u.prototype=Object.create(s.prototype),l.prototype=Object.create(s.prototype),p.prototype=Object.create(s.prototype),u.prototype.add=function(t){var e=J(t);if(this.sign!==e.sign)return this.subtract(e.negate());var r=this.value,n=e.value;return e.isSmall?new u(_(r,Math.abs(n)),this.sign):new u(v(r,n),this.sign)},u.prototype.plus=u.prototype.add,l.prototype.add=function(t){var e=J(t),r=this.value;if(r<0!==e.sign)return this.subtract(e.negate());var n=e.value;if(e.isSmall){if(f(r+n))return new l(r+n);n=c(Math.abs(n))}return new u(_(n,Math.abs(r)),r<0)},l.prototype.plus=l.prototype.add,p.prototype.add=function(t){return new p(this.value+J(t).value)},p.prototype.plus=p.prototype.add,u.prototype.subtract=function(t){var e=J(t);if(this.sign!==e.sign)return this.add(e.negate());var r=this.value,n=e.value;return e.isSmall?E(r,Math.abs(n),this.sign):function(t,e,r){var n;return P(t,e)>=0?n=T(t,e):(n=T(e,t),r=!r),"number"==typeof(n=d(n))?(r&&(n=-n),new l(n)):new u(n,r)}(r,n,this.sign)},u.prototype.minus=u.prototype.subtract,l.prototype.subtract=function(t){var e=J(t),r=this.value;if(r<0!==e.sign)return this.add(e.negate());var n=e.value;return e.isSmall?new l(r-n):E(n,Math.abs(r),r>=0)},l.prototype.minus=l.prototype.subtract,p.prototype.subtract=function(t){return new p(this.value-J(t).value)},p.prototype.minus=p.prototype.subtract,u.prototype.negate=function(){return new u(this.value,!this.sign)},l.prototype.negate=function(){var t=this.sign,e=new l(-this.value);return e.sign=!t,e},p.prototype.negate=function(){return new p(-this.value)},u.prototype.abs=function(){return new u(this.value,!1)},l.prototype.abs=function(){return new l(Math.abs(this.value))},p.prototype.abs=function(){return new p(this.value>=0?this.value:-this.value)},u.prototype.multiply=function(t){var r,n,i,o=J(t),a=this.value,l=o.value,p=this.sign!==o.sign;if(o.isSmall){if(0===l)return s[0];if(1===l)return this;if(-1===l)return this.negate();if((r=Math.abs(l))<e)return new u(A(a,r),p);l=c(r)}return new u(-.012*(n=a.length)-.012*(i=l.length)+15e-6*n*i>0?w(a,l):b(a,l),p)},u.prototype.times=u.prototype.multiply,l.prototype._multiplyBySmall=function(t){return f(t.value*this.value)?new l(t.value*this.value):I(Math.abs(t.value),c(Math.abs(this.value)),this.sign!==t.sign)},u.prototype._multiplyBySmall=function(t){return 0===t.value?s[0]:1===t.value?this:-1===t.value?this.negate():I(Math.abs(t.value),this.value,this.sign!==t.sign)},l.prototype.multiply=function(t){return J(t)._multiplyBySmall(this)},l.prototype.times=l.prototype.multiply,p.prototype.multiply=function(t){return new p(this.value*J(t).value)},p.prototype.times=p.prototype.multiply,u.prototype.square=function(){return new u(N(this.value),!1)},l.prototype.square=function(){var t=this.value*this.value;return f(t)?new l(t):new u(N(c(Math.abs(this.value))),!1)},p.prototype.square=function(t){return new p(this.value*this.value)},u.prototype.divmod=function(t){var e=M(this,t);return{quotient:e[0],remainder:e[1]}},p.prototype.divmod=l.prototype.divmod=u.prototype.divmod,u.prototype.divide=function(t){return M(this,t)[0]},p.prototype.over=p.prototype.divide=function(t){return new p(this.value/J(t).value)},l.prototype.over=l.prototype.divide=u.prototype.over=u.prototype.divide,u.prototype.mod=function(t){return M(this,t)[1]},p.prototype.mod=p.prototype.remainder=function(t){return new p(this.value%J(t).value)},l.prototype.remainder=l.prototype.mod=u.prototype.remainder=u.prototype.mod,u.prototype.pow=function(t){var e,r,n,i=J(t),o=this.value,a=i.value;if(0===a)return s[1];if(0===o)return s[0];if(1===o)return s[1];if(-1===o)return i.isEven()?s[1]:s[-1];if(i.sign)return s[0];if(!i.isSmall)throw new Error("The exponent "+i.toString()+" is too large.");if(this.isSmall&&f(e=Math.pow(o,a)))return new l(y(e));for(r=this,n=s[1];!0&a&&(n=n.times(r),--a),0!==a;)a/=2,r=r.square();return n},l.prototype.pow=u.prototype.pow,p.prototype.pow=function(t){var e=J(t),r=this.value,n=e.value,i=BigInt(0),o=BigInt(1),a=BigInt(2);if(n===i)return s[1];if(r===i)return s[0];if(r===o)return s[1];if(r===BigInt(-1))return e.isEven()?s[1]:s[-1];if(e.isNegative())return new p(i);for(var u=this,l=s[1];(n&o)===o&&(l=l.times(u),--n),n!==i;)n/=a,u=u.square();return l},u.prototype.modPow=function(t,e){if(t=J(t),(e=J(e)).isZero())throw new Error("Cannot take modPow with modulus 0");for(var r=s[1],n=this.mod(e);t.isPositive();){if(n.isZero())return s[0];t.isOdd()&&(r=r.multiply(n).mod(e)),t=t.divide(2),n=n.square().mod(e)}return r},p.prototype.modPow=l.prototype.modPow=u.prototype.modPow,u.prototype.compareAbs=function(t){var e=J(t),r=this.value,n=e.value;return e.isSmall?1:P(r,n)},l.prototype.compareAbs=function(t){var e=J(t),r=Math.abs(this.value),n=e.value;return e.isSmall?r===(n=Math.abs(n))?0:r>n?1:-1:-1},p.prototype.compareAbs=function(t){var e=this.value,r=J(t).value;return(e=e>=0?e:-e)===(r=r>=0?r:-r)?0:e>r?1:-1},u.prototype.compare=function(t){if(t===1/0)return-1;if(t===-1/0)return 1;var e=J(t),r=this.value,n=e.value;return this.sign!==e.sign?e.sign?1:-1:e.isSmall?this.sign?-1:1:P(r,n)*(this.sign?-1:1)},u.prototype.compareTo=u.prototype.compare,l.prototype.compare=function(t){if(t===1/0)return-1;if(t===-1/0)return 1;var e=J(t),r=this.value,n=e.value;return e.isSmall?r==n?0:r>n?1:-1:r<0!==e.sign?r<0?-1:1:r<0?1:-1},l.prototype.compareTo=l.prototype.compare,p.prototype.compare=function(t){if(t===1/0)return-1;if(t===-1/0)return 1;var e=this.value,r=J(t).value;return e===r?0:e>r?1:-1},p.prototype.compareTo=p.prototype.compare,u.prototype.equals=function(t){return 0===this.compare(t)},p.prototype.eq=p.prototype.equals=l.prototype.eq=l.prototype.equals=u.prototype.eq=u.prototype.equals,u.prototype.notEquals=function(t){return 0!==this.compare(t)},p.prototype.neq=p.prototype.notEquals=l.prototype.neq=l.prototype.notEquals=u.prototype.neq=u.prototype.notEquals,u.prototype.greater=function(t){return this.compare(t)>0},p.prototype.gt=p.prototype.greater=l.prototype.gt=l.prototype.greater=u.prototype.gt=u.prototype.greater,u.prototype.lesser=function(t){return this.compare(t)<0},p.prototype.lt=p.prototype.lesser=l.prototype.lt=l.prototype.lesser=u.prototype.lt=u.prototype.lesser,u.prototype.greaterOrEquals=function(t){return this.compare(t)>=0},p.prototype.geq=p.prototype.greaterOrEquals=l.prototype.geq=l.prototype.greaterOrEquals=u.prototype.geq=u.prototype.greaterOrEquals,u.prototype.lesserOrEquals=function(t){return this.compare(t)<=0},p.prototype.leq=p.prototype.lesserOrEquals=l.prototype.leq=l.prototype.lesserOrEquals=u.prototype.leq=u.prototype.lesserOrEquals,u.prototype.isEven=function(){return 0==(1&this.value[0])},l.prototype.isEven=function(){return 0==(1&this.value)},p.prototype.isEven=function(){return(this.value&BigInt(1))===BigInt(0)},u.prototype.isOdd=function(){return 1==(1&this.value[0])},l.prototype.isOdd=function(){return 1==(1&this.value)},p.prototype.isOdd=function(){return(this.value&BigInt(1))===BigInt(1)},u.prototype.isPositive=function(){return!this.sign},l.prototype.isPositive=function(){return this.value>0},p.prototype.isPositive=l.prototype.isPositive,u.prototype.isNegative=function(){return this.sign},l.prototype.isNegative=function(){return this.value<0},p.prototype.isNegative=l.prototype.isNegative,u.prototype.isUnit=function(){return!1},l.prototype.isUnit=function(){return 1===Math.abs(this.value)},p.prototype.isUnit=function(){return this.abs().value===BigInt(1)},u.prototype.isZero=function(){return!1},l.prototype.isZero=function(){return 0===this.value},p.prototype.isZero=function(){return this.value===BigInt(0)},u.prototype.isDivisibleBy=function(t){var e=J(t);return!e.isZero()&&(!!e.isUnit()||(0===e.compareAbs(2)?this.isEven():this.mod(e).isZero()))},p.prototype.isDivisibleBy=l.prototype.isDivisibleBy=u.prototype.isDivisibleBy,u.prototype.isPrime=function(e){var r=C(this);if(r!==t)return r;var n=this.abs(),o=n.bitLength();if(o<=64)return O(n,[2,3,5,7,11,13,17,19,23,29,31,37]);for(var a=Math.log(2)*o.toJSNumber(),s=Math.ceil(!0===e?2*Math.pow(a,2):a),u=[],l=0;l<s;l++)u.push(i(l+2));return O(n,u)},p.prototype.isPrime=l.prototype.isPrime=u.prototype.isPrime,u.prototype.isProbablePrime=function(e){var r=C(this);if(r!==t)return r;for(var n=this.abs(),o=e===t?5:e,a=[],s=0;s<o;s++)a.push(i.randBetween(2,n.minus(2)));return O(n,a)},p.prototype.isProbablePrime=l.prototype.isProbablePrime=u.prototype.isProbablePrime,u.prototype.modInv=function(t){for(var e,r,n,o=i.zero,a=i.one,s=J(t),u=this.abs();!u.isZero();)e=s.divide(u),r=o,n=s,o=a,s=u,a=r.subtract(e.multiply(a)),u=n.subtract(e.multiply(u));if(!s.isUnit())throw new Error(this.toString()+" and "+t.toString()+" are not co-prime");return-1===o.compare(0)&&(o=o.add(t)),this.isNegative()?o.negate():o},p.prototype.modInv=l.prototype.modInv=u.prototype.modInv,u.prototype.next=function(){var t=this.value;return this.sign?E(t,1,this.sign):new u(_(t,1),this.sign)},l.prototype.next=function(){var t=this.value;return t+1<r?new l(t+1):new u(n,!1)},p.prototype.next=function(){return new p(this.value+BigInt(1))},u.prototype.prev=function(){var t=this.value;return this.sign?new u(_(t,1),!0):E(t,1,this.sign)},l.prototype.prev=function(){var t=this.value;return t-1>-r?new l(t-1):new u(n,!0)},p.prototype.prev=function(){return new p(this.value-BigInt(1))};for(var B=[1];2*B[B.length-1]<=e;)B.push(2*B[B.length-1]);var x=B.length,F=B[x-1];function R(t){return Math.abs(t)<=e}function L(t,e,r){e=J(e);for(var n=t.isNegative(),o=e.isNegative(),a=n?t.not():t,s=o?e.not():e,u=0,l=0,p=null,f=null,c=[];!a.isZero()||!s.isZero();)u=(p=M(a,F))[1].toJSNumber(),n&&(u=F-1-u),l=(f=M(s,F))[1].toJSNumber(),o&&(l=F-1-l),a=p[0],s=f[0],c.push(r(u,l));for(var d=0!==r(n?1:0,o?1:0)?i(-1):i(0),h=c.length-1;h>=0;h-=1)d=d.multiply(F).add(i(c[h]));return d}u.prototype.shiftLeft=function(t){var e=J(t).toJSNumber();if(!R(e))throw new Error(String(e)+" is too large for shifting.");if(e<0)return this.shiftRight(-e);var r=this;if(r.isZero())return r;for(;e>=x;)r=r.multiply(F),e-=x-1;return r.multiply(B[e])},p.prototype.shiftLeft=l.prototype.shiftLeft=u.prototype.shiftLeft,u.prototype.shiftRight=function(t){var e,r=J(t).toJSNumber();if(!R(r))throw new Error(String(r)+" is too large for shifting.");if(r<0)return this.shiftLeft(-r);for(var n=this;r>=x;){if(n.isZero()||n.isNegative()&&n.isUnit())return n;n=(e=M(n,F))[1].isNegative()?e[0].prev():e[0],r-=x-1}return(e=M(n,B[r]))[1].isNegative()?e[0].prev():e[0]},p.prototype.shiftRight=l.prototype.shiftRight=u.prototype.shiftRight,u.prototype.not=function(){return this.negate().prev()},p.prototype.not=l.prototype.not=u.prototype.not,u.prototype.and=function(t){return L(this,t,(function(t,e){return t&e}))},p.prototype.and=l.prototype.and=u.prototype.and,u.prototype.or=function(t){return L(this,t,(function(t,e){return t|e}))},p.prototype.or=l.prototype.or=u.prototype.or,u.prototype.xor=function(t){return L(this,t,(function(t,e){return t^e}))},p.prototype.xor=l.prototype.xor=u.prototype.xor;var U=1<<30;function q(t){var r=t.value,n="number"==typeof r?r|U:"bigint"==typeof r?r|BigInt(U):r[0]+r[1]*e|1073758208;return n&-n}function G(t,e){if(e.compareTo(t)<=0){var r=G(t,e.square(e)),n=r.p,o=r.e,a=n.multiply(e);return a.compareTo(t)<=0?{p:a,e:2*o+1}:{p:n,e:2*o}}return{p:i(1),e:0}}function k(t,e){return t=J(t),e=J(e),t.greater(e)?t:e}function j(t,e){return t=J(t),e=J(e),t.lesser(e)?t:e}function Y(t,e){if(t=J(t).abs(),e=J(e).abs(),t.equals(e))return t;if(t.isZero())return e;if(e.isZero())return t;for(var r,n,i=s[1];t.isEven()&&e.isEven();)r=j(q(t),q(e)),t=t.divide(r),e=e.divide(r),i=i.multiply(r);for(;t.isEven();)t=t.divide(q(t));do{for(;e.isEven();)e=e.divide(q(e));t.greater(e)&&(n=e,e=t,t=n),e=e.subtract(t)}while(!e.isZero());return i.isUnit()?t:t.multiply(i)}u.prototype.bitLength=function(){var t=this;return t.compareTo(i(0))<0&&(t=t.negate().subtract(i(1))),0===t.compareTo(i(0))?i(0):i(G(t,i(2)).e).add(i(1))},p.prototype.bitLength=l.prototype.bitLength=u.prototype.bitLength;var H=function(t,e,r,n){r=r||o,t=String(t),n||(t=t.toLowerCase(),r=r.toLowerCase());var i,a=t.length,s=Math.abs(e),u={};for(i=0;i<r.length;i++)u[r[i]]=i;for(i=0;i<a;i++)if("-"!==(f=t[i])&&f in u&&u[f]>=s){if("1"===f&&1===s)continue;throw new Error(f+" is not a valid digit in base "+e+".")}e=J(e);var l=[],p="-"===t[0];for(i=p?1:0;i<t.length;i++){var f;if((f=t[i])in u)l.push(J(u[f]));else{if("<"!==f)throw new Error(f+" is not a valid character");var c=i;do{i++}while(">"!==t[i]&&i<t.length);l.push(J(t.slice(c+1,i)))}}return V(l,e,p)};function V(t,e,r){var n,i=s[0],o=s[1];for(n=t.length-1;n>=0;n--)i=i.add(t[n].times(o)),o=o.times(e);return r?i.negate():i}function K(t,e){if((e=i(e)).isZero()){if(t.isZero())return{value:[0],isNegative:!1};throw new Error("Cannot convert nonzero numbers to base 0.")}if(e.equals(-1)){if(t.isZero())return{value:[0],isNegative:!1};if(t.isNegative())return{value:[].concat.apply([],Array.apply(null,Array(-t.toJSNumber())).map(Array.prototype.valueOf,[1,0])),isNegative:!1};var r=Array.apply(null,Array(t.toJSNumber()-1)).map(Array.prototype.valueOf,[0,1]);return r.unshift([1]),{value:[].concat.apply([],r),isNegative:!1}}var n=!1;if(t.isNegative()&&e.isPositive()&&(n=!0,t=t.abs()),e.isUnit())return t.isZero()?{value:[0],isNegative:!1}:{value:Array.apply(null,Array(t.toJSNumber())).map(Number.prototype.valueOf,1),isNegative:n};for(var o,a=[],s=t;s.isNegative()||s.compareAbs(e)>=0;){o=s.divmod(e),s=o.quotient;var u=o.remainder;u.isNegative()&&(u=e.minus(u).abs(),s=s.next()),a.push(u.toJSNumber())}return a.push(s.toJSNumber()),{value:a.reverse(),isNegative:n}}function z(t,e,r){var n=K(t,e);return(n.isNegative?"-":"")+n.value.map((function(t){return function(t,e){return t<(e=e||o).length?e[t]:"<"+t+">"}(t,r)})).join("")}function Z(t){if(f(+t)){var e=+t;if(e===y(e))return a?new p(BigInt(e)):new l(e);throw new Error("Invalid integer: "+t)}var r="-"===t[0];r&&(t=t.slice(1));var n=t.split(/e/i);if(n.length>2)throw new Error("Invalid integer: "+n.join("e"));if(2===n.length){var i=n[1];if("+"===i[0]&&(i=i.slice(1)),(i=+i)!==y(i)||!f(i))throw new Error("Invalid integer: "+i+" is not a valid exponent.");var o=n[0],s=o.indexOf(".");if(s>=0&&(i-=o.length-s-1,o=o.slice(0,s)+o.slice(s+1)),i<0)throw new Error("Cannot include negative exponent part for integers");t=o+=new Array(i+1).join("0")}if(!/^([0-9][0-9]*)$/.test(t))throw new Error("Invalid integer: "+t);if(a)return new p(BigInt(r?"-"+t:t));for(var c=[],d=t.length,m=d-7;d>0;)c.push(+t.slice(m,d)),(m-=7)<0&&(m=0),d-=7;return h(c),new u(c,r)}function J(t){return"number"==typeof t?function(t){if(a)return new p(BigInt(t));if(f(t)){if(t!==y(t))throw new Error(t+" is not an integer.");return new l(t)}return Z(t.toString())}(t):"string"==typeof t?Z(t):"bigint"==typeof t?new p(t):t}u.prototype.toArray=function(t){return K(this,t)},l.prototype.toArray=function(t){return K(this,t)},p.prototype.toArray=function(t){return K(this,t)},u.prototype.toString=function(e,r){if(e===t&&(e=10),10!==e)return z(this,e,r);for(var n,i=this.value,o=i.length,a=String(i[--o]);--o>=0;)n=String(i[o]),a+="0000000".slice(n.length)+n;return(this.sign?"-":"")+a},l.prototype.toString=function(e,r){return e===t&&(e=10),10!=e?z(this,e,r):String(this.value)},p.prototype.toString=l.prototype.toString,p.prototype.toJSON=u.prototype.toJSON=l.prototype.toJSON=function(){return this.toString()},u.prototype.valueOf=function(){return parseInt(this.toString(),10)},u.prototype.toJSNumber=u.prototype.valueOf,l.prototype.valueOf=function(){return this.value},l.prototype.toJSNumber=l.prototype.valueOf,p.prototype.valueOf=p.prototype.toJSNumber=function(){return parseInt(this.toString(),10)};for(var W=0;W<1e3;W++)s[W]=J(W),W>0&&(s[-W]=J(-W));return s.one=s[1],s.zero=s[0],s.minusOne=s[-1],s.max=k,s.min=j,s.gcd=Y,s.lcm=function(t,e){return t=J(t).abs(),e=J(e).abs(),t.divide(Y(t,e)).multiply(e)},s.isInstance=function(t){return t instanceof u||t instanceof l||t instanceof p},s.randBetween=function(t,r){var n=j(t=J(t),r=J(r)),i=k(t,r).subtract(n).add(1);if(i.isSmall)return n.add(Math.floor(Math.random()*i));for(var o=K(i,e).value,a=[],u=!0,l=0;l<o.length;l++){var p=u?o[l]:e,f=y(Math.random()*p);a.push(f),f<p&&(u=!1)}return n.add(s.fromArray(a,e,!1))},s.fromArray=function(t,e,r){return V(t.map(J),J(e||10),r)},s}();t.hasOwnProperty("exports")&&(t.exports=i),void 0===(n=function(){return i}.apply(e,[]))||(t.exports=n)}},e={};function r(n){var i=e[n];if(void 0!==i)return i.exports;var o=e[n]={id:n,loaded:!1,exports:{}};return t[n](o,o.exports,r),o.loaded=!0,o.exports}r.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return r.d(e,{a:e}),e},r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.nmd=t=>(t.paths=[],t.children||(t.children=[]),t);var n={};return(()=>{"use strict";r.d(n,{default:()=>j});const t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.streamId=null,this.mediaInfo=null,this.segmentType=null,this.quality=NaN,this.index=NaN,this.bytes=null,this.start=NaN,this.end=NaN,this.duration=NaN,this.representationId=null,this.endFragment=null};var e=function t(){(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")})(this,t),this.tcpid=null,this.type=null,this.url=null,this.actualurl=null,this.range=null,this.trequest=null,this.tresponse=null,this.responsecode=null,this.interval=null,this.trace=[],this.cmsd=null,this._stream=null,this._tfinish=null,this._mediaduration=null,this._quality=null,this._responseHeaders=null,this._serviceLocation=null,this._fileLoaderType=null};function i(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}e.GET="GET",e.HEAD="HEAD",e.MPD_TYPE="MPD",e.XLINK_EXPANSION_TYPE="XLinkExpansion",e.INIT_SEGMENT_TYPE="InitializationSegment",e.INDEX_SEGMENT_TYPE="IndexSegment",e.MEDIA_SEGMENT_TYPE="MediaSegment",e.BITSTREAM_SWITCHING_SEGMENT_TYPE="BitstreamSwitchingSegment",e.MSS_FRAGMENT_INFO_SEGMENT_TYPE="FragmentInfoSegment",e.DVB_REPORTING_TYPE="DVBReporting",e.LICENSE="license",e.CONTENT_STEERING_TYPE="ContentSteering",e.OTHER_TYPE="other";var o=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.action=t.ACTION_DOWNLOAD,this.startTime=NaN,this.mediaStartTime=NaN,this.mediaType=null,this.mediaInfo=null,this.type=null,this.duration=NaN,this.timescale=NaN,this.range=null,this.url=e||null,this.serviceLocation=null,this.requestStartDate=null,this.firstByteDate=null,this.requestEndDate=null,this.quality=NaN,this.index=NaN,this.availabilityStartTime=null,this.availabilityEndTime=null,this.wallStartTime=null,this.bytesLoaded=NaN,this.bytesTotal=NaN,this.delayLoadingTime=NaN,this.responseType="arraybuffer",this.representationId=null}var r,n;return r=t,(n=[{key:"isInitializationRequest",value:function(){return this.type&&this.type===e.INIT_SEGMENT_TYPE}},{key:"setInfo",value:function(t){this.type=t&&t.init?e.INIT_SEGMENT_TYPE:e.MEDIA_SEGMENT_TYPE,this.url=t&&t.url?t.url:null,this.range=t&&t.range?t.range.start+"-"+t.range.end:null,this.mediaType=t&&t.mediaType?t.mediaType:null}}])&&i(r.prototype,n),t}();o.ACTION_DOWNLOAD="download",o.ACTION_COMPLETE="complete";const a=o;function s(t){var r,n,i,o,s,u,l,p,f,c=(t=t||{}).streamProcessor,d=t.baseURLController,h=t.debug;function m(){o&&(n.debug("Stop"),clearTimeout(u),o=!1,l=null,p=null)}function y(){if(o){var t=c.getRepresentationController().getCurrentRepresentation(),r=t.adaptation.period.mpd.manifest.Period_asArray[t.adaptation.period.index].AdaptationSet_asArray[t.adaptation.index],n=r.SegmentTemplate.SegmentTimeline.S_asArray,i=function(t,r,n){var i=t.SegmentTemplate.timescale,o=new a;return o.mediaType=s,o.type=e.MSS_FRAGMENT_INFO_SEGMENT_TYPE,o.startTime=n.t/i,o.duration=n.d/i,o.timescale=i,o.quality=r.index,o.index=f++,o.mediaInfo=c.getMediaInfo(),o.adaptationIndex=r.adaptation.index,o.representationId=r.id,o.url=d.resolve(r.path).url+t.SegmentTemplate.media,o.url=o.url.replace("$Bandwidth$",r.bandwidth),o.url=o.url.replace("$Time$",n.tManifest?n.tManifest:n.t),o.url=o.url.replace("/Fragments(","/FragmentInfo("),o}(r,t,n[n.length-1]);g.call(this,i)}}function g(t){if(c.getFragmentModel().isFragmentLoadedOrPending(t))return n.debug("End of timeline"),void m();i.executeRequest(t)}return r={initialize:function(){s=c.getType(),i=c.getFragmentModel(),o=!1,l=null,p=null},controllerType:"MssFragmentInfoController",start:function(){o||(n.debug("Start"),o=!0,f=0,y())},fragmentInfoLoaded:function(t){if(o){var e,r,i,a=t.request;t.response?(null===l&&(l=(new Date).getTime()),p||(p=a.startTime),r=((new Date).getTime()-l)/1e3,e=a.startTime+a.duration-p,i=Math.max(0,e-r),clearTimeout(u),u=setTimeout((function(){u=null,y()}),1e3*i)):n.error("Load error",a.url)}},getType:function(){return s},reset:function(){m()}},n=h.getLogger(r),r}s.__dashjs_factory_name="MssFragmentInfoController";const u=dashjs.FactoryMaker.getClassFactory(s),l=function t(e,r,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.code=e||null,this.message=r||null,this.data=n||null};function p(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function f(t){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},f(t)}function c(t,e){return c=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},c(t,e)}function d(t,e){return!e||"object"!==f(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function h(t){return h=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},h(t)}const m=new(function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&c(t,e)}(i,t);var e,r,n=(e=i,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,n=h(e);if(r){var i=h(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return d(this,t)});function i(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(t=n.call(this)).MSS_NO_TFRF_CODE=200,t.MSS_UNSUPPORTED_CODEC_CODE=201,t.MSS_NO_TFRF_MESSAGE="Missing tfrf in live media segment",t.MSS_UNSUPPORTED_CODEC_MESSAGE="Unsupported codec",t}return i}(function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r;return e=t,(r=[{key:"extend",value:function(t,e){if(t){var r=!!e&&e.override,n=!!e&&e.publicOnly;for(var i in t)!t.hasOwnProperty(i)||this[i]&&!r||n&&-1===t[i].indexOf("public_")||(this[i]=t[i])}}}])&&p(e.prototype,r),t}()));function y(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function g(t){return g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},g(t)}function v(t,e){return v=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},v(t,e)}function _(t,e){return!e||"object"!==g(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function T(t){return T=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},T(t)}const E=new(function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&v(t,e)}(i,t);var e,r,n=(e=i,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,n=T(e);if(r){var i=T(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return _(this,t)});function i(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(t=n.call(this)).AST_IN_FUTURE="astInFuture",t.BASE_URLS_UPDATED="baseUrlsUpdated",t.BUFFER_EMPTY="bufferStalled",t.BUFFER_LOADED="bufferLoaded",t.BUFFER_LEVEL_STATE_CHANGED="bufferStateChanged",t.BUFFER_LEVEL_UPDATED="bufferLevelUpdated",t.DYNAMIC_TO_STATIC="dynamicToStatic",t.ERROR="error",t.FRAGMENT_LOADING_COMPLETED="fragmentLoadingCompleted",t.FRAGMENT_LOADING_PROGRESS="fragmentLoadingProgress",t.FRAGMENT_LOADING_STARTED="fragmentLoadingStarted",t.FRAGMENT_LOADING_ABANDONED="fragmentLoadingAbandoned",t.LOG="log",t.MANIFEST_LOADING_STARTED="manifestLoadingStarted",t.MANIFEST_LOADING_FINISHED="manifestLoadingFinished",t.MANIFEST_LOADED="manifestLoaded",t.METRICS_CHANGED="metricsChanged",t.METRIC_CHANGED="metricChanged",t.METRIC_ADDED="metricAdded",t.METRIC_UPDATED="metricUpdated",t.PERIOD_SWITCH_STARTED="periodSwitchStarted",t.PERIOD_SWITCH_COMPLETED="periodSwitchCompleted",t.QUALITY_CHANGE_REQUESTED="qualityChangeRequested",t.QUALITY_CHANGE_RENDERED="qualityChangeRendered",t.TRACK_CHANGE_RENDERED="trackChangeRendered",t.STREAM_INITIALIZING="streamInitializing",t.STREAM_UPDATED="streamUpdated",t.STREAM_ACTIVATED="streamActivated",t.STREAM_DEACTIVATED="streamDeactivated",t.STREAM_INITIALIZED="streamInitialized",t.STREAM_TEARDOWN_COMPLETE="streamTeardownComplete",t.TEXT_TRACKS_ADDED="allTextTracksAdded",t.TEXT_TRACK_ADDED="textTrackAdded",t.THROUGHPUT_MEASUREMENT_STORED="throughputMeasurementStored",t.TTML_PARSED="ttmlParsed",t.TTML_TO_PARSE="ttmlToParse",t.CAPTION_RENDERED="captionRendered",t.CAPTION_CONTAINER_RESIZE="captionContainerResize",t.CAN_PLAY="canPlay",t.CAN_PLAY_THROUGH="canPlayThrough",t.PLAYBACK_ENDED="playbackEnded",t.PLAYBACK_ERROR="playbackError",t.PLAYBACK_NOT_ALLOWED="playbackNotAllowed",t.PLAYBACK_METADATA_LOADED="playbackMetaDataLoaded",t.PLAYBACK_LOADED_DATA="playbackLoadedData",t.PLAYBACK_PAUSED="playbackPaused",t.PLAYBACK_PLAYING="playbackPlaying",t.PLAYBACK_PROGRESS="playbackProgress",t.PLAYBACK_RATE_CHANGED="playbackRateChanged",t.PLAYBACK_SEEKED="playbackSeeked",t.PLAYBACK_SEEKING="playbackSeeking",t.PLAYBACK_STALLED="playbackStalled",t.PLAYBACK_STARTED="playbackStarted",t.PLAYBACK_TIME_UPDATED="playbackTimeUpdated",t.PLAYBACK_VOLUME_CHANGED="playbackVolumeChanged",t.PLAYBACK_WAITING="playbackWaiting",t.MANIFEST_VALIDITY_CHANGED="manifestValidityChanged",t.EVENT_MODE_ON_START="eventModeOnStart",t.EVENT_MODE_ON_RECEIVE="eventModeOnReceive",t.CONFORMANCE_VIOLATION="conformanceViolation",t.REPRESENTATION_SWITCH="representationSwitch",t.ADAPTATION_SET_REMOVED_NO_CAPABILITIES="adaptationSetRemovedNoCapabilities",t.CONTENT_STEERING_REQUEST_COMPLETED="contentSteeringRequestCompleted",t.INBAND_PRFT="inbandPrft",t}return i}(function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r;return e=t,(r=[{key:"extend",value:function(t,e){if(t){var r=!!e&&e.override,n=!!e&&e.publicOnly;for(var i in t)!t.hasOwnProperty(i)||this[i]&&!r||n&&-1===t[i].indexOf("public_")||(this[i]=t[i])}}}])&&y(e.prototype,r),t}()));function b(t){var e,r,n,i=(t=t||{}).dashMetrics,o=t.playbackController,a=t.errHandler,s=t.eventBus,u=t.ISOBoxer,p=t.debug;function f(t,e,i,u){var p=u.getRepresentationController().getCurrentRepresentation(),f=p.adaptation.period.mpd.manifest,d=f.Period_asArray[p.adaptation.period.index].AdaptationSet_asArray[p.adaptation.index],h=d.SegmentTemplate.timescale;if(r=u.getType(),"dynamic"===f.type||f.timeShiftBufferDepth)if(e){var y,g,v,_,T=d.SegmentTemplate.SegmentTimeline.S,b=e.entry,A=null,S=null;if(0!==b.length&&(y=b[0],!("static"===f.type&&(g=T[0].tManifest?parseFloat(T[0].tManifest):T[0].t,y.fragment_absolute_time>g+f.timeShiftBufferDepth*h)))){if(g=T[T.length-1].tManifest?parseFloat(T[T.length-1].tManifest):T[T.length-1].t,y.fragment_absolute_time<=g)return v={start:T[0].t/h,end:i.baseMediaDecodeTime/h+t.duration},void c(t.mediaType,v,u.getStreamInfo().manifestInfo);(A={}).t=y.fragment_absolute_time,A.d=y.fragment_duration,T[0].tManifest&&(A.t-=parseFloat(T[0].tManifest)-T[0].t,A.tManifest=y.fragment_absolute_time);var w=T[T.length-1];if(w.t+w.d!==A.t&&(n.debug("Patch segment duration - t = ",w.t+", d = "+w.d+" => "+(A.t-w.t)),w.d=A.t-w.t),T.push(A),"static"!==f.type){if(f.timeShiftBufferDepth&&f.timeShiftBufferDepth>0)for(S=((A=T[T.length-1]).t-f.timeShiftBufferDepth*h)/h,_=((A=T[0]).t+A.d)/h;_<S&&(o.isPaused()||!(o.getTime()<_));)T.splice(0,1),_=((A=T[0]).t+A.d)/h;v={start:T[0].t/h,end:i.baseMediaDecodeTime/h+t.duration},c(r,v,u.getStreamInfo().manifestInfo)}else"video"===r&&(_=((A=T[T.length-1]).t+A.d)/h)>p.adaptation.period.duration&&s.trigger(E.MANIFEST_VALIDITY_CHANGED,{sender:this,newDuration:_})}}else a.error(new l(m.MSS_NO_TFRF_CODE,m.MSS_NO_TFRF_MESSAGE))}function c(t,e,r){if("video"===t||"audio"===t){var a=i.getCurrentDVRInfo(t);(!a||e.end>a.range.end)&&(n.debug("Update DVR range: ["+e.start+" - "+e.end+"]"),i.addDVRInfo(t,o.getTime(),r,e),o.updateCurrentTime(t))}}function d(t,e){var r=8,n=0;for(n=0;n<t.boxes.length;n++){if(t.boxes[n].type===e)return r;r+=t.boxes[n].size}return r}return e={convertFragment:function(t,e){var r,n=u.parseBuffer(t.response),i=n.fetch("tfhd");i.track_ID=t.request.mediaInfo.index+1;var o=n.fetch("tfdt"),a=n.fetch("traf");null===o&&((o=u.createFullBox("tfdt",a,i)).version=1,o.flags=0,o.baseMediaDecodeTime=Math.floor(t.request.startTime*t.request.timescale));var s=n.fetch("trun"),l=n.fetch("tfxd");l&&(l._parent.boxes.splice(l._parent.boxes.indexOf(l),1),l=null);var p=n.fetch("tfrf");f(t.request,p,o,e),p&&(p._parent.boxes.splice(p._parent.boxes.indexOf(p),1),p=null);var c=n.fetch("sepiff");if(null!==c){c.type="senc",c.usertype=void 0;var h=n.fetch("saio");if(null===h){(h=u.createFullBox("saio",a)).version=0,h.flags=0,h.entry_count=1,h.offset=[0];var m=u.createFullBox("saiz",a);if(m.version=0,m.flags=0,m.sample_count=c.sample_count,m.default_sample_info_size=0,m.sample_info_size=[],2&c.flags)for(r=0;r<c.sample_count;r+=1)m.sample_info_size[r]=10+6*c.entry[r].NumberOfEntries;else m.default_sample_info_size=8}}i.flags&=16777214,i.flags|=131072,s.flags|=1;var y=n.fetch("moof"),g=y.getLength();s.data_offset=g+8;var v=n.fetch("saio");if(null!==v){var _=d(y,"traf"),T=d(a,"senc");v.offset[0]=_+T+16}t.response=n.write()},updateSegmentList:function(t,e){if(!t.response)throw new Error("e.response parameter is missing");var r=u.parseBuffer(t.response),n=r.fetch("tfhd");n.track_ID=t.request.mediaInfo.index+1;var i=r.fetch("tfdt"),o=r.fetch("traf");null===i&&((i=u.createFullBox("tfdt",o,n)).version=1,i.flags=0,i.baseMediaDecodeTime=Math.floor(t.request.startTime*t.request.timescale));var a=r.fetch("tfrf");f(t.request,a,i,e),a&&(a._parent.boxes.splice(a._parent.boxes.indexOf(a),1),a=null)},getType:function(){return r}},n=p.getLogger(e),r="",e}b.__dashjs_factory_name="MssFragmentMoofProcessor";const A=dashjs.FactoryMaker.getClassFactory(b);function S(t){var e,r,n,i,o,a,s=(t=t||{}).constants,u=t.ISOBoxer,l=t.protectionController;function p(t,e){u.createBox("frma",t).data_format=function(t){var e,r=0;for(e=0;e<t.length;e+=1)r|=t.charCodeAt(e)<<8*(t.length-e-1);return r}(e)}function f(t){var e=u.createFullBox("schm",t);e.flags=0,e.version=0,e.scheme_type=1667591779,e.scheme_version=65536}function c(t){var e,r;e=u.createBox("schi",t),(r=u.createFullBox("tenc",e)).flags=0,r.version=0,r.default_IsEncrypted=1,r.default_IV_size=8,r.default_KID=i&&i.length>0&&i[0]["cenc:default_KID"]?i[0]["cenc:default_KID"]:[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}function d(t){var e,r=new Uint8Array(t.length/2);for(e=0;e<t.length/2;e+=1)r[e]=parseInt(""+t[2*e]+t[2*e+1],16);return r}return{generateMoov:function(t){var h;if(t&&t.adaptation)return r=(n=t).adaptation,e=r.period,a=r.index+1,i=e.mpd.manifest.Period_asArray[e.index].AdaptationSet_asArray[r.index].ContentProtection,o=e.mpd.manifest.Period_asArray[e.index].AdaptationSet_asArray[r.index].SegmentTemplate.timescale,function(t){var e=u.createBox("ftyp",t);e.major_brand="iso6",e.minor_version=1,e.compatible_brands=[],e.compatible_brands[0]="isom",e.compatible_brands[1]="iso6",e.compatible_brands[2]="msdh"}(h=u.createFile()),function(t){var h=u.createBox("moov",t);!function(t){var r=u.createFullBox("mvhd",t);r.version=1,r.creation_time=0,r.modification_time=0,r.timescale=o,r.duration=e.duration===1/0?0x10000000000000000:Math.round(e.duration*o),r.rate=1,r.volume=1,r.reserved1=0,r.reserved2=[0,0],r.matrix=[1,0,0,0,1,0,0,0,16384],r.pre_defined=[0,0,0,0,0,0],r.next_track_ID=a+1}(h);var y=u.createBox("trak",h);!function(t){var r=u.createFullBox("tkhd",t);r.version=1,r.flags=7,r.creation_time=0,r.modification_time=0,r.track_ID=a,r.reserved1=0,r.duration=e.duration===1/0?0x10000000000000000:Math.round(e.duration*o),r.reserved2=[0,0],r.layer=0,r.alternate_group=0,r.volume=1,r.reserved3=0,r.matrix=[1,0,0,0,1,0,0,0,16384],r.width=n.width,r.height=n.height}(y);var g=u.createBox("mdia",y);!function(t){var n=u.createFullBox("mdhd",t);n.version=1,n.creation_time=0,n.modification_time=0,n.timescale=o,n.duration=e.duration===1/0?0x10000000000000000:Math.round(e.duration*o),n.language=r.lang||"und",n.pre_defined=0}(g),function(t){var e=u.createFullBox("hdlr",t);switch(e.pre_defined=0,r.type){case s.VIDEO:e.handler_type="vide";break;case s.AUDIO:e.handler_type="soun";break;default:e.handler_type="meta"}e.name=n.id,e.reserved=[0,0,0]}(g);var v=u.createBox("minf",g);switch(r.type){case s.VIDEO:!function(t){var e=u.createFullBox("vmhd",t);e.flags=1,e.graphicsmode=0,e.opcolor=[0,0,0]}(v);break;case s.AUDIO:!function(t){var e=u.createFullBox("smhd",t);e.flags=1,e.balance=0,e.reserved=0}(v)}!function(t){var e=u.createFullBox("dref",t);e.entry_count=1,e.entries=[];var r=u.createFullBox("url ",e,!1);r.location="",r.flags=1,e.entries.push(r)}(u.createBox("dinf",v));var _=u.createBox("stbl",v);u.createFullBox("stts",_)._data=[0,0,0,0,0,0,0,0],u.createFullBox("stsc",_)._data=[0,0,0,0,0,0,0,0],u.createFullBox("stco",_)._data=[0,0,0,0,0,0,0,0],u.createFullBox("stsz",_)._data=[0,0,0,0,0,0,0,0,0,0,0,0],function(t){var e=u.createFullBox("stsd",t);switch(e.entries=[],r.type){case s.VIDEO:case s.AUDIO:e.entries.push(function(t){var e=n.codecs.substring(0,n.codecs.indexOf("."));switch(e){case"avc1":return function(t,e){var r;if((r=i?u.createBox("encv",t,!1):u.createBox("avc1",t,!1)).reserved1=[0,0,0,0,0,0],r.data_reference_index=1,r.pre_defined1=0,r.reserved2=0,r.pre_defined2=[0,0,0],r.height=n.height,r.width=n.width,r.horizresolution=72,r.vertresolution=72,r.reserved3=0,r.frame_count=1,r.compressorname=[10,65,86,67,32,67,111,100,105,110,103,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],r.depth=24,r.pre_defined3=65535,r.config=function(){for(var t,e=null,r=15,i=[],o=[],a=0,s=0,u=0,l=n.codecPrivateData.split("00000001").slice(1),p=0;p<l.length;p++)switch(31&(t=d(l[p]))[0]){case 7:i.push(t),r+=t.length+2;break;case 8:o.push(t),r+=t.length+2}i.length>0&&(a=i[0][1],u=i[0][2],s=i[0][3]);var f=0;(e=new Uint8Array(r))[f++]=(4278190080&r)>>24,e[f++]=(16711680&r)>>16,e[f++]=(65280&r)>>8,e[f++]=255&r,e.set([97,118,99,67],f),f+=4,e[f++]=1,e[f++]=a,e[f++]=u,e[f++]=s,e[f++]=255,e[f++]=224|i.length;for(var c=0;c<i.length;c++)e[f++]=(65280&i[c].length)>>8,e[f++]=255&i[c].length,e.set(i[c],f),f+=i[c].length;e[f++]=o.length;for(var h=0;h<o.length;h++)e[f++]=(65280&o[h].length)>>8,e[f++]=255&o[h].length,e.set(o[h],f),f+=o[h].length;return e}(),i){var o=u.createBox("sinf",r);p(o,e),f(o),c(o)}return r}(t,e);case"mp4a":return function(t,e){var r,o,s,l,h;if((r=i?u.createBox("enca",t,!1):u.createBox("mp4a",t,!1)).reserved1=[0,0,0,0,0,0],r.data_reference_index=1,r.reserved2=[0,0],r.channelcount=n.audioChannels,r.samplesize=16,r.pre_defined=0,r.reserved_3=0,r.samplerate=n.audioSamplingRate<<16,r.esds=(s=34+(o=d(n.codecPrivateData)).length,h=0,(l=new Uint8Array(s))[h++]=(4278190080&s)>>24,l[h++]=(16711680&s)>>16,l[h++]=(65280&s)>>8,l[h++]=255&s,l.set([101,115,100,115],h),h+=4,l.set([0,0,0,0],h),h+=4,l[h++]=3,l[h++]=20+o.length,l[h++]=(65280&a)>>8,l[h++]=255&a,l[h++]=0,l[h++]=4,l[h++]=15+o.length,l[h++]=64,l[h]=20,l[h]|=0,l[h++]|=1,l[h++]=255,l[h++]=255,l[h++]=255,l[h++]=(4278190080&n.bandwidth)>>24,l[h++]=(16711680&n.bandwidth)>>16,l[h++]=(65280&n.bandwidth)>>8,l[h++]=255&n.bandwidth,l[h++]=(4278190080&n.bandwidth)>>24,l[h++]=(16711680&n.bandwidth)>>16,l[h++]=(65280&n.bandwidth)>>8,l[h++]=255&n.bandwidth,l[h++]=5,l[h++]=o.length,l.set(o,h),l),i){var m=u.createBox("sinf",r);p(m,e),f(m),c(m)}return r}(t,e);default:throw{code:m.MSS_UNSUPPORTED_CODEC_CODE,message:m.MSS_UNSUPPORTED_CODEC_MESSAGE,data:{codec:e}}}}(e))}e.entry_count=e.entries.length}(_),function(t){var e=u.createFullBox("trex",t);e.track_ID=a,e.default_sample_description_index=1,e.default_sample_duration=0,e.default_sample_size=0,e.default_sample_flags=0}(u.createBox("mvex",h)),i&&l&&function(t,e){var r,n,i;for(i=0;i<e.length;i+=1)(r=e[i].initData)&&(n=u.parseBuffer(r).fetch("pssh"))&&u.Utils.appendBox(t,n)}(h,l.getSupportedKeySystemsFromContentProtection(i))}(h),h.write()}}}S.__dashjs_factory_name="MssFragmentMoovProcessor";const w=dashjs.FactoryMaker.getClassFactory(S);function I(t,e){return t.length===e.length&&t.every((function(t,r){return t===e[r]}))}function N(){this._procFullBox(),1&this.flags&&(this._procField("aux_info_type","uint",32),this._procField("aux_info_type_parameter","uint",32)),this._procField("entry_count","uint",32),this._procFieldArray("offset",this.entry_count,"uint",1===this.version?64:32)}function D(){this._procFullBox(),1&this.flags&&(this._procField("aux_info_type","uint",32),this._procField("aux_info_type_parameter","uint",32)),this._procField("default_sample_info_size","uint",8),this._procField("sample_count","uint",32),0===this.default_sample_info_size&&this._procFieldArray("sample_info_size",this.sample_count,"uint",8)}function M(){this._procFullBox(),this._procField("sample_count","uint",32),1&this.flags&&this._procField("IV_size","uint",8),this._procEntries("entry",this.sample_count,(function(t){this._procEntryField(t,"InitializationVector","data",8),2&this.flags&&(this._procEntryField(t,"NumberOfEntries","uint",16),this._procSubEntries(t,"clearAndCryptedData",t.NumberOfEntries,(function(t){this._procEntryField(t,"BytesOfClearData","uint",16),this._procEntryField(t,"BytesOfEncryptedData","uint",32)})))}))}function P(){I(this.usertype,[109,29,155,5,66,213,68,230,128,226,20,29,175,247,87,178])&&(this._procFullBox(),this._parsing&&(this.type="tfxd"),this._procField("fragment_absolute_time","uint",1===this.version?64:32),this._procField("fragment_duration","uint",1===this.version?64:32)),I(this.usertype,[212,128,126,242,202,57,70,149,142,84,38,203,158,70,167,159])&&(this._procFullBox(),this._parsing&&(this.type="tfrf"),this._procField("fragment_count","uint",8),this._procEntries("entry",this.fragment_count,(function(t){this._procEntryField(t,"fragment_absolute_time","uint",1===this.version?64:32),this._procEntryField(t,"fragment_duration","uint",1===this.version?64:32)}))),I(this.usertype,[162,57,79,82,90,155,79,20,162,68,108,66,124,100,141,244])&&(this._parsing&&(this.type="sepiff"),M.call(this))}function C(t){t=t||{};var r,n,i,o=this.context,a=t.dashMetrics,s=t.playbackController,u=t.eventBus,l=t.protectionController,p=t.ISOBoxer,f=t.debug;return i={generateMoov:function(t){return r.generateMoov(t)},processFragment:function(t,r){if(!t||!t.request||!t.response)throw new Error("e parameter is missing or malformed");"MediaSegment"===t.request.type?n.convertFragment(t,r):t.request.type===e.MSS_FRAGMENT_INFO_SEGMENT_TYPE&&(n.updateSegmentList(t,r),t.sender=null)}},p.addBoxProcessor("uuid",P),p.addBoxProcessor("saio",N),p.addBoxProcessor("saiz",D),p.addBoxProcessor("senc",M),r=w(o).create({protectionController:l,constants:t.constants,ISOBoxer:p}),n=A(o).create({dashMetrics:a,playbackController:s,ISOBoxer:p,eventBus:u,debug:f,errHandler:t.errHandler}),i}C.__dashjs_factory_name="MssFragmentProcessor";const O=dashjs.FactoryMaker.getClassFactory(C);var B=r(2214),x=r.n(B);function F(t){var e,r,n,i=(t=t||{}).BASE64,o=t.debug,a=t.constants,s=t.manifestModel,u=t.settings,l=["AAC","AACL","AACH","AACP","AVC1","H264","TTML","DFXP"],p={CAPT:"main",SUBT:"alternate",DESC:"main"},f={DESC:"2"},c={96e3:0,88200:1,64e3:2,48e3:3,44100:4,32e3:5,24e3:6,22050:7,16e3:8,12e3:9,11025:10,8e3:11,7350:12},d={video:"video/mp4",audio:"audio/mp4",text:"application/mp4"};function h(t,e){var r=t.getAttribute(e);return!!r&&"true"===r.toLowerCase()}function m(t,e){var r,n,i,o,a,s={},u=[],l=t.getAttribute("Name"),c=t.getAttribute("Type"),h=t.getAttribute("Language"),m=h?c+"_"+h:c;if(s.id=l||m,s.contentType=c,s.lang=h||"und",s.mimeType=d[c],s.subType=t.getAttribute("Subtype"),s.maxWidth=t.getAttribute("MaxWidth"),s.maxHeight=t.getAttribute("MaxHeight"),s.subType){if(p[s.subType]){var g={schemeIdUri:"urn:mpeg:dash:role:2011",value:p[s.subType]};s.Role=g,s.Role_asArray=[g]}if(f[s.subType]){var v={schemeIdUri:"urn:tva:metadata:cs:AudioPurposeCS:2007",value:f[s.subType]};s.Accessibility=v,s.Accessibility_asArray=[v]}}for(r=function(t,e){var r,n,i,o={};return r=(r=(i=t.getAttribute("Url"))?i.replace("{bitrate}","$Bandwidth$"):null)?r.replace("{start time}","$Time$"):null,n=(n=t.getAttribute("TimeScale"))?parseFloat(n):e,o.media=r,o.timescale=n,o.SegmentTimeline=function(t,e){var r,n,i,o,a,s,u={},l=t.getElementsByTagName("c"),p=[],f=0;for(o=0;o<l.length;o++)if(r={},(i=l[o].getAttribute("t"))&&x()(i).greater(x()(Number.MAX_SAFE_INTEGER))&&(r.tManifest=i),r.t=parseFloat(i),r.d=parseFloat(l[o].getAttribute("d")),0!==o||r.t||(r.t=0),o>0&&((n=p[p.length-1]).d||(n.tManifest?n.d=x()(i).subtract(x()(n.tManifest)).toJSNumber():n.d=r.t-n.t,f+=n.d),r.t||(n.tManifest?(r.tManifest=x()(n.tManifest).add(x()(n.d)).toString(),r.t=parseFloat(r.tManifest)):r.t=n.t+n.d)),r.d&&(f+=r.d),p.push(r),s=parseFloat(l[o].getAttribute("r")))for(a=0;a<s-1;a++)n=p[p.length-1],(r={}).t=n.t+n.d,r.d=n.d,n.tManifest&&(r.tManifest=x()(n.tManifest).add(x()(n.d)).toString()),f+=r.d,p.push(r);return u.S=p,u.S_asArray=p,u.duration=f/e,u}(t,o.timescale),o.availabilityTimeOffset="INF",o}(t,e),n=t.getElementsByTagName("QualityLevel"),o=0;o<n.length;o++)n[o].BaseURL=s.BaseURL,n[o].mimeType=s.mimeType,a=n[o].getAttribute("Index"),n[o].Id=s.id+(null!==a?"_"+a:""),null!==(i=y(n[o],t))&&(i.SegmentTemplate=r,u.push(i));return 0===u.length?null:(s.Representation=u.length>1?u:u[0],s.Representation_asArray=u,s.SegmentTemplate=r,s)}function y(t,e){var n,i,o={},s=e.getAttribute("Type"),u=null;if(o.id=t.Id,o.bandwidth=parseInt(t.getAttribute("Bitrate"),10),o.mimeType=t.mimeType,n=parseInt(t.getAttribute("MaxWidth"),10),i=parseInt(t.getAttribute("MaxHeight"),10),isNaN(n)||(o.width=n),isNaN(i)||(o.height=i),null!==(u=t.getAttribute("FourCC"))&&""!==u||(u=e.getAttribute("FourCC")),null===u||""===u)if(s===a.AUDIO)u="AAC";else if(s===a.VIDEO)return r.debug('FourCC is not defined whereas it is required for a QualityLevel element for a StreamIndex of type "video"'),null;return-1===l.indexOf(u.toUpperCase())?(r.warn("Codec not supported: "+u),null):("H264"===u||"AVC1"===u?o.codecs=function(t){var e,r=t.getAttribute("CodecPrivateData").toString();return"avc1."+((e=/00000001[0-9]7/.exec(r))&&e[0]?r.substr(r.indexOf(e[0])+10,6):void 0)}(t):u.indexOf("AAC")>=0?(o.codecs=function(t,e){var r,n,i,o,a=parseInt(t.getAttribute("SamplingRate"),10),s=t.getAttribute("CodecPrivateData").toString(),u=0;return"AACH"===e&&(u=5),void 0===s||""===s?(u=2,i=c[a],"AACH"===e?(u=5,s=new Uint8Array(4),o=c[2*a],s[0]=u<<3|i>>1,s[1]=i<<7|t.Channels<<3|o>>1,s[2]=o<<7|8,s[3]=0,(n=new Uint16Array(2))[0]=(s[0]<<8)+s[1],n[1]=(s[2]<<8)+s[3],r=n[0].toString(16),r=n[0].toString(16)+n[1].toString(16)):((s=new Uint8Array(2))[0]=u<<3|i>>1,s[1]=i<<7|parseInt(t.getAttribute("Channels"),10)<<3,(n=new Uint16Array(1))[0]=(s[0]<<8)+s[1],r=n[0].toString(16)),s=(s=""+r).toUpperCase(),t.setAttribute("CodecPrivateData",s)):0===u&&(u=(248&parseInt(s.substr(0,2),16))>>3),"mp4a.40."+u}(t,u),o.audioSamplingRate=parseInt(t.getAttribute("SamplingRate"),10),o.audioChannels=parseInt(t.getAttribute("Channels"),10)):(u.indexOf("TTML")||u.indexOf("DFXP"))&&(o.codecs=a.STPP),o.codecPrivateData=""+t.getAttribute("CodecPrivateData"),o.BaseURL=t.BaseURL,o)}function g(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function v(t){var e,r,o,l,p,f,c,d,y,v,_,T={},E=[],b=t.getElementsByTagName("SmoothStreamingMedia")[0],A=t.getElementsByTagName("Protection")[0],S=null;T.protocol="MSS",T.profiles="urn:mpeg:dash:profile:isoff-live:2011",T.type=h(b,"IsLive")?"dynamic":"static",d=b.getAttribute("TimeScale"),T.timescale=d?parseFloat(d):1e7;var w=parseFloat(b.getAttribute("DVRWindowLength"));"dynamic"!==T.type||0!==w&&!isNaN(w)||(w=1/0),0===w&&h(b,"CanSeek")&&(w=1/0),w>0&&(T.timeShiftBufferDepth=w/T.timescale);var I=parseFloat(b.getAttribute("Duration"));for(T.mediaPresentationDuration=0===I?1/0:I/T.timescale,T.minBufferTime=2,T.ttmlTimeIsRelative=!0,"dynamic"===T.type&&I>0&&(T.type="static",T.timeShiftBufferDepth=I/T.timescale),"dynamic"===T.type&&(T.refreshManifestOnSwitchTrack=!0,T.doNotUpdateDVRWindowOnBufferUpdated=!0,T.ignorePostponeTimePeriod=!0,T.availabilityStartTime=new Date(null)),T.Period=function(t,e){var r,n,i={AdaptationSet_asArray:[]};r=t.getElementsByTagName("StreamIndex");for(var o=0;o<r.length;o++)null!==(n=m(r[o],e))&&i.AdaptationSet_asArray.push(n);return i.AdaptationSet_asArray.length>0&&(i.AdaptationSet=i.AdaptationSet_asArray.length>1?i.AdaptationSet_asArray:i.AdaptationSet_asArray[0]),i}(b,T.timescale),T.Period_asArray=[T.Period],(e=T.Period).start=0,void 0!==A&&((S=t.getElementsByTagName("ProtectionHeader")[0]).firstChild.data=S.firstChild.data.replace(/\n|\r/g,""),l=function(t){var e,r,n;return(e=function(t){var e,r,n,i=0;for(t[i+3],t[i+2],t[i+1],t[i],t[(i+=4)+1],t[i],i+=2;i<t.length;)if(e=(t[i+1]<<8)+t[i],i+=2,1===e)return r=(t[i+1]<<8)+t[i],i+=2,(n=new Uint8Array(r)).set(t.subarray(i,i+r)),n;return null}(i.decodeArray(t.firstChild.data)))&&(e=new Uint16Array(e.buffer),e=String.fromCharCode.apply(null,e),r=(new DOMParser).parseFromString(e,"application/xml").querySelector("KID").textContent,g(n=r=i.decodeArray(r),0,3),g(n,1,2),g(n,4,5),g(n,6,7)),r}(S),o=function(t){var e={__text:t.firstChild.data,__prefix:"mspr"};return{schemeIdUri:"urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95",value:"com.microsoft.playready",pro:e,pro_asArray:e}}(S),o["cenc:default_KID"]=l,E.push(o),o=function(t){var e={schemeIdUri:"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed",value:"com.widevine.alpha"};if(!t)return e;var r=new Uint8Array(2+t.length);r[0]=18,r[1]=16,r.set(t,2);var n=32+r.length,o=new Uint8Array(n),a=0;return o[a++]=(4278190080&n)>>24,o[a++]=(16711680&n)>>16,o[a++]=(65280&n)>>8,o[a++]=255&n,o.set([112,115,115,104,0,0,0,0],a),a+=8,o.set([237,239,139,169,121,214,74,206,163,200,39,220,213,29,33,237],a),a+=16,o[a++]=(4278190080&r.length)>>24,o[a++]=(16711680&r.length)>>16,o[a++]=(65280&r.length)>>8,o[a++]=255&r.length,o.set(r,a),o=String.fromCharCode.apply(null,o),o=i.encodeASCII(o),e.pssh={__text:o},e}(l),o["cenc:default_KID"]=l,E.push(o),T.ContentProtection=E,T.ContentProtection_asArray=E),r=e.AdaptationSet_asArray,v=0;v<r.length;v+=1)r[v].SegmentTemplate.initialization="$Bandwidth$",void 0!==T.ContentProtection&&(r[v].ContentProtection=T.ContentProtection,r[v].ContentProtection_asArray=T.ContentProtection_asArray),"video"===r[v].contentType&&(y=r[v].SegmentTemplate.SegmentTimeline.S_asArray[0].d/r[v].SegmentTemplate.timescale,T.minBufferTime=y,"dynamic"===T.type&&T.timeShiftBufferDepth>0&&T.timeShiftBufferDepth!==1/0&&T.timeShiftBufferDepth>r[v].SegmentTemplate.SegmentTimeline.duration&&(T.timeShiftBufferDepth=r[v].SegmentTemplate.SegmentTimeline.duration));if(T.minBufferTime=Math.min(T.minBufferTime,T.timeShiftBufferDepth?T.timeShiftBufferDepth:1/0),"dynamic"===T.type){var N=u.get().streaming.delay.liveDelay;N||(N=y*(null===u.get().streaming.delay.liveDelayFragmentCount||isNaN(u.get().streaming.delay.liveDelayFragmentCount)?4:u.get().streaming.delay.liveDelayFragmentCount));var D=Math.max(T.timeShiftBufferDepth-10,T.timeShiftBufferDepth/2),M=Math.min(D,N),P=M-1.5*y;n={streaming:{buffer:{stableBufferTime:u.get().streaming.buffer.stableBufferTime,bufferTimeAtTopQuality:u.get().streaming.buffer.bufferTimeAtTopQuality,bufferTimeAtTopQualityLongForm:u.get().streaming.buffer.bufferTimeAtTopQualityLongForm},timeShiftBuffer:{calcFromSegmentTimeline:u.get().streaming.timeShiftBuffer.calcFromSegmentTimeline},delay:{liveDelay:u.get().streaming.delay.liveDelay}}},u.update({streaming:{buffer:{stableBufferTime:P,bufferTimeAtTopQuality:P,bufferTimeAtTopQualityLongForm:P},timeShiftBuffer:{calcFromSegmentTimeline:!0},delay:{liveDelay:M}}})}if(delete T.ContentProtection,delete T.ContentProtection_asArray,"static"===T.type){var C=s.getValue();if(C&&C.timestampOffset)p=C.timestampOffset;else for(v=0;v<r.length;v++)r[v].contentType!==a.AUDIO&&r[v].contentType!==a.VIDEO||(f=(c=r[v].SegmentTemplate.SegmentTimeline.S_asArray)[0].t,void 0===p&&(p=f),p=Math.min(p,f),T.mediaPresentationDuration=Math.min(T.mediaPresentationDuration,r[v].SegmentTemplate.SegmentTimeline.duration));if(p>0){for(T.timestampOffset=p,v=0;v<r.length;v++){for(c=r[v].SegmentTemplate.SegmentTimeline.S_asArray,_=0;_<c.length;_++)c[_].tManifest||(c[_].tManifest=c[_].t.toString()),c[_].t-=p;r[v].contentType!==a.AUDIO&&r[v].contentType!==a.VIDEO||(e.start=Math.max(c[0].t,e.start),r[v].SegmentTemplate.presentationTimeOffset=e.start)}e.start/=T.timescale}}return T.mediaPresentationDuration=Math.floor(1e3*T.mediaPresentationDuration)/1e3,e.duration=T.mediaPresentationDuration,T}return e={parse:function(t){var e,n,i=window.performance.now();e=function(t){var e=null;if(window.DOMParser&&(e=(new window.DOMParser).parseFromString(t,"text/xml")).getElementsByTagName("parsererror").length>0)throw new Error("parsing the manifest failed");return e}(t);var o=window.performance.now();if(null===e)return null;n=v(e,new Date);var a=window.performance.now();return r.info("Parsing complete: (xmlParsing: "+(o-i).toPrecision(3)+"ms, mss2dash: "+(a-o).toPrecision(3)+"ms, total: "+((a-i)/1e3).toPrecision(3)+"s)"),n},getMatchers:function(){return null},getIron:function(){return null},reset:function(){n&&u.update(n)}},r=o.getLogger(e),e}F.__dashjs_factory_name="MssParser";const R=dashjs.FactoryMaker.getClassFactory(F);function L(r){r=r||{};var n,i,o,s,p=this.context,f=r.eventBus,c=r.events,d=r.constants,h=r.initSegmentType,m=r.playbackController,y=r.streamController;function g(t){return y.getActiveStreamProcessors().filter((function(e){return e.getType()===t}))[0]}function v(t){return o.filter((function(e){return e.getType()===t}))[0]}function _(){y.getActiveStreamProcessors().forEach((function(t){if(t.getType()===d.VIDEO||t.getType()===d.AUDIO||t.getType()===d.TEXT){var e=v(t.getType());e||((e=u(p).create({streamProcessor:t,baseURLController:r.baseURLController,debug:r.debug})).initialize(),o.push(e)),e.start()}}))}function T(e){var n=g(e.mediaType);if(n){var o=n.getRepresentationController().getCurrentRepresentation(),s=n.getMediaInfo(),u=new a;u.mediaType=o.adaptation.type,u.type=h,u.range=o.range,u.quality=o.index,u.mediaInfo=s,u.representationId=o.id;var p=function(e,r,n){var i=new t;return i.streamId=r,i.mediaInfo=e.mediaInfo,i.segmentType=e.type,i.start=e.startTime,i.duration=e.duration,i.end=i.start+i.duration,i.index=e.index,i.quality=e.quality,i.representationId=e.representationId,i.endFragment=n,i}(u,s.streamInfo.id,e.type!==c.FRAGMENT_LOADING_PROGRESS);try{p.bytes=i.generateMoov(o),f.trigger(c.INIT_FRAGMENT_LOADED,{chunk:p},{streamId:s.streamInfo.id,mediaType:o.adaptation.type})}catch(e){r.errHandler.error(new l(e.code,e.message,e.data))}e.sender=null}}function E(t){if(!t.error){var r=g(t.request.mediaType);if(r){if(i.processFragment(t,r),t.request.type===e.MSS_FRAGMENT_INFO_SEGMENT_TYPE){var n=v(t.request.mediaType);n&&n.fragmentInfoLoaded(t)}var o=t.request.mediaInfo.streamInfo.manifestInfo;o.isDynamic||o.dvrWindowSize===1/0||_()}}}function b(){m.getIsDynamic()&&0!==m.getTime()&&_()}function A(){m.getIsDynamic()&&0!==m.getTime()&&_()}function S(t){t&&t.data&&(t.data=t.data.replace(/http:\/\/www.w3.org\/2006\/10\/ttaf1/gi,"http://www.w3.org/ns/ttml"))}return s={reset:function(){n&&(n.reset(),n=void 0),f.off(c.INIT_FRAGMENT_NEEDED,T,this),f.off(c.PLAYBACK_PAUSED,b,this),f.off(c.PLAYBACK_SEEKING,A,this),f.off(c.FRAGMENT_LOADING_COMPLETED,E,this),f.off(c.TTML_TO_PARSE,S,this),o.forEach((function(t){t.reset()})),o=[]},createMssParser:function(){return n=R(p).create(r)},createMssFragmentProcessor:function(){i=O(p).create(r)},registerEvents:function(){f.on(c.INIT_FRAGMENT_NEEDED,T,s,{priority:dashjs.FactoryMaker.getSingletonFactoryByName(f.getClassName()).EVENT_PRIORITY_HIGH}),f.on(c.PLAYBACK_PAUSED,b,s,{priority:dashjs.FactoryMaker.getSingletonFactoryByName(f.getClassName()).EVENT_PRIORITY_HIGH}),f.on(c.PLAYBACK_SEEKING,A,s,{priority:dashjs.FactoryMaker.getSingletonFactoryByName(f.getClassName()).EVENT_PRIORITY_HIGH}),f.on(c.FRAGMENT_LOADING_COMPLETED,E,s,{priority:dashjs.FactoryMaker.getSingletonFactoryByName(f.getClassName()).EVENT_PRIORITY_HIGH}),f.on(c.TTML_TO_PARSE,S,s)}},o=[],s}L.__dashjs_factory_name="MssHandler";var U=dashjs.FactoryMaker.getClassFactory(L);U.errors=m,dashjs.FactoryMaker.updateClassFactory(L.__dashjs_factory_name,U);const q=U;var G="undefined"!=typeof window&&window||r.g,k=G.dashjs;k||(k=G.dashjs={}),k.MssHandler=q;const j=k})(),n.default})()));
//# sourceMappingURL=dash.mss.min.js.map

@@ -8,2 +8,2 @@ /*!

/*! codem-isoboxer v0.3.6 https://github.com/madebyhiro/codem-isoboxer/blob/master/LICENSE.txt */
/*! codem-isoboxer v0.3.9 https://github.com/madebyhiro/codem-isoboxer/blob/master/LICENSE.txt */
{
"name": "dashjs",
"version": "4.6.0",
"version": "4.7.0",
"description": "A reference client implementation for the playback of MPEG DASH via Javascript and compliant browsers.",
"author": "Dash Industry Forum",
"license": "BSD-3-Clause",
"main": "dist/dash.all.debug.js",
"main": "dist/dash.all.min.js",
"types": "index.d.ts",

@@ -62,7 +62,7 @@ "scripts": {

"bcp-47-normalize": "^1.1.1",
"codem-isoboxer": "0.3.6",
"codem-isoboxer": "0.3.9",
"es6-promise": "^4.2.8",
"fast-deep-equal": "2.0.1",
"html-entities": "^1.2.1",
"imsc": "^1.0.2",
"imsc": "^1.1.3",
"localforage": "^1.7.1",

@@ -69,0 +69,0 @@ "path-browserify": "^1.0.1",

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc