@theoplayer/theoads 9.8.1 → 9.9.0

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