@theoplayer/theoads 9.5.0 → 9.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/THEOplayer.chromeless.d.ts +1 -1
- package/THEOplayer.chromeless.esm.js +3 -3
- package/THEOplayer.chromeless.js +3 -3
- package/THEOplayer.common.esm.js +3 -3
- package/THEOplayer.d.ts +1 -1
- package/THEOplayer.esm.js +3 -3
- package/THEOplayer.js +3 -3
- package/THEOplayer.transmux.asmjs.js +3 -3
- package/THEOplayer.transmux.js +3 -3
- package/package.json +1 -1
- package/theoplayer.d.js +3 -3
- package/theoplayer.sw.js +3 -3
package/theoplayer.sw.js
CHANGED
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
THEOplayer is based on patented technology developed by
|
|
25
25
|
THEO Technologies (https://www.theoplayer.com).
|
|
26
26
|
|
|
27
|
-
Version: 9.
|
|
28
|
-
Created: 2025-06-
|
|
27
|
+
Version: 9.6.0
|
|
28
|
+
Created: 2025-06-19T12:04:41.838Z
|
|
29
29
|
*/
|
|
30
|
-
!function(t){"use strict";var n,i,e,r,o,u,s,f,c,h=t.window,a=t.document,v=(t.location,t.navigator),d=t.setTimeout,l=t.clearTimeout,w=t.setInterval,b=t.clearInterval,g=t.Error,m=t.TypeError,p=(t.SyntaxError,t.Object),y=t.Math,_=t.parseInt,S=t.parseFloat,T=t.isNaN,E=t.Uint8Array,k=(t.Worker,t.WorkerGlobalScope,t.XMLHttpRequest),I=p.create,R=p.defineProperty,O=p.getOwnPropertyDescriptor,N=p.getOwnPropertyNames,P=p.getPrototypeOf,A=p.prototype.hasOwnProperty,D=function(t,n){return function(){return t&&(n=t(t=0)),n}},C=function(t,n){return function(){return n||t((n={exports:{}}).exports,n),n.exports}},x=D((function(){"function"==typeof Symbol&&Symbol.iterator?(n=Symbol,i=null!=(u=Symbol.for)?u:Symbol,e=Symbol.iterator,r=null!=(s=Symbol.dispose)?s:i("Symbol.dispose"),o=null!=(f=Symbol.asyncDispose)?f:i("Symbol.asyncDispose")):(c=0,n=function(t){return"ul"+t+"_"+ ++c},e=(i=function(t){return"ul"+t})("Symbol.iterator"),r=i("Symbol.dispose"),o=i("Symbol.asyncDispose"),n.for=i,n.iterator=e,n.dispose=r,n.asyncDispose=o)}));function B(t){return t&&void 0!==n&&t.constructor===n?"symbol":typeof t}var M,L,U,F,z,W,H,V,q,X,j,Y,K,G,$,Z,J,Q,tt,nt=D((function(){x(),gt()}));function it(t){var n=this.constructor;return this.then((function(i){return n.resolve(t()).then((function(){return i}))}),(function(i){return n.resolve(t()).then((function(){return n.reject(i)}))}))}function et(t){return new this((function(n,i){if(!t||void 0===t.length)return i(new m((void 0===t?"undefined":B(t))+" "+t+" is not iterable(cannot read property Symbol(Symbol.iterator))"));var e=Array.prototype.slice.call(t);if(0===e.length)return n([]);var r=e.length;function o(t,i){if(i&&("object"===(void 0===i?"undefined":B(i))||"function"==typeof i)){var u=i.then;if("function"==typeof u)return void u.call(i,(function(n){o(t,n)}),(function(i){e[t]={status:"rejected",reason:i},0==--r&&n(e)}))}e[t]={status:"fulfilled",value:i},0==--r&&n(e)}for(var u=0;u<e.length;u++)o(u,e[u])}))}function rt(t){return Boolean(t&&void 0!==t.length)}function ot(){}function ut(t){if(!(this instanceof ut))throw new m("Promises must be constructed via new");if("function"!=typeof t)throw new m("not a function");this.Fa=0,this.ttn=!1,this.tkt=void 0,this.ntn=[],vt(t,this)}function st(t,n){for(;3===t.Fa;)t=t.tkt;0!==t.Fa?(t.ttn=!0,ut.itn((function(){var i=1===t.Fa?n.onFulfilled:n.onRejected;if(null!==i){var e;try{e=i(t.tkt)}catch(t){return void ct(n.promise,t)}ft(n.promise,e)}else(1===t.Fa?ft:ct)(n.promise,t.tkt)}))):t.ntn.push(n)}function ft(t,n){try{if(n===t)throw new m("A promise cannot be resolved with itself.");if(n&&("object"===(void 0===n?"undefined":B(n))||"function"==typeof n)){var i=n.then;if(n instanceof ut)return t.Fa=3,t.tkt=n,void ht(t);if("function"==typeof i)return void vt(function(t,n){return function(){t.apply(n,arguments)}}(i,n),t)}t.Fa=1,t.tkt=n,ht(t)}catch(n){ct(t,n)}}function ct(t,n){t.Fa=2,t.tkt=n,ht(t)}function ht(t){2===t.Fa&&0===t.ntn.length&&ut.itn((function(){t.ttn||ut.rtn(t.tkt)}));for(var n=0,i=t.ntn.length;n<i;n++)st(t,t.ntn[n]);t.ntn=null}function at(t,n,i){this.onFulfilled="function"==typeof t?t:null,this.onRejected="function"==typeof n?n:null,this.promise=i}function vt(t,n){var i=!1;try{t((function(t){i||(i=!0,ft(n,t))}),(function(t){i||(i=!0,ct(n,t))}))}catch(t){if(i)return;i=!0,ct(n,t)}}function dt(t){return new Y(j,{reason:t,promise:L.reject(t).catch((function(){})),cancelable:!0})}function lt(t){var n=new K(j,{detail:{reason:t},cancelable:!0});return p.defineProperty(n,"reason",{value:t}),n}function wt(t){var n=a.createEvent("CustomEvent");return n.initCustomEvent(j,!1,!0,{reason:t}),n}var bt=D((function(){var t,n,i,e;x(),gt(),nt(),M=d,ut.prototype.catch=function(t){return this.then(null,t)},ut.prototype.then=function(t,n){var i=new this.constructor(ot);return st(this,new at(t,n,i)),i},ut.prototype.finally=it,ut.all=function(t){return new ut((function(n,i){if(!rt(t))return i(new m("Promise.all accepts an array"));var e=Array.prototype.slice.call(t);if(0===e.length)return n([]);var r=e.length;function o(t,u){try{if(u&&("object"===(void 0===u?"undefined":B(u))||"function"==typeof u)){var s=u.then;if("function"==typeof s)return void s.call(u,(function(n){o(t,n)}),i)}e[t]=u,0==--r&&n(e)}catch(t){i(t)}}for(var u=0;u<e.length;u++)o(u,e[u])}))},ut.allSettled=et,ut.resolve=function(t){return t&&"object"===(void 0===t?"undefined":B(t))&&t.constructor===ut?t:new ut((function(n){n(t)}))},ut.reject=function(t){return new ut((function(n,i){i(t)}))},ut.race=function(t){return new ut((function(n,i){if(!rt(t))return i(new m("Promise.race accepts an array"));for(var e=0,r=t.length;e<r;e++)ut.resolve(t[e]).then(n,i)}))},ut.itn="function"==typeof setImmediate&&function(t){setImmediate(t)}||function(t){M(t,0)},ut.rtn=function(t){"undefined"!=typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",t)},L=function(){var t=self.Promise;if(void 0!==t)try{if(-1!==t.toString().indexOf("[native code]"))return t}catch(t){}}(),U=v?v.userAgent:"",F=U.match(/Firefox\/([0-9]+)/i),z=null!=F,W=F?Number(F[1]):0,H=U.match(/(Version)\/((\d+)\.(\d+)(?:\.(\d+))?).*Safari/),V=null!=H,q=H?Number(H[3]):0,X=function(){function t(t){this.Qb=0,this.Rd=0,this.kp=[],this.etn=t}return t.prototype.utn=function(t){var n=this.length();this.stn(n+1);var i=this.Rd+n&this.etn-1;this.kp[i]=t,this.Qb=n+1},t.prototype.push=function(t){var n=this.length()+1;if(this.etn<n)this.utn(t);else{var i=this.Rd+n-1,e=this.etn-1;this.kp[i&e]=t,this.Qb=n}},t.prototype.shift=function(){var t=this.Rd,n=this.kp[t];return this.kp[t]=void 0,this.Rd=t+1&this.etn-1,this.Qb--,n},t.prototype.length=function(){return this.Qb},t.prototype.stn=function(t){this.etn<t&&this.otn(this.etn<<1)},t.prototype.otn=function(t){var n=this.etn;this.etn=t;var i=this.Rd+this.Qb&n-1;!function(t,n,i,e){for(var r=0;r<e;++r)t[r+i]=t[r+n],t[r+n]=void 0}(this.kp,0,n,i)},t}(),j="unhandledrejection",Y=self.PromiseRejectionEvent,K=self.CustomEvent,G=function(t){return G=function(){try{var t=L.resolve(),n="error",i=new Y(j,{reason:n,promise:t});return j===i.type&&n===i.reason}catch(t){}return!1}()?dt:function(){try{var t="error",n=new K(j,{detail:{reason:t}});return j===n.type&&t===n.detail.reason}catch(t){}return!1}()?lt:wt,G(t)},Z=z&&W<60||V&&q<15,L&&!Z?(J=L,function(){}):(J=ut,Q=null!==($=function(){var t=self.queueMicrotask;if("function"==typeof t)return function(n){return t(n)};var n=L;if(n&&"function"==typeof n.resolve){var i=n.resolve();return function(t){return i.then(t)}}}())&&void 0!==$?$:ut.itn,t=Q,n=new X(16),i=!1,(tt={x6:function(r){n.push(r),i||(i=!0,t(e))},bY:e=function(){for(;n.length()>0;)n.shift()();i=!1}}).bY,ut.itn=tt.x6,ut.rtn=function(t){try{var n=G(t);if(!self.dispatchEvent(n)||n.defaultPrevented)return}catch(t){}d((function(){throw new g("Unhandled promise rejection: ".concat(t))}),0)})})),gt=D((function(){bt()})),mt=C((function(t,i){var r,o;x(),gt(),nt(),r=t,o=function(t){var i="function"==typeof n&&"symbol"===B(e)?n:function(t){return"Symbol("+t+")"};function r(){}var o=Number.isNaN||function(t){return t!=t},u=r;function s(t){return"object"===(void 0===t?"undefined":B(t))&&null!==t||"function"==typeof t}function f(t){return t.slice()}function c(t,n,i,e,r){new E(t).set(new E(i,e,r),n)}function h(t){return!1!==function(t){return"number"==typeof t&&(!o(t)&&!(t<0))}(t)&&t!==1/0}function a(t,n,i){if("function"!=typeof t)throw new m("Argument is not a function");return Function.prototype.apply.call(t,n,i)}function v(t,n,i,e){var r=t[n];if(void 0!==r){if("function"!=typeof r)throw new m(r+" is not a method");switch(i){case 0:return function(){return l(r,t,e)};case 1:return function(n){var i=[n].concat(e);return l(r,t,i)}}}return function(){return R(void 0)}}function d(t,n,i){var e=t[n];if(void 0!==e)return a(e,t,i)}function l(t,n,i){try{return R(a(t,n,i))}catch(t){return O(t)}}function w(t){if(t=Number(t),o(t)||t<0)throw new RangeError("highWaterMark property of a queuing strategy must be non-negative and non-NaN");return t}function b(t){if(void 0===t)return function(){return 1};if("function"!=typeof t)throw new m("size property of a queuing strategy must be a function");return function(n){return t(n)}}var _=J,S=J.prototype.then,T=J.resolve.bind(_),k=J.reject.bind(_);function I(t){return new _(t)}function R(t){return T(t)}function O(t){return k(t)}function N(t,n,i){return S.call(t,n,i)}function P(t,n,i){N(N(t,n,i),void 0,u)}function A(t,n){P(t,n)}function D(t,n){P(t,void 0,n)}function C(t,n,i){return N(t,n,i)}function x(t){N(t,void 0,u)}var M=function(){function t(){this.hd=0,this.Ed=0,this.Rd={Id:[],Dd:void 0},this.Nd=this.Rd,this.hd=0,this.Ed=0}return p.defineProperty(t.prototype,"length",{get:function(){return this.Ed},enumerable:!0,configurable:!0}),t.prototype.push=function(t){var n=this.Nd,i=n;16383===n.Id.length&&(i={Id:[],Dd:void 0}),n.Id.push(t),i!==n&&(this.Nd=i,n.Dd=i),++this.Ed},t.prototype.shift=function(){var t=this.Rd,n=t,i=this.hd,e=i+1,r=t.Id,o=r[i];return 16384===e&&(n=t.Dd,e=0),--this.Ed,this.hd=e,t!==n&&(this.Rd=n),r[i]=void 0,o},t.prototype.forEach=function(t){for(var n=this.hd,i=this.Rd,e=i.Id;!(n===e.length&&void 0===i.Dd||n===e.length&&(n=0,0===(e=(i=i.Dd).Id).length));)t(e[n]),++n},t.prototype.peek=function(){var t=this.Rd,n=this.hd;return t.Id[n]},t}();function L(t,n,i){var e=null;!0===i&&(e=p.prototype);var r=p.create(e);return r.value=t,r.done=n,r}function U(t,n){t.Ld=!0,t.Bd=n,n.Od=t,"readable"===n.Fa?H(t):"closed"===n.Fa?function(t){H(t),X(t)}(t):V(t,n.Fd)}function F(t,n){return Zn(t.Bd,n)}function z(t){"readable"===t.Bd.Fa?q(t,new m("Reader was released and can no longer be used to monitor the stream's closedness")):function(t,n){V(t,n)}(t,new m("Reader was released and can no longer be used to monitor the stream's closedness")),t.Bd.Od=void 0,t.Bd=void 0}function W(t){return new m("Cannot "+t+" a stream using a released reader")}function H(t){t.Vd=I((function(n,i){t.Wd=n,t.Ud=i}))}function V(t,n){H(t),q(t,n)}function q(t,n){x(t.Vd),t.Ud(n),t.Wd=void 0,t.Ud=void 0}function X(t){t.Wd(void 0),t.Wd=void 0,t.Ud=void 0}var j=i("[[CancelSteps]]"),Y=i("[[PullSteps]]");function K(t,n){void 0===n&&(n=!1);var i=new it(t);return i.Ld=n,i}function G(t){return I((function(n,i){var e={Gd:n,Hd:i};t.Od.Zd.push(e)}))}function $(t,n,i){var e=t.Od;e.Zd.shift().Gd(L(n,i,e.Ld))}function Z(t){return t.Od.Zd.length}function Q(t){var n=t.Od;return void 0!==n&&!!et(n)}var tt,nt,it=function(){function t(t){if(!1===Gn(t))throw new m("ReadableStreamDefaultReader can only be constructed with a ReadableStream instance");if(!0===$n(t))throw new m("This stream has already been locked for exclusive reading by another reader");U(this,t),this.Zd=new M}return p.defineProperty(t.prototype,"closed",{get:function(){return et(this)?this.Vd:O(ot("closed"))},enumerable:!0,configurable:!0}),t.prototype.cancel=function(t){return et(this)?void 0===this.Bd?O(W("cancel")):F(this,t):O(ot("cancel"))},t.prototype.read=function(){return et(this)?void 0===this.Bd?O(W("read from")):rt(this):O(ot("read"))},t.prototype.releaseLock=function(){if(!et(this))throw ot("releaseLock");if(void 0!==this.Bd){if(this.Zd.length>0)throw new m("Tried to release a reader lock when that reader has pending read() calls un-settled");z(this)}},t}();function et(t){return!!s(t)&&!!p.prototype.hasOwnProperty.call(t,"Zd")}function rt(t){var n=t.Bd;return n.Xd=!0,"closed"===n.Fa?R(L(void 0,!0,t.Ld)):"errored"===n.Fa?O(n.Fd):n.zd[Y]()}function ot(t){return new m("ReadableStreamDefaultReader.prototype."+t+" can only be used on a ReadableStreamDefaultReader")}"symbol"===B(i.asyncIterator)&&((tt={})[i.asyncIterator]=function(){return this},nt=tt,p.defineProperty(nt,i.asyncIterator,{enumerable:!1}));var ut={next:function(){if(!1===st(this))return O(ft("next"));var t=this.qd;return void 0===t.Bd?O(W("iterate")):C(rt(t),(function(n){var i=n.done;return i&&z(t),L(n.value,i,!0)}))},return:function(t){if(!1===st(this))return O(ft("next"));var n=this.qd;if(void 0===n.Bd)return O(W("finish iterating"));if(n.Zd.length>0)return O(new m("Tried to release a reader lock when that reader has pending read() calls un-settled"));if(!1===this.Yd){var i=F(n,t);return z(n),C(i,(function(){return L(t,!0,!0)}))}return z(n),R(L(t,!0,!0))}};function st(t){return!!s(t)&&!!p.prototype.hasOwnProperty.call(t,"qd")}function ft(t){return new m("ReadableStreamAsyncIterator."+t+" can only be used on a ReadableSteamAsyncIterator")}function ct(t){var n=t.Kd.shift();return t.Qd-=n.size,t.Qd<0&&(t.Qd=0),n.value}function ht(t,n,i){if(!h(i=Number(i)))throw new RangeError("Size must be a finite, non-NaN, non-negative number.");t.Kd.push({value:n,size:i}),t.Qd+=i}function at(t){t.Kd=new M,t.Qd=0}void 0!==nt&&p.setPrototypeOf(ut,nt),p.defineProperty(ut,"next",{enumerable:!1}),p.defineProperty(ut,"return",{enumerable:!1});var vt=i("[[AbortSteps]]"),dt=i("[[ErrorSteps]]"),lt=function(){function t(t,n){void 0===t&&(t={}),void 0===n&&(n={}),bt(this);var i=n.size,e=n.highWaterMark;if(void 0!==t.type)throw new RangeError("Invalid type is specified");var r=b(i);void 0===e&&(e=1),function(t,n,i,e){var r=p.create(xt.prototype);function o(){return d(n,"start",[r])}var u=v(n,"write",1,[r]),s=v(n,"close",0,[]),f=v(n,"abort",1,[]);Bt(t,r,o,u,s,f,i,e)}(this,t,e=w(e),r)}return p.defineProperty(t.prototype,"locked",{get:function(){if(!1===gt(this))throw Ht("locked");return mt(this)},enumerable:!0,configurable:!0}),t.prototype.abort=function(t){return!1===gt(this)?O(Ht("abort")):!0===mt(this)?O(new m("Cannot abort a stream that already has a writer")):pt(this,t)},t.prototype.close=function(){return!1===gt(this)?O(Ht("close")):!0===mt(this)?O(new m("Cannot close a stream that already has a writer")):!0===Et(this)?O(new m("Cannot close an already-closing stream")):yt(this)},t.prototype.getWriter=function(){if(!1===gt(this))throw Ht("getWriter");return wt(this)},t}();function wt(t){return new Rt(t)}function bt(t){t.Fa="writable",t.Fd=void 0,t.Jd=void 0,t.$d=void 0,t.tf=new M,t.ef=void 0,t.nf=void 0,t.rf=void 0,t.hf=void 0,t.uf=!1}function gt(t){return!!s(t)&&!!p.prototype.hasOwnProperty.call(t,"$d")}function mt(t){return void 0!==t.Jd}function pt(t,n){var i=t.Fa;if("closed"===i||"errored"===i)return R(void 0);if(void 0!==t.hf)return t.hf.cf;var e=!1;"erroring"===i&&(e=!0,n=void 0);var r=I((function(i,r){t.hf={cf:void 0,Gd:i,Hd:r,lf:n,df:e}}));return t.hf.cf=r,!1===e&&St(t,n),r}function yt(t){var n=t.Fa;if("closed"===n||"errored"===n)return O(new m("The stream (in "+n+" state) is not in the writable state and cannot be closed"));var i=I((function(n,i){var e={Gd:n,Hd:i};t.nf=e})),e=t.Jd;return void 0!==e&&!0===t.uf&&"writable"===n&&Qt(e),function(t){ht(t,"close",0),Ut(t)}(t.$d),i}function _t(t,n){"writable"!==t.Fa?Tt(t):St(t,n)}function St(t,n){var i=t.$d;t.Fa="erroring",t.Fd=n;var e=t.Jd;void 0!==e&&At(e,n),!1===function(t){return void 0!==t.ef||void 0!==t.rf}(t)&&!0===i._f&&Tt(t)}function Tt(t){t.Fa="errored",t.$d[dt]();var n=t.Fd;if(t.tf.forEach((function(t){t.Hd(n)})),t.tf=new M,void 0!==t.hf){var i=t.hf;if(t.hf=void 0,!0===i.df)return i.Hd(n),void kt(t);P(t.$d[vt](i.lf),(function(){i.Gd(),kt(t)}),(function(n){i.Hd(n),kt(t)}))}else kt(t)}function Et(t){return void 0!==t.nf||void 0!==t.rf}function kt(t){void 0!==t.nf&&(t.nf.Hd(t.Fd),t.nf=void 0);var n=t.Jd;void 0!==n&&Yt(n,t.Fd)}function It(t,n){var i=t.Jd;void 0!==i&&n!==t.uf&&(!0===n?function(t){Gt(t)}(i):Qt(i)),t.uf=n}var Rt=function(){function t(t){if(!1===gt(t))throw new m("WritableStreamDefaultWriter can only be constructed with a WritableStream instance");if(!0===mt(t))throw new m("This stream has already been locked for exclusive writing by another writer");this.vf=t,t.Jd=this;var n=t.Fa;if("writable"===n)!1===Et(t)&&!0===t.uf?Gt(this):Zt(this),Xt(this);else if("erroring"===n)$t(this,t.Fd),Xt(this);else if("closed"===n)Zt(this),function(t){Xt(t),Kt(t)}(this);else{var i=t.Fd;$t(this,i),jt(this,i)}}return p.defineProperty(t.prototype,"closed",{get:function(){return!1===Ot(this)?O(Vt("closed")):this.Vd},enumerable:!0,configurable:!0}),p.defineProperty(t.prototype,"desiredSize",{get:function(){if(!1===Ot(this))throw Vt("desiredSize");if(void 0===this.vf)throw qt("desiredSize");return function(t){var n=t.vf,i=n.Fa;return"errored"===i||"erroring"===i?null:"closed"===i?0:Lt(n.$d)}(this)},enumerable:!0,configurable:!0}),p.defineProperty(t.prototype,"ready",{get:function(){return!1===Ot(this)?O(Vt("ready")):this.gf},enumerable:!0,configurable:!0}),t.prototype.abort=function(t){return!1===Ot(this)?O(Vt("abort")):void 0===this.vf?O(qt("abort")):function(t,n){var i=t.vf;return pt(i,n)}(this,t)},t.prototype.close=function(){if(!1===Ot(this))return O(Vt("close"));var t=this.vf;return void 0===t?O(qt("close")):!0===Et(t)?O(new m("Cannot close an already-closing stream")):Nt(this)},t.prototype.releaseLock=function(){if(!1===Ot(this))throw Vt("releaseLock");void 0!==this.vf&&Dt(this)},t.prototype.write=function(t){return!1===Ot(this)?O(Vt("write")):void 0===this.vf?O(qt("write to")):Ct(this,t)},t}();function Ot(t){return!!s(t)&&!!p.prototype.hasOwnProperty.call(t,"vf")}function Nt(t){return yt(t.vf)}function Pt(t,n){"pending"===t.mf?Yt(t,n):function(t,n){jt(t,n)}(t,n)}function At(t,n){"pending"===t.pf?Jt(t,n):function(t,n){$t(t,n)}(t,n)}function Dt(t){var n=t.vf,i=new m("Writer was released and can no longer be used to monitor the stream's closedness");At(t,i),Pt(t,i),n.Jd=void 0,t.vf=void 0}function Ct(t,n){var i=t.vf,e=i.$d,r=function(t,n){try{return t.wf(n)}catch(n){return Ft(t,n),1}}(e,n);if(i!==t.vf)return O(qt("write to"));var o=i.Fa;if("errored"===o)return O(i.Fd);if(!0===Et(i)||"closed"===o)return O(new m("The stream is closing or closed and cannot be written to"));if("erroring"===o)return O(i.Fd);var u=function(t){return I((function(n,i){var e={Gd:n,Hd:i};t.tf.push(e)}))}(i);return function(t,n,i){var e={chunk:n};try{ht(t,e,i)}catch(n){return void Ft(t,n)}var r=t.yf;!1===Et(r)&&"writable"===r.Fa&&It(r,zt(t)),Ut(t)}(e,n,r),u}var xt=function(){function t(){throw new m("WritableStreamDefaultController cannot be constructed explicitly")}return t.prototype.error=function(t){if(!1===function(t){return!!s(t)&&!!p.prototype.hasOwnProperty.call(t,"yf")}(this))throw new m("WritableStreamDefaultController.prototype.error can only be used on a WritableStreamDefaultController");"writable"===this.yf.Fa&&Wt(this,t)},t.prototype[vt]=function(t){var n=this.bf(t);return Mt(this),n},t.prototype[dt]=function(){at(this)},t}();function Bt(t,n,i,e,r,o,u,s){n.yf=t,t.$d=n,n.Kd=void 0,n.Qd=void 0,at(n),n._f=!1,n.wf=s,n.Af=u,n.Sf=e,n.Tf=r,n.bf=o;var f=zt(n);It(t,f),P(R(i()),(function(){n._f=!0,Ut(n)}),(function(i){n._f=!0,_t(t,i)}))}function Mt(t){t.Sf=void 0,t.Tf=void 0,t.bf=void 0,t.wf=void 0}function Lt(t){return t.Af-t.Qd}function Ut(t){var n=t.yf;if(!1!==t._f&&void 0===n.ef)if("erroring"!==n.Fa){if(0!==t.Kd.length){var i=function(t){return t.Kd.peek().value}(t);"close"===i?function(t){var n=t.yf;(function(t){t.rf=t.nf,t.nf=void 0})(n),ct(t);var i=t.Tf();Mt(t),P(i,(function(){!function(t){t.rf.Gd(void 0),t.rf=void 0,"erroring"===t.Fa&&(t.Fd=void 0,void 0!==t.hf&&(t.hf.Gd(),t.hf=void 0)),t.Fa="closed";var n=t.Jd;void 0!==n&&Kt(n)}(n)}),(function(t){!function(t,n){t.rf.Hd(n),t.rf=void 0,void 0!==t.hf&&(t.hf.Hd(n),t.hf=void 0),_t(t,n)}(n,t)}))}(t):function(t,n){var i=t.yf;!function(t){t.ef=t.tf.shift()}(i);var e=t.Sf(n);P(e,(function(){!function(t){t.ef.Gd(void 0),t.ef=void 0}(i);var n=i.Fa;if(ct(t),!1===Et(i)&&"writable"===n){var e=zt(t);It(i,e)}Ut(t)}),(function(n){"writable"===i.Fa&&Mt(t),function(t,n){t.ef.Hd(n),t.ef=void 0,_t(t,n)}(i,n)}))}(t,i.chunk)}}else Tt(n)}function Ft(t,n){"writable"===t.yf.Fa&&Wt(t,n)}function zt(t){return Lt(t)<=0}function Wt(t,n){var i=t.yf;Mt(t),St(i,n)}function Ht(t){return new m("WritableStream.prototype."+t+" can only be used on a WritableStream")}function Vt(t){return new m("WritableStreamDefaultWriter.prototype."+t+" can only be used on a WritableStreamDefaultWriter")}function qt(t){return new m("Cannot "+t+" a stream using a released writer")}function Xt(t){t.Vd=I((function(n,i){t.Wd=n,t.Ud=i,t.mf="pending"}))}function jt(t,n){Xt(t),Yt(t,n)}function Yt(t,n){x(t.Vd),t.Ud(n),t.Wd=void 0,t.Ud=void 0,t.mf="rejected"}function Kt(t){t.Wd(void 0),t.Wd=void 0,t.Ud=void 0,t.mf="resolved"}function Gt(t){t.gf=I((function(n,i){t.kf=n,t.Ef=i})),t.pf="pending"}function $t(t,n){Gt(t),Jt(t,n)}function Zt(t){Gt(t),Qt(t)}function Jt(t,n){x(t.gf),t.Ef(n),t.kf=void 0,t.Ef=void 0,t.pf="rejected"}function Qt(t){t.kf(void 0),t.kf=void 0,t.Ef=void 0,t.pf="fulfilled"}function tn(t){if("object"!==(void 0===t?"undefined":B(t))||null===t)return!1;try{return"boolean"==typeof t.aborted}catch(t){return!1}}var nn,en="undefined"!=typeof DOMException?DOMException:void 0,rn=function(t){if("function"!=typeof t&&"object"!==(void 0===t?"undefined":B(t)))return!1;try{return new t,!0}catch(t){return!1}}(en)?en:((nn=function(t,n){this.message=t||"",this.name=n||"Error",g.captureStackTrace&&g.captureStackTrace(this,this.constructor)}).prototype=p.create(g.prototype),p.defineProperty(nn.prototype,"constructor",{value:nn,writable:!0,configurable:!0}),nn);function on(t,n,i,e,o,u){var s=K(t),f=wt(n);t.Xd=!0;var c=!1,h=R(void 0);return I((function(a,v){var d,l,w,b;if(void 0!==u){if(d=function(){var i=new rn("Aborted","AbortError"),r=[];!1===e&&r.push((function(){return"writable"===n.Fa?pt(n,i):R(void 0)})),!1===o&&r.push((function(){return"readable"===t.Fa?Zn(t,i):R(void 0)})),_((function(){return J.all(r.map((function(t){return t()})))}),!0,i)},!0===u.aborted)return void d();u.addEventListener("abort",d)}if(y(t,s.Vd,(function(t){!1===e?_((function(){return pt(n,t)}),!0,t):S(!0,t)})),y(n,f.Vd,(function(n){!1===o?_((function(){return Zn(t,n)}),!0,n):S(!0,n)})),l=t,w=s.Vd,b=function(){!1===i?_((function(){return function(t){var n=t.vf,i=n.Fa;return!0===Et(n)||"closed"===i?R(void 0):"errored"===i?O(n.Fd):Nt(t)}(f)})):S()},"closed"===l.Fa?b():A(w,b),!0===Et(n)||"closed"===n.Fa){var g=new m("the destination writable stream closed before all data could be piped to it");!1===o?_((function(){return Zn(t,g)}),!0,g):S(!0,g)}function p(){var t=h;return N(h,(function(){return t!==h?p():void 0}))}function y(t,n,i){"errored"===t.Fa?i(t.Fd):D(n,i)}function _(t,i,e){function r(){P(t(),(function(){return T(i,e)}),(function(t){return T(!0,t)}))}!0!==c&&(c=!0,"writable"===n.Fa&&!1===Et(n)?A(p(),r):r())}function S(t,i){!0!==c&&(c=!0,"writable"===n.Fa&&!1===Et(n)?A(p(),(function(){return T(t,i)})):T(t,i))}function T(t,n){Dt(f),z(s),void 0!==u&&u.removeEventListener("abort",d),t?v(n):a(void 0)}x(I((function(t,n){!function i(e){e?t():N(!0===c?R(!0):N(f.gf,(function(){return N(rt(s),(function(t){return!0===t.done||(h=N(Ct(f,t.value),void 0,r),!1)}))})),i,n)}(!1)})))}))}var un=function(){function t(){throw new m}return p.defineProperty(t.prototype,"desiredSize",{get:function(){if(!1===sn(this))throw gn("desiredSize");return ln(this)},enumerable:!0,configurable:!0}),t.prototype.close=function(){if(!1===sn(this))throw gn("close");if(!1===wn(this))throw new m("The stream is not in a state that permits close");an(this)},t.prototype.enqueue=function(t){if(!1===sn(this))throw gn("enqueue");if(!1===wn(this))throw new m("The stream is not in a state that permits enqueue");return vn(this,t)},t.prototype.error=function(t){if(!1===sn(this))throw gn("error");dn(this,t)},t.prototype[j]=function(t){at(this);var n=this.xf(t);return hn(this),n},t.prototype[Y]=function(){var t=this.Rf;if(this.Kd.length>0){var n=ct(this);return!0===this.If&&0===this.Kd.length?(hn(this),Jn(t)):fn(this),R(L(n,!1,t.Od.Ld))}var i=G(t);return fn(this),i},t}();function sn(t){return!!s(t)&&!!p.prototype.hasOwnProperty.call(t,"Rf")}function fn(t){!1!==cn(t)&&(!0!==t.Cf?(t.Cf=!0,P(t.Pf(),(function(){t.Cf=!1,!0===t.Df&&(t.Df=!1,fn(t))}),(function(n){dn(t,n)}))):t.Df=!0)}function cn(t){var n=t.Rf;return!1!==wn(t)&&!1!==t._f&&(!0===$n(n)&&Z(n)>0||ln(t)>0)}function hn(t){t.Pf=void 0,t.xf=void 0,t.wf=void 0}function an(t){var n=t.Rf;t.If=!0,0===t.Kd.length&&(hn(t),Jn(n))}function vn(t,n){var i=t.Rf;if(!0===$n(i)&&Z(i)>0)$(i,n,!1);else{var e=void 0;try{e=t.wf(n)}catch(n){throw dn(t,n),n}try{ht(t,n,e)}catch(n){throw dn(t,n),n}}fn(t)}function dn(t,n){var i=t.Rf;"readable"===i.Fa&&(at(t),hn(t),Qn(i,n))}function ln(t){var n=t.Rf.Fa;return"errored"===n?null:"closed"===n?0:t.Af-t.Qd}function wn(t){var n=t.Rf.Fa;return!1===t.If&&"readable"===n}function bn(t,n,i,e,r,o,u){n.Rf=t,n.Kd=void 0,n.Qd=void 0,at(n),n._f=!1,n.If=!1,n.Df=!1,n.Cf=!1,n.wf=u,n.Af=o,n.Pf=e,n.xf=r,t.zd=n,P(R(i()),(function(){n._f=!0,fn(n)}),(function(t){dn(n,t)}))}function gn(t){return new m("ReadableStreamDefaultController.prototype."+t+" can only be used on a ReadableStreamDefaultController")}var mn=Number.isInteger||function(t){return"number"==typeof t&&isFinite(t)&&y.floor(t)===t},pn=function(){function t(){throw new m("ReadableStreamBYOBRequest cannot be used directly")}return p.defineProperty(t.prototype,"view",{get:function(){if(!1===Sn(this))throw Un("view");return this.Nf},enumerable:!0,configurable:!0}),t.prototype.respond=function(t){if(!1===Sn(this))throw Un("respond");if(void 0===this.Mf)throw new m("This BYOB request has been invalidated");this.Nf.buffer,function(t,n){if(!1===h(n=Number(n)))throw new RangeError("bytesWritten must be a finite");Dn(t,n)}(this.Mf,t)},t.prototype.respondWithNewView=function(t){if(!1===Sn(this))throw Un("respond");if(void 0===this.Mf)throw new m("This BYOB request has been invalidated");if(!ArrayBuffer.isView(t))throw new m("You can only respond with array buffer views");t.buffer,function(t,n){var i=t.Lf.peek();if(i.byteOffset+i.bytesFilled!==n.byteOffset)throw new RangeError("The region specified by view does not match byobRequest");if(i.byteLength!==n.byteLength)throw new RangeError("The buffer of view has different capacity than byobRequest");i.buffer=n.buffer,Dn(t,n.byteLength)}(this.Mf,t)},t}(),yn=function(){function t(){throw new m("ReadableByteStreamController constructor cannot be used directly")}return p.defineProperty(t.prototype,"byobRequest",{get:function(){if(!1===_n(this))throw Fn("byobRequest");if(void 0===this.Bf&&this.Lf.length>0){var t=this.Lf.peek(),n=new E(t.buffer,t.byteOffset+t.bytesFilled,t.byteLength-t.bytesFilled),i=p.create(pn.prototype);!function(t,n,i){t.Mf=n,t.Nf=i}(i,this,n),this.Bf=i}return this.Bf},enumerable:!0,configurable:!0}),p.defineProperty(t.prototype,"desiredSize",{get:function(){if(!1===_n(this))throw Fn("desiredSize");return Mn(this)},enumerable:!0,configurable:!0}),t.prototype.close=function(){if(!1===_n(this))throw Fn("close");if(!0===this.If)throw new m("The stream has already been closed; do not close it again!");var t=this.Of.Fa;if("readable"!==t)throw new m("The stream (in "+t+" state) is not in the readable state and cannot be closed");!function(t){var n=t.Of;if(t.Qd>0)t.If=!0;else{if(t.Lf.length>0&&t.Lf.peek().bytesFilled>0){var i=new m("Insufficient bytes to fill elements in the given buffer");throw Bn(t,i),i}xn(t),Jn(n)}}(this)},t.prototype.enqueue=function(t){if(!1===_n(this))throw Fn("enqueue");if(!0===this.If)throw new m("stream is closed or draining");var n=this.Of.Fa;if("readable"!==n)throw new m("The stream (in "+n+" state) is not in the readable state and cannot be enqueued to");if(!ArrayBuffer.isView(t))throw new m("You can only enqueue array buffer views when using a ReadableByteStreamController");t.buffer,function(t,n){var i=t.Of,e=n.buffer,r=n.byteOffset,o=n.byteLength,u=e;!0===Q(i)?0===Z(i)?In(t,u,r,o):$(i,new E(u,r,o),!1):!0===Hn(i)?(In(t,u,r,o),An(t)):In(t,u,r,o),Tn(t)}(this,t)},t.prototype.error=function(t){if(!1===_n(this))throw Fn("error");Bn(this,t)},t.prototype[j]=function(t){this.Lf.length>0&&(this.Lf.peek().bytesFilled=0),at(this);var n=this.xf(t);return xn(this),n},t.prototype[Y]=function(){var t=this.Of;if(this.Qd>0){var n=this.Kd.shift();this.Qd-=n.byteLength,Nn(this);var i=void 0;try{i=new E(n.buffer,n.byteOffset,n.byteLength)}catch(t){return O(t)}return R(L(i,!1,t.Od.Ld))}var e=this.Ff;if(void 0!==e){var r=void 0;try{r=new ArrayBuffer(e)}catch(t){return O(t)}var o={buffer:r,byteOffset:0,byteLength:e,bytesFilled:0,elementSize:1,ctor:E,readerType:"default"};this.Lf.push(o)}var u=G(t);return Tn(this),u},t}();function _n(t){return!!s(t)&&!!p.prototype.hasOwnProperty.call(t,"Of")}function Sn(t){return!!s(t)&&!!p.prototype.hasOwnProperty.call(t,"Mf")}function Tn(t){var n=function(t){var n=t.Of;if("readable"!==n.Fa)return!1;if(!0===t.If)return!1;if(!1===t._f)return!1;if(!0===Q(n)&&Z(n)>0)return!0;if(!0===Hn(n)&&Wn(n)>0)return!0;var i=Mn(t);return i>0}(t);!1!==n&&(!0!==t.Cf?(t.Cf=!0,P(t.Pf(),(function(){t.Cf=!1,!0===t.Df&&(t.Df=!1,Tn(t))}),(function(n){Bn(t,n)}))):t.Df=!0)}function En(t,n){var i=!1;"closed"===t.Fa&&(i=!0);var e=kn(n);"default"===n.readerType?$(t,e,i):function(t,n,i){var e=t.Od,r=e.Vf.shift();r.Gd(L(n,i,e.Ld))}(t,e,i)}function kn(t){var n=t.bytesFilled,i=t.elementSize;return new t.ctor(t.buffer,t.byteOffset,n/i)}function In(t,n,i,e){t.Kd.push({buffer:n,byteOffset:i,byteLength:e}),t.Qd+=e}function Rn(t,n){var i=n.elementSize,e=n.bytesFilled-n.bytesFilled%i,r=y.min(t.Qd,n.byteLength-n.bytesFilled),o=n.bytesFilled+r,u=o-o%i,s=r,f=!1;u>e&&(s=u-n.bytesFilled,f=!0);for(var h=t.Kd;s>0;){var a=h.peek(),v=y.min(s,a.byteLength),d=n.byteOffset+n.bytesFilled;c(n.buffer,d,a.buffer,a.byteOffset,v),a.byteLength===v?h.shift():(a.byteOffset+=v,a.byteLength-=v),t.Qd-=v,On(t,v,n),s-=v}return f}function On(t,n,i){Pn(t),i.bytesFilled+=n}function Nn(t){0===t.Qd&&!0===t.If?(xn(t),Jn(t.Of)):Tn(t)}function Pn(t){void 0!==t.Bf&&(t.Bf.Mf=void 0,t.Bf.Nf=void 0,t.Bf=void 0)}function An(t){for(;t.Lf.length>0;){if(0===t.Qd)return;var n=t.Lf.peek();!0===Rn(t,n)&&(Cn(t),En(t.Of,n))}}function Dn(t,n){var i=t.Lf.peek();if("closed"===t.Of.Fa){if(0!==n)throw new m("bytesWritten must be 0 when calling respond() on a closed stream");!function(t,n){n.buffer=n.buffer;var i=t.Of;if(!0===Hn(i))for(;Wn(i)>0;)En(i,Cn(t))}(t,i)}else!function(t,n,i){if(i.bytesFilled+n>i.byteLength)throw new RangeError("bytesWritten out of range");if(On(t,n,i),!(i.bytesFilled<i.elementSize)){Cn(t);var e=i.bytesFilled%i.elementSize;if(e>0){var r=i.byteOffset+i.bytesFilled,o=i.buffer.slice(r-e,r);In(t,o,0,o.byteLength)}i.buffer=i.buffer,i.bytesFilled-=e,En(t.Of,i),An(t)}}(t,n,i);Tn(t)}function Cn(t){var n=t.Lf.shift();return Pn(t),n}function xn(t){t.Pf=void 0,t.xf=void 0}function Bn(t,n){var i=t.Of;"readable"===i.Fa&&(function(t){Pn(t),t.Lf=new M}(t),at(t),xn(t),Qn(i,n))}function Mn(t){var n=t.Of.Fa;return"errored"===n?null:"closed"===n?0:t.Af-t.Qd}function Ln(t,n,i){var e=p.create(yn.prototype),r=v(n,"pull",0,[e]),o=v(n,"cancel",1,[]),u=n.autoAllocateChunkSize;if(void 0!==u&&(u=Number(u),!1===mn(u)||u<=0))throw new RangeError("autoAllocateChunkSize must be a positive integer");!function(t,n,i,e,r,o,u){n.Of=t,n.Df=!1,n.Cf=!1,n.Bf=void 0,n.Kd=n.Qd=void 0,at(n),n.If=!1,n._f=!1,n.Af=w(o),n.Pf=e,n.xf=r,n.Ff=u,n.Lf=new M,t.zd=n,P(R(i()),(function(){n._f=!0,Tn(n)}),(function(t){Bn(n,t)}))}(t,e,(function(){return d(n,"start",[e])}),r,o,i,u)}function Un(t){return new m("ReadableStreamBYOBRequest.prototype."+t+" can only be used on a ReadableStreamBYOBRequest")}function Fn(t){return new m("ReadableByteStreamController.prototype."+t+" can only be used on a ReadableByteStreamController")}function zn(t){return I((function(n,i){var e={Gd:n,Hd:i};t.Od.Vf.push(e)}))}function Wn(t){return t.Od.Vf.length}function Hn(t){var n=t.Od;return void 0!==n&&!!qn(n)}var Vn=function(){function t(t){if(!Gn(t))throw new m("ReadableStreamBYOBReader can only be constructed with a ReadableStream instance given a byte source");if(!1===_n(t.zd))throw new m("Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte source");if($n(t))throw new m("This stream has already been locked for exclusive reading by another reader");U(this,t),this.Vf=new M}return p.defineProperty(t.prototype,"closed",{get:function(){return qn(this)?this.Vd:O(Xn("closed"))},enumerable:!0,configurable:!0}),t.prototype.cancel=function(t){return qn(this)?void 0===this.Bd?O(W("cancel")):F(this,t):O(Xn("cancel"))},t.prototype.read=function(t){return qn(this)?void 0===this.Bd?O(W("read from")):ArrayBuffer.isView(t)?(t.buffer,0===t.byteLength?O(new m("view must have non-zero byteLength")):function(t,n){var i=t.Bd;return i.Xd=!0,"errored"===i.Fa?O(i.Fd):function(t,n){var i=t.Of,e=1;n.constructor!==DataView&&(e=n.constructor.BYTES_PER_ELEMENT);var r=n.constructor,o={buffer:n.buffer,byteOffset:n.byteOffset,byteLength:n.byteLength,bytesFilled:0,elementSize:e,ctor:r,readerType:"byob"};if(t.Lf.length>0)return t.Lf.push(o),zn(i);if("closed"===i.Fa)return R(L(new r(o.buffer,o.byteOffset,0),!0,i.Od.Ld));if(t.Qd>0){if(!0===Rn(t,o)){var u=kn(o);return Nn(t),R(L(u,!1,i.Od.Ld))}if(!0===t.If){var s=new m("Insufficient bytes to fill elements in the given buffer");return Bn(t,s),O(s)}}t.Lf.push(o);var f=zn(i);return Tn(t),f}(i.zd,n)}(this,t)):O(new m("view must be an array buffer view")):O(Xn("read"))},t.prototype.releaseLock=function(){if(!qn(this))throw Xn("releaseLock");if(void 0!==this.Bd){if(this.Vf.length>0)throw new m("Tried to release a reader lock when that reader has pending read() calls un-settled");z(this)}},t}();function qn(t){return!!s(t)&&!!p.prototype.hasOwnProperty.call(t,"Vf")}function Xn(t){return new m("ReadableStreamBYOBReader.prototype."+t+" can only be used on a ReadableStreamBYOBReader")}var jn=function(){function t(t,n){void 0===t&&(t={}),void 0===n&&(n={}),Kn(this);var i=n.size,e=n.highWaterMark,r=t.type;if("bytes"===String(r)){if(void 0!==i)throw new RangeError("The strategy for a byte stream cannot have a size function");void 0===e&&(e=0),Ln(this,t,e=w(e))}else{if(void 0!==r)throw new RangeError("Invalid type is specified");var o=b(i);void 0===e&&(e=1),function(t,n,i,e){var r=p.create(un.prototype),o=v(n,"pull",0,[r]),u=v(n,"cancel",1,[]);bn(t,r,(function(){return d(n,"start",[r])}),o,u,i,e)}(this,t,e=w(e),o)}}return p.defineProperty(t.prototype,"locked",{get:function(){if(!1===Gn(this))throw ti("locked");return $n(this)},enumerable:!0,configurable:!0}),t.prototype.cancel=function(t){return!1===Gn(this)?O(ti("cancel")):!0===$n(this)?O(new m("Cannot cancel a stream that already has a reader")):Zn(this,t)},t.prototype.getReader=function(t){var n=(void 0===t?{}:t).mode;if(!1===Gn(this))throw ti("getReader");if(void 0===n)return K(this,!0);if("byob"===(n=String(n)))return function(t,n){void 0===n&&(n=!1);var i=new Vn(t);return i.Ld=n,i}(this,!0);throw new RangeError("Invalid mode is specified")},t.prototype.pipeThrough=function(t,n){var i=t.writable,e=t.readable,r=void 0===n?{}:n,o=r.preventClose,u=r.preventAbort,s=r.preventCancel,f=r.signal;if(!1===Gn(this))throw ti("pipeThrough");if(!1===gt(i))throw new m("writable argument to pipeThrough must be a WritableStream");if(!1===Gn(e))throw new m("readable argument to pipeThrough must be a ReadableStream");if(o=Boolean(o),u=Boolean(u),s=Boolean(s),void 0!==f&&!tn(f))throw new m("ReadableStream.prototype.pipeThrough's signal option must be an AbortSignal");if(!0===$n(this))throw new m("ReadableStream.prototype.pipeThrough cannot be used on a locked ReadableStream");if(!0===mt(i))throw new m("ReadableStream.prototype.pipeThrough cannot be used on a locked WritableStream");return x(on(this,i,o,u,s,f)),e},t.prototype.pipeTo=function(t,n){var i=void 0===n?{}:n,e=i.preventClose,r=i.preventAbort,o=i.preventCancel,u=i.signal;return!1===Gn(this)?O(ti("pipeTo")):!1===gt(t)?O(new m("ReadableStream.prototype.pipeTo's first argument must be a WritableStream")):(e=Boolean(e),r=Boolean(r),o=Boolean(o),void 0===u||tn(u)?!0===$n(this)?O(new m("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream")):!0===mt(t)?O(new m("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream")):on(this,t,e,r,o,u):O(new m("ReadableStream.prototype.pipeTo's signal option must be an AbortSignal")))},t.prototype.tee=function(){if(!1===Gn(this))throw ti("tee");var t=function(t,n){var i,e,r,o,u,s=K(t),c=!1,h=!1,a=!1,v=I((function(t){u=t}));function d(){return!0===c||(c=!0,x(C(rt(s),(function(t){if(c=!1,!0===t.done)return!1===h&&an(r.zd),void(!1===a&&an(o.zd));var n=t.value,i=n,e=n;!1===h&&vn(r.zd,i),!1===a&&vn(o.zd,e)})))),R(void 0)}function l(){}return r=Yn(l,d,(function(n){if(h=!0,i=n,!0===a){var r=f([i,e]),o=Zn(t,r);u(o)}return v})),o=Yn(l,d,(function(n){if(a=!0,e=n,!0===h){var r=f([i,e]),o=Zn(t,r);u(o)}return v})),D(s.Vd,(function(t){dn(r.zd,t),dn(o.zd,t)})),[r,o]}(this);return f(t)},t.prototype.getIterator=function(t){var n=(void 0===t?{}:t).preventCancel,i=void 0!==n&&n;if(!1===Gn(this))throw ti("getIterator");return function(t,n){void 0===n&&(n=!1);var i=K(t),e=p.create(ut);return e.qd=i,e.Yd=Boolean(n),e}(this,i)},t}();function Yn(t,n,i,e,r){void 0===e&&(e=1),void 0===r&&(r=function(){return 1});var o=p.create(jn.prototype);return Kn(o),bn(o,p.create(un.prototype),t,n,i,e,r),o}function Kn(t){t.Fa="readable",t.Od=void 0,t.Fd=void 0,t.Xd=!1}function Gn(t){return!!s(t)&&!!p.prototype.hasOwnProperty.call(t,"zd")}function $n(t){return void 0!==t.Od}function Zn(t,n){return t.Xd=!0,"closed"===t.Fa?R(void 0):"errored"===t.Fa?O(t.Fd):(Jn(t),C(t.zd[j](n),r))}function Jn(t){t.Fa="closed";var n=t.Od;void 0!==n&&(et(n)&&(n.Zd.forEach((function(t){t.Gd(L(void 0,!0,n.Ld))})),n.Zd=new M),X(n))}function Qn(t,n){t.Fa="errored",t.Fd=n;var i=t.Od;void 0!==i&&(et(i)?(i.Zd.forEach((function(t){t.Hd(n)})),i.Zd=new M):(i.Vf.forEach((function(t){t.Hd(n)})),i.Vf=new M),q(i,n))}function ti(t){return new m("ReadableStream.prototype."+t+" can only be used on a ReadableStream")}"symbol"===B(i.asyncIterator)&&p.defineProperty(jn.prototype,i.asyncIterator,{value:jn.prototype.getIterator,enumerable:!1,writable:!0,configurable:!0});var ni=function(){function t(t){var n=t.highWaterMark;this.highWaterMark=n}return t.prototype.size=function(t){return t.byteLength},t}(),ii=function(){function t(t){var n=t.highWaterMark;this.highWaterMark=n}return t.prototype.size=function(){return 1},t}(),ei=function(){function t(t,n,i){void 0===t&&(t={}),void 0===n&&(n={}),void 0===i&&(i={});var e=n.size,r=n.highWaterMark,o=i.size,u=i.highWaterMark;if(void 0!==t.writableType)throw new RangeError("Invalid writable type specified");var s=b(e);if(void 0===r&&(r=1),r=w(r),void 0!==t.readableType)throw new RangeError("Invalid readable type specified");var f,c=b(o);void 0===u&&(u=0),u=w(u),function(t,n,i,e,r,o){function u(){return n}function s(n){return function(t,n){var i=t.Wf;return!0===t.uf?C(t.Uf,(function(){var e=t.Gf;if("erroring"===e.Fa)throw e.Fd;return vi(i,n)})):vi(i,n)}(t,n)}function f(n){return function(t,n){return oi(t,n),R(void 0)}(t,n)}function c(){return function(t){var n=t.Hf,i=t.Wf,e=i.Zf();return hi(i),C(e,(function(){if("errored"===n.Fa)throw n.Fd;var t=n.zd;!0===wn(t)&&an(t)}),(function(i){throw oi(t,i),n.Fd}))}(t)}function h(){return function(t){return si(t,!1),t.Uf}(t)}function a(n){return ui(t,n),R(void 0)}t.Gf=function(t,n,i,e,r,o){void 0===r&&(r=1),void 0===o&&(o=function(){return 1});var u=p.create(lt.prototype);return bt(u),Bt(u,p.create(xt.prototype),t,n,i,e,r,o),u}(u,s,c,f,i,e),t.Hf=Yn(u,h,a,r,o),t.uf=void 0,t.Uf=void 0,t.Xf=void 0,si(t,!0),t.Wf=void 0}(this,I((function(t){f=t})),r,s,u,c),function(t,n){var i=p.create(fi.prototype),e=function(t){try{return ai(i,t),R(void 0)}catch(t){return O(t)}},r=n.transform;if(void 0!==r){if("function"!=typeof r)throw new m("transform is not a method");e=function(t){return l(r,n,[t,i])}}var o=v(n,"flush",0,[i]);!function(t,n,i,e){n.zf=t,t.Wf=n,n.qf=i,n.Zf=e}(t,i,e,o)}(this,t);var h=d(t,"start",[this.Wf]);f(h)}return p.defineProperty(t.prototype,"readable",{get:function(){if(!1===ri(this))throw li("readable");return this.Hf},enumerable:!0,configurable:!0}),p.defineProperty(t.prototype,"writable",{get:function(){if(!1===ri(this))throw li("writable");return this.Gf},enumerable:!0,configurable:!0}),t}();function ri(t){return!!s(t)&&!!p.prototype.hasOwnProperty.call(t,"Wf")}function oi(t,n){dn(t.Hf.zd,n),ui(t,n)}function ui(t,n){hi(t.Wf),Ft(t.Gf.$d,n),!0===t.uf&&si(t,!1)}function si(t,n){void 0!==t.Uf&&t.Xf(),t.Uf=I((function(n){t.Xf=n})),t.uf=n}var fi=function(){function t(){throw new m("TransformStreamDefaultController instances cannot be created directly")}return p.defineProperty(t.prototype,"desiredSize",{get:function(){if(!1===ci(this))throw di("desiredSize");return ln(this.zf.Hf.zd)},enumerable:!0,configurable:!0}),t.prototype.enqueue=function(t){if(!1===ci(this))throw di("enqueue");ai(this,t)},t.prototype.error=function(t){if(!1===ci(this))throw di("error");!function(t,n){oi(t.zf,n)}(this,t)},t.prototype.terminate=function(){if(!1===ci(this))throw di("terminate");!function(t){var n=t.zf,i=n.Hf.zd;!0===wn(i)&&an(i);var e=new m("TransformStream terminated");ui(n,e)}(this)},t}();function ci(t){return!!s(t)&&!!p.prototype.hasOwnProperty.call(t,"zf")}function hi(t){t.qf=void 0,t.Zf=void 0}function ai(t,n){var i=t.zf,e=i.Hf.zd;if(!1===wn(e))throw new m("Readable side is not in a state that permits enqueue");try{vn(e,n)}catch(t){throw ui(i,t),i.Hf.Fd}var r=function(t){return!0!==cn(t)}(e);r!==i.uf&&si(i,!0)}function vi(t,n){return C(t.qf(n),void 0,(function(n){throw oi(t.zf,n),n}))}function di(t){return new m("TransformStreamDefaultController.prototype."+t+" can only be used on a TransformStreamDefaultController")}function li(t){return new m("TransformStream.prototype."+t+" can only be used on a TransformStream")}t.ByteLengthQueuingStrategy=ni,t.CountQueuingStrategy=ii,t.ReadableStream=jn,t.TransformStream=ei,t.WritableStream=lt,p.defineProperty(t,"__esModule",{value:!0})},"object"===(void 0===t?"undefined":B(t))&&void 0!==i?o(t):"function"==typeof define&&define.amd?define(["exports"],o):o((r=r||self).WebStreamsPolyfill={})})),pt=C((function(t){function n(){var t=mt();return n=function(){return t},t}x(),gt(),p.defineProperty(t,"__esModule",{value:!0}),function(t,n){for(var i in n)p.defineProperty(t,i,{enumerable:!0,get:n[i]})}(t,{ByteLengthQueuingStrategy:function(){return n().ByteLengthQueuingStrategy},CountQueuingStrategy:function(){return n().CountQueuingStrategy},ReadableStream:function(){return n().ReadableStream},TransformStream:function(){return n().TransformStream},WritableStream:function(){return n().WritableStream}})}));function yt(t,n){return(yt=p.setPrototypeOf||function(t,n){return t.__proto__=n,t})(t,n)}function _t(t,n){if("function"!=typeof n&&null!==n)throw new m("Super expression must either be null or a function");t.prototype=p.create(n&&n.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),n&&yt(t,n)}function St(t,n){for(var i=0;i<n.length;i++){var e=n[i];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),p.defineProperty(t,e.key,e)}}function Tt(t,n,i){return n&&St(t.prototype,n),i&&St(t,i),t}x(),gt(),x(),gt(),x(),gt(),x(),gt(),x(),gt(),x(),gt(),x(),gt(),x(),gt(),x(),gt(),x(),gt(),x(),gt(),x(),gt();var Et,kt=((Et={}).Tv="web",Et.Ev="android",Et.xv="android-tv",Et.Rv="ios",Et.Iv="tvos",Et.Cv="chromecast",Et.Pv="theoliveweb",Et);var It=v?v.userAgent:"",Rt=It.match(/chrome\/([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)/i),Ot=It.match(/Edg\/([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)/i),Nt=It.match(/Android ([0-9\.]+)/i),Pt=It.match(/Windows NT ([0-9\.]+)/i),At=It.match(/(Version)\/((\d+)\.(\d+)(?:\.(\d+))?).*Safari/),Dt=It.match(/Firefox\/([0-9\.]+)/i),Ct=It.match(/OPR\/(\d+\.\d+)/i),xt=It.match(/Tizen ([0-9\.]+)/i),Bt=It.match(/(iPhone OS|iPad OS|iPod OS|Mac OS X) (\d+)_(\d+)_?(\d+)?/),Mt=It.match(/HbbTV\/([0-9.]+)/i),Lt=function(){function t(){this.Dv=Boolean("ontouchstart"in self||self.DocumentTouch&&a instanceof self.DocumentTouch||v&&v.msMaxTouchPoints),this.Mv=/(mac\sos\sx)\s?([\w\s\.]+\w)*/i.test(It)||/(macintosh|mac(?=_powerpc)\s)/i.test(It),this.Bv=/Windows NT/i.test(It),this.Fv=Pt?S(Pt[1]):0,this.Wv=/Android/i.test(It),this.Gv=Nt?S(Nt[1]):0,this.Zv=/windows phone (8|8\.1)/i.test(It),this.zv=/iPhone/i.test(It),this.Yv=/iPad/i.test(It),this.Qv=this.Mv&&this.Dv&&!this.Yv,this.$v=/iPod/i.test(It),this.dg=/Mobile Safari/i.test(It),this.ag=/EOS\d*STB/i.test(It),this.cg=/APP\d*STB/i.test(It),this.eg=(this.zv||this.Yv||this.Qv||this.$v)&&!this.Zv,this.og=Bt?S(Bt[2]):0,this.fg=this.Zv||this.eg||this.Wv||this.dg,this.vg=/CriOS/i.test(It),this.pg=Boolean(self.chrome&&/google/i.test(v.vendor))||this.vg,this.Tg=this.pg&&/Edg\//i.test(v.userAgent),this.xg=Ot?_(Ot[1],10):0,this.Fm=Boolean(/CriOS/i.test(It)),this.Om=Boolean(self.chrome||/Chrome/i.test(It)||this.Fm),this.Ag=Rt?_(Rt[1],10):0,this.Cg=/SMART-TV.*Tizen/i.test(It),this.Dg=xt?S(xt[1]):0,this.yg=this.Dg>0?function(t){return t>=8?108:t>=7?94:t>=6.5?85:t>=6?76:t>=5.5?69:t>=5?63:t>=4?56:t>=3?47:0}(this.Dg):void 0,this.Mg=/webos|web0s/i.test(It),this.Bg=/HbbTV/i.test(It),this.Fg=!!Mt&&function(t){if(!t)return!1;var n=t.split(".").map(Number);return 3===n.length&&1===n[0]&&2===n[1]}(Mt[1]),this.Wg=/VIZIO/i.test(It),this.Gg=/Edge\/\d+/i.test(It),this.Zg=/Trident/i.test(It),this.zg=this.Zg&&!self.ActiveXObject&&"ActiveXObject"in self,this.Yg=/Vivaldi/i.test(It),this.jg=/Firefox/i.test(It)&&!/Seamonkey/i.test(It),this.Jg=Dt?S(Dt[1]):0,this.im=/Safari/i.test(It)&&!/Chrome/i.test(It)&&!this.Zv&&!this.Cg,this.hm=At?S(At[2]):0,this.lm=Boolean(Ct),this.fm=Ct?S(Ct[1]):0,this.vm=/CrKey/.test(It),this.pm=/\b(tv|smart-tv|smarttv|appletv|crkey|googletv|hbbtv|pov_tv|roku|viera|nettv|philipstv|vizio)\b/i.test(It),this.Am=/PlayStation 4/i.test(It),this.Tm="web"===kt.xv,this.xm="web"===kt.Ev,this.Im=this.xm||this.Tm,this.Pm="web"===kt.Rv,this.Nm="web"===kt.Iv,this.Lm="web"===kt.Cv}return Tt(t,[{key:"Qe",get:function(){return this.Dv}},{key:"Nv",get:function(){return this.Mv}},{key:"Lv",get:function(){return this.Bv}},{key:"Ov",get:function(){return this.Fv}},{key:"Vv",get:function(){return this.Wv}},{key:"Uv",get:function(){return this.Gv}},{key:"Hv",get:function(){return this.Zv}},{key:"Xv",get:function(){return this.zv}},{key:"qv",get:function(){return this.Yv}},{key:"Kv",get:function(){return this.Qv}},{key:"Jv",get:function(){return this.$v}},{key:"su",get:function(){return this.eg}},{key:"rg",get:function(){return this.og}},{key:"hg",get:function(){return this.ag||this.cg}},{key:"ud",get:function(){return this.dg}},{key:"Qs",get:function(){return this.fg}},{key:"_g",get:function(){return this.vg}},{key:"gg",get:function(){return this.pg}},{key:"wg",get:function(){var t;return null!=(t=this.yg)?t:this.Ag}},{key:"Sg",get:function(){return this.Tg}},{key:"Eg",get:function(){var t;return(null==(t=h.chrome)?void 0:t.webview)&&this.xg>0}},{key:"Rg",get:function(){return this.xg}},{key:"Ig",get:function(){return this.Cg}},{key:"Pg",get:function(){return this.Dg}},{key:"Ng",get:function(){return this.Mg}},{key:"Lg",get:function(){return this.Bg}},{key:"Og",get:function(){return this.Fg}},{key:"Vg",get:function(){return this.Wg}},{key:"Ug",get:function(){return this.Gg}},{key:"Hg",get:function(){return this.Zg}},{key:"Xg",get:function(){return this.zg}},{key:"qg",get:function(){return this.Yg}},{key:"Kg",get:function(){return this.jg}},{key:"Qg",get:function(){return this.Jg}},{key:"$g",get:function(){return this.im}},{key:"nm",get:function(){return 0===this.hm&&Ut.su?this.og:this.hm}},{key:"um",get:function(){return this.lm}},{key:"dm",get:function(){return this.fm}},{key:"_m",get:function(){return this.vm}},{key:"gm",get:function(){return this.pm}},{key:"wm",get:function(){return!(!this.Ng&&!this.Ig)&&this.wg<=56}},{key:"ym",get:function(){return this.Am}},{key:"Sm",get:function(){return this.Tm}},{key:"Em",get:function(){return this.xm}},{key:"Rm",get:function(){return this.Im}},{key:"Cm",get:function(){return this.Pm}},{key:"Dm",get:function(){return this.Nm}},{key:"Mm",get:function(){return this.Lm}},{key:"Bm",get:function(){return this.Om}},{key:"IS_IOS_CHROME",get:function(){return this.Fm}}]),t}();Lt.Vm=new Lt;var Ut=Lt.Vm;x(),gt(),nt();var Ft={}.toString;function zt(t){return null!=t}var Wt,Ht=Array.isArray||function(t){return"[object Array]"===Ft.call(t)};function Vt(t){return"object"===(void 0===t?"undefined":B(t))&&null!==t}function qt(t){return"function"==typeof t}function Xt(t){return qt(t)||Vt(t)}function jt(t){Wt=t}x(),gt(),x(),gt();var Yt=function(){};function Kt(t){var n;return function(){return void 0!==t&&(n=t(),t=void 0),n}}function Gt(){return void 0!==a?a.createElement("video"):void 0}var $t=Kt(Gt);Kt((function(){return"undefined"!=typeof HTMLVideoElement&&$t()instanceof HTMLVideoElement}));x(),gt(),x(),gt(),x(),gt();var Zt=null;try{Zt=new WebAssembly.Instance(new WebAssembly.Module(new E([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch(Et){}function Jt(t,n,i){this.low=0|t,this.high=0|n,this.unsigned=!!i}function Qt(t){return!0===(t&&t.Hm)}function tn(t){var n=y.clz32(t&-t);return t?31-n:n}Jt.prototype.Hm,p.defineProperty(Jt.prototype,"Hm",{value:!0}),Jt.isLong=Qt;var nn={},en={};function rn(t,n){var i,e,r;return n?(r=0<=(t>>>=0)&&t<256)&&(e=en[t])?e:(i=un(t,0,!0),r&&(en[t]=i),i):(r=-128<=(t|=0)&&t<128)&&(e=nn[t])?e:(i=un(t,t<0?-1:0,!1),r&&(nn[t]=i),i)}function on(t,n){if(T(t))return n?wn:ln;if(n){if(t<0)return wn;if(t>=an)return yn}else{if(t<=-vn)return _n;if(t+1>=vn)return pn}return t<0?on(-t,n).neg():un(t%hn|0,t/hn|0,n)}function un(t,n,i){return new Jt(t,n,i)}Jt.fromInt=rn,Jt.fromNumber=on,Jt.fromBits=un;var sn=y.pow;function fn(t,n,i){if(0===t.length)throw g("empty string");if("number"==typeof n?(i=n,n=!1):n=!!n,"NaN"===t||"Infinity"===t||"+Infinity"===t||"-Infinity"===t)return n?wn:ln;if((i=i||10)<2||36<i)throw RangeError("radix");var e;if((e=t.indexOf("-"))>0)throw g("interior hyphen");if(0===e)return fn(t.substring(1),n,i).neg();for(var r=on(sn(i,8)),o=ln,u=0;u<t.length;u+=8){var s=y.min(8,t.length-u),f=_(t.substring(u,u+s),i);if(s<8){var c=on(sn(i,s));o=o.mul(c).add(on(f))}else o=(o=o.mul(r)).add(on(f))}return o.unsigned=n,o}function cn(t,n){return"number"==typeof t?on(t,n):"string"==typeof t?fn(t,n):un(t.low,t.high,"boolean"==typeof n?n:t.unsigned)}Jt.fromString=fn,Jt.fromValue=cn;var hn=4294967296,an=hn*hn,vn=an/2,dn=rn(1<<24),ln=rn(0);Jt.ZERO=ln;var wn=rn(0,!0);Jt.UZERO=wn;var bn=rn(1);Jt.ONE=bn;var gn=rn(1,!0);Jt.UONE=gn;var mn=rn(-1);Jt.NEG_ONE=mn;var pn=un(-1,2147483647,!1);Jt.MAX_VALUE=pn;var yn=un(-1,-1,!0);Jt.MAX_UNSIGNED_VALUE=yn;var _n=un(0,-2147483648,!1);Jt.MIN_VALUE=_n;var Sn=Jt.prototype;Sn.toInt=function(){return this.unsigned?this.low>>>0:this.low},Sn.toNumber=function(){return this.unsigned?(this.high>>>0)*hn+(this.low>>>0):this.high*hn+(this.low>>>0)},Sn.toString=function(t){if((t=t||10)<2||36<t)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative()){if(this.eq(_n)){var n=on(t),i=this.div(n),e=i.mul(n).sub(this);return i.toString(t)+e.toInt().toString(t)}return"-"+this.neg().toString(t)}for(var r=on(sn(t,6),this.unsigned),o=this,u="";;){var s=o.div(r),f=(o.sub(s.mul(r)).toInt()>>>0).toString(t);if((o=s).isZero())return f+u;for(;f.length<6;)f="0"+f;u=""+f+u}},Sn.getHighBits=function(){return this.high},Sn.getHighBitsUnsigned=function(){return this.high>>>0},Sn.getLowBits=function(){return this.low},Sn.getLowBitsUnsigned=function(){return this.low>>>0},Sn.getNumBitsAbs=function(){if(this.isNegative())return this.eq(_n)?64:this.neg().getNumBitsAbs();for(var t=0!=this.high?this.high:this.low,n=31;n>0&&0==(t&1<<n);n--);return 0!=this.high?n+33:n+1},Sn.isZero=function(){return 0===this.high&&0===this.low},Sn.eqz=Sn.isZero,Sn.isNegative=function(){return!this.unsigned&&this.high<0},Sn.isPositive=function(){return this.unsigned||this.high>=0},Sn.isOdd=function(){return 1==(1&this.low)},Sn.isEven=function(){return 0==(1&this.low)},Sn.equals=function(t){return Qt(t)||(t=cn(t)),(this.unsigned===t.unsigned||this.high>>>31!=1||t.high>>>31!=1)&&(this.high===t.high&&this.low===t.low)},Sn.eq=Sn.equals,Sn.notEquals=function(t){return!this.eq(t)},Sn.neq=Sn.notEquals,Sn.ne=Sn.notEquals,Sn.lessThan=function(t){return this.comp(t)<0},Sn.lt=Sn.lessThan,Sn.lessThanOrEqual=function(t){return this.comp(t)<=0},Sn.lte=Sn.lessThanOrEqual,Sn.le=Sn.lessThanOrEqual,Sn.greaterThan=function(t){return this.comp(t)>0},Sn.gt=Sn.greaterThan,Sn.greaterThanOrEqual=function(t){return this.comp(t)>=0},Sn.gte=Sn.greaterThanOrEqual,Sn.ge=Sn.greaterThanOrEqual,Sn.compare=function(t){if(Qt(t)||(t=cn(t)),this.eq(t))return 0;var n=this.isNegative(),i=t.isNegative();return n&&!i?-1:!n&&i?1:this.unsigned?t.high>>>0>this.high>>>0||t.high===this.high&&t.low>>>0>this.low>>>0?-1:1:this.sub(t).isNegative()?-1:1},Sn.comp=Sn.compare,Sn.negate=function(){return!this.unsigned&&this.eq(_n)?_n:this.not().add(bn)},Sn.neg=Sn.negate,Sn.add=function(t){Qt(t)||(t=cn(t));var n=this.high>>>16,i=65535&this.high,e=this.low>>>16,r=65535&this.low,o=t.high>>>16,u=65535&t.high,s=t.low>>>16,f=0,c=0,h=0,a=0;return h+=(a+=r+(65535&t.low))>>>16,c+=(h+=e+s)>>>16,f+=(c+=i+u)>>>16,f+=n+o,un((h&=65535)<<16|(a&=65535),(f&=65535)<<16|(c&=65535),this.unsigned)},Sn.subtract=function(t){return Qt(t)||(t=cn(t)),this.add(t.neg())},Sn.sub=Sn.subtract,Sn.multiply=function(t){if(this.isZero())return this;if(Qt(t)||(t=cn(t)),Zt)return un(Zt.mul(this.low,this.high,t.low,t.high),Zt.get_high(),this.unsigned);if(t.isZero())return this.unsigned?wn:ln;if(this.eq(_n))return t.isOdd()?_n:ln;if(t.eq(_n))return this.isOdd()?_n:ln;if(this.isNegative())return t.isNegative()?this.neg().mul(t.neg()):this.neg().mul(t).neg();if(t.isNegative())return this.mul(t.neg()).neg();if(this.lt(dn)&&t.lt(dn))return on(this.toNumber()*t.toNumber(),this.unsigned);var n=this.high>>>16,i=65535&this.high,e=this.low>>>16,r=65535&this.low,o=t.high>>>16,u=65535&t.high,s=t.low>>>16,f=65535&t.low,c=0,h=0,a=0,v=0;return a+=(v+=r*f)>>>16,h+=(a+=e*f)>>>16,a&=65535,h+=(a+=r*s)>>>16,c+=(h+=i*f)>>>16,h&=65535,c+=(h+=e*s)>>>16,h&=65535,c+=(h+=r*u)>>>16,c+=n*f+i*s+e*u+r*o,un((a&=65535)<<16|(v&=65535),(c&=65535)<<16|(h&=65535),this.unsigned)},Sn.mul=Sn.multiply,Sn.divide=function(t){if(Qt(t)||(t=cn(t)),t.isZero())throw g("division by zero");var n,i,e;if(Zt)return this.unsigned||-2147483648!==this.high||-1!==t.low||-1!==t.high?un((this.unsigned?Zt.div_u:Zt.div_s)(this.low,this.high,t.low,t.high),Zt.get_high(),this.unsigned):this;if(this.isZero())return this.unsigned?wn:ln;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return wn;if(t.gt(this.shru(1)))return gn;e=wn}else{if(this.eq(_n))return t.eq(bn)||t.eq(mn)?_n:t.eq(_n)?bn:(n=this.shr(1).div(t).shl(1)).eq(ln)?t.isNegative()?bn:mn:(i=this.sub(t.mul(n)),e=n.add(i.div(t)));if(t.eq(_n))return this.unsigned?wn:ln;if(this.isNegative())return t.isNegative()?this.neg().div(t.neg()):this.neg().div(t).neg();if(t.isNegative())return this.div(t.neg()).neg();e=ln}for(i=this;i.gte(t);){n=y.max(1,y.floor(i.toNumber()/t.toNumber()));for(var r=y.ceil(y.log(n)/y.LN2),o=r<=48?1:sn(2,r-48),u=on(n),s=u.mul(t);s.isNegative()||s.gt(i);)s=(u=on(n-=o,this.unsigned)).mul(t);u.isZero()&&(u=bn),e=e.add(u),i=i.sub(s)}return e},Sn.div=Sn.divide,Sn.modulo=function(t){return Qt(t)||(t=cn(t)),Zt?un((this.unsigned?Zt.rem_u:Zt.rem_s)(this.low,this.high,t.low,t.high),Zt.get_high(),this.unsigned):this.sub(this.div(t).mul(t))},Sn.mod=Sn.modulo,Sn.rem=Sn.modulo,Sn.not=function(){return un(~this.low,~this.high,this.unsigned)},Sn.countLeadingZeros=function(){return this.high?y.clz32(this.high):y.clz32(this.low)+32},Sn.clz=Sn.countLeadingZeros,Sn.countTrailingZeros=function(){return this.low?tn(this.low):tn(this.high)+32},Sn.ctz=Sn.countTrailingZeros,Sn.and=function(t){return Qt(t)||(t=cn(t)),un(this.low&t.low,this.high&t.high,this.unsigned)},Sn.or=function(t){return Qt(t)||(t=cn(t)),un(this.low|t.low,this.high|t.high,this.unsigned)},Sn.xor=function(t){return Qt(t)||(t=cn(t)),un(this.low^t.low,this.high^t.high,this.unsigned)},Sn.shiftLeft=function(t){return Qt(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?un(this.low<<t,this.high<<t|this.low>>>32-t,this.unsigned):un(0,this.low<<t-32,this.unsigned)},Sn.shl=Sn.shiftLeft,Sn.shiftRight=function(t){return Qt(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?un(this.low>>>t|this.high<<32-t,this.high>>t,this.unsigned):un(this.high>>t-32,this.high>=0?0:-1,this.unsigned)},Sn.shr=Sn.shiftRight,Sn.shiftRightUnsigned=function(t){return Qt(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?un(this.low>>>t|this.high<<32-t,this.high>>>t,this.unsigned):un(32===t?this.high:this.high>>>t-32,0,this.unsigned)},Sn.shru=Sn.shiftRightUnsigned,Sn.shr_u=Sn.shiftRightUnsigned,Sn.rotateLeft=function(t){var n;return Qt(t)&&(t=t.toInt()),0==(t&=63)?this:32===t?un(this.high,this.low,this.unsigned):t<32?(n=32-t,un(this.low<<t|this.high>>>n,this.high<<t|this.low>>>n,this.unsigned)):(n=32-(t-=32),un(this.high<<t|this.low>>>n,this.low<<t|this.high>>>n,this.unsigned))},Sn.rotl=Sn.rotateLeft,Sn.rotateRight=function(t){var n;return Qt(t)&&(t=t.toInt()),0==(t&=63)?this:32===t?un(this.high,this.low,this.unsigned):t<32?(n=32-t,un(this.high<<n|this.low>>>t,this.low<<n|this.high>>>t,this.unsigned)):(n=32-(t-=32),un(this.low<<n|this.high>>>t,this.high<<n|this.low>>>t,this.unsigned))},Sn.rotr=Sn.rotateRight,Sn.toSigned=function(){return this.unsigned?un(this.low,this.high,!1):this},Sn.toUnsigned=function(){return this.unsigned?this:un(this.low,this.high,!0)},Sn.toBytes=function(t){return t?this.toBytesLE():this.toBytesBE()},Sn.toBytesLE=function(){var t=this.high,n=this.low;return[255&n,n>>>8&255,n>>>16&255,n>>>24,255&t,t>>>8&255,t>>>16&255,t>>>24]},Sn.toBytesBE=function(){var t=this.high,n=this.low;return[t>>>24,t>>>16&255,t>>>8&255,255&t,n>>>24,n>>>16&255,n>>>8&255,255&n]},Jt.fromBytes=function(t,n,i){return i?Jt.fromBytesLE(t,n):Jt.fromBytesBE(t,n)},Jt.fromBytesLE=function(t,n){return new Jt(t[0]|t[1]<<8|t[2]<<16|t[3]<<24,t[4]|t[5]<<8|t[6]<<16|t[7]<<24,n)},Jt.fromBytesBE=function(t,n){return new Jt(t[4]<<24|t[5]<<16|t[6]<<8|t[7],t[0]<<24|t[1]<<16|t[2]<<8|t[3],n)};var Tn=Jt;x(),gt();var En=9007199254740991;y.pow(2,-52);function kn(){return Date.now()||(new Date).getTime()}Tn.fromNumber(En);var In=!!("ontouchstart"in self||self.DocumentTouch&&a instanceof self.DocumentTouch)||!(!v||!v.msMaxTouchPoints),Rn=$t(),On=!(!Rn||!Rn.webkitShowPlaybackTargetPicker),Nn=function(){function t(){this.Xm=void 0,this.vp=!1,this.Qe=In,this.Qs=!1,this.gp=!0}var n=t.prototype;return n.zm=function(){return 0},n.dp=function(t,n){return!0},n.fp=function(t){return t>=.3333333333333333},Tt(t,[{key:"Zm",get:function(){return void 0===this.Xm&&(this.Xm=this.zm()),this.Xm}},{key:"qm",get:function(){return!Ut.gm}},{key:"Ym",get:function(){if(h.screen)return{width:h.screen.width,height:h.screen.height}}},{key:"Km",get:function(){return h.devicePixelRatio||1}},{key:"jm",get:function(){return On}},{key:"Qm",get:function(){return!1}},{key:"Jm",get:function(){return!0}},{key:"$m",get:function(){return!!(Ut.$g||Ut.su||Ut.Eg)||!!Ut.Vg}},{key:"tp",get:function(){return Ut.Vg}},{key:"ep",get:function(){return!Ut.su}},{key:"sp",get:function(){return!0}},{key:"np",get:function(){return!0}},{key:"rp",get:function(){return!1}},{key:"op",get:function(){}},{key:"hp",get:function(){return!0}},{key:"ap",get:function(){return!1}},{key:"cp",get:function(){return Ut.Vg}},{key:"lp",get:function(){return!1}},{key:"_p",get:function(){return!1}}]),t}(),Pn=function(t){function n(){return t.call(this)||this}return _t(n,t),n}(Nn);x(),gt();var An=function(t){function n(){return t.apply(this,arguments)||this}return _t(n,t),n.prototype.dp=function(t,n){if(t&&t.mp&&n&&n.mp){var i=Dn(t.mp,"mp4a.40.2")&&Dn(n.mp,"mp4a.40.5"),e=Dn(t.mp,"mp4a.40.5")&&Dn(n.mp,"mp4a.40.2"),r=Dn(t.mp,"mp4a.40.2")&&Dn(n.mp,"mp4a.40.34"),o=Dn(t.mp,"mp4a.40.34")&&Dn(n.mp,"mp4a.40.2"),u=Dn(t.mp,"mp4a.40.5")&&Dn(n.mp,"mp4a.40.34"),s=Dn(t.mp,"mp4a.40.34")&&Dn(n.mp,"mp4a.40.5");return!(i||e||r||o||u||s)}return!0},Tt(n,[{key:"op",get:function(){if(Ut.Nv)return 4096}}]),n}(Pn);function Dn(t,n){return t.indexOf(n)>-1}x(),gt();var Cn=function(t){function n(){return t.apply(this,arguments)||this}return _t(n,t),n.prototype.fp=function(t){return t>=2},n}(Pn);x(),gt();var xn=function(t){function n(){var n;return(n=t.call(this)||this).vp=Ut.nm>=11,n.gp=Ut.$g&&!(Ut.su&&Ut.nm<10),n}return _t(n,t),Tt(n,[{key:"lp",get:function(){return Ut.nm<17}},{key:"_p",get:function(){return!0}}]),n}(Pn);x(),gt();var Bn,Mn=function(t){function n(){return t.apply(this,arguments)||this}return _t(n,t),Tt(n,[{key:"hp",get:function(){return!Ut.Lv||(Ut.Sg?92!==Ut.Rg:Ut.wg>=100)}}]),n}(Pn);x(),gt(),x(),gt(),x(),gt(),x(),gt(),x(),gt();var Ln=function(){var t=Gt();if(!t)return!1;var n=t.muted;return t.muted=!n,t.muted!==n}();!function(){if(Ut.Kv)return!1;var t=Gt();if(!t)return!1;var n=t.volume;t.volume=n/2+.1,t.volume}();var Un=function(t){function n(n){var i;return(i=t.call(this)||this).pp=n,i.vp=i.pp.vp,i.Qe=i.pp.Qe,i.gp=Ln&&i.pp.gp,i}_t(n,t);var i=n.prototype;return i.zm=function(){return this.pp.Zm},i.dp=function(t,n){return this.pp.dp(t,n)},i.fp=function(t){return this.pp.fp(t)},Tt(n,[{key:"op",get:function(){return this.pp.op}},{key:"hp",get:function(){return this.pp.hp}},{key:"lp",get:function(){return this.pp.lp}}]),n}(Nn),Fn=function(t){function n(n){var i;return(i=t.call(this,n)||this).vp=!0,i.Qs=!0,i}return _t(n,t),Tt(n,[{key:"rp",get:function(){return Ut.su}}]),n}(Un);x(),gt();var zn=function(t){function n(){return t.apply(this,arguments)||this}return _t(n,t),n.prototype.zm=function(){return function(t){return t&&Xt(h.ManagedMediaSource)?h.ManagedMediaSource:Xt(h.MediaSource)?h.MediaSource:void 0}(!0)?t.prototype.zm.call(this):1},Tt(n,[{key:"rp",get:function(){return!0}}]),n}(Fn);x(),gt();var Wn=function(t){function n(){return t.apply(this,arguments)||this}return _t(n,t),n.prototype.dp=function(n,i){return t.prototype.dp.call(this,n,i)},Tt(n,[{key:"Qm",get:function(){return Ut.Pg<3}},{key:"Jm",get:function(){return Ut.Pg>=3}},{key:"Ym",get:function(){var t=this;return h.tizen&&!this.Ap&&h.tizen.systeminfo.getPropertyValue("DISPLAY",(function(n){var i=n.resolutionWidth,e=n.resolutionHeight;1===i&&1===e||(t.Ap={width:i,height:e})})),this.Ap}},{key:"ap",get:function(){return Ut.Pg<3}}]),n}(Un);x(),gt();var Hn=function(t){function n(){return t.apply(this,arguments)||this}return _t(n,t),Tt(n,[{key:"Ym",get:function(){var t=this;return h.webOS&&!this.Ap&&h.webOS.deviceInfo((function(n){t.Ap={width:n.screenWidth,height:n.screenHeight}})),this.Ap}},{key:"sp",get:function(){return!1}}]),n}(Un);x(),gt();var Vn=function(t){function n(){return t.apply(this,arguments)||this}return _t(n,t),Tt(n,[{key:"rp",get:function(){return!0}},{key:"_p",get:function(){return this.pp._p}}]),n}(Un);function qn(t,n){(null==n||n>t.length)&&(n=t.length);for(var i=0,e=new Array(n);i<n;i++)e[i]=t[i];return e}function Xn(t,n){if(t){if("string"==typeof t)return qn(t,n);var i=p.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(i):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?qn(t,n):void 0}}function jn(t){return function(t){if(Array.isArray(t))return qn(t)}(t)||function(t){if(void 0!==n&&null!=t[e]||null!=t["@@iterator"])return Array.from(t)}(t)||Xn(t)||function(){throw new m("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}!function(t){Bn=t}(function(){var t=function(){if(Ut.Kg)return new An;if(Ut.Ug||Ut.Hg)return new Cn;if(Ut.$g)return new xn;if(Ut.gg)return new Mn;return new Pn}();return Ut.su?new zn(t):Ut.Qs?new Fn(t):Ut.Ig?new Wn(t):Ut.Ng?new Hn(t):Ut.Nv?new Vn(t):new Un(t)}()),x(),gt(),x(),gt(),x(),gt(),x(),gt(),x(),gt(),x(),gt(),x(),gt(),x(),gt(),nt(),x(),gt();var Yn=!(Ut.Hg&&!Ut.Xg),Kn=self.console;function Gn(t){if(Vt(t))try{return JSON.stringify(t)}catch(t){}return t}function $n(t){return t.map(Gn).join(" ")}function Zn(t){var n=Kn&&Kn[t];return n?n.bind&&Yn?n.bind(Kn):function(){for(var n=arguments.length,i=new Array(n),e=0;e<n;e++)i[e]=arguments[e];Kn[t]($n(i))}:void 0}var Jn=Zn("log")||Yt,Qn=Zn("warn")||Jn.bind(void 0,"WARNING:"),ti=Zn("error")||Jn.bind(void 0,"ERROR:"),ni=function(){var t=Kn&&Kn.assert;return t?t.bind&&Yn?t.bind(Kn):function(t){for(var n=arguments.length,i=new Array(n>1?n-1:0),e=1;e<n;e++)i[e-1]=arguments[e];Kn.assert(t,$n(i))}:function(t){for(var n=arguments.length,i=new Array(n>1?n-1:0),e=1;e<n;e++)i[e-1]=arguments[e];t||ti.apply(void 0,["Assertion failed:"].concat(jn(i)))}}();function ii(t,n){for(var i=0;i<n.length;i++){var e=n[i];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),p.defineProperty(t,e.key,e)}}function ei(t,n){var i=function(t,n){var i=t.length;if(i<=1)return t;for(var e=new Array(i),r=1;r<i;r*=2){ri(t,n,r,e);var o=t;t=e,e=o}return t}(t,n);return i!==t&&ri(i,null,t.length,t),t}function ri(t,n,i,e){var r,o,u,s,f,c=t.length,h=0,a=2*i;for(r=0;r<c;r+=a)for(u=(o=r+i)+i,o>c&&(o=c),u>c&&(u=c),s=r,f=o;;)if(s<o&&f<u)n(t[s],t[f])<=0?e[h++]=t[s++]:e[h++]=t[f++];else if(s<o)e[h++]=t[s++];else{if(!(f<u))break;e[h++]=t[f++]}}x(),gt();var oi=/[a-zA-Z]/,ui=/[0-9]/,si=/[0-9a-fA-F]/,fi=/^0x/i,ci=/^[0-9]+$/,hi=/^[0-9a-fA-F]+$/,ai=/^[0-7]+$/,vi=p.prototype.toString,di=Array.isArray||function(t){return"[object Array]"===vi.call(t)},li=void 0!==n&&"symbol"==typeof e;function wi(t){return di(t)?t:Array.from(t)}function bi(t,n,i){var e=t[n];t[n]=t[i],t[i]=e}function gi(t){return t>=65&&t<=90}function mi(t){return gi(t)||function(t){return t>=97&&t<=122}(t)}function pi(t){return t>=48&&t<=57}function yi(t){return pi(t)||mi(t)}function _i(t){return pi(t)||t>=65&&t<=70||t>=97&&t<=102}function Si(t){return gi(t)?t+32:t}function Ti(t){return pi(t)?t-48:t>=65&&t<=70?t-65+10:t>=97&&t<=102?t-97+10:-1}function Ei(t,n){return void 0===n&&(n=!1),0<=t&&t<=9?t+48:10<=t&&t<=15?t+(n?87:55):-1}var ki=y.min,Ii=String.fromCharCode,Ri=16384;function Oi(t){for(var n=t.length,i=[],e=0;e<n;e+=Ri){var r=ki(e+Ri,n);i.push(Ii.apply(null,t.slice(e,r)))}return i.join("")}var Ni=2147483647,Pi=/[^\0-\x7E]/,Ai=/[\x2E\u3002\uFF0E\uFF61]/g,Di={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},Ci=y.floor,xi=String.fromCharCode;function Bi(t){throw new RangeError(Di[t])}function Mi(t){for(var n=[],i=0,e=t.length;i<e;){var r=t.charCodeAt(i++);if(r>=55296&&r<=56319&&i<e){var o=t.charCodeAt(i++);56320==(64512&o)?n.push(((1023&r)<<10)+(1023&o)+65536):(n.push(r),i--)}else n.push(r)}return n}var Li,Ui,Fi,zi=function(t,n){return t+22+75*(t<26)-((0!=n)<<5)},Wi=function(t,n,i){var e=0;for(t=i?Ci(t/700):t>>1,t+=Ci(t/n);t>455;e+=36)t=Ci(t/35);return Ci(e+36*t/(t+38))},Hi=function(t){return function(t,n){var i=t.split("@"),e="";i.length>1&&(e=i[0]+"@",t=i[1]);var r=function(t,n){for(var i=[],e=t.length;e--;)i[e]=n(t[e]);return i}((t=t.replace(Ai,".")).split("."),n).join(".");return e+r}(t,(function(t){return Pi.test(t)?"xn--"+function(t){for(var n=[],i=(t=Mi(t)).length,e=128,r=0,o=72,u=0,s=t;u<s.length;u++){var f=s[u];f<128&&n.push(xi(f))}var c=n.length,h=c;for(c&&n.push("-");h<i;){for(var a=Ni,v=0,d=t;v<d.length;v++){var l=d[v];l>=e&&l<a&&(a=l)}var w=h+1;a-e>Ci((Ni-r)/w)&&Bi("overflow"),r+=(a-e)*w,e=a;for(var b=0,g=t;b<g.length;b++){var m=g[b];if(m<e&&++r>Ni&&Bi("overflow"),m==e){for(var p=r,y=36;;y+=36){var _=y<=o?1:y>=o+26?26:y-o;if(p<_)break;var S=p-_,T=36-_;n.push(xi(zi(_+S%T,0))),p=Ci(S/T)}n.push(xi(zi(p,0))),o=Wi(r,w,h==c),r=0,++h}}++r,++e}return n.join("")}(t):t}))};function Vi(t){for(var n=[],i=0;i<t.length;i++){var e=t[i];e>65535&&(e-=65536,n.push(e>>>10&1023|55296),e=56320|1023&e),n.push(e)}return Oi(n)}function qi(t){if(t>=55296&&t<=57343)throw new g("Lone surrogate U+"+t.toString(16).toUpperCase()+" is not a scalar value")}function Xi(t,n){return t>>n&63|128}function ji(t,n){0!=(4294967168&t)?(0==(4294965248&t)?n.push(t>>6&31|192):0==(4294901760&t)?(qi(t),n.push(t>>12&15|224),n.push(Xi(t,6))):0==(4292870144&t)&&(n.push(t>>18&7|240),n.push(Xi(t,12)),n.push(Xi(t,6))),n.push(63&t|128)):n.push(t)}function Yi(t){for(var n=[],i=0;i<t.length;i++){ji(t[i],n)}return n}function Ki(){if(Fi>=Ui)throw new g("Invalid byte index");var t=255&Li[Fi];if(Fi++,128==(192&t))return 63&t;throw new g("Invalid continuation byte")}function Gi(){var t,n;if(Fi>Ui)throw new g("Invalid byte index");if(Fi===Ui)return!1;if(t=255&Li[Fi],Fi++,0==(128&t))return t;if(192==(224&t)){if((n=(31&t)<<6|Ki())>=128)return n;throw new g("Invalid continuation byte")}if(224==(240&t)){if((n=(15&t)<<12|Ki()<<6|Ki())>=2048)return qi(n),n;throw new g("Invalid continuation byte")}if(240==(248&t)&&(n=(7&t)<<18|Ki()<<12|Ki()<<6|Ki())>=65536&&n<=1114111)return n;throw new g("Invalid UTF-8 detected")}function $i(t){return[37,Ei(t>>4),Ei(15&t)]}function Zi(t){return function(t){return t>=0&&t<=31}(t)||t>126}function Ji(t){return Zi(t)||32===t||34===t||60===t||62===t||96===t}function Qi(t){return Ji(t)||35===t||63===t||123===t||125===t}function te(t){return Qi(t)||47===t||58===t||59===t||61===t||64===t||t>=91&&t<=94||124===t}function ne(t){return t<33||t>126||34===t||35===t||60===t||62===t}function ie(t){return ne(t)||39===t}function ee(t,n){if(!n(t))return[t];for(var i=Yi([t]),e=[],r=0;r<i.length;r++){var o=i[r];e.push.apply(e,$i(o))}return e}function re(t,n){for(var i=[],e=0,r=Mi(t);e<r.length;e++){var o=r[e];i.push.apply(i,ee(o,n))}return Vi(i)}function oe(t){return function(t){for(var n=[],i=t.length,e=0;e<i;e++){var r=t[e];if(37===r&&e+2<i&&_i(t[e+1])&&_i(t[e+2])){var o=Ti(t[e+1])<<4|Ti(t[e+2]);n.push(o),e+=2}else n.push(r)}return n}(Yi(t))}function ue(t){return Vi(function(t){Li=t.slice(),Ui=Li.length,Fi=0;for(var n,i=[];!1!==(n=Gi());)i.push(n);return i}(oe(Mi(t))))}function se(t){var n=t.length,i=[0,0,0,0,0,0,0,0],e=0,r=null,o=0;if(o<n&&":"===t[o]){if(!(o+1<n&&":"===t[o+1]))throw new m;o+=2,r=e+=1}for(;o<n;){if(8===e)throw new m("Too many groups");if(":"!==t[o]){for(var u=0,s=0;s<4&&o<n&&si.test(t[o]);)u=u<<4|_(t[o],16),o+=1,s+=1;if("."===t[o]){if(0===s)throw new m;if(o-=s,e>6)throw new m;for(var f=0;o<n;){var c=null;if(f>0){if(!("."===t[o]&&f<4))throw new m;o+=1}if(!ui.test(t[o]))throw new m;for(;o<n&&ui.test(t[o]);){var h=_(t[o],10);if(null===c)c=h;else{if(0===c)throw new m;if((c=10*c+h)>255)throw new m}o+=1}i[e]=i[e]<<8|c,2!==(f+=1)&&4!==f||(e+=1)}if(4!==f)throw new m;break}if(":"===t[o]){if((o+=1)===n)throw new m}else if(o<n)throw new m;i[e]=u,e+=1}else{if(null!==r)throw new m("Too many :: groups");o+=1,r=e+=1}}if(null!==r){var a=e-r;for(e=7;0!==e&&a>0;)bi(i,e,r+a-1),e-=1,a-=1}else if(8!==e)throw new m;return i}function fe(t){var n=10,i=ci;return fi.test(t)?(t=t.slice(2),n=16,i=hi):t.length>=2&&"0"===t[0]&&(t=t.slice(1),n=8,i=ai),""===t?0:i.test(t)?_(t,n):void 0}var ce={Sp:4},he=/[\0\t\n\r #%/:?@\[\\\]]/,ae=/[\0\t\n\r #/:?@\[\\\]]/;function ve(t,n){if("["===t[0]){if("]"!==t[t.length-1])throw new m("Invalid IPv6 address");return{Sp:2,Tp:se(t.slice(1,-1))}}if(!n)return function(t){if(ae.test(t))throw new m("Invalid code point in opaque host");var n=re(t,Zi);return""===n?ce:{Sp:3,kp:n}}(t);var i=function(t){var n=function(t){return Hi(t.toLowerCase())}(t);return n}(ue(t));if(he.test(i))throw new m("Invalid code point in host");var e=function(t){var n=t.split(".");if(""===n[n.length-1]&&n.pop(),!(n.length>4)){for(var i=[],e=0;e<n.length;e++){var r=n[e];if(""===r)return;var o=fe(r);if(void 0===o)return;i.push(o)}for(var u=0;u<i.length-1;u++)if(i[u]>255)throw new m;if(i[i.length-1]>=y.pow(256,5-i.length))throw new m;for(var s=i.pop(),f=0;f<i.length;f++)s+=i[f]*y.pow(256,3-f);return s}}(i);return void 0!==e?{Sp:1,Tp:e}:""===i?ce:{Sp:0,Ep:i}}function de(t){switch(t.Sp){case 0:return t.Ep;case 1:return function(t){for(var n=[],i=t,e=1;e<=4;e++)n.push(""+(255&i)),4!==e&&n.push("."),i>>>=8;return n.reverse().join("")}(t.Tp);case 2:return"["+function(t){for(var n="",i=function(t){for(var n=0,i=0,e=0,r=0,o=0;o<8;o++)0===t[o]?(0===r&&(e=o),r++):(r>i&&(n=e,i=r),r=0);return r>i&&(n=e,i=r),i>1?n:null}(t),e=!1,r=0;r<8;r++){if(e){if(0===t[r])continue;e=!1}i!==r?(n+=t[r].toString(16),7!==r&&(n+=":")):(n+=0===r?"::":":",e=!0)}return n}(t.Tp)+"]";case 3:return t.kp;case 4:return""}}var le=/\+/g;function we(t){return 42===t||45===t||46===t||95===t||yi(t)}function be(t){for(var n=t.split("&"),i=[],e=0;e<n.length;e++){var r=n[e];if(""!==r){var o=r.indexOf("="),u=void 0,s=void 0;-1!==o?(u=r.slice(0,o),s=r.slice(o+1)):(u=r,s=""),u=u.replace(le," "),s=s.replace(le," ");var f=ue(u),c=ue(s);i.push([f,c])}}return i}function ge(t){for(var n="",i=0;i<t.length;i++){var e=t[i];i>0&&(n+="&"),n+=me(Yi(Mi(e[0])))+"="+me(Yi(Mi(e[1])))}return n}function me(t){for(var n=[],i=0;i<t.length;i++){var e=t[i];32===e?n.push(43):we(e)?n.push(e):n.push.apply(n,$i(e))}return Oi(n)}var pe=/(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])/;function ye(t){var n=""+t,i=pe.exec(n);return i?function(t,n){for(var i=t.length,e=[],r=n;r<i;r++){var o=t.charCodeAt(r);if(Se(o))if(Te(o)||r===i-1)e.push(_e);else{var u=t.charCodeAt(r+1);Te(u)?(e.push(o,u),r++):e.push(_e)}else e.push(o)}return t.slice(0,n)+Oi(e)}(n,i.index):n}var _e=65533,Se=function(t){return 55296==(63488&t)},Te=function(t){return 0!=(1024&t)};function Ee(t,n){var i=t[0],e=n[0];return i===e?0:i<e?-1:1}function ke(t){t.D_.length=0}function Ie(t,n){!function(t,n){for(var i=0;i<n.length;i++)t[i]=n[i];t.length=n.length}(t.D_,be(n))}function Re(t){if(t.ic){var n=ge(t.D_);""===n&&(n=null),t.ic.ic.xp=n}}var Oe=function(){function t(t){if(void 0===t&&(t=void 0),this.ic=null,null==t)this.D_=[];else if("object"==typeof t||"function"==typeof t)if(function(t){return t instanceof Oe&&!!di(t.D_)&&(!li||t[e]===Ne)}(t))this.D_=t.D_.slice();else if(function(t){return null!=t&&(!!di(t)||!!li&&"function"==typeof t[e])}(t)){this.D_=[];for(var n=0,i=wi(t);n<i.length;n++){var r=wi(i[n]);if(2!==r.length)throw new m("Invalid name-value pair");this.D_.push([ye(r[0]),ye(r[1])])}}else for(var o in this.D_=[],t)p.prototype.hasOwnProperty.call(t,o)&&this.D_.push([ye(o),ye(t[o])]);else(t=ye(t)).length>0&&"?"===t[0]&&(t=t.slice(1)),this.D_=be(t)}var n=t.prototype;return n.append=function(t,n){t=ye(t),n=ye(n),this.D_.push([t,n]),Re(this)},n.delete=function(t){t=ye(t);for(var n=this.D_,i=0;i<n.length;){n[i][0]===t?n.splice(i,1):i++}Re(this)},n.get=function(t){t=ye(t);for(var n=this.D_,i=0;i<n.length;i++){var e=n[i];if(e[0]===t)return e[1]}return null},n.getAll=function(t){t=ye(t);for(var n=this.D_,i=[],e=0;e<n.length;e++){var r=n[e];r[0]===t&&i.push(r[1])}return i},n.has=function(t){t=ye(t);for(var n=this.D_,i=0;i<n.length;i++){if(n[i][0]===t)return!0}return!1},n.set=function(t,n){t=ye(t),n=ye(n);for(var i=this.D_,e=!1,r=0;r<i.length;){var o=i[r];o[0]===t?e?i.splice(r,1):(o[1]=n,e=!0,r++):r++}e||i.push([t,n]),Re(this)},n.sort=function(){ei(this.D_,Ee),Re(this)},n.toString=function(){return ge(this.D_)},n.entries=function(){return new Ce(this.D_,Pe)},n.keys=function(){return new Ce(this.D_,Ae)},n.values=function(){return new Ce(this.D_,De)},n.forEach=function(t){var n=this;this.D_.forEach((function(i){return t(i[1],i[0],n)}))},t}(),Ne=Oe.prototype.entries;li&&(Oe.prototype[e]=Ne);var Pe=function(t){return[t[0],t[1]]},Ae=function(t){return t[0]},De=function(t){return t[1]},Ce=function(){function t(t,n){this.Rp=0,this.D_=t,this.Ip=n}return t.prototype.next=function(){return this.Rp<this.D_.length?{done:!1,value:this.Ip(this.D_[this.Rp++])}:{done:!0,value:void 0}},t}(),xe="null";var Be=p.create(null);Be.ftp=21,Be.file=0,Be.gopher=70,Be.http=80,Be.https=443,Be.ws=80,Be.wss=443;var Me=/^(?:\.|%2e)$/i,Le=/^(?:\.|%2e){2}$/i;function Ue(t){return Me.test(t)}function Fe(t){return Le.test(t)}function ze(t){return void 0!==Be[t]}function We(t){return ze(t.Cp)}function He(t){return""!==t.Pp||""!==t.Dp}function Ve(t){var n=t.length;if(!(n>=2))return!1;if(!Xe(t.slice(0,2)))return!1;if(2!==n){var i=t[2];if(47!==i&&92!==i&&63!==i&&35!==i)return!1}return!0}function qe(t){return 2===t.length&&oi.test(t[0])&&(":"===t[1]||"|"===t[1])}function Xe(t){return 2===t.length&&qe(Oi(t))}function je(t){return qe(t)&&":"===t[1]}function Ye(t){var n=t.Np;0!==n.length&&("file"===t.Cp&&1===n.length&&je(n[0])||n.pop())}function Ke(t){return null===t.Mp||ce===t.Mp||t.Lp||"file"===t.Cp}var Ge=-1,$e=/\t|\n|\r/g,Ze=/^[\x00-\x1f ]+|[\x00-\x1f ]+$/g;function Je(t,n,i,e){void 0===i&&(i=null),void 0===e&&(e=null),i||(i=new tr,t=t.replace(Ze,""));var r=null!==e?e:0;n=n||null;for(var o=[],u=!1,s=!1,f=!1,c=Mi(t=t.replace($e,"")),h=c.length,a=0;a<=h;){var v=a<h?c[a]:Ge;switch(r){case 0:if(!mi(v)){if(null===e){o.length=0,r=2;continue}throw new m("Invalid scheme")}o.push(Si(v)),r=1;break;case 1:if(yi(v)||43===v||45===v||46===v)o.push(Si(v));else{if(58!==v){if(null===e){o.length=0,r=2,a=0;continue}throw new m("Invalid scheme")}var d=Vi(o);if(null!==e){if(ze(i.Cp)&&!ze(d))return;if(!ze(i.Cp)&&ze(d))return;if((He(i)||null!==i.Bp)&&"file"===d)return;if("file"===i.Cp&&(i.Mp===ce||null===i.Mp))return}if(i.Cp=d,null!==e)return void(We(i)&&i.Bp===Be[i.Cp]&&(i.Bp=null));o.length=0,"file"===i.Cp?r=13:We(i)&&n&&n.Cp===i.Cp?r=3:We(i)?r=7:47===c[a+1]?(r=4,a+=1):(i.Lp=!0,i.Np.push(""),r=18)}break;case 2:if(!n||n.Lp&&35!==v)throw new m("Invalid scheme");n.Lp&&35===v?(i.Cp=n.Cp,i.Np=n.Np.slice(),i.xp=n.xp,i.Op="",i.Lp=!0,r=20):"file"!==n.Cp?(r=5,a-=1):(r=13,a-=1);break;case 3:47===v&&47===c[a+1]?r=8:(r=5,a-=1);break;case 4:47===v?r=9:(r=17,a-=1);break;case 5:i.Cp=n.Cp,Ge===v?(i.Pp=n.Pp,i.Dp=n.Dp,i.Mp=n.Mp,i.Bp=n.Bp,i.Np=n.Np.slice(),i.xp=n.xp):47===v?r=6:63===v?(i.Pp=n.Pp,i.Dp=n.Dp,i.Mp=n.Mp,i.Bp=n.Bp,i.Np=n.Np.slice(),i.xp="",r=19):35===v?(i.Pp=n.Pp,i.Dp=n.Dp,i.Mp=n.Mp,i.Bp=n.Bp,i.Np=n.Np.slice(),i.xp=n.xp,i.Op="",r=20):92===v&&We(i)?r=6:(i.Pp=n.Pp,i.Dp=n.Dp,i.Mp=n.Mp,i.Bp=n.Bp,i.Np=n.Np.slice(),i.Np.pop(),r=17,a-=1);break;case 6:!We(i)||47!==v&&92!==v?47===v?r=9:(i.Pp=n.Pp,i.Dp=n.Dp,i.Mp=n.Mp,i.Bp=n.Bp,r=17,a-=1):r=8;break;case 7:if(47!==v||47!==c[a+1]){r=8;continue}r=8,a+=1;break;case 8:47!==v&&92!==v&&(r=9,a-=1);break;case 9:if(64===v){u&&o.unshift(37,52,48),u=!0;for(var l=0;l<o.length;l++){var w=o[l];if(58!==w||f){var b=Vi(ee(w,te));f?i.Dp+=b:i.Pp+=b}else f=!0}o.length=0}else if(Ge===v||47===v||63===v||35===v||We(i)&&92===v){if(u&&0===o.length)throw new m("Invalid host");a-=o.length+1,o.length=0,r=10}else o.push(v);break;case 10:case 11:if(null!==e&&"file"===i.Cp)a-=1,r=15;else if(58!==v||s)if(Ge===v||47===v||63===v||35===v||We(i)&&92===v){if(a-=1,We(i)&&0===o.length)throw new m("Invalid host");if(null!==e&&0===o.length&&(He(i)||null!==i.Bp))return;var g=ve(Vi(o),We(i));if(i.Mp=g,o.length=0,r=16,null!==e)return}else 91===v?s=!0:93===v&&(s=!1),o.push(v);else{if(0===o.length)throw new m("Invalid host");var p=ve(Vi(o),We(i));if(i.Mp=p,o.length=0,r=12,11===e)return}break;case 12:if(pi(v))o.push(v);else{if(!(Ge===v||47===v||63===v||35===v||We(i)&&92===v||null!==e))throw new m("Invalid port");if(0!==o.length){var y=_(Vi(o),10);if(y>65535)throw new m("Invalid port");i.Bp=y===Be[i.Cp]?null:y,o.length=0}if(null!==e)return;r=16,a-=1}break;case 13:i.Cp="file",47===v||92===v?r=14:n&&"file"===n.Cp?Ge===v?(i.Mp=n.Mp,i.Np=n.Np.slice(),i.xp=n.xp):63===v?(i.Mp=n.Mp,i.Np=n.Np.slice(),i.xp="",r=19):35===v?(i.Mp=n.Mp,i.Np=n.Np.slice(),i.xp=n.xp,i.Op="",r=20):(Ve(c.slice(a))||(i.Mp=n.Mp,i.Np=n.Np.slice(),Ye(i)),r=17,a-=1):(r=17,a-=1);break;case 14:47===v||92===v?r=15:(n&&"file"===n.Cp&&!Ve(c.slice(a))&&(je(n.Np[0])?i.Np.push(n.Np[0]):i.Mp=n.Mp),r=17,a-=1);break;case 15:if(Ge===v||47===v||92===v||63===v||35===v)if(a-=1,null===e&&Xe(o))r=17;else if(0===o.length){if(i.Mp=ce,null!==e)return;r=16}else{var S=ve(Vi(o),We(i));if(0===S.Sp&&"localhost"===S.Ep&&(S=ce),i.Mp=S,null!==e)return;o.length=0,r=16}else o.push(v);break;case 16:We(i)?(r=17,47!==v&&92!==v&&(a-=1)):null===e&&63===v?(i.xp="",r=19):null===e&&35===v?(i.Op="",r=20):Ge!==v&&(r=17,47!==v&&(a-=1));break;case 17:if(Ge===v||47===v||We(i)&&92===v||null===e&&(63===v||35===v)){var T=Vi(o);if(Fe(T)?(Ye(i),47===v||We(i)&&92===v||i.Np.push("")):!Ue(T)||47===v||We(i)&&92===v?Ue(T)||("file"===i.Cp&&0===i.Np.length&&Xe(o)&&(ce!==i.Mp&&null!==i.Mp&&(i.Mp=ce),o[1]=58,T=Vi(o)),i.Np.push(T)):i.Np.push(""),o.length=0,"file"===i.Cp&&(Ge===v||63===v||35===v))for(;i.Np.length>1&&""===i.Np[0];)i.Np.shift();63===v?(i.xp="",r=19):35===v&&(i.Op="",r=20)}else o.push.apply(o,ee(v,Qi));break;case 18:63===v?(i.xp="",r=19):35===v?(i.Op="",r=20):Ge!==v&&(i.Np[0]+=Vi(ee(v,Zi)));break;case 19:null===e&&35===v?(i.Op="",r=20):Ge!==v&&(i.xp+=Vi(ee(v,We(i)?ie:ne)));break;case 20:Ge===v||0===v||(i.Op+=Vi(ee(v,Ji)))}a++}return i}function Qe(t,n,i,e){try{Je(t,n,i,e)}catch(t){}}var tr=function(){this.Cp="",this.Pp="",this.Dp="",this.Mp=null,this.Bp=null,this.Np=[],this.xp=null,this.Op=null,this.Lp=!1};function nr(t){switch(t.Cp){case"blob":var n;try{n=Je(t.Np[0],null)}catch(t){return xe}return nr(n);case"ftp":case"gopher":case"http":case"https":case"ws":case"wss":return function(t,n,i){return t+"://"+de(n)+(null===i?"":":"+i)}(t.Cp,t.Mp,t.Bp);default:return xe}}var ir=function(){function t(t,n){var i,e=null;if(null!=n)if(function(t){return null!=t&&t instanceof ir&&"object"==typeof t.ic}(n))e=n.ic;else try{e=Je(String(n),null)}catch(t){throw new m("Invalid base URL: "+t.message)}try{i=Je(String(t),e)}catch(t){throw new m("Invalid URL: "+t.message)}var r=i.xp;this.ic=i,this.xp=function(t){var n=new Oe;return null!==t&&Ie(n,t),n}(r),this.xp.ic=this}var n=t.prototype;return n.toString=function(){return this.href},n.toJSON=function(){return this.href},function(t,n,i){n&&ii(t.prototype,n),i&&ii(t,i)}(t,[{key:"href",get:function(){return function(t,n){void 0===n&&(n=!1);var i=t.Cp+":";if(null!==t.Mp?(i+="//",He(t)&&(i+=t.Pp,""!==t.Dp&&(i+=":"+t.Dp),i+="@"),i+=de(t.Mp),null!==t.Bp&&(i+=":"+t.Bp)):null===t.Mp&&"file"===t.Cp&&(i+="//"),t.Lp)i+=t.Np[0];else for(var e=0,r=t.Np;e<r.length;e++)i+="/"+r[e];return null!==t.xp&&(i+="?"+t.xp),n||null===t.Op||(i+="#"+t.Op),i}(this.ic)},set:function(t){var n;try{n=Je(String(t),null)}catch(t){throw new m("Invalid URL: "+t.message)}this.ic=n,ke(this.xp);var i=this.ic.xp;null!==i&&Ie(this.xp,i)}},{key:"origin",get:function(){return nr(this.ic)}},{key:"protocol",get:function(){return this.ic.Cp+":"},set:function(t){Qe(t+":",null,this.ic,0)}},{key:"username",get:function(){return this.ic.Pp},set:function(t){Ke(this.ic)||(this.ic.Pp=re(t,te))}},{key:"password",get:function(){return this.ic.Dp},set:function(t){Ke(this.ic)||(this.ic.Dp=re(t,te))}},{key:"host",get:function(){var t=this.ic,n=t.Mp;if(null===n)return"";var i=t.Bp,e=de(n);return null!==i&&(e+=":"+i),e},set:function(t){this.ic.Lp||Qe(t,null,this.ic,10)}},{key:"hostname",get:function(){var t=this.ic.Mp;return null===t?"":de(t)},set:function(t){this.ic.Lp||Qe(t,null,this.ic,11)}},{key:"port",get:function(){var t=this.ic.Bp;return null===t?"":""+t},set:function(t){Ke(this.ic)||(""===t?this.ic.Bp=null:Qe(t,null,this.ic,12))}},{key:"pathname",get:function(){var t=this.ic.Np;return this.ic.Lp?t[0]:0===t.length?"":"/"+t.join("/")},set:function(t){this.ic.Lp||(this.ic.Np.length=0,Qe(t,null,this.ic,16))}},{key:"search",get:function(){var t=this.ic.xp;return null===t||""===t?"":"?"+t},set:function(t){t=ye(t);var n=this.ic;if(""===t)return n.xp=null,void ke(this.xp);"?"===t[0]&&(t=t.slice(1)),n.xp="",Qe(t,null,n,19),Ie(this.xp,t)}},{key:"searchParams",get:function(){return this.xp}},{key:"hash",get:function(){var t=this.ic.Op;return null===t||""===t?"":"#"+t},set:function(t){""!==t?("#"===t[0]&&(t=t.slice(1)),this.ic.Op="",Qe(t,null,this.ic,20)):this.ic.Op=null}}]),t}();function er(t){return t.document&&t.document.baseURI||t.location.href||""}x(),gt();var rr=function(){function t(){this.$p=new or,this.nw=Bn,this.iw=ur(),self.performance&&self.performance.now?this.Wm=function(){return self.performance.now()}:this.Wm=kn}var n=t.prototype;return n.Fp=function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];Jn.apply(void 0,jn(n))},n.Vp=function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];Qn.apply(void 0,jn(n))},n.Wp=function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];ti.apply(void 0,jn(n))},n.Up=function(t){for(var n=arguments.length,i=new Array(n>1?n-1:0),e=1;e<n;e++)i[e-1]=arguments[e];ni.apply(void 0,[t].concat(jn(i)))},n.Gm=function(t,n){return d(t,n)},n.Gp=function(t,n){return w(t,n)},n.Um=function(t){l(t)},n.Hp=function(t){b(t)},n.Zp=function(){return this.Xp.Zp()},n.zp=function(){return this.Xp.zp()},n.qp=function(){return this.Xp.qp()},n.Yp=function(){return this.Xp.Yp()},n.Kp=function(){return this.Xp.Kp()},n.jp=function(t,n){return this.Xp.jp(t,n)},n.Qp=function(t){return this.Xp.Qp(t)},n.Ih=function(t,n){var i;return void 0===n&&(n=er(h)),i="object"!==(void 0===n?"undefined":B(n))||n instanceof ir?n:n.href,new ir(t,i)},n.ew=function(t,n){if(void 0===n&&(n=er(h)),this.iw){var i=function(t){return"string"==typeof t}(n)?n:n.toString();return new self.URL(t,i).href}return this.Ih(t,n).href},Tt(t,[{key:"Jp",get:function(){return this.$p}},{key:"Ys",get:function(){return this.nw}},{key:"ow",get:function(){return{hw:v&&v.userAgent.match(/Android /i)?"Android":"other",aw:Boolean(v&&v.userAgent.match(/Android 8.0.0/i))}}},{key:"uw",get:function(){return self&&self.location&&"https:"===self.location.protocol}},{key:"cw",get:function(){return"languages"in v?v.languages.slice():[v.language]}}]),t}(),or=function(){function t(){}return Tt(t,[{key:"lw",get:function(){return v.oscpu}},{key:"Ys",get:function(){return v.platform}},{key:"dw",get:function(){return v.vendor}},{key:"fw",get:function(){return v.vendorSub}}]),t}();function ur(){if(self.URL)try{var t=new self.URL("b","http://a");return t.pathname="c d","http://a/c%20d"===t.href}catch(t){}return!1}x(),gt();var sr=function(){function t(){}var n=t.prototype;return n.Kp=function(){return J.resolve(!1)},n.zp=function(){return J.resolve(!1)},n.Yp=function(){return J.resolve(!1)},n.qp=function(){return J.resolve(!1)},n.Qp=function(t){return J.resolve(!1)},n.jp=function(t,n){return J.resolve(!1)},n.Zp=function(){return J.resolve(!1)},t}();x(),gt();var fr=function(){function t(){}var n=t.prototype;return n.wk=function(){},n.Fb=function(t){},n.Lb=function(t){},n.Bb=function(t,n){},t}();x(),gt();var cr="default",hr="unknown";x(),gt(),x(),gt(),x(),gt();var ar=function(t){return t.bk="arraybuffer",t.Ak="json",t.Sk="stream",t.Tk="text",t}({});function vr(t,i){return function(t){if(Array.isArray(t))return t}(t)||function(t,i){var r=null==t?null:void 0!==n&&t[e]||t["@@iterator"];if(null!=r){var o,u,s=[],f=!0,c=!1;try{for(r=r.call(t);!(f=(o=r.next()).done)&&(s.push(o.value),!i||s.length!==i);f=!0);}catch(t){c=!0,u=t}finally{try{f||null==r.return||r.return()}finally{if(c)throw u}}return s}}(t,i)||Xn(t,i)||function(){throw new m("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}x(),gt(),x(),gt(),x(),gt(),x(),gt(),x(),gt();var dr=function(){function t(n){var i=this;this.P_={},n instanceof t?n.asList().forEach((function(t){var n=vr(t,2),e=n[0],r=n[1];i.append(e,r)})):Array.isArray(n)?n.forEach((function(t){var n=vr(t,2),e=n[0],r=n[1];i.append(e,r)})):n&&p.getOwnPropertyNames(n).forEach((function(t){i.append(t,n[t])}))}var n=t.prototype;return n.append=function(t,n){var i=t,e=n;i=lr(i),e=wr(e);var r=i.toLowerCase();if(this.P_.hasOwnProperty(r)){var o=this.P_[r],u=o[1];o[1]=u?u+", "+e:e}else this.P_[r]=[i,e]},n.delete=function(t){var n=lr(t).toLowerCase();delete this.P_[n]},n.get=function(t){var n=lr(t).toLowerCase();return this.P_.hasOwnProperty(n)?this.P_[n][1]:null},n.has=function(t){var n=lr(t).toLowerCase();return this.P_.hasOwnProperty(n)},n.set=function(t,n){var i=t,e=(i=lr(i)).toLowerCase();this.P_[e]=[i,wr(n)]},n.forEach=function(t,n){for(var i in this.P_)this.P_.hasOwnProperty(i)&&t.call(n,this.P_[i][1],i,this)},n.asList=function(){var t=[];for(var n in this.P_)if(this.P_.hasOwnProperty(n)){var i=vr(this.P_[n],2),e=i[0],r=i[1];t.push([e,r])}return t},n.Ek=function(){var t={};return this.forEach((function(n,i){t[i]=n})),t},n.xk=function(t){var n=this;t.forEach((function(t,i){n.append(i,t)}))},n.Rk=function(t){var n=this;t.forEach((function(t,i){n.set(i,t)}))},t}();function lr(t){var n=t;if("string"!=typeof n&&(n=String(n)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(n))throw new m("Invalid character in header field name");return n}function wr(t){var n=t;return"string"!=typeof n&&(n=String(n)),n}function br(t,n,i,e,r,o,u){try{var s=t[o](u),f=s.value}catch(t){return void i(t)}s.done?n(f):J.resolve(f).then(e,r)}function gr(t){return function(){var n=this,i=arguments;return new J((function(e,r){var o=t.apply(n,i);function u(t){br(o,e,r,u,s,"next",t)}function s(t){br(o,e,r,u,s,"throw",t)}u(void 0)}))}}function mr(t,i){var r,o,u,s={label:0,sent:function(){if(1&u[0])throw u[1];return u[1]},trys:[],ops:[]},f=p.create(("function"==typeof Iterator?Iterator:p).prototype);return f.next=c(0),f.throw=c(1),f.return=c(2),"function"==typeof n&&(f[e]=function(){return this}),f;function c(n){return function(e){return function(n){if(r)throw new m("Generator is already executing.");for(;f&&(f=0,n[0]&&(s=0)),s;)try{if(r=1,o&&(u=2&n[0]?o.return:n[0]?o.throw||((u=o.return)&&u.call(o),0):o.next)&&!(u=u.call(o,n[1])).done)return u;switch(o=0,u&&(n=[2&n[0],u.value]),n[0]){case 0:case 1:u=n;break;case 4:return s.label++,{value:n[1],done:!1};case 5:s.label++,o=n[1],n=[0];continue;case 7:n=s.ops.pop(),s.trys.pop();continue;default:if(!(u=s.trys,(u=u.length>0&&u[u.length-1])||6!==n[0]&&2!==n[0])){s=0;continue}if(3===n[0]&&(!u||n[1]>u[0]&&n[1]<u[3])){s.label=n[1];break}if(6===n[0]&&s.label<u[1]){s.label=u[1],u=n;break}if(u&&s.label<u[2]){s.label=u[2],s.ops.push(n);break}u[2]&&s.ops.pop(),s.trys.pop();continue}n=i.call(t,s)}catch(t){n=[6,t],o=0}finally{r=u=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}([n,e])}}}x(),gt(),x(),gt(),x(),gt(),x(),gt(),x(),gt();var pr="function"==typeof SuppressedError?SuppressedError:function(t,n,i){var e=new g(i);return e.name="SuppressedError",e.error=t,e.suppressed=n,e};x(),gt(),x(),gt();Array.prototype.find,Array.prototype.findLast;var yr="function"==typeof Array.prototype.findIndex?function(t,n){return t.findIndex(n)}:function(t,n){for(var i=0;i<t.length;i+=1){if(n(t[i],i,t))return i}return-1},_r="function"==typeof Array.prototype.findLastIndex?function(t,n){return t.findLastIndex(n)}:function(t,n){for(var i=t.length-1;i>=0;i-=1){if(n(t[i],i,t))return i}return-1};function Sr(t,n){var i=t.indexOf(n);return-1!==i&&(function(t,n){0===n?t.shift():t.splice(n,1)}(t,i),!0)}function Tr(t,n){for(var i=new Array(t.length),e=0,r=0;r<t.length;){if(t[r]===n){r++,i.length-=1;break}i[e++]=t[r++]}for(;r<t.length;)i[e++]=t[r++];return i}function Er(t,n){return-1!==t.indexOf(n)}function kr(t){t.length=0}Array.prototype.flat,Array.prototype.flatMap;var Ir=function(){function t(){this.Fw=!1,this.Hw=!1,this.Zw=[],this.zw=[]}var n=t.prototype;return n.Gw=function(){if(!this.Fw&&!this.Hw){this.Fw=!0;for(var t=0,n=this.Zw.slice();t<n.length;t++){(0,n[t])()}this.Xw()}},n.Xw=function(){if(!this.Hw){this.Hw=!0;for(var t=0,n=this.zw.slice();t<n.length;t++){(0,n[t])()}kr(this.Zw),kr(this.zw)}},n.Ww=function(t){this.Hw||this.Zw.push(t)},n.Vw=function(t){this.Hw||Sr(this.Zw,t)},n.qw=function(t){this.Hw||this.zw.push(t)},n.Yw=function(t){this.Hw||Sr(this.zw,t)},t}(),Rr=function(){function t(){this.Kw=new Ir}var n=t.prototype;return n.jw=function(){this.Kw.Gw()},n.Xw=function(){this.Kw.Xw()},n.Qw=function(t){var n=this.Kw;if(!n.Fw)if(t.Fw)n.Gw();else if(!n.Hw&&!t.Hw){var i=function(){e(),n.Gw()},e=function(){t.Vw(i),t.Yw(e),n.Vw(i),n.Yw(e)};t.Ww(i),t.qw(e),n.Ww(i),n.qw(e)}},n.Jw=function(){var n=new t,i=new t,e=n.Uw,r=i.Uw,o=this.Kw,u=function(){e.Fw&&r.Hw||r.Fw&&e.Hw?o.Gw():e.Hw&&r.Hw&&o.Xw()};e.Ww(u),r.Ww(u),e.qw(u),r.qw(u),n.Qw(o),i.Qw(o);return o.qw((function(){e.Vw(u),r.Vw(u),e.Yw(u),r.Yw(u)})),[n,i]},n[r]=function(){this.jw()},t.$w=function(n){for(var i=new t,e=0;e<n.length;e++){var r=n[e];void 0!==r&&i.Qw(r)}return i},Tt(t,[{key:"Uw",get:function(){return this.Kw}}]),t}(),Or=function(t){return t.DELETE="DELETE",t.GET="GET",t.HEAD="HEAD",t.OPTIONS="OPTIONS",t.POST="POST",t.PUT="PUT",t}({}),Nr=function(t){return t.pE="same-origin",t.wE="no-cors",t.yE="cors",t.bE="navigate",t}({}),Pr=function(t,n){var i,e,r,o,u,s,f,c,h,a,v,d,l,w,b,g,m,p,y=t.Xu;n?(i=n.Lk,e=n.Jk,r=n.AE,o=n.jk,u=n.SE,s=n.TE,f=n.Uw,c=n.Tw,h=n.kE,a=n.EE,v=n.xE,d=n.RE,l=n.CE,w=n.PE,b=n.DE):(i=null,e={},r="GET",o=ar.Tk,u=0,s=0,c="",h="",a="",v=!1,l=void 0,w=!1,b=void 0),this.Xu=y,this.Lk=t.Lk||i,this.Jk=new dr(t.Jk||e),this.AE=t.AE||r,this.jk=t.jk||o,this.SE=void 0!==t.SE?Number(t.SE)||0:u,this.TE=void 0!==t.TE?Number(t.TE)||0:s,this.Uw=t.Uw||f||(new Rr).Uw,this.Tw=t.Tw||c,this.kE=t.kE||h,this.EE=t.EE||a,this.xE=void 0!==t.xE?Boolean(t.xE):v,this.RE=t.RE||d,this.CE=null!=(g=t.CE)?g:l,this.PE=null!=(m=t.PE)?m:w,this.DE=null!=(p=t.DE)?p:b};x(),gt(),x(),gt(),x(),gt();var Ar=function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];g.apply(this,n)};(Ar.prototype=p.create(g.prototype)).constructor=Ar;var Dr=function(t){function n(n,i){var e;return(e=t.call(this)||this).message=n||"Unknown error",e.cause=i,g.captureStackTrace&&g.captureStackTrace(e,e.constructor),e}return _t(n,t),Tt(n,[{key:"name",get:function(){return"BaseError"}}]),n}(Ar),Cr=function(t){return t.GE="HttpOpenError",t.HE="HttpResponseError",t.ZE="HttpTimeoutError",t}({}),xr=function(t){function n(n,i,e){var r;return(r=t.call(this,i,e)||this).XE=n,r}return _t(n,t),Tt(n,[{key:"Qk",get:function(){return this.XE}}]),n}(Dr);var Br=function(t){function n(n,i){return t.call(this,n,function(t){return"Error while opening "+t+". Invalid URL."}(n.Xu),i)||this}return _t(n,t),Tt(n,[{key:"name",get:function(){return Cr.GE}}]),n}(xr),Mr=function(){function t(){}var n=t.prototype;return n.Qk=function(t){return J.reject(new Br(new Pr(t)))},n.NE=function(t){},n.yn=function(){},t}();x(),gt();var Lr=function(t){function n(n){return t.call(this,"Invalid XML",n)||this}return _t(n,t),n}(Dr),Ur=function(t){function n(){var n;return(n=t.apply(this,arguments)||this).tR=new sr,n.kW=new Mr,n.i=new fr,n}return _t(n,t),n.prototype.Ix=function(t){throw new Lr},Tt(n,[{key:"Xp",get:function(){return this.tR}},{key:"eR",get:function(){return!1}},{key:"sR",get:function(){return!1}},{key:"hR",get:function(){return!1}},{key:"rR",get:function(){return!1}},{key:"aR",get:function(){return this.i}},{key:"uR",get:function(){return{cR:Yt}}},{key:"lR",get:function(){return cr}},{key:"dR",get:function(){return hr}},{key:"fR",get:function(){return this.kW}}]),n}(rr);function Fr(){return Fr=p.assign||function(t){for(var n=1;n<arguments.length;n++){var i=arguments[n];for(var e in i)p.prototype.hasOwnProperty.call(i,e)&&(t[e]=i[e])}return t},Fr.apply(this,arguments)}function zr(){var t=p.create(null);return t._w=void 0,delete t._w,t}function Wr(){return new Vr}jt(new Ur),x(),gt(),x(),gt(),x(),gt(),x(),gt(),x(),gt(),x(),gt();var Hr="undefined"!=typeof Map&&"entries"in Map.prototype?Map:void 0,Vr=Hr||function(){var t=function(){function t(t,n){this.index=0,this.data=t,this.selector=n,this.keys=p.keys(t)}return t.prototype.next=function(){var t=this.index;return t<this.keys.length?(this.index++,{value:this.selector(this.data,this.keys[t]),done:!1}):{value:void 0,done:!0}},t}();return function(){function n(){this.data=zr(),this.size=0}var i=n.prototype;return i.get=function(t){return this.data[t]},i.set=function(t,n){return this.has(t)||this.size++,this.data[t]=n,this},i.has=function(t){return t in this.data},i.delete=function(t){return!!this.has(t)&&(this.size--,delete this.data[t],!0)},i.clear=function(){this.data=zr(),this.size=0},i.keys=function(){return new t(this.data,(function(t,n){return n}))},i.values=function(){return new t(this.data,(function(t,n){return t[n]}))},i.entries=function(){return new t(this.data,(function(t,n){return[n,t[n]]}))},i.forEach=function(t){for(var n in this.data)t(this.data[n],n)},n}()}();Hr||function(){var t=function(){function t(t,n){this.gw=t,this.mw=n}return t.prototype.next=function(){var t=this.gw.next();return t.done?t:{value:this.mw(t.value),done:!1}},t}();(function(){function n(){this.P_=Wr()}var i=n.prototype;i.get=function(t){return this.P_.get(""+t)},i.set=function(t,n){return this.P_.set(""+t,n),this},i.has=function(t){return this.P_.has(""+t)},i.delete=function(t){return this.P_.delete(""+t)},i.clear=function(){this.P_.clear()},i.keys=function(){return new t(this.P_.keys(),(function(t){return Number(t)}))},i.values=function(){return this.P_.values()},i.entries=function(){return new t(this.P_.entries(),(function(t){var n=vr(t,2),i=n[0],e=n[1];return[Number(i),e]}))},i.forEach=function(t){this.P_.forEach((function(n,i){t(n,Number(i))}))},Tt(n,[{key:"size",get:function(){return this.P_.size}}])})()}();x(),gt(),x(),gt();var qr="9a04f079-9840-4286-ab92-e65be0885f95",Xr="urn:uuid:"+qr,jr="com.microsoft.playready",Yr="edef8ba9-79d6-4ace-a3c8-27dcd51d21ed",Kr="urn:uuid:"+Yr,Gr="com.widevine.alpha",$r="1077efec-c0b2-4d02-ace3-3c1e52e2fb4b",Zr="urn:uuid:"+$r,Jr="94ce86fb-07ff-4f43-adb8-93d2fa968ca2",Qr="urn:uuid:"+Jr,to="com.apple.fps.1_0";x(),gt();var no=function(t){return t.pw="playready",t.ww="widevine",t.Aw="fairplay",t.yw="clearkey",t.Sw="aes128",t}({}),io={Tw:no.pw,Ew:jr,xw:"cenc",Rw:qr,Iw:Xr,Cw:"PlayReady"},eo={Tw:no.ww,Ew:Gr,xw:"cenc",Rw:Yr,Iw:Kr,Cw:"Widevine"},ro={Tw:no.Aw,Ew:to,xw:"skd",Rw:Jr,Iw:Qr,Cw:"FairPlay"},oo=(no.Aw,{Tw:no.yw,Ew:"org.w3.clearkey",xw:"cenc",Rw:$r,Iw:Zr,Cw:"ClearKey"});x(),gt();String.prototype.replaceAll;var uo="function"==typeof String.prototype.startsWith?function(t,n){return zt(t)&&t.startsWith(n)}:function(t,n){return zt(t)&&t.substr(0,n.length)===n},so=(String.prototype.endsWith,"function"==typeof String.prototype.repeat?function(t,n){return t.repeat(n)}:function(t,n){var i=0|n;if(0===t.length||0===i)return"";for(var e=t,r="";1==(1&i)&&(r+=e),0!=(i>>>=1);)e+=e;return r}),fo=(String.prototype.padStart,String.prototype.padEnd,16384),co="function"==typeof String.fromCodePoint?function(t){var n;return t.length<=fo?(n=String).fromCodePoint.apply(n,jn(t)):ao(t,String.fromCodePoint)}:function(t){for(var n=[],i=0;i<t.length;i++){var e=t[i];e>65535&&(e-=65536,n.push(e>>>10&1023|55296),e=56320|1023&e),n.push(e)}return ho(n)};function ho(t){var n;return t.length<=fo?(n=String).fromCharCode.apply(n,jn(t)):ao(t,String.fromCharCode)}function ao(t,n){for(var i=[],e=0;e<t.length;e+=fo)i.push(n.apply(void 0,jn(t.slice(e,e+fo))));return i.join("")}var vo=Ut.gg&&Ut.wg>=42||Ut.Kg&&Ut.Qg>=38||Ut.Ug||Ut.Xg||Ut.um&&Ut.dm>=29;function lo(t,n){return function(t,n){return zt(t)&&-1!==t.indexOf(n)}(t,"audio")?{initDataTypes:["cenc"],audioCapabilities:[Fr({contentType:t},n?{robustness:"SW_SECURE_CRYPTO"}:{})]}:{initDataTypes:["cenc"],videoCapabilities:[Fr({contentType:t},n?{robustness:"SW_SECURE_CRYPTO"}:{})]}}var wo=function(){function t(t){this.Pw=Wr(),this.Mw=void 0,this.Nw=t}var n=t.prototype;return n.Kp=function(){return this.Qp(eo)},n.zp=function(){return this.Qp(oo)},n.Yp=function(){return this.Qp(io)},n.qp=function(){return this.Qp(ro)},n.Qp=function(t){var n=t.Iw,i=this.Pw.get(n);if(i)return i;var e=this.jp(t,'video/mp4; codecs="avc1.42000a"');return this.Pw.set(n,e),e},n.jp=function(t,n){var i=this;return gr((function(){return mr(this,(function(e){switch(e.label){case 0:return e.trys.push([0,2,,7]),[4,i.Nw.Dw(t.Ew,[lo(n,!0)])];case 1:return e.sent(),[2,!0];case 2:e.sent(),e.label=3;case 3:return e.trys.push([3,5,,6]),[4,i.Nw.Dw(t.Ew,[lo(n,!1)])];case 4:return e.sent(),[2,!0];case 5:return e.sent(),[2,!1];case 6:return[3,7];case 7:return[2]}}))}))()},n.Zp=function(){return this.Mw||(this.Mw=this.Lw()),this.Mw},n.Lw=function(){var t=this;return gr((function(){return mr(this,(function(n){switch(n.label){case 0:return"https:"===h.location.protocol?[2,!1]:vo?[4,t.zp()]:[2,!1];case 1:return n.sent()?[2,!1]:[2,!0]}}))}))()},t}();x(),gt(),x(),gt(),x(),gt(),x(),gt(),x(),gt(),x(),gt(),x(),gt(),x(),gt(),x(),gt();var bo=function(t){function n(n,i){return t.call(this,n||"Aborted",i)||this}return _t(n,t),Tt(n,[{key:"name",get:function(){return"AbortError"}}]),n}(Dr);function go(t){return t instanceof g&&"AbortError"===t.name}function mo(t,n){return n?new J((function(i,e){if(n.Fw)return t.catch(Yt),e(new bo);var r=function(){n.Vw(r),e(new bo)};n.Ww(r),t.then((function(t){n.Vw(r),i(t)}),(function(t){n.Vw(r),e(t)}))})):t}function po(t,n){return yo.apply(this,arguments)}function yo(){return yo=gr((function(t,n){var i,e;return mr(this,(function(u){switch(u.label){case 0:i={stack:[],error:void 0,hasError:!1},u.label=1;case 1:return u.trys.push([1,3,4,5]),function(t,n,i){if(null!=n){if("object"!=typeof n&&"function"!=typeof n)throw new m("Object expected.");var e,u;if(i){if(!o)throw new m("Symbol.asyncDispose is not defined.");e=n[o]}if(void 0===e){if(!r)throw new m("Symbol.dispose is not defined.");e=n[r],i&&(u=e)}if("function"!=typeof e)throw new m("Object not disposable.");u&&(e=function(){try{u.call(this)}catch(t){return J.reject(t)}}),t.stack.push({value:n,dispose:e,async:i})}else i&&t.stack.push({async:!0});return n}(i,n,!1),[4,t];case 2:return[2,u.sent()];case 3:return e=u.sent(),i.error=e,i.hasError=!0,[3,5];case 4:return function(t){function n(n){t.error=t.hasError?new pr(n,t.error,"An error was suppressed during disposal."):n,t.hasError=!0}var i,e=0;(function r(){for(;i=t.stack.pop();)try{if(!i.async&&1===e)return e=0,t.stack.push(i),J.resolve().then(r);if(i.dispose){var o=i.dispose.call(i.value);if(i.async)return e|=2,J.resolve(o).then(r,(function(t){return n(t),r()}))}else e|=1}catch(t){n(t)}if(1===e)return t.hasError?J.reject(t.error):J.resolve();if(t.hasError)throw t.error})()}(i),[7];case 5:return[2]}}))})),yo.apply(this,arguments)}x(),gt();J.resolve();function _o(t,n){return new J((function(i,e){if(void 0!==n&&n.Fw)e(new bo);else{var r=Wt.Gm((function(){void 0!==n&&n.Vw(o),i()}),t),o=function(){Wt.Um(r),e(new bo)};void 0!==n&&n.Ww(o)}}))}function So(t,n,i){if("function"==typeof i)i.call(t,n);else for(var e=0;e<i.length;e++){i[e].call(t,n)}}var To=function(){function t(t){var n=this;this.iy=zr(),this.uy=void 0,this.sy=0,this.Ds=function(t){n._o(t)},this.ly=null!=t?t:this}var n=t.prototype;return n.bn=function(t,n){if("function"==typeof n)if("string"==typeof t)this.ey(t,n);else for(var i=0;i<t.length;i++){var e=t[i];this.ey(e,n)}},n.ey=function(t,n){var i=this.iy[t];void 0===i?this.iy[t]=n:"function"==typeof i?this.iy[t]=[i,n]:0===this.sy?i.push(n):this.iy[t]=i.concat(n)},n.oy=function(t){if("function"==typeof t){var n=this.uy;void 0===n?this.uy=t:"function"==typeof n?this.uy=[n,t]:0===this.sy?n.push(t):this.uy=n.concat(t)}},n.Ro=function(){this.iy=zr(),this.uy=void 0},n._o=function(t){this.sy++;var n=this.iy[t.type],i=this.uy;void 0!==n&&So(this.ly,t,n),void 0!==i&&So(this.ly,t,i),this.sy--},n.vn=function(t,n){if("function"==typeof n)if("string"==typeof t)this._y(t,n);else for(var i=0;i<t.length;i++){var e=t[i];this._y(e,n)}},n._y=function(t,n){var i=this.iy[t];void 0!==i&&("function"==typeof i?i===n&&(this.iy[t]=void 0):0===this.sy?Sr(i,n):this.iy[t]=Tr(i,n))},n.vy=function(t){if("string"==typeof t)this.iy[t]=void 0;else for(var n=0;n<t.length;n++){var i=t[n];this.iy[i]=void 0}},n.gy=function(t){var n=this.uy;void 0!==n&&("function"==typeof n?n===t&&(this.uy=void 0):0===this.sy?Sr(n,t):this.uy=Tr(n,t))},n.py=function(t,n){var i=this;return new J((function(e,r){if(n&&n.Fw)return r(new bo);var o=function(t){s(),e(t)},u=function(){s(),r(new bo)},s=function(){i.vn(t,o),n&&n.Vw(u)};i.bn(t,o),n&&n.Ww(u)}))},t}();x(),gt(),x(),gt();var Eo=function(t,n){void 0===n&&(n=new Date),this.type=t,this.date=n};x(),gt();var ko=function(t){return t.wy="yy",t.Ay="Sy",t.Ty="contentprotectionerror",t.Ey="contentprotectionsuccess",t.xy="currentsourcechange",t.Ry="destroy",t.Iy="durationchange",t.Cy="emptied",t.Py="encrypted",t.Dy="ended",t.Ny="My",t.Ly="By",t.Oy="Fy",t.Vy="Wy",t.Uy="loadstart",t.Gy="manifestupdate",t.Hy="nosupportedrepresentationfound",t.Zy="offline",t.Xy="online",t.zy="pause",t.ho="play",t.qy="progress",t.Yy="ratechange",t.Ky="representationchange",t.jy="resize",t.Qy="seeked",t.Jy="seeking",t.$y="segmentnotfound",t.eb="ib",t.sb="ob",t.uo="sourcechange",t.hb="timeupdate",t.ub="volumechange",t.fb="_b",t.vb="gb",t.mb="metricschange",t}({}),Io=["cenc"],Ro=["cbcs","cbcs-1-9"],Oo=function(t){function n(n){var i;return(i=t.call(this,ko.vb)||this).pb=n,i}return _t(n,t),n}(Eo),No=function(t){function n(n,i,e,r){var o;return(o=t.call(this,"wb")||this).yb=n,o.bb=i,o.wb=e,o.Ab=r,o}return _t(n,t),n}(Eo),Po=function(t){function n(){return t.call(this,"lt")||this}return _t(n,t),n}(Eo);x(),gt(),x(),gt(),x(),gt();var Ao="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),Do=16383;function Co(t,n,i){return Ao[t>>2]+Ao[(3&t)<<4|n>>4]+Ao[(15&n)<<2|i>>6]+Ao[63&i]}function xo(t,n,i){for(var e=[],r=n;r<i;r+=3)e.push(Co(t[r],t[r+1],t[r+2]));return e.join("")}x(),gt(),x(),gt();var Bo=function(){function t(t){void 0===t&&(t=0),this.rc=t}var n=t.prototype;return n.xb=function(t){this.rc+=t},n.Rb=function(t){this.rc=t},n.Ib=function(){return new t(this.nc)},Tt(t,[{key:"nc",get:function(){return this.rc}}]),t}();function Mo(t){if(t>=55296&&t<=57343)throw new g("Lone surrogate U+"+t.toString(16).toUpperCase()+" is not a scalar value")}function Lo(t,n){return t>>n&63|128}function Uo(t,n){0!=(4294967168&t)?(0==(4294965248&t)?n.push(t>>6&31|192):0==(4294901760&t)?(Mo(t),n.push(t>>12&15|224),n.push(Lo(t,6))):0==(4292870144&t)&&(n.push(t>>18&7|240),n.push(Lo(t,12)),n.push(Lo(t,6))),n.push(63&t|128)):n.push(t)}function Fo(t,n){if(n.nc>=t.length)throw new g("Invalid byte index");var i=255&t[n.nc];if(n.xb(1),128==(192&i))return 63&i;throw new g("Invalid continuation byte")}function zo(t,n){var i=n.nc;if(i>t.length)throw new g("Invalid byte index");if(i===t.length)return!1;var e=255&t[i];if(n.xb(1),0==(128&e))return e;if(192==(224&e)){var r=(31&e)<<6|Fo(t,n);if(r>=128)return r;throw new g("Invalid continuation byte")}if(224==(240&e)){var o=(15&e)<<12|Fo(t,n)<<6|Fo(t,n);if(o>=2048)return Mo(o),o;throw new g("Invalid continuation byte")}if(240==(248&e)){var u=(7&e)<<18|Fo(t,n)<<12|Fo(t,n)<<6|Fo(t,n);if(u>=65536&&u<=1114111)return u}throw new g("Invalid UTF-8 detected")}x(),gt(),x(),gt();var Wo=65279;function Ho(t,n,i){void 0===i&&(i=!1);var e=t.getUint16(n.nc,i);return n.xb(2),e}function Vo(t,n,i,e){void 0===e&&(e=!1),t.setUint16(n.nc,i,e),n.xb(2)}function qo(t,n,i,e){void 0===e&&(e=!1),t.setUint32(n.nc,i,e),n.xb(4)}function Xo(t,n,i,e){void 0===e&&(e=!1);for(var r=i.length,o=0;o<r;o+=1){Vo(t,n,i.charCodeAt(o),e)}}function jo(t,n){return void 0===n&&(n=!1),function(t,n,i,e){for(var r=[];n.nc+2<=t.byteLength;){var o=Ho(t,n,i);if(e&&!o)break;r.push(o)}return ho(r)}(Go(t),new Qo,n,!1)}function Yo(t){return function(t){return co(t)}(function(t,n){var i,e=[],r=new Qo;if(!n){if(!1===(i=zo(t,r)))return e;i===Wo||e.push(i)}for(;!1!==(i=zo(t,r));)e.push(i);return e}($o(t)))}function Ko(t){return new E(function(t){for(var n=[],i=0;i<t.length;i++)Uo(t[i],n);return n}(function(t){for(var n=[],i=0,e=t.length;i<e;){var r=t.charCodeAt(i++);if(r>=55296&&r<=56319&&i<e){var o=t.charCodeAt(i++);56320==(64512&o)?n.push(((1023&r)<<10)+(1023&o)+65536):(n.push(r),i--)}else n.push(r)}return n}(t)))}function Go(t){return new DataView(t.buffer,t.byteOffset,t.byteLength)}function $o(t){return new E(t.buffer,t.byteOffset,t.byteLength)}function Zo(t){return t instanceof ArrayBuffer?new E(t):$o(t)}function Jo(t){if(t.slice)return t.slice(0);var n=new E(t.byteLength);return n.set(t,0),n}var Qo=function(){function t(t){void 0===t&&(t=0),this.rc=t}var n=t.prototype;return n.xb=function(t){this.rc+=t},n.Rb=function(t){this.rc=t},n.Ib=function(){return new t(this.nc)},n.Db=function(){return new Bo(this.nc<<3)},Tt(t,[{key:"nc",get:function(){return this.rc}}]),t}(),tu=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]","[object DataView]"],nu=ArrayBuffer.isView||function(t){return t&&Er(tu,Ft.call(t))};function iu(t,n){return t===n||function(t,n){if(t===n)return!0;if(t.byteLength!==n.byteLength)return!1;if(t.buffer===n.buffer&&t.byteOffset===n.byteOffset)return!0;for(var i=0;i<t.length;i+=1)if(t[i]!==n[i])return!1;return!0}(Zo(t),Zo(n))}function eu(t){var n=t.reduce((function(t,n){return t+n.byteLength}),0);return function(t,n){for(var i=new E(n),e=0,r=0;r<t.length;r++){var o=t[r];i.set(o,e),e+=o.byteLength}return i}(t,n)}function ru(t){return function(t){for(var n=t.length,i=n%3,e=[],r=n-i,o=0;o<r;o+=Do)e.push(xo(t,o,y.min(r,o+Do)));if(1===i){var u=t[n-1];e.push(Ao[u>>2]+Ao[(3&u)<<4]+"==")}else if(2===i){var s=t[n-2],f=t[n-1];e.push(Ao[s>>2]+Ao[(3&s)<<4|f>>4]+Ao[(15&f)<<2]+"=")}return e.join("")}(new E(t))}var ou=new E([0]).buffer,uu=function(){function t(){this.tc=[]}var n=t.prototype;return n.Mb=function(t){for(var n=0,i=this.tc;n<i.length;n++){if(iu(i[n][0],t))return!0}return!1},n.Lb=function(t){for(var n=0,i=this.tc;n<i.length;n++){var e=i[n];if(iu(e[0],t))return e[1]}},n.Bb=function(t,n){for(var i=0,e=this.tc;i<e.length;i++){var r=e[i];if(iu(r[0],t))return void(r[1]=n)}this.tc.push([t,n])},n.Ob=function(t,n){this.tc.forEach((function(n){return t(n[1],n[0])}),n)},n.Fb=function(){kr(this.tc)},Tt(t,[{key:"Nb",get:function(){return this.tc.length}}]),t}();x(),gt();var su=function(){function t(){var t=this;this.Ub=new J((function(n,i){t.Gd=n,t.Hd=i}))}var n=t.prototype;return n.Vb=function(t){this.Gd&&(this.Gd(t),this.Xw())},n.Wb=function(t){this.Hd&&(this.Hd(t),this.Xw())},n.jw=function(){this.Ub.catch(Yt),this.Wb(new bo)},n.Qw=function(t){var n=this;t.then((function(t){return n.Vb(t)}),(function(t){return n.Wb(t)}))},n.Xw=function(){this.Gd=void 0,this.Hd=void 0},t}();function fu(t,n){return t===jr?function(t){if(t.byteLength<2*cu.length)return t;var n=new DataView(t,0,2*cu.length),i=jo(n,!0);if(i===cu)return t;return function(t){var n='<PlayReadyKeyMessage type="LicenseAcquisition"><LicenseAcquisition Version="1"><Challenge encoding="base64encoded">',i='</Challenge><HttpHeaders><HttpHeader><name>Content-Type</name><value>text/xml; charset=utf-8</value></HttpHeader><HttpHeader><name>SOAPAction</name><value>"http://schemas.microsoft.com/DRM/2007/03/protocols/AcquireLicense"</value></HttpHeader></HttpHeaders></LicenseAcquisition></PlayReadyKeyMessage>',e=""+n+ru(t)+i;return function(t,n){void 0===n&&(n=!1);var i=new E(2*t.length);return Xo(Go(i),new Qo,t,n),i}(e,!0).buffer}(t)}(n):n}x(),gt();var cu="<PlayReady";x(),gt(),x(),gt();var hu=function(t){function n(n,i,e,r){var o;return(o=t.call(this,n,r)||this).Gb=i,o.Hb=e,o}return _t(n,t),n}(Dr);x(),gt(),x(),gt(),x(),gt(),x(),gt(),x(),gt();var au=function(t,n){return(au=p.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)p.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(t,n)};function vu(t,n){if("function"!=typeof n&&null!==n)throw new m("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}au(t,n),t.prototype=null===n?p.create(n):(i.prototype=n.prototype,new i)}function du(t,n,i){return t.indexOf?t.indexOf(n,i):Array.prototype.indexOf.call(t,n,i)}x(),gt(),x(),gt(),x(),gt(),x(),gt(),x(),gt(),x(),gt(),x(),gt();!function(){function t(t,n){this.Zb=t,this.Xb=n}t.prototype.get=function(t){var n=this.Zb.get(t);if(0===this.Xb||void 0===n)return n;var i=this.Zb.get(t+1)||0,e=n&(1<<8-this.Xb)-1,r=i>>8-this.Xb;return(e<<this.Xb)+r},t.prototype.getBit=function(t){if(!(t<0)){var n=this.Zb.get(y.floor((t+this.Xb)/8));if(void 0!==n)return(n&1<<7-this.Xb-t%8)>0?1:0}},p.defineProperty(t.prototype,"bitLength",{get:function(){return this.Zb.bitLength-this.Xb},enumerable:!1,configurable:!0}),p.defineProperty(t.prototype,"length",{get:function(){return this.Zb.length},enumerable:!1,configurable:!0})}();x(),gt(),x(),gt();y.pow(2,-52);function lu(t,n,i){return y.min(y.max(t,n),i)}function wu(t,n){return t>>8-n}function bu(t,n){return t&(1<<n)-1}var gu=function(){function t(t){this.zb=t,this.qb=0,this.Yb=0}return p.defineProperty(t.prototype,"totalBitsRead",{get:function(){return 8*this.qb+this.Yb},enumerable:!1,configurable:!0}),p.defineProperty(t.prototype,"done",{get:function(){return this.qb===this.zb.length&&0===this.Yb},enumerable:!1,configurable:!0}),p.defineProperty(t.prototype,"location",{get:function(){return{byte:this.qb,bit:this.Yb}},enumerable:!1,configurable:!0}),t.prototype.copy=function(){var n=new t(this.zb);return n.seek(this.qb,this.Yb),n},t.prototype.canReadBits=function(t){return 8*this.qb+t+this.Yb<=8*this.zb.length},t.prototype.canReadBytes=function(t){return 0===this.Yb?this.qb+t<=this.zb.length:this.qb+t<this.zb.length},t.prototype.incBit=function(){this.Yb++,this.Yb>7&&(this.qb++,this.Yb=0)},t.prototype.seek=function(t,n){this.qb=t,this.Yb=n},t.prototype.peekBit=function(){if(!this.canReadBits(1))throw new g("Cannot read past end of buffer.");return this.zb.get(this.qb)>>7-this.Yb&1},t.prototype.readBit=function(){var t=this.peekBit();return this.incBit(),t},t.prototype.readByte=function(){if(!this.canReadBytes(1))throw new g("Cannot read past end of buffer.");if(0===this.Yb)return this.zb.get(this.qb++);var t=bu(this.zb.get(this.qb),8-this.Yb),n=wu(this.zb.get(this.qb+1),this.Yb);return this.qb++,t<<this.Yb|n},t.prototype.readBits=function(t){if(!this.canReadBits(t))throw new g("Cannot read past end of buffer.");for(var n=[],i=0;i<t;i++)n.push(this.readBit());return n},t.prototype.readUInt=function(t){if(t>32)throw new g("The max bitlength that can be provided is 32.");if(!this.canReadBits(t))throw new g("Cannot read past end of buffer.");var n=0;if(0===this.Yb&&t%8==0)for(var i=t-8;i>=0;i-=8)n|=this.readByte()<<i;else for(i=t-1;i>=0;i--)n|=this.readBit()<<i;return n},t.prototype.readInt=function(t){if(t>32)throw new g("The max bitlength that can be provided is 32.");if(!this.canReadBits(t))throw new g("Cannot read past end of buffer.");var n=this.readUInt(t);return 0===(n&1<<t-1)?n:n-y.pow(2,t)},t.prototype.readExponentialGolombCode=function(){for(var t=0;0===this.readBit();)t++;var n=1<<t;return n+=this.readUInt(t)-1},t.prototype.readSignedExponentialGolombCode=function(){var t=this.readExponentialGolombCode();return 1&t?(t+1)/2:-t/2},t.prototype.skipBits=function(t){if(!this.canReadBits(t))throw new g("Skipping over the buffer edge is not allowed.");var n=this.Yb+t;this.qb+=n>>3,this.Yb=7&n},t.prototype.readBool=function(){return this.readBit()>0},t.prototype.readString=function(t){if(!this.canReadBytes(t))throw new g("Cannot read past end of buffer.");for(var n=[],i=0;i<t;i++)n.push(this.readByte());return String.fromCharCode.apply(String,n)},t}();x(),gt(),x(),gt(),x(),gt();var mu=function(t,n){return t===n?0:t<n?-1:t>n?1:T(t)?T(n)?0:1:-1},pu=function(){function t(){this.Kb=[],this.jb=[],this.Qb=0}return t.from=function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];for(var e=new t,r=0,o=n;r<o.length;r++){var u=o[r];e.pushRange(u)}return e},t.prototype.pushRange=function(t,n,i){if(void 0===n&&(n=0),void 0===i&&(i=t.length),i<0)throw new g("The buffer length must be positive.");if(0!==i){if(0===this.jb.length)this.jb.push(0);else{var e=this.jb[this.jb.length-1]+this.Kb[this.Kb.length-1].length;this.jb.push(e)}this.Kb.push(t.subarray(n,n+i)),this.Qb+=i}},t.prototype.concat=function(n){var i=new t;return i.pushRange(this.join()),i.pushRange(n.join()),i},t.prototype.copy=function(t,n,i,e){if(void 0===n&&(n=0),void 0===i&&(i=0),void 0===e&&(e=this.length),n<0||i<0||e<0)throw new RangeError;return this.slice(i,e).copyInternal(t,n)},t.prototype.copyInternal=function(t,n){for(var i=0,e=n,r=0,o=this.Kb;r<o.length;r++){var u=o[r];t.set(u,e),i+=u.length,e+=u.length}return i},t.prototype.clear=function(){this.Kb=[],this.jb=[],this.Qb=0},t.prototype.get=function(t){if(!(t<0||t>=this.length)){var n=this.findContainingBufferIndex(t),i=t-this.jb[n];return this.Kb[n][i]}},p.defineProperty(t.prototype,"first",{get:function(){return this.get(0)},enumerable:!1,configurable:!0}),t.prototype.indexOf=function(t){if(this.Kb.length<1)return-1;if(this.Kb.length>1){var n=this.join();this.clear(),this.pushRange(n)}var i=this.Kb[0];return"number"==typeof t?du(i,t):"undefined"!=typeof Buffer?Buffer.from(i.buffer,i.byteOffset,i.byteLength).indexOf(t):function(t,n){if(0===n.length)return 0;for(var i=n[0],e=n.length,r=t.length-e,o=0;o<=r&&!((o=du(t,i,o))<0||o>r);o++){for(var u=o+1,s=o+e,f=1;u<s&&t[u]===n[f];u++,f++);if(u===s)return o}return-1}(i,t)},t.prototype.findContainingBufferIndex=function(t){return function(t,n,i){if(0!==t.length){var e=0,r=t.length-1;if(1!==i(t[e],n)){if(1===i(n,t[r]))return r;for(;e!==r;){var o=y.ceil((e+r)/2);i(t[o],n)<=0?e=o:r=o-1}return e}}}(this.jb,t,mu)},t.prototype.join=function(){if(1===this.Kb.length)return this.Kb[0];var t=new E(this.length);return this.copyInternal(t,0),t},p.defineProperty(t.prototype,"length",{get:function(){return this.Qb},enumerable:!1,configurable:!0}),p.defineProperty(t.prototype,"bitLength",{get:function(){return 8*this.length},enumerable:!1,configurable:!0}),t.prototype.readUIntBE=function(t,n){if(n<=0||n>4)throw new g("Expected byteLength to be between 0 and 4 but was "+n);if(t<0||t>this.length-n)throw new g("Offset must be between 0 and buffer.length - byteLength, but was "+t+" (max allowed "+(this.length-n)+")");if(1===n)return this.get(t);for(var i=0,e=0;e<n;e++)i+=this.get(t+e)*y.pow(2,8*(n-e-1));return i},t.prototype.slice=function(n,i){void 0===i&&(i=this.length);var e=lu(n,0,this.length),r=lu(i,0,this.length);if(e>r)return new t;if(e===r)return new t;for(var o=new t,u=this.findContainingBufferIndex(e),s=this.Kb[u],f=e,c=f-this.jb[u];f+s.length-c<r;)o.pushRange(s,c,s.length-c),u+=1,c=(f+=s.length-c)-this.jb[u],s=this.Kb[u];var h=r-f;return o.pushRange(s,c,h),o},t.prototype.trim=function(){if(0===this.length)return new t;for(var n=this.length-1,i=this.Kb.length-1,e=this.Kb[i],r=e.length-1;n>=0&&i>=0;){if(0!==e[r])break;if(0===r){if(0===i)return new t;i-=1,r=(e=this.Kb[i]).length-1}else r-=1;n-=1}return this.slice(0,n+1)},t}(),yu=function(){function t(n){this.Jb=n||t.BUFFER_CHUNK_SIZE,this.$b=!1,this.tA=new pu,this.zb=new E(this.Jb),this.eA=0,this.iA=0,this.Yb=7}return t.prototype.closeByte=function(){this.zb[this.eA++]=this.iA,this.eA>=this.Jb&&this.closeBuffer(),this.iA=0,this.Yb=7},t.prototype.closeBuffer=function(t){void 0===t&&(t=!0),0!==this.eA&&(this.tA.pushRange(this.zb,0,this.eA),t&&(this.zb=new E(this.Jb)),this.eA=0)},p.defineProperty(t.prototype,"isWritingStartBit",{get:function(){return 7===this.Yb},enumerable:!1,configurable:!0}),t.prototype.close=function(){if(this.$b)throw new g("Cannot close a closed BitWriter.");return this.isWritingStartBit||this.closeByte(),this.closeBuffer(!1),this.$b=!0,this.tA},t.prototype.writeBit=function(t){if(this.$b)throw new g("Cannot write to a closed BitWriter.");this.iA|=t<<this.Yb,0===this.Yb?this.closeByte():this.Yb--},t.prototype.writeByte=function(t){if(this.$b)throw new g("Cannot write to a closed BitWriter.");this.isWritingStartBit?(this.iA=t,this.closeByte()):this.writeByteUnaligned(t)},t.prototype.writeByteUnaligned=function(t){var n=this.Yb;this.iA|=wu(t,n+1),this.closeByte(),this.iA=bu(t,8-n)<<n+1,this.Yb=n},t.prototype.writeBits=function(t){for(var n=0,i=t;n<i.length;n++){var e=i[n];this.writeBit(e)}},t.prototype.writeBytes=function(t){if(this.$b)throw new g("Cannot write to a closed BitWriter.");this.isWritingStartBit?this.writeBytesAligned(t):this.writeBytesUnaligned(t)},t.prototype.writeBytesAligned=function(t){this.eA+t.length<=this.Jb?(this.zb.set(t,this.eA),this.eA+=t.length,this.eA===this.Jb&&this.closeBuffer()):(this.closeBuffer(),this.tA.pushRange(t))},t.prototype.writeBytesUnaligned=function(t){if(0!==t.length){var n=this.Yb;this.iA|=wu(t[0],n+1),this.closeByte();for(var i=1;i<t.length;i++){var e=bu(t[i-1],8-n),r=wu(t[i],n+1);this.iA=e<<n+1|r,this.closeByte()}this.iA=bu(t[t.length-1],8-n)<<n+1,this.Yb=n}},t.prototype.writeUInt=function(t,n){if(t<0)throw new g("Received a negative number.");if(n>32)throw new g("The max bitlength that can be provided is 32.");if(t>=y.pow(2,n))throw new g("Uint "+t+" cannot be represented in "+n+" bit(s).");if(this.isWritingStartBit&&n%8==0)for(var i=n-8;i>=0;i-=8)this.writeByte(t>>i&255);else for(i=n-1;i>=0;i--)this.writeBool((t&1<<i)>0)},t.prototype.writeInt=function(t,n){if(n>32)throw new g("The max bitlength that can be provided is 32.");if(y.abs(t)>=y.pow(2,n-1))throw new g("Signed integer "+t+" cannot be represented in "+n+" bit(s).");t<0?this.writeUInt(t+y.pow(2,n),n):this.writeUInt(t,n)},t.prototype.writeExponentialGolombCode=function(t){if(t<0)throw new g("Received a negative number.");for(var n=y.floor(y.log2(t+1))+1,i=0;i<n-1;i++)this.writeBit(0);this.writeUInt(t+1,n)},t.prototype.writeSignedExponentialGolombCode=function(t){0===t?this.writeExponentialGolombCode(0):t<0?this.writeExponentialGolombCode(-2*t):this.writeExponentialGolombCode(2*t-1)},t.prototype.padByte=function(t){for(;!this.isWritingStartBit;)this.writeBit(t)},t.prototype.writeBool=function(t){this.writeBit(t?1:0)},t.prototype.writeString=function(t){for(var n=function(t){for(var n=new E(t.length),i=0;i<t.length;i++)n[i]=t.charCodeAt(i);return n}(t),i=0;i<n.length;i++)this.writeByte(n[i])},t.BUFFER_CHUNK_SIZE=1024,t}();x(),gt();var _u=function(){function t(t){this.rb=new pu,this.Jd=t}return t.prototype.closeWriter=function(){void 0!==this.Jd&&(this.rb=this.rb.concat(this.Jd.close()),this.Jd=void 0)},p.defineProperty(t.prototype,"writer",{get:function(){return void 0===this.Jd&&(this.Jd=new yu),this.Jd},enumerable:!1,configurable:!0}),t.prototype.concat=function(t){this.closeWriter(),this.rb=this.rb.concat(t)},t.prototype.toRangedBuffer=function(){return this.closeWriter(),this.rb},t}(),Su=function(){function t(t){if(this.boxType=t,4!==t.length&&16!==t.length)throw new g("The provided box type does not conform to either a 4 character type or a 16 byte uuid.")}return t.prototype.serializeCommonBoxHeader=function(n){var i=this.getSize(),e=i>=t.LARGE_SIZE/8,r=16===this.boxType.length;n.writeUInt(e?1:i,32),n.writeString(r?"uuid":this.boxType),e&&(n.writeUInt(y.floor(i/t.LARGE_SIZE),32),n.writeUInt(i%t.LARGE_SIZE,32)),r&&n.writeString(this.boxType)},t.prototype.getSize=function(){var n=8+(this.boxType.length>4?16:0),i=this.getBoxContentSize()+n;return i>=t.LARGE_SIZE/8&&(i+=8),i},t.prototype.serialize=function(){var t=new _u;return this.serializeCommonBoxHeader(t.writer),this.serializeBoxContent(t),t.toRangedBuffer()},t.LARGE_SIZE=y.pow(2,32),t}();function Tu(t,n){return t instanceof Tn?64===n:t<y.pow(2,n)}function Eu(t,n){return y.round(t*y.pow(2,n))}function ku(t,n){for(var i=0;i<n.length;i++)t.writeByte(n[i])}function Iu(t,n){return t/y.pow(2,n)}x(),gt();var Ru=function(t){function n(n,i,e){var r=t.call(this,n)||this;if(r.version=i,!Tu(i,8))throw new g("the provided version cannot fit in 8 bits.");return r.flags=e,r}return vu(n,t),p.defineProperty(n.prototype,"flags",{get:function(){return this.v_},set:function(t){this.v_=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return 4},n.prototype.serializeFlags=function(t){if("number"!=typeof this.flags)throw new g("Missing custom serializeFlags method.");t.writer.writeUInt(this.flags,24)},n.prototype.serializeBoxContent=function(t){t.writer.writeByte(this.version),this.serializeFlags(t)},n}(Su);x(),gt(),x(),gt();var Ou=function(t){function n(n,i){var e=t.call(this,n)||this;return e.data=i,e}return vu(n,t),n.prototype.getBoxContentSize=function(){return this.data.length},n.prototype.serializeBoxContent=function(t){t.concat(pu.from(this.data))},n}(Su);x(),gt(),x(),gt();var Nu=function(){function t(t){void 0===t&&(t=0),this.offset=t}return t.prototype.shift=function(t){this.offset+=t},t.prototype.seek=function(t){this.offset=t},t.prototype.clone=function(){return new t(this.offset)},t}();x(),gt();var Pu=16384;function Au(t){var n=t.length;if(n<=Pu)return String.fromCharCode.apply(String,t);for(var i=[],e=0;e<n;e+=Pu)i.push(String.fromCharCode.apply(String,t.slice(e,e+Pu)));return i.join("")}var Du=function(){function t(t){this.raw=t}return t.prototype.isSet=function(t){return function(t,n){return(t&n)===n}(this.raw,t)},t}();function Cu(t,n){var i=t.getUint8(n.offset);return n.shift(1),i}function xu(t,n,i){var e=Wu(Vu(t),n.offset,n.offset+i);return n.shift(e.byteLength),e}function Bu(t,n,i){return n.offset+i<=t.byteLength}function Mu(t,n,i){void 0===i&&(i=!1);var e=t.getUint32(n.offset,i);return n.shift(4),e}function Lu(t,n,i){void 0===i&&(i=!1);var e=Mu(t,n,i),r=Mu(t,n,i),o=i?r:e,u=i?e:r;return Tn.fromBits(u,o,!0)}function Uu(t,n,i){return Au(function(t){return[].slice.call(t)}(xu(t,n,i)))}function Fu(t,n){var i,e=Cu(t,n);return 0==(128&e)?i=e:192==(224&e)?i=64*(31&e)+(63&Cu(t,n)):224==(240&e)?i=4096*(15&e)+64*(63&Cu(t,n))+(63&Cu(t,n)):240==(248&e)&&(i=262144*(7&e)+4096*(63&Cu(t,n))+64*(63&Cu(t,n))+(63&Cu(t,n))),i}function zu(t,n){return function(t,n,i){var e=[],r=function(t,n){return n.offset+3<=t.byteLength&&239===t.getUint8(n.offset)&&187===t.getUint8(n.offset+1)&&191===t.getUint8(n.offset+2)}(t,n);r&&n.shift(3);for(;n.offset<t.byteLength;){var o=Fu(t,n);if(void 0===o)break;if(i&&0===o)break;e.push(o)}return function(t){for(var n=[],i=0,e=t;i<e.length;i++){var r=e[i];r>65535&&(r-=65536,n.push(r>>>10&1023|55296),r=56320|1023&r),n.push(r)}return Au(n)}(e)}(t,n,!0)}function Wu(t,n,i){return void 0===n&&(n=0),void 0===i&&(i=t.byteLength),new E(t.buffer,t.byteOffset+n,i-n)}function Hu(t,n,i){return void 0===n&&(n=0),void 0===i&&(i=t.byteLength),new DataView(t.buffer,t.byteOffset+n,i-n)}function Vu(t){return new E(t.buffer,t.byteOffset,t.byteLength)}var qu=function(){function t(t){void 0===t&&(t=0),this.offset=t}return t.prototype.shift=function(t){this.offset+=t},t.prototype.seek=function(t){this.offset=t},t.prototype.clone=function(){return new t(this.offset)},t.prototype.toBit=function(){return new Nu(this.offset<<3)},t}();x(),gt();var Xu=function(){function t(t,n){this.data=t,this.cursor=n}return t.prototype.nextUint8=function(){return Cu(this.data,this.cursor)},t.prototype.nextUint16=function(){return function(t,n,i){void 0===i&&(i=!1);var e=t.getUint16(n.offset,i);return n.shift(2),e}(this.data,this.cursor)},t.prototype.nextInt16=function(){return function(t,n,i){void 0===i&&(i=!1);var e=t.getInt16(n.offset,i);return n.shift(2),e}(this.data,this.cursor)},t.prototype.nextUint32=function(){return Mu(this.data,this.cursor)},t.prototype.nextInt32=function(){return function(t,n,i){void 0===i&&(i=!1);var e=t.getInt32(n.offset,i);return n.shift(4),e}(this.data,this.cursor)},t.prototype.nextInt64=function(){return function(t,n,i){void 0===i&&(i=!1);var e=Mu(t,n,i),r=Mu(t,n,i),o=i?r:e,u=i?e:r;return Tn.fromBits(u,o,!1)}(this.data,this.cursor)},t.prototype.nextUint64=function(){return Lu(this.data,this.cursor)},t.prototype.nextUint8Array=function(t){return xu(this.data,this.cursor,t)},t.prototype.nextUint32Array=function(t){return function(t,n,i){for(var e=[],r=0;r<i;r++)e.push(Mu(t,n));return e}(this.data,this.cursor,t)},t.prototype.nextChars=function(t){return Uu(this.data,this.cursor,t)},t.prototype.nextUTF8String=function(){return zu(this.data,this.cursor)},t.prototype.skip=function(t){this.cursor.shift(t)},t.prototype.clone=function(){return new t(this.data,this.cursor.clone())},t}();function ju(t,n){return t.type===n}var Yu=8;function Ku(t){var n=function(t,n){var i=[];for(;n.offset<t.byteLength;){var e=Gu(t,n);if(!e.complete)return{complete:!1,boxes:i};i.push(e.box)}return{complete:!0,boxes:i}}(t.data,t.cursor);if(!n.complete)throw new g("Data incomplete");return n.boxes}function Gu(t,n){var i=n.offset,e=function(t,n){var i=n.offset;if(!Bu(t,n,Yu)){return{complete:!1,neededOffset:o=n.offset+Yu}}var e=Mu(t,n),r=Uu(t,n,4);if(1===e){if(!Bu(t,n,8)){var o=n.offset+8;return n.seek(i),{complete:!1,neededOffset:o}}e=Lu(t,n).toNumber()}if("uuid"===r){if(!Bu(t,n,16)){o=n.offset+16;return n.seek(i),{complete:!1,neededOffset:o}}r=Uu(t,n,16)}var u=n.offset,s={type:r,size:e,headerSize:u-i};return{complete:!0,header:s}}(t,n);if(!e.complete)return e;var r=e.header,o=r.size;0===o&&(o=t.byteLength-i);var u=i+o;if(u>t.byteLength){var s=u;return n.seek(i),{complete:!1,neededOffset:s}}var f={type:r.type,offset:i,data:new Xu(Hu(t,i,u),new qu(r.headerSize))};return n.seek(u),{complete:!0,box:f}}function $u(t){return{version:t>>24,flags:new Du(16777215&t)}}function Zu(t,n){var i,e,r,o;return 1===n?(i=t.nextUint64(),e=t.nextUint64(),r=t.nextUint32(),o=t.nextUint64()):(i=t.nextUint32(),e=t.nextUint32(),r=t.nextUint32(),o=t.nextUint32()),{creation:i,modification:e,scale:r,duration:o}}function Ju(t){return t.skipBits(4),{isLeading:t.readUInt(2),sampleDependsOn:t.readUInt(2),sampleIsDependedOn:t.readUInt(2),sampleHasRedundancy:t.readUInt(2),samplePaddingValue:t.readUInt(3),sampleIsNonSyncSample:Boolean(t.readBit()),sampleDegradationPriority:t.readUInt(16)}}function Qu(t){var n=t.nextUint32Array(9);return{a:Iu(n[0],16),b:Iu(n[1],16),u:Iu(n[2],30),c:Iu(n[3],16),d:Iu(n[4],16),v:Iu(n[5],30),x:Iu(n[6],16),y:Iu(n[7],16),w:Iu(n[8],30)}}function ts(t){return new Ou(t.type,Wu(Vu(t.data.data),t.data.cursor.offset))}var ns=function(t){function n(n,i,e,r){void 0===e&&(e=0),void 0===r&&(r=0);var o=t.call(this,"hdlr",e,r)||this;return o.name=i,o.handlerType=n,o}return vu(n,t),p.defineProperty(n.prototype,"handlerType",{get:function(){return this.sA},set:function(t){this.sA=t},enumerable:!1,configurable:!0}),n.prototype.serializeReserved=function(t){t.writer.writeUInt(0,32),t.writer.writeUInt(0,32),t.writer.writeUInt(0,32)},n.prototype.getBoxContentSize=function(){var n,i;return t.prototype.getBoxContentSize.call(this)+4+4+12+(null!==(i=null===(n=this.name)||void 0===n?void 0:n.length)&&void 0!==i?i:0)+1},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(0,32),n.writer.writeString(this.handlerType),this.serializeReserved(n),this.name&&n.writer.writeString(this.name),n.writer.writeByte(0)},n}(Ru);function is(t){var n=t.data,i=$u(n.nextUint32()),e=i.version,r=i.flags;n.skip(4);var o=n.nextChars(4);n.skip(12);var u=n.nextUTF8String();return new ns(o,u,e,r.raw)}!function(t){function n(){return t.call(this,"mdir")||this}vu(n,t),n.prototype.serializeReserved=function(t){t.writer.writeString("appl"),t.writer.writeUInt(0,32),t.writer.writeUInt(0,32)}}(ns);x(),gt(),x(),gt(),x(),gt();var es=function(){function t(t,n){void 0===n&&(n=!1),this.fixed28BitMode=n,this.tag=t}return t.prototype.encodeSize=function(t){for(var n=[];t>0;)n.length>0&&(n[n.length-1]+=128),n.push(t%128),t>>=7;if(this.fixed28BitMode)for(;n.length<4;)n.push(128);return n.reverse()},p.defineProperty(t.prototype,"tag",{get:function(){return this.nA},set:function(t){if(!Tu(t,8))throw new g("Provided tag does not fit in 8 bits.");this.nA=t},enumerable:!1,configurable:!0}),t.prototype.getSize=function(){return this.getDescriptorSize()+1+this.encodeSize(this.getDescriptorSize()).length},t.prototype.serialize=function(t){t.writer.writeByte(this.tag);for(var n=0,i=this.encodeSize(this.getDescriptorSize());n<i.length;n++){var e=i[n];t.writer.writeByte(e)}this.serializeDescriptorContent(t)},t}();x(),gt();!function(t){function n(n,i,e,r,o,u,s){void 0===s&&(s={});var f=t.call(this,4,s.fixed28BitMode)||this;return f.upStream=e,f.decoderSpecificInfo=u,f.objectTypeIndication=n,f.streamType=i,f.bufferSizeDb=r,f.maxBitrate=o.max,f.avgBitrate=o.avg,f}vu(n,t),p.defineProperty(n.prototype,"objectTypeIndication",{get:function(){return this.rA},set:function(t){if(!Tu(t,8))throw new g("Provided objectTypeIndication does not fit in 8 bits.");this.rA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"streamType",{get:function(){return this.oA},set:function(t){if(!Tu(t,6))throw new g("Provided streamType does not fit in 6 bits.");this.oA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"bufferSizeDb",{get:function(){return this.hA},set:function(t){if(!Tu(t,24))throw new g("Provided bufferSizeDb does not fit in 24 bits.");this.hA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"maxBitrate",{get:function(){return this.aA},set:function(t){if(!Tu(t,32))throw new g("Provided maxBitrate does not fit in 32 bits.");this.aA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"avgBitrate",{get:function(){return this.uA},set:function(t){if(!Tu(t,32))throw new g("Provided avgBitrate does not fit in 32 bits.");this.uA=t},enumerable:!1,configurable:!0}),n.prototype.getDescriptorSize=function(){return 13+this.decoderSpecificInfo.reduce((function(t,n){return t+n.getSize()}),0)},n.prototype.serializeDescriptorContent=function(t){t.writer.writeByte(this.objectTypeIndication),t.writer.writeUInt(this.streamType,6),t.writer.writeBool(this.upStream),t.writer.writeBit(1),t.writer.writeUInt(this.bufferSizeDb,24),t.writer.writeUInt(this.maxBitrate,32),t.writer.writeUInt(this.avgBitrate,32);for(var n=0,i=this.decoderSpecificInfo;n<i.length;n++){i[n].serialize(t)}}}(es);x(),gt();!function(t){function n(n,i){void 0===i&&(i={});var e=t.call(this,5,i.fixed28BitMode)||this;return e.data=n,e}vu(n,t),n.prototype.getDescriptorSize=function(){return this.data.length},n.prototype.serializeDescriptorContent=function(t){t.concat(pu.from(this.data))}}(es);x(),gt(),x(),gt();var rs=function(t){function n(n){void 0===n&&(n=!1);var i=t.call(this,6,n)||this;return i.predefined=2,i}return vu(n,t),n.prototype.getDescriptorSize=function(){return 1},n.prototype.serializeDescriptorContent=function(t){t.writer.writeByte(this.predefined)},n}(es);!function(t){function n(n,i,e,r){void 0===r&&(r={});var o=t.call(this,3,r.fixed28BitMode)||this;return o.decoderConfigDescriptor=e,o.esId=n,o.streamPriority=i,o.dependsOnEsId=null==r?void 0:r.dependsOnEsId,o.urlString=null==r?void 0:r.url,o.ocrEsId=null==r?void 0:r.ocrEsId,o.slConfigDescriptor=new rs(r.fixed28BitMode),o}vu(n,t),p.defineProperty(n.prototype,"streamDependenceFlag",{get:function(){return void 0!==this.dependsOnEsId},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"urlFlag",{get:function(){return void 0!==this.urlString},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"ocrStreamFlag",{get:function(){return void 0!==this.ocrEsId},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"esId",{get:function(){return this.cA},set:function(t){if(!Tu(t,16))throw new g("Provided esId does not fit in 16 bits.");this.cA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"streamPriority",{get:function(){return this.lA},set:function(t){if(!Tu(t,5))throw new g("Provided streamPriority does not fit in 5 bits.");this.lA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"dependsOnEsId",{get:function(){return this.dA},set:function(t){if(t&&!Tu(t,16))throw new g("Provided dependsOnEsId does not fit in 16 bits.");this.dA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"ocrEsId",{get:function(){return this.fA},set:function(t){if(t&&!Tu(t,16))throw new g("Provided ocrEsId does not fit in 16 bits.");this.fA=t},enumerable:!1,configurable:!0}),n.prototype.getDescriptorSize=function(){return 3+(this.streamDependenceFlag?2:0)+(this.urlFlag?1+this.urlString.length:0)+(this.ocrStreamFlag?2:0)+this.decoderConfigDescriptor.getSize()+this.slConfigDescriptor.getSize()},n.prototype.serializeDescriptorContent=function(t){t.writer.writeUInt(this.esId,16),t.writer.writeBool(this.streamDependenceFlag),t.writer.writeBool(this.urlFlag),t.writer.writeBool(this.ocrStreamFlag),t.writer.writeUInt(this.streamPriority,5),this.streamDependenceFlag&&t.writer.writeUInt(this.dependsOnEsId,16),this.urlFlag&&(t.writer.writeByte(this.urlString.length),t.writer.writeString(this.urlString)),this.ocrStreamFlag&&t.writer.writeUInt(this.ocrEsId,16),this.decoderConfigDescriptor.serialize(t),this.slConfigDescriptor.serialize(t)}}(es);x(),gt(),x(),gt(),x(),gt(),x(),gt(),x(),gt();var os=function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n.boxes=[],n}return vu(n,t),n.prototype.getSize=function(){return t.prototype.getSize.call(this)+this.boxes.reduce((function(t,n){return t+n.getSize()}),0)},n.prototype.serialize=function(){for(var n=t.prototype.serialize.call(this),i=0,e=this.boxes;i<e.length;i++){var r=e[i];n=n.concat(r.serialize())}return n},n}(Su),us=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return vu(n,t),n.prototype.serializeBoxContent=function(t){},n.prototype.getBoxContentSize=function(){return 0},n}(os),ss=function(t){function n(n,i){var e=t.call(this,n)||this;return e.dataReferenceIndex=i,e}return vu(n,t),p.defineProperty(n.prototype,"dataReferenceIndex",{get:function(){return this._A},set:function(t){if(!Tu(t,16))throw new g("Provided dataReferenceIndex does not fit in 16 bits.");this._A=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return 8},n.prototype.serializeBoxContent=function(t){for(var n=0;n<6;n++)t.writer.writeByte(0);t.writer.writeUInt(this.dataReferenceIndex,16)},n}(us),fs=function(t){function n(n,i,e,r){var o,u,s=this;return(s=t.call(this,n,i)||this).extra=r,s.channelCount=null!==(o=e.channelCount)&&void 0!==o?o:2,s.sampleSize=null!==(u=e.sampleSize)&&void 0!==u?u:16,s.sampleRate=e.sampleRate,s}return vu(n,t),p.defineProperty(n.prototype,"channelCount",{get:function(){return this.vA},set:function(t){if(!Tu(t,16))throw new g("Provided channelCount does not fit in 16 bits.");this.vA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"sampleSize",{get:function(){return this.gA},set:function(t){if(!Tu(t,16))throw new g("Provided sampleSize does not fit in 16 bits.");this.gA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"sampleRate",{get:function(){return this.mA},set:function(t){if(!Tu(Eu(t,16),32))throw new g("Provided rate does not fit in 32 bits (fixed 16.16).");this.mA=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){var n,i;return t.prototype.getBoxContentSize.call(this)+8+2+2+2+2+(void 0!==this.sampleRate?4:0)+(null!==(i=null===(n=this.extra)||void 0===n?void 0:n.length)&&void 0!==i?i:0)},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(0,32),n.writer.writeUInt(0,32),n.writer.writeUInt(this.channelCount,16),n.writer.writeUInt(this.sampleSize,16),n.writer.writeUInt(0,16),n.writer.writeUInt(0,16),n.writer.writeUInt(Eu(this.sampleRate,16),32),this.extra&&ku(n.writer,this.extra)},n}(ss);x(),gt();!function(t){function n(n){var i=t.call(this,"stco",0,0)||this;return i.entries=n,i}vu(n,t),p.defineProperty(n.prototype,"entries",{get:function(){return this.pA},set:function(t){if(!Tu(t.length,32))throw new g("Number of allowed entries cannot fit in 32 bits.");if(t.some((function(t){return!Tu(t,32)})))throw new g("Not all entries can be represented in 32 bits.");this.pA=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4+4*this.entries.length},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.entries.length,32);for(var i=0,e=this.entries;i<e.length;i++){var r=e[i];n.writer.writeUInt(r,32)}}}(Ru);x(),gt();!function(t){function n(n){var i=t.call(this,"clap")||this;return i.cleanApertureWidthN=n.cleanApertureWidthN,i.cleanApertureWidthD=n.cleanApertureWidthD,i.cleanApertureHeightN=n.cleanApertureHeightN,i.cleanApertureHeightD=n.cleanApertureHeightD,i.horizOffN=n.horizOffN,i.horizOffD=n.horizOffD,i.vertOffN=n.vertOffN,i.vertOffD=n.vertOffD,i}vu(n,t),p.defineProperty(n.prototype,"cleanApertureWidthN",{get:function(){return this.wA},set:function(t){if(!Tu(t,32))throw new g("Provided cleanApertureWidthN does not fit in 32 bits.");this.wA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"cleanApertureWidthD",{get:function(){return this.yA},set:function(t){if(!Tu(t,32))throw new g("Provided cleanApertureWidthD does not fit in 32 bits.");this.yA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"cleanApertureHeightN",{get:function(){return this.bA},set:function(t){if(!Tu(t,32))throw new g("Provided cleanApertureHeightN does not fit in 32 bits.");this.bA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"cleanApertureHeightD",{get:function(){return this.AA},set:function(t){if(!Tu(t,32))throw new g("Provided cleanApertureHeightD does not fit in 32 bits.");this.AA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"horizOffN",{get:function(){return this.SA},set:function(t){if(!Tu(t,32))throw new g("Provided horizOffN does not fit in 32 bits.");this.SA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"horizOffD",{get:function(){return this.TA},set:function(t){if(!Tu(t,32))throw new g("Provided horizOffD does not fit in 32 bits.");this.TA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"vertOffN",{get:function(){return this.kA},set:function(t){if(!Tu(t,32))throw new g("Provided vertOffN does not fit in 32 bits.");this.kA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"vertOffD",{get:function(){return this.EA},set:function(t){if(!Tu(t,32))throw new g("Provided vertOffD does not fit in 32 bits.");this.EA=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return 32},n.prototype.serializeBoxContent=function(t){t.writer.writeUInt(this.cleanApertureWidthN,32),t.writer.writeUInt(this.cleanApertureWidthD,32),t.writer.writeUInt(this.cleanApertureHeightN,32),t.writer.writeUInt(this.cleanApertureHeightD,32),t.writer.writeUInt(this.horizOffN,32),t.writer.writeUInt(this.horizOffD,32),t.writer.writeUInt(this.vertOffN,32),t.writer.writeUInt(this.vertOffD,32)}}(Su);x(),gt();!function(t){function n(n,i){var e=t.call(this,"ctts",n,0)||this;return e.entries=i,e}vu(n,t),p.defineProperty(n.prototype,"entries",{get:function(){return this.pA},set:function(t){if(!Tu(t.length,32))throw new g("Number of allowed entries cannot fit in 32 bits.");if(t.some((function(t){return!Tu(t.sampleCount,32)||!Tu(t.sampleOffset,32)})))throw new g("Not all entries can be represented in 64 bits.");this.pA=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4+8*this.entries.length},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.entries.length,32);for(var i=0,e=this.entries;i<e.length;i++){var r=e[i];n.writer.writeUInt(r.sampleCount,32),0===this.version?n.writer.writeUInt(r.sampleOffset,32):1===this.version&&n.writer.writeInt(r.sampleOffset,32)}}}(Ru);x(),gt();!function(t){function n(n){var i=t.call(this,"url ",0,void 0===n?1:0)||this;return i.location=n,i}vu(n,t),p.defineProperty(n.prototype,"location",{get:function(){return this.xA},set:function(t){this.flags=void 0===t?1:0,this.xA=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){var n=t.prototype.getBoxContentSize.call(this);return this.location?n+this.location.length+1:n},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),this.location&&(n.writer.writeString(this.location),n.writer.writeByte(0))}}(Ru);x(),gt();!function(t){function n(n,i,e){var r=t.call(this,"urn ",0,e)||this;return r.name=n,r.location=i,r}vu(n,t),p.defineProperty(n.prototype,"location",{get:function(){return this.xA},set:function(t){if(1&this.flags)throw new g("The moov containment flag is set, a DataEntryUrlBox should be used instead.");this.xA=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){var n=t.prototype.getBoxContentSize.call(this)+this.name.length+1;return this.location?n+this.location.length+1:n},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeString(this.name),n.writer.writeByte(0),this.location&&(n.writer.writeString(this.location),n.writer.writeByte(0))}}(Ru);x(),gt();!function(t){function n(){return t.call(this,"dinf")||this}vu(n,t)}(us);x(),gt(),x(),gt();var cs=function(t){function n(n,i,e){var r=t.call(this,n)||this;if(r.version=i,!Tu(i,8))throw new g("the provided version cannot fit in 8 bits.");return r.flags=e,r}return vu(n,t),p.defineProperty(n.prototype,"flags",{get:function(){return this.v_},set:function(t){this.v_=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return 4},n.prototype.serializeFlags=function(t){if("number"!=typeof this.flags)throw new g("Missing custom serializeFlags method.");t.writer.writeUInt(this.flags,24)},n.prototype.serializeBoxContent=function(t){t.writer.writeByte(this.version),this.serializeFlags(t)},n}(os);!function(t){function n(){return t.call(this,"dref",0,0)||this}vu(n,t),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.boxes.length,32)}}(cs);x(),gt(),x(),gt();var hs=function(t){function n(n,i,e){void 0===e&&(e=0);var r=t.call(this,"elst",i,e)||this;return r.entries=n,r}return vu(n,t),p.defineProperty(n.prototype,"bitSize",{get:function(){return 0===this.version?32:64},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"entries",{get:function(){return this.pA},set:function(t){for(var n=0,i=t;n<i.length;n++){var e=i[n];if(!Tu(e.segmentDuration,this.bitSize))throw new g("SegmentDuration of one of the entries does not fit in ".concat(this.bitSize," bits."));if(!Tu(e.mediaTime,this.bitSize))throw new g("MediaTime of one of the entries does not fit in ".concat(this.bitSize," bits."));if(!Tu(e.mediaRateInteger,16))throw new g("Provided mediaRateInteger does not fit in 16 bits.");if(e.mediaRateFraction&&!Tu(e.mediaRateFraction,16))throw new g("Provided mediaRateFraction does not fit in 16 bits.")}this.pA=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4+this.entries.length*(2*this.bitSize/8+2+2)},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.entries.length,32),this.serializeElstBoxContent(n)},n}(Ru),as=function(t){function n(n,i){return void 0===i&&(i=0),t.call(this,n,0,i)||this}return vu(n,t),n.prototype.serializeElstBoxContent=function(t){for(var n,i=0,e=this.entries;i<e.length;i++){var r=e[i];t.writer.writeUInt(r.segmentDuration,32),t.writer.writeInt(r.mediaTime,32),t.writer.writeUInt(r.mediaRateInteger,16),t.writer.writeUInt(null!==(n=r.mediaRateFraction)&&void 0!==n?n:0,16)}},n}(hs),vs=function(t){function n(n,i){return void 0===i&&(i=0),t.call(this,n,1,i)||this}return vu(n,t),n.prototype.serializeElstBoxContent=function(t){for(var n,i=0,e=this.entries;i<e.length;i++){var r=e[i];t.writer.writeUInt(r.segmentDuration.getHighBitsUnsigned(),32),t.writer.writeUInt(r.segmentDuration.getLowBitsUnsigned(),32),t.writer.writeInt(r.mediaTime.getHighBits(),32),t.writer.writeInt(r.mediaTime.getLowBits(),32),t.writer.writeUInt(r.mediaRateInteger,16),t.writer.writeUInt(null!==(n=r.mediaRateFraction)&&void 0!==n?n:0,16)}},n}(hs);function ds(t){for(var n=t.data,i=$u(n.nextUint32()),e=i.version,r=i.flags,o=n.nextUint32(),u=[],s=0;s<o;s++){var f=void 0,c=void 0;0===e?(f=n.nextUint32(),c=n.nextInt32()):(f=n.nextUint64(),c=n.nextInt64());var h=n.nextInt16(),a=n.nextInt16();u.push({segmentDuration:f,mediaTime:c,mediaRateFraction:a,mediaRateInteger:h})}return 0===e?new as(u,r.raw):new vs(u,r.raw)}var ls=function(t){function n(){return t.call(this,"edts")||this}return vu(n,t),n}(us);function ws(t){for(var n=new ls,i=0,e=Ku(t.data);i<e.length;i++){var r=e[i];ju(r,"elst")?n.boxes.push(ds(r)):n.boxes.push(ts(r))}return n}x(),gt(),x(),gt();var bs=function(t){function n(n,i,e,r){var o=t.call(this,n)||this;return o.majorBrand=i,o.minorVersion=e,o.compatibleBrands=r,o}return vu(n,t),p.defineProperty(n.prototype,"majorBrand",{get:function(){return this.RA},set:function(t){if(4!==t.length)throw new g("the provided major brand does not conform to the 4 character requirement");this.RA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"minorVersion",{get:function(){return this.IA},set:function(t){if(!Tu(t,32))throw new g("the provided minor version does not fit in 32 bits.");this.IA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"compatibleBrands",{get:function(){return this.CA},set:function(t){if(t.some((function(t){return 4!==t.length})))throw new g("Some of the compatible brands do not conform to the 4 character requirement");this.CA=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return 4*(2+this.compatibleBrands.length)},n.prototype.serializeBoxContent=function(t){t.writer.writeString(this.majorBrand),t.writer.writeUInt(this.minorVersion,32);for(var n=0,i=this.compatibleBrands;n<i.length;n++){var e=i[n];t.writer.writeString(e)}},n}(Su);!function(t){function n(n,i,e){return t.call(this,"ftyp",n,i,e)||this}vu(n,t)}(bs);x(),gt();!function(t){function n(n,i){void 0===i&&(i="free");var e=t.call(this,i)||this;return e.data=n,e}vu(n,t),n.prototype.getBoxContentSize=function(){var t,n;return null!==(n=null===(t=this.data)||void 0===t?void 0:t.length)&&void 0!==n?n:0},n.prototype.serializeBoxContent=function(t){this.data&&t.concat(pu.from(this.data))}}(Su);x(),gt(),x(),gt();var gs=function(t){function n(n,i,e,r){void 0===r&&(r=0);var o=t.call(this,"mdhd",e,r)||this;return o.creationTime=n.creation,o.modificationTime=n.modification,o.timescale=n.scale,o.duration=n.duration,o.language=i,o}return vu(n,t),p.defineProperty(n.prototype,"creationTime",{get:function(){return this.PA},set:function(t){if(!Tu(t,this.bitSize))throw new g("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.PA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"modificationTime",{get:function(){return this.DA},set:function(t){if(!Tu(t,this.bitSize))throw new g("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.DA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"timescale",{get:function(){return this.NA},set:function(t){if(!Tu(t,32))throw new g("Provided sequence number does not fit in 32 bits.");this.NA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"duration",{get:function(){return this.MA},set:function(t){if(!Tu(t,this.bitSize))throw new g("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.MA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"language",{get:function(){return this.LA},set:function(t){if(!_s(t))throw new g("Expected an ISO-639-2/T language code");this.LA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"bitSize",{get:function(){return 0===this.version?32:64},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.bitSize/8*3+4+2+2},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),this.serializeMdiaContent(n),n.writer.writeBit(0);for(var i=0,e=this.language;i<e.length;i++){var r=e[i];n.writer.writeUInt(r.charCodeAt(0)-96,5)}n.writer.writeUInt(0,16)},n}(Ru),ms=function(t){function n(n,i,e){return void 0===e&&(e=0),t.call(this,n,i,0,e)||this}return vu(n,t),n.prototype.serializeMdiaContent=function(t){t.writer.writeUInt(this.creationTime,32),t.writer.writeUInt(this.modificationTime,32),t.writer.writeUInt(this.timescale,32),t.writer.writeUInt(this.duration,32)},n}(gs),ps=function(t){function n(n,i,e){return void 0===e&&(e=0),t.call(this,n,i,1,e)||this}return vu(n,t),n.prototype.serializeMdiaContent=function(t){t.writer.writeUInt(this.creationTime.getHighBitsUnsigned(),32),t.writer.writeUInt(this.creationTime.getLowBitsUnsigned(),32),t.writer.writeUInt(this.modificationTime.getHighBitsUnsigned(),32),t.writer.writeUInt(this.modificationTime.getLowBitsUnsigned(),32),t.writer.writeUInt(this.timescale,32),t.writer.writeUInt(this.duration.getHighBitsUnsigned(),32),t.writer.writeUInt(this.duration.getLowBitsUnsigned(),32)},n}(gs);function ys(t){var n=t.data,i=$u(n.nextUint32()),e=i.version,r=i.flags,o=Zu(n,e),u=new gu(pu.from(n.nextUint8Array(2)));u.skipBits(1);for(var s=[],f=0;f<3;f++)s.push(u.readUInt(5));var c=s.map((function(t){return String.fromCharCode(t+96)})).join("");return _s(c)||(c="und"),n.skip(2),0===e?new ms(o,c,r.raw):new ps(o,c,r.raw)}function _s(t){return/^[a-z]{3}$/.test(t)}var Ss=function(t){function n(){return t.call(this,"mdia")||this}return vu(n,t),n}(us);function Ts(t){for(var n=new Ss,i=0,e=Ku(t.data);i<e.length;i++){var r=e[i];ju(r,"mdhd")?n.boxes.push(ys(r)):ju(r,"hdlr")?n.boxes.push(is(r)):n.boxes.push(ts(r))}return n}x(),gt();!function(t){function n(){var n=t.call(this,"mdat")||this;return n.data=new pu,n}vu(n,t),n.prototype.getBoxContentSize=function(){return this.data.length},n.prototype.serializeBoxContent=function(t){t.concat(this.data)}}(Su);x(),gt();!function(t){function n(){return t.call(this,"minf")||this}vu(n,t)}(us);x(),gt();var Es;!function(t){function n(n){var i=t.call(this,"meta",0,0)||this;return i.handler=n,i}vu(n,t),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.handler.getSize()},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.concat(this.handler.serialize())}}(cs);x(),gt(),x(),gt(),function(t){t.VIDEO="vide",t.AUXILIARY_VIDEO="auxv",t.AUDIO="soun",t.METADATA="meta",t.HINT="hint",t.TEXT="text",t.SUBTITLE="subt",t.FONT="fdsm"}(Es||(Es={})),x(),gt();var ks,Is,Rs={a:1,b:0,u:0,c:0,d:1,v:0,x:0,y:0,w:1};function Os(t,n){n.writer.writeUInt(Eu(t.a,16),32),n.writer.writeUInt(Eu(t.b,16),32),n.writer.writeUInt(Eu(0,30),32),n.writer.writeUInt(Eu(t.c,16),32),n.writer.writeUInt(Eu(t.d,16),32),n.writer.writeUInt(Eu(0,30),32),n.writer.writeUInt(Eu(t.x,16),32),n.writer.writeUInt(Eu(t.y,16),32),n.writer.writeUInt(Eu(1,30),32)}function Ns(t,n){var i,e,r,o;n.writer.writeUInt(null!==(i=t.isLeading)&&void 0!==i?i:ks.UNKNOWN,2),n.writer.writeUInt(null!==(e=t.sampleDependsOn)&&void 0!==e?e:Is.UNKNOWN,2),n.writer.writeUInt(null!==(r=t.sampleIsDependedOn)&&void 0!==r?r:Is.UNKNOWN,2),n.writer.writeUInt(null!==(o=t.sampleHasRedundancy)&&void 0!==o?o:Is.UNKNOWN,2)}function Ps(t,n){var i,e,r;n.writer.writeUInt(0,4),Ns(t,n),n.writer.writeUInt(null!==(i=t.samplePaddingValue)&&void 0!==i?i:0,3),n.writer.writeBool(null!==(e=t.sampleIsNonSyncSample)&&void 0!==e&&e),n.writer.writeUInt(null!==(r=t.sampleDegradationPriority)&&void 0!==r?r:0,16)}x(),gt(),function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.WITH_DEPENDENCY=1]="WITH_DEPENDENCY",t[t.NO=2]="NO",t[t.WITHOUT_DEPENDENCY=3]="WITHOUT_DEPENDENCY"}(ks||(ks={})),function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.YES=1]="YES",t[t.NO=2]="NO",t[t.RESERVED=3]="RESERVED"}(Is||(Is={})),x(),gt(),x(),gt();var As=function(){};x(),gt(),x(),gt(),x(),gt();var Ds=function(t){function n(n,i,e){var r=t.call(this,"pssh",n,0)||this;return r.systemId=i,r.data=e,r}return vu(n,t),p.defineProperty(n.prototype,"systemId",{get:function(){return this.BA},set:function(t){if(16!==t.length)throw new g("Provided systemId length is not 16.");this.BA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"data",{get:function(){return this.kp},set:function(t){if(!Tu(t.length,32))throw new g("Provided data length does not fit in 32 bits.");this.kp=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+16+4+this.data.length},n.prototype.serializeVersionBoxContent=function(t){},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.concat(pu.from(this.systemId)),this.serializeVersionBoxContent(n),n.writer.writeUInt(this.data.length,32),n.concat(pu.from(this.data))},n}(Ru),Cs=function(t){function n(n,i){return t.call(this,0,n,i)||this}return vu(n,t),n}(Ds),xs=function(t){function n(n,i,e){var r=t.call(this,1,n,i)||this;return r.kIds=e,r}return vu(n,t),p.defineProperty(n.prototype,"kIds",{get:function(){return this.OA},set:function(t){if(!Tu(t.length,32))throw new g("Provided kIds length cannot fit in 32 bits.");if(t.some((function(t){return 16!==t.length})))throw new g("Not all provided key ids are 16 bytes long.");this.OA=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4+16*this.kIds.length},n.prototype.serializeVersionBoxContent=function(t){t.writer.writeUInt(this.kIds.length,32);for(var n=0,i=this.kIds;n<i.length;n++){var e=i[n];t.concat(pu.from(e))}},n}(Ds);function Bs(t){var n=t.data.nextUint8();t.data.skip(3);var i=t.data.nextUint8Array(16),e=[];if(1===n)for(var r=t.data.nextUint32(),o=0;o<r;o++)e.push(t.data.nextUint8Array(16));var u=t.data.nextUint32(),s=t.data.nextUint8Array(u);return 1===n?new xs(i,s,e):new Cs(i,s)}x(),gt(),x(),gt();var Ms=function(t){function n(n,i,e){void 0===e&&(e=0);var r=t.call(this,"mehd",i,e)||this;return r.fragmentDuration=n,r}return vu(n,t),p.defineProperty(n.prototype,"bitSize",{get:function(){return 0===this.version?32:64},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"fragmentDuration",{get:function(){return this.FA},set:function(t){if(!Tu(t,this.bitSize))throw new g("The provided fragmentDuration does not fit in ".concat(this.bitSize," bits."));this.FA=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.bitSize/8},n}(Ru),Ls=function(t){function n(n,i){return void 0===i&&(i=0),t.call(this,n,0,i)||this}return vu(n,t),n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.fragmentDuration,32)},n}(Ms),Us=function(t){function n(n,i){return void 0===i&&(i=0),t.call(this,n,1,i)||this}return vu(n,t),n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.fragmentDuration.getHighBitsUnsigned(),32),n.writer.writeUInt(this.fragmentDuration.getLowBitsUnsigned(),32)},n}(Ms);function Fs(t){var n=t.data,i=$u(n.nextUint32()),e=i.version,r=i.flags;return 0===e?new Ls(n.nextUint32(),r.raw):new Us(n.nextUint64(),r.raw)}x(),gt();var zs=function(t){function n(n,i,e,r){void 0===i&&(i={}),void 0===e&&(e=0),void 0===r&&(r=0);var o,u,s,f=this;return(f=t.call(this,"trex",e,r)||this).trackId=n,f.defaultSampleDescriptionIndex=null!==(o=null==i?void 0:i.sampleDescriptionIndex)&&void 0!==o?o:0,f.defaultSampleDuration=null!==(u=i.sampleDuration)&&void 0!==u?u:0,f.defaultSampleSize=null!==(s=i.sampleSize)&&void 0!==s?s:0,f.defaultSampleFlags=i.sampleFlags,f}return vu(n,t),p.defineProperty(n.prototype,"trackId",{get:function(){return this.VA},set:function(t){if(!Tu(t,32))throw new g("Provided track id does not fit in 32 bits.");this.VA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"defaultSampleDescriptionIndex",{get:function(){return this.WA},set:function(t){if(!Tu(t,32))throw new g("Provided default sample description index does not fit in 32 bits.");this.WA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"defaultSampleDuration",{get:function(){return this.UA},set:function(t){if(!Tu(t,32))throw new g("Provided default sample duration does not fit in 32 bits.");this.UA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"defaultSampleSize",{get:function(){return this.GA},set:function(t){if(!Tu(t,32))throw new g("Provided default sample size does not fit in 32 bits.");this.GA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"defaultSampleFlags",{get:function(){return this.HA},set:function(t){if((null==t?void 0:t.samplePaddingValue)&&!Tu(t.samplePaddingValue,3))throw new g("Provided sample padding value does not fit in 3 bits.");if((null==t?void 0:t.sampleDegradationPriority)&&!Tu(t.sampleDegradationPriority,16))throw new g("Provided sample degradation priority does not fit in 16 bits.");this.HA=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+20},n.prototype.serializeBoxContent=function(n){var i;t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.trackId,32),n.writer.writeUInt(this.defaultSampleDescriptionIndex,32),n.writer.writeUInt(this.defaultSampleDuration,32),n.writer.writeUInt(this.defaultSampleSize,32),Ps(null!==(i=this.defaultSampleFlags)&&void 0!==i?i:{},n)},n}(Ru);function Ws(t){var n=t.data,i=$u(n.nextUint32()),e=i.version,r=i.flags,o=n.nextUint32(),u=n.nextUint32(),s=n.nextUint32(),f=n.nextUint32(),c=Ju(new gu(pu.from(n.nextUint8Array(4))));return new zs(o,{sampleDescriptionIndex:u,sampleDuration:s,sampleSize:f,sampleFlags:c},e,r.raw)}var Hs=function(t){function n(){return t.call(this,"mvex")||this}return vu(n,t),n}(us);function Vs(t){for(var n=new Hs,i=0,e=Ku(t.data);i<e.length;i++){var r=e[i];ju(r,"mehd")?n.boxes.push(Fs(r)):ju(r,"trex")?n.boxes.push(Ws(r)):n.boxes.push(ts(r))}return n}x(),gt();var qs=function(t){function n(i,e,r,o,u){void 0===u&&(u=0);var s,f,c,h=this;return(h=t.call(this,"mvhd",o,u)||this).creationTime=i.creation,h.modificationTime=i.modification,h.timescale=i.scale,h.duration=i.duration,h.rate=null!==(s=r.rate)&&void 0!==s?s:n.DEFAULT_RATE,h.volume=null!==(f=r.volume)&&void 0!==f?f:n.DEFAULT_VOLUME,h.matrix=null!==(c=r.matrix)&&void 0!==c?c:Rs,h.ZA=e,h}return vu(n,t),p.defineProperty(n.prototype,"bitSize",{get:function(){return 0===this.version?32:64},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"creationTime",{get:function(){return this.PA},set:function(t){if(!Tu(t,this.bitSize))throw new g("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.PA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"modificationTime",{get:function(){return this.DA},set:function(t){if(!Tu(t,this.bitSize))throw new g("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.DA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"timescale",{get:function(){return this.NA},set:function(t){if(!Tu(t,32))throw new g("Provided sequence number does not fit in 32 bits.");this.NA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"duration",{get:function(){return this.MA},set:function(t){if(!Tu(t,this.bitSize))throw new g("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.MA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"rate",{get:function(){return this.XA},set:function(t){if(!Tu(Eu(t,16),32))throw new g("Provided rate does not fit in 32 bits (fixed 16.16).");this.XA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"volume",{get:function(){return this.zA},set:function(t){if(!Tu(Eu(t,8),16))throw new g("Provided volume does not fit in 16 bits (fixed 8.8).");this.zA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"matrix",{get:function(){return this.qA},set:function(t){if(0!==t.u||0!==t.v||1!==t.w)throw new g("(u, v, w) does not match the required (0, 0, 1)");this.qA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"nextTrackId",{get:function(){return this.ZA},set:function(t){if(0===t)throw new g("NextTrackId cannot be 0.");if(!Tu(t,32))throw new g("NextTrackId cannot exceed 32 bits.");this.ZA=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.bitSize/8*3+4+4+2+2+8+36+24+4},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),this.serializeMvhdContent(n),n.writer.writeUInt(Eu(this.rate,16),32),n.writer.writeUInt(Eu(this.volume,8),16),n.writer.writeUInt(0,16),n.writer.writeUInt(0,32),n.writer.writeUInt(0,32),Os(this.matrix,n);for(var i=0;i<6;i++)n.writer.writeUInt(0,32);n.writer.writeUInt(this.nextTrackId,32)},n.DEFAULT_RATE=1,n.DEFAULT_VOLUME=1,n}(Ru),Xs=function(t){function n(n,i,e,r){return void 0===e&&(e={}),void 0===r&&(r=0),t.call(this,n,i,e,0,r)||this}return vu(n,t),n.prototype.serializeMvhdContent=function(t){t.writer.writeUInt(this.creationTime,32),t.writer.writeUInt(this.modificationTime,32),t.writer.writeUInt(this.timescale,32),t.writer.writeUInt(this.duration,32)},n}(qs),js=function(t){function n(n,i,e,r){return void 0===e&&(e={}),void 0===r&&(r=0),t.call(this,n,i,e,1,r)||this}return vu(n,t),n.prototype.serializeMvhdContent=function(t){t.writer.writeUInt(this.creationTime.getHighBitsUnsigned(),32),t.writer.writeUInt(this.creationTime.getLowBitsUnsigned(),32),t.writer.writeUInt(this.modificationTime.getHighBitsUnsigned(),32),t.writer.writeUInt(this.modificationTime.getLowBitsUnsigned(),32),t.writer.writeUInt(this.timescale,32),t.writer.writeUInt(this.duration.getHighBitsUnsigned(),32),t.writer.writeUInt(this.duration.getLowBitsUnsigned(),32)},n}(qs);function Ys(t){var n=t.data,i=$u(n.nextUint32()),e=i.version,r=i.flags,o=Zu(n,e),u=Iu(n.nextUint32(),16),s=Iu(n.nextUint16(),8);n.skip(2),n.skip(8);var f=Qu(n);n.skip(24);var c=n.nextUint32();return 0===e?new Xs(o,c,{rate:u,volume:s,matrix:f},r.raw):new js(o,c,{rate:u,volume:s,matrix:f},r.raw)}x(),gt(),x(),gt();var Ks=function(t){function n(n,i,e,r,o,u,s){void 0===s&&(s={});var f,c,h,a=this;return a=t.call(this,"tkhd",n,function(t){var n,i,e,r;return{trackEnabled:null===(n=null==t?void 0:t.trackEnabled)||void 0===n||n,trackInMovie:null===(i=null==t?void 0:t.trackInMovie)||void 0===i||i,trackInPreview:null===(e=null==t?void 0:t.trackInPreview)||void 0===e||e,trackSizeIsAspectRatio:null!==(r=null==t?void 0:t.trackSizeIsAspectRatio)&&void 0!==r&&r}}(s))||this,a.creationTime=i.creation,a.modificationTime=i.modification,a.trackId=e,a.duration=i.duration,a.volume=r,a.width=o,a.height=u,a.layer=null!==(f=s.layer)&&void 0!==f?f:0,a.alternateGroup=null!==(c=s.alternateGroup)&&void 0!==c?c:0,a.matrix=null!==(h=s.matrix)&&void 0!==h?h:Rs,a}return vu(n,t),p.defineProperty(n.prototype,"bitSize",{get:function(){return 0===this.version?32:64},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"creationTime",{get:function(){return this.PA},set:function(t){if(!Tu(t,this.bitSize))throw new g("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.PA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"modificationTime",{get:function(){return this.DA},set:function(t){if(!Tu(t,this.bitSize))throw new g("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.DA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"trackId",{get:function(){return this.VA},set:function(t){if(0===t)throw new g("trackId cannot be 0.");if(!Tu(t,32))throw new g("trackId cannot exceed 32 bits.");this.VA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"duration",{get:function(){return this.MA},set:function(t){if(!Tu(t,this.bitSize))throw new g("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.MA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"volume",{get:function(){return this.zA},set:function(t){if(!Tu(Eu(t,8),16))throw new g("Provided volume does not fit in 16 bits (fixed 8.8).");this.zA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"width",{get:function(){return this.YA},set:function(t){if(!Tu(Eu(t,16),32))throw new g("Provided width does not fit in 32 bits (fixed 16.16).");this.YA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"height",{get:function(){return this.KA},set:function(t){if(!Tu(Eu(t,16),32))throw new g("Provided height does not fit in 32 bits (fixed 16.16).");this.KA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"layer",{get:function(){return this.jA},set:function(t){if(!Tu(t,16))throw new g("Provided layer does not fit in 16 bits.");this.jA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"alternateGroup",{get:function(){return this.QA},set:function(t){if(!Tu(t,16))throw new g("Provided alternateGroup does not fit in 16 bits.");this.QA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"matrix",{get:function(){return this.qA},set:function(t){if(0!==t.u||0!==t.v||1!==t.w)throw new g("(u, v, w) does not match the required (0, 0, 1)");this.qA=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.bitSize/8*3+4+4+8+2+2+2+2+36+4+4},n.prototype.serializeFlags=function(t){t.writer.writeUInt(0,20),t.writer.writeBool(this.flags.trackSizeIsAspectRatio),t.writer.writeBool(this.flags.trackInPreview),t.writer.writeBool(this.flags.trackInMovie),t.writer.writeBool(this.flags.trackEnabled)},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),this.serializeTkhdContent(n),n.writer.writeUInt(0,32),n.writer.writeUInt(0,32),n.writer.writeUInt(this.layer,16),n.writer.writeUInt(this.alternateGroup,16),n.writer.writeUInt(Eu(this.volume,8),16),n.writer.writeUInt(0,16),Os(this.matrix,n),n.writer.writeUInt(Eu(this.width,16),32),n.writer.writeUInt(Eu(this.height,16),32)},n}(Ru),Gs=function(t){function n(n,i,e,r,o,u){return t.call(this,0,n,i,e,r,o,u)||this}return vu(n,t),n.prototype.serializeTkhdContent=function(t){t.writer.writeUInt(this.creationTime,32),t.writer.writeUInt(this.modificationTime,32),t.writer.writeUInt(this.trackId,32),t.writer.writeUInt(0,32),t.writer.writeUInt(this.duration,32)},n}(Ks),$s=function(t){function n(n,i,e,r,o,u){return t.call(this,1,n,i,e,r,o,u)||this}return vu(n,t),n.prototype.serializeTkhdContent=function(t){t.writer.writeUInt(this.creationTime.getHighBitsUnsigned(),32),t.writer.writeUInt(this.creationTime.getLowBitsUnsigned(),32),t.writer.writeUInt(this.modificationTime.getHighBitsUnsigned(),32),t.writer.writeUInt(this.modificationTime.getLowBitsUnsigned(),32),t.writer.writeUInt(this.trackId,32),t.writer.writeUInt(0,32),t.writer.writeUInt(this.duration.getHighBitsUnsigned(),32),t.writer.writeUInt(this.duration.getLowBitsUnsigned(),32)},n}(Ks);function Zs(t){var n,i,e,r,o=t.data,u=$u(o.nextUint32()),s=u.version,f=u.flags,c=f.isSet(8),h=f.isSet(4),a=f.isSet(2),v=f.isSet(1);0===s?(n=o.nextUint32(),i=o.nextUint32(),e=o.nextUint32(),o.skip(4),r=o.nextUint32()):(n=o.nextUint64(),i=o.nextUint64(),e=o.nextUint32(),o.skip(4),r=o.nextUint64()),o.skip(8);var d=o.nextInt16(),l=o.nextInt16(),w=Iu(o.nextInt16(),8);o.skip(2);var b=Qu(o),g=Iu(o.nextUint32(),16),m=Iu(o.nextUint32(),16);return 0===s?new Gs({creation:n,modification:i,duration:r},e,w,g,m,{layer:d,matrix:b,alternateGroup:l,trackSizeIsAspectRatio:c,trackEnabled:v,trackInPreview:h,trackInMovie:a}):new $s({creation:n,modification:i,duration:r},e,w,g,m,{layer:d,matrix:b,alternateGroup:l,trackSizeIsAspectRatio:c,trackEnabled:v,trackInPreview:h,trackInMovie:a})}var Js=function(t){function n(){return t.call(this,"trak")||this}return vu(n,t),n}(us);function Qs(t){for(var n=new Js,i=0,e=Ku(t.data);i<e.length;i++){var r=e[i];ju(r,"tkhd")?n.boxes.push(Zs(r)):ju(r,"mdia")?n.boxes.push(Ts(r)):ju(r,"edts")?n.boxes.push(ws(r)):n.boxes.push(ts(r))}return n}var tf=function(t){function n(){return t.call(this,"moov")||this}return vu(n,t),n}(us);x(),gt(),x(),gt(),x(),gt();var nf=function(t){function n(n,i,e){void 0===e&&(e=0);var r=t.call(this,"tfdt",i,e)||this;return r.baseMediaDecodeTime=n,r}return vu(n,t),p.defineProperty(n.prototype,"bitSize",{get:function(){return 0===this.version?32:64},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"baseMediaDecodeTime",{get:function(){return this.JA},set:function(t){if(!Tu(t,this.bitSize))throw new g("Provided baseMediaDecodeTime does not fit in ".concat(this.bitSize," bits."));this.JA=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.bitSize/8},n}(Ru),ef=function(t){function n(n,i){return void 0===i&&(i=0),t.call(this,n,0,i)||this}return vu(n,t),n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.baseMediaDecodeTime,32)},n}(nf),rf=function(t){function n(n,i){return void 0===i&&(i=0),t.call(this,n,1,i)||this}return vu(n,t),n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.baseMediaDecodeTime.getHighBitsUnsigned(),32),n.writer.writeUInt(this.baseMediaDecodeTime.getLowBitsUnsigned(),32)},n}(nf);function of(t){var n=t.data,i=$u(n.nextUint32()),e=i.version,r=i.flags;return 0===e?new ef(n.nextUint32(),r.raw):new rf(n.nextUint64(),r.raw)}x(),gt();var uf=function(t){function n(n,i){void 0===i&&(i=0);var e=t.call(this,"tfhd",i,function(t){return{baseDataOffsetPresent:void 0!==t.baseDataOffset,sampleDescriptionIndexPresent:void 0!==t.sampleDescriptionIndex,defaultSampleDurationPresent:void 0!==t.defaultSampleDuration,defaultSampleSizePresent:void 0!==t.defaultSampleSize,defaultSampleFlagsPresent:void 0!==t.defaultSampleFlags,durationIsEmpty:t.durationIsEmpty,defaultBaseIsMoof:t.defaultBaseIsMoof}}(n))||this;return e.trackId=n.trackId,e.baseDataOffset=n.baseDataOffset,e.sampleDescriptionIndex=n.sampleDescriptionIndex,e.defaultSampleDuration=n.defaultSampleDuration,e.defaultSampleSize=n.defaultSampleSize,e.defaultSampleFlags=n.defaultSampleFlags,e}return vu(n,t),p.defineProperty(n.prototype,"trackId",{get:function(){return this.VA},set:function(t){if(!Tu(t,32))throw new g("Provided track id does not fit in 32 bits.");this.VA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"baseDataOffset",{get:function(){return this.$A},set:function(t){if(void 0===t&&this.flags.baseDataOffsetPresent)throw new g("The base data offset present flag is set.");if(void 0!==t&&!this.flags.baseDataOffsetPresent)throw new g("The base data offset present flag is not set.");if(t&&!Tu(t,64))throw new g("Provided baseDataOffset does not fit in 32 bits.");this.$A=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"sampleDescriptionIndex",{get:function(){return this.tS},set:function(t){if(void 0===t&&this.flags.sampleDescriptionIndexPresent)throw new g("The sample description index flag is set.");if(void 0!==t&&!this.flags.sampleDescriptionIndexPresent)throw new g("The sample description index flag is not set.");if(t&&!Tu(t,32))throw new g("Provided sampleDescriptionIndex does not fit in 32 bits.");this.tS=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"defaultSampleDuration",{get:function(){return this.UA},set:function(t){if(void 0===t&&this.flags.defaultSampleDurationPresent)throw new g("The default sample duration present flag is set.");if(void 0!==t&&!this.flags.defaultSampleDurationPresent)throw new g("The default sample duration present flag is not set.");if(t&&!Tu(t,32))throw new g("Provided defaultSampleDuration does not fit in 32 bits.");this.UA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"defaultSampleSize",{get:function(){return this.GA},set:function(t){if(void 0===t&&this.flags.defaultSampleSizePresent)throw new g("The default sample size present flag is set.");if(void 0!==t&&!this.flags.defaultSampleSizePresent)throw new g("The default sample size present flag is not set.");if(t&&!Tu(t,32))throw new g("Provided defaultSampleSize does not fit in 32 bits.");this.GA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"defaultSampleFlags",{get:function(){return this.HA},set:function(t){if(void 0===t&&this.flags.defaultSampleFlagsPresent)throw new g("The default sample flags present flag is set.");if(void 0!==t&&!this.flags.defaultSampleFlagsPresent)throw new g("The default sample flags present flag is not set.");if((null==t?void 0:t.samplePaddingValue)&&!Tu(t.samplePaddingValue,3))throw new g("Provided sample padding value does not fit in 3 bits.");if((null==t?void 0:t.sampleDegradationPriority)&&!Tu(t.sampleDegradationPriority,16))throw new g("Provided sample degradation priority does not fit in 16 bits.");this.HA=t},enumerable:!1,configurable:!0}),n.prototype.serializeFlags=function(t){t.writer.writeUInt(0,6),t.writer.writeBool(this.flags.defaultBaseIsMoof),t.writer.writeBool(this.flags.durationIsEmpty),t.writer.writeByte(0),t.writer.writeUInt(0,2),t.writer.writeBool(this.flags.defaultSampleFlagsPresent),t.writer.writeBool(this.flags.defaultSampleSizePresent),t.writer.writeBool(this.flags.defaultSampleDurationPresent),t.writer.writeBit(0),t.writer.writeBool(this.flags.sampleDescriptionIndexPresent),t.writer.writeBool(this.flags.baseDataOffsetPresent)},n.prototype.getBoxContentSize=function(){var n=t.prototype.getBoxContentSize.call(this)+4;return this.flags.baseDataOffsetPresent&&(n+=8),this.flags.sampleDescriptionIndexPresent&&(n+=4),this.flags.defaultSampleDurationPresent&&(n+=4),this.flags.defaultSampleSizePresent&&(n+=4),this.flags.defaultSampleFlagsPresent&&(n+=4),n},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.trackId,32),this.flags.baseDataOffsetPresent&&(n.writer.writeUInt(this.baseDataOffset.getHighBitsUnsigned(),32),n.writer.writeUInt(this.baseDataOffset.getLowBitsUnsigned(),32)),this.flags.sampleDescriptionIndexPresent&&n.writer.writeUInt(this.sampleDescriptionIndex,32),this.flags.defaultSampleDurationPresent&&n.writer.writeUInt(this.defaultSampleDuration,32),this.flags.defaultSampleSizePresent&&n.writer.writeUInt(this.defaultSampleSize,32),this.flags.defaultSampleFlagsPresent&&Ps(this.defaultSampleFlags,n)},n}(Ru);function sf(t){var n=t.data,i=n.nextUint8(),e=new gu(pu.from(n.nextUint8Array(3)));e.skipBits(6);var r=Boolean(e.readBit()),o=Boolean(e.readBit());e.skipBits(10);var u=Boolean(e.readBit()),s=Boolean(e.readBit()),f=Boolean(e.readBit());e.skipBits(1);var c=Boolean(e.readBit()),h=Boolean(e.readBit()),a=n.nextUint32(),v=h?n.nextUint64():void 0,d=c?n.nextUint32():void 0,l=f?n.nextUint32():void 0,w=s?n.nextUint32():void 0,b=u?Ju(new gu(pu.from(n.nextUint8Array(4)))):void 0;return new uf({trackId:a,defaultBaseIsMoof:r,durationIsEmpty:o,baseDataOffset:v,sampleDescriptionIndex:d,defaultSampleDuration:l,defaultSampleSize:w,defaultSampleFlags:b},i)}x(),gt();var ff=function(t){function n(n,i,e){var r=t.call(this,"trun",n,function(t){var n,i,e,r;return{dataOffsetPresent:void 0!==t.dataOffset,firstSampleFlagsPresent:void 0!==t.firstSampleFlags,sampleDurationPresent:null!==(n=t.sampleDurationPresent)&&void 0!==n&&n,sampleSizePresent:null!==(i=t.sampleSizePresent)&&void 0!==i&&i,sampleFlagsPresent:null!==(e=t.sampleFlagsPresent)&&void 0!==e&&e,sampleCompositionTimeOffsetsPresent:null!==(r=t.sampleCompositionTimeOffsetsPresent)&&void 0!==r&&r}}(i))||this;return r.dataOffset=i.dataOffset,r.samples=e,r.firstSampleFlags=i.firstSampleFlags,r}return vu(n,t),p.defineProperty(n.prototype,"dataOffset",{get:function(){return this.eS},set:function(t){if(t&&!Tu(t,32))throw new g("Provided data offset does not fit in 32 bits.");this.eS=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"firstSampleFlags",{get:function(){return this.iS},set:function(t){if((null==t?void 0:t.samplePaddingValue)&&!Tu(t.samplePaddingValue,3))throw new g("Provided sample padding value does not fit in 3 bits.");if((null==t?void 0:t.sampleDegradationPriority)&&!Tu(t.sampleDegradationPriority,16))throw new g("Provided sample degradation priority does not fit in 16 bits.");this.iS=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"samples",{get:function(){return this.sS},set:function(t){var n,i;if(!Tu(t.length,32))throw new g("The sample count cannot be represented in 32 bits.");for(var e=0,r=t;e<r.length;e++){var o=r[e];if(void 0===o.duration&&this.flags.sampleDurationPresent)throw new g("The sample duration present flag is set.");if(void 0!==o.duration&&!this.flags.sampleDurationPresent)throw new g("The sample duration present flag is not set.");if(o.duration&&!Tu(o.duration,32))throw new g("Provided sample duration does not fit in 32 bits.");if(void 0===o.size&&this.flags.sampleSizePresent)throw new g("The sample size present flag is set.");if(void 0!==o.size&&!this.flags.sampleSizePresent)throw new g("The sample size present flag is not set.");if(o.size&&!Tu(o.size,32))throw new g("Provided sample size does not fit in 32 bits.");if(void 0===o.flags&&this.flags.sampleFlagsPresent)throw new g("The sample flags present flag is set.");if(void 0!==o.flags&&!this.flags.sampleFlagsPresent)throw new g("The sample flags present flag is not set.");if((null===(n=o.flags)||void 0===n?void 0:n.samplePaddingValue)&&!Tu(o.flags.samplePaddingValue,3))throw new g("Provided sample padding value does not fit in 3 bits.");if((null===(i=o.flags)||void 0===i?void 0:i.sampleDegradationPriority)&&!Tu(o.flags.sampleDegradationPriority,16))throw new g("Provided sample degradation priority does not fit in 16 bits.");if(void 0===o.compositionTimeOffset&&this.flags.sampleCompositionTimeOffsetsPresent)throw new g("The sample compositionTimeOffset present flag is set.");if(void 0!==o.compositionTimeOffset&&!this.flags.sampleCompositionTimeOffsetsPresent)throw new g("The sample compositionTimeOffset present flag is not set.");if(o.compositionTimeOffset&&!Tu(o.compositionTimeOffset,32))throw new g("Provided sample compositionTimeOffset does not fit in 32 bits.")}this.sS=t},enumerable:!1,configurable:!0}),n.prototype.serializeFlags=function(t){t.writer.writeByte(0),t.writer.writeUInt(0,4),t.writer.writeBool(this.flags.sampleCompositionTimeOffsetsPresent),t.writer.writeBool(this.flags.sampleFlagsPresent),t.writer.writeBool(this.flags.sampleSizePresent),t.writer.writeBool(this.flags.sampleDurationPresent),t.writer.writeUInt(0,5),t.writer.writeBool(this.flags.firstSampleFlagsPresent),t.writer.writeBit(0),t.writer.writeBool(this.flags.dataOffsetPresent)},n.prototype.getBoxContentSize=function(){var n=t.prototype.getBoxContentSize.call(this)+4;return this.flags.dataOffsetPresent&&(n+=4),this.flags.firstSampleFlagsPresent&&(n+=4),this.flags.sampleDurationPresent&&(n+=4*this.samples.length),this.flags.sampleSizePresent&&(n+=4*this.samples.length),this.flags.sampleFlagsPresent&&(n+=4*this.samples.length),this.flags.sampleCompositionTimeOffsetsPresent&&(n+=4*this.samples.length),n},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.samples.length,32),this.flags.dataOffsetPresent&&n.writer.writeUInt(this.dataOffset,32),this.flags.firstSampleFlagsPresent&&Ps(this.firstSampleFlags,n);for(var i=0,e=this.samples;i<e.length;i++){var r=e[i];this.flags.sampleDurationPresent&&n.writer.writeUInt(r.duration,32),this.flags.sampleSizePresent&&n.writer.writeUInt(r.size,32),this.flags.sampleFlagsPresent&&Ps(r.flags,n),this.flags.sampleCompositionTimeOffsetsPresent&&(0===this.version?n.writer.writeUInt(r.compositionTimeOffset,32):n.writer.writeInt(r.compositionTimeOffset,32))}},n}(Ru);function cf(t){var n=t.data,i=n.nextUint8(),e=new gu(pu.from(n.nextUint8Array(3)));e.skipBits(12);var r=Boolean(e.readBit()),o=Boolean(e.readBit()),u=Boolean(e.readBit()),s=Boolean(e.readBit());e.skipBits(5);var f=Boolean(e.readBit());e.skipBits(1);var c=Boolean(e.readBit()),h=n.nextUint32(),a={sampleDurationPresent:s,sampleSizePresent:u,sampleFlagsPresent:o,sampleCompositionTimeOffsetsPresent:r};c&&(a.dataOffset=n.nextInt32()),f&&(a.firstSampleFlags=Ju(new gu(pu.from(n.nextUint8Array(4)))));for(var v=[],d=0;d<h;d++){var l={};s&&(l.duration=n.nextUint32()),u&&(l.size=n.nextUint32()),o&&(l.flags=Ju(new gu(pu.from(n.nextUint8Array(4))))),r&&(l.compositionTimeOffset=0===i?n.nextUint32():n.nextInt32()),v.push(l)}return new ff(i,a,v)}var hf=function(t){function n(){return t.call(this,"traf")||this}return vu(n,t),n}(us);function af(t){for(var n=new hf,i=0,e=Ku(t.data);i<e.length;i++){var r=e[i];ju(r,"tfhd")?n.boxes.push(sf(r)):ju(r,"tfdt")?n.boxes.push(of(r)):ju(r,"trun")?n.boxes.push(cf(r)):n.boxes.push(ts(r))}return n}var vf=function(t){function n(){return t.call(this,"moof")||this}return vu(n,t),n}(us);x(),gt();!function(t){function n(n){var i=t.call(this,"mfhd",0,0)||this;return i.sequenceNumber=n,i}vu(n,t),p.defineProperty(n.prototype,"sequenceNumber",{get:function(){return this.nS},set:function(t){if(!Tu(t,32))throw new g("Provided sequence number does not fit in 32 bits.");this.nS=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.sequenceNumber,32)}}(Ru);x(),gt();var df=function(t){function n(n){var i=t.call(this,"frma")||this;return i.codingName=n,i}return vu(n,t),p.defineProperty(n.prototype,"codingName",{get:function(){return this.rS},set:function(t){if(4!==t.length)throw new g("Provided coding name was not 4 characters long.");this.rS=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return 4},n.prototype.serializeBoxContent=function(t){t.writer.writeString(this.codingName)},n}(Su);x(),gt();!function(t){function n(n,i){var e=t.call(this,"pasp")||this;return e.hSpacing=n,e.vSpacing=i,e}vu(n,t),p.defineProperty(n.prototype,"hSpacing",{get:function(){return this.oS},set:function(t){if(!Tu(t,32))throw new g("Provided hSpacing does not fit in 32 bits.");this.oS=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"vSpacing",{get:function(){return this.hS},set:function(t){if(!Tu(t,32))throw new g("Provided vSpacing does not fit in 32 bits.");this.hS=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return 8},n.prototype.serializeBoxContent=function(t){t.writer.writeUInt(this.hSpacing,32),t.writer.writeUInt(this.vSpacing,32)}}(Su);x(),gt();!function(t){function n(n,i,e){var r=t.call(this,n)||this;return r.sample=i,r.sinf=e,r}vu(n,t),n.prototype.getBoxContentSize=function(){return this.sample.getBoxContentSize()+this.sinf.getSize()},n.prototype.serializeBoxContent=function(t){this.sample.serializeBoxContent(t),t.concat(this.sinf.serialize())}}(us);x(),gt();!function(t){function n(n,i,e){var r=t.call(this,"sinf")||this;return r.schm=i,r.schi=e,r.frma=new df(n),r}vu(n,t),n.prototype.getBoxContentSize=function(){var t,n,i,e;return this.frma.getSize()+(null!==(n=null===(t=this.schm)||void 0===t?void 0:t.getSize())&&void 0!==n?n:0)+(null!==(e=null===(i=this.schi)||void 0===i?void 0:i.getSize())&&void 0!==e?e:0)},n.prototype.serializeBoxContent=function(t){t.concat(this.frma.serialize()),this.schm&&t.concat(this.schm.serialize()),this.schi&&t.concat(this.schi.serialize())}}(Su);x(),gt();var lf=function(t){function n(n,i,e){var r=t.call(this,"saio",n,void 0===e?0:1)||this;return r.entries=i,r.explicitAuxInfoType=e,r}return vu(n,t),p.defineProperty(n.prototype,"bitSize",{get:function(){return 0===this.version?32:64},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"entries",{get:function(){return this.pA},set:function(t){var n=this;if(!Tu(t.length,32))throw new g("Number of entries provided does not fit in 32 bits.");if(t.some((function(t){return!Tu(t,n.bitSize)})))throw new g("Not all provided entries fit in ".concat(this.bitSize," bits."));this.pA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"explicitAuxInfoType",{get:function(){return this.aS},set:function(t){if(void 0===t)this.flags=0;else{if(!Tu(t.auxInfoType,32))throw new g("Provided auxInfoType does not fit in 32 bits.");if(!Tu(t.auxInfoTypeParameter,32))throw new g("Provided auxInfoTypeParameter does not fit in 32 bits.");this.flags=1}this.aS=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+(void 0===this.explicitAuxInfoType?0:8)+4+this.entries.length*this.bitSize/8},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),void 0!==this.explicitAuxInfoType&&(n.writer.writeUInt(this.explicitAuxInfoType.auxInfoType,32),n.writer.writeUInt(this.explicitAuxInfoType.auxInfoTypeParameter,32)),n.writer.writeUInt(this.entries.length,32),this.serializeSaioContent(n)},n}(Ru);(function(t){function n(){return null!==t&&t.apply(this,arguments)||this}vu(n,t),n.prototype.serializeSaioContent=function(t){for(var n=0,i=this.entries;n<i.length;n++){var e=i[n];t.writer.writeUInt(e,32)}}})(lf),function(t){function n(){return null!==t&&t.apply(this,arguments)||this}vu(n,t),n.prototype.serializeSaioContent=function(t){for(var n=0,i=this.entries;n<i.length;n++){var e=i[n];t.writer.writeUInt(e.getHighBitsUnsigned(),32),t.writer.writeUInt(e.getLowBitsUnsigned(),32)}}}(lf);x(),gt();!function(t){function n(n,i,e){var r=t.call(this,"saiz",0,void 0===e?0:1)||this;return r.defaultSampleInfoSize=n,r.sampleInfoSizes=i,r.explicitAuxInfoType=e,r}vu(n,t),p.defineProperty(n.prototype,"defaultSampleInfoSize",{get:function(){return this.uS},set:function(t){if(!Tu(t,8))throw new g("Provided defaultSampleInfoSize does not fit in a single byte.");this.uS=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"sampleInfoSizes",{get:function(){return this.cS},set:function(t){if(!Tu(t.length,32))throw new g("Number of sampleInfoSizes provided does not fit in 32 bits.");if(t.some((function(t){return!Tu(t,8)})))throw new g("Not all provided sampleInfoSizes fit in a byte.");this.cS=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"explicitAuxInfoType",{get:function(){return this.aS},set:function(t){if(void 0===t)this.flags=0;else{if(!Tu(t.auxInfoType,32))throw new g("Provided auxInfoType does not fit in 32 bits.");if(!Tu(t.auxInfoTypeParameter,32))throw new g("Provided auxInfoTypeParameter does not fit in 32 bits.");this.flags=1}this.aS=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+(void 0===this.explicitAuxInfoType?0:8)+1+4+(0!==this.defaultSampleInfoSize?0:this.sampleInfoSizes.length)},n.prototype.serializeBoxContent=function(n){if(0!==this.defaultSampleInfoSize&&this.sampleInfoSizes.length>0)throw new g("Both a default size and specific sizes are provided. This is prohibited.");t.prototype.serializeBoxContent.call(this,n),void 0!==this.explicitAuxInfoType&&(n.writer.writeUInt(this.explicitAuxInfoType.auxInfoType,32),n.writer.writeUInt(this.explicitAuxInfoType.auxInfoTypeParameter,32)),n.writer.writeByte(this.defaultSampleInfoSize),n.writer.writeUInt(this.sampleInfoSizes.length,32);for(var i=0,e=this.sampleInfoSizes;i<e.length;i++){var r=e[i];n.writer.writeByte(r)}}}(Ru);x(),gt();!function(t){function n(n){var i=t.call(this,"sdtp",0,0)||this;return i.samples=n,i}vu(n,t),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.samples.length},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n);for(var i=0,e=this.samples;i<e.length;i++){Ns(e[i],n)}}}(Ru);x(),gt();!function(t){function n(n){return t.call(this,"stsd",n,0)||this}vu(n,t),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.boxes.length,32)}}(cs);x(),gt();var wf=function(t){function n(n,i,e){var r=t.call(this,"sgpd",n,0)||this;return r.entries=e,r.groupingType=i,r}return vu(n,t),p.defineProperty(n.prototype,"groupingType",{get:function(){return this.lS},set:function(t){if(4!==t.length)throw new g("The provided groupingType does not equal 4 characters.");this.lS=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4+4},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeString(this.groupingType),this.serializeVersionBoxContent(n),n.writer.writeUInt(this.entries.length,32);for(var i=0,e=this.entries;i<e.length;i++){var r=e[i];this.serializeEntryBoxContent(n,r)}},n.prototype.serializeEntryBoxContent=function(t,n){n.serializeBoxContent(t)},n}(Ru);(function(t){function n(n,i){return t.call(this,0,n,i)||this}vu(n,t),n.prototype.serializeVersionBoxContent=function(t){}})(wf),function(t){function n(n,i,e){var r=t.call(this,1,n,e)||this;return r.defaultLength=i,r}vu(n,t),p.defineProperty(n.prototype,"defaultLength",{get:function(){return this.dS},set:function(t){if(!Tu(t,32))throw new g("The provided defaultLength does not fit in 32 bits.");this.dS=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4+this.entries.length*(this.defaultLength||4)},n.prototype.serializeVersionBoxContent=function(t){t.writer.writeUInt(this.defaultLength,32)},n.prototype.serializeEntryBoxContent=function(t,n){0===this.defaultLength&&t.writer.writeUInt(n.getBoxContentSize(),32),n.serializeBoxContent(t)}}(wf),function(t){function n(n,i,e,r){void 0===r&&(r=0);var o=this;if(n<2)throw new g("This constructor is only meant for versions 2 and up.");return(o=t.call(this,n,i,e)||this).defaultSampleDescriptionIndex=r,o}vu(n,t),p.defineProperty(n.prototype,"defaultSampleDescriptionIndex",{get:function(){return this.WA},set:function(t){if(!Tu(t,32))throw new g("The provided defaultSampleDescriptionIndex does not fit in 32 bits.");this.WA=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4},n.prototype.serializeVersionBoxContent=function(t){t.writer.writeUInt(this.defaultSampleDescriptionIndex,32)}}(wf);x(),gt();(function(t){function n(n){void 0===n&&(n=[]);var i=t.call(this,"stsz",0,0)||this;return i.sampleSizes=n,i}vu(n,t),p.defineProperty(n.prototype,"sampleSizes",{get:function(){return this.fS},set:function(t){if(!Tu(t.length,32))throw new g("Number of allowed samples cannot fit in 32 bits.");if(t.some((function(t){return!Tu(t,32)})))throw new g("Not all sampleSizes can be represented in 32 bits.");this.fS=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4+4+4*this.sampleSizes.length},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(0,32),n.writer.writeUInt(this.sampleSizes.length,32);for(var i=0,e=this.sampleSizes;i<e.length;i++){var r=e[i];n.writer.writeUInt(r,32)}}})(Ru),function(t){function n(n,i){void 0===n&&(n=0),void 0===i&&(i=0);var e=t.call(this,"stsz",0,0)||this;return e.defaultSampleSize=n,e.samples=i,e}vu(n,t),p.defineProperty(n.prototype,"defaultSampleSize",{get:function(){return this.GA},set:function(t){if(!Tu(t,32))throw new g("Provided defaultSampleSize does not fit in 32 bits.");this.GA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"samples",{get:function(){return this.sS},set:function(t){if(!Tu(t,32))throw new g("Number of allowed samples cannot fit in 32 bits.");this.sS=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4+4},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.defaultSampleSize,32),n.writer.writeUInt(this.samples,32)}}(Ru);x(),gt();!function(t){function n(){return t.call(this,"stbl")||this}vu(n,t)}(us);x(),gt();!function(t){function n(n){var i=t.call(this,"stsc",0,0)||this;return i.entries=n,i}vu(n,t),p.defineProperty(n.prototype,"entries",{get:function(){return this.pA},set:function(t){if(!Tu(t.length,32))throw new g("Number of allowed entries cannot fit in 32 bits.");if(t.some((function(t){return!Tu(t.firstChunk,32)||!Tu(t.sampleDescriptionIndex,32)||!Tu(t.samplesPerChunk,32)})))throw new g("Not all entries can be represented in 96 bits.");this.pA=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4+12*this.entries.length},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.entries.length,32);for(var i=0,e=this.entries;i<e.length;i++){var r=e[i];n.writer.writeUInt(r.firstChunk,32),n.writer.writeUInt(r.samplesPerChunk,32),n.writer.writeUInt(r.sampleDescriptionIndex,32)}}}(Ru);x(),gt();!function(t){function n(){return t.call(this,"schi")||this}vu(n,t)}(us);x(),gt();!function(t){function n(n,i,e){var r=t.call(this,"schm",0,void 0===e?0:1)||this;return r.schemeType=n,r.schemeVersion=i,r.schemeUri=e,r}vu(n,t),p.defineProperty(n.prototype,"schemeType",{get:function(){return this._S},set:function(t){if(4!==t.length)throw new g("The provided schemeType does not have a length of 4.");this._S=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"schemeVersion",{get:function(){return this.vS},set:function(t){if(!Tu(t,32))throw new g("The provided schemeVersion does not fit in 23 bits.");this.vS=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"schemeUri",{get:function(){return this.gS},set:function(t){if(t&&4!==t.length)throw new g("The provided schemeUri does not have a length of 4.");this.flags=void 0===t?0:1,this.gS=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4+4+(void 0===this.schemeUri?0:this.schemeUri.length+1)},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeString(this.schemeType),n.writer.writeUInt(this.schemeVersion,32),this.schemeUri&&(n.writer.writeString(this.schemeUri),n.writer.writeByte(0))}}(Ru);x(),gt();var bf=function(t){function n(n,i,e,r,o,u,s){void 0===s&&(s=0);var f=t.call(this,"sidx",n,s)||this;return f.referenceId=i,f.timescale=e,f.earliestPresentationTime=r,f.firstOffset=o,f.references=u,f}return vu(n,t),p.defineProperty(n.prototype,"bitSize",{get:function(){return 0===this.version?32:64},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"referenceId",{get:function(){return this.mS},set:function(t){if(!Tu(t,32))throw new g("Provided referenceId does not fit in 32 bits.");this.mS=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"timescale",{get:function(){return this.NA},set:function(t){if(!Tu(t,32))throw new g("Provided timescale does not fit in 32 bits.");this.NA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"earliestPresentationTime",{get:function(){return this.pS},set:function(t){if(!Tu(t,this.bitSize))throw new g("Provided earliestPresentationTime does not fit in ".concat(this.bitSize," bits."));this.pS=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"firstOffset",{get:function(){return this.wS},set:function(t){if(!Tu(t,this.bitSize))throw new g("Provided timescale does not fit in ".concat(this.bitSize," bits."));this.wS=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"references",{get:function(){return this.yS},set:function(t){if(!Tu(t.length,16))throw new g("The number of provided reference items does not fit in 16 bits.");for(var n=0,i=t;n<i.length;n++){var e=i[n];if(!Tu(e.referencedSize,31))throw new g("Provided referenced size does not fit in 31 bits.");if(!Tu(e.subsegmentDuration,32))throw new g("Provided subsegment duration does not fit in 31 bits.");if(!Tu(e.sapType,3))throw new g("Provided SAP type does not fit in 3 bits.");if(!Tu(e.sapDeltaTime,28))throw new g("Provided SAP delta time does not fit in 28 bits.")}this.yS=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4+4+this.bitSize/8*2+2+2+12*this.references.length},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.referenceId,32),n.writer.writeUInt(this.timescale,32),this.serializeSidxBoxContent(n),n.writer.writeUInt(0,16),n.writer.writeUInt(this.references.length,16);for(var i=0,e=this.references;i<e.length;i++){var r=e[i];n.writer.writeBit(r.referenceType),n.writer.writeUInt(r.referencedSize,31),n.writer.writeUInt(r.subsegmentDuration,32),n.writer.writeBool(r.startsWithSap),n.writer.writeUInt(r.sapType,3),n.writer.writeUInt(r.sapDeltaTime,28)}},n}(Ru),gf=function(t){function n(n,i,e,r,o,u){return void 0===u&&(u=0),t.call(this,0,n,i,e,r,o,u)||this}return vu(n,t),n.prototype.serializeSidxBoxContent=function(t){t.writer.writeUInt(this.earliestPresentationTime,32),t.writer.writeUInt(this.firstOffset,32)},n}(bf),mf=function(t){function n(n,i,e,r,o,u){return void 0===u&&(u=0),t.call(this,1,n,i,e,r,o,u)||this}return vu(n,t),n.prototype.serializeSidxBoxContent=function(t){t.writer.writeUInt(this.earliestPresentationTime.getHighBitsUnsigned(),32),t.writer.writeUInt(this.earliestPresentationTime.getLowBitsUnsigned(),32),t.writer.writeUInt(this.firstOffset.getHighBitsUnsigned(),32),t.writer.writeUInt(this.firstOffset.getLowBitsUnsigned(),32)},n}(bf);x(),gt();!function(t){function n(n,i,e){return t.call(this,"styp",n,i,e)||this}vu(n,t)}(bs);x(),gt();!function(t){function n(n){void 0===n&&(n=0);var i=t.call(this,"smhd",0,0)||this;return i.balance=n,i}vu(n,t),p.defineProperty(n.prototype,"balance",{get:function(){return this.bS},set:function(t){if(t<-1||t>1)throw new g("Provided balance does not fit in the allowed range [-1, 1].");if(!Tu(Eu(t,8),16))throw new g("Provided balance does not fit in 16 bits (fixed 8.8).");this.bS=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+2+2},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(Eu(this.balance,8),16),n.writer.writeUInt(0,16)}}(Ru);x(),gt();!function(t){function n(n){var i=t.call(this,"stss",0,0)||this;return i.entries=n,i}vu(n,t),p.defineProperty(n.prototype,"entries",{get:function(){return this.pA},set:function(t){if(!Tu(t.length,32))throw new g("Number of allowed entries cannot fit in 32 bits.");if(t.some((function(t){return!Tu(t,32)})))throw new g("Not all entries can be represented in 32 bits.");this.pA=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4+4*this.entries.length},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.entries.length,32);for(var i=0,e=this.entries;i<e.length;i++){var r=e[i];n.writer.writeUInt(r,32)}}}(Ru);x(),gt();!function(t){function n(n){var i=t.call(this,"stts",0,0)||this;return i.entries=n,i}vu(n,t),p.defineProperty(n.prototype,"entries",{get:function(){return this.pA},set:function(t){if(!Tu(t.length,32))throw new g("Number of allowed entries cannot fit in 32 bits.");if(t.some((function(t){return!Tu(t.sampleCount,32)||!Tu(t.sampleDelta,32)})))throw new g("Not all entries can be represented in 64 bits.");this.pA=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4+8*this.entries.length},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.entries.length,32);for(var i=0,e=this.entries;i<e.length;i++){var r=e[i];n.writer.writeUInt(r.sampleCount,32),n.writer.writeUInt(r.sampleDelta,32)}}}(Ru);x(),gt();!function(t){function n(n){var i=t.call(this,"trep",0,0)||this;return i.trackId=n,i}vu(n,t),p.defineProperty(n.prototype,"trackId",{get:function(){return this.VA},set:function(t){if(!Tu(t,32))throw new g("The provided trackId does not fit in 32 bits.");this.VA=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.trackId,32)}}(cs);x(),gt();!function(t){function n(){return t.call(this,"udta")||this}vu(n,t)}(us);x(),gt();var pf={red:0,green:0,blue:0};!function(t){function n(n,i){void 0===n&&(n=0),void 0===i&&(i=pf);var e=t.call(this,"vmhd",0,1)||this;return e.graphicsMode=n,e.opColor=i,e}vu(n,t),p.defineProperty(n.prototype,"opColor",{get:function(){return this.SS},set:function(t){if(!Tu(t.red,16)||!Tu(t.green,16)||!Tu(t.blue,16))throw new g("Not all colors could be represented in 16 bits.");this.SS=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+2+6},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.graphicsMode,16),n.writer.writeUInt(this.opColor.red,16),n.writer.writeUInt(this.opColor.green,16),n.writer.writeUInt(this.opColor.blue,16)}}(Ru);x(),gt();var yf=function(t){function n(n,i,e,r,o){void 0===r&&(r={}),void 0===o&&(o=void 0);var u,s,f,c,h,a=this;return(a=t.call(this,n,i)||this).width=e.width,a.height=e.height,a.horizontalResolution=null!==(u=e.horizontal)&&void 0!==u?u:72,a.verticalResolution=null!==(s=e.vertical)&&void 0!==s?s:72,a.compressorName=null!==(f=r.compressorName)&&void 0!==f?f:"",a.frameCount=null!==(c=r.frameCount)&&void 0!==c?c:1,a.depth=null!==(h=r.depth)&&void 0!==h?h:24,a.clap=r.clap,a.pasp=r.pasp,a.extra=o,a}return vu(n,t),p.defineProperty(n.prototype,"width",{get:function(){return this.YA},set:function(t){if(!Tu(t,16))throw new g("Provided width does not fit in 16 bits.");this.YA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"height",{get:function(){return this.KA},set:function(t){if(!Tu(t,16))throw new g("Provided height does not fit in 16 bits.");this.KA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"horizontalResolution",{get:function(){return this.TS},set:function(t){if(!Tu(Eu(t,16),32))throw new g("Provided horizontalResolution does not fit in 32 bits (fixed 16.16).");this.TS=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"verticalResolution",{get:function(){return this.kS},set:function(t){if(!Tu(Eu(t,16),32))throw new g("Provided verticalResolution does not fit in 32 bits (fixed 16.16).");this.kS=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"compressorName",{get:function(){return this.ES},set:function(t){if(t.length>31)throw new g("The provided compressorName should at most be 31 characters long.");this.ES=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"frameCount",{get:function(){return this.xS},set:function(t){if(!Tu(t,16))throw new g("Provided frameCount does not fit in 16 bits.");this.xS=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"depth",{get:function(){return this.RS},set:function(t){if(!Tu(t,16))throw new g("Provided depth does not fit in 16 bits.");this.RS=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){var n,i,e,r,o,u;return t.prototype.getBoxContentSize.call(this)+2+2+12+2+2+4+4+4+2+32+2+2+(null!==(i=null===(n=this.clap)||void 0===n?void 0:n.getSize())&&void 0!==i?i:0)+(null!==(r=null===(e=this.pasp)||void 0===e?void 0:e.getSize())&&void 0!==r?r:0)+(null!==(u=null===(o=this.extra)||void 0===o?void 0:o.length)&&void 0!==u?u:0)},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(0,16),n.writer.writeUInt(0,16),n.writer.writeUInt(0,32),n.writer.writeUInt(0,32),n.writer.writeUInt(0,32),n.writer.writeUInt(this.width,16),n.writer.writeUInt(this.height,16),n.writer.writeUInt(Eu(this.horizontalResolution,16),32),n.writer.writeUInt(Eu(this.verticalResolution,16),32),n.writer.writeUInt(0,32),n.writer.writeUInt(this.frameCount,16),n.writer.writeByte(this.compressorName.length),n.writer.writeString(this.compressorName);for(var i=0;i<31-this.compressorName.length;i++)n.writer.writeByte(0);n.writer.writeUInt(this.depth,16),n.writer.writeInt(-1,16),this.clap&&n.concat(this.clap.serialize()),this.pasp&&n.concat(this.pasp.serialize()),this.extra&&ku(n.writer,this.extra)},n}(ss);x(),gt(),x(),gt();!function(t){function n(n){var i=t.call(this,"esds",0,0)||this;return i.esDescriptor=n,i}vu(n,t),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+(this.esDescriptor instanceof E?this.esDescriptor.length:this.esDescriptor.getSize())},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),this.esDescriptor instanceof E?n.concat(pu.from(this.esDescriptor)):this.esDescriptor.serialize(n)}}(Ru);x(),gt();!function(t){function n(n,i,e){var r=t.call(this,"mp4a",n,e)||this;return r.esd=i,r}vu(n,t),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.esd.getSize()},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.concat(this.esd.serialize())}}(fs);x(),gt();!function(t){function n(n,i,e,r){void 0===r&&(r={});var o=t.call(this,"mp4v",n,i,r)||this;return o.esDescriptor=e,o}vu(n,t),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.esDescriptor.getSize()},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),this.esDescriptor.serialize(n)}}(yf);x(),gt();!function(t){function n(n,i){var e=t.call(this,"mp4s",n)||this;return e.esDescriptor=i,e}vu(n,t),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.esDescriptor.getSize()},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),this.esDescriptor.serialize(n)}}(ss);x(),gt(),x(),gt();!function(t){function n(n){var i=t.call(this,"avcC")||this;return i.decoderConfig=n,i}vu(n,t),n.prototype.getBoxContentSize=function(){return this.decoderConfig.getSize()},n.prototype.serializeBoxContent=function(t){this.decoderConfig.serialize(t)}}(Su);x(),gt();!function(){function t(t,n,i,e,r,o){void 0===o&&(o=1),this.lengthSizeMinusOne=i,this.version=o,this.profileIndication=t.indication,this.profileCompatibility=t.compatibility,this.levelIndication=n,this.spsSets=e,this.ppsSets=r}p.defineProperty(t.prototype,"version",{get:function(){return this.IS},set:function(t){if(!Tu(t,8))throw new g("Provided version does not fit in 8 bits.");this.IS=t},enumerable:!1,configurable:!0}),p.defineProperty(t.prototype,"profileIndication",{get:function(){return this.CS},set:function(t){if(!Tu(t,8))throw new g("Provided profileIndication does not fit in 8 bits.");this.CS=t},enumerable:!1,configurable:!0}),p.defineProperty(t.prototype,"profileCompatibility",{get:function(){return this.PS},set:function(t){if(!Tu(t,8))throw new g("Provided profileCompatibility does not fit in 8 bits.");this.PS=t},enumerable:!1,configurable:!0}),p.defineProperty(t.prototype,"levelIndication",{get:function(){return this.DS},set:function(t){if(!Tu(t,8))throw new g("Provided levelIndication does not fit in 8 bits.");this.DS=t},enumerable:!1,configurable:!0}),p.defineProperty(t.prototype,"spsSets",{get:function(){return this.NS},set:function(t){if(!Tu(t.length,5))throw new g("Provided number of spsSets exceeds the max (32)");this.NS=t},enumerable:!1,configurable:!0}),p.defineProperty(t.prototype,"ppsSets",{get:function(){return this.MS},set:function(t){if(!Tu(t.length,8))throw new g("Provided number of ppsSets exceeds the max (256)");this.MS=t},enumerable:!1,configurable:!0}),t.prototype.getSize=function(){return 7+2*this.spsSets.length+this.spsSets.reduce((function(t,n){return t+n.length}),0)+2*this.ppsSets.length+this.ppsSets.reduce((function(t,n){return t+n.length}),0)},t.prototype.serialize=function(t){t.writer.writeByte(this.version),t.writer.writeByte(this.profileIndication),t.writer.writeByte(this.profileCompatibility),t.writer.writeByte(this.levelIndication),t.writer.writeBits([1,1,1,1,1,1]),t.writer.writeUInt(this.lengthSizeMinusOne,2),t.writer.writeBits([1,1,1]),t.writer.writeUInt(this.spsSets.length,5);for(var n=0,i=this.spsSets;n<i.length;n++){var e=i[n];t.writer.writeUInt(e.length,16),t.concat(pu.from(e))}t.writer.writeByte(this.ppsSets.length);for(var r=0,o=this.ppsSets;r<o.length;r++){var u=o[r];t.writer.writeUInt(u.length,16),t.concat(pu.from(u))}}}();x(),gt();!function(t){function n(n,i,e,r,o){void 0===r&&(r={}),void 0===o&&(o=void 0);var u=t.call(this,"avc1",n,i,r)||this;return u.configurationBox=e,u.bitrateBox=o,u}vu(n,t),n.prototype.getBoxContentSize=function(){var n,i;return t.prototype.getBoxContentSize.call(this)+this.configurationBox.getSize()+(null!==(i=null===(n=this.bitrateBox)||void 0===n?void 0:n.getSize())&&void 0!==i?i:0)},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.concat(this.configurationBox.serialize()),this.bitrateBox&&n.concat(this.bitrateBox.serialize())}}(yf);x(),gt();!function(t){function n(n,i,e){var r=t.call(this,"btrt")||this;return r.bufferSizeDb=n,r.max=i,r.avg=e,r}vu(n,t),p.defineProperty(n.prototype,"bufferSizeDb",{get:function(){return this.hA},set:function(t){if(!Tu(t,32))throw new g("Provided bufferSizeDb does not fit in 32 bits.");this.hA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"max",{get:function(){return this.M_},set:function(t){if(!Tu(t,32))throw new g("Provided max does not fit in 32 bits.");this.M_=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"avg",{get:function(){return this.LS},set:function(t){if(!Tu(t,32))throw new g("Provided avg does not fit in 32 bits.");this.LS=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return 12},n.prototype.serializeBoxContent=function(t){t.writer.writeUInt(this.bufferSizeDb,32),t.writer.writeUInt(this.max,32),t.writer.writeUInt(this.avg,32)}}(Su);x(),gt(),x(),gt(),x(),gt();var _f=function(t){function n(n,i){var e,r,o,u,s=this;if(s=t.call(this,"tenc",n,0)||this,i.perSampleIvSize>0&&(null!==(r=null===(e=i.constantIv)||void 0===e?void 0:e.length)&&void 0!==r?r:0)>0)throw new g("Either perSampleSize should be > 0 or constantIv should be defined. Not both.");return s.kId=i.kId,s.isProtected=null!==(o=i.isProtected)&&void 0!==o?o:1,i.perSampleIvSize>0?s.perSampleIvSize=i.perSampleIvSize:s.constantIv=null!==(u=i.constantIv)&&void 0!==u?u:new E(0),s}return vu(n,t),p.defineProperty(n.prototype,"isProtected",{get:function(){return this.FS},set:function(t){if(!Tu(t,8))throw new g("Provided isProtected does not fit in 1 byte.");this.FS=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"perSampleIvSize",{get:function(){return this.VS},set:function(t){if(![8,16].includes(t))throw new g("Provided perSampleIvSize does not match any allowed value [8, 16].");this.VS=t,this.WS=new E(0)},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"kId",{get:function(){return this.US},set:function(t){if(16!==t.length)throw new g("Provided kId length is not 16.");this.US=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"constantIv",{get:function(){return this.WS},set:function(t){if(![8,16].includes(t.length))throw new g("Provided constant IV length does not match any allowed value [8, 16].");this.WS=t,this.VS=0},enumerable:!1,configurable:!0}),n.prototype.getTencHeaderSize=function(){return 20+(this.constantIv.length>0?1+this.constantIv.length:0)},n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.getTencHeaderSize()},n.prototype.serializeVersionBoxContent=function(t){t.writer.writeByte(0)},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),this.serializeOwnContent(n)},n.prototype.serializeOwnContent=function(t){t.writer.writeByte(0),this.serializeVersionBoxContent(t),t.writer.writeByte(this.isProtected),t.writer.writeByte(this.perSampleIvSize),ku(t.writer,this.kId),0===this.perSampleIvSize&&(t.writer.writeByte(this.constantIv.length),ku(t.writer,this.constantIv))},n}(Ru),Sf=(function(t){function n(n){return t.call(this,0,n)||this}vu(n,t)}(_f),function(t){function n(n){var i=t.call(this,1,n)||this;return i.cryptByteBlocks=n.cryptByteBlock,i.skipByteBlocks=n.skipByteBlock,i}return vu(n,t),p.defineProperty(n.prototype,"cryptByteBlocks",{get:function(){return this.GS},set:function(t){if(!Tu(t,4))throw new g("Provided cryptByteBlocks does not fit in 4 bits.");this.GS=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"skipByteBlocks",{get:function(){return this.HS},set:function(t){if(!Tu(t,4))throw new g("Provided skipByteBlocks does not fit in 4 bits.");this.HS=t},enumerable:!1,configurable:!0}),n.prototype.serializeVersionBoxContent=function(t){t.writer.writeUInt(this.cryptByteBlocks,4),t.writer.writeUInt(this.skipByteBlocks,4)},n}(_f));!function(t){function n(n){var i=t.call(this)||this;return i.tencBox=new Sf(n),i}vu(n,t),n.prototype.serializeBoxContent=function(t){this.tencBox.serializeOwnContent(t)},n.prototype.getBoxContentSize=function(){return this.tencBox.getTencHeaderSize()}}(As);function Tf(t){return void 0!==t.iv}function Ef(t){return void 0!==t.subsamples}x(),gt();!function(t){function n(n){var i=t.call(this,"senc",0,{useSubsampleEncryption:!1})||this;return i.samples=n,i}vu(n,t),p.defineProperty(n.prototype,"samples",{get:function(){return this.sS},set:function(t){var n;if(!Tu(t.length,32))throw new g("The number of samples provided does not fit in 32 bits.");for(var i=0,e=t;i<e.length;i++){var r=e[i];if(Tf(r)&&![8,16].includes(r.iv.length))throw new g("IV of one of the provided samples did not satisfy the required length constraints. [8, 16]");if(void 0===n&&(n=Ef(r)),!0===n&&!Ef(r)||!1===n&&Ef(r))throw new g("Mix of samples with and without subsamples detected.");if(Ef(r)){if(!Tu(r.subsamples.length,16))throw new g("Subsample length of one of the provided samples does not fit in 16 bits.");for(var o=0,u=r.subsamples;o<u.length;o++){var s=u[o];if(!Tu(s.clearData,16))throw new g("Subsample clearData of one of the provided samples does not fit in 16 bits.");if(!Tu(s.protectedData,23))throw new g("Subsample protectedData of one of the provided samples does not fit in 23 bits.")}}}this.flags.useSubsampleEncryption=null!=n&&n,this.sS=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){for(var n=0,i=0,e=this.samples;i<e.length;i++){var r=e[i];Tf(r)&&(n+=r.iv.length),Ef(r)&&(n+=2+6*r.subsamples.length)}return t.prototype.getBoxContentSize.call(this)+4+n},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.samples.length,32);for(var i=0,e=this.samples;i<e.length;i++){var r=e[i];if(Tf(r)&&ku(n.writer,r.iv),Ef(r)){n.writer.writeUInt(r.subsamples.length,16);for(var o=0,u=r.subsamples;o<u.length;o++){var s=u[o];n.writer.writeUInt(s.clearData,16),n.writer.writeUInt(s.protectedData,32)}}}},n.prototype.serializeFlags=function(t){t.writer.writeUInt(this.flags.useSubsampleEncryption?2:0,24)}}(Ru);x(),gt(),x(),gt();!function(t){function n(n,i,e,r,o){var u=t.call(this,"emsg",0,0)||this;return u.schemeIdUri=n,u.value=i,u.data=o,u.id=e,u.timescale=r.timescale,u.presentationTimeDelta=r.presentationTimeDelta,u.eventDuration=r.eventDuration,u}vu(n,t),p.defineProperty(n.prototype,"timescale",{get:function(){return this.NA},set:function(t){if(!Tu(t,32))throw new g("The provided timescale does not fit in 32 bits.");this.NA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"presentationTimeDelta",{get:function(){return this.ZS},set:function(t){if(!Tu(t,32))throw new g("The provided presentationTimeDelta does not fit in 32 bits.");this.ZS=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"eventDuration",{get:function(){return this.XS},set:function(t){if(!Tu(t,32))throw new g("The provided eventDuration does not fit in 32 bits.");this.XS=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"id",{get:function(){return this.zS},set:function(t){if(!Tu(t,32))throw new g("The provided id does not fit in 32 bits.");this.zS=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.schemeIdUri.length+1+this.value.length+1+16+this.data.length},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeString(this.schemeIdUri),n.writer.writeByte(0),n.writer.writeString(this.value),n.writer.writeByte(0),n.writer.writeUInt(this.timescale,32),n.writer.writeUInt(this.presentationTimeDelta,32),n.writer.writeUInt(this.eventDuration,32),n.writer.writeUInt(this.id,32),n.concat(pu.from(this.data))}}(Ru);x(),gt(),x(),gt(),x(),gt();!function(){function t(){this.boxes=[]}t.prototype.serialize=function(){for(var t=new _u,n=0,i=this.boxes;n<i.length;n++){var e=i[n];t.concat(e.serialize())}return t.toRangedBuffer()}}();function kf(t,n){return function(i){var e=new Xu(function(t){return new DataView(t.buffer,t.byteOffset,t.byteLength)}(i),new qu),r=function(t,n){for(var i=t.data,e=t.cursor;e.offset<i.byteLength;){var r=Gu(i,e);if(!r.complete)return;if(ju(r.box,n))return r.box}}(e,t);if(!r)throw new g("".concat(t," box not found"));return n(r)}}kf("moov",(function(t){for(var n=new tf,i=0,e=Ku(t.data);i<e.length;i++){var r=e[i];ju(r,"mvhd")?n.boxes.push(Ys(r)):ju(r,"trak")?n.boxes.push(Qs(r)):ju(r,"mvex")?n.boxes.push(Vs(r)):ju(r,"pssh")?n.boxes.push(Bs(r)):n.boxes.push(ts(r))}return n})),kf("sidx",(function(t){var n,i,e=t.data,r=$u(e.nextUint32()),o=r.version,u=r.flags,s=e.nextUint32(),f=e.nextUint32();0===o?(n=e.nextUint32(),i=e.nextUint32()):(n=e.nextUint64(),i=e.nextUint64()),e.skip(2);for(var c=e.nextUint16(),h=[],a=0;a<c;a++){var v=new gu(pu.from(e.nextUint8Array(12))),d=v.readBit(),l=v.readUInt(31),w=v.readUInt(32),b=Boolean(v.readBit()),g=v.readUInt(3),m=v.readUInt(28);h.push({referenceType:d,referencedSize:l,subsegmentDuration:w,startsWithSap:b,sapType:g,sapDeltaTime:m})}return 0===o?new gf(s,f,n,i,h,u.raw):new mf(s,f,n,i,h,u.raw)})),kf("moof",(function(t){for(var n=new vf,i=0,e=Ku(t.data);i<e.length;i++){var r=e[i];ju(r,"traf")?n.boxes.push(af(r)):ju(r,"pssh")?n.boxes.push(Bs(r)):n.boxes.push(ts(r))}return n}));var If=kf("pssh",Bs),Rf=function(t){function n(n,i){var e;(e=t.call(this)||this).KS=n,e.nT=i,e.JS=!1,e.rT=function(){e.iT()},e.oT=function(t){e._o(new No(e,t.messageType,fu(e.nT,t.message)))},e.hT=function(){e.JS=!0,e.jS.Nb>0&&(e.jS.Fb(),e._o(new Oo(e.jS))),e.KS.removeEventListener("keystatuseschange",e.rT),e.KS.removeEventListener("message",e.oT)},e.KS.addEventListener("keystatuseschange",e.rT),e.KS.addEventListener("message",e.oT),e.jS=new uu;var r=[];return e.KS.closed&&r.push(J.resolve(e.KS.closed)),e.$S=new su,r.push(e.$S.Ub),e.Vd=J.race(r).then(e.hT,e.hT),e.iT(),e}_t(n,t);var i=n.prototype;return i.Ws=function(){if(this.JS)return this.Vd;var t=[];return t.push(J.resolve(this.KS.close())),t.push(_o(1e3)),this.$S.Qw(J.race(t).catch(Of)),this.JS=!0,this.Vd},i.tT=function(t,n,i){if(Ut.hg){var e=If(Zo(n));if(1===e.version)n=new Cs(e.systemId,e.data).serialize().join()}return J.resolve(this.KS.generateRequest(t,n)).catch(Of)},i.$n=function(t){return J.resolve(this.KS.load(t)).catch(Of)},i.eT=function(){return J.resolve(this.KS.remove()).catch(Of)},i.ir=function(t){return J.resolve(this.KS.update(t)).catch(Of)},i.iT=function(){var t=this;this.jS.Fb(),this.KS.keyStatuses.forEach((function(n,i){t.sT(i,n)})),this._o(new Oo(this.jS))},i.sT=function(t,n){if("string"==typeof t){var i=t;t=n,n=i}var e=Zo(t);if(this.nT===jr&&16===e.byteLength&&(Ut.Sg||Ut.ym)){var r=Go(e),o=r.getUint32(0,!0),u=r.getUint16(4,!0),s=r.getUint16(6,!0);r.setUint32(0,o,!1),r.setUint16(4,u,!1),r.setUint16(6,s,!1)}this.nT===jr&&"status-pending"===n&&(n="usable"),this.jS.Bb(e,n)},Tt(n,[{key:"qS",get:function(){return this.Vd}},{key:"YS",get:function(){return this.KS.expiration}},{key:"pb",get:function(){return this.jS}},{key:"QS",get:function(){return this.KS.sessionId}}]),n}(To);function Of(t){var n;if(t.message){var i=t.message.match(/^SystemCode:0x([0-9a-fA-F]+)$/);i&&(n=0|_(i[1],16))}throw new hu(t.message,void 0,n,t)}var Nf=function(){function t(t,n,i){this.uT=t,this.cT=n,this.kd=i}var n=t.prototype;return n.aT=function(t){var n=this;return gr((function(){return mr(this,(function(i){return[2,new Rf(n.uT.createSession(t),n.cT)]}))}))()},n.lT=function(t){return J.resolve(this.uT.setServerCertificate(t))},n.kn=function(t){return J.resolve(t.setMediaKeys(this.uT))},n.dT=function(t){return J.resolve(t.setMediaKeys(null))},n.nr=function(){return J.resolve()},t}(),Pf=function(){function t(t,n,i){this.fT=t,this.nT=n,this.vT=i}var n=t.prototype;return n._T=function(){var t=this;return gr((function(){var n;return mr(this,(function(i){switch(i.label){case 0:return[4,t.fT.createMediaKeys()];case 1:return n=i.sent(),[2,new Nf(n,t.nT,t.vT)]}}))}))()},n.gT=function(){return this.vT},Tt(t,[{key:"cT",get:function(){return this.fT.keySystem}}]),t}();function Af(t){var n=t.trim(),i=n.indexOf(";");return i<0?n:n.substr(0,i).trim()}function Df(t,n,i,e){var r=!1;if(!(e.persistentState&&"optional"!==e.persistentState||e.distinctiveIdentifier&&"optional"!==e.distinctiveIdentifier)){var o={audioCapabilities:[],videoCapabilities:[],persistentState:e.persistentState||"optional",distinctiveIdentifier:e.distinctiveIdentifier||"optional",initDataTypes:e.initDataTypes,sessionTypes:["temporary"],label:e.label,wT:e.wT},u=!1;if(e.audioCapabilities){var s=e.audioCapabilities.filter((function(t){return Boolean(t.contentType)}));s.length&&(o.audioCapabilities=s.filter((function(e){return Cf(t,n,i,e)})),u=!0,o.audioCapabilities.length&&(r=!0))}if(e.videoCapabilities){var f=e.videoCapabilities.filter((function(t){return Boolean(t.contentType)}));f.length&&(o.videoCapabilities=f.filter((function(e){return Cf(t,n,i,e)})),u=!0,o.videoCapabilities.length&&(r=!0))}return u||(r=t(i,"video/mp4")),r?o:void 0}}function Cf(t,n,i,e){return!!e.contentType&&(!(e.encryptionScheme&&!Er(n,e.encryptionScheme))&&(!e.robustness&&t(i,Af(e.contentType))))}function xf(t){if(t.videoCapabilities)for(var n=0,i=t.videoCapabilities;n<i.length;n++){var e=i[n];if(e.contentType)return e.contentType}if(t.audioCapabilities)for(var r=0,o=t.audioCapabilities;r<o.length;r++){var u=o[r];if(u.contentType)return u.contentType}}function Bf(t){for(var n=[],i=0;i<t.length;i++){var e=t[i];e.encryptionScheme&&n.push({contentType:e.contentType,robustness:e.robustness})}return t.concat(n)}function Mf(t){return!(!t.audioCapabilities||!t.audioCapabilities.some(Lf))||!(!t.videoCapabilities||!t.videoCapabilities.some(Lf))}function Lf(t){return!t.robustness}function Uf(t,n){for(var i=[],e=0;e<t.length;e++){var r=t[e];r.robustness?i.push(r):i.push(Fr({},r,{robustness:n}))}return i}x(),gt(),x(),gt();var Ff=function(){function t(){}return t.prototype.Dw=function(t,n){return gr((function(){var i,e,r,o,u,s,f;return mr(this,(function(c){switch(c.label){case 0:for(n=n.filter((function(t){return!t.wT})),i=0;i<n.length;i++)(e=n[i]).audioCapabilities&&(e.audioCapabilities=Bf(e.audioCapabilities)),e.videoCapabilities&&(e.videoCapabilities=Bf(e.videoCapabilities));if(t!==Gr||!n.some(Mf))return[3,4];r=n.map((function(t){return function(t,n){return Fr({},t,{videoCapabilities:t.videoCapabilities?Uf(t.videoCapabilities,n):void 0,audioCapabilities:t.audioCapabilities?Uf(t.audioCapabilities,n):void 0})}(t,"SW_SECURE_CRYPTO")})),c.label=1;case 1:return c.trys.push([1,3,,4]),[4,v.requestMediaKeySystemAccess(t,r)];case 2:return o=c.sent(),u=o.getConfiguration(),[2,new Pf(o,t,u)];case 3:return c.sent(),[3,4];case 4:return[4,v.requestMediaKeySystemAccess(t,n)];case 5:return s=c.sent(),f=s.getConfiguration(),[2,new Pf(s,t,f)]}}))}))()},t.yT=function(){return void 0!==v&&"function"==typeof v.requestMediaKeySystemAccess},t}();x(),gt(),x(),gt(),x(),gt(),x(),gt();var zf=function(t){function n(n,i){var e;return(e=t.call(this)||this).xT=n,e.IT=i,e.JS=!1,e.NT=void 0,e.kT=void 0,e.bT=void 0,e.hT=function(){e.JS=!0,e.AT.Vb(void 0),e.bT&&(e.bT.removeEventListener("mskeyclose",e.hT),e.bT.removeEventListener("mskeymessage",e.CT),e.bT.removeEventListener("mskeyerror",e.Ss),e.bT.removeEventListener("mskeyadded",e.PT))},e.CT=function(t){e.kT&&(e.kT.Vb(void 0),e.kT=void 0),e._o(new No(e,"license-request",Jo(t.message).buffer,t.destinationURL||void 0))},e.Ss=function(){var t=e.bT&&e.bT.error;if(t){var n=new hu("Unknown CDM error",t.code,t.systemCode);if(e.kT)e.kT.Wb(n),e.kT=void 0;else if(e.NT)e.NT.Wb(n),e.NT=void 0;else switch(n.Gb){case MSMediaKeyError.MS_MEDIA_KEYERR_OUTPUT:case MSMediaKeyError.MS_MEDIA_KEYERR_HARDWARECHANGE:e.DT("output-not-allowed");break;default:e.DT("internal-error")}}},e.PT=function(){e.kT&&(e.DT("usable"),e.kT.Vb(void 0),e.kT=void 0),e.NT&&(e.DT("usable"),e.NT.Vb(void 0),e.NT=void 0)},e.AT=new su,e.ST=new uu,e}_t(n,t);var i=n.prototype;return i.tT=function(t,n,i){var e=this;return gr((function(){return mr(this,(function(t){switch(t.label){case 0:return e.TT(),e.kT=new su,e.aT(Zo(n),i),[4,e.kT.Ub];case 1:return t.sent(),[2]}}))}))()},i.aT=function(t,n){if(!t)throw new m("Expected initData to be defined but was "+t+".");var i,e=n&&n.playready&&n.playready.ET;return(i=n?this.xT.createSession(this.IT,t,e):this.xT.createSession(this.IT,t)).addEventListener("mskeyclose",this.hT),i.addEventListener("mskeymessage",this.CT),i.addEventListener("mskeyerror",this.Ss),i.addEventListener("mskeyadded",this.PT),this.bT=i,this.DT("status-pending"),i},i.$n=function(t){var n=this;return gr((function(){return mr(this,(function(t){return n.TT(),[2,!0]}))}))()},i.ir=function(t){var n=this;return gr((function(){var i;return mr(this,(function(e){switch(e.label){case 0:if(n.NT=new su,n.TT(),!n.bT)return[2,J.resolve()];if(0===(i=Zo(t)).byteLength)throw new m("Cannot call update with an empty response.");return n.bT.update(i),[4,n.NT.Ub];case 1:return e.sent(),[2]}}))}))()},i.Ws=function(){return!this.JS&&this.bT&&(this.JS=!0,this.bT.close()),this.AT.Ub},i.eT=function(){var t=this;return gr((function(){return mr(this,(function(n){return t.TT(),[2]}))}))()},i.TT=function(){if(this.JS)throw new m("Already closing or closed.")},i.DT=function(t){this.ST.Fb(),this.ST.Bb(ou,t),this._o(new Oo(this.ST))},Tt(n,[{key:"QS",get:function(){return this.bT&&this.bT.sessionId||""}},{key:"YS",get:function(){return NaN}},{key:"qS",get:function(){return this.AT.Ub}},{key:"pb",get:function(){return this.ST}}]),n}(To),Wf=function(){function t(t,n,i){this.xT=t,this.cT=n,this.kd=i;var e=xf(i)||"video/mp4";this.IT=Af(e)}var n=t.prototype;return n.aT=function(t){var n=this;return gr((function(){return mr(this,(function(t){return[2,new zf(n.xT,n.IT)]}))}))()},n.lT=function(t){return J.resolve(!1)},n.kn=function(t){var n=this,i=function(){t.msSetMediaKeys(n.xT),t.removeEventListener("loadedmetadata",i)};return t.readyState>=1?t.msSetMediaKeys(this.xT):t.addEventListener("loadedmetadata",i),J.resolve()},n.dT=function(t){return J.resolve()},n.nr=function(){return J.resolve()},t}(),Hf=function(){function t(t,n){this.nT=t,this.MT=n}var n=t.prototype;return n.gT=function(){return this.MT},n._T=function(){var t=new h.MSMediaKeys(this.nT);return J.resolve(new Wf(t,this.nT,this.MT))},Tt(t,[{key:"cT",get:function(){return this.nT}}]),t}(),Vf=function(){function t(){}return t.prototype.Dw=function(t,n){try{return J.resolve(function(t,n){if(!qf())throw new m("Unsupported key system "+t);for(var i=0;i<n.length;i++){var e=n[i],r=Df(Xf,Io,t,e);if(r)return new Hf(t,r)}throw new m("Unsupported key system configuration for "+t)}(t,n))}catch(t){return J.reject(t)}},t.yT=function(){return qf()},t}();function qf(){return void 0!==h.MSMediaKeys&&"function"==typeof h.MSMediaKeys.isTypeSupported}function Xf(t,n){return h.MSMediaKeys.isTypeSupported(t,n)}x(),gt(),x(),gt(),x(),gt(),x(),gt();var jf=function(t){function n(n,i,e){var r;return(r=t.call(this)||this).FT=n,r.IT=i,r.OT=e,r.AT=new su,r.WT=void 0,r.ST=new uu,r.LT=void 0,r.VT=new su,r.Ss=function(){var t=r.LT&&r.LT.error;if(t){var n=new hu("Unknown CDM error",t.code,t.systemCode);r.WT?(r.WT.Wb(n),r.WT=void 0):n.Gb===WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT?r.DT("output-not-allowed"):r.DT("internal-error"),r._o(new Po)}},r.CT=function(t){r._o(new No(r,"license-request",Jo(t.message).buffer,"this is a test string"===t.destinationURL?void 0:t.destinationURL))},r.PT=function(){r.WT&&(r.WT.Vb(void 0),r.WT=void 0),r.DT("usable")},r}_t(n,t);var i=n.prototype;return i.tT=function(t,n,i){var e=i&&i.fairplay&&i.fairplay.BT;if(!e)throw new m("Expected FairPlay contentId to be defined but was "+e+".");var r=function(t,n,i){var e=Yo(t),r=2*e.length,o=2*n.length,u=new ArrayBuffer(4+r+4+o+4+i.byteLength),s=new DataView(u),f=new Qo;return qo(s,f,r,!0),Xo(s,f,e,!0),qo(s,f,o,!0),Xo(s,f,n,!0),qo(s,f,i.byteLength,!0),function(t,n,i){$o(t).set($o(i),n.nc),n.xb(i.byteLength)}(s,f,i),new E(u)}(Zo(n),e,this.OT);return this.LT=this.FT.createSession(this.IT,r),this.LT.addEventListener("webkitkeymessage",this.CT,!1),this.LT.addEventListener("webkitkeyadded",this.PT,!1),this.LT.addEventListener("webkitkeyerror",this.Ss,!1),this.DT("status-pending"),this.VT.Vb(this.LT),this.VT=new su,J.resolve()},i.$n=function(t){return J.resolve(!0)},i.ir=function(t){var n=this;return gr((function(){var i,e;return mr(this,(function(r){switch(r.label){case 0:if(0===(i=Zo(t)).byteLength)throw new m("Cannot call update with an empty response.");return n.WT=new su,(e=n.LT)?[3,2]:[4,n.VT.Ub];case 1:e=r.sent(),r.label=2;case 2:return e.update(i),[4,n.WT.Ub];case 3:return r.sent(),[2]}}))}))()},i.Ws=function(){var t,n=this.LT;return n&&(n.removeEventListener("webkitkeymessage",this.CT,!1),n.removeEventListener("webkitkeyadded",this.PT,!1),n.removeEventListener("webkitkeyerror",this.Ss,!1),n.close()),this.VT.jw(),null==(t=this.WT)||t.jw(),this.AT.Vb(void 0),this.AT.Ub},i.eT=function(){return J.resolve(void 0)},i.DT=function(t){this.ST.Fb(),this.ST.Bb(ou,t),this._o(new Oo(this.ST))},Tt(n,[{key:"QS",get:function(){return this.LT?this.LT.sessionId:""}},{key:"YS",get:function(){return NaN}},{key:"qS",get:function(){return this.AT.Ub}},{key:"pb",get:function(){return this.ST}}]),n}(To);x(),gt(),x(),gt();var Yf=function(t){return t[t.CONFIGURATION_ERROR=1e3]="CONFIGURATION_ERROR",t[t.LICENSE_ERROR=2e3]="LICENSE_ERROR",t[t.LICENSE_INVALID_DOMAIN=2001]="LICENSE_INVALID_DOMAIN",t[t.LICENSE_INVALID_SOURCE=2002]="LICENSE_INVALID_SOURCE",t[t.LICENSE_EXPIRED=2003]="LICENSE_EXPIRED",t[t.LICENSE_INVALID_FEATURE=2004]="LICENSE_INVALID_FEATURE",t[t.SOURCE_INVALID=3e3]="SOURCE_INVALID",t[t.SOURCE_NOT_SUPPORTED=3001]="SOURCE_NOT_SUPPORTED",t[t.MANIFEST_LOAD_ERROR=4e3]="MANIFEST_LOAD_ERROR",t[t.MANIFEST_CORS_ERROR=4001]="MANIFEST_CORS_ERROR",t[t.MANIFEST_PARSE_ERROR=4002]="MANIFEST_PARSE_ERROR",t[t.MEDIA_NOT_SUPPORTED=5e3]="MEDIA_NOT_SUPPORTED",t[t.MEDIA_LOAD_ERROR=5001]="MEDIA_LOAD_ERROR",t[t.MEDIA_DECODE_ERROR=5002]="MEDIA_DECODE_ERROR",t[t.MEDIA_AVPLAYER_ERROR=5003]="MEDIA_AVPLAYER_ERROR",t[t.MEDIA_ABORTED=5004]="MEDIA_ABORTED",t[t.NETWORK_ERROR=6e3]="NETWORK_ERROR",t[t.NETWORK_TIMEOUT=6001]="NETWORK_TIMEOUT",t[t.CONTENT_PROTECTION_ERROR=7e3]="CONTENT_PROTECTION_ERROR",t[t.CONTENT_PROTECTION_NOT_SUPPORTED=7001]="CONTENT_PROTECTION_NOT_SUPPORTED",t[t.CONTENT_PROTECTION_CONFIGURATION_MISSING=7002]="CONTENT_PROTECTION_CONFIGURATION_MISSING",t[t.CONTENT_PROTECTION_CONFIGURATION_INVALID=7003]="CONTENT_PROTECTION_CONFIGURATION_INVALID",t[t.CONTENT_PROTECTION_INITIALIZATION_INVALID=7004]="CONTENT_PROTECTION_INITIALIZATION_INVALID",t[t.CONTENT_PROTECTION_CERTIFICATE_ERROR=7005]="CONTENT_PROTECTION_CERTIFICATE_ERROR",t[t.CONTENT_PROTECTION_CERTIFICATE_INVALID=7006]="CONTENT_PROTECTION_CERTIFICATE_INVALID",t[t.CONTENT_PROTECTION_LICENSE_ERROR=7007]="CONTENT_PROTECTION_LICENSE_ERROR",t[t.CONTENT_PROTECTION_LICENSE_INVALID=7008]="CONTENT_PROTECTION_LICENSE_INVALID",t[t.CONTENT_PROTECTION_KEY_EXPIRED=7009]="CONTENT_PROTECTION_KEY_EXPIRED",t[t.CONTENT_PROTECTION_KEY_MISSING=7010]="CONTENT_PROTECTION_KEY_MISSING",t[t.CONTENT_PROTECTION_OUTPUT_RESTRICTED=7011]="CONTENT_PROTECTION_OUTPUT_RESTRICTED",t[t.CONTENT_PROTECTION_INTERNAL_ERROR=7012]="CONTENT_PROTECTION_INTERNAL_ERROR",t[t.SUBTITLE_LOAD_ERROR=8e3]="SUBTITLE_LOAD_ERROR",t[t.SUBTITLE_CORS_ERROR=8001]="SUBTITLE_CORS_ERROR",t[t.SUBTITLE_PARSE_ERROR=8002]="SUBTITLE_PARSE_ERROR",t[t.VR_PLATFORM_UNSUPPORTED=9e3]="VR_PLATFORM_UNSUPPORTED",t[t.VR_PRESENTATION_ERROR=9001]="VR_PRESENTATION_ERROR",t[t.AD_ERROR=1e4]="AD_ERROR",t[t.AD_BLOCKER_DETECTED=10001]="AD_BLOCKER_DETECTED",t[t.FULLSCREEN_ERROR=11e3]="FULLSCREEN_ERROR",t[t.PICTURE_IN_PICTURE_ERROR=11001]="PICTURE_IN_PICTURE_ERROR",t[t.CACHE_SOURCE_ERROR=12e3]="CACHE_SOURCE_ERROR",t[t.CACHE_CONTENT_PROTECTION_ERROR=12001]="CACHE_CONTENT_PROTECTION_ERROR",t[t.THEO_LIVE_UNKNOWN_ERROR=13e3]="THEO_LIVE_UNKNOWN_ERROR",t[t.THEO_LIVE_CHANNEL_NOT_FOUND=13001]="THEO_LIVE_CHANNEL_NOT_FOUND",t[t.THEO_LIVE_END_OF_DEMO=13002]="THEO_LIVE_END_OF_DEMO",t[t.THEO_LIVE_ANALYTICS_ERROR=13003]="THEO_LIVE_ANALYTICS_ERROR",t}({}),Kf=function(t){return t[t.CONFIGURATION=1]="CONFIGURATION",t[t.LICENSE=2]="LICENSE",t[t.SOURCE=3]="SOURCE",t[t.MANIFEST=4]="MANIFEST",t[t.MEDIA=5]="MEDIA",t[t.NETWORK=6]="NETWORK",t[t.CONTENT_PROTECTION=7]="CONTENT_PROTECTION",t[t.SUBTITLE=8]="SUBTITLE",t[t.VR=9]="VR",t[t.AD=10]="AD",t[t.FULLSCREEN=11]="FULLSCREEN",t[t.CACHE=12]="CACHE",t[t.THEOLIVE=13]="THEOLIVE",t}({});!function(t){t.fromCode=function(n){var i=y.floor(n/1e3);if(i in t)return i;throw new m("Invalid error code: "+n)}}(Kf||(Kf={}));var Gf=function(t){function n(n,i,e){var r;return(r=t.call(this,i,e)||this).code=n,r}return _t(n,t),Tt(n,[{key:"name",get:function(){return"THEOplayerError"}},{key:"category",get:function(){return Kf.fromCode(this.code)}}]),n}(Dr),$f=function(){function t(t,n,i){this.FT=t,this.cT=n,this.kd=i,this.OT=void 0;var e=xf(i)||"video/mp4";this.IT=Af(e)}var n=t.prototype;return n.getInternalMediaKeys=function(){return this.FT},n.aT=function(t){var n=this;return gr((function(){return mr(this,(function(t){if(!n.OT)throw new Gf(Yf.CONTENT_PROTECTION_CERTIFICATE_ERROR,"No valid certificate was provided.");return[2,new jf(n.FT,n.IT,n.OT)]}))}))()},n.lT=function(t){return this.OT=Zo(t),J.resolve(!0)},n.kn=function(t){return t.webkitSetMediaKeys(this.FT),J.resolve()},n.dT=function(t){return t.webkitSetMediaKeys(null),J.resolve()},n.nr=function(){return J.resolve()},t}(),Zf=function(){function t(t,n){this.nT=t,this.MT=n}var n=t.prototype;return n.gT=function(){return this.MT},n._T=function(){var t=new h.WebKitMediaKeys(this.nT);return J.resolve(new $f(t,this.nT,this.MT))},Tt(t,[{key:"cT",get:function(){return this.nT}}]),t}(),Jf=function(){function t(){}return t.prototype.Dw=function(t,n){try{return J.resolve(function(t,n){if(t!==to)throw new m(t+" is not supported with webkit-prefixed Encrypted Media Extensions.");if(!Qf())throw new m("Unsupported key system "+t);for(var i=0;i<n.length;i++){var e=n[i],r=Df(tc,Ro,t,e);if(r)return new Zf(t,r)}throw new m("Unsupported key system configuration for "+t)}(t,n))}catch(t){return J.reject(t)}},t.yT=function(){return Qf()},t}();function Qf(){return void 0!==h.WebKitMediaKeys&&"function"==typeof h.WebKitMediaKeys.isTypeSupported}function tc(t,n){return h.WebKitMediaKeys.isTypeSupported(t,n)}x(),gt();var nc=function(){function t(t){this.UT=t}return t.prototype.Dw=function(t,n){var i=this;return gr((function(){var e,r,o;return mr(this,(function(u){switch(u.label){case 0:e=0,r=i.UT,u.label=1;case 1:if(!(e<r.length))return[3,6];o=r[e],u.label=2;case 2:return u.trys.push([2,4,,5]),[4,o.Dw(t,n)];case 3:return[2,u.sent()];case 4:return u.sent(),[3,5];case 5:return e++,[3,1];case 6:throw new m("Unsupported key system configuration for "+t)}}))}))()},t}();x(),gt(),x(),gt(),x(),gt(),x(),gt(),x(),gt();var ic=function(){function t(t){var n=this;this.HT=[],this.ZT=void 0,this.GT=new Rr,this.XT=function(){return 0===n.HT.length?n.qT?ec(n.qT,n.GT.Uw).then(n.YT,n.YT):n.YT():n.HT.shift()().then(n.XT)},this.YT=function(){if(0!==n.HT.length)return n.XT();n.ZT=void 0},this.qT=t}var n=t.prototype;return n.Qo=function(t,n){var i=this;return new J((function(e){var r=Rr.$w([i.GT.Uw,n]),o=function(){r.Xw()};i.HT.push((function(){var n=ec(t,r.Uw);return e(n),n.then(o,o)})),i.ZT||(i.ZT=i.XT())}))},n.jw=function(){return this.zT(!0)},n.yn=function(){return this.qT=void 0,this.zT(!1)},n.zT=function(t){var n=this.ZT;return this.GT.jw(),t&&(this.GT=new Rr),J.resolve(n)},t}();function ec(t,n){return new J((function(i){return i(t(n))}))}var rc=new ic,oc=function(t){function n(n){var i;return(i=t.call(this)||this).nT=n,i.kT=void 0,i.WT=void 0,i.$b=!1,i.hk=void 0,i.$T=void 0,i.AT=new su,i.rk="",i.ek=new su,i.nk=new uu,i}_t(n,t);var i=n.prototype;return i.KT=function(){this.WT&&(this.DT("usable"),this.WT.Vb(void 0),this.WT=void 0)},i.jT=function(t){var n=new hu("Unknown CDM error",t.errorCode,t.systemCode);this.WT?(this.WT.Wb(n),this.WT=void 0):this.kT?(this.kT.Wb(n),this.kT=void 0):n.Gb===WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT?this.DT("output-restricted"):1===n.Hb?this.DT("expired"):this.DT("internal-error")},i.QT=function(t){0!==t.message.byteLength?(this.kT&&(this.kT.Vb(void 0),this.kT=void 0),this._o(new No(this,"license-request",fu(this.nT,Jo(t.message).buffer),t.defaultURL||void 0))):this.kT&&(this.kT.Wb("Empty key message"),this.kT=void 0)},i.JT=function(t){this.$T||(this.$T=t,this.ek.Vb(t))},i.Ws=function(){var t=this;return gr((function(){return mr(this,(function(n){return t.throwIfClosed(),t.WT&&(t.WT.Wb(void 0),t.WT=void 0),t.$b=!0,t.AT.Vb(void 0),[2]}))}))()},i.tT=function(t,n){var i=this;return gr((function(){var t;return mr(this,(function(e){switch(e.label){case 0:return i.throwIfClosed(),i.kT=new su,i.hk=Zo(n),(t=i.$T)?[3,2]:[4,i.ek.Ub];case 1:t=e.sent(),e.label=2;case 2:return t.webkitGenerateKeyRequest(i.nT,i.hk),[4,i.kT.Ub];case 3:return e.sent(),[2]}}))}))()},i.$n=function(t){var n=this;return gr((function(){return mr(this,(function(t){return n.throwIfClosed(),[2,!1]}))}))()},i.eT=function(){var t=this;return gr((function(){return mr(this,(function(n){return t.throwIfClosed(),[2]}))}))()},i.ir=function(t){var n=this;return gr((function(){return mr(this,(function(i){switch(i.label){case 0:return n.throwIfClosed(),n.WT=new su,Ut.Ng||Ut.Ig?[2,rc.Qo(gr((function(){return mr(this,(function(i){switch(i.label){case 0:return[4,n.doUpdate(t)];case 1:return i.sent(),[2]}}))})))]:[4,n.doUpdate(t)];case 1:return i.sent(),[2]}}))}))()},i.doUpdate=function(t){var n=this;return gr((function(){var i;return mr(this,(function(e){switch(e.label){case 0:return void 0===n.WT?[2]:(i=n.$T)?[3,2]:[4,n.ek.Ub];case 1:i=e.sent(),e.label=2;case 2:return i.webkitAddKey(n.nT,Zo(t),n.hk,n.QS),[4,n.WT.Ub];case 3:return e.sent(),Ut.Ig?[4,_o(500)]:[3,5];case 4:e.sent(),e.label=5;case 5:return[2]}}))}))()},i.throwIfClosed=function(){if(this.$b)throw new m("Already closing or closed.")},i.DT=function(t){this.nk.Fb(),this.nk.Bb(ou,t),this._o(new Oo(this.nk))},i.ck=function(){var t=this;return gr((function(){var n,i;return mr(this,(function(e){switch(e.label){case 0:return(i=t.$T)?[3,2]:[4,t.ek.Ub];case 1:i=e.sent(),e.label=2;case 2:if(!(n=i).webkitCancelKeyRequest)return[3,7];e.label=3;case 3:return e.trys.push([3,4,5,7]),n.webkitCancelKeyRequest(t.nT,t.rk),[3,7];case 4:return e.sent(),[3,7];case 5:return[4,_o(500)];case 6:return e.sent(),[7];case 7:return[2]}}))}))()},Tt(n,[{key:"pb",get:function(){return this.nk}},{key:"QS",get:function(){return this.rk},set:function(t){this.rk=t}},{key:"qS",get:function(){return this.AT.Ub}},{key:"YS",get:function(){return NaN}}]),n}(To),uc=function(){function t(t,n){var i=this;this.cT=t,this.kd=n,this.$T=void 0,this.fk=Wr(),this._k=[],this.PT=function(t){var n=i.vk(t.sessionId);n&&n.KT()},this.lk=function(t){var n=i.vk(t.sessionId);n&&n.jT(t)},this.dk=function(t){var n=i.vk(t.sessionId);n&&n.QT(t)}}var n=t.prototype;return n.kn=function(t){return this.$T=t,this.$T.addEventListener("webkitkeyadded",this.PT),this.$T.addEventListener("webkitkeyerror",this.lk),this.$T.addEventListener("webkitkeymessage",this.dk),this.fk.forEach((function(n,i){return n.JT(t)})),this._k.forEach((function(n){return n.JT(t)})),J.resolve()},n.dT=function(t){return t.removeEventListener("webkitkeyadded",this.PT),t.removeEventListener("webkitkeyerror",this.lk),t.removeEventListener("webkitkeymessage",this.dk),this.$T=void 0,J.resolve()},n.nr=function(){var t=this;return gr((function(){var n,i;return mr(this,(function(e){switch(e.label){case 0:n=t.fk.entries(),i=n.next(),e.label=1;case 1:return i.done?[3,3]:[4,i.value[1].ck()];case 2:return e.sent(),i=n.next(),[3,1];case 3:return t.fk.clear(),[2]}}))}))()},n.aT=function(t,n,i){var e=this;return gr((function(){var t;return mr(this,(function(n){return t=new oc(e.cT),e.$T&&t.JT(e.$T),e._k.push(t),[2,t]}))}))()},n.lT=function(t){return J.resolve(!1)},n.vk=function(t){if(t){var n=this.fk.get(t);return n||((n=this._k.shift())?(n.QS=t,this.fk.set(t,n),n):void 0)}},t}(),sc=function(){function t(t,n){this.cT=t,this.gk=n}var n=t.prototype;return n._T=function(){return J.resolve(new uc(this.cT,this.gk))},n.gT=function(){return this.gk},t}(),fc=function(){function t(){}return t.prototype.Dw=function(t,n){try{return J.resolve(function(t,n){if(!fc.yT())throw new m("Unsupported key system "+t);for(var i=0;i<n.length;i++){var e=n[i],r=Df(cc,Io,t,e);if(r)return new sc(t,r)}throw new m("Unsupported key system configuration for "+t)}(t,n))}catch(t){return J.reject(t)}},t.yT=function(){return"undefined"!=typeof HTMLMediaElement&&void 0!==HTMLMediaElement.prototype.webkitGenerateKeyRequest&&void 0!==HTMLMediaElement.prototype.webkitAddKey&&void 0!==HTMLMediaElement.prototype.webkitCancelKeyRequest},t}();function cc(t,n){var i=$t();return!(!i||!i.canPlayType||""===i.canPlayType(n,t))}x(),gt();var hc,ac=function(){function t(){}return t.prototype.Dw=function(t,n){return t===Gr||t===jr?J.resolve(void 0):J.reject(new g("DRM configuration not supported"))},t}();function vc(){return hc||(hc=function(){var t=[];Jf.yT()&&t.push(new Jf);Ff.yT()&&t.push(new Ff);Vf.yT()&&t.push(new Vf);fc.yT()&&t.push(new fc);Ut.Lg&&t.push(new ac);return new nc(t)}()),hc}x(),gt(),x(),gt();var dc=function(){function t(){this.pk=Wr()}var n=t.prototype;return n.Fb=function(t){this.pk.delete(t)},n.wk=function(){this.pk.clear()},n.Lb=function(t){return this.pk.get(t)},n.Bb=function(t,n){this.pk.set(t,n)},t}(),lc=function(){function t(){}return t.yk=function(){return t.Vm||(t.Vm=wc.yT()?new wc:new dc),t.Vm},t.Fb=function(n){t.yk().Fb(n)},t.wk=function(){t.yk().wk()},t.Lb=function(n){return t.yk().Lb(n)},t.Bb=function(n,i){t.yk().Bb(n,i)},t}();lc.Vm=void 0;var wc=function(t){function n(){return t.apply(this,arguments)||this}_t(n,t);var i=n.prototype;return i.Fb=function(t){self.sessionStorage.removeItem(t)},i.wk=function(){self.sessionStorage.clear()},i.Lb=function(t){var n;return null!=(n=self.sessionStorage.getItem(t))?n:void 0},i.Bb=function(t,n){self.sessionStorage.setItem(t,n)},n.yT=function(){var t="foobar";try{return self.sessionStorage.setItem(t,t),self.sessionStorage.removeItem(t),!0}catch(t){return!1}},n}(lc);x(),gt(),x(),gt();var bc=function(){var t=self.Blob;if(t)try{new t;return function(t){return function(n,i){return new t(n,i)}}(t)}catch(t){}var n=self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder;if(n)return function(t){return function(n,i){var e=new t;if(n)for(var r=0;r<n.length;r++){var o=n[r];e.append(o)}return e.getBlob(i&&i.type||"")}}(n)}();function gc(t,n,i){var e=bc([n],{type:"application/octet-stream"}),r=URL.createObjectURL(e),o=function(t,n){var i=t,e=i.indexOf("?");if(e>=0&&(i=i.substr(0,e)),i=i.substr(i.lastIndexOf("/")+1),n){var r=i.indexOf(".");r<0&&(r=i.length),i=i.substr(0,r)+n+i.substr(r)}return i}(t,i),u=a.createElement("a");u.href=r,u.download=o,a.body.appendChild(u),u.click(),a.body.removeChild(u),URL.revokeObjectURL(r)}x(),gt(),x(),gt(),x(),gt(),x(),gt(),x(),gt(),x(),gt();var mc=function(t,n,i){return i=null!=t?I(P(t)):{},function(t,n,i,e){if(n&&"object"==typeof n||"function"==typeof n)for(var r,o=N(n),u=0,s=o.length;u<s;u++)r=o[u],A.call(t,r)||r===i||R(t,r,{get:function(t){return n[t]}.bind(null,r),enumerable:!(e=O(n,r))||e.enumerable});return t}(!n&&t&&t.__esModule?i:R(i,"default",{value:t,enumerable:!0}),t)}(pt());x(),gt();var pc=t,yc=Xt(pc.ReadableStream)&&Xt(pc.WritableStream)&&Xt(pc.TransformStream)&&qt(pc.ReadableStream.prototype.pipeThrough)&&!Bn.lp,_c=yc?pc.ReadableStream:mc.ReadableStream,Sc=(yc?pc.WritableStream:mc.WritableStream,yc?pc.TransformStream:mc.TransformStream);yc&&pc.ByteLengthQueuingStrategy?pc.ByteLengthQueuingStrategy:mc.ByteLengthQueuingStrategy,yc&&pc.CountQueuingStrategy?pc.CountQueuingStrategy:mc.CountQueuingStrategy;function Tc(t){return function(t){return new _c({start:function(n){for(var i=0;i<t.length;i++){var e=t[i];n.enqueue(e)}n.close()}})}([t])}function Ec(t){return Tc(function(t){return new E(t)}(t))}function kc(t,n){return function(t,n){var i=n,e=t.getReader(),r=new su,o=function(){u();var t=new bo;e.cancel(t).catch(Yt),r.Wb(t)},u=function(){i&&(i.Vw(o),i=void 0)};i&&(i.Fw?o():i.Ww(o));var s=[],f=function(t){return t.done?(u(),J.resolve(s)):(s.push(t.value),J.resolve(e.read()).then(f))};return J.resolve(e.read()).then(f).then((function(t){u(),r.Vb(t)}),(function(t){u(),r.Wb(t)})),r.Ub}(t,n).then((function(t){return eu(t).buffer}))}function Ic(t,n){var i=n,e=new Sc,r=e.readable,o=e.writable,u=o.getWriter(),s=function(){i&&i.jw()};return u.closed.then(s,s),t.then((function(t){return i=void 0,u.releaseLock(),t.pipeTo(o).catch(Yt)}),(function(t){return i=void 0,u.releaseLock(),o.abort(t).catch(Yt)})),r}function Rc(t){return Yo(new E(t))}function Oc(t){return Ko(t).buffer}x(),gt();var Nc="content-type",Pc="text/plain;charset=UTF-8",Ac=function(){function t(){}var n=t.prototype;return n.Ik=function(t){return this.Ck(t).then(JSON.parse)},n.Pk=function(t,n){switch(t){case ar.bk:return this.Dk(n);case ar.Ak:return this.Ik(n);case ar.Sk:return this.Nk();case ar.Tk:return this.Ck(n);default:throw new m}},t}();function Dc(t,n,i){if(t instanceof Ac)return t;if(t instanceof _c)return function(t,n){return new xc({Tw:0,Nk:t,Mk:Cc(n)})}(t,i);var e=Cc(i),r=J.resolve(t).then((function(t){return function(t,n){if(t){if("string"==typeof t)return{Tw:ar.Tk,Lk:t,Mk:n||Pc};if(t instanceof ArrayBuffer||nu(t))return{Tw:ar.bk,Lk:Wc(t),Mk:n};if(function(t){return Vt(t)&&t.constructor&&t.constructor===p}(t)||Ht(t))return{Tw:ar.Ak,Lk:t,Mk:n};throw new m("Unsupported BodyInit type")}return{Tw:ar.Tk,Lk:null,Mk:n}}(t,e)}));return new xc({Tw:1,Ub:r,Bk:n})}function Cc(t){return(t.get(Nc)||"").toLowerCase()}var xc=function(t){function n(n){var i;return(i=t.call(this)||this).Fk=!1,i.Gk=new su,i.Gk.Ub.catch(Yt),i.Xk(n),i}_t(n,t);var i=n.prototype;return i.Uk=function(){return this.Gk.Ub},i.Ck=function(t){return this.Hk(Bc,t)},i.Ik=function(t){return this.Hk(Lc,t)},i.Dk=function(t){return this.Hk(Fc,t)},i.Nk=function(){return this.Zk(function(t){return 0===t.Tw?t.Nk:Ic(t.Ub.then(zc).then(Ec),t.Bk)}(this.Wk))},i.Hk=function(t,n){if(this.Fk)return J.reject(new m("Already used"));this.Fk=!0;var i=t(this.Wk,n);return this.Gk.Qw(i.then(Yt)),i},i.Zk=function(t){if(this.Fk)throw new m("Already used");if(t.locked)throw new m("Body stream is locked");this.Fk=!0;var n=new Sc,i=J.resolve(t.pipeTo(n.writable));return this.Gk.Qw(i),n.readable},i.Xk=function(t){this.Wk=t,1===t.Tw&&t.Ub.catch(Yt)},i.zk=function(){if(this.Fk)throw new m("Already used");var t=function(t){if(0===t.Tw){var n=vr(t.Nk.tee(),2),i=n[0],e=n[1];return[{Tw:t.Tw,Nk:i,Mk:t.Mk},{Tw:t.Tw,Nk:e,Mk:t.Mk}]}var r=vr(t.Bk.Jw(),2),o=r[0],u=r[1];return[{Tw:t.Tw,Ub:t.Ub,Bk:o},{Tw:t.Tw,Ub:t.Ub,Bk:u}]}(this.Wk),i=t[0],e=t[1];return this.Xk(i),new n(e)},Tt(n,[{key:"Ok",get:function(){return this.Fk}},{key:"Vk",get:function(){return 0===this.Wk.Tw}}]),n}(Ac);function Bc(t,n){return 0===t.Tw?kc(t.Nk,n).then(Rc):(n&&t.Bk.Qw(n),po(t.Ub.then(Mc),t.Bk))}function Mc(t){switch(t.Tw){case ar.Tk:return J.resolve(t.Lk||"");case ar.bk:return J.resolve(t.Lk).then(Rc);case ar.Ak:return J.resolve(t.Lk).then(JSON.stringify)}}function Lc(t,n){return 0===t.Tw?Bc(t,n).then(JSON.parse):(n&&t.Bk.Qw(n),po(t.Ub.then(Uc),t.Bk))}function Uc(t){return t.Tw===ar.Ak?J.resolve(t.Lk):Mc(t).then(JSON.parse)}function Fc(t,n){return 0===t.Tw?kc(t.Nk,n):(n&&t.Bk.Qw(n),po(t.Ub.then(zc),t.Bk))}function zc(t){switch(t.Tw){case ar.bk:return J.resolve(t.Lk);case ar.Tk:case ar.Ak:return Mc(t).then(Oc)}}function Wc(t){return t instanceof ArrayBuffer?t:Jo($o(t)).buffer}var Hc=function(t){function n(n){var i;return(i=t.call(this)||this).qk=n,i}_t(n,t);var i=n.prototype;return i.Uk=function(){return this.qk.Uk()},i.Ck=function(t){return this.qk.Ck(t)},i.Ik=function(t){return this.qk.Ik(t)},i.Dk=function(t){return this.qk.Dk(t)},i.Nk=function(t){return this.qk.Nk(t)},i.zk=function(){return this.qk.zk()},Tt(n,[{key:"Ok",get:function(){return this.qk.Ok}},{key:"Vk",get:function(){return this.qk.Vk}}]),n}(Ac);var Vc=function(t){function n(n,i){var e,r,o,u,s,f;i?(r=i.Jk,o=i.jk,u=i.Yk,s=i.$k,f=i.tE):(r=[],o=ar.Tk,u=200,s="OK",f=!1);var c=n.Qk,h=new dr(n.Jk||r),a=n.jk||o,v=n.eE||(i&&i.Qk===c?i.eE:c.Xu),d=i?i.qk:null,l=Dc(void 0!==n.Kk?n.Kk:d,n.Bk||new Rr,h);return(e=t.call(this,l)||this).Jk=h,e.Qk=c,e.eE=v,e.jk=a,e.Yk=void 0!==n.Yk?n.Yk:u,e.$k=void 0!==n.$k?String(n.$k):s,e.tE=n.tE||f,e}_t(n,t);var i=n.prototype;return i.Kk=function(t){return this.Pk(this.jk,t)},i.Ib=function(){return new n({Kk:this.zk(),Qk:this.Qk},this)},n}(Hc),qc=function(){function t(){}var n=t.prototype;return n.Qk=function(t){var n=function(t){return new Vc({Kk:null,Jk:{},Qk:t,eE:t.Xu,jk:t.jk,Yk:0,$k:ko.Zy})}(new Pr(t));return J.resolve(n)},n.NE=function(t){},n.yn=function(){},t}();var Xc=function(){function t(t,n){void 0===n&&(n=!0),this.FE=t,this.WE=n}var n=t.prototype;return n.Qk=function(t){var n=this.OE(t);return this.FE.Qk(n)},n.NE=function(t){return this.FE.NE(this.VE(t))},n.OE=function(n){var i=new Pr(n);if(!this.WE){var e=t.UE(i.Xu);i=new Pr({Xu:e},i)}return i},n.VE=function(n){var i=n.Xu;return this.WE||(i=t.UE(i)),{Xu:i,Lk:n.Lk}},n.yn=function(){this.FE.yn()},t.UE=function(t){return Wt.uw&&uo(t,"http://")?t.replace(":","s:"):t},Tt(t,null,[{key:"LE",get:function(){return t.BE||(t.BE=new t(new qc)),t.BE}}]),t}();Xc.BE=void 0,x(),gt(),x(),gt(),x(),gt(),x(),gt();var jc=function(t){function n(n,i,e){var r;return(r=t.call(this,n.Qk,null!=e?e:function(t){return"Error while loading "+t.Qk.Xu+", status code "+t.Yk}(n),i)||this).qE=n,r}return _t(n,t),Tt(n,[{key:"name",get:function(){return Cr.HE}},{key:"zE",get:function(){return this.qE}}]),n}(xr);x(),gt();var Yc=function(t){function n(n,i){return t.call(this,n,function(t){return"Request for "+t.Xu+" timed out after "+t.SE+" seconds."}(n),i)||this}return _t(n,t),Tt(n,[{key:"name",get:function(){return Cr.ZE}}]),n}(xr);x(),gt();var Kc=self.fetch,Gc=self.Request,$c=self.Response,Zc=self.Headers,Jc=self.ReadableStream,Qc=self.AbortSignal,th=self.AbortController,nh=Kt((function(){try{return qt(Kc)&&Xt(Gc)&&Xt($c)&&Xt(Zc)&&"forEach"in Zc.prototype&&ur()}catch(t){return!1}})),ih=["http:","https:"];var eh=Kt((function(){try{return nh()&&Xt(Qc)&&Xt(th)&&"signal"in Gc.prototype}catch(t){return!1}})),rh=Kt((function(){try{return nh()&&Xt(Jc)&&"body"in $c.prototype&&!Ut.hg}catch(t){return!1}}));function oh(t,n){var i,e=t.Jk.has("content-length")?Number(t.Jk.get("content-length")):void 0;return i=t.Vk?function(t,n,i){return t.pipeThrough(new Sc(new uh(n,i)))}(t.Nk(),n,e):function(t,n,i){return sh.apply(this,arguments)}(t.Dk(),n,e),new Vc({Kk:i,Qk:t.Qk},t)}x(),gt(),x(),gt();var uh=function(){function t(t,n){this.KE=t,this.jE=n,this.YE=0}var n=t.prototype;return n.transform=function(t,n){this.YE+=t.byteLength,this.KE(this.YE,this.jE),n.enqueue(t)},n.flush=function(t){var n;this.KE(this.YE,null!=(n=this.jE)?n:this.YE)},t}();function sh(){return sh=gr((function(t,n,i){var e,r;return mr(this,(function(o){switch(o.label){case 0:return[4,J.resolve()];case 1:return o.sent(),n(0,i),[4,t];case 2:return e=o.sent(),r=e.byteLength,n(r,null!=i?i:r),[2,e]}}))})),sh.apply(this,arguments)}var fh=function(){function t(t){this.GT=new Rr,this.qE=void 0,this.JE=0,this.$E=!1,this.XE=t,this.GT.Qw(t.Uw),this.zE=this.QE()}var n=t.prototype;return n.QE=function(){var t=this;return gr((function(){var n,i,e,r,o,u,s,f,c;return mr(this,(function(h){switch(h.label){case 0:(n=t.XE).SE&&(t.JE=d((function(){t.$E=!0,t.GT.jw()}),n.SE),t.GT.Uw.qw((function(){l(t.JE)})));try{i=Kc(n.Xu,{method:n.AE,headers:n.Jk.Ek(),body:n.Lk,credentials:n.xE?"include":"same-origin",signal:ah(t.GT.Uw),mode:n.CE,keepalive:n.DE})}catch(t){throw new Br(n,t)}h.label=1;case 1:return h.trys.push([1,3,,4]),[4,i];case 2:return e=h.sent(),[3,4];case 3:throw r=h.sent(),go(o=t.tx(r))&&t.GT.jw(),o;case 4:if(u=e.url||n.Xu,s=0===e.status&&"file:"===function(t){return Wt.Ih(t).protocol}(u)?200:e.status,f=new ch(t,e,t.GT),!function(t){return t.Yk>=200&&t.Yk<=299||304===t.Yk}(c=new Vc({Kk:f,Qk:n,jk:n.jk,Jk:vh(e.headers),Yk:s,$k:e.statusText,eE:u})))throw new jc(c);return n.RE&&(c=oh(c,n.RE)),[2,c]}}))}))()},n.tx=function(t){return function(t){return t instanceof xr}(t)?t:go(t)?this.$E?new Yc(this.XE):new bo(t.message,t):this.qE?new jc(this.qE,t):new Br(this.XE,t)},t}(),ch=function(t){function n(n,i,e){var r;return(r=t.call(this)||this).Gk=new su,r.sx=n,r.ix=i,r.GT=e,r.Gk.Ub.catch(Yt),r}_t(n,t);var i=n.prototype;return i.Uk=function(){return this.Gk.Ub},i.Ck=function(t){return this.Hk(this.ix.text(),t)},i.Dk=function(t){return this.Hk(this.ix.arrayBuffer(),t)},i.Nk=function(){var t=this.ix.body;return t?this.Zk(t):Ic(this.Dk().then(Ec),this.GT)},i.zk=function(){var t=this.ix.clone(),i=vr(this.GT.Jw(),2),e=i[0],r=i[1];return this.GT=e,new n(this.sx,t,r)},i.Hk=function(t,n){var i=this;n&&this.GT.Qw(n);var e=mo(J.resolve(t),this.GT.Uw).catch((function(t){throw i.sx.tx(t)}));return e=po(e,this.GT),this.Gk.Qw(e.then(Yt)),e},i.Zk=function(t){var n=this;return new _c(new dh(t,(function(t){return n.sx.tx(t)}),this.GT,this.Gk),{highWaterMark:0})},Tt(n,[{key:"Ok",get:function(){return this.ix.bodyUsed}},{key:"Vk",get:function(){return zt(this.ix.body)}}]),n}(Ac),hh="abort";function ah(t){if(eh()){var n=new th;if(t.Fw)n.abort();else if(!t.Hw){var i=function(){e(),n.abort()},e=function(){n.signal.removeEventListener(hh,i),t.Vw(i),t.Yw(e)};n.signal.addEventListener(hh,i),t.Ww(i),t.qw(e)}return n.signal}}function vh(t){if(function(t){return Vt(t)&&"function"==typeof t.forEach}(t)){var n=new dr;return t.forEach((function(t,i){Array.isArray(t)&&2===t.length?n.append(t[0],t[1]):n.append(i,t)})),n}return new dr(t)}var dh=function(){function t(t,n,i,e){this.nx=t,this.ox=n,this.GT=i,this.Gk=e}var n=t.prototype;return n.start=function(t){this.Od=this.nx.getReader()},n.pull=function(t){var n=this;return gr((function(){var i,e,r;return mr(this,(function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),[4,mo(n.Od.read(),n.GT.Uw)];case 1:return i=o.sent(),[3,3];case 2:return e=o.sent(),r=n.ox(e),n.Gk.Wb(r),n.GT.jw(),n.Od.cancel(r).catch(Yt),t.error(r),[2];case 3:return i.done?(n.Gk.Vb(),n.GT.jw(),t.close()):t.enqueue(i.value),[2]}}))}))()},n.cancel=function(t){return this.GT.jw(),this.Gk.Wb(t),this.Od.cancel(t)},t}();x(),gt();var lh=function(){function t(t){var n=this;this.GT=new Rr,this.qE=void 0,this.hx=new su,this.bx=!1,this.yx=function(){var t;n.lx(),null==(t=n.ux)||t.abort()},this.XE=t,this.GT.Qw(t.Uw),this.ux=new k,this.QE()}var n=t.prototype;return n.QE=function(){var t=this,n=this.ux,i=this.XE;if(i.Uw.Fw)return this.lx();n.onreadystatechange=function(){return t._x()},n.onprogress=function(n){return t.KE(n)},n.onload=function(){return t.vx()},n.onloadend=function(){return t.gx()},n.onerror=function(){return t.mx()},n.ontimeout=function(){return t.wx()},n.onabort=function(){return t.lx()},n.open(i.AE,i.Xu,!0),n.withCredentials=Boolean(i.xE),"responseType"in n&&i.jk&&(i.jk===ar.Tk?n.responseType="text":n.responseType="arraybuffer"),i.Jk.forEach((function(t,i){n.setRequestHeader(i,t)})),i.SE&&(n.timeout=i.SE),this.GT.Uw.Ww(this.yx);var e=i.Lk;e?n.send(e):n.send()},n._x=function(){var t=this.ux;void 0!==t&&t.readyState>=2&&!this.bx&&(this.bx=!0,this.Ax())},n.Ax=function(){var t,n,i=this.ux,e=function(t){var n=new dr,i=t.replace(/\r?\n[\t ]+/g," ");return i.split(/\r?\n/).forEach((function(t){var i=t.split(":"),e=i.shift().trim();if(e){var r=i.join(":").trim();n.append(e,r)}})),n}(i.getAllResponseHeaders()||""),r=this.XE;this.Sx=new su,this.qE=new Vc({Qk:r,jk:r.jk,Kk:this.Sx.Ub,Yk:i.status,$k:i.statusText,Jk:e,eE:null!=(n=i.responseURL)?n:e.get("X-Request-URL")}),null==(t=this.hx)||t.Vb(this.qE)},n.vx=function(){var t,n=this.ux;if(void 0!==n){var i=n.response;if(!zt(i)){var e=this.XE.jk;i=e===ar.Tk?n.responseText:e===ar.bk?new ArrayBuffer(0):{}}null==(t=this.Sx)||t.Vb(i)}},n.gx=function(){this.yn()},n.KE=function(t){void 0!==this.ux&&(null==this.XE.RE||this.XE.RE.call(this.XE,t.loaded,t.lengthComputable?t.total:void 0))},n.mx=function(){var t=new g("Network request failed");this.qE?this.Ss(new jc(this.qE,t)):this.Ss(new Br(this.XE,t))},n.wx=function(){this.Ss(new Yc(this.XE))},n.lx=function(){this.Ss(new bo),this.yn()},n.Ss=function(t){var n,i;null==(n=null!=(i=this.Sx)?i:this.hx)||n.Wb(t)},n.yn=function(){this.ux=void 0,this.qE=void 0,this.hx=void 0,this.Sx=void 0,this.GT.Xw()},Tt(t,[{key:"zE",get:function(){return this.hx.Ub}}]),t}();x(),gt();var wh=function(){function t(){}var n=t.prototype;return n.Qk=function(t){return function(t){if(!nh()||!function(t){try{return ih.indexOf(new self.URL(t,self.location.href).protocol)>=0}catch(t){return!1}}(t.Xu))return!1;if(!rh()&&t.RE)return!1;if(!t.PE&&t.AE!==Or.POST){if(Ut.Ng&&Ut.wg<=68)return!1;if(Ut.Ig)return!1}return!0}(t)?new fh(t).zE:new lh(t).zE},n.NE=function(t){var n=h.navigator;if(n&&n.sendBeacon)n.sendBeacon(t.Xu,bc([t.Lk],{type:t.Mk}));else{var i=t.Mk?{"Content-type":t.Mk}:void 0;this.Qk(new Pr({AE:Or.POST,Xu:t.Xu,Lk:t.Lk,Jk:i,CE:Nr.wE})).then((function(t){!function(t){t.then(Yt,Yt)}(t.Dk())}),Yt)}},n.yn=function(){},t}();x(),gt(),x(),gt();var bh=function(t){return t[t.Tx=1]="Tx",t[t.kx=2]="kx",t[t.Tk=3]="Tk",t[t.Ex=4]="Ex",t[t.xx=9]="xx",t}({});var gh=function(){function t(){}return t.prototype.Ix=function(t){var n,i=new DOMParser;try{n=i.parseFromString(t,"text/xml")}catch(t){throw new Lr(t)}if(!n||n.getElementsByTagName("parsererror").length>0)throw new Lr;return new Eh(n)},t}(),mh=function(){function t(t){this.Px=t}var n=t.prototype;return n.Lx=function(t){return this.Px.isEqualNode(t.Px)},n.Bx=function(n){return new t(this.Px.cloneNode(n))},Tt(t,[{key:"Rx",get:function(){return bh.kx}},{key:"Cx",get:function(){var t;return null!=(t=this.Px.localName)?t:Rh(this.Px.nodeName)}},{key:"l",get:function(){return this.Px.nodeName}},{key:"Dx",get:function(){var t;return null!=(t=this.Px.namespaceURI)?t:void 0}},{key:"Nx",get:function(){var t;return null!=(t=this.Px.prefix)?t:void 0}},{key:"Mx",get:function(){return this.Px.nodeValue}}]),t}(),ph=function(){function t(t){this.Fx=void 0,this.Vx=t}var n=t.prototype;return n.Wx=function(t){return this.Ox.filter((function(n){return kh(n)&&n.Ux===t}))},n.Gx=function(t,n){return this.Ox.filter((function(i){return kh(i)&&i.Cx===n&&i.Dx===t}))},n.Zx=function(t){this.Vx.appendChild(t.Hx),this.Fx&&this.Fx.push(t)},n.Lx=function(t){return this.Vx.isEqualNode(t.Hx)},Tt(t,[{key:"Ox",get:function(){return void 0===this.Fx&&(this.Fx=function(t){for(var n=[],i=0;i<t.length;i++){var e=Ih(t.item(i));e&&n.push(e)}return n}(this.Vx.childNodes)),this.Fx}},{key:"m",get:function(){return this.Ox.filter(kh)}},{key:"Hx",get:function(){return this.Vx}}]),t}(),yh=function(t){function n(n){return t.call(this,n)||this}_t(n,t);var i=n.prototype;return i.qx=function(t){if(this.Vx.hasAttribute(t))return this.Vx.getAttribute(t)},i.Yx=function(t,n){if(this.Vx.hasAttributeNS(t,n))return this.Vx.getAttributeNS(t,n)},i.Kx=function(t){this.Vx.removeAttribute(t)},i.jx=function(t,n){this.Vx.removeAttributeNS(t,n)},i.Qx=function(t,n){this.Vx.setAttribute(t,n)},i.Jx=function(t,n,i){this.Vx.setAttributeNS(t,n,i)},i.Bx=function(t){return new n(this.Vx.cloneNode(t))},Tt(n,[{key:"Rx",get:function(){return bh.Tx}},{key:"Cx",get:function(){var t;return null!=(t=this.Vx.localName)?t:Rh(this.Vx.nodeName)}},{key:"Dx",get:function(){var t;return null!=(t=this.Vx.namespaceURI)?t:void 0}},{key:"Nx",get:function(){var t;return null!=(t=this.Vx.prefix)?t:void 0}},{key:"Ux",get:function(){return this.Vx.nodeName}},{key:"Xx",get:function(){return function(t){for(var n=[],i=0;i<t.length;i++)n.push(new mh(t.item(i)));return n}(this.Vx.attributes)}},{key:"zx",get:function(){return this.Vx.textContent}}]),n}(ph),_h=function(){function t(t){this.Vx=t}return t.prototype.Lx=function(t){return this.Kk===t.Kk},Tt(t,[{key:"Kk",get:function(){return this.Vx.nodeValue}},{key:"Hx",get:function(){return this.Vx}}]),t}(),Sh=function(t){function n(n){return t.call(this,n)||this}return _t(n,t),n.prototype.Bx=function(t){return new n(this.Vx.cloneNode(t))},Tt(n,[{key:"Rx",get:function(){return bh.Tk}}]),n}(_h),Th=function(t){function n(n){return t.call(this,n)||this}return _t(n,t),n.prototype.Bx=function(t){return new n(this.Vx.cloneNode(t))},Tt(n,[{key:"Rx",get:function(){return bh.Ex}}]),n}(_h),Eh=function(t){function n(n){return t.call(this,n)||this}return _t(n,t),n.prototype.Bx=function(t){return new n(this.Vx.cloneNode(t))},Tt(n,[{key:"Rx",get:function(){return bh.xx}},{key:"$x",get:function(){return new yh(this.Vx.documentElement)}}]),n}(ph);function kh(t){return function(t){return 1===t.Rx}(t)}function Ih(t){switch(t.nodeType){case bh.Tx:return new yh(t);case bh.Tk:return new Sh(t);case bh.Ex:return new Th(t)}}function Rh(t){var n=t.indexOf(":");return n<0?t:t.substr(n+1)}var Oh=function(t){function n(){var n;return(n=t.apply(this,arguments)||this).tR=void 0,n.iR=rh(),n.nR=Ut.wm||Ut.hg,n.oR=(Ut.wm||Ut.Ng&&Ut.wg<=68||Ut.hg)&&!(Ut.Ig&&Ut.Pg<3),n._R=void 0,n.vR=new gh,n}return _t(n,t),n.prototype.Ix=function(t){return this.vR.Ix(t)},Tt(n,[{key:"Xp",get:function(){return this.tR||(this.tR=new wo(vc())),this.tR}},{key:"eR",get:function(){return this.iR}},{key:"sR",get:function(){return this.nR}},{key:"rR",get:function(){return this.oR}},{key:"hR",get:function(){return!1}},{key:"aR",get:function(){return lc.yk()}},{key:"uR",get:function(){return{cR:gc}}},{key:"lR",get:function(){return v.connection&&v.connection.effectiveType||cr}},{key:"dR",get:function(){return v.connection&&v.connection.type||hr}},{key:"fR",get:function(){return this._R||(this._R=new Xc(new wh)),this._R}}]),n}(rr);jt(new Oh),x(),gt(),x(),gt();x(),gt(),x(),gt(),x(),gt();var Nh=function(t){return t.vE="audio",t.gE="video",t.dW="metadata",t}({});x(),gt(),x(),gt();var Ph=function(t){return t.nE="#EXTINF",t.RBt="#EXT-X-MAP",t.p="#EXTM3U",t.en="#EXT-X-VERSION",t.ui="#EXT-X-TARGETDURATION",t.ETt="#EXT-X-START",t.li="#EXT-X-INDEPENDENT-SEGMENTS",t.Sk="#EXT-X-STREAM-INF",t.vr="#EXT-X-MEDIA-SEQUENCE",t.if="#EXT-X-ENDLIST",t.sf="#EXT-X-MEDIA",t.ff="#EXT-X-DISCONTINUITY",t.af="#EXT-X-DISCONTINUITY-SEQUENCE",t.tv="#EXT-X-PLAYLIST-TYPE",t.nv="#EXT-X-KEY",t}({}),Ah=function(){function t(t,n){this.Tw="#EXTINF",this.ev=t,this.sv=n}return t.prototype.fP=function(){return this.Tw+":"+this.ev+",\n"+this.sv},t}(),Dh=function(){function t(t){this.Tw="#EXT-X-MAP",this.sv=t}return t.prototype.fP=function(){return this.Tw+':URI="'+this.sv+'"'},t}(),Ch=function(){function t(){this.Tw="#EXTM3U"}return t.prototype.fP=function(){return this.Tw},t}(),xh=function(){function t(t){this.Tw="#EXT-X-VERSION",this.iN=t}return t.prototype.fP=function(){return this.Tw+":"+this.iN},t}(),Bh=function(){function t(t){this.Tw="#EXT-X-TARGETDURATION",this.wBt=t}return t.prototype.fP=function(){return this.Tw+":"+this.wBt},t}(),Mh=function(){function t(t){this.Tw="#EXT-X-START",this.yOt=t}return t.prototype.fP=function(){return this.Tw+":TIME-OFFSET="+this.yOt},t}(),Lh=function(){function t(t,n,i){this.uri=t,this.keyFormat=n,this.keyFormatVersions=i,this.Tw="#EXT-X-KEY"}return t.prototype.fP=function(){return this.Tw+':METHOD=SAMPLE-AES,URI="'+this.uri+'",KEYFORMAT="'+this.keyFormat+'",KEYFORMATVERSIONS="'+this.keyFormatVersions+'"'},t}(),Uh=function(){function t(t){this.Tw="#EXT-X-STREAM-INF",this.MG=1,this.sv=t}return t.prototype.fP=function(){return this.Tw+":BANDWIDTH="+this.MG+',AUDIO="audio"\n'+this.sv},t}(),Fh=function(){function t(t){this.Tw="#EXT-X-MEDIA-SEQUENCE",this.dL=t}return t.prototype.fP=function(){return this.Tw+":"+this.dL},t}(),zh=function(){function t(t){this.Tw="#EXT-X-MEDIA",this.sv=t}return t.prototype.fP=function(){var t=Wr();t.set("TYPE","AUDIO"),t.set("GROUP-ID",'"audio"'),t.set("NAME",'"audio"'),t.set("AUTOSELECT","YES"),t.set("DEFAULT","YES"),t.set("CHANNELS",'"2"'),t.set("URI",'"'+this.sv+'"');var n=[];return t.forEach((function(t,i){return n.push(i+"="+t)})),this.Tw+":"+n.join(",")},t}();x(),gt();var Wh=function(){function t(t){this.pA=[],this.pA=t}var n=t.prototype;return n.qN=function(){return this.pA},n.cv=function(t){this.pA.push(t)},n.YVt=function(){for(var t="",n=0,i=this.qN();n<i.length;n++){t+=i[n].fP()+"\n"}return t},n.Xw=function(){this.pA.length=0},t}(),Hh=function(t){function n(n,i){var e;return e=t.call(this,[new Ch,new xh(8)])||this,i&&e.cv(new Uh("video/index.m3u8")),n&&e.cv(new zh("audio/index.m3u8")),e}return _t(n,t),n}(Wh);x(),gt(),x(),gt(),x(),gt();var Vh=function(t){return t.hit="HELLO",t.ait="HI_THERE",t.uit="INITIALIZE",t.cit="APPEND_INIT",t.dit="APPEND_DATA",t.fit="ACK",t._it="REMOVE",t.vit="DESTROY_SESSION",t}({});x(),gt(),x(),gt();var qh,Xh=new Array(256);for(qh=0;qh<256;qh+=1)Xh[qh]=(qh<16?"0":"")+qh.toString(16);function jh(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var n=16*y.random()|0;return("x"===t?n:3&n|8).toString(16)}))}x(),gt();var Yh=function(t){function n(n){var i;return(i=t.call(this,"append")||this).Kk=n,i}return _t(n,t),n}(Eo),Kh=function(t){function n(){var n;return(n=t.apply(this,arguments)||this).Zxt=0,n.kp=new E(0),n.$b=!1,n.av=!1,n}_t(n,t);var i=n.prototype;return i.D2=function(t,n){this.Zxt+=n,this.kp=eu([this.kp,t]),this._o(new Yh(t))},i.Ws=function(){this.qS||(this._o(new Eo("close")),this.$b=!0)},Tt(n,[{key:"wR",get:function(){return this.Zxt}},{key:"Kk",get:function(){return this.kp}},{key:"qS",get:function(){return this.$b}},{key:"dv",get:function(){return this.av},set:function(t){this.av=t}}]),n}(To),Gh="sync-seg-",$h=function(){function t(t,n){this.lv=!1,this.wv=!1,this.o=Gh+jh(),this.gv=n?new Kh:void 0,this.kv=t?new Kh:void 0}return t.prototype.Ws=function(){this.gv&&this.gv.Ws(),this.kv&&this.kv.Ws()},Tt(t,[{key:"jv",get:function(){return this.lv},set:function(t){this.lv=t}},{key:"Ad",get:function(){return this.wv},set:function(t){this.wv=t}}]),t}();x(),gt();var Zh=1.1,Jh=function(t){function n(n,i,e){var r;return(r=t.call(this,[new Ch,new xh(8),new Bh(1),new Mh(0)])||this).tw=[],r.nAt=Wr(),r.rw=0,r.sw=function(t){if(t.JO>=En)for(;r.tw.length>0;)r.bw()},e&&r.cv(new Lh(e,"com.apple.streamingkeydelivery","1")),r.xut=n,r.Uot=i,r.Uot.bn("remove",r.sw),r.kw=new Fh(0),r.cv(r.kw),r}_t(n,t);var i=n.prototype;return i.BCt=function(){return this.xut===Nh.gE?this.Uot.tb:this.xut===Nh.vE?this.Uot.nb:void 0},i.Sut=function(t){return this.nAt.get(t)},i.Xw=function(){this.tw.length=0,this.kw.dL=0,this.nAt.clear(),this.rw=0},i.qN=function(){return this.cb(),jn(t.prototype.qN.call(this)).concat(jn(this.tw))},i.cb=function(){for(var t=this.Uot.ab(),n=0;n<t.length;n++){var i=t[n];if(!this.nAt.has(i.o)){var e=void 0;if(this.xut===Nh.gE?(e=i.gv,i.Ad=!0):(e=i.kv,i.jv=!0),!e)return;this.nAt.set(i.o,e),e.dv&&this.tw.push(new Dh(i.o+"-init")),this.tw.push(new Ah(Zh,i.o)),this.rw+=Zh}}this.lb()},i.lb=function(){for(;this.rw>60;)this.bw()},i.bw=function(){var t=this.tw.shift();void 0!==t&&function(t){return t.Tw===Ph.nE}(t)&&(this.nAt.delete(t.sv),this.rw-=t.ev,this.kw.dL++)},n}(Wh);var Qh=function(t){function n(n){var i;return(i=t.call(this,"remove")||this).JO=n,i}return _t(n,t),n}(Eo),ta=function(t){function n(n,i){var e;return(e=t.call(this)||this).tg=n,e.ng=i,e.ig=[],e.ug=[],e.sg=Wr(),e.lg=Wr(),e.bg=Wr(),e.mg=0,e}_t(n,t);var i=n.prototype;return i.ab=function(){return this.kg?(this.ig=this.ig.filter((function(t){return!(t.Ad&&t.jv)})),jn(this.ig).concat([this.kg],jn(this.ug))):[]},i.L2=function(t){this.tm(t)},i.D2=function(t){this.tm(t),this.rm(t),this.om(t)},i.eT=function(t){this.tm(t),this.om(t)},i.Xw=function(){var t;null==(t=this.kg)||t.Ws(),this.kg=void 0,this.ug.forEach((function(t){return t.Ws()})),this.ug.length=0,this.ig.length=0,this.bg=Wr(),this.mg=0},i.rm=function(t){var n=t.startPts,i=t.totalDuration;this.lg.set(t.mediaType,n+i)},i.sm=function(){if(this.kg){this.kg.Ws(),this.ig.push(this.kg);var t=this.ug.shift(),n=new $h(this.tg,this.ng);t?(this.kg=t,this.ug.push(n)):this.kg=n}},i.am=function(t){if(this.kg){var n=!this.kg.kv||0===this.kg.kv.wR,i=!this.kg.gv||0===this.kg.gv.wR,e=this.kg.kv&&this.kg.kv.dv,r=this.kg.gv&&this.kg.gv.dv,o=i&&(n&&!(this.kg.jv||this.kg.Ad)||e),u=n&&(i&&!(this.kg.jv||this.kg.Ad)||r);(t===Nh.vE&&!u||t===Nh.gE&&!o)&&(this.sm(),this.sm())}},i.tm=function(t){var n=t.mediaType,i=t.kind,e=this.sg.get(n);if(void 0===e){if(i===Vh.cit||i===Vh.dit){var r=[t];this.sg.set(n,r)}}else e.push(t)},i.om=function(t){var n=this.bm(t);for(var i=0;i<n.length;i++){var e=n[i];switch(e.kind){case Vh.cit:this.km(e),this.bg=Wr(),this.mg=0;break;case Vh._it:this.ip(e);break;case Vh.dit:this.up(e)}}},i.km=function(t){var n=t.mediaType;void 0===this.kg?(this.kg=new $h(this.tg,this.ng),this.ug.push(new $h(this.tg,this.ng))):this.am(n),n===Nh.gE?(this.ty=t.segment,this.kg.gv.dv=!0):n===Nh.vE&&(this.ny=t.segment,this.kg.kv.dv=!0)},i.up=function(t){var n,i,e=t.mediaType===Nh.vE,r=t.totalDuration,o=null!=(n=this.bg.get(t.mediaType))?n:0;e?(this.kg.kv.D2(t.segment,r),i=o+this.kg.kv.wR):(this.kg.gv.D2(t.segment,r),i=o+this.kg.gv.wR),i>=this.mg+Zh&&(this.bg.set(t.mediaType,i),this.mg+=Zh,this.sm())},i.ip=function(t){this.lg.set(t.mediaType,void 0),this.am(t.mediaType),this.ig.length=0,this._o(new Qh(t.endTime))},i.bm=function(t){var n=this;if(t.kind===Vh._it)return this.hy(t);var i=[];return this.sg.forEach((function(t){if(t&&t.length>0){var e=yr(t,(function(t){return t.kind===Vh._it}));-1===e&&(e=t.length);for(var r=t.slice(0,e),o=0;o<r.length;o++){var u=r[o];if(!Er(i,u)){var s,f=n.hy(u);if(f.length>0)(s=i).push.apply(s,jn(f));else if(u.kind===Vh.dit)break}}}})),i},i.hy=function(t){var n=this.sg.get(t.mediaType),i=function(t){return t===Nh.gE?Nh.vE:Nh.gE}(t.mediaType);if(!(i===Nh.gE?this.ng:this.tg))return n.splice(0,n.indexOf(t)+1);if(t.kind===Vh.cit)return[];var e=this.lg.get(i);if(void 0===e)return[];if(t.kind===Vh._it){var r=this.by(i);if(r.length>0){var o=n.splice(0,n.indexOf(t));return n.splice(0,1),jn(o).concat(jn(r),[t])}return[]}if(t.startPts<=e){var u=n.splice(0,n.indexOf(t));n.splice(0,1);var s=this.my(t,u,i);return jn(u).concat(jn(s),[t])}return[]},i.my=function(t,n,i){var e=this.sg.get(i);if(!e)return[];var r=t.startPts+t.totalDuration,o=yr(e,(function(t){return t.kind===Vh._it})),u=o-1;-1===o&&(u=e.length-1);for(var s=u+1,f=0;f<=u&&s===u+1;f++){var c=e[f];c.kind===Vh.dit&&c.startPts>r&&(s=f)}var h=-1;return-1!==yr(n,(function(t){return t.kind===Vh.cit}))&&(h=yr(e,(function(t){return t.kind===Vh.cit}))),h>s&&(s=h+1),s>0?(e[s-1].kind===Vh.cit&&(s-=1),e.splice(0,s)):[]},i.by=function(t){var n=this.sg.get(t);if(n){var i=yr(n,(function(t){return t.kind===Vh._it}));if(i>=0)return n.splice(0,i+1)}return[]},i.ky=function(){var t="[MEDIABUFFER] endPTS: ";this.lg.forEach((function(n,i){t=t.concat(i+" = "+n+" ")})),Wt.Fp(t)},i.OS=function(t,n){var i=t+": [";null==n||n.forEach((function(t){i=i.concat(" "+t.kind+"("+t.mediaType+")")})),i=i.concat(" ]"),Wt.Fp(i)},Tt(n,[{key:"nb",get:function(){var t;return null==(t=this.ny)?void 0:t.slice()}},{key:"tb",get:function(){var t;return null==(t=this.ty)?void 0:t.slice()}}]),n}(To);var na=function(){function t(t,n){var i=t.some((function(t){return t.match("audio")})),e=t.some((function(t){return t.match("video")}));this.AS=new ta(i,e),this.BS=new Hh(i,e),i&&(this.RT=new Jh(Nh.vE,this.AS,n)),e&&(this.IE=new Jh(Nh.gE,this.AS,n))}var n=t.prototype;return n.ME=function(t){var n,i,e=ia(t);return e===Nh.gE?null==(n=this.IE)?void 0:n.BCt():e===Nh.vE?null==(i=this.RT)?void 0:i.BCt():void 0},n.Sut=function(t){var n,i,e=t.split("/")[1],r=ia(t);return r===Nh.gE?null==(n=this.IE)?void 0:n.Sut(e):r===Nh.vE?null==(i=this.RT)?void 0:i.Sut(e):void 0},n.L2=function(t){this.AS.L2(t)},n.D2=function(t){this.AS.D2(t)},n.Ndt=function(t){this.AS.eT(t)},n.Xw=function(){var t,n;this.AS.Xw(),this.BS.Xw(),null==(t=this.RT)||t.Xw(),null==(n=this.IE)||n.Xw()},Tt(t,[{key:"tk",get:function(){return this.BS}},{key:"ik",get:function(){return this.RT}},{key:"uk",get:function(){return this.IE}}]),t}();function ia(t){return t.match(/video/)?Nh.gE:Nh.vE}var ea=function(){function t(t,n){var i=this;this.sk=t,this.ak=n,this.Jut=void 0,this.lqt=gr((function(t){var n,e;return mr(this,(function(r){switch((n=t.data).kind){case Vh.uit:i.Jut=new na(n.mediaBufferConfigs,n.fairPlaySdkUri);break;case Vh.cit:i.Jut.L2(n);break;case Vh.dit:i.Jut.D2(n);break;case Vh._it:i.Jut.Ndt(n)}return e={kind:Vh.fit},i.sk.postMessage(e),[2]}))})),this.sk.onmessage=this.lqt}var n=t.prototype;return n.YVt=function(t){return"master.m3u8"===t?this.Jut.tk:"video/index.m3u8"===t?this.Jut.uk:"audio/index.m3u8"===t?this.Jut.ik:void 0},n.mk=function(t){if(t.match(/m3u8/)){var n,i=null==(n=this.YVt(t))?void 0:n.YVt();return new Response(i,{headers:{"Content-Type":"application/x-mpegurl; charset=utf-8"}})}if(t.match(Gh)){var e={"Content-Type":t.match(/video/)?"video/mp4":"audio/mp4"};if(t.match(/init/)){var r,o=null==(r=this.Jut)?void 0:r.ME(t);return new Response(o,{headers:e})}var u=this.but(t);if(!u)return new Response(void 0,{status:404,statusText:"Not Found"});var s=function(t){var n,i=function(t){n.enqueue(t.Kk)},e=function(){n.close(),t.vn("append",i),t.vn("close",e)};return new self.ReadableStream({start:function(r){(n=r).enqueue(t.Kk),t.qS?n.close():(t.bn("append",i),t.bn("close",e))},cancel:function(){t.vn("append",i),t.vn("close",e)}})}(u);return new Response(s,{headers:e})}return new Response(void 0,{status:404,statusText:"Not Found"})},n.but=function(t){return this.Jut.Sut(t)},n.close=function(){var t;this.sk.close(),null==(t=this.Jut)||t.Xw()},t}(),ra=function(){function t(){var t=this;this.r9=Wr(),this.lqt=function(n){var i=n.data;if(i.kind===Vh.hit){t.kk().catch(Yt);var e=i.port,r=jh(),o=new ea(e,n.source.id);t.r9.set(r,o);var u=function(n){n.data.kind===Vh.vit&&(t.TR(r),e.removeEventListener("message",u))};e.addEventListener("message",u);var s={kind:Vh.ait,sessionId:r};e.postMessage(s)}},this.CR=function(n){if(uo(n.request.url,"https://theo.proxy")){var i=new URL(n.request.url).pathname.split("/"),e=i[1],r=i.slice(2).join("/"),o=t.r9.get(e);if(void 0===o){var u=new Response(void 0,{headers:{message:"Given session ["+e+"] not found."},status:404,statusText:"Not Found"});return void n.respondWith(u)}if(void 0===r){var s=new Response(void 0,{headers:{message:"No resource ["+r+"] provided."},status:404,statusText:"Not Found"});return void n.respondWith(s)}var f=o.mk(r);n.respondWith(f)}}}var n=t.prototype;return n.pr=function(t){this.Gzt=t,t.addEventListener("message",this.lqt),t.addEventListener("fetch",this.CR)},n.TR=function(t){var n=this.r9.get(t);n&&n.close(),this.r9.delete(t)},n.kk=function(){var t=this;return gr((function(){var n,i;return mr(this,(function(e){switch(e.label){case 0:return[4,t.Gzt.clients.matchAll()];case 1:return n=e.sent(),i=n.map((function(t){return t.id})),t.r9.forEach((function(n,e){Er(i,n.ak)||t.TR(e)})),[2]}}))}))()},t}();ra.BR=new ra;var oa=self;oa.addEventListener("install",(function(t){t.waitUntil(oa.skipWaiting())})),oa.addEventListener("activate",(function(t){t.waitUntil(oa.clients.claim())})),ra.BR.pr(oa)}("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof s?s:"undefined"!=typeof global?global:this);
|
|
30
|
+
!function(t){"use strict";var n,i,e,r,o,u,s,f,c,h=t.window,a=t.document,v=(t.location,t.navigator),d=t.setTimeout,l=t.clearTimeout,w=t.setInterval,b=t.clearInterval,g=t.Error,m=t.TypeError,p=(t.SyntaxError,t.Object),y=t.Math,_=t.parseInt,S=t.parseFloat,T=t.isNaN,E=t.Uint8Array,I=(t.Worker,t.WorkerGlobalScope,t.XMLHttpRequest),k=p.create,R=p.defineProperty,O=p.getOwnPropertyDescriptor,N=p.getOwnPropertyNames,P=p.getPrototypeOf,A=p.prototype.hasOwnProperty,D=function(t,n){return function(){return t&&(n=t(t=0)),n}},C=function(t,n){return function(){return n||t((n={exports:{}}).exports,n),n.exports}},x=D((function(){"function"==typeof Symbol&&Symbol.iterator?(n=Symbol,i=null!=(u=Symbol.for)?u:Symbol,e=Symbol.iterator,r=null!=(s=Symbol.dispose)?s:i("Symbol.dispose"),o=null!=(f=Symbol.asyncDispose)?f:i("Symbol.asyncDispose")):(c=0,n=function(t){return"ul"+t+"_"+ ++c},e=(i=function(t){return"ul"+t})("Symbol.iterator"),r=i("Symbol.dispose"),o=i("Symbol.asyncDispose"),n.for=i,n.iterator=e,n.dispose=r,n.asyncDispose=o)}));function B(t){return t&&void 0!==n&&t.constructor===n?"symbol":typeof t}var M,L,U,F,z,W,V,H,q,X,j,Y,K,G,$,Z,J,Q,tt,nt=D((function(){x(),gt()}));function it(t){var n=this.constructor;return this.then((function(i){return n.resolve(t()).then((function(){return i}))}),(function(i){return n.resolve(t()).then((function(){return n.reject(i)}))}))}function et(t){return new this((function(n,i){if(!t||void 0===t.length)return i(new m((void 0===t?"undefined":B(t))+" "+t+" is not iterable(cannot read property Symbol(Symbol.iterator))"));var e=Array.prototype.slice.call(t);if(0===e.length)return n([]);var r=e.length;function o(t,i){if(i&&("object"===(void 0===i?"undefined":B(i))||"function"==typeof i)){var u=i.then;if("function"==typeof u)return void u.call(i,(function(n){o(t,n)}),(function(i){e[t]={status:"rejected",reason:i},0==--r&&n(e)}))}e[t]={status:"fulfilled",value:i},0==--r&&n(e)}for(var u=0;u<e.length;u++)o(u,e[u])}))}function rt(t){return Boolean(t&&void 0!==t.length)}function ot(){}function ut(t){if(!(this instanceof ut))throw new m("Promises must be constructed via new");if("function"!=typeof t)throw new m("not a function");this.Fa=0,this.ttn=!1,this.mTt=void 0,this.ntn=[],vt(t,this)}function st(t,n){for(;3===t.Fa;)t=t.mTt;0!==t.Fa?(t.ttn=!0,ut.itn((function(){var i=1===t.Fa?n.onFulfilled:n.onRejected;if(null!==i){var e;try{e=i(t.mTt)}catch(t){return void ct(n.promise,t)}ft(n.promise,e)}else(1===t.Fa?ft:ct)(n.promise,t.mTt)}))):t.ntn.push(n)}function ft(t,n){try{if(n===t)throw new m("A promise cannot be resolved with itself.");if(n&&("object"===(void 0===n?"undefined":B(n))||"function"==typeof n)){var i=n.then;if(n instanceof ut)return t.Fa=3,t.mTt=n,void ht(t);if("function"==typeof i)return void vt(function(t,n){return function(){t.apply(n,arguments)}}(i,n),t)}t.Fa=1,t.mTt=n,ht(t)}catch(n){ct(t,n)}}function ct(t,n){t.Fa=2,t.mTt=n,ht(t)}function ht(t){2===t.Fa&&0===t.ntn.length&&ut.itn((function(){t.ttn||ut.rtn(t.mTt)}));for(var n=0,i=t.ntn.length;n<i;n++)st(t,t.ntn[n]);t.ntn=null}function at(t,n,i){this.onFulfilled="function"==typeof t?t:null,this.onRejected="function"==typeof n?n:null,this.promise=i}function vt(t,n){var i=!1;try{t((function(t){i||(i=!0,ft(n,t))}),(function(t){i||(i=!0,ct(n,t))}))}catch(t){if(i)return;i=!0,ct(n,t)}}function dt(t){return new Y(j,{reason:t,promise:L.reject(t).catch((function(){})),cancelable:!0})}function lt(t){var n=new K(j,{detail:{reason:t},cancelable:!0});return p.defineProperty(n,"reason",{value:t}),n}function wt(t){var n=a.createEvent("CustomEvent");return n.initCustomEvent(j,!1,!0,{reason:t}),n}var bt=D((function(){var t,n,i,e;x(),gt(),nt(),M=d,ut.prototype.catch=function(t){return this.then(null,t)},ut.prototype.then=function(t,n){var i=new this.constructor(ot);return st(this,new at(t,n,i)),i},ut.prototype.finally=it,ut.all=function(t){return new ut((function(n,i){if(!rt(t))return i(new m("Promise.all accepts an array"));var e=Array.prototype.slice.call(t);if(0===e.length)return n([]);var r=e.length;function o(t,u){try{if(u&&("object"===(void 0===u?"undefined":B(u))||"function"==typeof u)){var s=u.then;if("function"==typeof s)return void s.call(u,(function(n){o(t,n)}),i)}e[t]=u,0==--r&&n(e)}catch(t){i(t)}}for(var u=0;u<e.length;u++)o(u,e[u])}))},ut.allSettled=et,ut.resolve=function(t){return t&&"object"===(void 0===t?"undefined":B(t))&&t.constructor===ut?t:new ut((function(n){n(t)}))},ut.reject=function(t){return new ut((function(n,i){i(t)}))},ut.race=function(t){return new ut((function(n,i){if(!rt(t))return i(new m("Promise.race accepts an array"));for(var e=0,r=t.length;e<r;e++)ut.resolve(t[e]).then(n,i)}))},ut.itn="function"==typeof setImmediate&&function(t){setImmediate(t)}||function(t){M(t,0)},ut.rtn=function(t){"undefined"!=typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",t)},L=function(){var t=self.Promise;if(void 0!==t)try{if(-1!==t.toString().indexOf("[native code]"))return t}catch(t){}}(),U=v?v.userAgent:"",F=U.match(/Firefox\/([0-9]+)/i),z=null!=F,W=F?Number(F[1]):0,V=U.match(/(Version)\/((\d+)\.(\d+)(?:\.(\d+))?).*Safari/),H=null!=V,q=V?Number(V[3]):0,X=function(){function t(t){this.Jb=0,this.Id=0,this.Zp=[],this.etn=t}return t.prototype.utn=function(t){var n=this.length();this.stn(n+1);var i=this.Id+n&this.etn-1;this.Zp[i]=t,this.Jb=n+1},t.prototype.push=function(t){var n=this.length()+1;if(this.etn<n)this.utn(t);else{var i=this.Id+n-1,e=this.etn-1;this.Zp[i&e]=t,this.Jb=n}},t.prototype.shift=function(){var t=this.Id,n=this.Zp[t];return this.Zp[t]=void 0,this.Id=t+1&this.etn-1,this.Jb--,n},t.prototype.length=function(){return this.Jb},t.prototype.stn=function(t){this.etn<t&&this.otn(this.etn<<1)},t.prototype.otn=function(t){var n=this.etn;this.etn=t;var i=this.Id+this.Jb&n-1;!function(t,n,i,e){for(var r=0;r<e;++r)t[r+i]=t[r+n],t[r+n]=void 0}(this.Zp,0,n,i)},t}(),j="unhandledrejection",Y=self.PromiseRejectionEvent,K=self.CustomEvent,G=function(t){return G=function(){try{var t=L.resolve(),n="error",i=new Y(j,{reason:n,promise:t});return j===i.type&&n===i.reason}catch(t){}return!1}()?dt:function(){try{var t="error",n=new K(j,{detail:{reason:t}});return j===n.type&&t===n.detail.reason}catch(t){}return!1}()?lt:wt,G(t)},Z=z&&W<60||H&&q<15,L&&!Z?(J=L,function(){}):(J=ut,Q=null!==($=function(){var t=self.queueMicrotask;if("function"==typeof t)return function(n){return t(n)};var n=L;if(n&&"function"==typeof n.resolve){var i=n.resolve();return function(t){return i.then(t)}}}())&&void 0!==$?$:ut.itn,t=Q,n=new X(16),i=!1,(tt={L6:function(r){n.push(r),i||(i=!0,t(e))},TY:e=function(){for(;n.length()>0;)n.shift()();i=!1}}).TY,ut.itn=tt.L6,ut.rtn=function(t){try{var n=G(t);if(!self.dispatchEvent(n)||n.defaultPrevented)return}catch(t){}d((function(){throw new g("Unhandled promise rejection: ".concat(t))}),0)})})),gt=D((function(){bt()})),mt=C((function(t,i){var r,o;x(),gt(),nt(),r=t,o=function(t){var i="function"==typeof n&&"symbol"===B(e)?n:function(t){return"Symbol("+t+")"};function r(){}var o=Number.isNaN||function(t){return t!=t},u=r;function s(t){return"object"===(void 0===t?"undefined":B(t))&&null!==t||"function"==typeof t}function f(t){return t.slice()}function c(t,n,i,e,r){new E(t).set(new E(i,e,r),n)}function h(t){return!1!==function(t){return"number"==typeof t&&(!o(t)&&!(t<0))}(t)&&t!==1/0}function a(t,n,i){if("function"!=typeof t)throw new m("Argument is not a function");return Function.prototype.apply.call(t,n,i)}function v(t,n,i,e){var r=t[n];if(void 0!==r){if("function"!=typeof r)throw new m(r+" is not a method");switch(i){case 0:return function(){return l(r,t,e)};case 1:return function(n){var i=[n].concat(e);return l(r,t,i)}}}return function(){return R(void 0)}}function d(t,n,i){var e=t[n];if(void 0!==e)return a(e,t,i)}function l(t,n,i){try{return R(a(t,n,i))}catch(t){return O(t)}}function w(t){if(t=Number(t),o(t)||t<0)throw new RangeError("highWaterMark property of a queuing strategy must be non-negative and non-NaN");return t}function b(t){if(void 0===t)return function(){return 1};if("function"!=typeof t)throw new m("size property of a queuing strategy must be a function");return function(n){return t(n)}}var _=J,S=J.prototype.then,T=J.resolve.bind(_),I=J.reject.bind(_);function k(t){return new _(t)}function R(t){return T(t)}function O(t){return I(t)}function N(t,n,i){return S.call(t,n,i)}function P(t,n,i){N(N(t,n,i),void 0,u)}function A(t,n){P(t,n)}function D(t,n){P(t,void 0,n)}function C(t,n,i){return N(t,n,i)}function x(t){N(t,void 0,u)}var M=function(){function t(){this.hd=0,this.Ed=0,this.Id={Rd:[],Dd:void 0},this.Nd=this.Id,this.hd=0,this.Ed=0}return p.defineProperty(t.prototype,"length",{get:function(){return this.Ed},enumerable:!0,configurable:!0}),t.prototype.push=function(t){var n=this.Nd,i=n;16383===n.Rd.length&&(i={Rd:[],Dd:void 0}),n.Rd.push(t),i!==n&&(this.Nd=i,n.Dd=i),++this.Ed},t.prototype.shift=function(){var t=this.Id,n=t,i=this.hd,e=i+1,r=t.Rd,o=r[i];return 16384===e&&(n=t.Dd,e=0),--this.Ed,this.hd=e,t!==n&&(this.Id=n),r[i]=void 0,o},t.prototype.forEach=function(t){for(var n=this.hd,i=this.Id,e=i.Rd;!(n===e.length&&void 0===i.Dd||n===e.length&&(n=0,0===(e=(i=i.Dd).Rd).length));)t(e[n]),++n},t.prototype.peek=function(){var t=this.Id,n=this.hd;return t.Rd[n]},t}();function L(t,n,i){var e=null;!0===i&&(e=p.prototype);var r=p.create(e);return r.value=t,r.done=n,r}function U(t,n){t.Ld=!0,t.Bd=n,n.Od=t,"readable"===n.Fa?V(t):"closed"===n.Fa?function(t){V(t),X(t)}(t):H(t,n.Fd)}function F(t,n){return Zn(t.Bd,n)}function z(t){"readable"===t.Bd.Fa?q(t,new m("Reader was released and can no longer be used to monitor the stream's closedness")):function(t,n){H(t,n)}(t,new m("Reader was released and can no longer be used to monitor the stream's closedness")),t.Bd.Od=void 0,t.Bd=void 0}function W(t){return new m("Cannot "+t+" a stream using a released reader")}function V(t){t.Vd=k((function(n,i){t.Wd=n,t.Ud=i}))}function H(t,n){V(t),q(t,n)}function q(t,n){x(t.Vd),t.Ud(n),t.Wd=void 0,t.Ud=void 0}function X(t){t.Wd(void 0),t.Wd=void 0,t.Ud=void 0}var j=i("[[CancelSteps]]"),Y=i("[[PullSteps]]");function K(t,n){void 0===n&&(n=!1);var i=new it(t);return i.Ld=n,i}function G(t){return k((function(n,i){var e={Gd:n,Zd:i};t.Od.Hd.push(e)}))}function $(t,n,i){var e=t.Od;e.Hd.shift().Gd(L(n,i,e.Ld))}function Z(t){return t.Od.Hd.length}function Q(t){var n=t.Od;return void 0!==n&&!!et(n)}var tt,nt,it=function(){function t(t){if(!1===Gn(t))throw new m("ReadableStreamDefaultReader can only be constructed with a ReadableStream instance");if(!0===$n(t))throw new m("This stream has already been locked for exclusive reading by another reader");U(this,t),this.Hd=new M}return p.defineProperty(t.prototype,"closed",{get:function(){return et(this)?this.Vd:O(ot("closed"))},enumerable:!0,configurable:!0}),t.prototype.cancel=function(t){return et(this)?void 0===this.Bd?O(W("cancel")):F(this,t):O(ot("cancel"))},t.prototype.read=function(){return et(this)?void 0===this.Bd?O(W("read from")):rt(this):O(ot("read"))},t.prototype.releaseLock=function(){if(!et(this))throw ot("releaseLock");if(void 0!==this.Bd){if(this.Hd.length>0)throw new m("Tried to release a reader lock when that reader has pending read() calls un-settled");z(this)}},t}();function et(t){return!!s(t)&&!!p.prototype.hasOwnProperty.call(t,"Hd")}function rt(t){var n=t.Bd;return n.Xd=!0,"closed"===n.Fa?R(L(void 0,!0,t.Ld)):"errored"===n.Fa?O(n.Fd):n.zd[Y]()}function ot(t){return new m("ReadableStreamDefaultReader.prototype."+t+" can only be used on a ReadableStreamDefaultReader")}"symbol"===B(i.asyncIterator)&&((tt={})[i.asyncIterator]=function(){return this},nt=tt,p.defineProperty(nt,i.asyncIterator,{enumerable:!1}));var ut={next:function(){if(!1===st(this))return O(ft("next"));var t=this.qd;return void 0===t.Bd?O(W("iterate")):C(rt(t),(function(n){var i=n.done;return i&&z(t),L(n.value,i,!0)}))},return:function(t){if(!1===st(this))return O(ft("next"));var n=this.qd;if(void 0===n.Bd)return O(W("finish iterating"));if(n.Hd.length>0)return O(new m("Tried to release a reader lock when that reader has pending read() calls un-settled"));if(!1===this.Yd){var i=F(n,t);return z(n),C(i,(function(){return L(t,!0,!0)}))}return z(n),R(L(t,!0,!0))}};function st(t){return!!s(t)&&!!p.prototype.hasOwnProperty.call(t,"qd")}function ft(t){return new m("ReadableStreamAsyncIterator."+t+" can only be used on a ReadableSteamAsyncIterator")}function ct(t){var n=t.Kd.shift();return t.Qd-=n.size,t.Qd<0&&(t.Qd=0),n.value}function ht(t,n,i){if(!h(i=Number(i)))throw new RangeError("Size must be a finite, non-NaN, non-negative number.");t.Kd.push({value:n,size:i}),t.Qd+=i}function at(t){t.Kd=new M,t.Qd=0}void 0!==nt&&p.setPrototypeOf(ut,nt),p.defineProperty(ut,"next",{enumerable:!1}),p.defineProperty(ut,"return",{enumerable:!1});var vt=i("[[AbortSteps]]"),dt=i("[[ErrorSteps]]"),lt=function(){function t(t,n){void 0===t&&(t={}),void 0===n&&(n={}),bt(this);var i=n.size,e=n.highWaterMark;if(void 0!==t.type)throw new RangeError("Invalid type is specified");var r=b(i);void 0===e&&(e=1),function(t,n,i,e){var r=p.create(xt.prototype);function o(){return d(n,"start",[r])}var u=v(n,"write",1,[r]),s=v(n,"close",0,[]),f=v(n,"abort",1,[]);Bt(t,r,o,u,s,f,i,e)}(this,t,e=w(e),r)}return p.defineProperty(t.prototype,"locked",{get:function(){if(!1===gt(this))throw Vt("locked");return mt(this)},enumerable:!0,configurable:!0}),t.prototype.abort=function(t){return!1===gt(this)?O(Vt("abort")):!0===mt(this)?O(new m("Cannot abort a stream that already has a writer")):pt(this,t)},t.prototype.close=function(){return!1===gt(this)?O(Vt("close")):!0===mt(this)?O(new m("Cannot close a stream that already has a writer")):!0===Et(this)?O(new m("Cannot close an already-closing stream")):yt(this)},t.prototype.getWriter=function(){if(!1===gt(this))throw Vt("getWriter");return wt(this)},t}();function wt(t){return new Rt(t)}function bt(t){t.Fa="writable",t.Fd=void 0,t.Jd=void 0,t.$d=void 0,t.tf=new M,t.ef=void 0,t.nf=void 0,t.rf=void 0,t.hf=void 0,t.uf=!1}function gt(t){return!!s(t)&&!!p.prototype.hasOwnProperty.call(t,"$d")}function mt(t){return void 0!==t.Jd}function pt(t,n){var i=t.Fa;if("closed"===i||"errored"===i)return R(void 0);if(void 0!==t.hf)return t.hf.cf;var e=!1;"erroring"===i&&(e=!0,n=void 0);var r=k((function(i,r){t.hf={cf:void 0,Gd:i,Zd:r,lf:n,df:e}}));return t.hf.cf=r,!1===e&&St(t,n),r}function yt(t){var n=t.Fa;if("closed"===n||"errored"===n)return O(new m("The stream (in "+n+" state) is not in the writable state and cannot be closed"));var i=k((function(n,i){var e={Gd:n,Zd:i};t.nf=e})),e=t.Jd;return void 0!==e&&!0===t.uf&&"writable"===n&&Qt(e),function(t){ht(t,"close",0),Ut(t)}(t.$d),i}function _t(t,n){"writable"!==t.Fa?Tt(t):St(t,n)}function St(t,n){var i=t.$d;t.Fa="erroring",t.Fd=n;var e=t.Jd;void 0!==e&&At(e,n),!1===function(t){return void 0!==t.ef||void 0!==t.rf}(t)&&!0===i._f&&Tt(t)}function Tt(t){t.Fa="errored",t.$d[dt]();var n=t.Fd;if(t.tf.forEach((function(t){t.Zd(n)})),t.tf=new M,void 0!==t.hf){var i=t.hf;if(t.hf=void 0,!0===i.df)return i.Zd(n),void It(t);P(t.$d[vt](i.lf),(function(){i.Gd(),It(t)}),(function(n){i.Zd(n),It(t)}))}else It(t)}function Et(t){return void 0!==t.nf||void 0!==t.rf}function It(t){void 0!==t.nf&&(t.nf.Zd(t.Fd),t.nf=void 0);var n=t.Jd;void 0!==n&&Yt(n,t.Fd)}function kt(t,n){var i=t.Jd;void 0!==i&&n!==t.uf&&(!0===n?function(t){Gt(t)}(i):Qt(i)),t.uf=n}var Rt=function(){function t(t){if(!1===gt(t))throw new m("WritableStreamDefaultWriter can only be constructed with a WritableStream instance");if(!0===mt(t))throw new m("This stream has already been locked for exclusive writing by another writer");this.vf=t,t.Jd=this;var n=t.Fa;if("writable"===n)!1===Et(t)&&!0===t.uf?Gt(this):Zt(this),Xt(this);else if("erroring"===n)$t(this,t.Fd),Xt(this);else if("closed"===n)Zt(this),function(t){Xt(t),Kt(t)}(this);else{var i=t.Fd;$t(this,i),jt(this,i)}}return p.defineProperty(t.prototype,"closed",{get:function(){return!1===Ot(this)?O(Ht("closed")):this.Vd},enumerable:!0,configurable:!0}),p.defineProperty(t.prototype,"desiredSize",{get:function(){if(!1===Ot(this))throw Ht("desiredSize");if(void 0===this.vf)throw qt("desiredSize");return function(t){var n=t.vf,i=n.Fa;return"errored"===i||"erroring"===i?null:"closed"===i?0:Lt(n.$d)}(this)},enumerable:!0,configurable:!0}),p.defineProperty(t.prototype,"ready",{get:function(){return!1===Ot(this)?O(Ht("ready")):this.gf},enumerable:!0,configurable:!0}),t.prototype.abort=function(t){return!1===Ot(this)?O(Ht("abort")):void 0===this.vf?O(qt("abort")):function(t,n){var i=t.vf;return pt(i,n)}(this,t)},t.prototype.close=function(){if(!1===Ot(this))return O(Ht("close"));var t=this.vf;return void 0===t?O(qt("close")):!0===Et(t)?O(new m("Cannot close an already-closing stream")):Nt(this)},t.prototype.releaseLock=function(){if(!1===Ot(this))throw Ht("releaseLock");void 0!==this.vf&&Dt(this)},t.prototype.write=function(t){return!1===Ot(this)?O(Ht("write")):void 0===this.vf?O(qt("write to")):Ct(this,t)},t}();function Ot(t){return!!s(t)&&!!p.prototype.hasOwnProperty.call(t,"vf")}function Nt(t){return yt(t.vf)}function Pt(t,n){"pending"===t.mf?Yt(t,n):function(t,n){jt(t,n)}(t,n)}function At(t,n){"pending"===t.pf?Jt(t,n):function(t,n){$t(t,n)}(t,n)}function Dt(t){var n=t.vf,i=new m("Writer was released and can no longer be used to monitor the stream's closedness");At(t,i),Pt(t,i),n.Jd=void 0,t.vf=void 0}function Ct(t,n){var i=t.vf,e=i.$d,r=function(t,n){try{return t.wf(n)}catch(n){return Ft(t,n),1}}(e,n);if(i!==t.vf)return O(qt("write to"));var o=i.Fa;if("errored"===o)return O(i.Fd);if(!0===Et(i)||"closed"===o)return O(new m("The stream is closing or closed and cannot be written to"));if("erroring"===o)return O(i.Fd);var u=function(t){return k((function(n,i){var e={Gd:n,Zd:i};t.tf.push(e)}))}(i);return function(t,n,i){var e={chunk:n};try{ht(t,e,i)}catch(n){return void Ft(t,n)}var r=t.yf;!1===Et(r)&&"writable"===r.Fa&&kt(r,zt(t)),Ut(t)}(e,n,r),u}var xt=function(){function t(){throw new m("WritableStreamDefaultController cannot be constructed explicitly")}return t.prototype.error=function(t){if(!1===function(t){return!!s(t)&&!!p.prototype.hasOwnProperty.call(t,"yf")}(this))throw new m("WritableStreamDefaultController.prototype.error can only be used on a WritableStreamDefaultController");"writable"===this.yf.Fa&&Wt(this,t)},t.prototype[vt]=function(t){var n=this.bf(t);return Mt(this),n},t.prototype[dt]=function(){at(this)},t}();function Bt(t,n,i,e,r,o,u,s){n.yf=t,t.$d=n,n.Kd=void 0,n.Qd=void 0,at(n),n._f=!1,n.wf=s,n.Af=u,n.Sf=e,n.Tf=r,n.bf=o;var f=zt(n);kt(t,f),P(R(i()),(function(){n._f=!0,Ut(n)}),(function(i){n._f=!0,_t(t,i)}))}function Mt(t){t.Sf=void 0,t.Tf=void 0,t.bf=void 0,t.wf=void 0}function Lt(t){return t.Af-t.Qd}function Ut(t){var n=t.yf;if(!1!==t._f&&void 0===n.ef)if("erroring"!==n.Fa){if(0!==t.Kd.length){var i=function(t){return t.Kd.peek().value}(t);"close"===i?function(t){var n=t.yf;(function(t){t.rf=t.nf,t.nf=void 0})(n),ct(t);var i=t.Tf();Mt(t),P(i,(function(){!function(t){t.rf.Gd(void 0),t.rf=void 0,"erroring"===t.Fa&&(t.Fd=void 0,void 0!==t.hf&&(t.hf.Gd(),t.hf=void 0)),t.Fa="closed";var n=t.Jd;void 0!==n&&Kt(n)}(n)}),(function(t){!function(t,n){t.rf.Zd(n),t.rf=void 0,void 0!==t.hf&&(t.hf.Zd(n),t.hf=void 0),_t(t,n)}(n,t)}))}(t):function(t,n){var i=t.yf;!function(t){t.ef=t.tf.shift()}(i);var e=t.Sf(n);P(e,(function(){!function(t){t.ef.Gd(void 0),t.ef=void 0}(i);var n=i.Fa;if(ct(t),!1===Et(i)&&"writable"===n){var e=zt(t);kt(i,e)}Ut(t)}),(function(n){"writable"===i.Fa&&Mt(t),function(t,n){t.ef.Zd(n),t.ef=void 0,_t(t,n)}(i,n)}))}(t,i.chunk)}}else Tt(n)}function Ft(t,n){"writable"===t.yf.Fa&&Wt(t,n)}function zt(t){return Lt(t)<=0}function Wt(t,n){var i=t.yf;Mt(t),St(i,n)}function Vt(t){return new m("WritableStream.prototype."+t+" can only be used on a WritableStream")}function Ht(t){return new m("WritableStreamDefaultWriter.prototype."+t+" can only be used on a WritableStreamDefaultWriter")}function qt(t){return new m("Cannot "+t+" a stream using a released writer")}function Xt(t){t.Vd=k((function(n,i){t.Wd=n,t.Ud=i,t.mf="pending"}))}function jt(t,n){Xt(t),Yt(t,n)}function Yt(t,n){x(t.Vd),t.Ud(n),t.Wd=void 0,t.Ud=void 0,t.mf="rejected"}function Kt(t){t.Wd(void 0),t.Wd=void 0,t.Ud=void 0,t.mf="resolved"}function Gt(t){t.gf=k((function(n,i){t.kf=n,t.Ef=i})),t.pf="pending"}function $t(t,n){Gt(t),Jt(t,n)}function Zt(t){Gt(t),Qt(t)}function Jt(t,n){x(t.gf),t.Ef(n),t.kf=void 0,t.Ef=void 0,t.pf="rejected"}function Qt(t){t.kf(void 0),t.kf=void 0,t.Ef=void 0,t.pf="fulfilled"}function tn(t){if("object"!==(void 0===t?"undefined":B(t))||null===t)return!1;try{return"boolean"==typeof t.aborted}catch(t){return!1}}var nn,en="undefined"!=typeof DOMException?DOMException:void 0,rn=function(t){if("function"!=typeof t&&"object"!==(void 0===t?"undefined":B(t)))return!1;try{return new t,!0}catch(t){return!1}}(en)?en:((nn=function(t,n){this.message=t||"",this.name=n||"Error",g.captureStackTrace&&g.captureStackTrace(this,this.constructor)}).prototype=p.create(g.prototype),p.defineProperty(nn.prototype,"constructor",{value:nn,writable:!0,configurable:!0}),nn);function on(t,n,i,e,o,u){var s=K(t),f=wt(n);t.Xd=!0;var c=!1,h=R(void 0);return k((function(a,v){var d,l,w,b;if(void 0!==u){if(d=function(){var i=new rn("Aborted","AbortError"),r=[];!1===e&&r.push((function(){return"writable"===n.Fa?pt(n,i):R(void 0)})),!1===o&&r.push((function(){return"readable"===t.Fa?Zn(t,i):R(void 0)})),_((function(){return J.all(r.map((function(t){return t()})))}),!0,i)},!0===u.aborted)return void d();u.addEventListener("abort",d)}if(y(t,s.Vd,(function(t){!1===e?_((function(){return pt(n,t)}),!0,t):S(!0,t)})),y(n,f.Vd,(function(n){!1===o?_((function(){return Zn(t,n)}),!0,n):S(!0,n)})),l=t,w=s.Vd,b=function(){!1===i?_((function(){return function(t){var n=t.vf,i=n.Fa;return!0===Et(n)||"closed"===i?R(void 0):"errored"===i?O(n.Fd):Nt(t)}(f)})):S()},"closed"===l.Fa?b():A(w,b),!0===Et(n)||"closed"===n.Fa){var g=new m("the destination writable stream closed before all data could be piped to it");!1===o?_((function(){return Zn(t,g)}),!0,g):S(!0,g)}function p(){var t=h;return N(h,(function(){return t!==h?p():void 0}))}function y(t,n,i){"errored"===t.Fa?i(t.Fd):D(n,i)}function _(t,i,e){function r(){P(t(),(function(){return T(i,e)}),(function(t){return T(!0,t)}))}!0!==c&&(c=!0,"writable"===n.Fa&&!1===Et(n)?A(p(),r):r())}function S(t,i){!0!==c&&(c=!0,"writable"===n.Fa&&!1===Et(n)?A(p(),(function(){return T(t,i)})):T(t,i))}function T(t,n){Dt(f),z(s),void 0!==u&&u.removeEventListener("abort",d),t?v(n):a(void 0)}x(k((function(t,n){!function i(e){e?t():N(!0===c?R(!0):N(f.gf,(function(){return N(rt(s),(function(t){return!0===t.done||(h=N(Ct(f,t.value),void 0,r),!1)}))})),i,n)}(!1)})))}))}var un=function(){function t(){throw new m}return p.defineProperty(t.prototype,"desiredSize",{get:function(){if(!1===sn(this))throw gn("desiredSize");return ln(this)},enumerable:!0,configurable:!0}),t.prototype.close=function(){if(!1===sn(this))throw gn("close");if(!1===wn(this))throw new m("The stream is not in a state that permits close");an(this)},t.prototype.enqueue=function(t){if(!1===sn(this))throw gn("enqueue");if(!1===wn(this))throw new m("The stream is not in a state that permits enqueue");return vn(this,t)},t.prototype.error=function(t){if(!1===sn(this))throw gn("error");dn(this,t)},t.prototype[j]=function(t){at(this);var n=this.xf(t);return hn(this),n},t.prototype[Y]=function(){var t=this.If;if(this.Kd.length>0){var n=ct(this);return!0===this.Rf&&0===this.Kd.length?(hn(this),Jn(t)):fn(this),R(L(n,!1,t.Od.Ld))}var i=G(t);return fn(this),i},t}();function sn(t){return!!s(t)&&!!p.prototype.hasOwnProperty.call(t,"If")}function fn(t){!1!==cn(t)&&(!0!==t.Cf?(t.Cf=!0,P(t.Pf(),(function(){t.Cf=!1,!0===t.Df&&(t.Df=!1,fn(t))}),(function(n){dn(t,n)}))):t.Df=!0)}function cn(t){var n=t.If;return!1!==wn(t)&&!1!==t._f&&(!0===$n(n)&&Z(n)>0||ln(t)>0)}function hn(t){t.Pf=void 0,t.xf=void 0,t.wf=void 0}function an(t){var n=t.If;t.Rf=!0,0===t.Kd.length&&(hn(t),Jn(n))}function vn(t,n){var i=t.If;if(!0===$n(i)&&Z(i)>0)$(i,n,!1);else{var e=void 0;try{e=t.wf(n)}catch(n){throw dn(t,n),n}try{ht(t,n,e)}catch(n){throw dn(t,n),n}}fn(t)}function dn(t,n){var i=t.If;"readable"===i.Fa&&(at(t),hn(t),Qn(i,n))}function ln(t){var n=t.If.Fa;return"errored"===n?null:"closed"===n?0:t.Af-t.Qd}function wn(t){var n=t.If.Fa;return!1===t.Rf&&"readable"===n}function bn(t,n,i,e,r,o,u){n.If=t,n.Kd=void 0,n.Qd=void 0,at(n),n._f=!1,n.Rf=!1,n.Df=!1,n.Cf=!1,n.wf=u,n.Af=o,n.Pf=e,n.xf=r,t.zd=n,P(R(i()),(function(){n._f=!0,fn(n)}),(function(t){dn(n,t)}))}function gn(t){return new m("ReadableStreamDefaultController.prototype."+t+" can only be used on a ReadableStreamDefaultController")}var mn=Number.isInteger||function(t){return"number"==typeof t&&isFinite(t)&&y.floor(t)===t},pn=function(){function t(){throw new m("ReadableStreamBYOBRequest cannot be used directly")}return p.defineProperty(t.prototype,"view",{get:function(){if(!1===Sn(this))throw Un("view");return this.Nf},enumerable:!0,configurable:!0}),t.prototype.respond=function(t){if(!1===Sn(this))throw Un("respond");if(void 0===this.Mf)throw new m("This BYOB request has been invalidated");this.Nf.buffer,function(t,n){if(!1===h(n=Number(n)))throw new RangeError("bytesWritten must be a finite");Dn(t,n)}(this.Mf,t)},t.prototype.respondWithNewView=function(t){if(!1===Sn(this))throw Un("respond");if(void 0===this.Mf)throw new m("This BYOB request has been invalidated");if(!ArrayBuffer.isView(t))throw new m("You can only respond with array buffer views");t.buffer,function(t,n){var i=t.Lf.peek();if(i.byteOffset+i.bytesFilled!==n.byteOffset)throw new RangeError("The region specified by view does not match byobRequest");if(i.byteLength!==n.byteLength)throw new RangeError("The buffer of view has different capacity than byobRequest");i.buffer=n.buffer,Dn(t,n.byteLength)}(this.Mf,t)},t}(),yn=function(){function t(){throw new m("ReadableByteStreamController constructor cannot be used directly")}return p.defineProperty(t.prototype,"byobRequest",{get:function(){if(!1===_n(this))throw Fn("byobRequest");if(void 0===this.Bf&&this.Lf.length>0){var t=this.Lf.peek(),n=new E(t.buffer,t.byteOffset+t.bytesFilled,t.byteLength-t.bytesFilled),i=p.create(pn.prototype);!function(t,n,i){t.Mf=n,t.Nf=i}(i,this,n),this.Bf=i}return this.Bf},enumerable:!0,configurable:!0}),p.defineProperty(t.prototype,"desiredSize",{get:function(){if(!1===_n(this))throw Fn("desiredSize");return Mn(this)},enumerable:!0,configurable:!0}),t.prototype.close=function(){if(!1===_n(this))throw Fn("close");if(!0===this.Rf)throw new m("The stream has already been closed; do not close it again!");var t=this.Of.Fa;if("readable"!==t)throw new m("The stream (in "+t+" state) is not in the readable state and cannot be closed");!function(t){var n=t.Of;if(t.Qd>0)t.Rf=!0;else{if(t.Lf.length>0&&t.Lf.peek().bytesFilled>0){var i=new m("Insufficient bytes to fill elements in the given buffer");throw Bn(t,i),i}xn(t),Jn(n)}}(this)},t.prototype.enqueue=function(t){if(!1===_n(this))throw Fn("enqueue");if(!0===this.Rf)throw new m("stream is closed or draining");var n=this.Of.Fa;if("readable"!==n)throw new m("The stream (in "+n+" state) is not in the readable state and cannot be enqueued to");if(!ArrayBuffer.isView(t))throw new m("You can only enqueue array buffer views when using a ReadableByteStreamController");t.buffer,function(t,n){var i=t.Of,e=n.buffer,r=n.byteOffset,o=n.byteLength,u=e;!0===Q(i)?0===Z(i)?kn(t,u,r,o):$(i,new E(u,r,o),!1):!0===Vn(i)?(kn(t,u,r,o),An(t)):kn(t,u,r,o),Tn(t)}(this,t)},t.prototype.error=function(t){if(!1===_n(this))throw Fn("error");Bn(this,t)},t.prototype[j]=function(t){this.Lf.length>0&&(this.Lf.peek().bytesFilled=0),at(this);var n=this.xf(t);return xn(this),n},t.prototype[Y]=function(){var t=this.Of;if(this.Qd>0){var n=this.Kd.shift();this.Qd-=n.byteLength,Nn(this);var i=void 0;try{i=new E(n.buffer,n.byteOffset,n.byteLength)}catch(t){return O(t)}return R(L(i,!1,t.Od.Ld))}var e=this.Ff;if(void 0!==e){var r=void 0;try{r=new ArrayBuffer(e)}catch(t){return O(t)}var o={buffer:r,byteOffset:0,byteLength:e,bytesFilled:0,elementSize:1,ctor:E,readerType:"default"};this.Lf.push(o)}var u=G(t);return Tn(this),u},t}();function _n(t){return!!s(t)&&!!p.prototype.hasOwnProperty.call(t,"Of")}function Sn(t){return!!s(t)&&!!p.prototype.hasOwnProperty.call(t,"Mf")}function Tn(t){var n=function(t){var n=t.Of;if("readable"!==n.Fa)return!1;if(!0===t.Rf)return!1;if(!1===t._f)return!1;if(!0===Q(n)&&Z(n)>0)return!0;if(!0===Vn(n)&&Wn(n)>0)return!0;var i=Mn(t);return i>0}(t);!1!==n&&(!0!==t.Cf?(t.Cf=!0,P(t.Pf(),(function(){t.Cf=!1,!0===t.Df&&(t.Df=!1,Tn(t))}),(function(n){Bn(t,n)}))):t.Df=!0)}function En(t,n){var i=!1;"closed"===t.Fa&&(i=!0);var e=In(n);"default"===n.readerType?$(t,e,i):function(t,n,i){var e=t.Od,r=e.Vf.shift();r.Gd(L(n,i,e.Ld))}(t,e,i)}function In(t){var n=t.bytesFilled,i=t.elementSize;return new t.ctor(t.buffer,t.byteOffset,n/i)}function kn(t,n,i,e){t.Kd.push({buffer:n,byteOffset:i,byteLength:e}),t.Qd+=e}function Rn(t,n){var i=n.elementSize,e=n.bytesFilled-n.bytesFilled%i,r=y.min(t.Qd,n.byteLength-n.bytesFilled),o=n.bytesFilled+r,u=o-o%i,s=r,f=!1;u>e&&(s=u-n.bytesFilled,f=!0);for(var h=t.Kd;s>0;){var a=h.peek(),v=y.min(s,a.byteLength),d=n.byteOffset+n.bytesFilled;c(n.buffer,d,a.buffer,a.byteOffset,v),a.byteLength===v?h.shift():(a.byteOffset+=v,a.byteLength-=v),t.Qd-=v,On(t,v,n),s-=v}return f}function On(t,n,i){Pn(t),i.bytesFilled+=n}function Nn(t){0===t.Qd&&!0===t.Rf?(xn(t),Jn(t.Of)):Tn(t)}function Pn(t){void 0!==t.Bf&&(t.Bf.Mf=void 0,t.Bf.Nf=void 0,t.Bf=void 0)}function An(t){for(;t.Lf.length>0;){if(0===t.Qd)return;var n=t.Lf.peek();!0===Rn(t,n)&&(Cn(t),En(t.Of,n))}}function Dn(t,n){var i=t.Lf.peek();if("closed"===t.Of.Fa){if(0!==n)throw new m("bytesWritten must be 0 when calling respond() on a closed stream");!function(t,n){n.buffer=n.buffer;var i=t.Of;if(!0===Vn(i))for(;Wn(i)>0;)En(i,Cn(t))}(t,i)}else!function(t,n,i){if(i.bytesFilled+n>i.byteLength)throw new RangeError("bytesWritten out of range");if(On(t,n,i),!(i.bytesFilled<i.elementSize)){Cn(t);var e=i.bytesFilled%i.elementSize;if(e>0){var r=i.byteOffset+i.bytesFilled,o=i.buffer.slice(r-e,r);kn(t,o,0,o.byteLength)}i.buffer=i.buffer,i.bytesFilled-=e,En(t.Of,i),An(t)}}(t,n,i);Tn(t)}function Cn(t){var n=t.Lf.shift();return Pn(t),n}function xn(t){t.Pf=void 0,t.xf=void 0}function Bn(t,n){var i=t.Of;"readable"===i.Fa&&(function(t){Pn(t),t.Lf=new M}(t),at(t),xn(t),Qn(i,n))}function Mn(t){var n=t.Of.Fa;return"errored"===n?null:"closed"===n?0:t.Af-t.Qd}function Ln(t,n,i){var e=p.create(yn.prototype),r=v(n,"pull",0,[e]),o=v(n,"cancel",1,[]),u=n.autoAllocateChunkSize;if(void 0!==u&&(u=Number(u),!1===mn(u)||u<=0))throw new RangeError("autoAllocateChunkSize must be a positive integer");!function(t,n,i,e,r,o,u){n.Of=t,n.Df=!1,n.Cf=!1,n.Bf=void 0,n.Kd=n.Qd=void 0,at(n),n.Rf=!1,n._f=!1,n.Af=w(o),n.Pf=e,n.xf=r,n.Ff=u,n.Lf=new M,t.zd=n,P(R(i()),(function(){n._f=!0,Tn(n)}),(function(t){Bn(n,t)}))}(t,e,(function(){return d(n,"start",[e])}),r,o,i,u)}function Un(t){return new m("ReadableStreamBYOBRequest.prototype."+t+" can only be used on a ReadableStreamBYOBRequest")}function Fn(t){return new m("ReadableByteStreamController.prototype."+t+" can only be used on a ReadableByteStreamController")}function zn(t){return k((function(n,i){var e={Gd:n,Zd:i};t.Od.Vf.push(e)}))}function Wn(t){return t.Od.Vf.length}function Vn(t){var n=t.Od;return void 0!==n&&!!qn(n)}var Hn=function(){function t(t){if(!Gn(t))throw new m("ReadableStreamBYOBReader can only be constructed with a ReadableStream instance given a byte source");if(!1===_n(t.zd))throw new m("Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte source");if($n(t))throw new m("This stream has already been locked for exclusive reading by another reader");U(this,t),this.Vf=new M}return p.defineProperty(t.prototype,"closed",{get:function(){return qn(this)?this.Vd:O(Xn("closed"))},enumerable:!0,configurable:!0}),t.prototype.cancel=function(t){return qn(this)?void 0===this.Bd?O(W("cancel")):F(this,t):O(Xn("cancel"))},t.prototype.read=function(t){return qn(this)?void 0===this.Bd?O(W("read from")):ArrayBuffer.isView(t)?(t.buffer,0===t.byteLength?O(new m("view must have non-zero byteLength")):function(t,n){var i=t.Bd;return i.Xd=!0,"errored"===i.Fa?O(i.Fd):function(t,n){var i=t.Of,e=1;n.constructor!==DataView&&(e=n.constructor.BYTES_PER_ELEMENT);var r=n.constructor,o={buffer:n.buffer,byteOffset:n.byteOffset,byteLength:n.byteLength,bytesFilled:0,elementSize:e,ctor:r,readerType:"byob"};if(t.Lf.length>0)return t.Lf.push(o),zn(i);if("closed"===i.Fa)return R(L(new r(o.buffer,o.byteOffset,0),!0,i.Od.Ld));if(t.Qd>0){if(!0===Rn(t,o)){var u=In(o);return Nn(t),R(L(u,!1,i.Od.Ld))}if(!0===t.Rf){var s=new m("Insufficient bytes to fill elements in the given buffer");return Bn(t,s),O(s)}}t.Lf.push(o);var f=zn(i);return Tn(t),f}(i.zd,n)}(this,t)):O(new m("view must be an array buffer view")):O(Xn("read"))},t.prototype.releaseLock=function(){if(!qn(this))throw Xn("releaseLock");if(void 0!==this.Bd){if(this.Vf.length>0)throw new m("Tried to release a reader lock when that reader has pending read() calls un-settled");z(this)}},t}();function qn(t){return!!s(t)&&!!p.prototype.hasOwnProperty.call(t,"Vf")}function Xn(t){return new m("ReadableStreamBYOBReader.prototype."+t+" can only be used on a ReadableStreamBYOBReader")}var jn=function(){function t(t,n){void 0===t&&(t={}),void 0===n&&(n={}),Kn(this);var i=n.size,e=n.highWaterMark,r=t.type;if("bytes"===String(r)){if(void 0!==i)throw new RangeError("The strategy for a byte stream cannot have a size function");void 0===e&&(e=0),Ln(this,t,e=w(e))}else{if(void 0!==r)throw new RangeError("Invalid type is specified");var o=b(i);void 0===e&&(e=1),function(t,n,i,e){var r=p.create(un.prototype),o=v(n,"pull",0,[r]),u=v(n,"cancel",1,[]);bn(t,r,(function(){return d(n,"start",[r])}),o,u,i,e)}(this,t,e=w(e),o)}}return p.defineProperty(t.prototype,"locked",{get:function(){if(!1===Gn(this))throw ti("locked");return $n(this)},enumerable:!0,configurable:!0}),t.prototype.cancel=function(t){return!1===Gn(this)?O(ti("cancel")):!0===$n(this)?O(new m("Cannot cancel a stream that already has a reader")):Zn(this,t)},t.prototype.getReader=function(t){var n=(void 0===t?{}:t).mode;if(!1===Gn(this))throw ti("getReader");if(void 0===n)return K(this,!0);if("byob"===(n=String(n)))return function(t,n){void 0===n&&(n=!1);var i=new Hn(t);return i.Ld=n,i}(this,!0);throw new RangeError("Invalid mode is specified")},t.prototype.pipeThrough=function(t,n){var i=t.writable,e=t.readable,r=void 0===n?{}:n,o=r.preventClose,u=r.preventAbort,s=r.preventCancel,f=r.signal;if(!1===Gn(this))throw ti("pipeThrough");if(!1===gt(i))throw new m("writable argument to pipeThrough must be a WritableStream");if(!1===Gn(e))throw new m("readable argument to pipeThrough must be a ReadableStream");if(o=Boolean(o),u=Boolean(u),s=Boolean(s),void 0!==f&&!tn(f))throw new m("ReadableStream.prototype.pipeThrough's signal option must be an AbortSignal");if(!0===$n(this))throw new m("ReadableStream.prototype.pipeThrough cannot be used on a locked ReadableStream");if(!0===mt(i))throw new m("ReadableStream.prototype.pipeThrough cannot be used on a locked WritableStream");return x(on(this,i,o,u,s,f)),e},t.prototype.pipeTo=function(t,n){var i=void 0===n?{}:n,e=i.preventClose,r=i.preventAbort,o=i.preventCancel,u=i.signal;return!1===Gn(this)?O(ti("pipeTo")):!1===gt(t)?O(new m("ReadableStream.prototype.pipeTo's first argument must be a WritableStream")):(e=Boolean(e),r=Boolean(r),o=Boolean(o),void 0===u||tn(u)?!0===$n(this)?O(new m("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream")):!0===mt(t)?O(new m("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream")):on(this,t,e,r,o,u):O(new m("ReadableStream.prototype.pipeTo's signal option must be an AbortSignal")))},t.prototype.tee=function(){if(!1===Gn(this))throw ti("tee");var t=function(t,n){var i,e,r,o,u,s=K(t),c=!1,h=!1,a=!1,v=k((function(t){u=t}));function d(){return!0===c||(c=!0,x(C(rt(s),(function(t){if(c=!1,!0===t.done)return!1===h&&an(r.zd),void(!1===a&&an(o.zd));var n=t.value,i=n,e=n;!1===h&&vn(r.zd,i),!1===a&&vn(o.zd,e)})))),R(void 0)}function l(){}return r=Yn(l,d,(function(n){if(h=!0,i=n,!0===a){var r=f([i,e]),o=Zn(t,r);u(o)}return v})),o=Yn(l,d,(function(n){if(a=!0,e=n,!0===h){var r=f([i,e]),o=Zn(t,r);u(o)}return v})),D(s.Vd,(function(t){dn(r.zd,t),dn(o.zd,t)})),[r,o]}(this);return f(t)},t.prototype.getIterator=function(t){var n=(void 0===t?{}:t).preventCancel,i=void 0!==n&&n;if(!1===Gn(this))throw ti("getIterator");return function(t,n){void 0===n&&(n=!1);var i=K(t),e=p.create(ut);return e.qd=i,e.Yd=Boolean(n),e}(this,i)},t}();function Yn(t,n,i,e,r){void 0===e&&(e=1),void 0===r&&(r=function(){return 1});var o=p.create(jn.prototype);return Kn(o),bn(o,p.create(un.prototype),t,n,i,e,r),o}function Kn(t){t.Fa="readable",t.Od=void 0,t.Fd=void 0,t.Xd=!1}function Gn(t){return!!s(t)&&!!p.prototype.hasOwnProperty.call(t,"zd")}function $n(t){return void 0!==t.Od}function Zn(t,n){return t.Xd=!0,"closed"===t.Fa?R(void 0):"errored"===t.Fa?O(t.Fd):(Jn(t),C(t.zd[j](n),r))}function Jn(t){t.Fa="closed";var n=t.Od;void 0!==n&&(et(n)&&(n.Hd.forEach((function(t){t.Gd(L(void 0,!0,n.Ld))})),n.Hd=new M),X(n))}function Qn(t,n){t.Fa="errored",t.Fd=n;var i=t.Od;void 0!==i&&(et(i)?(i.Hd.forEach((function(t){t.Zd(n)})),i.Hd=new M):(i.Vf.forEach((function(t){t.Zd(n)})),i.Vf=new M),q(i,n))}function ti(t){return new m("ReadableStream.prototype."+t+" can only be used on a ReadableStream")}"symbol"===B(i.asyncIterator)&&p.defineProperty(jn.prototype,i.asyncIterator,{value:jn.prototype.getIterator,enumerable:!1,writable:!0,configurable:!0});var ni=function(){function t(t){var n=t.highWaterMark;this.highWaterMark=n}return t.prototype.size=function(t){return t.byteLength},t}(),ii=function(){function t(t){var n=t.highWaterMark;this.highWaterMark=n}return t.prototype.size=function(){return 1},t}(),ei=function(){function t(t,n,i){void 0===t&&(t={}),void 0===n&&(n={}),void 0===i&&(i={});var e=n.size,r=n.highWaterMark,o=i.size,u=i.highWaterMark;if(void 0!==t.writableType)throw new RangeError("Invalid writable type specified");var s=b(e);if(void 0===r&&(r=1),r=w(r),void 0!==t.readableType)throw new RangeError("Invalid readable type specified");var f,c=b(o);void 0===u&&(u=0),u=w(u),function(t,n,i,e,r,o){function u(){return n}function s(n){return function(t,n){var i=t.Wf;return!0===t.uf?C(t.Uf,(function(){var e=t.Gf;if("erroring"===e.Fa)throw e.Fd;return vi(i,n)})):vi(i,n)}(t,n)}function f(n){return function(t,n){return oi(t,n),R(void 0)}(t,n)}function c(){return function(t){var n=t.Zf,i=t.Wf,e=i.Hf();return hi(i),C(e,(function(){if("errored"===n.Fa)throw n.Fd;var t=n.zd;!0===wn(t)&&an(t)}),(function(i){throw oi(t,i),n.Fd}))}(t)}function h(){return function(t){return si(t,!1),t.Uf}(t)}function a(n){return ui(t,n),R(void 0)}t.Gf=function(t,n,i,e,r,o){void 0===r&&(r=1),void 0===o&&(o=function(){return 1});var u=p.create(lt.prototype);return bt(u),Bt(u,p.create(xt.prototype),t,n,i,e,r,o),u}(u,s,c,f,i,e),t.Zf=Yn(u,h,a,r,o),t.uf=void 0,t.Uf=void 0,t.Xf=void 0,si(t,!0),t.Wf=void 0}(this,k((function(t){f=t})),r,s,u,c),function(t,n){var i=p.create(fi.prototype),e=function(t){try{return ai(i,t),R(void 0)}catch(t){return O(t)}},r=n.transform;if(void 0!==r){if("function"!=typeof r)throw new m("transform is not a method");e=function(t){return l(r,n,[t,i])}}var o=v(n,"flush",0,[i]);!function(t,n,i,e){n.zf=t,t.Wf=n,n.qf=i,n.Hf=e}(t,i,e,o)}(this,t);var h=d(t,"start",[this.Wf]);f(h)}return p.defineProperty(t.prototype,"readable",{get:function(){if(!1===ri(this))throw li("readable");return this.Zf},enumerable:!0,configurable:!0}),p.defineProperty(t.prototype,"writable",{get:function(){if(!1===ri(this))throw li("writable");return this.Gf},enumerable:!0,configurable:!0}),t}();function ri(t){return!!s(t)&&!!p.prototype.hasOwnProperty.call(t,"Wf")}function oi(t,n){dn(t.Zf.zd,n),ui(t,n)}function ui(t,n){hi(t.Wf),Ft(t.Gf.$d,n),!0===t.uf&&si(t,!1)}function si(t,n){void 0!==t.Uf&&t.Xf(),t.Uf=k((function(n){t.Xf=n})),t.uf=n}var fi=function(){function t(){throw new m("TransformStreamDefaultController instances cannot be created directly")}return p.defineProperty(t.prototype,"desiredSize",{get:function(){if(!1===ci(this))throw di("desiredSize");return ln(this.zf.Zf.zd)},enumerable:!0,configurable:!0}),t.prototype.enqueue=function(t){if(!1===ci(this))throw di("enqueue");ai(this,t)},t.prototype.error=function(t){if(!1===ci(this))throw di("error");!function(t,n){oi(t.zf,n)}(this,t)},t.prototype.terminate=function(){if(!1===ci(this))throw di("terminate");!function(t){var n=t.zf,i=n.Zf.zd;!0===wn(i)&&an(i);var e=new m("TransformStream terminated");ui(n,e)}(this)},t}();function ci(t){return!!s(t)&&!!p.prototype.hasOwnProperty.call(t,"zf")}function hi(t){t.qf=void 0,t.Hf=void 0}function ai(t,n){var i=t.zf,e=i.Zf.zd;if(!1===wn(e))throw new m("Readable side is not in a state that permits enqueue");try{vn(e,n)}catch(t){throw ui(i,t),i.Zf.Fd}var r=function(t){return!0!==cn(t)}(e);r!==i.uf&&si(i,!0)}function vi(t,n){return C(t.qf(n),void 0,(function(n){throw oi(t.zf,n),n}))}function di(t){return new m("TransformStreamDefaultController.prototype."+t+" can only be used on a TransformStreamDefaultController")}function li(t){return new m("TransformStream.prototype."+t+" can only be used on a TransformStream")}t.ByteLengthQueuingStrategy=ni,t.CountQueuingStrategy=ii,t.ReadableStream=jn,t.TransformStream=ei,t.WritableStream=lt,p.defineProperty(t,"__esModule",{value:!0})},"object"===(void 0===t?"undefined":B(t))&&void 0!==i?o(t):"function"==typeof define&&define.amd?define(["exports"],o):o((r=r||self).WebStreamsPolyfill={})})),pt=C((function(t){function n(){var t=mt();return n=function(){return t},t}x(),gt(),p.defineProperty(t,"__esModule",{value:!0}),function(t,n){for(var i in n)p.defineProperty(t,i,{enumerable:!0,get:n[i]})}(t,{ByteLengthQueuingStrategy:function(){return n().ByteLengthQueuingStrategy},CountQueuingStrategy:function(){return n().CountQueuingStrategy},ReadableStream:function(){return n().ReadableStream},TransformStream:function(){return n().TransformStream},WritableStream:function(){return n().WritableStream}})}));function yt(t,n){return(yt=p.setPrototypeOf||function(t,n){return t.__proto__=n,t})(t,n)}function _t(t,n){if("function"!=typeof n&&null!==n)throw new m("Super expression must either be null or a function");t.prototype=p.create(n&&n.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),n&&yt(t,n)}function St(t,n){for(var i=0;i<n.length;i++){var e=n[i];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),p.defineProperty(t,e.key,e)}}function Tt(t,n,i){return n&&St(t.prototype,n),i&&St(t,i),t}x(),gt(),x(),gt(),x(),gt(),x(),gt(),x(),gt(),x(),gt(),x(),gt(),x(),gt(),x(),gt(),x(),gt(),x(),gt(),x(),gt();var Et,It=((Et={}).Tv="web",Et.Ev="android",Et.xv="android-tv",Et.Iv="ios",Et.Rv="tvos",Et.Cv="chromecast",Et.Pv="theoliveweb",Et);var kt=v?v.userAgent:"",Rt=kt.match(/chrome\/([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)/i),Ot=kt.match(/Edg\/([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)/i),Nt=kt.match(/Android ([0-9\.]+)/i),Pt=kt.match(/Windows NT ([0-9\.]+)/i),At=kt.match(/(Version)\/((\d+)\.(\d+)(?:\.(\d+))?).*Safari/),Dt=kt.match(/Firefox\/([0-9\.]+)/i),Ct=kt.match(/OPR\/(\d+\.\d+)/i),xt=kt.match(/Tizen ([0-9\.]+)/i),Bt=kt.match(/(iPhone OS|iPad OS|iPod OS|Mac OS X) (\d+)_(\d+)_?(\d+)?/),Mt=kt.match(/HbbTV\/([0-9.]+)/i),Lt=function(){function t(){this.Dv=Boolean("ontouchstart"in self||self.DocumentTouch&&a instanceof self.DocumentTouch||v&&v.msMaxTouchPoints),this.Mv=/(mac\sos\sx)\s?([\w\s\.]+\w)*/i.test(kt)||/(macintosh|mac(?=_powerpc)\s)/i.test(kt),this.Bv=/Windows NT/i.test(kt),this.Fv=Pt?S(Pt[1]):0,this.Wv=/Android/i.test(kt),this.Gv=Nt?S(Nt[1]):0,this.Hv=/windows phone (8|8\.1)/i.test(kt),this.zv=/iPhone/i.test(kt),this.Yv=/iPad/i.test(kt),this.Qv=this.Mv&&this.Dv&&!this.Yv,this.$v=/iPod/i.test(kt),this.dg=/Mobile Safari/i.test(kt),this.ag=/EOS\d*STB/i.test(kt),this.cg=/APP\d*STB/i.test(kt),this.eg=(this.zv||this.Yv||this.Qv||this.$v)&&!this.Hv,this.og=Bt?S(Bt[2]):0,this.fg=this.Hv||this.eg||this.Wv||this.dg,this.vg=/CriOS/i.test(kt),this.pg=Boolean(self.chrome&&/google/i.test(v.vendor))||this.vg,this.Tg=this.pg&&/Edg\//i.test(v.userAgent),this.xg=Ot?_(Ot[1],10):0,this.Fm=Boolean(/CriOS/i.test(kt)),this.Om=Boolean(self.chrome||/Chrome/i.test(kt)||this.Fm),this.Ag=Rt?_(Rt[1],10):0,this.Cg=/SMART-TV.*Tizen/i.test(kt),this.Dg=xt?S(xt[1]):0,this.yg=this.Dg>0?function(t){return t>=8?108:t>=7?94:t>=6.5?85:t>=6?76:t>=5.5?69:t>=5?63:t>=4?56:t>=3?47:0}(this.Dg):void 0,this.Mg=/webos|web0s/i.test(kt),this.Bg=/HbbTV/i.test(kt),this.Fg=!!Mt&&function(t){if(!t)return!1;var n=t.split(".").map(Number);return 3===n.length&&1===n[0]&&2===n[1]}(Mt[1]),this.Wg=/VIZIO/i.test(kt),this.Gg=/Edge\/\d+/i.test(kt),this.Hg=/Trident/i.test(kt),this.zg=this.Hg&&!self.ActiveXObject&&"ActiveXObject"in self,this.Yg=/Vivaldi/i.test(kt),this.jg=/Firefox/i.test(kt)&&!/Seamonkey/i.test(kt),this.Jg=Dt?S(Dt[1]):0,this.im=/Safari/i.test(kt)&&!/Chrome/i.test(kt)&&!this.Hv&&!this.Cg,this.hm=At?S(At[2]):0,this.lm=Boolean(Ct),this.fm=Ct?S(Ct[1]):0,this.vm=/CrKey/.test(kt),this.pm=/\b(tv|smart-tv|smarttv|appletv|crkey|googletv|hbbtv|pov_tv|roku|viera|nettv|philipstv|vizio)\b/i.test(kt),this.Am=/PlayStation 4/i.test(kt),this.Tm="web"===It.xv,this.xm="web"===It.Ev,this.Rm=this.xm||this.Tm,this.Pm="web"===It.Iv,this.Nm="web"===It.Rv,this.Lm="web"===It.Cv}return Tt(t,[{key:"Qe",get:function(){return this.Dv}},{key:"Nv",get:function(){return this.Mv}},{key:"Lv",get:function(){return this.Bv}},{key:"Ov",get:function(){return this.Fv}},{key:"Vv",get:function(){return this.Wv}},{key:"Uv",get:function(){return this.Gv}},{key:"Zv",get:function(){return this.Hv}},{key:"Xv",get:function(){return this.zv}},{key:"qv",get:function(){return this.Yv}},{key:"Kv",get:function(){return this.Qv}},{key:"Jv",get:function(){return this.$v}},{key:"su",get:function(){return this.eg}},{key:"rg",get:function(){return this.og}},{key:"hg",get:function(){return this.ag||this.cg}},{key:"ud",get:function(){return this.dg}},{key:"Qs",get:function(){return this.fg}},{key:"_g",get:function(){return this.vg}},{key:"gg",get:function(){return this.pg}},{key:"wg",get:function(){var t;return null!=(t=this.yg)?t:this.Ag}},{key:"Sg",get:function(){return this.Tg}},{key:"Eg",get:function(){var t;return(null==(t=h.chrome)?void 0:t.webview)&&this.xg>0}},{key:"Ig",get:function(){return this.xg}},{key:"Rg",get:function(){return this.Cg}},{key:"Pg",get:function(){return this.Dg}},{key:"Ng",get:function(){return this.Mg}},{key:"Lg",get:function(){return this.Bg}},{key:"Og",get:function(){return this.Fg}},{key:"Vg",get:function(){return this.Wg}},{key:"Ug",get:function(){return this.Gg}},{key:"Zg",get:function(){return this.Hg}},{key:"Xg",get:function(){return this.zg}},{key:"qg",get:function(){return this.Yg}},{key:"Kg",get:function(){return this.jg}},{key:"Qg",get:function(){return this.Jg}},{key:"$g",get:function(){return this.im}},{key:"nm",get:function(){return 0===this.hm&&Ut.su?this.og:this.hm}},{key:"um",get:function(){return this.lm}},{key:"dm",get:function(){return this.fm}},{key:"_m",get:function(){return this.vm}},{key:"gm",get:function(){return this.pm}},{key:"wm",get:function(){return!(!this.Ng&&!this.Rg)&&this.wg<=56}},{key:"ym",get:function(){return this.Am}},{key:"Sm",get:function(){return this.Tm}},{key:"Em",get:function(){return this.xm}},{key:"Im",get:function(){return this.Rm}},{key:"Cm",get:function(){return this.Pm}},{key:"Dm",get:function(){return this.Nm}},{key:"Mm",get:function(){return this.Lm}},{key:"Bm",get:function(){return this.Om}},{key:"IS_IOS_CHROME",get:function(){return this.Fm}}]),t}();Lt.Vm=new Lt;var Ut=Lt.Vm;x(),gt(),nt();var Ft={}.toString;function zt(t){return null!=t}var Wt,Vt=Array.isArray||function(t){return"[object Array]"===Ft.call(t)};function Ht(t){return"object"===(void 0===t?"undefined":B(t))&&null!==t}function qt(t){return"function"==typeof t}function Xt(t){return qt(t)||Ht(t)}function jt(t){Wt=t}x(),gt(),x(),gt();var Yt=function(){};function Kt(t){var n;return function(){return void 0!==t&&(n=t(),t=void 0),n}}function Gt(t,n,i,e,r,o,u){try{var s=t[o](u),f=s.value}catch(t){return void i(t)}s.done?n(f):J.resolve(f).then(e,r)}function $t(t){return function(){var n=this,i=arguments;return new J((function(e,r){var o=t.apply(n,i);function u(t){Gt(o,e,r,u,s,"next",t)}function s(t){Gt(o,e,r,u,s,"throw",t)}u(void 0)}))}}function Zt(t,i){var r,o,u,s={label:0,sent:function(){if(1&u[0])throw u[1];return u[1]},trys:[],ops:[]},f=p.create(("function"==typeof Iterator?Iterator:p).prototype);return f.next=c(0),f.throw=c(1),f.return=c(2),"function"==typeof n&&(f[e]=function(){return this}),f;function c(n){return function(e){return function(n){if(r)throw new m("Generator is already executing.");for(;f&&(f=0,n[0]&&(s=0)),s;)try{if(r=1,o&&(u=2&n[0]?o.return:n[0]?o.throw||((u=o.return)&&u.call(o),0):o.next)&&!(u=u.call(o,n[1])).done)return u;switch(o=0,u&&(n=[2&n[0],u.value]),n[0]){case 0:case 1:u=n;break;case 4:return s.label++,{value:n[1],done:!1};case 5:s.label++,o=n[1],n=[0];continue;case 7:n=s.ops.pop(),s.trys.pop();continue;default:if(!(u=s.trys,(u=u.length>0&&u[u.length-1])||6!==n[0]&&2!==n[0])){s=0;continue}if(3===n[0]&&(!u||n[1]>u[0]&&n[1]<u[3])){s.label=n[1];break}if(6===n[0]&&s.label<u[1]){s.label=u[1],u=n;break}if(u&&s.label<u[2]){s.label=u[2],s.ops.push(n);break}u[2]&&s.ops.pop(),s.trys.pop();continue}n=i.call(t,s)}catch(t){n=[6,t],o=0}finally{r=u=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}([n,e])}}}x(),gt(),x(),gt(),x(),gt(),x(),gt();var Jt="function"==typeof SuppressedError?SuppressedError:function(t,n,i){var e=new g(i);return e.name="SuppressedError",e.error=t,e.suppressed=n,e};function Qt(t,n){(null==n||n>t.length)&&(n=t.length);for(var i=0,e=new Array(n);i<n;i++)e[i]=t[i];return e}function tn(t,n){if(t){if("string"==typeof t)return Qt(t,n);var i=p.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(i):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?Qt(t,n):void 0}}function nn(t){return function(t){if(Array.isArray(t))return Qt(t)}(t)||function(t){if(void 0!==n&&null!=t[e]||null!=t["@@iterator"])return Array.from(t)}(t)||tn(t)||function(){throw new m("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}x(),gt(),x(),gt(),x(),gt(),x(),gt(),x(),gt(),x(),gt(),x(),gt(),x(),gt(),x(),gt(),x(),gt(),x(),gt(),x(),gt(),x(),gt();var en=9007199254740991,rn=(y.pow(2,-52),Array.prototype.find,Array.prototype.findLast,"function"==typeof Array.prototype.findIndex?function(t,n){return t.findIndex(n)}:function(t,n){for(var i=0;i<t.length;i+=1){if(n(t[i],i,t))return i}return-1}),on="function"==typeof Array.prototype.findLastIndex?function(t,n){return t.findLastIndex(n)}:function(t,n){for(var i=t.length-1;i>=0;i-=1){if(n(t[i],i,t))return i}return-1};Array.prototype.at;function un(t,n){var i=t.indexOf(n);return-1!==i&&(function(t,n){0===n?t.shift():t.splice(n,1)}(t,i),!0)}function sn(t,n){for(var i=new Array(t.length),e=0,r=0;r<t.length;){if(t[r]===n){r++,i.length-=1;break}i[e++]=t[r++]}for(;r<t.length;)i[e++]=t[r++];return i}function fn(t,n){return-1!==t.indexOf(n)}function cn(t){t.length=0}Array.prototype.flat,Array.prototype.flatMap;var hn=function(){function t(){this.zm=!1,this.qm=!1,this.Ym=[],this.jm=[]}var n=t.prototype;return n.Xm=function(){if(!this.zm&&!this.qm){this.zm=!0;for(var t=0,n=this.Ym.slice();t<n.length;t++){(0,n[t])()}this.Km()}},n.Km=function(){if(!this.qm){this.qm=!0;for(var t=0,n=this.jm.slice();t<n.length;t++){(0,n[t])()}cn(this.Ym),cn(this.jm)}},n.Qm=function(t){this.qm||this.Ym.push(t)},n.Jm=function(t){this.qm||un(this.Ym,t)},n.$m=function(t){this.qm||this.jm.push(t)},n.tp=function(t){this.qm||un(this.jm,t)},t}(),an=function(){function t(){this.sp=new hn}var n=t.prototype;return n.np=function(){this.sp.Xm()},n.Km=function(){this.sp.Km()},n.rp=function(t){var n=this.sp;if(!n.zm)if(t.zm)n.Xm();else if(!n.qm&&!t.qm){var i=function(){e(),n.Xm()},e=function(){t.Jm(i),t.tp(e),n.Jm(i),n.tp(e)};t.Qm(i),t.$m(e),n.Qm(i),n.$m(e)}},n.op=function(){var n=new t,i=new t,e=n.ep,r=i.ep,o=this.sp,u=function(){e.zm&&r.qm||r.zm&&e.qm?o.Xm():e.qm&&r.qm&&o.Km()};e.Qm(u),r.Qm(u),e.$m(u),r.$m(u),n.rp(o),i.rp(o);return o.$m((function(){e.Jm(u),r.Jm(u),e.tp(u),r.tp(u)})),[n,i]},n[r]=function(){this.np()},t.hp=function(n){for(var i=new t,e=0;e<n.length;e++){var r=n[e];void 0!==r&&i.rp(r)}return i},Tt(t,[{key:"ep",get:function(){return this.sp}}]),t}();x(),gt(),x(),gt();var vn=function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];g.apply(this,n)};(vn.prototype=p.create(g.prototype)).constructor=vn;var dn=function(t){function n(n,i){var e;return(e=t.call(this)||this).message=n||"Unknown error",e.cause=i,g.captureStackTrace&&g.captureStackTrace(e,e.constructor),e}return _t(n,t),Tt(n,[{key:"name",get:function(){return"BaseError"}}]),n}(vn),ln=function(t){function n(n,i){return t.call(this,n||"Aborted",i)||this}return _t(n,t),Tt(n,[{key:"name",get:function(){return"AbortError"}}]),n}(dn);function wn(t){return t instanceof g&&"AbortError"===t.name}function bn(t,n){return n?new J((function(i,e){if(n.zm)return t.catch(Yt),e(new ln);var r=function(){n.Jm(r),e(new ln)};n.Qm(r),t.then((function(t){n.Jm(r),i(t)}),(function(t){n.Jm(r),e(t)}))})):t}function gn(t,n){return mn.apply(this,arguments)}function mn(){return mn=$t((function(t,n){var i,e;return Zt(this,(function(u){switch(u.label){case 0:i={stack:[],error:void 0,hasError:!1},u.label=1;case 1:return u.trys.push([1,3,4,5]),function(t,n,i){if(null!=n){if("object"!=typeof n&&"function"!=typeof n)throw new m("Object expected.");var e,u;if(i){if(!o)throw new m("Symbol.asyncDispose is not defined.");e=n[o]}if(void 0===e){if(!r)throw new m("Symbol.dispose is not defined.");e=n[r],i&&(u=e)}if("function"!=typeof e)throw new m("Object not disposable.");u&&(e=function(){try{u.call(this)}catch(t){return J.reject(t)}}),t.stack.push({value:n,dispose:e,async:i})}else i&&t.stack.push({async:!0});return n}(i,n,!1),[4,t];case 2:return[2,u.sent()];case 3:return e=u.sent(),i.error=e,i.hasError=!0,[3,5];case 4:return function(t){function n(n){t.error=t.hasError?new Jt(n,t.error,"An error was suppressed during disposal."):n,t.hasError=!0}var i,e=0;(function r(){for(;i=t.stack.pop();)try{if(!i.async&&1===e)return e=0,t.stack.push(i),J.resolve().then(r);if(i.dispose){var o=i.dispose.call(i.value);if(i.async)return e|=2,J.resolve(o).then(r,(function(t){return n(t),r()}))}else e|=1}catch(t){n(t)}if(1===e)return t.hasError?J.reject(t.error):J.resolve();if(t.hasError)throw t.error})()}(i),[7];case 5:return[2]}}))})),mn.apply(this,arguments)}J.resolve();function pn(t,n){return new J((function(i,e){if(void 0!==n&&n.zm)e(new ln);else{var r=Wt.Gm((function(){void 0!==n&&n.Jm(o),i()}),t),o=function(){Wt.Um(r),e(new ln)};void 0!==n&&n.Qm(o)}}))}function yn(){return void 0!==a?a.createElement("video"):void 0}var _n=Kt(yn);Kt((function(){return"undefined"!=typeof HTMLVideoElement&&_n()instanceof HTMLVideoElement}));x(),gt(),x(),gt(),x(),gt();var Sn=null;try{Sn=new WebAssembly.Instance(new WebAssembly.Module(new E([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch(Et){}function Tn(t,n,i){this.low=0|t,this.high=0|n,this.unsigned=!!i}function En(t){return!0===(t&&t.cp)}function In(t){var n=y.clz32(t&-t);return t?31-n:n}Tn.prototype.cp,p.defineProperty(Tn.prototype,"cp",{value:!0}),Tn.isLong=En;var kn={},Rn={};function On(t,n){var i,e,r;return n?(r=0<=(t>>>=0)&&t<256)&&(e=Rn[t])?e:(i=Pn(t,0,!0),r&&(Rn[t]=i),i):(r=-128<=(t|=0)&&t<128)&&(e=kn[t])?e:(i=Pn(t,t<0?-1:0,!1),r&&(kn[t]=i),i)}function Nn(t,n){if(T(t))return n?Fn:Un;if(n){if(t<0)return Fn;if(t>=Bn)return qn}else{if(t<=-Mn)return Xn;if(t+1>=Mn)return Hn}return t<0?Nn(-t,n).neg():Pn(t%xn|0,t/xn|0,n)}function Pn(t,n,i){return new Tn(t,n,i)}Tn.fromInt=On,Tn.fromNumber=Nn,Tn.fromBits=Pn;var An=y.pow;function Dn(t,n,i){if(0===t.length)throw g("empty string");if("number"==typeof n?(i=n,n=!1):n=!!n,"NaN"===t||"Infinity"===t||"+Infinity"===t||"-Infinity"===t)return n?Fn:Un;if((i=i||10)<2||36<i)throw RangeError("radix");var e;if((e=t.indexOf("-"))>0)throw g("interior hyphen");if(0===e)return Dn(t.substring(1),n,i).neg();for(var r=Nn(An(i,8)),o=Un,u=0;u<t.length;u+=8){var s=y.min(8,t.length-u),f=_(t.substring(u,u+s),i);if(s<8){var c=Nn(An(i,s));o=o.mul(c).add(Nn(f))}else o=(o=o.mul(r)).add(Nn(f))}return o.unsigned=n,o}function Cn(t,n){return"number"==typeof t?Nn(t,n):"string"==typeof t?Dn(t,n):Pn(t.low,t.high,"boolean"==typeof n?n:t.unsigned)}Tn.fromString=Dn,Tn.fromValue=Cn;var xn=4294967296,Bn=xn*xn,Mn=Bn/2,Ln=On(1<<24),Un=On(0);Tn.ZERO=Un;var Fn=On(0,!0);Tn.UZERO=Fn;var zn=On(1);Tn.ONE=zn;var Wn=On(1,!0);Tn.UONE=Wn;var Vn=On(-1);Tn.NEG_ONE=Vn;var Hn=Pn(-1,2147483647,!1);Tn.MAX_VALUE=Hn;var qn=Pn(-1,-1,!0);Tn.MAX_UNSIGNED_VALUE=qn;var Xn=Pn(0,-2147483648,!1);Tn.MIN_VALUE=Xn;var jn=Tn.prototype;jn.toInt=function(){return this.unsigned?this.low>>>0:this.low},jn.toNumber=function(){return this.unsigned?(this.high>>>0)*xn+(this.low>>>0):this.high*xn+(this.low>>>0)},jn.toString=function(t){if((t=t||10)<2||36<t)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative()){if(this.eq(Xn)){var n=Nn(t),i=this.div(n),e=i.mul(n).sub(this);return i.toString(t)+e.toInt().toString(t)}return"-"+this.neg().toString(t)}for(var r=Nn(An(t,6),this.unsigned),o=this,u="";;){var s=o.div(r),f=(o.sub(s.mul(r)).toInt()>>>0).toString(t);if((o=s).isZero())return f+u;for(;f.length<6;)f="0"+f;u=""+f+u}},jn.getHighBits=function(){return this.high},jn.getHighBitsUnsigned=function(){return this.high>>>0},jn.getLowBits=function(){return this.low},jn.getLowBitsUnsigned=function(){return this.low>>>0},jn.getNumBitsAbs=function(){if(this.isNegative())return this.eq(Xn)?64:this.neg().getNumBitsAbs();for(var t=0!=this.high?this.high:this.low,n=31;n>0&&0==(t&1<<n);n--);return 0!=this.high?n+33:n+1},jn.isZero=function(){return 0===this.high&&0===this.low},jn.eqz=jn.isZero,jn.isNegative=function(){return!this.unsigned&&this.high<0},jn.isPositive=function(){return this.unsigned||this.high>=0},jn.isOdd=function(){return 1==(1&this.low)},jn.isEven=function(){return 0==(1&this.low)},jn.equals=function(t){return En(t)||(t=Cn(t)),(this.unsigned===t.unsigned||this.high>>>31!=1||t.high>>>31!=1)&&(this.high===t.high&&this.low===t.low)},jn.eq=jn.equals,jn.notEquals=function(t){return!this.eq(t)},jn.neq=jn.notEquals,jn.ne=jn.notEquals,jn.lessThan=function(t){return this.comp(t)<0},jn.lt=jn.lessThan,jn.lessThanOrEqual=function(t){return this.comp(t)<=0},jn.lte=jn.lessThanOrEqual,jn.le=jn.lessThanOrEqual,jn.greaterThan=function(t){return this.comp(t)>0},jn.gt=jn.greaterThan,jn.greaterThanOrEqual=function(t){return this.comp(t)>=0},jn.gte=jn.greaterThanOrEqual,jn.ge=jn.greaterThanOrEqual,jn.compare=function(t){if(En(t)||(t=Cn(t)),this.eq(t))return 0;var n=this.isNegative(),i=t.isNegative();return n&&!i?-1:!n&&i?1:this.unsigned?t.high>>>0>this.high>>>0||t.high===this.high&&t.low>>>0>this.low>>>0?-1:1:this.sub(t).isNegative()?-1:1},jn.comp=jn.compare,jn.negate=function(){return!this.unsigned&&this.eq(Xn)?Xn:this.not().add(zn)},jn.neg=jn.negate,jn.add=function(t){En(t)||(t=Cn(t));var n=this.high>>>16,i=65535&this.high,e=this.low>>>16,r=65535&this.low,o=t.high>>>16,u=65535&t.high,s=t.low>>>16,f=0,c=0,h=0,a=0;return h+=(a+=r+(65535&t.low))>>>16,c+=(h+=e+s)>>>16,f+=(c+=i+u)>>>16,f+=n+o,Pn((h&=65535)<<16|(a&=65535),(f&=65535)<<16|(c&=65535),this.unsigned)},jn.subtract=function(t){return En(t)||(t=Cn(t)),this.add(t.neg())},jn.sub=jn.subtract,jn.multiply=function(t){if(this.isZero())return this;if(En(t)||(t=Cn(t)),Sn)return Pn(Sn.mul(this.low,this.high,t.low,t.high),Sn.get_high(),this.unsigned);if(t.isZero())return this.unsigned?Fn:Un;if(this.eq(Xn))return t.isOdd()?Xn:Un;if(t.eq(Xn))return this.isOdd()?Xn:Un;if(this.isNegative())return t.isNegative()?this.neg().mul(t.neg()):this.neg().mul(t).neg();if(t.isNegative())return this.mul(t.neg()).neg();if(this.lt(Ln)&&t.lt(Ln))return Nn(this.toNumber()*t.toNumber(),this.unsigned);var n=this.high>>>16,i=65535&this.high,e=this.low>>>16,r=65535&this.low,o=t.high>>>16,u=65535&t.high,s=t.low>>>16,f=65535&t.low,c=0,h=0,a=0,v=0;return a+=(v+=r*f)>>>16,h+=(a+=e*f)>>>16,a&=65535,h+=(a+=r*s)>>>16,c+=(h+=i*f)>>>16,h&=65535,c+=(h+=e*s)>>>16,h&=65535,c+=(h+=r*u)>>>16,c+=n*f+i*s+e*u+r*o,Pn((a&=65535)<<16|(v&=65535),(c&=65535)<<16|(h&=65535),this.unsigned)},jn.mul=jn.multiply,jn.divide=function(t){if(En(t)||(t=Cn(t)),t.isZero())throw g("division by zero");var n,i,e;if(Sn)return this.unsigned||-2147483648!==this.high||-1!==t.low||-1!==t.high?Pn((this.unsigned?Sn.div_u:Sn.div_s)(this.low,this.high,t.low,t.high),Sn.get_high(),this.unsigned):this;if(this.isZero())return this.unsigned?Fn:Un;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return Fn;if(t.gt(this.shru(1)))return Wn;e=Fn}else{if(this.eq(Xn))return t.eq(zn)||t.eq(Vn)?Xn:t.eq(Xn)?zn:(n=this.shr(1).div(t).shl(1)).eq(Un)?t.isNegative()?zn:Vn:(i=this.sub(t.mul(n)),e=n.add(i.div(t)));if(t.eq(Xn))return this.unsigned?Fn:Un;if(this.isNegative())return t.isNegative()?this.neg().div(t.neg()):this.neg().div(t).neg();if(t.isNegative())return this.div(t.neg()).neg();e=Un}for(i=this;i.gte(t);){n=y.max(1,y.floor(i.toNumber()/t.toNumber()));for(var r=y.ceil(y.log(n)/y.LN2),o=r<=48?1:An(2,r-48),u=Nn(n),s=u.mul(t);s.isNegative()||s.gt(i);)s=(u=Nn(n-=o,this.unsigned)).mul(t);u.isZero()&&(u=zn),e=e.add(u),i=i.sub(s)}return e},jn.div=jn.divide,jn.modulo=function(t){return En(t)||(t=Cn(t)),Sn?Pn((this.unsigned?Sn.rem_u:Sn.rem_s)(this.low,this.high,t.low,t.high),Sn.get_high(),this.unsigned):this.sub(this.div(t).mul(t))},jn.mod=jn.modulo,jn.rem=jn.modulo,jn.not=function(){return Pn(~this.low,~this.high,this.unsigned)},jn.countLeadingZeros=function(){return this.high?y.clz32(this.high):y.clz32(this.low)+32},jn.clz=jn.countLeadingZeros,jn.countTrailingZeros=function(){return this.low?In(this.low):In(this.high)+32},jn.ctz=jn.countTrailingZeros,jn.and=function(t){return En(t)||(t=Cn(t)),Pn(this.low&t.low,this.high&t.high,this.unsigned)},jn.or=function(t){return En(t)||(t=Cn(t)),Pn(this.low|t.low,this.high|t.high,this.unsigned)},jn.xor=function(t){return En(t)||(t=Cn(t)),Pn(this.low^t.low,this.high^t.high,this.unsigned)},jn.shiftLeft=function(t){return En(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?Pn(this.low<<t,this.high<<t|this.low>>>32-t,this.unsigned):Pn(0,this.low<<t-32,this.unsigned)},jn.shl=jn.shiftLeft,jn.shiftRight=function(t){return En(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?Pn(this.low>>>t|this.high<<32-t,this.high>>t,this.unsigned):Pn(this.high>>t-32,this.high>=0?0:-1,this.unsigned)},jn.shr=jn.shiftRight,jn.shiftRightUnsigned=function(t){return En(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?Pn(this.low>>>t|this.high<<32-t,this.high>>>t,this.unsigned):Pn(32===t?this.high:this.high>>>t-32,0,this.unsigned)},jn.shru=jn.shiftRightUnsigned,jn.shr_u=jn.shiftRightUnsigned,jn.rotateLeft=function(t){var n;return En(t)&&(t=t.toInt()),0==(t&=63)?this:32===t?Pn(this.high,this.low,this.unsigned):t<32?(n=32-t,Pn(this.low<<t|this.high>>>n,this.high<<t|this.low>>>n,this.unsigned)):(n=32-(t-=32),Pn(this.high<<t|this.low>>>n,this.low<<t|this.high>>>n,this.unsigned))},jn.rotl=jn.rotateLeft,jn.rotateRight=function(t){var n;return En(t)&&(t=t.toInt()),0==(t&=63)?this:32===t?Pn(this.high,this.low,this.unsigned):t<32?(n=32-t,Pn(this.high<<n|this.low>>>t,this.low<<n|this.high>>>t,this.unsigned)):(n=32-(t-=32),Pn(this.low<<n|this.high>>>t,this.high<<n|this.low>>>t,this.unsigned))},jn.rotr=jn.rotateRight,jn.toSigned=function(){return this.unsigned?Pn(this.low,this.high,!1):this},jn.toUnsigned=function(){return this.unsigned?this:Pn(this.low,this.high,!0)},jn.toBytes=function(t){return t?this.toBytesLE():this.toBytesBE()},jn.toBytesLE=function(){var t=this.high,n=this.low;return[255&n,n>>>8&255,n>>>16&255,n>>>24,255&t,t>>>8&255,t>>>16&255,t>>>24]},jn.toBytesBE=function(){var t=this.high,n=this.low;return[t>>>24,t>>>16&255,t>>>8&255,255&t,n>>>24,n>>>16&255,n>>>8&255,255&n]},Tn.fromBytes=function(t,n,i){return i?Tn.fromBytesLE(t,n):Tn.fromBytesBE(t,n)},Tn.fromBytesLE=function(t,n){return new Tn(t[0]|t[1]<<8|t[2]<<16|t[3]<<24,t[4]|t[5]<<8|t[6]<<16|t[7]<<24,n)},Tn.fromBytesBE=function(t,n){return new Tn(t[4]<<24|t[5]<<16|t[6]<<8|t[7],t[0]<<24|t[1]<<16|t[2]<<8|t[3],n)};var Yn=Tn;function Kn(){return Date.now()||(new Date).getTime()}Yn.fromNumber(en);var Gn=Boolean("ontouchstart"in self||self.DocumentTouch&&a instanceof self.DocumentTouch)||Boolean(v&&v.msMaxTouchPoints),$n=_n(),Zn=Boolean($n&&$n.webkitShowPlaybackTargetPicker),Jn=function(){function t(){this.dp=void 0,this.Mp=!1,this.Qe=Gn,this.Qs=!1,this.ap=!0}var n=t.prototype;return n.fp=function(){return 0},n.Pp=function(t,n){return!0},n.Dp=function(t){return t>=.3333333333333333},Tt(t,[{key:"lp",get:function(){return void 0===this.dp&&(this.dp=this.fp()),this.dp}},{key:"_p",get:function(){return!Ut.gm}},{key:"vp",get:function(){if(h.screen)return{width:h.screen.width,height:h.screen.height}}},{key:"gp",get:function(){return h.devicePixelRatio||1}},{key:"mp",get:function(){return Zn}},{key:"pp",get:function(){return!1}},{key:"wp",get:function(){return!0}},{key:"yp",get:function(){return!!(Ut.$g||Ut.su||Ut.Eg)||!!Ut.Vg}},{key:"bp",get:function(){return Ut.Vg}},{key:"Ap",get:function(){return!Ut.su}},{key:"Sp",get:function(){return!0}},{key:"Tp",get:function(){return!0}},{key:"kp",get:function(){return!1}},{key:"Ep",get:function(){}},{key:"xp",get:function(){return!0}},{key:"Ip",get:function(){return!1}},{key:"Rp",get:function(){return Ut.Vg}},{key:"Cp",get:function(){return!1}},{key:"Np",get:function(){return!1}}]),t}(),Qn=function(t){function n(){return t.call(this)||this}return _t(n,t),n}(Jn);x(),gt();var ti=function(t){function n(){return t.apply(this,arguments)||this}return _t(n,t),n.prototype.Pp=function(t,n){if(t&&t.Lp&&n&&n.Lp){var i=ni(t.Lp,"mp4a.40.2")&&ni(n.Lp,"mp4a.40.5"),e=ni(t.Lp,"mp4a.40.5")&&ni(n.Lp,"mp4a.40.2"),r=ni(t.Lp,"mp4a.40.2")&&ni(n.Lp,"mp4a.40.34"),o=ni(t.Lp,"mp4a.40.34")&&ni(n.Lp,"mp4a.40.2"),u=ni(t.Lp,"mp4a.40.5")&&ni(n.Lp,"mp4a.40.34"),s=ni(t.Lp,"mp4a.40.34")&&ni(n.Lp,"mp4a.40.5");return!(i||e||r||o||u||s)}return!0},Tt(n,[{key:"Ep",get:function(){if(Ut.Nv)return 4096}}]),n}(Qn);function ni(t,n){return t.indexOf(n)>-1}x(),gt();var ii=function(t){function n(){return t.apply(this,arguments)||this}return _t(n,t),n.prototype.Dp=function(t){return t>=2},n}(Qn);x(),gt();var ei=function(t){function n(){var n;return(n=t.call(this)||this).Mp=Ut.nm>=11,n.ap=Ut.$g&&!(Ut.su&&Ut.nm<10),n}return _t(n,t),Tt(n,[{key:"Cp",get:function(){return Ut.nm<17}},{key:"Np",get:function(){return!0}}]),n}(Qn);x(),gt();var ri,oi=function(t){function n(){return t.apply(this,arguments)||this}return _t(n,t),Tt(n,[{key:"xp",get:function(){return!Ut.Lv||(Ut.Sg?92!==Ut.Ig:Ut.wg>=100)}}]),n}(Qn);x(),gt(),x(),gt(),x(),gt(),x(),gt(),x(),gt();var ui=function(){var t=yn();if(!t)return!1;var n=t.muted;return t.muted=!n,t.muted!==n}();!function(){if(Ut.Kv)return!1;var t=yn();if(!t)return!1;var n=t.volume;t.volume=n/2+.1,t.volume}();var si=function(t){function n(n){var i;return(i=t.call(this)||this).Bp=n,i.Mp=i.Bp.Mp,i.Qe=i.Bp.Qe,i.ap=ui&&i.Bp.ap,i}_t(n,t);var i=n.prototype;return i.fp=function(){return this.Bp.lp},i.Pp=function(t,n){return this.Bp.Pp(t,n)},i.Dp=function(t){return this.Bp.Dp(t)},Tt(n,[{key:"Ep",get:function(){return this.Bp.Ep}},{key:"xp",get:function(){return this.Bp.xp}},{key:"Cp",get:function(){return this.Bp.Cp}}]),n}(Jn),fi=function(t){function n(n){var i;return(i=t.call(this,n)||this).Mp=!0,i.Qs=!0,i}return _t(n,t),Tt(n,[{key:"kp",get:function(){return Ut.su}}]),n}(si);x(),gt();var ci=function(t){function n(){return t.apply(this,arguments)||this}return _t(n,t),n.prototype.fp=function(){return function(t){return t&&Xt(h.ManagedMediaSource)?h.ManagedMediaSource:Xt(h.MediaSource)?h.MediaSource:void 0}(!0)?t.prototype.fp.call(this):1},Tt(n,[{key:"kp",get:function(){return!0}}]),n}(fi);x(),gt();var hi=function(t){function n(){return t.apply(this,arguments)||this}return _t(n,t),n.prototype.Pp=function(n,i){return t.prototype.Pp.call(this,n,i)},Tt(n,[{key:"pp",get:function(){return Ut.Pg<3}},{key:"wp",get:function(){return Ut.Pg>=3}},{key:"vp",get:function(){var t=this;return h.tizen&&!this.Wp&&h.tizen.systeminfo.getPropertyValue("DISPLAY",(function(n){var i=n.resolutionWidth,e=n.resolutionHeight;1===i&&1===e||(t.Wp={width:i,height:e})})),this.Wp}},{key:"Ip",get:function(){return Ut.Pg<3}}]),n}(si);x(),gt();var ai=function(t){function n(){return t.apply(this,arguments)||this}return _t(n,t),Tt(n,[{key:"vp",get:function(){var t=this;return h.webOS&&!this.Wp&&h.webOS.deviceInfo((function(n){t.Wp={width:n.screenWidth,height:n.screenHeight}})),this.Wp}},{key:"Sp",get:function(){return!1}}]),n}(si);x(),gt();var vi=function(t){function n(){return t.apply(this,arguments)||this}return _t(n,t),Tt(n,[{key:"kp",get:function(){return!0}},{key:"Np",get:function(){return this.Bp.Np}}]),n}(si);!function(t){ri=t}(function(){var t=function(){if(Ut.Kg)return new ti;if(Ut.Ug||Ut.Zg)return new ii;if(Ut.$g)return new ei;if(Ut.gg)return new oi;return new Qn}();return Ut.su?new ci(t):Ut.Qs?new fi(t):Ut.Rg?new hi(t):Ut.Ng?new ai(t):Ut.Nv?new vi(t):new si(t)}()),x(),gt(),x(),gt(),nt(),x(),gt();var di=!(Ut.Zg&&!Ut.Xg),li=self.console;function wi(t){if(Ht(t))try{return JSON.stringify(t)}catch(t){}return t}function bi(t){return t.map(wi).join(" ")}function gi(t){var n=li&&li[t];return n?n.bind&&di?n.bind(li):function(){for(var n=arguments.length,i=new Array(n),e=0;e<n;e++)i[e]=arguments[e];li[t](bi(i))}:void 0}var mi=gi("log")||Yt,pi=gi("warn")||mi.bind(void 0,"WARNING:"),yi=gi("error")||mi.bind(void 0,"ERROR:"),_i=function(){var t=li&&li.assert;return t?t.bind&&di?t.bind(li):function(t){for(var n=arguments.length,i=new Array(n>1?n-1:0),e=1;e<n;e++)i[e-1]=arguments[e];li.assert(t,bi(i))}:function(t){for(var n=arguments.length,i=new Array(n>1?n-1:0),e=1;e<n;e++)i[e-1]=arguments[e];t||yi.apply(void 0,["Assertion failed:"].concat(nn(i)))}}();function Si(t,n){for(var i=0;i<n.length;i++){var e=n[i];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),p.defineProperty(t,e.key,e)}}function Ti(t,n){var i=function(t,n){var i=t.length;if(i<=1)return t;for(var e=new Array(i),r=1;r<i;r*=2){Ei(t,n,r,e);var o=t;t=e,e=o}return t}(t,n);return i!==t&&Ei(i,null,t.length,t),t}function Ei(t,n,i,e){var r,o,u,s,f,c=t.length,h=0,a=2*i;for(r=0;r<c;r+=a)for(u=(o=r+i)+i,o>c&&(o=c),u>c&&(u=c),s=r,f=o;;)if(s<o&&f<u)n(t[s],t[f])<=0?e[h++]=t[s++]:e[h++]=t[f++];else if(s<o)e[h++]=t[s++];else{if(!(f<u))break;e[h++]=t[f++]}}x(),gt();var Ii=/[a-zA-Z]/,ki=/[0-9]/,Ri=/[0-9a-fA-F]/,Oi=/^0x/i,Ni=/^[0-9]+$/,Pi=/^[0-9a-fA-F]+$/,Ai=/^[0-7]+$/,Di=p.prototype.toString,Ci=Array.isArray||function(t){return"[object Array]"===Di.call(t)},xi=void 0!==n&&"symbol"==typeof e;function Bi(t){return Ci(t)?t:Array.from(t)}function Mi(t,n,i){var e=t[n];t[n]=t[i],t[i]=e}function Li(t){return t>=65&&t<=90}function Ui(t){return Li(t)||function(t){return t>=97&&t<=122}(t)}function Fi(t){return t>=48&&t<=57}function zi(t){return Fi(t)||Ui(t)}function Wi(t){return Fi(t)||t>=65&&t<=70||t>=97&&t<=102}function Vi(t){return Li(t)?t+32:t}function Hi(t){return Fi(t)?t-48:t>=65&&t<=70?t-65+10:t>=97&&t<=102?t-97+10:-1}function qi(t,n){return void 0===n&&(n=!1),0<=t&&t<=9?t+48:10<=t&&t<=15?t+(n?87:55):-1}var Xi=y.min,ji=String.fromCharCode,Yi=16384;function Ki(t){for(var n=t.length,i=[],e=0;e<n;e+=Yi){var r=Xi(e+Yi,n);i.push(ji.apply(null,t.slice(e,r)))}return i.join("")}var Gi=2147483647,$i=/[^\0-\x7E]/,Zi=/[\x2E\u3002\uFF0E\uFF61]/g,Ji={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},Qi=y.floor,te=String.fromCharCode;function ne(t){throw new RangeError(Ji[t])}function ie(t){for(var n=[],i=0,e=t.length;i<e;){var r=t.charCodeAt(i++);if(r>=55296&&r<=56319&&i<e){var o=t.charCodeAt(i++);56320==(64512&o)?n.push(((1023&r)<<10)+(1023&o)+65536):(n.push(r),i--)}else n.push(r)}return n}var ee,re,oe,ue=function(t,n){return t+22+75*(t<26)-((0!=n)<<5)},se=function(t,n,i){var e=0;for(t=i?Qi(t/700):t>>1,t+=Qi(t/n);t>455;e+=36)t=Qi(t/35);return Qi(e+36*t/(t+38))},fe=function(t){return function(t,n){var i=t.split("@"),e="";i.length>1&&(e=i[0]+"@",t=i[1]);var r=function(t,n){for(var i=[],e=t.length;e--;)i[e]=n(t[e]);return i}((t=t.replace(Zi,".")).split("."),n).join(".");return e+r}(t,(function(t){return $i.test(t)?"xn--"+function(t){for(var n=[],i=(t=ie(t)).length,e=128,r=0,o=72,u=0,s=t;u<s.length;u++){var f=s[u];f<128&&n.push(te(f))}var c=n.length,h=c;for(c&&n.push("-");h<i;){for(var a=Gi,v=0,d=t;v<d.length;v++){var l=d[v];l>=e&&l<a&&(a=l)}var w=h+1;a-e>Qi((Gi-r)/w)&&ne("overflow"),r+=(a-e)*w,e=a;for(var b=0,g=t;b<g.length;b++){var m=g[b];if(m<e&&++r>Gi&&ne("overflow"),m==e){for(var p=r,y=36;;y+=36){var _=y<=o?1:y>=o+26?26:y-o;if(p<_)break;var S=p-_,T=36-_;n.push(te(ue(_+S%T,0))),p=Qi(S/T)}n.push(te(ue(p,0))),o=se(r,w,h==c),r=0,++h}}++r,++e}return n.join("")}(t):t}))};function ce(t){for(var n=[],i=0;i<t.length;i++){var e=t[i];e>65535&&(e-=65536,n.push(e>>>10&1023|55296),e=56320|1023&e),n.push(e)}return Ki(n)}function he(t){if(t>=55296&&t<=57343)throw new g("Lone surrogate U+"+t.toString(16).toUpperCase()+" is not a scalar value")}function ae(t,n){return t>>n&63|128}function ve(t,n){0!=(4294967168&t)?(0==(4294965248&t)?n.push(t>>6&31|192):0==(4294901760&t)?(he(t),n.push(t>>12&15|224),n.push(ae(t,6))):0==(4292870144&t)&&(n.push(t>>18&7|240),n.push(ae(t,12)),n.push(ae(t,6))),n.push(63&t|128)):n.push(t)}function de(t){for(var n=[],i=0;i<t.length;i++){ve(t[i],n)}return n}function le(){if(oe>=re)throw new g("Invalid byte index");var t=255&ee[oe];if(oe++,128==(192&t))return 63&t;throw new g("Invalid continuation byte")}function we(){var t,n;if(oe>re)throw new g("Invalid byte index");if(oe===re)return!1;if(t=255&ee[oe],oe++,0==(128&t))return t;if(192==(224&t)){if((n=(31&t)<<6|le())>=128)return n;throw new g("Invalid continuation byte")}if(224==(240&t)){if((n=(15&t)<<12|le()<<6|le())>=2048)return he(n),n;throw new g("Invalid continuation byte")}if(240==(248&t)&&(n=(7&t)<<18|le()<<12|le()<<6|le())>=65536&&n<=1114111)return n;throw new g("Invalid UTF-8 detected")}function be(t){return[37,qi(t>>4),qi(15&t)]}function ge(t){return function(t){return t>=0&&t<=31}(t)||t>126}function me(t){return ge(t)||32===t||34===t||60===t||62===t||96===t}function pe(t){return me(t)||35===t||63===t||123===t||125===t}function ye(t){return pe(t)||47===t||58===t||59===t||61===t||64===t||t>=91&&t<=94||124===t}function _e(t){return t<33||t>126||34===t||35===t||60===t||62===t}function Se(t){return _e(t)||39===t}function Te(t,n){if(!n(t))return[t];for(var i=de([t]),e=[],r=0;r<i.length;r++){var o=i[r];e.push.apply(e,be(o))}return e}function Ee(t,n){for(var i=[],e=0,r=ie(t);e<r.length;e++){var o=r[e];i.push.apply(i,Te(o,n))}return ce(i)}function Ie(t){return function(t){for(var n=[],i=t.length,e=0;e<i;e++){var r=t[e];if(37===r&&e+2<i&&Wi(t[e+1])&&Wi(t[e+2])){var o=Hi(t[e+1])<<4|Hi(t[e+2]);n.push(o),e+=2}else n.push(r)}return n}(de(t))}function ke(t){return ce(function(t){ee=t.slice(),re=ee.length,oe=0;for(var n,i=[];!1!==(n=we());)i.push(n);return i}(Ie(ie(t))))}function Re(t){var n=t.length,i=[0,0,0,0,0,0,0,0],e=0,r=null,o=0;if(o<n&&":"===t[o]){if(!(o+1<n&&":"===t[o+1]))throw new m;o+=2,r=e+=1}for(;o<n;){if(8===e)throw new m("Too many groups");if(":"!==t[o]){for(var u=0,s=0;s<4&&o<n&&Ri.test(t[o]);)u=u<<4|_(t[o],16),o+=1,s+=1;if("."===t[o]){if(0===s)throw new m;if(o-=s,e>6)throw new m;for(var f=0;o<n;){var c=null;if(f>0){if(!("."===t[o]&&f<4))throw new m;o+=1}if(!ki.test(t[o]))throw new m;for(;o<n&&ki.test(t[o]);){var h=_(t[o],10);if(null===c)c=h;else{if(0===c)throw new m;if((c=10*c+h)>255)throw new m}o+=1}i[e]=i[e]<<8|c,2!==(f+=1)&&4!==f||(e+=1)}if(4!==f)throw new m;break}if(":"===t[o]){if((o+=1)===n)throw new m}else if(o<n)throw new m;i[e]=u,e+=1}else{if(null!==r)throw new m("Too many :: groups");o+=1,r=e+=1}}if(null!==r){var a=e-r;for(e=7;0!==e&&a>0;)Mi(i,e,r+a-1),e-=1,a-=1}else if(8!==e)throw new m;return i}function Oe(t){var n=10,i=Ni;return Oi.test(t)?(t=t.slice(2),n=16,i=Pi):t.length>=2&&"0"===t[0]&&(t=t.slice(1),n=8,i=Ai),""===t?0:i.test(t)?_(t,n):void 0}var Ne={Up:4},Pe=/[\0\t\n\r #%/:?@\[\\\]]/,Ae=/[\0\t\n\r #/:?@\[\\\]]/;function De(t,n){if("["===t[0]){if("]"!==t[t.length-1])throw new m("Invalid IPv6 address");return{Up:2,Gp:Re(t.slice(1,-1))}}if(!n)return function(t){if(Ae.test(t))throw new m("Invalid code point in opaque host");var n=Ee(t,ge);return""===n?Ne:{Up:3,Zp:n}}(t);var i=function(t){var n=function(t){return fe(t.toLowerCase())}(t);return n}(ke(t));if(Pe.test(i))throw new m("Invalid code point in host");var e=function(t){var n=t.split(".");if(""===n[n.length-1]&&n.pop(),!(n.length>4)){for(var i=[],e=0;e<n.length;e++){var r=n[e];if(""===r)return;var o=Oe(r);if(void 0===o)return;i.push(o)}for(var u=0;u<i.length-1;u++)if(i[u]>255)throw new m;if(i[i.length-1]>=y.pow(256,5-i.length))throw new m;for(var s=i.pop(),f=0;f<i.length;f++)s+=i[f]*y.pow(256,3-f);return s}}(i);return void 0!==e?{Up:1,Gp:e}:""===i?Ne:{Up:0,Hp:i}}function Ce(t){switch(t.Up){case 0:return t.Hp;case 1:return function(t){for(var n=[],i=t,e=1;e<=4;e++)n.push(""+(255&i)),4!==e&&n.push("."),i>>>=8;return n.reverse().join("")}(t.Gp);case 2:return"["+function(t){for(var n="",i=function(t){for(var n=0,i=0,e=0,r=0,o=0;o<8;o++)0===t[o]?(0===r&&(e=o),r++):(r>i&&(n=e,i=r),r=0);return r>i&&(n=e,i=r),i>1?n:null}(t),e=!1,r=0;r<8;r++){if(e){if(0===t[r])continue;e=!1}i!==r?(n+=t[r].toString(16),7!==r&&(n+=":")):(n+=0===r?"::":":",e=!0)}return n}(t.Gp)+"]";case 3:return t.Zp;case 4:return""}}var xe=/\+/g;function Be(t){return 42===t||45===t||46===t||95===t||zi(t)}function Me(t){for(var n=t.split("&"),i=[],e=0;e<n.length;e++){var r=n[e];if(""!==r){var o=r.indexOf("="),u=void 0,s=void 0;-1!==o?(u=r.slice(0,o),s=r.slice(o+1)):(u=r,s=""),u=u.replace(xe," "),s=s.replace(xe," ");var f=ke(u),c=ke(s);i.push([f,c])}}return i}function Le(t){for(var n="",i=0;i<t.length;i++){var e=t[i];i>0&&(n+="&"),n+=Ue(de(ie(e[0])))+"="+Ue(de(ie(e[1])))}return n}function Ue(t){for(var n=[],i=0;i<t.length;i++){var e=t[i];32===e?n.push(43):Be(e)?n.push(e):n.push.apply(n,be(e))}return Ki(n)}var Fe=/(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])/;function ze(t){var n=""+t,i=Fe.exec(n);return i?function(t,n){for(var i=t.length,e=[],r=n;r<i;r++){var o=t.charCodeAt(r);if(Ve(o))if(He(o)||r===i-1)e.push(We);else{var u=t.charCodeAt(r+1);He(u)?(e.push(o,u),r++):e.push(We)}else e.push(o)}return t.slice(0,n)+Ki(e)}(n,i.index):n}var We=65533,Ve=function(t){return 55296==(63488&t)},He=function(t){return 0!=(1024&t)};function qe(t,n){var i=t[0],e=n[0];return i===e?0:i<e?-1:1}function Xe(t){t.D_.length=0}function je(t,n){!function(t,n){for(var i=0;i<n.length;i++)t[i]=n[i];t.length=n.length}(t.D_,Me(n))}function Ye(t){if(t.ic){var n=Le(t.D_);""===n&&(n=null),t.ic.ic.Xp=n}}var Ke=function(){function t(t){if(void 0===t&&(t=void 0),this.ic=null,null==t)this.D_=[];else if("object"==typeof t||"function"==typeof t)if(function(t){return t instanceof Ke&&!!Ci(t.D_)&&(!xi||t[e]===Ge)}(t))this.D_=t.D_.slice();else if(function(t){return null!=t&&(!!Ci(t)||!!xi&&"function"==typeof t[e])}(t)){this.D_=[];for(var n=0,i=Bi(t);n<i.length;n++){var r=Bi(i[n]);if(2!==r.length)throw new m("Invalid name-value pair");this.D_.push([ze(r[0]),ze(r[1])])}}else for(var o in this.D_=[],t)p.prototype.hasOwnProperty.call(t,o)&&this.D_.push([ze(o),ze(t[o])]);else(t=ze(t)).length>0&&"?"===t[0]&&(t=t.slice(1)),this.D_=Me(t)}var n=t.prototype;return n.append=function(t,n){t=ze(t),n=ze(n),this.D_.push([t,n]),Ye(this)},n.delete=function(t){t=ze(t);for(var n=this.D_,i=0;i<n.length;){n[i][0]===t?n.splice(i,1):i++}Ye(this)},n.get=function(t){t=ze(t);for(var n=this.D_,i=0;i<n.length;i++){var e=n[i];if(e[0]===t)return e[1]}return null},n.getAll=function(t){t=ze(t);for(var n=this.D_,i=[],e=0;e<n.length;e++){var r=n[e];r[0]===t&&i.push(r[1])}return i},n.has=function(t){t=ze(t);for(var n=this.D_,i=0;i<n.length;i++){if(n[i][0]===t)return!0}return!1},n.set=function(t,n){t=ze(t),n=ze(n);for(var i=this.D_,e=!1,r=0;r<i.length;){var o=i[r];o[0]===t?e?i.splice(r,1):(o[1]=n,e=!0,r++):r++}e||i.push([t,n]),Ye(this)},n.sort=function(){Ti(this.D_,qe),Ye(this)},n.toString=function(){return Le(this.D_)},n.entries=function(){return new Qe(this.D_,$e)},n.keys=function(){return new Qe(this.D_,Ze)},n.values=function(){return new Qe(this.D_,Je)},n.forEach=function(t){var n=this;this.D_.forEach((function(i){return t(i[1],i[0],n)}))},t}(),Ge=Ke.prototype.entries;xi&&(Ke.prototype[e]=Ge);var $e=function(t){return[t[0],t[1]]},Ze=function(t){return t[0]},Je=function(t){return t[1]},Qe=function(){function t(t,n){this.zp=0,this.D_=t,this.qp=n}return t.prototype.next=function(){return this.zp<this.D_.length?{done:!1,value:this.qp(this.D_[this.zp++])}:{done:!0,value:void 0}},t}(),tr="null";var nr=p.create(null);nr.ftp=21,nr.file=0,nr.gopher=70,nr.http=80,nr.https=443,nr.ws=80,nr.wss=443;var ir=/^(?:\.|%2e)$/i,er=/^(?:\.|%2e){2}$/i;function rr(t){return ir.test(t)}function or(t){return er.test(t)}function ur(t){return void 0!==nr[t]}function sr(t){return ur(t.Yp)}function fr(t){return""!==t.Kp||""!==t.jp}function cr(t){var n=t.length;if(!(n>=2))return!1;if(!ar(t.slice(0,2)))return!1;if(2!==n){var i=t[2];if(47!==i&&92!==i&&63!==i&&35!==i)return!1}return!0}function hr(t){return 2===t.length&&Ii.test(t[0])&&(":"===t[1]||"|"===t[1])}function ar(t){return 2===t.length&&hr(Ki(t))}function vr(t){return hr(t)&&":"===t[1]}function dr(t){var n=t.Qp;0!==n.length&&("file"===t.Yp&&1===n.length&&vr(n[0])||n.pop())}function lr(t){return null===t.Jp||Ne===t.Jp||t.$p||"file"===t.Yp}var wr=-1,br=/\t|\n|\r/g,gr=/^[\x00-\x1f ]+|[\x00-\x1f ]+$/g;function mr(t,n,i,e){void 0===i&&(i=null),void 0===e&&(e=null),i||(i=new yr,t=t.replace(gr,""));var r=null!==e?e:0;n=n||null;for(var o=[],u=!1,s=!1,f=!1,c=ie(t=t.replace(br,"")),h=c.length,a=0;a<=h;){var v=a<h?c[a]:wr;switch(r){case 0:if(!Ui(v)){if(null===e){o.length=0,r=2;continue}throw new m("Invalid scheme")}o.push(Vi(v)),r=1;break;case 1:if(zi(v)||43===v||45===v||46===v)o.push(Vi(v));else{if(58!==v){if(null===e){o.length=0,r=2,a=0;continue}throw new m("Invalid scheme")}var d=ce(o);if(null!==e){if(ur(i.Yp)&&!ur(d))return;if(!ur(i.Yp)&&ur(d))return;if((fr(i)||null!==i.ew)&&"file"===d)return;if("file"===i.Yp&&(i.Jp===Ne||null===i.Jp))return}if(i.Yp=d,null!==e)return void(sr(i)&&i.ew===nr[i.Yp]&&(i.ew=null));o.length=0,"file"===i.Yp?r=13:sr(i)&&n&&n.Yp===i.Yp?r=3:sr(i)?r=7:47===c[a+1]?(r=4,a+=1):(i.$p=!0,i.Qp.push(""),r=18)}break;case 2:if(!n||n.$p&&35!==v)throw new m("Invalid scheme");n.$p&&35===v?(i.Yp=n.Yp,i.Qp=n.Qp.slice(),i.Xp=n.Xp,i.iw="",i.$p=!0,r=20):"file"!==n.Yp?(r=5,a-=1):(r=13,a-=1);break;case 3:47===v&&47===c[a+1]?r=8:(r=5,a-=1);break;case 4:47===v?r=9:(r=17,a-=1);break;case 5:i.Yp=n.Yp,wr===v?(i.Kp=n.Kp,i.jp=n.jp,i.Jp=n.Jp,i.ew=n.ew,i.Qp=n.Qp.slice(),i.Xp=n.Xp):47===v?r=6:63===v?(i.Kp=n.Kp,i.jp=n.jp,i.Jp=n.Jp,i.ew=n.ew,i.Qp=n.Qp.slice(),i.Xp="",r=19):35===v?(i.Kp=n.Kp,i.jp=n.jp,i.Jp=n.Jp,i.ew=n.ew,i.Qp=n.Qp.slice(),i.Xp=n.Xp,i.iw="",r=20):92===v&&sr(i)?r=6:(i.Kp=n.Kp,i.jp=n.jp,i.Jp=n.Jp,i.ew=n.ew,i.Qp=n.Qp.slice(),i.Qp.pop(),r=17,a-=1);break;case 6:!sr(i)||47!==v&&92!==v?47===v?r=9:(i.Kp=n.Kp,i.jp=n.jp,i.Jp=n.Jp,i.ew=n.ew,r=17,a-=1):r=8;break;case 7:if(47!==v||47!==c[a+1]){r=8;continue}r=8,a+=1;break;case 8:47!==v&&92!==v&&(r=9,a-=1);break;case 9:if(64===v){u&&o.unshift(37,52,48),u=!0;for(var l=0;l<o.length;l++){var w=o[l];if(58!==w||f){var b=ce(Te(w,ye));f?i.jp+=b:i.Kp+=b}else f=!0}o.length=0}else if(wr===v||47===v||63===v||35===v||sr(i)&&92===v){if(u&&0===o.length)throw new m("Invalid host");a-=o.length+1,o.length=0,r=10}else o.push(v);break;case 10:case 11:if(null!==e&&"file"===i.Yp)a-=1,r=15;else if(58!==v||s)if(wr===v||47===v||63===v||35===v||sr(i)&&92===v){if(a-=1,sr(i)&&0===o.length)throw new m("Invalid host");if(null!==e&&0===o.length&&(fr(i)||null!==i.ew))return;var g=De(ce(o),sr(i));if(i.Jp=g,o.length=0,r=16,null!==e)return}else 91===v?s=!0:93===v&&(s=!1),o.push(v);else{if(0===o.length)throw new m("Invalid host");var p=De(ce(o),sr(i));if(i.Jp=p,o.length=0,r=12,11===e)return}break;case 12:if(Fi(v))o.push(v);else{if(!(wr===v||47===v||63===v||35===v||sr(i)&&92===v||null!==e))throw new m("Invalid port");if(0!==o.length){var y=_(ce(o),10);if(y>65535)throw new m("Invalid port");i.ew=y===nr[i.Yp]?null:y,o.length=0}if(null!==e)return;r=16,a-=1}break;case 13:i.Yp="file",47===v||92===v?r=14:n&&"file"===n.Yp?wr===v?(i.Jp=n.Jp,i.Qp=n.Qp.slice(),i.Xp=n.Xp):63===v?(i.Jp=n.Jp,i.Qp=n.Qp.slice(),i.Xp="",r=19):35===v?(i.Jp=n.Jp,i.Qp=n.Qp.slice(),i.Xp=n.Xp,i.iw="",r=20):(cr(c.slice(a))||(i.Jp=n.Jp,i.Qp=n.Qp.slice(),dr(i)),r=17,a-=1):(r=17,a-=1);break;case 14:47===v||92===v?r=15:(n&&"file"===n.Yp&&!cr(c.slice(a))&&(vr(n.Qp[0])?i.Qp.push(n.Qp[0]):i.Jp=n.Jp),r=17,a-=1);break;case 15:if(wr===v||47===v||92===v||63===v||35===v)if(a-=1,null===e&&ar(o))r=17;else if(0===o.length){if(i.Jp=Ne,null!==e)return;r=16}else{var S=De(ce(o),sr(i));if(0===S.Up&&"localhost"===S.Hp&&(S=Ne),i.Jp=S,null!==e)return;o.length=0,r=16}else o.push(v);break;case 16:sr(i)?(r=17,47!==v&&92!==v&&(a-=1)):null===e&&63===v?(i.Xp="",r=19):null===e&&35===v?(i.iw="",r=20):wr!==v&&(r=17,47!==v&&(a-=1));break;case 17:if(wr===v||47===v||sr(i)&&92===v||null===e&&(63===v||35===v)){var T=ce(o);if(or(T)?(dr(i),47===v||sr(i)&&92===v||i.Qp.push("")):!rr(T)||47===v||sr(i)&&92===v?rr(T)||("file"===i.Yp&&0===i.Qp.length&&ar(o)&&(Ne!==i.Jp&&null!==i.Jp&&(i.Jp=Ne),o[1]=58,T=ce(o)),i.Qp.push(T)):i.Qp.push(""),o.length=0,"file"===i.Yp&&(wr===v||63===v||35===v))for(;i.Qp.length>1&&""===i.Qp[0];)i.Qp.shift();63===v?(i.Xp="",r=19):35===v&&(i.iw="",r=20)}else o.push.apply(o,Te(v,pe));break;case 18:63===v?(i.Xp="",r=19):35===v?(i.iw="",r=20):wr!==v&&(i.Qp[0]+=ce(Te(v,ge)));break;case 19:null===e&&35===v?(i.iw="",r=20):wr!==v&&(i.Xp+=ce(Te(v,sr(i)?Se:_e)));break;case 20:wr===v||0===v||(i.iw+=ce(Te(v,me)))}a++}return i}function pr(t,n,i,e){try{mr(t,n,i,e)}catch(t){}}var yr=function(){this.Yp="",this.Kp="",this.jp="",this.Jp=null,this.ew=null,this.Qp=[],this.Xp=null,this.iw=null,this.$p=!1};function _r(t){switch(t.Yp){case"blob":var n;try{n=mr(t.Qp[0],null)}catch(t){return tr}return _r(n);case"ftp":case"gopher":case"http":case"https":case"ws":case"wss":return function(t,n,i){return t+"://"+Ce(n)+(null===i?"":":"+i)}(t.Yp,t.Jp,t.ew);default:return tr}}var Sr=function(){function t(t,n){var i,e=null;if(null!=n)if(function(t){return null!=t&&t instanceof Sr&&"object"==typeof t.ic}(n))e=n.ic;else try{e=mr(String(n),null)}catch(t){throw new m("Invalid base URL: "+t.message)}try{i=mr(String(t),e)}catch(t){throw new m("Invalid URL: "+t.message)}var r=i.Xp;this.ic=i,this.Xp=function(t){var n=new Ke;return null!==t&&je(n,t),n}(r),this.Xp.ic=this}var n=t.prototype;return n.toString=function(){return this.href},n.toJSON=function(){return this.href},function(t,n,i){n&&Si(t.prototype,n),i&&Si(t,i)}(t,[{key:"href",get:function(){return function(t,n){void 0===n&&(n=!1);var i=t.Yp+":";if(null!==t.Jp?(i+="//",fr(t)&&(i+=t.Kp,""!==t.jp&&(i+=":"+t.jp),i+="@"),i+=Ce(t.Jp),null!==t.ew&&(i+=":"+t.ew)):null===t.Jp&&"file"===t.Yp&&(i+="//"),t.$p)i+=t.Qp[0];else for(var e=0,r=t.Qp;e<r.length;e++)i+="/"+r[e];return null!==t.Xp&&(i+="?"+t.Xp),n||null===t.iw||(i+="#"+t.iw),i}(this.ic)},set:function(t){var n;try{n=mr(String(t),null)}catch(t){throw new m("Invalid URL: "+t.message)}this.ic=n,Xe(this.Xp);var i=this.ic.Xp;null!==i&&je(this.Xp,i)}},{key:"origin",get:function(){return _r(this.ic)}},{key:"protocol",get:function(){return this.ic.Yp+":"},set:function(t){pr(t+":",null,this.ic,0)}},{key:"username",get:function(){return this.ic.Kp},set:function(t){lr(this.ic)||(this.ic.Kp=Ee(t,ye))}},{key:"password",get:function(){return this.ic.jp},set:function(t){lr(this.ic)||(this.ic.jp=Ee(t,ye))}},{key:"host",get:function(){var t=this.ic,n=t.Jp;if(null===n)return"";var i=t.ew,e=Ce(n);return null!==i&&(e+=":"+i),e},set:function(t){this.ic.$p||pr(t,null,this.ic,10)}},{key:"hostname",get:function(){var t=this.ic.Jp;return null===t?"":Ce(t)},set:function(t){this.ic.$p||pr(t,null,this.ic,11)}},{key:"port",get:function(){var t=this.ic.ew;return null===t?"":""+t},set:function(t){lr(this.ic)||(""===t?this.ic.ew=null:pr(t,null,this.ic,12))}},{key:"pathname",get:function(){var t=this.ic.Qp;return this.ic.$p?t[0]:0===t.length?"":"/"+t.join("/")},set:function(t){this.ic.$p||(this.ic.Qp.length=0,pr(t,null,this.ic,16))}},{key:"search",get:function(){var t=this.ic.Xp;return null===t||""===t?"":"?"+t},set:function(t){t=ze(t);var n=this.ic;if(""===t)return n.Xp=null,void Xe(this.Xp);"?"===t[0]&&(t=t.slice(1)),n.Xp="",pr(t,null,n,19),je(this.Xp,t)}},{key:"searchParams",get:function(){return this.Xp}},{key:"hash",get:function(){var t=this.ic.iw;return null===t||""===t?"":"#"+t},set:function(t){""!==t?("#"===t[0]&&(t=t.slice(1)),this.ic.iw="",pr(t,null,this.ic,20)):this.ic.iw=null}}]),t}();function Tr(t){return t.document&&t.document.baseURI||t.location.href||""}x(),gt();var Er=function(){function t(){this.Aw=new Ir,this.Ew=ri,this.Tw=kr(),self.performance&&self.performance.now?this.Wm=function(){return self.performance.now()}:this.Wm=Kn}var n=t.prototype;return n.nw=function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];mi.apply(void 0,nn(n))},n.ow=function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];pi.apply(void 0,nn(n))},n.hw=function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];yi.apply(void 0,nn(n))},n.aw=function(t){for(var n=arguments.length,i=new Array(n>1?n-1:0),e=1;e<n;e++)i[e-1]=arguments[e];_i.apply(void 0,[t].concat(nn(i)))},n.Gm=function(t,n){return d(t,n)},n.uw=function(t,n){return w(t,n)},n.Um=function(t){l(t)},n.cw=function(t){b(t)},n.lw=function(){return this.dw.lw()},n.fw=function(){return this.dw.fw()},n._w=function(){return this.dw._w()},n.gw=function(){return this.dw.gw()},n.mw=function(){return this.dw.mw()},n.pw=function(t,n){return this.dw.pw(t,n)},n.ww=function(t){return this.dw.ww(t)},n.Bh=function(t,n){var i;return void 0===n&&(n=Tr(h)),i="object"!==(void 0===n?"undefined":B(n))||n instanceof Sr?n:n.href,new Sr(t,i)},n.Sw=function(t,n){if(void 0===n&&(n=Tr(h)),this.Tw){var i=function(t){return"string"==typeof t}(n)?n:n.toString();return new self.URL(t,i).href}return this.Bh(t,n).href},Tt(t,[{key:"yw",get:function(){return this.Aw}},{key:"Ys",get:function(){return this.Ew}},{key:"xw",get:function(){return{Iw:v&&v.userAgent.match(/Android /i)?"Android":"other",Rw:Boolean(v&&v.userAgent.match(/Android 8.0.0/i))}}},{key:"Cw",get:function(){return self&&self.location&&"https:"===self.location.protocol}},{key:"Pw",get:function(){return"languages"in v?v.languages.slice():[v.language]}}]),t}(),Ir=function(){function t(){}return Tt(t,[{key:"Dw",get:function(){return v.oscpu}},{key:"Ys",get:function(){return v.platform}},{key:"Nw",get:function(){return v.vendor}},{key:"Mw",get:function(){return v.vendorSub}}]),t}();function kr(){if(self.URL)try{var t=new self.URL("b","http://a");return t.pathname="c d","http://a/c%20d"===t.href}catch(t){}return!1}x(),gt();var Rr=function(){function t(){}var n=t.prototype;return n.mw=function(){return J.resolve(!1)},n.fw=function(){return J.resolve(!1)},n.gw=function(){return J.resolve(!1)},n._w=function(){return J.resolve(!1)},n.ww=function(t){return J.resolve(!1)},n.pw=function(t,n){return J.resolve(!1)},n.lw=function(){return J.resolve(!1)},t}();x(),gt();var Or=function(){function t(){}var n=t.prototype;return n.yk=function(){},n.Vb=function(t){},n.Bb=function(t){},n.Ob=function(t,n){},t}();x(),gt();var Nr="default",Pr="unknown";x(),gt(),x(),gt(),x(),gt();var Ar=function(t){return t.Ak="arraybuffer",t.Sk="json",t.Tk="stream",t.Ek="text",t}({});function Dr(t,i){return function(t){if(Array.isArray(t))return t}(t)||function(t,i){var r=null==t?null:void 0!==n&&t[e]||t["@@iterator"];if(null!=r){var o,u,s=[],f=!0,c=!1;try{for(r=r.call(t);!(f=(o=r.next()).done)&&(s.push(o.value),!i||s.length!==i);f=!0);}catch(t){c=!0,u=t}finally{try{f||null==r.return||r.return()}finally{if(c)throw u}}return s}}(t,i)||tn(t,i)||function(){throw new m("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}x(),gt(),x(),gt(),x(),gt(),x(),gt(),x(),gt();var Cr=function(){function t(n){var i=this;this.P_={},n instanceof t?n.asList().forEach((function(t){var n=Dr(t,2),e=n[0],r=n[1];i.append(e,r)})):Array.isArray(n)?n.forEach((function(t){var n=Dr(t,2),e=n[0],r=n[1];i.append(e,r)})):n&&p.getOwnPropertyNames(n).forEach((function(t){i.append(t,n[t])}))}var n=t.prototype;return n.append=function(t,n){var i=t,e=n;i=xr(i),e=Br(e);var r=i.toLowerCase();if(this.P_.hasOwnProperty(r)){var o=this.P_[r],u=o[1];o[1]=u?u+", "+e:e}else this.P_[r]=[i,e]},n.delete=function(t){var n=xr(t).toLowerCase();delete this.P_[n]},n.get=function(t){var n=xr(t).toLowerCase();return this.P_.hasOwnProperty(n)?this.P_[n][1]:null},n.has=function(t){var n=xr(t).toLowerCase();return this.P_.hasOwnProperty(n)},n.set=function(t,n){var i=t,e=(i=xr(i)).toLowerCase();this.P_[e]=[i,Br(n)]},n.forEach=function(t,n){for(var i in this.P_)this.P_.hasOwnProperty(i)&&t.call(n,this.P_[i][1],i,this)},n.asList=function(){var t=[];for(var n in this.P_)if(this.P_.hasOwnProperty(n)){var i=Dr(this.P_[n],2),e=i[0],r=i[1];t.push([e,r])}return t},n.xk=function(){var t={};return this.forEach((function(n,i){t[i]=n})),t},n.Ik=function(t){var n=this;t.forEach((function(t,i){n.append(i,t)}))},n.Rk=function(t){var n=this;t.forEach((function(t,i){n.set(i,t)}))},t}();function xr(t){var n=t;if("string"!=typeof n&&(n=String(n)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(n))throw new m("Invalid character in header field name");return n}function Br(t){var n=t;return"string"!=typeof n&&(n=String(n)),n}var Mr=function(t){return t.DELETE="DELETE",t.GET="GET",t.HEAD="HEAD",t.OPTIONS="OPTIONS",t.POST="POST",t.PUT="PUT",t}({}),Lr=function(t){return t.wE="same-origin",t.yE="no-cors",t.bE="cors",t.AE="navigate",t}({}),Ur=function(t,n){var i,e,r,o,u,s,f,c,h,a,v,d,l,w,b,g,m,p,y=t.Xu;n?(i=n.Bk,e=n.$k,r=n.SE,o=n.Qk,u=n.TE,s=n.kE,f=n.ep,c=n.Hw,h=n.EE,a=n.xE,v=n.RE,d=n.CE,l=n.PE,w=n.DE,b=n.NE):(i=null,e={},r="GET",o=Ar.Ek,u=0,s=0,c="",h="",a="",v=!1,l=void 0,w=!1,b=void 0),this.Xu=y,this.Bk=t.Bk||i,this.$k=new Cr(t.$k||e),this.SE=t.SE||r,this.Qk=t.Qk||o,this.TE=void 0!==t.TE?Number(t.TE)||0:u,this.kE=void 0!==t.kE?Number(t.kE)||0:s,this.ep=t.ep||f||(new an).ep,this.Hw=t.Hw||c,this.EE=t.EE||h,this.xE=t.xE||a,this.RE=void 0!==t.RE?Boolean(t.RE):v,this.CE=t.CE||d,this.PE=null!=(g=t.PE)?g:l,this.DE=null!=(m=t.DE)?m:w,this.NE=null!=(p=t.NE)?p:b};x(),gt(),x(),gt();var Fr=function(t){return t.ZE="HttpOpenError",t.HE="HttpResponseError",t.XE="HttpTimeoutError",t}({}),zr=function(t){function n(n,i,e){var r;return(r=t.call(this,i,e)||this).zE=n,r}return _t(n,t),Tt(n,[{key:"Jk",get:function(){return this.zE}}]),n}(dn);var Wr=function(t){function n(n,i){return t.call(this,n,function(t){return"Error while opening "+t+". Invalid URL."}(n.Xu),i)||this}return _t(n,t),Tt(n,[{key:"name",get:function(){return Fr.ZE}}]),n}(zr),Vr=function(){function t(){}var n=t.prototype;return n.Jk=function(t){return J.reject(new Wr(new Ur(t)))},n.LE=function(t){},n.yn=function(){},t}();x(),gt();var Hr=function(t){function n(n){return t.call(this,"Invalid XML",n)||this}return _t(n,t),n}(dn),qr=function(t){function n(){var n;return(n=t.apply(this,arguments)||this).eI=new Rr,n.xW=new Vr,n.i=new Or,n}return _t(n,t),n.prototype.Cx=function(t){throw new Hr},Tt(n,[{key:"dw",get:function(){return this.eI}},{key:"iI",get:function(){return!1}},{key:"nI",get:function(){return!1}},{key:"aI",get:function(){return!1}},{key:"oI",get:function(){return!1}},{key:"uI",get:function(){return this.i}},{key:"cI",get:function(){return{lI:Yt}}},{key:"dI",get:function(){return Nr}},{key:"fI",get:function(){return Pr}},{key:"_I",get:function(){return this.xW}}]),n}(Er);function Xr(){return Xr=p.assign||function(t){for(var n=1;n<arguments.length;n++){var i=arguments[n];for(var e in i)p.prototype.hasOwnProperty.call(i,e)&&(t[e]=i[e])}return t},Xr.apply(this,arguments)}function jr(){var t=p.create(null);return t.Lw=void 0,delete t.Lw,t}function Yr(){return new Gr}jt(new qr),x(),gt(),x(),gt(),x(),gt(),x(),gt(),x(),gt(),x(),gt();var Kr="undefined"!=typeof Map&&"entries"in Map.prototype?Map:void 0,Gr=Kr||function(){var t=function(){function t(t,n){this.index=0,this.data=t,this.selector=n,this.keys=p.keys(t)}return t.prototype.next=function(){var t=this.index;return t<this.keys.length?(this.index++,{value:this.selector(this.data,this.keys[t]),done:!1}):{value:void 0,done:!0}},t}();return function(){function n(){this.data=jr(),this.size=0}var i=n.prototype;return i.get=function(t){return this.data[t]},i.set=function(t,n){return this.has(t)||this.size++,this.data[t]=n,this},i.has=function(t){return t in this.data},i.delete=function(t){return!!this.has(t)&&(this.size--,delete this.data[t],!0)},i.clear=function(){this.data=jr(),this.size=0},i.keys=function(){return new t(this.data,(function(t,n){return n}))},i.values=function(){return new t(this.data,(function(t,n){return t[n]}))},i.entries=function(){return new t(this.data,(function(t,n){return[n,t[n]]}))},i.forEach=function(t){for(var n in this.data)t(this.data[n],n)},n}()}();Kr||function(){var t=function(){function t(t,n){this.Bw=t,this.Ow=n}return t.prototype.next=function(){var t=this.Bw.next();return t.done?t:{value:this.Ow(t.value),done:!1}},t}();(function(){function n(){this.P_=Yr()}var i=n.prototype;i.get=function(t){return this.P_.get(""+t)},i.set=function(t,n){return this.P_.set(""+t,n),this},i.has=function(t){return this.P_.has(""+t)},i.delete=function(t){return this.P_.delete(""+t)},i.clear=function(){this.P_.clear()},i.keys=function(){return new t(this.P_.keys(),(function(t){return Number(t)}))},i.values=function(){return this.P_.values()},i.entries=function(){return new t(this.P_.entries(),(function(t){var n=Dr(t,2),i=n[0],e=n[1];return[Number(i),e]}))},i.forEach=function(t){this.P_.forEach((function(n,i){t(n,Number(i))}))},Tt(n,[{key:"size",get:function(){return this.P_.size}}])})()}();x(),gt(),x(),gt();var $r="9a04f079-9840-4286-ab92-e65be0885f95",Zr="urn:uuid:"+$r,Jr="com.microsoft.playready",Qr="edef8ba9-79d6-4ace-a3c8-27dcd51d21ed",to="urn:uuid:"+Qr,no="com.widevine.alpha",io="1077efec-c0b2-4d02-ace3-3c1e52e2fb4b",eo="urn:uuid:"+io,ro="org.w3.clearkey",oo="94ce86fb-07ff-4f43-adb8-93d2fa968ca2",uo="urn:uuid:"+oo,so="com.apple.fps.1_0";x(),gt();var fo=function(t){return t.Fw="playready",t.Vw="widevine",t.Gw="fairplay",t.Ww="clearkey",t.Uw="clearkey_dash_if",t.Zw="aes128",t}({}),co={Hw:fo.Fw,Xw:Jr,zw:"cenc",qw:$r,Yw:Zr,Kw:"PlayReady"},ho={Hw:fo.Vw,Xw:no,zw:"cenc",qw:Qr,Yw:to,Kw:"Widevine"},ao={Hw:fo.Gw,Xw:so,zw:"skd",qw:oo,Yw:uo,Kw:"FairPlay"},vo=(fo.Gw,{Hw:fo.Ww,Xw:ro,zw:"cenc",qw:io,Yw:eo,Kw:"ClearKey"});fo.Uw;x(),gt();String.prototype.replaceAll;var lo="function"==typeof String.prototype.startsWith?function(t,n){return zt(t)&&t.startsWith(n)}:function(t,n){return zt(t)&&t.substr(0,n.length)===n},wo=(String.prototype.endsWith,"function"==typeof String.prototype.repeat?function(t,n){return t.repeat(n)}:function(t,n){var i=0|n;if(0===t.length||0===i)return"";for(var e=t,r="";1==(1&i)&&(r+=e),0!=(i>>>=1);)e+=e;return r}),bo=(String.prototype.padStart,String.prototype.padEnd,16384),go="function"==typeof String.fromCodePoint?function(t){var n;return t.length<=bo?(n=String).fromCodePoint.apply(n,nn(t)):po(t,String.fromCodePoint)}:function(t){for(var n=[],i=0;i<t.length;i++){var e=t[i];e>65535&&(e-=65536,n.push(e>>>10&1023|55296),e=56320|1023&e),n.push(e)}return mo(n)};function mo(t){var n;return t.length<=bo?(n=String).fromCharCode.apply(n,nn(t)):po(t,String.fromCharCode)}function po(t,n){for(var i=[],e=0;e<t.length;e+=bo)i.push(n.apply(void 0,nn(t.slice(e,e+bo))));return i.join("")}var yo=Ut.gg&&Ut.wg>=42||Ut.Kg&&Ut.Qg>=38||Ut.Ug||Ut.Xg||Ut.um&&Ut.dm>=29;function _o(t,n){return function(t,n){return zt(t)&&-1!==t.indexOf(n)}(t,"audio")?{initDataTypes:["cenc"],audioCapabilities:[Xr({contentType:t},n?{robustness:"SW_SECURE_CRYPTO"}:{})]}:{initDataTypes:["cenc"],videoCapabilities:[Xr({contentType:t},n?{robustness:"SW_SECURE_CRYPTO"}:{})]}}var So=function(){function t(t){this.jw=Yr(),this.$w=void 0,this.Jw=t}var n=t.prototype;return n.mw=function(){return this.ww(ho)},n.fw=function(){return this.ww(vo)},n.gw=function(){return this.ww(co)},n._w=function(){return this.ww(ao)},n.ww=function(t){var n=t.Yw,i=this.jw.get(n);if(i)return i;var e=this.pw(t,'video/mp4; codecs="avc1.42000a"');return this.jw.set(n,e),e},n.pw=function(t,n){var i=this;return $t((function(){return Zt(this,(function(e){switch(e.label){case 0:return e.trys.push([0,2,,7]),[4,i.Jw.Qw(t.Xw,[_o(n,!0)])];case 1:return e.sent(),[2,!0];case 2:e.sent(),e.label=3;case 3:return e.trys.push([3,5,,6]),[4,i.Jw.Qw(t.Xw,[_o(n,!1)])];case 4:return e.sent(),[2,!0];case 5:return e.sent(),[2,!1];case 6:return[3,7];case 7:return[2]}}))}))()},n.lw=function(){return this.$w||(this.$w=this.ey()),this.$w},n.ey=function(){var t=this;return $t((function(){return Zt(this,(function(n){switch(n.label){case 0:return"https:"===h.location.protocol?[2,!1]:yo?[4,t.fw()]:[2,!1];case 1:return n.sent()?[2,!1]:[2,!0]}}))}))()},t}();function To(t,n,i){if("function"==typeof i)i.call(t,n);else for(var e=0;e<i.length;e++){i[e].call(t,n)}}x(),gt(),x(),gt(),x(),gt(),x(),gt(),x(),gt(),x(),gt();var Eo=function(){function t(t){var n=this;this.sy=jr(),this.ly=void 0,this.oy=0,this.Ds=function(t){n._o(t)},this._y=null!=t?t:this}var n=t.prototype;return n.bn=function(t,n){if("function"==typeof n)if("string"==typeof t)this.iy(t,n);else for(var i=0;i<t.length;i++){var e=t[i];this.iy(e,n)}},n.iy=function(t,n){var i=this.sy[t];void 0===i?this.sy[t]=n:"function"==typeof i?this.sy[t]=[i,n]:0===this.oy?i.push(n):this.sy[t]=i.concat(n)},n.uy=function(t){if("function"==typeof t){var n=this.ly;void 0===n?this.ly=t:"function"==typeof n?this.ly=[n,t]:0===this.oy?n.push(t):this.ly=n.concat(t)}},n.Ro=function(){this.sy=jr(),this.ly=void 0},n._o=function(t){this.oy++;var n=this.sy[t.type],i=this.ly;void 0!==n&&To(this._y,t,n),void 0!==i&&To(this._y,t,i),this.oy--},n.vn=function(t,n){if("function"==typeof n)if("string"==typeof t)this.vy(t,n);else for(var i=0;i<t.length;i++){var e=t[i];this.vy(e,n)}},n.vy=function(t,n){var i=this.sy[t];void 0!==i&&("function"==typeof i?i===n&&(this.sy[t]=void 0):0===this.oy?un(i,n):this.sy[t]=sn(i,n))},n.gy=function(t){if("string"==typeof t)this.sy[t]=void 0;else for(var n=0;n<t.length;n++){var i=t[n];this.sy[i]=void 0}},n.py=function(t){var n=this.ly;void 0!==n&&("function"==typeof n?n===t&&(this.ly=void 0):0===this.oy?un(n,t):this.ly=sn(n,t))},n.wy=function(t,n){var i=this;return new J((function(e,r){if(n&&n.zm)return r(new ln);var o=function(t){s(),e(t)},u=function(){s(),r(new ln)},s=function(){i.vn(t,o),n&&n.Jm(u)};i.bn(t,o),n&&n.Qm(u)}))},t}();x(),gt(),x(),gt();var Io=function(t,n){void 0===n&&(n=new Date),this.type=t,this.date=n};x(),gt();var ko=function(t){return t.yy="Ay",t.Sy="Ty",t.Ey="contentprotectionerror",t.xy="contentprotectionsuccess",t.Iy="currentsourcechange",t.Ry="destroy",t.Cy="durationchange",t.Py="emptied",t.Dy="encrypted",t.Ny="ended",t.My="Ly",t.By="Oy",t.Fy="Vy",t.Wy="Uy",t.Gy="loadstart",t.Zy="manifestupdate",t.Hy="nosupportedrepresentationfound",t.Xy="offline",t.zy="online",t.qy="pause",t.ho="play",t.Yy="progress",t.Ky="ratechange",t.jy="representationchange",t.Qy="resize",t.Jy="seeked",t.$y="seeking",t.eb="segmentnotfound",t.ib="sb",t.ob="hb",t.uo="sourcechange",t.ub="timeupdate",t.fb="volumechange",t._b="vb",t.gb="mb",t.pb="metricschange",t}({}),Ro=["cenc"],Oo=["cbcs","cbcs-1-9"],No=function(t){function n(n){var i;return(i=t.call(this,ko.gb)||this).wb=n,i}return _t(n,t),n}(Io),Po=function(t){function n(n,i,e,r){var o;return(o=t.call(this,"yb")||this).bb=n,o.Ab=i,o.yb=e,o.Sb=r,o}return _t(n,t),n}(Io),Ao=function(t){function n(){return t.call(this,"lt")||this}return _t(n,t),n}(Io);x(),gt(),x(),gt(),x(),gt();var Do="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),Co=16383;function xo(t,n,i){return Do[t>>2]+Do[(3&t)<<4|n>>4]+Do[(15&n)<<2|i>>6]+Do[63&i]}function Bo(t,n,i){for(var e=[],r=n;r<i;r+=3)e.push(xo(t[r],t[r+1],t[r+2]));return e.join("")}x(),gt(),x(),gt();var Mo=function(){function t(t){void 0===t&&(t=0),this.rc=t}var n=t.prototype;return n.Ib=function(t){this.rc+=t},n.Rb=function(t){this.rc=t},n.Cb=function(){return new t(this.nc)},Tt(t,[{key:"nc",get:function(){return this.rc}}]),t}();function Lo(t){if(t>=55296&&t<=57343)throw new g("Lone surrogate U+"+t.toString(16).toUpperCase()+" is not a scalar value")}function Uo(t,n){return t>>n&63|128}function Fo(t,n){0!=(4294967168&t)?(0==(4294965248&t)?n.push(t>>6&31|192):0==(4294901760&t)?(Lo(t),n.push(t>>12&15|224),n.push(Uo(t,6))):0==(4292870144&t)&&(n.push(t>>18&7|240),n.push(Uo(t,12)),n.push(Uo(t,6))),n.push(63&t|128)):n.push(t)}function zo(t,n){if(n.nc>=t.length)throw new g("Invalid byte index");var i=255&t[n.nc];if(n.Ib(1),128==(192&i))return 63&i;throw new g("Invalid continuation byte")}function Wo(t,n){var i=n.nc;if(i>t.length)throw new g("Invalid byte index");if(i===t.length)return!1;var e=255&t[i];if(n.Ib(1),0==(128&e))return e;if(192==(224&e)){var r=(31&e)<<6|zo(t,n);if(r>=128)return r;throw new g("Invalid continuation byte")}if(224==(240&e)){var o=(15&e)<<12|zo(t,n)<<6|zo(t,n);if(o>=2048)return Lo(o),o;throw new g("Invalid continuation byte")}if(240==(248&e)){var u=(7&e)<<18|zo(t,n)<<12|zo(t,n)<<6|zo(t,n);if(u>=65536&&u<=1114111)return u}throw new g("Invalid UTF-8 detected")}x(),gt(),x(),gt();var Vo=65279;function Ho(t,n,i){void 0===i&&(i=!1);var e=t.getUint16(n.nc,i);return n.Ib(2),e}function qo(t,n,i,e){void 0===e&&(e=!1),t.setUint16(n.nc,i,e),n.Ib(2)}function Xo(t,n,i,e){void 0===e&&(e=!1),t.setUint32(n.nc,i,e),n.Ib(4)}function jo(t,n,i,e){void 0===e&&(e=!1);for(var r=i.length,o=0;o<r;o+=1){qo(t,n,i.charCodeAt(o),e)}}function Yo(t,n){return void 0===n&&(n=!1),function(t,n,i,e){for(var r=[];n.nc+2<=t.byteLength;){var o=Ho(t,n,i);if(e&&!o)break;r.push(o)}return mo(r)}($o(t),new tu,n,!1)}function Ko(t){return function(t){return go(t)}(function(t,n){var i,e=[],r=new tu;if(!n){if(!1===(i=Wo(t,r)))return e;i===Vo||e.push(i)}for(;!1!==(i=Wo(t,r));)e.push(i);return e}(Zo(t)))}function Go(t){return new E(function(t){for(var n=[],i=0;i<t.length;i++)Fo(t[i],n);return n}(function(t){for(var n=[],i=0,e=t.length;i<e;){var r=t.charCodeAt(i++);if(r>=55296&&r<=56319&&i<e){var o=t.charCodeAt(i++);56320==(64512&o)?n.push(((1023&r)<<10)+(1023&o)+65536):(n.push(r),i--)}else n.push(r)}return n}(t)))}function $o(t){return new DataView(t.buffer,t.byteOffset,t.byteLength)}function Zo(t){return new E(t.buffer,t.byteOffset,t.byteLength)}function Jo(t){return t instanceof ArrayBuffer?new E(t):Zo(t)}function Qo(t){if(t.slice)return t.slice(0);var n=new E(t.byteLength);return n.set(t,0),n}var tu=function(){function t(t){void 0===t&&(t=0),this.rc=t}var n=t.prototype;return n.Ib=function(t){this.rc+=t},n.Rb=function(t){this.rc=t},n.Cb=function(){return new t(this.nc)},n.Nb=function(){return new Mo(this.nc<<3)},Tt(t,[{key:"nc",get:function(){return this.rc}}]),t}(),nu=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]","[object DataView]"],iu=ArrayBuffer.isView||function(t){return t&&fn(nu,Ft.call(t))};function eu(t,n){return t===n||function(t,n){if(t===n)return!0;if(t.byteLength!==n.byteLength)return!1;if(t.buffer===n.buffer&&t.byteOffset===n.byteOffset)return!0;for(var i=0;i<t.length;i+=1)if(t[i]!==n[i])return!1;return!0}(Jo(t),Jo(n))}function ru(t){var n=t.reduce((function(t,n){return t+n.byteLength}),0);return function(t,n){for(var i=new E(n),e=0,r=0;r<t.length;r++){var o=t[r];i.set(o,e),e+=o.byteLength}return i}(t,n)}function ou(t){return function(t){for(var n=t.length,i=n%3,e=[],r=n-i,o=0;o<r;o+=Co)e.push(Bo(t,o,y.min(r,o+Co)));if(1===i){var u=t[n-1];e.push(Do[u>>2]+Do[(3&u)<<4]+"==")}else if(2===i){var s=t[n-2],f=t[n-1];e.push(Do[s>>2]+Do[(3&s)<<4|f>>4]+Do[(15&f)<<2]+"=")}return e.join("")}(new E(t))}var uu=new E([0]).buffer,su=function(){function t(){this.tc=[]}var n=t.prototype;return n.Lb=function(t){for(var n=0,i=this.tc;n<i.length;n++){if(eu(i[n][0],t))return!0}return!1},n.Bb=function(t){for(var n=0,i=this.tc;n<i.length;n++){var e=i[n];if(eu(e[0],t))return e[1]}},n.Ob=function(t,n){for(var i=0,e=this.tc;i<e.length;i++){var r=e[i];if(eu(r[0],t))return void(r[1]=n)}this.tc.push([t,n])},n.Fb=function(t,n){this.tc.forEach((function(n){return t(n[1],n[0])}),n)},n.Vb=function(){cn(this.tc)},Tt(t,[{key:"Mb",get:function(){return this.tc.length}}]),t}();x(),gt();var fu=function(){function t(){var t=this;this.Gb=new J((function(n,i){t.Gd=n,t.Zd=i}))}var n=t.prototype;return n.Wb=function(t){this.Gd&&(this.Gd(t),this.Km())},n.Ub=function(t){this.Zd&&(this.Zd(t),this.Km())},n.np=function(){this.Gb.catch(Yt),this.Ub(new ln)},n.rp=function(t){var n=this;t.then((function(t){return n.Wb(t)}),(function(t){return n.Ub(t)}))},n.Km=function(){this.Gd=void 0,this.Zd=void 0},t}();function cu(t,n){return t===Jr?function(t){if(t.byteLength<2*hu.length)return t;var n=new DataView(t,0,2*hu.length),i=Yo(n,!0);if(i===hu)return t;return function(t){var n='<PlayReadyKeyMessage type="LicenseAcquisition"><LicenseAcquisition Version="1"><Challenge encoding="base64encoded">',i='</Challenge><HttpHeaders><HttpHeader><name>Content-Type</name><value>text/xml; charset=utf-8</value></HttpHeader><HttpHeader><name>SOAPAction</name><value>"http://schemas.microsoft.com/DRM/2007/03/protocols/AcquireLicense"</value></HttpHeader></HttpHeaders></LicenseAcquisition></PlayReadyKeyMessage>',e=""+n+ou(t)+i;return function(t,n){void 0===n&&(n=!1);var i=new E(2*t.length);return jo($o(i),new tu,t,n),i}(e,!0).buffer}(t)}(n):n}x(),gt();var hu="<PlayReady";x(),gt(),x(),gt();var au=function(t){function n(n,i,e,r){var o;return(o=t.call(this,n,r)||this).Zb=i,o.Hb=e,o}return _t(n,t),n}(dn);x(),gt(),x(),gt(),x(),gt(),x(),gt(),x(),gt();var vu=function(t,n){return(vu=p.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)p.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(t,n)};function du(t,n){if("function"!=typeof n&&null!==n)throw new m("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}vu(t,n),t.prototype=null===n?p.create(n):(i.prototype=n.prototype,new i)}function lu(t,n,i){return t.indexOf?t.indexOf(n,i):Array.prototype.indexOf.call(t,n,i)}x(),gt(),x(),gt(),x(),gt(),x(),gt(),x(),gt(),x(),gt(),x(),gt();!function(){function t(t,n){this.Xb=t,this.zb=n}t.prototype.get=function(t){var n=this.Xb.get(t);if(0===this.zb||void 0===n)return n;var i=this.Xb.get(t+1)||0,e=n&(1<<8-this.zb)-1,r=i>>8-this.zb;return(e<<this.zb)+r},t.prototype.getBit=function(t){if(!(t<0)){var n=this.Xb.get(y.floor((t+this.zb)/8));if(void 0!==n)return(n&1<<7-this.zb-t%8)>0?1:0}},p.defineProperty(t.prototype,"bitLength",{get:function(){return this.Xb.bitLength-this.zb},enumerable:!1,configurable:!0}),p.defineProperty(t.prototype,"length",{get:function(){return this.Xb.length},enumerable:!1,configurable:!0})}();x(),gt(),x(),gt();y.pow(2,-52);function wu(t,n,i){return y.min(y.max(t,n),i)}function bu(t,n){return t>>8-n}function gu(t,n){return t&(1<<n)-1}var mu=function(){function t(t){this.qb=t,this.Yb=0,this.Kb=0}return p.defineProperty(t.prototype,"totalBitsRead",{get:function(){return 8*this.Yb+this.Kb},enumerable:!1,configurable:!0}),p.defineProperty(t.prototype,"done",{get:function(){return this.Yb===this.qb.length&&0===this.Kb},enumerable:!1,configurable:!0}),p.defineProperty(t.prototype,"location",{get:function(){return{byte:this.Yb,bit:this.Kb}},enumerable:!1,configurable:!0}),t.prototype.copy=function(){var n=new t(this.qb);return n.seek(this.Yb,this.Kb),n},t.prototype.canReadBits=function(t){return 8*this.Yb+t+this.Kb<=8*this.qb.length},t.prototype.canReadBytes=function(t){return 0===this.Kb?this.Yb+t<=this.qb.length:this.Yb+t<this.qb.length},t.prototype.incBit=function(){this.Kb++,this.Kb>7&&(this.Yb++,this.Kb=0)},t.prototype.seek=function(t,n){this.Yb=t,this.Kb=n},t.prototype.peekBit=function(){if(!this.canReadBits(1))throw new g("Cannot read past end of buffer.");return this.qb.get(this.Yb)>>7-this.Kb&1},t.prototype.readBit=function(){var t=this.peekBit();return this.incBit(),t},t.prototype.readByte=function(){if(!this.canReadBytes(1))throw new g("Cannot read past end of buffer.");if(0===this.Kb)return this.qb.get(this.Yb++);var t=gu(this.qb.get(this.Yb),8-this.Kb),n=bu(this.qb.get(this.Yb+1),this.Kb);return this.Yb++,t<<this.Kb|n},t.prototype.readBits=function(t){if(!this.canReadBits(t))throw new g("Cannot read past end of buffer.");for(var n=[],i=0;i<t;i++)n.push(this.readBit());return n},t.prototype.readUInt=function(t){if(t>32)throw new g("The max bitlength that can be provided is 32.");if(!this.canReadBits(t))throw new g("Cannot read past end of buffer.");var n=0;if(0===this.Kb&&t%8==0)for(var i=t-8;i>=0;i-=8)n|=this.readByte()<<i;else for(i=t-1;i>=0;i--)n|=this.readBit()<<i;return n},t.prototype.readInt=function(t){if(t>32)throw new g("The max bitlength that can be provided is 32.");if(!this.canReadBits(t))throw new g("Cannot read past end of buffer.");var n=this.readUInt(t);return 0===(n&1<<t-1)?n:n-y.pow(2,t)},t.prototype.readExponentialGolombCode=function(){for(var t=0;0===this.readBit();)t++;var n=1<<t;return n+=this.readUInt(t)-1},t.prototype.readSignedExponentialGolombCode=function(){var t=this.readExponentialGolombCode();return 1&t?(t+1)/2:-t/2},t.prototype.skipBits=function(t){if(!this.canReadBits(t))throw new g("Skipping over the buffer edge is not allowed.");var n=this.Kb+t;this.Yb+=n>>3,this.Kb=7&n},t.prototype.readBool=function(){return this.readBit()>0},t.prototype.readString=function(t){if(!this.canReadBytes(t))throw new g("Cannot read past end of buffer.");for(var n=[],i=0;i<t;i++)n.push(this.readByte());return String.fromCharCode.apply(String,n)},t}();x(),gt(),x(),gt(),x(),gt();var pu=function(t,n){return t===n?0:t<n?-1:t>n?1:T(t)?T(n)?0:1:-1},yu=function(){function t(){this.jb=[],this.Qb=[],this.Jb=0}return t.from=function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];for(var e=new t,r=0,o=n;r<o.length;r++){var u=o[r];e.pushRange(u)}return e},t.prototype.pushRange=function(t,n,i){if(void 0===n&&(n=0),void 0===i&&(i=t.length),i<0)throw new g("The buffer length must be positive.");if(0!==i){if(0===this.Qb.length)this.Qb.push(0);else{var e=this.Qb[this.Qb.length-1]+this.jb[this.jb.length-1].length;this.Qb.push(e)}this.jb.push(t.subarray(n,n+i)),this.Jb+=i}},t.prototype.concat=function(n){var i=new t;return i.pushRange(this.join()),i.pushRange(n.join()),i},t.prototype.copy=function(t,n,i,e){if(void 0===n&&(n=0),void 0===i&&(i=0),void 0===e&&(e=this.length),n<0||i<0||e<0)throw new RangeError;return this.slice(i,e).copyInternal(t,n)},t.prototype.copyInternal=function(t,n){for(var i=0,e=n,r=0,o=this.jb;r<o.length;r++){var u=o[r];t.set(u,e),i+=u.length,e+=u.length}return i},t.prototype.clear=function(){this.jb=[],this.Qb=[],this.Jb=0},t.prototype.get=function(t){if(!(t<0||t>=this.length)){var n=this.findContainingBufferIndex(t),i=t-this.Qb[n];return this.jb[n][i]}},p.defineProperty(t.prototype,"first",{get:function(){return this.get(0)},enumerable:!1,configurable:!0}),t.prototype.indexOf=function(t){if(this.jb.length<1)return-1;if(this.jb.length>1){var n=this.join();this.clear(),this.pushRange(n)}var i=this.jb[0];return"number"==typeof t?lu(i,t):"undefined"!=typeof Buffer?Buffer.from(i.buffer,i.byteOffset,i.byteLength).indexOf(t):function(t,n){if(0===n.length)return 0;for(var i=n[0],e=n.length,r=t.length-e,o=0;o<=r&&!((o=lu(t,i,o))<0||o>r);o++){for(var u=o+1,s=o+e,f=1;u<s&&t[u]===n[f];u++,f++);if(u===s)return o}return-1}(i,t)},t.prototype.findContainingBufferIndex=function(t){return function(t,n,i){if(0!==t.length){var e=0,r=t.length-1;if(1!==i(t[e],n)){if(1===i(n,t[r]))return r;for(;e!==r;){var o=y.ceil((e+r)/2);i(t[o],n)<=0?e=o:r=o-1}return e}}}(this.Qb,t,pu)},t.prototype.join=function(){if(1===this.jb.length)return this.jb[0];var t=new E(this.length);return this.copyInternal(t,0),t},p.defineProperty(t.prototype,"length",{get:function(){return this.Jb},enumerable:!1,configurable:!0}),p.defineProperty(t.prototype,"bitLength",{get:function(){return 8*this.length},enumerable:!1,configurable:!0}),t.prototype.readUIntBE=function(t,n){if(n<=0||n>4)throw new g("Expected byteLength to be between 0 and 4 but was "+n);if(t<0||t>this.length-n)throw new g("Offset must be between 0 and buffer.length - byteLength, but was "+t+" (max allowed "+(this.length-n)+")");if(1===n)return this.get(t);for(var i=0,e=0;e<n;e++)i+=this.get(t+e)*y.pow(2,8*(n-e-1));return i},t.prototype.slice=function(n,i){void 0===i&&(i=this.length);var e=wu(n,0,this.length),r=wu(i,0,this.length);if(e>r)return new t;if(e===r)return new t;for(var o=new t,u=this.findContainingBufferIndex(e),s=this.jb[u],f=e,c=f-this.Qb[u];f+s.length-c<r;)o.pushRange(s,c,s.length-c),u+=1,c=(f+=s.length-c)-this.Qb[u],s=this.jb[u];var h=r-f;return o.pushRange(s,c,h),o},t.prototype.trim=function(){if(0===this.length)return new t;for(var n=this.length-1,i=this.jb.length-1,e=this.jb[i],r=e.length-1;n>=0&&i>=0;){if(0!==e[r])break;if(0===r){if(0===i)return new t;i-=1,r=(e=this.jb[i]).length-1}else r-=1;n-=1}return this.slice(0,n+1)},t}(),_u=function(){function t(n){this.$b=n||t.BUFFER_CHUNK_SIZE,this.tA=!1,this.eA=new yu,this.qb=new E(this.$b),this.iA=0,this.sA=0,this.Kb=7}return t.prototype.closeByte=function(){this.qb[this.iA++]=this.sA,this.iA>=this.$b&&this.closeBuffer(),this.sA=0,this.Kb=7},t.prototype.closeBuffer=function(t){void 0===t&&(t=!0),0!==this.iA&&(this.eA.pushRange(this.qb,0,this.iA),t&&(this.qb=new E(this.$b)),this.iA=0)},p.defineProperty(t.prototype,"isWritingStartBit",{get:function(){return 7===this.Kb},enumerable:!1,configurable:!0}),t.prototype.close=function(){if(this.tA)throw new g("Cannot close a closed BitWriter.");return this.isWritingStartBit||this.closeByte(),this.closeBuffer(!1),this.tA=!0,this.eA},t.prototype.writeBit=function(t){if(this.tA)throw new g("Cannot write to a closed BitWriter.");this.sA|=t<<this.Kb,0===this.Kb?this.closeByte():this.Kb--},t.prototype.writeByte=function(t){if(this.tA)throw new g("Cannot write to a closed BitWriter.");this.isWritingStartBit?(this.sA=t,this.closeByte()):this.writeByteUnaligned(t)},t.prototype.writeByteUnaligned=function(t){var n=this.Kb;this.sA|=bu(t,n+1),this.closeByte(),this.sA=gu(t,8-n)<<n+1,this.Kb=n},t.prototype.writeBits=function(t){for(var n=0,i=t;n<i.length;n++){var e=i[n];this.writeBit(e)}},t.prototype.writeBytes=function(t){if(this.tA)throw new g("Cannot write to a closed BitWriter.");this.isWritingStartBit?this.writeBytesAligned(t):this.writeBytesUnaligned(t)},t.prototype.writeBytesAligned=function(t){this.iA+t.length<=this.$b?(this.qb.set(t,this.iA),this.iA+=t.length,this.iA===this.$b&&this.closeBuffer()):(this.closeBuffer(),this.eA.pushRange(t))},t.prototype.writeBytesUnaligned=function(t){if(0!==t.length){var n=this.Kb;this.sA|=bu(t[0],n+1),this.closeByte();for(var i=1;i<t.length;i++){var e=gu(t[i-1],8-n),r=bu(t[i],n+1);this.sA=e<<n+1|r,this.closeByte()}this.sA=gu(t[t.length-1],8-n)<<n+1,this.Kb=n}},t.prototype.writeUInt=function(t,n){if(t<0)throw new g("Received a negative number.");if(n>32)throw new g("The max bitlength that can be provided is 32.");if(t>=y.pow(2,n))throw new g("Uint "+t+" cannot be represented in "+n+" bit(s).");if(this.isWritingStartBit&&n%8==0)for(var i=n-8;i>=0;i-=8)this.writeByte(t>>i&255);else for(i=n-1;i>=0;i--)this.writeBool((t&1<<i)>0)},t.prototype.writeInt=function(t,n){if(n>32)throw new g("The max bitlength that can be provided is 32.");if(y.abs(t)>=y.pow(2,n-1))throw new g("Signed integer "+t+" cannot be represented in "+n+" bit(s).");t<0?this.writeUInt(t+y.pow(2,n),n):this.writeUInt(t,n)},t.prototype.writeExponentialGolombCode=function(t){if(t<0)throw new g("Received a negative number.");for(var n=y.floor(y.log2(t+1))+1,i=0;i<n-1;i++)this.writeBit(0);this.writeUInt(t+1,n)},t.prototype.writeSignedExponentialGolombCode=function(t){0===t?this.writeExponentialGolombCode(0):t<0?this.writeExponentialGolombCode(-2*t):this.writeExponentialGolombCode(2*t-1)},t.prototype.padByte=function(t){for(;!this.isWritingStartBit;)this.writeBit(t)},t.prototype.writeBool=function(t){this.writeBit(t?1:0)},t.prototype.writeString=function(t){for(var n=function(t){for(var n=new E(t.length),i=0;i<t.length;i++)n[i]=t.charCodeAt(i);return n}(t),i=0;i<n.length;i++)this.writeByte(n[i])},t.BUFFER_CHUNK_SIZE=1024,t}();x(),gt();var Su=function(){function t(t){this.rb=new yu,this.Jd=t}return t.prototype.closeWriter=function(){void 0!==this.Jd&&(this.rb=this.rb.concat(this.Jd.close()),this.Jd=void 0)},p.defineProperty(t.prototype,"writer",{get:function(){return void 0===this.Jd&&(this.Jd=new _u),this.Jd},enumerable:!1,configurable:!0}),t.prototype.concat=function(t){this.closeWriter(),this.rb=this.rb.concat(t)},t.prototype.toRangedBuffer=function(){return this.closeWriter(),this.rb},t}(),Tu=function(){function t(t){if(this.boxType=t,4!==t.length&&16!==t.length)throw new g("The provided box type does not conform to either a 4 character type or a 16 byte uuid.")}return t.prototype.serializeCommonBoxHeader=function(n){var i=this.getSize(),e=i>=t.LARGE_SIZE/8,r=16===this.boxType.length;n.writeUInt(e?1:i,32),n.writeString(r?"uuid":this.boxType),e&&(n.writeUInt(y.floor(i/t.LARGE_SIZE),32),n.writeUInt(i%t.LARGE_SIZE,32)),r&&n.writeString(this.boxType)},t.prototype.getSize=function(){var n=8+(this.boxType.length>4?16:0),i=this.getBoxContentSize()+n;return i>=t.LARGE_SIZE/8&&(i+=8),i},t.prototype.serialize=function(){var t=new Su;return this.serializeCommonBoxHeader(t.writer),this.serializeBoxContent(t),t.toRangedBuffer()},t.LARGE_SIZE=y.pow(2,32),t}();function Eu(t,n){return t instanceof Yn?64===n:t<y.pow(2,n)}function Iu(t,n){return y.round(t*y.pow(2,n))}function ku(t,n){for(var i=0;i<n.length;i++)t.writeByte(n[i])}function Ru(t,n){return t/y.pow(2,n)}x(),gt();var Ou=function(t){function n(n,i,e){var r=t.call(this,n)||this;if(r.version=i,!Eu(i,8))throw new g("the provided version cannot fit in 8 bits.");return r.flags=e,r}return du(n,t),p.defineProperty(n.prototype,"flags",{get:function(){return this.v_},set:function(t){this.v_=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return 4},n.prototype.serializeFlags=function(t){if("number"!=typeof this.flags)throw new g("Missing custom serializeFlags method.");t.writer.writeUInt(this.flags,24)},n.prototype.serializeBoxContent=function(t){t.writer.writeByte(this.version),this.serializeFlags(t)},n}(Tu);x(),gt(),x(),gt();var Nu=function(t){function n(n,i){var e=t.call(this,n)||this;return e.data=i,e}return du(n,t),n.prototype.getBoxContentSize=function(){return this.data.length},n.prototype.serializeBoxContent=function(t){t.concat(yu.from(this.data))},n}(Tu);x(),gt(),x(),gt();var Pu=function(){function t(t){void 0===t&&(t=0),this.offset=t}return t.prototype.shift=function(t){this.offset+=t},t.prototype.seek=function(t){this.offset=t},t.prototype.clone=function(){return new t(this.offset)},t}();x(),gt();var Au=16384;function Du(t){var n=t.length;if(n<=Au)return String.fromCharCode.apply(String,t);for(var i=[],e=0;e<n;e+=Au)i.push(String.fromCharCode.apply(String,t.slice(e,e+Au)));return i.join("")}var Cu=function(){function t(t){this.raw=t}return t.prototype.isSet=function(t){return function(t,n){return(t&n)===n}(this.raw,t)},t}();function xu(t,n){var i=t.getUint8(n.offset);return n.shift(1),i}function Bu(t,n,i){var e=Vu(qu(t),n.offset,n.offset+i);return n.shift(e.byteLength),e}function Mu(t,n,i){return n.offset+i<=t.byteLength}function Lu(t,n,i){void 0===i&&(i=!1);var e=t.getUint32(n.offset,i);return n.shift(4),e}function Uu(t,n,i){void 0===i&&(i=!1);var e=Lu(t,n,i),r=Lu(t,n,i),o=i?r:e,u=i?e:r;return Yn.fromBits(u,o,!0)}function Fu(t,n,i){return Du(function(t){return[].slice.call(t)}(Bu(t,n,i)))}function zu(t,n){var i,e=xu(t,n);return 0==(128&e)?i=e:192==(224&e)?i=64*(31&e)+(63&xu(t,n)):224==(240&e)?i=4096*(15&e)+64*(63&xu(t,n))+(63&xu(t,n)):240==(248&e)&&(i=262144*(7&e)+4096*(63&xu(t,n))+64*(63&xu(t,n))+(63&xu(t,n))),i}function Wu(t,n){return function(t,n,i){var e=[],r=function(t,n){return n.offset+3<=t.byteLength&&239===t.getUint8(n.offset)&&187===t.getUint8(n.offset+1)&&191===t.getUint8(n.offset+2)}(t,n);r&&n.shift(3);for(;n.offset<t.byteLength;){var o=zu(t,n);if(void 0===o)break;if(i&&0===o)break;e.push(o)}return function(t){for(var n=[],i=0,e=t;i<e.length;i++){var r=e[i];r>65535&&(r-=65536,n.push(r>>>10&1023|55296),r=56320|1023&r),n.push(r)}return Du(n)}(e)}(t,n,!0)}function Vu(t,n,i){return void 0===n&&(n=0),void 0===i&&(i=t.byteLength),new E(t.buffer,t.byteOffset+n,i-n)}function Hu(t,n,i){return void 0===n&&(n=0),void 0===i&&(i=t.byteLength),new DataView(t.buffer,t.byteOffset+n,i-n)}function qu(t){return new E(t.buffer,t.byteOffset,t.byteLength)}var Xu=function(){function t(t){void 0===t&&(t=0),this.offset=t}return t.prototype.shift=function(t){this.offset+=t},t.prototype.seek=function(t){this.offset=t},t.prototype.clone=function(){return new t(this.offset)},t.prototype.toBit=function(){return new Pu(this.offset<<3)},t}();x(),gt();var ju=function(){function t(t,n){this.data=t,this.cursor=n}return t.prototype.nextUint8=function(){return xu(this.data,this.cursor)},t.prototype.nextUint16=function(){return function(t,n,i){void 0===i&&(i=!1);var e=t.getUint16(n.offset,i);return n.shift(2),e}(this.data,this.cursor)},t.prototype.nextInt16=function(){return function(t,n,i){void 0===i&&(i=!1);var e=t.getInt16(n.offset,i);return n.shift(2),e}(this.data,this.cursor)},t.prototype.nextUint32=function(){return Lu(this.data,this.cursor)},t.prototype.nextInt32=function(){return function(t,n,i){void 0===i&&(i=!1);var e=t.getInt32(n.offset,i);return n.shift(4),e}(this.data,this.cursor)},t.prototype.nextInt64=function(){return function(t,n,i){void 0===i&&(i=!1);var e=Lu(t,n,i),r=Lu(t,n,i),o=i?r:e,u=i?e:r;return Yn.fromBits(u,o,!1)}(this.data,this.cursor)},t.prototype.nextUint64=function(){return Uu(this.data,this.cursor)},t.prototype.nextUint8Array=function(t){return Bu(this.data,this.cursor,t)},t.prototype.nextUint32Array=function(t){return function(t,n,i){for(var e=[],r=0;r<i;r++)e.push(Lu(t,n));return e}(this.data,this.cursor,t)},t.prototype.nextChars=function(t){return Fu(this.data,this.cursor,t)},t.prototype.nextUTF8String=function(){return Wu(this.data,this.cursor)},t.prototype.skip=function(t){this.cursor.shift(t)},t.prototype.clone=function(){return new t(this.data,this.cursor.clone())},t}();function Yu(t,n){return t.type===n}var Ku=8;function Gu(t){var n=function(t,n){var i=[];for(;n.offset<t.byteLength;){var e=$u(t,n);if(!e.complete)return{complete:!1,boxes:i};i.push(e.box)}return{complete:!0,boxes:i}}(t.data,t.cursor);if(!n.complete)throw new g("Data incomplete");return n.boxes}function $u(t,n){var i=n.offset,e=function(t,n){var i=n.offset;if(!Mu(t,n,Ku)){return{complete:!1,neededOffset:o=n.offset+Ku}}var e=Lu(t,n),r=Fu(t,n,4);if(1===e){if(!Mu(t,n,8)){var o=n.offset+8;return n.seek(i),{complete:!1,neededOffset:o}}e=Uu(t,n).toNumber()}if("uuid"===r){if(!Mu(t,n,16)){o=n.offset+16;return n.seek(i),{complete:!1,neededOffset:o}}r=Fu(t,n,16)}var u=n.offset,s={type:r,size:e,headerSize:u-i};return{complete:!0,header:s}}(t,n);if(!e.complete)return e;var r=e.header,o=r.size;0===o&&(o=t.byteLength-i);var u=i+o;if(u>t.byteLength){var s=u;return n.seek(i),{complete:!1,neededOffset:s}}var f={type:r.type,offset:i,data:new ju(Hu(t,i,u),new Xu(r.headerSize))};return n.seek(u),{complete:!0,box:f}}function Zu(t){return{version:t>>24,flags:new Cu(16777215&t)}}function Ju(t,n){var i,e,r,o;return 1===n?(i=t.nextUint64(),e=t.nextUint64(),r=t.nextUint32(),o=t.nextUint64()):(i=t.nextUint32(),e=t.nextUint32(),r=t.nextUint32(),o=t.nextUint32()),{creation:i,modification:e,scale:r,duration:o}}function Qu(t){return t.skipBits(4),{isLeading:t.readUInt(2),sampleDependsOn:t.readUInt(2),sampleIsDependedOn:t.readUInt(2),sampleHasRedundancy:t.readUInt(2),samplePaddingValue:t.readUInt(3),sampleIsNonSyncSample:Boolean(t.readBit()),sampleDegradationPriority:t.readUInt(16)}}function ts(t){var n=t.nextUint32Array(9);return{a:Ru(n[0],16),b:Ru(n[1],16),u:Ru(n[2],30),c:Ru(n[3],16),d:Ru(n[4],16),v:Ru(n[5],30),x:Ru(n[6],16),y:Ru(n[7],16),w:Ru(n[8],30)}}function ns(t){return new Nu(t.type,Vu(qu(t.data.data),t.data.cursor.offset))}var is=function(t){function n(n,i,e,r){void 0===e&&(e=0),void 0===r&&(r=0);var o=t.call(this,"hdlr",e,r)||this;return o.name=i,o.handlerType=n,o}return du(n,t),p.defineProperty(n.prototype,"handlerType",{get:function(){return this.nA},set:function(t){this.nA=t},enumerable:!1,configurable:!0}),n.prototype.serializeReserved=function(t){t.writer.writeUInt(0,32),t.writer.writeUInt(0,32),t.writer.writeUInt(0,32)},n.prototype.getBoxContentSize=function(){var n,i;return t.prototype.getBoxContentSize.call(this)+4+4+12+(null!==(i=null===(n=this.name)||void 0===n?void 0:n.length)&&void 0!==i?i:0)+1},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(0,32),n.writer.writeString(this.handlerType),this.serializeReserved(n),this.name&&n.writer.writeString(this.name),n.writer.writeByte(0)},n}(Ou);function es(t){var n=t.data,i=Zu(n.nextUint32()),e=i.version,r=i.flags;n.skip(4);var o=n.nextChars(4);n.skip(12);var u=n.nextUTF8String();return new is(o,u,e,r.raw)}!function(t){function n(){return t.call(this,"mdir")||this}du(n,t),n.prototype.serializeReserved=function(t){t.writer.writeString("appl"),t.writer.writeUInt(0,32),t.writer.writeUInt(0,32)}}(is);x(),gt(),x(),gt(),x(),gt();var rs=function(){function t(t,n){void 0===n&&(n=!1),this.fixed28BitMode=n,this.tag=t}return t.prototype.encodeSize=function(t){for(var n=[];t>0;)n.length>0&&(n[n.length-1]+=128),n.push(t%128),t>>=7;if(this.fixed28BitMode)for(;n.length<4;)n.push(128);return n.reverse()},p.defineProperty(t.prototype,"tag",{get:function(){return this.rA},set:function(t){if(!Eu(t,8))throw new g("Provided tag does not fit in 8 bits.");this.rA=t},enumerable:!1,configurable:!0}),t.prototype.getSize=function(){return this.getDescriptorSize()+1+this.encodeSize(this.getDescriptorSize()).length},t.prototype.serialize=function(t){t.writer.writeByte(this.tag);for(var n=0,i=this.encodeSize(this.getDescriptorSize());n<i.length;n++){var e=i[n];t.writer.writeByte(e)}this.serializeDescriptorContent(t)},t}();x(),gt();!function(t){function n(n,i,e,r,o,u,s){void 0===s&&(s={});var f=t.call(this,4,s.fixed28BitMode)||this;return f.upStream=e,f.decoderSpecificInfo=u,f.objectTypeIndication=n,f.streamType=i,f.bufferSizeDb=r,f.maxBitrate=o.max,f.avgBitrate=o.avg,f}du(n,t),p.defineProperty(n.prototype,"objectTypeIndication",{get:function(){return this.oA},set:function(t){if(!Eu(t,8))throw new g("Provided objectTypeIndication does not fit in 8 bits.");this.oA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"streamType",{get:function(){return this.hA},set:function(t){if(!Eu(t,6))throw new g("Provided streamType does not fit in 6 bits.");this.hA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"bufferSizeDb",{get:function(){return this.aA},set:function(t){if(!Eu(t,24))throw new g("Provided bufferSizeDb does not fit in 24 bits.");this.aA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"maxBitrate",{get:function(){return this.uA},set:function(t){if(!Eu(t,32))throw new g("Provided maxBitrate does not fit in 32 bits.");this.uA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"avgBitrate",{get:function(){return this.cA},set:function(t){if(!Eu(t,32))throw new g("Provided avgBitrate does not fit in 32 bits.");this.cA=t},enumerable:!1,configurable:!0}),n.prototype.getDescriptorSize=function(){return 13+this.decoderSpecificInfo.reduce((function(t,n){return t+n.getSize()}),0)},n.prototype.serializeDescriptorContent=function(t){t.writer.writeByte(this.objectTypeIndication),t.writer.writeUInt(this.streamType,6),t.writer.writeBool(this.upStream),t.writer.writeBit(1),t.writer.writeUInt(this.bufferSizeDb,24),t.writer.writeUInt(this.maxBitrate,32),t.writer.writeUInt(this.avgBitrate,32);for(var n=0,i=this.decoderSpecificInfo;n<i.length;n++){i[n].serialize(t)}}}(rs);x(),gt();!function(t){function n(n,i){void 0===i&&(i={});var e=t.call(this,5,i.fixed28BitMode)||this;return e.data=n,e}du(n,t),n.prototype.getDescriptorSize=function(){return this.data.length},n.prototype.serializeDescriptorContent=function(t){t.concat(yu.from(this.data))}}(rs);x(),gt(),x(),gt();var os=function(t){function n(n){void 0===n&&(n=!1);var i=t.call(this,6,n)||this;return i.predefined=2,i}return du(n,t),n.prototype.getDescriptorSize=function(){return 1},n.prototype.serializeDescriptorContent=function(t){t.writer.writeByte(this.predefined)},n}(rs);!function(t){function n(n,i,e,r){void 0===r&&(r={});var o=t.call(this,3,r.fixed28BitMode)||this;return o.decoderConfigDescriptor=e,o.esId=n,o.streamPriority=i,o.dependsOnEsId=null==r?void 0:r.dependsOnEsId,o.urlString=null==r?void 0:r.url,o.ocrEsId=null==r?void 0:r.ocrEsId,o.slConfigDescriptor=new os(r.fixed28BitMode),o}du(n,t),p.defineProperty(n.prototype,"streamDependenceFlag",{get:function(){return void 0!==this.dependsOnEsId},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"urlFlag",{get:function(){return void 0!==this.urlString},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"ocrStreamFlag",{get:function(){return void 0!==this.ocrEsId},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"esId",{get:function(){return this.lA},set:function(t){if(!Eu(t,16))throw new g("Provided esId does not fit in 16 bits.");this.lA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"streamPriority",{get:function(){return this.dA},set:function(t){if(!Eu(t,5))throw new g("Provided streamPriority does not fit in 5 bits.");this.dA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"dependsOnEsId",{get:function(){return this.fA},set:function(t){if(t&&!Eu(t,16))throw new g("Provided dependsOnEsId does not fit in 16 bits.");this.fA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"ocrEsId",{get:function(){return this._A},set:function(t){if(t&&!Eu(t,16))throw new g("Provided ocrEsId does not fit in 16 bits.");this._A=t},enumerable:!1,configurable:!0}),n.prototype.getDescriptorSize=function(){return 3+(this.streamDependenceFlag?2:0)+(this.urlFlag?1+this.urlString.length:0)+(this.ocrStreamFlag?2:0)+this.decoderConfigDescriptor.getSize()+this.slConfigDescriptor.getSize()},n.prototype.serializeDescriptorContent=function(t){t.writer.writeUInt(this.esId,16),t.writer.writeBool(this.streamDependenceFlag),t.writer.writeBool(this.urlFlag),t.writer.writeBool(this.ocrStreamFlag),t.writer.writeUInt(this.streamPriority,5),this.streamDependenceFlag&&t.writer.writeUInt(this.dependsOnEsId,16),this.urlFlag&&(t.writer.writeByte(this.urlString.length),t.writer.writeString(this.urlString)),this.ocrStreamFlag&&t.writer.writeUInt(this.ocrEsId,16),this.decoderConfigDescriptor.serialize(t),this.slConfigDescriptor.serialize(t)}}(rs);x(),gt(),x(),gt(),x(),gt(),x(),gt(),x(),gt();var us=function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n.boxes=[],n}return du(n,t),n.prototype.getSize=function(){return t.prototype.getSize.call(this)+this.boxes.reduce((function(t,n){return t+n.getSize()}),0)},n.prototype.serialize=function(){for(var n=t.prototype.serialize.call(this),i=0,e=this.boxes;i<e.length;i++){var r=e[i];n=n.concat(r.serialize())}return n},n}(Tu),ss=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return du(n,t),n.prototype.serializeBoxContent=function(t){},n.prototype.getBoxContentSize=function(){return 0},n}(us),fs=function(t){function n(n,i){var e=t.call(this,n)||this;return e.dataReferenceIndex=i,e}return du(n,t),p.defineProperty(n.prototype,"dataReferenceIndex",{get:function(){return this.vA},set:function(t){if(!Eu(t,16))throw new g("Provided dataReferenceIndex does not fit in 16 bits.");this.vA=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return 8},n.prototype.serializeBoxContent=function(t){for(var n=0;n<6;n++)t.writer.writeByte(0);t.writer.writeUInt(this.dataReferenceIndex,16)},n}(ss),cs=function(t){function n(n,i,e,r){var o,u,s=this;return(s=t.call(this,n,i)||this).extra=r,s.channelCount=null!==(o=e.channelCount)&&void 0!==o?o:2,s.sampleSize=null!==(u=e.sampleSize)&&void 0!==u?u:16,s.sampleRate=e.sampleRate,s}return du(n,t),p.defineProperty(n.prototype,"channelCount",{get:function(){return this.gA},set:function(t){if(!Eu(t,16))throw new g("Provided channelCount does not fit in 16 bits.");this.gA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"sampleSize",{get:function(){return this.mA},set:function(t){if(!Eu(t,16))throw new g("Provided sampleSize does not fit in 16 bits.");this.mA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"sampleRate",{get:function(){return this.pA},set:function(t){if(!Eu(Iu(t,16),32))throw new g("Provided rate does not fit in 32 bits (fixed 16.16).");this.pA=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){var n,i;return t.prototype.getBoxContentSize.call(this)+8+2+2+2+2+(void 0!==this.sampleRate?4:0)+(null!==(i=null===(n=this.extra)||void 0===n?void 0:n.length)&&void 0!==i?i:0)},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(0,32),n.writer.writeUInt(0,32),n.writer.writeUInt(this.channelCount,16),n.writer.writeUInt(this.sampleSize,16),n.writer.writeUInt(0,16),n.writer.writeUInt(0,16),n.writer.writeUInt(Iu(this.sampleRate,16),32),this.extra&&ku(n.writer,this.extra)},n}(fs);x(),gt();!function(t){function n(n){var i=t.call(this,"stco",0,0)||this;return i.entries=n,i}du(n,t),p.defineProperty(n.prototype,"entries",{get:function(){return this.wA},set:function(t){if(!Eu(t.length,32))throw new g("Number of allowed entries cannot fit in 32 bits.");if(t.some((function(t){return!Eu(t,32)})))throw new g("Not all entries can be represented in 32 bits.");this.wA=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4+4*this.entries.length},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.entries.length,32);for(var i=0,e=this.entries;i<e.length;i++){var r=e[i];n.writer.writeUInt(r,32)}}}(Ou);x(),gt();!function(t){function n(n){var i=t.call(this,"clap")||this;return i.cleanApertureWidthN=n.cleanApertureWidthN,i.cleanApertureWidthD=n.cleanApertureWidthD,i.cleanApertureHeightN=n.cleanApertureHeightN,i.cleanApertureHeightD=n.cleanApertureHeightD,i.horizOffN=n.horizOffN,i.horizOffD=n.horizOffD,i.vertOffN=n.vertOffN,i.vertOffD=n.vertOffD,i}du(n,t),p.defineProperty(n.prototype,"cleanApertureWidthN",{get:function(){return this.yA},set:function(t){if(!Eu(t,32))throw new g("Provided cleanApertureWidthN does not fit in 32 bits.");this.yA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"cleanApertureWidthD",{get:function(){return this.bA},set:function(t){if(!Eu(t,32))throw new g("Provided cleanApertureWidthD does not fit in 32 bits.");this.bA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"cleanApertureHeightN",{get:function(){return this.AA},set:function(t){if(!Eu(t,32))throw new g("Provided cleanApertureHeightN does not fit in 32 bits.");this.AA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"cleanApertureHeightD",{get:function(){return this.SA},set:function(t){if(!Eu(t,32))throw new g("Provided cleanApertureHeightD does not fit in 32 bits.");this.SA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"horizOffN",{get:function(){return this.TA},set:function(t){if(!Eu(t,32))throw new g("Provided horizOffN does not fit in 32 bits.");this.TA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"horizOffD",{get:function(){return this.kA},set:function(t){if(!Eu(t,32))throw new g("Provided horizOffD does not fit in 32 bits.");this.kA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"vertOffN",{get:function(){return this.EA},set:function(t){if(!Eu(t,32))throw new g("Provided vertOffN does not fit in 32 bits.");this.EA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"vertOffD",{get:function(){return this.xA},set:function(t){if(!Eu(t,32))throw new g("Provided vertOffD does not fit in 32 bits.");this.xA=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return 32},n.prototype.serializeBoxContent=function(t){t.writer.writeUInt(this.cleanApertureWidthN,32),t.writer.writeUInt(this.cleanApertureWidthD,32),t.writer.writeUInt(this.cleanApertureHeightN,32),t.writer.writeUInt(this.cleanApertureHeightD,32),t.writer.writeUInt(this.horizOffN,32),t.writer.writeUInt(this.horizOffD,32),t.writer.writeUInt(this.vertOffN,32),t.writer.writeUInt(this.vertOffD,32)}}(Tu);x(),gt();!function(t){function n(n,i){var e=t.call(this,"ctts",n,0)||this;return e.entries=i,e}du(n,t),p.defineProperty(n.prototype,"entries",{get:function(){return this.wA},set:function(t){if(!Eu(t.length,32))throw new g("Number of allowed entries cannot fit in 32 bits.");if(t.some((function(t){return!Eu(t.sampleCount,32)||!Eu(t.sampleOffset,32)})))throw new g("Not all entries can be represented in 64 bits.");this.wA=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4+8*this.entries.length},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.entries.length,32);for(var i=0,e=this.entries;i<e.length;i++){var r=e[i];n.writer.writeUInt(r.sampleCount,32),0===this.version?n.writer.writeUInt(r.sampleOffset,32):1===this.version&&n.writer.writeInt(r.sampleOffset,32)}}}(Ou);x(),gt();!function(t){function n(n){var i=t.call(this,"url ",0,void 0===n?1:0)||this;return i.location=n,i}du(n,t),p.defineProperty(n.prototype,"location",{get:function(){return this.IA},set:function(t){this.flags=void 0===t?1:0,this.IA=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){var n=t.prototype.getBoxContentSize.call(this);return this.location?n+this.location.length+1:n},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),this.location&&(n.writer.writeString(this.location),n.writer.writeByte(0))}}(Ou);x(),gt();!function(t){function n(n,i,e){var r=t.call(this,"urn ",0,e)||this;return r.name=n,r.location=i,r}du(n,t),p.defineProperty(n.prototype,"location",{get:function(){return this.IA},set:function(t){if(1&this.flags)throw new g("The moov containment flag is set, a DataEntryUrlBox should be used instead.");this.IA=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){var n=t.prototype.getBoxContentSize.call(this)+this.name.length+1;return this.location?n+this.location.length+1:n},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeString(this.name),n.writer.writeByte(0),this.location&&(n.writer.writeString(this.location),n.writer.writeByte(0))}}(Ou);x(),gt();!function(t){function n(){return t.call(this,"dinf")||this}du(n,t)}(ss);x(),gt(),x(),gt();var hs=function(t){function n(n,i,e){var r=t.call(this,n)||this;if(r.version=i,!Eu(i,8))throw new g("the provided version cannot fit in 8 bits.");return r.flags=e,r}return du(n,t),p.defineProperty(n.prototype,"flags",{get:function(){return this.v_},set:function(t){this.v_=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return 4},n.prototype.serializeFlags=function(t){if("number"!=typeof this.flags)throw new g("Missing custom serializeFlags method.");t.writer.writeUInt(this.flags,24)},n.prototype.serializeBoxContent=function(t){t.writer.writeByte(this.version),this.serializeFlags(t)},n}(us);!function(t){function n(){return t.call(this,"dref",0,0)||this}du(n,t),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.boxes.length,32)}}(hs);x(),gt(),x(),gt();var as=function(t){function n(n,i,e){void 0===e&&(e=0);var r=t.call(this,"elst",i,e)||this;return r.entries=n,r}return du(n,t),p.defineProperty(n.prototype,"bitSize",{get:function(){return 0===this.version?32:64},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"entries",{get:function(){return this.wA},set:function(t){for(var n=0,i=t;n<i.length;n++){var e=i[n];if(!Eu(e.segmentDuration,this.bitSize))throw new g("SegmentDuration of one of the entries does not fit in ".concat(this.bitSize," bits."));if(!Eu(e.mediaTime,this.bitSize))throw new g("MediaTime of one of the entries does not fit in ".concat(this.bitSize," bits."));if(!Eu(e.mediaRateInteger,16))throw new g("Provided mediaRateInteger does not fit in 16 bits.");if(e.mediaRateFraction&&!Eu(e.mediaRateFraction,16))throw new g("Provided mediaRateFraction does not fit in 16 bits.")}this.wA=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4+this.entries.length*(2*this.bitSize/8+2+2)},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.entries.length,32),this.serializeElstBoxContent(n)},n}(Ou),vs=function(t){function n(n,i){return void 0===i&&(i=0),t.call(this,n,0,i)||this}return du(n,t),n.prototype.serializeElstBoxContent=function(t){for(var n,i=0,e=this.entries;i<e.length;i++){var r=e[i];t.writer.writeUInt(r.segmentDuration,32),t.writer.writeInt(r.mediaTime,32),t.writer.writeUInt(r.mediaRateInteger,16),t.writer.writeUInt(null!==(n=r.mediaRateFraction)&&void 0!==n?n:0,16)}},n}(as),ds=function(t){function n(n,i){return void 0===i&&(i=0),t.call(this,n,1,i)||this}return du(n,t),n.prototype.serializeElstBoxContent=function(t){for(var n,i=0,e=this.entries;i<e.length;i++){var r=e[i];t.writer.writeUInt(r.segmentDuration.getHighBitsUnsigned(),32),t.writer.writeUInt(r.segmentDuration.getLowBitsUnsigned(),32),t.writer.writeInt(r.mediaTime.getHighBits(),32),t.writer.writeInt(r.mediaTime.getLowBits(),32),t.writer.writeUInt(r.mediaRateInteger,16),t.writer.writeUInt(null!==(n=r.mediaRateFraction)&&void 0!==n?n:0,16)}},n}(as);function ls(t){for(var n=t.data,i=Zu(n.nextUint32()),e=i.version,r=i.flags,o=n.nextUint32(),u=[],s=0;s<o;s++){var f=void 0,c=void 0;0===e?(f=n.nextUint32(),c=n.nextInt32()):(f=n.nextUint64(),c=n.nextInt64());var h=n.nextInt16(),a=n.nextInt16();u.push({segmentDuration:f,mediaTime:c,mediaRateFraction:a,mediaRateInteger:h})}return 0===e?new vs(u,r.raw):new ds(u,r.raw)}var ws=function(t){function n(){return t.call(this,"edts")||this}return du(n,t),n}(ss);function bs(t){for(var n=new ws,i=0,e=Gu(t.data);i<e.length;i++){var r=e[i];Yu(r,"elst")?n.boxes.push(ls(r)):n.boxes.push(ns(r))}return n}x(),gt(),x(),gt();var gs=function(t){function n(n,i,e,r){var o=t.call(this,n)||this;return o.majorBrand=i,o.minorVersion=e,o.compatibleBrands=r,o}return du(n,t),p.defineProperty(n.prototype,"majorBrand",{get:function(){return this.RA},set:function(t){if(4!==t.length)throw new g("the provided major brand does not conform to the 4 character requirement");this.RA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"minorVersion",{get:function(){return this.CA},set:function(t){if(!Eu(t,32))throw new g("the provided minor version does not fit in 32 bits.");this.CA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"compatibleBrands",{get:function(){return this.PA},set:function(t){if(t.some((function(t){return 4!==t.length})))throw new g("Some of the compatible brands do not conform to the 4 character requirement");this.PA=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return 4*(2+this.compatibleBrands.length)},n.prototype.serializeBoxContent=function(t){t.writer.writeString(this.majorBrand),t.writer.writeUInt(this.minorVersion,32);for(var n=0,i=this.compatibleBrands;n<i.length;n++){var e=i[n];t.writer.writeString(e)}},n}(Tu);!function(t){function n(n,i,e){return t.call(this,"ftyp",n,i,e)||this}du(n,t)}(gs);x(),gt();!function(t){function n(n,i){void 0===i&&(i="free");var e=t.call(this,i)||this;return e.data=n,e}du(n,t),n.prototype.getBoxContentSize=function(){var t,n;return null!==(n=null===(t=this.data)||void 0===t?void 0:t.length)&&void 0!==n?n:0},n.prototype.serializeBoxContent=function(t){this.data&&t.concat(yu.from(this.data))}}(Tu);x(),gt(),x(),gt();var ms=function(t){function n(n,i,e,r){void 0===r&&(r=0);var o=t.call(this,"mdhd",e,r)||this;return o.creationTime=n.creation,o.modificationTime=n.modification,o.timescale=n.scale,o.duration=n.duration,o.language=i,o}return du(n,t),p.defineProperty(n.prototype,"creationTime",{get:function(){return this.DA},set:function(t){if(!Eu(t,this.bitSize))throw new g("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.DA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"modificationTime",{get:function(){return this.NA},set:function(t){if(!Eu(t,this.bitSize))throw new g("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.NA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"timescale",{get:function(){return this.MA},set:function(t){if(!Eu(t,32))throw new g("Provided sequence number does not fit in 32 bits.");this.MA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"duration",{get:function(){return this.LA},set:function(t){if(!Eu(t,this.bitSize))throw new g("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.LA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"language",{get:function(){return this.BA},set:function(t){if(!Ss(t))throw new g("Expected an ISO-639-2/T language code");this.BA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"bitSize",{get:function(){return 0===this.version?32:64},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.bitSize/8*3+4+2+2},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),this.serializeMdiaContent(n),n.writer.writeBit(0);for(var i=0,e=this.language;i<e.length;i++){var r=e[i];n.writer.writeUInt(r.charCodeAt(0)-96,5)}n.writer.writeUInt(0,16)},n}(Ou),ps=function(t){function n(n,i,e){return void 0===e&&(e=0),t.call(this,n,i,0,e)||this}return du(n,t),n.prototype.serializeMdiaContent=function(t){t.writer.writeUInt(this.creationTime,32),t.writer.writeUInt(this.modificationTime,32),t.writer.writeUInt(this.timescale,32),t.writer.writeUInt(this.duration,32)},n}(ms),ys=function(t){function n(n,i,e){return void 0===e&&(e=0),t.call(this,n,i,1,e)||this}return du(n,t),n.prototype.serializeMdiaContent=function(t){t.writer.writeUInt(this.creationTime.getHighBitsUnsigned(),32),t.writer.writeUInt(this.creationTime.getLowBitsUnsigned(),32),t.writer.writeUInt(this.modificationTime.getHighBitsUnsigned(),32),t.writer.writeUInt(this.modificationTime.getLowBitsUnsigned(),32),t.writer.writeUInt(this.timescale,32),t.writer.writeUInt(this.duration.getHighBitsUnsigned(),32),t.writer.writeUInt(this.duration.getLowBitsUnsigned(),32)},n}(ms);function _s(t){var n=t.data,i=Zu(n.nextUint32()),e=i.version,r=i.flags,o=Ju(n,e),u=new mu(yu.from(n.nextUint8Array(2)));u.skipBits(1);for(var s=[],f=0;f<3;f++)s.push(u.readUInt(5));var c=s.map((function(t){return String.fromCharCode(t+96)})).join("");return Ss(c)||(c="und"),n.skip(2),0===e?new ps(o,c,r.raw):new ys(o,c,r.raw)}function Ss(t){return/^[a-z]{3}$/.test(t)}var Ts=function(t){function n(){return t.call(this,"mdia")||this}return du(n,t),n}(ss);function Es(t){for(var n=new Ts,i=0,e=Gu(t.data);i<e.length;i++){var r=e[i];Yu(r,"mdhd")?n.boxes.push(_s(r)):Yu(r,"hdlr")?n.boxes.push(es(r)):n.boxes.push(ns(r))}return n}x(),gt();!function(t){function n(){var n=t.call(this,"mdat")||this;return n.data=new yu,n}du(n,t),n.prototype.getBoxContentSize=function(){return this.data.length},n.prototype.serializeBoxContent=function(t){t.concat(this.data)}}(Tu);x(),gt();!function(t){function n(){return t.call(this,"minf")||this}du(n,t)}(ss);x(),gt();var Is;!function(t){function n(n){var i=t.call(this,"meta",0,0)||this;return i.handler=n,i}du(n,t),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.handler.getSize()},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.concat(this.handler.serialize())}}(hs);x(),gt(),x(),gt(),function(t){t.VIDEO="vide",t.AUXILIARY_VIDEO="auxv",t.AUDIO="soun",t.METADATA="meta",t.HINT="hint",t.TEXT="text",t.SUBTITLE="subt",t.FONT="fdsm"}(Is||(Is={})),x(),gt();var ks,Rs,Os={a:1,b:0,u:0,c:0,d:1,v:0,x:0,y:0,w:1};function Ns(t,n){n.writer.writeUInt(Iu(t.a,16),32),n.writer.writeUInt(Iu(t.b,16),32),n.writer.writeUInt(Iu(0,30),32),n.writer.writeUInt(Iu(t.c,16),32),n.writer.writeUInt(Iu(t.d,16),32),n.writer.writeUInt(Iu(0,30),32),n.writer.writeUInt(Iu(t.x,16),32),n.writer.writeUInt(Iu(t.y,16),32),n.writer.writeUInt(Iu(1,30),32)}function Ps(t,n){var i,e,r,o;n.writer.writeUInt(null!==(i=t.isLeading)&&void 0!==i?i:ks.UNKNOWN,2),n.writer.writeUInt(null!==(e=t.sampleDependsOn)&&void 0!==e?e:Rs.UNKNOWN,2),n.writer.writeUInt(null!==(r=t.sampleIsDependedOn)&&void 0!==r?r:Rs.UNKNOWN,2),n.writer.writeUInt(null!==(o=t.sampleHasRedundancy)&&void 0!==o?o:Rs.UNKNOWN,2)}function As(t,n){var i,e,r;n.writer.writeUInt(0,4),Ps(t,n),n.writer.writeUInt(null!==(i=t.samplePaddingValue)&&void 0!==i?i:0,3),n.writer.writeBool(null!==(e=t.sampleIsNonSyncSample)&&void 0!==e&&e),n.writer.writeUInt(null!==(r=t.sampleDegradationPriority)&&void 0!==r?r:0,16)}x(),gt(),function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.WITH_DEPENDENCY=1]="WITH_DEPENDENCY",t[t.NO=2]="NO",t[t.WITHOUT_DEPENDENCY=3]="WITHOUT_DEPENDENCY"}(ks||(ks={})),function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.YES=1]="YES",t[t.NO=2]="NO",t[t.RESERVED=3]="RESERVED"}(Rs||(Rs={})),x(),gt(),x(),gt();var Ds=function(){};x(),gt(),x(),gt(),x(),gt();var Cs=function(t){function n(n,i,e){var r=t.call(this,"pssh",n,0)||this;return r.systemId=i,r.data=e,r}return du(n,t),p.defineProperty(n.prototype,"systemId",{get:function(){return this.OA},set:function(t){if(16!==t.length)throw new g("Provided systemId length is not 16.");this.OA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"data",{get:function(){return this.Zp},set:function(t){if(!Eu(t.length,32))throw new g("Provided data length does not fit in 32 bits.");this.Zp=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+16+4+this.data.length},n.prototype.serializeVersionBoxContent=function(t){},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.concat(yu.from(this.systemId)),this.serializeVersionBoxContent(n),n.writer.writeUInt(this.data.length,32),n.concat(yu.from(this.data))},n}(Ou),xs=function(t){function n(n,i){return t.call(this,0,n,i)||this}return du(n,t),n}(Cs),Bs=function(t){function n(n,i,e){var r=t.call(this,1,n,i)||this;return r.kIds=e,r}return du(n,t),p.defineProperty(n.prototype,"kIds",{get:function(){return this.FA},set:function(t){if(!Eu(t.length,32))throw new g("Provided kIds length cannot fit in 32 bits.");if(t.some((function(t){return 16!==t.length})))throw new g("Not all provided key ids are 16 bytes long.");this.FA=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4+16*this.kIds.length},n.prototype.serializeVersionBoxContent=function(t){t.writer.writeUInt(this.kIds.length,32);for(var n=0,i=this.kIds;n<i.length;n++){var e=i[n];t.concat(yu.from(e))}},n}(Cs);function Ms(t){var n=t.data.nextUint8();t.data.skip(3);var i=t.data.nextUint8Array(16),e=[];if(1===n)for(var r=t.data.nextUint32(),o=0;o<r;o++)e.push(t.data.nextUint8Array(16));var u=t.data.nextUint32(),s=t.data.nextUint8Array(u);return 1===n?new Bs(i,s,e):new xs(i,s)}x(),gt(),x(),gt();var Ls=function(t){function n(n,i,e){void 0===e&&(e=0);var r=t.call(this,"mehd",i,e)||this;return r.fragmentDuration=n,r}return du(n,t),p.defineProperty(n.prototype,"bitSize",{get:function(){return 0===this.version?32:64},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"fragmentDuration",{get:function(){return this.VA},set:function(t){if(!Eu(t,this.bitSize))throw new g("The provided fragmentDuration does not fit in ".concat(this.bitSize," bits."));this.VA=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.bitSize/8},n}(Ou),Us=function(t){function n(n,i){return void 0===i&&(i=0),t.call(this,n,0,i)||this}return du(n,t),n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.fragmentDuration,32)},n}(Ls),Fs=function(t){function n(n,i){return void 0===i&&(i=0),t.call(this,n,1,i)||this}return du(n,t),n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.fragmentDuration.getHighBitsUnsigned(),32),n.writer.writeUInt(this.fragmentDuration.getLowBitsUnsigned(),32)},n}(Ls);function zs(t){var n=t.data,i=Zu(n.nextUint32()),e=i.version,r=i.flags;return 0===e?new Us(n.nextUint32(),r.raw):new Fs(n.nextUint64(),r.raw)}x(),gt();var Ws=function(t){function n(n,i,e,r){void 0===i&&(i={}),void 0===e&&(e=0),void 0===r&&(r=0);var o,u,s,f=this;return(f=t.call(this,"trex",e,r)||this).trackId=n,f.defaultSampleDescriptionIndex=null!==(o=null==i?void 0:i.sampleDescriptionIndex)&&void 0!==o?o:0,f.defaultSampleDuration=null!==(u=i.sampleDuration)&&void 0!==u?u:0,f.defaultSampleSize=null!==(s=i.sampleSize)&&void 0!==s?s:0,f.defaultSampleFlags=i.sampleFlags,f}return du(n,t),p.defineProperty(n.prototype,"trackId",{get:function(){return this.WA},set:function(t){if(!Eu(t,32))throw new g("Provided track id does not fit in 32 bits.");this.WA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"defaultSampleDescriptionIndex",{get:function(){return this.UA},set:function(t){if(!Eu(t,32))throw new g("Provided default sample description index does not fit in 32 bits.");this.UA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"defaultSampleDuration",{get:function(){return this.GA},set:function(t){if(!Eu(t,32))throw new g("Provided default sample duration does not fit in 32 bits.");this.GA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"defaultSampleSize",{get:function(){return this.ZA},set:function(t){if(!Eu(t,32))throw new g("Provided default sample size does not fit in 32 bits.");this.ZA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"defaultSampleFlags",{get:function(){return this.HA},set:function(t){if((null==t?void 0:t.samplePaddingValue)&&!Eu(t.samplePaddingValue,3))throw new g("Provided sample padding value does not fit in 3 bits.");if((null==t?void 0:t.sampleDegradationPriority)&&!Eu(t.sampleDegradationPriority,16))throw new g("Provided sample degradation priority does not fit in 16 bits.");this.HA=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+20},n.prototype.serializeBoxContent=function(n){var i;t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.trackId,32),n.writer.writeUInt(this.defaultSampleDescriptionIndex,32),n.writer.writeUInt(this.defaultSampleDuration,32),n.writer.writeUInt(this.defaultSampleSize,32),As(null!==(i=this.defaultSampleFlags)&&void 0!==i?i:{},n)},n}(Ou);function Vs(t){var n=t.data,i=Zu(n.nextUint32()),e=i.version,r=i.flags,o=n.nextUint32(),u=n.nextUint32(),s=n.nextUint32(),f=n.nextUint32(),c=Qu(new mu(yu.from(n.nextUint8Array(4))));return new Ws(o,{sampleDescriptionIndex:u,sampleDuration:s,sampleSize:f,sampleFlags:c},e,r.raw)}var Hs=function(t){function n(){return t.call(this,"mvex")||this}return du(n,t),n}(ss);function qs(t){for(var n=new Hs,i=0,e=Gu(t.data);i<e.length;i++){var r=e[i];Yu(r,"mehd")?n.boxes.push(zs(r)):Yu(r,"trex")?n.boxes.push(Vs(r)):n.boxes.push(ns(r))}return n}x(),gt();var Xs=function(t){function n(i,e,r,o,u){void 0===u&&(u=0);var s,f,c,h=this;return(h=t.call(this,"mvhd",o,u)||this).creationTime=i.creation,h.modificationTime=i.modification,h.timescale=i.scale,h.duration=i.duration,h.rate=null!==(s=r.rate)&&void 0!==s?s:n.DEFAULT_RATE,h.volume=null!==(f=r.volume)&&void 0!==f?f:n.DEFAULT_VOLUME,h.matrix=null!==(c=r.matrix)&&void 0!==c?c:Os,h.XA=e,h}return du(n,t),p.defineProperty(n.prototype,"bitSize",{get:function(){return 0===this.version?32:64},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"creationTime",{get:function(){return this.DA},set:function(t){if(!Eu(t,this.bitSize))throw new g("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.DA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"modificationTime",{get:function(){return this.NA},set:function(t){if(!Eu(t,this.bitSize))throw new g("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.NA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"timescale",{get:function(){return this.MA},set:function(t){if(!Eu(t,32))throw new g("Provided sequence number does not fit in 32 bits.");this.MA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"duration",{get:function(){return this.LA},set:function(t){if(!Eu(t,this.bitSize))throw new g("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.LA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"rate",{get:function(){return this.zA},set:function(t){if(!Eu(Iu(t,16),32))throw new g("Provided rate does not fit in 32 bits (fixed 16.16).");this.zA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"volume",{get:function(){return this.qA},set:function(t){if(!Eu(Iu(t,8),16))throw new g("Provided volume does not fit in 16 bits (fixed 8.8).");this.qA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"matrix",{get:function(){return this.YA},set:function(t){if(0!==t.u||0!==t.v||1!==t.w)throw new g("(u, v, w) does not match the required (0, 0, 1)");this.YA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"nextTrackId",{get:function(){return this.XA},set:function(t){if(0===t)throw new g("NextTrackId cannot be 0.");if(!Eu(t,32))throw new g("NextTrackId cannot exceed 32 bits.");this.XA=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.bitSize/8*3+4+4+2+2+8+36+24+4},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),this.serializeMvhdContent(n),n.writer.writeUInt(Iu(this.rate,16),32),n.writer.writeUInt(Iu(this.volume,8),16),n.writer.writeUInt(0,16),n.writer.writeUInt(0,32),n.writer.writeUInt(0,32),Ns(this.matrix,n);for(var i=0;i<6;i++)n.writer.writeUInt(0,32);n.writer.writeUInt(this.nextTrackId,32)},n.DEFAULT_RATE=1,n.DEFAULT_VOLUME=1,n}(Ou),js=function(t){function n(n,i,e,r){return void 0===e&&(e={}),void 0===r&&(r=0),t.call(this,n,i,e,0,r)||this}return du(n,t),n.prototype.serializeMvhdContent=function(t){t.writer.writeUInt(this.creationTime,32),t.writer.writeUInt(this.modificationTime,32),t.writer.writeUInt(this.timescale,32),t.writer.writeUInt(this.duration,32)},n}(Xs),Ys=function(t){function n(n,i,e,r){return void 0===e&&(e={}),void 0===r&&(r=0),t.call(this,n,i,e,1,r)||this}return du(n,t),n.prototype.serializeMvhdContent=function(t){t.writer.writeUInt(this.creationTime.getHighBitsUnsigned(),32),t.writer.writeUInt(this.creationTime.getLowBitsUnsigned(),32),t.writer.writeUInt(this.modificationTime.getHighBitsUnsigned(),32),t.writer.writeUInt(this.modificationTime.getLowBitsUnsigned(),32),t.writer.writeUInt(this.timescale,32),t.writer.writeUInt(this.duration.getHighBitsUnsigned(),32),t.writer.writeUInt(this.duration.getLowBitsUnsigned(),32)},n}(Xs);function Ks(t){var n=t.data,i=Zu(n.nextUint32()),e=i.version,r=i.flags,o=Ju(n,e),u=Ru(n.nextUint32(),16),s=Ru(n.nextUint16(),8);n.skip(2),n.skip(8);var f=ts(n);n.skip(24);var c=n.nextUint32();return 0===e?new js(o,c,{rate:u,volume:s,matrix:f},r.raw):new Ys(o,c,{rate:u,volume:s,matrix:f},r.raw)}x(),gt(),x(),gt();var Gs=function(t){function n(n,i,e,r,o,u,s){void 0===s&&(s={});var f,c,h,a=this;return a=t.call(this,"tkhd",n,function(t){var n,i,e,r;return{trackEnabled:null===(n=null==t?void 0:t.trackEnabled)||void 0===n||n,trackInMovie:null===(i=null==t?void 0:t.trackInMovie)||void 0===i||i,trackInPreview:null===(e=null==t?void 0:t.trackInPreview)||void 0===e||e,trackSizeIsAspectRatio:null!==(r=null==t?void 0:t.trackSizeIsAspectRatio)&&void 0!==r&&r}}(s))||this,a.creationTime=i.creation,a.modificationTime=i.modification,a.trackId=e,a.duration=i.duration,a.volume=r,a.width=o,a.height=u,a.layer=null!==(f=s.layer)&&void 0!==f?f:0,a.alternateGroup=null!==(c=s.alternateGroup)&&void 0!==c?c:0,a.matrix=null!==(h=s.matrix)&&void 0!==h?h:Os,a}return du(n,t),p.defineProperty(n.prototype,"bitSize",{get:function(){return 0===this.version?32:64},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"creationTime",{get:function(){return this.DA},set:function(t){if(!Eu(t,this.bitSize))throw new g("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.DA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"modificationTime",{get:function(){return this.NA},set:function(t){if(!Eu(t,this.bitSize))throw new g("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.NA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"trackId",{get:function(){return this.WA},set:function(t){if(0===t)throw new g("trackId cannot be 0.");if(!Eu(t,32))throw new g("trackId cannot exceed 32 bits.");this.WA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"duration",{get:function(){return this.LA},set:function(t){if(!Eu(t,this.bitSize))throw new g("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.LA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"volume",{get:function(){return this.qA},set:function(t){if(!Eu(Iu(t,8),16))throw new g("Provided volume does not fit in 16 bits (fixed 8.8).");this.qA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"width",{get:function(){return this.KA},set:function(t){if(!Eu(Iu(t,16),32))throw new g("Provided width does not fit in 32 bits (fixed 16.16).");this.KA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"height",{get:function(){return this.jA},set:function(t){if(!Eu(Iu(t,16),32))throw new g("Provided height does not fit in 32 bits (fixed 16.16).");this.jA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"layer",{get:function(){return this.QA},set:function(t){if(!Eu(t,16))throw new g("Provided layer does not fit in 16 bits.");this.QA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"alternateGroup",{get:function(){return this.JA},set:function(t){if(!Eu(t,16))throw new g("Provided alternateGroup does not fit in 16 bits.");this.JA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"matrix",{get:function(){return this.YA},set:function(t){if(0!==t.u||0!==t.v||1!==t.w)throw new g("(u, v, w) does not match the required (0, 0, 1)");this.YA=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.bitSize/8*3+4+4+8+2+2+2+2+36+4+4},n.prototype.serializeFlags=function(t){t.writer.writeUInt(0,20),t.writer.writeBool(this.flags.trackSizeIsAspectRatio),t.writer.writeBool(this.flags.trackInPreview),t.writer.writeBool(this.flags.trackInMovie),t.writer.writeBool(this.flags.trackEnabled)},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),this.serializeTkhdContent(n),n.writer.writeUInt(0,32),n.writer.writeUInt(0,32),n.writer.writeUInt(this.layer,16),n.writer.writeUInt(this.alternateGroup,16),n.writer.writeUInt(Iu(this.volume,8),16),n.writer.writeUInt(0,16),Ns(this.matrix,n),n.writer.writeUInt(Iu(this.width,16),32),n.writer.writeUInt(Iu(this.height,16),32)},n}(Ou),$s=function(t){function n(n,i,e,r,o,u){return t.call(this,0,n,i,e,r,o,u)||this}return du(n,t),n.prototype.serializeTkhdContent=function(t){t.writer.writeUInt(this.creationTime,32),t.writer.writeUInt(this.modificationTime,32),t.writer.writeUInt(this.trackId,32),t.writer.writeUInt(0,32),t.writer.writeUInt(this.duration,32)},n}(Gs),Zs=function(t){function n(n,i,e,r,o,u){return t.call(this,1,n,i,e,r,o,u)||this}return du(n,t),n.prototype.serializeTkhdContent=function(t){t.writer.writeUInt(this.creationTime.getHighBitsUnsigned(),32),t.writer.writeUInt(this.creationTime.getLowBitsUnsigned(),32),t.writer.writeUInt(this.modificationTime.getHighBitsUnsigned(),32),t.writer.writeUInt(this.modificationTime.getLowBitsUnsigned(),32),t.writer.writeUInt(this.trackId,32),t.writer.writeUInt(0,32),t.writer.writeUInt(this.duration.getHighBitsUnsigned(),32),t.writer.writeUInt(this.duration.getLowBitsUnsigned(),32)},n}(Gs);function Js(t){var n,i,e,r,o=t.data,u=Zu(o.nextUint32()),s=u.version,f=u.flags,c=f.isSet(8),h=f.isSet(4),a=f.isSet(2),v=f.isSet(1);0===s?(n=o.nextUint32(),i=o.nextUint32(),e=o.nextUint32(),o.skip(4),r=o.nextUint32()):(n=o.nextUint64(),i=o.nextUint64(),e=o.nextUint32(),o.skip(4),r=o.nextUint64()),o.skip(8);var d=o.nextInt16(),l=o.nextInt16(),w=Ru(o.nextInt16(),8);o.skip(2);var b=ts(o),g=Ru(o.nextUint32(),16),m=Ru(o.nextUint32(),16);return 0===s?new $s({creation:n,modification:i,duration:r},e,w,g,m,{layer:d,matrix:b,alternateGroup:l,trackSizeIsAspectRatio:c,trackEnabled:v,trackInPreview:h,trackInMovie:a}):new Zs({creation:n,modification:i,duration:r},e,w,g,m,{layer:d,matrix:b,alternateGroup:l,trackSizeIsAspectRatio:c,trackEnabled:v,trackInPreview:h,trackInMovie:a})}var Qs=function(t){function n(){return t.call(this,"trak")||this}return du(n,t),n}(ss);function tf(t){for(var n=new Qs,i=0,e=Gu(t.data);i<e.length;i++){var r=e[i];Yu(r,"tkhd")?n.boxes.push(Js(r)):Yu(r,"mdia")?n.boxes.push(Es(r)):Yu(r,"edts")?n.boxes.push(bs(r)):n.boxes.push(ns(r))}return n}var nf=function(t){function n(){return t.call(this,"moov")||this}return du(n,t),n}(ss);x(),gt(),x(),gt(),x(),gt();var ef=function(t){function n(n,i,e){void 0===e&&(e=0);var r=t.call(this,"tfdt",i,e)||this;return r.baseMediaDecodeTime=n,r}return du(n,t),p.defineProperty(n.prototype,"bitSize",{get:function(){return 0===this.version?32:64},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"baseMediaDecodeTime",{get:function(){return this.$A},set:function(t){if(!Eu(t,this.bitSize))throw new g("Provided baseMediaDecodeTime does not fit in ".concat(this.bitSize," bits."));this.$A=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.bitSize/8},n}(Ou),rf=function(t){function n(n,i){return void 0===i&&(i=0),t.call(this,n,0,i)||this}return du(n,t),n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.baseMediaDecodeTime,32)},n}(ef),of=function(t){function n(n,i){return void 0===i&&(i=0),t.call(this,n,1,i)||this}return du(n,t),n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.baseMediaDecodeTime.getHighBitsUnsigned(),32),n.writer.writeUInt(this.baseMediaDecodeTime.getLowBitsUnsigned(),32)},n}(ef);function uf(t){var n=t.data,i=Zu(n.nextUint32()),e=i.version,r=i.flags;return 0===e?new rf(n.nextUint32(),r.raw):new of(n.nextUint64(),r.raw)}x(),gt();var sf=function(t){function n(n,i){void 0===i&&(i=0);var e=t.call(this,"tfhd",i,function(t){return{baseDataOffsetPresent:void 0!==t.baseDataOffset,sampleDescriptionIndexPresent:void 0!==t.sampleDescriptionIndex,defaultSampleDurationPresent:void 0!==t.defaultSampleDuration,defaultSampleSizePresent:void 0!==t.defaultSampleSize,defaultSampleFlagsPresent:void 0!==t.defaultSampleFlags,durationIsEmpty:t.durationIsEmpty,defaultBaseIsMoof:t.defaultBaseIsMoof}}(n))||this;return e.trackId=n.trackId,e.baseDataOffset=n.baseDataOffset,e.sampleDescriptionIndex=n.sampleDescriptionIndex,e.defaultSampleDuration=n.defaultSampleDuration,e.defaultSampleSize=n.defaultSampleSize,e.defaultSampleFlags=n.defaultSampleFlags,e}return du(n,t),p.defineProperty(n.prototype,"trackId",{get:function(){return this.WA},set:function(t){if(!Eu(t,32))throw new g("Provided track id does not fit in 32 bits.");this.WA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"baseDataOffset",{get:function(){return this.tS},set:function(t){if(void 0===t&&this.flags.baseDataOffsetPresent)throw new g("The base data offset present flag is set.");if(void 0!==t&&!this.flags.baseDataOffsetPresent)throw new g("The base data offset present flag is not set.");if(t&&!Eu(t,64))throw new g("Provided baseDataOffset does not fit in 32 bits.");this.tS=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"sampleDescriptionIndex",{get:function(){return this.eS},set:function(t){if(void 0===t&&this.flags.sampleDescriptionIndexPresent)throw new g("The sample description index flag is set.");if(void 0!==t&&!this.flags.sampleDescriptionIndexPresent)throw new g("The sample description index flag is not set.");if(t&&!Eu(t,32))throw new g("Provided sampleDescriptionIndex does not fit in 32 bits.");this.eS=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"defaultSampleDuration",{get:function(){return this.GA},set:function(t){if(void 0===t&&this.flags.defaultSampleDurationPresent)throw new g("The default sample duration present flag is set.");if(void 0!==t&&!this.flags.defaultSampleDurationPresent)throw new g("The default sample duration present flag is not set.");if(t&&!Eu(t,32))throw new g("Provided defaultSampleDuration does not fit in 32 bits.");this.GA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"defaultSampleSize",{get:function(){return this.ZA},set:function(t){if(void 0===t&&this.flags.defaultSampleSizePresent)throw new g("The default sample size present flag is set.");if(void 0!==t&&!this.flags.defaultSampleSizePresent)throw new g("The default sample size present flag is not set.");if(t&&!Eu(t,32))throw new g("Provided defaultSampleSize does not fit in 32 bits.");this.ZA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"defaultSampleFlags",{get:function(){return this.HA},set:function(t){if(void 0===t&&this.flags.defaultSampleFlagsPresent)throw new g("The default sample flags present flag is set.");if(void 0!==t&&!this.flags.defaultSampleFlagsPresent)throw new g("The default sample flags present flag is not set.");if((null==t?void 0:t.samplePaddingValue)&&!Eu(t.samplePaddingValue,3))throw new g("Provided sample padding value does not fit in 3 bits.");if((null==t?void 0:t.sampleDegradationPriority)&&!Eu(t.sampleDegradationPriority,16))throw new g("Provided sample degradation priority does not fit in 16 bits.");this.HA=t},enumerable:!1,configurable:!0}),n.prototype.serializeFlags=function(t){t.writer.writeUInt(0,6),t.writer.writeBool(this.flags.defaultBaseIsMoof),t.writer.writeBool(this.flags.durationIsEmpty),t.writer.writeByte(0),t.writer.writeUInt(0,2),t.writer.writeBool(this.flags.defaultSampleFlagsPresent),t.writer.writeBool(this.flags.defaultSampleSizePresent),t.writer.writeBool(this.flags.defaultSampleDurationPresent),t.writer.writeBit(0),t.writer.writeBool(this.flags.sampleDescriptionIndexPresent),t.writer.writeBool(this.flags.baseDataOffsetPresent)},n.prototype.getBoxContentSize=function(){var n=t.prototype.getBoxContentSize.call(this)+4;return this.flags.baseDataOffsetPresent&&(n+=8),this.flags.sampleDescriptionIndexPresent&&(n+=4),this.flags.defaultSampleDurationPresent&&(n+=4),this.flags.defaultSampleSizePresent&&(n+=4),this.flags.defaultSampleFlagsPresent&&(n+=4),n},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.trackId,32),this.flags.baseDataOffsetPresent&&(n.writer.writeUInt(this.baseDataOffset.getHighBitsUnsigned(),32),n.writer.writeUInt(this.baseDataOffset.getLowBitsUnsigned(),32)),this.flags.sampleDescriptionIndexPresent&&n.writer.writeUInt(this.sampleDescriptionIndex,32),this.flags.defaultSampleDurationPresent&&n.writer.writeUInt(this.defaultSampleDuration,32),this.flags.defaultSampleSizePresent&&n.writer.writeUInt(this.defaultSampleSize,32),this.flags.defaultSampleFlagsPresent&&As(this.defaultSampleFlags,n)},n}(Ou);function ff(t){var n=t.data,i=n.nextUint8(),e=new mu(yu.from(n.nextUint8Array(3)));e.skipBits(6);var r=Boolean(e.readBit()),o=Boolean(e.readBit());e.skipBits(10);var u=Boolean(e.readBit()),s=Boolean(e.readBit()),f=Boolean(e.readBit());e.skipBits(1);var c=Boolean(e.readBit()),h=Boolean(e.readBit()),a=n.nextUint32(),v=h?n.nextUint64():void 0,d=c?n.nextUint32():void 0,l=f?n.nextUint32():void 0,w=s?n.nextUint32():void 0,b=u?Qu(new mu(yu.from(n.nextUint8Array(4)))):void 0;return new sf({trackId:a,defaultBaseIsMoof:r,durationIsEmpty:o,baseDataOffset:v,sampleDescriptionIndex:d,defaultSampleDuration:l,defaultSampleSize:w,defaultSampleFlags:b},i)}x(),gt();var cf=function(t){function n(n,i,e){var r=t.call(this,"trun",n,function(t){var n,i,e,r;return{dataOffsetPresent:void 0!==t.dataOffset,firstSampleFlagsPresent:void 0!==t.firstSampleFlags,sampleDurationPresent:null!==(n=t.sampleDurationPresent)&&void 0!==n&&n,sampleSizePresent:null!==(i=t.sampleSizePresent)&&void 0!==i&&i,sampleFlagsPresent:null!==(e=t.sampleFlagsPresent)&&void 0!==e&&e,sampleCompositionTimeOffsetsPresent:null!==(r=t.sampleCompositionTimeOffsetsPresent)&&void 0!==r&&r}}(i))||this;return r.dataOffset=i.dataOffset,r.samples=e,r.firstSampleFlags=i.firstSampleFlags,r}return du(n,t),p.defineProperty(n.prototype,"dataOffset",{get:function(){return this.iS},set:function(t){if(t&&!Eu(t,32))throw new g("Provided data offset does not fit in 32 bits.");this.iS=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"firstSampleFlags",{get:function(){return this.sS},set:function(t){if((null==t?void 0:t.samplePaddingValue)&&!Eu(t.samplePaddingValue,3))throw new g("Provided sample padding value does not fit in 3 bits.");if((null==t?void 0:t.sampleDegradationPriority)&&!Eu(t.sampleDegradationPriority,16))throw new g("Provided sample degradation priority does not fit in 16 bits.");this.sS=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"samples",{get:function(){return this.nS},set:function(t){var n,i;if(!Eu(t.length,32))throw new g("The sample count cannot be represented in 32 bits.");for(var e=0,r=t;e<r.length;e++){var o=r[e];if(void 0===o.duration&&this.flags.sampleDurationPresent)throw new g("The sample duration present flag is set.");if(void 0!==o.duration&&!this.flags.sampleDurationPresent)throw new g("The sample duration present flag is not set.");if(o.duration&&!Eu(o.duration,32))throw new g("Provided sample duration does not fit in 32 bits.");if(void 0===o.size&&this.flags.sampleSizePresent)throw new g("The sample size present flag is set.");if(void 0!==o.size&&!this.flags.sampleSizePresent)throw new g("The sample size present flag is not set.");if(o.size&&!Eu(o.size,32))throw new g("Provided sample size does not fit in 32 bits.");if(void 0===o.flags&&this.flags.sampleFlagsPresent)throw new g("The sample flags present flag is set.");if(void 0!==o.flags&&!this.flags.sampleFlagsPresent)throw new g("The sample flags present flag is not set.");if((null===(n=o.flags)||void 0===n?void 0:n.samplePaddingValue)&&!Eu(o.flags.samplePaddingValue,3))throw new g("Provided sample padding value does not fit in 3 bits.");if((null===(i=o.flags)||void 0===i?void 0:i.sampleDegradationPriority)&&!Eu(o.flags.sampleDegradationPriority,16))throw new g("Provided sample degradation priority does not fit in 16 bits.");if(void 0===o.compositionTimeOffset&&this.flags.sampleCompositionTimeOffsetsPresent)throw new g("The sample compositionTimeOffset present flag is set.");if(void 0!==o.compositionTimeOffset&&!this.flags.sampleCompositionTimeOffsetsPresent)throw new g("The sample compositionTimeOffset present flag is not set.");if(o.compositionTimeOffset&&!Eu(o.compositionTimeOffset,32))throw new g("Provided sample compositionTimeOffset does not fit in 32 bits.")}this.nS=t},enumerable:!1,configurable:!0}),n.prototype.serializeFlags=function(t){t.writer.writeByte(0),t.writer.writeUInt(0,4),t.writer.writeBool(this.flags.sampleCompositionTimeOffsetsPresent),t.writer.writeBool(this.flags.sampleFlagsPresent),t.writer.writeBool(this.flags.sampleSizePresent),t.writer.writeBool(this.flags.sampleDurationPresent),t.writer.writeUInt(0,5),t.writer.writeBool(this.flags.firstSampleFlagsPresent),t.writer.writeBit(0),t.writer.writeBool(this.flags.dataOffsetPresent)},n.prototype.getBoxContentSize=function(){var n=t.prototype.getBoxContentSize.call(this)+4;return this.flags.dataOffsetPresent&&(n+=4),this.flags.firstSampleFlagsPresent&&(n+=4),this.flags.sampleDurationPresent&&(n+=4*this.samples.length),this.flags.sampleSizePresent&&(n+=4*this.samples.length),this.flags.sampleFlagsPresent&&(n+=4*this.samples.length),this.flags.sampleCompositionTimeOffsetsPresent&&(n+=4*this.samples.length),n},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.samples.length,32),this.flags.dataOffsetPresent&&n.writer.writeUInt(this.dataOffset,32),this.flags.firstSampleFlagsPresent&&As(this.firstSampleFlags,n);for(var i=0,e=this.samples;i<e.length;i++){var r=e[i];this.flags.sampleDurationPresent&&n.writer.writeUInt(r.duration,32),this.flags.sampleSizePresent&&n.writer.writeUInt(r.size,32),this.flags.sampleFlagsPresent&&As(r.flags,n),this.flags.sampleCompositionTimeOffsetsPresent&&(0===this.version?n.writer.writeUInt(r.compositionTimeOffset,32):n.writer.writeInt(r.compositionTimeOffset,32))}},n}(Ou);function hf(t){var n=t.data,i=n.nextUint8(),e=new mu(yu.from(n.nextUint8Array(3)));e.skipBits(12);var r=Boolean(e.readBit()),o=Boolean(e.readBit()),u=Boolean(e.readBit()),s=Boolean(e.readBit());e.skipBits(5);var f=Boolean(e.readBit());e.skipBits(1);var c=Boolean(e.readBit()),h=n.nextUint32(),a={sampleDurationPresent:s,sampleSizePresent:u,sampleFlagsPresent:o,sampleCompositionTimeOffsetsPresent:r};c&&(a.dataOffset=n.nextInt32()),f&&(a.firstSampleFlags=Qu(new mu(yu.from(n.nextUint8Array(4)))));for(var v=[],d=0;d<h;d++){var l={};s&&(l.duration=n.nextUint32()),u&&(l.size=n.nextUint32()),o&&(l.flags=Qu(new mu(yu.from(n.nextUint8Array(4))))),r&&(l.compositionTimeOffset=0===i?n.nextUint32():n.nextInt32()),v.push(l)}return new cf(i,a,v)}var af=function(t){function n(){return t.call(this,"traf")||this}return du(n,t),n}(ss);function vf(t){for(var n=new af,i=0,e=Gu(t.data);i<e.length;i++){var r=e[i];Yu(r,"tfhd")?n.boxes.push(ff(r)):Yu(r,"tfdt")?n.boxes.push(uf(r)):Yu(r,"trun")?n.boxes.push(hf(r)):n.boxes.push(ns(r))}return n}var df=function(t){function n(){return t.call(this,"moof")||this}return du(n,t),n}(ss);x(),gt();!function(t){function n(n){var i=t.call(this,"mfhd",0,0)||this;return i.sequenceNumber=n,i}du(n,t),p.defineProperty(n.prototype,"sequenceNumber",{get:function(){return this.rS},set:function(t){if(!Eu(t,32))throw new g("Provided sequence number does not fit in 32 bits.");this.rS=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.sequenceNumber,32)}}(Ou);x(),gt();var lf=function(t){function n(n){var i=t.call(this,"frma")||this;return i.codingName=n,i}return du(n,t),p.defineProperty(n.prototype,"codingName",{get:function(){return this.oS},set:function(t){if(4!==t.length)throw new g("Provided coding name was not 4 characters long.");this.oS=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return 4},n.prototype.serializeBoxContent=function(t){t.writer.writeString(this.codingName)},n}(Tu);x(),gt();!function(t){function n(n,i){var e=t.call(this,"pasp")||this;return e.hSpacing=n,e.vSpacing=i,e}du(n,t),p.defineProperty(n.prototype,"hSpacing",{get:function(){return this.hS},set:function(t){if(!Eu(t,32))throw new g("Provided hSpacing does not fit in 32 bits.");this.hS=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"vSpacing",{get:function(){return this.aS},set:function(t){if(!Eu(t,32))throw new g("Provided vSpacing does not fit in 32 bits.");this.aS=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return 8},n.prototype.serializeBoxContent=function(t){t.writer.writeUInt(this.hSpacing,32),t.writer.writeUInt(this.vSpacing,32)}}(Tu);x(),gt();!function(t){function n(n,i,e){var r=t.call(this,n)||this;return r.sample=i,r.sinf=e,r}du(n,t),n.prototype.getBoxContentSize=function(){return this.sample.getBoxContentSize()+this.sinf.getSize()},n.prototype.serializeBoxContent=function(t){this.sample.serializeBoxContent(t),t.concat(this.sinf.serialize())}}(ss);x(),gt();!function(t){function n(n,i,e){var r=t.call(this,"sinf")||this;return r.schm=i,r.schi=e,r.frma=new lf(n),r}du(n,t),n.prototype.getBoxContentSize=function(){var t,n,i,e;return this.frma.getSize()+(null!==(n=null===(t=this.schm)||void 0===t?void 0:t.getSize())&&void 0!==n?n:0)+(null!==(e=null===(i=this.schi)||void 0===i?void 0:i.getSize())&&void 0!==e?e:0)},n.prototype.serializeBoxContent=function(t){t.concat(this.frma.serialize()),this.schm&&t.concat(this.schm.serialize()),this.schi&&t.concat(this.schi.serialize())}}(Tu);x(),gt();var wf=function(t){function n(n,i,e){var r=t.call(this,"saio",n,void 0===e?0:1)||this;return r.entries=i,r.explicitAuxInfoType=e,r}return du(n,t),p.defineProperty(n.prototype,"bitSize",{get:function(){return 0===this.version?32:64},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"entries",{get:function(){return this.wA},set:function(t){var n=this;if(!Eu(t.length,32))throw new g("Number of entries provided does not fit in 32 bits.");if(t.some((function(t){return!Eu(t,n.bitSize)})))throw new g("Not all provided entries fit in ".concat(this.bitSize," bits."));this.wA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"explicitAuxInfoType",{get:function(){return this.uS},set:function(t){if(void 0===t)this.flags=0;else{if(!Eu(t.auxInfoType,32))throw new g("Provided auxInfoType does not fit in 32 bits.");if(!Eu(t.auxInfoTypeParameter,32))throw new g("Provided auxInfoTypeParameter does not fit in 32 bits.");this.flags=1}this.uS=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+(void 0===this.explicitAuxInfoType?0:8)+4+this.entries.length*this.bitSize/8},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),void 0!==this.explicitAuxInfoType&&(n.writer.writeUInt(this.explicitAuxInfoType.auxInfoType,32),n.writer.writeUInt(this.explicitAuxInfoType.auxInfoTypeParameter,32)),n.writer.writeUInt(this.entries.length,32),this.serializeSaioContent(n)},n}(Ou);(function(t){function n(){return null!==t&&t.apply(this,arguments)||this}du(n,t),n.prototype.serializeSaioContent=function(t){for(var n=0,i=this.entries;n<i.length;n++){var e=i[n];t.writer.writeUInt(e,32)}}})(wf),function(t){function n(){return null!==t&&t.apply(this,arguments)||this}du(n,t),n.prototype.serializeSaioContent=function(t){for(var n=0,i=this.entries;n<i.length;n++){var e=i[n];t.writer.writeUInt(e.getHighBitsUnsigned(),32),t.writer.writeUInt(e.getLowBitsUnsigned(),32)}}}(wf);x(),gt();!function(t){function n(n,i,e){var r=t.call(this,"saiz",0,void 0===e?0:1)||this;return r.defaultSampleInfoSize=n,r.sampleInfoSizes=i,r.explicitAuxInfoType=e,r}du(n,t),p.defineProperty(n.prototype,"defaultSampleInfoSize",{get:function(){return this.cS},set:function(t){if(!Eu(t,8))throw new g("Provided defaultSampleInfoSize does not fit in a single byte.");this.cS=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"sampleInfoSizes",{get:function(){return this.lS},set:function(t){if(!Eu(t.length,32))throw new g("Number of sampleInfoSizes provided does not fit in 32 bits.");if(t.some((function(t){return!Eu(t,8)})))throw new g("Not all provided sampleInfoSizes fit in a byte.");this.lS=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"explicitAuxInfoType",{get:function(){return this.uS},set:function(t){if(void 0===t)this.flags=0;else{if(!Eu(t.auxInfoType,32))throw new g("Provided auxInfoType does not fit in 32 bits.");if(!Eu(t.auxInfoTypeParameter,32))throw new g("Provided auxInfoTypeParameter does not fit in 32 bits.");this.flags=1}this.uS=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+(void 0===this.explicitAuxInfoType?0:8)+1+4+(0!==this.defaultSampleInfoSize?0:this.sampleInfoSizes.length)},n.prototype.serializeBoxContent=function(n){if(0!==this.defaultSampleInfoSize&&this.sampleInfoSizes.length>0)throw new g("Both a default size and specific sizes are provided. This is prohibited.");t.prototype.serializeBoxContent.call(this,n),void 0!==this.explicitAuxInfoType&&(n.writer.writeUInt(this.explicitAuxInfoType.auxInfoType,32),n.writer.writeUInt(this.explicitAuxInfoType.auxInfoTypeParameter,32)),n.writer.writeByte(this.defaultSampleInfoSize),n.writer.writeUInt(this.sampleInfoSizes.length,32);for(var i=0,e=this.sampleInfoSizes;i<e.length;i++){var r=e[i];n.writer.writeByte(r)}}}(Ou);x(),gt();!function(t){function n(n){var i=t.call(this,"sdtp",0,0)||this;return i.samples=n,i}du(n,t),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.samples.length},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n);for(var i=0,e=this.samples;i<e.length;i++){Ps(e[i],n)}}}(Ou);x(),gt();!function(t){function n(n){return t.call(this,"stsd",n,0)||this}du(n,t),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.boxes.length,32)}}(hs);x(),gt();var bf=function(t){function n(n,i,e){var r=t.call(this,"sgpd",n,0)||this;return r.entries=e,r.groupingType=i,r}return du(n,t),p.defineProperty(n.prototype,"groupingType",{get:function(){return this.dS},set:function(t){if(4!==t.length)throw new g("The provided groupingType does not equal 4 characters.");this.dS=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4+4},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeString(this.groupingType),this.serializeVersionBoxContent(n),n.writer.writeUInt(this.entries.length,32);for(var i=0,e=this.entries;i<e.length;i++){var r=e[i];this.serializeEntryBoxContent(n,r)}},n.prototype.serializeEntryBoxContent=function(t,n){n.serializeBoxContent(t)},n}(Ou);(function(t){function n(n,i){return t.call(this,0,n,i)||this}du(n,t),n.prototype.serializeVersionBoxContent=function(t){}})(bf),function(t){function n(n,i,e){var r=t.call(this,1,n,e)||this;return r.defaultLength=i,r}du(n,t),p.defineProperty(n.prototype,"defaultLength",{get:function(){return this.fS},set:function(t){if(!Eu(t,32))throw new g("The provided defaultLength does not fit in 32 bits.");this.fS=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4+this.entries.length*(this.defaultLength||4)},n.prototype.serializeVersionBoxContent=function(t){t.writer.writeUInt(this.defaultLength,32)},n.prototype.serializeEntryBoxContent=function(t,n){0===this.defaultLength&&t.writer.writeUInt(n.getBoxContentSize(),32),n.serializeBoxContent(t)}}(bf),function(t){function n(n,i,e,r){void 0===r&&(r=0);var o=this;if(n<2)throw new g("This constructor is only meant for versions 2 and up.");return(o=t.call(this,n,i,e)||this).defaultSampleDescriptionIndex=r,o}du(n,t),p.defineProperty(n.prototype,"defaultSampleDescriptionIndex",{get:function(){return this.UA},set:function(t){if(!Eu(t,32))throw new g("The provided defaultSampleDescriptionIndex does not fit in 32 bits.");this.UA=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4},n.prototype.serializeVersionBoxContent=function(t){t.writer.writeUInt(this.defaultSampleDescriptionIndex,32)}}(bf);x(),gt();(function(t){function n(n){void 0===n&&(n=[]);var i=t.call(this,"stsz",0,0)||this;return i.sampleSizes=n,i}du(n,t),p.defineProperty(n.prototype,"sampleSizes",{get:function(){return this._S},set:function(t){if(!Eu(t.length,32))throw new g("Number of allowed samples cannot fit in 32 bits.");if(t.some((function(t){return!Eu(t,32)})))throw new g("Not all sampleSizes can be represented in 32 bits.");this._S=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4+4+4*this.sampleSizes.length},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(0,32),n.writer.writeUInt(this.sampleSizes.length,32);for(var i=0,e=this.sampleSizes;i<e.length;i++){var r=e[i];n.writer.writeUInt(r,32)}}})(Ou),function(t){function n(n,i){void 0===n&&(n=0),void 0===i&&(i=0);var e=t.call(this,"stsz",0,0)||this;return e.defaultSampleSize=n,e.samples=i,e}du(n,t),p.defineProperty(n.prototype,"defaultSampleSize",{get:function(){return this.ZA},set:function(t){if(!Eu(t,32))throw new g("Provided defaultSampleSize does not fit in 32 bits.");this.ZA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"samples",{get:function(){return this.nS},set:function(t){if(!Eu(t,32))throw new g("Number of allowed samples cannot fit in 32 bits.");this.nS=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4+4},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.defaultSampleSize,32),n.writer.writeUInt(this.samples,32)}}(Ou);x(),gt();!function(t){function n(){return t.call(this,"stbl")||this}du(n,t)}(ss);x(),gt();!function(t){function n(n){var i=t.call(this,"stsc",0,0)||this;return i.entries=n,i}du(n,t),p.defineProperty(n.prototype,"entries",{get:function(){return this.wA},set:function(t){if(!Eu(t.length,32))throw new g("Number of allowed entries cannot fit in 32 bits.");if(t.some((function(t){return!Eu(t.firstChunk,32)||!Eu(t.sampleDescriptionIndex,32)||!Eu(t.samplesPerChunk,32)})))throw new g("Not all entries can be represented in 96 bits.");this.wA=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4+12*this.entries.length},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.entries.length,32);for(var i=0,e=this.entries;i<e.length;i++){var r=e[i];n.writer.writeUInt(r.firstChunk,32),n.writer.writeUInt(r.samplesPerChunk,32),n.writer.writeUInt(r.sampleDescriptionIndex,32)}}}(Ou);x(),gt();!function(t){function n(){return t.call(this,"schi")||this}du(n,t)}(ss);x(),gt();!function(t){function n(n,i,e){var r=t.call(this,"schm",0,void 0===e?0:1)||this;return r.schemeType=n,r.schemeVersion=i,r.schemeUri=e,r}du(n,t),p.defineProperty(n.prototype,"schemeType",{get:function(){return this.vS},set:function(t){if(4!==t.length)throw new g("The provided schemeType does not have a length of 4.");this.vS=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"schemeVersion",{get:function(){return this.gS},set:function(t){if(!Eu(t,32))throw new g("The provided schemeVersion does not fit in 23 bits.");this.gS=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"schemeUri",{get:function(){return this.mS},set:function(t){if(t&&4!==t.length)throw new g("The provided schemeUri does not have a length of 4.");this.flags=void 0===t?0:1,this.mS=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4+4+(void 0===this.schemeUri?0:this.schemeUri.length+1)},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeString(this.schemeType),n.writer.writeUInt(this.schemeVersion,32),this.schemeUri&&(n.writer.writeString(this.schemeUri),n.writer.writeByte(0))}}(Ou);x(),gt();var gf=function(t){function n(n,i,e,r,o,u,s){void 0===s&&(s=0);var f=t.call(this,"sidx",n,s)||this;return f.referenceId=i,f.timescale=e,f.earliestPresentationTime=r,f.firstOffset=o,f.references=u,f}return du(n,t),p.defineProperty(n.prototype,"bitSize",{get:function(){return 0===this.version?32:64},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"referenceId",{get:function(){return this.pS},set:function(t){if(!Eu(t,32))throw new g("Provided referenceId does not fit in 32 bits.");this.pS=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"timescale",{get:function(){return this.MA},set:function(t){if(!Eu(t,32))throw new g("Provided timescale does not fit in 32 bits.");this.MA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"earliestPresentationTime",{get:function(){return this.wS},set:function(t){if(!Eu(t,this.bitSize))throw new g("Provided earliestPresentationTime does not fit in ".concat(this.bitSize," bits."));this.wS=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"firstOffset",{get:function(){return this.yS},set:function(t){if(!Eu(t,this.bitSize))throw new g("Provided timescale does not fit in ".concat(this.bitSize," bits."));this.yS=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"references",{get:function(){return this.bS},set:function(t){if(!Eu(t.length,16))throw new g("The number of provided reference items does not fit in 16 bits.");for(var n=0,i=t;n<i.length;n++){var e=i[n];if(!Eu(e.referencedSize,31))throw new g("Provided referenced size does not fit in 31 bits.");if(!Eu(e.subsegmentDuration,32))throw new g("Provided subsegment duration does not fit in 31 bits.");if(!Eu(e.sapType,3))throw new g("Provided SAP type does not fit in 3 bits.");if(!Eu(e.sapDeltaTime,28))throw new g("Provided SAP delta time does not fit in 28 bits.")}this.bS=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4+4+this.bitSize/8*2+2+2+12*this.references.length},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.referenceId,32),n.writer.writeUInt(this.timescale,32),this.serializeSidxBoxContent(n),n.writer.writeUInt(0,16),n.writer.writeUInt(this.references.length,16);for(var i=0,e=this.references;i<e.length;i++){var r=e[i];n.writer.writeBit(r.referenceType),n.writer.writeUInt(r.referencedSize,31),n.writer.writeUInt(r.subsegmentDuration,32),n.writer.writeBool(r.startsWithSap),n.writer.writeUInt(r.sapType,3),n.writer.writeUInt(r.sapDeltaTime,28)}},n}(Ou),mf=function(t){function n(n,i,e,r,o,u){return void 0===u&&(u=0),t.call(this,0,n,i,e,r,o,u)||this}return du(n,t),n.prototype.serializeSidxBoxContent=function(t){t.writer.writeUInt(this.earliestPresentationTime,32),t.writer.writeUInt(this.firstOffset,32)},n}(gf),pf=function(t){function n(n,i,e,r,o,u){return void 0===u&&(u=0),t.call(this,1,n,i,e,r,o,u)||this}return du(n,t),n.prototype.serializeSidxBoxContent=function(t){t.writer.writeUInt(this.earliestPresentationTime.getHighBitsUnsigned(),32),t.writer.writeUInt(this.earliestPresentationTime.getLowBitsUnsigned(),32),t.writer.writeUInt(this.firstOffset.getHighBitsUnsigned(),32),t.writer.writeUInt(this.firstOffset.getLowBitsUnsigned(),32)},n}(gf);x(),gt();!function(t){function n(n,i,e){return t.call(this,"styp",n,i,e)||this}du(n,t)}(gs);x(),gt();!function(t){function n(n){void 0===n&&(n=0);var i=t.call(this,"smhd",0,0)||this;return i.balance=n,i}du(n,t),p.defineProperty(n.prototype,"balance",{get:function(){return this.SS},set:function(t){if(t<-1||t>1)throw new g("Provided balance does not fit in the allowed range [-1, 1].");if(!Eu(Iu(t,8),16))throw new g("Provided balance does not fit in 16 bits (fixed 8.8).");this.SS=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+2+2},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(Iu(this.balance,8),16),n.writer.writeUInt(0,16)}}(Ou);x(),gt();!function(t){function n(n){var i=t.call(this,"stss",0,0)||this;return i.entries=n,i}du(n,t),p.defineProperty(n.prototype,"entries",{get:function(){return this.wA},set:function(t){if(!Eu(t.length,32))throw new g("Number of allowed entries cannot fit in 32 bits.");if(t.some((function(t){return!Eu(t,32)})))throw new g("Not all entries can be represented in 32 bits.");this.wA=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4+4*this.entries.length},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.entries.length,32);for(var i=0,e=this.entries;i<e.length;i++){var r=e[i];n.writer.writeUInt(r,32)}}}(Ou);x(),gt();!function(t){function n(n){var i=t.call(this,"stts",0,0)||this;return i.entries=n,i}du(n,t),p.defineProperty(n.prototype,"entries",{get:function(){return this.wA},set:function(t){if(!Eu(t.length,32))throw new g("Number of allowed entries cannot fit in 32 bits.");if(t.some((function(t){return!Eu(t.sampleCount,32)||!Eu(t.sampleDelta,32)})))throw new g("Not all entries can be represented in 64 bits.");this.wA=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4+8*this.entries.length},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.entries.length,32);for(var i=0,e=this.entries;i<e.length;i++){var r=e[i];n.writer.writeUInt(r.sampleCount,32),n.writer.writeUInt(r.sampleDelta,32)}}}(Ou);x(),gt();!function(t){function n(n){var i=t.call(this,"trep",0,0)||this;return i.trackId=n,i}du(n,t),p.defineProperty(n.prototype,"trackId",{get:function(){return this.WA},set:function(t){if(!Eu(t,32))throw new g("The provided trackId does not fit in 32 bits.");this.WA=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.trackId,32)}}(hs);x(),gt();!function(t){function n(){return t.call(this,"udta")||this}du(n,t)}(ss);x(),gt();var yf={red:0,green:0,blue:0};!function(t){function n(n,i){void 0===n&&(n=0),void 0===i&&(i=yf);var e=t.call(this,"vmhd",0,1)||this;return e.graphicsMode=n,e.opColor=i,e}du(n,t),p.defineProperty(n.prototype,"opColor",{get:function(){return this.TS},set:function(t){if(!Eu(t.red,16)||!Eu(t.green,16)||!Eu(t.blue,16))throw new g("Not all colors could be represented in 16 bits.");this.TS=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+2+6},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.graphicsMode,16),n.writer.writeUInt(this.opColor.red,16),n.writer.writeUInt(this.opColor.green,16),n.writer.writeUInt(this.opColor.blue,16)}}(Ou);x(),gt();var _f=function(t){function n(n,i,e,r,o){void 0===r&&(r={}),void 0===o&&(o=void 0);var u,s,f,c,h,a=this;return(a=t.call(this,n,i)||this).width=e.width,a.height=e.height,a.horizontalResolution=null!==(u=e.horizontal)&&void 0!==u?u:72,a.verticalResolution=null!==(s=e.vertical)&&void 0!==s?s:72,a.compressorName=null!==(f=r.compressorName)&&void 0!==f?f:"",a.frameCount=null!==(c=r.frameCount)&&void 0!==c?c:1,a.depth=null!==(h=r.depth)&&void 0!==h?h:24,a.clap=r.clap,a.pasp=r.pasp,a.extra=o,a}return du(n,t),p.defineProperty(n.prototype,"width",{get:function(){return this.KA},set:function(t){if(!Eu(t,16))throw new g("Provided width does not fit in 16 bits.");this.KA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"height",{get:function(){return this.jA},set:function(t){if(!Eu(t,16))throw new g("Provided height does not fit in 16 bits.");this.jA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"horizontalResolution",{get:function(){return this.kS},set:function(t){if(!Eu(Iu(t,16),32))throw new g("Provided horizontalResolution does not fit in 32 bits (fixed 16.16).");this.kS=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"verticalResolution",{get:function(){return this.ES},set:function(t){if(!Eu(Iu(t,16),32))throw new g("Provided verticalResolution does not fit in 32 bits (fixed 16.16).");this.ES=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"compressorName",{get:function(){return this.xS},set:function(t){if(t.length>31)throw new g("The provided compressorName should at most be 31 characters long.");this.xS=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"frameCount",{get:function(){return this.IS},set:function(t){if(!Eu(t,16))throw new g("Provided frameCount does not fit in 16 bits.");this.IS=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"depth",{get:function(){return this.RS},set:function(t){if(!Eu(t,16))throw new g("Provided depth does not fit in 16 bits.");this.RS=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){var n,i,e,r,o,u;return t.prototype.getBoxContentSize.call(this)+2+2+12+2+2+4+4+4+2+32+2+2+(null!==(i=null===(n=this.clap)||void 0===n?void 0:n.getSize())&&void 0!==i?i:0)+(null!==(r=null===(e=this.pasp)||void 0===e?void 0:e.getSize())&&void 0!==r?r:0)+(null!==(u=null===(o=this.extra)||void 0===o?void 0:o.length)&&void 0!==u?u:0)},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(0,16),n.writer.writeUInt(0,16),n.writer.writeUInt(0,32),n.writer.writeUInt(0,32),n.writer.writeUInt(0,32),n.writer.writeUInt(this.width,16),n.writer.writeUInt(this.height,16),n.writer.writeUInt(Iu(this.horizontalResolution,16),32),n.writer.writeUInt(Iu(this.verticalResolution,16),32),n.writer.writeUInt(0,32),n.writer.writeUInt(this.frameCount,16),n.writer.writeByte(this.compressorName.length),n.writer.writeString(this.compressorName);for(var i=0;i<31-this.compressorName.length;i++)n.writer.writeByte(0);n.writer.writeUInt(this.depth,16),n.writer.writeInt(-1,16),this.clap&&n.concat(this.clap.serialize()),this.pasp&&n.concat(this.pasp.serialize()),this.extra&&ku(n.writer,this.extra)},n}(fs);x(),gt(),x(),gt();!function(t){function n(n){var i=t.call(this,"esds",0,0)||this;return i.esDescriptor=n,i}du(n,t),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+(this.esDescriptor instanceof E?this.esDescriptor.length:this.esDescriptor.getSize())},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),this.esDescriptor instanceof E?n.concat(yu.from(this.esDescriptor)):this.esDescriptor.serialize(n)}}(Ou);x(),gt();!function(t){function n(n,i,e){var r=t.call(this,"mp4a",n,e)||this;return r.esd=i,r}du(n,t),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.esd.getSize()},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.concat(this.esd.serialize())}}(cs);x(),gt();!function(t){function n(n,i,e,r){void 0===r&&(r={});var o=t.call(this,"mp4v",n,i,r)||this;return o.esDescriptor=e,o}du(n,t),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.esDescriptor.getSize()},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),this.esDescriptor.serialize(n)}}(_f);x(),gt();!function(t){function n(n,i){var e=t.call(this,"mp4s",n)||this;return e.esDescriptor=i,e}du(n,t),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.esDescriptor.getSize()},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),this.esDescriptor.serialize(n)}}(fs);x(),gt(),x(),gt();!function(t){function n(n){var i=t.call(this,"avcC")||this;return i.decoderConfig=n,i}du(n,t),n.prototype.getBoxContentSize=function(){return this.decoderConfig.getSize()},n.prototype.serializeBoxContent=function(t){this.decoderConfig.serialize(t)}}(Tu);x(),gt();!function(){function t(t,n,i,e,r,o){void 0===o&&(o=1),this.lengthSizeMinusOne=i,this.version=o,this.profileIndication=t.indication,this.profileCompatibility=t.compatibility,this.levelIndication=n,this.spsSets=e,this.ppsSets=r}p.defineProperty(t.prototype,"version",{get:function(){return this.CS},set:function(t){if(!Eu(t,8))throw new g("Provided version does not fit in 8 bits.");this.CS=t},enumerable:!1,configurable:!0}),p.defineProperty(t.prototype,"profileIndication",{get:function(){return this.PS},set:function(t){if(!Eu(t,8))throw new g("Provided profileIndication does not fit in 8 bits.");this.PS=t},enumerable:!1,configurable:!0}),p.defineProperty(t.prototype,"profileCompatibility",{get:function(){return this.DS},set:function(t){if(!Eu(t,8))throw new g("Provided profileCompatibility does not fit in 8 bits.");this.DS=t},enumerable:!1,configurable:!0}),p.defineProperty(t.prototype,"levelIndication",{get:function(){return this.NS},set:function(t){if(!Eu(t,8))throw new g("Provided levelIndication does not fit in 8 bits.");this.NS=t},enumerable:!1,configurable:!0}),p.defineProperty(t.prototype,"spsSets",{get:function(){return this.MS},set:function(t){if(!Eu(t.length,5))throw new g("Provided number of spsSets exceeds the max (32)");this.MS=t},enumerable:!1,configurable:!0}),p.defineProperty(t.prototype,"ppsSets",{get:function(){return this.LS},set:function(t){if(!Eu(t.length,8))throw new g("Provided number of ppsSets exceeds the max (256)");this.LS=t},enumerable:!1,configurable:!0}),t.prototype.getSize=function(){return 7+2*this.spsSets.length+this.spsSets.reduce((function(t,n){return t+n.length}),0)+2*this.ppsSets.length+this.ppsSets.reduce((function(t,n){return t+n.length}),0)},t.prototype.serialize=function(t){t.writer.writeByte(this.version),t.writer.writeByte(this.profileIndication),t.writer.writeByte(this.profileCompatibility),t.writer.writeByte(this.levelIndication),t.writer.writeBits([1,1,1,1,1,1]),t.writer.writeUInt(this.lengthSizeMinusOne,2),t.writer.writeBits([1,1,1]),t.writer.writeUInt(this.spsSets.length,5);for(var n=0,i=this.spsSets;n<i.length;n++){var e=i[n];t.writer.writeUInt(e.length,16),t.concat(yu.from(e))}t.writer.writeByte(this.ppsSets.length);for(var r=0,o=this.ppsSets;r<o.length;r++){var u=o[r];t.writer.writeUInt(u.length,16),t.concat(yu.from(u))}}}();x(),gt();!function(t){function n(n,i,e,r,o){void 0===r&&(r={}),void 0===o&&(o=void 0);var u=t.call(this,"avc1",n,i,r)||this;return u.configurationBox=e,u.bitrateBox=o,u}du(n,t),n.prototype.getBoxContentSize=function(){var n,i;return t.prototype.getBoxContentSize.call(this)+this.configurationBox.getSize()+(null!==(i=null===(n=this.bitrateBox)||void 0===n?void 0:n.getSize())&&void 0!==i?i:0)},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.concat(this.configurationBox.serialize()),this.bitrateBox&&n.concat(this.bitrateBox.serialize())}}(_f);x(),gt();!function(t){function n(n,i,e){var r=t.call(this,"btrt")||this;return r.bufferSizeDb=n,r.max=i,r.avg=e,r}du(n,t),p.defineProperty(n.prototype,"bufferSizeDb",{get:function(){return this.aA},set:function(t){if(!Eu(t,32))throw new g("Provided bufferSizeDb does not fit in 32 bits.");this.aA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"max",{get:function(){return this.M_},set:function(t){if(!Eu(t,32))throw new g("Provided max does not fit in 32 bits.");this.M_=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"avg",{get:function(){return this.FS},set:function(t){if(!Eu(t,32))throw new g("Provided avg does not fit in 32 bits.");this.FS=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return 12},n.prototype.serializeBoxContent=function(t){t.writer.writeUInt(this.bufferSizeDb,32),t.writer.writeUInt(this.max,32),t.writer.writeUInt(this.avg,32)}}(Tu);x(),gt(),x(),gt(),x(),gt();var Sf=function(t){function n(n,i){var e,r,o,u,s=this;if(s=t.call(this,"tenc",n,0)||this,i.perSampleIvSize>0&&(null!==(r=null===(e=i.constantIv)||void 0===e?void 0:e.length)&&void 0!==r?r:0)>0)throw new g("Either perSampleSize should be > 0 or constantIv should be defined. Not both.");return s.kId=i.kId,s.isProtected=null!==(o=i.isProtected)&&void 0!==o?o:1,i.perSampleIvSize>0?s.perSampleIvSize=i.perSampleIvSize:s.constantIv=null!==(u=i.constantIv)&&void 0!==u?u:new E(0),s}return du(n,t),p.defineProperty(n.prototype,"isProtected",{get:function(){return this.VS},set:function(t){if(!Eu(t,8))throw new g("Provided isProtected does not fit in 1 byte.");this.VS=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"perSampleIvSize",{get:function(){return this.WS},set:function(t){if(![8,16].includes(t))throw new g("Provided perSampleIvSize does not match any allowed value [8, 16].");this.WS=t,this.US=new E(0)},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"kId",{get:function(){return this.GS},set:function(t){if(16!==t.length)throw new g("Provided kId length is not 16.");this.GS=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"constantIv",{get:function(){return this.US},set:function(t){if(![8,16].includes(t.length))throw new g("Provided constant IV length does not match any allowed value [8, 16].");this.US=t,this.WS=0},enumerable:!1,configurable:!0}),n.prototype.getTencHeaderSize=function(){return 20+(this.constantIv.length>0?1+this.constantIv.length:0)},n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.getTencHeaderSize()},n.prototype.serializeVersionBoxContent=function(t){t.writer.writeByte(0)},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),this.serializeOwnContent(n)},n.prototype.serializeOwnContent=function(t){t.writer.writeByte(0),this.serializeVersionBoxContent(t),t.writer.writeByte(this.isProtected),t.writer.writeByte(this.perSampleIvSize),ku(t.writer,this.kId),0===this.perSampleIvSize&&(t.writer.writeByte(this.constantIv.length),ku(t.writer,this.constantIv))},n}(Ou),Tf=(function(t){function n(n){return t.call(this,0,n)||this}du(n,t)}(Sf),function(t){function n(n){var i=t.call(this,1,n)||this;return i.cryptByteBlocks=n.cryptByteBlock,i.skipByteBlocks=n.skipByteBlock,i}return du(n,t),p.defineProperty(n.prototype,"cryptByteBlocks",{get:function(){return this.ZS},set:function(t){if(!Eu(t,4))throw new g("Provided cryptByteBlocks does not fit in 4 bits.");this.ZS=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"skipByteBlocks",{get:function(){return this.HS},set:function(t){if(!Eu(t,4))throw new g("Provided skipByteBlocks does not fit in 4 bits.");this.HS=t},enumerable:!1,configurable:!0}),n.prototype.serializeVersionBoxContent=function(t){t.writer.writeUInt(this.cryptByteBlocks,4),t.writer.writeUInt(this.skipByteBlocks,4)},n}(Sf));!function(t){function n(n){var i=t.call(this)||this;return i.tencBox=new Tf(n),i}du(n,t),n.prototype.serializeBoxContent=function(t){this.tencBox.serializeOwnContent(t)},n.prototype.getBoxContentSize=function(){return this.tencBox.getTencHeaderSize()}}(Ds);function Ef(t){return void 0!==t.iv}function If(t){return void 0!==t.subsamples}x(),gt();!function(t){function n(n){var i=t.call(this,"senc",0,{useSubsampleEncryption:!1})||this;return i.samples=n,i}du(n,t),p.defineProperty(n.prototype,"samples",{get:function(){return this.nS},set:function(t){var n;if(!Eu(t.length,32))throw new g("The number of samples provided does not fit in 32 bits.");for(var i=0,e=t;i<e.length;i++){var r=e[i];if(Ef(r)&&![8,16].includes(r.iv.length))throw new g("IV of one of the provided samples did not satisfy the required length constraints. [8, 16]");if(void 0===n&&(n=If(r)),!0===n&&!If(r)||!1===n&&If(r))throw new g("Mix of samples with and without subsamples detected.");if(If(r)){if(!Eu(r.subsamples.length,16))throw new g("Subsample length of one of the provided samples does not fit in 16 bits.");for(var o=0,u=r.subsamples;o<u.length;o++){var s=u[o];if(!Eu(s.clearData,16))throw new g("Subsample clearData of one of the provided samples does not fit in 16 bits.");if(!Eu(s.protectedData,23))throw new g("Subsample protectedData of one of the provided samples does not fit in 23 bits.")}}}this.flags.useSubsampleEncryption=null!=n&&n,this.nS=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){for(var n=0,i=0,e=this.samples;i<e.length;i++){var r=e[i];Ef(r)&&(n+=r.iv.length),If(r)&&(n+=2+6*r.subsamples.length)}return t.prototype.getBoxContentSize.call(this)+4+n},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.samples.length,32);for(var i=0,e=this.samples;i<e.length;i++){var r=e[i];if(Ef(r)&&ku(n.writer,r.iv),If(r)){n.writer.writeUInt(r.subsamples.length,16);for(var o=0,u=r.subsamples;o<u.length;o++){var s=u[o];n.writer.writeUInt(s.clearData,16),n.writer.writeUInt(s.protectedData,32)}}}},n.prototype.serializeFlags=function(t){t.writer.writeUInt(this.flags.useSubsampleEncryption?2:0,24)}}(Ou);x(),gt(),x(),gt();!function(t){function n(n,i,e,r,o){var u=t.call(this,"emsg",0,0)||this;return u.schemeIdUri=n,u.value=i,u.data=o,u.id=e,u.timescale=r.timescale,u.presentationTimeDelta=r.presentationTimeDelta,u.eventDuration=r.eventDuration,u}du(n,t),p.defineProperty(n.prototype,"timescale",{get:function(){return this.MA},set:function(t){if(!Eu(t,32))throw new g("The provided timescale does not fit in 32 bits.");this.MA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"presentationTimeDelta",{get:function(){return this.XS},set:function(t){if(!Eu(t,32))throw new g("The provided presentationTimeDelta does not fit in 32 bits.");this.XS=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"eventDuration",{get:function(){return this.zS},set:function(t){if(!Eu(t,32))throw new g("The provided eventDuration does not fit in 32 bits.");this.zS=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"id",{get:function(){return this.qS},set:function(t){if(!Eu(t,32))throw new g("The provided id does not fit in 32 bits.");this.qS=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.schemeIdUri.length+1+this.value.length+1+16+this.data.length},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeString(this.schemeIdUri),n.writer.writeByte(0),n.writer.writeString(this.value),n.writer.writeByte(0),n.writer.writeUInt(this.timescale,32),n.writer.writeUInt(this.presentationTimeDelta,32),n.writer.writeUInt(this.eventDuration,32),n.writer.writeUInt(this.id,32),n.concat(yu.from(this.data))}}(Ou);x(),gt(),x(),gt(),x(),gt();!function(){function t(){this.boxes=[]}t.prototype.serialize=function(){for(var t=new Su,n=0,i=this.boxes;n<i.length;n++){var e=i[n];t.concat(e.serialize())}return t.toRangedBuffer()}}();function kf(t,n){return function(i){var e=new ju(function(t){return new DataView(t.buffer,t.byteOffset,t.byteLength)}(i),new Xu),r=function(t,n){for(var i=t.data,e=t.cursor;e.offset<i.byteLength;){var r=$u(i,e);if(!r.complete)return;if(Yu(r.box,n))return r.box}}(e,t);if(!r)throw new g("".concat(t," box not found"));return n(r)}}kf("moov",(function(t){for(var n=new nf,i=0,e=Gu(t.data);i<e.length;i++){var r=e[i];Yu(r,"mvhd")?n.boxes.push(Ks(r)):Yu(r,"trak")?n.boxes.push(tf(r)):Yu(r,"mvex")?n.boxes.push(qs(r)):Yu(r,"pssh")?n.boxes.push(Ms(r)):n.boxes.push(ns(r))}return n})),kf("sidx",(function(t){var n,i,e=t.data,r=Zu(e.nextUint32()),o=r.version,u=r.flags,s=e.nextUint32(),f=e.nextUint32();0===o?(n=e.nextUint32(),i=e.nextUint32()):(n=e.nextUint64(),i=e.nextUint64()),e.skip(2);for(var c=e.nextUint16(),h=[],a=0;a<c;a++){var v=new mu(yu.from(e.nextUint8Array(12))),d=v.readBit(),l=v.readUInt(31),w=v.readUInt(32),b=Boolean(v.readBit()),g=v.readUInt(3),m=v.readUInt(28);h.push({referenceType:d,referencedSize:l,subsegmentDuration:w,startsWithSap:b,sapType:g,sapDeltaTime:m})}return 0===o?new mf(s,f,n,i,h,u.raw):new pf(s,f,n,i,h,u.raw)})),kf("moof",(function(t){for(var n=new df,i=0,e=Gu(t.data);i<e.length;i++){var r=e[i];Yu(r,"traf")?n.boxes.push(vf(r)):Yu(r,"pssh")?n.boxes.push(Ms(r)):n.boxes.push(ns(r))}return n}));var Rf=kf("pssh",Ms),Of=function(t){function n(n,i){var e;(e=t.call(this)||this).jS=n,e.rT=i,e.$S=!1,e.oT=function(){e.sT()},e.hT=function(t){e._o(new Po(e,t.messageType,cu(e.rT,t.message)))},e.aT=function(){e.$S=!0,e.QS.Mb>0&&(e.QS.Vb(),e._o(new No(e.QS))),e.jS.removeEventListener("keystatuseschange",e.oT),e.jS.removeEventListener("message",e.hT)},e.jS.addEventListener("keystatuseschange",e.oT),e.jS.addEventListener("message",e.hT),e.QS=new su;var r=[];return e.jS.closed&&r.push(J.resolve(e.jS.closed)),e.tT=new fu,r.push(e.tT.Gb),e.Vd=J.race(r).then(e.aT,e.aT),e.sT(),e}_t(n,t);var i=n.prototype;return i.Ws=function(){if(this.$S)return this.Vd;var t=[];return t.push(J.resolve(this.jS.close())),t.push(pn(1e3)),this.tT.rp(J.race(t).catch(Nf)),this.$S=!0,this.Vd},i.eT=function(t,n,i){if(Ut.hg){var e=Rf(Jo(n));if(1===e.version)n=new xs(e.systemId,e.data).serialize().join()}return J.resolve(this.jS.generateRequest(t,n)).catch(Nf)},i.$n=function(t){return J.resolve(this.jS.load(t)).catch(Nf)},i.iT=function(){return J.resolve(this.jS.remove()).catch(Nf)},i.ir=function(t){return J.resolve(this.jS.update(t)).catch(Nf)},i.sT=function(){var t=this;this.QS.Vb(),this.jS.keyStatuses.forEach((function(n,i){t.nT(i,n)})),this._o(new No(this.QS))},i.nT=function(t,n){if("string"==typeof t){var i=t;t=n,n=i}var e=Jo(t);if(this.rT===Jr&&16===e.byteLength&&(Ut.Sg||Ut.ym)){var r=$o(e),o=r.getUint32(0,!0),u=r.getUint16(4,!0),s=r.getUint16(6,!0);r.setUint32(0,o,!1),r.setUint16(4,u,!1),r.setUint16(6,s,!1)}this.rT===Jr&&"status-pending"===n&&(n="usable"),this.QS.Ob(e,n)},Tt(n,[{key:"YS",get:function(){return this.Vd}},{key:"KS",get:function(){return this.jS.expiration}},{key:"wb",get:function(){return this.QS}},{key:"JS",get:function(){return this.jS.sessionId}}]),n}(Eo);function Nf(t){var n;if(t.message){var i=t.message.match(/^SystemCode:0x([0-9a-fA-F]+)$/);i&&(n=0|_(i[1],16))}throw new au(t.message,void 0,n,t)}var Pf=function(){function t(t,n,i){this.cT=t,this.lT=n,this.kd=i}var n=t.prototype;return n.uT=function(t){var n=this;return $t((function(){return Zt(this,(function(i){return[2,new Of(n.cT.createSession(t),n.lT)]}))}))()},n.dT=function(t){return J.resolve(this.cT.setServerCertificate(t))},n.kn=function(t){return J.resolve(t.setMediaKeys(this.cT))},n.fT=function(t){return J.resolve(t.setMediaKeys(null))},n.nr=function(){return J.resolve()},t}(),Af=function(){function t(t,n,i){this._T=t,this.rT=n,this.gT=i}var n=t.prototype;return n.vT=function(){var t=this;return $t((function(){var n;return Zt(this,(function(i){switch(i.label){case 0:return[4,t._T.createMediaKeys()];case 1:return n=i.sent(),[2,new Pf(n,t.rT,t.gT)]}}))}))()},n.mT=function(){return this.gT},Tt(t,[{key:"lT",get:function(){return this._T.keySystem}}]),t}();function Df(t){var n=t.trim(),i=n.indexOf(";");return i<0?n:n.substr(0,i).trim()}function Cf(t,n,i,e){var r=!1;if(!(e.persistentState&&"optional"!==e.persistentState||e.distinctiveIdentifier&&"optional"!==e.distinctiveIdentifier)){var o={audioCapabilities:[],videoCapabilities:[],persistentState:e.persistentState||"optional",distinctiveIdentifier:e.distinctiveIdentifier||"optional",initDataTypes:e.initDataTypes,sessionTypes:["temporary"],label:e.label,yT:e.yT},u=!1;if(e.audioCapabilities){var s=e.audioCapabilities.filter((function(t){return Boolean(t.contentType)}));s.length&&(o.audioCapabilities=s.filter((function(e){return xf(t,n,i,e)})),u=!0,o.audioCapabilities.length&&(r=!0))}if(e.videoCapabilities){var f=e.videoCapabilities.filter((function(t){return Boolean(t.contentType)}));f.length&&(o.videoCapabilities=f.filter((function(e){return xf(t,n,i,e)})),u=!0,o.videoCapabilities.length&&(r=!0))}return u||(r=t(i,"video/mp4")),r?o:void 0}}function xf(t,n,i,e){return!!e.contentType&&(!(e.encryptionScheme&&!fn(n,e.encryptionScheme))&&(!e.robustness&&t(i,Df(e.contentType))))}function Bf(t){if(t.videoCapabilities)for(var n=0,i=t.videoCapabilities;n<i.length;n++){var e=i[n];if(e.contentType)return e.contentType}if(t.audioCapabilities)for(var r=0,o=t.audioCapabilities;r<o.length;r++){var u=o[r];if(u.contentType)return u.contentType}}function Mf(t){for(var n=[],i=0;i<t.length;i++){var e=t[i];e.encryptionScheme&&n.push({contentType:e.contentType,robustness:e.robustness})}return t.concat(n)}function Lf(t){return!(!t.audioCapabilities||!t.audioCapabilities.some(Uf))||!(!t.videoCapabilities||!t.videoCapabilities.some(Uf))}function Uf(t){return!t.robustness}function Ff(t,n){for(var i=[],e=0;e<t.length;e++){var r=t[e];r.robustness?i.push(r):i.push(Xr({},r,{robustness:n}))}return i}x(),gt(),x(),gt();var zf=function(){function t(){}return t.prototype.Qw=function(t,n){return $t((function(){var i,e,r,o,u,s,f;return Zt(this,(function(c){switch(c.label){case 0:for(n=n.filter((function(t){return!t.yT})),i=0;i<n.length;i++)(e=n[i]).audioCapabilities&&(e.audioCapabilities=Mf(e.audioCapabilities)),e.videoCapabilities&&(e.videoCapabilities=Mf(e.videoCapabilities));if(t!==no||!n.some(Lf))return[3,4];r=n.map((function(t){return function(t,n){return Xr({},t,{videoCapabilities:t.videoCapabilities?Ff(t.videoCapabilities,n):void 0,audioCapabilities:t.audioCapabilities?Ff(t.audioCapabilities,n):void 0})}(t,"SW_SECURE_CRYPTO")})),c.label=1;case 1:return c.trys.push([1,3,,4]),[4,v.requestMediaKeySystemAccess(t,r)];case 2:return o=c.sent(),u=o.getConfiguration(),[2,new Af(o,t,u)];case 3:return c.sent(),[3,4];case 4:return[4,v.requestMediaKeySystemAccess(t,n)];case 5:return s=c.sent(),f=s.getConfiguration(),[2,new Af(s,t,f)]}}))}))()},t.bT=function(){return void 0!==v&&"function"==typeof v.requestMediaKeySystemAccess},t}();x(),gt(),x(),gt(),x(),gt(),x(),gt();var Wf=function(t){function n(n,i){var e;return(e=t.call(this)||this).IT=n,e.CT=i,e.$S=!1,e.MT=void 0,e.ET=void 0,e.AT=void 0,e.aT=function(){e.$S=!0,e.ST.Wb(void 0),e.AT&&(e.AT.removeEventListener("mskeyclose",e.aT),e.AT.removeEventListener("mskeymessage",e.PT),e.AT.removeEventListener("mskeyerror",e.Ss),e.AT.removeEventListener("mskeyadded",e.DT))},e.PT=function(t){e.ET&&(e.ET.Wb(void 0),e.ET=void 0),e._o(new Po(e,"license-request",Qo(t.message).buffer,t.destinationURL||void 0))},e.Ss=function(){var t=e.AT&&e.AT.error;if(t){var n=new au("Unknown CDM error",t.code,t.systemCode);if(e.ET)e.ET.Ub(n),e.ET=void 0;else if(e.MT)e.MT.Ub(n),e.MT=void 0;else switch(n.Zb){case MSMediaKeyError.MS_MEDIA_KEYERR_OUTPUT:case MSMediaKeyError.MS_MEDIA_KEYERR_HARDWARECHANGE:e.NT("output-not-allowed");break;default:e.NT("internal-error")}}},e.DT=function(){e.ET&&(e.NT("usable"),e.ET.Wb(void 0),e.ET=void 0),e.MT&&(e.NT("usable"),e.MT.Wb(void 0),e.MT=void 0)},e.ST=new fu,e.TT=new su,e}_t(n,t);var i=n.prototype;return i.eT=function(t,n,i){var e=this;return $t((function(){return Zt(this,(function(t){switch(t.label){case 0:return e.kT(),e.ET=new fu,e.uT(Jo(n),i),[4,e.ET.Gb];case 1:return t.sent(),[2]}}))}))()},i.uT=function(t,n){if(!t)throw new m("Expected initData to be defined but was "+t+".");var i,e=n&&n.playready&&n.playready.xT;return(i=n?this.IT.createSession(this.CT,t,e):this.IT.createSession(this.CT,t)).addEventListener("mskeyclose",this.aT),i.addEventListener("mskeymessage",this.PT),i.addEventListener("mskeyerror",this.Ss),i.addEventListener("mskeyadded",this.DT),this.AT=i,this.NT("status-pending"),i},i.$n=function(t){var n=this;return $t((function(){return Zt(this,(function(t){return n.kT(),[2,!0]}))}))()},i.ir=function(t){var n=this;return $t((function(){var i;return Zt(this,(function(e){switch(e.label){case 0:if(n.MT=new fu,n.kT(),!n.AT)return[2,J.resolve()];if(0===(i=Jo(t)).byteLength)throw new m("Cannot call update with an empty response.");return n.AT.update(i),[4,n.MT.Gb];case 1:return e.sent(),[2]}}))}))()},i.Ws=function(){return!this.$S&&this.AT&&(this.$S=!0,this.AT.close()),this.ST.Gb},i.iT=function(){var t=this;return $t((function(){return Zt(this,(function(n){return t.kT(),[2]}))}))()},i.kT=function(){if(this.$S)throw new m("Already closing or closed.")},i.NT=function(t){this.TT.Vb(),this.TT.Ob(uu,t),this._o(new No(this.TT))},Tt(n,[{key:"JS",get:function(){return this.AT&&this.AT.sessionId||""}},{key:"KS",get:function(){return NaN}},{key:"YS",get:function(){return this.ST.Gb}},{key:"wb",get:function(){return this.TT}}]),n}(Eo),Vf=function(){function t(t,n,i){this.IT=t,this.lT=n,this.kd=i;var e=Bf(i)||"video/mp4";this.CT=Df(e)}var n=t.prototype;return n.uT=function(t){var n=this;return $t((function(){return Zt(this,(function(t){return[2,new Wf(n.IT,n.CT)]}))}))()},n.dT=function(t){return J.resolve(!1)},n.kn=function(t){var n=this,i=function(){t.msSetMediaKeys(n.IT),t.removeEventListener("loadedmetadata",i)};return t.readyState>=1?t.msSetMediaKeys(this.IT):t.addEventListener("loadedmetadata",i),J.resolve()},n.fT=function(t){return J.resolve()},n.nr=function(){return J.resolve()},t}(),Hf=function(){function t(t,n){this.rT=t,this.LT=n}var n=t.prototype;return n.mT=function(){return this.LT},n.vT=function(){var t=new h.MSMediaKeys(this.rT);return J.resolve(new Vf(t,this.rT,this.LT))},Tt(t,[{key:"lT",get:function(){return this.rT}}]),t}(),qf=function(){function t(){}return t.prototype.Qw=function(t,n){try{return J.resolve(function(t,n){if(!Xf())throw new m("Unsupported key system "+t);for(var i=0;i<n.length;i++){var e=n[i],r=Cf(jf,Ro,t,e);if(r)return new Hf(t,r)}throw new m("Unsupported key system configuration for "+t)}(t,n))}catch(t){return J.reject(t)}},t.bT=function(){return Xf()},t}();function Xf(){return void 0!==h.MSMediaKeys&&"function"==typeof h.MSMediaKeys.isTypeSupported}function jf(t,n){return h.MSMediaKeys.isTypeSupported(t,n)}x(),gt(),x(),gt(),x(),gt(),x(),gt();var Yf=function(t){function n(n,i,e){var r;return(r=t.call(this)||this).VT=n,r.CT=i,r.FT=e,r.ST=new fu,r.UT=void 0,r.TT=new su,r.BT=void 0,r.WT=new fu,r.Ss=function(){var t=r.BT&&r.BT.error;if(t){var n=new au("Unknown CDM error",t.code,t.systemCode);r.UT?(r.UT.Ub(n),r.UT=void 0):n.Zb===WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT?r.NT("output-not-allowed"):r.NT("internal-error"),r._o(new Ao)}},r.PT=function(t){r._o(new Po(r,"license-request",Qo(t.message).buffer,"this is a test string"===t.destinationURL?void 0:t.destinationURL))},r.DT=function(){r.UT&&(r.UT.Wb(void 0),r.UT=void 0),r.NT("usable")},r}_t(n,t);var i=n.prototype;return i.eT=function(t,n,i){var e=i&&i.fairplay&&i.fairplay.OT;if(!e)throw new m("Expected FairPlay contentId to be defined but was "+e+".");var r=function(t,n,i){var e=Ko(t),r=2*e.length,o=2*n.length,u=new ArrayBuffer(4+r+4+o+4+i.byteLength),s=new DataView(u),f=new tu;return Xo(s,f,r,!0),jo(s,f,e,!0),Xo(s,f,o,!0),jo(s,f,n,!0),Xo(s,f,i.byteLength,!0),function(t,n,i){Zo(t).set(Zo(i),n.nc),n.Ib(i.byteLength)}(s,f,i),new E(u)}(Jo(n),e,this.FT);return this.BT=this.VT.createSession(this.CT,r),this.BT.addEventListener("webkitkeymessage",this.PT,!1),this.BT.addEventListener("webkitkeyadded",this.DT,!1),this.BT.addEventListener("webkitkeyerror",this.Ss,!1),this.NT("status-pending"),this.WT.Wb(this.BT),this.WT=new fu,J.resolve()},i.$n=function(t){return J.resolve(!0)},i.ir=function(t){var n=this;return $t((function(){var i,e;return Zt(this,(function(r){switch(r.label){case 0:if(0===(i=Jo(t)).byteLength)throw new m("Cannot call update with an empty response.");return n.UT=new fu,(e=n.BT)?[3,2]:[4,n.WT.Gb];case 1:e=r.sent(),r.label=2;case 2:return e.update(i),[4,n.UT.Gb];case 3:return r.sent(),[2]}}))}))()},i.Ws=function(){var t,n=this.BT;return n&&(n.removeEventListener("webkitkeymessage",this.PT,!1),n.removeEventListener("webkitkeyadded",this.DT,!1),n.removeEventListener("webkitkeyerror",this.Ss,!1),n.close()),this.WT.np(),null==(t=this.UT)||t.np(),this.ST.Wb(void 0),this.ST.Gb},i.iT=function(){return J.resolve(void 0)},i.NT=function(t){this.TT.Vb(),this.TT.Ob(uu,t),this._o(new No(this.TT))},Tt(n,[{key:"JS",get:function(){return this.BT?this.BT.sessionId:""}},{key:"KS",get:function(){return NaN}},{key:"YS",get:function(){return this.ST.Gb}},{key:"wb",get:function(){return this.TT}}]),n}(Eo);x(),gt(),x(),gt();var Kf=function(t){return t[t.CONFIGURATION_ERROR=1e3]="CONFIGURATION_ERROR",t[t.LICENSE_ERROR=2e3]="LICENSE_ERROR",t[t.LICENSE_INVALID_DOMAIN=2001]="LICENSE_INVALID_DOMAIN",t[t.LICENSE_INVALID_SOURCE=2002]="LICENSE_INVALID_SOURCE",t[t.LICENSE_EXPIRED=2003]="LICENSE_EXPIRED",t[t.LICENSE_INVALID_FEATURE=2004]="LICENSE_INVALID_FEATURE",t[t.SOURCE_INVALID=3e3]="SOURCE_INVALID",t[t.SOURCE_NOT_SUPPORTED=3001]="SOURCE_NOT_SUPPORTED",t[t.MANIFEST_LOAD_ERROR=4e3]="MANIFEST_LOAD_ERROR",t[t.MANIFEST_CORS_ERROR=4001]="MANIFEST_CORS_ERROR",t[t.MANIFEST_PARSE_ERROR=4002]="MANIFEST_PARSE_ERROR",t[t.MEDIA_NOT_SUPPORTED=5e3]="MEDIA_NOT_SUPPORTED",t[t.MEDIA_LOAD_ERROR=5001]="MEDIA_LOAD_ERROR",t[t.MEDIA_DECODE_ERROR=5002]="MEDIA_DECODE_ERROR",t[t.MEDIA_AVPLAYER_ERROR=5003]="MEDIA_AVPLAYER_ERROR",t[t.MEDIA_ABORTED=5004]="MEDIA_ABORTED",t[t.NETWORK_ERROR=6e3]="NETWORK_ERROR",t[t.NETWORK_TIMEOUT=6001]="NETWORK_TIMEOUT",t[t.CONTENT_PROTECTION_ERROR=7e3]="CONTENT_PROTECTION_ERROR",t[t.CONTENT_PROTECTION_NOT_SUPPORTED=7001]="CONTENT_PROTECTION_NOT_SUPPORTED",t[t.CONTENT_PROTECTION_CONFIGURATION_MISSING=7002]="CONTENT_PROTECTION_CONFIGURATION_MISSING",t[t.CONTENT_PROTECTION_CONFIGURATION_INVALID=7003]="CONTENT_PROTECTION_CONFIGURATION_INVALID",t[t.CONTENT_PROTECTION_INITIALIZATION_INVALID=7004]="CONTENT_PROTECTION_INITIALIZATION_INVALID",t[t.CONTENT_PROTECTION_CERTIFICATE_ERROR=7005]="CONTENT_PROTECTION_CERTIFICATE_ERROR",t[t.CONTENT_PROTECTION_CERTIFICATE_INVALID=7006]="CONTENT_PROTECTION_CERTIFICATE_INVALID",t[t.CONTENT_PROTECTION_LICENSE_ERROR=7007]="CONTENT_PROTECTION_LICENSE_ERROR",t[t.CONTENT_PROTECTION_LICENSE_INVALID=7008]="CONTENT_PROTECTION_LICENSE_INVALID",t[t.CONTENT_PROTECTION_KEY_EXPIRED=7009]="CONTENT_PROTECTION_KEY_EXPIRED",t[t.CONTENT_PROTECTION_KEY_MISSING=7010]="CONTENT_PROTECTION_KEY_MISSING",t[t.CONTENT_PROTECTION_OUTPUT_RESTRICTED=7011]="CONTENT_PROTECTION_OUTPUT_RESTRICTED",t[t.CONTENT_PROTECTION_INTERNAL_ERROR=7012]="CONTENT_PROTECTION_INTERNAL_ERROR",t[t.SUBTITLE_LOAD_ERROR=8e3]="SUBTITLE_LOAD_ERROR",t[t.SUBTITLE_CORS_ERROR=8001]="SUBTITLE_CORS_ERROR",t[t.SUBTITLE_PARSE_ERROR=8002]="SUBTITLE_PARSE_ERROR",t[t.VR_PLATFORM_UNSUPPORTED=9e3]="VR_PLATFORM_UNSUPPORTED",t[t.VR_PRESENTATION_ERROR=9001]="VR_PRESENTATION_ERROR",t[t.AD_ERROR=1e4]="AD_ERROR",t[t.AD_BLOCKER_DETECTED=10001]="AD_BLOCKER_DETECTED",t[t.FULLSCREEN_ERROR=11e3]="FULLSCREEN_ERROR",t[t.PICTURE_IN_PICTURE_ERROR=11001]="PICTURE_IN_PICTURE_ERROR",t[t.CACHE_SOURCE_ERROR=12e3]="CACHE_SOURCE_ERROR",t[t.CACHE_CONTENT_PROTECTION_ERROR=12001]="CACHE_CONTENT_PROTECTION_ERROR",t[t.THEO_LIVE_UNKNOWN_ERROR=13e3]="THEO_LIVE_UNKNOWN_ERROR",t[t.THEO_LIVE_CHANNEL_NOT_FOUND=13001]="THEO_LIVE_CHANNEL_NOT_FOUND",t[t.THEO_LIVE_END_OF_DEMO=13002]="THEO_LIVE_END_OF_DEMO",t[t.THEO_LIVE_ANALYTICS_ERROR=13003]="THEO_LIVE_ANALYTICS_ERROR",t}({}),Gf=function(t){return t[t.CONFIGURATION=1]="CONFIGURATION",t[t.LICENSE=2]="LICENSE",t[t.SOURCE=3]="SOURCE",t[t.MANIFEST=4]="MANIFEST",t[t.MEDIA=5]="MEDIA",t[t.NETWORK=6]="NETWORK",t[t.CONTENT_PROTECTION=7]="CONTENT_PROTECTION",t[t.SUBTITLE=8]="SUBTITLE",t[t.VR=9]="VR",t[t.AD=10]="AD",t[t.FULLSCREEN=11]="FULLSCREEN",t[t.CACHE=12]="CACHE",t[t.THEOLIVE=13]="THEOLIVE",t}({});!function(t){t.fromCode=function(n){var i=y.floor(n/1e3);if(i in t)return i;throw new m("Invalid error code: "+n)}}(Gf||(Gf={}));var $f=function(t){function n(n,i,e){var r;return(r=t.call(this,i,e)||this).code=n,r}return _t(n,t),Tt(n,[{key:"name",get:function(){return"THEOplayerError"}},{key:"category",get:function(){return Gf.fromCode(this.code)}}]),n}(dn),Zf=function(){function t(t,n,i){this.VT=t,this.lT=n,this.kd=i,this.FT=void 0;var e=Bf(i)||"video/mp4";this.CT=Df(e)}var n=t.prototype;return n.getInternalMediaKeys=function(){return this.VT},n.uT=function(t){var n=this;return $t((function(){return Zt(this,(function(t){if(!n.FT)throw new $f(Kf.CONTENT_PROTECTION_CERTIFICATE_ERROR,"No valid certificate was provided.");return[2,new Yf(n.VT,n.CT,n.FT)]}))}))()},n.dT=function(t){return this.FT=Jo(t),J.resolve(!0)},n.kn=function(t){return t.webkitSetMediaKeys(this.VT),J.resolve()},n.fT=function(t){return t.webkitSetMediaKeys(null),J.resolve()},n.nr=function(){return J.resolve()},t}(),Jf=function(){function t(t,n){this.rT=t,this.LT=n}var n=t.prototype;return n.mT=function(){return this.LT},n.vT=function(){var t=new h.WebKitMediaKeys(this.rT);return J.resolve(new Zf(t,this.rT,this.LT))},Tt(t,[{key:"lT",get:function(){return this.rT}}]),t}(),Qf=function(){function t(){}return t.prototype.Qw=function(t,n){try{return J.resolve(function(t,n){if(t!==so)throw new m(t+" is not supported with webkit-prefixed Encrypted Media Extensions.");if(!tc())throw new m("Unsupported key system "+t);for(var i=0;i<n.length;i++){var e=n[i],r=Cf(nc,Oo,t,e);if(r)return new Jf(t,r)}throw new m("Unsupported key system configuration for "+t)}(t,n))}catch(t){return J.reject(t)}},t.bT=function(){return tc()},t}();function tc(){return void 0!==h.WebKitMediaKeys&&"function"==typeof h.WebKitMediaKeys.isTypeSupported}function nc(t,n){return h.WebKitMediaKeys.isTypeSupported(t,n)}x(),gt();var ic=function(){function t(t){this.GT=t}return t.prototype.Qw=function(t,n){var i=this;return $t((function(){var e,r,o;return Zt(this,(function(u){switch(u.label){case 0:e=0,r=i.GT,u.label=1;case 1:if(!(e<r.length))return[3,6];o=r[e],u.label=2;case 2:return u.trys.push([2,4,,5]),[4,o.Qw(t,n)];case 3:return[2,u.sent()];case 4:return u.sent(),[3,5];case 5:return e++,[3,1];case 6:throw new m("Unsupported key system configuration for "+t)}}))}))()},t}();x(),gt(),x(),gt(),x(),gt(),x(),gt(),x(),gt();var ec=function(){function t(t){var n=this;this.HT=[],this.XT=void 0,this.ZT=new an,this.zT=function(){return 0===n.HT.length?n.YT?rc(n.YT,n.ZT.ep).then(n.KT,n.KT):n.KT():n.HT.shift()().then(n.zT)},this.KT=function(){if(0!==n.HT.length)return n.zT();n.XT=void 0},this.YT=t}var n=t.prototype;return n.Qo=function(t,n){var i=this;return new J((function(e){var r=an.hp([i.ZT.ep,n]),o=function(){r.Km()};i.HT.push((function(){var n=rc(t,r.ep);return e(n),n.then(o,o)})),i.XT||(i.XT=i.zT())}))},n.np=function(){return this.qT(!0)},n.yn=function(){return this.YT=void 0,this.qT(!1)},n.qT=function(t){var n=this.XT;return this.ZT.np(),t&&(this.ZT=new an),J.resolve(n)},t}();function rc(t,n){return new J((function(i){return i(t(n))}))}var oc=new ec,uc=function(t){function n(n){var i;return(i=t.call(this)||this).rT=n,i.ET=void 0,i.UT=void 0,i.tA=!1,i.ck=void 0,i.ek=void 0,i.ST=new fu,i.hk="",i.nk=new fu,i.rk=new su,i}_t(n,t);var i=n.prototype;return i.jT=function(){this.UT&&(this.NT("usable"),this.UT.Wb(void 0),this.UT=void 0)},i.QT=function(t){var n=new au("Unknown CDM error",t.errorCode,t.systemCode);this.UT?(this.UT.Ub(n),this.UT=void 0):this.ET?(this.ET.Ub(n),this.ET=void 0):n.Zb===WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT?this.NT("output-restricted"):1===n.Hb?this.NT("expired"):this.NT("internal-error")},i.JT=function(t){0!==t.message.byteLength?(this.ET&&(this.ET.Wb(void 0),this.ET=void 0),this._o(new Po(this,"license-request",cu(this.rT,Qo(t.message).buffer),t.defaultURL||void 0))):this.ET&&(this.ET.Ub("Empty key message"),this.ET=void 0)},i.$T=function(t){this.ek||(this.ek=t,this.nk.Wb(t))},i.Ws=function(){var t=this;return $t((function(){return Zt(this,(function(n){return t.throwIfClosed(),t.UT&&(t.UT.Ub(void 0),t.UT=void 0),t.tA=!0,t.ST.Wb(void 0),[2]}))}))()},i.eT=function(t,n){var i=this;return $t((function(){var t;return Zt(this,(function(e){switch(e.label){case 0:return i.throwIfClosed(),i.ET=new fu,i.ck=Jo(n),(t=i.ek)?[3,2]:[4,i.nk.Gb];case 1:t=e.sent(),e.label=2;case 2:return t.webkitGenerateKeyRequest(i.rT,i.ck),[4,i.ET.Gb];case 3:return e.sent(),[2]}}))}))()},i.$n=function(t){var n=this;return $t((function(){return Zt(this,(function(t){return n.throwIfClosed(),[2,!1]}))}))()},i.iT=function(){var t=this;return $t((function(){return Zt(this,(function(n){return t.throwIfClosed(),[2]}))}))()},i.ir=function(t){var n=this;return $t((function(){return Zt(this,(function(i){switch(i.label){case 0:return n.throwIfClosed(),n.UT=new fu,Ut.Ng||Ut.Rg?[2,oc.Qo($t((function(){return Zt(this,(function(i){switch(i.label){case 0:return[4,n.doUpdate(t)];case 1:return i.sent(),[2]}}))})))]:[4,n.doUpdate(t)];case 1:return i.sent(),[2]}}))}))()},i.doUpdate=function(t){var n=this;return $t((function(){var i;return Zt(this,(function(e){switch(e.label){case 0:return void 0===n.UT?[2]:(i=n.ek)?[3,2]:[4,n.nk.Gb];case 1:i=e.sent(),e.label=2;case 2:return i.webkitAddKey(n.rT,Jo(t),n.ck,n.JS),[4,n.UT.Gb];case 3:return e.sent(),Ut.Rg?[4,pn(500)]:[3,5];case 4:e.sent(),e.label=5;case 5:return[2]}}))}))()},i.throwIfClosed=function(){if(this.tA)throw new m("Already closing or closed.")},i.NT=function(t){this.rk.Vb(),this.rk.Ob(uu,t),this._o(new No(this.rk))},i.lk=function(){var t=this;return $t((function(){var n,i;return Zt(this,(function(e){switch(e.label){case 0:return(i=t.ek)?[3,2]:[4,t.nk.Gb];case 1:i=e.sent(),e.label=2;case 2:if(!(n=i).webkitCancelKeyRequest)return[3,7];e.label=3;case 3:return e.trys.push([3,4,5,7]),n.webkitCancelKeyRequest(t.rT,t.hk),[3,7];case 4:return e.sent(),[3,7];case 5:return[4,pn(500)];case 6:return e.sent(),[7];case 7:return[2]}}))}))()},Tt(n,[{key:"wb",get:function(){return this.rk}},{key:"JS",get:function(){return this.hk},set:function(t){this.hk=t}},{key:"YS",get:function(){return this.ST.Gb}},{key:"KS",get:function(){return NaN}}]),n}(Eo),sc=function(){function t(t,n){var i=this;this.lT=t,this.kd=n,this.ek=void 0,this._k=Yr(),this.vk=[],this.DT=function(t){var n=i.gk(t.sessionId);n&&n.jT()},this.dk=function(t){var n=i.gk(t.sessionId);n&&n.QT(t)},this.fk=function(t){var n=i.gk(t.sessionId);n&&n.JT(t)}}var n=t.prototype;return n.kn=function(t){return this.ek=t,this.ek.addEventListener("webkitkeyadded",this.DT),this.ek.addEventListener("webkitkeyerror",this.dk),this.ek.addEventListener("webkitkeymessage",this.fk),this._k.forEach((function(n,i){return n.$T(t)})),this.vk.forEach((function(n){return n.$T(t)})),J.resolve()},n.fT=function(t){return t.removeEventListener("webkitkeyadded",this.DT),t.removeEventListener("webkitkeyerror",this.dk),t.removeEventListener("webkitkeymessage",this.fk),this.ek=void 0,J.resolve()},n.nr=function(){var t=this;return $t((function(){var n,i;return Zt(this,(function(e){switch(e.label){case 0:n=t._k.entries(),i=n.next(),e.label=1;case 1:return i.done?[3,3]:[4,i.value[1].lk()];case 2:return e.sent(),i=n.next(),[3,1];case 3:return t._k.clear(),[2]}}))}))()},n.uT=function(t,n,i){var e=this;return $t((function(){var t;return Zt(this,(function(n){return t=new uc(e.lT),e.ek&&t.$T(e.ek),e.vk.push(t),[2,t]}))}))()},n.dT=function(t){return J.resolve(!1)},n.gk=function(t){if(t){var n=this._k.get(t);return n||((n=this.vk.shift())?(n.JS=t,this._k.set(t,n),n):void 0)}},t}(),fc=function(){function t(t,n){this.lT=t,this.pk=n}var n=t.prototype;return n.vT=function(){return J.resolve(new sc(this.lT,this.pk))},n.mT=function(){return this.pk},t}(),cc=function(){function t(){}return t.prototype.Qw=function(t,n){try{return J.resolve(function(t,n){if(!cc.bT())throw new m("Unsupported key system "+t);for(var i=0;i<n.length;i++){var e=n[i],r=Cf(hc,Ro,t,e);if(r)return new fc(t,r)}throw new m("Unsupported key system configuration for "+t)}(t,n))}catch(t){return J.reject(t)}},t.bT=function(){return"undefined"!=typeof HTMLMediaElement&&void 0!==HTMLMediaElement.prototype.webkitGenerateKeyRequest&&void 0!==HTMLMediaElement.prototype.webkitAddKey&&void 0!==HTMLMediaElement.prototype.webkitCancelKeyRequest},t}();function hc(t,n){var i=_n();return Boolean(i&&i.canPlayType&&""!==i.canPlayType(n,t))}x(),gt();var ac,vc=function(){function t(){}return t.prototype.Qw=function(t,n){return t===no||t===Jr?J.resolve(void 0):J.reject(new g("DRM configuration not supported"))},t}();function dc(){return ac||(ac=function(){var t=[];Qf.bT()&&t.push(new Qf);zf.bT()&&t.push(new zf);qf.bT()&&t.push(new qf);cc.bT()&&t.push(new cc);Ut.Lg&&t.push(new vc);return new ic(t)}()),ac}x(),gt(),x(),gt();var lc=function(){function t(){this.wk=Yr()}var n=t.prototype;return n.Vb=function(t){this.wk.delete(t)},n.yk=function(){this.wk.clear()},n.Bb=function(t){return this.wk.get(t)},n.Ob=function(t,n){this.wk.set(t,n)},t}(),wc=function(){function t(){}return t.bk=function(){return t.Vm||(t.Vm=bc.bT()?new bc:new lc),t.Vm},t.Vb=function(n){t.bk().Vb(n)},t.yk=function(){t.bk().yk()},t.Bb=function(n){return t.bk().Bb(n)},t.Ob=function(n,i){t.bk().Ob(n,i)},t}();wc.Vm=void 0;var bc=function(t){function n(){return t.apply(this,arguments)||this}_t(n,t);var i=n.prototype;return i.Vb=function(t){self.sessionStorage.removeItem(t)},i.yk=function(){self.sessionStorage.clear()},i.Bb=function(t){var n;return null!=(n=self.sessionStorage.getItem(t))?n:void 0},i.Ob=function(t,n){self.sessionStorage.setItem(t,n)},n.bT=function(){var t="foobar";try{return self.sessionStorage.setItem(t,t),self.sessionStorage.removeItem(t),!0}catch(t){return!1}},n}(wc);x(),gt(),x(),gt();var gc=function(){var t=self.Blob;if(t)try{new t;return function(t){return function(n,i){return new t(n,i)}}(t)}catch(t){}var n=self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder;if(n)return function(t){return function(n,i){var e=new t;if(n)for(var r=0;r<n.length;r++){var o=n[r];e.append(o)}return e.getBlob(i&&i.type||"")}}(n)}();function mc(t,n,i){var e=gc([n],{type:"application/octet-stream"}),r=URL.createObjectURL(e),o=function(t,n){var i=t,e=i.indexOf("?");if(e>=0&&(i=i.substr(0,e)),i=i.substr(i.lastIndexOf("/")+1),n){var r=i.indexOf(".");r<0&&(r=i.length),i=i.substr(0,r)+n+i.substr(r)}return i}(t,i),u=a.createElement("a");u.href=r,u.download=o,a.body.appendChild(u),u.click(),a.body.removeChild(u),URL.revokeObjectURL(r)}x(),gt(),x(),gt(),x(),gt(),x(),gt(),x(),gt(),x(),gt();var pc=function(t,n,i){return i=null!=t?k(P(t)):{},function(t,n,i,e){if(n&&"object"==typeof n||"function"==typeof n)for(var r,o=N(n),u=0,s=o.length;u<s;u++)r=o[u],A.call(t,r)||r===i||R(t,r,{get:function(t){return n[t]}.bind(null,r),enumerable:!(e=O(n,r))||e.enumerable});return t}(!n&&t&&t.__esModule?i:R(i,"default",{value:t,enumerable:!0}),t)}(pt());x(),gt();var yc=t,_c=Xt(yc.ReadableStream)&&Xt(yc.WritableStream)&&Xt(yc.TransformStream)&&qt(yc.ReadableStream.prototype.pipeThrough)&&!ri.Cp,Sc=_c?yc.ReadableStream:pc.ReadableStream,Tc=(_c?yc.WritableStream:pc.WritableStream,_c?yc.TransformStream:pc.TransformStream);_c&&yc.ByteLengthQueuingStrategy?yc.ByteLengthQueuingStrategy:pc.ByteLengthQueuingStrategy,_c&&yc.CountQueuingStrategy?yc.CountQueuingStrategy:pc.CountQueuingStrategy;function Ec(t){return function(t){return new Sc({start:function(n){for(var i=0;i<t.length;i++){var e=t[i];n.enqueue(e)}n.close()}})}([t])}function Ic(t){return Ec(function(t){return new E(t)}(t))}function kc(t,n){return function(t,n){var i=n,e=t.getReader(),r=new fu,o=function(){u();var t=new ln;e.cancel(t).catch(Yt),r.Ub(t)},u=function(){i&&(i.Jm(o),i=void 0)};i&&(i.zm?o():i.Qm(o));var s=[],f=function(t){return t.done?(u(),J.resolve(s)):(s.push(t.value),J.resolve(e.read()).then(f))};return J.resolve(e.read()).then(f).then((function(t){u(),r.Wb(t)}),(function(t){u(),r.Ub(t)})),r.Gb}(t,n).then((function(t){return ru(t).buffer}))}function Rc(t,n){var i=n,e=new Tc,r=e.readable,o=e.writable,u=o.getWriter(),s=function(){i&&i.np()};return u.closed.then(s,s),t.then((function(t){return i=void 0,u.releaseLock(),t.pipeTo(o).catch(Yt)}),(function(t){return i=void 0,u.releaseLock(),o.abort(t).catch(Yt)})),r}function Oc(t){return Ko(new E(t))}function Nc(t){return Go(t).buffer}x(),gt();var Pc="content-type",Ac="text/plain;charset=UTF-8",Dc=function(){function t(){}var n=t.prototype;return n.Ck=function(t){return this.Pk(t).then(JSON.parse)},n.Dk=function(t,n){switch(t){case Ar.Ak:return this.Nk(n);case Ar.Sk:return this.Ck(n);case Ar.Tk:return this.Mk();case Ar.Ek:return this.Pk(n);default:throw new m}},t}();function Cc(t,n,i){if(t instanceof Dc)return t;if(t instanceof Sc)return function(t,n){return new Bc({Hw:0,Mk:t,Lk:xc(n)})}(t,i);var e=xc(i),r=J.resolve(t).then((function(t){return function(t,n){if(t){if("string"==typeof t)return{Hw:Ar.Ek,Bk:t,Lk:n||Ac};if(t instanceof ArrayBuffer||iu(t))return{Hw:Ar.Ak,Bk:Vc(t),Lk:n};if(function(t){return Ht(t)&&t.constructor&&t.constructor===p}(t)||Vt(t))return{Hw:Ar.Sk,Bk:t,Lk:n};throw new m("Unsupported BodyInit type")}return{Hw:Ar.Ek,Bk:null,Lk:n}}(t,e)}));return new Bc({Hw:1,Gb:r,Ok:n})}function xc(t){return(t.get(Pc)||"").toLowerCase()}var Bc=function(t){function n(n){var i;return(i=t.call(this)||this).Vk=!1,i.Zk=new fu,i.Zk.Gb.catch(Yt),i.zk(n),i}_t(n,t);var i=n.prototype;return i.Gk=function(){return this.Zk.Gb},i.Pk=function(t){return this.Hk(Mc,t)},i.Ck=function(t){return this.Hk(Uc,t)},i.Nk=function(t){return this.Hk(zc,t)},i.Mk=function(){return this.Xk(function(t){return 0===t.Hw?t.Mk:Rc(t.Gb.then(Wc).then(Ic),t.Ok)}(this.Uk))},i.Hk=function(t,n){if(this.Vk)return J.reject(new m("Already used"));this.Vk=!0;var i=t(this.Uk,n);return this.Zk.rp(i.then(Yt)),i},i.Xk=function(t){if(this.Vk)throw new m("Already used");if(t.locked)throw new m("Body stream is locked");this.Vk=!0;var n=new Tc,i=J.resolve(t.pipeTo(n.writable));return this.Zk.rp(i),n.readable},i.zk=function(t){this.Uk=t,1===t.Hw&&t.Gb.catch(Yt)},i.qk=function(){if(this.Vk)throw new m("Already used");var t=function(t){if(0===t.Hw){var n=Dr(t.Mk.tee(),2),i=n[0],e=n[1];return[{Hw:t.Hw,Mk:i,Lk:t.Lk},{Hw:t.Hw,Mk:e,Lk:t.Lk}]}var r=Dr(t.Ok.op(),2),o=r[0],u=r[1];return[{Hw:t.Hw,Gb:t.Gb,Ok:o},{Hw:t.Hw,Gb:t.Gb,Ok:u}]}(this.Uk),i=t[0],e=t[1];return this.zk(i),new n(e)},Tt(n,[{key:"Fk",get:function(){return this.Vk}},{key:"Wk",get:function(){return 0===this.Uk.Hw}}]),n}(Dc);function Mc(t,n){return 0===t.Hw?kc(t.Mk,n).then(Oc):(n&&t.Ok.rp(n),gn(t.Gb.then(Lc),t.Ok))}function Lc(t){switch(t.Hw){case Ar.Ek:return J.resolve(t.Bk||"");case Ar.Ak:return J.resolve(t.Bk).then(Oc);case Ar.Sk:return J.resolve(t.Bk).then(JSON.stringify)}}function Uc(t,n){return 0===t.Hw?Mc(t,n).then(JSON.parse):(n&&t.Ok.rp(n),gn(t.Gb.then(Fc),t.Ok))}function Fc(t){return t.Hw===Ar.Sk?J.resolve(t.Bk):Lc(t).then(JSON.parse)}function zc(t,n){return 0===t.Hw?kc(t.Mk,n):(n&&t.Ok.rp(n),gn(t.Gb.then(Wc),t.Ok))}function Wc(t){switch(t.Hw){case Ar.Ak:return J.resolve(t.Bk);case Ar.Ek:case Ar.Sk:return Lc(t).then(Nc)}}function Vc(t){return t instanceof ArrayBuffer?t:Qo(Zo(t)).buffer}var Hc=function(t){function n(n){var i;return(i=t.call(this)||this).Yk=n,i}_t(n,t);var i=n.prototype;return i.Gk=function(){return this.Yk.Gk()},i.Pk=function(t){return this.Yk.Pk(t)},i.Ck=function(t){return this.Yk.Ck(t)},i.Nk=function(t){return this.Yk.Nk(t)},i.Mk=function(t){return this.Yk.Mk(t)},i.qk=function(){return this.Yk.qk()},Tt(n,[{key:"Fk",get:function(){return this.Yk.Fk}},{key:"Wk",get:function(){return this.Yk.Wk}}]),n}(Dc);var qc=function(t){function n(n,i){var e,r,o,u,s,f;i?(r=i.$k,o=i.Qk,u=i.Kk,s=i.tE,f=i.eE):(r=[],o=Ar.Ek,u=200,s="OK",f=!1);var c=n.Jk,h=new Cr(n.$k||r),a=n.Qk||o,v=n.iE||(i&&i.Jk===c?i.iE:c.Xu),d=i?i.Yk:null,l=Cc(void 0!==n.jk?n.jk:d,n.Ok||new an,h);return(e=t.call(this,l)||this).$k=h,e.Jk=c,e.iE=v,e.Qk=a,e.Kk=void 0!==n.Kk?n.Kk:u,e.tE=void 0!==n.tE?String(n.tE):s,e.eE=n.eE||f,e}_t(n,t);var i=n.prototype;return i.jk=function(t){return this.Dk(this.Qk,t)},i.Cb=function(){return new n({jk:this.qk(),Jk:this.Jk},this)},n}(Hc),Xc=function(){function t(){}var n=t.prototype;return n.Jk=function(t){var n=function(t){return new qc({jk:null,$k:{},Jk:t,iE:t.Xu,Qk:t.Qk,Kk:0,tE:ko.Xy})}(new Ur(t));return J.resolve(n)},n.LE=function(t){},n.yn=function(){},t}();var jc=function(){function t(t,n){void 0===n&&(n=!0),this.VE=t,this.UE=n}var n=t.prototype;return n.Jk=function(t){var n=this.FE(t);return this.VE.Jk(n)},n.LE=function(t){return this.VE.LE(this.WE(t))},n.FE=function(n){var i=new Ur(n);if(!this.UE){var e=t.GE(i.Xu);i=new Ur({Xu:e},i)}return i},n.WE=function(n){var i=n.Xu;return this.UE||(i=t.GE(i)),{Xu:i,Bk:n.Bk}},n.yn=function(){this.VE.yn()},t.GE=function(t){return Wt.Cw&&lo(t,"http://")?t.replace(":","s:"):t},Tt(t,null,[{key:"BE",get:function(){return t.OE||(t.OE=new t(new Xc)),t.OE}}]),t}();jc.OE=void 0,x(),gt(),x(),gt(),x(),gt(),x(),gt();var Yc=function(t){function n(n,i,e){var r;return(r=t.call(this,n.Jk,null!=e?e:function(t){return"Error while loading "+t.Jk.Xu+", status code "+t.Kk}(n),i)||this).YE=n,r}return _t(n,t),Tt(n,[{key:"name",get:function(){return Fr.HE}},{key:"qE",get:function(){return this.YE}}]),n}(zr);x(),gt();var Kc=function(t){function n(n,i){return t.call(this,n,function(t){return"Request for "+t.Xu+" timed out after "+t.TE+" seconds."}(n),i)||this}return _t(n,t),Tt(n,[{key:"name",get:function(){return Fr.XE}}]),n}(zr);x(),gt();var Gc=self.fetch,$c=self.Request,Zc=self.Response,Jc=self.Headers,Qc=self.ReadableStream,th=self.AbortSignal,nh=self.AbortController,ih=Kt((function(){try{return qt(Gc)&&Xt($c)&&Xt(Zc)&&Xt(Jc)&&"forEach"in Jc.prototype&&kr()}catch(t){return!1}})),eh=["http:","https:"];var rh=Kt((function(){try{return ih()&&Xt(th)&&Xt(nh)&&"signal"in $c.prototype}catch(t){return!1}})),oh=Kt((function(){try{return ih()&&Xt(Qc)&&"body"in Zc.prototype&&!Ut.hg}catch(t){return!1}}));function uh(t,n){var i,e=t.$k.has("content-length")?Number(t.$k.get("content-length")):void 0;return i=t.Wk?function(t,n,i){return t.pipeThrough(new Tc(new sh(n,i)))}(t.Mk(),n,e):function(t,n,i){return fh.apply(this,arguments)}(t.Nk(),n,e),new qc({jk:i,Jk:t.Jk},t)}x(),gt(),x(),gt();var sh=function(){function t(t,n){this.jE=t,this.QE=n,this.KE=0}var n=t.prototype;return n.transform=function(t,n){this.KE+=t.byteLength,this.jE(this.KE,this.QE),n.enqueue(t)},n.flush=function(t){var n;this.jE(this.KE,null!=(n=this.QE)?n:this.KE)},t}();function fh(){return fh=$t((function(t,n,i){var e,r;return Zt(this,(function(o){switch(o.label){case 0:return[4,J.resolve()];case 1:return o.sent(),n(0,i),[4,t];case 2:return e=o.sent(),r=e.byteLength,n(r,null!=i?i:r),[2,e]}}))})),fh.apply(this,arguments)}var ch=function(){function t(t){this.ZT=new an,this.YE=void 0,this.$E=0,this.tx=!1,this.zE=t,this.ZT.rp(t.ep),this.qE=this.JE()}var n=t.prototype;return n.JE=function(){var t=this;return $t((function(){var n,i,e,r,o,u,s,f,c;return Zt(this,(function(h){switch(h.label){case 0:(n=t.zE).TE&&(t.$E=d((function(){t.tx=!0,t.ZT.np()}),n.TE),t.ZT.ep.$m((function(){l(t.$E)})));try{i=Gc(n.Xu,{method:n.SE,headers:n.$k.xk(),body:n.Bk,credentials:n.RE?"include":"same-origin",signal:vh(t.ZT.ep),mode:n.PE,keepalive:n.NE})}catch(t){throw new Wr(n,t)}h.label=1;case 1:return h.trys.push([1,3,,4]),[4,i];case 2:return e=h.sent(),[3,4];case 3:throw r=h.sent(),wn(o=t.ix(r))&&t.ZT.np(),o;case 4:if(u=e.url||n.Xu,s=0===e.status&&"file:"===function(t){return Wt.Bh(t).protocol}(u)?200:e.status,f=new hh(t,e,t.ZT),!function(t){return t.Kk>=200&&t.Kk<=299||304===t.Kk}(c=new qc({jk:f,Jk:n,Qk:n.Qk,$k:dh(e.headers),Kk:s,tE:e.statusText,iE:u})))throw new Yc(c);return n.CE&&(c=uh(c,n.CE)),[2,c]}}))}))()},n.ix=function(t){return function(t){return t instanceof zr}(t)?t:wn(t)?this.tx?new Kc(this.zE):new ln(t.message,t):this.YE?new Yc(this.YE,t):new Wr(this.zE,t)},t}(),hh=function(t){function n(n,i,e){var r;return(r=t.call(this)||this).Zk=new fu,r.nx=n,r.sx=i,r.ZT=e,r.Zk.Gb.catch(Yt),r}_t(n,t);var i=n.prototype;return i.Gk=function(){return this.Zk.Gb},i.Pk=function(t){return this.Hk(this.sx.text(),t)},i.Nk=function(t){return this.Hk(this.sx.arrayBuffer(),t)},i.Mk=function(){var t=this.sx.body;return t?this.Xk(t):Rc(this.Nk().then(Ic),this.ZT)},i.qk=function(){var t=this.sx.clone(),i=Dr(this.ZT.op(),2),e=i[0],r=i[1];return this.ZT=e,new n(this.nx,t,r)},i.Hk=function(t,n){var i=this;n&&this.ZT.rp(n);var e=bn(J.resolve(t),this.ZT.ep).catch((function(t){throw i.nx.ix(t)}));return e=gn(e,this.ZT),this.Zk.rp(e.then(Yt)),e},i.Xk=function(t){var n=this;return new Sc(new lh(t,(function(t){return n.nx.ix(t)}),this.ZT,this.Zk),{highWaterMark:0})},Tt(n,[{key:"Fk",get:function(){return this.sx.bodyUsed}},{key:"Wk",get:function(){return zt(this.sx.body)}}]),n}(Dc),ah="abort";function vh(t){if(rh()){var n=new nh;if(t.zm)n.abort();else if(!t.qm){var i=function(){e(),n.abort()},e=function(){n.signal.removeEventListener(ah,i),t.Jm(i),t.tp(e)};n.signal.addEventListener(ah,i),t.Qm(i),t.$m(e)}return n.signal}}function dh(t){if(function(t){return Ht(t)&&"function"==typeof t.forEach}(t)){var n=new Cr;return t.forEach((function(t,i){Array.isArray(t)&&2===t.length?n.append(t[0],t[1]):n.append(i,t)})),n}return new Cr(t)}var lh=function(){function t(t,n,i,e){this.ox=t,this.hx=n,this.ZT=i,this.Zk=e}var n=t.prototype;return n.start=function(t){this.Od=this.ox.getReader()},n.pull=function(t){var n=this;return $t((function(){var i,e,r;return Zt(this,(function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),[4,bn(n.Od.read(),n.ZT.ep)];case 1:return i=o.sent(),[3,3];case 2:return e=o.sent(),r=n.hx(e),n.Zk.Ub(r),n.ZT.np(),n.Od.cancel(r).catch(Yt),t.error(r),[2];case 3:return i.done?(n.Zk.Wb(),n.ZT.np(),t.close()):t.enqueue(i.value),[2]}}))}))()},n.cancel=function(t){return this.ZT.np(),this.Zk.Ub(t),this.Od.cancel(t)},t}();x(),gt();var wh=function(){function t(t){var n=this;this.ZT=new an,this.YE=void 0,this.ux=new fu,this.Ax=!1,this.bx=function(){var t;n._x(),null==(t=n.lx)||t.abort()},this.zE=t,this.ZT.rp(t.ep),this.lx=new I,this.JE()}var n=t.prototype;return n.JE=function(){var t=this,n=this.lx,i=this.zE;if(i.ep.zm)return this._x();n.onreadystatechange=function(){return t.vx()},n.onprogress=function(n){return t.jE(n)},n.onload=function(){return t.gx()},n.onloadend=function(){return t.mx()},n.onerror=function(){return t.wx()},n.ontimeout=function(){return t.yx()},n.onabort=function(){return t._x()},n.open(i.SE,i.Xu,!0),n.withCredentials=Boolean(i.RE),"responseType"in n&&i.Qk&&(i.Qk===Ar.Ek?n.responseType="text":n.responseType="arraybuffer"),i.$k.forEach((function(t,i){n.setRequestHeader(i,t)})),i.TE&&(n.timeout=i.TE),this.ZT.ep.Qm(this.bx);var e=i.Bk;e?n.send(e):n.send()},n.vx=function(){var t=this.lx;void 0!==t&&t.readyState>=2&&!this.Ax&&(this.Ax=!0,this.Sx())},n.Sx=function(){var t,n,i=this.lx,e=function(t){var n=new Cr,i=t.replace(/\r?\n[\t ]+/g," ");return i.split(/\r?\n/).forEach((function(t){var i=t.split(":"),e=i.shift().trim();if(e){var r=i.join(":").trim();n.append(e,r)}})),n}(i.getAllResponseHeaders()||""),r=this.zE;this.Tx=new fu,this.YE=new qc({Jk:r,Qk:r.Qk,jk:this.Tx.Gb,Kk:i.status,tE:i.statusText,$k:e,iE:null!=(n=i.responseURL)?n:e.get("X-Request-URL")}),null==(t=this.ux)||t.Wb(this.YE)},n.gx=function(){var t,n=this.lx;if(void 0!==n){var i=n.response;if(!zt(i)){var e=this.zE.Qk;i=e===Ar.Ek?n.responseText:e===Ar.Ak?new ArrayBuffer(0):{}}null==(t=this.Tx)||t.Wb(i)}},n.mx=function(){this.yn()},n.jE=function(t){void 0!==this.lx&&(null==this.zE.CE||this.zE.CE.call(this.zE,t.loaded,t.lengthComputable?t.total:void 0))},n.wx=function(){var t=new g("Network request failed");this.YE?this.Ss(new Yc(this.YE,t)):this.Ss(new Wr(this.zE,t))},n.yx=function(){this.Ss(new Kc(this.zE))},n._x=function(){this.Ss(new ln),this.yn()},n.Ss=function(t){var n,i;null==(n=null!=(i=this.Tx)?i:this.ux)||n.Ub(t)},n.yn=function(){this.lx=void 0,this.YE=void 0,this.ux=void 0,this.Tx=void 0,this.ZT.Km()},Tt(t,[{key:"qE",get:function(){return this.ux.Gb}}]),t}();x(),gt();var bh=function(){function t(){}var n=t.prototype;return n.Jk=function(t){return function(t){if(!ih()||!function(t){try{return eh.indexOf(new self.URL(t,self.location.href).protocol)>=0}catch(t){return!1}}(t.Xu))return!1;if(!oh()&&t.CE)return!1;if(!t.DE&&t.SE!==Mr.POST){if(Ut.Ng&&Ut.wg<=68)return!1;if(Ut.Rg)return!1}return!0}(t)?new ch(t).qE:new wh(t).qE},n.LE=function(t){var n=h.navigator;if(n&&n.sendBeacon)n.sendBeacon(t.Xu,gc([t.Bk],{type:t.Lk}));else{var i=t.Lk?{"Content-type":t.Lk}:void 0;this.Jk(new Ur({SE:Mr.POST,Xu:t.Xu,Bk:t.Bk,$k:i,PE:Lr.yE})).then((function(t){!function(t){t.then(Yt,Yt)}(t.Nk())}),Yt)}},n.yn=function(){},t}();x(),gt(),x(),gt();var gh=function(t){return t[t.kx=1]="kx",t[t.Ex=2]="Ex",t[t.Ek=3]="Ek",t[t.xx=4]="xx",t[t.Ix=9]="Ix",t}({});var mh=function(){function t(){}return t.prototype.Cx=function(t){var n,i=new DOMParser;try{n=i.parseFromString(t,"text/xml")}catch(t){throw new Hr(t)}if(!n||n.getElementsByTagName("parsererror").length>0)throw new Hr;return new Ih(n)},t}(),ph=function(){function t(t){this.Dx=t}var n=t.prototype;return n.Bx=function(t){return this.Dx.isEqualNode(t.Dx)},n.Ox=function(n){return new t(this.Dx.cloneNode(n))},Tt(t,[{key:"Rx",get:function(){return gh.Ex}},{key:"Px",get:function(){var t;return null!=(t=this.Dx.localName)?t:Oh(this.Dx.nodeName)}},{key:"l",get:function(){return this.Dx.nodeName}},{key:"Nx",get:function(){var t;return null!=(t=this.Dx.namespaceURI)?t:void 0}},{key:"Mx",get:function(){var t;return null!=(t=this.Dx.prefix)?t:void 0}},{key:"Lx",get:function(){return this.Dx.nodeValue}}]),t}(),yh=function(){function t(t){this.Vx=void 0,this.Wx=t}var n=t.prototype;return n.Ux=function(t){return this.Fx.filter((function(n){return kh(n)&&n.Gx===t}))},n.Zx=function(t,n){return this.Fx.filter((function(i){return kh(i)&&i.Px===n&&i.Nx===t}))},n.Xx=function(t){this.Wx.appendChild(t.Hx),this.Vx&&this.Vx.push(t)},n.Bx=function(t){return this.Wx.isEqualNode(t.Hx)},Tt(t,[{key:"Fx",get:function(){return void 0===this.Vx&&(this.Vx=function(t){for(var n=[],i=0;i<t.length;i++){var e=Rh(t.item(i));e&&n.push(e)}return n}(this.Wx.childNodes)),this.Vx}},{key:"m",get:function(){return this.Fx.filter(kh)}},{key:"Hx",get:function(){return this.Wx}}]),t}(),_h=function(t){function n(n){return t.call(this,n)||this}_t(n,t);var i=n.prototype;return i.Yx=function(t){if(this.Wx.hasAttribute(t))return this.Wx.getAttribute(t)},i.Kx=function(t,n){if(this.Wx.hasAttributeNS(t,n))return this.Wx.getAttributeNS(t,n)},i.jx=function(t){this.Wx.removeAttribute(t)},i.Qx=function(t,n){this.Wx.removeAttributeNS(t,n)},i.Jx=function(t,n){this.Wx.setAttribute(t,n)},i.$x=function(t,n,i){this.Wx.setAttributeNS(t,n,i)},i.Ox=function(t){return new n(this.Wx.cloneNode(t))},Tt(n,[{key:"Rx",get:function(){return gh.kx}},{key:"Px",get:function(){var t;return null!=(t=this.Wx.localName)?t:Oh(this.Wx.nodeName)}},{key:"Nx",get:function(){var t;return null!=(t=this.Wx.namespaceURI)?t:void 0}},{key:"Mx",get:function(){var t;return null!=(t=this.Wx.prefix)?t:void 0}},{key:"Gx",get:function(){return this.Wx.nodeName}},{key:"zx",get:function(){return function(t){for(var n=[],i=0;i<t.length;i++)n.push(new ph(t.item(i)));return n}(this.Wx.attributes)}},{key:"qx",get:function(){return this.Wx.textContent}}]),n}(yh),Sh=function(){function t(t){this.Wx=t}return t.prototype.Bx=function(t){return this.jk===t.jk},Tt(t,[{key:"jk",get:function(){return this.Wx.nodeValue}},{key:"Hx",get:function(){return this.Wx}}]),t}(),Th=function(t){function n(n){return t.call(this,n)||this}return _t(n,t),n.prototype.Ox=function(t){return new n(this.Wx.cloneNode(t))},Tt(n,[{key:"Rx",get:function(){return gh.Ek}}]),n}(Sh),Eh=function(t){function n(n){return t.call(this,n)||this}return _t(n,t),n.prototype.Ox=function(t){return new n(this.Wx.cloneNode(t))},Tt(n,[{key:"Rx",get:function(){return gh.xx}}]),n}(Sh),Ih=function(t){function n(n){return t.call(this,n)||this}return _t(n,t),n.prototype.Ox=function(t){return new n(this.Wx.cloneNode(t))},Tt(n,[{key:"Rx",get:function(){return gh.Ix}},{key:"tI",get:function(){return new _h(this.Wx.documentElement)}}]),n}(yh);function kh(t){return function(t){return 1===t.Rx}(t)}function Rh(t){switch(t.nodeType){case gh.kx:return new _h(t);case gh.Ek:return new Th(t);case gh.xx:return new Eh(t)}}function Oh(t){var n=t.indexOf(":");return n<0?t:t.substr(n+1)}var Nh=function(t){function n(){var n;return(n=t.apply(this,arguments)||this).eI=void 0,n.sI=oh(),n.rI=Ut.wm||Ut.hg,n.hI=(Ut.wm||Ut.Ng&&Ut.wg<=68||Ut.hg)&&!(Ut.Rg&&Ut.Pg<3),n.vI=void 0,n.gI=new mh,n}return _t(n,t),n.prototype.Cx=function(t){return this.gI.Cx(t)},Tt(n,[{key:"dw",get:function(){return this.eI||(this.eI=new So(dc())),this.eI}},{key:"iI",get:function(){return this.sI}},{key:"nI",get:function(){return this.rI}},{key:"oI",get:function(){return this.hI}},{key:"aI",get:function(){return!1}},{key:"uI",get:function(){return wc.bk()}},{key:"cI",get:function(){return{lI:mc}}},{key:"dI",get:function(){return v.connection&&v.connection.effectiveType||Nr}},{key:"fI",get:function(){return v.connection&&v.connection.type||Pr}},{key:"_I",get:function(){return this.vI||(this.vI=new jc(new bh)),this.vI}}]),n}(Er);jt(new Nh),x(),gt(),x(),gt();x(),gt(),x(),gt(),x(),gt();var Ph=function(t){return t.gE="audio",t.mE="video",t._W="metadata",t}({});x(),gt(),x(),gt();var Ah=function(t){return t.rE="#EXTINF",t.IBt="#EXT-X-MAP",t.p="#EXTM3U",t.en="#EXT-X-VERSION",t.ui="#EXT-X-TARGETDURATION",t.USt="#EXT-X-START",t.li="#EXT-X-INDEPENDENT-SEGMENTS",t.Tk="#EXT-X-STREAM-INF",t.vr="#EXT-X-MEDIA-SEQUENCE",t.if="#EXT-X-ENDLIST",t.sf="#EXT-X-MEDIA",t.ff="#EXT-X-DISCONTINUITY",t.af="#EXT-X-DISCONTINUITY-SEQUENCE",t.tv="#EXT-X-PLAYLIST-TYPE",t.nv="#EXT-X-KEY",t}({}),Dh=function(){function t(t,n){this.Hw="#EXTINF",this.ev=t,this.sv=n}return t.prototype._P=function(){return this.Hw+":"+this.ev+",\n"+this.sv},t}(),Ch=function(){function t(t){this.Hw="#EXT-X-MAP",this.sv=t}return t.prototype._P=function(){return this.Hw+':URI="'+this.sv+'"'},t}(),xh=function(){function t(){this.Hw="#EXTM3U"}return t.prototype._P=function(){return this.Hw},t}(),Bh=function(){function t(t){this.Hw="#EXT-X-VERSION",this.sN=t}return t.prototype._P=function(){return this.Hw+":"+this.sN},t}(),Mh=function(){function t(t){this.Hw="#EXT-X-TARGETDURATION",this.wBt=t}return t.prototype._P=function(){return this.Hw+":"+this.wBt},t}(),Lh=function(){function t(t){this.Hw="#EXT-X-START",this.yOt=t}return t.prototype._P=function(){return this.Hw+":TIME-OFFSET="+this.yOt},t}(),Uh=function(){function t(t,n,i){this.uri=t,this.keyFormat=n,this.keyFormatVersions=i,this.Hw="#EXT-X-KEY"}return t.prototype._P=function(){return this.Hw+':METHOD=SAMPLE-AES,URI="'+this.uri+'",KEYFORMAT="'+this.keyFormat+'",KEYFORMATVERSIONS="'+this.keyFormatVersions+'"'},t}(),Fh=function(){function t(t){this.Hw="#EXT-X-STREAM-INF",this.FG=1,this.sv=t}return t.prototype._P=function(){return this.Hw+":BANDWIDTH="+this.FG+',AUDIO="audio"\n'+this.sv},t}(),zh=function(){function t(t){this.Hw="#EXT-X-MEDIA-SEQUENCE",this.fL=t}return t.prototype._P=function(){return this.Hw+":"+this.fL},t}(),Wh=function(){function t(t){this.Hw="#EXT-X-MEDIA",this.sv=t}return t.prototype._P=function(){var t=Yr();t.set("TYPE","AUDIO"),t.set("GROUP-ID",'"audio"'),t.set("NAME",'"audio"'),t.set("AUTOSELECT","YES"),t.set("DEFAULT","YES"),t.set("CHANNELS",'"2"'),t.set("URI",'"'+this.sv+'"');var n=[];return t.forEach((function(t,i){return n.push(i+"="+t)})),this.Hw+":"+n.join(",")},t}();x(),gt();var Vh=function(){function t(t){this.wA=[],this.wA=t}var n=t.prototype;return n.YN=function(){return this.wA},n.cv=function(t){this.wA.push(t)},n.qVt=function(){for(var t="",n=0,i=this.YN();n<i.length;n++){t+=i[n]._P()+"\n"}return t},n.Km=function(){this.wA.length=0},t}(),Hh=function(t){function n(n,i){var e;return e=t.call(this,[new xh,new Bh(8)])||this,i&&e.cv(new Fh("video/index.m3u8")),n&&e.cv(new Wh("audio/index.m3u8")),e}return _t(n,t),n}(Vh);x(),gt(),x(),gt(),x(),gt();var qh=function(t){return t.mit="HELLO",t.pit="HI_THERE",t.wit="INITIALIZE",t.yit="APPEND_INIT",t.Ait="APPEND_DATA",t.Sit="ACK",t.Tit="REMOVE",t.kit="DESTROY_SESSION",t}({});x(),gt(),x(),gt();var Xh,jh=new Array(256);for(Xh=0;Xh<256;Xh+=1)jh[Xh]=(Xh<16?"0":"")+Xh.toString(16);function Yh(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var n=16*y.random()|0;return("x"===t?n:3&n|8).toString(16)}))}x(),gt();var Kh=function(t){function n(n){var i;return(i=t.call(this,"append")||this).jk=n,i}return _t(n,t),n}(Io),Gh=function(t){function n(){var n;return(n=t.apply(this,arguments)||this).Zxt=0,n.Zp=new E(0),n.tA=!1,n.av=!1,n}_t(n,t);var i=n.prototype;return i.W2=function(t,n){this.Zxt+=n,this.Zp=ru([this.Zp,t]),this._o(new Kh(t))},i.Ws=function(){this.YS||(this._o(new Io("close")),this.tA=!0)},Tt(n,[{key:"yI",get:function(){return this.Zxt}},{key:"jk",get:function(){return this.Zp}},{key:"YS",get:function(){return this.tA}},{key:"dv",get:function(){return this.av},set:function(t){this.av=t}}]),n}(Eo),$h="sync-seg-",Zh=function(){function t(t,n){this.lv=!1,this.wv=!1,this.o=$h+Yh(),this.gv=n?new Gh:void 0,this.kv=t?new Gh:void 0}return t.prototype.Ws=function(){this.gv&&this.gv.Ws(),this.kv&&this.kv.Ws()},Tt(t,[{key:"jv",get:function(){return this.lv},set:function(t){this.lv=t}},{key:"Ad",get:function(){return this.wv},set:function(t){this.wv=t}}]),t}();x(),gt();var Jh=1.1,Qh=function(t){function n(n,i,e){var r;return(r=t.call(this,[new xh,new Bh(8),new Mh(1),new Lh(0)])||this).tw=[],r.wbt=Yr(),r.rw=0,r.sw=function(t){if(t.tF>=en)for(;r.tw.length>0;)r.bw()},e&&r.cv(new Uh(e,"com.apple.streamingkeydelivery","1")),r.Bat=n,r.Lrt=i,r.Lrt.bn("remove",r.sw),r.kw=new zh(0),r.cv(r.kw),r}_t(n,t);var i=n.prototype;return i.LCt=function(){return this.Bat===Ph.mE?this.Lrt.tb:this.Bat===Ph.gE?this.Lrt.nb:void 0},i.Dat=function(t){return this.wbt.get(t)},i.Km=function(){this.tw.length=0,this.kw.fL=0,this.wbt.clear(),this.rw=0},i.YN=function(){return this.cb(),nn(t.prototype.YN.call(this)).concat(nn(this.tw))},i.cb=function(){for(var t=this.Lrt.ab(),n=0;n<t.length;n++){var i=t[n];if(!this.wbt.has(i.o)){var e=void 0;if(this.Bat===Ph.mE?(e=i.gv,i.Ad=!0):(e=i.kv,i.jv=!0),!e)return;this.wbt.set(i.o,e),e.dv&&this.tw.push(new Ch(i.o+"-init")),this.tw.push(new Dh(Jh,i.o)),this.rw+=Jh}}this.lb()},i.lb=function(){for(;this.rw>60;)this.bw()},i.bw=function(){var t=this.tw.shift();void 0!==t&&function(t){return t.Hw===Ah.rE}(t)&&(this.wbt.delete(t.sv),this.rw-=t.ev,this.kw.fL++)},n}(Vh);var ta=function(t){function n(n){var i;return(i=t.call(this,"remove")||this).tF=n,i}return _t(n,t),n}(Io),na=function(t){function n(n,i){var e;return(e=t.call(this)||this).tg=n,e.ng=i,e.ig=[],e.ug=[],e.sg=Yr(),e.lg=Yr(),e.bg=Yr(),e.mg=0,e}_t(n,t);var i=n.prototype;return i.ab=function(){return this.kg?(this.ig=this.ig.filter((function(t){return!(t.Ad&&t.jv)})),nn(this.ig).concat([this.kg],nn(this.ug))):[]},i.Z2=function(t){this.tm(t)},i.W2=function(t){this.tm(t),this.rm(t),this.om(t)},i.iT=function(t){this.tm(t),this.om(t)},i.Km=function(){var t;null==(t=this.kg)||t.Ws(),this.kg=void 0,this.ug.forEach((function(t){return t.Ws()})),this.ug.length=0,this.ig.length=0,this.bg=Yr(),this.mg=0},i.rm=function(t){var n=t.startPts,i=t.totalDuration;this.lg.set(t.mediaType,n+i)},i.sm=function(){if(this.kg){this.kg.Ws(),this.ig.push(this.kg);var t=this.ug.shift(),n=new Zh(this.tg,this.ng);t?(this.kg=t,this.ug.push(n)):this.kg=n}},i.am=function(t){if(this.kg){var n=!this.kg.kv||0===this.kg.kv.yI,i=!this.kg.gv||0===this.kg.gv.yI,e=this.kg.kv&&this.kg.kv.dv,r=this.kg.gv&&this.kg.gv.dv,o=i&&(n&&!(this.kg.jv||this.kg.Ad)||e),u=n&&(i&&!(this.kg.jv||this.kg.Ad)||r);(t===Ph.gE&&!u||t===Ph.mE&&!o)&&(this.sm(),this.sm())}},i.tm=function(t){var n=t.mediaType,i=t.kind,e=this.sg.get(n);if(void 0===e){if(i===qh.yit||i===qh.Ait){var r=[t];this.sg.set(n,r)}}else e.push(t)},i.om=function(t){var n=this.bm(t);for(var i=0;i<n.length;i++){var e=n[i];switch(e.kind){case qh.yit:this.km(e),this.bg=Yr(),this.mg=0;break;case qh.Tit:this.ip(e);break;case qh.Ait:this.up(e)}}},i.km=function(t){var n=t.mediaType;void 0===this.kg?(this.kg=new Zh(this.tg,this.ng),this.ug.push(new Zh(this.tg,this.ng))):this.am(n),n===Ph.mE?(this.ty=t.segment,this.kg.gv.dv=!0):n===Ph.gE&&(this.ny=t.segment,this.kg.kv.dv=!0)},i.up=function(t){var n,i,e=t.mediaType===Ph.gE,r=t.totalDuration,o=null!=(n=this.bg.get(t.mediaType))?n:0;e?(this.kg.kv.W2(t.segment,r),i=o+this.kg.kv.yI):(this.kg.gv.W2(t.segment,r),i=o+this.kg.gv.yI),i>=this.mg+Jh&&(this.bg.set(t.mediaType,i),this.mg+=Jh,this.sm())},i.ip=function(t){this.lg.set(t.mediaType,void 0),this.am(t.mediaType),this.ig.length=0,this._o(new ta(t.endTime))},i.bm=function(t){var n=this;if(t.kind===qh.Tit)return this.hy(t);var i=[];return this.sg.forEach((function(t){if(t&&t.length>0){var e=rn(t,(function(t){return t.kind===qh.Tit}));-1===e&&(e=t.length);for(var r=t.slice(0,e),o=0;o<r.length;o++){var u=r[o];if(!fn(i,u)){var s,f=n.hy(u);if(f.length>0)(s=i).push.apply(s,nn(f));else if(u.kind===qh.Ait)break}}}})),i},i.hy=function(t){var n=this.sg.get(t.mediaType),i=function(t){return t===Ph.mE?Ph.gE:Ph.mE}(t.mediaType);if(!(i===Ph.mE?this.ng:this.tg))return n.splice(0,n.indexOf(t)+1);if(t.kind===qh.yit)return[];var e=this.lg.get(i);if(void 0===e)return[];if(t.kind===qh.Tit){var r=this.by(i);if(r.length>0){var o=n.splice(0,n.indexOf(t));return n.splice(0,1),nn(o).concat(nn(r),[t])}return[]}if(t.startPts<=e){var u=n.splice(0,n.indexOf(t));n.splice(0,1);var s=this.my(t,u,i);return nn(u).concat(nn(s),[t])}return[]},i.my=function(t,n,i){var e=this.sg.get(i);if(!e)return[];var r=t.startPts+t.totalDuration,o=rn(e,(function(t){return t.kind===qh.Tit})),u=o-1;-1===o&&(u=e.length-1);for(var s=u+1,f=0;f<=u&&s===u+1;f++){var c=e[f];c.kind===qh.Ait&&c.startPts>r&&(s=f)}var h=-1;return-1!==rn(n,(function(t){return t.kind===qh.yit}))&&(h=rn(e,(function(t){return t.kind===qh.yit}))),h>s&&(s=h+1),s>0?(e[s-1].kind===qh.yit&&(s-=1),e.splice(0,s)):[]},i.by=function(t){var n=this.sg.get(t);if(n){var i=rn(n,(function(t){return t.kind===qh.Tit}));if(i>=0)return n.splice(0,i+1)}return[]},i.ky=function(){var t="[MEDIABUFFER] endPTS: ";this.lg.forEach((function(n,i){t=t.concat(i+" = "+n+" ")})),Wt.nw(t)},i.OS=function(t,n){var i=t+": [";null==n||n.forEach((function(t){i=i.concat(" "+t.kind+"("+t.mediaType+")")})),i=i.concat(" ]"),Wt.nw(i)},Tt(n,[{key:"nb",get:function(){var t;return null==(t=this.ny)?void 0:t.slice()}},{key:"tb",get:function(){var t;return null==(t=this.ty)?void 0:t.slice()}}]),n}(Eo);var ia=function(){function t(t,n){var i=t.some((function(t){return t.match("audio")})),e=t.some((function(t){return t.match("video")}));this.AS=new na(i,e),this.BS=new Hh(i,e),i&&(this.RT=new Qh(Ph.gE,this.AS,n)),e&&(this.IE=new Qh(Ph.mE,this.AS,n))}var n=t.prototype;return n.ME=function(t){var n,i,e=ea(t);return e===Ph.mE?null==(n=this.IE)?void 0:n.LCt():e===Ph.gE?null==(i=this.RT)?void 0:i.LCt():void 0},n.Dat=function(t){var n,i,e=t.split("/")[1],r=ea(t);return r===Ph.mE?null==(n=this.IE)?void 0:n.Dat(e):r===Ph.gE?null==(i=this.RT)?void 0:i.Dat(e):void 0},n.Z2=function(t){this.AS.Z2(t)},n.W2=function(t){this.AS.W2(t)},n.qlt=function(t){this.AS.iT(t)},n.Km=function(){var t,n;this.AS.Km(),this.BS.Km(),null==(t=this.RT)||t.Km(),null==(n=this.IE)||n.Km()},Tt(t,[{key:"tk",get:function(){return this.BS}},{key:"ik",get:function(){return this.RT}},{key:"uk",get:function(){return this.IE}}]),t}();function ea(t){return t.match(/video/)?Ph.mE:Ph.gE}var ra=function(){function t(t,n){var i=this;this.sk=t,this.ak=n,this.hut=void 0,this.uqt=$t((function(t){var n,e;return Zt(this,(function(r){switch((n=t.data).kind){case qh.wit:i.hut=new ia(n.mediaBufferConfigs,n.fairPlaySdkUri);break;case qh.yit:i.hut.Z2(n);break;case qh.Ait:i.hut.W2(n);break;case qh.Tit:i.hut.qlt(n)}return e={kind:qh.Sit},i.sk.postMessage(e),[2]}))})),this.sk.onmessage=this.uqt}var n=t.prototype;return n.qVt=function(t){return"master.m3u8"===t?this.hut.tk:"video/index.m3u8"===t?this.hut.uk:"audio/index.m3u8"===t?this.hut.ik:void 0},n.mk=function(t){if(t.match(/m3u8/)){var n,i=null==(n=this.qVt(t))?void 0:n.qVt();return new Response(i,{headers:{"Content-Type":"application/x-mpegurl; charset=utf-8"}})}if(t.match($h)){var e={"Content-Type":t.match(/video/)?"video/mp4":"audio/mp4"};if(t.match(/init/)){var r,o=null==(r=this.hut)?void 0:r.ME(t);return new Response(o,{headers:e})}var u=this.Cat(t);if(!u)return new Response(void 0,{status:404,statusText:"Not Found"});var s=function(t){var n,i=function(t){n.enqueue(t.jk)},e=function(){n.close(),t.vn("append",i),t.vn("close",e)};return new self.ReadableStream({start:function(r){(n=r).enqueue(t.jk),t.YS?n.close():(t.bn("append",i),t.bn("close",e))},cancel:function(){t.vn("append",i),t.vn("close",e)}})}(u);return new Response(s,{headers:e})}return new Response(void 0,{status:404,statusText:"Not Found"})},n.Cat=function(t){return this.hut.Dat(t)},n.close=function(){var t;this.sk.close(),null==(t=this.hut)||t.Km()},t}(),oa=function(){function t(){var t=this;this.f9=Yr(),this.uqt=function(n){var i=n.data;if(i.kind===qh.mit){t.kk().catch(Yt);var e=i.port,r=Yh(),o=new ra(e,n.source.id);t.f9.set(r,o);var u=function(n){n.data.kind===qh.kit&&(t.TR(r),e.removeEventListener("message",u))};e.addEventListener("message",u);var s={kind:qh.pit,sessionId:r};e.postMessage(s)}},this.CR=function(n){if(lo(n.request.url,"https://theo.proxy")){var i=new URL(n.request.url).pathname.split("/"),e=i[1],r=i.slice(2).join("/"),o=t.f9.get(e);if(void 0===o){var u=new Response(void 0,{headers:{message:"Given session ["+e+"] not found."},status:404,statusText:"Not Found"});return void n.respondWith(u)}if(void 0===r){var s=new Response(void 0,{headers:{message:"No resource ["+r+"] provided."},status:404,statusText:"Not Found"});return void n.respondWith(s)}var f=o.mk(r);n.respondWith(f)}}}var n=t.prototype;return n.pr=function(t){this.Wzt=t,t.addEventListener("message",this.uqt),t.addEventListener("fetch",this.CR)},n.TR=function(t){var n=this.f9.get(t);n&&n.close(),this.f9.delete(t)},n.kk=function(){var t=this;return $t((function(){var n,i;return Zt(this,(function(e){switch(e.label){case 0:return[4,t.Wzt.clients.matchAll()];case 1:return n=e.sent(),i=n.map((function(t){return t.id})),t.f9.forEach((function(n,e){fn(i,n.ak)||t.TR(e)})),[2]}}))}))()},t}();oa.BR=new oa;var ua=self;ua.addEventListener("install",(function(t){t.waitUntil(ua.skipWaiting())})),ua.addEventListener("activate",(function(t){t.waitUntil(ua.clients.claim())})),oa.BR.pr(ua)}("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof s?s:"undefined"!=typeof global?global:this);
|