@theoplayer/theoads 9.8.0 → 9.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/THEOplayer.chromeless.d.ts +1 -1
- package/THEOplayer.chromeless.esm.js +2 -2
- package/THEOplayer.chromeless.js +3 -3
- package/THEOplayer.common.esm.js +3 -3
- package/THEOplayer.d.ts +1 -1
- package/THEOplayer.esm.js +3 -3
- package/THEOplayer.js +3 -3
- package/THEOplayer.transmux.asmjs.js +3 -3
- package/THEOplayer.transmux.js +3 -3
- package/package.json +1 -1
- package/theoplayer.d.js +3 -3
- package/theoplayer.sw.js +2 -2
package/theoplayer.sw.js
CHANGED
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
THEOplayer is based on patented technology developed by
|
|
25
25
|
THEO Technologies (https://www.theoplayer.com).
|
|
26
26
|
|
|
27
|
-
Version: 9.8.
|
|
28
|
-
Created: 2025-07-
|
|
27
|
+
Version: 9.8.1
|
|
28
|
+
Created: 2025-07-15T17:13:37.402Z
|
|
29
29
|
*/
|
|
30
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,I=t.Uint8Array,E=(t.Worker,t.WorkerGlobalScope,t.XMLHttpRequest),k=p.create,R=p.defineProperty,O=p.getOwnPropertyDescriptor,N=p.getOwnPropertyNames,P=p.getPrototypeOf,A=p.prototype.hasOwnProperty,D=function(t,n){return function(){return t&&(n=t(t=0)),n}},C=function(t,n){return function(){return n||t((n={exports:{}}).exports,n),n.exports}},x=D((function(){"function"==typeof Symbol&&Symbol.iterator?(n=Symbol,i=null!=(u=Symbol.for)?u:Symbol,e=Symbol.iterator,r=null!=(s=Symbol.dispose)?s:i("Symbol.dispose"),o=null!=(f=Symbol.asyncDispose)?f:i("Symbol.asyncDispose")):(h=0,n=function(t){return"ul"+t+"_"+ ++h},e=(i=function(t){return"ul"+t})("Symbol.iterator"),r=i("Symbol.dispose"),o=i("Symbol.asyncDispose"),n.for=i,n.iterator=e,n.dispose=r,n.asyncDispose=o)}));function B(t,i){return null!=i&&void 0!==n&&i[n.hasInstance]?!!i[n.hasInstance](t):B(t,i)}var M=D((function(){x(),pt(),M()}));function L(t){return t&&void 0!==n&&t.constructor===n?"symbol":typeof t}var U,F,z,W,V,q,H,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":L(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":L(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.Fa=0,this.ttn=!1,this.BTt=void 0,this.ntn=[],lt(t,this)}function ht(t,n){for(;3===t.Fa;)t=t.BTt;0!==t.Fa?(t.ttn=!0,ft.itn((function(){var i=1===t.Fa?n.onFulfilled:n.onRejected;if(null!==i){var e;try{e=i(t.BTt)}catch(t){return void at(n.promise,t)}ct(n.promise,e)}else(1===t.Fa?ct:at)(n.promise,t.BTt)}))):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":L(n))||"function"==typeof n)){var i=n.then;if(B(n,ft))return t.Fa=3,t.BTt=n,void vt(t);if("function"==typeof i)return void lt(function(t,n){return function(){t.apply(n,arguments)}}(i,n),t)}t.Fa=1,t.BTt=n,vt(t)}catch(n){at(t,n)}}function at(t,n){t.Fa=2,t.BTt=n,vt(t)}function vt(t){2===t.Fa&&0===t.ntn.length&&ft.itn((function(){t.ttn||ft.rtn(t.BTt)}));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:F.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(),U=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":L(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":L(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){U(t,0)},ft.rtn=function(t){"undefined"!=typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",t)},F=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,q=W?Number(W[1]):0,H=z.match(/(Version)\/((\d+)\.(\d+)(?:\.(\d+))?).*Safari/),X=null!=H,j=H?Number(H[3]):0,Y=function(){function t(t){this.eA=0,this.Id=0,this.Hp=[],this.etn=t}return t.prototype.stn=function(t){var n=this.length();this.utn(n+1);var i=this.Id+n&this.etn-1;this.Hp[i]=t,this.eA=n+1},t.prototype.push=function(t){var n=this.length()+1;if(this.etn<n)this.stn(t);else{var i=this.Id+n-1,e=this.etn-1;this.Hp[i&e]=t,this.eA=n}},t.prototype.shift=function(){var t=this.Id,n=this.Hp[t];return this.Hp[t]=void 0,this.Id=t+1&this.etn-1,this.eA--,n},t.prototype.length=function(){return this.eA},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.Id+this.eA&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.Hp,0,n,i)},t}(),K="unhandledrejection",G=self.PromiseRejectionEvent,$=self.CustomEvent,Z=function(t){return Z=function(){try{var t=F.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&&q<60||X&&j<15,F&&!Q?(tt=F,function(){}):(tt=ft,nt=null!==(J=function(){var t=self.queueMicrotask;if("function"==typeof t)return function(n){return t(n)};var n=F;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={K6:function(r){n.push(r),i||(i=!0,t(e))},OY:e=function(){for(;n.length()>0;)n.shift()();i=!1}}).OY,ft.itn=it.K6,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"===L(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":L(t))&&null!==t||"function"==typeof t}function f(t){return t.slice()}function h(t,n,i,e,r){new I(t).set(new I(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(_),E=tt.reject.bind(_);function k(t){return new _(t)}function R(t){return T(t)}function O(t){return E(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.hd=0,this.Ed=0,this.Id={Rd:[],Dd:void 0},this.Nd=this.Id,this.hd=0,this.Ed=0}return p.defineProperty(t.prototype,"length",{get:function(){return this.Ed},enumerable:!0,configurable:!0}),t.prototype.push=function(t){var n=this.Nd,i=n;16383===n.Rd.length&&(i={Rd:[],Dd:void 0}),n.Rd.push(t),i!==n&&(this.Nd=i,n.Dd=i),++this.Ed},t.prototype.shift=function(){var t=this.Id,n=t,i=this.hd,e=i+1,r=t.Rd,o=r[i];return 16384===e&&(n=t.Dd,e=0),--this.Ed,this.hd=e,t!==n&&(this.Id=n),r[i]=void 0,o},t.prototype.forEach=function(t){for(var n=this.hd,i=this.Id,e=i.Rd;!(n===e.length&&void 0===i.Dd||n===e.length&&(n=0,0===(e=(i=i.Dd).Rd).length));)t(e[n]),++n},t.prototype.peek=function(){var t=this.Id,n=this.hd;return t.Rd[n]},t}();function 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 U(t,n){t.Ld=!0,t.Bd=n,n.Od=t,"readable"===n.Fa?V(t):"closed"===n.Fa?function(t){V(t),X(t)}(t):q(t,n.Fd)}function F(t,n){return Zn(t.Bd,n)}function z(t){"readable"===t.Bd.Fa?H(t,new m("Reader was released and can no longer be used to monitor the stream's closedness")):function(t,n){q(t,n)}(t,new m("Reader was released and can no longer be used to monitor the stream's closedness")),t.Bd.Od=void 0,t.Bd=void 0}function W(t){return new m("Cannot "+t+" a stream using a released reader")}function V(t){t.Vd=k((function(n,i){t.Wd=n,t.Ud=i}))}function q(t,n){V(t),H(t,n)}function H(t,n){x(t.Vd),t.Ud(n),t.Wd=void 0,t.Ud=void 0}function X(t){t.Wd(void 0),t.Wd=void 0,t.Ud=void 0}var j=i("[[CancelSteps]]"),Y=i("[[PullSteps]]");function K(t,n){void 0===n&&(n=!1);var i=new it(t);return i.Ld=n,i}function G(t){return k((function(n,i){var e={Gd:n,Zd:i};t.Od.Xd.push(e)}))}function $(t,n,i){var e=t.Od;e.Xd.shift().Gd(M(n,i,e.Ld))}function Z(t){return t.Od.Xd.length}function J(t){var n=t.Od;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");U(this,t),this.Xd=new B}return p.defineProperty(t.prototype,"closed",{get:function(){return et(this)?this.Vd:O(ot("closed"))},enumerable:!0,configurable:!0}),t.prototype.cancel=function(t){return et(this)?void 0===this.Bd?O(W("cancel")):F(this,t):O(ot("cancel"))},t.prototype.read=function(){return et(this)?void 0===this.Bd?O(W("read from")):rt(this):O(ot("read"))},t.prototype.releaseLock=function(){if(!et(this))throw ot("releaseLock");if(void 0!==this.Bd){if(this.Xd.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,"Xd")}function rt(t){var n=t.Bd;return n.Hd=!0,"closed"===n.Fa?R(M(void 0,!0,t.Ld)):"errored"===n.Fa?O(n.Fd):n.zd[Y]()}function ot(t){return new m("ReadableStreamDefaultReader.prototype."+t+" can only be used on a ReadableStreamDefaultReader")}"symbol"===L(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.qd;return void 0===t.Bd?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.qd;if(void 0===n.Bd)return O(W("finish iterating"));if(n.Xd.length>0)return O(new m("Tried to release a reader lock when that reader has pending read() calls un-settled"));if(!1===this.Yd){var i=F(n,t);return z(n),C(i,(function(){return M(t,!0,!0)}))}return z(n),R(M(t,!0,!0))}};function st(t){return!!s(t)&&!!p.prototype.hasOwnProperty.call(t,"qd")}function ft(t){return new m("ReadableStreamAsyncIterator."+t+" can only be used on a ReadableSteamAsyncIterator")}function ht(t){var n=t.Kd.shift();return t.Qd-=n.size,t.Qd<0&&(t.Qd=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.Kd.push({value:n,size:i}),t.Qd+=i}function at(t){t.Kd=new B,t.Qd=0}void 0!==nt&&p.setPrototypeOf(ut,nt),p.defineProperty(ut,"next",{enumerable:!1}),p.defineProperty(ut,"return",{enumerable:!1});var vt=i("[[AbortSteps]]"),dt=i("[[ErrorSteps]]"),lt=function(){function t(t,n){void 0===t&&(t={}),void 0===n&&(n={}),bt(this);var i=n.size,e=n.highWaterMark;if(void 0!==t.type)throw new RangeError("Invalid type is specified");var r=b(i);void 0===e&&(e=1),function(t,n,i,e){var r=p.create(xt.prototype);function o(){return d(n,"start",[r])}var u=v(n,"write",1,[r]),s=v(n,"close",0,[]),f=v(n,"abort",1,[]);Bt(t,r,o,u,s,f,i,e)}(this,t,e=w(e),r)}return p.defineProperty(t.prototype,"locked",{get:function(){if(!1===gt(this))throw Vt("locked");return mt(this)},enumerable:!0,configurable:!0}),t.prototype.abort=function(t){return!1===gt(this)?O(Vt("abort")):!0===mt(this)?O(new m("Cannot abort a stream that already has a writer")):pt(this,t)},t.prototype.close=function(){return!1===gt(this)?O(Vt("close")):!0===mt(this)?O(new m("Cannot close a stream that already has a writer")):!0===It(this)?O(new m("Cannot close an already-closing stream")):yt(this)},t.prototype.getWriter=function(){if(!1===gt(this))throw Vt("getWriter");return wt(this)},t}();function wt(t){return new Rt(t)}function bt(t){t.Fa="writable",t.Fd=void 0,t.Jd=void 0,t.$d=void 0,t.tf=new B,t.ef=void 0,t.nf=void 0,t.rf=void 0,t.hf=void 0,t.uf=!1}function gt(t){return!!s(t)&&!!p.prototype.hasOwnProperty.call(t,"$d")}function mt(t){return void 0!==t.Jd}function pt(t,n){var i=t.Fa;if("closed"===i||"errored"===i)return R(void 0);if(void 0!==t.hf)return t.hf.cf;var e=!1;"erroring"===i&&(e=!0,n=void 0);var r=k((function(i,r){t.hf={cf:void 0,Gd:i,Zd:r,lf:n,df:e}}));return t.hf.cf=r,!1===e&&St(t,n),r}function yt(t){var n=t.Fa;if("closed"===n||"errored"===n)return O(new m("The stream (in "+n+" state) is not in the writable state and cannot be closed"));var i=k((function(n,i){var e={Gd:n,Zd:i};t.nf=e})),e=t.Jd;return void 0!==e&&!0===t.uf&&"writable"===n&&Qt(e),function(t){ct(t,"close",0),Ut(t)}(t.$d),i}function _t(t,n){"writable"!==t.Fa?Tt(t):St(t,n)}function St(t,n){var i=t.$d;t.Fa="erroring",t.Fd=n;var e=t.Jd;void 0!==e&&At(e,n),!1===function(t){return void 0!==t.ef||void 0!==t.rf}(t)&&!0===i._f&&Tt(t)}function Tt(t){t.Fa="errored",t.$d[dt]();var n=t.Fd;if(t.tf.forEach((function(t){t.Zd(n)})),t.tf=new B,void 0!==t.hf){var i=t.hf;if(t.hf=void 0,!0===i.df)return i.Zd(n),void Et(t);P(t.$d[vt](i.lf),(function(){i.Gd(),Et(t)}),(function(n){i.Zd(n),Et(t)}))}else Et(t)}function It(t){return void 0!==t.nf||void 0!==t.rf}function Et(t){void 0!==t.nf&&(t.nf.Zd(t.Fd),t.nf=void 0);var n=t.Jd;void 0!==n&&Yt(n,t.Fd)}function kt(t,n){var i=t.Jd;void 0!==i&&n!==t.uf&&(!0===n?function(t){Gt(t)}(i):Qt(i)),t.uf=n}var Rt=function(){function t(t){if(!1===gt(t))throw new m("WritableStreamDefaultWriter can only be constructed with a WritableStream instance");if(!0===mt(t))throw new m("This stream has already been locked for exclusive writing by another writer");this.vf=t,t.Jd=this;var n=t.Fa;if("writable"===n)!1===It(t)&&!0===t.uf?Gt(this):Zt(this),Xt(this);else if("erroring"===n)$t(this,t.Fd),Xt(this);else if("closed"===n)Zt(this),function(t){Xt(t),Kt(t)}(this);else{var i=t.Fd;$t(this,i),jt(this,i)}}return p.defineProperty(t.prototype,"closed",{get:function(){return!1===Ot(this)?O(qt("closed")):this.Vd},enumerable:!0,configurable:!0}),p.defineProperty(t.prototype,"desiredSize",{get:function(){if(!1===Ot(this))throw qt("desiredSize");if(void 0===this.vf)throw Ht("desiredSize");return function(t){var n=t.vf,i=n.Fa;return"errored"===i||"erroring"===i?null:"closed"===i?0:Lt(n.$d)}(this)},enumerable:!0,configurable:!0}),p.defineProperty(t.prototype,"ready",{get:function(){return!1===Ot(this)?O(qt("ready")):this.gf},enumerable:!0,configurable:!0}),t.prototype.abort=function(t){return!1===Ot(this)?O(qt("abort")):void 0===this.vf?O(Ht("abort")):function(t,n){var i=t.vf;return pt(i,n)}(this,t)},t.prototype.close=function(){if(!1===Ot(this))return O(qt("close"));var t=this.vf;return void 0===t?O(Ht("close")):!0===It(t)?O(new m("Cannot close an already-closing stream")):Nt(this)},t.prototype.releaseLock=function(){if(!1===Ot(this))throw qt("releaseLock");void 0!==this.vf&&Dt(this)},t.prototype.write=function(t){return!1===Ot(this)?O(qt("write")):void 0===this.vf?O(Ht("write to")):Ct(this,t)},t}();function Ot(t){return!!s(t)&&!!p.prototype.hasOwnProperty.call(t,"vf")}function Nt(t){return yt(t.vf)}function Pt(t,n){"pending"===t.mf?Yt(t,n):function(t,n){jt(t,n)}(t,n)}function At(t,n){"pending"===t.pf?Jt(t,n):function(t,n){$t(t,n)}(t,n)}function Dt(t){var n=t.vf,i=new m("Writer was released and can no longer be used to monitor the stream's closedness");At(t,i),Pt(t,i),n.Jd=void 0,t.vf=void 0}function Ct(t,n){var i=t.vf,e=i.$d,r=function(t,n){try{return t.wf(n)}catch(n){return Ft(t,n),1}}(e,n);if(i!==t.vf)return O(Ht("write to"));var o=i.Fa;if("errored"===o)return O(i.Fd);if(!0===It(i)||"closed"===o)return O(new m("The stream is closing or closed and cannot be written to"));if("erroring"===o)return O(i.Fd);var u=function(t){return k((function(n,i){var e={Gd:n,Zd:i};t.tf.push(e)}))}(i);return function(t,n,i){var e={chunk:n};try{ct(t,e,i)}catch(n){return void Ft(t,n)}var r=t.yf;!1===It(r)&&"writable"===r.Fa&&kt(r,zt(t)),Ut(t)}(e,n,r),u}var xt=function(){function t(){throw new m("WritableStreamDefaultController cannot be constructed explicitly")}return t.prototype.error=function(t){if(!1===function(t){return!!s(t)&&!!p.prototype.hasOwnProperty.call(t,"yf")}(this))throw new m("WritableStreamDefaultController.prototype.error can only be used on a WritableStreamDefaultController");"writable"===this.yf.Fa&&Wt(this,t)},t.prototype[vt]=function(t){var n=this.bf(t);return Mt(this),n},t.prototype[dt]=function(){at(this)},t}();function Bt(t,n,i,e,r,o,u,s){n.yf=t,t.$d=n,n.Kd=void 0,n.Qd=void 0,at(n),n._f=!1,n.wf=s,n.Af=u,n.Sf=e,n.Tf=r,n.bf=o;var f=zt(n);kt(t,f),P(R(i()),(function(){n._f=!0,Ut(n)}),(function(i){n._f=!0,_t(t,i)}))}function Mt(t){t.Sf=void 0,t.Tf=void 0,t.bf=void 0,t.wf=void 0}function Lt(t){return t.Af-t.Qd}function Ut(t){var n=t.yf;if(!1!==t._f&&void 0===n.ef)if("erroring"!==n.Fa){if(0!==t.Kd.length){var i=function(t){return t.Kd.peek().value}(t);"close"===i?function(t){var n=t.yf;(function(t){t.rf=t.nf,t.nf=void 0})(n),ht(t);var i=t.Tf();Mt(t),P(i,(function(){!function(t){t.rf.Gd(void 0),t.rf=void 0,"erroring"===t.Fa&&(t.Fd=void 0,void 0!==t.hf&&(t.hf.Gd(),t.hf=void 0)),t.Fa="closed";var n=t.Jd;void 0!==n&&Kt(n)}(n)}),(function(t){!function(t,n){t.rf.Zd(n),t.rf=void 0,void 0!==t.hf&&(t.hf.Zd(n),t.hf=void 0),_t(t,n)}(n,t)}))}(t):function(t,n){var i=t.yf;!function(t){t.ef=t.tf.shift()}(i);var e=t.Sf(n);P(e,(function(){!function(t){t.ef.Gd(void 0),t.ef=void 0}(i);var n=i.Fa;if(ht(t),!1===It(i)&&"writable"===n){var e=zt(t);kt(i,e)}Ut(t)}),(function(n){"writable"===i.Fa&&Mt(t),function(t,n){t.ef.Zd(n),t.ef=void 0,_t(t,n)}(i,n)}))}(t,i.chunk)}}else Tt(n)}function Ft(t,n){"writable"===t.yf.Fa&&Wt(t,n)}function zt(t){return Lt(t)<=0}function Wt(t,n){var i=t.yf;Mt(t),St(i,n)}function Vt(t){return new m("WritableStream.prototype."+t+" can only be used on a WritableStream")}function qt(t){return new m("WritableStreamDefaultWriter.prototype."+t+" can only be used on a WritableStreamDefaultWriter")}function Ht(t){return new m("Cannot "+t+" a stream using a released writer")}function Xt(t){t.Vd=k((function(n,i){t.Wd=n,t.Ud=i,t.mf="pending"}))}function jt(t,n){Xt(t),Yt(t,n)}function Yt(t,n){x(t.Vd),t.Ud(n),t.Wd=void 0,t.Ud=void 0,t.mf="rejected"}function Kt(t){t.Wd(void 0),t.Wd=void 0,t.Ud=void 0,t.mf="resolved"}function Gt(t){t.gf=k((function(n,i){t.kf=n,t.Ef=i})),t.pf="pending"}function $t(t,n){Gt(t),Jt(t,n)}function Zt(t){Gt(t),Qt(t)}function Jt(t,n){x(t.gf),t.Ef(n),t.kf=void 0,t.Ef=void 0,t.pf="rejected"}function Qt(t){t.kf(void 0),t.kf=void 0,t.Ef=void 0,t.pf="fulfilled"}function tn(t){if("object"!==(void 0===t?"undefined":L(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":L(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.Hd=!0;var h=!1,c=R(void 0);return k((function(a,v){var d,l,w,b;if(void 0!==u){if(d=function(){var i=new rn("Aborted","AbortError"),r=[];!1===e&&r.push((function(){return"writable"===n.Fa?pt(n,i):R(void 0)})),!1===o&&r.push((function(){return"readable"===t.Fa?Zn(t,i):R(void 0)})),_((function(){return tt.all(r.map((function(t){return t()})))}),!0,i)},!0===u.aborted)return void d();u.addEventListener("abort",d)}if(y(t,s.Vd,(function(t){!1===e?_((function(){return pt(n,t)}),!0,t):S(!0,t)})),y(n,f.Vd,(function(n){!1===o?_((function(){return Zn(t,n)}),!0,n):S(!0,n)})),l=t,w=s.Vd,b=function(){!1===i?_((function(){return function(t){var n=t.vf,i=n.Fa;return!0===It(n)||"closed"===i?R(void 0):"errored"===i?O(n.Fd):Nt(t)}(f)})):S()},"closed"===l.Fa?b():A(w,b),!0===It(n)||"closed"===n.Fa){var g=new m("the destination writable stream closed before all data could be piped to it");!1===o?_((function(){return Zn(t,g)}),!0,g):S(!0,g)}function p(){var t=c;return N(c,(function(){return t!==c?p():void 0}))}function y(t,n,i){"errored"===t.Fa?i(t.Fd):D(n,i)}function _(t,i,e){function r(){P(t(),(function(){return T(i,e)}),(function(t){return T(!0,t)}))}!0!==h&&(h=!0,"writable"===n.Fa&&!1===It(n)?A(p(),r):r())}function S(t,i){!0!==h&&(h=!0,"writable"===n.Fa&&!1===It(n)?A(p(),(function(){return T(t,i)})):T(t,i))}function T(t,n){Dt(f),z(s),void 0!==u&&u.removeEventListener("abort",d),t?v(n):a(void 0)}x(k((function(t,n){!function i(e){e?t():N(!0===h?R(!0):N(f.gf,(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.xf(t);return cn(this),n},t.prototype[Y]=function(){var t=this.If;if(this.Kd.length>0){var n=ht(this);return!0===this.Rf&&0===this.Kd.length?(cn(this),Jn(t)):fn(this),R(M(n,!1,t.Od.Ld))}var i=G(t);return fn(this),i},t}();function sn(t){return!!s(t)&&!!p.prototype.hasOwnProperty.call(t,"If")}function fn(t){!1!==hn(t)&&(!0!==t.Cf?(t.Cf=!0,P(t.Pf(),(function(){t.Cf=!1,!0===t.Df&&(t.Df=!1,fn(t))}),(function(n){dn(t,n)}))):t.Df=!0)}function hn(t){var n=t.If;return!1!==wn(t)&&!1!==t._f&&(!0===$n(n)&&Z(n)>0||ln(t)>0)}function cn(t){t.Pf=void 0,t.xf=void 0,t.wf=void 0}function an(t){var n=t.If;t.Rf=!0,0===t.Kd.length&&(cn(t),Jn(n))}function vn(t,n){var i=t.If;if(!0===$n(i)&&Z(i)>0)$(i,n,!1);else{var e=void 0;try{e=t.wf(n)}catch(n){throw dn(t,n),n}try{ct(t,n,e)}catch(n){throw dn(t,n),n}}fn(t)}function dn(t,n){var i=t.If;"readable"===i.Fa&&(at(t),cn(t),Qn(i,n))}function ln(t){var n=t.If.Fa;return"errored"===n?null:"closed"===n?0:t.Af-t.Qd}function wn(t){var n=t.If.Fa;return!1===t.Rf&&"readable"===n}function bn(t,n,i,e,r,o,u){n.If=t,n.Kd=void 0,n.Qd=void 0,at(n),n._f=!1,n.Rf=!1,n.Df=!1,n.Cf=!1,n.wf=u,n.Af=o,n.Pf=e,n.xf=r,t.zd=n,P(R(i()),(function(){n._f=!0,fn(n)}),(function(t){dn(n,t)}))}function gn(t){return new m("ReadableStreamDefaultController.prototype."+t+" can only be used on a ReadableStreamDefaultController")}var mn=Number.isInteger||function(t){return"number"==typeof t&&isFinite(t)&&y.floor(t)===t},pn=function(){function t(){throw new m("ReadableStreamBYOBRequest cannot be used directly")}return p.defineProperty(t.prototype,"view",{get:function(){if(!1===Sn(this))throw Un("view");return this.Nf},enumerable:!0,configurable:!0}),t.prototype.respond=function(t){if(!1===Sn(this))throw Un("respond");if(void 0===this.Mf)throw new m("This BYOB request has been invalidated");this.Nf.buffer,function(t,n){if(!1===c(n=Number(n)))throw new RangeError("bytesWritten must be a finite");Dn(t,n)}(this.Mf,t)},t.prototype.respondWithNewView=function(t){if(!1===Sn(this))throw Un("respond");if(void 0===this.Mf)throw new m("This BYOB request has been invalidated");if(!ArrayBuffer.isView(t))throw new m("You can only respond with array buffer views");t.buffer,function(t,n){var i=t.Lf.peek();if(i.byteOffset+i.bytesFilled!==n.byteOffset)throw new RangeError("The region specified by view does not match byobRequest");if(i.byteLength!==n.byteLength)throw new RangeError("The buffer of view has different capacity than byobRequest");i.buffer=n.buffer,Dn(t,n.byteLength)}(this.Mf,t)},t}(),yn=function(){function t(){throw new m("ReadableByteStreamController constructor cannot be used directly")}return p.defineProperty(t.prototype,"byobRequest",{get:function(){if(!1===_n(this))throw Fn("byobRequest");if(void 0===this.Bf&&this.Lf.length>0){var t=this.Lf.peek(),n=new I(t.buffer,t.byteOffset+t.bytesFilled,t.byteLength-t.bytesFilled),i=p.create(pn.prototype);!function(t,n,i){t.Mf=n,t.Nf=i}(i,this,n),this.Bf=i}return this.Bf},enumerable:!0,configurable:!0}),p.defineProperty(t.prototype,"desiredSize",{get:function(){if(!1===_n(this))throw Fn("desiredSize");return Mn(this)},enumerable:!0,configurable:!0}),t.prototype.close=function(){if(!1===_n(this))throw Fn("close");if(!0===this.Rf)throw new m("The stream has already been closed; do not close it again!");var t=this.Of.Fa;if("readable"!==t)throw new m("The stream (in "+t+" state) is not in the readable state and cannot be closed");!function(t){var n=t.Of;if(t.Qd>0)t.Rf=!0;else{if(t.Lf.length>0&&t.Lf.peek().bytesFilled>0){var i=new m("Insufficient bytes to fill elements in the given buffer");throw Bn(t,i),i}xn(t),Jn(n)}}(this)},t.prototype.enqueue=function(t){if(!1===_n(this))throw Fn("enqueue");if(!0===this.Rf)throw new m("stream is closed or draining");var n=this.Of.Fa;if("readable"!==n)throw new m("The stream (in "+n+" state) is not in the readable state and cannot be enqueued to");if(!ArrayBuffer.isView(t))throw new m("You can only enqueue array buffer views when using a ReadableByteStreamController");t.buffer,function(t,n){var i=t.Of,e=n.buffer,r=n.byteOffset,o=n.byteLength,u=e;!0===J(i)?0===Z(i)?kn(t,u,r,o):$(i,new I(u,r,o),!1):!0===Vn(i)?(kn(t,u,r,o),An(t)):kn(t,u,r,o),Tn(t)}(this,t)},t.prototype.error=function(t){if(!1===_n(this))throw Fn("error");Bn(this,t)},t.prototype[j]=function(t){this.Lf.length>0&&(this.Lf.peek().bytesFilled=0),at(this);var n=this.xf(t);return xn(this),n},t.prototype[Y]=function(){var t=this.Of;if(this.Qd>0){var n=this.Kd.shift();this.Qd-=n.byteLength,Nn(this);var i=void 0;try{i=new I(n.buffer,n.byteOffset,n.byteLength)}catch(t){return O(t)}return R(M(i,!1,t.Od.Ld))}var e=this.Ff;if(void 0!==e){var r=void 0;try{r=new ArrayBuffer(e)}catch(t){return O(t)}var o={buffer:r,byteOffset:0,byteLength:e,bytesFilled:0,elementSize:1,ctor:I,readerType:"default"};this.Lf.push(o)}var u=G(t);return Tn(this),u},t}();function _n(t){return!!s(t)&&!!p.prototype.hasOwnProperty.call(t,"Of")}function Sn(t){return!!s(t)&&!!p.prototype.hasOwnProperty.call(t,"Mf")}function Tn(t){var n=function(t){var n=t.Of;if("readable"!==n.Fa)return!1;if(!0===t.Rf)return!1;if(!1===t._f)return!1;if(!0===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.Cf?(t.Cf=!0,P(t.Pf(),(function(){t.Cf=!1,!0===t.Df&&(t.Df=!1,Tn(t))}),(function(n){Bn(t,n)}))):t.Df=!0)}function In(t,n){var i=!1;"closed"===t.Fa&&(i=!0);var e=En(n);"default"===n.readerType?$(t,e,i):function(t,n,i){var e=t.Od,r=e.Vf.shift();r.Gd(M(n,i,e.Ld))}(t,e,i)}function En(t){var n=t.bytesFilled,i=t.elementSize;return new t.ctor(t.buffer,t.byteOffset,n/i)}function kn(t,n,i,e){t.Kd.push({buffer:n,byteOffset:i,byteLength:e}),t.Qd+=e}function Rn(t,n){var i=n.elementSize,e=n.bytesFilled-n.bytesFilled%i,r=y.min(t.Qd,n.byteLength-n.bytesFilled),o=n.bytesFilled+r,u=o-o%i,s=r,f=!1;u>e&&(s=u-n.bytesFilled,f=!0);for(var c=t.Kd;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.Qd-=v,On(t,v,n),s-=v}return f}function On(t,n,i){Pn(t),i.bytesFilled+=n}function Nn(t){0===t.Qd&&!0===t.Rf?(xn(t),Jn(t.Of)):Tn(t)}function Pn(t){void 0!==t.Bf&&(t.Bf.Mf=void 0,t.Bf.Nf=void 0,t.Bf=void 0)}function An(t){for(;t.Lf.length>0;){if(0===t.Qd)return;var n=t.Lf.peek();!0===Rn(t,n)&&(Cn(t),In(t.Of,n))}}function Dn(t,n){var i=t.Lf.peek();if("closed"===t.Of.Fa){if(0!==n)throw new m("bytesWritten must be 0 when calling respond() on a closed stream");!function(t,n){n.buffer=n.buffer;var i=t.Of;if(!0===Vn(i))for(;Wn(i)>0;)In(i,Cn(t))}(t,i)}else!function(t,n,i){if(i.bytesFilled+n>i.byteLength)throw new RangeError("bytesWritten out of range");if(On(t,n,i),!(i.bytesFilled<i.elementSize)){Cn(t);var e=i.bytesFilled%i.elementSize;if(e>0){var r=i.byteOffset+i.bytesFilled,o=i.buffer.slice(r-e,r);kn(t,o,0,o.byteLength)}i.buffer=i.buffer,i.bytesFilled-=e,In(t.Of,i),An(t)}}(t,n,i);Tn(t)}function Cn(t){var n=t.Lf.shift();return Pn(t),n}function xn(t){t.Pf=void 0,t.xf=void 0}function Bn(t,n){var i=t.Of;"readable"===i.Fa&&(function(t){Pn(t),t.Lf=new B}(t),at(t),xn(t),Qn(i,n))}function Mn(t){var n=t.Of.Fa;return"errored"===n?null:"closed"===n?0:t.Af-t.Qd}function Ln(t,n,i){var e=p.create(yn.prototype),r=v(n,"pull",0,[e]),o=v(n,"cancel",1,[]),u=n.autoAllocateChunkSize;if(void 0!==u&&(u=Number(u),!1===mn(u)||u<=0))throw new RangeError("autoAllocateChunkSize must be a positive integer");!function(t,n,i,e,r,o,u){n.Of=t,n.Df=!1,n.Cf=!1,n.Bf=void 0,n.Kd=n.Qd=void 0,at(n),n.Rf=!1,n._f=!1,n.Af=w(o),n.Pf=e,n.xf=r,n.Ff=u,n.Lf=new B,t.zd=n,P(R(i()),(function(){n._f=!0,Tn(n)}),(function(t){Bn(n,t)}))}(t,e,(function(){return d(n,"start",[e])}),r,o,i,u)}function Un(t){return new m("ReadableStreamBYOBRequest.prototype."+t+" can only be used on a ReadableStreamBYOBRequest")}function Fn(t){return new m("ReadableByteStreamController.prototype."+t+" can only be used on a ReadableByteStreamController")}function zn(t){return k((function(n,i){var e={Gd:n,Zd:i};t.Od.Vf.push(e)}))}function Wn(t){return t.Od.Vf.length}function Vn(t){var n=t.Od;return void 0!==n&&!!Hn(n)}var qn=function(){function t(t){if(!Gn(t))throw new m("ReadableStreamBYOBReader can only be constructed with a ReadableStream instance given a byte source");if(!1===_n(t.zd))throw new m("Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte source");if($n(t))throw new m("This stream has already been locked for exclusive reading by another reader");U(this,t),this.Vf=new B}return p.defineProperty(t.prototype,"closed",{get:function(){return Hn(this)?this.Vd:O(Xn("closed"))},enumerable:!0,configurable:!0}),t.prototype.cancel=function(t){return Hn(this)?void 0===this.Bd?O(W("cancel")):F(this,t):O(Xn("cancel"))},t.prototype.read=function(t){return Hn(this)?void 0===this.Bd?O(W("read from")):ArrayBuffer.isView(t)?(t.buffer,0===t.byteLength?O(new m("view must have non-zero byteLength")):function(t,n){var i=t.Bd;return i.Hd=!0,"errored"===i.Fa?O(i.Fd):function(t,n){var i=t.Of,e=1;n.constructor!==DataView&&(e=n.constructor.BYTES_PER_ELEMENT);var r=n.constructor,o={buffer:n.buffer,byteOffset:n.byteOffset,byteLength:n.byteLength,bytesFilled:0,elementSize:e,ctor:r,readerType:"byob"};if(t.Lf.length>0)return t.Lf.push(o),zn(i);if("closed"===i.Fa)return R(M(new r(o.buffer,o.byteOffset,0),!0,i.Od.Ld));if(t.Qd>0){if(!0===Rn(t,o)){var u=En(o);return Nn(t),R(M(u,!1,i.Od.Ld))}if(!0===t.Rf){var s=new m("Insufficient bytes to fill elements in the given buffer");return Bn(t,s),O(s)}}t.Lf.push(o);var f=zn(i);return Tn(t),f}(i.zd,n)}(this,t)):O(new m("view must be an array buffer view")):O(Xn("read"))},t.prototype.releaseLock=function(){if(!Hn(this))throw Xn("releaseLock");if(void 0!==this.Bd){if(this.Vf.length>0)throw new m("Tried to release a reader lock when that reader has pending read() calls un-settled");z(this)}},t}();function Hn(t){return!!s(t)&&!!p.prototype.hasOwnProperty.call(t,"Vf")}function Xn(t){return new m("ReadableStreamBYOBReader.prototype."+t+" can only be used on a ReadableStreamBYOBReader")}var jn=function(){function t(t,n){void 0===t&&(t={}),void 0===n&&(n={}),Kn(this);var i=n.size,e=n.highWaterMark,r=t.type;if("bytes"===String(r)){if(void 0!==i)throw new RangeError("The strategy for a byte stream cannot have a size function");void 0===e&&(e=0),Ln(this,t,e=w(e))}else{if(void 0!==r)throw new RangeError("Invalid type is specified");var o=b(i);void 0===e&&(e=1),function(t,n,i,e){var r=p.create(un.prototype),o=v(n,"pull",0,[r]),u=v(n,"cancel",1,[]);bn(t,r,(function(){return d(n,"start",[r])}),o,u,i,e)}(this,t,e=w(e),o)}}return p.defineProperty(t.prototype,"locked",{get:function(){if(!1===Gn(this))throw ti("locked");return $n(this)},enumerable:!0,configurable:!0}),t.prototype.cancel=function(t){return!1===Gn(this)?O(ti("cancel")):!0===$n(this)?O(new m("Cannot cancel a stream that already has a reader")):Zn(this,t)},t.prototype.getReader=function(t){var n=(void 0===t?{}:t).mode;if(!1===Gn(this))throw ti("getReader");if(void 0===n)return K(this,!0);if("byob"===(n=String(n)))return function(t,n){void 0===n&&(n=!1);var i=new qn(t);return i.Ld=n,i}(this,!0);throw new RangeError("Invalid mode is specified")},t.prototype.pipeThrough=function(t,n){var i=t.writable,e=t.readable,r=void 0===n?{}:n,o=r.preventClose,u=r.preventAbort,s=r.preventCancel,f=r.signal;if(!1===Gn(this))throw ti("pipeThrough");if(!1===gt(i))throw new m("writable argument to pipeThrough must be a WritableStream");if(!1===Gn(e))throw new m("readable argument to pipeThrough must be a ReadableStream");if(o=Boolean(o),u=Boolean(u),s=Boolean(s),void 0!==f&&!tn(f))throw new m("ReadableStream.prototype.pipeThrough's signal option must be an AbortSignal");if(!0===$n(this))throw new m("ReadableStream.prototype.pipeThrough cannot be used on a locked ReadableStream");if(!0===mt(i))throw new m("ReadableStream.prototype.pipeThrough cannot be used on a locked WritableStream");return x(on(this,i,o,u,s,f)),e},t.prototype.pipeTo=function(t,n){var i=void 0===n?{}:n,e=i.preventClose,r=i.preventAbort,o=i.preventCancel,u=i.signal;return!1===Gn(this)?O(ti("pipeTo")):!1===gt(t)?O(new m("ReadableStream.prototype.pipeTo's first argument must be a WritableStream")):(e=Boolean(e),r=Boolean(r),o=Boolean(o),void 0===u||tn(u)?!0===$n(this)?O(new m("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream")):!0===mt(t)?O(new m("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream")):on(this,t,e,r,o,u):O(new m("ReadableStream.prototype.pipeTo's signal option must be an AbortSignal")))},t.prototype.tee=function(){if(!1===Gn(this))throw ti("tee");var t=function(t,n){var i,e,r,o,u,s=K(t),h=!1,c=!1,a=!1,v=k((function(t){u=t}));function d(){return!0===h||(h=!0,x(C(rt(s),(function(t){if(h=!1,!0===t.done)return!1===c&&an(r.zd),void(!1===a&&an(o.zd));var n=t.value,i=n,e=n;!1===c&&vn(r.zd,i),!1===a&&vn(o.zd,e)})))),R(void 0)}function l(){}return r=Yn(l,d,(function(n){if(c=!0,i=n,!0===a){var r=f([i,e]),o=Zn(t,r);u(o)}return v})),o=Yn(l,d,(function(n){if(a=!0,e=n,!0===c){var r=f([i,e]),o=Zn(t,r);u(o)}return v})),D(s.Vd,(function(t){dn(r.zd,t),dn(o.zd,t)})),[r,o]}(this);return f(t)},t.prototype.getIterator=function(t){var n=(void 0===t?{}:t).preventCancel,i=void 0!==n&&n;if(!1===Gn(this))throw ti("getIterator");return function(t,n){void 0===n&&(n=!1);var i=K(t),e=p.create(ut);return e.qd=i,e.Yd=Boolean(n),e}(this,i)},t}();function Yn(t,n,i,e,r){void 0===e&&(e=1),void 0===r&&(r=function(){return 1});var o=p.create(jn.prototype);return Kn(o),bn(o,p.create(un.prototype),t,n,i,e,r),o}function Kn(t){t.Fa="readable",t.Od=void 0,t.Fd=void 0,t.Hd=!1}function Gn(t){return!!s(t)&&!!p.prototype.hasOwnProperty.call(t,"zd")}function $n(t){return void 0!==t.Od}function Zn(t,n){return t.Hd=!0,"closed"===t.Fa?R(void 0):"errored"===t.Fa?O(t.Fd):(Jn(t),C(t.zd[j](n),r))}function Jn(t){t.Fa="closed";var n=t.Od;void 0!==n&&(et(n)&&(n.Xd.forEach((function(t){t.Gd(M(void 0,!0,n.Ld))})),n.Xd=new B),X(n))}function Qn(t,n){t.Fa="errored",t.Fd=n;var i=t.Od;void 0!==i&&(et(i)?(i.Xd.forEach((function(t){t.Zd(n)})),i.Xd=new B):(i.Vf.forEach((function(t){t.Zd(n)})),i.Vf=new B),H(i,n))}function ti(t){return new m("ReadableStream.prototype."+t+" can only be used on a ReadableStream")}"symbol"===L(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.Wf;return!0===t.uf?C(t.Uf,(function(){var e=t.Gf;if("erroring"===e.Fa)throw e.Fd;return vi(i,n)})):vi(i,n)}(t,n)}function f(n){return function(t,n){return oi(t,n),R(void 0)}(t,n)}function h(){return function(t){var n=t.Zf,i=t.Wf,e=i.Xf();return ci(i),C(e,(function(){if("errored"===n.Fa)throw n.Fd;var t=n.zd;!0===wn(t)&&an(t)}),(function(i){throw oi(t,i),n.Fd}))}(t)}function c(){return function(t){return si(t,!1),t.Uf}(t)}function a(n){return ui(t,n),R(void 0)}t.Gf=function(t,n,i,e,r,o){void 0===r&&(r=1),void 0===o&&(o=function(){return 1});var u=p.create(lt.prototype);return bt(u),Bt(u,p.create(xt.prototype),t,n,i,e,r,o),u}(u,s,h,f,i,e),t.Zf=Yn(u,c,a,r,o),t.uf=void 0,t.Uf=void 0,t.Hf=void 0,si(t,!0),t.Wf=void 0}(this,k((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.zf=t,t.Wf=n,n.qf=i,n.Xf=e}(t,i,e,o)}(this,t);var c=d(t,"start",[this.Wf]);f(c)}return p.defineProperty(t.prototype,"readable",{get:function(){if(!1===ri(this))throw li("readable");return this.Zf},enumerable:!0,configurable:!0}),p.defineProperty(t.prototype,"writable",{get:function(){if(!1===ri(this))throw li("writable");return this.Gf},enumerable:!0,configurable:!0}),t}();function ri(t){return!!s(t)&&!!p.prototype.hasOwnProperty.call(t,"Wf")}function oi(t,n){dn(t.Zf.zd,n),ui(t,n)}function ui(t,n){ci(t.Wf),Ft(t.Gf.$d,n),!0===t.uf&&si(t,!1)}function si(t,n){void 0!==t.Uf&&t.Hf(),t.Uf=k((function(n){t.Hf=n})),t.uf=n}var fi=function(){function t(){throw new m("TransformStreamDefaultController instances cannot be created directly")}return p.defineProperty(t.prototype,"desiredSize",{get:function(){if(!1===hi(this))throw di("desiredSize");return ln(this.zf.Zf.zd)},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.zf,n)}(this,t)},t.prototype.terminate=function(){if(!1===hi(this))throw di("terminate");!function(t){var n=t.zf,i=n.Zf.zd;!0===wn(i)&&an(i);var e=new m("TransformStream terminated");ui(n,e)}(this)},t}();function hi(t){return!!s(t)&&!!p.prototype.hasOwnProperty.call(t,"zf")}function ci(t){t.qf=void 0,t.Xf=void 0}function ai(t,n){var i=t.zf,e=i.Zf.zd;if(!1===wn(e))throw new m("Readable side is not in a state that permits enqueue");try{vn(e,n)}catch(t){throw ui(i,t),i.Zf.Fd}var r=function(t){return!0!==hn(t)}(e);r!==i.uf&&si(i,!0)}function vi(t,n){return C(t.qf(n),void 0,(function(n){throw oi(t.zf,n),n}))}function di(t){return new m("TransformStreamDefaultController.prototype."+t+" can only be used on a TransformStreamDefaultController")}function li(t){return new m("TransformStream.prototype."+t+" can only be used on a TransformStream")}t.ByteLengthQueuingStrategy=ni,t.CountQueuingStrategy=ii,t.ReadableStream=jn,t.TransformStream=ei,t.WritableStream=lt,p.defineProperty(t,"__esModule",{value:!0})},"object"===(void 0===t?"undefined":L(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 It(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 Et(t,n,i){return n&&It(t.prototype,n),i&&It(t,i),t}x(),pt(),x(),pt(),x(),pt(),x(),pt(),x(),pt(),x(),pt(),x(),pt(),x(),pt(),M(),x(),pt(),M(),x(),pt(),x(),pt(),M(),x(),pt();var kt,Rt=((kt={}).Tv="web",kt.Ev="android",kt.xv="android-tv",kt.Iv="ios",kt.Rv="tvos",kt.Cv="chromecast",kt.Pv="theoliveweb",kt);var Ot=v?v.userAgent:"",Nt=Ot.match(/chrome\/([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)/i),Pt=Ot.match(/Edg\/([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)/i),At=Ot.match(/Android ([0-9\.]+)/i),Dt=Ot.match(/Windows NT ([0-9\.]+)/i),Ct=Ot.match(/(Version)\/((\d+)\.(\d+)(?:\.(\d+))?).*Safari/),xt=Ot.match(/Firefox\/([0-9\.]+)/i),Bt=Ot.match(/OPR\/(\d+\.\d+)/i),Mt=Ot.match(/Tizen ([0-9\.]+)/i),Lt=Ot.match(/(iPhone OS|iPad OS|iPod OS|Mac OS X) (\d+)_(\d+)_?(\d+)?/),Ut=Ot.match(/HbbTV\/([0-9.]+)/i),Ft=function(){function t(){this.Dv=Boolean("ontouchstart"in self||self.DocumentTouch&&B(a,self.DocumentTouch)||v&&v.msMaxTouchPoints),this.Mv=/(mac\sos\sx)\s?([\w\s\.]+\w)*/i.test(Ot)||/(macintosh|mac(?=_powerpc)\s)/i.test(Ot),this.Bv=/Windows NT/i.test(Ot),this.Fv=Dt?S(Dt[1]):0,this.Wv=/Android/i.test(Ot),this.Gv=At?S(At[1]):0,this.Xv=/windows phone (8|8\.1)/i.test(Ot),this.zv=/iPhone/i.test(Ot),this.Yv=/iPad/i.test(Ot),this.Qv=this.Mv&&this.Dv&&!this.Yv,this.$v=/iPod/i.test(Ot),this.dg=/Mobile Safari/i.test(Ot),this.ag=/EOS\d*STB/i.test(Ot),this.cg=/APP\d*STB/i.test(Ot),this.eg=(this.zv||this.Yv||this.Qv||this.$v)&&!this.Xv,this.og=Lt?S(Lt[2]):0,this.fg=this.Xv||this.eg||this.Wv||this.dg,this.vg=/CriOS/i.test(Ot),this.pg=Boolean(self.chrome&&/google/i.test(v.vendor))||this.vg,this.Tg=this.pg&&/Edg\//i.test(v.userAgent),this.xg=Pt?_(Pt[1],10):0,this.Fm=Boolean(/CriOS/i.test(Ot)),this.Om=Boolean(self.chrome||/Chrome/i.test(Ot)||this.Fm),this.Ag=Nt?_(Nt[1],10):0,this.Cg=/SMART-TV.*Tizen/i.test(Ot),this.Dg=Mt?S(Mt[1]):0,this.yg=this.Dg>0?function(t){return t>=8?108:t>=7?94:t>=6.5?85:t>=6?76:t>=5.5?69:t>=5?63:t>=4?56:t>=3?47:0}(this.Dg):void 0,this.Mg=/webos|web0s/i.test(Ot),this.Bg=/HbbTV/i.test(Ot),this.Fg=!!Ut&&function(t){if(!t)return!1;var n=t.split(".").map(Number);return 3===n.length&&1===n[0]&&2===n[1]}(Ut[1]),this.Wg=/VIZIO/i.test(Ot),this.Gg=/Edge\/\d+/i.test(Ot),this.Xg=/Trident/i.test(Ot),this.zg=this.Xg&&!self.ActiveXObject&&"ActiveXObject"in self,this.Yg=/Vivaldi/i.test(Ot),this.jg=/Firefox/i.test(Ot)&&!/Seamonkey/i.test(Ot),this.Jg=xt?S(xt[1]):0,this.im=/Safari/i.test(Ot)&&!/Chrome/i.test(Ot)&&!this.Xv&&!this.Cg,this.hm=Ct?S(Ct[2]):0,this.lm=Boolean(Bt),this.fm=Bt?S(Bt[1]):0,this.vm=/CrKey/.test(Ot),this.pm=/\b(tv|smart-tv|smarttv|appletv|crkey|googletv|hbbtv|pov_tv|roku|viera|nettv|philipstv|vizio)\b/i.test(Ot),this.Am=/PlayStation 4/i.test(Ot),this.Tm="web"===Rt.xv,this.xm="web"===Rt.Ev,this.Rm=this.xm||this.Tm,this.Pm="web"===Rt.Iv,this.Nm="web"===Rt.Rv,this.Lm="web"===Rt.Cv}return Et(t,[{key:"Qe",get:function(){return this.Dv}},{key:"Nv",get:function(){return this.Mv}},{key:"Lv",get:function(){return this.Bv}},{key:"Ov",get:function(){return this.Fv}},{key:"Vv",get:function(){return this.Wv}},{key:"Uv",get:function(){return this.Gv}},{key:"Zv",get:function(){return this.Xv}},{key:"Hv",get:function(){return this.zv}},{key:"qv",get:function(){return this.Yv}},{key:"Kv",get:function(){return this.Qv}},{key:"Jv",get:function(){return this.$v}},{key:"su",get:function(){return this.eg}},{key:"rg",get:function(){return this.og}},{key:"hg",get:function(){return this.ag||this.cg}},{key:"ud",get:function(){return this.dg}},{key:"Qs",get:function(){return this.fg}},{key:"_g",get:function(){return this.vg}},{key:"gg",get:function(){return this.pg}},{key:"wg",get:function(){var t;return null!=(t=this.yg)?t:this.Ag}},{key:"Sg",get:function(){return this.Tg}},{key:"Eg",get:function(){var t;return(null==(t=c.chrome)?void 0:t.webview)&&this.xg>0}},{key:"Ig",get:function(){return this.xg}},{key:"Rg",get:function(){return this.Cg}},{key:"Pg",get:function(){return this.Dg}},{key:"Ng",get:function(){return this.Mg}},{key:"Lg",get:function(){return this.Bg}},{key:"Og",get:function(){return this.Fg}},{key:"Vg",get:function(){return this.Wg}},{key:"Ug",get:function(){return this.Gg}},{key:"Zg",get:function(){return this.Xg}},{key:"Hg",get:function(){return this.zg}},{key:"qg",get:function(){return this.Yg}},{key:"Kg",get:function(){return this.jg}},{key:"Qg",get:function(){return this.Jg}},{key:"$g",get:function(){return this.im}},{key:"nm",get:function(){return 0===this.hm&&zt.su?this.og:this.hm}},{key:"um",get:function(){return this.lm}},{key:"dm",get:function(){return this.fm}},{key:"_m",get:function(){return this.vm}},{key:"gm",get:function(){return this.pm}},{key:"wm",get:function(){return!(!this.Ng&&!this.Rg)&&this.wg<=56}},{key:"ym",get:function(){return this.Am}},{key:"Sm",get:function(){return this.Tm}},{key:"Em",get:function(){return this.xm}},{key:"Im",get:function(){return this.Rm}},{key:"Cm",get:function(){return this.Pm}},{key:"Dm",get:function(){return this.Nm}},{key:"Mm",get:function(){return this.Lm}},{key:"Bm",get:function(){return this.Om}},{key:"IS_IOS_CHROME",get:function(){return this.Fm}}]),t}();Ft.Vm=new Ft;var zt=Ft.Vm;x(),pt(),et();var Wt={}.toString;function Vt(t){return null!=t}var qt,Ht=Array.isArray||function(t){return"[object Array]"===Wt.call(t)};function Xt(t){return"object"===(void 0===t?"undefined":L(t))&&null!==t}function jt(t){return"function"==typeof t}function Yt(t){return jt(t)||Xt(t)}function Kt(t){qt=t}x(),pt(),x(),pt();var Gt=function(){};function $t(t){var n;return function(){return void 0!==t&&(n=t(),t=void 0),n}}function Zt(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 Jt(t){return function(){var n=this,i=arguments;return new tt((function(e,r){var o=t.apply(n,i);function u(t){Zt(o,e,r,u,s,"next",t)}function s(t){Zt(o,e,r,u,s,"throw",t)}u(void 0)}))}}function Qt(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 tn="function"==typeof SuppressedError?SuppressedError:function(t,n,i){var e=new g(i);return e.name="SuppressedError",e.error=t,e.suppressed=n,e};function nn(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 en(t,n){if(t){if("string"==typeof t)return nn(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)?nn(t,n):void 0}}function rn(t){return function(t){if(Array.isArray(t))return nn(t)}(t)||function(t){if(void 0!==n&&null!=t[e]||null!=t["@@iterator"])return Array.from(t)}(t)||en(t)||function(){throw new m("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}x(),pt(),x(),pt(),x(),pt(),x(),pt(),x(),pt(),x(),pt(),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.zm=!1,this.qm=!1,this.Ym=[],this.jm=[]}var n=t.prototype;return n.Hm=function(){if(!this.zm&&!this.qm){this.zm=!0;for(var t=0,n=this.Ym.slice();t<n.length;t++){(0,n[t])()}this.Km()}},n.Km=function(){if(!this.qm){this.qm=!0;for(var t=0,n=this.jm.slice();t<n.length;t++){(0,n[t])()}an(this.Ym),an(this.jm)}},n.Qm=function(t){this.qm||this.Ym.push(t)},n.Jm=function(t){this.qm||fn(this.Ym,t)},n.$m=function(t){this.qm||this.jm.push(t)},n.tp=function(t){this.qm||fn(this.jm,t)},t}(),dn=function(){function t(){this.sp=new vn}var n=t.prototype;return n.np=function(){this.sp.Hm()},n.Km=function(){this.sp.Km()},n.rp=function(t){var n=this.sp;if(!n.zm)if(t.zm)n.Hm();else if(!n.qm&&!t.qm){var i=function(){e(),n.Hm()},e=function(){t.Jm(i),t.tp(e),n.Jm(i),n.tp(e)};t.Qm(i),t.$m(e),n.Qm(i),n.$m(e)}},n.op=function(){var n=new t,i=new t,e=n.ep,r=i.ep,o=this.sp,u=function(){e.zm&&r.qm||r.zm&&e.qm?o.Hm():e.qm&&r.qm&&o.Km()};e.Qm(u),r.Qm(u),e.$m(u),r.$m(u),n.rp(o),i.rp(o);return o.$m((function(){e.Jm(u),r.Jm(u),e.tp(u),r.tp(u)})),[n,i]},n[r]=function(){this.np()},t.hp=function(n){for(var i=new t,e=0;e<n.length;e++){var r=n[e];void 0!==r&&i.rp(r)}return i},Et(t,[{key:"ep",get:function(){return this.sp}}]),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).message=n||"Unknown error",e.cause=i,g.captureStackTrace&&g.captureStackTrace(e,e.constructor),e}return Tt(n,t),Et(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),Et(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.zm)return t.catch(Gt),e(new bn);var r=function(){n.Jm(r),e(new bn)};n.Qm(r),t.then((function(t){n.Jm(r),i(t)}),(function(t){n.Jm(r),e(t)}))})):t}function pn(t,n){return Jt((function(){var i,e;return Qt(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 tn(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.zm)e(new bn);else{var r=qt.Gm((function(){void 0!==n&&n.Jm(o),i()}),t),o=function(){qt.Um(r),e(new bn)};void 0!==n&&n.Qm(o)}}))}function _n(){return void 0!==a?a.createElement("video"):void 0}var Sn=$t(_n);$t((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 I([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(kt){}function In(t,n,i){this.low=0|t,this.high=0|n,this.unsigned=!!i}function En(t){return!0===(t&&t.cp)}function kn(t){var n=y.clz32(t&-t);return t?31-n:n}In.prototype.cp,p.defineProperty(In.prototype,"cp",{value:!0}),In.isLong=En;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:Fn;if(n){if(t<0)return zn;if(t>=Mn)return Xn}else{if(t<=-Ln)return jn;if(t+1>=Ln)return Hn}return t<0?Pn(-t,n).neg():An(t%Bn|0,t/Bn|0,n)}function An(t,n,i){return new In(t,n,i)}In.fromInt=Nn,In.fromNumber=Pn,In.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:Fn;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=Fn,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)}In.fromString=Cn,In.fromValue=xn;var Bn=4294967296,Mn=Bn*Bn,Ln=Mn/2,Un=Nn(1<<24),Fn=Nn(0);In.ZERO=Fn;var zn=Nn(0,!0);In.UZERO=zn;var Wn=Nn(1);In.ONE=Wn;var Vn=Nn(1,!0);In.UONE=Vn;var qn=Nn(-1);In.NEG_ONE=qn;var Hn=An(-1,2147483647,!1);In.MAX_VALUE=Hn;var Xn=An(-1,-1,!0);In.MAX_UNSIGNED_VALUE=Xn;var jn=An(0,-2147483648,!1);In.MIN_VALUE=jn;var Yn=In.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&&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==(1&this.low)},Yn.isEven=function(){return 0==(1&this.low)},Yn.equals=function(t){return En(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(En(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){En(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 En(t)||(t=xn(t)),this.add(t.neg())},Yn.sub=Yn.subtract,Yn.multiply=function(t){if(this.isZero())return this;if(En(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:Fn;if(this.eq(jn))return t.isOdd()?jn:Fn;if(t.eq(jn))return this.isOdd()?jn:Fn;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(Un)&&t.lt(Un))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(En(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:Fn;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(qn)?jn:t.eq(jn)?Wn:(n=this.shr(1).div(t).shl(1)).eq(Fn)?t.isNegative()?Wn:qn:(i=this.sub(t.mul(n)),e=n.add(i.div(t)));if(t.eq(jn))return this.unsigned?zn:Fn;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=Fn}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 En(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?kn(this.low):kn(this.high)+32},Yn.ctz=Yn.countTrailingZeros,Yn.and=function(t){return En(t)||(t=xn(t)),An(this.low&t.low,this.high&t.high,this.unsigned)},Yn.or=function(t){return En(t)||(t=xn(t)),An(this.low|t.low,this.high|t.high,this.unsigned)},Yn.xor=function(t){return En(t)||(t=xn(t)),An(this.low^t.low,this.high^t.high,this.unsigned)},Yn.shiftLeft=function(t){return En(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 En(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 En(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 En(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 En(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]},In.fromBytes=function(t,n,i){return i?In.fromBytesLE(t,n):In.fromBytesBE(t,n)},In.fromBytesLE=function(t,n){return new In(t[0]|t[1]<<8|t[2]<<16|t[3]<<24,t[4]|t[5]<<8|t[6]<<16|t[7]<<24,n)},In.fromBytesBE=function(t,n){return new In(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&&(In.fromBigInt=function(t,n){return An(Number(BigInt.asIntN(32,t)),Number(BigInt.asIntN(32,t>>BigInt(32))),n)},In.fromValue=function(t,n){return"bigint"===(void 0===t?"undefined":L(t))?In.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=In;function Gn(){return Date.now()||(new Date).getTime()}Kn.fromNumber(on);var $n=Boolean("ontouchstart"in self||self.DocumentTouch&&B(a,self.DocumentTouch))||Boolean(v&&v.msMaxTouchPoints),Zn=Sn(),Jn=Boolean(Zn&&Zn.webkitShowPlaybackTargetPicker),Qn=function(){function t(){this.dp=void 0,this.Bp=!1,this.Qe=$n,this.Qs=!1,this.ap=!0}var n=t.prototype;return n.fp=function(){return 0},n.Np=function(t,n){return!0},n.Mp=function(t){return t>=.3333333333333333},Et(t,[{key:"lp",get:function(){return void 0===this.dp&&(this.dp=this.fp()),this.dp}},{key:"_p",get:function(){return zt.Vv?"android":zt.Nv?"macos":zt.su?"ios":zt.Lv?"windows":"other"}},{key:"vp",get:function(){return zt.gm?"tv":zt.Qs?"mobile":"desktop"}},{key:"gp",get:function(){return!zt.gm}},{key:"mp",get:function(){if(c.screen)return{width:c.screen.width,height:c.screen.height}}},{key:"pp",get:function(){return c.devicePixelRatio||1}},{key:"wp",get:function(){return Jn}},{key:"yp",get:function(){return!1}},{key:"bp",get:function(){return!0}},{key:"Ap",get:function(){return!!(zt.$g||zt.su||zt.Eg)||!!zt.Vg}},{key:"Sp",get:function(){return zt.Vg}},{key:"Tp",get:function(){return!zt.su}},{key:"kp",get:function(){return!0}},{key:"Ep",get:function(){return!0}},{key:"xp",get:function(){return!1}},{key:"Ip",get:function(){}},{key:"Rp",get:function(){return!0}},{key:"Cp",get:function(){return!1}},{key:"Pp",get:function(){return zt.Vg}},{key:"Dp",get:function(){return!1}},{key:"Lp",get:function(){return!1}}]),t}(),ti=function(t){function n(){return t.call(this)||this}return Tt(n,t),n}(Qn);x(),pt();var ni=function(t){function n(){return t.apply(this,arguments)||this}return Tt(n,t),n.prototype.Np=function(t,n){if(t&&t.Op&&n&&n.Op){var i=ii(t.Op,"mp4a.40.2")&&ii(n.Op,"mp4a.40.5"),e=ii(t.Op,"mp4a.40.5")&&ii(n.Op,"mp4a.40.2"),r=ii(t.Op,"mp4a.40.2")&&ii(n.Op,"mp4a.40.34"),o=ii(t.Op,"mp4a.40.34")&&ii(n.Op,"mp4a.40.2"),u=ii(t.Op,"mp4a.40.5")&&ii(n.Op,"mp4a.40.34"),s=ii(t.Op,"mp4a.40.34")&&ii(n.Op,"mp4a.40.5");return!(i||e||r||o||u||s)}return!0},Et(n,[{key:"Ip",get:function(){if(zt.Nv)return 4096}}]),n}(ti);function ii(t,n){return t.indexOf(n)>-1}x(),pt();var ei=function(t){function n(){return t.apply(this,arguments)||this}return Tt(n,t),n.prototype.Mp=function(t){return t>=2},n}(ti);x(),pt();var ri=function(t){function n(){var n;return(n=t.call(this)||this).Bp=zt.nm>=11,n.ap=zt.$g&&!(zt.su&&zt.nm<10),n}return Tt(n,t),Et(n,[{key:"Dp",get:function(){return zt.nm<17}},{key:"Lp",get:function(){return!0}}]),n}(ti);x(),pt();var oi,ui=function(t){function n(){return t.apply(this,arguments)||this}return Tt(n,t),Et(n,[{key:"Rp",get:function(){return!zt.Lv||(zt.Sg?92!==zt.Ig:zt.wg>=100)}}]),n}(ti);x(),pt(),x(),pt(),x(),pt(),x(),pt(),x(),pt();var si=function(){var t=_n();if(!t)return!1;var n=t.muted;return t.muted=!n,t.muted!==n}();!function(){if(zt.Kv)return!1;var t=_n();if(!t)return!1;var n=t.volume;t.volume=n/2+.1,t.volume}();var fi=function(t){function n(n){var i;return(i=t.call(this)||this).Fp=n,i.Bp=i.Fp.Bp,i.Qe=i.Fp.Qe,i.ap=si&&i.Fp.ap,i}Tt(n,t);var i=n.prototype;return i.fp=function(){return this.Fp.lp},i.Np=function(t,n){return this.Fp.Np(t,n)},i.Mp=function(t){return this.Fp.Mp(t)},Et(n,[{key:"Ip",get:function(){return this.Fp.Ip}},{key:"Rp",get:function(){return this.Fp.Rp}},{key:"Dp",get:function(){return this.Fp.Dp}}]),n}(Qn),hi=function(t){function n(n){var i;return(i=t.call(this,n)||this).Bp=!0,i.Qs=!0,i}return Tt(n,t),Et(n,[{key:"xp",get:function(){return zt.su}}]),n}(fi);x(),pt();var ci=function(t){function n(){return t.apply(this,arguments)||this}return Tt(n,t),n.prototype.fp=function(){return function(t){return t&&Yt(c.ManagedMediaSource)?c.ManagedMediaSource:Yt(c.MediaSource)?c.MediaSource:void 0}(!0)?t.prototype.fp.call(this):1},Et(n,[{key:"xp",get:function(){return!0}}]),n}(hi);x(),pt();var ai=function(t){function n(){return t.apply(this,arguments)||this}return Tt(n,t),n.prototype.Np=function(n,i){return t.prototype.Np.call(this,n,i)},Et(n,[{key:"yp",get:function(){return zt.Pg<3}},{key:"bp",get:function(){return zt.Pg>=3}},{key:"mp",get:function(){var t=this;return c.tizen&&!this.Gp&&c.tizen.systeminfo.getPropertyValue("DISPLAY",(function(n){var i=n.resolutionWidth,e=n.resolutionHeight;1===i&&1===e||(t.Gp={width:i,height:e})})),this.Gp}},{key:"Cp",get:function(){return zt.Pg<3}}]),n}(fi);x(),pt();var vi=function(t){function n(){return t.apply(this,arguments)||this}return Tt(n,t),Et(n,[{key:"mp",get:function(){var t=this;return c.webOS&&!this.Gp&&c.webOS.deviceInfo((function(n){t.Gp={width:n.screenWidth,height:n.screenHeight}})),this.Gp}},{key:"kp",get:function(){return!1}}]),n}(fi);x(),pt();var di=function(t){function n(){return t.apply(this,arguments)||this}return Tt(n,t),Et(n,[{key:"xp",get:function(){return!0}},{key:"Lp",get:function(){return this.Fp.Lp}}]),n}(fi);!function(t){oi=t}(function(){var t=function(){if(zt.Kg)return new ni;if(zt.Ug||zt.Zg)return new ei;if(zt.$g)return new ri;if(zt.gg)return new ui;return new ti}();return zt.su?new ci(t):zt.Qs?new hi(t):zt.Rg?new ai(t):zt.Ng?new vi(t):zt.Nv?new di(t):new fi(t)}()),x(),pt(),x(),pt(),M(),et(),x(),pt();var li=!(zt.Zg&&!zt.Hg),wi=self.console;function bi(t){if(Xt(t))try{return JSON.stringify(t)}catch(t){}return t}function gi(t){return t.map(bi).join(" ")}function mi(t){var n=wi&&wi[t];return n?n.bind&&li?n.bind(wi):function(){for(var n=arguments.length,i=new Array(n),e=0;e<n;e++)i[e]=arguments[e];wi[t](gi(i))}:void 0}var pi=mi("log")||Gt,yi=mi("warn")||pi.bind(void 0,"WARNING:"),_i=mi("error")||pi.bind(void 0,"ERROR:"),Si=function(){var t=wi&&wi.assert;return t?t.bind&&li?t.bind(wi):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];wi.assert(t,gi(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||_i.apply(void 0,["Assertion failed:"].concat(rn(i)))}}();function Ti(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 Ii(t,n){var i=function(t,n){var i=t.length;if(i<=1)return t;for(var e=new Array(i),r=1;r<i;r*=2){Ei(t,n,r,e);var o=t;t=e,e=o}return t}(t,n);return i!==t&&Ei(i,null,t.length,t),t}function Ei(t,n,i,e){var r,o,u,s,f,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 ki=/[a-zA-Z]/,Ri=/[0-9]/,Oi=/[0-9a-fA-F]/,Ni=/^0x/i,Pi=/^[0-9]+$/,Ai=/^[0-9a-fA-F]+$/,Di=/^[0-7]+$/,Ci=p.prototype.toString,xi=Array.isArray||function(t){return"[object Array]"===Ci.call(t)},Bi=void 0!==n&&"symbol"==typeof e;function Mi(t){return xi(t)?t:Array.from(t)}function Li(t,n,i){var e=t[n];t[n]=t[i],t[i]=e}function Ui(t){return t>=65&&t<=90}function Fi(t){return Ui(t)||function(t){return t>=97&&t<=122}(t)}function zi(t){return t>=48&&t<=57}function Wi(t){return zi(t)||Fi(t)}function Vi(t){return zi(t)||t>=65&&t<=70||t>=97&&t<=102}function qi(t){return Ui(t)?t+32:t}function Hi(t){return zi(t)?t-48:t>=65&&t<=70?t-65+10:t>=97&&t<=102?t-97+10:-1}function Xi(t,n){return void 0===n&&(n=!1),0<=t&&t<=9?t+48:10<=t&&t<=15?t+(n?87:55):-1}var ji=y.min,Yi=String.fromCharCode,Ki=16384;function Gi(t){for(var n=t.length,i=[],e=0;e<n;e+=Ki){var r=ji(e+Ki,n);i.push(Yi.apply(null,t.slice(e,r)))}return i.join("")}var $i=2147483647,Zi=/[^\0-\x7E]/,Ji=/[\x2E\u3002\uFF0E\uFF61]/g,Qi={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},te=y.floor,ne=String.fromCharCode;function ie(t){throw new RangeError(Qi[t])}function ee(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 re,oe,ue,se=function(t,n){return t+22+75*(t<26)-((0!=n)<<5)},fe=function(t,n,i){var e=0;for(t=i?te(t/700):t>>1,t+=te(t/n);t>455;e+=36)t=te(t/35);return te(e+36*t/(t+38))},he=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(Ji,".")).split("."),n).join(".");return e+r}(t,(function(t){return Zi.test(t)?"xn--"+function(t){for(var n=[],i=(t=ee(t)).length,e=128,r=0,o=72,u=0,s=t;u<s.length;u++){var f=s[u];f<128&&n.push(ne(f))}var h=n.length,c=h;for(h&&n.push("-");c<i;){for(var a=$i,v=0,d=t;v<d.length;v++){var l=d[v];l>=e&&l<a&&(a=l)}var w=c+1;a-e>te(($i-r)/w)&&ie("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>$i&&ie("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(ne(se(_+S%T,0))),p=te(S/T)}n.push(ne(se(p,0))),o=fe(r,w,c==h),r=0,++c}}++r,++e}return n.join("")}(t):t}))};function ce(t){for(var n=[],i=0;i<t.length;i++){var e=t[i];e>65535&&(e-=65536,n.push(e>>>10&1023|55296),e=56320|1023&e),n.push(e)}return Gi(n)}function ae(t){if(t>=55296&&t<=57343)throw new g("Lone surrogate U+"+t.toString(16).toUpperCase()+" is not a scalar value")}function ve(t,n){return t>>n&63|128}function de(t,n){0!=(4294967168&t)?(0==(4294965248&t)?n.push(t>>6&31|192):0==(4294901760&t)?(ae(t),n.push(t>>12&15|224),n.push(ve(t,6))):0==(4292870144&t)&&(n.push(t>>18&7|240),n.push(ve(t,12)),n.push(ve(t,6))),n.push(63&t|128)):n.push(t)}function le(t){for(var n=[],i=0;i<t.length;i++){de(t[i],n)}return n}function we(){if(ue>=oe)throw new g("Invalid byte index");var t=255&re[ue];if(ue++,128==(192&t))return 63&t;throw new g("Invalid continuation byte")}function be(){var t,n;if(ue>oe)throw new g("Invalid byte index");if(ue===oe)return!1;if(t=255&re[ue],ue++,0==(128&t))return t;if(192==(224&t)){if((n=(31&t)<<6|we())>=128)return n;throw new g("Invalid continuation byte")}if(224==(240&t)){if((n=(15&t)<<12|we()<<6|we())>=2048)return ae(n),n;throw new g("Invalid continuation byte")}if(240==(248&t)&&(n=(7&t)<<18|we()<<12|we()<<6|we())>=65536&&n<=1114111)return n;throw new g("Invalid UTF-8 detected")}function ge(t){return[37,Xi(t>>4),Xi(15&t)]}function me(t){return function(t){return t>=0&&t<=31}(t)||t>126}function pe(t){return me(t)||32===t||34===t||60===t||62===t||96===t}function ye(t){return pe(t)||35===t||63===t||123===t||125===t}function _e(t){return ye(t)||47===t||58===t||59===t||61===t||64===t||t>=91&&t<=94||124===t}function Se(t){return t<33||t>126||34===t||35===t||60===t||62===t}function Te(t){return Se(t)||39===t}function Ie(t,n){if(!n(t))return[t];for(var i=le([t]),e=[],r=0;r<i.length;r++){var o=i[r];e.push.apply(e,ge(o))}return e}function Ee(t,n){for(var i=[],e=0,r=ee(t);e<r.length;e++){var o=r[e];i.push.apply(i,Ie(o,n))}return ce(i)}function ke(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&&Vi(t[e+1])&&Vi(t[e+2])){var o=Hi(t[e+1])<<4|Hi(t[e+2]);n.push(o),e+=2}else n.push(r)}return n}(le(t))}function Re(t){return ce(function(t){re=t.slice(),oe=re.length,ue=0;for(var n,i=[];!1!==(n=be());)i.push(n);return i}(ke(ee(t))))}function Oe(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&&Oi.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(!Ri.test(t[o]))throw new m;for(;o<n&&Ri.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;)Li(i,e,r+a-1),e-=1,a-=1}else if(8!==e)throw new m;return i}function Ne(t){var n=10,i=Pi;return Ni.test(t)?(t=t.slice(2),n=16,i=Ai):t.length>=2&&"0"===t[0]&&(t=t.slice(1),n=8,i=Di),""===t?0:i.test(t)?_(t,n):void 0}var Pe={Zp:4},Ae=/[\0\t\n\r #%/:?@\[\\\]]/,De=/[\0\t\n\r #/:?@\[\\\]]/;function Ce(t,n){if("["===t[0]){if("]"!==t[t.length-1])throw new m("Invalid IPv6 address");return{Zp:2,Xp:Oe(t.slice(1,-1))}}if(!n)return function(t){if(De.test(t))throw new m("Invalid code point in opaque host");var n=Ee(t,me);return""===n?Pe:{Zp:3,Hp:n}}(t);var i=function(t){var n=function(t){return he(t.toLowerCase())}(t);return n}(Re(t));if(Ae.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=Ne(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?{Zp:1,Xp:e}:""===i?Pe:{Zp:0,zp:i}}function xe(t){switch(t.Zp){case 0:return t.zp;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.Xp);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.Xp)+"]";case 3:return t.Hp;case 4:return""}}var Be=/\+/g;function Me(t){return 42===t||45===t||46===t||95===t||Wi(t)}function Le(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(Be," "),s=s.replace(Be," ");var f=Re(u),h=Re(s);i.push([f,h])}}return i}function Ue(t){for(var n="",i=0;i<t.length;i++){var e=t[i];i>0&&(n+="&"),n+=Fe(le(ee(e[0])))+"="+Fe(le(ee(e[1])))}return n}function Fe(t){for(var n=[],i=0;i<t.length;i++){var e=t[i];32===e?n.push(43):Me(e)?n.push(e):n.push.apply(n,ge(e))}return Gi(n)}var ze=/(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])/;function We(t){var n=""+t,i=ze.exec(n);return i?function(t,n){for(var i=t.length,e=[],r=n;r<i;r++){var o=t.charCodeAt(r);if(qe(o))if(He(o)||r===i-1)e.push(Ve);else{var u=t.charCodeAt(r+1);He(u)?(e.push(o,u),r++):e.push(Ve)}else e.push(o)}return t.slice(0,n)+Gi(e)}(n,i.index):n}var Ve=65533,qe=function(t){return 55296==(63488&t)},He=function(t){return 0!=(1024&t)};function Xe(t,n){var i=t[0],e=n[0];return i===e?0:i<e?-1:1}function je(t){t.D_.length=0}function Ye(t,n){!function(t,n){for(var i=0;i<n.length;i++)t[i]=n[i];t.length=n.length}(t.D_,Le(n))}function Ke(t){if(t.ic){var n=Ue(t.D_);""===n&&(n=null),t.ic.ic.qp=n}}var Ge=function(){function t(t){if(void 0===t&&(t=void 0),this.ic=null,null==t)this.D_=[];else if("object"==typeof t||"function"==typeof t)if(function(t){return t instanceof Ge&&!!xi(t.D_)&&(!Bi||t[e]===$e)}(t))this.D_=t.D_.slice();else if(function(t){return null!=t&&(!!xi(t)||!!Bi&&"function"==typeof t[e])}(t)){this.D_=[];for(var n=0,i=Mi(t);n<i.length;n++){var r=Mi(i[n]);if(2!==r.length)throw new m("Invalid name-value pair");this.D_.push([We(r[0]),We(r[1])])}}else for(var o in this.D_=[],t)p.prototype.hasOwnProperty.call(t,o)&&this.D_.push([We(o),We(t[o])]);else(t=We(t)).length>0&&"?"===t[0]&&(t=t.slice(1)),this.D_=Le(t)}var n=t.prototype;return n.append=function(t,n){t=We(t),n=We(n),this.D_.push([t,n]),Ke(this)},n.delete=function(t){t=We(t);for(var n=this.D_,i=0;i<n.length;){n[i][0]===t?n.splice(i,1):i++}Ke(this)},n.get=function(t){t=We(t);for(var n=this.D_,i=0;i<n.length;i++){var e=n[i];if(e[0]===t)return e[1]}return null},n.getAll=function(t){t=We(t);for(var n=this.D_,i=[],e=0;e<n.length;e++){var r=n[e];r[0]===t&&i.push(r[1])}return i},n.has=function(t){t=We(t);for(var n=this.D_,i=0;i<n.length;i++){if(n[i][0]===t)return!0}return!1},n.set=function(t,n){t=We(t),n=We(n);for(var i=this.D_,e=!1,r=0;r<i.length;){var o=i[r];o[0]===t?e?i.splice(r,1):(o[1]=n,e=!0,r++):r++}e||i.push([t,n]),Ke(this)},n.sort=function(){Ii(this.D_,Xe),Ke(this)},n.toString=function(){return Ue(this.D_)},n.entries=function(){return new tr(this.D_,Ze)},n.keys=function(){return new tr(this.D_,Je)},n.values=function(){return new tr(this.D_,Qe)},n.forEach=function(t){var n=this;this.D_.forEach((function(i){return t(i[1],i[0],n)}))},t}(),$e=Ge.prototype.entries;Bi&&(Ge.prototype[e]=$e);var Ze=function(t){return[t[0],t[1]]},Je=function(t){return t[0]},Qe=function(t){return t[1]},tr=function(){function t(t,n){this.Yp=0,this.D_=t,this.Kp=n}return t.prototype.next=function(){return this.Yp<this.D_.length?{done:!1,value:this.Kp(this.D_[this.Yp++])}:{done:!0,value:void 0}},t}(),nr="null";var ir=p.create(null);ir.ftp=21,ir.file=0,ir.gopher=70,ir.http=80,ir.https=443,ir.ws=80,ir.wss=443;var er=/^(?:\.|%2e)$/i,rr=/^(?:\.|%2e){2}$/i;function or(t){return er.test(t)}function ur(t){return rr.test(t)}function sr(t){return void 0!==ir[t]}function fr(t){return sr(t.jp)}function hr(t){return""!==t.Qp||""!==t.Jp}function cr(t){var n=t.length;if(!(n>=2))return!1;if(!vr(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 ar(t){return 2===t.length&&ki.test(t[0])&&(":"===t[1]||"|"===t[1])}function vr(t){return 2===t.length&&ar(Gi(t))}function dr(t){return ar(t)&&":"===t[1]}function lr(t){var n=t.$p;0!==n.length&&("file"===t.jp&&1===n.length&&dr(n[0])||n.pop())}function wr(t){return null===t.ew||Pe===t.ew||t.iw||"file"===t.jp}var br=-1,gr=/\t|\n|\r/g,mr=/^[\x00-\x1f ]+|[\x00-\x1f ]+$/g;function pr(t,n,i,e){void 0===i&&(i=null),void 0===e&&(e=null),i||(i=new _r,t=t.replace(mr,""));var r=null!==e?e:0;n=n||null;for(var o=[],u=!1,s=!1,f=!1,h=ee(t=t.replace(gr,"")),c=h.length,a=0;a<=c;){var v=a<c?h[a]:br;switch(r){case 0:if(!Fi(v)){if(null===e){o.length=0,r=2;continue}throw new m("Invalid scheme")}o.push(qi(v)),r=1;break;case 1:if(Wi(v)||43===v||45===v||46===v)o.push(qi(v));else{if(58!==v){if(null===e){o.length=0,r=2,a=0;continue}throw new m("Invalid scheme")}var d=ce(o);if(null!==e){if(sr(i.jp)&&!sr(d))return;if(!sr(i.jp)&&sr(d))return;if((hr(i)||null!==i.nw)&&"file"===d)return;if("file"===i.jp&&(i.ew===Pe||null===i.ew))return}if(i.jp=d,null!==e)return void(fr(i)&&i.nw===ir[i.jp]&&(i.nw=null));o.length=0,"file"===i.jp?r=13:fr(i)&&n&&n.jp===i.jp?r=3:fr(i)?r=7:47===h[a+1]?(r=4,a+=1):(i.iw=!0,i.$p.push(""),r=18)}break;case 2:if(!n||n.iw&&35!==v)throw new m("Invalid scheme");n.iw&&35===v?(i.jp=n.jp,i.$p=n.$p.slice(),i.qp=n.qp,i.ow="",i.iw=!0,r=20):"file"!==n.jp?(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.jp=n.jp,br===v?(i.Qp=n.Qp,i.Jp=n.Jp,i.ew=n.ew,i.nw=n.nw,i.$p=n.$p.slice(),i.qp=n.qp):47===v?r=6:63===v?(i.Qp=n.Qp,i.Jp=n.Jp,i.ew=n.ew,i.nw=n.nw,i.$p=n.$p.slice(),i.qp="",r=19):35===v?(i.Qp=n.Qp,i.Jp=n.Jp,i.ew=n.ew,i.nw=n.nw,i.$p=n.$p.slice(),i.qp=n.qp,i.ow="",r=20):92===v&&fr(i)?r=6:(i.Qp=n.Qp,i.Jp=n.Jp,i.ew=n.ew,i.nw=n.nw,i.$p=n.$p.slice(),i.$p.pop(),r=17,a-=1);break;case 6:!fr(i)||47!==v&&92!==v?47===v?r=9:(i.Qp=n.Qp,i.Jp=n.Jp,i.ew=n.ew,i.nw=n.nw,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=ce(Ie(w,_e));f?i.Jp+=b:i.Qp+=b}else f=!0}o.length=0}else if(br===v||47===v||63===v||35===v||fr(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.jp)a-=1,r=15;else if(58!==v||s)if(br===v||47===v||63===v||35===v||fr(i)&&92===v){if(a-=1,fr(i)&&0===o.length)throw new m("Invalid host");if(null!==e&&0===o.length&&(hr(i)||null!==i.nw))return;var g=Ce(ce(o),fr(i));if(i.ew=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=Ce(ce(o),fr(i));if(i.ew=p,o.length=0,r=12,11===e)return}break;case 12:if(zi(v))o.push(v);else{if(!(br===v||47===v||63===v||35===v||fr(i)&&92===v||null!==e))throw new m("Invalid port");if(0!==o.length){var y=_(ce(o),10);if(y>65535)throw new m("Invalid port");i.nw=y===ir[i.jp]?null:y,o.length=0}if(null!==e)return;r=16,a-=1}break;case 13:i.jp="file",47===v||92===v?r=14:n&&"file"===n.jp?br===v?(i.ew=n.ew,i.$p=n.$p.slice(),i.qp=n.qp):63===v?(i.ew=n.ew,i.$p=n.$p.slice(),i.qp="",r=19):35===v?(i.ew=n.ew,i.$p=n.$p.slice(),i.qp=n.qp,i.ow="",r=20):(cr(h.slice(a))||(i.ew=n.ew,i.$p=n.$p.slice(),lr(i)),r=17,a-=1):(r=17,a-=1);break;case 14:47===v||92===v?r=15:(n&&"file"===n.jp&&!cr(h.slice(a))&&(dr(n.$p[0])?i.$p.push(n.$p[0]):i.ew=n.ew),r=17,a-=1);break;case 15:if(br===v||47===v||92===v||63===v||35===v)if(a-=1,null===e&&vr(o))r=17;else if(0===o.length){if(i.ew=Pe,null!==e)return;r=16}else{var S=Ce(ce(o),fr(i));if(0===S.Zp&&"localhost"===S.zp&&(S=Pe),i.ew=S,null!==e)return;o.length=0,r=16}else o.push(v);break;case 16:fr(i)?(r=17,47!==v&&92!==v&&(a-=1)):null===e&&63===v?(i.qp="",r=19):null===e&&35===v?(i.ow="",r=20):br!==v&&(r=17,47!==v&&(a-=1));break;case 17:if(br===v||47===v||fr(i)&&92===v||null===e&&(63===v||35===v)){var T=ce(o);if(ur(T)?(lr(i),47===v||fr(i)&&92===v||i.$p.push("")):!or(T)||47===v||fr(i)&&92===v?or(T)||("file"===i.jp&&0===i.$p.length&&vr(o)&&(Pe!==i.ew&&null!==i.ew&&(i.ew=Pe),o[1]=58,T=ce(o)),i.$p.push(T)):i.$p.push(""),o.length=0,"file"===i.jp&&(br===v||63===v||35===v))for(;i.$p.length>1&&""===i.$p[0];)i.$p.shift();63===v?(i.qp="",r=19):35===v&&(i.ow="",r=20)}else o.push.apply(o,Ie(v,ye));break;case 18:63===v?(i.qp="",r=19):35===v?(i.ow="",r=20):br!==v&&(i.$p[0]+=ce(Ie(v,me)));break;case 19:null===e&&35===v?(i.ow="",r=20):br!==v&&(i.qp+=ce(Ie(v,fr(i)?Te:Se)));break;case 20:br===v||0===v||(i.ow+=ce(Ie(v,pe)))}a++}return i}function yr(t,n,i,e){try{pr(t,n,i,e)}catch(t){}}var _r=function(){this.jp="",this.Qp="",this.Jp="",this.ew=null,this.nw=null,this.$p=[],this.qp=null,this.ow=null,this.iw=!1};function Sr(t){switch(t.jp){case"blob":var n;try{n=pr(t.$p[0],null)}catch(t){return nr}return Sr(n);case"ftp":case"gopher":case"http":case"https":case"ws":case"wss":return function(t,n,i){return t+"://"+xe(n)+(null===i?"":":"+i)}(t.jp,t.ew,t.nw);default:return nr}}var Tr=function(){function t(t,n){var i,e=null;if(null!=n)if(function(t){return null!=t&&t instanceof Tr&&"object"==typeof t.ic}(n))e=n.ic;else try{e=pr(String(n),null)}catch(t){throw new m("Invalid base URL: "+t.message)}try{i=pr(String(t),e)}catch(t){throw new m("Invalid URL: "+t.message)}var r=i.qp;this.ic=i,this.qp=function(t){var n=new Ge;return null!==t&&Ye(n,t),n}(r),this.qp.ic=this}var n=t.prototype;return n.toString=function(){return this.href},n.toJSON=function(){return this.href},function(t,n,i){n&&Ti(t.prototype,n),i&&Ti(t,i)}(t,[{key:"href",get:function(){return function(t,n){void 0===n&&(n=!1);var i=t.jp+":";if(null!==t.ew?(i+="//",hr(t)&&(i+=t.Qp,""!==t.Jp&&(i+=":"+t.Jp),i+="@"),i+=xe(t.ew),null!==t.nw&&(i+=":"+t.nw)):null===t.ew&&"file"===t.jp&&(i+="//"),t.iw)i+=t.$p[0];else for(var e=0,r=t.$p;e<r.length;e++)i+="/"+r[e];return null!==t.qp&&(i+="?"+t.qp),n||null===t.ow||(i+="#"+t.ow),i}(this.ic)},set:function(t){var n;try{n=pr(String(t),null)}catch(t){throw new m("Invalid URL: "+t.message)}this.ic=n,je(this.qp);var i=this.ic.qp;null!==i&&Ye(this.qp,i)}},{key:"origin",get:function(){return Sr(this.ic)}},{key:"protocol",get:function(){return this.ic.jp+":"},set:function(t){yr(t+":",null,this.ic,0)}},{key:"username",get:function(){return this.ic.Qp},set:function(t){wr(this.ic)||(this.ic.Qp=Ee(t,_e))}},{key:"password",get:function(){return this.ic.Jp},set:function(t){wr(this.ic)||(this.ic.Jp=Ee(t,_e))}},{key:"host",get:function(){var t=this.ic,n=t.ew;if(null===n)return"";var i=t.nw,e=xe(n);return null!==i&&(e+=":"+i),e},set:function(t){this.ic.iw||yr(t,null,this.ic,10)}},{key:"hostname",get:function(){var t=this.ic.ew;return null===t?"":xe(t)},set:function(t){this.ic.iw||yr(t,null,this.ic,11)}},{key:"port",get:function(){var t=this.ic.nw;return null===t?"":""+t},set:function(t){wr(this.ic)||(""===t?this.ic.nw=null:yr(t,null,this.ic,12))}},{key:"pathname",get:function(){var t=this.ic.$p;return this.ic.iw?t[0]:0===t.length?"":"/"+t.join("/")},set:function(t){this.ic.iw||(this.ic.$p.length=0,yr(t,null,this.ic,16))}},{key:"search",get:function(){var t=this.ic.qp;return null===t||""===t?"":"?"+t},set:function(t){t=We(t);var n=this.ic;if(""===t)return n.qp=null,void je(this.qp);"?"===t[0]&&(t=t.slice(1)),n.qp="",yr(t,null,n,19),Ye(this.qp,t)}},{key:"searchParams",get:function(){return this.qp}},{key:"hash",get:function(){var t=this.ic.ow;return null===t||""===t?"":"#"+t},set:function(t){""!==t?("#"===t[0]&&(t=t.slice(1)),this.ic.ow="",yr(t,null,this.ic,20)):this.ic.ow=null}}]),t}();function Ir(t){return t.document&&t.document.baseURI||t.location.href||""}x(),pt();var Er=function(){function t(){this.Tw=new kr,this.Iw=oi,this.xw=Rr(),self.performance&&self.performance.now?this.Wm=function(){return self.performance.now()}:this.Wm=Gn}var n=t.prototype;return n.hw=function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];pi.apply(void 0,rn(n))},n.aw=function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];yi.apply(void 0,rn(n))},n.uw=function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];_i.apply(void 0,rn(n))},n.cw=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];Si.apply(void 0,[t].concat(rn(i)))},n.Gm=function(t,n){return d(t,n)},n.lw=function(t,n){return w(t,n)},n.Um=function(t){l(t)},n.dw=function(t){b(t)},n.fw=function(){return this._w.fw()},n.gw=function(){return this._w.gw()},n.mw=function(){return this._w.mw()},n.pw=function(){return this._w.pw()},n.ww=function(){return this._w.ww()},n.yw=function(t,n){return this._w.yw(t,n)},n.Aw=function(t){return this._w.Aw(t)},n.Bh=function(t,n){var i;return void 0===n&&(n=Ir(c)),i="object"!==(void 0===n?"undefined":L(n))||B(n,Tr)?n:n.href,new Tr(t,i)},n.Ew=function(t,n){if(void 0===n&&(n=Ir(c)),this.xw){var i=function(t){return"string"==typeof t}(n)?n:n.toString();return new self.URL(t,i).href}return this.Bh(t,n).href},Et(t,[{key:"Sw",get:function(){return this.Tw}},{key:"Ys",get:function(){return this.Iw}},{key:"Rw",get:function(){return{Cw:v&&v.userAgent.match(/Android /i)?"Android":"other",Pw:Boolean(v&&v.userAgent.match(/Android 8.0.0/i))}}},{key:"Dw",get:function(){return self&&self.location&&"https:"===self.location.protocol}},{key:"Nw",get:function(){return"languages"in v?v.languages.slice():[v.language]}}]),t}(),kr=function(){function t(){}return Et(t,[{key:"Mw",get:function(){return v.oscpu}},{key:"Ys",get:function(){return v.platform}},{key:"Lw",get:function(){return v.vendor}},{key:"Bw",get:function(){return v.vendorSub}}]),t}();function Rr(){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 Or=function(){function t(){}var n=t.prototype;return n.ww=function(){return tt.resolve(!1)},n.gw=function(){return tt.resolve(!1)},n.pw=function(){return tt.resolve(!1)},n.mw=function(){return tt.resolve(!1)},n.Aw=function(t){return tt.resolve(!1)},n.yw=function(t,n){return tt.resolve(!1)},n.fw=function(){return tt.resolve(!1)},t}();x(),pt();var Nr=function(){function t(){}var n=t.prototype;return n.Sk=function(){},n.Gb=function(t){},n.Vb=function(t){},n.Wb=function(t,n){},t}();x(),pt();var Pr="default",Ar="unknown";x(),pt(),x(),pt(),x(),pt();var Dr=function(t){return t.Ek="arraybuffer",t.xk="json",t.Ik="stream",t.Rk="text",t}({});function Cr(t,i){return function(t){if(Array.isArray(t))return t}(t)||function(t,i){var r=null==t?null:void 0!==n&&t[e]||t["@@iterator"];if(null!=r){var o,u,s=[],f=!0,h=!1;try{for(r=r.call(t);!(f=(o=r.next()).done)&&(s.push(o.value),!i||s.length!==i);f=!0);}catch(t){h=!0,u=t}finally{try{f||null==r.return||r.return()}finally{if(h)throw u}}return s}}(t,i)||en(t,i)||function(){throw new m("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}x(),pt(),M(),x(),pt(),x(),pt(),x(),pt(),x(),pt();var xr=function(){function t(n){var i=this;this.P_={},B(n,t)?n.asList().forEach((function(t){var n=Cr(t,2),e=n[0],r=n[1];i.append(e,r)})):Array.isArray(n)?n.forEach((function(t){var n=Cr(t,2),e=n[0],r=n[1];i.append(e,r)})):n&&p.getOwnPropertyNames(n).forEach((function(t){i.append(t,n[t])}))}var n=t.prototype;return n.append=function(t,n){var i=t,e=n;i=Br(i),e=Mr(e);var r=i.toLowerCase();if(this.P_.hasOwnProperty(r)){var o=this.P_[r],u=o[1];o[1]=u?u+", "+e:e}else this.P_[r]=[i,e]},n.delete=function(t){var n=Br(t).toLowerCase();delete this.P_[n]},n.get=function(t){var n=Br(t).toLowerCase();return this.P_.hasOwnProperty(n)?this.P_[n][1]:null},n.has=function(t){var n=Br(t).toLowerCase();return this.P_.hasOwnProperty(n)},n.set=function(t,n){var i=t,e=(i=Br(i)).toLowerCase();this.P_[e]=[i,Mr(n)]},n.forEach=function(t,n){for(var i in this.P_)this.P_.hasOwnProperty(i)&&t.call(n,this.P_[i][1],i,this)},n.asList=function(){var t=[];for(var n in this.P_)if(this.P_.hasOwnProperty(n)){var i=Cr(this.P_[n],2),e=i[0],r=i[1];t.push([e,r])}return t},n.Ck=function(){var t={};return this.forEach((function(n,i){t[i]=n})),t},n.Pk=function(t){var n=this;t.forEach((function(t,i){n.append(i,t)}))},n.Dk=function(t){var n=this;t.forEach((function(t,i){n.set(i,t)}))},t}();function Br(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 Mr(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.AE="same-origin",t.SE="no-cors",t.TE="cors",t.kE="navigate",t}({}),Fr=function(t,n){var i,e,r,o,u,s,f,h,c,a,v,d,l,w,b,g,m,p,y=t.Xu;n?(i=n.Vk,e=n.iE,r=n.EE,o=n.tE,u=n.xE,s=n.RE,f=n.ep,h=n.zw,c=n.CE,a=n.PE,v=n.DE,d=n.NE,l=n.LE,w=n.BE,b=n.OE):(i=null,e={},r="GET",o=Dr.Rk,u=0,s=0,h="",c="",a="",v=!1,l=void 0,w=!1,b=void 0),this.Xu=y,this.Vk=t.Vk||i,this.iE=new xr(t.iE||e),this.EE=t.EE||r,this.tE=t.tE||o,this.xE=void 0!==t.xE?Number(t.xE)||0:u,this.RE=void 0!==t.RE?Number(t.RE)||0:s,this.ep=t.ep||f||(new dn).ep,this.zw=t.zw||h,this.CE=t.CE||c,this.PE=t.PE||a,this.DE=void 0!==t.DE?Boolean(t.DE):v,this.NE=t.NE||d,this.LE=null!=(g=t.LE)?g:l,this.BE=null!=(m=t.BE)?m:w,this.OE=null!=(p=t.OE)?p:b};x(),pt(),x(),pt();var zr=function(t){return t.zE="HttpOpenError",t.qE="HttpResponseError",t.YE="HttpTimeoutError",t}({}),Wr=function(t){function n(n,i,e){var r;return(r=t.call(this,i,e)||this).KE=n,r}return Tt(n,t),Et(n,[{key:"eE",get:function(){return this.KE}}]),n}(wn);var Vr=function(t){function n(n,i){return t.call(this,n,function(t){return"Error while opening "+t+". Invalid URL."}(n.Xu),i)||this}return Tt(n,t),Et(n,[{key:"name",get:function(){return zr.zE}}]),n}(Wr),qr=function(){function t(){}var n=t.prototype;return n.eE=function(t){return tt.reject(new Vr(new Fr(t)))},n.FE=function(t){},n.yn=function(){},t}();x(),pt();var Hr=function(t){function n(n){return t.call(this,"Invalid XML",n)||this}return Tt(n,t),n}(wn),Xr=function(t){function n(){var n;return(n=t.apply(this,arguments)||this).nI=new Or,n.WW=new qr,n.i=new Nr,n}return Tt(n,t),n.prototype.Nx=function(t){throw new Hr},Et(n,[{key:"_w",get:function(){return this.nI}},{key:"rI",get:function(){return!1}},{key:"hI",get:function(){return!1}},{key:"lI",get:function(){return!1}},{key:"uI",get:function(){return!1}},{key:"dI",get:function(){return this.i}},{key:"fI",get:function(){return{_I:Gt}}},{key:"vI",get:function(){return Pr}},{key:"gI",get:function(){return Ar}},{key:"mI",get:function(){return this.WW}}]),n}(Er);function jr(){return jr=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},jr.apply(this,arguments)}function Yr(){var t=p.create(null);return t.Ow=void 0,delete t.Ow,t}function Kr(){return new $r}Kt(new Xr),x(),pt(),x(),pt(),x(),pt(),x(),pt(),x(),pt(),x(),pt();var Gr="undefined"!=typeof Map&&"entries"in Map.prototype?Map:void 0,$r=Gr||function(){var t=function(){function t(t,n){this.index=0,this.data=t,this.selector=n,this.keys=p.keys(t)}return t.prototype.next=function(){var t=this.index;return t<this.keys.length?(this.index++,{value:this.selector(this.data,this.keys[t]),done:!1}):{value:void 0,done:!0}},t}();return function(){function n(){this.data=Yr(),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=Yr(),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}()}();Gr||function(){var t=function(){function t(t,n){this.Fw=t,this.Vw=n}return t.prototype.next=function(){var t=this.Fw.next();return t.done?t:{value:this.Vw(t.value),done:!1}},t}();(function(){function n(){this.P_=Kr()}var i=n.prototype;i.get=function(t){return this.P_.get(""+t)},i.set=function(t,n){return this.P_.set(""+t,n),this},i.has=function(t){return this.P_.has(""+t)},i.delete=function(t){return this.P_.delete(""+t)},i.clear=function(){this.P_.clear()},i.keys=function(){return new t(this.P_.keys(),(function(t){return Number(t)}))},i.values=function(){return this.P_.values()},i.entries=function(){return new t(this.P_.entries(),(function(t){var n=Cr(t,2),i=n[0],e=n[1];return[Number(i),e]}))},i.forEach=function(t){this.P_.forEach((function(n,i){t(n,Number(i))}))},Et(n,[{key:"size",get:function(){return this.P_.size}}])})()}();x(),pt(),x(),pt();var Zr="9a04f079-9840-4286-ab92-e65be0885f95",Jr="urn:uuid:"+Zr,Qr="com.microsoft.playready",to="edef8ba9-79d6-4ace-a3c8-27dcd51d21ed",no="urn:uuid:"+to,io="com.widevine.alpha",eo="1077efec-c0b2-4d02-ace3-3c1e52e2fb4b",ro="urn:uuid:"+eo,oo="org.w3.clearkey",uo="94ce86fb-07ff-4f43-adb8-93d2fa968ca2",so="urn:uuid:"+uo,fo="com.apple.fps.1_0";x(),pt();var ho=function(t){return t.Ww="playready",t.Uw="widevine",t.Xw="fairplay",t.Gw="clearkey",t.Zw="clearkey_dash_if",t.Hw="aes128",t}({}),co={zw:ho.Ww,qw:Qr,Yw:"cenc",Kw:Zr,jw:Jr,Qw:"PlayReady"},ao={zw:ho.Uw,qw:io,Yw:"cenc",Kw:to,jw:no,Qw:"Widevine"},vo={zw:ho.Xw,qw:fo,Yw:"skd",Kw:uo,jw:so,Qw:"FairPlay"},lo=(ho.Xw,{zw:ho.Gw,qw:oo,Yw:"cenc",Kw:eo,jw:ro,Qw:"ClearKey"});ho.Zw;x(),pt();String.prototype.replaceAll;var wo="function"==typeof String.prototype.startsWith?function(t,n){return Vt(t)&&t.startsWith(n)}:function(t,n){return Vt(t)&&t.substr(0,n.length)===n},bo=(String.prototype.endsWith,"function"==typeof String.prototype.repeat?function(t,n){return t.repeat(n)}:function(t,n){var i=0|n;if(0===t.length||0===i)return"";for(var e=t,r="";1==(1&i)&&(r+=e),0!=(i>>>=1);)e+=e;return r}),go=(String.prototype.padStart,String.prototype.padEnd,16384),mo="function"==typeof String.fromCodePoint?function(t){var n;return t.length<=go?(n=String).fromCodePoint.apply(n,rn(t)):yo(t,String.fromCodePoint)}:function(t){for(var n=[],i=0;i<t.length;i++){var e=t[i];e>65535&&(e-=65536,n.push(e>>>10&1023|55296),e=56320|1023&e),n.push(e)}return po(n)};function po(t){var n;return t.length<=go?(n=String).fromCharCode.apply(n,rn(t)):yo(t,String.fromCharCode)}function yo(t,n){for(var i=[],e=0;e<t.length;e+=go)i.push(n.apply(void 0,rn(t.slice(e,e+go))));return i.join("")}var _o=zt.gg&&zt.wg>=42||zt.Kg&&zt.Qg>=38||zt.Ug||zt.Hg||zt.um&&zt.dm>=29;function So(t,n){return function(t,n){return Vt(t)&&-1!==t.indexOf(n)}(t,"audio")?{initDataTypes:["cenc"],audioCapabilities:[jr({contentType:t},n?{robustness:"SW_SECURE_CRYPTO"}:{})]}:{initDataTypes:["cenc"],videoCapabilities:[jr({contentType:t},n?{robustness:"SW_SECURE_CRYPTO"}:{})]}}var To=function(){function t(t){this.Jw=Kr(),this.iy=void 0,this.ey=t}var n=t.prototype;return n.ww=function(){return this.Aw(ao)},n.gw=function(){return this.Aw(lo)},n.pw=function(){return this.Aw(co)},n.mw=function(){return this.Aw(vo)},n.Aw=function(t){var n=t.jw,i=this.Jw.get(n);if(i)return i;var e=this.yw(t,'video/mp4; codecs="avc1.42000a"');return this.Jw.set(n,e),e},n.yw=function(t,n){return Jt((function(){return Qt(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,7]),[4,this.ey.$w(t.qw,[So(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.ey.$w(t.qw,[So(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.fw=function(){return this.iy||(this.iy=this.sy()),this.iy},n.sy=function(){return Jt((function(){return Qt(this,(function(t){switch(t.label){case 0:return"https:"===c.location.protocol?[2,!1]:_o?[4,this.gw()]:[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=0;e<i.length;e++){i[e].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.uy=Yr(),this.vy=void 0,this.ly=0,this.Ds=function(t){n._o(t)},this.gy=null!=t?t:this}var n=t.prototype;return n.bn=function(t,n){if("function"==typeof n)if("string"==typeof t)this.oy(t,n);else for(var i=0;i<t.length;i++){var e=t[i];this.oy(e,n)}},n.oy=function(t,n){var i=this.uy[t];void 0===i?this.uy[t]=n:"function"==typeof i?this.uy[t]=[i,n]:0===this.ly?i.push(n):this.uy[t]=i.concat(n)},n._y=function(t){if("function"==typeof t){var n=this.vy;void 0===n?this.vy=t:"function"==typeof n?this.vy=[n,t]:0===this.ly?n.push(t):this.vy=n.concat(t)}},n.Ro=function(){this.uy=Yr(),this.vy=void 0},n._o=function(t){this.ly++;var n=this.uy[t.type],i=this.vy;void 0!==n&&Io(this.gy,t,n),void 0!==i&&Io(this.gy,t,i),this.ly--},n.vn=function(t,n){if("function"==typeof n)if("string"==typeof t)this.py(t,n);else for(var i=0;i<t.length;i++){var e=t[i];this.py(e,n)}},n.py=function(t,n){var i=this.uy[t];void 0!==i&&("function"==typeof i?i===n&&(this.uy[t]=void 0):0===this.ly?fn(i,n):this.uy[t]=hn(i,n))},n.wy=function(t){if("string"==typeof t)this.uy[t]=void 0;else for(var n=0;n<t.length;n++){var i=t[n];this.uy[i]=void 0}},n.yy=function(t){var n=this.vy;void 0!==n&&("function"==typeof n?n===t&&(this.vy=void 0):0===this.ly?fn(n,t):this.vy=hn(n,t))},n.Ay=function(t,n){var i=this;return new tt((function(e,r){if(n&&n.zm)return r(new bn);var o=function(t){s(),e(t)},u=function(){s(),r(new bn)},s=function(){i.vn(t,o),n&&n.Jm(u)};i.bn(t,o),n&&n.Qm(u)}))},t}();x(),pt(),x(),pt();var ko=function(t,n){void 0===n&&(n=new Date),this.type=t,this.date=n};x(),pt();var Ro=function(t){return t.Sy="Ty",t.Ey="xy",t.Iy="contentprotectionerror",t.Ry="contentprotectionsuccess",t.Cy="currentsourcechange",t.Py="destroy",t.Dy="durationchange",t.Ny="emptied",t.My="encrypted",t.Ly="ended",t.By="Oy",t.Fy="Vy",t.Wy="Uy",t.Gy="Zy",t.Xy="loadstart",t.Hy="manifestupdate",t.zy="nosupportedrepresentationfound",t.qy="offline",t.Yy="online",t.Ky="pause",t.ho="play",t.jy="progress",t.Qy="ratechange",t.Jy="representationchange",t.$y="resize",t.eb="seeked",t.ib="seeking",t.sb="segmentnotfound",t.ob="hb",t.ub="fb",t.uo="sourcechange",t._b="timeupdate",t.vb="volumechange",t.gb="mb",t.pb="wb",t.LICENSE_REQUEST_GENERATED="yb",t.bb="metricschange",t}({}),Oo=["cenc"],No=["cbcs","cbcs-1-9"],Po=function(t){function n(n){var i;return(i=t.call(this,Ro.pb)||this).Ab=n,i}return Tt(n,t),n}(ko),Ao=function(t){function n(n,i,e,r){var o;return(o=t.call(this,"Tb")||this).kb=n,o.Eb=i,o.Tb=e,o.xb=r,o}return Tt(n,t),n}(ko),Do=function(t){function n(){return t.call(this,"lt")||this}return Tt(n,t),n}(ko);x(),pt(),x(),pt(),x(),pt();var Co="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),xo=16383;function Bo(t,n,i){return Co[t>>2]+Co[(3&t)<<4|n>>4]+Co[(15&n)<<2|i>>6]+Co[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 Lo=function(){function t(t){void 0===t&&(t=0),this.rc=t}var n=t.prototype;return n.Pb=function(t){this.rc+=t},n.Db=function(t){this.rc=t},n.Nb=function(){return new t(this.nc)},Et(t,[{key:"nc",get:function(){return this.rc}}]),t}();function Uo(t){if(t>=55296&&t<=57343)throw new g("Lone surrogate U+"+t.toString(16).toUpperCase()+" is not a scalar value")}function Fo(t,n){return t>>n&63|128}function zo(t,n){0!=(4294967168&t)?(0==(4294965248&t)?n.push(t>>6&31|192):0==(4294901760&t)?(Uo(t),n.push(t>>12&15|224),n.push(Fo(t,6))):0==(4292870144&t)&&(n.push(t>>18&7|240),n.push(Fo(t,12)),n.push(Fo(t,6))),n.push(63&t|128)):n.push(t)}function Wo(t,n){if(n.nc>=t.length)throw new g("Invalid byte index");var i=255&t[n.nc];if(n.Pb(1),128==(192&i))return 63&i;throw new g("Invalid continuation byte")}function Vo(t,n){var i=n.nc;if(i>t.length)throw new g("Invalid byte index");if(i===t.length)return!1;var e=255&t[i];if(n.Pb(1),0==(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 Uo(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();var qo=65279;function Ho(t,n,i){void 0===i&&(i=!1);var e=t.getUint16(n.nc,i);return n.Pb(2),e}function Xo(t,n,i,e){void 0===e&&(e=!1),t.setUint16(n.nc,i,e),n.Pb(2)}function jo(t,n,i,e){void 0===e&&(e=!1),t.setUint32(n.nc,i,e),n.Pb(4)}function Yo(t,n,i,e){void 0===e&&(e=!1);for(var r=i.length,o=0;o<r;o+=1){Xo(t,n,i.charCodeAt(o),e)}}function Ko(t,n){return void 0===n&&(n=!1),function(t,n,i,e){for(var r=[];n.nc+2<=t.byteLength;){var o=Ho(t,n,i);if(e&&!o)break;r.push(o)}return po(r)}(Zo(t),new nu,n,!1)}function Go(t){return function(t){return mo(t)}(function(t,n){var i,e=[],r=new nu;if(!n){if(!1===(i=Vo(t,r)))return e;i===qo||e.push(i)}for(;!1!==(i=Vo(t,r));)e.push(i);return e}(Jo(t)))}function $o(t){return new I(function(t){for(var n=[],i=0;i<t.length;i++)zo(t[i],n);return n}(function(t){for(var n=[],i=0,e=t.length;i<e;){var r=t.charCodeAt(i++);if(r>=55296&&r<=56319&&i<e){var o=t.charCodeAt(i++);56320==(64512&o)?n.push(((1023&r)<<10)+(1023&o)+65536):(n.push(r),i--)}else n.push(r)}return n}(t)))}function Zo(t){return new DataView(t.buffer,t.byteOffset,t.byteLength)}function Jo(t){return new I(t.buffer,t.byteOffset,t.byteLength)}function Qo(t){return B(t,ArrayBuffer)?new I(t):Jo(t)}function tu(t){if(t.slice)return t.slice(0);var n=new I(t.byteLength);return n.set(t,0),n}var nu=function(){function t(t){void 0===t&&(t=0),this.rc=t}var n=t.prototype;return n.Pb=function(t){this.rc+=t},n.Db=function(t){this.rc=t},n.Nb=function(){return new t(this.nc)},n.Bb=function(){return new Lo(this.nc<<3)},Et(t,[{key:"nc",get:function(){return this.rc}}]),t}(),iu=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]","[object DataView]"],eu=ArrayBuffer.isView||function(t){return t&&cn(iu,Wt.call(t))};function ru(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}(Qo(t),Qo(n))}function ou(t){var n=t.reduce((function(t,n){return t+n.byteLength}),0);return function(t,n){for(var i=new I(n),e=0,r=0;r<t.length;r++){var o=t[r];i.set(o,e),e+=o.byteLength}return i}(t,n)}function uu(t){return function(t){for(var n=t.length,i=n%3,e=[],r=n-i,o=0;o<r;o+=xo)e.push(Mo(t,o,y.min(r,o+xo)));if(1===i){var u=t[n-1];e.push(Co[u>>2]+Co[(3&u)<<4]+"==")}else if(2===i){var s=t[n-2],f=t[n-1];e.push(Co[s>>2]+Co[(3&s)<<4|f>>4]+Co[(15&f)<<2]+"=")}return e.join("")}(new I(t))}var su=new I([0]).buffer,fu=function(){function t(){this.tc=[]}var n=t.prototype;return n.Fb=function(t){for(var n=0,i=this.tc;n<i.length;n++){if(ru(i[n][0],t))return!0}return!1},n.Vb=function(t){for(var n=0,i=this.tc;n<i.length;n++){var e=i[n];if(ru(e[0],t))return e[1]}},n.Wb=function(t,n){for(var i=0,e=this.tc;i<e.length;i++){var r=e[i];if(ru(r[0],t))return void(r[1]=n)}this.tc.push([t,n])},n.Ub=function(t,n){this.tc.forEach((function(n){return t(n[1],n[0])}),n)},n.Gb=function(){an(this.tc)},Et(t,[{key:"Ob",get:function(){return this.tc.length}}]),t}();x(),pt();var hu=function(){function t(){var t=this;this.Hb=new tt((function(n,i){t.Gd=n,t.Zd=i}))}var n=t.prototype;return n.Zb=function(t){this.Gd&&(this.Gd(t),this.Km())},n.Xb=function(t){this.Zd&&(this.Zd(t),this.Km())},n.np=function(){this.Hb.catch(Gt),this.Xb(new bn)},n.rp=function(t){var n=this;t.then((function(t){return n.Zb(t)}),(function(t){return n.Xb(t)}))},n.Km=function(){this.Gd=void 0,this.Zd=void 0},t}();function cu(t,n){return t===Qr?function(t){if(t.byteLength<2*au.length)return t;var n=new DataView(t,0,2*au.length),i=Ko(n,!0);if(i===au)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+uu(t)+i;return function(t,n){void 0===n&&(n=!1);var i=new I(2*t.length);return Yo(Zo(i),new nu,t,n),i}(e,!0).buffer}(t)}(n):n}x(),pt();var au="<PlayReady";x(),pt(),x(),pt();var vu=function(t){function n(n,i,e,r){var o;return(o=t.call(this,n,r)||this).zb=i,o.qb=e,o}return Tt(n,t),n}(wn);x(),pt(),x(),pt(),x(),pt(),x(),pt(),x(),pt();var du=function(t,n){return(du=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 lu(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}du(t,n),t.prototype=null===n?p.create(n):(i.prototype=n.prototype,new i)}function wu(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.Yb=t,this.Kb=n}t.prototype.get=function(t){var n=this.Yb.get(t);if(0===this.Kb||void 0===n)return n;var i=this.Yb.get(t+1)||0,e=n&(1<<8-this.Kb)-1,r=i>>8-this.Kb;return(e<<this.Kb)+r},t.prototype.getBit=function(t){if(!(t<0)){var n=this.Yb.get(y.floor((t+this.Kb)/8));if(void 0!==n)return(n&1<<7-this.Kb-t%8)>0?1:0}},p.defineProperty(t.prototype,"bitLength",{get:function(){return this.Yb.bitLength-this.Kb},enumerable:!1,configurable:!0}),p.defineProperty(t.prototype,"length",{get:function(){return this.Yb.length},enumerable:!1,configurable:!0})}();x(),pt(),x(),pt();y.pow(2,-52);function bu(t,n,i){return y.min(y.max(t,n),i)}function gu(t,n){return t>>8-n}function mu(t,n){return t&(1<<n)-1}var pu=function(){function t(t){this.jb=t,this.Qb=0,this.Jb=0}return p.defineProperty(t.prototype,"totalBitsRead",{get:function(){return 8*this.Qb+this.Jb},enumerable:!1,configurable:!0}),p.defineProperty(t.prototype,"done",{get:function(){return this.Qb===this.jb.length&&0===this.Jb},enumerable:!1,configurable:!0}),p.defineProperty(t.prototype,"location",{get:function(){return{byte:this.Qb,bit:this.Jb}},enumerable:!1,configurable:!0}),t.prototype.copy=function(){var n=new t(this.jb);return n.seek(this.Qb,this.Jb),n},t.prototype.canReadBits=function(t){return 8*this.Qb+t+this.Jb<=8*this.jb.length},t.prototype.canReadBytes=function(t){return 0===this.Jb?this.Qb+t<=this.jb.length:this.Qb+t<this.jb.length},t.prototype.incBit=function(){this.Jb++,this.Jb>7&&(this.Qb++,this.Jb=0)},t.prototype.seek=function(t,n){this.Qb=t,this.Jb=n},t.prototype.peekBit=function(){if(!this.canReadBits(1))throw new g("Cannot read past end of buffer.");return this.jb.get(this.Qb)>>7-this.Jb&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.Jb)return this.jb.get(this.Qb++);var t=mu(this.jb.get(this.Qb),8-this.Jb),n=gu(this.jb.get(this.Qb+1),this.Jb);return this.Qb++,t<<this.Jb|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.Jb&&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.Jb+t;this.Qb+=n>>3,this.Jb=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 yu=function(t,n){return t===n?0:t<n?-1:t>n?1:T(t)?T(n)?0:1:-1},_u=function(){function t(){this.$b=[],this.tA=[],this.eA=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.tA.length)this.tA.push(0);else{var e=this.tA[this.tA.length-1]+this.$b[this.$b.length-1].length;this.tA.push(e)}this.$b.push(t.subarray(n,n+i)),this.eA+=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.$b;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.$b=[],this.tA=[],this.eA=0},t.prototype.get=function(t){if(!(t<0||t>=this.length)){var n=this.findContainingBufferIndex(t),i=t-this.tA[n];return this.$b[n][i]}},p.defineProperty(t.prototype,"first",{get:function(){return this.get(0)},enumerable:!1,configurable:!0}),t.prototype.indexOf=function(t){if(this.$b.length<1)return-1;if(this.$b.length>1){var n=this.join();this.clear(),this.pushRange(n)}var i=this.$b[0];return"number"==typeof t?wu(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=wu(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.tA,t,yu)},t.prototype.join=function(){if(1===this.$b.length)return this.$b[0];var t=new I(this.length);return this.copyInternal(t,0),t},p.defineProperty(t.prototype,"length",{get:function(){return this.eA},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=bu(n,0,this.length),r=bu(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.$b[u],f=e,h=f-this.tA[u];f+s.length-h<r;)o.pushRange(s,h,s.length-h),u+=1,h=(f+=s.length-h)-this.tA[u],s=this.$b[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.$b.length-1,e=this.$b[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.$b[i]).length-1}else r-=1;n-=1}return this.slice(0,n+1)},t}(),Su=function(){function t(n){this.iA=n||t.BUFFER_CHUNK_SIZE,this.sA=!1,this.nA=new _u,this.jb=new I(this.iA),this.rA=0,this.oA=0,this.Jb=7}return t.prototype.closeByte=function(){this.jb[this.rA++]=this.oA,this.rA>=this.iA&&this.closeBuffer(),this.oA=0,this.Jb=7},t.prototype.closeBuffer=function(t){void 0===t&&(t=!0),0!==this.rA&&(this.nA.pushRange(this.jb,0,this.rA),t&&(this.jb=new I(this.iA)),this.rA=0)},p.defineProperty(t.prototype,"isWritingStartBit",{get:function(){return 7===this.Jb},enumerable:!1,configurable:!0}),t.prototype.close=function(){if(this.sA)throw new g("Cannot close a closed BitWriter.");return this.isWritingStartBit||this.closeByte(),this.closeBuffer(!1),this.sA=!0,this.nA},t.prototype.writeBit=function(t){if(this.sA)throw new g("Cannot write to a closed BitWriter.");this.oA|=t<<this.Jb,0===this.Jb?this.closeByte():this.Jb--},t.prototype.writeByte=function(t){if(this.sA)throw new g("Cannot write to a closed BitWriter.");this.isWritingStartBit?(this.oA=t,this.closeByte()):this.writeByteUnaligned(t)},t.prototype.writeByteUnaligned=function(t){var n=this.Jb;this.oA|=gu(t,n+1),this.closeByte(),this.oA=mu(t,8-n)<<n+1,this.Jb=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.sA)throw new g("Cannot write to a closed BitWriter.");this.isWritingStartBit?this.writeBytesAligned(t):this.writeBytesUnaligned(t)},t.prototype.writeBytesAligned=function(t){this.rA+t.length<=this.iA?(this.jb.set(t,this.rA),this.rA+=t.length,this.rA===this.iA&&this.closeBuffer()):(this.closeBuffer(),this.nA.pushRange(t))},t.prototype.writeBytesUnaligned=function(t){if(0!==t.length){var n=this.Jb;this.oA|=gu(t[0],n+1),this.closeByte();for(var i=1;i<t.length;i++){var e=mu(t[i-1],8-n),r=gu(t[i],n+1);this.oA=e<<n+1|r,this.closeByte()}this.oA=mu(t[t.length-1],8-n)<<n+1,this.Jb=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 I(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 Tu=function(){function t(t){this.rb=new _u,this.Jd=t}return t.prototype.closeWriter=function(){void 0!==this.Jd&&(this.rb=this.rb.concat(this.Jd.close()),this.Jd=void 0)},p.defineProperty(t.prototype,"writer",{get:function(){return void 0===this.Jd&&(this.Jd=new Su),this.Jd},enumerable:!1,configurable:!0}),t.prototype.concat=function(t){this.closeWriter(),this.rb=this.rb.concat(t)},t.prototype.toRangedBuffer=function(){return this.closeWriter(),this.rb},t}(),Iu=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 Tu;return this.serializeCommonBoxHeader(t.writer),this.serializeBoxContent(t),t.toRangedBuffer()},t.LARGE_SIZE=y.pow(2,32),t}();function Eu(t,n){return B(t,Kn)?64===n:t<y.pow(2,n)}function ku(t,n){return y.round(t*y.pow(2,n))}function Ru(t,n){for(var i=0;i<n.length;i++)t.writeByte(n[i])}function Ou(t,n){return t/y.pow(2,n)}x(),pt(),M();var Nu=function(t){function n(n,i,e){var r=t.call(this,n)||this;if(r.version=i,!Eu(i,8))throw new g("the provided version cannot fit in 8 bits.");return r.flags=e,r}return lu(n,t),p.defineProperty(n.prototype,"flags",{get:function(){return this.v_},set:function(t){this.v_=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return 4},n.prototype.serializeFlags=function(t){if("number"!=typeof this.flags)throw new g("Missing custom serializeFlags method.");t.writer.writeUInt(this.flags,24)},n.prototype.serializeBoxContent=function(t){t.writer.writeByte(this.version),this.serializeFlags(t)},n}(Iu);x(),pt(),x(),pt();var Pu=function(t){function n(n,i){var e=t.call(this,n)||this;return e.data=i,e}return lu(n,t),n.prototype.getBoxContentSize=function(){return this.data.length},n.prototype.serializeBoxContent=function(t){t.concat(_u.from(this.data))},n}(Iu);x(),pt(),x(),pt();var Au=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 Du=16384;function Cu(t){var n=t.length;if(n<=Du)return String.fromCharCode.apply(String,t);for(var i=[],e=0;e<n;e+=Du)i.push(String.fromCharCode.apply(String,t.slice(e,e+Du)));return i.join("")}var xu=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 Bu(t,n){var i=t.getUint8(n.offset);return n.shift(1),i}function Mu(t,n,i){var e=qu(Xu(t),n.offset,n.offset+i);return n.shift(e.byteLength),e}function Lu(t,n,i){return n.offset+i<=t.byteLength}function Uu(t,n,i){void 0===i&&(i=!1);var e=t.getUint32(n.offset,i);return n.shift(4),e}function Fu(t,n,i){void 0===i&&(i=!1);var e=Uu(t,n,i),r=Uu(t,n,i),o=i?r:e,u=i?e:r;return Kn.fromBits(u,o,!0)}function zu(t,n,i){return Cu(function(t){return[].slice.call(t)}(Mu(t,n,i)))}function Wu(t,n){var i,e=Bu(t,n);return 0==(128&e)?i=e:192==(224&e)?i=64*(31&e)+(63&Bu(t,n)):224==(240&e)?i=4096*(15&e)+64*(63&Bu(t,n))+(63&Bu(t,n)):240==(248&e)&&(i=262144*(7&e)+4096*(63&Bu(t,n))+64*(63&Bu(t,n))+(63&Bu(t,n))),i}function Vu(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=Wu(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 Cu(n)}(e)}(t,n,!0)}function qu(t,n,i){return void 0===n&&(n=0),void 0===i&&(i=t.byteLength),new I(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 Xu(t){return new I(t.buffer,t.byteOffset,t.byteLength)}var ju=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 Au(this.offset<<3)},t}();x(),pt();var Yu=function(){function t(t,n){this.data=t,this.cursor=n}return t.prototype.nextUint8=function(){return Bu(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 Uu(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=Uu(t,n,i),r=Uu(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 Fu(this.data,this.cursor)},t.prototype.nextUint8Array=function(t){return Mu(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(Uu(t,n));return e}(this.data,this.cursor,t)},t.prototype.nextChars=function(t){return zu(this.data,this.cursor,t)},t.prototype.nextUTF8String=function(){return Vu(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 Ku(t,n){return t.type===n}var Gu=8;function $u(t){var n=function(t,n){var i=[];for(;n.offset<t.byteLength;){var e=Zu(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 Zu(t,n){var i=n.offset,e=function(t,n){var i=n.offset;if(!Lu(t,n,Gu)){return{complete:!1,neededOffset:o=n.offset+Gu}}var e=Uu(t,n),r=zu(t,n,4);if(1===e){if(!Lu(t,n,8)){var o=n.offset+8;return n.seek(i),{complete:!1,neededOffset:o}}e=Fu(t,n).toNumber()}if("uuid"===r){if(!Lu(t,n,16)){o=n.offset+16;return n.seek(i),{complete:!1,neededOffset:o}}r=zu(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 Yu(Hu(t,i,u),new ju(r.headerSize))};return n.seek(u),{complete:!0,box:f}}function Ju(t){return{version:t>>24,flags:new xu(16777215&t)}}function Qu(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 ts(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 ns(t){var n=t.nextUint32Array(9);return{a:Ou(n[0],16),b:Ou(n[1],16),u:Ou(n[2],30),c:Ou(n[3],16),d:Ou(n[4],16),v:Ou(n[5],30),x:Ou(n[6],16),y:Ou(n[7],16),w:Ou(n[8],30)}}function is(t){return new Pu(t.type,qu(Xu(t.data.data),t.data.cursor.offset))}var es=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 lu(n,t),p.defineProperty(n.prototype,"handlerType",{get:function(){return this.hA},set:function(t){this.hA=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}(Nu);function rs(t){var n=t.data,i=Ju(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 es(o,u,e,r.raw)}!function(t){function n(){return t.call(this,"mdir")||this}lu(n,t),n.prototype.serializeReserved=function(t){t.writer.writeString("appl"),t.writer.writeUInt(0,32),t.writer.writeUInt(0,32)}}(es);x(),pt(),x(),pt(),x(),pt();var os=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.aA},set:function(t){if(!Eu(t,8))throw new g("Provided tag does not fit in 8 bits.");this.aA=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}lu(n,t),p.defineProperty(n.prototype,"objectTypeIndication",{get:function(){return this.uA},set:function(t){if(!Eu(t,8))throw new g("Provided objectTypeIndication does not fit in 8 bits.");this.uA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"streamType",{get:function(){return this.cA},set:function(t){if(!Eu(t,6))throw new g("Provided streamType does not fit in 6 bits.");this.cA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"bufferSizeDb",{get:function(){return this.lA},set:function(t){if(!Eu(t,24))throw new g("Provided bufferSizeDb does not fit in 24 bits.");this.lA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"maxBitrate",{get:function(){return this.dA},set:function(t){if(!Eu(t,32))throw new g("Provided maxBitrate does not fit in 32 bits.");this.dA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"avgBitrate",{get:function(){return this.fA},set:function(t){if(!Eu(t,32))throw new g("Provided avgBitrate does not fit in 32 bits.");this.fA=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)}}}(os);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}lu(n,t),n.prototype.getDescriptorSize=function(){return this.data.length},n.prototype.serializeDescriptorContent=function(t){t.concat(_u.from(this.data))}}(os);x(),pt(),x(),pt();var us=function(t){function n(n){void 0===n&&(n=!1);var i=t.call(this,6,n)||this;return i.predefined=2,i}return lu(n,t),n.prototype.getDescriptorSize=function(){return 1},n.prototype.serializeDescriptorContent=function(t){t.writer.writeByte(this.predefined)},n}(os);!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 us(r.fixed28BitMode),o}lu(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._A},set:function(t){if(!Eu(t,16))throw new g("Provided esId does not fit in 16 bits.");this._A=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"streamPriority",{get:function(){return this.vA},set:function(t){if(!Eu(t,5))throw new g("Provided streamPriority does not fit in 5 bits.");this.vA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"dependsOnEsId",{get:function(){return this.gA},set:function(t){if(t&&!Eu(t,16))throw new g("Provided dependsOnEsId does not fit in 16 bits.");this.gA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"ocrEsId",{get:function(){return this.mA},set:function(t){if(t&&!Eu(t,16))throw new g("Provided ocrEsId does not fit in 16 bits.");this.mA=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)}}(os);x(),pt(),x(),pt(),x(),pt(),x(),pt(),x(),pt();var ss=function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n.boxes=[],n}return lu(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}(Iu),fs=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return lu(n,t),n.prototype.serializeBoxContent=function(t){},n.prototype.getBoxContentSize=function(){return 0},n}(ss),hs=function(t){function n(n,i){var e=t.call(this,n)||this;return e.dataReferenceIndex=i,e}return lu(n,t),p.defineProperty(n.prototype,"dataReferenceIndex",{get:function(){return this.pA},set:function(t){if(!Eu(t,16))throw new g("Provided dataReferenceIndex does not fit in 16 bits.");this.pA=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}(fs),cs=function(t){function n(n,i,e,r){var o,u,s=this;return(s=t.call(this,n,i)||this).extra=r,s.channelCount=null!==(o=e.channelCount)&&void 0!==o?o:2,s.sampleSize=null!==(u=e.sampleSize)&&void 0!==u?u:16,s.sampleRate=e.sampleRate,s}return lu(n,t),p.defineProperty(n.prototype,"channelCount",{get:function(){return this.wA},set:function(t){if(!Eu(t,16))throw new g("Provided channelCount does not fit in 16 bits.");this.wA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"sampleSize",{get:function(){return this.yA},set:function(t){if(!Eu(t,16))throw new g("Provided sampleSize does not fit in 16 bits.");this.yA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"sampleRate",{get:function(){return this.bA},set:function(t){if(!Eu(ku(t,16),32))throw new g("Provided rate does not fit in 32 bits (fixed 16.16).");this.bA=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(ku(this.sampleRate,16),32),this.extra&&Ru(n.writer,this.extra)},n}(hs);x(),pt();!function(t){function n(n){var i=t.call(this,"stco",0,0)||this;return i.entries=n,i}lu(n,t),p.defineProperty(n.prototype,"entries",{get:function(){return this.AA},set:function(t){if(!Eu(t.length,32))throw new g("Number of allowed entries cannot fit in 32 bits.");if(t.some((function(t){return!Eu(t,32)})))throw new g("Not all entries can be represented in 32 bits.");this.AA=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)}}}(Nu);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}lu(n,t),p.defineProperty(n.prototype,"cleanApertureWidthN",{get:function(){return this.SA},set:function(t){if(!Eu(t,32))throw new g("Provided cleanApertureWidthN does not fit in 32 bits.");this.SA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"cleanApertureWidthD",{get:function(){return this.TA},set:function(t){if(!Eu(t,32))throw new g("Provided cleanApertureWidthD does not fit in 32 bits.");this.TA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"cleanApertureHeightN",{get:function(){return this.kA},set:function(t){if(!Eu(t,32))throw new g("Provided cleanApertureHeightN does not fit in 32 bits.");this.kA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"cleanApertureHeightD",{get:function(){return this.EA},set:function(t){if(!Eu(t,32))throw new g("Provided cleanApertureHeightD does not fit in 32 bits.");this.EA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"horizOffN",{get:function(){return this.xA},set:function(t){if(!Eu(t,32))throw new g("Provided horizOffN does not fit in 32 bits.");this.xA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"horizOffD",{get:function(){return this.IA},set:function(t){if(!Eu(t,32))throw new g("Provided horizOffD does not fit in 32 bits.");this.IA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"vertOffN",{get:function(){return this.RA},set:function(t){if(!Eu(t,32))throw new g("Provided vertOffN does not fit in 32 bits.");this.RA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"vertOffD",{get:function(){return this.CA},set:function(t){if(!Eu(t,32))throw new g("Provided vertOffD does not fit in 32 bits.");this.CA=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)}}(Iu);x(),pt();!function(t){function n(n,i){var e=t.call(this,"ctts",n,0)||this;return e.entries=i,e}lu(n,t),p.defineProperty(n.prototype,"entries",{get:function(){return this.AA},set:function(t){if(!Eu(t.length,32))throw new g("Number of allowed entries cannot fit in 32 bits.");if(t.some((function(t){return!Eu(t.sampleCount,32)||!Eu(t.sampleOffset,32)})))throw new g("Not all entries can be represented in 64 bits.");this.AA=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)}}}(Nu);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}lu(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))}}(Nu);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}lu(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))}}(Nu);x(),pt();!function(t){function n(){return t.call(this,"dinf")||this}lu(n,t)}(fs);x(),pt(),x(),pt();var as=function(t){function n(n,i,e){var r=t.call(this,n)||this;if(r.version=i,!Eu(i,8))throw new g("the provided version cannot fit in 8 bits.");return r.flags=e,r}return lu(n,t),p.defineProperty(n.prototype,"flags",{get:function(){return this.v_},set:function(t){this.v_=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return 4},n.prototype.serializeFlags=function(t){if("number"!=typeof this.flags)throw new g("Missing custom serializeFlags method.");t.writer.writeUInt(this.flags,24)},n.prototype.serializeBoxContent=function(t){t.writer.writeByte(this.version),this.serializeFlags(t)},n}(ss);!function(t){function n(){return t.call(this,"dref",0,0)||this}lu(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)}}(as);x(),pt(),x(),pt();var vs=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 lu(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.AA},set:function(t){for(var n=0,i=t;n<i.length;n++){var e=i[n];if(!Eu(e.segmentDuration,this.bitSize))throw new g("SegmentDuration of one of the entries does not fit in ".concat(this.bitSize," bits."));if(!Eu(e.mediaTime,this.bitSize))throw new g("MediaTime of one of the entries does not fit in ".concat(this.bitSize," bits."));if(!Eu(e.mediaRateInteger,16))throw new g("Provided mediaRateInteger does not fit in 16 bits.");if(e.mediaRateFraction&&!Eu(e.mediaRateFraction,16))throw new g("Provided mediaRateFraction does not fit in 16 bits.")}this.AA=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}(Nu),ds=function(t){function n(n,i){return void 0===i&&(i=0),t.call(this,n,0,i)||this}return lu(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}(vs),ls=function(t){function n(n,i){return void 0===i&&(i=0),t.call(this,n,1,i)||this}return lu(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}(vs);function ws(t){for(var n=t.data,i=Ju(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 ds(u,r.raw):new ls(u,r.raw)}var bs=function(t){function n(){return t.call(this,"edts")||this}return lu(n,t),n}(fs);function gs(t){for(var n=new bs,i=0,e=$u(t.data);i<e.length;i++){var r=e[i];Ku(r,"elst")?n.boxes.push(ws(r)):n.boxes.push(is(r))}return n}x(),pt(),x(),pt();var ms=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 lu(n,t),p.defineProperty(n.prototype,"majorBrand",{get:function(){return this.DA},set:function(t){if(4!==t.length)throw new g("the provided major brand does not conform to the 4 character requirement");this.DA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"minorVersion",{get:function(){return this.NA},set:function(t){if(!Eu(t,32))throw new g("the provided minor version does not fit in 32 bits.");this.NA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"compatibleBrands",{get:function(){return this.MA},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.MA=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}(Iu);!function(t){function n(n,i,e){return t.call(this,"ftyp",n,i,e)||this}lu(n,t)}(ms);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}lu(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(_u.from(this.data))}}(Iu);x(),pt(),x(),pt();var ps=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 lu(n,t),p.defineProperty(n.prototype,"creationTime",{get:function(){return this.LA},set:function(t){if(!Eu(t,this.bitSize))throw new g("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.LA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"modificationTime",{get:function(){return this.BA},set:function(t){if(!Eu(t,this.bitSize))throw new g("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.BA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"timescale",{get:function(){return this.OA},set:function(t){if(!Eu(t,32))throw new g("Provided sequence number does not fit in 32 bits.");this.OA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"duration",{get:function(){return this.FA},set:function(t){if(!Eu(t,this.bitSize))throw new g("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.FA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"language",{get:function(){return this.VA},set:function(t){if(!Ts(t))throw new g("Expected an ISO-639-2/T language code");this.VA=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}(Nu),ys=function(t){function n(n,i,e){return void 0===e&&(e=0),t.call(this,n,i,0,e)||this}return lu(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}(ps),_s=function(t){function n(n,i,e){return void 0===e&&(e=0),t.call(this,n,i,1,e)||this}return lu(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}(ps);function Ss(t){var n=t.data,i=Ju(n.nextUint32()),e=i.version,r=i.flags,o=Qu(n,e),u=new pu(_u.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 Ts(h)||(h="und"),n.skip(2),0===e?new ys(o,h,r.raw):new _s(o,h,r.raw)}function Ts(t){return/^[a-z]{3}$/.test(t)}var Is=function(t){function n(){return t.call(this,"mdia")||this}return lu(n,t),n}(fs);function Es(t){for(var n=new Is,i=0,e=$u(t.data);i<e.length;i++){var r=e[i];Ku(r,"mdhd")?n.boxes.push(Ss(r)):Ku(r,"hdlr")?n.boxes.push(rs(r)):n.boxes.push(is(r))}return n}x(),pt();!function(t){function n(){var n=t.call(this,"mdat")||this;return n.data=new _u,n}lu(n,t),n.prototype.getBoxContentSize=function(){return this.data.length},n.prototype.serializeBoxContent=function(t){t.concat(this.data)}}(Iu);x(),pt();!function(t){function n(){return t.call(this,"minf")||this}lu(n,t)}(fs);x(),pt();var ks;!function(t){function n(n){var i=t.call(this,"meta",0,0)||this;return i.handler=n,i}lu(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())}}(as);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 Rs,Os,Ns={a:1,b:0,u:0,c:0,d:1,v:0,x:0,y:0,w:1};function Ps(t,n){n.writer.writeUInt(ku(t.a,16),32),n.writer.writeUInt(ku(t.b,16),32),n.writer.writeUInt(ku(0,30),32),n.writer.writeUInt(ku(t.c,16),32),n.writer.writeUInt(ku(t.d,16),32),n.writer.writeUInt(ku(0,30),32),n.writer.writeUInt(ku(t.x,16),32),n.writer.writeUInt(ku(t.y,16),32),n.writer.writeUInt(ku(1,30),32)}function As(t,n){var i,e,r,o;n.writer.writeUInt(null!==(i=t.isLeading)&&void 0!==i?i:Rs.UNKNOWN,2),n.writer.writeUInt(null!==(e=t.sampleDependsOn)&&void 0!==e?e:Os.UNKNOWN,2),n.writer.writeUInt(null!==(r=t.sampleIsDependedOn)&&void 0!==r?r:Os.UNKNOWN,2),n.writer.writeUInt(null!==(o=t.sampleHasRedundancy)&&void 0!==o?o:Os.UNKNOWN,2)}function Ds(t,n){var i,e,r;n.writer.writeUInt(0,4),As(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"}(Rs||(Rs={})),function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.YES=1]="YES",t[t.NO=2]="NO",t[t.RESERVED=3]="RESERVED"}(Os||(Os={})),x(),pt(),x(),pt();var Cs=function(){};x(),pt(),x(),pt(),x(),pt();var xs=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 lu(n,t),p.defineProperty(n.prototype,"systemId",{get:function(){return this.WA},set:function(t){if(16!==t.length)throw new g("Provided systemId length is not 16.");this.WA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"data",{get:function(){return this.Hp},set:function(t){if(!Eu(t.length,32))throw new g("Provided data length does not fit in 32 bits.");this.Hp=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(_u.from(this.systemId)),this.serializeVersionBoxContent(n),n.writer.writeUInt(this.data.length,32),n.concat(_u.from(this.data))},n}(Nu),Bs=function(t){function n(n,i){return t.call(this,0,n,i)||this}return lu(n,t),n}(xs),Ms=function(t){function n(n,i,e){var r=t.call(this,1,n,i)||this;return r.kIds=e,r}return lu(n,t),p.defineProperty(n.prototype,"kIds",{get:function(){return this.UA},set:function(t){if(!Eu(t.length,32))throw new g("Provided kIds length cannot fit in 32 bits.");if(t.some((function(t){return 16!==t.length})))throw new g("Not all provided key ids are 16 bytes long.");this.UA=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(_u.from(e))}},n}(xs);function Ls(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 Ms(i,s,e):new Bs(i,s)}x(),pt(),x(),pt();var Us=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 lu(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.GA},set:function(t){if(!Eu(t,this.bitSize))throw new g("The provided fragmentDuration does not fit in ".concat(this.bitSize," bits."));this.GA=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.bitSize/8},n}(Nu),Fs=function(t){function n(n,i){return void 0===i&&(i=0),t.call(this,n,0,i)||this}return lu(n,t),n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.fragmentDuration,32)},n}(Us),zs=function(t){function n(n,i){return void 0===i&&(i=0),t.call(this,n,1,i)||this}return lu(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}(Us);function Ws(t){var n=t.data,i=Ju(n.nextUint32()),e=i.version,r=i.flags;return 0===e?new Fs(n.nextUint32(),r.raw):new zs(n.nextUint64(),r.raw)}x(),pt();var Vs=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 lu(n,t),p.defineProperty(n.prototype,"trackId",{get:function(){return this.ZA},set:function(t){if(!Eu(t,32))throw new g("Provided track id does not fit in 32 bits.");this.ZA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"defaultSampleDescriptionIndex",{get:function(){return this.XA},set:function(t){if(!Eu(t,32))throw new g("Provided default sample description index does not fit in 32 bits.");this.XA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"defaultSampleDuration",{get:function(){return this.HA},set:function(t){if(!Eu(t,32))throw new g("Provided default sample duration does not fit in 32 bits.");this.HA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"defaultSampleSize",{get:function(){return this.zA},set:function(t){if(!Eu(t,32))throw new g("Provided default sample size does not fit in 32 bits.");this.zA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"defaultSampleFlags",{get:function(){return this.qA},set:function(t){if((null==t?void 0:t.samplePaddingValue)&&!Eu(t.samplePaddingValue,3))throw new g("Provided sample padding value does not fit in 3 bits.");if((null==t?void 0:t.sampleDegradationPriority)&&!Eu(t.sampleDegradationPriority,16))throw new g("Provided sample degradation priority does not fit in 16 bits.");this.qA=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),Ds(null!==(i=this.defaultSampleFlags)&&void 0!==i?i:{},n)},n}(Nu);function qs(t){var n=t.data,i=Ju(n.nextUint32()),e=i.version,r=i.flags,o=n.nextUint32(),u=n.nextUint32(),s=n.nextUint32(),f=n.nextUint32(),h=ts(new pu(_u.from(n.nextUint8Array(4))));return new Vs(o,{sampleDescriptionIndex:u,sampleDuration:s,sampleSize:f,sampleFlags:h},e,r.raw)}var Hs=function(t){function n(){return t.call(this,"mvex")||this}return lu(n,t),n}(fs);function Xs(t){for(var n=new Hs,i=0,e=$u(t.data);i<e.length;i++){var r=e[i];Ku(r,"mehd")?n.boxes.push(Ws(r)):Ku(r,"trex")?n.boxes.push(qs(r)):n.boxes.push(is(r))}return n}x(),pt();var js=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:Ns,c.YA=e,c}return lu(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.LA},set:function(t){if(!Eu(t,this.bitSize))throw new g("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.LA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"modificationTime",{get:function(){return this.BA},set:function(t){if(!Eu(t,this.bitSize))throw new g("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.BA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"timescale",{get:function(){return this.OA},set:function(t){if(!Eu(t,32))throw new g("Provided sequence number does not fit in 32 bits.");this.OA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"duration",{get:function(){return this.FA},set:function(t){if(!Eu(t,this.bitSize))throw new g("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.FA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"rate",{get:function(){return this.KA},set:function(t){if(!Eu(ku(t,16),32))throw new g("Provided rate does not fit in 32 bits (fixed 16.16).");this.KA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"volume",{get:function(){return this.jA},set:function(t){if(!Eu(ku(t,8),16))throw new g("Provided volume does not fit in 16 bits (fixed 8.8).");this.jA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"matrix",{get:function(){return this.QA},set:function(t){if(0!==t.u||0!==t.v||1!==t.w)throw new g("(u, v, w) does not match the required (0, 0, 1)");this.QA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"nextTrackId",{get:function(){return this.YA},set:function(t){if(0===t)throw new g("NextTrackId cannot be 0.");if(!Eu(t,32))throw new g("NextTrackId cannot exceed 32 bits.");this.YA=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(ku(this.rate,16),32),n.writer.writeUInt(ku(this.volume,8),16),n.writer.writeUInt(0,16),n.writer.writeUInt(0,32),n.writer.writeUInt(0,32),Ps(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}(Nu),Ys=function(t){function n(n,i,e,r){return void 0===e&&(e={}),void 0===r&&(r=0),t.call(this,n,i,e,0,r)||this}return lu(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}(js),Ks=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 lu(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}(js);function Gs(t){var n=t.data,i=Ju(n.nextUint32()),e=i.version,r=i.flags,o=Qu(n,e),u=Ou(n.nextUint32(),16),s=Ou(n.nextUint16(),8);n.skip(2),n.skip(8);var f=ns(n);n.skip(24);var h=n.nextUint32();return 0===e?new Ys(o,h,{rate:u,volume:s,matrix:f},r.raw):new Ks(o,h,{rate:u,volume:s,matrix:f},r.raw)}x(),pt(),x(),pt();var $s=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:Ns,a}return lu(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.LA},set:function(t){if(!Eu(t,this.bitSize))throw new g("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.LA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"modificationTime",{get:function(){return this.BA},set:function(t){if(!Eu(t,this.bitSize))throw new g("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.BA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"trackId",{get:function(){return this.ZA},set:function(t){if(0===t)throw new g("trackId cannot be 0.");if(!Eu(t,32))throw new g("trackId cannot exceed 32 bits.");this.ZA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"duration",{get:function(){return this.FA},set:function(t){if(!Eu(t,this.bitSize))throw new g("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.FA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"volume",{get:function(){return this.jA},set:function(t){if(!Eu(ku(t,8),16))throw new g("Provided volume does not fit in 16 bits (fixed 8.8).");this.jA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"width",{get:function(){return this.JA},set:function(t){if(!Eu(ku(t,16),32))throw new g("Provided width does not fit in 32 bits (fixed 16.16).");this.JA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"height",{get:function(){return this.$A},set:function(t){if(!Eu(ku(t,16),32))throw new g("Provided height does not fit in 32 bits (fixed 16.16).");this.$A=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"layer",{get:function(){return this.tS},set:function(t){if(!Eu(t,16))throw new g("Provided layer does not fit in 16 bits.");this.tS=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"alternateGroup",{get:function(){return this.eS},set:function(t){if(!Eu(t,16))throw new g("Provided alternateGroup does not fit in 16 bits.");this.eS=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"matrix",{get:function(){return this.QA},set:function(t){if(0!==t.u||0!==t.v||1!==t.w)throw new g("(u, v, w) does not match the required (0, 0, 1)");this.QA=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.bitSize/8*3+4+4+8+2+2+2+2+36+4+4},n.prototype.serializeFlags=function(t){t.writer.writeUInt(0,20),t.writer.writeBool(this.flags.trackSizeIsAspectRatio),t.writer.writeBool(this.flags.trackInPreview),t.writer.writeBool(this.flags.trackInMovie),t.writer.writeBool(this.flags.trackEnabled)},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),this.serializeTkhdContent(n),n.writer.writeUInt(0,32),n.writer.writeUInt(0,32),n.writer.writeUInt(this.layer,16),n.writer.writeUInt(this.alternateGroup,16),n.writer.writeUInt(ku(this.volume,8),16),n.writer.writeUInt(0,16),Ps(this.matrix,n),n.writer.writeUInt(ku(this.width,16),32),n.writer.writeUInt(ku(this.height,16),32)},n}(Nu),Zs=function(t){function n(n,i,e,r,o,u){return t.call(this,0,n,i,e,r,o,u)||this}return lu(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}($s),Js=function(t){function n(n,i,e,r,o,u){return t.call(this,1,n,i,e,r,o,u)||this}return lu(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}($s);function Qs(t){var n,i,e,r,o=t.data,u=Ju(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=Ou(o.nextInt16(),8);o.skip(2);var b=ns(o),g=Ou(o.nextUint32(),16),m=Ou(o.nextUint32(),16);return 0===s?new Zs({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 Js({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 tf=function(t){function n(){return t.call(this,"trak")||this}return lu(n,t),n}(fs);function nf(t){for(var n=new tf,i=0,e=$u(t.data);i<e.length;i++){var r=e[i];Ku(r,"tkhd")?n.boxes.push(Qs(r)):Ku(r,"mdia")?n.boxes.push(Es(r)):Ku(r,"edts")?n.boxes.push(gs(r)):n.boxes.push(is(r))}return n}var ef=function(t){function n(){return t.call(this,"moov")||this}return lu(n,t),n}(fs);x(),pt(),x(),pt(),x(),pt();var rf=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 lu(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.iS},set:function(t){if(!Eu(t,this.bitSize))throw new g("Provided baseMediaDecodeTime does not fit in ".concat(this.bitSize," bits."));this.iS=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.bitSize/8},n}(Nu),of=function(t){function n(n,i){return void 0===i&&(i=0),t.call(this,n,0,i)||this}return lu(n,t),n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.baseMediaDecodeTime,32)},n}(rf),uf=function(t){function n(n,i){return void 0===i&&(i=0),t.call(this,n,1,i)||this}return lu(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}(rf);function sf(t){var n=t.data,i=Ju(n.nextUint32()),e=i.version,r=i.flags;return 0===e?new of(n.nextUint32(),r.raw):new uf(n.nextUint64(),r.raw)}x(),pt();var ff=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 lu(n,t),p.defineProperty(n.prototype,"trackId",{get:function(){return this.ZA},set:function(t){if(!Eu(t,32))throw new g("Provided track id does not fit in 32 bits.");this.ZA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"baseDataOffset",{get:function(){return this.sS},set:function(t){if(void 0===t&&this.flags.baseDataOffsetPresent)throw new g("The base data offset present flag is set.");if(void 0!==t&&!this.flags.baseDataOffsetPresent)throw new g("The base data offset present flag is not set.");if(t&&!Eu(t,64))throw new g("Provided baseDataOffset does not fit in 32 bits.");this.sS=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"sampleDescriptionIndex",{get:function(){return this.nS},set:function(t){if(void 0===t&&this.flags.sampleDescriptionIndexPresent)throw new g("The sample description index flag is set.");if(void 0!==t&&!this.flags.sampleDescriptionIndexPresent)throw new g("The sample description index flag is not set.");if(t&&!Eu(t,32))throw new g("Provided sampleDescriptionIndex does not fit in 32 bits.");this.nS=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"defaultSampleDuration",{get:function(){return this.HA},set:function(t){if(void 0===t&&this.flags.defaultSampleDurationPresent)throw new g("The default sample duration present flag is set.");if(void 0!==t&&!this.flags.defaultSampleDurationPresent)throw new g("The default sample duration present flag is not set.");if(t&&!Eu(t,32))throw new g("Provided defaultSampleDuration does not fit in 32 bits.");this.HA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"defaultSampleSize",{get:function(){return this.zA},set:function(t){if(void 0===t&&this.flags.defaultSampleSizePresent)throw new g("The default sample size present flag is set.");if(void 0!==t&&!this.flags.defaultSampleSizePresent)throw new g("The default sample size present flag is not set.");if(t&&!Eu(t,32))throw new g("Provided defaultSampleSize does not fit in 32 bits.");this.zA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"defaultSampleFlags",{get:function(){return this.qA},set:function(t){if(void 0===t&&this.flags.defaultSampleFlagsPresent)throw new g("The default sample flags present flag is set.");if(void 0!==t&&!this.flags.defaultSampleFlagsPresent)throw new g("The default sample flags present flag is not set.");if((null==t?void 0:t.samplePaddingValue)&&!Eu(t.samplePaddingValue,3))throw new g("Provided sample padding value does not fit in 3 bits.");if((null==t?void 0:t.sampleDegradationPriority)&&!Eu(t.sampleDegradationPriority,16))throw new g("Provided sample degradation priority does not fit in 16 bits.");this.qA=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&&Ds(this.defaultSampleFlags,n)},n}(Nu);function hf(t){var n=t.data,i=n.nextUint8(),e=new pu(_u.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?ts(new pu(_u.from(n.nextUint8Array(4)))):void 0;return new ff({trackId:a,defaultBaseIsMoof:r,durationIsEmpty:o,baseDataOffset:v,sampleDescriptionIndex:d,defaultSampleDuration:l,defaultSampleSize:w,defaultSampleFlags:b},i)}x(),pt();var cf=function(t){function n(n,i,e){var r=t.call(this,"trun",n,function(t){var n,i,e,r;return{dataOffsetPresent:void 0!==t.dataOffset,firstSampleFlagsPresent:void 0!==t.firstSampleFlags,sampleDurationPresent:null!==(n=t.sampleDurationPresent)&&void 0!==n&&n,sampleSizePresent:null!==(i=t.sampleSizePresent)&&void 0!==i&&i,sampleFlagsPresent:null!==(e=t.sampleFlagsPresent)&&void 0!==e&&e,sampleCompositionTimeOffsetsPresent:null!==(r=t.sampleCompositionTimeOffsetsPresent)&&void 0!==r&&r}}(i))||this;return r.dataOffset=i.dataOffset,r.samples=e,r.firstSampleFlags=i.firstSampleFlags,r}return lu(n,t),p.defineProperty(n.prototype,"dataOffset",{get:function(){return this.rS},set:function(t){if(t&&!Eu(t,32))throw new g("Provided data offset does not fit in 32 bits.");this.rS=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"firstSampleFlags",{get:function(){return this.oS},set:function(t){if((null==t?void 0:t.samplePaddingValue)&&!Eu(t.samplePaddingValue,3))throw new g("Provided sample padding value does not fit in 3 bits.");if((null==t?void 0:t.sampleDegradationPriority)&&!Eu(t.sampleDegradationPriority,16))throw new g("Provided sample degradation priority does not fit in 16 bits.");this.oS=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"samples",{get:function(){return this.hS},set:function(t){var n,i;if(!Eu(t.length,32))throw new g("The sample count cannot be represented in 32 bits.");for(var e=0,r=t;e<r.length;e++){var o=r[e];if(void 0===o.duration&&this.flags.sampleDurationPresent)throw new g("The sample duration present flag is set.");if(void 0!==o.duration&&!this.flags.sampleDurationPresent)throw new g("The sample duration present flag is not set.");if(o.duration&&!Eu(o.duration,32))throw new g("Provided sample duration does not fit in 32 bits.");if(void 0===o.size&&this.flags.sampleSizePresent)throw new g("The sample size present flag is set.");if(void 0!==o.size&&!this.flags.sampleSizePresent)throw new g("The sample size present flag is not set.");if(o.size&&!Eu(o.size,32))throw new g("Provided sample size does not fit in 32 bits.");if(void 0===o.flags&&this.flags.sampleFlagsPresent)throw new g("The sample flags present flag is set.");if(void 0!==o.flags&&!this.flags.sampleFlagsPresent)throw new g("The sample flags present flag is not set.");if((null===(n=o.flags)||void 0===n?void 0:n.samplePaddingValue)&&!Eu(o.flags.samplePaddingValue,3))throw new g("Provided sample padding value does not fit in 3 bits.");if((null===(i=o.flags)||void 0===i?void 0:i.sampleDegradationPriority)&&!Eu(o.flags.sampleDegradationPriority,16))throw new g("Provided sample degradation priority does not fit in 16 bits.");if(void 0===o.compositionTimeOffset&&this.flags.sampleCompositionTimeOffsetsPresent)throw new g("The sample compositionTimeOffset present flag is set.");if(void 0!==o.compositionTimeOffset&&!this.flags.sampleCompositionTimeOffsetsPresent)throw new g("The sample compositionTimeOffset present flag is not set.");if(o.compositionTimeOffset&&!Eu(o.compositionTimeOffset,32))throw new g("Provided sample compositionTimeOffset does not fit in 32 bits.")}this.hS=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&&Ds(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&&Ds(r.flags,n),this.flags.sampleCompositionTimeOffsetsPresent&&(0===this.version?n.writer.writeUInt(r.compositionTimeOffset,32):n.writer.writeInt(r.compositionTimeOffset,32))}},n}(Nu);function af(t){var n=t.data,i=n.nextUint8(),e=new pu(_u.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=ts(new pu(_u.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=ts(new pu(_u.from(n.nextUint8Array(4))))),r&&(l.compositionTimeOffset=0===i?n.nextUint32():n.nextInt32()),v.push(l)}return new cf(i,a,v)}var vf=function(t){function n(){return t.call(this,"traf")||this}return lu(n,t),n}(fs);function df(t){for(var n=new vf,i=0,e=$u(t.data);i<e.length;i++){var r=e[i];Ku(r,"tfhd")?n.boxes.push(hf(r)):Ku(r,"tfdt")?n.boxes.push(sf(r)):Ku(r,"trun")?n.boxes.push(af(r)):n.boxes.push(is(r))}return n}var lf=function(t){function n(){return t.call(this,"moof")||this}return lu(n,t),n}(fs);x(),pt();!function(t){function n(n){var i=t.call(this,"mfhd",0,0)||this;return i.sequenceNumber=n,i}lu(n,t),p.defineProperty(n.prototype,"sequenceNumber",{get:function(){return this.aS},set:function(t){if(!Eu(t,32))throw new g("Provided sequence number does not fit in 32 bits.");this.aS=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)}}(Nu);x(),pt();var wf=function(t){function n(n){var i=t.call(this,"frma")||this;return i.codingName=n,i}return lu(n,t),p.defineProperty(n.prototype,"codingName",{get:function(){return this.uS},set:function(t){if(4!==t.length)throw new g("Provided coding name was not 4 characters long.");this.uS=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return 4},n.prototype.serializeBoxContent=function(t){t.writer.writeString(this.codingName)},n}(Iu);x(),pt();!function(t){function n(n,i){var e=t.call(this,"pasp")||this;return e.hSpacing=n,e.vSpacing=i,e}lu(n,t),p.defineProperty(n.prototype,"hSpacing",{get:function(){return this.cS},set:function(t){if(!Eu(t,32))throw new g("Provided hSpacing does not fit in 32 bits.");this.cS=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"vSpacing",{get:function(){return this.lS},set:function(t){if(!Eu(t,32))throw new g("Provided vSpacing does not fit in 32 bits.");this.lS=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)}}(Iu);x(),pt();!function(t){function n(n,i,e){var r=t.call(this,n)||this;return r.sample=i,r.sinf=e,r}lu(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())}}(fs);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 wf(n),r}lu(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())}}(Iu);x(),pt();var bf=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 lu(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.AA},set:function(t){var n=this;if(!Eu(t.length,32))throw new g("Number of entries provided does not fit in 32 bits.");if(t.some((function(t){return!Eu(t,n.bitSize)})))throw new g("Not all provided entries fit in ".concat(this.bitSize," bits."));this.AA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"explicitAuxInfoType",{get:function(){return this.dS},set:function(t){if(void 0===t)this.flags=0;else{if(!Eu(t.auxInfoType,32))throw new g("Provided auxInfoType does not fit in 32 bits.");if(!Eu(t.auxInfoTypeParameter,32))throw new g("Provided auxInfoTypeParameter does not fit in 32 bits.");this.flags=1}this.dS=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}(Nu);(function(t){function n(){return null!==t&&t.apply(this,arguments)||this}lu(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)}}})(bf),function(t){function n(){return null!==t&&t.apply(this,arguments)||this}lu(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)}}}(bf);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}lu(n,t),p.defineProperty(n.prototype,"defaultSampleInfoSize",{get:function(){return this.fS},set:function(t){if(!Eu(t,8))throw new g("Provided defaultSampleInfoSize does not fit in a single byte.");this.fS=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"sampleInfoSizes",{get:function(){return this._S},set:function(t){if(!Eu(t.length,32))throw new g("Number of sampleInfoSizes provided does not fit in 32 bits.");if(t.some((function(t){return!Eu(t,8)})))throw new g("Not all provided sampleInfoSizes fit in a byte.");this._S=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"explicitAuxInfoType",{get:function(){return this.dS},set:function(t){if(void 0===t)this.flags=0;else{if(!Eu(t.auxInfoType,32))throw new g("Provided auxInfoType does not fit in 32 bits.");if(!Eu(t.auxInfoTypeParameter,32))throw new g("Provided auxInfoTypeParameter does not fit in 32 bits.");this.flags=1}this.dS=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)}}}(Nu);x(),pt();!function(t){function n(n){var i=t.call(this,"sdtp",0,0)||this;return i.samples=n,i}lu(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++){As(e[i],n)}}}(Nu);x(),pt();!function(t){function n(n){return t.call(this,"stsd",n,0)||this}lu(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)}}(as);x(),pt();var gf=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 lu(n,t),p.defineProperty(n.prototype,"groupingType",{get:function(){return this.vS},set:function(t){if(4!==t.length)throw new g("The provided groupingType does not equal 4 characters.");this.vS=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}(Nu);(function(t){function n(n,i){return t.call(this,0,n,i)||this}lu(n,t),n.prototype.serializeVersionBoxContent=function(t){}})(gf),function(t){function n(n,i,e){var r=t.call(this,1,n,e)||this;return r.defaultLength=i,r}lu(n,t),p.defineProperty(n.prototype,"defaultLength",{get:function(){return this.gS},set:function(t){if(!Eu(t,32))throw new g("The provided defaultLength does not fit in 32 bits.");this.gS=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)}}(gf),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}lu(n,t),p.defineProperty(n.prototype,"defaultSampleDescriptionIndex",{get:function(){return this.XA},set:function(t){if(!Eu(t,32))throw new g("The provided defaultSampleDescriptionIndex 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.serializeVersionBoxContent=function(t){t.writer.writeUInt(this.defaultSampleDescriptionIndex,32)}}(gf);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}lu(n,t),p.defineProperty(n.prototype,"sampleSizes",{get:function(){return this.mS},set:function(t){if(!Eu(t.length,32))throw new g("Number of allowed samples cannot fit in 32 bits.");if(t.some((function(t){return!Eu(t,32)})))throw new g("Not all sampleSizes can be represented in 32 bits.");this.mS=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)}}})(Nu),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}lu(n,t),p.defineProperty(n.prototype,"defaultSampleSize",{get:function(){return this.zA},set:function(t){if(!Eu(t,32))throw new g("Provided defaultSampleSize does not fit in 32 bits.");this.zA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"samples",{get:function(){return this.hS},set:function(t){if(!Eu(t,32))throw new g("Number of allowed samples cannot fit in 32 bits.");this.hS=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)}}(Nu);x(),pt();!function(t){function n(){return t.call(this,"stbl")||this}lu(n,t)}(fs);x(),pt();!function(t){function n(n){var i=t.call(this,"stsc",0,0)||this;return i.entries=n,i}lu(n,t),p.defineProperty(n.prototype,"entries",{get:function(){return this.AA},set:function(t){if(!Eu(t.length,32))throw new g("Number of allowed entries cannot fit in 32 bits.");if(t.some((function(t){return!Eu(t.firstChunk,32)||!Eu(t.sampleDescriptionIndex,32)||!Eu(t.samplesPerChunk,32)})))throw new g("Not all entries can be represented in 96 bits.");this.AA=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)}}}(Nu);x(),pt();!function(t){function n(){return t.call(this,"schi")||this}lu(n,t)}(fs);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}lu(n,t),p.defineProperty(n.prototype,"schemeType",{get:function(){return this.pS},set:function(t){if(4!==t.length)throw new g("The provided schemeType does not have a length of 4.");this.pS=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"schemeVersion",{get:function(){return this.wS},set:function(t){if(!Eu(t,32))throw new g("The provided schemeVersion does not fit in 23 bits.");this.wS=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"schemeUri",{get:function(){return this.yS},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.yS=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))}}(Nu);x(),pt();var mf=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 lu(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.bS},set:function(t){if(!Eu(t,32))throw new g("Provided referenceId does not fit in 32 bits.");this.bS=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"timescale",{get:function(){return this.OA},set:function(t){if(!Eu(t,32))throw new g("Provided timescale does not fit in 32 bits.");this.OA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"earliestPresentationTime",{get:function(){return this.SS},set:function(t){if(!Eu(t,this.bitSize))throw new g("Provided earliestPresentationTime does not fit in ".concat(this.bitSize," bits."));this.SS=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"firstOffset",{get:function(){return this.TS},set:function(t){if(!Eu(t,this.bitSize))throw new g("Provided timescale does not fit in ".concat(this.bitSize," bits."));this.TS=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"references",{get:function(){return this.kS},set:function(t){if(!Eu(t.length,16))throw new g("The number of provided reference items does not fit in 16 bits.");for(var n=0,i=t;n<i.length;n++){var e=i[n];if(!Eu(e.referencedSize,31))throw new g("Provided referenced size does not fit in 31 bits.");if(!Eu(e.subsegmentDuration,32))throw new g("Provided subsegment duration does not fit in 31 bits.");if(!Eu(e.sapType,3))throw new g("Provided SAP type does not fit in 3 bits.");if(!Eu(e.sapDeltaTime,28))throw new g("Provided SAP delta time does not fit in 28 bits.")}this.kS=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}(Nu),pf=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 lu(n,t),n.prototype.serializeSidxBoxContent=function(t){t.writer.writeUInt(this.earliestPresentationTime,32),t.writer.writeUInt(this.firstOffset,32)},n}(mf),yf=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 lu(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}(mf);x(),pt();!function(t){function n(n,i,e){return t.call(this,"styp",n,i,e)||this}lu(n,t)}(ms);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}lu(n,t),p.defineProperty(n.prototype,"balance",{get:function(){return this.ES},set:function(t){if(t<-1||t>1)throw new g("Provided balance does not fit in the allowed range [-1, 1].");if(!Eu(ku(t,8),16))throw new g("Provided balance does not fit in 16 bits (fixed 8.8).");this.ES=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(ku(this.balance,8),16),n.writer.writeUInt(0,16)}}(Nu);x(),pt();!function(t){function n(n){var i=t.call(this,"stss",0,0)||this;return i.entries=n,i}lu(n,t),p.defineProperty(n.prototype,"entries",{get:function(){return this.AA},set:function(t){if(!Eu(t.length,32))throw new g("Number of allowed entries cannot fit in 32 bits.");if(t.some((function(t){return!Eu(t,32)})))throw new g("Not all entries can be represented in 32 bits.");this.AA=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)}}}(Nu);x(),pt();!function(t){function n(n){var i=t.call(this,"stts",0,0)||this;return i.entries=n,i}lu(n,t),p.defineProperty(n.prototype,"entries",{get:function(){return this.AA},set:function(t){if(!Eu(t.length,32))throw new g("Number of allowed entries cannot fit in 32 bits.");if(t.some((function(t){return!Eu(t.sampleCount,32)||!Eu(t.sampleDelta,32)})))throw new g("Not all entries can be represented in 64 bits.");this.AA=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)}}}(Nu);x(),pt();!function(t){function n(n){var i=t.call(this,"trep",0,0)||this;return i.trackId=n,i}lu(n,t),p.defineProperty(n.prototype,"trackId",{get:function(){return this.ZA},set:function(t){if(!Eu(t,32))throw new g("The provided trackId does not fit in 32 bits.");this.ZA=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)}}(as);x(),pt();!function(t){function n(){return t.call(this,"udta")||this}lu(n,t)}(fs);x(),pt();var _f={red:0,green:0,blue:0};!function(t){function n(n,i){void 0===n&&(n=0),void 0===i&&(i=_f);var e=t.call(this,"vmhd",0,1)||this;return e.graphicsMode=n,e.opColor=i,e}lu(n,t),p.defineProperty(n.prototype,"opColor",{get:function(){return this.xS},set:function(t){if(!Eu(t.red,16)||!Eu(t.green,16)||!Eu(t.blue,16))throw new g("Not all colors could be represented in 16 bits.");this.xS=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)}}(Nu);x(),pt();var Sf=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 lu(n,t),p.defineProperty(n.prototype,"width",{get:function(){return this.JA},set:function(t){if(!Eu(t,16))throw new g("Provided width does not fit in 16 bits.");this.JA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"height",{get:function(){return this.$A},set:function(t){if(!Eu(t,16))throw new g("Provided height does not fit in 16 bits.");this.$A=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"horizontalResolution",{get:function(){return this.IS},set:function(t){if(!Eu(ku(t,16),32))throw new g("Provided horizontalResolution does not fit in 32 bits (fixed 16.16).");this.IS=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"verticalResolution",{get:function(){return this.RS},set:function(t){if(!Eu(ku(t,16),32))throw new g("Provided verticalResolution does not fit in 32 bits (fixed 16.16).");this.RS=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"compressorName",{get:function(){return this.CS},set:function(t){if(t.length>31)throw new g("The provided compressorName should at most be 31 characters long.");this.CS=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"frameCount",{get:function(){return this.PS},set:function(t){if(!Eu(t,16))throw new g("Provided frameCount does not fit in 16 bits.");this.PS=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"depth",{get:function(){return this.DS},set:function(t){if(!Eu(t,16))throw new g("Provided depth does not fit in 16 bits.");this.DS=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(ku(this.horizontalResolution,16),32),n.writer.writeUInt(ku(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&&Ru(n.writer,this.extra)},n}(hs);x(),pt(),x(),pt(),M();!function(t){function n(n){var i=t.call(this,"esds",0,0)||this;return i.esDescriptor=n,i}lu(n,t),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+(B(this.esDescriptor,I)?this.esDescriptor.length:this.esDescriptor.getSize())},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),B(this.esDescriptor,I)?n.concat(_u.from(this.esDescriptor)):this.esDescriptor.serialize(n)}}(Nu);x(),pt();!function(t){function n(n,i,e){var r=t.call(this,"mp4a",n,e)||this;return r.esd=i,r}lu(n,t),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.esd.getSize()},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.concat(this.esd.serialize())}}(cs);x(),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}lu(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)}}(Sf);x(),pt();!function(t){function n(n,i){var e=t.call(this,"mp4s",n)||this;return e.esDescriptor=i,e}lu(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)}}(hs);x(),pt(),x(),pt();!function(t){function n(n){var i=t.call(this,"avcC")||this;return i.decoderConfig=n,i}lu(n,t),n.prototype.getBoxContentSize=function(){return this.decoderConfig.getSize()},n.prototype.serializeBoxContent=function(t){this.decoderConfig.serialize(t)}}(Iu);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.NS},set:function(t){if(!Eu(t,8))throw new g("Provided version does not fit in 8 bits.");this.NS=t},enumerable:!1,configurable:!0}),p.defineProperty(t.prototype,"profileIndication",{get:function(){return this.MS},set:function(t){if(!Eu(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.LS},set:function(t){if(!Eu(t,8))throw new g("Provided profileCompatibility does not fit in 8 bits.");this.LS=t},enumerable:!1,configurable:!0}),p.defineProperty(t.prototype,"levelIndication",{get:function(){return this.FS},set:function(t){if(!Eu(t,8))throw new g("Provided levelIndication does not fit in 8 bits.");this.FS=t},enumerable:!1,configurable:!0}),p.defineProperty(t.prototype,"spsSets",{get:function(){return this.VS},set:function(t){if(!Eu(t.length,5))throw new g("Provided number of spsSets exceeds the max (32)");this.VS=t},enumerable:!1,configurable:!0}),p.defineProperty(t.prototype,"ppsSets",{get:function(){return this.WS},set:function(t){if(!Eu(t.length,8))throw new g("Provided number of ppsSets exceeds the max (256)");this.WS=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(_u.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(_u.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}lu(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())}}(Sf);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}lu(n,t),p.defineProperty(n.prototype,"bufferSizeDb",{get:function(){return this.lA},set:function(t){if(!Eu(t,32))throw new g("Provided bufferSizeDb does not fit in 32 bits.");this.lA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"max",{get:function(){return this.M_},set:function(t){if(!Eu(t,32))throw new g("Provided max does not fit in 32 bits.");this.M_=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"avg",{get:function(){return this.US},set:function(t){if(!Eu(t,32))throw new g("Provided avg does not fit in 32 bits.");this.US=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)}}(Iu);x(),pt(),x(),pt(),x(),pt();var Tf=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 I(0),s}return lu(n,t),p.defineProperty(n.prototype,"isProtected",{get:function(){return this.GS},set:function(t){if(!Eu(t,8))throw new g("Provided isProtected does not fit in 1 byte.");this.GS=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"perSampleIvSize",{get:function(){return this.ZS},set:function(t){if(![8,16].includes(t))throw new g("Provided perSampleIvSize does not match any allowed value [8, 16].");this.ZS=t,this.XS=new I(0)},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"kId",{get:function(){return this.HS},set:function(t){if(16!==t.length)throw new g("Provided kId length is not 16.");this.HS=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.ZS=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),Ru(t.writer,this.kId),0===this.perSampleIvSize&&(t.writer.writeByte(this.constantIv.length),Ru(t.writer,this.constantIv))},n}(Nu),If=(function(t){function n(n){return t.call(this,0,n)||this}lu(n,t)}(Tf),function(t){function n(n){var i=t.call(this,1,n)||this;return i.cryptByteBlocks=n.cryptByteBlock,i.skipByteBlocks=n.skipByteBlock,i}return lu(n,t),p.defineProperty(n.prototype,"cryptByteBlocks",{get:function(){return this.zS},set:function(t){if(!Eu(t,4))throw new g("Provided cryptByteBlocks does not fit in 4 bits.");this.zS=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"skipByteBlocks",{get:function(){return this.qS},set:function(t){if(!Eu(t,4))throw new g("Provided skipByteBlocks does not fit in 4 bits.");this.qS=t},enumerable:!1,configurable:!0}),n.prototype.serializeVersionBoxContent=function(t){t.writer.writeUInt(this.cryptByteBlocks,4),t.writer.writeUInt(this.skipByteBlocks,4)},n}(Tf));!function(t){function n(n){var i=t.call(this)||this;return i.tencBox=new If(n),i}lu(n,t),n.prototype.serializeBoxContent=function(t){this.tencBox.serializeOwnContent(t)},n.prototype.getBoxContentSize=function(){return this.tencBox.getTencHeaderSize()}}(Cs);function Ef(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}lu(n,t),p.defineProperty(n.prototype,"samples",{get:function(){return this.hS},set:function(t){var n;if(!Eu(t.length,32))throw new g("The number of samples provided does not fit in 32 bits.");for(var i=0,e=t;i<e.length;i++){var r=e[i];if(Ef(r)&&![8,16].includes(r.iv.length))throw new g("IV of one of the provided samples did not satisfy the required length constraints. [8, 16]");if(void 0===n&&(n=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(!Eu(r.subsamples.length,16))throw new g("Subsample length of one of the provided samples does not fit in 16 bits.");for(var o=0,u=r.subsamples;o<u.length;o++){var s=u[o];if(!Eu(s.clearData,16))throw new g("Subsample clearData of one of the provided samples does not fit in 16 bits.");if(!Eu(s.protectedData,23))throw new g("Subsample protectedData of one of the provided samples does not fit in 23 bits.")}}}this.flags.useSubsampleEncryption=null!=n&&n,this.hS=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){for(var n=0,i=0,e=this.samples;i<e.length;i++){var r=e[i];Ef(r)&&(n+=r.iv.length),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(Ef(r)&&Ru(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)}}(Nu);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}lu(n,t),p.defineProperty(n.prototype,"timescale",{get:function(){return this.OA},set:function(t){if(!Eu(t,32))throw new g("The provided timescale does not fit in 32 bits.");this.OA=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"presentationTimeDelta",{get:function(){return this.YS},set:function(t){if(!Eu(t,32))throw new g("The provided presentationTimeDelta does not fit in 32 bits.");this.YS=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"eventDuration",{get:function(){return this.KS},set:function(t){if(!Eu(t,32))throw new g("The provided eventDuration does not fit in 32 bits.");this.KS=t},enumerable:!1,configurable:!0}),p.defineProperty(n.prototype,"id",{get:function(){return this.jS},set:function(t){if(!Eu(t,32))throw new g("The provided id does not fit in 32 bits.");this.jS=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(_u.from(this.data))}}(Nu);x(),pt(),x(),pt(),x(),pt();!function(){function t(){this.boxes=[]}t.prototype.serialize=function(){for(var t=new Tu,n=0,i=this.boxes;n<i.length;n++){var e=i[n];t.concat(e.serialize())}return t.toRangedBuffer()}}();function Rf(t,n){return function(i){var e=new Yu(function(t){return new DataView(t.buffer,t.byteOffset,t.byteLength)}(i),new ju),r=function(t,n){for(var i=t.data,e=t.cursor;e.offset<i.byteLength;){var r=Zu(i,e);if(!r.complete)return;if(Ku(r.box,n))return r.box}}(e,t);if(!r)throw new g("".concat(t," box not found"));return n(r)}}Rf("moov",(function(t){for(var n=new ef,i=0,e=$u(t.data);i<e.length;i++){var r=e[i];Ku(r,"mvhd")?n.boxes.push(Gs(r)):Ku(r,"trak")?n.boxes.push(nf(r)):Ku(r,"mvex")?n.boxes.push(Xs(r)):Ku(r,"pssh")?n.boxes.push(Ls(r)):n.boxes.push(is(r))}return n})),Rf("sidx",(function(t){var n,i,e=t.data,r=Ju(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 pu(_u.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 pf(s,f,n,i,c,u.raw):new yf(s,f,n,i,c,u.raw)})),Rf("moof",(function(t){for(var n=new lf,i=0,e=$u(t.data);i<e.length;i++){var r=e[i];Ku(r,"traf")?n.boxes.push(df(r)):Ku(r,"pssh")?n.boxes.push(Ls(r)):n.boxes.push(is(r))}return n}));var Of=Rf("pssh",Ls),Nf=function(t){function n(n,i){var e;(e=t.call(this)||this).$S=n,e.aT=i,e.iT=!1,e.uT=function(){e.oT()},e.cT=function(t){e._o(new Ao(e,t.messageType,cu(e.aT,t.message)))},e.lT=function(){e.iT=!0,e.tT.Ob>0&&(e.tT.Gb(),e._o(new Po(e.tT))),e.$S.removeEventListener("keystatuseschange",e.uT),e.$S.removeEventListener("message",e.cT)},e.$S.addEventListener("keystatuseschange",e.uT),e.$S.addEventListener("message",e.cT),e.tT=new fu;var r=[];return e.$S.closed&&r.push(tt.resolve(e.$S.closed)),e.sT=new hu,r.push(e.sT.Hb),e.Vd=tt.race(r).then(e.lT,e.lT),e.oT(),e}Tt(n,t);var i=n.prototype;return i.Ws=function(){if(this.iT)return this.Vd;var t=[];return t.push(tt.resolve(this.$S.close())),t.push(yn(1e3)),this.sT.rp(tt.race(t).catch(Pf)),this.iT=!0,this.Vd},i.nT=function(t,n,i){if(zt.hg){var e=Of(Qo(n));if(1===e.version)n=new Bs(e.systemId,e.data).serialize().join()}return tt.resolve(this.$S.generateRequest(t,n)).catch(Pf)},i.$n=function(t){return tt.resolve(this.$S.load(t)).catch(Pf)},i.rT=function(){return tt.resolve(this.$S.remove()).catch(Pf)},i.ir=function(t){return tt.resolve(this.$S.update(t)).catch(Pf)},i.oT=function(){var t=this;this.tT.Gb(),this.$S.keyStatuses.forEach((function(n,i){t.hT(i,n)})),this._o(new Po(this.tT))},i.hT=function(t,n){if("string"==typeof t){var i=t;t=n,n=i}var e=Qo(t);if(this.aT===Qr&&16===e.byteLength&&(zt.Sg||zt.ym)){var r=Zo(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.aT===Qr&&"status-pending"===n&&(n="usable"),this.tT.Wb(e,n)},Et(n,[{key:"QS",get:function(){return this.Vd}},{key:"JS",get:function(){return this.$S.expiration}},{key:"Ab",get:function(){return this.tT}},{key:"eT",get:function(){return this.$S.sessionId}}]),n}(Eo);function Pf(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 vu(t.message,void 0,n,t)}var Af=function(){function t(t,n,i){this.fT=t,this._T=n,this.kd=i}var n=t.prototype;return n.dT=function(t){return Jt((function(){return Qt(this,(function(n){return[2,new Nf(this.fT.createSession(t),this._T)]}))})).call(this)},n.vT=function(t){return tt.resolve(this.fT.setServerCertificate(t))},n.kn=function(t){return tt.resolve(t.setMediaKeys(this.fT))},n.gT=function(t){return tt.resolve(t.setMediaKeys(null))},n.nr=function(){return tt.resolve()},t}(),Df=function(){function t(t,n,i){this.mT=t,this.aT=n,this.wT=i}var n=t.prototype;return n.pT=function(){return Jt((function(){var t;return Qt(this,(function(n){switch(n.label){case 0:return[4,this.mT.createMediaKeys()];case 1:return t=n.sent(),[2,new Af(t,this.aT,this.wT)]}}))})).call(this)},n.yT=function(){return this.wT},Et(t,[{key:"_T",get:function(){return this.mT.keySystem}}]),t}();function Cf(t){var n=t.trim(),i=n.indexOf(";");return i<0?n:n.substr(0,i).trim()}function xf(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,ST:e.ST},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 Bf(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 Bf(t,n,i,e)})),u=!0,o.videoCapabilities.length&&(r=!0))}return u||(r=t(i,"video/mp4")),r?o:void 0}}function Bf(t,n,i,e){return!!e.contentType&&(!(e.encryptionScheme&&!cn(n,e.encryptionScheme))&&(!e.robustness&&t(i,Cf(e.contentType))))}function Mf(t){if(t.videoCapabilities)for(var n=0,i=t.videoCapabilities;n<i.length;n++){var e=i[n];if(e.contentType)return e.contentType}if(t.audioCapabilities)for(var r=0,o=t.audioCapabilities;r<o.length;r++){var u=o[r];if(u.contentType)return u.contentType}}function Lf(t){for(var n=[],i=0;i<t.length;i++){var e=t[i];e.encryptionScheme&&n.push({contentType:e.contentType,robustness:e.robustness})}return t.concat(n)}function Uf(t){return!(!t.audioCapabilities||!t.audioCapabilities.some(Ff))||!(!t.videoCapabilities||!t.videoCapabilities.some(Ff))}function Ff(t){return!t.robustness}function zf(t,n){for(var i=[],e=0;e<t.length;e++){var r=t[e];r.robustness?i.push(r):i.push(jr({},r,{robustness:n}))}return i}x(),pt(),x(),pt();var Wf=function(){function t(){}return t.prototype.$w=function(t,n){return Jt((function(){var i,e,r,o,u,s,f;return Qt(this,(function(h){switch(h.label){case 0:for(n=n.filter((function(t){return!t.ST})),i=0;i<n.length;i++)(e=n[i]).audioCapabilities&&(e.audioCapabilities=Lf(e.audioCapabilities)),e.videoCapabilities&&(e.videoCapabilities=Lf(e.videoCapabilities));if(t!==io||!n.some(Uf))return[3,4];r=n.map((function(t){return function(t,n){return jr({},t,{videoCapabilities:t.videoCapabilities?zf(t.videoCapabilities,n):void 0,audioCapabilities:t.audioCapabilities?zf(t.audioCapabilities,n):void 0})}(t,"SW_SECURE_CRYPTO")})),h.label=1;case 1:return h.trys.push([1,3,,4]),[4,v.requestMediaKeySystemAccess(t,r)];case 2:return o=h.sent(),u=o.getConfiguration(),[2,new Df(o,t,u)];case 3:return h.sent(),[3,4];case 4:return[4,v.requestMediaKeySystemAccess(t,n)];case 5:return s=h.sent(),f=s.getConfiguration(),[2,new Df(s,t,f)]}}))}))()},t.TT=function(){return void 0!==v&&"function"==typeof v.requestMediaKeySystemAccess},t}();x(),pt(),x(),pt(),x(),pt(),x(),pt();var Vf=function(t){function n(n,i){var e;return(e=t.call(this)||this).DT=n,e.NT=i,e.iT=!1,e.OT=void 0,e.CT=void 0,e.kT=void 0,e.lT=function(){e.iT=!0,e.ET.Zb(void 0),e.kT&&(e.kT.removeEventListener("mskeyclose",e.lT),e.kT.removeEventListener("mskeymessage",e.MT),e.kT.removeEventListener("mskeyerror",e.Ss),e.kT.removeEventListener("mskeyadded",e.LT))},e.MT=function(t){e.CT&&(e.CT.Zb(void 0),e.CT=void 0),e._o(new Ao(e,"license-request",tu(t.message).buffer,t.destinationURL||void 0))},e.Ss=function(){var t=e.kT&&e.kT.error;if(t){var n=new vu("Unknown CDM error",t.code,t.systemCode);if(e.CT)e.CT.Xb(n),e.CT=void 0;else if(e.OT)e.OT.Xb(n),e.OT=void 0;else switch(n.zb){case MSMediaKeyError.MS_MEDIA_KEYERR_OUTPUT:case MSMediaKeyError.MS_MEDIA_KEYERR_HARDWARECHANGE:e.BT("output-not-allowed");break;default:e.BT("internal-error")}}},e.LT=function(){e.CT&&(e.BT("usable"),e.CT.Zb(void 0),e.CT=void 0),e.OT&&(e.BT("usable"),e.OT.Zb(void 0),e.OT=void 0)},e.ET=new hu,e.xT=new fu,e}Tt(n,t);var i=n.prototype;return i.nT=function(t,n,i){return Jt((function(){return Qt(this,(function(t){switch(t.label){case 0:return this.IT(),this.CT=new hu,this.dT(Qo(n),i),[4,this.CT.Hb];case 1:return t.sent(),[2]}}))})).call(this)},i.dT=function(t,n){if(!t)throw new m("Expected initData to be defined but was "+t+".");var i,e=n&&n.playready&&n.playready.PT;return(i=n?this.DT.createSession(this.NT,t,e):this.DT.createSession(this.NT,t)).addEventListener("mskeyclose",this.lT),i.addEventListener("mskeymessage",this.MT),i.addEventListener("mskeyerror",this.Ss),i.addEventListener("mskeyadded",this.LT),this.kT=i,this.BT("status-pending"),i},i.$n=function(t){return Jt((function(){return Qt(this,(function(t){return this.IT(),[2,!0]}))})).call(this)},i.ir=function(t){return Jt((function(){var n;return Qt(this,(function(i){switch(i.label){case 0:if(this.OT=new hu,this.IT(),!this.kT)return[2,tt.resolve()];if(0===(n=Qo(t)).byteLength)throw new m("Cannot call update with an empty response.");return this.kT.update(n),[4,this.OT.Hb];case 1:return i.sent(),[2]}}))})).call(this)},i.Ws=function(){return!this.iT&&this.kT&&(this.iT=!0,this.kT.close()),this.ET.Hb},i.rT=function(){return Jt((function(){return Qt(this,(function(t){return this.IT(),[2]}))})).call(this)},i.IT=function(){if(this.iT)throw new m("Already closing or closed.")},i.BT=function(t){this.xT.Gb(),this.xT.Wb(su,t),this._o(new Po(this.xT))},Et(n,[{key:"eT",get:function(){return this.kT&&this.kT.sessionId||""}},{key:"JS",get:function(){return NaN}},{key:"QS",get:function(){return this.ET.Hb}},{key:"Ab",get:function(){return this.xT}}]),n}(Eo),qf=function(){function t(t,n,i){this.DT=t,this._T=n,this.kd=i;var e=Mf(i)||"video/mp4";this.NT=Cf(e)}var n=t.prototype;return n.dT=function(t){return Jt((function(){return Qt(this,(function(t){return[2,new Vf(this.DT,this.NT)]}))})).call(this)},n.vT=function(t){return tt.resolve(!1)},n.kn=function(t){var n=this,i=function(){t.msSetMediaKeys(n.DT),t.removeEventListener("loadedmetadata",i)};return t.readyState>=1?t.msSetMediaKeys(this.DT):t.addEventListener("loadedmetadata",i),tt.resolve()},n.gT=function(t){return tt.resolve()},n.nr=function(){return tt.resolve()},t}(),Hf=function(){function t(t,n){this.aT=t,this.FT=n}var n=t.prototype;return n.yT=function(){return this.FT},n.pT=function(){var t=new c.MSMediaKeys(this.aT);return tt.resolve(new qf(t,this.aT,this.FT))},Et(t,[{key:"_T",get:function(){return this.aT}}]),t}(),Xf=function(){function t(){}return t.prototype.$w=function(t,n){try{return tt.resolve(function(t,n){if(!jf())throw new m("Unsupported key system "+t);for(var i=0;i<n.length;i++){var e=n[i],r=xf(Yf,Oo,t,e);if(r)return new Hf(t,r)}throw new m("Unsupported key system configuration for "+t)}(t,n))}catch(t){return tt.reject(t)}},t.TT=function(){return jf()},t}();function jf(){return void 0!==c.MSMediaKeys&&"function"==typeof c.MSMediaKeys.isTypeSupported}function Yf(t,n){return c.MSMediaKeys.isTypeSupported(t,n)}x(),pt(),x(),pt(),x(),pt(),x(),pt();var Kf=function(t){function n(n,i,e){var r;return(r=t.call(this)||this).GT=n,r.NT=i,r.UT=e,r.ET=new hu,r.XT=void 0,r.xT=new fu,r.VT=void 0,r.ZT=new hu,r.Ss=function(){var t=r.VT&&r.VT.error;if(t){var n=new vu("Unknown CDM error",t.code,t.systemCode);r.XT?(r.XT.Xb(n),r.XT=void 0):n.zb===WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT?r.BT("output-not-allowed"):r.BT("internal-error"),r._o(new Do)}},r.MT=function(t){r._o(new Ao(r,"license-request",tu(t.message).buffer,"this is a test string"===t.destinationURL?void 0:t.destinationURL))},r.LT=function(){r.XT&&(r.XT.Zb(void 0),r.XT=void 0),r.BT("usable")},r}Tt(n,t);var i=n.prototype;return i.nT=function(t,n,i){var e=i&&i.fairplay&&i.fairplay.WT;if(!e)throw new m("Expected FairPlay contentId to be defined but was "+e+".");var r=function(t,n,i){var e=Go(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 nu;return jo(s,f,r,!0),Yo(s,f,e,!0),jo(s,f,o,!0),Yo(s,f,n,!0),jo(s,f,i.byteLength,!0),function(t,n,i){Jo(t).set(Jo(i),n.nc),n.Pb(i.byteLength)}(s,f,i),new I(u)}(Qo(n),e,this.UT);return this.VT=this.GT.createSession(this.NT,r),this.VT.addEventListener("webkitkeymessage",this.MT,!1),this.VT.addEventListener("webkitkeyadded",this.LT,!1),this.VT.addEventListener("webkitkeyerror",this.Ss,!1),this.BT("status-pending"),this.ZT.Zb(this.VT),this.ZT=new hu,tt.resolve()},i.$n=function(t){return tt.resolve(!0)},i.ir=function(t){return Jt((function(){var n,i;return Qt(this,(function(e){switch(e.label){case 0:if(0===(n=Qo(t)).byteLength)throw new m("Cannot call update with an empty response.");return this.XT=new hu,(i=this.VT)?[3,2]:[4,this.ZT.Hb];case 1:i=e.sent(),e.label=2;case 2:return i.update(n),[4,this.XT.Hb];case 3:return e.sent(),[2]}}))})).call(this)},i.Ws=function(){var t,n=this.VT;return n&&(n.removeEventListener("webkitkeymessage",this.MT,!1),n.removeEventListener("webkitkeyadded",this.LT,!1),n.removeEventListener("webkitkeyerror",this.Ss,!1),n.close()),this.ZT.np(),null==(t=this.XT)||t.np(),this.ET.Zb(void 0),this.ET.Hb},i.rT=function(){return tt.resolve(void 0)},i.BT=function(t){this.xT.Gb(),this.xT.Wb(su,t),this._o(new Po(this.xT))},Et(n,[{key:"eT",get:function(){return this.VT?this.VT.sessionId:""}},{key:"JS",get:function(){return NaN}},{key:"QS",get:function(){return this.ET.Hb}},{key:"Ab",get:function(){return this.xT}}]),n}(Eo);x(),pt(),x(),pt();var Gf=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}({}),$f=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)}}($f||($f={}));var Zf=function(t){function n(n,i,e){var r;return(r=t.call(this,i,e)||this).code=n,r}return Tt(n,t),Et(n,[{key:"name",get:function(){return"THEOplayerError"}},{key:"category",get:function(){return $f.fromCode(this.code)}}]),n}(wn),Jf=function(){function t(t,n,i){this.GT=t,this._T=n,this.kd=i,this.UT=void 0;var e=Mf(i)||"video/mp4";this.NT=Cf(e)}var n=t.prototype;return n.getInternalMediaKeys=function(){return this.GT},n.dT=function(t){return Jt((function(){return Qt(this,(function(t){if(!this.UT)throw new Zf(Gf.CONTENT_PROTECTION_CERTIFICATE_ERROR,"No valid certificate was provided.");return[2,new Kf(this.GT,this.NT,this.UT)]}))})).call(this)},n.vT=function(t){return this.UT=Qo(t),tt.resolve(!0)},n.kn=function(t){return t.webkitSetMediaKeys(this.GT),tt.resolve()},n.gT=function(t){return t.webkitSetMediaKeys(null),tt.resolve()},n.nr=function(){return tt.resolve()},t}(),Qf=function(){function t(t,n){this.aT=t,this.FT=n}var n=t.prototype;return n.yT=function(){return this.FT},n.pT=function(){var t=new c.WebKitMediaKeys(this.aT);return tt.resolve(new Jf(t,this.aT,this.FT))},Et(t,[{key:"_T",get:function(){return this.aT}}]),t}(),th=function(){function t(){}return t.prototype.$w=function(t,n){try{return tt.resolve(function(t,n){if(t!==fo)throw new m(t+" is not supported with webkit-prefixed Encrypted Media Extensions.");if(!nh())throw new m("Unsupported key system "+t);for(var i=0;i<n.length;i++){var e=n[i],r=xf(ih,No,t,e);if(r)return new Qf(t,r)}throw new m("Unsupported key system configuration for "+t)}(t,n))}catch(t){return tt.reject(t)}},t.TT=function(){return nh()},t}();function nh(){return void 0!==c.WebKitMediaKeys&&"function"==typeof c.WebKitMediaKeys.isTypeSupported}function ih(t,n){return c.WebKitMediaKeys.isTypeSupported(t,n)}x(),pt();var eh=function(){function t(t){this.HT=t}return t.prototype.$w=function(t,n){return Jt((function(){var i,e,r;return Qt(this,(function(o){switch(o.label){case 0:i=0,e=this.HT,o.label=1;case 1:if(!(i<e.length))return[3,6];r=e[i],o.label=2;case 2:return o.trys.push([2,4,,5]),[4,r.$w(t,n)];case 3:return[2,o.sent()];case 4:return o.sent(),[3,5];case 5:return i++,[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 rh=function(){function t(t){var n=this;this.qT=[],this.YT=void 0,this.zT=new dn,this.KT=function(){return 0===n.qT.length?n.QT?oh(n.QT,n.zT.ep).then(n.JT,n.JT):n.JT():n.qT.shift()().then(n.KT)},this.JT=function(){if(0!==n.qT.length)return n.KT();n.YT=void 0},this.QT=t}var n=t.prototype;return n.Qo=function(t,n){var i=this;return new tt((function(e){var r=dn.hp([i.zT.ep,n]),o=function(){r.Km()};i.qT.push((function(){var n=oh(t,r.ep);return e(n),n.then(o,o)})),i.YT||(i.YT=i.KT())}))},n.np=function(){return this.jT(!0)},n.yn=function(){return this.QT=void 0,this.jT(!1)},n.jT=function(t){var n=this.YT;return this.zT.np(),t&&(this.zT=new dn),tt.resolve(n)},t}();function oh(t,n){return new tt((function(i){return i(t(n))}))}var uh=new rh,sh=function(t){function n(n){var i;return(i=t.call(this)||this).aT=n,i.CT=void 0,i.XT=void 0,i.sA=!1,i.fk=void 0,i.hk=void 0,i.ET=new hu,i.dk="",i.ck=new hu,i.lk=new fu,i}Tt(n,t);var i=n.prototype;return i.$T=function(){this.XT&&(this.BT("usable"),this.XT.Zb(void 0),this.XT=void 0)},i.ek=function(t){var n=new vu("Unknown CDM error",t.errorCode,t.systemCode);this.XT?(this.XT.Xb(n),this.XT=void 0):this.CT?(this.CT.Xb(n),this.CT=void 0):n.zb===WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT?this.BT("output-restricted"):1===n.qb?this.BT("expired"):this.BT("internal-error")},i.nk=function(t){0!==t.message.byteLength?(this.CT&&(this.CT.Zb(void 0),this.CT=void 0),this._o(new Ao(this,"license-request",cu(this.aT,tu(t.message).buffer),t.defaultURL||void 0))):this.CT&&(this.CT.Xb("Empty key message"),this.CT=void 0)},i.rk=function(t){this.hk||(this.hk=t,this.ck.Zb(t))},i.Ws=function(){return Jt((function(){return Qt(this,(function(t){return this.throwIfClosed(),this.XT&&(this.XT.Xb(void 0),this.XT=void 0),this.sA=!0,this.ET.Zb(void 0),[2]}))})).call(this)},i.nT=function(t,n){return Jt((function(){var t;return Qt(this,(function(i){switch(i.label){case 0:return this.throwIfClosed(),this.CT=new hu,this.fk=Qo(n),(t=this.hk)?[3,2]:[4,this.ck.Hb];case 1:t=i.sent(),i.label=2;case 2:return t.webkitGenerateKeyRequest(this.aT,this.fk),[4,this.CT.Hb];case 3:return i.sent(),[2]}}))})).call(this)},i.$n=function(t){return Jt((function(){return Qt(this,(function(t){return this.throwIfClosed(),[2,!1]}))})).call(this)},i.rT=function(){return Jt((function(){return Qt(this,(function(t){return this.throwIfClosed(),[2]}))})).call(this)},i.ir=function(t){return Jt((function(){var n;return Qt(this,(function(i){switch(i.label){case 0:return n=this,this.throwIfClosed(),this.XT=new hu,zt.Ng||zt.Rg?[2,uh.Qo((function(){return Jt((function(){return Qt(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 Jt((function(){var n;return Qt(this,(function(i){switch(i.label){case 0:return void 0===this.XT?[2]:(n=this.hk)?[3,2]:[4,this.ck.Hb];case 1:n=i.sent(),i.label=2;case 2:return n.webkitAddKey(this.aT,Qo(t),this.fk,this.eT),[4,this.XT.Hb];case 3:return i.sent(),zt.Rg?[4,yn(500)]:[3,5];case 4:i.sent(),i.label=5;case 5:return[2]}}))})).call(this)},i.throwIfClosed=function(){if(this.sA)throw new m("Already closing or closed.")},i.BT=function(t){this.lk.Gb(),this.lk.Wb(su,t),this._o(new Po(this.lk))},i._k=function(){return Jt((function(){var t,n;return Qt(this,(function(i){switch(i.label){case 0:return(n=this.hk)?[3,2]:[4,this.ck.Hb];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.aT,this.dk),[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)},Et(n,[{key:"Ab",get:function(){return this.lk}},{key:"eT",get:function(){return this.dk},set:function(t){this.dk=t}},{key:"QS",get:function(){return this.ET.Hb}},{key:"JS",get:function(){return NaN}}]),n}(Eo),fh=function(){function t(t,n){var i=this;this._T=t,this.kd=n,this.hk=void 0,this.pk=Kr(),this.wk=[],this.LT=function(t){var n=i.yk(t.sessionId);n&&n.$T()},this.vk=function(t){var n=i.yk(t.sessionId);n&&n.ek(t)},this.gk=function(t){var n=i.yk(t.sessionId);n&&n.nk(t)}}var n=t.prototype;return n.kn=function(t){return this.hk=t,this.hk.addEventListener("webkitkeyadded",this.LT),this.hk.addEventListener("webkitkeyerror",this.vk),this.hk.addEventListener("webkitkeymessage",this.gk),this.pk.forEach((function(n,i){return n.rk(t)})),this.wk.forEach((function(n){return n.rk(t)})),tt.resolve()},n.gT=function(t){return t.removeEventListener("webkitkeyadded",this.LT),t.removeEventListener("webkitkeyerror",this.vk),t.removeEventListener("webkitkeymessage",this.gk),this.hk=void 0,tt.resolve()},n.nr=function(){return Jt((function(){var t,n;return Qt(this,(function(i){switch(i.label){case 0:t=this.pk.entries(),n=t.next(),i.label=1;case 1:return n.done?[3,3]:[4,n.value[1]._k()];case 2:return i.sent(),n=t.next(),[3,1];case 3:return this.pk.clear(),[2]}}))})).call(this)},n.dT=function(t,n,i){return Jt((function(){var t;return Qt(this,(function(n){return t=new sh(this._T),this.hk&&t.rk(this.hk),this.wk.push(t),[2,t]}))})).call(this)},n.vT=function(t){return tt.resolve(!1)},n.yk=function(t){if(t){var n=this.pk.get(t);return n||((n=this.wk.shift())?(n.eT=t,this.pk.set(t,n),n):void 0)}},t}(),hh=function(){function t(t,n){this._T=t,this.bk=n}var n=t.prototype;return n.pT=function(){return tt.resolve(new fh(this._T,this.bk))},n.yT=function(){return this.bk},t}(),ch=function(){function t(){}return t.prototype.$w=function(t,n){try{return tt.resolve(function(t,n){if(!ch.TT())throw new m("Unsupported key system "+t);for(var i=0;i<n.length;i++){var e=n[i],r=xf(ah,Oo,t,e);if(r)return new hh(t,r)}throw new m("Unsupported key system configuration for "+t)}(t,n))}catch(t){return tt.reject(t)}},t.TT=function(){return"undefined"!=typeof HTMLMediaElement&&void 0!==HTMLMediaElement.prototype.webkitGenerateKeyRequest&&void 0!==HTMLMediaElement.prototype.webkitAddKey&&void 0!==HTMLMediaElement.prototype.webkitCancelKeyRequest},t}();function ah(t,n){var i=Sn();return Boolean(i&&i.canPlayType&&""!==i.canPlayType(n,t))}x(),pt();var vh,dh=function(){function t(){}return t.prototype.$w=function(t,n){return t===io||t===Qr?tt.resolve(void 0):tt.reject(new g("DRM configuration not supported"))},t}();function lh(){return vh||(vh=function(){var t=[];th.TT()&&t.push(new th);Wf.TT()&&t.push(new Wf);Xf.TT()&&t.push(new Xf);ch.TT()&&t.push(new ch);zt.Lg&&t.push(new dh);return new eh(t)}()),vh}x(),pt(),x(),pt();var wh=function(){function t(){this.Ak=Kr()}var n=t.prototype;return n.Gb=function(t){this.Ak.delete(t)},n.Sk=function(){this.Ak.clear()},n.Vb=function(t){return this.Ak.get(t)},n.Wb=function(t,n){this.Ak.set(t,n)},t}(),bh=function(){function t(){}return t.Tk=function(){return t.Vm||(t.Vm=gh.TT()?new gh:new wh),t.Vm},t.Gb=function(n){t.Tk().Gb(n)},t.Sk=function(){t.Tk().Sk()},t.Vb=function(n){return t.Tk().Vb(n)},t.Wb=function(n,i){t.Tk().Wb(n,i)},t}();bh.Vm=void 0;var gh=function(t){function n(){return t.apply(this,arguments)||this}Tt(n,t);var i=n.prototype;return i.Gb=function(t){self.sessionStorage.removeItem(t)},i.Sk=function(){self.sessionStorage.clear()},i.Vb=function(t){var n;return null!=(n=self.sessionStorage.getItem(t))?n:void 0},i.Wb=function(t,n){self.sessionStorage.setItem(t,n)},n.TT=function(){var t="foobar";try{return self.sessionStorage.setItem(t,t),self.sessionStorage.removeItem(t),!0}catch(t){return!1}},n}(bh);x(),pt(),x(),pt();var mh=function(){var t=self.Blob;if(t)try{new t;return function(t){return function(n,i){return new t(n,i)}}(t)}catch(t){}var n=self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder;if(n)return function(t){return function(n,i){var e=new t;if(n)for(var r=0;r<n.length;r++){var o=n[r];e.append(o)}return e.getBlob(i&&i.type||"")}}(n)}();function ph(t,n,i){var e=mh([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 yh=function(t,n,i){return i=null!=t?k(P(t)):{},function(t,n,i,e){if(n&&"object"==typeof n||"function"==typeof n)for(var r,o=N(n),u=0,s=o.length;u<s;u++)r=o[u],A.call(t,r)||r===i||R(t,r,{get:function(t){return n[t]}.bind(null,r),enumerable:!(e=O(n,r))||e.enumerable});return t}(!n&&t&&t.__esModule?i:R(i,"default",{value:t,enumerable:!0}),t)}(_t());x(),pt();var _h=t,Sh=Yt(_h.ReadableStream)&&Yt(_h.WritableStream)&&Yt(_h.TransformStream)&&jt(_h.ReadableStream.prototype.pipeThrough)&&!oi.Dp,Th=Sh?_h.ReadableStream:yh.ReadableStream,Ih=(Sh?_h.WritableStream:yh.WritableStream,Sh?_h.TransformStream:yh.TransformStream);Sh&&_h.ByteLengthQueuingStrategy?_h.ByteLengthQueuingStrategy:yh.ByteLengthQueuingStrategy,Sh&&_h.CountQueuingStrategy?_h.CountQueuingStrategy:yh.CountQueuingStrategy;function Eh(t){return function(t){return new Th({start:function(n){for(var i=0;i<t.length;i++){var e=t[i];n.enqueue(e)}n.close()}})}([t])}function kh(t){return Eh(function(t){return new I(t)}(t))}function Rh(t,n){return function(t,n){var i=n,e=t.getReader(),r=new hu,o=function(){u();var t=new bn;e.cancel(t).catch(Gt),r.Xb(t)},u=function(){i&&(i.Jm(o),i=void 0)};i&&(i.zm?o():i.Qm(o));var s=[],f=function(t){return t.done?(u(),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.Zb(t)}),(function(t){u(),r.Xb(t)})),r.Hb}(t,n).then((function(t){return ou(t).buffer}))}function Oh(t,n){var i=n,e=new Ih,r=e.readable,o=e.writable,u=o.getWriter(),s=function(){i&&i.np()};return u.closed.then(s,s),t.then((function(t){return i=void 0,u.releaseLock(),t.pipeTo(o).catch(Gt)}),(function(t){return i=void 0,u.releaseLock(),o.abort(t).catch(Gt)})),r}function Nh(t){return Go(new I(t))}function Ph(t){return $o(t).buffer}x(),pt();var Ah="content-type",Dh="text/plain;charset=UTF-8",Ch=function(){function t(){}var n=t.prototype;return n.Nk=function(t){return this.Mk(t).then(JSON.parse)},n.Lk=function(t,n){switch(t){case Dr.Ek:return this.Bk(n);case Dr.xk:return this.Nk(n);case Dr.Ik:return this.Ok();case Dr.Rk:return this.Mk(n);default:throw new m}},t}();function xh(t,n,i){if(B(t,Ch))return t;if(B(t,Th))return function(t,n){return new Mh({zw:0,Ok:t,Fk:Bh(n)})}(t,i);var e=Bh(i),r=tt.resolve(t).then((function(t){return function(t,n){if(t){if("string"==typeof t)return{zw:Dr.Rk,Vk:t,Fk:n||Dh};if(B(t,ArrayBuffer)||eu(t))return{zw:Dr.Ek,Vk:qh(t),Fk:n};if(function(t){return Xt(t)&&t.constructor&&t.constructor===p}(t)||Ht(t))return{zw:Dr.xk,Vk:t,Fk:n};throw new m("Unsupported BodyInit type")}return{zw:Dr.Rk,Vk:null,Fk:n}}(t,e)}));return new Mh({zw:1,Hb:r,Wk:n})}function Bh(t){return(t.get(Ah)||"").toLowerCase()}var Mh=function(t){function n(n){var i;return(i=t.call(this)||this).Gk=!1,i.zk=new hu,i.zk.Hb.catch(Gt),i.Kk(n),i}Tt(n,t);var i=n.prototype;return i.Hk=function(){return this.zk.Hb},i.Mk=function(t){return this.qk(Lh,t)},i.Nk=function(t){return this.qk(Fh,t)},i.Bk=function(t){return this.qk(Wh,t)},i.Ok=function(){return this.Yk(function(t){return 0===t.zw?t.Ok:Oh(t.Hb.then(Vh).then(kh),t.Wk)}(this.Xk))},i.qk=function(t,n){if(this.Gk)return tt.reject(new m("Already used"));this.Gk=!0;var i=t(this.Xk,n);return this.zk.rp(i.then(Gt)),i},i.Yk=function(t){if(this.Gk)throw new m("Already used");if(t.locked)throw new m("Body stream is locked");this.Gk=!0;var n=new Ih,i=tt.resolve(t.pipeTo(n.writable));return this.zk.rp(i),n.readable},i.Kk=function(t){this.Xk=t,1===t.zw&&t.Hb.catch(Gt)},i.jk=function(){if(this.Gk)throw new m("Already used");var t=function(t){if(0===t.zw){var n=Cr(t.Ok.tee(),2),i=n[0],e=n[1];return[{zw:t.zw,Ok:i,Fk:t.Fk},{zw:t.zw,Ok:e,Fk:t.Fk}]}var r=Cr(t.Wk.op(),2),o=r[0],u=r[1];return[{zw:t.zw,Hb:t.Hb,Wk:o},{zw:t.zw,Hb:t.Hb,Wk:u}]}(this.Xk),i=t[0],e=t[1];return this.Kk(i),new n(e)},Et(n,[{key:"Uk",get:function(){return this.Gk}},{key:"Zk",get:function(){return 0===this.Xk.zw}}]),n}(Ch);function Lh(t,n){return 0===t.zw?Rh(t.Ok,n).then(Nh):(n&&t.Wk.rp(n),pn(t.Hb.then(Uh),t.Wk))}function Uh(t){switch(t.zw){case Dr.Rk:return tt.resolve(t.Vk||"");case Dr.Ek:return tt.resolve(t.Vk).then(Nh);case Dr.xk:return tt.resolve(t.Vk).then(JSON.stringify)}}function Fh(t,n){return 0===t.zw?Lh(t,n).then(JSON.parse):(n&&t.Wk.rp(n),pn(t.Hb.then(zh),t.Wk))}function zh(t){return t.zw===Dr.xk?tt.resolve(t.Vk):Uh(t).then(JSON.parse)}function Wh(t,n){return 0===t.zw?Rh(t.Ok,n):(n&&t.Wk.rp(n),pn(t.Hb.then(Vh),t.Wk))}function Vh(t){switch(t.zw){case Dr.Ek:return tt.resolve(t.Vk);case Dr.Rk:case Dr.xk:return Uh(t).then(Ph)}}function qh(t){return B(t,ArrayBuffer)?t:tu(Jo(t)).buffer}var Hh=function(t){function n(n){var i;return(i=t.call(this)||this).Qk=n,i}Tt(n,t);var i=n.prototype;return i.Hk=function(){return this.Qk.Hk()},i.Mk=function(t){return this.Qk.Mk(t)},i.Nk=function(t){return this.Qk.Nk(t)},i.Bk=function(t){return this.Qk.Bk(t)},i.Ok=function(t){return this.Qk.Ok(t)},i.jk=function(){return this.Qk.jk()},Et(n,[{key:"Uk",get:function(){return this.Qk.Uk}},{key:"Zk",get:function(){return this.Qk.Zk}}]),n}(Ch);var Xh=function(t){function n(n,i){var e,r,o,u,s,f;i?(r=i.iE,o=i.tE,u=i.Jk,s=i.sE,f=i.nE):(r=[],o=Dr.Rk,u=200,s="OK",f=!1);var h=n.eE,c=new xr(n.iE||r),a=n.tE||o,v=n.rE||(i&&i.eE===h?i.rE:h.Xu),d=i?i.Qk:null,l=xh(void 0!==n.$k?n.$k:d,n.Wk||new dn,c);return(e=t.call(this,l)||this).iE=c,e.eE=h,e.rE=v,e.tE=a,e.Jk=void 0!==n.Jk?n.Jk:u,e.sE=void 0!==n.sE?String(n.sE):s,e.nE=n.nE||f,e}Tt(n,t);var i=n.prototype;return i.$k=function(t){return this.Lk(this.tE,t)},i.Nb=function(){return new n({$k:this.jk(),eE:this.eE},this)},n}(Hh),jh=function(){function t(){}var n=t.prototype;return n.eE=function(t){var n=function(t){return new Xh({$k:null,iE:{},eE:t,rE:t.Xu,tE:t.tE,Jk:0,sE:Ro.qy})}(new Fr(t));return tt.resolve(n)},n.FE=function(t){},n.yn=function(){},t}();var Yh=function(){function t(t,n){void 0===n&&(n=!0),this.GE=t,this.XE=n}var n=t.prototype;return n.eE=function(t){var n=this.UE(t);return this.GE.eE(n)},n.FE=function(t){return this.GE.FE(this.ZE(t))},n.UE=function(n){var i=new Fr(n);if(!this.XE){var e=t.HE(i.Xu);i=new Fr({Xu:e},i)}return i},n.ZE=function(n){var i=n.Xu;return this.XE||(i=t.HE(i)),{Xu:i,Vk:n.Vk}},n.yn=function(){this.GE.yn()},t.HE=function(t){return qt.Dw&&wo(t,"http://")?t.replace(":","s:"):t},Et(t,null,[{key:"VE",get:function(){return t.WE||(t.WE=new t(new jh)),t.WE}}]),t}();Yh.WE=void 0,x(),pt(),x(),pt(),x(),pt(),x(),pt();var Kh=function(t){function n(n,i,e){var r;return(r=t.call(this,n.eE,null!=e?e:function(t){return"Error while loading "+t.eE.Xu+", status code "+t.Jk}(n),i)||this).QE=n,r}return Tt(n,t),Et(n,[{key:"name",get:function(){return zr.qE}},{key:"jE",get:function(){return this.QE}}]),n}(Wr);x(),pt();var Gh=function(t){function n(n,i){return t.call(this,n,function(t){return"Request for "+t.Xu+" timed out after "+t.xE+" seconds."}(n),i)||this}return Tt(n,t),Et(n,[{key:"name",get:function(){return zr.YE}}]),n}(Wr);x(),pt();var $h=self.fetch,Zh=self.Request,Jh=self.Response,Qh=self.Headers,tc=self.ReadableStream,nc=self.AbortSignal,ic=self.AbortController,ec=$t((function(){try{return jt($h)&&Yt(Zh)&&Yt(Jh)&&Yt(Qh)&&"forEach"in Qh.prototype&&Rr()}catch(t){return!1}})),rc=["http:","https:"];var oc=$t((function(){try{return ec()&&Yt(nc)&&Yt(ic)&&"signal"in Zh.prototype}catch(t){return!1}})),uc=$t((function(){try{return ec()&&Yt(tc)&&"body"in Jh.prototype&&!zt.hg}catch(t){return!1}}));function sc(t,n){var i,e=t.iE.has("content-length")?Number(t.iE.get("content-length")):void 0;return i=t.Zk?function(t,n,i){return t.pipeThrough(new Ih(new fc(n,i)))}(t.Ok(),n,e):function(t,n,i){return Jt((function(){var e,r;return Qt(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.Bk(),n,e),new Xh({$k:i,eE:t.eE},t)}x(),pt(),M(),x(),pt();var fc=function(){function t(t,n){this.$E=t,this.tx=n,this.JE=0}var n=t.prototype;return n.transform=function(t,n){this.JE+=t.byteLength,this.$E(this.JE,this.tx),n.enqueue(t)},n.flush=function(t){var n;this.$E(this.JE,null!=(n=this.tx)?n:this.JE)},t}();var hc=function(){function t(t){this.zT=new dn,this.QE=void 0,this.sx=0,this.nx=!1,this.KE=t,this.zT.rp(t.ep),this.jE=this.ix()}var n=t.prototype;return n.ix=function(){return Jt((function(){var t,n,i,e,r,o,u,s,f,h;return Qt(this,(function(c){switch(c.label){case 0:t=this,(n=this.KE).xE&&(this.sx=d((function(){t.nx=!0,t.zT.np()}),n.xE),this.zT.ep.$m((function(){l(t.sx)})));try{i=$h(n.Xu,{method:n.EE,headers:n.iE.Ck(),body:n.Vk,credentials:n.DE?"include":"same-origin",signal:vc(this.zT.ep),mode:n.LE,keepalive:n.OE})}catch(t){throw new Vr(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.ox(r))&&this.zT.np(),o;case 4:if(u=e.url||n.Xu,s=0===e.status&&"file:"===function(t){return qt.Bh(t).protocol}(u)?200:e.status,f=new cc(this,e,this.zT),!function(t){return t.Jk>=200&&t.Jk<=299||304===t.Jk}(h=new Xh({$k:f,eE:n,tE:n.tE,iE:dc(e.headers),Jk:s,sE:e.statusText,rE:u})))throw new Kh(h);return n.NE&&(h=sc(h,n.NE)),[2,h]}}))})).call(this)},n.ox=function(t){return function(t){return B(t,Wr)}(t)?t:gn(t)?this.nx?new Gh(this.KE):new bn(t.message,t):this.QE?new Kh(this.QE,t):new Vr(this.KE,t)},t}(),cc=function(t){function n(n,i,e){var r;return(r=t.call(this)||this).zk=new hu,r.ux=n,r.hx=i,r.zT=e,r.zk.Hb.catch(Gt),r}Tt(n,t);var i=n.prototype;return i.Hk=function(){return this.zk.Hb},i.Mk=function(t){return this.qk(this.hx.text(),t)},i.Bk=function(t){return this.qk(this.hx.arrayBuffer(),t)},i.Ok=function(){var t=this.hx.body;return t?this.Yk(t):Oh(this.Bk().then(kh),this.zT)},i.jk=function(){var t=this.hx.clone(),i=Cr(this.zT.op(),2),e=i[0],r=i[1];return this.zT=e,new n(this.ux,t,r)},i.qk=function(t,n){var i=this;n&&this.zT.rp(n);var e=mn(tt.resolve(t),this.zT.ep).catch((function(t){throw i.ux.ox(t)}));return e=pn(e,this.zT),this.zk.rp(e.then(Gt)),e},i.Yk=function(t){var n=this;return new Th(new lc(t,(function(t){return n.ux.ox(t)}),this.zT,this.zk),{highWaterMark:0})},Et(n,[{key:"Uk",get:function(){return this.hx.bodyUsed}},{key:"Zk",get:function(){return Vt(this.hx.body)}}]),n}(Ch),ac="abort";function vc(t){if(oc()){var n=new ic;if(t.zm)n.abort();else if(!t.qm){var i=function(){e(),n.abort()},e=function(){n.signal.removeEventListener(ac,i),t.Jm(i),t.tp(e)};n.signal.addEventListener(ac,i),t.Qm(i),t.$m(e)}return n.signal}}function dc(t){if(function(t){return Xt(t)&&"function"==typeof t.forEach}(t)){var n=new xr;return t.forEach((function(t,i){Array.isArray(t)&&2===t.length?n.append(t[0],t[1]):n.append(i,t)})),n}return new xr(t)}var lc=function(){function t(t,n,i,e){this.lx=t,this._x=n,this.zT=i,this.zk=e}var n=t.prototype;return n.start=function(t){this.Od=this.lx.getReader()},n.pull=function(t){return Jt((function(){var n,i,e;return Qt(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,mn(this.Od.read(),this.zT.ep)];case 1:return n=r.sent(),[3,3];case 2:return i=r.sent(),e=this._x(i),this.zk.Xb(e),this.zT.np(),this.Od.cancel(e).catch(Gt),t.error(e),[2];case 3:return n.done?(this.zk.Zb(),this.zT.np(),t.close()):t.enqueue(n.value),[2]}}))})).call(this)},n.cancel=function(t){return this.zT.np(),this.zk.Xb(t),this.Od.cancel(t)},t}();x(),pt();var wc=function(){function t(t){var n=this;this.zT=new dn,this.QE=void 0,this.vx=new hu,this.kx=!1,this.Tx=function(){var t;n.mx(),null==(t=n.gx)||t.abort()},this.KE=t,this.zT.rp(t.ep),this.gx=new E,this.ix()}var n=t.prototype;return n.ix=function(){var t=this,n=this.gx,i=this.KE;if(i.ep.zm)return this.mx();n.onreadystatechange=function(){return t.wx()},n.onprogress=function(n){return t.$E(n)},n.onload=function(){return t.yx()},n.onloadend=function(){return t.bx()},n.onerror=function(){return t.Ax()},n.ontimeout=function(){return t.Sx()},n.onabort=function(){return t.mx()},n.open(i.EE,i.Xu,!0),n.withCredentials=Boolean(i.DE),"responseType"in n&&i.tE&&(i.tE===Dr.Rk?n.responseType="text":n.responseType="arraybuffer"),i.iE.forEach((function(t,i){n.setRequestHeader(i,t)})),i.xE&&(n.timeout=i.xE),this.zT.ep.Qm(this.Tx);var e=i.Vk;e?n.send(e):n.send()},n.wx=function(){var t=this.gx;void 0!==t&&t.readyState>=2&&!this.kx&&(this.kx=!0,this.Ex())},n.Ex=function(){var t,n,i=this.gx,e=function(t){var n=new xr,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.KE;this.xx=new hu,this.QE=new Xh({eE:r,tE:r.tE,$k:this.xx.Hb,Jk:i.status,sE:i.statusText,iE:e,rE:null!=(n=i.responseURL)?n:e.get("X-Request-URL")}),null==(t=this.vx)||t.Zb(this.QE)},n.yx=function(){var t,n=this.gx;if(void 0!==n){var i=n.response;if(!Vt(i)){var e=this.KE.tE;i=e===Dr.Rk?n.responseText:e===Dr.Ek?new ArrayBuffer(0):{}}null==(t=this.xx)||t.Zb(i)}},n.bx=function(){this.yn()},n.$E=function(t){void 0!==this.gx&&(null==this.KE.NE||this.KE.NE.call(this.KE,t.loaded,t.lengthComputable?t.total:void 0))},n.Ax=function(){var t=new g("Network request failed");this.QE?this.Ss(new Kh(this.QE,t)):this.Ss(new Vr(this.KE,t))},n.Sx=function(){this.Ss(new Gh(this.KE))},n.mx=function(){this.Ss(new bn),this.yn()},n.Ss=function(t){var n,i;null==(n=null!=(i=this.xx)?i:this.vx)||n.Xb(t)},n.yn=function(){this.gx=void 0,this.QE=void 0,this.vx=void 0,this.xx=void 0,this.zT.Km()},Et(t,[{key:"jE",get:function(){return this.vx.Hb}}]),t}();x(),pt();var bc=function(){function t(){}var n=t.prototype;return n.eE=function(t){return function(t){if(!ec()||!function(t){try{return rc.indexOf(new self.URL(t,self.location.href).protocol)>=0}catch(t){return!1}}(t.Xu))return!1;if(!uc()&&t.NE)return!1;if(!t.BE&&t.EE!==Lr.POST){if(zt.Ng&&zt.wg<=68)return!1;if(zt.Rg)return!1}return!0}(t)?new hc(t).jE:new wc(t).jE},n.FE=function(t){var n=c.navigator;if(n&&n.sendBeacon)n.sendBeacon(t.Xu,mh([t.Vk],{type:t.Fk}));else{var i=t.Fk?{"Content-type":t.Fk}:void 0;this.eE(new Fr({EE:Lr.POST,Xu:t.Xu,Vk:t.Vk,iE:i,LE:Ur.SE})).then((function(t){!function(t){t.then(Gt,Gt)}(t.Bk())}),Gt)}},n.yn=function(){},t}();x(),pt(),x(),pt();var gc=function(t){return t[t.Ix=1]="Ix",t[t.Rx=2]="Rx",t[t.Rk=3]="Rk",t[t.Cx=4]="Cx",t[t.Px=9]="Px",t}({});var mc=function(){function t(){}return t.prototype.Nx=function(t){var n,i=new DOMParser;try{n=i.parseFromString(t,"text/xml")}catch(t){throw new Hr(t)}if(!n||n.getElementsByTagName("parsererror").length>0)throw new Hr;return new Ec(n)},t}(),pc=function(){function t(t){this.Lx=t}var n=t.prototype;return n.Vx=function(t){return this.Lx.isEqualNode(t.Lx)},n.Wx=function(n){return new t(this.Lx.cloneNode(n))},Et(t,[{key:"Dx",get:function(){return gc.Rx}},{key:"Mx",get:function(){var t;return null!=(t=this.Lx.localName)?t:Oc(this.Lx.nodeName)}},{key:"l",get:function(){return this.Lx.nodeName}},{key:"Bx",get:function(){var t;return null!=(t=this.Lx.namespaceURI)?t:void 0}},{key:"Ox",get:function(){var t;return null!=(t=this.Lx.prefix)?t:void 0}},{key:"Fx",get:function(){return this.Lx.nodeValue}}]),t}(),yc=function(){function t(t){this.Gx=void 0,this.Zx=t}var n=t.prototype;return n.Xx=function(t){return this.Ux.filter((function(n){return kc(n)&&n.Hx===t}))},n.zx=function(t,n){return this.Ux.filter((function(i){return kc(i)&&i.Mx===n&&i.Bx===t}))},n.Yx=function(t){this.Zx.appendChild(t.qx),this.Gx&&this.Gx.push(t)},n.Vx=function(t){return this.Zx.isEqualNode(t.qx)},Et(t,[{key:"Ux",get:function(){return void 0===this.Gx&&(this.Gx=function(t){for(var n=[],i=0;i<t.length;i++){var e=Rc(t.item(i));e&&n.push(e)}return n}(this.Zx.childNodes)),this.Gx}},{key:"m",get:function(){return this.Ux.filter(kc)}},{key:"qx",get:function(){return this.Zx}}]),t}(),_c=function(t){function n(n){return t.call(this,n)||this}Tt(n,t);var i=n.prototype;return i.Qx=function(t){if(this.Zx.hasAttribute(t))return this.Zx.getAttribute(t)},i.Jx=function(t,n){if(this.Zx.hasAttributeNS(t,n))return this.Zx.getAttributeNS(t,n)},i.$x=function(t){this.Zx.removeAttribute(t)},i.tI=function(t,n){this.Zx.removeAttributeNS(t,n)},i.eI=function(t,n){this.Zx.setAttribute(t,n)},i.iI=function(t,n,i){this.Zx.setAttributeNS(t,n,i)},i.Wx=function(t){return new n(this.Zx.cloneNode(t))},Et(n,[{key:"Dx",get:function(){return gc.Ix}},{key:"Mx",get:function(){var t;return null!=(t=this.Zx.localName)?t:Oc(this.Zx.nodeName)}},{key:"Bx",get:function(){var t;return null!=(t=this.Zx.namespaceURI)?t:void 0}},{key:"Ox",get:function(){var t;return null!=(t=this.Zx.prefix)?t:void 0}},{key:"Hx",get:function(){return this.Zx.nodeName}},{key:"Kx",get:function(){return function(t){for(var n=[],i=0;i<t.length;i++)n.push(new pc(t.item(i)));return n}(this.Zx.attributes)}},{key:"jx",get:function(){return this.Zx.textContent}}]),n}(yc),Sc=function(){function t(t){this.Zx=t}return t.prototype.Vx=function(t){return this.$k===t.$k},Et(t,[{key:"$k",get:function(){return this.Zx.nodeValue}},{key:"qx",get:function(){return this.Zx}}]),t}(),Tc=function(t){function n(n){return t.call(this,n)||this}return Tt(n,t),n.prototype.Wx=function(t){return new n(this.Zx.cloneNode(t))},Et(n,[{key:"Dx",get:function(){return gc.Rk}}]),n}(Sc),Ic=function(t){function n(n){return t.call(this,n)||this}return Tt(n,t),n.prototype.Wx=function(t){return new n(this.Zx.cloneNode(t))},Et(n,[{key:"Dx",get:function(){return gc.Cx}}]),n}(Sc),Ec=function(t){function n(n){return t.call(this,n)||this}return Tt(n,t),n.prototype.Wx=function(t){return new n(this.Zx.cloneNode(t))},Et(n,[{key:"Dx",get:function(){return gc.Px}},{key:"sI",get:function(){return new _c(this.Zx.documentElement)}}]),n}(yc);function kc(t){return function(t){return 1===t.Dx}(t)}function Rc(t){switch(t.nodeType){case gc.Ix:return new _c(t);case gc.Rk:return new Tc(t);case gc.Cx:return new Ic(t)}}function Oc(t){var n=t.indexOf(":");return n<0?t:t.substr(n+1)}var Nc=function(t){function n(){var n;return(n=t.apply(this,arguments)||this).nI=void 0,n.oI=uc(),n.aI=zt.wm||zt.hg,n.cI=(zt.wm||zt.Ng&&zt.wg<=68||zt.hg)&&!(zt.Rg&&zt.Pg<3),n.pI=void 0,n.wI=new mc,n}return Tt(n,t),n.prototype.Nx=function(t){return this.wI.Nx(t)},Et(n,[{key:"_w",get:function(){return this.nI||(this.nI=new To(lh())),this.nI}},{key:"rI",get:function(){return this.oI}},{key:"hI",get:function(){return this.aI}},{key:"uI",get:function(){return this.cI}},{key:"lI",get:function(){return!1}},{key:"dI",get:function(){return bh.Tk()}},{key:"fI",get:function(){return{_I:ph}}},{key:"vI",get:function(){return v.connection&&v.connection.effectiveType||Pr}},{key:"gI",get:function(){return v.connection&&v.connection.type||Ar}},{key:"mI",get:function(){return this.pI||(this.pI=new Yh(new bc)),this.pI}}]),n}(Er);Kt(new Nc),x(),pt(),x(),pt();x(),pt(),x(),pt(),x(),pt();var Pc=function(t){return t.wE="audio",t.yE="video",t.xW="metadata",t}({});x(),pt(),x(),pt();var Ac=function(t){return t.aE="#EXTINF",t.qBt="#EXT-X-MAP",t.p="#EXTM3U",t.en="#EXT-X-VERSION",t.ui="#EXT-X-TARGETDURATION",t.oTt="#EXT-X-START",t.li="#EXT-X-INDEPENDENT-SEGMENTS",t.Ik="#EXT-X-STREAM-INF",t.vr="#EXT-X-MEDIA-SEQUENCE",t.if="#EXT-X-ENDLIST",t.sf="#EXT-X-MEDIA",t.ff="#EXT-X-DISCONTINUITY",t.af="#EXT-X-DISCONTINUITY-SEQUENCE",t.nv="#EXT-X-PLAYLIST-TYPE",t.ev="#EXT-X-KEY",t}({}),Dc=function(){function t(t,n){this.zw="#EXTINF",this.sv=t,this.cv=n}return t.prototype.mP=function(){return this.zw+":"+this.sv+",\n"+this.cv},t}(),Cc=function(){function t(t){this.zw="#EXT-X-MAP",this.cv=t}return t.prototype.mP=function(){return this.zw+':URI="'+this.cv+'"'},t}(),xc=function(){function t(){this.zw="#EXTM3U"}return t.prototype.mP=function(){return this.zw},t}(),Bc=function(){function t(t){this.zw="#EXT-X-VERSION",this.aN=t}return t.prototype.mP=function(){return this.zw+":"+this.aN},t}(),Mc=function(){function t(t){this.zw="#EXT-X-TARGETDURATION",this.FBt=t}return t.prototype.mP=function(){return this.zw+":"+this.FBt},t}(),Lc=function(){function t(t){this.zw="#EXT-X-START",this.VOt=t}return t.prototype.mP=function(){return this.zw+":TIME-OFFSET="+this.VOt},t}(),Uc=function(){function t(t,n,i){this.uri=t,this.keyFormat=n,this.keyFormatVersions=i,this.zw="#EXT-X-KEY"}return t.prototype.mP=function(){return this.zw+':METHOD=SAMPLE-AES,URI="'+this.uri+'",KEYFORMAT="'+this.keyFormat+'",KEYFORMATVERSIONS="'+this.keyFormatVersions+'"'},t}(),Fc=function(){function t(t){this.zw="#EXT-X-STREAM-INF",this.jG=1,this.cv=t}return t.prototype.mP=function(){return this.zw+":BANDWIDTH="+this.jG+',AUDIO="audio"\n'+this.cv},t}(),zc=function(){function t(t){this.zw="#EXT-X-MEDIA-SEQUENCE",this.kL=t}return t.prototype.mP=function(){return this.zw+":"+this.kL},t}(),Wc=function(){function t(t){this.zw="#EXT-X-MEDIA",this.cv=t}return t.prototype.mP=function(){var t=Kr();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.cv+'"');var n=[];return t.forEach((function(t,i){return n.push(i+"="+t)})),this.zw+":"+n.join(",")},t}();x(),pt();var Vc=function(){function t(t){this.AA=[],this.AA=t}var n=t.prototype;return n.$N=function(){return this.AA},n.av=function(t){this.AA.push(t)},n.dWt=function(){for(var t="",n=0,i=this.$N();n<i.length;n++){t+=i[n].mP()+"\n"}return t},n.Km=function(){this.AA.length=0},t}(),qc=function(t){function n(n,i){var e;return e=t.call(this,[new xc,new Bc(8)])||this,i&&e.av(new Fc("video/index.m3u8")),n&&e.av(new Wc("audio/index.m3u8")),e}return Tt(n,t),n}(Vc);x(),pt(),x(),pt(),x(),pt();var Hc=function(t){return t.Dit="HELLO",t.Nit="HI_THERE",t.Mit="INITIALIZE",t.Lit="APPEND_INIT",t.Bit="APPEND_DATA",t.Oit="ACK",t.Fit="REMOVE",t.Vit="DESTROY_SESSION",t}({});x(),pt(),x(),pt();var Xc,jc=new Array(256);for(Xc=0;Xc<256;Xc+=1)jc[Xc]=(Xc<16?"0":"")+Xc.toString(16);function Yc(){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 Kc=function(t){function n(n){var i;return(i=t.call(this,"append")||this).$k=n,i}return Tt(n,t),n}(ko),Gc=function(t){function n(){var n;return(n=t.apply(this,arguments)||this).aIt=0,n.Hp=new I(0),n.sA=!1,n.dv=!1,n}Tt(n,t);var i=n.prototype;return i.r3=function(t,n){this.aIt+=n,this.Hp=ou([this.Hp,t]),this._o(new Kc(t))},i.Ws=function(){this.QS||(this._o(new ko("close")),this.sA=!0)},Et(n,[{key:"SI",get:function(){return this.aIt}},{key:"$k",get:function(){return this.Hp}},{key:"QS",get:function(){return this.sA}},{key:"lv",get:function(){return this.dv},set:function(t){this.dv=t}}]),n}(Eo),$c="sync-seg-",Zc=function(){function t(t,n){this.wv=!1,this.gv=!1,this.o=$c+Yc(),this.kv=n?new Gc:void 0,this.jv=t?new Gc:void 0}return t.prototype.Ws=function(){this.kv&&this.kv.Ws(),this.jv&&this.jv.Ws()},Et(t,[{key:"Ad",get:function(){return this.wv},set:function(t){this.wv=t}},{key:"tw",get:function(){return this.gv},set:function(t){this.gv=t}}]),t}();x(),pt();var Jc=1.1,Qc=function(t){function n(n,i,e){var r;return(r=t.call(this,[new xc,new Bc(8),new Mc(1),new Lc(0)])||this).rw=[],r.Fbt=Kr(),r.sw=0,r.bw=function(t){if(t.dF>=on)for(;r.rw.length>0;)r.kw()},e&&r.av(new Uc(e,"com.apple.streamingkeydelivery","1")),r.jat=n,r.Krt=i,r.Krt.bn("remove",r.bw),r.tb=new zc(0),r.av(r.tb),r}Tt(n,t);var i=n.prototype;return i.tPt=function(){return this.jat===Pc.yE?this.Krt.nb:this.jat===Pc.wE?this.Krt.cb:void 0},i.zat=function(t){return this.Fbt.get(t)},i.Km=function(){this.rw.length=0,this.tb.kL=0,this.Fbt.clear(),this.sw=0},i.$N=function(){return this.ab(),rn(t.prototype.$N.call(this)).concat(rn(this.rw))},i.ab=function(){for(var t=this.Krt.lb(),n=0;n<t.length;n++){var i=t[n];if(!this.Fbt.has(i.o)){var e=void 0;if(this.jat===Pc.yE?(e=i.kv,i.tw=!0):(e=i.jv,i.Ad=!0),!e)return;this.Fbt.set(i.o,e),e.lv&&this.rw.push(new Cc(i.o+"-init")),this.rw.push(new Dc(Jc,i.o)),this.sw+=Jc}}this.tg()},i.tg=function(){for(;this.sw>60;)this.kw()},i.kw=function(){var t=this.rw.shift();void 0!==t&&function(t){return t.zw===Ac.aE}(t)&&(this.Fbt.delete(t.cv),this.sw-=t.sv,this.tb.kL++)},n}(Vc);var ta=function(t){function n(n){var i;return(i=t.call(this,"remove")||this).dF=n,i}return Tt(n,t),n}(ko),na=function(t){function n(n,i){var e;return(e=t.call(this)||this).ng=n,e.ig=i,e.ug=[],e.sg=[],e.lg=Kr(),e.bg=Kr(),e.mg=Kr(),e.kg=0,e}Tt(n,t);var i=n.prototype;return i.lb=function(){return this.tm?(this.ug=this.ug.filter((function(t){return!(t.tw&&t.Ad)})),rn(this.ug).concat([this.tm],rn(this.sg))):[]},i.a3=function(t){this.rm(t)},i.r3=function(t){this.rm(t),this.om(t),this.sm(t)},i.rT=function(t){this.rm(t),this.sm(t)},i.Km=function(){var t;null==(t=this.tm)||t.Ws(),this.tm=void 0,this.sg.forEach((function(t){return t.Ws()})),this.sg.length=0,this.ug.length=0,this.mg=Kr(),this.kg=0},i.om=function(t){var n=t.startPts,i=t.totalDuration;this.bg.set(t.mediaType,n+i)},i.am=function(){if(this.tm){this.tm.Ws(),this.ug.push(this.tm);var t=this.sg.shift(),n=new Zc(this.ng,this.ig);t?(this.tm=t,this.sg.push(n)):this.tm=n}},i.bm=function(t){if(this.tm){var n=!this.tm.jv||0===this.tm.jv.SI,i=!this.tm.kv||0===this.tm.kv.SI,e=this.tm.jv&&this.tm.jv.lv,r=this.tm.kv&&this.tm.kv.lv,o=i&&(n&&!(this.tm.Ad||this.tm.tw)||e),u=n&&(i&&!(this.tm.Ad||this.tm.tw)||r);(t===Pc.wE&&!u||t===Pc.yE&&!o)&&(this.am(),this.am())}},i.rm=function(t){var n=t.mediaType,i=t.kind,e=this.lg.get(n);if(void 0===e){if(i===Hc.Lit||i===Hc.Bit){var r=[t];this.lg.set(n,r)}}else e.push(t)},i.sm=function(t){var n=this.km(t);for(var i=0;i<n.length;i++){var e=n[i];switch(e.kind){case Hc.Lit:this.ip(e),this.mg=Kr(),this.kg=0;break;case Hc.Fit:this.up(e);break;case Hc.Bit:this.ty(e)}}},i.ip=function(t){var n=t.mediaType;void 0===this.tm?(this.tm=new Zc(this.ng,this.ig),this.sg.push(new Zc(this.ng,this.ig))):this.bm(n),n===Pc.yE?(this.ny=t.segment,this.tm.kv.lv=!0):n===Pc.wE&&(this.hy=t.segment,this.tm.jv.lv=!0)},i.ty=function(t){var n,i,e=t.mediaType===Pc.wE,r=t.totalDuration,o=null!=(n=this.mg.get(t.mediaType))?n:0;e?(this.tm.jv.r3(t.segment,r),i=o+this.tm.jv.SI):(this.tm.kv.r3(t.segment,r),i=o+this.tm.kv.SI),i>=this.kg+Jc&&(this.mg.set(t.mediaType,i),this.kg+=Jc,this.am())},i.up=function(t){this.bg.set(t.mediaType,void 0),this.bm(t.mediaType),this.ug.length=0,this._o(new ta(t.endTime))},i.km=function(t){var n=this;if(t.kind===Hc.Fit)return this.by(t);var i=[];return this.lg.forEach((function(t){if(t&&t.length>0){var e=un(t,(function(t){return t.kind===Hc.Fit}));-1===e&&(e=t.length);for(var r=t.slice(0,e),o=0;o<r.length;o++){var u=r[o];if(!cn(i,u)){var s,f=n.by(u);if(f.length>0)(s=i).push.apply(s,rn(f));else if(u.kind===Hc.Bit)break}}}})),i},i.by=function(t){var n=this.lg.get(t.mediaType),i=function(t){return t===Pc.yE?Pc.wE:Pc.yE}(t.mediaType);if(!(i===Pc.yE?this.ig:this.ng))return n.splice(0,n.indexOf(t)+1);if(t.kind===Hc.Lit)return[];var e=this.bg.get(i);if(void 0===e)return[];if(t.kind===Hc.Fit){var r=this.my(i);if(r.length>0){var o=n.splice(0,n.indexOf(t));return n.splice(0,1),rn(o).concat(rn(r),[t])}return[]}if(t.startPts<=e){var u=n.splice(0,n.indexOf(t));n.splice(0,1);var s=this.ky(t,u,i);return rn(u).concat(rn(s),[t])}return[]},i.ky=function(t,n,i){var e=this.lg.get(i);if(!e)return[];var r=t.startPts+t.totalDuration,o=un(e,(function(t){return t.kind===Hc.Fit})),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===Hc.Bit&&h.startPts>r&&(s=f)}var c=-1;return-1!==un(n,(function(t){return t.kind===Hc.Lit}))&&(c=un(e,(function(t){return t.kind===Hc.Lit}))),c>s&&(s=c+1),s>0?(e[s-1].kind===Hc.Lit&&(s-=1),e.splice(0,s)):[]},i.my=function(t){var n=this.lg.get(t);if(n){var i=un(n,(function(t){return t.kind===Hc.Fit}));if(i>=0)return n.splice(0,i+1)}return[]},i.OS=function(){var t="[MEDIABUFFER] endPTS: ";this.bg.forEach((function(n,i){t=t.concat(i+" = "+n+" ")})),qt.hw(t)},i.AS=function(t,n){var i=t+": [";null==n||n.forEach((function(t){i=i.concat(" "+t.kind+"("+t.mediaType+")")})),i=i.concat(" ]"),qt.hw(i)},Et(n,[{key:"cb",get:function(){var t;return null==(t=this.hy)?void 0:t.slice()}},{key:"nb",get:function(){var t;return null==(t=this.ny)?void 0:t.slice()}}]),n}(Eo);var ia=function(){function t(t,n){var i=t.some((function(t){return t.match("audio")})),e=t.some((function(t){return t.match("video")}));this.BS=new na(i,e),this.RT=new qc(i,e),i&&(this.IE=new Qc(Pc.wE,this.BS,n)),e&&(this.ME=new Qc(Pc.yE,this.BS,n))}var n=t.prototype;return n.tk=function(t){var n,i,e=ea(t);return e===Pc.yE?null==(n=this.ME)?void 0:n.tPt():e===Pc.wE?null==(i=this.IE)?void 0:i.tPt():void 0},n.zat=function(t){var n,i,e=t.split("/")[1],r=ea(t);return r===Pc.yE?null==(n=this.ME)?void 0:n.zat(e):r===Pc.wE?null==(i=this.IE)?void 0:i.zat(e):void 0},n.a3=function(t){this.BS.a3(t)},n.r3=function(t){this.BS.r3(t)},n.adt=function(t){this.BS.rT(t)},n.Km=function(){var t,n;this.BS.Km(),this.RT.Km(),null==(t=this.IE)||t.Km(),null==(n=this.ME)||n.Km()},Et(t,[{key:"ik",get:function(){return this.RT}},{key:"uk",get:function(){return this.IE}},{key:"sk",get:function(){return this.ME}}]),t}();function ea(t){return t.match(/video/)?Pc.yE:Pc.wE}var ra=function(){function t(t,n){var i=this;this.ak=t,this.mk=n,this.Tut=void 0,this.Iqt=function(t){return Jt((function(){var n,i;return Qt(this,(function(e){switch((n=t.data).kind){case Hc.Mit:this.Tut=new ia(n.mediaBufferConfigs,n.fairPlaySdkUri);break;case Hc.Lit:this.Tut.a3(n);break;case Hc.Bit:this.Tut.r3(n);break;case Hc.Fit:this.Tut.adt(n)}return i={kind:Hc.Oit},this.ak.postMessage(i),[2]}))})).call(i)},this.ak.onmessage=this.Iqt}var n=t.prototype;return n.dWt=function(t){return"master.m3u8"===t?this.Tut.ik:"video/index.m3u8"===t?this.Tut.sk:"audio/index.m3u8"===t?this.Tut.uk:void 0},n.kk=function(t){if(t.match(/m3u8/)){var n,i=null==(n=this.dWt(t))?void 0:n.dWt();return new Response(i,{headers:{"Content-Type":"application/x-mpegurl; charset=utf-8"}})}if(t.match($c)){var e={"Content-Type":t.match(/video/)?"video/mp4":"audio/mp4"};if(t.match(/init/)){var r,o=null==(r=this.Tut)?void 0:r.tk(t);return new Response(o,{headers:e})}var u=this.Xat(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.$k)},e=function(){n.close(),t.vn("append",i),t.vn("close",e)};return new self.ReadableStream({start:function(r){(n=r).enqueue(t.$k),t.QS?n.close():(t.bn("append",i),t.bn("close",e))},cancel:function(){t.vn("append",i),t.vn("close",e)}})}(u);return new Response(s,{headers:e})}return new Response(void 0,{status:404,statusText:"Not Found"})},n.Xat=function(t){return this.Tut.zat(t)},n.close=function(){var t;this.ak.close(),null==(t=this.Tut)||t.Km()},t}(),oa=function(){function t(){var t=this;this.x9=Kr(),this.Iqt=function(n){var i=n.data;if(i.kind===Hc.Dit){t.TR().catch(Gt);var e=i.port,r=Yc(),o=new ra(e,n.source.id);t.x9.set(r,o);var u=function(n){n.data.kind===Hc.Vit&&(t.CR(r),e.removeEventListener("message",u))};e.addEventListener("message",u);var s={kind:Hc.Nit,sessionId:r};e.postMessage(s)}},this.BR=function(n){if(wo(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.x9.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.kk(r);n.respondWith(f)}}}var n=t.prototype;return n.pr=function(t){this.rqt=t,t.addEventListener("message",this.Iqt),t.addEventListener("fetch",this.BR)},n.CR=function(t){var n=this.x9.get(t);n&&n.close(),this.x9.delete(t)},n.TR=function(){return Jt((function(){var t,n,i;return Qt(this,(function(e){switch(e.label){case 0:return t=this,[4,this.rqt.clients.matchAll()];case 1:return n=e.sent(),i=n.map((function(t){return t.id})),this.x9.forEach((function(n,e){cn(i,n.mk)||t.CR(e)})),[2]}}))})).call(this)},t}();oa.IN=new oa;var ua=self;ua.addEventListener("install",(function(t){t.waitUntil(ua.skipWaiting())})),ua.addEventListener("activate",(function(t){t.waitUntil(ua.clients.claim())})),oa.IN.pr(ua)}("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof s?s:"undefined"!=typeof global?global:this);
|