@theoplayer/extended 10.9.0 → 10.10.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 +2 -2
- package/THEOplayer.chromeless.esm.js +2 -2
- package/THEOplayer.chromeless.js +3 -3
- package/THEOplayer.common.d.ts +11 -1
- package/THEOplayer.common.esm.js +3 -3
- package/THEOplayer.d.ts +2 -2
- 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,8 +24,8 @@
|
|
|
24
24
|
THEOplayer is based on patented technology developed by
|
|
25
25
|
THEO Technologies (https://www.theoplayer.com).
|
|
26
26
|
|
|
27
|
-
Version: 10.
|
|
28
|
-
Created: 2026-
|
|
27
|
+
Version: 10.10.0
|
|
28
|
+
Created: 2026-02-12T16:29:53.491Z
|
|
29
29
|
*/
|
|
30
|
-
!function(t){"use strict";var n,i,e,r,o,u,s,f,h,c=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,k=t.Uint8Array,I=(t.Worker,t.WorkerGlobalScope,t.XMLHttpRequest),E=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")):(h=0,n=function(t){return"hd"+t+"_"+ ++h},e=(i=function(t){return"hd"+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,i){return null!=i&&void 0!==n&&i[n.hasInstance]?!!i[n.hasInstance](t):t instanceof i}var M=D(function(){x(),pt()});function F(t){return t&&void 0!==n&&t.constructor===n?"symbol":typeof t}var L,U,z,W,V,H,q,X,j,Y,K,G,$,Z,J,Q,tt,nt,it,et=D(function(){x(),pt()});function rt(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 ot(t){return new this(function(n,i){if(!t||void 0===t.length)return i(new m((void 0===t?"undefined":F(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":F(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 ut(t){return Boolean(t&&void 0!==t.length)}function st(){}function ft(t){if(!B(this,ft))throw new m("Promises must be constructed via new");if("function"!=typeof t)throw new m("not a function");this.Va=0,this.ttn=!1,this.tTt=void 0,this.ntn=[],lt(t,this)}function ht(t,n){for(;3===t.Va;)t=t.tTt;0!==t.Va?(t.ttn=!0,ft.itn(function(){var i=1===t.Va?n.onFulfilled:n.onRejected;if(null!==i){var e;try{e=i(t.tTt)}catch(t){return void at(n.promise,t)}ct(n.promise,e)}else(1===t.Va?ct:at)(n.promise,t.tTt)})):t.ntn.push(n)}function ct(t,n){try{if(n===t)throw new m("A promise cannot be resolved with itself.");if(n&&("object"===(void 0===n?"undefined":F(n))||"function"==typeof n)){var i=n.then;if(B(n,ft))return t.Va=3,t.tTt=n,void vt(t);if("function"==typeof i)return void lt(function(t,n){return function(){t.apply(n,arguments)}}(i,n),t)}t.Va=1,t.tTt=n,vt(t)}catch(n){at(t,n)}}function at(t,n){t.Va=2,t.tTt=n,vt(t)}function vt(t){2===t.Va&&0===t.ntn.length&&ft.itn(function(){t.ttn||ft.rtn(t.tTt)});for(var n=0,i=t.ntn.length;n<i;n++)ht(t,t.ntn[n]);t.ntn=null}function dt(t,n,i){this.onFulfilled="function"==typeof t?t:null,this.onRejected="function"==typeof n?n:null,this.promise=i}function lt(t,n){var i=!1;try{t(function(t){i||(i=!0,ct(n,t))},function(t){i||(i=!0,at(n,t))})}catch(t){if(i)return;i=!0,at(n,t)}}function wt(t){return new G(K,{reason:t,promise:U.reject(t).catch(function(){}),cancelable:!0})}function bt(t){var n=new $(K,{detail:{reason:t},cancelable:!0});return p.defineProperty(n,"reason",{value:t}),n}function gt(t){var n=a.createEvent("CustomEvent");return n.initCustomEvent(K,!1,!0,{reason:t}),n}var mt=D(function(){var t,n,i,e;x(),pt(),M(),et(),L=d,ft.prototype.catch=function(t){return this.then(null,t)},ft.prototype.then=function(t,n){var i=new this.constructor(st);return ht(this,new dt(t,n,i)),i},ft.prototype.finally=rt,ft.all=function(t){return new ft(function(n,i){if(!ut(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":F(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])})},ft.allSettled=ot,ft.resolve=function(t){return t&&"object"===(void 0===t?"undefined":F(t))&&t.constructor===ft?t:new ft(function(n){n(t)})},ft.reject=function(t){return new ft(function(n,i){i(t)})},ft.race=function(t){return new ft(function(n,i){if(!ut(t))return i(new m("Promise.race accepts an array"));for(var e=0,r=t.length;e<r;e++)ft.resolve(t[e]).then(n,i)})},ft.itn="function"==typeof setImmediate&&function(t){setImmediate(t)}||function(t){L(t,0)},ft.rtn=function(t){"undefined"!=typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",t)},U=function(){var t=self.Promise;if(void 0!==t)try{if(-1!==t.toString().indexOf("[native code]"))return t}catch(t){}}(),z=v?v.userAgent:"",W=z.match(/Firefox\/([0-9]+)/i),V=null!=W,H=W?Number(W[1]):0,q=z.match(/(Version)\/((\d+)\.(\d+)(?:\.(\d+))?).*Safari/),X=null!=q,j=q?Number(q[3]):0,Y=function(){function t(t){this.Hb=0,this.Tf=0,this.Lp=[],this.etn=t}return t.prototype.stn=function(t){var n=this.length();this.utn(n+1);var i=this.Tf+n&this.etn-1;this.Lp[i]=t,this.Hb=n+1},t.prototype.push=function(t){var n=this.length()+1;if(this.etn<n)this.stn(t);else{var i=this.Tf+n-1,e=this.etn-1;this.Lp[i&e]=t,this.Hb=n}},t.prototype.shift=function(){var t=this.Tf,n=this.Lp[t];return this.Lp[t]=void 0,this.Tf=t+1&this.etn-1,this.Hb--,n},t.prototype.length=function(){return this.Hb},t.prototype.utn=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.Tf+this.Hb&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.Lp,0,n,i)},t}(),K="unhandledrejection",G=self.PromiseRejectionEvent,$=self.CustomEvent,Z=function(t){return Z=function(){try{var t=U.resolve(),n="error",i=new G(K,{reason:n,promise:t});return K===i.type&&n===i.reason}catch(t){}return!1}()?wt:function(){try{var t="error",n=new $(K,{detail:{reason:t}});return K===n.type&&t===n.detail.reason}catch(t){}return!1}()?bt:gt,Z(t)},Q=V&&H<60||X&&j<15,U&&!Q?(tt=U,function(){}):(tt=ft,nt=null!==(J=function(){var t=self.queueMicrotask;if("function"==typeof t)return function(n){return t(n)};var n=U;if(n&&"function"==typeof n.resolve){var i=n.resolve();return function(t){return i.then(t)}}}())&&void 0!==J?J:ft.itn,t=nt,n=new Y(16),i=!1,(it={v4:function(r){n.push(r),i||(i=!0,t(e))},iX:e=function(){for(;n.length()>0;)n.shift()();i=!1}}).iX,ft.itn=it.v4,ft.rtn=function(t){try{var n=Z(t);if(!self.dispatchEvent(n)||n.defaultPrevented)return}catch(t){}d(function(){throw new g("Unhandled promise rejection: ".concat(t))},0)})}),pt=D(function(){mt()}),yt=C(function(t,i){var r,o;x(),pt(),et(),r=t,o=function(t){var i="function"==typeof n&&"symbol"===F(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":F(t))&&null!==t||"function"==typeof t}function f(t){return t.slice()}function h(t,n,i,e,r){new k(t).set(new k(i,e,r),n)}function c(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 _=tt,S=tt.prototype.then,T=tt.resolve.bind(_),I=tt.reject.bind(_);function E(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 B=function(){function t(){this.ul=0,this.Af=0,this.Tf={Ef:[],Pf:void 0},this.Rf=this.Tf,this.ul=0,this.Af=0}return p.defineProperty(t.prototype,"length",{get:function(){return this.Af},enumerable:!0,configurable:!0}),t.prototype.push=function(t){var n=this.Rf,i=n;16383===n.Ef.length&&(i={Ef:[],Pf:void 0}),n.Ef.push(t),i!==n&&(this.Rf=i,n.Pf=i),++this.Af},t.prototype.shift=function(){var t=this.Tf,n=t,i=this.ul,e=i+1,r=t.Ef,o=r[i];return 16384===e&&(n=t.Pf,e=0),--this.Af,this.ul=e,t!==n&&(this.Tf=n),r[i]=void 0,o},t.prototype.forEach=function(t){for(var n=this.ul,i=this.Tf,e=i.Ef;!(n===e.length&&void 0===i.Pf||n===e.length&&(n=0,0===(e=(i=i.Pf).Ef).length));)t(e[n]),++n},t.prototype.peek=function(){var t=this.Tf,n=this.ul;return t.Ef[n]},t}();function M(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 L(t,n){t.If=!0,t.Cf=n,n.Df=t,"readable"===n.Va?V(t):"closed"===n.Va?function(t){V(t),X(t)}(t):H(t,n.Nf)}function U(t,n){return Zn(t.Cf,n)}function z(t){"readable"===t.Cf.Va?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.Cf.Df=void 0,t.Cf=void 0}function W(t){return new m("Cannot "+t+" a stream using a released reader")}function V(t){t.Bf=E(function(n,i){t.Mf=n,t.Lf=i})}function H(t,n){V(t),q(t,n)}function q(t,n){x(t.Bf),t.Lf(n),t.Mf=void 0,t.Lf=void 0}function X(t){t.Mf(void 0),t.Mf=void 0,t.Lf=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.If=n,i}function G(t){return E(function(n,i){var e={Of:n,Ff:i};t.Df.Uf.push(e)})}function $(t,n,i){var e=t.Df;e.Uf.shift().Of(M(n,i,e.If))}function Z(t){return t.Df.Uf.length}function J(t){var n=t.Df;return void 0!==n&&!!et(n)}var Q,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");L(this,t),this.Uf=new B}return p.defineProperty(t.prototype,"closed",{get:function(){return et(this)?this.Bf:O(ot("closed"))},enumerable:!0,configurable:!0}),t.prototype.cancel=function(t){return et(this)?void 0===this.Cf?O(W("cancel")):U(this,t):O(ot("cancel"))},t.prototype.read=function(){return et(this)?void 0===this.Cf?O(W("read from")):rt(this):O(ot("read"))},t.prototype.releaseLock=function(){if(!et(this))throw ot("releaseLock");if(void 0!==this.Cf){if(this.Uf.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,"Uf")}function rt(t){var n=t.Cf;return n.Vf=!0,"closed"===n.Va?R(M(void 0,!0,t.If)):"errored"===n.Va?O(n.Nf):n.Hf[Y]()}function ot(t){return new m("ReadableStreamDefaultReader.prototype."+t+" can only be used on a ReadableStreamDefaultReader")}"symbol"===F(i.asyncIterator)&&((Q={})[i.asyncIterator]=function(){return this},nt=Q,p.defineProperty(nt,i.asyncIterator,{enumerable:!1}));var ut={next:function(){if(!1===st(this))return O(ft("next"));var t=this.qf;return void 0===t.Cf?O(W("iterate")):C(rt(t),function(n){var i=n.done;return i&&z(t),M(n.value,i,!0)})},return:function(t){if(!1===st(this))return O(ft("next"));var n=this.qf;if(void 0===n.Cf)return O(W("finish iterating"));if(n.Uf.length>0)return O(new m("Tried to release a reader lock when that reader has pending read() calls un-settled"));if(!1===this.Wf){var i=U(n,t);return z(n),C(i,function(){return M(t,!0,!0)})}return z(n),R(M(t,!0,!0))}};function st(t){return!!s(t)&&!!p.prototype.hasOwnProperty.call(t,"qf")}function ft(t){return new m("ReadableStreamAsyncIterator."+t+" can only be used on a ReadableSteamAsyncIterator")}function ht(t){var n=t.zf.shift();return t.Gf-=n.size,t.Gf<0&&(t.Gf=0),n.value}function ct(t,n,i){if(!c(i=Number(i)))throw new RangeError("Size must be a finite, non-NaN, non-negative number.");t.zf.push({value:n,size:i}),t.Gf+=i}function at(t){t.zf=new B,t.Gf=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===kt(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.Va="writable",t.Nf=void 0,t.Xf=void 0,t.Qf=void 0,t.Kf=new B,t.Yf=void 0,t.Jf=void 0,t.Zf=void 0,t.$f=void 0,t.ev=!1}function gt(t){return!!s(t)&&!!p.prototype.hasOwnProperty.call(t,"Qf")}function mt(t){return void 0!==t.Xf}function pt(t,n){var i=t.Va;if("closed"===i||"errored"===i)return R(void 0);if(void 0!==t.$f)return t.$f.rv;var e=!1;"erroring"===i&&(e=!0,n=void 0);var r=E(function(i,r){t.$f={rv:void 0,Of:i,Ff:r,ov:n,hv:e}});return t.$f.rv=r,!1===e&&St(t,n),r}function yt(t){var n=t.Va;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=E(function(n,i){var e={Of:n,Ff:i};t.Jf=e}),e=t.Xf;return void 0!==e&&!0===t.ev&&"writable"===n&&Qt(e),function(t){ct(t,"close",0),Lt(t)}(t.Qf),i}function _t(t,n){"writable"!==t.Va?Tt(t):St(t,n)}function St(t,n){var i=t.Qf;t.Va="erroring",t.Nf=n;var e=t.Xf;void 0!==e&&At(e,n),!1===function(t){return void 0!==t.Yf||void 0!==t.Zf}(t)&&!0===i.uv&&Tt(t)}function Tt(t){t.Va="errored",t.Qf[dt]();var n=t.Nf;if(t.Kf.forEach(function(t){t.Ff(n)}),t.Kf=new B,void 0!==t.$f){var i=t.$f;if(t.$f=void 0,!0===i.hv)return i.Ff(n),void It(t);P(t.Qf[vt](i.ov),function(){i.Of(),It(t)},function(n){i.Ff(n),It(t)})}else It(t)}function kt(t){return void 0!==t.Jf||void 0!==t.Zf}function It(t){void 0!==t.Jf&&(t.Jf.Ff(t.Nf),t.Jf=void 0);var n=t.Xf;void 0!==n&&Yt(n,t.Nf)}function Et(t,n){var i=t.Xf;void 0!==i&&n!==t.ev&&(!0===n?function(t){Gt(t)}(i):Qt(i)),t.ev=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.fv=t,t.Xf=this;var n=t.Va;if("writable"===n)!1===kt(t)&&!0===t.ev?Gt(this):Zt(this),Xt(this);else if("erroring"===n)$t(this,t.Nf),Xt(this);else if("closed"===n)Zt(this),function(t){Xt(t),Kt(t)}(this);else{var i=t.Nf;$t(this,i),jt(this,i)}}return p.defineProperty(t.prototype,"closed",{get:function(){return!1===Ot(this)?O(Ht("closed")):this.Bf},enumerable:!0,configurable:!0}),p.defineProperty(t.prototype,"desiredSize",{get:function(){if(!1===Ot(this))throw Ht("desiredSize");if(void 0===this.fv)throw qt("desiredSize");return function(t){var n=t.fv,i=n.Va;return"errored"===i||"erroring"===i?null:"closed"===i?0:Ft(n.Qf)}(this)},enumerable:!0,configurable:!0}),p.defineProperty(t.prototype,"ready",{get:function(){return!1===Ot(this)?O(Ht("ready")):this.vv},enumerable:!0,configurable:!0}),t.prototype.abort=function(t){return!1===Ot(this)?O(Ht("abort")):void 0===this.fv?O(qt("abort")):function(t,n){var i=t.fv;return pt(i,n)}(this,t)},t.prototype.close=function(){if(!1===Ot(this))return O(Ht("close"));var t=this.fv;return void 0===t?O(qt("close")):!0===kt(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.fv&&Dt(this)},t.prototype.write=function(t){return!1===Ot(this)?O(Ht("write")):void 0===this.fv?O(qt("write to")):Ct(this,t)},t}();function Ot(t){return!!s(t)&&!!p.prototype.hasOwnProperty.call(t,"fv")}function Nt(t){return yt(t.fv)}function Pt(t,n){"pending"===t._v?Yt(t,n):function(t,n){jt(t,n)}(t,n)}function At(t,n){"pending"===t.mv?Jt(t,n):function(t,n){$t(t,n)}(t,n)}function Dt(t){var n=t.fv,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.Xf=void 0,t.fv=void 0}function Ct(t,n){var i=t.fv,e=i.Qf,r=function(t,n){try{return t.pv(n)}catch(n){return Ut(t,n),1}}(e,n);if(i!==t.fv)return O(qt("write to"));var o=i.Va;if("errored"===o)return O(i.Nf);if(!0===kt(i)||"closed"===o)return O(new m("The stream is closing or closed and cannot be written to"));if("erroring"===o)return O(i.Nf);var u=function(t){return E(function(n,i){var e={Of:n,Ff:i};t.Kf.push(e)})}(i);return function(t,n,i){var e={chunk:n};try{ct(t,e,i)}catch(n){return void Ut(t,n)}var r=t.wv;!1===kt(r)&&"writable"===r.Va&&Et(r,zt(t)),Lt(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,"wv")}(this))throw new m("WritableStreamDefaultController.prototype.error can only be used on a WritableStreamDefaultController");"writable"===this.wv.Va&&Wt(this,t)},t.prototype[vt]=function(t){var n=this.yv(t);return Mt(this),n},t.prototype[dt]=function(){at(this)},t}();function Bt(t,n,i,e,r,o,u,s){n.wv=t,t.Qf=n,n.zf=void 0,n.Gf=void 0,at(n),n.uv=!1,n.pv=s,n.bv=u,n.Av=e,n.Sv=r,n.yv=o;var f=zt(n);Et(t,f),P(R(i()),function(){n.uv=!0,Lt(n)},function(i){n.uv=!0,_t(t,i)})}function Mt(t){t.Av=void 0,t.Sv=void 0,t.yv=void 0,t.pv=void 0}function Ft(t){return t.bv-t.Gf}function Lt(t){var n=t.wv;if(!1!==t.uv&&void 0===n.Yf)if("erroring"!==n.Va){if(0!==t.zf.length){var i=function(t){return t.zf.peek().value}(t);"close"===i?function(t){var n=t.wv;(function(t){t.Zf=t.Jf,t.Jf=void 0})(n),ht(t);var i=t.Sv();Mt(t),P(i,function(){!function(t){t.Zf.Of(void 0),t.Zf=void 0,"erroring"===t.Va&&(t.Nf=void 0,void 0!==t.$f&&(t.$f.Of(),t.$f=void 0)),t.Va="closed";var n=t.Xf;void 0!==n&&Kt(n)}(n)},function(t){!function(t,n){t.Zf.Ff(n),t.Zf=void 0,void 0!==t.$f&&(t.$f.Ff(n),t.$f=void 0),_t(t,n)}(n,t)})}(t):function(t,n){var i=t.wv;!function(t){t.Yf=t.Kf.shift()}(i);var e=t.Av(n);P(e,function(){!function(t){t.Yf.Of(void 0),t.Yf=void 0}(i);var n=i.Va;if(ht(t),!1===kt(i)&&"writable"===n){var e=zt(t);Et(i,e)}Lt(t)},function(n){"writable"===i.Va&&Mt(t),function(t,n){t.Yf.Ff(n),t.Yf=void 0,_t(t,n)}(i,n)})}(t,i.chunk)}}else Tt(n)}function Ut(t,n){"writable"===t.wv.Va&&Wt(t,n)}function zt(t){return Ft(t)<=0}function Wt(t,n){var i=t.wv;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.Bf=E(function(n,i){t.Mf=n,t.Lf=i,t._v="pending"})}function jt(t,n){Xt(t),Yt(t,n)}function Yt(t,n){x(t.Bf),t.Lf(n),t.Mf=void 0,t.Lf=void 0,t._v="rejected"}function Kt(t){t.Mf(void 0),t.Mf=void 0,t.Lf=void 0,t._v="resolved"}function Gt(t){t.vv=E(function(n,i){t.Tv=n,t.Ev=i}),t.mv="pending"}function $t(t,n){Gt(t),Jt(t,n)}function Zt(t){Gt(t),Qt(t)}function Jt(t,n){x(t.vv),t.Ev(n),t.Tv=void 0,t.Ev=void 0,t.mv="rejected"}function Qt(t){t.Tv(void 0),t.Tv=void 0,t.Ev=void 0,t.mv="fulfilled"}function tn(t){if("object"!==(void 0===t?"undefined":F(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":F(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.Vf=!0;var h=!1,c=R(void 0);return E(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.Va?pt(n,i):R(void 0)}),!1===o&&r.push(function(){return"readable"===t.Va?Zn(t,i):R(void 0)}),_(function(){return tt.all(r.map(function(t){return t()}))},!0,i)},!0===u.aborted)return void d();u.addEventListener("abort",d)}if(y(t,s.Bf,function(t){!1===e?_(function(){return pt(n,t)},!0,t):S(!0,t)}),y(n,f.Bf,function(n){!1===o?_(function(){return Zn(t,n)},!0,n):S(!0,n)}),l=t,w=s.Bf,b=function(){!1===i?_(function(){return function(t){var n=t.fv,i=n.Va;return!0===kt(n)||"closed"===i?R(void 0):"errored"===i?O(n.Nf):Nt(t)}(f)}):S()},"closed"===l.Va?b():A(w,b),!0===kt(n)||"closed"===n.Va){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=c;return N(c,function(){return t!==c?p():void 0})}function y(t,n,i){"errored"===t.Va?i(t.Nf):D(n,i)}function _(t,i,e){function r(){P(t(),function(){return T(i,e)},function(t){return T(!0,t)})}!0!==h&&(h=!0,"writable"===n.Va&&!1===kt(n)?A(p(),r):r())}function S(t,i){!0!==h&&(h=!0,"writable"===n.Va&&!1===kt(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(E(function(t,n){!function i(e){e?t():N(!0===h?R(!0):N(f.vv,function(){return N(rt(s),function(t){return!0===t.done||(c=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.xv(t);return cn(this),n},t.prototype[Y]=function(){var t=this.Pv;if(this.zf.length>0){var n=ht(this);return!0===this.Rv&&0===this.zf.length?(cn(this),Jn(t)):fn(this),R(M(n,!1,t.Df.If))}var i=G(t);return fn(this),i},t}();function sn(t){return!!s(t)&&!!p.prototype.hasOwnProperty.call(t,"Pv")}function fn(t){!1!==hn(t)&&(!0!==t.Iv?(t.Iv=!0,P(t.Cv(),function(){t.Iv=!1,!0===t.Dv&&(t.Dv=!1,fn(t))},function(n){dn(t,n)})):t.Dv=!0)}function hn(t){var n=t.Pv;return!1!==wn(t)&&!1!==t.uv&&(!0===$n(n)&&Z(n)>0||ln(t)>0)}function cn(t){t.Cv=void 0,t.xv=void 0,t.pv=void 0}function an(t){var n=t.Pv;t.Rv=!0,0===t.zf.length&&(cn(t),Jn(n))}function vn(t,n){var i=t.Pv;if(!0===$n(i)&&Z(i)>0)$(i,n,!1);else{var e=void 0;try{e=t.pv(n)}catch(n){throw dn(t,n),n}try{ct(t,n,e)}catch(n){throw dn(t,n),n}}fn(t)}function dn(t,n){var i=t.Pv;"readable"===i.Va&&(at(t),cn(t),Qn(i,n))}function ln(t){var n=t.Pv.Va;return"errored"===n?null:"closed"===n?0:t.bv-t.Gf}function wn(t){var n=t.Pv.Va;return!1===t.Rv&&"readable"===n}function bn(t,n,i,e,r,o,u){n.Pv=t,n.zf=void 0,n.Gf=void 0,at(n),n.uv=!1,n.Rv=!1,n.Dv=!1,n.Iv=!1,n.pv=u,n.bv=o,n.Cv=e,n.xv=r,t.Hf=n,P(R(i()),function(){n.uv=!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 Ln("view");return this.Hu},enumerable:!0,configurable:!0}),t.prototype.respond=function(t){if(!1===Sn(this))throw Ln("respond");if(void 0===this.Nv)throw new m("This BYOB request has been invalidated");this.Hu.buffer,function(t,n){if(!1===c(n=Number(n)))throw new RangeError("bytesWritten must be a finite");Dn(t,n)}(this.Nv,t)},t.prototype.respondWithNewView=function(t){if(!1===Sn(this))throw Ln("respond");if(void 0===this.Nv)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.Bv.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.Nv,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 Un("byobRequest");if(void 0===this.Mv&&this.Bv.length>0){var t=this.Bv.peek(),n=new k(t.buffer,t.byteOffset+t.bytesFilled,t.byteLength-t.bytesFilled),i=p.create(pn.prototype);!function(t,n,i){t.Nv=n,t.Hu=i}(i,this,n),this.Mv=i}return this.Mv},enumerable:!0,configurable:!0}),p.defineProperty(t.prototype,"desiredSize",{get:function(){if(!1===_n(this))throw Un("desiredSize");return Mn(this)},enumerable:!0,configurable:!0}),t.prototype.close=function(){if(!1===_n(this))throw Un("close");if(!0===this.Rv)throw new m("The stream has already been closed; do not close it again!");var t=this.Lv.Va;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.Lv;if(t.Gf>0)t.Rv=!0;else{if(t.Bv.length>0&&t.Bv.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 Un("enqueue");if(!0===this.Rv)throw new m("stream is closed or draining");var n=this.Lv.Va;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.Lv,e=n.buffer,r=n.byteOffset,o=n.byteLength,u=e;!0===J(i)?0===Z(i)?En(t,u,r,o):$(i,new k(u,r,o),!1):!0===Vn(i)?(En(t,u,r,o),An(t)):En(t,u,r,o),Tn(t)}(this,t)},t.prototype.error=function(t){if(!1===_n(this))throw Un("error");Bn(this,t)},t.prototype[j]=function(t){this.Bv.length>0&&(this.Bv.peek().bytesFilled=0),at(this);var n=this.xv(t);return xn(this),n},t.prototype[Y]=function(){var t=this.Lv;if(this.Gf>0){var n=this.zf.shift();this.Gf-=n.byteLength,Nn(this);var i=void 0;try{i=new k(n.buffer,n.byteOffset,n.byteLength)}catch(t){return O(t)}return R(M(i,!1,t.Df.If))}var e=this.Ov;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:k,readerType:"default"};this.Bv.push(o)}var u=G(t);return Tn(this),u},t}();function _n(t){return!!s(t)&&!!p.prototype.hasOwnProperty.call(t,"Lv")}function Sn(t){return!!s(t)&&!!p.prototype.hasOwnProperty.call(t,"Nv")}function Tn(t){var n=function(t){var n=t.Lv;if("readable"!==n.Va)return!1;if(!0===t.Rv)return!1;if(!1===t.uv)return!1;if(!0===J(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.Iv?(t.Iv=!0,P(t.Cv(),function(){t.Iv=!1,!0===t.Dv&&(t.Dv=!1,Tn(t))},function(n){Bn(t,n)})):t.Dv=!0)}function kn(t,n){var i=!1;"closed"===t.Va&&(i=!0);var e=In(n);"default"===n.readerType?$(t,e,i):function(t,n,i){var e=t.Df,r=e.Fv.shift();r.Of(M(n,i,e.If))}(t,e,i)}function In(t){var n=t.bytesFilled,i=t.elementSize;return new t.ctor(t.buffer,t.byteOffset,n/i)}function En(t,n,i,e){t.zf.push({buffer:n,byteOffset:i,byteLength:e}),t.Gf+=e}function Rn(t,n){var i=n.elementSize,e=n.bytesFilled-n.bytesFilled%i,r=y.min(t.Gf,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 c=t.zf;s>0;){var a=c.peek(),v=y.min(s,a.byteLength),d=n.byteOffset+n.bytesFilled;h(n.buffer,d,a.buffer,a.byteOffset,v),a.byteLength===v?c.shift():(a.byteOffset+=v,a.byteLength-=v),t.Gf-=v,On(t,v,n),s-=v}return f}function On(t,n,i){Pn(t),i.bytesFilled+=n}function Nn(t){0===t.Gf&&!0===t.Rv?(xn(t),Jn(t.Lv)):Tn(t)}function Pn(t){void 0!==t.Mv&&(t.Mv.Nv=void 0,t.Mv.Hu=void 0,t.Mv=void 0)}function An(t){for(;t.Bv.length>0;){if(0===t.Gf)return;var n=t.Bv.peek();!0===Rn(t,n)&&(Cn(t),kn(t.Lv,n))}}function Dn(t,n){var i=t.Bv.peek();if("closed"===t.Lv.Va){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.Lv;if(!0===Vn(i))for(;Wn(i)>0;)kn(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);En(t,o,0,o.byteLength)}i.buffer=i.buffer,i.bytesFilled-=e,kn(t.Lv,i),An(t)}}(t,n,i);Tn(t)}function Cn(t){var n=t.Bv.shift();return Pn(t),n}function xn(t){t.Cv=void 0,t.xv=void 0}function Bn(t,n){var i=t.Lv;"readable"===i.Va&&(function(t){Pn(t),t.Bv=new B}(t),at(t),xn(t),Qn(i,n))}function Mn(t){var n=t.Lv.Va;return"errored"===n?null:"closed"===n?0:t.bv-t.Gf}function Fn(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.Lv=t,n.Dv=!1,n.Iv=!1,n.Mv=void 0,n.zf=n.Gf=void 0,at(n),n.Rv=!1,n.uv=!1,n.bv=w(o),n.Cv=e,n.xv=r,n.Ov=u,n.Bv=new B,t.Hf=n,P(R(i()),function(){n.uv=!0,Tn(n)},function(t){Bn(n,t)})}(t,e,function(){return d(n,"start",[e])},r,o,i,u)}function Ln(t){return new m("ReadableStreamBYOBRequest.prototype."+t+" can only be used on a ReadableStreamBYOBRequest")}function Un(t){return new m("ReadableByteStreamController.prototype."+t+" can only be used on a ReadableByteStreamController")}function zn(t){return E(function(n,i){var e={Of:n,Ff:i};t.Df.Fv.push(e)})}function Wn(t){return t.Df.Fv.length}function Vn(t){var n=t.Df;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.Hf))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");L(this,t),this.Fv=new B}return p.defineProperty(t.prototype,"closed",{get:function(){return qn(this)?this.Bf:O(Xn("closed"))},enumerable:!0,configurable:!0}),t.prototype.cancel=function(t){return qn(this)?void 0===this.Cf?O(W("cancel")):U(this,t):O(Xn("cancel"))},t.prototype.read=function(t){return qn(this)?void 0===this.Cf?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.Cf;return i.Vf=!0,"errored"===i.Va?O(i.Nf):function(t,n){var i=t.Lv,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.Bv.length>0)return t.Bv.push(o),zn(i);if("closed"===i.Va)return R(M(new r(o.buffer,o.byteOffset,0),!0,i.Df.If));if(t.Gf>0){if(!0===Rn(t,o)){var u=In(o);return Nn(t),R(M(u,!1,i.Df.If))}if(!0===t.Rv){var s=new m("Insufficient bytes to fill elements in the given buffer");return Bn(t,s),O(s)}}t.Bv.push(o);var f=zn(i);return Tn(t),f}(i.Hf,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.Cf){if(this.Fv.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,"Fv")}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),Fn(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.If=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){var n,i,e,r,o,u=K(t),s=!1,h=!1,c=!1,a=E(function(t){o=t});function v(){return!0===s||(s=!0,x(C(rt(u),function(t){if(s=!1,!0===t.done)return!1===h&&an(e.Hf),void(!1===c&&an(r.Hf));var n=t.value,i=n,o=n;!1===h&&vn(e.Hf,i),!1===c&&vn(r.Hf,o)}))),R(void 0)}function d(){}return e=Yn(d,v,function(e){if(h=!0,n=e,!0===c){var r=f([n,i]),u=Zn(t,r);o(u)}return a}),r=Yn(d,v,function(e){if(c=!0,i=e,!0===h){var r=f([n,i]),u=Zn(t,r);o(u)}return a}),D(u.Bf,function(t){dn(e.Hf,t),dn(r.Hf,t)}),[e,r]}(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.qf=i,e.Wf=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.Va="readable",t.Df=void 0,t.Nf=void 0,t.Vf=!1}function Gn(t){return!!s(t)&&!!p.prototype.hasOwnProperty.call(t,"Hf")}function $n(t){return void 0!==t.Df}function Zn(t,n){return t.Vf=!0,"closed"===t.Va?R(void 0):"errored"===t.Va?O(t.Nf):(Jn(t),C(t.Hf[j](n),r))}function Jn(t){t.Va="closed";var n=t.Df;void 0!==n&&(et(n)&&(n.Uf.forEach(function(t){t.Of(M(void 0,!0,n.If))}),n.Uf=new B),X(n))}function Qn(t,n){t.Va="errored",t.Nf=n;var i=t.Df;void 0!==i&&(et(i)?(i.Uf.forEach(function(t){t.Ff(n)}),i.Uf=new B):(i.Fv.forEach(function(t){t.Ff(n)}),i.Fv=new B),q(i,n))}function ti(t){return new m("ReadableStream.prototype."+t+" can only be used on a ReadableStream")}"symbol"===F(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,h=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.Uv;return!0===t.ev?C(t.Vv,function(){var e=t.Hv;if("erroring"===e.Va)throw e.Nf;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 h(){return function(t){var n=t.qv,i=t.Uv,e=i.Wv();return ci(i),C(e,function(){if("errored"===n.Va)throw n.Nf;var t=n.Hf;!0===wn(t)&&an(t)},function(i){throw oi(t,i),n.Nf})}(t)}function c(){return function(t){return si(t,!1),t.Vv}(t)}function a(n){return ui(t,n),R(void 0)}t.Hv=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,h,f,i,e),t.qv=Yn(u,c,a,r,o),t.ev=void 0,t.Vv=void 0,t.zv=void 0,si(t,!0),t.Uv=void 0}(this,E(function(t){f=t}),r,s,u,h),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.Gv=t,t.Uv=n,n.Xv=i,n.Wv=e}(t,i,e,o)}(this,t);var c=d(t,"start",[this.Uv]);f(c)}return p.defineProperty(t.prototype,"readable",{get:function(){if(!1===ri(this))throw li("readable");return this.qv},enumerable:!0,configurable:!0}),p.defineProperty(t.prototype,"writable",{get:function(){if(!1===ri(this))throw li("writable");return this.Hv},enumerable:!0,configurable:!0}),t}();function ri(t){return!!s(t)&&!!p.prototype.hasOwnProperty.call(t,"Uv")}function oi(t,n){dn(t.qv.Hf,n),ui(t,n)}function ui(t,n){ci(t.Uv),Ut(t.Hv.Qf,n),!0===t.ev&&si(t,!1)}function si(t,n){void 0!==t.Vv&&t.zv(),t.Vv=E(function(n){t.zv=n}),t.ev=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===hi(this))throw di("desiredSize");return ln(this.Gv.qv.Hf)},enumerable:!0,configurable:!0}),t.prototype.enqueue=function(t){if(!1===hi(this))throw di("enqueue");ai(this,t)},t.prototype.error=function(t){if(!1===hi(this))throw di("error");!function(t,n){oi(t.Gv,n)}(this,t)},t.prototype.terminate=function(){if(!1===hi(this))throw di("terminate");!function(t){var n=t.Gv,i=n.qv.Hf;!0===wn(i)&&an(i);var e=new m("TransformStream terminated");ui(n,e)}(this)},t}();function hi(t){return!!s(t)&&!!p.prototype.hasOwnProperty.call(t,"Gv")}function ci(t){t.Xv=void 0,t.Wv=void 0}function ai(t,n){var i=t.Gv,e=i.qv.Hf;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.qv.Nf}var r=function(t){return!0!==hn(t)}(e);r!==i.ev&&si(i,!0)}function vi(t,n){return C(t.Xv(n),void 0,function(n){throw oi(t.Gv,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":F(t))&&void 0!==i?o(t):"function"==typeof define&&define.amd?define(["exports"],o):o((r=r||self).WebStreamsPolyfill={})}),_t=C(function(t){function n(){var t=yt();return n=function(){return t},t}x(),pt(),p.defineProperty(t,"__esModule",{value:!0}),function(t,n){for(var i in n)p.defineProperty(t,i,{enumerable:!0,get:p.getOwnPropertyDescriptor(n,i).get})}(t,{get ByteLengthQueuingStrategy(){return n().ByteLengthQueuingStrategy},get CountQueuingStrategy(){return n().CountQueuingStrategy},get ReadableStream(){return n().ReadableStream},get TransformStream(){return n().TransformStream},get WritableStream(){return n().WritableStream}})});function St(t,n){return(St=p.setPrototypeOf||function(t,n){return t.__proto__=n,t})(t,n)}function Tt(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&&St(t,n)}function kt(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 It(t,n,i){return n&&kt(t.prototype,n),i&&kt(t,i),t}function Et(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 Rt(t,i){var r=void 0!==n&&t[e]||t["@@iterator"];if(r)return(r=r.call(t)).next.bind(r);if(Array.isArray(t)||(r=function(t,n){if(t){if("string"==typeof t)return Et(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)?Et(t,n):void 0}}(t))||i&&t&&"number"==typeof t.length){r&&(t=r);var o=0;return function(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}}}throw new m("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}x(),pt(),x(),pt(),x(),pt(),x(),pt(),x(),pt(),x(),pt(),x(),pt(),x(),pt(),M(),x(),pt(),M(),x(),pt(),x(),pt(),x(),pt(),x(),pt(),x(),pt(),M(),x(),pt();var Ot,Nt=((Ot={}).u_="web",Ot.c_="android",Ot.d_="android-tv",Ot.l_="ios",Ot.f_="tvos",Ot.v_="chromecast",Ot.__="theoliveweb",Ot);var Pt=v?v.userAgent:"",At=Pt.match(/chrome\/([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)/i),Dt=Pt.match(/Edg\/([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)/i),Ct=Pt.match(/Android ([0-9\.]+)/i),xt=Pt.match(/Windows NT ([0-9\.]+)/i),Bt=Pt.match(/(Version)\/((\d+)\.(\d+)(?:\.(\d+))?).*Safari/),Mt=Pt.match(/Firefox\/([0-9\.]+)/i),Ft=Pt.match(/OPR\/(\d+\.\d+)/i),Lt=Pt.match(/Tizen ([0-9\.]+)/i),Ut=Pt.match(/(iPhone OS|iPad OS|iPod OS|Mac OS X) (\d+)_(\d+)_?(\d+)?/),zt=Pt.match(/HbbTV\/([0-9.]+)/i),Wt=Pt.match(/(AFT.*) Build/i),Vt=function(){function t(){this.g_=Boolean("ontouchstart"in self||self.DocumentTouch&&B(a,self.DocumentTouch)||v&&v.msMaxTouchPoints),this.p_=/(mac\sos\sx)\s?([\w\s\.]+\w)*/i.test(Pt)||/(macintosh|mac(?=_powerpc)\s)/i.test(Pt),this.y_=/Windows NT/i.test(Pt),this.A_=xt?S(xt[1]):0,this.T_=/Android/i.test(Pt),this.E_=Ct?S(Ct[1]):0,this.P_=/windows phone (8|8\.1)/i.test(Pt),this.I_=/iPhone/i.test(Pt),this.D_=/iPad/i.test(Pt),this.B_=this.p_&&this.g_&&!this.D_,this.L_=/iPod/i.test(Pt),this.G_=/Mobile Safari/i.test(Pt),this.q_=/EOS\d*STB/i.test(Pt),this.W_=/APP\d*STB/i.test(Pt),this.F_=(this.I_||this.D_||this.B_||this.L_)&&!this.P_,this.V_=Ut?S(Ut[2]):0,this.X_=this.P_||this.F_||this.T_||this.G_,this.Q_=/CriOS/i.test(Pt),this.Y_=Boolean(self.chrome&&/google/i.test(v.vendor))||this.Q_,this.og=this.Y_&&/Edg\//i.test(v.userAgent),this.ag=Dt?_(Dt[1],10):0,this.Rm=Boolean(/CriOS/i.test(Pt)),this.Pm=Boolean(self.chrome||/Chrome/i.test(Pt)||this.Rm),this.eg=At?_(At[1],10):0,this.fg=/SMART-TV.*Tizen/i.test(Pt),this._g=Lt?S(Lt[1]):0,this.Z_=this._g>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._g):void 0,this.pg=/webos|web0s/i.test(Pt),this.yg=/HbbTV/i.test(Pt),this.Sg=!!zt&&function(t){if(!t)return!1;var n=t.split(".").map(Number);return 3===n.length&&1===n[0]&&2===n[1]}(zt[1]),this.Eg=/AFT.* Build/i.test(Pt),this.xg=Wt?Wt[1]:void 0,this.Rg=/VIZIO/i.test(Pt),this.Cg=/Edge\/\d+/i.test(Pt),this.Ng=/Trident/i.test(Pt),this.Mg=this.Ng&&!self.ActiveXObject&&"ActiveXObject"in self,this.Og=/Vivaldi/i.test(Pt),this.Ug=/Firefox/i.test(Pt)&&!/Seamonkey/i.test(Pt),this.Hg=Mt?S(Mt[1]):0,this.Wg=/Safari/i.test(Pt)&&!/Chrome/i.test(Pt)&&!this.P_&&!this.fg,this.Gg=Bt?S(Bt[2]):0,this.jg=Boolean(Ft),this.Kg=Ft?S(Ft[1]):0,this.Jg=/CrKey/.test(Pt),this.$g=/\b(tv|smart-tv|smarttv|appletv|crkey|googletv|hbbtv|pov_tv|roku|viera|nettv|philipstv|vizio)\b/i.test(Pt),this.hm=/PlayStation 4/i.test(Pt),this.dm=/PlayStation 5/i.test(Pt),this.fm="web"===Nt.d_,this._m="web"===Nt.c_,this.pm=this._m||this.fm,this.ym="web"===Nt.l_,this.Sm="web"===Nt.f_,this.Em="web"===Nt.v_}return It(t,[{key:"tn",get:function(){return this.g_}},{key:"m_",get:function(){return this.p_}},{key:"w_",get:function(){return this.y_}},{key:"b_",get:function(){return this.A_}},{key:"S_",get:function(){return this.T_}},{key:"k_",get:function(){return this.E_}},{key:"x_",get:function(){return this.P_}},{key:"R_",get:function(){return this.I_}},{key:"C_",get:function(){return this.D_}},{key:"N_",get:function(){return this.B_}},{key:"M_",get:function(){return this.L_}},{key:"O_",get:function(){return this.F_}},{key:"U_",get:function(){return this.V_}},{key:"H_",get:function(){return this.q_||this.W_}},{key:"z_",get:function(){return this.G_}},{key:"te",get:function(){return this.X_}},{key:"j_",get:function(){return this.Q_}},{key:"K_",get:function(){return this.Y_}},{key:"J_",get:function(){var t;return null!=(t=this.Z_)?t:this.eg}},{key:"rg",get:function(){return this.og}},{key:"hg",get:function(){var t;return(null==(t=c.chrome)?void 0:t.webview)&&this.ag>0}},{key:"cg",get:function(){return this.ag}},{key:"dg",get:function(){return this.fg}},{key:"vg",get:function(){return this._g}},{key:"gg",get:function(){return this.pg}},{key:"wg",get:function(){return this.yg}},{key:"Ag",get:function(){return this.Sg}},{key:"Tg",get:function(){return this.Eg}},{key:"IS_FIRETV_AFTMM",get:function(){return"AFTMM"===this.xg}},{key:"Pg",get:function(){return this.Rg}},{key:"Ig",get:function(){return this.Cg}},{key:"Dg",get:function(){return this.Ng}},{key:"Bg",get:function(){return this.Mg}},{key:"Lg",get:function(){return this.Og}},{key:"Fg",get:function(){return this.Ug}},{key:"Vg",get:function(){return this.Hg}},{key:"qg",get:function(){return this.Wg}},{key:"zg",get:function(){return 0===this.Gg&&Ht.O_?this.V_:this.Gg}},{key:"Xg",get:function(){return this.jg}},{key:"Qg",get:function(){return this.Kg}},{key:"Yg",get:function(){return this.Jg}},{key:"Zg",get:function(){return this.$g}},{key:"im",get:function(){return!(!this.gg&&!this.dg)&&this.J_<=56}},{key:"nm",get:function(){return this.hm}},{key:"um",get:function(){return this.dm}},{key:"lm",get:function(){return this.fm}},{key:"vm",get:function(){return this._m}},{key:"gm",get:function(){return this.pm}},{key:"wm",get:function(){return this.ym}},{key:"Am",get:function(){return this.Sm}},{key:"Tm",get:function(){return this.Em}},{key:"xm",get:function(){return this.Pm}},{key:"IS_IOS_CHROME",get:function(){return this.Rm}}]),t}();Vt.Im=new Vt;var Ht=Vt.Im;x(),pt(),et();var qt={}.toString;function Xt(t){return null!=t}var jt,Yt=Array.isArray||function(t){return"[object Array]"===qt.call(t)};function Kt(t){return"object"===(void 0===t?"undefined":F(t))&&null!==t}function Gt(t){return"function"==typeof t}function $t(t){return Gt(t)||Kt(t)}function Zt(t){jt=t}x(),pt(),x(),pt();var Jt=function(){};function Qt(t){var n;return function(){return void 0!==t&&(n=t(),t=void 0),n}}function tn(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):tt.resolve(f).then(e,r)}function nn(t){return function(){var n=this,i=arguments;return new tt(function(e,r){var o=t.apply(n,i);function u(t){tn(o,e,r,u,s,"next",t)}function s(t){tn(o,e,r,u,s,"throw",t)}u(void 0)})}}function en(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=h(0),f.throw=h(1),f.return=h(2),"function"==typeof n&&(f[e]=function(){return this}),f;function h(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(),pt(),x(),pt(),x(),pt(),x(),pt();var rn="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(),pt(),x(),pt(),x(),pt(),x(),pt(),x(),pt(),x(),pt(),x(),pt();var on=9007199254740991,un=(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}),sn="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 fn(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 hn(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 cn(t,n){return-1!==t.indexOf(n)}function an(t){t.length=0}Array.prototype.flat,Array.prototype.flatMap;var vn=function(){function t(){this.Om=!1,this.Fm=!1,this.Um=[],this.Vm=[]}var n=t.prototype;return n.Lm=function(){if(!this.Om&&!this.Fm){this.Om=!0;for(var t,n=Rt(this.Um.slice());!(t=n()).done;){(0,t.value)()}this.Ku()}},n.Ku=function(){if(!this.Fm){this.Fm=!0;for(var t,n=Rt(this.Vm.slice());!(t=n()).done;){(0,t.value)()}an(this.Um),an(this.Vm)}},n.Hm=function(t){this.Fm||this.Um.push(t)},n.qm=function(t){this.Fm||fn(this.Um,t)},n.Wm=function(t){this.Fm||this.Vm.push(t)},n.zm=function(t){this.Fm||fn(this.Vm,t)},t}(),dn=function(){function t(){this.Xm=new vn}var n=t.prototype;return n.dd=function(){this.Xm.Lm()},n.Ku=function(){this.Xm.Ku()},n.jm=function(t){var n=this.Xm;if(!n.Om)if(t.Om)n.Lm();else if(!n.Fm&&!t.Fm){var i=function(){e(),n.Lm()},e=function(){t.qm(i),t.zm(e),n.qm(i),n.zm(e)};t.Hm(i),t.Wm(e),n.Hm(i),n.Wm(e)}},n.Qm=function(){var n=new t,i=new t,e=n.Gm,r=i.Gm,o=this.Xm,u=function(){e.Om&&r.Fm||r.Om&&e.Fm?o.Lm():e.Fm&&r.Fm&&o.Ku()};e.Hm(u),r.Hm(u),e.Wm(u),r.Wm(u),n.jm(o),i.jm(o);return o.Wm(function(){e.qm(u),r.qm(u),e.zm(u),r.zm(u)}),[n,i]},n[r]=function(){this.dd()},t.Km=function(n){for(var i,e=new t,r=Rt(n);!(i=r()).done;){var o=i.value;void 0!==o&&e.jm(o)}return e},It(t,[{key:"Gm",get:function(){return this.Xm}}]),t}();x(),pt(),M(),x(),pt();var ln=function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];g.apply(this,n)};(ln.prototype=p.create(g.prototype)).constructor=ln;var wn=function(t){function n(n,i){var e;return(e=t.call(this)||this).cause=void 0,e.message=n||"Unknown error",e.cause=i,g.captureStackTrace&&g.captureStackTrace(e,e.constructor),e}return Tt(n,t),It(n,[{key:"name",get:function(){return"BaseError"}}]),n}(ln),bn=function(t){function n(n,i){return t.call(this,n||"Aborted",i)||this}return Tt(n,t),It(n,[{key:"name",get:function(){return"AbortError"}}]),n}(wn);function gn(t){return B(t,g)&&"AbortError"===t.name}function mn(t,n){return n?new tt(function(i,e){if(n.Om)return t.catch(Jt),e(new bn);var r=function(){n.qm(r),e(new bn)};n.Hm(r),t.then(function(t){n.qm(r),i(t)},function(t){n.qm(r),e(t)})}):t}function pn(t,n){return nn(function(){var i,e;return en(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 tt.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 rn(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),tt.resolve().then(r);if(i.dispose){var o=i.dispose.call(i.value);if(i.async)return e|=2,tt.resolve(o).then(r,function(t){return n(t),r()})}else e|=1}catch(t){n(t)}if(1===e)return t.hasError?tt.reject(t.error):tt.resolve();if(t.hasError)throw t.error})()}(i),[7];case 5:return[2]}})})()}tt.resolve();function yn(t,n){return new tt(function(i,e){if(void 0!==n&&n.Om)e(new bn);else{var r=jt.Nm(function(){void 0!==n&&n.qm(o),i()},t),o=function(){jt.Dm(r),e(new bn)};void 0!==n&&n.Hm(o)}})}function _n(){return void 0!==a?a.createElement("video"):void 0}var Sn=Qt(_n);Qt(function(){return"undefined"!=typeof HTMLVideoElement&&B(Sn(),HTMLVideoElement)});x(),pt(),x(),pt(),x(),pt(),et();var Tn=null;try{Tn=new WebAssembly.Instance(new WebAssembly.Module(new k([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(Ot){}function kn(t,n,i){this.low=0|t,this.high=0|n,this.unsigned=!!i}function In(t){return!0===(t&&t.Jm)}function En(t){var n=y.clz32(t&-t);return t?31-n:n}kn.prototype.Jm,p.defineProperty(kn.prototype,"Jm",{value:!0}),kn.isLong=In;var Rn={},On={};function Nn(t,n){var i,e,r;return n?(r=0<=(t>>>=0)&&t<256)&&(e=On[t])?e:(i=An(t,0,!0),r&&(On[t]=i),i):(r=-128<=(t|=0)&&t<128)&&(e=Rn[t])?e:(i=An(t,t<0?-1:0,!1),r&&(Rn[t]=i),i)}function Pn(t,n){if(T(t))return n?zn:Un;if(n){if(t<0)return zn;if(t>=Mn)return Xn}else{if(t<=-Fn)return jn;if(t+1>=Fn)return qn}return t<0?Pn(-t,n).neg():An(t%Bn|0,t/Bn|0,n)}function An(t,n,i){return new kn(t,n,i)}kn.fromInt=Nn,kn.fromNumber=Pn,kn.fromBits=An;var Dn=y.pow;function Cn(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?zn: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 Cn(t.substring(1),n,i).neg();for(var r=Pn(Dn(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 h=Pn(Dn(i,s));o=o.mul(h).add(Pn(f))}else o=(o=o.mul(r)).add(Pn(f))}return o.unsigned=n,o}function xn(t,n){return"number"==typeof t?Pn(t,n):"string"==typeof t?Cn(t,n):An(t.low,t.high,"boolean"==typeof n?n:t.unsigned)}kn.fromString=Cn,kn.fromValue=xn;var Bn=4294967296,Mn=Bn*Bn,Fn=Mn/2,Ln=Nn(1<<24),Un=Nn(0);kn.ZERO=Un;var zn=Nn(0,!0);kn.UZERO=zn;var Wn=Nn(1);kn.ONE=Wn;var Vn=Nn(1,!0);kn.UONE=Vn;var Hn=Nn(-1);kn.NEG_ONE=Hn;var qn=An(-1,2147483647,!1);kn.MAX_VALUE=qn;var Xn=An(-1,-1,!0);kn.MAX_UNSIGNED_VALUE=Xn;var jn=An(0,-2147483648,!1);kn.MIN_VALUE=jn;var Yn=kn.prototype;Yn.toInt=function(){return this.unsigned?this.low>>>0:this.low},Yn.toNumber=function(){return this.unsigned?(this.high>>>0)*Bn+(this.low>>>0):this.high*Bn+(this.low>>>0)},Yn.toString=function(t){if((t=t||10)<2||36<t)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative()){if(this.eq(jn)){var n=Pn(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=Pn(Dn(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}},Yn.getHighBits=function(){return this.high},Yn.getHighBitsUnsigned=function(){return this.high>>>0},Yn.getLowBits=function(){return this.low},Yn.getLowBitsUnsigned=function(){return this.low>>>0},Yn.getNumBitsAbs=function(){if(this.isNegative())return this.eq(jn)?64:this.neg().getNumBitsAbs();for(var t=0!=this.high?this.high:this.low,n=31;n>0&&!(t&1<<n);n--);return 0!=this.high?n+33:n+1},Yn.isSafeInteger=function(){var t=this.high>>21;return!t||!this.unsigned&&(-1===t&&!(0===this.low&&-2097152===this.high))},Yn.isZero=function(){return 0===this.high&&0===this.low},Yn.eqz=Yn.isZero,Yn.isNegative=function(){return!this.unsigned&&this.high<0},Yn.isPositive=function(){return this.unsigned||this.high>=0},Yn.isOdd=function(){return!(1&~this.low)},Yn.isEven=function(){return!(1&this.low)},Yn.equals=function(t){return In(t)||(t=xn(t)),(this.unsigned===t.unsigned||this.high>>>31!=1||t.high>>>31!=1)&&(this.high===t.high&&this.low===t.low)},Yn.eq=Yn.equals,Yn.notEquals=function(t){return!this.eq(t)},Yn.neq=Yn.notEquals,Yn.ne=Yn.notEquals,Yn.lessThan=function(t){return this.comp(t)<0},Yn.lt=Yn.lessThan,Yn.lessThanOrEqual=function(t){return this.comp(t)<=0},Yn.lte=Yn.lessThanOrEqual,Yn.le=Yn.lessThanOrEqual,Yn.greaterThan=function(t){return this.comp(t)>0},Yn.gt=Yn.greaterThan,Yn.greaterThanOrEqual=function(t){return this.comp(t)>=0},Yn.gte=Yn.greaterThanOrEqual,Yn.ge=Yn.greaterThanOrEqual,Yn.compare=function(t){if(In(t)||(t=xn(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},Yn.comp=Yn.compare,Yn.negate=function(){return!this.unsigned&&this.eq(jn)?jn:this.not().add(Wn)},Yn.neg=Yn.negate,Yn.add=function(t){In(t)||(t=xn(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,h=0,c=0,a=0;return c+=(a+=r+(65535&t.low))>>>16,h+=(c+=e+s)>>>16,f+=(h+=i+u)>>>16,f+=n+o,An((c&=65535)<<16|(a&=65535),(f&=65535)<<16|(h&=65535),this.unsigned)},Yn.subtract=function(t){return In(t)||(t=xn(t)),this.add(t.neg())},Yn.sub=Yn.subtract,Yn.multiply=function(t){if(this.isZero())return this;if(In(t)||(t=xn(t)),Tn)return An(Tn.mul(this.low,this.high,t.low,t.high),Tn.get_high(),this.unsigned);if(t.isZero())return this.unsigned?zn:Un;if(this.eq(jn))return t.isOdd()?jn:Un;if(t.eq(jn))return this.isOdd()?jn: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 Pn(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,h=0,c=0,a=0,v=0;return a+=(v+=r*f)>>>16,c+=(a+=e*f)>>>16,a&=65535,c+=(a+=r*s)>>>16,h+=(c+=i*f)>>>16,c&=65535,h+=(c+=e*s)>>>16,c&=65535,h+=(c+=r*u)>>>16,h+=n*f+i*s+e*u+r*o,An((a&=65535)<<16|(v&=65535),(h&=65535)<<16|(c&=65535),this.unsigned)},Yn.mul=Yn.multiply,Yn.divide=function(t){if(In(t)||(t=xn(t)),t.isZero())throw g("division by zero");var n,i,e;if(Tn)return this.unsigned||-2147483648!==this.high||-1!==t.low||-1!==t.high?An((this.unsigned?Tn.div_u:Tn.div_s)(this.low,this.high,t.low,t.high),Tn.get_high(),this.unsigned):this;if(this.isZero())return this.unsigned?zn:Un;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return zn;if(t.gt(this.shru(1)))return Vn;e=zn}else{if(this.eq(jn))return t.eq(Wn)||t.eq(Hn)?jn:t.eq(jn)?Wn:(n=this.shr(1).div(t).shl(1)).eq(Un)?t.isNegative()?Wn:Hn:(i=this.sub(t.mul(n)),e=n.add(i.div(t)));if(t.eq(jn))return this.unsigned?zn: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:Dn(2,r-48),u=Pn(n),s=u.mul(t);s.isNegative()||s.gt(i);)s=(u=Pn(n-=o,this.unsigned)).mul(t);u.isZero()&&(u=Wn),e=e.add(u),i=i.sub(s)}return e},Yn.div=Yn.divide,Yn.modulo=function(t){return In(t)||(t=xn(t)),Tn?An((this.unsigned?Tn.rem_u:Tn.rem_s)(this.low,this.high,t.low,t.high),Tn.get_high(),this.unsigned):this.sub(this.div(t).mul(t))},Yn.mod=Yn.modulo,Yn.rem=Yn.modulo,Yn.not=function(){return An(~this.low,~this.high,this.unsigned)},Yn.countLeadingZeros=function(){return this.high?y.clz32(this.high):y.clz32(this.low)+32},Yn.clz=Yn.countLeadingZeros,Yn.countTrailingZeros=function(){return this.low?En(this.low):En(this.high)+32},Yn.ctz=Yn.countTrailingZeros,Yn.and=function(t){return In(t)||(t=xn(t)),An(this.low&t.low,this.high&t.high,this.unsigned)},Yn.or=function(t){return In(t)||(t=xn(t)),An(this.low|t.low,this.high|t.high,this.unsigned)},Yn.xor=function(t){return In(t)||(t=xn(t)),An(this.low^t.low,this.high^t.high,this.unsigned)},Yn.shiftLeft=function(t){return In(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?An(this.low<<t,this.high<<t|this.low>>>32-t,this.unsigned):An(0,this.low<<t-32,this.unsigned)},Yn.shl=Yn.shiftLeft,Yn.shiftRight=function(t){return In(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?An(this.low>>>t|this.high<<32-t,this.high>>t,this.unsigned):An(this.high>>t-32,this.high>=0?0:-1,this.unsigned)},Yn.shr=Yn.shiftRight,Yn.shiftRightUnsigned=function(t){return In(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?An(this.low>>>t|this.high<<32-t,this.high>>>t,this.unsigned):An(32===t?this.high:this.high>>>t-32,0,this.unsigned)},Yn.shru=Yn.shiftRightUnsigned,Yn.shr_u=Yn.shiftRightUnsigned,Yn.rotateLeft=function(t){var n;return In(t)&&(t=t.toInt()),0==(t&=63)?this:32===t?An(this.high,this.low,this.unsigned):t<32?(n=32-t,An(this.low<<t|this.high>>>n,this.high<<t|this.low>>>n,this.unsigned)):(n=32-(t-=32),An(this.high<<t|this.low>>>n,this.low<<t|this.high>>>n,this.unsigned))},Yn.rotl=Yn.rotateLeft,Yn.rotateRight=function(t){var n;return In(t)&&(t=t.toInt()),0==(t&=63)?this:32===t?An(this.high,this.low,this.unsigned):t<32?(n=32-t,An(this.high<<n|this.low>>>t,this.low<<n|this.high>>>t,this.unsigned)):(n=32-(t-=32),An(this.low<<n|this.high>>>t,this.high<<n|this.low>>>t,this.unsigned))},Yn.rotr=Yn.rotateRight,Yn.toSigned=function(){return this.unsigned?An(this.low,this.high,!1):this},Yn.toUnsigned=function(){return this.unsigned?this:An(this.low,this.high,!0)},Yn.toBytes=function(t){return t?this.toBytesLE():this.toBytesBE()},Yn.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]},Yn.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]},kn.fromBytes=function(t,n,i){return i?kn.fromBytesLE(t,n):kn.fromBytesBE(t,n)},kn.fromBytesLE=function(t,n){return new kn(t[0]|t[1]<<8|t[2]<<16|t[3]<<24,t[4]|t[5]<<8|t[6]<<16|t[7]<<24,n)},kn.fromBytesBE=function(t,n){return new kn(t[4]<<24|t[5]<<16|t[6]<<8|t[7],t[0]<<24|t[1]<<16|t[2]<<8|t[3],n)},"function"==typeof BigInt&&(kn.fromBigInt=function(t,n){return An(Number(BigInt.asIntN(32,t)),Number(BigInt.asIntN(32,t>>BigInt(32))),n)},kn.fromValue=function(t,n){return"bigint"===(void 0===t?"undefined":F(t))?kn.fromBigInt(t,n):xn(t,n)},Yn.toBigInt=function(){var t=BigInt(this.low>>>0);return BigInt(this.unsigned?this.high>>>0:this.high)<<BigInt(32)|t});var Kn=kn;function Gn(){return Date.now()||(new Date).getTime()}var $n=1/6,Zn=(Kn.fromNumber(on),Boolean("ontouchstart"in self||self.DocumentTouch&&B(a,self.DocumentTouch))||Boolean(v&&v.msMaxTouchPoints)),Jn=Sn(),Qn=Boolean(Jn&&Jn.webkitShowPlaybackTargetPicker),ti=function(){function t(){this.$m=void 0,this.xp=!1,this.tn=Zn,this.te=!1,this.Ym=!0}var n=t.prototype;return n.tp=function(){return 0},n.Ap=function(t,n){return!0},n.Sp=function(t){return t>=2*$n},It(t,[{key:"Zm",get:function(){return void 0===this.$m&&(this.$m=this.tp()),this.$m}},{key:"ep",get:function(){return Ht.S_?"android":Ht.m_?"macos":Ht.O_?"ios":Ht.w_?"windows":"other"}},{key:"sp",get:function(){return Ht.Zg?"tv":Ht.te?"mobile":"desktop"}},{key:"np",get:function(){return!Ht.Zg}},{key:"rp",get:function(){if(c.screen)return{width:c.screen.width*this.op,height:c.screen.height*this.op}}},{key:"op",get:function(){return c.devicePixelRatio||1}},{key:"hp",get:function(){return Qn}},{key:"ap",get:function(){return!1}},{key:"cp",get:function(){return!0}},{key:"dp",get:function(){return!!(Ht.qg||Ht.O_||Ht.hg)||!!Ht.Pg}},{key:"lp",get:function(){return Ht.Pg}},{key:"fp",get:function(){return!Ht.O_}},{key:"vp",get:function(){return!0}},{key:"_p",get:function(){return!0}},{key:"gp",get:function(){return!1}},{key:"mp",get:function(){}},{key:"pp",get:function(){return!0}},{key:"wp",get:function(){return!1}},{key:"yp",get:function(){return Ht.Pg}},{key:"bp",get:function(){return!1}},{key:"Tp",get:function(){return!1}},{key:"kp",get:function(){return!1}},{key:"Ep",get:function(){return!0}}]),t}(),ni=function(t){function n(){return t.call(this)||this}return Tt(n,t),n}(ti);x(),pt();var ii=function(t){function n(){return t.apply(this,arguments)||this}return Tt(n,t),n.prototype.Ap=function(t,n){if(t&&t.Pp&&n&&n.Pp){var i=ei(t.Pp,"mp4a.40.2")&&ei(n.Pp,"mp4a.40.5"),e=ei(t.Pp,"mp4a.40.5")&&ei(n.Pp,"mp4a.40.2"),r=ei(t.Pp,"mp4a.40.2")&&ei(n.Pp,"mp4a.40.34"),o=ei(t.Pp,"mp4a.40.34")&&ei(n.Pp,"mp4a.40.2"),u=ei(t.Pp,"mp4a.40.5")&&ei(n.Pp,"mp4a.40.34"),s=ei(t.Pp,"mp4a.40.34")&&ei(n.Pp,"mp4a.40.5");return!(i||e||r||o||u||s)}return!0},It(n,[{key:"mp",get:function(){if(Ht.m_)return 4096}}]),n}(ni);function ei(t,n){return t.indexOf(n)>-1}x(),pt();var ri=function(t){function n(){return t.apply(this,arguments)||this}return Tt(n,t),n.prototype.Sp=function(t){return t>=2},n}(ni);x(),pt();var oi=function(t){function n(){var n;return(n=t.call(this)||this).xp=Ht.zg>=11,n.Ym=Ht.qg&&!(Ht.O_&&Ht.zg<10),n}return Tt(n,t),It(n,[{key:"bp",get:function(){return Ht.zg<17}},{key:"Tp",get:function(){return!0}}]),n}(ni);x(),pt();var ui,si=function(t){function n(){return t.apply(this,arguments)||this}return Tt(n,t),It(n,[{key:"pp",get:function(){return!(Ht.J_>=133)}}]),n}(ni);x(),pt(),x(),pt(),x(),pt(),x(),pt(),x(),pt();var fi=function(){var t=_n();if(!t)return!1;var n=t.muted;return t.muted=!n,t.muted!==n}();!function(){if(Ht.N_)return!1;var t=_n();if(!t)return!1;var n=t.volume;t.volume=n/2+.1,t.volume}();var hi=function(t){function n(n){var i;return(i=t.call(this)||this).Rp=void 0,i.Rp=n,i.xp=i.Rp.xp,i.tn=i.Rp.tn,i.Ym=fi&&i.Rp.Ym,i}Tt(n,t);var i=n.prototype;return i.tp=function(){return this.Rp.Zm},i.Ap=function(t,n){return this.Rp.Ap(t,n)},i.Sp=function(t){return this.Rp.Sp(t)},It(n,[{key:"mp",get:function(){return this.Rp.mp}},{key:"pp",get:function(){return this.Rp.pp}},{key:"bp",get:function(){return this.Rp.bp}}]),n}(ti),ci=function(t){function n(n){var i;return(i=t.call(this,n)||this).xp=!0,i.te=!0,i}return Tt(n,t),It(n,[{key:"gp",get:function(){return Ht.O_}}]),n}(hi);x(),pt();var ai=function(t){function n(){return t.apply(this,arguments)||this}return Tt(n,t),n.prototype.tp=function(){return function(t){return t&&$t(c.ManagedMediaSource)?c.ManagedMediaSource:$t(c.MediaSource)?c.MediaSource:void 0}(!0)?t.prototype.tp.call(this):1},It(n,[{key:"gp",get:function(){return!0}}]),n}(ci);x(),pt();var vi=function(t){function n(){var n;return(n=t.apply(this,arguments)||this).Np=void 0,n}return Tt(n,t),n.prototype.Ap=function(n,i){return t.prototype.Ap.call(this,n,i)},It(n,[{key:"ap",get:function(){return Ht.vg<3}},{key:"cp",get:function(){return Ht.vg>=3}},{key:"rp",get:function(){var t=this;return c.tizen&&!this.Np&&c.tizen.systeminfo.getPropertyValue("DISPLAY",function(n){var i=n.resolutionWidth,e=n.resolutionHeight;1===i&&1===e||(t.Np={width:i,height:e})}),this.Np}},{key:"wp",get:function(){return Ht.vg<3}}]),n}(hi);x(),pt();var di=function(t){function n(){var n;return(n=t.apply(this,arguments)||this).Np=void 0,n}return Tt(n,t),It(n,[{key:"rp",get:function(){var t=this;return c.webOS&&!this.Np&&c.webOS.deviceInfo(function(n){t.Np={width:n.screenWidth,height:n.screenHeight}}),this.Np}},{key:"vp",get:function(){return!1}}]),n}(hi);x(),pt();var li=function(t){function n(){return t.apply(this,arguments)||this}return Tt(n,t),It(n,[{key:"gp",get:function(){return!0}},{key:"Tp",get:function(){return this.Rp.Tp}}]),n}(hi);x(),pt();var wi=function(t){function n(){return t.apply(this,arguments)||this}return Tt(n,t),It(n,[{key:"kp",get:function(){return Ht.IS_FIRETV_AFTMM}}]),n}(hi);!function(t){ui=t}(function(){var t=function(){if(Ht.Fg)return new ii;if(Ht.Ig||Ht.Dg)return new ri;if(Ht.qg)return new oi;if(Ht.xm)return new si;return new ni}();return Ht.O_?new ai(t):Ht.Tg?new wi(t):Ht.te?new ci(t):Ht.dg?new vi(t):Ht.gg?new di(t):Ht.m_?new li(t):new hi(t)}()),x(),pt(),x(),pt(),M(),et(),x(),pt();var bi=!(Ht.Dg&&!Ht.Bg),gi=self.console;function mi(t){if(Kt(t))try{return JSON.stringify(t)}catch(t){}return t}function pi(t){return t.map(mi).join(" ")}function yi(t){var n=gi&&gi[t];return n?n.bind&&bi?n.bind(gi):function(){for(var n=arguments.length,i=new Array(n),e=0;e<n;e++)i[e]=arguments[e];gi[t](pi(i))}:void 0}var _i=yi("log")||Jt,Si=yi("debug")||_i.bind(void 0,"DEBUG:"),Ti=yi("warn")||_i.bind(void 0,"WARNING:"),ki=yi("error")||_i.bind(void 0,"ERROR:"),Ii=function(){var t=gi&&gi.assert;return t?t.bind&&bi?t.bind(gi):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];gi.assert(t,pi(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||ki.apply(void 0,[].concat(["Assertion failed:"],i))}}();function Ei(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 Ri(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){Oi(t,n,r,e);var o=t;t=e,e=o}return t}(t,n);return i!==t&&Oi(i,null,t.length,t),t}function Oi(t,n,i,e){var r,o,u,s,f,h=t.length,c=0,a=2*i;for(r=0;r<h;r+=a)for(u=(o=r+i)+i,o>h&&(o=h),u>h&&(u=h),s=r,f=o;;)if(s<o&&f<u)n(t[s],t[f])<=0?e[c++]=t[s++]:e[c++]=t[f++];else if(s<o)e[c++]=t[s++];else{if(!(f<u))break;e[c++]=t[f++]}}x(),pt();var Ni=/[a-zA-Z]/,Pi=/[0-9]/,Ai=/[0-9a-fA-F]/,Di=/^0x/i,Ci=/^[0-9]+$/,xi=/^[0-9a-fA-F]+$/,Bi=/^[0-7]+$/,Mi=p.prototype.toString,Fi=Array.isArray||function(t){return"[object Array]"===Mi.call(t)},Li=void 0!==n&&"symbol"==typeof e;function Ui(t){return Fi(t)?t:Array.from(t)}function zi(t,n,i){var e=t[n];t[n]=t[i],t[i]=e}function Wi(t){return t>=65&&t<=90}function Vi(t){return Wi(t)||function(t){return t>=97&&t<=122}(t)}function Hi(t){return t>=48&&t<=57}function qi(t){return Hi(t)||Vi(t)}function Xi(t){return Hi(t)||t>=65&&t<=70||t>=97&&t<=102}function ji(t){return Wi(t)?t+32:t}function Yi(t){return Hi(t)?t-48:t>=65&&t<=70?t-65+10:t>=97&&t<=102?t-97+10:-1}function Ki(t,n){return void 0===n&&(n=!1),0<=t&&t<=9?t+48:10<=t&&t<=15?t+(n?87:55):-1}var Gi=y.min,$i=String.fromCharCode;function Zi(t){for(var n=t.length,i=[],e=0;e<n;e+=16384){var r=Gi(e+16384,n);i.push($i.apply(null,t.slice(e,r)))}return i.join("")}var Ji=2147483647,Qi=/[^\0-\x7E]/,te=/[\x2E\u3002\uFF0E\uFF61]/g,ne={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},ie=y.floor,ee=String.fromCharCode;function re(t){throw new RangeError(ne[t])}function oe(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 ue,se,fe,he=function(t,n){return t+22+75*(t<26)-((0!=n)<<5)},ce=function(t,n,i){var e=0;for(t=i?ie(t/700):t>>1,t+=ie(t/n);t>455;e+=36)t=ie(t/35);return ie(e+36*t/(t+38))},ae=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(te,".")).split("."),n).join(".");return e+r}(t,function(t){return Qi.test(t)?"xn--"+function(t){for(var n=[],i=(t=oe(t)).length,e=128,r=0,o=72,u=0,s=t;u<s.length;u++){var f=s[u];f<128&&n.push(ee(f))}var h=n.length,c=h;for(h&&n.push("-");c<i;){for(var a=Ji,v=0,d=t;v<d.length;v++){var l=d[v];l>=e&&l<a&&(a=l)}var w=c+1;a-e>ie((Ji-r)/w)&&re("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>Ji&&re("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(ee(he(_+S%T,0))),p=ie(S/T)}n.push(ee(he(p,0))),o=ce(r,w,c==h),r=0,++c}}++r,++e}return n.join("")}(t):t})};function ve(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 Zi(n)}function de(t){if(t>=55296&&t<=57343)throw new g("Lone surrogate U+"+t.toString(16).toUpperCase()+" is not a scalar value")}function le(t,n){return t>>n&63|128}function we(t,n){4294967168&t?(4294965248&t?4294901760&t?4292870144&t||(n.push(t>>18&7|240),n.push(le(t,12)),n.push(le(t,6))):(de(t),n.push(t>>12&15|224),n.push(le(t,6))):n.push(t>>6&31|192),n.push(63&t|128)):n.push(t)}function be(t){for(var n=[],i=0;i<t.length;i++){we(t[i],n)}return n}function ge(){if(fe>=se)throw new g("Invalid byte index");var t=255&ue[fe];if(fe++,128==(192&t))return 63&t;throw new g("Invalid continuation byte")}function me(){var t,n;if(fe>se)throw new g("Invalid byte index");if(fe===se)return!1;if(t=255&ue[fe],fe++,!(128&t))return t;if(192==(224&t)){if((n=(31&t)<<6|ge())>=128)return n;throw new g("Invalid continuation byte")}if(224==(240&t)){if((n=(15&t)<<12|ge()<<6|ge())>=2048)return de(n),n;throw new g("Invalid continuation byte")}if(240==(248&t)&&(n=(7&t)<<18|ge()<<12|ge()<<6|ge())>=65536&&n<=1114111)return n;throw new g("Invalid UTF-8 detected")}function pe(t){return[37,Ki(t>>4),Ki(15&t)]}function ye(t){return function(t){return t>=0&&t<=31}(t)||t>126}function _e(t){return ye(t)||32===t||34===t||60===t||62===t||96===t}function Se(t){return _e(t)||35===t||63===t||123===t||125===t}function Te(t){return Se(t)||47===t||58===t||59===t||61===t||64===t||t>=91&&t<=94||124===t}function ke(t){return t<33||t>126||34===t||35===t||60===t||62===t}function Ie(t){return ke(t)||39===t}function Ee(t,n){if(!n(t))return[t];for(var i=be([t]),e=[],r=0;r<i.length;r++){var o=i[r];e.push.apply(e,pe(o))}return e}function Re(t,n){for(var i=[],e=0,r=oe(t);e<r.length;e++){var o=r[e];i.push.apply(i,Ee(o,n))}return ve(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&&Xi(t[e+1])&&Xi(t[e+2])){var o=Yi(t[e+1])<<4|Yi(t[e+2]);n.push(o),e+=2}else n.push(r)}return n}(be(t))}function Ne(t){return ve(function(t){ue=t.slice(),se=ue.length,fe=0;for(var n,i=[];!1!==(n=me());)i.push(n);return i}(Oe(oe(t))))}function Pe(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&&Ai.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 h=null;if(f>0){if(!("."===t[o]&&f<4))throw new m;o+=1}if(!Pi.test(t[o]))throw new m;for(;o<n&&Pi.test(t[o]);){var c=_(t[o],10);if(null===h)h=c;else{if(0===h)throw new m;if((h=10*h+c)>255)throw new m}o+=1}i[e]=i[e]<<8|h,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;)zi(i,e,r+a-1),e-=1,a-=1}else if(8!==e)throw new m;return i}function Ae(t){var n=10,i=Ci;return Di.test(t)?(t=t.slice(2),n=16,i=xi):t.length>=2&&"0"===t[0]&&(t=t.slice(1),n=8,i=Bi),""===t?0:i.test(t)?_(t,n):void 0}var De={Bp:4},Ce=/[\0\t\n\r #%/:?@\[\\\]]/,xe=/[\0\t\n\r #/:?@\[\\\]]/;function Be(t,n){if("["===t[0]){if("]"!==t[t.length-1])throw new m("Invalid IPv6 address");return{Bp:2,Mp:Pe(t.slice(1,-1))}}if(!n)return function(t){if(xe.test(t))throw new m("Invalid code point in opaque host");var n=Re(t,ye);return""===n?De:{Bp:3,Lp:n}}(t);var i=function(t){var n=function(t){return ae(t.toLowerCase())}(t);return n}(Ne(t));if(Ce.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=Ae(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?{Bp:1,Mp:e}:""===i?De:{Bp:0,Op:i}}function Me(t){switch(t.Bp){case 0:return t.Op;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.Mp);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.Mp)+"]";case 3:return t.Lp;case 4:return""}}var Fe=/\+/g;function Le(t){return 42===t||45===t||46===t||95===t||qi(t)}function Ue(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(Fe," "),s=s.replace(Fe," ");var f=Ne(u),h=Ne(s);i.push([f,h])}}return i}function ze(t){for(var n="",i=0;i<t.length;i++){var e=t[i];i>0&&(n+="&"),n+=We(be(oe(e[0])))+"="+We(be(oe(e[1])))}return n}function We(t){for(var n=[],i=0;i<t.length;i++){var e=t[i];32===e?n.push(43):Le(e)?n.push(e):n.push.apply(n,pe(e))}return Zi(n)}var Ve=/(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])/;function He(t){var n=""+t,i=Ve.exec(n);return i?function(t,n){for(var i=t.length,e=[],r=n;r<i;r++){var o=t.charCodeAt(r);if(Xe(o))if(je(o)||r===i-1)e.push(qe);else{var u=t.charCodeAt(r+1);je(u)?(e.push(o,u),r++):e.push(qe)}else e.push(o)}return t.slice(0,n)+Zi(e)}(n,i.index):n}var qe=65533,Xe=function(t){return 55296==(63488&t)},je=function(t){return!!(1024&t)};function Ye(t,n){var i=t[0],e=n[0];return i===e?0:i<e?-1:1}function Ke(t){t.Fp.length=0}function Ge(t,n){!function(t,n){for(var i=0;i<n.length;i++)t[i]=n[i];t.length=n.length}(t.Fp,Ue(n))}function $e(t){if(t.Up){var n=ze(t.Fp);""===n&&(n=null),t.Up.Up.Vp=n}}var Ze=function(){function t(t){if(void 0===t&&(t=void 0),this.Up=null,null==t)this.Fp=[];else if("object"==typeof t||"function"==typeof t)if(function(t){return t instanceof Ze&&!!Fi(t.Fp)&&(!Li||t[e]===Je)}(t))this.Fp=t.Fp.slice();else if(function(t){return null!=t&&(!!Fi(t)||!!Li&&"function"==typeof t[e])}(t)){this.Fp=[];for(var n=0,i=Ui(t);n<i.length;n++){var r=Ui(i[n]);if(2!==r.length)throw new m("Invalid name-value pair");this.Fp.push([He(r[0]),He(r[1])])}}else for(var o in this.Fp=[],t)p.prototype.hasOwnProperty.call(t,o)&&this.Fp.push([He(o),He(t[o])]);else(t=He(t)).length>0&&"?"===t[0]&&(t=t.slice(1)),this.Fp=Ue(t)}var n=t.prototype;return n.append=function(t,n){t=He(t),n=He(n),this.Fp.push([t,n]),$e(this)},n.delete=function(t){t=He(t);for(var n=this.Fp,i=0;i<n.length;){n[i][0]===t?n.splice(i,1):i++}$e(this)},n.get=function(t){t=He(t);for(var n=this.Fp,i=0;i<n.length;i++){var e=n[i];if(e[0]===t)return e[1]}return null},n.getAll=function(t){t=He(t);for(var n=this.Fp,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=He(t);for(var n=this.Fp,i=0;i<n.length;i++){if(n[i][0]===t)return!0}return!1},n.set=function(t,n){t=He(t),n=He(n);for(var i=this.Fp,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]),$e(this)},n.sort=function(){Ri(this.Fp,Ye),$e(this)},n.toString=function(){return ze(this.Fp)},n.entries=function(){return new ir(this.Fp,Qe)},n.keys=function(){return new ir(this.Fp,tr)},n.values=function(){return new ir(this.Fp,nr)},n.forEach=function(t){var n=this;this.Fp.forEach(function(i){return t(i[1],i[0],n)})},t}(),Je=Ze.prototype.entries;Li&&(Ze.prototype[e]=Je);var Qe=function(t){return[t[0],t[1]]},tr=function(t){return t[0]},nr=function(t){return t[1]},ir=function(){function t(t,n){this.Hp=0,this.Fp=t,this.qp=n}return t.prototype.next=function(){return this.Hp<this.Fp.length?{done:!1,value:this.qp(this.Fp[this.Hp++])}:{done:!0,value:void 0}},t}(),er="null";var rr=p.create(null);rr.ftp=21,rr.file=0,rr.gopher=70,rr.http=80,rr.https=443,rr.ws=80,rr.wss=443;var or=/^(?:\.|%2e)$/i,ur=/^(?:\.|%2e){2}$/i;function sr(t){return or.test(t)}function fr(t){return ur.test(t)}function hr(t){return void 0!==rr[t]}function cr(t){return hr(t.Wp)}function ar(t){return""!==t.zp||""!==t.Gp}function vr(t){var n=t.length;if(!(n>=2))return!1;if(!lr(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 dr(t){return 2===t.length&&Ni.test(t[0])&&(":"===t[1]||"|"===t[1])}function lr(t){return 2===t.length&&dr(Zi(t))}function wr(t){return dr(t)&&":"===t[1]}function br(t){var n=t.Xp;0!==n.length&&("file"===t.Wp&&1===n.length&&wr(n[0])||n.pop())}function gr(t){return null===t.jp||De===t.jp||t.Qp||"file"===t.Wp}var mr=-1,pr=/\t|\n|\r/g,yr=/^[\x00-\x1f ]+|[\x00-\x1f ]+$/g;function _r(t,n,i,e){void 0===i&&(i=null),void 0===e&&(e=null),i||(i=new Tr,t=t.replace(yr,""));var r=null!==e?e:0;n=n||null;for(var o=[],u=!1,s=!1,f=!1,h=oe(t=t.replace(pr,"")),c=h.length,a=0;a<=c;){var v=a<c?h[a]:mr;switch(r){case 0:if(!Vi(v)){if(null===e){o.length=0,r=2;continue}throw new m("Invalid scheme")}o.push(ji(v)),r=1;break;case 1:if(qi(v)||43===v||45===v||46===v)o.push(ji(v));else{if(58!==v){if(null===e){o.length=0,r=2,a=0;continue}throw new m("Invalid scheme")}var d=ve(o);if(null!==e){if(hr(i.Wp)&&!hr(d))return;if(!hr(i.Wp)&&hr(d))return;if((ar(i)||null!==i.Kp)&&"file"===d)return;if("file"===i.Wp&&(i.jp===De||null===i.jp))return}if(i.Wp=d,null!==e)return void(cr(i)&&i.Kp===rr[i.Wp]&&(i.Kp=null));o.length=0,"file"===i.Wp?r=13:cr(i)&&n&&n.Wp===i.Wp?r=3:cr(i)?r=7:47===h[a+1]?(r=4,a+=1):(i.Qp=!0,i.Xp.push(""),r=18)}break;case 2:if(!n||n.Qp&&35!==v)throw new m("Invalid scheme");n.Qp&&35===v?(i.Wp=n.Wp,i.Xp=n.Xp.slice(),i.Vp=n.Vp,i.Yp="",i.Qp=!0,r=20):"file"!==n.Wp?(r=5,a-=1):(r=13,a-=1);break;case 3:47===v&&47===h[a+1]?r=8:(r=5,a-=1);break;case 4:47===v?r=9:(r=17,a-=1);break;case 5:i.Wp=n.Wp,mr===v?(i.zp=n.zp,i.Gp=n.Gp,i.jp=n.jp,i.Kp=n.Kp,i.Xp=n.Xp.slice(),i.Vp=n.Vp):47===v?r=6:63===v?(i.zp=n.zp,i.Gp=n.Gp,i.jp=n.jp,i.Kp=n.Kp,i.Xp=n.Xp.slice(),i.Vp="",r=19):35===v?(i.zp=n.zp,i.Gp=n.Gp,i.jp=n.jp,i.Kp=n.Kp,i.Xp=n.Xp.slice(),i.Vp=n.Vp,i.Yp="",r=20):92===v&&cr(i)?r=6:(i.zp=n.zp,i.Gp=n.Gp,i.jp=n.jp,i.Kp=n.Kp,i.Xp=n.Xp.slice(),i.Xp.pop(),r=17,a-=1);break;case 6:!cr(i)||47!==v&&92!==v?47===v?r=9:(i.zp=n.zp,i.Gp=n.Gp,i.jp=n.jp,i.Kp=n.Kp,r=17,a-=1):r=8;break;case 7:if(47!==v||47!==h[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=ve(Ee(w,Te));f?i.Gp+=b:i.zp+=b}else f=!0}o.length=0}else if(mr===v||47===v||63===v||35===v||cr(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.Wp)a-=1,r=15;else if(58!==v||s)if(mr===v||47===v||63===v||35===v||cr(i)&&92===v){if(a-=1,cr(i)&&0===o.length)throw new m("Invalid host");if(null!==e&&0===o.length&&(ar(i)||null!==i.Kp))return;var g=Be(ve(o),cr(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=Be(ve(o),cr(i));if(i.jp=p,o.length=0,r=12,11===e)return}break;case 12:if(Hi(v))o.push(v);else{if(!(mr===v||47===v||63===v||35===v||cr(i)&&92===v||null!==e))throw new m("Invalid port");if(0!==o.length){var y=_(ve(o),10);if(y>65535)throw new m("Invalid port");i.Kp=y===rr[i.Wp]?null:y,o.length=0}if(null!==e)return;r=16,a-=1}break;case 13:i.Wp="file",47===v||92===v?r=14:n&&"file"===n.Wp?mr===v?(i.jp=n.jp,i.Xp=n.Xp.slice(),i.Vp=n.Vp):63===v?(i.jp=n.jp,i.Xp=n.Xp.slice(),i.Vp="",r=19):35===v?(i.jp=n.jp,i.Xp=n.Xp.slice(),i.Vp=n.Vp,i.Yp="",r=20):(vr(h.slice(a))||(i.jp=n.jp,i.Xp=n.Xp.slice(),br(i)),r=17,a-=1):(r=17,a-=1);break;case 14:47===v||92===v?r=15:(n&&"file"===n.Wp&&!vr(h.slice(a))&&(wr(n.Xp[0])?i.Xp.push(n.Xp[0]):i.jp=n.jp),r=17,a-=1);break;case 15:if(mr===v||47===v||92===v||63===v||35===v)if(a-=1,null===e&&lr(o))r=17;else if(0===o.length){if(i.jp=De,null!==e)return;r=16}else{var S=Be(ve(o),cr(i));if(0===S.Bp&&"localhost"===S.Op&&(S=De),i.jp=S,null!==e)return;o.length=0,r=16}else o.push(v);break;case 16:cr(i)?(r=17,47!==v&&92!==v&&(a-=1)):null===e&&63===v?(i.Vp="",r=19):null===e&&35===v?(i.Yp="",r=20):mr!==v&&(r=17,47!==v&&(a-=1));break;case 17:if(mr===v||47===v||cr(i)&&92===v||null===e&&(63===v||35===v)){var T=ve(o);if(fr(T)?(br(i),47===v||cr(i)&&92===v||i.Xp.push("")):!sr(T)||47===v||cr(i)&&92===v?sr(T)||("file"===i.Wp&&0===i.Xp.length&&lr(o)&&(De!==i.jp&&null!==i.jp&&(i.jp=De),o[1]=58,T=ve(o)),i.Xp.push(T)):i.Xp.push(""),o.length=0,"file"===i.Wp&&(mr===v||63===v||35===v))for(;i.Xp.length>1&&""===i.Xp[0];)i.Xp.shift();63===v?(i.Vp="",r=19):35===v&&(i.Yp="",r=20)}else o.push.apply(o,Ee(v,Se));break;case 18:63===v?(i.Vp="",r=19):35===v?(i.Yp="",r=20):mr!==v&&(i.Xp[0]+=ve(Ee(v,ye)));break;case 19:null===e&&35===v?(i.Yp="",r=20):mr!==v&&(i.Vp+=ve(Ee(v,cr(i)?Ie:ke)));break;case 20:mr===v||0===v||(i.Yp+=ve(Ee(v,_e)))}a++}return i}function Sr(t,n,i,e){try{_r(t,n,i,e)}catch(t){}}var Tr=function(){this.Wp="",this.zp="",this.Gp="",this.jp=null,this.Kp=null,this.Xp=[],this.Vp=null,this.Yp=null,this.Qp=!1};function kr(t){switch(t.Wp){case"blob":var n;try{n=_r(t.Xp[0],null)}catch(t){return er}return kr(n);case"ftp":case"gopher":case"http":case"https":case"ws":case"wss":return function(t,n,i){return t+"://"+Me(n)+(null===i?"":":"+i)}(t.Wp,t.jp,t.Kp);default:return er}}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.Up}(n))e=n.Up;else try{e=_r(String(n),null)}catch(t){throw new m("Invalid base URL: "+t.message)}try{i=_r(String(t),e)}catch(t){throw new m("Invalid URL: "+t.message)}var r=i.Vp;this.Up=i,this.Vp=function(t){var n=new Ze;return null!==t&&Ge(n,t),n}(r),this.Vp.Up=this}var n=t.prototype;return n.toString=function(){return this.href},n.toJSON=function(){return this.href},function(t,n,i){n&&Ei(t.prototype,n),i&&Ei(t,i)}(t,[{key:"href",get:function(){return function(t,n){void 0===n&&(n=!1);var i=t.Wp+":";if(null!==t.jp?(i+="//",ar(t)&&(i+=t.zp,""!==t.Gp&&(i+=":"+t.Gp),i+="@"),i+=Me(t.jp),null!==t.Kp&&(i+=":"+t.Kp)):null===t.jp&&"file"===t.Wp&&(i+="//"),t.Qp)i+=t.Xp[0];else for(var e=0,r=t.Xp;e<r.length;e++)i+="/"+r[e];return null!==t.Vp&&(i+="?"+t.Vp),n||null===t.Yp||(i+="#"+t.Yp),i}(this.Up)},set:function(t){var n;try{n=_r(String(t),null)}catch(t){throw new m("Invalid URL: "+t.message)}this.Up=n,Ke(this.Vp);var i=this.Up.Vp;null!==i&&Ge(this.Vp,i)}},{key:"origin",get:function(){return kr(this.Up)}},{key:"protocol",get:function(){return this.Up.Wp+":"},set:function(t){Sr(t+":",null,this.Up,0)}},{key:"username",get:function(){return this.Up.zp},set:function(t){gr(this.Up)||(this.Up.zp=Re(t,Te))}},{key:"password",get:function(){return this.Up.Gp},set:function(t){gr(this.Up)||(this.Up.Gp=Re(t,Te))}},{key:"host",get:function(){var t=this.Up,n=t.jp;if(null===n)return"";var i=t.Kp,e=Me(n);return null!==i&&(e+=":"+i),e},set:function(t){this.Up.Qp||Sr(t,null,this.Up,10)}},{key:"hostname",get:function(){var t=this.Up.jp;return null===t?"":Me(t)},set:function(t){this.Up.Qp||Sr(t,null,this.Up,11)}},{key:"port",get:function(){var t=this.Up.Kp;return null===t?"":""+t},set:function(t){gr(this.Up)||(""===t?this.Up.Kp=null:Sr(t,null,this.Up,12))}},{key:"pathname",get:function(){var t=this.Up.Xp;return this.Up.Qp?t[0]:0===t.length?"":"/"+t.join("/")},set:function(t){this.Up.Qp||(this.Up.Xp.length=0,Sr(t,null,this.Up,16))}},{key:"search",get:function(){var t=this.Up.Vp;return null===t||""===t?"":"?"+t},set:function(t){t=He(t);var n=this.Up;if(""===t)return n.Vp=null,void Ke(this.Vp);"?"===t[0]&&(t=t.slice(1)),n.Vp="",Sr(t,null,n,19),Ge(this.Vp,t)}},{key:"searchParams",get:function(){return this.Vp}},{key:"hash",get:function(){var t=this.Up.Yp;return null===t||""===t?"":"#"+t},set:function(t){""!==t?("#"===t[0]&&(t=t.slice(1)),this.Up.Yp="",Sr(t,null,this.Up,20)):this.Up.Yp=null}}]),t}();function Er(t){return t.document&&t.document.baseURI||t.location.href||""}x(),pt();var Rr=function(){function t(){this.Cm=void 0,this.mw=new Or,this.yw=ui,this.ww=Nr(),self.performance&&self.performance.now?this.Cm=function(){return self.performance.now()}:this.Cm=Gn}var n=t.prototype;return n.Jp=function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];Si.apply(void 0,[].concat(n))},n.Zp=function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];_i.apply(void 0,[].concat(n))},n.$p=function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];Ti.apply(void 0,[].concat(n))},n.iw=function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];ki.apply(void 0,[].concat(n))},n.ew=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];Ii.apply(void 0,[].concat([t],i))},n.Nm=function(t,n){return d(t,n)},n.nw=function(t,n){return w(t,n)},n.Dm=function(t){l(t)},n.ow=function(t){b(t)},n.hw=function(){return this.aw.hw()},n.uw=function(){return this.aw.uw()},n.cw=function(){return this.aw.cw()},n.dw=function(){return this.aw.dw()},n.lw=function(){return this.aw.lw()},n.fw=function(t,n){return this.aw.fw(t,n)},n._w=function(t){return this.aw._w(t)},n.Rh=function(t,n){var i;return void 0===n&&(n=Er(c)),i="object"!==(void 0===n?"undefined":F(n))||B(n,Ir)?n:n.href,new Ir(t,i)},n.pw=function(t,n){if(void 0===n&&(n=Er(c)),this.ww){var i=function(t){return"string"==typeof t}(n)?n:n.toString();return new self.URL(t,i).href}return this.Rh(t,n).href},It(t,[{key:"gw",get:function(){return this.mw}},{key:"ie",get:function(){return this.yw}},{key:"bw",get:function(){return{Aw:v&&v.userAgent.match(/Android /i)?"Android":"other",Sw:Boolean(v&&v.userAgent.match(/Android 8.0.0/i))}}},{key:"Tw",get:function(){return self&&self.location&&"https:"===self.location.protocol}},{key:"Ew",get:function(){return"languages"in v?v.languages.slice():[v.language]}}]),t}(),Or=function(){function t(){}return It(t,[{key:"xw",get:function(){return v.oscpu}},{key:"ie",get:function(){return v.platform}},{key:"Pw",get:function(){return v.vendor}},{key:"Rw",get:function(){return v.vendorSub}}]),t}();function Nr(){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(),pt();var Pr=function(){function t(){}var n=t.prototype;return n.lw=function(){return tt.resolve(!1)},n.uw=function(){return tt.resolve(!1)},n.dw=function(){return tt.resolve(!1)},n.cw=function(){return tt.resolve(!1)},n._w=function(t){return tt.resolve(!1)},n.fw=function(t,n){return tt.resolve(!1)},n.hw=function(){return tt.resolve(!1)},t}();x(),pt();var Ar=function(){function t(){}var n=t.prototype;return n.ek=function(){},n.Ib=function(t){},n.xb=function(t){},n.Pb=function(t,n){},t}();x(),pt();var Dr="default",Cr="unknown";x(),pt(),x(),pt(),x(),pt();var xr=function(t){return t.rk="arraybuffer",t.hk="json",t.ck="stream",t.dk="text",t}({});x(),pt(),M();var Br=function(){function t(n){var i=this;if(this.Nw=void 0,this.Nw={},n)if(B(n,t))n.asList().forEach(function(t){var n=t[0],e=t[1];i.append(n,e)});else if(function(t){return Kt(t)&&"function"==typeof t.forEach}(n))n.forEach(function(t,n){Array.isArray(t)&&2===t.length?i.append(t[0],t[1]):i.append(n,t)});else if(function(t){return void 0!==e&&Kt(t)&&e in t}(n))for(var r,o=Rt(n);!(r=o()).done;){var u=r.value,s=u[0],f=u[1];this.append(s,f)}else p.getOwnPropertyNames(n).forEach(function(t){i.append(t,n[t])});else;}var n=t.prototype;return n.append=function(t,n){var i=t,e=n;i=Mr(i),e=Fr(e);var r=i.toLowerCase();if(this.Nw.hasOwnProperty(r)){var o=this.Nw[r],u=o[1];o[1]=u?u+", "+e:e}else this.Nw[r]=[i,e]},n.delete=function(t){var n=Mr(t).toLowerCase();delete this.Nw[n]},n.get=function(t){var n=Mr(t).toLowerCase();return this.Nw.hasOwnProperty(n)?this.Nw[n][1]:null},n.has=function(t){var n=Mr(t).toLowerCase();return this.Nw.hasOwnProperty(n)},n.set=function(t,n){var i=t,e=(i=Mr(i)).toLowerCase();this.Nw[e]=[i,Fr(n)]},n.forEach=function(t,n){for(var i in this.Nw)this.Nw.hasOwnProperty(i)&&t.call(n,this.Nw[i][1],i,this)},n.asList=function(){var t=[];for(var n in this.Nw)if(this.Nw.hasOwnProperty(n)){var i=this.Nw[n],e=i[0],r=i[1];t.push([e,r])}return t},n.lk=function(){var t={};return this.forEach(function(n,i){t[i]=n}),t},n.fk=function(t){var n=this;t.forEach(function(t,i){n.append(i,t)})},n.vk=function(t){var n=this;t.forEach(function(t,i){n.set(i,t)})},t}();function Mr(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 Fr(t){var n=t;return"string"!=typeof n&&(n=String(n)),n}var Lr=function(t){return t.DELETE="DELETE",t.GET="GET",t.HEAD="HEAD",t.OPTIONS="OPTIONS",t.POST="POST",t.PUT="PUT",t}({}),Ur=function(t){return t.hE="same-origin",t.aE="no-cors",t.uE="cors",t.cE="navigate",t}({}),zr=function(t,n){this.Ak=void 0,this.Vk=void 0,this.dE=void 0,this.Fk=void 0,this.lE=void 0,this.fE=void 0,this.Gm=void 0,this.Vw=void 0,this.vE=void 0,this._E=void 0,this.zk=void 0,this.gE=void 0,this.mE=void 0,this.pE=void 0,this.wE=void 0,this.yE=void 0;var i,e,r,o,u,s,f,h,c,a,v,d,l,w,b,g,m,p,y=t.zk;n?(i=n.Ak,e=n.Vk,r=n.dE,o=n.Fk,u=n.lE,s=n.fE,f=n.Gm,h=n.Vw,c=n.vE,a=n._E,v=n.gE,d=n.mE,l=n.pE,w=n.wE,b=n.yE):(i=null,e={},r="GET",o=xr.dk,u=0,s=0,h="",c="",a="",v=!1,l=void 0,w=!1,b=void 0),this.zk=y,this.Ak=t.Ak||i,this.Vk=new Br(t.Vk||e),this.dE=t.dE||r,this.Fk=t.Fk||o,this.lE=void 0!==t.lE?Number(t.lE)||0:u,this.fE=void 0!==t.fE?Number(t.fE)||0:s,this.Gm=t.Gm||f||(new dn).Gm,this.Vw=t.Vw||h,this.vE=t.vE||c,this._E=t._E||a,this.gE=void 0!==t.gE?Boolean(t.gE):v,this.mE=t.mE||d,this.pE=null!=(g=t.pE)?g:l,this.wE=null!=(m=t.wE)?m:w,this.yE=null!=(p=t.yE)?p:b};x(),pt(),x(),pt();var Wr=function(t){return t.CE="HttpOpenError",t.DE="HttpResponseError",t.NE="HttpTimeoutError",t}({}),Vr=function(t){function n(n,i,e){var r;return(r=t.call(this,i,e)||this).BE=void 0,r.BE=n,r}return Tt(n,t),It(n,[{key:"Uk",get:function(){return this.BE}}]),n}(wn),Hr=function(t){function n(n,i){return t.call(this,n,"Error while opening "+n.zk+".",i)||this}return Tt(n,t),It(n,[{key:"name",get:function(){return Wr.CE}}]),n}(Vr),qr=function(){function t(){}var n=t.prototype;return n.Uk=function(t){return tt.reject(new Hr(new zr(t)))},n.bE=function(t){},n._n=function(){},t}();x(),pt();var Xr=function(t){function n(n){return t.call(this,"Invalid XML",n)||this}return Tt(n,t),n}(wn),jr=function(t){function n(){var n;return(n=t.apply(this,arguments)||this).zx=new Pr,n.sV=new qr,n.i=new Ar,n}return Tt(n,t),n.prototype.wx=function(t){throw new Xr},It(n,[{key:"aw",get:function(){return this.zx}},{key:"Gx",get:function(){return!1}},{key:"jx",get:function(){return!1}},{key:"Jx",get:function(){return!1}},{key:"Kx",get:function(){return!1}},{key:"Zx",get:function(){return this.i}},{key:"$x",get:function(){return{tP:Jt}}},{key:"iP",get:function(){return Dr}},{key:"eP",get:function(){return Cr}},{key:"sP",get:function(){return!0}},{key:"ff",get:function(){return this.sV}},{key:"rP",get:function(){return!1}}]),n}(Rr);function Yr(){return Yr=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},Yr.apply(this,arguments)}function Kr(){var t=p.create(null);return t.Iw=void 0,delete t.Iw,t}function Gr(){return new Zr}Zt(new jr),x(),pt(),x(),pt(),x(),pt(),x(),pt(),x(),pt(),x(),pt();var $r="undefined"!=typeof Map&&"entries"in Map.prototype?Map:void 0,Zr=$r||function(){var t=function(){function t(t,n){this.data=void 0,this.keys=void 0,this.index=0,this.selector=void 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=Kr(),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=Kr(),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}()}();$r||function(){var t=function(){function t(t,n){this.Cw=void 0,this.Dw=void 0,this.Cw=t,this.Dw=n}return t.prototype.next=function(){var t=this.Cw.next();return t.done?t:{value:this.Dw(t.value),done:!1}},t}();(function(){function n(){this.Nw=Gr()}var i=n.prototype;i.get=function(t){return this.Nw.get(""+t)},i.set=function(t,n){return this.Nw.set(""+t,n),this},i.has=function(t){return this.Nw.has(""+t)},i.delete=function(t){return this.Nw.delete(""+t)},i.clear=function(){this.Nw.clear()},i.keys=function(){return new t(this.Nw.keys(),function(t){return Number(t)})},i.values=function(){return this.Nw.values()},i.entries=function(){return new t(this.Nw.entries(),function(t){var n=t[0],i=t[1];return[Number(n),i]})},i.forEach=function(t){this.Nw.forEach(function(n,i){t(n,Number(i))})},It(n,[{key:"size",get:function(){return this.Nw.size}}])})()}();x(),pt(),x(),pt();var Jr="9a04f079-9840-4286-ab92-e65be0885f95",Qr="urn:uuid:"+Jr,to="com.microsoft.playready",no="edef8ba9-79d6-4ace-a3c8-27dcd51d21ed",io="urn:uuid:"+no,eo="com.widevine.alpha",ro="1077efec-c0b2-4d02-ace3-3c1e52e2fb4b",oo="urn:uuid:"+ro,uo="org.w3.clearkey",so="94ce86fb-07ff-4f43-adb8-93d2fa968ca2",fo="urn:uuid:"+so,ho="com.apple.fps.1_0";x(),pt();var co=function(t){return t.Bw="playready",t.Mw="widevine",t.Fw="fairplay",t.Lw="clearkey",t.Ow="clearkey_dash_if",t.Uw="aes128",t}({}),ao={Vw:co.Bw,Hw:to,qw:"cenc",Ww:Jr,zw:Qr,Gw:"PlayReady"},vo={Vw:co.Mw,Hw:eo,qw:"cenc",Ww:no,zw:io,Gw:"Widevine"},lo={Vw:co.Fw,Hw:ho,qw:"skd",Ww:so,zw:fo,Gw:"FairPlay"},wo=(co.Fw,{Vw:co.Lw,Hw:uo,qw:"cenc",Ww:ro,zw:oo,Gw:"ClearKey"});co.Ow;x(),pt();String.prototype.replaceAll;var bo="function"==typeof String.prototype.startsWith?function(t,n){return Xt(t)&&t.startsWith(n)}:function(t,n){return Xt(t)&&t.substr(0,n.length)===n},go=(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&~i||(r+=e),0!=(i>>>=1);)e+=e;return r}),mo=(String.prototype.padStart,String.prototype.padEnd,16384),po="function"==typeof String.fromCodePoint?function(t){var n;return t.length<=mo?(n=String).fromCodePoint.apply(n,[].concat(t)):_o(t,String.fromCodePoint)}:function(t){for(var n,i=[],e=Rt(t);!(n=e()).done;){var r=n.value;r>65535&&(r-=65536,i.push(r>>>10&1023|55296),r=56320|1023&r),i.push(r)}return yo(i)};function yo(t){var n;return t.length<=mo?(n=String).fromCharCode.apply(n,[].concat(t)):_o(t,String.fromCharCode)}function _o(t,n){for(var i=[],e=0;e<t.length;e+=mo)i.push(n.apply(void 0,[].concat(t.slice(e,e+mo))));return i.join("")}var So=Ht.K_&&Ht.J_>=42||Ht.Fg&&Ht.Vg>=38||Ht.Ig||Ht.Bg||Ht.Xg&&Ht.Qg>=29;function To(t,n){return function(t,n){return Xt(t)&&-1!==t.indexOf(n)}(t,"audio")?{initDataTypes:["cenc"],audioCapabilities:[Yr({contentType:t},n?{robustness:"SW_SECURE_CRYPTO"}:{})]}:{initDataTypes:["cenc"],videoCapabilities:[Yr({contentType:t},n?{robustness:"SW_SECURE_CRYPTO"}:{})]}}var ko=function(){function t(t){this.Qw=void 0,this.Xw=Gr(),this.Kw=void 0,this.Qw=t}var n=t.prototype;return n.lw=function(){return this._w(vo)},n.uw=function(){return this._w(wo)},n.dw=function(){return this._w(ao)},n.cw=function(){return this._w(lo)},n._w=function(t){var n=t.zw,i=this.Xw.get(n);if(i)return i;var e=this.fw(t,'video/mp4; codecs="avc1.42000a"');return this.Xw.set(n,e),e},n.fw=function(t,n){return nn(function(){return en(this,function(i){switch(i.label){case 0:return i.trys.push([0,2,,7]),[4,this.Qw.jw(t.Hw,[To(n,!0)])];case 1:return i.sent(),[2,!0];case 2:i.sent(),i.label=3;case 3:return i.trys.push([3,5,,6]),[4,this.Qw.jw(t.Hw,[To(n,!1)])];case 4:return i.sent(),[2,!0];case 5:return i.sent(),[2,!1];case 6:return[3,7];case 7:return[2]}})}).call(this)},n.hw=function(){return this.Kw||(this.Kw=this.Yw()),this.Kw},n.Yw=function(){return nn(function(){return en(this,function(t){switch(t.label){case 0:return"https:"===c.location.protocol?[2,!1]:So?[4,this.uw()]:[2,!1];case 1:return t.sent()?[2,!1]:[2,!0]}})}).call(this)},t}();function Io(t,n,i){if("function"==typeof i)i.call(t,n);else for(var e,r=Rt(i);!(e=r()).done;){e.value.call(t,n)}}x(),pt(),x(),pt(),x(),pt(),x(),pt(),x(),pt(),x(),pt();var Eo=function(){function t(t){var n=this;this.Zw=Kr(),this.ey=void 0,this.$w=0,this.sy=void 0,this.Us=function(t){n.Co(t)},this.sy=null!=t?t:this}var n=t.prototype;return n.jn=function(t,n){if("function"==typeof n)if("string"==typeof t)this.Jw(t,n);else for(var i,e=Rt(t);!(i=e()).done;){var r=i.value;this.Jw(r,n)}},n.Jw=function(t,n){var i=this.Zw[t];void 0===i?this.Zw[t]=n:"function"==typeof i?this.Zw[t]=[i,n]:0===this.$w?i.push(n):this.Zw[t]=i.concat(n)},n.iy=function(t){if("function"==typeof t){var n=this.ey;void 0===n?this.ey=t:"function"==typeof n?this.ey=[n,t]:0===this.$w?n.push(t):this.ey=n.concat(t)}},n.Ho=function(){this.Zw=Kr(),this.ey=void 0},n.Co=function(t){this.$w++;var n=this.Zw[t.type],i=this.ey;void 0!==n&&Io(this.sy,t,n),void 0!==i&&Io(this.sy,t,i),this.$w--},n.yn=function(t,n){if("function"==typeof n)if("string"==typeof t)this.oy(t,n);else for(var i,e=Rt(t);!(i=e()).done;){var r=i.value;this.oy(r,n)}},n.oy=function(t,n){var i=this.Zw[t];void 0!==i&&("function"==typeof i?i===n&&(this.Zw[t]=void 0):0===this.$w?fn(i,n):this.Zw[t]=hn(i,n))},n.uy=function(t){if("string"==typeof t)this.Zw[t]=void 0;else for(var n,i=Rt(t);!(n=i()).done;){var e=n.value;this.Zw[e]=void 0}},n.ly=function(t){var n=this.ey;void 0!==n&&("function"==typeof n?n===t&&(this.ey=void 0):0===this.$w?fn(n,t):this.ey=hn(n,t))},n.vy=function(t,n){var i=this;return new tt(function(e,r){if(n&&n.Om)return r(new bn);var o=function(t){s(),e(t)},u=function(){s(),r(new bn)},s=function(){i.yn(t,o),n&&n.qm(u)};i.jn(t,o),n&&n.Hm(u)})},t}();x(),pt(),x(),pt();var Ro=function(t,n){void 0===n&&(n=new Date),this.type=void 0,this.date=void 0,this.type=t,this.date=n};x(),pt();var Oo=function(t){return t._y="gy",t.py="wy",t.yy="contentprotectionerror",t.by="contentprotectionsuccess",t.Ay="currentsourcechange",t.Sy="destroy",t.Yd="durationchange",t.Ty="emptied",t.Ey="encrypted",t.zd="ended",t.xy="Py",t.Ry="Iy",t.Cy="Dy",t.Ny="By",t.Jd="loadstart",t.My="manifestupdate",t.Ly="nosupportedrepresentationfound",t.Oy="offline",t.Fy="online",t.qd="pause",t.lo="play",t.if="progress",t.Zu="ratechange",t.Uy="representationchange",t.Vy="resize",t.Ld="seeked",t.Xd="seeking",t.Hy="segmenterror",t.qy="segmentnotfound",t.Wy="initializernotfound",t.zy="manifesterror",t.Gy="Xy",t.jy="Qy",t.Ky="Yy",t.vo="sourcechange",t.sc="timeupdate",t.zl="volumechange",t.Jy="Zy",t.$y="ib",t.LICENSE_REQUEST_GENERATED="eb",t.sb="metricschange",t.CONTENT_STEERING_START="contentsteeringstart",t.CONTENT_STEERING_STOP="contentsteeringstop",t.CONTENT_STEERING_UPDATE="contentsteeringupdate",t.CONTENT_STEERING_LOCATION_CHANGE="contentsteeringlocationchange",t.CONTENT_STEERING_ERROR="contentsteeringerror",t}({}),No=["cenc"],Po=["cbcs","cbcs-1-9"],Ao=function(t){function n(n){var i;return(i=t.call(this,Oo.$y)||this).ob=void 0,i.ob=n,i}return Tt(n,t),n}(Ro),Do=function(t){function n(n,i,e,r){var o;return(o=t.call(this,"ub")||this).cb=void 0,o.fb=void 0,o.ub=void 0,o._b=void 0,o.cb=n,o.fb=i,o.ub=e,o._b=r,o}return Tt(n,t),n}(Ro),Co=function(t){function n(){return t.call(this,"lt")||this}return Tt(n,t),n}(Ro);x(),pt(),x(),pt(),x(),pt();var xo="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");function Bo(t,n,i){return xo[t>>2]+xo[(3&t)<<4|n>>4]+xo[(15&n)<<2|i>>6]+xo[63&i]}function Mo(t,n,i){for(var e=[],r=n;r<i;r+=3)e.push(Bo(t[r],t[r+1],t[r+2]));return e.join("")}x(),pt(),M(),x(),pt();var Fo=function(){function t(t){void 0===t&&(t=0),this.Ac=void 0,this.Ac=t}var n=t.prototype;return n.wb=function(t){this.Ac+=t},n.Ic=function(t){this.Ac=t},n.yb=function(){return new t(this.Lu)},It(t,[{key:"Lu",get:function(){return this.Ac}}]),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 zo(t,n){4294967168&t?(4294965248&t?4294901760&t?4292870144&t||(n.push(t>>18&7|240),n.push(Uo(t,12)),n.push(Uo(t,6))):(Lo(t),n.push(t>>12&15|224),n.push(Uo(t,6))):n.push(t>>6&31|192),n.push(63&t|128)):n.push(t)}function Wo(t,n){if(n.Lu>=t.length)throw new g("Invalid byte index");var i=255&t[n.Lu];if(n.wb(1),128==(192&i))return 63&i;throw new g("Invalid continuation byte")}function Vo(t,n){var i=n.Lu;if(i>t.length)throw new g("Invalid byte index");if(i===t.length)return!1;var e=255&t[i];if(n.wb(1),!(128&e))return e;if(192==(224&e)){var r=(31&e)<<6|Wo(t,n);if(r>=128)return r;throw new g("Invalid continuation byte")}if(224==(240&e)){var o=(15&e)<<12|Wo(t,n)<<6|Wo(t,n);if(o>=2048)return Lo(o),o;throw new g("Invalid continuation byte")}if(240==(248&e)){var u=(7&e)<<18|Wo(t,n)<<12|Wo(t,n)<<6|Wo(t,n);if(u>=65536&&u<=1114111)return u}throw new g("Invalid UTF-8 detected")}x(),pt(),x(),pt();function Ho(t,n,i){void 0===i&&(i=!1);var e=t.getUint16(n.Lu,i);return n.wb(2),e}function qo(t,n,i,e){void 0===e&&(e=!1),t.setUint16(n.Lu,i,e),n.wb(2)}function Xo(t,n,i,e){void 0===e&&(e=!1),t.setUint32(n.Lu,i,e),n.wb(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.Lu+2<=t.byteLength;){var o=Ho(t,n,i);if(e&&!o)break;r.push(o)}return yo(r)}($o(t),new tu,n,!1)}function Ko(t){return function(t){return po(t)}(function(t,n){var i,e=[],r=new tu;if(!n){if(!1===(i=Vo(t,r)))return e;65279===i||e.push(i)}for(;!1!==(i=Vo(t,r));)e.push(i);return e}(Zo(t)))}function Go(t){return new k(function(t){for(var n,i=[],e=Rt(t);!(n=e()).done;)zo(n.value,i);return i}(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 k(t.buffer,t.byteOffset,t.byteLength)}function Jo(t){return B(t,ArrayBuffer)?new k(t):Zo(t)}function Qo(t){if(t.slice)return t.slice(0);var n=new k(t.byteLength);return n.set(t,0),n}var tu=function(){function t(t){void 0===t&&(t=0),this.Ac=void 0,this.Ac=t}var n=t.prototype;return n.wb=function(t){this.Ac+=t},n.Ic=function(t){this.Ac=t},n.yb=function(){return new t(this.Lu)},n.Sb=function(){return new Fo(this.Lu<<3)},It(t,[{key:"Lu",get:function(){return this.Ac}}]),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&&cn(nu,qt.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,e=new k(n),r=0,o=Rt(t);!(i=o()).done;){var u=i.value;e.set(u,r),r+=u.byteLength}return e}(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+=16383)e.push(Mo(t,o,y.min(r,o+16383)));if(1===i){var u=t[n-1];e.push(xo[u>>2]+xo[(3&u)<<4]+"==")}else if(2===i){var s=t[n-2],f=t[n-1];e.push(xo[s>>2]+xo[(3&s)<<4|f>>4]+xo[(15&f)<<2]+"=")}return e.join("")}(new k(t))}var uu=new k([0]).buffer,su=function(){function t(){this.kb=void 0,this.kb=[]}var n=t.prototype;return n.Eb=function(t){for(var n,i=Rt(this.kb);!(n=i()).done;){if(eu(n.value[0],t))return!0}return!1},n.xb=function(t){for(var n,i=Rt(this.kb);!(n=i()).done;){var e=n.value;if(eu(e[0],t))return e[1]}},n.Pb=function(t,n){for(var i,e=Rt(this.kb);!(i=e()).done;){var r=i.value;if(eu(r[0],t))return void(r[1]=n)}this.kb.push([t,n])},n.Rb=function(t,n){this.kb.forEach(function(n){return t(n[1],n[0])},n)},n.Ib=function(){an(this.kb)},It(t,[{key:"Tb",get:function(){return this.kb.length}}]),t}();x(),pt();var fu=function(){function t(){var t=this;this.Od=void 0,this.Of=void 0,this.Ff=void 0,this.Od=new tt(function(n,i){t.Of=n,t.Ff=i})}var n=t.prototype;return n.uf=function(t){this.Of&&(this.Of(t),this.Ku())},n.Cb=function(t){this.Ff&&(this.Ff(t),this.Ku())},n.dd=function(){this.Od.catch(Jt),this.Cb(new bn)},n.jm=function(t){var n=this;t.then(function(t){return n.uf(t)},function(t){return n.Cb(t)})},n.Ku=function(){this.Of=void 0,this.Ff=void 0},t}();function hu(t,n){return t===to?function(t){if(t.byteLength<2*cu.length)return t;var n=new DataView(t,0,2*cu.length),i=Yo(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+ou(t)+i;return function(t,n){void 0===n&&(n=!1);var i=new k(2*t.length);return jo($o(i),new tu,t,n),i}(e,!0).buffer}(t)}(n):n}x(),pt();var cu="<PlayReady";x(),pt(),x(),pt();var au=function(t){function n(n,i,e,r){var o;return(o=t.call(this,n,r)||this).Db=void 0,o.Nb=void 0,o.Db=i,o.Nb=e,o}return Tt(n,t),n}(wn);x(),pt(),x(),pt(),x(),pt(),x(),pt(),x(),pt();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(),pt(),x(),pt(),x(),pt(),x(),pt(),x(),pt(),x(),pt(),x(),pt();!function(){function t(t,n){this.Bb=t,this.Mb=n}t.prototype.get=function(t){var n=this.Bb.get(t);if(0===this.Mb||void 0===n)return n;var i=this.Bb.get(t+1)||0,e=n&(1<<8-this.Mb)-1,r=i>>8-this.Mb;return(e<<this.Mb)+r},t.prototype.getBit=function(t){if(!(t<0)){var n=this.Bb.get(y.floor((t+this.Mb)/8));if(void 0!==n)return(n&1<<7-this.Mb-t%8)>0?1:0}},p.defineProperty(t.prototype,"bitLength",{get:function(){return this.Bb.bitLength-this.Mb},enumerable:!1,configurable:!0}),p.defineProperty(t.prototype,"length",{get:function(){return this.Bb.length},enumerable:!1,configurable:!0})}();x(),pt(),x(),pt();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.Lb=t,this.Ob=0,this.Fb=0}return p.defineProperty(t.prototype,"totalBitsRead",{get:function(){return 8*this.Ob+this.Fb},enumerable:!1,configurable:!0}),p.defineProperty(t.prototype,"done",{get:function(){return this.Ob===this.Lb.length&&0===this.Fb},enumerable:!1,configurable:!0}),p.defineProperty(t.prototype,"location",{get:function(){return{byte:this.Ob,bit:this.Fb}},enumerable:!1,configurable:!0}),t.prototype.copy=function(){var n=new t(this.Lb);return n.seek(this.Ob,this.Fb),n},t.prototype.canReadBits=function(t){return 8*this.Ob+t+this.Fb<=8*this.Lb.length},t.prototype.canReadBytes=function(t){return 0===this.Fb?this.Ob+t<=this.Lb.length:this.Ob+t<this.Lb.length},t.prototype.incBit=function(){this.Fb++,this.Fb>7&&(this.Ob++,this.Fb=0)},t.prototype.seek=function(t,n){this.Ob=t,this.Fb=n},t.prototype.peekBit=function(){if(!this.canReadBits(1))throw new g("Cannot read past end of buffer.");return this.Lb.get(this.Ob)>>7-this.Fb&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.Fb)return this.Lb.get(this.Ob++);var t=gu(this.Lb.get(this.Ob),8-this.Fb),n=bu(this.Lb.get(this.Ob+1),this.Fb);return this.Ob++,t<<this.Fb|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.Fb&&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.Fb+t;this.Ob+=n>>3,this.Fb=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(),pt(),x(),pt(),x(),pt();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.Ub=[],this.Vb=[],this.Hb=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.Vb.length)this.Vb.push(0);else{var e=this.Vb[this.Vb.length-1]+this.Ub[this.Ub.length-1].length;this.Vb.push(e)}this.Ub.push(t.subarray(n,n+i)),this.Hb+=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.Ub;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.Ub=[],this.Vb=[],this.Hb=0},t.prototype.get=function(t){if(!(t<0||t>=this.length)){var n=this.findContainingBufferIndex(t),i=t-this.Vb[n];return this.Ub[n][i]}},p.defineProperty(t.prototype,"first",{get:function(){return this.get(0)},enumerable:!1,configurable:!0}),t.prototype.indexOf=function(t){if(this.Ub.length<1)return-1;if(this.Ub.length>1){var n=this.join();this.clear(),this.pushRange(n)}var i=this.Ub[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.Vb,t,pu)},t.prototype.join=function(){if(1===this.Ub.length)return this.Ub[0];var t=new k(this.length);return this.copyInternal(t,0),t},p.defineProperty(t.prototype,"length",{get:function(){return this.Hb},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.Ub[u],f=e,h=f-this.Vb[u];f+s.length-h<r;)o.pushRange(s,h,s.length-h),u+=1,h=(f+=s.length-h)-this.Vb[u],s=this.Ub[u];var c=r-f;return o.pushRange(s,h,c),o},t.prototype.trim=function(){if(0===this.length)return new t;for(var n=this.length-1,i=this.Ub.length-1,e=this.Ub[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.Ub[i]).length-1}else r-=1;n-=1}return this.slice(0,n+1)},t}(),_u=function(){function t(n){this.qb=n||t.BUFFER_CHUNK_SIZE,this.Wb=!1,this.zb=new yu,this.Lb=new k(this.qb),this.Gb=0,this.Xb=0,this.Fb=7}return t.prototype.closeByte=function(){this.Lb[this.Gb++]=this.Xb,this.Gb>=this.qb&&this.closeBuffer(),this.Xb=0,this.Fb=7},t.prototype.closeBuffer=function(t){void 0===t&&(t=!0),0!==this.Gb&&(this.zb.pushRange(this.Lb,0,this.Gb),t&&(this.Lb=new k(this.qb)),this.Gb=0)},p.defineProperty(t.prototype,"isWritingStartBit",{get:function(){return 7===this.Fb},enumerable:!1,configurable:!0}),t.prototype.close=function(){if(this.Wb)throw new g("Cannot close a closed BitWriter.");return this.isWritingStartBit||this.closeByte(),this.closeBuffer(!1),this.Wb=!0,this.zb},t.prototype.writeBit=function(t){if(this.Wb)throw new g("Cannot write to a closed BitWriter.");this.Xb|=t<<this.Fb,0===this.Fb?this.closeByte():this.Fb--},t.prototype.writeByte=function(t){if(this.Wb)throw new g("Cannot write to a closed BitWriter.");this.isWritingStartBit?(this.Xb=t,this.closeByte()):this.writeByteUnaligned(t)},t.prototype.writeByteUnaligned=function(t){var n=this.Fb;this.Xb|=bu(t,n+1),this.closeByte(),this.Xb=gu(t,8-n)<<n+1,this.Fb=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.Wb)throw new g("Cannot write to a closed BitWriter.");this.isWritingStartBit?this.writeBytesAligned(t):this.writeBytesUnaligned(t)},t.prototype.writeBytesAligned=function(t){this.Gb+t.length<=this.qb?(this.Lb.set(t,this.Gb),this.Gb+=t.length,this.Gb===this.qb&&this.closeBuffer()):(this.closeBuffer(),this.zb.pushRange(t))},t.prototype.writeBytesUnaligned=function(t){if(0!==t.length){var n=this.Fb;this.Xb|=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.Xb=e<<n+1|r,this.closeByte()}this.Xb=gu(t[t.length-1],8-n)<<n+1,this.Fb=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 k(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(),pt();var Su=function(){function t(t){this.rb=new yu,this.Xf=t}return t.prototype.closeWriter=function(){void 0!==this.Xf&&(this.rb=this.rb.concat(this.Xf.close()),this.Xf=void 0)},p.defineProperty(t.prototype,"writer",{get:function(){return void 0===this.Xf&&(this.Xf=new _u),this.Xf},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 ku(t,n){return B(t,Kn)?64===n:t<y.pow(2,n)}function Iu(t,n){return y.round(t*y.pow(2,n))}function Eu(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(),pt(),M();var Ou=function(t){function n(n,i,e){var r=t.call(this,n)||this;if(r.version=i,!ku(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.jb},set:function(t){this.jb=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(),pt(),x(),pt();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(),pt(),x(),pt();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(),pt();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 Fu(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=Fu(t,n,i),r=Fu(t,n,i),o=i?r:e,u=i?e:r;return Kn.fromBits(u,o,!0)}function Uu(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 128&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=e,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 k(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 k(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(),pt();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 Fu(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=Fu(t,n,i),r=Fu(t,n,i),o=i?r:e,u=i?e:r;return Kn.fromBits(u,o,!1)}(this.data,this.cursor)},t.prototype.nextUint64=function(){return Lu(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(Fu(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 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}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(!Mu(t,n,8)){return{complete:!1,neededOffset:o=n.offset+8}}var e=Fu(t,n),r=Uu(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=Lu(t,n).toNumber()}if("uuid"===r){if(!Mu(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 ju(Hu(t,i,u),new Xu(r.headerSize))};return n.seek(u),{complete:!0,box:f}}function $u(t){return{version:t>>24,flags:new Cu(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: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 ts(t){return new Nu(t.type,Vu(qu(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 du(n,t),p.defineProperty(n.prototype,"handlerType",{get:function(){return this.Qb},set:function(t){this.Qb=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 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}du(n,t),n.prototype.serializeReserved=function(t){t.writer.writeString("appl"),t.writer.writeUInt(0,32),t.writer.writeUInt(0,32)}}(ns);x(),pt(),x(),pt(),x(),pt();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.Kb},set:function(t){if(!ku(t,8))throw new g("Provided tag does not fit in 8 bits.");this.Kb=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(),pt();!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.Yb},set:function(t){if(!ku(t,8))throw new g("Provided objectTypeIndication does not fit in 8 bits.");this.Yb=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"streamType",{get:function(){return this.Jb},set:function(t){if(!ku(t,6))throw new g("Provided streamType does not fit in 6 bits.");this.Jb=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"bufferSizeDb",{get:function(){return this.Zb},set:function(t){if(!ku(t,24))throw new g("Provided bufferSizeDb does not fit in 24 bits.");this.Zb=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"maxBitrate",{get:function(){return this.$b},set:function(t){if(!ku(t,32))throw new g("Provided maxBitrate does not fit in 32 bits.");this.$b=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"avgBitrate",{get:function(){return this.tA},set:function(t){if(!ku(t,32))throw new g("Provided avgBitrate does not fit in 32 bits.");this.tA=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(),pt();!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))}}(es);x(),pt(),x(),pt();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 du(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}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.iA},set:function(t){if(!ku(t,16))throw new g("Provided esId does not fit in 16 bits.");this.iA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"streamPriority",{get:function(){return this.eA},set:function(t){if(!ku(t,5))throw new g("Provided streamPriority does not fit in 5 bits.");this.eA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"dependsOnEsId",{get:function(){return this.sA},set:function(t){if(t&&!ku(t,16))throw new g("Provided dependsOnEsId does not fit in 16 bits.");this.sA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"ocrEsId",{get:function(){return this.nA},set:function(t){if(t&&!ku(t,16))throw new g("Provided ocrEsId does not fit in 16 bits.");this.nA=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(),pt(),x(),pt(),x(),pt(),x(),pt(),x(),pt();var os=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),us=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}(os),ss=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.rA},set:function(t){if(!ku(t,16))throw new g("Provided dataReferenceIndex does not fit in 16 bits.");this.rA=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 du(n,t),p.defineProperty(n.prototype,"channelCount",{get:function(){return this.oA},set:function(t){if(!ku(t,16))throw new g("Provided channelCount does not fit in 16 bits.");this.oA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"sampleSize",{get:function(){return this.hA},set:function(t){if(!ku(t,16))throw new g("Provided sampleSize does not fit in 16 bits.");this.hA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"sampleRate",{get:function(){return this.aA},set:function(t){if(!ku(Iu(t,16),32))throw new g("Provided rate does not fit in 32 bits (fixed 16.16).");this.aA=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&&Eu(n.writer,this.extra)},n}(ss);x(),pt();!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.uA},set:function(t){if(!ku(t.length,32))throw new g("Number of allowed entries cannot fit in 32 bits.");if(t.some(function(t){return!ku(t,32)}))throw new g("Not all entries can be represented in 32 bits.");this.uA=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(),pt();!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.cA},set:function(t){if(!ku(t,32))throw new g("Provided cleanApertureWidthN does not fit in 32 bits.");this.cA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"cleanApertureWidthD",{get:function(){return this.dA},set:function(t){if(!ku(t,32))throw new g("Provided cleanApertureWidthD does not fit in 32 bits.");this.dA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"cleanApertureHeightN",{get:function(){return this.lA},set:function(t){if(!ku(t,32))throw new g("Provided cleanApertureHeightN does not fit in 32 bits.");this.lA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"cleanApertureHeightD",{get:function(){return this.fA},set:function(t){if(!ku(t,32))throw new g("Provided cleanApertureHeightD does not fit in 32 bits.");this.fA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"horizOffN",{get:function(){return this.vA},set:function(t){if(!ku(t,32))throw new g("Provided horizOffN does not fit in 32 bits.");this.vA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"horizOffD",{get:function(){return this._A},set:function(t){if(!ku(t,32))throw new g("Provided horizOffD does not fit in 32 bits.");this._A=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"vertOffN",{get:function(){return this.gA},set:function(t){if(!ku(t,32))throw new g("Provided vertOffN does not fit in 32 bits.");this.gA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"vertOffD",{get:function(){return this.mA},set:function(t){if(!ku(t,32))throw new g("Provided vertOffD does not fit in 32 bits.");this.mA=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(),pt();!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.uA},set:function(t){if(!ku(t.length,32))throw new g("Number of allowed entries cannot fit in 32 bits.");if(t.some(function(t){return!ku(t.sampleCount,32)||!ku(t.sampleOffset,32)}))throw new g("Not all entries can be represented in 64 bits.");this.uA=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(),pt();!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.pA},set:function(t){this.flags=void 0===t?1:0,this.pA=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(),pt();!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.pA},set:function(t){if(1&this.flags)throw new g("The moov containment flag is set, a DataEntryUrlBox should be used instead.");this.pA=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(),pt();!function(t){function n(){return t.call(this,"dinf")||this}du(n,t)}(us);x(),pt(),x(),pt();var hs=function(t){function n(n,i,e){var r=t.call(this,n)||this;if(r.version=i,!ku(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.jb},set:function(t){this.jb=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}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(),pt(),x(),pt();var cs=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.uA},set:function(t){for(var n=0,i=t;n<i.length;n++){var e=i[n];if(!ku(e.segmentDuration,this.bitSize))throw new g("SegmentDuration of one of the entries does not fit in ".concat(this.bitSize," bits."));if(!ku(e.mediaTime,this.bitSize))throw new g("MediaTime of one of the entries does not fit in ".concat(this.bitSize," bits."));if(!ku(e.mediaRateInteger,16))throw new g("Provided mediaRateInteger does not fit in 16 bits.");if(e.mediaRateFraction&&!ku(e.mediaRateFraction,16))throw new g("Provided mediaRateFraction does not fit in 16 bits.")}this.uA=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),as=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}(cs),vs=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}(cs);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,h=void 0;0===e?(f=n.nextUint32(),h=n.nextInt32()):(f=n.nextUint64(),h=n.nextInt64());var c=n.nextInt16(),a=n.nextInt16();u.push({segmentDuration:f,mediaTime:h,mediaRateFraction:a,mediaRateInteger:c})}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 du(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];Yu(r,"elst")?n.boxes.push(ds(r)):n.boxes.push(ts(r))}return n}x(),pt(),x(),pt();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 du(n,t),p.defineProperty(n.prototype,"majorBrand",{get:function(){return this.wA},set:function(t){if(4!==t.length)throw new g("the provided major brand does not conform to the 4 character requirement");this.wA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"minorVersion",{get:function(){return this.yA},set:function(t){if(!ku(t,32))throw new g("the provided minor version does not fit in 32 bits.");this.yA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"compatibleBrands",{get:function(){return this.bA},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.bA=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)}(bs);x(),pt();!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(),pt(),x(),pt();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 du(n,t),p.defineProperty(n.prototype,"creationTime",{get:function(){return this.AA},set:function(t){if(!ku(t,this.bitSize))throw new g("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.AA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"modificationTime",{get:function(){return this.SA},set:function(t){if(!ku(t,this.bitSize))throw new g("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.SA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"timescale",{get:function(){return this.TA},set:function(t){if(!ku(t,32))throw new g("Provided sequence number does not fit in 32 bits.");this.TA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"duration",{get:function(){return this.md},set:function(t){if(!ku(t,this.bitSize))throw new g("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.md=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"language",{get:function(){return this.kA},set:function(t){if(!_s(t))throw new g("Expected an ISO-639-2/T language code");this.kA=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),ms=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}(gs),ps=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}(gs);function ys(t){var n=t.data,i=$u(n.nextUint32()),e=i.version,r=i.flags,o=Zu(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 h=s.map(function(t){return String.fromCharCode(t+96)}).join("");return _s(h)||(h="und"),n.skip(2),0===e?new ms(o,h,r.raw):new ps(o,h,r.raw)}function _s(t){return/^[a-z]{3}$/.test(t)}var Ss=function(t){function n(){return t.call(this,"mdia")||this}return du(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];Yu(r,"mdhd")?n.boxes.push(ys(r)):Yu(r,"hdlr")?n.boxes.push(is(r)):n.boxes.push(ts(r))}return n}x(),pt();!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(),pt();!function(t){function n(){return t.call(this,"minf")||this}du(n,t)}(us);x(),pt();var ks;!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(),pt(),x(),pt(),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"}(ks||(ks={})),x(),pt();var Is,Es,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(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 Ns(t,n){var i,e,r,o;n.writer.writeUInt(null!==(i=t.isLeading)&&void 0!==i?i:Is.UNKNOWN,2),n.writer.writeUInt(null!==(e=t.sampleDependsOn)&&void 0!==e?e:Es.UNKNOWN,2),n.writer.writeUInt(null!==(r=t.sampleIsDependedOn)&&void 0!==r?r:Es.UNKNOWN,2),n.writer.writeUInt(null!==(o=t.sampleHasRedundancy)&&void 0!==o?o:Es.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(),pt(),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"}(Is||(Is={})),function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.YES=1]="YES",t[t.NO=2]="NO",t[t.RESERVED=3]="RESERVED"}(Es||(Es={})),x(),pt(),x(),pt();var As=function(){};x(),pt(),x(),pt(),x(),pt();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 du(n,t),p.defineProperty(n.prototype,"systemId",{get:function(){return this.EA},set:function(t){if(16!==t.length)throw new g("Provided systemId length is not 16.");this.EA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"data",{get:function(){return this.Lp},set:function(t){if(!ku(t.length,32))throw new g("Provided data length does not fit in 32 bits.");this.Lp=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),Cs=function(t){function n(n,i){return t.call(this,0,n,i)||this}return du(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 du(n,t),p.defineProperty(n.prototype,"kIds",{get:function(){return this.xA},set:function(t){if(!ku(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.xA=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}(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(),pt(),x(),pt();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 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.PA},set:function(t){if(!ku(t,this.bitSize))throw new g("The provided fragmentDuration does not fit in ".concat(this.bitSize," bits."));this.PA=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.bitSize/8},n}(Ou),Fs=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}(Ms),Ls=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}(Ms);function Us(t){var n=t.data,i=$u(n.nextUint32()),e=i.version,r=i.flags;return 0===e?new Fs(n.nextUint32(),r.raw):new Ls(n.nextUint64(),r.raw)}x(),pt();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 du(n,t),p.defineProperty(n.prototype,"trackId",{get:function(){return this.RA},set:function(t){if(!ku(t,32))throw new g("Provided track id does not fit in 32 bits.");this.RA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"defaultSampleDescriptionIndex",{get:function(){return this.IA},set:function(t){if(!ku(t,32))throw new g("Provided default sample description index does not fit in 32 bits.");this.IA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"defaultSampleDuration",{get:function(){return this.CA},set:function(t){if(!ku(t,32))throw new g("Provided default sample duration does not fit in 32 bits.");this.CA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"defaultSampleSize",{get:function(){return this.DA},set:function(t){if(!ku(t,32))throw new g("Provided default sample size does not fit in 32 bits.");this.DA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"defaultSampleFlags",{get:function(){return this.NA},set:function(t){if((null==t?void 0:t.samplePaddingValue)&&!ku(t.samplePaddingValue,3))throw new g("Provided sample padding value does not fit in 3 bits.");if((null==t?void 0:t.sampleDegradationPriority)&&!ku(t.sampleDegradationPriority,16))throw new g("Provided sample degradation priority does not fit in 16 bits.");this.NA=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}(Ou);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(),h=Ju(new mu(yu.from(n.nextUint8Array(4))));return new zs(o,{sampleDescriptionIndex:u,sampleDuration:s,sampleSize:f,sampleFlags:h},e,r.raw)}var Vs=function(t){function n(){return t.call(this,"mvex")||this}return du(n,t),n}(us);function Hs(t){for(var n=new Vs,i=0,e=Ku(t.data);i<e.length;i++){var r=e[i];Yu(r,"mehd")?n.boxes.push(Us(r)):Yu(r,"trex")?n.boxes.push(Ws(r)):n.boxes.push(ts(r))}return n}x(),pt();var qs=function(t){function n(i,e,r,o,u){void 0===u&&(u=0);var s,f,h,c=this;return(c=t.call(this,"mvhd",o,u)||this).creationTime=i.creation,c.modificationTime=i.modification,c.timescale=i.scale,c.duration=i.duration,c.rate=null!==(s=r.rate)&&void 0!==s?s:n.DEFAULT_RATE,c.volume=null!==(f=r.volume)&&void 0!==f?f:n.DEFAULT_VOLUME,c.matrix=null!==(h=r.matrix)&&void 0!==h?h:Rs,c.BA=e,c}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.AA},set:function(t){if(!ku(t,this.bitSize))throw new g("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.AA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"modificationTime",{get:function(){return this.SA},set:function(t){if(!ku(t,this.bitSize))throw new g("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.SA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"timescale",{get:function(){return this.TA},set:function(t){if(!ku(t,32))throw new g("Provided sequence number does not fit in 32 bits.");this.TA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"duration",{get:function(){return this.md},set:function(t){if(!ku(t,this.bitSize))throw new g("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.md=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"rate",{get:function(){return this.MA},set:function(t){if(!ku(Iu(t,16),32))throw new g("Provided rate does not fit in 32 bits (fixed 16.16).");this.MA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"volume",{get:function(){return this.LA},set:function(t){if(!ku(Iu(t,8),16))throw new g("Provided volume does not fit in 16 bits (fixed 8.8).");this.LA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"matrix",{get:function(){return this.OA},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.OA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"nextTrackId",{get:function(){return this.BA},set:function(t){if(0===t)throw new g("NextTrackId cannot be 0.");if(!ku(t,32))throw new g("NextTrackId cannot exceed 32 bits.");this.BA=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),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}(Ou),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 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}(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 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}(qs);function Ys(t){var n=t.data,i=$u(n.nextUint32()),e=i.version,r=i.flags,o=Zu(n,e),u=Ru(n.nextUint32(),16),s=Ru(n.nextUint16(),8);n.skip(2),n.skip(8);var f=Qu(n);n.skip(24);var h=n.nextUint32();return 0===e?new Xs(o,h,{rate:u,volume:s,matrix:f},r.raw):new js(o,h,{rate:u,volume:s,matrix:f},r.raw)}x(),pt(),x(),pt();var Ks=function(t){function n(n,i,e,r,o,u,s){void 0===s&&(s={});var f,h,c,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!==(h=s.alternateGroup)&&void 0!==h?h:0,a.matrix=null!==(c=s.matrix)&&void 0!==c?c:Rs,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.AA},set:function(t){if(!ku(t,this.bitSize))throw new g("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.AA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"modificationTime",{get:function(){return this.SA},set:function(t){if(!ku(t,this.bitSize))throw new g("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.SA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"trackId",{get:function(){return this.RA},set:function(t){if(0===t)throw new g("trackId cannot be 0.");if(!ku(t,32))throw new g("trackId cannot exceed 32 bits.");this.RA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"duration",{get:function(){return this.md},set:function(t){if(!ku(t,this.bitSize))throw new g("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.md=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"volume",{get:function(){return this.LA},set:function(t){if(!ku(Iu(t,8),16))throw new g("Provided volume does not fit in 16 bits (fixed 8.8).");this.LA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"width",{get:function(){return this._c},set:function(t){if(!ku(Iu(t,16),32))throw new g("Provided width does not fit in 32 bits (fixed 16.16).");this._c=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"height",{get:function(){return this.xc},set:function(t){if(!ku(Iu(t,16),32))throw new g("Provided height does not fit in 32 bits (fixed 16.16).");this.xc=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"layer",{get:function(){return this.FA},set:function(t){if(!ku(t,16))throw new g("Provided layer does not fit in 16 bits.");this.FA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"alternateGroup",{get:function(){return this.UA},set:function(t){if(!ku(t,16))throw new g("Provided alternateGroup does not fit in 16 bits.");this.UA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"matrix",{get:function(){return this.OA},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.OA=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),Os(this.matrix,n),n.writer.writeUInt(Iu(this.width,16),32),n.writer.writeUInt(Iu(this.height,16),32)},n}(Ou),Gs=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}(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 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}(Ks);function Zs(t){var n,i,e,r,o=t.data,u=$u(o.nextUint32()),s=u.version,f=u.flags,h=f.isSet(8),c=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=Qu(o),g=Ru(o.nextUint32(),16),m=Ru(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:h,trackEnabled:v,trackInPreview:c,trackInMovie:a}):new $s({creation:n,modification:i,duration:r},e,w,g,m,{layer:d,matrix:b,alternateGroup:l,trackSizeIsAspectRatio:h,trackEnabled:v,trackInPreview:c,trackInMovie:a})}var Js=function(t){function n(){return t.call(this,"trak")||this}return du(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];Yu(r,"tkhd")?n.boxes.push(Zs(r)):Yu(r,"mdia")?n.boxes.push(Ts(r)):Yu(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 du(n,t),n}(us);x(),pt(),x(),pt(),x(),pt();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 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.VA},set:function(t){if(!ku(t,this.bitSize))throw new g("Provided baseMediaDecodeTime 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),ef=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}(nf),rf=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}(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(),pt();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 du(n,t),p.defineProperty(n.prototype,"trackId",{get:function(){return this.RA},set:function(t){if(!ku(t,32))throw new g("Provided track id does not fit in 32 bits.");this.RA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"baseDataOffset",{get:function(){return this.HA},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&&!ku(t,64))throw new g("Provided baseDataOffset does not fit in 32 bits.");this.HA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"sampleDescriptionIndex",{get:function(){return this.qA},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&&!ku(t,32))throw new g("Provided sampleDescriptionIndex does not fit in 32 bits.");this.qA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"defaultSampleDuration",{get:function(){return this.CA},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&&!ku(t,32))throw new g("Provided defaultSampleDuration does not fit in 32 bits.");this.CA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"defaultSampleSize",{get:function(){return this.DA},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&&!ku(t,32))throw new g("Provided defaultSampleSize does not fit in 32 bits.");this.DA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"defaultSampleFlags",{get:function(){return this.NA},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)&&!ku(t.samplePaddingValue,3))throw new g("Provided sample padding value does not fit in 3 bits.");if((null==t?void 0:t.sampleDegradationPriority)&&!ku(t.sampleDegradationPriority,16))throw new g("Provided sample degradation priority does not fit in 16 bits.");this.NA=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}(Ou);function sf(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 h=Boolean(e.readBit()),c=Boolean(e.readBit()),a=n.nextUint32(),v=c?n.nextUint64():void 0,d=h?n.nextUint32():void 0,l=f?n.nextUint32():void 0,w=s?n.nextUint32():void 0,b=u?Ju(new mu(yu.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(),pt();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 du(n,t),p.defineProperty(n.prototype,"dataOffset",{get:function(){return this.WA},set:function(t){if(t&&!ku(t,32))throw new g("Provided data offset does not fit in 32 bits.");this.WA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"firstSampleFlags",{get:function(){return this.zA},set:function(t){if((null==t?void 0:t.samplePaddingValue)&&!ku(t.samplePaddingValue,3))throw new g("Provided sample padding value does not fit in 3 bits.");if((null==t?void 0:t.sampleDegradationPriority)&&!ku(t.sampleDegradationPriority,16))throw new g("Provided sample degradation priority does not fit in 16 bits.");this.zA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"samples",{get:function(){return this.GA},set:function(t){var n,i;if(!ku(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&&!ku(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&&!ku(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)&&!ku(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)&&!ku(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&&!ku(o.compositionTimeOffset,32))throw new g("Provided sample compositionTimeOffset does not fit in 32 bits.")}this.GA=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}(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 h=Boolean(e.readBit()),c=n.nextUint32(),a={sampleDurationPresent:s,sampleSizePresent:u,sampleFlagsPresent:o,sampleCompositionTimeOffsetsPresent:r};h&&(a.dataOffset=n.nextInt32()),f&&(a.firstSampleFlags=Ju(new mu(yu.from(n.nextUint8Array(4)))));for(var v=[],d=0;d<c;d++){var l={};s&&(l.duration=n.nextUint32()),u&&(l.size=n.nextUint32()),o&&(l.flags=Ju(new mu(yu.from(n.nextUint8Array(4))))),r&&(l.compositionTimeOffset=0===i?n.nextUint32():n.nextInt32()),v.push(l)}return new ff(i,a,v)}var cf=function(t){function n(){return t.call(this,"traf")||this}return du(n,t),n}(us);function af(t){for(var n=new cf,i=0,e=Ku(t.data);i<e.length;i++){var r=e[i];Yu(r,"tfhd")?n.boxes.push(sf(r)):Yu(r,"tfdt")?n.boxes.push(of(r)):Yu(r,"trun")?n.boxes.push(hf(r)):n.boxes.push(ts(r))}return n}var vf=function(t){function n(){return t.call(this,"moof")||this}return du(n,t),n}(us);x(),pt();!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.XA},set:function(t){if(!ku(t,32))throw new g("Provided sequence number does not fit in 32 bits.");this.XA=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(),pt();var df=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.jA},set:function(t){if(4!==t.length)throw new g("Provided coding name was not 4 characters long.");this.jA=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return 4},n.prototype.serializeBoxContent=function(t){t.writer.writeString(this.codingName)},n}(Tu);x(),pt();!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.QA},set:function(t){if(!ku(t,32))throw new g("Provided hSpacing does not fit in 32 bits.");this.QA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"vSpacing",{get:function(){return this.KA},set:function(t){if(!ku(t,32))throw new g("Provided vSpacing does not fit in 32 bits.");this.KA=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(),pt();!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())}}(us);x(),pt();!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}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(),pt();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 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.uA},set:function(t){var n=this;if(!ku(t.length,32))throw new g("Number of entries provided does not fit in 32 bits.");if(t.some(function(t){return!ku(t,n.bitSize)}))throw new g("Not all provided entries fit in ".concat(this.bitSize," bits."));this.uA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"explicitAuxInfoType",{get:function(){return this.YA},set:function(t){if(void 0===t)this.flags=0;else{if(!ku(t.auxInfoType,32))throw new g("Provided auxInfoType does not fit in 32 bits.");if(!ku(t.auxInfoTypeParameter,32))throw new g("Provided auxInfoTypeParameter does not fit in 32 bits.");this.flags=1}this.YA=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)}}})(lf),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)}}}(lf);x(),pt();!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.JA},set:function(t){if(!ku(t,8))throw new g("Provided defaultSampleInfoSize does not fit in a single byte.");this.JA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"sampleInfoSizes",{get:function(){return this.ZA},set:function(t){if(!ku(t.length,32))throw new g("Number of sampleInfoSizes provided does not fit in 32 bits.");if(t.some(function(t){return!ku(t,8)}))throw new g("Not all provided sampleInfoSizes fit in a byte.");this.ZA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"explicitAuxInfoType",{get:function(){return this.YA},set:function(t){if(void 0===t)this.flags=0;else{if(!ku(t.auxInfoType,32))throw new g("Provided auxInfoType does not fit in 32 bits.");if(!ku(t.auxInfoTypeParameter,32))throw new g("Provided auxInfoTypeParameter does not fit in 32 bits.");this.flags=1}this.YA=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(),pt();!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++){Ns(e[i],n)}}}(Ou);x(),pt();!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(),pt();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 du(n,t),p.defineProperty(n.prototype,"groupingType",{get:function(){return this.$A},set:function(t){if(4!==t.length)throw new g("The provided groupingType does not equal 4 characters.");this.$A=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){}})(wf),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.tS},set:function(t){if(!ku(t,32))throw new g("The provided defaultLength does not fit in 32 bits.");this.tS=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}du(n,t),p.defineProperty(n.prototype,"defaultSampleDescriptionIndex",{get:function(){return this.IA},set:function(t){if(!ku(t,32))throw new g("The provided defaultSampleDescriptionIndex does not fit in 32 bits.");this.IA=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(),pt();(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.iS},set:function(t){if(!ku(t.length,32))throw new g("Number of allowed samples cannot fit in 32 bits.");if(t.some(function(t){return!ku(t,32)}))throw new g("Not all sampleSizes can be represented in 32 bits.");this.iS=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.DA},set:function(t){if(!ku(t,32))throw new g("Provided defaultSampleSize does not fit in 32 bits.");this.DA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"samples",{get:function(){return this.GA},set:function(t){if(!ku(t,32))throw new g("Number of allowed samples cannot fit in 32 bits.");this.GA=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(),pt();!function(t){function n(){return t.call(this,"stbl")||this}du(n,t)}(us);x(),pt();!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.uA},set:function(t){if(!ku(t.length,32))throw new g("Number of allowed entries cannot fit in 32 bits.");if(t.some(function(t){return!ku(t.firstChunk,32)||!ku(t.sampleDescriptionIndex,32)||!ku(t.samplesPerChunk,32)}))throw new g("Not all entries can be represented in 96 bits.");this.uA=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(),pt();!function(t){function n(){return t.call(this,"schi")||this}du(n,t)}(us);x(),pt();!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.eS},set:function(t){if(4!==t.length)throw new g("The provided schemeType does not have a length of 4.");this.eS=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"schemeVersion",{get:function(){return this.sS},set:function(t){if(!ku(t,32))throw new g("The provided schemeVersion does not fit in 23 bits.");this.sS=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"schemeUri",{get:function(){return this.nS},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.nS=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(),pt();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 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.rS},set:function(t){if(!ku(t,32))throw new g("Provided referenceId does not fit in 32 bits.");this.rS=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"timescale",{get:function(){return this.TA},set:function(t){if(!ku(t,32))throw new g("Provided timescale does not fit in 32 bits.");this.TA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"earliestPresentationTime",{get:function(){return this.oS},set:function(t){if(!ku(t,this.bitSize))throw new g("Provided earliestPresentationTime does not fit in ".concat(this.bitSize," bits."));this.oS=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"firstOffset",{get:function(){return this.hS},set:function(t){if(!ku(t,this.bitSize))throw new g("Provided timescale does not fit in ".concat(this.bitSize," bits."));this.hS=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"references",{get:function(){return this.aS},set:function(t){if(!ku(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(!ku(e.referencedSize,31))throw new g("Provided referenced size does not fit in 31 bits.");if(!ku(e.subsegmentDuration,32))throw new g("Provided subsegment duration does not fit in 31 bits.");if(!ku(e.sapType,3))throw new g("Provided SAP type does not fit in 3 bits.");if(!ku(e.sapDeltaTime,28))throw new g("Provided SAP delta time does not fit in 28 bits.")}this.aS=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),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 du(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 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}(bf);x(),pt();!function(t){function n(n,i,e){return t.call(this,"styp",n,i,e)||this}du(n,t)}(bs);x(),pt();!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.uS},set:function(t){if(t<-1||t>1)throw new g("Provided balance does not fit in the allowed range [-1, 1].");if(!ku(Iu(t,8),16))throw new g("Provided balance does not fit in 16 bits (fixed 8.8).");this.uS=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(),pt();!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.uA},set:function(t){if(!ku(t.length,32))throw new g("Number of allowed entries cannot fit in 32 bits.");if(t.some(function(t){return!ku(t,32)}))throw new g("Not all entries can be represented in 32 bits.");this.uA=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(),pt();!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.uA},set:function(t){if(!ku(t.length,32))throw new g("Number of allowed entries cannot fit in 32 bits.");if(t.some(function(t){return!ku(t.sampleCount,32)||!ku(t.sampleDelta,32)}))throw new g("Not all entries can be represented in 64 bits.");this.uA=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(),pt();!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.RA},set:function(t){if(!ku(t,32))throw new g("The provided trackId does not fit in 32 bits.");this.RA=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(),pt();!function(t){function n(){return t.call(this,"udta")||this}du(n,t)}(us);x(),pt();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}du(n,t),p.defineProperty(n.prototype,"opColor",{get:function(){return this.cS},set:function(t){if(!ku(t.red,16)||!ku(t.green,16)||!ku(t.blue,16))throw new g("Not all colors could be represented in 16 bits.");this.cS=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(),pt();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,h,c,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!==(h=r.frameCount)&&void 0!==h?h:1,a.depth=null!==(c=r.depth)&&void 0!==c?c: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._c},set:function(t){if(!ku(t,16))throw new g("Provided width does not fit in 16 bits.");this._c=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"height",{get:function(){return this.xc},set:function(t){if(!ku(t,16))throw new g("Provided height does not fit in 16 bits.");this.xc=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"horizontalResolution",{get:function(){return this.dS},set:function(t){if(!ku(Iu(t,16),32))throw new g("Provided horizontalResolution does not fit in 32 bits (fixed 16.16).");this.dS=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"verticalResolution",{get:function(){return this.lS},set:function(t){if(!ku(Iu(t,16),32))throw new g("Provided verticalResolution does not fit in 32 bits (fixed 16.16).");this.lS=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"compressorName",{get:function(){return this.fS},set:function(t){if(t.length>31)throw new g("The provided compressorName should at most be 31 characters long.");this.fS=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"frameCount",{get:function(){return this.vS},set:function(t){if(!ku(t,16))throw new g("Provided frameCount does not fit in 16 bits.");this.vS=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"depth",{get:function(){return this._S},set:function(t){if(!ku(t,16))throw new g("Provided depth does not fit in 16 bits.");this._S=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&&Eu(n.writer,this.extra)},n}(ss);x(),pt(),x(),pt(),M();!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)+(B(this.esDescriptor,k)?this.esDescriptor.length:this.esDescriptor.getSize())},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),B(this.esDescriptor,k)?n.concat(yu.from(this.esDescriptor)):this.esDescriptor.serialize(n)}}(Ou);x(),pt();!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())}}(fs);x(),pt();!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)}}(yf);x(),pt();!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)}}(ss);x(),pt(),x(),pt();!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(),pt();!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.gS},set:function(t){if(!ku(t,8))throw new g("Provided version does not fit in 8 bits.");this.gS=t},enumerable:!1,configurable:!0}),p.defineProperty(t.prototype,"profileIndication",{get:function(){return this.mS},set:function(t){if(!ku(t,8))throw new g("Provided profileIndication does not fit in 8 bits.");this.mS=t},enumerable:!1,configurable:!0}),p.defineProperty(t.prototype,"profileCompatibility",{get:function(){return this.pS},set:function(t){if(!ku(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.wS},set:function(t){if(!ku(t,8))throw new g("Provided levelIndication does not fit in 8 bits.");this.wS=t},enumerable:!1,configurable:!0}),p.defineProperty(t.prototype,"spsSets",{get:function(){return this.yS},set:function(t){if(!ku(t.length,5))throw new g("Provided number of spsSets exceeds the max (32)");this.yS=t},enumerable:!1,configurable:!0}),p.defineProperty(t.prototype,"ppsSets",{get:function(){return this.bS},set:function(t){if(!ku(t.length,8))throw new g("Provided number of ppsSets exceeds the max (256)");this.bS=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(),pt();!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())}}(yf);x(),pt();!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.Zb},set:function(t){if(!ku(t,32))throw new g("Provided bufferSizeDb does not fit in 32 bits.");this.Zb=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"max",{get:function(){return this.SS},set:function(t){if(!ku(t,32))throw new g("Provided max does not fit in 32 bits.");this.SS=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"avg",{get:function(){return this.TS},set:function(t){if(!ku(t,32))throw new g("Provided avg does not fit in 32 bits.");this.TS=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(),pt(),x(),pt(),x(),pt();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 k(0),s}return du(n,t),p.defineProperty(n.prototype,"isProtected",{get:function(){return this.kS},set:function(t){if(!ku(t,8))throw new g("Provided isProtected does not fit in 1 byte.");this.kS=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"perSampleIvSize",{get:function(){return this.ES},set:function(t){if(![8,16].includes(t))throw new g("Provided perSampleIvSize does not match any allowed value [8, 16].");this.ES=t,this.xS=new k(0)},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"kId",{get:function(){return this.PS},set:function(t){if(16!==t.length)throw new g("Provided kId length is not 16.");this.PS=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"constantIv",{get:function(){return this.xS},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.xS=t,this.ES=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),Eu(t.writer,this.kId),0===this.perSampleIvSize&&(t.writer.writeByte(this.constantIv.length),Eu(t.writer,this.constantIv))},n}(Ou),Sf=(function(t){function n(n){return t.call(this,0,n)||this}du(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 du(n,t),p.defineProperty(n.prototype,"cryptByteBlocks",{get:function(){return this.RS},set:function(t){if(!ku(t,4))throw new g("Provided cryptByteBlocks does not fit in 4 bits.");this.RS=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"skipByteBlocks",{get:function(){return this.IS},set:function(t){if(!ku(t,4))throw new g("Provided skipByteBlocks does not fit in 4 bits.");this.IS=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}du(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 kf(t){return void 0!==t.subsamples}x(),pt();!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.GA},set:function(t){var n;if(!ku(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=kf(r)),!0===n&&!kf(r)||!1===n&&kf(r))throw new g("Mix of samples with and without subsamples detected.");if(kf(r)){if(!ku(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(!ku(s.clearData,16))throw new g("Subsample clearData of one of the provided samples does not fit in 16 bits.");if(!ku(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.GA=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),kf(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)&&Eu(n.writer,r.iv),kf(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(),pt(),x(),pt();!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.TA},set:function(t){if(!ku(t,32))throw new g("The provided timescale does not fit in 32 bits.");this.TA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"presentationTimeDelta",{get:function(){return this.CS},set:function(t){if(!ku(t,32))throw new g("The provided presentationTimeDelta does not fit in 32 bits.");this.CS=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"eventDuration",{get:function(){return this.DS},set:function(t){if(!ku(t,32))throw new g("The provided eventDuration does not fit in 32 bits.");this.DS=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"id",{get:function(){return this.NS},set:function(t){if(!ku(t,32))throw new g("The provided id does not fit in 32 bits.");this.NS=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(),pt(),x(),pt(),x(),pt();!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 If(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=Gu(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)}}If("moov",function(t){for(var n=new tf,i=0,e=Ku(t.data);i<e.length;i++){var r=e[i];Yu(r,"mvhd")?n.boxes.push(Ys(r)):Yu(r,"trak")?n.boxes.push(Qs(r)):Yu(r,"mvex")?n.boxes.push(Hs(r)):Yu(r,"pssh")?n.boxes.push(Bs(r)):n.boxes.push(ts(r))}return n}),If("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 h=e.nextUint16(),c=[],a=0;a<h;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);c.push({referenceType:d,referencedSize:l,subsegmentDuration:w,startsWithSap:b,sapType:g,sapDeltaTime:m})}return 0===o?new gf(s,f,n,i,c,u.raw):new mf(s,f,n,i,c,u.raw)}),If("moof",function(t){for(var n=new vf,i=0,e=Ku(t.data);i<e.length;i++){var r=e[i];Yu(r,"traf")?n.boxes.push(af(r)):Yu(r,"pssh")?n.boxes.push(Bs(r)):n.boxes.push(ts(r))}return n});var Ef=If("pssh",Bs),Rf=function(t){function n(n,i){var e;(e=t.call(this)||this).FS=void 0,e.XS=void 0,e.US=void 0,e.HS=void 0,e.Bf=void 0,e.qS=void 0,e.jS=void 0,e.QS=void 0,e.KS=void 0,e.FS=n,e.XS=i,e.HS=!1,e.jS=function(){e.zS()},e.QS=function(t){e.Co(new Do(e,t.messageType,hu(e.XS,t.message)))},e.KS=function(){e.HS=!0,e.US.Tb>0&&(e.US.Ib(),e.Co(new Ao(e.US))),e.FS.removeEventListener("keystatuseschange",e.jS),e.FS.removeEventListener("message",e.QS)},e.FS.addEventListener("keystatuseschange",e.jS),e.FS.addEventListener("message",e.QS),e.US=new su;var r=[];return e.FS.closed&&r.push(tt.resolve(e.FS.closed)),e.qS=new fu,r.push(e.qS.Od),e.Bf=tt.race(r).then(e.KS,e.KS),e.zS(),e}Tt(n,t);var i=n.prototype;return i.Qs=function(){if(this.HS)return this.Bf;var t=[];return t.push(tt.resolve(this.FS.close())),t.push(yn(1e3)),this.qS.jm(tt.race(t).catch(Of)),this.HS=!0,this.Bf},i.WS=function(t,n,i){if(Ht.H_){var e=Ef(Jo(n));if(1===e.version)n=new Cs(e.systemId,e.data).serialize().join()}return tt.resolve(this.FS.generateRequest(t,n)).catch(Of)},i.Un=function(t){return tt.resolve(this.FS.load(t)).catch(Of)},i.cc=function(){return tt.resolve(this.FS.remove()).catch(Of)},i.rr=function(t){return tt.resolve(this.FS.update(t)).catch(Of)},i.zS=function(){var t=this;this.US.Ib(),this.FS.keyStatuses.forEach(function(n,i){t.GS(i,n)}),this.Co(new Ao(this.US))},i.GS=function(t,n){if("string"==typeof t){var i=t;t=n,n=i}var e=Jo(t);if(this.XS===to&&16===e.byteLength&&(Ht.rg||Ht.nm)){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.XS===to&&"status-pending"===n&&(n="usable"),this.US.Pb(e,n)},It(n,[{key:"MS",get:function(){return this.Bf}},{key:"LS",get:function(){return this.FS.expiration}},{key:"ob",get:function(){return this.US}},{key:"VS",get:function(){return this.FS.sessionId}}]),n}(Eo);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 au(t.message,void 0,n,t)}var Nf=function(){function t(t,n,i){this.JS=void 0,this.ZS=void 0,this.iT=void 0,this.JS=t,this.ZS=n,this.iT=i}var n=t.prototype;return n.YS=function(t){return nn(function(){return en(this,function(n){return[2,new Rf(this.JS.createSession(t),this.ZS)]})}).call(this)},n.$S=function(t){return tt.resolve(this.JS.setServerCertificate(t))},n.xn=function(t){return tt.resolve(t.setMediaKeys(this.JS))},n.tT=function(t){return tt.resolve(t.setMediaKeys(null))},n.ur=function(){return tt.resolve()},t}(),Pf=function(){function t(t,n,i){this.eT=void 0,this.XS=void 0,this.nT=void 0,this.eT=t,this.XS=n,this.nT=i}var n=t.prototype;return n.sT=function(){return nn(function(){var t;return en(this,function(n){switch(n.label){case 0:return[4,this.eT.createMediaKeys()];case 1:return t=n.sent(),[2,new Nf(t,this.XS,this.nT)]}})}).call(this)},n.rT=function(){return this.nT},It(t,[{key:"ZS",get:function(){return this.eT.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,aT:e.aT},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&&!cn(n,e.encryptionScheme))&&(!e.robustness&&t(i,Af(e.contentType))))}function xf(t){if(t.videoCapabilities)for(var n,i=Rt(t.videoCapabilities);!(n=i()).done;){var e=n.value;if(e.contentType)return e.contentType}if(t.audioCapabilities)for(var r,o=Rt(t.audioCapabilities);!(r=o()).done;){var u=r.value;if(u.contentType)return u.contentType}}function Bf(t){for(var n,i=[],e=Rt(t);!(n=e()).done;){var r=n.value;r.encryptionScheme&&i.push({contentType:r.contentType,robustness:r.robustness})}return t.concat(i)}function Mf(t){return!(!t.audioCapabilities||!t.audioCapabilities.some(Ff))||!(!t.videoCapabilities||!t.videoCapabilities.some(Ff))}function Ff(t){return!t.robustness}function Lf(t,n){for(var i,e=[],r=Rt(t);!(i=r()).done;){var o=i.value;o.robustness?e.push(o):e.push(Yr({},o,{robustness:n}))}return e}x(),pt(),x(),pt();var Uf=function(){function t(){}return t.prototype.jw=function(t,n){return nn(function(){var i,e,r,o,u,s,f,h;return en(this,function(c){switch(c.label){case 0:for(n=n.filter(function(t){return!t.aT}),i=Rt(n);!(e=i()).done;)(r=e.value).audioCapabilities&&(r.audioCapabilities=Bf(r.audioCapabilities)),r.videoCapabilities&&(r.videoCapabilities=Bf(r.videoCapabilities));if(t!==eo||!n.some(Mf))return[3,4];o=n.map(function(t){return function(t,n){return Yr({},t,{videoCapabilities:t.videoCapabilities?Lf(t.videoCapabilities,n):void 0,audioCapabilities:t.audioCapabilities?Lf(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,o)];case 2:return u=c.sent(),s=u.getConfiguration(),[2,new Pf(u,t,s)];case 3:return c.sent(),[3,4];case 4:return[4,v.requestMediaKeySystemAccess(t,n)];case 5:return f=c.sent(),h=f.getConfiguration(),[2,new Pf(f,t,h)]}})})()},t.uT=function(){return void 0!==v&&"function"==typeof v.requestMediaKeySystemAccess},t}();x(),pt(),x(),pt(),x(),pt(),x(),pt();var zf=function(t){function n(n,i){var e;return(e=t.call(this)||this).gT=void 0,e.mT=void 0,e.HS=void 0,e.dT=void 0,e.bT=void 0,e.vT=void 0,e.lT=void 0,e.cT=void 0,e.KS=void 0,e.pT=void 0,e.As=void 0,e.wT=void 0,e.gT=n,e.mT=i,e.HS=!1,e.bT=void 0,e.vT=void 0,e.cT=void 0,e.KS=function(){e.HS=!0,e.dT.uf(void 0),e.cT&&(e.cT.removeEventListener("mskeyclose",e.KS),e.cT.removeEventListener("mskeymessage",e.pT),e.cT.removeEventListener("mskeyerror",e.As),e.cT.removeEventListener("mskeyadded",e.wT))},e.pT=function(t){e.vT&&(e.vT.uf(void 0),e.vT=void 0),e.Co(new Do(e,"license-request",Qo(t.message).buffer,t.destinationURL||void 0))},e.As=function(){var t=e.cT&&e.cT.error;if(t){var n=new au("Unknown CDM error",t.code,t.systemCode);if(e.vT)e.vT.Cb(n),e.vT=void 0;else if(e.bT)e.bT.Cb(n),e.bT=void 0;else switch(n.Db){case MSMediaKeyError.MS_MEDIA_KEYERR_OUTPUT:case MSMediaKeyError.MS_MEDIA_KEYERR_HARDWARECHANGE:e.yT("output-not-allowed");break;default:e.yT("internal-error")}}},e.wT=function(){e.vT&&(e.yT("usable"),e.vT.uf(void 0),e.vT=void 0),e.bT&&(e.yT("usable"),e.bT.uf(void 0),e.bT=void 0)},e.dT=new fu,e.lT=new su,e}Tt(n,t);var i=n.prototype;return i.WS=function(t,n,i){return nn(function(){return en(this,function(t){switch(t.label){case 0:return this.fT(),this.vT=new fu,this.YS(Jo(n),i),[4,this.vT.Od];case 1:return t.sent(),[2]}})}).call(this)},i.YS=function(t,n){if(!t)throw new m("Expected initData to be defined but was "+t+".");var i,e=n&&n.playready&&n.playready._T;return(i=n?this.gT.createSession(this.mT,t,e):this.gT.createSession(this.mT,t)).addEventListener("mskeyclose",this.KS),i.addEventListener("mskeymessage",this.pT),i.addEventListener("mskeyerror",this.As),i.addEventListener("mskeyadded",this.wT),this.cT=i,this.yT("status-pending"),i},i.Un=function(t){return nn(function(){return en(this,function(t){return this.fT(),[2,!0]})}).call(this)},i.rr=function(t){return nn(function(){var n;return en(this,function(i){switch(i.label){case 0:if(this.bT=new fu,this.fT(),!this.cT)return[2,tt.resolve()];if(0===(n=Jo(t)).byteLength)throw new m("Cannot call update with an empty response.");return this.cT.update(n),[4,this.bT.Od];case 1:return i.sent(),[2]}})}).call(this)},i.Qs=function(){return!this.HS&&this.cT&&(this.HS=!0,this.cT.close()),this.dT.Od},i.cc=function(){return nn(function(){return en(this,function(t){return this.fT(),[2]})}).call(this)},i.fT=function(){if(this.HS)throw new m("Already closing or closed.")},i.yT=function(t){this.lT.Ib(),this.lT.Pb(uu,t),this.Co(new Ao(this.lT))},It(n,[{key:"VS",get:function(){return this.cT&&this.cT.sessionId||""}},{key:"LS",get:function(){return NaN}},{key:"MS",get:function(){return this.dT.Od}},{key:"ob",get:function(){return this.lT}}]),n}(Eo),Wf=function(){function t(t,n,i){this.gT=void 0,this.ZS=void 0,this.iT=void 0,this.mT=void 0,this.gT=t,this.ZS=n,this.iT=i;var e=xf(i)||"video/mp4";this.mT=Af(e)}var n=t.prototype;return n.YS=function(t){return nn(function(){return en(this,function(t){return[2,new zf(this.gT,this.mT)]})}).call(this)},n.$S=function(t){return tt.resolve(!1)},n.xn=function(t){var n=this,i=function(){t.msSetMediaKeys(n.gT),t.removeEventListener("loadedmetadata",i)};return t.readyState>=1?t.msSetMediaKeys(this.gT):t.addEventListener("loadedmetadata",i),tt.resolve()},n.tT=function(t){return tt.resolve()},n.ur=function(){return tt.resolve()},t}(),Vf=function(){function t(t,n){this.XS=void 0,this.jl=void 0,this.XS=t,this.jl=n}var n=t.prototype;return n.rT=function(){return this.jl},n.sT=function(){var t=new c.MSMediaKeys(this.XS);return tt.resolve(new Wf(t,this.XS,this.jl))},It(t,[{key:"ZS",get:function(){return this.XS}}]),t}(),Hf=function(){function t(){}return t.prototype.jw=function(t,n){try{return tt.resolve(function(t,n){if(!qf())throw new m("Unsupported key system "+t);for(var i,e=Rt(n);!(i=e()).done;){var r=i.value,o=Df(Xf,No,t,r);if(o)return new Vf(t,o)}throw new m("Unsupported key system configuration for "+t)}(t,n))}catch(t){return tt.reject(t)}},t.uT=function(){return qf()},t}();function qf(){return void 0!==c.MSMediaKeys&&"function"==typeof c.MSMediaKeys.isTypeSupported}function Xf(t,n){return c.MSMediaKeys.isTypeSupported(t,n)}x(),pt(),x(),pt(),x(),pt(),x(),pt();var jf=function(t){function n(n,i,e){var r;return(r=t.call(this)||this).kT=void 0,r.mT=void 0,r.TT=void 0,r.dT=void 0,r.xT=void 0,r.lT=void 0,r.AT=void 0,r.ET=void 0,r.As=void 0,r.pT=void 0,r.wT=void 0,r.kT=n,r.mT=i,r.TT=e,r.dT=new fu,r.xT=void 0,r.lT=new su,r.AT=void 0,r.ET=new fu,r.As=function(){var t=r.AT&&r.AT.error;if(t){var n=new au("Unknown CDM error",t.code,t.systemCode);r.xT?(r.xT.Cb(n),r.xT=void 0):n.Db===WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT?r.yT("output-not-allowed"):r.yT("internal-error"),r.Co(new Co)}},r.pT=function(t){r.Co(new Do(r,"license-request",Qo(t.message).buffer,"this is a test string"===t.destinationURL?void 0:t.destinationURL))},r.wT=function(){r.xT&&(r.xT.uf(void 0),r.xT=void 0),r.yT("usable")},r}Tt(n,t);var i=n.prototype;return i.WS=function(t,n,i){var e=i&&i.fairplay&&i.fairplay.ST;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.Lu),n.wb(i.byteLength)}(s,f,i),new k(u)}(Jo(n),e,this.TT);return this.AT=this.kT.createSession(this.mT,r),this.AT.addEventListener("webkitkeymessage",this.pT,!1),this.AT.addEventListener("webkitkeyadded",this.wT,!1),this.AT.addEventListener("webkitkeyerror",this.As,!1),this.yT("status-pending"),this.ET.uf(this.AT),this.ET=new fu,tt.resolve()},i.Un=function(t){return tt.resolve(!0)},i.rr=function(t){return nn(function(){var n,i;return en(this,function(e){switch(e.label){case 0:if(0===(n=Jo(t)).byteLength)throw new m("Cannot call update with an empty response.");return this.xT=new fu,(i=this.AT)?[3,2]:[4,this.ET.Od];case 1:i=e.sent(),e.label=2;case 2:return i.update(n),[4,this.xT.Od];case 3:return e.sent(),[2]}})}).call(this)},i.Qs=function(){var t,n=this.AT;return n&&(n.removeEventListener("webkitkeymessage",this.pT,!1),n.removeEventListener("webkitkeyadded",this.wT,!1),n.removeEventListener("webkitkeyerror",this.As,!1),n.close()),this.ET.dd(),null==(t=this.xT)||t.dd(),this.dT.uf(void 0),this.dT.Od},i.cc=function(){return tt.resolve(void 0)},i.yT=function(t){this.lT.Ib(),this.lT.Pb(uu,t),this.Co(new Ao(this.lT))},It(n,[{key:"VS",get:function(){return this.AT?this.AT.sessionId:""}},{key:"LS",get:function(){return NaN}},{key:"MS",get:function(){return this.dT.Od}},{key:"ob",get:function(){return this.lT}}]),n}(Eo);x(),pt(),x(),pt();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=void 0,r.code=n,r}return Tt(n,t),It(n,[{key:"name",get:function(){return"THEOplayerError"}},{key:"category",get:function(){return Kf.fromCode(this.code)}}]),n}(wn),$f=function(){function t(t,n,i){this.kT=void 0,this.ZS=void 0,this.iT=void 0,this.mT=void 0,this.TT=void 0,this.kT=t,this.ZS=n,this.iT=i,this.TT=void 0;var e=xf(i)||"video/mp4";this.mT=Af(e)}var n=t.prototype;return n.getInternalMediaKeys=function(){return this.kT},n.YS=function(t){return nn(function(){return en(this,function(t){if(!this.TT)throw new Gf(Yf.CONTENT_PROTECTION_CERTIFICATE_ERROR,"No valid certificate was provided.");return[2,new jf(this.kT,this.mT,this.TT)]})}).call(this)},n.$S=function(t){return this.TT=Jo(t),tt.resolve(!0)},n.xn=function(t){return t.webkitSetMediaKeys(this.kT),tt.resolve()},n.tT=function(t){return t.webkitSetMediaKeys(null),tt.resolve()},n.ur=function(){return tt.resolve()},t}(),Zf=function(){function t(t,n){this.XS=void 0,this.jl=void 0,this.XS=t,this.jl=n}var n=t.prototype;return n.rT=function(){return this.jl},n.sT=function(){var t=new c.WebKitMediaKeys(this.XS);return tt.resolve(new $f(t,this.XS,this.jl))},It(t,[{key:"ZS",get:function(){return this.XS}}]),t}(),Jf=function(){function t(){}return t.prototype.jw=function(t,n){try{return tt.resolve(function(t,n){if(t!==ho)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,e=Rt(n);!(i=e()).done;){var r=i.value,o=Df(th,Po,t,r);if(o)return new Zf(t,o)}throw new m("Unsupported key system configuration for "+t)}(t,n))}catch(t){return tt.reject(t)}},t.uT=function(){return Qf()},t}();function Qf(){return void 0!==c.WebKitMediaKeys&&"function"==typeof c.WebKitMediaKeys.isTypeSupported}function th(t,n){return c.WebKitMediaKeys.isTypeSupported(t,n)}x(),pt();var nh=function(){function t(t){this.PT=void 0,this.PT=t}return t.prototype.jw=function(t,n){return nn(function(){var i,e,r;return en(this,function(o){switch(o.label){case 0:i=Rt(this.PT),o.label=1;case 1:if((e=i()).done)return[3,6];r=e.value,o.label=2;case 2:return o.trys.push([2,4,,5]),[4,r.jw(t,n)];case 3:return[2,o.sent()];case 4:return o.sent(),[3,5];case 5:return[3,1];case 6:throw new m("Unsupported key system configuration for "+t)}})}).call(this)},t}();x(),pt(),x(),pt(),x(),pt(),x(),pt(),x(),pt();var ih=function(){function t(t){var n=this;this.CT=[],this.DT=void 0,this.IT=new dn,this.MT=void 0,this.NT=function(){return 0===n.CT.length?n.MT?eh(n.MT,n.IT.Gm).then(n.LT,n.LT):n.LT():n.CT.shift()().then(n.NT)},this.LT=function(){if(0!==n.CT.length)return n.NT();n.DT=void 0},this.MT=t}var n=t.prototype;return n.ia=function(t,n){var i=this;return new tt(function(e){var r=dn.Km([i.IT.Gm,n]),o=function(){r.Ku()};i.CT.push(function(){var n=eh(t,r.Gm);return e(n),n.then(o,o)}),i.DT||(i.DT=i.NT())})},n.dd=function(){return this.BT(!0)},n._n=function(){return this.MT=void 0,this.BT(!1)},n.BT=function(t){var n=this.DT;return this.IT.dd(),t&&(this.IT=new dn),tt.resolve(n)},t}();function eh(t,n){return new tt(function(i){return i(t(n))})}var rh=new ih,oh=function(t){function n(n){var i;return(i=t.call(this)||this).XS=void 0,i.vT=void 0,i.xT=void 0,i.dT=void 0,i.Wb=void 0,i.GT=void 0,i.zT=void 0,i.WT=void 0,i.HT=void 0,i.qT=void 0,i.XS=n,i.vT=void 0,i.xT=void 0,i.Wb=!1,i.GT=void 0,i.HT=void 0,i.dT=new fu,i.zT="",i.qT=new fu,i.WT=new su,i}Tt(n,t);var i=n.prototype;return i.OT=function(){this.xT&&(this.yT("usable"),this.xT.uf(void 0),this.xT=void 0)},i.FT=function(t){var n=new au("Unknown CDM error",t.errorCode,t.systemCode);this.xT?(this.xT.Cb(n),this.xT=void 0):this.vT?(this.vT.Cb(n),this.vT=void 0):n.Db===WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT?this.yT("output-restricted"):1===n.Nb?this.yT("expired"):this.yT("internal-error")},i.UT=function(t){0!==t.message.byteLength?(this.vT&&(this.vT.uf(void 0),this.vT=void 0),this.Co(new Do(this,"license-request",hu(this.XS,Qo(t.message).buffer),t.defaultURL||void 0))):this.vT&&(this.vT.Cb("Empty key message"),this.vT=void 0)},i.VT=function(t){this.HT||(this.HT=t,this.qT.uf(t))},i.Qs=function(){return nn(function(){return en(this,function(t){return this.throwIfClosed(),this.xT&&(this.xT.Cb(void 0),this.xT=void 0),this.Wb=!0,this.dT.uf(void 0),[2]})}).call(this)},i.WS=function(t,n){return nn(function(){var t;return en(this,function(i){switch(i.label){case 0:return this.throwIfClosed(),this.vT=new fu,this.GT=Jo(n),(t=this.HT)?[3,2]:[4,this.qT.Od];case 1:t=i.sent(),i.label=2;case 2:return t.webkitGenerateKeyRequest(this.XS,this.GT),[4,this.vT.Od];case 3:return i.sent(),[2]}})}).call(this)},i.Un=function(t){return nn(function(){return en(this,function(t){return this.throwIfClosed(),[2,!1]})}).call(this)},i.cc=function(){return nn(function(){return en(this,function(t){return this.throwIfClosed(),[2]})}).call(this)},i.rr=function(t){return nn(function(){var n;return en(this,function(i){switch(i.label){case 0:return n=this,this.throwIfClosed(),this.xT=new fu,Ht.gg||Ht.dg?[2,rh.ia(function(){return nn(function(){return en(this,function(n){switch(n.label){case 0:return[4,this.doUpdate(t)];case 1:return n.sent(),[2]}})}).call(n)})]:[4,this.doUpdate(t)];case 1:return i.sent(),[2]}})}).call(this)},i.doUpdate=function(t){return nn(function(){var n;return en(this,function(i){switch(i.label){case 0:return void 0===this.xT?[2]:(n=this.HT)?[3,2]:[4,this.qT.Od];case 1:n=i.sent(),i.label=2;case 2:return n.webkitAddKey(this.XS,Jo(t),this.GT,this.VS),[4,this.xT.Od];case 3:return i.sent(),Ht.dg?[4,yn(500)]:[3,5];case 4:i.sent(),i.label=5;case 5:return[2]}})}).call(this)},i.throwIfClosed=function(){if(this.Wb)throw new m("Already closing or closed.")},i.yT=function(t){this.WT.Ib(),this.WT.Pb(uu,t),this.Co(new Ao(this.WT))},i.XT=function(){return nn(function(){var t,n;return en(this,function(i){switch(i.label){case 0:return(n=this.HT)?[3,2]:[4,this.qT.Od];case 1:n=i.sent(),i.label=2;case 2:if(!(t=n).webkitCancelKeyRequest)return[3,7];i.label=3;case 3:return i.trys.push([3,4,5,7]),t.webkitCancelKeyRequest(this.XS,this.zT),[3,7];case 4:return i.sent(),[3,7];case 5:return[4,yn(500)];case 6:return i.sent(),[7];case 7:return[2]}})}).call(this)},It(n,[{key:"ob",get:function(){return this.WT}},{key:"VS",get:function(){return this.zT},set:function(t){this.zT=t}},{key:"MS",get:function(){return this.dT.Od}},{key:"LS",get:function(){return NaN}}]),n}(Eo),uh=function(){function t(t,n){var i=this;this.ZS=void 0,this.iT=void 0,this.HT=void 0,this.KT=void 0,this.YT=void 0,this.wT=void 0,this.jT=void 0,this.QT=void 0,this.ZS=t,this.iT=n,this.HT=void 0,this.KT=Gr(),this.YT=[],this.wT=function(t){var n=i.JT(t.sessionId);n&&n.OT()},this.jT=function(t){var n=i.JT(t.sessionId);n&&n.FT(t)},this.QT=function(t){var n=i.JT(t.sessionId);n&&n.UT(t)}}var n=t.prototype;return n.xn=function(t){return this.HT=t,this.HT.addEventListener("webkitkeyadded",this.wT),this.HT.addEventListener("webkitkeyerror",this.jT),this.HT.addEventListener("webkitkeymessage",this.QT),this.KT.forEach(function(n,i){return n.VT(t)}),this.YT.forEach(function(n){return n.VT(t)}),tt.resolve()},n.tT=function(t){return t.removeEventListener("webkitkeyadded",this.wT),t.removeEventListener("webkitkeyerror",this.jT),t.removeEventListener("webkitkeymessage",this.QT),this.HT=void 0,tt.resolve()},n.ur=function(){return nn(function(){var t,n;return en(this,function(i){switch(i.label){case 0:t=this.KT.entries(),n=t.next(),i.label=1;case 1:return n.done?[3,3]:[4,n.value[1].XT()];case 2:return i.sent(),n=t.next(),[3,1];case 3:return this.KT.clear(),[2]}})}).call(this)},n.YS=function(t,n,i){return nn(function(){var t;return en(this,function(n){return t=new oh(this.ZS),this.HT&&t.VT(this.HT),this.YT.push(t),[2,t]})}).call(this)},n.$S=function(t){return tt.resolve(!1)},n.JT=function(t){if(t){var n=this.KT.get(t);return n||((n=this.YT.shift())?(n.VS=t,this.KT.set(t,n),n):void 0)}},t}(),sh=function(){function t(t,n){this.ZS=void 0,this.ZT=void 0,this.ZS=t,this.ZT=n}var n=t.prototype;return n.sT=function(){return tt.resolve(new uh(this.ZS,this.ZT))},n.rT=function(){return this.ZT},t}(),fh=function(){function t(){}return t.prototype.jw=function(t,n){try{return tt.resolve(function(t,n){if(!fh.uT())throw new m("Unsupported key system "+t);for(var i,e=Rt(n);!(i=e()).done;){var r=i.value,o=Df(hh,No,t,r);if(o)return new sh(t,o)}throw new m("Unsupported key system configuration for "+t)}(t,n))}catch(t){return tt.reject(t)}},t.uT=function(){return"undefined"!=typeof HTMLMediaElement&&void 0!==HTMLMediaElement.prototype.webkitGenerateKeyRequest&&void 0!==HTMLMediaElement.prototype.webkitAddKey&&void 0!==HTMLMediaElement.prototype.webkitCancelKeyRequest},t}();function hh(t,n){var i=Sn();return Boolean(i&&i.canPlayType&&""!==i.canPlayType(n,t))}x(),pt();var ch,ah=function(){function t(){}return t.prototype.jw=function(t,n){return t===eo||t===to?tt.resolve(void 0):tt.reject(new g("DRM configuration not supported"))},t}();function vh(){return ch||(ch=function(){var t=[];Jf.uT()&&t.push(new Jf);Uf.uT()&&t.push(new Uf);Hf.uT()&&t.push(new Hf);fh.uT()&&t.push(new fh);Ht.wg&&t.push(new ah);return new nh(t)}()),ch}x(),pt(),x(),pt();var dh=function(){function t(){this.$T=Gr()}var n=t.prototype;return n.Ib=function(t){this.$T.delete(t)},n.ek=function(){this.$T.clear()},n.xb=function(t){return this.$T.get(t)},n.Pb=function(t,n){this.$T.set(t,n)},t}(),lh=function(){function t(){}return t.nk=function(){return t.Im||(t.Im=wh.uT()?new wh:new dh),t.Im},t.Ib=function(n){t.nk().Ib(n)},t.ek=function(){t.nk().ek()},t.xb=function(n){return t.nk().xb(n)},t.Pb=function(n,i){t.nk().Pb(n,i)},t}();lh.Im=void 0;var wh=function(t){function n(){return t.apply(this,arguments)||this}Tt(n,t);var i=n.prototype;return i.Ib=function(t){self.sessionStorage.removeItem(t)},i.ek=function(){self.sessionStorage.clear()},i.xb=function(t){var n;return null!=(n=self.sessionStorage.getItem(t))?n:void 0},i.Pb=function(t,n){self.sessionStorage.setItem(t,n)},n.uT=function(){var t="foobar";try{return self.sessionStorage.setItem(t,t),self.sessionStorage.removeItem(t),!0}catch(t){return!1}},n}(lh);x(),pt(),x(),pt();var bh=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,o=Rt(n);!(r=o()).done;){var u=r.value;e.append(u)}return e.getBlob(i&&i.type||"")}}(n)}();function gh(t,n,i){var e=bh([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(),pt(),x(),pt(),x(),pt(),x(),pt(),x(),pt(),M(),x(),pt();var mh=function(t,n,i){return i=null!=t?E(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)}(_t());x(),pt();var ph=t,yh=$t(ph.ReadableStream)&&$t(ph.WritableStream)&&$t(ph.TransformStream)&&Gt(ph.ReadableStream.prototype.pipeThrough)&&!ui.bp,_h=yh?ph.ReadableStream:mh.ReadableStream,Sh=(yh?ph.WritableStream:mh.WritableStream,yh?ph.TransformStream:mh.TransformStream);yh&&ph.ByteLengthQueuingStrategy?ph.ByteLengthQueuingStrategy:mh.ByteLengthQueuingStrategy,yh&&ph.CountQueuingStrategy?ph.CountQueuingStrategy:mh.CountQueuingStrategy;function Th(t){return function(t){return new _h({start:function(n){for(var i,e=Rt(t);!(i=e()).done;){var r=i.value;n.enqueue(r)}n.close()}})}([t])}function kh(t){return Th(function(t){return new k(t)}(t))}function Ih(t,n){return function(t,n){var i=n,e=t.getReader(),r=new fu,o=function(){u();var t=new bn;e.cancel(t).catch(Jt),r.Cb(t)},u=function(){i&&(i.qm(o),i=void 0)};i&&(i.Om?o():i.Hm(o));var s=[],f=function(t){return t.done?(u(),tt.resolve(s)):(s.push(t.value),tt.resolve(e.read()).then(f))};return tt.resolve(e.read()).then(f).then(function(t){u(),r.uf(t)},function(t){u(),r.Cb(t)}),r.Od}(t,n).then(function(t){return ru(t).buffer})}function Eh(t,n){var i=n,e=new Sh,r=e.readable,o=e.writable,u=o.getWriter(),s=function(){i&&i.dd()};return u.closed.then(s,s),t.then(function(t){return i=void 0,u.releaseLock(),t.pipeTo(o).catch(Jt)},function(t){return i=void 0,u.releaseLock(),o.abort(t).catch(Jt)}),r}function Rh(t){return Ko(new k(t))}function Oh(t){return Go(t).buffer}x(),pt();var Nh="text/plain;charset=UTF-8",Ph=function(){function t(){}var n=t.prototype;return n._k=function(t){return this.gk(t).then(JSON.parse)},n.pk=function(t,n){switch(t){case xr.rk:return this.wk(n);case xr.hk:return this._k(n);case xr.ck:return this.yk();case xr.dk:return this.gk(n);default:throw new m}},t}();function Ah(t,n,i){if(B(t,Ph))return t;if(B(t,_h))return function(t,n){return new Ch({Vw:0,yk:t,bk:Dh(n)})}(t,i);var e=Dh(i),r=tt.resolve(t).then(function(t){return function(t,n){if(t){if("string"==typeof t)return{Vw:xr.dk,Ak:t,bk:n||Nh};if(B(t,ArrayBuffer)||iu(t))return{Vw:xr.rk,Ak:zh(t),bk:n};if(function(t){return Kt(t)&&t.constructor&&t.constructor===p}(t)||Yt(t))return{Vw:xr.hk,Ak:t,bk:n};throw new m("Unsupported BodyInit type")}return{Vw:xr.dk,Ak:null,bk:n}}(t,e)});return new Ch({Vw:1,Od:r,Sk:n})}function Dh(t){return(t.get("content-type")||"").toLowerCase()}var Ch=function(t){function n(n){var i;return(i=t.call(this)||this).Ek=!1,i.Pk=void 0,i.Ik=new fu,i.Ik.Od.catch(Jt),i.Nk(n),i}Tt(n,t);var i=n.prototype;return i.Rk=function(){return this.Ik.Od},i.gk=function(t){return this.Ck(xh,t)},i._k=function(t){return this.Ck(Mh,t)},i.wk=function(t){return this.Ck(Lh,t)},i.yk=function(){return this.Dk(function(t){return 0===t.Vw?t.yk:Eh(t.Od.then(Uh).then(kh),t.Sk)}(this.Pk))},i.Ck=function(t,n){if(this.Ek)return tt.reject(new m("Already used"));this.Ek=!0;var i=t(this.Pk,n);return this.Ik.jm(i.then(Jt)),i},i.Dk=function(t){if(this.Ek)throw new m("Already used");if(t.locked)throw new m("Body stream is locked");this.Ek=!0;var n=new Sh,i=tt.resolve(t.pipeTo(n.writable));return this.Ik.jm(i),n.readable},i.Nk=function(t){this.Pk=t,1===t.Vw&&t.Od.catch(Jt)},i.Bk=function(){if(this.Ek)throw new m("Already used");var t=function(t){if(0===t.Vw){var n=t.yk.tee(),i=n[0],e=n[1];return[{Vw:t.Vw,yk:i,bk:t.bk},{Vw:t.Vw,yk:e,bk:t.bk}]}var r=t.Sk.Qm(),o=r[0],u=r[1];return[{Vw:t.Vw,Od:t.Od,Sk:o},{Vw:t.Vw,Od:t.Od,Sk:u}]}(this.Pk),i=t[0],e=t[1];return this.Nk(i),new n(e)},It(n,[{key:"Tk",get:function(){return this.Ek}},{key:"xk",get:function(){return 0===this.Pk.Vw}}]),n}(Ph);function xh(t,n){return 0===t.Vw?Ih(t.yk,n).then(Rh):(n&&t.Sk.jm(n),pn(t.Od.then(Bh),t.Sk))}function Bh(t){switch(t.Vw){case xr.dk:return tt.resolve(t.Ak||"");case xr.rk:return tt.resolve(t.Ak).then(Rh);case xr.hk:return tt.resolve(t.Ak).then(JSON.stringify)}}function Mh(t,n){return 0===t.Vw?xh(t,n).then(JSON.parse):(n&&t.Sk.jm(n),pn(t.Od.then(Fh),t.Sk))}function Fh(t){return t.Vw===xr.hk?tt.resolve(t.Ak):Bh(t).then(JSON.parse)}function Lh(t,n){return 0===t.Vw?Ih(t.yk,n):(n&&t.Sk.jm(n),pn(t.Od.then(Uh),t.Sk))}function Uh(t){switch(t.Vw){case xr.rk:return tt.resolve(t.Ak);case xr.dk:case xr.hk:return Bh(t).then(Oh)}}function zh(t){return B(t,ArrayBuffer)?t:Qo(Zo(t)).buffer}var Wh=function(t){function n(n){var i;return(i=t.call(this)||this).Mk=void 0,i.Mk=n,i}Tt(n,t);var i=n.prototype;return i.Rk=function(){return this.Mk.Rk()},i.gk=function(t){return this.Mk.gk(t)},i._k=function(t){return this.Mk._k(t)},i.wk=function(t){return this.Mk.wk(t)},i.yk=function(t){return this.Mk.yk(t)},i.Bk=function(){return this.Mk.Bk()},It(n,[{key:"Tk",get:function(){return this.Mk.Tk}},{key:"xk",get:function(){return this.Mk.xk}}]),n}(Ph);var Vh=function(t){function n(n,i){var e,r,o,u,s,f;i?(r=i.Vk,o=i.Fk,u=i.Lk,s=i.Hk,f=i.qk):(r=[],o=xr.dk,u=200,s="OK",f=!1);var h=n.Uk,c=new Br(n.Vk||r),a=n.Fk||o,v=n.Wk||(i&&i.Uk===h?i.Wk:h.zk),d=i?i.Mk:null,l=Ah(void 0!==n.Ok?n.Ok:d,n.Sk||new dn,c);return(e=t.call(this,l)||this).Vk=void 0,e.Uk=void 0,e.Wk=void 0,e.Fk=void 0,e.Lk=void 0,e.Hk=void 0,e.qk=void 0,e.Vk=c,e.Uk=h,e.Wk=v,e.Fk=a,e.Lk=void 0!==n.Lk?n.Lk:u,e.Hk=void 0!==n.Hk?String(n.Hk):s,e.qk=n.qk||f,e}Tt(n,t);var i=n.prototype;return i.Ok=function(t){return this.pk(this.Fk,t)},i.yb=function(){return new n({Ok:this.Bk(),Uk:this.Uk},this)},n}(Wh),Hh=function(){function t(){}var n=t.prototype;return n.Uk=function(t){var n=function(t){return new Vh({Ok:null,Vk:{},Uk:t,Wk:t.zk,Fk:t.Fk,Lk:0,Hk:Oo.Oy})}(new zr(t));return tt.resolve(n)},n.bE=function(t){},n._n=function(){},t}();var qh=function(){function t(t,n){void 0===n&&(n=!0),this.kE=void 0,this.xE=void 0,this.kE=t,this.xE=n}var n=t.prototype;return n.Uk=function(t){var n=this.TE(t);return this.kE.Uk(n)},n.bE=function(t){return this.kE.bE(this.EE(t))},n.TE=function(n){var i=new zr(n);if(!this.xE){var e=t.PE(i.zk);i=new zr({zk:e},i)}return i},n.EE=function(n){var i=n.zk;return this.xE||(i=t.PE(i)),{zk:i,Ak:n.Ak}},n._n=function(){this.kE._n()},t.PE=function(t){return jt.Tw&&bo(t,"http://")?t.replace(":","s:"):t},It(t,null,[{key:"AE",get:function(){return t.SE||(t.SE=new t(new Hh)),t.SE}}]),t}();qh.SE=void 0,x(),pt(),x(),pt(),x(),pt(),x(),pt();var Xh=function(t){function n(n,i,e){var r;return(r=t.call(this,n.Uk,null!=e?e:function(t){return"Error while loading "+t.Uk.zk+", status code "+t.Lk}(n),i)||this).OE=void 0,r.OE=n,r}return Tt(n,t),It(n,[{key:"name",get:function(){return Wr.DE}},{key:"LE",get:function(){return this.OE}}]),n}(Vr);x(),pt();var jh=function(t){function n(n,i){return t.call(this,n,function(t){return"Request for "+t.zk+" timed out after "+t.lE+" seconds."}(n),i)||this}return Tt(n,t),It(n,[{key:"name",get:function(){return Wr.NE}}]),n}(Vr);x(),pt();var Yh=self.fetch,Kh=self.Request,Gh=self.Response,$h=self.Headers,Zh=self.ReadableStream,Jh=self.AbortSignal,Qh=self.AbortController,tc=Qt(function(){try{return Gt(Yh)&&$t(Kh)&&$t(Gh)&&$t($h)&&"forEach"in $h.prototype&&Nr()}catch(t){return!1}}),nc=["http:","https:"];var ic=Qt(function(){try{return tc()&&$t(Jh)&&$t(Qh)&&"signal"in Kh.prototype}catch(t){return!1}}),ec=Qt(function(){try{return tc()&&$t(Zh)&&"body"in Gh.prototype&&!Ht.H_}catch(t){return!1}});function rc(t,n){var i,e=t.Vk.has("content-length")?Number(t.Vk.get("content-length")):void 0;return i=t.xk?function(t,n,i){return t.pipeThrough(new Sh(new oc(n,i)))}(t.yk(),n,e):function(t,n,i){return nn(function(){var e,r;return en(this,function(o){switch(o.label){case 0:return[4,tt.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]}})})()}(t.wk(),n,e),new Vh({Ok:i,Uk:t.Uk},t)}x(),pt(),M(),x(),pt();var oc=function(){function t(t,n){this.UE=void 0,this.VE=void 0,this.FE=void 0,this.UE=t,this.VE=n,this.FE=0}var n=t.prototype;return n.transform=function(t,n){this.FE+=t.byteLength,this.UE(this.FE,this.VE),n.enqueue(t)},n.flush=function(t){var n;this.UE(this.FE,null!=(n=this.VE)?n:this.FE)},t}();var uc=function(){function t(t){this.LE=void 0,this.BE=void 0,this.IT=new dn,this.OE=void 0,this.qE=0,this.WE=!1,this.BE=t,this.IT.jm(t.Gm),this.LE=this.HE()}var n=t.prototype;return n.HE=function(){return nn(function(){var t,n,i,e,r,o,u,s,f,h;return en(this,function(c){switch(c.label){case 0:t=this,(n=this.BE).lE&&(this.qE=d(function(){t.WE=!0,t.IT.dd()},n.lE),this.IT.Gm.Wm(function(){l(t.qE)}));try{i=Yh(n.zk,{method:n.dE,headers:n.Vk.lk(),body:n.Ak,credentials:n.gE?"include":"same-origin",signal:hc(this.IT.Gm),mode:n.pE,keepalive:n.yE})}catch(t){throw new Hr(n,t)}c.label=1;case 1:return c.trys.push([1,3,,4]),[4,i];case 2:return e=c.sent(),[3,4];case 3:throw r=c.sent(),gn(o=this.zE(r))&&this.IT.dd(),o;case 4:if(u=e.url||n.zk,s=0===e.status&&"file:"===function(t){return jt.Rh(t).protocol}(u)?200:e.status,f=new sc(this,e,this.IT),!function(t){return t.Lk>=200&&t.Lk<=299||304===t.Lk}(h=new Vh({Ok:f,Uk:n,Fk:n.Fk,Vk:new Br(e.headers),Lk:s,Hk:e.statusText,Wk:u})))throw new Xh(h);return n.mE&&(h=rc(h,n.mE)),[2,h]}})}).call(this)},n.zE=function(t){return function(t){return B(t,Vr)}(t)?t:gn(t)?this.WE?new jh(this.BE):new bn(t.message,t):this.OE?new Xh(this.OE,t):new Hr(this.BE,t)},t}(),sc=function(t){function n(n,i,e){var r;return(r=t.call(this)||this).XE=void 0,r.GE=void 0,r.IT=void 0,r.Ik=new fu,r.XE=n,r.GE=i,r.IT=e,r.Ik.Od.catch(Jt),r}Tt(n,t);var i=n.prototype;return i.Rk=function(){return this.Ik.Od},i.gk=function(t){return this.Ck(this.GE.text(),t)},i.wk=function(t){return this.Ck(this.GE.arrayBuffer(),t)},i.yk=function(){var t=this.GE.body;return t?this.Dk(t):Eh(this.wk().then(kh),this.IT)},i.Bk=function(){var t=this.GE.clone(),i=this.IT.Qm(),e=i[0],r=i[1];return this.IT=e,new n(this.XE,t,r)},i.Ck=function(t,n){var i=this;n&&this.IT.jm(n);var e=mn(tt.resolve(t),this.IT.Gm).catch(function(t){throw i.XE.zE(t)});return e=pn(e,this.IT),this.Ik.jm(e.then(Jt)),e},i.Dk=function(t){var n=this;return new _h(new cc(t,function(t){return n.XE.zE(t)},this.IT,this.Ik),{highWaterMark:0})},It(n,[{key:"Tk",get:function(){return this.GE.bodyUsed}},{key:"xk",get:function(){return Xt(this.GE.body)}}]),n}(Ph),fc="abort";function hc(t){if(ic()){var n=new Qh;if(t.Om)n.abort();else if(!t.Fm){var i=function(){e(),n.abort()},e=function(){n.signal.removeEventListener(fc,i),t.qm(i),t.zm(e)};n.signal.addEventListener(fc,i),t.Hm(i),t.Wm(e)}return n.signal}}var cc=function(){function t(t,n,i,e){this.jE=void 0,this.QE=void 0,this.IT=void 0,this.Ik=void 0,this.Df=void 0,this.jE=t,this.QE=n,this.IT=i,this.Ik=e}var n=t.prototype;return n.start=function(t){this.Df=this.jE.getReader()},n.pull=function(t){return nn(function(){var n,i,e;return en(this,function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,mn(this.Df.read(),this.IT.Gm)];case 1:return n=r.sent(),[3,3];case 2:return i=r.sent(),e=this.QE(i),this.Ik.Cb(e),this.IT.dd(),this.Df.cancel(e).catch(Jt),t.error(e),[2];case 3:return n.done?(this.Ik.uf(),this.IT.dd(),t.close()):t.enqueue(n.value),[2]}})}).call(this)},n.cancel=function(t){return this.IT.dd(),this.Ik.Cb(t),this.Df.cancel(t)},t}();x(),pt();var ac=function(){function t(t){var n=this;this.YE=void 0,this.BE=void 0,this.IT=new dn,this.OE=void 0,this.KE=new fu,this.ux=void 0,this.ox=!1,this.nx=function(){var t;n.JE(),null==(t=n.YE)||t.abort()},this.BE=t,this.IT.jm(t.Gm),this.YE=new I,this.HE()}var n=t.prototype;return n.HE=function(){var t=this,n=this.YE,i=this.BE;if(i.Gm.Om)return this.JE();n.onreadystatechange=function(){return t.ZE()},n.onprogress=function(n){return t.UE(n)},n.onload=function(){return t.$E()},n.onloadend=function(){return t.tx()},n.onerror=function(){return t.ix()},n.ontimeout=function(){return t.sx()},n.onabort=function(){return t.JE()},n.open(i.dE,i.zk,!0),n.withCredentials=Boolean(i.gE),"responseType"in n&&i.Fk&&(i.Fk===xr.dk?n.responseType="text":n.responseType="arraybuffer"),i.Vk.forEach(function(t,i){n.setRequestHeader(i,t)}),i.lE&&(n.timeout=i.lE),this.IT.Gm.Hm(this.nx);var e=i.Ak;e?n.send(e):n.send()},n.ZE=function(){var t=this.YE;void 0!==t&&t.readyState>=2&&!this.ox&&(this.ox=!0,this.hx())},n.hx=function(){var t,n,i=this.YE,e=function(t){var n=new Br,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.BE;this.ux=new fu,this.OE=new Vh({Uk:r,Fk:r.Fk,Ok:this.ux.Od,Lk:i.status,Hk:i.statusText,Vk:e,Wk:null!=(n=i.responseURL)?n:e.get("X-Request-URL")}),null==(t=this.KE)||t.uf(this.OE)},n.$E=function(){var t,n=this.YE;if(void 0!==n){var i=n.response;if(!Xt(i)){var e=this.BE.Fk;i=e===xr.dk?n.responseText:e===xr.rk?new ArrayBuffer(0):{}}null==(t=this.ux)||t.uf(i)}},n.tx=function(){this._n()},n.UE=function(t){void 0!==this.YE&&(null==this.BE.mE||this.BE.mE.call(this.BE,t.loaded,t.lengthComputable?t.total:void 0))},n.ix=function(){var t=new g("Network request failed");this.OE?this.As(new Xh(this.OE,t)):this.As(new Hr(this.BE,t))},n.sx=function(){this.As(new jh(this.BE))},n.JE=function(){this.As(new bn),this._n()},n.As=function(t){var n,i;null==(n=null!=(i=this.ux)?i:this.KE)||n.Cb(t)},n._n=function(){this.YE=void 0,this.OE=void 0,this.KE=void 0,this.ux=void 0,this.IT.Ku()},It(t,[{key:"LE",get:function(){return this.KE.Od}}]),t}();x(),pt();var vc=function(){function t(){}var n=t.prototype;return n.Uk=function(t){return function(t){if(Ht.nm)return!1;if(!tc()||!function(t){try{return nc.indexOf(new self.URL(t,self.location.href).protocol)>=0}catch(t){return!1}}(t.zk))return!1;if(!ec()&&t.mE)return!1;if(!t.wE&&t.dE!==Lr.POST){if(Ht.gg&&Ht.J_<=68)return!1;if(Ht.dg)return!1}return!0}(t)?new uc(t).LE:new ac(t).LE},n.bE=function(t){var n=c.navigator;if(n&&n.sendBeacon)n.sendBeacon(t.zk,bh([t.Ak],{type:t.bk}));else{var i=t.bk?{"Content-type":t.bk}:void 0;this.Uk(new zr({dE:Lr.POST,zk:t.zk,Ak:t.Ak,Vk:i,pE:Ur.aE})).then(function(t){!function(t){t.then(Jt,Jt)}(t.wk())},Jt)}},n._n=function(){},t}();x(),pt(),x(),pt();var dc=function(t){return t[t.lx=1]="lx",t[t.vx=2]="vx",t[t.dk=3]="dk",t[t._x=4]="_x",t[t.gx=9]="gx",t}({});var lc=function(){function t(){}return t.prototype.wx=function(t){var n,i=new DOMParser;try{n=i.parseFromString(t,"text/xml")}catch(t){throw new Xr(t)}if(!n||n.getElementsByTagName("parsererror").length>0)throw new Xr;return new _c(n)},t}(),wc=function(){function t(t){this.bx=void 0,this.bx=t}var n=t.prototype;return n.kx=function(t){return this.bx.isEqualNode(t.bx)},n.Ex=function(n){return new t(this.bx.cloneNode(n))},It(t,[{key:"mx",get:function(){return dc.vx}},{key:"yx",get:function(){var t;return null!=(t=this.bx.localName)?t:kc(this.bx.nodeName)}},{key:"l",get:function(){return this.bx.nodeName}},{key:"Ax",get:function(){var t;return null!=(t=this.bx.namespaceURI)?t:void 0}},{key:"Sx",get:function(){var t;return null!=(t=this.bx.prefix)?t:void 0}},{key:"Tx",get:function(){return this.bx.nodeValue}}]),t}(),bc=function(){function t(t){this.Rx=void 0,this.Px=void 0,this.Rx=t}var n=t.prototype;return n.Ix=function(t){return this.xx.filter(function(n){return Sc(n)&&n.Cx===t})},n.Dx=function(t,n){return this.xx.filter(function(i){return Sc(i)&&i.yx===n&&i.Ax===t})},n.Bx=function(t){this.Rx.appendChild(t.Nx),this.Px&&this.Px.push(t)},n.kx=function(t){return this.Rx.isEqualNode(t.Nx)},It(t,[{key:"xx",get:function(){return void 0===this.Px&&(this.Px=function(t){for(var n=[],i=0;i<t.length;i++){var e=Tc(t.item(i));e&&n.push(e)}return n}(this.Rx.childNodes)),this.Px}},{key:"m",get:function(){return this.xx.filter(Sc)}},{key:"Nx",get:function(){return this.Rx}}]),t}(),gc=function(t){function n(n){return t.call(this,n)||this}Tt(n,t);var i=n.prototype;return i.Ox=function(t){if(this.Rx.hasAttribute(t))return this.Rx.getAttribute(t)},i.Fx=function(t,n){if(this.Rx.hasAttributeNS(t,n))return this.Rx.getAttributeNS(t,n)},i.Ux=function(t){this.Rx.removeAttribute(t)},i.Vx=function(t,n){this.Rx.removeAttributeNS(t,n)},i.Hx=function(t,n){this.Rx.setAttribute(t,n)},i.qx=function(t,n,i){this.Rx.setAttributeNS(t,n,i)},i.Ex=function(t){return new n(this.Rx.cloneNode(t))},It(n,[{key:"mx",get:function(){return dc.lx}},{key:"yx",get:function(){var t;return null!=(t=this.Rx.localName)?t:kc(this.Rx.nodeName)}},{key:"Ax",get:function(){var t;return null!=(t=this.Rx.namespaceURI)?t:void 0}},{key:"Sx",get:function(){var t;return null!=(t=this.Rx.prefix)?t:void 0}},{key:"Cx",get:function(){return this.Rx.nodeName}},{key:"Mx",get:function(){return function(t){for(var n=[],i=0;i<t.length;i++)n.push(new wc(t.item(i)));return n}(this.Rx.attributes)}},{key:"Lx",get:function(){return this.Rx.textContent}}]),n}(bc),mc=function(){function t(t){this.Rx=void 0,this.Rx=t}return t.prototype.kx=function(t){return this.Ok===t.Ok},It(t,[{key:"Ok",get:function(){return this.Rx.nodeValue}},{key:"Nx",get:function(){return this.Rx}}]),t}(),pc=function(t){function n(n){return t.call(this,n)||this}return Tt(n,t),n.prototype.Ex=function(t){return new n(this.Rx.cloneNode(t))},It(n,[{key:"mx",get:function(){return dc.dk}}]),n}(mc),yc=function(t){function n(n){return t.call(this,n)||this}return Tt(n,t),n.prototype.Ex=function(t){return new n(this.Rx.cloneNode(t))},It(n,[{key:"mx",get:function(){return dc._x}}]),n}(mc),_c=function(t){function n(n){return t.call(this,n)||this}return Tt(n,t),n.prototype.Ex=function(t){return new n(this.Rx.cloneNode(t))},It(n,[{key:"mx",get:function(){return dc.gx}},{key:"Wx",get:function(){return new gc(this.Rx.documentElement)}}]),n}(bc);function Sc(t){return function(t){return 1===t.mx}(t)}function Tc(t){switch(t.nodeType){case dc.lx:return new gc(t);case dc.dk:return new pc(t);case dc._x:return new yc(t)}}function kc(t){var n=t.indexOf(":");return n<0?t:t.substr(n+1)}var Ic=function(t){function n(){var n;return(n=t.apply(this,arguments)||this).zx=void 0,n.Xx=ec(),n.Qx=Ht.im||Ht.H_,n.Yx=function(){if(Ht.dg&&Ht.vg<3)return!1;if(Ht.im)return!0;if(Ht.gg&&Ht.J_<=68)return!0;if(Ht.H_)return!0;if(Ht.Pg)return!0;return!1}(),n.nP=void 0,n.oP=new lc,n}return Tt(n,t),n.prototype.wx=function(t){return this.oP.wx(t)},It(n,[{key:"aw",get:function(){return this.zx||(this.zx=new ko(vh())),this.zx}},{key:"Gx",get:function(){return this.Xx}},{key:"jx",get:function(){return this.Qx}},{key:"Kx",get:function(){return this.Yx}},{key:"Jx",get:function(){return!1}},{key:"Zx",get:function(){return lh.nk()}},{key:"$x",get:function(){return{tP:gh}}},{key:"iP",get:function(){return v.connection&&v.connection.effectiveType||Dr}},{key:"eP",get:function(){return v.connection&&v.connection.type||Cr}},{key:"sP",get:function(){return Boolean(v.onLine)}},{key:"ff",get:function(){return this.nP||(this.nP=new qh(new vc)),this.nP}},{key:"rP",get:function(){return!(Ht.gg||Ht.dg||Ht.Pg)}}]),n}(Rr);Zt(new Ic),x(),pt(),x(),pt();x(),pt(),x(),pt(),x(),pt();var Ec=function(t){return t.rE="audio",t.Pl="video",t.UU="metadata",t}({});x(),pt(),x(),pt();var Rc=function(t){return t.jk="#EXTINF",t.ZLt="#EXT-X-MAP",t.p="#EXTM3U",t.en="#EXT-X-VERSION",t.ui="#EXT-X-TARGETDURATION",t.bSt="#EXT-X-START",t.li="#EXT-X-INDEPENDENT-SEGMENTS",t.ck="#EXT-X-STREAM-INF",t.vr="#EXT-X-MEDIA-SEQUENCE",t.nv="#EXT-X-ENDLIST",t.sv="#EXT-X-MEDIA",t.cv="#EXT-X-DISCONTINUITY",t.av="#EXT-X-DISCONTINUITY-SEQUENCE",t.dv="#EXT-X-PLAYLIST-TYPE",t.lv="#EXT-X-KEY",t}({}),Oc=function(){function t(t,n){this.Vw="#EXTINF",this.gv=void 0,this.kv=void 0,this.gv=t,this.kv=n}return t.prototype.zI=function(){return this.Vw+":"+this.gv+",\n"+this.kv},t}(),Nc=function(){function t(t){this.Vw="#EXT-X-MAP",this.kv=void 0,this.kv=t}return t.prototype.zI=function(){return this.Vw+':URI="'+this.kv+'"'},t}(),Pc=function(){function t(){this.Vw="#EXTM3U"}return t.prototype.zI=function(){return this.Vw},t}(),Ac=function(){function t(t){this.Vw="#EXT-X-VERSION",this.OD=void 0,this.OD=t}return t.prototype.zI=function(){return this.Vw+":"+this.OD},t}(),Dc=function(){function t(t){this.Vw="#EXT-X-TARGETDURATION",this.WLt=void 0,this.WLt=t}return t.prototype.zI=function(){return this.Vw+":"+this.WLt},t}(),Cc=function(){function t(t){this.Vw="#EXT-X-START",this.zOt=void 0,this.zOt=t}return t.prototype.zI=function(){return this.Vw+":TIME-OFFSET="+this.zOt},t}(),xc=function(){function t(t,n,i){this.uri=void 0,this.keyFormat=void 0,this.keyFormatVersions=void 0,this.Vw=void 0,this.uri=t,this.keyFormat=n,this.keyFormatVersions=i,this.Vw="#EXT-X-KEY"}return t.prototype.zI=function(){return this.Vw+':METHOD=SAMPLE-AES,URI="'+this.uri+'",KEYFORMAT="'+this.keyFormat+'",KEYFORMATVERSIONS="'+this.keyFormatVersions+'"'},t}(),Bc=function(){function t(t){this.Vw="#EXT-X-STREAM-INF",this.bq=1,this.kv=void 0,this.kv=t}return t.prototype.zI=function(){return this.Vw+":BANDWIDTH="+this.bq+',AUDIO="audio"\n'+this.kv},t}(),Mc=function(){function t(t){this.Vw="#EXT-X-MEDIA-SEQUENCE",this.tM=void 0,this.tM=t}return t.prototype.zI=function(){return this.Vw+":"+this.tM},t}(),Fc=function(){function t(t){this.Vw="#EXT-X-MEDIA",this.kv=void 0,this.kv=t}return t.prototype.zI=function(){var t=Gr();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.kv+'"');var n=[];return t.forEach(function(t,i){return n.push(i+"="+t)}),this.Vw+":"+n.join(",")},t}();x(),pt();var Lc=function(){function t(t){this.uA=[],this.uA=t}var n=t.prototype;return n.xN=function(){return this.uA},n.jv=function(t){this.uA.push(t)},n.bVt=function(){for(var t,n="",i=Rt(this.xN());!(t=i()).done;){n+=t.value.zI()+"\n"}return n},n.Ku=function(){this.uA.length=0},t}(),Uc=function(t){function n(n,i){var e;return e=t.call(this,[new Pc,new Ac(8)])||this,i&&e.jv(new Bc("video/index.m3u8")),n&&e.jv(new Fc("audio/index.m3u8")),e}return Tt(n,t),n}(Lc);x(),pt(),x(),pt(),x(),pt();var zc=function(t){return t.j7="HELLO",t.Q7="HI_THERE",t.K7="INITIALIZE",t.Y7="APPEND_INIT",t.J7="APPEND_DATA",t.Z7="ACK",t.ttt="REMOVE",t.itt="DESTROY_SESSION",t}({});x(),pt(),x(),pt();var Wc,Vc=new Array(256);for(Wc=0;Wc<256;Wc+=1)Vc[Wc]=(Wc<16?"0":"")+Wc.toString(16);function Hc(){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(),pt();var qc=function(t){function n(n){var i;return(i=t.call(this,"append")||this).Ok=void 0,i.Ok=n,i}return Tt(n,t),n}(Ro),Xc=function(t){function n(){var n;return(n=t.apply(this,arguments)||this).tPt=0,n.Lp=new k(0),n.Wb=!1,n.tw=!1,n}Tt(n,t);var i=n.prototype;return i.c0=function(t,n){this.tPt+=n,this.Lp=ru([this.Lp,t]),this.Co(new qc(t))},i.Qs=function(){this.MS||(this.Co(new Ro("close")),this.Wb=!0)},It(n,[{key:"Dl",get:function(){return this.tPt}},{key:"Ok",get:function(){return this.Lp}},{key:"MS",get:function(){return this.Wb}},{key:"rw",get:function(){return this.tw},set:function(t){this.tw=t}}]),n}(Eo),jc="sync-seg-",Yc=function(){function t(t,n){this.sw=!1,this.kw=!1,this.tb=void 0,this.nb=void 0,this.o=jc+Hc(),this.tb=n?new Xc:void 0,this.nb=t?new Xc:void 0}return t.prototype.Qs=function(){this.tb&&this.tb.Qs(),this.nb&&this.nb.Qs()},It(t,[{key:"ab",get:function(){return this.sw},set:function(t){this.sw=t}},{key:"lb",get:function(){return this.kw},set:function(t){this.kw=t}}]),t}();x(),pt();var Kc=1.1,Gc=function(t){function n(n,i,e){var r;return(r=t.call(this,[new Pc,new Ac(8),new Dc(1),new Cc(0)])||this).Fht=void 0,r.tg=void 0,r.ng=[],r.Kyt=Gr(),r.Vnt=void 0,r.ig=0,r.ug=function(t){if(t.TO>=on)for(;r.ng.length>0;)r.sg()},e&&r.jv(new xc(e,"com.apple.streamingkeydelivery","1")),r.Fht=n,r.Vnt=i,r.Vnt.jn("remove",r.ug),r.tg=new Mc(0),r.jv(r.tg),r}Tt(n,t);var i=n.prototype;return i.QIt=function(){return this.Fht===Ec.Pl?this.Vnt.lg:this.Fht===Ec.rE?this.Vnt.bg:void 0},i.Bht=function(t){return this.Kyt.get(t)},i.Ku=function(){this.ng.length=0,this.tg.tM=0,this.Kyt.clear(),this.ig=0},i.xN=function(){return this.mg(),[].concat(t.prototype.xN.call(this),this.ng)},i.mg=function(){for(var t,n=Rt(this.Vnt.kg());!(t=n()).done;){var i=t.value;if(!this.Kyt.has(i.o)){var e=void 0;if(this.Fht===Ec.Pl?(e=i.tb,i.lb=!0):(e=i.nb,i.ab=!0),!e)return;this.Kyt.set(i.o,e),e.rw&&this.ng.push(new Nc(i.o+"-init")),this.ng.push(new Oc(Kc,i.o)),this.ig+=Kc}}this.tm()},i.tm=function(){for(;this.ig>60;)this.sg()},i.sg=function(){var t=this.ng.shift();void 0!==t&&function(t){return t.Vw===Rc.jk}(t)&&(this.Kyt.delete(t.kv),this.ig-=t.gv,this.tg.tM++)},n}(Lc);var $c=function(t){function n(n){var i;return(i=t.call(this,"remove")||this).TO=void 0,i.TO=n,i}return Tt(n,t),n}(Ro),Zc=function(t){function n(n,i){var e;return(e=t.call(this)||this).rm=void 0,e.om=void 0,e.sm=void 0,e.am=void 0,e.bm=void 0,e.km=void 0,e.ip=void 0,e.up=void 0,e.ty=void 0,e.ny=void 0,e.hy=void 0,e.rm=n,e.om=i,e.sm=[],e.bm=[],e.km=Gr(),e.ip=Gr(),e.up=Gr(),e.ty=0,e}Tt(n,t);var i=n.prototype;return i.kg=function(){return this.am?(this.sm=this.sm.filter(function(t){return!(t.lb&&t.ab)}),[].concat(this.sm,[this.am],this.bm)):[]},i.v0=function(t){this.my(t)},i.c0=function(t){this.my(t),this.ky(t),this.OS(t)},i.cc=function(t){this.my(t),this.OS(t)},i.Ku=function(){var t;null==(t=this.am)||t.Qs(),this.am=void 0,this.bm.forEach(function(t){return t.Qs()}),this.bm.length=0,this.sm.length=0,this.up=Gr(),this.ty=0},i.ky=function(t){var n=t.startPts,i=t.totalDuration;this.ip.set(t.mediaType,n+i)},i.AS=function(){if(this.am){this.am.Qs(),this.sm.push(this.am);var t=this.bm.shift(),n=new Yc(this.rm,this.om);t?(this.am=t,this.bm.push(n)):this.am=n}},i.BS=function(t){if(this.am){var n=!this.am.nb||0===this.am.nb.Dl,i=!this.am.tb||0===this.am.tb.Dl,e=this.am.nb&&this.am.nb.rw,r=this.am.tb&&this.am.tb.rw,o=i&&(n&&!(this.am.ab||this.am.lb)||e),u=n&&(i&&!(this.am.ab||this.am.lb)||r);(t===Ec.rE&&!u||t===Ec.Pl&&!o)&&(this.AS(),this.AS())}},i.my=function(t){var n=t.mediaType,i=t.kind,e=this.km.get(n);if(void 0===e){if(i===zc.Y7||i===zc.J7){var r=[t];this.km.set(n,r)}}else e.push(t)},i.OS=function(t){var n=this.RT(t);for(var i,e=Rt(n);!(i=e()).done;){var r=i.value;switch(r.kind){case zc.Y7:this.tk(r),this.up=Gr(),this.ty=0;break;case zc.ttt:this.ik(r);break;case zc.J7:this.uk(r)}}},i.tk=function(t){var n=t.mediaType;void 0===this.am?(this.am=new Yc(this.rm,this.om),this.bm.push(new Yc(this.rm,this.om))):this.BS(n),n===Ec.Pl?(this.hy=t.segment,this.am.tb.rw=!0):n===Ec.rE&&(this.ny=t.segment,this.am.nb.rw=!0)},i.uk=function(t){var n,i,e=t.mediaType===Ec.rE,r=t.totalDuration,o=null!=(n=this.up.get(t.mediaType))?n:0;e?(this.am.nb.c0(t.segment,r),i=o+this.am.nb.Dl):(this.am.tb.c0(t.segment,r),i=o+this.am.tb.Dl),i>=this.ty+Kc&&(this.up.set(t.mediaType,i),this.ty+=Kc,this.AS())},i.ik=function(t){this.ip.set(t.mediaType,void 0),this.BS(t.mediaType),this.sm.length=0,this.Co(new $c(t.endTime))},i.RT=function(t){var n=this;if(t.kind===zc.ttt)return this.sk(t);var i=[];return this.km.forEach(function(t){if(t&&t.length>0){var e=un(t,function(t){return t.kind===zc.ttt});-1===e&&(e=t.length);for(var r,o=Rt(t.slice(0,e));!(r=o()).done;){var u=r.value;if(!cn(i,u)){var s,f=n.sk(u);if(f.length>0)(s=i).push.apply(s,[].concat(f));else if(u.kind===zc.J7)break}}}}),i},i.sk=function(t){var n=this.km.get(t.mediaType),i=function(t){return t===Ec.Pl?Ec.rE:Ec.Pl}(t.mediaType);if(!(i===Ec.Pl?this.om:this.rm))return n.splice(0,n.indexOf(t)+1);if(t.kind===zc.Y7)return[];var e=this.ip.get(i);if(void 0===e)return[];if(t.kind===zc.ttt){var r=this.ak(i);if(r.length>0){var o=n.splice(0,n.indexOf(t));return n.splice(0,1),[].concat(o,r,[t])}return[]}if(t.startPts<=e){var u=n.splice(0,n.indexOf(t));n.splice(0,1);var s=this.mk(t,u,i);return[].concat(u,s,[t])}return[]},i.mk=function(t,n,i){var e=this.km.get(i);if(!e)return[];var r=t.startPts+t.totalDuration,o=un(e,function(t){return t.kind===zc.ttt}),u=o-1;-1===o&&(u=e.length-1);for(var s=u+1,f=0;f<=u&&s===u+1;f++){var h=e[f];h.kind===zc.J7&&h.startPts>r&&(s=f)}var c=-1;return-1!==un(n,function(t){return t.kind===zc.Y7})&&(c=un(e,function(t){return t.kind===zc.Y7})),c>s&&(s=c+1),s>0?(e[s-1].kind===zc.Y7&&(s-=1),e.splice(0,s)):[]},i.ak=function(t){var n=this.km.get(t);if(n){var i=un(n,function(t){return t.kind===zc.ttt});if(i>=0)return n.splice(0,i+1)}return[]},i.kk=function(){var t="[MEDIABUFFER] endPTS: ";this.ip.forEach(function(n,i){t=t.concat(i+" = "+n+" ")}),jt.Zp(t)},i.SI=function(t,n){var i=t+": [";null==n||n.forEach(function(t){i=i.concat(" "+t.kind+"("+t.mediaType+")")}),i=i.concat(" ]"),jt.Zp(i)},It(n,[{key:"bg",get:function(){var t;return null==(t=this.ny)?void 0:t.slice()}},{key:"lg",get:function(){var t;return null==(t=this.hy)?void 0:t.slice()}}]),n}(Eo);var Jc=function(){function t(t,n){this.IE=void 0,this.ME=void 0,this.TR=void 0,this.CR=void 0;var i=t.some(function(t){return t.match("audio")}),e=t.some(function(t){return t.match("video")});this.ME=new Zc(i,e),this.IE=new Uc(i,e),i&&(this.TR=new Gc(Ec.rE,this.ME,n)),e&&(this.CR=new Gc(Ec.Pl,this.ME,n))}var n=t.prototype;return n.BR=function(t){var n,i,e=Qc(t);return e===Ec.Pl?null==(n=this.CR)?void 0:n.QIt():e===Ec.rE?null==(i=this.TR)?void 0:i.QIt():void 0},n.Bht=function(t){var n,i,e=t.split("/")[1],r=Qc(t);return r===Ec.Pl?null==(n=this.CR)?void 0:n.Bht(e):r===Ec.rE?null==(i=this.TR)?void 0:i.Bht(e):void 0},n.v0=function(t){this.ME.v0(t)},n.c0=function(t){this.ME.c0(t)},n.hdt=function(t){this.ME.cc(t)},n.Ku=function(){var t,n;this.ME.Ku(),this.IE.Ku(),null==(t=this.TR)||t.Ku(),null==(n=this.CR)||n.Ku()},It(t,[{key:"IN",get:function(){return this.IE}},{key:"SP",get:function(){return this.TR}},{key:"XP",get:function(){return this.CR}}]),t}();function Qc(t){return t.match(/video/)?Ec.Pl:Ec.rE}var ta=function(){function t(t,n){var i=this;this.ID=void 0,this.PC=void 0,this.fat=void 0,this.WQt=void 0,this.ID=t,this.PC=n,this.fat=void 0,this.WQt=function(t){return nn(function(){var n,i;return en(this,function(e){switch((n=t.data).kind){case zc.K7:this.fat=new Jc(n.mediaBufferConfigs,n.fairPlaySdkUri);break;case zc.Y7:this.fat.v0(n);break;case zc.J7:this.fat.c0(n);break;case zc.ttt:this.fat.hdt(n)}return i={kind:zc.Z7},this.ID.postMessage(i),[2]})}).call(i)},this.ID.onmessage=this.WQt}var n=t.prototype;return n.bVt=function(t){return"master.m3u8"===t?this.fat.IN:"video/index.m3u8"===t?this.fat.XP:"audio/index.m3u8"===t?this.fat.SP:void 0},n.CC=function(t){if(t.match(/m3u8/)){var n,i=null==(n=this.bVt(t))?void 0:n.bVt();return new Response(i,{headers:{"Content-Type":"application/x-mpegurl; charset=utf-8"}})}if(t.match(jc)){var e={"Content-Type":t.match(/video/)?"video/mp4":"audio/mp4"};if(t.match(/init/)){var r,o=null==(r=this.fat)?void 0:r.BR(t);return new Response(o,{headers:e})}var u=this.Dht(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.Ok)},e=function(){n.close(),t.yn("append",i),t.yn("close",e)};return new self.ReadableStream({start:function(r){(n=r).enqueue(t.Ok),t.MS?n.close():(t.jn("append",i),t.jn("close",e))},cancel:function(){t.yn("append",i),t.yn("close",e)}})}(u);return new Response(s,{headers:e})}return new Response(void 0,{status:404,statusText:"Not Found"})},n.Dht=function(t){return this.fat.Bht(t)},n.close=function(){var t;this.ID.close(),null==(t=this.fat)||t.Ku()},t}(),na=function(){function t(){var t=this;this.U4=Gr(),this.yQt=void 0,this.WQt=function(n){var i=n.data;if(i.kind===zc.j7){t.UC().catch(Jt);var e=i.port,r=Hc(),o=new ta(e,n.source.id);t.U4.set(r,o);var u=function(n){n.data.kind===zc.itt&&(t.uz(r),e.removeEventListener("message",u))};e.addEventListener("message",u);var s={kind:zc.Q7,sessionId:r};e.postMessage(s)}},this.hz=function(n){if(bo(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.U4.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.CC(r);n.respondWith(f)}}}var n=t.prototype;return n.br=function(t){this.yQt=t,t.addEventListener("message",this.WQt),t.addEventListener("fetch",this.hz)},n.uz=function(t){var n=this.U4.get(t);n&&n.close(),this.U4.delete(t)},n.UC=function(){return nn(function(){var t,n,i;return en(this,function(e){switch(e.label){case 0:return t=this,[4,this.yQt.clients.matchAll()];case 1:return n=e.sent(),i=n.map(function(t){return t.id}),this.U4.forEach(function(n,e){cn(i,n.PC)||t.uz(e)}),[2]}})}).call(this)},t}();na.az=new na;var ia=self;ia.addEventListener("install",function(t){t.waitUntil(ia.skipWaiting())}),ia.addEventListener("activate",function(t){t.waitUntil(ia.clients.claim())}),na.az.br(ia)}("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof a?a:"undefined"!=typeof global?global:this);
|
|
30
|
+
!function(t){"use strict";var n,i,e,r,o,u,s,f,h,c=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,k=t.Uint8Array,I=(t.Worker,t.WorkerGlobalScope,t.XMLHttpRequest),E=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")):(h=0,n=function(t){return"hd"+t+"_"+ ++h},e=(i=function(t){return"hd"+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,i){return null!=i&&void 0!==n&&i[n.hasInstance]?!!i[n.hasInstance](t):t instanceof i}var M=D(function(){x(),pt()});function F(t){return t&&void 0!==n&&t.constructor===n?"symbol":typeof t}var L,U,z,W,V,H,q,X,j,Y,K,G,$,Z,J,Q,tt,nt,it,et=D(function(){x(),pt()});function rt(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 ot(t){return new this(function(n,i){if(!t||void 0===t.length)return i(new m((void 0===t?"undefined":F(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":F(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 ut(t){return Boolean(t&&void 0!==t.length)}function st(){}function ft(t){if(!B(this,ft))throw new m("Promises must be constructed via new");if("function"!=typeof t)throw new m("not a function");this.Va=0,this.ttn=!1,this.nTt=void 0,this.ntn=[],lt(t,this)}function ht(t,n){for(;3===t.Va;)t=t.nTt;0!==t.Va?(t.ttn=!0,ft.itn(function(){var i=1===t.Va?n.onFulfilled:n.onRejected;if(null!==i){var e;try{e=i(t.nTt)}catch(t){return void at(n.promise,t)}ct(n.promise,e)}else(1===t.Va?ct:at)(n.promise,t.nTt)})):t.ntn.push(n)}function ct(t,n){try{if(n===t)throw new m("A promise cannot be resolved with itself.");if(n&&("object"===(void 0===n?"undefined":F(n))||"function"==typeof n)){var i=n.then;if(B(n,ft))return t.Va=3,t.nTt=n,void vt(t);if("function"==typeof i)return void lt(function(t,n){return function(){t.apply(n,arguments)}}(i,n),t)}t.Va=1,t.nTt=n,vt(t)}catch(n){at(t,n)}}function at(t,n){t.Va=2,t.nTt=n,vt(t)}function vt(t){2===t.Va&&0===t.ntn.length&&ft.itn(function(){t.ttn||ft.rtn(t.nTt)});for(var n=0,i=t.ntn.length;n<i;n++)ht(t,t.ntn[n]);t.ntn=null}function dt(t,n,i){this.onFulfilled="function"==typeof t?t:null,this.onRejected="function"==typeof n?n:null,this.promise=i}function lt(t,n){var i=!1;try{t(function(t){i||(i=!0,ct(n,t))},function(t){i||(i=!0,at(n,t))})}catch(t){if(i)return;i=!0,at(n,t)}}function wt(t){return new G(K,{reason:t,promise:U.reject(t).catch(function(){}),cancelable:!0})}function bt(t){var n=new $(K,{detail:{reason:t},cancelable:!0});return p.defineProperty(n,"reason",{value:t}),n}function gt(t){var n=a.createEvent("CustomEvent");return n.initCustomEvent(K,!1,!0,{reason:t}),n}var mt=D(function(){var t,n,i,e;x(),pt(),M(),et(),L=d,ft.prototype.catch=function(t){return this.then(null,t)},ft.prototype.then=function(t,n){var i=new this.constructor(st);return ht(this,new dt(t,n,i)),i},ft.prototype.finally=rt,ft.all=function(t){return new ft(function(n,i){if(!ut(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":F(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])})},ft.allSettled=ot,ft.resolve=function(t){return t&&"object"===(void 0===t?"undefined":F(t))&&t.constructor===ft?t:new ft(function(n){n(t)})},ft.reject=function(t){return new ft(function(n,i){i(t)})},ft.race=function(t){return new ft(function(n,i){if(!ut(t))return i(new m("Promise.race accepts an array"));for(var e=0,r=t.length;e<r;e++)ft.resolve(t[e]).then(n,i)})},ft.itn="function"==typeof setImmediate&&function(t){setImmediate(t)}||function(t){L(t,0)},ft.rtn=function(t){"undefined"!=typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",t)},U=function(){var t=self.Promise;if(void 0!==t)try{if(-1!==t.toString().indexOf("[native code]"))return t}catch(t){}}(),z=v?v.userAgent:"",W=z.match(/Firefox\/([0-9]+)/i),V=null!=W,H=W?Number(W[1]):0,q=z.match(/(Version)\/((\d+)\.(\d+)(?:\.(\d+))?).*Safari/),X=null!=q,j=q?Number(q[3]):0,Y=function(){function t(t){this.Hb=0,this.Tf=0,this.Lp=[],this.etn=t}return t.prototype.stn=function(t){var n=this.length();this.utn(n+1);var i=this.Tf+n&this.etn-1;this.Lp[i]=t,this.Hb=n+1},t.prototype.push=function(t){var n=this.length()+1;if(this.etn<n)this.stn(t);else{var i=this.Tf+n-1,e=this.etn-1;this.Lp[i&e]=t,this.Hb=n}},t.prototype.shift=function(){var t=this.Tf,n=this.Lp[t];return this.Lp[t]=void 0,this.Tf=t+1&this.etn-1,this.Hb--,n},t.prototype.length=function(){return this.Hb},t.prototype.utn=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.Tf+this.Hb&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.Lp,0,n,i)},t}(),K="unhandledrejection",G=self.PromiseRejectionEvent,$=self.CustomEvent,Z=function(t){return Z=function(){try{var t=U.resolve(),n="error",i=new G(K,{reason:n,promise:t});return K===i.type&&n===i.reason}catch(t){}return!1}()?wt:function(){try{var t="error",n=new $(K,{detail:{reason:t}});return K===n.type&&t===n.detail.reason}catch(t){}return!1}()?bt:gt,Z(t)},Q=V&&H<60||X&&j<15,U&&!Q?(tt=U,function(){}):(tt=ft,nt=null!==(J=function(){var t=self.queueMicrotask;if("function"==typeof t)return function(n){return t(n)};var n=U;if(n&&"function"==typeof n.resolve){var i=n.resolve();return function(t){return i.then(t)}}}())&&void 0!==J?J:ft.itn,t=nt,n=new Y(16),i=!1,(it={g4:function(r){n.push(r),i||(i=!0,t(e))},sX:e=function(){for(;n.length()>0;)n.shift()();i=!1}}).sX,ft.itn=it.g4,ft.rtn=function(t){try{var n=Z(t);if(!self.dispatchEvent(n)||n.defaultPrevented)return}catch(t){}d(function(){throw new g("Unhandled promise rejection: ".concat(t))},0)})}),pt=D(function(){mt()}),yt=C(function(t,i){var r,o;x(),pt(),et(),r=t,o=function(t){var i="function"==typeof n&&"symbol"===F(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":F(t))&&null!==t||"function"==typeof t}function f(t){return t.slice()}function h(t,n,i,e,r){new k(t).set(new k(i,e,r),n)}function c(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 _=tt,S=tt.prototype.then,T=tt.resolve.bind(_),I=tt.reject.bind(_);function E(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 B=function(){function t(){this.ul=0,this.Af=0,this.Tf={Ef:[],Pf:void 0},this.Rf=this.Tf,this.ul=0,this.Af=0}return p.defineProperty(t.prototype,"length",{get:function(){return this.Af},enumerable:!0,configurable:!0}),t.prototype.push=function(t){var n=this.Rf,i=n;16383===n.Ef.length&&(i={Ef:[],Pf:void 0}),n.Ef.push(t),i!==n&&(this.Rf=i,n.Pf=i),++this.Af},t.prototype.shift=function(){var t=this.Tf,n=t,i=this.ul,e=i+1,r=t.Ef,o=r[i];return 16384===e&&(n=t.Pf,e=0),--this.Af,this.ul=e,t!==n&&(this.Tf=n),r[i]=void 0,o},t.prototype.forEach=function(t){for(var n=this.ul,i=this.Tf,e=i.Ef;!(n===e.length&&void 0===i.Pf||n===e.length&&(n=0,0===(e=(i=i.Pf).Ef).length));)t(e[n]),++n},t.prototype.peek=function(){var t=this.Tf,n=this.ul;return t.Ef[n]},t}();function M(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 L(t,n){t.If=!0,t.Cf=n,n.Df=t,"readable"===n.Va?V(t):"closed"===n.Va?function(t){V(t),X(t)}(t):H(t,n.Nf)}function U(t,n){return Zn(t.Cf,n)}function z(t){"readable"===t.Cf.Va?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.Cf.Df=void 0,t.Cf=void 0}function W(t){return new m("Cannot "+t+" a stream using a released reader")}function V(t){t.Bf=E(function(n,i){t.Mf=n,t.Lf=i})}function H(t,n){V(t),q(t,n)}function q(t,n){x(t.Bf),t.Lf(n),t.Mf=void 0,t.Lf=void 0}function X(t){t.Mf(void 0),t.Mf=void 0,t.Lf=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.If=n,i}function G(t){return E(function(n,i){var e={Of:n,Ff:i};t.Df.Uf.push(e)})}function $(t,n,i){var e=t.Df;e.Uf.shift().Of(M(n,i,e.If))}function Z(t){return t.Df.Uf.length}function J(t){var n=t.Df;return void 0!==n&&!!et(n)}var Q,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");L(this,t),this.Uf=new B}return p.defineProperty(t.prototype,"closed",{get:function(){return et(this)?this.Bf:O(ot("closed"))},enumerable:!0,configurable:!0}),t.prototype.cancel=function(t){return et(this)?void 0===this.Cf?O(W("cancel")):U(this,t):O(ot("cancel"))},t.prototype.read=function(){return et(this)?void 0===this.Cf?O(W("read from")):rt(this):O(ot("read"))},t.prototype.releaseLock=function(){if(!et(this))throw ot("releaseLock");if(void 0!==this.Cf){if(this.Uf.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,"Uf")}function rt(t){var n=t.Cf;return n.Vf=!0,"closed"===n.Va?R(M(void 0,!0,t.If)):"errored"===n.Va?O(n.Nf):n.Hf[Y]()}function ot(t){return new m("ReadableStreamDefaultReader.prototype."+t+" can only be used on a ReadableStreamDefaultReader")}"symbol"===F(i.asyncIterator)&&((Q={})[i.asyncIterator]=function(){return this},nt=Q,p.defineProperty(nt,i.asyncIterator,{enumerable:!1}));var ut={next:function(){if(!1===st(this))return O(ft("next"));var t=this.qf;return void 0===t.Cf?O(W("iterate")):C(rt(t),function(n){var i=n.done;return i&&z(t),M(n.value,i,!0)})},return:function(t){if(!1===st(this))return O(ft("next"));var n=this.qf;if(void 0===n.Cf)return O(W("finish iterating"));if(n.Uf.length>0)return O(new m("Tried to release a reader lock when that reader has pending read() calls un-settled"));if(!1===this.Wf){var i=U(n,t);return z(n),C(i,function(){return M(t,!0,!0)})}return z(n),R(M(t,!0,!0))}};function st(t){return!!s(t)&&!!p.prototype.hasOwnProperty.call(t,"qf")}function ft(t){return new m("ReadableStreamAsyncIterator."+t+" can only be used on a ReadableSteamAsyncIterator")}function ht(t){var n=t.zf.shift();return t.Gf-=n.size,t.Gf<0&&(t.Gf=0),n.value}function ct(t,n,i){if(!c(i=Number(i)))throw new RangeError("Size must be a finite, non-NaN, non-negative number.");t.zf.push({value:n,size:i}),t.Gf+=i}function at(t){t.zf=new B,t.Gf=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===kt(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.Va="writable",t.Nf=void 0,t.Xf=void 0,t.Qf=void 0,t.Kf=new B,t.Yf=void 0,t.Jf=void 0,t.Zf=void 0,t.$f=void 0,t.ev=!1}function gt(t){return!!s(t)&&!!p.prototype.hasOwnProperty.call(t,"Qf")}function mt(t){return void 0!==t.Xf}function pt(t,n){var i=t.Va;if("closed"===i||"errored"===i)return R(void 0);if(void 0!==t.$f)return t.$f.rv;var e=!1;"erroring"===i&&(e=!0,n=void 0);var r=E(function(i,r){t.$f={rv:void 0,Of:i,Ff:r,ov:n,hv:e}});return t.$f.rv=r,!1===e&&St(t,n),r}function yt(t){var n=t.Va;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=E(function(n,i){var e={Of:n,Ff:i};t.Jf=e}),e=t.Xf;return void 0!==e&&!0===t.ev&&"writable"===n&&Qt(e),function(t){ct(t,"close",0),Lt(t)}(t.Qf),i}function _t(t,n){"writable"!==t.Va?Tt(t):St(t,n)}function St(t,n){var i=t.Qf;t.Va="erroring",t.Nf=n;var e=t.Xf;void 0!==e&&At(e,n),!1===function(t){return void 0!==t.Yf||void 0!==t.Zf}(t)&&!0===i.uv&&Tt(t)}function Tt(t){t.Va="errored",t.Qf[dt]();var n=t.Nf;if(t.Kf.forEach(function(t){t.Ff(n)}),t.Kf=new B,void 0!==t.$f){var i=t.$f;if(t.$f=void 0,!0===i.hv)return i.Ff(n),void It(t);P(t.Qf[vt](i.ov),function(){i.Of(),It(t)},function(n){i.Ff(n),It(t)})}else It(t)}function kt(t){return void 0!==t.Jf||void 0!==t.Zf}function It(t){void 0!==t.Jf&&(t.Jf.Ff(t.Nf),t.Jf=void 0);var n=t.Xf;void 0!==n&&Yt(n,t.Nf)}function Et(t,n){var i=t.Xf;void 0!==i&&n!==t.ev&&(!0===n?function(t){Gt(t)}(i):Qt(i)),t.ev=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.fv=t,t.Xf=this;var n=t.Va;if("writable"===n)!1===kt(t)&&!0===t.ev?Gt(this):Zt(this),Xt(this);else if("erroring"===n)$t(this,t.Nf),Xt(this);else if("closed"===n)Zt(this),function(t){Xt(t),Kt(t)}(this);else{var i=t.Nf;$t(this,i),jt(this,i)}}return p.defineProperty(t.prototype,"closed",{get:function(){return!1===Ot(this)?O(Ht("closed")):this.Bf},enumerable:!0,configurable:!0}),p.defineProperty(t.prototype,"desiredSize",{get:function(){if(!1===Ot(this))throw Ht("desiredSize");if(void 0===this.fv)throw qt("desiredSize");return function(t){var n=t.fv,i=n.Va;return"errored"===i||"erroring"===i?null:"closed"===i?0:Ft(n.Qf)}(this)},enumerable:!0,configurable:!0}),p.defineProperty(t.prototype,"ready",{get:function(){return!1===Ot(this)?O(Ht("ready")):this.vv},enumerable:!0,configurable:!0}),t.prototype.abort=function(t){return!1===Ot(this)?O(Ht("abort")):void 0===this.fv?O(qt("abort")):function(t,n){var i=t.fv;return pt(i,n)}(this,t)},t.prototype.close=function(){if(!1===Ot(this))return O(Ht("close"));var t=this.fv;return void 0===t?O(qt("close")):!0===kt(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.fv&&Dt(this)},t.prototype.write=function(t){return!1===Ot(this)?O(Ht("write")):void 0===this.fv?O(qt("write to")):Ct(this,t)},t}();function Ot(t){return!!s(t)&&!!p.prototype.hasOwnProperty.call(t,"fv")}function Nt(t){return yt(t.fv)}function Pt(t,n){"pending"===t._v?Yt(t,n):function(t,n){jt(t,n)}(t,n)}function At(t,n){"pending"===t.mv?Jt(t,n):function(t,n){$t(t,n)}(t,n)}function Dt(t){var n=t.fv,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.Xf=void 0,t.fv=void 0}function Ct(t,n){var i=t.fv,e=i.Qf,r=function(t,n){try{return t.pv(n)}catch(n){return Ut(t,n),1}}(e,n);if(i!==t.fv)return O(qt("write to"));var o=i.Va;if("errored"===o)return O(i.Nf);if(!0===kt(i)||"closed"===o)return O(new m("The stream is closing or closed and cannot be written to"));if("erroring"===o)return O(i.Nf);var u=function(t){return E(function(n,i){var e={Of:n,Ff:i};t.Kf.push(e)})}(i);return function(t,n,i){var e={chunk:n};try{ct(t,e,i)}catch(n){return void Ut(t,n)}var r=t.wv;!1===kt(r)&&"writable"===r.Va&&Et(r,zt(t)),Lt(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,"wv")}(this))throw new m("WritableStreamDefaultController.prototype.error can only be used on a WritableStreamDefaultController");"writable"===this.wv.Va&&Wt(this,t)},t.prototype[vt]=function(t){var n=this.yv(t);return Mt(this),n},t.prototype[dt]=function(){at(this)},t}();function Bt(t,n,i,e,r,o,u,s){n.wv=t,t.Qf=n,n.zf=void 0,n.Gf=void 0,at(n),n.uv=!1,n.pv=s,n.bv=u,n.Av=e,n.Sv=r,n.yv=o;var f=zt(n);Et(t,f),P(R(i()),function(){n.uv=!0,Lt(n)},function(i){n.uv=!0,_t(t,i)})}function Mt(t){t.Av=void 0,t.Sv=void 0,t.yv=void 0,t.pv=void 0}function Ft(t){return t.bv-t.Gf}function Lt(t){var n=t.wv;if(!1!==t.uv&&void 0===n.Yf)if("erroring"!==n.Va){if(0!==t.zf.length){var i=function(t){return t.zf.peek().value}(t);"close"===i?function(t){var n=t.wv;(function(t){t.Zf=t.Jf,t.Jf=void 0})(n),ht(t);var i=t.Sv();Mt(t),P(i,function(){!function(t){t.Zf.Of(void 0),t.Zf=void 0,"erroring"===t.Va&&(t.Nf=void 0,void 0!==t.$f&&(t.$f.Of(),t.$f=void 0)),t.Va="closed";var n=t.Xf;void 0!==n&&Kt(n)}(n)},function(t){!function(t,n){t.Zf.Ff(n),t.Zf=void 0,void 0!==t.$f&&(t.$f.Ff(n),t.$f=void 0),_t(t,n)}(n,t)})}(t):function(t,n){var i=t.wv;!function(t){t.Yf=t.Kf.shift()}(i);var e=t.Av(n);P(e,function(){!function(t){t.Yf.Of(void 0),t.Yf=void 0}(i);var n=i.Va;if(ht(t),!1===kt(i)&&"writable"===n){var e=zt(t);Et(i,e)}Lt(t)},function(n){"writable"===i.Va&&Mt(t),function(t,n){t.Yf.Ff(n),t.Yf=void 0,_t(t,n)}(i,n)})}(t,i.chunk)}}else Tt(n)}function Ut(t,n){"writable"===t.wv.Va&&Wt(t,n)}function zt(t){return Ft(t)<=0}function Wt(t,n){var i=t.wv;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.Bf=E(function(n,i){t.Mf=n,t.Lf=i,t._v="pending"})}function jt(t,n){Xt(t),Yt(t,n)}function Yt(t,n){x(t.Bf),t.Lf(n),t.Mf=void 0,t.Lf=void 0,t._v="rejected"}function Kt(t){t.Mf(void 0),t.Mf=void 0,t.Lf=void 0,t._v="resolved"}function Gt(t){t.vv=E(function(n,i){t.Tv=n,t.Ev=i}),t.mv="pending"}function $t(t,n){Gt(t),Jt(t,n)}function Zt(t){Gt(t),Qt(t)}function Jt(t,n){x(t.vv),t.Ev(n),t.Tv=void 0,t.Ev=void 0,t.mv="rejected"}function Qt(t){t.Tv(void 0),t.Tv=void 0,t.Ev=void 0,t.mv="fulfilled"}function tn(t){if("object"!==(void 0===t?"undefined":F(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":F(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.Vf=!0;var h=!1,c=R(void 0);return E(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.Va?pt(n,i):R(void 0)}),!1===o&&r.push(function(){return"readable"===t.Va?Zn(t,i):R(void 0)}),_(function(){return tt.all(r.map(function(t){return t()}))},!0,i)},!0===u.aborted)return void d();u.addEventListener("abort",d)}if(y(t,s.Bf,function(t){!1===e?_(function(){return pt(n,t)},!0,t):S(!0,t)}),y(n,f.Bf,function(n){!1===o?_(function(){return Zn(t,n)},!0,n):S(!0,n)}),l=t,w=s.Bf,b=function(){!1===i?_(function(){return function(t){var n=t.fv,i=n.Va;return!0===kt(n)||"closed"===i?R(void 0):"errored"===i?O(n.Nf):Nt(t)}(f)}):S()},"closed"===l.Va?b():A(w,b),!0===kt(n)||"closed"===n.Va){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=c;return N(c,function(){return t!==c?p():void 0})}function y(t,n,i){"errored"===t.Va?i(t.Nf):D(n,i)}function _(t,i,e){function r(){P(t(),function(){return T(i,e)},function(t){return T(!0,t)})}!0!==h&&(h=!0,"writable"===n.Va&&!1===kt(n)?A(p(),r):r())}function S(t,i){!0!==h&&(h=!0,"writable"===n.Va&&!1===kt(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(E(function(t,n){!function i(e){e?t():N(!0===h?R(!0):N(f.vv,function(){return N(rt(s),function(t){return!0===t.done||(c=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.xv(t);return cn(this),n},t.prototype[Y]=function(){var t=this.Pv;if(this.zf.length>0){var n=ht(this);return!0===this.Rv&&0===this.zf.length?(cn(this),Jn(t)):fn(this),R(M(n,!1,t.Df.If))}var i=G(t);return fn(this),i},t}();function sn(t){return!!s(t)&&!!p.prototype.hasOwnProperty.call(t,"Pv")}function fn(t){!1!==hn(t)&&(!0!==t.Iv?(t.Iv=!0,P(t.Cv(),function(){t.Iv=!1,!0===t.Dv&&(t.Dv=!1,fn(t))},function(n){dn(t,n)})):t.Dv=!0)}function hn(t){var n=t.Pv;return!1!==wn(t)&&!1!==t.uv&&(!0===$n(n)&&Z(n)>0||ln(t)>0)}function cn(t){t.Cv=void 0,t.xv=void 0,t.pv=void 0}function an(t){var n=t.Pv;t.Rv=!0,0===t.zf.length&&(cn(t),Jn(n))}function vn(t,n){var i=t.Pv;if(!0===$n(i)&&Z(i)>0)$(i,n,!1);else{var e=void 0;try{e=t.pv(n)}catch(n){throw dn(t,n),n}try{ct(t,n,e)}catch(n){throw dn(t,n),n}}fn(t)}function dn(t,n){var i=t.Pv;"readable"===i.Va&&(at(t),cn(t),Qn(i,n))}function ln(t){var n=t.Pv.Va;return"errored"===n?null:"closed"===n?0:t.bv-t.Gf}function wn(t){var n=t.Pv.Va;return!1===t.Rv&&"readable"===n}function bn(t,n,i,e,r,o,u){n.Pv=t,n.zf=void 0,n.Gf=void 0,at(n),n.uv=!1,n.Rv=!1,n.Dv=!1,n.Iv=!1,n.pv=u,n.bv=o,n.Cv=e,n.xv=r,t.Hf=n,P(R(i()),function(){n.uv=!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 Ln("view");return this.Hu},enumerable:!0,configurable:!0}),t.prototype.respond=function(t){if(!1===Sn(this))throw Ln("respond");if(void 0===this.Nv)throw new m("This BYOB request has been invalidated");this.Hu.buffer,function(t,n){if(!1===c(n=Number(n)))throw new RangeError("bytesWritten must be a finite");Dn(t,n)}(this.Nv,t)},t.prototype.respondWithNewView=function(t){if(!1===Sn(this))throw Ln("respond");if(void 0===this.Nv)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.Bv.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.Nv,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 Un("byobRequest");if(void 0===this.Mv&&this.Bv.length>0){var t=this.Bv.peek(),n=new k(t.buffer,t.byteOffset+t.bytesFilled,t.byteLength-t.bytesFilled),i=p.create(pn.prototype);!function(t,n,i){t.Nv=n,t.Hu=i}(i,this,n),this.Mv=i}return this.Mv},enumerable:!0,configurable:!0}),p.defineProperty(t.prototype,"desiredSize",{get:function(){if(!1===_n(this))throw Un("desiredSize");return Mn(this)},enumerable:!0,configurable:!0}),t.prototype.close=function(){if(!1===_n(this))throw Un("close");if(!0===this.Rv)throw new m("The stream has already been closed; do not close it again!");var t=this.Lv.Va;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.Lv;if(t.Gf>0)t.Rv=!0;else{if(t.Bv.length>0&&t.Bv.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 Un("enqueue");if(!0===this.Rv)throw new m("stream is closed or draining");var n=this.Lv.Va;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.Lv,e=n.buffer,r=n.byteOffset,o=n.byteLength,u=e;!0===J(i)?0===Z(i)?En(t,u,r,o):$(i,new k(u,r,o),!1):!0===Vn(i)?(En(t,u,r,o),An(t)):En(t,u,r,o),Tn(t)}(this,t)},t.prototype.error=function(t){if(!1===_n(this))throw Un("error");Bn(this,t)},t.prototype[j]=function(t){this.Bv.length>0&&(this.Bv.peek().bytesFilled=0),at(this);var n=this.xv(t);return xn(this),n},t.prototype[Y]=function(){var t=this.Lv;if(this.Gf>0){var n=this.zf.shift();this.Gf-=n.byteLength,Nn(this);var i=void 0;try{i=new k(n.buffer,n.byteOffset,n.byteLength)}catch(t){return O(t)}return R(M(i,!1,t.Df.If))}var e=this.Ov;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:k,readerType:"default"};this.Bv.push(o)}var u=G(t);return Tn(this),u},t}();function _n(t){return!!s(t)&&!!p.prototype.hasOwnProperty.call(t,"Lv")}function Sn(t){return!!s(t)&&!!p.prototype.hasOwnProperty.call(t,"Nv")}function Tn(t){var n=function(t){var n=t.Lv;if("readable"!==n.Va)return!1;if(!0===t.Rv)return!1;if(!1===t.uv)return!1;if(!0===J(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.Iv?(t.Iv=!0,P(t.Cv(),function(){t.Iv=!1,!0===t.Dv&&(t.Dv=!1,Tn(t))},function(n){Bn(t,n)})):t.Dv=!0)}function kn(t,n){var i=!1;"closed"===t.Va&&(i=!0);var e=In(n);"default"===n.readerType?$(t,e,i):function(t,n,i){var e=t.Df,r=e.Fv.shift();r.Of(M(n,i,e.If))}(t,e,i)}function In(t){var n=t.bytesFilled,i=t.elementSize;return new t.ctor(t.buffer,t.byteOffset,n/i)}function En(t,n,i,e){t.zf.push({buffer:n,byteOffset:i,byteLength:e}),t.Gf+=e}function Rn(t,n){var i=n.elementSize,e=n.bytesFilled-n.bytesFilled%i,r=y.min(t.Gf,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 c=t.zf;s>0;){var a=c.peek(),v=y.min(s,a.byteLength),d=n.byteOffset+n.bytesFilled;h(n.buffer,d,a.buffer,a.byteOffset,v),a.byteLength===v?c.shift():(a.byteOffset+=v,a.byteLength-=v),t.Gf-=v,On(t,v,n),s-=v}return f}function On(t,n,i){Pn(t),i.bytesFilled+=n}function Nn(t){0===t.Gf&&!0===t.Rv?(xn(t),Jn(t.Lv)):Tn(t)}function Pn(t){void 0!==t.Mv&&(t.Mv.Nv=void 0,t.Mv.Hu=void 0,t.Mv=void 0)}function An(t){for(;t.Bv.length>0;){if(0===t.Gf)return;var n=t.Bv.peek();!0===Rn(t,n)&&(Cn(t),kn(t.Lv,n))}}function Dn(t,n){var i=t.Bv.peek();if("closed"===t.Lv.Va){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.Lv;if(!0===Vn(i))for(;Wn(i)>0;)kn(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);En(t,o,0,o.byteLength)}i.buffer=i.buffer,i.bytesFilled-=e,kn(t.Lv,i),An(t)}}(t,n,i);Tn(t)}function Cn(t){var n=t.Bv.shift();return Pn(t),n}function xn(t){t.Cv=void 0,t.xv=void 0}function Bn(t,n){var i=t.Lv;"readable"===i.Va&&(function(t){Pn(t),t.Bv=new B}(t),at(t),xn(t),Qn(i,n))}function Mn(t){var n=t.Lv.Va;return"errored"===n?null:"closed"===n?0:t.bv-t.Gf}function Fn(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.Lv=t,n.Dv=!1,n.Iv=!1,n.Mv=void 0,n.zf=n.Gf=void 0,at(n),n.Rv=!1,n.uv=!1,n.bv=w(o),n.Cv=e,n.xv=r,n.Ov=u,n.Bv=new B,t.Hf=n,P(R(i()),function(){n.uv=!0,Tn(n)},function(t){Bn(n,t)})}(t,e,function(){return d(n,"start",[e])},r,o,i,u)}function Ln(t){return new m("ReadableStreamBYOBRequest.prototype."+t+" can only be used on a ReadableStreamBYOBRequest")}function Un(t){return new m("ReadableByteStreamController.prototype."+t+" can only be used on a ReadableByteStreamController")}function zn(t){return E(function(n,i){var e={Of:n,Ff:i};t.Df.Fv.push(e)})}function Wn(t){return t.Df.Fv.length}function Vn(t){var n=t.Df;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.Hf))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");L(this,t),this.Fv=new B}return p.defineProperty(t.prototype,"closed",{get:function(){return qn(this)?this.Bf:O(Xn("closed"))},enumerable:!0,configurable:!0}),t.prototype.cancel=function(t){return qn(this)?void 0===this.Cf?O(W("cancel")):U(this,t):O(Xn("cancel"))},t.prototype.read=function(t){return qn(this)?void 0===this.Cf?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.Cf;return i.Vf=!0,"errored"===i.Va?O(i.Nf):function(t,n){var i=t.Lv,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.Bv.length>0)return t.Bv.push(o),zn(i);if("closed"===i.Va)return R(M(new r(o.buffer,o.byteOffset,0),!0,i.Df.If));if(t.Gf>0){if(!0===Rn(t,o)){var u=In(o);return Nn(t),R(M(u,!1,i.Df.If))}if(!0===t.Rv){var s=new m("Insufficient bytes to fill elements in the given buffer");return Bn(t,s),O(s)}}t.Bv.push(o);var f=zn(i);return Tn(t),f}(i.Hf,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.Cf){if(this.Fv.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,"Fv")}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),Fn(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.If=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){var n,i,e,r,o,u=K(t),s=!1,h=!1,c=!1,a=E(function(t){o=t});function v(){return!0===s||(s=!0,x(C(rt(u),function(t){if(s=!1,!0===t.done)return!1===h&&an(e.Hf),void(!1===c&&an(r.Hf));var n=t.value,i=n,o=n;!1===h&&vn(e.Hf,i),!1===c&&vn(r.Hf,o)}))),R(void 0)}function d(){}return e=Yn(d,v,function(e){if(h=!0,n=e,!0===c){var r=f([n,i]),u=Zn(t,r);o(u)}return a}),r=Yn(d,v,function(e){if(c=!0,i=e,!0===h){var r=f([n,i]),u=Zn(t,r);o(u)}return a}),D(u.Bf,function(t){dn(e.Hf,t),dn(r.Hf,t)}),[e,r]}(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.qf=i,e.Wf=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.Va="readable",t.Df=void 0,t.Nf=void 0,t.Vf=!1}function Gn(t){return!!s(t)&&!!p.prototype.hasOwnProperty.call(t,"Hf")}function $n(t){return void 0!==t.Df}function Zn(t,n){return t.Vf=!0,"closed"===t.Va?R(void 0):"errored"===t.Va?O(t.Nf):(Jn(t),C(t.Hf[j](n),r))}function Jn(t){t.Va="closed";var n=t.Df;void 0!==n&&(et(n)&&(n.Uf.forEach(function(t){t.Of(M(void 0,!0,n.If))}),n.Uf=new B),X(n))}function Qn(t,n){t.Va="errored",t.Nf=n;var i=t.Df;void 0!==i&&(et(i)?(i.Uf.forEach(function(t){t.Ff(n)}),i.Uf=new B):(i.Fv.forEach(function(t){t.Ff(n)}),i.Fv=new B),q(i,n))}function ti(t){return new m("ReadableStream.prototype."+t+" can only be used on a ReadableStream")}"symbol"===F(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,h=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.Uv;return!0===t.ev?C(t.Vv,function(){var e=t.Hv;if("erroring"===e.Va)throw e.Nf;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 h(){return function(t){var n=t.qv,i=t.Uv,e=i.Wv();return ci(i),C(e,function(){if("errored"===n.Va)throw n.Nf;var t=n.Hf;!0===wn(t)&&an(t)},function(i){throw oi(t,i),n.Nf})}(t)}function c(){return function(t){return si(t,!1),t.Vv}(t)}function a(n){return ui(t,n),R(void 0)}t.Hv=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,h,f,i,e),t.qv=Yn(u,c,a,r,o),t.ev=void 0,t.Vv=void 0,t.zv=void 0,si(t,!0),t.Uv=void 0}(this,E(function(t){f=t}),r,s,u,h),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.Gv=t,t.Uv=n,n.Xv=i,n.Wv=e}(t,i,e,o)}(this,t);var c=d(t,"start",[this.Uv]);f(c)}return p.defineProperty(t.prototype,"readable",{get:function(){if(!1===ri(this))throw li("readable");return this.qv},enumerable:!0,configurable:!0}),p.defineProperty(t.prototype,"writable",{get:function(){if(!1===ri(this))throw li("writable");return this.Hv},enumerable:!0,configurable:!0}),t}();function ri(t){return!!s(t)&&!!p.prototype.hasOwnProperty.call(t,"Uv")}function oi(t,n){dn(t.qv.Hf,n),ui(t,n)}function ui(t,n){ci(t.Uv),Ut(t.Hv.Qf,n),!0===t.ev&&si(t,!1)}function si(t,n){void 0!==t.Vv&&t.zv(),t.Vv=E(function(n){t.zv=n}),t.ev=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===hi(this))throw di("desiredSize");return ln(this.Gv.qv.Hf)},enumerable:!0,configurable:!0}),t.prototype.enqueue=function(t){if(!1===hi(this))throw di("enqueue");ai(this,t)},t.prototype.error=function(t){if(!1===hi(this))throw di("error");!function(t,n){oi(t.Gv,n)}(this,t)},t.prototype.terminate=function(){if(!1===hi(this))throw di("terminate");!function(t){var n=t.Gv,i=n.qv.Hf;!0===wn(i)&&an(i);var e=new m("TransformStream terminated");ui(n,e)}(this)},t}();function hi(t){return!!s(t)&&!!p.prototype.hasOwnProperty.call(t,"Gv")}function ci(t){t.Xv=void 0,t.Wv=void 0}function ai(t,n){var i=t.Gv,e=i.qv.Hf;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.qv.Nf}var r=function(t){return!0!==hn(t)}(e);r!==i.ev&&si(i,!0)}function vi(t,n){return C(t.Xv(n),void 0,function(n){throw oi(t.Gv,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":F(t))&&void 0!==i?o(t):"function"==typeof define&&define.amd?define(["exports"],o):o((r=r||self).WebStreamsPolyfill={})}),_t=C(function(t){function n(){var t=yt();return n=function(){return t},t}x(),pt(),p.defineProperty(t,"__esModule",{value:!0}),function(t,n){for(var i in n)p.defineProperty(t,i,{enumerable:!0,get:p.getOwnPropertyDescriptor(n,i).get})}(t,{get ByteLengthQueuingStrategy(){return n().ByteLengthQueuingStrategy},get CountQueuingStrategy(){return n().CountQueuingStrategy},get ReadableStream(){return n().ReadableStream},get TransformStream(){return n().TransformStream},get WritableStream(){return n().WritableStream}})});function St(t,n){return(St=p.setPrototypeOf||function(t,n){return t.__proto__=n,t})(t,n)}function Tt(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&&St(t,n)}function kt(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 It(t,n,i){return n&&kt(t.prototype,n),i&&kt(t,i),t}function Et(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 Rt(t,i){var r=void 0!==n&&t[e]||t["@@iterator"];if(r)return(r=r.call(t)).next.bind(r);if(Array.isArray(t)||(r=function(t,n){if(t){if("string"==typeof t)return Et(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)?Et(t,n):void 0}}(t))||i&&t&&"number"==typeof t.length){r&&(t=r);var o=0;return function(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}}}throw new m("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}x(),pt(),x(),pt(),x(),pt(),x(),pt(),x(),pt(),x(),pt(),x(),pt(),x(),pt(),M(),x(),pt(),M(),x(),pt(),x(),pt(),x(),pt(),x(),pt(),x(),pt(),M(),x(),pt();var Ot,Nt=((Ot={}).u_="web",Ot.c_="android",Ot.d_="android-tv",Ot.l_="ios",Ot.f_="tvos",Ot.v_="chromecast",Ot.__="theoliveweb",Ot);var Pt=v?v.userAgent:"",At=Pt.match(/chrome\/([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)/i),Dt=Pt.match(/Edg\/([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)/i),Ct=Pt.match(/Android ([0-9\.]+)/i),xt=Pt.match(/Windows NT ([0-9\.]+)/i),Bt=Pt.match(/(Version)\/((\d+)\.(\d+)(?:\.(\d+))?).*Safari/),Mt=Pt.match(/Firefox\/([0-9\.]+)/i),Ft=Pt.match(/OPR\/(\d+\.\d+)/i),Lt=Pt.match(/Tizen ([0-9\.]+)/i),Ut=Pt.match(/(iPhone OS|iPad OS|iPod OS|Mac OS X) (\d+)_(\d+)_?(\d+)?/),zt=Pt.match(/HbbTV\/([0-9.]+)/i),Wt=Pt.match(/(AFT.*) Build/i),Vt=function(){function t(){this.g_=Boolean("ontouchstart"in self||self.DocumentTouch&&B(a,self.DocumentTouch)||v&&v.msMaxTouchPoints),this.p_=/(mac\sos\sx)\s?([\w\s\.]+\w)*/i.test(Pt)||/(macintosh|mac(?=_powerpc)\s)/i.test(Pt),this.y_=/Windows NT/i.test(Pt),this.A_=xt?S(xt[1]):0,this.T_=/Android/i.test(Pt),this.E_=Ct?S(Ct[1]):0,this.P_=/windows phone (8|8\.1)/i.test(Pt),this.I_=/iPhone/i.test(Pt),this.D_=/iPad/i.test(Pt),this.B_=this.p_&&this.g_&&!this.D_,this.L_=/iPod/i.test(Pt),this.G_=/Mobile Safari/i.test(Pt),this.q_=/EOS\d*STB/i.test(Pt),this.W_=/APP\d*STB/i.test(Pt),this.F_=(this.I_||this.D_||this.B_||this.L_)&&!this.P_,this.V_=Ut?S(Ut[2]):0,this.X_=this.P_||this.F_||this.T_||this.G_,this.Q_=/CriOS/i.test(Pt),this.Y_=Boolean(self.chrome&&/google/i.test(v.vendor))||this.Q_,this.og=this.Y_&&/Edg\//i.test(v.userAgent),this.ag=Dt?_(Dt[1],10):0,this.Rm=Boolean(/CriOS/i.test(Pt)),this.Pm=Boolean(self.chrome||/Chrome/i.test(Pt)||this.Rm),this.eg=At?_(At[1],10):0,this.fg=/SMART-TV.*Tizen/i.test(Pt),this._g=Lt?S(Lt[1]):0,this.Z_=this._g>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._g):void 0,this.pg=/webos|web0s/i.test(Pt),this.yg=/HbbTV/i.test(Pt),this.Sg=!!zt&&function(t){if(!t)return!1;var n=t.split(".").map(Number);return 3===n.length&&1===n[0]&&2===n[1]}(zt[1]),this.Eg=/AFT.* Build/i.test(Pt),this.xg=Wt?Wt[1]:void 0,this.Rg=/VIZIO/i.test(Pt),this.Cg=/Edge\/\d+/i.test(Pt),this.Ng=/Trident/i.test(Pt),this.Mg=this.Ng&&!self.ActiveXObject&&"ActiveXObject"in self,this.Og=/Vivaldi/i.test(Pt),this.Ug=/Firefox/i.test(Pt)&&!/Seamonkey/i.test(Pt),this.Hg=Mt?S(Mt[1]):0,this.Wg=/Safari/i.test(Pt)&&!/Chrome/i.test(Pt)&&!this.P_&&!this.fg,this.Gg=Bt?S(Bt[2]):0,this.jg=Boolean(Ft),this.Kg=Ft?S(Ft[1]):0,this.Jg=/CrKey/.test(Pt),this.$g=/\b(tv|smart-tv|smarttv|appletv|crkey|googletv|hbbtv|pov_tv|roku|viera|nettv|philipstv|vizio)\b/i.test(Pt),this.hm=/PlayStation 4/i.test(Pt),this.dm=/PlayStation 5/i.test(Pt),this.fm="web"===Nt.d_,this._m="web"===Nt.c_,this.pm=this._m||this.fm,this.ym="web"===Nt.l_,this.Sm="web"===Nt.f_,this.Em="web"===Nt.v_}return It(t,[{key:"tn",get:function(){return this.g_}},{key:"m_",get:function(){return this.p_}},{key:"w_",get:function(){return this.y_}},{key:"b_",get:function(){return this.A_}},{key:"S_",get:function(){return this.T_}},{key:"k_",get:function(){return this.E_}},{key:"x_",get:function(){return this.P_}},{key:"R_",get:function(){return this.I_}},{key:"C_",get:function(){return this.D_}},{key:"N_",get:function(){return this.B_}},{key:"M_",get:function(){return this.L_}},{key:"O_",get:function(){return this.F_}},{key:"U_",get:function(){return this.V_}},{key:"H_",get:function(){return this.q_||this.W_}},{key:"z_",get:function(){return this.G_}},{key:"te",get:function(){return this.X_}},{key:"j_",get:function(){return this.Q_}},{key:"K_",get:function(){return this.Y_}},{key:"J_",get:function(){var t;return null!=(t=this.Z_)?t:this.eg}},{key:"rg",get:function(){return this.og}},{key:"hg",get:function(){var t;return(null==(t=c.chrome)?void 0:t.webview)&&this.ag>0}},{key:"cg",get:function(){return this.ag}},{key:"dg",get:function(){return this.fg}},{key:"vg",get:function(){return this._g}},{key:"gg",get:function(){return this.pg}},{key:"wg",get:function(){return this.yg}},{key:"Ag",get:function(){return this.Sg}},{key:"Tg",get:function(){return this.Eg}},{key:"IS_FIRETV_AFTMM",get:function(){return"AFTMM"===this.xg}},{key:"Pg",get:function(){return this.Rg}},{key:"Ig",get:function(){return this.Cg}},{key:"Dg",get:function(){return this.Ng}},{key:"Bg",get:function(){return this.Mg}},{key:"Lg",get:function(){return this.Og}},{key:"Fg",get:function(){return this.Ug}},{key:"Vg",get:function(){return this.Hg}},{key:"qg",get:function(){return this.Wg}},{key:"zg",get:function(){return 0===this.Gg&&Ht.O_?this.V_:this.Gg}},{key:"Xg",get:function(){return this.jg}},{key:"Qg",get:function(){return this.Kg}},{key:"Yg",get:function(){return this.Jg}},{key:"Zg",get:function(){return this.$g}},{key:"im",get:function(){return!(!this.gg&&!this.dg)&&this.J_<=56}},{key:"nm",get:function(){return this.hm}},{key:"um",get:function(){return this.dm}},{key:"lm",get:function(){return this.fm}},{key:"vm",get:function(){return this._m}},{key:"gm",get:function(){return this.pm}},{key:"wm",get:function(){return this.ym}},{key:"Am",get:function(){return this.Sm}},{key:"Tm",get:function(){return this.Em}},{key:"xm",get:function(){return this.Pm}},{key:"IS_IOS_CHROME",get:function(){return this.Rm}}]),t}();Vt.Im=new Vt;var Ht=Vt.Im;x(),pt(),et();var qt={}.toString;function Xt(t){return null!=t}var jt,Yt=Array.isArray||function(t){return"[object Array]"===qt.call(t)};function Kt(t){return"object"===(void 0===t?"undefined":F(t))&&null!==t}function Gt(t){return"function"==typeof t}function $t(t){return Gt(t)||Kt(t)}function Zt(t){jt=t}x(),pt(),x(),pt();var Jt=function(){};function Qt(t){var n;return function(){return void 0!==t&&(n=t(),t=void 0),n}}function tn(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):tt.resolve(f).then(e,r)}function nn(t){return function(){var n=this,i=arguments;return new tt(function(e,r){var o=t.apply(n,i);function u(t){tn(o,e,r,u,s,"next",t)}function s(t){tn(o,e,r,u,s,"throw",t)}u(void 0)})}}function en(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=h(0),f.throw=h(1),f.return=h(2),"function"==typeof n&&(f[e]=function(){return this}),f;function h(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(),pt(),x(),pt(),x(),pt(),x(),pt();var rn="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(),pt(),x(),pt(),x(),pt(),x(),pt(),x(),pt(),x(),pt(),x(),pt();var on=9007199254740991,un=(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}),sn="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 fn(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 hn(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 cn(t,n){return-1!==t.indexOf(n)}function an(t){t.length=0}Array.prototype.flat,Array.prototype.flatMap;var vn=function(){function t(){this.Om=!1,this.Fm=!1,this.Um=[],this.Vm=[]}var n=t.prototype;return n.Lm=function(){if(!this.Om&&!this.Fm){this.Om=!0;for(var t,n=Rt(this.Um.slice());!(t=n()).done;){(0,t.value)()}this.Ku()}},n.Ku=function(){if(!this.Fm){this.Fm=!0;for(var t,n=Rt(this.Vm.slice());!(t=n()).done;){(0,t.value)()}an(this.Um),an(this.Vm)}},n.Hm=function(t){this.Fm||this.Um.push(t)},n.qm=function(t){this.Fm||fn(this.Um,t)},n.Wm=function(t){this.Fm||this.Vm.push(t)},n.zm=function(t){this.Fm||fn(this.Vm,t)},t}(),dn=function(){function t(){this.Xm=new vn}var n=t.prototype;return n.dd=function(){this.Xm.Lm()},n.Ku=function(){this.Xm.Ku()},n.jm=function(t){var n=this.Xm;if(!n.Om)if(t.Om)n.Lm();else if(!n.Fm&&!t.Fm){var i=function(){e(),n.Lm()},e=function(){t.qm(i),t.zm(e),n.qm(i),n.zm(e)};t.Hm(i),t.Wm(e),n.Hm(i),n.Wm(e)}},n.Qm=function(){var n=new t,i=new t,e=n.Gm,r=i.Gm,o=this.Xm,u=function(){e.Om&&r.Fm||r.Om&&e.Fm?o.Lm():e.Fm&&r.Fm&&o.Ku()};e.Hm(u),r.Hm(u),e.Wm(u),r.Wm(u),n.jm(o),i.jm(o);return o.Wm(function(){e.qm(u),r.qm(u),e.zm(u),r.zm(u)}),[n,i]},n[r]=function(){this.dd()},t.Km=function(n){for(var i,e=new t,r=Rt(n);!(i=r()).done;){var o=i.value;void 0!==o&&e.jm(o)}return e},It(t,[{key:"Gm",get:function(){return this.Xm}}]),t}();x(),pt(),M(),x(),pt();var ln=function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];g.apply(this,n)};(ln.prototype=p.create(g.prototype)).constructor=ln;var wn=function(t){function n(n,i){var e;return(e=t.call(this)||this).cause=void 0,e.message=n||"Unknown error",e.cause=i,g.captureStackTrace&&g.captureStackTrace(e,e.constructor),e}return Tt(n,t),It(n,[{key:"name",get:function(){return"BaseError"}}]),n}(ln),bn=function(t){function n(n,i){return t.call(this,n||"Aborted",i)||this}return Tt(n,t),It(n,[{key:"name",get:function(){return"AbortError"}}]),n}(wn);function gn(t){return B(t,g)&&"AbortError"===t.name}function mn(t,n){return n?new tt(function(i,e){if(n.Om)return t.catch(Jt),e(new bn);var r=function(){n.qm(r),e(new bn)};n.Hm(r),t.then(function(t){n.qm(r),i(t)},function(t){n.qm(r),e(t)})}):t}function pn(t,n){return nn(function(){var i,e;return en(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 tt.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 rn(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),tt.resolve().then(r);if(i.dispose){var o=i.dispose.call(i.value);if(i.async)return e|=2,tt.resolve(o).then(r,function(t){return n(t),r()})}else e|=1}catch(t){n(t)}if(1===e)return t.hasError?tt.reject(t.error):tt.resolve();if(t.hasError)throw t.error})()}(i),[7];case 5:return[2]}})})()}tt.resolve();function yn(t,n){return new tt(function(i,e){if(void 0!==n&&n.Om)e(new bn);else{var r=jt.Nm(function(){void 0!==n&&n.qm(o),i()},t),o=function(){jt.Dm(r),e(new bn)};void 0!==n&&n.Hm(o)}})}function _n(){return void 0!==a?a.createElement("video"):void 0}var Sn=Qt(_n);Qt(function(){return"undefined"!=typeof HTMLVideoElement&&B(Sn(),HTMLVideoElement)});x(),pt(),x(),pt(),x(),pt(),et();var Tn=null;try{Tn=new WebAssembly.Instance(new WebAssembly.Module(new k([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(Ot){}function kn(t,n,i){this.low=0|t,this.high=0|n,this.unsigned=!!i}function In(t){return!0===(t&&t.Jm)}function En(t){var n=y.clz32(t&-t);return t?31-n:n}kn.prototype.Jm,p.defineProperty(kn.prototype,"Jm",{value:!0}),kn.isLong=In;var Rn={},On={};function Nn(t,n){var i,e,r;return n?(r=0<=(t>>>=0)&&t<256)&&(e=On[t])?e:(i=An(t,0,!0),r&&(On[t]=i),i):(r=-128<=(t|=0)&&t<128)&&(e=Rn[t])?e:(i=An(t,t<0?-1:0,!1),r&&(Rn[t]=i),i)}function Pn(t,n){if(T(t))return n?zn:Un;if(n){if(t<0)return zn;if(t>=Mn)return Xn}else{if(t<=-Fn)return jn;if(t+1>=Fn)return qn}return t<0?Pn(-t,n).neg():An(t%Bn|0,t/Bn|0,n)}function An(t,n,i){return new kn(t,n,i)}kn.fromInt=Nn,kn.fromNumber=Pn,kn.fromBits=An;var Dn=y.pow;function Cn(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?zn: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 Cn(t.substring(1),n,i).neg();for(var r=Pn(Dn(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 h=Pn(Dn(i,s));o=o.mul(h).add(Pn(f))}else o=(o=o.mul(r)).add(Pn(f))}return o.unsigned=n,o}function xn(t,n){return"number"==typeof t?Pn(t,n):"string"==typeof t?Cn(t,n):An(t.low,t.high,"boolean"==typeof n?n:t.unsigned)}kn.fromString=Cn,kn.fromValue=xn;var Bn=4294967296,Mn=Bn*Bn,Fn=Mn/2,Ln=Nn(1<<24),Un=Nn(0);kn.ZERO=Un;var zn=Nn(0,!0);kn.UZERO=zn;var Wn=Nn(1);kn.ONE=Wn;var Vn=Nn(1,!0);kn.UONE=Vn;var Hn=Nn(-1);kn.NEG_ONE=Hn;var qn=An(-1,2147483647,!1);kn.MAX_VALUE=qn;var Xn=An(-1,-1,!0);kn.MAX_UNSIGNED_VALUE=Xn;var jn=An(0,-2147483648,!1);kn.MIN_VALUE=jn;var Yn=kn.prototype;Yn.toInt=function(){return this.unsigned?this.low>>>0:this.low},Yn.toNumber=function(){return this.unsigned?(this.high>>>0)*Bn+(this.low>>>0):this.high*Bn+(this.low>>>0)},Yn.toString=function(t){if((t=t||10)<2||36<t)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative()){if(this.eq(jn)){var n=Pn(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=Pn(Dn(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}},Yn.getHighBits=function(){return this.high},Yn.getHighBitsUnsigned=function(){return this.high>>>0},Yn.getLowBits=function(){return this.low},Yn.getLowBitsUnsigned=function(){return this.low>>>0},Yn.getNumBitsAbs=function(){if(this.isNegative())return this.eq(jn)?64:this.neg().getNumBitsAbs();for(var t=0!=this.high?this.high:this.low,n=31;n>0&&!(t&1<<n);n--);return 0!=this.high?n+33:n+1},Yn.isSafeInteger=function(){var t=this.high>>21;return!t||!this.unsigned&&(-1===t&&!(0===this.low&&-2097152===this.high))},Yn.isZero=function(){return 0===this.high&&0===this.low},Yn.eqz=Yn.isZero,Yn.isNegative=function(){return!this.unsigned&&this.high<0},Yn.isPositive=function(){return this.unsigned||this.high>=0},Yn.isOdd=function(){return!(1&~this.low)},Yn.isEven=function(){return!(1&this.low)},Yn.equals=function(t){return In(t)||(t=xn(t)),(this.unsigned===t.unsigned||this.high>>>31!=1||t.high>>>31!=1)&&(this.high===t.high&&this.low===t.low)},Yn.eq=Yn.equals,Yn.notEquals=function(t){return!this.eq(t)},Yn.neq=Yn.notEquals,Yn.ne=Yn.notEquals,Yn.lessThan=function(t){return this.comp(t)<0},Yn.lt=Yn.lessThan,Yn.lessThanOrEqual=function(t){return this.comp(t)<=0},Yn.lte=Yn.lessThanOrEqual,Yn.le=Yn.lessThanOrEqual,Yn.greaterThan=function(t){return this.comp(t)>0},Yn.gt=Yn.greaterThan,Yn.greaterThanOrEqual=function(t){return this.comp(t)>=0},Yn.gte=Yn.greaterThanOrEqual,Yn.ge=Yn.greaterThanOrEqual,Yn.compare=function(t){if(In(t)||(t=xn(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},Yn.comp=Yn.compare,Yn.negate=function(){return!this.unsigned&&this.eq(jn)?jn:this.not().add(Wn)},Yn.neg=Yn.negate,Yn.add=function(t){In(t)||(t=xn(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,h=0,c=0,a=0;return c+=(a+=r+(65535&t.low))>>>16,h+=(c+=e+s)>>>16,f+=(h+=i+u)>>>16,f+=n+o,An((c&=65535)<<16|(a&=65535),(f&=65535)<<16|(h&=65535),this.unsigned)},Yn.subtract=function(t){return In(t)||(t=xn(t)),this.add(t.neg())},Yn.sub=Yn.subtract,Yn.multiply=function(t){if(this.isZero())return this;if(In(t)||(t=xn(t)),Tn)return An(Tn.mul(this.low,this.high,t.low,t.high),Tn.get_high(),this.unsigned);if(t.isZero())return this.unsigned?zn:Un;if(this.eq(jn))return t.isOdd()?jn:Un;if(t.eq(jn))return this.isOdd()?jn: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 Pn(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,h=0,c=0,a=0,v=0;return a+=(v+=r*f)>>>16,c+=(a+=e*f)>>>16,a&=65535,c+=(a+=r*s)>>>16,h+=(c+=i*f)>>>16,c&=65535,h+=(c+=e*s)>>>16,c&=65535,h+=(c+=r*u)>>>16,h+=n*f+i*s+e*u+r*o,An((a&=65535)<<16|(v&=65535),(h&=65535)<<16|(c&=65535),this.unsigned)},Yn.mul=Yn.multiply,Yn.divide=function(t){if(In(t)||(t=xn(t)),t.isZero())throw g("division by zero");var n,i,e;if(Tn)return this.unsigned||-2147483648!==this.high||-1!==t.low||-1!==t.high?An((this.unsigned?Tn.div_u:Tn.div_s)(this.low,this.high,t.low,t.high),Tn.get_high(),this.unsigned):this;if(this.isZero())return this.unsigned?zn:Un;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return zn;if(t.gt(this.shru(1)))return Vn;e=zn}else{if(this.eq(jn))return t.eq(Wn)||t.eq(Hn)?jn:t.eq(jn)?Wn:(n=this.shr(1).div(t).shl(1)).eq(Un)?t.isNegative()?Wn:Hn:(i=this.sub(t.mul(n)),e=n.add(i.div(t)));if(t.eq(jn))return this.unsigned?zn: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:Dn(2,r-48),u=Pn(n),s=u.mul(t);s.isNegative()||s.gt(i);)s=(u=Pn(n-=o,this.unsigned)).mul(t);u.isZero()&&(u=Wn),e=e.add(u),i=i.sub(s)}return e},Yn.div=Yn.divide,Yn.modulo=function(t){return In(t)||(t=xn(t)),Tn?An((this.unsigned?Tn.rem_u:Tn.rem_s)(this.low,this.high,t.low,t.high),Tn.get_high(),this.unsigned):this.sub(this.div(t).mul(t))},Yn.mod=Yn.modulo,Yn.rem=Yn.modulo,Yn.not=function(){return An(~this.low,~this.high,this.unsigned)},Yn.countLeadingZeros=function(){return this.high?y.clz32(this.high):y.clz32(this.low)+32},Yn.clz=Yn.countLeadingZeros,Yn.countTrailingZeros=function(){return this.low?En(this.low):En(this.high)+32},Yn.ctz=Yn.countTrailingZeros,Yn.and=function(t){return In(t)||(t=xn(t)),An(this.low&t.low,this.high&t.high,this.unsigned)},Yn.or=function(t){return In(t)||(t=xn(t)),An(this.low|t.low,this.high|t.high,this.unsigned)},Yn.xor=function(t){return In(t)||(t=xn(t)),An(this.low^t.low,this.high^t.high,this.unsigned)},Yn.shiftLeft=function(t){return In(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?An(this.low<<t,this.high<<t|this.low>>>32-t,this.unsigned):An(0,this.low<<t-32,this.unsigned)},Yn.shl=Yn.shiftLeft,Yn.shiftRight=function(t){return In(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?An(this.low>>>t|this.high<<32-t,this.high>>t,this.unsigned):An(this.high>>t-32,this.high>=0?0:-1,this.unsigned)},Yn.shr=Yn.shiftRight,Yn.shiftRightUnsigned=function(t){return In(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?An(this.low>>>t|this.high<<32-t,this.high>>>t,this.unsigned):An(32===t?this.high:this.high>>>t-32,0,this.unsigned)},Yn.shru=Yn.shiftRightUnsigned,Yn.shr_u=Yn.shiftRightUnsigned,Yn.rotateLeft=function(t){var n;return In(t)&&(t=t.toInt()),0==(t&=63)?this:32===t?An(this.high,this.low,this.unsigned):t<32?(n=32-t,An(this.low<<t|this.high>>>n,this.high<<t|this.low>>>n,this.unsigned)):(n=32-(t-=32),An(this.high<<t|this.low>>>n,this.low<<t|this.high>>>n,this.unsigned))},Yn.rotl=Yn.rotateLeft,Yn.rotateRight=function(t){var n;return In(t)&&(t=t.toInt()),0==(t&=63)?this:32===t?An(this.high,this.low,this.unsigned):t<32?(n=32-t,An(this.high<<n|this.low>>>t,this.low<<n|this.high>>>t,this.unsigned)):(n=32-(t-=32),An(this.low<<n|this.high>>>t,this.high<<n|this.low>>>t,this.unsigned))},Yn.rotr=Yn.rotateRight,Yn.toSigned=function(){return this.unsigned?An(this.low,this.high,!1):this},Yn.toUnsigned=function(){return this.unsigned?this:An(this.low,this.high,!0)},Yn.toBytes=function(t){return t?this.toBytesLE():this.toBytesBE()},Yn.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]},Yn.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]},kn.fromBytes=function(t,n,i){return i?kn.fromBytesLE(t,n):kn.fromBytesBE(t,n)},kn.fromBytesLE=function(t,n){return new kn(t[0]|t[1]<<8|t[2]<<16|t[3]<<24,t[4]|t[5]<<8|t[6]<<16|t[7]<<24,n)},kn.fromBytesBE=function(t,n){return new kn(t[4]<<24|t[5]<<16|t[6]<<8|t[7],t[0]<<24|t[1]<<16|t[2]<<8|t[3],n)},"function"==typeof BigInt&&(kn.fromBigInt=function(t,n){return An(Number(BigInt.asIntN(32,t)),Number(BigInt.asIntN(32,t>>BigInt(32))),n)},kn.fromValue=function(t,n){return"bigint"===(void 0===t?"undefined":F(t))?kn.fromBigInt(t,n):xn(t,n)},Yn.toBigInt=function(){var t=BigInt(this.low>>>0);return BigInt(this.unsigned?this.high>>>0:this.high)<<BigInt(32)|t});var Kn=kn;function Gn(){return Date.now()||(new Date).getTime()}var $n=1/6,Zn=(Kn.fromNumber(on),Boolean("ontouchstart"in self||self.DocumentTouch&&B(a,self.DocumentTouch))||Boolean(v&&v.msMaxTouchPoints)),Jn=Sn(),Qn=Boolean(Jn&&Jn.webkitShowPlaybackTargetPicker),ti=function(){function t(){this.$m=void 0,this.xp=!1,this.tn=Zn,this.te=!1,this.Ym=!0}var n=t.prototype;return n.tp=function(){return 0},n.Ap=function(t,n){return!0},n.Sp=function(t){return t>=2*$n},It(t,[{key:"Zm",get:function(){return void 0===this.$m&&(this.$m=this.tp()),this.$m}},{key:"ep",get:function(){return Ht.S_?"android":Ht.m_?"macos":Ht.O_?"ios":Ht.w_?"windows":"other"}},{key:"sp",get:function(){return Ht.Zg?"tv":Ht.te?"mobile":"desktop"}},{key:"np",get:function(){return!Ht.Zg}},{key:"rp",get:function(){if(c.screen)return{width:c.screen.width*this.op,height:c.screen.height*this.op}}},{key:"op",get:function(){return c.devicePixelRatio||1}},{key:"hp",get:function(){return Qn}},{key:"ap",get:function(){return!1}},{key:"cp",get:function(){return!0}},{key:"dp",get:function(){return!!(Ht.qg||Ht.O_||Ht.hg)||!!Ht.Pg}},{key:"lp",get:function(){return Ht.Pg}},{key:"fp",get:function(){return!Ht.O_}},{key:"vp",get:function(){return!0}},{key:"_p",get:function(){return!0}},{key:"gp",get:function(){return!1}},{key:"mp",get:function(){}},{key:"pp",get:function(){return!0}},{key:"wp",get:function(){return!1}},{key:"yp",get:function(){return Ht.Pg}},{key:"bp",get:function(){return!1}},{key:"Tp",get:function(){return!1}},{key:"kp",get:function(){return!1}},{key:"Ep",get:function(){return!0}}]),t}(),ni=function(t){function n(){return t.call(this)||this}return Tt(n,t),n}(ti);x(),pt();var ii=function(t){function n(){return t.apply(this,arguments)||this}return Tt(n,t),n.prototype.Ap=function(t,n){if(t&&t.Pp&&n&&n.Pp){var i=ei(t.Pp,"mp4a.40.2")&&ei(n.Pp,"mp4a.40.5"),e=ei(t.Pp,"mp4a.40.5")&&ei(n.Pp,"mp4a.40.2"),r=ei(t.Pp,"mp4a.40.2")&&ei(n.Pp,"mp4a.40.34"),o=ei(t.Pp,"mp4a.40.34")&&ei(n.Pp,"mp4a.40.2"),u=ei(t.Pp,"mp4a.40.5")&&ei(n.Pp,"mp4a.40.34"),s=ei(t.Pp,"mp4a.40.34")&&ei(n.Pp,"mp4a.40.5");return!(i||e||r||o||u||s)}return!0},It(n,[{key:"mp",get:function(){if(Ht.m_)return 4096}}]),n}(ni);function ei(t,n){return t.indexOf(n)>-1}x(),pt();var ri=function(t){function n(){return t.apply(this,arguments)||this}return Tt(n,t),n.prototype.Sp=function(t){return t>=2},n}(ni);x(),pt();var oi=function(t){function n(){var n;return(n=t.call(this)||this).xp=Ht.zg>=11,n.Ym=Ht.qg&&!(Ht.O_&&Ht.zg<10),n}return Tt(n,t),It(n,[{key:"bp",get:function(){return Ht.zg<17}},{key:"Tp",get:function(){return!0}}]),n}(ni);x(),pt();var ui,si=function(t){function n(){return t.apply(this,arguments)||this}return Tt(n,t),It(n,[{key:"pp",get:function(){return!(Ht.J_>=133)}}]),n}(ni);x(),pt(),x(),pt(),x(),pt(),x(),pt(),x(),pt();var fi=function(){var t=_n();if(!t)return!1;var n=t.muted;return t.muted=!n,t.muted!==n}();!function(){if(Ht.N_)return!1;var t=_n();if(!t)return!1;var n=t.volume;t.volume=n/2+.1,t.volume}();var hi=function(t){function n(n){var i;return(i=t.call(this)||this).Rp=void 0,i.Rp=n,i.xp=i.Rp.xp,i.tn=i.Rp.tn,i.Ym=fi&&i.Rp.Ym,i}Tt(n,t);var i=n.prototype;return i.tp=function(){return this.Rp.Zm},i.Ap=function(t,n){return this.Rp.Ap(t,n)},i.Sp=function(t){return this.Rp.Sp(t)},It(n,[{key:"mp",get:function(){return this.Rp.mp}},{key:"pp",get:function(){return this.Rp.pp}},{key:"bp",get:function(){return this.Rp.bp}}]),n}(ti),ci=function(t){function n(n){var i;return(i=t.call(this,n)||this).xp=!0,i.te=!0,i}return Tt(n,t),It(n,[{key:"gp",get:function(){return Ht.O_}}]),n}(hi);x(),pt();var ai=function(t){function n(){return t.apply(this,arguments)||this}return Tt(n,t),n.prototype.tp=function(){return function(t){return t&&$t(c.ManagedMediaSource)?c.ManagedMediaSource:$t(c.MediaSource)?c.MediaSource:void 0}(!0)?t.prototype.tp.call(this):1},It(n,[{key:"gp",get:function(){return!0}}]),n}(ci);x(),pt();var vi=function(t){function n(){var n;return(n=t.apply(this,arguments)||this).Np=void 0,n}return Tt(n,t),n.prototype.Ap=function(n,i){return t.prototype.Ap.call(this,n,i)},It(n,[{key:"ap",get:function(){return Ht.vg<3}},{key:"cp",get:function(){return Ht.vg>=3}},{key:"rp",get:function(){var t=this;return c.tizen&&!this.Np&&c.tizen.systeminfo.getPropertyValue("DISPLAY",function(n){var i=n.resolutionWidth,e=n.resolutionHeight;1===i&&1===e||(t.Np={width:i,height:e})}),this.Np}},{key:"wp",get:function(){return Ht.vg<3}}]),n}(hi);x(),pt();var di=function(t){function n(){var n;return(n=t.apply(this,arguments)||this).Np=void 0,n}return Tt(n,t),It(n,[{key:"rp",get:function(){var t=this;return c.webOS&&!this.Np&&c.webOS.deviceInfo(function(n){t.Np={width:n.screenWidth,height:n.screenHeight}}),this.Np}},{key:"vp",get:function(){return!1}}]),n}(hi);x(),pt();var li=function(t){function n(){return t.apply(this,arguments)||this}return Tt(n,t),It(n,[{key:"gp",get:function(){return!0}},{key:"Tp",get:function(){return this.Rp.Tp}}]),n}(hi);x(),pt();var wi=function(t){function n(){return t.apply(this,arguments)||this}return Tt(n,t),It(n,[{key:"kp",get:function(){return Ht.IS_FIRETV_AFTMM}}]),n}(hi);!function(t){ui=t}(function(){var t=function(){if(Ht.Fg)return new ii;if(Ht.Ig||Ht.Dg)return new ri;if(Ht.qg)return new oi;if(Ht.xm)return new si;return new ni}();return Ht.O_?new ai(t):Ht.Tg?new wi(t):Ht.te?new ci(t):Ht.dg?new vi(t):Ht.gg?new di(t):Ht.m_?new li(t):new hi(t)}()),x(),pt(),x(),pt(),M(),et(),x(),pt();var bi=!(Ht.Dg&&!Ht.Bg),gi=self.console;function mi(t){if(Kt(t))try{return JSON.stringify(t)}catch(t){}return t}function pi(t){return t.map(mi).join(" ")}function yi(t){var n=gi&&gi[t];return n?n.bind&&bi?n.bind(gi):function(){for(var n=arguments.length,i=new Array(n),e=0;e<n;e++)i[e]=arguments[e];gi[t](pi(i))}:void 0}var _i=yi("log")||Jt,Si=yi("debug")||_i.bind(void 0,"DEBUG:"),Ti=yi("warn")||_i.bind(void 0,"WARNING:"),ki=yi("error")||_i.bind(void 0,"ERROR:"),Ii=function(){var t=gi&&gi.assert;return t?t.bind&&bi?t.bind(gi):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];gi.assert(t,pi(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||ki.apply(void 0,[].concat(["Assertion failed:"],i))}}();function Ei(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 Ri(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){Oi(t,n,r,e);var o=t;t=e,e=o}return t}(t,n);return i!==t&&Oi(i,null,t.length,t),t}function Oi(t,n,i,e){var r,o,u,s,f,h=t.length,c=0,a=2*i;for(r=0;r<h;r+=a)for(u=(o=r+i)+i,o>h&&(o=h),u>h&&(u=h),s=r,f=o;;)if(s<o&&f<u)n(t[s],t[f])<=0?e[c++]=t[s++]:e[c++]=t[f++];else if(s<o)e[c++]=t[s++];else{if(!(f<u))break;e[c++]=t[f++]}}x(),pt();var Ni=/[a-zA-Z]/,Pi=/[0-9]/,Ai=/[0-9a-fA-F]/,Di=/^0x/i,Ci=/^[0-9]+$/,xi=/^[0-9a-fA-F]+$/,Bi=/^[0-7]+$/,Mi=p.prototype.toString,Fi=Array.isArray||function(t){return"[object Array]"===Mi.call(t)},Li=void 0!==n&&"symbol"==typeof e;function Ui(t){return Fi(t)?t:Array.from(t)}function zi(t,n,i){var e=t[n];t[n]=t[i],t[i]=e}function Wi(t){return t>=65&&t<=90}function Vi(t){return Wi(t)||function(t){return t>=97&&t<=122}(t)}function Hi(t){return t>=48&&t<=57}function qi(t){return Hi(t)||Vi(t)}function Xi(t){return Hi(t)||t>=65&&t<=70||t>=97&&t<=102}function ji(t){return Wi(t)?t+32:t}function Yi(t){return Hi(t)?t-48:t>=65&&t<=70?t-65+10:t>=97&&t<=102?t-97+10:-1}function Ki(t,n){return void 0===n&&(n=!1),0<=t&&t<=9?t+48:10<=t&&t<=15?t+(n?87:55):-1}var Gi=y.min,$i=String.fromCharCode;function Zi(t){for(var n=t.length,i=[],e=0;e<n;e+=16384){var r=Gi(e+16384,n);i.push($i.apply(null,t.slice(e,r)))}return i.join("")}var Ji=2147483647,Qi=/[^\0-\x7E]/,te=/[\x2E\u3002\uFF0E\uFF61]/g,ne={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},ie=y.floor,ee=String.fromCharCode;function re(t){throw new RangeError(ne[t])}function oe(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 ue,se,fe,he=function(t,n){return t+22+75*(t<26)-((0!=n)<<5)},ce=function(t,n,i){var e=0;for(t=i?ie(t/700):t>>1,t+=ie(t/n);t>455;e+=36)t=ie(t/35);return ie(e+36*t/(t+38))},ae=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(te,".")).split("."),n).join(".");return e+r}(t,function(t){return Qi.test(t)?"xn--"+function(t){for(var n=[],i=(t=oe(t)).length,e=128,r=0,o=72,u=0,s=t;u<s.length;u++){var f=s[u];f<128&&n.push(ee(f))}var h=n.length,c=h;for(h&&n.push("-");c<i;){for(var a=Ji,v=0,d=t;v<d.length;v++){var l=d[v];l>=e&&l<a&&(a=l)}var w=c+1;a-e>ie((Ji-r)/w)&&re("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>Ji&&re("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(ee(he(_+S%T,0))),p=ie(S/T)}n.push(ee(he(p,0))),o=ce(r,w,c==h),r=0,++c}}++r,++e}return n.join("")}(t):t})};function ve(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 Zi(n)}function de(t){if(t>=55296&&t<=57343)throw new g("Lone surrogate U+"+t.toString(16).toUpperCase()+" is not a scalar value")}function le(t,n){return t>>n&63|128}function we(t,n){4294967168&t?(4294965248&t?4294901760&t?4292870144&t||(n.push(t>>18&7|240),n.push(le(t,12)),n.push(le(t,6))):(de(t),n.push(t>>12&15|224),n.push(le(t,6))):n.push(t>>6&31|192),n.push(63&t|128)):n.push(t)}function be(t){for(var n=[],i=0;i<t.length;i++){we(t[i],n)}return n}function ge(){if(fe>=se)throw new g("Invalid byte index");var t=255&ue[fe];if(fe++,128==(192&t))return 63&t;throw new g("Invalid continuation byte")}function me(){var t,n;if(fe>se)throw new g("Invalid byte index");if(fe===se)return!1;if(t=255&ue[fe],fe++,!(128&t))return t;if(192==(224&t)){if((n=(31&t)<<6|ge())>=128)return n;throw new g("Invalid continuation byte")}if(224==(240&t)){if((n=(15&t)<<12|ge()<<6|ge())>=2048)return de(n),n;throw new g("Invalid continuation byte")}if(240==(248&t)&&(n=(7&t)<<18|ge()<<12|ge()<<6|ge())>=65536&&n<=1114111)return n;throw new g("Invalid UTF-8 detected")}function pe(t){return[37,Ki(t>>4),Ki(15&t)]}function ye(t){return function(t){return t>=0&&t<=31}(t)||t>126}function _e(t){return ye(t)||32===t||34===t||60===t||62===t||96===t}function Se(t){return _e(t)||35===t||63===t||123===t||125===t}function Te(t){return Se(t)||47===t||58===t||59===t||61===t||64===t||t>=91&&t<=94||124===t}function ke(t){return t<33||t>126||34===t||35===t||60===t||62===t}function Ie(t){return ke(t)||39===t}function Ee(t,n){if(!n(t))return[t];for(var i=be([t]),e=[],r=0;r<i.length;r++){var o=i[r];e.push.apply(e,pe(o))}return e}function Re(t,n){for(var i=[],e=0,r=oe(t);e<r.length;e++){var o=r[e];i.push.apply(i,Ee(o,n))}return ve(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&&Xi(t[e+1])&&Xi(t[e+2])){var o=Yi(t[e+1])<<4|Yi(t[e+2]);n.push(o),e+=2}else n.push(r)}return n}(be(t))}function Ne(t){return ve(function(t){ue=t.slice(),se=ue.length,fe=0;for(var n,i=[];!1!==(n=me());)i.push(n);return i}(Oe(oe(t))))}function Pe(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&&Ai.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 h=null;if(f>0){if(!("."===t[o]&&f<4))throw new m;o+=1}if(!Pi.test(t[o]))throw new m;for(;o<n&&Pi.test(t[o]);){var c=_(t[o],10);if(null===h)h=c;else{if(0===h)throw new m;if((h=10*h+c)>255)throw new m}o+=1}i[e]=i[e]<<8|h,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;)zi(i,e,r+a-1),e-=1,a-=1}else if(8!==e)throw new m;return i}function Ae(t){var n=10,i=Ci;return Di.test(t)?(t=t.slice(2),n=16,i=xi):t.length>=2&&"0"===t[0]&&(t=t.slice(1),n=8,i=Bi),""===t?0:i.test(t)?_(t,n):void 0}var De={Bp:4},Ce=/[\0\t\n\r #%/:?@\[\\\]]/,xe=/[\0\t\n\r #/:?@\[\\\]]/;function Be(t,n){if("["===t[0]){if("]"!==t[t.length-1])throw new m("Invalid IPv6 address");return{Bp:2,Mp:Pe(t.slice(1,-1))}}if(!n)return function(t){if(xe.test(t))throw new m("Invalid code point in opaque host");var n=Re(t,ye);return""===n?De:{Bp:3,Lp:n}}(t);var i=function(t){var n=function(t){return ae(t.toLowerCase())}(t);return n}(Ne(t));if(Ce.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=Ae(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?{Bp:1,Mp:e}:""===i?De:{Bp:0,Op:i}}function Me(t){switch(t.Bp){case 0:return t.Op;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.Mp);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.Mp)+"]";case 3:return t.Lp;case 4:return""}}var Fe=/\+/g;function Le(t){return 42===t||45===t||46===t||95===t||qi(t)}function Ue(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(Fe," "),s=s.replace(Fe," ");var f=Ne(u),h=Ne(s);i.push([f,h])}}return i}function ze(t){for(var n="",i=0;i<t.length;i++){var e=t[i];i>0&&(n+="&"),n+=We(be(oe(e[0])))+"="+We(be(oe(e[1])))}return n}function We(t){for(var n=[],i=0;i<t.length;i++){var e=t[i];32===e?n.push(43):Le(e)?n.push(e):n.push.apply(n,pe(e))}return Zi(n)}var Ve=/(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])/;function He(t){var n=""+t,i=Ve.exec(n);return i?function(t,n){for(var i=t.length,e=[],r=n;r<i;r++){var o=t.charCodeAt(r);if(Xe(o))if(je(o)||r===i-1)e.push(qe);else{var u=t.charCodeAt(r+1);je(u)?(e.push(o,u),r++):e.push(qe)}else e.push(o)}return t.slice(0,n)+Zi(e)}(n,i.index):n}var qe=65533,Xe=function(t){return 55296==(63488&t)},je=function(t){return!!(1024&t)};function Ye(t,n){var i=t[0],e=n[0];return i===e?0:i<e?-1:1}function Ke(t){t.Fp.length=0}function Ge(t,n){!function(t,n){for(var i=0;i<n.length;i++)t[i]=n[i];t.length=n.length}(t.Fp,Ue(n))}function $e(t){if(t.Up){var n=ze(t.Fp);""===n&&(n=null),t.Up.Up.Vp=n}}var Ze=function(){function t(t){if(void 0===t&&(t=void 0),this.Up=null,null==t)this.Fp=[];else if("object"==typeof t||"function"==typeof t)if(function(t){return t instanceof Ze&&!!Fi(t.Fp)&&(!Li||t[e]===Je)}(t))this.Fp=t.Fp.slice();else if(function(t){return null!=t&&(!!Fi(t)||!!Li&&"function"==typeof t[e])}(t)){this.Fp=[];for(var n=0,i=Ui(t);n<i.length;n++){var r=Ui(i[n]);if(2!==r.length)throw new m("Invalid name-value pair");this.Fp.push([He(r[0]),He(r[1])])}}else for(var o in this.Fp=[],t)p.prototype.hasOwnProperty.call(t,o)&&this.Fp.push([He(o),He(t[o])]);else(t=He(t)).length>0&&"?"===t[0]&&(t=t.slice(1)),this.Fp=Ue(t)}var n=t.prototype;return n.append=function(t,n){t=He(t),n=He(n),this.Fp.push([t,n]),$e(this)},n.delete=function(t){t=He(t);for(var n=this.Fp,i=0;i<n.length;){n[i][0]===t?n.splice(i,1):i++}$e(this)},n.get=function(t){t=He(t);for(var n=this.Fp,i=0;i<n.length;i++){var e=n[i];if(e[0]===t)return e[1]}return null},n.getAll=function(t){t=He(t);for(var n=this.Fp,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=He(t);for(var n=this.Fp,i=0;i<n.length;i++){if(n[i][0]===t)return!0}return!1},n.set=function(t,n){t=He(t),n=He(n);for(var i=this.Fp,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]),$e(this)},n.sort=function(){Ri(this.Fp,Ye),$e(this)},n.toString=function(){return ze(this.Fp)},n.entries=function(){return new ir(this.Fp,Qe)},n.keys=function(){return new ir(this.Fp,tr)},n.values=function(){return new ir(this.Fp,nr)},n.forEach=function(t){var n=this;this.Fp.forEach(function(i){return t(i[1],i[0],n)})},t}(),Je=Ze.prototype.entries;Li&&(Ze.prototype[e]=Je);var Qe=function(t){return[t[0],t[1]]},tr=function(t){return t[0]},nr=function(t){return t[1]},ir=function(){function t(t,n){this.Hp=0,this.Fp=t,this.qp=n}return t.prototype.next=function(){return this.Hp<this.Fp.length?{done:!1,value:this.qp(this.Fp[this.Hp++])}:{done:!0,value:void 0}},t}(),er="null";var rr=p.create(null);rr.ftp=21,rr.file=0,rr.gopher=70,rr.http=80,rr.https=443,rr.ws=80,rr.wss=443;var or=/^(?:\.|%2e)$/i,ur=/^(?:\.|%2e){2}$/i;function sr(t){return or.test(t)}function fr(t){return ur.test(t)}function hr(t){return void 0!==rr[t]}function cr(t){return hr(t.Wp)}function ar(t){return""!==t.zp||""!==t.Gp}function vr(t){var n=t.length;if(!(n>=2))return!1;if(!lr(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 dr(t){return 2===t.length&&Ni.test(t[0])&&(":"===t[1]||"|"===t[1])}function lr(t){return 2===t.length&&dr(Zi(t))}function wr(t){return dr(t)&&":"===t[1]}function br(t){var n=t.Xp;0!==n.length&&("file"===t.Wp&&1===n.length&&wr(n[0])||n.pop())}function gr(t){return null===t.jp||De===t.jp||t.Qp||"file"===t.Wp}var mr=-1,pr=/\t|\n|\r/g,yr=/^[\x00-\x1f ]+|[\x00-\x1f ]+$/g;function _r(t,n,i,e){void 0===i&&(i=null),void 0===e&&(e=null),i||(i=new Tr,t=t.replace(yr,""));var r=null!==e?e:0;n=n||null;for(var o=[],u=!1,s=!1,f=!1,h=oe(t=t.replace(pr,"")),c=h.length,a=0;a<=c;){var v=a<c?h[a]:mr;switch(r){case 0:if(!Vi(v)){if(null===e){o.length=0,r=2;continue}throw new m("Invalid scheme")}o.push(ji(v)),r=1;break;case 1:if(qi(v)||43===v||45===v||46===v)o.push(ji(v));else{if(58!==v){if(null===e){o.length=0,r=2,a=0;continue}throw new m("Invalid scheme")}var d=ve(o);if(null!==e){if(hr(i.Wp)&&!hr(d))return;if(!hr(i.Wp)&&hr(d))return;if((ar(i)||null!==i.Kp)&&"file"===d)return;if("file"===i.Wp&&(i.jp===De||null===i.jp))return}if(i.Wp=d,null!==e)return void(cr(i)&&i.Kp===rr[i.Wp]&&(i.Kp=null));o.length=0,"file"===i.Wp?r=13:cr(i)&&n&&n.Wp===i.Wp?r=3:cr(i)?r=7:47===h[a+1]?(r=4,a+=1):(i.Qp=!0,i.Xp.push(""),r=18)}break;case 2:if(!n||n.Qp&&35!==v)throw new m("Invalid scheme");n.Qp&&35===v?(i.Wp=n.Wp,i.Xp=n.Xp.slice(),i.Vp=n.Vp,i.Yp="",i.Qp=!0,r=20):"file"!==n.Wp?(r=5,a-=1):(r=13,a-=1);break;case 3:47===v&&47===h[a+1]?r=8:(r=5,a-=1);break;case 4:47===v?r=9:(r=17,a-=1);break;case 5:i.Wp=n.Wp,mr===v?(i.zp=n.zp,i.Gp=n.Gp,i.jp=n.jp,i.Kp=n.Kp,i.Xp=n.Xp.slice(),i.Vp=n.Vp):47===v?r=6:63===v?(i.zp=n.zp,i.Gp=n.Gp,i.jp=n.jp,i.Kp=n.Kp,i.Xp=n.Xp.slice(),i.Vp="",r=19):35===v?(i.zp=n.zp,i.Gp=n.Gp,i.jp=n.jp,i.Kp=n.Kp,i.Xp=n.Xp.slice(),i.Vp=n.Vp,i.Yp="",r=20):92===v&&cr(i)?r=6:(i.zp=n.zp,i.Gp=n.Gp,i.jp=n.jp,i.Kp=n.Kp,i.Xp=n.Xp.slice(),i.Xp.pop(),r=17,a-=1);break;case 6:!cr(i)||47!==v&&92!==v?47===v?r=9:(i.zp=n.zp,i.Gp=n.Gp,i.jp=n.jp,i.Kp=n.Kp,r=17,a-=1):r=8;break;case 7:if(47!==v||47!==h[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=ve(Ee(w,Te));f?i.Gp+=b:i.zp+=b}else f=!0}o.length=0}else if(mr===v||47===v||63===v||35===v||cr(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.Wp)a-=1,r=15;else if(58!==v||s)if(mr===v||47===v||63===v||35===v||cr(i)&&92===v){if(a-=1,cr(i)&&0===o.length)throw new m("Invalid host");if(null!==e&&0===o.length&&(ar(i)||null!==i.Kp))return;var g=Be(ve(o),cr(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=Be(ve(o),cr(i));if(i.jp=p,o.length=0,r=12,11===e)return}break;case 12:if(Hi(v))o.push(v);else{if(!(mr===v||47===v||63===v||35===v||cr(i)&&92===v||null!==e))throw new m("Invalid port");if(0!==o.length){var y=_(ve(o),10);if(y>65535)throw new m("Invalid port");i.Kp=y===rr[i.Wp]?null:y,o.length=0}if(null!==e)return;r=16,a-=1}break;case 13:i.Wp="file",47===v||92===v?r=14:n&&"file"===n.Wp?mr===v?(i.jp=n.jp,i.Xp=n.Xp.slice(),i.Vp=n.Vp):63===v?(i.jp=n.jp,i.Xp=n.Xp.slice(),i.Vp="",r=19):35===v?(i.jp=n.jp,i.Xp=n.Xp.slice(),i.Vp=n.Vp,i.Yp="",r=20):(vr(h.slice(a))||(i.jp=n.jp,i.Xp=n.Xp.slice(),br(i)),r=17,a-=1):(r=17,a-=1);break;case 14:47===v||92===v?r=15:(n&&"file"===n.Wp&&!vr(h.slice(a))&&(wr(n.Xp[0])?i.Xp.push(n.Xp[0]):i.jp=n.jp),r=17,a-=1);break;case 15:if(mr===v||47===v||92===v||63===v||35===v)if(a-=1,null===e&&lr(o))r=17;else if(0===o.length){if(i.jp=De,null!==e)return;r=16}else{var S=Be(ve(o),cr(i));if(0===S.Bp&&"localhost"===S.Op&&(S=De),i.jp=S,null!==e)return;o.length=0,r=16}else o.push(v);break;case 16:cr(i)?(r=17,47!==v&&92!==v&&(a-=1)):null===e&&63===v?(i.Vp="",r=19):null===e&&35===v?(i.Yp="",r=20):mr!==v&&(r=17,47!==v&&(a-=1));break;case 17:if(mr===v||47===v||cr(i)&&92===v||null===e&&(63===v||35===v)){var T=ve(o);if(fr(T)?(br(i),47===v||cr(i)&&92===v||i.Xp.push("")):!sr(T)||47===v||cr(i)&&92===v?sr(T)||("file"===i.Wp&&0===i.Xp.length&&lr(o)&&(De!==i.jp&&null!==i.jp&&(i.jp=De),o[1]=58,T=ve(o)),i.Xp.push(T)):i.Xp.push(""),o.length=0,"file"===i.Wp&&(mr===v||63===v||35===v))for(;i.Xp.length>1&&""===i.Xp[0];)i.Xp.shift();63===v?(i.Vp="",r=19):35===v&&(i.Yp="",r=20)}else o.push.apply(o,Ee(v,Se));break;case 18:63===v?(i.Vp="",r=19):35===v?(i.Yp="",r=20):mr!==v&&(i.Xp[0]+=ve(Ee(v,ye)));break;case 19:null===e&&35===v?(i.Yp="",r=20):mr!==v&&(i.Vp+=ve(Ee(v,cr(i)?Ie:ke)));break;case 20:mr===v||0===v||(i.Yp+=ve(Ee(v,_e)))}a++}return i}function Sr(t,n,i,e){try{_r(t,n,i,e)}catch(t){}}var Tr=function(){this.Wp="",this.zp="",this.Gp="",this.jp=null,this.Kp=null,this.Xp=[],this.Vp=null,this.Yp=null,this.Qp=!1};function kr(t){switch(t.Wp){case"blob":var n;try{n=_r(t.Xp[0],null)}catch(t){return er}return kr(n);case"ftp":case"gopher":case"http":case"https":case"ws":case"wss":return function(t,n,i){return t+"://"+Me(n)+(null===i?"":":"+i)}(t.Wp,t.jp,t.Kp);default:return er}}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.Up}(n))e=n.Up;else try{e=_r(String(n),null)}catch(t){throw new m("Invalid base URL: "+t.message)}try{i=_r(String(t),e)}catch(t){throw new m("Invalid URL: "+t.message)}var r=i.Vp;this.Up=i,this.Vp=function(t){var n=new Ze;return null!==t&&Ge(n,t),n}(r),this.Vp.Up=this}var n=t.prototype;return n.toString=function(){return this.href},n.toJSON=function(){return this.href},function(t,n,i){n&&Ei(t.prototype,n),i&&Ei(t,i)}(t,[{key:"href",get:function(){return function(t,n){void 0===n&&(n=!1);var i=t.Wp+":";if(null!==t.jp?(i+="//",ar(t)&&(i+=t.zp,""!==t.Gp&&(i+=":"+t.Gp),i+="@"),i+=Me(t.jp),null!==t.Kp&&(i+=":"+t.Kp)):null===t.jp&&"file"===t.Wp&&(i+="//"),t.Qp)i+=t.Xp[0];else for(var e=0,r=t.Xp;e<r.length;e++)i+="/"+r[e];return null!==t.Vp&&(i+="?"+t.Vp),n||null===t.Yp||(i+="#"+t.Yp),i}(this.Up)},set:function(t){var n;try{n=_r(String(t),null)}catch(t){throw new m("Invalid URL: "+t.message)}this.Up=n,Ke(this.Vp);var i=this.Up.Vp;null!==i&&Ge(this.Vp,i)}},{key:"origin",get:function(){return kr(this.Up)}},{key:"protocol",get:function(){return this.Up.Wp+":"},set:function(t){Sr(t+":",null,this.Up,0)}},{key:"username",get:function(){return this.Up.zp},set:function(t){gr(this.Up)||(this.Up.zp=Re(t,Te))}},{key:"password",get:function(){return this.Up.Gp},set:function(t){gr(this.Up)||(this.Up.Gp=Re(t,Te))}},{key:"host",get:function(){var t=this.Up,n=t.jp;if(null===n)return"";var i=t.Kp,e=Me(n);return null!==i&&(e+=":"+i),e},set:function(t){this.Up.Qp||Sr(t,null,this.Up,10)}},{key:"hostname",get:function(){var t=this.Up.jp;return null===t?"":Me(t)},set:function(t){this.Up.Qp||Sr(t,null,this.Up,11)}},{key:"port",get:function(){var t=this.Up.Kp;return null===t?"":""+t},set:function(t){gr(this.Up)||(""===t?this.Up.Kp=null:Sr(t,null,this.Up,12))}},{key:"pathname",get:function(){var t=this.Up.Xp;return this.Up.Qp?t[0]:0===t.length?"":"/"+t.join("/")},set:function(t){this.Up.Qp||(this.Up.Xp.length=0,Sr(t,null,this.Up,16))}},{key:"search",get:function(){var t=this.Up.Vp;return null===t||""===t?"":"?"+t},set:function(t){t=He(t);var n=this.Up;if(""===t)return n.Vp=null,void Ke(this.Vp);"?"===t[0]&&(t=t.slice(1)),n.Vp="",Sr(t,null,n,19),Ge(this.Vp,t)}},{key:"searchParams",get:function(){return this.Vp}},{key:"hash",get:function(){var t=this.Up.Yp;return null===t||""===t?"":"#"+t},set:function(t){""!==t?("#"===t[0]&&(t=t.slice(1)),this.Up.Yp="",Sr(t,null,this.Up,20)):this.Up.Yp=null}}]),t}();function Er(t){return t.document&&t.document.baseURI||t.location.href||""}x(),pt();var Rr=function(){function t(){this.Cm=void 0,this.mw=new Or,this.yw=ui,this.ww=Nr(),self.performance&&self.performance.now?this.Cm=function(){return self.performance.now()}:this.Cm=Gn}var n=t.prototype;return n.Jp=function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];Si.apply(void 0,[].concat(n))},n.Zp=function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];_i.apply(void 0,[].concat(n))},n.$p=function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];Ti.apply(void 0,[].concat(n))},n.iw=function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];ki.apply(void 0,[].concat(n))},n.ew=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];Ii.apply(void 0,[].concat([t],i))},n.Nm=function(t,n){return d(t,n)},n.nw=function(t,n){return w(t,n)},n.Dm=function(t){l(t)},n.ow=function(t){b(t)},n.hw=function(){return this.aw.hw()},n.uw=function(){return this.aw.uw()},n.cw=function(){return this.aw.cw()},n.dw=function(){return this.aw.dw()},n.lw=function(){return this.aw.lw()},n.fw=function(t,n){return this.aw.fw(t,n)},n._w=function(t){return this.aw._w(t)},n.Rh=function(t,n){var i;return void 0===n&&(n=Er(c)),i="object"!==(void 0===n?"undefined":F(n))||B(n,Ir)?n:n.href,new Ir(t,i)},n.pw=function(t,n){if(void 0===n&&(n=Er(c)),this.ww){var i=function(t){return"string"==typeof t}(n)?n:n.toString();return new self.URL(t,i).href}return this.Rh(t,n).href},It(t,[{key:"gw",get:function(){return this.mw}},{key:"ie",get:function(){return this.yw}},{key:"bw",get:function(){return{Aw:v&&v.userAgent.match(/Android /i)?"Android":"other",Sw:Boolean(v&&v.userAgent.match(/Android 8.0.0/i))}}},{key:"Tw",get:function(){return self&&self.location&&"https:"===self.location.protocol}},{key:"Ew",get:function(){return"languages"in v?v.languages.slice():[v.language]}}]),t}(),Or=function(){function t(){}return It(t,[{key:"xw",get:function(){return v.oscpu}},{key:"ie",get:function(){return v.platform}},{key:"Pw",get:function(){return v.vendor}},{key:"Rw",get:function(){return v.vendorSub}}]),t}();function Nr(){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(),pt();var Pr=function(){function t(){}var n=t.prototype;return n.lw=function(){return tt.resolve(!1)},n.uw=function(){return tt.resolve(!1)},n.dw=function(){return tt.resolve(!1)},n.cw=function(){return tt.resolve(!1)},n._w=function(t){return tt.resolve(!1)},n.fw=function(t,n){return tt.resolve(!1)},n.hw=function(){return tt.resolve(!1)},t}();x(),pt();var Ar=function(){function t(){}var n=t.prototype;return n.ek=function(){},n.Ib=function(t){},n.xb=function(t){},n.Pb=function(t,n){},t}();x(),pt();var Dr="default",Cr="unknown";x(),pt(),x(),pt(),x(),pt();var xr=function(t){return t.rk="arraybuffer",t.hk="json",t.ck="stream",t.dk="text",t}({});x(),pt(),M();var Br=function(){function t(n){var i=this;if(this.Nw=void 0,this.Nw={},n)if(B(n,t))n.asList().forEach(function(t){var n=t[0],e=t[1];i.append(n,e)});else if(function(t){return Kt(t)&&"function"==typeof t.forEach}(n))n.forEach(function(t,n){Array.isArray(t)&&2===t.length?i.append(t[0],t[1]):i.append(n,t)});else if(function(t){return void 0!==e&&Kt(t)&&e in t}(n))for(var r,o=Rt(n);!(r=o()).done;){var u=r.value,s=u[0],f=u[1];this.append(s,f)}else p.getOwnPropertyNames(n).forEach(function(t){i.append(t,n[t])});else;}var n=t.prototype;return n.append=function(t,n){var i=t,e=n;i=Mr(i),e=Fr(e);var r=i.toLowerCase();if(this.Nw.hasOwnProperty(r)){var o=this.Nw[r],u=o[1];o[1]=u?u+", "+e:e}else this.Nw[r]=[i,e]},n.delete=function(t){var n=Mr(t).toLowerCase();delete this.Nw[n]},n.get=function(t){var n=Mr(t).toLowerCase();return this.Nw.hasOwnProperty(n)?this.Nw[n][1]:null},n.has=function(t){var n=Mr(t).toLowerCase();return this.Nw.hasOwnProperty(n)},n.set=function(t,n){var i=t,e=(i=Mr(i)).toLowerCase();this.Nw[e]=[i,Fr(n)]},n.forEach=function(t,n){for(var i in this.Nw)this.Nw.hasOwnProperty(i)&&t.call(n,this.Nw[i][1],i,this)},n.asList=function(){var t=[];for(var n in this.Nw)if(this.Nw.hasOwnProperty(n)){var i=this.Nw[n],e=i[0],r=i[1];t.push([e,r])}return t},n.lk=function(){var t={};return this.forEach(function(n,i){t[i]=n}),t},n.fk=function(t){var n=this;t.forEach(function(t,i){n.append(i,t)})},n.vk=function(t){var n=this;t.forEach(function(t,i){n.set(i,t)})},t}();function Mr(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 Fr(t){var n=t;return"string"!=typeof n&&(n=String(n)),n}var Lr=function(t){return t.DELETE="DELETE",t.GET="GET",t.HEAD="HEAD",t.OPTIONS="OPTIONS",t.POST="POST",t.PUT="PUT",t}({}),Ur=function(t){return t.hE="same-origin",t.aE="no-cors",t.uE="cors",t.cE="navigate",t}({}),zr=function(t,n){this.Ak=void 0,this.Vk=void 0,this.dE=void 0,this.Fk=void 0,this.lE=void 0,this.fE=void 0,this.Gm=void 0,this.Vw=void 0,this.vE=void 0,this._E=void 0,this.zk=void 0,this.gE=void 0,this.mE=void 0,this.pE=void 0,this.wE=void 0,this.yE=void 0;var i,e,r,o,u,s,f,h,c,a,v,d,l,w,b,g,m,p,y=t.zk;n?(i=n.Ak,e=n.Vk,r=n.dE,o=n.Fk,u=n.lE,s=n.fE,f=n.Gm,h=n.Vw,c=n.vE,a=n._E,v=n.gE,d=n.mE,l=n.pE,w=n.wE,b=n.yE):(i=null,e={},r="GET",o=xr.dk,u=0,s=0,h="",c="",a="",v=!1,l=void 0,w=!1,b=void 0),this.zk=y,this.Ak=t.Ak||i,this.Vk=new Br(t.Vk||e),this.dE=t.dE||r,this.Fk=t.Fk||o,this.lE=void 0!==t.lE?Number(t.lE)||0:u,this.fE=void 0!==t.fE?Number(t.fE)||0:s,this.Gm=t.Gm||f||(new dn).Gm,this.Vw=t.Vw||h,this.vE=t.vE||c,this._E=t._E||a,this.gE=void 0!==t.gE?Boolean(t.gE):v,this.mE=t.mE||d,this.pE=null!=(g=t.pE)?g:l,this.wE=null!=(m=t.wE)?m:w,this.yE=null!=(p=t.yE)?p:b};x(),pt(),x(),pt();var Wr=function(t){return t.CE="HttpOpenError",t.DE="HttpResponseError",t.NE="HttpTimeoutError",t}({}),Vr=function(t){function n(n,i,e){var r;return(r=t.call(this,i,e)||this).BE=void 0,r.BE=n,r}return Tt(n,t),It(n,[{key:"Uk",get:function(){return this.BE}}]),n}(wn),Hr=function(t){function n(n,i){return t.call(this,n,"Error while opening "+n.zk+".",i)||this}return Tt(n,t),It(n,[{key:"name",get:function(){return Wr.CE}}]),n}(Vr),qr=function(){function t(){}var n=t.prototype;return n.Uk=function(t){return tt.reject(new Hr(new zr(t)))},n.bE=function(t){},n._n=function(){},t}();x(),pt();var Xr=function(t){function n(n){return t.call(this,"Invalid XML",n)||this}return Tt(n,t),n}(wn),jr=function(t){function n(){var n;return(n=t.apply(this,arguments)||this).zx=new Pr,n.sV=new qr,n.i=new Ar,n}return Tt(n,t),n.prototype.wx=function(t){throw new Xr},It(n,[{key:"aw",get:function(){return this.zx}},{key:"Gx",get:function(){return!1}},{key:"jx",get:function(){return!1}},{key:"Jx",get:function(){return!1}},{key:"Kx",get:function(){return!1}},{key:"Zx",get:function(){return this.i}},{key:"$x",get:function(){return{tP:Jt}}},{key:"iP",get:function(){return Dr}},{key:"eP",get:function(){return Cr}},{key:"sP",get:function(){return!0}},{key:"ff",get:function(){return this.sV}},{key:"rP",get:function(){return!1}}]),n}(Rr);function Yr(){return Yr=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},Yr.apply(this,arguments)}function Kr(){var t=p.create(null);return t.Iw=void 0,delete t.Iw,t}function Gr(){return new Zr}Zt(new jr),x(),pt(),x(),pt(),x(),pt(),x(),pt(),x(),pt(),x(),pt();var $r="undefined"!=typeof Map&&"entries"in Map.prototype?Map:void 0,Zr=$r||function(){var t=function(){function t(t,n){this.data=void 0,this.keys=void 0,this.index=0,this.selector=void 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=Kr(),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=Kr(),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}()}();$r||function(){var t=function(){function t(t,n){this.Cw=void 0,this.Dw=void 0,this.Cw=t,this.Dw=n}return t.prototype.next=function(){var t=this.Cw.next();return t.done?t:{value:this.Dw(t.value),done:!1}},t}();(function(){function n(){this.Nw=Gr()}var i=n.prototype;i.get=function(t){return this.Nw.get(""+t)},i.set=function(t,n){return this.Nw.set(""+t,n),this},i.has=function(t){return this.Nw.has(""+t)},i.delete=function(t){return this.Nw.delete(""+t)},i.clear=function(){this.Nw.clear()},i.keys=function(){return new t(this.Nw.keys(),function(t){return Number(t)})},i.values=function(){return this.Nw.values()},i.entries=function(){return new t(this.Nw.entries(),function(t){var n=t[0],i=t[1];return[Number(n),i]})},i.forEach=function(t){this.Nw.forEach(function(n,i){t(n,Number(i))})},It(n,[{key:"size",get:function(){return this.Nw.size}}])})()}();x(),pt(),x(),pt();var Jr="9a04f079-9840-4286-ab92-e65be0885f95",Qr="urn:uuid:"+Jr,to="com.microsoft.playready",no="edef8ba9-79d6-4ace-a3c8-27dcd51d21ed",io="urn:uuid:"+no,eo="com.widevine.alpha",ro="1077efec-c0b2-4d02-ace3-3c1e52e2fb4b",oo="urn:uuid:"+ro,uo="org.w3.clearkey",so="94ce86fb-07ff-4f43-adb8-93d2fa968ca2",fo="urn:uuid:"+so,ho="com.apple.fps.1_0";x(),pt();var co=function(t){return t.Bw="playready",t.Mw="widevine",t.Fw="fairplay",t.Lw="clearkey",t.Ow="clearkey_dash_if",t.Uw="aes128",t}({}),ao={Vw:co.Bw,Hw:to,qw:"cenc",Ww:Jr,zw:Qr,Gw:"PlayReady"},vo={Vw:co.Mw,Hw:eo,qw:"cenc",Ww:no,zw:io,Gw:"Widevine"},lo={Vw:co.Fw,Hw:ho,qw:"skd",Ww:so,zw:fo,Gw:"FairPlay"},wo=(co.Fw,{Vw:co.Lw,Hw:uo,qw:"cenc",Ww:ro,zw:oo,Gw:"ClearKey"});co.Ow;x(),pt();String.prototype.replaceAll;var bo="function"==typeof String.prototype.startsWith?function(t,n){return Xt(t)&&t.startsWith(n)}:function(t,n){return Xt(t)&&t.substr(0,n.length)===n},go=(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&~i||(r+=e),0!=(i>>>=1);)e+=e;return r}),mo=(String.prototype.padStart,String.prototype.padEnd,16384),po="function"==typeof String.fromCodePoint?function(t){var n;return t.length<=mo?(n=String).fromCodePoint.apply(n,[].concat(t)):_o(t,String.fromCodePoint)}:function(t){for(var n,i=[],e=Rt(t);!(n=e()).done;){var r=n.value;r>65535&&(r-=65536,i.push(r>>>10&1023|55296),r=56320|1023&r),i.push(r)}return yo(i)};function yo(t){var n;return t.length<=mo?(n=String).fromCharCode.apply(n,[].concat(t)):_o(t,String.fromCharCode)}function _o(t,n){for(var i=[],e=0;e<t.length;e+=mo)i.push(n.apply(void 0,[].concat(t.slice(e,e+mo))));return i.join("")}var So=Ht.K_&&Ht.J_>=42||Ht.Fg&&Ht.Vg>=38||Ht.Ig||Ht.Bg||Ht.Xg&&Ht.Qg>=29;function To(t,n){return function(t,n){return Xt(t)&&-1!==t.indexOf(n)}(t,"audio")?{initDataTypes:["cenc"],audioCapabilities:[Yr({contentType:t},n?{robustness:"SW_SECURE_CRYPTO"}:{})]}:{initDataTypes:["cenc"],videoCapabilities:[Yr({contentType:t},n?{robustness:"SW_SECURE_CRYPTO"}:{})]}}var ko=function(){function t(t){this.Qw=void 0,this.Xw=Gr(),this.Kw=void 0,this.Qw=t}var n=t.prototype;return n.lw=function(){return this._w(vo)},n.uw=function(){return this._w(wo)},n.dw=function(){return this._w(ao)},n.cw=function(){return this._w(lo)},n._w=function(t){var n=t.zw,i=this.Xw.get(n);if(i)return i;var e=this.fw(t,'video/mp4; codecs="avc1.42000a"');return this.Xw.set(n,e),e},n.fw=function(t,n){return nn(function(){return en(this,function(i){switch(i.label){case 0:return i.trys.push([0,2,,7]),[4,this.Qw.jw(t.Hw,[To(n,!0)])];case 1:return i.sent(),[2,!0];case 2:i.sent(),i.label=3;case 3:return i.trys.push([3,5,,6]),[4,this.Qw.jw(t.Hw,[To(n,!1)])];case 4:return i.sent(),[2,!0];case 5:return i.sent(),[2,!1];case 6:return[3,7];case 7:return[2]}})}).call(this)},n.hw=function(){return this.Kw||(this.Kw=this.Yw()),this.Kw},n.Yw=function(){return nn(function(){return en(this,function(t){switch(t.label){case 0:return"https:"===c.location.protocol?[2,!1]:So?[4,this.uw()]:[2,!1];case 1:return t.sent()?[2,!1]:[2,!0]}})}).call(this)},t}();function Io(t,n,i){if("function"==typeof i)i.call(t,n);else for(var e,r=Rt(i);!(e=r()).done;){e.value.call(t,n)}}x(),pt(),x(),pt(),x(),pt(),x(),pt(),x(),pt(),x(),pt();var Eo=function(){function t(t){var n=this;this.Zw=Kr(),this.ey=void 0,this.$w=0,this.sy=void 0,this.Us=function(t){n.Co(t)},this.sy=null!=t?t:this}var n=t.prototype;return n.jn=function(t,n){if("function"==typeof n)if("string"==typeof t)this.Jw(t,n);else for(var i,e=Rt(t);!(i=e()).done;){var r=i.value;this.Jw(r,n)}},n.Jw=function(t,n){var i=this.Zw[t];void 0===i?this.Zw[t]=n:"function"==typeof i?this.Zw[t]=[i,n]:0===this.$w?i.push(n):this.Zw[t]=i.concat(n)},n.iy=function(t){if("function"==typeof t){var n=this.ey;void 0===n?this.ey=t:"function"==typeof n?this.ey=[n,t]:0===this.$w?n.push(t):this.ey=n.concat(t)}},n.Ho=function(){this.Zw=Kr(),this.ey=void 0},n.Co=function(t){this.$w++;var n=this.Zw[t.type],i=this.ey;void 0!==n&&Io(this.sy,t,n),void 0!==i&&Io(this.sy,t,i),this.$w--},n.yn=function(t,n){if("function"==typeof n)if("string"==typeof t)this.oy(t,n);else for(var i,e=Rt(t);!(i=e()).done;){var r=i.value;this.oy(r,n)}},n.oy=function(t,n){var i=this.Zw[t];void 0!==i&&("function"==typeof i?i===n&&(this.Zw[t]=void 0):0===this.$w?fn(i,n):this.Zw[t]=hn(i,n))},n.uy=function(t){if("string"==typeof t)this.Zw[t]=void 0;else for(var n,i=Rt(t);!(n=i()).done;){var e=n.value;this.Zw[e]=void 0}},n.ly=function(t){var n=this.ey;void 0!==n&&("function"==typeof n?n===t&&(this.ey=void 0):0===this.$w?fn(n,t):this.ey=hn(n,t))},n.vy=function(t,n){var i=this;return new tt(function(e,r){if(n&&n.Om)return r(new bn);var o=function(t){s(),e(t)},u=function(){s(),r(new bn)},s=function(){i.yn(t,o),n&&n.qm(u)};i.jn(t,o),n&&n.Hm(u)})},t}();x(),pt(),x(),pt();var Ro=function(t,n){void 0===n&&(n=new Date),this.type=void 0,this.date=void 0,this.type=t,this.date=n};x(),pt();var Oo=function(t){return t._y="gy",t.py="wy",t.yy="contentprotectionerror",t.by="contentprotectionsuccess",t.Ay="currentsourcechange",t.Sy="destroy",t.Yd="durationchange",t.Ty="emptied",t.Ey="encrypted",t.zd="ended",t.xy="Py",t.Ry="Iy",t.Cy="Dy",t.Ny="By",t.Jd="loadstart",t.My="manifestupdate",t.Ly="nosupportedrepresentationfound",t.Oy="offline",t.Fy="online",t.qd="pause",t.lo="play",t.if="progress",t.Zu="ratechange",t.Uy="representationchange",t.Vy="resize",t.Ld="seeked",t.Xd="seeking",t.Hy="segmenterror",t.qy="segmentnotfound",t.Wy="initializernotfound",t.zy="manifesterror",t.Gy="Xy",t.jy="Qy",t.Ky="Yy",t.vo="sourcechange",t.sc="timeupdate",t.zl="volumechange",t.Jy="Zy",t.$y="ib",t.LICENSE_REQUEST_GENERATED="eb",t.sb="metricschange",t.CONTENT_STEERING_START="contentsteeringstart",t.CONTENT_STEERING_STOP="contentsteeringstop",t.CONTENT_STEERING_UPDATE="contentsteeringupdate",t.CONTENT_STEERING_LOCATION_CHANGE="contentsteeringlocationchange",t.CONTENT_STEERING_ERROR="contentsteeringerror",t}({}),No=["cenc"],Po=["cbcs","cbcs-1-9"],Ao=function(t){function n(n){var i;return(i=t.call(this,Oo.$y)||this).ob=void 0,i.ob=n,i}return Tt(n,t),n}(Ro),Do=function(t){function n(n,i,e,r){var o;return(o=t.call(this,"ub")||this).cb=void 0,o.fb=void 0,o.ub=void 0,o._b=void 0,o.cb=n,o.fb=i,o.ub=e,o._b=r,o}return Tt(n,t),n}(Ro),Co=function(t){function n(){return t.call(this,"lt")||this}return Tt(n,t),n}(Ro);x(),pt(),x(),pt(),x(),pt();var xo="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");function Bo(t,n,i){return xo[t>>2]+xo[(3&t)<<4|n>>4]+xo[(15&n)<<2|i>>6]+xo[63&i]}function Mo(t,n,i){for(var e=[],r=n;r<i;r+=3)e.push(Bo(t[r],t[r+1],t[r+2]));return e.join("")}x(),pt(),M(),x(),pt();var Fo=function(){function t(t){void 0===t&&(t=0),this.Ac=void 0,this.Ac=t}var n=t.prototype;return n.wb=function(t){this.Ac+=t},n.Ic=function(t){this.Ac=t},n.yb=function(){return new t(this.Lu)},It(t,[{key:"Lu",get:function(){return this.Ac}}]),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 zo(t,n){4294967168&t?(4294965248&t?4294901760&t?4292870144&t||(n.push(t>>18&7|240),n.push(Uo(t,12)),n.push(Uo(t,6))):(Lo(t),n.push(t>>12&15|224),n.push(Uo(t,6))):n.push(t>>6&31|192),n.push(63&t|128)):n.push(t)}function Wo(t,n){if(n.Lu>=t.length)throw new g("Invalid byte index");var i=255&t[n.Lu];if(n.wb(1),128==(192&i))return 63&i;throw new g("Invalid continuation byte")}function Vo(t,n){var i=n.Lu;if(i>t.length)throw new g("Invalid byte index");if(i===t.length)return!1;var e=255&t[i];if(n.wb(1),!(128&e))return e;if(192==(224&e)){var r=(31&e)<<6|Wo(t,n);if(r>=128)return r;throw new g("Invalid continuation byte")}if(224==(240&e)){var o=(15&e)<<12|Wo(t,n)<<6|Wo(t,n);if(o>=2048)return Lo(o),o;throw new g("Invalid continuation byte")}if(240==(248&e)){var u=(7&e)<<18|Wo(t,n)<<12|Wo(t,n)<<6|Wo(t,n);if(u>=65536&&u<=1114111)return u}throw new g("Invalid UTF-8 detected")}x(),pt(),x(),pt();function Ho(t,n,i){void 0===i&&(i=!1);var e=t.getUint16(n.Lu,i);return n.wb(2),e}function qo(t,n,i,e){void 0===e&&(e=!1),t.setUint16(n.Lu,i,e),n.wb(2)}function Xo(t,n,i,e){void 0===e&&(e=!1),t.setUint32(n.Lu,i,e),n.wb(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.Lu+2<=t.byteLength;){var o=Ho(t,n,i);if(e&&!o)break;r.push(o)}return yo(r)}($o(t),new tu,n,!1)}function Ko(t){return function(t){return po(t)}(function(t,n){var i,e=[],r=new tu;if(!n){if(!1===(i=Vo(t,r)))return e;65279===i||e.push(i)}for(;!1!==(i=Vo(t,r));)e.push(i);return e}(Zo(t)))}function Go(t){return new k(function(t){for(var n,i=[],e=Rt(t);!(n=e()).done;)zo(n.value,i);return i}(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 k(t.buffer,t.byteOffset,t.byteLength)}function Jo(t){return B(t,ArrayBuffer)?new k(t):Zo(t)}function Qo(t){if(t.slice)return t.slice(0);var n=new k(t.byteLength);return n.set(t,0),n}var tu=function(){function t(t){void 0===t&&(t=0),this.Ac=void 0,this.Ac=t}var n=t.prototype;return n.wb=function(t){this.Ac+=t},n.Ic=function(t){this.Ac=t},n.yb=function(){return new t(this.Lu)},n.Sb=function(){return new Fo(this.Lu<<3)},It(t,[{key:"Lu",get:function(){return this.Ac}}]),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&&cn(nu,qt.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,e=new k(n),r=0,o=Rt(t);!(i=o()).done;){var u=i.value;e.set(u,r),r+=u.byteLength}return e}(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+=16383)e.push(Mo(t,o,y.min(r,o+16383)));if(1===i){var u=t[n-1];e.push(xo[u>>2]+xo[(3&u)<<4]+"==")}else if(2===i){var s=t[n-2],f=t[n-1];e.push(xo[s>>2]+xo[(3&s)<<4|f>>4]+xo[(15&f)<<2]+"=")}return e.join("")}(new k(t))}var uu=new k([0]).buffer,su=function(){function t(){this.kb=void 0,this.kb=[]}var n=t.prototype;return n.Eb=function(t){for(var n,i=Rt(this.kb);!(n=i()).done;){if(eu(n.value[0],t))return!0}return!1},n.xb=function(t){for(var n,i=Rt(this.kb);!(n=i()).done;){var e=n.value;if(eu(e[0],t))return e[1]}},n.Pb=function(t,n){for(var i,e=Rt(this.kb);!(i=e()).done;){var r=i.value;if(eu(r[0],t))return void(r[1]=n)}this.kb.push([t,n])},n.Rb=function(t,n){this.kb.forEach(function(n){return t(n[1],n[0])},n)},n.Ib=function(){an(this.kb)},It(t,[{key:"Tb",get:function(){return this.kb.length}}]),t}();x(),pt();var fu=function(){function t(){var t=this;this.Od=void 0,this.Of=void 0,this.Ff=void 0,this.Od=new tt(function(n,i){t.Of=n,t.Ff=i})}var n=t.prototype;return n.uf=function(t){this.Of&&(this.Of(t),this.Ku())},n.Cb=function(t){this.Ff&&(this.Ff(t),this.Ku())},n.dd=function(){this.Od.catch(Jt),this.Cb(new bn)},n.jm=function(t){var n=this;t.then(function(t){return n.uf(t)},function(t){return n.Cb(t)})},n.Ku=function(){this.Of=void 0,this.Ff=void 0},t}();function hu(t,n){return t===to?function(t){if(t.byteLength<2*cu.length)return t;var n=new DataView(t,0,2*cu.length),i=Yo(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+ou(t)+i;return function(t,n){void 0===n&&(n=!1);var i=new k(2*t.length);return jo($o(i),new tu,t,n),i}(e,!0).buffer}(t)}(n):n}x(),pt();var cu="<PlayReady";x(),pt(),x(),pt();var au=function(t){function n(n,i,e,r){var o;return(o=t.call(this,n,r)||this).Db=void 0,o.Nb=void 0,o.Db=i,o.Nb=e,o}return Tt(n,t),n}(wn);x(),pt(),x(),pt(),x(),pt(),x(),pt(),x(),pt();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(),pt(),x(),pt(),x(),pt(),x(),pt(),x(),pt(),x(),pt(),x(),pt();!function(){function t(t,n){this.Bb=t,this.Mb=n}t.prototype.get=function(t){var n=this.Bb.get(t);if(0===this.Mb||void 0===n)return n;var i=this.Bb.get(t+1)||0,e=n&(1<<8-this.Mb)-1,r=i>>8-this.Mb;return(e<<this.Mb)+r},t.prototype.getBit=function(t){if(!(t<0)){var n=this.Bb.get(y.floor((t+this.Mb)/8));if(void 0!==n)return(n&1<<7-this.Mb-t%8)>0?1:0}},p.defineProperty(t.prototype,"bitLength",{get:function(){return this.Bb.bitLength-this.Mb},enumerable:!1,configurable:!0}),p.defineProperty(t.prototype,"length",{get:function(){return this.Bb.length},enumerable:!1,configurable:!0})}();x(),pt(),x(),pt();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.Lb=t,this.Ob=0,this.Fb=0}return p.defineProperty(t.prototype,"totalBitsRead",{get:function(){return 8*this.Ob+this.Fb},enumerable:!1,configurable:!0}),p.defineProperty(t.prototype,"done",{get:function(){return this.Ob===this.Lb.length&&0===this.Fb},enumerable:!1,configurable:!0}),p.defineProperty(t.prototype,"location",{get:function(){return{byte:this.Ob,bit:this.Fb}},enumerable:!1,configurable:!0}),t.prototype.copy=function(){var n=new t(this.Lb);return n.seek(this.Ob,this.Fb),n},t.prototype.canReadBits=function(t){return 8*this.Ob+t+this.Fb<=8*this.Lb.length},t.prototype.canReadBytes=function(t){return 0===this.Fb?this.Ob+t<=this.Lb.length:this.Ob+t<this.Lb.length},t.prototype.incBit=function(){this.Fb++,this.Fb>7&&(this.Ob++,this.Fb=0)},t.prototype.seek=function(t,n){this.Ob=t,this.Fb=n},t.prototype.peekBit=function(){if(!this.canReadBits(1))throw new g("Cannot read past end of buffer.");return this.Lb.get(this.Ob)>>7-this.Fb&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.Fb)return this.Lb.get(this.Ob++);var t=gu(this.Lb.get(this.Ob),8-this.Fb),n=bu(this.Lb.get(this.Ob+1),this.Fb);return this.Ob++,t<<this.Fb|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.Fb&&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.Fb+t;this.Ob+=n>>3,this.Fb=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(),pt(),x(),pt(),x(),pt();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.Ub=[],this.Vb=[],this.Hb=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.Vb.length)this.Vb.push(0);else{var e=this.Vb[this.Vb.length-1]+this.Ub[this.Ub.length-1].length;this.Vb.push(e)}this.Ub.push(t.subarray(n,n+i)),this.Hb+=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.Ub;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.Ub=[],this.Vb=[],this.Hb=0},t.prototype.get=function(t){if(!(t<0||t>=this.length)){var n=this.findContainingBufferIndex(t),i=t-this.Vb[n];return this.Ub[n][i]}},p.defineProperty(t.prototype,"first",{get:function(){return this.get(0)},enumerable:!1,configurable:!0}),t.prototype.indexOf=function(t){if(this.Ub.length<1)return-1;if(this.Ub.length>1){var n=this.join();this.clear(),this.pushRange(n)}var i=this.Ub[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.Vb,t,pu)},t.prototype.join=function(){if(1===this.Ub.length)return this.Ub[0];var t=new k(this.length);return this.copyInternal(t,0),t},p.defineProperty(t.prototype,"length",{get:function(){return this.Hb},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.Ub[u],f=e,h=f-this.Vb[u];f+s.length-h<r;)o.pushRange(s,h,s.length-h),u+=1,h=(f+=s.length-h)-this.Vb[u],s=this.Ub[u];var c=r-f;return o.pushRange(s,h,c),o},t.prototype.trim=function(){if(0===this.length)return new t;for(var n=this.length-1,i=this.Ub.length-1,e=this.Ub[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.Ub[i]).length-1}else r-=1;n-=1}return this.slice(0,n+1)},t}(),_u=function(){function t(n){this.qb=n||t.BUFFER_CHUNK_SIZE,this.Wb=!1,this.zb=new yu,this.Lb=new k(this.qb),this.Gb=0,this.Xb=0,this.Fb=7}return t.prototype.closeByte=function(){this.Lb[this.Gb++]=this.Xb,this.Gb>=this.qb&&this.closeBuffer(),this.Xb=0,this.Fb=7},t.prototype.closeBuffer=function(t){void 0===t&&(t=!0),0!==this.Gb&&(this.zb.pushRange(this.Lb,0,this.Gb),t&&(this.Lb=new k(this.qb)),this.Gb=0)},p.defineProperty(t.prototype,"isWritingStartBit",{get:function(){return 7===this.Fb},enumerable:!1,configurable:!0}),t.prototype.close=function(){if(this.Wb)throw new g("Cannot close a closed BitWriter.");return this.isWritingStartBit||this.closeByte(),this.closeBuffer(!1),this.Wb=!0,this.zb},t.prototype.writeBit=function(t){if(this.Wb)throw new g("Cannot write to a closed BitWriter.");this.Xb|=t<<this.Fb,0===this.Fb?this.closeByte():this.Fb--},t.prototype.writeByte=function(t){if(this.Wb)throw new g("Cannot write to a closed BitWriter.");this.isWritingStartBit?(this.Xb=t,this.closeByte()):this.writeByteUnaligned(t)},t.prototype.writeByteUnaligned=function(t){var n=this.Fb;this.Xb|=bu(t,n+1),this.closeByte(),this.Xb=gu(t,8-n)<<n+1,this.Fb=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.Wb)throw new g("Cannot write to a closed BitWriter.");this.isWritingStartBit?this.writeBytesAligned(t):this.writeBytesUnaligned(t)},t.prototype.writeBytesAligned=function(t){this.Gb+t.length<=this.qb?(this.Lb.set(t,this.Gb),this.Gb+=t.length,this.Gb===this.qb&&this.closeBuffer()):(this.closeBuffer(),this.zb.pushRange(t))},t.prototype.writeBytesUnaligned=function(t){if(0!==t.length){var n=this.Fb;this.Xb|=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.Xb=e<<n+1|r,this.closeByte()}this.Xb=gu(t[t.length-1],8-n)<<n+1,this.Fb=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 k(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(),pt();var Su=function(){function t(t){this.rb=new yu,this.Xf=t}return t.prototype.closeWriter=function(){void 0!==this.Xf&&(this.rb=this.rb.concat(this.Xf.close()),this.Xf=void 0)},p.defineProperty(t.prototype,"writer",{get:function(){return void 0===this.Xf&&(this.Xf=new _u),this.Xf},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 ku(t,n){return B(t,Kn)?64===n:t<y.pow(2,n)}function Iu(t,n){return y.round(t*y.pow(2,n))}function Eu(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(),pt(),M();var Ou=function(t){function n(n,i,e){var r=t.call(this,n)||this;if(r.version=i,!ku(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.jb},set:function(t){this.jb=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(),pt(),x(),pt();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(),pt(),x(),pt();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(),pt();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 Fu(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=Fu(t,n,i),r=Fu(t,n,i),o=i?r:e,u=i?e:r;return Kn.fromBits(u,o,!0)}function Uu(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 128&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=e,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 k(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 k(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(),pt();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 Fu(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=Fu(t,n,i),r=Fu(t,n,i),o=i?r:e,u=i?e:r;return Kn.fromBits(u,o,!1)}(this.data,this.cursor)},t.prototype.nextUint64=function(){return Lu(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(Fu(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 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}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(!Mu(t,n,8)){return{complete:!1,neededOffset:o=n.offset+8}}var e=Fu(t,n),r=Uu(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=Lu(t,n).toNumber()}if("uuid"===r){if(!Mu(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 ju(Hu(t,i,u),new Xu(r.headerSize))};return n.seek(u),{complete:!0,box:f}}function $u(t){return{version:t>>24,flags:new Cu(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: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 ts(t){return new Nu(t.type,Vu(qu(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 du(n,t),p.defineProperty(n.prototype,"handlerType",{get:function(){return this.Qb},set:function(t){this.Qb=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 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}du(n,t),n.prototype.serializeReserved=function(t){t.writer.writeString("appl"),t.writer.writeUInt(0,32),t.writer.writeUInt(0,32)}}(ns);x(),pt(),x(),pt(),x(),pt();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.Kb},set:function(t){if(!ku(t,8))throw new g("Provided tag does not fit in 8 bits.");this.Kb=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(),pt();!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.Yb},set:function(t){if(!ku(t,8))throw new g("Provided objectTypeIndication does not fit in 8 bits.");this.Yb=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"streamType",{get:function(){return this.Jb},set:function(t){if(!ku(t,6))throw new g("Provided streamType does not fit in 6 bits.");this.Jb=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"bufferSizeDb",{get:function(){return this.Zb},set:function(t){if(!ku(t,24))throw new g("Provided bufferSizeDb does not fit in 24 bits.");this.Zb=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"maxBitrate",{get:function(){return this.$b},set:function(t){if(!ku(t,32))throw new g("Provided maxBitrate does not fit in 32 bits.");this.$b=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"avgBitrate",{get:function(){return this.tA},set:function(t){if(!ku(t,32))throw new g("Provided avgBitrate does not fit in 32 bits.");this.tA=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(),pt();!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))}}(es);x(),pt(),x(),pt();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 du(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}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.iA},set:function(t){if(!ku(t,16))throw new g("Provided esId does not fit in 16 bits.");this.iA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"streamPriority",{get:function(){return this.eA},set:function(t){if(!ku(t,5))throw new g("Provided streamPriority does not fit in 5 bits.");this.eA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"dependsOnEsId",{get:function(){return this.sA},set:function(t){if(t&&!ku(t,16))throw new g("Provided dependsOnEsId does not fit in 16 bits.");this.sA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"ocrEsId",{get:function(){return this.nA},set:function(t){if(t&&!ku(t,16))throw new g("Provided ocrEsId does not fit in 16 bits.");this.nA=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(),pt(),x(),pt(),x(),pt(),x(),pt(),x(),pt();var os=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),us=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}(os),ss=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.rA},set:function(t){if(!ku(t,16))throw new g("Provided dataReferenceIndex does not fit in 16 bits.");this.rA=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 du(n,t),p.defineProperty(n.prototype,"channelCount",{get:function(){return this.oA},set:function(t){if(!ku(t,16))throw new g("Provided channelCount does not fit in 16 bits.");this.oA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"sampleSize",{get:function(){return this.hA},set:function(t){if(!ku(t,16))throw new g("Provided sampleSize does not fit in 16 bits.");this.hA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"sampleRate",{get:function(){return this.aA},set:function(t){if(!ku(Iu(t,16),32))throw new g("Provided rate does not fit in 32 bits (fixed 16.16).");this.aA=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&&Eu(n.writer,this.extra)},n}(ss);x(),pt();!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.uA},set:function(t){if(!ku(t.length,32))throw new g("Number of allowed entries cannot fit in 32 bits.");if(t.some(function(t){return!ku(t,32)}))throw new g("Not all entries can be represented in 32 bits.");this.uA=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(),pt();!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.cA},set:function(t){if(!ku(t,32))throw new g("Provided cleanApertureWidthN does not fit in 32 bits.");this.cA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"cleanApertureWidthD",{get:function(){return this.dA},set:function(t){if(!ku(t,32))throw new g("Provided cleanApertureWidthD does not fit in 32 bits.");this.dA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"cleanApertureHeightN",{get:function(){return this.lA},set:function(t){if(!ku(t,32))throw new g("Provided cleanApertureHeightN does not fit in 32 bits.");this.lA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"cleanApertureHeightD",{get:function(){return this.fA},set:function(t){if(!ku(t,32))throw new g("Provided cleanApertureHeightD does not fit in 32 bits.");this.fA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"horizOffN",{get:function(){return this.vA},set:function(t){if(!ku(t,32))throw new g("Provided horizOffN does not fit in 32 bits.");this.vA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"horizOffD",{get:function(){return this._A},set:function(t){if(!ku(t,32))throw new g("Provided horizOffD does not fit in 32 bits.");this._A=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"vertOffN",{get:function(){return this.gA},set:function(t){if(!ku(t,32))throw new g("Provided vertOffN does not fit in 32 bits.");this.gA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"vertOffD",{get:function(){return this.mA},set:function(t){if(!ku(t,32))throw new g("Provided vertOffD does not fit in 32 bits.");this.mA=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(),pt();!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.uA},set:function(t){if(!ku(t.length,32))throw new g("Number of allowed entries cannot fit in 32 bits.");if(t.some(function(t){return!ku(t.sampleCount,32)||!ku(t.sampleOffset,32)}))throw new g("Not all entries can be represented in 64 bits.");this.uA=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(),pt();!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.pA},set:function(t){this.flags=void 0===t?1:0,this.pA=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(),pt();!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.pA},set:function(t){if(1&this.flags)throw new g("The moov containment flag is set, a DataEntryUrlBox should be used instead.");this.pA=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(),pt();!function(t){function n(){return t.call(this,"dinf")||this}du(n,t)}(us);x(),pt(),x(),pt();var hs=function(t){function n(n,i,e){var r=t.call(this,n)||this;if(r.version=i,!ku(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.jb},set:function(t){this.jb=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}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(),pt(),x(),pt();var cs=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.uA},set:function(t){for(var n=0,i=t;n<i.length;n++){var e=i[n];if(!ku(e.segmentDuration,this.bitSize))throw new g("SegmentDuration of one of the entries does not fit in ".concat(this.bitSize," bits."));if(!ku(e.mediaTime,this.bitSize))throw new g("MediaTime of one of the entries does not fit in ".concat(this.bitSize," bits."));if(!ku(e.mediaRateInteger,16))throw new g("Provided mediaRateInteger does not fit in 16 bits.");if(e.mediaRateFraction&&!ku(e.mediaRateFraction,16))throw new g("Provided mediaRateFraction does not fit in 16 bits.")}this.uA=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),as=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}(cs),vs=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}(cs);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,h=void 0;0===e?(f=n.nextUint32(),h=n.nextInt32()):(f=n.nextUint64(),h=n.nextInt64());var c=n.nextInt16(),a=n.nextInt16();u.push({segmentDuration:f,mediaTime:h,mediaRateFraction:a,mediaRateInteger:c})}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 du(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];Yu(r,"elst")?n.boxes.push(ds(r)):n.boxes.push(ts(r))}return n}x(),pt(),x(),pt();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 du(n,t),p.defineProperty(n.prototype,"majorBrand",{get:function(){return this.wA},set:function(t){if(4!==t.length)throw new g("the provided major brand does not conform to the 4 character requirement");this.wA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"minorVersion",{get:function(){return this.yA},set:function(t){if(!ku(t,32))throw new g("the provided minor version does not fit in 32 bits.");this.yA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"compatibleBrands",{get:function(){return this.bA},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.bA=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)}(bs);x(),pt();!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(),pt(),x(),pt();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 du(n,t),p.defineProperty(n.prototype,"creationTime",{get:function(){return this.AA},set:function(t){if(!ku(t,this.bitSize))throw new g("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.AA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"modificationTime",{get:function(){return this.SA},set:function(t){if(!ku(t,this.bitSize))throw new g("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.SA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"timescale",{get:function(){return this.TA},set:function(t){if(!ku(t,32))throw new g("Provided sequence number does not fit in 32 bits.");this.TA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"duration",{get:function(){return this.md},set:function(t){if(!ku(t,this.bitSize))throw new g("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.md=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"language",{get:function(){return this.kA},set:function(t){if(!_s(t))throw new g("Expected an ISO-639-2/T language code");this.kA=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),ms=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}(gs),ps=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}(gs);function ys(t){var n=t.data,i=$u(n.nextUint32()),e=i.version,r=i.flags,o=Zu(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 h=s.map(function(t){return String.fromCharCode(t+96)}).join("");return _s(h)||(h="und"),n.skip(2),0===e?new ms(o,h,r.raw):new ps(o,h,r.raw)}function _s(t){return/^[a-z]{3}$/.test(t)}var Ss=function(t){function n(){return t.call(this,"mdia")||this}return du(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];Yu(r,"mdhd")?n.boxes.push(ys(r)):Yu(r,"hdlr")?n.boxes.push(is(r)):n.boxes.push(ts(r))}return n}x(),pt();!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(),pt();!function(t){function n(){return t.call(this,"minf")||this}du(n,t)}(us);x(),pt();var ks;!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(),pt(),x(),pt(),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"}(ks||(ks={})),x(),pt();var Is,Es,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(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 Ns(t,n){var i,e,r,o;n.writer.writeUInt(null!==(i=t.isLeading)&&void 0!==i?i:Is.UNKNOWN,2),n.writer.writeUInt(null!==(e=t.sampleDependsOn)&&void 0!==e?e:Es.UNKNOWN,2),n.writer.writeUInt(null!==(r=t.sampleIsDependedOn)&&void 0!==r?r:Es.UNKNOWN,2),n.writer.writeUInt(null!==(o=t.sampleHasRedundancy)&&void 0!==o?o:Es.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(),pt(),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"}(Is||(Is={})),function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.YES=1]="YES",t[t.NO=2]="NO",t[t.RESERVED=3]="RESERVED"}(Es||(Es={})),x(),pt(),x(),pt();var As=function(){};x(),pt(),x(),pt(),x(),pt();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 du(n,t),p.defineProperty(n.prototype,"systemId",{get:function(){return this.EA},set:function(t){if(16!==t.length)throw new g("Provided systemId length is not 16.");this.EA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"data",{get:function(){return this.Lp},set:function(t){if(!ku(t.length,32))throw new g("Provided data length does not fit in 32 bits.");this.Lp=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),Cs=function(t){function n(n,i){return t.call(this,0,n,i)||this}return du(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 du(n,t),p.defineProperty(n.prototype,"kIds",{get:function(){return this.xA},set:function(t){if(!ku(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.xA=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}(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(),pt(),x(),pt();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 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.PA},set:function(t){if(!ku(t,this.bitSize))throw new g("The provided fragmentDuration does not fit in ".concat(this.bitSize," bits."));this.PA=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.bitSize/8},n}(Ou),Fs=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}(Ms),Ls=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}(Ms);function Us(t){var n=t.data,i=$u(n.nextUint32()),e=i.version,r=i.flags;return 0===e?new Fs(n.nextUint32(),r.raw):new Ls(n.nextUint64(),r.raw)}x(),pt();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 du(n,t),p.defineProperty(n.prototype,"trackId",{get:function(){return this.RA},set:function(t){if(!ku(t,32))throw new g("Provided track id does not fit in 32 bits.");this.RA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"defaultSampleDescriptionIndex",{get:function(){return this.IA},set:function(t){if(!ku(t,32))throw new g("Provided default sample description index does not fit in 32 bits.");this.IA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"defaultSampleDuration",{get:function(){return this.CA},set:function(t){if(!ku(t,32))throw new g("Provided default sample duration does not fit in 32 bits.");this.CA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"defaultSampleSize",{get:function(){return this.DA},set:function(t){if(!ku(t,32))throw new g("Provided default sample size does not fit in 32 bits.");this.DA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"defaultSampleFlags",{get:function(){return this.NA},set:function(t){if((null==t?void 0:t.samplePaddingValue)&&!ku(t.samplePaddingValue,3))throw new g("Provided sample padding value does not fit in 3 bits.");if((null==t?void 0:t.sampleDegradationPriority)&&!ku(t.sampleDegradationPriority,16))throw new g("Provided sample degradation priority does not fit in 16 bits.");this.NA=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}(Ou);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(),h=Ju(new mu(yu.from(n.nextUint8Array(4))));return new zs(o,{sampleDescriptionIndex:u,sampleDuration:s,sampleSize:f,sampleFlags:h},e,r.raw)}var Vs=function(t){function n(){return t.call(this,"mvex")||this}return du(n,t),n}(us);function Hs(t){for(var n=new Vs,i=0,e=Ku(t.data);i<e.length;i++){var r=e[i];Yu(r,"mehd")?n.boxes.push(Us(r)):Yu(r,"trex")?n.boxes.push(Ws(r)):n.boxes.push(ts(r))}return n}x(),pt();var qs=function(t){function n(i,e,r,o,u){void 0===u&&(u=0);var s,f,h,c=this;return(c=t.call(this,"mvhd",o,u)||this).creationTime=i.creation,c.modificationTime=i.modification,c.timescale=i.scale,c.duration=i.duration,c.rate=null!==(s=r.rate)&&void 0!==s?s:n.DEFAULT_RATE,c.volume=null!==(f=r.volume)&&void 0!==f?f:n.DEFAULT_VOLUME,c.matrix=null!==(h=r.matrix)&&void 0!==h?h:Rs,c.BA=e,c}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.AA},set:function(t){if(!ku(t,this.bitSize))throw new g("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.AA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"modificationTime",{get:function(){return this.SA},set:function(t){if(!ku(t,this.bitSize))throw new g("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.SA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"timescale",{get:function(){return this.TA},set:function(t){if(!ku(t,32))throw new g("Provided sequence number does not fit in 32 bits.");this.TA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"duration",{get:function(){return this.md},set:function(t){if(!ku(t,this.bitSize))throw new g("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.md=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"rate",{get:function(){return this.MA},set:function(t){if(!ku(Iu(t,16),32))throw new g("Provided rate does not fit in 32 bits (fixed 16.16).");this.MA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"volume",{get:function(){return this.LA},set:function(t){if(!ku(Iu(t,8),16))throw new g("Provided volume does not fit in 16 bits (fixed 8.8).");this.LA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"matrix",{get:function(){return this.OA},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.OA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"nextTrackId",{get:function(){return this.BA},set:function(t){if(0===t)throw new g("NextTrackId cannot be 0.");if(!ku(t,32))throw new g("NextTrackId cannot exceed 32 bits.");this.BA=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),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}(Ou),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 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}(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 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}(qs);function Ys(t){var n=t.data,i=$u(n.nextUint32()),e=i.version,r=i.flags,o=Zu(n,e),u=Ru(n.nextUint32(),16),s=Ru(n.nextUint16(),8);n.skip(2),n.skip(8);var f=Qu(n);n.skip(24);var h=n.nextUint32();return 0===e?new Xs(o,h,{rate:u,volume:s,matrix:f},r.raw):new js(o,h,{rate:u,volume:s,matrix:f},r.raw)}x(),pt(),x(),pt();var Ks=function(t){function n(n,i,e,r,o,u,s){void 0===s&&(s={});var f,h,c,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!==(h=s.alternateGroup)&&void 0!==h?h:0,a.matrix=null!==(c=s.matrix)&&void 0!==c?c:Rs,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.AA},set:function(t){if(!ku(t,this.bitSize))throw new g("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.AA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"modificationTime",{get:function(){return this.SA},set:function(t){if(!ku(t,this.bitSize))throw new g("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.SA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"trackId",{get:function(){return this.RA},set:function(t){if(0===t)throw new g("trackId cannot be 0.");if(!ku(t,32))throw new g("trackId cannot exceed 32 bits.");this.RA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"duration",{get:function(){return this.md},set:function(t){if(!ku(t,this.bitSize))throw new g("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.md=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"volume",{get:function(){return this.LA},set:function(t){if(!ku(Iu(t,8),16))throw new g("Provided volume does not fit in 16 bits (fixed 8.8).");this.LA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"width",{get:function(){return this._c},set:function(t){if(!ku(Iu(t,16),32))throw new g("Provided width does not fit in 32 bits (fixed 16.16).");this._c=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"height",{get:function(){return this.xc},set:function(t){if(!ku(Iu(t,16),32))throw new g("Provided height does not fit in 32 bits (fixed 16.16).");this.xc=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"layer",{get:function(){return this.FA},set:function(t){if(!ku(t,16))throw new g("Provided layer does not fit in 16 bits.");this.FA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"alternateGroup",{get:function(){return this.UA},set:function(t){if(!ku(t,16))throw new g("Provided alternateGroup does not fit in 16 bits.");this.UA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"matrix",{get:function(){return this.OA},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.OA=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),Os(this.matrix,n),n.writer.writeUInt(Iu(this.width,16),32),n.writer.writeUInt(Iu(this.height,16),32)},n}(Ou),Gs=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}(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 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}(Ks);function Zs(t){var n,i,e,r,o=t.data,u=$u(o.nextUint32()),s=u.version,f=u.flags,h=f.isSet(8),c=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=Qu(o),g=Ru(o.nextUint32(),16),m=Ru(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:h,trackEnabled:v,trackInPreview:c,trackInMovie:a}):new $s({creation:n,modification:i,duration:r},e,w,g,m,{layer:d,matrix:b,alternateGroup:l,trackSizeIsAspectRatio:h,trackEnabled:v,trackInPreview:c,trackInMovie:a})}var Js=function(t){function n(){return t.call(this,"trak")||this}return du(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];Yu(r,"tkhd")?n.boxes.push(Zs(r)):Yu(r,"mdia")?n.boxes.push(Ts(r)):Yu(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 du(n,t),n}(us);x(),pt(),x(),pt(),x(),pt();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 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.VA},set:function(t){if(!ku(t,this.bitSize))throw new g("Provided baseMediaDecodeTime 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),ef=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}(nf),rf=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}(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(),pt();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 du(n,t),p.defineProperty(n.prototype,"trackId",{get:function(){return this.RA},set:function(t){if(!ku(t,32))throw new g("Provided track id does not fit in 32 bits.");this.RA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"baseDataOffset",{get:function(){return this.HA},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&&!ku(t,64))throw new g("Provided baseDataOffset does not fit in 32 bits.");this.HA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"sampleDescriptionIndex",{get:function(){return this.qA},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&&!ku(t,32))throw new g("Provided sampleDescriptionIndex does not fit in 32 bits.");this.qA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"defaultSampleDuration",{get:function(){return this.CA},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&&!ku(t,32))throw new g("Provided defaultSampleDuration does not fit in 32 bits.");this.CA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"defaultSampleSize",{get:function(){return this.DA},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&&!ku(t,32))throw new g("Provided defaultSampleSize does not fit in 32 bits.");this.DA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"defaultSampleFlags",{get:function(){return this.NA},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)&&!ku(t.samplePaddingValue,3))throw new g("Provided sample padding value does not fit in 3 bits.");if((null==t?void 0:t.sampleDegradationPriority)&&!ku(t.sampleDegradationPriority,16))throw new g("Provided sample degradation priority does not fit in 16 bits.");this.NA=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}(Ou);function sf(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 h=Boolean(e.readBit()),c=Boolean(e.readBit()),a=n.nextUint32(),v=c?n.nextUint64():void 0,d=h?n.nextUint32():void 0,l=f?n.nextUint32():void 0,w=s?n.nextUint32():void 0,b=u?Ju(new mu(yu.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(),pt();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 du(n,t),p.defineProperty(n.prototype,"dataOffset",{get:function(){return this.WA},set:function(t){if(t&&!ku(t,32))throw new g("Provided data offset does not fit in 32 bits.");this.WA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"firstSampleFlags",{get:function(){return this.zA},set:function(t){if((null==t?void 0:t.samplePaddingValue)&&!ku(t.samplePaddingValue,3))throw new g("Provided sample padding value does not fit in 3 bits.");if((null==t?void 0:t.sampleDegradationPriority)&&!ku(t.sampleDegradationPriority,16))throw new g("Provided sample degradation priority does not fit in 16 bits.");this.zA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"samples",{get:function(){return this.GA},set:function(t){var n,i;if(!ku(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&&!ku(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&&!ku(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)&&!ku(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)&&!ku(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&&!ku(o.compositionTimeOffset,32))throw new g("Provided sample compositionTimeOffset does not fit in 32 bits.")}this.GA=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}(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 h=Boolean(e.readBit()),c=n.nextUint32(),a={sampleDurationPresent:s,sampleSizePresent:u,sampleFlagsPresent:o,sampleCompositionTimeOffsetsPresent:r};h&&(a.dataOffset=n.nextInt32()),f&&(a.firstSampleFlags=Ju(new mu(yu.from(n.nextUint8Array(4)))));for(var v=[],d=0;d<c;d++){var l={};s&&(l.duration=n.nextUint32()),u&&(l.size=n.nextUint32()),o&&(l.flags=Ju(new mu(yu.from(n.nextUint8Array(4))))),r&&(l.compositionTimeOffset=0===i?n.nextUint32():n.nextInt32()),v.push(l)}return new ff(i,a,v)}var cf=function(t){function n(){return t.call(this,"traf")||this}return du(n,t),n}(us);function af(t){for(var n=new cf,i=0,e=Ku(t.data);i<e.length;i++){var r=e[i];Yu(r,"tfhd")?n.boxes.push(sf(r)):Yu(r,"tfdt")?n.boxes.push(of(r)):Yu(r,"trun")?n.boxes.push(hf(r)):n.boxes.push(ts(r))}return n}var vf=function(t){function n(){return t.call(this,"moof")||this}return du(n,t),n}(us);x(),pt();!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.XA},set:function(t){if(!ku(t,32))throw new g("Provided sequence number does not fit in 32 bits.");this.XA=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(),pt();var df=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.jA},set:function(t){if(4!==t.length)throw new g("Provided coding name was not 4 characters long.");this.jA=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return 4},n.prototype.serializeBoxContent=function(t){t.writer.writeString(this.codingName)},n}(Tu);x(),pt();!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.QA},set:function(t){if(!ku(t,32))throw new g("Provided hSpacing does not fit in 32 bits.");this.QA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"vSpacing",{get:function(){return this.KA},set:function(t){if(!ku(t,32))throw new g("Provided vSpacing does not fit in 32 bits.");this.KA=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(),pt();!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())}}(us);x(),pt();!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}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(),pt();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 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.uA},set:function(t){var n=this;if(!ku(t.length,32))throw new g("Number of entries provided does not fit in 32 bits.");if(t.some(function(t){return!ku(t,n.bitSize)}))throw new g("Not all provided entries fit in ".concat(this.bitSize," bits."));this.uA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"explicitAuxInfoType",{get:function(){return this.YA},set:function(t){if(void 0===t)this.flags=0;else{if(!ku(t.auxInfoType,32))throw new g("Provided auxInfoType does not fit in 32 bits.");if(!ku(t.auxInfoTypeParameter,32))throw new g("Provided auxInfoTypeParameter does not fit in 32 bits.");this.flags=1}this.YA=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)}}})(lf),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)}}}(lf);x(),pt();!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.JA},set:function(t){if(!ku(t,8))throw new g("Provided defaultSampleInfoSize does not fit in a single byte.");this.JA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"sampleInfoSizes",{get:function(){return this.ZA},set:function(t){if(!ku(t.length,32))throw new g("Number of sampleInfoSizes provided does not fit in 32 bits.");if(t.some(function(t){return!ku(t,8)}))throw new g("Not all provided sampleInfoSizes fit in a byte.");this.ZA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"explicitAuxInfoType",{get:function(){return this.YA},set:function(t){if(void 0===t)this.flags=0;else{if(!ku(t.auxInfoType,32))throw new g("Provided auxInfoType does not fit in 32 bits.");if(!ku(t.auxInfoTypeParameter,32))throw new g("Provided auxInfoTypeParameter does not fit in 32 bits.");this.flags=1}this.YA=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(),pt();!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++){Ns(e[i],n)}}}(Ou);x(),pt();!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(),pt();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 du(n,t),p.defineProperty(n.prototype,"groupingType",{get:function(){return this.$A},set:function(t){if(4!==t.length)throw new g("The provided groupingType does not equal 4 characters.");this.$A=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){}})(wf),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.tS},set:function(t){if(!ku(t,32))throw new g("The provided defaultLength does not fit in 32 bits.");this.tS=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}du(n,t),p.defineProperty(n.prototype,"defaultSampleDescriptionIndex",{get:function(){return this.IA},set:function(t){if(!ku(t,32))throw new g("The provided defaultSampleDescriptionIndex does not fit in 32 bits.");this.IA=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(),pt();(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.iS},set:function(t){if(!ku(t.length,32))throw new g("Number of allowed samples cannot fit in 32 bits.");if(t.some(function(t){return!ku(t,32)}))throw new g("Not all sampleSizes can be represented in 32 bits.");this.iS=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.DA},set:function(t){if(!ku(t,32))throw new g("Provided defaultSampleSize does not fit in 32 bits.");this.DA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"samples",{get:function(){return this.GA},set:function(t){if(!ku(t,32))throw new g("Number of allowed samples cannot fit in 32 bits.");this.GA=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(),pt();!function(t){function n(){return t.call(this,"stbl")||this}du(n,t)}(us);x(),pt();!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.uA},set:function(t){if(!ku(t.length,32))throw new g("Number of allowed entries cannot fit in 32 bits.");if(t.some(function(t){return!ku(t.firstChunk,32)||!ku(t.sampleDescriptionIndex,32)||!ku(t.samplesPerChunk,32)}))throw new g("Not all entries can be represented in 96 bits.");this.uA=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(),pt();!function(t){function n(){return t.call(this,"schi")||this}du(n,t)}(us);x(),pt();!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.eS},set:function(t){if(4!==t.length)throw new g("The provided schemeType does not have a length of 4.");this.eS=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"schemeVersion",{get:function(){return this.sS},set:function(t){if(!ku(t,32))throw new g("The provided schemeVersion does not fit in 23 bits.");this.sS=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"schemeUri",{get:function(){return this.nS},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.nS=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(),pt();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 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.rS},set:function(t){if(!ku(t,32))throw new g("Provided referenceId does not fit in 32 bits.");this.rS=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"timescale",{get:function(){return this.TA},set:function(t){if(!ku(t,32))throw new g("Provided timescale does not fit in 32 bits.");this.TA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"earliestPresentationTime",{get:function(){return this.oS},set:function(t){if(!ku(t,this.bitSize))throw new g("Provided earliestPresentationTime does not fit in ".concat(this.bitSize," bits."));this.oS=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"firstOffset",{get:function(){return this.hS},set:function(t){if(!ku(t,this.bitSize))throw new g("Provided timescale does not fit in ".concat(this.bitSize," bits."));this.hS=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"references",{get:function(){return this.aS},set:function(t){if(!ku(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(!ku(e.referencedSize,31))throw new g("Provided referenced size does not fit in 31 bits.");if(!ku(e.subsegmentDuration,32))throw new g("Provided subsegment duration does not fit in 31 bits.");if(!ku(e.sapType,3))throw new g("Provided SAP type does not fit in 3 bits.");if(!ku(e.sapDeltaTime,28))throw new g("Provided SAP delta time does not fit in 28 bits.")}this.aS=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),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 du(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 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}(bf);x(),pt();!function(t){function n(n,i,e){return t.call(this,"styp",n,i,e)||this}du(n,t)}(bs);x(),pt();!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.uS},set:function(t){if(t<-1||t>1)throw new g("Provided balance does not fit in the allowed range [-1, 1].");if(!ku(Iu(t,8),16))throw new g("Provided balance does not fit in 16 bits (fixed 8.8).");this.uS=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(),pt();!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.uA},set:function(t){if(!ku(t.length,32))throw new g("Number of allowed entries cannot fit in 32 bits.");if(t.some(function(t){return!ku(t,32)}))throw new g("Not all entries can be represented in 32 bits.");this.uA=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(),pt();!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.uA},set:function(t){if(!ku(t.length,32))throw new g("Number of allowed entries cannot fit in 32 bits.");if(t.some(function(t){return!ku(t.sampleCount,32)||!ku(t.sampleDelta,32)}))throw new g("Not all entries can be represented in 64 bits.");this.uA=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(),pt();!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.RA},set:function(t){if(!ku(t,32))throw new g("The provided trackId does not fit in 32 bits.");this.RA=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(),pt();!function(t){function n(){return t.call(this,"udta")||this}du(n,t)}(us);x(),pt();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}du(n,t),p.defineProperty(n.prototype,"opColor",{get:function(){return this.cS},set:function(t){if(!ku(t.red,16)||!ku(t.green,16)||!ku(t.blue,16))throw new g("Not all colors could be represented in 16 bits.");this.cS=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(),pt();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,h,c,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!==(h=r.frameCount)&&void 0!==h?h:1,a.depth=null!==(c=r.depth)&&void 0!==c?c: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._c},set:function(t){if(!ku(t,16))throw new g("Provided width does not fit in 16 bits.");this._c=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"height",{get:function(){return this.xc},set:function(t){if(!ku(t,16))throw new g("Provided height does not fit in 16 bits.");this.xc=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"horizontalResolution",{get:function(){return this.dS},set:function(t){if(!ku(Iu(t,16),32))throw new g("Provided horizontalResolution does not fit in 32 bits (fixed 16.16).");this.dS=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"verticalResolution",{get:function(){return this.lS},set:function(t){if(!ku(Iu(t,16),32))throw new g("Provided verticalResolution does not fit in 32 bits (fixed 16.16).");this.lS=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"compressorName",{get:function(){return this.fS},set:function(t){if(t.length>31)throw new g("The provided compressorName should at most be 31 characters long.");this.fS=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"frameCount",{get:function(){return this.vS},set:function(t){if(!ku(t,16))throw new g("Provided frameCount does not fit in 16 bits.");this.vS=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"depth",{get:function(){return this._S},set:function(t){if(!ku(t,16))throw new g("Provided depth does not fit in 16 bits.");this._S=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&&Eu(n.writer,this.extra)},n}(ss);x(),pt(),x(),pt(),M();!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)+(B(this.esDescriptor,k)?this.esDescriptor.length:this.esDescriptor.getSize())},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),B(this.esDescriptor,k)?n.concat(yu.from(this.esDescriptor)):this.esDescriptor.serialize(n)}}(Ou);x(),pt();!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())}}(fs);x(),pt();!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)}}(yf);x(),pt();!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)}}(ss);x(),pt(),x(),pt();!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(),pt();!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.gS},set:function(t){if(!ku(t,8))throw new g("Provided version does not fit in 8 bits.");this.gS=t},enumerable:!1,configurable:!0}),p.defineProperty(t.prototype,"profileIndication",{get:function(){return this.mS},set:function(t){if(!ku(t,8))throw new g("Provided profileIndication does not fit in 8 bits.");this.mS=t},enumerable:!1,configurable:!0}),p.defineProperty(t.prototype,"profileCompatibility",{get:function(){return this.pS},set:function(t){if(!ku(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.wS},set:function(t){if(!ku(t,8))throw new g("Provided levelIndication does not fit in 8 bits.");this.wS=t},enumerable:!1,configurable:!0}),p.defineProperty(t.prototype,"spsSets",{get:function(){return this.yS},set:function(t){if(!ku(t.length,5))throw new g("Provided number of spsSets exceeds the max (32)");this.yS=t},enumerable:!1,configurable:!0}),p.defineProperty(t.prototype,"ppsSets",{get:function(){return this.bS},set:function(t){if(!ku(t.length,8))throw new g("Provided number of ppsSets exceeds the max (256)");this.bS=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(),pt();!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())}}(yf);x(),pt();!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.Zb},set:function(t){if(!ku(t,32))throw new g("Provided bufferSizeDb does not fit in 32 bits.");this.Zb=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"max",{get:function(){return this.SS},set:function(t){if(!ku(t,32))throw new g("Provided max does not fit in 32 bits.");this.SS=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"avg",{get:function(){return this.TS},set:function(t){if(!ku(t,32))throw new g("Provided avg does not fit in 32 bits.");this.TS=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(),pt(),x(),pt(),x(),pt();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 k(0),s}return du(n,t),p.defineProperty(n.prototype,"isProtected",{get:function(){return this.kS},set:function(t){if(!ku(t,8))throw new g("Provided isProtected does not fit in 1 byte.");this.kS=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"perSampleIvSize",{get:function(){return this.ES},set:function(t){if(![8,16].includes(t))throw new g("Provided perSampleIvSize does not match any allowed value [8, 16].");this.ES=t,this.xS=new k(0)},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"kId",{get:function(){return this.PS},set:function(t){if(16!==t.length)throw new g("Provided kId length is not 16.");this.PS=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"constantIv",{get:function(){return this.xS},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.xS=t,this.ES=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),Eu(t.writer,this.kId),0===this.perSampleIvSize&&(t.writer.writeByte(this.constantIv.length),Eu(t.writer,this.constantIv))},n}(Ou),Sf=(function(t){function n(n){return t.call(this,0,n)||this}du(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 du(n,t),p.defineProperty(n.prototype,"cryptByteBlocks",{get:function(){return this.RS},set:function(t){if(!ku(t,4))throw new g("Provided cryptByteBlocks does not fit in 4 bits.");this.RS=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"skipByteBlocks",{get:function(){return this.IS},set:function(t){if(!ku(t,4))throw new g("Provided skipByteBlocks does not fit in 4 bits.");this.IS=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}du(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 kf(t){return void 0!==t.subsamples}x(),pt();!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.GA},set:function(t){var n;if(!ku(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=kf(r)),!0===n&&!kf(r)||!1===n&&kf(r))throw new g("Mix of samples with and without subsamples detected.");if(kf(r)){if(!ku(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(!ku(s.clearData,16))throw new g("Subsample clearData of one of the provided samples does not fit in 16 bits.");if(!ku(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.GA=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),kf(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)&&Eu(n.writer,r.iv),kf(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(),pt(),x(),pt();!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.TA},set:function(t){if(!ku(t,32))throw new g("The provided timescale does not fit in 32 bits.");this.TA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"presentationTimeDelta",{get:function(){return this.CS},set:function(t){if(!ku(t,32))throw new g("The provided presentationTimeDelta does not fit in 32 bits.");this.CS=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"eventDuration",{get:function(){return this.DS},set:function(t){if(!ku(t,32))throw new g("The provided eventDuration does not fit in 32 bits.");this.DS=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"id",{get:function(){return this.NS},set:function(t){if(!ku(t,32))throw new g("The provided id does not fit in 32 bits.");this.NS=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(),pt(),x(),pt(),x(),pt();!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 If(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=Gu(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)}}If("moov",function(t){for(var n=new tf,i=0,e=Ku(t.data);i<e.length;i++){var r=e[i];Yu(r,"mvhd")?n.boxes.push(Ys(r)):Yu(r,"trak")?n.boxes.push(Qs(r)):Yu(r,"mvex")?n.boxes.push(Hs(r)):Yu(r,"pssh")?n.boxes.push(Bs(r)):n.boxes.push(ts(r))}return n}),If("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 h=e.nextUint16(),c=[],a=0;a<h;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);c.push({referenceType:d,referencedSize:l,subsegmentDuration:w,startsWithSap:b,sapType:g,sapDeltaTime:m})}return 0===o?new gf(s,f,n,i,c,u.raw):new mf(s,f,n,i,c,u.raw)}),If("moof",function(t){for(var n=new vf,i=0,e=Ku(t.data);i<e.length;i++){var r=e[i];Yu(r,"traf")?n.boxes.push(af(r)):Yu(r,"pssh")?n.boxes.push(Bs(r)):n.boxes.push(ts(r))}return n});var Ef=If("pssh",Bs),Rf=function(t){function n(n,i){var e;(e=t.call(this)||this).FS=void 0,e.XS=void 0,e.US=void 0,e.HS=void 0,e.Bf=void 0,e.qS=void 0,e.jS=void 0,e.QS=void 0,e.KS=void 0,e.FS=n,e.XS=i,e.HS=!1,e.jS=function(){e.zS()},e.QS=function(t){e.Co(new Do(e,t.messageType,hu(e.XS,t.message)))},e.KS=function(){e.HS=!0,e.US.Tb>0&&(e.US.Ib(),e.Co(new Ao(e.US))),e.FS.removeEventListener("keystatuseschange",e.jS),e.FS.removeEventListener("message",e.QS)},e.FS.addEventListener("keystatuseschange",e.jS),e.FS.addEventListener("message",e.QS),e.US=new su;var r=[];return e.FS.closed&&r.push(tt.resolve(e.FS.closed)),e.qS=new fu,r.push(e.qS.Od),e.Bf=tt.race(r).then(e.KS,e.KS),e.zS(),e}Tt(n,t);var i=n.prototype;return i.Qs=function(){if(this.HS)return this.Bf;var t=[];return t.push(tt.resolve(this.FS.close())),t.push(yn(1e3)),this.qS.jm(tt.race(t).catch(Of)),this.HS=!0,this.Bf},i.WS=function(t,n,i){if(Ht.H_){var e=Ef(Jo(n));if(1===e.version)n=new Cs(e.systemId,e.data).serialize().join()}return tt.resolve(this.FS.generateRequest(t,n)).catch(Of)},i.Un=function(t){return tt.resolve(this.FS.load(t)).catch(Of)},i.cc=function(){return tt.resolve(this.FS.remove()).catch(Of)},i.rr=function(t){return tt.resolve(this.FS.update(t)).catch(Of)},i.zS=function(){var t=this;this.US.Ib(),this.FS.keyStatuses.forEach(function(n,i){t.GS(i,n)}),this.Co(new Ao(this.US))},i.GS=function(t,n){if("string"==typeof t){var i=t;t=n,n=i}var e=Jo(t);if(this.XS===to&&16===e.byteLength&&(Ht.rg||Ht.nm)){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.XS===to&&"status-pending"===n&&(n="usable"),this.US.Pb(e,n)},It(n,[{key:"MS",get:function(){return this.Bf}},{key:"LS",get:function(){return this.FS.expiration}},{key:"ob",get:function(){return this.US}},{key:"VS",get:function(){return this.FS.sessionId}}]),n}(Eo);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 au(t.message,void 0,n,t)}var Nf=function(){function t(t,n,i){this.JS=void 0,this.ZS=void 0,this.iT=void 0,this.JS=t,this.ZS=n,this.iT=i}var n=t.prototype;return n.YS=function(t){return nn(function(){return en(this,function(n){return[2,new Rf(this.JS.createSession(t),this.ZS)]})}).call(this)},n.$S=function(t){return tt.resolve(this.JS.setServerCertificate(t))},n.xn=function(t){return tt.resolve(t.setMediaKeys(this.JS))},n.tT=function(t){return tt.resolve(t.setMediaKeys(null))},n.ur=function(){return tt.resolve()},t}(),Pf=function(){function t(t,n,i){this.eT=void 0,this.XS=void 0,this.nT=void 0,this.eT=t,this.XS=n,this.nT=i}var n=t.prototype;return n.sT=function(){return nn(function(){var t;return en(this,function(n){switch(n.label){case 0:return[4,this.eT.createMediaKeys()];case 1:return t=n.sent(),[2,new Nf(t,this.XS,this.nT)]}})}).call(this)},n.rT=function(){return this.nT},It(t,[{key:"ZS",get:function(){return this.eT.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,aT:e.aT},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&&!cn(n,e.encryptionScheme))&&(!e.robustness&&t(i,Af(e.contentType))))}function xf(t){if(t.videoCapabilities)for(var n,i=Rt(t.videoCapabilities);!(n=i()).done;){var e=n.value;if(e.contentType)return e.contentType}if(t.audioCapabilities)for(var r,o=Rt(t.audioCapabilities);!(r=o()).done;){var u=r.value;if(u.contentType)return u.contentType}}function Bf(t){for(var n,i=[],e=Rt(t);!(n=e()).done;){var r=n.value;r.encryptionScheme&&i.push({contentType:r.contentType,robustness:r.robustness})}return t.concat(i)}function Mf(t){return!(!t.audioCapabilities||!t.audioCapabilities.some(Ff))||!(!t.videoCapabilities||!t.videoCapabilities.some(Ff))}function Ff(t){return!t.robustness}function Lf(t,n){for(var i,e=[],r=Rt(t);!(i=r()).done;){var o=i.value;o.robustness?e.push(o):e.push(Yr({},o,{robustness:n}))}return e}x(),pt(),x(),pt();var Uf=function(){function t(){}return t.prototype.jw=function(t,n){return nn(function(){var i,e,r,o,u,s,f,h;return en(this,function(c){switch(c.label){case 0:for(n=n.filter(function(t){return!t.aT}),i=Rt(n);!(e=i()).done;)(r=e.value).audioCapabilities&&(r.audioCapabilities=Bf(r.audioCapabilities)),r.videoCapabilities&&(r.videoCapabilities=Bf(r.videoCapabilities));if(t!==eo||!n.some(Mf))return[3,4];o=n.map(function(t){return function(t,n){return Yr({},t,{videoCapabilities:t.videoCapabilities?Lf(t.videoCapabilities,n):void 0,audioCapabilities:t.audioCapabilities?Lf(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,o)];case 2:return u=c.sent(),s=u.getConfiguration(),[2,new Pf(u,t,s)];case 3:return c.sent(),[3,4];case 4:return[4,v.requestMediaKeySystemAccess(t,n)];case 5:return f=c.sent(),h=f.getConfiguration(),[2,new Pf(f,t,h)]}})})()},t.uT=function(){return void 0!==v&&"function"==typeof v.requestMediaKeySystemAccess},t}();x(),pt(),x(),pt(),x(),pt(),x(),pt();var zf=function(t){function n(n,i){var e;return(e=t.call(this)||this).gT=void 0,e.mT=void 0,e.HS=void 0,e.dT=void 0,e.bT=void 0,e.vT=void 0,e.lT=void 0,e.cT=void 0,e.KS=void 0,e.pT=void 0,e.As=void 0,e.wT=void 0,e.gT=n,e.mT=i,e.HS=!1,e.bT=void 0,e.vT=void 0,e.cT=void 0,e.KS=function(){e.HS=!0,e.dT.uf(void 0),e.cT&&(e.cT.removeEventListener("mskeyclose",e.KS),e.cT.removeEventListener("mskeymessage",e.pT),e.cT.removeEventListener("mskeyerror",e.As),e.cT.removeEventListener("mskeyadded",e.wT))},e.pT=function(t){e.vT&&(e.vT.uf(void 0),e.vT=void 0),e.Co(new Do(e,"license-request",Qo(t.message).buffer,t.destinationURL||void 0))},e.As=function(){var t=e.cT&&e.cT.error;if(t){var n=new au("Unknown CDM error",t.code,t.systemCode);if(e.vT)e.vT.Cb(n),e.vT=void 0;else if(e.bT)e.bT.Cb(n),e.bT=void 0;else switch(n.Db){case MSMediaKeyError.MS_MEDIA_KEYERR_OUTPUT:case MSMediaKeyError.MS_MEDIA_KEYERR_HARDWARECHANGE:e.yT("output-not-allowed");break;default:e.yT("internal-error")}}},e.wT=function(){e.vT&&(e.yT("usable"),e.vT.uf(void 0),e.vT=void 0),e.bT&&(e.yT("usable"),e.bT.uf(void 0),e.bT=void 0)},e.dT=new fu,e.lT=new su,e}Tt(n,t);var i=n.prototype;return i.WS=function(t,n,i){return nn(function(){return en(this,function(t){switch(t.label){case 0:return this.fT(),this.vT=new fu,this.YS(Jo(n),i),[4,this.vT.Od];case 1:return t.sent(),[2]}})}).call(this)},i.YS=function(t,n){if(!t)throw new m("Expected initData to be defined but was "+t+".");var i,e=n&&n.playready&&n.playready._T;return(i=n?this.gT.createSession(this.mT,t,e):this.gT.createSession(this.mT,t)).addEventListener("mskeyclose",this.KS),i.addEventListener("mskeymessage",this.pT),i.addEventListener("mskeyerror",this.As),i.addEventListener("mskeyadded",this.wT),this.cT=i,this.yT("status-pending"),i},i.Un=function(t){return nn(function(){return en(this,function(t){return this.fT(),[2,!0]})}).call(this)},i.rr=function(t){return nn(function(){var n;return en(this,function(i){switch(i.label){case 0:if(this.bT=new fu,this.fT(),!this.cT)return[2,tt.resolve()];if(0===(n=Jo(t)).byteLength)throw new m("Cannot call update with an empty response.");return this.cT.update(n),[4,this.bT.Od];case 1:return i.sent(),[2]}})}).call(this)},i.Qs=function(){return!this.HS&&this.cT&&(this.HS=!0,this.cT.close()),this.dT.Od},i.cc=function(){return nn(function(){return en(this,function(t){return this.fT(),[2]})}).call(this)},i.fT=function(){if(this.HS)throw new m("Already closing or closed.")},i.yT=function(t){this.lT.Ib(),this.lT.Pb(uu,t),this.Co(new Ao(this.lT))},It(n,[{key:"VS",get:function(){return this.cT&&this.cT.sessionId||""}},{key:"LS",get:function(){return NaN}},{key:"MS",get:function(){return this.dT.Od}},{key:"ob",get:function(){return this.lT}}]),n}(Eo),Wf=function(){function t(t,n,i){this.gT=void 0,this.ZS=void 0,this.iT=void 0,this.mT=void 0,this.gT=t,this.ZS=n,this.iT=i;var e=xf(i)||"video/mp4";this.mT=Af(e)}var n=t.prototype;return n.YS=function(t){return nn(function(){return en(this,function(t){return[2,new zf(this.gT,this.mT)]})}).call(this)},n.$S=function(t){return tt.resolve(!1)},n.xn=function(t){var n=this,i=function(){t.msSetMediaKeys(n.gT),t.removeEventListener("loadedmetadata",i)};return t.readyState>=1?t.msSetMediaKeys(this.gT):t.addEventListener("loadedmetadata",i),tt.resolve()},n.tT=function(t){return tt.resolve()},n.ur=function(){return tt.resolve()},t}(),Vf=function(){function t(t,n){this.XS=void 0,this.jl=void 0,this.XS=t,this.jl=n}var n=t.prototype;return n.rT=function(){return this.jl},n.sT=function(){var t=new c.MSMediaKeys(this.XS);return tt.resolve(new Wf(t,this.XS,this.jl))},It(t,[{key:"ZS",get:function(){return this.XS}}]),t}(),Hf=function(){function t(){}return t.prototype.jw=function(t,n){try{return tt.resolve(function(t,n){if(!qf())throw new m("Unsupported key system "+t);for(var i,e=Rt(n);!(i=e()).done;){var r=i.value,o=Df(Xf,No,t,r);if(o)return new Vf(t,o)}throw new m("Unsupported key system configuration for "+t)}(t,n))}catch(t){return tt.reject(t)}},t.uT=function(){return qf()},t}();function qf(){return void 0!==c.MSMediaKeys&&"function"==typeof c.MSMediaKeys.isTypeSupported}function Xf(t,n){return c.MSMediaKeys.isTypeSupported(t,n)}x(),pt(),x(),pt(),x(),pt(),x(),pt();var jf=function(t){function n(n,i,e){var r;return(r=t.call(this)||this).kT=void 0,r.mT=void 0,r.TT=void 0,r.dT=void 0,r.xT=void 0,r.lT=void 0,r.AT=void 0,r.ET=void 0,r.As=void 0,r.pT=void 0,r.wT=void 0,r.kT=n,r.mT=i,r.TT=e,r.dT=new fu,r.xT=void 0,r.lT=new su,r.AT=void 0,r.ET=new fu,r.As=function(){var t=r.AT&&r.AT.error;if(t){var n=new au("Unknown CDM error",t.code,t.systemCode);r.xT?(r.xT.Cb(n),r.xT=void 0):n.Db===WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT?r.yT("output-not-allowed"):r.yT("internal-error"),r.Co(new Co)}},r.pT=function(t){r.Co(new Do(r,"license-request",Qo(t.message).buffer,"this is a test string"===t.destinationURL?void 0:t.destinationURL))},r.wT=function(){r.xT&&(r.xT.uf(void 0),r.xT=void 0),r.yT("usable")},r}Tt(n,t);var i=n.prototype;return i.WS=function(t,n,i){var e=i&&i.fairplay&&i.fairplay.ST;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.Lu),n.wb(i.byteLength)}(s,f,i),new k(u)}(Jo(n),e,this.TT);return this.AT=this.kT.createSession(this.mT,r),this.AT.addEventListener("webkitkeymessage",this.pT,!1),this.AT.addEventListener("webkitkeyadded",this.wT,!1),this.AT.addEventListener("webkitkeyerror",this.As,!1),this.yT("status-pending"),this.ET.uf(this.AT),this.ET=new fu,tt.resolve()},i.Un=function(t){return tt.resolve(!0)},i.rr=function(t){return nn(function(){var n,i;return en(this,function(e){switch(e.label){case 0:if(0===(n=Jo(t)).byteLength)throw new m("Cannot call update with an empty response.");return this.xT=new fu,(i=this.AT)?[3,2]:[4,this.ET.Od];case 1:i=e.sent(),e.label=2;case 2:return i.update(n),[4,this.xT.Od];case 3:return e.sent(),[2]}})}).call(this)},i.Qs=function(){var t,n=this.AT;return n&&(n.removeEventListener("webkitkeymessage",this.pT,!1),n.removeEventListener("webkitkeyadded",this.wT,!1),n.removeEventListener("webkitkeyerror",this.As,!1),n.close()),this.ET.dd(),null==(t=this.xT)||t.dd(),this.dT.uf(void 0),this.dT.Od},i.cc=function(){return tt.resolve(void 0)},i.yT=function(t){this.lT.Ib(),this.lT.Pb(uu,t),this.Co(new Ao(this.lT))},It(n,[{key:"VS",get:function(){return this.AT?this.AT.sessionId:""}},{key:"LS",get:function(){return NaN}},{key:"MS",get:function(){return this.dT.Od}},{key:"ob",get:function(){return this.lT}}]),n}(Eo);x(),pt(),x(),pt();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=void 0,r.code=n,r}return Tt(n,t),It(n,[{key:"name",get:function(){return"THEOplayerError"}},{key:"category",get:function(){return Kf.fromCode(this.code)}}]),n}(wn),$f=function(){function t(t,n,i){this.kT=void 0,this.ZS=void 0,this.iT=void 0,this.mT=void 0,this.TT=void 0,this.kT=t,this.ZS=n,this.iT=i,this.TT=void 0;var e=xf(i)||"video/mp4";this.mT=Af(e)}var n=t.prototype;return n.getInternalMediaKeys=function(){return this.kT},n.YS=function(t){return nn(function(){return en(this,function(t){if(!this.TT)throw new Gf(Yf.CONTENT_PROTECTION_CERTIFICATE_ERROR,"No valid certificate was provided.");return[2,new jf(this.kT,this.mT,this.TT)]})}).call(this)},n.$S=function(t){return this.TT=Jo(t),tt.resolve(!0)},n.xn=function(t){return t.webkitSetMediaKeys(this.kT),tt.resolve()},n.tT=function(t){return t.webkitSetMediaKeys(null),tt.resolve()},n.ur=function(){return tt.resolve()},t}(),Zf=function(){function t(t,n){this.XS=void 0,this.jl=void 0,this.XS=t,this.jl=n}var n=t.prototype;return n.rT=function(){return this.jl},n.sT=function(){var t=new c.WebKitMediaKeys(this.XS);return tt.resolve(new $f(t,this.XS,this.jl))},It(t,[{key:"ZS",get:function(){return this.XS}}]),t}(),Jf=function(){function t(){}return t.prototype.jw=function(t,n){try{return tt.resolve(function(t,n){if(t!==ho)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,e=Rt(n);!(i=e()).done;){var r=i.value,o=Df(th,Po,t,r);if(o)return new Zf(t,o)}throw new m("Unsupported key system configuration for "+t)}(t,n))}catch(t){return tt.reject(t)}},t.uT=function(){return Qf()},t}();function Qf(){return void 0!==c.WebKitMediaKeys&&"function"==typeof c.WebKitMediaKeys.isTypeSupported}function th(t,n){return c.WebKitMediaKeys.isTypeSupported(t,n)}x(),pt();var nh=function(){function t(t){this.PT=void 0,this.PT=t}return t.prototype.jw=function(t,n){return nn(function(){var i,e,r;return en(this,function(o){switch(o.label){case 0:i=Rt(this.PT),o.label=1;case 1:if((e=i()).done)return[3,6];r=e.value,o.label=2;case 2:return o.trys.push([2,4,,5]),[4,r.jw(t,n)];case 3:return[2,o.sent()];case 4:return o.sent(),[3,5];case 5:return[3,1];case 6:throw new m("Unsupported key system configuration for "+t)}})}).call(this)},t}();x(),pt(),x(),pt(),x(),pt(),x(),pt(),x(),pt();var ih=function(){function t(t){var n=this;this.CT=[],this.DT=void 0,this.IT=new dn,this.MT=void 0,this.NT=function(){return 0===n.CT.length?n.MT?eh(n.MT,n.IT.Gm).then(n.LT,n.LT):n.LT():n.CT.shift()().then(n.NT)},this.LT=function(){if(0!==n.CT.length)return n.NT();n.DT=void 0},this.MT=t}var n=t.prototype;return n.ia=function(t,n){var i=this;return new tt(function(e){var r=dn.Km([i.IT.Gm,n]),o=function(){r.Ku()};i.CT.push(function(){var n=eh(t,r.Gm);return e(n),n.then(o,o)}),i.DT||(i.DT=i.NT())})},n.dd=function(){return this.BT(!0)},n._n=function(){return this.MT=void 0,this.BT(!1)},n.BT=function(t){var n=this.DT;return this.IT.dd(),t&&(this.IT=new dn),tt.resolve(n)},t}();function eh(t,n){return new tt(function(i){return i(t(n))})}var rh=new ih,oh=function(t){function n(n){var i;return(i=t.call(this)||this).XS=void 0,i.vT=void 0,i.xT=void 0,i.dT=void 0,i.Wb=void 0,i.GT=void 0,i.zT=void 0,i.WT=void 0,i.HT=void 0,i.qT=void 0,i.XS=n,i.vT=void 0,i.xT=void 0,i.Wb=!1,i.GT=void 0,i.HT=void 0,i.dT=new fu,i.zT="",i.qT=new fu,i.WT=new su,i}Tt(n,t);var i=n.prototype;return i.OT=function(){this.xT&&(this.yT("usable"),this.xT.uf(void 0),this.xT=void 0)},i.FT=function(t){var n=new au("Unknown CDM error",t.errorCode,t.systemCode);this.xT?(this.xT.Cb(n),this.xT=void 0):this.vT?(this.vT.Cb(n),this.vT=void 0):n.Db===WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT?this.yT("output-restricted"):1===n.Nb?this.yT("expired"):this.yT("internal-error")},i.UT=function(t){0!==t.message.byteLength?(this.vT&&(this.vT.uf(void 0),this.vT=void 0),this.Co(new Do(this,"license-request",hu(this.XS,Qo(t.message).buffer),t.defaultURL||void 0))):this.vT&&(this.vT.Cb("Empty key message"),this.vT=void 0)},i.VT=function(t){this.HT||(this.HT=t,this.qT.uf(t))},i.Qs=function(){return nn(function(){return en(this,function(t){return this.throwIfClosed(),this.xT&&(this.xT.Cb(void 0),this.xT=void 0),this.Wb=!0,this.dT.uf(void 0),[2]})}).call(this)},i.WS=function(t,n){return nn(function(){var t;return en(this,function(i){switch(i.label){case 0:return this.throwIfClosed(),this.vT=new fu,this.GT=Jo(n),(t=this.HT)?[3,2]:[4,this.qT.Od];case 1:t=i.sent(),i.label=2;case 2:return t.webkitGenerateKeyRequest(this.XS,this.GT),[4,this.vT.Od];case 3:return i.sent(),[2]}})}).call(this)},i.Un=function(t){return nn(function(){return en(this,function(t){return this.throwIfClosed(),[2,!1]})}).call(this)},i.cc=function(){return nn(function(){return en(this,function(t){return this.throwIfClosed(),[2]})}).call(this)},i.rr=function(t){return nn(function(){var n;return en(this,function(i){switch(i.label){case 0:return n=this,this.throwIfClosed(),this.xT=new fu,Ht.gg||Ht.dg?[2,rh.ia(function(){return nn(function(){return en(this,function(n){switch(n.label){case 0:return[4,this.doUpdate(t)];case 1:return n.sent(),[2]}})}).call(n)})]:[4,this.doUpdate(t)];case 1:return i.sent(),[2]}})}).call(this)},i.doUpdate=function(t){return nn(function(){var n;return en(this,function(i){switch(i.label){case 0:return void 0===this.xT?[2]:(n=this.HT)?[3,2]:[4,this.qT.Od];case 1:n=i.sent(),i.label=2;case 2:return n.webkitAddKey(this.XS,Jo(t),this.GT,this.VS),[4,this.xT.Od];case 3:return i.sent(),Ht.dg?[4,yn(500)]:[3,5];case 4:i.sent(),i.label=5;case 5:return[2]}})}).call(this)},i.throwIfClosed=function(){if(this.Wb)throw new m("Already closing or closed.")},i.yT=function(t){this.WT.Ib(),this.WT.Pb(uu,t),this.Co(new Ao(this.WT))},i.XT=function(){return nn(function(){var t,n;return en(this,function(i){switch(i.label){case 0:return(n=this.HT)?[3,2]:[4,this.qT.Od];case 1:n=i.sent(),i.label=2;case 2:if(!(t=n).webkitCancelKeyRequest)return[3,7];i.label=3;case 3:return i.trys.push([3,4,5,7]),t.webkitCancelKeyRequest(this.XS,this.zT),[3,7];case 4:return i.sent(),[3,7];case 5:return[4,yn(500)];case 6:return i.sent(),[7];case 7:return[2]}})}).call(this)},It(n,[{key:"ob",get:function(){return this.WT}},{key:"VS",get:function(){return this.zT},set:function(t){this.zT=t}},{key:"MS",get:function(){return this.dT.Od}},{key:"LS",get:function(){return NaN}}]),n}(Eo),uh=function(){function t(t,n){var i=this;this.ZS=void 0,this.iT=void 0,this.HT=void 0,this.KT=void 0,this.YT=void 0,this.wT=void 0,this.jT=void 0,this.QT=void 0,this.ZS=t,this.iT=n,this.HT=void 0,this.KT=Gr(),this.YT=[],this.wT=function(t){var n=i.JT(t.sessionId);n&&n.OT()},this.jT=function(t){var n=i.JT(t.sessionId);n&&n.FT(t)},this.QT=function(t){var n=i.JT(t.sessionId);n&&n.UT(t)}}var n=t.prototype;return n.xn=function(t){return this.HT=t,this.HT.addEventListener("webkitkeyadded",this.wT),this.HT.addEventListener("webkitkeyerror",this.jT),this.HT.addEventListener("webkitkeymessage",this.QT),this.KT.forEach(function(n,i){return n.VT(t)}),this.YT.forEach(function(n){return n.VT(t)}),tt.resolve()},n.tT=function(t){return t.removeEventListener("webkitkeyadded",this.wT),t.removeEventListener("webkitkeyerror",this.jT),t.removeEventListener("webkitkeymessage",this.QT),this.HT=void 0,tt.resolve()},n.ur=function(){return nn(function(){var t,n;return en(this,function(i){switch(i.label){case 0:t=this.KT.entries(),n=t.next(),i.label=1;case 1:return n.done?[3,3]:[4,n.value[1].XT()];case 2:return i.sent(),n=t.next(),[3,1];case 3:return this.KT.clear(),[2]}})}).call(this)},n.YS=function(t,n,i){return nn(function(){var t;return en(this,function(n){return t=new oh(this.ZS),this.HT&&t.VT(this.HT),this.YT.push(t),[2,t]})}).call(this)},n.$S=function(t){return tt.resolve(!1)},n.JT=function(t){if(t){var n=this.KT.get(t);return n||((n=this.YT.shift())?(n.VS=t,this.KT.set(t,n),n):void 0)}},t}(),sh=function(){function t(t,n){this.ZS=void 0,this.ZT=void 0,this.ZS=t,this.ZT=n}var n=t.prototype;return n.sT=function(){return tt.resolve(new uh(this.ZS,this.ZT))},n.rT=function(){return this.ZT},t}(),fh=function(){function t(){}return t.prototype.jw=function(t,n){try{return tt.resolve(function(t,n){if(!fh.uT())throw new m("Unsupported key system "+t);for(var i,e=Rt(n);!(i=e()).done;){var r=i.value,o=Df(hh,No,t,r);if(o)return new sh(t,o)}throw new m("Unsupported key system configuration for "+t)}(t,n))}catch(t){return tt.reject(t)}},t.uT=function(){return"undefined"!=typeof HTMLMediaElement&&void 0!==HTMLMediaElement.prototype.webkitGenerateKeyRequest&&void 0!==HTMLMediaElement.prototype.webkitAddKey&&void 0!==HTMLMediaElement.prototype.webkitCancelKeyRequest},t}();function hh(t,n){var i=Sn();return Boolean(i&&i.canPlayType&&""!==i.canPlayType(n,t))}x(),pt();var ch,ah=function(){function t(){}return t.prototype.jw=function(t,n){return t===eo||t===to?tt.resolve(void 0):tt.reject(new g("DRM configuration not supported"))},t}();function vh(){return ch||(ch=function(){var t=[];Jf.uT()&&t.push(new Jf);Uf.uT()&&t.push(new Uf);Hf.uT()&&t.push(new Hf);fh.uT()&&t.push(new fh);Ht.wg&&t.push(new ah);return new nh(t)}()),ch}x(),pt(),x(),pt();var dh=function(){function t(){this.$T=Gr()}var n=t.prototype;return n.Ib=function(t){this.$T.delete(t)},n.ek=function(){this.$T.clear()},n.xb=function(t){return this.$T.get(t)},n.Pb=function(t,n){this.$T.set(t,n)},t}(),lh=function(){function t(){}return t.nk=function(){return t.Im||(t.Im=wh.uT()?new wh:new dh),t.Im},t.Ib=function(n){t.nk().Ib(n)},t.ek=function(){t.nk().ek()},t.xb=function(n){return t.nk().xb(n)},t.Pb=function(n,i){t.nk().Pb(n,i)},t}();lh.Im=void 0;var wh=function(t){function n(){return t.apply(this,arguments)||this}Tt(n,t);var i=n.prototype;return i.Ib=function(t){self.sessionStorage.removeItem(t)},i.ek=function(){self.sessionStorage.clear()},i.xb=function(t){var n;return null!=(n=self.sessionStorage.getItem(t))?n:void 0},i.Pb=function(t,n){self.sessionStorage.setItem(t,n)},n.uT=function(){var t="foobar";try{return self.sessionStorage.setItem(t,t),self.sessionStorage.removeItem(t),!0}catch(t){return!1}},n}(lh);x(),pt(),x(),pt();var bh=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,o=Rt(n);!(r=o()).done;){var u=r.value;e.append(u)}return e.getBlob(i&&i.type||"")}}(n)}();function gh(t,n,i){var e=bh([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(),pt(),x(),pt(),x(),pt(),x(),pt(),x(),pt(),M(),x(),pt();var mh=function(t,n,i){return i=null!=t?E(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)}(_t());x(),pt();var ph=t,yh=$t(ph.ReadableStream)&&$t(ph.WritableStream)&&$t(ph.TransformStream)&&Gt(ph.ReadableStream.prototype.pipeThrough)&&!ui.bp,_h=yh?ph.ReadableStream:mh.ReadableStream,Sh=(yh?ph.WritableStream:mh.WritableStream,yh?ph.TransformStream:mh.TransformStream);yh&&ph.ByteLengthQueuingStrategy?ph.ByteLengthQueuingStrategy:mh.ByteLengthQueuingStrategy,yh&&ph.CountQueuingStrategy?ph.CountQueuingStrategy:mh.CountQueuingStrategy;function Th(t){return function(t){return new _h({start:function(n){for(var i,e=Rt(t);!(i=e()).done;){var r=i.value;n.enqueue(r)}n.close()}})}([t])}function kh(t){return Th(function(t){return new k(t)}(t))}function Ih(t,n){return function(t,n){var i=n,e=t.getReader(),r=new fu,o=function(){u();var t=new bn;e.cancel(t).catch(Jt),r.Cb(t)},u=function(){i&&(i.qm(o),i=void 0)};i&&(i.Om?o():i.Hm(o));var s=[],f=function(t){return t.done?(u(),tt.resolve(s)):(s.push(t.value),tt.resolve(e.read()).then(f))};return tt.resolve(e.read()).then(f).then(function(t){u(),r.uf(t)},function(t){u(),r.Cb(t)}),r.Od}(t,n).then(function(t){return ru(t).buffer})}function Eh(t,n){var i=n,e=new Sh,r=e.readable,o=e.writable,u=o.getWriter(),s=function(){i&&i.dd()};return u.closed.then(s,s),t.then(function(t){return i=void 0,u.releaseLock(),t.pipeTo(o).catch(Jt)},function(t){return i=void 0,u.releaseLock(),o.abort(t).catch(Jt)}),r}function Rh(t){return Ko(new k(t))}function Oh(t){return Go(t).buffer}x(),pt();var Nh="text/plain;charset=UTF-8",Ph=function(){function t(){}var n=t.prototype;return n._k=function(t){return this.gk(t).then(JSON.parse)},n.pk=function(t,n){switch(t){case xr.rk:return this.wk(n);case xr.hk:return this._k(n);case xr.ck:return this.yk();case xr.dk:return this.gk(n);default:throw new m}},t}();function Ah(t,n,i){if(B(t,Ph))return t;if(B(t,_h))return function(t,n){return new Ch({Vw:0,yk:t,bk:Dh(n)})}(t,i);var e=Dh(i),r=tt.resolve(t).then(function(t){return function(t,n){if(t){if("string"==typeof t)return{Vw:xr.dk,Ak:t,bk:n||Nh};if(B(t,ArrayBuffer)||iu(t))return{Vw:xr.rk,Ak:zh(t),bk:n};if(function(t){return Kt(t)&&t.constructor&&t.constructor===p}(t)||Yt(t))return{Vw:xr.hk,Ak:t,bk:n};throw new m("Unsupported BodyInit type")}return{Vw:xr.dk,Ak:null,bk:n}}(t,e)});return new Ch({Vw:1,Od:r,Sk:n})}function Dh(t){return(t.get("content-type")||"").toLowerCase()}var Ch=function(t){function n(n){var i;return(i=t.call(this)||this).Ek=!1,i.Pk=void 0,i.Ik=new fu,i.Ik.Od.catch(Jt),i.Nk(n),i}Tt(n,t);var i=n.prototype;return i.Rk=function(){return this.Ik.Od},i.gk=function(t){return this.Ck(xh,t)},i._k=function(t){return this.Ck(Mh,t)},i.wk=function(t){return this.Ck(Lh,t)},i.yk=function(){return this.Dk(function(t){return 0===t.Vw?t.yk:Eh(t.Od.then(Uh).then(kh),t.Sk)}(this.Pk))},i.Ck=function(t,n){if(this.Ek)return tt.reject(new m("Already used"));this.Ek=!0;var i=t(this.Pk,n);return this.Ik.jm(i.then(Jt)),i},i.Dk=function(t){if(this.Ek)throw new m("Already used");if(t.locked)throw new m("Body stream is locked");this.Ek=!0;var n=new Sh,i=tt.resolve(t.pipeTo(n.writable));return this.Ik.jm(i),n.readable},i.Nk=function(t){this.Pk=t,1===t.Vw&&t.Od.catch(Jt)},i.Bk=function(){if(this.Ek)throw new m("Already used");var t=function(t){if(0===t.Vw){var n=t.yk.tee(),i=n[0],e=n[1];return[{Vw:t.Vw,yk:i,bk:t.bk},{Vw:t.Vw,yk:e,bk:t.bk}]}var r=t.Sk.Qm(),o=r[0],u=r[1];return[{Vw:t.Vw,Od:t.Od,Sk:o},{Vw:t.Vw,Od:t.Od,Sk:u}]}(this.Pk),i=t[0],e=t[1];return this.Nk(i),new n(e)},It(n,[{key:"Tk",get:function(){return this.Ek}},{key:"xk",get:function(){return 0===this.Pk.Vw}}]),n}(Ph);function xh(t,n){return 0===t.Vw?Ih(t.yk,n).then(Rh):(n&&t.Sk.jm(n),pn(t.Od.then(Bh),t.Sk))}function Bh(t){switch(t.Vw){case xr.dk:return tt.resolve(t.Ak||"");case xr.rk:return tt.resolve(t.Ak).then(Rh);case xr.hk:return tt.resolve(t.Ak).then(JSON.stringify)}}function Mh(t,n){return 0===t.Vw?xh(t,n).then(JSON.parse):(n&&t.Sk.jm(n),pn(t.Od.then(Fh),t.Sk))}function Fh(t){return t.Vw===xr.hk?tt.resolve(t.Ak):Bh(t).then(JSON.parse)}function Lh(t,n){return 0===t.Vw?Ih(t.yk,n):(n&&t.Sk.jm(n),pn(t.Od.then(Uh),t.Sk))}function Uh(t){switch(t.Vw){case xr.rk:return tt.resolve(t.Ak);case xr.dk:case xr.hk:return Bh(t).then(Oh)}}function zh(t){return B(t,ArrayBuffer)?t:Qo(Zo(t)).buffer}var Wh=function(t){function n(n){var i;return(i=t.call(this)||this).Mk=void 0,i.Mk=n,i}Tt(n,t);var i=n.prototype;return i.Rk=function(){return this.Mk.Rk()},i.gk=function(t){return this.Mk.gk(t)},i._k=function(t){return this.Mk._k(t)},i.wk=function(t){return this.Mk.wk(t)},i.yk=function(t){return this.Mk.yk(t)},i.Bk=function(){return this.Mk.Bk()},It(n,[{key:"Tk",get:function(){return this.Mk.Tk}},{key:"xk",get:function(){return this.Mk.xk}}]),n}(Ph);var Vh=function(t){function n(n,i){var e,r,o,u,s,f;i?(r=i.Vk,o=i.Fk,u=i.Lk,s=i.Hk,f=i.qk):(r=[],o=xr.dk,u=200,s="OK",f=!1);var h=n.Uk,c=new Br(n.Vk||r),a=n.Fk||o,v=n.Wk||(i&&i.Uk===h?i.Wk:h.zk),d=i?i.Mk:null,l=Ah(void 0!==n.Ok?n.Ok:d,n.Sk||new dn,c);return(e=t.call(this,l)||this).Vk=void 0,e.Uk=void 0,e.Wk=void 0,e.Fk=void 0,e.Lk=void 0,e.Hk=void 0,e.qk=void 0,e.Vk=c,e.Uk=h,e.Wk=v,e.Fk=a,e.Lk=void 0!==n.Lk?n.Lk:u,e.Hk=void 0!==n.Hk?String(n.Hk):s,e.qk=n.qk||f,e}Tt(n,t);var i=n.prototype;return i.Ok=function(t){return this.pk(this.Fk,t)},i.yb=function(){return new n({Ok:this.Bk(),Uk:this.Uk},this)},n}(Wh),Hh=function(){function t(){}var n=t.prototype;return n.Uk=function(t){var n=function(t){return new Vh({Ok:null,Vk:{},Uk:t,Wk:t.zk,Fk:t.Fk,Lk:0,Hk:Oo.Oy})}(new zr(t));return tt.resolve(n)},n.bE=function(t){},n._n=function(){},t}();var qh=function(){function t(t,n){void 0===n&&(n=!0),this.kE=void 0,this.xE=void 0,this.kE=t,this.xE=n}var n=t.prototype;return n.Uk=function(t){var n=this.TE(t);return this.kE.Uk(n)},n.bE=function(t){return this.kE.bE(this.EE(t))},n.TE=function(n){var i=new zr(n);if(!this.xE){var e=t.PE(i.zk);i=new zr({zk:e},i)}return i},n.EE=function(n){var i=n.zk;return this.xE||(i=t.PE(i)),{zk:i,Ak:n.Ak}},n._n=function(){this.kE._n()},t.PE=function(t){return jt.Tw&&bo(t,"http://")?t.replace(":","s:"):t},It(t,null,[{key:"AE",get:function(){return t.SE||(t.SE=new t(new Hh)),t.SE}}]),t}();qh.SE=void 0,x(),pt(),x(),pt(),x(),pt(),x(),pt();var Xh=function(t){function n(n,i,e){var r;return(r=t.call(this,n.Uk,null!=e?e:function(t){return"Error while loading "+t.Uk.zk+", status code "+t.Lk}(n),i)||this).OE=void 0,r.OE=n,r}return Tt(n,t),It(n,[{key:"name",get:function(){return Wr.DE}},{key:"LE",get:function(){return this.OE}}]),n}(Vr);x(),pt();var jh=function(t){function n(n,i){return t.call(this,n,function(t){return"Request for "+t.zk+" timed out after "+t.lE+" seconds."}(n),i)||this}return Tt(n,t),It(n,[{key:"name",get:function(){return Wr.NE}}]),n}(Vr);x(),pt();var Yh=self.fetch,Kh=self.Request,Gh=self.Response,$h=self.Headers,Zh=self.ReadableStream,Jh=self.AbortSignal,Qh=self.AbortController,tc=Qt(function(){try{return Gt(Yh)&&$t(Kh)&&$t(Gh)&&$t($h)&&"forEach"in $h.prototype&&Nr()}catch(t){return!1}}),nc=["http:","https:"];var ic=Qt(function(){try{return tc()&&$t(Jh)&&$t(Qh)&&"signal"in Kh.prototype}catch(t){return!1}}),ec=Qt(function(){try{return tc()&&$t(Zh)&&"body"in Gh.prototype&&!Ht.H_}catch(t){return!1}});function rc(t,n){var i,e=t.Vk.has("content-length")?Number(t.Vk.get("content-length")):void 0;return i=t.xk?function(t,n,i){return t.pipeThrough(new Sh(new oc(n,i)))}(t.yk(),n,e):function(t,n,i){return nn(function(){var e,r;return en(this,function(o){switch(o.label){case 0:return[4,tt.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]}})})()}(t.wk(),n,e),new Vh({Ok:i,Uk:t.Uk},t)}x(),pt(),M(),x(),pt();var oc=function(){function t(t,n){this.UE=void 0,this.VE=void 0,this.FE=void 0,this.UE=t,this.VE=n,this.FE=0}var n=t.prototype;return n.transform=function(t,n){this.FE+=t.byteLength,this.UE(this.FE,this.VE),n.enqueue(t)},n.flush=function(t){var n;this.UE(this.FE,null!=(n=this.VE)?n:this.FE)},t}();var uc=function(){function t(t){this.LE=void 0,this.BE=void 0,this.IT=new dn,this.OE=void 0,this.qE=0,this.WE=!1,this.BE=t,this.IT.jm(t.Gm),this.LE=this.HE()}var n=t.prototype;return n.HE=function(){return nn(function(){var t,n,i,e,r,o,u,s,f,h;return en(this,function(c){switch(c.label){case 0:t=this,(n=this.BE).lE&&(this.qE=d(function(){t.WE=!0,t.IT.dd()},n.lE),this.IT.Gm.Wm(function(){l(t.qE)}));try{i=Yh(n.zk,{method:n.dE,headers:n.Vk.lk(),body:n.Ak,credentials:n.gE?"include":"same-origin",signal:hc(this.IT.Gm),mode:n.pE,keepalive:n.yE})}catch(t){throw new Hr(n,t)}c.label=1;case 1:return c.trys.push([1,3,,4]),[4,i];case 2:return e=c.sent(),[3,4];case 3:throw r=c.sent(),gn(o=this.zE(r))&&this.IT.dd(),o;case 4:if(u=e.url||n.zk,s=0===e.status&&"file:"===function(t){return jt.Rh(t).protocol}(u)?200:e.status,f=new sc(this,e,this.IT),!function(t){return t.Lk>=200&&t.Lk<=299||304===t.Lk}(h=new Vh({Ok:f,Uk:n,Fk:n.Fk,Vk:new Br(e.headers),Lk:s,Hk:e.statusText,Wk:u})))throw new Xh(h);return n.mE&&(h=rc(h,n.mE)),[2,h]}})}).call(this)},n.zE=function(t){return function(t){return B(t,Vr)}(t)?t:gn(t)?this.WE?new jh(this.BE):new bn(t.message,t):this.OE?new Xh(this.OE,t):new Hr(this.BE,t)},t}(),sc=function(t){function n(n,i,e){var r;return(r=t.call(this)||this).XE=void 0,r.GE=void 0,r.IT=void 0,r.Ik=new fu,r.XE=n,r.GE=i,r.IT=e,r.Ik.Od.catch(Jt),r}Tt(n,t);var i=n.prototype;return i.Rk=function(){return this.Ik.Od},i.gk=function(t){return this.Ck(this.GE.text(),t)},i.wk=function(t){return this.Ck(this.GE.arrayBuffer(),t)},i.yk=function(){var t=this.GE.body;return t?this.Dk(t):Eh(this.wk().then(kh),this.IT)},i.Bk=function(){var t=this.GE.clone(),i=this.IT.Qm(),e=i[0],r=i[1];return this.IT=e,new n(this.XE,t,r)},i.Ck=function(t,n){var i=this;n&&this.IT.jm(n);var e=mn(tt.resolve(t),this.IT.Gm).catch(function(t){throw i.XE.zE(t)});return e=pn(e,this.IT),this.Ik.jm(e.then(Jt)),e},i.Dk=function(t){var n=this;return new _h(new cc(t,function(t){return n.XE.zE(t)},this.IT,this.Ik),{highWaterMark:0})},It(n,[{key:"Tk",get:function(){return this.GE.bodyUsed}},{key:"xk",get:function(){return Xt(this.GE.body)}}]),n}(Ph),fc="abort";function hc(t){if(ic()){var n=new Qh;if(t.Om)n.abort();else if(!t.Fm){var i=function(){e(),n.abort()},e=function(){n.signal.removeEventListener(fc,i),t.qm(i),t.zm(e)};n.signal.addEventListener(fc,i),t.Hm(i),t.Wm(e)}return n.signal}}var cc=function(){function t(t,n,i,e){this.jE=void 0,this.QE=void 0,this.IT=void 0,this.Ik=void 0,this.Df=void 0,this.jE=t,this.QE=n,this.IT=i,this.Ik=e}var n=t.prototype;return n.start=function(t){this.Df=this.jE.getReader()},n.pull=function(t){return nn(function(){var n,i,e;return en(this,function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,mn(this.Df.read(),this.IT.Gm)];case 1:return n=r.sent(),[3,3];case 2:return i=r.sent(),e=this.QE(i),this.Ik.Cb(e),this.IT.dd(),this.Df.cancel(e).catch(Jt),t.error(e),[2];case 3:return n.done?(this.Ik.uf(),this.IT.dd(),t.close()):t.enqueue(n.value),[2]}})}).call(this)},n.cancel=function(t){return this.IT.dd(),this.Ik.Cb(t),this.Df.cancel(t)},t}();x(),pt();var ac=function(){function t(t){var n=this;this.YE=void 0,this.BE=void 0,this.IT=new dn,this.OE=void 0,this.KE=new fu,this.ux=void 0,this.ox=!1,this.nx=function(){var t;n.JE(),null==(t=n.YE)||t.abort()},this.BE=t,this.IT.jm(t.Gm),this.YE=new I,this.HE()}var n=t.prototype;return n.HE=function(){var t=this,n=this.YE,i=this.BE;if(i.Gm.Om)return this.JE();n.onreadystatechange=function(){return t.ZE()},n.onprogress=function(n){return t.UE(n)},n.onload=function(){return t.$E()},n.onloadend=function(){return t.tx()},n.onerror=function(){return t.ix()},n.ontimeout=function(){return t.sx()},n.onabort=function(){return t.JE()},n.open(i.dE,i.zk,!0),n.withCredentials=Boolean(i.gE),"responseType"in n&&i.Fk&&(i.Fk===xr.dk?n.responseType="text":n.responseType="arraybuffer"),i.Vk.forEach(function(t,i){n.setRequestHeader(i,t)}),i.lE&&(n.timeout=i.lE),this.IT.Gm.Hm(this.nx);var e=i.Ak;e?n.send(e):n.send()},n.ZE=function(){var t=this.YE;void 0!==t&&t.readyState>=2&&!this.ox&&(this.ox=!0,this.hx())},n.hx=function(){var t,n,i=this.YE,e=function(t){var n=new Br,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.BE;this.ux=new fu,this.OE=new Vh({Uk:r,Fk:r.Fk,Ok:this.ux.Od,Lk:i.status,Hk:i.statusText,Vk:e,Wk:null!=(n=i.responseURL)?n:e.get("X-Request-URL")}),null==(t=this.KE)||t.uf(this.OE)},n.$E=function(){var t,n=this.YE;if(void 0!==n){var i=n.response;if(!Xt(i)){var e=this.BE.Fk;i=e===xr.dk?n.responseText:e===xr.rk?new ArrayBuffer(0):{}}null==(t=this.ux)||t.uf(i)}},n.tx=function(){this._n()},n.UE=function(t){void 0!==this.YE&&(null==this.BE.mE||this.BE.mE.call(this.BE,t.loaded,t.lengthComputable?t.total:void 0))},n.ix=function(){var t=new g("Network request failed");this.OE?this.As(new Xh(this.OE,t)):this.As(new Hr(this.BE,t))},n.sx=function(){this.As(new jh(this.BE))},n.JE=function(){this.As(new bn),this._n()},n.As=function(t){var n,i;null==(n=null!=(i=this.ux)?i:this.KE)||n.Cb(t)},n._n=function(){this.YE=void 0,this.OE=void 0,this.KE=void 0,this.ux=void 0,this.IT.Ku()},It(t,[{key:"LE",get:function(){return this.KE.Od}}]),t}();x(),pt();var vc=function(){function t(){}var n=t.prototype;return n.Uk=function(t){return function(t){if(Ht.nm)return!1;if(!tc()||!function(t){try{return nc.indexOf(new self.URL(t,self.location.href).protocol)>=0}catch(t){return!1}}(t.zk))return!1;if(!ec()&&t.mE)return!1;if(!t.wE&&t.dE!==Lr.POST){if(Ht.gg&&Ht.J_<=68)return!1;if(Ht.dg)return!1}return!0}(t)?new uc(t).LE:new ac(t).LE},n.bE=function(t){var n=c.navigator;if(n&&n.sendBeacon)n.sendBeacon(t.zk,bh([t.Ak],{type:t.bk}));else{var i=t.bk?{"Content-type":t.bk}:void 0;this.Uk(new zr({dE:Lr.POST,zk:t.zk,Ak:t.Ak,Vk:i,pE:Ur.aE})).then(function(t){!function(t){t.then(Jt,Jt)}(t.wk())},Jt)}},n._n=function(){},t}();x(),pt(),x(),pt();var dc=function(t){return t[t.lx=1]="lx",t[t.vx=2]="vx",t[t.dk=3]="dk",t[t._x=4]="_x",t[t.gx=9]="gx",t}({});var lc=function(){function t(){}return t.prototype.wx=function(t){var n,i=new DOMParser;try{n=i.parseFromString(t,"text/xml")}catch(t){throw new Xr(t)}if(!n||n.getElementsByTagName("parsererror").length>0)throw new Xr;return new _c(n)},t}(),wc=function(){function t(t){this.bx=void 0,this.bx=t}var n=t.prototype;return n.kx=function(t){return this.bx.isEqualNode(t.bx)},n.Ex=function(n){return new t(this.bx.cloneNode(n))},It(t,[{key:"mx",get:function(){return dc.vx}},{key:"yx",get:function(){var t;return null!=(t=this.bx.localName)?t:kc(this.bx.nodeName)}},{key:"l",get:function(){return this.bx.nodeName}},{key:"Ax",get:function(){var t;return null!=(t=this.bx.namespaceURI)?t:void 0}},{key:"Sx",get:function(){var t;return null!=(t=this.bx.prefix)?t:void 0}},{key:"Tx",get:function(){return this.bx.nodeValue}}]),t}(),bc=function(){function t(t){this.Rx=void 0,this.Px=void 0,this.Rx=t}var n=t.prototype;return n.Ix=function(t){return this.xx.filter(function(n){return Sc(n)&&n.Cx===t})},n.Dx=function(t,n){return this.xx.filter(function(i){return Sc(i)&&i.yx===n&&i.Ax===t})},n.Bx=function(t){this.Rx.appendChild(t.Nx),this.Px&&this.Px.push(t)},n.kx=function(t){return this.Rx.isEqualNode(t.Nx)},It(t,[{key:"xx",get:function(){return void 0===this.Px&&(this.Px=function(t){for(var n=[],i=0;i<t.length;i++){var e=Tc(t.item(i));e&&n.push(e)}return n}(this.Rx.childNodes)),this.Px}},{key:"m",get:function(){return this.xx.filter(Sc)}},{key:"Nx",get:function(){return this.Rx}}]),t}(),gc=function(t){function n(n){return t.call(this,n)||this}Tt(n,t);var i=n.prototype;return i.Ox=function(t){if(this.Rx.hasAttribute(t))return this.Rx.getAttribute(t)},i.Fx=function(t,n){if(this.Rx.hasAttributeNS(t,n))return this.Rx.getAttributeNS(t,n)},i.Ux=function(t){this.Rx.removeAttribute(t)},i.Vx=function(t,n){this.Rx.removeAttributeNS(t,n)},i.Hx=function(t,n){this.Rx.setAttribute(t,n)},i.qx=function(t,n,i){this.Rx.setAttributeNS(t,n,i)},i.Ex=function(t){return new n(this.Rx.cloneNode(t))},It(n,[{key:"mx",get:function(){return dc.lx}},{key:"yx",get:function(){var t;return null!=(t=this.Rx.localName)?t:kc(this.Rx.nodeName)}},{key:"Ax",get:function(){var t;return null!=(t=this.Rx.namespaceURI)?t:void 0}},{key:"Sx",get:function(){var t;return null!=(t=this.Rx.prefix)?t:void 0}},{key:"Cx",get:function(){return this.Rx.nodeName}},{key:"Mx",get:function(){return function(t){for(var n=[],i=0;i<t.length;i++)n.push(new wc(t.item(i)));return n}(this.Rx.attributes)}},{key:"Lx",get:function(){return this.Rx.textContent}}]),n}(bc),mc=function(){function t(t){this.Rx=void 0,this.Rx=t}return t.prototype.kx=function(t){return this.Ok===t.Ok},It(t,[{key:"Ok",get:function(){return this.Rx.nodeValue}},{key:"Nx",get:function(){return this.Rx}}]),t}(),pc=function(t){function n(n){return t.call(this,n)||this}return Tt(n,t),n.prototype.Ex=function(t){return new n(this.Rx.cloneNode(t))},It(n,[{key:"mx",get:function(){return dc.dk}}]),n}(mc),yc=function(t){function n(n){return t.call(this,n)||this}return Tt(n,t),n.prototype.Ex=function(t){return new n(this.Rx.cloneNode(t))},It(n,[{key:"mx",get:function(){return dc._x}}]),n}(mc),_c=function(t){function n(n){return t.call(this,n)||this}return Tt(n,t),n.prototype.Ex=function(t){return new n(this.Rx.cloneNode(t))},It(n,[{key:"mx",get:function(){return dc.gx}},{key:"Wx",get:function(){return new gc(this.Rx.documentElement)}}]),n}(bc);function Sc(t){return function(t){return 1===t.mx}(t)}function Tc(t){switch(t.nodeType){case dc.lx:return new gc(t);case dc.dk:return new pc(t);case dc._x:return new yc(t)}}function kc(t){var n=t.indexOf(":");return n<0?t:t.substr(n+1)}var Ic=function(t){function n(){var n;return(n=t.apply(this,arguments)||this).zx=void 0,n.Xx=ec(),n.Qx=Ht.im||Ht.H_,n.Yx=function(){if(Ht.dg&&Ht.vg<3)return!1;if(Ht.im)return!0;if(Ht.gg&&Ht.J_<=68)return!0;if(Ht.H_)return!0;if(Ht.Pg)return!0;return!1}(),n.nP=void 0,n.oP=new lc,n}return Tt(n,t),n.prototype.wx=function(t){return this.oP.wx(t)},It(n,[{key:"aw",get:function(){return this.zx||(this.zx=new ko(vh())),this.zx}},{key:"Gx",get:function(){return this.Xx}},{key:"jx",get:function(){return this.Qx}},{key:"Kx",get:function(){return this.Yx}},{key:"Jx",get:function(){return!1}},{key:"Zx",get:function(){return lh.nk()}},{key:"$x",get:function(){return{tP:gh}}},{key:"iP",get:function(){return v.connection&&v.connection.effectiveType||Dr}},{key:"eP",get:function(){return v.connection&&v.connection.type||Cr}},{key:"sP",get:function(){return Boolean(v.onLine)}},{key:"ff",get:function(){return this.nP||(this.nP=new qh(new vc)),this.nP}},{key:"rP",get:function(){return!(Ht.gg||Ht.dg||Ht.Pg)}}]),n}(Rr);Zt(new Ic),x(),pt(),x(),pt();x(),pt(),x(),pt(),x(),pt();var Ec=function(t){return t.rE="audio",t.Pl="video",t.UU="metadata",t}({});x(),pt(),x(),pt();var Rc=function(t){return t.jk="#EXTINF",t.eOt="#EXT-X-MAP",t.p="#EXTM3U",t.en="#EXT-X-VERSION",t.ui="#EXT-X-TARGETDURATION",t.kSt="#EXT-X-START",t.li="#EXT-X-INDEPENDENT-SEGMENTS",t.ck="#EXT-X-STREAM-INF",t.vr="#EXT-X-MEDIA-SEQUENCE",t.nv="#EXT-X-ENDLIST",t.sv="#EXT-X-MEDIA",t.cv="#EXT-X-DISCONTINUITY",t.av="#EXT-X-DISCONTINUITY-SEQUENCE",t.dv="#EXT-X-PLAYLIST-TYPE",t.lv="#EXT-X-KEY",t}({}),Oc=function(){function t(t,n){this.Vw="#EXTINF",this.gv=void 0,this.kv=void 0,this.gv=t,this.kv=n}return t.prototype.zI=function(){return this.Vw+":"+this.gv+",\n"+this.kv},t}(),Nc=function(){function t(t){this.Vw="#EXT-X-MAP",this.kv=void 0,this.kv=t}return t.prototype.zI=function(){return this.Vw+':URI="'+this.kv+'"'},t}(),Pc=function(){function t(){this.Vw="#EXTM3U"}return t.prototype.zI=function(){return this.Vw},t}(),Ac=function(){function t(t){this.Vw="#EXT-X-VERSION",this.OD=void 0,this.OD=t}return t.prototype.zI=function(){return this.Vw+":"+this.OD},t}(),Dc=function(){function t(t){this.Vw="#EXT-X-TARGETDURATION",this.jLt=void 0,this.jLt=t}return t.prototype.zI=function(){return this.Vw+":"+this.jLt},t}(),Cc=function(){function t(t){this.Vw="#EXT-X-START",this.QOt=void 0,this.QOt=t}return t.prototype.zI=function(){return this.Vw+":TIME-OFFSET="+this.QOt},t}(),xc=function(){function t(t,n,i){this.uri=void 0,this.keyFormat=void 0,this.keyFormatVersions=void 0,this.Vw=void 0,this.uri=t,this.keyFormat=n,this.keyFormatVersions=i,this.Vw="#EXT-X-KEY"}return t.prototype.zI=function(){return this.Vw+':METHOD=SAMPLE-AES,URI="'+this.uri+'",KEYFORMAT="'+this.keyFormat+'",KEYFORMATVERSIONS="'+this.keyFormatVersions+'"'},t}(),Bc=function(){function t(t){this.Vw="#EXT-X-STREAM-INF",this.bq=1,this.kv=void 0,this.kv=t}return t.prototype.zI=function(){return this.Vw+":BANDWIDTH="+this.bq+',AUDIO="audio"\n'+this.kv},t}(),Mc=function(){function t(t){this.Vw="#EXT-X-MEDIA-SEQUENCE",this.tM=void 0,this.tM=t}return t.prototype.zI=function(){return this.Vw+":"+this.tM},t}(),Fc=function(){function t(t){this.Vw="#EXT-X-MEDIA",this.kv=void 0,this.kv=t}return t.prototype.zI=function(){var t=Gr();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.kv+'"');var n=[];return t.forEach(function(t,i){return n.push(i+"="+t)}),this.Vw+":"+n.join(",")},t}();x(),pt();var Lc=function(){function t(t){this.uA=[],this.uA=t}var n=t.prototype;return n.xN=function(){return this.uA},n.jv=function(t){this.uA.push(t)},n.kVt=function(){for(var t,n="",i=Rt(this.xN());!(t=i()).done;){n+=t.value.zI()+"\n"}return n},n.Ku=function(){this.uA.length=0},t}(),Uc=function(t){function n(n,i){var e;return e=t.call(this,[new Pc,new Ac(8)])||this,i&&e.jv(new Bc("video/index.m3u8")),n&&e.jv(new Fc("audio/index.m3u8")),e}return Tt(n,t),n}(Lc);x(),pt(),x(),pt(),x(),pt();var zc=function(t){return t.Y7="HELLO",t.J7="HI_THERE",t.Z7="INITIALIZE",t.ttt="APPEND_INIT",t.itt="APPEND_DATA",t.ett="ACK",t.stt="REMOVE",t.ntt="DESTROY_SESSION",t}({});x(),pt(),x(),pt();var Wc,Vc=new Array(256);for(Wc=0;Wc<256;Wc+=1)Vc[Wc]=(Wc<16?"0":"")+Wc.toString(16);function Hc(){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(),pt();var qc=function(t){function n(n){var i;return(i=t.call(this,"append")||this).Ok=void 0,i.Ok=n,i}return Tt(n,t),n}(Ro),Xc=function(t){function n(){var n;return(n=t.apply(this,arguments)||this).nPt=0,n.Lp=new k(0),n.Wb=!1,n.tw=!1,n}Tt(n,t);var i=n.prototype;return i.f0=function(t,n){this.nPt+=n,this.Lp=ru([this.Lp,t]),this.Co(new qc(t))},i.Qs=function(){this.MS||(this.Co(new Ro("close")),this.Wb=!0)},It(n,[{key:"Dl",get:function(){return this.nPt}},{key:"Ok",get:function(){return this.Lp}},{key:"MS",get:function(){return this.Wb}},{key:"rw",get:function(){return this.tw},set:function(t){this.tw=t}}]),n}(Eo),jc="sync-seg-",Yc=function(){function t(t,n){this.sw=!1,this.kw=!1,this.tb=void 0,this.nb=void 0,this.o=jc+Hc(),this.tb=n?new Xc:void 0,this.nb=t?new Xc:void 0}return t.prototype.Qs=function(){this.tb&&this.tb.Qs(),this.nb&&this.nb.Qs()},It(t,[{key:"ab",get:function(){return this.sw},set:function(t){this.sw=t}},{key:"lb",get:function(){return this.kw},set:function(t){this.kw=t}}]),t}();x(),pt();var Kc=1.1,Gc=function(t){function n(n,i,e){var r;return(r=t.call(this,[new Pc,new Ac(8),new Dc(1),new Cc(0)])||this).qht=void 0,r.tg=void 0,r.ng=[],r.$yt=Gr(),r.znt=void 0,r.ig=0,r.ug=function(t){if(t.TO>=on)for(;r.ng.length>0;)r.sg()},e&&r.jv(new xc(e,"com.apple.streamingkeydelivery","1")),r.qht=n,r.znt=i,r.znt.jn("remove",r.ug),r.tg=new Mc(0),r.jv(r.tg),r}Tt(n,t);var i=n.prototype;return i.ZIt=function(){return this.qht===Ec.Pl?this.znt.lg:this.qht===Ec.rE?this.znt.bg:void 0},i.Fht=function(t){return this.$yt.get(t)},i.Ku=function(){this.ng.length=0,this.tg.tM=0,this.$yt.clear(),this.ig=0},i.xN=function(){return this.mg(),[].concat(t.prototype.xN.call(this),this.ng)},i.mg=function(){for(var t,n=Rt(this.znt.kg());!(t=n()).done;){var i=t.value;if(!this.$yt.has(i.o)){var e=void 0;if(this.qht===Ec.Pl?(e=i.tb,i.lb=!0):(e=i.nb,i.ab=!0),!e)return;this.$yt.set(i.o,e),e.rw&&this.ng.push(new Nc(i.o+"-init")),this.ng.push(new Oc(Kc,i.o)),this.ig+=Kc}}this.tm()},i.tm=function(){for(;this.ig>60;)this.sg()},i.sg=function(){var t=this.ng.shift();void 0!==t&&function(t){return t.Vw===Rc.jk}(t)&&(this.$yt.delete(t.kv),this.ig-=t.gv,this.tg.tM++)},n}(Lc);var $c=function(t){function n(n){var i;return(i=t.call(this,"remove")||this).TO=void 0,i.TO=n,i}return Tt(n,t),n}(Ro),Zc=function(t){function n(n,i){var e;return(e=t.call(this)||this).rm=void 0,e.om=void 0,e.sm=void 0,e.am=void 0,e.bm=void 0,e.km=void 0,e.ip=void 0,e.up=void 0,e.ty=void 0,e.ny=void 0,e.hy=void 0,e.rm=n,e.om=i,e.sm=[],e.bm=[],e.km=Gr(),e.ip=Gr(),e.up=Gr(),e.ty=0,e}Tt(n,t);var i=n.prototype;return i.kg=function(){return this.am?(this.sm=this.sm.filter(function(t){return!(t.lb&&t.ab)}),[].concat(this.sm,[this.am],this.bm)):[]},i.g0=function(t){this.my(t)},i.f0=function(t){this.my(t),this.ky(t),this.OS(t)},i.cc=function(t){this.my(t),this.OS(t)},i.Ku=function(){var t;null==(t=this.am)||t.Qs(),this.am=void 0,this.bm.forEach(function(t){return t.Qs()}),this.bm.length=0,this.sm.length=0,this.up=Gr(),this.ty=0},i.ky=function(t){var n=t.startPts,i=t.totalDuration;this.ip.set(t.mediaType,n+i)},i.AS=function(){if(this.am){this.am.Qs(),this.sm.push(this.am);var t=this.bm.shift(),n=new Yc(this.rm,this.om);t?(this.am=t,this.bm.push(n)):this.am=n}},i.BS=function(t){if(this.am){var n=!this.am.nb||0===this.am.nb.Dl,i=!this.am.tb||0===this.am.tb.Dl,e=this.am.nb&&this.am.nb.rw,r=this.am.tb&&this.am.tb.rw,o=i&&(n&&!(this.am.ab||this.am.lb)||e),u=n&&(i&&!(this.am.ab||this.am.lb)||r);(t===Ec.rE&&!u||t===Ec.Pl&&!o)&&(this.AS(),this.AS())}},i.my=function(t){var n=t.mediaType,i=t.kind,e=this.km.get(n);if(void 0===e){if(i===zc.ttt||i===zc.itt){var r=[t];this.km.set(n,r)}}else e.push(t)},i.OS=function(t){var n=this.RT(t);for(var i,e=Rt(n);!(i=e()).done;){var r=i.value;switch(r.kind){case zc.ttt:this.tk(r),this.up=Gr(),this.ty=0;break;case zc.stt:this.ik(r);break;case zc.itt:this.uk(r)}}},i.tk=function(t){var n=t.mediaType;void 0===this.am?(this.am=new Yc(this.rm,this.om),this.bm.push(new Yc(this.rm,this.om))):this.BS(n),n===Ec.Pl?(this.hy=t.segment,this.am.tb.rw=!0):n===Ec.rE&&(this.ny=t.segment,this.am.nb.rw=!0)},i.uk=function(t){var n,i,e=t.mediaType===Ec.rE,r=t.totalDuration,o=null!=(n=this.up.get(t.mediaType))?n:0;e?(this.am.nb.f0(t.segment,r),i=o+this.am.nb.Dl):(this.am.tb.f0(t.segment,r),i=o+this.am.tb.Dl),i>=this.ty+Kc&&(this.up.set(t.mediaType,i),this.ty+=Kc,this.AS())},i.ik=function(t){this.ip.set(t.mediaType,void 0),this.BS(t.mediaType),this.sm.length=0,this.Co(new $c(t.endTime))},i.RT=function(t){var n=this;if(t.kind===zc.stt)return this.sk(t);var i=[];return this.km.forEach(function(t){if(t&&t.length>0){var e=un(t,function(t){return t.kind===zc.stt});-1===e&&(e=t.length);for(var r,o=Rt(t.slice(0,e));!(r=o()).done;){var u=r.value;if(!cn(i,u)){var s,f=n.sk(u);if(f.length>0)(s=i).push.apply(s,[].concat(f));else if(u.kind===zc.itt)break}}}}),i},i.sk=function(t){var n=this.km.get(t.mediaType),i=function(t){return t===Ec.Pl?Ec.rE:Ec.Pl}(t.mediaType);if(!(i===Ec.Pl?this.om:this.rm))return n.splice(0,n.indexOf(t)+1);if(t.kind===zc.ttt)return[];var e=this.ip.get(i);if(void 0===e)return[];if(t.kind===zc.stt){var r=this.ak(i);if(r.length>0){var o=n.splice(0,n.indexOf(t));return n.splice(0,1),[].concat(o,r,[t])}return[]}if(t.startPts<=e){var u=n.splice(0,n.indexOf(t));n.splice(0,1);var s=this.mk(t,u,i);return[].concat(u,s,[t])}return[]},i.mk=function(t,n,i){var e=this.km.get(i);if(!e)return[];var r=t.startPts+t.totalDuration,o=un(e,function(t){return t.kind===zc.stt}),u=o-1;-1===o&&(u=e.length-1);for(var s=u+1,f=0;f<=u&&s===u+1;f++){var h=e[f];h.kind===zc.itt&&h.startPts>r&&(s=f)}var c=-1;return-1!==un(n,function(t){return t.kind===zc.ttt})&&(c=un(e,function(t){return t.kind===zc.ttt})),c>s&&(s=c+1),s>0?(e[s-1].kind===zc.ttt&&(s-=1),e.splice(0,s)):[]},i.ak=function(t){var n=this.km.get(t);if(n){var i=un(n,function(t){return t.kind===zc.stt});if(i>=0)return n.splice(0,i+1)}return[]},i.kk=function(){var t="[MEDIABUFFER] endPTS: ";this.ip.forEach(function(n,i){t=t.concat(i+" = "+n+" ")}),jt.Zp(t)},i.SI=function(t,n){var i=t+": [";null==n||n.forEach(function(t){i=i.concat(" "+t.kind+"("+t.mediaType+")")}),i=i.concat(" ]"),jt.Zp(i)},It(n,[{key:"bg",get:function(){var t;return null==(t=this.ny)?void 0:t.slice()}},{key:"lg",get:function(){var t;return null==(t=this.hy)?void 0:t.slice()}}]),n}(Eo);var Jc=function(){function t(t,n){this.IE=void 0,this.ME=void 0,this.TR=void 0,this.CR=void 0;var i=t.some(function(t){return t.match("audio")}),e=t.some(function(t){return t.match("video")});this.ME=new Zc(i,e),this.IE=new Uc(i,e),i&&(this.TR=new Gc(Ec.rE,this.ME,n)),e&&(this.CR=new Gc(Ec.Pl,this.ME,n))}var n=t.prototype;return n.BR=function(t){var n,i,e=Qc(t);return e===Ec.Pl?null==(n=this.CR)?void 0:n.ZIt():e===Ec.rE?null==(i=this.TR)?void 0:i.ZIt():void 0},n.Fht=function(t){var n,i,e=t.split("/")[1],r=Qc(t);return r===Ec.Pl?null==(n=this.CR)?void 0:n.Fht(e):r===Ec.rE?null==(i=this.TR)?void 0:i.Fht(e):void 0},n.g0=function(t){this.ME.g0(t)},n.f0=function(t){this.ME.f0(t)},n.ddt=function(t){this.ME.cc(t)},n.Ku=function(){var t,n;this.ME.Ku(),this.IE.Ku(),null==(t=this.TR)||t.Ku(),null==(n=this.CR)||n.Ku()},It(t,[{key:"IN",get:function(){return this.IE}},{key:"SP",get:function(){return this.TR}},{key:"XP",get:function(){return this.CR}}]),t}();function Qc(t){return t.match(/video/)?Ec.Pl:Ec.rE}var ta=function(){function t(t,n){var i=this;this.ID=void 0,this.PC=void 0,this.mat=void 0,this.jQt=void 0,this.ID=t,this.PC=n,this.mat=void 0,this.jQt=function(t){return nn(function(){var n,i;return en(this,function(e){switch((n=t.data).kind){case zc.Z7:this.mat=new Jc(n.mediaBufferConfigs,n.fairPlaySdkUri);break;case zc.ttt:this.mat.g0(n);break;case zc.itt:this.mat.f0(n);break;case zc.stt:this.mat.ddt(n)}return i={kind:zc.ett},this.ID.postMessage(i),[2]})}).call(i)},this.ID.onmessage=this.jQt}var n=t.prototype;return n.kVt=function(t){return"master.m3u8"===t?this.mat.IN:"video/index.m3u8"===t?this.mat.XP:"audio/index.m3u8"===t?this.mat.SP:void 0},n.CC=function(t){if(t.match(/m3u8/)){var n,i=null==(n=this.kVt(t))?void 0:n.kVt();return new Response(i,{headers:{"Content-Type":"application/x-mpegurl; charset=utf-8"}})}if(t.match(jc)){var e={"Content-Type":t.match(/video/)?"video/mp4":"audio/mp4"};if(t.match(/init/)){var r,o=null==(r=this.mat)?void 0:r.BR(t);return new Response(o,{headers:e})}var u=this.Lht(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.Ok)},e=function(){n.close(),t.yn("append",i),t.yn("close",e)};return new self.ReadableStream({start:function(r){(n=r).enqueue(t.Ok),t.MS?n.close():(t.jn("append",i),t.jn("close",e))},cancel:function(){t.yn("append",i),t.yn("close",e)}})}(u);return new Response(s,{headers:e})}return new Response(void 0,{status:404,statusText:"Not Found"})},n.Lht=function(t){return this.mat.Fht(t)},n.close=function(){var t;this.ID.close(),null==(t=this.mat)||t.Ku()},t}(),na=function(){function t(){var t=this;this.H4=Gr(),this.TQt=void 0,this.jQt=function(n){var i=n.data;if(i.kind===zc.Y7){t.UC().catch(Jt);var e=i.port,r=Hc(),o=new ta(e,n.source.id);t.H4.set(r,o);var u=function(n){n.data.kind===zc.ntt&&(t.uz(r),e.removeEventListener("message",u))};e.addEventListener("message",u);var s={kind:zc.J7,sessionId:r};e.postMessage(s)}},this.hz=function(n){if(bo(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.H4.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.CC(r);n.respondWith(f)}}}var n=t.prototype;return n.br=function(t){this.TQt=t,t.addEventListener("message",this.jQt),t.addEventListener("fetch",this.hz)},n.uz=function(t){var n=this.H4.get(t);n&&n.close(),this.H4.delete(t)},n.UC=function(){return nn(function(){var t,n,i;return en(this,function(e){switch(e.label){case 0:return t=this,[4,this.TQt.clients.matchAll()];case 1:return n=e.sent(),i=n.map(function(t){return t.id}),this.H4.forEach(function(n,e){cn(i,n.PC)||t.uz(e)}),[2]}})}).call(this)},t}();na.az=new na;var ia=self;ia.addEventListener("install",function(t){t.waitUntil(ia.skipWaiting())}),ia.addEventListener("activate",function(t){t.waitUntil(ia.clients.claim())}),na.az.br(ia)}("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof a?a:"undefined"!=typeof global?global:this);
|
|
31
31
|
//# sourceMappingURL=theoplayer.sw.js.map
|