@theoplayer/theoads 8.2.1 → 8.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/THEOplayer.chromeless.d.ts +1 -1
- package/THEOplayer.chromeless.esm.js +2 -2
- package/THEOplayer.chromeless.js +3 -3
- package/THEOplayer.common.esm.js +3 -3
- package/THEOplayer.d.ts +1 -1
- package/THEOplayer.esm.js +3 -3
- package/THEOplayer.js +3 -3
- package/THEOplayer.transmux.asmjs.js +3 -3
- package/THEOplayer.transmux.js +3 -3
- package/package.json +1 -1
- package/theoplayer.d.js +3 -3
- package/theoplayer.sw.js +2 -2
package/theoplayer.sw.js
CHANGED
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
THEOplayer is based on patented technology developed by
|
|
25
25
|
THEO Technologies (https://www.theoplayer.com).
|
|
26
26
|
|
|
27
|
-
Version: 8.2.
|
|
28
|
-
Created: 2024-10-
|
|
27
|
+
Version: 8.2.2
|
|
28
|
+
Created: 2024-10-16T15:24:40.369Z
|
|
29
29
|
*/
|
|
30
30
|
!function(t){"use strict";var n,i,e=t.window,r=t.document,o=(t.location,t.navigator),u=t.setTimeout,s=t.clearTimeout,f=t.setInterval,h=t.clearInterval,c=t.Error,a=t.TypeError,v=(t.SyntaxError,t.Object),d=t.Math,l=t.parseInt,w=t.parseFloat,b=t.isNaN,g=t.Uint8Array,m=(t.Worker,t.WorkerGlobalScope,t.XMLHttpRequest);"function"==typeof Symbol&&Symbol.iterator?n=Symbol:(i=0,(n=function(t){return"ttn"+t+"_"+ ++i}).iterator=n("Symbol.iterator"));var p=u;function y(t){return Boolean(t&&void 0!==t.length)}function _(){}function S(t){if(!(this instanceof S))throw new a("Promises must be constructed via new");if("function"!=typeof t)throw new a("not a function");this.ja=0,this.ntn=!1,this.SMt=void 0,this.itn=[],O(t,this)}function T(t,n){for(;3===t.ja;)t=t.SMt;0!==t.ja?(t.ntn=!0,S.rtn((function(){var i=1===t.ja?n.onFulfilled:n.onRejected;if(null!==i){var e;try{e=i(t.SMt)}catch(t){return void I(n.promise,t)}E(n.promise,e)}else(1===t.ja?E:I)(n.promise,t.SMt)}))):t.itn.push(n)}function E(t,n){try{if(n===t)throw new a("A promise cannot be resolved with itself.");if(n&&("object"==typeof n||"function"==typeof n)){var i=n.then;if(n instanceof S)return t.ja=3,t.SMt=n,void k(t);if("function"==typeof i)return void O(function(t,n){return function(){t.apply(n,arguments)}}(i,n),t)}t.ja=1,t.SMt=n,k(t)}catch(n){I(t,n)}}function I(t,n){t.ja=2,t.SMt=n,k(t)}function k(t){2===t.ja&&0===t.itn.length&&S.rtn((function(){t.ntn||S.etn(t.SMt)}));for(var n=0,i=t.itn.length;n<i;n++)T(t,t.itn[n]);t.itn=null}function R(t,n,i){this.onFulfilled="function"==typeof t?t:null,this.onRejected="function"==typeof n?n:null,this.promise=i}function O(t,n){var i=!1;try{t((function(t){i||(i=!0,E(n,t))}),(function(t){i||(i=!0,I(n,t))}))}catch(t){if(i)return;i=!0,I(n,t)}}S.prototype.catch=function(t){return this.then(null,t)},S.prototype.then=function(t,n){var i=new this.constructor(_);return T(this,new R(t,n,i)),i},S.prototype.finally=function(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)}))}))},S.all=function(t){return new S((function(n,i){if(!y(t))return i(new a("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"==typeof 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])}))},S.allSettled=function(t){return new this((function(i,e){if(!t||void 0===t.length)return e(new a((void 0===t?"undefined":function(t){return t&&void 0!==n&&t.constructor===n?"symbol":typeof t}(t))+" "+t+" is not iterable(cannot read property Symbol(Symbol.iterator))"));var r=Array.prototype.slice.call(t);if(0===r.length)return i([]);var o=r.length;function u(t,n){if(n&&("object"==typeof n||"function"==typeof n)){var e=n.then;if("function"==typeof e)return void e.call(n,(function(n){u(t,n)}),(function(n){r[t]={status:"rejected",reason:n},0==--o&&i(r)}))}r[t]={status:"fulfilled",value:n},0==--o&&i(r)}for(var s=0;s<r.length;s++)u(s,r[s])}))},S.resolve=function(t){return t&&"object"==typeof t&&t.constructor===S?t:new S((function(n){n(t)}))},S.reject=function(t){return new S((function(n,i){i(t)}))},S.race=function(t){return new S((function(n,i){if(!y(t))return i(new a("Promise.race accepts an array"));for(var e=0,r=t.length;e<r;e++)S.resolve(t[e]).then(n,i)}))},S.rtn="function"==typeof setImmediate&&function(t){setImmediate(t)}||function(t){p(t,0)},S.etn=function(t){"undefined"!=typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",t)};var N=function(){var t=self.Promise;if(void 0!==t)try{if(-1!==t.toString().indexOf("[native code]"))return t}catch(t){}}(),P=o?o.userAgent:"",A=P.match(/Firefox\/([0-9]+)/i),D=null!=A,C=A?Number(A[1]):0,x=P.match(/(Version)\/((\d+)\.(\d+)(?:\.(\d+))?).*Safari/),B=null!=x,M=x?Number(x[3]):0,L=function(){function t(t){this.cL=0,this.aG=0,this.JL=[],this.utn=t}return t.prototype.stn=function(t){var n=this.length();this.otn(n+1);var i=this.aG+n&this.utn-1;this.JL[i]=t,this.cL=n+1},t.prototype.push=function(t){var n=this.length()+1;if(this.utn<n)this.stn(t);else{var i=this.aG+n-1,e=this.utn-1;this.JL[i&e]=t,this.cL=n}},t.prototype.shift=function(){var t=this.aG,n=this.JL[t];return this.JL[t]=void 0,this.aG=t+1&this.utn-1,this.cL--,n},t.prototype.length=function(){return this.cL},t.prototype.otn=function(t){this.utn<t&&this.ctn(this.utn<<1)},t.prototype.ctn=function(t){var n=this.utn;this.utn=t;var i=this.aG+this.cL&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.JL,0,n,i)},t}();var U="unhandledrejection",F=self.PromiseRejectionEvent,z=self.CustomEvent;function W(t){return new F(U,{reason:t,promise:N.reject(t).catch((function(){})),cancelable:!0})}function q(t){var n=new z(U,{detail:{reason:t},cancelable:!0});return v.defineProperty(n,"reason",{value:t}),n}function V(t){var n=r.createEvent("CustomEvent");return n.initCustomEvent(U,!1,!0,{reason:t}),n}var H,X,j,Y,K,G,$,Z,J=function(t){return J=function(){try{var t=N.resolve(),n="error",i=new F(U,{reason:n,promise:t});return U===i.type&&n===i.reason}catch(t){}return!1}()?W:function(){try{var t="error",n=new z(U,{detail:{reason:t}});return U===n.type&&t===n.detail.reason}catch(t){}return!1}()?q:V,J(t)};function Q(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):X.resolve(f).then(e,r)}function tt(t){return function(){var n=this,i=arguments;return new X((function(e,r){var o=t.apply(n,i);function u(t){Q(o,e,r,u,s,"next",t)}function s(t){Q(o,e,r,u,s,"throw",t)}u(void 0)}))}}function nt(t,i){var e,r,o,u,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return u={next:f(0),throw:f(1),return:f(2)},"function"==typeof n&&(u[n.iterator]=function(){return this}),u;function f(n){return function(f){return function(n){if(e)throw new a("Generator is already executing.");for(;u&&(u=0,n[0]&&(s=0)),s;)try{if(e=1,r&&(o=2&n[0]?r.return:n[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,n[1])).done)return o;switch(r=0,o&&(n=[2&n[0],o.value]),n[0]){case 0:case 1:o=n;break;case 4:return s.label++,{value:n[1],done:!1};case 5:s.label++,r=n[1],n=[0];continue;case 7:n=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==n[0]&&2!==n[0])){s=0;continue}if(3===n[0]&&(!o||n[1]>o[0]&&n[1]<o[3])){s.label=n[1];break}if(6===n[0]&&s.label<o[1]){s.label=o[1],o=n;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(n);break}o[2]&&s.ops.pop(),s.trys.pop();continue}n=i.call(t,s)}catch(t){n=[6,t],r=0}finally{e=o=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}([n,f])}}}function it(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 et(t,n){if(t){if("string"==typeof t)return it(t,n);var i=v.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)?it(t,n):void 0}}function rt(t){return function(t){if(Array.isArray(t))return it(t)}(t)||function(t){if(void 0!==n&&null!=t[n.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||et(t)||function(){throw new a("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}N&&!(D&&C<60||B&&M<15)?X=N:(X=S,$=null!==(H=function(){var t=self.queueMicrotask;if("function"==typeof t)return function(n){return t(n)};var n=N;if(n&&"function"==typeof n.resolve){var i=n.resolve();return function(t){return i.then(t)}}}())&&void 0!==H?H:S.rtn,j=$,Y=new L(16),K=!1,(Z={a4:function(t){Y.push(t),K||(K=!0,j(G))},KF:G=function(){for(;Y.length()>0;)Y.shift()();K=!1}}).KF,S.rtn=Z.a4,S.etn=function(t){try{var n=J(t);if(!self.dispatchEvent(n)||n.defaultPrevented)return}catch(t){}u((function(){throw new c("Unhandled promise rejection: ".concat(t))}),0)});var ot={}.toString;function ut(t){return null!=t}var st=Array.isArray||function(t){return"[object Array]"===ot.call(t)};function ft(t){return"object"==typeof t&&null!==t}function ht(t){return"function"==typeof t}function ct(t){return ht(t)||ft(t)}var at,vt=9007199254740991;d.pow(2,-52);!function(t){t[t.Zr=0]="Zr",t[t.ul=1]="ul",t[t.hd=-1]="hd"}(at||(at={}));Array.prototype.find,Array.prototype.findLast;var dt="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},lt="function"==typeof Array.prototype.findLastIndex?function(t,n){return t.findLastIndex(n)}:function(t,n){for(var i=t.length-1;i>=0;i-=1){if(n(t[i],i,t))return i}return-1};function wt(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 bt(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 gt(t,n){return-1!==t.indexOf(n)}function mt(t){t.length=0}var pt;Array.prototype.flat,Array.prototype.flatMap;function yt(t){pt=t}var _t=function(){};function St(t){var n;return function(){return void 0!==t&&(n=t(),t=void 0),n}}var Tt;function Et(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),v.defineProperty(t,e.key,e)}}function It(t,n,i){return n&&Et(t.prototype,n),i&&Et(t,i),t}function kt(t,n){return kt=v.setPrototypeOf||function(t,n){return t.__proto__=n,t},kt(t,n)}function Rt(t,n){if("function"!=typeof n&&null!==n)throw new a("Super expression must either be null or a function");t.prototype=v.create(n&&n.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),n&&kt(t,n)}function Ot(t,i){return function(t){if(Array.isArray(t))return t}(t)||function(t,i){var e=null==t?null:void 0!==n&&t[n.iterator]||t["@@iterator"];if(null!=e){var r,o,u=[],s=!0,f=!1;try{for(e=e.call(t);!(s=(r=e.next()).done)&&(u.push(r.value),!i||u.length!==i);s=!0);}catch(t){f=!0,o=t}finally{try{s||null==e.return||e.return()}finally{if(f)throw o}}return u}}(t,i)||et(t,i)||function(){throw new a("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Nt(){var t=v.create(null);return t.Nd=void 0,delete t.Nd,t}function Pt(){return new Dt}!function(t){t.Mm="audio",t.ym="video",t.Dm="metadata"}(Tt||(Tt={}));var At="undefined"!=typeof Map&&"entries"in Map.prototype?Map:void 0,Dt=At||function(){var t=function(){function t(t,n){this.index=0,this.data=t,this.selector=n,this.keys=v.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=Nt(),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=Nt(),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}()}();var Ct;At||function(){var t=function(){function t(t,n){this.Dd=t,this.Id=n}return t.prototype.next=function(){var t=this.Dd.next();return t.done?t:{value:this.Id(t.value),done:!1}},t}();(function(){function n(){this.Ld=Pt()}var i=n.prototype;i.get=function(t){return this.Ld.get(""+t)},i.set=function(t,n){return this.Ld.set(""+t,n),this},i.has=function(t){return this.Ld.has(""+t)},i.delete=function(t){return this.Ld.delete(""+t)},i.clear=function(){this.Ld.clear()},i.keys=function(){return new t(this.Ld.keys(),(function(t){return Number(t)}))},i.values=function(){return this.Ld.values()},i.entries=function(){return new t(this.Ld.entries(),(function(t){var n=Ot(t,2),i=n[0],e=n[1];return[Number(i),e]}))},i.forEach=function(t){this.Ld.forEach((function(n,i){t(n,Number(i))}))},It(n,[{key:"size",get:function(){return this.Ld.size}}])})()}();!function(t){t.$S="#EXTINF",t.gjt="#EXT-X-MAP",t.sT="#EXTM3U",t.i="#EXT-X-VERSION",t.p="#EXT-X-TARGETDURATION",t.Kyt="#EXT-X-START",t.en="#EXT-X-INDEPENDENT-SEGMENTS",t.qS="#EXT-X-STREAM-INF",t.ui="#EXT-X-MEDIA-SEQUENCE",t.li="#EXT-X-ENDLIST",t.nT="#EXT-X-MEDIA",t.vr="#EXT-X-DISCONTINUITY",t.ff="#EXT-X-DISCONTINUITY-SEQUENCE",t.af="#EXT-X-PLAYLIST-TYPE",t.tv="#EXT-X-KEY"}(Ct||(Ct={}));var xt,Bt=function(){function t(t,n){this.Rg="#EXTINF",this.nv=t,this.ev=n}return t.prototype.dA=function(){return this.Rg+":"+this.nv+",\n"+this.ev},t}(),Mt=function(){function t(t){this.Rg="#EXT-X-MAP",this.ev=t}return t.prototype.dA=function(){return this.Rg+':URI="'+this.ev+'"'},t}(),Lt=function(){function t(){this.Rg="#EXTM3U"}return t.prototype.dA=function(){return this.Rg},t}(),Ut=function(){function t(t){this.Rg="#EXT-X-VERSION",this.dp=t}return t.prototype.dA=function(){return this.Rg+":"+this.dp},t}(),Ft=function(){function t(t){this.Rg="#EXT-X-TARGETDURATION",this.MOt=t}return t.prototype.dA=function(){return this.Rg+":"+this.MOt},t}(),zt=function(){function t(t){this.Rg="#EXT-X-START",this.Tjt=t}return t.prototype.dA=function(){return this.Rg+":TIME-OFFSET="+this.Tjt},t}(),Wt=function(){function t(t,n,i){this.uri=t,this.keyFormat=n,this.keyFormatVersions=i,this.Rg="#EXT-X-KEY"}return t.prototype.dA=function(){return this.Rg+':METHOD=SAMPLE-AES,URI="'+this.uri+'",KEYFORMAT="'+this.keyFormat+'",KEYFORMATVERSIONS="'+this.keyFormatVersions+'"'},t}(),qt=function(){function t(t){this.Rg="#EXT-X-STREAM-INF",this.wP=1,this.ev=t}return t.prototype.dA=function(){return this.Rg+":BANDWIDTH="+this.wP+',AUDIO="audio"\n'+this.ev},t}(),Vt=function(){function t(t){this.Rg="#EXT-X-MEDIA-SEQUENCE",this.MM=t}return t.prototype.dA=function(){return this.Rg+":"+this.MM},t}();!function(t){t.fjt="VOD",t.sv="EVENT"}(xt||(xt={}));var Ht=function(){function t(t){this.Rg="#EXT-X-MEDIA",this.ev=t}return t.prototype.dA=function(){var t=Pt();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.ev+'"');var n=[];return t.forEach((function(t,i){return n.push(i+"="+t)})),this.Rg+":"+n.join(",")},t}(),Xt=function(){function t(t){this.CL=[],this.CL=t}var n=t.prototype;return n.sy=function(){return this.CL},n.cv=function(t){this.CL.push(t)},n.Kzt=function(){for(var t="",n=0,i=this.sy();n<i.length;n++){t+=i[n].dA()+"\n"}return t},n.Ud=function(){this.CL.length=0},t}(),jt=function(t){function n(n,i){var e;return e=t.call(this,[new Lt,new Ut(8)])||this,i&&e.cv(new qt("video/index.m3u8")),n&&e.cv(new Ht("audio/index.m3u8")),e}return Rt(n,t),n}(Xt);function Yt(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}var Kt=function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];c.apply(this,n)};(Kt.prototype=v.create(c.prototype)).constructor=Kt;var Gt=function(t){function n(n,i){var e;return(e=t.call(this)||this).message=n||"Unknown error",e.cause=i,c.captureStackTrace&&c.captureStackTrace(Yt(e),e.constructor),e}return Rt(n,t),It(n,[{key:"name",get:function(){return"BaseError"}}]),n}(Kt),$t=function(){function t(){this.zd=!1,this.Bd=!1,this.Rd=[],this.Qd=[]}var n=t.prototype;return n.Od=function(){if(!this.zd&&!this.Bd){this.zd=!0;for(var t=0,n=this.Rd.slice();t<n.length;t++){(0,n[t])()}this.Ud()}},n.Ud=function(){if(!this.Bd){this.Bd=!0;for(var t=0,n=this.Qd.slice();t<n.length;t++){(0,n[t])()}mt(this.Rd),mt(this.Qd)}},n.Fd=function(t){this.Bd||this.Rd.push(t)},n.Yd=function(t){this.Bd||wt(this.Rd,t)},n.Gd=function(t){this.Bd||this.Qd.push(t)},n.Vd=function(t){this.Bd||wt(this.Qd,t)},t}(),Zt=function(){function t(){this.Hd=new $t}var n=t.prototype;return n.qd=function(){this.Hd.Od()},n.Ud=function(){this.Hd.Ud()},n.Xd=function(t){var n=this.Hd;if(!n.zd)if(t.zd)n.Od();else if(!n.Bd&&!t.Bd){var i=function(){e(),n.Od()},e=function(){t.Yd(i),t.Vd(e),n.Yd(i),n.Vd(e)};t.Fd(i),t.Gd(e),n.Fd(i),n.Gd(e)}},n.Zd=function(){var n=new t,i=new t,e=n.Wd,r=i.Wd,o=this.Hd,u=function(){e.zd&&r.Bd||r.zd&&e.Bd?o.Od():e.Bd&&r.Bd&&o.Ud()};e.Fd(u),r.Fd(u),e.Gd(u),r.Gd(u),n.Xd(o),i.Xd(o);return o.Gd((function(){e.Yd(u),r.Yd(u),e.Vd(u),r.Vd(u)})),[n,i]},It(t,[{key:"Wd",get:function(){return this.Hd}}]),t}(),Jt=function(t){function n(n,i){return t.call(this,n||"Aborted",i)}return Rt(n,t),It(n,[{key:"name",get:function(){return"AbortError"}}]),n}(Gt);function Qt(t){return t instanceof c&&"AbortError"===t.name}function tn(t,n){return n?new X((function(i,e){if(n.zd)return t.catch(_t),e(new Jt);var r=function(){n.Yd(r),e(new Jt)};n.Fd(r),t.then((function(t){n.Yd(r),i(t)}),(function(t){n.Yd(r),e(t)}))})):t}function nn(t,n){return t.then((function(t){return n.qd(),t}),(function(t){throw n.qd(),t}))}X.resolve();function en(t,n){return new X((function(i,e){if(void 0!==n&&n.zd)e(new Jt);else{var r=pt.$d((function(){void 0!==n&&n.Yd(o),i()}),t),o=function(){pt.Jd(r),e(new Jt)};void 0!==n&&n.Fd(o)}}))}var rn,on=function(){function t(t){var n=this;this.SC=[],this.IC=void 0,this.DC=new Zt,this.EC=function(){return 0===n.SC.length?n.LC?un(n.LC,n.DC.Wd).then(n.kC,n.kC):n.kC():n.SC.shift()().then(n.EC)},this.kC=function(){if(0!==n.SC.length)return n.EC();n.IC=void 0},this.LC=t}var n=t.prototype;return n.NC=function(t,n){var i=this;return new X((function(e){var r=new Zt;r.Xd(i.DC.Wd),n&&r.Xd(n);var o=function(){r.Ud()};i.SC.push((function(){var n=un(t,r.Wd);return e(n),n.then(o,o)})),i.IC||(i.IC=i.EC())}))},n.qd=function(){return this.bC(!0)},n.gn=function(){return this.LC=void 0,this.bC(!1)},n.bC=function(t){var n=this.IC;return this.DC.qd(),t&&(this.DC=new Zt),X.resolve(n)},t}();function un(t,n){return new X((function(i){return i(t(n))}))}!function(t){t.B8="HELLO",t.U8="HI_THERE",t.Q8="INITIALIZE",t.F8="APPEND_INIT",t.Y8="APPEND_DATA",t.G8="ACK",t.V8="REMOVE",t.W8="DESTROY_SESSION"}(rn||(rn={}));var sn=null;try{sn=new WebAssembly.Instance(new WebAssembly.Module(new g([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(j){}function fn(t,n,i){this.low=0|t,this.high=0|n,this.unsigned=!!i}function hn(t){return!0===(t&&t.xm)}function cn(t){var n=d.clz32(t&-t);return t?31-n:n}fn.prototype.xm,v.defineProperty(fn.prototype,"xm",{value:!0}),fn.isLong=hn;var an={},vn={};function dn(t,n){var i,e,r;return n?(r=0<=(t>>>=0)&&t<256)&&(e=vn[t])?e:(i=wn(t,0,!0),r&&(vn[t]=i),i):(r=-128<=(t|=0)&&t<128)&&(e=an[t])?e:(i=wn(t,t<0?-1:0,!1),r&&(an[t]=i),i)}function ln(t,n){if(b(t))return n?En:Tn;if(n){if(t<0)return En;if(t>=yn)return Nn}else{if(t<=-_n)return Pn;if(t+1>=_n)return On}return t<0?ln(-t,n).neg():wn(t%pn|0,t/pn|0,n)}function wn(t,n,i){return new fn(t,n,i)}fn.fromInt=dn,fn.fromNumber=ln,fn.fromBits=wn;var bn=d.pow;function gn(t,n,i){if(0===t.length)throw c("empty string");if("number"==typeof n?(i=n,n=!1):n=!!n,"NaN"===t||"Infinity"===t||"+Infinity"===t||"-Infinity"===t)return n?En:Tn;if((i=i||10)<2||36<i)throw RangeError("radix");var e;if((e=t.indexOf("-"))>0)throw c("interior hyphen");if(0===e)return gn(t.substring(1),n,i).neg();for(var r=ln(bn(i,8)),o=Tn,u=0;u<t.length;u+=8){var s=d.min(8,t.length-u),f=l(t.substring(u,u+s),i);if(s<8){var h=ln(bn(i,s));o=o.mul(h).add(ln(f))}else o=(o=o.mul(r)).add(ln(f))}return o.unsigned=n,o}function mn(t,n){return"number"==typeof t?ln(t,n):"string"==typeof t?gn(t,n):wn(t.low,t.high,"boolean"==typeof n?n:t.unsigned)}fn.fromString=gn,fn.fromValue=mn;var pn=4294967296,yn=pn*pn,_n=yn/2,Sn=dn(1<<24),Tn=dn(0);fn.ZERO=Tn;var En=dn(0,!0);fn.UZERO=En;var In=dn(1);fn.ONE=In;var kn=dn(1,!0);fn.UONE=kn;var Rn=dn(-1);fn.NEG_ONE=Rn;var On=wn(-1,2147483647,!1);fn.MAX_VALUE=On;var Nn=wn(-1,-1,!0);fn.MAX_UNSIGNED_VALUE=Nn;var Pn=wn(0,-2147483648,!1);fn.MIN_VALUE=Pn;var An=fn.prototype;An.toInt=function(){return this.unsigned?this.low>>>0:this.low},An.toNumber=function(){return this.unsigned?(this.high>>>0)*pn+(this.low>>>0):this.high*pn+(this.low>>>0)},An.toString=function(t){if((t=t||10)<2||36<t)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative()){if(this.eq(Pn)){var n=ln(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=ln(bn(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}},An.getHighBits=function(){return this.high},An.getHighBitsUnsigned=function(){return this.high>>>0},An.getLowBits=function(){return this.low},An.getLowBitsUnsigned=function(){return this.low>>>0},An.getNumBitsAbs=function(){if(this.isNegative())return this.eq(Pn)?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},An.isZero=function(){return 0===this.high&&0===this.low},An.eqz=An.isZero,An.isNegative=function(){return!this.unsigned&&this.high<0},An.isPositive=function(){return this.unsigned||this.high>=0},An.isOdd=function(){return 1==(1&this.low)},An.isEven=function(){return 0==(1&this.low)},An.equals=function(t){return hn(t)||(t=mn(t)),(this.unsigned===t.unsigned||this.high>>>31!=1||t.high>>>31!=1)&&(this.high===t.high&&this.low===t.low)},An.eq=An.equals,An.notEquals=function(t){return!this.eq(t)},An.neq=An.notEquals,An.ne=An.notEquals,An.lessThan=function(t){return this.comp(t)<0},An.lt=An.lessThan,An.lessThanOrEqual=function(t){return this.comp(t)<=0},An.lte=An.lessThanOrEqual,An.le=An.lessThanOrEqual,An.greaterThan=function(t){return this.comp(t)>0},An.gt=An.greaterThan,An.greaterThanOrEqual=function(t){return this.comp(t)>=0},An.gte=An.greaterThanOrEqual,An.ge=An.greaterThanOrEqual,An.compare=function(t){if(hn(t)||(t=mn(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},An.comp=An.compare,An.negate=function(){return!this.unsigned&&this.eq(Pn)?Pn:this.not().add(In)},An.neg=An.negate,An.add=function(t){hn(t)||(t=mn(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,wn((c&=65535)<<16|(a&=65535),(f&=65535)<<16|(h&=65535),this.unsigned)},An.subtract=function(t){return hn(t)||(t=mn(t)),this.add(t.neg())},An.sub=An.subtract,An.multiply=function(t){if(this.isZero())return this;if(hn(t)||(t=mn(t)),sn)return wn(sn.mul(this.low,this.high,t.low,t.high),sn.get_high(),this.unsigned);if(t.isZero())return this.unsigned?En:Tn;if(this.eq(Pn))return t.isOdd()?Pn:Tn;if(t.eq(Pn))return this.isOdd()?Pn:Tn;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(Sn)&&t.lt(Sn))return ln(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,wn((a&=65535)<<16|(v&=65535),(h&=65535)<<16|(c&=65535),this.unsigned)},An.mul=An.multiply,An.divide=function(t){if(hn(t)||(t=mn(t)),t.isZero())throw c("division by zero");var n,i,e;if(sn)return this.unsigned||-2147483648!==this.high||-1!==t.low||-1!==t.high?wn((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?En:Tn;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return En;if(t.gt(this.shru(1)))return kn;e=En}else{if(this.eq(Pn))return t.eq(In)||t.eq(Rn)?Pn:t.eq(Pn)?In:(n=this.shr(1).div(t).shl(1)).eq(Tn)?t.isNegative()?In:Rn:(i=this.sub(t.mul(n)),e=n.add(i.div(t)));if(t.eq(Pn))return this.unsigned?En:Tn;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=Tn}for(i=this;i.gte(t);){n=d.max(1,d.floor(i.toNumber()/t.toNumber()));for(var r=d.ceil(d.log(n)/d.LN2),o=r<=48?1:bn(2,r-48),u=ln(n),s=u.mul(t);s.isNegative()||s.gt(i);)s=(u=ln(n-=o,this.unsigned)).mul(t);u.isZero()&&(u=In),e=e.add(u),i=i.sub(s)}return e},An.div=An.divide,An.modulo=function(t){return hn(t)||(t=mn(t)),sn?wn((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))},An.mod=An.modulo,An.rem=An.modulo,An.not=function(){return wn(~this.low,~this.high,this.unsigned)},An.countLeadingZeros=function(){return this.high?d.clz32(this.high):d.clz32(this.low)+32},An.clz=An.countLeadingZeros,An.countTrailingZeros=function(){return this.low?cn(this.low):cn(this.high)+32},An.ctz=An.countTrailingZeros,An.and=function(t){return hn(t)||(t=mn(t)),wn(this.low&t.low,this.high&t.high,this.unsigned)},An.or=function(t){return hn(t)||(t=mn(t)),wn(this.low|t.low,this.high|t.high,this.unsigned)},An.xor=function(t){return hn(t)||(t=mn(t)),wn(this.low^t.low,this.high^t.high,this.unsigned)},An.shiftLeft=function(t){return hn(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?wn(this.low<<t,this.high<<t|this.low>>>32-t,this.unsigned):wn(0,this.low<<t-32,this.unsigned)},An.shl=An.shiftLeft,An.shiftRight=function(t){return hn(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?wn(this.low>>>t|this.high<<32-t,this.high>>t,this.unsigned):wn(this.high>>t-32,this.high>=0?0:-1,this.unsigned)},An.shr=An.shiftRight,An.shiftRightUnsigned=function(t){return hn(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?wn(this.low>>>t|this.high<<32-t,this.high>>>t,this.unsigned):wn(32===t?this.high:this.high>>>t-32,0,this.unsigned)},An.shru=An.shiftRightUnsigned,An.shr_u=An.shiftRightUnsigned,An.rotateLeft=function(t){var n;return hn(t)&&(t=t.toInt()),0==(t&=63)?this:32===t?wn(this.high,this.low,this.unsigned):t<32?(n=32-t,wn(this.low<<t|this.high>>>n,this.high<<t|this.low>>>n,this.unsigned)):(n=32-(t-=32),wn(this.high<<t|this.low>>>n,this.low<<t|this.high>>>n,this.unsigned))},An.rotl=An.rotateLeft,An.rotateRight=function(t){var n;return hn(t)&&(t=t.toInt()),0==(t&=63)?this:32===t?wn(this.high,this.low,this.unsigned):t<32?(n=32-t,wn(this.high<<n|this.low>>>t,this.low<<n|this.high>>>t,this.unsigned)):(n=32-(t-=32),wn(this.low<<n|this.high>>>t,this.high<<n|this.low>>>t,this.unsigned))},An.rotr=An.rotateRight,An.toSigned=function(){return this.unsigned?wn(this.low,this.high,!1):this},An.toUnsigned=function(){return this.unsigned?this:wn(this.low,this.high,!0)},An.toBytes=function(t){return t?this.toBytesLE():this.toBytesBE()},An.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]},An.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]},fn.fromBytes=function(t,n,i){return i?fn.fromBytesLE(t,n):fn.fromBytesBE(t,n)},fn.fromBytesLE=function(t,n){return new fn(t[0]|t[1]<<8|t[2]<<16|t[3]<<24,t[4]|t[5]<<8|t[6]<<16|t[7]<<24,n)},fn.fromBytesBE=function(t,n){return new fn(t[4]<<24|t[5]<<16|t[6]<<8|t[7],t[0]<<24|t[1]<<16|t[2]<<8|t[3],n)};var Dn=fn;function Cn(){return Date.now()||(new Date).getTime()}Dn.fromNumber(vt);var xn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),Bn=16383;function Mn(t,n,i){return xn[t>>2]+xn[(3&t)<<4|n>>4]+xn[(15&n)<<2|i>>6]+xn[63&i]}function Ln(t,n,i){for(var e=[],r=n;r<i;r+=3)e.push(Mn(t[r],t[r+1],t[r+2]));return e.join("")}var Un=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]","[object DataView]"],Fn=ArrayBuffer.isView||function(t){return t&>(Un,ot.call(t))};function zn(t){var n=t.reduce((function(t,n){return t+n.byteLength}),0);return function(t,n){for(var i=new g(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 Wn(t){return function(t){for(var n=t.length,i=n%3,e=[],r=n-i,o=0;o<r;o+=Bn)e.push(Ln(t,o,d.min(r,o+Bn)));if(1===i){var u=t[n-1];e.push(xn[u>>2]+xn[(3&u)<<4]+"==")}else if(2===i){var s=t[n-2],f=t[n-1];e.push(xn[s>>2]+xn[(3&s)<<4|f>>4]+xn[(15&f)<<2]+"=")}return e.join("")}(new g(t))}var qn=function(){function t(t){void 0===t&&(t=0),this.Zu=t}var n=t.prototype;return n.Im=function(t){this.Zu+=t},n.Em=function(t){this.Zu=t},n.Lm=function(){return new t(this.Ku)},It(t,[{key:"Ku",get:function(){return this.Zu}}]),t}();String.prototype.replaceAll;var Vn="function"==typeof String.prototype.startsWith?function(t,n){return ut(t)&&t.startsWith(n)}:function(t,n){return ut(t)&&t.substr(0,n.length)===n},Hn=(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}),Xn=(String.prototype.padStart,String.prototype.padEnd,16384),jn="function"==typeof String.fromCodePoint?function(t){var n;return t.length<=Xn?(n=String).fromCodePoint.apply(n,rt(t)):Kn(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 Yn(n)};function Yn(t){var n;return t.length<=Xn?(n=String).fromCharCode.apply(n,rt(t)):Kn(t,String.fromCharCode)}function Kn(t,n){for(var i=[],e=0;e<t.length;e+=Xn)i.push(n.apply(void 0,rt(t.slice(e,e+Xn))));return i.join("")}function Gn(t){if(t>=55296&&t<=57343)throw new c("Lone surrogate U+"+t.toString(16).toUpperCase()+" is not a scalar value")}function $n(t,n){return t>>n&63|128}function Zn(t,n){0!=(4294967168&t)?(0==(4294965248&t)?n.push(t>>6&31|192):0==(4294901760&t)?(Gn(t),n.push(t>>12&15|224),n.push($n(t,6))):0==(4292870144&t)&&(n.push(t>>18&7|240),n.push($n(t,12)),n.push($n(t,6))),n.push(63&t|128)):n.push(t)}function Jn(t,n){if(n.Ku>=t.length)throw new c("Invalid byte index");var i=255&t[n.Ku];if(n.Im(1),128==(192&i))return 63&i;throw new c("Invalid continuation byte")}function Qn(t,n){var i=n.Ku;if(i>t.length)throw new c("Invalid byte index");if(i===t.length)return!1;var e=255&t[i];if(n.Im(1),0==(128&e))return e;if(192==(224&e)){var r=(31&e)<<6|Jn(t,n);if(r>=128)return r;throw new c("Invalid continuation byte")}if(224==(240&e)){var o=(15&e)<<12|Jn(t,n)<<6|Jn(t,n);if(o>=2048)return Gn(o),o;throw new c("Invalid continuation byte")}if(240==(248&e)){var u=(7&e)<<18|Jn(t,n)<<12|Jn(t,n)<<6|Jn(t,n);if(u>=65536&&u<=1114111)return u}throw new c("Invalid UTF-8 detected")}var ti=65279;function ni(t,n,i){void 0===i&&(i=!1);var e=t.getUint16(n.Ku,i);return n.Im(2),e}function ii(t,n,i,e){void 0===e&&(e=!1),t.setUint16(n.Ku,i,e),n.Im(2)}function ei(t,n,i,e){void 0===e&&(e=!1),t.setUint32(n.Ku,i,e),n.Im(4)}function ri(t,n,i,e){void 0===e&&(e=!1);for(var r=i.length,o=0;o<r;o+=1){ii(t,n,i.charCodeAt(o),e)}}function oi(t,n){return void 0===n&&(n=!1),function(t,n,i,e){for(var r=[];n.Ku+2<=t.byteLength;){var o=ni(t,n,i);if(e&&!o)break;r.push(o)}return Yn(r)}(fi(t),new di,n,!1)}function ui(t){return function(t){return jn(t)}(function(t,n){var i,e=[],r=new di;if(!n){if(!1===(i=Qn(t,r)))return e;i===ti||e.push(i)}for(;!1!==(i=Qn(t,r));)e.push(i);return e}(hi(t)))}function si(t){return new g(function(t){for(var n=[],i=0;i<t.length;i++)Zn(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 fi(t){return new DataView(t.buffer,t.byteOffset,t.byteLength)}function hi(t){return new g(t.buffer,t.byteOffset,t.byteLength)}function ci(t){return t instanceof ArrayBuffer?new g(t):hi(t)}function ai(t){if(t.slice)return t.slice(0);var n=new g(t.byteLength);return n.set(t,0),n}var vi,di=function(){function t(t){void 0===t&&(t=0),this.Zu=t}var n=t.prototype;return n.Im=function(t){this.Zu+=t},n.Em=function(t){this.Zu=t},n.Lm=function(){return new t(this.Ku)},n.jm=function(){return new qn(this.Ku<<3)},It(t,[{key:"Ku",get:function(){return this.Zu}}]),t}(),li=new Array(256);for(vi=0;vi<256;vi+=1)li[vi]=(vi<16?"0":"")+vi.toString(16);function wi(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var n=16*d.random()|0;return("x"===t?n:3&n|8).toString(16)}))}function bi(t,n,i){if("function"==typeof i)i.call(t,n);else for(var e=0;e<i.length;e++){i[e].call(t,n)}}var gi=function(){function t(t){var n=this;this.if=Nt(),this.nf=void 0,this.ef=0,this.Ds=function(t){n.Co(t)},this.rf=null!=t?t:this}var n=t.prototype;return n.yn=function(t,n){if("function"==typeof n)if("string"==typeof t)this.tf(t,n);else for(var i=0;i<t.length;i++){var e=t[i];this.tf(e,n)}},n.tf=function(t,n){var i=this.if[t];void 0===i?this.if[t]=n:"function"==typeof i?this.if[t]=[i,n]:0===this.ef?i.push(n):this.if[t]=i.concat(n)},n.sf=function(t){if("function"==typeof t){var n=this.nf;void 0===n?this.nf=t:"function"==typeof n?this.nf=[n,t]:0===this.ef?n.push(t):this.nf=n.concat(t)}},n.Vo=function(){this.if=Nt(),this.nf=void 0},n.Co=function(t){this.ef++;var n=this.if[t.type],i=this.nf;void 0!==n&&bi(this.rf,t,n),void 0!==i&&bi(this.rf,t,i),this.ef--},n.fn=function(t,n){if("function"==typeof n)if("string"==typeof t)this.hf(t,n);else for(var i=0;i<t.length;i++){var e=t[i];this.hf(e,n)}},n.hf=function(t,n){var i=this.if[t];void 0!==i&&("function"==typeof i?i===n&&(this.if[t]=void 0):0===this.ef?wt(i,n):this.if[t]=bt(i,n))},n.uf=function(t){if("string"==typeof t)this.if[t]=void 0;else for(var n=0;n<t.length;n++){var i=t[n];this.if[i]=void 0}},n.cf=function(t){var n=this.nf;void 0!==n&&("function"==typeof n?n===t&&(this.nf=void 0):0===this.ef?wt(n,t):this.nf=bt(n,t))},n.lf=function(t,n){var i=this;return new X((function(e,r){if(n&&n.zd)return r(new Jt);var o=function(t){s(),e(t)},u=function(){s(),r(new Jt)},s=function(){i.fn(t,o),n&&n.Yd(u)};i.yn(t,o),n&&n.Fd(u)}))},t}(),mi=function(t,n){void 0===n&&(n=new Date),this.type=t,this.date=n},pi=function(t){function n(n){var i;return(i=t.call(this,"append")||this).zm=n,i}return Rt(n,t),n}(mi),yi=function(t){function n(){var n;return(n=t.apply(this,arguments)||this).cDt=0,n.JL=new g(0),n.dL=!1,n.av=!1,n}Rt(n,t);var i=n.prototype;return i.AJ=function(t,n){this.cDt+=n,this.JL=zn([this.JL,t]),this.Co(new pi(t))},i.Ws=function(){this.yx||(this.Co(new mi("close")),this.dL=!0)},It(n,[{key:"wf",get:function(){return this.cDt}},{key:"zm",get:function(){return this.JL}},{key:"yx",get:function(){return this.dL}},{key:"dv",get:function(){return this.av},set:function(t){this.av=t}}]),n}(gi),_i="sync-seg-",Si=function(){function t(t,n){this.lv=!1,this.wv=!1,this.o=_i+wi(),this.gv=n?new yi:void 0,this.kv=t?new yi:void 0}return t.prototype.Ws=function(){this.gv&&this.gv.Ws(),this.kv&&this.kv.Ws()},It(t,[{key:"jv",get:function(){return this.lv},set:function(t){this.lv=t}},{key:"Ad",get:function(){return this.wv},set:function(t){this.wv=t}}]),t}(),Ti=1.1,Ei=function(t){function n(n,i,e){var r;return(r=t.call(this,[new Lt,new Ut(8),new Ft(1),new zt(0)])||this).tw=[],r.Imt=Pt(),r.rw=0,r.sw=function(t){if(t.WT>=vt)for(;r.tw.length>0;)r.bw()},e&&r.cv(new Wt(e,"com.apple.streamingkeydelivery","1")),r.Fht=n,r.tnt=i,r.tnt.yn("remove",r.sw),r.kw=new Vt(0),r.cv(r.kw),r}Rt(n,t);var i=n.prototype;return i.iEt=function(){return this.Fht===Tt.ym?this.tnt.tb:this.Fht===Tt.Mm?this.tnt.nb:void 0},i.Bht=function(t){return this.Imt.get(t)},i.Ud=function(){this.tw.length=0,this.kw.MM=0,this.Imt.clear(),this.rw=0},i.sy=function(){return this.cb(),rt(t.prototype.sy.call(this)).concat(rt(this.tw))},i.cb=function(){for(var t=this.tnt.ab(),n=0;n<t.length;n++){var i=t[n];if(!this.Imt.has(i.o)){var e=void 0;if(this.Fht===Tt.ym?(e=i.gv,i.Ad=!0):(e=i.kv,i.jv=!0),!e)return;this.Imt.set(i.o,e),e.dv&&this.tw.push(new Mt(i.o+"-init")),this.tw.push(new Bt(Ti,i.o)),this.rw+=Ti}}this.lb()},i.lb=function(){for(;this.rw>60;)this.bw()},i.bw=function(){var t=this.tw.shift();void 0!==t&&function(t){return t.Rg===Ct.$S}(t)&&(this.Imt.delete(t.ev),this.rw-=t.nv,this.kw.MM++)},n}(Xt);var Ii=function(t){function n(n){var i;return(i=t.call(this,"remove")||this).WT=n,i}return Rt(n,t),n}(mi),ki=function(t){function n(n,i){var e;return(e=t.call(this)||this).tg=n,e.ng=i,e.ig=[],e.ug=[],e.sg=Pt(),e.lg=Pt(),e.bg=Pt(),e.mg=0,e}Rt(n,t);var i=n.prototype;return i.ab=function(){return this.kg?(this.ig=this.ig.filter((function(t){return!(t.Ad&&t.jv)})),rt(this.ig).concat([this.kg],rt(this.ug))):[]},i.yJ=function(t){this.rm(t)},i.AJ=function(t){this.rm(t),this.om(t),this.sm(t)},i.bT=function(t){this.rm(t),this.sm(t)},i.Ud=function(){var t;null==(t=this.kg)||t.Ws(),this.kg=void 0,this.ug.forEach((function(t){return t.Ws()})),this.ug.length=0,this.ig.length=0,this.bg=Pt(),this.mg=0},i.om=function(t){var n=t.startPts,i=t.totalDuration;this.lg.set(t.mediaType,n+i)},i.am=function(){if(this.kg){this.kg.Ws(),this.ig.push(this.kg);var t=this.ug.shift(),n=new Si(this.tg,this.ng);t?(this.kg=t,this.ug.push(n)):this.kg=n}},i.bm=function(t){if(this.kg){var n=!this.kg.kv||0===this.kg.kv.wf,i=!this.kg.gv||0===this.kg.gv.wf,e=this.kg.kv&&this.kg.kv.dv,r=this.kg.gv&&this.kg.gv.dv,o=i&&(n&&!(this.kg.jv||this.kg.Ad)||e),u=n&&(i&&!(this.kg.jv||this.kg.Ad)||r);(t===Tt.Mm&&!u||t===Tt.ym&&!o)&&(this.am(),this.am())}},i.rm=function(t){var n=t.mediaType,i=t.kind,e=this.sg.get(n);if(void 0===e){if(i===rn.F8||i===rn.Y8){var r=[t];this.sg.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 rn.F8:this.up(e),this.bg=Pt(),this.mg=0;break;case rn.V8:this.ty(e);break;case rn.Y8:this.ny(e)}}},i.up=function(t){var n=t.mediaType;void 0===this.kg?(this.kg=new Si(this.tg,this.ng),this.ug.push(new Si(this.tg,this.ng))):this.bm(n),n===Tt.ym?(this.hy=t.segment,this.kg.gv.dv=!0):n===Tt.Mm&&(this.my=t.segment,this.kg.kv.dv=!0)},i.ny=function(t){var n,i,e=t.mediaType===Tt.Mm,r=t.totalDuration,o=null!=(n=this.bg.get(t.mediaType))?n:0;e?(this.kg.kv.AJ(t.segment,r),i=o+this.kg.kv.wf):(this.kg.gv.AJ(t.segment,r),i=o+this.kg.gv.wf),i>=this.mg+Ti&&(this.bg.set(t.mediaType,i),this.mg+=Ti,this.am())},i.ty=function(t){this.lg.set(t.mediaType,void 0),this.bm(t.mediaType),this.ig.length=0,this.Co(new Ii(t.endTime))},i.km=function(t){var n=this;if(t.kind===rn.V8)return this.ky(t);var i=[];return this.sg.forEach((function(t){if(t&&t.length>0){var e=dt(t,(function(t){return t.kind===rn.V8}));-1===e&&(e=t.length);for(var r=t.slice(0,e),o=0;o<r.length;o++){var u=r[o];if(!gt(i,u)){var s,f=n.ky(u);if(f.length>0)(s=i).push.apply(s,rt(f));else if(u.kind===rn.Y8)break}}}})),i},i.ky=function(t){var n=this.sg.get(t.mediaType),i=function(t){return t===Tt.ym?Tt.Mm:Tt.ym}(t.mediaType);if(!(i===Tt.ym?this.ng:this.tg))return n.splice(0,n.indexOf(t)+1);if(t.kind===rn.F8)return[];var e=this.lg.get(i);if(void 0===e)return[];if(t.kind===rn.V8){var r=this.BS(i);if(r.length>0){var o=n.splice(0,n.indexOf(t));return n.splice(0,1),rt(o).concat(rt(r),[t])}return[]}if(t.startPts<=e){var u=n.splice(0,n.indexOf(t));n.splice(0,1);var s=this.IE(t,u,i);return rt(u).concat(rt(s),[t])}return[]},i.IE=function(t,n,i){var e=this.sg.get(i);if(!e)return[];var r=t.startPts+t.totalDuration,o=dt(e,(function(t){return t.kind===rn.V8})),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===rn.Y8&&h.startPts>r&&(s=f)}var c=-1;return-1!==dt(n,(function(t){return t.kind===rn.F8}))&&(c=dt(e,(function(t){return t.kind===rn.F8}))),c>s&&(s=c+1),s>0?(e[s-1].kind===rn.F8&&(s-=1),e.splice(0,s)):[]},i.BS=function(t){var n=this.sg.get(t);if(n){var i=dt(n,(function(t){return t.kind===rn.V8}));if(i>=0)return n.splice(0,i+1)}return[]},i.tk=function(){var t="[MEDIABUFFER] endPTS: ";this.lg.forEach((function(n,i){t=t.concat(i+" = "+n+" ")})),pt.cit(t)},i.ik=function(t,n){var i=t+": [";null==n||n.forEach((function(t){i=i.concat(" "+t.kind+"("+t.mediaType+")")})),i=i.concat(" ]"),pt.cit(i)},It(n,[{key:"nb",get:function(){var t;return null==(t=this.my)?void 0:t.slice()}},{key:"tb",get:function(){var t;return null==(t=this.hy)?void 0:t.slice()}}]),n}(gi);var Ri=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.uk=new ki(i,e),this.sk=new jt(i,e),i&&(this.ak=new Ei(Tt.Mm,this.uk,n)),e&&(this.mk=new Ei(Tt.ym,this.uk,n))}var n=t.prototype;return n.kk=function(t){var n,i,e=Oi(t);return e===Tt.ym?null==(n=this.mk)?void 0:n.iEt():e===Tt.Mm?null==(i=this.ak)?void 0:i.iEt():void 0},n.Bht=function(t){var n,i,e=t.split("/")[1],r=Oi(t);return r===Tt.ym?null==(n=this.mk)?void 0:n.Bht(e):r===Tt.Mm?null==(i=this.ak)?void 0:i.Bht(e):void 0},n.yJ=function(t){this.uk.yJ(t)},n.AJ=function(t){this.uk.AJ(t)},n.Iut=function(t){this.uk.bT(t)},n.Ud=function(){var t,n;this.uk.Ud(),this.sk.Ud(),null==(t=this.ak)||t.Ud(),null==(n=this.mk)||n.Ud()},It(t,[{key:"TR",get:function(){return this.sk}},{key:"CR",get:function(){return this.ak}},{key:"BR",get:function(){return this.mk}}]),t}();function Oi(t){return t.match(/video/)?Tt.ym:Tt.Mm}var Ni,Pi=function(){function t(t,n){this.ID=t,this.PC=n,this.mot=void 0;var i=this;this.hVt=tt((function(t){var n,e;return nt(this,(function(r){switch((n=t.data).kind){case rn.Q8:i.mot=new Ri(n.mediaBufferConfigs,n.fairPlaySdkUri);break;case rn.F8:i.mot.yJ(n);break;case rn.Y8:i.mot.AJ(n);break;case rn.V8:i.mot.Iut(n)}return e={kind:rn.G8},i.ID.postMessage(e),[2]}))})),this.ID.onmessage=this.hVt}var n=t.prototype;return n.Kzt=function(t){return"master.m3u8"===t?this.mot.TR:"video/index.m3u8"===t?this.mot.BR:"audio/index.m3u8"===t?this.mot.CR:void 0},n.CC=function(t){if(t.match(/m3u8/)){var n,i=null==(n=this.Kzt(t))?void 0:n.Kzt();return new Response(i,{headers:{"Content-Type":"application/x-mpegurl; charset=utf-8"}})}if(t.match(_i)){var e={"Content-Type":t.match(/video/)?"video/mp4":"audio/mp4"};if(t.match(/init/)){var r,o=null==(r=this.mot)?void 0:r.kk(t);return new Response(o,{headers:e})}var u=this.Pht(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.zm)},e=function(){n.close(),t.fn("append",i),t.fn("close",e)};return new self.ReadableStream({start:function(r){(n=r).enqueue(t.zm),t.yx?n.close():(t.yn("append",i),t.yn("close",e))},cancel:function(){t.fn("append",i),t.fn("close",e)}})}(u);return new Response(s,{headers:e})}return new Response(void 0,{status:404,statusText:"Not Found"})},n.Pht=function(t){return this.mot.Bht(t)},n.close=function(){var t;this.ID.close(),null==(t=this.mot)||t.Ud()},t}(),Ai=function(){function t(){var t=this;this.Y4=Pt(),this.hVt=function(n){var i=n.data;if(i.kind===rn.B8){t.uz().catch(_t);var e=i.port,r=wi(),o=new Pi(e,n.source.id);t.Y4.set(r,o);var u=function(n){n.data.kind===rn.W8&&(t.hz(r),e.removeEventListener("message",u))};e.addEventListener("message",u);var s={kind:rn.U8,sessionId:r};e.postMessage(s)}},this.az=function(n){if(Vn(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.Y4.get(e);if(void 0===o){var u=new Response(void 0,{headers:{message:"Given session ["+e+"] not found."},status:404,statusText:"Not Found"});return void n.respondWith(u)}if(void 0===r){var s=new Response(void 0,{headers:{message:"No resource ["+r+"] provided."},status:404,statusText:"Not Found"});return void n.respondWith(s)}var f=o.CC(r);n.respondWith(f)}}}var n=t.prototype;return n.ur=function(t){this.zGt=t,t.addEventListener("message",this.hVt),t.addEventListener("fetch",this.az)},n.hz=function(t){var n=this.Y4.get(t);n&&n.close(),this.Y4.delete(t)},n.uz=function(){var t=this;return tt((function(){var n,i;return nt(this,(function(e){switch(e.label){case 0:return[4,t.zGt.clients.matchAll()];case 1:return n=e.sent(),i=n.map((function(t){return t.id})),t.Y4.forEach((function(n,e){gt(i,n.PC)||t.hz(e)})),[2]}}))}))()},t}();Ai.dz=new Ai,function(t){t.jI="web",t.zI="android",t.BI="android-tv",t.RI="ios",t.UI="tvos",t.QI="chromecast",t.FI="theoliveweb"}(Ni||(Ni={}));var Di=o?o.userAgent:"",Ci=Di.match(/chrome\/([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)/i),xi=Di.match(/Edg\/([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)/i),Bi=Di.match(/Android ([0-9\.]+)/i),Mi=Di.match(/Windows NT ([0-9\.]+)/i),Li=Di.match(/(Version)\/((\d+)\.(\d+)(?:\.(\d+))?).*Safari/),Ui=Di.match(/Firefox\/([0-9\.]+)/i),Fi=Di.match(/OPR\/(\d+\.\d+)/i),zi=Di.match(/Tizen ([0-9\.]+)/i),Wi=Di.match(/(iPhone OS|iPad OS|iPod OS|Mac OS X) (\d+)_(\d+)_?(\d+)?/),qi=function(){function t(){this.YI=Boolean("ontouchstart"in self||self.DocumentTouch&&r instanceof self.DocumentTouch||o&&o.msMaxTouchPoints),this.VI=/(mac\sos\sx)\s?([\w\s\.]+\w)*/i.test(Di)||/(macintosh|mac(?=_powerpc)\s)/i.test(Di),this.HI=/Windows NT/i.test(Di),this.XI=Mi?w(Mi[1]):0,this.KI=/Android/i.test(Di),this.$I=Bi?w(Bi[1]):0,this.iE=/windows phone (8|8\.1)/i.test(Di),this.sE=/iPhone/i.test(Di),this.rE=/iPad/i.test(Di),this.oE=this.VI&&this.YI&&!this.rE,this.uE=/iPod/i.test(Di),this.wE=/Mobile Safari/i.test(Di),this._E=/EOS\d*STB/i.test(Di),this.gE=/APP\d*STB/i.test(Di),this.cE=(this.sE||this.rE||this.oE||this.uE)&&!this.iE,this.dE=Wi?w(Wi[2]):0,this.vE=this.iE||this.cE||this.KI||this.wE,this.mE=/CriOS/i.test(Di),this.yE=Boolean(self.chrome&&/google/i.test(o.vendor))||this.mE,this.SE=this.yE&&/Edg\//i.test(o.userAgent),this.bE=xi?l(xi[1],10):0,this.bb=Boolean(self.chrome||/Chrome/i.test(Di)||/CriOS/i.test(Di)),this.NE=Ci?l(Ci[1],10):0,this.kE=/SMART-TV.*Tizen/i.test(Di),this.CE=zi?w(zi[1]):0,this.TE=this.CE>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.CE):void 0,this.jE=/webos|web0s/i.test(Di),this.zE=/VIZIO/i.test(Di),this.RE=/Edge\/\d+/i.test(Di),this.QE=/Trident/i.test(Di),this.YE=this.QE&&!self.ActiveXObject&&"ActiveXObject"in self,this.VE=/Vivaldi/i.test(Di),this.HE=/Firefox/i.test(Di)&&!/Seamonkey/i.test(Di),this.XE=Ui?w(Ui[1]):0,this.KE=/Safari/i.test(Di)&&!/Chrome/i.test(Di)&&!this.iE&&!this.kE,this.$E=Li?w(Li[2]):0,this.eb=Boolean(Fi),this.hb=Fi?w(Fi[1]):0,this.ub=/CrKey/.test(Di),this._b=/\b(tv|smart-tv|smarttv|appletv|crkey|googletv|hbbtv|pov_tv|roku|viera|nettv|philipstv|vizio)\b/i.test(Di),this.vb="web"===Ni.BI,this.mb="web"===Ni.zI,this.yb=this.mb||this.vb,this.Tb="web"===Ni.RI,this.Db="web"===Ni.UI,this.Ib="web"===Ni.QI}return It(t,[{key:"Je",get:function(){return this.YI}},{key:"GI",get:function(){return this.VI}},{key:"WI",get:function(){return this.HI}},{key:"qI",get:function(){return this.XI}},{key:"ZI",get:function(){return this.KI}},{key:"JI",get:function(){return this.$I}},{key:"tE",get:function(){return this.iE}},{key:"eE",get:function(){return this.sE}},{key:"nE",get:function(){return this.rE}},{key:"hE",get:function(){return this.oE}},{key:"aE",get:function(){return this.uE}},{key:"Ga",get:function(){return this.cE}},{key:"lE",get:function(){return this.dE}},{key:"fE",get:function(){return this._E||this.gE}},{key:"td",get:function(){return this.wE}},{key:"Qs",get:function(){return this.vE}},{key:"AE",get:function(){return this.mE}},{key:"pE",get:function(){return this.yE}},{key:"ME",get:function(){var t;return null!=(t=this.TE)?t:this.NE}},{key:"DE",get:function(){return this.SE}},{key:"EE",get:function(){return this.bE}},{key:"LE",get:function(){return this.kE}},{key:"xE",get:function(){return this.CE}},{key:"OE",get:function(){return this.jE}},{key:"PE",get:function(){return this.zE}},{key:"BE",get:function(){return this.RE}},{key:"UE",get:function(){return this.QE}},{key:"FE",get:function(){return this.YE}},{key:"GE",get:function(){return this.VE}},{key:"WE",get:function(){return this.HE}},{key:"qE",get:function(){return this.XE}},{key:"ZE",get:function(){return this.KE}},{key:"JE",get:function(){return this.$E}},{key:"ib",get:function(){return this.eb}},{key:"sb",get:function(){return this.hb}},{key:"ob",get:function(){return this.ub}},{key:"fb",get:function(){return this._b}},{key:"gb",get:function(){return!(!this.OE&&!this.LE)&&this.ME<=56}},{key:"wb",get:function(){return this.vb}},{key:"Ab",get:function(){return this.mb}},{key:"pb",get:function(){return this.yb}},{key:"Mb",get:function(){return this.Tb}},{key:"Nb",get:function(){return this.Db}},{key:"Sb",get:function(){return this.Ib}},{key:"Eb",get:function(){return this.bb}}]),t}();qi.Lb=new qi;var Vi=qi.Lb,Hi=!(Vi.UE&&!Vi.FE),Xi=self.console;function ji(t){if(ft(t))try{return JSON.stringify(t)}catch(t){}return t}function Yi(t){return t.map(ji).join(" ")}function Ki(t){var n=Xi&&Xi[t];return n?n.bind&&Hi?n.bind(Xi):function(){for(var n=arguments.length,i=new Array(n),e=0;e<n;e++)i[e]=arguments[e];Xi[t](Yi(i))}:void 0}var Gi=Ki("log")||_t,$i=Ki("warn")||Gi.bind(void 0,"WARNING:"),Zi=Ki("error")||Gi.bind(void 0,"ERROR:"),Ji=function(){var t=Xi&&Xi.assert;return t?t.bind&&Hi?t.bind(Xi):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];Xi.assert(t,Yi(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||Zi.apply(void 0,["Assertion failed:"].concat(rt(i)))}}();function Qi(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),v.defineProperty(t,e.key,e)}}function te(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){ne(t,n,r,e);var o=t;t=e,e=o}return t}(t,n);return i!==t&&ne(i,null,t.length,t),t}function ne(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++]}}var ie=/[a-zA-Z]/,ee=/[0-9]/,re=/[0-9a-fA-F]/,oe=/^0x/i,ue=/^[0-9]+$/,se=/^[0-9a-fA-F]+$/,fe=/^[0-7]+$/,he=v.prototype.toString,ce=Array.isArray||function(t){return"[object Array]"===he.call(t)},ae=void 0!==n&&"symbol"==typeof n.iterator;function ve(t){return ce(t)?t:Array.from(t)}function de(t,n,i){var e=t[n];t[n]=t[i],t[i]=e}function le(t){return t>=65&&t<=90}function we(t){return le(t)||function(t){return t>=97&&t<=122}(t)}function be(t){return t>=48&&t<=57}function ge(t){return be(t)||we(t)}function me(t){return be(t)||t>=65&&t<=70||t>=97&&t<=102}function pe(t){return le(t)?t+32:t}function ye(t){return be(t)?t-48:t>=65&&t<=70?t-65+10:t>=97&&t<=102?t-97+10:-1}function _e(t,n){return void 0===n&&(n=!1),0<=t&&t<=9?t+48:10<=t&&t<=15?t+(n?87:55):-1}var Se=d.min,Te=String.fromCharCode,Ee=16384;function Ie(t){for(var n=t.length,i=[],e=0;e<n;e+=Ee){var r=Se(e+Ee,n);i.push(Te.apply(null,t.slice(e,r)))}return i.join("")}var ke=2147483647,Re=/[^\0-\x7E]/,Oe=/[\x2E\u3002\uFF0E\uFF61]/g,Ne={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},Pe=d.floor,Ae=String.fromCharCode;function De(t){throw new RangeError(Ne[t])}function Ce(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 xe,Be,Me,Le=function(t,n){return t+22+75*(t<26)-((0!=n)<<5)},Ue=function(t,n,i){var e=0;for(t=i?Pe(t/700):t>>1,t+=Pe(t/n);t>455;e+=36)t=Pe(t/35);return Pe(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(Oe,".")).split("."),n).join(".");return e+r}(t,(function(t){return Re.test(t)?"xn--"+function(t){for(var n=[],i=(t=Ce(t)).length,e=128,r=0,o=72,u=0,s=t;u<s.length;u++){var f=s[u];f<128&&n.push(Ae(f))}var h=n.length,c=h;for(h&&n.push("-");c<i;){for(var a=ke,v=0,d=t;v<d.length;v++){var l=d[v];l>=e&&l<a&&(a=l)}var w=c+1;a-e>Pe((ke-r)/w)&&De("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>ke&&De("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(Ae(Le(_+S%T,0))),p=Pe(S/T)}n.push(Ae(Le(p,0))),o=Ue(r,w,c==h),r=0,++c}}++r,++e}return n.join("")}(t):t}))};function ze(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 Ie(n)}function We(t){if(t>=55296&&t<=57343)throw new c("Lone surrogate U+"+t.toString(16).toUpperCase()+" is not a scalar value")}function qe(t,n){return t>>n&63|128}function Ve(t,n){0!=(4294967168&t)?(0==(4294965248&t)?n.push(t>>6&31|192):0==(4294901760&t)?(We(t),n.push(t>>12&15|224),n.push(qe(t,6))):0==(4292870144&t)&&(n.push(t>>18&7|240),n.push(qe(t,12)),n.push(qe(t,6))),n.push(63&t|128)):n.push(t)}function He(t){for(var n=[],i=0;i<t.length;i++){Ve(t[i],n)}return n}function Xe(){if(Me>=Be)throw new c("Invalid byte index");var t=255&xe[Me];if(Me++,128==(192&t))return 63&t;throw new c("Invalid continuation byte")}function je(){var t,n;if(Me>Be)throw new c("Invalid byte index");if(Me===Be)return!1;if(t=255&xe[Me],Me++,0==(128&t))return t;if(192==(224&t)){if((n=(31&t)<<6|Xe())>=128)return n;throw new c("Invalid continuation byte")}if(224==(240&t)){if((n=(15&t)<<12|Xe()<<6|Xe())>=2048)return We(n),n;throw new c("Invalid continuation byte")}if(240==(248&t)&&(n=(7&t)<<18|Xe()<<12|Xe()<<6|Xe())>=65536&&n<=1114111)return n;throw new c("Invalid UTF-8 detected")}function Ye(t){return[37,_e(t>>4),_e(15&t)]}function Ke(t){return function(t){return t>=0&&t<=31}(t)||t>126}function Ge(t){return Ke(t)||32===t||34===t||60===t||62===t||96===t}function $e(t){return Ge(t)||35===t||63===t||123===t||125===t}function Ze(t){return $e(t)||47===t||58===t||59===t||61===t||64===t||t>=91&&t<=94||124===t}function Je(t){return t<33||t>126||34===t||35===t||60===t||62===t}function Qe(t){return Je(t)||39===t}function tr(t,n){if(!n(t))return[t];for(var i=He([t]),e=[],r=0;r<i.length;r++){var o=i[r];e.push.apply(e,Ye(o))}return e}function nr(t,n){for(var i=[],e=0,r=Ce(t);e<r.length;e++){var o=r[e];i.push.apply(i,tr(o,n))}return ze(i)}function ir(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&&me(t[e+1])&&me(t[e+2])){var o=ye(t[e+1])<<4|ye(t[e+2]);n.push(o),e+=2}else n.push(r)}return n}(He(t))}function er(t){return ze(function(t){xe=t.slice(),Be=xe.length,Me=0;for(var n,i=[];!1!==(n=je());)i.push(n);return i}(ir(Ce(t))))}function rr(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 a;o+=2,r=e+=1}for(;o<n;){if(8===e)throw new a("Too many groups");if(":"!==t[o]){for(var u=0,s=0;s<4&&o<n&&re.test(t[o]);)u=u<<4|l(t[o],16),o+=1,s+=1;if("."===t[o]){if(0===s)throw new a;if(o-=s,e>6)throw new a;for(var f=0;o<n;){var h=null;if(f>0){if(!("."===t[o]&&f<4))throw new a;o+=1}if(!ee.test(t[o]))throw new a;for(;o<n&&ee.test(t[o]);){var c=l(t[o],10);if(null===h)h=c;else{if(0===h)throw new a;if((h=10*h+c)>255)throw new a}o+=1}i[e]=i[e]<<8|h,2!==(f+=1)&&4!==f||(e+=1)}if(4!==f)throw new a;break}if(":"===t[o]){if((o+=1)===n)throw new a}else if(o<n)throw new a;i[e]=u,e+=1}else{if(null!==r)throw new a("Too many :: groups");o+=1,r=e+=1}}if(null!==r){var v=e-r;for(e=7;0!==e&&v>0;)de(i,e,r+v-1),e-=1,v-=1}else if(8!==e)throw new a;return i}function or(t){var n=10,i=ue;return oe.test(t)?(t=t.slice(2),n=16,i=se):t.length>=2&&"0"===t[0]&&(t=t.slice(1),n=8,i=fe),""===t?0:i.test(t)?l(t,n):void 0}var ur={$0:4},sr=/[\0\t\n\r #%/:?@\[\\\]]/,fr=/[\0\t\n\r #/:?@\[\\\]]/;function hr(t,n){if("["===t[0]){if("]"!==t[t.length-1])throw new a("Invalid IPv6 address");return{$0:2,Ptt:rr(t.slice(1,-1))}}if(!n)return function(t){if(fr.test(t))throw new a("Invalid code point in opaque host");var n=nr(t,Ke);return""===n?ur:{$0:3,JL:n}}(t);var i=function(t){var n=function(t){return Fe(t.toLowerCase())}(t);return n}(er(t));if(sr.test(i))throw new a("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=or(r);if(void 0===o)return;i.push(o)}for(var u=0;u<i.length-1;u++)if(i[u]>255)throw new a;if(i[i.length-1]>=d.pow(256,5-i.length))throw new a;for(var s=i.pop(),f=0;f<i.length;f++)s+=i[f]*d.pow(256,3-f);return s}}(i);return void 0!==e?{$0:1,Ptt:e}:""===i?ur:{$0:0,ztt:i}}function cr(t){switch(t.$0){case 0:return t.ztt;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.Ptt);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.Ptt)+"]";case 3:return t.JL;case 4:return""}}var ar=/\+/g;function vr(t){return 42===t||45===t||46===t||95===t||ge(t)}function dr(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(ar," "),s=s.replace(ar," ");var f=er(u),h=er(s);i.push([f,h])}}return i}function lr(t){for(var n="",i=0;i<t.length;i++){var e=t[i];i>0&&(n+="&"),n+=wr(He(Ce(e[0])))+"="+wr(He(Ce(e[1])))}return n}function wr(t){for(var n=[],i=0;i<t.length;i++){var e=t[i];32===e?n.push(43):vr(e)?n.push(e):n.push.apply(n,Ye(e))}return Ie(n)}var br=/(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])/;function gr(t){var n=""+t,i=br.exec(n);return i?function(t,n){for(var i=t.length,e=[],r=n;r<i;r++){var o=t.charCodeAt(r);if(pr(o))if(yr(o)||r===i-1)e.push(mr);else{var u=t.charCodeAt(r+1);yr(u)?(e.push(o,u),r++):e.push(mr)}else e.push(o)}return t.slice(0,n)+Ie(e)}(n,i.index):n}var mr=65533,pr=function(t){return 55296==(63488&t)},yr=function(t){return 0!=(1024&t)};function _r(t,n){var i=t[0],e=n[0];return i===e?0:i<e?-1:1}function Sr(t){t.Btt.length=0}function Tr(t,n){!function(t,n){for(var i=0;i<n.length;i++)t[i]=n[i];t.length=n.length}(t.Btt,dr(n))}function Er(t){if(t.Ju){var n=lr(t.Btt);""===n&&(n=null),t.Ju.Ju.Rtt=n}}var Ir=function(){function t(t){if(void 0===t&&(t=void 0),this.Ju=null,null==t)this.Btt=[];else if("object"==typeof t||"function"==typeof t)if(function(t){return t instanceof Ir&&!!ce(t.Btt)&&(!ae||t[n.iterator]===kr)}(t))this.Btt=t.Btt.slice();else if(function(t){return null!=t&&(!!ce(t)||!!ae&&"function"==typeof t[n.iterator])}(t)){this.Btt=[];for(var i=0,e=ve(t);i<e.length;i++){var r=ve(e[i]);if(2!==r.length)throw new a("Invalid name-value pair");this.Btt.push([gr(r[0]),gr(r[1])])}}else for(var o in this.Btt=[],t)v.prototype.hasOwnProperty.call(t,o)&&this.Btt.push([gr(o),gr(t[o])]);else(t=gr(t)).length>0&&"?"===t[0]&&(t=t.slice(1)),this.Btt=dr(t)}var i=t.prototype;return i.append=function(t,n){t=gr(t),n=gr(n),this.Btt.push([t,n]),Er(this)},i.delete=function(t){t=gr(t);for(var n=this.Btt,i=0;i<n.length;){n[i][0]===t?n.splice(i,1):i++}Er(this)},i.get=function(t){t=gr(t);for(var n=this.Btt,i=0;i<n.length;i++){var e=n[i];if(e[0]===t)return e[1]}return null},i.getAll=function(t){t=gr(t);for(var n=this.Btt,i=[],e=0;e<n.length;e++){var r=n[e];r[0]===t&&i.push(r[1])}return i},i.has=function(t){t=gr(t);for(var n=this.Btt,i=0;i<n.length;i++){if(n[i][0]===t)return!0}return!1},i.set=function(t,n){t=gr(t),n=gr(n);for(var i=this.Btt,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]),Er(this)},i.sort=function(){te(this.Btt,_r),Er(this)},i.toString=function(){return lr(this.Btt)},i.entries=function(){return new Pr(this.Btt,Rr)},i.keys=function(){return new Pr(this.Btt,Or)},i.values=function(){return new Pr(this.Btt,Nr)},i.forEach=function(t){var n=this;this.Btt.forEach((function(i){return t(i[1],i[0],n)}))},t}(),kr=Ir.prototype.entries;ae&&(Ir.prototype[n.iterator]=kr);var Rr=function(t){return[t[0],t[1]]},Or=function(t){return t[0]},Nr=function(t){return t[1]},Pr=function(){function t(t,n){this.Utt=0,this.Btt=t,this.Qtt=n}return t.prototype.next=function(){return this.Utt<this.Btt.length?{done:!1,value:this.Qtt(this.Btt[this.Utt++])}:{done:!0,value:void 0}},t}(),Ar="null";var Dr=v.create(null);Dr.ftp=21,Dr.file=0,Dr.gopher=70,Dr.http=80,Dr.https=443,Dr.ws=80,Dr.wss=443;var Cr=/^(?:\.|%2e)$/i,xr=/^(?:\.|%2e){2}$/i;function Br(t){return Cr.test(t)}function Mr(t){return xr.test(t)}function Lr(t){return void 0!==Dr[t]}function Ur(t){return Lr(t.Bj)}function Fr(t){return""!==t.Ftt||""!==t.Ytt}function zr(t){var n=t.length;if(!(n>=2))return!1;if(!qr(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 Wr(t){return 2===t.length&&ie.test(t[0])&&(":"===t[1]||"|"===t[1])}function qr(t){return 2===t.length&&Wr(Ie(t))}function Vr(t){return Wr(t)&&":"===t[1]}function Hr(t){var n=t.Gtt;0!==n.length&&("file"===t.Bj&&1===n.length&&Vr(n[0])||n.pop())}function Xr(t){return null===t.Vtt||ur===t.Vtt||t.Wtt||"file"===t.Bj}var jr=-1,Yr=/\t|\n|\r/g,Kr=/^[\x00-\x1f ]+|[\x00-\x1f ]+$/g;function Gr(t,n,i,e){void 0===i&&(i=null),void 0===e&&(e=null),i||(i=new Zr,t=t.replace(Kr,""));var r=null!==e?e:0;n=n||null;for(var o=[],u=!1,s=!1,f=!1,h=Ce(t=t.replace(Yr,"")),c=h.length,v=0;v<=c;){var d=v<c?h[v]:jr;switch(r){case 0:if(!we(d)){if(null===e){o.length=0,r=2;continue}throw new a("Invalid scheme")}o.push(pe(d)),r=1;break;case 1:if(ge(d)||43===d||45===d||46===d)o.push(pe(d));else{if(58!==d){if(null===e){o.length=0,r=2,v=0;continue}throw new a("Invalid scheme")}var w=ze(o);if(null!==e){if(Lr(i.Bj)&&!Lr(w))return;if(!Lr(i.Bj)&&Lr(w))return;if((Fr(i)||null!==i.q8)&&"file"===w)return;if("file"===i.Bj&&(i.Vtt===ur||null===i.Vtt))return}if(i.Bj=w,null!==e)return void(Ur(i)&&i.q8===Dr[i.Bj]&&(i.q8=null));o.length=0,"file"===i.Bj?r=13:Ur(i)&&n&&n.Bj===i.Bj?r=3:Ur(i)?r=7:47===h[v+1]?(r=4,v+=1):(i.Wtt=!0,i.Gtt.push(""),r=18)}break;case 2:if(!n||n.Wtt&&35!==d)throw new a("Invalid scheme");n.Wtt&&35===d?(i.Bj=n.Bj,i.Gtt=n.Gtt.slice(),i.Rtt=n.Rtt,i.Htt="",i.Wtt=!0,r=20):"file"!==n.Bj?(r=5,v-=1):(r=13,v-=1);break;case 3:47===d&&47===h[v+1]?r=8:(r=5,v-=1);break;case 4:47===d?r=9:(r=17,v-=1);break;case 5:i.Bj=n.Bj,jr===d?(i.Ftt=n.Ftt,i.Ytt=n.Ytt,i.Vtt=n.Vtt,i.q8=n.q8,i.Gtt=n.Gtt.slice(),i.Rtt=n.Rtt):47===d?r=6:63===d?(i.Ftt=n.Ftt,i.Ytt=n.Ytt,i.Vtt=n.Vtt,i.q8=n.q8,i.Gtt=n.Gtt.slice(),i.Rtt="",r=19):35===d?(i.Ftt=n.Ftt,i.Ytt=n.Ytt,i.Vtt=n.Vtt,i.q8=n.q8,i.Gtt=n.Gtt.slice(),i.Rtt=n.Rtt,i.Htt="",r=20):92===d&&Ur(i)?r=6:(i.Ftt=n.Ftt,i.Ytt=n.Ytt,i.Vtt=n.Vtt,i.q8=n.q8,i.Gtt=n.Gtt.slice(),i.Gtt.pop(),r=17,v-=1);break;case 6:!Ur(i)||47!==d&&92!==d?47===d?r=9:(i.Ftt=n.Ftt,i.Ytt=n.Ytt,i.Vtt=n.Vtt,i.q8=n.q8,r=17,v-=1):r=8;break;case 7:if(47!==d||47!==h[v+1]){r=8;continue}r=8,v+=1;break;case 8:47!==d&&92!==d&&(r=9,v-=1);break;case 9:if(64===d){u&&o.unshift(37,52,48),u=!0;for(var b=0;b<o.length;b++){var g=o[b];if(58!==g||f){var m=ze(tr(g,Ze));f?i.Ytt+=m:i.Ftt+=m}else f=!0}o.length=0}else if(jr===d||47===d||63===d||35===d||Ur(i)&&92===d){if(u&&0===o.length)throw new a("Invalid host");v-=o.length+1,o.length=0,r=10}else o.push(d);break;case 10:case 11:if(null!==e&&"file"===i.Bj)v-=1,r=15;else if(58!==d||s)if(jr===d||47===d||63===d||35===d||Ur(i)&&92===d){if(v-=1,Ur(i)&&0===o.length)throw new a("Invalid host");if(null!==e&&0===o.length&&(Fr(i)||null!==i.q8))return;var p=hr(ze(o),Ur(i));if(i.Vtt=p,o.length=0,r=16,null!==e)return}else 91===d?s=!0:93===d&&(s=!1),o.push(d);else{if(0===o.length)throw new a("Invalid host");var y=hr(ze(o),Ur(i));if(i.Vtt=y,o.length=0,r=12,11===e)return}break;case 12:if(be(d))o.push(d);else{if(!(jr===d||47===d||63===d||35===d||Ur(i)&&92===d||null!==e))throw new a("Invalid port");if(0!==o.length){var _=l(ze(o),10);if(_>65535)throw new a("Invalid port");i.q8=_===Dr[i.Bj]?null:_,o.length=0}if(null!==e)return;r=16,v-=1}break;case 13:i.Bj="file",47===d||92===d?r=14:n&&"file"===n.Bj?jr===d?(i.Vtt=n.Vtt,i.Gtt=n.Gtt.slice(),i.Rtt=n.Rtt):63===d?(i.Vtt=n.Vtt,i.Gtt=n.Gtt.slice(),i.Rtt="",r=19):35===d?(i.Vtt=n.Vtt,i.Gtt=n.Gtt.slice(),i.Rtt=n.Rtt,i.Htt="",r=20):(zr(h.slice(v))||(i.Vtt=n.Vtt,i.Gtt=n.Gtt.slice(),Hr(i)),r=17,v-=1):(r=17,v-=1);break;case 14:47===d||92===d?r=15:(n&&"file"===n.Bj&&!zr(h.slice(v))&&(Vr(n.Gtt[0])?i.Gtt.push(n.Gtt[0]):i.Vtt=n.Vtt),r=17,v-=1);break;case 15:if(jr===d||47===d||92===d||63===d||35===d)if(v-=1,null===e&&qr(o))r=17;else if(0===o.length){if(i.Vtt=ur,null!==e)return;r=16}else{var S=hr(ze(o),Ur(i));if(0===S.$0&&"localhost"===S.ztt&&(S=ur),i.Vtt=S,null!==e)return;o.length=0,r=16}else o.push(d);break;case 16:Ur(i)?(r=17,47!==d&&92!==d&&(v-=1)):null===e&&63===d?(i.Rtt="",r=19):null===e&&35===d?(i.Htt="",r=20):jr!==d&&(r=17,47!==d&&(v-=1));break;case 17:if(jr===d||47===d||Ur(i)&&92===d||null===e&&(63===d||35===d)){var T=ze(o);if(Mr(T)?(Hr(i),47===d||Ur(i)&&92===d||i.Gtt.push("")):!Br(T)||47===d||Ur(i)&&92===d?Br(T)||("file"===i.Bj&&0===i.Gtt.length&&qr(o)&&(ur!==i.Vtt&&null!==i.Vtt&&(i.Vtt=ur),o[1]=58,T=ze(o)),i.Gtt.push(T)):i.Gtt.push(""),o.length=0,"file"===i.Bj&&(jr===d||63===d||35===d))for(;i.Gtt.length>1&&""===i.Gtt[0];)i.Gtt.shift();63===d?(i.Rtt="",r=19):35===d&&(i.Htt="",r=20)}else o.push.apply(o,tr(d,$e));break;case 18:63===d?(i.Rtt="",r=19):35===d?(i.Htt="",r=20):jr!==d&&(i.Gtt[0]+=ze(tr(d,Ke)));break;case 19:null===e&&35===d?(i.Htt="",r=20):jr!==d&&(i.Rtt+=ze(tr(d,Ur(i)?Qe:Je)));break;case 20:jr===d||0===d||(i.Htt+=ze(tr(d,Ge)))}v++}return i}function $r(t,n,i,e){try{Gr(t,n,i,e)}catch(t){}}var Zr=function(){this.Bj="",this.Ftt="",this.Ytt="",this.Vtt=null,this.q8=null,this.Gtt=[],this.Rtt=null,this.Htt=null,this.Wtt=!1};function Jr(t){switch(t.Bj){case"blob":var n;try{n=Gr(t.Gtt[0],null)}catch(t){return Ar}return Jr(n);case"ftp":case"gopher":case"http":case"https":case"ws":case"wss":return function(t,n,i){return t+"://"+cr(n)+(null===i?"":":"+i)}(t.Bj,t.Vtt,t.q8);default:return Ar}}var Qr,to,no=function(){function t(t,n){var i,e=null;if(null!=n)if(function(t){return null!=t&&t instanceof no&&"object"==typeof t.Ju}(n))e=n.Ju;else try{e=Gr(String(n),null)}catch(t){throw new a("Invalid base URL: "+t.message)}try{i=Gr(String(t),e)}catch(t){throw new a("Invalid URL: "+t.message)}var r=i.Rtt;this.Ju=i,this.Rtt=function(t){var n=new Ir;return null!==t&&Tr(n,t),n}(r),this.Rtt.Ju=this}var n=t.prototype;return n.toString=function(){return this.href},n.toJSON=function(){return this.href},function(t,n,i){n&&Qi(t.prototype,n),i&&Qi(t,i)}(t,[{key:"href",get:function(){return function(t,n){void 0===n&&(n=!1);var i=t.Bj+":";if(null!==t.Vtt?(i+="//",Fr(t)&&(i+=t.Ftt,""!==t.Ytt&&(i+=":"+t.Ytt),i+="@"),i+=cr(t.Vtt),null!==t.q8&&(i+=":"+t.q8)):null===t.Vtt&&"file"===t.Bj&&(i+="//"),t.Wtt)i+=t.Gtt[0];else for(var e=0,r=t.Gtt;e<r.length;e++)i+="/"+r[e];return null!==t.Rtt&&(i+="?"+t.Rtt),n||null===t.Htt||(i+="#"+t.Htt),i}(this.Ju)},set:function(t){var n;try{n=Gr(String(t),null)}catch(t){throw new a("Invalid URL: "+t.message)}this.Ju=n,Sr(this.Rtt);var i=this.Ju.Rtt;null!==i&&Tr(this.Rtt,i)}},{key:"origin",get:function(){return Jr(this.Ju)}},{key:"protocol",get:function(){return this.Ju.Bj+":"},set:function(t){$r(t+":",null,this.Ju,0)}},{key:"username",get:function(){return this.Ju.Ftt},set:function(t){Xr(this.Ju)||(this.Ju.Ftt=nr(t,Ze))}},{key:"password",get:function(){return this.Ju.Ytt},set:function(t){Xr(this.Ju)||(this.Ju.Ytt=nr(t,Ze))}},{key:"host",get:function(){var t=this.Ju,n=t.Vtt;if(null===n)return"";var i=t.q8,e=cr(n);return null!==i&&(e+=":"+i),e},set:function(t){this.Ju.Wtt||$r(t,null,this.Ju,10)}},{key:"hostname",get:function(){var t=this.Ju.Vtt;return null===t?"":cr(t)},set:function(t){this.Ju.Wtt||$r(t,null,this.Ju,11)}},{key:"port",get:function(){var t=this.Ju.q8;return null===t?"":""+t},set:function(t){Xr(this.Ju)||(""===t?this.Ju.q8=null:$r(t,null,this.Ju,12))}},{key:"pathname",get:function(){var t=this.Ju.Gtt;return this.Ju.Wtt?t[0]:0===t.length?"":"/"+t.join("/")},set:function(t){this.Ju.Wtt||(this.Ju.Gtt.length=0,$r(t,null,this.Ju,16))}},{key:"search",get:function(){var t=this.Ju.Rtt;return null===t||""===t?"":"?"+t},set:function(t){t=gr(t);var n=this.Ju;if(""===t)return n.Rtt=null,void Sr(this.Rtt);"?"===t[0]&&(t=t.slice(1)),n.Rtt="",$r(t,null,n,19),Tr(this.Rtt,t)}},{key:"searchParams",get:function(){return this.Rtt}},{key:"hash",get:function(){var t=this.Ju.Htt;return null===t||""===t?"":"#"+t},set:function(t){""!==t?("#"===t[0]&&(t=t.slice(1)),this.Ju.Htt="",$r(t,null,this.Ju,20)):this.Ju.Htt=null}}]),t}();function io(t){return t.document&&t.document.baseURI||t.location.href||""}function eo(){return void 0!==r?r.createElement("video"):void 0}function ro(){return to||(to=eo()),to}var oo=!!("ontouchstart"in self||self.DocumentTouch&&r instanceof self.DocumentTouch)||!(!o||!o.msMaxTouchPoints),uo=ro(),so=!(!uo||!uo.webkitShowPlaybackTargetPicker),fo=function(){function t(){this.Xtt=void 0,this.hit=!1,this.Je=oo,this.Qs=!1,this.R9=!0}var n=t.prototype;return n.Ztt=function(){return 0},n.nit=function(t,n){return!0},n.rit=function(t){return t>=.3333333333333333},It(t,[{key:"qtt",get:function(){return void 0===this.Xtt&&(this.Xtt=this.Ztt()),this.Xtt}},{key:"Ktt",get:function(){return!Vi.fb}},{key:"Jtt",get:function(){if(e.screen)return{width:e.screen.width,height:e.screen.height}}},{key:"T2",get:function(){return e.devicePixelRatio||1}},{key:"$tt",get:function(){return so}},{key:"s2",get:function(){return!1}},{key:"X4",get:function(){return!0}},{key:"Dv",get:function(){return Vi.ZE||Vi.Ga}},{key:"tit",get:function(){return!Vi.Ga}},{key:"$O",get:function(){return!0}},{key:"bv",get:function(){return!0}},{key:"Ev",get:function(){return!1}},{key:"iit",get:function(){}},{key:"eit",get:function(){return!0}},{key:"t$",get:function(){return!1}},{key:"sit",get:function(){return Vi.PE}}]),t}(),ho=function(){var t=eo();if(!t)return!1;var n=t.muted;return t.muted=!n,t.muted!==n}();!function(){if(Vi.hE)return!1;var t=eo();if(!t)return!1;var n=t.volume;t.volume=n/2+.1,t.volume}();var co=function(t){function n(n){var i;return(i=t.call(this)||this).oit=n,i.oit&&(i.hit=i.oit.hit,i.Je=i.oit.Je,i.R9=ho&&i.oit.R9),i}Rt(n,t);var i=n.prototype;return i.Ztt=function(){return this.oit?this.oit.qtt:t.prototype.Ztt.call(this)},i.nit=function(n,i){return this.oit?this.oit.nit(n,i):t.prototype.nit.call(this,n,i)},i.rit=function(n){return this.oit?this.oit.rit(n):t.prototype.rit.call(this,n)},It(n,[{key:"iit",get:function(){var t;return null==(t=this.oit)?void 0:t.iit}},{key:"eit",get:function(){var t,n;return null==(n=null==(t=this.oit)?void 0:t.eit)||n}}]),n}(fo),ao=function(t){function n(n){var i;return(i=t.call(this,n)||this).hit=!0,i.Qs=!0,i}return Rt(n,t),It(n,[{key:"Ev",get:function(){return Vi.Ga}}]),n}(co);var vo=function(t){function n(){return t.apply(this,arguments)}return Rt(n,t),n.prototype.Ztt=function(){return function(t){return t&&ct(Qr.ManagedMediaSource)?Qr.ManagedMediaSource:ct(Qr.MediaSource)?Qr.MediaSource:void 0}(!0)?t.prototype.Ztt.call(this):1},It(n,[{key:"Ev",get:function(){return!0}}]),n}(ao),lo=function(t){function n(){return t.apply(this,arguments)}return Rt(n,t),n.prototype.nit=function(n,i){return t.prototype.nit.call(this,n,i)},It(n,[{key:"s2",get:function(){return Vi.xE<3}},{key:"X4",get:function(){return Vi.xE>=3}},{key:"Jtt",get:function(){var t=this;return e.tizen&&!this.ait&&e.tizen.systeminfo.getPropertyValue("DISPLAY",(function(n){var i=n.resolutionWidth,e=n.resolutionHeight;1===i&&1===e||(t.ait={width:i,height:e})})),this.ait}},{key:"t$",get:function(){return Vi.xE<3}}]),n}(co),wo=function(t){function n(){return t.call(this)}return Rt(n,t),n}(fo),bo=function(t){function n(){return t.apply(this,arguments)}return Rt(n,t),n.prototype.nit=function(t,n){if(t&&t.uit&&n&&n.uit){var i=go(t.uit,"mp4a.40.2")&&go(n.uit,"mp4a.40.5"),e=go(t.uit,"mp4a.40.5")&&go(n.uit,"mp4a.40.2"),r=go(t.uit,"mp4a.40.2")&&go(n.uit,"mp4a.40.34"),o=go(t.uit,"mp4a.40.34")&&go(n.uit,"mp4a.40.2"),u=go(t.uit,"mp4a.40.5")&&go(n.uit,"mp4a.40.34"),s=go(t.uit,"mp4a.40.34")&&go(n.uit,"mp4a.40.5");return!(i||e||r||o||u||s)}return!0},It(n,[{key:"iit",get:function(){if(Vi.GI)return 4096}}]),n}(wo);function go(t,n){return t.indexOf(n)>-1}var mo,po=function(t){function n(){return t.apply(this,arguments)}return Rt(n,t),n.prototype.rit=function(t){return t>=2},n}(wo),yo=function(t){function n(){var n;return(n=t.call(this)||this).hit=Vi.JE>=11,n.R9=Vi.ZE&&!(Vi.Ga&&Vi.JE<10),n}return Rt(n,t),n}(wo),_o=function(t){function n(){return t.apply(this,arguments)}return Rt(n,t),It(n,[{key:"Jtt",get:function(){var t=this;return e.webOS&&!this.ait&&e.webOS.deviceInfo((function(n){t.ait={width:n.screenWidth,height:n.screenHeight}})),this.ait}},{key:"$O",get:function(){return!1}}]),n}(co),So=function(t){function n(){return t.apply(this,arguments)}return Rt(n,t),It(n,[{key:"eit",get:function(){return!Vi.WI||(Vi.DE?92!==Vi.EE:Vi.ME>=100)}}]),n}(wo),To=function(t){function n(){return t.apply(this,arguments)}return Rt(n,t),It(n,[{key:"Ev",get:function(){return!0}}]),n}(co),Eo=function(){function t(){this.git=new Io,this.vit=function(){var t=function(){if(Vi.WE)return new bo;if(Vi.BE||Vi.UE)return new po;if(Vi.ZE)return new yo;if(Vi.pE)return new So;return new wo}();return Vi.Ga?new vo(t):Vi.Qs?new ao(t):Vi.LE?new lo(t):Vi.OE?new _o(t):Vi.GI?new To(t):new co(t)}(),this.wit=ko(),self.performance&&self.performance.now?this.Kd=function(){return self.performance.now()}:this.Kd=Cn}var n=t.prototype;return n.cit=function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];Gi.apply(void 0,rt(n))},n.Qv=function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];$i.apply(void 0,rt(n))},n.dit=function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];Zi.apply(void 0,rt(n))},n.fit=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];Ji.apply(void 0,[t].concat(rt(i)))},n.$d=function(t,n){return u(t,n)},n.z$=function(t,n){return f(t,n)},n.Jd=function(t){s(t)},n.R$=function(t){h(t)},n.$x=function(){return this._it.$x()},n.Wx=function(){return this._it.Wx()},n.qx=function(){return this._it.qx()},n.Hx=function(){return this._it.Hx()},n.Gx=function(){return this._it.Gx()},n.Zx=function(t,n){return this._it.Zx(t,n)},n.Vx=function(t){return this._it.Vx(t)},n.Dh=function(t,n){var i;return void 0===n&&(n=io(Qr)),i="object"!=typeof n||n instanceof no?n:n.href,new no(t,i)},n.Uv=function(t,n){if(void 0===n&&(n=io(Qr)),this.wit){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},It(t,[{key:"WO",get:function(){return this.git}},{key:"Ys",get:function(){return this.vit}},{key:"Iv",get:function(){return{Lv:o&&o.userAgent.match(/Android /i)?"Android":"other",Sv:Boolean(o&&o.userAgent.match(/Android 8.0.0/i))}}},{key:"RV",get:function(){return self&&self.location&&"https:"===self.location.protocol}},{key:"Ait",get:function(){return"languages"in o?o.languages.slice():[o.language]}}]),t}(),Io=function(){function t(){}return It(t,[{key:"HO",get:function(){return o.oscpu}},{key:"Ys",get:function(){return o.platform}},{key:"qO",get:function(){return o.vendor}},{key:"XO",get:function(){return o.vendorSub}}]),t}();function ko(){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}function Ro(){return Ro=v.assign||function(t){for(var n=1;n<arguments.length;n++){var i=arguments[n];for(var e in i)v.prototype.hasOwnProperty.call(i,e)&&(t[e]=i[e])}return t},Ro.apply(this,arguments)}!function(t){t.Kv="9a04f079-9840-4286-ab92-e65be0885f95",t.Jv="edef8ba9-79d6-4ace-a3c8-27dcd51d21ed",t.tA="1077efec-c0b2-4d02-ace3-3c1e52e2fb4b",t.$v="94ce86fb-07ff-4f43-adb8-93d2fa968ca2"}(mo||(mo={}));var Oo,No="9a04f079-9840-4286-ab92-e65be0885f95",Po="urn:uuid:"+No,Ao="com.microsoft.playready",Do="edef8ba9-79d6-4ace-a3c8-27dcd51d21ed",Co="urn:uuid:"+Do,xo="com.widevine.alpha",Bo="1077efec-c0b2-4d02-ace3-3c1e52e2fb4b",Mo="urn:uuid:"+Bo,Lo="94ce86fb-07ff-4f43-adb8-93d2fa968ca2",Uo="urn:uuid:"+Lo,Fo="com.apple.fps.1_0";!function(t){t.Kv="playready",t.Jv="widevine",t.$v="fairplay",t.tA="clearkey",t.iA="aes128"}(Oo||(Oo={}));var zo={Rg:Oo.Kv,kb:Ao,xb:"cenc",Cb:No,Ob:Po,jb:"PlayReady"},Wo={Rg:Oo.Jv,kb:xo,xb:"cenc",Cb:Do,Ob:Co,jb:"Widevine"},qo={Rg:Oo.$v,kb:Fo,xb:"skd",Cb:Lo,Ob:Uo,jb:"FairPlay"},Vo=(Oo.$v,{Rg:Oo.tA,kb:"org.w3.clearkey",xb:"cenc",Cb:Bo,Ob:Mo,jb:"ClearKey"}),Ho=Vi.pE&&Vi.ME>=42||Vi.WE&&Vi.qE>=38||Vi.BE||Vi.FE||Vi.ib&&Vi.sb>=29;function Xo(t,n){return function(t,n){return ut(t)&&-1!==t.indexOf(n)}(t,"audio")?{initDataTypes:["cenc"],audioCapabilities:[Ro({contentType:t},n?{robustness:"SW_SECURE_CRYPTO"}:{})]}:{initDataTypes:["cenc"],videoCapabilities:[Ro({contentType:t},n?{robustness:"SW_SECURE_CRYPTO"}:{})]}}var jo,Yo=function(){function t(t){this.Xx=Pt(),this.tC=void 0,this.Jx=t}var n=t.prototype;return n.Gx=function(){return this.Vx(Wo)},n.Wx=function(){return this.Vx(Vo)},n.Hx=function(){return this.Vx(zo)},n.qx=function(){return this.Vx(qo)},n.Vx=function(t){var n=t.Ob,i=this.Xx.get(n);if(i)return i;var e=this.Zx(t,'video/mp4; codecs="avc1.42000a"');return this.Xx.set(n,e),e},n.Zx=function(t,n){var i=this;return tt((function(){return nt(this,(function(e){switch(e.label){case 0:return e.trys.push([0,2,,7]),[4,i.Jx.Kx(t.kb,[Xo(n,!0)])];case 1:return e.sent(),[2,!0];case 2:e.sent(),e.label=3;case 3:return e.trys.push([3,5,,6]),[4,i.Jx.Kx(t.kb,[Xo(n,!1)])];case 4:return e.sent(),[2,!0];case 5:return e.sent(),[2,!1];case 6:return[3,7];case 7:return[2]}}))}))()},n.$x=function(){return this.tC||(this.tC=this.iC()),this.tC},n.iC=function(){var t=this;return tt((function(){return nt(this,(function(n){switch(n.label){case 0:return"https:"===undefined.protocol?[2,!1]:Ho?[4,t.Wx()]:[2,!1];case 1:return n.sent()?[2,!1]:[2,!0]}}))}))()},t}(),Ko=["cenc"],Go=["cbcs","cbcs-1-9"],$o=function(t){function n(n){var i;return(i=t.call(this,"Pb")||this).zb=n,i}return Rt(n,t),n}(mi),Zo=function(t){function n(n,i,e,r){var o;return(o=t.call(this,"Bb")||this).zb=n,o.Rb=i,o.Bb=e,o.Ub=r,o}return Rt(n,t),n}(mi),Jo=function(t){function n(){return t.call(this,"lt")}return Rt(n,t),n}(mi);!function(t){t.Kg="Qb",t.Fb="Yb"}(jo||(jo={}));var Qo=new g([0]).buffer,tu=function(){function t(){this.Xu=[]}var n=t.prototype;return n.Vb=function(t){for(var n=0,i=this.Xu;n<i.length;n++){if(i[n][0]===t)return!0}return!1},n.Wb=function(t){for(var n=0,i=this.Xu;n<i.length;n++){var e=i[n];if(e[0]===t)return e[1]}},n.Hb=function(t,n){this.Xu.forEach((function(n){return t(n[1],n[0])}),n)},n.qb=function(t,n){this.Xu.push([t,n])},n.Xb=function(){mt(this.Xu)},It(t,[{key:"hp",get:function(){return this.Xu.length}}]),t}(),nu=function(){function t(){var t=this;this.tL=new X((function(n,i){t.Kb=n,t.$b=i}))}var n=t.prototype;return n.Zb=function(t){this.Kb&&(this.Kb(t),this.Ud())},n.Jb=function(t){this.$b&&(this.$b(t),this.Ud())},n.qd=function(){this.tL.catch(_t),this.Jb(new Jt)},n.Xd=function(t){var n=this;t.then((function(t){return n.Zb(t)}),(function(t){return n.Jb(t)}))},n.Ud=function(){this.Kb=void 0,this.$b=void 0},t}();function iu(t,n){return t===Ao?function(t){if(t.byteLength<2*eu.length)return t;var n=new DataView(t,0,2*eu.length),i=oi(n,!0);if(i===eu)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+Wn(t)+i;return function(t,n){void 0===n&&(n=!1);var i=new g(2*t.length);return ri(fi(i),new di,t,n),i}(e,!0).buffer}(t)}(n):n}var eu="<PlayReady";var ru=function(t){function n(n,i,e,r){var o;return(o=t.call(this,n,r)||this).iL=i,o.eL=e,o}return Rt(n,t),n}(Gt),ou=function(t,n){return ou=v.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)v.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])},ou(t,n)};function uu(t,n){if("function"!=typeof n&&null!==n)throw new a("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}ou(t,n),t.prototype=null===n?v.create(n):(i.prototype=n.prototype,new i)}function su(t,n,i){return t.indexOf?t.indexOf(n,i):Array.prototype.indexOf.call(t,n,i)}(function(){function t(t,n){this.sL=t,this.nL=n}t.prototype.get=function(t){var n=this.sL.get(t);if(0===this.nL||void 0===n)return n;var i=this.sL.get(t+1)||0,e=n&(1<<8-this.nL)-1,r=i>>8-this.nL;return(e<<this.nL)+r},t.prototype.getBit=function(t){if(!(t<0)){var n=this.sL.get(d.floor((t+this.nL)/8));if(void 0!==n)return(n&1<<7-this.nL-t%8)>0?1:0}},v.defineProperty(t.prototype,"bitLength",{get:function(){return this.sL.bitLength-this.nL},enumerable:!1,configurable:!0}),v.defineProperty(t.prototype,"length",{get:function(){return this.sL.length},enumerable:!1,configurable:!0})})(),d.pow(2,-52);function fu(t,n,i){return d.min(d.max(t,n),i)}function hu(t,n){return t>>8-n}function cu(t,n){return t&(1<<n)-1}var au=function(){function t(t){this.rL=t,this.hL=0,this.oL=0}return v.defineProperty(t.prototype,"totalBitsRead",{get:function(){return 8*this.hL+this.oL},enumerable:!1,configurable:!0}),v.defineProperty(t.prototype,"done",{get:function(){return this.hL===this.rL.length&&0===this.oL},enumerable:!1,configurable:!0}),v.defineProperty(t.prototype,"location",{get:function(){return{byte:this.hL,bit:this.oL}},enumerable:!1,configurable:!0}),t.prototype.copy=function(){var n=new t(this.rL);return n.seek(this.hL,this.oL),n},t.prototype.canReadBits=function(t){return 8*this.hL+t+this.oL<=8*this.rL.length},t.prototype.canReadBytes=function(t){return 0===this.oL?this.hL+t<=this.rL.length:this.hL+t<this.rL.length},t.prototype.incBit=function(){this.oL++,this.oL>7&&(this.hL++,this.oL=0)},t.prototype.seek=function(t,n){this.hL=t,this.oL=n},t.prototype.peekBit=function(){if(!this.canReadBits(1))throw new c("Cannot read past end of buffer.");return this.rL.get(this.hL)>>7-this.oL&1},t.prototype.readBit=function(){var t=this.peekBit();return this.incBit(),t},t.prototype.readByte=function(){if(!this.canReadBytes(1))throw new c("Cannot read past end of buffer.");if(0===this.oL)return this.rL.get(this.hL++);var t=cu(this.rL.get(this.hL),8-this.oL),n=hu(this.rL.get(this.hL+1),this.oL);return this.hL++,t<<this.oL|n},t.prototype.readBits=function(t){if(!this.canReadBits(t))throw new c("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 c("The max bitlength that can be provided is 32.");if(!this.canReadBits(t))throw new c("Cannot read past end of buffer.");var n=0;if(0===this.oL&&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 c("The max bitlength that can be provided is 32.");if(!this.canReadBits(t))throw new c("Cannot read past end of buffer.");var n=this.readUInt(t);return 0===(n&1<<t-1)?n:n-d.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 c("Skipping over the buffer edge is not allowed.");var n=this.oL+t;this.hL+=n>>3,this.oL=7&n},t.prototype.readBool=function(){return this.readBit()>0},t.prototype.readString=function(t){if(!this.canReadBytes(t))throw new c("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}(),vu=function(t,n){return t===n?0:t<n?-1:t>n?1:b(t)?b(n)?0:1:-1},du=function(){function t(){this.aL=[],this.uL=[],this.cL=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 c("The buffer length must be positive.");if(0!==i){if(0===this.uL.length)this.uL.push(0);else{var e=this.uL[this.uL.length-1]+this.aL[this.aL.length-1].length;this.uL.push(e)}this.aL.push(t.subarray(n,n+i)),this.cL+=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.aL;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.aL=[],this.uL=[],this.cL=0},t.prototype.get=function(t){if(!(t<0||t>=this.length)){var n=this.findContainingBufferIndex(t),i=t-this.uL[n];return this.aL[n][i]}},v.defineProperty(t.prototype,"first",{get:function(){return this.get(0)},enumerable:!1,configurable:!0}),t.prototype.indexOf=function(t){if(this.aL.length<1)return-1;if(this.aL.length>1){var n=this.join();this.clear(),this.pushRange(n)}var i=this.aL[0];return"number"==typeof t?su(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=su(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=d.ceil((e+r)/2);i(t[o],n)<=0?e=o:r=o-1}return e}}}(this.uL,t,vu)},t.prototype.join=function(){if(1===this.aL.length)return this.aL[0];var t=new g(this.length);return this.copyInternal(t,0),t},v.defineProperty(t.prototype,"length",{get:function(){return this.cL},enumerable:!1,configurable:!0}),v.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 c("Expected byteLength to be between 0 and 4 but was "+n);if(t<0||t>this.length-n)throw new c("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)*d.pow(2,8*(n-e-1));return i},t.prototype.slice=function(n,i){void 0===i&&(i=this.length);var e=fu(n,0,this.length),r=fu(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.aL[u],f=e,h=f-this.uL[u];f+s.length-h<r;)o.pushRange(s,h,s.length-h),u+=1,h=(f+=s.length-h)-this.uL[u],s=this.aL[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.aL.length-1,e=this.aL[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.aL[i]).length-1}else r-=1;n-=1}return this.slice(0,n+1)},t}(),lu=function(){function t(n){this.lL=n||t.BUFFER_CHUNK_SIZE,this.dL=!1,this.fL=new du,this.rL=new g(this.lL),this._L=0,this.gL=0,this.oL=7}return t.prototype.closeByte=function(){this.rL[this._L++]=this.gL,this._L>=this.lL&&this.closeBuffer(),this.gL=0,this.oL=7},t.prototype.closeBuffer=function(t){void 0===t&&(t=!0),0!==this._L&&(this.fL.pushRange(this.rL,0,this._L),t&&(this.rL=new g(this.lL)),this._L=0)},v.defineProperty(t.prototype,"isWritingStartBit",{get:function(){return 7===this.oL},enumerable:!1,configurable:!0}),t.prototype.close=function(){if(this.dL)throw new c("Cannot close a closed BitWriter.");return this.isWritingStartBit||this.closeByte(),this.closeBuffer(!1),this.dL=!0,this.fL},t.prototype.writeBit=function(t){if(this.dL)throw new c("Cannot write to a closed BitWriter.");this.gL|=t<<this.oL,0===this.oL?this.closeByte():this.oL--},t.prototype.writeByte=function(t){if(this.dL)throw new c("Cannot write to a closed BitWriter.");this.isWritingStartBit?(this.gL=t,this.closeByte()):this.writeByteUnaligned(t)},t.prototype.writeByteUnaligned=function(t){var n=this.oL;this.gL|=hu(t,n+1),this.closeByte(),this.gL=cu(t,8-n)<<n+1,this.oL=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.dL)throw new c("Cannot write to a closed BitWriter.");this.isWritingStartBit?this.writeBytesAligned(t):this.writeBytesUnaligned(t)},t.prototype.writeBytesAligned=function(t){this._L+t.length<=this.lL?(this.rL.set(t,this._L),this._L+=t.length,this._L===this.lL&&this.closeBuffer()):(this.closeBuffer(),this.fL.pushRange(t))},t.prototype.writeBytesUnaligned=function(t){if(0!==t.length){var n=this.oL;this.gL|=hu(t[0],n+1),this.closeByte();for(var i=1;i<t.length;i++){var e=cu(t[i-1],8-n),r=hu(t[i],n+1);this.gL=e<<n+1|r,this.closeByte()}this.gL=cu(t[t.length-1],8-n)<<n+1,this.oL=n}},t.prototype.writeUInt=function(t,n){if(t<0)throw new c("Received a negative number.");if(n>32)throw new c("The max bitlength that can be provided is 32.");if(t>=d.pow(2,n))throw new c("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 c("The max bitlength that can be provided is 32.");if(d.abs(t)>=d.pow(2,n-1))throw new c("Signed integer "+t+" cannot be represented in "+n+" bit(s).");t<0?this.writeUInt(t+d.pow(2,n),n):this.writeUInt(t,n)},t.prototype.writeExponentialGolombCode=function(t){if(t<0)throw new c("Received a negative number.");for(var n=d.floor(d.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 g(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}(),wu=function(){function t(t){this.rb=new du,this.wL=t}return t.prototype.closeWriter=function(){void 0!==this.wL&&(this.rb=this.rb.concat(this.wL.close()),this.wL=void 0)},v.defineProperty(t.prototype,"writer",{get:function(){return void 0===this.wL&&(this.wL=new lu),this.wL},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}(),bu=function(){function t(t){if(this.boxType=t,4!==t.length&&16!==t.length)throw new c("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(d.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 wu;return this.serializeCommonBoxHeader(t.writer),this.serializeBoxContent(t),t.toRangedBuffer()},t.LARGE_SIZE=d.pow(2,32),t}();function gu(t,n){return t instanceof Dn?64===n:t<d.pow(2,n)}function mu(t,n){return d.round(t*d.pow(2,n))}function pu(t,n){for(var i=0;i<n.length;i++)t.writeByte(n[i])}function yu(t,n){return t/d.pow(2,n)}var _u=function(t){function n(n,i,e){var r=t.call(this,n)||this;if(r.version=i,!gu(i,8))throw new c("the provided version cannot fit in 8 bits.");return r.flags=e,r}return uu(n,t),v.defineProperty(n.prototype,"flags",{get:function(){return this.vL},set:function(t){this.vL=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return 4},n.prototype.serializeFlags=function(t){if("number"!=typeof this.flags)throw new c("Missing custom serializeFlags method.");t.writer.writeUInt(this.flags,24)},n.prototype.serializeBoxContent=function(t){t.writer.writeByte(this.version),this.serializeFlags(t)},n}(bu),Su=function(t){function n(n,i){var e=t.call(this,n)||this;return e.data=i,e}return uu(n,t),n.prototype.getBoxContentSize=function(){return this.data.length},n.prototype.serializeBoxContent=function(t){t.concat(du.from(this.data))},n}(bu),Tu=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}();var Eu=16384;function Iu(t){var n=t.length;if(n<=Eu)return String.fromCharCode.apply(String,t);for(var i=[],e=0;e<n;e+=Eu)i.push(String.fromCharCode.apply(String,t.slice(e,e+Eu)));return i.join("")}var ku=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 Ru(t,n){var i=t.getUint8(n.offset);return n.shift(1),i}function Ou(t,n,i){var e=Bu(Lu(t),n.offset,n.offset+i);return n.shift(e.byteLength),e}function Nu(t,n,i){return n.offset+i<=t.byteLength}function Pu(t,n,i){void 0===i&&(i=!1);var e=t.getUint32(n.offset,i);return n.shift(4),e}function Au(t,n,i){void 0===i&&(i=!1);var e=Pu(t,n,i),r=Pu(t,n,i),o=i?r:e,u=i?e:r;return Dn.fromBits(u,o,!0)}function Du(t,n,i){return Iu(function(t){return[].slice.call(t)}(Ou(t,n,i)))}function Cu(t,n){var i,e=Ru(t,n);return 0==(128&e)?i=e:192==(224&e)?i=64*(31&e)+(63&Ru(t,n)):224==(240&e)?i=4096*(15&e)+64*(63&Ru(t,n))+(63&Ru(t,n)):240==(248&e)&&(i=262144*(7&e)+4096*(63&Ru(t,n))+64*(63&Ru(t,n))+(63&Ru(t,n))),i}function xu(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=Cu(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 Iu(n)}(e)}(t,n,!0)}function Bu(t,n,i){return void 0===n&&(n=0),void 0===i&&(i=t.byteLength),new g(t.buffer,t.byteOffset+n,i-n)}function Mu(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 Lu(t){return new g(t.buffer,t.byteOffset,t.byteLength)}var Uu=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 Tu(this.offset<<3)},t}(),Fu=function(){function t(t,n){this.data=t,this.cursor=n}return t.prototype.nextUint8=function(){return Ru(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 Pu(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=Pu(t,n,i),r=Pu(t,n,i),o=i?r:e,u=i?e:r;return Dn.fromBits(u,o,!1)}(this.data,this.cursor)},t.prototype.nextUint64=function(){return Au(this.data,this.cursor)},t.prototype.nextUint8Array=function(t){return Ou(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(Pu(t,n));return e}(this.data,this.cursor,t)},t.prototype.nextChars=function(t){return Du(this.data,this.cursor,t)},t.prototype.nextUTF8String=function(){return xu(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 zu(t,n){return t.type===n}var Wu=8;function qu(t){var n=function(t,n){var i=[];for(;n.offset<t.byteLength;){var e=Vu(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 c("Data incomplete");return n.boxes}function Vu(t,n){var i=n.offset,e=function(t,n){var i=n.offset;if(!Nu(t,n,Wu)){return{complete:!1,neededOffset:o=n.offset+Wu}}var e=Pu(t,n),r=Du(t,n,4);if(1===e){if(!Nu(t,n,8)){var o=n.offset+8;return n.seek(i),{complete:!1,neededOffset:o}}e=Au(t,n).toNumber()}if("uuid"===r){if(!Nu(t,n,16)){o=n.offset+16;return n.seek(i),{complete:!1,neededOffset:o}}r=Du(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 Fu(Mu(t,i,u),new Uu(r.headerSize))};return n.seek(u),{complete:!0,box:f}}function Hu(t){return{version:t>>24,flags:new ku(16777215&t)}}function Xu(t,n){var i,e,r,o;return 1===n?(i=t.nextUint64(),e=t.nextUint64(),r=t.nextUint32(),o=t.nextUint64()):(i=t.nextUint32(),e=t.nextUint32(),r=t.nextUint32(),o=t.nextUint32()),{creation:i,modification:e,scale:r,duration:o}}function ju(t){return t.skipBits(4),{isLeading:t.readUInt(2),sampleDependsOn:t.readUInt(2),sampleIsDependedOn:t.readUInt(2),sampleHasRedundancy:t.readUInt(2),samplePaddingValue:t.readUInt(3),sampleIsNonSyncSample:Boolean(t.readBit()),sampleDegradationPriority:t.readUInt(16)}}function Yu(t){var n=t.nextUint32Array(9);return{a:yu(n[0],16),b:yu(n[1],16),u:yu(n[2],30),c:yu(n[3],16),d:yu(n[4],16),v:yu(n[5],30),x:yu(n[6],16),y:yu(n[7],16),w:yu(n[8],30)}}function Ku(t){return new Su(t.type,Bu(Lu(t.data.data),t.data.cursor.offset))}var Gu=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 uu(n,t),v.defineProperty(n.prototype,"handlerType",{get:function(){return this.AL},set:function(t){this.AL=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}(_u);function $u(t){var n=t.data,i=Hu(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 Gu(o,u,e,r.raw)}!function(t){function n(){return t.call(this,"mdir")||this}uu(n,t),n.prototype.serializeReserved=function(t){t.writer.writeString("appl"),t.writer.writeUInt(0,32),t.writer.writeUInt(0,32)}}(Gu);var Zu=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()},v.defineProperty(t.prototype,"tag",{get:function(){return this.mL},set:function(t){if(!gu(t,8))throw new c("Provided tag does not fit in 8 bits.");this.mL=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}(),Ju=(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}uu(n,t),v.defineProperty(n.prototype,"objectTypeIndication",{get:function(){return this.pL},set:function(t){if(!gu(t,8))throw new c("Provided objectTypeIndication does not fit in 8 bits.");this.pL=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"streamType",{get:function(){return this.yL},set:function(t){if(!gu(t,6))throw new c("Provided streamType does not fit in 6 bits.");this.yL=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"bufferSizeDb",{get:function(){return this.ML},set:function(t){if(!gu(t,24))throw new c("Provided bufferSizeDb does not fit in 24 bits.");this.ML=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"maxBitrate",{get:function(){return this.TL},set:function(t){if(!gu(t,32))throw new c("Provided maxBitrate does not fit in 32 bits.");this.TL=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"avgBitrate",{get:function(){return this.NL},set:function(t){if(!gu(t,32))throw new c("Provided avgBitrate does not fit in 32 bits.");this.NL=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)}}}(Zu),function(t){function n(n,i){void 0===i&&(i={});var e=t.call(this,5,i.fixed28BitMode)||this;return e.data=n,e}uu(n,t),n.prototype.getDescriptorSize=function(){return this.data.length},n.prototype.serializeDescriptorContent=function(t){t.concat(du.from(this.data))}}(Zu),function(t){function n(n){void 0===n&&(n=!1);var i=t.call(this,6,n)||this;return i.predefined=2,i}return uu(n,t),n.prototype.getDescriptorSize=function(){return 1},n.prototype.serializeDescriptorContent=function(t){t.writer.writeByte(this.predefined)},n}(Zu)),Qu=(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 Ju(r.fixed28BitMode),o}uu(n,t),v.defineProperty(n.prototype,"streamDependenceFlag",{get:function(){return void 0!==this.dependsOnEsId},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"urlFlag",{get:function(){return void 0!==this.urlString},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"ocrStreamFlag",{get:function(){return void 0!==this.ocrEsId},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"esId",{get:function(){return this.DL},set:function(t){if(!gu(t,16))throw new c("Provided esId does not fit in 16 bits.");this.DL=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"streamPriority",{get:function(){return this.SL},set:function(t){if(!gu(t,5))throw new c("Provided streamPriority does not fit in 5 bits.");this.SL=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"dependsOnEsId",{get:function(){return this.IL},set:function(t){if(t&&!gu(t,16))throw new c("Provided dependsOnEsId does not fit in 16 bits.");this.IL=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"ocrEsId",{get:function(){return this.EL},set:function(t){if(t&&!gu(t,16))throw new c("Provided ocrEsId does not fit in 16 bits.");this.EL=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)}}(Zu),function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n.boxes=[],n}return uu(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}(bu)),ts=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return uu(n,t),n.prototype.serializeBoxContent=function(t){},n.prototype.getBoxContentSize=function(){return 0},n}(Qu),ns=function(t){function n(n,i){var e=t.call(this,n)||this;return e.dataReferenceIndex=i,e}return uu(n,t),v.defineProperty(n.prototype,"dataReferenceIndex",{get:function(){return this.bL},set:function(t){if(!gu(t,16))throw new c("Provided dataReferenceIndex does not fit in 16 bits.");this.bL=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}(ts),is=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 uu(n,t),v.defineProperty(n.prototype,"channelCount",{get:function(){return this.LL},set:function(t){if(!gu(t,16))throw new c("Provided channelCount does not fit in 16 bits.");this.LL=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"sampleSize",{get:function(){return this.kL},set:function(t){if(!gu(t,16))throw new c("Provided sampleSize does not fit in 16 bits.");this.kL=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"sampleRate",{get:function(){return this.xL},set:function(t){if(!gu(mu(t,16),32))throw new c("Provided rate does not fit in 32 bits (fixed 16.16).");this.xL=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(mu(this.sampleRate,16),32),this.extra&&pu(n.writer,this.extra)},n}(ns),es=(function(t){function n(n){var i=t.call(this,"stco",0,0)||this;return i.entries=n,i}uu(n,t),v.defineProperty(n.prototype,"entries",{get:function(){return this.CL},set:function(t){if(!gu(t.length,32))throw new c("Number of allowed entries cannot fit in 32 bits.");if(t.some((function(t){return!gu(t,32)})))throw new c("Not all entries can be represented in 32 bits.");this.CL=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)}}}(_u),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}uu(n,t),v.defineProperty(n.prototype,"cleanApertureWidthN",{get:function(){return this.OL},set:function(t){if(!gu(t,32))throw new c("Provided cleanApertureWidthN does not fit in 32 bits.");this.OL=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"cleanApertureWidthD",{get:function(){return this.jL},set:function(t){if(!gu(t,32))throw new c("Provided cleanApertureWidthD does not fit in 32 bits.");this.jL=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"cleanApertureHeightN",{get:function(){return this.PL},set:function(t){if(!gu(t,32))throw new c("Provided cleanApertureHeightN does not fit in 32 bits.");this.PL=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"cleanApertureHeightD",{get:function(){return this.zL},set:function(t){if(!gu(t,32))throw new c("Provided cleanApertureHeightD does not fit in 32 bits.");this.zL=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"horizOffN",{get:function(){return this.BL},set:function(t){if(!gu(t,32))throw new c("Provided horizOffN does not fit in 32 bits.");this.BL=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"horizOffD",{get:function(){return this.RL},set:function(t){if(!gu(t,32))throw new c("Provided horizOffD does not fit in 32 bits.");this.RL=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"vertOffN",{get:function(){return this.UL},set:function(t){if(!gu(t,32))throw new c("Provided vertOffN does not fit in 32 bits.");this.UL=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"vertOffD",{get:function(){return this.QL},set:function(t){if(!gu(t,32))throw new c("Provided vertOffD does not fit in 32 bits.");this.QL=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)}}(bu),function(t){function n(n,i){var e=t.call(this,"ctts",n,0)||this;return e.entries=i,e}uu(n,t),v.defineProperty(n.prototype,"entries",{get:function(){return this.CL},set:function(t){if(!gu(t.length,32))throw new c("Number of allowed entries cannot fit in 32 bits.");if(t.some((function(t){return!gu(t.sampleCount,32)||!gu(t.sampleOffset,32)})))throw new c("Not all entries can be represented in 64 bits.");this.CL=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)}}}(_u),function(t){function n(n){var i=t.call(this,"url ",0,void 0===n?1:0)||this;return i.location=n,i}uu(n,t),v.defineProperty(n.prototype,"location",{get:function(){return this.FL},set:function(t){this.flags=void 0===t?1:0,this.FL=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))}}(_u),function(t){function n(n,i,e){var r=t.call(this,"urn ",0,e)||this;return r.name=n,r.location=i,r}uu(n,t),v.defineProperty(n.prototype,"location",{get:function(){return this.FL},set:function(t){if(1&this.flags)throw new c("The moov containment flag is set, a DataEntryUrlBox should be used instead.");this.FL=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))}}(_u),function(t){function n(){return t.call(this,"dinf")||this}uu(n,t)}(ts),function(t){function n(n,i,e){var r=t.call(this,n)||this;if(r.version=i,!gu(i,8))throw new c("the provided version cannot fit in 8 bits.");return r.flags=e,r}return uu(n,t),v.defineProperty(n.prototype,"flags",{get:function(){return this.vL},set:function(t){this.vL=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return 4},n.prototype.serializeFlags=function(t){if("number"!=typeof this.flags)throw new c("Missing custom serializeFlags method.");t.writer.writeUInt(this.flags,24)},n.prototype.serializeBoxContent=function(t){t.writer.writeByte(this.version),this.serializeFlags(t)},n}(Qu)),rs=(function(t){function n(){return t.call(this,"dref",0,0)||this}uu(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)}}(es),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 uu(n,t),v.defineProperty(n.prototype,"bitSize",{get:function(){return 0===this.version?32:64},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"entries",{get:function(){return this.CL},set:function(t){for(var n=0,i=t;n<i.length;n++){var e=i[n];if(!gu(e.segmentDuration,this.bitSize))throw new c("SegmentDuration of one of the entries does not fit in ".concat(this.bitSize," bits."));if(!gu(e.mediaTime,this.bitSize))throw new c("MediaTime of one of the entries does not fit in ".concat(this.bitSize," bits."));if(!gu(e.mediaRateInteger,16))throw new c("Provided mediaRateInteger does not fit in 16 bits.");if(e.mediaRateFraction&&!gu(e.mediaRateFraction,16))throw new c("Provided mediaRateFraction does not fit in 16 bits.")}this.CL=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}(_u)),os=function(t){function n(n,i){return void 0===i&&(i=0),t.call(this,n,0,i)||this}return uu(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}(rs),us=function(t){function n(n,i){return void 0===i&&(i=0),t.call(this,n,1,i)||this}return uu(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}(rs);function ss(t){for(var n=t.data,i=Hu(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 os(u,r.raw):new us(u,r.raw)}var fs=function(t){function n(){return t.call(this,"edts")||this}return uu(n,t),n}(ts);function hs(t){for(var n=new fs,i=0,e=qu(t.data);i<e.length;i++){var r=e[i];zu(r,"elst")?n.boxes.push(ss(r)):n.boxes.push(Ku(r))}return n}var cs=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 uu(n,t),v.defineProperty(n.prototype,"majorBrand",{get:function(){return this.YL},set:function(t){if(4!==t.length)throw new c("the provided major brand does not conform to the 4 character requirement");this.YL=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"minorVersion",{get:function(){return this.GL},set:function(t){if(!gu(t,32))throw new c("the provided minor version does not fit in 32 bits.");this.GL=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"compatibleBrands",{get:function(){return this.VL},set:function(t){if(t.some((function(t){return 4!==t.length})))throw new c("Some of the compatible brands do not conform to the 4 character requirement");this.VL=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}(bu),as=(function(t){function n(n,i,e){return t.call(this,"ftyp",n,i,e)||this}uu(n,t)}(cs),function(t){function n(n,i){void 0===i&&(i="free");var e=t.call(this,i)||this;return e.data=n,e}uu(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(du.from(this.data))}}(bu),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 uu(n,t),v.defineProperty(n.prototype,"creationTime",{get:function(){return this.WL},set:function(t){if(!gu(t,this.bitSize))throw new c("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.WL=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"modificationTime",{get:function(){return this.HL},set:function(t){if(!gu(t,this.bitSize))throw new c("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.HL=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"timescale",{get:function(){return this.qL},set:function(t){if(!gu(t,32))throw new c("Provided sequence number does not fit in 32 bits.");this.qL=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"duration",{get:function(){return this.XL},set:function(t){if(!gu(t,this.bitSize))throw new c("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.XL=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"language",{get:function(){return this.ZL},set:function(t){if(!ws(t))throw new c("Expected an ISO-639-2/T language code");this.ZL=t},enumerable:!1,configurable:!0}),v.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}(_u)),vs=function(t){function n(n,i,e){return void 0===e&&(e=0),t.call(this,n,i,0,e)||this}return uu(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}(as),ds=function(t){function n(n,i,e){return void 0===e&&(e=0),t.call(this,n,i,1,e)||this}return uu(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}(as);function ls(t){var n=t.data,i=Hu(n.nextUint32()),e=i.version,r=i.flags,o=Xu(n,e),u=new au(du.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 ws(h)||(h="und"),n.skip(2),0===e?new vs(o,h,r.raw):new ds(o,h,r.raw)}function ws(t){return/^[a-z]{3}$/.test(t)}var bs=function(t){function n(){return t.call(this,"mdia")||this}return uu(n,t),n}(ts);function gs(t){for(var n=new bs,i=0,e=qu(t.data);i<e.length;i++){var r=e[i];zu(r,"mdhd")?n.boxes.push(ls(r)):zu(r,"hdlr")?n.boxes.push($u(r)):n.boxes.push(Ku(r))}return n}var ms;(function(t){function n(){var n=t.call(this,"mdat")||this;return n.data=new du,n}uu(n,t),n.prototype.getBoxContentSize=function(){return this.data.length},n.prototype.serializeBoxContent=function(t){t.concat(this.data)}})(bu),function(t){function n(){return t.call(this,"minf")||this}uu(n,t)}(ts),function(t){function n(n){var i=t.call(this,"meta",0,0)||this;return i.handler=n,i}uu(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())}}(es);!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"}(ms||(ms={}));var ps,ys,_s={a:1,b:0,u:0,c:0,d:1,v:0,x:0,y:0,w:1};function Ss(t,n){n.writer.writeUInt(mu(t.a,16),32),n.writer.writeUInt(mu(t.b,16),32),n.writer.writeUInt(mu(0,30),32),n.writer.writeUInt(mu(t.c,16),32),n.writer.writeUInt(mu(t.d,16),32),n.writer.writeUInt(mu(0,30),32),n.writer.writeUInt(mu(t.x,16),32),n.writer.writeUInt(mu(t.y,16),32),n.writer.writeUInt(mu(1,30),32)}function Ts(t,n){var i,e,r,o;n.writer.writeUInt(null!==(i=t.isLeading)&&void 0!==i?i:ps.UNKNOWN,2),n.writer.writeUInt(null!==(e=t.sampleDependsOn)&&void 0!==e?e:ys.UNKNOWN,2),n.writer.writeUInt(null!==(r=t.sampleIsDependedOn)&&void 0!==r?r:ys.UNKNOWN,2),n.writer.writeUInt(null!==(o=t.sampleHasRedundancy)&&void 0!==o?o:ys.UNKNOWN,2)}function Es(t,n){var i,e,r;n.writer.writeUInt(0,4),Ts(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)}!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"}(ps||(ps={})),function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.YES=1]="YES",t[t.NO=2]="NO",t[t.RESERVED=3]="RESERVED"}(ys||(ys={}));var Is=function(){},ks=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 uu(n,t),v.defineProperty(n.prototype,"systemId",{get:function(){return this.KL},set:function(t){if(16!==t.length)throw new c("Provided systemId length is not 16.");this.KL=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"data",{get:function(){return this.JL},set:function(t){if(!gu(t.length,32))throw new c("Provided data length does not fit in 32 bits.");this.JL=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(du.from(this.systemId)),this.serializeVersionBoxContent(n),n.writer.writeUInt(this.data.length,32),n.concat(du.from(this.data))},n}(_u),Rs=function(t){function n(n,i){return t.call(this,0,n,i)||this}return uu(n,t),n}(ks),Os=function(t){function n(n,i,e){var r=t.call(this,1,n,i)||this;return r.kIds=e,r}return uu(n,t),v.defineProperty(n.prototype,"kIds",{get:function(){return this.$L},set:function(t){if(!gu(t.length,32))throw new c("Provided kIds length cannot fit in 32 bits.");if(t.some((function(t){return 16!==t.length})))throw new c("Not all provided key ids are 16 bytes long.");this.$L=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(du.from(e))}},n}(ks);function Ns(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 Os(i,s,e):new Rs(i,s)}var Ps=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 uu(n,t),v.defineProperty(n.prototype,"bitSize",{get:function(){return 0===this.version?32:64},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"fragmentDuration",{get:function(){return this.ek},set:function(t){if(!gu(t,this.bitSize))throw new c("The provided fragmentDuration does not fit in ".concat(this.bitSize," bits."));this.ek=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.bitSize/8},n}(_u),As=function(t){function n(n,i){return void 0===i&&(i=0),t.call(this,n,0,i)||this}return uu(n,t),n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.fragmentDuration,32)},n}(Ps),Ds=function(t){function n(n,i){return void 0===i&&(i=0),t.call(this,n,1,i)||this}return uu(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}(Ps);function Cs(t){var n=t.data,i=Hu(n.nextUint32()),e=i.version,r=i.flags;return 0===e?new As(n.nextUint32(),r.raw):new Ds(n.nextUint64(),r.raw)}var xs=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 uu(n,t),v.defineProperty(n.prototype,"trackId",{get:function(){return this.nk},set:function(t){if(!gu(t,32))throw new c("Provided track id does not fit in 32 bits.");this.nk=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"defaultSampleDescriptionIndex",{get:function(){return this.rk},set:function(t){if(!gu(t,32))throw new c("Provided default sample description index does not fit in 32 bits.");this.rk=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"defaultSampleDuration",{get:function(){return this.hk},set:function(t){if(!gu(t,32))throw new c("Provided default sample duration does not fit in 32 bits.");this.hk=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"defaultSampleSize",{get:function(){return this.ck},set:function(t){if(!gu(t,32))throw new c("Provided default sample size does not fit in 32 bits.");this.ck=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"defaultSampleFlags",{get:function(){return this.lk},set:function(t){if((null==t?void 0:t.samplePaddingValue)&&!gu(t.samplePaddingValue,3))throw new c("Provided sample padding value does not fit in 3 bits.");if((null==t?void 0:t.sampleDegradationPriority)&&!gu(t.sampleDegradationPriority,16))throw new c("Provided sample degradation priority does not fit in 16 bits.");this.lk=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),Es(null!==(i=this.defaultSampleFlags)&&void 0!==i?i:{},n)},n}(_u);function Bs(t){var n=t.data,i=Hu(n.nextUint32()),e=i.version,r=i.flags,o=n.nextUint32(),u=n.nextUint32(),s=n.nextUint32(),f=n.nextUint32(),h=ju(new au(du.from(n.nextUint8Array(4))));return new xs(o,{sampleDescriptionIndex:u,sampleDuration:s,sampleSize:f,sampleFlags:h},e,r.raw)}var Ms=function(t){function n(){return t.call(this,"mvex")||this}return uu(n,t),n}(ts);function Ls(t){for(var n=new Ms,i=0,e=qu(t.data);i<e.length;i++){var r=e[i];zu(r,"mehd")?n.boxes.push(Cs(r)):zu(r,"trex")?n.boxes.push(Bs(r)):n.boxes.push(Ku(r))}return n}var Us=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:_s,c.dk=e,c}return uu(n,t),v.defineProperty(n.prototype,"bitSize",{get:function(){return 0===this.version?32:64},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"creationTime",{get:function(){return this.WL},set:function(t){if(!gu(t,this.bitSize))throw new c("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.WL=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"modificationTime",{get:function(){return this.HL},set:function(t){if(!gu(t,this.bitSize))throw new c("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.HL=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"timescale",{get:function(){return this.qL},set:function(t){if(!gu(t,32))throw new c("Provided sequence number does not fit in 32 bits.");this.qL=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"duration",{get:function(){return this.XL},set:function(t){if(!gu(t,this.bitSize))throw new c("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.XL=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"rate",{get:function(){return this.fk},set:function(t){if(!gu(mu(t,16),32))throw new c("Provided rate does not fit in 32 bits (fixed 16.16).");this.fk=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"volume",{get:function(){return this._k},set:function(t){if(!gu(mu(t,8),16))throw new c("Provided volume does not fit in 16 bits (fixed 8.8).");this._k=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"matrix",{get:function(){return this.gk},set:function(t){if(0!==t.u||0!==t.v||1!==t.w)throw new c("(u, v, w) does not match the required (0, 0, 1)");this.gk=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"nextTrackId",{get:function(){return this.dk},set:function(t){if(0===t)throw new c("NextTrackId cannot be 0.");if(!gu(t,32))throw new c("NextTrackId cannot exceed 32 bits.");this.dk=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(mu(this.rate,16),32),n.writer.writeUInt(mu(this.volume,8),16),n.writer.writeUInt(0,16),n.writer.writeUInt(0,32),n.writer.writeUInt(0,32),Ss(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}(_u),Fs=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 uu(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}(Us),zs=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 uu(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}(Us);function Ws(t){var n=t.data,i=Hu(n.nextUint32()),e=i.version,r=i.flags,o=Xu(n,e),u=yu(n.nextUint32(),16),s=yu(n.nextUint16(),8);n.skip(2),n.skip(8);var f=Yu(n);n.skip(24);var h=n.nextUint32();return 0===e?new Fs(o,h,{rate:u,volume:s,matrix:f},r.raw):new zs(o,h,{rate:u,volume:s,matrix:f},r.raw)}var qs=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:_s,a}return uu(n,t),v.defineProperty(n.prototype,"bitSize",{get:function(){return 0===this.version?32:64},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"creationTime",{get:function(){return this.WL},set:function(t){if(!gu(t,this.bitSize))throw new c("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.WL=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"modificationTime",{get:function(){return this.HL},set:function(t){if(!gu(t,this.bitSize))throw new c("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.HL=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"trackId",{get:function(){return this.nk},set:function(t){if(0===t)throw new c("trackId cannot be 0.");if(!gu(t,32))throw new c("trackId cannot exceed 32 bits.");this.nk=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"duration",{get:function(){return this.XL},set:function(t){if(!gu(t,this.bitSize))throw new c("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.XL=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"volume",{get:function(){return this._k},set:function(t){if(!gu(mu(t,8),16))throw new c("Provided volume does not fit in 16 bits (fixed 8.8).");this._k=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"width",{get:function(){return this.wk},set:function(t){if(!gu(mu(t,16),32))throw new c("Provided width does not fit in 32 bits (fixed 16.16).");this.wk=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"height",{get:function(){return this.vk},set:function(t){if(!gu(mu(t,16),32))throw new c("Provided height does not fit in 32 bits (fixed 16.16).");this.vk=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"layer",{get:function(){return this.Ak},set:function(t){if(!gu(t,16))throw new c("Provided layer does not fit in 16 bits.");this.Ak=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"alternateGroup",{get:function(){return this.pk},set:function(t){if(!gu(t,16))throw new c("Provided alternateGroup does not fit in 16 bits.");this.pk=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"matrix",{get:function(){return this.gk},set:function(t){if(0!==t.u||0!==t.v||1!==t.w)throw new c("(u, v, w) does not match the required (0, 0, 1)");this.gk=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(mu(this.volume,8),16),n.writer.writeUInt(0,16),Ss(this.matrix,n),n.writer.writeUInt(mu(this.width,16),32),n.writer.writeUInt(mu(this.height,16),32)},n}(_u),Vs=function(t){function n(n,i,e,r,o,u){return t.call(this,0,n,i,e,r,o,u)||this}return uu(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}(qs),Hs=function(t){function n(n,i,e,r,o,u){return t.call(this,1,n,i,e,r,o,u)||this}return uu(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}(qs);function Xs(t){var n,i,e,r,o=t.data,u=Hu(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=yu(o.nextInt16(),8);o.skip(2);var b=Yu(o),g=yu(o.nextUint32(),16),m=yu(o.nextUint32(),16);return 0===s?new Vs({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 Hs({creation:n,modification:i,duration:r},e,w,g,m,{layer:d,matrix:b,alternateGroup:l,trackSizeIsAspectRatio:h,trackEnabled:v,trackInPreview:c,trackInMovie:a})}var js=function(t){function n(){return t.call(this,"trak")||this}return uu(n,t),n}(ts);function Ys(t){for(var n=new js,i=0,e=qu(t.data);i<e.length;i++){var r=e[i];zu(r,"tkhd")?n.boxes.push(Xs(r)):zu(r,"mdia")?n.boxes.push(gs(r)):zu(r,"edts")?n.boxes.push(hs(r)):n.boxes.push(Ku(r))}return n}var Ks=function(t){function n(){return t.call(this,"moov")||this}return uu(n,t),n}(ts);var Gs=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 uu(n,t),v.defineProperty(n.prototype,"bitSize",{get:function(){return 0===this.version?32:64},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"baseMediaDecodeTime",{get:function(){return this.yk},set:function(t){if(!gu(t,this.bitSize))throw new c("Provided baseMediaDecodeTime does not fit in ".concat(this.bitSize," bits."));this.yk=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.bitSize/8},n}(_u),$s=function(t){function n(n,i){return void 0===i&&(i=0),t.call(this,n,0,i)||this}return uu(n,t),n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),n.writer.writeUInt(this.baseMediaDecodeTime,32)},n}(Gs),Zs=function(t){function n(n,i){return void 0===i&&(i=0),t.call(this,n,1,i)||this}return uu(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}(Gs);function Js(t){var n=t.data,i=Hu(n.nextUint32()),e=i.version,r=i.flags;return 0===e?new $s(n.nextUint32(),r.raw):new Zs(n.nextUint64(),r.raw)}var Qs=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 uu(n,t),v.defineProperty(n.prototype,"trackId",{get:function(){return this.nk},set:function(t){if(!gu(t,32))throw new c("Provided track id does not fit in 32 bits.");this.nk=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"baseDataOffset",{get:function(){return this.Mk},set:function(t){if(void 0===t&&this.flags.baseDataOffsetPresent)throw new c("The base data offset present flag is set.");if(void 0!==t&&!this.flags.baseDataOffsetPresent)throw new c("The base data offset present flag is not set.");if(t&&!gu(t,64))throw new c("Provided baseDataOffset does not fit in 32 bits.");this.Mk=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"sampleDescriptionIndex",{get:function(){return this.Tk},set:function(t){if(void 0===t&&this.flags.sampleDescriptionIndexPresent)throw new c("The sample description index flag is set.");if(void 0!==t&&!this.flags.sampleDescriptionIndexPresent)throw new c("The sample description index flag is not set.");if(t&&!gu(t,32))throw new c("Provided sampleDescriptionIndex does not fit in 32 bits.");this.Tk=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"defaultSampleDuration",{get:function(){return this.hk},set:function(t){if(void 0===t&&this.flags.defaultSampleDurationPresent)throw new c("The default sample duration present flag is set.");if(void 0!==t&&!this.flags.defaultSampleDurationPresent)throw new c("The default sample duration present flag is not set.");if(t&&!gu(t,32))throw new c("Provided defaultSampleDuration does not fit in 32 bits.");this.hk=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"defaultSampleSize",{get:function(){return this.ck},set:function(t){if(void 0===t&&this.flags.defaultSampleSizePresent)throw new c("The default sample size present flag is set.");if(void 0!==t&&!this.flags.defaultSampleSizePresent)throw new c("The default sample size present flag is not set.");if(t&&!gu(t,32))throw new c("Provided defaultSampleSize does not fit in 32 bits.");this.ck=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"defaultSampleFlags",{get:function(){return this.lk},set:function(t){if(void 0===t&&this.flags.defaultSampleFlagsPresent)throw new c("The default sample flags present flag is set.");if(void 0!==t&&!this.flags.defaultSampleFlagsPresent)throw new c("The default sample flags present flag is not set.");if((null==t?void 0:t.samplePaddingValue)&&!gu(t.samplePaddingValue,3))throw new c("Provided sample padding value does not fit in 3 bits.");if((null==t?void 0:t.sampleDegradationPriority)&&!gu(t.sampleDegradationPriority,16))throw new c("Provided sample degradation priority does not fit in 16 bits.");this.lk=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&&Es(this.defaultSampleFlags,n)},n}(_u);function tf(t){var n=t.data,i=n.nextUint8(),e=new au(du.from(n.nextUint8Array(3)));e.skipBits(6);var r=Boolean(e.readBit()),o=Boolean(e.readBit());e.skipBits(10);var u=Boolean(e.readBit()),s=Boolean(e.readBit()),f=Boolean(e.readBit());e.skipBits(1);var h=Boolean(e.readBit()),c=Boolean(e.readBit()),a=n.nextUint32(),v=c?n.nextUint64():void 0,d=h?n.nextUint32():void 0,l=f?n.nextUint32():void 0,w=s?n.nextUint32():void 0,b=u?ju(new au(du.from(n.nextUint8Array(4)))):void 0;return new Qs({trackId:a,defaultBaseIsMoof:r,durationIsEmpty:o,baseDataOffset:v,sampleDescriptionIndex:d,defaultSampleDuration:l,defaultSampleSize:w,defaultSampleFlags:b},i)}var nf=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 uu(n,t),v.defineProperty(n.prototype,"dataOffset",{get:function(){return this.Nk},set:function(t){if(t&&!gu(t,32))throw new c("Provided data offset does not fit in 32 bits.");this.Nk=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"firstSampleFlags",{get:function(){return this.Dk},set:function(t){if((null==t?void 0:t.samplePaddingValue)&&!gu(t.samplePaddingValue,3))throw new c("Provided sample padding value does not fit in 3 bits.");if((null==t?void 0:t.sampleDegradationPriority)&&!gu(t.sampleDegradationPriority,16))throw new c("Provided sample degradation priority does not fit in 16 bits.");this.Dk=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"samples",{get:function(){return this.Sk},set:function(t){var n,i;if(!gu(t.length,32))throw new c("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 c("The sample duration present flag is set.");if(void 0!==o.duration&&!this.flags.sampleDurationPresent)throw new c("The sample duration present flag is not set.");if(o.duration&&!gu(o.duration,32))throw new c("Provided sample duration does not fit in 32 bits.");if(void 0===o.size&&this.flags.sampleSizePresent)throw new c("The sample size present flag is set.");if(void 0!==o.size&&!this.flags.sampleSizePresent)throw new c("The sample size present flag is not set.");if(o.size&&!gu(o.size,32))throw new c("Provided sample size does not fit in 32 bits.");if(void 0===o.flags&&this.flags.sampleFlagsPresent)throw new c("The sample flags present flag is set.");if(void 0!==o.flags&&!this.flags.sampleFlagsPresent)throw new c("The sample flags present flag is not set.");if((null===(n=o.flags)||void 0===n?void 0:n.samplePaddingValue)&&!gu(o.flags.samplePaddingValue,3))throw new c("Provided sample padding value does not fit in 3 bits.");if((null===(i=o.flags)||void 0===i?void 0:i.sampleDegradationPriority)&&!gu(o.flags.sampleDegradationPriority,16))throw new c("Provided sample degradation priority does not fit in 16 bits.");if(void 0===o.compositionTimeOffset&&this.flags.sampleCompositionTimeOffsetsPresent)throw new c("The sample compositionTimeOffset present flag is set.");if(void 0!==o.compositionTimeOffset&&!this.flags.sampleCompositionTimeOffsetsPresent)throw new c("The sample compositionTimeOffset present flag is not set.");if(o.compositionTimeOffset&&!gu(o.compositionTimeOffset,32))throw new c("Provided sample compositionTimeOffset does not fit in 32 bits.")}this.Sk=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&&Es(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&&Es(r.flags,n),this.flags.sampleCompositionTimeOffsetsPresent&&(0===this.version?n.writer.writeUInt(r.compositionTimeOffset,32):n.writer.writeInt(r.compositionTimeOffset,32))}},n}(_u);function ef(t){var n=t.data,i=n.nextUint8(),e=new au(du.from(n.nextUint8Array(3)));e.skipBits(12);var r=Boolean(e.readBit()),o=Boolean(e.readBit()),u=Boolean(e.readBit()),s=Boolean(e.readBit());e.skipBits(5);var f=Boolean(e.readBit());e.skipBits(1);var h=Boolean(e.readBit()),c=n.nextUint32(),a={sampleDurationPresent:s,sampleSizePresent:u,sampleFlagsPresent:o,sampleCompositionTimeOffsetsPresent:r};h&&(a.dataOffset=n.nextInt32()),f&&(a.firstSampleFlags=ju(new au(du.from(n.nextUint8Array(4)))));for(var v=[],d=0;d<c;d++){var l={};s&&(l.duration=n.nextUint32()),u&&(l.size=n.nextUint32()),o&&(l.flags=ju(new au(du.from(n.nextUint8Array(4))))),r&&(l.compositionTimeOffset=0===i?n.nextUint32():n.nextInt32()),v.push(l)}return new nf(i,a,v)}var rf=function(t){function n(){return t.call(this,"traf")||this}return uu(n,t),n}(ts);function of(t){for(var n=new rf,i=0,e=qu(t.data);i<e.length;i++){var r=e[i];zu(r,"tfhd")?n.boxes.push(tf(r)):zu(r,"tfdt")?n.boxes.push(Js(r)):zu(r,"trun")?n.boxes.push(ef(r)):n.boxes.push(Ku(r))}return n}var uf=function(t){function n(){return t.call(this,"moof")||this}return uu(n,t),n}(ts);!function(t){function n(n){var i=t.call(this,"mfhd",0,0)||this;return i.sequenceNumber=n,i}uu(n,t),v.defineProperty(n.prototype,"sequenceNumber",{get:function(){return this.Ik},set:function(t){if(!gu(t,32))throw new c("Provided sequence number does not fit in 32 bits.");this.Ik=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)}}(_u);var sf=function(t){function n(n){var i=t.call(this,"frma")||this;return i.codingName=n,i}return uu(n,t),v.defineProperty(n.prototype,"codingName",{get:function(){return this.Ek},set:function(t){if(4!==t.length)throw new c("Provided coding name was not 4 characters long.");this.Ek=t},enumerable:!1,configurable:!0}),n.prototype.getBoxContentSize=function(){return 4},n.prototype.serializeBoxContent=function(t){t.writer.writeString(this.codingName)},n}(bu),ff=(function(t){function n(n,i){var e=t.call(this,"pasp")||this;return e.hSpacing=n,e.vSpacing=i,e}uu(n,t),v.defineProperty(n.prototype,"hSpacing",{get:function(){return this.bk},set:function(t){if(!gu(t,32))throw new c("Provided hSpacing does not fit in 32 bits.");this.bk=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"vSpacing",{get:function(){return this.Lk},set:function(t){if(!gu(t,32))throw new c("Provided vSpacing does not fit in 32 bits.");this.Lk=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)}}(bu),function(t){function n(n,i,e){var r=t.call(this,n)||this;return r.sample=i,r.sinf=e,r}uu(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())}}(ts),function(t){function n(n,i,e){var r=t.call(this,"sinf")||this;return r.schm=i,r.schi=e,r.frma=new sf(n),r}uu(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())}}(bu),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 uu(n,t),v.defineProperty(n.prototype,"bitSize",{get:function(){return 0===this.version?32:64},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"entries",{get:function(){return this.CL},set:function(t){var n=this;if(!gu(t.length,32))throw new c("Number of entries provided does not fit in 32 bits.");if(t.some((function(t){return!gu(t,n.bitSize)})))throw new c("Not all provided entries fit in ".concat(this.bitSize," bits."));this.CL=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"explicitAuxInfoType",{get:function(){return this.xk},set:function(t){if(void 0===t)this.flags=0;else{if(!gu(t.auxInfoType,32))throw new c("Provided auxInfoType does not fit in 32 bits.");if(!gu(t.auxInfoTypeParameter,32))throw new c("Provided auxInfoTypeParameter does not fit in 32 bits.");this.flags=1}this.xk=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}(_u)),hf=(function(t){function n(){return null!==t&&t.apply(this,arguments)||this}uu(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)}}}(ff),function(t){function n(){return null!==t&&t.apply(this,arguments)||this}uu(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)}}}(ff),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}uu(n,t),v.defineProperty(n.prototype,"defaultSampleInfoSize",{get:function(){return this.Ck},set:function(t){if(!gu(t,8))throw new c("Provided defaultSampleInfoSize does not fit in a single byte.");this.Ck=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"sampleInfoSizes",{get:function(){return this.Ok},set:function(t){if(!gu(t.length,32))throw new c("Number of sampleInfoSizes provided does not fit in 32 bits.");if(t.some((function(t){return!gu(t,8)})))throw new c("Not all provided sampleInfoSizes fit in a byte.");this.Ok=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"explicitAuxInfoType",{get:function(){return this.xk},set:function(t){if(void 0===t)this.flags=0;else{if(!gu(t.auxInfoType,32))throw new c("Provided auxInfoType does not fit in 32 bits.");if(!gu(t.auxInfoTypeParameter,32))throw new c("Provided auxInfoTypeParameter does not fit in 32 bits.");this.flags=1}this.xk=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 c("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)}}}(_u),function(t){function n(n){var i=t.call(this,"sdtp",0,0)||this;return i.samples=n,i}uu(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++){Ts(e[i],n)}}}(_u),function(t){function n(n){return t.call(this,"stsd",n,0)||this}uu(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)}}(es),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 uu(n,t),v.defineProperty(n.prototype,"groupingType",{get:function(){return this.jk},set:function(t){if(4!==t.length)throw new c("The provided groupingType does not equal 4 characters.");this.jk=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}(_u)),cf=(function(t){function n(n,i){return t.call(this,0,n,i)||this}uu(n,t),n.prototype.serializeVersionBoxContent=function(t){}}(hf),function(t){function n(n,i,e){var r=t.call(this,1,n,e)||this;return r.defaultLength=i,r}uu(n,t),v.defineProperty(n.prototype,"defaultLength",{get:function(){return this.Pk},set:function(t){if(!gu(t,32))throw new c("The provided defaultLength does not fit in 32 bits.");this.Pk=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)}}(hf),function(t){function n(n,i,e,r){void 0===r&&(r=0);var o=this;if(n<2)throw new c("This constructor is only meant for versions 2 and up.");return(o=t.call(this,n,i,e)||this).defaultSampleDescriptionIndex=r,o}uu(n,t),v.defineProperty(n.prototype,"defaultSampleDescriptionIndex",{get:function(){return this.rk},set:function(t){if(!gu(t,32))throw new c("The provided defaultSampleDescriptionIndex does not fit in 32 bits.");this.rk=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)}}(hf),function(t){function n(n){void 0===n&&(n=[]);var i=t.call(this,"stsz",0,0)||this;return i.sampleSizes=n,i}uu(n,t),v.defineProperty(n.prototype,"sampleSizes",{get:function(){return this.zk},set:function(t){if(!gu(t.length,32))throw new c("Number of allowed samples cannot fit in 32 bits.");if(t.some((function(t){return!gu(t,32)})))throw new c("Not all sampleSizes can be represented in 32 bits.");this.zk=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)}}}(_u),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}uu(n,t),v.defineProperty(n.prototype,"defaultSampleSize",{get:function(){return this.ck},set:function(t){if(!gu(t,32))throw new c("Provided defaultSampleSize does not fit in 32 bits.");this.ck=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"samples",{get:function(){return this.Sk},set:function(t){if(!gu(t,32))throw new c("Number of allowed samples cannot fit in 32 bits.");this.Sk=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)}}(_u),function(t){function n(){return t.call(this,"stbl")||this}uu(n,t)}(ts),function(t){function n(n){var i=t.call(this,"stsc",0,0)||this;return i.entries=n,i}uu(n,t),v.defineProperty(n.prototype,"entries",{get:function(){return this.CL},set:function(t){if(!gu(t.length,32))throw new c("Number of allowed entries cannot fit in 32 bits.");if(t.some((function(t){return!gu(t.firstChunk,32)||!gu(t.sampleDescriptionIndex,32)||!gu(t.samplesPerChunk,32)})))throw new c("Not all entries can be represented in 96 bits.");this.CL=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)}}}(_u),function(t){function n(){return t.call(this,"schi")||this}uu(n,t)}(ts),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}uu(n,t),v.defineProperty(n.prototype,"schemeType",{get:function(){return this.Bk},set:function(t){if(4!==t.length)throw new c("The provided schemeType does not have a length of 4.");this.Bk=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"schemeVersion",{get:function(){return this.Rk},set:function(t){if(!gu(t,32))throw new c("The provided schemeVersion does not fit in 23 bits.");this.Rk=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"schemeUri",{get:function(){return this.Uk},set:function(t){if(t&&4!==t.length)throw new c("The provided schemeUri does not have a length of 4.");this.flags=void 0===t?0:1,this.Uk=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))}}(_u),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 uu(n,t),v.defineProperty(n.prototype,"bitSize",{get:function(){return 0===this.version?32:64},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"referenceId",{get:function(){return this.Qk},set:function(t){if(!gu(t,32))throw new c("Provided referenceId does not fit in 32 bits.");this.Qk=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"timescale",{get:function(){return this.qL},set:function(t){if(!gu(t,32))throw new c("Provided timescale does not fit in 32 bits.");this.qL=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"earliestPresentationTime",{get:function(){return this.Fk},set:function(t){if(!gu(t,this.bitSize))throw new c("Provided earliestPresentationTime does not fit in ".concat(this.bitSize," bits."));this.Fk=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"firstOffset",{get:function(){return this.Yk},set:function(t){if(!gu(t,this.bitSize))throw new c("Provided timescale does not fit in ".concat(this.bitSize," bits."));this.Yk=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"references",{get:function(){return this.Gk},set:function(t){if(!gu(t.length,16))throw new c("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(!gu(e.referencedSize,31))throw new c("Provided referenced size does not fit in 31 bits.");if(!gu(e.subsegmentDuration,32))throw new c("Provided subsegment duration does not fit in 31 bits.");if(!gu(e.sapType,3))throw new c("Provided SAP type does not fit in 3 bits.");if(!gu(e.sapDeltaTime,28))throw new c("Provided SAP delta time does not fit in 28 bits.")}this.Gk=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}(_u)),af=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 uu(n,t),n.prototype.serializeSidxBoxContent=function(t){t.writer.writeUInt(this.earliestPresentationTime,32),t.writer.writeUInt(this.firstOffset,32)},n}(cf),vf=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 uu(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}(cf);(function(t){function n(n,i,e){return t.call(this,"styp",n,i,e)||this}uu(n,t)})(cs),function(t){function n(n){void 0===n&&(n=0);var i=t.call(this,"smhd",0,0)||this;return i.balance=n,i}uu(n,t),v.defineProperty(n.prototype,"balance",{get:function(){return this.Vk},set:function(t){if(t<-1||t>1)throw new c("Provided balance does not fit in the allowed range [-1, 1].");if(!gu(mu(t,8),16))throw new c("Provided balance does not fit in 16 bits (fixed 8.8).");this.Vk=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(mu(this.balance,8),16),n.writer.writeUInt(0,16)}}(_u),function(t){function n(n){var i=t.call(this,"stss",0,0)||this;return i.entries=n,i}uu(n,t),v.defineProperty(n.prototype,"entries",{get:function(){return this.CL},set:function(t){if(!gu(t.length,32))throw new c("Number of allowed entries cannot fit in 32 bits.");if(t.some((function(t){return!gu(t,32)})))throw new c("Not all entries can be represented in 32 bits.");this.CL=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)}}}(_u),function(t){function n(n){var i=t.call(this,"stts",0,0)||this;return i.entries=n,i}uu(n,t),v.defineProperty(n.prototype,"entries",{get:function(){return this.CL},set:function(t){if(!gu(t.length,32))throw new c("Number of allowed entries cannot fit in 32 bits.");if(t.some((function(t){return!gu(t.sampleCount,32)||!gu(t.sampleDelta,32)})))throw new c("Not all entries can be represented in 64 bits.");this.CL=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)}}}(_u),function(t){function n(n){var i=t.call(this,"trep",0,0)||this;return i.trackId=n,i}uu(n,t),v.defineProperty(n.prototype,"trackId",{get:function(){return this.nk},set:function(t){if(!gu(t,32))throw new c("The provided trackId does not fit in 32 bits.");this.nk=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)}}(es),function(t){function n(){return t.call(this,"udta")||this}uu(n,t)}(ts);var df={red:0,green:0,blue:0},lf=(function(t){function n(n,i){void 0===n&&(n=0),void 0===i&&(i=df);var e=t.call(this,"vmhd",0,1)||this;return e.graphicsMode=n,e.opColor=i,e}uu(n,t),v.defineProperty(n.prototype,"opColor",{get:function(){return this.Wk},set:function(t){if(!gu(t.red,16)||!gu(t.green,16)||!gu(t.blue,16))throw new c("Not all colors could be represented in 16 bits.");this.Wk=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)}}(_u),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 uu(n,t),v.defineProperty(n.prototype,"width",{get:function(){return this.wk},set:function(t){if(!gu(t,16))throw new c("Provided width does not fit in 16 bits.");this.wk=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"height",{get:function(){return this.vk},set:function(t){if(!gu(t,16))throw new c("Provided height does not fit in 16 bits.");this.vk=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"horizontalResolution",{get:function(){return this.Hk},set:function(t){if(!gu(mu(t,16),32))throw new c("Provided horizontalResolution does not fit in 32 bits (fixed 16.16).");this.Hk=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"verticalResolution",{get:function(){return this.qk},set:function(t){if(!gu(mu(t,16),32))throw new c("Provided verticalResolution does not fit in 32 bits (fixed 16.16).");this.qk=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"compressorName",{get:function(){return this.Xk},set:function(t){if(t.length>31)throw new c("The provided compressorName should at most be 31 characters long.");this.Xk=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"frameCount",{get:function(){return this.Zk},set:function(t){if(!gu(t,16))throw new c("Provided frameCount does not fit in 16 bits.");this.Zk=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"depth",{get:function(){return this.Kk},set:function(t){if(!gu(t,16))throw new c("Provided depth does not fit in 16 bits.");this.Kk=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(mu(this.horizontalResolution,16),32),n.writer.writeUInt(mu(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&&pu(n.writer,this.extra)},n}(ns)),wf=(function(t){function n(n){var i=t.call(this,"esds",0,0)||this;return i.esDescriptor=n,i}uu(n,t),n.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+(this.esDescriptor instanceof g?this.esDescriptor.length:this.esDescriptor.getSize())},n.prototype.serializeBoxContent=function(n){t.prototype.serializeBoxContent.call(this,n),this.esDescriptor instanceof g?n.concat(du.from(this.esDescriptor)):this.esDescriptor.serialize(n)}}(_u),function(t){function n(n,i,e){var r=t.call(this,"mp4a",n,e)||this;return r.esd=i,r}uu(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())}}(is),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}uu(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)}}(lf),function(t){function n(n,i){var e=t.call(this,"mp4s",n)||this;return e.esDescriptor=i,e}uu(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)}}(ns),function(t){function n(n){var i=t.call(this,"avcC")||this;return i.decoderConfig=n,i}uu(n,t),n.prototype.getBoxContentSize=function(){return this.decoderConfig.getSize()},n.prototype.serializeBoxContent=function(t){this.decoderConfig.serialize(t)}}(bu),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}v.defineProperty(t.prototype,"version",{get:function(){return this.Jk},set:function(t){if(!gu(t,8))throw new c("Provided version does not fit in 8 bits.");this.Jk=t},enumerable:!1,configurable:!0}),v.defineProperty(t.prototype,"profileIndication",{get:function(){return this.$k},set:function(t){if(!gu(t,8))throw new c("Provided profileIndication does not fit in 8 bits.");this.$k=t},enumerable:!1,configurable:!0}),v.defineProperty(t.prototype,"profileCompatibility",{get:function(){return this.tx},set:function(t){if(!gu(t,8))throw new c("Provided profileCompatibility does not fit in 8 bits.");this.tx=t},enumerable:!1,configurable:!0}),v.defineProperty(t.prototype,"levelIndication",{get:function(){return this.ix},set:function(t){if(!gu(t,8))throw new c("Provided levelIndication does not fit in 8 bits.");this.ix=t},enumerable:!1,configurable:!0}),v.defineProperty(t.prototype,"spsSets",{get:function(){return this.sx},set:function(t){if(!gu(t.length,5))throw new c("Provided number of spsSets exceeds the max (32)");this.sx=t},enumerable:!1,configurable:!0}),v.defineProperty(t.prototype,"ppsSets",{get:function(){return this.nx},set:function(t){if(!gu(t.length,8))throw new c("Provided number of ppsSets exceeds the max (256)");this.nx=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(du.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(du.from(u))}}}(),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}uu(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())}}(lf),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}uu(n,t),v.defineProperty(n.prototype,"bufferSizeDb",{get:function(){return this.ML},set:function(t){if(!gu(t,32))throw new c("Provided bufferSizeDb does not fit in 32 bits.");this.ML=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"max",{get:function(){return this.hx},set:function(t){if(!gu(t,32))throw new c("Provided max does not fit in 32 bits.");this.hx=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"avg",{get:function(){return this.ox},set:function(t){if(!gu(t,32))throw new c("Provided avg does not fit in 32 bits.");this.ox=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)}}(bu),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 c("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 g(0),s}return uu(n,t),v.defineProperty(n.prototype,"isProtected",{get:function(){return this.ux},set:function(t){if(!gu(t,8))throw new c("Provided isProtected does not fit in 1 byte.");this.ux=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"perSampleIvSize",{get:function(){return this.lx},set:function(t){if(![8,16].includes(t))throw new c("Provided perSampleIvSize does not match any allowed value [8, 16].");this.lx=t,this._x=new g(0)},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"kId",{get:function(){return this.gx},set:function(t){if(16!==t.length)throw new c("Provided kId length is not 16.");this.gx=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"constantIv",{get:function(){return this._x},set:function(t){if(![8,16].includes(t.length))throw new c("Provided constant IV length does not match any allowed value [8, 16].");this._x=t,this.lx=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),pu(t.writer,this.kId),0===this.perSampleIvSize&&(t.writer.writeByte(this.constantIv.length),pu(t.writer,this.constantIv))},n}(_u)),bf=(function(t){function n(n){return t.call(this,0,n)||this}uu(n,t)}(wf),function(t){function n(n){var i=t.call(this,1,n)||this;return i.cryptByteBlocks=n.cryptByteBlock,i.skipByteBlocks=n.skipByteBlock,i}return uu(n,t),v.defineProperty(n.prototype,"cryptByteBlocks",{get:function(){return this.wx},set:function(t){if(!gu(t,4))throw new c("Provided cryptByteBlocks does not fit in 4 bits.");this.wx=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"skipByteBlocks",{get:function(){return this.vx},set:function(t){if(!gu(t,4))throw new c("Provided skipByteBlocks does not fit in 4 bits.");this.vx=t},enumerable:!1,configurable:!0}),n.prototype.serializeVersionBoxContent=function(t){t.writer.writeUInt(this.cryptByteBlocks,4),t.writer.writeUInt(this.skipByteBlocks,4)},n}(wf));!function(t){function n(n){var i=t.call(this)||this;return i.tencBox=new bf(n),i}uu(n,t),n.prototype.serializeBoxContent=function(t){this.tencBox.serializeOwnContent(t)},n.prototype.getBoxContentSize=function(){return this.tencBox.getTencHeaderSize()}}(Is);function gf(t){return void 0!==t.iv}function mf(t){return void 0!==t.subsamples}(function(t){function n(n){var i=t.call(this,"senc",0,{useSubsampleEncryption:!1})||this;return i.samples=n,i}uu(n,t),v.defineProperty(n.prototype,"samples",{get:function(){return this.Sk},set:function(t){var n;if(!gu(t.length,32))throw new c("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(gf(r)&&![8,16].includes(r.iv.length))throw new c("IV of one of the provided samples did not satisfy the required length constraints. [8, 16]");if(void 0===n&&(n=mf(r)),!0===n&&!mf(r)||!1===n&&mf(r))throw new c("Mix of samples with and without subsamples detected.");if(mf(r)){if(!gu(r.subsamples.length,16))throw new c("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(!gu(s.clearData,16))throw new c("Subsample clearData of one of the provided samples does not fit in 16 bits.");if(!gu(s.protectedData,23))throw new c("Subsample protectedData of one of the provided samples does not fit in 23 bits.")}}}this.flags.useSubsampleEncryption=null!=n&&n,this.Sk=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];gf(r)&&(n+=r.iv.length),mf(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(gf(r)&&pu(n.writer,r.iv),mf(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)}})(_u),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}uu(n,t),v.defineProperty(n.prototype,"timescale",{get:function(){return this.qL},set:function(t){if(!gu(t,32))throw new c("The provided timescale does not fit in 32 bits.");this.qL=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"presentationTimeDelta",{get:function(){return this.Ax},set:function(t){if(!gu(t,32))throw new c("The provided presentationTimeDelta does not fit in 32 bits.");this.Ax=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"eventDuration",{get:function(){return this.mx},set:function(t){if(!gu(t,32))throw new c("The provided eventDuration does not fit in 32 bits.");this.mx=t},enumerable:!1,configurable:!0}),v.defineProperty(n.prototype,"id",{get:function(){return this.CT},set:function(t){if(!gu(t,32))throw new c("The provided id does not fit in 32 bits.");this.CT=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(du.from(this.data))}}(_u),function(){function t(){this.boxes=[]}t.prototype.serialize=function(){for(var t=new wu,n=0,i=this.boxes;n<i.length;n++){var e=i[n];t.concat(e.serialize())}return t.toRangedBuffer()}}();function pf(t,n){return function(i){var e=new Fu(function(t){return new DataView(t.buffer,t.byteOffset,t.byteLength)}(i),new Uu),r=function(t,n){for(var i=t.data,e=t.cursor;e.offset<i.byteLength;){var r=Vu(i,e);if(!r.complete)return;if(zu(r.box,n))return r.box}}(e,t);if(!r)throw new c("".concat(t," box not found"));return n(r)}}pf("moov",(function(t){for(var n=new Ks,i=0,e=qu(t.data);i<e.length;i++){var r=e[i];zu(r,"mvhd")?n.boxes.push(Ws(r)):zu(r,"trak")?n.boxes.push(Ys(r)):zu(r,"mvex")?n.boxes.push(Ls(r)):zu(r,"pssh")?n.boxes.push(Ns(r)):n.boxes.push(Ku(r))}return n})),pf("sidx",(function(t){var n,i,e=t.data,r=Hu(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 au(du.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 af(s,f,n,i,c,u.raw):new vf(s,f,n,i,c,u.raw)})),pf("moof",(function(t){for(var n=new uf,i=0,e=qu(t.data);i<e.length;i++){var r=e[i];zu(r,"traf")?n.boxes.push(of(r)):zu(r,"pssh")?n.boxes.push(Ns(r)):n.boxes.push(Ku(r))}return n}));var yf=pf("pssh",Ns),_f=function(t){function n(n,i){var e;(e=t.call(this)||this).Nx=n,e.lA=i,e.Ex=!1,e.Cx=function(){e.kx()},e.Ox=function(t){e.Co(new Zo(Yt(e),t.messageType,iu(e.lA,t.message)))},e.jx=function(){e.Ex=!0,e.Sx.hp>0&&(e.Sx.Xb(),e.Co(new $o(Yt(e)))),e.Nx.removeEventListener("keystatuseschange",e.Cx),e.Nx.removeEventListener("message",e.Ox)},e.Nx.addEventListener("keystatuseschange",e.Cx),e.Nx.addEventListener("message",e.Ox),e.Sx=new tu;var r=[];return e.Nx.closed&&r.push(X.resolve(e.Nx.closed)),e.bx=new nu,r.push(e.bx.tL),e.Mx=X.race(r).then(e.jx,e.jx),e.kx(),e}Rt(n,t);var i=n.prototype;return i.Ws=function(){if(this.Ex)return this.Mx;var t=[];return t.push(X.resolve(this.Nx.close())),t.push(en(1e3)),this.bx.Xd(X.race(t).catch(Sf)),this.Ex=!0,this.Mx},i.Lx=function(t,n,i){if(Vi.fE){var e=yf(ci(n));if(1===e.version)n=new Rs(e.systemId,e.data).serialize().join()}return X.resolve(this.Nx.generateRequest(t,n)).catch(Sf)},i.$n=function(t){return X.resolve(this.Nx.load(t)).catch(Sf)},i.bT=function(){return X.resolve(this.Nx.remove()).catch(Sf)},i.Yn=function(t){return X.resolve(this.Nx.update(t)).catch(Sf)},i.kx=function(){var t=this;this.Sx.Xb(),this.Nx.keyStatuses.forEach((function(n,i){t.xx(i,n)})),this.Co(new $o(this))},i.xx=function(t,n){if("string"==typeof t){var i=t;t=n,n=i}var e=ci(t);if(this.lA===Ao&&16===e.byteLength){var r=fi(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.lA===Ao&&"status-pending"===n&&(n="usable"),this.Sx.qb(e,n)},It(n,[{key:"yx",get:function(){return this.Mx}},{key:"Tx",get:function(){return this.Nx.expiration}},{key:"Dx",get:function(){return this.Sx}},{key:"Ix",get:function(){return this.Nx.sessionId}}]),n}(gi);function Sf(t){var n;if(t.message){var i=t.message.match(/^SystemCode:0x([0-9a-fA-F]+)$/);i&&(n=0|l(i[1],16))}throw new ru(t.message,void 0,n,t)}var Tf=function(){function t(t,n,i){this.zx=t,this.cA=n,this.wd=i}var n=t.prototype;return n.Px=function(t){var n=this;return tt((function(){return nt(this,(function(i){return[2,new _f(n.zx.createSession(t),n.cA)]}))}))()},n.Bx=function(t){return X.resolve(this.zx.setServerCertificate(t))},n.bn=function(t){return X.resolve(t.setMediaKeys(this.zx))},n.Rx=function(t){return X.resolve(t.setMediaKeys(null))},n.tr=function(){return X.resolve()},t}(),Ef=function(){function t(t,n,i){this.Ux=t,this.lA=n,this.Fx=i}var n=t.prototype;return n.Qx=function(){var t=this;return tt((function(){var n;return nt(this,(function(i){switch(i.label){case 0:return[4,t.Ux.createMediaKeys()];case 1:return n=i.sent(),[2,new Tf(n,t.lA,t.Fx)]}}))}))()},n.Yx=function(){return this.Fx},It(t,[{key:"cA",get:function(){return this.Ux.keySystem}}]),t}();function If(t){var n=t.trim(),i=n.indexOf(";");return i<0?n:n.substr(0,i).trim()}function kf(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,eC:e.eC},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 Rf(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 Rf(t,n,i,e)})),u=!0,o.videoCapabilities.length&&(r=!0))}return u||(r=t(i,"video/mp4")),r?o:void 0}}function Rf(t,n,i,e){return!!e.contentType&&(!(e.encryptionScheme&&!gt(n,e.encryptionScheme))&&(!e.robustness&&t(i,If(e.contentType))))}function Of(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 Nf(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 Pf(t){return!(!t.audioCapabilities||!t.audioCapabilities.some(Af))||!(!t.videoCapabilities||!t.videoCapabilities.some(Af))}function Af(t){return!t.robustness}function Df(t,n){for(var i=[],e=0;e<t.length;e++){var r=t[e];r.robustness?i.push(r):i.push(Ro({},r,{robustness:n}))}return i}var Cf=function(){function t(){}return t.prototype.Kx=function(t,n){return tt((function(){var i,e,r,u,s,f,h;return nt(this,(function(c){switch(c.label){case 0:for(n=n.filter((function(t){return!t.eC})),i=0;i<n.length;i++)(e=n[i]).audioCapabilities&&(e.audioCapabilities=Nf(e.audioCapabilities)),e.videoCapabilities&&(e.videoCapabilities=Nf(e.videoCapabilities));if(t!==xo||!n.some(Pf))return[3,4];r=n.map((function(t){return function(t,n){return Ro({},t,{videoCapabilities:t.videoCapabilities?Df(t.videoCapabilities,n):void 0,audioCapabilities:t.audioCapabilities?Df(t.audioCapabilities,n):void 0})}(t,"SW_SECURE_CRYPTO")})),c.label=1;case 1:return c.trys.push([1,3,,4]),[4,o.requestMediaKeySystemAccess(t,r)];case 2:return u=c.sent(),s=u.getConfiguration(),[2,new Ef(u,t,s)];case 3:return c.sent(),[3,4];case 4:return[4,o.requestMediaKeySystemAccess(t,n)];case 5:return f=c.sent(),h=f.getConfiguration(),[2,new Ef(f,t,h)]}}))}))()},t.sC=function(){return void 0!==o&&"function"==typeof o.requestMediaKeySystemAccess},t}(),xf=function(t){function n(n,i){var e;return(e=t.call(this)||this).cC=n,e.lC=i,e.Ex=!1,e.gC=void 0,e.aC=void 0,e.nC=void 0,e.jx=function(){e.Ex=!0,e.rC.Zb(void 0),e.nC&&(e.nC.removeEventListener("mskeyclose",e.jx),e.nC.removeEventListener("mskeymessage",e.dC),e.nC.removeEventListener("mskeyerror",e.Ss),e.nC.removeEventListener("mskeyadded",e.fC))},e.dC=function(t){e.aC&&(e.aC.Zb(void 0),e.aC=void 0),e.Co(new Zo(Yt(e),"license-request",ai(t.message).buffer,t.destinationURL||void 0))},e.Ss=function(){var t=e.nC&&e.nC.error;if(t){var n=new ru("Unknown CDM error",t.code,t.systemCode);if(e.aC)e.aC.Jb(n),e.aC=void 0;else if(e.gC)e.gC.Jb(n),e.gC=void 0;else switch(n.iL){case MSMediaKeyError.MS_MEDIA_KEYERR_OUTPUT:case MSMediaKeyError.MS_MEDIA_KEYERR_HARDWARECHANGE:e._C("output-not-allowed");break;default:e._C("internal-error")}}},e.fC=function(){e.aC&&(e._C("usable"),e.aC.Zb(void 0),e.aC=void 0),e.gC&&(e._C("usable"),e.gC.Zb(void 0),e.gC=void 0)},e.rC=new nu,e.hC=new tu,e}Rt(n,t);var i=n.prototype;return i.Lx=function(t,n,i){var e=this;return tt((function(){return nt(this,(function(t){switch(t.label){case 0:return e.oC(),e.aC=new nu,e.Px(ci(n),i),[4,e.aC.tL];case 1:return t.sent(),[2]}}))}))()},i.Px=function(t,n){if(!t)throw new a("Expected initData to be defined but was "+t+".");var i,e=n&&n.playready&&n.playready.uC;return(i=n?this.cC.createSession(this.lC,t,e):this.cC.createSession(this.lC,t)).addEventListener("mskeyclose",this.jx),i.addEventListener("mskeymessage",this.dC),i.addEventListener("mskeyerror",this.Ss),i.addEventListener("mskeyadded",this.fC),this.nC=i,this._C("status-pending"),i},i.$n=function(t){var n=this;return tt((function(){return nt(this,(function(t){return n.oC(),[2,!0]}))}))()},i.Yn=function(t){var n=this;return tt((function(){var i;return nt(this,(function(e){switch(e.label){case 0:if(n.gC=new nu,n.oC(),!n.nC)return[2,X.resolve()];if(0===(i=ci(t)).byteLength)throw new a("Cannot call update with an empty response.");return n.nC.update(i),[4,n.gC.tL];case 1:return e.sent(),[2]}}))}))()},i.Ws=function(){return!this.Ex&&this.nC&&(this.Ex=!0,this.nC.close()),this.rC.tL},i.bT=function(){var t=this;return tt((function(){return nt(this,(function(n){return t.oC(),[2]}))}))()},i.oC=function(){if(this.Ex)throw new a("Already closing or closed.")},i._C=function(t){this.hC.Xb(),this.hC.qb(Qo,t),this.Co(new $o(this))},It(n,[{key:"Ix",get:function(){return this.nC&&this.nC.sessionId||""}},{key:"Tx",get:function(){return NaN}},{key:"yx",get:function(){return this.rC.tL}},{key:"Dx",get:function(){return this.hC}}]),n}(gi),Bf=function(){function t(t,n,i){this.cC=t,this.cA=n,this.wd=i;var e=Of(i)||"video/mp4";this.lC=If(e)}var n=t.prototype;return n.Px=function(t){var n=this;return tt((function(){return nt(this,(function(t){return[2,new xf(n.cC,n.lC)]}))}))()},n.Bx=function(t){return X.resolve(!1)},n.bn=function(t){var n=this,i=function(){t.msSetMediaKeys(n.cC),t.removeEventListener("loadedmetadata",i)};return t.readyState>=1?t.msSetMediaKeys(this.cC):t.addEventListener("loadedmetadata",i),X.resolve()},n.Rx=function(t){return X.resolve()},n.tr=function(){return X.resolve()},t}(),Mf=function(){function t(t,n){this.lA=t,this.wC=n}var n=t.prototype;return n.Yx=function(){return this.wC},n.Qx=function(){var t=new Qr.MSMediaKeys(this.lA);return X.resolve(new Bf(t,this.lA,this.wC))},It(t,[{key:"cA",get:function(){return this.lA}}]),t}(),Lf=function(){function t(){}return t.prototype.Kx=function(t,n){try{return X.resolve(function(t,n){if(!Uf())throw new a("Unsupported key system "+t);for(var i=0;i<n.length;i++){var e=n[i],r=kf(Ff,Ko,t,e);if(r)return new Mf(t,r)}throw new a("Unsupported key system configuration for "+t)}(t,n))}catch(t){return X.reject(t)}},t.sC=function(){return Uf()},t}();function Uf(){return void 0!==Qr.MSMediaKeys&&"function"==typeof Qr.MSMediaKeys.isTypeSupported}function Ff(t,n){return Qr.MSMediaKeys.isTypeSupported(t,n)}var zf,Wf,qf=function(t){function n(n,i,e){var r;return(r=t.call(this)||this).pC=n,r.lC=i,r.mC=e,r.rC=new nu,r.MC=void 0,r.hC=new tu,r.vC=void 0,r.yC=new nu,r.Ss=function(){var t=r.vC&&r.vC.error;if(t){var n=new ru("Unknown CDM error",t.code,t.systemCode);r.MC?(r.MC.Jb(n),r.MC=void 0):n.iL===WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT?r._C("output-not-allowed"):r._C("internal-error"),r.Co(new Jo)}},r.dC=function(t){r.Co(new Zo(Yt(r),"license-request",ai(t.message).buffer,"this is a test string"===t.destinationURL?void 0:t.destinationURL))},r.fC=function(){r.MC&&(r.MC.Zb(void 0),r.MC=void 0),r._C("usable")},r}Rt(n,t);var i=n.prototype;return i.Lx=function(t,n,i){var e=i&&i.fairplay&&i.fairplay.AC;if(!e)throw new a("Expected FairPlay contentId to be defined but was "+e+".");var r=function(t,n,i){var e=ui(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 di;return ei(s,f,r,!0),ri(s,f,e,!0),ei(s,f,o,!0),ri(s,f,n,!0),ei(s,f,i.byteLength,!0),function(t,n,i){hi(t).set(hi(i),n.Ku),n.Im(i.byteLength)}(s,f,i),new g(u)}(ci(n),e,this.mC);return this.vC=this.pC.createSession(this.lC,r),this.vC.addEventListener("webkitkeymessage",this.dC,!1),this.vC.addEventListener("webkitkeyadded",this.fC,!1),this.vC.addEventListener("webkitkeyerror",this.Ss,!1),this._C("status-pending"),this.yC.Zb(this.vC),this.yC=new nu,X.resolve()},i.$n=function(t){return X.resolve(!0)},i.Yn=function(t){var n=this;return tt((function(){var i,e;return nt(this,(function(r){switch(r.label){case 0:if(0===(i=ci(t)).byteLength)throw new a("Cannot call update with an empty response.");return n.MC=new nu,(e=n.vC)?[3,2]:[4,n.yC.tL];case 1:e=r.sent(),r.label=2;case 2:return e.update(i),[4,n.MC.tL];case 3:return r.sent(),[2]}}))}))()},i.Ws=function(){var t,n=this.vC;return n&&(n.removeEventListener("webkitkeymessage",this.dC,!1),n.removeEventListener("webkitkeyadded",this.fC,!1),n.removeEventListener("webkitkeyerror",this.Ss,!1),n.close()),this.yC.qd(),null==(t=this.MC)||t.qd(),this.rC.Zb(void 0),this.rC.tL},i.bT=function(){return X.resolve(void 0)},i._C=function(t){this.hC.Xb(),this.hC.qb(Qo,t),this.Co(new $o(this))},It(n,[{key:"Ix",get:function(){return this.vC?this.vC.sessionId:""}},{key:"Tx",get:function(){return NaN}},{key:"yx",get:function(){return this.rC.tL}},{key:"Dx",get:function(){return this.hC}}]),n}(gi);!function(t){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.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"}(zf||(zf={})),function(t){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"}(Wf||(Wf={})),function(t){t.fromCode=function(n){var i=d.floor(n/1e3);if(i in t)return i;throw new a("Invalid error code: "+n)}}(Wf||(Wf={}));var Vf=function(t){function n(n,i,e){var r;return(r=t.call(this,i,e)||this).code=n,r}return Rt(n,t),It(n,[{key:"name",get:function(){return"THEOplayerError"}},{key:"category",get:function(){return Wf.fromCode(this.code)}}]),n}(Gt),Hf=function(){function t(t,n,i){this.pC=t,this.cA=n,this.wd=i,this.mC=void 0;var e=Of(i)||"video/mp4";this.lC=If(e)}var n=t.prototype;return n.getInternalMediaKeys=function(){return this.pC},n.Px=function(t){var n=this;return tt((function(){return nt(this,(function(t){if(!n.mC)throw new Vf(zf.CONTENT_PROTECTION_CERTIFICATE_ERROR,"No valid certificate was provided.");return[2,new qf(n.pC,n.lC,n.mC)]}))}))()},n.Bx=function(t){return this.mC=ci(t),X.resolve(!0)},n.bn=function(t){return t.webkitSetMediaKeys(this.pC),X.resolve()},n.Rx=function(t){return t.webkitSetMediaKeys(null),X.resolve()},n.tr=function(){return X.resolve()},t}(),Xf=function(){function t(t,n){this.lA=t,this.wC=n}var n=t.prototype;return n.Yx=function(){return this.wC},n.Qx=function(){var t=new Qr.WebKitMediaKeys(this.lA);return X.resolve(new Hf(t,this.lA,this.wC))},It(t,[{key:"cA",get:function(){return this.lA}}]),t}(),jf=function(){function t(){}return t.prototype.Kx=function(t,n){try{return X.resolve(function(t,n){if(t!==Fo)throw new a(t+" is not supported with webkit-prefixed Encrypted Media Extensions.");if(!Yf())throw new a("Unsupported key system "+t);for(var i=0;i<n.length;i++){var e=n[i],r=kf(Kf,Go,t,e);if(r)return new Xf(t,r)}throw new a("Unsupported key system configuration for "+t)}(t,n))}catch(t){return X.reject(t)}},t.sC=function(){return Yf()},t}();function Yf(){return void 0!==Qr.WebKitMediaKeys&&"function"==typeof Qr.WebKitMediaKeys.isTypeSupported}function Kf(t,n){return Qr.WebKitMediaKeys.isTypeSupported(t,n)}var Gf,$f=function(){function t(t){this.TC=t}return t.prototype.Kx=function(t,n){var i=this;return tt((function(){var e,r,o;return nt(this,(function(u){switch(u.label){case 0:e=0,r=i.TC,u.label=1;case 1:if(!(e<r.length))return[3,6];o=r[e],u.label=2;case 2:return u.trys.push([2,4,,5]),[4,o.Kx(t,n)];case 3:return[2,u.sent()];case 4:return u.sent(),[3,5];case 5:return e++,[3,1];case 6:throw new a("Unsupported key system configuration for "+t)}}))}))()},t}(),Zf=new on,Jf=function(t){function n(n){var i;return(i=t.call(this)||this).lA=n,i.aC=void 0,i.MC=void 0,i.dL=!1,i.FC=void 0,i.BC=void 0,i.rC=new nu,i.QC="",i.RC=new nu,i.UC=new tu,i}Rt(n,t);var i=n.prototype;return i.xC=function(){this.MC&&(this._C("usable"),this.MC.Zb(void 0),this.MC=void 0)},i.OC=function(t){var n=new ru("Unknown CDM error",t.errorCode,t.systemCode);this.MC?(this.MC.Jb(n),this.MC=void 0):this.aC?(this.aC.Jb(n),this.aC=void 0):n.iL===WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT?this._C("output-restricted"):1===n.eL?this._C("expired"):this._C("internal-error")},i.jC=function(t){0!==t.message.byteLength?(this.aC&&(this.aC.Zb(void 0),this.aC=void 0),this.Co(new Zo(this,"license-request",iu(this.lA,ai(t.message).buffer),t.defaultURL||void 0))):this.aC&&(this.aC.Jb("Empty key message"),this.aC=void 0)},i.zC=function(t){this.BC||(this.BC=t,this.RC.Zb(t))},i.Ws=function(){var t=this;return tt((function(){return nt(this,(function(n){return t.throwIfClosed(),t.MC&&(t.MC.Jb(void 0),t.MC=void 0),t.dL=!0,t.rC.Zb(void 0),[2]}))}))()},i.Lx=function(t,n){var i=this;return tt((function(){var t;return nt(this,(function(e){switch(e.label){case 0:return i.throwIfClosed(),i.aC=new nu,i.FC=ci(n),(t=i.BC)?[3,2]:[4,i.RC.tL];case 1:t=e.sent(),e.label=2;case 2:return t.webkitGenerateKeyRequest(i.lA,i.FC),[4,i.aC.tL];case 3:return e.sent(),[2]}}))}))()},i.$n=function(t){var n=this;return tt((function(){return nt(this,(function(t){return n.throwIfClosed(),[2,!1]}))}))()},i.bT=function(){var t=this;return tt((function(){return nt(this,(function(n){return t.throwIfClosed(),[2]}))}))()},i.Yn=function(t){var n=this;return tt((function(){return nt(this,(function(i){switch(i.label){case 0:return n.throwIfClosed(),n.MC=new nu,Vi.OE||Vi.LE?[2,Zf.NC(tt((function(){return nt(this,(function(i){switch(i.label){case 0:return[4,n.doUpdate(t)];case 1:return i.sent(),[2]}}))})))]:[4,n.doUpdate(t)];case 1:return i.sent(),[2]}}))}))()},i.doUpdate=function(t){var n=this;return tt((function(){var i;return nt(this,(function(e){switch(e.label){case 0:return void 0===n.MC?[2]:(i=n.BC)?[3,2]:[4,n.RC.tL];case 1:i=e.sent(),e.label=2;case 2:return i.webkitAddKey(n.lA,ci(t),n.FC,n.Ix),[4,n.MC.tL];case 3:return e.sent(),Vi.LE?[4,en(500)]:[3,5];case 4:e.sent(),e.label=5;case 5:return[2]}}))}))()},i.throwIfClosed=function(){if(this.dL)throw new a("Already closing or closed.")},i._C=function(t){this.UC.Xb(),this.UC.qb(Qo,t),this.Co(new $o(this))},i.YC=function(){var t=this;return tt((function(){var n,i;return nt(this,(function(e){switch(e.label){case 0:return(i=t.BC)?[3,2]:[4,t.RC.tL];case 1:i=e.sent(),e.label=2;case 2:if(!(n=i).webkitCancelKeyRequest)return[3,7];e.label=3;case 3:return e.trys.push([3,4,5,7]),n.webkitCancelKeyRequest(t.lA,t.QC),[3,7];case 4:return e.sent(),[3,7];case 5:return[4,en(500)];case 6:return e.sent(),[7];case 7:return[2]}}))}))()},It(n,[{key:"Dx",get:function(){return this.UC}},{key:"Ix",get:function(){return this.QC},set:function(t){this.QC=t}},{key:"yx",get:function(){return this.rC.tL}},{key:"Tx",get:function(){return NaN}}]),n}(gi),Qf=function(){function t(t,n){var i=this;this.cA=t,this.wd=n,this.BC=void 0,this.WC=Pt(),this.HC=[],this.fC=function(t){var n=i.qC(t.sessionId);n&&n.xC()},this.GC=function(t){var n=i.qC(t.sessionId);n&&n.OC(t)},this.VC=function(t){var n=i.qC(t.sessionId);n&&n.jC(t)}}var n=t.prototype;return n.bn=function(t){return this.BC=t,this.BC.addEventListener("webkitkeyadded",this.fC),this.BC.addEventListener("webkitkeyerror",this.GC),this.BC.addEventListener("webkitkeymessage",this.VC),this.WC.forEach((function(n,i){return n.zC(t)})),this.HC.forEach((function(n){return n.zC(t)})),X.resolve()},n.Rx=function(t){return t.removeEventListener("webkitkeyadded",this.fC),t.removeEventListener("webkitkeyerror",this.GC),t.removeEventListener("webkitkeymessage",this.VC),this.BC=void 0,X.resolve()},n.tr=function(){var t=this;return tt((function(){var n,i;return nt(this,(function(e){switch(e.label){case 0:n=t.WC.entries(),i=n.next(),e.label=1;case 1:return i.done?[3,3]:[4,i.value[1].YC()];case 2:return e.sent(),i=n.next(),[3,1];case 3:return t.WC.clear(),[2]}}))}))()},n.Px=function(t,n,i){var e=this;return tt((function(){var t;return nt(this,(function(n){return t=new Jf(e.cA),e.BC&&t.zC(e.BC),e.HC.push(t),[2,t]}))}))()},n.Bx=function(t){return X.resolve(!1)},n.qC=function(t){if(t){var n=this.WC.get(t);return n||((n=this.HC.shift())?(n.Ix=t,this.WC.set(t,n),n):void 0)}},t}(),th=function(){function t(t,n){this.cA=t,this.XC=n}var n=t.prototype;return n.Qx=function(){return X.resolve(new Qf(this.cA,this.XC))},n.Yx=function(){return this.XC},t}(),nh=function(){function t(){}return t.prototype.Kx=function(t,n){try{return X.resolve(function(t,n){if(!nh.sC())throw new a("Unsupported key system "+t);for(var i=0;i<n.length;i++){var e=n[i],r=kf(ih,Ko,t,e);if(r)return new th(t,r)}throw new a("Unsupported key system configuration for "+t)}(t,n))}catch(t){return X.reject(t)}},t.sC=function(){return"undefined"!=typeof HTMLMediaElement&&void 0!==HTMLMediaElement.prototype.webkitGenerateKeyRequest&&void 0!==HTMLMediaElement.prototype.webkitAddKey&&void 0!==HTMLMediaElement.prototype.webkitCancelKeyRequest},t}();function ih(t,n){var i=ro();return!(!i||!i.canPlayType||""===i.canPlayType(n,t))}function eh(){return Gf||(Gf=function(){var t=[];jf.sC()&&t.push(new jf);Cf.sC()&&t.push(new Cf);Lf.sC()&&t.push(new Lf);nh.sC()&&t.push(new nh);return new $f(t)}()),Gf}var rh=function(){function t(){this.uQ=Pt()}var n=t.prototype;return n.Xb=function(t){this.uQ.delete(t)},n.cQ=function(){this.uQ.clear()},n.Wb=function(t){return this.uQ.get(t)},n.iP=function(t,n){this.uQ.set(t,n)},t}(),oh=function(){function t(){}return t.lQ=function(){return t.Lb||(t.Lb=uh.sC()?new uh:new rh),t.Lb},t.Xb=function(n){t.lQ().Xb(n)},t.cQ=function(){t.lQ().cQ()},t.Wb=function(n){return t.lQ().Wb(n)},t.iP=function(n,i){t.lQ().iP(n,i)},t}();oh.Lb=void 0;var uh=function(t){function n(){return t.apply(this,arguments)}Rt(n,t);var i=n.prototype;return i.Xb=function(t){self.sessionStorage.removeItem(t)},i.cQ=function(){self.sessionStorage.clear()},i.Wb=function(t){var n;return null!=(n=self.sessionStorage.getItem(t))?n:void 0},i.iP=function(t,n){self.sessionStorage.setItem(t,n)},n.sC=function(){var t="foobar";try{return self.sessionStorage.setItem(t,t),self.sessionStorage.removeItem(t),!0}catch(t){return!1}},n}(oh);var sh=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 fh(t,n,i){var e=sh([n],{type:"application/octet-stream"}),o=URL.createObjectURL(e),u=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),s=r.createElement("a");s.href=o,s.download=u,r.body.appendChild(s),s.click(),r.body.removeChild(s),URL.revokeObjectURL(o)}var hh,ch;!function(t){t.Qg="Fg",t.Yg="Gg",t.Vg="contentprotectionerror",t.Wg="contentprotectionsuccess",t.Hg="currentsourcechange",t.qg="destroy",t.Xg="durationchange",t.Zg="emptied",t.Kg="encrypted",t.Jg="ended",t.$g="iw",t.ew="nw",t.hw="ow",t.aw="uw",t.cw="loadstart",t.lw="manifestupdate",t.dw="nosupportedrepresentationfound",t.fw="offline",t._w="online",t.Sh="pause",t.jh="play",t.gw="progress",t.ww="ratechange",t.Aw="representationchange",t.mw="resize",t.pw="seeked",t.yw="seeking",t.Mw="segmentnotfound",t.Tw="Nw",t.Dw="Sw",t.lo="sourcechange",t.Iw="timeupdate",t.Ew="volumechange",t.Lw="xw",t.Cw="metricschange"}(hh||(hh={})),function(t){t.WS="arraybuffer",t.HS="json",t.qS="stream",t.Ru="text"}(ch||(ch={}));var ah=function(){function t(n){var i=this;this.Ld={},n instanceof t?n.asList().forEach((function(t){var n=Ot(t,2),e=n[0],r=n[1];i.append(e,r)})):Array.isArray(n)?n.forEach((function(t){var n=Ot(t,2),e=n[0],r=n[1];i.append(e,r)})):n&&v.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=vh(i),e=dh(e);var r=i.toLowerCase();if(this.Ld.hasOwnProperty(r)){var o=this.Ld[r],u=o[1];o[1]=u?u+", "+e:e}else this.Ld[r]=[i,e]},n.delete=function(t){var n=vh(t).toLowerCase();delete this.Ld[n]},n.get=function(t){var n=vh(t).toLowerCase();return this.Ld.hasOwnProperty(n)?this.Ld[n][1]:null},n.has=function(t){var n=vh(t).toLowerCase();return this.Ld.hasOwnProperty(n)},n.set=function(t,n){var i=t,e=(i=vh(i)).toLowerCase();this.Ld[e]=[i,dh(n)]},n.forEach=function(t,n){for(var i in this.Ld)this.Ld.hasOwnProperty(i)&&t.call(n,this.Ld[i][1],i,this)},n.asList=function(){var t=[];for(var n in this.Ld)if(this.Ld.hasOwnProperty(n)){var i=Ot(this.Ld[n],2),e=i[0],r=i[1];t.push([e,r])}return t},n.XS=function(){var t={};return this.forEach((function(n,i){t[i]=n})),t},n.ZS=function(t){var n=this;t.forEach((function(t,i){n.append(i,t)}))},n.KS=function(t){var n=this;t.forEach((function(t,i){n.set(i,t)}))},t}();function vh(t){var n=t;if("string"!=typeof n&&(n=String(n)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(n))throw new a("Invalid character in header field name");return n}function dh(t){var n=t;return"string"!=typeof n&&(n=String(n)),n}var lh="function"==typeof n&&"symbol"==typeof n.iterator?n:function(t){return"Symbol("+t+")"};function wh(){}var bh=Number.isNaN||function(t){return t!=t},gh=wh;function mh(t){return"object"==typeof t&&null!==t||"function"==typeof t}function ph(t){return t.slice()}function yh(t,n,i,e,r){new g(t).set(new g(i,e,r),n)}function _h(t){return!1!==function(t){if("number"!=typeof t)return!1;if(bh(t))return!1;if(t<0)return!1;return!0}(t)&&t!==1/0}function Sh(t,n,i){if("function"!=typeof t)throw new a("Argument is not a function");return Function.prototype.apply.call(t,n,i)}function Th(t,n,i,e){var r=t[n];if(void 0!==r){if("function"!=typeof r)throw new a(r+" is not a method");switch(i){case 0:return function(){return Ih(r,t,e)};case 1:return function(n){var i=[n].concat(e);return Ih(r,t,i)}}}return function(){return Ch(void 0)}}function Eh(t,n,i){var e=t[n];if(void 0!==e)return Sh(e,t,i)}function Ih(t,n,i){try{return Ch(Sh(t,n,i))}catch(t){return xh(t)}}function kh(t){if(t=Number(t),bh(t)||t<0)throw new RangeError("highWaterMark property of a queuing strategy must be non-negative and non-NaN");return t}function Rh(t){if(void 0===t)return function(){return 1};if("function"!=typeof t)throw new a("size property of a queuing strategy must be a function");return function(n){return t(n)}}var Oh=X,Nh=X.prototype.then,Ph=X.resolve.bind(Oh),Ah=X.reject.bind(Oh);function Dh(t){return new Oh(t)}function Ch(t){return Ph(t)}function xh(t){return Ah(t)}function Bh(t,n,i){return Nh.call(t,n,i)}function Mh(t,n,i){Bh(Bh(t,n,i),void 0,gh)}function Lh(t,n){Mh(t,n)}function Uh(t,n){Mh(t,void 0,n)}function Fh(t,n,i){return Bh(t,n,i)}function zh(t){Bh(t,void 0,gh)}var Wh=function(){function t(){this.hG=0,this.oG=0,this.aG={uG:[],cG:void 0},this.lG=this.aG,this.hG=0,this.oG=0}return v.defineProperty(t.prototype,"length",{get:function(){return this.oG},enumerable:!0,configurable:!0}),t.prototype.push=function(t){var n=this.lG,i=n;16383===n.uG.length&&(i={uG:[],cG:void 0}),n.uG.push(t),i!==n&&(this.lG=i,n.cG=i),++this.oG},t.prototype.shift=function(){var t=this.aG,n=t,i=this.hG,e=i+1,r=t.uG,o=r[i];return 16384===e&&(n=t.cG,e=0),--this.oG,this.hG=e,t!==n&&(this.aG=n),r[i]=void 0,o},t.prototype.forEach=function(t){for(var n=this.hG,i=this.aG,e=i.uG;!(n===e.length&&void 0===i.cG||n===e.length&&(n=0,0===(e=(i=i.cG).uG).length));)t(e[n]),++n},t.prototype.peek=function(){var t=this.aG,n=this.hG;return t.uG[n]},t}();function qh(t,n,i){var e=null;!0===i&&(e=v.prototype);var r=v.create(e);return r.value=t,r.done=n,r}function Vh(t,n){t.dG=!0,t.fG=n,n._G=t,"readable"===n.ja?Yh(t):"closed"===n.ja?function(t){Yh(t),$h(t)}(t):Kh(t,n.gG)}function Hh(t,n){return Qa(t.fG,n)}function Xh(t){"readable"===t.fG.ja?Gh(t,new a("Reader was released and can no longer be used to monitor the stream's closedness")):function(t,n){Kh(t,n)}(t,new a("Reader was released and can no longer be used to monitor the stream's closedness")),t.fG._G=void 0,t.fG=void 0}function jh(t){return new a("Cannot "+t+" a stream using a released reader")}function Yh(t){t.Mx=Dh((function(n,i){t.wG=n,t.vG=i}))}function Kh(t,n){Yh(t),Gh(t,n)}function Gh(t,n){zh(t.Mx),t.vG(n),t.wG=void 0,t.vG=void 0}function $h(t){t.wG(void 0),t.wG=void 0,t.vG=void 0}var Zh=lh("[[CancelSteps]]"),Jh=lh("[[PullSteps]]");function Qh(t,n){void 0===n&&(n=!1);var i=new uc(t);return i.dG=n,i}function tc(t){var n=Dh((function(n,i){var e={Kb:n,$b:i};t._G.AG.push(e)}));return n}function nc(t,n,i){var e=t._G;e.AG.shift().Kb(qh(n,i,e.dG))}function ic(t){return t._G.AG.length}function ec(t){var n=t._G;return void 0!==n&&!!sc(n)}var rc,oc,uc=function(){function t(t){if(!1===Za(t))throw new a("ReadableStreamDefaultReader can only be constructed with a ReadableStream instance");if(!0===Ja(t))throw new a("This stream has already been locked for exclusive reading by another reader");Vh(this,t),this.AG=new Wh}return v.defineProperty(t.prototype,"closed",{get:function(){return sc(this)?this.Mx:xh(hc("closed"))},enumerable:!0,configurable:!0}),t.prototype.cancel=function(t){return sc(this)?void 0===this.fG?xh(jh("cancel")):Hh(this,t):xh(hc("cancel"))},t.prototype.read=function(){return sc(this)?void 0===this.fG?xh(jh("read from")):fc(this):xh(hc("read"))},t.prototype.releaseLock=function(){if(!sc(this))throw hc("releaseLock");if(void 0!==this.fG){if(this.AG.length>0)throw new a("Tried to release a reader lock when that reader has pending read() calls un-settled");Xh(this)}},t}();function sc(t){return!!mh(t)&&!!v.prototype.hasOwnProperty.call(t,"AG")}function fc(t){var n=t.fG;return n.mG=!0,"closed"===n.ja?Ch(qh(void 0,!0,t.dG)):"errored"===n.ja?xh(n.gG):n.pG[Jh]()}function hc(t){return new a("ReadableStreamDefaultReader.prototype."+t+" can only be used on a ReadableStreamDefaultReader")}"symbol"==typeof lh.asyncIterator&&((rc={})[lh.asyncIterator]=function(){return this},oc=rc,v.defineProperty(oc,lh.asyncIterator,{enumerable:!1}));var cc={next:function(){if(!1===ac(this))return xh(vc("next"));var t=this.yG;return void 0===t.fG?xh(jh("iterate")):Fh(fc(t),(function(n){var i=n.done;return i&&Xh(t),qh(n.value,i,!0)}))},return:function(t){if(!1===ac(this))return xh(vc("next"));var n=this.yG;if(void 0===n.fG)return xh(jh("finish iterating"));if(n.AG.length>0)return xh(new a("Tried to release a reader lock when that reader has pending read() calls un-settled"));if(!1===this.MG){var i=Hh(n,t);return Xh(n),Fh(i,(function(){return qh(t,!0,!0)}))}return Xh(n),Ch(qh(t,!0,!0))}};function ac(t){return!!mh(t)&&!!v.prototype.hasOwnProperty.call(t,"yG")}function vc(t){return new a("ReadableStreamAsyncIterator."+t+" can only be used on a ReadableSteamAsyncIterator")}function dc(t){var n=t.TG.shift();return t.NG-=n.size,t.NG<0&&(t.NG=0),n.value}function lc(t,n,i){if(!_h(i=Number(i)))throw new RangeError("Size must be a finite, non-NaN, non-negative number.");t.TG.push({value:n,size:i}),t.NG+=i}function wc(t){t.TG=new Wh,t.NG=0}void 0!==oc&&v.setPrototypeOf(cc,oc),v.defineProperty(cc,"next",{enumerable:!1}),v.defineProperty(cc,"return",{enumerable:!1});var bc=lh("[[AbortSteps]]"),gc=lh("[[ErrorSteps]]"),mc=function(){function t(t,n){void 0===t&&(t={}),void 0===n&&(n={}),yc(this);var i=n.size,e=n.highWaterMark;if(void 0!==t.type)throw new RangeError("Invalid type is specified");var r=Rh(i);void 0===e&&(e=1),function(t,n,i,e){var r=v.create(Uc.prototype);function o(){return Eh(n,"start",[r])}var u=Th(n,"write",1,[r]),s=Th(n,"close",0,[]),f=Th(n,"abort",1,[]);Fc(t,r,o,u,s,f,i,e)}(this,t,e=kh(e),r)}return v.defineProperty(t.prototype,"locked",{get:function(){if(!1===_c(this))throw jc("locked");return Sc(this)},enumerable:!0,configurable:!0}),t.prototype.abort=function(t){return!1===_c(this)?xh(jc("abort")):!0===Sc(this)?xh(new a("Cannot abort a stream that already has a writer")):Tc(this,t)},t.prototype.close=function(){return!1===_c(this)?xh(jc("close")):!0===Sc(this)?xh(new a("Cannot close a stream that already has a writer")):!0===Oc(this)?xh(new a("Cannot close an already-closing stream")):Ec(this)},t.prototype.getWriter=function(){if(!1===_c(this))throw jc("getWriter");return pc(this)},t}();function pc(t){return new Ac(t)}function yc(t){t.ja="writable",t.gG=void 0,t.wL=void 0,t.DG=void 0,t.SG=new Wh,t.IG=void 0,t.EG=void 0,t.bG=void 0,t.LG=void 0,t.kG=!1}function _c(t){return!!mh(t)&&!!v.prototype.hasOwnProperty.call(t,"DG")}function Sc(t){return void 0!==t.wL}function Tc(t,n){var i=t.ja;if("closed"===i||"errored"===i)return Ch(void 0);if(void 0!==t.LG)return t.LG.xG;var e=!1;"erroring"===i&&(e=!0,n=void 0);var r=Dh((function(i,r){t.LG={xG:void 0,Kb:i,$b:r,CG:n,OG:e}}));return t.LG.xG=r,!1===e&&kc(t,n),r}function Ec(t){var n=t.ja;if("closed"===n||"errored"===n)return xh(new a("The stream (in "+n+" state) is not in the writable state and cannot be closed"));var i=Dh((function(n,i){var e={Kb:n,$b:i};t.EG=e})),e=t.wL;return void 0!==e&&!0===t.kG&&"writable"===n&&ea(e),function(t){lc(t,"close",0),qc(t)}(t.DG),i}function Ic(t,n){"writable"!==t.ja?Rc(t):kc(t,n)}function kc(t,n){var i=t.DG;t.ja="erroring",t.gG=n;var e=t.wL;void 0!==e&&Bc(e,n),!1===function(t){if(void 0===t.IG&&void 0===t.bG)return!1;return!0}(t)&&!0===i.jG&&Rc(t)}function Rc(t){t.ja="errored",t.DG[gc]();var n=t.gG;if(t.SG.forEach((function(t){t.$b(n)})),t.SG=new Wh,void 0!==t.LG){var i=t.LG;if(t.LG=void 0,!0===i.OG)return i.$b(n),void Nc(t);Mh(t.DG[bc](i.CG),(function(){i.Kb(),Nc(t)}),(function(n){i.$b(n),Nc(t)}))}else Nc(t)}function Oc(t){return void 0!==t.EG||void 0!==t.bG}function Nc(t){void 0!==t.EG&&(t.EG.$b(t.gG),t.EG=void 0);var n=t.wL;void 0!==n&&Zc(n,t.gG)}function Pc(t,n){var i=t.wL;void 0!==i&&n!==t.kG&&(!0===n?function(t){Qc(t)}(i):ea(i)),t.kG=n}var Ac=function(){function t(t){if(!1===_c(t))throw new a("WritableStreamDefaultWriter can only be constructed with a WritableStream instance");if(!0===Sc(t))throw new a("This stream has already been locked for exclusive writing by another writer");this.zG=t,t.wL=this;var n=t.ja;if("writable"===n)!1===Oc(t)&&!0===t.kG?Qc(this):na(this),Gc(this);else if("erroring"===n)ta(this,t.gG),Gc(this);else if("closed"===n)na(this),function(t){Gc(t),Jc(t)}(this);else{var i=t.gG;ta(this,i),$c(this,i)}}return v.defineProperty(t.prototype,"closed",{get:function(){return!1===Dc(this)?xh(Yc("closed")):this.Mx},enumerable:!0,configurable:!0}),v.defineProperty(t.prototype,"desiredSize",{get:function(){if(!1===Dc(this))throw Yc("desiredSize");if(void 0===this.zG)throw Kc("desiredSize");return function(t){var n=t.zG,i=n.ja;if("errored"===i||"erroring"===i)return null;if("closed"===i)return 0;return Wc(n.DG)}(this)},enumerable:!0,configurable:!0}),v.defineProperty(t.prototype,"ready",{get:function(){return!1===Dc(this)?xh(Yc("ready")):this.BG},enumerable:!0,configurable:!0}),t.prototype.abort=function(t){return!1===Dc(this)?xh(Yc("abort")):void 0===this.zG?xh(Kc("abort")):function(t,n){var i=t.zG;return Tc(i,n)}(this,t)},t.prototype.close=function(){if(!1===Dc(this))return xh(Yc("close"));var t=this.zG;return void 0===t?xh(Kc("close")):!0===Oc(t)?xh(new a("Cannot close an already-closing stream")):Cc(this)},t.prototype.releaseLock=function(){if(!1===Dc(this))throw Yc("releaseLock");void 0!==this.zG&&Mc(this)},t.prototype.write=function(t){return!1===Dc(this)?xh(Yc("write")):void 0===this.zG?xh(Kc("write to")):Lc(this,t)},t}();function Dc(t){return!!mh(t)&&!!v.prototype.hasOwnProperty.call(t,"zG")}function Cc(t){return Ec(t.zG)}function xc(t,n){"pending"===t.UG?Zc(t,n):function(t,n){$c(t,n)}(t,n)}function Bc(t,n){"pending"===t.QG?ia(t,n):function(t,n){ta(t,n)}(t,n)}function Mc(t){var n=t.zG,i=new a("Writer was released and can no longer be used to monitor the stream's closedness");Bc(t,i),xc(t,i),n.wL=void 0,t.zG=void 0}function Lc(t,n){var i=t.zG,e=i.DG,r=function(t,n){try{return t.FG(n)}catch(n){return Vc(t,n),1}}(e,n);if(i!==t.zG)return xh(Kc("write to"));var o=i.ja;if("errored"===o)return xh(i.gG);if(!0===Oc(i)||"closed"===o)return xh(new a("The stream is closing or closed and cannot be written to"));if("erroring"===o)return xh(i.gG);var u=function(t){var n=Dh((function(n,i){var e={Kb:n,$b:i};t.SG.push(e)}));return n}(i);return function(t,n,i){var e={chunk:n};try{lc(t,e,i)}catch(n){return void Vc(t,n)}var r=t.YG;if(!1===Oc(r)&&"writable"===r.ja){Pc(r,Hc(t))}qc(t)}(e,n,r),u}var Uc=function(){function t(){throw new a("WritableStreamDefaultController cannot be constructed explicitly")}return t.prototype.error=function(t){if(!1===function(t){if(!mh(t))return!1;if(!v.prototype.hasOwnProperty.call(t,"YG"))return!1;return!0}(this))throw new a("WritableStreamDefaultController.prototype.error can only be used on a WritableStreamDefaultController");"writable"===this.YG.ja&&Xc(this,t)},t.prototype[bc]=function(t){var n=this.GG(t);return zc(this),n},t.prototype[gc]=function(){wc(this)},t}();function Fc(t,n,i,e,r,o,u,s){n.YG=t,t.DG=n,n.TG=void 0,n.NG=void 0,wc(n),n.jG=!1,n.FG=s,n.VG=u,n.WG=e,n.HG=r,n.GG=o;var f=Hc(n);Pc(t,f),Mh(Ch(i()),(function(){n.jG=!0,qc(n)}),(function(i){n.jG=!0,Ic(t,i)}))}function zc(t){t.WG=void 0,t.HG=void 0,t.GG=void 0,t.FG=void 0}function Wc(t){return t.VG-t.NG}function qc(t){var n=t.YG;if(!1!==t.jG&&void 0===n.IG)if("erroring"!==n.ja){if(0!==t.TG.length){var i=function(t){return t.TG.peek().value}(t);"close"===i?function(t){var n=t.YG;(function(t){t.bG=t.EG,t.EG=void 0})(n),dc(t);var i=t.HG();zc(t),Mh(i,(function(){!function(t){t.bG.Kb(void 0),t.bG=void 0,"erroring"===t.ja&&(t.gG=void 0,void 0!==t.LG&&(t.LG.Kb(),t.LG=void 0)),t.ja="closed";var n=t.wL;void 0!==n&&Jc(n)}(n)}),(function(t){!function(t,n){t.bG.$b(n),t.bG=void 0,void 0!==t.LG&&(t.LG.$b(n),t.LG=void 0),Ic(t,n)}(n,t)}))}(t):function(t,n){var i=t.YG;!function(t){t.IG=t.SG.shift()}(i);var e=t.WG(n);Mh(e,(function(){!function(t){t.IG.Kb(void 0),t.IG=void 0}(i);var n=i.ja;if(dc(t),!1===Oc(i)&&"writable"===n){var e=Hc(t);Pc(i,e)}qc(t)}),(function(n){"writable"===i.ja&&zc(t),function(t,n){t.IG.$b(n),t.IG=void 0,Ic(t,n)}(i,n)}))}(t,i.chunk)}}else Rc(n)}function Vc(t,n){"writable"===t.YG.ja&&Xc(t,n)}function Hc(t){return Wc(t)<=0}function Xc(t,n){var i=t.YG;zc(t),kc(i,n)}function jc(t){return new a("WritableStream.prototype."+t+" can only be used on a WritableStream")}function Yc(t){return new a("WritableStreamDefaultWriter.prototype."+t+" can only be used on a WritableStreamDefaultWriter")}function Kc(t){return new a("Cannot "+t+" a stream using a released writer")}function Gc(t){t.Mx=Dh((function(n,i){t.wG=n,t.vG=i,t.UG="pending"}))}function $c(t,n){Gc(t),Zc(t,n)}function Zc(t,n){zh(t.Mx),t.vG(n),t.wG=void 0,t.vG=void 0,t.UG="rejected"}function Jc(t){t.wG(void 0),t.wG=void 0,t.vG=void 0,t.UG="resolved"}function Qc(t){t.BG=Dh((function(n,i){t.qG=n,t.XG=i})),t.QG="pending"}function ta(t,n){Qc(t),ia(t,n)}function na(t){Qc(t),ea(t)}function ia(t,n){zh(t.BG),t.XG(n),t.qG=void 0,t.XG=void 0,t.QG="rejected"}function ea(t){t.qG(void 0),t.qG=void 0,t.XG=void 0,t.QG="fulfilled"}function ra(t){if("object"!=typeof t||null===t)return!1;try{return"boolean"==typeof t.aborted}catch(t){return!1}}var oa="undefined"!=typeof DOMException?DOMException:void 0;var ua=function(t){if("function"!=typeof t&&"object"!=typeof t)return!1;try{return new t,!0}catch(t){return!1}}(oa)?oa:function(){var t=function(t,n){this.message=t||"",this.name=n||"Error",c.captureStackTrace&&c.captureStackTrace(this,this.constructor)};return t.prototype=v.create(c.prototype),v.defineProperty(t.prototype,"constructor",{value:t,writable:!0,configurable:!0}),t}();function sa(t,n,i,e,r,o){var u=Qh(t),s=pc(n);t.mG=!0;var f=!1,h=Ch(void 0);return Dh((function(c,v){var d,l,w,b;if(void 0!==o){if(d=function(){var i=new ua("Aborted","AbortError"),o=[];!1===e&&o.push((function(){return"writable"===n.ja?Tc(n,i):Ch(void 0)})),!1===r&&o.push((function(){return"readable"===t.ja?Qa(t,i):Ch(void 0)})),y((function(){return X.all(o.map((function(t){return t()})))}),!0,i)},!0===o.aborted)return void d();o.addEventListener("abort",d)}if(p(t,u.Mx,(function(t){!1===e?y((function(){return Tc(n,t)}),!0,t):_(!0,t)})),p(n,s.Mx,(function(n){!1===r?y((function(){return Qa(t,n)}),!0,n):_(!0,n)})),l=t,w=u.Mx,b=function(){!1===i?y((function(){return function(t){var n=t.zG,i=n.ja;return!0===Oc(n)||"closed"===i?Ch(void 0):"errored"===i?xh(n.gG):Cc(t)}(s)})):_()},"closed"===l.ja?b():Lh(w,b),!0===Oc(n)||"closed"===n.ja){var g=new a("the destination writable stream closed before all data could be piped to it");!1===r?y((function(){return Qa(t,g)}),!0,g):_(!0,g)}function m(){var t=h;return Bh(h,(function(){return t!==h?m():void 0}))}function p(t,n,i){"errored"===t.ja?i(t.gG):Uh(n,i)}function y(t,i,e){function r(){Mh(t(),(function(){return S(i,e)}),(function(t){return S(!0,t)}))}!0!==f&&(f=!0,"writable"===n.ja&&!1===Oc(n)?Lh(m(),r):r())}function _(t,i){!0!==f&&(f=!0,"writable"===n.ja&&!1===Oc(n)?Lh(m(),(function(){return S(t,i)})):S(t,i))}function S(t,n){Mc(s),Xh(u),void 0!==o&&o.removeEventListener("abort",d),t?v(n):c(void 0)}zh(Dh((function(t,n){!function i(e){e?t():Bh(!0===f?Ch(!0):Bh(s.BG,(function(){return Bh(fc(u),(function(t){return!0===t.done||(h=Bh(Lc(s,t.value),void 0,wh),!1)}))})),i,n)}(!1)})))}))}var fa=function(){function t(){throw new a}return v.defineProperty(t.prototype,"desiredSize",{get:function(){if(!1===ha(this))throw pa("desiredSize");return ba(this)},enumerable:!0,configurable:!0}),t.prototype.close=function(){if(!1===ha(this))throw pa("close");if(!1===ga(this))throw new a("The stream is not in a state that permits close");da(this)},t.prototype.enqueue=function(t){if(!1===ha(this))throw pa("enqueue");if(!1===ga(this))throw new a("The stream is not in a state that permits enqueue");return la(this,t)},t.prototype.error=function(t){if(!1===ha(this))throw pa("error");wa(this,t)},t.prototype[Zh]=function(t){wc(this);var n=this.ZG(t);return va(this),n},t.prototype[Jh]=function(){var t=this.KG;if(this.TG.length>0){var n=dc(this);return!0===this.JG&&0===this.TG.length?(va(this),tv(t)):ca(this),Ch(qh(n,!1,t._G.dG))}var i=tc(t);return ca(this),i},t}();function ha(t){return!!mh(t)&&!!v.prototype.hasOwnProperty.call(t,"KG")}function ca(t){!1!==aa(t)&&(!0!==t.$G?(t.$G=!0,Mh(t.tV(),(function(){t.$G=!1,!0===t.iV&&(t.iV=!1,ca(t))}),(function(n){wa(t,n)}))):t.iV=!0)}function aa(t){var n=t.KG;return!1!==ga(t)&&(!1!==t.jG&&(!0===Ja(n)&&ic(n)>0||ba(t)>0))}function va(t){t.tV=void 0,t.ZG=void 0,t.FG=void 0}function da(t){var n=t.KG;t.JG=!0,0===t.TG.length&&(va(t),tv(n))}function la(t,n){var i=t.KG;if(!0===Ja(i)&&ic(i)>0)nc(i,n,!1);else{var e=void 0;try{e=t.FG(n)}catch(n){throw wa(t,n),n}try{lc(t,n,e)}catch(n){throw wa(t,n),n}}ca(t)}function wa(t,n){var i=t.KG;"readable"===i.ja&&(wc(t),va(t),nv(i,n))}function ba(t){var n=t.KG.ja;return"errored"===n?null:"closed"===n?0:t.VG-t.NG}function ga(t){var n=t.KG.ja;return!1===t.JG&&"readable"===n}function ma(t,n,i,e,r,o,u){n.KG=t,n.TG=void 0,n.NG=void 0,wc(n),n.jG=!1,n.JG=!1,n.iV=!1,n.$G=!1,n.FG=u,n.VG=o,n.tV=e,n.ZG=r,t.pG=n,Mh(Ch(i()),(function(){n.jG=!0,ca(n)}),(function(t){wa(n,t)}))}function pa(t){return new a("ReadableStreamDefaultController.prototype."+t+" can only be used on a ReadableStreamDefaultController")}var ya=Number.isInteger||function(t){return"number"==typeof t&&isFinite(t)&&d.floor(t)===t},_a=function(){function t(){throw new a("ReadableStreamBYOBRequest cannot be used directly")}return v.defineProperty(t.prototype,"view",{get:function(){if(!1===Ea(this))throw za("view");return this.aS},enumerable:!0,configurable:!0}),t.prototype.respond=function(t){if(!1===Ea(this))throw za("respond");if(void 0===this.eV)throw new a("This BYOB request has been invalidated");this.aS.buffer,function(t,n){if(n=Number(n),!1===_h(n))throw new RangeError("bytesWritten must be a finite");xa(t,n)}(this.eV,t)},t.prototype.respondWithNewView=function(t){if(!1===Ea(this))throw za("respond");if(void 0===this.eV)throw new a("This BYOB request has been invalidated");if(!ArrayBuffer.isView(t))throw new a("You can only respond with array buffer views");t.buffer,function(t,n){var i=t.sV.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,xa(t,n.byteLength)}(this.eV,t)},t}(),Sa=function(){function t(){throw new a("ReadableByteStreamController constructor cannot be used directly")}return v.defineProperty(t.prototype,"byobRequest",{get:function(){if(!1===Ta(this))throw Wa("byobRequest");if(void 0===this.nV&&this.sV.length>0){var t=this.sV.peek(),n=new g(t.buffer,t.byteOffset+t.bytesFilled,t.byteLength-t.bytesFilled),i=v.create(_a.prototype);!function(t,n,i){t.eV=n,t.aS=i}(i,this,n),this.nV=i}return this.nV},enumerable:!0,configurable:!0}),v.defineProperty(t.prototype,"desiredSize",{get:function(){if(!1===Ta(this))throw Wa("desiredSize");return Ua(this)},enumerable:!0,configurable:!0}),t.prototype.close=function(){if(!1===Ta(this))throw Wa("close");if(!0===this.JG)throw new a("The stream has already been closed; do not close it again!");var t=this.rV.ja;if("readable"!==t)throw new a("The stream (in "+t+" state) is not in the readable state and cannot be closed");!function(t){var n=t.rV;if(t.NG>0)return void(t.JG=!0);if(t.sV.length>0){if(t.sV.peek().bytesFilled>0){var i=new a("Insufficient bytes to fill elements in the given buffer");throw La(t,i),i}}Ma(t),tv(n)}(this)},t.prototype.enqueue=function(t){if(!1===Ta(this))throw Wa("enqueue");if(!0===this.JG)throw new a("stream is closed or draining");var n=this.rV.ja;if("readable"!==n)throw new a("The stream (in "+n+" state) is not in the readable state and cannot be enqueued to");if(!ArrayBuffer.isView(t))throw new a("You can only enqueue array buffer views when using a ReadableByteStreamController");t.buffer,function(t,n){var i=t.rV,e=n.buffer,r=n.byteOffset,o=n.byteLength,u=e;if(!0===ec(i)){if(0===ic(i))Oa(t,u,r,o);else nc(i,new g(u,r,o),!1)}else!0===Ha(i)?(Oa(t,u,r,o),Ca(t)):Oa(t,u,r,o);Ia(t)}(this,t)},t.prototype.error=function(t){if(!1===Ta(this))throw Wa("error");La(this,t)},t.prototype[Zh]=function(t){this.sV.length>0&&(this.sV.peek().bytesFilled=0);wc(this);var n=this.ZG(t);return Ma(this),n},t.prototype[Jh]=function(){var t=this.rV;if(this.NG>0){var n=this.TG.shift();this.NG-=n.byteLength,Aa(this);var i=void 0;try{i=new g(n.buffer,n.byteOffset,n.byteLength)}catch(t){return xh(t)}return Ch(qh(i,!1,t._G.dG))}var e=this.hV;if(void 0!==e){var r=void 0;try{r=new ArrayBuffer(e)}catch(t){return xh(t)}var o={buffer:r,byteOffset:0,byteLength:e,bytesFilled:0,elementSize:1,ctor:g,readerType:"default"};this.sV.push(o)}var u=tc(t);return Ia(this),u},t}();function Ta(t){return!!mh(t)&&!!v.prototype.hasOwnProperty.call(t,"rV")}function Ea(t){return!!mh(t)&&!!v.prototype.hasOwnProperty.call(t,"eV")}function Ia(t){var n=function(t){var n=t.rV;if("readable"!==n.ja)return!1;if(!0===t.JG)return!1;if(!1===t.jG)return!1;if(!0===ec(n)&&ic(n)>0)return!0;if(!0===Ha(n)&&Va(n)>0)return!0;var i=Ua(t);if(i>0)return!0;return!1}(t);!1!==n&&(!0!==t.$G?(t.$G=!0,Mh(t.tV(),(function(){t.$G=!1,!0===t.iV&&(t.iV=!1,Ia(t))}),(function(n){La(t,n)}))):t.iV=!0)}function ka(t,n){var i=!1;"closed"===t.ja&&(i=!0);var e=Ra(n);"default"===n.readerType?nc(t,e,i):function(t,n,i){var e=t._G,r=e.oV.shift();r.Kb(qh(n,i,e.dG))}(t,e,i)}function Ra(t){var n=t.bytesFilled,i=t.elementSize;return new t.ctor(t.buffer,t.byteOffset,n/i)}function Oa(t,n,i,e){t.TG.push({buffer:n,byteOffset:i,byteLength:e}),t.NG+=e}function Na(t,n){var i=n.elementSize,e=n.bytesFilled-n.bytesFilled%i,r=d.min(t.NG,n.byteLength-n.bytesFilled),o=n.bytesFilled+r,u=o-o%i,s=r,f=!1;u>e&&(s=u-n.bytesFilled,f=!0);for(var h=t.TG;s>0;){var c=h.peek(),a=d.min(s,c.byteLength),v=n.byteOffset+n.bytesFilled;yh(n.buffer,v,c.buffer,c.byteOffset,a),c.byteLength===a?h.shift():(c.byteOffset+=a,c.byteLength-=a),t.NG-=a,Pa(t,a,n),s-=a}return f}function Pa(t,n,i){Da(t),i.bytesFilled+=n}function Aa(t){0===t.NG&&!0===t.JG?(Ma(t),tv(t.rV)):Ia(t)}function Da(t){void 0!==t.nV&&(t.nV.eV=void 0,t.nV.aS=void 0,t.nV=void 0)}function Ca(t){for(;t.sV.length>0;){if(0===t.NG)return;var n=t.sV.peek();!0===Na(t,n)&&(Ba(t),ka(t.rV,n))}}function xa(t,n){var i=t.sV.peek();if("closed"===t.rV.ja){if(0!==n)throw new a("bytesWritten must be 0 when calling respond() on a closed stream");!function(t,n){n.buffer=n.buffer;var i=t.rV;if(!0===Ha(i))for(;Va(i)>0;)ka(i,Ba(t))}(t,i)}else!function(t,n,i){if(i.bytesFilled+n>i.byteLength)throw new RangeError("bytesWritten out of range");if(Pa(t,n,i),!(i.bytesFilled<i.elementSize)){Ba(t);var e=i.bytesFilled%i.elementSize;if(e>0){var r=i.byteOffset+i.bytesFilled,o=i.buffer.slice(r-e,r);Oa(t,o,0,o.byteLength)}i.buffer=i.buffer,i.bytesFilled-=e,ka(t.rV,i),Ca(t)}}(t,n,i);Ia(t)}function Ba(t){var n=t.sV.shift();return Da(t),n}function Ma(t){t.tV=void 0,t.ZG=void 0}function La(t,n){var i=t.rV;"readable"===i.ja&&(!function(t){Da(t),t.sV=new Wh}(t),wc(t),Ma(t),nv(i,n))}function Ua(t){var n=t.rV.ja;return"errored"===n?null:"closed"===n?0:t.VG-t.NG}function Fa(t,n,i){var e=v.create(Sa.prototype);var r=Th(n,"pull",0,[e]),o=Th(n,"cancel",1,[]),u=n.autoAllocateChunkSize;if(void 0!==u&&(u=Number(u),!1===ya(u)||u<=0))throw new RangeError("autoAllocateChunkSize must be a positive integer");!function(t,n,i,e,r,o,u){n.rV=t,n.iV=!1,n.$G=!1,n.nV=void 0,n.TG=n.NG=void 0,wc(n),n.JG=!1,n.jG=!1,n.VG=kh(o),n.tV=e,n.ZG=r,n.hV=u,n.sV=new Wh,t.pG=n,Mh(Ch(i()),(function(){n.jG=!0,Ia(n)}),(function(t){La(n,t)}))}(t,e,(function(){return Eh(n,"start",[e])}),r,o,i,u)}function za(t){return new a("ReadableStreamBYOBRequest.prototype."+t+" can only be used on a ReadableStreamBYOBRequest")}function Wa(t){return new a("ReadableByteStreamController.prototype."+t+" can only be used on a ReadableByteStreamController")}function qa(t){var n=Dh((function(n,i){var e={Kb:n,$b:i};t._G.oV.push(e)}));return n}function Va(t){return t._G.oV.length}function Ha(t){var n=t._G;return void 0!==n&&!!ja(n)}var Xa=function(){function t(t){if(!Za(t))throw new a("ReadableStreamBYOBReader can only be constructed with a ReadableStream instance given a byte source");if(!1===Ta(t.pG))throw new a("Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte source");if(Ja(t))throw new a("This stream has already been locked for exclusive reading by another reader");Vh(this,t),this.oV=new Wh}return v.defineProperty(t.prototype,"closed",{get:function(){return ja(this)?this.Mx:xh(Ya("closed"))},enumerable:!0,configurable:!0}),t.prototype.cancel=function(t){return ja(this)?void 0===this.fG?xh(jh("cancel")):Hh(this,t):xh(Ya("cancel"))},t.prototype.read=function(t){return ja(this)?void 0===this.fG?xh(jh("read from")):ArrayBuffer.isView(t)?(t.buffer,0===t.byteLength?xh(new a("view must have non-zero byteLength")):function(t,n){var i=t.fG;if(i.mG=!0,"errored"===i.ja)return xh(i.gG);return function(t,n){var i=t.rV,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.sV.length>0)return t.sV.push(o),qa(i);if("closed"===i.ja)return Ch(qh(new r(o.buffer,o.byteOffset,0),!0,i._G.dG));if(t.NG>0){if(!0===Na(t,o)){var u=Ra(o);return Aa(t),Ch(qh(u,!1,i._G.dG))}if(!0===t.JG){var s=new a("Insufficient bytes to fill elements in the given buffer");return La(t,s),xh(s)}}t.sV.push(o);var f=qa(i);return Ia(t),f}(i.pG,n)}(this,t)):xh(new a("view must be an array buffer view")):xh(Ya("read"))},t.prototype.releaseLock=function(){if(!ja(this))throw Ya("releaseLock");if(void 0!==this.fG){if(this.oV.length>0)throw new a("Tried to release a reader lock when that reader has pending read() calls un-settled");Xh(this)}},t}();function ja(t){return!!mh(t)&&!!v.prototype.hasOwnProperty.call(t,"oV")}function Ya(t){return new a("ReadableStreamBYOBReader.prototype."+t+" can only be used on a ReadableStreamBYOBReader")}var Ka=function(){function t(t,n){void 0===t&&(t={}),void 0===n&&(n={}),$a(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),Fa(this,t,e=kh(e))}else{if(void 0!==r)throw new RangeError("Invalid type is specified");var o=Rh(i);void 0===e&&(e=1),function(t,n,i,e){var r=v.create(fa.prototype),o=Th(n,"pull",0,[r]),u=Th(n,"cancel",1,[]);ma(t,r,(function(){return Eh(n,"start",[r])}),o,u,i,e)}(this,t,e=kh(e),o)}}return v.defineProperty(t.prototype,"locked",{get:function(){if(!1===Za(this))throw iv("locked");return Ja(this)},enumerable:!0,configurable:!0}),t.prototype.cancel=function(t){return!1===Za(this)?xh(iv("cancel")):!0===Ja(this)?xh(new a("Cannot cancel a stream that already has a reader")):Qa(this,t)},t.prototype.getReader=function(t){var n=(void 0===t?{}:t).mode;if(!1===Za(this))throw iv("getReader");if(void 0===n)return Qh(this,!0);if("byob"===(n=String(n)))return function(t,n){void 0===n&&(n=!1);var i=new Xa(t);return i.dG=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===Za(this))throw iv("pipeThrough");if(!1===_c(i))throw new a("writable argument to pipeThrough must be a WritableStream");if(!1===Za(e))throw new a("readable argument to pipeThrough must be a ReadableStream");if(o=Boolean(o),u=Boolean(u),s=Boolean(s),void 0!==f&&!ra(f))throw new a("ReadableStream.prototype.pipeThrough's signal option must be an AbortSignal");if(!0===Ja(this))throw new a("ReadableStream.prototype.pipeThrough cannot be used on a locked ReadableStream");if(!0===Sc(i))throw new a("ReadableStream.prototype.pipeThrough cannot be used on a locked WritableStream");return zh(sa(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===Za(this)?xh(iv("pipeTo")):!1===_c(t)?xh(new a("ReadableStream.prototype.pipeTo's first argument must be a WritableStream")):(e=Boolean(e),r=Boolean(r),o=Boolean(o),void 0===u||ra(u)?!0===Ja(this)?xh(new a("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream")):!0===Sc(t)?xh(new a("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream")):sa(this,t,e,r,o,u):xh(new a("ReadableStream.prototype.pipeTo's signal option must be an AbortSignal")))},t.prototype.tee=function(){if(!1===Za(this))throw iv("tee");var t=function(t,n){var i,e,r,o,u,s=Qh(t),f=!1,h=!1,c=!1,a=Dh((function(t){u=t}));function v(){return!0===f||(f=!0,zh(Fh(fc(s),(function(t){if(f=!1,!0===t.done)return!1===h&&da(r.pG),void(!1===c&&da(o.pG));var n=t.value,i=n,e=n;!1===h&&la(r.pG,i),!1===c&&la(o.pG,e)})))),Ch(void 0)}function d(){}return r=Ga(d,v,(function(n){if(h=!0,i=n,!0===c){var r=ph([i,e]),o=Qa(t,r);u(o)}return a})),o=Ga(d,v,(function(n){if(c=!0,e=n,!0===h){var r=ph([i,e]),o=Qa(t,r);u(o)}return a})),Uh(s.Mx,(function(t){wa(r.pG,t),wa(o.pG,t)})),[r,o]}(this);return ph(t)},t.prototype.getIterator=function(t){var n=(void 0===t?{}:t).preventCancel,i=void 0!==n&&n;if(!1===Za(this))throw iv("getIterator");return function(t,n){void 0===n&&(n=!1);var i=Qh(t),e=v.create(cc);return e.yG=i,e.MG=Boolean(n),e}(this,i)},t}();function Ga(t,n,i,e,r){void 0===e&&(e=1),void 0===r&&(r=function(){return 1});var o=v.create(Ka.prototype);return $a(o),ma(o,v.create(fa.prototype),t,n,i,e,r),o}function $a(t){t.ja="readable",t._G=void 0,t.gG=void 0,t.mG=!1}function Za(t){return!!mh(t)&&!!v.prototype.hasOwnProperty.call(t,"pG")}function Ja(t){return void 0!==t._G}function Qa(t,n){return t.mG=!0,"closed"===t.ja?Ch(void 0):"errored"===t.ja?xh(t.gG):(tv(t),Fh(t.pG[Zh](n),wh))}function tv(t){t.ja="closed";var n=t._G;void 0!==n&&(sc(n)&&(n.AG.forEach((function(t){t.Kb(qh(void 0,!0,n.dG))})),n.AG=new Wh),$h(n))}function nv(t,n){t.ja="errored",t.gG=n;var i=t._G;void 0!==i&&(sc(i)?(i.AG.forEach((function(t){t.$b(n)})),i.AG=new Wh):(i.oV.forEach((function(t){t.$b(n)})),i.oV=new Wh),Gh(i,n))}function iv(t){return new a("ReadableStream.prototype."+t+" can only be used on a ReadableStream")}"symbol"==typeof lh.asyncIterator&&v.defineProperty(Ka.prototype,lh.asyncIterator,{value:Ka.prototype.getIterator,enumerable:!1,writable:!0,configurable:!0});(function(){function t(t){var n=t.highWaterMark;this.highWaterMark=n}t.prototype.size=function(t){return t.byteLength}})(),function(){function t(t){var n=t.highWaterMark;this.highWaterMark=n}t.prototype.size=function(){return 1}}();var ev=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=Rh(e);if(void 0===r&&(r=1),r=kh(r),void 0!==t.readableType)throw new RangeError("Invalid readable type specified");var f,h=Rh(o);void 0===u&&(u=0),u=kh(u),function(t,n,i,e,r,o){function u(){return n}function s(n){return function(t,n){var i=t.aV;if(!0===t.kG){return Fh(t.uV,(function(){var e=t.cV;if("erroring"===e.ja)throw e.gG;return dv(i,n)}))}return dv(i,n)}(t,n)}function f(n){return function(t,n){return ov(t,n),Ch(void 0)}(t,n)}function h(){return function(t){var n=t.lV,i=t.aV,e=i.dV();return av(i),Fh(e,(function(){if("errored"===n.ja)throw n.gG;var t=n.pG;!0===ga(t)&&da(t)}),(function(i){throw ov(t,i),n.gG}))}(t)}function c(){return function(t){return sv(t,!1),t.uV}(t)}function a(n){return uv(t,n),Ch(void 0)}t.cV=function(t,n,i,e,r,o){void 0===r&&(r=1),void 0===o&&(o=function(){return 1});var u=v.create(mc.prototype);return yc(u),Fc(u,v.create(Uc.prototype),t,n,i,e,r,o),u}(u,s,h,f,i,e),t.lV=Ga(u,c,a,r,o),t.kG=void 0,t.uV=void 0,t.fV=void 0,sv(t,!0),t.aV=void 0}(this,Dh((function(t){f=t})),r,s,u,h),function(t,n){var i=v.create(hv.prototype),e=function(t){try{return vv(i,t),Ch(void 0)}catch(t){return xh(t)}},r=n.transform;if(void 0!==r){if("function"!=typeof r)throw new a("transform is not a method");e=function(t){return Ih(r,n,[t,i])}}var o=Th(n,"flush",0,[i]);!function(t,n,i,e){n._V=t,t.aV=n,n.gV=i,n.dV=e}(t,i,e,o)}(this,t);var c=Eh(t,"start",[this.aV]);f(c)}return v.defineProperty(t.prototype,"readable",{get:function(){if(!1===rv(this))throw wv("readable");return this.lV},enumerable:!0,configurable:!0}),v.defineProperty(t.prototype,"writable",{get:function(){if(!1===rv(this))throw wv("writable");return this.cV},enumerable:!0,configurable:!0}),t}();function rv(t){return!!mh(t)&&!!v.prototype.hasOwnProperty.call(t,"aV")}function ov(t,n){wa(t.lV.pG,n),uv(t,n)}function uv(t,n){av(t.aV),Vc(t.cV.DG,n),!0===t.kG&&sv(t,!1)}function sv(t,n){void 0!==t.uV&&t.fV(),t.uV=Dh((function(n){t.fV=n})),t.kG=n}var fv,hv=function(){function t(){throw new a("TransformStreamDefaultController instances cannot be created directly")}return v.defineProperty(t.prototype,"desiredSize",{get:function(){if(!1===cv(this))throw lv("desiredSize");return ba(this._V.lV.pG)},enumerable:!0,configurable:!0}),t.prototype.enqueue=function(t){if(!1===cv(this))throw lv("enqueue");vv(this,t)},t.prototype.error=function(t){if(!1===cv(this))throw lv("error");!function(t,n){ov(t._V,n)}(this,t)},t.prototype.terminate=function(){if(!1===cv(this))throw lv("terminate");!function(t){var n=t._V,i=n.lV.pG;!0===ga(i)&&da(i);var e=new a("TransformStream terminated");uv(n,e)}(this)},t}();function cv(t){return!!mh(t)&&!!v.prototype.hasOwnProperty.call(t,"_V")}function av(t){t.gV=void 0,t.dV=void 0}function vv(t,n){var i=t._V,e=i.lV.pG;if(!1===ga(e))throw new a("Readable side is not in a state that permits enqueue");try{la(e,n)}catch(t){throw uv(i,t),i.lV.gG}var r=function(t){return!0!==aa(t)}(e);r!==i.kG&&sv(i,!0)}function dv(t,n){return Fh(t.gV(n),void 0,(function(n){throw ov(t._V,n),n}))}function lv(t){return new a("TransformStreamDefaultController.prototype."+t+" can only be used on a TransformStreamDefaultController")}function wv(t){return new a("TransformStream.prototype."+t+" can only be used on a TransformStream")}function bv(t){return function(t){return new Ka({start:function(n){for(var i=0;i<t.length;i++){var e=t[i];n.enqueue(e)}n.close()}})}([t])}function gv(t){return bv(function(t){return new g(t)}(t))}function mv(t,n){return function(t,n){var i=n,e=t.getReader(),r=new nu,o=function(){u();var t=new Jt;e.cancel(t).catch(_t),r.Jb(t)},u=function(){i&&(i.Yd(o),i=void 0)};i&&(i.zd?o():i.Fd(o));var s=[],f=function(t){return t.done?(u(),X.resolve(s)):(s.push(t.value),X.resolve(e.read()).then(f))};return X.resolve(e.read()).then(f).then((function(t){u(),r.Zb(t)}),(function(t){u(),r.Jb(t)})),r.tL}(t,n).then((function(t){return zn(t).buffer}))}function pv(t,n){var i=n,e=new ev,r=e.readable,o=e.writable,u=o.getWriter(),s=function(){i&&i.qd()};return u.closed.then(s,s),t.then((function(t){return i=void 0,u.releaseLock(),t.pipeTo(o).catch(_t)}),(function(t){return i=void 0,u.releaseLock(),o.abort(t).catch(_t)})),r}function yv(t){return ui(new g(t))}function _v(t){return si(t).buffer}!function(t){t[t.qS=0]="qS",t[t.wV=1]="wV"}(fv||(fv={}));var Sv="content-type",Tv="text/plain;charset=UTF-8",Ev=function(){function t(){}var n=t.prototype;return n.ZO=function(t){return this.bI(t).then(JSON.parse)},n.bO=function(t,n){switch(t){case ch.WS:return this.gj(n);case ch.HS:return this.ZO(n);case ch.qS:return this.vV();case ch.Ru:return this.bI(n);default:throw new a}},t}();function Iv(t,n,i){if(t instanceof Ev)return t;if(t instanceof Ka)return function(t,n){return new Rv({Rg:0,vV:t,HP:kv(n)})}(t,i);var e=kv(i),r=X.resolve(t).then((function(t){return function(t,n){if(t){if("string"==typeof t)return{Rg:ch.Ru,fI:t,HP:n||Tv};if(t instanceof ArrayBuffer||Fn(t))return{Rg:ch.WS,fI:xv(t),HP:n};if(function(t){return ft(t)&&t.constructor&&t.constructor===v}(t)||st(t))return{Rg:ch.HS,fI:t,HP:n};throw new a("Unsupported BodyInit type")}return{Rg:ch.Ru,fI:null,HP:n}}(t,e)}));return new Rv({Rg:1,tL:r,AV:n})}function kv(t){return(t.get(Sv)||"").toLowerCase()}var Rv=function(t){function n(n){var i;return(i=t.call(this)||this).pV=!1,i.NV=new nu,i.NV.tL.catch(_t),i.EV(n),i}Rt(n,t);var i=n.prototype;return i.TV=function(){return this.NV.tL},i.bI=function(t){return this.DV(Ov,t)},i.ZO=function(t){return this.DV(Pv,t)},i.gj=function(t){return this.DV(Dv,t)},i.vV=function(){return this.SV(function(t){return 0===t.Rg?t.vV:pv(t.tL.then(Cv).then(gv),t.AV)}(this.MV))},i.DV=function(t,n){if(this.pV)return X.reject(new a("Already used"));this.pV=!0;var i=t(this.MV,n);return this.NV.Xd(i.then(_t)),i},i.SV=function(t){if(this.pV)throw new a("Already used");if(t.locked)throw new a("Body stream is locked");this.pV=!0;var n=new ev,i=X.resolve(t.pipeTo(n.writable));return this.NV.Xd(i),n.readable},i.EV=function(t){this.MV=t,1===t.Rg&&t.tL.catch(_t)},i.bV=function(){if(this.pV)throw new a("Already used");var t=function(t){if(0===t.Rg){var n=Ot(t.vV.tee(),2),i=n[0],e=n[1];return[{Rg:t.Rg,vV:i,HP:t.HP},{Rg:t.Rg,vV:e,HP:t.HP}]}var r=Ot(t.AV.Zd(),2),o=r[0],u=r[1];return[{Rg:t.Rg,tL:t.tL,AV:o},{Rg:t.Rg,tL:t.tL,AV:u}]}(this.MV),i=t[0],e=t[1];return this.EV(i),new n(e)},It(n,[{key:"mV",get:function(){return this.pV}},{key:"yV",get:function(){return 0===this.MV.Rg}}]),n}(Ev);function Ov(t,n){return 0===t.Rg?mv(t.vV,n).then(yv):(n&&t.AV.Xd(n),nn(t.tL.then(Nv),t.AV))}function Nv(t){switch(t.Rg){case ch.Ru:return X.resolve(t.fI||"");case ch.WS:return X.resolve(t.fI).then(yv);case ch.HS:return X.resolve(t.fI).then(JSON.stringify)}}function Pv(t,n){return 0===t.Rg?Ov(t,n).then(JSON.parse):(n&&t.AV.Xd(n),nn(t.tL.then(Av),t.AV))}function Av(t){return t.Rg===ch.HS?X.resolve(t.fI):Nv(t).then(JSON.parse)}function Dv(t,n){return 0===t.Rg?mv(t.vV,n):(n&&t.AV.Xd(n),nn(t.tL.then(Cv),t.AV))}function Cv(t){switch(t.Rg){case ch.WS:return X.resolve(t.fI);case ch.Ru:case ch.HS:return Nv(t).then(_v)}}function xv(t){return t instanceof ArrayBuffer?t:ai(hi(t)).buffer}var Bv=function(t){function n(n){var i;return(i=t.call(this)||this).LV=n,i}Rt(n,t);var i=n.prototype;return i.TV=function(){return this.LV.TV()},i.bI=function(t){return this.LV.bI(t)},i.ZO=function(t){return this.LV.ZO(t)},i.gj=function(t){return this.LV.gj(t)},i.vV=function(t){return this.LV.vV(t)},i.bV=function(){return this.LV.bV()},It(n,[{key:"mV",get:function(){return this.LV.mV}},{key:"yV",get:function(){return this.LV.yV}}]),n}(Ev);var Mv,Lv,Uv,Fv,zv,Wv=function(t){function n(n,i){var e,r,o,u,s,f;i?(r=i._I,o=i.wI,u=i.OS,s=i.KO,f=i.kV):(r=[],o=ch.Ru,u=200,s="OK",f=!1);var h=n.LS,c=new ah(n._I||r),a=n.wI||o,v=n.LI||(i&&i.LS===h?i.LI:h.zu),d=i?i.LV:null,l=Iv(void 0!==n.zm?n.zm:d,n.AV||new Zt,c);return(e=t.call(this,l)||this)._I=c,e.LS=h,e.LI=v,e.wI=a,e.OS=void 0!==n.OS?n.OS:u,e.KO=void 0!==n.KO?String(n.KO):s,e.kV=n.kV||f,e}Rt(n,t);var i=n.prototype;return i.zm=function(t){return this.bO(this.wI,t)},i.Lm=function(){return new n({zm:this.bV(),LS:this.LS},this)},n}(Bv);!function(t){t.DELETE="DELETE",t.GET="GET",t.HEAD="HEAD",t.OPTIONS="OPTIONS",t.POST="POST",t.PUT="PUT"}(Mv||(Mv={})),function(t){t.hT="",t.JS="manifest",t.$S="segment",t.tI="preload-hint",t.iI="content-protection"}(Lv||(Lv={})),function(t){t.hT="",t.eI="initialization-segment",t.sI="fairplay-license",t.nI="fairplay-certificate",t.rI="widevine-license",t.hI="widevine-certificate",t.oI="playready-license",t.aI="clearkey-license",t.uI="aes128-key"}(Uv||(Uv={})),function(t){t.hT="",t.Mm="audio",t.ym="video",t.Ru="text",t.rT="image"}(Fv||(Fv={})),function(t){t.cI="same-origin",t.Fv="no-cors",t.lI="cors",t.dI="navigate"}(zv||(zv={}));var qv=function(t,n){var i,e,r,o,u,s,f,h,c,a,v,d,l,w,b,g,m,p,y=t.zu;n?(i=n.fI,e=n._I,r=n.gI,o=n.wI,u=n.jS,s=n.vI,f=n.Wd,h=n.Rg,c=n.AI,a=n.mI,v=n.pI,d=n.yI,l=n.jg,w=n.MI,b=n.TI):(i=null,e={},r="GET",o=ch.Ru,u=0,s=0,h="",c="",a="",v=!1,l=void 0,w=!1,b=void 0),this.zu=y,this.fI=t.fI||i,this._I=new ah(t._I||e),this.gI=t.gI||r,this.wI=t.wI||o,this.jS=void 0!==t.jS?Number(t.jS)||0:u,this.vI=void 0!==t.vI?Number(t.vI)||0:s,this.Wd=t.Wd||f||(new Zt).Wd,this.Rg=t.Rg||h,this.AI=t.AI||c,this.mI=t.mI||a,this.pI=void 0!==t.pI?Boolean(t.pI):v,this.yI=t.yI||d,this.jg=null!=(g=t.jg)?g:l,this.MI=null!=(m=t.MI)?m:w,this.TI=null!=(p=t.TI)?p:b},Vv=function(){function t(){}var n=t.prototype;return n.LS=function(t){var n=function(t){return new Wv({zm:null,_I:{},LS:t,LI:t.zu,wI:t.wI,OS:0,KO:hh.fw})}(new qv(t));return X.resolve(n)},n.eY=function(t){},n.gn=function(){},t}();var Hv,Xv=function(){function t(t,n){void 0===n&&(n=!0),this.jV=t,this.zV=n}var n=t.prototype;return n.LS=function(t){var n=this.OV(t);return this.jV.LS(n)},n.eY=function(t){return this.jV.eY(this.PV(t))},n.OV=function(n){var i=new qv(n);if(!this.zV){var e=t.BV(i.zu);i=new qv({zu:e},i)}return i},n.PV=function(n){var i=n.zu;return this.zV||(i=t.BV(i)),{zu:i,fI:n.fI}},n.gn=function(){this.jV.gn()},t.BV=function(t){return pt.RV&&Vn(t,"http://")?t.replace(":","s:"):t},It(t,null,[{key:"xV",get:function(){return t.CV||(t.CV=new t(new Vv)),t.CV}}]),t}();Xv.CV=void 0,function(t){t.IS="HttpOpenError",t.ES="HttpResponseError",t.bS="HttpTimeoutError"}(Hv||(Hv={}));var jv=function(t){function n(n,i,e){var r;return(r=t.call(this,i,e)||this).kS=n,r}return Rt(n,t),It(n,[{key:"LS",get:function(){return this.kS}}]),n}(Gt);var Yv=function(t){function n(n,i){return t.call(this,n,function(t){return"Error while opening "+t+". Invalid URL."}(n.zu),i)}return Rt(n,t),It(n,[{key:"name",get:function(){return Hv.IS}}]),n}(jv);var Kv=function(t){function n(n,i,e){var r;return(r=t.call(this,n.LS,null!=e?e:function(t){return"Error while loading "+t.LS.zu+", status code "+t.OS}(n),i)||this).CS=n,r}return Rt(n,t),It(n,[{key:"name",get:function(){return Hv.ES}},{key:"xS",get:function(){return this.CS}}]),n}(jv);var Gv=function(t){function n(n,i){return t.call(this,n,function(t){return"Request for "+t.zu+" timed out after "+t.jS+" seconds."}(n),i)}return Rt(n,t),It(n,[{key:"name",get:function(){return Hv.bS}}]),n}(jv),$v=self.fetch,Zv=self.Request,Jv=self.Response,Qv=self.Headers,td=self.ReadableStream,nd=self.AbortSignal,id=self.AbortController,ed=St((function(){try{return ht($v)&&ct(Zv)&&ct(Jv)&&ct(Qv)&&"forEach"in Qv.prototype&&ko()}catch(t){return!1}})),rd=["http:","https:"];var od=St((function(){try{return ed()&&ct(nd)&&ct(id)&&"signal"in Zv.prototype}catch(t){return!1}})),ud=St((function(){try{return ed()&&ct(td)&&"body"in Jv.prototype&&!Vi.fE}catch(t){return!1}}));function sd(t,n){var i,e=t._I.has("content-length")?Number(t._I.get("content-length")):void 0;return i=t.yV?function(t,n,i){return t.pipeThrough(new ev(new fd(n,i)))}(t.vV(),n,e):function(t,n,i){return hd.apply(this,arguments)}(t.gj(),n,e),new Wv({zm:i,LS:t.LS},t)}var fd=function(){function t(t,n){this.pit=t,this.yit=n,this.mit=0}var n=t.prototype;return n.transform=function(t,n){this.mit+=t.byteLength,this.pit(this.mit,this.yit),n.enqueue(t)},n.flush=function(t){var n;this.pit(this.mit,null!=(n=this.yit)?n:this.mit)},t}();function hd(){return hd=tt((function(t,n,i){var e,r;return nt(this,(function(o){switch(o.label){case 0:return[4,X.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]}}))})),hd.apply(this,arguments)}var cd=function(){function t(t){this.DC=new Zt,this.CS=void 0,this.Tit=!1,this.kS=t,this.DC.Xd(t.Wd),this.xS=this.Mit()}var n=t.prototype;return n.Mit=function(){var t=this;return tt((function(){var n,i,e,r,o,s,f,h,c;return nt(this,(function(a){switch(a.label){case 0:(n=t.kS).jS&&u((function(){t.Tit=!0,t.DC.qd()}),n.jS);try{i=$v(n.zu,{method:n.gI,headers:n._I.XS(),body:n.fI,credentials:n.pI?"include":"same-origin",signal:dd(t.DC.Wd),mode:n.jg,keepalive:n.TI})}catch(t){throw new Yv(n,t)}a.label=1;case 1:return a.trys.push([1,3,,4]),[4,i];case 2:return e=a.sent(),[3,4];case 3:throw r=a.sent(),Qt(o=t.Nit(r))&&t.DC.qd(),o;case 4:if(s=e.url||n.zu,f=0===e.status&&"file:"===function(t){return pt.Dh(t).protocol}(s)?200:e.status,h=new ad(t,e,t.DC),!function(t){return t.OS>=200&&t.OS<=299||304===t.OS}(c=new Wv({zm:h,LS:n,wI:n.wI,_I:ld(e.headers),OS:f,KO:e.statusText,LI:s})))throw new Kv(c);return n.yI&&(c=sd(c,n.yI)),[2,c]}}))}))()},n.Nit=function(t){return function(t){return t instanceof jv}(t)?t:Qt(t)?this.Tit?new Gv(this.kS):new Jt(t.message,t):this.CS?new Kv(this.CS,t):new Yv(this.kS,t)},t}(),ad=function(t){function n(n,i,e){var r;return(r=t.call(this)||this).NV=new nu,r.Sit=n,r.Dit=i,r.DC=e,r.NV.tL.catch(_t),r}Rt(n,t);var i=n.prototype;return i.TV=function(){return this.NV.tL},i.bI=function(t){return this.DV(this.Dit.text(),t)},i.gj=function(t){return this.DV(this.Dit.arrayBuffer(),t)},i.vV=function(){var t=this.Dit.body;return t?this.SV(t):pv(this.gj().then(gv),this.DC)},i.bV=function(){var t=this.Dit.clone(),i=Ot(this.DC.Zd(),2),e=i[0],r=i[1];return this.DC=e,new n(this.Sit,t,r)},i.DV=function(t,n){var i=this;n&&this.DC.Xd(n);var e=tn(X.resolve(t),this.DC.Wd).catch((function(t){throw i.Sit.Nit(t)}));return e=nn(e,this.DC),this.NV.Xd(e.then(_t)),e},i.SV=function(t){var n=this;return new Ka(new bd(t,(function(t){return n.Sit.Nit(t)}),this.DC,this.NV),{highWaterMark:0})},It(n,[{key:"mV",get:function(){return this.Dit.bodyUsed}},{key:"yV",get:function(){return ut(this.Dit.body)}}]),n}(Ev),vd="abort";function dd(t){if(od()){var n=new id;if(t.zd)n.abort();else if(!t.Bd){var i=function(){e(),n.abort()},e=function(){n.signal.removeEventListener(vd,i),t.Yd(i),t.Vd(e)};n.signal.addEventListener(vd,i),t.Fd(i),t.Gd(e)}return n.signal}}function ld(t){if(function(t){return ft(t)&&"function"==typeof t.forEach}(t)){var n=new ah;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 ah(t)}var wd,bd=function(){function t(t,n,i,e){this.Iit=t,this.Eit=n,this.DC=i,this.NV=e}var n=t.prototype;return n.start=function(t){this._G=this.Iit.getReader()},n.pull=function(t){var n=this;return tt((function(){var i,e,r;return nt(this,(function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),[4,tn(n._G.read(),n.DC.Wd)];case 1:return i=o.sent(),[3,3];case 2:return e=o.sent(),r=n.Eit(e),n.NV.Jb(r),n.DC.qd(),n._G.cancel(r).catch(_t),t.error(r),[2];case 3:return i.done?(n.NV.Zb(),n.DC.qd(),t.close()):t.enqueue(i.value),[2]}}))}))()},n.cancel=function(t){return this.DC.qd(),this.NV.Jb(t),this._G.cancel(t)},t}();!function(t){t[t.UNSENT=0]="UNSENT",t[t.OPENED=1]="OPENED",t[t.HEADERS_RECEIVED=2]="HEADERS_RECEIVED",t[t.LOADING=3]="LOADING",t[t.DONE=4]="DONE"}(wd||(wd={}));var gd=function(){function t(t){var n=this;this.DC=new Zt,this.CS=void 0,this.Lit=new nu,this.Bit=!1,this.zit=function(){var t;n.xit(),null==(t=n.kit)||t.abort()},this.kS=t,this.DC.Xd(t.Wd),this.kit=new m,this.Mit()}var n=t.prototype;return n.Mit=function(){var t=this,n=this.kit,i=this.kS;if(i.Wd.zd)return this.xit();n.onreadystatechange=function(){return t.Cit()},n.onprogress=function(n){return t.pit(n)},n.onload=function(){return t.Oit()},n.onloadend=function(){return t.jit()},n.onerror=function(){return t.tX()},n.ontimeout=function(){return t.Pit()},n.onabort=function(){return t.xit()},n.open(i.gI,i.zu,!0),n.withCredentials=Boolean(i.pI),"responseType"in n&&i.wI&&(i.wI===ch.Ru?n.responseType="text":n.responseType="arraybuffer"),i._I.forEach((function(t,i){n.setRequestHeader(i,t)})),i.jS&&(n.timeout=i.jS),this.DC.Wd.Fd(this.zit);var e=i.fI;e?n.send(e):n.send()},n.Cit=function(){var t=this.kit;void 0!==t&&t.readyState>=2&&!this.Bit&&(this.Bit=!0,this.Rit())},n.Rit=function(){var t,n,i=this.kit,e=function(t){var n=new ah,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.kS;this.Uit=new nu,this.CS=new Wv({LS:r,wI:r.wI,zm:this.Uit.tL,OS:i.status,KO:i.statusText,_I:e,LI:null!=(n=i.responseURL)?n:e.get("X-Request-URL")}),null==(t=this.Lit)||t.Zb(this.CS)},n.Oit=function(){var t,n=this.kit;if(void 0!==n){var i=n.response;if(!ut(i)){var e=this.kS.wI;i=e===ch.Ru?n.responseText:e===ch.WS?new ArrayBuffer(0):{}}null==(t=this.Uit)||t.Zb(i)}},n.jit=function(){this.gn()},n.pit=function(t){void 0!==this.kit&&(null==this.kS.yI||this.kS.yI.call(this.kS,t.loaded,t.lengthComputable?t.total:void 0))},n.tX=function(){var t=new c("Network request failed");this.CS?this.Ss(new Kv(this.CS,t)):this.Ss(new Yv(this.kS,t))},n.Pit=function(){this.Ss(new Gv(this.kS))},n.xit=function(){this.Ss(new Jt),this.gn()},n.Ss=function(t){var n,i;null==(n=null!=(i=this.Uit)?i:this.Lit)||n.Jb(t)},n.gn=function(){this.kit=void 0,this.CS=void 0,this.Lit=void 0,this.Uit=void 0,this.DC.Ud()},It(t,[{key:"xS",get:function(){return this.Lit.tL}}]),t}();var md,pd=function(){function t(){}var n=t.prototype;return n.LS=function(t){return function(t){if(!ed()||!function(t){try{return rd.indexOf(new self.URL(t,self.location.href).protocol)>=0}catch(t){return!1}}(t.zu))return!1;if(!ud()&&t.yI)return!1;if(!t.MI){if(Vi.OE&&Vi.ME<=68)return!1;if(Vi.LE)return!1}return!0}(t)?new cd(t).xS:new gd(t).xS},n.eY=function(t){var n=t.HP?{"Content-type":t.HP}:void 0;this.LS(new qv({gI:Mv.POST,zu:t.zu,fI:t.fI,_I:n,jg:zv.Fv})).then((function(t){!function(t){t.then(_t,_t)}(t.gj())}),_t)},n.gn=function(){},t}();!function(t){t[t.eS=1]="eS",t[t.sS=2]="sS",t[t.Ru=3]="Ru",t[t.nS=4]="nS",t[t.rS=9]="rS"}(md||(md={}));var yd=function(t){function n(n){return t.call(this,"Invalid XML",n)}return Rt(n,t),n}(Gt),_d=function(){function t(){}return t.prototype.AS=function(t){var n,i=new DOMParser;try{n=i.parseFromString(t,"text/xml")}catch(t){throw new yd(t)}if(!n||n.getElementsByTagName("parsererror").length>0)throw new yd;return new Od(n)},t}(),Sd=function(){function t(t){this.Qit=t}var n=t.prototype;return n.tS=function(t){return this.Qit.isEqualNode(t.Qit)},n.oS=function(n){return new t(this.Qit.cloneNode(n))},It(t,[{key:"iS",get:function(){return md.sS}},{key:"vS",get:function(){var t;return null!=(t=this.Qit.localName)?t:Ad(this.Qit.nodeName)}},{key:"l",get:function(){return this.Qit.nodeName}},{key:"Fit",get:function(){var t;return null!=(t=this.Qit.namespaceURI)?t:void 0}},{key:"Yit",get:function(){var t;return null!=(t=this.Qit.prefix)?t:void 0}},{key:"PM",get:function(){return this.Qit.nodeValue}}]),t}(),Td=function(){function t(t){this.Git=void 0,this.Vit=t}var n=t.prototype;return n.gS=function(t){return this.MS.filter((function(n){return Nd(n)&&n.wj===t}))},n._S=function(t,n){return this.MS.filter((function(i){return Nd(i)&&i.vS===n&&i.Fit===t}))},n.TS=function(t){this.Vit.appendChild(t.WD),this.Git&&this.Git.push(t)},n.tS=function(t){return this.Vit.isEqualNode(t.WD)},It(t,[{key:"MS",get:function(){return void 0===this.Git&&(this.Git=function(t){for(var n=[],i=0;i<t.length;i++){var e=Pd(t.item(i));e&&n.push(e)}return n}(this.Vit.childNodes)),this.Git}},{key:"m",get:function(){return this.MS.filter(Nd)}},{key:"WD",get:function(){return this.Vit}}]),t}(),Ed=function(t){function n(n){return t.call(this,n)}Rt(n,t);var i=n.prototype;return i.pS=function(t){if(this.Vit.hasAttribute(t))return this.Vit.getAttribute(t)},i.yS=function(t,n){if(this.Vit.hasAttributeNS(t,n))return this.Vit.getAttributeNS(t,n)},i.lS=function(t){this.Vit.removeAttribute(t)},i.Wit=function(t,n){this.Vit.removeAttributeNS(t,n)},i.Hit=function(t,n){this.Vit.setAttribute(t,n)},i.qit=function(t,n,i){this.Vit.setAttributeNS(t,n,i)},i.oS=function(t){return new n(this.Vit.cloneNode(t))},It(n,[{key:"iS",get:function(){return md.eS}},{key:"vS",get:function(){var t;return null!=(t=this.Vit.localName)?t:Ad(this.Vit.nodeName)}},{key:"Fit",get:function(){var t;return null!=(t=this.Vit.namespaceURI)?t:void 0}},{key:"Yit",get:function(){var t;return null!=(t=this.Vit.prefix)?t:void 0}},{key:"wj",get:function(){return this.Vit.nodeName}},{key:"wS",get:function(){return function(t){for(var n=[],i=0;i<t.length;i++)n.push(new Sd(t.item(i)));return n}(this.Vit.attributes)}},{key:"aj",get:function(){return this.Vit.textContent}}]),n}(Td),Id=function(){function t(t){this.Vit=t}return t.prototype.tS=function(t){return this.zm===t.zm},It(t,[{key:"zm",get:function(){return this.Vit.nodeValue}},{key:"WD",get:function(){return this.Vit}}]),t}(),kd=function(t){function n(n){return t.call(this,n)}return Rt(n,t),n.prototype.oS=function(t){return new n(this.Vit.cloneNode(t))},It(n,[{key:"iS",get:function(){return md.Ru}}]),n}(Id),Rd=function(t){function n(n){return t.call(this,n)}return Rt(n,t),n.prototype.oS=function(t){return new n(this.Vit.cloneNode(t))},It(n,[{key:"iS",get:function(){return md.nS}}]),n}(Id),Od=function(t){function n(n){return t.call(this,n)}return Rt(n,t),n.prototype.oS=function(t){return new n(this.Vit.cloneNode(t))},It(n,[{key:"iS",get:function(){return md.rS}},{key:"mS",get:function(){return new Ed(this.Vit.documentElement)}}]),n}(Td);function Nd(t){return function(t){return 1===t.iS}(t)}function Pd(t){switch(t.nodeType){case md.eS:return new Ed(t);case md.Ru:return new kd(t);case md.nS:return new Rd(t)}}function Ad(t){var n=t.indexOf(":");return n<0?t:t.substr(n+1)}var Dd=function(t){function n(){var n;return(n=t.apply(this,arguments)||this).Xit=void 0,n.Kit=ud(),n.Jit=Vi.gb||Vi.fE,n.$it=(Vi.gb||Vi.OE&&Vi.ME<=68||Vi.fE)&&!(Vi.LE&&Vi.xE<3),n.het=void 0,n.oet=new _d,n}return Rt(n,t),n.prototype.AS=function(t){return this.oet.AS(t)},It(n,[{key:"_it",get:function(){return this.Xit||(this.Xit=new Yo(eh())),this.Xit}},{key:"Zit",get:function(){return this.Kit}},{key:"L$",get:function(){return this.Jit}},{key:"H$",get:function(){return this.$it}},{key:"tet",get:function(){return!1}},{key:"Jj",get:function(){return oh.lQ()}},{key:"iet",get:function(){return{eet:fh}}},{key:"net",get:function(){return o.connection&&o.connection.effectiveType||"default"}},{key:"ret",get:function(){return o.connection&&o.connection.type||"unknown"}},{key:"AO",get:function(){return this.het||(this.het=new Xv(new pd)),this.het}}]),n}(Eo);yt(new Dd),yt(new Dd);var Cd=self;Cd.addEventListener("install",(function(t){t.waitUntil(Cd.skipWaiting())})),Cd.addEventListener("activate",(function(t){t.waitUntil(Cd.clients.claim())})),Ai.dz.ur(Cd)}("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof s?s:"undefined"!=typeof global?global:this);
|